diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index 93f47969ce..0000000000 --- a/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -system.list -bin -.gdb_history -Test -config.cashe -config.status -system.list diff --git a/Makefile b/Makefile deleted file mode 100644 index c35ef5ea06..0000000000 --- a/Makefile +++ /dev/null @@ -1,173 +0,0 @@ -# Top-level Makefile for wxGTK by Wolfram Gloger -# based on the version for wx-Xt by Martin Sperl - -SHELL=/bin/sh - -#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 - - diff --git a/TODO.txt b/TODO.txt deleted file mode 100644 index add11baea9..0000000000 --- a/TODO.txt +++ /dev/null @@ -1,52 +0,0 @@ -********************* TODO list for wxWindows 2 ****************************** - -The items are grouped by platform (generic, MSW, GTK...) and inside by -subject. The first 2 columns containg the following codes: - -Priority classification: Amount of work expected: -9 next point release q quick fix -8 next release s small change -7 as soon as possible l a little work -6 soon w some work -5 should be included b big change -4 nice to have m major change -3 consider including ? don't know how to fix -2 maybe not - unclassified -1 probably not -- unclassified - -After the subject the name in brackets indicates the person who is going to do -it. - -=============================== common ======================================== - -4w wxString optimization (VZ) - allocate more memory than needed to avoid reallocation each time when - operator+ or += is used. - -6b stream classes (VZ) - -=============================== generic ====================================== - -7s wxTreeCtrl root item (RR) - root item is not shown currently (unlike in MSW version) - -5w wxImageList - it's not implemented currently, to do (assuming that all images have the - same size - no resizing should be done to simplify the job) - -================================ MSW ========================================== - -7w consistent keyboard interface and focus behaviour (VZ) - currently, the focus is lost all the time (after a MessageBox, for example) - and sometimes TABbing through controls doesn't work - -================================ GTK ========================================== - -9m keyboard interface (RR) - TAB traversal, Alt-letter accelerators for the controls and accelerators - for menu items - TODO. - -3b wxTreeCtrl native implementation? - GTK has a GtkCTree widget which seems to be quite close to the Windows - standard control - what about writing a native wxTreeCtrl based on it? diff --git a/config.guess b/config.guess deleted file mode 100755 index c3c4e799a6..0000000000 --- a/config.guess +++ /dev/null @@ -1,599 +0,0 @@ -#! /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 . -# 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 - - 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 - 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 </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' /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 < -# include -#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 - 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 diff --git a/config.sub b/config.sub deleted file mode 100755 index 0432524944..0000000000 --- a/config.sub +++ /dev/null @@ -1,927 +0,0 @@ -#! /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 diff --git a/configure b/configure deleted file mode 100755 index 792f25a624..0000000000 --- a/configure +++ /dev/null @@ -1,7190 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help - --with-x use the X Window System" -ac_help="$ac_help -**--with-gtk use GTK" -ac_help="$ac_help -**--with-qt use Qt" -ac_help="$ac_help -**--with-motif use Motif/Lesstif" -ac_help="$ac_help -**--with-shared create shared libraries" -ac_help="$ac_help -**--with-optimise create optimised code" -ac_help="$ac_help -**--with-debug_flag create code with WXDEBUG define set to 1" -ac_help="$ac_help -**--with-debug_info create code with debuging information" -ac_help="$ac_help -**--with-mem_traing create code with memory tracing" -ac_help="$ac_help -**--with-dmalloc use dmalloc memory debug library (www.letters.com/dmalloc/)" -ac_help="$ac_help -**--with-profile create code with profiling information" -ac_help="$ac_help -**--with_apple_ieee use the Apple IEEE codec" -ac_help="$ac_help -**--with-zlib use zlib for LZW comression" -ac_help="$ac_help -**--with-gdk_imlib use Raster's gdk_imlib (Image library)" -ac_help="$ac_help -**--with-libpng use libpng (PNG image format)" -ac_help="$ac_help -**--with-odbc use iODBC and wxODBC classes" -ac_help="$ac_help -**--with-opengl use OpenGL (or Mesa)" -ac_help="$ac_help -**--with-gauge use wxGauge class" -ac_help="$ac_help -**--with-scrollbar use wxScrollbar class" -ac_help="$ac_help -**--with-listctrl use wxListCtrl class" -ac_help="$ac_help -**--with-treectrl use wxTreeCtrl class" -ac_help="$ac_help -**--with-grid use wxGrid class" -ac_help="$ac_help -**--with-tab_dialog use wxTabDia class" -ac_help="$ac_help -**--with-notebook use wxNotebook class" -ac_help="$ac_help -**--with-timedate use wxTime and wxDate classes" -ac_help="$ac_help -**--with-fraction use wxFraction class" -ac_help="$ac_help -**--with-log use logging system" -ac_help="$ac_help -**--with-intl use internationalization system" -ac_help="$ac_help -**--with-config use wxConfig class" -ac_help="$ac_help -**--with-streams use wxStream etc classes" -ac_help="$ac_help -**--with-serial use class serialization" -ac_help="$ac_help -**--with-file use wxFile class" -ac_help="$ac_help -**--with-textfile use wxTextFile class" -ac_help="$ac_help -**--with-afmfonts use Adobe Font Metric Font table" -ac_help="$ac_help -**--with-PS-normalized use normalized PS fonts" -ac_help="$ac_help -**--with-postscript use wxPostscriptDC device context" -ac_help="$ac_help -**--with-wxresources use wxWindows's resources" -ac_help="$ac_help -**--with-prologio use Prolog IO library" -ac_help="$ac_help -**--with-rpc use Prolog's remote procedure calls" -ac_help="$ac_help -**--with-ipc use interprocess communication (wxSocket etc.)" -ac_help="$ac_help -**--with-resources use X resources for saving information" -ac_help="$ac_help -**--with-clipboard use wxClipboard classes" -ac_help="$ac_help -**--with-dnd use Drag'n'Drop classes" -ac_help="$ac_help -**--with-constraints use layout-constraints system" -ac_help="$ac_help -**--with-mdi use multiple document interface architecture" -ac_help="$ac_help -**--with-docview use document view architecture" -ac_help="$ac_help -**--with-printarch use printing architecture" -ac_help="$ac_help -**--with-gtk-prefix=PFX Prefix where GTK is installed" -ac_help="$ac_help -**--with-gtk-exec-prefix=PFX Exec prefix where GTK is installed" -ac_help="$ac_help -**--without-threads Force disabling threads " - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=configure.in - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - - - -OS="${OSTYPE}" - -if test "x$OS" = "x"; then - UNAME=`uname` - { echo "configure: error: "The system variable OS has not been set" - "please set is everytime befor compiling on this system" - "A good example for this system would be:" - "setenv OSTYPE $UNAME for csh as a SHELL" - "EXPORT OSTYPE=$UNAME for sh as SHELL" - "please set this and restart again." - " 1>&2; exit 1; } -fi - - -WXBASEDIR=`pwd` - - - -SEARCH_INCLUDE="\ - /usr/Motif1.2/include \ - \ - /usr/X11R6/include \ - /usr/X11R5/include \ - /usr/X11R4/include \ - \ - /usr/include/X11R6 \ - /usr/include/X11R5 \ - /usr/include/X11R4 \ - \ - /usr/local/X11R6/include \ - /usr/local/X11R5/include \ - /usr/local/X11R4/include \ - \ - /usr/local/include/X11R6 \ - /usr/local/include/X11R5 \ - /usr/local/include/X11R4 \ - \ - /usr/X11/include \ - /usr/include/X11 \ - /usr/local/X11/include \ - /usr/local/include/X11 \ - \ - /usr/X386/include \ - /usr/x386/include \ - /usr/XFree86/include/X11 \ - \ - /usr/include \ - /usr/local/include \ - /usr/unsupported/include \ - /usr/athena/include \ - /usr/local/x11r5/include \ - /usr/lpp/Xamples/include \ - \ - /usr/local/include/gtk \ - /usr/X11R6/include/Xm \ - /usr/X11/include/Xm \ - /usr/include/qt \ - \ - /usr/openwin/include \ - /usr/openwin/share/include \ - " - -SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s/include/lib/g` \ - " - - - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:694: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:723: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - ac_prog_rejected=no - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:771: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:805: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:810: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:834: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-O2" - fi -else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" -fi - - -CFLAGS=`echo "$CFLAGS" | sed 's/-g//g'` - -if test "x$CC" != xcc; then - echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 -echo "configure:866: checking whether $CC and cc understand -c and -o together" >&5 -else - echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 -echo "configure:869: checking whether cc understands -c and -o together" >&5 -fi -set dummy $CC; ac_cc="`echo $2 | - sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" -if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'foo(){}' > conftest.c -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' -if { (eval echo configure:881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then - ac_try='cc -c conftest.c -o conftest.o 1>&5' - if { (eval echo configure:889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f conftest* - -fi -if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 - cat >> confdefs.h <<\EOF -#define NO_MINUS_C_MINUS_O 1 -EOF - -fi - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:917: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:979: checking whether ${CC-cc} needs -traditional" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_pattern="Autoconf.*'x'" - cat > conftest.$ac_ext < -Autoconf TIOCGETP -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "$ac_pattern" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_prog_gcc_traditional=yes -else - rm -rf conftest* - ac_cv_prog_gcc_traditional=no -fi -rm -f conftest* - - - if test $ac_cv_prog_gcc_traditional = no; then - cat > conftest.$ac_ext < -Autoconf TCGETA -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "$ac_pattern" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_prog_gcc_traditional=yes -fi -rm -f conftest* - - fi -fi - -echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi -fi - - - - -for ac_prog in $CCC c++ g++ gcc CC cxx cc++ -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1032: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CXX="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CXX="$ac_cv_prog_CXX" -if test -n "$CXX"; then - echo "$ac_t""$CXX" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$CXX" && break -done -test -n "$CXX" || CXX="gcc" - - -echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1063: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 - -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross - -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - ac_cv_prog_cxx_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cxx_cross=no - else - ac_cv_prog_cxx_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cxx_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 -if test $ac_cv_prog_cxx_works = no; then - { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1103: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 -cross_compiling=$ac_cv_prog_cxx_cross - -echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:1108: checking whether we are using GNU C++" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.C <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gxx=yes -else - ac_cv_prog_gxx=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gxx" 1>&6 - -if test $ac_cv_prog_gxx = yes; then - GXX=yes - ac_test_CXXFLAGS="${CXXFLAGS+set}" - ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS= - echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:1132: checking whether ${CXX-g++} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.cc -if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then - ac_cv_prog_cxx_g=yes -else - ac_cv_prog_cxx_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 - if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS="$ac_save_CXXFLAGS" - elif test $ac_cv_prog_cxx_g = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-O2" - fi -else - GXX= - test "${CXXFLAGS+set}" = set || CXXFLAGS="-g" -fi - -echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:1160: checking how to run the C++ preprocessor" >&5 -if test -z "$CXXCPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross - CXXCPP="${CXX-g++} -E" - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CXXCPP=/lib/cpp -fi -rm -f conftest* - ac_cv_prog_CXXCPP="$CXXCPP" -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross -fi -fi -CXXCPP="$ac_cv_prog_CXXCPP" -echo "$ac_t""$CXXCPP" 1>&6 - - -CXXFLAGS=`echo "$CXXFLAGS" | sed 's/-g//g'` - - - -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1210: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -# Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1240: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AR="ar" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" -fi -fi -AR="$ac_cv_prog_AR" -if test -n "$AR"; then - echo "$ac_t""$AR" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1297: checking for a BSD compatible install" >&5 -if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -echo "$ac_t""$INSTALL" 1>&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - -echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1348: checking whether ln -s works" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - rm -f conftestdata -if ln -s X conftestdata 2>/dev/null -then - rm -f conftestdata - ac_cv_prog_LN_S="ln -s" -else - ac_cv_prog_LN_S=ln -fi -fi -LN_S="$ac_cv_prog_LN_S" -if test "$ac_cv_prog_LN_S" = "ln -s"; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -for ac_prog in mawk gawk nawk awk -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1374: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AWK="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -AWK="$ac_cv_prog_AWK" -if test -n "$AWK"; then - echo "$ac_t""$AWK" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$AWK" && break -done - - -echo $ac_n "checking "make for VPATH support"""... $ac_c" 1>&6 -echo "configure:1404: checking "make for VPATH support"" >&5 -cat - << EOF > confMake -check : file - cp \$? \$@ - cp \$? final_file -EOF - -if test ! -d sub ; then - mkdir sub -fi -echo dummy > sub/file -${MAKE-make} -f confMake VPATH=sub 2> config.log > /dev/null -RESULT=$? -rm -f sub/file check final_file config.log confMake -rmdir sub -if test "$RESULT" = 0; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 - { echo "configure: error: You need a make-utility that is able to use the variable -VPATH correctly. -If your version of make does not support VPATH correctly" 1>&2; exit 1; } -fi - - -# If we find X, set shell vars x_includes and x_libraries to the -# paths, otherwise set no_x=yes. -# Uses ac_ vars as temps to allow command line to override cache and checks. -# --without-x overrides everything else, but does not touch the cache. -echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:1434: checking for X" >&5 - -# Check whether --with-x or --without-x was given. -if test "${with_x+set}" = set; then - withval="$with_x" - : -fi - -# $have_x is `yes', `no', `disabled', or empty when we do not yet know. -if test "x$with_x" = xno; then - # The user explicitly disabled X. - have_x=disabled -else - if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then - # Both variables are already set. - have_x=yes - else -if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # One or both of the vars are not set, and there is no cached value. -ac_x_includes=NO ac_x_libraries=NO -rm -fr conftestdir -if mkdir conftestdir; then - cd conftestdir - # Make sure to not put "make" in the Imakefile rules, since we grep it out. - cat > Imakefile <<'EOF' -acfindx: - @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' -EOF - if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` - # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - for ac_extension in a so sl; do - if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && - test -f $ac_im_libdir/libX11.$ac_extension; then - ac_im_usrlibdir=$ac_im_libdir; break - fi - done - # Screen out bogus values from the imake configuration. They are - # bogus both because they are the default anyway, and because - # using them would break gcc on systems where it needs fixed includes. - case "$ac_im_incroot" in - /usr/include) ;; - *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; - esac - case "$ac_im_usrlibdir" in - /usr/lib | /lib) ;; - *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; - esac - fi - cd .. - rm -fr conftestdir -fi - -if test "$ac_x_includes" = NO; then - # Guess where to find include files, by looking for this one X11 .h file. - test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h - - # First, try using that file with no special directory specified. -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - # We can compile using X headers with no special include directory. -ac_x_includes= -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - # Look for the header file in a standard set of common directories. -# Check X11 before X11Rn because it is often a symlink to the current release. - for ac_dir in \ - /usr/X11/include \ - /usr/X11R6/include \ - /usr/X11R5/include \ - /usr/X11R4/include \ - \ - /usr/include/X11 \ - /usr/include/X11R6 \ - /usr/include/X11R5 \ - /usr/include/X11R4 \ - \ - /usr/local/X11/include \ - /usr/local/X11R6/include \ - /usr/local/X11R5/include \ - /usr/local/X11R4/include \ - \ - /usr/local/include/X11 \ - /usr/local/include/X11R6 \ - /usr/local/include/X11R5 \ - /usr/local/include/X11R4 \ - \ - /usr/X386/include \ - /usr/x386/include \ - /usr/XFree86/include/X11 \ - \ - /usr/include \ - /usr/local/include \ - /usr/unsupported/include \ - /usr/athena/include \ - /usr/local/x11r5/include \ - /usr/lpp/Xamples/include \ - \ - /usr/openwin/include \ - /usr/openwin/share/include \ - ; \ - do - if test -r "$ac_dir/$x_direct_test_include"; then - ac_x_includes=$ac_dir - break - fi - done -fi -rm -f conftest* -fi # $ac_x_includes = NO - -if test "$ac_x_libraries" = NO; then - # Check for the libraries. - - test -z "$x_direct_test_library" && x_direct_test_library=Xt - test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc - - # See if we find them without any special options. - # Don't add to $LIBS permanently. - ac_save_LIBS="$LIBS" - LIBS="-l$x_direct_test_library $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - LIBS="$ac_save_LIBS" -# We can link X programs with no special library path. -ac_x_libraries= -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - LIBS="$ac_save_LIBS" -# First see if replacing the include by lib works. -# Check X11 before X11Rn because it is often a symlink to the current release. -for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ - /usr/X11/lib \ - /usr/X11R6/lib \ - /usr/X11R5/lib \ - /usr/X11R4/lib \ - \ - /usr/lib/X11 \ - /usr/lib/X11R6 \ - /usr/lib/X11R5 \ - /usr/lib/X11R4 \ - \ - /usr/local/X11/lib \ - /usr/local/X11R6/lib \ - /usr/local/X11R5/lib \ - /usr/local/X11R4/lib \ - \ - /usr/local/lib/X11 \ - /usr/local/lib/X11R6 \ - /usr/local/lib/X11R5 \ - /usr/local/lib/X11R4 \ - \ - /usr/X386/lib \ - /usr/x386/lib \ - /usr/XFree86/lib/X11 \ - \ - /usr/lib \ - /usr/local/lib \ - /usr/unsupported/lib \ - /usr/athena/lib \ - /usr/local/x11r5/lib \ - /usr/lpp/Xamples/lib \ - /lib/usr/lib/X11 \ - \ - /usr/openwin/lib \ - /usr/openwin/share/lib \ - ; \ -do - for ac_extension in a so sl; do - if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then - ac_x_libraries=$ac_dir - break 2 - fi - done -done -fi -rm -f conftest* -fi # $ac_x_libraries = NO - -if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then - # Didn't find X anywhere. Cache the known absence of X. - ac_cv_have_x="have_x=no" -else - # Record where we found X for the cache. - ac_cv_have_x="have_x=yes \ - ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" -fi -fi - fi - eval "$ac_cv_have_x" -fi # $with_x != no - -if test "$have_x" != yes; then - echo "$ac_t""$have_x" 1>&6 - no_x=yes -else - # If each of the values was on the command line, it overrides each guess. - test "x$x_includes" = xNONE && x_includes=$ac_x_includes - test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries - # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes \ - ac_x_includes=$x_includes ac_x_libraries=$x_libraries" - echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 -fi - -if test "$no_x" = yes; then - # Not all programs may use this symbol, but it does not hurt to define it. - cat >> confdefs.h <<\EOF -#define X_DISPLAY_MISSING 1 -EOF - - X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= -else - if test -n "$x_includes"; then - X_CFLAGS="$X_CFLAGS -I$x_includes" - fi - - # It would also be nice to do this for all -L options, not just this one. - if test -n "$x_libraries"; then - X_LIBS="$X_LIBS -L$x_libraries" - # For Solaris; some versions of Sun CC require a space after -R and - # others require no space. Words are not sufficient . . . . - case "`(uname -sr) 2>/dev/null`" in - "SunOS 5"*) - echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:1683: checking whether -R must be followed by a space" >&5 - ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - ac_R_nospace=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_R_nospace=no -fi -rm -f conftest* - if test $ac_R_nospace = yes; then - echo "$ac_t""no" 1>&6 - X_LIBS="$X_LIBS -R$x_libraries" - else - LIBS="$ac_xsave_LIBS -R $x_libraries" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - ac_R_space=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_R_space=no -fi -rm -f conftest* - if test $ac_R_space = yes; then - echo "$ac_t""yes" 1>&6 - X_LIBS="$X_LIBS -R $x_libraries" - else - echo "$ac_t""neither works" 1>&6 - fi - fi - LIBS="$ac_xsave_LIBS" - esac - fi - - # Check for system-dependent libraries X programs must link with. - # Do this before checking for the system-independent R6 libraries - # (-lICE), since we may need -lsocket or whatever for X linking. - - if test "$ISC" = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" - else - # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X - # libraries were built with DECnet support. And karl@cs.umb.edu says - # the Alpha needs dnet_stub (dnet does not exist). - echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:1748: checking for dnet_ntoa in -ldnet" >&5 -ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldnet $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" -else - echo "$ac_t""no" 1>&6 -fi - - if test $ac_cv_lib_dnet_dnet_ntoa = no; then - echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:1789: checking for dnet_ntoa in -ldnet_stub" >&5 -ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldnet_stub $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" -else - echo "$ac_t""no" 1>&6 -fi - - fi - - # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, - # to get the SysV transport functions. - # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) - # needs -lnsl. - # The nsl library prevents programs from opening the X display - # on Irix 5.2, according to dickey@clark.net. - echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:1837: checking for gethostbyname" >&5 -if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethostbyname(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) -choke me -#else -gethostbyname(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_gethostbyname=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_gethostbyname=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - - if test $ac_cv_func_gethostbyname = no; then - echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:1886: checking for gethostbyname in -lnsl" >&5 -ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lnsl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" -else - echo "$ac_t""no" 1>&6 -fi - - fi - - # lieder@skyler.mavd.honeywell.com says without -lsocket, - # socket/setsockopt and other routines are undefined under SCO ODT - # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary - # on later versions), says simon@lia.di.epfl.ch: it contains - # gethostby* variants that don't use the nameserver (or something). - # -lsocket must be given before -lnsl if both are needed. - # We assume that if connect needs -lnsl, so does gethostbyname. - echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:1935: checking for connect" >&5 -if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char connect(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_connect) || defined (__stub___connect) -choke me -#else -connect(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_connect=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_connect=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - - if test $ac_cv_func_connect = no; then - echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:1984: checking for connect in -lsocket" >&5 -ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lsocket $X_EXTRA_LIBS $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" -else - echo "$ac_t""no" 1>&6 -fi - - fi - - # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. - echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:2027: checking for remove" >&5 -if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char remove(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_remove) || defined (__stub___remove) -choke me -#else -remove(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_remove=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_remove=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - - if test $ac_cv_func_remove = no; then - echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:2076: checking for remove in -lposix" >&5 -ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lposix $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" -else - echo "$ac_t""no" 1>&6 -fi - - fi - - # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:2119: checking for shmat" >&5 -if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shmat(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_shmat) || defined (__stub___shmat) -choke me -#else -shmat(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_shmat=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_shmat=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - - if test $ac_cv_func_shmat = no; then - echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:2168: checking for shmat in -lipc" >&5 -ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lipc $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" -else - echo "$ac_t""no" 1>&6 -fi - - fi - fi - - # Check for libraries that X11R6 Xt/Xaw programs need. - ac_save_LDFLAGS="$LDFLAGS" - test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" - # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to - # check for ICE first), but we must link in the order -lSM -lICE or - # we get undefined symbols. So assume we have SM if we have ICE. - # These have to be linked with before -lX11, unlike the other - # libraries we check for below, so use a different variable. - # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. - echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:2220: checking for IceConnectionNumber in -lICE" >&5 -ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lICE $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" -else - echo "$ac_t""no" 1>&6 -fi - - LDFLAGS="$ac_save_LDFLAGS" - -fi - - -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:2269: checking for $ac_hdr that defines DIR" >&5 -if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include <$ac_hdr> -int main() { -DIR *dirp = 0; -; return 0; } -EOF -if { (eval echo configure:2282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then -echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:2307: checking for opendir in -ldir" >&5 -ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldir $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -ldir" -else - echo "$ac_t""no" 1>&6 -fi - -else -echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2348: checking for opendir in -lx" >&5 -ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lx $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lx" -else - echo "$ac_t""no" 1>&6 -fi - -fi - -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2390: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#include -#include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - ac_cv_header_stdc=yes -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then - : -else - cat > conftest.$ac_ext < -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } - -EOF -if { (eval echo configure:2470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_header_stdc=no -fi -rm -fr conftest* -fi - -fi -fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 -if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF - -fi - -echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2494: checking for sys/wait.h that is POSIX.1 compatible" >&5 -if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#ifndef WEXITSTATUS -#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) -#endif -#ifndef WIFEXITED -#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) -#endif -int main() { -int s; -wait (&s); -s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; -; return 0; } -EOF -if { (eval echo configure:2515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_sys_wait_h=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_sys_wait_h=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 -if test $ac_cv_header_sys_wait_h = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_SYS_WAIT_H 1 -EOF - -fi - -ac_safe=`echo "fcntl.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for fcntl.h""... $ac_c" 1>&6 -echo "configure:2537: checking for fcntl.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - -ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for limits.h""... $ac_c" 1>&6 -echo "configure:2570: checking for limits.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - -ac_safe=`echo "sys/file.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for sys/file.h""... $ac_c" 1>&6 -echo "configure:2603: checking for sys/file.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - -ac_safe=`echo "sys/time.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for sys/time.h""... $ac_c" 1>&6 -echo "configure:2636: checking for sys/time.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - -ac_safe=`echo "unistd.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for unistd.h""... $ac_c" 1>&6 -echo "configure:2669: checking for unistd.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - -ac_safe=`echo "linux/joystick.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for linux/joystick.h""... $ac_c" 1>&6 -echo "configure:2702: checking for linux/joystick.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - -GTK_JOYSTICK="" -if test "$ac_cv_header_linux_joystick_h" = "yes"; then - GTK_JOYSTICK="gtk/joystick.cpp" -fi - - -echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2740: checking for uid_t in sys/types.h" >&5 -if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uid_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_uid_t=yes -else - rm -rf conftest* - ac_cv_type_uid_t=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_type_uid_t" 1>&6 -if test $ac_cv_type_uid_t = no; then - cat >> confdefs.h <<\EOF -#define uid_t int -EOF - - cat >> confdefs.h <<\EOF -#define gid_t int -EOF - -fi - -echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:2774: checking type of array argument to getgroups" >&5 -if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_type_getgroups=cross -else - cat > conftest.$ac_ext < -#define NGID 256 -#undef MAX -#define MAX(x, y) ((x) > (y) ? (x) : (y)) -main() -{ - gid_t gidset[NGID]; - int i, n; - union { gid_t gval; long lval; } val; - - val.lval = -1; - for (i = 0; i < NGID; i++) - gidset[i] = val.gval; - n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, - gidset); - /* Exit non-zero if getgroups seems to require an array of ints. This - happens when gid_t is short but getgroups modifies an array of ints. */ - exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); -} - -EOF -if { (eval echo configure:2807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - ac_cv_type_getgroups=gid_t -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_type_getgroups=int -fi -rm -fr conftest* -fi - -if test $ac_cv_type_getgroups = cross; then - cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_getgroups=gid_t -else - rm -rf conftest* - ac_cv_type_getgroups=int -fi -rm -f conftest* - -fi -fi - -echo "$ac_t""$ac_cv_type_getgroups" 1>&6 -cat >> confdefs.h <&6 -echo "configure:2845: checking for mode_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_mode_t=yes -else - rm -rf conftest* - ac_cv_type_mode_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_mode_t" 1>&6 -if test $ac_cv_type_mode_t = no; then - cat >> confdefs.h <<\EOF -#define mode_t int -EOF - -fi - -echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2878: checking for off_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_off_t=yes -else - rm -rf conftest* - ac_cv_type_off_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_off_t" 1>&6 -if test $ac_cv_type_off_t = no; then - cat >> confdefs.h <<\EOF -#define off_t long -EOF - -fi - -echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2911: checking for pid_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_pid_t=yes -else - rm -rf conftest* - ac_cv_type_pid_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_pid_t" 1>&6 -if test $ac_cv_type_pid_t = no; then - cat >> confdefs.h <<\EOF -#define pid_t int -EOF - -fi - -echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2944: checking return type of signal handlers" >&5 -if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#ifdef signal -#undef signal -#endif -#ifdef __cplusplus -extern "C" void (*signal (int, void (*)(int)))(int); -#else -void (*signal ()) (); -#endif - -int main() { -int i; -; return 0; } -EOF -if { (eval echo configure:2966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_signal=void -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_type_signal=int -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_type_signal" 1>&6 -cat >> confdefs.h <&6 -echo "configure:2985: checking for size_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_size_t=yes -else - rm -rf conftest* - ac_cv_type_size_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = no; then - cat >> confdefs.h <<\EOF -#define size_t unsigned -EOF - -fi - -echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3018: checking for uid_t in sys/types.h" >&5 -if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uid_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_uid_t=yes -else - rm -rf conftest* - ac_cv_type_uid_t=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_type_uid_t" 1>&6 -if test $ac_cv_type_uid_t = no; then - cat >> confdefs.h <<\EOF -#define uid_t int -EOF - - cat >> confdefs.h <<\EOF -#define gid_t int -EOF - -fi - - - -echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 -echo "configure:3054: checking whether stat file-mode macros are broken" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include - -#if defined(S_ISBLK) && defined(S_IFDIR) -# if S_ISBLK (S_IFDIR) -You lose. -# endif -#endif - -#if defined(S_ISBLK) && defined(S_IFCHR) -# if S_ISBLK (S_IFCHR) -You lose. -# endif -#endif - -#if defined(S_ISLNK) && defined(S_IFREG) -# if S_ISLNK (S_IFREG) -You lose. -# endif -#endif - -#if defined(S_ISSOCK) && defined(S_IFREG) -# if S_ISSOCK (S_IFREG) -You lose. -# endif -#endif - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "You lose" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_header_stat_broken=yes -else - rm -rf conftest* - ac_cv_header_stat_broken=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 -if test $ac_cv_header_stat_broken = yes; then - cat >> confdefs.h <<\EOF -#define STAT_MACROS_BROKEN 1 -EOF - -fi - -echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3110: checking whether time.h and sys/time.h may both be included" >&5 -if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#include -int main() { -struct tm *tp; -; return 0; } -EOF -if { (eval echo configure:3124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_time=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_time=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_header_time" 1>&6 -if test $ac_cv_header_time = yes; then - cat >> confdefs.h <<\EOF -#define TIME_WITH_SYS_TIME 1 -EOF - -fi - -echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:3145: checking for st_blksize in struct stat" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct stat s; s.st_blksize; -; return 0; } -EOF -if { (eval echo configure:3158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_blksize=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st_blksize=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 -if test $ac_cv_struct_st_blksize = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ST_BLKSIZE 1 -EOF - -fi - -echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:3179: checking for st_blocks in struct stat" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct stat s; s.st_blocks; -; return 0; } -EOF -if { (eval echo configure:3192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_blocks=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st_blocks=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6 -if test $ac_cv_struct_st_blocks = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ST_BLOCKS 1 -EOF - -else - LIBOBJS="$LIBOBJS fileblocks.o" -fi - -echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:3215: checking for st_rdev in struct stat" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct stat s; s.st_rdev; -; return 0; } -EOF -if { (eval echo configure:3228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_rdev=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st_rdev=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6 -if test $ac_cv_struct_st_rdev = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ST_RDEV 1 -EOF - -fi - -echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3249: checking whether struct tm is in sys/time.h or time.h" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct tm *tp; tp->tm_sec; -; return 0; } -EOF -if { (eval echo configure:3262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_tm=time.h -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_tm=sys/time.h -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_tm" 1>&6 -if test $ac_cv_struct_tm = sys/time.h; then - cat >> confdefs.h <<\EOF -#define TM_IN_SYS_TIME 1 -EOF - -fi - -echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:3283: checking for tm_zone in struct tm" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include <$ac_cv_struct_tm> -int main() { -struct tm tm; tm.tm_zone; -; return 0; } -EOF -if { (eval echo configure:3296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_tm_zone=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_tm_zone=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 -if test "$ac_cv_struct_tm_zone" = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_TM_ZONE 1 -EOF - -else - echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:3316: checking for tzname" >&5 -if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#ifndef tzname /* For SGI. */ -extern char *tzname[]; /* RS6000 and others reject char **tzname. */ -#endif -int main() { -atoi(*tzname); -; return 0; } -EOF -if { (eval echo configure:3331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - ac_cv_var_tzname=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_var_tzname=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_var_tzname" 1>&6 - if test $ac_cv_var_tzname = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_TZNAME 1 -EOF - - fi -fi - - - -echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3355: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <j = 5; -} -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; -} - -; return 0; } -EOF -if { (eval echo configure:3409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_const=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_const=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_c_const" 1>&6 -if test $ac_cv_c_const = no; then - cat >> confdefs.h <<\EOF -#define const -EOF - -fi - -echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3430: checking for inline" >&5 -if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_inline=$ac_kw; break -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -done - -fi - -echo "$ac_t""$ac_cv_c_inline" 1>&6 -case "$ac_cv_c_inline" in - inline | yes) ;; - no) cat >> confdefs.h <<\EOF -#define inline -EOF - ;; - *) cat >> confdefs.h <&6 -echo "configure:3470: checking whether char is unsigned" >&5 -if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$GCC" = yes; then - # GCC predefines this symbol on systems where it applies. -cat > conftest.$ac_ext <&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_c_char_unsigned=yes -else - rm -rf conftest* - ac_cv_c_char_unsigned=no -fi -rm -f conftest* - -else -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - ac_cv_c_char_unsigned=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_char_unsigned=no -fi -rm -fr conftest* -fi - -fi -fi - -echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 -if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then - cat >> confdefs.h <<\EOF -#define __CHAR_UNSIGNED__ 1 -EOF - -fi - -echo $ac_n "checking for long double""... $ac_c" 1>&6 -echo "configure:3533: checking for long double" >&5 -if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$GCC" = yes; then - ac_cv_c_long_double=yes -else -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - ac_cv_c_long_double=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_long_double=no -fi -rm -fr conftest* -fi - -fi -fi - -echo "$ac_t""$ac_cv_c_long_double" 1>&6 -if test $ac_cv_c_long_double = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_LONG_DOUBLE 1 -EOF - -fi - - -echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3577: checking whether byte ordering is bigendian" >&5 -if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_c_bigendian=unknown -# See if sys/param.h defines the BYTE_ORDER macro. -cat > conftest.$ac_ext < -#include -int main() { - -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros -#endif -; return 0; } -EOF -if { (eval echo configure:3595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - # It does; now see whether it defined to BIG_ENDIAN or not. -cat > conftest.$ac_ext < -#include -int main() { - -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif -; return 0; } -EOF -if { (eval echo configure:3610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_bigendian=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_bigendian=no -fi -rm -f conftest* -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -if test $ac_cv_c_bigendian = unknown; then -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - ac_cv_c_bigendian=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_bigendian=yes -fi -rm -fr conftest* -fi - -fi -fi - -echo "$ac_t""$ac_cv_c_bigendian" 1>&6 -if test $ac_cv_c_bigendian = yes; then - cat >> confdefs.h <<\EOF -#define WORDS_BIGENDIAN 1 -EOF - -fi - - -echo $ac_n "checking size of int *""... $ac_c" 1>&6 -echo "configure:3668: checking size of int *" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_int_p'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(int *)); - exit(0); -} -EOF -if { (eval echo configure:3687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_int_p=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_int_p=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_int_p" 1>&6 -cat >> confdefs.h <&6 -echo "configure:3707: checking size of int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(int)); - exit(0); -} -EOF -if { (eval echo configure:3726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_int=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_int=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_int" 1>&6 -cat >> confdefs.h <&6 -echo "configure:3746: checking size of long" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long)); - exit(0); -} -EOF -if { (eval echo configure:3765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_long=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_long" 1>&6 -cat >> confdefs.h <&6 -echo "configure:3789: checking for long file names" >&5 -if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_sys_long_file_names=yes -# Test for long file names in all the places we know might matter: -# . the current directory, where building will happen -# $prefix/lib where we will be installing things -# $exec_prefix/lib likewise -# eval it to expand exec_prefix. -# $TMPDIR if set, where it might want to write temporary files -# if $TMPDIR is not set: -# /tmp where it might want to write temporary files -# /var/tmp likewise -# /usr/tmp likewise -if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then - ac_tmpdirs="$TMPDIR" -else - ac_tmpdirs='/tmp /var/tmp /usr/tmp' -fi -for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do - test -d $ac_dir || continue - test -w $ac_dir || continue # It is less confusing to not echo anything here. - (echo 1 > $ac_dir/conftest9012345) 2>/dev/null - (echo 2 > $ac_dir/conftest9012346) 2>/dev/null - val=`cat $ac_dir/conftest9012345 2>/dev/null` - if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then - ac_cv_sys_long_file_names=no - rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null - break - fi - rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null -done -fi - -echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6 -if test $ac_cv_sys_long_file_names = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_LONG_FILE_NAMES 1 -EOF - -fi - - - - -for ac_prog in 'bison -y' byacc -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3840: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$YACC"; then - ac_cv_prog_YACC="$YACC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_YACC="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -YACC="$ac_cv_prog_YACC" -if test -n "$YACC"; then - echo "$ac_t""$YACC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$YACC" && break -done -test -n "$YACC" || YACC="yacc" - - -# Extract the first word of "flex", so it can be a program name with args. -set dummy flex; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3873: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$LEX"; then - ac_cv_prog_LEX="$LEX" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_LEX="flex" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex" -fi -fi -LEX="$ac_cv_prog_LEX" -if test -n "$LEX"; then - echo "$ac_t""$LEX" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$LEXLIB" -then - case "$LEX" in - flex*) ac_lib=fl ;; - *) ac_lib=l ;; - esac - echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:3906: checking for yywrap in -l$ac_lib" >&5 -ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-l$ac_lib $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LEXLIB="-l$ac_lib" -else - echo "$ac_t""no" 1>&6 -fi - -fi - -echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:3948: checking lex output file root" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # The minimal lex program is just a single line: %%. But some broken lexes -# (Solaris, I think it was) want two %% lines, so accommodate them. -echo '%% -%%' | $LEX -if test -f lex.yy.c; then - ac_cv_prog_lex_root=lex.yy -elif test -f lexyy.c; then - ac_cv_prog_lex_root=lexyy -else - { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; } -fi -fi - -echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 -LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root - -echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 -echo "configure:3969: checking whether yytext is a pointer" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # POSIX says lex can declare yytext either as a pointer or an array; the -# default is implementation-dependent. Figure out which it is, since -# not all implementations provide the %pointer and %array declarations. -ac_cv_prog_lex_yytext_pointer=no -echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c -ac_save_LIBS="$LIBS" -LIBS="$LIBS $LEXLIB" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - ac_cv_prog_lex_yytext_pointer=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -LIBS="$ac_save_LIBS" -rm -f "${LEX_OUTPUT_ROOT}.c" - -fi - -echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6 -if test $ac_cv_prog_lex_yytext_pointer = yes; then - cat >> confdefs.h <<\EOF -#define YYTEXT_POINTER 1 -EOF - -fi - - - -CHECK_INCLUDE="-I/usr/include $X_CFLAGS" -CHECK_LIB="-L/lib -L/usr/lib $X_LIBS" - - - -# Make sure we can run config.sub. -if $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:4022: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`$ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`$ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -canonical=$host -configuration=$host_alias - - -USE_UNIX=1 - - -USE_LINUX= -USE_SGI= -USE_HPUX= -USE_SYSV= -USE_SVR4= -USE_AIX= -USE_SUN= -USE_SOLARIS= -USE_SUNOS= -USE_ALPHA= -USE_OSF= -USE_BSD= -USE_FREEBSD= -USE_VMS= -USE_ULTRIX= -USE_DATA_GENERAL= - -case "${canonical}" in - *-hp-hpux* ) - USE_HPUX=1 - cat >> confdefs.h <<\EOF -#define __HPUX__ 1 -EOF - - ;; - *-*-linux* ) - USE_LINUX=1 - cat >> confdefs.h <<\EOF -#define __LINUX__ 1 -EOF - - ;; - *-*-irix5* | *-*-irix6* ) - USE_SGI=1 - USE_SVR4=1 - cat >> confdefs.h <<\EOF -#define __SGI__ 1 -EOF - - cat >> confdefs.h <<\EOF -#define __SVR4__ 1 -EOF - - ;; - *-*-solaris2* ) - USE_SUN=1 - USE_SOLARIS=1 - USE_SVR4=1 - cat >> confdefs.h <<\EOF -#define __SUN__ 1 -EOF - - cat >> confdefs.h <<\EOF -#define __SOLARIS__ 1 -EOF - - cat >> confdefs.h <<\EOF -#define __SVR4__ 1 -EOF - - ;; - *-*-sunos4* ) - USE_SUN=1 - USE_SUNOS=1 - USE_BSD=1 - cat >> confdefs.h <<\EOF -#define __SUN__ 1 -EOF - - cat >> confdefs.h <<\EOF -#define __SUNOS__ 1 -EOF - - cat >> confdefs.h <<\EOF -#define __BSD__ 1 -EOF - - ;; - *-*-freebsd* | *-*-netbsd*) - USE_BSD=1 - USE_FREEBSD=1 - cat >> confdefs.h <<\EOF -#define __FREEBSD__ 1 -EOF - - cat >> confdefs.h <<\EOF -#define __BSD__ 1 -EOF - - ;; - *-*-osf* ) - USE_ALPHA=1 - USE_OSF=1 - cat >> confdefs.h <<\EOF -#define __ALPHA__ 1 -EOF - - cat >> confdefs.h <<\EOF -#define __OSF__ 1 -EOF - - ;; - *-*-dgux5* ) - USE_ALPHA=1 - USE_SVR4=1 - cat >> confdefs.h <<\EOF -#define __ALPHA__ 1 -EOF - - cat >> confdefs.h <<\EOF -#define __SVR4__ 1 -EOF - - ;; - *-*-sysv5* ) - USE_SYSV=1 - USE_SVR4=1 - cat >> confdefs.h <<\EOF -#define __SYSV__ 1 -EOF - - cat >> confdefs.h <<\EOF -#define __SVR4__ 1 -EOF - - ;; - *-*-aix* ) - USE_AIX=1 - USE_SYSV=1 - USE_SVR4=1 - cat >> confdefs.h <<\EOF -#define __AIX__ 1 -EOF - - cat >> confdefs.h <<\EOF -#define __SYSV__ 1 -EOF - - cat >> confdefs.h <<\EOF -#define __SVR4__ 1 -EOF - - ;; - *) - { echo "configure: error: I don't know your system type." 1>&2; exit 1; } -esac - - - -rm -f ${OSTYPE}.system.cache.tmp -touch ${OSTYPE}.system.cache.tmp -touch ${OSTYPE}.system.cache - - -DEFAULT_USE_GTK=1 -DEFAULT_USE_QT=0 -DEFAULT_USE_MOTIF=0 - -DEFAULT_USE_SHARED=1 -DEFAULT_USE_OPTIMISE=1 -DEFAULT_USE_PROFILE=0 -DEFAULT_USE_DEBUG_FLAG=0 -DEFAULT_USE_DEBUG_INFO=0 -DEFAULT_USE_MEM_TRACING=0 -DEFAULT_USE_DMALLOC=0 -DEFAULT_USE_APPLE_IEEE=1 -DEFAULT_USE_IOSTREAMH=1 - -DEFAULT_USE_ZLIB=1 -DEFAULT_USE_GDK_IMLIB=1 -DEFAULT_USE_LIBPNG=1 -DEFAULT_USE_ODBC=1 - -DEFAULT_USE_GAUGE=1 -DEFAULT_USE_SCROLLBAR=1 -DEFAULT_USE_LISTCTRL=1 -DEFAULT_USE_TREECTRL=1 -DEFAULT_USE_GRID=1 -DEFAULT_USE_TAB_DIALOG=1 -DEFAULT_USE_NOTEBOOK=1 - -DEFAULT_USE_TIMEDATE=1 -DEFAULT_USE_FRACTION=1 -DEFAULT_USE_LOG=1 -DEFAULT_USE_INTL=1 -DEFAULT_USE_CONFIG=1 -DEFAULT_USE_STREAMS=1 -DEFAULT_USE_SERIAL=1 -DEFAULT_USE_FILE=1 -DEFAULT_USE_TEXTFILE=1 - -DEFAULT_USE_AFM_FOR_POSTSCRIPT=1 -DEFAULT_WX_NORMALIZED_PS_FONTS=1 -DEFAULT_USE_POSTSCRIPT=1 - -DEFAULT_USE_IPC=1 -DEFAULT_USE_RESOURCES=1 -DEFAULT_USE_CONSTRAINTS=1 -DEFAULT_USE_CLIPBOARD=0 -DEFAULT_USE_DND=1 - -DEFAULT_USE_MDI_ARCHITECTURE=1 -DEFAULT_USE_DOC_VIEW_ARCHITECTURE=1 -DEFAULT_USE_PRINTING_ARCHITECTURE=1 - -DEFAULT_USE_PROLOGIO=1 -DEFAULT_USE_WX_RESOURCES=1 -DEFAULT_USE_RPC=0 - -DEFAULT_USE_OPENGL=0 -DEFAULT_USE_METAFILE=0 -DEFAULT_USE_WXGRAPH=0 -DEFAULT_USE_WXTREE=0 -DEFAULT_USE_HELP=0 - - - -echo $ac_n "checking "for gtk"""... $ac_c" 1>&6 -echo "configure:4267: checking "for gtk"" >&5 -# Check whether --with-gtk or --without-gtk was given. -if test "${with_gtk+set}" = set; then - withval="$with_gtk" - if test "x$with_gtk" = xyes; then - ac_cv_use_gtk='USE_GTK="1"' -else - ac_cv_use_gtk='USE_GTK="0"' -fi -else - - LINE=`grep "USE_GTK" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_gtk='USE_GTK='$DEFAULT_USE_GTK - -fi - -eval "$ac_cv_use_gtk" -echo $ac_cv_use_gtk >> ${OSTYPE}.system.cache.tmp -if test "$USE_GTK" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for qt"""... $ac_c" 1>&6 -echo "configure:4297: checking "for qt"" >&5 -# Check whether --with-qt or --without-qt was given. -if test "${with_qt+set}" = set; then - withval="$with_qt" - if test "x$with_qt" = xyes; then - ac_cv_use_qt='USE_QT="1"' -else - ac_cv_use_qt='USE_QT="0"' -fi -else - - LINE=`grep "USE_QT" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_qt='USE_QT='$DEFAULT_USE_QT - -fi - -eval "$ac_cv_use_qt" -echo $ac_cv_use_qt >> ${OSTYPE}.system.cache.tmp -if test "$USE_QT" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for motif"""... $ac_c" 1>&6 -echo "configure:4327: checking "for motif"" >&5 -# Check whether --with-motif or --without-motif was given. -if test "${with_motif+set}" = set; then - withval="$with_motif" - if test "x$with_motif" = xyes; then - ac_cv_use_motif='USE_MOTIF="1"' -else - ac_cv_use_motif='USE_MOTIF="0"' -fi -else - - LINE=`grep "USE_MOTIF" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_motif='USE_MOTIF='$DEFAULT_USE_MOTIF - -fi - -eval "$ac_cv_use_motif" -echo $ac_cv_use_motif >> ${OSTYPE}.system.cache.tmp -if test "$USE_MOTIF" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - - -echo $ac_n "checking "for shared"""... $ac_c" 1>&6 -echo "configure:4358: checking "for shared"" >&5 -# Check whether --with-shared or --without-shared was given. -if test "${with_shared+set}" = set; then - withval="$with_shared" - if test "x$with_shared" = xyes; then - ac_cv_use_shared='USE_SHARED="1"' -else - ac_cv_use_shared='USE_SHARED="0"' -fi -else - - LINE=`grep "USE_SHARED" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_shared='USE_SHARED='$DEFAULT_USE_SHARED - -fi - -eval "$ac_cv_use_shared" -echo $ac_cv_use_shared >> ${OSTYPE}.system.cache.tmp -if test "$USE_SHARED" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for optimise"""... $ac_c" 1>&6 -echo "configure:4388: checking "for optimise"" >&5 -# Check whether --with-optimise or --without-optimise was given. -if test "${with_optimise+set}" = set; then - withval="$with_optimise" - if test "x$with_optimise" = xyes; then - ac_cv_use_optimise='USE_OPTIMISE="1"' -else - ac_cv_use_optimise='USE_OPTIMISE="0"' -fi -else - - LINE=`grep "USE_OPTIMISE" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_optimise='USE_OPTIMISE='$DEFAULT_USE_OPTIMISE - -fi - -eval "$ac_cv_use_optimise" -echo $ac_cv_use_optimise >> ${OSTYPE}.system.cache.tmp -if test "$USE_OPTIMISE" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for debug_flag"""... $ac_c" 1>&6 -echo "configure:4418: checking "for debug_flag"" >&5 -# Check whether --with-debug_flag or --without-debug_flag was given. -if test "${with_debug_flag+set}" = set; then - withval="$with_debug_flag" - if test "x$with_debug_flag" = xyes; then - ac_cv_use_debug_flag='USE_DEBUG_FLAG="1"' -else - ac_cv_use_debug_flag='USE_DEBUG_FLAG="0"' -fi -else - - LINE=`grep "USE_DEBUG_FLAG" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_debug_flag='USE_DEBUG_FLAG='$DEFAULT_USE_DEBUG_FLAG - -fi - -eval "$ac_cv_use_debug_flag" -echo $ac_cv_use_debug_flag >> ${OSTYPE}.system.cache.tmp -if test "$USE_DEBUG_FLAG" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for debug_info"""... $ac_c" 1>&6 -echo "configure:4448: checking "for debug_info"" >&5 -# Check whether --with-debug_info or --without-debug_info was given. -if test "${with_debug_info+set}" = set; then - withval="$with_debug_info" - if test "x$with_debug_info" = xyes; then - ac_cv_use_debug_info='USE_DEBUG_INFO="1"' -else - ac_cv_use_debug_info='USE_DEBUG_INFO="0"' -fi -else - - LINE=`grep "USE_DEBUG_INFO" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_debug_info='USE_DEBUG_INFO='$DEFAULT_USE_DEBUG_INFO - -fi - -eval "$ac_cv_use_debug_info" -echo $ac_cv_use_debug_info >> ${OSTYPE}.system.cache.tmp -if test "$USE_DEBUG_INFO" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for mem_tracing"""... $ac_c" 1>&6 -echo "configure:4478: checking "for mem_tracing"" >&5 -# Check whether --with-mem_tracing or --without-mem_tracing was given. -if test "${with_mem_tracing+set}" = set; then - withval="$with_mem_tracing" - if test "x$with_mem_tracing" = xyes; then - ac_cv_use_mem_tracing='USE_MEM_TRACING="1"' -else - ac_cv_use_mem_tracing='USE_MEM_TRACING="0"' -fi -else - - LINE=`grep "USE_MEM_TRACING" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_mem_tracing='USE_MEM_TRACING='$DEFAULT_USE_MEM_TRACING - -fi - -eval "$ac_cv_use_mem_tracing" -echo $ac_cv_use_mem_tracing >> ${OSTYPE}.system.cache.tmp -if test "$USE_MEM_TRACING" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for dmalloc"""... $ac_c" 1>&6 -echo "configure:4508: checking "for dmalloc"" >&5 -# Check whether --with-dmalloc or --without-dmalloc was given. -if test "${with_dmalloc+set}" = set; then - withval="$with_dmalloc" - if test "x$with_dmalloc" = xyes; then - ac_cv_use_dmalloc='USE_DMALLOC="1"' -else - ac_cv_use_dmalloc='USE_DMALLOC="0"' -fi -else - - LINE=`grep "USE_DMALLOC" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_dmalloc='USE_DMALLOC='$DEFAULT_USE_DMALLOC - -fi - -eval "$ac_cv_use_dmalloc" -echo $ac_cv_use_dmalloc >> ${OSTYPE}.system.cache.tmp -if test "$USE_DMALLOC" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for profile"""... $ac_c" 1>&6 -echo "configure:4538: checking "for profile"" >&5 -# Check whether --with-profile or --without-profile was given. -if test "${with_profile+set}" = set; then - withval="$with_profile" - if test "x$with_profile" = xyes; then - ac_cv_use_profile='USE_PROFILE="1"' -else - ac_cv_use_profile='USE_PROFILE="0"' -fi -else - - LINE=`grep "USE_PROFILE" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_profile='USE_PROFILE='$DEFAULT_USE_PROFILE - -fi - -eval "$ac_cv_use_profile" -echo $ac_cv_use_profile >> ${OSTYPE}.system.cache.tmp -if test "$USE_PROFILE" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for apple_ieee"""... $ac_c" 1>&6 -echo "configure:4568: checking "for apple_ieee"" >&5 -# Check whether --with-apple_ieee or --without-apple_ieee was given. -if test "${with_apple_ieee+set}" = set; then - withval="$with_apple_ieee" - if test "x$with_apple_ieee" = xyes; then - ac_cv_use_apple_ieee='USE_APPLE_IEEE="1"' -else - ac_cv_use_apple_ieee='USE_APPLE_IEEE="0"' -fi -else - - LINE=`grep "USE_APPLE_IEEE" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_apple_ieee='USE_APPLE_IEEE='$DEFAULT_USE_APPLE_IEEE - -fi - -eval "$ac_cv_use_apple_ieee" -echo $ac_cv_use_apple_ieee >> ${OSTYPE}.system.cache.tmp -if test "$USE_APPLE_IEEE" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - - -echo $ac_n "checking "for zlib"""... $ac_c" 1>&6 -echo "configure:4599: checking "for zlib"" >&5 -# Check whether --with-zlib or --without-zlib was given. -if test "${with_zlib+set}" = set; then - withval="$with_zlib" - if test "x$with_zlib" = xyes; then - ac_cv_use_zlib='USE_ZLIB="1"' -else - ac_cv_use_zlib='USE_ZLIB="0"' -fi -else - - LINE=`grep "USE_ZLIB" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_zlib='USE_ZLIB='$DEFAULT_USE_ZLIB - -fi - -eval "$ac_cv_use_zlib" -echo $ac_cv_use_zlib >> ${OSTYPE}.system.cache.tmp -if test "$USE_ZLIB" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for gdk_imlib"""... $ac_c" 1>&6 -echo "configure:4629: checking "for gdk_imlib"" >&5 -# Check whether --with-gdk_imlib or --without-gdk_imlib was given. -if test "${with_gdk_imlib+set}" = set; then - withval="$with_gdk_imlib" - if test "x$with_gdk_imlib" = xyes; then - ac_cv_use_gdk_imlib='USE_GDK_IMLIB="1"' -else - ac_cv_use_gdk_imlib='USE_GDK_IMLIB="0"' -fi -else - - LINE=`grep "USE_GDK_IMLIB" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_gdk_imlib='USE_GDK_IMLIB='$DEFAULT_USE_GDK_IMLIB - -fi - -eval "$ac_cv_use_gdk_imlib" -echo $ac_cv_use_gdk_imlib >> ${OSTYPE}.system.cache.tmp -if test "$USE_GDK_IMLIB" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for libpng"""... $ac_c" 1>&6 -echo "configure:4659: checking "for libpng"" >&5 -# Check whether --with-libpng or --without-libpng was given. -if test "${with_libpng+set}" = set; then - withval="$with_libpng" - if test "x$with_libpng" = xyes; then - ac_cv_use_libpng='USE_LIBPNG="1"' -else - ac_cv_use_libpng='USE_LIBPNG="0"' -fi -else - - LINE=`grep "USE_LIBPNG" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_libpng='USE_LIBPNG='$DEFAULT_USE_LIBPNG - -fi - -eval "$ac_cv_use_libpng" -echo $ac_cv_use_libpng >> ${OSTYPE}.system.cache.tmp -if test "$USE_LIBPNG" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for odbc"""... $ac_c" 1>&6 -echo "configure:4689: checking "for odbc"" >&5 -# Check whether --with-odbc or --without-odbc was given. -if test "${with_odbc+set}" = set; then - withval="$with_odbc" - if test "x$with_odbc" = xyes; then - ac_cv_use_odbc='USE_ODBC="1"' -else - ac_cv_use_odbc='USE_ODBC="0"' -fi -else - - LINE=`grep "USE_ODBC" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_odbc='USE_ODBC='$DEFAULT_USE_ODBC - -fi - -eval "$ac_cv_use_odbc" -echo $ac_cv_use_odbc >> ${OSTYPE}.system.cache.tmp -if test "$USE_ODBC" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for opengl"""... $ac_c" 1>&6 -echo "configure:4719: checking "for opengl"" >&5 -# Check whether --with-opengl or --without-opengl was given. -if test "${with_opengl+set}" = set; then - withval="$with_opengl" - if test "x$with_opengl" = xyes; then - ac_cv_use_opengl='USE_OPENGL="1"' -else - ac_cv_use_opengl='USE_OPENGL="0"' -fi -else - - LINE=`grep "USE_OPENGL" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_opengl='USE_OPENGL='$DEFAULT_USE_OPENGL - -fi - -eval "$ac_cv_use_opengl" -echo $ac_cv_use_opengl >> ${OSTYPE}.system.cache.tmp -if test "$USE_OPENGL" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - - -echo $ac_n "checking "for gauge"""... $ac_c" 1>&6 -echo "configure:4750: checking "for gauge"" >&5 -# Check whether --with-gauge or --without-gauge was given. -if test "${with_gauge+set}" = set; then - withval="$with_gauge" - if test "x$with_gauge" = xyes; then - ac_cv_use_gauge='USE_GAUGE="1"' -else - ac_cv_use_gauge='USE_GAUGE="0"' -fi -else - - LINE=`grep "USE_GAUGE" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_gauge='USE_GAUGE='$DEFAULT_USE_GAUGE - -fi - -eval "$ac_cv_use_gauge" -echo $ac_cv_use_gauge >> ${OSTYPE}.system.cache.tmp -if test "$USE_GAUGE" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for scrollbar"""... $ac_c" 1>&6 -echo "configure:4780: checking "for scrollbar"" >&5 -# Check whether --with-scrollbar or --without-scrollbar was given. -if test "${with_scrollbar+set}" = set; then - withval="$with_scrollbar" - if test "x$with_scrollbar" = xyes; then - ac_cv_use_scrollbar='USE_SCROLLBAR="1"' -else - ac_cv_use_scrollbar='USE_SCROLLBAR="0"' -fi -else - - LINE=`grep "USE_SCROLLBAR" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_scrollbar='USE_SCROLLBAR='$DEFAULT_USE_SCROLLBAR - -fi - -eval "$ac_cv_use_scrollbar" -echo $ac_cv_use_scrollbar >> ${OSTYPE}.system.cache.tmp -if test "$USE_SCROLLBAR" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for listctrl"""... $ac_c" 1>&6 -echo "configure:4810: checking "for listctrl"" >&5 -# Check whether --with-listctrl or --without-listctrl was given. -if test "${with_listctrl+set}" = set; then - withval="$with_listctrl" - if test "x$with_listctrl" = xyes; then - ac_cv_use_listctrl='USE_LISTCTRL="1"' -else - ac_cv_use_listctrl='USE_LISTCTRL="0"' -fi -else - - LINE=`grep "USE_LISTCTRL" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_listctrl='USE_LISTCTRL='$DEFAULT_USE_LISTCTRL - -fi - -eval "$ac_cv_use_listctrl" -echo $ac_cv_use_listctrl >> ${OSTYPE}.system.cache.tmp -if test "$USE_LISTCTRL" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for treectrl"""... $ac_c" 1>&6 -echo "configure:4840: checking "for treectrl"" >&5 -# Check whether --with-treectrl or --without-treectrl was given. -if test "${with_treectrl+set}" = set; then - withval="$with_treectrl" - if test "x$with_treectrl" = xyes; then - ac_cv_use_treectrl='USE_TREECTRL="1"' -else - ac_cv_use_treectrl='USE_TREECTRL="0"' -fi -else - - LINE=`grep "USE_TREECTRL" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_treectrl='USE_TREECTRL='$DEFAULT_USE_TREECTRL - -fi - -eval "$ac_cv_use_treectrl" -echo $ac_cv_use_treectrl >> ${OSTYPE}.system.cache.tmp -if test "$USE_TREECTRL" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for grid"""... $ac_c" 1>&6 -echo "configure:4870: checking "for grid"" >&5 -# Check whether --with-grid or --without-grid was given. -if test "${with_grid+set}" = set; then - withval="$with_grid" - if test "x$with_grid" = xyes; then - ac_cv_use_grid='USE_GRID="1"' -else - ac_cv_use_grid='USE_GRID="0"' -fi -else - - LINE=`grep "USE_GRID" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_grid='USE_GRID='$DEFAULT_USE_GRID - -fi - -eval "$ac_cv_use_grid" -echo $ac_cv_use_grid >> ${OSTYPE}.system.cache.tmp -if test "$USE_GRID" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for tab_dialog"""... $ac_c" 1>&6 -echo "configure:4900: checking "for tab_dialog"" >&5 -# Check whether --with-tab_dialog or --without-tab_dialog was given. -if test "${with_tab_dialog+set}" = set; then - withval="$with_tab_dialog" - if test "x$with_tab_dialog" = xyes; then - ac_cv_use_tab_dialog='USE_TAB_DIALOG="1"' -else - ac_cv_use_tab_dialog='USE_TAB_DIALOG="0"' -fi -else - - LINE=`grep "USE_TAB_DIALOG" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_tab_dialog='USE_TAB_DIALOG='$DEFAULT_USE_TAB_DIALOG - -fi - -eval "$ac_cv_use_tab_dialog" -echo $ac_cv_use_tab_dialog >> ${OSTYPE}.system.cache.tmp -if test "$USE_TAB_DIALOG" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for notebook"""... $ac_c" 1>&6 -echo "configure:4930: checking "for notebook"" >&5 -# Check whether --with-notebook or --without-notebook was given. -if test "${with_notebook+set}" = set; then - withval="$with_notebook" - if test "x$with_notebook" = xyes; then - ac_cv_use_notebook='USE_NOTEBOOK="1"' -else - ac_cv_use_notebook='USE_NOTEBOOK="0"' -fi -else - - LINE=`grep "USE_NOTEBOOK" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_notebook='USE_NOTEBOOK='$DEFAULT_USE_NOTEBOOK - -fi - -eval "$ac_cv_use_notebook" -echo $ac_cv_use_notebook >> ${OSTYPE}.system.cache.tmp -if test "$USE_NOTEBOOK" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - - -echo $ac_n "checking "for timedate"""... $ac_c" 1>&6 -echo "configure:4961: checking "for timedate"" >&5 -# Check whether --with-timedate or --without-timedate was given. -if test "${with_timedate+set}" = set; then - withval="$with_timedate" - if test "x$with_timedate" = xyes; then - ac_cv_use_timedate='USE_TIMEDATE="1"' -else - ac_cv_use_timedate='USE_TIMEDATE="0"' -fi -else - - LINE=`grep "USE_TIMEDATE" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_timedate='USE_TIMEDATE='$DEFAULT_USE_TIMEDATE - -fi - -eval "$ac_cv_use_timedate" -echo $ac_cv_use_timedate >> ${OSTYPE}.system.cache.tmp -if test "$USE_TIMEDATE" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for fraction"""... $ac_c" 1>&6 -echo "configure:4991: checking "for fraction"" >&5 -# Check whether --with-fraction or --without-fraction was given. -if test "${with_fraction+set}" = set; then - withval="$with_fraction" - if test "x$with_fraction" = xyes; then - ac_cv_use_fraction='USE_FRACTION="1"' -else - ac_cv_use_fraction='USE_FRACTION="0"' -fi -else - - LINE=`grep "USE_FRACTION" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_fraction='USE_FRACTION='$DEFAULT_USE_FRACTION - -fi - -eval "$ac_cv_use_fraction" -echo $ac_cv_use_fraction >> ${OSTYPE}.system.cache.tmp -if test "$USE_FRACTION" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for log"""... $ac_c" 1>&6 -echo "configure:5021: checking "for log"" >&5 -# Check whether --with-log or --without-log was given. -if test "${with_log+set}" = set; then - withval="$with_log" - if test "x$with_log" = xyes; then - ac_cv_use_log='USE_LOG="1"' -else - ac_cv_use_log='USE_LOG="0"' -fi -else - - LINE=`grep "USE_LOG" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_log='USE_LOG='$DEFAULT_USE_LOG - -fi - -eval "$ac_cv_use_log" -echo $ac_cv_use_log >> ${OSTYPE}.system.cache.tmp -if test "$USE_LOG" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for intl"""... $ac_c" 1>&6 -echo "configure:5051: checking "for intl"" >&5 -# Check whether --with-intl or --without-intl was given. -if test "${with_intl+set}" = set; then - withval="$with_intl" - if test "x$with_intl" = xyes; then - ac_cv_use_intl='USE_INTL="1"' -else - ac_cv_use_intl='USE_INTL="0"' -fi -else - - LINE=`grep "USE_INTL" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_intl='USE_INTL='$DEFAULT_USE_INTL - -fi - -eval "$ac_cv_use_intl" -echo $ac_cv_use_intl >> ${OSTYPE}.system.cache.tmp -if test "$USE_INTL" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for config"""... $ac_c" 1>&6 -echo "configure:5081: checking "for config"" >&5 -# Check whether --with-config or --without-config was given. -if test "${with_config+set}" = set; then - withval="$with_config" - if test "x$with_config" = xyes; then - ac_cv_use_config='USE_CONFIG="1"' -else - ac_cv_use_config='USE_CONFIG="0"' -fi -else - - LINE=`grep "USE_CONFIG" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_config='USE_CONFIG='$DEFAULT_USE_CONFIG - -fi - -eval "$ac_cv_use_config" -echo $ac_cv_use_config >> ${OSTYPE}.system.cache.tmp -if test "$USE_CONFIG" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for streams"""... $ac_c" 1>&6 -echo "configure:5111: checking "for streams"" >&5 -# Check whether --with-streams or --without-streams was given. -if test "${with_streams+set}" = set; then - withval="$with_streams" - if test "x$with_streams" = xyes; then - ac_cv_use_streams='USE_STREAMS="1"' -else - ac_cv_use_streams='USE_STREAMS="0"' -fi -else - - LINE=`grep "USE_STREAMS" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_streams='USE_STREAMS='$DEFAULT_USE_STREAMS - -fi - -eval "$ac_cv_use_streams" -echo $ac_cv_use_streams >> ${OSTYPE}.system.cache.tmp -if test "$USE_STREAMS" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for serial"""... $ac_c" 1>&6 -echo "configure:5141: checking "for serial"" >&5 -# Check whether --with-serial or --without-serial was given. -if test "${with_serial+set}" = set; then - withval="$with_serial" - if test "x$with_serial" = xyes; then - ac_cv_use_serial='USE_SERIAL="1"' -else - ac_cv_use_serial='USE_SERIAL="0"' -fi -else - - LINE=`grep "USE_SERIAL" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_serial='USE_SERIAL='$DEFAULT_USE_SERIAL - -fi - -eval "$ac_cv_use_serial" -echo $ac_cv_use_serial >> ${OSTYPE}.system.cache.tmp -if test "$USE_SERIAL" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for file"""... $ac_c" 1>&6 -echo "configure:5171: checking "for file"" >&5 -# Check whether --with-file or --without-file was given. -if test "${with_file+set}" = set; then - withval="$with_file" - if test "x$with_file" = xyes; then - ac_cv_use_file='USE_FILE="1"' -else - ac_cv_use_file='USE_FILE="0"' -fi -else - - LINE=`grep "USE_FILE" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_file='USE_FILE='$DEFAULT_USE_FILE - -fi - -eval "$ac_cv_use_file" -echo $ac_cv_use_file >> ${OSTYPE}.system.cache.tmp -if test "$USE_FILE" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for textfile"""... $ac_c" 1>&6 -echo "configure:5201: checking "for textfile"" >&5 -# Check whether --with-textfile or --without-textfile was given. -if test "${with_textfile+set}" = set; then - withval="$with_textfile" - if test "x$with_textfile" = xyes; then - ac_cv_use_textfile='USE_TEXTFILE="1"' -else - ac_cv_use_textfile='USE_TEXTFILE="0"' -fi -else - - LINE=`grep "USE_TEXTFILE" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_textfile='USE_TEXTFILE='$DEFAULT_USE_TEXTFILE - -fi - -eval "$ac_cv_use_textfile" -echo $ac_cv_use_textfile >> ${OSTYPE}.system.cache.tmp -if test "$USE_TEXTFILE" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - - -echo $ac_n "checking "for afmfonts"""... $ac_c" 1>&6 -echo "configure:5232: checking "for afmfonts"" >&5 -# Check whether --with-afmfonts or --without-afmfonts was given. -if test "${with_afmfonts+set}" = set; then - withval="$with_afmfonts" - if test "x$with_afmfonts" = xyes; then - ac_cv_use_afmfonts='USE_AFM_FOR_POSTSCRIPT="1"' -else - ac_cv_use_afmfonts='USE_AFM_FOR_POSTSCRIPT="0"' -fi -else - - LINE=`grep "USE_AFM_FOR_POSTSCRIPT" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_afmfonts='USE_AFM_FOR_POSTSCRIPT='$DEFAULT_USE_AFM_FOR_POSTSCRIPT - -fi - -eval "$ac_cv_use_afmfonts" -echo $ac_cv_use_afmfonts >> ${OSTYPE}.system.cache.tmp -if test "$USE_AFM_FOR_POSTSCRIPT" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for normalized"""... $ac_c" 1>&6 -echo "configure:5262: checking "for normalized"" >&5 -# Check whether --with-normalized or --without-normalized was given. -if test "${with_normalized+set}" = set; then - withval="$with_normalized" - if test "x$with_normalized" = xyes; then - ac_cv_use_normalized='WX_NORMALIZED_PS_FONTS="1"' -else - ac_cv_use_normalized='WX_NORMALIZED_PS_FONTS="0"' -fi -else - - LINE=`grep "WX_NORMALIZED_PS_FONTS" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_normalized='WX_NORMALIZED_PS_FONTS='$DEFAULT_WX_NORMALIZED_PS_FONTS - -fi - -eval "$ac_cv_use_normalized" -echo $ac_cv_use_normalized >> ${OSTYPE}.system.cache.tmp -if test "$WX_NORMALIZED_PS_FONTS" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for postscript"""... $ac_c" 1>&6 -echo "configure:5292: checking "for postscript"" >&5 -# Check whether --with-postscript or --without-postscript was given. -if test "${with_postscript+set}" = set; then - withval="$with_postscript" - if test "x$with_postscript" = xyes; then - ac_cv_use_postscript='USE_POSTSCRIPT="1"' -else - ac_cv_use_postscript='USE_POSTSCRIPT="0"' -fi -else - - LINE=`grep "USE_POSTSCRIPT" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_postscript='USE_POSTSCRIPT='$DEFAULT_USE_POSTSCRIPT - -fi - -eval "$ac_cv_use_postscript" -echo $ac_cv_use_postscript >> ${OSTYPE}.system.cache.tmp -if test "$USE_POSTSCRIPT" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - - -echo $ac_n "checking "for wxresources"""... $ac_c" 1>&6 -echo "configure:5323: checking "for wxresources"" >&5 -# Check whether --with-wxresources or --without-wxresources was given. -if test "${with_wxresources+set}" = set; then - withval="$with_wxresources" - if test "x$with_wxresources" = xyes; then - ac_cv_use_wxresources='USE_WX_RESOURCES="1"' -else - ac_cv_use_wxresources='USE_WX_RESOURCES="0"' -fi -else - - LINE=`grep "USE_WX_RESOURCES" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_wxresources='USE_WX_RESOURCES='$DEFAULT_USE_WX_RESOURCES - -fi - -eval "$ac_cv_use_wxresources" -echo $ac_cv_use_wxresources >> ${OSTYPE}.system.cache.tmp -if test "$USE_WX_RESOURCES" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for prologio"""... $ac_c" 1>&6 -echo "configure:5353: checking "for prologio"" >&5 -# Check whether --with-prologio or --without-prologio was given. -if test "${with_prologio+set}" = set; then - withval="$with_prologio" - if test "x$with_prologio" = xyes; then - ac_cv_use_prologio='USE_PROLOGIO="1"' -else - ac_cv_use_prologio='USE_PROLOGIO="0"' -fi -else - - LINE=`grep "USE_PROLOGIO" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_prologio='USE_PROLOGIO='$DEFAULT_USE_PROLOGIO - -fi - -eval "$ac_cv_use_prologio" -echo $ac_cv_use_prologio >> ${OSTYPE}.system.cache.tmp -if test "$USE_PROLOGIO" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for RPC"""... $ac_c" 1>&6 -echo "configure:5383: checking "for RPC"" >&5 -# Check whether --with-rpc or --without-rpc was given. -if test "${with_rpc+set}" = set; then - withval="$with_rpc" - if test "x$with_rpc" = xyes; then - ac_cv_use_rpc='USE_RPC="1"' -else - ac_cv_use_rpc='USE_RPC="0"' -fi -else - - LINE=`grep "USE_RPC" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_rpc='USE_RPC='$DEFAULT_USE_RPC - -fi - -eval "$ac_cv_use_rpc" -echo $ac_cv_use_rpc >> ${OSTYPE}.system.cache.tmp -if test "$USE_RPC" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - - -echo $ac_n "checking "for IPC"""... $ac_c" 1>&6 -echo "configure:5414: checking "for IPC"" >&5 -# Check whether --with-ipc or --without-ipc was given. -if test "${with_ipc+set}" = set; then - withval="$with_ipc" - if test "x$with_ipc" = xyes; then - ac_cv_use_ipc='USE_IPC="1"' -else - ac_cv_use_ipc='USE_IPC="0"' -fi -else - - LINE=`grep "USE_IPC" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_ipc='USE_IPC='$DEFAULT_USE_IPC - -fi - -eval "$ac_cv_use_ipc" -echo $ac_cv_use_ipc >> ${OSTYPE}.system.cache.tmp -if test "$USE_IPC" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for resources"""... $ac_c" 1>&6 -echo "configure:5444: checking "for resources"" >&5 -# Check whether --with-resources or --without-resources was given. -if test "${with_resources+set}" = set; then - withval="$with_resources" - if test "x$with_resources" = xyes; then - ac_cv_use_resources='USE_RESOURCES="1"' -else - ac_cv_use_resources='USE_RESOURCES="0"' -fi -else - - LINE=`grep "USE_RESOURCES" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_resources='USE_RESOURCES='$DEFAULT_USE_RESOURCES - -fi - -eval "$ac_cv_use_resources" -echo $ac_cv_use_resources >> ${OSTYPE}.system.cache.tmp -if test "$USE_RESOURCES" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for clipboard"""... $ac_c" 1>&6 -echo "configure:5474: checking "for clipboard"" >&5 -# Check whether --with-clipboard or --without-clipboard was given. -if test "${with_clipboard+set}" = set; then - withval="$with_clipboard" - if test "x$with_clipboard" = xyes; then - ac_cv_use_clipboard='USE_CLIPBOARD="1"' -else - ac_cv_use_clipboard='USE_CLIPBOARD="0"' -fi -else - - LINE=`grep "USE_CLIPBOARD" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_clipboard='USE_CLIPBOARD='$DEFAULT_USE_CLIPBOARD - -fi - -eval "$ac_cv_use_clipboard" -echo $ac_cv_use_clipboard >> ${OSTYPE}.system.cache.tmp -if test "$USE_CLIPBOARD" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for dnd"""... $ac_c" 1>&6 -echo "configure:5504: checking "for dnd"" >&5 -# Check whether --with-dnd or --without-dnd was given. -if test "${with_dnd+set}" = set; then - withval="$with_dnd" - if test "x$with_dnd" = xyes; then - ac_cv_use_dnd='USE_DND="1"' -else - ac_cv_use_dnd='USE_DND="0"' -fi -else - - LINE=`grep "USE_DND" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_dnd='USE_DND='$DEFAULT_USE_DND - -fi - -eval "$ac_cv_use_dnd" -echo $ac_cv_use_dnd >> ${OSTYPE}.system.cache.tmp -if test "$USE_DND" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for constrains"""... $ac_c" 1>&6 -echo "configure:5534: checking "for constrains"" >&5 -# Check whether --with-constraints or --without-constraints was given. -if test "${with_constraints+set}" = set; then - withval="$with_constraints" - if test "x$with_constraints" = xyes; then - ac_cv_use_constraints='USE_CONSTRAINTS="1"' -else - ac_cv_use_constraints='USE_CONSTRAINTS="0"' -fi -else - - LINE=`grep "USE_CONSTRAINTS" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_constraints='USE_CONSTRAINTS='$DEFAULT_USE_CONSTRAINTS - -fi - -eval "$ac_cv_use_constraints" -echo $ac_cv_use_constraints >> ${OSTYPE}.system.cache.tmp -if test "$USE_CONSTRAINTS" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - - -echo $ac_n "checking "for mdi"""... $ac_c" 1>&6 -echo "configure:5565: checking "for mdi"" >&5 -# Check whether --with-mdi or --without-mdi was given. -if test "${with_mdi+set}" = set; then - withval="$with_mdi" - if test "x$with_mdi" = xyes; then - ac_cv_use_mdi='USE_MDI_ARCHITECTURE="1"' -else - ac_cv_use_mdi='USE_MDI_ARCHITECTURE="0"' -fi -else - - LINE=`grep "USE_MDI_ARCHITECTURE" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_mdi='USE_MDI_ARCHITECTURE='$DEFAULT_USE_MDI_ARCHITECTURE - -fi - -eval "$ac_cv_use_mdi" -echo $ac_cv_use_mdi >> ${OSTYPE}.system.cache.tmp -if test "$USE_MDI_ARCHITECTURE" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for docview"""... $ac_c" 1>&6 -echo "configure:5595: checking "for docview"" >&5 -# Check whether --with-docview or --without-docview was given. -if test "${with_docview+set}" = set; then - withval="$with_docview" - if test "x$with_docview" = xyes; then - ac_cv_use_docview='USE_DOC_VIEW_ARCHITECTURE="1"' -else - ac_cv_use_docview='USE_DOC_VIEW_ARCHITECTURE="0"' -fi -else - - LINE=`grep "USE_DOC_VIEW_ARCHITECTURE" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_docview='USE_DOC_VIEW_ARCHITECTURE='$DEFAULT_USE_DOC_VIEW_ARCHITECTURE - -fi - -eval "$ac_cv_use_docview" -echo $ac_cv_use_docview >> ${OSTYPE}.system.cache.tmp -if test "$USE_DOC_VIEW_ARCHITECTURE" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking "for printarch"""... $ac_c" 1>&6 -echo "configure:5625: checking "for printarch"" >&5 -# Check whether --with-printarch or --without-printarch was given. -if test "${with_printarch+set}" = set; then - withval="$with_printarch" - if test "x$with_printarch" = xyes; then - ac_cv_use_printarch='USE_PRINTING_ARCHITECTURE="1"' -else - ac_cv_use_printarch='USE_PRINTING_ARCHITECTURE="0"' -fi -else - - LINE=`grep "USE_PRINTING_ARCHITECTURE" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_printarch='USE_PRINTING_ARCHITECTURE='$DEFAULT_USE_PRINTING_ARCHITECTURE - -fi - -eval "$ac_cv_use_printarch" -echo $ac_cv_use_printarch >> ${OSTYPE}.system.cache.tmp -if test "$USE_PRINTING_ARCHITECTURE" = 1; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -if test "$USE_UNIX" = 1 ; then - cat >> confdefs.h <<\EOF -#define __UNIX__ 1 -EOF - -fi - - -TOOLKIT= -TOOLKIT_DEF= - -GUI_TK_INCLUDE= -GUI_TK_LIBRARY= -GUI_TK_LINK= - -MAKEINCLUDE= - -if test "$USE_GTK" = 1; then - # Check whether --with-gtk-prefix or --without-gtk-prefix was given. -if test "${with_gtk_prefix+set}" = set; then - withval="$with_gtk_prefix" - gtk_config_prefix="$withval" -else - gtk_config_prefix="" -fi - -# Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given. -if test "${with_gtk_exec_prefix+set}" = set; then - withval="$with_gtk_exec_prefix" - gtk_config_exec_prefix="$withval" -else - gtk_config_exec_prefix="" -fi - - - if test x$gtk_config_exec_prefix != x ; then - gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" - if test x${GTK_CONFIG+set} != xset ; then - GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config - fi - fi - if test x$gtk_config_prefix != x ; then - gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" - if test x${GTK_CONFIG+set} != xset ; then - GTK_CONFIG=$gtk_config_prefix/bin/gtk-config - fi - fi - - # Extract the first word of "gtk-config", so it can be a program name with args. -set dummy gtk-config; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5705: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$GTK_CONFIG" in - /*) - ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no" - ;; -esac -fi -GTK_CONFIG="$ac_cv_path_GTK_CONFIG" -if test -n "$GTK_CONFIG"; then - echo "$ac_t""$GTK_CONFIG" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - min_gtk_version=0.99.7 - echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:5736: checking for GTK - version >= $min_gtk_version" >&5 - no_gtk="" - if test "$GTK_CONFIG" != "no" ; then - GTK_CFLAGS=`$GTK_CONFIG --cflags` - GTK_LIBS=`$GTK_CONFIG --libs` - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GTK_CFLAGS" - LIBS="$LIBS $GTK_LIBS" - if test "$cross_compiling" = yes; then - echo $ac_n "cross compiling; assumed OK... $ac_c" -else - cat > conftest.$ac_ext < -#include - -int -main () -{ - int major, minor, micro; - - if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_gtk_version"); - exit(1); - } - - return !((gtk_major_version > major) || - ((gtk_major_version == major) && (gtk_minor_version > minor)) || - ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))); -} - -EOF -if { (eval echo configure:5771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - no_gtk=yes -fi -rm -fr conftest* -fi - - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - else - no_gtk=yes - fi - if test "x$no_gtk" = x ; then - echo "$ac_t""yes" 1>&6 - - GUI_TK_INCLUDE="$GTK_CFLAGS" - GUI_TK_LIBRARY="$GTK_LIBS" - - else - echo "$ac_t""no" 1>&6 - GTK_CFLAGS="" - GTK_LIBS="" - { echo "configure: error: Are gtk-config and the GTK in path and up-to-date?" 1>&2; exit 1; } - fi - - - - cat >> confdefs.h <<\EOF -#define __WXGTK__ 1 -EOF - - TOOLKIT=GTK - TOOLKIT_DEF=__WXGTK__ - MAKEINCLUDE=../gtk.inc -fi - -if test "$USE_QT" = 1; then - echo $ac_n "checking for Qt includes""... $ac_c" 1>&6 -echo "configure:5814: checking for Qt includes" >&5 - -ac_find_includes= -for ac_dir in $SEARCH_INCLUDE; - do - if test -f "$ac_dir/qapp.h"; then - ac_find_includes=$ac_dir - break - fi - done - - if test "$ac_find_includes" != "" ; then - echo "$ac_t""found $ac_find_includes" 1>&6 - echo $ac_n "checking for Qt library""... $ac_c" 1>&6 -echo "configure:5828: checking for Qt library" >&5 - -ac_find_libraries= -for ac_dir in $SEARCH_LIB; - do - for ac_extension in a so sl; do - if test -f "$ac_dir/libqt.$ac_extension"; then - ac_find_libraries=$ac_dir - break 2 - fi - done - done - - if test "$ac_find_libraries" != "" ; then - - ac_path_to_include=$ac_find_includes - echo "$CHECK_INCLUDE" | grep "\-I$ac_find_includes" > /dev/null - result=$? - if test $result = 0; then - ac_path_to_include="" - else - ac_path_to_include="-I$ac_find_includes" - fi - - - echo "$CHECK_LIB" | grep "\-L$ac_find_libraries" > /dev/null - result=$? - if test $result = 0; then - ac_path_to_link="" - else - ac_path_to_link="-L$ac_find_libraries" - fi - - CHECK_LINK="$CHECK_INCLUDE $ac_path_to_link" - CHECK_INCLUDE="$CHECK_INCLUDE $ac_path_to_include" - echo "$ac_t""found Qt at $ac_find_libraries" 1>&6 - else - { echo "configure: error: no" 1>&2; exit 1; } - fi - else - { echo "configure: error: no" 1>&2; exit 1; } - fi - GUI_TK_LINK="-lXext -lX11 -lqt -lm" - cat >> confdefs.h <<\EOF -#define __WXQT__ 1 -EOF - - TOOLKIT=QT - TOOLKIT_DEF=__WXQT__ - MAKEINCLUDE=../qt.inc -fi - -if test "$USE_MOTIF" = 1; then - echo $ac_n "checking for Motif/Lesstif includes""... $ac_c" 1>&6 -echo "configure:5882: checking for Motif/Lesstif includes" >&5 - -ac_find_includes= -for ac_dir in $SEARCH_INCLUDE; - do - if test -f "$ac_dir/Xm.h"; then - ac_find_includes=$ac_dir - break - fi - done - - if test "$ac_find_includes" != "" ; then - echo "$ac_t""found $ac_find_includes" 1>&6 - echo $ac_n "checking for Motif or Lesstif library""... $ac_c" 1>&6 -echo "configure:5896: checking for Motif or Lesstif library" >&5 - -ac_find_libraries= -for ac_dir in $SEARCH_LIB; - do - for ac_extension in a so sl; do - if test -f "$ac_dir/libXm.$ac_extension"; then - ac_find_libraries=$ac_dir - break 2 - fi - done - done - - if test "$ac_find_libraries" != "" ; then - - ac_path_to_include=$ac_find_includes - echo "$CHECK_INCLUDE" | grep "\-I$ac_find_includes" > /dev/null - result=$? - if test $result = 0; then - ac_path_to_include="" - else - ac_path_to_include="-I$ac_find_includes" - fi - - - echo "$CHECK_LIB" | grep "\-L$ac_find_libraries" > /dev/null - result=$? - if test $result = 0; then - ac_path_to_link="" - else - ac_path_to_link="-L$ac_find_libraries" - fi - - CHECK_LINK="$CHECK_INCLUDE $ac_path_to_link" - CHECK_INCLUDE="$CHECK_INCLUDE $ac_path_to_include" - echo "$ac_t""found at $ac_find_libraries" 1>&6 - else - { echo "configure: error: no" 1>&2; exit 1; } - fi - else - { echo "configure: error: no" 1>&2; exit 1; } - fi - GUI_TK_LINK="-lXext -lXt -lX11 -lXm -lm" - cat >> confdefs.h <<\EOF -#define __WXMOTIF__ 1 -EOF - - TOOLKIT=MOTIF - TOOLKIT_DEF=__WXMOTIF__ - MAKEINCLUDE=../motif.inc -fi - -if test "$TOOLKIT" = ""; then - { echo "configure: error: You must specify a toolkit: --with-gtk --with-qt --with-motif" 1>&2; exit 1; } -fi - - - - - - - - - - - -WXDEBUG= -if test "$USE_DEBUG_INFO" = 1 ; then - WXDEBUG="-g -O0" -fi - - -if test "$USE_DEBUG_FLAG" = 1 ; then - cat >> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <&6 -echo "configure:6338: checking for pthread_create in -lpthread-0.7" >&5 -ac_lib_var=`echo pthread-0.7'_'pthread_create | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lpthread-0.7 $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - UNIX_THREAD="gtk/threadpsx.cpp" - THREADS_LINK="-lpthread-0.7" - -else - echo "$ac_t""no" 1>&6 - - ac_safe=`echo "sys/prctl.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for sys/prctl.h""... $ac_c" 1>&6 -echo "configure:6381: checking for sys/prctl.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - UNIX_THREAD="gtk/threadsgi.cpp" - -else - echo "$ac_t""no" 1>&6 -fi - - - - echo $ac_n "checking for pthread_setcanceltype in -lpthread""... $ac_c" 1>&6 -echo "configure:6417: checking for pthread_setcanceltype in -lpthread" >&5 -ac_lib_var=`echo pthread'_'pthread_setcanceltype | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lpthread $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - UNIX_THREAD="gtk/threadpsx.cpp" - THREADS_LINK="-lpthread" - -else - echo "$ac_t""no" 1>&6 -fi - - -fi - - echo $ac_n "checking for pthread_setcanceltype in -lpthreads""... $ac_c" 1>&6 -echo "configure:6463: checking for pthread_setcanceltype in -lpthreads" >&5 -ac_lib_var=`echo pthreads'_'pthread_setcanceltype | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lpthreads $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - UNIX_THREAD="gtk/threadpsx.cpp" - THREADS_LINK="-lpthreads" - -else - echo "$ac_t""no" 1>&6 -fi - -fi - -if test -z "$UNIX_THREAD"; then - USE_THREADS=0 -fi - - - -cat >> confdefs.h <<\EOF -#define USE_THREADS 1 -EOF - - - - -OPENGL_INCLUDE= -OPENGL_LIBRARY= -OPENGL_LINK= - -if test "$USE_OPENGL" = 1; then - echo $ac_n "checking for OpenGL includes""... $ac_c" 1>&6 -echo "configure:6526: checking for OpenGL includes" >&5 - -ac_find_includes= -for ac_dir in $SEARCH_INCLUDE; - do - if test -f "$ac_dir/GL/gl.h"; then - ac_find_includes=$ac_dir - break - fi - done - - if test "$ac_find_includes" != "" ; then - OPENGL_INCLUDE="-I$ac_find_includes" - echo "$ac_t""found $ac_find_includes" 1>&6 - echo $ac_n "checking for OpenGL library""... $ac_c" 1>&6 -echo "configure:6541: checking for OpenGL library" >&5 - -ac_find_libraries= -for ac_dir in $SEARCH_LIB; - do - for ac_extension in a so sl; do - if test -f "$ac_dir/libGL.$ac_extension"; then - ac_find_libraries=$ac_dir - break 2 - fi - done - done - - if test "$ac_find_libraries" != "" ; then - - ac_path_to_include=$ac_find_includes - echo "$CHECK_INCLUDE" | grep "\-I$ac_find_includes" > /dev/null - result=$? - if test $result = 0; then - ac_path_to_include="" - else - ac_path_to_include="-I$ac_find_includes" - fi - - - echo "$CHECK_LIB" | grep "\-L$ac_find_libraries" > /dev/null - result=$? - if test $result = 0; then - ac_path_to_link="" - else - ac_path_to_link="-L$ac_find_libraries" - fi - - CHECK_LINK="$CHECK_INCLUDE $ac_path_to_link" - CHECK_INCLUDE="$CHECK_INCLUDE $ac_path_to_include" - OPENGL_LIBRARY="$ac_path_to_link" - OPENGL_INCLUDE="$ac_path_to_include" - OPENGL_LINK="-lGL" - echo "$ac_t""found OpenGL at $ac_find_libraries" 1>&6 - else - -ac_find_libraries= -for ac_dir in $SEARCH_LIB; - do - for ac_extension in a so sl; do - if test -f "$ac_dir/libMesaGL.$ac_extension"; then - ac_find_libraries=$ac_dir - break 2 - fi - done - done - - if test "$ac_find_libraries" != "" ; then - - ac_path_to_include=$ac_find_includes - echo "$CHECK_INCLUDE" | grep "\-I$ac_find_includes" > /dev/null - result=$? - if test $result = 0; then - ac_path_to_include="" - else - ac_path_to_include="-I$ac_find_includes" - fi - - - echo "$CHECK_LIB" | grep "\-L$ac_find_libraries" > /dev/null - result=$? - if test $result = 0; then - ac_path_to_link="" - else - ac_path_to_link="-L$ac_find_libraries" - fi - - CHECK_LINK="$CHECK_INCLUDE $ac_path_to_link" - CHECK_INCLUDE="$CHECK_INCLUDE $ac_path_to_include" - OPENGL_LIBRARY="$ac_path_to_link" - OPENGL_INCLUDE="$ac_path_to_include" - OPENGL_LINK="-lMesaGL" - echo "$ac_t""found MESA at $ac_find_libraries" 1>&6 - else - { echo "configure: error: no" 1>&2; exit 1; } - fi - fi - else - { echo "configure: error: no" 1>&2; exit 1; } - fi -fi - - -USE_GLX=$USE_OPENGL -if test "$USE_OPENGL" != 1; then - OPENGL_LIBRARIES= - OPENGL_INCLUDE= - OPENGL_LINK= - GLCANVAS=NONE -fi - -cat >> confdefs.h <> confdefs.h <<\EOF -#define SVR4 1 -EOF - - ;; - - *-*-solaris2* ) - if test "${CC}" != "gcc" ; then - PICFLAGS="-KPIC" - else - PICFLAGS="-fPIC" - fi - CREATE_SHARED=sharedSolaris2 - cat >> confdefs.h <<\EOF -#define SVR4 1 -EOF - - ;; - - *-*-sunos4* ) - if test "${CC}" != "gcc" ; then - PICFLAGS="-PIC" - else - PICFLAGS="-fPIC" - fi - LDFLAGS="-Wl,+s" - CREATE_SHARED=sharedSunos4 - cat >> confdefs.h <<\EOF -#define BSD 1 -EOF - - ;; - - *-*-freebsd* | *-*-netbsd*) - PICFLAGS=-fPIC - CREATE_SHARED=sharedBsd - cat >> confdefs.h <<\EOF -#define BSD 1 -EOF - - ;; - - *-*-osf* ) - PICFLAGS="-fPIC" - CREATE_SHARED=sharedOSF - ;; - - *-*-dgux5* ) - if test "${CC}" != "gcc" ; then - PICFLAGS="-K PIC" - else - PICFLAGS="-fPIC" - fi - CREATE_SHARED=sharedDgux - cat >> confdefs.h <<\EOF -#define SVR4 1 -EOF - - ;; - - *-*-sysv5* ) - if test "${CC}" != "gcc" ; then - PICFLAGS="-K PIC" - else - PICFLAGS="-fPIC" - fi - CREATE_SHARED=sharedSysV - cat >> confdefs.h <<\EOF -#define SVR4 1 -EOF - - ;; - - *-*-aix* ) - if test "${CC}" != "gcc" ; then - PICFLAGS="-bM\:SRE" - else - PICFLAGS="-fPIC" - fi - CREATE_SHARED=sharedAIX - cat >> confdefs.h <<\EOF -#define SYSV 1 -EOF - - ;; - - *) - CREATE_SHARED= - PICFLAGS= -esac - -if test "x$GCC" = xyes; then - CFLAGS="${CFLAGS} -Wall" -fi - -if test "x$GXX" = xyes; then - CXXFLAGS="${CXXFLAGS} -Wall" -fi - -if test "$USE_SHARED" != 1; then - CREATE_SHARED= - PICFLAGS= -fi - - - - - - -echo $OS >> system.list - - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -DEFS=-DHAVE_CONFIG_H - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS </dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" - -trap 'rm -fr `echo "./setup/substit ./include/wx/gtk/setup.h:./setup/setup.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@WXBASEDIR@%$WXBASEDIR%g -s%@CC@%$CC%g -s%@CPP@%$CPP%g -s%@CXX@%$CXX%g -s%@CXXCPP@%$CXXCPP%g -s%@RANLIB@%$RANLIB%g -s%@AR@%$AR%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@LN_S@%$LN_S%g -s%@AWK@%$AWK%g -s%@X_CFLAGS@%$X_CFLAGS%g -s%@X_PRE_LIBS@%$X_PRE_LIBS%g -s%@X_LIBS@%$X_LIBS%g -s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g -s%@GTK_JOYSTICK@%$GTK_JOYSTICK%g -s%@LIBOBJS@%$LIBOBJS%g -s%@YACC@%$YACC%g -s%@LEX@%$LEX%g -s%@LEXLIB@%$LEXLIB%g -s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@GTK_CONFIG@%$GTK_CONFIG%g -s%@GTK_CFLAGS@%$GTK_CFLAGS%g -s%@GTK_LIBS@%$GTK_LIBS%g -s%@GUI_TK_INCLUDE@%$GUI_TK_INCLUDE%g -s%@GUI_TK_LIBRARY@%$GUI_TK_LIBRARY%g -s%@GUI_TK_LINK@%$GUI_TK_LINK%g -s%@TOOLKIT@%$TOOLKIT%g -s%@TOOLKIT_DEF@%$TOOLKIT_DEF%g -s%@MAKEINCLUDE@%$MAKEINCLUDE%g -s%@WXDEBUG@%$WXDEBUG%g -s%@WXDEBUG_DEFINE@%$WXDEBUG_DEFINE%g -s%@EXTRA_LINK@%$EXTRA_LINK%g -s%@PROFILE@%$PROFILE%g -s%@OPTIMISE@%$OPTIMISE%g -s%@METAFILE@%$METAFILE%g -s%@HELP@%$HELP%g -s%@WXGRAPH@%$WXGRAPH%g -s%@WXTREE@%$WXTREE%g -s%@DL_LIBRARY@%$DL_LIBRARY%g -s%@UNIX_THREAD@%$UNIX_THREAD%g -s%@THREADS_LINK@%$THREADS_LINK%g -s%@OPENGL_INCLUDE@%$OPENGL_INCLUDE%g -s%@OPENGL_LIBRARY@%$OPENGL_LIBRARY%g -s%@OPENGL_LINK@%$OPENGL_LINK%g -s%@GLCANVAS@%$GLCANVAS%g -s%@OS@%$OS%g -s%@PICFLAGS@%$PICFLAGS%g -s%@CREATE_SHARED@%$CREATE_SHARED%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' -ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' - -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. - -rm -f conftest.tail -while : -do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS - echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file - fi -fi; done - -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -./setup/general/createall -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - - - -mv ${OSTYPE}.system.cache.tmp ${OSTYPE}.system.cache - diff --git a/configure.in b/configure.in deleted file mode 100644 index 230bcbdcb8..0000000000 --- a/configure.in +++ /dev/null @@ -1,1552 +0,0 @@ -dnl //////////////////////////////////////////////////////////////////////// -dnl -dnl Top-level configure.in for wxWindows by Robert Roebling, Wolfram Gloger -dnl and Martin Sperl. -dnl -dnl This script is under the wxWindows licence. -dnl -dnl //////////////////////////////////////////////////////////////////////// - -dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS -dnl -AC_DEFUN(AM_PATH_GTK, -[dnl -dnl Get the cflags and libraries from the gtk-config script -dnl -AC_ARG_WITH(gtk-prefix,[**--with-gtk-prefix=PFX Prefix where GTK is installed], - gtk_config_prefix="$withval", gtk_config_prefix="") -AC_ARG_WITH(gtk-exec-prefix,[**--with-gtk-exec-prefix=PFX Exec prefix where GTK is installed], - gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") - - if test x$gtk_config_exec_prefix != x ; then - gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" - if test x${GTK_CONFIG+set} != xset ; then - GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config - fi - fi - if test x$gtk_config_prefix != x ; then - gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" - if test x${GTK_CONFIG+set} != xset ; then - GTK_CONFIG=$gtk_config_prefix/bin/gtk-config - fi - fi - - AC_PATH_PROG(GTK_CONFIG, gtk-config, no) - min_gtk_version=ifelse([$1], ,0.99.7,$1) - AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) - no_gtk="" - if test "$GTK_CONFIG" != "no" ; then - GTK_CFLAGS=`$GTK_CONFIG --cflags` - GTK_LIBS=`$GTK_CONFIG --libs` - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GTK_CFLAGS" - LIBS="$LIBS $GTK_LIBS" -dnl -dnl Now check if the installed GTK is sufficiently new. (Also sanity -dnl checks the results of gtk-config to some extent -dnl - AC_TRY_RUN([ -#include -#include - -int -main () -{ - int major, minor, micro; - - if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_gtk_version"); - exit(1); - } - - return !((gtk_major_version > major) || - ((gtk_major_version == major) && (gtk_minor_version > minor)) || - ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))); -} -],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - else - no_gtk=yes - fi - if test "x$no_gtk" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - GTK_CFLAGS="" - GTK_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(GTK_CFLAGS) - AC_SUBST(GTK_LIBS) -]) - -dnl ------------------------------------------------------------------------ -dnl custom macros -dnl ------------------------------------------------------------------------ - -AC_DEFUN(AC_OVERRIDES_PREPARE, -[ -rm -f ${OSTYPE}.system.cache.tmp -touch ${OSTYPE}.system.cache.tmp -touch ${OSTYPE}.system.cache -]) - -AC_DEFUN(AC_OVERRIDES_DONE, -[ -mv ${OSTYPE}.system.cache.tmp ${OSTYPE}.system.cache -]) - -dnl package,message,helpmessage,variable -AC_DEFUN(AC_OVERRIDES, -[ -AC_MSG_CHECKING("for $2") -AC_ARG_WITH($1,$3, -[if test "x$with_$1" = xyes; then - ac_cv_use_$1='$4="1"' -else - ac_cv_use_$1='$4="0"' -fi], -[ - LINE=`grep "$4" ${OSTYPE}.system.cache` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - fi - ac_cv_use_$1='$4='$DEFAULT_$4 -]) -eval "$ac_cv_use_$1" -echo $ac_cv_use_$1 >> ${OSTYPE}.system.cache.tmp -if test "$$4" = 1; then - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi -]) - -dnl package,message,helpmessage,variable -AC_DEFUN(AC_OVERRIDES_OLD, -[ -AC_MSG_CHECKING("for $2") -AC_CACHE_VAL(ac_cv_use_$1, -[ -AC_ARG_WITH($1,$3, -[if test "x$with_$1" = xyes; then - ac_cv_use_$1='$4="1"' -else - ac_cv_use_$1='$4="0"' -fi],[ac_cv_use_$1='$4=$DEFAULT_$4']) -]) -eval "$ac_cv_use_$1" - -if test "$$4" = 1; then - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi -]) - -AC_DEFUN(AC_PATH_FIND_INCLUDES, -[ -ac_find_includes= -for ac_dir in $1; - do - if test -f "$ac_dir/$2"; then - ac_find_includes=$ac_dir - break - fi - done -]) - -AC_DEFUN(AC_PATH_FIND_LIBRARIES, -[ -ac_find_libraries= -for ac_dir in $1; - do - for ac_extension in a so sl; do - if test -f "$ac_dir/lib$2.$ac_extension"; then - ac_find_libraries=$ac_dir - break 2 - fi - done - done -]) - -dnl Path to include, allready defined -AC_DEFUN(AC_INCLUDE_PATH_EXIST, -[ - ac_path_to_include=$1 - echo "$2" | grep "\-I$1" > /dev/null - result=$? - if test $result = 0; then - ac_path_to_include="" - else - ac_path_to_include="-I$1" - fi -]) - -dnl Path to link, allready defined -AC_DEFUN(AC_LINK_PATH_EXIST, -[ - echo "$2" | grep "\-L$1" > /dev/null - result=$? - if test $result = 0; then - ac_path_to_link="" - else - ac_path_to_link="-L$1" - fi -]) - -dnl ------------------------------------------------------------------------ -dnl Process this file with autoconf to produce a configure script. -dnl ------------------------------------------------------------------------ - -AC_INIT(configure.in) - -dnl ------------------------------------------------------------------------ -dnl Check platform -dnl ------------------------------------------------------------------------ - -OS="${OSTYPE}" - -if test "x$OS" = "x"; then - UNAME=`uname` - AC_MSG_ERROR("The system variable OS has not been set" - "please set is everytime befor compiling on this system" - "A good example for this system would be:" - "setenv OSTYPE $UNAME for csh as a SHELL" - "EXPORT OSTYPE=$UNAME for sh as SHELL" - "please set this and restart again." - ) -fi - -dnl ------------------------------------------------------------------------ -dnl Set base directory -dnl ------------------------------------------------------------------------ - -WXBASEDIR=`pwd` -AC_SUBST(WXBASEDIR) - -dnl ------------------------------------------------------------------------ -dnl search path for includes and libraries -dnl ------------------------------------------------------------------------ - -SEARCH_INCLUDE="\ - /usr/Motif1.2/include \ - \ - /usr/X11R6/include \ - /usr/X11R5/include \ - /usr/X11R4/include \ - \ - /usr/include/X11R6 \ - /usr/include/X11R5 \ - /usr/include/X11R4 \ - \ - /usr/local/X11R6/include \ - /usr/local/X11R5/include \ - /usr/local/X11R4/include \ - \ - /usr/local/include/X11R6 \ - /usr/local/include/X11R5 \ - /usr/local/include/X11R4 \ - \ - /usr/X11/include \ - /usr/include/X11 \ - /usr/local/X11/include \ - /usr/local/include/X11 \ - \ - /usr/X386/include \ - /usr/x386/include \ - /usr/XFree86/include/X11 \ - \ - /usr/include \ - /usr/local/include \ - /usr/unsupported/include \ - /usr/athena/include \ - /usr/local/x11r5/include \ - /usr/lpp/Xamples/include \ - \ - /usr/local/include/gtk \ - /usr/X11R6/include/Xm \ - /usr/X11/include/Xm \ - /usr/include/qt \ - \ - /usr/openwin/include \ - /usr/openwin/share/include \ - " - -SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s/include/lib/g` \ - " - -dnl ------------------------------------------------------------------------ -dnl standard checks -dnl ------------------------------------------------------------------------ - -dnl ################### -dnl # checks programs # -dnl ################### - -dnl C-compiler checks -dnl ================= -dnl use what compiler -AC_PROG_CC -dnl defines CC with the compiler to use -dnl defines GCC with yes if using gcc -dnl defines GCC empty if not using gcc -dnl defines CFLAGS - -CFLAGS=`echo "$CFLAGS" | sed 's/-g//g'` - -dnl does compiler support -c and -o simultaniously -AC_PROG_CC_C_O -dnl defines NO_MINUS_C_MINUS_O if compiler does not accept -dnl both switches simultaniously -dnl what is the c-preprocessor -AC_PROG_CPP -dnl defines CPP with the c-preprocessor -dnl is -traditional needed for correct compilations -AC_PROG_GCC_TRADITIONAL -dnl adds -traditional for gcc if needed - -AC_LANG_SAVE - -dnl C++-compiler checks -dnl =================== -dnl use what compiler -AC_PROG_CXX -dnl defines CXX with the compiler to use -dnl defines GXX with yes if using gxx -dnl defines GXX empty if not using gxx -dnl defines CXXFLAGS -dnl what is the C++-preprocessor -AC_PROG_CXXCPP -dnl defines CXXCPP with the C++-preprocessor - -CXXFLAGS=`echo "$CXXFLAGS" | sed 's/-g//g'` - -AC_LANG_RESTORE - -dnl ranlib command -dnl ============== -AC_PROG_RANLIB -dnl defines RANLIB with the appropriate command - -dnl ar command -dnl ========== -AC_CHECK_PROG(AR, ar, ar, ar) -dnl defines AR with the appropriate command - -dnl install checks -dnl ============== -AC_PROG_INSTALL -dnl defines INSTALL with the appropriate command - -dnl does ln -s works -dnl ================ -AC_PROG_LN_S -dnl defines LN_S with the appropriate command - -dnl awk command -dnl =========== -AC_PROG_AWK -dnl defines AWK with the appropriate command - -dnl ############### -dnl # make checks # -dnl ############### -dnl check if VPATH works -AC_MSG_CHECKING("make for VPATH support") -dnl create Makefile -cat - << EOF > confMake -check : file - cp \$? \$@ - cp \$? final_file -EOF - -if test ! -d sub ; then - mkdir sub -fi -echo dummy > sub/file -${MAKE-make} -f confMake VPATH=sub 2> config.log > /dev/null -RESULT=$? -rm -f sub/file check final_file config.log confMake -rmdir sub -if test "$RESULT" = 0; then - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) - AC_MSG_ERROR( -You need a make-utility that is able to use the variable -VPATH correctly. -If your version of make does not support VPATH correctly, -please install GNU-make (possibly as gmake), and start -configure with the following command: -export MAKE=gmake; ./configure for sh-type shells -setenv MAKE gmake; ./configure for csh-type shells -Also please do remember to use gmake in this case every time -you are trying to compile. -) -fi - -dnl #################### -dnl # checks libraries # -dnl #################### - -dnl find the X11 include and library files -AC_PATH_XTRA -dnl defines x_includes and x_libraries - -dnl ####################### -dnl # checks header files # -dnl ####################### -AC_HEADER_DIRENT -dnl defines DIR -dnl defines MACRO HAVE_DIRENT_H if dirent.h exists -dnl defines MACRO HAVE_SYS_NDIR_H if sys/ndir.h exists -dnl defines MACRO HAVE_SYS_DIR_H if sys/dir.h exists -dnl defines MACRO HAVE_NDIR_H if ndir.h exists -AC_HEADER_STDC -dnl defines STDC_HEADERS if ANSI-C header -AC_HEADER_SYS_WAIT -dnl defines HAVE_SYS_WAIT_H if sys/wait.h exist and is POSIX.1 -AC_CHECK_HEADER(fcntl.h) -dnl defines HAVE_FCNTL_H -AC_CHECK_HEADER(limits.h) -dnl defines HAVE_LIMITS_h -AC_CHECK_HEADER(sys/file.h) -dnl defines HAVE_SYS_FILE_H -AC_CHECK_HEADER(sys/time.h) -dnl defines HAVE_SYS_TIME_H -AC_CHECK_HEADER(unistd.h) -dnl defines HAVE_UNISTD_H -dnl As it needs Linux 2.1.x for the moment: check whether the file exists (GL). -AC_CHECK_HEADER(linux/joystick.h) -GTK_JOYSTICK="" -if test "$ac_cv_header_linux_joystick_h" = "yes"; then - GTK_JOYSTICK="gtk/joystick.cpp" -fi -AC_SUBST(GTK_JOYSTICK) - -dnl ################### -dnl # checks typedefs # -dnl ################### -AC_TYPE_GETGROUPS -dnl defines GETGROUPS_T -AC_TYPE_MODE_T -dnl defines mode_t if not already defined -AC_TYPE_OFF_T -dnl defines off_t if not already defined -AC_TYPE_PID_T -dnl defines pid_t if not already defined -AC_TYPE_SIGNAL -dnl defines RETSIGTYPE for the correct return type of signal -AC_TYPE_SIZE_T -dnl defines size_t if not already defined -AC_TYPE_UID_T -dnl defines uid_t and gid_t if not already defined - -dnl ##################### -dnl # checks structures # -dnl ##################### - -AC_HEADER_STAT -dnl defines STAT_MACROS_BROKEN if S_ISDIR and S_ISREG -dnl do not work properly -AC_HEADER_TIME -dnl defines TIME_WITH_SYS_TIME if time.h and sys/time.h can -dnl both be included -AC_STRUCT_ST_BLKSIZE -dnl defines HAVE_ST_BLKSIZE if struct stat contains st_blksize -AC_STRUCT_ST_BLOCKS -dnl defines HAVE_ST_BLOCKS if struct stat contains st_blocks -AC_STRUCT_ST_RDEV -dnl defines HAVE_ST_RDEV if struct stat contains st_rdev -AC_STRUCT_TM -dnl defines TM_IN_SYS_TIME if struct tm is not in time.h -AC_STRUCT_TIMEZONE -dnl defines HAVE_ST_BLKSIZE if struct tm contains tm_zone -dnl otherwise -dnl defines HAVE_TZNAME if external array tzname is found - -dnl ################################### -dnl # checks compiler characteristics # -dnl ################################### -dnl AC_C_CROSS - -AC_C_CONST -dnl defines const to be empty if c-compiler does not support const fully -AC_C_INLINE -dnl defines inline to a sensible value for the c-compiler -AC_C_CHAR_UNSIGNED -dnl defines __CHAR_UNSIGNED__ if char is unsigned -AC_C_LONG_DOUBLE -dnl defines HAVE_LONGDOUBLE if compiler supports long double - -AC_C_BIGENDIAN -dnl defines WORDS_BIGENDIAN if system is big endian - -AC_CHECK_SIZEOF(int *) -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(long) -dnl defines the size of certain types of variables in SIZEOF_??? - -dnl ############################ -dnl # checks library functions # -dnl ############################ - -dnl ########################## -dnl # checks system services # -dnl ########################## - - -AC_SYS_LONG_FILE_NAMES -dnl defines HAVE_LONG_FILENAMES if filenames longer then -dnl 14 chars are supported - -dnl AC_SYS_RESTARTABLE_SYSCALLS -dnl defines HAVE_RESTARTABLE_SYSCALLS if the system restarts a -dnl system call that is interrupted -dnl by a signal - -dnl ################# -dnl # checks PARSER # -dnl ################# - -dnl YACC checks -dnl =========== -AC_PROG_YACC -dnl defines YACC with the appropriate command - -dnl LEX checks -dnl ========== -AC_PROG_LEX -dnl defines LEX with the appropriate command -dnl defines LEXLIB with the appropriate library -dnl what type is yytext -AC_DECL_YYTEXT -dnl defines YYTEXT_POINTER if yytext is char* -dnl defines LEX_OUTPUT_ROOT as to the base of the -dnl filename output by the lexer - -dnl ------------------------------------------------------------------------ -dnl main includes -dnl ------------------------------------------------------------------------ - -CHECK_INCLUDE="-I/usr/include $X_CFLAGS" -CHECK_LIB="-L/lib -L/usr/lib $X_LIBS" - -dnl ------------------------------------------------------------------------ -dnl host system -dnl ------------------------------------------------------------------------ - -AC_CANONICAL_HOST -canonical=$host -configuration=$host_alias - -dnl ------------------------------------------------------------------------ -dnl system settings -dnl ------------------------------------------------------------------------ - -USE_UNIX=1 - - -USE_LINUX= -USE_SGI= -USE_HPUX= -USE_SYSV= -USE_SVR4= -USE_AIX= -USE_SUN= -USE_SOLARIS= -USE_SUNOS= -USE_ALPHA= -USE_OSF= -USE_BSD= -USE_FREEBSD= -USE_VMS= -USE_ULTRIX= -USE_DATA_GENERAL= - -case "${canonical}" in - *-hp-hpux* ) - USE_HPUX=1 - AC_DEFINE(__HPUX__) - ;; - *-*-linux* ) - USE_LINUX=1 - AC_DEFINE(__LINUX__) - ;; - *-*-irix5* | *-*-irix6* ) - USE_SGI=1 - USE_SVR4=1 - AC_DEFINE(__SGI__) - AC_DEFINE(__SVR4__) - ;; - *-*-solaris2* ) - USE_SUN=1 - USE_SOLARIS=1 - USE_SVR4=1 - AC_DEFINE(__SUN__) - AC_DEFINE(__SOLARIS__) - AC_DEFINE(__SVR4__) - ;; - *-*-sunos4* ) - USE_SUN=1 - USE_SUNOS=1 - USE_BSD=1 - AC_DEFINE(__SUN__) - AC_DEFINE(__SUNOS__) - AC_DEFINE(__BSD__) - ;; - *-*-freebsd* | *-*-netbsd*) - USE_BSD=1 - USE_FREEBSD=1 - AC_DEFINE(__FREEBSD__) - AC_DEFINE(__BSD__) - ;; - *-*-osf* ) - USE_ALPHA=1 - USE_OSF=1 - AC_DEFINE(__ALPHA__) - AC_DEFINE(__OSF__) - ;; - *-*-dgux5* ) - USE_ALPHA=1 - USE_SVR4=1 - AC_DEFINE(__ALPHA__) - AC_DEFINE(__SVR4__) - ;; - *-*-sysv5* ) - USE_SYSV=1 - USE_SVR4=1 - AC_DEFINE(__SYSV__) - AC_DEFINE(__SVR4__) - ;; - *-*-aix* ) - USE_AIX=1 - USE_SYSV=1 - USE_SVR4=1 - AC_DEFINE(__AIX__) - AC_DEFINE(__SYSV__) - AC_DEFINE(__SVR4__) - ;; - *) - AC_MSG_ERROR(I don't know your system type.) -esac - -dnl ------------------------------------------------------------------------ -dnl defaults for command options -dnl ------------------------------------------------------------------------ - -AC_OVERRIDES_PREPARE - -DEFAULT_USE_GTK=1 -DEFAULT_USE_QT=0 -DEFAULT_USE_MOTIF=0 - -DEFAULT_USE_SHARED=1 -DEFAULT_USE_OPTIMISE=1 -DEFAULT_USE_PROFILE=0 -DEFAULT_USE_DEBUG_FLAG=0 -DEFAULT_USE_DEBUG_INFO=0 -DEFAULT_USE_MEM_TRACING=0 -DEFAULT_USE_DMALLOC=0 -DEFAULT_USE_APPLE_IEEE=1 -DEFAULT_USE_IOSTREAMH=1 - -DEFAULT_USE_ZLIB=1 -DEFAULT_USE_GDK_IMLIB=1 -DEFAULT_USE_LIBPNG=1 -DEFAULT_USE_ODBC=1 - -DEFAULT_USE_GAUGE=1 -DEFAULT_USE_SCROLLBAR=1 -DEFAULT_USE_LISTCTRL=1 -DEFAULT_USE_TREECTRL=1 -DEFAULT_USE_GRID=1 -DEFAULT_USE_TAB_DIALOG=1 -DEFAULT_USE_NOTEBOOK=1 - -DEFAULT_USE_TIMEDATE=1 -DEFAULT_USE_FRACTION=1 -DEFAULT_USE_LOG=1 -DEFAULT_USE_INTL=1 -DEFAULT_USE_CONFIG=1 -DEFAULT_USE_STREAMS=1 -DEFAULT_USE_SERIAL=1 -DEFAULT_USE_FILE=1 -DEFAULT_USE_TEXTFILE=1 - -DEFAULT_USE_AFM_FOR_POSTSCRIPT=1 -DEFAULT_WX_NORMALIZED_PS_FONTS=1 -DEFAULT_USE_POSTSCRIPT=1 - -DEFAULT_USE_IPC=1 -DEFAULT_USE_RESOURCES=1 -DEFAULT_USE_CONSTRAINTS=1 -DEFAULT_USE_CLIPBOARD=0 -DEFAULT_USE_DND=1 - -DEFAULT_USE_MDI_ARCHITECTURE=1 -DEFAULT_USE_DOC_VIEW_ARCHITECTURE=1 -DEFAULT_USE_PRINTING_ARCHITECTURE=1 - -DEFAULT_USE_PROLOGIO=1 -DEFAULT_USE_WX_RESOURCES=1 -DEFAULT_USE_RPC=0 - -DEFAULT_USE_OPENGL=0 -DEFAULT_USE_METAFILE=0 -DEFAULT_USE_WXGRAPH=0 -DEFAULT_USE_WXTREE=0 -DEFAULT_USE_HELP=0 - -dnl ---------------------------------------------------------------- -dnl toolkit options -dnl ---------------------------------------------------------------- - -AC_OVERRIDES(gtk,gtk, -**--with-gtk use GTK, -USE_GTK) - -AC_OVERRIDES(qt,qt, -**--with-qt use Qt, -USE_QT) - -AC_OVERRIDES(motif,motif, -**--with-motif use Motif/Lesstif, -USE_MOTIF) - -dnl ---------------------------------------------------------------- -dnl compile options -dnl ---------------------------------------------------------------- - -AC_OVERRIDES(shared,shared, -**--with-shared create shared libraries, -USE_SHARED) - -AC_OVERRIDES(optimise,optimise, -**--with-optimise create optimised code, -USE_OPTIMISE) - -AC_OVERRIDES(debug_flag,debug_flag, -**--with-debug_flag create code with WXDEBUG define set to 1, -USE_DEBUG_FLAG) - -AC_OVERRIDES(debug_info,debug_info, -**--with-debug_info create code with debuging information, -USE_DEBUG_INFO) - -AC_OVERRIDES(mem_tracing,mem_tracing, -**--with-mem_traing create code with memory tracing, -USE_MEM_TRACING) - -AC_OVERRIDES(dmalloc,dmalloc, -**--with-dmalloc use dmalloc memory debug library (www.letters.com/dmalloc/), -USE_DMALLOC) - -AC_OVERRIDES(profile,profile, -**--with-profile create code with profiling information, -USE_PROFILE) - -AC_OVERRIDES(apple_ieee, apple_ieee, -**--with_apple_ieee use the Apple IEEE codec, -USE_APPLE_IEEE) - -dnl ---------------------------------------------------------------- -dnl user options for libraries -dnl ---------------------------------------------------------------- - -AC_OVERRIDES(zlib,zlib, -**--with-zlib use zlib for LZW comression, -USE_ZLIB) - -AC_OVERRIDES(gdk_imlib,gdk_imlib, -**--with-gdk_imlib use Raster's gdk_imlib (Image library), -USE_GDK_IMLIB) - -AC_OVERRIDES(libpng,libpng, -**--with-libpng use libpng (PNG image format), -USE_LIBPNG) - -AC_OVERRIDES(odbc,odbc, -**--with-odbc use iODBC and wxODBC classes, -USE_ODBC) - -AC_OVERRIDES(opengl,opengl, -**--with-opengl use OpenGL (or Mesa), -USE_OPENGL) - -dnl ---------------------------------------------------------------- -dnl user options for GUI control classes -dnl ---------------------------------------------------------------- - -AC_OVERRIDES(gauge,gauge, -**--with-gauge use wxGauge class, -USE_GAUGE) - -AC_OVERRIDES(scrollbar,scrollbar, -**--with-scrollbar use wxScrollbar class, -USE_SCROLLBAR) - -AC_OVERRIDES(listctrl,listctrl, -**--with-listctrl use wxListCtrl class, -USE_LISTCTRL) - -AC_OVERRIDES(treectrl,treectrl, -**--with-treectrl use wxTreeCtrl class, -USE_TREECTRL) - -AC_OVERRIDES(grid,grid, -**--with-grid use wxGrid class, -USE_GRID) - -AC_OVERRIDES(tab_dialog,tab_dialog, -**--with-tab_dialog use wxTabDia class, -USE_TAB_DIALOG) - -AC_OVERRIDES(notebook,notebook, -**--with-notebook use wxNotebook class, -USE_NOTEBOOK) - -dnl ---------------------------------------------------------------- -dnl user options for non-GUI classes -dnl ---------------------------------------------------------------- - -AC_OVERRIDES(timedate, timedate, -**--with-timedate use wxTime and wxDate classes, -USE_TIMEDATE) - -AC_OVERRIDES(fraction,fraction, -**--with-fraction use wxFraction class, -USE_FRACTION) - -AC_OVERRIDES(log,log, -**--with-log use logging system, -USE_LOG) - -AC_OVERRIDES(intl,intl, -**--with-intl use internationalization system, -USE_INTL) - -AC_OVERRIDES(config,config, -**--with-config use wxConfig class, -USE_CONFIG) - -AC_OVERRIDES(streams,streams, -**--with-streams use wxStream etc classes, -USE_STREAMS) - -AC_OVERRIDES(serial,serial, -**--with-serial use class serialization, -USE_SERIAL) - -AC_OVERRIDES(file,file, -**--with-file use wxFile class, -USE_FILE) - -AC_OVERRIDES(textfile,textfile, -**--with-textfile use wxTextFile class, -USE_TEXTFILE) - -dnl ---------------------------------------------------------------- -dnl user options for PostScript -dnl ---------------------------------------------------------------- - -AC_OVERRIDES(afmfonts,afmfonts, -**--with-afmfonts use Adobe Font Metric Font table, -USE_AFM_FOR_POSTSCRIPT) - -AC_OVERRIDES(normalized, normalized, -**--with-PS-normalized use normalized PS fonts, -WX_NORMALIZED_PS_FONTS) - -AC_OVERRIDES(postscript, postscript, -**--with-postscript use wxPostscriptDC device context, -USE_POSTSCRIPT) - -dnl ---------------------------------------------------------------- -dnl user options for Prolog and Resources -dnl ---------------------------------------------------------------- - -AC_OVERRIDES(wxresources,wxresources, -**--with-wxresources use wxWindows's resources, -USE_WX_RESOURCES) - -AC_OVERRIDES(prologio,prologio, -**--with-prologio use Prolog IO library, -USE_PROLOGIO) - -AC_OVERRIDES(rpc,RPC, -**--with-rpc use Prolog's remote procedure calls, -USE_RPC) - -dnl ---------------------------------------------------------------- -dnl user options for misc stuff -dnl ---------------------------------------------------------------- - -AC_OVERRIDES(ipc,IPC, -**--with-ipc use interprocess communication (wxSocket etc.), -USE_IPC) - -AC_OVERRIDES(resources,resources, -**--with-resources use X resources for saving information, -USE_RESOURCES) - -AC_OVERRIDES(clipboard,clipboard, -**--with-clipboard use wxClipboard classes, -USE_CLIPBOARD) - -AC_OVERRIDES(dnd,dnd, -**--with-dnd use Drag'n'Drop classes, -USE_DND) - -AC_OVERRIDES(constraints,constrains, -**--with-constraints use layout-constraints system, -USE_CONSTRAINTS) - -dnl ---------------------------------------------------------------- -dnl user options for architectures -dnl ---------------------------------------------------------------- - -AC_OVERRIDES(mdi,mdi, -**--with-mdi use multiple document interface architecture, -USE_MDI_ARCHITECTURE) - -AC_OVERRIDES(docview,docview, -**--with-docview use document view architecture, -USE_DOC_VIEW_ARCHITECTURE) - -AC_OVERRIDES(printarch,printarch, -**--with-printarch use printing architecture, -USE_PRINTING_ARCHITECTURE) - -dnl ---------------------------------------------------------------- -dnl user options with no effect yet -dnl ---------------------------------------------------------------- -dnl -dnl AC_OVERRIDES(metafile, metafile, -dnl **--with-metafile use metafile (no effect), -dnl USE_METAFILE) -dnl -dnl AC_OVERRIDES(help,help, -dnl **--with-help use help (no effect), -dnl USE_HELP) -dnl -dnl AC_OVERRIDES(wxgraph,wxgraph, -dnl **--with-wxgraph use wxgraph (no effect), -dnl USE_WXGRAPH) -dnl -dnl AC_OVERRIDES(wxtree,wxtree, -dnl **--with-wxtree use wxtree (no effect), -dnl USE_WXTREE) -dnl -dnl AC_OVERRIDES(package,message,helpmessage,variable) -dnl -dnl ---------------------------------------------------------------- -dnl Unix, obviously -dnl ---------------------------------------------------------------- - -if test "$USE_UNIX" = 1 ; then - AC_DEFINE(__UNIX__) -fi - -dnl ---------------------------------------------------------------- -dnl search for toolkit (widget sets) -dnl ---------------------------------------------------------------- - -TOOLKIT= -TOOLKIT_DEF= - -GUI_TK_INCLUDE= -GUI_TK_LIBRARY= -GUI_TK_LINK= - -MAKEINCLUDE= - -if test "$USE_GTK" = 1; then - AM_PATH_GTK(0.99.7, [ - GUI_TK_INCLUDE="$GTK_CFLAGS" - GUI_TK_LIBRARY="$GTK_LIBS" - ], AC_MSG_ERROR(Are gtk-config and the GTK in path and up-to-date?)) - AC_DEFINE(__WXGTK__) - TOOLKIT=GTK - TOOLKIT_DEF=__WXGTK__ - MAKEINCLUDE=../gtk.inc -fi - -if test "$USE_QT" = 1; then - AC_MSG_CHECKING(for Qt includes) - AC_PATH_FIND_INCLUDES($SEARCH_INCLUDE,qapp.h) - if test "$ac_find_includes" != "" ; then - AC_MSG_RESULT(found $ac_find_includes) - AC_MSG_CHECKING(for Qt library) - AC_PATH_FIND_LIBRARIES($SEARCH_LIB,qt) - if test "$ac_find_libraries" != "" ; then - AC_INCLUDE_PATH_EXIST($ac_find_includes,$CHECK_INCLUDE) - AC_LINK_PATH_EXIST($ac_find_libraries,$CHECK_LIB) - CHECK_LINK="$CHECK_INCLUDE $ac_path_to_link" - CHECK_INCLUDE="$CHECK_INCLUDE $ac_path_to_include" - AC_MSG_RESULT(found Qt at $ac_find_libraries) - else - AC_MSG_ERROR(no) - fi - else - AC_MSG_ERROR(no) - fi - GUI_TK_LINK="-lXext -lX11 -lqt -lm" - AC_DEFINE(__WXQT__) - TOOLKIT=QT - TOOLKIT_DEF=__WXQT__ - MAKEINCLUDE=../qt.inc -fi - -if test "$USE_MOTIF" = 1; then - AC_MSG_CHECKING(for Motif/Lesstif includes) - AC_PATH_FIND_INCLUDES($SEARCH_INCLUDE,Xm.h) - if test "$ac_find_includes" != "" ; then - AC_MSG_RESULT(found $ac_find_includes) - AC_MSG_CHECKING(for Motif or Lesstif library) - AC_PATH_FIND_LIBRARIES($SEARCH_LIB,Xm) - if test "$ac_find_libraries" != "" ; then - AC_INCLUDE_PATH_EXIST($ac_find_includes,$CHECK_INCLUDE) - AC_LINK_PATH_EXIST($ac_find_libraries,$CHECK_LIB) - CHECK_LINK="$CHECK_INCLUDE $ac_path_to_link" - CHECK_INCLUDE="$CHECK_INCLUDE $ac_path_to_include" - AC_MSG_RESULT(found at $ac_find_libraries) - else - AC_MSG_ERROR(no) - fi - else - AC_MSG_ERROR(no) - fi - GUI_TK_LINK="-lXext -lXt -lX11 -lXm -lm" - AC_DEFINE(__WXMOTIF__) - TOOLKIT=MOTIF - TOOLKIT_DEF=__WXMOTIF__ - MAKEINCLUDE=../motif.inc -fi - -if test "$TOOLKIT" = ""; then - AC_MSG_ERROR(You must specify a toolkit: --with-gtk --with-qt --with-motif) -fi - -AC_SUBST(GUI_TK_INCLUDE) -AC_SUBST(GUI_TK_LIBRARY) -AC_SUBST(GUI_TK_LINK) - -AC_SUBST(TOOLKIT) -AC_SUBST(TOOLKIT_DEF) - -AC_SUBST(MAKEINCLUDE) - -dnl ---------------------------------------------------------------- -dnl Register compile options for makefiles and setup.h -dnl ---------------------------------------------------------------- - -WXDEBUG= -if test "$USE_DEBUG_INFO" = 1 ; then - WXDEBUG="-g -O0" -fi -AC_SUBST(WXDEBUG) - -if test "$USE_DEBUG_FLAG" = 1 ; then - AC_DEFINE_UNQUOTED(WXDEBUG,$USE_DEBUG_FLAG) - WXDEBUG_DEFINE="-D__WXDEBUG__" - AC_SUBST(WXDEBUG_DEFINE) -fi - -if test "$USE_MEM_TRACING" = 1 ; then - AC_DEFINE_UNQUOTED(USE_MEMORY_TRACING,$USE_MEM_TRACING) - dnl AC_DEFINE_UNQUOTED(USE_GLOBAL_MEMORY_OPERATORS,$USE_MEM_TRACING) -fi - -EXTRA_LINK= -if test "$USE_DMALLOC" = 1 ; then - EXTRA_LINK="$EXTRA_LINK -ldmalloc" -fi -AC_SUBST(EXTRA_LINK) - -PROFILE= -if test "$USE_PROFILE" = 1 ; then - PROFILE="-pg" -fi -AC_SUBST(PROFILE) - -CXXFLAGS=`echo "${CXXFLAGS}" | sed "s/\-O.//g" ` -CFLAGS=`echo "${CFLAGS}" | sed "s/\-O.//g" ` -if test "$USE_OPTIMISE" = 0 ; then - OPTIMISE= -else - if test "$GCC" = yes ; then - OPTIMISE="-O2" - case "${canonical}" in - i586-*-*|i686-*-* ) - OPTIMISE="${OPTIMISE} " - ;; - esac - else - OPTIMISE="-O" - fi -fi -AC_SUBST(OPTIMISE) - -APPLE_IEEE=NONE -if test "$USE_APPLE_IEEE" = 1 ; then - APPLE_IEEE="APPLE_IEEE" - AC_DEFINE_UNQUOTED(USE_APPLE_IEEE,$USE_APPLE_IEEE) -fi - -USE_IOSTREAMH=$DEFAULT_USE_IOSTREAMH -AC_DEFINE_UNQUOTED(USE_IOSTREAMH,$USE_IOSTREAMH) - -dnl ---------------------------------------------------------------- -dnl Register library options for makefiles and setup.h -dnl ---------------------------------------------------------------- - -if test "$USE_ZLIB" = 1 ; then - AC_DEFINE_UNQUOTED(USE_ZLIB,$USE_ZLIB) -fi - -if test "$USE_GDK_IMLIB" = 1 ; then - AC_DEFINE_UNQUOTED(USE_GDK_IMLIB,$USE_GDK_IMLIB) -fi - -if test "$USE_LIBPNG" = 1 ; then - AC_DEFINE_UNQUOTED(USE_LIBPNG,$USE_LIBPNG) -fi - -if test "$USE_ODBC" = 1 ; then - AC_DEFINE_UNQUOTED(USE_ODBC,$USE_ODBC) -fi - -dnl ---------------------------------------------------------------- -dnl Register GUI-control options for makefiles and setup.h -dnl ---------------------------------------------------------------- - -if test "$USE_GAUGE" = 1 ; then - AC_DEFINE_UNQUOTED(USE_GAUGE,$USE_GAUGE) -fi - -if test "$USE_SCROLLBAR" = 1 ; then - AC_DEFINE_UNQUOTED(USE_SCROLLBAR,$USE_SCROLLBAR) -fi - -if test "$USE_LISTCTRL" = 1 ; then - AC_DEFINE_UNQUOTED(USE_LISTCTRL,$USE_LISTCTRL) -fi - -if test "$USE_TREECTRL" = 1 ; then - AC_DEFINE_UNQUOTED(USE_TREECTRL,$USE_TREECTRL) -fi - -if test "$USE_GRID" = 1 ; then - AC_DEFINE_UNQUOTED(USE_GRID,$USE_GRID) -fi - -if test "$USE_TAB_DIALOG" = 1 ; then - AC_DEFINE_UNQUOTED(USE_TAB_DIALOG,$USE_TAB_DIALOG) -fi - -if test "$USE_NOTEBOOK" = 1 ; then - AC_DEFINE_UNQUOTED(USE_NOTEBOOK,$USE_NOTEBOOK) -fi - -dnl ---------------------------------------------------------------- -dnl Register non-GUI class options for makefiles and setup.h -dnl ---------------------------------------------------------------- - -if test "$USE_CONFIG" = 1 ; then - AC_DEFINE_UNQUOTED(USE_CONFIG,$USE_CONFIG) -fi - -if test "$USE_TIMEDATE" = 1 ; then - AC_DEFINE_UNQUOTED(USE_TIMEDATE,$USE_TIMEDATE) -fi - -if test "$USE_FRACTION" = 1 ; then - AC_DEFINE_UNQUOTED(USE_FRACTION,$USE_FRACTION) -fi - -if test "$USE_LOG" = 1 ; then - AC_DEFINE_UNQUOTED(USE_LOG,$USE_LOG) -fi - -if test "$USE_INTL" = 1 ; then - AC_DEFINE_UNQUOTED(USE_INTL,$USE_INTL) -fi - -if test "$USE_STREAMS" = 1 ; then - AC_DEFINE_UNQUOTED(USE_STREAMS,$USE_STREAMS) -fi - -if test "$USE_SERIAL" = 1 ; then - AC_DEFINE_UNQUOTED(USE_SERIAL,$USE_SERIAL) -fi - -if test "$USE_FILE" = 1 ; then - AC_DEFINE_UNQUOTED(USE_FILE,$USE_FILE) -fi - -if test "$USE_TEXTFILE" = 1 ; then - AC_DEFINE_UNQUOTED(USE_TEXTFILE,$USE_TEXTFILE) -fi - -dnl ---------------------------------------------------------------- -dnl Register Prolog and Resources options for makefiles and setup.h -dnl ---------------------------------------------------------------- - -if test "$USE_RPC" = 1 ; then - AC_DEFINE_UNQUOTED(USE_RPC,$USE_RPC) -fi - -if test "$USE_WX_RESOURCES" = 1 ; then - AC_DEFINE_UNQUOTED(USE_WX_RESOURCES,$USE_WX_RESOURCES) -fi - -if test "$USE_PROLOGIO" = 1 ; then - AC_DEFINE_UNQUOTED(USE_PROLOGIO) -fi - -dnl ---------------------------------------------------------------- -dnl Register PostScript options for makefiles and setup.h -dnl ---------------------------------------------------------------- - -if test "$USE_POSTSCRIPT" = 1 ; then - AC_DEFINE_UNQUOTED(USE_POSTSCRIPT) -fi - -AC_DEFINE_UNQUOTED(USE_AFM_FOR_POSTSCRIPT,$USE_AFM_FOR_POSTSCRIPT) - -AC_DEFINE_UNQUOTED(WX_NORMALIZED_PS_FONTS,$WX_NORMALIZED_PS_FONTS) - -dnl ---------------------------------------------------------------- -dnl Register architecture options for makefiles and setup.h -dnl ---------------------------------------------------------------- - -if test "$USE_MDI_ARCHITECTURE" = 1 ; then - AC_DEFINE_UNQUOTED(USE_MDI_ARCHITECTURE,$USE_MDI_ARCHITECTURE) -fi - -if test "$USE_DOC_VIEW_ARCHITECTURE" = 1 ; then - AC_DEFINE_UNQUOTED(USE_DOC_VIEW_ARCHITECTURE,$USE_DOC_VIEW_ARCHITECTURE) -fi - -if test "$USE_PRINTING_ARCHITECTURE" = 1 ; then - AC_DEFINE_UNQUOTED(USE_PRINTING_ARCHITECTURE,$USE_PRINTING_ARCHITECTURE) -fi - -dnl ---------------------------------------------------------------- -dnl Register misc options for makefiles and setup.h -dnl ---------------------------------------------------------------- - -if test "$USE_IPC" = 1 ; then - AC_DEFINE_UNQUOTED(USE_IPC) -fi - -if test "$USE_RESOURCES" = 1 ; then - AC_DEFINE_UNQUOTED(USE_RESOURCES,$USE_RESOURCES) -fi - -if test "$USE_CLIPBOARD" = 1 ; then - AC_DEFINE_UNQUOTED(USE_CLIPBOARD,$USE_CLIPBOARD) -fi - -if test "$USE_DND" = 1 ; then - AC_DEFINE_UNQUOTED(USE_DND,$USE_DND) -fi - -if test "$USE_CONSTRAINTS" = 1 ; then - AC_DEFINE_UNQUOTED(USE_CONSTRAINTS,$USE_CONSTRAINTS) -fi - -dnl ---------------------------------------------------------------- -dnl No effect -dnl ---------------------------------------------------------------- - -METAFILE=NONE -if test "$USE_METAFILE" = 1 ; then - METAFILE="METAFILE" - AC_DEFINE_UNQUOTED(USE_METAFILE,$USE_METAFILE) -fi -AC_SUBST(METAFILE) - -HELP=NONE -if test "$USE_HELP" = 1 ; then - HELP="HELP" - AC_DEFINE_UNQUOTED(USE_HELP,$USE_HELP) -fi -AC_SUBST(HELP) - -WXGRAPH=NONE -if test "$USE_WXGRAPH" = 1 ; then - WXGRAPH="WXGRAPH" - AC_DEFINE_UNQUOTED(USE_WXGRAPH,$USE_WXGRAPH) -fi -AC_SUBST(WXGRAPH) - -WXTREE=NONE -if test "$USE_WXTREE" = 1 ; then - WXTREE="WXTREE" - AC_DEFINE_UNQUOTED(USE_WXTREE,$USE_WXTREE) -fi -AC_SUBST(WXTREE) - -GLCANVAS=NONE -if test "$USE_OPENGL" = 1 ; then - GLCANVAS="GLCANVAS" -fi - -dnl ---------------------------------------------------------------- -dnl select dynamic loader (used by iODBC to load drivers) -dnl ---------------------------------------------------------------- - -DL_LIBRARY=-ldl - -AC_SUBST(DL_LIBRARY) - -dnl ---------------------------------------------------------------- -dnl thread support -dnl ---------------------------------------------------------------- - -USE_THREADS=1 -THREADS_LINK="" -UNIX_THREAD="" - -AC_ARG_WITH(threads, -[**--without-threads Force disabling threads ], -[USE_THREADS="$withval"]) - -if test "$USE_THREADS" = "1"; then - UNIX_THREAD="gtk/threadno.cpp" - - dnl For glibc 2 users who have the old libc 5 too - - AC_CHECK_LIB(pthread-0.7, pthread_create, [ - UNIX_THREAD="gtk/threadpsx.cpp" - THREADS_LINK="-lpthread-0.7" - ],[ - AC_CHECK_HEADER(sys/prctl.h, [ - UNIX_THREAD="gtk/threadsgi.cpp" - ]) - - dnl pthread_create is always available in pthread but it seems not to be - dnl the case for pthread_setcanceltype. - - AC_CHECK_LIB(pthread, pthread_setcanceltype, [ - UNIX_THREAD="gtk/threadpsx.cpp" - THREADS_LINK="-lpthread" - ]) - ]) - AC_CHECK_LIB(pthreads, pthread_setcanceltype, [ - UNIX_THREAD="gtk/threadpsx.cpp" - THREADS_LINK="-lpthreads" - ]) -fi - -if test -z "$UNIX_THREAD"; then - USE_THREADS=0 -fi - -AC_SUBST(UNIX_THREAD) -AC_SUBST(THREADS_LINK) -AC_DEFINE(USE_THREADS) - -dnl defines UNIX_THREAD it contains the source file to use for threads. (GL) -dnl defines THREADS_LINK it contains the thread library to link with. (GL) -dnl defines USE_THREADS if thread support is activated. (GL) - -dnl ---------------------------------------------------------------- -dnl search for opengl -dnl ---------------------------------------------------------------- - -OPENGL_INCLUDE= -OPENGL_LIBRARY= -OPENGL_LINK= - -if test "$USE_OPENGL" = 1; then - dnl checking OPENGL includes - AC_MSG_CHECKING(for OpenGL includes) - AC_PATH_FIND_INCLUDES($SEARCH_INCLUDE,GL/gl.h) - if test "$ac_find_includes" != "" ; then - OPENGL_INCLUDE="-I$ac_find_includes" - AC_MSG_RESULT(found $ac_find_includes) - dnl checking OPENGL libraries - AC_MSG_CHECKING(for OpenGL library) - AC_PATH_FIND_LIBRARIES($SEARCH_LIB,GL) - if test "$ac_find_libraries" != "" ; then - AC_INCLUDE_PATH_EXIST($ac_find_includes,$CHECK_INCLUDE) - AC_LINK_PATH_EXIST($ac_find_libraries,$CHECK_LIB) - CHECK_LINK="$CHECK_INCLUDE $ac_path_to_link" - CHECK_INCLUDE="$CHECK_INCLUDE $ac_path_to_include" - OPENGL_LIBRARY="$ac_path_to_link" - OPENGL_INCLUDE="$ac_path_to_include" - OPENGL_LINK="-lGL" - AC_MSG_RESULT(found OpenGL at $ac_find_libraries) - else - AC_PATH_FIND_LIBRARIES($SEARCH_LIB,MesaGL) - if test "$ac_find_libraries" != "" ; then - AC_INCLUDE_PATH_EXIST($ac_find_includes,$CHECK_INCLUDE) - AC_LINK_PATH_EXIST($ac_find_libraries,$CHECK_LIB) - CHECK_LINK="$CHECK_INCLUDE $ac_path_to_link" - CHECK_INCLUDE="$CHECK_INCLUDE $ac_path_to_include" - OPENGL_LIBRARY="$ac_path_to_link" - OPENGL_INCLUDE="$ac_path_to_include" - OPENGL_LINK="-lMesaGL" - AC_MSG_RESULT(found MESA at $ac_find_libraries) - else - AC_MSG_ERROR(no) - fi - fi - else - AC_MSG_ERROR(no) - fi -fi - -dnl ---------------------------------------------------------------- -dnl left-over -dnl ---------------------------------------------------------------- - -USE_GLX=$USE_OPENGL -if test "$USE_OPENGL" != 1; then - OPENGL_LIBRARIES= - OPENGL_INCLUDE= - OPENGL_LINK= - GLCANVAS=NONE -fi - -AC_DEFINE_UNQUOTED(USE_GLX,$USE_GLX) -AC_SUBST(OPENGL_INCLUDE) -AC_SUBST(OPENGL_LIBRARY) -AC_SUBST(OPENGL_LINK) -AC_SUBST(GLCANVAS) - -dnl ------------------------------------------------------------------------ -dnl compiler options for shared libs -dnl ------------------------------------------------------------------------ - -PICFLAGS= -CREATE_SHARED= -case "${canonical}" in - - *-hp-hpux* ) - if test "${CC}" != "gcc" ; then - CXXFLAGS="${CXXFLAGS} +a1 -z -Aa -D_HPUX_SOURCE" - CFLAGS="${CFLAGS} -z -D_HPUX_SOURCE" - PICFLAGS="+z" - else - PICFLAGS="-fPIC" - fi - LDFLAGS="-Wl,+s" - CREATE_SHARED=sharedHpux - ;; - - *-*-linux* ) - PICFLAGS=-fPIC - CREATE_SHARED=sharedLinux - ;; - - *-*-irix5* | *-*-irix6* ) - # PICFLAGS can remain empty, as pic is the default - LDFLAGS="-Wl,+s" - CREATE_SHARED=sharedIrix - AC_DEFINE(SVR4) - ;; - - *-*-solaris2* ) - if test "${CC}" != "gcc" ; then - PICFLAGS="-KPIC" - else - PICFLAGS="-fPIC" - fi - CREATE_SHARED=sharedSolaris2 - AC_DEFINE(SVR4) - ;; - - *-*-sunos4* ) - if test "${CC}" != "gcc" ; then - PICFLAGS="-PIC" - else - PICFLAGS="-fPIC" - fi - LDFLAGS="-Wl,+s" - CREATE_SHARED=sharedSunos4 - AC_DEFINE(BSD) - ;; - - *-*-freebsd* | *-*-netbsd*) - PICFLAGS=-fPIC - CREATE_SHARED=sharedBsd - AC_DEFINE(BSD) - ;; - - *-*-osf* ) - PICFLAGS="-fPIC" - CREATE_SHARED=sharedOSF - ;; - - *-*-dgux5* ) - if test "${CC}" != "gcc" ; then - PICFLAGS="-K PIC" - else - PICFLAGS="-fPIC" - fi - CREATE_SHARED=sharedDgux - AC_DEFINE(SVR4) - ;; - - *-*-sysv5* ) - if test "${CC}" != "gcc" ; then - PICFLAGS="-K PIC" - else - PICFLAGS="-fPIC" - fi - CREATE_SHARED=sharedSysV - AC_DEFINE(SVR4) - ;; - - *-*-aix* ) - if test "${CC}" != "gcc" ; then - PICFLAGS="-bM\:SRE" - else - PICFLAGS="-fPIC" - fi - CREATE_SHARED=sharedAIX - AC_DEFINE(SYSV) - ;; - - *) - CREATE_SHARED= - PICFLAGS= -esac - -if test "x$GCC" = xyes; then - CFLAGS="${CFLAGS} -Wall" -fi - -if test "x$GXX" = xyes; then - CXXFLAGS="${CXXFLAGS} -Wall" -fi - -if test "$USE_SHARED" != 1; then - CREATE_SHARED= - PICFLAGS= -fi - -AC_SUBST(OS) -AC_SUBST(PICFLAGS) -AC_SUBST(CREATE_SHARED) - -dnl ------------------------------------------------------------------------ -dnl finish and clean-up -dnl ------------------------------------------------------------------------ - -dnl add OS to list of configured -echo $OS >> system.list - -AC_CONFIG_HEADER(./include/wx/gtk/setup.h:./setup/setup.hin) -AC_OUTPUT(./setup/substit,./setup/general/createall) - -AC_OVERRIDES_DONE diff --git a/distrib/msw/docsrc.rsp b/distrib/msw/docsrc.rsp deleted file mode 100644 index 1c18faefe8..0000000000 --- a/distrib/msw/docsrc.rsp +++ /dev/null @@ -1,85 +0,0 @@ -docs/latex/wx/*.tex -docs/latex/wx/*.sty -docs/latex/wx/*.bib -docs/latex/wx/*.hpj -docs/latex/wx/*.ini -docs/latex/wx/*.txt -docs/latex/wx/*.cnt -docs/latex/wx/*.eps -docs/latex/wx/*.bmp -docs/latex/wx/*.gif -docs/latex/wx/*.wmf - -docs/latex/porting/*.tex -docs/latex/porting/*.sty -docs/latex/porting/*.bib -docs/latex/porting/*.hpj -docs/latex/porting/*.ini -docs/latex/porting/*.txt -docs/latex/porting/*.cnt -docs/latex/porting/*.eps -docs/latex/porting/*.gif -docs/latex/porting/*.bmp - -utils/wxhelp/docs/*.tex -utils/wxhelp/docs/*.txt -utils/wxhelp/docs/*.hpj -utils/wxhelp/docs/*.ini -utils/wxhelp/docs/*.bmp -utils/wxhelp/docs/*.wmf -utils/wxhelp/docs/*.gif - -utils/tex2rtf/docs/*.tex -utils/tex2rtf/docs/*.txt -utils/tex2rtf/docs/*.hpj -utils/tex2rtf/docs/*.bib -utils/tex2rtf/docs/*.ini -utils/tex2rtf/docs/*.sty -utils/tex2rtf/docs/*.bmp -utils/tex2rtf/docs/*.shg -utils/tex2rtf/docs/*.wmf -utils/tex2rtf/docs/*.gif - -utils/wxtree/docs/*.tex -utils/wxtree/docs/*.ini -utils/wxtree/docs/*.bib -utils/wxtree/docs/*.txt -utils/wxtree/docs/*.hpj -utils/wxtree/docs/*.bmp -utils/wxtree/docs/*.wmf -utils/wxtree/docs/*.gif - -utils/wxgraph/docs/*.tex -utils/wxgraph/docs/*.ini -utils/wxgraph/docs/*.bib -utils/wxgraph/docs/*.txt -utils/wxgraph/docs/*.hpj -utils/wxgraph/docs/*.bmp -utils/wxgraph/docs/*.wmf -utils/wxgraph/docs/*.gif - -utils/mfutils/docs/*.tex -utils/mfutils/docs/*.txt -utils/mfutils/docs/*.hpj -utils/mfutils/docs/*.wmf -utils/mfutils/docs/*.bmp - -utils/wxprop/docs/*.txt -utils/wxprop/docs/*.hpj -utils/wxprop/docs/*.tex -utils/wxprop/docs/*.ini -utils/wxprop/docs/*.eps -utils/wxprop/docs/*.bmp -utils/wxprop/docs/*.wmf -utils/wxprop/docs/*.gif - -utils/dialoged/docs/*.txt -utils/dialoged/docs/*.hpj -utils/dialoged/docs/*.tex -utils/dialoged/docs/*.ini -utils/dialoged/docs/*.eps -utils/dialoged/docs/*.bmp -utils/dialoged/docs/*.wmf -utils/dialoged/docs/*.gif - - diff --git a/distrib/msw/generic.rsp b/distrib/msw/generic.rsp deleted file mode 100644 index a1f1bba8d5..0000000000 --- a/distrib/msw/generic.rsp +++ /dev/null @@ -1,565 +0,0 @@ -distrib/*.* - -docs/readme.txt -docs/install.txt -docs/release.txt -docs/changes.txt -docs/upgrade.txt -docs/todo.txt -docs/licence.txt -docs/symbols.txt - -src/*.inc -src/mkdir - -src/common/*.cpp -src/common/dosyacc.c -src/common/doslex.c -src/common/vmsyacc.c -src/common/vmslex.c -src/common/extended.c -src/common/*.l -src/common/*.y -src/common/*.inc - -src/generic/*.cpp -src/generic/*.c -src/generic/*.inc - -src/png/*.c -src/png/*.h -src/png/makefile.* -src/png/INSTALL -src/png/CHANGES -src/png/README -src/png/TODO -src/png/*.1 -src/png/*.3 -src/png/*.5 -src/png/scripts/* - -src/zlib/*.c -src/zlib/*.h -src/zlib/INDEX -src/zlib/README -src/zlib/ChangeLog -src/zlib/configure -src/zlib/*.txt -src/zlib/makefile.* -src/zlib/*.com -src/zlib/*.3 -src/zlib/*.mms - -include/wx/*.h -include/wx/*.cpp -include/wx/wx_setup.vms -include/wx/common/*.h -include/wx/generic/*.h -lib/dummy - -bin/*.* - -tools/gettext/*.* - -bitmaps/xpm/16x16/*.* -bitmaps/xpm/32x32/*.* -bitmaps/xpm/64x64/*.* -bitmaps/xpm/misc/*.* -bitmaps/*.* -bitmaps/bmp/16x15/*.* -bitmaps/bmp/10x8/*.* -bitmaps/ico/32x32/*.* - -afm/*.* - -utils/*.txt -utils/make*.* - -utils/xpmshow/src/makefile.* -utils/xpmshow/src/*.cpp -utils/xpmshow/src/*.h -utils/xpmshow/src/*.def -utils/xpmshow/src/*.rc -utils/xpmshow/src/*.xpm -utils/xpmshow/src/*.bmp -utils/xpmshow/src/*.ico - -utils/wxhelp/src/*.cpp -utils/wxhelp/src/*.h -utils/wxhelp/src/makefile.* -utils/wxhelp/src/*.xbm -utils/wxhelp/src/*.xpm -utils/wxhelp/src/*.txt -utils/wxhelp/src/*.ico -utils/wxhelp/src/*.def -utils/wxhelp/src/*.rc - -utils/tex2rtf/src/wxwin/*.* -utils/tex2rtf/src/*.cpp -utils/tex2rtf/src/*.h -utils/tex2rtf/src/make*.* -utils/tex2rtf/src/*.xbm -utils/tex2rtf/src/*.xpm -utils/tex2rtf/src/*.sty -utils/tex2rtf/src/*.ini -utils/tex2rtf/src/*.inf -utils/tex2rtf/lib/dummy -utils/tex2rtf/src/*.bmp -utils/tex2rtf/src/*.ico -utils/tex2rtf/src/*.def -utils/tex2rtf/src/*.rc -utils/tex2rtf/tools/lacheck/*.* -utils/tex2rtf/tools/tcheck/*.awk -utils/tex2rtf/tools/tcheck/*.pl -utils/tex2rtf/tools/tcheck/*.bat - -utils/wxtree/src/*.cpp -utils/wxtree/src/*.h -utils/wxtree/src/makefile.* -utils/wxtree/src/*.xbm -utils/wxtree/src/*.xpm -utils/wxtree/lib/dummy -utils/wxtree/src/*.ico -utils/wxtree/src/*.def -utils/wxtree/src/*.rc - -utils/wxgraph/src/*.cpp -utils/wxgraph/src/*.c -utils/wxgraph/src/*.h -utils/wxgraph/src/makefile.* -utils/wxgraph/src/*.xbm -utils/wxgraph/src/*.xpm -utils/wxgraph/lib/dummy -utils/wxgraph/src/*.ico -utils/wxgraph/src/*.def -utils/wxgraph/src/*.rc - -utils/mfutils/src/*.cpp -utils/mfutils/src/*.h -utils/mfutils/src/*.rc -utils/mfutils/src/*.def -utils/mfutils/src/makefile.* -utils/mfutils/src/*.txt -utils/mfutils/lib/dummy -utils/mfutils/src/*.ico -utils/mfutils/src/*.def -utils/mfutils/src/*.bmp -utils/mfutils/src/*.ico - -utils/rcparser/src/*.cpp -utils/rcparser/src/*.c -utils/rcparser/src/*.h -utils/rcparser/src/makefile.* -utils/rcparser/src/*.xbm -utils/rcparser/src/*.xpm -utils/rcparser/lib/dummy -utils/rcparser/src/*.ico -utils/rcparser/src/*.def -utils/rcparser/src/*.rc -utils/rcparser/src/*.rh - -utils/colours/*.h -utils/colours/*.cpp -utils/colours/*.def -utils/colours/*.rc -utils/colours/makefile.* -utils/colours/*.xbm -utils/colours/*.xpm -utils/colours/*.txt - -utils/wxprop/src/*.h -utils/wxprop/src/*.cpp -utils/wxprop/src/*.def -utils/wxprop/src/*.rc -utils/wxprop/src/makefile.* -utils/wxprop/src/*.xbm -utils/wxprop/src/*.xpm -utils/wxprop/src/*.txt -utils/wxprop/src/*.ico -utils/wxprop/src/*.bmp -utils/wxprop/lib/dummy - -utils/dialoged/src/bitmaps/*.xbm -utils/dialoged/src/bitmaps/*.xpm -utils/dialoged/src/*.h -utils/dialoged/src/*.cpp -utils/dialoged/src/*.def -utils/dialoged/src/*.rc -utils/dialoged/src/makefile.* -utils/dialoged/src/*.xbm -utils/dialoged/src/*.xpm -utils/dialoged/src/*.txt -utils/dialoged/src/*.inf -utils/dialoged/test/*.h -utils/dialoged/src/*.ico -utils/dialoged/src/*.prj -utils/dialoged/src/*.bmp -utils/dialoged/src/bitmaps/*.bmp -utils/dialoged/src/bitmaps/*.ico -utils/dialoged/test/*.cpp -utils/dialoged/test/*.def -utils/dialoged/test/*.rc -utils/dialoged/test/makefile.* -utils/dialoged/lib/dummy -utils/dialoged/test/*.ico -utils/dialoged/test/*.prj -utils/dialoged/test/*.bmp - -samples/*.txt -samples/makefile.* - -samples/config/*.cpp -samples/config/*.h -samples/config/*.def -samples/config/makefile*.* -samples/config/*.xbm -samples/config/*.xpm -samples/config/*.txt -samples/config/*.ico -samples/config/*.bmp -samples/config/*.rc -samples/config/*.wav - -samples/dynamic/*.cpp -samples/dynamic/*.h -samples/dynamic/*.def -samples/dynamic/makefile*.* -samples/dynamic/*.xbm -samples/dynamic/*.xpm -samples/dynamic/*.txt -samples/dynamic/*.ico -samples/dynamic/*.bmp -samples/dynamic/*.rc -samples/dynamic/*.wav - -samples/bombs/*.cpp -samples/bombs/*.h -samples/bombs/*.def -samples/bombs/makefile*.* -samples/bombs/*.xbm -samples/bombs/*.xpm -samples/bombs/*.txt -samples/bombs/*.ico -samples/bombs/*.bmp -samples/bombs/*.rc - -samples/ipc/*.cpp -samples/ipc/*.h -samples/ipc/*.def -samples/ipc/makefile*.* -samples/ipc/*.xbm -samples/ipc/*.xpm -samples/ipc/*.ico -samples/ipc/*.rc - -samples/types/*.cpp -samples/types/*.h -samples/types/*.def -samples/types/*.rc -samples/types/*.txt -samples/types/makefile*.* -samples/types/*.xbm -samples/types/*.xpm -samples/types/*.ico - -samples/resource/*.cpp -samples/resource/*.h -samples/resource/*.def -samples/resource/*.rc -samples/resource/*.txt -samples/resource/*.wxr -samples/resource/makefile*.* -samples/resource/*.xbm -samples/resource/*.xpm -samples/resource/*.ico - -samples/animate/*.cpp -samples/animate/*.h -samples/animate/*.def -samples/animate/makefile*.* -samples/animate/*.xbm -samples/animate/*.xpm -samples/animate/*.ico -samples/animate/*.rc - -samples/mdi/*.cpp -samples/mdi/*.h -samples/mdi/*.def -samples/mdi/makefile*.* -samples/mdi/*.xbm -samples/mdi/*.xpm -samples/mdi/*.ico -samples/mdi/*.rc -samples/mdi/bitmaps/*.bmp -samples/mdi/bitmaps/*.ico - -samples/minimal/*.cpp -samples/minimal/*.h -samples/minimal/*.def -samples/minimal/makefile*.* -samples/minimal/*.xbm -samples/minimal/*.xpm -samples/minimal/*.ico -samples/minimal/*.rc - -samples/controls/*.cpp -samples/controls/*.h -samples/controls/*.def -samples/controls/makefile*.* -samples/controls/*.xbm -samples/controls/*.xpm -samples/controls/*.ico -samples/controls/*.bmp -samples/controls/*.rc - -samples/fractal/*.cpp -samples/fractal/*.h -samples/fractal/*.def -samples/fractal/makefile*.* -samples/fractal/*.xbm -samples/fractal/*.xpm -samples/fractal/*.ico -samples/fractal/*.rc - -samples/layout/*.cpp -samples/layout/*.h -samples/layout/*.def -samples/layout/makefile*.* -samples/layout/*.xbm -samples/layout/*.xpm -samples/layout/*.ico -samples/layout/*.rc -samples/layout/*.bmp - -samples/printing/*.cpp -samples/printing/*.h -samples/printing/*.def -samples/printing/makefile*.* -samples/printing/*.xbm -samples/printing/*.xpm -samples/printing/*.txt -samples/printing/*.ico -samples/printing/*.bmp -samples/printing/*.rc -samples/printing/*.afm - -samples/toolbar/*.cpp -samples/toolbar/*.h -samples/toolbar/*.def -samples/toolbar/makefile*.* -samples/toolbar/*.txt -samples/toolbar/*.xbm -samples/toolbar/*.xpm -samples/toolbar/bitmaps/*.xbm -samples/toolbar/bitmaps/*.xpm -samples/toolbar/*.ico -samples/toolbar/*.bmp -samples/toolbar/*.rc -samples/toolbar/bitmaps/*.bmp - -samples/docview/*.h -samples/docview/*.cpp -samples/docview/*.def -samples/docview/*.rc -samples/docview/makefile*.* -samples/docview/*.xbm -samples/docview/*.xpm -samples/docview/*.txt -samples/docview/*.ico -samples/docview/*.bmp - -samples/memcheck/*.h -samples/memcheck/*.cpp -samples/memcheck/*.def -samples/memcheck/*.rc -samples/memcheck/makefile*.* -samples/memcheck/*.xbm -samples/memcheck/*.xpm -samples/memcheck/*.txt -samples/memcheck/*.ico -samples/memcheck/*.bmp - -samples/odbc/*.h -samples/odbc/*.cpp -samples/odbc/*.def -samples/odbc/*.rc -samples/odbc/makefile*.* -samples/odbc/*.inf -samples/odbc/*.xbm -samples/odbc/*.xpm -samples/odbc/*.ico -samples/odbc/*.bmp -samples/odbc/*.dbf -samples/odbc/*.cdx - -samples/dialogs/*.h -samples/dialogs/*.cpp -samples/dialogs/*.def -samples/dialogs/*.rc -samples/dialogs/makefile*.* -samples/dialogs/*.xbm -samples/dialogs/*.xpm -samples/dialogs/*.txt -samples/dialogs/*.bmp -samples/dialogs/*.ico - -samples/wxpoem/*.cpp -samples/wxpoem/*.h -samples/wxpoem/*.def -samples/wxpoem/*.rc -samples/wxpoem/*.inf -samples/wxpoem/*.txt -samples/wxpoem/makefile*.* -samples/wxpoem/*.xbm -samples/wxpoem/*.xpm -samples/wxpoem/*.ico -samples/wxpoem/*.bmp -samples/wxpoem/*.dat - -samples/pressup/*.cpp -samples/pressup/*.c -samples/pressup/*.h -samples/pressup/*.def -samples/pressup/*.rc -samples/pressup/*.inf -samples/pressup/*.txt -samples/pressup/makefile*.* -samples/pressup/*.xbm -samples/pressup/*.xpm -samples/pressup/*.ico -samples/pressup/*.bmp - -samples/validate/*.cpp -samples/validate/*.h -samples/validate/*.def -samples/validate/*.rc -samples/validate/*.inf -samples/validate/*.txt -samples/validate/makefile*.* -samples/validate/*.xbm -samples/validate/*.xpm -samples/validate/*.ico -samples/validate/*.bmp - -samples/events/*.cpp -samples/events/*.h -samples/events/*.def -samples/events/*.rc -samples/events/*.inf -samples/events/*.txt -samples/events/makefile*.* -samples/events/*.xbm -samples/events/*.xpm -samples/events/*.ico -samples/events/*.bmp - -samples/treectrl/*.cpp -samples/treectrl/*.h -samples/treectrl/*.def -samples/treectrl/*.rc -samples/treectrl/*.txt -samples/treectrl/makefile*.* -samples/treectrl/*.xbm -samples/treectrl/*.xpm -samples/treectrl/bitmaps/*.xbm -samples/treectrl/bitmaps/*.xpm -samples/treectrl/*.ico -samples/treectrl/*.bmp -samples/treectrl/bitmaps/*.bmp -samples/treectrl/bitmaps/*.ico - -samples/listctrl/*.cpp -samples/listctrl/*.h -samples/listctrl/*.def -samples/listctrl/*.rc -samples/listctrl/*.txt -samples/listctrl/makefile*.* -samples/listctrl/*.xbm -samples/listctrl/*.xpm -samples/listctrl/bitmaps/*.xbm -samples/listctrl/bitmaps/*.xpm -samples/listctrl/*.ico -samples/listctrl/*.bmp -samples/listctrl/bitmaps/*.bmp -samples/listctrl/bitmaps/*.ico - -samples/splitter/*.cpp -samples/splitter/*.h -samples/splitter/*.def -samples/splitter/*.rc -samples/splitter/*.txt -samples/splitter/makefile*.* -samples/splitter/*.xbm -samples/splitter/*.xpm -samples/splitter/*.ico -samples/splitter/*.bmp - -samples/grid/*.cpp -samples/grid/*.h -samples/grid/*.def -samples/grid/*.rc -samples/grid/*.txt -samples/grid/makefile*.* -samples/grid/*.xbm -samples/grid/*.xpm -samples/grid/*.ico -samples/grid/*.bmp - -samples/internat/*.cpp -samples/internat/*.h -samples/internat/*.def -samples/internat/*.rc -samples/internat/*.txt -samples/internat/makefile*.* -samples/internat/*.xbm -samples/internat/*.xpm -samples/internat/*.po -samples/internat/*.ico -samples/internat/*.bmp -samples/internat/*.mo - -samples/checklst/*.cpp -samples/checklst/*.h -samples/checklst/*.def -samples/checklst/*.rc -samples/checklst/*.txt -samples/checklst/makefile*.* -samples/checklst/*.xbm -samples/checklst/*.xpm -samples/checklst/*.ico -samples/checklst/*.bmp - -samples/dnd/*.cpp -samples/dnd/*.h -samples/dnd/makefile*.* -samples/dnd/*.rc -samples/dnd/*.def -samples/dnd/*.bmp -samples/dnd/*.xbm -samples/dnd/*.xpm -samples/dnd/*.ico -samples/dnd/*.txt - -samples/tab/*.cpp -samples/tab/*.h -samples/tab/makefile*.* -samples/tab/*.rc -samples/tab/*.def -samples/tab/*.bmp -samples/tab/*.xbm -samples/tab/*.xpm -samples/tab/*.ico -samples/tab/*.txt - -samples/png/*.cpp -samples/png/*.h -samples/png/makefile*.* -samples/png/*.rc -samples/png/*.def -samples/png/*.bmp -samples/png/*.xpm -samples/png/*.xbm -samples/png/*.ico -samples/png/*.txt -samples/png/*.png - diff --git a/distrib/msw/gtk.rsp b/distrib/msw/gtk.rsp deleted file mode 100644 index f5814f55a5..0000000000 --- a/distrib/msw/gtk.rsp +++ /dev/null @@ -1,69 +0,0 @@ -install-sh -Makefile -template.mak -TODO.txt - -docs/gtk/*.html - -src/mkdirs -src/Makefile -src/Makefile.in -src/*.inc - -src/gtk/*.cpp -src/gtk/*.c -src/gtk/*.inc -src/gtk/*.xbm - -src/gtk/setup/*.hin -src/gtk/setup/*.in -src/gtk/setup/rules/* -src/gtk/setup/rules/generic/* -src/gtk/setup/rules/linux/* - -src/gdk_imlib/*.c -src/gdk_imlib/*.h -src/gdk_imlib/AUTHORS -src/gdk_imlib/AUDIT -src/gdk_imlib/COPYING.LIB -src/gdk_imlib/README -src/gdk_imlib/ChangeLog - -src/iodbc/*.c -src/iodbc/*.ci -src/iodbc/*.h -src/iodbc/IAFA-PACKAGE -src/iodbc/README -src/iodbc/*.exp -src/iodbc/*.mk -src/iodbc/autoconfig -src/iodbc/build -src/iodbc/Changes.log -src/iodbc/postgres/*.h - -install/gtk/* - -misc/afm/* -misc/gs_afm/* -misc/imlib/* - -user/Makefile - -user/wxConvert/*.cpp -user/wxConvert/*.h -user/wxConvert/Makefile -user/wxConvert/Makefile.in - -user/wxFile/*.cpp -user/wxFile/*.h -user/wxFile/Makefile -user/wxFile/Makefile.in -user/wxFile/*.xpm - -user/wxTest/*.cpp -user/wxTest/*.h -user/wxTest/Makefile -user/wxTest/Makefile.in -user/wxTest/*.xpm -user/wxTest/*.png - diff --git a/distrib/msw/msw.rsp b/distrib/msw/msw.rsp deleted file mode 100644 index 708382c8f7..0000000000 --- a/distrib/msw/msw.rsp +++ /dev/null @@ -1,130 +0,0 @@ -docs/msw/*.txt -docs/licence.txt - -src/makeb32.env -src/makebcc.env -src/makemsw.env -src/makewat.env -src/makesc.env -src/makeg95.env -src/makem95.env -src/ntwxwin.mak -src/makefile.bcc -src/makefile.dos -src/makefile.nt -src/*.bat - -src/common/dosyacc.c -src/common/doslex.c - -src/msw/*.cpp -src/msw/*.h -src/msw/makefile.* -src/msw/*.lst -src/msw/*.def -src/msw/*.inc - -src/msw/ctl3d/*.* -src/msw/ctl3d/msvc/*.* -src/msw/ctl3d/wat32/*.* -src/msw/ctl3d/wat386/*.* -src/msw/ctl3d/borland/*.* -src/msw/ole/*.cpp -src/msw/*.prj - -include/wx/msw/*.h -include/wx/msw/*.rc -include/wx/msw/ctl3d/*.h -include/wx/msw/gnuwin32/*.h -include/wx/msw/ole/*.h -include/wx/msw/*.cur -include/wx/msw/*.ico -include/wx/msw/*.bmp - -lib/dummy - -samples/ownerdrw/*.cpp -samples/ownerdrw/*.h -samples/ownerdrw/makefile.* -samples/ownerdrw/*.rc -samples/ownerdrw/*.def -samples/ownerdrw/*.bmp -samples/ownerdrw/*.ico -samples/ownerdrw/*.txt - -samples/taskbar/*.cpp -samples/taskbar/*.h -samples/taskbar/makefile.* -samples/taskbar/*.rc -samples/taskbar/*.def -samples/taskbar/*.bmp -samples/taskbar/*.ico -samples/taskbar/*.txt - -samples/regtest/*.cpp -samples/regtest/*.h -samples/regtest/makefile.* -samples/regtest/*.rc -samples/regtest/*.def -samples/regtest/*.bmp -samples/regtest/*.ico -samples/regtest/*.txt - -samples/nativdlg/*.cpp -samples/nativdlg/*.h -samples/nativdlg/*.def -samples/nativdlg/*.rc -samples/nativdlg/*.txt -samples/nativdlg/makefile.* -samples/nativdlg/*.xbm -samples/nativdlg/*.ico -samples/nativdlg/*.bmp - -samples/mfc/*.h -samples/mfc/*.cpp -samples/mfc/*.def -samples/mfc/*.rc -samples/mfc/makefile.* -samples/mfc/*.txt -samples/mfc/*.bmp -samples/mfc/*.ico - -samples/joytest/*.h -samples/joytest/*.cpp -samples/joytest/*.def -samples/joytest/*.rc -samples/joytest/makefile.* -samples/joytest/*.txt -samples/joytest/*.bmp -samples/joytest/*.wav -samples/joytest/*.ico - -utils/nplugin/make*.* -utils/nplugin/src/*.cpp -utils/nplugin/src/*.h -utils/nplugin/src/*.rc -utils/nplugin/src/*.def -utils/nplugin/src/makefile.* -utils/nplugin/src/*.txt -utils/nplugin/samples/simple/*.cpp -utils/nplugin/samples/simple/*.h -utils/nplugin/samples/simple/*.rc -utils/nplugin/samples/simple/*.def -utils/nplugin/samples/simple/makefile.* -utils/nplugin/samples/simple/*.txt -utils/nplugin/samples/gui/*.cpp -utils/nplugin/samples/gui/*.h -utils/nplugin/samples/gui/*.rc -utils/nplugin/samples/gui/*.def -utils/nplugin/samples/gui/makefile.* -utils/nplugin/samples/gui/*.txt -utils/nplugin/docs/*.tex -utils/nplugin/docs/*.txt -utils/nplugin/docs/*.hpj -utils/nplugin/docs/*.eps -utils/nplugin/docs/*.ps -utils/nplugin/docs/*.ini -utils/nplugin/docs/*.cnt -utils/nplugin/docs/*.hlp -utils/nplugin/lib/dummy - diff --git a/distrib/msw/tardist.bat b/distrib/msw/tardist.bat deleted file mode 100755 index 91ce1fdf16..0000000000 --- a/distrib/msw/tardist.bat +++ /dev/null @@ -1,117 +0,0 @@ -@echo off -rem Tar up an external distribution of wxWindows 2.0: but -rem putting in separate ASCII and binary files -rem This seems to be the one that works, using -rem separate tar programs for conversion/non-conversion -rem of ASCII/binary files. - -if "%1" == "" goto usage -if "%2" == "" goto usage -echo About to archive an external wxWindows 2.0 distribution: -echo From %1 -echo To %2\wx200_1.tgz, %2\wx200_2.tgz, %2\wx200hlp.tgz, %2\wx200ps.tgz, %2\wx200htm.tgz -echo CTRL-C if this is not correct. -inkey /W4 `Press any key to continue...` %%input - -erase %2\*.tgz -cd %1 - -rem First, expand the wildcards in the rsp files - -rem Create empty list file -erase %1\distrib\*.lis -c:\bin\touch %1\distrib\wx200asc.lis -c:\bin\touch %1\distrib\wx200bin.lis -c:\bin\touch %1\distrib\wx200hlp.lis -c:\bin\touch %1\distrib\wx200ps.lis -c:\bin\touch %1\distrib\wx200xlp.lis - -rem Create a .rsp file with backslashes instead -rem of forward slashes -rem No need if using ls2 (from UNIX95 distribution) -rem sed -e "s/\//\\/g" %1\distrib\wx_asc.rsp > %1\distrib\wx_asc.rs2 - -call %1\distrib\expdwild.bat %1\distrib\wx_asc.rsp %1\distrib\wx200asc.lis -call %1\distrib\expdwild.bat %1\distrib\util_asc.rsp %1\distrib\wx200asc.lis -call %1\distrib\expdwild.bat %1\distrib\smpl_asc.rsp %1\distrib\wx200asc.lis -rem call %1\distrib\expdwild.bat %1\distrib\wxim1asc.rsp %1\distrib\wx200asc.lis -rem call %1\distrib\expdwild.bat %1\distrib\wxim2asc.rsp %1\distrib\wx200asc.lis - -call %1\distrib\expdwild.bat %1\distrib\wx_bin.rsp %1\distrib\wx200bin.lis -call %1\distrib\expdwild.bat %1\distrib\util_bin.rsp %1\distrib\wx200bin.lis -call %1\distrib\expdwild.bat %1\distrib\smpl_bin.rsp %1\distrib\wx200bin.lis -rem call %1\distrib\expdwild.bat %1\distrib\wxim1bin.rsp %1\distrib\wx200bin.lis - -rem Docs -call %1\distrib\expdwild.bat %1\distrib\wx_hlp.rsp %1\distrib\wx200hlp.lis -call %1\distrib\expdwild.bat %1\distrib\wx_ps.rsp %1\distrib\wx200ps.lis -call %1\distrib\expdwild.bat %1\distrib\wx_html.rsp %1\distrib\wx200htm.lis -call %1\distrib\expdwild.bat %1\distrib\wx_pdf.rsp %1\distrib\wx200pdf.lis - -rem Do some further massaging of the .lis files -sed -e "s/\\/\//g" %1\distrib\wx200asc.lis > c:\temp\temp.tmp -sed -e "s/D:\/wx\///g" c:\temp\temp.tmp > %1\distrib\wx200asc.lis - -sed -e "s/\\/\//g" %1\distrib\wx200bin.lis > c:\temp\temp.tmp -sed -e "s/D:\/wx\///g" c:\temp\temp.tmp > %1\distrib\wx200bin.lis - -sed -e "s/\\/\//g" %1\distrib\wx200hlp.lis > c:\temp\temp.tmp -sed -e "s/D:\/wx\///g" c:\temp\temp.tmp > %1\distrib\wx200hlp.lis - -sed -e "s/\\/\//g" %1\distrib\wx200ps.lis > c:\temp\temp.tmp -sed -e "s/D:\/wx\///g" c:\temp\temp.tmp > %1\distrib\wx200ps.lis - -sed -e "s/\\/\//g" %1\distrib\wx200htm.lis > c:\temp\temp.tmp -sed -e "s/D:\/wx\///g" c:\temp\temp.tmp > %1\distrib\wx200htm.lis - -sed -e "s/\\/\//g" %1\distrib\wx200pdf.lis > c:\temp\temp.tmp -sed -e "s/D:\/wx\///g" c:\temp\temp.tmp > %1\distrib\wx200pdf.lis - -rem 'tar' converts linefeeds. -tar -c -T %1\distrib\wx200asc.lis -f %2\wx200.tar -rem pause Press a key to continue. - -rem This converts to lower case -ren %2\wx200.tar %2\wx200_1.tar -gzip32 %2\wx200_1.tar -ren %2\wx200_1.tar.gz %2\wx200_1.tgz - -rem No linefeed conversion wanted -rem Note: GNU tar seems to crash with a full destination path, so -rem pander to it. -targnu -c -T %1\distrib\wx200bin.lis -f wx200_2.tar -move wx200_2.tar %2 -gzip32 %2\wx200_2.tar -ren %2\wx200_2.tar.gz %2\wx200_2.tgz - -targnu -c -T %1\distrib\wx200hlp.lis -f wx200_hlp.tar -move wx200_hlp.tar %2 -gzip32 %2\wx200_hlp.tar -ren %2\wx200_hlp.tar.gz %2\wx200hlp.tgz - -tar -c -T %1\distrib\wx200ps.lis -f %2\wx200ps.tar -gzip32 %2\wx200ps.tar -ren %2\wx200ps.tar.gz %2\wx200ps.tgz - -targnu -c -T %1\distrib\wx200htm.lis -f wx200htm.tar -move wx200htm.tar %2 -gzip32 %2\wx200htm.tar -ren %2\wx200htm.tar.gz %2\wx200htm.tgz - -targnu -c -T %1\distrib\wx200pdf.lis -f wx200pdf.tar -move wx200pdf.tar %2 -gzip32 %2\wx200pdf.tar -ren %2\wx200pdf.tar.gz %2\wx200pdf.tgz - -cd %2 -echo wxWindows archived. -goto end - -:usage -echo Tar/gzip wxWindows distribution under DOS, making an ASCII and binary file -echo Usage: tardist source destination -echo e.g. tardist d:\wx d:\wx\deliver - -:end - - diff --git a/distrib/msw/wx_hlp.rsp b/distrib/msw/wx_hlp.rsp deleted file mode 100644 index 1a72b4735b..0000000000 --- a/distrib/msw/wx_hlp.rsp +++ /dev/null @@ -1,2 +0,0 @@ -docs/winhelp/*.hlp -docs/winhelp/*.cnt diff --git a/distrib/msw/wx_html.rsp b/distrib/msw/wx_html.rsp deleted file mode 100644 index 8324d3a231..0000000000 --- a/distrib/msw/wx_html.rsp +++ /dev/null @@ -1,38 +0,0 @@ -docs/html/*.htm -docs/html/*.gif - -docs/html/wx/*.htm -docs/html/wx/*.gif -docs/html/porting/*.htm -docs/html/porting/*.gif -docs/html/faq/*.htm -docs/html/faq/*.gif -docs/html/techref/*.htm -docs/html/techref/*.gif -docs/html/prologio/*.htm -docs/html/prologio/*.gif -docs/html/dialoged/*.htm -docs/html/dialoged/*.gif -docs/html/wxbuild/*.htm -docs/html/wxbuild/*.gif -docs/html/wxtab/*.htm -docs/html/wxtab/*.gif -docs/html/wxchart/*.htm -docs/html/wxchart/*.gif -docs/html/wxtree/*.htm -docs/html/wxtree/*.gif -docs/html/wxgraph/*.htm -docs/html/wxgraph/*.gif -docs/html/wxgrid/*.htm -docs/html/wxgrid/*.gif -docs/html/wxhelp/*.htm -docs/html/wxhelp/*.gif -docs/html/wxhelp2/*.htm -docs/html/wxhelp2/*.gif -docs/html/wxprop/*.htm -docs/html/wxprop/*.gif -docs/html/winstall/*.htm -docs/html/winstall/*.gif -docs/html/tex2rtf/*.htm -docs/html/tex2rtf/*.gif - diff --git a/distrib/msw/wx_pdf.rsp b/distrib/msw/wx_pdf.rsp deleted file mode 100644 index 6a979c3678..0000000000 --- a/distrib/msw/wx_pdf.rsp +++ /dev/null @@ -1 +0,0 @@ -docs/pdf/*.pdf diff --git a/distrib/msw/zipdist.bat b/distrib/msw/zipdist.bat deleted file mode 100755 index fa765e1b4a..0000000000 --- a/distrib/msw/zipdist.bat +++ /dev/null @@ -1,36 +0,0 @@ -@echo off -rem Zip up an external, generic + Windows distribution of wxWindows 2.0 -set src=d:\wx2\wxWindows -set dest=%src\deliver -if "%src" == "" goto usage -if "%dest" == "" goto usage -echo About to archive an external wxWindows distribution: -echo From %src -echo To %dest\wx200gen.zip, %dest\wx200doc.zip, %dest\wx200msw.zip, %dest\wx200ps.zip, %dest\wx200hlp.zip, %dest\wx200htm.zip, %dest\wx200pdf.zip -echo CTRL-C if this is not correct. -pause - -erase %dest\wx200*.zip - -cd %src -echo Zipping... -zip32 -@ %dest\wx200gen.zip < %src\distrib\msw\generic.rsp -zip32 -@ %dest\wx200msw.zip < %src\distrib\msw\msw.rsp -zip32 -@ %dest\wx200gtk.zip < %src\distrib\msw\gtk.rsp -zip32 -@ %dest\wx200doc.zip < %src\distrib\msw\docsrc.rsp - -zip32 -@ %dest\wx200hlp.zip < %src\distrib\msw\wx_hlp.rsp -zip32 -@ %dest\wx200htm.zip < %src\distrib\msw\wx_html.rsp -zip32 -@ %dest\wx200pdf.zip < %src\distrib\msw\wx_pdf.rsp - -cd %dest - -echo wxWindows archived. -goto end - -:usage -echo DOS wxWindows distribution. -echo Usage: zipdist source destination -echo e.g. zipdist d:\wx2\wxWindows d:\wx2\wxWindows\deliver - -:end diff --git a/docs/changes.txt b/docs/changes.txt deleted file mode 100644 index e46bf66304..0000000000 --- a/docs/changes.txt +++ /dev/null @@ -1,232 +0,0 @@ -Generic wxWindows 2.0 Change Log --------------------------------- - -Note: for platform-specific changes, see wx/docs/XXX/changes.txt -where XXX is one of msw, motif, xt, gtk, mac. - -Alpha 11, July 3rd 1998 ------------------------ - -- Major work on Dialog Editor (still plenty to go). -- Expanded documentation a bit more. - -Alpha 9, April 27th 1998 ------------------------- - -- Corrected some bugs, such as the wxModule compilation problem. -- Added Gnu-Win32 b19/Mingw32 support by changing resource - compilation and pragmas. -- Changed SIZEOF to WXSIZEOF. - -Alpha 8, April 17th 1998 ------------------------- - -- Added src/other/png, src/other/zlib directories. -- Added samples/png. -- IMPORTANT: Changed 'no id' number from 0 to -1, in wxEVT_ macros. - Porters, please check particularly your wxTreeCtrl and wxListCtrl - header files. -- Added modules.h/cpp, config.cpp, fileconf.cpp, textfile.cpp/h. - -Alpha 7, March 30th 1998 ------------------------- - -- Added tab classes, tab sample. -- Revised memory.cpp, memory.h slightly; memory.h now #defines - new to WXDEBUG_NEW in DEBUG mode. Windows implementation app.cpp - now checks for leaks on exit. Added memcheck sample. - See src/msw/issues.txt for more details. -- resource.h, resource.cpp changed to make wxDefaultResourceTable - a pointer. Now initialize resource system with - wxInitializeResourceSystem and wxCleanUpResourceSystem, to - allow better control of memory. -- wxString now derives from wxObject, to enable memory leak - checking. -- Added some #include fixes in various files, plus changed - float to long in wxToolBar files. - -Alpha 6, March 10th 1998 ------------------------- - -- Added Vadim's dynarray.h, dynarray.cpp. -- Added Vadim's menuitem.cpp. -- Added Windows-specific wxCheckListBox, - owner-draw wxListBox, and drag-and-drop - (see docs/msw/changes.txt). - -Alpha 5, 14th February 1998 --------------------------- - -- GENERIC AND MSW-SPECIFIC CODE NOW TREATED AS TWO SEPARATE - DISTRIBUTIONS. This change log will therefore now refer to - the generic code only. See docs/msw/changes.txt for Windows-specific - changes. -- Readmes, change logs and installation files now go in - platform-specific directories under docs, e.g. docs/msw, - docs/gtk. -- Added DECLARE_APP and IMPLEMENT_APP macros so wxApp object gets - created dynamically, not as a global object. -- Put wxColour into wx/msw/colour.h, src/msw/colour.cpp. -- Changed names of some include/wx/generic headers to be - consistent and to conform to gcc pragma conventions. Also - changed choicesg.cpp to choicdgg.cpp. -- Added gcc pragmas. -- Added gtk inclusion in include/wx headers. -- Added consistent file headings to source and headers. -- Removed lang.cpp, lang.h and references to wxSTR_... variables; - added a few references to wxTransString. -- Added operator to wxTransString that converts automatically - to wxString, so we can say e.g. wxMessageBox(wxTransString("Hello"), ...). -- samples/internat now works (minimally). -- Added wxMouseEvent::GetPosition and - wxMouseEvent::GetLogicalPosition, both returning wxPoints. -- Made wxSize and wxRect contain longs not ints. -- Cured some lemory leaks (thanks Vadim). -- Tidied up OnIdle and introduced RequestMore/MoreRequested so - will only keep processing OnIdle if it returns TRUE from - MoreRequested. - -Alpha 4, 31st January 1998 --------------------------- - -- Changed wxDC functions to take longs instead of floats. GetSize now takes - integer pointers, plus a version that returns a wxSize. -- const keyword added to various wxDC functions. -- Under Windows, wxDC no longer has any knowledge of whether - an associated window is scrolled or not. Instead, the device - origin is set by wxScrolledWindow in wxScrolledWindow::PrepareDC. -- wxScrolledWindow applications can optionally override the virtual OnDraw - function instead of using the OnPaint event handler. The wxDC passed to - OnDraw will be translated by PrepareDC to reflect scrolling. - When drawing outside of OnDraw, must call PrepareDC explicitly. -- wxToolBarBase/wxToolBarSimple similarly changed to allow for - scrolling toolbars. -- Integrated wxPostScriptDC patches for 1.xx by Chris Breeze, - to help printing with multiple pages. -- IPC classes given base classes (wxConnectionBase etc.) which - define the API used by different implementations. DDE - implementation updated to use these base classes. -- wxHelpInstance now separated into wxHelpControllerBase (base - for all implementations), wxWinHelpController (uses standard - WinHelp), wxXLPHelPController (talks to wxHelp by DDE or - TCP/IP). There will be others eventually, such as - wxHTMLHelpController for Microsoft (and Netscape?) HTML Help. -- Added Vadim Zeitlin's wxString class plus - internationalization code (gettext simulation, wxLocale, etc.). - New files from Vadim: - include\wx\string.h - include\wx\debug.h - include\wx\file.h - include\wx\log.h - include\wx\intl.h - src\common\string.cpp - src\common\log.cpp - src\common\intl.cpp - src\common\file.cpp - No longer use GNU wxString files. -- Split off file-related functions into include\wx\filefn.h and - src\common\filefn.cpp. -- Borland C++ support (WIN32) for main library and - samples, using makefile.b32 files. -- Preparation done for allowing BC++ to compile wxWin as a DLL, - including changes to defs.h. -- wxIntPoint removed, wxPoint is now int, and wxRealPoint - introduced. -- Added wxShowEvent (generated when window is being shown or - hidden). -- Got minimal, docview, mdi samples working for 16-bit VC++ and - cured 16-bit problem with wxTextCtrl (removed global memory - trick). -- Updated GnuWin32 makefiles, checked minimal, mdi, docview samples. - -Alpha 3, September 1997 ------------------------ - -- wxListCtrl, wxTreeCtrl, wxImageList classes done. -- Instigated new file hierarchy, split files and classes up more logically. -- PrologIO and some other utils now put into core library. -- Revamped print/preview classes, added wxPageSetupDialog. -- Started documentation. - -Alpha 2, 30th April 1997 ------------------------- - -- EVT_... macros now have at least one argument, for conformance - with MetroWerks compiler. -- Added ids to .wxr file format. -- Got Dialog Editor compiled and running again but need - to extend functionality to be in line with new controls. - Added dialoged\test app to allow dynamic loading of .wxr files - for testing purposes. -- Rewrote wxBitmap to allow installable file type - handlers. -- Rewrote wxBitmapButton, wxStaticBitmap to not use Fafa. -- Wrote most of wxTreeCtrl and sample (need wxImageList to implement it - fully). -- Added back wxRadioBox. -- Tidied up wx_main.cpp, wxApp class, putting PenWin code in - a separate file. - -Alpha 1, 5th April 1997 ------------------------ - -At this point, the following has been achieved: - -- A lot, but not all, of the code has been revamped for better - naming conventions, protection of data members, and use of - wxString instead of char *. -- Obsolete functionality deleted (e.g. default wxPanel layout, - old system event system) and code size reduced. -- Class hierarchy changed (see design doc) - base classes such - as wxbWindow now removed. -- No longer includes windows.h in wxWin headers, by using stand-in - Windows types where needed e.g. WXHWND. -- PrologIO revised. -- wxScrolledWindow, wxStatusBar and new MDI classes added. - MDI is now achived using separate classes, not window styles. -- wxSystemSettings added, and made use of to reflect standard - Windows settings. -- SetButtonFont/SetLabelFont replaced by SetFont; font and colour - settings mucho rationalised. -- All windows are now subclassed with the same window proc to make - event handling far more consistent. Old internal wxWnd and derived - classes removed. -- API for controls revised, in particular addition of - wxValidator parameters and removal of labels for some controls. -- 1 validator written: see examples/validate. -- Event table system introduced (see most samples and - wx_event.cpp/ProcessEvent, wx_event.h). wxEvtHandler - made more flexible, with Push/PopEventHandler allowing a chain - of event handlers. -- wxRadioBox removed - will be added back soon. -- Toolbar class hierarchy revised: - wxToolBarBase - wxToolBarSimple (= old wxToolBar) - wxToolBar95 (= old wxButtonBar under Win95 - wxToolBarMSW (= old wxButtonBar under WIN16/WIN32) -- Constraint system debugged somewhat (sizers now work properly). -- wxFileDialog, wxDirDialog added; other common dialogs now - have class equivalents. Generic colour and font dialogs - rewritten to not need obsolete panel layout. -- .wxr resource system partially reinstated, though needs - an integer ID for controls. Hopefully the resource system - will be replaced by something better and more efficient - in the future. -- Device contexts no longer stored with window and accessed - with GetDC - use wxClientDC, wxPaintDC, wxWindowDC stack - variables instead. -- wxSlider uses trackbar class under Win95, and wxSL_LABELS flag - determines whether labels are shown. Other Win95-specific flags - introduced, e.g. for showing ticks. -- Styles introduced for dealing with 3D effects per window, for - any window: all Win95 3D effects supported, plus transparent windows. -- Major change to allow 3D effect support without CTL3D, under - Win95. -- Bitmap versions of button and checkbox separated out into new - classes, but unimplemented as yet because I intend to remove - the need for Fafa - it apparently causes GPFs in Win95 OSR 2. -- utils/wxprop classes working (except maybe wxPropertyFormView) - in preparation for use in Dialog Editor. -- GNU-WIN32 compilation verified (a month or so ago). - - diff --git a/docs/gtk/install.txt b/docs/gtk/install.txt deleted file mode 100644 index 24286b8abf..0000000000 --- a/docs/gtk/install.txt +++ /dev/null @@ -1,420 +0,0 @@ -* The most simple case ------------------------ - -If you compile wxWindows on Unix for the first time and don't like -to read install instructions just do (in the base dir): - -./configure --with-gtk --with-shared --without-threads -make - -and drink 10 coffees. - - -* General ------------------------ - -The Unix variants of wxWindows use GNU configure. If you have problems -with your make use GNU make instead. - -Read my homepage at - - http://wesley.informatik.uni-freiburg.de/~wxxt - -for newest information. - -* GUI libraries ------------------------ - -wxWindows requires a GUI toolkit to be installed. Does that make -sense? So far only the GTK is supported, but we hope to provide -the choice between GTK, Qt, Motif/Lesstif in the not so distant -future. - -You can get the newest version of the GTK from the GTK homepage -at - http://www.gtk.org - -The newest versin of Qt can be downloaded for free from the Trolltec's -site at - http://www.troll.no - -Lesstif can be downloaded from their site -at - http://www.lesstif.org - -If you want to develop using Motif, you need to buy it, unless it comes -with your operating system such as all commercial Unices, as well as -RedHat's, SuSe's and probably other's Linux Motif editions. - -* Additional libraries ------------------------ - -There will be a few more features of wxWindows, which will -require further libraries (on some platforms). These -features will be optional. I hope to teach configure -to check that out automatically. - -Thread support: - - Requires pthreads under Linux with glibc 2. pthreads are - always present on such systems, so just compile, unless - you have RedHat 5.0, which has a broken combination of - glibc 2 and X. In this case, you have to run configure - with "--without-threads". - - Requires PCthreads under Linux with libc 5. If you - haven't installed pcthreads, there will be no thread - support in wxWindows, but the library will compile. - - Requires Posix threads on commercial Unix system, - which are always present. Just compile. - - On SGI Irix we first look for sprocs, then pthreads and - use the last one found. - -Python scripting language support: - - Requires Python. Soon to come. - -* Other things to do ------------------------------ - -wxGTK and wxMotif/wxLesstif require the built-in -ImLib/GdkImlib to be configured. For that purpose -copy the two files from /misc/imlib to your -home directory and rename "imrc" -> ".imrc". -You may also edit imrc by hand as you like. -The palette file is required when using -wxWindows in 256-colour mode. - -If you want to use wxWindows's ODBC support, you'll have -to create a .odbc.ini file. The readme file in -~/src/iodbc tells you what to do. - - -* Create your configuration ------------------------------ - -Usage: - ./configure options - -If you want to use system's C and C++ compiler, -set environment variables CC and CCC as - - % setenv CC cc - % setenv CCC CC - % ./configure options - -Using the SGI native compilers, it is recommended that you -also set CFLAGS and CXXFLAGS before running configure. These -should be set to : - -CFLAGS="-mips3 -n32" -CXXFLAGS="-mips3 -n32" - -This is essential if you want to use the resultant binaries -on any other machine than the one it was compiled on. If you -have a 64bit machine (Octane) you should also do this to ensure -you don't accidently build the libraries as 64bit (which is -untested). - -The SGI native compiler support has only been tested on Irix 6.5. - -to see all the options please use: - - ./configure --help - -The basic philosophy is that if you want to use different -configurations, like a debug and a release version, -or use the same source tree on different systems, -you have only to change the environment variable OSTYPE. -(Sadly this variable is not set by default on some systems -in some shells - on SGI's for example). So you will have to -set it there. This variable HAS to be set before starting -configure, so that it knows which system it tries to -configure for. - -Configure will complain if the system variable OSTYPE has -not been defined. And Make in some circumstances as well... - - -* General options -------------------- - -Obviously, you have to choose a toolkit. You must do this by -running configure with either of - - --with-gtk Use the GIMP ToolKit (GTK) - - --with-qt Use Qt from TrollTec - - --with-motif Use either Motif or Lesstif - Configure will look for both. - -The following options handle the kind of library you want to build. - - --without-threads Compile without thread support. - - --with-shared Create shared libraries. - - --without-optimise Do not optimise the code. - - --with-profile Add profiling info to the object - files. Currently broken, I think. - - --with-mem_tracing Add built-in memory tracing. - This doesn't work well with gcc. - - --with-dmalloc Use the dmalloc memory debugger. - Read more at www.letters.com/dmalloc/ - - --with-debug_info Add debug info to object files and - executables. - - --with-debug_flag Define __DEBUG__ and __WXDEBUG__ when - compiling. - -* Feature Options -------------------- - -When using the Windows version of wxWindows, it is possible -to edit the file /include/wx/msw/setup.h in order to enable -or disable some features of wxWindows so that the resulting -binaries get smaller. - -As I don't yet care for binary size and target mainly at -producing a shared library, wxWindows's configure system auto- -matically enables all features, as long as they are already -implemented. - -* Compiling -------------- - -The following must be done in the base directory (e.g. ~/wxGTK -or ~/wxWin) - -First you have to create all makefiles in all subdirectories: - - make Makefiles - -Dependencies are generated automatically using - - make depend - -(For some reason, this doesn't seem to work completely.) - -Now the makefiles are created you can compile everything is as simple -as typing: - - make - -make yourself some coffee, as it will try to compile -ALL the files in this distribution. - -if you want to be more selective: - - make src will build only the base libraries - make utils will build the utils - make samples will build the samples - make other will build the other samples - make user will build the files in the directory other - -Depending on the configuration of some files, the libraries -and binaries will be placed in different directories. -The "global" binaries and libraries will be placed in: - - bin/$(OSTYPE) and - lib/$(OSTYPE) respectively - -"local" binaries and libraries will be placed in: - - (basedir of that application)/$(OSTYPE). - -This is also the place where all the object-files will go. - -If you want to conserve disk space by removing unnecessary -object-files: - - make clean_obj - -will do the work for you. - -* Creating a new Project --------------------------- - -I propose to put all contributed programs in the directory -"~/wxWin/user", with a directory of its own. - -This directory then should include the following files: - -Makefile (You can copy this one from any application in samples - probably you will not need to edit this one. There is - only one case where you might be interested in changing - this file, but about that see later.) -Makefile.in (This is the base application-Makefile template, from - which the actual Makefile for each system is created. - More about this later) - -put ALL your source code along with all the other stuff you need for -your application in this directory (subdirectories are welcome). - -** Something about Makefiles ------------------------------- - -On general principle it should only contain ONE line, which is as follows: - - include ../../setup/general/makeapp - -this will include all the necessary definitions for creating the applications - -the only case where you might want to add another line is the following: -this version of configure also supports creation of source archives of the -application for easy distribution and updates to newer version of wxWindows. - For this purpose all files in the application-directory will be put into -a gziped tar-file in the full notation user//* -if you want to include some other files that you want "more visible", like -a README. or a shell script for easy -compilation/installation/distribution, then you have to add a variable - - DISTRIBUTE_ADDITIONAL= - -to the Makefile. -So it would look like this: - - DISTRIBUTE_ADDITIONAL=README.TheApp - include ../../setup/general/makeapp - -As we have already talked about distribution the command to create a -distribution is: - - make distrib - -NOTE: If you are in the base directory of wxWindows it will create -distribution packages for wxWindows as well as for all packages in the -user directory. - So if you want to create only packages for the files in user, -then go to the directory other and type: - - make distrib - -or if you only want one application to be created then -enter the specific directory and type there: -make distrib - -All the distribution files will be put in the directory -distrib at the base of the wxWindows-tree (where also configure -and template.mak can be found). - -** Something about Makefile.in --------------------------------- - -As you have already seen with Makefile, configure makes a lot of use -if the include statement in make to keep the Makefiles as simple as -possible. - -So basically there are only variables to define and then a include command. -Exception to this rule is if you have special rules for some stuff... -These rules should go AFTER the include statement!!! - -so the general header looks like this: - - # wxWindows base directory - WXBASEDIR=@WXBASEDIR@ - # set the OS type for compilation - OS=@OS@ - # compile a library only - RULE=bin - -and the general footer will look like this: - - # include the definitions now - include ../../../template.mak - -the key variable is RULE, which defines what make should create -in this directory. - -here are some examples: - - RULE description - =========================================================================== - bin creates a local binary (for a global binary prefix bin with g) - additional variables needed: - BIN_TARGET this gives the name of your application - BIN_OBJ this gives the object files needed to - link the application - optional variables are: - BIN_SRC this gives the list of c/c++ files for - which dependencies will be checked. - (This can be achieved with: make depend) - BIN_LINK this gives commands for additional - libraries needed to link the application - --------------------------------------------------------------------------- - bin2 creates two local binaries (for global binaries prefix bin2 with g) - in addition to the variables specified above you MUST also - provide the same variables with BIN2_ instead of BIN_ - --------------------------------------------------------------------------- - lib creates a local library (for a global binary prefix bin with g) - additional variables needed: - LIB_TARGET this gives the name of your library - LIB_OBJ this gives the object files needed for - the library to be build. - optional variables are: - LIB_SRC this gives the list of c/c++ files for - which dependencies will be checked. - libbin and libgbin are also possible and will need in addition - the variables from bin - --------------------------------------------------------------------------- - gslib is similar to lib, but it creates a shared library if the system - supports it. - additional variables needed: - LIB_MAJOR major number of the shared library - LIB_MINOR minor number of the shared library - --------------------------------------------------------------------------- - other additional variables: - - ADD_COMPILE define additional includes/defines that - are needed to compile the object files - (if you need to reference some directory - utils - like wxGrid -, then please - reference them with the variables defined - in template.mak - e.g.: $(SRCDIR),$(UTILS), - $(SAMPLES),$(OTHERS)) - - NEEDED_DEFINES lists all the defines that HAVE to be set in - /include/wx/setup.h to compile correctly. - - SRC_DIR lists all directories that are needed to - compile. (i.e: lists all the directories, - where there are source-files.) But it is - also needed to clean an object and for - machines, for which make does not support - VPATH - -currently there are the following compiling rules provided: -object files are created for the following file extensions: -.c .cc .cpp - -Please have a closer look at the Makefiles in this distribution. - -* Platforms configure is working with ---------------------------------------- - -Please report build succes on any machine. Especially non- -Linux operating systems (which I don't have). - -Original author of the autoconf system for wxxt-1.66 and for this INSTALL -file: - - Martin Sperl sperl@dsn.ast.univie.ac.at - -Ported to wxGTK 0.1: - - Wolfram Gloger wmglo@dent.med.uni-muenchen.de - -Thanks alot to both of them. - -In the hope that it will be useful, - - Robert Roebling roebling@sun2.ruf.uni-freiburg.de - - diff --git a/docs/latex/porting/back.gif b/docs/latex/porting/back.gif deleted file mode 100644 index 8a61076d3b..0000000000 Binary files a/docs/latex/porting/back.gif and /dev/null differ diff --git a/docs/latex/porting/books.bmp b/docs/latex/porting/books.bmp deleted file mode 100644 index cf1e148734..0000000000 Binary files a/docs/latex/porting/books.bmp and /dev/null differ diff --git a/docs/latex/porting/books.gif b/docs/latex/porting/books.gif deleted file mode 100644 index 036d016fb1..0000000000 Binary files a/docs/latex/porting/books.gif and /dev/null differ diff --git a/docs/latex/porting/bullet.bmp b/docs/latex/porting/bullet.bmp deleted file mode 100644 index 6481f5143b..0000000000 Binary files a/docs/latex/porting/bullet.bmp and /dev/null differ diff --git a/docs/latex/porting/contents.gif b/docs/latex/porting/contents.gif deleted file mode 100644 index 3dddfa3dd5..0000000000 Binary files a/docs/latex/porting/contents.gif and /dev/null differ diff --git a/docs/latex/porting/forward.gif b/docs/latex/porting/forward.gif deleted file mode 100644 index 88c3739ffb..0000000000 Binary files a/docs/latex/porting/forward.gif and /dev/null differ diff --git a/docs/latex/porting/porting.hpj b/docs/latex/porting/porting.hpj deleted file mode 100644 index 75e76d091b..0000000000 --- a/docs/latex/porting/porting.hpj +++ /dev/null @@ -1,16 +0,0 @@ -[OPTIONS] -TITLE=wxWindows Porting Guide -CONTENTS=Contents -COMPRESS=HIGH - -[FILES] -porting.rtf - -[CONFIG] -CreateButton("Up", "&Up", "JumpId(`porting.hlp', `Contents')") -BrowseButtons() - -[MAP] - -[BITMAPS] - diff --git a/docs/latex/porting/porting.tex b/docs/latex/porting/porting.tex deleted file mode 100644 index 6488144073..0000000000 --- a/docs/latex/porting/porting.tex +++ /dev/null @@ -1,390 +0,0 @@ -\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report} -\newcommand{\indexit}[1]{#1\index{#1}}% -\newcommand{\pipe}[0]{$\|$\ }% -\definecolour{black}{0}{0}{0}% -\definecolour{cyan}{0}{255}{255}% -\definecolour{green}{0}{255}{0}% -\definecolour{magenta}{255}{0}{255}% -\definecolour{red}{255}{0}{0}% -\definecolour{blue}{0}{0}{200}% -\definecolour{yellow}{255}{255}{0}% -\definecolour{white}{255}{255}{255}% -\input psbox.tex -\parskip=10pt -\parindent=0pt -\title{Guide to porting applications from wxWindows 1.xx to 2.0} -\author{Julian Smart} -\date{October 1997} -\makeindex -\begin{document} -\maketitle -\pagestyle{fancyplain} -\bibliographystyle{plain} -\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}} -\setfooter{\thepage}{}{}{}{}{\thepage}% -\pagenumbering{roman} -\tableofcontents -% -\chapter{About this document}\label{about} -\pagenumbering{arabic}% -\setheader{{\it Porting guide}}{}{}{}{}{{\it Porting guide}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -This document gives guidelines and tips for porting applications from -version 1.xx of wxWindows to version 2.0. - -The first section offers tips for writing 1.xx applications in a way to -minimize porting time. The following sections detail the changes and -how you can modify your application to be 2.0-compliant. - -You may be worrying that porting to 2.0 will be a lot of work, -particularly if you have only recently started using 1.xx. In fact, -the wxWindows 2.0 API has far more in common with 1.xx than it has differences. -With backward compatibility mode on, much of the conversion can be -done gradually. The main challenges are doing without the default -panel item layout, and the lack of automatic labels in some controls. -However, if you already use resource files (.wxr), or application-specific positioning, -or constraints, then even this will be quite painless. - -So please don't be freaked out by the jump to 2.0! For one thing, 1.xx is still available -and will be supported by the user community for some time. And when you have -changed to 2.0, we hope that you will appreciate the benefits in terms -of greater flexibility, better user interface aesthetics, improved C++ conformance, -improved compilation speed, and many other enhancements. The revised architecture -of 2.0 will ensure that wxWindows can continue to evolve for the forseeable -future. - -{\it Please note that this document is a work in progress.} - -\chapter{Preparing for version 2.0}\label{preparing} - -Even before compiling with version 2.0, there's also a lot you can do right now to make porting -relatively simple. Here are a few tips. - -\begin{itemize} -\item {\bf Use constraints or .wxr resources} for layout, rather than the default layout scheme. -Constraints should be the same in 2.0, and resources will be translated. -\item {\bf Use separate wxMessage items} instead of labels for wxText, wxMultiText, -wxChoice, wxComboBox. These labels will disappear in 2.0. Use separate -wxMessages whether you're creating controls programmatically or using -the dialog editor. The future dialog editor will be able to translate -from old to new more accurately if labels are separated out. -\item {\bf Parameterise functions that use wxDC} or derivatives, i.e. make the wxDC -an argument to all functions that do drawing. Minimise the use of -wxWindow::GetDC and definitely don't store wxDCs long-term -because in 2.0, you can't use GetDC() and wxDCs are not persistent. -You will use wxClientDC, wxPaintDC stack objects instead. Minimising -the use of GetDC() will ensure that there are very few places you -have to change drawing code for 2.0. -\item {\bf Don't set GDI objects} (wxPen, wxBrush etc.) in windows or wxCanvasDCs before they're -needed (e.g. in constructors) - do so within your drawing routine instead. In -2.0, these settings will only take effect between the construction and destruction -of temporary wxClient/PaintDC objects. -\item {\bf Don't rely} on arguments to wxDC functions being floating point - they will -be 32-bit integers in 2.0. -\item {\bf Don't use the wxCanvas member functions} that duplicate wxDC functions, such as SetPen and DrawLine, since -they are going. -\item {\bf Using member callbacks} called from global callback functions will make the transition -easier - see the FAQ -for some notes on using member functions for callbacks. wxWindows 2.0 will banish global -callback functions (and OnMenuCommand), and nearly all event handling will be done by functions taking a single event argument. -So in future you will have code like: - -{\small\begin{verbatim} -void MyFrame::OnOK(wxCommandEvent& event) -{ - ... -} -\end{verbatim} -}% - -You may find that writing the extra code to call a member function isn't worth it at this stage, -but the option is there. -\item {\bf Use wxString wherever possible.} 2.0 will replace char * with wxString -in most cases, and if you use wxString to receive strings returned from -wxWindows functions (except when you need to save the pointer if deallocation is required), there should -be no conversion problems later on. -\item Be aware that under Windows, {\bf font sizes will change} to match standard Windows -font sizes (for example, a 12-point font will appear bigger than before). Write your application -to be flexible where fonts are concerned. -Don't rely on fonts being similarly-sized across platforms, as they were (by chance) between -Windows and X under wxWindows 1.66. Yes, this is not easy... but I think it's better to conform to the -standards of each platform, and currently the size difference makes it difficult to -conform to Windows UI standards. You may eventually wish to build in a global 'fudge-factor' to compensate -for size differences. The old font sizing will still be available via wx\_setup.h, so do not panic... -\item {\bf Consider dropping wxForm usage}: an alternative is to be found in utils/wxprop. -wxPropertyFormView can be used in a wxForm-like way, except that you specify a pre-constructed panel -or dialog; or you can use a wxPropertyListView to show attributes in a scrolling list - you don't even need -to lay panel items out. - -Because wxForm uses a number of features to be dropped in wxWindows 2.0, it cannot be -supported in the future, at least in its present state. -\item {\bf When creating a wxListBox}, put the wxLB\_SINGLE, wxLB\_MULTIPLE, wxLB\_EXTENDED styles in the window style parameter, and put -zero in the {\it multiple} parameter. The {\it multiple} parameter will be removed in 2.0. -\item {\bf For MDI applications}, don't reply on MDI being run-time-switchable in the way that the -MDI sample is. In wxWindows 2.0, MDI functionality is separated into distinct classes. -\end{itemize} - -\chapter{The new event system}\label{eventsystem} - -The way that events are handled has been radically changed in wxWindows 2.0. Please -read the topic `Event handling overview' in the wxWindows 2.0 manual for background -on this. - -\section{Callbacks} - -Instead of callbacks for panel items, menu command events, control commands and other events are directed to -the originating window, or an ancestor, or an event handler that has been plugged into the window -or its ancestor. Event handlers always have one argument, a derivative of wxEvent. - -For menubar commands, the {\bf OnMenuCommand} member function will be replaced by a series of separate member functions, -each of which responds to a particular command. You need to add these (non-virtual) functions to your -frame class, add a DECLARE\_EVENT\_TABLE entry to the class, and then add an event table to -your implementation file, as a BEGIN\_EVENT\_TABLE and END\_EVENT\_TABLE block. The -individual event mapping macros will be of the form: - -\begin{verbatim} -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(MYAPP_NEW, MyFrame::OnNew) - EVT_MENU(wxID_EXIT, MyFrame::OnExit) -END_EVENT_TABLE() -\end{verbatim} - -Control commands, such as button commands, can be routed to a derived button class, -the parent window, or even the frame. Here, you use a function of the form EVT\_BUTTON(id, func). -Similar macros exist for other control commands. - -\section{Other events} - -To intercept other events, you used to override virtual functions, such as OnSize. Now, while you can use -the OnSize name for such event handlers (or any other name of your choice), it has only a single argument -(wxSizeEvent) and must again be `mapped' using the EVT\_SIZE macro. The same goes for all other events, -including OnClose (although in fact you can still use the old, virtual form of OnClose for the time being). - -\chapter{Class hierarchy}\label{classhierarchy} - -The class hierarchy has changed somewhat. wxToolBar and wxButtonBar -classes have been split into several classes, and are derived from wxControl (which was -called wxItem). wxPanel derives from wxWindow instead of from wxCanvas, which has -disappeared in favour of wxScrolledWindow (since all windows are now effectively canvases -which can be drawn into). The status bar has become a class in its own right, wxStatusBar. - -There are new MDI classes so that wxFrame does not have to be overloaded with this -functionality. - -There are new device context classes, with wxPanelDC and wxCanvasDC disappearing. -See \helpref{Device contexts and painting}{dc}. - -\chapter{GDI objects}\label{gdiobjects} - -These objects - instances of classes such as wxPen, wxBrush, wxBitmap (but not wxColour) - -are now implemented with reference-counting. This makes assignment a very cheap operation, -and also means that management of the resource is largely automatic. You now pass {\it references} to -objects to functions such as wxDC::SetPen. The device context does not store a copy of the pen -itself, but takes a copy of it (via reference counting), and the object's data gets freed up -when the reference count goes to zero. The application does not have to worry so much about -who the object belongs to: it can pass the reference, then destroy the object without -leaving a dangling pointer inside the device context. - -For the purposes of code migration, you can use the old style of object management - maintaining -pointers to GDI objects, and using the FindOrCreate... functions. However, it is preferable to -keep this explicit management to a minimum, instead creating objects on the fly as needed, on the stack, -unless this causes too much of an overhead in your application. - -At a minimum, you will have to make sure that calls to SetPen, SetBrush etc. work. Some compilers -will do the conversion from pointer to reference automatically (via a constructor in the GDI -class) but you cannot rely on this being true for all compilers. Also, where you pass NULL to these -functions, you will need to either cast to the appropriate reference type, or instead -use an identifier such as wxNullPen or wxNullBrush. - -\chapter{Dialogs and controls}\label{dialogscontrols} - -\wxheading{Labels} - -Most controls no longer have labels and values as they used to in 1.xx. Instead, labels -should be created separately using wxStaticText (the new name for wxMessage). This will -need some reworking of dialogs, unfortunately; programmatic dialog creation that doesn't -use constraints will be especially hard-hit. Perhaps take this opportunity to make more -use of dialog resources or constraints. Or consider using the wxPropertyListView class -which can do away with dialog layout issues altogether by presenting a list of editable -properties. - -\wxheading{Constructors} - -All window constructors have two main changes, apart from the label issue mentioned above. -Windows now have integer identifiers; and position and size are now passed as wxPoint and -wxSize objects. In addition, some windows have a wxValidator argument. wxWindows 2.0 may provide -old-style constructors in WXWIN\_COMPATIBILITY mode for limited backward compatibility. - -\wxheading{Show versus ShowModal} - -If you have used or overridden the {\bf wxDialog::Show} function in the past, you may find -that modal dialogs no longer work as expected. This is because the function for modal showing -is now {\bf wxDialog:ShowModal}. This is part of a more fundamental change in which a -control may tell the dialog that it caused the dismissal of a dialog, by -calling {\bf wxDialog::EndModal} or {\bf wxWindow::SetReturnCode}. Using this -information, {\bf ShowModal} now returns the id of the control that caused dismissal, -giving greater feedback to the application than just TRUE or FALSE. - -If you overrode or called {\bf wxDialog::Show}, use {\bf ShowModal} and test for a returned identifier, -commonly wxID\_OK or wxID\_CANCEL. - -\wxheading{wxItem} - -This is renamed wxControl. - -\wxheading{wxText, wxMultiText and wxTextWindow} - -These classes no longer exist and are replaced by the single class wxTextCtrl. -Multi-line text items are created using the wxTE\_MULTILINE style. - -\wxheading{wxButton} - -Bitmap buttons are now a separate class, instead of being part of wxBitmap. - -\wxheading{wxMessage} - -Bitmap messages are now a separate class, wxStaticBitmap, and wxMessage -is renamed wxStaticText. - -\wxheading{wxGroupBox} - -wxGroupBox is renamed wxStaticBox. - -\wxheading{wxForm} - -Note that wxForm is no longer supported in wxWindows 2.0. Consider using the wxPropertyForm class -instead, which takes standard dialogs and panels and associates controls with property objects. -You may also find that the new validation method, combined with dialog resources, is easier -and more flexible than using wxForm. - -\chapter{Device contexts and painting}\label{dc} - -In wxWindows 2.0, device contexts are used for drawing into, as per 1.xx, but the way -they are accessed and constructed is a bit different. - -You no longer use {\bf GetDC} to access device contexts for panels, dialogs and canvases. -Instead, you create a temporary device context, which means that any window or control can be drawn -into. The sort of device context you create depends on where your code is called from. If -painting within an {\bf OnPaint} handler, you create a wxPaintDC. If not within an {\bf OnPaint} handler, -you use a wxClientDC or wxWindowDC. You can still parameterise your drawing code so that it -doesn't have to worry about what sort of device context to create - it uses the DC it is passed -from other parts of the program. - -You {\bf must } create a wxPaintDC if you define an OnPaint handler, even if you do not -actually use this device context, or painting will not work correctly under Windows. - -If you used device context functions with wxPoint or wxIntPoint before, please note -that wxPoint now contains integer members, and there is a new class wxRealPoint. wxIntPoint -no longer exists. - -\chapter{Miscellaneous} - -\section{Strings} - -wxString has replaced char* in the majority of cases. For passing strings into functions, -this should not normally require you to change your code if the syntax is otherwise the -same. This is because C++ will automatically convert a char* or const char* to a wxString by virtue -of appropriate wxString constructors. - -However, when a wxString is returned from a function in wxWindows 2.0 where a char* was -returned in wxWindows 1.xx, your application will need to be changed. Usually you can -simplify your application's allocation and deallocation of memory for the returned string, -and simply assign the result to a wxString object. For example, replace this: - -{\small\begin{verbatim} - char* s = wxFunctionThatReturnsString(); - s = copystring(s); // Take a copy in case it's temporary - .... // Do something with it - delete[] s; -\end{verbatim} -} - -with this: - -{\small\begin{verbatim} - wxString s = wxFunctionThatReturnsString(); - .... // Do something with it -\end{verbatim} -} - -To indicate an empty return value or a problem, a function may return either the -empty string (``") or a null string. You can check for a null string with wxString::IsNull(). - -\section{Use of const} - -The {\bf const} keyword is now used to denote constant functions that do not affect the -object, and for function arguments to denote that the object passed cannot be changed. - -This should not affect your application except for where you are overriding virtual functions -which now have a different signature. If functions are not being called which were previously, -check whether there is a parameter mismatch (or function type mismatch) involving consts. - -Try to use the {\bf const} keyword in your own code where possible. - -\chapter{Backward compatibility}\label{compat} - -Some wxWindows 1.xx functionality has been left to ease the transition to 2.0. This functionality -(usually) only works if you compile with WXWIN\_COMPATIBILITY set to 1. - -TODO - -OnMenuCommand, OnSize, OnActivate, OnPaint, others?? can all be prefixed with Old (e.g. OldOnMenuCommand) -and will work as before. You are encouraged to convert your code to the new forms, but -this will allow you to get your applications up and running a little more quickly. - -OnClose can be used as-is without an 'Old' prefix, but officially the OnCloseWindow event table handler should be -used instead. - -\chapter{Quick reference}\label{quickreference} - -This section allows you to quickly find features that -need to be converted. - -TODO - -\section{OnActivate} - -Rename to OldOnActivate, or replace arguments with one wxActivateEvent\& argument. - -\wxheading{See also} - -\helpref{Backward compatibility}{compat} - -\section{OnClose} - -This can either remain the same as before, or you can add an OnCloseWindow event -handler using an EVT\_CLOSE event table entry. - -\wxheading{See also} - -\helpref{Backward compatibility}{compat} - -\section{OnMenuCommand} - -Rename to OldOnMenuCommand, or replace with a series of functions, one for -each case of your old switch statement. Create an event table for your frame -containing EVT\_MENU macros, and insert DECLARE\_EVENT\_TABLE() in your frame class. - -\wxheading{See also} - -\helpref{Backward compatibility}{compat} - -\section{OnSize} - -Rename to OldOnSize, or replace arguments with one wxSizeEvent\& argument. - -\wxheading{See also} - -\helpref{Backward compatibility}{compat} - -\section{wxDialog::Show} - -If you used {\bf Show} to show a modal dialog, or to override the standard -modal dialog {\bf Show}, use {\bf ShowModal} instead. - -\wxheading{See also} - -\helpref{Dialogs and controls}{dialogscontrols} - -\end{document} diff --git a/docs/latex/porting/tex2rtf.ini b/docs/latex/porting/tex2rtf.ini deleted file mode 100644 index 304529b8e4..0000000000 --- a/docs/latex/porting/tex2rtf.ini +++ /dev/null @@ -1,28 +0,0 @@ -;;; Tex2RTF initialisation file for 16-bit Winhelp -runTwice = yes -titleFontSize = 12 -authorFontSize = 10 -authorFontSize = 10 -chapterFontSize = 12 -sectionFontSize = 12 -subsectionFontSize = 12 -contentsDepth = 2 -headerRule = yes -footerRule = yes -useHeadingStyles = yes -listItemIndent=40 -generateHPJ = no -htmlBrowseButtons = bitmap -winHelpContents = yes -winHelpVersion = 3 ; 3 for Windows 3.x, 4 for Windows 95 -winHelpTitle = "wxWindows Porting Guide" -truncateFilenames = yes -combineSubSections = yes -\overview [2] {\rtfonly{See also }\settransparency{on}\sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}\settransparency{off}} -\htmlonly{\image{}{books.gif}}\helpref{#1}{#2} -\sethotspotcolour{on}\sethotspotunderline{on}} -\docparam [2]{\parskip{0}{\it #1}\par\parskip{10}\indented{1cm}{#2}} -\wxheading [1]{{\bf \fcol{blue}{#1}}} -\const [0] {{\bf const}} -\constfunc [3] {{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}} - diff --git a/docs/latex/porting/texhelp.sty b/docs/latex/porting/texhelp.sty deleted file mode 100644 index 81704b0575..0000000000 --- a/docs/latex/porting/texhelp.sty +++ /dev/null @@ -1,289 +0,0 @@ -% LaTeX style file -% Name: texhelp.sty -% Author: Julian Smart -% -% Purpose -% ------- -% Style file to enable the simultaneous preparation of printed LaTeX and on-line -% hypertext manuals. -% Use in conjunction with Tex2RTF (see Tex2RTF documentation). -% -% Note that if a non-ASCII character starts a newline and there should be a space -% between the last word on the previous line and the first word on this line, -% you need to use \rtfsp to generate a space in Windows Help. \rtfsp is ignored -% in all other formats. -% -% Julian Smart -% Artificial Intelligence Applications Institute -% -% -% ============== C++/CLIPS Documentation Facilities ============== -% -% Each class definition should be typeset with e.g. -% -% \section{\class{Name}: Parent} -% -% followed by a description of the class. -% Each member should follow: -% -% \membersection{wxName::Member} -% -% with a description of what this member does. -% Then, one (or more if overloaded) member (function) in detail: -% -% \func{return type}{name}{args} -% or -% \member{type}{name} -% -% where args is a list of \param{type}{name}, ... - -% Function, e.g. -% e.g. to typeset -% -% void DoIt(char *string); -% -% write: -% -% \func{void}{DoIt}{\param{char *}{string}} -% - -\newcommand{\func}[3]{\hangafter=1\noindent\hangindent=10mm -{{\it #1} {\bf #2}\index{#2}}(#3)} - -% For function/type definition where the name is a pointer, -% e.g. to typeset -% -% typedef void (*wxFunction)(wxObject&) -% -% write: -% -% \pfunc{typedef void}{wxFunction}{param{wxObject&}} - -\newcommand{\pfunc}[3]{\hangafter=1\noindent\hangindent=10mm -{{\it #1} ({\bf *#2})\index{#2}}(#3)} - -% Use an ordinary \section command for class name definitions. - -% This is used for a member, such as wxBitmap: GetDepth -\newcommand{\membersection}[1]{\subsection*{#1}\index{#1}} - -% CLIPS function -\newcommand{\clipsfunc}[3]{\hangafter=1\noindent\hangindent=10mm -{{\bf #1} ({\bf #2}\index{#2}}#3)} - -\newcommand{\clipssection}[1]{\chapter{#1}} - -% This is used for a CLIPS function name -\newcommand{\functionsection}[1]{\subsection*{#1}} - -% Member: a type and a name -\newcommand{\member}[2]{{\bf #1 \it #2}} - -% C++ Parameter: a type and a name (no intervening space) -\newcommand{\param}[2]{{\it #1}{\bf #2}} - -% CLIPS Parameter: a type and a name (one intervening space) -\newcommand{\cparam}[2]{{\bf #1} {\it #2}} - -% Class: puts in index -\newcommand{\class}[1]{#1\index{#1}} - -% Void type -\newcommand{\void}{{\it void}} - -% Typeset destructor -\newcommand{\destruct}[1]{{$\sim$}#1} - -% Typeset insert/extract operators -\newcommand{\cinsert}{$<<$} -\newcommand{\cextract}{$>>$} - - -% =================== Hypertext facilities =================== -% -% To insert hyperlinks (or references, in Latex), \label the sections -% or membersections \label{ref-label} immediately after the section, on the same line, -% and use \helpref{text-to-show}{ref-label} to make a reference. -% - -% Type text with section reference -\newcommand{\helpref}[2]{{\it #1} (p.\ \pageref{#2}) } - -% Type text with URL in verbatim mode -\newcommand{\urlref}[2]{#1 (\verb$#2$)} - -% Don't typeset section number in LaTeX -\newcommand{\helprefn}[2]{{\it #1}} - -% Like helpref, but popup text in WinHelp instead of hyperlinked -\newcommand{\popref}[2]{{\it #1}} - -% Like footnote, but popup text. -\newcommand{\footnotepopup}[2]{{\it #1}\footnote{#2}} - -% =================== On-line help specific macros =================== -% - -% Global document font size/family, help only. -\newcommand{\helpfontsize}[1]{} -\newcommand{\helpfontfamily}[1]{} - -% Ignore in all on-line help -\newcommand{\helpignore}[1]{#1} -% Only print in all on-line help -\newcommand{\helponly}[1]{} - -% Ignore in LaTeX -\newcommand{\latexignore}[1]{} -% Only print in LaTeX -\newcommand{\latexonly}[1]{#1} - -% Ignore in linear RTF -\newcommand{\rtfignore}[1]{#1} -% Only print in linear RTF -\newcommand{\rtfonly}[1]{} - -% Ignore in WinHelp RTF -\newcommand{\winhelpignore}[1]{#1} -% Only print in WinHelp RTF -\newcommand{\winhelponly}[1]{} - -% Ignore in wxHelp -\newcommand{\xlpignore}[1]{#1} -% Only print in wxHelp -\newcommand{\xlponly}[1]{} - -% Ignore in HTML -\newcommand{\htmlignore}[1]{#1} -% Only print in HTML -\newcommand{\htmlonly}[1]{} - -% Input a file only for help system (binder thickness is not a limitation -% in help systems!) -\newcommand{\helpinput}[1]{} - -\newcommand{\rtfsp}{ } % Force a space in RTF, ignore in Latex - -% =================== Miscellaneous macros =================== -% -% Headings consistent with generated ones -\newcommand{\myheading}[1]{\vspace*{25pt} -\begin{flushleft} -{\LARGE \bf #1} -\end{flushleft} -\vskip 20pt -} - -% Heading with entry in contents page. -\newcommand{\chapterheading}[1]{\myheading{#1} -\addcontentsline{toc}{chapter}{#1}} - -\newcommand{\sectionheading}[1]{\myheading{#1} -\addcontentsline{toc}{section}{#1}} - -% Glossary environment -\newenvironment{helpglossary}{\newpage\chapterheading{Glossary}\begin{description}}{\end{description}} - -% Glossary entry -\newcommand{\gloss}[1]{\item[#1]\index{#1}} - -% Image: EPS in Latex, BMP or MF (whatever's available) in RTF. Requires psbox. -\newcommand{\image}[2]{\psboxto(#1){#2}} - -% Image, left aligned (HTML) -\newcommand{\imager}[2]{\psboxto(#1){#2}} - -% Image, right aligned (HTML) -\newcommand{\imagel}[2]{\psboxto(#1){#2}} - -% Imagemap: principally for HTML only. In Latex, -% acts like \image. -\newcommand{\imagemap}[3]{\psboxto(#1){#2}} - -% Headers and footers -% \setheader{EvenPageLeft}{EvenPageCentre}{EvenPageRight} -% {OddPageLeft}{OddPageCentre}{OddPageRight} -\newcommand{\setheader}[6]{ -\lhead[\fancyplain{}{#1}]{\fancyplain{}{#4}} -\chead[\fancyplain{}{#2}]{\fancyplain{}{#5}} -\rhead[\fancyplain{}{#3}]{\fancyplain{}{#6}} -} - -% \setfooter{EvenPageLeft}{EvenPageCentre}{EvenPageRight} -% {OddPageLeft}{OddPageCentre}{OddPageRight} -\newcommand{\setfooter}[6]{ -\lfoot[\fancyplain{#1}{#1}]{\fancyplain{#4}{#4}} -\cfoot[\fancyplain{#2}{#2}]{\fancyplain{#5}{#5}} -\rfoot[\fancyplain{#3}{#3}]{\fancyplain{#6}{#6}} -} - -% Needed for telling RTF where margin paragraph should go -% in mirrored margins mode. -\newcommand{\marginpareven}[1]{\hspace*{0pt}\marginpar{#1}} -\newcommand{\marginparodd}[1]{\hspace*{0pt}\marginpar{#1}} - -% Environment for two-column table popular in WinHelp and manuals. -\newcommand{\twocolwidtha}[1]{\def\twocolwidthaval{#1}} -\newcommand{\twocolwidthb}[1]{\def\twocolwidthbval{#1}} -\newcommand{\twocolspacing}[1]{\def\twocolspacingval{#1}} - -\twocolwidtha{3cm} -\twocolwidthb{8.5cm} -\twocolspacing{2} - -\newcommand{\twocolitem}[2]{#1 & #2\\} -\newcommand{\twocolitemruled}[2]{#1 & #2\\\hline} - -\newenvironment{twocollist}{\renewcommand{\arraystretch}{\twocolspacingval}\begin{tabular}{lp{\twocolwidthbval}}}% -{\end{tabular}\renewcommand{\arraystretch}{1}} - -% Specifying table rows for RTF compatibility -\newcommand{\row}[1]{#1\\} - -% Use for the last ruled row for correct RTF generation. -\newcommand{\ruledrow}[1]{#1\\\hline} - -% Indentation environment. Arg1 is left margin size -\newenvironment{indented}[1]{\begin{list}{}{\leftmargin=#1}\item[]}% -{\end{list}} - -% Framed box of text, normal formatting. -\newcommand{\normalbox}[1]{\fbox{\vbox{#1}}} -% Double-framed box of text. -\newcommand{\normalboxd}[1]{\fbox{\fbox{\vbox{#1}}}} - -% WITHDRAWN -- can't do in RTF, easily. -% Framed box of text, horizontally centred. Ragged right within box. -% \newcommand{\centeredbox}[2]{\begin{center}\fbox{\parbox{#1}{\raggedright#2}}\end{center}} -% Double-framed box of text, horizontally centred. Ragged right within box. -% \newcommand{\centeredboxd}[2]{\begin{center}\fbox{\fbox{\parbox{#1}{\raggedright#2}}}\end{center}} - -% toocomplex environment: simply prints the argument in LaTeX, -% comes out verbatim in all generated formats. -\newenvironment{toocomplex}{}{} - -% Colour: dummy commands since LaTeX doesn't support colour. -% \definecolour{name}{red}{blue}{green} -% \fcol{name}{text} ; Foreground -% \bcol{name}{text} ; Background -\newcommand{\definecolour}[4]{} -\newcommand{\definecolor}[4]{} -\newcommand{\fcol}[2]{#2} -\newcommand{\bcol}[2]{#2} -\newcommand{\sethotspotcolour}[1]{} -\newcommand{\sethotspotunderline}[1]{} -\newcommand{\settransparency}[1]{} -\newcommand{\backslashraw}[0]{} -\newcommand{\lbraceraw}[0]{} -\newcommand{\rbraceraw}[0]{} -\newcommand{\registered}[0]{(r)} -\newcommand{\background}[1]{} -\newcommand{\textcolour}[1]{} -\newcommand{\overview}[2]{See \helpref{#1}{#2}.} -\newcommand{\docparam}[2]{{\it #1}\begin{list}{}{\leftmargin=1cm}\item[] -#2% -\end{list}} -\newcommand{\wxheading}[1]{{\bf #1}} -\newcommand{\const}[0]{{\bf const}} -\newcommand{\constfunc}[3]{{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}} - diff --git a/docs/latex/porting/up.gif b/docs/latex/porting/up.gif deleted file mode 100644 index f9e7031e64..0000000000 --- a/docs/latex/porting/up.gif +++ /dev/null @@ -1 +0,0 @@ -GIF87a \ No newline at end of file diff --git a/docs/latex/wx/activevt.tex b/docs/latex/wx/activevt.tex deleted file mode 100644 index 6eca563147..0000000000 --- a/docs/latex/wx/activevt.tex +++ /dev/null @@ -1,56 +0,0 @@ -\section{\class{wxActivateEvent}}\label{wxactivateevent} - -An activate event is sent when a window or application is being activated -or deactivated. - -\wxheading{Derived from} - -\helpref{wxEvent}{wxevent}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Event table macros} - -To process an activate event, use these event handler macros to direct input to a member -function that takes a wxActivateEvent argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_ACTIVATE(func)}}{Process a wxEVT\_ACTIVATE event.} -\twocolitem{{\bf EVT\_ACTIVATE\_APP(func)}}{Process a wxEVT\_ACTIVATE\_APP event.} -\end{twocollist}% - -\wxheading{Remarks} - -A top-level window (a dialog or frame) receives an activate event when is -being activated or deactivated. This is indicated visually by the title -bar changing colour, and a subwindow gaining the keyboard focus. - -An application is activated or deactivated when one of its frames becomes activated, -or a frame becomes inactivate resulting in all application frames being inactive. (Windows only) - -\wxheading{See also} - -\helpref{wxWindow::OnActivate}{wxwindowonactivate},\rtfsp -\helpref{wxApp::OnActivate}{wxapponactivate},\rtfsp -\helpref{Event handling overview}{eventhandlingoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxActivateEvent::wxActivateEvent} - -\func{}{wxActivateEvent}{\param{WXTYPE }{eventType = 0}, \param{int }{id = 0}} - -Constructor. - -\membersection{wxActivateEvent::m\_active} - -\member{bool}{m\_active} - -TRUE if the window or application was activated. - -\membersection{wxActivateEvent::GetActive}\label{wxactivateeventgetactive} - -\constfunc{bool}{GetActive}{\void} - -Returns TRUE if the application or window is being activated, FALSE otherwise. - diff --git a/docs/latex/wx/app.tex b/docs/latex/wx/app.tex deleted file mode 100644 index c2464a6123..0000000000 --- a/docs/latex/wx/app.tex +++ /dev/null @@ -1,395 +0,0 @@ -\section{\class{wxApp}}\label{wxapp} - -The {\bf wxApp} class represents the application itself. It is used -to: - -\begin{itemize}\itemsep=0pt -\item set and get application-wide properties; -\item implement the windowing system message or event loop; -\item initiate application processing via \helpref{wxApp::OnInit}{wxapponinit}; -\item allow default processing of events not handled by other -objects in the application. -\end{itemize} - -You should use the macro IMPLEMENT\_APP(appClass) in your application implementation -file to tell wxWindows how to create an instance of your application class. - -Use DECLARE\_APP(appClass) in a header file if you want the wxGetApp function (which returns -a reference to your application object) to be visible to other files. - -\wxheading{Derived from} - -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxApp overview}{wxappoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxApp::wxApp} - -\func{void}{wxApp}{\param{int}{ language = wxLANGUAGE\_ENGLISH}} - -Constructor. Called implicitly with a definition of a wxApp object. - -The argument is a language identifier; this is an experimental -feature and will be expanded and documented in future versions. - -TODO: completely rewrite the language stuff. - -\membersection{wxApp::\destruct{wxApp}} - -\func{void}{\destruct{wxApp}}{\void} - -Destructor. Will be called implicitly on program exit if the wxApp -object is created on the stack. - -\membersection{wxApp::argc}\label{wxappargc} - -\member{int}{argc} - -Number of command line arguments (after environment-specific processing). - -\membersection{wxApp::argv}\label{wxappargv} - -\member{char **}{argv} - -Command line arguments (after environment-specific processing). - -\membersection{wxApp::CreateLogTarget}\label{wxappcreatelogtarget} - -\func{virtual wxLog*}{CreateLogTarget}{\void} - -Creates a wxLog class for the application to use for logging errors. The default -implementation returns a new wxLogGui class. - -\wxheading{See also} - -\helpref{wxLog}{wxlog} - -\membersection{wxApp::Dispatch}\label{wxappdispatch} - -\func{void}{Dispatch}{\void} - -Dispatches the next event in the windowing system event queue. - -This can be used for programming event loops, e.g. - -\begin{verbatim} - while (app.Pending()) - Dispatch(); -\end{verbatim} - -\wxheading{See also} - -\helpref{wxApp::Pending}{wxapppending} - -\membersection{wxApp::GetAppName}\label{wxappgetappname} - -\constfunc{wxString}{GetAppName}{\void} - -Returns the application name. - -\wxheading{Remarks} - -wxWindows sets this to a reasonable default before -calling \helpref{wxApp::OnInit}{wxapponinit}, but the application can reset it at will. - -\membersection{wxApp::GetAuto3D}\label{wxappgetauto3d} - -\constfunc{bool}{GetAuto3D}{\void} - -Returns TRUE if 3D control mode is on, FALSE otherwise. - -\wxheading{See also} - -\helpref{wxApp::SetAuto3D}{wxappsetauto3d} - -\membersection{wxApp::GetClassName}\label{wxappgetclassname} - -\constfunc{wxString}{GetClassName}{\void} - -Gets the class name of the application. The class name may be used in a platform specific -manner to refer to the application. - -\wxheading{See also} - -\helpref{wxApp::SetClassName}{wxappsetclassname} - -\membersection{wxApp::GetExitOnDelete}\label{wxappgetexitondelete} - -\constfunc{bool}{GetExitOnDelete}{\void} - -Returns TRUE if the application will exit when the top-level window is deleted, FALSE -otherwise. - -\wxheading{See also} - -\helpref{wxApp::SetExitOnDelete}{wxappsetexitondelete} - -\membersection{wxApp::GetPrintMode}\label{wxappgetprintmode} - -\constfunc{bool}{GetPrintMode}{\void} - -Returns the print mode: see \helpref{wxApp::SetPrintMode}{wxappsetprintmode}. - -\membersection{wxApp::GetTopWindow}\label{wxappgettopwindow} - -\constfunc{wxWindow *}{GetTopWindow}{\void} - -Returns a pointer to the top window. - -\wxheading{See also} - -\helpref{wxApp::SetTopWindow}{wxappsettopwindow} - -\membersection{wxApp::ExitMainLoop}\label{wxappexitmainloop} - -\func{void}{ExitMainLoop}{\void} - -Call this to explicitly exit the main message (event) loop. -You should normally exit the main loop (and the application) by deleting -the top window. - -\membersection{wxApp::Initialized}\label{wxappinitialized} - -\func{bool}{Initialized}{\void} - -Returns TRUE if the application has been initialized (i.e. if\rtfsp -\helpref{wxApp::OnInit}{wxapponinit} has returned successfully). This can be useful for error -message routines to determine which method of output is best for the -current state of the program (some windowing systems may not like -dialogs to pop up before the main loop has been entered). - -\membersection{wxApp::MainLoop}\label{wxappmainloop} - -\func{int}{MainLoop}{\void} - -Called by wxWindows on creation of the application. Override this if you wish -to provide your own (environment-dependent) main loop. - -\wxheading{Return value} - -Returns 0 under X, and the wParam of the WM\_QUIT message under Windows. - -\membersection{wxApp::OnActivate}\label{wxapponactivate} - -\func{void}{OnActivate}{\param{wxActivateEvent\& }{event}} - -Provide this member function to know whether the application is being -activated or deactivated (Windows only). - -\wxheading{See also} - -\helpref{wxWindow::OnActivate}{wxwindowonactivate}, \helpref{wxActivateEvent}{wxactivateevent} - -\membersection{wxApp::OnExit}\label{wxapponexit} - -\func{int}{OnExit}{\void} - -Provide this member function for any processing which needs to be done as -the application is about to exit. - -\membersection{wxApp::OnCharHook}\label{wxapponcharhook} - -\func{void}{OnCharHook}{\param{wxKeyEvent\&}{ event}} - -This event handler function is called (under Windows only) to allow the window to intercept keyboard events -before they are processed by child windows. - -\wxheading{Parameters} - -\docparam{event}{The keypress event.} - -\wxheading{Remarks} - -Use the wxEVT\_CHAR\_HOOK macro in your event table. - -If you use this member, you can selectively consume keypress events by calling\rtfsp -\helpref{wxEvent::Skip}{wxeventskip} for characters the application is not interested in. - -\wxheading{See also} - -\helpref{wxKeyEvent}{wxkeyevent}, \helpref{wxWindow::OnChar}{wxwindowonchar},\rtfsp -\helpref{wxWindow::OnCharHook}{wxwindowoncharhook}, \helpref{wxDialog::OnCharHook}{wxdialogoncharhook} - -\membersection{wxApp::OnIdle}\label{wxapponidle} - -\func{void}{OnIdle}{\param{wxIdleEvent\& }{event}} - -Override this member function for any processing which needs to be done -when the application is idle. You should call wxApp::OnIdle from your own function, -since this forwards OnIdle events to windows and also performs garbage collection for -windows whose destruction has been delayed. - -wxWindows' strategy for OnIdle processing is as follows. After pending user interface events for an -application have all been processed, wxWindows sends an OnIdle event to the application object. wxApp::OnIdle itself -sends an OnIdle event to each application window, allowing windows to do idle processing such as updating -their appearance. If either wxApp::OnIdle or a window OnIdle function requested more time, by -caling \helpref{wxIdleEvent::ReqestMore}{wxidleeventrequestmore}, wxWindows will send another OnIdle -event to the application event. This will occur in a loop until either a user event is found to be -pending, or OnIdle requests no more time. Then all pending user events are processed until the system -goes idle again, when OnIdle is called, and so on. - -\wxheading{See also} - -\helpref{wxWindow::OnIdle}{wxwindowonidle}, \helpref{wxIdleEvent}{wxidleevent},\rtfsp -\helpref{wxWindow::SendIdleEvents}{wxappsendidleevents} - -\membersection{wxApp::OnInit}\label{wxapponinit} - -\func{bool}{OnInit}{\void} - -This must be provided by the application, and will usually create the -application's main window, calling \helpref{wxApp::SetTopWindow}{wxappsettopwindow}. - -Return TRUE to continue processing, FALSE to exit the application. - -\membersection{wxApp::Pending}\label{wxapppending} - -\func{bool}{Pending}{\void} - -Returns TRUE if unprocessed events are in the window system event queue -(MS Windows and Motif). - -\wxheading{See also} - -\helpref{wxApp::Dispatch}{wxappdispatch} - -\membersection{wxApp::ProcessMessage}\label{wxappprocessmessage} - -\func{bool}{ProcessMessage}{\param{MSG *}{msg}} - -Windows-only function for processing a message. This function -is called from the main message loop, checking for windows that -may wish to process it. The function returns TRUE if the message -was processed, FALSE otherwise. If you use wxWindows with another class -library with its own message loop, you should make sure that this -function is called to allow wxWindows to receive messages. For example, -to allow co-existance with the Microsoft Foundation Classes, override -the PreTranslateMessage function: - -\begin{verbatim} -// Provide wxWindows message loop compatibility -BOOL CTheApp::PreTranslateMessage(MSG *msg) -{ - if (wxTheApp && wxTheApp->ProcessMessage(msg)) - return TRUE; - else - return CWinApp::PreTranslateMessage(msg); -} -\end{verbatim} - -\membersection{wxApp::SendIdleEvents}\label{wxappsendidleevents} - -\func{bool}{SendIdleEvents}{\void} - -Sends idle events to all top-level windows. - -\func{bool}{SendIdleEvents}{\param{wxWindow*}{ win}} - -Sends idle events to a window and its children. - -\wxheading{Remarks} - -These functions poll the top-level windows, and their children, for idle event processing. -If TRUE is returned, more OnIdle processing is requested by one or more window. - -\wxheading{See also} - -\helpref{wxApp::OnIdle}{wxapponidle}, \helpref{wxWindow::OnIdle}{wxwindowonidle}, \helpref{wxIdleEvent}{wxidleevent} - -\membersection{wxApp::SetAppName}\label{wxappsetappname} - -\func{void}{SetAppName}{\param{const wxString\& }{name}} - -Sets the name of the application. The name may be used in dialogs -(for example by the document/view framework). A default name is set by -wxWindows. - -\wxheading{See also} - -\helpref{wxApp::GetAppName}{wxappgetappname} - -\membersection{wxApp::SetAuto3D}\label{wxappsetauto3d} - -\func{void}{SetAuto3D}{\param{const bool}{ auto3D}} - -Switches automatic 3D controls on or off. - -\wxheading{Parameters} - -\docparam{auto3D}{If TRUE, all controls will be created with 3D appearances unless -overridden for a control or dialog. The default is TRUE} - -\wxheading{Remarks} - -This has an effect on Windows only. - -\wxheading{See also} - -\helpref{wxApp::GetAuto3D}{wxappgetauto3d} - -\membersection{wxApp::SetClassName}\label{wxappsetclassname} - -\func{void}{SetClassName}{\param{const wxString\& }{name}} - -Sets the class name of the application. This may be used in a platform specific -manner to refer to the application. - -\wxheading{See also} - -\helpref{wxApp::GetClassName}{wxappgetclassname} - -\membersection{wxApp::SetExitOnDelete}\label{wxappsetexitondelete} - -\func{void}{SetExitOnDelete}{\param{bool}{ flag}} - -Allows the programmer to specify whether the application will exit when the -top-level frame is deleted. - -\wxheading{Parameters} - -\docparam{flag}{If TRUE (the default), the application will exit when the top-level frame is -deleted. If FALSE, the application will continue to run.} - -\wxheading{Remarks} - -Currently, setting this to FALSE only has an effect under Windows. - -\membersection{wxApp::SetPrintMode}\label{wxappsetprintmode} - -\func{void}{SetPrintMode}{\param{int}{ mode}} - -Sets the print mode determining what printing facilities will be -used by the printing framework. - -\wxheading{Parameters} - -\docparam{mode}{This can be one of: - -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf wxPRINT\_WINDOWS}}{Under Windows, use Windows printing (wxPrinterDC). This is the -default under Windows.} -\twocolitem{{\bf wxPRINT\_POSTSCRIPT}}{Use PostScript printing (wxPostScriptDC). This is the -default for non-Windows platforms.} -\end{twocollist} -}% - -\membersection{wxApp::SetTopWindow}\label{wxappsettopwindow} - -\func{void}{SetTopWindow}{\param{wxWindow* }{window}} - -Sets the `top' window. You should normally call this from within \helpref{wxApp::OnInit}{wxapponinit} to -let wxWindows know which is the main window. - -\wxheading{Parameters} - -\docparam{window}{The new top window.} - -\wxheading{See also} - -\helpref{wxApp::GetTopWindow}{wxappgettopwindow}, \helpref{wxApp::OnInit}{wxapponinit} - diff --git a/docs/latex/wx/back.gif b/docs/latex/wx/back.gif deleted file mode 100644 index 8a61076d3b..0000000000 Binary files a/docs/latex/wx/back.gif and /dev/null differ diff --git a/docs/latex/wx/bbutton.tex b/docs/latex/wx/bbutton.tex deleted file mode 100644 index be4160c6a3..0000000000 --- a/docs/latex/wx/bbutton.tex +++ /dev/null @@ -1,231 +0,0 @@ -\section{\class{wxBitmapButton}}\label{wxbitmapbutton} - -A bitmap button is a control that contains a bitmap. -It may be placed on a \helpref{dialog box}{wxdialog} or \helpref{panel}{wxpanel}, or indeed -almost any other window. - -\wxheading{Derived from} - -\helpref{wxButton}{wxbutton}\\ -\helpref{wxControl}{wxcontrol}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Remarks} - -A bitmap button can be supplied with a single bitmap, and wxWindows will draw -all button states using this bitmap. If the application needs more control, additional bitmaps for -the selected state, unpressed focussed state, and greyed-out state may be supplied. - -\wxheading{Window styles} - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxBU\_AUTODRAW}}{If -this is specified, the button will be drawn automatically using the label bitmap only, providing -a 3D-look border. If this style is not specified, the button will be drawn without borders and using all -provided bitmaps.} -\end{twocollist} - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Event handling} - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_BUTTON(id, func)}}{Process a wxEVT\_COMMAND\_BUTTON\_CLICKED event, -when the button is clicked.} -\end{twocollist} - -\wxheading{See also} - -\helpref{wxButton}{wxbutton} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxBitmapButton::wxBitmapButton}\label{wxbitmapbuttonconstr} - -\func{}{wxBitmapButton}{\void} - -Default constructor. - -\func{}{wxBitmapButton}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id}, \param{const wxBitmap\& }{bitmap},\rtfsp -\param{const wxPoint\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = wxBU\_AUTODRAW}, \param{const wxValidator\& }{validator}, \param{const wxString\& }{name = ``button"}} - -Constructor, creating and showing a button. - -\wxheading{Parameters} - -\docparam{parent}{Parent window. Must not be NULL.} - -\docparam{id}{Button identifier. A value of -1 indicates a default value.} - -\docparam{bitmap}{Bitmap to be displayed.} - -\docparam{pos}{Button position.} - -\docparam{size}{Button size. If the default size (-1, -1) is specified then the button is sized -appropriately for the bitmap.} - -\docparam{style}{Window style. See \helpref{wxBitmapButton}{wxbitmapbutton}.} - -\docparam{validator}{Window validator.} - -\docparam{name}{Window name.} - -\wxheading{Remarks} - -The {\it bitmap} parameter is normally the only bitmap you need to provide, and wxWindows will -draw the button correctly in its different states. If you want more control, call -any of the functions \helpref{wxBitmapButton::SetBitmapSelected}{wxbitmapbuttonsetbitmapselected},\rtfsp -\helpref{wxBitmapButton::SetBitmapFocus}{wxbitmapbuttonsetbitmapfocus},\rtfsp -\helpref{wxBitmapButton::SetBitmapDisabled}{wxbitmapbuttonsetbitmapdisabled}. - -Note that the bitmap passed is smaller than the actual button created. - -\wxheading{See also} - -\helpref{wxBitmapButton::Create}{wxbitmapbuttoncreate}, \helpref{wxValidator}{wxvalidator} - -\membersection{wxBitmapButton::\destruct{wxBitmapButton}} - -\func{}{\destruct{wxBitmapButton}}{\void} - -Destructor, destroying the button. - -\membersection{wxBitmapButton::Create}\label{wxbitmapbuttoncreate} - -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id}, \param{const wxBitmap\& }{bitmap},\rtfsp -\param{const wxPoint\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = 0}, \param{const wxValidator\& }{validator}, \param{const wxString\& }{name = ``button"}} - -Button creation function for two-step creation. For more details, see \helpref{wxBitmapButton::wxBitmapButton}{wxbitmapbuttonconstr}. - -\membersection{wxBitmapButton::GetBitmapDisabled}\label{wxbitmapbuttongetbitmapdisabled} - -\constfunc{wxBitmap\&}{GetBitmapLabel}{\void} - -Returns the bitmap for the disabled state. - -\wxheading{Return value} - -A reference to the disabled state bitmap. - -\wxheading{See also} - -\helpref{wxBitmapButton::SetBitmapDisabled}{wxbitmapbuttonsetbitmapdisabled} - -\membersection{wxBitmapButton::GetBitmapFocus}\label{wxbitmapbuttongetbitmapfocus} - -\constfunc{wxBitmap\&}{GetBitmapFocus}{\void} - -Returns the bitmap for the focussed state. - -\wxheading{Return value} - -A reference to the focussed state bitmap. - -\wxheading{See also} - -\helpref{wxBitmapButton::SetBitmapFocus}{wxbitmapbuttonsetbitmapfocus} - -\membersection{wxBitmapButton::GetBitmapLabel}\label{wxbitmapbuttongetbitmaplabel} - -\constfunc{wxBitmap\&}{GetBitmapLabel}{\void} - -Returns the label bitmap (the one passed to the constructor). - -\wxheading{Return value} - -A reference to the button's label bitmap. - -\wxheading{See also} - -\helpref{wxBitmapButton::SetBitmapLabel}{wxbitmapbuttonsetbitmaplabel} - -\membersection{wxBitmapButton::GetBitmapSelected}\label{wxbitmapbuttongetbitmapselected} - -\constfunc{wxBitmap\&}{GetBitmapSelected}{\void} - -Returns the bitmap for the selected state. - -\wxheading{Return value} - -A reference to the selected state bitmap. - -\wxheading{See also} - -\helpref{wxBitmapButton::SetBitmapSelected}{wxbitmapbuttonsetbitmapselected} - -\membersection{wxBitmapButton::SetBitmapDisabled}\label{wxbitmapbuttonsetbitmapdisabled} - -\func{void}{SetBitmapDisabled}{\param{const wxBitmap\& }{bitmap}} - -Sets the bitmap for the disabled button appearance. - -\wxheading{Parameters} - -\docparam{bitmap}{The bitmap to set.} - -\wxheading{See also} - -\helpref{wxBitmapButton::GetBitmapDisabled}{wxbitmapbuttongetbitmapdisabled},\rtfsp -\helpref{wxBitmapButton::SetBitmapLabel}{wxbitmapbuttonsetbitmaplabel},\rtfsp -\helpref{wxBitmapButton::SetBitmapSelected}{wxbitmapbuttonsetbitmapselected},\rtfsp -\helpref{wxBitmapButton::SetBitmapFocus}{wxbitmapbuttonsetbitmapfocus} - -\membersection{wxBitmapButton::SetBitmapFocus}\label{wxbitmapbuttonsetbitmapfocus} - -\func{void}{SetBitmapFocus}{\param{const wxBitmap\& }{bitmap}} - -Sets the bitmap for the button appearance when it has the keyboard focus. - -\wxheading{Parameters} - -\docparam{bitmap}{The bitmap to set.} - -\wxheading{See also} - -\helpref{wxBitmapButton::GetBitmapFocus}{wxbitmapbuttongetbitmapfocus},\rtfsp -\helpref{wxBitmapButton::SetBitmapLabel}{wxbitmapbuttonsetbitmaplabel},\rtfsp -\helpref{wxBitmapButton::SetBitmapSelected}{wxbitmapbuttonsetbitmapselected},\rtfsp -\helpref{wxBitmapButton::SetBitmapDisabled}{wxbitmapbuttonsetbitmapdisabled} - -\membersection{wxBitmapButton::SetBitmapLabel}\label{wxbitmapbuttonsetbitmaplabel} - -\func{void}{SetBitmapLabel}{\param{const wxBitmap\& }{bitmap}} - -Sets the bitmap label for the button. - -\wxheading{Parameters} - -\docparam{bitmap}{The bitmap label to set.} - -\wxheading{Remarks} - -This is the bitmap used for the unselected state, and for all other states -if no other bitmaps are provided. - -\wxheading{See also} - -\helpref{wxBitmapButton::GetBitmapLabel}{wxbitmapbuttongetbitmaplabel} - -\membersection{wxBitmapButton::SetBitmapSelected}\label{wxbitmapbuttonsetbitmapselected} - -\func{void}{SetBitmapSelected}{\param{const wxBitmap\& }{bitmap}} - -Sets the bitmap for the selected (depressed) button appearance. - -\wxheading{Parameters} - -\docparam{bitmap}{The bitmap to set.} - -\wxheading{See also} - -\helpref{wxBitmapButton::GetBitmapSelected}{wxbitmapbuttongetbitmapselected},\rtfsp -\helpref{wxBitmapButton::SetBitmapLabel}{wxbitmapbuttonsetbitmaplabel},\rtfsp -\helpref{wxBitmapButton::SetBitmapFocus}{wxbitmapbuttonsetbitmapfocus},\rtfsp -\helpref{wxBitmapButton::SetBitmapDisabled}{wxbitmapbuttonsetbitmapdisabled} - diff --git a/docs/latex/wx/bitmap.tex b/docs/latex/wx/bitmap.tex deleted file mode 100644 index f18676eb78..0000000000 --- a/docs/latex/wx/bitmap.tex +++ /dev/null @@ -1,683 +0,0 @@ -\section{\class{wxBitmap}}\label{wxbitmap} - -%\overview{Overview}{wxbitmapoverview} -% -This class encapsulates the concept of a platform-dependent bitmap, -either monochrome or colour. - -\wxheading{Derived from} - -\helpref{wxGDIObject}{wxgdiobject}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxBitmap overview}{wxbitmapoverview}, \helpref{wxDC::Blit}{wxdcblit}, \helpref{wxIcon}{wxicon}, \helpref{wxCursor}{wxcursor}, \helpref{wxMemoryDC}{wxmemorydc} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxBitmap::wxBitmap}\label{wxbitmapconstr} - -\func{}{wxBitmap}{\void} - -Default constructor. - -\func{}{wxBitmap}{\param{const wxBitmap\& }{bitmap}} - -\func{}{wxBitmap}{\param{const wxBitmap* }{bitmap}} - -Copy constructors. - -\func{}{wxBitmap}{\param{void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}} - -Creates a bitmap from the given data, which can be of arbitrary type. - -\func{}{wxBitmap}{\param{const char}{ bits[]}, \param{int}{ width}, \param{int}{ height}\\ - \param{int}{ depth = 1}} - -Creates a bitmap from an array of bits. - -\func{}{wxBitmap}{\param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}} - -Creates a new bitmap. - -\func{}{wxBitmap}{\param{const char**}{ bits}} - -Creates a bitmap from XPM data. - -\func{}{wxBitmap}{\param{const wxString\& }{name}, \param{long}{ type}} - -Loads a bitmap from a file or resource. - -\wxheading{Parameters} - -\docparam{bits}{Specifies an array of pixel values.} - -\docparam{width}{Specifies the width of the bitmap.} - -\docparam{height}{Specifies the height of the bitmap.} - -\docparam{depth}{Specifies the depth of the bitmap. If this is omitted, the display depth of the -screen is used.} - -\docparam{name}{This can refer to a resource name under MS Windows, or a filename under MS Windows and X. -Its meaning is determined by the {\it flags} parameter.} - -\docparam{type}{May be one of the following: - -\twocolwidtha{5cm} -\begin{twocollist} -\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_BMP}}}{Load a Windows bitmap file.} -\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_BMP\_RESOURCE}}}{Load a Windows bitmap from the resource database.} -\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_GIF}}}{Load a GIF bitmap file.} -\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_XBM}}}{Load an X bitmap file.} -\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_XPM}}}{Load an XPM bitmap file.} -\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_RESOURCE}}}{Load a Windows resource name.} -\end{twocollist} - -The validity of these flags depends on the platform and wxWindows configuration. -If all possible wxWindows settings are used, the Windows platform supports BMP, BMP\_RESOURCE, -XPM\_DATA, and XPM. Under X, the available formats are BMP, GIF, XBM, and XPM.} - -\wxheading{Remarks} - -The first form constructs a bitmap object with no data; an assignment or another member function such as Create -or LoadFile must be called subsequently. - -The second and third forms provide copy constructors. Note that these do not copy the -bitmap data, but instead a pointer to the data, keeping a reference count. They are therefore -very efficient operations. - -The fourth form constructs a bitmap from data whose type and value depends on -the value of the {\it type} argument. - -The fifth form constructs a (usually monochrome) bitmap from an array of pixel values, under both -X and Windows. - -The sixth form constructs a new bitmap. - -The seventh form constructs a bitmap from pixmap (XPM) data, if wxWindows has been configured -to incorporate this feature. - -To use this constructor, you must first include an XPM file. For -example, assuming that the file {\tt mybitmap.xpm} contains an XPM array -of character pointers called mybitmap: - -\begin{verbatim} -#include "mybitmap.xpm" - -... - -wxBitmap *bitmap = new wxBitmap(mybitmap); -\end{verbatim} - -The eighth form constructs a bitmap from a file or resource. {\it name} can refer -to a resource name under MS Windows, or a filename under MS Windows and X. - -Under Windows, {\it type} defaults to wxBITMAP\_TYPE\_BMP\_RESOURCE. -Under X, {\it type} defaults to wxBITMAP\_TYPE\_XBM. - -\wxheading{See also} - -\helpref{wxBitmap::LoadFile}{wxbitmaploadfile} - -\membersection{wxBitmap::\destruct{wxBitmap}} - -\func{}{\destruct{wxBitmap}}{\void} - -Destroys the wxBitmap object and possibly the underlying bitmap data. -Because reference counting is used, the bitmap may not actually be -destroyed at this point - only when the reference count is zero will the -data be deleted. - -If the application omits to delete the bitmap explicitly, the bitmap will be -destroyed automatically by wxWindows when the application exits. - -Do not delete a bitmap that is selected into a memory device context. - -\membersection{wxBitmap::AddHandler}\label{wxbitmapaddhandler} - -\func{static void}{AddHandler}{\param{wxBitmapHandler*}{ handler}} - -Adds a handler to the end of the static list of format handlers. - -\docparam{handler}{A new bitmap format handler object. There is usually only one instance -of a given handler class in an application session.} - -\wxheading{See also} - -\helpref{wxBitmapHandler}{wxbitmaphandler} - -\membersection{wxBitmap::CleanUpHandlers} - -\func{static void}{CleanUpHandlers}{\void} - -Deletes all bitmap handlers. - -This function is called by wxWindows on exit. - -\membersection{wxBitmap::Create} - -\func{virtual bool}{Create}{\param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}} - -Creates a fresh bitmap. If the final argument is omitted, the display depth of -the screen is used. - -\func{virtual bool}{Create}{\param{void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}} - -Creates a bitmap from the given data, which can be of arbitrary type. - -\wxheading{Parameters} - -\docparam{width}{The width of the bitmap in pixels.} - -\docparam{height}{The height of the bitmap in pixels.} - -\docparam{depth}{The depth of the bitmap in pixels. If this is -1, the screen depth is used.} - -\docparam{data}{Data whose type depends on the value of {\it type}.} - -\docparam{type}{A bitmap type identifier - see \helpref{wxBitmap::wxBitmap}{wxbitmapconstr} for a list -of possible values.} - -\wxheading{Return value} - -TRUE if the call succeeded, FALSE otherwise. - -\wxheading{Remarks} - -The first form works on all platforms. The portability of the second form depends on the -type of data. - -\wxheading{See also} - -\helpref{wxBitmap::wxBitmap}{wxbitmapconstr} - -\membersection{wxBitmap::FindHandler} - -\func{static wxBitmapHandler*}{FindHandler}{\param{const wxString\& }{name}} - -Finds the handler with the given name. - -\func{static wxBitmapHandler*}{FindHandler}{\param{const wxString\& }{extension}, \param{long}{ bitmapType}} - -Finds the handler associated with the given extension and type. - -\func{static wxBitmapHandler*}{FindHandler}{\param{long }{bitmapType}} - -Finds the handler associated with the given bitmap type. - -\docparam{name}{The handler name.} - -\docparam{extension}{The file extension, such as ``bmp".} - -\docparam{bitmapType}{The bitmap type, such as wxBITMAP\_TYPE\_BMP.} - -\wxheading{Return value} - -A pointer to the handler if found, NULL otherwise. - -\wxheading{See also} - -\helpref{wxBitmapHandler}{wxbitmaphandler} - -\membersection{wxBitmap::GetDepth} - -\constfunc{int}{GetDepth}{\void} - -Gets the colour depth of the bitmap. A value of 1 indicates a -monochrome bitmap. - -\membersection{wxBitmap::GetHandlers} - -\func{static wxList\&}{GetHandlers}{\void} - -Returns the static list of bitmap format handlers. - -\wxheading{See also} - -\helpref{wxBitmapHandler}{wxbitmaphandler} - -\membersection{wxBitmap::GetHeight}\label{wxbitmapgetheight} - -\constfunc{int}{GetHeight}{\void} - -Gets the height of the bitmap in pixels. - -\membersection{wxBitmap::GetPalette}\label{wxbitmapgetpalette} - -\constfunc{wxPalette*}{GetPalette}{\void} - -Gets the associated palette (if any) which may have been loaded from a file -or set for the bitmap. - -\wxheading{See also} - -\helpref{wxPalette}{wxpalette} - -\membersection{wxBitmap::GetMask}\label{wxbitmapgetmask} - -\constfunc{wxMask*}{GetMask}{\void} - -Gets the associated mask if any) which may have been loaded from a file -or set for the bitmap. - -\wxheading{See also} - -\helpref{wxBitmap::SetMask}{wxbitmapsetmask}, \helpref{wxMask}{wxmask} - -\membersection{wxBitmap::GetWidth}\label{wxbitmapgetwidth} - -\constfunc{int}{GetWidth}{\void} - -Gets the width of the bitmap in pixels. - -\wxheading{See also} - -\helpref{wxBitmap::GetHeight}{wxbitmapgetheight} - -\membersection{wxBitmap::InitStandardHandlers} - -\func{static void}{InitStandardHandlers}{\void} - -Adds the standard bitmap format handlers, which, depending on wxWindows -configuration, can be handlers for Windows bitmap, Windows bitmap resource, and XPM. - -This function is called by wxWindows on startup. - -\wxheading{See also} - -\helpref{wxBitmapHandler}{wxbitmaphandler} - -\membersection{wxBitmap::InsertHandler} - -\func{static void}{InsertHandler}{\param{wxBitmapHandler*}{ handler}} - -Adds a handler at the start of the static list of format handlers. - -\docparam{handler}{A new bitmap format handler object. There is usually only one instance -of a given handler class in an application session.} - -\wxheading{See also} - -\helpref{wxBitmapHandler}{wxbitmaphandler} - -\membersection{wxBitmap::LoadFile}\label{wxbitmaploadfile} - -\func{bool}{LoadFile}{\param{const wxString\&}{ name}, \param{long}{ type}} - -Loads a bitmap from a file or resource. - -\wxheading{Parameters} - -\docparam{name}{Either a filename or a Windows resource name. -The meaning of {\it name} is determined by the {\it type} parameter.} - -\docparam{type}{One of the following values: - -\twocolwidtha{5cm} -\begin{twocollist} -\twocolitem{{\bf wxBITMAP\_TYPE\_BMP}}{Load a Windows bitmap file.} -\twocolitem{{\bf wxBITMAP\_TYPE\_BMP\_RESOURCE}}{Load a Windows bitmap from the resource database.} -\twocolitem{{\bf wxBITMAP\_TYPE\_GIF}}{Load a GIF bitmap file.} -\twocolitem{{\bf wxBITMAP\_TYPE\_XBM}}{Load an X bitmap file.} -\twocolitem{{\bf wxBITMAP\_TYPE\_XPM}}{Load an XPM bitmap file.} -\end{twocollist} - -The validity of these flags depends on the platform and wxWindows configuration.} - -\wxheading{Return value} - -TRUE if the operation succeeded, FALSE otherwise. - -\wxheading{Remarks} - -A palette may be associated with the bitmap if one exists (especially for -colour Windows bitmaps), and if the code supports it. You can check -if one has been created by using the \helpref{GetPalette}{wxbitmapgetpalette} member. - -\wxheading{See also} - -\helpref{wxBitmap::SaveFile}{wxbitmapsavefile} - -\membersection{wxBitmap::Ok}\label{wxbitmapok} - -\constfunc{bool}{Ok}{\void} - -Returns TRUE if bitmap data is present. - -\membersection{wxBitmap::RemoveHandler} - -\func{static bool}{RemoveHandler}{\param{const wxString\& }{name}} - -Finds the handler with the given name, and removes it. The handler -is not deleted. - -\docparam{name}{The handler name.} - -\wxheading{Return value} - -TRUE if the handler was found and removed, FALSE otherwise. - -\wxheading{See also} - -\helpref{wxBitmapHandler}{wxbitmaphandler} - -\membersection{wxBitmap::SaveFile}\label{wxbitmapsavefile} - -\func{bool}{SaveFile}{\param{const wxString\& }{name}, \param{int}{ type}, \param{wxPalette* }{palette = NULL}} - -Saves a bitmap in the named file. - -\wxheading{Parameters} - -\docparam{name}{A filename. The meaning of {\it name} is determined by the {\it type} parameter.} - -\docparam{type}{One of the following values: - -\twocolwidtha{5cm} -\begin{twocollist} -\twocolitem{{\bf wxBITMAP\_TYPE\_BMP}}{Save a Windows bitmap file.} -\twocolitem{{\bf wxBITMAP\_TYPE\_GIF}}{Save a GIF bitmap file.} -\twocolitem{{\bf wxBITMAP\_TYPE\_XBM}}{Save an X bitmap file.} -\twocolitem{{\bf wxBITMAP\_TYPE\_XPM}}{Save an XPM bitmap file.} -\end{twocollist} - -The validity of these flags depends on the platform and wxWindows configuration.} - -\docparam{palette}{An optional palette used for saving the bitmap. TODO: this parameter should -probably be eliminated; instead the app should set the palette before saving.} - -\wxheading{Return value} - -TRUE if the operation succeeded, FALSE otherwise. - -\wxheading{Remarks} - -Depending on how wxWindows has been configured, not all formats may be available. - -\wxheading{See also} - -\helpref{wxBitmap::LoadFile}{wxbitmaploadfile} - -\membersection{wxBitmap::SetDepth}\label{wxbitmapsetdepth} - -\func{void}{SetDepth}{\param{int }{depth}} - -Sets the depth member (does not affect the bitmap data). - -\wxheading{Parameters} - -\docparam{depth}{Bitmap depth.} - -\membersection{wxBitmap::SetHeight}\label{wxbitmapsetheight} - -\func{void}{SetHeight}{\param{int }{height}} - -Sets the height member (does not affect the bitmap data). - -\wxheading{Parameters} - -\docparam{height}{Bitmap height in pixels.} - -\membersection{wxBitmap::SetMask}\label{wxbitmapsetmask} - -\func{void}{SetMask}{\param{wxMask* }{mask}} - -Sets the mask for this bitmap. - -\wxheading{Remarks} - -The bitmap object owns the mask once this has been called. - -\wxheading{See also} - -\helpref{wxBitmap::GetMask}{wxbitmapgetmask}, \helpref{wxMask}{wxmask} - -\membersection{wxBitmap::SetOk} - -\func{void}{SetOk}{\param{int }{isOk}} - -Sets the validity member (does not affect the bitmap data). - -\wxheading{Parameters} - -\docparam{isOk}{Validity flag.} - -\membersection{wxBitmap::SetPalette}\label{wxbitmapsetpalette} - -\func{void}{SetPalette}{\param{wxPalette* }{palette}} - -Sets the associated palette: it will be deleted in the wxBitmap -destructor, so if you do not wish it to be deleted automatically, -reset the palette to NULL before the bitmap is deleted. - -\wxheading{Parameters} - -\docparam{palette}{The palette to set.} - -\wxheading{Remarks} - -The bitmap object owns the palette once this has been called. - -\wxheading{See also} - -\helpref{wxPalette}{wxpalette} - -\membersection{wxBitmap::SetWidth} - -\func{void}{SetWidth}{\param{int }{width}} - -Sets the width member (does not affect the bitmap data). - -\wxheading{Parameters} - -\docparam{width}{Bitmap width in pixels.} - -\membersection{wxBitmap::operator $=$} - -\func{wxBitmap\& }{operator $=$}{\param{const wxBitmap\& }{bitmap}} - -Assignment operator. This operator does not copy any data, but instead -passes a pointer to the data in {\it bitmap} and increments a reference -counter. It is a fast operation. - -\wxheading{Parameters} - -\docparam{bitmap}{Bitmap to assign.} - -\wxheading{Return value} - -Returns 'this' object. - -\membersection{wxBitmap::operator $==$} - -\func{bool}{operator $==$}{\param{const wxBitmap\& }{bitmap}} - -Equality operator. This operator tests whether the internal data pointers are -equal (a fast test). - -\wxheading{Parameters} - -\docparam{bitmap}{Bitmap to compare with 'this'} - -\wxheading{Return value} - -Returns TRUE if the bitmaps were effectively equal, FALSE otherwise. - -\membersection{wxBitmap::operator $!=$} - -\func{bool}{operator $!=$}{\param{const wxBitmap\& }{bitmap}} - -Inequality operator. This operator tests whether the internal data pointers are -unequal (a fast test). - -\wxheading{Parameters} - -\docparam{bitmap}{Bitmap to compare with 'this'} - -\wxheading{Return value} - -Returns TRUE if the bitmaps were unequal, FALSE otherwise. - -\section{\class{wxBitmapHandler}}\label{wxbitmaphandler} - -\overview{Overview}{wxbitmapoverview} - -This is the base class for implementing bitmap file loading/saving, and bitmap creation from data. -It is used within wxBitmap and is not normally seen by the application. - -If you wish to extend the capabilities of wxBitmap, derive a class from wxBitmapHandler -and add the handler using \helpref{wxBitmap::AddHandler}{wxbitmapaddhandler} in your -application initialisation. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxBitmap}{wxbitmap}, \helpref{wxIcon}{wxicon}, \helpref{wxCursor}{wxcursor} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxBitmapHandler::wxBitmapHandler}\label{wxbitmaphandlerconstr} - -\func{}{wxBitmapHandler}{\void} - -Default constructor. In your own default constructor, initialise the members -m\_name, m\_extension and m\_type. - -\membersection{wxBitmapHandler::\destruct{wxBitmapHandler}} - -\func{}{\destruct{wxBitmapHandler}}{\void} - -Destroys the wxBitmapHandler object. - -\membersection{wxBitmapHandler::Create} - -\func{virtual bool}{Create}{\param{wxBitmap* }{bitmap}, \param{void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}} - -Creates a bitmap from the given data, which can be of arbitrary type. The wxBitmap object {\it bitmap} is -manipulated by this function. - -\wxheading{Parameters} - -\docparam{bitmap}{The wxBitmap object.} - -\docparam{width}{The width of the bitmap in pixels.} - -\docparam{height}{The height of the bitmap in pixels.} - -\docparam{depth}{The depth of the bitmap in pixels. If this is -1, the screen depth is used.} - -\docparam{data}{Data whose type depends on the value of {\it type}.} - -\docparam{type}{A bitmap type identifier - see \helpref{wxBitmapHandler::wxBitmapHandler}{wxbitmapconstr} for a list -of possible values.} - -\wxheading{Return value} - -TRUE if the call succeeded, FALSE otherwise (the default). - -\membersection{wxBitmapHandler::GetName} - -\constfunc{wxString}{GetName}{\void} - -Gets the name of this handler. - -\membersection{wxBitmapHandler::GetExtension} - -\constfunc{wxString}{GetExtension}{\void} - -Gets the file extension associated with this handler. - -\membersection{wxBitmapHandler::GetType} - -\constfunc{long}{GetType}{\void} - -Gets the bitmap type associated with this handler. - -\membersection{wxBitmapHandler::LoadFile}\label{wxbitmaphandlerloadfile} - -\func{bool}{LoadFile}{\param{wxBitmap* }{bitmap}, \param{const wxString\&}{ name}, \param{long}{ type}} - -Loads a bitmap from a file or resource, putting the resulting data into {\it bitmap}. - -\wxheading{Parameters} - -\docparam{bitmap}{The bitmap object which is to be affected by this operation.} - -\docparam{name}{Either a filename or a Windows resource name. -The meaning of {\it name} is determined by the {\it type} parameter.} - -\docparam{type}{See \helpref{wxBitmap::wxBitmap}{wxbitmapconstr} for values this can take.} - -\wxheading{Return value} - -TRUE if the operation succeeded, FALSE otherwise. - -\wxheading{See also} - -\helpref{wxBitmap::LoadFile}{wxbitmaploadfile}\\ -\helpref{wxBitmap::SaveFile}{wxbitmapsavefile}\\ -\helpref{wxBitmapHandler::SaveFile}{wxbitmaphandlersavefile} - -\membersection{wxBitmapHandler::SaveFile}\label{wxbitmaphandlersavefile} - -\func{bool}{SaveFile}{\param{wxBitmap* }{bitmap}, \param{const wxString\& }{name}, \param{int}{ type}, \param{wxPalette* }{palette = NULL}} - -Saves a bitmap in the named file. - -\wxheading{Parameters} - -\docparam{bitmap}{The bitmap object which is to be affected by this operation.} - -\docparam{name}{A filename. The meaning of {\it name} is determined by the {\it type} parameter.} - -\docparam{type}{See \helpref{wxBitmap::wxBitmap}{wxbitmapconstr} for values this can take.} - -\docparam{palette}{An optional palette used for saving the bitmap. TODO: this parameter should -probably be eliminated; instead the app should set the palette before saving.} - -\wxheading{Return value} - -TRUE if the operation succeeded, FALSE otherwise. - -\wxheading{See also} - -\helpref{wxBitmap::LoadFile}{wxbitmaploadfile}\\ -\helpref{wxBitmap::SaveFile}{wxbitmapsavefile}\\ -\helpref{wxBitmapHandler::LoadFile}{wxbitmaphandlerloadfile} - -\membersection{wxBitmapHandler::SetName} - -\func{void}{SetName}{\param{const wxString\& }{name}} - -Sets the handler name. - -\wxheading{Parameters} - -\docparam{name}{Handler name.} - -\membersection{wxBitmapHandler::SetExtension} - -\func{void}{SetExtension}{\param{const wxString\& }{extension}} - -Sets the handler extension. - -\wxheading{Parameters} - -\docparam{extension}{Handler extension.} - -\membersection{wxBitmapHandler::SetType} - -\func{void}{SetType}{\param{long }{type}} - -Sets the handler type. - -\wxheading{Parameters} - -\docparam{name}{Handler type.} - - diff --git a/docs/latex/wx/body.tex b/docs/latex/wx/body.tex deleted file mode 100644 index 0379856c00..0000000000 --- a/docs/latex/wx/body.tex +++ /dev/null @@ -1,814 +0,0 @@ -\chapter{Introduction}\label{introduction} -\pagenumbering{arabic}% -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -\section{What is wxWindows?} - -wxWindows is a C++ framework providing GUI (Graphical User -Interface) and other facilities on more than one platform. Version 2.0 currently -supports subsets MS Windows (16-bit, Windows 95 and Windows NT) and GTK. - -wxWindows was originally developed at the Artificial Intelligence -Applications Institute, University of Edinburgh, for internal use. -wxWindows has been released into the public domain in the hope -that others will also find it useful. Version 2.0 is written and -maintained by Julian Smart, Robert Roebling and others. - -This manual discusses wxWindows in the context of multi-platform -development.\helpignore{For more detail on the wxWindows version 2.0 API -(Application Programming Interface) please refer to the separate -wxWindows reference manual.} - -Please note that in the following, ``MS Windows" often refers to all -platforms related to Microsoft Windows, including 16-bit and 32-bit -variants, unless otherwise stated. All trademarks are acknowledged. - -\section{Why another cross-platform development tool?} - -wxWindows was developed to provide a cheap and flexible way to maximize -investment in GUI application development. While a number of commercial -class libraries already exist for cross-platform development, -none met all of the following criteria: - -\begin{enumerate}\itemsep=0pt -\item low price; -\item source availability; -\item simplicity of programming; -\item support for a wide range of compilers. -\end{enumerate} - -As public domain software and a project open to everyone, wxWindows has -benefited from comments, ideas, bug fixes, enhancements and the sheer -enthusiasm of users, especially via the Internet. This gives wxWindows a -certain advantage over its commercial brothers, and a robustness against -the transience of one individual or company. This openness and -availability of source code is especially important when the future of -thousands of lines of application code may depend upon the longevity of -the underlying class library. - -In writing wxWindows, completeness has sometimes been traded for -portability and simplicity of programming. Version 2.0 goes much -further than previous versions in terms of generality and features, -allowing applications to be produced -that are often indistinguishable from those produced using single-platform -toolkits -such as Motif and MFC. - -wxWindows 2.0 currently maps to two native APIs: GTK and -MS Windows. Motif, Xt and Mac ports are also in preparation. - -The importance of using a platform-independent class library cannot be -overstated, since GUI application development is very time-consuming, -and sustained popularity of particular GUIs cannot be guaranteed. -Code can very quickly become obsolete if it addresses the wrong -platform or audience. wxWindows helps to insulate the programmer from -these winds of change. Although wxWindows may not be suitable for -every application, it provides access to most of the functionality a -GUI program normally requires, plus some extras such as form -construction, interprocess communication and PostScript output, and -can of course be extended as needs dictate. As a bonus, it provides -a cleaner programming interface than the native -APIs. Programmers may find it worthwhile to use wxWindows even if they -are developing on only one platform. - -It is impossible to sum up the functionality of wxWindows in a few paragraphs, but -here are some of the benefits: - -\begin{itemize}\itemsep=0pt -\item Low cost (free, in fact!) -\item You get the source. -\item Several example programs. -\item Over 700 pages of printable and on-line documentation. -\item Simple-to-use, object-oriented API. -\item Graphics calls include splines, polylines, rounded rectangles, etc. -\item Constraint-based layout option. -\item Print/preview and document/view architectures. -\item Status line facility, toolbar -\item Easy, object-oriented interprocess comms (DDE subset) under Unix and -MS Windows. -\item Encapsulated PostScript generation under Unix, normal MS Windows printing on the -PC. -\item MDI support under Windows and GTK. -\item Can be used to create DLLs under Windows, dynamic libraries on the Sun. -\item Common dialogs for file browsing, printing, colour selection, etc. -\item Under MS Windows, support for creating metafiles and copying -them to the clipboard. -\item Hypertext help facility, with an API for invocation from applications. -\item Dialog Editor for building dialogs. -\end{itemize} - -\section{Changes from version 1.xx}\label{versionchanges} - -These are a few of the major differences between versions 1.xx and 2.0. - -Removals: - -\begin{itemize}\itemsep=0pt -\item XView is no longer supported; -\item Mac is not yet supported; -\item all controls (panel items) no longer have labels attached to them; -\item wxForm removed; -\item wxCanvasDC, wxPanelDC removed (replaced by wxClientDC, wxWindowDC, wxPaintDC which -can be used for any window); -\item wxMultiText, wxTextWindow, wxText removed and replaced by wxTextCtrl; -\item classes no longer divided into generic and platform-specific parts, for efficiency. -\end{itemize} - -Additions and changes: - -\begin{itemize}\itemsep=0pt -\item class hierarchy changed, and restrictions about subwindow nesting lifted; -\item header files reorganised to conform to normal C++ standards; -\item classes less dependent on each another, to reduce executable size; -\item wxString used instead of char* wherever possible; -\item the number of separate but mandatory utilities reduced; -\item the event system has been overhauled, with -virtual functions and callbacks being replaced with MFC-like event tables; -\item new controls, such as wxTreeCtrl, wxListCtrl, wxSpinButton; -\item less inconsistency about what events can be handled, so for example -mouse clicks or key presses on controls can now be intercepted; -\item the status bar is now a separate class, wxStatusBar, and is -implemented in generic wxWindows code; -\item some renaming of controls for greater consistency; -\item wxBitmap has the notion of bitmap handlers to allow for extension to new formats -without ifdefing; -\item new dialogs: wxPageSetupDialog, wxFileDialog, wxDirDialog, -wxMessageDialog, wxSingleChoiceDialog, wxTextEntryDialog; -\item GDI objects are reference-counted and are now passed to most functions -by reference, making memory management far easier; -\item wxSystemSettings class allows querying for various system-wide properties -such as dialog font, colours, user interface element sizes, and so on; -\item better platform look and feel conformance; -\item toolbar functionality now separated out into a family of classes with the -same API; -\item device contexts are no longer accessed using wxWindow::GetDC - they are created -temporarily with the window as an argument; -\item events from sliders and scrollbars can be handled more flexibly; -\item the handling of window close events has been changed in line with the new -event system, but backward {\bf OnClose} compatibility has been retained; -\item the concept of {\it validator} has been added to allow much easier coding of -the relationship between controls and application data; -\item the documentation has been revised, with more cross-referencing. -\end{itemize} - -Platform-specific changes: - -\begin{itemize}\itemsep=0pt -\item The Windows header file (windows.h) is no longer included by wxWindows headers; -\item wx.dll supported under Visual C++; -\item the full range of Windows 95 window decorations are supported, such as modal frame -borders; -\item MDI classes brought out of wxFrame into separate classes, and made more flexible. -\end{itemize} - -\section{wxWindows requirements}\label{requirements} - -To make use of wxWindows, you currently need one or both of the -following setups. - -(a) PC: - -\begin{enumerate}\itemsep=0pt -\item A 486 or higher PC running MS Windows. -\item One of Microsoft Visual C++ 4.0 or higher, Borland C++, Gnu-Win32. -\item At least 60 MB of disk space. -\end{enumerate} - -(b) Unix: - -\begin{enumerate}\itemsep=0pt -\item Almost any C++ compiler, including GNU C++. -\item Almost any Unix workstation, and GTK 1.0 or higher. -\item At least 60 MB of disk space. -\end{enumerate} - -\section{Availability and location of wxWindows} - -wxWindows is currently available from the Artificial Intelligence -Applications Institute by anonymous FTP and World Wide Web: - -\begin{verbatim} - ftp://ftp.aiai.ed.ac.uk/pub/packages/wxwin - http://web.ukonline.co.uk/julian.smart/wxwin -\end{verbatim} - -\section{Acknowledgments} - -Thanks are due to AIAI for being willing to release the original version of -wxWindows into the public domain, and to our patient wives Harriet, Tanja and others. - -We would particularly like to thank the following for their contributions to wxWindows, and the many others who have been involved in -the project over the years. Apologies for any unintentional omissions from this list. - -Yiorgos Adamopoulos, Jamshid Afshar, Alejandro Aguilar-Sierra, AIAI, Patrick Albert, Karsten Ballueder, Michael Bedward, Kai Bendorf, Yura Bidus, Keith -Gary Boyce, Chris Breeze, Pete Britton, Ian Brown, C. Buckley, Dmitri Chubraev, Robin Corbet, Cecil Coupe, Andrew Davison, Neil Dudman, Robin -Dunn, Hermann Dunkel, Jos van Eijndhoven, Tom Felici, Thomas Fettig, Matthew Flatt, Pasquale Foggia, Josep Fortiana, Todd Fries, Dominic Gallagher, -Wolfram Gloger, Norbert Grotz, Stefan Gunter, Bill Hale, Patrick Halke, Stefan Hammes, Guillaume Helle, Harco de Hilster, Cord Hockemeyer, Markus -Holzem, Olaf Klein, Leif Jensen, Bart Jourquin, Guilhem Lavaux, Jan Lessner, Nicholas Liebmann, Torsten Liermann, Per Lindqvist, Thomas Runge, Tatu -M\"{a}nnist\"{o}, Scott Maxwell, Thomas Myers, Oliver Niedung, Hernan Otero, Ian Perrigo, Timothy Peters, Giordano Pezzoli, Harri Pasanen, Thomaso Paoletti, -Garrett Potts, Marcel Rasche, Robert Roebling, Dino Scaringella, Jobst Schmalenbach, Arthur Seaton, Paul Shirley, Stein Somers, Petr Smilauer, Neil Smith, -Kari Syst\"{a}, Arthur Tetzlaff-Deas, Jonathan Tonberg, Jyrki Tuomi, Janos Vegh, Andrea Venturoli, Vadim Zeitlin, Xiaokun Zhu, Edward Zimmermann. - -`Graphplace', the basis for the wxGraphLayout library, is copyright Dr. Jos -T.J. van Eijndhoven of Eindhoven University of Technology. The code has -been used in wxGraphLayout with his permission. - -We also acknowledge the author of XFIG, the excellent Unix drawing tool, -from the source of which we have borrowed some spline drawing code. -His copyright is included below. - -{\it XFig2.1 is copyright (c) 1985 by Supoj Sutanthavibul. 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.} - -\chapter{Multi-platform development with wxWindows}\label{multiplat} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -This chapter describes the practical details of using wxWindows. Please -see the file install.txt for up-to-date installation instructions, and -changes.txt for differences between versions. - -\section{Include files} - -The main include file is {\tt "wx/wx.h"}; this includes the most commonly -used modules of wxWindows. - -To save on compilation time, include only those header files relevant to the -source file. If you are using precompiled headers, you should include -the following section before any other includes: - -\begin{verbatim} -// For compilers that support precompilation, includes "wx.h". -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -// Include your minimal set of headers here, or wx.h -#include -#endif - -... now your other include files ... -\end{verbatim} - -The file {\tt "wx/wxprec.h"} includes {\tt "wx/wx.h"}. Although this incantation -may seem quirky, it is in fact the end result of a lot of experimentation, -and several Windows compilers to use precompilation (those tested are Microsoft Visual C++, Borland C++ -and Watcom C++). - -Borland precompilation is largely automatic. Visual C++ requires specification of {\tt "wx/wxprec.h"} as -the file to use for precompilation. Watcom C++ is automatic apart from the specification of -the .pch file. Watcom C++ is strange in requiring the precompiled header to be used only for -object files compiled in the same directory as that in which the precompiled header was created. -Therefore, the wxWindows Watcom C++ makefiles go through hoops deleting and recreating -a single precompiled header file for each module, thus preventing an accumulation of many -multi-megabyte .pch files. - -\section{Libraries} - -Please the wxGTK documentation for use of the Unix version of wxWindows. -Under Windows, use the library wx.lib for stand-alone Windows -applications, or wxdll.lib for creating DLLs. - -\section{Configuration} - -The following lists the options configurable in the file -\rtfsp{\tt "wx/msw/setup.h"} and {\tt "wx/gtk/setup.h"} Some settings are a matter -of taste, some help with platform-specific problems, and -others can be set to minimize the size of the library. - -\subsection{General features} - -\begin{twocollist}\itemsep=0pt -\twocolitem{USE\_CLIPBOARD}{If 1, clipboard code is compiled (Windows only).} -\twocolitem{USE\_CONSTRAINTS}{If 1, the constaint-based window layout system is compiled.} -\twocolitem{USE\_DOC\_VIEW\_ARCHITECTURE}{If 1, wxDocument, wxView and related classes are compiled.} -\twocolitem{USE\_DYNAMIC\_CLASSES}{If 1, the run-time class macros and classes are compiled. Recommended, -and necessary for the document/view framework.} -\twocolitem{USE\_HELP}{If 1, interface to help system is compiled.} -\twocolitem{USE\_GAUGE}{If 1, the wxGauge class compiled.} -\twocolitem{USE\_GLOBAL\_MEMORY\_OPERATORS}{If 1, redefines global new and delete operators to be compatible -with the extended arguments of the debugging wxObject new and delete operators. If this causes problems -for your compiler, set to 0.} -\twocolitem{USE\_IPC}{If 1, interprocess communication code is compiled.} -\twocolitem{USE\_MEMORY\_TRACING}{If 1, enables debugging versions of wxObject::new and wxObject::delete -if the value of DEBUG is defined to more than 0.} -\twocolitem{USE\_METAFILE}{If 1, Windows Metafile code is compiled.} -\twocolitem{USE\_POSTSCRIPT}{If 1, PostScript code is compiled.} -\twocolitem{USE\_POSTSCRIPT\_ARCHITECTURE\_IN\_MSW}{Set to 1 to enable the printing architecture -to make use of either native Windows printing facilities, or the wxPostScriptDC class depending -on the wxApp::SetPrintMode setting.} -\twocolitem{USE\_PRINTING\_ARCHITECTURE}{If 1, wxPrinter, wxPrintout and related classes are compiled -for the print/preview framework.} -\twocolitem{USE\_RESOURCES}{If 1, win.ini or .Xdefaults-style resource read/write code is compiled.} -\twocolitem{USE\_WX\_RESOURCES}{If 1, wxWindows resource file (.WXR) code is compiled.} -\end{twocollist} - -\subsection{Windows and NT features} - -\begin{twocollist} -\twocolitem{CTL3D}{CTL3D should only be used for 16-bit Windows programs. -On Windows 95 and NT, native 3D effects are used. If you want to -use it and don't already have CTL3D installed, copy the files in -contrib/ctl3d to appropriate places (ctl3dv2.lib/ctl3d32.lib into your compiler lib -directory, ctl3d.h into an include directory, and ctl3dv2.dll into -windows/system). You may need to find a compiler-specific version of ctl3dv2.lib -or ctl3d32.lib. Define CTL3D to be 1 in wx\_setup.h and link your executables with ctl3dv2.lib -or ctl3d32.lib.} -\twocolitem{USE\_ODBC}{If 1, compiles wxDatabase and wxRecordSet classes for ODBC -access. Requires sql.h, sqlext.h files if set to 1 (see topic on database support).} -\end{twocollist} - -\section{Makefiles} - -At the moment there is no attempt to make Unix makefiles and -PC makefiles compatible, i.e. one makefile is required for -each environment. - -Sample makefiles for Unix (suffix .UNX), MS C++ (suffix .DOS and .NT), Borland -C++ (.BCC) and Symantec C++ (.SC) are included for the library, demos -and utilities. The NT, Borland and Symantec makefiles cannot be -guaranteed to be up-to-date since the author does not have -these compilers. - -The controlling makefile for wxWindows is in the platform-specific -directory, such as {\tt src/msw} or {\tt src/x}. This makefile will -recursively execute the makefile in {\tt src/base}. - -\subsection{Windows makefiles} - -For Microsoft C++, normally it is only necessary to type {\tt nmake -f -makefile.dos} (or an alias or batch file which does this). By default, -binaries are made with debugging information, and no optimization. Use -FINAL=1 on the command line to remove debugging information (this only -really necessary at the link stage), and DLL=1 to make a DLL version of -the library, if building a library. - -\subsection{Unix makefiles} - -TODO. - -Debugging information is included by default; you may add DEBUG= as an -argument to make to compile without it, or use the Unix {\bf strip} -command to remove debugging information from an executable. - -\normalbox{{\it Important note:} Most compiler flags are kept centrally in -src/make.env, which is included by all other makefiles. This is the -file to edit to tailor wxWindows compilation to your environment.} - -\section{Windows-specific files} - -wxWindows application compilation under MS Windows requires at least two -extra files, resource and module definition files. - -\subsection{Resource file}\label{resources} - -The least that must be defined in the Windows resource file (extension RC) -is the following statement: - -\begin{verbatim} -rcinclude "wx/msw/wx.rc" -\end{verbatim} - -which includes essential internal wxWindows definitions. The resource script -may also contain references to icons, cursors, etc., for example: - -\begin{verbatim} -wxicon icon wx.ico -\end{verbatim} - -The icon can then be referenced by name when creating a frame icon. See -the MS Windows SDK documentation. - -\normalbox{Note: include wx.rc {\it after} any ICON statements -so programs that search your executable for icons (such -as the Program Manager) find your application icon first.} - -\subsection{Module definition file} - -A module definition file (extension DEF) is required for 16-bit applications, and -looks like the following: - -\begin{verbatim} -NAME Hello -DESCRIPTION 'Hello' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 8192 -\end{verbatim} - -The only lines which will usually have to be changed per application are -NAME and DESCRIPTION. - -\subsection{Allocating and deleting wxWindows objects} - -In general, classes derived from wxWindow must dynamically allocated -with {\it new} and deleted with {\it delete}. If you delete a window, -all of its children and descendants will be automatically deleted, -so you don't need to delete these descendants explicitly. - -When deleting a frame or dialog, use {\bf Destroy} rather than {\bf delete} so -that the wxWindows delayed deletion can take effect. This waits until idle time -(when all messages have been processed) to actually delete the window, to avoid -problems associated with the GUI sending events to deleted windows. - -Don't create a window on the stack, because this will interfere -with delayed deletion. - -If you decide to allocate a C++ array of objects (such as wxBitmap) that may -be cleaned up by wxWindows, make sure you delete the array explicitly -before wxWindows has a chance to do so on exit, since calling {\it delete} on -array members will cause memory problems. - -wxColour can be created statically: it is not automatically cleaned -up and is unlikely to be shared between other objects; it is lightweight -enough for copies to be made. - -Beware of deleting objects such as a wxPen or wxBitmap if they are still in use. -Windows is particularly sensitive to this: so make sure you -make calls like wxDC::SetPen(wxNullPen) or wxDC::SelectObject(wxNullBitmap) before deleting -a drawing object that may be in use. Code that doesn't do this will probably work -fine on some platforms, and then fail under Windows. - -\section{Conditional compilation} - -One of the purposes of wxWindows is to reduce the need for conditional -compilation in source code, which can be messy and confusing to follow. -However, sometimes it is necessary to incorporate platform-specific -features (such as metafile use under MS Windows). The following identifiers -may be used for this purpose, along with any user-supplied ones: - -{\bf GUIs:} - -\begin{verbatim} -__X__ any X, but not GTK -__WXMOTIF__ Motif -__WXGTK__ GTK -__WXMSW__ Any Windows -__MAC__ MacOS -__UNIX__ any Unix -__WIN95__ GUI for Windows 95 and above; NT 4.0 and above. -__WIN32__ WIN32 API -__NT__ Windows NT -__CURSES__ CURSES -\end{verbatim} - -{\bf OSes:} - -\begin{verbatim} -__HPUX__ -__SVR4__ -__SYSV__ -__LINUX__ -__SGI__ -__ULTRIX__ -__BSD__ -__VMS__ -__SUN__ Any Sun -__SUNOS__ -__SOLARIS__ -__ALPHA__ -__AIX__ -__DATA_GENERAL__ -__OSF__ -__FREEBSD__ -\end{verbatim} - -{\bf Compilers:} - -\begin{verbatim} -__GNUWIN32__ Gnu-Win32 compiler -__DJGPP__ DJGPP -__GNUG__ Gnu C++ on any platform -__BORLANDC__ Borland C++ -__WATCOMC__ Watcom C++ -__SYMANTECC__ Symantec C++ -__VISUALC__ VC++ -__SUNCC__ -\end{verbatim} - -{\bf wxWindows modes:} - -\begin{verbatim} -__WXDEBUG__ usage: #ifdef __DEBUG__ (=> debug mode, else => release) -\end{verbatim} - - -\section{C++ issues} - -The following documents some miscellaneous C++ issues. - -\subsection{Templates} - -wxWindows does not use templates since it is a notoriously unportable feature. - -\subsection{Precompiled headers} - -Some compilers, such as Borland C++ and Microsoft C++, support -precompiled headers. This can save a great deal of compiling time. The -recommended approach is to precompile {\tt ``wx.h''}, using this -precompiled header for compiling both wxWindows itself and any -wxWindows applications. For Windows compilers, two dummy source files -are provided (one for normal applications and one for creating DLLs) -to allow initial creation of the precompiled header. - -However, there are several downsides to using precompiled headers. One -is that to take advantage of the facility, you often need to include -more header files than would normally be the case. This means that -changing a header file will cause more recompilations (in the case of -wxWindows, everything needs to be recompiled since everything includes -{\tt ``wx.h''}!) - -A related problem is that for compilers that don't have precompiled -headers, including a lot of header files slows down compilation -considerably. For this reason, you will find (in the common -X and Windows parts of the library) conditional -compilation that under Unix, includes a minimal set of headers; -and when using Visual C++, includes {\tt wx.h}. This should help provide -the optimal compilation for each compiler, although it is -biassed towards the precompiled headers facility available -in Microsoft C++. - -\section{File handling} - -When building an application which may be used under different -environments, one difficulty is coping with documents which may be -moved to different directories on other machines. Saving a file which -has pointers to full pathnames is going to be inherently unportable. One -approach is to store filenames on their own, with no directory -information. The application searches through a number of locally -defined directories to find the file. To support this, the class {\bf -wxPathList} makes adding directories and searching for files easy, and -the global function {\bf FileNameFromPath} allows the application to -strip off the filename from the path if the filename must be stored. -This has undesirable ramifications for people who have documents of the -same name in different directories. - -As regards the limitations of DOS 8+3 single-case filenames versus -unrestricted Unix filenames, the best solution is to use DOS filenames -for your application, and also for document filenames {\it if} the user -is likely to be switching platforms regularly. Obviously this latter -choice is up to the application user to decide. Some programs (such as -YACC and LEX) generate filenames incompatible with DOS; the best -solution here is to have your Unix makefile rename the generated files -to something more compatible before transferring the source to DOS. -Transferring DOS files to Unix is no problem, of course, apart from EOL -conversion for which there should be a utility available (such as -dos2unix). - -See also the File Functions section of the reference manual for -descriptions of miscellaneous file handling functions. - -\chapter{Utilities supplied with wxWindows}\label{utilities} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -A number of `extras' are supplied with wxWindows, to complement -the GUI functionality in the main class library. These are found -below the utils directory and usually have their own source, library -and documentation directories. For larger user-contributed packages, -see the directory /pub/packages/wxwin/contrib. - -\section{wxHelp}\label{wxhelp} - -wxHelp is a stand-alone program, written using wxWindows, -for displaying hypertext help. It is necessary since not all target -systems (notably X) supply an adequate -standard for on-line help. wxHelp is modelled on the MS Windows help -system, with contents, search and browse buttons, but does not reformat -text to suit the size of window, as WinHelp does, and its input files -are uncompressed ASCII with some embedded font commands and an .xlp -extension. Most wxWindows documentation (user manuals and class -references) is supplied in wxHelp format, and also in Windows Help -format. The wxWindows 2.0 project will presently use an HTML widget -in a new and improved wxHelp implementation, under X. - -Note that an application can be programmed to use Windows Help under -MS Windows, and wxHelp under X. An alternative help viewer under X is -Mosaic, a World Wide Web viewer that uses HTML as its native hypertext -format. However, this is not currently integrated with wxWindows -applications. - -wxHelp works in two modes---edit and end-user. In edit mode, an ASCII -file may be marked up with different fonts and colours, and divided into -sections. In end-user mode, no editing is possible, and the user browses -principally by clicking on highlighted blocks. - -When an application invokes wxHelp, subsequent sections, blocks or -files may be viewed using the same instance of wxHelp since the two -programs are linked using wxWindows interprocess communication -facilities. When the application exits, that application's instance of -wxHelp may be made to exit also. See the {\bf wxHelpControllerBase} entry in the -reference section for how an application controls wxHelp. - -\section{Tex2RTF}\label{textortf} - -Supplied with wxWindows is a utility called Tex2RTF for converting\rtfsp -\LaTeX\ manuals to the following formats: - -\begin{description} -\item[wxHelp] -wxWindows help system format (XLP). -\item[Linear RTF] -Rich Text Format suitable for importing into a word processor. -\item[Windows Help RTF] -Rich Text Format suitable for compiling into a WinHelp HLP file with the -help compiler. -\item[HTML] -HTML is the native format for Mosaic, the main hypertext viewer for -the World Wide Web. Since it is freely available it is a good candidate -for being the wxWindows help system under X, as an alternative to wxHelp. -\end{description} - -Tex2RTF is used for the wxWindows manuals and can be used independently -by authors wishing to create on-line and printed manuals from the same\rtfsp -\LaTeX\ source. Please see the separate documentation for Tex2RTF. - -\section{wxTreeLayout} - -This is a simple class library for drawing trees in a reasonably pretty -fashion. It provides only minimal default drawing capabilities, since -the algorithm is meant to be used for implementing custom tree-based -tools. - -Directed graphs may also be drawn using this library, if cycles are -removed before the nodes and arcs are passed to the algorithm. - -Tree displays are used in many applications: directory browsers, -hypertext systems, class browsers, and decision trees are a few -possibilities. - -See the separate manual and the directory utils/wxtree. - -\section{wxGraphLayout} - -The wxGraphLayout class is based on a tool called `graphplace' by Dr. -Jos T.J. van Eijndhoven of Eindhoven University of Technology. Given a -(possibly cyclic) directed graph, it does its best to lay out the nodes -in a sensible manner. There are many applications (such as diagramming) -where it is required to display a graph with no human intervention. Even -if manual repositioning is later required, this algorithm can make a good -first attempt. - -See the separate manual and the directory utils/wxgraph. - -\section{Colours}\label{coloursampler} - -A colour sampler for viewing colours and their names on each -platform. - -% -\chapter{Tutorial}\label{tutorial} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -To be written. - -\chapter{Programming strategies}\label{strategies} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -This chapter is intended to list strategies that may be useful when -writing and debugging wxWindows programs. If you have any good tips, -please submit them for inclusion here. - -\section{Strategies for reducing programming errors} - -\subsection{Use ASSERT} - -Although I haven't done this myself within wxWindows, it is good -practice to use ASSERT statements liberally, that check for conditions that -should or should not hold, and print out appropriate error messages. -These can be compiled out of a non-debugging version of wxWindows -and your application. Using ASSERT is an example of `defensive programming': -it can alert you to problems later on. - -\subsection{Use wxString in preference to character arrays} - -Using wxString can be much safer and more convenient than using char *. -Again, I haven't practised what I'm preaching, but I'm now trying to use -wxString wherever possible. You can reduce the possibility of memory -leaks substantially, and it's much more convenient to use the overloaded -operators than functions such as strcmp. wxString won't add a significant -overhead to your program; the overhead is compensated for by easier -manipulation (which means less code). - -The same goes for other data types: use classes wherever possible. - -\section{Strategies for portability} - -\subsection{Use relative positioning or constraints} - -Don't use absolute panel item positioning if you can avoid it. Different GUIs have -very differently sized panel items. Consider using the constraint system, although this -can be complex to program. If you needs are simple, the default relative positioning -behaviour may be adequate (using default position values and wxPanel::NewLine). - -Alternatively, you could use alternative .wrc (wxWindows resource files) on different -platforms, with slightly different dimensions in each. Or space your panel items out -to avoid problems. - -\subsection{Use wxWindows resource files} - -Use .wrc (wxWindows resource files) where possible, because they can be easily changed -independently of source code. Bitmap resources can be set up to load different -kinds of bitmap depending on platform (see the section on resource files). - -\section{Strategies for debugging} - -\subsection{Positive thinking} - -It's common to blow up the problem in one's imagination, so that it seems to threaten -weeks, months or even years of work. The problem you face may seem insurmountable: -but almost never is. Once you have been programming for some time, you will be able -to remember similar incidents that threw you into the depths of despair. But -remember, you always solved the problem, somehow! - -Perseverance is often the key, even though a seemingly trivial problem -can take an apparently inordinate amount of time to solve. In the end, -you will probably wonder why you worried so much. That's not to say it -isn't painful at the time. Try not to worry -- there are many more important -things in life. - -\subsection{Simplify the problem} - -Reduce the code exhibiting the problem to the smallest program possible -that exhibits the problem. If it is not possible to reduce a large and -complex program to a very small program, then try to ensure your code -doesn't hide the problem (you may have attempted to minimize the problem -in some way: but now you want to expose it). - -With luck, you can add a small amount of code that causes the program -to go from functioning to non-functioning state. This should give a clue -to the problem. In some cases though, such as memory leaks or wrong -deallocation, this can still give totally spurious results! - -\subsection{Genetic mutation} - -If we had sophisticated genetic algorithm tools that could be applied -to programming, we could use them. Until then, a common -- if rather irrational -- -technique is to just make arbitrary changes to the code until something -different happens. You may have an intuition why a change will make a difference; -otherwise, just try altering the order of code, comment lines out, anything -to get over an impasse. Obviously, this is usually a last resort. - -\subsection{Use a debugger} - -This sounds like facetious advice, but it's surprising how often people -don't use a debugger. Often it's an overhead to install or learn how to -use a debugger, but it really is essential for anything but the most -trivial programs. Some platforms don't allow for debugging, such -as WIN32s under Windows 3.x. In this case, you might be advised to -debug under 16-bit Windows and when you're confident, compile for -WIN32s. In fact WIN32s can be very strict about bad memory handling, -so testing out under WIN32s is a good thing to do even if you're -not going to distribute this version. (Unless you've got a good memory checking, -utility, of course!) Tracking bugs under WIN32s can involve a lot of debug message -insertion and relinking, so make sure your compiler has a fast linker -(e.g. Watcom, Symantec). - -\subsection{Use tracing code} - -You can use wxDebugMsg statements (or the wxDebugStreamBuf class) to -output to a debugging window such as DBWIN under Windows, or standard -error under X. If compiling in DEBUG mode, you can use TRACE statements -that will be compiled out of the final build of your application. - -Using tracing statements may be more convenient than using the debugger -in some circumstances (such as when your debugger doesn't support a lot -of debugging code, or you wish to print a bunch of variables). - -\subsection{Use wxObject::Dump and the wxDebugContext class} - -It's good practice to implement the Dump member function for all -classes derived from wxObject. You can then make use of wxDebugContext -to dump out information on all objects in the program, if DEBUG is -defined to be more than zero. You can use wxDebugContext to check for -memory leaks and corrupt memory. See the debugging topic in the -reference manual for more information. - -\subsection{Check Windows debug messages} - -Under Windows, it's worth running your program with DBWIN running or -some other program that shows Windows-generated debug messages. It's -possible it'll show invalid handles being used. You may have fun seeing -what commercial programs cause these normally hidden errors! Microsoft -recommend using the debugging version of Windows, which shows up even -more problems. However, I doubt it's worth the hassle for most -applications. wxWindows is designed to minimize the possibility of such -errors, but they can still happen occasionally, slipping through unnoticed -because they are not severe enough to cause a crash. diff --git a/docs/latex/wx/book1.bmp b/docs/latex/wx/book1.bmp deleted file mode 100644 index 3aa28011b9..0000000000 Binary files a/docs/latex/wx/book1.bmp and /dev/null differ diff --git a/docs/latex/wx/books.bmp b/docs/latex/wx/books.bmp deleted file mode 100644 index cf1e148734..0000000000 Binary files a/docs/latex/wx/books.bmp and /dev/null differ diff --git a/docs/latex/wx/books.gif b/docs/latex/wx/books.gif deleted file mode 100644 index 036d016fb1..0000000000 Binary files a/docs/latex/wx/books.gif and /dev/null differ diff --git a/docs/latex/wx/brush.tex b/docs/latex/wx/brush.tex deleted file mode 100644 index d707dcf875..0000000000 --- a/docs/latex/wx/brush.tex +++ /dev/null @@ -1,343 +0,0 @@ -\section{\class{wxBrush}}\label{wxbrush} - -A brush is a drawing tool for filling in areas. It is used for painting -the background of rectangles, ellipses, etc. It has a colour and a -style. - -\wxheading{Derived from} - -\helpref{wxGDIObject}{wxgdiobject}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Remarks} - -On a monochrome display, wxWindows shows -all brushes as white unless the colour is really black. - -Do not initialize objects on the stack before the program commences, -since other required structures may not have been set up yet. Instead, -define global pointers to objects and create them in \helpref{wxApp::OnInit}{wxapponinit} or -when required. - -An application may wish to create brushes with different -characteristics dynamically, and there is the consequent danger that a -large number of duplicate brushes will be created. Therefore an -application may wish to get a pointer to a brush by using the global -list of brushes {\bf wxTheBrushList}, and calling the member function -\rtfsp{\bf FindOrCreateBrush}. - -wxBrush uses a reference counting system, so assignments between brushes are very -cheap. You can therefore use actual wxBrush objects instead of pointers without -efficiency problems. Bear in mind, though, that changing a brush's properties may -affect another brush which has been involved in an assignment with the first brush, -because of the way internal brush data is shared. - -TODO: an overview for wxBrush. - -\wxheading{See also} - -\helpref{wxBrushList}{wxbrushlist}, \helpref{wxDC}{wxdc}, \helpref{wxDC::SetBrush}{wxdcsetbrush} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxBrush::wxBrush} - -\func{}{wxBrush}{\void} - -Default constructor. The brush will be uninitialised, and \helpref{wxBrush::Ok}{wxbrushok} will -return FALSE. - -\func{}{wxBrush}{\param{const wxColour\&}{ colour}, \param{int}{ style}} - -Constructs a brush from a colour object and style. - -\func{}{wxBrush}{\param{const wxString\& }{colourName}, \param{int}{ style}} - -Constructs a brush from a colour name and style. - -\func{}{wxBrush}{\param{const wxBitmap\& }{stippleBitmap}} - -Constructs a stippled brush using a bitmap. - -\func{}{wxBrush}{\param{const wxBrush\&}{ brush}} - -Copy constructor. This uses reference counting so is a cheap operation. - -\func{}{wxBrush}{\param{const wxBrush*}{ brush}} - -Copy constructor. This uses reference counting so is a cheap operation. - -\wxheading{Parameters} - -\docparam{colour}{Colour object.} - -\docparam{colourName}{Colour name. The name will be looked up in the colour database.} - -\docparam{style}{One of: - -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf wxTRANSPARENT}}{Transparent (no fill).} -\twocolitem{{\bf wxSOLID}}{Solid.} -\twocolitem{{\bf wxBDIAGONAL\_HATCH}}{Backward diagonal hatch.} -\twocolitem{{\bf wxCROSSDIAG\_HATCH}}{Cross-diagonal hatch.} -\twocolitem{{\bf wxFDIAGONAL\_HATCH}}{Forward diagonal hatch.} -\twocolitem{{\bf wxCROSS\_HATCH}}{Cross hatch.} -\twocolitem{{\bf wxHORIZONTAL\_HATCH}}{Horizontal hatch.} -\twocolitem{{\bf wxVERTICAL\_HATCH}}{Vertical hatch.} -\end{twocollist}} - -\docparam{brush}{Pointer or reference to a brush to copy.} - -\docparam{stippleBitmap}{A bitmap to use for stippling.} - -\wxheading{Remarks} - -If a stipple brush is created, the brush style will be set to wxSTIPPLE. - -\wxheading{See also} - -\helpref{wxBrushList}{wxbrushlist}, \helpref{wxColour}{wxcolour}, \helpref{wxColourDatabase}{wxcolourdatabase} - -\membersection{wxBrush::\destruct{wxBrush}} - -\func{void}{\destruct{wxBrush}}{\void} - -Destructor. - -\wxheading{Remarks} - -The destructor may not delete the underlying brush object of the native windowing -system, since wxBrush uses a reference counting system for efficiency. - -Although all remaining brushes are deleted when the application exits, -the application should try to clean up all brushes itself. This is because -wxWindows cannot know if a pointer to the brush object is stored in an -application data structure, and there is a risk of double deletion. - -\membersection{wxBrush::GetColour}\label{wxbrushgetcolour} - -\constfunc{wxColour\&}{GetColour}{\void} - -Returns a reference to the brush colour. - -\wxheading{See also} - -\helpref{wxBrush::SetColour}{wxbrushsetcolour} - -\membersection{wxBrush::GetStipple}\label{wxbrushgetstipple} - -\constfunc{wxBitmap *}{GetStipple}{\void} - -Gets a pointer to the stipple bitmap. If the brush does not have a wxSTIPPLE style, -this bitmap may be non-NULL but uninitialised (\helpref{wxBitmap::Ok}{wxbitmapok} returns FALSE). - -\wxheading{See also} - -\helpref{wxBrush::SetStipple}{wxbrushsetstipple} - -\membersection{wxBrush::GetStyle}\label{wxbrushgetstyle} - -\constfunc{int}{GetStyle}{\void} - -Returns the brush style, one of: - -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf wxTRANSPARENT}}{Transparent (no fill).} -\twocolitem{{\bf wxSOLID}}{Solid.} -\twocolitem{{\bf wxBDIAGONAL\_HATCH}}{Backward diagonal hatch.} -\twocolitem{{\bf wxCROSSDIAG\_HATCH}}{Cross-diagonal hatch.} -\twocolitem{{\bf wxFDIAGONAL\_HATCH}}{Forward diagonal hatch.} -\twocolitem{{\bf wxCROSS\_HATCH}}{Cross hatch.} -\twocolitem{{\bf wxHORIZONTAL\_HATCH}}{Horizontal hatch.} -\twocolitem{{\bf wxVERTICAL\_HATCH}}{Vertical hatch.} -\twocolitem{{\bf wxSTIPPLE}}{Stippled using a bitmap.} -\end{twocollist} - -\wxheading{See also} - -\helpref{wxBrush::SetStyle}{wxbrushsetstyle}, \helpref{wxBrush::SetColour}{wxbrushsetcolour},\rtfsp -\helpref{wxBrush::SetStipple}{wxbrushsetstipple} - -\membersection{wxBrush::Ok}\label{wxbrushok} - -\constfunc{bool}{Ok}{\void} - -Returns TRUE if the brush is initialised. It will return FALSE if the default -constructor has been used (for example, the brush is a member of a class, or -NULL has been assigned to it). - -\membersection{wxBrush::SetColour}\label{wxbrushsetcolour} - -\func{void}{SetColour}{\param{wxColour\& }{colour}} - -Sets the brush colour using a reference to a colour object. - -\func{void}{SetColour}{\param{const wxString\& }{colourName}} - -Sets the brush colour using a colour name from the colour database. - -\func{void}{SetColour}{\param{const unsigned char}{ red}, \param{const unsigned char}{ green}, \param{const unsigned char}{ blue}} - -Sets the brush colour using red, green and blue values. - -\wxheading{See also} - -\helpref{wxBrush::GetColour}{wxbrushgetcolour} - -\membersection{wxBrush::SetStipple}\label{wxbrushsetstipple} - -\func{void}{SetStipple}{\param{const wxBitmap\&}{ bitmap}} - -Sets the stipple bitmap. - -\wxheading{Parameters} - -\docparam{bitmap}{The bitmap to use for stippling.} - -\wxheading{Remarks} - -The style will be set to wxSTIPPLE. - -Note that there is a big difference between stippling in X and Windows. -On X, the stipple is a mask between the wxBitmap and current colour. -On Windows, the current colour is ignored, and the bitmap colour is used. -However, for pre-defined modes like wxCROSS\_HATCH, the behaviour is the -same for both platforms. - -\wxheading{See also} - -\helpref{wxBitmap}{wxbitmap} - -\membersection{wxBrush::SetStyle}\label{wxbrushsetstyle} - -\func{void}{SetStyle}{\param{int}{ style}} - -Sets the brush style. - -\docparam{style}{One of: - -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf wxTRANSPARENT}}{Transparent (no fill).} -\twocolitem{{\bf wxSOLID}}{Solid.} -\twocolitem{{\bf wxBDIAGONAL\_HATCH}}{Backward diagonal hatch.} -\twocolitem{{\bf wxCROSSDIAG\_HATCH}}{Cross-diagonal hatch.} -\twocolitem{{\bf wxFDIAGONAL\_HATCH}}{Forward diagonal hatch.} -\twocolitem{{\bf wxCROSS\_HATCH}}{Cross hatch.} -\twocolitem{{\bf wxHORIZONTAL\_HATCH}}{Horizontal hatch.} -\twocolitem{{\bf wxVERTICAL\_HATCH}}{Vertical hatch.} -\twocolitem{{\bf wxSTIPPLE}}{Stippled using a bitmap.} -\end{twocollist}} - -\wxheading{See also} - -\helpref{wxBrush::GetStyle}{wxbrushgetstyle} - -\membersection{wxBrush::operator $=$}\label{wxbrushassignment} - -\func{wxBrush\&}{operator $=$}{\param{const wxBrush\& }{brush}} - -Assignment operator, using reference counting. Returns a reference -to `this'. - -\membersection{wxBrush::operator $==$}\label{wxbrushequals} - -\func{bool}{operator $==$}{\param{const wxBrush\& }{brush}} - -Equality operator. Two brushes are equal if they contain pointers -to the same underlying brush data. It does not compare each attribute, -so two independently-created brushes using the same parameters will -fail the test. - -\membersection{wxBrush::operator $!=$}\label{wxbrushnotequals} - -\func{bool}{operator $!=$}{\param{const wxBrush\& }{brush}} - -Inequality operator. Two brushes are not equal if they contain pointers -to different underlying brush data. It does not compare each attribute. - -\section{\class{wxBrushList}}\label{wxbrushlist} - -A brush list is a list containing all brushes which have been created. - -\wxheading{Derived from} - -\helpref{wxList}{wxlist}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Remarks} - -There is only one instance of this class: {\bf wxTheBrushList}. Use -this object to search for a previously created brush of the desired -type and create it if not already found. In some windowing systems, -the brush may be a scarce resource, so it can pay to reuse old -resources if possible. When an application finishes, all brushes will -be deleted and their resources freed, eliminating the possibility of -`memory leaks'. However, it is best not to rely on this automatic -cleanup because it can lead to double deletion in some circumstances. - -There are two mechanisms in recent versions of wxWindows which make the -brush list less useful than it once was. Under Windows, scarce resources -are cleaned up internally if they are not being used. Also, a referencing -counting mechanism applied to all GDI objects means that some sharing -of underlying resources is possible. You don't have to keep track of pointers, -working out when it is safe delete a brush, because the referencing counting does -it for you. For example, you can set a brush in a device context, and then -immediately delete the brush you passed, because the brush is `copied'. - -So you may find it easier to ignore the brush list, and instead create -and copy brushes as you see fit. If your Windows resource meter suggests -your application is using too many resources, you can resort to using -GDI lists to share objects explicitly. - -The only compelling use for the brush list is for wxWindows to keep -track of brushes in order to clean them up on exit. It is also kept for -backward compatibility with earlier versions of wxWindows. - -\wxheading{See also} - -\helpref{wxBrush}{wxbrush} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxBrushList::wxBrushList}\label{wxbrushlistconstr} - -\func{void}{wxBrushList}{\void} - -Constructor. The application should not construct its own brush list: -use the object pointer {\bf wxTheBrushList}. - -\membersection{wxBrushList::AddBrush}\label{wxbrushlistaddbrush} - -\func{void}{AddBrush}{\param{wxBrush *}{brush}} - -Used internally by wxWindows to add a brush to the list. - -\membersection{wxBrushList::FindOrCreateBrush}\label{wxbrushlistfindorcreatebrush} - -\func{wxBrush *}{FindOrCreateBrush}{\param{const wxColour\& }{colour}, \param{int}{ style}} - -Finds a brush with the specified attributes and returns it, else creates a new brush, adds it -to the brush list, and returns it. - -\func{wxBrush *}{FindOrCreateBrush}{\param{const wxString\& }{colourName}, \param{int}{ style}} - -Finds a brush with the specified attributes and returns it, else creates a new brush, adds it -to the brush list, and returns it. - -Finds a brush of the given specification, or creates one and adds it to the list. - -\wxheading{Parameters} - -\docparam{colour}{Colour object.} - -\docparam{colourName}{Colour name, which should be in the colour database.} - -\docparam{style}{Brush style. See \helpref{wxBrush::SetStyle}{wxbrushsetstyle} for a list of styles.} - -\membersection{wxBrushList::RemoveBrush}\label{wxbrushlistremovebrush} - -\func{void}{RemoveBrush}{\param{wxBrush *}{brush}} - -Used by wxWindows to remove a brush from the list. - - diff --git a/docs/latex/wx/bullet.bmp b/docs/latex/wx/bullet.bmp deleted file mode 100644 index 6481f5143b..0000000000 Binary files a/docs/latex/wx/bullet.bmp and /dev/null differ diff --git a/docs/latex/wx/button.tex b/docs/latex/wx/button.tex deleted file mode 100644 index 4b92248274..0000000000 --- a/docs/latex/wx/button.tex +++ /dev/null @@ -1,134 +0,0 @@ -\section{\class{wxButton}}\label{wxbutton} - -A button is a control that contains a text string, -and is one of the commonest elements of a GUI. It may be placed on a -\rtfsp\helpref{dialog box}{wxdialog} or \helpref{panel}{wxpanel}, or indeed -almost any other window. - -\wxheading{Derived from} - -\helpref{wxControl}{wxcontrol}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -There are no special styles for wxButton. - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Event handling} - -\twocolwidtha{7cm}% -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_BUTTON(id, func)}}{Process a wxEVT\_COMMAND\_BUTTON\_CLICKED event, -when the button is clicked.} -\end{twocollist} - -\wxheading{See also} - -\helpref{wxBitmapButton}{wxbitmapbutton} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxButton::wxButton}\label{wxbuttonconstr} - -\func{}{wxButton}{\void} - -Default constructor. - -\func{}{wxButton}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id}, \param{const wxString\& }{label},\rtfsp -\param{const wxPoint\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = 0}, \param{const wxValidator\& }{validator}, \param{const wxString\& }{name = ``button"}} - -Constructor, creating and showing a button. - -\wxheading{Parameters} - -\docparam{parent}{Parent window. Must not be NULL.} - -\docparam{id}{Button identifier. A value of -1 indicates a default value.} - -\docparam{label}{Text to be displayed on the button.} - -\docparam{pos}{Button position.} - -\docparam{size}{Button size. If the default size (-1, -1) is specified then the button is sized -appropriately for the text.} - -\docparam{style}{Window style. See \helpref{wxButton}{wxbutton}.} - -\docparam{validator}{Window validator.} - -\docparam{name}{Window name.} - -\wxheading{See also} - -\helpref{wxButton::Create}{wxbuttoncreate}, \helpref{wxValidator}{wxvalidator} - -\membersection{wxButton::\destruct{wxButton}} - -\func{}{\destruct{wxButton}}{\void} - -Destructor, destroying the button. - -\membersection{wxButton::Create}\label{wxbuttoncreate} - -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id}, \param{const wxString\& }{label},\rtfsp -\param{const wxPoint\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = 0}, \param{const wxValidator\& }{validator}, \param{const wxString\& }{name = ``button"}} - -Button creation function for two-step creation. For more details, see \helpref{wxButton::wxButton}{wxbuttonconstr}. - -\membersection{wxButton::GetLabel}\label{wxbuttongetlabel} - -\constfunc{wxString}{GetLabel}{\void} - -Returns the string label for the button. - -\wxheading{Return value} - -The button's label. - -\wxheading{See also} - -\helpref{wxButton::SetLabel}{wxbuttonsetlabel} - -\membersection{wxButton::SetDefault}\label{wxbuttonsetdefault} - -\func{void}{SetDefault}{\void} - -This sets the button to be the default item for the panel or dialog -box. - -\wxheading{Remarks} - -Under Windows, only dialog box buttons respond to this function. As -normal under Windows and Motif, pressing return causes the default button to -be depressed when the return key is pressed. See also \helpref{wxWindow::SetFocus}{wxwindowsetfocus}\rtfsp -which sets the keyboard focus for windows and text panel items,\rtfsp -and \helpref{wxWindow::GetDefaultItem}{wxwindowgetdefaultitem}. - -Note that under Motif, calling this function immediately after -creation of a button and before the creation of other buttons -will cause misalignment of the row of buttons, since default -buttons are larger. To get around this, call {\it SetDefault}\rtfsp -after you have created a row of buttons: wxWindows will -then set the size of all buttons currently on the panel to -the same size. - -\membersection{wxButton::SetLabel}\label{wxbuttonsetlabel} - -\func{void}{SetLabel}{\param{const wxString\& }{label}} - -Sets the string label for the button. - -\wxheading{Parameters} - -\docparam{label}{The label to set.} - -\wxheading{See also} - -\helpref{wxButton::GetLabel}{wxbuttongetlabel} - diff --git a/docs/latex/wx/category.tex b/docs/latex/wx/category.tex deleted file mode 100644 index 230662b473..0000000000 --- a/docs/latex/wx/category.tex +++ /dev/null @@ -1,325 +0,0 @@ -\chapter{Classes by category}\label{classesbycat} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -A classification of wxWindows classes by category. -\twocolwidtha{5cm} - -{\large {\bf Managed windows}} - -There are several types of window that are directly controlled by the -window manager (such as MS Windows, or the Motif Window Manager). -Frames may contain windows, and dialog boxes may directly contain controls. - -\begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxDialog}{wxdialog}}{Dialog box} -\twocolitem{\helpref{wxFrame}{wxframe}}{Normal frame} -\twocolitem{\helpref{wxMDIParentFrame}{wxmdiparentframe}}{MDI parent frame} -\twocolitem{\helpref{wxMDIChildFrame}{wxmdichildframe}}{MDI child frame} -\twocolitem{\helpref{wxMiniFrame}{wxminiframe}}{A frame with a small title bar} -\twocolitem{\helpref{wxTabbedDialog}{wxtabbeddialog}}{Tabbed dialog} -\end{twocollist} - -See also {\bf Common dialogs}. - -{\large {\bf Miscellaneous windows}} - -The following are a variety of windows that are derived from wxWindow. - -\begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxGrid}{wxgrid}}{A grid (table) window} -\twocolitem{\helpref{wxPanel}{wxpanel}}{A window whose colour changes according to current user settings} -\twocolitem{\helpref{wxScrolledWindow}{wxscrolledwindow}}{Window with automatically managed scrollbars} -\twocolitem{\helpref{wxSplitterWindow}{wxsplitterwindow}}{Window which can be split vertically or horizontally} -\twocolitem{\helpref{wxStatusBar}{wxstatusbar}}{Implements the status bar on a frame} -\twocolitem{\helpref{wxToolBar}{wxtoolbar}}{Toolbar class} -\twocolitem{\helpref{wxTabbedPanel}{wxtabbedpanel}}{Tabbed panel (to be replaced with wxNotebook)} -\twocolitem{\helpref{wxNotebook}{wxnotebook}}{Notebook class (undocumented)} -\end{twocollist} - -{\large {\bf Common dialogs}} - -\overview{Overview}{commondialogsoverview} - -Common dialogs are ready-made dialog classes which are frequently used -in an application. - -\begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxDialog}{wxdialog}}{Base class for common dialogs} -\twocolitem{\helpref{wxColourDialog}{wxcolourdialog}}{Colour chooser dialog} -\twocolitem{\helpref{wxDirDialog}{wxdirdialog}}{Directory selector dialog} -\twocolitem{\helpref{wxFileDialog}{wxfiledialog}}{File selector dialog} -\twocolitem{\helpref{wxMultipleChoiceDialog}{wxmultiplechoicedialog}}{Dialog to get one or more selections from a list} -\twocolitem{\helpref{wxSingleChoiceDialog}{wxsinglechoicedialog}}{Dialog to get a single selection from a list and return the string} -\twocolitem{\helpref{wxTextEntryDialog}{wxtextentrydialog}}{Dialog to get a single line of text from the user} -\twocolitem{\helpref{wxFontDialog}{wxfontdialog}}{Font chooser dialog} -\twocolitem{\helpref{wxPageSetupDialog}{wxpagesetupdialog}}{Standard page setup dialog} -\twocolitem{\helpref{wxPrintDialog}{wxprintdialog}}{Standard print dialog} -\twocolitem{\helpref{wxMessageDialog}{wxmessagedialog}}{Simple message box dialog} -\end{twocollist} - -{\large {\bf Controls}} - -Typically, these are small windows which provide interaction with the user. Controls -that are not static can have \helpref{validators}{wxvalidator} associated with them. - -\begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxControl}{wxcontrol}}{The base class for controls} -\twocolitem{\helpref{wxButton}{wxbutton}}{Push button control, displaying text} -\twocolitem{\helpref{wxBitmapButton}{wxbitmapbutton}}{Push button control, displaying a bitmap} -\twocolitem{\helpref{wxCheckBox}{wxcheckbox}}{Checkbox control} -\twocolitem{\helpref{wxCheckListBox}{wxchecklistbox}}{A listbox with a checkbox to the left of each item} -\twocolitem{\helpref{wxChoice}{wxchoice}}{Choice control (a combobox without the editable area)} -\twocolitem{\helpref{wxComboBox}{wxcombobox}}{A choice with an editable area} -\twocolitem{\helpref{wxGauge}{wxgauge}}{A control to represent a varying quantity, such as time remaining} -\twocolitem{\helpref{wxStaticBox}{wxstaticbox}}{A static, or group box for visually grouping related controls} -\twocolitem{\helpref{wxListBox}{wxlistbox}}{A list of strings for single or multiple selection} -\twocolitem{\helpref{wxListCtrl}{wxlistctrl}}{A control for displaying lists of strings and/or icons, plus a multicolumn report view} -\twocolitem{\helpref{wxTabCtrl}{wxtabctrl}}{Manages several tabs} -\twocolitem{\helpref{wxTextCtrl}{wxtextctrl}}{Single or multline text editing control} -\twocolitem{\helpref{wxTreeCtrl}{wxtreectrl}}{Tree (hierachy) control} -\twocolitem{\helpref{wxScrollBar}{wxscrollbar}}{Scrollbar control} -\twocolitem{\helpref{wxSpinButton}{wxspinbutton}}{A spin or `up-down' control} -\twocolitem{\helpref{wxStaticText}{wxstatictext}}{One or more lines of non-editable text} -\twocolitem{\helpref{wxStaticBitmap}{wxstaticbitmap}}{A control to display a bitmap} -\twocolitem{\helpref{wxRadioBox}{wxradiobox}}{A group of radio buttons} -\twocolitem{\helpref{wxRadioButton}{wxradiobutton}}{A round button to be used with others in a mutually exclusive way} -\twocolitem{\helpref{wxSlider}{wxslider}}{A slider that can be dragged by the user} -\end{twocollist} - -{\large {\bf Menus}} - -\begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxMenu}{wxmenu}}{Displays a series of menu items for selection} -\twocolitem{\helpref{wxMenuBar}{wxmenubar}}{Contains a series of menus for use with a frame} -\twocolitem{\helpref{wxMenuItem}{wxmenuitem}}{Represents a single menu item} -\end{twocollist} - -{\large {\bf Window layout}} - -\overview{Overview}{constraintsoverview} - -These are the classes relevant to automated window layout. - -\begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxIndividualLayoutConstraint}{wxindividuallayoutconstraint}}{Represents a single constraint dimension} -\twocolitem{\helpref{wxLayoutConstraints}{wxlayoutconstraints}}{Represents the constraints for a window class} -\end{twocollist} - -{\large {\bf Device contexts}} - -\overview{Overview}{dcoverview} - -Device contexts are surfaces that may be drawn on, and provide an -abstraction that allows parameterisation of your drawing code -by passing different device contexts. - -\begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxClientDC}{wxclientdc}}{A device context to access the client area outside {\bf OnPaint} events} -\twocolitem{\helpref{wxPaintDC}{wxpaintdc}}{A device context to access the client area inside {\bf OnPaint} events} -\twocolitem{\helpref{wxWindowDC}{wxwindowdc}}{A device context to access the non-client area} -\twocolitem{\helpref{wxScreenDC}{wxscreendc}}{A device context to access the entire screen} -\twocolitem{\helpref{wxDC}{wxdc}}{The device context base class} -\twocolitem{\helpref{wxMemoryDC}{wxmemorydc}}{A device context for drawing into bitmaps} -\twocolitem{\helpref{wxMetaFileDC}{wxmetafiledc}}{A device context for drawing into metafiles} -\twocolitem{\helpref{wxPostScriptDC}{wxpostscriptdc}}{A device context for drawing into PostScript files} -\twocolitem{\helpref{wxPrinterDC}{wxprinterdc}}{A device context for drawing to printers} -\end{twocollist} - -{\large {\bf Graphics device interface}} - -\overview{Bitmaps overview}{wxbitmapoverview} - -These classes are related to drawing on device contexts and windows. - -\begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxColour}{wxcolour}}{Represents the red, blue and green elements of a colour} -\twocolitem{\helpref{wxBitmap}{wxbitmap}}{Represents a bitmap} -\twocolitem{\helpref{wxBrush}{wxbrush}}{Used for filling areas on a device context} -\twocolitem{\helpref{wxBrushList}{wxbrushlist}}{The list of previously-created brushes} -\twocolitem{\helpref{wxCursor}{wxcursor}}{A small, transparent bitmap representing the cursor} -\twocolitem{\helpref{wxFont}{wxfont}}{Represents fonts} -\twocolitem{\helpref{wxFontList}{wxfontlist}}{The list of previously-created fonts} -\twocolitem{\helpref{wxIcon}{wxicon}}{A small, transparent bitmap for assigning to frames and drawing on device contexts} -\twocolitem{\helpref{wxImageList}{wximagelist}}{A list of images, used with some controls} -\twocolitem{\helpref{wxMask}{wxmask}}{Represents a mask to be used with a bitmap for transparent drawing} -\twocolitem{\helpref{wxPen}{wxpen}}{Used for drawing lines on a device context} -\twocolitem{\helpref{wxPenList}{wxpenlist}}{The list of previously-created pens} -\twocolitem{\helpref{wxPalette}{wxpalette}}{Represents a table of indices into RGB values} -\twocolitem{\helpref{wxRegion}{wxregion}}{Represents a simple or complex region on a window or device context} -\end{twocollist} - -{\large {\bf Events}} - -\overview{Overview}{eventhandlingoverview} - -An event object contains information about a specific event. Event handlers -(usually member functions) have a single, event argument. - -\begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxActivateEvent}{wxactivateevent}}{A window or application activation event} -\twocolitem{\helpref{wxCloseEvent}{wxcloseevent}}{A close window or end session event} -\twocolitem{\helpref{wxCommandEvent}{wxcommandevent}}{An event from a variety of standard controls} -\twocolitem{\helpref{wxDropFilesEvent}{wxdropfilesevent}}{A drop files event} -\twocolitem{\helpref{wxEraseEvent}{wxeraseevent}}{An erase background event} -\twocolitem{\helpref{wxEvent}{wxevent}}{The event base class} -\twocolitem{\helpref{wxFocusEvent}{wxfocusevent}}{A window focus event} -\twocolitem{\helpref{wxKeyEvent}{wxkeyevent}}{A keypress event} -\twocolitem{\helpref{wxIdleEvent}{wxidleevent}}{An idle event} -\twocolitem{\helpref{wxInitDialogEvent}{wxinitdialogevent}}{A dialog initialisation event} -\twocolitem{\helpref{wxJoystickEvent}{wxjoystickevent}}{A joystick event} -\twocolitem{\helpref{wxListEvent}{wxlistevent}}{A list control event} -\twocolitem{\helpref{wxMenuEvent}{wxmenuevent}}{A menu event} -\twocolitem{\helpref{wxMouseEvent}{wxmouseevent}}{A mouse event} -\twocolitem{\helpref{wxMoveEvent}{wxmoveevent}}{A move event} -\twocolitem{\helpref{wxPaintEvent}{wxpaintevent}}{A paint event} -%\twocolitem{\helpref{wxSessionEvent}{wxsessionevent}}{A session ending event} -\twocolitem{\helpref{wxSizeEvent}{wxsizeevent}}{A size event} -\twocolitem{\helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent}}{A system colour change event} -\twocolitem{\helpref{wxTabEvent}{wxtabevent}}{A tab control event} -\twocolitem{\helpref{wxTreeEvent}{wxtreeevent}}{A tree control event} -\twocolitem{\helpref{wxUpdateUIEvent}{wxupdateuievent}}{A user interface update event} -\end{twocollist} - -{\large {\bf Validators}} - -These are the window validators, used for filtering and validating -user input. - -\begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxValidator}{wxvalidator}}{Base validator class.} -\twocolitem{\helpref{wxTextValidator}{wxtextvalidator}}{Text control validator class.} -\end{twocollist} - -{\large {\bf Data structures}} - -These are the data structure classes supported by wxWindows. - -\begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxExpr}{wxexpr}}{A class for flexible I/O} -\twocolitem{\helpref{wxExprDatabase}{wxexprdatabase}}{A class for flexible I/O} -\twocolitem{\helpref{wxDate}{wxdate}}{A class for date manipulation} -\twocolitem{\helpref{wxHashTable}{wxhashtable}}{A simple hash table implementation} -\twocolitem{\helpref{wxList}{wxlist}}{A simple linked list implementation} -\twocolitem{\helpref{wxNode}{wxnode}}{Represents a node in the wxList implementation} -\twocolitem{\helpref{wxObject}{wxobject}}{The root class for most wxWindows classes} -\twocolitem{\helpref{wxPathList}{wxpathlist}}{A class to help search multiple paths} -\twocolitem{\helpref{wxPoint}{wxpoint}}{Representation of a point} -\twocolitem{\helpref{wxRect}{wxrect}}{A class representing a rectangle} -\twocolitem{\helpref{wxRegion}{wxregion}}{A class representing a region} -\twocolitem{\helpref{wxString}{wxstring}}{A string class} -\twocolitem{\helpref{wxStringList}{wxstringlist}}{A class representing a list of strings} -\twocolitem{\helpref{wxRealPoint}{wxrealpoint}}{Representation of a point using floating point numbers} -\twocolitem{\helpref{wxSize}{wxsize}}{Representation of a size} -\twocolitem{\helpref{wxTime}{wxtime}}{A class for time manipulation} -\end{twocollist} - -{\large {\bf Run-time class information system}} - -\overview{Overview}{runtimeclassoverview} - -wxWindows supports run-time manipulation of class information, and dynamic -creation of objects given class names. - -\begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxClassInfo}{wxclassinfo}}{Holds run-time class information} -\twocolitem{\helpref{wxObject}{wxobject}}{Root class for classes with run-time information} -\twocolitem{\helpref{Macros}{macros}}{Macros for manipulating run-time information} -\end{twocollist} - -{\large {\bf Debugging features}} - -\overview{Overview}{debuggingoverview} - -wxWindows supports some aspects of debugging an application through -classes, functions and macros. - -\begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxDebugContext}{wxdebugcontext}}{Provides various debugging facilities} -\twocolitem{\helpref{wxDebugStreamBuf}{wxdebugstreambuf}}{A stream buffer writing to the debug stream} -\twocolitem{\helpref{wxObject}{wxobject}}{Provides optional debugging versions of {\bf new} and {\bf delete}} -\twocolitem{\helpref{wxTrace}{wxtrace}}{Tracing facility} -\twocolitem{\helpref{wxTraceLevel}{wxtracelevel}}{Tracing facility with levels} -\twocolitem{\helpref{WXDEBUG\_NEW}{debugnew}}{Use this macro to give further debugging information} -\twocolitem{\helpref{WXTRACE}{trace}}{Trace macro} -\twocolitem{\helpref{WXTRACELEVEL}{tracelevel}}{Trace macro with levels} -\end{twocollist} - -{\large {\bf Interprocess communication}} - -\overview{Overview}{ipcoverview} - -wxWindows provides a simple interprocess communications facilities -based on DDE. - -\begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxDDEClient}{wxddeclient}}{Represents a client} -\twocolitem{\helpref{wxDDEConnection}{wxddeconnection}}{Represents the connection between a client and a server} -\twocolitem{\helpref{wxDDEServer}{wxddeserver}}{Represents a server} -\end{twocollist} - -{\large {\bf Document/view framework}} - -\overview{Overview}{docviewoverview} - -wxWindows supports a document/view framework which provides -housekeeping for a document-centric application. - -TODO: MDI frame classes for documents; make it unnecessary to convert -between streams and files (overridable method that uses filenames instead of streams). - -\begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxDocument}{wxdocument}}{Represents a document} -\twocolitem{\helpref{wxView}{wxview}}{Represents a view} -\twocolitem{\helpref{wxDocTemplate}{wxdoctemplate}}{Manages the relationship between a document class and a veiw class} -\twocolitem{\helpref{wxDocManager}{wxdocmanager}}{Manages the documents and views in an application} -\twocolitem{\helpref{wxDocChildFrame}{wxdocchildframe}}{A child frame for showing a document view} -\twocolitem{\helpref{wxDocParentFrame}{wxdocparentframe}}{A parent frame to contain views} -\end{twocollist} - -{\large {\bf Printing framework}} - -\overview{Overview}{printingoverview} - -A printing and previewing framework is implemented to -make it relatively straighforward to provide document printing -facilities. - -\begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxPreviewFrame}{wxpreviewframe}}{Frame for displaying a print preview} -\twocolitem{\helpref{wxPreviewCanvas}{wxpreviewcanvas}}{Canvas for displaying a print preview} -\twocolitem{\helpref{wxPreviewControlBar}{wxpreviewcontrolbar}}{Standard control bar for a print preview} -\twocolitem{\helpref{wxPrintData}{wxprintdata}}{Represents information about the document being printed} -\twocolitem{\helpref{wxPrintDialog}{wxprintdialog}}{Standard print dialog} -\twocolitem{\helpref{wxPrinter}{wxprinter}}{Class representing the printer} -\twocolitem{\helpref{wxPrinterDC}{wxprinterdc}}{Printer device context} -\twocolitem{\helpref{wxPrintout}{wxprintout}}{Class representing a particular printout} -\twocolitem{\helpref{wxPrintPreview}{wxprintpreview}}{Class representing a print preview} -\end{twocollist} - -{\large {\bf Database classes}} - -\overview{Database classes overview}{odbcoverview} - -wxWindows provides a set of classes for accessing Microsoft's ODBC (Open Database Connectivity) -product. - -\begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxDatabase}{wxdatabase}}{Database class} -\twocolitem{\helpref{wxQueryCol}{wxquerycol}}{Class representing a column} -\twocolitem{\helpref{wxQueryField}{wxqueryfield}}{Class representing a field} -\twocolitem{\helpref{wxRecordSet}{wxrecordset}}{Class representing one or more record} -\end{twocollist} - -{\large {\bf Miscellaneous}} - -\begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxApp}{wxapp}}{Application class} -\twocolitem{\helpref{wxHelpControllerBase}{wxhelpcontrollerbase}}{Base class for help controllers} -\twocolitem{\helpref{wxTimer}{wxtimer}}{Timer class} -\twocolitem{\helpref{wxSystemSettings}{wxsystemsettings}}{System settings class} -\twocolitem{\helpref{wxWinHelpController}{wxwinhelpcontroller}}{Controls WinHelp instances} -\twocolitem{\helpref{wxConfig}{wxconfigbase}}{Classes for configuration reading/writing} -\end{twocollist} - - diff --git a/docs/latex/wx/checkbox.tex b/docs/latex/wx/checkbox.tex deleted file mode 100644 index b12e416a44..0000000000 --- a/docs/latex/wx/checkbox.tex +++ /dev/null @@ -1,104 +0,0 @@ -\section{\class{wxCheckBox}}\label{wxcheckbox} - -A checkbox is a labelled box which is either on (checkmark is visible) -or off (no checkmark). - -\wxheading{Derived from} - -\helpref{wxControl}{wxcontrol}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -There are no special styles for wxCheckBox. - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Event handling} - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_CHECKBOX(id, func)}}{Process a wxEVT\_COMMAND\_CHECKBOX\_CLICKED event, -when the checkbox is clicked.} -\end{twocollist} - -\wxheading{See also} - -\helpref{wxRadioButton}{wxradiobutton}, \helpref{wxCommandEvent}{wxcommandevent} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxCheckBox::wxCheckBox}\label{wxcheckboxconstr} - -\func{}{wxCheckBox}{\void} - -Default constructor. - -\func{}{wxCheckBox}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp -\param{const wxString\& }{label}, \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp -\param{const wxSize\& }{size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp -\param{const wxValidator\& }{val}, \param{const wxString\& }{name = ``checkBox"}} - -Constructor, creating and showing a checkbox. - -\wxheading{Parameters} - -\docparam{parent}{Parent window. Must not be NULL.} - -\docparam{id}{Checkbox identifier. A value of -1 indicates a default value.} - -\docparam{label}{Text to be displayed next to the checkbox.} - -\docparam{pos}{Checkbox position. If the position (-1, -1) is specified then a default position is chosen.} - -\docparam{size}{Checkbox size. If the default size (-1, -1) is specified then a default size is chosen.} - -\docparam{style}{Window style. See \helpref{wxCheckBox}{wxcheckbox}.} - -\docparam{validator}{Window validator.} - -\docparam{name}{Window name.} - -\wxheading{See also} - -\helpref{wxCheckBox::Create}{wxcheckboxcreate}, \helpref{wxValidator}{wxvalidator} - -\membersection{wxCheckBox::\destruct{wxCheckBox}} - -\func{}{\destruct{wxCheckBox}}{\void} - -Destructor, destroying the checkbox. - -\membersection{wxCheckBox::Create}\label{wxcheckboxcreate} - -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp -\param{const wxString\& }{label}, \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp -\param{const wxSize\& }{size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp -\param{const wxValidator\& }{val}, \param{const wxString\& }{name = ``checkBox"}} - -Creates the checkbox for two-step construction. See \helpref{wxCheckBox::wxCheckBox}{wxcheckboxconstr}\rtfsp -for details. - -\membersection{wxCheckBox::GetValue}\label{wxcheckboxgetvalue} - -\constfunc{bool}{GetValue}{\void} - -Gets the state of the checkbox. - -\wxheading{Return value} - -Returns TRUE if it is checked, FALSE otherwise. - -\membersection{wxCheckBox::SetValue}\label{wxcheckboxsetvalue} - -\func{void}{SetValue}{\param{const bool}{ state}} - -Sets the checkbox to the given state. - -\wxheading{Parameters} - -\docparam{state}{If TRUE, the check is on, otherwise it is off.} - - diff --git a/docs/latex/wx/choice.tex b/docs/latex/wx/choice.tex deleted file mode 100644 index 04dc877fc3..0000000000 --- a/docs/latex/wx/choice.tex +++ /dev/null @@ -1,202 +0,0 @@ -\section{\class{wxChoice}}\label{wxchoice} - -A choice item is used to select one of a list of strings. Unlike a -listbox, only the selection is visible until the user pulls down the -menu of choices. - -\wxheading{Derived from} - -\helpref{wxControl}{wxcontrol}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -There are no special styles for wxChoice. - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Event handling} - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_CHOICE(id, func)}}{Process a wxEVT\_COMMAND\_CHOICE\_SELECTED event, -when an item on the list is selected.} -\end{twocollist} - -\wxheading{See also} - -\helpref{wxListBox}{wxlistbox}, \helpref{wxComboBox}{wxcombobox}, -\rtfsp\helpref{wxCommandEvent}{wxcommandevent} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxChoice::wxChoice}\label{wxchoiceconstr} - -\func{}{wxChoice}{\void} - -Default constructor. - -\func{}{wxChoice}{\param{wxWindow *}{parent}, \param{wxWindowID}{ id},\rtfsp -\param{const wxPoint\& }{pos}, \param{const wxSize\&}{ size},\rtfsp -\param{int}{ n}, \param{const wxString }{choices[]},\rtfsp -\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``choice"}} - -Constructor, creating and showing a choice. - -\wxheading{Parameters} - -\docparam{parent}{Parent window. Must not be NULL.} - -\docparam{id}{Window identifier. A value of -1 indicates a default value.} - -\docparam{pos}{Window position.} - -\docparam{size}{Window size. If the default size (-1, -1) is specified then the choice is sized -appropriately.} - -\docparam{n}{Number of strings with which to initialise the choice control.} - -\docparam{choices}{An array of strings with which to initialise the choice control.} - -\docparam{style}{Window style. See \helpref{wxChoice}{wxchoice}.} - -\docparam{validator}{Window validator.} - -\docparam{name}{Window name.} - -\wxheading{See also} - -\helpref{wxChoice::Create}{wxchoicecreate}, \helpref{wxValidator}{wxvalidator} - -\membersection{wxChoice::\destruct{wxChoice}} - -\func{}{\destruct{wxChoice}}{\void} - -Destructor, destroying the choice item. - -\membersection{wxChoice::Append}\label{wxchoiceappend} - -\func{void}{Append}{\param{const wxString\& }{ item}} - -Adds the item to the end of the choice control. - -\wxheading{Parameters} - -\docparam{item}{String to add.} - -\membersection{wxChoice::Clear}\label{wxchoiceclear} - -\func{void}{Clear}{\void} - -Clears the strings from the choice item. - -\membersection{wxChoice::Create}\label{wxchoicecreate} - -\func{bool}{Create}{\param{wxWindow *}{parent}, \param{wxWindowID}{ id},\rtfsp -\param{const wxPoint\& }{pos}, \param{const wxSize\&}{ size},\rtfsp -\param{int}{ n}, \param{const wxString }{choices[]},\rtfsp -\param{long}{ style = 0}, \param{const wxString\& }{name = ``choice"}} - -Creates the choice for two-step construction. See \helpref{wxChoice::wxChoice}{wxchoiceconstr}. - -\membersection{wxChoice::FindString}\label{wxchoicefindstring} - -\constfunc{int}{FindString}{\param{const wxString\& }{string}} - -Finds a choice matching the given string. - -\wxheading{Parameters} - -\docparam{string}{String to find.} - -\wxheading{Return value} - -Returns the position if found, or -1 if not found. - -\membersection{wxChoice::GetColumns}\label{wxchoicegetcolumns} - -\constfunc{int}{GetColumns}{\void} - -Gets the number of columns in this choice item. - -\wxheading{Remarks} - -This is implemented for Motif only. - -\membersection{wxChoice::GetSelection}\label{wxchoicegetselection} - -\constfunc{int}{GetSelection}{\void} - -Gets the id (position) of the selected string, or -1 if there is no selection. - -\membersection{wxChoice::GetString}\label{wxchoicegetstring} - -\constfunc{wxString}{GetString}{\param{int}{ n}} - -Returns the string at the given position. - -\wxheading{Parameters} - -\docparam{n}{The zero-based position.} - -\wxheading{Return value} - -The string at the given position, or the empty string if {\it n} is invalid. - -\membersection{wxChoice::GetStringSelection}\label{wxchoicegetstringselection} - -\constfunc{wxString}{GetStringSelection}{\void} - -Gets the selected string, or the empty string if no string is selected. - -\membersection{wxChoice::Number}\label{wxchoicenumber} - -\constfunc{int}{Number}{\void} - -Returns the number of strings in the choice control. - -\membersection{wxChoice::SetColumns}\label{wxchoicesetcolumns} - -\func{void}{SetColumns}{\param{int}{ n = 1}} - -Sets the number of columns in this choice item. - -\wxheading{Parameters} - -\docparam{n}{Number of columns.} - -\wxheading{Remarks} - -This is implemented for Motif only. - -\membersection{wxChoice::SetSelection}\label{wxchoicesetselection} - -\func{void}{SetSelection}{\param{int}{ n}} - -Sets the choice by passing the desired string position. - -\wxheading{Parameters} - -\docparam{n}{The string position to select, starting from zero.} - -\wxheading{See also} - -\helpref{wxChoice::SetStringSelection}{wxchoicesetstringselection} - -\membersection{wxChoice::SetStringSelection}\label{wxchoicesetstringselection} - -\func{void}{SetStringSelection}{\param{const wxString\& }{ string}} - -Sets the choice by passing the desired string. - -\wxheading{Parameters} - -\docparam{string}{The string to select.} - -\wxheading{See also} - -\helpref{wxChoice::SetSelection}{wxchoicesetselection} - - diff --git a/docs/latex/wx/clasinfo.tex b/docs/latex/wx/clasinfo.tex deleted file mode 100644 index f81149f271..0000000000 --- a/docs/latex/wx/clasinfo.tex +++ /dev/null @@ -1,75 +0,0 @@ -\section{\class{wxClassInfo}}\label{wxclassinfo} - -This class stores meta-information about classes. Instances of this class are -not generally defined directly by an application, but indirectly through use -of macros such as {\bf DECLARE\_DYNAMIC\_CLASS} and {\bf IMPLEMENT\_DYNAMIC\_CLASS}. - -\wxheading{Derived from} - -No parent class. - -\wxheading{See also} - -\helpref{Overview}{wxclassinfooverview}, \helpref{wxObject}{wxobject} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxClassInfo::wxClassInfo}\label{wxclassinfoconstr} - -\func{}{wxClassInfo}{\param{char* }{className}, \param{char* }{baseClass1}, \param{char* }{baseClass2}, - \param{int}{ size}, \param{wxObjectConstructorFn }{fn}} - -Constructs a wxClassInfo object. The supplied macros implicitly construct objects of this -class, so there is no need to create such objects explicitly in an application. - -\membersection{wxClassInfo::CreateObject} - -\func{wxObject*}{CreateObject}{\void} - -Creates an object of the appropriate kind. Returns NULL if the class has not been declared -dynamically createable (typically, it's an abstract class). - -\membersection{wxClassInfo::FindClass} - -\func{static wxClassInfo *}{FindClass}{\param{char* }{name}} - -Finds the wxClassInfo object for a class of the given string name. - -\membersection{wxClassInfo::GetBaseClassName1} - -\constfunc{char*}{GetBaseClassName1}{\void} - -Returns the name of the first base class (NULL if none). - -\membersection{wxClassInfo::GetBaseClassName2} - -\constfunc{char*}{GetBaseClassName2}{\void} - -Returns the name of the second base class (NULL if none). - -\membersection{wxClassInfo::GetClassName} - -\constfunc{char *}{GetClassName}{\void} - -Returns the string form of the class name. - -\membersection{wxClassInfo::GetSize} - -\constfunc{int}{GetSize}{\void} - -Returns the size of the class. - -\membersection{wxClassInfo::InitializeClasses} - -\func{static void}{InitializeClasses}{\void} - -Initializes pointers in the wxClassInfo objects for fast execution -of IsKindOf. Called in base wxWindows library initialization. - -\membersection{wxClassInfo::IsKindOf}\label{wxclassinfoiskindof} - -\func{bool}{IsKindOf}{\param{wxClassInfo* }{info}} - -Returns TRUE if this class is a kind of (inherits from) the given class. - - diff --git a/docs/latex/wx/classes.tex b/docs/latex/wx/classes.tex deleted file mode 100644 index 1cd0dc855e..0000000000 --- a/docs/latex/wx/classes.tex +++ /dev/null @@ -1,183 +0,0 @@ -\chapter{Alphabetical class reference}\label{classref} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% -\pagenumbering{arabic}% -% -\begin{comment} -\helpignore{\section{Class hierarchy}% - -The GUI-specific wxWindows class hierarchy is shown in Figure 5.1. -Many other, non-GUI classes have been omitted. - -\vskip 1cm -$$\image{14cm;0cm}{wxclass.ps}$$ -\vskip 1cm -\centerline{Figure 5.1: wxWindows class hierarchy} - -\newpage}% - -\overview{Writing a wxWindows application: a rough guide}{roughguide} - -\helponly{ -\sethotspotcolour{off}% -\large{ -\helpref{Notes on using the reference}{referencenotes}\\ -\helpref{Guide to functions}{functions} -\sethotspotcolour{on}% -}} -\end{comment} - -\input activevt.tex -\input app.tex -\input button.tex -\input bitmap.tex -\input bbutton.tex -\input brush.tex -\input checkbox.tex -\input choice.tex -\input clasinfo.tex -\input clientdc.tex -\input clipbrd.tex -\input closeevt.tex -\input colour.tex -\input colordlg.tex -\input combobox.tex -\input command.tex -\input cmdevent.tex -\input cmdproc.tex -\input conditn.tex -\input config.tex -\input control.tex -\input cursor.tex -\input database.tex -\input date.tex -\input datstrm.tex -\input dc.tex -\input ddeclint.tex -\input ddeconn.tex -\input ddeservr.tex -\input debugcxt.tex -\input dialog.tex -\input dirdlg.tex -\input document.tex -\input docchfrm.tex -\input docmanag.tex -\input docmdich.tex -\input docmdipr.tex -\input docprfrm.tex -\input doctempl.tex -\input dropevt.tex -\input eraseevt.tex -\input event.tex -\input evthand.tex -\input expr.tex -\input file.tex -\input filedlg.tex -\input filehist.tex -\input focusevt.tex -\input font.tex -\input fontdlg.tex -\input fontlist.tex -\input frame.tex -\input gauge.tex -\input gdiobj.tex -\input grid.tex -\input hash.tex -\input helpinst.tex -\input idleevt.tex -\input icon.tex -\input imaglist.tex -\input ilayout.tex -\input indlgevt.tex -\input joystick.tex -\input joyevent.tex -\input keyevent.tex -\input layout.tex -\input list.tex -\input listbox.tex -\input listctrl.tex -\input listevt.tex -% \input log.tex -\input mask.tex -\input mdi.tex -\input menu.tex -\input menuitem.tex -\input menuevt.tex -\input memorydc.tex -\input msgdlg.tex -\input metafile.tex -\input minifram.tex -\input module.tex -\input mouseevt.tex -\input moveevt.tex -\input mltchdlg.tex -\input mutex.tex -\input node.tex -\input object.tex -\input pagedlg.tex -\input paintdc.tex -\input paintevt.tex -\input palette.tex -\input panel.tex -\input pantabv.tex -\input pathlist.tex -\input pen.tex -\input point.tex -\input prevwin.tex -\input print.tex -\input process.tex -\input postscpt.tex -\input query.tex -\input radiobox.tex -\input radiobut.tex -\input realpoin.tex -\input rect.tex -\input recrdset.tex -\input region.tex -\input screendc.tex -\input scrolbar.tex -\input scrolevt.tex -\input scrolwin.tex -\input sngchdlg.tex -\input size.tex -\input sizeevt.tex -\input slider.tex -\input spinbutt.tex -\input splitter.tex -\input statbmp.tex -\input statbox.tex -\input stattext.tex -\input statusbr.tex -\input wxstring.tex -\input strlist.tex -\input sysclevt.tex -\input settings.tex -\input tab.tex -\input tabctrl.tex -\input tabevent.tex -\input taskbar.tex -\input text.tex -\input textdlg.tex -\input valtext.tex -\input thread.tex -\input time.tex -\input timer.tex -\input toolbar.tex -\input treectrl.tex -\input treeevt.tex -\input upditer.tex -\input upduievt.tex -\input validatr.tex -\input view.tex -\input wave.tex -\input window.tex -\input windowdc.tex -\input winhelp.tex - -\input function.tex - - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: "referenc" -%%% End: diff --git a/docs/latex/wx/clientdc.tex b/docs/latex/wx/clientdc.tex deleted file mode 100644 index 8101533aa0..0000000000 --- a/docs/latex/wx/clientdc.tex +++ /dev/null @@ -1,31 +0,0 @@ -\section{\class{wxClientDC}}\label{wxclientdc} - -A wxClientDC must be constructed if an application wishes to paint on the -client area of a window from outside an {\bf OnPaint} event. -This should normally be constructed as a temporary stack object; don't store -a wxClientDC object. - -To draw on a window from within {\bf OnPaint}, construct a \helpref{wxPaintDC}{wxpaintdc} object. - -To draw on the whole window including decorations, construct a \helpref{wxWindowDC}{wxwindowdc} object -(Windows only). - -\wxheading{Derived from} - -\helpref{wxDC}{wxdc} - -\wxheading{See also} - -\helpref{wxDC}{wxdc}, \helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxPaintDC}{wxpaintdc},\rtfsp -\helpref{wxWindowDC}{wxwindowdc}, \helpref{wxScreenDC}{wxscreendc} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxClientDC::wxClientDC} - -\func{}{wxClientDC}{\param{wxWindow*}{ window}} - -Constructor. Pass a pointer to the window on which you wish to paint. - - - diff --git a/docs/latex/wx/clipbrd.tex b/docs/latex/wx/clipbrd.tex deleted file mode 100644 index a12f8b1f05..0000000000 --- a/docs/latex/wx/clipbrd.tex +++ /dev/null @@ -1,103 +0,0 @@ -\section{\class{wxClipboard}}\label{wxclipboard} - -There is one wxClipboard object referenced by the pointer -wxTheClipboard, initialized by calling \helpref{wxInitClipboard}{wxinitclipboard}. -Under X, clipboard manipulation must be done by using this class, and -such code will work under MS Windows also. Under MS Windows, you have the -alternative of using the normal clipboard functions. - -The documentation for this class will be expanded in due course. At present, -wxClipboard is only used in the wxMediaWindow add-on library. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxClipboardClient}{wxclipboardclient}, \helpref{wxInitClipboard}{wxinitclipboard}. - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxClipboard::GetClipboardClient} - -\func{wxClipboardClient *}{GetClipboardClient}{\void} - -Get the clipboard client directly. Will be NULL if clipboard data -is a string, or if some other application owns the clipboard. -This can be useful for shortcutting data translation, if the -clipboard user can check for a specific client. - -\membersection{wxClipboard::GetClipboardData} - -\func{char*}{GetClipboardData}{\param{const wxString\& }{format}, \param{long *}{length}, \param{long}{ time}} - -Get data from the clipboard. - -\membersection{wxClipboard::GetClipboardString} - -\func{wxString}{GetClipboardString}{\param{long}{ time}} - -Get the data from the clipboard in the format ``TEXT". - -\membersection{wxClipboard::SetClipboardClient} - -\func{void}{SetClipboardClient}{\param{wxClipboardClient *}{client}, \param{long}{ time}} - -Set the clipboard data owner. - -\membersection{wxClipboard::SetClipboardString} - -\func{void}{SetClipboardString}{\param{const wxString\& }{data}, \param{long}{ time}} - -Set the clipboard string; does not require a client. - -\section{\class{wxClipboardClient}}\label{wxclipboardclient} - -Implemented under X and MS Windows, a clipboard client holds data -belonging to the clipboard. For plain text, a client is not necessary. - -wxClipboardClient is an abstract class for which the virtual functions -BeingReplaced and GetData must be overridden. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxClipboard}{wxclipboard}, \helpref{wxInitClipboard}{wxinitclipboard}. - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxClipboardClient::formats} - -\member{wxStringList}{formats} - -This list should be filled in with strings indicating the formats -this client can provide. Almost all clients will provide``TEXT". -Format names should be 4 characters long, so things will work -out on the Macintosh. - -\membersection{wxClipboardClient::BeingReplaced} - -\func{void}{BeingReplaced}{\void} - -This method is called when the client is losing the selection. - -\membersection{wxClipboardClient::GetData} - -\func{char*}{GetData}{\param{const wxString\& }{format}, \param{long *}{size}} - -This method is called when someone wants the data this client is -supplying to the clipboard. - -{\it format} is a string indicating the -format of the data - one of the strings from the ``formats" -list. - -{\it size} should be filled with the size of the resulting -data. In the case of text, {\it size} does not count the -NULL terminator. - - diff --git a/docs/latex/wx/closeevt.tex b/docs/latex/wx/closeevt.tex deleted file mode 100644 index d41ff76c48..0000000000 --- a/docs/latex/wx/closeevt.tex +++ /dev/null @@ -1,57 +0,0 @@ -\section{\class{wxCloseEvent}}\label{wxcloseevent} - -This event class contains information about window and session close events. - -\wxheading{Derived from} - -\helpref{wxEvent}{wxevent} - -\wxheading{Event table macros} - -To process a close event, use these event handler macros to direct input to member -functions that take a wxCloseEvent argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_CLOSE(func)}}{Process a close event, supplying the member function.} -\end{twocollist}% - -\wxheading{See also} - -\helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow},\rtfsp -\helpref{wxWindow::Close}{wxwindowclose},\rtfsp -\helpref{Window deletion overview}{windowdeletionoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxCloseEvent::wxCloseEvent} - -\func{}{wxCloseEvent}{\param{WXTYPE}{ commandEventType = 0}, \param{int}{ id = 0}} - -Constructor. - -\membersection{wxCloseEvent::GetLoggingOff}\label{wxcloseeventgetloggingoff} - -\constfunc{bool}{GetLoggingOff}{\void} - -Returns TRUE if the user is logging off. - -\membersection{wxCloseEvent::GetSessionEnding}\label{wxcloseeventgetsessionending} - -\constfunc{bool}{GetSessionEnding}{\void} - -Returns TRUE if the session is ending. - -\membersection{wxCloseEvent::GetForce}\label{wxcloseeventgetforce} - -\constfunc{void}{GetForce}{\void} - -Returns TRUE if the application wishes to force the window to close. - -\membersection{wxCloseEvent::Veto}\label{wxcloseeventveto} - -\func{void}{Veto}{\void} - -Call this from your event handler to veto a system shutdown. - - diff --git a/docs/latex/wx/cmdevent.tex b/docs/latex/wx/cmdevent.tex deleted file mode 100644 index 649f0d5038..0000000000 --- a/docs/latex/wx/cmdevent.tex +++ /dev/null @@ -1,188 +0,0 @@ -\section{\class{wxCommandEvent}}\label{wxcommandevent} - -This event class contains information about command events, which originate from a variety of -simple controls. More complex controls, such as \helpref{wxTreeCtrl}{wxtreectrl}, have separate command event classes. - -\wxheading{Derived from} - -\helpref{wxEvent}{wxevent} - -\wxheading{Event table macros} - -To process a menu command event, use these event handler macros to direct input to member -functions that take a wxCommandEvent argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_COMMAND(id, cmd, func)}}{Process a command, supplying the window identifier, -command event identifier, and member function.} -\twocolitem{{\bf EVT\_COMMAND\_RANGE(id1, id2, cmd, func)}}{Process a command for a range -of window identifiers, supplying the minimum and maximum window identifiers, -command event identifier, and member function.} -\twocolitem{{\bf EVT\_BUTTON(id, func)}}{Process a wxEVT\_COMMAND\_BUTTON\_CLICKED command, -which is generated by a wxButton control.} -\twocolitem{{\bf EVT\_CHECKBOX(id, func)}}{Process a wxEVT\_COMMAND\_CHECKBOX\_CLICKED command, -which is generated by a wxCheckBox control.} -\twocolitem{{\bf EVT\_CHOICE(id, func)}}{Process a wxEVT\_COMMAND\_CHOICE\_SELECTED command, -which is generated by a wxChoice control.} -\twocolitem{{\bf EVT\_LISTBOX(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_SELECTED command, -which is generated by a wxListBox control.} -\twocolitem{{\bf EVT\_LISTBOX\_DCLICK(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_DOUBLECLICKED command, -which is generated by a wxListBox control.} -\twocolitem{{\bf EVT\_TEXT(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_UPDATED command, -which is generated by a wxTextCtrl control.} -\twocolitem{{\bf EVT\_TEXT\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_ENTER command, -which is generated by a wxTextCtrl control.} -\twocolitem{{\bf EVT\_MENU(id, func)}}{Process a wxEVT\_COMMAND\_MENU\_SELECTED command, -which is generated by a menu item.} -\twocolitem{{\bf EVT\_MENU\_RANGE(id1, id2, func)}}{Process a wxEVT\_COMMAND\_MENU\_RANGE command, -which is generated by a range of menu items.} -\twocolitem{{\bf EVT\_SLIDER(id, func)}}{Process a wxEVT\_COMMAND\_SLIDER\_UPDATED command, -which is generated by a wxSlider control.} -\twocolitem{{\bf EVT\_RADIOBOX(id, func)}}{Process a wxEVT\_COMMAND\_RADIOBOX\_SELECTED command, -which is generated by a wxRadioBox control.} -\twocolitem{{\bf EVT\_RADIOBUTTON(id, func)}}{Process a wxEVT\_COMMAND\_RADIOBUTTON\_SELECTED command, -which is generated by a wxRadioButton control.} -\twocolitem{{\bf EVT\_SCROLLBAR(id, func)}}{Process a wxEVT\_COMMAND\_SCROLLBAR\_UPDATED command, -which is generated by a wxScrollBar control. This is provided for compatibility only; -more specific scrollbar event macros should be used instead (see \helpref{wxScrollEvent}{wxscrollevent}).} -\twocolitem{{\bf EVT\_COMBOBOX(id, func)}}{Process a wxEVT\_COMMAND\_COMBOBOX\_SELECTED command, -which is generated by a wxComboBox control.} -\twocolitem{{\bf EVT\_TOOL(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_CLICKED event -(a synonym for wxEVT\_COMMAND\_MENU\_SELECTED). Pass the id of the tool.} -\twocolitem{{\bf EVT\_TOOL\_RANGE(id1, id2, func)}}{Process a wxEVT\_COMMAND\_TOOL\_CLICKED event -for a range id identifiers. Pass the ids of the tools.} -\twocolitem{{\bf EVT\_TOOL\_RCLICKED(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_RCLICKED event. -Pass the id of the tool.} -\twocolitem{{\bf EVT\_TOOL\_RCLICKED\_RANGE(id1, id2, func)}}{Process a wxEVT\_COMMAND\_TOOL\_RCLICKED event -for a range of ids. Pass the ids of the tools.} -\twocolitem{{\bf EVT\_TOOL\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_ENTER event. -Pass the id of the toolbar itself. The value of wxCommandEvent::GetSelection is the tool id, or -1 if the mouse cursor has moved off a tool.} -\twocolitem{{\bf EVT\_COMMAND\_LEFT\_CLICK(id, func)}}{Process a wxEVT\_COMMAND\_LEFT\_CLICK command, -which is generated by a control (Windows 95 and NT only).} -\twocolitem{{\bf EVT\_COMMAND\_LEFT\_DCLICK(id, func)}}{Process a wxEVT\_COMMAND\_LEFT\_DCLICK command, -which is generated by a control (Windows 95 and NT only).} -\twocolitem{{\bf EVT\_COMMAND\_RIGHT\_CLICK(id, func)}}{Process a wxEVT\_COMMAND\_RIGHT\_CLICK command, -which is generated by a control (Windows 95 and NT only).} -\twocolitem{{\bf EVT\_COMMAND\_SET\_FOCUS(id, func)}}{Process a wxEVT\_COMMAND\_SET\_FOCUS command, -which is generated by a control (Windows 95 and NT only).} -\twocolitem{{\bf EVT\_COMMAND\_KILL\_FOCUS(id, func)}}{Process a wxEVT\_COMMAND\_KILL\_FOCUS command, -which is generated by a control (Windows 95 and NT only).} -\twocolitem{{\bf EVT\_COMMAND\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_ENTER command, -which is generated by a control.} -\end{twocollist}% - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxCommandEvent::m\_clientData} - -\member{char*}{m\_clientData} - -Contains a pointer to client data for listboxes and choices, if the event -was a selection. - -\membersection{wxCommandEvent::m\_commandInt} - -\member{int}{m\_commandInt} - -Contains an integer identifier corresponding to a listbox, choice or -radiobox selection (only if the event was a selection, not a -deselection), or a boolean value representing the value of a checkbox. - -\membersection{wxCommandEvent::m\_commandString} - -\member{char*}{m\_commandString} - -Contains a string corresponding to a listbox or choice selection. - -\membersection{wxCommandEvent::m\_extraLong} - -\member{long}{m\_extraLong} - -Extra information. If the event comes from a listbox selection, it is -a boolean determining whether the event was a selection (TRUE) or a -deselection (FALSE). A listbox deselection only occurs for -multiple-selection boxes, and in this case the index and string values -are indeterminate and the listbox must be examined by the application. - -\membersection{wxCommandEvent::wxCommandEvent} - -\func{}{wxCommandEvent}{\param{WXTYPE}{ commandEventType = 0}, \param{int}{ id = 0}} - -Constructor. - -\membersection{wxCommandEvent::Checked} - -\func{bool}{Checked}{\void} - -Returns TRUE or FALSE for a checkbox selection event. - -\membersection{wxCommandEvent::GetClientData} - -\func{char*}{GetClientData}{\void} - -Returns client data pointer for a listbox or choice selection event -(not valid for a deselection). - -\membersection{wxCommandEvent::GetExtraLong} - -\func{long}{GetExtraLong}{\void} - -Returns the {\bf m\_extraLong} member. - -\membersection{wxCommandEvent::GetInt} - -\func{int}{GetInt}{\void} - -Returns the {\bf m\_commandInt} member. - -\membersection{wxCommandEvent::GetSelection} - -\func{int}{GetSelection}{\void} - -Returns item index for a listbox or choice selection event (not valid for -a deselection). - -\membersection{wxCommandEvent::GetString} - -\func{char*}{GetString}{\void} - -Returns item string for a listbox or choice selection event (not valid for -a deselection). - -\membersection{wxCommandEvent::IsSelection} - -\func{bool}{IsSelection}{\void} - -For a listbox or choice event, returns TRUE if it is a selection, FALSE if it -is a deselection. - -\membersection{wxCommandEvent::SetClientData} - -\func{void}{SetClientData}{\param{char*}{ clientData}} - -Sets the client data for this event. - -\membersection{wxCommandEvent::SetExtraLong} - -\func{void}{SetExtraLong}{\param{int}{ extraLong}} - -Sets the {\bf m\_extraLong} member. - -\membersection{wxCommandEvent::SetInt} - -\func{void}{SetInt}{\param{int}{ intCommand}} - -Sets the {\bf m\_commandInt} member. - -\membersection{wxCommandEvent::SetString} - -\func{void}{SetString}{\param{char*}{ string}} - -Sets the {\bf m\_commandString} member. - - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: "referenc" -%%% End: diff --git a/docs/latex/wx/cmdproc.tex b/docs/latex/wx/cmdproc.tex deleted file mode 100644 index 1164bccfe6..0000000000 --- a/docs/latex/wx/cmdproc.tex +++ /dev/null @@ -1,106 +0,0 @@ -\section{\class{wxCommandProcessor}}\label{wxcommandprocessor} - -wxCommandProcessor is a class that maintains a history of wxCommands, -with undo/redo functionality built-in. Derive a new class from this -if you want different behaviour. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxCommandProcessor overview}{wxcommandprocessoroverview}, \helpref{wxCommand}{wxcommand} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxCommandProcessor::wxCommandProcessor} - -\func{}{wxCommandProcessor}{\param{int}{ maxCommands = 100}} - -Constructor. - -{\it maxCommands} defaults to a rather arbitrary 100, but can be set from 1 to any integer. -If your wxCommand classes store a lot of data, you may wish the limit the number of -commands stored to a smaller number. - -\membersection{wxCommandProcessor::\destruct{wxCommandProcessor}} - -\func{}{\destruct{wxCommandProcessor}}{\void} - -Destructor. - -\membersection{wxCommandProcessor::CanUndo} - -\func{virtual bool}{CanUndo}{\void} - -Returns TRUE if the currently-active command can be undone, FALSE otherwise. - -\membersection{wxCommandProcessor::ClearCommands} - -\func{virtual void}{ClearCommands}{\void} - -Deletes all the commands in the list and sets the current command pointer to NULL. - -\membersection{wxCommandProcessor::Do} - -\func{virtual bool}{Do}{\void} - -Executes (redoes) the current command (the command that has just been undone if any). - -\membersection{wxCommandProcessor::GetCommands} - -\constfunc{wxList\&}{GetCommands}{\void} - -Returns the list of commands. - -\membersection{wxCommandProcessor::GetMaxCommands} - -\constfunc{int}{GetMaxCommands}{\void} - -Returns the maximum number of commands that the command processor stores. - -\membersection{wxCommandProcessor::GetEditMenu} - -\constfunc{wxMenu*}{GetEditMenu}{\void} - -Returns the edit menu associated with the command processor. - -\membersection{wxCommandProcessor::Initialize} - -\func{virtual void}{Initialize}{\void} - -Initializes the command processor, setting the current command to the -last in the list (if any), and updating the edit menu (if one has been -specified). - -\membersection{wxCommandProcessor::SetEditMenu} - -\func{void}{SetEditMenu}{\param{wxMenu* }{menu}} - -Tells the command processor to update the Undo and Redo items on this -menu as appropriate. Set this to NULL if the menu is about to be -destroyed and command operations may still be performed, or the command -processor may try to access an invalid pointer. - -\membersection{wxCommandProcessor::Submit} - -\func{virtual bool}{Submit}{\param{wxCommand *}{command}, \param{bool}{ storeIt = TRUE}} - -Submits a new command to the command processor. The command processor -calls wxCommand::Do to execute the command; if it succeeds, the command -is stored in the history list, and the associated edit menu (if any) updated -appropriately. If it fails, the command is deleted -immediately. Once Submit has been called, the passed command should not -be deleted directly by the application. - -{\it storeIt} indicates whether the successful command should be stored -in the history list. - -\membersection{wxCommandProcessor::Undo} - -\func{virtual bool}{Undo}{\void} - -Undoes the command just executed. - - diff --git a/docs/latex/wx/colordlg.tex b/docs/latex/wx/colordlg.tex deleted file mode 100644 index 332f344a02..0000000000 --- a/docs/latex/wx/colordlg.tex +++ /dev/null @@ -1,48 +0,0 @@ -\section{\class{wxColourDialog}}\label{wxcolourdialog} - -This class represents the colour chooser dialog. - -\wxheading{Derived from} - -\helpref{wxDialog}{wxdialog}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxColourDialog Overview}{wxcolourdialogoverview}, \helpref{wxColour}{wxcolour}, \helpref{wxColourData}{wxcolourdata} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxColourDialog::wxColourDialog} - -\func{}{wxColourDialog}{\param{wxWindow* }{parent}, \param{wxColourData* }{data = NULL}} - -Constructor. Pass a parent window, and optionally a pointer to a block of colour -data, which will be copied to the colour dialog's colour data. - -\wxheading{See also} - -\helpref{wxColourData}{wxcolourdata} - -\membersection{wxColourDialog::\destruct{wxColourDialog}} - -\func{}{\destruct{wxColourDialog}}{\void} - -Destructor. - -\membersection{wxColourDialog::GetColourData} - -\func{wxColourData\&}{GetColourData}{\void} - -Returns the \helpref{colour data}{wxcolourdata} associated with the colour dialog. - -\membersection{wxColourDialog::ShowModal} - -\func{int}{ShowModal}{\void} - -Shows the dialog, returning wxID\_OK if the user pressed OK, and wxOK\_CANCEL -otherwise. - - diff --git a/docs/latex/wx/colour.tex b/docs/latex/wx/colour.tex deleted file mode 100644 index 3ad00632db..0000000000 --- a/docs/latex/wx/colour.tex +++ /dev/null @@ -1,266 +0,0 @@ -\section{\class{wxColour}}\label{wxcolour} - -A colour is an object representing a combination of Red, Green, and Blue (RGB) intensity values, -and is used to determine drawing colours. See the -entry for \helpref{wxColourDatabase}{wxcolourdatabase} for how a pointer to a predefined, -named colour may be returned instead of creating a new colour. - -Valid RGB values are in the range 0 to 255. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxColourDatabase}{wxcolourdatabase}, \helpref{wxPen}{wxpen}, \helpref{wxBrush}{wxbrush},\rtfsp -\helpref{wxColourDialog}{wxcolourdialog} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxColour::wxColour}\label{wxcolourconstr} - -\func{}{wxColour}{\void} - -Default constructor. - -\func{}{wxColour}{\param{const unsigned char}{ red}, \param{const unsigned char}{ green}, \param{const unsigned char}{ blue}} - -Constructs a colour from red, green and blue values. - -\func{}{wxColour}{\param{const wxString\& }{colourNname}} - -Constructs a colour object using a colour name -listed in {\bf wxTheColourDatabase}. - -\wxheading{Parameters} - -\docparam{red}{The red value.} - -\docparam{green}{The green value.} - -\docparam{blue}{The blue value.} - -\docparam{colourName}{The colour name.} - -\wxheading{See also} - -\helpref{wxColourDatabase}{wxcolourdatabase} - -\membersection{wxColour::Blue}\label{wxcolourblue} - -\constfunc{unsigned char}{Blue}{\void} - -Returns the blue intensity. - -\membersection{wxColour::GetPixel}\label{wxcolourgetpixel} - -\constfunc{long}{GetPixel}{\void} - -Returns a pixel value which is platform-dependent. On Windows, a COLORREF is returned. -On X, an allocated pixel value is returned. - --1 is returned if the pixel is invalid (on X, unallocated). - -\membersection{wxColour::Green}\label{wxcolourgreen} - -\constfunc{unsigned char}{Green}{\void} - -Returns the green intensity. - -\membersection{wxColour::Ok}\label{wxcolourok} - -\constfunc{bool}{Ok}{\void} - -Returns TRUE if the colour object is valid (the colour has been initialised with RGB values). - -\membersection{wxColour::Red}\label{wxcolourred} - -\constfunc{unsigned char}{Red}{\void} - -Returns the red intensity. - -\membersection{wxColour::Set}\label{wxcolourset} - -\func{void}{Set}{\param{const unsigned char}{ red}, \param{const unsigned char}{ green}, \param{const unsigned char}{ blue}} - -Sets the RGB intensity values. - -\membersection{wxColour::operator $=$}\label{wxcolourassign} - -\func{wxColour\&}{operator $=$}{\param{const wxColour\&}{ colour}} - -Assignment operator, taking another colour object. - -\func{wxColour\&}{operator $=$}{\param{const wxString\&}{ colourName}} - -Assignment operator, using a colour name to be found in the colour database. - -\wxheading{See also} - -\helpref{wxColourDatabase}{wxcolourdatabase} - -\membersection{wxColour::operator $==$}\label{wxcolourequality} - -\func{bool}{operator $==$}{\param{const wxColour\&}{ colour}} - -Tests the equality of two colours by comparing individual red, green blue colours. - -TODO: this may be different on platforms other than Windows - no reference counting -is done on Windows. - -\membersection{wxColour::operator $!=$}\label{wxcolourinequality} - -\func{bool}{operator $!=$}{\param{const wxColour\&}{ colour}} - -Tests the inequality of two colours by comparing individual red, green blue colours. - -TODO: this may be different on platforms other than Windows - no reference counting -is done on Windows. - -\section{\class{wxColourData}}\label{wxcolourdata} - -This class holds a variety of information related to colour dialogs. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxColour}{wxcolour}, \helpref{wxColourDialog}{wxcolourdialog}, \helpref{wxColourDialog overview}{wxcolourdialogoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxColourData::wxColourData}\label{wxcolourdataconstr} - -\func{}{wxColourData}{\void} - -Constructor. Initializes the custom colours to white, the {\it data colour} setting -to black, and the {\it choose full} setting to TRUE. - -\membersection{wxColourData::\destruct{wxColourData}} - -\func{}{\destruct{wxColourData}}{\void} - -Destructor. - -\membersection{wxColourData::GetChooseFull}\label{wxcolourdatagetchoosefull} - -\constfunc{bool}{GetChooseFull}{\void} - -Under Windows, determines whether the Windows colour dialog will display the full dialog -with custom colour selection controls. Has no meaning under other platforms. - -The default value is TRUE. - -\membersection{wxColourData::GetColour}\label{wxcolourdatagetcolour} - -\constfunc{wxColour\&}{GetColour}{\void} - -Gets the current colour associated with the colour dialog. - -The default colour is black. - -\membersection{wxColourData::GetCustomColour}\label{wxcolourdatagetcustomcolour} - -\constfunc{wxColour\&}{GetCustomColour}{\param{int}{ i}} - -Gets the {\it i}th custom colour associated with the colour dialog. {\it i} should -be an integer between 0 and 15. - -The default custom colours are all white. - -\membersection{wxColourData::SetChooseFull}\label{wxcolourdatasetchoosefull} - -\func{void}{SetChooseFull}{\param{const bool }{flag}} - -Under Windows, tells the Windows colour dialog to display the full dialog -with custom colour selection controls. Under other platforms, has no effect. - -The default value is TRUE. - -\membersection{wxColourData::SetColour}\label{wxcolourdatasetcolour} - -\func{void}{SetColour}{\param{const wxColour\&}{ colour}} - -Sets the default colour for the colour dialog. - -The default colour is black. - -\membersection{wxColourData::SetCustomColour}\label{wxcolourdatasetcustomcolour} - -\func{void}{SetColour}{\param{int}{ i}, \param{const wxColour\&}{ colour}} - -Sets the {\it i}th custom colour for the colour dialog. {\it i} should -be an integer between 0 and 15. - -The default custom colours are all white. - -\membersection{wxColourData::operator $=$}\label{wxcolourdataassign} - -\func{void}{operator $=$}{\param{const wxColourData\&}{ data}} - -Assingment operator for the colour data. - -\section{\class{wxColourDatabase}}\label{wxcolourdatabase} - -wxWindows maintains a database of standard RGB colours for a predefined -set of named colours (such as ``BLACK'', ``LIGHT GREY''). The -application may add to this set if desired by using {\it Append}. There -is only one instance of this class: {\bf wxTheColourDatabase}. - -\wxheading{Derived from} - -\helpref{wxList}{wxlist}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Remarks} - -The colours in the standard database are as follows: - -AQUAMARINE, BLACK, BLUE, BLUE VIOLET, BROWN, CADET BLUE, CORAL, -CORNFLOWER BLUE, CYAN, DARK GREY, DARK GREEN, DARK OLIVE GREEN, DARK -ORCHID, DARK SLATE BLUE, DARK SLATE GREY DARK TURQUOISE, DIM GREY, -FIREBRICK, FOREST GREEN, GOLD, GOLDENROD, GREY, GREEN, GREEN YELLOW, -INDIAN RED, KHAKI, LIGHT BLUE, LIGHT GREY, LIGHT STEEL BLUE, LIME GREEN, -MAGENTA, MAROON, MEDIUM AQUAMARINE, MEDIUM BLUE, MEDIUM FOREST GREEN, -MEDIUM GOLDENROD, MEDIUM ORCHID, MEDIUM SEA GREEN, MEDIUM SLATE BLUE, -MEDIUM SPRING GREEN, MEDIUM TURQUOISE, MEDIUM VIOLET RED, MIDNIGHT BLUE, -NAVY, ORANGE, ORANGE RED, ORCHID, PALE GREEN, PINK, PLUM, PURPLE, RED, -SALMON, SEA GREEN, SIENNA, SKY BLUE, SLATE BLUE, SPRING GREEN, STEEL -BLUE, TAN, THISTLE, TURQUOISE, VIOLET, VIOLET RED, WHEAT, WHITE, YELLOW, -YELLOW GREEN. - -\wxheading{See also} - -\helpref{wxColour}{wxcolour} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxColourDatabase::wxColourDatabase}\label{wxcolourdatabaseconstr} - -\func{}{wxColourDatabase}{\void} - -Constructs the colour database. - -\membersection{wxColourDatabase::FindColour}\label{wxcolourdatabasefindcolour} - -\func{wxColour*}{FindColour}{\param{const wxString\& }{colourName}} - -Finds a colour given the name. Returns NULL if not found. - -\membersection{wxColourDatabase::FindName}\label{wxcolourdatabasefindname} - -\constfunc{wxString}{FindName}{\param{const wxColour\&}{ colour}} - -Finds a colour name given the colour. Returns NULL if not found. - -\membersection{wxColourDatabase::Initialize}\label{wxcolourdatabaseinitialize} - -\func{void}{Initialize}{\void} - -Initializes the database with a number of stock colours. Called by wxWindows -on start-up. - - diff --git a/docs/latex/wx/combobox.tex b/docs/latex/wx/combobox.tex deleted file mode 100644 index 0afb44372d..0000000000 --- a/docs/latex/wx/combobox.tex +++ /dev/null @@ -1,314 +0,0 @@ -\section{\class{wxComboBox}}\label{wxcombobox} - -A combobox is like a combination of an edit control and a listbox. It can be -displayed as static list with editable or read-only text field; or a drop-down list with -text field; or a drop-down list without a text field. - -A combobox permits a single selection only. Combobox items are numbered from zero. - -\wxheading{Derived from} - -\helpref{wxChoice}{wxchoice}\\ -\helpref{wxControl}{wxcontrol}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxCB\_SIMPLE}}{Creates a combobox with a permanently displayed list.} -\twocolitem{\windowstyle{wxCB\_DROPDOWN}}{Creates a combobox with a drop-down list.} -\twocolitem{\windowstyle{wxCB\_READONLY}}{Creates a combo box consisting of a drop-down list and static text item -displaying the current selection.} -\twocolitem{\windowstyle{wxCB\_SORT}}{Sorts the entries in the list alphabetically.} -\end{twocollist} - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Event handling} - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_COMBOBOX(id, func)}}{Process a wxEVT\_COMMAND\_COMBOBOX\_SELECTED event, -when an item on the list is selected.} -\twocolitem{{\bf EVT\_TEXT(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_UPDATED event, -when the combobox text changes.} -\end{twocollist} - -\wxheading{See also} - -\helpref{wxListBox}{wxlistbox}, \helpref{wxTextCtrl}{wxtextctrl}, \helpref{wxChoice}{wxchoice}, -\rtfsp\helpref{wxCommandEvent}{wxcommandevent} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxComboBox::wxComboBox}\label{wxcomboboxconstr} - -\func{}{wxComboBox}{\void} - -Default constructor. - -\func{}{wxComboBox}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp -\param{const wxString\& }{value = ``"}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp -\param{int}{ n}, \param{const wxString }{choices[]},\rtfsp -\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboBox"}} - -Constructor, creating and showing a combobox. - -\wxheading{Parameters} - -\docparam{parent}{Parent window. Must not be NULL.} - -\docparam{id}{Window identifier. A value of -1 indicates a default value.} - -\docparam{pos}{Window position.} - -\docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized -appropriately.} - -\docparam{n}{Number of strings with which to initialise the control.} - -\docparam{choices}{An array of strings with which to initialise the control.} - -\docparam{style}{Window style. See \helpref{wxComboBox}{wxcombobox}.} - -\docparam{validator}{Window validator.} - -\docparam{name}{Window name.} - -\wxheading{See also} - -\helpref{wxComboBox::Create}{wxcomboboxcreate}, \helpref{wxValidator}{wxvalidator} - -\membersection{wxComboBox::\destruct{wxComboBox}} - -\func{}{\destruct{wxComboBox}}{\void} - -Destructor, destroying the combobox. - -\membersection{wxComboBox::Append}\label{wxcomboboxappend} - -\func{void}{Append}{\param{const wxString\& }{item}} - -Adds the item to the end of the combobox. - -\func{void}{Append}{\param{const wxString\& }{ item}, \param{char* }{clientData}} - -Adds the item to the end of the combobox, associating the given data -with the item. - -\wxheading{Parameters} - -\docparam{item}{The string to add.} - -\docparam{clientData}{Client data to associate with the item.} - -\membersection{wxComboBox::Clear}\label{wxcomboboxclear} - -\func{void}{Clear}{\void} - -Clears all strings from the combobox. - -\membersection{wxComboBox::Create}\label{wxcomboboxcreate} - -\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp -\param{const wxString\& }{value = ``"}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp -\param{int}{ n}, \param{const wxString }{choices[]},\rtfsp -\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboBox"}} - -Creates the combobox for two-step construction. Derived classes -should call or replace this function. See \helpref{wxComboBox::wxComboBox}{wxcomboboxconstr}\rtfsp -for further details. - -\membersection{wxComboBox::Copy}\label{wxcomboboxcopy} - -\func{void}{Copy}{\void} - -Copies the selected text to the clipboard. - -\membersection{wxComboBox::Cut}\label{wxcomboboxcut} - -\func{void}{Cut}{\void} - -Copies the selected text to the clipboard and removes the selection. - -\membersection{wxComboBox::Delete}\label{wxcomboboxdelete} - -\func{void}{Delete}{\param{int}{ n}} - -Deletes an item from the combobox. - -\wxheading{Parameters} - -\docparam{n}{The item to delete, starting from zero.} - -\membersection{wxComboBox::FindString}\label{wxcomboboxfindstring} - -\func{int}{FindString}{\param{const wxString\& }{string}} - -Finds a choice matching the given string. - -\wxheading{Parameters} - -\docparam{string}{The item to find.} - -\wxheading{Return value} - -The position if found, or -1 if not found. - -\membersection{wxComboBox::GetClientData}\label{wxcomboboxgetclientdata} - -\constfunc{char*}{GetClientData}{\param{int}{ n}} - -Returns a pointer to the client data associated with the given item (if any). - -\wxheading{Parameters} - -\docparam{n}{An item, starting from zero.} - -\wxheading{Return value} - -A pointer to the client data, or NULL if the item was not found. - -\membersection{wxComboBox::GetInsertionPoint}\label{wxcomboboxgetinsertionpoint} - -\constfunc{long}{GetInsertionPoint}{\void} - -Returns the insertion point for the combobox's text field. - -\membersection{wxComboBox::GetLastPosition}\label{wxcomboboxgetlastposition} - -\constfunc{long}{GetLastPosition}{\void} - -Returns the last position in the combobox text field. - -\membersection{wxComboBox::GetSelection}\label{wxcomboboxgetselection} - -\constfunc{int}{GetSelection}{\void} - -Gets the position of the selected string, or -1 if there is no selection. - -\membersection{wxComboBox::GetString}\label{wxcomboboxgetstring} - -\constfunc{wxString}{GetString}{\param{int}{ n}} - -Returns the string at position {\it n}. - -\wxheading{Parameters} - -\docparam{n}{The item position, starting from zero.} - -\wxheading{Return value} - -The string if the item is found, otherwise the empty string. - -\membersection{wxComboBox::GetStringSelection}\label{wxcomboboxgetstringselection} - -\constfunc{wxString}{GetStringSelection}{\void} - -Gets the selected string. - -\membersection{wxComboBox::GetValue}\label{wxcomboboxgetvalue} - -\constfunc{wxString}{GetValue}{\void} - -Returns the current value in the combobox text field. - -\membersection{wxComboBox::Number}\label{wxcomboboxnumber} - -\constfunc{int}{Number}{\void} - -Returns the number of items in the combobox list. - -TODO: make this GetNumber or GetCount? - -\membersection{wxComboBox::Paste}\label{wxcomboboxpaste} - -\func{void}{Paste}{\void} - -Pastes text from the clipboard to the text field. - -\membersection{wxComboBox::Replace}\label{wxcomboboxreplace} - -\func{void}{Replace}{\param{long}{ from}, \param{long}{ to}, \param{const wxString\& }{text}} - -Replaces the text between two positions with the given text, in the combobox text field. - -\wxheading{Parameters} - -\docparam{from}{The first position.} - -\docparam{to}{The second position.} - -\docparam{text}{The text to insert.} - -\membersection{wxComboBox::Remove}\label{wxcomboboxremove} - -\func{void}{Remove}{\param{long}{ from}, \param{long}{ to}} - -Removes the text between the two positions in the combobox text field. - -\wxheading{Parameters} - -\docparam{from}{The first position.} - -\docparam{to}{The last position.} - -\membersection{wxComboBox::SetClientData}\label{wxcomboboxsetclientdata} - -\func{void}{SetClientData}{\param{int}{ n}, \param{char* }{data}} - -Associates the given client data pointer with the given item. - -\wxheading{Parameters} - -\docparam{n}{The zero-based item.} - -\docparam{data}{The client data.} - -\membersection{wxComboBox::SetInsertionPoint}\label{wxcomboboxsetinsertionpoint} - -\func{void}{SetInsertionPoint}{\param{long}{ pos}} - -Sets the insertion point in the combobox text field. - -\wxheading{Parameters} - -\docparam{pos}{The new insertion point.} - -\membersection{wxComboBox::SetInsertionPointEnd}\label{wxcomboboxsetinsertionpointend} - -\func{void}{SetInsertionPointEnd}{\void} - -Sets the insertion point at the end of the combobox text field. - -\membersection{wxComboBox::SetSelection}\label{wxcomboboxsetselection} - -\func{void}{SetSelection}{\param{int}{ n}} - -Selects the given item in the combobox list. - -\func{void}{SetSelection}{\param{long}{ from}, \param{long}{ to}} - -Selects the text between the two positions, in the combobox text field. - -\wxheading{Parameters} - -\docparam{n}{The zero-based item to select.} - -\docparam{from}{The first position.} - -\docparam{to}{The second position.} - -\membersection{wxComboBox::SetValue}\label{wxcomboboxsetvalue} - -\func{void}{SetValue}{\param{const wxString\& }{text}} - -Sets the text for the combobox text field. - -\wxheading{Parameters} - -\docparam{text}{The text to set.} - - diff --git a/docs/latex/wx/command.tex b/docs/latex/wx/command.tex deleted file mode 100644 index 9bd25f2811..0000000000 --- a/docs/latex/wx/command.tex +++ /dev/null @@ -1,85 +0,0 @@ -\section{\class{wxCommand}}\label{wxcommand} - -wxCommand is a base class for modelling an application command, -which is an action usually performed by selecting a menu item, pressing -a toolbar button or any other means provided by the application to -change the data or view. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\overview{Overview}{wxcommandoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxCommand::wxCommand} - -\func{}{wxCommand}{\param{bool}{ canUndo = FALSE}, \param{const wxString\& }{name = NULL}} - -Constructor. wxCommand is an abstract class, so you will need to derive -a new class and call this constructor from your own constructor. - -{\it canUndo} tells the command processor whether this command is undo-able. You -can achieve the same functionality by overriding the CanUndo member function (if for example -the criteria for undoability is context-dependant). - -{\it name} must be supplied for the command processor to display the command name -in the application's edit menu. - -\membersection{wxCommand::\destruct{wxCommand}} - -\func{}{\destruct{wxCommand}}{\void} - -Destructor. - -\membersection{wxCommand::CanUndo} - -\func{bool}{CanUndo}{\void} - -Returns TRUE if the command can be undone, FALSE otherwise. - -\membersection{wxCommand::Do} - -\func{bool}{Do}{\void} - -Override this member function to execute the appropriate action when called. -Return TRUE to indicate that the action has taken place, FALSE otherwise. -Returning FALSE will indicate to the command processor that the action is -not undoable and should not be added to the command history. - -\membersection{wxCommand::GetName} - -\func{wxString}{GetName}{\void} - -Returns the command name. - -\membersection{wxCommand::Undo} - -\func{bool}{Undo}{\void} - -Override this member function to un-execute a previous Do. -Return TRUE to indicate that the action has taken place, FALSE otherwise. -Returning FALSE will indicate to the command processor that the action is -not redoable and no change should be made to the command history. - -How you implement this command is totally application dependent, but typical -strategies include: - -\begin{itemize}\itemsep=0pt -\item Perform an inverse operation on the last modified piece of -data in the document. When redone, a copy of data stored in command -is pasted back or some operation reapplied. This relies on the fact that -you know the ordering of Undos; the user can never Undo at an arbitrary position -in the command history. -\item Restore the entire document state (perhaps using document transactioning). -Potentially very inefficient, but possibly easier to code if the user interface -and data are complex, and an `inverse execute' operation is hard to write. -\end{itemize} - -The docview sample uses the first method, to remove or restore segments -in the drawing. - - diff --git a/docs/latex/wx/conditn.tex b/docs/latex/wx/conditn.tex deleted file mode 100644 index f6b77506d0..0000000000 --- a/docs/latex/wx/conditn.tex +++ /dev/null @@ -1,61 +0,0 @@ -\section{\class{wxCondition}}\label{wxcondition} - -TODO - -\wxheading{Derived from} - -None. - -\wxheading{See also} - -\helpref{wxThread}{wxthread}, \helpref{wxMutex}{wxmutex} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxCondition::wxCondition}\label{wxconditionconstr} - -\func{}{wxCondition}{\void} - -Default constructor. - -\membersection{wxCondition::\destruct{wxCondition}} - -\func{}{\destruct{wxCondition}}{\void} - -Destroys the wxCondition object. - -\membersection{wxCondition::Broadcast}\label{wxconditionbroadcast} - -\func{void}{Broadcast}{\void} - -Broadcasts to all waiting objects. - -\membersection{wxCondition::Signal}\label{wxconditionsignal} - -\func{void}{Signal}{\void} - -Signals the object. - -\membersection{wxCondition::Wait}\label{wxconditionwait} - -\func{void}{Wait}{\param{wxMutex\&}{ mutex}} - -Waits indefinitely. - -\func{bool}{Wait}{\param{wxMutex\&}{ mutex}, \param{unsigned long}{ sec}, \param{unsigned long}{ nsec}} - -Waits until a signal is raised or the timeout has elapsed. - -\wxheading{Parameters} - -\docparam{mutex}{wxMutex object.} - -\docparam{sec}{Timeout in seconds} - -\docparam{nsec}{Timeout nanoseconds component (added to {\it sec}).} - -\wxheading{Return value} - -The second form returns if the signal was raised, or FALSE if there was a timeout. - - diff --git a/docs/latex/wx/config.tex b/docs/latex/wx/config.tex deleted file mode 100644 index eea61df4b4..0000000000 --- a/docs/latex/wx/config.tex +++ /dev/null @@ -1,612 +0,0 @@ -\section{\class{wxConfigBase}}\label{wxconfigbase} - -wxConfigBase class defines the basic interface of all config classes. It can -not be used by itself (it's an abstract base class) and you'll always use one -of its derivations: wxIniConfig, wxFileConfig, wxRegConfig or -any other. - -However, usually you don't even need to know the precise nature of the class -you're working with but you would just use the wxConfigBase methods. This -allows you to write the same code regardless of whether you're working with -the registry under Win32 or text-based config files under Unix (or even -Windows 3.1 .INI files if you're really unlucky). To make writing the portable -code even easier, wxWindows provides a typedef wxConfig -which is mapped onto the native wxConfigBase implementation on the given -platform: i.e. wxRegConfig under Win32, wxIniConfig under Win16 and -wxFileConfig otherwise. - -See \helpref{config overview}{configoverview} for the descriptions of all -features of this class. - -\wxheading{Derived from} - -No base class - -\wxheading{Example} - -Here is how you would typically use this class: - -\begin{verbatim} - // using wxConfig instead of writing wxFileConfig or wxRegConfig enhances - // portability of the code - wxConfig *config = new wxConfig("MyAppName"); - - wxString str; - if ( config->Read("LastPrompt", &str) ) { - // last prompt was found in the config file/registry and its value is now - // in str - ... - } - else { - // no last prompt... - } - - // another example: using default values and the full path instead of just - // key name: if the key is not found , the value 17 is returned - long value = config->Read("/LastRun/CalculatedValues/MaxValue", -1); - ... - ... - ... - // at the end of the program we would save everything back - config->Write("LastPrompt", str); - config->Write("/LastRun/CalculatedValues/MaxValue", value); - - // the changes will be written back automatically - delete config; -\end{verbatim} - -This basic example, of course, doesn't show all wxConfig features, such as -enumerating, testing for existence and deleting the entries and groups of -entries in the config file, its abilities to automatically store the default -values or expand the environment variables on the fly. However, the main idea -is that using this class is easy and that it should normally do what you -expect it to. - -NB: in the documentation of this class, the words "config file" also mean -"registry hive" for wxRegConfig and, generally speaking, might mean any -physical storage where a wxConfigBase-derived class stores its data. - -\latexignore{\rtfignore{\wxheading{Function groups}}} - -\membersection{Static functions} - -These functions deal with the "default" config object. Although its usage is -not at all mandatory it may be convenient to use a global config object -instead of creating and deleting the local config objects each time you need -one (especially because creating a wxFileConfig object might be a time -consuming operation). In this case, you may create this global config object -in the very start of the program and {\it Set()} it as the default. Then, from -anywhere in your program, you may access it using the {\it Get()} function. Of -course, you should delete it on the program termination (otherwise, not only a -memory leak will result, but even more importantly the changes won't be -written back!). - -As it happens, you may even further simplify the procedure described above: -you may forget about calling {\it Set()}. When {\it Get()} is called and there -is no current object, it will create one using {\it Create()} function. To -disable this behaviour {\it DontCreateOnDemand()} is provided. - -\helpref{Set}{wxconfigbaseset}\\ -\helpref{Get}{wxconfigbaseget}\\ -\helpref{Create}{wxconfigbasecreate}\\ -\helpref{DontCreateOnDemand}{wxconfigbasedontcreateondemand} - -\membersection{Constructor and destructor} - -\helpref{wxConfigBase}{wxconfigbasector}\\ -\helpref{\destruct{wxConfigBase}}{wxconfigbasedtor} - -\membersection{Path management} - -As explained in \helpref{config overview}{configoverview}, the config classes -support a file system-like hierarchy of keys (files) and groups (directories). -As in the file system case, to specify a key in the config class you must use -a path to it. Config classes also support the notion of the current group, -which makes it possible to use the relative paths. To clarify all this, here -is an example (it's only for the sake of demonstration, it doesn't do anything -sensible!): - -\begin{verbatim} - wxConfig *config = new wxConfig("FooBarApp"); - - // right now the current path is '/' - conf->Write("RootEntry", 1); - - // go to some other place: if the group(s) don't exist, they will be created - conf->SetPath("/Group/Subgroup"); - - // create an entry in subgroup - conf->Write("SubgroupEntry", 3); - - // '..' is understood - conf->Write("../GroupEntry", 2); - conf->SetPath(".."); - - wxASSERT( conf->Read("Subgroup/SubgroupEntry", 0l) == 3 ); - - // use absolute path: it's allowed, too - wxASSERT( conf->Read("/RootEntry", 0l) == 1 ); -\end{verbatim} - -{\it Warning}: it's probably a good idea to always restore the path to its -old value on function exit: - -\begin{verbatim} - void foo(wxConfigBase *config) - { - wxString strOldPath = config->GetPath(); - - config->SetPath("/Foo/Data"); - ... - - config->SetPath(strOldPath); - } -\end{verbatim} - -because otherwise the assert in the following example will surely fail -(we suppose here that {\it foo()} function is the same as above except that it -doesn't save and restore the path): - -\begin{verbatim} - void bar(wxConfigBase *config) - { - config->Write("Test", 17); - - foo(config); - - // we're reading "/Foo/Data/Test" here! -1 will probably be returned... - wxASSERT( config->Read("Test", -1) == 17 ); - } -\end{verbatim} - -Finally, the path separator in wxConfigBase and derived classes is always '/', -regardless of the platform (i.e. it's {\bf not} '$\backslash\backslash$' under Windows). - -\helpref{SetPath}{wxconfigbasesetpath}\\ -\helpref{GetPath}{wxconfigbasegetpath} - -\membersection{Enumeration} - -The functions in this section allow to enumerate all entries and groups in the -config file. All functions here return FALSE when there are no more items. - -You must pass the same index to GetNext and GetFirst (don't modify it). -Please note that it's {\bf not} the index of the current item (you will have -some great surprizes with wxRegConfig if you assume this) and you shouldn't -even look at it: it's just a "cookie" which stores the state of the -enumeration. It can't be stored inside the class because it would prevent you -from running several enumerations simultaneously, that's why you must pass it -explicitly. - -Having said all this, enumerating the config entries/groups is very simple: - -\begin{verbatim} - wxArrayString aNames; - - // enumeration variables - wxString str; - long dummy; - - // first enum all entries - bool bCont = config->GetFirstEntry(str, dummy); - while ( bCont ) { - aNames.Add(str); - - bCont = GetConfig()->GetNextEntry(str, dummy); - } - - ... we have all entry names in aNames... - - // now all groups... - bCont = GetConfig()->GetFirstGroup(str, dummy); - while ( bCont ) { - aNames.Add(str); - - bCont = GetConfig()->GetNextGroup(str, dummy); - } - - ... we have all group (and entry) names in aNames... - -\end{verbatim} - -There are also functions to get the number of entries/subgroups without -actually enumerating them, but you will probably never need them. - -\helpref{GetFirstGroup}{wxconfigbasegetfirstgroup}\\ -\helpref{GetNextGroup}{wxconfigbasegetnextgroup}\\ -\helpref{GetFirstEntry}{wxconfigbasegetfirstentry}\\ -\helpref{GetNextEntry}{wxconfigbasegetnextentry}\\ -\helpref{GetNumberOfEntries}{wxconfigbasegetnumberofentries}\\ -\helpref{GetNumberOfGroups}{wxconfigbasegetnumberofgroups} - -\membersection{Tests of existence} - -\helpref{HasGroup}{wxconfigbasehasgroup}\\ -\helpref{HasEntry}{wxconfigbasehasentry}\\ -\helpref{Exists}{wxconfigbaseexists} - -\membersection{Miscellaneous accessors} - -\helpref{SetAppName}{wxconfigbasesetappname}\\ -\helpref{GetAppName}{wxconfigbasegetappname}\\ -\helpref{SetVendorName}{wxconfigbasesetvendorname}\\ -\helpref{GetVendorName}{wxconfigbasegetvendorname} - -\membersection{Key access} - -These function are the core of wxConfigBase class: they allow you to read and -write config file data. All {\it Read} function take a default value which -will be returned if the specified key is not found in the config file. - -Currently, only two types of data are supported: string and long (but it might -change in the near future). To work with other types: for {\it int} or {\it -bool} you can work with function taking/returning {\it long} and just use the -casts. Better yet, just use {\it long} for all variables which you're going to -save in the config file: chances are that \verb$sizeof(bool) == sizeof(int) == sizeof(long)$ anyhow on your system. For {\it float}, {\it double} and, in -general, any other type you'd have to translate them to/from string -representation and use string functions. - -Try not to read long values into string variables and vice versa: although it -just might work with wxFileConfig, you will get a system error with -wxRegConfig because in the Windows registry the different types of entries are -indeed used. - -Final remark: the {\it szKey} parameter for all these functions can contain an -arbitrary path (either relative or absolute), not just the key name. - -\helpref{Read}{wxconfigbaseread}\\ -\helpref{Write}{wxconfigbasewrite}\\ -\helpref{Flush}{wxconfigbaseflush} - -\membersection{Delete entries/groups} - -The functions in this section delete entries and/or groups of entries from the -config file. {\it DeleteAll()} is especially useful if you want to erase all -traces of your program presence: for example, when you uninstall it. - -\helpref{DeleteEntry}{wxconfigbasedeleteentry}\\ -\helpref{DeleteGroup}{wxconfigbasedeletegroup}\\ -\helpref{DeleteAll}{wxconfigbasedeleteall} - -\membersection{Options} - -Some aspects of wxConfigBase behaviour can be changed during run-time. The -first of them is the expansion of environment variables in the string values -read from the config file: for example, if you have the following in your -config file: - -\begin{verbatim} - # config file for my program - UserData = $HOME/data - - # the following syntax is valud only under Windows - UserData = %windir%\\data.dat -\end{verbatim} - -the call to \verb$config->Read("UserData")$ will return something like -\verb$"/home/zeitlin/data"$ if you're lucky enough to run a Linux system ;-) - -Although this feature is very useful, it may be annoying if you read a value -which containts '\$' or '\%' symbols (\% is used for environment variables -expansion under Windows) which are not used for environment variable -expansion. In this situation you may call SetExpandEnvVars(FALSE) just before -reading this value and SetExpandEnvVars(TRUE) just after. Another solution -would be to prefix the offending symbols with a backslash. - -The following functions control this option: - -\helpref{IsExpandingEnvVars}{wxconfigbaseisexpandingenvvars}\\ -\helpref{SetExpandingEnvVars}{wxconfigbasesetexpandingenvvars}\\ -\helpref{SetRecordDefaults}{wxconfigbasesetrecorddefaults}\\ -\helpref{IsRecordingDefaults}{wxconfigbaseisrecordingdefaults} - -%%%%% MEMBERS HERE %%%%% -\helponly{\insertatlevel{2}{ - -\wxheading{Members} - -}} - -\membersection{wxConfigBase::wxConfigBase}\label{wxconfigbasector} - -\func{}{wxConfigBase}{\param{const wxString\& }{appName = wxEmptyString}, - \param{const wxString\& }{vendorName = wxEmptyString}, - \param{const wxString\& }{localFilename = wxEmptyString}, - \param{const wxString\& }{globalFilename = wxEmptyString}, - \param{long}{ style = 0}} - -This is the default and only constructor of the wxConfigBase class, and derived classes. - -\wxheading{Parameters} - -\docparam{appName}{The application name. If this is empty, the class will normally -use \helpref{wxApp::GetAppName}{wxappgetappname} to set it. The application name -is used in the registry key on Windows, and can be used to deduce the local filename -parameter if that is missing.} - -\docparam{vendorName}{The vendor name. If this is empty, it is assumed that -no vendor name is wanted, if this is optional for the current config class. -The vendor name is appended to the application name for wxRegConfig.} - -\docparam{localFilename}{Some config classes require a local filename. If this is not -present, but required, the application name will be used instead.} - -\docparam{globalFilename}{Some config classes require a global filename. If this is not -present, but required, the application name will be used instead.} - -\docparam{style}{Can be one of wxCONFIG\_USE\_LOCAL\_FILE and wxCONFIG\_USE\_GLOBAL\_FILE. -The style interpretation depends on the config class and is ignored by some. -For wxFileConfig, these styles determine whether a local or global config file is created or used. -If the flag is present but the parameter is empty, the parameter will be set to a default. -If the parameter is present but the style flag not, the relevant flag will be added to the style.} - -\wxheading{Remarks} - -By default, environment variable expansion is on and recording -defaults is off. - -\membersection{wxConfigBase::\destruct{wxConfigBase}}\label{wxconfigbasedtor} - -\func{}{\destruct{wxConfigBase}}{\void} - -Empty but ensures that dtor of all derived classes is virtual. - -\membersection{wxConfigBase::Create}\label{wxconfigbasecreate} - -\func{static wxConfigBase *}{Create}{\void} - -Create a new config object: this function will create the "best" -implementation of wxConfig available for the current platform, see -comments near the definition of wxCONFIG\_WIN32\_NATIVE for details. It returns -the created object and also sets it as the current one. - -\membersection{wxConfigBase::DontCreateOnDemand}\label{wxconfigbasedontcreateondemand} - -\func{void}{DontCreateOnDemand}{\void} - -Calling this function will prevent {\it Get()} from automatically creating a -new config object if the current one is NULL. It might be useful to call it -near the program end to prevent new config object "accidental" creation. - -\membersection{wxConfigBase::DeleteAll}\label{wxconfigbasedeleteall} - -\func{bool}{DeleteAll}{\void} - -Delete the whole underlying object (disk file, registry key, ...). Primarly -for use by desinstallation routine. - -\membersection{wxConfigBase::DeleteEntry}\label{wxconfigbasedeleteentry} - -\func{bool}{DeleteEntry}{\param{const wxString\& }{ key}, \param{bool}{ bDeleteGroupIfEmpty = TRUE}} - -Deletes the specified entry and the group it belongs to if -it was the last key in it and the second parameter is true. - -\membersection{wxConfigBase::DeleteGroup}\label{wxconfigbasedeletegroup} - -\func{bool}{DeleteGroup}{\param{const wxString\& }{ key}} - -Delete the group (with all subgroups) - -\membersection{wxConfigBase::Exists}\label{wxconfigbaseexists} - -\constfunc{bool}{Exists}{\param{wxString\& }{strName}} - -returns TRUE if either a group or an entry with a given name exists - -\membersection{wxConfigBase::Flush}\label{wxconfigbaseflush} - -\func{bool}{Flush}{\param{bool }{bCurrentOnly = FALSE}} - -permanently writes all changes (otherwise, they're only written from object's -destructor) - -\membersection{wxConfigBase::Get}\label{wxconfigbaseget} - -\func{wxConfigBase *}{Get}{\void} - -Get the current config object. If there is no current object, creates one -(using {\it Create}) unless DontCreateOnDemand was called previously. - -\membersection{wxConfigBase::GetAppName}\label{wxconfigbasegetappname} - -\constfunc{wxString}{GetAppName}{\void} - -Returns the application name. - -\membersection{wxConfigBase::GetFirstGroup}\label{wxconfigbasegetfirstgroup} - -\constfunc{bool}{GetFirstGroup}{\param{wxString\& }{str}, \param{long\&}{ index}} - -Gets the first group. - -\membersection{wxConfigBase::GetFirstEntry}\label{wxconfigbasegetfirstentry} - -\constfunc{bool}{GetFirstEntry}{\param{wxString\& }{str}, \param{long\&}{ index}} - -Gets the first entry. - -\membersection{wxConfigBase::GetNextGroup}\label{wxconfigbasegetnextgroup} - -\constfunc{bool}{GetNextGroup}{\param{wxString\& }{str}, \param{long\&}{ index}} - -Gets the next group. - -\membersection{wxConfigBase::GetNextEntry}\label{wxconfigbasegetnextentry} - -\constfunc{bool}{GetNextEntry}{\param{wxString\& }{str}, \param{long\&}{ index}} - -Gets the next entry. - -\membersection{wxConfigBase::GetNumberOfEntries}\label{wxconfigbasegetnumberofentries} - -\constfunc{uint }{GetNumberOfEntries}{\param{bool }{bRecursive = FALSE}} - -\membersection{wxConfigBase::GetNumberOfGroups}\label{wxconfigbasegetnumberofgroups} - -\constfunc{uint}{GetNumberOfGroups}{\param{bool }{bRecursive = FALSE}} - -Get number of entries/subgroups in the current group, with or without -its subgroups. - -\membersection{wxConfigBase::GetPath}\label{wxconfigbasegetpath} - -\constfunc{const wxString\&}{GetPath}{\void} - -Retrieve the current path (always as absolute path). - -\membersection{wxConfigBase::GetVendorName}\label{wxconfigbasegetvendorname} - -\constfunc{wxString}{GetVendorName}{\void} - -Returns the vendor name. - -\membersection{wxConfigBase::HasEntry}\label{wxconfigbasehasentry} - -\constfunc{bool}{HasEntry}{\param{wxString\& }{strName}} - -returns TRUE if the entry by this name exists - -\membersection{wxConfigBase::HasGroup}\label{wxconfigbasehasgroup} - -\constfunc{bool}{HasGroup}{\param{const wxString\& }{strName}} - -returns TRUE if the group by this name exists - -\membersection{wxConfigBase::IsExpandingEnvVars}\label{wxconfigbaseisexpandingenvvars} - -\constfunc{bool}{IsExpandingEnvVars}{\void} - -Returns TRUE if we are expanding environment variables in key values. - -\membersection{wxConfigBase::IsRecordingDefaults}\label{wxconfigbaseisrecordingdefaults} - -\func{bool}{IsRecordingDefaults}{\void} const - -Returns TRUE if we are writing defaults back to the config file. - -\membersection{wxConfigBase::Read}\label{wxconfigbaseread} - -\constfunc{bool}{Read}{\param{const wxString\& }{key}, \param{wxString*}{ str}} - -Read a string from the key, returning TRUE if the value was read. If the key was not -found, {\it str} is not changed. - -\constfunc{bool}{Read}{\param{const wxString\& }{key}, \param{wxString*}{ str}, \param{const wxString\& }{defaultVal}} - -Read a string from the key. The default value is returned if the key was not found. - -Returns TRUE if value was really read, FALSE if the default was used. - -\constfunc{wxString}{Read}{\param{const wxString\& }{key}, \param{const wxString\& }{defaultVal}} - -Another version of {\it Read()}, returning the string value directly. - -\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{long*}{ l}} - -Reads a long value, returning TRUE if the value was -found. If the value was not found, {\it l} is not changed. - -\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{long*}{ l}, \param{long}{ defaultVal}} - -Reads a long value, returning TRUE if the value was -found. If the value was not found, {\it defaultVal} is used instead. - -\constfunc{long }{Read}{\param{const wxString\& }{key}, \param{long}{ defaultVal}} - -Reads a long value from the key and returns it. {\it defaultVal} is returned if the key is not -found. - -NB: writing - -{\small -\begin{verbatim} - conf->Read("key", 0); -\end{verbatim} -} - -won't work because the call is ambiguous: compiler can not choose between two {\it Read} functions. Instead, write: - -{\small -\begin{verbatim} - conf->Read("key", 0l); -\end{verbatim} -} - -\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{double*}{ d}} - -Reads a double value, returning TRUE if the value was -found. If the value was not found, {\it d} is not changed. - -\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{double*}{ d}, \param{double}{ defaultVal}} - -Reads a double value, returning TRUE if the value was -found. If the value was not found, {\it defaultVal} is used instead. - -\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{bool*}{ b}} - -Reads a bool value, returning TRUE if the value was -found. If the value was not found, {\it b} is not changed. - -\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{bool*}{ d}, \param{bool}{ defaultVal}} - -Reads a bool value, returning TRUE if the value was -found. If the value was not found, {\it defaultVal} is used instead. - -\membersection{wxConfigBase::Set}\label{wxconfigbaseset} - -\func{wxConfigBase *}{Set}{\param{wxConfigBase *}{pConfig}} - -Sets the config object as the current one, returns the pointer to the previous -current object (both the parameter and returned value may be NULL) - -\membersection{wxConfigBase::SetAppName}\label{wxconfigbasesetappname} - -\func{void }{SetAppName}{\param{const wxString\&}{ appName}} - -Sets the application name. - -\membersection{wxConfigBase::SetExpandingEnvVars}\label{wxconfigbasesetexpandingenvvars} - -\func{void}{SetExpandEnvVars }{\param{bool }{bDoIt = TRUE}} - -Determine whether we wish to expand environment variables in key values. - -\membersection{wxConfigBase::SetPath}\label{wxconfigbasesetpath} - -\func{void}{SetPath}{\param{const wxString\& }{strPath}} - -Set current path: if the first character is '/', it's the absolute path, -otherwise it's a relative path. '..' is supported. If the strPath -doesn't exist it is created. - -\membersection{wxConfigBase::SetRecordDefaults}\label{wxconfigbasesetrecorddefaults} - -\func{void}{SetRecordDefaults}{\param{bool }{bDoIt = TRUE}} - -Sets whether defaults are written back to the config file. - -If on (default is off) all default values are written back to the config file. This allows -the user to see what config options may be changed and is probably useful only -for wxFileConfig. - -\membersection{wxConfigBase::SetVendorName}\label{wxconfigbasesetvendorname} - -\func{void}{SetVendorName}{\param{const wxString\&}{ vendorName}} - -Sets the vendor name. - -\membersection{wxConfigBase::Write}\label{wxconfigbasewrite} - -\func{bool}{Write}{\param{const wxString\& }{ key}, \param{const wxString\& }{ value}} - -\func{bool}{Write}{\param{const wxString\& }{ key}, \param{long}{ value}} - -\func{bool}{Write}{\param{const wxString\& }{ key}, \param{double}{ value}} - -\func{bool}{Write}{\param{const wxString\& }{ key}, \param{bool}{ value}} - -These functions write the specified value to the config file and -return TRUE on success. - - diff --git a/docs/latex/wx/contents.gif b/docs/latex/wx/contents.gif deleted file mode 100644 index 3dddfa3dd5..0000000000 Binary files a/docs/latex/wx/contents.gif and /dev/null differ diff --git a/docs/latex/wx/control.tex b/docs/latex/wx/control.tex deleted file mode 100644 index 8419d9b81a..0000000000 --- a/docs/latex/wx/control.tex +++ /dev/null @@ -1,37 +0,0 @@ -\section{\class{wxControl}}\label{wxcontrol} - -This is the base class for a control or `widget'. - -A control is generally a small window which processes user input and/or displays one or more item -of data. - -\wxheading{Derived from} - -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxValidator}{wxvalidator} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxControl::Command}\label{wxcontrolcommand} - -\func{void}{Command}{\param{wxCommandEvent\& }{event}} - -Simulates the effect of the user issuing a command to the item. See \helpref{wxCommandEvent}{wxcommandevent}. - -\membersection{wxControl::GetLabel}\label{wxcontrolgetlabel} - -\func{wxString\&}{GetLabel}{\void} - -Returns the control's text. - -\membersection{wxControl::SetLabel}\label{wxcontrolsetlabel} - -\func{void}{SetLabel}{\param{const wxString\& }{label}} - -Sets the item's text. - diff --git a/docs/latex/wx/cpp.bmp b/docs/latex/wx/cpp.bmp deleted file mode 100644 index 970f98ef16..0000000000 Binary files a/docs/latex/wx/cpp.bmp and /dev/null differ diff --git a/docs/latex/wx/cursor.tex b/docs/latex/wx/cursor.tex deleted file mode 100644 index ebe20a9803..0000000000 --- a/docs/latex/wx/cursor.tex +++ /dev/null @@ -1,169 +0,0 @@ -\section{\class{wxCursor}}\label{wxcursor} - -A cursor is a small bitmap usually used for denoting where the mouse -pointer is, with a picture that might indicate the interpretation of a -mouse click. As with icons, cursors in X and MS Windows are created -in a different manner. Therefore, separate cursors will be created for the -different environments. Platform-specific methods for creating a {\bf -wxCursor} object are catered for, and this is an occasion where -conditional compilation will probably be required (see \helpref{wxIcon}{wxicon} for -an example). - -A single cursor object may be used in many windows (any subwindow type). -The wxWindows convention is to set the cursor for a window, as in X, -rather than to set it globally as in MS Windows, although a -global \helpref{::wxSetCursor}{wxsetcursor} is also available for MS Windows use. - -\wxheading{Derived from} - -\helpref{wxBitmap}{wxbitmap}\\ -\helpref{wxGDIObject}{wxgdiobject}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxBitmap}{wxbitmap}, \helpref{wxIcon}{wxicon}, \helpref{wxWindow::SetCursor}{wxwindowsetcursor},\rtfsp -\helpref{::wxSetCursor}{wxsetcursor} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxCursor::wxCursor}\label{wxcursorconstr} - -\func{}{wxCursor}{\void} - -Default constructor. - -\func{}{wxCursor}{\param{const char}{ bits[]}, \param{int }{width}, - \param{int }{ height}, \param{int }{hotSpotX=-1}, \param{int }{hotSpotY=-1}, \param{const char }{maskBits[]=NULL}} - -Constructs a cursor by passing an array of bits (Motif and Xt only). {\it maskBits} is used only under Motif. - -If either {\it hotSpotX} or {\it hotSpotY} is -1, the hotspot will be the centre of the cursor image (Motif only). - -\func{}{wxCursor}{\param{const wxString\& }{cursorName}, \param{long }{type}, \param{int }{hotSpotX=0}, \param{int }{hotSpotY=0}} - -Constructs a cursor by passing a string resource name or filename. - -{\it hotSpotX} and {\it hotSpotY} are currently only used under Windows when loading from an -icon file, to specify the cursor hotspot relative to the top left of the image. - -\func{}{wxCursor}{\param{int}{ cursorId}} - -Constructs a cursor using a cursor identifier. - -\func{}{wxCursor}{\param{const wxCursor\&}{ cursor}} - -Copy constructor. This uses reference counting so is a cheap operation. - -\func{}{wxCursor}{\param{const wxCursor*}{ cursor}} - -Copy constructor. This uses reference counting so is a cheap operation. - -\wxheading{Parameters} - -\docparam{bits}{An array of bits.} - -\docparam{maskBits}{Bits for a mask bitmap.} - -\docparam{width}{Cursor width.} - -\docparam{height}{Cursor height.} - -\docparam{hotSpotX}{Hotspot x coordinate.} - -\docparam{hotSpotY}{Hotspot y coordinate.} - -\docparam{type}{Icon type to load. Under Motif, {\it type} defaults to {\bf wxBITMAP\_TYPE\_XBM}. Under Windows, -it defaults to {\bf wxBITMAP\_TYPE\_CUR\_RESOURCE}. - -Under X, the permitted cursor types are: - -\twocolwidtha{6cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxBITMAP\_TYPE\_XBM}}{Load an X bitmap file.} -\end{twocollist} - -Under Windows, the permitted types are: - -\twocolwidtha{6cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxBITMAP\_TYPE\_CUR}}{Load a cursor from a .cur cursor file (only if USE\_RESOURCE\_LOADING\_IN\_MSW -is enabled in wx\_setup.h).} -\twocolitem{\windowstyle{wxBITMAP\_TYPE\_CUR\_RESOURCE}}{Load a Windows resource (as specified in the .rc file).} -\twocolitem{\windowstyle{wxBITMAP\_TYPE\_ICO}}{Load a cursor from a .ico icon file (only if USE\_RESOURCE\_LOADING\_IN\_MSW -is enabled in wx\_setup.h). Specify {\it hotSpotX} and {\it hotSpotY}.} -\end{twocollist}} - -\docparam{cursorId}{A stock cursor identifier. May be one of: - -\twocolwidtha{6cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf wxCURSOR\_ARROW}}{A standard arrow cursor.} -\twocolitem{{\bf wxCURSOR\_BULLSEYE}}{Bullseye cursor.} -\twocolitem{{\bf wxCURSOR\_CHAR}}{Rectangular character cursor.} -\twocolitem{{\bf wxCURSOR\_CROSS}}{A cross cursor.} -\twocolitem{{\bf wxCURSOR\_HAND}}{A hand cursor.} -\twocolitem{{\bf wxCURSOR\_IBEAM}}{An I-beam cursor (vertical line).} -\twocolitem{{\bf wxCURSOR\_LEFT\_BUTTON}}{Represents a mouse with the left button depressed.} -\twocolitem{{\bf wxCURSOR\_MAGNIFIER}}{A magnifier icon.} -\twocolitem{{\bf wxCURSOR\_MIDDLE\_BUTTON}}{Represents a mouse with the middle button depressed.} -\twocolitem{{\bf wxCURSOR\_NO\_ENTRY}}{A no-entry sign cursor.} -\twocolitem{{\bf wxCURSOR\_PAINT\_BRUSH}}{A paintbrush cursor.} -\twocolitem{{\bf wxCURSOR\_PENCIL}}{A pencil cursor.} -\twocolitem{{\bf wxCURSOR\_POINT\_LEFT}}{A cursor that points left.} -\twocolitem{{\bf wxCURSOR\_POINT\_RIGHT}}{A cursor that points right.} -\twocolitem{{\bf wxCURSOR\_QUESTION\_ARROW}}{An arrow and question mark.} -\twocolitem{{\bf wxCURSOR\_RIGHT\_BUTTON}}{Represents a mouse with the right button depressed.} -\twocolitem{{\bf wxCURSOR\_SIZENESW}}{A sizing cursor pointing NE-SW.} -\twocolitem{{\bf wxCURSOR\_SIZENS}}{A sizing cursor pointing N-S.} -\twocolitem{{\bf wxCURSOR\_SIZENWSE}}{A sizing cursor pointing NW-SE.} -\twocolitem{{\bf wxCURSOR\_SIZEWE}}{A sizing cursor pointing W-E.} -\twocolitem{{\bf wxCURSOR\_SIZING}}{A general sizing cursor.} -\twocolitem{{\bf wxCURSOR\_SPRAYCAN}}{A spraycan cursor.} -\twocolitem{{\bf wxCURSOR\_WAIT}}{A wait cursor.} -\twocolitem{{\bf wxCURSOR\_WATCH}}{A watch cursor.} -\end{twocollist}\twocolwidtha{5cm} - -Note that not all cursors are available on all platforms.} - -\docparam{cursor}{Pointer or reference to a cursor to copy.} - -\membersection{wxCursor::\destruct{wxCursor}} - -\func{}{\destruct{wxCursor}}{\void} - -Destroys the cursor. A cursor can be reused for more -than one window, and does not get destroyed when the window is -destroyed. wxWindows destroys all cursors on application exit, although -it's best to clean them up explicitly. - -\membersection{wxCursor::Ok}\label{wxcursorok} - -\constfunc{bool}{Ok}{\void} - -Returns TRUE if cursor data is present. - -\membersection{wxCursor::operator $=$}\label{wxcursorassignment} - -\func{wxCursor\&}{operator $=$}{\param{const wxCursor\& }{cursor}} - -Assignment operator, using reference counting. Returns a reference -to `this'. - -\membersection{wxCursor::operator $==$}\label{wxcursorequals} - -\func{bool}{operator $==$}{\param{const wxCursor\& }{cursor}} - -Equality operator. Two cursors are equal if they contain pointers -to the same underlying cursor data. It does not compare each attribute, -so two independently-created cursors using the same parameters will -fail the test. - -\membersection{wxCursor::operator $!=$}\label{wxcursornotequals} - -\func{bool}{operator $!=$}{\param{const wxCursor\& }{cursor}} - -Inequality operator. Two cursors are not equal if they contain pointers -to different underlying cursor data. It does not compare each attribute. - - diff --git a/docs/latex/wx/database.tex b/docs/latex/wx/database.tex deleted file mode 100644 index afc8b35035..0000000000 --- a/docs/latex/wx/database.tex +++ /dev/null @@ -1,272 +0,0 @@ -\section{\class{wxDatabase}}\label{wxdatabase} - -Every database object represents an ODBC connection. The connection may be closed and reopened. - -\wxheading{Derivation} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\overview{wxDatabase overview}{wxdatabaseoverview}, \helpref{wxRecordSet}{wxrecordset} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxDatabase::wxDatabase} - -\func{}{wxDatabase}{\void} - -Constructor. The constructor of the first wxDatabase instance of an -application initializes the ODBC manager. - -\membersection{wxDatabase::\destruct{wxDatabase}} - -\func{}{\destruct{wxDatabase}}{\void} - -Destructor. Resets and destroys any associated wxRecordSet instances. - -The destructor of the last wxDatabase instance will deinitialize -the ODBC manager. - -\membersection{wxDatabase::BeginTrans} - -\func{bool}{BeginTrans}{\void} - -Not implemented. - -\membersection{wxDatabase::Cancel} - -\func{void}{Cancel}{\void} - -Not implemented. - -\membersection{wxDatabase::CanTransact} - -\func{bool}{CanTransact}{\void} - -Not implemented. - - -\membersection{wxDatabase::CanUpdate} - -\func{bool}{CanUpdate}{\void} - -Not implemented. - -\membersection{wxDatabase::Close} - -\func{bool}{Close}{\void} - -Resets the statement handles of any associated wxRecordSet objects, -and disconnects from the current data source. - -\membersection{wxDatabase::CommitTrans} - -\func{bool}{CommitTrans}{\void} - -Commits previous transactions. Not implemented. - -\membersection{wxDatabase::ErrorOccured} - -\func{bool}{ErrorOccured}{\void} - -Returns TRUE if the last action caused an error. - -\membersection{wxDatabase::ErrorSnapshot} - -\func{void}{ErrorSnapshot}{\param{HSTMT}{ statement = SQL\_NULL\_HSTMT}} - -This function will be called whenever an ODBC error occured. It stores the -error related information returned by ODBC. If a statement handle of the -concerning ODBC action is available it should be passed to the function. - -\membersection{wxDatabase::GetDatabaseName} - -\func{wxString}{GetDatabaseName}{\void} - -Returns the name of the database associated with the current connection. - -\membersection{wxDatabase::GetDataSource} - -\func{wxString}{GetDataSource}{\void} - -Returns the name of the connected data source. - -\membersection{wxDatabase::GetErrorClass} - -\func{wxString}{GetErrorClass}{\void} - -Returns the error class of the last error. The error class consists of -five characters where the first two characters contain the class -and the other three characters contain the subclass of the ODBC error. -See ODBC documentation for further details. - -\membersection{wxDatabase::GetErrorCode} - -\func{wxRETCODE}{GetErrorCode}{\void} - -Returns the error code of the last ODBC function call. This will be one of: - -\begin{twocollist}\itemsep=0pt -\twocolitem{SQL\_ERROR}{General error.} -\twocolitem{SQL\_INVALID\_HANDLE}{An invalid handle was passed to an ODBC function.} -\twocolitem{SQL\_NEED\_DATA}{ODBC expected some data.} -\twocolitem{SQL\_NO\_DATA\_FOUND}{No data was found by this ODBC call.} -\twocolitem{SQL\_SUCCESS}{The call was successful.} -\twocolitem{SQL\_SUCCESS\_WITH\_INFO}{The call was successful, but further information can be -obtained from the ODBC manager.} -\end{twocollist} - -\membersection{wxDatabase::GetErrorMessage} - -\func{wxString}{GetErrorMessage}{\void} - -Returns the last error message returned by the ODBC manager. - -\membersection{wxDatabase::GetErrorNumber} - -\func{long}{GetErrorNumber}{\void} - -Returns the last native error. A native error is an ODBC driver dependent -error number. - -\membersection{wxDatabase::GetHDBC} - -\func{HDBC}{GetHDBC}{\void} - -Returns the current ODBC database handle. - -\membersection{wxDatabase::GetHENV} - -\func{HENV}{GetHENV}{\void} - -Returns the ODBC environment handle. - -\membersection{wxDatabase::GetInfo} - -\func{bool}{GetInfo}{\param{long}{ infoType}, \param{long *}{buf}} - -\func{bool}{GetInfo}{\param{long}{ infoType}, \param{const wxString\& }{buf}, \param{int}{ bufSize=-1}} - -Returns requested information. The return value is TRUE if successful, FALSE otherwise. - -{\it infoType} is an ODBC identifier specifying the type of information to be returned. - -{\it buf} is a character or long integer pointer to storage which must be allocated by the -application, and which will contain the information if the function is successful. - -{\it bufSize} is the size of the character buffer. A value of -1 indicates that the size -should be computed by the GetInfo function. - -\membersection{wxDatabase::GetPassword} - -\func{wxString}{GetPassword}{\void} - -Returns the password of the current user. - -\membersection{wxDatabase::GetUsername} - -\func{wxString}{GetUsername}{\void} - -Returns the current username. - -\membersection{wxDatabase::GetODBCVersionFloat} - -\func{float}{GetODBCVersionFloat}{\param{bool}{ implementation=TRUE}} - -Returns the version of ODBC in floating point format, e.g. 2.50. - -{\it implementation} should be TRUE to get the DLL version, or FALSE to get the -version defined in the {\tt sql.h} header file. - -This function can return the value 0.0 if the header version number is not defined (for early -versions of ODBC). - -\membersection{wxDatabase::GetODBCVersionString} - -\func{wxString}{GetODBCVersionString}{\param{bool}{ implementation=TRUE}} - -Returns the version of ODBC in string format, e.g. ``02.50". - -{\it implementation} should be TRUE to get the DLL version, or FALSE to get the -version defined in the {\tt sql.h} header file. - -This function can return the value ``00.00" if the header version number is not defined (for early -versions of ODBC). - -\membersection{wxDatabase::InWaitForDataSource} - -\func{bool}{InWaitForDataSource}{\void} - -Not implemented. - -\membersection{wxDatabase::IsOpen} - -\func{bool}{IsOpen}{\void} - -Returns TRUE if a connection is open. - -\membersection{wxDatabase::Open}\label{wxdatabaseopen} - -\func{bool}{Open}{\param{const wxString\& }{datasource}, \param{bool}{ exclusive = FALSE}, \param{bool }{readOnly = TRUE}, - \param{const wxString\& }{username = ``ODBC"}, \param{const wxString\& }{password = ``"}} - -Connect to a data source. {\it datasource} contains the name of the ODBC data -source. The parameters exclusive and readOnly are not used. - -\membersection{wxDatabase::OnSetOptions} - -\func{void}{OnSetOptions}{\param{wxRecordSet *}{recordSet}} - -Not implemented. - -\membersection{wxDatabase::OnWaitForDataSource} - -\func{void}{OnWaitForDataSource}{\param{bool}{ stillExecuting}} - -Not implemented. - -\membersection{wxDatabase::RollbackTrans} - -\func{bool}{RollbackTrans}{\void} - -Sends a rollback to the ODBC driver. Not implemented. - -\membersection{wxDatabase::SetDataSource} - -\func{void}{SetDataSource}{\param{const wxString\& }{s}} - -Sets the name of the data source. Not implemented. - -\membersection{wxDatabase::SetLoginTimeout} - -\func{void}{SetLoginTimeout}{\param{long}{ seconds}} - -Sets the time to wait for an user login. Not implemented. - -\membersection{wxDatabase::SetPassword} - -\func{void}{SetPassword}{\param{const wxString\& }{s}} - -Sets the password of the current user. Not implemented. - -\membersection{wxDatabase::SetSynchronousMode} - -\func{void}{SetSynchronousMode}{\param{bool }{synchronous}} - -Toggles between synchronous and asynchronous mode. Currently only synchronous -mode is supported, so this function has no effect. - -\membersection{wxDatabase::SetQueryTimeout} - -\func{void}{SetQueryTimeout}{\param{long}{ seconds}} - -Sets the time to wait for a response to a query. Not implemented. - -\membersection{wxDatabase::SetUsername} - -\func{void}{SetUsername}{\param{const wxString\& }{s}} - -Sets the name of the current user. Not implemented. - - diff --git a/docs/latex/wx/date.tex b/docs/latex/wx/date.tex deleted file mode 100644 index 373904db66..0000000000 --- a/docs/latex/wx/date.tex +++ /dev/null @@ -1,348 +0,0 @@ -\section{\class{wxDate}}\label{wxdate} - -A class for manipulating dates. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxTime}{wxtime} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxDate::wxDate}\label{wxdateconstr} - -\func{}{wxDate}{\void} - -Default constructor. - -\func{}{wxDate}{\param{const wxDate\&}{ date}} - -Copy constructor. - -\func{}{wxDate}{\param{int}{ month}, \param{int}{ day}, \param{int}{ year}} - -Constructor taking month, day and year. - -\func{}{wxDate}{\param{long}{ julian}} - -Constructor taking an integer representing the Julian date. This is the number of days since -1st January 4713 B.C., so to convert from the number of days since 1st January 1901, -construct a date for 1/1/1901, and add the number of days. - -\func{}{wxDate}{\param{const wxString\& }{dateString}} - -Constructor taking a string representing a date. This must be either the string TODAY, or of the -form {\tt MM/DD/YYYY} or {\tt MM-DD-YYYY}. For example: - -\begin{verbatim} - wxDate date("11/26/1966"); -\end{verbatim} - -\wxheading{Parameters} - -\docparam{date}{Date to copy.} - -\docparam{month}{Month: a number between 1 and 12.} - -\docparam{day}{Day: a number between 1 and 31.} - -\docparam{year}{Year, such as 1995, 2005.} - -\membersection{wxDate::\destruct{wxDate}} - -\func{void}{\destruct{wxDate}}{\void} - -Destructor. - -\membersection{wxDate::AddMonths}\label{wxdateaddmonths} - -\func{wxDate\&}{AddMonths}{\param{int}{ months=1}} - -Adds the given number of months to the date, returning a reference to `this'. - -\membersection{wxDate::AddWeeks}\label{wxdateaddweeks} - -\func{wxDate\&}{AddWeeks}{\param{int}{ weeks=1}} - -Adds the given number of weeks to the date, returning a reference to `this'. - -\membersection{wxDate::AddYears}\label{wxdateaddyears} - -\func{wxDate\&}{AddYears}{\param{int}{ years=1}} - -Adds the given number of months to the date, returning a reference to `this'. - -\membersection{wxDate::FormatDate}\label{wxdateformatdate} - -\constfunc{wxString}{FormatDate}{\param{int}{ type=-1}} - -Formats the date according to {\it type} if not -1, or according -to the current display type if -1. - -\wxheading{Parameters} - -\docparam{type}{-1 or one of: - -\begin{twocollist}\itemsep=0pt -\twocolitem{wxDAY}{Format day only.} -\twocolitem{wxMONTH}{Format month only.} -\twocolitem{wxMDY}{Format MONTH, DAY, YEAR.} -\twocolitem{wxFULL}{Format day, month and year in US style: DAYOFWEEK, MONTH, DAY, YEAR.} -\twocolitem{wxEUROPEAN}{Format day, month and year in European style: DAY, MONTH, YEAR.} -\end{twocollist}} - -\membersection{wxDate::GetDay}\label{wxdategetday} - -\constfunc{int}{GetDay}{\void} - -Returns the numeric day (in the range 1 to 31). - -\membersection{wxDate::GetDayOfWeek}\label{wxdategetdayofweek} - -\constfunc{int}{GetDayOfWeek}{\void} - -Returns the integer day of the week (in the range 1 to 7). - -\membersection{wxDate::GetDayOfWeekName}\label{wxdategetdayofweekname} - -\constfunc{wxString}{GetDayOfWeekName}{\void} - -Returns the name of the day of week. - -\membersection{wxDate::GetDayOfYear}\label{wxdategetdayofyear} - -\constfunc{long}{GetDayOfYear}{\void} - -Returns the day of the year (from 1 to 365). - -\membersection{wxDate::GetDaysInMonth}\label{wxdategetdaysinmonth} - -\constfunc{int}{GetDaysInMonth}{\void} - -Returns the number of days in the month (in the range 1 to 31). - -\membersection{wxDate::GetFirstDayOfMonth}\label{wxdategetfirstdayofmonth} - -\constfunc{int}{GetFirstDayOfMonth}{\void} - -Returns the day of week that is first in the month (in the range 1 to 7). - -\membersection{wxDate::GetJulianDate}\label{wxdategetjuliandate} - -\constfunc{long}{GetJulianDate}{\void} - -Returns the Julian date. - -\membersection{wxDate::GetMonth}\label{wxdategetmonth} - -\constfunc{int}{GetMonth}{\void} - -Returns the month number (in the range 1 to 12). - -\membersection{wxDate::GetMonthEnd} - -\func{wxDate}{GetMonthEnd}{\void} - -Returns the date representing the last day of the month. - -\membersection{wxDate::GetMonthName}\label{wxdategetmonthname} - -\constfunc{wxString}{GetMonthName}{\void} - -Returns the name of the month. Do not delete the returned storage. - -\membersection{wxDate::GetMonthStart}\label{wxdategetmonthstart} - -\constfunc{wxDate}{GetMonthStart}{\void} - -Returns the date representing the first day of the month. - -\membersection{wxDate::GetWeekOfMonth}\label{wxdategetweekofmonth} - -\constfunc{int}{GetWeekOfMonth}{\void} - -Returns the week of month (in the range 1 to 6). - -\membersection{wxDate::GetWeekOfYear}\label{wxdategetweekofyear} - -\constfunc{int}{GetWeekOfYear}{\void} - -Returns the week of year (in the range 1 to 52). - -\membersection{wxDate::GetYear}\label{wxdategetyear} - -\constfunc{int}{GetYear}{\void} - -Returns the year as an integer (such as `1995'). - -\membersection{wxDate::GetYearEnd}\label{wxdategetyearend} - -\constfunc{wxDate}{GetYearEnd}{\void} - -Returns the date representing the last day of the year. - -\membersection{wxDate::GetYearStart}\label{wxdategetyearstart} - -\constfunc{wxDate}{GetYearStart}{\void} - -Returns the date representing the first day of the year. - -\membersection{wxDate::IsLeapYear}\label{wxdateisleapyear} - -\constfunc{bool}{IsLeapYear}{\void} - -Returns TRUE if the year of this date is a leap year. - -\membersection{wxDate::Set}\label{wxdateset} - -\func{wxDate\&}{Set}{\void} - -Sets the date to current system date, returning a reference to `this'. - -\func{wxDate\&}{Set}{\param{long}{ julian}} - -Sets the date to the given Julian date, returning a reference to `this'. - -\func{wxDate\&}{Set}{\param{int}{ month}, \param{int}{ day}, \param{int}{ year}} - -Sets the date to the given date, returning a reference to `this'. - -{\it month} is a number from 1 to 12. - -{\it day} is a number from 1 to 31. - -{\it year} is a year, such as 1995, 2005. - -\membersection{wxDate::SetFormat}\label{wxdatesetformat} - -\func{void}{SetFormat}{\param{int}{ format}} - -Sets the current format type. - -\wxheading{Parameters} - -\docparam{format}{-1 or one of: - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf wxDAY}}{Format day only.} -\twocolitem{{\bf wxMONTH}}{Format month only.} -\twocolitem{{\bf wxMDY}}{Format MONTH, DAY, YEAR.} -\twocolitem{{\bf wxFULL}}{Format day, month and year in US style: DAYOFWEEK, MONTH, DAY, YEAR.} -\twocolitem{{\bf wxEUROPEAN}}{Format day, month and year in European style: DAY, MONTH, YEAR.} -\end{twocollist}} - -\membersection{wxDate::SetOption}\label{wxdatesetoption} - -\func{int}{SetOption}{\param{int}{ option}, \param{const bool}{ enable=TRUE}} - -Enables or disables an option for formatting. - -\wxheading{Parameters} - -\docparam{option}{May be one of: - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf wxNO\_CENTURY}}{The century is not formatted.} -\twocolitem{{\bf wxDATE\_ABBR}}{Month and day names are abbreviated to 3 characters when formatting.} -\end{twocollist}} - -\membersection{wxDate::operator wxString}\label{wxdatewxstring} - -\func{}{operator wxString}{\void} - -Conversion operator, to convert wxDate to wxString by calling FormatDate. - -\membersection{wxDate::operator $+$}\label{wxdateplus} - -\func{wxDate}{operator $+$}{\param{long}{ i}} - -\func{wxDate}{operator $+$}{\param{int}{ i}} - -Adds an integer number of days to the date, returning a date. - -\membersection{wxDate::operator $-$}\label{wxdateminus} - -\func{wxDate}{operator $-$}{\param{long}{ i}} - -\func{wxDate}{operator $-$}{\param{int}{ i}} - -Subtracts an integer number of days from the date, returning a date. - -\func{long}{operator $-$}{\param{const wxDate\&}{ date}} - -Subtracts one date from another, return the number of intervening days. - -\membersection{wxDate::operator $+=$}\label{wxdateplusequals} - -\func{wxDate\&}{operator $+=$}{\param{long}{ i}} - -Postfix operator: adds an integer number of days to the date, returning -a reference to `this' date. - -\membersection{wxDate::operator $-=$}\label{wxdateminusequals} - -\func{wxDate\&}{operator $-=$}{\param{long}{ i}} - -Postfix operator: subtracts an integer number of days from the date, returning -a reference to `this' date. - -\membersection{wxDate::operator $++$}\label{wxdateplusplus} - -\func{wxDate\&}{operator $++$}{\void} - -Increments the date (postfix or prefix). - -\membersection{wxDate::operator $--$}\label{wxdateminusminus} - -\func{wxDate\&}{operator $--$}{\void} - -Decrements the date (postfix or prefix). - -\membersection{wxDate::operator $<$}\label{wxdatelessthan} - -\func{friend bool}{operator $<$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}} - -Function to compare two dates, returning TRUE if {\it date1} is earlier than {\it date2}. - -\membersection{wxDate::operator $<=$}\label{wxdatelessthaneq} - -\func{friend bool}{operator $<=$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}} - -Function to compare two dates, returning TRUE if {\it date1} is earlier than or equal to {\it date2}. - -\membersection{wxDate::operator $>$}\label{wxdategreaterthan} - -\func{friend bool}{operator $>$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}} - -Function to compare two dates, returning TRUE if {\it date1} is later than {\it date2}. - -\membersection{wxDate::operator $>=$}\label{wxdategreaterthaneq} - -\func{friend bool}{operator $>=$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}} - -Function to compare two dates, returning TRUE if {\it date1} is later than or equal to {\it date2}. - -\membersection{wxDate::operator $==$}\label{wxdateequals} - -\func{friend bool}{operator $==$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}} - -Function to compare two dates, returning TRUE if {\it date1} is equal to {\it date2}. - -\membersection{wxDate::operator $!=$}\label{wxdatenotequals} - -\func{friend bool}{operator $!=$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}} - -Function to compare two dates, returning TRUE if {\it date1} is not equal to {\it date2}. - -\membersection{wxDate::operator \cinsert}\label{wxdateinsert} - -\func{friend ostream\&}{operator \cinsert}{\param{ostream\&}{ os}, \param{const wxDate\&}{ date}} - -Function to output a wxDate to an ostream. - - diff --git a/docs/latex/wx/datstrm.tex b/docs/latex/wx/datstrm.tex deleted file mode 100644 index 637ee3ae0b..0000000000 --- a/docs/latex/wx/datstrm.tex +++ /dev/null @@ -1,114 +0,0 @@ -\section{\class{wxDataStream}}\label{wxdatastream} - -This class provides functions that read and write integers or double in a -portable way. So, a file written by an Intel processor can be read by a -Sparc or anything else. - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxDataStream::wxDataStream}\label{wxdatastreamconstr} - -\func{}{wxDataStream}{\param{istream\&}{ stream}} - -Constructs a datastream object from a C++ input stream. Only read methods will -be available. - -\wxheading{Parameters} - -\docparam{stream}{The C++ input stream.} - -\func{}{wxDataStream}{\param{istream\&}{ stream}} - -Constructs a datastream object from a C++ input stream. Only read methods will -be available. - -\wxheading{Parameters} - -\docparam{stream}{The C++ input stream.} - -\membersection{wxDataStream::\destruct{wxDataStream}} - -\func{}{\destruct{wxDataStream}}{\void} - -Destroys the wxDataStream object. - -\membersection{wxDataStream::Read8} - -\func{unsigned char}{Read8}{\void} - -Reads a single byte from the stream. - -\membersection{wxDataStream::Read16} - -\func{unsigned short}{Read16}{\void} - -Reads a 16 bit integer from the stream. - -\membersection{wxDataStream::Read32} - -\func{unsigned long}{Read32}{\void} - -Reads a 32 bit integer from the stream. - -\membersection{wxDataStream::ReadDouble} - -\func{double}{ReadDouble}{\void} - -Reads a double (IEEE encoded) from the stream. - -\membersection{wxDataStream::ReadString} - -\func{wxString}{wxDataStream::ReadString}{\void} - -Reads a string from a stream. Actually, this function first reads a byte -specifying the length of the string (without the last null character) and then -reads the string. - -\membersection{wxDataStream::ReadLine} - -\func{wxString}{wxDataStream::ReadLine}{\void} - -Reads a line from the stream. A line is a string which ends with \\n or \\r\\n. - -\membersection{wxDataStream::Write8} - -\func{void}{wxDataStream::Write8}{{\param unsigned char }{i8}} - -Writes the single byte {\it i8} to the stream. - -\membersection{wxDataStream::Write16} - -\func{void}{wxDataStream::Write16}{{\param unsigned short }{i16}} - -Writes the 16 bit integer {\it i16} to the stream. - -\membersection{wxDataStream::Write32} - -\func{void}{wxDataStream::Write32}{{\param unsigned long }{i32}} - -Writes the 32 bit integer {\it i32} to the stream. - -\membersection{wxDataStream::WriteDouble} - -\func{void}{wxDataStream::WriteDouble}{{\param double }{f}} - -Writes the double {\it f} to the stream using the IEEE format. - -\membersection{wxDataStream::WriteString} - -\func{void}{wxDataStream::WriteString}{{\param const wxString\& }{string}} - -Writes {\it string} to the stream. Actually, this method writes the size of -the string before writing {\it string} itself. - -\membersection{wxDataStream::WriteLine} - -\func{void}{wxDataStream::WriteLine}{{\param const wxString\& }{string}} - -Writes {\it string} as a line. Depending on the operating system, it adds -\\n or \\r\\n. - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: "referenc" -%%% End: diff --git a/docs/latex/wx/dc.tex b/docs/latex/wx/dc.tex deleted file mode 100644 index 333d6355b7..0000000000 --- a/docs/latex/wx/dc.tex +++ /dev/null @@ -1,698 +0,0 @@ -\section{\class{wxDC}}\label{wxdc} - -A wxDC is a {\it device context} onto which graphics and text can be drawn. -It is intended to represent a number of output devices in a generic way, -so a window can have a device context associated with it, and a printer also has a device context. -In this way, the same piece of code may write to a number of different devices, -if the device context is used as a parameter. - -Derived types of wxDC have documentation for specific features -only, so refer to this section for most device context information. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{Overview}{dcoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxDC::wxDC} - -\func{}{wxDC}{\void} - -Constructor. - -\membersection{wxDC::\destruct{wxDC}} - -\func{}{\destruct{wxDC}}{\void} - -Destructor. - -\membersection{wxDC::BeginDrawing}\label{wxdcbegindrawing} - -\func{void}{BeginDrawing}{\void} - -Allows optimization of drawing code under MS Windows. Enclose -drawing primitives between {\bf BeginDrawing} and {\bf EndDrawing}\rtfsp -calls. - -Drawing to a wxDialog panel device context outside of a -system-generated OnPaint event {\it requires} this pair of calls to -enclose drawing code. This is because a Windows dialog box does not have -a retained device context associated with it, and selections such as pen -and brush settings would be lost if the device context were obtained and -released for each drawing operation. - -\membersection{wxDC::Blit}\label{wxdcblit} - -\func{bool}{Blit}{\param{long}{ xdest}, \param{long}{ ydest}, \param{long}{ width}, \param{long}{ height}, - \param{wxDC* }{source}, \param{long}{ xsrc}, \param{long}{ ysrc}, \param{int}{ logicalFunc}, - \param{bool }{useMask}} - -Copy from a source DC to this DC, specifying the destination -coordinates, size of area to copy, source DC, source coordinates, and -logical function. - -\wxheading{Parameters} - -\docparam{xdest}{Destination device context x position.} - -\docparam{ydest}{Destination device context y position.} - -\docparam{width}{Width of source area to be copied.} - -\docparam{height}{Height of source area to be copied.} - -\docparam{source}{Source device context.} - -\docparam{xsrc}{Source device context x position.} - -\docparam{ysrc}{Source device context y position.} - -\docparam{logicalFunc}{Logical function to use: see \helpref{wxDC::SetLogicalFunction}{wxdcsetlogicalfunction}.} - -\docparam{useMask}{If TRUE, Blit does a transparent blit using the mask that is associated with the bitmap -selected into the source device context. The Windows implementation does the following: - -\begin{enumerate} -\item Creates a temporary bitmap and copies the destination area into it. -\item Copies the source area into the temporary bitmap using the specified logical function. -\item Sets the masked area in the temporary bitmap to BLACK by ANDing the -mask bitmap with the temp bitmap with the foreground colour set to WHITE -and the bg colour set to BLACK. -\item Sets the unmasked area in the destination area to BLACK by ANDing the -mask bitmap with the destination area with the foreground colour set to BLACK -and the background colour set to WHITE. -\item ORs the temporary bitmap with the destination area. -\item Deletes the temporary bitmap. -\end{enumerate} - -This sequence of operations ensures that the source's transparent area need not be black, -and logical functions are supported. -} - -\wxheading{Remarks} - -There is partial support for Blit in wxPostScriptDC, under X. - -See \helpref{wxMemoryDC}{wxmemorydc} for typical usage. - -wxheading{See also} - -\helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxBitmap}{wxbitmap}, \helpref{wxMask}{wxmask} - -\membersection{wxDC::Clear}\label{wxdcclear} - -\func{void}{Clear}{\void} - -Clears the device context using the current background brush. - -\membersection{wxDC::CrossHair}\label{wxdccrosshair} - -\func{void}{CrossHair}{\param{long}{ x}, \param{long}{ y}} - -Displays a cross hair using the current pen. This is a vertical -and horizontal line the height and width of the window, centred -on the given point. - -\membersection{wxDC::DestroyClippingRegion}\label{wxdcdestroyclippingregion} - -\func{void}{DestroyClippingRegion}{\void} - -Destroys the current clipping region so that none of the DC is clipped. -See also \helpref{wxDC::SetClippingRegion}{wxdcsetclippingregion}. - -\membersection{wxDC::DeviceToLogicalX}\label{wxdcdevicetologicalx} - -\func{long}{DeviceToLogicalX}{\param{long}{ x}} - -Convert device X coordinate to logical coordinate, using the current -mapping mode. - -\membersection{wxDC::DeviceToLogicalXRel}\label{wxdcdevicetologicalxrel} - -\func{long}{DeviceToLogicalXRel}{\param{long}{ x}} - -Convert device X coordinate to relative logical coordinate, using the current -mapping mode. Use this function for converting a width, for example. - -\membersection{wxDC::DeviceToLogicalY}\label{wxdcdevicetologicaly} - -\func{long}{DeviceToLogicalY}{\param{long}{ y}} - -Converts device Y coordinate to logical coordinate, using the current -mapping mode. - -\membersection{wxDC::DeviceToLogicalYRel}\label{wxdcdevicetologicalyrel} - -\func{long}{DeviceToLogicalYRel}{\param{long}{ y}} - -Convert device Y coordinate to relative logical coordinate, using the current -mapping mode. Use this function for converting a height, for example. - -\membersection{wxDC::DrawArc}\label{wxdcdrawarc} - -\func{void}{DrawArc}{\param{long}{ x1}, \param{long}{ y1}, \param{long}{ x2}, \param{long}{ y2}, \param{double}{ xc}, \param{double}{ yc}} - -Draws an arc of a circle, centred on ({\it xc, yc}), with starting point ({\it x1, y1}) -and ending at ({\it x2, y2}). The current pen is used for the outline -and the current brush for filling the shape. - -The arc is drawn in an anticlockwise direction from the start point to the end point. - -\membersection{wxDC::DrawEllipse}\label{wxdcdrawellipse} - -\func{void}{DrawEllipse}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}} - -Draws an ellipse contained in the rectangle with the given top left corner, and with the -given size. The current pen is used for the outline and the current brush for -filling the shape. - -\membersection{wxDC::DrawEllipticArc}\label{wxdcdrawellipticarc} - -\func{void}{DrawEllipticArc}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}, - \param{double}{ start}, \param{double}{ end}} - -Draws an arc of an ellipse. The current pen is used for drawing the arc and -the current brush is used for drawing the pie. This function is currently only available for -X window and PostScript device contexts. - -{\it x} and {\it y} specify the x and y coordinates of the upper-left corner of the rectangle that contains -the ellipse. - -{\it width} and {\it height} specify the width and height of the rectangle that contains -the ellipse. - -{\it start} and {\it end} specify the start and end of the arc relative to the three-o'clock -position from the center of the rectangle. Angles are specified -in degrees (360 is a complete circle). Positive values mean -counter-clockwise motion. If {\it start} is equal to {\it end}, a -complete ellipse will be drawn. - -\membersection{wxDC::DrawIcon}\label{wxdcdrawicon} - -\func{void}{DrawIcon}{\param{const wxIcon\&}{ icon}, \param{long}{ x}, \param{long}{ y}} - -Draw an icon on the display (does nothing if the device context is PostScript). -This can be the simplest way of drawing bitmaps on a window. - -\membersection{wxDC::DrawLine}\label{wxdcdrawline} - -\func{void}{DrawLine}{\param{long}{ x1}, \param{long}{ y1}, \param{long}{ x2}, \param{long}{ y2}} - -Draws a line from the first point to the second. The current pen is used -for drawing the line. - -\membersection{wxDC::DrawLines}\label{wxdcdrawlines} - -\func{void}{DrawLines}{\param{int}{ n}, \param{wxPoint}{ points[]}, \param{long}{ xoffset = 0}, \param{long}{ yoffset = 0}} - -\func{void}{DrawLines}{\param{wxList *}{points}, \param{long}{ xoffset = 0}, \param{long}{ yoffset = 0}} - -Draws lines using an array of {\it points} of size {\it n}, or list of -pointers to points, adding the optional offset coordinate. The current -pen is used for drawing the lines. The programmer is responsible for -deleting the list of points. - -\membersection{wxDC::DrawPolygon}\label{wxdcdrawpolygon} - -\func{void}{DrawPolygon}{\param{int}{ n}, \param{wxPoint}{ points[]}, \param{long}{ xoffset = 0}, \param{long}{ yoffset = 0},\\ - \param{int }{fill\_style = wxODDEVEN\_RULE}} - -\func{void}{DrawPolygon}{\param{wxList *}{points}, \param{long}{ xoffset = 0}, \param{long}{ yoffset = 0},\\ - \param{int }{fill\_style = wxODDEVEN\_RULE}} - -Draws a filled polygon using an array of {\it points} of size {\it n}, -or list of pointers to points, adding the optional offset coordinate. - -The last argument specifies the fill rule: {\bf wxODDEVEN\_RULE} (the -default) or {\bf wxWINDING\_RULE}. - -The current pen is used for drawing the outline, and the current brush -for filling the shape. Using a transparent brush suppresses filling. -The programmer is responsible for deleting the list of points. - -Note that wxWindows automatically closes the first and last points. - -\membersection{wxDC::DrawPoint}\label{wxdcdrawpoint} - -\func{void}{DrawPoint}{\param{long}{ x}, \param{long}{ y}} - -Draws a point using the current pen. - -\membersection{wxDC::DrawRectangle}\label{wxdcdrawrectangle} - -\func{void}{DrawRectangle}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}} - -Draws a rectangle with the given top left corner, and with the given -size. The current pen is used for the outline and the current brush -for filling the shape. - -\membersection{wxDC::DrawRoundedRectangle}\label{wxdcdrawroundedrectangle} - -\func{void}{DrawRoundedRectangle}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}, \param{double}{ radius = 20}} - -Draws a rectangle with the given top left corner, and with the given -size. The corners are quarter-circles using the given radius. The -current pen is used for the outline and the current brush for filling -the shape. - -If {\it radius} is positive, the value is assumed to be the -radius of the rounded corner. If {\it radius} is negative, -the absolute value is assumed to be the {\it proportion} of the smallest -dimension of the rectangle. This means that the corner can be -a sensible size relative to the size of the rectangle, and also avoids -the strange effects X produces when the corners are too big for -the rectangle. - -\membersection{wxDC::DrawSpline}\label{wxdcdrawspline} - -\func{void}{DrawSpline}{\param{wxList *}{points}} - -Draws a spline between all given control points, using the current -pen. Doesn't delete the wxList and contents. The spline is drawn -using a series of lines, using an algorithm taken from the X drawing -program `XFIG'. - -\func{void}{DrawSpline}{\param{long}{ x1}, \param{long}{ y1}, \param{long}{ x2}, \param{long}{ y2}, \param{long}{ x3}, \param{long}{ y3}} - -Draws a three-point spline using the current pen. - -\membersection{wxDC::DrawText}\label{wxdcdrawtext} - -\func{void}{DrawText}{\param{const wxString\& }{text}, \param{long}{ x}, \param{long}{ y}} - -Draws a text string at the specified point, using the current text font, -and the current text foreground and background colours. - -The coordinates refer to the top-left corner of the rectangle bounding -the string. See \helpref{wxDC::GetTextExtent}{wxdcgettextextent} for how -to get the dimensions of a text string, which can be used to position the -text more precisely. - -\membersection{wxDC::EndDoc}\label{wxdcenddoc} - -\func{void}{EndDoc}{\void} - -Ends a document (only relevant when outputting to a printer). - -\membersection{wxDC::EndDrawing}\label{wxdcenddrawing} - -\func{void}{EndDrawing}{\void} - -Allows optimization of drawing code under MS Windows. Enclose -drawing primitives between {\bf BeginDrawing} and {\bf EndDrawing}\rtfsp -calls. - -\membersection{wxDC::EndPage}\label{wxdcendpage} - -\func{void}{EndPage}{\void} - -Ends a document page (only relevant when outputting to a printer). - -\membersection{wxDC::FloodFill}\label{wxdcfloodfill} - -\func{void}{FloodFill}{\param{long}{ x}, \param{long}{ y}, \param{wxColour *}{colour}, \param{int}{ style=wxFLOOD\_SURFACE}} - -Flood fills the device context starting from the given point, in the given colour, -and using a style: - -\begin{itemize}\itemsep=0pt -\item wxFLOOD\_SURFACE: the flooding occurs until a colour other than the given colour is encountered. -\item wxFLOOD\_BORDER: the area to be flooded is bounded by the given colour. -\end{itemize} - -{\it Note:} this function is available in MS Windows only. - -\membersection{wxDC::GetBackground}\label{wxdcgetbackground} - -\func{wxBrush *}{GetBackground}{\void} - -Gets the brush used for painting the background (see \helpref{wxDC::SetBackground}{wxdcsetbackground}). - -\membersection{wxDC::GetBrush}\label{wxdcgetbrush} - -\func{wxBrush *}{GetBrush}{\void} - -Gets the current brush (see \helpref{wxDC::SetBrush}{wxdcsetbrush}). - -\membersection{wxDC::GetCharHeight}\label{wxdcgetcharheight} - -\func{long}{GetCharHeight}{\void} - -Gets the character height of the currently set font. - -\membersection{wxDC::GetCharWidth}\label{wxdcgetcharwidth} - -\func{long}{GetCharWidth}{\void} - -Gets the average character width of the currently set font. - -\membersection{wxDC::GetClippingBox}\label{wxdcgetclippingbox} - -\func{void}{GetClippingBox}{\param{long}{ *x}, \param{long}{ *y}, \param{long}{ *width}, \param{long}{ *height}} - -Gets the rectangle surrounding the current clipping region. - -\membersection{wxDC::GetFont}\label{wxdcgetfont} - -\func{wxFont *}{GetFont}{\void} - -Gets the current font (see \helpref{wxDC::SetFont}{wxdcsetfont}). - -\membersection{wxDC::GetLogicalFunction}\label{wxdcgetlogicalfunction} - -\func{int}{GetLogicalFunction}{\void} - -Gets the current logical function (see \helpref{wxDC::SetLogicalFunction}{wxdcsetlogicalfunction}). - -\membersection{wxDC::GetMapMode}\label{wxdcgetmapmode} - -\func{int}{GetMapMode}{\void} - -Gets the {\it mapping mode} for the device context (see \helpref{wxDC::SetMapMode}{wxdcsetmapmode}). - -\membersection{wxDC::GetOptimization}\label{wxdcgetoptimization} - -\func{bool}{GetOptimization}{\void} - -Returns TRUE if device context optimization is on. -See \helpref{wxDC::SetOptimization}{wxsetoptimization} for details. - -\membersection{wxDC::GetPen}\label{wxdcgetpen} - -\func{wxPen *}{GetPen}{\void} - -Gets the current pen (see \helpref{wxDC::SetPen}{wxdcsetpen}). - -\membersection{wxDC::GetPixel}\label{wxdcgetpixel} - -\func{bool}{GetPixel}{\param{long}{ x}, \param{long}{ y}, \param{wxColour *}{colour}} - -Sets {\it colour} to the colour at the specified location. Windows only; an X implementation -is being worked on. Not available for wxPostScriptDC or wxMetaFileDC. - -\membersection{wxDC::GetSize}\label{wxdcgetsize} - -\func{void}{GetSize}{\param{long *}{width}, \param{long *}{height}} - -For a PostScript device context, this gets the maximum size of graphics -drawn so far on the device context. - -For a Windows printer device context, this gets the horizontal and vertical -resolution. It can be used to scale graphics to fit the page when using -a Windows printer device context. For example, if {\it maxX} and {\it maxY}\rtfsp -represent the maximum horizontal and vertical `pixel' values used in your -application, the following code will scale the graphic to fit on the -printer page: - -\begin{verbatim} - long w, h; - dc.GetSize(&w, &h); - double scaleX=(double)(maxX/w); - double scaleY=(double)(maxY/h); - dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY)); -\end{verbatim} - -\membersection{wxDC::GetTextBackground}\label{wxdcgettextbackground} - -\func{wxColour\&}{GetTextBackground}{\void} - -Gets the current text background colour (see \helpref{wxDC::SetTextBackground}{wxdcsettextbackground}). - -\membersection{wxDC::GetTextExtent}\label{wxdcgettextextent} - -\func{void}{GetTextExtent}{\param{const wxString\& }{string}, \param{long *}{w}, \param{long *}{h},\\ - \param{long *}{descent = NULL}, \param{long *}{externalLeading = NULL}, \param{wxFont *}{font = NULL}} - -Gets the dimensions of the string using the currently selected font. -\rtfsp{\it string} is the text string to measure, {\it w} and {\it h} are -the total width and height respectively, {\it descent} is the -dimension from the baseline of the font to the bottom of the -descender, and {\it externalLeading} is any extra vertical space added -to the font by the font designer (usually is zero). - -The optional parameter {\it font} specifies an alternative -to the currently selected font: but note that this does not -yet work under Windows, so you need to set a font for -the device context first. - -See also \helpref{wxFont}{wxfont}, \helpref{wxDC::SetFont}{wxdcsetfont}. - -\membersection{wxDC::GetTextForeground}\label{wxdcgettextforeground} - -\func{wxColour\&}{GetTextForeground}{\void} - -Gets the current text foreground colour (see \helpref{wxDC::SetTextForeground}{wxdcsettextforeground}). - -\membersection{wxDC::LogicalToDeviceX}\label{wxdclogicaltodevicex} - -\func{long}{LogicalToDeviceX}{\param{long}{ x}} - -Converts logical X coordinate to device coordinate, using the current -mapping mode. - -\membersection{wxDC::LogicalToDeviceXRel}\label{wxdclogicaltodevicexrel} - -\func{long}{LogicalToDeviceXRel}{\param{long}{ x}} - -Converts logical X coordinate to relative device coordinate, using the current -mapping mode. Use this for converting a width, for example. - -\membersection{wxDC::LogicalToDeviceY}\label{wxdclogicaltodevicey} - -\func{long}{LogicalToDeviceY}{\param{long}{ y}} - -Converts logical Y coordinate to device coordinate, using the current -mapping mode. - -\membersection{wxDC::LogicalToDeviceYRel}\label{wxdclogicaltodeviceyrel} - -\func{long}{LogicalToDeviceYRel}{\param{long}{ y}} - -Converts logical Y coordinate to relative device coordinate, using the current -mapping mode. Use this for converting a height, for example. - -\membersection{wxDC::MaxX}\label{wxdcmaxx} - -\func{long}{MaxX}{\void} - -Gets the maximum horizontal extent used in drawing commands so far. - -\membersection{wxDC::MaxY}\label{wxdcmaxy} - -\func{long}{MaxY}{\void} - -Gets the maximum vertical extent used in drawing commands so far. - -\membersection{wxDC::MinX}\label{wxdcminx} - -\func{long}{MinX}{\void} - -Gets the minimum horizontal extent used in drawing commands so far. - -\membersection{wxDC::MinY}\label{wxdcminy} - -\func{long}{MinY}{\void} - -Gets the minimum vertical extent used in drawing commands so far. - -\membersection{wxDC::Ok}\label{wxdcok} - -\func{bool}{Ok}{\void} - -Returns TRUE if the DC is ok to use. - -\membersection{wxDC::SetDeviceOrigin}\label{wxdcsetdeviceorigin} - -\func{void}{SetDeviceOrigin}{\param{long}{ x}, \param{long}{ y}} - -Sets the device origin (i.e., the origin in pixels after scaling has been -applied). - -This function may be useful in Windows printing -operations for placing a graphic on a page. - -\membersection{wxDC::SetBackground}\label{wxdcsetbackground} - -\func{void}{SetBackground}{\param{const wxBrush\& }{brush}} - -Sets the current background brush for the DC. - -\membersection{wxDC::SetBackgroundMode}\label{wxdcsetbackgroundmode} - -\func{void}{SetBackgroundMode}{\param{int}{ mode}} - -{\it mode} may be one of wxSOLID and wxTRANSPARENT. This setting determines -whether text will be drawn with a background colour or not. - -\membersection{wxDC::SetClippingRegion}\label{wxdcsetclippingregion} - -\func{void}{SetClippingRegion}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}} - -Sets the clipping region for the DC. The clipping region is a rectangular area -to which drawing is restricted. Possible uses for the clipping region are for clipping text -or for speeding up window redraws when only a known area of the screen is damaged. - -See also \helpref{wxDC::DestroyClippingRegion}{wxdcdestroyclippingregion}. - -\membersection{wxDC::SetPalette}\label{wxdcsetpalette} - -\func{void}{SetPalette}{\param{const wxPalette\& }{palette}} - -If this is a window DC or memory DC, assigns the given palette to the window -or bitmap associated with the DC. If the argument is wxNullPalette, the current -palette is selected out of the device context, and the original palette -restored. - -See \helpref{wxPalette}{wxpalette} for further details. - -\membersection{wxDC::SetBrush}\label{wxdcsetbrush} - -\func{void}{SetBrush}{\param{const wxBrush\& }{brush}} - -Sets the current brush for the DC. - -If the argument is wxNullBrush, the current brush is selected out of the device -context, and the original brush restored, allowing the current brush to -be destroyed safely. - -See also \helpref{wxBrush}{wxbrush}. - -\membersection{wxDC::SetFont}\label{wxdcsetfont} - -\func{void}{SetFont}{\param{const wxFont\& }{font}} - -Sets the current font for the DC. - -If the argument is wxNullFont, the current font is selected out of the device -context, and the original font restored, allowing the current font to -be destroyed safely. - -See also \helpref{wxFont}{wxfont}. - -\membersection{wxDC::SetLogicalFunction}\label{wxdcsetlogicalfunction} - -\func{void}{SetLogicalFunction}{\param{int}{ function}} - -Sets the current logical function for the device context. This determines how -a source pixel (from a pen or brush colour, or source device context if -using \helpref{wxDC::Blit}{wxdcblit}) combines with a destination pixel in the -current device context. - -The possible values -and their meaning in terms of source and destination pixel values are -as follows: - -\begin{verbatim} -wxAND src AND dst -wxAND_INVERT (NOT src) AND dst -wxAND_REVERSE src AND (NOT dst) -wxCLEAR 0 -wxCOPY src -wxEQUIV (NOT src) XOR dst -wxINVERT NOT dst -wxNAND (NOT src) OR (NOT dst) -wxNOR (NOT src) AND (NOT dst) -wxNO_OP dst -wxOR src OR dst -wxOR_INVERT (NOT src) OR dst -wxOR_REVERSE src OR (NOT dst) -wxSET 1 -wxSRC_INVERT NOT src -wxXOR src XOR dst -\end{verbatim} - -The default is wxCOPY, which simply draws with the current colour. -The others combine the current colour and the background using a -logical operation. wxXOR is commonly used for drawing rubber bands or -moving outlines, since drawing twice reverts to the original colour. - -\membersection{wxDC::SetMapMode}\label{wxdcsetmapmode} - -\func{void}{SetMapMode}{\param{int}{ int}} - -The {\it mapping mode} of the device context defines the unit of -measurement used to convert logical units to device units. Note that -in X, text drawing isn't handled consistently with the mapping mode; a -font is always specified in point size. However, setting the {\it -user scale} (see \helpref{wxDC::SetUserScale}{wxdcsetuserscale}) scales the text appropriately. In -Windows, scaleable TrueType fonts are always used; in X, results depend -on availability of fonts, but usually a reasonable match is found. - -Note that the coordinate origin should ideally be selectable, but for -now is always at the top left of the screen/printer. - -Drawing to a Windows printer device context under UNIX -uses the current mapping mode, but mapping mode is currently ignored for -PostScript output. - -The mapping mode can be one of the following: - -\begin{twocollist}\itemsep=0pt -\twocolitem{MM\_TWIPS}{Each logical unit is 1/20 of a point, or 1/1440 of - an inch.} -\twocolitem{MM\_POINTS}{Each logical unit is a point, or 1/72 of an inch.} -\twocolitem{MM\_METRIC}{Each logical unit is 1 mm.} -\twocolitem{MM\_LOMETRIC}{Each logical unit is 1/10 of a mm.} -\twocolitem{MM\_TEXT}{Each logical unit is 1 pixel.} -\end{twocollist} - -\membersection{wxDC::SetOptimization}\label{wxsetoptimization} - -\func{void}{SetOptimization}{\param{bool }{optimize}} - -If {\it optimize} is TRUE (the default), this function sets optimization mode on. -This currently means that under X, the device context will not try to set a pen or brush -property if it is known to be set already. This approach can fall down -if non-wxWindows code is using the same device context or window, for example -when the window is a panel on which the windowing system draws panel items. -The wxWindows device context 'memory' will now be out of step with reality. - -Setting optimization off, drawing, then setting it back on again, is a trick -that must occasionally be employed. - -\membersection{wxDC::SetPen}\label{wxdcsetpen} - -\func{void}{SetPen}{\param{const wxPen\& }{pen}} - -Sets the current pen for the DC. - -If the argument is wxNullPen, the current pen is selected out of the device -context, and the original pen restored. - -\membersection{wxDC::SetTextBackground}\label{wxdcsettextbackground} - -\func{void}{SetTextBackground}{\param{const wxColour\& }{colour}} - -Sets the current text background colour for the DC. - -\membersection{wxDC::SetTextForeground}\label{wxdcsettextforeground} - -\func{void}{SetTextForeground}{\param{const wxColour\& }{colour}} - -Sets the current text foreground colour for the DC. - -\membersection{wxDC::SetUserScale}\label{wxdcsetuserscale} - -\func{void}{SetUserScale}{\param{double}{ xScale}, \param{double}{ yScale}} - -Sets the user scaling factor, useful for applications which require -`zooming'. - -\membersection{wxDC::StartDoc}\label{wxdcstartdoc} - -\func{bool}{StartDoc}{\param{const wxString\& }{message}} - -Starts a document (only relevant when outputting to a printer). -Message is a message to show whilst printing. - -\membersection{wxDC::StartPage}\label{wxdcstartpage} - -\func{bool}{StartPage}{\void} - -Starts a document page (only relevant when outputting to a printer). - diff --git a/docs/latex/wx/ddeclint.tex b/docs/latex/wx/ddeclint.tex deleted file mode 100644 index 646420c789..0000000000 --- a/docs/latex/wx/ddeclint.tex +++ /dev/null @@ -1,67 +0,0 @@ -\section{\class{wxDDEClient}}\label{wxddeclient} - -\overview{Interprocess communications overview}{ipcoverview} - -A wxDDEClient object represents the client part of a client-server DDE -(Dynamic Data Exchange) conversation (available in {\it both}\/ -Windows and UNIX). - -To create a client which can communicate with a suitable server, -you need to derive a class from wxDDEConnection and another from wxDDEClient. -The custom wxDDEConnection class will intercept communications in -a `conversation' with a server, and the custom wxDDEServer is required -so that a user-overriden \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} member can return -a wxDDEConnection of the required class, when a connection is made. - -\wxheading{Derived from} - -wxDDEObject - -\wxheading{See also} - -\helpref{wxDDEServer}{wxddeserver}, \helpref{wxDDEConnection}{wxddeconnection}, -the chapter on interprocess communication in the user manual, and -the programs in {\tt samples/ipc}. - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxDDEClient::wxDDEClient} - -\func{}{wxDDEClient}{\void} - -Constructs a client object. - -\membersection{wxDDEClient::MakeConnection}\label{wxddeclientmakeconnection} - -\func{wxDDEConnection *}{MakeConnection}{\param{const wxString\& }{host}, \param{const wxString\& }{service}, \param{const wxString\& }{topic}} - -Tries to make a connection with a server specified by the host -(machine name under UNIX, ignored under Windows), service name (must -contain an integer port number under UNIX), and topic string. If the -server allows a connection, a wxDDEConnection object will be returned. -The type of wxDDEConnection returned can be altered by overriding -the \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} member to return your own -derived connection object. - -\membersection{wxDDEClient::OnMakeConnection}\label{wxddeclientonmakeconnection} - -\func{wxDDEConnection *}{OnMakeConnection}{\void} - -The type of \helpref{wxDDEConnection}{wxddeconnection} returned from a \helpref{wxDDEClient::MakeConnection}{wxddeclientmakeconnection} call can -be altered by deriving the {\bf OnMakeConnection} member to return your -own derived connection object. By default, an ordinary wxDDEConnection -object is returned. - -The advantage of deriving your own connection class is that it will -enable you to intercept messages initiated by the server, such -as \helpref{wxDDEConnection::OnAdvise}{wxddeconnectiononadvise}. You may also want to -store application-specific data in instances of the new class. - -\membersection{wxDDEClient::ValidHost} - -\func{bool}{ValidHost}{\param{const wxString\& }{host}} - -Returns TRUE if this is a valid host name, FALSE otherwise. This always -returns TRUE under MS Windows. - - diff --git a/docs/latex/wx/ddeconn.tex b/docs/latex/wx/ddeconn.tex deleted file mode 100644 index d1486d7884..0000000000 --- a/docs/latex/wx/ddeconn.tex +++ /dev/null @@ -1,166 +0,0 @@ -\section{\class{wxDDEConnection}}\label{wxddeconnection} - -A wxDDEConnection object represents the connection between a client and a -server. It can be created by making a connection using a\rtfsp -\helpref{wxDDEClient}{wxddeclient} object, or by the acceptance of a connection by a\rtfsp -\helpref{wxDDEServer}{wxddeserver} object. The bulk of a DDE (Dynamic Data Exchange) -conversation (available in both Windows and UNIX) is controlled by -calling members in a {\bf wxDDEConnection} object or by overriding its -members. - -An application should normally derive a new connection class from -wxDDEConnection, in order to override the communication event handlers -to do something interesting. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxDDEClient}{wxddeclient}, \helpref{wxDDEServer}{wxddeserver}, \helpref{Interprocess communications overview}{ipcoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxDDEConnection::wxDDEConnection} - -\func{}{wxDDEConnection}{\void} - -\func{}{wxDDEConnection}{\param{char* }{buffer}, \param{int}{ size}} - -Constructs a connection object. If no user-defined connection object is -to be derived from wxDDEConnection, then the constructor should not be -called directly, since the default connection object will be provided on -requesting (or accepting) a connection. However, if the user defines his -or her own derived connection object, the \helpref{wxDDEServer::OnAcceptConnection}{wxddeserveronacceptconnection}\rtfsp -and/or \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} members should be replaced by -functions which construct the new connection object. If the arguments of -the wxDDEConnection constructor are void, then a default buffer is -associated with the connection. Otherwise, the programmer must provide a -a buffer and size of the buffer for the connection object to use in -transactions. - -\membersection{wxDDEConnection::Advise} - -\func{bool}{Advise}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{int}{ format = wxCF\_TEXT}} - -Called by the server application to advise the client of a change in -the data associated with the given item. Causes the client -connection's \helpref{wxDDEConnection::OnAdvise}{wxddeconnectiononadvise} -member to be called. Returns TRUE if successful. - -\membersection{wxDDEConnection::Execute} - -\func{bool}{Execute}{\param{char* }{data}, \param{int}{ size = -1}, -\param{int}{ format = wxCF\_TEXT}} - -Called by the client application to execute a command on the server. Can -also be used to transfer arbitrary data to the server (similar -to \helpref{wxDDEConnection::Poke}{wxddeconnectionpoke} in that respect). Causes the -server connection's \helpref{wxDDEConnection::OnExecute}{wxddeconnectiononexecute} member to be -called. Returns TRUE if successful. - -\membersection{wxDDEConnection::Disconnect} - -\func{bool}{Disconnect}{\void} - -Called by the client or server application to disconnect from the other -program; it causes the \helpref{wxDDEConnection::OnDisconnect}{wxddeconnectionondisconnect} message -to be sent to the corresponding connection object in the other -program. The default behaviour of {\bf OnDisconnect} is to delete the -connection, but the calling application must explicitly delete its -side of the connection having called {\bf Disconnect}. Returns TRUE if -successful. - -\membersection{wxDDEConnection::OnAdvise}\label{wxddeconnectiononadvise} - -\func{bool}{OnAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size}, \param{int}{ format}} - -Message sent to the client application when the server notifies it of a -change in the data associated with the given item. - -\membersection{wxDDEConnection::OnDisconnect}\label{wxddeconnectionondisconnect} - -\func{bool}{OnDisconnect}{\void} - -Message sent to the client or server application when the other -application notifies it to delete the connection. Default behaviour is -to delete the connection object. - -\membersection{wxDDEConnection::OnExecute}\label{wxddeconnectiononexecute} - -\func{bool}{OnExecute}{\param{const wxString\& }{topic}, \param{char* }{data}, \param{int}{ size}, \param{int}{ format}} - -Message sent to the server application when the client notifies it to -execute the given data. Note that there is no item associated with -this message. - -\membersection{wxDDEConnection::OnPoke}\label{wxddeconnectiononpoke} - -\func{bool}{OnPoke}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size}, \param{int}{ format}} - -Message sent to the server application when the client notifies it to -accept the given data. - -\membersection{wxDDEConnection::OnRequest}\label{wxddeconnectiononrequest} - -\func{char*}{OnRequest}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{int *}{size}, \param{int}{ format}} - -Message sent to the server application when the client -calls \helpref{wxDDEConnection::Request}{wxddeconnectionrequest}. The server -should respond by returning a character string from {\bf OnRequest}, -or NULL to indicate no data. - -\membersection{wxDDEConnection::OnStartAdvise}\label{wxddeconnectiononstartadvise} - -\func{bool}{OnStartAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}} - -Message sent to the server application by the client, when the client -wishes to start an `advise loop' for the given topic and item. The -server can refuse to participate by returning FALSE. - -\membersection{wxDDEConnection::OnStopAdvise}\label{wxddeconnectiononstopadvise} - -\func{bool}{OnStopAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}} - -Message sent to the server application by the client, when the client -wishes to stop an `advise loop' for the given topic and item. The -server can refuse to stop the advise loop by returning FALSE, although -this doesn't have much meaning in practice. - -\membersection{wxDDEConnection::Poke}\label{wxddeconnectionpoke} - -\func{bool}{Poke}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{int}{ format = wxCF\_TEXT}} - -Called by the client application to poke data into the server. Can be -used to transfer arbitrary data to the server. Causes the server -connection's \helpref{wxDDEConnection::OnPoke}{wxddeconnectiononpoke} member -to be called. Returns TRUE if successful. - -\membersection{wxDDEConnection::Request}\label{wxddeconnectionrequest} - -\func{char*}{Request}{\param{const wxString\& }{item}, \param{int *}{size}, \param{int}{ format = wxCF\_TEXT}} - -Called by the client application to request data from the server. Causes -the server connection's \helpref{wxDDEConnection::OnRequest}{wxddeconnectiononrequest} member to be called. Returns a -character string (actually a pointer to the connection's buffer) if -successful, NULL otherwise. - -\membersection{wxDDEConnection::StartAdvise}\label{wxddeconnectionstartadvise} - -\func{bool}{StartAdvise}{\param{const wxString\& }{item}} - -Called by the client application to ask if an advise loop can be started -with the server. Causes the server connection's \helpref{wxDDEConnection::OnStartAdvise}{wxddeconnectiononstartadvise}\rtfsp -member to be called. Returns TRUE if the server okays it, FALSE -otherwise. - -\membersection{wxDDEConnection::StopAdvise}\label{wxddeconnectionstopadvise} - -\func{bool}{StopAdvise}{\param{const wxString\& }{item}} - -Called by the client application to ask if an advise loop can be -stopped. Causes the server connection's \helpref{wxDDEConnection::OnStopAdvise}{wxddeconnectiononstopadvise} member -to be called. Returns TRUE if the server okays it, FALSE otherwise. - - diff --git a/docs/latex/wx/ddeservr.tex b/docs/latex/wx/ddeservr.tex deleted file mode 100644 index a5736e34f7..0000000000 --- a/docs/latex/wx/ddeservr.tex +++ /dev/null @@ -1,45 +0,0 @@ -\section{\class{wxDDEServer}}\label{wxddeserver} - -A wxDDEServer object represents the server part of a client-server DDE -(Dynamic Data Exchange) conversation (available under both Windows -and UNIX). - -\wxheading{Derived from} - -wxDDEObject - -\wxheading{See also} - -\helpref{IPC overview}{ipcoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxDDEServer::wxDDEServer} - -\func{}{wxDDEServer}{\void} - -Constructs a server object. - -\membersection{wxDDEServer::Create} - -\func{bool}{Create}{\param{const wxString\& }{service}} - -Registers the server using the given service name. Under UNIX, the -string must contain an integer id which is used as an Internet port -number. FALSE is returned if the call failed (for example, the port -number is already in use). - -\membersection{wxDDEServer::OnAcceptConnection}\label{wxddeserveronacceptconnection} - -\func{wxDDEConnection *}{OnAcceptConnection}{\param{const wxString\& }{topic}} - -When a client calls {\bf MakeConnection}, the server receives the -message and this member is called. The application should derive a -member to intercept this message and return a connection object of -either the standard wxDDEConnection type, or of a user-derived type. If the -topic is ``STDIO'', the application may wish to refuse the connection. -Under UNIX, when a server is created the OnAcceptConnection message is -always sent for standard input and output, but in the context of DDE -messages it doesn't make a lot of sense. - - diff --git a/docs/latex/wx/debugcxt.tex b/docs/latex/wx/debugcxt.tex deleted file mode 100644 index 841b177e3b..0000000000 --- a/docs/latex/wx/debugcxt.tex +++ /dev/null @@ -1,251 +0,0 @@ -\section{\class{wxDebugContext}}\label{wxdebugcontext} - -A class for performing various debugging and memory tracing -operations. Full functionality (such as printing out objects -currently allocated) is only present in a debugging build of wxWindows, -i.e. if the DEBUG symbol is defined and non-zero. wxDebugContext -and related functions and macros can be compiled out by setting -USE\_DEBUG\_CONTEXT to 0 is wx\_setup.h - -\wxheading{Derived from} - -No parent class. - -\wxheading{See also} - -\overview{Overview}{wxdebugcontextoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxDebugContext::Check}\label{wxdebugcontextcheck} - -\func{int}{Check}{\void} - -Checks the memory blocks for errors, starting from the currently set -checkpoint. - -\wxheading{Return value} - -Returns the number of errors, -so a value of zero represents success. Returns -1 if an error -was detected that prevents further checking. - -\membersection{wxDebugContext::Dump}\label{wxdebugcontextdump} - -\func{bool}{Dump}{\void} - -Performs a memory dump from the currently set checkpoint, writing to the -current debug stream. Calls the {\bf Dump} member function for each wxObject -derived instance. - -\wxheading{Return value} - -TRUE if the function succeeded, FALSE otherwise. - -\membersection{wxDebugContext::GetCheckPrevious}\label{wxdebugcontextgetcheckprevious} - -\func{bool}{GetCheckPrevious}{\void} - -Returns TRUE if the memory allocator checks all previous memory blocks for errors. -By default, this is FALSE since it slows down execution considerably. - -\wxheading{See also} - -\helpref{wxDebugContext::SetCheckPrevious}{wxdebugcontextsetcheckprevious} - -\membersection{wxDebugContext::GetDebugMode}\label{wxdebugcontextgetdebugmode} - -\func{bool}{GetDebugMode}{\void} - -Returns TRUE if debug mode is on. If debug mode is on, the wxObject new and delete -operators store or use information about memory allocation. Otherwise, -a straight malloc and free will be performed by these operators. - -\wxheading{See also} - -\helpref{wxDebugContext::SetDebugMode}{wxdebugcontextsetdebugmode} - -\membersection{wxDebugContext::GetLevel}\label{wxdebugcontextgetlevel} - -\func{int}{GetLevel}{\void} - -Gets the debug level (default 1). The debug level is used by the wxTraceLevel function and -the WXTRACELEVEL macro to specify how detailed the trace information is; setting -a different level will only have an effect if trace statements in the application -specify a value other than one. - -\wxheading{See also} - -\helpref{wxDebugContext::SetLevel}{wxdebugcontextsetlevel} - -\membersection{wxDebugContext::GetStream}\label{wxdebugcontextgetstream} - -\func{ostream\&}{GetStream}{\void} - -Returns the output stream associated with the debug context. - -\wxheading{See also} - -\helpref{wxDebugContext::SetStream}{wxdebugcontextsetstream} - -\membersection{wxDebugContext::GetStreamBuf}\label{wxdebugcontextgetstreambuf} - -\func{streambuf*}{GetStreamBuf}{\void} - -Returns a pointer to the output stream buffer associated with the debug context. -There may not necessarily be a stream buffer if the stream has been set -by the user. - -\membersection{wxDebugContext::HasStream}\label{wxdebugcontexthasstream} - -\func{bool}{HasStream}{\void} - -Returns TRUE if there is a stream currently associated -with the debug context. - -\wxheading{See also} - -\helpref{wxDebugContext::SetStream}{wxdebugcontextsetstream}, \helpref{wxDebugContext::GetStream}{wxdebugcontextgetstream} - -\membersection{wxDebugContext::PrintClasses}\label{wxdebugcontextprintclasses} - -\func{bool}{PrintClasses}{\void} - -Prints a list of the classes declared in this application, giving derivation -and whether instances of this class can be dynamically created. - -\wxheading{See also} - -\helpref{wxDebugContext::PrintStatistics}{wxdebugcontextprintstatistics} - -\membersection{wxDebugContext::PrintStatistics}\label{wxdebugcontextprintstatistics} - -\func{bool}{PrintStatistics}{\param{bool}{ detailed = TRUE}} - -Performs a statistics analysis from the currently set checkpoint, writing -to the current debug stream. The number of object and non-object -allocations is printed, together with the total size. - -\wxheading{Parameters} - -\docparam{detailed}{If TRUE, the function will also print how many -objects of each class have been allocated, and the space taken by -these class instances.} - -\wxheading{See also} - -\helpref{wxDebugContext::PrintStatistics}{wxdebugcontextprintstatistics} - -\membersection{wxDebugContext::SetCheckpoint}\label{wxdebugcontextsetcheckpoint} - -\func{void}{SetCheckpoint}{\param{bool}{ all = FALSE}} - -Sets the current checkpoint: Dump and PrintStatistics operations will -be performed from this point on. This allows you to ignore allocations -that have been performed up to this point. - -\wxheading{Parameters} - -\docparam{all}{If TRUE, the checkpoint is reset to include all -memory allocations since the program started.} - -\membersection{wxDebugContext::SetCheckPrevious}\label{wxdebugcontextsetcheckprevious} - -\func{void}{SetCheckPrevious}{\param{bool}{ check}} - -Tells the memory allocator to check all previous memory blocks for errors. -By default, this is FALSE since it slows down execution considerably. - -\wxheading{See also} - -\helpref{wxDebugContext::GetCheckPrevious}{wxdebugcontextgetcheckprevious} - -\membersection{wxDebugContext::SetDebugMode}\label{wxdebugcontextsetdebugmode} - -\func{void}{SetDebugMode}{\param{bool}{ debug}} - -Sets the debug mode on or off. If debug mode is on, the wxObject new and delete -operators store or use information about memory allocation. Otherwise, -a straight malloc and free will be performed by these operators. - -By default, debug mode is on if DEBUG is non-zero. If the application -uses this function, it should make sure that all object memory allocated -is deallocated with the same value of debug mode. Otherwise, the -delete operator might try to look for memory information that does not -exist. - -\wxheading{See also} - -\helpref{wxDebugContext::GetDebugMode}{wxdebugcontextgetdebugmode} - -\membersection{wxDebugContext::SetFile}\label{wxdebugcontextsetfile} - -\func{bool}{SetFile}{\param{const wxString\& }{filename}} - -Sets the current debug file and creates a stream. This will delete any existing -stream and stream buffer. By default, the debug context stream -outputs to the debugger (Windows) or standard error (other platforms). - -\membersection{wxDebugContext::SetLevel}\label{wxdebugcontextsetlevel} - -\func{void}{SetLevel}{\param{int}{ level}} - -Sets the debug level (default 1). The debug level is used by the wxTraceLevel function and -the WXTRACELEVEL macro to specify how detailed the trace information is; setting -a different level will only have an effect if trace statements in the application -specify a value other than one. - -\wxheading{See also} - -\helpref{wxDebugContext::GetLevel}{wxdebugcontextgetlevel} - -\membersection{wxDebugContext::SetStandardError}\label{wxdebugcontextsetstandarderror} - -\func{bool}{SetStandardError}{\void} - -Sets the debugging stream to be the debugger (Windows) or standard error (other platforms). -This is the default setting. The existing stream will be flushed and deleted. - -\membersection{wxDebugContext::SetStream}\label{wxdebugcontextsetstream} - -\func{void}{SetStream}{\param{ostream* }{stream}, \param{streambuf* }{streamBuf = NULL}} - -Sets the stream and optionally, stream buffer associated with the debug context. -This operation flushes and deletes the existing stream (and stream buffer if any). - -\wxheading{Parameters} - -\docparam{stream}{Stream to associate with the debug context. Do not set this to NULL.} - -\docparam{streamBuf}{Stream buffer to associate with the debug context.} - -\wxheading{See also} - -\helpref{wxDebugContext::GetStream}{wxdebugcontextgetstream}, \helpref{wxDebugContext::HasStream}{wxdebugcontexthasstream} - -\section{\class{wxDebugStreamBuf}}\label{wxdebugstreambuf} - -This class allows you to treat debugging output in a similar -(stream-based) fashion on different platforms. Under -Windows, an ostream constructed with this buffer outputs -to the debugger, or other program that intercepts debugging -output. On other platforms, the output goes to standard error (cerr). - -\wxheading{Derived from} - -streambuf - -\wxheading{Example} - -\begin{verbatim} - wxDebugStreamBuf streamBuf; - ostream stream(&streamBuf); - - stream << "Hello world!" << endl; -\end{verbatim} - -\wxheading{See also} - -\overview{Overview}{wxdebugcontextoverview} - - diff --git a/docs/latex/wx/dialog.tex b/docs/latex/wx/dialog.tex deleted file mode 100644 index 95d758c852..0000000000 --- a/docs/latex/wx/dialog.tex +++ /dev/null @@ -1,311 +0,0 @@ -\section{\class{wxDialog}}\label{wxdialog} - -A dialog box is a window with a title bar and sometimes a system menu, which can be moved around -the screen. It can contain controls and other windows. - -\wxheading{Derived from} - -\helpref{wxPanel}{wxpanel}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Remarks} - -There are two kinds of dialog - {\it modal} and {\it modeless}. A modal dialog -blocks program flow and user input on other windows until it is dismissed, whereas a modeless dialog behaves more -like a frame in that program flow continues, and input on other windows is still possible. -You specify the type of dialog with the {\bf wxDIALOG\_MODAL} and {\bf wxDIALOG\_MODELESS} window -styles. - -A dialog may be loaded from a wxWindows resource file (extension {\tt wxr}). - -An application can define an \helpref{OnCloseWindow}{wxwindowonclosewindow} handler for the -dialog to respond to system close events. - -\wxheading{Window styles} - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the dialog box (Motif only).} -\twocolitem{\windowstyle{wxDEFAULT\_DIALOG\_STYLE}}{Equivalent to a combination of wxCAPTION, wxSYSTEM\_MENU and wxTHICK\_FRAME} -\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Display a resizeable frame around the window (Motif only).} -\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Display a system menu.} -\twocolitem{\windowstyle{wxTHICK\_FRAME}}{Display a thick frame around the window.} -\twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{The dialog stays on top of all other windows (Windows only).} -\twocolitem{\windowstyle{wxNO\_3D}}{Under Windows, specifies that the child controls -should not have 3D borders unless specified in the control.} -\end{twocollist} - -Under Motif, MWM (the Motif Window Manager) should be running for any of these styles to have an effect. - -See also \helpref{Generic window styles}{windowstyles}. - -\wxheading{See also} - -\helpref{wxDialog overview}{wxdialogoverview}, \helpref{wxFrame}{wxframe}, \helpref{Resources}{resources},\rtfsp -\helpref{Validator overview}{validatoroverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxDialog::wxDialog}\label{wxdialogconstr} - -\func{}{wxDialog}{\void} - -Default constructor. - -\func{}{wxDialog}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp -\param{const wxString\& }{title},\rtfsp -\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp -\param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = wxDEFAULT\_DIALOG\_STYLE},\rtfsp -\param{const wxString\& }{name = ``dialogBox"}} - -Constructor. - -\wxheading{Parameters} - -\docparam{parent}{Can be NULL, a frame or another dialog box.} - -\docparam{id}{An identifier for the dialog. A value of -1 is taken to mean a default.} - -\docparam{title}{The title of the dialog.} - -\docparam{pos}{The dialog position. A value of (-1, -1) indicates a default position, chosen by -either the windowing system or wxWindows, depending on platform.} - -\docparam{size}{The dialog size. A value of (-1, -1) indicates a default size, chosen by -either the windowing system or wxWindows, depending on platform.} - -\docparam{style}{The window style. See \helpref{wxDialog}{wxdialog}.} - -\docparam{name}{Used to associate a name with the window, -allowing the application user to set Motif resource values for -individual dialog boxes.} - -\wxheading{See also} - -\helpref{wxDialog::Create}{wxdialogcreate} - -\membersection{wxDialog::\destruct{wxDialog}} - -\func{}{\destruct{wxDialog}}{\void} - -Destructor. Deletes any child windows before deleting the physical window. - -\membersection{wxDialog::Centre}\label{wxdialogcentre} - -\func{void}{Centre}{\param{int}{ direction = wxBOTH}} - -Centres the dialog box on the display. - -\wxheading{Parameters} - -\docparam{direction}{May be {\tt wxHORIZONTAL}, {\tt wxVERTICAL} or {\tt wxBOTH}.} - -\membersection{wxDialog::Create}\label{wxdialogcreate} - -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp -\param{const wxString\& }{title},\rtfsp -\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp -\param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = wxDEFAULT\_DIALOG\_STYLE},\rtfsp -\param{const wxString\& }{name = ``dialogBox"}} - -Used for two-step dialog box construction. See \helpref{wxDialog::wxDialog}{wxdialogconstr}\rtfsp -for details. - -\membersection{wxDialog::EndModal}\label{wxdialogendmodal} - -\func{void}{EndModal}{\param{int }{retCode}} - -Ends a modal dialog, passing a value to be returned from the \helpref{wxDialog::ShowModal}{wxdialogshowmodal}\rtfsp -invocation. - -\wxheading{Parameters} - -\docparam{retCode}{The value that should be returned by {\bf ShowModal}.} - -\wxheading{See also} - -\helpref{wxDialog::ShowModal}{wxdialogshowmodal},\rtfsp -\helpref{wxWindow::GetReturnCode}{wxwindowgetreturncode},\rtfsp -\helpref{wxWindow::SetReturnCode}{wxwindowsetreturncode} - -\membersection{wxDialog::GetTitle}\label{wxdialoggettitle} - -\constfunc{wxString}{GetTitle}{\void} - -Returns the title of the dialog box. - -\membersection{wxDialog::Iconize}\label{wxdialogiconized} - -\func{void}{Iconize}{\param{const bool}{ iconize}} - -Iconizes or restores the dialog. - -\wxheading{Parameters} - -\docparam{iconize}{If TRUE, iconizes the dialog box; if FALSE, shows and restores it.} - -\wxheading{Remarks} - -Note that in Windows, iconization has no effect since dialog boxes cannot be -iconized. However, applications may need to explicitly restore dialog -boxes under Motif which have user-iconizable frames, and under Windows -calling {\tt Iconize(FALSE)} will bring the window to the front, as does -\rtfsp{\tt Show(TRUE)}. - -\membersection{wxDialog::IsIconized}\label{wxdialogisiconized} - -\constfunc{bool}{IsIconized}{\void} - -Returns TRUE if the dialog box is iconized. - -\wxheading{Remarks} - -Always returns FALSE under Windows since dialogs cannot be iconized. - -\membersection{wxDialog::IsModal}\label{wxdialogismodal} - -\constfunc{bool}{IsModal}{\void} - -Returns TRUE if the dialog box is modal, FALSE otherwise. - -\membersection{wxDialog::OnCharHook}\label{wxdialogoncharhook} - -\func{void}{OnCharHook}{\param{wxKeyEvent\&}{ event}} - -This member is called to allow the window to intercept keyboard events -before they are processed by child windows. - -For more information, see \helpref{wxWindow::OnCharHook}{wxwindowoncharhook} - -\wxheading{Remarks} - -wxDialog implements this handler to fake a cancel command if the escape key has been -pressed. This will dismiss the dialog. - -\membersection{wxDialog::OnApply}\label{wxdialogonapply} - -\func{void}{OnApply}{\param{wxCommandEvent\& }{event}} - -The default handler for the wxID\_APPLY identifier. - -\wxheading{Remarks} - -This function calls \helpref{wxWindow::Validate}{wxwindowvalidate} and \helpref{wxWindow::TransferDataToWindow}{wxwindowtransferdatatowindow}. - -\wxheading{See also} - -\helpref{wxDialog::OnOK}{wxdialogonok}, \helpref{wxDialog::OnCancel}{wxdialogoncancel} - -\membersection{wxDialog::OnCancel}\label{wxdialogoncancel} - -\func{void}{OnCancel}{\param{wxCommandEvent\& }{event}} - -The default handler for the wxID\_CANCEL identifier. - -\wxheading{Remarks} - -The function either calls {\bf EndModal(wxID\_CANCEL)} if the dialog is modal, or -sets the return value to wxID\_CANCEL and calls {\bf Show(FALSE)} if the dialog is modeless. - -\wxheading{See also} - -\helpref{wxDialog::OnOK}{wxdialogonok}, \helpref{wxDialog::OnApply}{wxdialogonapply} - -\membersection{wxDialog::OnOK}\label{wxdialogonok} - -\func{void}{OnOK}{\param{wxCommandEvent\& }{event}} - -The default handler for the wxID\_OK identifier. - -\wxheading{Remarks} - -The function calls -\rtfsp\helpref{wxWindow::Validate}{wxwindowvalidate}, then \helpref{wxWindow::TransferDataFromWindow}{wxwindowtransferdatafromwindow}. -If this returns TRUE, the function either calls {\bf EndModal(wxID\_OK)} if the dialog is modal, or -sets the return value to wxID\_OK and calls {\bf Show(FALSE)} if the dialog is modeless. - -\wxheading{See also} - -\helpref{wxDialog::OnCancel}{wxdialogoncancel}, \helpref{wxDialog::OnApply}{wxdialogonapply} - -\membersection{wxDialog::OnSysColourChanged}\label{wxdialogonsyscolourchanged} - -\func{void}{OnSysColourChanged}{\param{wxSysColourChangedEvent\& }{event}} - -The default handler for wxEVT\_SYS\_COLOUR\_CHANGED. - -\wxheading{Parameters} - -\docparam{event}{The colour change event.} - -\wxheading{Remarks} - -Changes the dialog's colour to conform to the current settings (Windows only). -Add an event table entry for your dialog class if you wish the behaviour -to be different (such as keeping a user-defined -background colour). If you do override this function, call \helpref{wxWindow::OnSysColourChanged}{wxwindowonsyscolourchanged} to -propagate the notification to child windows and controls. - -\wxheading{See also} - -\helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent} - -\membersection{wxDialog::SetModal}\label{wxdialogsetmodal} - -\func{void}{SetModal}{\param{const bool}{ flag}} - -Allows the programmer to specify whether the dialog box is modal (wxDialog::Show blocks control -until the dialog is hidden) or modeless (control returns immediately). - -\wxheading{Parameters} - -\docparam{flag}{If TRUE, the dialog will be modal, otherwise it will be modeless.} - -\membersection{wxDialog::SetTitle}\label{wxdialogsettitle} - -\func{void}{SetTitle}{\param{const wxString\& }{ title}} - -Sets the title of the dialog box. - -\wxheading{Parameters} - -\docparam{title}{The dialog box title.} - -\membersection{wxDialog::Show}\label{wxdialogshow} - -\func{bool}{Show}{\param{const bool}{ show}} - -Hides or shows the dialog. - -\wxheading{Parameters} - -\docparam{show}{If TRUE, the dialog box is shown and brought to the front; -otherwise the box is hidden. If FALSE and the dialog is -modal, control is returned to the calling program.} - -\wxheading{Remarks} - -The preferred way of dismissing a modal dialog is to use \helpref{wxDialog::EndModal}{wxdialogendmodal}. - -\membersection{wxDialog::ShowModal}\label{wxdialogshowmodal} - -\func{int}{ShowModal}{\void} - -Shows a modal dialog. Program flow does not return until the dialog has been dismissed with\rtfsp -\helpref{wxDialog::EndModal}{wxdialogendmodal}. - -\wxheading{Return value} - -The return value is the value set with \helpref{wxWindow::SetReturnCode}{wxwindowsetreturncode}. - -\wxheading{See also} - -\helpref{wxDialog::EndModal}{wxdialogendmodal},\rtfsp -\helpref{wxWindow::GetReturnCode}{wxwindowgetreturncode},\rtfsp -\helpref{wxWindow::SetReturnCode}{wxwindowsetreturncode} - - diff --git a/docs/latex/wx/dirdlg.tex b/docs/latex/wx/dirdlg.tex deleted file mode 100644 index 5a012a99f4..0000000000 --- a/docs/latex/wx/dirdlg.tex +++ /dev/null @@ -1,86 +0,0 @@ -\section{\class{wxDirDialog}}\label{wxdirdialog} - -This class represents the directory chooser dialog. - -\wxheading{Derived from} - -\helpref{wxDialog}{wxdialog}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxDirDialog overview}{wxdirdialogoverview}, \helpref{wxFileDialog}{wxfiledialog} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxDirDialog::wxDirDialog}\label{wxdirdialogconstr} - -\func{}{wxDirDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message = "Choose a directory"},\rtfsp -\param{const wxString\& }{defaultPath = ""}, \param{long }{style = 0}, \param{const wxPoint\& }{pos = wxDefaultPosition}} - -Constructor. Use \helpref{wxDirDialog::ShowModal}{wxdirdialogshowmodal} to show the dialog. - -\wxheading{Parameters} - -\docparam{parent}{Parent window.} - -\docparam{message}{Message to show on the dialog.} - -\docparam{defaultPath}{The default path, or the empty string.} - -\docparam{style}{A dialog style, currently unused.} - -\docparam{pos}{Dialog position. Not implemented.} - -\membersection{wxDirDialog::\destruct{wxDirDialog}} - -\func{}{\destruct{wxDirDialog}}{\void} - -Destructor. - -\membersection{wxDirDialog::GetPath}\label{wxdirdialoggetpath} - -\constfunc{wxString}{GetPath}{\void} - -Returns the default or user-selected path. - -\membersection{wxDirDialog::GetMessage}\label{wxdirdialoggetmessage} - -\constfunc{wxString}{GetMessage}{\void} - -Returns the message that will be displayed on the dialog. - -\membersection{wxDirDialog::GetStyle}\label{wxdirdialoggetstyle} - -\constfunc{long}{GetStyle}{\void} - -Returns the dialog style. - -\membersection{wxDirDialog::SetMessage}\label{wxdirdialogsetmessage} - -\func{void}{SetMessage}{\param{const wxString\& }{message}} - -Sets the message that will be displayed on the dialog. - -\membersection{wxDirDialog::SetPath}\label{wxdirdialogsetpath} - -\func{void}{SetPath}{\param{const wxString\& }{path}} - -Sets the default path. - -\membersection{wxDirDialog::SetStyle}\label{wxdirdialogsetstyle} - -\func{void}{SetStyle}{\param{long }{style}} - -Sets the dialog style. This is currently unused. - -\membersection{wxDirDialog::ShowModal}\label{wxdirdialogshowmodal} - -\func{int}{ShowModal}{\void} - -Shows the dialog, returning wxID\_OK if the user pressed OK, and wxOK\_CANCEL -otherwise. - - diff --git a/docs/latex/wx/docchfrm.tex b/docs/latex/wx/docchfrm.tex deleted file mode 100644 index 37479e12bf..0000000000 --- a/docs/latex/wx/docchfrm.tex +++ /dev/null @@ -1,88 +0,0 @@ -\section{\class{wxDocChildFrame}}\label{wxdocchildframe} - -The wxDocChildFrame class provides a default frame for displaying documents -on separate windows. This class can only be used for SDI (not MDI) child frames. - -The class is part of the document/view framework supported by wxWindows, -and cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocument}{wxdocument}, -\rtfsp\helpref{wxDocManager}{wxdocmanager} and \helpref{wxDocTemplate}{wxdoctemplate} classes. - -See the example application in {\tt samples/docview}. - -\wxheading{Derived from} - -\helpref{wxFrame}{wxframe}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{Document/view overview}{docviewoverview}, \helpref{wxFrame}{wxframe} - -\membersection{wxDocChildFrame::m\_childDocument} - -\member{wxDocument*}{m\_childDocument} - -The document associated with the frame. - -\membersection{wxDocChildFrame::m\_childView} - -\member{wxView*}{m\_childView} - -The view associated with the frame. - -\membersection{wxDocChildFrame::wxDocChildFrame} - -\func{}{wxDocChildFrame}{\param{wxDocument* }{doc}, \param{wxView* }{view}, \param{wxFrame* }{parent}, - \param{wxWindowID}{ id}, \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, - \param{const wxSize\&}{ size = wxDefaultSize}, - \param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = ``frame"}} - -Constructor. - -\membersection{wxDocChildFrame::\destruct{wxDocChildFrame}} - -\func{}{\destruct{wxDocChildFrame}}{\void} - -Destructor. - -\membersection{wxDocChildFrame::GetDocument} - -\constfunc{wxDocument*}{GetDocument}{\void} - -Returns the document associated with this frame. - -\membersection{wxDocChildFrame::GetView} - -\constfunc{wxView*}{GetView}{\void} - -Returns the view associated with this frame. - -\membersection{wxDocChildFrame::OnActivate} - -\func{void}{OnActivate}{\param{bool}{ active}} - -Sets the currently active view to be the frame's view. You may need -to override (but still call) this function in order to set the keyboard -focus for your subwindow. - -\membersection{wxDocChildFrame::OnClose} - -\func{virtual bool}{OnClose}{\void} - -Closes and deletes the current view and document. - -\membersection{wxDocChildFrame::SetDocument} - -\func{void}{SetDocument}{\param{wxDocument *}{doc}} - -Sets the document for this frame. - -\membersection{wxDocChildFrame::SetView} - -\func{void}{SetView}{\param{wxView *}{view}} - -Sets the view for this frame. - - diff --git a/docs/latex/wx/docmanag.tex b/docs/latex/wx/docmanag.tex deleted file mode 100644 index 1cfbfbe0b7..0000000000 --- a/docs/latex/wx/docmanag.tex +++ /dev/null @@ -1,335 +0,0 @@ -\section{\class{wxDocManager}}\label{wxdocmanager} - -The wxDocManager class is part of the document/view framework supported by wxWindows, -and cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocument}{wxdocument}\rtfsp -and \helpref{wxDocTemplate}{wxdoctemplate} classes. - -\wxheading{Derived from} - -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxDocManager overview}{wxdocmanageroverview}, \helpref{wxDocument}{wxdocument},\rtfsp -\helpref{wxView}{wxview}, \helpref{wxDocTemplate}{wxdoctemplate} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxDocManager::m\_currentView} - -\member{wxView*}{m\_currentView} - -The currently active view. - -\membersection{wxDocManager::m\_defaultDocumentNameCounter} - -\member{int}{m\_defaultDocumentNameCounter} - -Stores the integer to be used for the next default document name. - -\membersection{wxDocManager::m\_fileHistory} - -\member{wxFileHistory*}{m\_fileHistory} - -A pointer to an instance of \helpref{wxFileHistory}{wxfilehistory}, -which manages the history of recently-visited files on the File menu. - -\membersection{wxDocManager::m\_maxDocsOpen} - -\member{int}{m\_maxDocsOpen} - -Stores the maximum number of documents that can be opened before -existing documents are closed. By default, this is 10,000. - -\membersection{wxDocManager::m\_docs} - -\member{wxList}{m\_docs} - -A list of all documents. - -\membersection{wxDocManager::m\_flags} - -\member{long}{m\_flags} - -Stores the flags passed to the constructor. - -\membersection{wxDocManager::m\_templates} - -\member{wxList}{mnTemplates} - -A list of all document templates. - -\membersection{wxDocManager::wxDocManager} - -\func{void}{wxDocManager}{\param{long}{ flags = wxDEFAULT\_DOCMAN\_FLAGS}, \param{bool}{ initialize = TRUE}} - -Constructor. Create a document manager instance dynamically near the start of your application -before doing any document or view operations. - -{\it flags} is currently unused. - -If {\it initialize} is TRUE, the \helpref{Initialize}{wxdocmanagerinitialize} function will be called -to create a default history list object. If you derive from wxDocManager, you may wish to call the -base constructor with FALSE, and then call Initialize in your own constructor, to allow -your own Initialize or OnCreateFileHistory functions to be called. - -\membersection{wxDocManager::\destruct{wxDocManager}} - -\func{void}{\destruct{wxDocManager}}{\void} - -Destructor. - -\membersection{wxDocManager::ActivateView} - -\func{void}{ActivateView}{\param{wxView* }{doc}, \param{bool}{ activate}, \param{bool}{ deleting}} - -Sets the current view. - -\membersection{wxDocManager::AddDocument} - -\func{void}{AddDocument}{\param{wxDocument *}{doc}} - -Adds the document to the list of documents. - -\membersection{wxDocManager::AddFileToHistory} - -\func{void}{AddFileToHistory}{\param{const wxString\& }{filename}} - -Adds a file to the file history list, if we have a pointer to an appropriate file menu. - -\membersection{wxDocManager::AssociateTemplate} - -\func{void}{AssociateTemplate}{\param{wxDocTemplate *}{temp}} - -Adds the template to the document manager's template list. - -\membersection{wxDocManager::CreateDocument} - -\func{wxDocument*}{CreateDocument}{\param{const wxString\& }{path}, \param{long}{ flags}} - -Creates a new document in a manner determined by the {\it flags} parameter, which can be: - -\begin{itemize}\itemsep=0pt -\item wxDOC\_NEW Creates a fresh document. -\item wxDOC\_SILENT Silently loads the given document file. -\end{itemize} - -If wxDOC\_NEW is present, a new document will be created and returned, possibly after -asking the user for a template to use if there is more than one document template. -If wxDOC\_SILENT is present, a new document will be created and the given file loaded -into it. If neither of these flags is present, the user will be presented with -a file selector for the file to load, and the template to use will be determined by the -extension (Windows) or by popping up a template choice list (other platforms). - -If the maximum number of documents has been reached, this function -will delete the oldest currently loaded document before creating a new one. - -\membersection{wxDocManager::CreateView} - -\func{wxView*}{CreateView}{\param{wxDocument*}{doc}, \param{long}{ flags}} - -Creates a new view for the given document. If more than one view is allowed for the -document (by virtue of multiple templates mentioning the same document type), a choice -of view is presented to the user. - -\membersection{wxDocManager::DisassociateTemplate} - -\func{void}{DisassociateTemplate}{\param{wxDocTemplate *}{temp}} - -Removes the template from the list of templates. - -\membersection{wxDocManager::FileHistoryLoad} - -\func{void}{FileHistoryLoad}{\param{const wxString\& }{resourceFile}, \param{const wxString\& }{sectionName}} - -Loads the file history from a resource file, using the given section. This must be called -explicitly by the application. - -\membersection{wxDocManager::FileHistorySave} - -\func{void}{FileHistorySave}{\param{const wxString\& }{resourceFile}, \param{const wxString\& }{sectionName}} - -Saves the file history into a resource file, using the given section. This must be called -explicitly by the application. - -\membersection{wxDocManager::FileHistoryUseMenu} - -\func{void}{FileHistoryUseMenu}{\param{wxMenu *}{menu}} - -Use this menu for appending recently-visited document filenames, for convenient -access. Calling this function with a valid menu pointer enables the history -list functionality. - -\membersection{wxDocManager::FindTemplateForPath} - -\func{wxDocTemplate *}{FindTemplateForPath}{\param{const wxString\& }{path}} - -Given a path, try to find template that matches the extension. This is only -an approximate method of finding a template for creating a document. - -\membersection{wxDocManager::GetCurrentDocument} - -\func{wxDocument *}{GetCurrentDocument}{\void} - -Returns the document associated with the currently active view (if any). - -\membersection{wxDocManager::GetCurrentView} - -\func{wxView *}{GetCurrentView}{\void} - -Returns the currently active view - -\membersection{wxDocManager::GetDocuments} - -\func{wxList\&}{GetDocuments}{\void} - -Returns a reference to the list of documents. - -\membersection{wxDocManager::GetFileHistory} - -\func{wxFileHistory *}{GetFileHistory}{\void} - -Returns a pointer to file history. - -\membersection{wxDocManager::GetMaxDocsOpen} - -\func{int}{GetMaxDocsOpen}{\void} - -Returns the number of documents that can be open simultaneously. - -\membersection{wxDocManager::GetNoHistoryFiles} - -\func{int}{GetNoHistoryFiles}{\void} - -Returns the number of files currently stored in the file history. - -\membersection{wxDocManager::Initialize}\label{wxdocmanagerinitialize} - -\func{bool}{Initialize}{\void} - -Initializes data; currently just calls OnCreateFileHistory. Some data cannot -always be initialized in the constructor because the programmer must be given -the opportunity to override functionality. If OnCreateFileHistory was called -from the constructor, an overridden virtual OnCreateFileHistory would not be -called due to C++'s `interesting' constructor semantics. In fact Initialize -\rtfsp{\it is} called from the wxDocManager constructor, but this can be -vetoed by passing FALSE to the second argument, allowing the derived class's -constructor to call Initialize, possibly calling a different OnCreateFileHistory -from the default. - -The bottom line: if you're not deriving from Initialize, forget it and -construct wxDocManager with no arguments. - -\membersection{wxDocManager::MakeDefaultName} - -\func{bool}{MakeDefaultName}{\param{const wxString\& }{buf}} - -Copies a suitable default name into {\it buf}. This is implemented by -appending an integer counter to the string {\bf unnamed} and incrementing -the counter. - -\membersection{wxDocManager::OnCreateFileHistory} - -\func{wxFileHistory *}{OnCreateFileHistory}{\void} - -A hook to allow a derived class to create a different type of file history. Called -from \helpref{Initialize}{wxdocmanagerinitialize}. - -\membersection{wxDocManager::OnFileClose} - -\func{void}{OnFileClose}{\void} - -Closes and deletes the currently active document. - -\membersection{wxDocManager::OnFileNew} - -\func{void}{OnFileNew}{\void} - -Creates a document from a list of templates (if more than one template). - -\membersection{wxDocManager::OnFileOpen} - -\func{void}{OnFileOpen}{\void} - -Creates a new document and reads in the selected file. - -\membersection{wxDocManager::OnFileSave} - -\func{void}{OnFileSave}{\void} - -Saves the current document by calling wxDocument::Save for the current document. - -\membersection{wxDocManager::OnFileSaveAs} - -\func{void}{OnFileSaveAs}{\void} - -Calls wxDocument::SaveAs for the current document. - -\membersection{wxDocManager::OnMenuCommand} - -\func{void}{OnMenuCommand}{\param{int}{ cmd}} - -Processes menu commands routed from child or parent frames. This deals -with the following predefined menu item identifiers: - -\begin{itemize}\itemsep=0pt -\item wxID\_OPEN Creates a new document and opens a file into it. -\item wxID\_CLOSE Closes the current document. -\item wxID\_NEW Creates a new document. -\item wxID\_SAVE Saves the document. -\item wxID\_SAVE\_AS Saves the document into a specified filename. -\end{itemize} - -Unrecognized commands are routed to the currently active wxView's OnMenuCommand. - -\membersection{wxDocManager::RemoveDocument} - -\func{void}{RemoveDocument}{\param{wxDocument *}{doc}} - -Removes the document from the list of documents. - -\membersection{wxDocManager::SelectDocumentPath} - -\func{wxDocTemplate *}{SelectDocumentPath}{\param{wxDocTemplate **}{templates}, - \param{int}{ noTemplates}, \param{const wxString\& }{path}, \param{const wxString\& }{bufSize}, - \param{long}{ flags}, \param{bool}{ save}} - -Under Windows, pops up a file selector with a list of filters corresponding to document templates. -The wxDocTemplate corresponding to the selected file's extension is returned. - -On other platforms, if there is more than one document template a choice list is popped up, -followed by a file selector. - -This function is used in wxDocManager::CreateDocument. - -\membersection{wxDocManager::SelectDocumentType} - -\func{wxDocTemplate *}{SelectDocumentType}{\param{wxDocTemplate **}{templates}, - \param{int}{ noTemplates}} - -Returns a document template by asking the user (if there is more than one template). -This function is used in wxDocManager::CreateDocument. - -\membersection{wxDocManager::SelectViewType} - -\func{wxDocTemplate *}{SelectViewType}{\param{wxDocTemplate **}{templates}, - \param{int}{ noTemplates}} - -Returns a document template by asking the user (if there is more than one template), -displaying a list of valid views. This function is used in wxDocManager::CreateView. -The dialog normally won't appear because the array of templates only contains -those relevant to the document in question, and often there will only be one such. - -\membersection{wxDocManager::SetMaxDocsOpen} - -\func{void}{SetMaxDocsOpen}{\param{int}{ n}} - -Sets the maximum number of documents that can be open at a time. By default, this -is 10,000. If you set it to 1, existing documents will be saved and deleted -when the user tries to open or create a new one (similar to the behaviour -of Windows Write, for example). Allowing multiple documents gives behaviour -more akin to MS Word and other Multiple Document Interface applications. - - - diff --git a/docs/latex/wx/docmdich.tex b/docs/latex/wx/docmdich.tex deleted file mode 100644 index b9b16ac740..0000000000 --- a/docs/latex/wx/docmdich.tex +++ /dev/null @@ -1,89 +0,0 @@ -\section{\class{wxDocMDIChildFrame}}\label{wxdocmdichildframe} - -The wxDocMDIChildFrame class provides a default frame for displaying documents -on separate windows. This class can only be used for MDI child frames. - -The class is part of the document/view framework supported by wxWindows, -and cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocument}{wxdocument}, -\rtfsp\helpref{wxDocManager}{wxdocmanager} and \helpref{wxDocTemplate}{wxdoctemplate} classes. - -See the example application in {\tt samples/docview}. - -\wxheading{Derived from} - -\helpref{wxMDIChildFrame}{wxmdichildframe}\\ -\helpref{wxFrame}{wxframe}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{Document/view overview}{docviewoverview}, \helpref{wxMDIChildFrame}{wxmdichildframe} - -\membersection{wxDocMDIChildFrame::m\_childDocument} - -\member{wxDocument*}{m\_childDocument} - -The document associated with the frame. - -\membersection{wxDocMDIChildFrame::m\_childView} - -\member{wxView*}{m\_childView} - -The view associated with the frame. - -\membersection{wxDocMDIChildFrame::wxDocMDIChildFrame} - -\func{}{wxDocMDIChildFrame}{\param{wxDocument* }{doc}, \param{wxView* }{view}, \param{wxFrame* }{parent}, - \param{wxWindowID}{ id}, \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, - \param{const wxSize\&}{ size = wxDefaultSize}, - \param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = ``frame"}} - -Constructor. - -\membersection{wxDocMDIChildFrame::\destruct{wxDocMDIChildFrame}} - -\func{}{\destruct{wxDocMDIChildFrame}}{\void} - -Destructor. - -\membersection{wxDocMDIChildFrame::GetDocument} - -\constfunc{wxDocument*}{GetDocument}{\void} - -Returns the document associated with this frame. - -\membersection{wxDocMDIChildFrame::GetView} - -\constfunc{wxView*}{GetView}{\void} - -Returns the view associated with this frame. - -\membersection{wxDocMDIChildFrame::OnActivate} - -\func{void}{OnActivate}{\param{bool}{ active}} - -Sets the currently active view to be the frame's view. You may need -to override (but still call) this function in order to set the keyboard -focus for your subwindow. - -\membersection{wxDocMDIChildFrame::OnClose} - -\func{virtual bool}{OnClose}{\void} - -Closes and deletes the current view and document. - -\membersection{wxDocMDIChildFrame::SetDocument} - -\func{void}{SetDocument}{\param{wxDocument *}{doc}} - -Sets the document for this frame. - -\membersection{wxDocMDIChildFrame::SetView} - -\func{void}{SetView}{\param{wxView *}{view}} - -Sets the view for this frame. - - diff --git a/docs/latex/wx/docmdipr.tex b/docs/latex/wx/docmdipr.tex deleted file mode 100644 index 5bb084dcfe..0000000000 --- a/docs/latex/wx/docmdipr.tex +++ /dev/null @@ -1,79 +0,0 @@ -\section{\class{wxDocMDIParentFrame}}\label{wxdocmdiparentframe} - -The wxDocMDIParentFrame class provides a default top-level frame for -applications using the document/view framework. This class can only be used for MDI parent frames. - -It cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocument}{wxdocument}, -\rtfsp\helpref{wxDocManager}{wxdocmanager} and \helpref{wxDocTemplates}{wxdoctemplate} classes. - -See the example application in {\tt samples/docview}. - -\wxheading{Derived from} - -\helpref{wxMDIParentFrame}{wxmdiparentframe}\\ -\helpref{wxFrame}{wxframe}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{Document/view overview}{docviewoverview}, \helpref{wxMDIParentFrame}{wxmdiparentframe} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxDocMDIParentFrame::wxDocMDIParentFrame} - -\func{}{wxDocMDIParentFrame}{\param{wxFrame *}{parent}, \param{wxWindowID}{ id}, - \param{const wxString\& }{title}, \param{int}{ x}, \param{int}{ y}, \param{int}{ width}, \param{int}{ height}, - \param{long}{ style}, \param{const wxString\& }{name}} - -Constructor. - -\membersection{wxDocMDIParentFrame::\destruct{wxDocMDIParentFrame}} - -\func{}{\destruct{wxDocMDIParentFrame}}{\void} - -Destructor. - -\membersection{wxDocMDIParentFrame::OnClose} - -\func{bool}{OnClose}{\void} - -Deletes all views and documents. If no user input cancelled the -operation, the function returns TRUE and the application will exit. - -Since understanding how document/view clean-up takes place can be difficult, -the implementation of this function is shown below. - -\begin{verbatim} -bool wxDocMDIParentFrame::OnClose(void) -{ - // Delete all views and documents - wxNode *node = docManager->GetDocuments().First(); - while (node) - { - wxDocument *doc = (wxDocument *)node->Data(); - wxNode *next = node->Next(); - - if (!doc->Close()) - return FALSE; - - // Implicitly deletes the document when the last - // view is removed (deleted) - doc->DeleteAllViews(); - - // Check document is deleted - if (docManager->GetDocuments().Member(doc)) - delete doc; - - // This assumes that documents are not connected in - // any way, i.e. deleting one document does NOT - // delete another. - node = next; - } - return TRUE; -} -\end{verbatim} - - diff --git a/docs/latex/wx/docprfrm.tex b/docs/latex/wx/docprfrm.tex deleted file mode 100644 index f0eff917de..0000000000 --- a/docs/latex/wx/docprfrm.tex +++ /dev/null @@ -1,78 +0,0 @@ -\section{\class{wxDocParentFrame}}\label{wxdocparentframe} - -The wxDocParentFrame class provides a default top-level frame for -applications using the document/view framework. This class can only be used for SDI (not MDI) parent frames. - -It cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocument}{wxdocument}, -\rtfsp\helpref{wxDocManager}{wxdocmanager} and \helpref{wxDocTemplates}{wxdoctemplate} classes. - -See the example application in {\tt samples/docview}. - -\wxheading{Derived from} - -\helpref{wxFrame}{wxframe}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{Document/view overview}{docviewoverview}, \helpref{wxFrame}{wxframe} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxDocParentFrame::wxDocParentFrame} - -\func{}{wxDocParentFrame}{\param{wxFrame *}{parent}, \param{wxWindowID}{ id}, - \param{const wxString\& }{title}, \param{int}{ x}, \param{int}{ y}, \param{int}{ width}, \param{int}{ height}, - \param{long}{ style}, \param{const wxString\& }{name}} - -Constructor. - -\membersection{wxDocParentFrame::\destruct{wxDocParentFrame}} - -\func{}{\destruct{wxDocParentFrame}}{\void} - -Destructor. - -\membersection{wxDocParentFrame::OnClose} - -\func{bool}{OnClose}{\void} - -Deletes all views and documents. If no user input cancelled the -operation, the function returns TRUE and the application will exit. - -Since understanding how document/view clean-up takes place can be difficult, -the implementation of this function is shown below. - -\begin{verbatim} -bool wxDocParentFrame::OnClose(void) -{ - // Delete all views and documents - wxNode *node = docManager->GetDocuments().First(); - while (node) - { - wxDocument *doc = (wxDocument *)node->Data(); - wxNode *next = node->Next(); - - if (!doc->Close()) - return FALSE; - - // Implicitly deletes the document when the last - // view is removed (deleted) - doc->DeleteAllViews(); - - // Check document is deleted - if (docManager->GetDocuments().Member(doc)) - delete doc; - - // This assumes that documents are not connected in - // any way, i.e. deleting one document does NOT - // delete another. - node = next; - } - return TRUE; -} -\end{verbatim} - - diff --git a/docs/latex/wx/doctempl.tex b/docs/latex/wx/doctempl.tex deleted file mode 100644 index daae6ace61..0000000000 --- a/docs/latex/wx/doctempl.tex +++ /dev/null @@ -1,233 +0,0 @@ -\section{\class{wxDocTemplate}}\label{wxdoctemplate} - -The wxDocTemplate class is used to model the relationship between a -document class and a view class. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxDocTemplate overview}{wxdoctemplateoverview}, \helpref{wxDocument}{wxdocument}, \helpref{wxView}{wxview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxDocTemplate::m\_defaultExt} - -\member{wxString}{m\_defaultExt} - -The default extension for files of this type. - -\membersection{wxDocTemplate::m\_description} - -\member{wxString}{m\_description} - -A short description of this template. - -\membersection{wxDocTemplate::m\_directory} - -\member{wxString}{m\_directory} - -The default directory for files of this type. - -\membersection{wxDocTemplate::m\_docClassInfo} - -\member{wxClassInfo* }{m\_docClassInfo} - -Run-time class information that allows document instances to be constructed dynamically. - -\membersection{wxDocTemplate::m\_docTypeName} - -\member{wxString}{m\_docTypeName} - -The named type of the document associated with this template. - -\membersection{wxDocTemplate::m\_documentManager} - -\member{wxDocTemplate*}{m\_documentManager} - -A pointer to the document manager for which this template was created. - -\membersection{wxDocTemplate::m\_fileFilter} - -\member{wxString}{m\_fileFilter} - -The file filter (such as \verb$*.txt$) to be used in file selector dialogs. - -\membersection{wxDocTemplate::m\_flags} - -\member{long}{m\_flags} - -The flags passed to the constructor. - -\membersection{wxDocTemplate::m\_viewClassInfo} - -\member{wxClassInfo*}{m\_viewClassInfo} - -Run-time class information that allows view instances to be constructed dynamically. - -\membersection{wxDocTemplate::m\_viewTypeName} - -\member{wxString}{m\_viewTypeName} - -The named type of the view associated with this template. - -\membersection{wxDocTemplate::wxDocTemplate} - -\func{}{wxDocTemplate}{\param{wxDocManager* }{manager}, \param{const wxString\& }{descr}, \param{const wxString\& }{filter}, - \param{const wxString\& }{dir}, \param{const wxString\& }{ext}, \param{const wxString\& }{docTypeName}, - \param{const wxString\& }{viewTypeName}, \param{wxClassInfo* }{docClassInfo = NULL}, - \param{wxClassInfo* }{viewClassInfo = NULL}, \param{long}{ flags = wxDEFAULT\_TEMPLATE\_FLAGS}} - -Constructor. Create instances dynamically near the start of your application after creating -a wxDocManager instance, and before doing any document or view operations. - -{\it manager} is the document manager object which manages this template. - -{\it descr} is a short description of what the template is for. This string will be displayed in the -file filter list of Windows file selectors. - -{\it filter} is an appropriate file filter such as \verb$*.txt$. - -{\it dir} is the default directory to use for file selectors. - -{\it ext} is the default file extension (such as txt). - -{\it docTypeName} is a name that should be unique for a given type of document, used for -gathering a list of views relevant to a particular document. - -{\it viewTypeName} is a name that should be unique for a given view. - -{\it docClassInfo} is a pointer to the run-time document class information as returned -by the CLASSINFO macro, e.g. CLASSINFO(MyDocumentClass). If this is not supplied, -you will need to derive a new wxDocTemplate class and override the CreateDocument -member to return a new document instance on demand. - -{\it viewClassInfo} is a pointer to the run-time view class information as returned -by the CLASSINFO macro, e.g. CLASSINFO(MyViewClass). If this is not supplied, -you will need to derive a new wxDocTemplate class and override the CreateView -member to return a new view instance on demand. - -{\it flags} is a bit list of the following: - -\begin{itemize}\itemsep=0pt -\item wxTEMPLATE\_VISIBLE The template may be displayed to the user in dialogs. -\item wxTEMPLATE\_INVISIBLE The template may not be displayed to the user in dialogs. -\item wxDEFAULT\_TEMPLATE\_FLAGS Defined as wxTEMPLATE\_VISIBLE. -\end{itemize} - -\membersection{wxDocTemplate::\destruct{wxDocTemplate}} - -\func{void}{\destruct{wxDocTemplate}}{\void} - -Destructor. - -\membersection{wxDocTemplate::CreateDocument} - -\func{wxDocument *}{CreateDocument}{\param{const wxString\& }{path}, \param{long}{ flags = 0}} - -Creates a new instance of the associated document class. If you have not supplied -a wxClassInfo parameter to the template constructor, you will need to override this -function to return an appropriate document instance. - -\membersection{wxDocTemplate::CreateView} - -\func{wxView *}{CreateView}{\param{wxDocument *}{doc}, \param{long}{ flags = 0}} - -Creates a new instance of the associated view class. If you have not supplied -a wxClassInfo parameter to the template constructor, you will need to override this -function to return an appropriate view instance. - -\membersection{wxDocTemplate::GetDefaultExtension} - -\func{wxString}{GetDefaultExtension}{\void} - -Returns the default file extension for the document data, as passed to the document template constructor. - -\membersection{wxDocTemplate::GetDescription} - -\func{wxString}{GetDescription}{\void} - -Returns the text description of this template, as passed to the document template constructor. - -\membersection{wxDocTemplate::GetDirectory} - -\func{wxString}{GetDirectory}{\void} - -Returns the default directory, as passed to the document template constructor. - -\membersection{wxDocTemplate::GetDocumentManager} - -\func{wxDocManager *}{GetDocumentManager}{\void} - -Returns a pointer to the document manager instance for which this template was created. - -\membersection{wxDocTemplate::GetDocumentName} - -\func{wxString}{GetDocumentName}{\void} - -Returns the document type name, as passed to the document template constructor. - -\membersection{wxDocTemplate::GetFileFilter} - -\func{wxString}{GetFileFilter}{\void} - -Returns the file filter, as passed to the document template constructor. - -\membersection{wxDocTemplate::GetFlags} - -\func{long}{GetFlags}{\void} - -Returns the flags, as passed to the document template constructor. - -\membersection{wxDocTemplate::GetViewName} - -\func{wxString}{GetViewName}{\void} - -Returns the view type name, as passed to the document template constructor. - -\membersection{wxDocTemplate::IsVisible} - -\func{bool}{IsVisible}{\void} - -Returns TRUE if the document template can be shown in user dialogs, FALSE otherwise. - -\membersection{wxDocTemplate::SetDefaultExtension} - -\func{void}{SetDefaultExtension}{\param{const wxString\& }{ext}} - -Sets the default file extension. - -\membersection{wxDocTemplate::SetDescription} - -\func{void}{SetDescription}{\param{const wxString\& }{descr}} - -Sets the template description. - -\membersection{wxDocTemplate::SetDirectory} - -\func{void}{SetDirectory}{\param{const wxString\& }{dir}} - -Sets the default directory. - -\membersection{wxDocTemplate::SetDocumentManager} - -\func{void}{SetDocumentManager}{\param{wxDocManager *}{manager}} - -Sets the pointer to the document manager instance for which this template was created. -Should not be called by the application. - -\membersection{wxDocTemplate::SetFileFilter} - -\func{void}{SetFileFilter}{\param{const wxString\& }{filter}} - -Sets the file filter. - -\membersection{wxDocTemplate::SetFlags} - -\func{void}{SetFlags}{\param{long }{flags}} - -Sets the internal document template flags (see the constructor description for more details). - - diff --git a/docs/latex/wx/document.tex b/docs/latex/wx/document.tex deleted file mode 100644 index 99a4553c03..0000000000 --- a/docs/latex/wx/document.tex +++ /dev/null @@ -1,327 +0,0 @@ -\section{\class{wxDocument}}\label{wxdocument} - -The document class can be used to model an application's file-based -data. It is part of the document/view framework supported by wxWindows, -and cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocTemplate}{wxdoctemplate}\rtfsp -and \helpref{wxDocManager}{wxdocmanager} classes. - -\wxheading{Derived from} - -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxDocument overview}{wxdocumentoverview}, \helpref{wxView}{wxview},\rtfsp -\helpref{wxDocTemplate}{wxdoctemplate}, \helpref{wxDocManager}{wxdocmanager} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxDocument::m\_commandProcessor} - -\member{wxCommandProcessor*}{m\_commandProcessor} - -A pointer to the command processor associated with this document. - -\membersection{wxDocument::m\_documentFile} - -\member{wxString}{m\_documentFile} - -Filename associated with this document (``" if none). - -\membersection{wxDocument::m\_documentModified} - -\member{bool}{m\_documentModified} - -TRUE if the document has been modified, FALSE otherwise. - -\membersection{wxDocument::m\_documentTemplate} - -\member{wxDocTemplate *}{m\_documentTemplate} - -A pointer to the template from which this document was created. - -\membersection{wxDocument::m\_documentTitle} - -\member{wxString}{m\_documentTitle} - -Document title. The document title is used for an associated -frame (if any), and is usually constructed by the framework from -the filename. - -\membersection{wxDocument::m\_documentTypeName}\label{documenttypename} - -\member{wxString}{m\_documentTypeName} - -The document type name given to the wxDocTemplate constructor, copied to this -variable when the document is created. If several document templates are -created that use the same document type, this variable is used in wxDocManager::CreateView -to collate a list of alternative view types that can be used on this kind of -document. Do not change the value of this variable. - -\membersection{wxDocument::m\_documentViews} - -\member{wxList}{m\_documentViews} - -List of wxView instances associated with this document. - -\membersection{wxDocument::wxDocument} - -\func{}{wxDocument}{\void} - -Constructor. Define your own default constructor to initialize application-specific -data. - -\membersection{wxDocument::\destruct{wxDocument}} - -\func{}{\destruct{wxDocument}}{\void} - -Destructor. Removes itself from the document manager. - -\membersection{wxDocument::AddView} - -\func{virtual bool}{AddView}{\param{wxView *}{view}} - -If the view is not already in the list of views, adds the view and calls OnChangedViewList. - -\membersection{wxDocument::Close} - -\func{virtual bool}{Close}{\void} - -Closes the document, by calling OnSaveModified and then (if this returned TRUE) OnCloseDocument. -This does not normally delete the document object: use DeleteAllViews to do this implicitly. - -\membersection{wxDocument::DeleteAllViews} - -\func{virtual bool}{DeleteAllViews}{\void} - -Calls wxView::Close and deletes each view. Deleting the final view will implicitly -delete the document itself, because the wxView destructor calls RemoveView. This -in turns calls wxDocument::OnChangedViewList, whose default implemention is to -save and delete the document if no views exist. - -\membersection{wxDocument::GetCommandProcessor} - -\constfunc{wxCommandProcessor*}{GetCommandProcessor}{\void} - -Returns a pointer to the command processor associated with this document. - -See \helpref{wxCommandProcessor}{wxcommandprocessor}. - -\membersection{wxDocument::GetDocumentTemplate} - -\constfunc{wxDocTemplate*}{GetDocumentTemplate}{\void} - -Gets a pointer to the template that created the document. - -\membersection{wxDocument::GetDocumentManager} - -\constfunc{wxDocManager*}{GetDocumentManager}{\void} - -Gets a pointer to the associated document manager. - -\membersection{wxDocument::GetDocumentName} - -\constfunc{wxString}{GetDocumentName}{\void} - -Gets the document type name for this document. See the comment for \helpref{documentTypeName}{documenttypename}. - -\membersection{wxDocument::GetDocumentWindow} - -\constfunc{wxWindow*}{GetDocumentWindow}{\void} - -Intended to return a suitable window for using as a parent for document-related -dialog boxes. By default, uses the frame associated with the first view. - -\membersection{wxDocument::GetFilename} - -\constfunc{wxString}{GetFilename}{\void} - -Gets the filename associated with this document, or NULL if none is -associated. - -\membersection{wxDocument::GetFirstView} - -\constfunc{wxView*}{GetFirstView}{\void} - -A convenience function to get the first view for a document, because -in many cases a document will only have a single view. - -\membersection{wxDocument::GetPrintableName} - -\constfunc{virtual void}{GetPrintableName}{\param{wxString\& }{name}} - -Copies a suitable document name into the supplied {\it name} buffer. The default -function uses the title, or if there is no title, uses the filename; or if no -filename, the string {\bf unnamed}. - -\membersection{wxDocument::GetTitle} - -\constfunc{wxString}{GetTitle}{\void} - -Gets the title for this document. The document title is used for an associated -frame (if any), and is usually constructed by the framework from -the filename. - -\membersection{wxDocument::IsModified}\label{wxdocumentismodified} - -\constfunc{virtual bool}{IsModified}{\void} - -Returns TRUE if the document has been modified since the last save, FALSE otherwise. -You may need to override this if your document view maintains its own -record of being modified (for example if using wxTextWindow to view and edit the document). - -See also \helpref{Modify}{wxdocumentmodify}. - -\membersection{wxDocument::LoadObject} - -\func{virtual istream\&}{LoadObject}{\param{istream\& }{stream}} - -Override this function and call it from your own LoadObject before -streaming your own data. LoadObject is called by the framework -automatically when the document contents need to be loaded. - -\membersection{wxDocument::Modify}\label{wxdocumentmodify} - -\func{virtual void}{Modify}{\param{bool}{ modify}} - -Call with TRUE to mark the document as modified since the last save, FALSE otherwise. -You may need to override this if your document view maintains its own -record of being modified (for example if using wxTextWindow to view and edit the document). - -See also \helpref{IsModified}{wxdocumentismodified}. - -\membersection{wxDocument::OnChangedViewList} - -\func{virtual void}{OnChangedViewList}{\void} - -Called when a view is added to or deleted from this document. The default -implementation saves and deletes the document if no views exist (the last -one has just been removed). - -\membersection{wxDocument::OnCloseDocument} - -\func{virtual bool}{OnCloseDocument}{\void} - -The default implementation calls DeleteContents (an empty implementation) -sets the modified flag to FALSE. Override this to -supply additional behaviour when the document is closed with Close. - -\membersection{wxDocument::OnCreate} - -\func{virtual bool}{OnCreate}{\param{const wxString\& }{path}, \param{long}{ flags}} - -Called just after the document object is created to give it a chance -to initialize itself. The default implementation uses the -template associated with the document to create an initial view. -If this function returns FALSE, the document is deleted. - -\membersection{wxDocument::OnCreateCommandProcessor} - -\func{virtual wxCommandProcessor*}{OnCreateCommandProcessor}{\void} - -Override this function if you want a different (or no) command processor -to be created when the document is created. By default, it returns -an instance of wxCommandProcessor. - -See \helpref{wxCommandProcessor}{wxcommandprocessor}. - -\membersection{wxDocument::OnNewDocument} - -\func{virtual bool}{OnNewDocument}{\void} - -The default implementation calls OnSaveModified and DeleteContents, makes a default title for the -document, and notifies the views that the filename (in fact, the title) has changed. - -\membersection{wxDocument::OnOpenDocument} - -\func{virtual bool}{OnOpenDocument}{\param{const wxString\& }{filename}} - -Constructs an input file stream for the given filename (which must not be NULL), -and calls LoadObject. If LoadObject returns TRUE, the document is set to -unmodified; otherwise, an error message box is displayed. The document's -views are notified that the filename has changed, to give windows an opportunity -to update their titles. All of the document's views are then updated. - -\membersection{wxDocument::OnSaveDocument} - -\func{virtual bool}{OnSaveDocument}{\param{const wxString\& }{filename}} - -Constructs an output file stream for the given filename (which must not be NULL), -and calls SaveObject. If SaveObject returns TRUE, the document is set to -unmodified; otherwise, an error message box is displayed. - -\membersection{wxDocument::OnSaveModified} - -\func{virtual bool}{OnSaveModified}{\void} - -If the document has been modified, prompts the user to ask if the changes should -be changed. If the user replies Yes, the Save function is called. If No, the -document is marked as unmodified and the function succeeds. If Cancel, the -function fails. - -\membersection{wxDocument::RemoveView} - -\func{virtual bool}{RemoveView}{\param{wxView* }{view}} - -Removes the view from the document's list of views, and calls OnChangedViewList. - -\membersection{wxDocument::Save} - -\func{virtual bool}{Save}{\void} - -Saves the document by calling OnSaveDocument if there is an associated filename, -or SaveAs if there is no filename. - -\membersection{wxDocument::SaveAs} - -\func{virtual bool}{SaveAs}{\void} - -Prompts the user for a file to save to, and then calls OnSaveDocument. - -\membersection{wxDocument::SaveObject} - -\func{virtual ostream\&}{SaveObject}{\param{ostream\& }{stream}} - -Override this function and call it from your own SaveObject before -streaming your own data. SaveObject is called by the framework -automatically when the document contents need to be saved. - -\membersection{wxDocument::SetCommandProcessor} - -\func{virtual void}{SetCommandProcessor}{\param{wxCommandProcessor *}{processor}} - -Sets the command processor to be used for this document. The document will then be responsible -for its deletion. Normally you should not call this; override OnCreateCommandProcessor -instead. - -See \helpref{wxCommandProcessor}{wxcommandprocessor}. - -\membersection{wxDocument::SetDocumentName} - -\func{void}{SetDocumentName}{\param{const wxString\& }{name}} - -Sets the document type name for this document. See the comment for \helpref{documentTypeName}{documenttypename}. - -\membersection{wxDocument::SetDocumentTemplate} - -\func{void}{SetDocumentTemplate}{\param{wxDocTemplate* }{templ}} - -Sets the pointer to the template that created the document. Should only be called by the -framework. - -\membersection{wxDocument::SetFilename} - -\func{void}{SetFilename}{\param{const wxString\& }{filename}} - -Sets the filename for this document. Usually called by the framework. - -\membersection{wxDocument::SetTitle} - -\func{void}{SetTitle}{\param{const wxString\& }{title}} - -Sets the title for this document. The document title is used for an associated -frame (if any), and is usually constructed by the framework from -the filename. - - diff --git a/docs/latex/wx/dropevt.tex b/docs/latex/wx/dropevt.tex deleted file mode 100644 index ff3e020e98..0000000000 --- a/docs/latex/wx/dropevt.tex +++ /dev/null @@ -1,72 +0,0 @@ -\section{\class{wxDropFilesEvent}}\label{wxdropfilesevent} - -This class is used for drop files events, that is, when files have been dropped -onto the window. This functionality is currently only available under Windows. - -\wxheading{Derived from} - -\helpref{wxEvent}{wxevent}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Event table macros} - -To process a drop files event, use these event handler macros to direct input to a member -function that takes a wxDropFilesEvent argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_DROP\_FILES(func)}}{Process a wxEVT\_DROP\_FILES event.} -\end{twocollist}% - -\wxheading{See also} - -\helpref{wxWindow::OnDropFiles}{wxwindowondropfiles}, \helpref{Event handling overview}{eventhandlingoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxDropFilesEvent::wxDropFilesEvent} - -\func{}{wxDropFilesEvent}{\param{WXTYPE }{id = 0}, \param{int }{noFiles = 0},\rtfsp -\param{wxString* }{files = NULL}} - -Constructor. - -\membersection{wxDropFilesEvent::m\_files} - -\member{wxString*}{m\_files} - -An array of filenames. - -\membersection{wxDropFilesEvent::m\_noFiles} - -\member{int}{m\_noFiles} - -The number of files dropped. - -\membersection{wxDropFilesEvent::m\_pos} - -\member{wxPoint}{m\_pos} - -The point at which the drop took place. - -\membersection{wxDropFilesEvent::GetFiles}\label{wxdropfileseventgetfiles} - -\constfunc{wxString*}{GetFiles}{\void} - -Returns an array of filenames. - -\membersection{wxDropFilesEvent::GetNumberOfFiles}\label{wxdropfileseventgetnumberoffiles} - -\constfunc{int}{GetNumberOfFiles}{\void} - -Returns the number of files dropped. - -\membersection{wxDropFilesEvent::GetPosition}\label{wxdropfileseventgetposition} - -\constfunc{wxPoint}{GetPosition}{\void} - -Returns the position at which the files were dropped. - -Returns an array of filenames. - - diff --git a/docs/latex/wx/eraseevt.tex b/docs/latex/wx/eraseevt.tex deleted file mode 100644 index 2c4a559780..0000000000 --- a/docs/latex/wx/eraseevt.tex +++ /dev/null @@ -1,48 +0,0 @@ -\section{\class{wxEraseEvent}}\label{wxeraseevent} - -An erase event is sent when a window's background needs to be repainted. - -\wxheading{Derived from} - -\helpref{wxEvent}{wxevent}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Event table macros} - -To process an erase event, use this event handler macro to direct input to a member -function that takes a wxEraseEvent argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_ERASE\_BACKGROUND(func)}}{Process a wxEVT\_ERASE\_BACKGROUND event.} -\end{twocollist}% - -\wxheading{Remarks} - -If the {\bf m\_DC} member is non-NULL, draw into this device context. - -\wxheading{See also} - -\helpref{wxWindow::OnEraseBackground}{wxwindowonerasebackground}, \helpref{Event handling overview}{eventhandlingoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxEraseEvent::wxEraseEvent} - -\func{}{wxEraseEvent}{\param{int }{id = 0}, \param{wxDC* }{dc = NULL}} - -Constructor. - -\membersection{wxEraseEvent::m\_dc} - -\member{wxDC*}{m\_dc} - -The device context associated with the erase event (may be NULL). - -\membersection{wxEraseEvent::GetDC}\label{wxeraseeventgetdc} - -\constfunc{wxDC*}{GetDC}{\void} - -Returns the device context to draw into. If this is non-NULL, you should draw -into it to perform the erase operation. - diff --git a/docs/latex/wx/event.tex b/docs/latex/wx/event.tex deleted file mode 100644 index d44b4b3fb8..0000000000 --- a/docs/latex/wx/event.tex +++ /dev/null @@ -1,141 +0,0 @@ -\section{\class{wxEvent}}\label{wxevent} - -An event is a structure holding information about an event passed to a -callback or member function. {\bf wxEvent} used to be a multipurpose -event object, and is an abstract base class for other event classes (see below). - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxCommandEvent}{wxcommandevent},\rtfsp -\helpref{wxMouseEvent}{wxmouseevent} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxEvent::wxEvent} - -\func{}{wxEvent}{\param{int }{id = 0}} - -Constructor. Should not need to be used directly by an application. - -\membersection{wxEvent::m\_eventHandle} - -\member{char*}{m\_eventHandle} - -Handle of an underlying windowing system event handle, such as -XEvent. Not guaranteed to be instantiated. - -\membersection{wxEvent::m\_eventObject} - -\member{wxObject*}{m\_eventObject} - -The object (usually a window) that the event was generated from, -or should be sent to. - -\membersection{wxEvent::m\_eventType} - -\member{WXTYPE}{m\_eventType} - -The type of the event, such as wxEVENT\_TYPE\_BUTTON\_COMMAND. - -\membersection{wxEvent::m\_id} - -\member{int}{m\_id} - -Identifier for the window. - -\membersection{wxEvent::m\_skipped} - -\member{bool}{m\_skipped} - -Set to TRUE by {\bf Skip} if this event should be skipped. - -\membersection{wxEvent::m\_timeStamp} - -\member{long}{m\_timeStamp} - -Timestamp for this event. - -\membersection{wxEvent::GetEventClass} - -\func{WXTYPE}{GetEventClass}{\void} - -Returns the identifier of the given event class, -such as wxTYPE\_MOUSE\_EVENT. - -\membersection{wxEvent::GetEventObject} - -\func{wxObject*}{GetEventObject}{\void} - -Returns the object associated with the -event, if any. - -\membersection{wxEvent::GetEventType} - -\func{WXTYPE}{GetEventType}{\void} - -Returns the identifier of the given event type, -such as wxEVENT\_TYPE\_BUTTON\_COMMAND. - -\membersection{wxEvent::GetId} - -\func{int}{GetId}{\void} - -Returns the identifier associated with this event, such as a button command id. - -\membersection{wxEvent::GetObjectType} - -\func{WXTYPE}{GetObjectType}{\void} - -Returns the type of the object associated with the -event, such as wxTYPE\_BUTTON. - -\membersection{wxEvent::GetSkipped} - -\func{bool}{GetSkipped}{\void} - -Returns TRUE if the event handler should be skipped, FALSE otherwise. - -\membersection{wxEvent::GetTimestamp} - -\func{long}{GetTimestamp}{\void} - -Gets the timestamp for the event. - -\membersection{wxEvent::SetEventObject} - -\func{void}{SetEventObject}{\param{wxObject* }{object}} - -Sets the originating object. - -\membersection{wxEvent::SetEventType} - -\func{void}{SetEventType}{\param{WXTYPE }{typ}} - -Sets the event type. - -\membersection{wxEvent::SetId} - -\func{void}{SetId}{\param{int}{ id}} - -Sets the identifier associated with this event, such as a button command id. - -\membersection{wxEvent::SetTimestamp} - -\func{void}{SetTimestamp}{\param{long }{timeStamp}} - -Sets the timestamp for the event. - -Sets the originating object. - -\membersection{wxEvent::Skip}\label{wxeventskip} - -\func{void}{Skip}{\param{bool}{ skip = TRUE}} - -Called by an event handler to tell the event system that the -event handler should be skipped, and the next valid handler used -instead. - diff --git a/docs/latex/wx/evthand.tex b/docs/latex/wx/evthand.tex deleted file mode 100644 index 16e10a1bcb..0000000000 --- a/docs/latex/wx/evthand.tex +++ /dev/null @@ -1,269 +0,0 @@ -\section{\class{wxEvtHandler}}\label{wxevthandler} - -A class that can handle events from the windowing system. -wxWindow (and therefore all window classes) are derived from -this class. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\overview{Event handling overview}{eventhandlingoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxEvtHandler::wxEvtHandler} - -\func{}{wxEvtHandler}{\void} - -Constructor. - -\membersection{wxEvtHandler::\destruct{wxEvtHandler}} - -\func{}{\destruct{wxEvtHandler}}{\void} - -Destructor. If the handler is part of a chain, the destructor will -unlink itself and restore the previous and next handlers so that they point to -each other. - -\membersection{wxEvtHandler::Default}\label{wxevthandlerdefault} - -\func{virtual long}{Default}{\void} - -Invokes default processing if this event handler is a window. - -\wxheading{Return value} - -System dependent. - -\wxheading{Remarks} - -A generic way of delegating processing to the default system behaviour. It calls a platform-dependent -default function, with parameters dependent on the event or message parameters -originally sent from the windowing system. - -Normally the application should call a base member, such as \helpref{wxWindow::OnChar}{wxwindowonchar}, which itself -may call {\bf Default}. - -\membersection{wxEvtHandler::GetClientData}\label{wxevthandlergetclientdata} - -\func{char* }{GetClientData}{\void} - -Gets user-supplied client data. - -\wxheading{Remarks} - -Normally, any extra data the programmer wishes to associate with the object -should be made available by deriving a new class -with new data members. - -\wxheading{See also} - -\helpref{wxEvtHandler::SetClientData}{wxevthandlersetclientdata} - -\membersection{wxEvtHandler::GetEvtHandlerEnabled}\label{wxevthandlergetevthandlerenabled} - -\func{bool}{GetEvtHandlerEnabled}{\void} - -Returns TRUE if the event handler is enabled, FALSE otherwise. - -\wxheading{See also} - -\helpref{wxEvtHandler::SetEvtHandlerEnabled}{wxevthandlersetevthandlerenabled} - -\membersection{wxEvtHandler::GetNextHandler}\label{wxevthandlergetnexthandler} - -\func{wxEvtHandler*}{GetNextHandler}{\void} - -Gets the pointer to the next handler in the chain. - -\wxheading{See also} - -\helpref{wxEvtHandler::GetPreviousHandler}{wxevthandlergetprevioushandler},\rtfsp -\helpref{wxEvtHandler::SetPreviousHandler}{wxevthandlersetprevioushandler},\rtfsp -\helpref{wxEvtHandler::SetNextHandler}{wxevthandlersetnexthandler},\rtfsp -\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp -\helpref{wxWindow::PopEventHandler}{wxwindowpopeventhandler} - -\membersection{wxEvtHandler::GetPreviousHandler}\label{wxevthandlergetprevioushandler} - -\func{wxEvtHandler*}{GetPreviousHandler}{\void} - -Gets the pointer to the previous handler in the chain. - -\wxheading{See also} - -\helpref{wxEvtHandler::GetPreviousHandler}{wxevthandlergetprevioushandler},\rtfsp -\helpref{wxEvtHandler::SetPreviousHandler}{wxevthandlersetprevioushandler},\rtfsp -\helpref{wxEvtHandler::SetPreviousHandler}{wxevthandlersetprevioushandler},\rtfsp -\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp -\helpref{wxWindow::PopEventHandler}{wxwindowpopeventhandler} - -\membersection{wxEvtHandler::ProcessEvent}\label{wxevthandlerprocessevent} - -\func{virtual bool}{ProcessEvent}{\param{wxEvent\& }{event}} - -Processes an event, searching event tables and calling zero or more suitable event handler function(s). - -\wxheading{Parameters} - -\docparam{event}{Event to process.} - -\wxheading{Return value} - -TRUE if a suitable event handler function was found and executed, and the function did not -call \helpref{wxEvent::Skip}{wxeventskip}. - -\wxheading{Remarks} - -Normally, your application would not call this function: it is called in the wxWindows -implementation to dispatch incoming user interface events to the framework (and application). - -However, you might need to call it if implementing new functionality (such as a new control) where -you define new event types, as opposed to allowing the user to override virtual functions. - -An instance where you might actually override the {\bf ProcessEvent} function is where you want -to direct event processing to event handlers not normally noticed by wxWindows. For example, -in the document/view architecture, documents and views are potential event handlers. -When an event reaches a frame, {\bf ProcessEvent} will need to be called on the associated -document and view in case event handler functions are associated with these objects. -The property classes library (wxProperty) also overrides {\bf ProcessEvent} for similar reasons. - -The normal order of event table searching is as follows: - -\begin{enumerate}\itemsep=0pt -\item If the object is disabled (via a call to \helpref{wxEvtHandler::SetEvtHandlerEnabled}{wxevthandlersetevthandlerenabled}) -the function skips to step (6). -\item If the object is a wxWindow, {\bf ProcessEvent} is recursively called on the window's\rtfsp -\helpref{wxValidator}{wxvalidator}. If this returns TRUE, the function exits. -\item {\bf SearchEventTable} is called for this event handler. If this fails, the base -class table is tried, and so on until no more tables exist or an appropriate function was found, -in which case the function exits. -\item The search is applied down the entire chain of event handlers (usually the chain has a length -of one). If this succeeds, the function exits. -\item If the object is a wxWindow and the event is a wxCommandEvent, {\bf ProcessEvent} is -recursively applied to the parent window's event handler. If this returns TRUE, the function exits. -\item Finally, {\bf ProcessEvent} is called on the wxApp object. -\end{enumerate} - -\wxheading{See also} - -\helpref{wxEvtHandler::SearchEventTable}{wxevthandlersearcheventtable} - -\membersection{wxEvtHandler::SearchEventTable}\label{wxevthandlersearcheventtable} - -\func{bool}{SearchEventTable}{\param{wxEventTable\& }{table}, \param{wxEvent\& }{event}} - -Searches the event table, executing an event handler function if an appropriate one -is found. - -\wxheading{Parameters} - -\docparam{table}{Event table to be searched.} - -\docparam{event}{Event to be matched against an event table entry.} - -\wxheading{Return value} - -TRUE if a suitable event handler function was found and executed, and the function did not -call \helpref{wxEvent::Skip}{wxeventskip}. - -\wxheading{Remarks} - -This function looks through the object's event table and tries to find an entry -that will match the event. - -An entry will match if: - -\begin{enumerate}\itemsep=0pt -\item The event type matches, and -\item the identifier or identifier range matches, or the event table entry's identifier is zero. -\end{enumerate} - -If a suitable function is called but calls \helpref{wxEvent::Skip}{wxeventskip}, this function will -fail, and searching will continue. - -\wxheading{See also} - -\helpref{wxEvtHandler::ProcessEvent}{wxevthandlerprocessevent} - -\membersection{wxEvtHandler::SetClientData}\label{wxevthandlersetclientdata} - -\func{void}{SetClientData}{\param{char* }{data}} - -Sets user-supplied client data. - -\wxheading{Parameters} - -\docparam{data}{Data to be associated with the event handler.} - -\wxheading{Remarks} - -Normally, any extra data the programmer wishes -to associate with the object should be made available by deriving a new class -with new data members. - -TODO: make this void*, char* only in compatibility mode. - -\wxheading{See also} - -\helpref{wxEvtHandler::GetClientData}{wxevthandlergetclientdata} - -\membersection{wxEvtHandler::SetEvtHandlerEnabled}\label{wxevthandlersetevthandlerenabled} - -\func{void}{SetEvtHandlerEnabled}{\param{bool }{enabled}} - -Enables or disables the event handler. - -\wxheading{Parameters} - -\docparam{enabled}{TRUE if the event handler is to be enabled, FALSE if it is to be disabled.} - -\wxheading{Remarks} - -You can use this function to avoid having to remove the event handler from the chain, for example -when implementing a dialog editor and changing from edit to test mode. - -\wxheading{See also} - -\helpref{wxEvtHandler::GetEvtHandlerEnabled}{wxevthandlergetevthandlerenabled} - -\membersection{wxEvtHandler::SetNextHandler}\label{wxevthandlersetnexthandler} - -\func{void}{SetNextHandler}{\param{wxEvtHandler* }{handler}} - -Sets the pointer to the next handler. - -\wxheading{Parameters} - -\docparam{handler}{Event handler to be set as the next handler.} - -\wxheading{See also} - -\helpref{wxEvtHandler::GetNextHandler}{wxevthandlergetnexthandler},\rtfsp -\helpref{wxEvtHandler::SetPreviousHandler}{wxevthandlersetprevioushandler},\rtfsp -\helpref{wxEvtHandler::GetPreviousHandler}{wxevthandlergetprevioushandler},\rtfsp -\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp -\helpref{wxWindow::PopEventHandler}{wxwindowpopeventhandler} - -\membersection{wxEvtHandler::SetPreviousHandler}\label{wxevthandlersetprevioushandler} - -\func{void}{SetPreviousHandler}{\param{wxEvtHandler* }{handler}} - -Sets the pointer to the previous handler. - -\wxheading{Parameters} - -\docparam{handler}{Event handler to be set as the previous handler.} - -\wxheading{See also} - -\helpref{wxEvtHandler::GetPreviousHandler}{wxevthandlergetprevioushandler},\rtfsp -\helpref{wxEvtHandler::SetNextHandler}{wxevthandlersetnexthandler},\rtfsp -\helpref{wxEvtHandler::GetNextHandler}{wxevthandlergetnexthandler},\rtfsp -\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp -\helpref{wxWindow::PopEventHandler}{wxwindowpopeventhandler} - - diff --git a/docs/latex/wx/expr.tex b/docs/latex/wx/expr.tex deleted file mode 100644 index b6fd3020a4..0000000000 --- a/docs/latex/wx/expr.tex +++ /dev/null @@ -1,505 +0,0 @@ -\section{\class{wxExpr}}\label{wxexpr} - -The {\bf wxExpr} class is the building brick of expressions similar to Prolog -clauses, or objects. It can represent an expression of type long integer, float, string, word, -or list, and lists can be nested. - -\wxheading{Derived from} - -None - -\wxheading{See also} - -\helpref{wxExpr overview}{exproverview}, \helpref{wxExprDatabase}{wxexprdatabase} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxExpr::wxExpr}\label{wxexprconstr} - -\func{}{wxExpr}{\param{const wxString\&}{functor}} - -Construct a new clause with this form, supplying the functor name. A clause is an object -that will appear in the data file, with a list of attribute/value pairs. - -\func{}{wxExpr}{\param{wxExprType}{ type}, \param{const wxString\&}{ wordOrString = ``"}} - -Construct a new empty list, or a word (will be output with no quotes), or a string, depending on the -value of {\it type}. - -{\it type} can be {\bf wxExprList}, {\bf wxExprWord}, or {\bf wxExprString}. If {\it type} is wxExprList, -the value of {\it wordOrString} will be ignored. - -\func{}{wxExpr}{\param{long}{ value}} - -Construct an integer expression. - -\func{}{wxExpr}{\param{float}{ value}} - -Construct a floating point expression. - -\func{}{wxExpr}{\param{wxList* }{value}} - -Construct a list expression. The list's nodes' data should -themselves be {\bf wxExpr}s. - -The current version of this library no longer uses the {\bf wxList} -internally, so this constructor turns the list into its internal -format (assuming a non-nested list) and then deletes the supplied -list. - -\membersection{wxExpr::\destruct{wxExpr}} - -\func{}{\destruct{wxExpr}}{\void} - -Destructor. - -\membersection{wxExpr::AddAttributeValue}\label{wxexpraddattributevalue} - -Use these on clauses ONLY. Note that the functions for adding strings -and words must be differentiated by function name which is why -they are missing from this group (see \helpref{wxExpr::AddAttributeValueString}{wxexpraddattributevaluestring} and -\rtfsp\helpref{wxExpr::AddAttributeValueWord}{wxexpraddattributevalueword}). - -\func{void}{AddAttributeValue}{\param{const wxString\&}{ attribute}, \param{float }{value}} - -Adds an attribute and floating point value pair to the clause. - -\func{void}{AddAttributeValue}{\param{const wxString\&}{ attribute}, \param{long }{value}} - -Adds an attribute and long integer value pair to the clause. - -\func{void}{AddAttributeValue}{\param{const wxString\&}{ attribute}, \param{wxList* }{value}} - -Adds an attribute and list value pair to the clause, converting the list into -internal form and then deleting {\bf value}. Note that the list should not contain -nested lists (except if in internal {\bf wxExpr} form.) - -\func{void}{AddAttributeValue}{\param{const wxString\&}{ attribute}, \param{wxExpr* }{value}} - -Adds an attribute and wxExpr value pair to the clause. Do not delete\rtfsp -{\it value} once this function has been called. - -\membersection{wxExpr::AddAttributeValueString}\label{wxexpraddattributevaluestring} - -\func{void}{AddAttributeValueString}{\param{const wxString\&}{ attribute}, \param{const wxString\&}{ value}} - -Adds an attribute and string value pair to the clause. - -\membersection{wxExpr::AddAttributeValueStringList}\label{wxexpraddattributevaluestringlist} - -\func{void}{AddAttributeValueStringList}{\param{const wxString\&}{ attribute}, \param{wxList* }{value}} - -Adds an attribute and string list value pair to the clause. - -Note that the list passed to this function is a list of strings, NOT a list -of {\bf wxExpr}s; it gets turned into a list of {\bf wxExpr}s -automatically. This is a convenience function, since lists of strings -are often manipulated in C++. - -\membersection{wxExpr::AddAttributeValueWord}\label{wxexpraddattributevalueword} - -\func{void}{AddAttributeValueWord}{\param{const wxString\&}{ attribute}, \param{const wxString\&}{ value}} - -Adds an attribute and word value pair to the clause. - -\membersection{wxExpr::Append}\label{wxexprappend} - -\func{void}{Append}{\param{wxExpr*}{ value}} - -Append the {\bf value} to the end of the list. `this' must be a list. - -\membersection{wxExpr::Arg}\label{wxexprarg} - -\constfunc{wxExpr* }{Arg}{\param{wxExprType}{ type}, \param{int}{ n}} - -Get nth arg of the given clause (starting from 1). NULL is returned if -the expression is not a clause, or {\it n} is invalid, or the given type -does not match the actual type. See also \helpref{wxExpr::Nth}{wxexprnth}. - -\membersection{wxExpr::Insert}\label{wxexprinsert} - -\func{void}{Insert}{\param{wxExpr* }{value}} - -Insert the {\bf value} at the start of the list. `this' must be a list. - -\membersection{wxExpr::GetAttributeValue}\label{wxexprgetattributevalue} - -These functions are the easiest way to retrieve attribute values, by -passing a pointer to variable. If the attribute is present, the -variable will be filled with the appropriate value. If not, the -existing value is left alone. This style of retrieving attributes -makes it easy to set variables to default values before calling these -functions; no code is necessary to check whether the attribute is -present or not. - -\constfunc{bool}{GetAttributeValue}{\param{const wxString\&}{ attribute}, \param{wxString\&}{ value}} - -Retrieve a string (or word) value. - -\constfunc{bool}{GetAttributeValue}{\param{const wxString\&}{ attribute}, \param{float\& }{value}} - -Retrieve a floating point value. - -\constfunc{bool}{GetAttributeValue}{\param{const wxString\&}{ attribute}, \param{int\& }{value}} - -Retrieve an integer value. - -\constfunc{bool}{GetAttributeValue}{\param{const wxString\&}{ attribute}, \param{long\& }{value}} - -Retrieve a long integer value. - -\constfunc{bool}{GetAttributeValue}{\param{const wxString\&}{ attribute}, \param{wxExpr**}{ value}} - -Retrieve a wxExpr pointer. - -\membersection{wxExpr::GetAttributeValueStringList}\label{wxexprgetattributestringlist} - -\constfunc{void}{GetAttributeValueStringList}{\param{const wxString\&}{attribute}, \param{wxList* }{value}} - -Use this on clauses ONLY. See above for comments on this style of -attribute value retrieval. This function expects to receive a pointer to -a new list (created by the calling application); it will append strings -to the list if the attribute is present in the clause. - -\membersection{wxExpr::AttributeValue}\label{wxexprattributevalue} - -\constfunc{wxExpr*}{AttributeValue}{\param{const wxString\&}{ word}} - -Use this on clauses ONLY. Searches the clause for an attribute -matching {\it word}, and returns the value associated with it. - -\membersection{wxExpr::Copy}\label{wxexprcopy} - -\constfunc{wxExpr*}{Copy}{\void} - -Recursively copies the expression, allocating new storage space. - -\membersection{wxExpr::DeleteAttributeValue}\label{wxexprdeletattributevalue} - -\func{void}{DeleteAttributeValue}{\param{const wxString\&}{ attribute}} - -Use this on clauses only. Deletes the attribute and its value (if any) from the -clause. - -\membersection{wxExpr::Functor}\label{wxexprfunctor} - -\constfunc{wxString}{Functor}{\void} - -Use this on clauses only. Returns the clause's functor (object name). - -\membersection{wxExpr::GetClientData}\label{wxexprgetclientdata} - -\constfunc{wxObject*}{GetClientData}{\void} - -Retrieve arbitrary data stored with this clause. This can be useful when -reading in data for storing a pointer to the C++ object, so when another -clause makes a reference to this clause, its C++ object can be retrieved. -See \helpref{wxExpr::SetClientData}{wxexprsetclientdata}. - -\membersection{wxExpr::GetFirst}\label{wxexprgetfirst} - -\constfunc{wxExpr*}{GetFirst}{\void} - -If this is a list expression (or clause), gets the first element in the list. - -See also \helpref{wxExpr::GetLast}{wxexprgetlast}, \helpref{wxExpr::GetNext}{wxexprgetnext}, \helpref{wxExpr::Nth}{wxexprnth}. - -\membersection{wxExpr::GetLast}\label{wxexprgetlast} - -\constfunc{wxExpr*}{GetLast}{\void} - -If this is a list expression (or clause), gets the last element in the list. - -See also \helpref{wxExpr::GetFirst}{wxexprgetfirst}, \helpref{wxExpr::GetNext}{wxexprgetnext}, \helpref{wxExpr::Nth}{wxexprnth}. - -\membersection{wxExpr::GetNext}\label{wxexprgetnext} - -\constfunc{wxExpr*}{GetNext}{\void} - -If this is a node in a list (any wxExpr may be a node in a list), gets the -next element in the list. - -See also \helpref{wxExpr::GetFirst}{wxexprgetfirst}, \helpref{wxExpr::GetLast}{wxexprgetlast}, \helpref{wxExpr::Nth}{wxexprnth}. - -\membersection{wxExpr::IntegerValue}\label{wxexprintegervalue} - -\constfunc{long}{IntegerValue}{\void} - -Returns the integer value of the expression. - -\membersection{wxExpr::Nth}\label{wxexprnth} - -\constfunc{wxExpr*}{Nth}{\param{int}{ n}} - -Get nth arg of the given list expression (starting from 0). NULL is returned if -the expression is not a list expression, or {\it n} is invalid. See also \helpref{wxExpr::Arg}{wxexprarg}. - -Normally, you would use attribute-value pairs to add and retrieve data -from objects (clauses) in a data file. However, if the data gets complex, -you may need to store attribute values as lists, and pick them apart -yourself. - -\membersection{wxExpr::RealValue}\label{wxexprrealvalue} - -\constfunc{float}{RealValue}{\void} - -Returns the floating point value of the expression. - -\membersection{wxExpr::SetClientData}\label{wxexprsetclientdata} - -\func{void}{SetClientData}{\param{wxObject *}{data}} - -Associate arbitrary data with this clause. This can be useful when -reading in data for storing a pointer to the C++ object, so when another -clause makes a reference to this clause, its C++ object can be retrieved. -See \helpref{wxExpr::GetClientData}{wxexprgetclientdata}. - -\membersection{wxExpr::StringValue}\label{wxexprstringvalue} - -\constfunc{wxString}{StringValue}{\void} - -Returns the string value of the expression. - -\membersection{wxExpr::Type}\label{wxexprtype} - -\constfunc{wxExprType}{Type}{\void} - -Returns the type of the expression. {\bf wxExprType} is defined as follows: - -\begin{verbatim} -typedef enum { - wxExprNull, - wxExprInteger, - wxExprReal, - wxExprWord, - wxExprString, - wxExprList -} wxExprType; -\end{verbatim} - -\membersection{wxExpr::WordValue}\label{wxexprwordvalue} - -\constfunc{wxString}{WordValue}{\void} - -Returns the word value of the expression. - -\membersection{wxExpr::WriteLispExpr}\label{wxexprwritelistexpr} - -\func{void}{WriteLispExpr}{\param{ostream\&}{ stream}} - -Writes the expression or clause to the given stream in LISP format. -Not normally needed, since the whole {\bf wxExprDatabase} will usually -be written at once. Lists are enclosed in parentheses will no commas. - -\membersection{wxExpr::WritePrologClause}\label{wxexprwriteprologclause} - -\func{void}{WritePrologClause}{\param{ostream\&}{ stream}} - -Writes the clause to the given stream in Prolog format. Not normally needed, since -the whole {\bf wxExprDatabase} will usually be written at once. The format is: -functor, open parenthesis, list of comma-separated expressions, close parenthesis, -full stop. - -\membersection{wxExpr::WriteExpr}\label{wxexprwriteexpr} - -\func{void}{WriteExpr}{\param{ostream\&}{ stream}} - -Writes the expression (not clause) to the given stream in Prolog -format. Not normally needed, since the whole {\bf wxExprDatabase} will -usually be written at once. Lists are written in square bracketed, -comma-delimited format. - -\membersection{Functions and macros} - -Below are miscellaneous functions and macros associated with wxExpr objects. - -\func{bool}{wxExprIsFunctor}{\param{wxExpr *}{expr}, \param{const wxString\&}{ functor}} - -Checks that the functor of {\it expr} is {\it functor}. - -\func{void}{wxExprCleanUp}{\void} - -Cleans up the wxExpr system (YACC/LEX buffers) to avoid memory-checking warnings as the program exits. - -\begin{verbatim} -#define wxMakeInteger(x) (new wxExpr((long)x)) -#define wxMakeReal(x) (new wxExpr((float)x)) -#define wxMakeString(x) (new wxExpr(PrologString, x)) -#define wxMakeWord(x) (new wxExpr(PrologWord, x)) -#define wxMake(x) (new wxExpr(x)) -\end{verbatim} - -Macros to help make wxExpr objects. - -\section{\class{wxExprDatabase}}\label{wxexprdatabase} - -The {\bf wxExprDatabase} class represents a database, or list, -of Prolog-like expressions. Instances of this class are used for reading, -writing and creating data files. - -\wxheading{Derived from} - -\helpref{wxList}{wxlist}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxExpr overview}{exproverview}, \helpref{wxExpr}{wxexpr} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxExprDatabase::wxExprDatabase}\label{wxexprdatabaseconstr} - -\func{void}{wxExprDatabase}{\param{proioErrorHandler}{ handler = 0}} - -Construct a new, unhashed database, with an optional error handler. The -error handler must be a function returning a bool and taking an integer and a string -argument. When an error occurs when reading or writing a database, this function is -called. The error is given as the first argument (currently one of WXEXPR\_ERROR\_GENERAL, -WXEXPR\_ERROR\_SYNTAX) and an error message is given as the second argument. If FALSE -is returned by the error handler, processing of the wxExpr operation stops. - -Another way of handling errors is simply to call \helpref{wxExprDatabase::GetErrorCount}{wxexprdatabasegeterrorcount} after -the operation, to check whether errors have occurred, instead of installing an error handler. -If the error count is more than zero, \helpref{wxExprDatabase::Write}{wxexprdatabasewrite} and -\rtfsp\helpref{wxExprDatabase::Read}{wxexprdatabaseread} will return FALSE to -the application. - -For example: - -\begin{verbatim} -bool myErrorHandler(int err, chat *msg) -{ - if (err == WXEXPR_ERROR_SYNTAX) - { - wxMessageBox(msg, "Syntax error"); - } - return FALSE; -} - -wxExprDatabase database(myErrorHandler); -\end{verbatim} - - -\func{}{wxExprDatabase}{\param{wxExprType}{ type}, \param{const wxString\&}{attribute}, -\rtfsp\param{int}{ size = 500}, \param{proioErrorHandler}{ handler = 0}} - -Construct a new database hashed on a combination of the clause functor and -a named attribute (often an integer identification). - -See above for an explanation of the error handler. - -\membersection{wxExprDatabase::\destruct{wxExprDatabase}} - -\func{}{\destruct{wxExprDatabase}}{\void} - -Delete the database and contents. - -\membersection{wxExprDatabase::Append}\label{wxexprdatabaseappend} - -\func{void}{Append}{\param{wxExpr* }{clause}} - -Append a clause to the end of the database. If the database is hashing, -the functor and a user-specified attribute will be hashed upon, giving the -option of random access in addition to linear traversal of the database. - -\membersection{wxExprDatabase::BeginFind}\label{wxexprdatabasebeginfind} - -\func{void}{BeginFind}{\void} - -Reset the current position to the start of the database. Subsequent -\rtfsp\helpref{wxExprDatabase::FindClause}{wxexprdatabasefindclause} calls will move the pointer. - -\membersection{wxExprDatabase::ClearDatabase}\label{wxexprdatabasecleardatabase} - -\func{void}{ClearDatabase}{\void} - -Clears the contents of the database. - -\membersection{wxExprDatabase::FindClause}\label{wxexprdatabasefindclause} - -Various ways of retrieving clauses from the database. A return -value of NULL indicates no (more) clauses matching the given criteria. -Calling the functions repeatedly retrieves more matching clauses, if any. - -\func{wxExpr* }{FindClause}{\param{long}{ id}} - -Find a clause based on the special ``id'' attribute. - -\func{wxExpr* }{FindClause}{\param{const wxString\&}{ attribute}, \param{const wxString\&}{ value}} - -Find a clause which has the given attribute set to the given string or word value. - -\func{wxExpr*}{FindClause}{\param{const wxString\&}{ attribute}, \param{long}{ value}} - -Find a clause which has the given attribute set to the given integer value. - -\func{wxExpr*}{FindClause}{\param{const wxString\&}{ attribute}, \param{float}{ value}} - -Find a clause which has the given attribute set to the given floating point value. - -\membersection{wxExprDatabase::FindClauseByFunctor}\label{wxexprdatabasefindclausebyfunctor} - -\func{wxExpr*}{FindClauseByFunctor}{\param{const wxString\&}{ functor}} - -Find the next clause with the specified functor. - -\membersection{wxExprDatabase::GetErrorCount}\label{wxexprdatabasegeterrorcount} - -\constfunc{int}{GetErrorCount}{\void} - -Returns the number of errors encountered during the last read or write operation. - -\membersection{wxExprDatabase::HashFind}\label{wxexprdatabasehashfind} - -\constfunc{wxExpr*}{HashFind}{\param{const wxString\&}{ functor}, \param{long}{ value}} - -Finds the clause with the given functor and with the attribute specified -in the database constructor having the given integer value. - -For example, - -\begin{verbatim} -// Hash on a combination of functor and integer "id" attribute when reading in -wxExprDatabase db(wxExprInteger, "id"); - -// Read it in -db.ReadProlog("data"); - -// Retrieve a clause with specified functor and id -wxExpr *clause = db.HashFind("node", 24); -\end{verbatim} - -This would retrieve a clause which is written: {\tt node(id = 24, ..., )}. - -\func{wxExpr*}{HashFind}{\param{const wxString\&}{ functor}, \param{const wxString\&}{ value}} - -Finds the clause with the given functor and with the attribute specified -in the database constructor having the given string value. - -\membersection{wxExprDatabase::Read}\label{wxexprdatabaseread} - -\func{bool}{Read}{\param{const wxString\&}{ filename}} - -Reads in the given file, returning TRUE if successful. - -\membersection{wxExprDatabase::ReadFromString}\label{wxexprdatabasereadfromstring} - -\func{bool}{ReadFromString}{\param{const wxString\&}{ buffer}} - -Reads a Prolog database from the given string buffer, returning TRUE if -successful. - -\membersection{wxExprDatabase::WriteLisp}\label{wxexprdatabasewritelisp} - -\func{bool}{WriteLisp}{\param{ostream\& }{stream}} - -Writes the database as a LISP-format file. - -\membersection{wxExprDatabase::Write}\label{wxexprdatabasewrite} - -\func{bool}{Write}{\param{ostream\& }{stream}} - -Writes the database as a Prolog-format file. - - diff --git a/docs/latex/wx/file.tex b/docs/latex/wx/file.tex deleted file mode 100644 index fec5c31d87..0000000000 --- a/docs/latex/wx/file.tex +++ /dev/null @@ -1,169 +0,0 @@ -\section{\class{wxFile}}\label{wxfile} - -A wxFile performs raw file I/O. Note that wxFile::Flush is not implemented on some Windows compilers -due to a missing fsync function, which reduces the usefulness of this class. - -\wxheading{Derived from} - -None. - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxFile::wxFile}\label{wxfileconstr} - -\func{}{wxFile}{\void} - -Default constructor. - -\func{}{wxFile}{\param{const char*}{ filename}, \param{wxFile::OpenMode}{ mode = wxFile::read}} - -Opens a file with the given mode. - -\func{}{wxFile}{\param{int}{ fd}} - -Opens a file with the given file descriptor, which has already been opened. - -\wxheading{Parameters} - -\docparam{filename}{The filename.} - -\docparam{mode}{The mode in which to open the file. May be one of {\bf wxFile::read}, {\bf wxFile::write} and {\bf wxFile::read\_write}.} - -\docparam{fd}{An existing file descriptor.} - -\membersection{wxFile::\destruct{wxFile}} - -\func{}{\destruct{wxFile}}{\void} - -Destructor. This is not virtual, for efficiency. - -\membersection{wxFile::Attach}\label{wxfileattach} - -\func{void}{Attach}{\param{int}{ fd}} - -Attaches an existing file descriptor to the wxFile object. - -\membersection{wxFile::Close}\label{wxfileclose} - -\func{void}{Close}{\void} - -Closes the file. - -\membersection{wxFile::Create}\label{wxfilecreate} - -\func{bool}{Create}{\param{const char*}{ filename}, \param{bool}{ overwrite = FALSE}} - -Creates a file for writing. If the file already exists, setting {\bf overwrite} to TRUE -will ensure it is overwritten. - -\membersection{wxFile::Eof}\label{wxfileeof} - -\constfunc{bool}{Eof}{\void} - -Returns TRUE if the end of the file has been reached. - -\membersection{wxFile::Exists}\label{wxfileexists} - -\func{static bool}{Exists}{\param{const char*}{ filename}} - -Returns TRUE if the file exists. - -\membersection{wxFile::Flush}\label{wxfileflush} - -\func{bool}{Flush}{\void} - -Flushes the file descriptor. Not implemented for some Windows compilers. - -\membersection{wxFile::IsOpened}\label{wxfileisopened} - -\constfunc{bool}{IsOpened}{\void} - -Returns TRUE if the file has been opened. - -\membersection{wxFile::Length}\label{wxfilelength} - -\constfunc{off\_t}{Length}{\void} - -Returns the length of the file. - -\membersection{wxFile::Open}\label{wxfileopen} - -\func{bool}{Open}{\param{const char*}{ filename}, \param{wxFile::OpenMode}{ mode = wxFile::read}} - -Opens the file, returning TRUE if successful. - -\wxheading{Parameters} - -\docparam{filename}{The filename.} - -\docparam{mode}{The mode in which to open the file. May be one of {\bf wxFile::read}, {\bf wxFile::write} and {\bf wxFile::read\_write}.} - -\membersection{wxFile::Read}\label{wxfileread} - -\func{off\_t}{Read}{\param{void*}{ buffer}, \param{off\_t}{ count}} - -Reads the specified number of bytes into a buffer, returning the actual number read. - -\wxheading{Parameters} - -\docparam{buffer}{A buffer to receive the data.} - -\docparam{count}{The number of bytes to read.} - -\wxheading{Return value} - -The number of bytes read, or the symbol {\bf ofsInvalid} (-1) if there was an error. - -\membersection{wxFile::Seek}\label{wxfileseek} - -\func{off\_t}{Seek}{\param{off\_t }{ofs}, \param{wxFile::SeekMode }{mode = wxFile::FromStart}} - -Seeks to the specified position. - -\wxheading{Parameters} - -\docparam{ofs}{Offset to seek to.} - -\docparam{mode}{One of {\bf wxFile::FromStart}, {\bf wxFile::FromEnd}, {\bf wxFile::FromCurrent}.} - -\wxheading{Return value} - -The actual offset position achieved, or ofsInvalid on failure. - -\membersection{wxFile::SeekEnd}\label{wxfileseekend} - -\func{off\_t}{SeekEnd}{\param{off\_t }{ofs = 0}} - -Moves the file pointer to the specified number of bytes before the end of the file. - -\wxheading{Parameters} - -\docparam{ofs}{Number of bytes before the end of the file.} - -\wxheading{Return value} - -The actual offset position achieved, or ofsInvalid on failure. - -\membersection{wxFile::Tell}\label{wxfiletell} - -\constfunc{off\_t}{Tell}{\void} - -Returns the current position. - -\membersection{wxFile::Write}\label{wxfilewrite} - -\func{bool}{Write}{\param{const void*}{ buffer}, \param{off\_t}{ count}} - -Writes the specified number of bytes from a buffer. - -\wxheading{Parameters} - -\docparam{buffer}{A buffer containing the data.} - -\docparam{count}{The number of bytes to write.} - -\wxheading{Return value} - -TRUE if the operation was successful. - - diff --git a/docs/latex/wx/filedlg.tex b/docs/latex/wx/filedlg.tex deleted file mode 100644 index 69bf775c08..0000000000 --- a/docs/latex/wx/filedlg.tex +++ /dev/null @@ -1,179 +0,0 @@ -\section{\class{wxFileDialog}}\label{wxfiledialog} - -This class represents the file chooser dialog. - -\wxheading{Derived from} - -\helpref{wxDialog}{wxdialog}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxFileDialog overview}{wxfiledialogoverview}, \helpref{wxFileSelector}{wxfileselector} -%\rtfsp\helpref{wxFileSelectorEx}{wxfileselectorex} -%\helpref{wxLoadFileSelector}{wxloadfileselector},\rtfsp -%\helpref{wxSaveFileSelector}{wxsavefileselector} - -\wxheading{Remarks} - -Pops up a file selector box. In Windows, this is the common file selector -dialog. In X, this is a file selector box with somewhat less functionality. -The path and filename are distinct elements of a full file pathname. -If path is ``", the current directory will be used. If filename is ``", -no default filename will be supplied. The wildcard determines what files -are displayed in the file selector, and file extension supplies a type -extension for the required filename. Flags may be a combination of wxOPEN, -wxSAVE, wxOVERWRITE\_PROMPT, wxHIDE\_READONLY, or 0. They are only significant -at present in Windows. - -Both the X and Windows versions implement a wildcard filter. Typing a -filename containing wildcards (*, ?) in the filename text item, and -clicking on Ok, will result in only those files matching the pattern being -displayed. In the X version, supplying no default name will result in the -wildcard filter being inserted in the filename text item; the filter is -ignored if a default name is supplied. - -Under Windows (only), the wildcard may be a specification for multiple -types of file with a description for each, such as: - -\begin{verbatim} - "BMP files (*.bmp) | *.bmp | GIF files (*.gif) | *.gif" -\end{verbatim} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxFileDialog::wxFileDialog}\label{wxfiledialogconstr} - -\func{}{wxFileDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message = "Choose a file"},\rtfsp -\param{const wxString\& }{defaultDir = ""}, \param{const wxString\& }{defaultFile = ``"},\rtfsp -\param{const wxString\& }{wildcard = ``*.*"}, \param{long }{style = 0}, \param{const wxPoint\& }{pos = wxDefaultPosition}} - -Constructor. Use \helpref{wxFileDialog::ShowModal}{wxfiledialogshowmodal} to show the dialog. - -\wxheading{Parameters} - -\docparam{parent}{Parent window.} - -\docparam{message}{Message to show on the dialog.} - -\docparam{defaultDir}{The default directory, or the empty string.} - -\docparam{defaultFile}{The default filename, or the empty string.} - -\docparam{wildcard}{A wildcard, such as ``*.*".} - -\docparam{style}{A dialog style. A bitlist of: - -\twocolwidtha{5cm} -\begin{twocollist} -\twocolitem{{\bf wxOPEN}}{This is an open dialog (Windows only).} -\twocolitem{{\bf wxSAVE}}{This is a save dialog (Windows only).} -\twocolitem{{\bf wxHIDE\_READONLY}}{Hide read-only files (Windows only).} -\twocolitem{{\bf wxOVERWRITE\_PROMPT}}{Prompt for a conformation if a file will be overridden (Windows only).} -\end{twocollist}% -} - -\docparam{pos}{Dialog position. Not implemented.} - -\membersection{wxFileDialog::\destruct{wxFileDialog}} - -\func{}{\destruct{wxFileDialog}}{\void} - -Destructor. - -\membersection{wxFileDialog::GetDirectory}\label{wxfiledialoggetdirectory} - -\constfunc{wxString}{GetDirectory}{\void} - -Returns the default directory. - -\membersection{wxFileDialog::GetFilename}\label{wxfiledialoggetfilename} - -\constfunc{wxString}{GetFilename}{\void} - -Returns the default filename. - -\membersection{wxFileDialog::GetFilterIndex}\label{wxfiledialoggetfilterindex} - -\constfunc{int}{GetFilterIndex}{\void} - -Returns the index into the list of filters supplied, optionally, in the wildcard parameter. -Before the dialog is shown, this is the index which will be used when the dialog is first displayed. -After the dialog is shown, this is the index selected by the user. - -\membersection{wxFileDialog::GetMessage}\label{wxfiledialoggetmessage} - -\constfunc{wxString}{GetMessage}{\void} - -Returns the message that will be displayed on the dialog. - -\membersection{wxFileDialog::GetPath}\label{wxfiledialoggetpath} - -\constfunc{wxString}{GetPath}{\void} - -Returns the full path (directory and filename) of the selected file. - -\membersection{wxFileDialog::GetStyle}\label{wxfiledialoggetstyle} - -\constfunc{long}{GetStyle}{\void} - -Returns the dialog style. - -\membersection{wxFileDialog::GetWildcard}\label{wxfiledialoggetwildcard} - -\constfunc{wxString}{GetWildcard}{\void} - -Returns the file dialog wildcard. - -\membersection{wxFileDialog::SetDirectory}\label{wxfiledialogsetdirectory} - -\func{void}{SetDirectory}{\param{const wxString\& }{directory}} - -Sets the default directory. - -\membersection{wxFileDialog::SetFilename}\label{wxfiledialogsetfilename} - -\func{void}{SetFilename}{\param{const wxString\& }{setfilename}} - -Sets the default filename. - -\membersection{wxFileDialog::SetFilterIndex}\label{wxfiledialogsetfilterindex} - -\func{void}{SetFilterIndex}{\param{int }{filterIndex}} - -Sets the default filter index, starting from zero. Windows only. - -\membersection{wxFileDialog::SetMessage}\label{wxfiledialogsetmessage} - -\func{void}{SetMessage}{\param{const wxString\& }{message}} - -Sets the message that will be displayed on the dialog. - -\membersection{wxFileDialog::SetPath}\label{wxfiledialogsetpath} - -\func{void}{SetPath}{\param{const wxString\& }{path}} - -Sets the path (the combined directory and filename that will be returned when the dialog is dismissed). - -\membersection{wxFileDialog::SetStyle}\label{wxfiledialogsetstyle} - -\func{void}{SetStyle}{\param{long }{style}} - -Sets the dialog style. See \helpref{wxFileDialog::wxFileDialog}{wxfiledialogconstr} for details. - -\membersection{wxFileDialog::SetWildcard}\label{wxfiledialogsetwildcard} - -\func{void}{SetWildcard}{\param{const wxString\& }{wildCard}} - -Sets the wildcard, which in Windows can contain multiple file types. - -\membersection{wxFileDialog::ShowModal}\label{wxfiledialogshowmodal} - -\func{int}{ShowModal}{\void} - -Shows the dialog, returning wxID\_OK if the user pressed OK, and wxOK\_CANCEL -otherwise. - - diff --git a/docs/latex/wx/filehist.tex b/docs/latex/wx/filehist.tex deleted file mode 100644 index e136f1c6d8..0000000000 --- a/docs/latex/wx/filehist.tex +++ /dev/null @@ -1,93 +0,0 @@ -\section{\class{wxFileHistory}}\label{wxfilehistory} - -The wxFileHistory encapsulates a user interface convenience, the -list of most recently visited files as shown on a menu (usually the File menu). - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\overview{wxFileHistory overview}{wxfilehistoryoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxFileHistory::m\_fileHistory} - -\member{char**}{m\_fileHistory} - -A character array of strings corresponding to the most recently opened -files. - -\membersection{wxFileHistory::m\_fileHistoryN} - -\member{int}{m\_fileHistoryN} - -The number of files stored in the history array. - -\membersection{wxFileHistory::m\_fileMaxFiles} - -\member{int}{m\_fileMaxFiles} - -The maximum number of files to be stored and displayed on the menu. - -\membersection{wxFileHistory::m\_fileMenu} - -\member{wxMenu*}{m\_fileMenu} - -The file menu used to display the file history list (if enabled). - -\membersection{wxFileHistory::wxFileHistory} - -\func{}{wxFileHistory}{\param{int}{ maxFiles = 9}} - -Constructor. Pass the maximum number of files that should be stored and displayed. - -\membersection{wxFileHistory::\destruct{wxFileHistory}} - -\func{}{\destruct{wxFileHistory}}{\void} - -Destructor. - -\membersection{wxFileHistory::AddFileToHistory} - -\func{void}{AddFileToHistory}{\param{const wxString\& }{filename}} - -Adds a file to the file history list, if the object has a pointer to an appropriate file menu. - -\membersection{wxFileHistory::FileHistoryLoad} - -\func{void}{FileHistoryLoad}{\param{const wxString\& }{resourceFile}, \param{const wxString\& }{sectionName}} - -Loads the file history from a resource file, using the given section. This must be called -explicitly by the application. - -\membersection{wxFileHistory::FileHistorySave} - -\func{void}{FileHistorySave}{\param{const wxString\& }{resourceFile}, \param{const wxString\& }{sectionName}} - -Saves the file history into a resource file, using the given section. This must be called -explicitly by the application. - -\membersection{wxFileHistory::FileHistoryUseMenu} - -\func{void}{FileHistoryUseMenu}{\param{wxMenu* }{menu}} - -Use this menu for appending recently-visited document filenames, for convenient -access. Calling this function with a valid menu pointer enables the history -list functionality. - -\membersection{wxFileHistory::GetMaxFiles} - -\func{int}{GetMaxFiles}{\void} - -Returns the maximum number of files that can be stored. - -\membersection{wxFileHistory::GetNoHistoryFiles} - -\func{int}{GetNoHistoryFiles}{\void} - -Returns the number of files currently stored in the file history. - - diff --git a/docs/latex/wx/focusevt.tex b/docs/latex/wx/focusevt.tex deleted file mode 100644 index e47b55d138..0000000000 --- a/docs/latex/wx/focusevt.tex +++ /dev/null @@ -1,34 +0,0 @@ -\section{\class{wxFocusEvent}}\label{wxfocusevent} - -A focus event is sent when a window's focus changes. - -\wxheading{Derived from} - -\helpref{wxEvent}{wxevent}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Event table macros} - -To process a focus event, use these event handler macros to direct input to a member -function that takes a wxFocusEvent argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_SET\_FOCUS(func)}}{Process a wxEVT\_SET\_FOCUS event.} -\twocolitem{{\bf EVT\_KILL\_FOCUS(func)}}{Process a wxEVT\_KILL\_FOCUS event.} -\end{twocollist}% - -\wxheading{See also} - -\helpref{wxWindow::OnSetFocus}{wxwindowonsetfocus},\rtfsp -\helpref{wxWindow::OnKillFocus}{wxwindowonkillfocus},\rtfsp -\helpref{Event handling overview}{eventhandlingoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxFocusEvent::wxFocusEvent} - -\func{}{wxFocusEvent}{\param{WXTYPE }{eventType = 0}, \param{int }{id = 0}} - -Constructor. - diff --git a/docs/latex/wx/font.tex b/docs/latex/wx/font.tex deleted file mode 100644 index de553defbb..0000000000 --- a/docs/latex/wx/font.tex +++ /dev/null @@ -1,277 +0,0 @@ -\section{\class{wxFont}}\label{wxfont} - -A font is an object which determines the appearance of text. Fonts are -used for drawing text to a device context, and setting the appearance of -a window's text. - -\wxheading{Derived from} - -\helpref{wxGDIObject}{wxgdiobject}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxFont overview}{wxfontoverview}, \helpref{wxDC::SetFont}{wxdcsetfont},\rtfsp -\helpref{wxDC::DrawText}{wxdcdrawtext}, \helpref{wxDC::GetTextExtent}{wxdcgettextextent},\rtfsp -\helpref{wxFontDialog}{wxfontdialog} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxFont::wxFont}\label{wxfontconstr} - -\func{}{wxFont}{\void} - -Default constructor. - -\func{}{wxFont}{\param{int}{ pointSize}, \param{int}{ family}, \param{int}{ style}, \param{int}{ weight}, - \param{const bool}{ underline = FALSE}, \param{const wxString\& }{faceName = ""}} - -Creates a font object. - -\wxheading{Parameters} - -\docparam{pointSize}{Size in points.} - -\docparam{family}{Font family, a generic way of referring to fonts without specifying actual facename. One of: - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf wxDEFAULT}}{Chooses a default font.} -\twocolitem{{\bf wxDECORATIVE}}{A decorative font.} -\twocolitem{{\bf wxROMAN}}{A formal, serif font.} -\twocolitem{{\bf wxSCRIPT}}{A handwriting font.} -\twocolitem{{\bf wxSWISS}}{A sans-serif font.} -\twocolitem{{\bf wxMODERN}}{A fixed pitch font.} -\end{twocollist}} - -\docparam{style}{One of {\bf wxNORMAL}, {\bf wxSLANT} and {\bf wxITALIC}.} - -\docparam{weight}{One of {\bf wxNORMAL}, {\bf wxLIGHT} and {\bf wxBOLD}.} - -\docparam{underline}{The value can be TRUE or FALSE. At present this has an effect on Windows only.} - -\docparam{faceName}{An optional string specifying the actual typeface to be used. If the empty string, -a default typeface will chosen based on the family.} - -\wxheading{Remarks} - -If the desired font does not exist, the closest match will be chosen. -Under Windows, only scaleable TrueType fonts are used. - -Underlining only works under Windows at present. - -See also \helpref{wxDC::SetFont}{wxdcsetfont}, \helpref{wxDC::DrawText}{wxdcdrawtext} -and \helpref{wxDC::GetTextExtent}{wxdcgettextextent}. - -\membersection{wxFont::\destruct{wxFont}} - -\func{}{\destruct{wxFont}}{\void} - -Destructor. - -\wxheading{Remarks} - -The destructor may not delete the underlying font object of the native windowing -system, since wxBrush uses a reference counting system for efficiency. - -Although all remaining fonts are deleted when the application exits, -the application should try to clean up all fonts itself. This is because -wxWindows cannot know if a pointer to the font object is stored in an -application data structure, and there is a risk of double deletion. - -\membersection{wxFont::GetFaceName}\label{wxfontgetfacename} - -\constfunc{wxString}{GetFaceName}{\void} - -Returns the typeface name associated with the font, or the empty string if there is no -typeface information. - -\wxheading{See also} - -\helpref{wxFont::SetFaceName}{wxfontsetfacename} - -\membersection{wxFont::GetFamily}\label{wxfontgetfamily} - -\constfunc{int}{GetFamily}{\void} - -Gets the font family. See \helpref{wxFont::wxFont}{wxfontconstr} for a list of valid -family identifiers. - -\wxheading{See also} - -\helpref{wxFont::SetFamily}{wxfontsetfamily} - -\membersection{wxFont::GetFontId}\label{wxfontgetfontid} - -\constfunc{int}{GetFontId}{\void} - -Returns the font id, if the portable font system is in operation. See \helpref{Font overview}{wxfontoverview} for -further details. - -\membersection{wxFont::GetPointSize}\label{wxfontgetpointsize} - -\constfunc{int}{GetPointSize}{\void} - -Gets the point size. - -\wxheading{See also} - -\helpref{wxFont::SetPointSize}{wxfontsetpointsize} - -\membersection{wxFont::GetStyle}\label{wxfontgetstyle} - -\constfunc{int}{GetStyle}{\void} - -Gets the font style. See \helpref{wxFont::wxFont}{wxfontconstr} for a list of valid -styles. - -\wxheading{See also} - -\helpref{wxFont::SetStyle}{wxfontsetstyle} - -\membersection{wxFont::GetUnderlined}\label{wxfontgetunderlined} - -\constfunc{bool}{GetUnderlined}{\void} - -Returns TRUE if the font is underlined, FALSE otherwise. - -\wxheading{See also} - -\helpref{wxFont::SetUnderlined}{wxfontsetunderlined} - -\membersection{wxFont::GetWeight}\label{wxfontgetweight} - -\constfunc{int}{GetWeight}{\void} - -Gets the font weight. See \helpref{wxFont::wxFont}{wxfontconstr} for a list of valid -weight identifiers. - -\wxheading{See also} - -\helpref{wxFont::SetWeight}{wxfontsetweight} - -\membersection{wxFont::SetFaceName}\label{wxfontsetfacename} - -\func{void}{SetFaceName}{\param{const wxString\& }{faceName}} - -Sets the facename for the font. - -\wxheading{Parameters} - -\docparam{faceName}{A valid facename, which should be on the end-user's system.} - -\wxheading{Remarks} - -To avoid portability problems, don't rely on a specific face, but specify the font family -instead or as well. A suitable font will be found on the end-user's system. If both the -family and the facename are specified, wxWindows will first search for the specific face, -and then for a font belonging to the same family. - -\wxheading{See also} - -\helpref{wxFont::GetFaceName}{wxfontgetfacename}, \helpref{wxFont::SetFamily}{wxfontsetfamily} - -\membersection{wxFont::SetFamily}\label{wxfontsetfamily} - -\func{void}{SetFamily}{\param{int}{ family}} - -Sets the font family. - -\wxheading{Parameters} - -\docparam{family}{One of: - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf wxDEFAULT}}{Chooses a default font.} -\twocolitem{{\bf wxDECORATIVE}}{A decorative font.} -\twocolitem{{\bf wxROMAN}}{A formal, serif font.} -\twocolitem{{\bf wxSCRIPT}}{A handwriting font.} -\twocolitem{{\bf wxSWISS}}{A sans-serif font.} -\twocolitem{{\bf wxMODERN}}{A fixed pitch font.} -\end{twocollist}} - -\wxheading{See also} - -\helpref{wxFont::GetFamily}{wxfontgetfamily}, \helpref{wxFont::SetFaceName}{wxfontsetfacename} - -\membersection{wxFont::SetPointSize}\label{wxfontsetpointsize} - -\func{void}{SetPointSize}{\param{int}{ pointSize}} - -Sets the point size. - -\wxheading{Parameters} - -\docparam{pointSize}{Size in points.} - -\wxheading{See also} - -\helpref{wxFont::GetPointSize}{wxfontgetpointsize} - -\membersection{wxFont::SetStyle}\label{wxfontsetstyle} - -\func{void}{SetStyle}{\param{int}{ style}} - -Sets the font style. - -\wxheading{Parameters} - -\docparam{style}{One of {\bf wxNORMAL}, {\bf wxSLANT} and {\bf wxITALIC}.} - -\wxheading{See also} - -\helpref{wxFont::GetStyle}{wxfontgetstyle} - -\membersection{wxFont::SetUnderlined}\label{wxfontsetunderlined} - -\func{void}{SetUnderlined}{\param{const bool}{ underlined}} - -Sets underlining. - -\wxheading{Parameters} - -\docparam{underlining}{TRUE to underline, FALSE otherwise.} - -\wxheading{See also} - -\helpref{wxFont::GetUnderlined}{wxfontgetunderlined} - -\membersection{wxFont::SetWeight}\label{wxfontsetweight} - -\func{void}{SetWeight}{\param{int}{ weight}} - -Sets the font weight. - -\wxheading{Parameters} - -\docparam{weight}{One of {\bf wxNORMAL}, {\bf wxLIGHT} and {\bf wxBOLD}.} - -\wxheading{See also} - -\helpref{wxFont::GetWeight}{wxfontgetweight} - -\membersection{wxFont::operator $=$}\label{wxfontassignment} - -\func{wxFont\&}{operator $=$}{\param{const wxFont\& }{font}} - -Assignment operator, using reference counting. Returns a reference -to `this'. - -\membersection{wxFont::operator $==$}\label{wxfontequals} - -\func{bool}{operator $==$}{\param{const wxFont\& }{font}} - -Equality operator. Two fonts are equal if they contain pointers -to the same underlying font data. It does not compare each attribute, -so two indefontdently-created fonts using the same parameters will -fail the test. - -\membersection{wxFont::operator $!=$}\label{wxfontnotequals} - -\func{bool}{operator $!=$}{\param{const wxFont\& }{font}} - -Inequality operator. Two fonts are not equal if they contain pointers -to different underlying font data. It does not compare each attribute. - - diff --git a/docs/latex/wx/fontdlg.tex b/docs/latex/wx/fontdlg.tex deleted file mode 100644 index d88e5c6ee9..0000000000 --- a/docs/latex/wx/fontdlg.tex +++ /dev/null @@ -1,187 +0,0 @@ -\section{\class{wxFontData}}\label{wxfontdata} - -\overview{wxFontDialog overview}{wxfontdialogoverview} - -This class holds a variety of information related to font dialogs. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{Overview}{wxfontdialogoverview}, \helpref{wxFontDialog}{wxfontdialog} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxFontData::wxFontData} - -\func{}{wxFontData}{\void} - -Constructor. Initializes {\it fontColour} to black, {\it showHelp} to black, -\rtfsp{\it allowSymbols} to TRUE, {\it enableEffects} to TRUE, -\rtfsp{\it minSize} to 0 and {\it maxSize} to 0. - -\membersection{wxFontData::\destruct{wxFontData}} - -\func{}{\destruct{wxFontData}}{\void} - -Destructor. - -\membersection{wxFontData::EnableEffects} - -\func{void}{EnableEffects}{\param{bool}{ enable}} - -Enables or disables `effects' under MS Windows only. This refers to the -controls for manipulating colour, strikeout and underline properties. - -The default value is TRUE. - -\membersection{wxFontData::GetAllowSymbols} - -\func{bool}{GetAllowSymbols}{\void} - -Under MS Windows, returns a flag determining whether symbol fonts can be selected. Has no -effect on other platforms. - -The default value is TRUE. - -\membersection{wxFontData::GetColour} - -\func{wxColour\&}{GetColour}{\void} - -Gets the colour associated with the font dialog. - -The default value is black. - -\membersection{wxFontData::GetChosenFont} - -\func{wxFont}{GetChosenFont}{\void} - -Gets the font chosen by the user. If the user pressed OK (wxFontDialog::Show returned TRUE), this returns -a new font which is now `owned' by the application, and should be deleted -if not required. If the user pressed Cancel (wxFontDialog::Show returned FALSE) or -the colour dialog has not been invoked yet, this will return NULL. - -\membersection{wxFontData::GetEnableEffects} - -\func{bool}{GetEnableEffects}{\void} - -Determines whether `effects' are enabled under Windows. This refers to the -controls for manipulating colour, strikeout and underline properties. - -The default value is TRUE. - -\membersection{wxFontData::GetInitialFont} - -\func{wxFont}{GetInitialFont}{\void} - -Gets the font that will be initially used by the font dialog. This should have -previously been set by the application. - -\membersection{wxFontData::GetShowHelp} - -\func{bool}{GetShowHelp}{\void} - -Returns TRUE if the Help button will be shown (Windows only). - -The default value is FALSE. - -\membersection{wxFontData::SetAllowSymbols} - -\func{void}{SetAllowSymbols}{\param{bool}{ allowSymbols}} - -Under MS Windows, determines whether symbol fonts can be selected. Has no -effect on other platforms. - -The default value is TRUE. - -\membersection{wxFontData::SetChosenFont} - -\func{void}{SetChosenFont}{\param{const wxFont\& }{font}} - -Sets the font that will be returned to the user (for internal use only). - -\membersection{wxFontData::SetColour} - -\func{void}{SetColour}{\param{const wxColour\&}{ colour}} - -Sets the colour that will be used for the font foreground colour. - -The default colour is black. - -\membersection{wxFontData::SetInitialFont} - -\func{void}{SetInitialFont}{\param{const wxFont\&}{font}} - -Sets the font that will be initially used by the font dialog. - -\membersection{wxFontData::SetRange} - -\func{void}{SetRange}{\param{int}{ min}, \param{int}{ max}} - -Sets the valid range for the font point size (Windows only). - -The default is 0, 0 (unrestricted range). - -\membersection{wxFontData::SetShowHelp} - -\func{void}{SetShowHelp}{\param{bool}{ showHelp}} - -Determines whether the Help button will be displayed in the font dialog (Windows only). - -The default value is FALSE. - -\membersection{wxFontData::operator $=$} - -\func{void}{operator $=$}{\param{const wxFontData\&}{ data}} - -Assingment operator for the font data. - -\section{\class{wxFontDialog}}\label{wxfontdialog} - -This class represents the font chooser dialog. - -\wxheading{Derived from} - -\helpref{wxDialog}{wxdialog}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{Overview}{wxfontdialogoverview}, \helpref{wxFontData}{wxfontdata} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxFontDialog::wxFontDialog} - -\func{}{wxFontDialog}{\param{wxWindow* }{parent}, \param{wxFontData* }{data = NULL}} - -Constructor. Pass a parent window, and optionally a pointer to a block of font -data, which will be copied to the font dialog's font data. - -\membersection{wxFontDialog::\destruct{wxFontDialog}} - -\func{}{\destruct{wxFontDialog}}{\void} - -Destructor. - -\membersection{wxFontDialog::GetFontData} - -\func{wxFontData\&}{GetFontData}{\void} - -Returns the \helpref{font data}{wxfontdata} associated with the font dialog. - -\membersection{wxFontDialog::ShowModal} - -\func{int}{ShowModal}{\void} - -Shows the dialog, returning wxID\_OK if the user pressed Ok, and wxID\_CANCEL -otherwise. - -If the user cancels the dialog (ShowModal returns wxID\_CANCEL), no font will be -created. If the user presses OK (ShowModal returns wxID\_OK), a new wxFont will -be created and stored in the font dialog's wxFontData structure. - diff --git a/docs/latex/wx/fontlist.tex b/docs/latex/wx/fontlist.tex deleted file mode 100644 index b6ee9b108b..0000000000 --- a/docs/latex/wx/fontlist.tex +++ /dev/null @@ -1,48 +0,0 @@ -\section{\class{wxFontList}}\label{wxfontlist} - -A font list is a list containing all fonts which have been created. There -is only one instance of this class: {\bf wxTheFontList}. Use this object to search -for a previously created font of the desired type and create it if not already found. -In some windowing systems, the font may be a scarce resource, so it is best to -reuse old resources if possible. When an application finishes, all fonts will be -deleted and their resources freed, eliminating the possibility of `memory leaks'. - -\wxheading{Derived from} - -\helpref{wxList}{wxlist}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxFont}{wxfont} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxFontList::wxFontList} - -\func{}{wxFontList}{\void} - -Constructor. The application should not construct its own font list: -use the object pointer {\bf wxTheFontList}. - -\membersection{wxFontList::AddFont} - -\func{void}{AddFont}{\param{wxFont *}{font}} - -Used by wxWindows to add a font to the list, called in the font constructor. - -\membersection{wxFontList::FindOrCreateFont}\label{findorcreatefont} - -\func{wxFont *}{FindOrCreateFont}{\param{int}{ point\_size}, \param{int}{ family}, \param{int}{ style}, \param{int}{ weight}, \param{bool}{ underline = FALSE}, - \param{const wxString\& }{facename = NULL}} - -Finds a font of the given specification, or creates one and adds it to the list. See the \helpref{wxFont constructor}{wxfontconstr} for -details of the arguments. - -\membersection{wxFontList::RemoveFont} - -\func{void}{RemoveFont}{\param{wxFont *}{font}} - -Used by wxWindows to remove a font from the list. - - diff --git a/docs/latex/wx/forward.gif b/docs/latex/wx/forward.gif deleted file mode 100644 index 9c8421838a..0000000000 Binary files a/docs/latex/wx/forward.gif and /dev/null differ diff --git a/docs/latex/wx/frame.tex b/docs/latex/wx/frame.tex deleted file mode 100644 index 71f2df8904..0000000000 --- a/docs/latex/wx/frame.tex +++ /dev/null @@ -1,571 +0,0 @@ -\section{\class{wxFrame}}\label{wxframe} - -A frame is a window whose size and position can (usually) be changed by the user. It usually has -thick borders and a title bar, and can optionally contain a menu bar, toolbar and -status bar. A frame can contain any window that is not a frame or dialog. - -A frame that has a status bar and toolbar created via the CreateStatusBar/CreateToolBar functions -manages these windows, and adjusts the value returned by GetClientSize to reflect -the remaining size available to application windows. - -\wxheading{Derived from} - -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxICONIZE}}{Display the frame iconized (minimized) (Windows only).} -\twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the frame.} -\twocolitem{\windowstyle{wxDEFAULT\_FRAME\_STYLE}}{Defined as {\bf wxMINIMIZE\_BOX \pipe wxMAXIMIZE\_BOX \pipe wxTHICK\_FRAME \pipe wxSYSTEM\_MENU \pipe wxCAPTION}.} -\twocolitem{\windowstyle{wxMINIMIZE}}{Identical to {\bf wxICONIZE}.} -\twocolitem{\windowstyle{wxMINIMIZE\_BOX}}{Displays a minimize box on the frame (Windows and Motif only).} -\twocolitem{\windowstyle{wxMAXIMIZE}}{Displays the frame maximized (Windows only).} -\twocolitem{\windowstyle{wxMAXIMIZE\_BOX}}{Displays a maximize box on the frame (Windows and Motif only).} -\twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{Stay on top of other windows (Windows only).} -\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Displays a system menu (Windows and Motif only).} -\twocolitem{\windowstyle{wxTHICK\_FRAME}}{Displays a thick frame around the window (Windows and Motif only).} -\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Displays a resizeable border around the window (Motif only).} -\end{twocollist} - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Remarks} - -An application should normally define an \helpref{OnCloseWindow}{wxwindowonclosewindow} handler for the -frame to respond to system close events, for example so that related data and subwindows can be cleaned up. - -\wxheading{See also} - -\helpref{wxMDIParentFrame}{wxmdiparentframe}, \helpref{wxMDIChildFrame}{wxmdichildframe},\rtfsp -\helpref{wxMiniFrame}{wxminiframe}, \helpref{wxDialog}{wxdialog} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxFrame::wxFrame}\label{wxframeconstr} - -\func{}{wxFrame}{\void} - -Default constructor. - -\func{}{wxFrame}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp -\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp -\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE},\rtfsp -\param{const wxString\& }{name = ``frame"}} - -Constructor, creating the window. - -\wxheading{Parameters} - -\docparam{parent}{The window parent. This may be NULL. If it is non-NULL, the frame will -always be displayed on top of the parent window on Windows.} - -\docparam{id}{The window identifier. It may take a value of -1 to indicate a default value.} - -\docparam{title}{The caption to be displayed on the frame's title bar.} - -\docparam{pos}{The window position. A value of (-1, -1) indicates a default position, chosen by -either the windowing system or wxWindows, depending on platform.} - -\docparam{size}{The window size. A value of (-1, -1) indicates a default size, chosen by -either the windowing system or wxWindows, depending on platform.} - -\docparam{style}{The window style. See \helpref{wxFrame}{wxframe}.} - -\docparam{name}{The name of the window. This parameter is used to associate a name with the item, -allowing the application user to set Motif resource values for -individual windows.} - -\wxheading{Remarks} - -For Motif, MWM (the Motif Window Manager) should be running for any window styles to work -(otherwise all styles take effect). - -\wxheading{See also} - -\helpref{wxFrame::Create}{wxframecreate} - -\membersection{wxFrame::\destruct{wxFrame}} - -\func{void}{\destruct{wxFrame}}{\void} - -Destructor. Destroys all child windows and menu bar if present. - -\membersection{wxFrame::Centre}\label{wxframecentre} - -\func{void}{Centre}{\param{int}{ direction = wxBOTH}} - -Centres the frame on the display. - -\wxheading{Parameters} - -\docparam{direction}{The parameter may be {\tt wxHORIZONTAL}, {\tt wxVERTICAL} or {\tt wxBOTH}.} - -\membersection{wxFrame::Command}\label{wxframecommand} - -\func{void}{Command}{\param{int }{id}} - -Simulate a menu command. - -\wxheading{Parameters} - -\docparam{id}{The identifier for a menu item.} - -\membersection{wxFrame::Create}\label{wxframecreate} - -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp -\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp -\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE},\rtfsp -\param{const wxString\& }{name = ``frame"}} - -Used in two-step frame construction. See \helpref{wxFrame::wxFrame}{wxframeconstr}\rtfsp -for further details. - -\membersection{wxFrame::CreateStatusBar}\label{wxframecreatestatusbar} - -\func{virtual wxStatusBar*}{CreateStatusBar}{\param{int}{ number = 1}, - \param{long}{ style = 0}, - \param{wxWindowID}{ id = -1}, \param{const wxString\&}{ name = "statusBar"}} - -Creates a status bar at the bottom of the frame. - -\wxheading{Parameters} - -\docparam{number}{The number of fields to create. Specify a -value greater than 1 to create a multi-field status bar.} - -\docparam{style}{The status bar style. See \helpref{wxStatusBar}{wxstatusbar} for a list -of valid styles.} - -\docparam{id}{The status bar window identifier. If -1, an identifier will be chosen by -wxWindows.} - -\docparam{name}{The status bar window name.} - -\wxheading{Return value} - -A pointer to the the status bar if it was created successfully, NULL otherwise. - -\wxheading{Remarks} - -The width of the status bar is the whole width of the frame (adjusted automatically when -resizing), and the height and text size are chosen by the host windowing system. - -By default, the status bar is an instance of wxStatusBar. To use a different class, -override \helpref{wxFrame::OnCreateStatusBar}{wxframeoncreatestatusbar}. - -Note that you can put controls and other windows on the status bar if you wish. - -\wxheading{See also} - -\helpref{wxFrame::SetStatusText}{wxframesetstatustext},\rtfsp -\helpref{wxFrame::OnCreateStatusBar}{wxframeoncreatestatusbar},\rtfsp -\helpref{wxFrame::GetStatusBar}{wxframegetstatusbar} - -\membersection{wxFrame::CreateToolBar}\label{wxframecreatetoolbar} - -\func{virtual wxToolBar*}{CreateToolBar}{\param{long}{ style = wxNO\_BORDER \pipe wxTB\_HORIZONTAL}, - \param{wxWindowID}{ id = -1}, \param{const wxString\&}{ name = "toolBar"}} - -Creates a toolbar at the top or left of the frame. - -\wxheading{Parameters} - -\docparam{style}{The toolbar style. See \helpref{wxToolBar}{wxtoolbar} for a list -of valid styles.} - -\docparam{id}{The toolbar window identifier. If -1, an identifier will be chosen by -wxWindows.} - -\docparam{name}{The toolbar window name.} - -\wxheading{Return value} - -A pointer to the the toolbar if it was created successfully, NULL otherwise. - -\wxheading{Remarks} - -By default, the toolbar is an instance of wxToolBar (which is defined to be -a suitable toolbar class on each platform, such as wxToolBar95). To use a different class, -override \helpref{wxFrame::OnCreateToolBar}{wxframeoncreatetoolbar}. - -When a toolbar has been created with this function, or made known to the frame -with \helpref{wxFrame::SetToolBar}{wxframesettoolbar}, the frame will manage the toolbar -position and adjust the return value from \helpref{wxWindow::GetClientSize}{wxwindowgetclientsize} to -reflect the available space for application windows. - -\wxheading{See also} - -\helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar},\rtfsp -\helpref{wxFrame::OnCreateToolBar}{wxframeoncreatetoolbar},\rtfsp -\helpref{wxFrame::SetToolBar}{wxframesettoolbar},\rtfsp -\helpref{wxFrame::GetToolBar}{wxframegettoolbar} - -\membersection{wxFrame::GetMenuBar}\label{wxframegetmenubar} - -\constfunc{wxMenuBar*}{GetMenuBar}{\void} - -Returns a pointer to the menubar currently associated with the frame (if any). - -\wxheading{See also} - -\helpref{wxFrame::SetMenuBar}{wxframesetmenubar}, \helpref{wxMenuBar}{wxmenubar}, \helpref{wxMenu}{wxmenu} - -\membersection{wxFrame::GetStatusBar}\label{wxframegetstatusbar} - -\func{wxStatusBar*}{GetStatusBar}{\void} - -Returns a pointer to the status bar currently associated with the frame (if any). - -\wxheading{See also} - -\helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}, \helpref{wxStatusBar}{wxstatusbar} - -\membersection{wxFrame::GetTitle}\label{wxframegettitle} - -\func{wxString\&}{GetTitle}{\void} - -Gets a temporary pointer to the frame title. See -\helpref{wxFrame::SetTitle}{wxframesettitle}. - -\membersection{wxFrame::GetToolBar}\label{wxframegettoolbar} - -\func{wxToolBar*}{GetToolBar}{\void} - -Returns a pointer to the toolbar currently associated with the frame (if any). - -\wxheading{See also} - -\helpref{wxFrame::CreateToolBar}{wxframecreatetoolbar}, \helpref{wxToolBar}{wxtoolbar},\rtfsp -\helpref{wxFrame::SetToolBar}{wxframesettoolbar} - -\membersection{wxFrame::Iconize}\label{wxframeiconize} - -\func{void}{Iconize}{\param{const bool}{ iconize}} - -Iconizes or restores the frame. - -\wxheading{Parameters} - -\docparam{izonize}{If TRUE, iconizes the frame; if FALSE, shows and restores it.} - -\wxheading{See also} - -\helpref{wxFrame::IsIconized}{wxframeisiconized}, \helpref{wxFrame::Maximize}{wxframemaximize}. - -\membersection{wxFrame::IsIconized}\label{wxframeisiconized} - -\func{bool}{IsIconized}{\void} - -Returns TRUE if the frame is iconized. - -\membersection{wxFrame::LoadAccelerators}\label{wxframeloadaccelerators} - -\func{void}{LoadAccelerators}{\param{const wxString\& }{table}} - -Loads a keyboard accelerator table for this frame. - -\wxheading{Parameters} - -\docparam{table}{Accelerator table to load.} - -\wxheading{Return value} - -TRUE if the operation was successful, FALSE otherwise. - -\wxheading{Remarks} - -Accelerator tables map keystrokes onto control and menu identifiers, so the -programmer does not have to explicitly program this correspondence. - -See the hello demo ({\tt hello.cpp} and {\tt hello.rc}) for -an example of accelerator usage. This is a fragment from {\tt hello.rc}: - -\begin{verbatim} -#define HELLO_LOAD_FILE 111 - -menus_accel ACCELERATORS -{ - -"^L", HELLO_LOAD_FILE - -} -\end{verbatim} - -This function only works under Windows. - -% huh? If you call LoadAccelerators, you need to override wxFrame::OnActivate to do nothing. - -\membersection{wxFrame::Maximize}\label{wxframemaximize} - -\func{void}{Maximize}{\param{const bool }{maximize}} - -Maximizes or restores the frame. - -\wxheading{Parameters} - -\docparam{maximize}{If TRUE, maximizes the frame, otherwise it restores it}. - -\wxheading{Remarks} - -This function only works under Windows. - -\wxheading{See also} - -\helpref{wxFrame::Iconize}{wxframeiconize} - -\membersection{wxFrame::OnActivate} - -\func{void}{OnActivate}{\param{bool}{ active}} - -Called when a window is activated or deactivated (MS Windows -only). If the window is being activated, {\it active} is TRUE, else it -is FALSE. - -If you call wxFrame::LoadAccelerators, you need to override this function e.g. - -\begin{verbatim} - void OnActivate(bool) {}; -\end{verbatim} - -\membersection{wxFrame::OnCreateStatusBar}\label{wxframeoncreatestatusbar} - -\func{virtual wxStatusBar*}{OnCreateStatusBar}{\param{int }{number} - \param{long}{ style}, - \param{wxWindowID}{ id}, \param{const wxString\&}{ name}} - -Virtual function called when a status bar is requested by \helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}. - -\wxheading{Parameters} - -\docparam{number}{The number of fields to create.} - -\docparam{style}{The window style. See \helpref{wxStatusBar}{wxstatusbar} for a list -of valid styles.} - -\docparam{id}{The window identifier. If -1, an identifier will be chosen by -wxWindows.} - -\docparam{name}{The window name.} - -\wxheading{Return value} - -A status bar object. - -\wxheading{Remarks} - -An application can override this function to return a different kind of status bar. The default -implementation returns an instance of \helpref{wxStatusBar}{wxstatusbar}. - -\wxheading{See also} - -\helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}, \helpref{wxStatusBar}{wxstatusbar}. - -\membersection{wxFrame::OnCreateToolBar}\label{wxframeoncreatetoolbar} - -\func{virtual wxToolBar*}{OnCreateToolBar}{\param{long}{ style}, - \param{wxWindowID}{ id}, \param{const wxString\&}{ name}} - -Virtual function called when a toolbar is requested by \helpref{wxFrame::CreateToolBar}{wxframecreatetoolbar}. - -\wxheading{Parameters} - -\docparam{style}{The toolbar style. See \helpref{wxToolBar}{wxtoolbar} for a list -of valid styles.} - -\docparam{id}{The toolbar window identifier. If -1, an identifier will be chosen by -wxWindows.} - -\docparam{name}{The toolbar window name.} - -\wxheading{Return value} - -A toolbar object. - -\wxheading{Remarks} - -An application can override this function to return a different kind of toolbar. The default -implementation returns an instance of \helpref{wxToolBar}{wxtoolbar}. - -\wxheading{See also} - -\helpref{wxFrame::CreateToolBar}{wxframecreatetoolbar}, \helpref{wxToolBar}{wxtoolbar}. - -\membersection{wxFrame::OnMenuCommand}\label{wxframeonmenucommand} - -\func{void}{OnMenuCommand}{\param{wxCommandEvent\&}{ event}} - -See \helpref{wxWindow::OnMenuCommand}{wxwindowonmenucommand}. - -\membersection{wxFrame::OnMenuHighlight}\label{wxframeonmenuhighlight} - -\func{void}{OnMenuHighlight}{\param{wxMenuEvent\&}{ event}} - -See \helpref{wxWindow::OnMenuHighlight}{wxwindowonmenuhighlight}. - -\membersection{wxFrame::OnSize}\label{wxframeonsize} - -\func{void}{OnSize}{\param{wxSizeEvent\& }{event}} - -See \helpref{wxWindow::OnSize}{wxwindowonsize}. - -The default {\bf wxFrame::OnSize} implementation looks for a single subwindow, -and if one is found, resizes it to fit -inside the frame. Override this member if more complex behaviour -is required (for example, if there are several subwindows). - -\membersection{wxFrame::SetIcon}\label{wxframeseticon} - -\func{void}{SetIcon}{\param{const wxIcon\& }{icon}} - -Sets the icon for this frame. - -\wxheading{Parameters} - -\docparam{icon}{The icon to associate with this frame.} - -\wxheading{Remarks} - -The frame takes a `copy' of {\it icon}, but since it uses reference -counting, the copy is very quick. It is safe to delete {\it icon} after -calling this function. - -Under Windows, instead of using {\bf SetIcon}, you can add the -following lines to your MS Windows resource file: - -\begin{verbatim} -wxSTD_MDIPARENTFRAME ICON icon1.ico -wxSTD_MDICHILDFRAME ICON icon2.ico -wxSTD_FRAME ICON icon3.ico -\end{verbatim} - -where icon1.ico will be used for the MDI parent frame, icon2.ico -will be used for MDI child frames, and icon3.ico will be used for -non-MDI frames. - -If these icons are not supplied, and {\bf SetIcon} is not called either, -then the following defaults apply if you have included wx.rc. - -\begin{verbatim} -wxDEFAULT_FRAME ICON std.ico -wxDEFAULT_MDIPARENTFRAME ICON mdi.ico -wxDEFAULT_MDICHILDFRAME ICON child.ico -\end{verbatim} - -You can replace std.ico, mdi.ico and child.ico with your own defaults -for all your wxWindows application. Currently they show the same icon. - -{\it Note:} a wxWindows application linked with subsystem equal to 4.0 -(i.e. marked as a Windows 95 application) doesn't respond properly -to wxFrame::SetIcon. To work around this until a solution is found, -mark your program as a 3.5 application. This will also ensure -that Windows provides small icons for the application automatically. - -See also \helpref{wxIcon}{wxicon}. - -\membersection{wxFrame::SetMenuBar}\label{wxframesetmenubar} - -\func{void}{SetMenuBar}{\param{wxMenuBar* }{menuBar}} - -Tells the frame to show the given menu bar. - -\wxheading{Parameters} - -\docparam{menuBar}{The menu bar to associate with the frame.} - -\wxheading{Remarks} - -If the frame is destroyed, the -menu bar and its menus will be destroyed also, so do not delete the menu -bar explicitly (except by resetting the frame's menu bar to another -frame or NULL). - -Under Windows, a call to \helpref{wxFrame::OnSize}{wxframeonsize} is generated, so be sure to initialize -data members properly before calling {\bf SetMenuBar}. - -Note that it is not possible to call this function twice for the same frame object. - -\wxheading{See also} - -\helpref{wxFrame::GetMenuBar}{wxframegetmenubar}, \helpref{wxMenuBar}{wxmenubar}, \helpref{wxMenu}{wxmenu}. - -\membersection{wxFrame::SetStatusBar}\label{wxframesetstatusbar} - -\func{void}{SetStatusBar}{\param{wxStatusBar*}{ statusBar}} - -Associates a status bar with the frame. - -\wxheading{See also} - -\helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}, \helpref{wxStatusBar}{wxstatusbar},\rtfsp -\helpref{wxFrame::GetStatusBar}{wxframegetstatusbar} - -\membersection{wxFrame::SetStatusText}\label{wxframesetstatustext} - -\func{virtual void}{SetStatusText}{\param{const wxString\& }{ text}, \param{int}{ number = 0}} - -Sets the status bar text and redraws the status bar. - -\wxheading{Parameters} - -\docparam{text}{The text for the status field.} - -\docparam{number}{The status field (starting from zero).} - -\wxheading{Remarks} - -Use an empty string to clear the status bar. - -\wxheading{See also} - -\helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}, \helpref{wxStatusBar}{wxstatusbar} - -\membersection{wxFrame::SetStatusWidths}\label{wxframesetstatuswidths} - -\func{virtual void}{SetStatusWidths}{\param{int}{ n}, \param{int *}{widths}} - -Sets the widths of the fields in the status bar. - -\wxheading{Parameters} - -\wxheading{n}{The number of fields in the status bar. It must be the -same used in \helpref{CreateStatusBar}{wxframecreatestatusbar}.} - -\docparam{widths}{Must contain an array of {\it n} integers, each of which is a status field width -in pixels. A value of -1 indicates that the field is variable width; at least one -field must be -1. You should delete this array after calling {\bf SetStatusWidths}.} - -\wxheading{Remarks} - -The widths of the variable fields are calculated from the total width of all fields, -minus the sum of widths of the non-variable fields, divided by the number of -variable fields. - -\membersection{wxFrame::SetToolBar}\label{wxframesettoolbar} - -\func{void}{SetToolBar}{\param{wxToolBar*}{ toolBar}} - -Associates a toolbar with the frame. - -\wxheading{See also} - -\helpref{wxFrame::CreateToolBar}{wxframecreatetoolbar}, \helpref{wxToolBar}{wxtoolbar},\rtfsp -\helpref{wxFrame::GetToolBar}{wxframegettoolbar} - -\membersection{wxFrame::SetTitle}\label{wxframesettitle} - -\func{virtual void}{SetTitle}{\param{const wxString\& }{ title}} - -Sets the frame title. - -\wxheading{Parameters} - -\docparam{title}{The frame title.} - -\wxheading{See also} - -\helpref{wxFrame::GetTitle}{wxframegettitle} - diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex deleted file mode 100644 index 15c982dbe2..0000000000 --- a/docs/latex/wx/function.tex +++ /dev/null @@ -1,1562 +0,0 @@ -\chapter{Functions}\label{functions} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage} - -The functions defined in wxWindows are described here. - -\section{File functions}\label{filefunctions} - -See also \helpref{wxPathList}{wxpathlist}. - -\membersection{::wxDirExists} - -\func{bool}{wxDirExists}{\param{const wxString\& }{dirname}} - -Returns TRUE if the directory exists. - -\membersection{::wxDos2UnixFilename} - -\func{void}{Dos2UnixFilename}{\param{const wxString\& }{s}} - -Converts a DOS to a UNIX filename by replacing backslashes with forward -slashes. - -\membersection{::wxFileExists} - -\func{bool}{wxFileExists}{\param{const wxString\& }{filename}} - -Returns TRUE if the file exists. - -\membersection{::wxFileNameFromPath} - -\func{wxString}{wxFileNameFromPath}{\param{const wxString\& }{path}} - -Returns a temporary pointer to the filename for a full path. -Copy this pointer for long-term use. - -\membersection{::wxFindFirstFile}\label{wxfindfirstfile} - -\func{wxString}{wxFindFirstFile}{\param{const wxString\& }{spec}, \param{int}{ flags = 0}} - -This function does directory searching; returns the first file -that matches the path {\it spec}, or NULL. Use \helpref{wxFindNextFile}{wxfindnextfile} to -get the next matching file. - -{\it spec} may contain wildcards. - -{\it flags} is reserved for future use. - -The returned filename is a pointer to static memory so should -not be freed. - -For example: - -\begin{verbatim} - wxString f = wxFindFirstFile("/home/project/*.*"); - while (f) - { - ... - f = wxFindNextFile(); - } -\end{verbatim} - -\membersection{::wxFindNextFile}\label{wxfindnextfile} - -\func{wxString}{wxFindFirstFile}{\void} - -Returns the next file that matches the path passed to \helpref{wxFindFirstFile}{wxfindfirstfile}. - -\membersection{::wxIsAbsolutePath} - -\func{bool}{wxIsAbsolutePath}{\param{const wxString\& }{filename}} - -Returns TRUE if the argument is an absolute filename, i.e. with a slash -or drive name at the beginning. - -\membersection{::wxPathOnly} - -\func{wxString}{wxPathOnly}{\param{const wxString\& }{path}} - -Returns a temporary pointer to the directory part of the filename. Copy this -pointer for long-term use. - -\membersection{::wxUnix2DosFilename} - -\func{void}{wxUnix2DosFilename}{\param{const wxString\& }{s}} - -Converts a UNIX to a DOS filename by replacing forward -slashes with backslashes. - -\membersection{::wxConcatFiles} - -\func{bool}{wxConcatFiles}{\param{const wxString\& }{file1}, \param{const wxString\& }{file2}, -\param{const wxString\& }{file3}} - -Concatenates {\it file1} and {\it file2} to {\it file3}, returning -TRUE if successful. - -\membersection{::wxCopyFile} - -\func{bool}{wxCopyFile}{\param{const wxString\& }{file1}, \param{const wxString\& }{file2}} - -Copies {\it file1} to {\it file2}, returning TRUE if successful. - -\membersection{::wxGetHostName}\label{wxgethostname} - -\func{bool}{wxGetHostName}{\param{const wxString\& }{buf}, \param{int }{sz}} - -Copies the current host machine's name into the supplied buffer. - -Under Windows or NT, this function first looks in the environment -variable SYSTEM\_NAME; if this is not found, the entry {\bf HostName}\rtfsp -in the {\bf wxWindows} section of the WIN.INI file is tried. - -Returns TRUE if successful, FALSE otherwise. - -\membersection{::wxGetEmailAddress}\label{wxgetemailaddress} - -\func{bool}{wxGetEmailAddress}{\param{const wxString\& }{buf}, \param{int }{sz}} - -Copies the user's email address into the supplied buffer, by -concatenating the values returned by \helpref{wxGetHostName}{wxgethostname}\rtfsp -and \helpref{wxGetUserId}{wxgetuserid}. - -Returns TRUE if successful, FALSE otherwise. - -\membersection{::wxGetUserId}\label{wxgetuserid} - -\func{bool}{wxGetUserId}{\param{const wxString\& }{buf}, \param{int }{sz}} - -Copies the current user id into the supplied buffer. - -Under Windows or NT, this function first looks in the environment -variables USER and LOGNAME; if neither of these is found, the entry {\bf UserId}\rtfsp -in the {\bf wxWindows} section of the WIN.INI file is tried. - -Returns TRUE if successful, FALSE otherwise. - -\membersection{::wxGetUserName}\label{wxgetusername} - -\func{bool}{wxGetUserName}{\param{const wxString\& }{buf}, \param{int }{sz}} - -Copies the current user name into the supplied buffer. - -Under Windows or NT, this function looks for the entry {\bf UserName}\rtfsp -in the {\bf wxWindows} section of the WIN.INI file. If PenWindows -is running, the entry {\bf Current} in the section {\bf User} of -the PENWIN.INI file is used. - -Returns TRUE if successful, FALSE otherwise. - -\membersection{::wxGetWorkingDirectory} - -\func{wxString}{wxGetWorkingDirectory}{\param{const wxString\& }{buf=NULL}, \param{int }{sz=1000}} - -Copies the current working directory into the buffer if supplied, or -copies the working directory into new storage (which you must delete yourself) -if the buffer is NULL. - -{\it sz} is the size of the buffer if supplied. - -\membersection{::wxGetTempFileName} - -\func{wxString}{wxGetTempFileName}{\param{const wxString\& }{prefix}, \param{const wxString\& }{buf=NULL}} - -Makes a temporary filename based on {\it prefix}, opens and closes the file, -and places the name in {\it buf}. If {\it buf} is NULL, new store -is allocated for the temporary filename using {\it new}. - -Under Windows, the filename will include the drive and name of the -directory allocated for temporary files (usually the contents of the -TEMP variable). Under UNIX, the {\tt /tmp} directory is used. - -It is the application's responsibility to create and delete the file. - -\membersection{::wxIsWild}\label{wxiswild} - -\func{bool}{wxIsWild}{\param{const wxString\& }{pattern}} - -Returns TRUE if the pattern contains wildcards. See \helpref{wxMatchWild}{wxmatchwild}. - -\membersection{::wxMatchWild}\label{wxmatchwild} - -\func{bool}{wxMatchWild}{\param{const wxString\& }{pattern}, \param{const wxString\& }{text}, \param{bool}{ dot\_special}} - -Returns TRUE if the {\it pattern}\/ matches the {\it text}\/; if {\it -dot\_special}\/ is TRUE, filenames beginning with a dot are not matched -with wildcard characters. See \helpref{wxIsWild}{wxiswild}. - -\membersection{::wxMkdir} - -\func{bool}{wxMkdir}{\param{const wxString\& }{dir}} - -Makes the directory {\it dir}, returning TRUE if successful. - -\membersection{::wxRemoveFile} - -\func{bool}{wxRemoveFile}{\param{const wxString\& }{file}} - -Removes {\it file}, returning TRUE if successful. - -\membersection{::wxRenameFile} - -\func{bool}{wxRenameFile}{\param{const wxString\& }{file1}, \param{const wxString\& }{file2}} - -Renames {\it file1} to {\it file2}, returning TRUE if successful. - -\membersection{::wxRmdir} - -\func{bool}{wxRmdir}{\param{const wxString\& }{dir}, \param{int}{ flags=0}} - -Removes the directory {\it dir}, returning TRUE if successful. Does not work under VMS. - -The {\it flags} parameter is reserved for future use. - -\membersection{::wxSetWorkingDirectory} - -\func{bool}{wxSetWorkingDirectory}{\param{const wxString\& }{dir}} - -Sets the current working directory, returning TRUE if the operation succeeded. -Under MS Windows, the current drive is also changed if {\it dir} contains a drive specification. - -\section{String functions} - -\membersection{::copystring} - -\func{char*}{copystring}{\param{const char* }{s}} - -Makes a copy of the string {\it s} using the C++ new operator, so it can be -deleted with the {\it delete} operator. - -\membersection{::wxStringMatch} - -\func{bool}{wxStringMatch}{\param{const wxString\& }{s1}, \param{const wxString\& }{s2},\\ - \param{bool}{ subString = TRUE}, \param{bool}{ exact = FALSE}} - -Returns TRUE if the substring {\it s1} is found within {\it s2}, -ignoring case if {\it exact} is FALSE. If {\it subString} is FALSE, -no substring matching is done. - -\membersection{::wxStringEq}\label{wxstringeq} - -\func{bool}{wxStringEq}{\param{const wxString\& }{s1}, \param{const wxString\& }{s2}} - -A macro defined as: - -\begin{verbatim} -#define wxStringEq(s1, s2) (s1 && s2 && (strcmp(s1, s2) == 0)) -\end{verbatim} - -\membersection{::wxTransferFileToStream}\label{wxtransferfiletostream} - -\func{bool}{wxTransferFileToStream}{\param{const wxString\& }{filename}, \param{ostream\& }{stream}} - -Copies the given file to {\it stream}. Useful when converting an old application to -use streams (within the document/view framework, for example). - -Use of this function requires the file wx\_doc.h to be included. - -\membersection{::wxTransferStreamToFile}\label{wxtransferstreamtofile} - -\func{bool}{wxTransferStreamToFile}{\param{istream\& }{stream} \param{const wxString\& }{filename}} - -Copies the given stream to the file {\it filename}. Useful when converting an old application to -use streams (within the document/view framework, for example). - -Use of this function requires the file wx\_doc.h to be included. - -\section{Dialog functions}\label{dialogfunctions} - -Below are a number of convenience functions for getting input from the -user or displaying messages. Note that in these functions the last three -parameters are optional. However, it is recommended to pass a parent frame -parameter, or (in MS Windows or Motif) the wrong window frame may be brought to -the front when the dialog box is popped up. - -\membersection{::wxFileSelector}\label{wxfileselector} - -\func{wxString}{wxFileSelector}{\param{const wxString\& }{message}, \param{const wxString\& }{default\_path = NULL},\\ - \param{const wxString\& }{default\_filename = NULL}, \param{const wxString\& }{default\_extension = NULL},\\ - \param{const wxString\& }{wildcard = ``*.*''}, \param{int }{flags = 0}, \param{wxWindow *}{parent = NULL},\\ - \param{int}{ x = -1}, \param{int}{ y = -1}} - -Pops up a file selector box. In Windows, this is the common file selector -dialog. In X, this is a file selector box with somewhat less functionality. -The path and filename are distinct elements of a full file pathname. -If path is NULL, the current directory will be used. If filename is NULL, -no default filename will be supplied. The wildcard determines what files -are displayed in the file selector, and file extension supplies a type -extension for the required filename. Flags may be a combination of wxOPEN, -wxSAVE, wxOVERWRITE\_PROMPT, wxHIDE\_READONLY, or 0. They are only significant -at present in Windows. - -Both the X and Windows versions implement a wildcard filter. Typing a -filename containing wildcards (*, ?) in the filename text item, and -clicking on Ok, will result in only those files matching the pattern being -displayed. In the X version, supplying no default name will result in the -wildcard filter being inserted in the filename text item; the filter is -ignored if a default name is supplied. - -Under Windows (only), the wildcard may be a specification for multiple -types of file with a description for each, such as: - -\begin{verbatim} - "BMP files (*.bmp) | *.bmp | GIF files (*.gif) | *.gif" -\end{verbatim} - -The application must check for a NULL return value (the user pressed -Cancel). For example: - -\begin{verbatim} -const wxString\& s = wxFileSelector("Choose a file to open"); -if (s) -{ - ... -} -\end{verbatim} - -Remember that the returned pointer is temporary and should be copied -if other wxWindows calls will be made before the value is to be used. - -\membersection{::wxGetTextFromUser}\label{wxgettextfromuser} - -\func{wxString}{wxGetTextFromUser}{\param{const wxString\& }{message}, \param{const wxString\& }{caption = ``Input text"},\\ - \param{const wxString\& }{default\_value = ``"}, \param{wxWindow *}{parent = NULL},\\ - \param{int}{ x = -1}, \param{int}{ y = -1}, \param{bool}{ centre = TRUE}} - -Pop up a dialog box with title set to {\it caption}, message {\it message}, and a -\rtfsp{\it default\_value}. The user may type in text and press OK to return this text, -or press Cancel to return NULL. - -If {\it centre} is TRUE, the message text (which may include new line characters) -is centred; if FALSE, the message is left-justified. - -\membersection{::wxGetMultipleChoice}\label{wxgetmultiplechoice} - -\func{int}{wxGetMultipleChoice}{\param{const wxString\& }{message}, \param{const wxString\& }{caption}, \param{int}{ n}, \param{const wxString\& }{choices[]},\\ - \param{int }{nsel}, \param{int *}{selection}, - \param{wxWindow *}{parent = NULL}, \param{int}{ x = -1}, \param{int}{ y = -1},\\ - \param{bool}{ centre = TRUE}, \param{int }{width=150}, \param{int }{height=200}} - -Pops up a dialog box containing a message, OK/Cancel buttons and a multiple-selection -listbox. The user may choose one or more item(s) and press OK or Cancel. - -The number of initially selected choices, and array of the selected indices, -are passed in; this array will contain the user selections on exit, with -the function returning the number of selections. {\it selection} must be -as big as the number of choices, in case all are selected. - -If Cancel is pressed, -1 is returned. - -{\it choices} is an array of {\it n} strings for the listbox. - -If {\it centre} is TRUE, the message text (which may include new line characters) -is centred; if FALSE, the message is left-justified. - -\membersection{::wxGetSingleChoice}\label{wxgetsinglechoice} - -\func{wxString}{wxGetSingleChoice}{\param{const wxString\& }{message}, \param{const wxString\& }{caption}, \param{int}{ n}, \param{const wxString\& }{choices[]},\\ - \param{wxWindow *}{parent = NULL}, \param{int}{ x = -1}, \param{int}{ y = -1},\\ - \param{bool}{ centre = TRUE}, \param{int }{width=150}, \param{int }{height=200}} - -Pops up a dialog box containing a message, OK/Cancel buttons and a single-selection -listbox. The user may choose an item and press OK to return a string or -Cancel to return NULL. - -{\it choices} is an array of {\it n} strings for the listbox. - -If {\it centre} is TRUE, the message text (which may include new line characters) -is centred; if FALSE, the message is left-justified. - -\membersection{::wxGetSingleChoiceIndex}\label{wxgetsinglechoiceindex} - -\func{int}{wxGetSingleChoiceIndex}{\param{const wxString\& }{message}, \param{const wxString\& }{caption}, \param{int}{ n}, \param{const wxString\& }{choices[]},\\ - \param{wxWindow *}{parent = NULL}, \param{int}{ x = -1}, \param{int}{ y = -1},\\ - \param{bool}{ centre = TRUE}, \param{int }{width=150}, \param{int }{height=200}} - -As {\bf wxGetSingleChoice} but returns the index representing the selected string. -If the user pressed cancel, -1 is returned. - -\membersection{::wxGetSingleChoiceData}\label{wxgetsinglechoicedata} - -\func{wxString}{wxGetSingleChoiceData}{\param{const wxString\& }{message}, \param{const wxString\& }{caption}, \param{int}{ n}, \param{const wxString\& }{choices[]},\\ - \param{const wxString\& }{client\_data[]}, \param{wxWindow *}{parent = NULL}, \param{int}{ x = -1},\\ - \param{int}{ y = -1}, \param{bool}{ centre = TRUE}, \param{int }{width=150}, \param{int }{height=200}} - -As {\bf wxGetSingleChoice} but takes an array of client data pointers -corresponding to the strings, and returns one of these pointers. - -\membersection{::wxMessageBox}\label{wxmessagebox} - -\func{int}{wxMessageBox}{\param{const wxString\& }{message}, \param{const wxString\& }{caption = ``Message"}, \param{int}{ style = wxOK \pipe wxCENTRE},\\ - \param{wxWindow *}{parent = NULL}, \param{int}{ x = -1}, \param{int}{ y = -1}} - -General purpose message dialog. {\it style} may be a bit list of the -following identifiers: - -\begin{twocollist}\itemsep=0pt -\twocolitem{wxYES\_NO}{Puts Yes and No buttons on the message box. May be combined with -wxCANCEL.} -\twocolitem{wxCANCEL}{Puts a Cancel button on the message box. May be combined with -wxYES\_NO or wxOK.} -\twocolitem{wxOK}{Puts an Ok button on the message box. May be combined with wxCANCEL.} -\twocolitem{wxCENTRE}{Centres the text.} -\twocolitem{wxICON\_EXCLAMATION}{Under Windows, displays an exclamation mark symbol.} -\twocolitem{wxICON\_HAND}{Under Windows, displays a hand symbol.} -\twocolitem{wxICON\_QUESTION}{Under Windows, displays a question mark symbol.} -\twocolitem{wxICON\_INFORMATION}{Under Windows, displays an information symbol.} -\end{twocollist} - -The return value is one of: wxYES, wxNO, wxCANCEL, wxOK. - -For example: - -\begin{verbatim} - ... - int answer = wxMessageBox("Quit program?", "Confirm", - wxYES_NO | wxCANCEL, main_frame); - if (answer == wxYES) - delete main_frame; - ... -\end{verbatim} - -{\it message} may contain newline characters, in which case the -message will be split into separate lines, to cater for large messages. - -Under Windows, the native MessageBox function is used unless wxCENTRE -is specified in the style, in which case a generic function is used. -This is because the native MessageBox function cannot centre text. -The symbols are not shown when the generic function is used. - -\section{GDI functions}\label{gdifunctions} - -The following are relevant to the GDI (Graphics Device Interface). - -\membersection{::wxColourDisplay} - -\func{bool}{wxColourDisplay}{\void} - -Returns TRUE if the display is colour, FALSE otherwise. - -\membersection{::wxDisplayDepth} - -\func{int}{wxDisplayDepth}{\void} - -Returns the depth of the display (a value of 1 denotes a monochrome display). - -\membersection{::wxMakeMetaFilePlaceable}\label{wxmakemetafileplaceable} - -\func{bool}{wxMakeMetaFilePlaceable}{\param{const wxString\& }{filename}, \param{int }{minX}, \param{int }{minY}, - \param{int }{maxX}, \param{int }{maxY}, \param{float }{scale=1.0}} - -Given a filename for an existing, valid metafile (as constructed using \helpref{wxMetaFileDC}{wxmetafiledc}) -makes it into a placeable metafile by prepending a header containing the given -bounding box. The bounding box may be obtained from a device context after drawing -into it, using the functions wxDC::MinX, wxDC::MinY, wxDC::MaxX and wxDC::MaxY. - -In addition to adding the placeable metafile header, this function adds -the equivalent of the following code to the start of the metafile data: - -\begin{verbatim} - SetMapMode(dc, MM_ANISOTROPIC); - SetWindowOrg(dc, minX, minY); - SetWindowExt(dc, maxX - minX, maxY - minY); -\end{verbatim} - -This simulates the MM\_TEXT mapping mode, which wxWindows assumes. - -Placeable metafiles may be imported by many Windows applications, and can be -used in RTF (Rich Text Format) files. - -{\it scale} allows the specification of scale for the metafile. - -This function is only available under Windows. - -\membersection{::wxSetCursor}\label{wxsetcursor} - -\func{void}{wxSetCursor}{\param{wxCursor *}{cursor}} - -Globally sets the cursor; only has an effect in MS Windows. -See also \helpref{wxCursor}{wxcursor}, \helpref{wxWindow::SetCursor}{wxwindowsetcursor}. - -\section{Printer settings}\label{printersettings} - -The following functions are used to control PostScript printing. Under -Windows, PostScript output can only be sent to a file. - -\membersection{::wxGetPrinterCommand} - -\func{wxString}{wxGetPrinterCommand}{\void} - -Gets the printer command used to print a file. The default is {\tt lpr}. - -\membersection{::wxGetPrinterFile} - -\func{wxString}{wxGetPrinterFile}{\void} - -Gets the PostScript output filename. - -\membersection{::wxGetPrinterMode} - -\func{int}{wxGetPrinterMode}{\void} - -Gets the printing mode controlling where output is sent (PS\_PREVIEW, PS\_FILE or PS\_PRINTER). -The default is PS\_PREVIEW. - -\membersection{::wxGetPrinterOptions} - -\func{wxString}{wxGetPrinterOptions}{\void} - -Gets the additional options for the print command (e.g. specific printer). The default is nothing. - -\membersection{::wxGetPrinterOrientation} - -\func{int}{wxGetPrinterOrientation}{\void} - -Gets the orientation (PS\_PORTRAIT or PS\_LANDSCAPE). The default is PS\_PORTRAIT. - -\membersection{::wxGetPrinterPreviewCommand} - -\func{wxString}{wxGetPrinterPreviewCommand}{\void} - -Gets the command used to view a PostScript file. The default depends on the platform. - -\membersection{::wxGetPrinterScaling} - -\func{void}{wxGetPrinterScaling}{\param{float *}{x}, \param{float *}{y}} - -Gets the scaling factor for PostScript output. The default is 1.0, 1.0. - -\membersection{::wxGetPrinterTranslation} - -\func{void}{wxGetPrinterTranslation}{\param{float *}{x}, \param{float *}{y}} - -Gets the translation (from the top left corner) for PostScript output. The default is 0.0, 0.0. - -\membersection{::wxSetPrinterCommand} - -\func{void}{wxSetPrinterCommand}{\param{const wxString\& }{command}} - -Sets the printer command used to print a file. The default is {\tt lpr}. - -\membersection{::wxSetPrinterFile} - -\func{void}{wxSetPrinterFile}{\param{const wxString\& }{filename}} - -Sets the PostScript output filename. - -\membersection{::wxSetPrinterMode} - -\func{void}{wxSetPrinterMode}{\param{int }{mode}} - -Sets the printing mode controlling where output is sent (PS\_PREVIEW, PS\_FILE or PS\_PRINTER). -The default is PS\_PREVIEW. - -\membersection{::wxSetPrinterOptions} - -\func{void}{wxSetPrinterOptions}{\param{const wxString\& }{options}} - -Sets the additional options for the print command (e.g. specific printer). The default is nothing. - -\membersection{::wxSetPrinterOrientation} - -\func{void}{wxSetPrinterOrientation}{\param{int}{ orientation}} - -Sets the orientation (PS\_PORTRAIT or PS\_LANDSCAPE). The default is PS\_PORTRAIT. - -\membersection{::wxSetPrinterPreviewCommand} - -\func{void}{wxSetPrinterPreviewCommand}{\param{const wxString\& }{command}} - -Sets the command used to view a PostScript file. The default depends on the platform. - -\membersection{::wxSetPrinterScaling} - -\func{void}{wxSetPrinterScaling}{\param{float }{x}, \param{float }{y}} - -Sets the scaling factor for PostScript output. The default is 1.0, 1.0. - -\membersection{::wxSetPrinterTranslation} - -\func{void}{wxSetPrinterTranslation}{\param{float }{x}, \param{float }{y}} - -Sets the translation (from the top left corner) for PostScript output. The default is 0.0, 0.0. - -\section{Clipboard functions}\label{clipsboard} - -These clipboard functions are implemented for Windows only. - -\membersection{::wxClipboardOpen} - -\func{bool}{wxClipboardOpen}{\void} - -Returns TRUE if this application has already opened the clipboard. - -\membersection{::wxCloseClipboard} - -\func{bool}{wxCloseClipboard}{\void} - -Closes the clipboard to allow other applications to use it. - -\membersection{::wxEmptyClipboard} - -\func{bool}{wxEmptyClipboard}{\void} - -Empties the clipboard. - -\membersection{::wxEnumClipboardFormats} - -\func{int}{wxEnumClipboardFormats}{\param{int}{dataFormat}} - -Enumerates the formats found in a list of available formats that belong -to the clipboard. Each call to this function specifies a known -available format; the function returns the format that appears next in -the list. - -{\it dataFormat} specifies a known format. If this parameter is zero, -the function returns the first format in the list. - -The return value specifies the next known clipboard data format if the -function is successful. It is zero if the {\it dataFormat} parameter specifies -the last format in the list of available formats, or if the clipboard -is not open. - -Before it enumerates the formats function, an application must open the clipboard by using the -wxOpenClipboard function. - -\membersection{::wxGetClipboardData} - -\func{wxObject *}{wxGetClipboardData}{\param{int}{dataFormat}} - -Gets data from the clipboard. - -{\it dataFormat} may be one of: - -\begin{itemize}\itemsep=0pt -\item wxCF\_TEXT or wxCF\_OEMTEXT: returns a pointer to new memory containing a null-terminated text string. -\item wxCF\_BITMAP: returns a new wxBitmap. -\end{itemize} - -The clipboard must have previously been opened for this call to succeed. - -\membersection{::wxGetClipboardFormatName} - -\func{bool}{wxGetClipboardFormatName}{\param{int}{dataFormat}, \param{const wxString\& }{formatName}, \param{int}{maxCount}} - -Gets the name of a registered clipboard format, and puts it into the buffer {\it formatName} which is of maximum -length {\it maxCount}. {\it dataFormat} must not specify a predefined clipboard format. - -\membersection{::wxIsClipboardFormatAvailable} - -\func{bool}{wxIsClipboardFormatAvailable}{\param{int}{dataFormat}} - -Returns TRUE if the given data format is available on the clipboard. - -\membersection{::wxOpenClipboard} - -\func{bool}{wxOpenClipboard}{\void} - -Opens the clipboard for passing data to it or getting data from it. - -\membersection{::wxRegisterClipboardFormat} - -\func{int}{wxRegisterClipboardFormat}{\param{const wxString\& }{formatName}} - -Registers the clipboard data format name and returns an identifier. - -\membersection{::wxSetClipboardData} - -\func{bool}{wxSetClipboardData}{\param{int}{dataFormat}, \param{wxObject *}{data}, \param{int}{width}, \param{int}{height}} - -Passes data to the clipboard. - -{\it dataFormat} may be one of: - -\begin{itemize}\itemsep=0pt -\item wxCF\_TEXT or wxCF\_OEMTEXT: {\it data} is a null-terminated text string. -\item wxCF\_BITMAP: {\it data} is a wxBitmap. -\item wxCF\_DIB: {\it data} is a wxBitmap. The bitmap is converted to a DIB (device independent bitmap). -\item wxCF\_METAFILE: {\it data} is a wxMetaFile. {\it width} and {\it height} are used to give recommended dimensions. -\end{itemize} - -The clipboard must have previously been opened for this call to succeed. - -\section{Miscellaneous functions}\label{miscellany} - -\membersection{::NewId} - -\func{long}{NewId}{\void} - -Generates an integer identifier unique to this run of the program. - -\membersection{::RegisterId} - -\func{void}{RegisterId}{\param{long}{ id}} - -Ensures that ids subsequently generated by {\bf NewId} do not clash with -the given {\bf id}. - -\membersection{::wxBeginBusyCursor}\label{wxbeginbusycursor} - -\func{void}{wxBeginBusyCursor}{\param{wxCursor *}{cursor = wxHOURGLASS\_CURSOR}} - -Changes the cursor to the given cursor for all windows in the application. -Use \helpref{wxEndBusyCursor}{wxendbusycursor} to revert the cursor back -to its previous state. These two calls can be nested, and a counter -ensures that only the outer calls take effect. - -See also \helpref{wxIsBusy}{wxisbusy}. - -\membersection{::wxBell} - -\func{void}{wxBell}{\void} - -Ring the system bell. - -\membersection{::wxCleanUp}\label{wxcleanup} - -\func{void}{wxCleanUp}{\void} - -Normally, wxWindows will call this cleanup function for you. However, if -you call \helpref{wxEntry}{wxentry} in order to initialize wxWindows -manually, then you should also call wxCleanUp before terminating wxWindows, -if wxWindows does not get a chance to do it. - -\membersection{::wxCreateDynamicObject}\label{wxcreatedynamicobject} - -\func{wxObject *}{wxCreateDynamicObject}{\param{const wxString\& }{className}} - -Creates and returns an object of the given class, if the class has been -registered with the dynamic class system using DECLARE... and IMPLEMENT... macros. - -\membersection{::wxDebugMsg} - -\func{void}{wxDebugMsg}{\param{const wxString\& }{fmt}, \param{...}{}} - -Display a debugging message; under Windows, this will appear on the -debugger command window, and under UNIX, it will be written to standard -error. - -The syntax is identical to {\bf printf}: pass a format string and a -variable list of arguments. - -Note that under Windows, you can see the debugging messages without a -debugger if you have the DBWIN debug log application that comes with -Microsoft C++. - -{\bf Tip:} under Windows, if your application crashes before the -message appears in the debugging window, put a wxYield call after -each wxDebugMsg call. wxDebugMsg seems to be broken under WIN32s -(at least for Watcom C++): preformat your messages and use OutputDebugString -instead. - -\membersection{::wxDisplaySize} - -\func{void}{wxDisplaySize}{\param{int *}{width}, \param{int *}{height}} - -Gets the physical size of the display in pixels. - -\membersection{::wxEntry}\label{wxentry} - -This initializes wxWindows in a platform-dependent way. Use this if you -are not using the default wxWindows entry code (e.g. main or WinMain). For example, -you can initialize wxWindows from an Microsoft Foundation Classes application using -this function. See also \helpref{wxCleanUp}{wxcleanup}. - -\func{void}{wxEntry}{\param{HANDLE}{ hInstance}, \param{HANDLE}{ hPrevInstance}, - \param{const wxString\& }{commandLine}, \param{int}{ cmdShow}, \param{bool}{ enterLoop = TRUE}} - -wxWindows initialization under Windows (non-DLL). If {\it enterLoop} is FALSE, the -function will return immediately after calling wxApp::OnInit. Otherwise, the wxWindows -message loop will be entered. - -\func{void}{wxEntry}{\param{HANDLE}{ hInstance}, \param{HANDLE}{ hPrevInstance}, - \param{WORD}{ wDataSegment}, \param{WORD}{ wHeapSize}, \param{const wxString\& }{ commandLine}} - -wxWindows initialization under Windows (for applications constructed as a DLL). - -\func{int}{wxEntry}{\param{int}{ argc}, \param{const wxString\& *}{argv}} - -wxWindows initialization under UNIX. - -\membersection{::wxError}\label{wxerror} - -\func{void}{wxError}{\param{const wxString\& }{msg}, \param{const wxString\& }{title = "wxWindows Internal Error"}} - -Displays {\it msg} and continues. This writes to standard error under -UNIX, and pops up a message box under Windows. Used for internal -wxWindows errors. See also \helpref{wxFatalError}{wxfatalerror}. - -\membersection{::wxEndBusyCursor}\label{wxendbusycursor} - -\func{void}{wxEndBusyCursor}{\void} - -Changes the cursor back to the original cursor, for all windows in the application. -Use with \helpref{wxBeginBusyCursor}{wxbeginbusycursor}. - -See also \helpref{wxIsBusy}{wxisbusy}. - -\membersection{::wxExecute}\label{wxexecute} - -\func{long}{wxExecute}{\param{const wxString\& }{command}, \param{bool }{sync = FALSE}, \param{wxProcess *}{callback = NULL}} - -\func{long}{wxExecute}{\param{const wxString\& *}{argv}, \param{bool }{sync = FALSE}, \param{wxProcess *}{callback = NULL}} - -Executes another program in UNIX or Windows. - -The first form takes a command string, such as {\tt "emacs file.txt"}. - -The second form takes an array of values: a command, any number of -arguments, terminated by NULL. - -If {\it sync} is FALSE (the default), flow of control immediately returns. -If TRUE, the current application waits until the other program has terminated. - -If execution is asynchronous, the return value is the process id, -otherwise it is a status value. A zero value indicates that the command could not -be executed. - -If callback isn't NULL and if execution is asynchronous, -\helpref{wxProcess::OnTerminate}{wxprocessonterminate} will be called when -the process finishes. - -See also \helpref{wxShell}{wxshell}, \helpref{wxProcess}{wxprocess}. - -\membersection{::wxExit}\label{wxexit} - -\func{void}{wxExit}{\void} - -Exits application after calling \helpref{wxApp::OnExit}{wxapponexit}. -Should only be used in an emergency: normally the top-level frame -should be deleted (after deleting all other frames) to terminate the -application. See \helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow} and \helpref{wxApp}{wxapp}. - -\membersection{::wxFatalError}\label{wxfatalerror} - -\func{void}{wxFatalError}{\param{const wxString\& }{msg}, \param{const wxString\& }{title = "wxWindows Fatal Error"}} - -Displays {\it msg} and exits. This writes to standard error under UNIX, -and pops up a message box under Windows. Used for fatal internal -wxWindows errors. See also \helpref{wxError}{wxerror}. - -\membersection{::wxFindMenuItemId} - -\func{int}{wxFindMenuItemId}{\param{wxFrame *}{frame}, \param{const wxString\& }{menuString}, \param{const wxString\& }{itemString}} - -Find a menu item identifier associated with the given frame's menu bar. - -\membersection{::wxFindWindowByLabel} - -\func{wxWindow *}{wxFindWindowByLabel}{\param{const wxString\& }{label}, \param{wxWindow *}{parent=NULL}} - -Find a window by its label. Depending on the type of window, the label may be a window title -or panel item label. If {\it parent} is NULL, the search will start from all top-level -frames and dialog boxes; if non-NULL, the search will be limited to the given window hierarchy. -The search is recursive in both cases. - -\membersection{::wxFindWindowByName}\label{wxfindwindowbyname} - -\func{wxWindow *}{wxFindWindowByName}{\param{const wxString\& }{name}, \param{wxWindow *}{parent=NULL}} - -Find a window by its name (as given in a window constructor or {\bf Create} function call). -If {\it parent} is NULL, the search will start from all top-level -frames and dialog boxes; if non-NULL, the search will be limited to the given window hierarchy. -The search is recursive in both cases. - -If no such named window is found, {\bf wxFindWindowByLabel} is called. - -\membersection{::wxGetActiveWindow}\label{wxgetactivewindow} - -\func{wxWindow *}{wxGetActiveWindow}{\void} - -Gets the currently active window (Windows only). - -\membersection{::wxGetDisplayName}\label{wxgetdisplayname} - -\func{wxString}{wxGetDisplayName}{\void} - -Under X only, returns the current display name. See also \helpref{wxSetDisplayName}{wxsetdisplayname}. - -\membersection{::wxGetHomeDir} - -\func{wxString}{wxGetHomeDir}{\param{const wxString\& }{buf}} - -Fills the buffer with a string representing the user's home directory (UNIX only). - -\membersection{::wxGetHostName} - -\func{bool}{wxGetHostName}{\param{const wxString\& }{buf}, \param{int}{ bufSize}} - -Copies the host name of the machine the program is running on into the -buffer {\it buf}, of maximum size {\it bufSize}, returning TRUE if -successful. Under UNIX, this will return a machine name. Under Windows, -this returns ``windows''. - -\membersection{::wxGetElapsedTime}\label{wxgetelapsedtime} - -\func{long}{wxGetElapsedTime}{\param{bool}{ resetTimer = TRUE}} - -Gets the time in milliseconds since the last \helpref{::wxStartTimer}{wxstarttimer}. - -If {\it resetTimer} is TRUE (the default), the timer is reset to zero -by this call. - -See also \helpref{wxTimer}{wxtimer}. - -\membersection{::wxGetFreeMemory} - -\func{long}{wxGetFreeMemory}{\void} - -Returns the amount of free memory in Kbytes under environments which -support it, and -1 if not supported. Currently, returns a positive value -under Windows, and -1 under UNIX. - -\membersection{::wxGetMousePosition} - -\func{void}{wxGetMousePosition}{\param{int* }{x}, \param{int* }{y}} - -Returns the mouse position in screen coordinates. - -\membersection{::wxGetOsVersion} - -\func{int}{wxGetOsVersion}{\param{int *}{major = NULL}, \param{int *}{minor = NULL}} - -Gets operating system version information. - -\begin{twocollist}\itemsep=0pt -\twocolitemruled{Platform}{Return tyes} -\twocolitem{Macintosh}{Return value is wxMACINTOSH.} -\twocolitem{Motif}{Return value is wxMOTIF\_X, {\it major} is X version, {\it minor} is X revision.} -\twocolitem{OS/2}{Return value is wxOS2\_PM.} -\twocolitem{Windows 3.1}{Return value is wxWINDOWS, {\it major} is 3, {\it minor} is 1.} -\twocolitem{Windows NT}{Return value is wxWINDOWS\_NT, {\it major} is 3, {\it minor} is 1.} -\twocolitem{Windows 95}{Return value is wxWIN95, {\it major} is 3, {\it minor} is 1.} -\twocolitem{Win32s (Windows 3.1)}{Return value is wxWIN32S, {\it major} is 3, {\it minor} is 1.} -\twocolitem{Watcom C++ 386 supervisor mode (Windows 3.1)}{Return value is wxWIN386, {\it major} is 3, {\it minor} is 1.} -\end{twocollist} - -\membersection{::wxGetResource}\label{wxgetresource} - -\func{bool}{wxGetResource}{\param{const wxString\& }{section}, \param{const wxString\& }{entry}, - \param{const wxString\& *}{value}, \param{const wxString\& }{file = NULL}} - -\func{bool}{wxGetResource}{\param{const wxString\& }{section}, \param{const wxString\& }{entry}, - \param{float *}{value}, \param{const wxString\& }{file = NULL}} - -\func{bool}{wxGetResource}{\param{const wxString\& }{section}, \param{const wxString\& }{entry}, - \param{long *}{value}, \param{const wxString\& }{file = NULL}} - -\func{bool}{wxGetResource}{\param{const wxString\& }{section}, \param{const wxString\& }{entry}, - \param{int *}{value}, \param{const wxString\& }{file = NULL}} - -Gets a resource value from the resource database (for example, WIN.INI, or -.Xdefaults). If {\it file} is NULL, WIN.INI or .Xdefaults is used, -otherwise the specified file is used. - -Under X, if an application class (wxApp::wx\_class) has been defined, -it is appended to the string /usr/lib/X11/app-defaults/ to try to find -an applications default file when merging all resource databases. - -The reason for passing the result in an argument is that it -can be convenient to define a default value, which gets overridden -if the value exists in the resource file. It saves a separate -test for that resource's existence, and it also allows -the overloading of the function for different types. - -See also \helpref{wxWriteResource}{wxwriteresource}. - -\membersection{::wxGetUserId} - -\func{bool}{wxGetUserId}{\param{const wxString\& }{buf}, \param{int}{ bufSize}} - -Copies the user's login identity (such as ``jacs'') into the buffer {\it -buf}, of maximum size {\it bufSize}, returning TRUE if successful. -Under Windows, this returns ``user''. - -\membersection{::wxGetUserName} - -\func{bool}{wxGetUserName}{\param{const wxString\& }{buf}, \param{int}{ bufSize}} - -Copies the user's name (such as ``Julian Smart'') into the buffer {\it -buf}, of maximum size {\it bufSize}, returning TRUE if successful. -Under Windows, this returns ``unknown''. - -\membersection{::wxKill}\label{wxkill} - -\func{int}{wxKill}{\param{long}{ pid}, \param{int}{ sig}} - -Under UNIX (the only supported platform), equivalent to the UNIX kill function. -Returns 0 on success, -1 on failure. - -Tip: sending a signal of 0 to a process returns -1 if the process does not exist. -It does not raise a signal in the receiving process. - -\membersection{::wxInitClipboard}\label{wxinitclipboard} - -\func{void}{wxInitClipboard}{\void} - -Initializes the generic clipboard system by creating an instance of -the class \helpref{wxClipboard}{wxclipboard}. - -\membersection{::wxIPCCleanUp}\label{wxipccleanup} - -\func{void}{wxIPCCleanUp}{\void} - -Call this when your application is terminating, if you have -called \helpref{wxIPCInitialize}{wxipcinitialize}. - -\membersection{::wxIPCInitialize}\label{wxipcinitialize} - -\func{void}{wxIPCInitialize}{\void} - -Initializes for interprocess communication operation. May -be called multiple times without harm. - -See also \helpref{wxDDEServer}{wxddeserver}, \helpref{wxDDEClient}{wxddeclient}, \helpref{wxDDEConnection}{wxddeconnection} -and the relevant section of the user manual. - -\membersection{::wxIsBusy}\label{wxisbusy} - -\func{bool}{wxIsBusy}{\void} - -Returns TRUE if between two \helpref{wxBeginBusyCursor}{wxbeginbusycursor} and\rtfsp -\helpref{wxEndBusyCursor}{wxendbusycursor} calls. - -\membersection{::wxLoadUserResource}\label{wxloaduserresource} - -\func{wxString}{wxLoadUserResource}{\param{const wxString\& }{resourceName}, \param{const wxString\& }{resourceType=``TEXT"}} - -Loads a user-defined Windows resource as a string. If the resource is found, the function creates -a new character array and copies the data into it. A pointer to this data is returned. If unsuccessful, NULL is returned. - -The resource must be defined in the {\tt .rc} file using the following syntax: - -\begin{verbatim} -myResource TEXT file.ext -\end{verbatim} - -where {\tt file.ext} is a file that the resource compiler can find. - -One use of this is to store {\tt .wxr} files instead of including the data in the C++ file; some compilers -cannot cope with the long strings in a {\tt .wxr} file. The resource data can then be parsed -using \helpref{wxResourceParseString}{wxresourceparsestring}. - -This function is available under Windows only. - -\membersection{::wxNow}\label{wxnow} - -\func{wxString}{wxNow}{\void} - -Returns a string representing the current date and time. - -\membersection{::wxPostDelete}\label{wxpostdelete} - -\func{void}{wxPostDelete}{\param{wxObject *}{object}} - -Under X, tells the system to delete the specified object when -all other events have been processed. In some environments, it is -necessary to use this instead of deleting a frame directly with the -delete operator, because X will still send events to the window. - -Now obsolete: use \helpref{wxWindow::Close}{wxwindowclose} instead. - -\membersection{::wxSetDisplayName}\label{wxsetdisplayname} - -\func{void}{wxSetDisplayName}{\param{const wxString\& }{displayName}} - -Under X only, sets the current display name. This is the X host and display name such -as ``colonsay:0.0", and the function indicates which display should be used for creating -windows from this point on. Setting the display within an application allows multiple -displays to be used. - -See also \helpref{wxGetDisplayName}{wxgetdisplayname}. - -\membersection{::wxShell}\label{wxshell} - -\func{bool}{wxShell}{\param{const wxString\& }{command = NULL}} - -Executes a command in an interactive shell window. If no command is -specified, then just the shell is spawned. - -See also \helpref{wxExecute}{wxexecute}. - -\membersection{::wxSleep} - -\func{void}{wxSleep}{\param{int}{ secs}} - -Under X, sleeps for the specified number of seconds. - -\membersection{::wxStripMenuCodes} - -\func{void}{wxStripMenuCodes}{\param{const wxString\& }{in}, \param{const wxString\& }{out}} - -Strips any menu codes from {\it in} and places the result -in {\it out}. Menu codes include \& (mark the next character with an underline -as a keyboard shortkey in Windows and Motif) and $\backslash$t (tab in Windows). - -\membersection{::wxStartTimer}\label{wxstarttimer} - -\func{void}{wxStartTimer}{\void} - -Starts a stopwatch; use \helpref{::wxGetElapsedTime}{wxgetelapsedtime} to get the elapsed time. - -See also \helpref{wxTimer}{wxtimer}. - -\membersection{::wxToLower}\label{wxtolower} - -\func{char}{wxToLower}{\param{char }{ch}} - -Converts the character to lower case. This is implemented as a macro for efficiency. - -\membersection{::wxToUpper}\label{wxtoupper} - -\func{char}{wxToUpper}{\param{char }{ch}} - -Converts the character to upper case. This is implemented as a macro for efficiency. - -\membersection{::wxTrace}\label{wxtrace} - -\func{void}{wxTrace}{\param{const wxString\& }{fmt}, \param{...}{}} - -Takes printf-style variable argument syntax. Output -is directed to the current output stream (see \helpref{wxDebugContext}{wxdebugcontextoverview}). - -\membersection{::wxTraceLevel}\label{wxtracelevel} - -\func{void}{wxTraceLevel}{\param{int}{ level}, \param{const wxString\& }{fmt}, \param{...}{}} - -Takes printf-style variable argument syntax. Output -is directed to the current output stream (see \helpref{wxDebugContext}{wxdebugcontextoverview}). -The first argument should be the level at which this information is appropriate. -It will only be output if the level returned by wxDebugContext::GetLevel is equal to or greater than -this value. - -\membersection{::wxWriteResource}\label{wxwriteresource} - -\func{bool}{wxWriteResource}{\param{const wxString\& }{section}, \param{const wxString\& }{entry}, - \param{const wxString\& }{value}, \param{const wxString\& }{file = NULL}} - -\func{bool}{wxWriteResource}{\param{const wxString\& }{section}, \param{const wxString\& }{entry}, - \param{float }{value}, \param{const wxString\& }{file = NULL}} - -\func{bool}{wxWriteResource}{\param{const wxString\& }{section}, \param{const wxString\& }{entry}, - \param{long }{value}, \param{const wxString\& }{file = NULL}} - -\func{bool}{wxWriteResource}{\param{const wxString\& }{section}, \param{const wxString\& }{entry}, - \param{int }{value}, \param{const wxString\& }{file = NULL}} - -Writes a resource value into the resource database (for example, WIN.INI, or -.Xdefaults). If {\it file} is NULL, WIN.INI or .Xdefaults is used, -otherwise the specified file is used. - -Under X, the resource databases are cached until the internal function -\rtfsp{\bf wxFlushResources} is called automatically on exit, when -all updated resource databases are written to their files. - -Note that it is considered bad manners to write to the .Xdefaults -file under UNIX, although the WIN.INI file is fair game under Windows. - -See also \helpref{wxGetResource}{wxgetresource}. - -\membersection{::wxYield} - -\func{bool}{wxYield}{\void} - -Yields control to pending messages in the windowing system. This can be useful, for example, when a -time-consuming process writes to a text window. Without an occasional -yield, the text window will not be updated properly, and (since Windows -multitasking is cooperative) other processes will not respond. - -Caution should be exercised, however, since yielding may allow the -user to perform actions which are not compatible with the current task. -Disabling menu items or whole menus during processing can avoid unwanted -reentrance of code. - -\section{Macros}\label{macros} - -These macros are defined in wxWindows. - -\membersection{CLASSINFO}\label{classinfo} - -\func{wxClassInfo *}{CLASSINFO}{className} - -Returns a pointer to the wxClassInfo object associated with this class. - -\membersection{WXDEBUG\_NEW}\label{debugnew} - -\func{}{WXDEBUG\_NEW}{arg} - -This is defined in debug mode to be call the redefined new operator -with filename and line number arguments. The definition is: - -\begin{verbatim} -#define WXDEBUG_NEW new(__FILE__,__LINE__) -\end{verbatim} - -In non-debug mode, this is defined as the normal new operator. - -\membersection{DECLARE\_ABSTRACT\_CLASS} - -\func{}{DECLARE\_ABSTRACT\_CLASS}{className} - -Used inside a class declaration to declare that the class should be -made known to the class hierarchy, but objects of this class cannot be created -dynamically. The same as DECLARE\_CLASS. - -Example: - -\begin{verbatim} -class wxCommand: public wxObject -{ - DECLARE_ABSTRACT_CLASS(wxCommand) - - private: - ... - public: - ... -}; -\end{verbatim} - -\membersection{DECLARE\_APP}\label{declareapp} - -\func{}{DECLARE\_APP}{className} - -This is used in headers to create a forward declaration of the wxGetApp function implemented -by IMPLEMENT\_APP. It creates the declaration {\tt className\& wxGetApp(void)}. - -Example: - -\begin{verbatim} - DECLARE_APP(MyApp) -\end{verbatim} - -\membersection{DECLARE\_CLASS} - -\func{}{DECLARE\_CLASS}{className} - -Used inside a class declaration to declare that the class should be -made known to the class hierarchy, but objects of this class cannot be created -dynamically. The same as DECLARE\_ABSTRACT\_CLASS. - -\membersection{DECLARE\_DYNAMIC\_CLASS} - -\func{}{DECLARE\_DYNAMIC\_CLASS}{className} - -Used inside a class declaration to declare that the objects of this class should be dynamically -createable from run-time type information. - -Example: - -\begin{verbatim} -class wxFrame: public wxWindow -{ - DECLARE_DYNAMIC_CLASS(wxFrame) - - private: - const wxString\& frameTitle; - public: - ... -}; -\end{verbatim} - -\membersection{IMPLEMENT\_ABSTRACT\_CLASS} - -\func{}{IMPLEMENT\_ABSTRACT\_CLASS}{className, baseClassName} - -Used in a C++ implementation file to complete the declaration of -a class that has run-time type information. The same as IMPLEMENT\_CLASS. - -Example: - -\begin{verbatim} -IMPLEMENT_ABSTRACT_CLASS(wxCommand, wxObject) - -wxCommand::wxCommand(void) -{ -... -} -\end{verbatim} - -\membersection{IMPLEMENT\_ABSTRACT\_CLASS2} - -\func{}{IMPLEMENT\_ABSTRACT\_CLASS2}{className, baseClassName1, baseClassName2} - -Used in a C++ implementation file to complete the declaration of -a class that has run-time type information and two base classes. The same as IMPLEMENT\_CLASS2. - -\membersection{IMPLEMENT\_APP}\label{implementapp} - -\func{}{IMPLEMENT\_APP}{className} - -This is used in the application class implementation file to make the application class known to -wxWindows for dynamic construction. You use this instead of - -Old form: - -\begin{verbatim} - MyApp myApp; -\end{verbatim} - -New form: - -\begin{verbatim} - IMPLEMENT_APP(MyApp) -\end{verbatim} - -See also \helpref{DECLARE\_APP}{declareapp}. - -\membersection{IMPLEMENT\_CLASS} - -\func{}{IMPLEMENT\_CLASS}{className, baseClassName} - -Used in a C++ implementation file to complete the declaration of -a class that has run-time type information. The same as IMPLEMENT\_ABSTRACT\_CLASS. - -\membersection{IMPLEMENT\_CLASS2} - -\func{}{IMPLEMENT\_CLASS2}{className, baseClassName1, baseClassName2} - -Used in a C++ implementation file to complete the declaration of a -class that has run-time type information and two base classes. The -same as IMPLEMENT\_ABSTRACT\_CLASS2. - -\membersection{IMPLEMENT\_DYNAMIC\_CLASS} - -\func{}{IMPLEMENT\_DYNAMIC\_CLASS}{className, baseClassName} - -Used in a C++ implementation file to complete the declaration of -a class that has run-time type information, and whose instances -can be created dynamically. - -Example: - -\begin{verbatim} -IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow) - -wxFrame::wxFrame(void) -{ -... -} -\end{verbatim} - -\membersection{IMPLEMENT\_DYNAMIC\_CLASS2} - -\func{}{IMPLEMENT\_DYNAMIC\_CLASS2}{className, baseClassName1, baseClassName2} - -Used in a C++ implementation file to complete the declaration of -a class that has run-time type information, and whose instances -can be created dynamically. Use this for classes derived from two -base classes. - -\membersection{WXTRACE}\label{trace} - -\func{}{WXTRACE}{formatString, ...} - -Calls wxTrace with printf-style variable argument syntax. Output -is directed to the current output stream (see \helpref{wxDebugContext}{wxdebugcontextoverview}). - -\membersection{WXTRACELEVEL}\label{tracelevel} - -\func{}{WXTRACELEVEL}{level, formatString, ...} - -Calls wxTraceLevel with printf-style variable argument syntax. Output -is directed to the current output stream (see \helpref{wxDebugContext}{wxdebugcontextoverview}). -The first argument should be the level at which this information is appropriate. -It will only be output if the level returned by wxDebugContext::GetLevel is equal to or greater than -this value. - -\section{wxWindows resource functions}\label{resourcefuncs} - -\overview{wxWindows resource system}{resourceformats} - -This section details functions for manipulating wxWindows (.WXR) resource -files and loading user interface elements from resources. - -\normalbox{Please note that this use of the word `resource' is different from that used when talking -about initialisation file resource reading and writing, using such functions -as wxWriteResource and wxGetResource. It's just an unfortunate clash of terminology.} - -\helponly{For an overview of the wxWindows resource mechanism, see \helpref{the wxWindows resource system}{resourceformats}.} - -See also \helpref{wxWindow::LoadFromResource}{wxwindowloadfromresource} for -loading from resource data. - -\membersection{::wxResourceAddIdentifier}\label{wxresourceaddidentifier} - -\func{bool}{wxResourceAddIdentifier}{\param{const wxString\& }{name}, \param{int }{value}} - -Used for associating a name with an integer identifier (equivalent to dynamically\rtfsp -\verb$#$defining a name to an integer). Unlikely to be used by an application except -perhaps for implementing resource functionality for interpreted languages. - -\membersection{::wxResourceClear} - -\func{void}{wxResourceClear}{\void} - -Clears the wxWindows resource table. - -\membersection{::wxResourceCreateBitmap} - -\func{wxBitmap *}{wxResourceCreateBitmap}{\param{const wxString\& }{resource}} - -Creates a new bitmap from a file, static data, or Windows resource, given a valid -wxWindows bitmap resource identifier. For example, if the .WXR file contains -the following: - -\begin{verbatim} -static const wxString\& aiai_resource = "bitmap(name = 'aiai_resource',\ - bitmap = ['aiai', wxBITMAP_TYPE_BMP_RESOURCE, 'WINDOWS'],\ - bitmap = ['aiai.xpm', wxBITMAP_TYPE_XPM, 'X'])."; -\end{verbatim} - -then this function can be called as follows: - -\begin{verbatim} - wxBitmap *bitmap = wxResourceCreateBitmap("aiai_resource"); -\end{verbatim} - -\membersection{::wxResourceCreateIcon} - -\func{wxIcon *}{wxResourceCreateIcon}{\param{const wxString\& }{resource}} - -Creates a new icon from a file, static data, or Windows resource, given a valid -wxWindows icon resource identifier. For example, if the .WXR file contains -the following: - -\begin{verbatim} -static const wxString\& aiai_resource = "icon(name = 'aiai_resource',\ - icon = ['aiai', wxBITMAP_TYPE_ICO_RESOURCE, 'WINDOWS'],\ - icon = ['aiai', wxBITMAP_TYPE_XBM_DATA, 'X'])."; -\end{verbatim} - -then this function can be called as follows: - -\begin{verbatim} - wxIcon *icon = wxResourceCreateIcon("aiai_resource"); -\end{verbatim} - -\membersection{::wxResourceCreateMenuBar} - -\func{wxMenuBar *}{wxResourceCreateMenuBar}{\param{const wxString\& }{resource}} - -Creates a new menu bar given a valid wxWindows menubar resource -identifier. For example, if the .WXR file contains the following: - -\begin{verbatim} -static const wxString\& menuBar11 = "menu(name = 'menuBar11',\ - menu = \ - [\ - ['&File', 1, '', \ - ['&Open File', 2, 'Open a file'],\ - ['&Save File', 3, 'Save a file'],\ - [],\ - ['E&xit', 4, 'Exit program']\ - ],\ - ['&Help', 5, '', \ - ['&About', 6, 'About this program']\ - ]\ - ])."; -\end{verbatim} - -then this function can be called as follows: - -\begin{verbatim} - wxMenuBar *menuBar = wxResourceCreateMenuBar("menuBar11"); -\end{verbatim} - - -\membersection{::wxResourceGetIdentifier} - -\func{int}{wxResourceGetIdentifier}{\param{const wxString\& }{name}} - -Used for retrieving the integer value associated with an identifier. -A zero value indicates that the identifier was not found. - -See \helpref{wxResourceAddIdentifier}{wxresourceaddidentifier}. - -\membersection{::wxResourceParseData}\label{wxresourcedata} - -\func{bool}{wxResourceParseData}{\param{const wxString\& }{resource}, \param{wxResourceTable *}{table = NULL}} - -Parses a string containing one or more wxWindows resource objects. If -the resource objects are global static data that are included into the -C++ program, then this function must be called for each variable -containing the resource data, to make it known to wxWindows. - -{\it resource} should contain data in the following form: - -\begin{verbatim} -dialog(name = 'dialog1', - style = 'wxCAPTION | wxDEFAULT_DIALOG_STYLE', - title = 'Test dialog box', - x = 312, y = 234, width = 400, height = 300, - modal = 0, - control = [wxGroupBox, 'Groupbox', '0', 'group6', 5, 4, 380, 262, - [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]], - control = [wxMultiText, 'Multitext', 'wxVERTICAL_LABEL', 'multitext3', - 156, 126, 200, 70, 'wxWindows is a multi-platform, GUI toolkit.', - [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0], - [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]]). -\end{verbatim} - -This function will typically be used after including a {\tt .wxr} file into -a C++ program as follows: - -\begin{verbatim} -#include "dialog1.wxr" -\end{verbatim} - -Each of the contained resources will declare a new C++ variable, and each -of these variables should be passed to wxResourceParseData. - -\membersection{::wxResourceParseFile} - -\func{bool}{wxResourceParseFile}{\param{const wxString\& }{filename}, \param{wxResourceTable *}{table = NULL}} - -Parses a file containing one or more wxWindows resource objects -in C++-compatible syntax. Use this function to dynamically load -wxWindows resource data. - -\membersection{::wxResourceParseString}\label{wxresourceparsestring} - -\func{bool}{wxResourceParseString}{\param{const wxString\& }{resource}, \param{wxResourceTable *}{table = NULL}} - -Parses a string containing one or more wxWindows resource objects. If -the resource objects are global static data that are included into the -C++ program, then this function must be called for each variable -containing the resource data, to make it known to wxWindows. - -{\it resource} should contain data with the following form: - -\begin{verbatim} -static const wxString\& dialog1 = "dialog(name = 'dialog1',\ - style = 'wxCAPTION | wxDEFAULT_DIALOG_STYLE',\ - title = 'Test dialog box',\ - x = 312, y = 234, width = 400, height = 300,\ - modal = 0,\ - control = [wxGroupBox, 'Groupbox', '0', 'group6', 5, 4, 380, 262,\ - [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\ - control = [wxMultiText, 'Multitext', 'wxVERTICAL_LABEL', 'multitext3',\ - 156, 126, 200, 70, 'wxWindows is a multi-platform, GUI toolkit.',\ - [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0],\ - [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]])."; -\end{verbatim} - -This function will typically be used after calling \helpref{wxLoadUserResource}{wxloaduserresource} to -load an entire {\tt .wxr file} into a string. - -\membersection{::wxResourceRegisterBitmapData}\label{registerbitmapdata} - -\func{bool}{wxResourceRegisterBitmapData}{\param{const wxString\& }{name}, \param{const wxString\& }{xbm\_data}, \param{int }{width}, -\param{int }{height}, \param{wxResourceTable *}{table = NULL}} - -\func{bool}{wxResourceRegisterBitmapData}{\param{const wxString\& }{name}, \param{const wxString\& *}{xpm\_data}} - -Makes \verb$#$included XBM or XPM bitmap data known to the wxWindows resource system. -This is required if other resources will use the bitmap data, since otherwise there -is no connection between names used in resources, and the global bitmap data. - -\membersection{::wxResourceRegisterIconData} - -Another name for \helpref{wxResourceRegisterBitmapData}{registerbitmapdata}. - diff --git a/docs/latex/wx/gauge.tex b/docs/latex/wx/gauge.tex deleted file mode 100644 index 6e9d9f61c5..0000000000 --- a/docs/latex/wx/gauge.tex +++ /dev/null @@ -1,182 +0,0 @@ -\section{\class{wxGauge}}\label{wxgauge} - -A gauge is a horizontal or vertical bar which shows a quantity (often time). -There are no user commands for the gauge. - -\wxheading{Derived from} - -\helpref{wxControl}{wxcontrol}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxEvtHandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxGA\_HORIZONTAL}}{Creates a horizontal gauge.} -\twocolitem{\windowstyle{wxGA\_VERTICAL}}{Creates a vertical gauge.} -\twocolitem{\windowstyle{wxGA\_PROGRESSBAR}}{Under Windows 95, creates a horizontal progress bar.} -\end{twocollist} - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Event handling} - -wxGauge is read-only so generates no events. - -\wxheading{See also} - -\helpref{wxSlider}{wxslider}, \helpref{wxScrollBar}{wxscrollbar} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxGauge::wxGauge}\label{wxgaugeconstr} - -\func{}{wxGauge}{\void} - -Default constructor. - -\func{}{wxGauge}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp -\param{int}{ range}, \param{const wxPoint\& }{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp -\param{long}{ style = wxGA\_HORIZONTAL}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``gauge"}} - -Constructor, creating and showing a gauge. - -\wxheading{Parameters} - -\docparam{parent}{Window parent.} - -\docparam{id}{Window identifier.} - -\docparam{range}{Integer range (maximum value) of the gauge.} - -\docparam{pos}{Window position.} - -\docparam{size}{Window size.} - -\docparam{style}{Gauge style. See \helpref{wxGauge}{wxgauge}.} - -\docparam{name}{Window name.} - -\wxheading{Remarks} - -Under Windows 95, there are two different styles of gauge: normal gauge, and progress bar (when -the {\bf wxGA\_PROGRESSBAR} style is used). A progress bar is always horizontal. - -\wxheading{See also} - -\helpref{wxGauge::Create}{wxgaugecreate} - -\membersection{wxGauge::\destruct{wxGauge}} - -\func{}{\destruct{wxGauge}}{\void} - -Destructor, destroying the gauge. - -\membersection{wxGauge::Create}\label{wxgaugecreate} - -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp -\param{int}{ range}, \param{const wxPoint\& }{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp -\param{long}{ style = wxGA\_HORIZONTAL}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``gauge"}} - -Creates the gauge for two-step construction. See \helpref{wxGauge::wxGauge}{wxgaugeconstr}\rtfsp -for further details. - -\membersection{wxGauge::GetBezelFace}\label{wxgaugegetbezelface} - -\constfunc{int}{GetBezelFace}{\void} - -Returns the width of the 3D bezel face. - -\wxheading{Remarks} - -Windows only, not for {\bf wxGA\_PROGRESSBAR}. - -\wxheading{See also} - -\helpref{wxGauge::SetBezelFace}{wxgaugesetbezelface} - -\membersection{wxGauge::GetRange}\label{wxgaugegetrange} - -\constfunc{int}{GetRange}{\void} - -Returns the maximum position of the gauge. - -\wxheading{See also} - -\helpref{wxGauge::SetRange}{wxgaugesetrange} - -\membersection{wxGauge::GetShadowWidth}\label{wxgaugegetshadowwidth} - -\constfunc{int}{GetShadowWidth}{\void} - -Returns the 3D shadow margin width. - -\wxheading{Remarks} - -Windows only, not for {\bf wxGA\_PROGRESSBAR}. - -\wxheading{See also} - -\helpref{wxGauge::SetShadowWidth}{wxgaugesetshadowwidth} - -\membersection{wxGauge::GetValue}\label{wxgaugegetvalue} - -\constfunc{int}{GetValue}{\void} - -Returns the current position of the gauge. - -\wxheading{See also} - -\helpref{wxGauge::SetValue}{wxgaugesetvalue} - -\membersection{wxGauge::SetBezelFace}\label{wxgaugesetbezelface} - -\func{void}{SetBezelFace}{\param{int }{width}} - -Sets the 3D bezel face width. - -\wxheading{Remarks} - -Windows only, not for {\bf wxGA\_PROGRESSBAR}. - -\wxheading{See also} - -\helpref{wxGauge::GetBezelFace}{wxgaugegetbezelface} - -\membersection{wxGauge::SetRange}\label{wxgaugesetrange} - -\func{void}{SetRange}{\param{int }{range}} - -Sets the range (maximum value) of the gauge. - -\wxheading{See also} - -\helpref{wxGauge::GetRange}{wxgaugegetrange} - -\membersection{wxGauge::SetShadowWidth}\label{wxgaugesetshadowwidth} - -\func{void}{SetShadowWidth}{\param{int }{width}} - -Sets the 3D shadow width. - -\wxheading{Remarks} - -Windows only, not for {\bf wxGA\_PROGRESSBAR}. - -\membersection{wxGauge::SetValue}\label{wxgaugesetvalue} - -\func{void}{SetValue}{\param{int }{pos}} - -Sets the position of the gauge. - -\wxheading{Parameters} - -\docparam{pos}{Position for the gauge level.} - -\wxheading{See also} - -\helpref{wxGauge::GetValue}{wxgaugegetvalue} - - diff --git a/docs/latex/wx/gdiobj.tex b/docs/latex/wx/gdiobj.tex deleted file mode 100644 index a2b98d53a3..0000000000 --- a/docs/latex/wx/gdiobj.tex +++ /dev/null @@ -1,26 +0,0 @@ -\section{\class{wxGDIObject}}\label{wxgdiobject} - -This class allows platforms to implement functionality to optimise GDI objects, such -as wxPen, wxBrush and wxFont. On Windows, the underling GDI objects are a scarce resource -and are cleaned up when a usage count goes to zero. On some platforms this -class may not have any special functionality. - -Since the functionality of this class is platform-specific, it is not documented here in detail. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxPen}{wxpen}, \helpref{wxBrush}{wxbrush}, \helpref{wxFont}{wxfont} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxGDIObject::wxGDIObject}\label{wxgdiobjectconstr} - -\func{}{wxGDIObject}{\void} - -Default constructor. - - diff --git a/docs/latex/wx/grid.tex b/docs/latex/wx/grid.tex deleted file mode 100644 index 7893892a05..0000000000 --- a/docs/latex/wx/grid.tex +++ /dev/null @@ -1,517 +0,0 @@ -\section{\class{wxGrid}}\label{wxgrid} - -wxGrid is a class for displaying and editing tabular information. - -\wxheading{Derived from} - -\helpref{wxPanel}{wxpanel}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -There are no specific window styles for this class. - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{See also} - -\helpref{wxGrid classes overview}{gridoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxGrid::wxGrid}\label{wxgridconstr} - -\func{void}{wxGrid}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id}, \param{const wxPoint\&}{ pos}, -\rtfsp\param{const wxSize\&}{ size}, \param{long}{ style=0}, \param{const wxString\& }{name="grid"}} - -Constructor. Before using a wxGrid object, you must call CreateGrid to set up the required rows and columns. - -\membersection{wxGrid::AdjustScrollbars}\label{wxgridadjustscrollbars} - -\func{void}{AdjustScrollbars}{\void} - -Call this function whenever a change has been made via the API that might alter the scrollbar characteristics: -particularly when adding or deleting rows, or changing row or column dimensions. For example, -removing rows might make it unnecessary to show the vertical scrollbar. - -\membersection{wxGrid::AppendCols}\label{wxgridappendcols} - -\func{bool}{AppendCols}{\param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}} - -Appends {\it n} columns to the grid. If {\it updateLabels} is TRUE, -the function OnChangeLabels is called to give the application the opportunity to relabel. - -\membersection{wxGrid::AppendRows}\label{wxgridappendrows} - -\func{bool}{AppendRows}{\param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}} - -Appends {\it n} rows to the grid. If {\it updateLabels} is TRUE, -the function OnChangeLabels is called to give the application the opportunity to relabel. - -\membersection{wxGrid::BeginBatch}\label{wxgridbeginbatch} - -\func{void}{BeginBatch}{\void} - -Start a BeginBatch/EndBatch pair between which, calls to SetCellValue or -SetCellBitmap will not cause a refresh. This allows you to speed up some operations -(for example, setting several hundred cell values). You can nest, but not overlap, -these two functions. - -See also \helpref{wxGrid::EndBatch}{wxgridendbatch}, \helpref{wxGrid::GetBatchCount}{wxgridgetbatchcount}. - -\membersection{wxGrid::CellHitTest}\label{wxgridcellhittest} - -\func{bool}{CellHitTest}{\param{int}{ x}, \param{int}{ y}, \param{int *}{row}, \param{int *}{col}} - -Returns TRUE if the x, y panel position coincides with a cell. If so, {\it row} and {\it col} are -returned. - -\membersection{wxGrid::CreateGrid}\label{wxgridcreategrid} - -\func{bool}{CreateGrid}{\param{int}{ rows}, \param{int}{ cols}, \param{wxString **}{cellValues=NULL}, - \param{short *}{widths=NULL}, \param{short}{ defaultWidth=wxGRID\_DEFAULT\_CELL\_WIDTH}, - \param{short}{ defaultHeight=wxGRID\_DEFAULT\_CELL\_HEIGHT}} - -Creates a grid {\it rows} high and {\it cols} wide. You can optionally specify an array of initial values -and widths, and/or default cell width and height. - -Call this function after creating the wxGrid object. - -\membersection{wxGrid::CurrentCellVisible}\label{wxgridcurrentcellvisible} - -\func{bool}{CurrentCellVisible}{\void} - -Returns TRUE if the currently selected cell is visible, FALSE otherwise. - -\membersection{wxGrid::DeleteCols}\label{wxgriddeletecols} - -\func{bool}{DeleteCols}{\param{int}{ pos=0}, \param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}} - -Deletes {\it n} columns from the grid at position {\it pos}. If {\it updateLabels} is TRUE, -the function OnChangeLabels is called to give the application the opportunity to relabel. - -\membersection{wxGrid::DeleteRows}\label{wxgriddeleterows} - -\func{bool}{DeleteRows}{\param{int}{ pos=0}, \param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}} - -Deletes {\it n} rows from the grid at position {\it pos}. If {\it updateLabels} is TRUE, -the function OnChangeLabels is called to give the application the opportunity to relabel. - -\membersection{wxGrid::EndBatch}\label{wxgridendbatch} - -\func{void}{EndBatch}{\void} - -End a BeginBatch/EndBatch pair between which, calls to SetCellValue or -SetCellBitmap will not cause a refresh. This allows you to speed up some operations -(for example, setting several hundred cell values). You can nest, but not overlap, -these two functions. - -See also \helpref{wxGrid::BeginBatch}{wxgridbeginbatch}, \helpref{wxGrid::GetBatchCount}{wxgridgetbatchcount}. - -\membersection{wxGrid::GetBatchCount}\label{wxgridgetbatchcount} - -\func{void}{GetBatchCount}{\void} - -Return the level of batch nesting. This is initially zero, and will be incremented -every time BeginBatch is called, and decremented when EndBatch is called. When the -batch count is more zero, some functions (such as SetCellValue and SetCellBitmap) will -not refresh the cell. - -See also \helpref{wxGrid::BeginBatch}{wxgridbeginbatch}, \helpref{wxGrid::EndBatch}{wxgridendbatch}. - -\membersection{wxGrid::GetCell}\label{wxgridgetcell} - -\func{wxGridCell *}{GetCell}{\param{int}{ row}, \param{int}{ col}} - -Returns the grid cell object associated with this position. - -wxGenericGrid implementation only. - -\membersection{wxGrid::GetCellAlignment}\label{wxgridgetcellalignment} - -\func{int}{GetCellAlignment}{\param{int}{ row}, \param{int}{ col}} - -\func{int}{GetCellAlignment}{\void} - -Sets the text alignment for the cell at the given position, or the global alignment value. -The return value is wxLEFT, wxRIGHT or wxCENTRE. - -\membersection{wxGrid::GetCellBackgroundColour}\label{wxgridgetcellbackgroundcolour} - -\func{wxColour\&}{GetCellBackgroundColour}{\param{int}{ row}, \param{int}{ col}} - -\func{wxColour\&}{GetCellBackgroundColour}{\void} - -Gets the background colour for the cell at the given position, or the global background colour. - -\membersection{wxGrid::GetCells}\label{wxgridgetcells} - -\func{wxGridCell ***}{GetCells}{\void} - -Returns the array of grid cell object associated with this wxGrid. - -\membersection{wxGrid::GetCellTextColour}\label{wxgridgetcelltextcolour} - -\func{wxColour\&}{GetCellTextColour}{\param{int}{ row}, \param{int}{ col}} - -\func{wxColour\&}{GetCellTextColour}{\void} - -Gets the text colour for the cell at the given position, or the global text colour. - -\membersection{wxGrid::GetCellTextFont}\label{wxgridgetcelltextfont} - -\func{wxFont *}{GetCellTextFont}{\param{int}{ row}, \param{int}{ col}} - -\func{wxFont *}{GetCellTextFont}{\void} - -Gets the text font for the cell at the given position, or the global text font. - -\membersection{wxGrid::GetCellValue}\label{wxgridgetcellvalue} - -\func{wxString\&}{GetCellValue}{\param{int}{ row}, \param{int}{ col}} - -Returns the cell value at the given position. - -\membersection{wxGrid::GetCols}\label{wxgridgetcols} - -\func{int}{GetCols}{\void} - -Returns the number of columns in the grid. - -\membersection{wxGrid::GetColumnWidth}\label{wxgridcolumnwidth} - -\func{int}{GetColumnWidth}{\param{int}{ col}} - -Gets the width in pixels for column {\it col}. - -\membersection{wxGrid::GetCurrentRect}\label{wxgridgetcurrentrect} - -\func{wxRectangle *}{GetCurrentRect}{\void} - -Returns a pointer to the rectangle enclosing the currently selected cell. -Do not delete this pointer. - -\membersection{wxGrid::GetCursorColumn}\label{wxgridgetcursorcolumn} - -\func{int}{GetCursorColumn}{\void} - -Returns the column position of the currently selected cell. - -\membersection{wxGrid::GetCursorRow}\label{wxgridgetcursorrow} - -\func{int}{GetCursorRow}{\void} - -Returns the row position of the currently selected cell. - -\membersection{wxGrid::GetEditable}\label{wxgridgeteditable} - -\func{bool}{GetEditable}{\void} - -Returns TRUE if the grid cells can be edited. - -\membersection{wxGrid::GetHorizScrollBar}\label{wxgridgethorizscrollbar} - -\func{wxScrollBar *}{GetHorizScrollBar}{\void} - -Returns a pointer to the horizontal scrollbar. - -\membersection{wxGrid::GetLabelAlignment}\label{wxgridgetlabelalignment} - -\func{int}{GetLabelAlignment}{\param{int}{ orientation}} - -Gets the row or column label alignment. {\it orientation} should -be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp -{\it alignment} should be wxCENTRE, wxLEFT or wxRIGHT. - -\membersection{wxGrid::GetLabelBackgroundColour}\label{wxgridgetlabelbackgroundcolour} - -\func{wxColour\&}{GetLabelBackgroundColour}{\void} - -Gets a row and column label text colour. - -\membersection{wxGrid::GetLabelSize}\label{wxgridgetlabelsize} - -\func{int}{GetLabelSize}{\param{int}{ orientation}} - -Gets the row label height, or column label width, in pixels. {\it orientation} should -be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label. - -\membersection{wxGrid::GetLabelTextColour}\label{wxgridgetlabeltextcolour} - -\func{wxColour\&}{GetLabelTextColour}{\void} - -Gets a row and column label text colour. - -\membersection{wxGrid::GetLabelTextFont}\label{wxgridgetlabeltextfont} - -\func{wxFont *}{GetLabelTextFont}{\void} - -Gets the font to be used for the row and column labels. - -\membersection{wxGrid::GetLabelValue}\label{wxgridgetlabelvalue} - -\func{wxString\&}{GetLabelValue}{\param{int}{ orientation}, \param{int}{ pos}} - -Gets a row or column label value. {\it orientation} should -be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp -{\it pos} is the label position. - -\membersection{wxGrid::GetRowHeight}\label{wxgridgetrowheight} - -\func{int}{GetRowHeight}{\param{int}{ row}} - -Gets the height in pixels for row {\it row}. - -\membersection{wxGrid::GetRows}\label{wxgridgetrows} - -\func{int}{GetRows}{\void} - -Returns the number of rows in the grid. - -\membersection{wxGrid::GetScrollPosX}\label{wxgridgetscrollposx} - -\func{int}{GetScrollPosX}{\void} - -Returns the column scroll position. - -\membersection{wxGrid::GetScrollPosY}\label{wxgridgetscrollposy} - -\func{int}{GetScrollPosY}{\void} - -Returns the row scroll position. - -\membersection{wxGrid::GetTextItem}\label{wxgridgettextitem} - -\func{wxText *}{GetTextItem}{\void} - -Returns a pointer to the text item used for entering text into a cell. - -\membersection{wxGrid::GetVertScrollBar}\label{wxgridgetvertscrollbar} - -\func{wxScrollBar *}{GetVertScrollBar}{\void} - -Returns a pointer to the vertical scrollbar. - -\membersection{wxGrid::InsertCols}\label{wxgridinsertcols} - -\func{bool}{InsertCols}{\param{int}{ pos=0}, \param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}} - -Inserts {\it n} number of columns before position {\it pos}. If {\it updateLabels} is TRUE, -the function OnChangeLabels is called to give the application the opportunity to relabel. - -\membersection{wxGrid::InsertRows}\label{wxgridinsertrows} - -\func{bool}{InsertRows}{\param{int}{ pos=0}, \param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}} - -Inserts {\it n} number of rows before position {\it pos}. If {\it updateLabels} is TRUE, -the function OnChangeLabels is called to give the application the opportunity to relabel. - -\membersection{wxGrid::OnActivate}\label{wxgridonactivate} - -\func{void}{OnActivate}{\param{bool}{ active}} - -Sets the text item to have the focus. Call this function when the wxGrid window should have the -focus, for example from wxFrame::OnActivate. - -\membersection{wxGrid::OnChangeLabels}\label{wxgridonchangelabels} - -\func{void}{OnChangeLabels}{\void} - -Called when rows and columns are created or deleted, to allow the application an -opportunity to update the labels. By default, columns are labelled alphabetically, -and rows numerically. - -\membersection{wxGrid::OnChangeSelectionLabel}\label{wxgridonchangeselectionlabel} - -\func{void}{OnChangeSelectionLabel}{\void} - -Called when a cell is selected, to allow the application an -opportunity to update the selection label (the label of the wxText item -used for entering cell text). By default, the cell column letter and row -number are concatenated to form the selection label. - -\membersection{wxGrid::OnCreateCell}\label{wxgridoncreatecell} - -\func{wxGridCell *}{OnCreateCell}{\void} - -Override this virtual function if you want to replace the normal wxGridCell with a derived -class. - -\membersection{wxGrid::OnCellLeftClick}\label{wxgridoncellleftclick} - -\func{void}{OnLeftClick}{\param{int}{ row}, \param{int}{ col}, \param{int}{ x}, \param{int}{ y}, \param{bool}{ control}, \param{bool}{ shift}} - -Virtual function called when the left button is depressed within a cell, just after OnSelectCell is called. - -\membersection{wxGrid::OnCellRightClick}\label{wxgridoncellrightclick} - -\func{void}{OnRightClick}{\param{int}{ row}, \param{int}{ col}, \param{int}{ x}, \param{int}{ y}, \param{bool}{ control}, \param{bool}{ shift}} - -Virtual function called when the right button is depressed within a cell, just after OnSelectCell is called. - -\membersection{wxGrid::OnLabelLeftClick}\label{wxgridonlabelleftclick} - -\func{void}{OnLeftClick}{\param{int}{ row}, \param{int}{ col}, \param{int}{ x}, \param{int}{ y}, \param{bool}{ control}, \param{bool}{ shift}} - -Virtual function called when the left button is depressed within a -label. - -{\it row} will be {\it -1} if the click is in the top labels. - -{\it col} will be {\it -1} if the click is in the left labels. - -{\it row} and {\it col} will be {\it -1} if the click is in the upper -left corner. - -\membersection{wxGrid::OnLabelRightClick}\label{wxgridonlabelrightclick} - -\func{void}{OnRightClick}{\param{int}{ row}, \param{int}{ col}, \param{int}{ x}, \param{int}{ y}, \param{bool}{ control}, \param{bool}{ shift}} - -Virtual function called when the right button is depressed within a label. - -{\it row} will be {\it -1} if the click is in the top labels. - -{\it col} will be {\it -1} if the click is in the left labels. - -{\it row} and {\it col} will be {\it -1} if the click is in the upper -left corner. - -\membersection{wxGrid::OnSelectCell}\label{wxgridonselectcell} - -\func{void}{OnSelectCell}{\param{int}{ row}, \param{int}{ col}} - -Virtual function called when the user left-clicks on a cell. - -\membersection{wxGrid::OnSelectCellImplementation}\label{wxgridonselectcellimplementation} - -\func{void}{OnSelectCellImplementation}{\param{wxDC *}{dc}, \param{int}{ row}, \param{int}{ col}} - -Virtual function called when the user left-clicks on a cell. If you override this function, -call wxGrid::OnSelectCell to apply the default behaviour. - -\membersection{wxGrid::SetCellAlignment}\label{wxgridsetcellalignment} - -\func{void}{SetCellAlignment}{\param{int}{ alignment}, \param{int}{ row}, \param{int}{ col}} - -\func{void}{SetCellAlignment}{\param{int}{ alignment}} - -Sets the text alignment for the cell at the given position, or for the whole grid. {\it alignment} may be wxLEFT, wxRIGHT or wxCENTRE. - -\membersection{wxGrid::SetCellBackgroundColour}\label{wxgridsetcellbackgroundcolour} - -\func{void}{SetCellBackgroundColour}{\param{const wxColour\&}{ colour}, \param{int}{ row}, \param{int}{ col}} - -\func{void}{SetCellBackgroundColour}{\param{const wxColour\&}{ colour}} - -Sets the background colour for the cell at the given position, or for the whole grid. - -\membersection{wxGrid::SetCellTextColour}\label{wxgridsetcelltextcolour} - -\func{void}{SetCellTextColour}{\param{const wxColour\&}{ colour}, \param{int}{ row}, \param{int}{ col}} - -\func{void}{SetCellTextColour}{\param{const wxColour\&}{ colour}} - -Sets the text colour for the cell at the given position, or for the whole grid. - -\membersection{wxGrid::SetCellTextFont}\label{wxgridsetcelltextfont} - -\func{void}{SetCellTextFont}{\param{wxFont *}{font}, \param{int}{ row}, \param{int}{ col}} - -\func{void}{SetCellTextFont}{\param{wxFont *}{font}} - -Sets the text font for the cell at the given position, or for the whole grid. - -\membersection{wxGrid::SetCellValue}\label{wxgridsetcellvalue} - -\func{void}{SetCellValue}{\param{const wxString\&}{ val}, \param{int}{ row}, \param{int}{ col}} - -Sets the cell value at the given position. - -\membersection{wxGrid::SetColumnWidth}\label{wxgridsetcolumnwidth} - -\func{void}{SetColumnWidth}{\param{int}{ col}, \param{int}{ width}} - -Sets the width in pixels for column {\it col}. - -\membersection{wxGrid::SetDividerPen}\label{wxgridsetdividerpen} - -\func{void}{SetDividerPen}{\param{wxPen *}{pen}} - -Specifies the pen to be used for drawing the divisions between cells. The default -is a light grey. If NULL is specified, the divisions will not be drawn. - -\membersection{wxGrid::SetEditable}\label{wxgridseteditable} - -\func{void}{SetEditable}{\param{bool}{ editable}} - -If {\it editable} is TRUE (the default), the grid cells will be editable by means of the -text edit control. If FALSE, the text edit control will be hidden and the user will not -be able to edit the cell contents. - -\membersection{wxGrid::SetGridCursor}\label{wxgridsetgridcursor} - -\func{void}{SetGridCursor}{\param{int }{row}, \param{int}{ col}} - -Sets the position of the selected cell. - -\membersection{wxGrid::SetLabelAlignment}\label{wxgridsetlabelalignment} - -\func{void}{SetLabelAlignment}{\param{int}{ orientation}, \param{int}{ alignment}} - -Sets the row or column label alignment. {\it orientation} should -be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp -{\it alignment} should be wxCENTRE, wxLEFT or wxRIGHT. - -\membersection{wxGrid::SetLabelBackgroundColour}\label{wxgridsetlabelbackgroundcolour} - -\func{void}{SetLabelBackgroundColour}{\param{const wxColour\&}{ value}} - -Sets a row or column label background colour. - -\membersection{wxGrid::SetLabelSize}\label{wxgridsetlabelsize} - -\func{void}{SetLabelSize}{\param{int}{ orientation}, \param{int}{ size}} - -Sets the row label height, or column label width, in pixels. {\it orientation} should -be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label. - -If a dimension of zero is specified, the row or column labels will not be -shown. - -\membersection{wxGrid::SetLabelTextColour}\label{wxgridsetlabeltextcolour} - -\func{void}{SetLabelTextColour}{\param{const wxColour\&}{ value}} - -Sets a row and column label text colour. - -\membersection{wxGrid::SetLabelTextFont}\label{wxgridsetlabeltextfont} - -\func{void}{SetLabelTextFont}{\param{wxFont *}{font}} - -Sets the font to be used for the row and column labels. - -\membersection{wxGrid::SetLabelValue}\label{wxgridsetlabelvalue} - -\func{void}{SetLabelValue}{\param{int}{ orientation}, \param{const wxString\&}{ value}, \param{int}{ pos}} - -Sets a row or column label value. {\it orientation} should -be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp -{\it pos} is the label position. - -\membersection{wxGrid::SetRowHeight}\label{wxgridsetrowheight} - -\func{void}{SetRowHeight}{\param{int}{ row}, \param{int}{ height}} - -Sets the height in pixels for row {\it row}. - -\membersection{wxGrid::UpdateDimensions}\label{wxgridupdatedimensions} - -\func{void}{UpdateDimensions}{\void} - -Call this function whenever a change has been made via the API that -might alter size characteristics. You may also need to follow it with -a call to AdjustScrollbars. - - diff --git a/docs/latex/wx/grid1.bmp b/docs/latex/wx/grid1.bmp deleted file mode 100644 index 100be252da..0000000000 Binary files a/docs/latex/wx/grid1.bmp and /dev/null differ diff --git a/docs/latex/wx/grid1.eps b/docs/latex/wx/grid1.eps deleted file mode 100644 index 76fcc9540b..0000000000 --- a/docs/latex/wx/grid1.eps +++ /dev/null @@ -1,771 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: /home/jacs/wx/utils/wxgrid/docs/grid1.eps -%%Creator: XV Version 3.10a Rev: 12/29/94 - by John Bradley -%%BoundingBox: 36 216 576 576 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% define space for color conversions -/grays 450 string def % space for gray scale line -/npixls 0 def -/rgbindx 0 def - -% lower left corner -36 216 translate - -% size of image (on paper, in 1/72inch coords) -540.00000 360.00000 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays 0 npixls getinterval - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 39 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 bf0000 00bf00 bfbf00 0000bf 00bfbf c0c0c0 808080 ff0000 00ff00 -ffff00 00ffff ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -450 300 8 % dimensions of data -[450 0 0 -300 0 300] % mapping matrix -rlecmapimage - -7f067f067f0640060000 -81060c7f0c7f0c7f0c3d0c810700 -82060c067f067f067f063c06810700 -82060c067f067f067f063c06810700 -82060c068106047f047f047f0438040106810700 -82060c068106048204060c820c060783070c0702010203098102047f047f047f04260401 -06810700 -82060c068106048104060106830001020781070283020702098109028102047f047f0472 -040e0c81000c0d0c81000481040c0d0c81000481040682060700 -82060c06810604810406010601008102078507020902070201028109047f047f04720481 -0c060b068307000c060b068207000482040c060b068207000481040682060700 -82060c0681060481040601068300040307820702098409020702098109041104040c0604 -010c0404010c0504030c1904010c7f047f042504810c060b068307000c06810600070001 -068207000482040c060b068207000481040682060700 -82060c0681060481040601068304000a0789070209020002070209041004010c0204010c -0c04010c0404010c0104010c1804010c7f047f042504810c060b068307000c0681060007 -0001068207000482040c06010601000306010001068207000481040682060700 -82060c068106048204070681060001000107010286000209020702041004010c1104010c -0404010c1c04010c7f047f042504810c060b068307000c06820600060506810006830607 -000482040c06020601000106010002068207000481040682060700 -82060c0681060485040c0607060c010c8407020002090109820200040104010c81040c82 -0c040c820c040c820c040c820c040c810c040504020c81040c810c0481040c030c040401 -0c0604030c0104060c0104040c0104010c0104030c7f047f041f04810c060b068307000c -06820600060506810006830607000482040c060306030003068207000481040682060700 - -82060c068106048104070507010006020204010c81040c820c040c820c040c820c040c82 -0c040c820c040c020c0104010c0104010c81040c810c0481040c810c040404030c060401 -0c81040c820c040c820c040c820c040c810c0481040c820c040c820c040c810c0481040c -810c047f047f041d04810c060b068307000c06820600060506810006830607000482040c -060406010004068207000481040682060700 -82060c068106048104050505010006030204070c0104020c0104010c0204010c0104010c -0104010c81040c810c0481040c810c040704010c0204040c81040c820c040c820c040c82 -0c040c810c0481040c820c040c820c040c040c7f047f041e04810c060b068307000c0682 -0600060506810006830607000482040c060306030003068207000481040682060700 -82060c0681060481040b010b8205010b830b05030a020a81030a810a040104070c010402 -0c0104010c0204010c0104010c0104010c81040c810c0481040c810c040704010c010401 -0c0104010c81040c820c040c820c040c820c040c810c0481040c820c040c820c040c810c -047f047f042104810c060b068307000c06820600060506810006830607000482040c0602 -0601000106010002068207000481040682060700 -82060c068106048c040b05070507050b05030a030a840a03000a040204010c0104010c01 -04010c81040c820c040c810c0481040c010c0104010c0104010c81040c810c0481040c81 -0c040304010c0104010c0104010c0104010c81040c820c040c820c040c820c040c810c04 -81040c820c040c820c040c810c0481040c810c047f047f041d04810c0601060500030683 -07000c06820600060506810006830607000482040c060106010003060100010682070004 -81040682060700 -82060c0681060482040b08020886070b05030a030a010a82030a040204010c0104010c01 -04010c81040c810c0481040c040c0104010c0104010c0104040c0504030c0304040c8104 -0c820c040c820c040c820c040c030c0104010c0104030c7f047f041f04810c0601060500 -03068307000c06810600070001068207000482040c060b068207000481040682060700 -82060c0681060482040b080208010b8205030a810a0384030a030a044304010c7f047f04 -2c04810c060b068307000c060b068207000482040c060b068207000481040682060700 -82060c0681060482040b080308850b05030a030a010a82000a044304010c7f047f042c04 -810c070c0782000c070c0781000482040c070c0781000481040682060700 -82060c068106048c040b05080108010b05030a030a810a0382030a047f047f0472041f00 -01040f0001040106810700 -82060c0681060481040b050b8205030a050a7f047f047f0427040106810700 -82060c068106047f047f047f0438040106810700 -82060c067f067f067f063c06810700 -82060c067f067f067f063c06810700 -82060c067f067f067f063c06810700 -82060c067f067f067f063c06810700 -82060c067f067f067f063c06810700 -82060c0607060400840600060006120602000e068100067f067f067f060306810700 -82060c0607068100060506810006110681000601068100060606810006820600067f067f -067f060606810700 -82060c060706810006050681000611068100060a06810006820600067f067f067f060606 -810700 -82060c0607068100060306830006000681060001000d0681000605060200010601008106 -00860006000600060081000601060300010601007f067f067406810700 -82060c060706030001068500060006000601068100060c06020002068100060106830006 -000682060006830600060081000684060006000601068300060006820600067f067f0672 -06810700 -82060c060706810006030684000600060003001006810006810600030082060006820600 -06840600060006010683000600060106810006820600067f067f067406810700 -82060c060706810006030685000600060006130681000682060006030681000682060006 -84060006000601068300060006010681000601068100067f067f067306810700 -82060c06070681000603068500060006000601068100060b068100060106810006820600 -060106830006000682060006840600060006010683000600060106830006000682060006 -7f067f067206810700 -82060c0607068100060306830006000681060001000e0602000306020002068100068606 -00060006000601068100068106000200010601007f067f067406810700 -82060c0642068100067f067f067706810700 -82060c060606050015060600140603007f067f067906810700 -82060c067f067f067f063c06810700 -82060c067f067f067f063c06810700 -82060c067f067f067f063c06810700 -82060c067f067f067f063c06810700 -82060c061b067f077f077f071e070106810700 -82060c061b068107007f007f007f001b000206810700 -82060c061b068207000c7f0c7f0c7f0c1a0c0206810700 -82060c061b068207000c7f0c7f0c7f0c1a0c0206810700 -82060c061b068207000c7f0c7f0c7f0c1a0c0206810700 -82060c061b068207000c7f0c7f0c7f0c1a0c0206810700 -82060c061b068207000c810c000200820c000c0a0c81000c0f0c81000c820c000c7f0c7f -0c700c0206810700 -82060c060806810006040681000609068207000c820c000c0f0c81000c0f0c81000c820c -000c7f0c7f0c700c0206810700 -82060c0607068300060006020601000a068207000c820c000c020c81000c810c00010001 -0c0600040c0200020c0200010c81000c820c000c7f0c7f0c700c0206810700 -82060c06070683000600060106830006000609068207000c810c000200820c000c820c00 -0c010c81000c030c81000c030c81000c010c83000c000c010c83000c000c820c000c7f0c -7f0c700c0206810700 -82060c0606068100060106810006020681000609068207000c820c000c020c81000c820c -000c020c0200010c81000c030c81000c030c0400820c000c820c000c7f0c7f0c700c0206 -810700 -82060c0606060400030681000609068207000c820c000c020c81000c820c000c050c8300 -0c000c030c81000c010c83000c000c030c81000c820c000c7f0c7f0c700c0206810700 -82060c0606068100060106810006020681000609068207000c820c000c020c81000c820c -000c010c0300010c0100040c0200020c0300820c000c820c000c7f0c7f0c700c02068107 -00 -82060c0605068100060306810006010681000609068207000c7f0c7f0c7f0c1a0c020681 -0700 -82060c061b068207000c7f0c7f0c7f0c1a0c0206810700 -82060c061b068207000c7f0c7f0c7f0c1a0c0206810700 -82060c061b068207000c7f0c7f0c7f0c1a0c0206810700 -82060c061b068207000c7f0c7f0c7f0c1a0c0206810700 -82060c061b068107067f067f067f061e06810700 -82060c061b067f0c7f0c7f0c1e0c0106810700 -82060c067f067f067f063c06810700 -82060c067f067f067f063c06810700 -82060c067f067f067f063c06810700 -82060c067f067f067f063c06810700 -82060c067f067f067f063c06810700 -82060c068106007f007f007f0028000e0681000682060700 -82060c0682060006250681000c4d0c81000c4d0c81000c4d0c81000c7f0c0f0c81060c0b -0c8207000682060700 -82060c0682060006250682000c064c0682000c064c0682000c064c0682000c067f060f06 -810c060a068207000682060700 -82060c0682060006250682000c064c0682000c064c0682000c064c0682000c067f060f06 -810c060a068207000682060700 -82060c0682060006250682000c064c0682000c064c0682000c064c0682000c067f060f06 -810c060a068207000682060700 -82060c0682060006250682000c0624060200240682000c0622060500230682000c062406 -0400220682000c065e0604002b06810c060a068207000682060700 -82060c0682060006250682000c0624060200240682000c06220601000206010022068200 -0c062306010002060100210682000c065e060100010601002a06810c0603068100060406 -8207000682060700 -82060c0682060006250682000c0623060100810600810006220682000c06220601000206 -0100220682000c0622060100270682000c065e060100020601002906810c060206020004 -068207000682060700 -82060c0682060006250682000c0623060100810600810006220682000c06220601000206 -0100220682000c0622060100270682000c065e060100020601002906810c060106040003 -068207000682060700 -82060c0682060006250682000c0623060100810600810006220682000c06220605002306 -82000c0622060100270682000c065e060100020601002906810c06810600050002068207 -000682060700 -82060c0682060006250682000c062206010002060100220682000c062206010002060100 -220682000c0622060100270682000c065e060100020601002906810c060a068207000682 -060700 -82060c0682060006250682000c062206010002060100220682000c062206010002060100 -220682000c0622060100270682000c065e060100020601002906810c060a068207000682 -060700 -82060c0682060006250682000c0622060600220682000c06220601000206010022068200 -0c0622060100270682000c065e060100020601002906810c060a068207000682060700 -82060c0682060006250682000c062106010004060100210682000c062206010002060100 -220682000c062306010002060100210682000c065e060100010601002a06810c060a0682 -07000682060700 -82060c0682060006250682000c062106010004060100210682000c062206050023068200 -0c0624060400220682000c065e0604002b060d0781000682060700 -82060c0682060006250682000c064c0682000c064c0682000c064c0682000c067f060e06 -0f000106810700 -82060c0682060006250682000c064c0682000c064c0682000c064c0682000c067f061d06 -81000682060700 -82060c0682060006250682000c064c0682000c064c0682000c064c0682000c067f060f06 -0c0c8207000682060700 -82060c0682060006250682000c064c0682000c064c0682000c064c0682000c067f060f06 -810c060a068207000682060700 -82060c0682060006250682000c064c0682000c064c0682000c064c0682000c067f060f06 -810c060a068207000682060700 -82060c068106007f007f007f00280082060c060a068207000682060700 -82060c068206000c250c4f0081060c4d0c81060c4d0c81060c7f0c0f0c82060c060a0682 -07000682060700 -82060c068306000c06240601004c0c8200060c4d0c81060c4d0c81060c7f0c0f0c82060c -060a068207000682060700 -82060c068306000c06240601004c0c8200060c4d0c81060c4d0c81060c7f0c0f0c82060c -060a068207000682060700 -82060c068306000c06240601004c0c8200060c4d0c81060c4d0c81060c7f0c0f0c82060c -060a068207000682060700 -82060c068306000c0624060100030c0700210c0100010c0100180c8200060c4d0c81060c -4d0c81060c7f0c0f0c82060c060a068207000682060700 -82060c068306000c061006010011060100040c81000c030c83000c000c0b0c81000c110c -81000c010c81000c170c8200060c4d0c81060c4d0c81060c7f0c0f0c82060c060a068207 -000682060700 -82060c068306000c060f06020011060100040c81000c820c000c820c000c0d0c81000c11 -0c81000c010c81000c170c8200060c4d0c81060c4d0c81060c7f0c0f0c82060c060a0682 -07000682060700 -82060c068306000c060e06030011060100040c81000c820c000c010c0100810c0082000c -0082000c000100810c000200050c0200020c0200020c81000c010c81000c170c8200060c -4d0c81060c4d0c81060c7f0c0f0c82060c060a068207000682060700 -82060c068306000c060e068200060081000610060100040c0300030c81000c840c000c00 -0c820c000c020c81000c050c81000c820c000c820c000c820c000c820c000c010c81000c -180c8200060c4d0c81060c4d0c81060c7f0c0f0c82060c060a068207000682060700 -82060c068306000c061006010011060100030c81000c820c000c020c81000c010c010002 -0c81000c020c81000c050c81000c020c81000c010c81000c820c000c010c81000c180c82 -00060c4d0c81060c4d0c81060c7f0c0f0c8106070c0781000682060700 -82060c068306000c061006010011060100030c81000c820c000c020c81000c010c81000c -030c81000c010c81000c040c81000c030c81000c820c000c010c81000c010c81000c180c -8200060c4d0c81060c4d0c81060c7f0c0f0c0f000106810700 -82060c068306000c061006010011060100030c81000c050c81000c010c81000c040c8100 -0c820c000c040c81000c030c0200030c81000c010c81000c180c8200060c4d0c81060c4d -0c81060c7f0c0f0c8107060c0681070682060700 -82060c068306000c061006010011060100020c81000c050c81000c010c81000c020c8100 -0c860c000c000c000c030c81000c820c000c820c000c010c83000c000c010c81000c190c -8200060c4d0c81060c4d0c81060c7f0c0f0c8107060c0681070682060700 -82060c068306000c061006010011060100010c0200050c0100010c81000c020c0200010c -0100060c0100030c0200010c0100010c0100190c8200060c4d0c81060c4d0c81060c7f0c -0f0c8107060c0681070682060700 -82060c068306000c0610060100110601004c0c8200060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c06240601004c0c8200060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240601004c0c8200060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240601004c0c8200060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068206000625064f0081060c4d0c81060c4d0c81060c7f0c0f0c8107060c068107 -0682060700 -82060c0681060027007f067f067f06820607060c0681070682060700 -82060c068206000c250c81000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c -0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c050c81080c150c81080c210c81080c820c -080c060c81060c4d0c81060c7f0c0f0c8107060c0681070682060700 -82060c068306000c060e060300110681000c4d0c81060c040c83080c080c100c81080c01 -0c81080c210c81080c820c080c060c81060c4d0c81060c7f0c0f0c8107060c0681070682 -060700 -82060c068306000c060d06010001060100100681000c4d0c81060c040c83080c080c100c -81080c010c81080c210c81080c820c080c060c81060c4d0c81060c7f0c0f0c8107060c06 -81070682060700 -82060c068306000c0611060100100681000c4d0c81060c040c83080c080c020c82080c08 -81080c020c0208010c0208010c82080c0881080c020c0208020c83080c080c040c020803 -0c0208020c81080c820c080c060c81060c4d0c81060c7f0c0f0c8107060c068107068206 -0700 -82060c068306000c0611060100100681000c4d0c81060c030c81080c010c81080c010c01 -08010c81080c820c080c010c81080c820c080c010c0108010c81080c820c080c010c8108 -0c810c0881080c040c81080c010c81080c820c080c010c81080c820c080c820c080c060c -81060c4d0c81060c7f0c0f0c8107060c0681070682060700 -82060c068306000c0610060100110681000c4d0c81060c030c81080c010c81080c010c81 -080c010c81080c820c080c010c81080c820c080c010c81080c010c81080c820c080c010c -81080c820c080c050c81080c040c81080c010c81080c820c080c820c080c060c81060c4d -0c81060c7f0c0f0c8107060c0681070682060700 -82060c068306000c060f060200110681000c4d0c81060c020c0608010c81080c010c8108 -0c820c080c010c81080c820c080c010c81080c010c81080c810c080308010c81080c050c -81080c040c0408010c81080c820c080c060c81060c4d0c81060c7f0c0f0c8107060c0681 -070682060700 -82060c068306000c060f060100120681000c4d0c81060c020c81080c030c81080c820c08 -0c010c81080c820c080c010c81080c820c080c010c81080c010c81080c820c080c040c81 -080c050c81080c040c81080c040c81080c820c080c060c81060c4d0c81060c7f0c0f0c81 -07060c0681070682060700 -82060c068306000c060e060100130681000c4d0c81060c010c81080c050c83080c080c01 -0c81080c820c080c010c81080c820c080c010c81080c010c81080c820c080c010c81080c -820c080c050c81080c010c81080c820c080c010c81080c820c080c820c080c060c81060c -4d0c81060c7f0c0f0c8107060c0681070682060700 -82060c068306000c060d060100140681000c4d0c81060c010c81080c050c83080c080c01 -0c81080c010c0208020c0108010c81080c010c81080c010c0208020c81080c060c020803 -0c0208020c81080c820c080c060c81060c4d0c81060c7f0c0f0c8107060c068107068206 -0700 -82060c068306000c060d060500100681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c0682060006250681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c -0681070682060700 -82060c0681060027007f067f067f06820607060c0681070682060700 -82060c068206000c250c81000c4d0c81060c4d0c81060b4d0b81060c7f0c0f0c8107060c -0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060b4d0b81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060b4d0b81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060b4d0b81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060b020b81000b030b81000b280b -81000b170b81060c7f0c0f0c8107060c0681070682060700 -82060c068306000c060e060300110681000c4d0c81060c4d0c81060b030b81000b010b81 -000b080b81000b1a0b81000b010b81000b170b81060c7f0c0f0c8107060c068107068206 -0700 -82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060b030b8100 -0b010b81000b080b81000b1a0b81000b010b81000b170b81060c7f0c0f0c8107060c0681 -070682060700 -82060c068306000c0611060100100681000c4d0c81060c4d0c81060b040b83000b000b03 -0b0200010b0200060b0200020b82000b0081000b020b0200010b0200010b82000b008100 -0b020b0200020b83000b000b040b81000b820b060c7f0c0f0c8107060c06810706820607 -00 -82060c068306000c0611060100100681000c4d0c81060c4d0c81060b040b83000b000b02 -0b81000b010b81000b820b000b050b81000b010b81000b810b0081000b820b000b820b00 -0b010b81000b820b000b010b0100010b81000b820b000b010b81000b810b0081000b040b -81000b010b81060c7f0c0f0c8107060c0681070682060700 -82060c068306000c060f060200110681000c4d0c81060c4d0c81060b050b81000b030b81 -000b010b81000b820b000b090b81000b820b000b010b81000b820b000b010b81000b820b -000b010b81000b010b81000b820b000b010b81000b820b000b050b81000b010b81060c7f -0c0f0c8107060c0681070682060700 -82060c068306000c0611060100100681000c4d0c81060c4d0c81060b050b81000b030b04 -00010b81000b060b0300010b81000b010b81000b820b000b010b81000b820b000b010b81 -000b010b81000b810b000300010b81000b050b81000b010b81060c7f0c0f0c8107060c06 -81070682060700 -82060c068306000c0611060100100681000c4d0c81060c4d0c81060b050b81000b030b81 -000b040b81000b050b81000b010b81000b820b000b010b81000b820b000b010b81000b82 -0b000b010b81000b010b81000b820b000b040b81000b050b81000b010b81060c7f0c0f0c -8107060c0681070682060700 -82060c068306000c0611060100100681000c4d0c81060c4d0c81060b050b81000b030b81 -000b010b81000b820b000b050b81000b810b0081000b820b000b010b81000b820b000b01 -0b81000b820b000b010b81000b010b81000b820b000b010b81000b820b000b050b81000b -010b81060c7f0c0f0c8107060c0681070682060700 -82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060b050b8100 -0b040b0200020b0100060b0100820b000b820b000b010b81000b010b0200020b0100010b -81000b010b81000b010b0200020b81000b060b81000b820b060c7f0c0f0c8107060c0681 -070682060700 -82060c068306000c060e060300110681000c4d0c81060c4d0c81060b4d0b81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060b4d0b81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060b4d0b81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060b4d0b81060c7f0c0f0c810706 -0c0681070682060700 -82060c0682060006250681000c4d0c81060c4d0c81060b4d0b81060c7f0c0f0c8107060c -0681070682060700 -82060c0681060027007f067f067f06820607060c0681070682060700 -82060c068206000c250c81000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c -0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c0610060100110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c0610060100110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c060f060200110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c060f060200110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c060e0682000600810006100681000c4d0c81060c4d0c81060c4d0c81 -060c7f0c0f0c8107060c0681070682060700 -82060c068306000c060e0682000600810006100681000c4d0c81060c4d0c81060c4d0c81 -060c7f0c0f0c8107060c0681070682060700 -82060c068306000c060d06810006810600810006100681000c4d0c81060c4d0c81060c4d -0c81060c7f0c0f0c8107060c0681070682060700 -82060c068306000c060d060500100681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c0610060100110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c0610060100110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c0682060006250681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c -0681070682060700 -82060c0681060027007f067f067f06820607060c0681070682060700 -82060c068206000c250c81000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c -0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c060e060400100681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c060e060100130681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c060d060100140681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c060d060400110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106 -0c7f0c0f0c8107060c0681070682060700 -82060c068306000c0611060100100681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c0611060100100681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c0611060100100681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106 -0c7f0c0f0c8107060c0681070682060700 -82060c068306000c060e060300110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c0682060006250681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c -0681070682060700 -82060c0681060027007f067f067f06820607060c0681070682060700 -82060c068206000c250c81000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c -0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c060f060200110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c060e068100068106008100060f0681000c4d0c81060c4d0c81060c4d -0c81060c7f0c0f0c8107060c0681070682060700 -82060c068306000c060d060100140681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c060d060100140681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c060d060400110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106 -0c7f0c0f0c8107060c0681070682060700 -82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106 -0c7f0c0f0c8107060c0681070682060700 -82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106 -0c7f0c0f0c8107060c0681070682060700 -82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106 -0c7f0c0f0c8107060c0681070682060700 -82060c068306000c060e060300110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c0682060006250681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c -0681070682060700 -82060c0681060027007f067f067f06820607060c0681070682060700 -82060c068206000c250c81000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c -0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c060d060500100681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c0611060100100681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c0610060100110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c0610060100110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c060f060100120681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c060f060100120681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c060f060100120681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c060e060100130681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c060e060100130681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c060e060100130681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c0682060006250681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c -0681070682060700 -82060c0681060027007f067f067f06820607060c0681070682060700 -82060c068206000c250c81000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c -0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706 -0c0681070682060700 -82060c068306000c060e060300110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106 -0c7f0c0f0c8107060c0681070682060700 -82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106 -0c7f0c0f0c8107060c0681070682060700 -82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106 -0c7f0c0f0c8107060c0681070682060700 -82060c068306000c060e060300110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8107060c0681070682060700 -82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106 -0c7f0c0f0c8107060c0681070682060700 -82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106 -0c7f0c0f0c0e0681000682060700 -82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106 -0c7f0c0f0c81060c0b0c8207000682060700 -82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106 -0c7f0c0f0c82060c060a068207000682060700 -82060c068306000c060e060300110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c82060c060a068207000682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c82060c -060a068207000682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c82060c -060a068207000682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c82060c -06810600050002068207000682060700 -82060c0682060006250681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c82060c06 -0106040003068207000682060700 -82060c0681060027007f067f067f060106810c060206020004068207000682060700 -82060c068206000c250c81000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c82060c06 -030681000604068207000682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c82060c -060a068207000682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c82060c -060a068207000682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c82060c -060a068207000682060700 -82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c82060c -060a068207000682060700 -82060c068306000c060e060300110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f -0c8106070c0781000682060700 -82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106 -0c7f0c0f0c0f000106810700 -82060c060f068100060d068100077f077f0778070e068100061006810700 -82060c0601060c0c830700060c0b0c820700067f067f0679060c0c820700061006810700 - -82060c060106810c060a06840700060c060a06820700067f067f067906810c060a068207 -00061006810700 -82060c060106810c060a06840700060c060a06820700067f067f067906810c060a068207 -00061006810700 -82060c060106810c0604068100060306840700060c060a06820700067f067f067906810c -0602068100060506820700061006810700 -82060c060106810c06030601000406840700060c060a06820700067f067f067906810c06 -020601000506820700061006810700 -82060c060106810c06020602000406840700060c060a06820700067f067f067906810c06 -020602000406820700061006810700 -82060c060106810c06010603000406840700060c060a06820700067f067f067906810c06 -020603000306820700061006810700 -82060c060106810c06020602000406840700060c060a06820700067f067f067906810c06 -020602000406820700061006810700 -82060c060106810c06030601000406840700060c060a06820700067f067f067906810c06 -020601000506820700061006810700 -82060c060106810c0604068100060306840700060c060a06820700067f067f067906810c -0602068100060506820700061006810700 -82060c060106810c060a06840700060c060a06820700067f067f067906810c060a068207 -00061006810700 -82060c060106810c060a06840700060c060a06820700067f067f067906810c060a068207 -00061006810700 -82060c060106810c060a06840700060c060a06820700067f067f067906810c060a068207 -00061006810700 -82060c0601060d07820006070c078100067f067f0679060d078100061006810700 -82060c068106001e007f077f0779070f001106810700 -82060c067f067f067f063c06810700 -82060c067f067f067f063c06810700 -8106077f077f077f073e070000 -7f007f007f004100 - -% -% Compression made this file 3.88% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/docs/latex/wx/grid1.gif b/docs/latex/wx/grid1.gif deleted file mode 100644 index 4cdbde7c49..0000000000 Binary files a/docs/latex/wx/grid1.gif and /dev/null differ diff --git a/docs/latex/wx/hand1.bmp b/docs/latex/wx/hand1.bmp deleted file mode 100644 index 1b2d73e236..0000000000 Binary files a/docs/latex/wx/hand1.bmp and /dev/null differ diff --git a/docs/latex/wx/hash.tex b/docs/latex/wx/hash.tex deleted file mode 100644 index 5cb1232974..0000000000 --- a/docs/latex/wx/hash.tex +++ /dev/null @@ -1,118 +0,0 @@ -\section{\class{wxHashTable}}\label{wxhashtable} - -This class provides hash table functionality for wxWindows, and for an -application if it wishes. Data can be hashed on an integer or string -key. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{Example} - -Below is an example of using a hash table. - -\begin{verbatim} - wxHashTable table(KEY_STRING); - - wxPoint *point = new wxPoint(100, 200); - table.Put("point 1", point); - - .... - - wxPoint *found_point = (wxPoint *)table.Get("point 1"); -\end{verbatim} - -A hash table is implemented as an array of pointers to lists. When no -data has been stored, the hash table takes only a little more space than -this array (default size is 1000). When a data item is added, an -integer is constructed from the integer or string key that is within the -bounds of the array. If the array element is NULL, a new (keyed) list is -created for the element. Then the data object is appended to the list, -storing the key in case other data objects need to be stored in the list -also (when a `collision' occurs). - -Retrieval involves recalculating the array index from the key, and searching -along the keyed list for the data object whose stored key matches the passed -key. Obviously this is quicker when there are fewer collisions, so hashing -will become inefficient if the number of items to be stored greatly exceeds -the size of the hash table. - -\wxheading{See also} - -\helpref{wxList}{wxlist} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxHashTable::wxHashTable} - -\func{}{wxHashTable}{\param{unsigned int}{ key\_type}, \param{int}{ size = 1000}} - -Constructor. {\it key\_type} is one of wxKEY\_INTEGER, or wxKEY\_STRING, -and indicates what sort of keying is required. {\it size} is optional. - -\membersection{wxHashTable::\destruct{wxHashTable}} - -\func{}{\destruct{wxHashTable}}{\void} - -Destroys the hash table. - -\membersection{wxHashTable::BeginFind} - -\func{void}{BeginFind}{\void} - -The counterpart of {\it Next}. If the application wishes to iterate -through all the data in the hash table, it can call {\it BeginFind} and -then loop on {\it Next}. - -\membersection{wxHashTable::Clear} - -\func{void}{Clear}{\void} - -Clears the hash table of all nodes (but as usual, doesn't delete user data). - -\membersection{wxHashTable::Delete} - -\func{wxObject *}{Delete}{\param{long}{ key}} - -\func{wxObject *}{Delete}{\param{const wxString\& }{ key}} - -Deletes entry in hash table and returns the user's data (if found). - -\membersection{wxHashTable::Get} - -\func{wxObject *}{Get}{\param{long}{ key}} - -\func{wxObject *}{Get}{\param{const wxString\& }{ key}} - -Gets data from the hash table, using an integer or string key (depending on which -has table constructor was used). - -\membersection{wxHashTable::MakeKey} - -\func{long}{MakeKey}{\param{const wxString\& }{string}} - -Makes an integer key out of a string. An application may wish to make a key -explicitly (for instance when combining two data values to form a key). - -\membersection{wxHashTable::Next} - -\func{wxNode *}{Next}{\void} - -If the application wishes to iterate through all the data in the hash -table, it can call {\it BeginFind} and then loop on {\it Next}. This function -returns a {\bf wxNode} pointer (or NULL if there are no more nodes). See the -description for \helpref{wxNode}{wxnode}. The user will probably only wish to use the -{\bf wxNode::Data} function to retrieve the data; the node may also be deleted. - -\membersection{wxHashTable::Put} - -\func{void}{Put}{\param{long}{ key}, \param{wxObject *}{object}} - -\func{void}{Put}{\param{const wxString\& }{ key}, \param{wxObject *}{object}} - -Inserts data into the hash table, using an integer or string key (depending on which -has table constructor was used). The key string is copied and stored by the hash -table implementation. - - diff --git a/docs/latex/wx/hellow.bmp b/docs/latex/wx/hellow.bmp deleted file mode 100644 index 3814ae2483..0000000000 Binary files a/docs/latex/wx/hellow.bmp and /dev/null differ diff --git a/docs/latex/wx/hellow.gif b/docs/latex/wx/hellow.gif deleted file mode 100644 index cc98dcdae5..0000000000 Binary files a/docs/latex/wx/hellow.gif and /dev/null differ diff --git a/docs/latex/wx/hellox.bmp b/docs/latex/wx/hellox.bmp deleted file mode 100644 index e80bf33384..0000000000 Binary files a/docs/latex/wx/hellox.bmp and /dev/null differ diff --git a/docs/latex/wx/hellox.gif b/docs/latex/wx/hellox.gif deleted file mode 100644 index 97e658efac..0000000000 Binary files a/docs/latex/wx/hellox.gif and /dev/null differ diff --git a/docs/latex/wx/helpinst.tex b/docs/latex/wx/helpinst.tex deleted file mode 100644 index 40d2fafefa..0000000000 --- a/docs/latex/wx/helpinst.tex +++ /dev/null @@ -1,122 +0,0 @@ -\section{\class{wxHelpControllerBase}}\label{wxhelpcontrollerbase} - -This class defines the interface by which -applications may invoke a help viewer to provide on-line help. - -Other classes derive from this class to provide actual implementations -of help controllers. - -A help controller allows an application to display help, at the contents -or at a particular topic, and shut the help program down on termination. -This avoids proliferation of many instances of the help viewer whenever the -user requests a different topic via the application's menus or buttons. - -Typically, an application will create a help controller instance -when it starts, and immediately call {\bf Initialize}\rtfsp -to associate a filename with it. The help viewer will only get run, however, -just before the first call to display something. - -\wxheading{Derivation} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxWinHelpController}{wxwinhelpcontroller} - -\wxheading{Include file} - -{\tt } (for just wxHelpControllerBase) - -{\tt } (to include the platform-specific controller, e.g. wxWinHelpController) - - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxHelpControllerBase::wxHelpControllerBase} - -\func{}{wxHelpControllerBase}{\void} - -Constructs a help instance object, but does not invoke the help viewer. - -\membersection{wxHelpControllerBase::\destruct{wxHelpControllerBase}} - -\func{}{\destruct{wxHelpControllerBase}}{\void} - -Destroys the help instance, closing down the viewer if it is running. - -\membersection{wxHelpControllerBase::Initialize}\label{wxhelpcontrollerbaseinitialize} - -\func{virtual void}{Initialize}{\param{const wxString\& }{file}} - -\func{virtual void}{Initialize}{\param{const wxString\& }{file}, \param{int}{ server}} - -Initializes the help instance with a help filename, and optionally a server (socket) -number. Does not invoke the help viewer. -This must be called directly after the help instance object is created and before -any attempts to communicate with the viewer. - -You may omit the file extension and a suitable one will be chosen. - -\membersection{wxHelpControllerBase::DisplayBlock}\label{wxhelpcontrollerbasedisplayblock} - -\func{virtual bool}{DisplayBlock}{\param{long}{ blockNo}} - -If the help viewer is not running, runs it and displays the file at the given block number. -The interpretation of {\it blockNo} differs between help viewers. If using Windows Help, this -refers to the context number. If wxHelp, this is the wxHelp block number. - -\membersection{wxHelpControllerBase::DisplayContents}\label{wxhelpcontrollerbasedisplaycontents} - -\func{virtual bool}{DisplayContents}{\void} - -If the help viewer is not running, runs it and displays the -contents. - -\membersection{wxHelpControllerBase::DisplaySection}\label{wxhelpcontrollerbasedisplaysection} - -\func{virtual bool}{DisplaySection}{\param{int}{ sectionNo}} - -If the help viewer is not running, runs it and displays the given section. -Sections are numbered starting from 1. - -For wxHelp, section numbers may be viewed by running wxHelp in edit mode. - -DisplaySection does not apply to WinHelp. - -\membersection{wxHelpControllerBase::KeywordSearch}\label{wxhelpcontrollerbasekeywordsearch} - -\func{virtual bool}{KeywordSearch}{\param{const wxString\& }{keyWord}} - -If the help viewer is not running, runs it, and searches for sections matching the given keyword. If one -match is found, the file is displayed at this section. If more than one -match is found, the Search dialog is displayed with the matches (wxHelp) -or the first topic is displayed (Windows Help). - -\membersection{wxHelpControllerBase::LoadFile}\label{wxhelpcontrollerbaseloadfile} - -\func{virtual bool}{LoadFile}{\param{const wxString\& }{file = NULL}} - -If the help viewer is not running, runs it and loads the given file. -If the filename is not supplied or is -NULL, the file specified in {\bf Initialize} is used. If the viewer is -already displaying the specified file, it will not be reloaded. This -member function may be used before each display call in case the user -has opened another file. - -\membersection{wxHelpControllerBase::OnQuit}\label{wxhelpcontrollerbaseonquit} - -\func{virtual bool}{OnQuit}{\void} - -Overridable member called when this application's viewer is quit by the user. - -This only works for wxXLPHelpController. - -\membersection{wxHelpControllerBase::Quit}\label{wxhelpcontrollerbasequit} - -\func{virtual bool}{Quit}{\void} - -If the viewer is running, quits it by disconnecting. - -For Windows Help, the viewer will only close if no other application is using it. - diff --git a/docs/latex/wx/icon.tex b/docs/latex/wx/icon.tex deleted file mode 100644 index 3e1df35864..0000000000 --- a/docs/latex/wx/icon.tex +++ /dev/null @@ -1,397 +0,0 @@ -\section{\class{wxIcon}}\label{wxicon} - -An icon is a small rectangular bitmap usually used for denoting a -minimized application. - -\wxheading{Remarks} - -It is optional (but desirable) to associate a -pertinent icon with a frame. Obviously icons in X and MS Windows are -created in a different manner, and colour icons in X are difficult -to arrange. Therefore, separate icons will be created for the different -environments. Platform-specific methods for creating a {\bf wxIcon}\rtfsp -structure are catered for, and this is an occasion where conditional -compilation will probably be required. - -Note that a new icon must be created for every time the icon is to be -used for a new window. In X, this will ensure that fresh X resources -are allocated for this frame. In MS Windows, the icon will not be -reloaded if it has already been used. An icon allocated to a frame will -be deleted when the frame is deleted. - -The following shows the conditional compilation required to define an -icon in X and in MS Windows. The alternative is to use the string -version of the icon constructor, which loads a file under X and a -resource under MS Windows, but has the disadvantage of requiring the -X icon file to be available at run-time. - -\begin{verbatim} -#ifdef wx_x -#include "aiai.xbm" -#endif -#ifdef wx_msw - wxIcon *icon = new wxIcon("aiai"); -#endif -#ifdef wx_x - wxIcon *icon = new wxIcon(aiai_bits, aiai_width, aiai_height); -#endif -\end{verbatim} - -\wxheading{Derived from} - -\helpref{wxBitmap}{wxbitmap}\\ -\helpref{wxGDIObject}{wxgdiobject}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxIcon overview}{wxiconoverview}, \helpref{wxDC::DrawIcon}{wxdcdrawicon}, \helpref{wxCursor}{wxcursor} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxIcon::wxIcon}\label{wxiconconstr} - -\func{}{wxIcon}{\void} - -Default constructor. - -\func{}{wxIcon}{\param{const wxIcon\& }{icon}} - -\func{}{wxIcon}{\param{const wxIcon* }{icon}} - -Copy constructors. - -\func{}{wxIcon}{\param{void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}} - -Creates an icon from the given data, which can be of arbitrary type. - -\func{}{wxIcon}{\param{const char}{ bits[]}, \param{int}{ width}, \param{int}{ height}\\ - \param{int}{ depth = 1}} - -Creates an icon from an array of bits. - -\func{}{wxIcon}{\param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}} - -Creates a new icon. - -\func{}{wxIcon}{\param{const char**}{ bits}} - -Creates an icon from XPM data. - -\func{}{wxIcon}{\param{const wxString\& }{name}, \param{long}{ type}} - -Loads an icon from a file or resource. - -\wxheading{Parameters} - -\docparam{bits}{Specifies an array of pixel values.} - -\docparam{width}{Specifies the width of the icon.} - -\docparam{height}{Specifies the height of the icon.} - -\docparam{depth}{Specifies the depth of the icon. If this is omitted, the display depth of the -screen is used.} - -\docparam{name}{This can refer to a resource name under MS Windows, or a filename under MS Windows and X. -Its meaning is determined by the {\it flags} parameter.} - -\docparam{type}{May be one of the following: - -\twocolwidtha{5cm} -\begin{twocollist} -\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_ICO}}}{Load a Windows icon file.} -\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_ICO\_RESOURCE}}}{Load a Windows icon from the resource database.} -\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_GIF}}}{Load a GIF bitmap file.} -\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_XBM}}}{Load an X bitmap file.} -\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_XPM}}}{Load an XPM bitmap file.} -%\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_RESOURCE}}}{Load a Windows resource name.} -\end{twocollist} - -The validity of these flags depends on the platform and wxWindows configuration. -If all possible wxWindows settings are used, the Windows platform supports ICO, ICO\_RESOURCE, -XPM\_DATA, and XPM. Under X, the available formats are BMP, GIF, XBM, and XPM.} - -\wxheading{Remarks} - -The first form constructs an icon object with no data; an assignment or another member function such as Create -or LoadFile must be called subsequently. - -The second and third forms provide copy constructors. Note that these do not copy the -icon data, but instead a pointer to the data, keeping a reference count. They are therefore -very efficient operations. - -The fourth form constructs an icon from data whose type and value depends on -the value of the {\it type} argument. - -The fifth form constructs a (usually monochrome) icon from an array of pixel values, under both -X and Windows. - -The sixth form constructs a new icon. - -The seventh form constructs an icon from pixmap (XPM) data, if wxWindows has been configured -to incorporate this feature. - -To use this constructor, you must first include an XPM file. For -example, assuming that the file {\tt mybitmap.xpm} contains an XPM array -of character pointers called mybitmap: - -\begin{verbatim} -#include "mybitmap.xpm" - -... - -wxIcon *icon = new wxIcon(mybitmap); -\end{verbatim} - -The eighth form constructs an icon from a file or resource. {\it name} can refer -to a resource name under MS Windows, or a filename under MS Windows and X. - -Under Windows, {\it type} defaults to wxBITMAP\_TYPE\_ICO\_RESOURCE. -Under X, {\it type} defaults to wxBITMAP\_TYPE\_XBM. - -\wxheading{See also} - -\helpref{wxIcon::LoadFile}{wxiconloadfile} - -\membersection{wxIcon::\destruct{wxIcon}} - -\func{}{\destruct{wxIcon}}{\void} - -Destroys the wxIcon object and possibly the underlying icon data. -Because reference counting is used, the icon may not actually be -destroyed at this point - only when the reference count is zero will the -data be deleted. - -If the application omits to delete the icon explicitly, the icon will be -destroyed automatically by wxWindows when the application exits. - -Do not delete an icon that is selected into a memory device context. - -\begin{comment} -\membersection{wxIcon::Create}\label{wxiconcreate} - -\func{virtual bool}{Create}{\param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}} - -Creates a fresh icon. If the final argument is omitted, the display depth of -the screen is used. - -\func{virtual bool}{Create}{\param{void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}} - -Creates an icon from the given data, which can be of arbitrary type. - -\wxheading{Parameters} - -\docparam{width}{The width of the icon in pixels.} - -\docparam{height}{The height of the icon in pixels.} - -\docparam{depth}{The depth of the icon in pixels. If this is -1, the screen depth is used.} - -\docparam{data}{Data whose type depends on the value of {\it type}.} - -\docparam{type}{An icon type identifier - see \helpref{wxIcon::wxIcon}{wxiconconstr} for a list -of possible values.} - -\wxheading{Return value} - -TRUE if the call succeeded, FALSE otherwise. - -\wxheading{Remarks} - -The first form works on all platforms. The portability of the second form depends on the -type of data. - -\wxheading{See also} - -\helpref{wxIcon::wxIcon}{wxiconconstr} - -\end{comment} - -\membersection{wxIcon::GetDepth} - -\constfunc{int}{GetDepth}{\void} - -Gets the colour depth of the icon. A value of 1 indicates a -monochrome icon. - -\membersection{wxIcon::GetHeight}\label{wxicongetheight} - -\constfunc{int}{GetHeight}{\void} - -Gets the height of the icon in pixels. - -\membersection{wxIcon::GetWidth}\label{wxicongetwidth} - -\constfunc{int}{GetWidth}{\void} - -Gets the width of the icon in pixels. - -\wxheading{See also} - -\helpref{wxIcon::GetHeight}{wxicongetheight} - -\membersection{wxIcon::LoadFile}\label{wxiconloadfile} - -\func{bool}{LoadFile}{\param{const wxString\&}{ name}, \param{long}{ type}} - -Loads an icon from a file or resource. - -\wxheading{Parameters} - -\docparam{name}{Either a filename or a Windows resource name. -The meaning of {\it name} is determined by the {\it type} parameter.} - -\docparam{type}{One of the following values: - -\twocolwidtha{5cm} -\begin{twocollist} -\twocolitem{{\bf wxBITMAP\_TYPE\_ICO}}{Load a Windows icon file.} -\twocolitem{{\bf wxBITMAP\_TYPE\_ICO\_RESOURCE}}{Load a Windows icon from the resource database.} -\twocolitem{{\bf wxBITMAP\_TYPE\_GIF}}{Load a GIF bitmap file.} -\twocolitem{{\bf wxBITMAP\_TYPE\_XBM}}{Load an X bitmap file.} -\twocolitem{{\bf wxBITMAP\_TYPE\_XPM}}{Load an XPM bitmap file.} -\end{twocollist} - -The validity of these flags depends on the platform and wxWindows configuration.} - -\wxheading{Return value} - -TRUE if the operation succeeded, FALSE otherwise. - -\wxheading{See also} - -\helpref{wxIcon::wxIcon}{wxiconconstr} - -\membersection{wxIcon::Ok}\label{wxiconok} - -\constfunc{bool}{Ok}{\void} - -Returns TRUE if icon data is present. - -\begin{comment} -\membersection{wxIcon::SaveFile}\label{wxiconsavefile} - -\func{bool}{SaveFile}{\param{const wxString\& }{name}, \param{int}{ type}, \param{wxPalette* }{palette = NULL}} - -Saves an icon in the named file. - -\wxheading{Parameters} - -\docparam{name}{A filename. The meaning of {\it name} is determined by the {\it type} parameter.} - -\docparam{type}{One of the following values: - -\twocolwidtha{5cm} -\begin{twocollist} -\twocolitem{{\bf wxBITMAP\_TYPE\_ICO}}{Save a Windows icon file.} -%\twocolitem{{\bf wxBITMAP\_TYPE\_GIF}}{Save a GIF icon file.} -%\twocolitem{{\bf wxBITMAP\_TYPE\_XBM}}{Save an X bitmap file.} -\twocolitem{{\bf wxBITMAP\_TYPE\_XPM}}{Save an XPM bitmap file.} -\end{twocollist} - -The validity of these flags depends on the platform and wxWindows configuration.} - -\docparam{palette}{An optional palette used for saving the icon. TODO: this parameter should -probably be eliminated; instead the app should set the palette before saving.} - -\wxheading{Return value} - -TRUE if the operation succeeded, FALSE otherwise. - -\wxheading{Remarks} - -Depending on how wxWindows has been configured, not all formats may be available. - -\wxheading{See also} - -\helpref{wxIcon::LoadFile}{wxiconloadfile} -\end{comment} - -\membersection{wxIcon::SetDepth}\label{wxiconsetdepth} - -\func{void}{SetDepth}{\param{int }{depth}} - -Sets the depth member (does not affect the icon data). - -\wxheading{Parameters} - -\docparam{depth}{Icon depth.} - -\membersection{wxIcon::SetHeight}\label{wxiconsetheight} - -\func{void}{SetHeight}{\param{int }{height}} - -Sets the height member (does not affect the icon data). - -\wxheading{Parameters} - -\docparam{height}{Icon height in pixels.} - -\membersection{wxIcon::SetOk} - -\func{void}{SetOk}{\param{int }{isOk}} - -Sets the validity member (does not affect the icon data). - -\wxheading{Parameters} - -\docparam{isOk}{Validity flag.} - -\membersection{wxIcon::SetWidth} - -\func{void}{SetWidth}{\param{int }{width}} - -Sets the width member (does not affect the icon data). - -\wxheading{Parameters} - -\docparam{width}{Icon width in pixels.} - -\membersection{wxIcon::operator $=$} - -\func{wxIcon\& }{operator $=$}{\param{const wxIcon\& }{icon}} - -Assignment operator. This operator does not copy any data, but instead -passes a pointer to the data in {\it icon} and increments a reference -counter. It is a fast operation. - -\wxheading{Parameters} - -\docparam{icon}{Icon to assign.} - -\wxheading{Return value} - -Returns 'this' object. - -\membersection{wxIcon::operator $==$} - -\func{bool}{operator $==$}{\param{const wxIcon\& }{icon}} - -Equality operator. This operator tests whether the internal data pointers are -equal (a fast test). - -\wxheading{Parameters} - -\docparam{icon}{Icon to compare with 'this'} - -\wxheading{Return value} - -Returns TRUE if the icons were effectively equal, FALSE otherwise. - -\membersection{wxIcon::operator $!=$} - -\func{bool}{operator $!=$}{\param{const wxIcon\& }{icon}} - -Inequality operator. This operator tests whether the internal data pointers are -unequal (a fast test). - -\wxheading{Parameters} - -\docparam{icon}{Icon to compare with 'this'} - -\wxheading{Return value} - -Returns TRUE if the icons were unequal, FALSE otherwise. - - diff --git a/docs/latex/wx/idleevt.tex b/docs/latex/wx/idleevt.tex deleted file mode 100644 index 8cd51fe633..0000000000 --- a/docs/latex/wx/idleevt.tex +++ /dev/null @@ -1,59 +0,0 @@ -\section{\class{wxIdleEvent}}\label{wxidleevent} - -This class is used for idle events, which are generated when the system is idle. - -\wxheading{Derived from} - -\helpref{wxEvent}{wxevent}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Event table macros} - -To process an idle event, use this event handler macro to direct input to a member -function that takes a wxIdleEvent argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_IDLE(func)}}{Process a wxEVT\_IDLE event.} -\end{twocollist}% - -\wxheading{Remarks} - -Idle events can be caught by the wxApp class, or by top-level window classes. - -\wxheading{See also} - -\helpref{wxApp::OnIdle}{wxapponidle}, \helpref{Event handling overview}{eventhandlingoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxIdleEvent::wxIdleEvent} - -\func{}{wxIdleEvent}{\void} - -Constructor. - -\membersection{wxIdleEvent::RequestMore}\label{wxidleeventrequestmore} - -\func{void}{RequestMore}{\param{bool}{ needMore = TRUE}} - -Tells wxWindows that more processing is required. This function can be called by an OnIdle -handler for a window or window event handler to indicate that wxApp::OnIdle should -forward the OnIdle event once more to the application windows. If no window calls this function -during OnIdle, then the application will remain in a passive event loop (not calling OnIdle) until a -new event is posted to the application by the windowing system. - -\wxheading{See also} - -\helpref{wxIdleEvent::MoreRequested}{wxidleeventmorerequested}, \helpref{wxApp::OnIdle}{wxapponidle} - -\membersection{wxIdleEvent::MoreRequested}\label{wxidleeventmorerequested} - -\constfunc{bool}{MoreRequested}{\void} - -Returns TRUE if the OnIdle function processing this event requested more processing time. - -\wxheading{See also} - -\helpref{wxIdleEvent::RequestMore}{wxidleeventrequestmore}, \helpref{wxApp::OnIdle}{wxapponidle} - diff --git a/docs/latex/wx/ilayout.tex b/docs/latex/wx/ilayout.tex deleted file mode 100644 index 5ac17df12d..0000000000 --- a/docs/latex/wx/ilayout.tex +++ /dev/null @@ -1,133 +0,0 @@ -\section{\class{wxIndividualLayoutConstraint}}\label{wxindividuallayoutconstraint} - -Objects of this class are stored in the wxIndividualLayoutConstraint class -as one of eight possible constraints that a window can be involved in. - -Constraints are initially set to have the relationship wxUnconstrained, -which means that their values should be calculated by looking at known constraints. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{Overview and examples}{constraintsoverview},\rtfsp -\helpref{wxLayoutConstraints}{wxlayoutconstraints}, \helpref{wxWindow::SetConstraints}{wxwindowsetconstraints}. - -\latexignore{\rtfignore{\wxheading{Members}}} - -\subsection{Edges and relationships} - -TODO: put this in a different section. - -The {\it wxEdge}\index{wxEdge} enumerated type specifies the type of edge or dimension of a window. - -\begin{twocollist}\itemsep=0pt -\twocolitem{wxLeft}{The left edge.} -\twocolitem{wxTop}{The top edge.} -\twocolitem{wxRight}{The right edge.} -\twocolitem{wxBottom}{The bottom edge.} -\twocolitem{wxCentreX}{The x-coordinate of the centre of the window.} -\twocolitem{wxCentreY}{The y-coordinate of the centre of the window.} -\end{twocollist} - -The {\it wxRelationship}\index{wxRelationship} enumerated type specifies the relationship that -this edge or dimension has with another specified edge or dimension. Normally, the user -doesn't use these directly because functions such as {\it Below} and {\it RightOf} are a convenience -for using the more general {\it Set} function. - -\begin{twocollist}\itemsep=0pt -\twocolitem{wxUnconstrained}{The edge or dimension is unconstrained (the default for edges.} -\twocolitem{wxAsIs}{The edge or dimension is to be taken from the current window position or size (the -default for dimensions.} -\twocolitem{wxAbove}{The edge should be above another edge.} -\twocolitem{wxBelow}{The edge should be below another edge.} -\twocolitem{wxLeftOf}{The edge should be to the left of another edge.} -\twocolitem{wxRightOf}{The edge should be to the right of another edge.} -\twocolitem{wxSameAs}{The edge or dimension should be the same as another edge or dimension.} -\twocolitem{wxPercentOf}{The edge or dimension should be a percentage of another edge or dimension.} -\twocolitem{wxAbsolute}{The edge or dimension should be a given absolute value.} -\end{twocollist} - -\membersection{wxIndividualLayoutConstraint::wxIndividualLayoutConstraint} - -\func{void}{wxIndividualLayoutConstraint}{\void} - -Constructor. Not used by the end-user. - -\membersection{wxIndividualLayoutConstraint::Above} - -\func{void}{Above}{\param{wxWindow *}{otherWin}, \param{int}{ margin = 0}} - -Constrains this edge to be above the given window, with an -optional margin. Implicitly, this is relative to the top edge of the other window. - -\membersection{wxIndividualLayoutConstraint::Absolute} - -\func{void}{Absolute}{\param{int}{ value}} - -Constrains this edge or dimension to be the given absolute value. - -\membersection{wxIndividualLayoutConstraint::AsIs} - -\func{void}{AsIs}{\void} - -Sets this edge or constraint to be whatever the window's value is -at the moment. If either of the width and height constraints -are {\it as is}, the window will not be resized, but moved instead. -This is important when considering panel items which are intended -to have a default size, such as a button, which may take its size -from the size of the button label. - -\membersection{wxIndividualLayoutConstraint::Below} - -\func{void}{Below}{\param{wxWindow *}{otherWin}, \param{int}{ margin = 0}} - -Constrains this edge to be below the given window, with an -optional margin. Implicitly, this is relative to the bottom edge of the other window. - -\membersection{wxIndividualLayoutConstraint::Unconstrained} - -\func{void}{Unconstrained}{\void} - -Sets this edge or dimension to be unconstrained, that is, dependent on -other edges and dimensions from which this value can be deduced. - -\membersection{wxIndividualLayoutConstraint::LeftOf} - -\func{void}{LeftOf}{\param{wxWindow *}{otherWin}, \param{int}{ margin = 0}} - -Constrains this edge to be to the left of the given window, with an -optional margin. Implicitly, this is relative to the left edge of the other window. - -\membersection{wxIndividualLayoutConstraint::PercentOf} - -\func{void}{PercentOf}{\param{wxWindow *}{otherWin}, \param{wxEdge}{ edge}, \param{int}{ margin = 0}} - -Constrains this edge or dimension to be to a percentage of the given window, with an -optional margin. - -\membersection{wxIndividualLayoutConstraint::RightOf} - -\func{void}{RightOf}{\param{wxWindow *}{otherWin}, \param{int}{ margin = 0}} - -Constrains this edge to be to the right of the given window, with an -optional margin. Implicitly, this is relative to the right edge of the other window. - -\membersection{wxIndividualLayoutConstraint::SameAs} - -\func{void}{SameAs}{\param{wxWindow *}{otherWin}, \param{wxEdge}{ edge}, \param{int}{ margin = 0}} - -Constrains this edge or dimension to be to the same as the edge of the given window, with an -optional margin. - -\membersection{wxIndividualLayoutConstraint::Set} - -\func{void}{Set}{\param{wxRelationship}{ rel}, \param{wxWindow *}{otherWin}, \param{wxEdge}{ otherEdge}, - \param{int}{ value = 0}, \param{int}{ margin = 0}} - -Sets the properties of the constraint. Normally called by one of the convenience -functions such as Above, RightOf, SameAs. - - diff --git a/docs/latex/wx/imaglist.tex b/docs/latex/wx/imaglist.tex deleted file mode 100644 index a1f79912d9..0000000000 --- a/docs/latex/wx/imaglist.tex +++ /dev/null @@ -1,160 +0,0 @@ -\section{\class{wxImageList}}\label{wximagelist} - -A wxImageList contains a list of images, which are stored in -an unspecified form. Images can have masks for transparent -drawing, and can be made from a variety of sources including bitmaps -and icons. - -wxImageList is used principally in conjunction with \helpref{wxTreeCtrl}{wxtreectrl} and -\rtfsp\helpref{wxListCtrl}{wxlistctrl} classes. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxTreeCtrl}{wxtreectrl}, \helpref{wxListCtrl}{wxlistctrl} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxImageList::wxImageList}\label{wximagelistconstr} - -\func{}{wxImageList}{\void} - -Default constructor. - -\func{}{wxImageList}{\param{int }{width}, \param{int }{height}, \param{const bool }{mask = TRUE},\rtfsp -\param{int }{initialCount = 1}} - -Constructor specifying the image size, whether image masks should be created, and the initial size of the list. - -\wxheading{Parameters} - -\docparam{width}{Width of the images in the list.} - -\docparam{height}{Height of the images in the list.} - -\docparam{mask}{TRUE if masks should be created for all images.} - -\docparam{initialCount}{The initial size of the list.} - -\wxheading{See also} - -\helpref{wxImageList::Create}{wximagelistcreate} - -\membersection{wxImageList::Add}\label{wximagelistadd} - -\func{int}{Add}{\param{const wxBitmap\&}{ bitmap}, \param{const wxBitmap\&}{ mask = wxNullBitmap}} - -Adds a new image using a bitmap and optional mask bitmap. - -\func{int}{Add}{\param{const wxBitmap\&}{ bitmap}, \param{const wxColour\&}{ maskColour}} - -Adds a new image using a bitmap and mask colour. - -\func{int}{Add}{\param{const wxIcon\&}{ icon}} - -Adds a new image using an icon. - -\wxheading{Parameters} - -\docparam{bitmap}{Bitmap representing the opaque areas of the image.} - -\docparam{mask}{Monochrome mask bitmap, representing the transparent areas of the image.} - -\docparam{maskColour}{Colour indicating which parts of the image are transparent.} - -\docparam{icon}{Icon to use as the image.} - -\wxheading{Return value} - -The new zero-based image index. - -\wxheading{Remarks} - -The original bitmap or icon is not affected by the {\bf Add} operation, and can be deleted afterwards. - -\membersection{wxImageList::Create}\label{wximagelistcreate} - -\func{bool}{Create}{\param{int }{width}, \param{int }{height}, \param{const bool }{mask = TRUE},\rtfsp -\param{int }{initialCount = 1}} - -Initializes the list. See \helpref{wxImageList::wxImageList}{wximagelistconstr} for details. - -\membersection{wxImageList::Draw}\label{wximagelistdraw} - -\func{bool}{Draw}{\param{int}{ index}, \param{wxDC\&}{ dc}, \param{int }{x},\rtfsp -\param{int }{x}, \param{int }{flags = wxIMAGELIST\_DRAW\_NORMAL},\rtfsp -\param{const bool }{solidBackground = FALSE}} - -Draws a specified image onto a device context. - -\wxheading{Parameters} - -\docparam{index}{Image index, starting from zero.} - -\docparam{dc}{Device context to draw on.} - -\docparam{x}{X position on the device context.} - -\docparam{y}{Y position on the device context.} - -\docparam{flags}{How to draw the image. A bitlist of a selection of the following: - -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf wxIMAGELIST\_DRAW\_NORMAL}}{Draw the image normally.} -\twocolitem{{\bf wxIMAGELIST\_DRAW\_TRANSPARENT}}{Draw the image with transparency.} -\twocolitem{{\bf wxIMAGELIST\_DRAW\_SELECTED}}{Draw the image in selected state.} -\twocolitem{{\bf wxIMAGELIST\_DRAW\_FOCUSED}}{Draw the image in a focussed state.} -\end{twocollist} -} - -\docparam{solidBackground}{For optimisation - drawing can be faster if the function is told -that the background is solid.} - -\membersection{wxImageList::GetImageCount}\label{wximagelistgetimagecount} - -\constfunc{int}{GetImageCount}{\void} - -Returns the number of images in the list. - -\membersection{wxImageList::Remove}\label{wximagelistremove} - -\func{bool}{Remove}{\param{int}{ index}} - -Removes the image at the given position. - -\membersection{wxImageList::RemoveAll}\label{wximagelistremoveall} - -\func{bool}{RemoveAll}{\void} - -Removes all the images in the list. - -\membersection{wxImageList::Replace}\label{wximagelistreplace} - -\func{bool}{Replace}{\param{int}{ index}, \param{const wxBitmap\&}{ bitmap}, \param{const wxBitmap\&}{ mask = wxNullBitmap}} - -Replaces the existing image with the new image. - -\func{bool}{Replace}{\param{int}{ index}, \param{const wxIcon\&}{ icon}} - -Replaces the existing image with the new image. - -\wxheading{Parameters} - -\docparam{bitmap}{Bitmap representing the opaque areas of the image.} - -\docparam{mask}{Monochrome mask bitmap, representing the transparent areas of the image.} - -\docparam{icon}{Icon to use as the image.} - -\wxheading{Return value} - -TRUE if the replacement was successful, FALSE otherwise. - -\wxheading{Remarks} - -The original bitmap or icon is not affected by the {\bf Replace} operation, and can be deleted afterwards. - - diff --git a/docs/latex/wx/indlgevt.tex b/docs/latex/wx/indlgevt.tex deleted file mode 100644 index 067cf580ab..0000000000 --- a/docs/latex/wx/indlgevt.tex +++ /dev/null @@ -1,34 +0,0 @@ -\section{\class{wxInitDialogEvent}}\label{wxinitdialogevent} - -A wxInitDialogEvent is sent as a dialog or panel is being initialised. -Handlers for this event can transfer data to the window. - -\wxheading{Derived from} - -\helpref{wxEvent}{wxevent}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Event table macros} - -To process an activate event, use these event handler macros to direct input to a member -function that takes a wxInitDialogEvent argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_INIT\_DIALOG(func)}}{Process a wxEVT\_INIT\_DIALOG event.} -\end{twocollist}% - -\wxheading{See also} - -\helpref{wxWindow::OnInitDialog}{wxwindowoninitdialog},\rtfsp -\helpref{Event handling overview}{eventhandlingoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxInitDialogEvent::wxInitDialogEvent} - -\func{}{wxInitDialogEvent}{\param{int }{id = 0}} - -Constructor. - - diff --git a/docs/latex/wx/joyevent.tex b/docs/latex/wx/joyevent.tex deleted file mode 100644 index f8da76cf65..0000000000 --- a/docs/latex/wx/joyevent.tex +++ /dev/null @@ -1,118 +0,0 @@ -\section{\class{wxJoystickEvent}}\label{wxjoystickevent} - -This event class contains information about mouse events, particularly -events received by windows. - -\wxheading{Derived from} - -\helpref{wxEvent}{wxevent} - -\wxheading{Event table macros} - -To process a mouse event, use these event handler macros to direct input to member -functions that take a wxJoystickEvent argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_JOY\_BUTTON\_DOWN(func)}}{Process a wxEVT\_JOY\_BUTTON\_DOWN event.} -\twocolitem{{\bf EVT\_JOY\_BUTTON\_UP(func)}}{Process a wxEVT\_JOY\_BUTTON\_UP event.} -\twocolitem{{\bf EVT\_JOY\_MOVE(func)}}{Process a wxEVT\_JOY\_MOVE event.} -\twocolitem{{\bf EVT\_JOY\_ZMOVE(func)}}{Process a wxEVT\_JOY\_ZMOVE event.} -\end{twocollist}% - -\wxheading{See also} - -\helpref{wxJoystick}{wxjoystick} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxJoystickEvent::wxJoystickEvent} - -\func{}{wxJoystickEvent}{\param{WXTYPE}{ eventType = 0}, \param{int}{ state = 0}, - \param{int}{ joystick = wxJOYSTICK1}, \param{int }{change = 0}} - -Constructor. - -\membersection{wxJoystickEvent::ButtonDown}\label{wxjoystickeventbuttondown} - -\constfunc{bool}{ButtonDown}{\param{int}{ button = wxJOY\_BUTTON\_ANY}} - -Returns TRUE if the event was a down event from the specified button (or any button). - -\wxheading{Parameters} - -\docparam{button}{Can be wxJOY\_BUTTONn where n is 1, 2, 3 or 4; or wxJOY\_BUTTON\_ANY to -indicate any button down event.} - -\membersection{wxJoystickEvent::ButtonIsDown}\label{wxjoystickeventbuttonisdown} - -\constfunc{bool}{ButtonIsDown}{\param{int}{ button = wxJOY\_BUTTON\_ANY}} - -Returns TRUE if the specified button (or any button) was in a down state. - -\wxheading{Parameters} - -\docparam{button}{Can be wxJOY\_BUTTONn where n is 1, 2, 3 or 4; or wxJOY\_BUTTON\_ANY to -indicate any button down event.} - -\membersection{wxJoystickEvent::ButtonUp}\label{wxjoystickeventbuttonup} - -\constfunc{bool}{ButtonUp}{\param{int}{ button = wxJOY\_BUTTON\_ANY}} - -Returns TRUE if the event was an up event from the specified button (or any button). - -\wxheading{Parameters} - -\docparam{button}{Can be wxJOY\_BUTTONn where n is 1, 2, 3 or 4; or wxJOY\_BUTTON\_ANY to -indicate any button down event.} - -\membersection{wxJoystickEvent::GetButtonChange}\label{wxjoystickeventgetbuttonchange} - -\constfunc{int}{GetButtonChange}{\void} - -Returns the identifier of the button changing state. This is a wxJOY\_BUTTONn identifier, where -n is one of 1, 2, 3, 4. - -\membersection{wxJoystickEvent::GetButtonState}\label{wxjoystickeventgetbuttonstate} - -\constfunc{int}{GetButtonState}{\void} - -Returns the down state of the buttons. This is a bitlist of wxJOY\_BUTTONn identifiers, where -n is one of 1, 2, 3, 4. - -\membersection{wxJoystickEvent::GetJoystick}\label{wxjoystickeventgetjoystick} - -\constfunc{int}{GetJoystick}{\void} - -Returns the identifier of the joystick generating the event - one of wxJOYSTICK1 and wxJOYSTICK2. - -\membersection{wxJoystickEvent::GetPosition}\label{wxjoystickeventgetposition} - -\constfunc{wxPoint}{GetPosition}{\void} - -Returns the x, y position of the joystick event. - -\membersection{wxJoystickEvent::GetZPosition}\label{wxjoystickeventgetzposition} - -\constfunc{int}{GetZPosition}{\void} - -Returns the z position of the joystick event. - -\membersection{wxJoystickEvent::IsButton}\label{wxjoystickeventisbutton} - -\constfunc{bool}{IsButton}{\void} - -Returns TRUE if this was a button up or down event ({\it not} 'is any button down?'). - -\membersection{wxJoystickEvent::IsMove}\label{wxjoystickeventismove} - -\constfunc{bool}{IsMove}{\void} - -Returns TRUE if this was an x, y move event. - -\membersection{wxJoystickEvent::IsZMove}\label{wxjoystickeventiszmove} - -\constfunc{bool}{IsZMove}{\void} - -Returns TRUE if this was a z move event. - diff --git a/docs/latex/wx/joystick.tex b/docs/latex/wx/joystick.tex deleted file mode 100644 index 338f11668f..0000000000 --- a/docs/latex/wx/joystick.tex +++ /dev/null @@ -1,294 +0,0 @@ -\section{\class{wxJoystick}}\label{wxjoystick} - -wxJoystick allows an application to control one or more joysticks. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxJoystickEvent}{wxjoystickevent} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxJoystick::wxJoystick}\label{wxjoystickconstr} - -\func{}{wxJoystick}{\param{int}{ joystick = wxJOYSTICK1}} - -Constructor. {\it joystick} may be one of wxJOYSTICK1, wxJOYSTICK2, indicating the joystick -controller of interest. - -\membersection{wxJoystick::\destruct{wxJoystick}} - -\func{}{\destruct{wxJoystick}}{\void} - -Destroys the wxJoystick object. - -\membersection{wxJoystick::GetButtonState}\label{wxjoystickgetbuttonstate} - -\constfunc{int}{GetButtonState}{\void} - -Returns the state of the joystick buttons. A bitlist of wxJOY\_BUTTONn identifiers, -where n is 1, 2, 3 or 4. - -\membersection{wxJoystick::GetManufacturerId}\label{wxjoystickgetmanufacturerid} - -\constfunc{int}{GetManufacturerId}{\void} - -Returns the manufacturer id. - -\membersection{wxJoystick::GetMovementThreshold}\label{wxjoystickgetmovementthreshold} - -\constfunc{int}{GetMovementThreshold}{\void} - -Returns the movement threshold, the number of steps outside which the joystick is deemed to have -moved. - -\membersection{wxJoystick::GetNumberAxes}\label{wxjoystickgetnumberaxes} - -\constfunc{int}{GetNumberAxes}{\void} - -Returns the number of axes for this joystick. - -\membersection{wxJoystick::GetNumberButtons}\label{wxjoystickgetnumberbuttons} - -\constfunc{int}{GetNumberButtons}{\void} - -Returns the number of buttons for this joystick. - -\membersection{wxJoystick::GetNumberJoysticks}\label{wxjoystickgetnumberjoysticks} - -\constfunc{int}{GetNumberJoysticks}{\void} - -Returns the number of joysticks currently attached to the computer. - -\membersection{wxJoystick::GetPollingMax}\label{wxjoystickgetpollingmax} - -\constfunc{int}{GetPollingMax}{\void} - -Returns the maximum polling frequency. - -\membersection{wxJoystick::GetPollingMin}\label{wxjoystickgetpollingmin} - -\constfunc{int}{GetPollingMin}{\void} - -Returns the minimum polling frequency. - -\membersection{wxJoystick::GetProductId}\label{wxjoystickgetproductid} - -\constfunc{int}{GetProductId}{\void} - -Returns the product id for the joystick. - -\membersection{wxJoystick::GetProductName}\label{wxjoystickgetproductname} - -\constfunc{wxString}{GetProductName}{\void} - -Returns the product name for the joystick. - -\membersection{wxJoystick::GetPosition}\label{wxjoystickgetposition} - -\constfunc{wxPoint}{GetPosition}{\void} - -Returns the x, y position of the joystick. - -\membersection{wxJoystick::GetPOVPosition}\label{wxjoystickgetpovposition} - -\constfunc{int}{GetPOVPosition}{\void} - -Returns the point-of-view position, expressed in discrete units. - -\membersection{wxJoystick::GetPOVCTSPosition}\label{wxjoystickgetpovctsposition} - -\constfunc{int}{GetPOVCTSPosition}{\void} - -Returns the point-of-view position, expressed in continuous, one-hundredth of a degree units. - -\membersection{wxJoystick::GetRudderMax}\label{wxjoystickgetruddermax} - -\constfunc{int}{GetRudderMax}{\void} - -Returns the maximum rudder position. - -\membersection{wxJoystick::GetRudderMin}\label{wxjoystickgetruddermin} - -\constfunc{int}{GetRudderMin}{\void} - -Returns the minimum rudder position. - -\membersection{wxJoystick::GetRudderPosition}\label{wxjoystickgetrudderposition} - -\constfunc{int}{GetRudderPosition}{\void} - -Returns the rudder position. - -\membersection{wxJoystick::GetUMax}\label{wxjoystickgetumax} - -\constfunc{int}{GetUMax}{\void} - -Returns the maximum U position. - -\membersection{wxJoystick::GetUMin}\label{wxjoystickgetumin} - -\constfunc{int}{GetUMin}{\void} - -Returns the minimum U position. - -\membersection{wxJoystick::GetUPosition}\label{wxjoystickgetuposition} - -\constfunc{int}{GetUPosition}{\void} - -Gets the position of the fifth axis of the joystick, if it exists. - -\membersection{wxJoystick::GetVMax}\label{wxjoystickgetvmax} - -\constfunc{int}{GetVMax}{\void} - -Returns the maximum V position. - -\membersection{wxJoystick::GetVMin}\label{wxjoystickgetvmin} - -\constfunc{int}{GetVMin}{\void} - -Returns the minimum V position. - -\membersection{wxJoystick::GetVPosition}\label{wxjoystickgetvposition} - -\constfunc{int}{GetVPosition}{\void} - -Gets the position of the sixth axis of the joystick, if it exists. - -\membersection{wxJoystick::GetXMax}\label{wxjoystickgetxmax} - -\constfunc{int}{GetXMax}{\void} - -Returns the maximum x position. - -\membersection{wxJoystick::GetXMin}\label{wxjoystickgetxmin} - -\constfunc{int}{GetXMin}{\void} - -Returns the minimum x position. - -\membersection{wxJoystick::GetYMax}\label{wxjoystickgetymax} - -\constfunc{int}{GetYMax}{\void} - -Returns the maximum y position. - -\membersection{wxJoystick::GetYMin}\label{wxjoystickgetymin} - -\constfunc{int}{GetYMin}{\void} - -Returns the minimum y position. - -\membersection{wxJoystick::GetZMax}\label{wxjoystickgetzmax} - -\constfunc{int}{GetZMax}{\void} - -Returns the maximum z position. - -\membersection{wxJoystick::GetZMin}\label{wxjoystickgetzmin} - -\constfunc{int}{GetXMin}{\void} - -Returns the minimum z position. - -\membersection{wxJoystick::GetZPosition}\label{wxjoystickgetzposition} - -\constfunc{int}{GetZPosition}{\void} - -Returns the z position of the joystick. - -\membersection{wxJoystick::HasPOV}\label{wxjoystickhaspov} - -\constfunc{bool}{HasPOV}{\void} - -Returns TRUE if the joystick has a point of view control. - -\membersection{wxJoystick::HasPOV4Dir}\label{wxjoystickhaspovfdir} - -\constfunc{bool}{HasPOV4Dir}{\void} - -Returns TRUE if the joystick point-of-view supports discrete values (centered, forward, backward, left, and right). - -\membersection{wxJoystick::HasPOVCTS}\label{wxjoystickhaspovcts} - -\constfunc{bool}{HasPOVCTS}{\void} - -Returns TRUE if the joystick point-of-view supports continuous degree bearings. - -\membersection{wxJoystick::HasRudder}\label{wxjoystickhasrudder} - -\constfunc{bool}{HasRudder}{\void} - -Returns TRUE if there is a rudder attached to the computer. - -\membersection{wxJoystick::HasU}\label{wxjoystickhasu} - -\constfunc{bool}{HasU}{\void} - -Returns TRUE if the joystick has a U axis. - -\membersection{wxJoystick::HasV}\label{wxjoystickhasv} - -\constfunc{bool}{HasV}{\void} - -Returns TRUE if the joystick has a V axis. - -\membersection{wxJoystick::HasZ}\label{wxjoystickhasz} - -\constfunc{bool}{HasZ}{\void} - -Returns TRUE if the joystick has a Z axis. - -\membersection{wxJoystick::IsOk}\label{wxjoystickisok} - -\constfunc{bool}{IsOk}{\void} - -Returns TRUE if the joystick is functioning. - -\membersection{wxJoystick::ReleaseCapture}\label{wxjoystickreleasecapture} - -\func{bool}{ReleaseCapture}{\void} - -Releases the capture set by {\bf SetCapture}. - -\wxheading{Return value} - -TRUE if the capture release succeeded. - -\wxheading{See also} - -\helpref{wxJoystick::SetCapture}{wxjoysticksetcapture}, \helpref{wxJoystickEvent}{wxjoystickevent} - -\membersection{wxJoystick::SetCapture}\label{wxjoysticksetcapture} - -\func{bool}{SetCapture}{\param{wxWindow*}{ win}, \param{int}{ pollingFreq = 0}} - -Sets the capture to direct joystick events to {\it win}. - -\wxheading{Parameters} - -\docparam{win}{The window that will receive joystick events.} - -\docparam{pollingFreq}{If zero, movement events are sent when above the -threshold. If greater than zero, events are received every {\it pollingFreq} milliseconds.} - -\wxheading{Return value} - -TRUE if the capture succeeded. - -\wxheading{See also} - -\helpref{wxJoystick::ReleaseCapture}{wxjoystickreleasecapture}, \helpref{wxJoystickEvent}{wxjoystickevent} - -\membersection{wxJoystick::SetMovementThreshold}\label{wxjoysticksetmovementthreshold} - -\func{void}{SetMovementThreshold}{\param{int}{ threshold}} - -Sets the movement threshold, the number of steps outside which the joystick is deemed to have -moved. - - diff --git a/docs/latex/wx/keyevent.tex b/docs/latex/wx/keyevent.tex deleted file mode 100644 index 0f86725e3c..0000000000 --- a/docs/latex/wx/keyevent.tex +++ /dev/null @@ -1,197 +0,0 @@ -\section{\class{wxKeyEvent}}\label{wxkeyevent} - -This event class contains information about keypress (character) events. See \helpref{wxWindow::OnChar}{wxwindowonchar}. - -\wxheading{Derived from} - -\helpref{wxEvent}{wxevent} - -\wxheading{Event table macros} - -To process a key event, use these event handler macros to direct input to member -functions that take a wxKeyEvent argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_CHAR(func)}}{Process a wxEVT\_CHAR event.} -\twocolitem{{\bf EVT\_CHAR\_HOOK(func)}}{Process a wxEVT\_CHAR\_HOOK event.} -\end{twocollist}% - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxKeyEvent::m\_altDown} - -\member{bool}{m\_altDown} - -TRUE if the Alt key is pressed down. - -\membersection{wxKeyEvent::m\_controlDown} - -\member{bool}{m\_controlDown} - -TRUE if control is pressed down. - -\membersection{wxKeyEvent::m\_keyCode} - -\member{long}{m\_keyCode} - -Virtual keycode. An enumerated type, one of: - -\begin{verbatim} - WXK_BACK = 8 - WXK_TAB = 9 - WXK_RETURN = 13 - WXK_ESCAPE = 27 - WXK_SPACE = 32 - WXK_DELETE = 127 - - WXK_START = 300 - WXK_LBUTTON - WXK_RBUTTON - WXK_CANCEL - WXK_MBUTTON - WXK_CLEAR - WXK_SHIFT - WXK_CONTROL - WXK_MENU - WXK_PAUSE - WXK_CAPITAL - WXK_PRIOR - WXK_NEXT - WXK_END - WXK_HOME - WXK_LEFT - WXK_UP - WXK_RIGHT - WXK_DOWN - WXK_SELECT - WXK_PRINT - WXK_EXECUTE - WXK_SNAPSHOT - WXK_INSERT - WXK_HELP - WXK_NUMPAD0 - WXK_NUMPAD1 - WXK_NUMPAD2 - WXK_NUMPAD3 - WXK_NUMPAD4 - WXK_NUMPAD5 - WXK_NUMPAD6 - WXK_NUMPAD7 - WXK_NUMPAD8 - WXK_NUMPAD9 - WXK_MULTIPLY - WXK_ADD - WXK_SEPARATOR - WXK_SUBTRACT - WXK_DECIMAL - WXK_DIVIDE - WXK_F1 - WXK_F2 - WXK_F3 - WXK_F4 - WXK_F5 - WXK_F6 - WXK_F7 - WXK_F8 - WXK_F9 - WXK_F10 - WXK_F11 - WXK_F12 - WXK_F13 - WXK_F14 - WXK_F15 - WXK_F16 - WXK_F17 - WXK_F18 - WXK_F19 - WXK_F20 - WXK_F21 - WXK_F22 - WXK_F23 - WXK_F24 - WXK_NUMLOCK - WXK_SCROLL -\end{verbatim} - -\membersection{wxKeyEvent::m\_metaDown} - -\member{bool}{m\_metaDown} - -TRUE if the Meta key is pressed down. - -\membersection{wxKeyEvent::m\_shiftDown} - -\member{bool}{m\_shiftDown} - -TRUE if shift is pressed down. - -\membersection{wxKeyEvent::m\_x} - -\member{int}{m\_x} - -X position of the event. - -\membersection{wxKeyEvent::m\_y} - -\member{int}{m\_y} - -Y position of the event. - -\membersection{wxKeyEvent::wxKeyEvent} - -\func{}{wxKeyEvent}{\param{WXTYPE}{ keyEventType}} - -Constructor. Currently, the only valid event types are wxEVT\_CHAR and wxEVT\_CHAR\_HOOK. - -\membersection{wxKeyEvent::AltDown} - -\func{bool}{AltDown}{\void} - -Returns TRUE if the Alt key was down at the time of the key event. - -\membersection{wxKeyEvent::ControlDown} - -\func{bool}{ControlDown}{\void} - -Returns TRUE if the control key was down at the time of the key event. - -\membersection{wxKeyEvent::GetX} - -\func{float}{GetX}{\void} - -Returns the X position of the event. - -\membersection{wxKeyEvent::GetY} - -\func{float}{GetY}{\void} - -Returns the Y position of the event. - -\membersection{wxKeyEvent::KeyCode} - -\func{long}{KeyCode}{\void} - -Returns the virtual key code. ASCII events return normal ASCII values, -while non-ASCII events return values such as {\bf WXK\_LEFT} for the -left cursor key. See {\tt wx\_defs.h} for a full list of the virtual key codes. - -\membersection{wxKeyEvent::MetaDown} - -\func{bool}{MetaDown}{\void} - -Returns TRUE if the Meta key was down at the time of the key event. - -\membersection{wxKeyEvent::Position} - -\func{void}{Position}{\param{float *}{x}, \param{float *}{y}} - -Obtains the position at which the key was pressed. - -\membersection{wxKeyEvent::ShiftDown} - -\func{bool}{ShiftDown}{\void} - -Returns TRUE if the shift key was down at the time of the key event. - - diff --git a/docs/latex/wx/layout.tex b/docs/latex/wx/layout.tex deleted file mode 100644 index 2b9e2e5dbc..0000000000 --- a/docs/latex/wx/layout.tex +++ /dev/null @@ -1,94 +0,0 @@ -\section{\class{wxLayoutConstraints}}\label{wxlayoutconstraints} - -Objects of this class can be associated with a window to define its -layout constraints, with respect to siblings or its parent. - -The class consists of the following eight constraints of class wxIndividualLayoutConstraint, -some or all of which should be accessed directly to set the appropriate -constraints. - -\begin{itemize}\itemsep=0pt -\item {\bf left:} represents the left hand edge of the window -\item {\bf right:} represents the right hand edge of the window -\item {\bf top:} represents the top edge of the window -\item {\bf bottom:} represents the bottom edge of the window -\item {\bf width:} represents the width of the window -\item {\bf height:} represents the height of the window -\item {\bf centreX:} represents the horizontal centre point of the window -\item {\bf centreY:} represents the vertical centre point of the window -\end{itemize} - -Most constraints are initially set to have the relationship wxUnconstrained, -which means that their values should be calculated by looking at known constraints. -The exceptions are {\it width} and {\it height}, which are set to wxAsIs to -ensure that if the user does not specify a constraint, the existing -width and height will be used, to be compatible with panel items which often -have take a default size. If the constraint is wxAsIs, the dimension will -not be changed. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{Overview and examples}{constraintsoverview},\rtfsp -\helpref{wxIndividualLayoutConstraint}{wxindividuallayoutconstraint}, \helpref{wxWindow::SetConstraints}{wxwindowsetconstraints} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxLayoutConstraints::wxLayoutConstraints} - -\func{}{wxLayoutConstraints}{\void} - -Constructor. - -\membersection{wxLayoutConstraints::bottom} - -\member{wxIndividualLayoutConstraint}{bottom} - -Constraint for the bottom edge. - -\membersection{wxLayoutConstraints::centreX} - -\member{wxIndividualLayoutConstraint}{centreX} - -Constraint for the horizontal centre point. - -\membersection{wxLayoutConstraints::centreY} - -\member{wxIndividualLayoutConstraint}{centreY} - -Constraint for the vertical centre point. - -\membersection{wxLayoutConstraints::height} - -\member{wxIndividualLayoutConstraint}{height} - -Constraint for the height. - -\membersection{wxLayoutConstraints::left} - -\member{wxIndividualLayoutConstraint}{left} - -Constraint for the left-hand edge. - -\membersection{wxLayoutConstraints::right} - -\member{wxIndividualLayoutConstraint}{right} - -Constraint for the right-hand edge. - -\membersection{wxLayoutConstraints::top} - -\member{wxIndividualLayoutConstraint}{top} - -Constraint for the top edge. - -\membersection{wxLayoutConstraints::width} - -\member{wxIndividualLayoutConstraint}{width} - -Constraint for the width. - - diff --git a/docs/latex/wx/list.tex b/docs/latex/wx/list.tex deleted file mode 100644 index 3af91125d3..0000000000 --- a/docs/latex/wx/list.tex +++ /dev/null @@ -1,217 +0,0 @@ -\section{\class{wxList}}\label{wxlist} - -This class provides linked list functionality for wxWindows, and for an application -if it wishes. Depending on the form of constructor used, a list can be keyed on -integer or string keys to provide a primitive look-up ability. See \helpref{wxHashTable}{wxhashtable}\rtfsp -for a faster method of storage when random access is required. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{Example} - -It is very common to iterate on a list as follows: - -\begin{verbatim} - ... - wxPoint *point1 = new wxPoint(100, 100); - wxPoint *point2 = new wxPoint(200, 200); - - wxList SomeList; - SomeList.Append(point1); - SomeList.Append(point2); - - ... - - wxNode *node = SomeList.First(); - while (node) - { - wxPoint *point = (wxPoint *)node->Data(); - ... - node = node->Next(); - } -\end{verbatim} - -To delete nodes in a list as the list is being traversed, replace - -\begin{verbatim} - ... - node = node->Next(); - ... -\end{verbatim} - -with - -\begin{verbatim} - ... - delete point; - delete node; - node = SomeList.First(); - ... -\end{verbatim} - -See \helpref{wxNode}{wxnode} for members that retrieve the data associated with a node, and -members for getting to the next or previous node. - -Note that a cast is required when retrieving the data from a node. Although a -node is defined to store objects of type {\bf wxObject} and derived types, other -types (such as char*) may be used with appropriate casting. - -\wxheading{See also} - -\helpref{wxNode}{wxnode}, \helpref{wxStringList}{wxstringlist} - -\latexignore{\rtfignore{\wxheading{Members}}} - - -\membersection{wxList::wxList} - -\func{}{wxList}{\void} - -\func{}{wxList}{\param{unsigned int}{ key\_type}} - -\func{}{wxList}{\param{int}{ n}, \param{wxObject *}{objects[]}} - -\func{}{wxList}{\param{wxObject *}{object}, ...} - -Constructors. {\it key\_type} is one of wxKEY\_NONE, wxKEY\_INTEGER, or wxKEY\_STRING, -and indicates what sort of keying is required (if any). - -{\it objects} is an array of {\it n} objects with which to initialize the list. - -The variable-length argument list constructor must be supplied with a -terminating NULL. - -\membersection{wxList::\destruct{wxList}} - -\func{}{\destruct{wxList}}{\void} - -Destroys the list. Also destroys any remaining nodes, but does not destroy -client data held in the nodes. - -\membersection{wxList::Append} - -\func{wxNode *}{Append}{\param{wxObject *}{object}} - -\func{wxNode *}{Append}{\param{long}{ key}, \param{wxObject *}{object}} - -\func{wxNode *}{Append}{\param{const wxString\& }{key}, \param{wxObject *}{object}} - -Appends a new {\bf wxNode} to the end of the list and puts a pointer to the -\rtfsp{\it object} in the node. The last two forms store a key with the object for -later retrieval using the key. The new node is returned in each case. - -The key string is copied and stored by the list implementation. - -\membersection{wxList::Clear} - -\func{void}{Clear}{\void} - -Clears the list (but does not delete the client data stored with each node). - -\membersection{wxList::DeleteContents} - -\func{void}{DeleteContents}{\param{bool}{ destroy}} - -If {\it destroy} is TRUE, instructs the list to call {\it delete} on the client contents of -a node whenever the node is destroyed. The default is FALSE. - -\membersection{wxList::DeleteNode} - -\func{bool}{DeleteNode}{\param{wxNode *}{node}} - -Deletes the given node from the list, returning TRUE if successful. - -\membersection{wxList::DeleteObject} - -\func{bool}{DeleteObject}{\param{wxObject *}{object}} - -Finds the given client {\it object} and deletes the appropriate node from the list, returning -TRUE if successful. The application must delete the actual object separately. - -\membersection{wxList::Find} - -\func{wxNode *}{Find}{\param{long}{ key}} - -\func{wxNode *}{Find}{\param{const wxString\& }{key}} - -Returns the node whose stored key matches {\it key}. Use on a keyed list only. - -\membersection{wxList::First} - -\func{wxNode *}{First}{\void} - -Returns the first node in the list (NULL if the list is empty). - -\membersection{wxList::Insert} - -\func{wxNode *}{Insert}{\param{wxObject *}{object}} - -Insert object at front of list. - -\func{wxNode *}{Insert}{\param{wxNode *}{position}, \param{wxObject *}{object}} - -Insert object before {\it position}. - - -\membersection{wxList::Last} - -\func{wxNode *}{Last}{\void} - -Returns the last node in the list (NULL if the list is empty). - -\membersection{wxList::Member} - -\func{wxNode *}{Member}{\param{wxObject *}{object}} - -Returns the node associated with {\it object} if it is in the list, NULL otherwise. - -\membersection{wxList::Nth} - -\func{wxNode *}{Nth}{\param{int}{ n}} - -Returns the {\it nth} node in the list, indexing from zero (NULL if the list is empty -or the nth node could not be found). - -\membersection{wxList::Number} - -\func{int}{Number}{\void} - -Returns the number of elements in the list. - -\membersection{wxList::Sort} - -\func{void}{Sort}{\param{wxSortCompareFunction}{ compfunc}} - -\begin{verbatim} - // Type of compare function for list sort operation (as in 'qsort') - typedef int (*wxSortCompareFunction)(const void *elem1, const void *elem2); -\end{verbatim} - -Allows the sorting of arbitrary lists by giving -a function to compare two list elements. We use the system {\bf qsort} function -for the actual sorting process. The sort function receives pointers to wxObject pointers (wxObject **), -so be careful to dereference appropriately. - -Example: - -\begin{verbatim} - int listcompare(const void *arg1, const void *arg2) - { - return(compare(**(wxString **)arg1, // use the wxString 'compare' - **(wxString **)arg2)); // function - } - - void main() - { - wxList list; - - list.Append(new wxString("DEF")); - list.Append(new wxString("GHI")); - list.Append(new wxString("ABC")); - list.Sort(listcompare); - } -\end{verbatim} - - diff --git a/docs/latex/wx/listbox.tex b/docs/latex/wx/listbox.tex deleted file mode 100644 index e10378099b..0000000000 --- a/docs/latex/wx/listbox.tex +++ /dev/null @@ -1,356 +0,0 @@ -\section{\class{wxListBox}}\label{wxlistbox} - -A listbox is used to select one or more of a list of strings. The -strings are displayed in a scrolling box, with the selected string(s) -marked in reverse video. A listbox can be single selection (if an item -is selected, the previous selection is removed) or multiple selection -(clicking an item toggles the item on or off independently of other -selections). - -List box elements are numbered from zero. - -A listbox callback gets an event wxEVT\_COMMAND\_LISTBOX\_SELECT for single clicks, and -wxEVT\_COMMAND\_LISTBOX\_DOUBLE\_CLICKED for double clicks. - -\wxheading{Derived from} - -\helpref{wxControl}{wxcontrol}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -\twocolwidtha{5cm}% -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxLB\_SINGLE}}{Single-selection list.} -\twocolitem{\windowstyle{wxLB\_MULTIPLE}}{Multiple-selection list: the user can toggle multiple -items on and off.} -\twocolitem{\windowstyle{wxLB\_EXTENDED}}{Extended-selection list: the user can -select multiple items using the SHIFT key and the mouse or special key combinations.} -\twocolitem{\windowstyle{wxLB\_HSCROLL}}{Create horizontal scrollbar if contents are too wide (Windows only).} -\twocolitem{\windowstyle{wxLB\_ALWAYS\_SB}}{Always show a vertical scrollbar.} -\twocolitem{\windowstyle{wxLB\_NEEDED\_SB}}{Only create a vertical scrollbar if needed.} -\twocolitem{\windowstyle{wxLB\_SORT}}{The listbox contents are sorted in alphabetical order.} -\end{twocollist} - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Event handling} - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_LISTBOX(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_SELECTED event, -when an item on the list is selected.} -\twocolitem{{\bf EVT\_LISTBOX\_DCLICK(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_DOUBLECLICKED event, -when the listbox is doubleclicked.} -\end{twocollist} - -\wxheading{See also} - -\helpref{wxChoice}{wxchoice}, \helpref{wxComboBox}{wxcombobox}, \helpref{wxListCtrl}{wxlistctrl}, -\rtfsp\helpref{wxCommandEvent}{wxcommandevent} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxListBox::wxListBox}\label{wxlistboxconstr} - -\func{}{wxListBox}{\void} - -Default constructor. - -\func{}{wxListBox}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp -\param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp -\param{int}{ n}, \param{const wxString }{choices[] = NULL},\rtfsp -\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listBox"}} - -Constructor, creating and showing a list box. - -\wxheading{Parameters} - -\docparam{parent}{Parent window. Must not be NULL.} - -\docparam{id}{Window identifier. A value of -1 indicates a default value.} - -\docparam{pos}{Window position.} - -\docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized -appropriately.} - -\docparam{n}{Number of strings with which to initialise the control.} - -\docparam{choices}{An array of strings with which to initialise the control.} - -\docparam{style}{Window style. See \helpref{wxListBox}{wxlistbox}.} - -\docparam{validator}{Window validator.} - -\docparam{name}{Window name.} - -\wxheading{See also} - -\helpref{wxListBox::Create}{wxlistboxcreate}, \helpref{wxValidator}{wxvalidator} - -\membersection{wxListBox::\destruct{wxListBox}} - -\func{void}{\destruct{wxListBox}}{\void} - -Destructor, destroying the list box. - -\membersection{wxListBox::Append}\label{wxlistboxappend} - -\func{void}{Append}{\param{const wxString\& }{ item}} - -Adds the item to the end of the list box. - -\func{void}{Append}{\param{const wxString\& }{ item}, \param{char* }{clientData}} - -Adds the item to the end of the list box, associating the given data -with the item. - -\wxheading{Parameters} - -\docparam{item}{String to add.} - -\docparam{clientData}{Client data to associate with the item.} - -\membersection{wxListBox::Clear}\label{wxlistboxclear} - -\func{void}{Clear}{\void} - -Clears all strings from the list box. - -\membersection{wxListBox::Create}\label{wxlistboxcreate} - -\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp -\param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp -\param{int}{ n}, \param{const wxString }{choices[] = NULL},\rtfsp -\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listBox"}} - -Creates the listbox for two-step construction. See \helpref{wxListBox::wxListBox}{wxlistboxconstr}\rtfsp -for further details. - -\membersection{wxListBox::Delete}\label{wxlistboxdelete} - -\func{void}{Delete}{\param{int}{ n}} - -Deletes an item from the listbox. - -\wxheading{Parameters} - -\docparam{n}{The zero-based item index.} - -\membersection{wxListBox::Deselect}\label{wxlistboxdeselect} - -\func{void}{Deselect}{\param{int}{ n}} - -Deselects an item in the list box. - -\wxheading{Parameters} - -\docparam{n}{The zero-based item to deselect.} - -\wxheading{Remarks} - -This applies to multiple selection listboxes only. - -\membersection{wxListBox::FindString}\label{wxlistboxfindstring} - -\func{int}{FindString}{\param{const wxString\& }{string}} - -Finds an item matching the given string. - -\wxheading{Parameters} - -\docparam{string}{String to find.} - -\wxheading{Return value} - -The zero-based position of the item, or -1 if the string was not found. - -\membersection{wxListBox::GetClientData}\label{wxlistboxgetclientdata} - -\constfunc{char*}{GetClientData}{\param{int}{ n}} - -Returns a pointer to the client data associated with the given item (if any). - -\wxheading{Parameters} - -\docparam{n}{The zero-based position of the item.} - -\wxheading{Return value} - -A pointer to the client data, or NULL if not present. - -\membersection{wxListBox::GetSelection}\label{wxlistboxgetselection} - -\constfunc{int}{GetSelection}{\void} - -Gets the position of the selected item. - -\wxheading{Return value} - -The position of the current selection. - -\wxheading{Remarks} - -Applicable to single selection list boxes only. - -\wxheading{See also} - -\helpref{wxListBox::SetSelection}{wxlistboxsetselection},\rtfsp -\helpref{wxListBox::GetStringSelection}{wxlistboxgetstringselection},\rtfsp -\helpref{wxListBox::GetSelections}{wxlistboxgetselections} - -\membersection{wxListBox::GetSelections}\label{wxlistboxgetselections} - -\constfunc{int}{GetSelections}{\param{int **}{selections}} - -Gets an array containing the positions of the selected strings. - -\wxheading{Parameters} - -\docparam{selections}{A pointer to an integer array, which will be allocated by the function if -selects are present. Do not deallocate the returned array - it will be deallocated by the listbox.} - -\wxheading{Return value} - -The number of selections. - -\wxheading{Remarks} - -Use this with a multiple selection listbox. - -\wxheading{See also} - -\helpref{wxListBox::GetSelection}{wxlistboxgetselection},\rtfsp -\helpref{wxListBox::GetStringSelection}{wxlistboxgetstringselection},\rtfsp -\helpref{wxListBox::SetSelection}{wxlistboxsetselection} - -\membersection{wxListBox::GetString}\label{wxlistboxgetstring} - -\constfunc{wxString}{GetString}{\param{int}{ n}} - -Returns the string at the given position. - -\wxheading{Parameters} - -\docparam{n}{The zero-based position.} - -\wxheading{Return value} - -The string, or an empty string if the position was invalid. - -\membersection{wxListBox::GetStringSelection}\label{wxlistboxgetstringselection} - -\constfunc{wxString}{GetStringSelection}{\void} - -Gets the selected string - for single selection list boxes only. This -must be copied by the calling program if long term use is to be made of -it. - -\wxheading{See also} - -\helpref{wxListBox::GetSelection}{wxlistboxgetselection},\rtfsp -\helpref{wxListBox::GetSelections}{wxlistboxgetselections},\rtfsp -\helpref{wxListBox::SetSelection}{wxlistboxsetselection} - -\membersection{wxListBox::Number}\label{wxlistboxnumber} - -\constfunc{int}{Number}{\void} - -Returns the number of items in the listbox. - -\membersection{wxListBox::Selected}\label{wxlistboxselected} - -\constfunc{bool}{Selected}{\param{int}{ n}} - -Determines whether an item is selected. - -\wxheading{Parameters} - -\docparam{n}{The zero-based item index.} - -\wxheading{Return value} - -TRUE if the given item is selected, FALSE otherwise. - -\membersection{wxListBox::Set}\label{wxlistboxset} - -\func{void}{Set}{\param{int}{ n}, \param{const wxString*}{ choices}} - -Clears the list box and adds the given strings. - -\wxheading{Parameters} - -\docparam{n}{The number of strings to set.} - -\docparam{choices}{An array of strings to set.} - -\wxheading{Remarks} - -Deallocate the array from the calling program -after this function has been called. - -\membersection{wxListBox::SetClientData}\label{wxlistboxsetclientdata} - -\func{void}{SetClientData}{\param{int}{ n}, \param{char* }{data}} - -Associates the given client data pointer with the given item. - -\wxheading{Parameters} - -\docparam{n}{The zero-based item index.} - -\docparam{data}{The client data to associate with the item.} - -\membersection{wxListBox::SetFirstItem}\label{wxlistboxsetfirstitem} - -\func{void}{SetFirstItem}{\param{int}{ n}} - -\func{void}{SetFirstItem}{\param{const wxString\& }{string}} - -Set the specified item to be the first visible item. - -\wxheading{Parameters} - -\docparam{n}{The zero-based item index.} - -\docparam{string}{The string that should be visible.} - -\membersection{wxListBox::SetSelection}\label{wxlistboxsetselection} - -\func{void}{SetSelection}{\param{int}{ n}, \param{const bool }{select = TRUE}} - -Selects or deselects the given item. - -\wxheading{Parameters} - -\docparam{n}{The zero-based item index.} - -\docparam{select}{If TRUE, will select the item. If FALSE, will deselect it.} - -\membersection{wxListBox::SetString}\label{wxlistboxsetstring} - -\func{void}{SetString}{\param{int}{ n}, \param{const wxString\& }{ string}} - -Sets the string value of an item. - -\wxheading{Parameters} - -\docparam{n}{The zero-based item index.} - -\docparam{string}{The string to set.} - -\membersection{wxListBox::SetStringSelection}\label{wxlistboxsetstringselection} - -\func{void}{SetStringSelection}{\param{const wxString\& }{ string}, \param{const bool}{ select = TRUE}} - -Sets the current selection. - -\wxheading{Parameters} - -\docparam{string}{The item to select.} - -\docparam{select}{If TRUE, will select the item. If FALSE, will deselect it.} - diff --git a/docs/latex/wx/listctrl.tex b/docs/latex/wx/listctrl.tex deleted file mode 100644 index 557b320039..0000000000 --- a/docs/latex/wx/listctrl.tex +++ /dev/null @@ -1,545 +0,0 @@ -\section{\class{wxListCtrl}}\label{wxlistctrl} - -A list control presents lists in a number of formats: list view, report view, icon view -and small icon view. Elements are numbered from zero. - -To intercept events from a list control, use the event table macros described in \helpref{wxListEvent}{wxlistevent}. - -\wxheading{Derived from} - -\helpref{wxControl}{wxcontrol}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxLC\_LIST}}{multicolumn list view, with optional small icons. -Columns are computed automatically, i.e. you don't set columns as in wxLC\_REPORT. In other words, -the list wraps, unlike a wxListBox.} -\twocolitem{\windowstyle{wxLC\_REPORT}}{single or multicolumn report view, with optional header.} -\twocolitem{\windowstyle{wxLC\_ICON}}{Large icon view, with optional labels.} -\twocolitem{\windowstyle{wxLC\_SMALL\_ICON}}{Small icon view, with optional labels.} -\twocolitem{\windowstyle{wxLC\_ALIGN\_TOP}}{Icons align to the top (default).} -\twocolitem{\windowstyle{wxLC\_ALIGN\_LEFT}}{Icons align to the left.} -\twocolitem{\windowstyle{wxLC\_AUTOARRANGE}}{Icons arrange themselves.} -\twocolitem{\windowstyle{wxLC\_USER\_TEXT}}{The application provides label text on demand, except for column headers.} -\twocolitem{\windowstyle{wxLC\_EDIT\_LABELS}}{Labels are editable: the application will be notified when editing starts.} -\twocolitem{\windowstyle{wxLC\_NO\_HEADER}}{No header in report mode.} -\twocolitem{\windowstyle{wxLC\_SINGLE\_SEL}}{Single selection.} -\twocolitem{\windowstyle{wxLC\_SORT\_ASCENDING}}{Sort in ascending order (must still supply a comparison callback in SortItems.} -\twocolitem{\windowstyle{wxLC\_SORT\_DESCENDING}}{Sort in descending order (must still supply a comparison callback in SortItems.} -\end{twocollist} - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Event handling} - -To process input from a list control, use these event handler macros to direct input to member -functions that take a \helpref{wxListEvent}{wxlistevent} argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_LIST\_BEGIN\_DRAG(id, func)}}{Begin dragging with the left mouse button.} -\twocolitem{{\bf EVT\_LIST\_BEGIN\_RDRAG(id, func)}}{Begin dragging with the right mouse button.} -\twocolitem{{\bf EVT\_LIST\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label.} -\twocolitem{{\bf EVT\_LIST\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label.} -\twocolitem{{\bf EVT\_LIST\_DELETE\_ITEM(id, func)}}{Delete an item.} -\twocolitem{{\bf EVT\_LIST\_DELETE\_ALL\_ITEMS(id, func)}}{Delete all items.} -\twocolitem{{\bf EVT\_LIST\_GET\_INFO(id, func)}}{Request information from the application, usually the item text.} -\twocolitem{{\bf EVT\_LIST\_SET\_INFO(id, func)}}{Information is being supplied (not implemented).} -\twocolitem{{\bf EVT\_LIST\_ITEM\_SELECTED(id, func)}}{The item has been selected.} -\twocolitem{{\bf EVT\_LIST\_ITEM\_DESELECTED(id, func)}}{The item has been deselected.} -\twocolitem{{\bf EVT\_LIST\_KEY\_DOWN(id, func)}}{A key has been pressed.} -\twocolitem{{\bf EVT\_LIST\_INSERT\_ITEM(id, func)}}{An item has been inserted.} -\twocolitem{{\bf EVT\_LIST\_COL\_CLICK(id, func)}}{A column ({\bf m\_col}) has been left-clicked.} -\end{twocollist}% - -\wxheading{See also} - -\helpref{wxListCtrl overview}{wxlistctrloverview}, \helpref{wxListBox}{wxlistbox}, \helpref{wxTreeCtrl}{wxtreectrl},\rtfsp -\helpref{wxImageList}{wximagelist}, \helpref{wxListEvent}{wxlistevent} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxListCtrl::wxListCtrl}\label{wxlistctrlconstr} - -\func{}{wxListCtrl}{\void} - -Default constructor. - -\func{}{wxListCtrl}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp -\param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp -\param{long}{ style = wxLC\_ICON}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listCtrl"}} - -Constructor, creating and showing a list control. - -\wxheading{Parameters} - -\docparam{parent}{Parent window. Must not be NULL.} - -\docparam{id}{Window identifier. A value of -1 indicates a default value.} - -\docparam{pos}{Window position.} - -\docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized -appropriately.} - -\docparam{style}{Window style. See \helpref{wxListCtrl}{wxlistctrl}.} - -\docparam{validator}{Window validator.} - -\docparam{name}{Window name.} - -\wxheading{See also} - -\helpref{wxListCtrl::Create}{wxlistctrlcreate}, \helpref{wxValidator}{wxvalidator} - -\membersection{wxListCtrl::\destruct{wxListCtrl}} - -\func{void}{\destruct{wxListCtrl}}{\void} - -Destructor, destroying the list control. - -\membersection{wxListCtrl::Arrange}\label{wxlistctrlarrange} - -\func{bool}{Arrange}{\param{int }{flag = wxLIST\_ALIGN\_DEFAULT}} - -Arranges the items in icon or small icon view. {\it flag} is one of: - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{wxLIST\_ALIGN\_DEFAULT}{Default alignment.} -\twocolitem{wxLIST\_ALIGN\_LEFT}{Align to the left side of the control.} -\twocolitem{wxLIST\_ALIGN\_TOP}{Align to the top side of the control.} -\twocolitem{wxLIST\_ALIGN\_SNAP\_TO\_GRID}{Snap to grid.} -\end{twocollist} - -\membersection{wxListCtrl::Create}\label{wxlistctrlcreate} - -\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp -\param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp -\param{long}{ style = wxLC\_ICON}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listCtrl"}} - -Creates the list control. See \helpref{wxListCtrl::wxListCtrl}{wxlistctrlconstr} for further details. - -\membersection{wxListCtrl::DeleteItem}\label{wxlistctrldeleteitem} - -\func{bool}{DeleteItem}{\param{long }{item}} - -Deletes the specified item. - -\membersection{wxListCtrl::DeleteAllItems}\label{wxlistctrldeleteallitems} - -\func{bool}{DeleteAllItems}{\void} - -Deletes all the items in the list control. - -\membersection{wxListCtrl::DeleteColumn}\label{wxlistctrldeletecolumn} - -\func{bool}{DeleteColumn}{\param{int }{col}} - -Deletes a column. - -\membersection{wxListCtrl::Edit}\label{wxlistctrledit} - -\func{wxTextCtrl\&}{Edit}{\param{long }{item}} - -Starts editing a label. - -\membersection{wxListCtrl::EnsureVisible}\label{wxlistctrlensurevisible} - -\func{bool}{EnsureVisible}{\param{long }{item}} - -Ensures this item is visible. - -\membersection{wxListCtrl::FindItem}\label{wxlistctrlfinditem} - -\func{long}{FindItem}{\param{long }{start}, \param{const wxString\& }{str}, \param{const bool }{partial = FALSE}} - -Find an item whose label matches this string, starting from the item after {\it start} or -the beginning if {\it start} is -1. - -\func{long}{FindItem}{\param{long }{start}, \param{long }{data}} - -Find an item whose data matches this data, starting from the item after {\it start} or -the beginning if 'start' is -1. - -\func{long}{FindItem}{\param{long }{start}, \param{const wxPoint\& }{pt}, \param{int }{direction}} - -Find an item nearest this position in the specified direction, starting from -the item after {\it start} or the beginning if {\it start} is -1. - -\membersection{wxListCtrl::GetColumn}\label{wxlistctrlgetcolumn} - -\constfunc{bool}{GetColumn}{\param{int }{col}, \param{wxListItem\& }{item}} - -Gets information about this column. See \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem} for more -information. - -\membersection{wxListCtrl::GetColumnWidth}\label{wxlistctrlgetcolumnwidth} - -\constfunc{int}{GetColumnWidth}{\param{int }{col}} - -Gets the column width (report view only). - -\membersection{wxListCtrl::GetCountPerPage}\label{wxlistctrlgetcountperpage} - -\constfunc{int}{GetCountPerPage}{\void} - -Gets the number of items that can fit vertically in the -visible area of the list control (list or report view) -or the total number of items in the list control (icon -or small icon view). - -\membersection{wxListCtrl::GetEditControl}\label{wxlistctrlgeteditcontrol} - -\constfunc{wxTextCtrl\&}{GetEditControl}{\void} - -Gets the edit control for editing labels. - -\membersection{wxListCtrl::GetImageList}\label{wxlistctrlgetimagelist} - -\constfunc{wxImageList*}{GetImageList}{\param{int }{which}} - -Returns the specified image list. {\it which} may be one of: - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxIMAGE\_LIST\_NORMAL}}{The normal (large icon) image list.} -\twocolitem{\windowstyle{wxIMAGE\_LIST\_SMALL}}{The small icon image list.} -\twocolitem{\windowstyle{wxIMAGE\_LIST\_STATE}}{The user-defined state image list (unimplemented).} -\end{twocollist} - -\membersection{wxListCtrl::GetItem}\label{wxlistctrlgetitem} - -\constfunc{bool}{GetItem}{\param{wxListItem\& }{info}} - -Gets information about the item. See \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem} for more -information. - -\membersection{wxListCtrl::GetItemData}\label{wxlistctrlgetitemdata} - -\constfunc{long}{GetItemData}{\param{long }{item}} - -Gets the application-defined data associated with this item. - -\membersection{wxListCtrl::GetItemPosition}\label{wxlistctrlgetitemposition} - -\constfunc{bool}{GetItemPosition}{\param{long }{item}, \param{wxPoint\& }{pos}} - -Returns the position of the item, in icon or small icon view. - -\membersection{wxListCtrl::GetItemRect}\label{wxlistctrlgetitemrect} - -\constfunc{bool}{GetItemRect}{\param{long }{item}, \param{wxRect\& }{rect}, \param{int }{code = wxLIST\_RECT\_BOUNDS}} - -Returns the rectangle representing the item's size and position, in client coordinates. - -{\it code} is one of wxLIST\_RECT\_BOUNDS, wxLIST\_RECT\_ICON, wxLIST\_RECT\_LABEL. - -\membersection{wxListCtrl::GetItemState}\label{wxlistctrlgetitemstate} - -\constfunc{int}{GetItemState}{\param{long }{item}, \param{long }{stateMask}} - -Gets the item state. For a list of state flags, see \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem}. - -The {\bf stateMask} indicates which state flags are of interest. - -\membersection{wxListCtrl::GetItemCount}\label{wxlistctrlgetitemcount} - -\constfunc{int}{GetItemCount}{\void} - -Returns the number of items in the list control. - -\membersection{wxListCtrl::GetItemSpacing}\label{wxlistctrlgetitemspacing} - -\constfunc{int}{GetItemSpacing}{\param{bool }{isSmall}} - -Retrieves the spacing between icons in pixels. -If {\it small} is TRUE, gets the spacing for the small icon -view, otherwise the large icon view. - -\membersection{wxListCtrl::GetItemText}\label{wxlistctrlgetitemtext} - -\constfunc{wxString}{GetItemText}{\param{long }{item}} - -Gets the item text for this item. - -\membersection{wxListCtrl::GetNextItem}\label{wxlistctrlgetnextitem} - -\constfunc{long}{GetNextItem}{\param{long }{item}, \param{int }{geometry = wxLIST\_NEXT\_ALL}, \param{int }{state = wxLIST\_STATE\_DONTCARE}} - -Searches for an item with the given goemetry or state, starting from {\it item}. {\it item} can be -1 -to find the first item that matches the specified flags. - -Returns the item or -1 if unsuccessful. - -{\it geometry} can be one of: - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{wxLIST\_NEXT\_ABOVE}{Searches for an item above the specified item.} -\twocolitem{wxLIST\_NEXT\_ALL}{Searches for subsequent item by index.} -\twocolitem{wxLIST\_NEXT\_BELOW}{Searches for an item below the specified item.} -\twocolitem{wxLIST\_NEXT\_LEFT}{Searches for an item to the left of the specified item.} -\twocolitem{wxLIST\_NEXT\_RIGHT}{Searches for an item to the right of the specified item.} -\end{twocollist} - -{\it state} can be a bitlist of the following: - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{wxLIST\_STATE\_DONTCARE}{Don't care what the state is.} -\twocolitem{wxLIST\_STATE\_DROPHILITED}{The item indicates it is a drop target.} -\twocolitem{wxLIST\_STATE\_FOCUSED}{The item has the focus.} -\twocolitem{wxLIST\_STATE\_SELECTED}{The item is selected.} -\twocolitem{wxLIST\_STATE\_CUT}{The item is selected as part of a cut and paste operation.} -\end{twocollist} - -\membersection{wxListCtrl::GetSelectedItemCount}\label{wxlistctrlgetselecteditemcount} - -\constfunc{int}{GetSelectedItemCount}{\void} - -Returns the number of selected items in the list control. - -\membersection{wxListCtrl::GetTextColour}\label{wxlistctrlgettextcolour} - -\constfunc{wxColour}{GetTextColour}{\void} - -Gets the text colour of the list control. - -\membersection{wxListCtrl::GetTopItem}\label{wxlistctrlgettopitem} - -\constfunc{long}{GetTopItem}{\void} - -Gets the index of the topmost visible item when in -list or report view. - -\membersection{wxListCtrl::HitTest}\label{wxlistctrlhittest} - -\func{long}{HitTest}{\param{const wxPoint\& }{point}, \param{int\& }{flags}} - -Determines which item (if any) is at the specified point, -giving details in {\it flags}. {\it flags} will be a combination of the following flags: - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{wxLIST\_HITTEST\_ABOVE}{Above the client area.} -\twocolitem{wxLIST\_HITTEST\_BELOW}{Below the client area.} -\twocolitem{wxLIST\_HITTEST\_NOWHERE}{In the client area but below the last item.} -\twocolitem{wxLIST\_HITTEST\_ONITEMICON}{On the bitmap associated with an item.} -\twocolitem{wxLIST\_HITTEST\_ONITEMLABEL}{On the label (string) associated with an item.} -\twocolitem{wxLIST\_HITTEST\_ONITEMRIGHT}{In the area to the right of an item.} -\twocolitem{wxLIST\_HITTEST\_ONITEMSTATEICON}{On the state icon for a tree view item that is in a user-defined state.} -\twocolitem{wxLIST\_HITTEST\_TOLEFT}{To the right of the client area.} -\twocolitem{wxLIST\_HITTEST\_TORIGHT}{To the left of the client area.} -\twocolitem{wxLIST\_HITTEST\_ONITEM}{Combination of wxLIST\_HITTEST\_ONITEMICON, wxLIST\_HITTEST\_ONITEMLABEL, -wxLIST\_HITTEST\_ONITEMSTATEICON.} -\end{twocollist} - -\membersection{wxListCtrl::InsertColumn}\label{wxlistctrlinsertcolumn} - -\func{long}{InsertColumn}{\param{long }{col}, \param{wxListItem\& }{info}} - -For list view mode (only), inserts a column. For more details, see \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem}. - -\func{long}{InsertColumn}{\param{long }{col}, \param{const wxString\& }{heading}, \param{int }{format = wxLIST\_FORMAT\_LEFT},\rtfsp -\param{int }{width = -1}} - -For list view mode (only), inserts a column. For more details, see \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem}. - -\membersection{wxListCtrl::InsertItem}\label{wxlistctrlinsertitem} - -\func{long}{InsertItem}{\param{wxListItem\& }{info}} - -Inserts an item, returning the index of the new item if successful, --1 otherwise. - -\func{long}{InsertItem}{\param{long }{index}, \param{const wxString\& }{label}} - -Inserts a string item. - -\func{long}{InsertItem}{\param{long }{index}, \param{int }{imageIndex}} - -Inserts an image item. - -\func{long}{InsertItem}{\param{long }{index}, \param{const wxString\& }{label}, \param{int }{imageIndex}} - -Insert an image/string item. - -\wxheading{Parameters} - -\docparam{info}{wxListItem object} - -\docparam{index}{Index of the new item, supplied by the application} - -\docparam{label}{String label} - -\docparam{imageIndex}{index into the image list associated with this control and view style} - -\membersection{wxListCtrl::ScrollList}\label{wxlistctrlscrolllist} - -\func{bool}{ScrollList}{\param{int }{dx}, \param{int }{dy}} - -Scrolls the list control. If in icon, small icon or report view mode, -dx specifies the number of pixels to scroll. If in list view mode, dx -specifies the number of columns to scroll. - -If in icon, small icon or list view mode, dy specifies the number of pixels -to scroll. If in report view mode, dy specifies the number of lines to scroll. - -\membersection{wxListCtrl::SetBackgroundColour}\label{wxlistctrlsetbackgroundcolour} - -\func{void}{SetBackgroundColour}{\param{const wxColour\& }{col}} - -Sets the background colour (GetBackgroundColour already implicit in -wxWindow class). - -\membersection{wxListCtrl::SetColumn}\label{wxlistctrlsetcolumn} - -\func{bool}{SetColumn}{\param{int }{col}, \param{wxListItem\& }{item}} - -Sets information about this column. See \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem} for more -information. - -\membersection{wxListCtrl::SetColumnWidth}\label{wxlistctrlsetcolumnwidth} - -\func{bool}{SetColumnWidth}{\param{int }{col}, \param{int }{width}} - -Sets the column width. - -{\it width} can be a width in pixels or wxLIST\_AUTOSIZE (-1) or wxLIST\_AUTOSIZE\_USEHEADER (-2). - -In small or normal icon view, {\it col} must be -1, and the column width is set for all columns. - -\membersection{wxListCtrl::SetImageList}\label{wxlistctrlsetimagelist} - -\func{void}{SetImageList}{\param{wxImageList*}{ imageList}, \param{int }{which}} - -Sets the image list associated with the control. {\it which} is one of -wxIMAGE\_LIST\_NORMAL, wxIMAGE\_LIST\_SMALL, wxIMAGE\_LIST\_STATE (the last is unimplemented). - -\membersection{wxListCtrl::SetItem}\label{wxlistctrlsetitem} - -\func{bool}{SetItem}{\param{wxListItem\& }{info}} - -Sets information about the item. - -wxListItem is a class with the following members: - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{long m\_mask}{Indicates which fields are valid. See the list of valid mask flags below.} -\twocolitem{long m\_itemId}{The zero-based item position.} -\twocolitem{int m\_col}{Zero-based column, if in report mode.} -\twocolitem{long m\_state}{The state of the item. See the list of valid state flags below.} -\twocolitem{long m\_stateMask}{A mask indicating which state flags are valid. See the list of valid state flags below.} -\twocolitem{wxString m\_text}{The label/header text.} -\twocolitem{int m\_image}{The zero-based index into an image list.} -\twocolitem{long m\_data}{Application-defined data.} -\twocolitem{int m\_format}{For columns only: the format. Can be wxLIST\_FORMAT\_LEFT, wxLIST\_FORMAT\_RIGHT or -wxLIST\_FORMAT\_CENTRE.} -\twocolitem{int m\_width}{For columns only: the column width.} -\end{twocollist} - -The {\bf m\_mask} member contains a bitlist specifying which of the other fields are valid. The flags are: - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{wxLIST\_MASK\_STATE}{The {\bf m\_state} field is valid.} -\twocolitem{wxLIST\_MASK\_TEXT}{The {\bf m\_text} field is valid.} -\twocolitem{wxLIST\_MASK\_IMAGE}{The {\bf m\_image} field is valid.} -\twocolitem{wxLIST\_MASK\_DATA}{The {\bf m\_data} field is valid.} -\twocolitem{wxLIST\_MASK\_WIDTH}{The {\bf m\_width} field is valid.} -\twocolitem{wxLIST\_MASK\_FORMAT}{The {\bf m\_format} field is valid.} -\end{twocollist} - -The {\bf m\_stateMask} and {\bf m\_state} members take flags from the following: - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{wxLIST\_STATE\_DONTCARE}{Don't care what the state is.} -\twocolitem{wxLIST\_STATE\_DROPHILITED}{The item is highlighted to receive a drop event.} -\twocolitem{wxLIST\_STATE\_FOCUSED}{The item has the focus.} -\twocolitem{wxLIST\_STATE\_SELECTED}{The item is selected.} -\twocolitem{wxLIST\_STATE\_CUT}{The item is in the cut state.} -\end{twocollist} - -\func{long}{SetItem}{\param{long }{index}, \param{int }{col}, \param{const wxString\& }{label}, \param{int }{imageId = -1}} - -Sets a string field at a particular column. - -\membersection{wxListCtrl::SetItemData}\label{wxlistctrlsetitemdata} - -\func{bool}{SetItemData}{\param{long }{item}, \param{long }{data}} - -Associates application-defined data with this item. - -\membersection{wxListCtrl::SetItemImage}\label{wxlistctrlsetitemimage} - -\func{bool}{SetItemImage}{\param{long }{item}, \param{int }{image}, \param{int }{selImage}} - -Sets the unselected and selected images associated with the item. The images are indices into the -image list associated with the list control. - -\membersection{wxListCtrl::SetItemPosition}\label{wxlistctrlsetitemposition} - -\func{bool}{SetItemPosition}{\param{long }{item}, \param{const wxPoint\& }{pos}} - -Sets the position of the item, in icon or small icon view. - -\membersection{wxListCtrl::SetItemState}\label{wxlistctrlsetitemstate} - -\func{bool}{SetItemState}{\param{long }{item}, \param{long }{state}, \param{long }{stateMask}} - -Sets the item state. For a list of state flags, see \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem}. - -The {\bf stateMask} indicates which state flags are valid. - -\membersection{wxListCtrl::SetItemText}\label{wxlistctrlsetitemtext} - -\func{void}{SetItemText}{\param{long }{item}, \param{const wxString\& }{text}} - -Sets the item text for this item. - -\membersection{wxListCtrl::SetSingleStyle}\label{wxlistctrlsetsinglestyle} - -\func{void}{SetSingleStyle}{\param{long }{style}, \param{const bool }{add = TRUE}} - -Adds or removes a single window style. - -\membersection{wxListCtrl::SetTextColour}\label{wxlistctrlsettextcolour} - -\func{void}{SetTextColour}{\param{const wxColour\& }{col}} - -Sets the text colour of the list control. - -\membersection{wxListCtrl::SetWindowStyleFlag}\label{wxlistctrlsetwindowstyleflag} - -\func{void}{SetWindowStyleFlag}{\param{long }{style}} - -Sets the whole window style. - -\membersection{wxListCtrl::SortItems}\label{wxlistctrlsortitems} - -\func{bool}{SortItems}{\param{wxListCtrlCompare }{fn}, \param{long }{data}} - -Sorts the items in the list control. - -fn is a function which takes 3 long arguments: item1, item2, data. - -item1 is the long data associated with a first item (NOT the index). - -item2 is the long data associated with a second item (NOT the index). - -data is the same value as passed to SortItems. - -The return value is a negative number if the first item should precede the second -item, a positive number of the second item should precede the first, -or zero if the two items are equivalent. - -data is arbitrary data to be passed to the sort function. - diff --git a/docs/latex/wx/listevt.tex b/docs/latex/wx/listevt.tex deleted file mode 100644 index e1561cda4d..0000000000 --- a/docs/latex/wx/listevt.tex +++ /dev/null @@ -1,87 +0,0 @@ -\section{\class{wxListEvent}}\label{wxlistevent} - -A list event holds information about events associated with wxListCtrl objects. - -\wxheading{Derived from} - -\helpref{wxCommandEvent}{wxcommandevent}\\ -\helpref{wxEvent}{wxevent}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Event table macros} - -To process input from a list control, use these event handler macros to direct input to member -functions that take a wxListEvent argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_LIST\_BEGIN\_DRAG(id, func)}}{Begin dragging with the left mouse button.} -\twocolitem{{\bf EVT\_LIST\_BEGIN\_RDRAG(id, func)}}{Begin dragging with the right mouse button.} -\twocolitem{{\bf EVT\_LIST\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label.} -\twocolitem{{\bf EVT\_LIST\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label.} -\twocolitem{{\bf EVT\_LIST\_DELETE\_ITEM(id, func)}}{Delete an item.} -\twocolitem{{\bf EVT\_LIST\_DELETE\_ALL\_ITEMS(id, func)}}{Delete all items.} -\twocolitem{{\bf EVT\_LIST\_GET\_INFO(id, func)}}{Request information from the application, usually the item text.} -\twocolitem{{\bf EVT\_LIST\_SET\_INFO(id, func)}}{Information is being supplied (not implemented).} -\twocolitem{{\bf EVT\_LIST\_ITEM\_SELECTED(id, func)}}{The item has been selected.} -\twocolitem{{\bf EVT\_LIST\_ITEM\_DESELECTED(id, func)}}{The item has been deselected.} -\twocolitem{{\bf EVT\_LIST\_KEY\_DOWN(id, func)}}{A key has been pressed.} -\twocolitem{{\bf EVT\_LIST\_INSERT\_ITEM(id, func)}}{An item has been inserted.} -\twocolitem{{\bf EVT\_LIST\_COL\_CLICK(id, func)}}{A column ({\bf m\_col}) has been left-clicked.} -\end{twocollist}% - -\wxheading{See also} - -\helpref{wxListCtrl}{wxlistctrl} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxListEvent::wxListEvent} - -\func{}{wxListEvent}{\param{WXTYPE }{commandType = 0}, \param{int }{id = 0}} - -Constructor. - -\membersection{wxListEvent::m\_code} - -\member{int}{m\_code} - -Key code if the event is a keypress event. - -\membersection{wxListEvent::m\_itemIndex} - -\member{long}{m\_itemIndex} - -The item index. - -\membersection{wxListEvent::m\_oldItemIndex} - -\member{long}{m\_oldItemIndex} - -The old item index. - -\membersection{wxListEvent::m\_col} - -\member{int}{m\_col} - -The column position. - -\membersection{wxListEvent::m\_cancelled} - -\member{bool}{m\_cancelled} - -TRUE if this event is an end edit event and the user cancelled the edit. - -\membersection{wxListEvent::m\_pointDrag} - -\member{wxPoint}{m\_pointDrag} - -The position of the mouse pointer if the event is a drag event. - -\membersection{wxListEvent::m\_item} - -\member{wxListItem}{m\_item} - -An item object, used by some events. See also \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem}. - - diff --git a/docs/latex/wx/manual.tex b/docs/latex/wx/manual.tex deleted file mode 100644 index 5cceeb4106..0000000000 --- a/docs/latex/wx/manual.tex +++ /dev/null @@ -1,137 +0,0 @@ -\documentstyle[a4,11pt,makeidx,verbatim,texhelp,fancyheadings,palatino]{report} -% JACS: doesn't make it through Tex2RTF, sorry.I'll put it into texhelp.sty -% since Tex2RTF doesn't parse it. -% BTW, style MUST be report for it to work for Tex2RTF. -%KB: -%\addtolength{\textwidth}{1in} -%\addtolength{\oddsidemargin}{-0.5in} -%\addtolength{\topmargin}{-0.5in} -%\addtolength{\textheight}{1in} -%\sloppy -%end of my changes -\newcommand{\indexit}[1]{#1\index{#1}}% -\newcommand{\pipe}[0]{$\|$\ }% -\definecolour{black}{0}{0}{0}% -\definecolour{cyan}{0}{255}{255}% -\definecolour{green}{0}{255}{0}% -\definecolour{magenta}{255}{0}{255}% -\definecolour{red}{255}{0}{0}% -\definecolour{blue}{0}{0}{200}% -\definecolour{yellow}{255}{255}{0}% -\definecolour{white}{255}{255}{255}% -% -\input psbox.tex -% Remove this for processing with dvi2ps instead of dvips -%\special{!/@scaleunit 1 def} -\parskip=10pt -\parindent=0pt -\title{User Manual for wxWindows 2.0: a portable C++ GUI toolkit} -\winhelponly{\author{by Julian Smart -%\winhelponly{\\$$\image{1cm;0cm}{wxwin.wmf}$$} -}} -\winhelpignore{\author{Julian Smart} -\date{July 31st 1998} -} -\makeindex -\begin{document} -\maketitle -\pagestyle{fancyplain} -\bibliographystyle{plain} -\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}} -\setfooter{\thepage}{}{}{}{}{\thepage}% -\pagenumbering{roman} -\tableofcontents - -% A special table of contents for the WinHelp manual -\begin{comment} -\winhelponly{ -\chapter*{wxWindows class library reference}\label{winhelpcontents} - -\center{ -%\image{}{wxwin.wmf} -}% - -\sethotspotcolour{off}% -\sethotspotunderline{on}% -\large{ -\image{}{cpp.bmp} \helpref{Alphabetical class reference}{classref} - -\image{}{shelves.bmp} \helpref{Classes by category}{classesbycat} - -\image{}{book1.bmp} \helpref{Topic overviews}{overviews} - -\image{}{hand1.bmp} \helpref{Guide to wxWindows}{wxwinchapters} -} -\sethotspotcolour{on}% -\sethotspotunderline{on}% - -\chapter*{Overview of wxWindows}\label{wxwinchapters} - -\helpref{Introduction}{introduction}\\ -%\helpref{Resource guide}{resguide}\\ -%\helpref{Comparison with other GUI models}{comparison}\\ -%\helpref{Multi-platform development with wxWindows}{multiplat}\\ -%\helpref{Tutorial}{tutorial}\\ -\helpref{The wxWindows resource system}{resourceformats}\\ -\helpref{Utilities}{utilities}\\ -\helpref{Programming strategies}{strategies}\\ -\helpref{Bugs and future directions}{bugs}\\ -\helpref{References}{bibliography} -} -\end{comment} - -\chapter*{Copyright notice} -\setheader{{\it COPYRIGHT}}{}{}{}{}{{\it COPYRIGHT}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -\begin{center} -Copyright (c) 1998 Julian Smart, Markus Holzem, Robert Roebling and other -members of the wxWindows team\\ -Portions (c) 1996 Artificial Intelligence Applications Institute\\ -\end{center} - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose is hereby granted without fee, provided that the -above copyright notice, author statement and this permission notice appear in -all copies of this software and related documentation. - -THE SOFTWARE IS PROVIDED ``AS-IS'' AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, -IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF -MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -IN NO EVENT SHALL THE ARTIFICIAL INTELLIGENCE APPLICATIONS INSTITUTE OR THE -UNIVERSITY OF EDINBURGH OR ANY MEMBERS OF THE WXWINDOWS TEAM BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF -DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH -THE USE OR PERFORMANCE OF THIS SOFTWARE. - -\input{body.tex} -\helpinput{classes.tex} -\helpinput{category.tex} -\helpinput{topics.tex} - -\begin{comment} -\newpage - -% Puts books in the bibliography without needing to cite them in the -% text -\nocite{helpbook}% -\nocite{wong93}% -\nocite{pree94}% -\nocite{gamma95}% -\nocite{smart95a}% -\nocite{smart95b}% - -\bibliography{refs} -\addcontentsline{toc}{chapter}{Bibliography} -\setheader{{\it REFERENCES}}{}{}{}{}{{\it REFERENCES}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% -\end{comment} - -\newpage -\addcontentsline{toc}{chapter}{Index} -\setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% -\printindex -\end{document} diff --git a/docs/latex/wx/mask.tex b/docs/latex/wx/mask.tex deleted file mode 100644 index 7f004df69e..0000000000 --- a/docs/latex/wx/mask.tex +++ /dev/null @@ -1,76 +0,0 @@ -\section{\class{wxMask}}\label{wxmask} - -This class encapsulates a monochrome mask bitmap, where the masked area is black and -the unmasked area is white. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{Remarks} - -A mask may be associated with a \helpref{wxBitmap}{wxbitmap}. It is used in \helpref{wxDC::Blit}{wxdcblit} when -the source device context is a \helpref{wxMemoryDC}{wxmemorydc} with wxBitmap selected into it that -contains a mask. - -\wxheading{See also} - -\helpref{wxBitmap}{wxbitmap}, \helpref{wxDC::Blit}{wxdcblit}, \helpref{wxMemoryDC}{wxmemorydc} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxMask::wxMask}\label{wxmaskconstr} - -\func{}{wxMask}{\void} - -Default constructor. - -\func{}{wxMask}{\param{const wxBitmap\& }{bitmap}} - -Constructs a mask from a monochrome bitmap. - -\func{}{wxMask}{\param{const wxBitmap\& }{bitmap}, \param{const wxColour\& }{colour}} - -Constructs a mask from a bitmap and a colour that indicates the background. - -\func{}{wxMask}{\param{const wxBitmap\& }{bitmap}, \param{int}{ index}} - -Constructs a mask from a bitmap and a palette index that indicates the background. - -\wxheading{Parameters} - -\docparam{bitmap}{A valid bitmap.} - -\docparam{colour}{A colour specifying the transparency RGB values.} - -\docparam{index}{Index into a palette, specifying the transparency colour.} - -\membersection{wxMask::\destruct{wxMask}} - -\func{}{\destruct{wxMask}}{\void} - -Destroys the wxMask object and the underlying bitmap data. - -\membersection{wxMask::Create}\label{wxmaskcreate} - -\func{bool}{Create}{\param{const wxBitmap\& }{bitmap}} - -Constructs a mask from a monochrome bitmap. - -\func{bool}{Create}{\param{const wxBitmap\& }{bitmap}, \param{const wxColour\& }{colour}} - -Constructs a mask from a bitmap and a colour that indicates the background. - -\func{bool}{Create}{\param{const wxBitmap\& }{bitmap}, \param{int}{ index}} - -Constructs a mask from a bitmap and a palette index that indicates the background. - -\wxheading{Parameters} - -\docparam{bitmap}{A valid bitmap.} - -\docparam{colour}{A colour specifying the transparency RGB values.} - -\docparam{index}{Index into a palette, specifying the transparency colour.} - - diff --git a/docs/latex/wx/mdi.tex b/docs/latex/wx/mdi.tex deleted file mode 100644 index 11666e82c5..0000000000 --- a/docs/latex/wx/mdi.tex +++ /dev/null @@ -1,515 +0,0 @@ -\section{\class{wxMDIChildFrame}}\label{wxmdichildframe} - -An MDI child frame is a frame that can only exist on a \helpref{wxMDIClientWindow}{wxmdiclientwindow}, -which is itself a child of \helpref{wxMDIParentFrame}{wxmdiparentframe}. - -\wxheading{Derived from} - -\helpref{wxFrame}{wxframe}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the frame.} -\twocolitem{\windowstyle{wxDEFAULT\_FRAME\_STYLE}}{Defined as {\bf wxMINIMIZE\_BOX \pipe wxMAXIMIZE\_BOX \pipe wxTHICK\_FRAME \pipe wxSYSTEM\_MENU \pipe wxCAPTION}.} -\twocolitem{\windowstyle{wxICONIZE}}{Display the frame iconized (minimized) (Windows only).} -\twocolitem{\windowstyle{wxMAXIMIZE}}{Displays the frame maximized (Windows only).} -\twocolitem{\windowstyle{wxMAXIMIZE\_BOX}}{Displays a maximize box on the frame (Windows and Motif only).} -\twocolitem{\windowstyle{wxMINIMIZE}}{Identical to {\bf wxICONIZE}.} -\twocolitem{\windowstyle{wxMINIMIZE\_BOX}}{Displays a minimize box on the frame (Windows and Motif only).} -\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Displays a resizeable border around the window (Motif only; -for Windows, it is implicit in wxTHICK\_FRAME).} -\twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{Stay on top of other windows (Windows only).} -\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Displays a system menu (Windows and Motif only).} -\twocolitem{\windowstyle{wxTHICK\_FRAME}}{Displays a thick frame around the window (Windows and Motif only).} -\end{twocollist} - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Remarks} - -Although internally an MDI child frame is a child of the MDI client window, in wxWindows -you create it as a child of \helpref{wxMDIParentFrame}{wxmdiparentframe}. You can usually -forget that the client window exists. - -MDI child frames are clipped to the area of the MDI client window, and may be iconized -on the client window. - -You can associate a menubar with a child frame as usual, although an MDI child doesn't display -its menubar under its own title bar. The MDI parent frame's menubar will be changed to -reflect the currently active child frame. If there are currently no children, the parent -frame's own menubar will be displayed. - -\wxheading{See also} - -\helpref{wxMDIClientWindow}{wxmdiclientwindow}, \helpref{wxMDIParentFrame}{wxmdiparentframe},\rtfsp -\helpref{wxFrame}{wxframe} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxMDIChildFrame::wxMDIChildFrame}\label{wxmdichildframeconstr} - -\func{}{wxMDIChildFrame}{\void} - -Default constructor. - -\func{}{wxMDIChildFrame}{\param{wxMDIParentFrame* }{parent}, \param{wxWindowID }{id},\rtfsp -\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp -\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE},\rtfsp -\param{const wxString\& }{name = ``frame"}} - -Constructor, creating the window. - -\wxheading{Parameters} - -\docparam{parent}{The window parent. This should not be NULL.} - -\docparam{id}{The window identifier. It may take a value of -1 to indicate a default value.} - -\docparam{title}{The caption to be displayed on the frame's title bar.} - -\docparam{pos}{The window position. A value of (-1, -1) indicates a default position, chosen by -either the windowing system or wxWindows, depending on platform.} - -\docparam{size}{The window size. A value of (-1, -1) indicates a default size, chosen by -either the windowing system or wxWindows, depending on platform.} - -\docparam{style}{The window style. See \helpref{wxMDIChildFrame}{wxmdichildframe}.} - -\docparam{name}{The name of the window. This parameter is used to associate a name with the item, -allowing the application user to set Motif resource values for -individual windows.} - -\wxheading{Remarks} - -None. - -\wxheading{See also} - -\helpref{wxMDIChildFrame::Create}{wxmdichildframecreate} - -\membersection{wxMDIChildFrame::\destruct{wxMDIChildFrame}} - -\func{}{\destruct{wxMDIChildFrame}}{\void} - -Destructor. Destroys all child windows and menu bar if present. - -\membersection{wxMDIChildFrame::Activate}\label{wxmdichildframeactivate} - -\func{void}{Activate}{\void} - -Activates this MDI child frame. - -\wxheading{See also} - -\helpref{wxMDIChildFrame::Maximize}{wxmdichildframemaximize},\rtfsp -\helpref{wxMDIChildFrame::Restore}{wxmdichildframerestore} - -\membersection{wxMDIChildFrame::Create}\label{wxmdichildframecreate} - -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp -\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp -\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE},\rtfsp -\param{const wxString\& }{name = ``frame"}} - -Used in two-step frame construction. See \helpref{wxMDIChildFrame::wxMDIChildFrame}{wxmdichildframeconstr}\rtfsp -for further details. - -\membersection{wxMDIChildFrame::Maximize}\label{wxmdichildframemaximize} - -\func{void}{Maximize}{\void} - -Maximizes this MDI child frame. - -\wxheading{See also} - -\helpref{wxMDIChildFrame::Activate}{wxmdichildframeactivate},\rtfsp -\helpref{wxMDIChildFrame::Restore}{wxmdichildframerestore} - -\membersection{wxMDIChildFrame::Restore}\label{wxmdichildframerestore} - -\func{void}{Restore}{\void} - -Restores this MDI child frame (unmaximizes). - -\wxheading{See also} - -\helpref{wxMDIChildFrame::Activate}{wxmdichildframeactivate},\rtfsp -\helpref{wxMDIChildFrame::Maximize}{wxmdichildframemaximize} - - -\section{\class{wxMDIClientWindow}}\label{wxmdiclientwindow} - -An MDI client window is a child of \helpref{wxMDIParentFrame}{wxmdiparentframe}, and manages zero or -more \helpref{wxMDIChildFrame}{wxmdichildframe} objects. - -\wxheading{Derived from} - -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Remarks} - -The client window is the area where MDI child windows exist. It doesn't have to cover the whole -parent frame; other windows such as toolbars and a help window might coexist with it. -There can be scrollbars on a client window, which are controlled by the parent window style. - -The {\bf wxMDIClientWindow} class is usually adequate without further derivation, and it is created -automatically when the MDI parent frame is created. If the application needs to derive a new class, -the function \helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient} must be -overridden in order to give an opportunity to use a different class of client window. - -Under Windows 95, the client window will automatically have a sunken border style when -the active child is not maximized, and no border style when a child is maximized. - -\wxheading{See also} - -\helpref{wxMDIChildFrame}{wxmdichildframe}, \helpref{wxMDIParentFrame}{wxmdiparentframe},\rtfsp -\helpref{wxFrame}{wxframe} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxMDIClientWindow::wxMDIClientWindow}\label{wxmdiclientwindowconstr} - -\func{}{wxMDIClientWindow}{\void} - -Default constructor. - -\func{}{wxMDIClientWindow}{\param{wxMDIParentFrame* }{parent}, \param{long}{ style = 0}} - -Constructor, creating the window. - -\wxheading{Parameters} - -\docparam{parent}{The window parent.} - -\docparam{style}{The window style. Currently unused.} - -\wxheading{Remarks} - -The second style of constructor is called within \helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient}. - -\wxheading{See also} - -\helpref{wxMDIParentFrame::wxMDIParentFrame}{wxmdiparentframeconstr},\rtfsp -\helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient} - -\membersection{wxMDIClientWindow::\destruct{wxMDIClientWindow}} - -\func{}{\destruct{wxMDIClientWindow}}{\void} - -Destructor. - -\membersection{wxMDIClientWindow::CreateClient}\label{wxmdiclientwindowcreateclient} - -\func{bool}{CreateClient}{\param{wxMDIParentFrame* }{parent}, \param{long}{ style = 0}} - -Used in two-step frame construction. See \helpref{wxMDIClientWindow::wxMDIClientWindow}{wxmdiclientwindowconstr}\rtfsp -for further details. - -\section{\class{wxMDIParentFrame}}\label{wxmdiparentframe} - -An MDI (Multiple Document Interface) parent frame is a window which can contain -MDI child frames in its own `desktop'. It is a convenient way to avoid window clutter, -and is used in many popular Windows applications, such as Microsoft Word(TM). - -\wxheading{Derived from} - -\helpref{wxFrame}{wxframe}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Remarks} - -There may be multiple MDI parent frames in a single application, but this probably only makes sense -within programming development environments. - -Child frames may be either \helpref{wxMDIChildFrame}{wxmdichildframe}, or \helpref{wxFrame}{wxframe}. - -An MDI parent frame always has a \helpref{wxMDIClientWindow}{wxmdiclientwindow} associated with it, which -is the parent for MDI client frames. -This client window may be resized to accomodate non-MDI windows, as seen in Microsoft Visual C++ (TM) and -Microsoft Publisher (TM), where a documentation window is placed to one side of the workspace. - -MDI remains popular despite dire warnings from Microsoft itself that MDI is an obsolete -user interface style. - -The implementation is native in Windows, and simulated under Motif. Under Motif, -the child window frames will often have a different appearance from other frames -because the window decorations are simulated. - -\wxheading{Window styles} - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the frame.} -\twocolitem{\windowstyle{wxDEFAULT\_FRAME\_STYLE}}{Defined as {\bf wxMINIMIZE\_BOX \pipe wxMAXIMIZE\_BOX \pipe wxTHICK\_FRAME \pipe wxSYSTEM\_MENU \pipe wxCAPTION}.} -\twocolitem{\windowstyle{wxHSCROLL}}{Displays a horizontal scrollbar in the {\it client window}, allowing -the user to view child frames that are off the current view.} -\twocolitem{\windowstyle{wxICONIZE}}{Display the frame iconized (minimized) (Windows only).} -\twocolitem{\windowstyle{wxMAXIMIZE}}{Displays the frame maximized (Windows only).} -\twocolitem{\windowstyle{wxMAXIMIZE\_BOX}}{Displays a maximize box on the frame (Windows and Motif only).} -\twocolitem{\windowstyle{wxMINIMIZE}}{Identical to {\bf wxICONIZE}.} -\twocolitem{\windowstyle{wxMINIMIZE\_BOX}}{Displays a minimize box on the frame (Windows and Motif only).} -\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Displays a resizeable border around the window (Motif only; -for Windows, it is implicit in wxTHICK\_FRAME).} -\twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{Stay on top of other windows (Windows only).} -\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Displays a system menu (Windows and Motif only).} -\twocolitem{\windowstyle{wxTHICK\_FRAME}}{Displays a thick frame around the window (Windows and Motif only).} -\twocolitem{\windowstyle{wxVSCROLL}}{Displays a vertical scrollbar in the {\it client window}, allowing -the user to view child frames that are off the current view.} -\end{twocollist} - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{See also} - -\helpref{wxMDIChildFrame}{wxmdichildframe}, \helpref{wxMDIClientWindow}{wxmdiclientwindow},\rtfsp -\helpref{wxFrame}{wxframe}, \helpref{wxDialog}{wxdialog} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxMDIParentFrame::wxMDIParentFrame}\label{wxmdiparentframeconstr} - -\func{}{wxMDIParentFrame}{\void} - -Default constructor. - -\func{}{wxMDIParentFrame}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp -\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp -\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE \pipe wxVSCROLL \pipe wxHSCROLL},\rtfsp -\param{const wxString\& }{name = ``frame"}} - -Constructor, creating the window. - -\wxheading{Parameters} - -\docparam{parent}{The window parent. This should be NULL.} - -\docparam{id}{The window identifier. It may take a value of -1 to indicate a default value.} - -\docparam{title}{The caption to be displayed on the frame's title bar.} - -\docparam{pos}{The window position. A value of (-1, -1) indicates a default position, chosen by -either the windowing system or wxWindows, depending on platform.} - -\docparam{size}{The window size. A value of (-1, -1) indicates a default size, chosen by -either the windowing system or wxWindows, depending on platform.} - -\docparam{style}{The window style. See \helpref{wxMDIParentFrame}{wxmdiparentframe}.} - -\docparam{name}{The name of the window. This parameter is used to associate a name with the item, -allowing the application user to set Motif resource values for -individual windows.} - -\wxheading{Remarks} - -During the construction of the frame, the client window will be created. To use a different class -from \helpref{wxMDIClientWindow}{wxmdiclientwindow}, override\rtfsp -\helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient}. - -Under Windows 95, the client window will automatically have a sunken border style when -the active child is not maximized, and no border style when a child is maximized. - -\wxheading{See also} - -\helpref{wxMDIParentFrame::Create}{wxmdiparentframecreate},\rtfsp -\helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient} - -\membersection{wxMDIParentFrame::\destruct{wxMDIParentFrame}} - -\func{}{\destruct{wxMDIParentFrame}}{\void} - -Destructor. Destroys all child windows and menu bar if present. - -\membersection{wxMDIParentFrame::ActivateNext}\label{wxmdiparentframeactivatenext} - -\func{void}{ActivateNext}{\void} - -Activates the MDI child following the currently active one. - -\wxheading{See also} - -\helpref{wxMDIParentFrame::ActivatePrevious}{wxmdiparentframeactivateprevious} - -\membersection{wxMDIParentFrame::ActivatePrevious}\label{wxmdiparentframeactivateprevious} - -\func{void}{ActivatePrevious}{\void} - -Activates the MDI child preceding the currently active one. - -\wxheading{See also} - -\helpref{wxMDIParentFrame::ActivateNext}{wxmdiparentframeactivatenext} - - -\membersection{wxMDIParentFrame::ArrangeIcons}\label{wxmdiparentframearrangeicons} - -\func{void}{ArrangeIcons}{\void} - -Arranges any iconized (minimized) MDI child windows. - -\wxheading{See also} - -\helpref{wxMDIParentFrame::Cascade}{wxmdiparentframecascade},\rtfsp -\helpref{wxMDIParentFrame::Tile}{wxmdiparentframetile} - -\membersection{wxMDIParentFrame::Cascade}\label{wxmdiparentframecascade} - -\func{void}{Cascade}{\void} - -Arranges the MDI child windows in a cascade. - -\wxheading{See also} - -\helpref{wxMDIParentFrame::Tile}{wxmdiparentframetile},\rtfsp -\helpref{wxMDIParentFrame::ArrangeIcons}{wxmdiparentframearrangeicons} - -\membersection{wxMDIParentFrame::Create}\label{wxmdiparentframecreate} - -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp -\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp -\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE \pipe wxVSCROLL \pipe wxHSCROLL},\rtfsp -\param{const wxString\& }{name = ``frame"}} - -Used in two-step frame construction. See \helpref{wxMDIParentFrame::wxMDIParentFrame}{wxmdiparentframeconstr}\rtfsp -for further details. - -\membersection{wxMDIParentFrame::GetClientSize}\label{wxmdiparentframegetclientsize} - -\constfunc{virtual void}{GetClientSize}{\param{int* }{width}, \param{int* }{height}} - -This gets the size of the frame `client area' in pixels. - -\wxheading{Parameters} - -\docparam{width}{Receives the client width in pixels.} - -\docparam{height}{Receives the client height in pixels.} - -\wxheading{Remarks} - -The client area is the area which may be drawn on by the programmer, excluding title bar, border, status bar, -and toolbar if present. - -If you wish to manage your own toolbar (or perhaps you have more than one), -provide an {\bf OnSize} event handler. Call {\bf GetClientSize} to -find how much space there is for your windows and don't forget to set the size and position -of the MDI client window as well as your toolbar and other windows (but not the status bar). - -If you have set a toolbar with \helpref{wxMDIParentFrame::SetToolbar}{wxmdiparentframesettoolbar}, -the client size returned will have subtracted the toolbar height. However, the available positions -for the client window and other windows of the frame do not start at zero - you must add the toolbar height. - -The position and size of the status bar and toolbar (if known to the frame) are always managed -by {\bf wxMDIParentFrame}, regardless of what behaviour is defined in your {\bf OnSize} event handler. -However, the client window position and size are always set in {\bf OnSize}, so if you override this -event handler, make sure you deal with the client window. - -You do not have to manage the size and position of MDI child windows, since they are managed -automatically by the client window. - -\wxheading{See also} - -\helpref{wxMDIParentFrame::GetToolBar}{wxmdiparentframegettoolbar},\rtfsp -\helpref{wxMDIParentFrame::SetToolBar}{wxmdiparentframesettoolbar},\rtfsp -\helpref{wxWindow}{wxwindowonsize},\rtfsp -\helpref{wxMDIClientWindow}{wxmdiclientwindow} - -\membersection{wxMDIParentFrame::GetActiveChild}\label{wxmdiparentframegetactivechild} - -\constfunc{wxMDIChildFrame*}{GetActiveChild}{\void} - -Returns a pointer to the active MDI child, if there is one. - -\membersection{wxMDIParentFrame::GetClientWindow}\label{wxmdiparentframegetclientwindow} - -\constfunc{wxMDIClientWindow*}{GetClientWindow}{\void} - -Returns a pointer to the client window. - -\wxheading{See also} - -\helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient} - -\membersection{wxMDIParentFrame::GetToolBar}\label{wxmdiparentframegettoolbar} - -\constfunc{virtual wxWindow*}{GetToolBar}{\void} - -Returns the window being used as the toolbar for this frame. - -\wxheading{See also} - -\helpref{wxMDIParentFrame::SetToolBar}{wxmdiparentframesettoolbar} - -\membersection{wxMDIParentFrame::OnCreateClient}\label{wxmdiparentframeoncreateclient} - -\func{virtual wxMDIClientWindow*}{OnCreateClient}{\void} - -Override this to return a different kind of client window. - -\wxheading{Remarks} - -You might wish to derive from \helpref{wxMDIClientWindow}{wxmdiclientwindow} in order -to implement different erase behaviour, for example, such as painting a bitmap -on the background. - -Note that it is probably impossible to have a client window that scrolls as well as painting -a bitmap or pattern, since in {\bf OnScroll}, the scrollbar positions always return zero. -(Solutions to: \verb$julian.smart@ukonline.co.uk$). - -\wxheading{See also} - -\helpref{wxMDIParentFrame::GetClientWindow}{wxmdiparentframegetclientwindow},\rtfsp -\helpref{wxMDIClientWindow}{wxmdiclientwindow} - -\membersection{wxMDIParentFrame::SetToolBar}\label{wxmdiparentframesettoolbar} - -\func{virtual void}{SetToolBar}{\param{wxWindow*}{ toolbar}} - -Sets the window to be used as a toolbar for this -MDI parent window. It saves the application having to manage the positioning -of the toolbar MDI client window. - -\wxheading{Parameters} - -\docparam{toolbar}{Toolbar to manage.} - -\wxheading{Remarks} - -When the frame is resized, the toolbar is resized to be the width of -the frame client area, and the toolbar height is kept the same. - -The parent of the toolbar must be this frame. - -If you wish to manage your own toolbar (or perhaps you have more than one), -don't call this function, and instead manage your subwindows and the MDI client window by -providing an {\bf OnSize} event handler. Call \helpref{wxMDIParentFrame::GetClientSize}{wxmdiparentframegetclientsize} to -find how much space there is for your windows. - -Note that SDI (normal) frames and MDI child windows must always have their -toolbars managed by the application. - -\wxheading{See also} - -\helpref{wxMDIParentFrame::GetToolBar}{wxmdiparentframegettoolbar},\rtfsp -\helpref{wxMDIParentFrame::GetClientSize}{wxmdiparentframegetclientsize} - -\membersection{wxMDIParentFrame::Tile}\label{wxmdiparentframetile} - -\func{void}{Tile}{\void} - -Tiles the MDI child windows. - -\wxheading{See also} - -\helpref{wxMDIParentFrame::Cascade}{wxmdiparentframecascade},\rtfsp -\helpref{wxMDIParentFrame::ArrangeIcons}{wxmdiparentframearrangeicons} - - diff --git a/docs/latex/wx/memorydc.tex b/docs/latex/wx/memorydc.tex deleted file mode 100644 index ac29294fa4..0000000000 --- a/docs/latex/wx/memorydc.tex +++ /dev/null @@ -1,57 +0,0 @@ -\section{\class{wxMemoryDC}}\label{wxmemorydc} - -A memory device context provides a means to draw graphics onto a bitmap. - -\wxheading{Derived from} - -\helpref{wxDC}{wxdc}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Remarks} - -A bitmap must be selected into the new memory DC before it may be used -for anything. Typical usage is as follows: - -\begin{verbatim} - // Create a memory DC - wxMemoryDC temp_dc; - temp_dc.SelectObject(test_bitmap); - - // We can now draw into the memory DC... - // Copy from this DC to another DC. - old_dc.Blit(250, 50, BITMAP_WIDTH, BITMAP_HEIGHT, temp_dc, 0, 0); -\end{verbatim} - -Note that the memory DC {\it must} be deleted (or the bitmap selected out of it) before a bitmap -can be reselected into another memory DC. - -\wxheading{See also} - -\helpref{wxBitmap}{wxbitmap}, \helpref{wxDC}{wxdc} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxMemoryDC::wxMemoryDC} - -\func{}{wxMemoryDC}{\void} - -Constructs a new memory device context. - -Use the {\it Ok} member to test whether the constructor was successful -in creating a useable device context. Don't forget to select a bitmap -into the DC before drawing on it. - -\membersection{wxMemoryDC::SelectObject} - -\func{}{SelectObject}{\param{const wxBitmap\& }{bitmap}} - -Selects the given bitmap into the device context, to use as the memory -bitmap. Selecting the bitmap into a memory DC allows you to draw into -the DC (and therefore the bitmap) and also to use {\bf Blit} to copy -the bitmap to a window. For this purpose, you may find \helpref{wxDC::DrawIcon}{wxdcdrawicon}\rtfsp -easier to use instead. - -If the argument is wxNullBitmap (or some other uninitialised wxBitmap) the current bitmap is selected out of the device -context, and the original bitmap restored, allowing the current bitmap to -be destroyed safely. - diff --git a/docs/latex/wx/menu.tex b/docs/latex/wx/menu.tex deleted file mode 100644 index c39660ccbf..0000000000 --- a/docs/latex/wx/menu.tex +++ /dev/null @@ -1,611 +0,0 @@ -\section{\class{wxMenu}}\label{wxmenu} - -A menu is a popup (or pull down) list of items, one of which may be -selected before the menu goes away (clicking elsewhere dismisses the -menu). Menus may be used to construct either menu bars or popup menus. - -A menu item has an integer ID associated with it which can be used to -identify the selection, or to change the menu item in some way. - -\wxheading{Derived from} - -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Event handling} - -If the menu is part of a menubar, then \helpref{wxMenuBar}{wxmenubar} event processing is used. - -With a popup menu, there is a variety of ways to handle a menu selection event -(wxEVT\_COMMAND\_MENU\_SELECTED). - -\begin{enumerate}\itemsep=0pt -\item Define a callback of type wxFunction, which you pass to the wxMenu constructor. -The callback takes a reference to the menu, and a reference to a \helpref{wxCommandEvent}{wxcommandevent}. -\item Derive a new class from wxMenu and define event table entries using the EVT\_MENU macro. -\item Set a new event handler for wxMenu, using an object whose class has EVT\_MENU entries. -\item Provide EVT\_MENU handlers in the window which pops up the menu, or in an ancestor of -this window. -\end{enumerate} - -\wxheading{See also} - -\helpref{wxMenuBar}{wxmenubar}, \helpref{wxWindow::PopupMenu}{wxwindowpopupmenu},\rtfsp -\helpref{Event handling overview}{eventhandlingoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxMenu::wxMenu}\label{wxmenuconstr} - -\func{}{wxMenu}{\param{const wxString\& }{title = ""}, \param{const wxFunction}{ func = NULL}} - -Constructs a wxMenu object. - -\wxheading{Parameters} - -\docparam{title}{A title for the popup menu: the empty string denotes no title.} - -\docparam{func}{A callback function if the menu is used as a popup using \helpref{wxWindow::PopupMenu}{wxwindowpopupmenu}.} - -\membersection{wxMenu::\destruct{wxMenu}} - -\func{}{\destruct{wxMenu}}{\void} - -Destructor, destroying the menu. - -\membersection{wxMenu::Append}\label{wxmenuappend} - -\func{void}{Append}{\param{int}{ id}, \param{const wxString\& }{ item}, \param{const wxString\& }{helpString = ""},\rtfsp -\param{const bool}{ checkable = FALSE}} - -Adds a string item to the end of the menu. - -\func{void}{Append}{\param{int}{ id}, \param{const wxString\& }{ item}, \param{wxMenu *}{subMenu},\rtfsp -\param{const wxString\& }{helpString = ""}} - -Adds a pull-right submenu to the end of the menu. - -\func{void}{Append}{\param{wxMenuItem*}{ menuItem}} - -Adds a menu item object. You can specify various extra properties of a menu item this way, -such as bitmaps and fonts. - -\wxheading{Parameters} - -\docparam{id}{The menu command identifier.} - -\docparam{item}{The string to appear on the menu item.} - -\docparam{menu}{Pull-right submenu.} - -\docparam{checkable}{If TRUE, this item is checkable.} - -\docparam{helpString}{An optional help string associated with the item. -By default, \helpref{wxFrame::OnMenuHighlight}{wxframeonmenuhighlight} displays -this string in the status line.} - -\docparam{menuItem}{A menuitem object. It will be owned by the wxMenu object after this function -is called, so do not delete it yourself.} - -\wxheading{Remarks} - -This command can be used after the menu has been shown, as well as on initial -creation of a menu or menubar. - -\wxheading{See also} - -\helpref{wxMenu::AppendSeparator}{wxmenuappendseparator}, \helpref{wxMenu::SetLabel}{wxmenusetlabel}, \helpref{wxMenu::GetHelpString}{wxmenugethelpstring},\rtfsp -\helpref{wxMenu::SetHelpString}{wxmenusethelpstring}, \helpref{wxMenuItem}{wxmenuitem} - -\membersection{wxMenu::AppendSeparator}\label{wxmenuappendseparator} - -\func{void}{AppendSeparator}{\void} - -Adds a separator to the end of the menu. - -\wxheading{See also} - -\helpref{wxMenu::Append}{wxmenuappend} - -\membersection{wxMenu::Break}\label{wxmenubreak} - -\func{void}{Break}{\void} - -Inserts a break in a menu, causing the next appended item to appear in a new column. - -\membersection{wxMenu::Check}\label{wxmenucheck} - -\func{void}{Check}{\param{int}{ id}, \param{const bool}{ check}} - -Checks or unchecks the menu item. - -\wxheading{Parameters} - -\docparam{id}{The menu item identifier.} - -\docparam{check}{If TRUE, the item will be checked, otherwise it will be unchecked.} - -\wxheading{See also} - -\helpref{wxMenu::IsChecked}{wxmenuischecked} - -\membersection{wxMenu::Enable}\label{wxmenuenable} - -\func{void}{Enable}{\param{int}{ id}, \param{const bool}{ enable}} - -Enables or disables (greys out) a menu item. - -\wxheading{Parameters} - -\docparam{id}{The menu item identifier.} - -\docparam{enable}{TRUE to enable the menu item, FALSE to disable it.} - -\wxheading{See also} - -\helpref{wxMenu::IsEnabled}{wxmenuisenabled} - -\membersection{wxMenu::FindItem}\label{wxmenufinditem} - -\constfunc{int}{FindItem}{\param{const wxString\& }{itemString}} - -Finds the menu item id for a menu item string. - -\wxheading{Parameters} - -\docparam{itemString}{Menu item string to find.} - -\wxheading{Return value} - -Menu item identifier, or -1 if none is found. - -\wxheading{Remarks} - -Any special menu codes are stripped out of source and target strings -before matching. - -\wxheading{See also} - -\helpref{wxMenu::FindItemForId}{wxmenufinditemforid} - -\membersection{wxMenu::FindItemForId}\label{wxmenufinditemforid} - -\constfunc{wxMenuItem*}{FindItemForId}{\param{int}{ id}} - -Finds the menu item object associated with the given menu item identifier. - -\wxheading{Parameters} - -\docparam{id}{Menu item identifier.} - -\wxheading{Return value} - -Returns the menu item object, or NULL if it is not found. - -\wxheading{See also} - -\helpref{wxMenu::FindItem}{wxmenufinditem} - -\membersection{wxMenu::GetHelpString}\label{wxmenugethelpstring} - -\constfunc{wxString}{GetHelpString}{\param{int}{ id}} - -Returns the help string associated with a menu item. - -\wxheading{Parameters} - -\docparam{id}{The menu item identifier.} - -\wxheading{Return value} - -The help string, or the empty string if there is no help string or the -item was not found. - -\wxheading{See also} - -\helpref{wxMenu::SetHelpString}{wxmenusethelpstring}, \helpref{wxMenu::Append}{wxmenuappend} - -\membersection{wxMenu::GetLabel}\label{wxmenugetlabel} - -\constfunc{wxString}{GetLabel}{\param{int}{ id}} - -Returns a menu item label. - -\wxheading{Parameters} - -\docparam{id}{The menu item identifier.} - -\wxheading{Return value} - -The item label, or the empty string if the item was not found. - -\wxheading{See also} - -\helpref{wxMenu::SetLabel}{wxmenusetlabel} - -\membersection{wxMenu::GetTitle}\label{wxmenugettitle} - -\constfunc{wxString}{GetTitle}{\void} - -Returns the title of the menu. - -\wxheading{Remarks} - -This is relevant only to popup menus. - -\wxheading{See also} - -\helpref{wxMenu::SetTitle}{wxmenusettitle} - -\membersection{wxMenu::IsChecked}\label{wxmenuischecked} - -\constfunc{bool}{IsChecked}{\param{int}{ id}} - -Determines whether a menu item is checked. - -\wxheading{Parameters} - -\docparam{id}{The menu item identifier.} - -\wxheading{Return value} - -TRUE if the menu item is checked, FALSE otherwise. - -\wxheading{See also} - -\helpref{wxMenu::Check}{wxmenucheck} - -\membersection{wxMenu::IsEnabled}\label{wxmenuisenabled} - -\constfunc{bool}{IsEnabled}{\param{int}{ id}} - -Determines whether a menu item is enabled. - -\wxheading{Parameters} - -\docparam{id}{The menu item identifier.} - -\wxheading{Return value} - -TRUE if the menu item is enabled, FALSE otherwise. - -\wxheading{See also} - -\helpref{wxMenu::Enable}{wxmenuenable} - -\membersection{wxMenu::SetHelpString}\label{wxmenusethelpstring} - -\func{void}{SetHelpString}{\param{int}{ id}, \param{const wxString\& }{helpString}} - -Sets an item's help string. - -\wxheading{Parameters} - -\docparam{id}{The menu item identifier.} - -\docparam{helpString}{The help string to set.} - -\wxheading{See also} - -\helpref{wxMenu::GetHelpString}{wxmenugethelpstring} - -\membersection{wxMenu::SetLabel}\label{wxmenusetlabel} - -\func{void}{SetLabel}{\param{int}{ id}, \param{const wxString\& }{label}} - -Sets the label of a menu item. - -\wxheading{Parameters} - -\docparam{id}{The menu item identifier.} - -\docparam{label}{The menu item label to set.} - -\wxheading{See also} - -\helpref{wxMenu::Append}{wxmenuappend}, \helpref{wxMenu::GetLabel}{wxmenugetlabel} - -\membersection{wxMenu::SetTitle}\label{wxmenusettitle} - -\func{void}{SetTitle}{\param{const wxString\& }{title}} - -Sets the title of the menu. - -\wxheading{Parameters} - -\docparam{title}{The title to set.} - -\wxheading{Remarks} - -This is relevant only to popup menus. - -\wxheading{See also} - -\helpref{wxMenu::SetTitle}{wxmenusettitle} - -\section{\class{wxMenuBar}}\label{wxmenubar} - -A menu bar is a series of menus accessible from the top of a frame. - -\wxheading{Derived from} - -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Event handling} - -To respond to a menu selection, provide a handler for EVT\_MENU, in the frame -that contains the menu bar. - -\wxheading{See also} - -\helpref{wxMenu}{wxmenu}, \helpref{Event handling overview}{eventhandlingoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxMenuBar::wxMenuBar}\label{wxmenubarconstr} - -\func{void}{wxMenuBar}{\void} - -Default constructor. - -\func{void}{wxMenuBar}{\param{int}{ n}, \param{wxMenu*}{ menus[]}, \param{const wxString }{titles[]}} - -Construct a menu bar from arrays of menus and titles. - -\wxheading{Parameters} - -\docparam{n}{The number of menus.} - -\docparam{menus}{An array of menus. Do not use this array again - it now belongs to the -menu bar.} - -\docparam{titles}{An array of title strings. Deallocate this array after creating the menu bar.} - -\membersection{wxMenuBar::\destruct{wxMenuBar}} - -\func{void}{\destruct{wxMenuBar}}{\void} - -Destructor, destroying the menu bar and removing it from the parent frame (if any). - -\membersection{wxMenuBar::Append}\label{wxmenubarappend} - -\func{void}{Append}{\param{wxMenu *}{menu}, \param{const wxString\& }{title}} - -Adds the item to the end of the menu bar. - -\wxheading{Parameters} - -\docparam{menu}{The menu to add. Do not deallocate this menu after calling {\bf Append}.} - -\docparam{title}{The title of the menu.} - -\membersection{wxMenuBar::Check}\label{wxmenubarcheck} - -\func{void}{Check}{\param{int}{ id}, \param{const bool}{ check}} - -Checks or unchecks a menu item. - -\wxheading{Parameters} - -\docparam{id}{The menu item identifier.} - -\docparam{check}{If TRUE, checks the menu item, otherwise the item is unchecked.} - -\wxheading{Remarks} - -Only use this when the menu bar has been associated -with a frame; otherwise, use the wxMenu equivalent call. - -\membersection{wxMenuBar::Enable}\label{wxmenubarenable} - -\func{void}{Enable}{\param{int}{ id}, \param{const bool}{ enable}} - -Enables or disables (greys out) a menu item. - -\wxheading{Parameters} - -\docparam{id}{The menu item identifier.} - -\docparam{enable}{TRUE to enable the item, FALSE to disable it.} - -\wxheading{Remarks} - -Only use this when the menu bar has been -associated with a frame; otherwise, use the wxMenu equivalent call. - -\membersection{wxMenuBar::EnableTop}\label{wxmenubarenabletop} - -\func{void}{EnableTop}{\param{int}{ pos}, \param{const bool}{ enable}} - -Enables or disables a whole menu. - -\wxheading{Parameters} - -\docparam{pos}{The position of the menu, starting from zero.} - -\docparam{enable}{TRUE to enable the menu, FALSE to disable it.} - -\wxheading{Remarks} - -Only use this when the menu bar has been -associated with a frame. - -\membersection{wxMenuBar::FindMenuItem}\label{wxmenubarfindmenuitem} - -\constfunc{int}{FindMenuItem}{\param{const wxString\& }{menuString}, \param{const wxString\& }{itemString}} - -Finds the menu item id for a menu name/menu item string pair. - -\wxheading{Parameters} - -\docparam{menuString}{Menu title to find.} - -\docparam{itemString}{Item to find.} - -\wxheading{Return value} - -The menu item identifier, or -1 if none was found. - -\wxheading{Remarks} - -Any special menu codes are stripped out of source and target strings -before matching. - -\membersection{wxMenuBar::FindItemById}\label{wxmenubarfinditembyid} - -\constfunc{wxMenuItem *}{FindItemById}{\param{int}{ id}} - -Finds the menu item object associated with the given menu item identifier, - -\wxheading{Parameters} - -\docparam{id}{Menu item identifier.} - -\wxheading{Return value} - -The found menu item object, or NULL if one was not found. - -\membersection{wxMenuBar::GetHelpString}\label{wxmenubargethelpstring} - -\constfunc{wxString}{GetHelpString}{\param{int}{ id}} - -Gets the help string associated with the menu item identifer. - -\wxheading{Parameters} - -\docparam{id}{The menu item identifier.} - -\wxheading{Return value} - -The help string, or the empty string if there was no help string or the menu item -was not found. - -\wxheading{See also} - -\helpref{wxMenuBar::SetHelpString}{wxmenubarsethelpstring} - -\membersection{wxMenuBar::GetLabel}\label{wxmenubargetlabel} - -\constfunc{wxString}{GetLabel}{\param{int}{ id}} - -Gets the label associated with a menu item. - -\wxheading{Parameters} - -\docparam{id}{The menu item identifier.} - -\wxheading{Return value} - -The menu item label, or the empty string if the item was not found. - -\wxheading{Remarks} - -Use only after the menubar has been associated with a frame. - -\membersection{wxMenuBar::GetLabelTop}\label{wxmenubargetlabeltop} - -\constfunc{wxString}{GetLabelTop}{\param{int}{ pos}} - -Returns the label of a top-level menu. - -\wxheading{Parameters} - -\docparam{pos}{Position of the menu on the menu bar, starting from zero.} - -\wxheading{Return value} - -The menu label, or the empty string if the menu was not found. - -\wxheading{Remarks} - -Use only after the menubar has been associated with a frame. - -\wxheading{See also} - -\helpref{wxMenuBar::SetLabelTop}{wxmenubarsetlabeltop} - -\membersection{wxMenuBar::IsChecked}\label{wxmenubarischecked} - -\constfunc{bool}{IsChecked}{\param{int}{ id}} - -Determines whether an item is checked. - -\wxheading{Parameters} - -\docparam{id}{The menu item identifier.} - -\wxheading{Return value} - -TRUE if the item was found and is checked, FALSE otherwise. - -\membersection{wxMenuBar::IsEnabled}\label{wxmenubarisenabled} - -\constfunc{bool}{IsEnabled}{\param{int}{ id}} - -Determines whether an item is enabled. - -\wxheading{Parameters} - -\docparam{id}{The menu item identifier.} - -\wxheading{Return value} - -TRUE if the item was found and is enabled, FALSE otherwise. - -\membersection{wxMenuBar::SetHelpString}\label{wxmenubarsethelpstring} - -\func{void}{SetHelpString}{\param{int}{ id}, \param{const wxString\& }{helpString}} - -Sets the help string associated with a menu item. - -\wxheading{Parameters} - -\docparam{id}{Menu item identifier.} - -\docparam{helpString}{Help string to associate with the menu item.} - -\wxheading{See also} - -\helpref{wxMenuBar::GetHelpString}{wxmenubargethelpstring} - -\membersection{wxMenuBar::SetLabel}\label{wxmenubarsetlabel} - -\func{void}{SetLabel}{\param{int}{ id}, \param{const wxString\& }{label}} - -Sets the label of a menu item. - -\wxheading{Parameters} - -\docparam{id}{Menu item identifier.} - -\docparam{label}{Menu item label.} - -\wxheading{Remarks} - -Use only after the menubar has been associated with a frame. - -\wxheading{See also} - -\helpref{wxMenuBar::GetLabel}{wxmenubargetlabel} - -\membersection{wxMenuBar::SetLabelTop}\label{wxmenubarsetlabeltop} - -\func{void}{SetLabelTop}{\param{int}{ pos}, \param{const wxString\& }{label}} - -Sets the label of a top-level menu. - -\wxheading{Parameters} - -\docparam{pos}{The position of a menu on the menu bar, starting from zero.} - -\docparam{label}{The menu label.} - -\wxheading{Remarks} - -Use only after the menubar has been associated with a frame. - -\wxheading{See also} - -\helpref{wxMenuBar::GetLabelTop}{wxmenubargetlabeltop} - diff --git a/docs/latex/wx/menuevt.tex b/docs/latex/wx/menuevt.tex deleted file mode 100644 index 65c864b9a0..0000000000 --- a/docs/latex/wx/menuevt.tex +++ /dev/null @@ -1,53 +0,0 @@ -\section{\class{wxMenuEvent}}\label{wxmenuevent} - -This class is used for a variety of menu-related events. Note that -these do not include menu command events. - -\wxheading{Derived from} - -\helpref{wxEvent}{wxevent}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Event table macros} - -To process a menu event, use these event handler macros to direct input to member -functions that take a wxMenuEvent argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_MENU\_CHAR(func)}}{Process a wxEVT\_MENU\_CHAR event (a keypress -when a menu is showing). Windows only. TODO} -\twocolitem{{\bf EVT\_MENU\_INIT(func)}}{Process a wxEVT\_MENU\_INIT event (the menu -is about to pop up). Windows only. TODO} -\twocolitem{{\bf EVT\_MENU\_HIGHLIGHT(func)}}{Process a wxEVT\_MENU\_HIGHLIGHT event (a menu -item is being highlighted). Windows only.} -\twocolitem{{\bf EVT\_POPUP\_MENU(func)}}{Process a wxEVT\_POPUP\_MENU event (a menu -item is being highlighted). Windows only. TODO} -\twocolitem{{\bf EVT\_CONTEXT\_MENU(func)}}{Process a wxEVT\_CONTEXT\_MENU event (F1 has -been pressed with a particular menu item highlighted). Windows only. TODO} -\end{twocollist}% - -\wxheading{See also} - -\helpref{wxWindow::OnMenuHighlight}{wxwindowonmenuhighlight}, \helpref{Event handling overview}{eventhandlingoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxMenuEvent::wxMenuEvent} - -\func{}{wxMenuEvent}{\param{WXTYPE }{id = 0}, \param{int }{id = 0}, \param{wxDC* }{dc = NULL}} - -Constructor. - -\membersection{wxMenuEvent::m\_menuId} - -\member{int}{m\_menuId} - -The relevant menu identifier. - -\membersection{wxMenuEvent::GetMenuId}\label{wxmenueventgetmenuid} - -\constfunc{int}{GetMenuId}{\void} - -Returns the menu identifier associated with the event. - diff --git a/docs/latex/wx/menuitem.tex b/docs/latex/wx/menuitem.tex deleted file mode 100644 index 00706c3f42..0000000000 --- a/docs/latex/wx/menuitem.tex +++ /dev/null @@ -1,191 +0,0 @@ -\section{\class{wxMenuItem}}\label{wxmenuitem} - -A menu item represents an item in a popup menu. Note that the majority of this -class is only implemented under Windows so far, but everything except fonts, colours and -bitmaps can be achieved via wxMenu on all platforms. - -\wxheading{Derived from} - -wxOwnerDrawn (Windows only)\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxMenuBar}{wxmenubar}, \helpref{wxMenu}{wxmenu}, \helpref{wxOwnerDrawn}{wxownerdrawn} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxMenuItem::wxMenuItem}\label{wxmenuitemconstr} - -\func{}{wxMenuItem}{\param{wxMenu*}{ parentMenu = NULL}, \param{int}{ id = ID\_SEPARATOR}, - \param{const wxString\& }{text = ""}, \param{const wxString\& }{helpString = ""}, - \param{bool }{checkable = FALSE}, \param{wxMenu*}{ subMenu = NULL}, } - -Constructs a wxMenuItem object. - -\wxheading{Parameters} - -\docparam{parentMenu}{Menu that the menu item belongs to.} - -\docparam{id}{Identifier for this menu item, or ID\_SEPARATOR to indicate a separator.} - -\docparam{text}{Text for the menu item, as shown on the menu.} - -\docparam{helpString}{Optional help string that will be shown on the status bar.} - -\docparam{checkable}{TRUE if this menu item is checkable.} - -\docparam{subMenu}{If non-NULL, indicates that the menu item is a submenu.} - -\membersection{wxMenuItem::\destruct{wxMenuItem}} - -\func{}{\destruct{wxMenuItem}}{\void} - -Destructor. - -\membersection{wxMenuItem::Check}\label{wxmenuitemcheck} - -\func{void}{Check}{\param{bool}{ check}} - -Checks or unchecks the menu item. - -\membersection{wxMenuItem::DeleteSubMenu}\label{wxmenuitemdeletesubmenu} - -\func{void}{DeleteSubMenu}{\void} - -Deletes the submenu, if any. - -\membersection{wxMenuItem::Enable}\label{wxmenuitemenable} - -\func{void}{Enable}{\param{bool}{ enable}} - -Enables or disables the menu item. - -\membersection{wxMenuItem::GetBackgroundColour}\label{wxmenuitemgetbackgroundcolour} - -\constfunc{wxColour\&}{GetBackgroundColour}{\void} - -Returns the background colour associated with the menu item (Windows only). - -\membersection{wxMenuItem::GetBitmap}\label{wxmenuitemgetbitmap} - -\constfunc{wxBitmap\&}{GetBitmap}{\param{bool}{ checked = TRUE}} - -Returns the checked or unchecked bitmap (Windows only). - -\membersection{wxMenuItem::GetFont}\label{wxmenuitemgetfont} - -\constfunc{wxFont\&}{GetFont}{\void} - -Returns the font associated with the menu item (Windows only). - -\membersection{wxMenuItem::GetHelp}\label{wxmenuitemgethelp} - -\constfunc{wxString}{GetHelp}{\void} - -Returns the help string associated with the menu item. - -\membersection{wxMenuItem::GetId}\label{wxmenuitemgetid} - -\constfunc{int}{GetId}{\void} - -Returns the menu item identifier. - -\membersection{wxMenuItem::GetMarginWidth}\label{wxmenuitemgetmarginwidth} - -\constfunc{int}{GetMarginWidth}{\void} - -Gets the width of the menu item checkmark bitmap (Windows only). - -\membersection{wxMenuItem::GetName}\label{wxmenuitemgetname} - -\constfunc{wxString}{GetName}{\void} - -Returns the text associated with the menu item. - -\membersection{wxMenuItem::GetSubMenu}\label{wxmenuitemgetsubmenu} - -\constfunc{wxMenu*}{GetSubMenu}{\void} - -Returns the submenu associated with the menu item, or NULL if there isn't one. - -\membersection{wxMenuItem::GetTextColour}\label{wxmenuitemgettextcolour} - -\constfunc{wxColour\&}{GetTextColour}{\void} - -Returns the text colour associated with the menu item (Windows only). - -\membersection{wxMenuItem::IsCheckable}\label{wxmenuitemischeckable} - -\constfunc{bool}{IsCheckable}{\void} - -Returns TRUE if the item is checkable. - -\membersection{wxMenuItem::IsChecked}\label{wxmenuitemischecked} - -\constfunc{bool}{IsChecked}{\void} - -Returns TRUE if the item is checked. - -\membersection{wxMenuItem::IsEnabled}\label{wxmenuitemisenabled} - -\constfunc{bool}{IsEnabled}{\void} - -Returns TRUE if the item is enabled. - -\membersection{wxMenuItem::IsSeparator}\label{wxmenuitemisseparator} - -\constfunc{bool}{IsSeparator}{\void} - -Returns TRUE if the item is a separator. - -\membersection{wxMenuItem::SetBackgroundColour}\label{wxmenuitemsetbackgroundcolour} - -\constfunc{void}{SetBackgroundColour}{\param{const wxColour\& }{colour}} - -Sets the background colour associated with the menu item (Windows only). - -\membersection{wxMenuItem::SetBitmaps}\label{wxmenuitemsetbitmaps} - -\constfunc{void}{SetBitmaps}{\param{const wxBitmap\& }{checked}, - \param{const wxBitmap\& }{unchecked = wxNullBitmap}} - -Sets the checked/unchecked bitmaps for the menu item (Windows only). The first bitmap -is also used as the single bitmap for uncheckable menu items. - -\membersection{wxMenuItem::SetFont}\label{wxmenuitemsetfont} - -\constfunc{void}{SetFont}{\param{const wxFont\& }{font}} - -Sets the font associated with the menu item (Windows only). - -\membersection{wxMenuItem::SetHelp}\label{wxmenuitemsethelp} - -\constfunc{void}{SetHelp}{\param{const wxString\& }{helpString}} - -Sets the help string. - -\membersection{wxMenuItem::SetMarginWidth}\label{wxmenuitemsetmarginwidth} - -\constfunc{void}{SetMarginWidth}{\param{int}{ width}} - -Sets the width of the menu item checkmark bitmap (Windows only). - -\membersection{wxMenuItem::SetName}\label{wxmenuitemsetname} - -\constfunc{void}{SetName}{\param{const wxString\& }{text}} - -Sets the text associated with the menu item. - -\membersection{wxMenuItem::SetTextColour}\label{wxmenuitemsettextcolour} - -\constfunc{void}{SetTextColour}{\param{const wxColour\& }{colour}} - -Sets the text colour associated with the menu item (Windows only). - - - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: "referenc" -%%% End: diff --git a/docs/latex/wx/metafile.tex b/docs/latex/wx/metafile.tex deleted file mode 100644 index 8242804101..0000000000 --- a/docs/latex/wx/metafile.tex +++ /dev/null @@ -1,125 +0,0 @@ - -\section{\class{wxMetaFile}}\label{wxmetafile} - -A {\bf wxMetaFile} represents the MS Windows metafile object, so metafile -operations have no effect in X. In wxWindows, only sufficient functionality -has been provided for copying a graphic to the clipboard; this may be extended -in a future version. Presently, the only way of creating a metafile -is to use a wxMetafileDC. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxMetaFileDC}{wxmetafiledc} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxMetaFile::wxMetaFile} - -\func{}{wxMetaFile}{\param{const wxString\& }{filename = ""}} - -Constructor. If a filename is given, the Windows disk metafile is -read in. Check whether this was performed successfully by -using the \helpref{wxMetaFile::Ok}{wxmetafileok} member. - -\membersection{wxMetaFile::\destruct{wxMetaFile}} - -\func{}{\destruct{wxMetaFile}}{\void} - -Destructor. - -\membersection{wxMetaFile::Ok}\label{wxmetafileok} - -\func{bool}{Ok}{\void} - -Returns TRUE if the metafile is valid. - -\membersection{wxMetaFile::Play}\label{wxmetafileplay} - -\func{bool}{Play}{\param{wxDC *}{dc}} - -Plays the metafile into the given device context, returning -TRUE if successful. - -\membersection{wxMetaFile::SetClipboard} - -\func{bool}{SetClipboard}{\param{int}{ width = 0}, \param{int}{ height = 0}} - -Passes the metafile data to the clipboard. The metafile can no longer be -used for anything, but the wxMetaFile object must still be destroyed by -the application. - -Below is a example of metafle, metafile device context and clipboard use -from the {\tt hello.cpp} example. Note the way the metafile dimensions -are passed to the clipboard, making use of the device context's ability -to keep track of the maximum extent of drawing commands. - -\begin{verbatim} - wxMetaFileDC dc; - if (dc.Ok()) - { - Draw(dc, FALSE); - wxMetaFile *mf = dc.Close(); - if (mf) - { - bool success = mf->SetClipboard((int)(dc.MaxX() + 10), (int)(dc.MaxY() + 10)); - delete mf; - } - } -\end{verbatim} - -\section{\class{wxMetaFileDC}}\label{wxmetafiledc} - -This is a type of device context that allows a metafile object to be -created (Windows only), and has most of the characteristics of a normal -\rtfsp{\bf wxDC}. The \helpref{wxMetaFileDC::Close}{wxmetafiledcclose} member must be called after drawing into the -device context, to return a metafile. The only purpose for this at -present is to allow the metafile to be copied to the clipboard (see \helpref{wxMetaFile}{wxmetafile}). - -Adding metafile capability to an application should be easy if you -already write to a wxDC; simply pass the wxMetaFileDC to your drawing -function instead. You may wish to conditionally compile this code so it -is not compiled under X (although no harm will result if you leave it -in). - -Note that a metafile saved to disk is in standard Windows metafile format, -and cannot be imported into most applications. To make it importable, -call the function \helpref{::wxMakeMetaFilePlaceable}{wxmakemetafileplaceable} after -closing your disk-based metafile device context. - -\wxheading{Derived from} - -\helpref{wxDC}{wxdc}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxMetaFile}{wxmetafile}, \helpref{wxDC}{wxdc} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxMetaFileDC::wxMetaFileDC} - -\func{}{wxMetaFileDC}{\param{const wxString\& }{filename = ""}} - -Constructor. If no filename is passed, the metafile is created -in memory. - -\membersection{wxMetaFileDC::\destruct{wxMetaFileDC}} - -\func{}{\destruct{wxMetaFileDC}}{\void} - -Destructor. - -\membersection{wxMetaFileDC::Close}\label{wxmetafiledcclose} - -\func{wxMetaFile *}{Close}{\void} - -This must be called after the device context is finished with. A -metafile is returned, and ownership of it passes to the calling -application (so it should be destroyed explicitly). - - diff --git a/docs/latex/wx/minifram.tex b/docs/latex/wx/minifram.tex deleted file mode 100644 index c749a749eb..0000000000 --- a/docs/latex/wx/minifram.tex +++ /dev/null @@ -1,108 +0,0 @@ -\section{\class{wxMiniFrame}}\label{wxminiframe} - -A miniframe is a frame with a small title bar. It is suitable for floating toolbars that must not -take up too much screen area. - -\wxheading{Derived from} - -\helpref{wxFrame}{wxframe}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxICONIZE}}{Display the frame iconized (minimized) (Windows only).} -\twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the frame.} -\twocolitem{\windowstyle{wxDEFAULT\_FRAME\_STYLE}}{Defined as {\bf wxMINIMIZE\_BOX \pipe wxMAXIMIZE\_BOX \pipe wxTHICK\_FRAME \pipe wxSYSTEM\_MENU \pipe wxCAPTION}.} -\twocolitem{\windowstyle{wxMINIMIZE}}{Identical to {\bf wxICONIZE}.} -\twocolitem{\windowstyle{wxMINIMIZE\_BOX}}{Displays a minimize box on the frame (Windows and Motif only).} -\twocolitem{\windowstyle{wxMAXIMIZE}}{Displays the frame maximized (Windows only).} -\twocolitem{\windowstyle{wxMAXIMIZE\_BOX}}{Displays a maximize box on the frame (Windows and Motif only).} -\twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{Stay on top of other windows (Windows only).} -\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Displays a system menu (Windows and Motif only).} -\twocolitem{\windowstyle{wxTHICK\_FRAME}}{Displays a thick frame around the window (Windows and Motif only).} -\twocolitem{\windowstyle{wxTINY\_CAPTION\_HORIZ}}{Displays a small horizontal caption. Use instead of -wxCAPTION.} -\twocolitem{\windowstyle{wxTINY\_CAPTION\_VERT}}{Under Windows, displays a small vertical caption. Use instead of -wxCAPTION.} -\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Displays a resizeable border around the window (Motif only; -for Windows, it is implicit in {\bf wxTHICK\_FRAME}).} -\end{twocollist} - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Remarks} - -This class has miniframe functionality only under Windows. On other platforms, -it behaves like a normal frame. - -\wxheading{See also} - -\helpref{wxMDIParentFrame}{wxmdiparentframe}, \helpref{wxMDIChildFrame}{wxmdichildframe},\rtfsp -\helpref{wxFrame}{wxframe}, \helpref{wxDialog}{wxdialog} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxMiniFrame::wxMiniFrame}\label{wxminiframeconstr} - -\func{}{wxMiniFrame}{\void} - -Default constructor. - -\func{}{wxMiniFrame}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp -\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp -\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE},\rtfsp -\param{const wxString\& }{name = ``frame"}} - -Constructor, creating the window. - -\wxheading{Parameters} - -\docparam{parent}{The window parent. This may be NULL. If it is non-NULL, the frame will -always be displayed on top of the parent window on Windows.} - -\docparam{id}{The window identifier. It may take a value of -1 to indicate a default value.} - -\docparam{title}{The caption to be displayed on the frame's title bar.} - -\docparam{pos}{The window position. A value of (-1, -1) indicates a default position, chosen by -either the windowing system or wxWindows, depending on platform.} - -\docparam{size}{The window size. A value of (-1, -1) indicates a default size, chosen by -either the windowing system or wxWindows, depending on platform.} - -\docparam{style}{The window style. See \helpref{wxMiniFrame}{wxminiframe}.} - -\docparam{name}{The name of the window. This parameter is used to associate a name with the item, -allowing the application user to set Motif resource values for -individual windows.} - -\wxheading{Remarks} - -The frame behaves like a normal frame on non-Windows platforms. - -\wxheading{See also} - -\helpref{wxMiniFrame::Create}{wxminiframecreate} - -\membersection{wxMiniFrame::\destruct{wxMiniFrame}} - -\func{void}{\destruct{wxMiniFrame}}{\void} - -Destructor. Destroys all child windows and menu bar if present. - -\membersection{wxMiniFrame::Create}\label{wxminiframecreate} - -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp -\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp -\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE},\rtfsp -\param{const wxString\& }{name = ``frame"}} - -Used in two-step frame construction. See \helpref{wxMiniFrame::wxMiniFrame}{wxminiframeconstr}\rtfsp -for further details. - - - diff --git a/docs/latex/wx/mltchdlg.tex b/docs/latex/wx/mltchdlg.tex deleted file mode 100644 index 8c6a74e54a..0000000000 --- a/docs/latex/wx/mltchdlg.tex +++ /dev/null @@ -1,21 +0,0 @@ -\section{\class{wxMultipleChoiceDialog}}\label{wxmultiplechoicedialog} - -This class represents a dialog that shows a list of strings, and allows -the user to select one or more. - -TODO. - -\wxheading{Derived from} - -\helpref{wxDialog}{wxdialog}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxMultipleChoiceDialog overview}{wxmultiplechoicedialogoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - - diff --git a/docs/latex/wx/module.tex b/docs/latex/wx/module.tex deleted file mode 100644 index 3bd382e920..0000000000 --- a/docs/latex/wx/module.tex +++ /dev/null @@ -1,85 +0,0 @@ -\section{\class{wxModule}}\label{wxmodule} - -The module system is a very simple mechanism to allow applications (and parts of wxWindows itself) to -define initialization and cleanup functions that are automatically called on wxWindows -startup and exit. - -To define a new kind of module, derive a class from wxModule, override the OnInit and OnExit functions, -and add the DECLARE\_DYNAMIC\_CLASS and IMPLEMENT\_DYNAMIC\_CLASS to header and implementation files -(which can be the same file). On initialization, wxWindows will find all classes derived from wxModule, -create an instance of each, and call each OnInit function. On exit, wxWindows will call the OnExit -function for each module instance. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxModule::wxModule}\label{wxmoduleconstr} - -\func{}{wxModule}{\void} - -Constructs a wxModule object. - -\membersection{wxModule::\destruct{wxModule}} - -\func{}{\destruct{wxModule}}{\void} - -Destructor. - -\membersection{wxModule::CleanupModules}\label{wxmodulecleanupmodules} - -\func{static void}{CleanupModules}{\void} - -Calls Exit for each module instance. Called by wxWindows on exit, so there is no -need for an application to call it. - -\membersection{wxModule::Exit}\label{wxmoduleexit} - -\func{void}{Exit}{\void} - -Calls OnExit. This function is called by wxWindows and should not need to be called -by an application. - -\membersection{wxModule::Init}\label{wxmoduleinit} - -\func{bool}{Init}{\void} - -Calls OnInit. This function is called by wxWindows and should not need to be called -by an application. - -\membersection{wxModule::InitializeModules}\label{wxmoduleinitializemodules} - -\func{static bool}{InitializeModules}{\void} - -Calls Init for each module instance. Called by wxWindows on startup, so there is no -need for an application to call it. - -\membersection{wxModule::OnExit}\label{wxmoduleonexit} - -\func{virtual bool}{OnExit}{\void} - -Provide this function with appropriate cleanup for your module. - -\membersection{wxModule::OnInit}\label{wxmoduleoninit} - -\func{virtual bool}{OnInit}{\void} - -Provide this function with appropriate initialization for your module. If the function -returns FALSE, wxWindows will exit immediately. - -\membersection{wxModule::RegisterModule}\label{wxmoduleregistermodule} - -\func{static void}{RegisterModule}{\param{wxModule*}{ module}} - -Registers this module with wxWindows. Called by wxWindows on startup, so there is no -need for an application to call it. - -\membersection{wxModule::RegisterModules}\label{wxmoduleregistermodules} - -\func{static bool}{RegisterModules}{\void} - -Creates instances of and registers all modules. Called by wxWindows on startup, so there is no -need for an application to call it. - diff --git a/docs/latex/wx/mouseevt.tex b/docs/latex/wx/mouseevt.tex deleted file mode 100644 index a116241989..0000000000 --- a/docs/latex/wx/mouseevt.tex +++ /dev/null @@ -1,327 +0,0 @@ -\section{\class{wxMouseEvent}}\label{wxmouseevent} - -This event class contains information about mouse events. -See \helpref{wxWindow::OnMouseEvent}{wxwindowonmouseevent}. - -\wxheading{Derived from} - -\helpref{wxEvent}{wxevent} - -\wxheading{Event table macros} - -To process a mouse event, use these event handler macros to direct input to member -functions that take a wxMouseEvent argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_LEFT\_DOWN(func)}}{Process a wxEVT\_LEFT\_DOWN event.} -\twocolitem{{\bf EVT\_LEFT\_UP(func)}}{Process a wxEVT\_LEFT\_UP event.} -\twocolitem{{\bf EVT\_LEFT\_DCLICK(func)}}{Process a wxEVT\_LEFT\_DCLICK event.} -\twocolitem{{\bf EVT\_MIDDLE\_DOWN(func)}}{Process a wxEVT\_MIDDLE\_DOWN event.} -\twocolitem{{\bf EVT\_MIDDLE\_UP(func)}}{Process a wxEVT\_MIDDLE\_UP event.} -\twocolitem{{\bf EVT\_MIDDLE\_DCLICK(func)}}{Process a wxEVT\_MIDDLE\_DCLICK event.} -\twocolitem{{\bf EVT\_RIGHT\_DOWN(func)}}{Process a wxEVT\_RIGHT\_DOWN event.} -\twocolitem{{\bf EVT\_RIGHT\_UP(func)}}{Process a wxEVT\_RIGHT\_UP event.} -\twocolitem{{\bf EVT\_RIGHT\_DCLICK(func)}}{Process a wxEVT\_RIGHT\_DCLICK event.} -\twocolitem{{\bf EVT\_MOTION(func)}}{Process a wxEVT\_MOTION event.} -\twocolitem{{\bf EVT\_ENTER\_WINDOW(func)}}{Process a wxEVT\_ENTER\_WINDOW event.} -\twocolitem{{\bf EVT\_LEAVE\_WINDOW(func)}}{Process a wxEVT\_LEAVE\_WINDOW event.} -\twocolitem{{\bf EVT\_MOUSE\_EVENTS(func)}}{Process all mouse events.} -\end{twocollist}% - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxMouseEvent::m\_altDown} - -\member{bool}{m\_altDown} - -TRUE if the Alt key is pressed down. - -\membersection{wxMouseEvent::m\_controlDown} - -\member{bool}{m\_controlDown} - -TRUE if control key is pressed down. - -\membersection{wxMouseEvent::m\_leftDown} - -\member{bool}{m\_leftDown} - -TRUE if the left mouse button is currently pressed down. - -\membersection{wxMouseEvent::m\_middleDown} - -\member{bool}{m\_middleDown} - -TRUE if the middle mouse button is currently pressed down. - -\membersection{wxMouseEvent::m\_rightDown} - -\member{bool}{m\_rightDown} - -TRUE if the right mouse button is currently pressed down. - -\membersection{wxMouseEvent::m\_leftDown} - -\member{bool}{m\_leftDown} - -TRUE if the left mouse button is currently pressed down. - -\membersection{wxMouseEvent::m\_metaDown} - -\member{bool}{m\_metaDown} - -TRUE if the Meta key is pressed down. - -\membersection{wxMouseEvent::m\_shiftDown} - -\member{bool}{m\_shiftDown} - -TRUE if shift is pressed down. - -\membersection{wxMouseEvent::m\_x} - -\member{float}{m\_x} - -X-coordinate of the event. - -\membersection{wxMouseEvent::m\_y} - -\member{float}{m\_y} - -Y-coordinate of the event. - -\membersection{wxMouseEvent::wxMouseEvent} - -\func{}{wxMouseEvent}{\param{WXTYPE}{ mouseEventType = 0}, \param{int}{ id = 0}} - -Constructor. Valid event types are: - -\begin{itemize} -\itemsep=0pt -\item {\bf wxEVT\_ENTER\_WINDOW} -\item {\bf wxEVT\_LEAVE\_WINDOW} -\item {\bf wxEVT\_LEFT\_DOWN} -\item {\bf wxEVT\_LEFT\_UP} -\item {\bf wxEVT\_LEFT\_DCLICK} -\item {\bf wxEVT\_MIDDLE\_DOWN} -\item {\bf wxEVT\_MIDDLE\_UP} -\item {\bf wxEVT\_MIDDLE\_DCLICK} -\item {\bf wxEVT\_RIGHT\_DOWN} -\item {\bf wxEVT\_RIGHT\_UP} -\item {\bf wxEVT\_RIGHT\_DCLICK} -\item {\bf wxEVT\_MOTION} -\end{itemize} - -\membersection{wxMouseEvent::AltDown} - -\func{bool}{AltDown}{\void} - -Returns TRUE if the Alt key was down at the time of the event. - -\membersection{wxMouseEvent::Button} - -\func{bool}{Button}{\param{int}{ button}} - -Returns TRUE if the identified mouse button is changing state. Valid -values of {\it button} are 1, 2 or 3 for left, middle and right -buttons respectively. - -Not all mice have middle buttons so a portable application should avoid -this one. - -\membersection{wxMouseEvent::ButtonDClick}\label{buttondclick} - -\func{bool}{ButtonDClick}{\param{int}{ but = -1}} - -If the argument is omitted, this returns TRUE if the event was a mouse -double click event. Otherwise the argument specifies which double click event -was generated (1, 2 or 3 for left, middle and right buttons respectively). - -\membersection{wxMouseEvent::ButtonDown} - -\func{bool}{ButtonDown}{\param{int}{ but = -1}} - -If the argument is omitted, this returns TRUE if the event was a mouse -button down event. Otherwise the argument specifies which button-down event -was generated (1, 2 or 3 for left, middle and right buttons respectively). - -\membersection{wxMouseEvent::ButtonUp} - -\func{bool}{ButtonUp}{\param{int}{ but = -1}} - -If the argument is omitted, this returns TRUE if the event was a mouse -button up event. Otherwise the argument specifies which button-up event -was generated (1, 2 or 3 for left, middle and right buttons respectively). - -\membersection{wxMouseEvent::ControlDown} - -\func{bool}{ControlDown}{\void} - -Returns TRUE if the control key was down at the time of the event. - -\membersection{wxMouseEvent::Dragging} - -\func{bool}{Dragging}{\void} - -Returns TRUE if this was a dragging event (motion while a button is depressed). - -\membersection{wxMouseEvent::Entering}\label{wxmouseevententering} - -\func{bool}{Entering}{\void} - -Returns TRUE if the mouse was entering the window (MS Windows and Motif). - -See also \helpref{wxMouseEvent::Leaving}{wxmouseeventleaving}. - -\membersection{wxMouseEvent::GetX}\label{wxmouseeventgetx} - -\func{float}{GetX}{\void} - -Returns X coordinate of the mouse event position. - -\membersection{wxMouseEvent::GetY}\label{wxmouseeventgety} - -\func{float}{GetY}{\void} - -Returns Y coordinate of the mouse event position. - -\membersection{wxMouseEvent::IsButton} - -\func{bool}{IsButton}{\void} - -Returns TRUE if the event was a mouse button event (not necessarily a button down event - -that may be tested using {\it ButtonDown}). - -\membersection{wxMouseEvent::Leaving}\label{wxmouseeventleaving} - -\func{bool}{Leaving}{\void} - -Returns TRUE if the mouse was leaving the window (MS Windows and Motif). - -See also \helpref{wxMouseEvent::Entering}{wxmouseevententering}. - -\membersection{wxMouseEvent::LeftDClick} - -\func{bool}{LeftDClick}{\void} - -Returns TRUE if the event was a left double click. - -\membersection{wxMouseEvent::LeftDown} - -\func{bool}{LeftDown}{\void} - -Returns TRUE if the left mouse button changed to down. - -\membersection{wxMouseEvent::LeftIsDown} - -\func{bool}{LeftIsDown}{\void} - -Returns TRUE if the left mouse button is currently down, independent -of the current event type. - -\membersection{wxMouseEvent::LeftUp} - -\func{bool}{LeftUp}{\void} - -Returns TRUE if the left mouse button changed to up. - -\membersection{wxMouseEvent::MetaDown} - -\func{bool}{MetaDown}{\void} - -Returns TRUE if the Meta key was down at the time of the event. - -\membersection{wxMouseEvent::MiddleDClick} - -\func{bool}{MiddleDClick}{\void} - -Returns TRUE if the event was a middle double click. - -\membersection{wxMouseEvent::MiddleDown} - -\func{bool}{MiddleDown}{\void} - -Returns TRUE if the middle mouse button changed to down. - -\membersection{wxMouseEvent::MiddleIsDown} - -\func{bool}{MiddleIsDown}{\void} - -Returns TRUE if the middle mouse button is currently down, independent -of the current event type. - -\membersection{wxMouseEvent::MiddleUp} - -\func{bool}{MiddleUp}{\void} - -Returns TRUE if the middle mouse button changed to up. - -\membersection{wxMouseEvent::Moving} - -\func{bool}{Moving}{\void} - -Returns TRUE if this was a motion event (no buttons depressed). - -\membersection{wxMouseEvent::Position} - -\func{void}{Position}{\param{float *}{x}, \param{float *}{y}} - -Sets *x and *y to the position at which the event occurred. If the -window is a window, the position is converted to logical units -(according to the current mapping mode) with scrolling taken into -account. To get back to device units (for example to calculate where on the -screen to place a dialog box associated with a window mouse event), use -\rtfsp{\bf wxDC::LogicalToDeviceX} and {\bf wxDC::LogicalToDeviceY}. - -For example, the following code calculates screen pixel coordinates -from the frame position, window view start (assuming the window is the only -subwindow on the frame and therefore at the top left of it), and the -logical event position. A menu is popped up at the position where the -mouse click occurred. (Note that the application should also check that -the dialog box will be visible on the screen, since the click could have -occurred near the screen edge!) - -\begin{verbatim} - float event_x, event_y; - event.Position(&event_x, &event_y); - frame->GetPosition(&x, &y); - window->ViewStart(&x1, &y1); - int mouse_x = (int)(window->GetDC()->LogicalToDeviceX(event_x + x - x1); - int mouse_y = (int)(window->GetDC()->LogicalToDeviceY(event_y + y - y1); - - char *choice = wxGetSingleChoice("Menu", "Pick a node action", - no_choices, choices, frame, mouse_x, mouse_y); -\end{verbatim} - -\membersection{wxMouseEvent::RightDClick} - -\func{bool}{RightDClick}{\void} - -Returns TRUE if the event was a right double click. - -\membersection{wxMouseEvent::RightDown} - -\func{bool}{RightDown}{\void} - -Returns TRUE if the right mouse button changed to down. - -\membersection{wxMouseEvent::RightIsDown} - -\func{bool}{RightIsDown}{\void} - -Returns TRUE if the right mouse button is currently down, independent -of the current event type. - -\membersection{wxMouseEvent::RightUp} - -\func{bool}{RightUp}{\void} - -Returns TRUE if the right mouse button changed to up. - -\membersection{wxMouseEvent::ShiftDown} - -\func{bool}{ShiftDown}{\void} - -Returns TRUE if the shift key was down at the time of the event. - diff --git a/docs/latex/wx/moveevt.tex b/docs/latex/wx/moveevt.tex deleted file mode 100644 index 8be4e9ba06..0000000000 --- a/docs/latex/wx/moveevt.tex +++ /dev/null @@ -1,38 +0,0 @@ -\section{\class{wxMoveEvent}}\label{wxmoveevent} - -A move event holds information about move change events. - -\wxheading{Derived from} - -\helpref{wxEvent}{wxevent}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Event table macros} - -To process a move event, use this event handler macro to direct input to a member -function that takes a wxMoveEvent argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_MOVE(func)}}{Process a wxEVT\_MOVE event, which is generated -when a window is moved.} -\end{twocollist}% - -\wxheading{See also} - -\helpref{wxWindow::OnMove}{wxwindowonmove}, \helpref{wxPoint}{wxpoint}, \helpref{Event handling overview}{eventhandlingoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxMoveEvent::wxMoveEvent} - -\func{}{wxMoveEvent}{\param{const wxPoint\& }{pt}, \param{int }{id = 0}} - -Constructor. - -\membersection{wxMoveEvent::GetPosition}\label{wxmoveeventgetposition} - -\constfunc{wxPoint}{GetPosition}{\void} - -Returns the position of the window generating the move change event. - diff --git a/docs/latex/wx/msgdlg.tex b/docs/latex/wx/msgdlg.tex deleted file mode 100644 index c121b4d865..0000000000 --- a/docs/latex/wx/msgdlg.tex +++ /dev/null @@ -1,63 +0,0 @@ -\section{\class{wxMessageDialog}}\label{wxmessagedialog} - -This class represents a dialog that shows a single or multi-line message, -with a choice of OK, Yes, No and Cancel buttons. - -\wxheading{Derived from} - -\helpref{wxDialog}{wxdialog}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxMessageDialog overview}{wxmessagedialogoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxMessageDialog::wxMessageDialog}\label{wxmessagedialogconstr} - -\func{}{wxMessageDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message},\rtfsp -\param{const wxString\& }{caption = "Message box"}, \param{long }{style = wxOK \pipe wxCANCEL \pipe wxCENTRE},\rtfsp -\param{const wxPoint\& }{pos = wxDefaultPosition}} - -Constructor. Use \helpref{wxMessageDialog::ShowModal}{wxmessagedialogshowmodal} to show the dialog. - -\wxheading{Parameters} - -\docparam{parent}{Parent window.} - -\docparam{message}{Message to show on the dialog.} - -\docparam{caption}{The dialog caption.} - -\docparam{style}{A dialog style (bitlist) containing flags chosen from the following: - -\twocolwidtha{5cm} -\begin{twocollist} -\twocolitem{{\bf wxOK}}{Show an OK button.} -\twocolitem{{\bf wxCANCEL}}{Show a Cancel button.} -\twocolitem{{\bf wxYES\_NO}}{Show Yes and No buttons.} -\twocolitem{{\bf wxCENTRE}}{Centre the message. Not Windows.} -\twocolitem{{\bf wxICON\_EXCLAMATION}}{Shows an exclamation mark icon. Windows only.} -\twocolitem{{\bf wxICON\_HAND}}{Shows a hand icon. Windows only.} -\twocolitem{{\bf wxICON\_QUESTION}}{Shows a question mark icon. Windows only.} -\twocolitem{{\bf wxICON\_INFORMATION}}{Shows an information (i) icon. Windows only.} -\end{twocollist} -} - -\docparam{pos}{Dialog position. Not Windows.} - -\membersection{wxMessageDialog::\destruct{wxMessageDialog}} - -\func{}{\destruct{wxMessageDialog}}{\void} - -Destructor. - -\membersection{wxMessageDialog::ShowModal}\label{wxmessagedialogshowmodal} - -\func{int}{ShowModal}{\void} - -Shows the dialog, returning one of wxID\_OK, wxID\_CANCEL, wxID\_YES, wxID\_NO. - diff --git a/docs/latex/wx/mutex.tex b/docs/latex/wx/mutex.tex deleted file mode 100644 index 9b992c4509..0000000000 --- a/docs/latex/wx/mutex.tex +++ /dev/null @@ -1,86 +0,0 @@ -\section{\class{wxMutex}}\label{wxmutex} - -A wxMutex controls mutual exclusion, to prevent two or more threads accessing -the same piece of code. - -\wxheading{Derived from} - -None. - -\wxheading{See also} - -\helpref{wxThread}{wxthread}, \helpref{wxCondition}{wxcondition} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxMutex::wxMutex}\label{wxmutexconstr} - -\func{}{wxMutex}{\void} - -Default constructor. - -\membersection{wxMutex::\destruct{wxMutex}} - -\func{}{\destruct{wxMutex}}{\void} - -Destroys the wxMutex object. - -\membersection{wxMutex::IsLocked}\label{wxmutexislocked} - -\constfunc{bool}{IsLocked}{\void} - -Returns TRUE if the mutex is locked, FALSE otherwise. - -\membersection{wxMutex::Lock}\label{wxmutexlock} - -\func{wxMutexError}{Lock}{\void} - -Locks the mutex object. - -\wxheading{Return value} - -One of: - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf MUTEX\_NO\_ERROR}}{There was no error.} -\twocolitem{{\bf MUTEX\_DEAD\_LOCK}}{A deadlock situation was detected.} -\twocolitem{{\bf MUTEX\_BUSY}}{The mutex is already locked by another thread.} -\end{twocollist} - -\membersection{wxMutex::TryLock}\label{wxmutextrylock} - -\func{wxMutexError}{TryLock}{\void} - -Tries to lock the mutex object. If it can't, returns immediately with an error. - -\wxheading{Return value} - -One of: - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf MUTEX\_NO\_ERROR}}{There was no error.} -\twocolitem{{\bf MUTEX\_DEAD\_LOCK}}{A deadlock situation was detected.} -\twocolitem{{\bf MUTEX\_BUSY}}{The mutex is already locked by another thread.} -\end{twocollist} - -\membersection{wxMutex::Unlock}\label{wxmutexunlock} - -\func{wxMutexError}{Unlock}{\void} - -Unlocks the mutex object. - -\wxheading{Return value} - -One of: - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf MUTEX\_NO\_ERROR}}{There was no error.} -\twocolitem{{\bf MUTEX\_DEAD\_LOCK}}{A deadlock situation was detected.} -\twocolitem{{\bf MUTEX\_BUSY}}{The mutex is already locked by another thread.} -\twocolitem{{\bf MUTEX\_UNLOCKED}}{The calling thread tries to unlock an unlocked mutex.} -\end{twocollist} - - diff --git a/docs/latex/wx/node.tex b/docs/latex/wx/node.tex deleted file mode 100644 index 417329092f..0000000000 --- a/docs/latex/wx/node.tex +++ /dev/null @@ -1,41 +0,0 @@ -\section{\class{wxNode}}\label{wxnode} - -A node structure used in linked lists (see \helpref{wxList}{wxlist}). - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxList}{wxlist}, \helpref{wxHashTable}{wxhashtable} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxNode::Data} - -\func{wxObject *}{Data}{\void} - -Retrieves the client data pointer associated with the node. This will -have to be cast to the correct type. - -\membersection{wxNode::Next} - -\func{wxNode *}{Next}{\void} - -Retrieves the next node (NULL if at end of list). - -\membersection{wxNode::Previous} - -\func{wxNode *}{Previous}{\void} - -Retrieves the previous node (NULL if at start of list). - -\membersection{wxNode::SetData} - -\func{void}{SetData}{\param{wxObject *}{data}} - -Sets the data associated with the node (usually the pointer will have been -set when the node was created). - - diff --git a/docs/latex/wx/object.tex b/docs/latex/wx/object.tex deleted file mode 100644 index 1cce58e408..0000000000 --- a/docs/latex/wx/object.tex +++ /dev/null @@ -1,213 +0,0 @@ -\section{\class{wxObject}}\label{wxobject} - -This is the root class of all wxWindows classes. -It declares a virtual destructor which ensures that -destructors get called for all derived class objects where necessary. - -wxObject is the hub of a dynamic object creation -scheme, enabling a program to create instances of a class only knowing -its string class name, and to query the class hierarchy. - -The class contains optional debugging versions -of {\bf new} and {\bf delete}, which can help trace memory allocation -and deallocation problems. - -wxObject can be used to implement reference counted objects, such as -wxPen, wxBitmap and others. - -\wxheading{See also} - -\helpref{wxClassInfo}{wxclassinfo}, \helpref{Debugging overview}{debuggingoverview},\rtfsp -\helpref{wxObjectRefData}{wxobjectrefdata} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxObject::wxObject}\label{wxobjectconstr} - -\func{}{wxObject}{\void} - -Default constructor. - -\membersection{wxObject::\destruct{wxObject}} - -\func{}{wxObject}{\void} - -Destructor. Performs dereferencing, for those objects -that use reference counting. - -\membersection{wxObject::m\_refData}\label{wxobjectmrefdata} - -\member{wxObjectRefData* }{m\_refData} - -Pointer to an object which is the object's reference-counted data. - -\wxheading{See also} - -\helpref{wxObject::Ref}{wxobjectref}, \helpref{wxObject::UnRef}{wxobjectunref},\rtfsp -\helpref{wxObject::SetRefData}{wxobjectsetrefdata},\rtfsp -\helpref{wxObject::GetRefData}{wxobjectgetrefdata},\rtfsp -\helpref{wxObjectRefData}{wxobjectrefdata} - -\membersection{wxObject::Dump}\label{wxobjectdump} - -\func{void}{Dump}{\param{ostream\&}{ stream}} - -A virtual function that should be redefined by derived classes to allow dumping of -memory states. - -\wxheading{Parameters} - -\docparam{stream}{Stream on which to output dump information.} - -\wxheading{Remarks} - -Currently wxWindows does not define Dump for derived classes, but -programmers may wish to use it for their own applications. Be sure to -call the Dump member of the class's base class to allow all information to be dumped. - -The implementation of this function just writes the class name of the object. -If DEBUG is undefined or zero, the implementation is empty. - -\membersection{wxObject::GetClassInfo}\label{wxobjectgetclassinfo} - -\func{wxClassInfo *}{GetClassInfo}{\void} - -This virtual function is redefined for every class that requires run-time -type information, when using DECLARE\_CLASS macros. - -\membersection{wxObject::GetRefData}\label{wxobjectgetrefdata} - -\constfunc{wxObjectRefData*}{GetRefData}{\void} - -Returns the {\bf m\_refData} pointer. - -\wxheading{See also} - -\helpref{wxObject::Ref}{wxobjectref}, \helpref{wxObject::UnRef}{wxobjectunref}, \helpref{wxObject::m\_refData}{wxobjectmrefdata},\rtfsp -\helpref{wxObject::SetRefData}{wxobjectsetrefdata},\rtfsp -\helpref{wxObjectRefData}{wxobjectrefdata} - -\membersection{wxObject::IsKindOf}\label{wxobjectiskindof} - -\func{bool}{IsKindOf}{\param{wxClassInfo *}{info}} - -Determines whether this class is a subclass of (or the same class as) -the given class. - -\wxheading{Parameters} - -\docparam{info}{A pointer to a class information object, which may be obtained -by using the CLASSINFO macro.} - -\wxheading{Return value} - -TRUE if the class represented by {\it info} is the same class as -this one or is derived from it. - -\wxheading{Example} - -\begin{verbatim} - bool tmp = obj->IsKindOf(CLASSINFO(wxFrame)); -\end{verbatim} - -\membersection{wxObject::Ref}\label{wxobjectref} - -\func{void}{Ref}{\param{const wxObject\& }{clone}} - -Makes this object refer to the data in {\it clone}. - -\wxheading{Parameters} - -\docparam{clone}{The object to `clone'.} - -\wxheading{Remarks} - -First this function calls \helpref{wxObject::UnRef}{wxobjectunref} on itself -to decrement (and perhaps free) the data it is currently referring to. - -It then sets its own m\_refData to point to that of {\it clone}, and increments the reference count -inside the data. - -\wxheading{See also} - -\helpref{wxObject::UnRef}{wxobjectunref}, \helpref{wxObject::m\_refData}{wxobjectmrefdata},\rtfsp -\helpref{wxObject::SetRefData}{wxobjectsetrefdata}, \helpref{wxObject::GetRefData}{wxobjectgetrefdata},\rtfsp -\helpref{wxObjectRefData}{wxobjectrefdata} - -\membersection{wxObject::SetRefData}\label{wxobjectsetrefdata} - -\func{void}{SetRefData}{\param{wxObjectRefData*}{ data}} - -Sets the {\bf m\_refData} pointer. - -\wxheading{See also} - -\helpref{wxObject::Ref}{wxobjectref}, \helpref{wxObject::UnRef}{wxobjectunref}, \helpref{wxObject::m\_refData}{wxobjectmrefdata},\rtfsp -\helpref{wxObject::GetRefData}{wxobjectgetrefdata},\rtfsp -\helpref{wxObjectRefData}{wxobjectrefdata} - -\membersection{wxObject::UnRef}\label{wxobjectunref} - -\func{void}{UnRef}{\void} - -Decrements the reference count in the associated data, and if it is zero, deletes the data. -The {\bf m\_refData} member is set to NULL. - -\wxheading{See also} - -\helpref{wxObject::Ref}{wxobjectref}, \helpref{wxObject::m\_refData}{wxobjectmrefdata},\rtfsp -\helpref{wxObject::SetRefData}{wxobjectsetrefdata}, \helpref{wxObject::GetRefData}{wxobjectgetrefdata},\rtfsp -\helpref{wxObjectRefData}{wxobjectrefdata} - -\membersection{wxObject::operator new}\label{wxobjectnew} - -\func{void *}{new}{\param{size\_t }{size}, \param{const wxString\& }{filename = NULL}, \param{int}{ lineNum = 0}} - -The {\it new} operator is defined for debugging versions of the library only, when -the identifier DEBUG is defined and is more than zero. It takes over memory allocation, allowing -wxDebugContext operations. - -\membersection{wxObject::operator delete}\label{wxobjectdelete} - -\func{void}{delete}{\param{void }{buf}} - -The {\it delete} operator is defined for debugging versions of the library only, when -the identifier DEBUG is defined and is more than zero. It takes over memory deallocation, allowing -wxDebugContext operations. - -\section{\class{wxObjectRefData}}\label{wxobjectrefdata} - -This class is used to store reference-counted data. Derive classes from this to -store your own data. When retrieving information from a {\bf wxObject}'s reference data, -you will need to cast to your own derived class. - -\wxheading{Friends} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxObject}{wxobject} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxObjectRefData::m\_count} - -\member{int}{m\_count} - -Reference count. When this goes to zero during a \helpref{wxObject::UnRef}{wxobjectunref}, an object -can delete the {\bf wxObjectRefData} object. - -\membersection{wxObjectRefData::wxObjectRefData}\label{wxobjectrefdataconstr} - -\func{}{wxObjectRefData}{\void} - -Default constructor. Initialises the {\bf m\_count} member to 1. - -\membersection{wxObjectRefData::\destruct{wxObjectRefData}} - -\func{}{wxObjectRefData}{\void} - -Destructor. - - diff --git a/docs/latex/wx/pagedlg.tex b/docs/latex/wx/pagedlg.tex deleted file mode 100644 index 082970f2c0..0000000000 --- a/docs/latex/wx/pagedlg.tex +++ /dev/null @@ -1,242 +0,0 @@ -\section{\class{wxPageSetupData}}\label{wxpagesetupdata} - -This class holds a variety of information related to \helpref{wxPageSetupDialog}{wxpagesetupdialog}. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxPageSetupDialog}{wxpagesetupdialog} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxPageSetupData::wxPageSetupData} - -\func{}{wxPageSetupData}{\void} - -Constructor. - -\membersection{wxPageSetupData::\destruct{wxPageSetupData}} - -\func{}{\destruct{wxPageSetupData}}{\void} - -Destructor. - -\membersection{wxPageSetupData::EnableHelp}\label{wxpagesetupdataenablehelp} - -\func{void}{EnableHelp}{\param{bool }{flag}} - -Enables or disables the `Help' button (Windows only). - -\membersection{wxPageSetupData::EnableMargins}\label{wxpagesetupdataenablemargins} - -\func{void}{EnableMargins}{\param{bool }{flag}} - -Enables or disables the margin controls (Windows only). - -\membersection{wxPageSetupData::EnableOrientation}\label{wxpagesetupdataenableorientation} - -\func{void}{EnableOrientation}{\param{bool }{flag}} - -Enables or disables the orientation control (Windows only). - -\membersection{wxPageSetupData::EnablePaper}\label{wxpagesetupdataenablepaper} - -\func{void}{EnablePaper}{\param{bool }{flag}} - -Enables or disables the paper size control (Windows only). - -\membersection{wxPageSetupData::EnablePrinter}\label{wxpagesetupdataenableprinter} - -\func{void}{EnablePrinter}{\param{bool }{flag}} - -Enables or disables the {\bf Printer} button, which invokes a printer setup dialog. - -\membersection{wxPageSetupData::GetPaperSize}\label{wxpagesetupdatagetpapersize} - -\func{wxPoint}{GetPaperSize}{\void} - -Returns the paper size in millimetres. - -\membersection{wxPageSetupData::GetMarginTopLeft}\label{wxpagesetupdatagetmargintopleft} - -\func{wxPoint}{GetMarginTopLeft}{\void} - -Returns the left (x) and top (y) margins. - -\membersection{wxPageSetupData::GetMarginBottomRight}\label{wxpagesetupdatagetmarginbottomright} - -\func{wxPoint}{GetMarginBottomRight}{\void} - -Returns the right (x) and bottom (y) margins. - -\membersection{wxPageSetupData::GetMinMarginTopLeft}\label{wxpagesetupdatagetminmargintopleft} - -\func{wxPoint}{GetMinMarginTopLeft}{\void} - -Returns the left (x) and top (y) minimum margins the user can enter (Windows only). - -\membersection{wxPageSetupData::GetMinMarginBottomRight}\label{wxpagesetupdatagetminmarginbottomright} - -\func{wxPoint}{GetMinMarginBottomRight}{\void} - -Returns the right (x) and bottom (y) minimum margins the user can enter (Windows only). - -\membersection{wxPageSetupData::GetOrientation}\label{wxpagesetupdatagetorientation} - -\func{int}{GetOrientation}{\void} - -Returns the orientation, which can be wxPORTRAIT or wxLANDSCAPE. - -\membersection{wxPageSetupData::GetDefaultMinMargins}\label{wxpagesetupdatagetdefaultminmargins} - -\func{bool}{GetDefaultMinMargins}{\void} - -Returns TRUE if the page setup dialog will take its minimum margin values from the currently -selected printer properties. Windows only. - -\membersection{wxPageSetupData::GetEnableMargins}\label{wxpagesetupdatagetenablemargins} - -\func{bool}{GetEnableMargins}{\void} - -Returns TRUE if the margin controls are enabled (Windows only). - -\membersection{wxPageSetupData::GetEnableOrientation}\label{wxpagesetupdatagetenableorientation} - -\func{bool}{GetEnableOrientation}{\void} - -Returns TRUE if the orientation control is enabled (Windows only). - -\membersection{wxPageSetupData::GetEnablePaper}\label{wxpagesetupdatagetenablepaper} - -\func{bool}{GetEnablePaper}{\void} - -Returns TRUE if the paper size control is enabled (Windows only). - -\membersection{wxPageSetupData::GetEnablePrinter}\label{wxpagesetupdatagetenableprinter} - -\func{bool}{GetEnablePrinter}{\void} - -Returns TRUE if the printer setup button is enabled. - -\membersection{wxPageSetupData::GetEnableHelp}\label{wxpagesetupdatagetenablehelp} - -\func{bool}{GetEnableHelp}{\void} - -Returns TRUE if the printer setup button is enabled. - -\membersection{wxPageSetupData::GetDefaultInfo}\label{wxpagesetupdatagetdefaultinfo} - -\func{bool}{GetDefaultInfo}{\void} - -Returns TRUE if the dialog will simply return default printer information (such as orientation) -instead of showing a dialog. Windows only. - -\membersection{wxPageSetupData::SetPaperSize}\label{wxpagesetupdatasetpapersize} - -\func{void}{SetPaperSize}{\param{const wxPoint\& }{size}} - -Sets the paper size in millimetres. - -\membersection{wxPageSetupData::SetMarginTopLeft}\label{wxpagesetupdatasetmargintopleft} - -\func{void}{GetMarginTopLeft}{\param{const wxPoint\& }{pt}} - -Sets the left (x) and top (y) margins. - -\membersection{wxPageSetupData::SetMarginBottomRight}\label{wxpagesetupdatasetmarginbottomright} - -\func{void}{SetMarginBottomRight}{\param{const wxPoint\& }{pt}} - -Sets the right (x) and bottom (y) margins. - -\membersection{wxPageSetupData::SetMinMarginTopLeft}\label{wxpagesetupdatasetminmargintopleft} - -\func{void}{SetMinMarginTopLeft}{\param{const wxPoint\& }{pt}} - -Sets the left (x) and top (y) minimum margins the user can enter (Windows only). - -\membersection{wxPageSetupData::SetMinMarginBottomRight}\label{wxpagesetupdatasetminmarginbottomright} - -\func{void}{SetMinMarginBottomRight}{\param{const wxPoint\& }{pt}} - -Sets the right (x) and bottom (y) minimum margins the user can enter (Windows only). - -\membersection{wxPageSetupData::SetOrientation}\label{wxpagesetupdatasetorientation} - -\func{void}{SetOrientation}{\param{int }{orientation}} - -Sets the orientation, which can be wxPORTRAIT or wxLANDSCAPE. - -\membersection{wxPageSetupData::SetDefaultMinMargins}\label{wxpagesetupdatasetdefaultminmargins} - -\func{void}{SetDefaultMinMargins}{\param{bool}{ flag}} - -Pass TRUE if the page setup dialog will take its minimum margin values from the currently -selected printer properties. Windows only. - -\membersection{wxPageSetupData::SetDefaultInfo}\label{wxpagesetupdatasetdefaultinfo} - -\func{void}{SetDefaultInfo}{\param{bool}{ flag}} - -Pass TRUE if the dialog will simply return default printer information (such as orientation) -instead of showing a dialog. Windows only. - -\section{\class{wxPageSetupDialog}}\label{wxpagesetupdialog} - -This class represents the page setup common dialog. The page setup dialog is standard from -Windows 95 on, replacing the print setup dialog (which is retained in Windows and wxWindows -for backward compatibility). On Windows 95 and NT 4.0 and above, the page setup dialog is -native to the windowing system, otherwise it is emulated. - -The page setup dialog contains controls for paper size (A4, A5 etc.), orientation (landscape -or portrait), and controls for setting left, top, right and bottom margin sizes in millimetres. -The page setup dialog does not set any global information (the exception being orientation -for PostScript printing) so you need to query the \helpref{wxPageSetupData}{wxpagesetupdata} object -associated with the dialog. - -Note that the OK and Cancel buttons do not destroy the dialog; this must be done by the -application. - -\wxheading{Derived from} - -\helpref{wxDialog}{wxdialog}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxPrintDialog}{wxprintdialog}, \helpref{wxPageSetupData}{wxpagesetupdata} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxPageSetupDialog::wxPageSetupDialog} - -\func{}{wxPageSetupDialog}{\param{wxWindow* }{parent}, \param{wxPageSetupData* }{data = NULL}} - -Constructor. Pass a parent window, and optionally a pointer to a block of page setup -data, which will be copied to the print dialog's internal data. - -\membersection{wxPageSetupDialog::\destruct{wxPageSetupDialog}} - -\func{}{\destruct{wxPageSetupDialog}}{\void} - -Destructor. - -\membersection{wxPageSetupDialog::GetPageSetupData}\label{wxpagesetupdialoggetpagesetupdata} - -\func{wxPageSetupData\&}{GetPageSetupData}{\void} - -Returns the \helpref{page setup data}{wxpagesetupdata} associated with the dialog. - -\membersection{wxPageSetupDialog::ShowModal}\label{wxpagesetupdialogshowmodal} - -\func{int}{ShowModal}{\void} - -Shows the dialog, returning wxID\_OK if the user pressed OK, and wxID\_CANCEL -otherwise. - - diff --git a/docs/latex/wx/paintdc.tex b/docs/latex/wx/paintdc.tex deleted file mode 100644 index 5589b42648..0000000000 --- a/docs/latex/wx/paintdc.tex +++ /dev/null @@ -1,35 +0,0 @@ -\section{\class{wxPaintDC}}\label{wxpaintdc} - -A wxPaintDC must be constructed if an application wishes to paint on the -client area of a window from within an {\bf OnPaint} event. -This should normally be constructed as a temporary stack object; don't store -a wxPaintDC object. - -Using wxPaintDC within OnPaint is important because it automatically -sets the clipping area to the damaged area of the window. Attempts to draw -outside this area do not appear. - -To draw on a window from outside {\bf OnPaint}, construct a \helpref{wxClientDC}{wxclientdc} object. - -To draw on the whole window including decorations, construct a \helpref{wxWindowDC}{wxwindowdc} object -(Windows only). - -\wxheading{Derived from} - -\helpref{wxDC}{wxdc} - -\wxheading{See also} - -\helpref{wxDC}{wxdc}, \helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxPaintDC}{wxpaintdc},\rtfsp -\helpref{wxWindowDC}{wxwindowdc}, \helpref{wxScreenDC}{wxscreendc} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxPaintDC::wxPaintDC} - -\func{}{wxPaintDC}{\param{wxWindow*}{ window}} - -Constructor. Pass a pointer to the window on which you wish to paint. - - - diff --git a/docs/latex/wx/paintevt.tex b/docs/latex/wx/paintevt.tex deleted file mode 100644 index b60f34bf16..0000000000 --- a/docs/latex/wx/paintevt.tex +++ /dev/null @@ -1,31 +0,0 @@ -\section{\class{wxPaintEvent}}\label{wxpaintevent} - -A paint event is sent when a window's contents needs to be repainted. - -\wxheading{Derived from} - -\helpref{wxEvent}{wxevent}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Event table macros} - -To process a paint event, use this event handler macro to direct input to a member -function that takes a wxPaintEvent argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_PAINT(func)}}{Process a wxEVT\_PAINT event.} -\end{twocollist}% - -\wxheading{See also} - -\helpref{wxWindow::OnPaint}{wxwindowonpaint}, \helpref{Event handling overview}{eventhandlingoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxPaintEvent::wxPaintEvent} - -\func{}{wxPaintEvent}{\param{int }{id = 0}} - -Constructor. - diff --git a/docs/latex/wx/palette.tex b/docs/latex/wx/palette.tex deleted file mode 100644 index 14134b38da..0000000000 --- a/docs/latex/wx/palette.tex +++ /dev/null @@ -1,164 +0,0 @@ -\section{\class{wxPalette}}\label{wxpalette} - -A palette is a table that maps pixel values to RGB colours. It allows the colours -of a low-depth bitmap, for example, to be mapped to the available colours in a display. - -TODO: topic overview for wxPalette. - -\wxheading{Derived from} - -\helpref{wxGDIObject}{wxgdiobject}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxDC::SetPalette}{wxdcsetpalette}, \helpref{wxBitmap}{wxbitmap} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxPalette::wxPalette}\label{wxpaletteconstr} - -\func{}{wxPalette}{\void} - -Default constructor. - -\func{}{wxPalette}{\param{const wxPalette\&}{ palette}} - -Copy constructor. This uses reference counting so is a cheap operation. - -\func{}{wxPalette}{\param{const wxPalette*}{ palette}} - -Copy constructor. This uses reference counting so is a cheap operation. - -\func{}{wxPalette}{\param{int}{ n}, \param{const unsigned char* }{red},\\ - \param{const unsigned char* }{green}, \param{const unsigned char* }{blue}} - -Creates a palette from arrays of size {\it n}, one for each -red, blue or green component. - -\wxheading{Parameters} - -\docparam{palette}{A pointer or reference to the palette to copy.} - -\docparam{n}{The number of indices in the palette.} - -\docparam{red}{An array of red values.} - -\docparam{green}{An array of green values.} - -\docparam{blue}{An array of blue values.} - -\wxheading{See also} - -\helpref{wxPalette::Create}{wxpalettecreate} - -\membersection{wxPalette::\destruct{wxPalette}} - -\func{}{\destruct{wxPalette}}{\void} - -Destructor. - -\membersection{wxPalette::Create}\label{wxpalettecreate} - -\func{bool}{Create}{\param{int}{ n}, \param{const unsigned char* }{red},\rtfsp - \param{const unsigned char* }{green}, \param{const unsigned char* }{blue}} - -Creates a palette from arrays of size {\it n}, one for each -red, blue or green component. - -\wxheading{Parameters} - -\docparam{n}{The number of indices in the palette.} - -\docparam{red}{An array of red values.} - -\docparam{green}{An array of green values.} - -\docparam{blue}{An array of blue values.} - -\wxheading{Return value} - -TRUE if the creation was successful, FALSE otherwise. - -\wxheading{See also} - -\helpref{wxPalette::wxPalette}{wxpaletteconstr} - -\membersection{wxPalette::GetPixel}\label{wxpalettegetpixel} - -\constfunc{int}{GetPixel}{\param{const unsigned char }{red}, \param{const unsigned char }{green},\rtfsp - \param{const unsigned char }{blue}} - -Returns a pixel value (index into the palette) for the given RGB values. - -\wxheading{Parameters} - -\docparam{red}{Red value.} - -\docparam{green}{Green value.} - -\docparam{blue}{Blue value.} - -\wxheading{Return value} - -The nearest palette index. - -\wxheading{See also} - -\helpref{wxPalette::GetRGB}{wxpalettegetrgb} - -\membersection{wxPalette::GetRGB}\label{wxpalettegetrgb} - -\constfunc{bool}{GetPixel}{\param{int}{ pixel}, \param{const unsigned char* }{red}, \param{const unsigned char* }{green},\rtfsp - \param{const unsigned char* }{blue}} - -Returns RGB values for a given palette index. - -\wxheading{Parameters} - -\docparam{pixel}{The palette index.} - -\docparam{red}{Receives the red value.} - -\docparam{green}{Receives the green value.} - -\docparam{blue}{Receives the blue value.} - -\wxheading{Return value} - -TRUE if the operation was successful. - -\wxheading{See also} - -\helpref{wxPalette::GetPixel}{wxpalettegetpixel} - -\membersection{wxPalette::Ok}\label{wxpaletteok} - -\constfunc{bool}{Ok}{\void} - -Returns TRUE if palette data is present. - -\membersection{wxPalette::operator $=$}\label{wxpaletteassignment} - -\func{wxPalette\&}{operator $=$}{\param{const wxPalette\& }{palette}} - -Assignment operator, using reference counting. Returns a reference -to `this'. - -\membersection{wxPalette::operator $==$}\label{wxpaletteequals} - -\func{bool}{operator $==$}{\param{const wxPalette\& }{palette}} - -Equality operator. Two palettes are equal if they contain pointers -to the same underlying palette data. It does not compare each attribute, -so two independently-created palettes using the same parameters will -fail the test. - -\membersection{wxPalette::operator $!=$}\label{wxpalettenotequals} - -\func{bool}{operator $!=$}{\param{const wxPalette\& }{palette}} - -Inequality operator. Two palettes are not equal if they contain pointers -to different underlying palette data. It does not compare each attribute. - - diff --git a/docs/latex/wx/panel.tex b/docs/latex/wx/panel.tex deleted file mode 100644 index af873dd390..0000000000 --- a/docs/latex/wx/panel.tex +++ /dev/null @@ -1,118 +0,0 @@ -\section{\class{wxPanel}}\label{wxpanel} - -A panel is a window on which controls are placed. It is usually placed within a frame. -It contains minimal extra functionality over and above its parent class wxWindow; its main -purpose is to be similar in appearance and functionality to a dialog, but with the flexibility of -having any window as a parent. - -\wxheading{Derived from} - -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -There are no specific styles for this window. - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Remarks} - -By default, a panel has the same colouring as a dialog. - -A panel may be loaded from a wxWindows resource file (extension {\tt wxr}). - -\wxheading{See also} - -\helpref{wxDialog}{wxdialog} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxPanel::wxPanel}\label{wxpanelconstr} - -\func{}{wxPanel}{\void} - -Default constructor. - -\func{}{wxPanel}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp -\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp -\param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = wxTAB\_TRAVERSAL},\rtfsp -\param{const wxString\& }{name = ``panel"}} - -Constructor. - -\wxheading{Parameters} - -\docparam{parent}{The parent window.} - -\docparam{id}{An identifier for the panel. A value of -1 is taken to mean a default.} - -\docparam{pos}{The panel position. A value of (-1, -1) indicates a default position, chosen by -either the windowing system or wxWindows, depending on platform.} - -\docparam{size}{The panel size. A value of (-1, -1) indicates a default size, chosen by -either the windowing system or wxWindows, depending on platform.} - -\docparam{style}{The window style. See \helpref{wxPanel}{wxpanel}.} - -\docparam{name}{Used to associate a name with the window, -allowing the application user to set Motif resource values for -individual dialog boxes.} - -\wxheading{See also} - -\helpref{wxPanel::Create}{wxpanelcreate} - -\membersection{wxPanel::\destruct{wxPanel}} - -\func{}{\destruct{wxPanel}}{\void} - -Destructor. Deletes any child windows before deleting the physical window. - -\membersection{wxPanel::Create}\label{wxpanelcreate} - -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp -\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp -\param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = wxTAB\_TRAVERSAL},\rtfsp -\param{const wxString\& }{name = ``panel"}} - -Used for two-step panel construction. See \helpref{wxPanel::wxPanel}{wxpanelconstr}\rtfsp -for details. - -\membersection{wxPanel::InitDialog}\label{wxpanelinitdialog} - -\func{void}{InitDialog}{\void} - -Sends an \helpref{wxWindow::OnInitDialog}{wxwindowoninitdialog} event, which -in turn transfers data to the dialog via validators. - -\wxheading{See also} - -\helpref{wxWindow::OnInitDialog}{wxwindowoninitdialog} - -\membersection{wxPanel::OnSysColourChanged}\label{wxpanelonsyscolourchanged} - -\func{void}{OnSysColourChanged}{\param{wxSysColourChangedEvent\& }{event}} - -The default handler for wxEVT\_SYS\_COLOUR\_CHANGED. - -\wxheading{Parameters} - -\docparam{event}{The colour change event.} - -\wxheading{Remarks} - -Changes the panel's colour to conform to the current settings (Windows only). -Add an event table entry for your panel class if you wish the behaviour -to be different (such as keeping a user-defined -background colour). If you do override this function, call \helpref{wxWindow::OnSysColourChanged}{wxwindowonsyscolourchanged} to -propagate the notification to child windows and controls. - -\wxheading{See also} - -\helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent} - - diff --git a/docs/latex/wx/pantabv.tex b/docs/latex/wx/pantabv.tex deleted file mode 100644 index 69e9cc8546..0000000000 --- a/docs/latex/wx/pantabv.tex +++ /dev/null @@ -1,69 +0,0 @@ -\section{\class{wxPanelTabView}}\label{wxpaneltabview} - -The wxPanelTabView is responsible for input and output on a wxPanel. - -\wxheading{Derived from} - -\helpref{wxTabView}{wxtabview}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxTabView overview}{wxtabviewoverview}, \helpref{wxTabView}{wxtabview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxPanelTabView::wxPanelTabView}\label{wxpaneltabviewconstr} - -\func{void}{wxPanelTabView}{\param{wxPanel *}{panel}, \param{long }{style = wxTAB\_STYLE\_DRAW\_BOX \pipe wxTAB\_STYLE\_COLOUR\_INTERIOR}} - -Constructor. {\it panel} should be a wxTabbedPanel or wxTabbedDialog: the type will be checked by the view at run time. - -{\it style} may be a bit list of the following: - -\begin{twocollist}\itemsep=0pt -\twocolitem{wxTAB\_STYLE\_DRAW\_BOX}{Draw a box around the view area. Most commonly used for dialogs.} -\twocolitem{wxTAB\_STYLE\_COLOUR\_INTERIOR}{Draw tab backgrounds in the specified colour. Omitting this style -will ensure that the tab background matches the dialog background.} -\end{twocollist} - -\membersection{wxPanelTabView::\destruct{wxPanelTabView}} - -\func{void}{\destruct{wxPanelTabView}}{\void} - -Destructor. This destructor deletes all the panels associated with the view. -If you do not wish this to happen, call ClearWindows with argument FALSE before the -view is likely to be destroyed. This will clear the list of windows, without deleting them. - -\membersection{wxPanelTabView::AddTabWindow}\label{wxpaneltabviewaddtabwindow} - -\func{void}{AddTabPanel}{\param{int}{ id}, \param{wxWindow *}{window}} - -Adds a window to the view. The window is associated with the tab identifier, and will be shown or hidden as the tab -is selected or deselected. - -\membersection{wxPanelTabView::ClearWindows} - -\func{void}{ClearWindows}{\param{bool}{ deleteWindows = TRUE}} - -Removes the child windows from the view. If {\it deleteWindows} is TRUE, the windows will be deleted. - -\membersection{wxPanelTabView::GetCurrentWindow} - -\func{wxPanel *}{GetCurrentWindow}{\void} - -Returns the child window currently being displayed on the tabbed panel or dialog box. - -\membersection{wxPanelTabView::GetTabWindow} - -\func{wxWindow *}{GetTabWindow}{\param{int}{ id}} - -Returns the window associated with the tab identifier. - -\membersection{wxPanelTabView::ShowWindowForTab} - -\func{void}{ShowWindowForTab}{\param{int}{ id}} - -Shows the child window corresponding to the tab identifier, and hides the previously shown window. - - diff --git a/docs/latex/wx/pathlist.tex b/docs/latex/wx/pathlist.tex deleted file mode 100644 index 8310d24e3f..0000000000 --- a/docs/latex/wx/pathlist.tex +++ /dev/null @@ -1,75 +0,0 @@ -\section{\class{wxPathList}}\label{wxpathlist} - -The path list is a convenient way of storing a number of directories, and -when presented with a filename without a directory, searching for an existing file -in those directories. Storing the filename only in an application's files and -using a locally-defined list of directories makes the application and its files more -portable. - -Use the {\it wxFileNameFromPath} global function to extract the filename -from the path. - -\wxheading{Derived from} - -\helpref{wxList}{wxlist}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxList}{wxlist} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxPathList::wxPathList} - -\func{}{wxPathList}{\void} - -Constructor. - -\membersection{wxPathList::AddEnvList} - -\func{void}{AddEnvList}{\param{const wxString\& }{env\_variable}} - -Finds the value of the given environment variable, and adds all paths -to the path list. Useful for finding files in the PATH variable, for -example. - -\membersection{wxPathList::Add} - -\func{void}{Add}{\param{const wxString\& }{path}} - -Adds the given directory to the path list, but does not -check if the path was already on the list (use wxPathList::Member) -for this). - -\membersection{wxPathList::EnsureFileAccessible} - -\func{void}{EnsureFileAccessible}{\param{const wxString\& }{filename}} - -Given a full filename (with path), ensures that files in the same path -can be accessed using the pathlist. It does this by stripping the -filename and adding the path to the list if not already there. - -\membersection{wxPathList::FindAbsoluteValidPath} - -\func{wxString}{FindAbsoluteValidPath}{\param{const wxString\& }{file}} - -Searches for a full path for an existing file by appending {\it file} to -successive members of the path list. If the file exists, a temporary -pointer to the absolute path is returned. - -\membersection{wxPathList::FindValidPath} - -\func{wxString}{FindValidPath}{\param{const wxString\& }{file}} - -Searches for a full path for an existing file by appending {\it file} to -successive members of the path list. If the file exists, a temporary -pointer to the full path is returned. This path may be relative to the current -working directory. - -\membersection{wxPathList::Member} - -\func{bool}{Member}{\param{const wxString\& }{file}} - -TRUE if the path is in the path list (ignoring case). - diff --git a/docs/latex/wx/pen.tex b/docs/latex/wx/pen.tex deleted file mode 100644 index c0490876e9..0000000000 --- a/docs/latex/wx/pen.tex +++ /dev/null @@ -1,380 +0,0 @@ -\section{\class{wxPen}}\label{wxpen} - -A pen is a drawing tool for drawing outlines. It is used for drawing -lines and painting the outline of rectangles, ellipses, etc. It has a -colour, a width and a style. - -\wxheading{Remarks} - -On a monochrome display, wxWindows shows all non-white pens as black. - -Do not initialize objects on the stack before the program commences, -since other required structures may not have been set up yet. Instead, -define global pointers to objects and create them in {\it OnInit} or -when required. - -An application may wish to dynamically create pens with different -characteristics, and there is the consequent danger that a large number -of duplicate pens will be created. Therefore an application may wish to -get a pointer to a pen by using the global list of pens {\bf -wxThePenList}, and calling the member function {\bf FindOrCreatePen}. -See the entry for \helpref{wxPenList}{wxpenlist}. - -TODO: an overview for wxPen. - -\wxheading{See also} - -\helpref{wxPenList}{wxpenlist}, \helpref{wxDC}{wxdc}, \helpref{wxDC::SetPen}{wxdcsetpen} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxPen::wxPen}\label{wxpenconstr} - -\func{}{wxPen}{\void} - -Default constructor. The pen will be uninitialised, and \helpref{wxPen::Ok}{wxpenok} will -return FALSE. - -\func{}{wxPen}{\param{const wxColour\&}{ colour}, \param{int}{ width}, \param{int}{ style}} - -Constructs a pen from a colour object, pen width and style. - -\func{}{wxPen}{\param{const wxString\& }{colourName}, \param{int}{ width}, \param{int}{ style}} - -Constructs a pen from a colour name, pen width and style. - -\func{}{wxPen}{\param{const wxBitmap\&}{ stipple}, \param{int}{ width}} - -Constructs a stippled pen from a stipple bitmap and a width. - -\func{}{wxPen}{\param{const wxPen\&}{ pen}} - -Copy constructor. This uses reference counting so is a cheap operation. - -\func{}{wxPen}{\param{const wxPen*}{ pen}} - -Copy constructor. This uses reference counting so is a cheap operation. - -\wxheading{Parameters} - -\docparam{colour}{A colour object.} - -\docparam{colourName}{A colour name.} - -\docparam{width}{Pen width. Under Windows, the pen width cannot be greater than 1 if -the style is wxDOT, wxLONG\_DASH, wxSHORT\_DASH, wxDOT\_DASH, or wxUSER\_DASH.} - -\docparam{stipple}{A stipple bitmap.} - -\docparam{pen}{A pointer or reference to a pen to copy.} - -\docparam{width}{Pen width. Under Windows, the pen width cannot be greater than 1 if -the style is wxDOT, wxLONG\_DASH, wxSHORT\_DASH, wxDOT\_DASH, or wxUSER\_DASH.} - -\docparam{style}{The style may be one of the following: - -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf wxSOLID}}{Solid style.} -\twocolitem{{\bf wxTRANSPARENT}}{No pen is used.} -\twocolitem{{\bf wxDOT}}{Dotted style.} -\twocolitem{{\bf wxLONG\_DASH}}{Long dashed style.} -\twocolitem{{\bf wxSHORT\_DASH}}{Short dashed style.} -\twocolitem{{\bf wxDOT\_DASH}}{Dot and dash style.} -\twocolitem{{\bf wxSTIPPLE}}{Use the stipple bitmap.} -\twocolitem{{\bf wxUSER\_DASH}}{Use the user dashes: see \helpref{wxPen::SetDashes}{wxpensetdashes}.} -\twocolitem{{\bf wxBDIAGONAL\_HATCH}}{Backward diagonal hatch.} -\twocolitem{{\bf wxCROSSDIAG\_HATCH}}{Cross-diagonal hatch.} -\twocolitem{{\bf wxFDIAGONAL\_HATCH}}{Forward diagonal hatch.} -\twocolitem{{\bf wxCROSS\_HATCH}}{Cross hatch.} -\twocolitem{{\bf wxHORIZONTAL\_HATCH}}{Horizontal hatch.} -\twocolitem{{\bf wxVERTICAL\_HATCH}}{Vertical hatch.} -\end{twocollist}} - -\wxheading{Remarks} - -If the named colour form is used, an appropriate {\bf wxColour} structure -is found in the colour database. - -{\it style} may be one of wxSOLID, wxDOT, wxLONG\_DASH, wxSHORT\_DASH and -wxDOT\_DASH. - -\wxheading{See also} - -\helpref{wxPen::SetStyle}{wxpensetstyle}, \helpref{wxPen::SetColour}{wxpensetcolour},\rtfsp -\helpref{wxPen::SetWidth}{wxpensetwidth}, \helpref{wxPen::SetStipple}{wxpensetstipple} - -\membersection{wxPen::\destruct{wxPen}} - -\func{}{\destruct{wxPen}}{\void} - -Destructor. - -\wxheading{Remarks} - -The destructor may not delete the underlying pen object of the native windowing -system, since wxBrush uses a reference counting system for efficiency. - -Although all remaining pens are deleted when the application exits, -the application should try to clean up all pens itself. This is because -wxWindows cannot know if a pointer to the pen object is stored in an -application data structure, and there is a risk of double deletion. - -\membersection{wxPen::GetCap}\label{wxpengetcap} - -\constfunc{int}{GetCap}{\void} - -Returns the pen cap style, which may be one of {\bf wxCAP\_ROUND}, {\bf wxCAP\_PROJECTING} and -\rtfsp{\bf wxCAP\_BUTT}. The default is {\bf wxCAP\_ROUND}. - -\wxheading{See also} - -\helpref{wxPen::SetCap}{wxpensetcap} - -\membersection{wxPen::GetColour}\label{wxpengetcolour} - -\constfunc{wxColour\&}{GetColour}{\void} - -Returns a reference to the pen colour. - -\wxheading{See also} - -\helpref{wxPen::SetColour}{wxpensetcolour} - -\membersection{wxPen::GetDashes}\label{wxpengetdashes} - -\constfunc{int}{GetDashes}{\param{wxDash**}{ dashes}} - -Gets an array of dashes (defined as char in X, DWORD under Windows). -{\it dashes} is a pointer to the internal array. Do not deallocate or store this pointer. -The function returns the number of dashes associated with this pen. - -\wxheading{See also} - -\helpref{wxPen::SetDashes}{wxpensetdashes} - -\membersection{wxPen::GetJoin}\label{wxpengetjoin} - -\constfunc{int}{GetJoin}{\void} - -Returns the pen join style, which may be one of {\bf wxJOIN\_BEVEL}, {\bf wxJOIN\_ROUND} and -\rtfsp{\bf wxJOIN\_MITER}. The default is {\bf wxJOIN\_ROUND}. - -\wxheading{See also} - -\helpref{wxPen::SetJoin}{wxpensetjoin} - -\membersection{wxPen::GetStipple}\label{wxpengetstipple} - -\constfunc{wxBitmap* }{GetStipple}{\void} - -Gets a pointer to the stipple bitmap. - -\wxheading{See also} - -\helpref{wxPen::SetStipple}{wxpensetstipple} - -\membersection{wxPen::GetStyle}\label{wxpengetstyle} - -\constfunc{int}{GetStyle}{\void} - -Returns the pen style. - -\wxheading{See also} - -\helpref{wxPen::wxPen}{wxpenconstr}, \helpref{wxPen::SetStyle}{wxpensetstyle} - -\membersection{wxPen::GetWidth}\label{wxpengetwidth} - -\constfunc{int}{GetWidth}{\void} - -Returns the pen width. - -\wxheading{See also} - -\helpref{wxPen::SetWidth}{wxpensetwidth} - -\membersection{wxPen::Ok}\label{wxpenok} - -\constfunc{bool}{Ok}{\void} - -Returns TRUE if the pen is initialised. - -\membersection{wxPen::SetCap}\label{wxpensetcap} - -\func{void}{SetCap}{\param{int}{ capStyle}} - -Sets the pen cap style, which may be one of {\bf wxCAP\_ROUND}, {\bf wxCAP\_PROJECTING} and -\rtfsp{\bf wxCAP\_BUTT}. The default is {\bf wxCAP\_ROUND}. - -\wxheading{See also} - -\helpref{wxPen::GetCap}{wxpengetcap} - -\membersection{wxPen::SetColour}\label{wxpensetcolour} - -\func{void}{SetColour}{\param{wxColour\&}{ colour}} - -\func{void}{SetColour}{\param{const wxString\& }{colourName}} - -\func{void}{SetColour}{\param{int}{ red}, \param{int}{ green}, \param{int}{ blue}} - -The pen's colour is changed to the given colour. - -\wxheading{See also} - -\helpref{wxPen::GetColour}{wxpengetcolour} - -\membersection{wxPen::SetDashes}\label{wxpensetdashes} - -\func{void}{SetDashes}{\param{int }{n}, \param{wxDash*}{ dashes}} - -Associates an array of pointers to dashes (defined as char in X, DWORD under Windows) -with the pen. The array is not deallocated by wxPen, but neither must it be -deallocated by the calling application until the pen is deleted or this -function is called with a NULL array. - -TODO: describe in detail. - -\wxheading{See also} - -\helpref{wxPen::GetDashes}{wxpengetdashes} - -\membersection{wxPen::SetJoin}\label{wxpensetjoin} - -\func{void}{SetJoin}{\param{int}{join\_style}} - -Sets the pen join style, which may be one of {\bf wxJOIN\_BEVEL}, {\bf wxJOIN\_ROUND} and -\rtfsp{\bf wxJOIN\_MITER}. The default is {\bf wxJOIN\_ROUND}. - -\wxheading{See also} - -\helpref{wxPen::GetJoin}{wxpengetjoin} - -\membersection{wxPen::SetStipple}\label{wxpensetstipple} - -\func{void}{SetStipple}{\param{wxBitmap* }{stipple}} - -Sets the bitmap for stippling. - -\wxheading{See also} - -\helpref{wxPen::GetStipple}{wxpengetstipple} - -\membersection{wxPen::SetStyle}\label{wxpensetstyle} - -\func{void}{SetStyle}{\param{int}{ style}} - -Set the pen style. - -\wxheading{See also} - -\helpref{wxPen::wxPen}{wxpenconstr} - -\membersection{wxPen::SetWidth}\label{wxpensetwidth} - -\func{void}{SetWidth}{\param{int}{ width}} - -Sets the pen width. - -\wxheading{See also} - -\helpref{wxPen::GetWidth}{wxpengetwidth} - -\membersection{wxPen::operator $=$}\label{wxpenassignment} - -\func{wxPen\&}{operator $=$}{\param{const wxPen\& }{pen}} - -Assignment operator, using reference counting. Returns a reference -to `this'. - -\membersection{wxPen::operator $==$}\label{wxpenequals} - -\func{bool}{operator $==$}{\param{const wxPen\& }{pen}} - -Equality operator. Two pens are equal if they contain pointers -to the same underlying pen data. It does not compare each attribute, -so two independently-created pens using the same parameters will -fail the test. - -\membersection{wxPen::operator $!=$}\label{wxpennotequals} - -\func{bool}{operator $!=$}{\param{const wxPen\& }{pen}} - -Inequality operator. Two pens are not equal if they contain pointers -to different underlying pen data. It does not compare each attribute. - -\section{\class{wxPenList}}\label{wxpenlist} - -There is only one instance of this class: {\bf wxThePenList}. Use -this object to search for a previously created pen of the desired -type and create it if not already found. In some windowing systems, -the pen may be a scarce resource, so it can pay to reuse old -resources if possible. When an application finishes, all pens will -be deleted and their resources freed, eliminating the possibility of -`memory leaks'. However, it is best not to rely on this automatic -cleanup because it can lead to double deletion in some circumstances. - -There are two mechanisms in recent versions of wxWindows which make the -pen list less useful than it once was. Under Windows, scarce resources -are cleaned up internally if they are not being used. Also, a referencing -counting mechanism applied to all GDI objects means that some sharing -of underlying resources is possible. You don't have to keep track of pointers, -working out when it is safe delete a pen, because the referencing counting does -it for you. For example, you can set a pen in a device context, and then -immediately delete the pen you passed, because the pen is `copied'. - -So you may find it easier to ignore the pen list, and instead create -and copy pens as you see fit. If your Windows resource meter suggests -your application is using too many resources, you can resort to using -GDI lists to share objects explicitly. - -The only compelling use for the pen list is for wxWindows to keep -track of pens in order to clean them up on exit. It is also kept for -backward compatibility with earlier versions of wxWindows. - -\wxheading{See also} - -\helpref{wxPen}{wxpen} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxPenList::wxPenList} - -\func{void}{wxPenList}{\void} - -Constructor. The application should not construct its own pen list: -use the object pointer {\bf wxThePenList}. - -\membersection{wxPenList::AddPen}\label{wxpenlistaddpen} - -\func{void}{AddPen}{\param{wxPen*}{ pen}} - -Used internally by wxWindows to add a pen to the list. - -\membersection{wxPenList::FindOrCreatePen}\label{wxpenlistfindorcreatepen} - -\func{wxPen*}{FindOrCreatePen}{\param{const wxColour\& }{colour}, \param{int}{ width}, \param{int}{ style}} - -Finds a pen with the specified attributes and returns it, else creates a new pen, adds it -to the pen list, and returns it. - -\func{wxPen*}{FindOrCreatePen}{\param{const wxString\& }{colourName}, \param{int}{ width}, \param{int}{ style}} - -Finds a pen with the specified attributes and returns it, else creates a new pen, adds it -to the pen list, and returns it. - -\wxheading{Parameters} - -\docparam{colour}{Colour object.} - -\docparam{colourName}{Colour name, which should be in the colour database.} - -\docparam{style}{Pen style. See \helpref{wxPen::wxPen}{wxpenconstr} for a list of styles.} - -\membersection{wxPenList::RemovePen}\label{wxpenlistremovepen} - -\func{void}{RemovePen}{\param{wxPen*}{ pen}} - -Used by wxWindows to remove a pen from the list. - - diff --git a/docs/latex/wx/plug.bmp b/docs/latex/wx/plug.bmp deleted file mode 100644 index 6541a1ffb0..0000000000 Binary files a/docs/latex/wx/plug.bmp and /dev/null differ diff --git a/docs/latex/wx/point.tex b/docs/latex/wx/point.tex deleted file mode 100644 index 9446ebb6fa..0000000000 --- a/docs/latex/wx/point.tex +++ /dev/null @@ -1,37 +0,0 @@ -\section{\class{wxPoint}}\label{wxpoint} - -A {\bf wxPoint} is a useful data structure for graphics operations. -It simply contains integer {\it x} and {\it y} members. - -See also \helpref{wxRealPoint}{wxrealpoint} for a floating point version. - -\wxheading{Derivation} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxRealPoint}{wxrealpoint} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxPoint::wxPoint} - -\func{}{wxPoint}{\void} - -\func{}{wxPoint}{\param{int}{ x}, \param{int}{ y}} - -Create a point. - -\membersection{wxPoint::x} - -\member{int}{x} - -x member. - -\membersection{wxPoint::y} - -\member{int}{ y} - -y member. - diff --git a/docs/latex/wx/postscpt.tex b/docs/latex/wx/postscpt.tex deleted file mode 100644 index e654c282d8..0000000000 --- a/docs/latex/wx/postscpt.tex +++ /dev/null @@ -1,34 +0,0 @@ -\section{\class{wxPostScriptDC}}\label{wxpostscriptdc} - -This defines the wxWindows Encapsulated PostScript device context, -which can write PostScript files on any platform. See \helpref{wxDC}{wxdc} for -descriptions of the member functions. - -\wxheading{Derived from} - -\helpref{wxDC}{wxdc}\\ -\helpref{wxObject}{wxobject} - -\membersection{wxPostScriptDC::wxPostScriptDC} - -\func{}{wxPostScriptDC}{\param{const wxString\& }{output}, \param{bool }{interactive = TRUE},\\ - \param{wxWindow *}{parent}} - -Constructor. {\it output} is an optional file for printing to, and if -\rtfsp{\it interactive} is TRUE a dialog box will be displayed for adjusting -various parameters. {\it parent} is the parent of the printer dialog box. - -Use the {\it Ok} member to test whether the constructor was successful -in creating a useable device context. - -See \helpref{Printer settings}{printersettings} for functions to set and -get PostScript printing settings. - -\membersection{wxPostScriptDC::GetStream} - -\func{ostream *}{GetStream}{\void} - -Returns the stream currently being used to write PostScript output. Use this -to insert any PostScript code that is outside the scope of wxPostScriptDC. - - diff --git a/docs/latex/wx/prevwin.tex b/docs/latex/wx/prevwin.tex deleted file mode 100644 index 30793384b0..0000000000 --- a/docs/latex/wx/prevwin.tex +++ /dev/null @@ -1,177 +0,0 @@ - -\section{\class{wxPreviewCanvas}}\label{wxpreviewcanvas} - -A preview canvas is the default canvas used by the print preview -system to display the preview. - -\wxheading{Derived from} - -\helpref{wxScrolledWindow}{wxscrolledwindow}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxevthandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxPreviewFrame}{wxpreviewframe}, \helpref{wxPreviewControlBar}{wxpreviewcontrolbar},\rtfsp -\helpref{wxPrintPreview}{wxprintpreview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxPreviewCanvas::wxPreviewCanvas} - -\func{}{wxPreviewCanvas}{\param{wxPrintPreview* }{preview}, \param{wxWindow* }{parent}, - \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, - \param{long}{ style = 0}, \param{const wxString\& }{name = ``canvas"}} - -Constructor. - -\membersection{wxPreviewCanvas::\destruct{wxPreviewCanvas}} - -\func{}{\destruct{wxPreviewCanvas}}{\void} - -Destructor. - -\membersection{wxPreviewCanvas::OnPaint}\label{wxpreviewcanvasonpaint} - -\func{void}{OnPaint}{\param{wxPaintEvent\& }{event}} - -Calls \helpref{wxPrintPreview::PaintPage}{wxprintpreviewpaintpage} to refresh the canvas. - -\section{\class{wxPreviewControlBar}}\label{wxpreviewcontrolbar} - -This is the default implementation of the preview control bar, a panel -with buttons and a zoom control. You can derive a new class from this and -override some or all member functions to change the behaviour and appearance; -or you can leave it as it is. - -\wxheading{Derived from} - -\helpref{wxPanel}{wxpanel}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxPreviewFrame}{wxpreviewframe}, \helpref{wxPreviewCanvas}{wxpreviewcanvas},\rtfsp -\helpref{wxPrintPreview}{wxprintpreview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxPreviewControlBar::wxPreviewControlbar} - -\func{}{wxPreviewControlBar}{\param{wxPrintPreview* }{preview}, \param{long}{ buttons}, \param{wxWindow* }{parent}, - \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, - \param{long}{ style = 0}, \param{const wxString\& }{name = ``panel"}} - -Constructor. - -The buttons parameter may be a combination of the following, using the bitwise `or' operator. - -\begin{twocollist}\itemsep=0pt -\twocolitem{wxPREVIEW\_PRINT}{Create a print button.} -\twocolitem{wxPREVIEW\_NEXT}{Create a next page button.} -\twocolitem{wxPREVIEW\_PREVIOUS}{Create a previous page button.} -\twocolitem{wxPREVIEW\_ZOOM}{Create a zoom control.} -\twocolitem{wxPREVIEW\_DEFAULT}{Equivalent to a combination of wxPREVIEW\_PREVIOUS, wxPREVIEW\_NEXT and -wxPREVIEW\_ZOOM.} -\end{twocollist} - -\membersection{wxPreviewControlBar::\destruct{wxPreviewControlBar}} - -\func{}{\destruct{wxPreviewControlBar}}{\void} - -Destructor. - -\membersection{wxPreviewControlBar::CreateButtons} - -\func{void}{CreateButtons}{\void} - -Creates buttons, according to value of the button style flags. - -\membersection{wxPreviewControlBar::GetPrintPreview} - -\func{wxPrintPreview *}{GetPrintPreview}{\void} - -Gets the print preview object associated with the control bar. - -\membersection{wxPreviewControlBar::GetZoomControl} - -\func{int}{GetZoomControl}{\void} - -Gets the current zoom setting in percent. - -\membersection{wxPreviewControlBar::SetZoomControl} - -\func{void}{SetZoomControl}{\param{int }{percent}} - -Sets the zoom control. - -\section{\class{wxPreviewFrame}}\label{wxpreviewframe} - -This class provides the default method of managing the print preview interface. -Member functions may be overridden to replace functionality, or the -class may be used without derivation. - -\wxheading{Derived from} - -\helpref{wxFrame}{wxframe}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxPreviewCanvas}{wxpreviewcanvas}, \helpref{wxPreviewControlBar}{wxpreviewcontrolbar},\rtfsp -\helpref{wxPrintPreview}{wxprintpreview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxPreviewFrame::wxPreviewFrame} - -\func{}{wxPreviewFrame}{\param{wxPrintPreview* }{preview}, \param{wxFrame* }{parent}, \param{const wxString\& }{title}, - \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& size }{size = wxDefaultSize}, - \param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = ``frame"}} - -Constructor. Pass a print preview object plus other normal frame arguments. - -\membersection{wxPreviewFrame::\destruct{wxPreviewFrame}} - -\func{}{\destruct{wxPreviewFrame}}{\void} - -Destructor. - -\membersection{wxPreviewFrame::CreateControlBar} - -\func{void}{CreateControlBar}{\void} - -Creates a wxPreviewControlBar. Override this function to allow -a user-defined preview control bar object to be created. - -\membersection{wxPreviewFrame::CreateCanvas} - -\func{void}{CreateCanvas}{\void} - -Creates a wxPreviewCanvas. Override this function to allow -a user-defined preview canvas object to be created. - -\membersection{wxPreviewFrame::Initialize} - -\func{void}{Initialize}{\void} - -Creates the preview canvas and control bar, and calls -wxWindow::MakeModal(TRUE) to disable other top-level windows -in the application. - -This function should be called by the application prior to -showing the frame. - -\membersection{wxPreviewFrame::OnClose} - -\func{bool}{OnClose}{\void} - -Enables the other frames in the application, and deletes the print preview -object, implicitly deleting any printout objects associated with the print -preview object. - diff --git a/docs/latex/wx/print.tex b/docs/latex/wx/print.tex deleted file mode 100644 index fbc7e61755..0000000000 --- a/docs/latex/wx/print.tex +++ /dev/null @@ -1,650 +0,0 @@ -\section{\class{wxPrintData}}\label{wxprintdata} - -This class holds a variety of information related to print dialogs. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxPrintDialog}{wxprintdialog}, \helpref{wxPrintDialog Overview}{wxprintdialogoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxPrintData::wxPrintData} - -\func{}{wxPrintData}{\void} - -Constructor. - -\membersection{wxPrintData::\destruct{wxPrintData}} - -\func{}{\destruct{wxPrintData}}{\void} - -Destructor. - -\membersection{wxPrintData::EnableHelp}\label{wxprintdataenablehelp} - -\func{void}{EnableHelp}{\param{bool }{flag}} - -Enables or disables the `Help' button. - -\membersection{wxPrintData::EnablePageNumbers}\label{wxprintdataenablepagenumbers} - -\func{void}{EnablePageNumbers}{\param{bool }{flag}} - -Enables or disables the `Page numbers' controls. - -\membersection{wxPrintData::EnablePrintToFile}\label{wxprintdataenableprinttofile} - -\func{void}{EnablePrintToFile}{\param{bool }{flag}} - -Enables or disables the `Print to file' checkbox. - -\membersection{wxPrintData::EnableSelection}\label{wxprintdataenableselection} - -\func{void}{EnableSelection}{\param{bool }{flag}} - -Enables or disables the `Selection' radio button. - -\membersection{wxPrintData::GetAllPages}\label{wxprintdatagetallpages} - -\func{bool}{GetAllPages}{\void} - -Returns TRUE if the user requested that all pages be printed. - -\membersection{wxPrintData::GetCollate}\label{wxprintdatagetcollate} - -\func{bool}{GetCollate}{\void} - -Returns TRUE if the user requested that the document(s) be collated. - -\membersection{wxPrintData::GetFromPage}\label{wxprintdatagetfrompage} - -\func{int}{GetFromPage}{\void} - -Returns the {\it from} page number, as entered by the user. - -\membersection{wxPrintData::GetMaxPage}\label{wxprintdatagetmaxpage} - -\func{int}{GetMaxPage}{\void} - -Returns the {\it maximum} page number. - -\membersection{wxPrintData::GetMinPage}\label{wxprintdatagetminpage} - -\func{int}{GetMinPage}{\void} - -Returns the {\it minimum} page number. - -\membersection{wxPrintData::GetNoCopies}\label{wxprintdatagetnocopies} - -\func{int}{GetNoCopies}{\void} - -Returns the number of copies requested by the user. - -\membersection{wxPrintData::GetOrientation}\label{wxprintdatagetorientation} - -\func{int}{GetOrientation}{\void} - -Gets the orientation. This can be wxLANDSCAPE or wxPORTRAIT. - -\membersection{wxPrintData::GetToPage}\label{wxprintdatagettopage} - -\func{int}{GetToPage}{\void} - -Returns the {\it to} page number, as entered by the user. - -\membersection{wxPrintData::SetCollate}\label{wxprintdatasetcollate} - -\func{void}{SetCollate}{\param{bool }{flag}} - -Sets the 'Collate' checkbox to TRUE or FALSE. - -\membersection{wxPrintData::SetFromPage}\label{wxprintdatasetfrompage} - -\func{void}{SetFromPage}{\param{int }{page}} - -Sets the {\it from} page number. - -\membersection{wxPrintData::SetMaxPage}\label{wxprintdatasetmaxpage} - -\func{void}{SetMaxPage}{\param{int }{page}} - -Sets the {\it maximum} page number. - -\membersection{wxPrintData::SetMinPage}\label{wxprintdatasetminpage} - -\func{void}{SetMinPage}{\param{int }{page}} - -Sets the {\it minimum} page number. - -\membersection{wxPrintData::SetOrientation}\label{wxprintdatasetorientation} - -\func{void}{SetOrientation}{\param{int }{orientation}} - -Sets the orientation. This can be wxLANDSCAPE or wxPORTRAIT. - -\membersection{wxPrintData::SetNoCopies}\label{wxprintdatasetnocopies} - -\func{void}{SetNoCopies}{\param{int }{n}} - -Sets the default number of copies to be printed out. - -\membersection{wxPrintData::SetPrintToFile}\label{wxprintdatasetprinttofile} - -\func{void}{SetPrintToFile}{\param{bool }{flag}} - -Sets the 'Print to file' checkbox to TRUE or FALSE. - -\membersection{wxPrintData::SetSetupDialog}\label{wxprintdatasetsetupdialog} - -\func{void}{SetSetupDialog}{\param{bool }{flag}} - -Determines whether the dialog to be shown will be the Print dialog -(pass FALSE) or Print Setup dialog (pass TRUE). - -Note that the setup dialog is obsolete from -Windows 95, though retained for backward compatibility. - -\membersection{wxPrintData::SetToPage}\label{wxprintdatasettopage} - -\func{void}{SetToPage}{\param{int }{page}} - -Sets the {\it to} page number. - -\section{\class{wxPrintDialog}}\label{wxprintdialog} - -This class represents the print and print setup common dialogs. -You may obtain a \helpref{wxPrinterDC}{wxprinterdc} device context from -a successfully dismissed print dialog. - -\wxheading{Derived from} - -\helpref{wxDialog}{wxdialog}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxPrintDialog Overview}{wxprintdialogoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxPrintDialog::wxPrintDialog} - -\func{}{wxPrintDialog}{\param{wxWindow* }{parent}, \param{wxPrintData* }{data = NULL}} - -Constructor. Pass a parent window, and optionally a pointer to a block of print -data, which will be copied to the print dialog's print data. - -\wxheading{See also} - -\helpref{wxPrintData}{wxprintdata} - -\membersection{wxPrintDialog::\destruct{wxPrintDialog}} - -\func{}{\destruct{wxPrintDialog}}{\void} - -Destructor. If wxPrintDialog::GetPrintDC has {\it not} been called, -the device context obtained by the dialog (if any) will be deleted. - -\membersection{wxPrintDialog::GetPrintData}\label{wxprintdialoggetprintdata} - -\func{wxPrintData\&}{GetPrintData}{\void} - -Returns the \helpref{print data}{wxprintdata} associated with the print dialog. - -\membersection{wxPrintDialog::GetPrintDC}\label{wxprintdialoggetprintdc} - -\func{wxDC* }{GetPrintDC}{\void} - -Returns the device context created by the print dialog, if any. -When this function has been called, the ownership of the device context -is transferred to the application, so it must then be deleted -explicitly. - -\membersection{wxPrintDialog::ShowModal}\label{wxprintdialogshowmodal} - -\func{int}{ShowModal}{\void} - -Shows the dialog, returning wxID\_OK if the user pressed OK, and wxID\_CANCEL -otherwise. After this function is called, a device context may -be retrievable using \helpref{wxPrintDialog::GetPrintDC}{wxprintdialoggetprintdc}. - -\section{\class{wxPrinter}}\label{wxprinter} - -This class represents the Windows or PostScript printer, and is the vehicle through -which printing may be launched by an application. Printing can also -be achieved through using of lower functions and classes, but -this and associated classes provide a more convenient and general -method of printing. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{Printing framework overview}{printingoverview}, \helpref{wxPrinterDC}{wxprinterdc}, \helpref{wxPrintDialog}{wxprintdialog},\rtfsp -\helpref{wxPrintout}{wxprintout}, \helpref{wxPrintPreview}{wxprintpreview}. - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxPrinter::wxPrinter} - -\func{}{wxPrinter}{\param{wxPrintData* }{data = NULL}} - -Constructor. Pass an optional pointer to a block of print -data, which will be copied to the printer object's print data. - -\wxheading{See also} - -\helpref{wxPrintData}{wxprintdata} - -\membersection{wxPrinter::\destruct{wxPrinter}} - -\func{}{\destruct{wxPrinter}}{\void} - -Destructor. - -\membersection{wxPrinter::Abort}\label{wxprinterabort} - -\func{bool}{Abort}{\void} - -Returns TRUE if the user has aborted the print job. - -\membersection{wxPrinter::CreateAbortWindow}\label{wxprintercreateabortwindow} - -\func{void}{CreateAbortWindow}{\param{wxWindow* }{parent}, \param{wxPrintout* }{printout}} - -Creates the default printing abort window, with a cancel button. - -\membersection{wxPrinter::GetPrintData}\label{wxprintergetprintdata} - -\func{wxPrintData\&}{GetPrintData}{\void} - -Returns the \helpref{print data}{wxprintdata} associated with the printer object. - -\membersection{wxPrinter::Print}\label{wxprinterprint} - -\func{bool}{Print}{\param{wxWindow *}{parent}, \param{wxPrintout *}{printout}, \param{bool }{prompt=TRUE}} - -Starts the printing process. Provide a parent window, a user-defined wxPrintout object which controls -the printing of a document, and whether the print dialog should be invoked first. - -Print could return FALSE if there was a problem initializing the printer device context -(current printer not set, for example). - -\membersection{wxPrinter::PrintDialog}\label{wxprinterprintdialog} - -\func{bool}{PrintDialog}{\param{wxWindow *}{parent}} - -Invokes the print dialog. - -\membersection{wxPrinter::ReportError}\label{wxprinterreporterror} - -\func{void}{ReportError}{\param{wxWindow *}{parent}, \param{wxPrintout *}{printout}, \param{const wxString\& }{message}} - -Default error-reporting function. - -\membersection{wxPrinter::Setup}\label{wxprintersetup} - -\func{void}{Setup}{\param{wxWindow *}{parent}} - -Invokes the print setup dialog. Note that the setup dialog is obsolete from -Windows 95, though retained for backward compatibility. - -\section{\class{wxPrinterDC}}\label{wxprinterdc} - -A printer device context is specific to Windows, and allows access to -any printer with a Windows driver. See \helpref{wxDC}{wxdc} for further information -on device contexts, and \helpref{wxDC::GetSize}{wxdcgetsize} for advice on -achieving the correct scaling for the page. - -\wxheading{Derived from} - -\helpref{wxDC}{wxdc}\\ -\helpref{wxObject}{wxdc} - -\wxheading{See also} - -\helpref{wxDC}{wxdc}, \helpref{Printing framework overview}{printingoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxPrinterDC::wxPrinterDC} - -\func{}{wxPrinterDC}{\param{const wxString\& }{driver}, \param{const wxString\& }{device}, \param{const wxString\& }{output}, - \param{const bool }{interactive = TRUE}, \param{int }{orientation = wxPORTRAIT}} - -Constructor. With empty strings for the first three arguments, the default printer dialog is -displayed. {\it device} indicates the type of printer and {\it output} -is an optional file for printing to. The {\it driver} parameter is -currently unused. Use the {\it Ok} member to test whether the -constructor was successful in creating a useable device context. - -\section{\class{wxPrintout}}\label{wxprintout} - -This class encapsulates the functionality of printing out an -application document. A new class must be derived and members -overridden to respond to calls such as OnPrintPage and HasPage. -Instances of this class are passed to wxPrinter::Print or a -wxPrintPreview object to initiate printing or previewing. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{Printing framework overview}{printingoverview}, \helpref{wxPrinterDC}{wxprinterdc}, \helpref{wxPrintDialog}{wxprintdialog},\rtfsp -\helpref{wxPrinter}{wxprinter}, \helpref{wxPrintPreview}{wxprintpreview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxPrintout::wxPrintout} - -\func{}{wxPrintout}{\param{const wxString\& }{title = "Printout"}} - -Constructor. Pass an optional title argument (currently unused). - -\membersection{wxPrintout::\destruct{wxPrintout}} - -\func{}{\destruct{wxPrintout}}{\void} - -Destructor. - -\membersection{wxPrintout::GetDC}\label{wxprintoutgetdc} - -\func{wxDC *}{GetDC}{\void} - -Returns the device context associated with the printout (given to the printout at start of -printing or previewing). This will be a wxPrinterDC if printing under Windows, -a wxPostScriptDC if printing on other platforms, and a wxMemoryDC if previewing. - -\membersection{wxPrintout::GetPageInfo}\label{wxprintoutgetpageinfo} - -\func{void}{GetPageInfo}{\param{int *}{minPage}, \param{int *}{maxPage}, \param{int *}{pageFrom}, \param{int *}{pageTo}} - -Called by the framework to obtain information from the application about minimum and maximum page values that -the user can select, and the required page range to be printed. By default this -returns 1, 32000 for the page minimum and maximum values, and 1, 1 for the required page range. - -If {\it minPage} is zero, the page number controls in the print dialog will be disabled. - -\membersection{wxPrintout::GetPageSizeMM}\label{wxprintoutgetpagesizemm} - -\func{void}{GetPageSizeMM}{\param{int *}{w}, \param{int *}{h}} - -Returns the size of the printer page in millimetres. - -\membersection{wxPrintout::GetPageSizePixels}\label{wxprintoutgetpagesizepixels} - -\func{void}{GetPageSizePixels}{\param{int *}{w}, \param{int *}{h}} - -Returns the size of the printer page in pixels. These may not be the -same as the values returned from \helpref{wxDC::GetSize}{wxdcgetsize} if -the printout is being used for previewing, since in this case, a -memory device context is used, using a bitmap size reflecting the current -preview zoom. The application must take this discrepancy into account if -previewing is to be supported. - -\membersection{wxPrintout::GetPPIPrinter}\label{wxprintoutgetppiprinter} - -\func{void}{GetPPIPrinter}{\param{int *}{w}, \param{int *}{h}} - -Returns the number of pixels per logical inch of the printer device context. -Dividing the printer PPI by the screen PPI can give a suitable scaling -factor for drawing text onto the printer. Remember to multiply -this by a scaling factor to take the preview DC size into account. - -\membersection{wxPrintout::GetPPIScreen}\label{wxprintoutgetppiscreen} - -\func{void}{GetPPIScreen}{\param{int *}{w}, \param{int *}{h}} - -Returns the number of pixels per logical inch of the screen device context. -Dividing the printer PPI by the screen PPI can give a suitable scaling -factor for drawing text onto the printer. Remember to multiply -this by a scaling factor to take the preview DC size into account. - -\membersection{wxPrintout::HasPage}\label{wxprintouthaspage} - -\func{bool}{HasPage}{\param{int}{ pageNum}} - -Should be overriden to return TRUE if the document has this page, or FALSE -if not. Returning FALSE signifies the end of the document. By default, -HasPage behaves as if the document has only one page. - -\membersection{wxPrintout::IsPreview}\label{wxprintoutispreview} - -\func{bool}{IsPreview}{\void} - -Returns TRUE if the printout is currently being used for previewing. - -\membersection{wxPrintout::OnBeginDocument}\label{wxprintoutonbegindocument} - -\func{bool}{OnBeginDocument}{\param{int}{ startPage}, \param{int}{ endPage}} - -Called by the framework at the start of document printing. Return FALSE from -this function cancels the print job. OnBeginDocument is called once for every -copy printed. - -The base wxPrintout::OnBeginDocument {\it must} be called (and the return value -checked) from within the overriden function, since it calls wxDC::StartDoc. - -\membersection{wxPrintout::OnEndDocument}\label{wxprintoutonenddocument} - -\func{void}{OnEndDocument}{\void} - -Called by the framework at the end of document printing. OnEndDocument -is called once for every copy printed. - -The base wxPrintout::OnEndDocument {\it must} be called -from within the overriden function, since it calls wxDC::EndDoc. - -\membersection{wxPrintout::OnBeginPrinting}\label{wxprintoutonbeginprinting} - -\func{void}{OnBeginPrinting}{\void} - -Called by the framework at the start of printing. OnBeginPrinting is called once for every -print job (regardless of how many copies are being printed). - -\membersection{wxPrintout::OnEndPrinting}\label{wxprintoutonendprinting} - -\func{void}{OnEndPrinting}{\void} - -Called by the framework at the end of printing. OnEndPrinting -is called once for every print job (regardless of how many copies are being printed). - -\membersection{wxPrintout::OnPreparePrinting}\label{wxprintoutonprepareprinting} - -\func{void}{OnPreparePrinting}{\void} - -Called once by the framework before any other demands are made of the -wxPrintout object. This gives the object an opportunity to calculate the -number of pages in the document, for example. - -\membersection{wxPrintout::OnPrintPage}\label{wxprintoutonprintpage} - -\func{bool}{OnPrintPage}{\param{int}{ pageNum}} - -Called by the framework when a page should be printed. Returning FALSE cancels -the print job. The application can use wxPrintout::GetDC to obtain a device -context to draw on. - -\section{\class{wxPrintPreview}}\label{wxprintpreview} - -\overview{Printing framework overview}{printingoverview} - -Objects of this class manage the print preview process. The object is passed -a wxPrintout object, and the wxPrintPreview object itself is passed to -a wxPreviewFrame object. Previewing is started by initializing and showing -the preview frame. Unlike wxPrinter::Print, flow of control returns to the application -immediately after the frame is shown. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\overview{Printing framework overview}{printingoverview}, \helpref{wxPrinterDC}{wxprinterdc}, \helpref{wxPrintDialog}{wxprintdialog},\rtfsp -\helpref{wxPrintout}{wxprintout}, \helpref{wxPrinter}{wxprinter},\rtfsp -\helpref{wxPreviewCanvas}{wxpreviewcanvas}, \helpref{wxPreviewControlBar}{wxpreviewcontrolbar},\rtfsp -\helpref{wxPreviewFrame}{wxpreviewframe}. - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxPrintPreview::wxPrintPreview} - -\func{}{wxPrintPreview}{\param{wxPrintout* }{printout}, \param{wxPrintout* }{printoutForPrinting}, -\param{wxPrintData* }{data=NULL}} - -Constructor. Pass a printout object, an optional printout object to be -used for actual printing, and the address of an optional -block of printer data, which will be copied to the print preview object's -print data. - -If {\it printoutForPrinting} is non-NULL, a {\bf Print...} button will be placed on the -preview frame so that the user can print directly from the preview interface. - -Do not explicitly delete the printout objects once this destructor has been -called, since they will be deleted in the wxPrintPreview constructor. -The same does not apply to the {\it data} argument. - -Test the Ok member to check whether the wxPrintPreview object was created correctly. -Ok could return FALSE if there was a problem initializing the printer device context -(current printer not set, for example). - -\membersection{wxPrintPreview::\destruct{wxPrintPreview}} - -\func{}{\destruct{wxPrinter}}{\void} - -Destructor. Deletes both print preview objects, so do not destroy these objects -in your application. - -\membersection{wxPrintPreview::DrawBlankPage}\label{wxprintpreviewdrawblankpage} - -\func{bool}{DrawBlankPage}{\param{wxWindow* }{window}} - -Draws a representation of the blank page into the preview window. Used -internally. - -\membersection{wxPrintPreview::GetCanvas}\label{wxprintpreviewgetcanvas} - -\func{wxWindow* }{GetCanvas}{\void} - -Gets the preview window used for displaying the print preview image. - -\membersection{wxPrintPreview::GetCurrentPage}\label{wxprintpreviewgetcurrentpage} - -\func{int}{GetCurrentPage}{\void} - -Gets the page currently being previewed. - -\membersection{wxPrintPreview::GetFrame}\label{wxprintpreviewgetframe} - -\func{wxFrame *}{GetFrame}{\void} - -Gets the frame used for displaying the print preview canvas -and control bar. - -\membersection{wxPrintPreview::GetMaxPage}\label{wxprintpreviewgetmaxpage} - -\func{int}{GetMaxPage}{\void} - -Returns the maximum page number. - -\membersection{wxPrintPreview::GetMinPage}\label{wxprintpreviewgetminpage} - -\func{int}{GetMinPage}{\void} - -Returns the minimum page number. - -\membersection{wxPrintPreview::GetPrintData}\label{wxprintpreviewgetprintdata} - -\func{wxPrintData\&}{GetPrintData}{\void} - -Returns a reference to the internal print data. - -\membersection{wxPrintPreview::GetPrintout}\label{wxprintpreviewgetprintout} - -\func{wxPrintout *}{GetPrintout}{\void} - -Gets the preview printout object associated with the wxPrintPreview object. - -\membersection{wxPrintPreview::GetPrintoutForPrinting}\label{wxprintpreviewgetprintoutforprinting} - -\func{wxPrintout *}{GetPrintoutForPrinting}{\void} - -Gets the printout object to be used for printing from within the preview interface, -or NULL if none exists. - -\membersection{wxPrintPreview::Ok}\label{wxprintpreviewok} - -\func{bool}{Ok}{\void} - -Returns TRUE if the wxPrintPreview is valid, FALSE otherwise. It could return FALSE if there was a -problem initializing the printer device context (current printer not set, for example). - -\membersection{wxPrintPreview::PaintPage}\label{wxprintpreviewpaintpage} - -\func{bool}{PaintPage}{\param{wxWindow* }{window}} - -This refreshes the preview window with the preview image. -It must be called from the preview window's OnPaint member. - -The implementation simply blits the preview bitmap onto -the canvas, creating a new preview bitmap if none exists. - -\membersection{wxPrintPreview::Print}\label{wxprintpreviewprint} - -\func{bool}{Print}{\param{bool }{prompt}} - -Invokes the print process using the second wxPrintout object -supplied in the wxPrintPreview constructor. -Will normally be called by the {\bf Print...} panel item on the -preview frame's control bar. - -\membersection{wxPrintPreview::RenderPage}\label{wxprintpreviewrenderpage} - -\func{bool}{RenderPage}{\param{int }{pageNum}} - -Renders a page into a wxMemoryDC. Used internally by wxPrintPreview. - -\membersection{wxPrintPreview::SetCanvas}\label{wxprintpreviewsetcanvas} - -\func{void}{SetCanvas}{\param{wxWindow* }{window}} - -Sets the window to be used for displaying the print preview image. - -\membersection{wxPrintPreview::SetCurrentPage}\label{wxprintpreviewsetcurrentpage} - -\func{void}{SetCurrentPage}{\param{int}{ pageNum}} - -Sets the current page to be previewed. - -\membersection{wxPrintPreview::SetFrame}\label{wxprintpreviewsetframe} - -\func{void}{SetFrame}{\param{wxFrame *}{frame}} - -Sets the frame to be used for displaying the print preview canvas -and control bar. - -\membersection{wxPrintPreview::SetPrintout}\label{wxprintpreviewsetprintout} - -\func{void}{SetPrintout}{\param{wxPrintout *}{printout}} - -Associates a printout object with the wxPrintPreview object. - -\membersection{wxPrintPreview::SetZoom}\label{wxprintpreviewsetzoom} - -\func{void}{SetZoom}{\param{int}{ percent}} - -Sets the percentage preview zoom, and refreshes the preview canvas -accordingly. - - diff --git a/docs/latex/wx/process.tex b/docs/latex/wx/process.tex deleted file mode 100644 index 160d34e1b2..0000000000 --- a/docs/latex/wx/process.tex +++ /dev/null @@ -1,39 +0,0 @@ -\section{\class{wxProcess}}\label{wxprocess} - -This class contains a method which is invoked when a process finishes. -It can raise a \helpref{wxProcessEvent}{wxprocessevent} if wxProcess::OnTerminate -isn't overriden. - -\wxheading{Derived from} - -\helpref{wxEvtHandler}{wxevthandler} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxProcess::wxProcess}\label{wxprocessconstr} - -\func{}{wxProcess}{\param{wxEvtHandler *}{ parent = NULL}, \param{int}{ id = -1}} - -Constructs a process object. {\it id} is only used in the case you want to -use wxWindows events. - -\wxheading{Parameters} - -\docparam{parent}{The event handler parent.} - -\docparam{id}{id of an event.} - -\membersection{wxProcess::\destruct{wxProcess}} - -\func{}{\destruct{wxProcess}}{\void} - -Destroys the wxProcess object. - -\membersection{wxProcess::OnTerminate}\label{wxprocessonterminate} - -\constfunc{void}{OnTerminate}{\param{int}{ pid}} - -It is called when the process with the pid {\it pid} finishes. -It raises a wxWindows event when it isn't overriden. - -\docparam{pid}{The pid of the process which ends.} diff --git a/docs/latex/wx/psbox.tex b/docs/latex/wx/psbox.tex deleted file mode 100644 index b7438f4f29..0000000000 --- a/docs/latex/wx/psbox.tex +++ /dev/null @@ -1,520 +0,0 @@ -% -% %%%%%%% %%%%% %%%%%% %%%%% % % -% % % % % % % % % % -% % % % % % % % % % -% %%%%%%% %%%%% %%%%%% % % % -% % % % % % % % % -% % % % % % % % % -% % %%%%%% %%%%%% %%%%% % % -% -% By Jean Orloff -% Comments & suggestions by e-mail: ORLOFF@surya11.cern.ch -% No modification of this file allowed if not e-sent to me. -% -% A simple way to measure the size of encapsulated postscript figures -% from inside TeX, and to use it for automatically formatting texts -% with inserted figures. Works both under Plain TeX-based macros -% (Phyzzx, Harvmac, Psizzl, ...) and LaTeX environment. -% Provides exactly the same result on any PostScript printer provided -% the single instruction \psfor... is changed to fit the needs of the -% particular dvi->ps translator used. -% History: -% 1.31: adds \psforDVIALW(?) -% 1.30: adds \splitfile & \joinfiles for multi-file management -% 1.24: fix error handling & add \psonlyboxes -% 1.23: adds \putsp@ce for OzTeX fix -% 1.22: makes \drawingBox \global for use in Phyzzx -% 1.21: accepts %%BoundingBox: (atend) -% 1.20: tries to add \psfordvitps for the TeXPS package. -% 1.10: adds \psforoztex, error handling... -%2345678 1 2345678 2 2345678 3 2345678 4 2345678 5 2345678 6 2345678 7 23456789 -% -\def\temp{1.31} -\let\tempp=\relax -\expandafter\ifx\csname psboxversion\endcsname\relax - \message{version: \temp} -\else - \ifdim\temp cm>\psboxversion cm - \message{version: \temp} - \else - \message{psbox(\psboxversion) is already loaded: I won't load - psbox(\temp)!} - \let\temp=\psboxversion - \let\tempp=\endinput - \fi -\fi -\tempp -\let\psboxversion=\temp -\catcode`\@=11 -% Every macro likes a little privacy... -% -% Some common defs -% -\def\execute#1{#1}% NOT stupid: cs in #1 are then identified BEFORE execution -\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex -\def\executeinspecs#1{% -\execute{\begingroup\let\do\psm@keother\dospecials\catcode`\^^M=9#1\endgroup}} -% -%Trying to tame the variety of \special commands for Postscript: the -% universal internal command \PSspeci@l##1##2 takes ##1 to be the -% filename and ##2 to be the integer scale factor*1000 (as for usual -% TeX \scale commands) -% -\def\psfortextures{% For TeXtures on the Macintosh -%----------------- -\def\PSspeci@l##1##2{% -\special{illustration ##1\space scaled ##2}% -}} -% -\def\psfordvitops{% For the DVItoPS converter on IBM mainframes -%---------------- -\def\PSspeci@l##1##2{% -\special{dvitops: import ##1\space \the\drawingwd \the\drawinght}% -}} -% -\def\psfordvips{% For DVIPS converter on VAX, UNIX and PC's -%-------------- -\def\PSspeci@l##1##2{% -% \special{/@scaleunit 1000 def}% never read dox without trying! -\d@my=0.1bp \d@mx=\drawingwd \divide\d@mx by\d@my% -\special{PSfile=##1\space llx=\psllx\space lly=\pslly\space% -urx=\psurx\space ury=\psury\space rwi=\number\d@mx}% -}} -% -\def\psforoztex{% For the OzTeX shareware on the Macintosh -%-------------- -\def\PSspeci@l##1##2{% -\special{##1 \space - ##2 1000 div dup scale - \putsp@ce{\number-\psllx} \putsp@ce{\number-\pslly} translate -}% -}} -\def\putsp@ce#1{#1 } -% -\def\psfordvitps{% From the UNIX TeXPS package, vers.>3.12 -%--------------- -% Convert a dimension into the number \psn@sp (in scaled points) -\def\psdimt@n@sp##1{\d@mx=##1\relax\edef\psn@sp{\number\d@mx}} -\def\PSspeci@l##1##2{% -% psfig.psr contains the def of "startTexFig": if you can locate it -% and include the correct pathname, it should work -\special{dvitps: Include0 "psfig.psr"}% contains def of "startTexFig" -\psdimt@n@sp{\drawingwd} -\special{dvitps: Literal "\psn@sp\space"} -\psdimt@n@sp{\drawinght} -\special{dvitps: Literal "\psn@sp\space"} -\psdimt@n@sp{\psllx bp} -\special{dvitps: Literal "\psn@sp\space"} -\psdimt@n@sp{\pslly bp} -\special{dvitps: Literal "\psn@sp\space"} -\psdimt@n@sp{\psurx bp} -\special{dvitps: Literal "\psn@sp\space"} -\psdimt@n@sp{\psury bp} -\special{dvitps: Literal "\psn@sp\space startTexFig\space"} -\special{dvitps: Include1 "##1"} -\special{dvitps: Literal "endTexFig\space"} -}} -\def\psforDVIALW{% Try for dvialw, a UNIX public domain -%--------------- -\def\PSspeci@l##1##2{ -\special{language "PS" -literal "##2 1000 div dup scale" -include "##1"}}} -\def\psonlyboxes{% Draft-like behaviour if none of the others works -%--------------- -\def\PSspeci@l##1##2{% -\at(0cm;0cm){\boxit{\vbox to\drawinght - {\vss - \hbox to\drawingwd{\at(0cm;0cm){\hbox{(##1)}}\hss} - }}} -}% -} -% -\def\psloc@lerr#1{% -\let\savedPSspeci@l=\PSspeci@l% -\def\PSspeci@l##1##2{% -\at(0cm;0cm){\boxit{\vbox to\drawinght - {\vss - \hbox to\drawingwd{\at(0cm;0cm){\hbox{(##1) #1}}\hss} - }}} -\let\PSspeci@l=\savedPSspeci@l% restore normal output for other figs! -}% -} -% -%\def\psfor... add your own! -% -% \ReadPSize{PSfilename} reads the dimensions of a PostScript drawing -% and stores it in \drawinght(wd) -\newread\pst@mpin -\newdimen\drawinght\newdimen\drawingwd -\newdimen\psxoffset\newdimen\psyoffset -\newbox\drawingBox -\newif\ifNotB@undingBox -\newhelp\PShelp{Proceed: you'll have a 5cm square blank box instead of -your graphics (Jean Orloff).} -\def\@mpty{} -\def\s@tsize#1 #2 #3 #4\@ndsize{ - \def\psllx{#1}\def\pslly{#2}% - \def\psurx{#3}\def\psury{#4}% needed by a crazyness of dvips! - \ifx\psurx\@mpty\NotB@undingBoxtrue% this is not a valid one! - \else - \drawinght=#4bp\advance\drawinght by-#2bp - \drawingwd=#3bp\advance\drawingwd by-#1bp -% !Units related by crazy factors as bp/pt=72.27/72 should be BANNED! - \fi - } -\def\sc@nline#1:#2\@ndline{\edef\p@rameter{#1}\edef\v@lue{#2}} -\def\g@bblefirstblank#1#2:{\ifx#1 \else#1\fi#2} -\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex -\def\execute#1{#1}% Seems stupid, but cs are identified BEFORE execution -{\catcode`\%=12 -\xdef\B@undingBox{%%BoundingBox} -} %% is not a true comment in PostScript, even if % is! -\def\ReadPSize#1{ - \edef\PSfilename{#1} - \openin\pst@mpin=#1\relax - \ifeof\pst@mpin \errhelp=\PShelp - \errmessage{I haven't found your postscript file (\PSfilename)} - \psloc@lerr{was not found} - \s@tsize 0 0 142 142\@ndsize - \closein\pst@mpin - \else - \immediate\write\psbj@inaux{#1,} - \loop - \executeinspecs{\catcode`\ =10\global\read\pst@mpin to\n@xtline} - \ifeof\pst@mpin - \errhelp=\PShelp - \errmessage{(\PSfilename) is not an Encapsulated PostScript File: - I could not find any \B@undingBox: line.} - \edef\v@lue{0 0 142 142:} - \psloc@lerr{is not an EPSFile} - \NotB@undingBoxfalse - \else - \expandafter\sc@nline\n@xtline:\@ndline - \ifx\p@rameter\B@undingBox\NotB@undingBoxfalse - \edef\t@mp{% - \expandafter\g@bblefirstblank\v@lue\space\space\space} - \expandafter\s@tsize\t@mp\@ndsize - \else\NotB@undingBoxtrue - \fi - \fi - \ifNotB@undingBox\repeat - \closein\pst@mpin - \fi -\message{#1} -} -% -% \psboxto(xdim;ydim){psfilename}: you specify the dimensions and -% TeX uniformly scales to fit the largest one. If xdim=0pt, the -% scale is fully determined by ydim and vice versa. -% Notice: psboxes are a real vboxes; couldn't take hbox otherwise all -% indentation and all cr's would be interpreted as spaces (hugh!). -% -\newcount\xscale \newcount\yscale \newdimen\pscm\pscm=1cm -\newdimen\d@mx \newdimen\d@my -\let\ps@nnotation=\relax -\def\psboxto(#1;#2)#3{\vbox{ - \ReadPSize{#3} - \divide\drawingwd by 1000 - \divide\drawinght by 1000 - \d@mx=#1 - \ifdim\d@mx=0pt\xscale=1000 - \else \xscale=\d@mx \divide \xscale by \drawingwd\fi - \d@my=#2 - \ifdim\d@my=0pt\yscale=1000 - \else \yscale=\d@my \divide \yscale by \drawinght\fi - \ifnum\yscale=1000 - \else\ifnum\xscale=1000\xscale=\yscale - \else\ifnum\yscale<\xscale\xscale=\yscale\fi - \fi - \fi - \divide \psxoffset by 1000\multiply\psxoffset by \xscale - \divide \psyoffset by 1000\multiply\psyoffset by \xscale - \global\divide\pscm by 1000 - \global\multiply\pscm by\xscale - \multiply\drawingwd by\xscale \multiply\drawinght by\xscale - \ifdim\d@mx=0pt\d@mx=\drawingwd\fi - \ifdim\d@my=0pt\d@my=\drawinght\fi - \message{scaled \the\xscale} - \hbox to\d@mx{\hss\vbox to\d@my{\vss - \global\setbox\drawingBox=\hbox to 0pt{\kern\psxoffset\vbox to 0pt{ - \kern-\psyoffset - \PSspeci@l{\PSfilename}{\the\xscale} - \vss}\hss\ps@nnotation} - \global\ht\drawingBox=\the\drawinght - \global\wd\drawingBox=\the\drawingwd - \baselineskip=0pt - \copy\drawingBox - \vss}\hss} - \global\psxoffset=0pt - \global\psyoffset=0pt% These are local to one figure - \global\pscm=1cm - \global\drawingwd=\drawingwd - \global\drawinght=\drawinght -}} -% -% \psboxscaled{scalefactor*1000}{PSfilename} allows to bypass the -% rounding errors of TeX integer divisions for situations where the -% TeX box should fit the original BoundingBox with a precision better -% than 1/1000. -% -\def\psboxscaled#1#2{\vbox{ - \ReadPSize{#2} - \xscale=#1 - \message{scaled \the\xscale} - \divide\drawingwd by 1000\multiply\drawingwd by\xscale - \divide\drawinght by 1000\multiply\drawinght by\xscale - \divide \psxoffset by 1000\multiply\psxoffset by \xscale - \divide \psyoffset by 1000\multiply\psyoffset by \xscale - \global\divide\pscm by 1000 - \global\multiply\pscm by\xscale - \global\setbox\drawingBox=\hbox to 0pt{\kern\psxoffset\vbox to 0pt{ - \kern-\psyoffset - \PSspeci@l{\PSfilename}{\the\xscale} - \vss}\hss\ps@nnotation} - \global\ht\drawingBox=\the\drawinght - \global\wd\drawingBox=\the\drawingwd - \baselineskip=0pt - \copy\drawingBox - \global\psxoffset=0pt - \global\psyoffset=0pt% These are local to one figure - \global\pscm=1cm - \global\drawingwd=\drawingwd - \global\drawinght=\drawinght -}} -% -% \psbox{PSfilename} makes a TeX box having the minimal size to -% enclose the picture -\def\psbox#1{\psboxscaled{1000}{#1}} -% -% -% \joinfiles file1, file2, ...n \into joinedfilename . -% makes one file out of many -% \splitfile joinedfilename -% the opposite -% -%\def\execute#1{#1}% NOT stupid: cs in #1 are then identified BEFORE execution -%\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex -%\def\executeinspecs#1{% -%\execute{\begingroup\let\do\psm@keother\dospecials\catcode`\^^M=9#1\endgroup}} -%\newread\pst@mpin -\newif\ifn@teof\n@teoftrue -\newif\ifc@ntrolline -\newif\ifmatch -\newread\j@insplitin -\newwrite\j@insplitout -\newwrite\psbj@inaux -\immediate\openout\psbj@inaux=psbjoin.aux -\immediate\write\psbj@inaux{\string\joinfiles} -\immediate\write\psbj@inaux{\jobname,} -% -% We redefine input to keep track of the various files inputted -% -\immediate\let\oldinput=\input -\def\input#1 { - \immediate\write\psbj@inaux{#1,} - \oldinput #1 } -\def\empty{} -\def\setmatchif#1\contains#2{ - \def\match##1#2##2\endmatch{ - \def\tmp{##2} - \ifx\empty\tmp - \matchfalse - \else - \matchtrue - \fi} - \match#1#2\endmatch} -\def\warnopenout#1#2{ - \setmatchif{TrashMe,psbjoin.aux,psbjoin.all}\contains{#2} - \ifmatch - \else - \immediate\openin\pst@mpin=#2 - \ifeof\pst@mpin - \else - \errhelp{If the content of this file is so precious to you, abort (ie -press x or e) and rename it before retrying.} - \errmessage{I'm just about to replace your file named #2} - \fi - \immediate\closein\pst@mpin - \fi - \message{#2} - \immediate\openout#1=#2} -% No comments allowed below: % will have an unusual catcode -{ -\catcode`\%=12 -\gdef\splitfile#1 { - \immediate\openin\j@insplitin=#1 - \message{Splitting file #1 into:} - \warnopenout\j@insplitout{TrashMe} - \loop - \ifeof - \j@insplitin\immediate\closein\j@insplitin\n@teoffalse - \else - \n@teoftrue - \executeinspecs{\global\read\j@insplitin to\spl@tinline\expandafter - \ch@ckbeginnewfile\spl@tinline%Beginning-Of-File-Named:%\endcheck} - \ifc@ntrolline - \else - \toks0=\expandafter{\spl@tinline} - \immediate\write\j@insplitout{\the\toks0} - \fi - \fi - \ifn@teof\repeat - \immediate\closeout\j@insplitout} -\gdef\ch@ckbeginnewfile#1%Beginning-Of-File-Named:#2%#3\endcheck{ - \def\t@mp{#1} - \ifx\empty\t@mp - \def\t@mp{#3} - \ifx\empty\t@mp - \global\c@ntrollinefalse - \else - \immediate\closeout\j@insplitout - \warnopenout\j@insplitout{#2} - \global\c@ntrollinetrue - \fi - \else - \global\c@ntrollinefalse - \fi} -\gdef\joinfiles#1\into#2 { - \message{Joining following files into} - \warnopenout\j@insplitout{#2} - \message{:} - { - \edef\w@##1{\immediate\write\j@insplitout{##1}} - \w@{% This text was produced with psbox's \string\joinfiles.} - \w@{% To decompose and tex it:} - \w@{%-save this with a filename CONTAINING ONLY LETTERS, and no extensions} - \w@{% (say, JOINTFIL), in some uncrowded directory;} - \w@{%-make sure you can \string\input\space psbox.tex (version>=1.3);} - \w@{%-tex JOINTFIL using Plain, or LaTeX, or whatever is needed by} - \w@{% the first part in the joining (after splitting JOINTFIL into} - \w@{% it's constituents, TeX will try to process it as it stands).} - \w@{\string\input\space psbox.tex} - \w@{\string\splitfile{\string\jobname}} - } - \tre@tfilelist#1, \endtre@t - \immediate\closeout\j@insplitout} -\gdef\tre@tfilelist#1, #2\endtre@t{ - \def\t@mp{#1} - \ifx\empty\t@mp - \else - \llj@in{#1} - \tre@tfilelist#2, \endtre@t - \fi} -\gdef\llj@in#1{ - \immediate\openin\j@insplitin=#1 - \ifeof\j@insplitin - \errmessage{I couldn't find file #1.} - \else - \message{#1} - \toks0={%Beginning-Of-File-Named:#1} - \immediate\write\j@insplitout{\the\toks0} - \executeinspecs{\global\read\j@insplitin to\oldj@ininline} - \loop - \ifeof\j@insplitin\immediate\closein\j@insplitin\n@teoffalse - \else\n@teoftrue - \executeinspecs{\global\read\j@insplitin to\j@ininline} - \toks0=\expandafter{\oldj@ininline} - \let\oldj@ininline=\j@ininline - \immediate\write\j@insplitout{\the\toks0} - \fi - \ifn@teof - \repeat - \immediate\closein\j@insplitin - \fi} -} -% To be put at the end of a file, for making an tar-like file containing -% everything it used. -\def\autojoin{ - \immediate\write\psbj@inaux{\string\into\space psbjoin.all} - \immediate\closeout\psbj@inaux - \input psbjoin.aux -} -% -% Annotations & Captions etc... -% -% -% \centinsert{anybox} is just a centered \midinsert, but is included as -% people barely use the original inserts from TeX. -% -\def\centinsert#1{\midinsert\line{\hss#1\hss}\endinsert} -\def\psannotate#1#2{\def\ps@nnotation{#2\global\let\ps@nnotation=\relax}#1} -\def\pscaption#1#2{\vbox{ - \setbox\drawingBox=#1 - \copy\drawingBox - \vskip\baselineskip - \vbox{\hsize=\wd\drawingBox\setbox0=\hbox{#2} - \ifdim\wd0>\hsize - \noindent\unhbox0\tolerance=5000 - \else\centerline{\box0} - \fi -}}} -% for compatibility with older versions -\def\psfig#1#2#3{\pscaption{\psannotate{#1}{#2}}{#3}} -\def\psfigurebox#1#2#3{\pscaption{\psannotate{\psbox{#1}}{#2}}{#3}} -% -% \at(#1;#2)#3 puts #3 at #1-higher and #2-right of the current -% position without moving it (to be used in annotations). -\def\at(#1;#2)#3{\setbox0=\hbox{#3}\ht0=0pt\dp0=0pt - \rlap{\kern#1\vbox to0pt{\kern-#2\box0\vss}}} -% -% \gridfill(ht;wd) makes a 1cm*1cm grid of ht by wd whose lower-left -% corner is the current point -\newdimen\gridht \newdimen\gridwd -\def\gridfill(#1;#2){ - \setbox0=\hbox to 1\pscm - {\vrule height1\pscm width.4pt\leaders\hrule\hfill} - \gridht=#1 - \divide\gridht by \ht0 - \multiply\gridht by \ht0 - \gridwd=#2 - \divide\gridwd by \wd0 - \multiply\gridwd by \wd0 - \advance \gridwd by \wd0 - \vbox to \gridht{\leaders\hbox to\gridwd{\leaders\box0\hfill}\vfill}} -% -% Useful to measure where to put annotations -\def\fillinggrid{\at(0cm;0cm){\vbox{ - \gridfill(\drawinght;\drawingwd)}}} -% -% \textleftof\anybox: Sample text\endtext -% inserts "Sample text" on the left of \anybox ie \vbox, \psbox. -% \textrightof is the symmetric (not documented, too uggly) -% Welcome any suggestion about clean wraparound macros from -% TeXhackers reading this -% -\def\textleftof#1:{ - \setbox1=#1 - \setbox0=\vbox\bgroup - \advance\hsize by -\wd1 \advance\hsize by -2em} -\def\textrightof#1:{ - \setbox0=#1 - \setbox1=\vbox\bgroup - \advance\hsize by -\wd0 \advance\hsize by -2em} -\def\endtext{ - \egroup - \hbox to \hsize{\valign{\vfil##\vfil\cr% -\box0\cr% -\noalign{\hss}\box1\cr}}} -% -% \frameit{\thick}{\skip}{\anybox} -% draws with thickness \thick a box around \anybox, leaving \skip of -% blank around it. eg \frameit{0.5pt}{1pt}{\hbox{hello}} -% \boxit{\anybox} is a shortcut. -\def\frameit#1#2#3{\hbox{\vrule width#1\vbox{ - \hrule height#1\vskip#2\hbox{\hskip#2\vbox{#3}\hskip#2}% - \vskip#2\hrule height#1}\vrule width#1}} -\def\boxit#1{\frameit{0.4pt}{0pt}{#1}} -% -% -\catcode`\@=12 % cs containing @ are unreachable -% -% CUSTOMIZE YOUR DEFAULT DRIVER: -% Uncomment the line corresponding to your TeX system: -%\psfortextures% For TeXtures on the Macintosh -%\psforoztex % For OzTeX shareware on the Macintosh -%\psfordvitops % For the DVItoPS converter for TeX on IBM mainframes - \psfordvips % For DVIPS converter on VAX and UNIX -%\psfordvitps % For dvitps from TeXPS package under UNIX -%\psforDVIALW % For DVIALW, UNIX public domain -%\psonlyboxes % Blank Boxes (when all else fails). diff --git a/docs/latex/wx/query.tex b/docs/latex/wx/query.tex deleted file mode 100644 index 02988522f4..0000000000 --- a/docs/latex/wx/query.tex +++ /dev/null @@ -1,206 +0,0 @@ -\section{\class{wxQueryCol}}\label{wxquerycol} - -Every ODBC data column is represented by an instance of this class. - -\wxheading{Derivation} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\overview{wxQueryCol overview}{wxquerycoloverview}, \overview{wxDatabase overview}{wxdatabaseoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxQueryCol::wxQueryCol} - -\func{void}{wxQueryCol}{\void} - -Constructor. Sets the attributes of the column to default values. - -\membersection{wxQueryCol::\destruct{wxQueryCol}} - -\func{void}{\destruct{wxQueryCol}}{\void} - -Destructor. Deletes the wxQueryField list. - -\membersection{wxQueryCol::BindVar} - -\func{void *}{BindVar}{\param{void *}{v}, \param{long}{ sz}} - -Binds a user-defined variable to a column. Whenever a column is bound to a -variable, it will automatically copy the data of the current field into this -buffer (to a maximum of {\it sz} bytes). - -\membersection{wxQueryCol::FillVar} - -\func{void}{FillVar}{\param{int}{ recnum}} - -Fills the bound variable with the data of the field recnum. When no variable -is bound to the column nothing will happen. - -\membersection{wxQueryCol::GetData} - -\func{void *}{GetData}{\param{int}{ field}} - -Returns a pointer to the data of the field. - -\membersection{wxQueryCol::GetName} - -\func{wxString}{GetName}{\void} - -Returns the name of a column. - -\membersection{wxQueryCol::GetType} - -\func{short}{GetType}{\void} - -Returns the data type of a column. - -\membersection{wxQueryCol::GetSize} - -\func{long}{GetSize}{\param{int}{ field}} - -Return the size of the data of the field field. - -\membersection{wxQueryCol::IsRowDirty} - -\func{bool}{IsRowDirty}{\param{int}{ field}} - -Returns TRUE if the given field has been changed, but not saved. - -\membersection{wxQueryCol::IsNullable} - -\func{bool}{IsNullable}{\void} - -Returns TRUE if a column may contain no data. - -\membersection{wxQueryCol::AppendField} - -\func{void}{AppendField}{\param{void *}{buf}, \param{long}{ len}} - -Appends a wxQueryField instance to the field list of the column. {\it len} bytes from\rtfsp -{\it buf} will be copied into the field's buffer. - -\membersection{wxQueryCol::SetData} - -\func{bool}{SetData}{\param{int}{ field}, \param{void *}{buf}, \param{long}{ len}} - -Sets the data of a field. This function finds the wxQueryField corresponding to\rtfsp -{\it field} and calls wxQueryField::SetData with {\it buf} and {\it len} arguments. - -\membersection{wxQueryCol::SetName} - -\func{void}{SetName}{\param{const wxString\& }{name}} - -Sets the name of a column. Only useful when creating new tables or -appending columns. - -\membersection{wxQueryCol::SetNullable} - -\func{void}{SetNullable}{\param{bool}{ nullable}} - -Determines whether a column may contain no data. Only useful when creating new tables or -appending columns. - -\membersection{wxQueryCol::SetFieldDirty} - -\func{void}{SetFieldDirty}{\param{int}{ field}, \param{bool }{dirty = TRUE}} - -Sets the dirty tag of a given field. - -\membersection{wxQueryCol::SetType} - -\func{void}{SetType}{\param{short}{ type}} - -Sets the data type of a column. Only useful when creating new tables or -appending columns. - -\section{\class{wxQueryField}}\label{wxqueryfield} - -Represents the data item for one or several columns. - -\wxheading{Derivation} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\overview{wxQueryField overview}{wxqueryfieldoverview}, \overview{wxDatabase overview}{wxdatabaseoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxQueryField::wxQueryField} - -\func{}{wxQueryField}{\void} - -Constructor. Sets type and size of the field to default values. - -\membersection{wxQueryField::\destruct{wxQueryField}} - -\func{}{\destruct{wxQueryField}}{\void} - -Destructor. Frees the associated memory depending on the field type. - -\membersection{wxQueryField::AllocData} - -\func{bool}{AllocData}{\void} - -Allocates memory depending on the size and type of the field. - -\membersection{wxQueryField::ClearData} - -\func{void}{ClearData}{\void} - -Deletes the contents of the field buffer without deallocating the memory. - -\membersection{wxQueryField::GetData} - -\func{void *}{GetData}{\void} - -Returns a pointer to the field buffer. - -\membersection{wxQueryField::GetSize} - -\func{long}{GetSize}{\void} - -Returns the size of the field buffer. - -\membersection{wxQueryField::GetType} - -\func{short}{GetType}{\void} - -Returns the type of the field (currently SQL\_CHAR, SQL\_VARCHAR or SQL\_INTEGER). - -\membersection{wxQueryField::IsDirty} - -\func{bool}{IsDirty}{\void} - -Returns TRUE if the data of a field has been changed, but not saved. - -\membersection{wxQueryField::SetData} - -\func{bool}{SetData}{\param{void *}{data}, \param{long}{ sz}} - -Allocates memory of the size {\it sz} and copies the contents of {\it d} into the -field buffer. - -\membersection{wxQueryField::SetDirty} - -\func{void}{SetDirty}{\param{bool}{ dirty = TRUE}} - -Sets the dirty tag of a field. - -\membersection{wxQueryField::SetSize} - -\func{void}{SetSize}{\param{long}{ size}} - -Resizes the field buffer. Stored data will be lost. - -\membersection{wxQueryField::SetType} - -\func{void}{SetType}{\param{short }{type}} - -Sets the type of the field. Currently the types SQL\_CHAR, SQL\_VARCHAR and -SQL\_INTEGER are supported. - diff --git a/docs/latex/wx/radiobox.tex b/docs/latex/wx/radiobox.tex deleted file mode 100644 index c679667354..0000000000 --- a/docs/latex/wx/radiobox.tex +++ /dev/null @@ -1,226 +0,0 @@ -\section{\class{wxRadioBox}}\label{wxradiobox} - -A radio box item is used to select one of number of mutually exclusive -choices. It is displayed as a vertical column or horizontal row of -labelled buttons. - -\wxheading{Derived from} - -\helpref{wxControl}{wxcontrol}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxRA\_HORIZONTAL}}{Lays the radiobox out in rows.} -\twocolitem{\windowstyle{wxRA\_VERTICAL}}{Lays the radiobox out in columns.} -\end{twocollist} - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Event handling} - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_RADIOBOX(id, func)}}{Process a wxEVT\_COMMAND\_RADIOBOX\_SELECTED event, -when a radiobutton is clicked.} -\end{twocollist} - -\wxheading{See also} - -\helpref{Event handling overview}{eventhandlingoverview}, \helpref{wxRadioButton}{wxradiobutton},\rtfsp -\helpref{wxCheckBox}{wxcheckbox} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxRadioBox::wxRadioBox}\label{wxradioboxconstr} - -\func{}{wxRadioBox}{\void} - -Default constructor. - -\func{}{wxRadioBox}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxString\& }{label},\rtfsp -\param{const wxPoint\& }{point = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{int}{ n = 0}, \param{const wxString}{ choices[] = NULL},\rtfsp -\param{int}{ majorDimension = 0}, \param{long}{ style = wxRA\_HORIZONTAL},\rtfsp -\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp -\param{const wxString\& }{name = ``radioBox"}} - -Constructor, creating and showing a radiobox. - -\wxheading{Parameters} - -\docparam{parent}{Parent window. Must not be NULL.} - -\docparam{id}{Window identifier. A value of -1 indicates a default value.} - -\docparam{label}{Label for the static box surrounding the radio buttons.} - -\docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.} - -\docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.} - -\docparam{n}{Number of choices with which to initialize the radiobox.} - -\docparam{choices}{An array of choices with which to initialize the radiobox.} - -\docparam{majorDimension}{Specifies the number of rows (if style is wxRA\_VERTICAL) or columns (if style is wxRA\_HORIZONTAL) for a two-dimensional -radiobox.} - -\docparam{style}{Window style. See \helpref{wxRadioBox}{wxradiobox}.} - -\docparam{validator}{Window validator.} - -\docparam{name}{Window name.} - -\wxheading{See also} - -\helpref{wxRadioBox::Create}{wxradioboxcreate}, \helpref{wxValidator}{wxvalidator} - -\membersection{wxRadioBox::\destruct{wxRadioBox}} - -\func{}{\destruct{wxRadioBox}}{\void} - -Destructor, destroying the radiobox item. - -\membersection{wxRadioBox::Create}\label{wxradioboxcreate} - -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxString\& }{label},\rtfsp -\param{const wxPoint\& }{point = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{int}{ n = 0}, \param{const wxString}{ choices[] = NULL},\rtfsp -\param{int}{ majorDimension = 0}, \param{long}{ style = wxRA\_HORIZONTAL},\rtfsp -\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp -\param{const wxString\& }{name = ``radioBox"}} - -Creates the radiobox for two-step construction. See \helpref{wxRadioBox::wxRadioBox}{wxradioboxconstr}\rtfsp -for further details. - -\membersection{wxRadioBox::Enable}\label{wxradioboxenable} - -\func{void}{Enable}{\param{const bool}{ enable}} - -Enables or disables the entire radiobox. - -\func{void}{Enable}{\param{int}{ n}, \param{const bool}{ enable}} - -Enables or disables an individual button in the radiobox. - -\wxheading{Parameters} - -\docparam{enable}{TRUE to enable, FALSE to disable.} - -\docparam{n}{The zero-based button to enable or disable.} - -\membersection{wxRadioBox::FindString}\label{wxradioboxfindstring} - -\constfunc{int}{FindString}{\param{const wxString\& }{string}} - -Finds a button matching the given string, returning the position if found, or --1 if not found. - -\wxheading{Parameters} - -\docparam{string}{The string to find.} - -\membersection{wxRadioBox::GetLabel}\label{wxradioboxgetlabel} - -\constfunc{wxString}{GetLabel}{\void} - -Returns the radiobox label. - -\constfunc{wxString}{GetLabel}{\param{int }{n}} - -Returns the label for the given button. - -\wxheading{Parameters} - -\docparam{n}{The zero-based button index.} - -\wxheading{See also} - -\helpref{wxRadioBox::SetLabel}{wxradioboxsetlabel} - -\membersection{wxRadioBox::GetSelection}\label{wxradioboxgetselection} - -\constfunc{int}{GetSelection}{\void} - -Returns the zero-based position of the selected button. - -\membersection{wxRadioBox::GetStringSelection}\label{wxradioboxgetstringselection} - -\constfunc{wxString}{GetStringSelection}{\void} - -Returns the selected string. - -\membersection{wxRadioBox::Number}\label{wxradioboxnumber} - -\constfunc{int}{Number}{\void} - -Returns the number of buttons in the radiobox. - -\membersection{wxRadioBox::SetLabel}\label{wxradioboxsetlabel} - -\func{void}{SetLabel}{\param{const wxString\&}{ label}} - -Sets the radiobox label. - -\func{void}{SetLabel}{\param{int }{n}, \param{const wxString\&}{ label}} - -Sets a label for a radio button. - -\wxheading{Parameters} - -\docparam{label}{The label to set.} - -\docparam{n}{The zero-based button index.} - -\membersection{wxRadioBox::SetSelection}\label{wxradioboxsetselection} - -\func{void}{SetSelection}{\param{int}{ n}} - -Sets a button by passing the desired string position. - -\wxheading{Parameters} - -\docparam{n}{The zero-based button position.} - -\membersection{wxRadioBox::SetStringSelection}\label{wxradioboxsetstringselection} - -\func{void}{SetStringSelection}{\param{const wxString\& }{string}} - -Sets a button by passing the desired string. - -\wxheading{Parameters} - -\docparam{string}{The label of the button to select.} - -\membersection{wxRadioBox::Show}\label{wxradioboxshow} - -\func{void}{Show}{\param{const bool}{ show}} - -Shows or hides the entire radiobox. - -\func{void}{Show}{\param{int }{item}, \param{const bool}{ show}} - -Shows or hides individual buttons. - -\wxheading{Parameters} - -\docparam{show}{TRUE to show, FALSE to hide.} - -\docparam{item}{The zero-based position of the button to show or hide.} - -\membersection{wxRadioBox::GetString}\label{wxradioboxgetstring} - -\constfunc{wxString}{GetString}{\param{int}{ n}} - -Returns the label for the button at the given position. - -\wxheading{Parameters} - -\docparam{n}{The zero-based button position.} - - diff --git a/docs/latex/wx/radiobut.tex b/docs/latex/wx/radiobut.tex deleted file mode 100644 index 8d4f225add..0000000000 --- a/docs/latex/wx/radiobut.tex +++ /dev/null @@ -1,103 +0,0 @@ -\section{\class{wxRadioButton}}\label{wxradiobutton} - -A radio button item is a button which usually denotes one of several mutually -exclusive options. It has a text label next to a (usually) round button. - -\wxheading{Derived from} - -\helpref{wxControl}{wxcontrol}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -There are no specific styles for this class. - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Event handling} - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_RADIOBUTTON(id, func)}}{Process a wxEVT\_COMMAND\_RADIOBUTTON\_SELECTED event, -when the radiobutton is clicked.} -\end{twocollist} - -\wxheading{See also} - -\helpref{Event handling overview}{eventhandlingoverview}, \helpref{wxRadioBox}{wxradiobox},\rtfsp -\helpref{wxCheckBox}{wxcheckbox} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxRadioButton::wxRadioButton}\label{wxradiobuttonconstr} - -\func{}{wxRadioButton}{\void} - -Default constructor. - -\func{}{wxRadioButton}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id}, \param{const wxString\& }{label},\rtfsp -\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp -\param{long}{ style = 0},\rtfsp -\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp -\param{const wxString\& }{name = ``radioButton"}} - -Constructor, creating and showing a radio button. - -\wxheading{Parameters} - -\docparam{parent}{Parent window. Must not be NULL.} - -\docparam{id}{Window identifier. A value of -1 indicates a default value.} - -\docparam{label}{Label for the radio button.} - -\docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.} - -\docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.} - -\docparam{style}{Window style. See \helpref{wxRadioButton}{wxradiobutton}.} - -\docparam{validator}{Window validator.} - -\docparam{name}{Window name.} - -\wxheading{See also} - -\helpref{wxRadioButton::Create}{wxradiobuttoncreate}, \helpref{wxValidator}{wxvalidator} - -\membersection{wxRadioButton::\destruct{wxRadioButton}} - -\func{void}{\destruct{wxRadioButton}}{\void} - -Destructor, destroying the radio button item. - -\membersection{wxRadioButton::Create}\label{wxradiobuttoncreate} - -\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id}, \param{const wxString\& }{label},\rtfsp -\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp -\param{long}{ style = 0},\rtfsp -\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp -\param{const wxString\& }{name = ``radioButton"}} - -Creates the choice for two-step construction. See \helpref{wxRadioButton::wxRadioButton}{wxradiobuttonconstr} for -further details. - -\membersection{wxRadioButton::GetValue}\label{wxradiobuttongetvalue} - -\constfunc{bool}{GetValue}{\void} - -Returns TRUE if the radio button is depressed, FALSE otherwise. - -\membersection{wxRadioButton::SetValue}\label{wxradiobuttonsetvalue} - -\func{void}{SetValue}{\param{const bool}{ value}} - -Sets the radio button to selected or deselected status. - -\wxheading{Parameters} - -\docparam{value}{TRUE to select, FALSE to deselect.} - - diff --git a/docs/latex/wx/realpoin.tex b/docs/latex/wx/realpoin.tex deleted file mode 100644 index 380e997f2a..0000000000 --- a/docs/latex/wx/realpoin.tex +++ /dev/null @@ -1,31 +0,0 @@ -\section{\class{wxRealPoint}}\label{wxrealpoint} - -A {\bf wxRealPoint} is a useful data structure for graphics operations. -It contains floating point point {\it x} and {\it y} members. -See also \helpref{wxPoint}{wxpoint} for an integer version. - -\wxheading{Derivation} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxPoint}{wxpoint} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxRealPoint::wxRealPoint} - -\func{}{wxRealPoint}{\void} - -\func{}{wxRealPoint}{\param{double}{ x}, \param{double}{ y}} - -Create a point. - -\member{double}{ x} - -\member{double}{ y} - -Members of the {\bf wxRealPoint} object. - - diff --git a/docs/latex/wx/recrdset.tex b/docs/latex/wx/recrdset.tex deleted file mode 100644 index 532bddfef1..0000000000 --- a/docs/latex/wx/recrdset.tex +++ /dev/null @@ -1,599 +0,0 @@ -\section{\class{wxRecordSet}}\label{wxrecordset} - -Each wxRecordSet represents an ODBC database query. You can make multiple queries -at a time by using multiple wxRecordSets with a wxDatabase or you can make -your queries in sequential order using the same wxRecordSet. - -\wxheading{Derivation} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxRecordSet overview}{wxrecordsetoverview}, \helpref{wxDatabase overview}{wxdatabaseoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxRecordSet::wxRecordSet} - -\func{}{wxRecordSet}{\param{wxDatabase *}{db}, \param{int}{ type = wxOPEN\_TYPE\_DYNASET}, - \param{int}{ opt = wxOPTION\_DEFAULT}} - -Constructor. {\it db} is a pointer to the wxDatabase instance you wish to use the -wxRecordSet with. Currently there are two possible values of {\it type}: - -\begin{itemize}\itemsep=0pt -\item wxOPEN\_TYPE\_DYNASET: Loads only one record at a time into memory. The other -data of the result set will be loaded dynamically when -moving the cursor. This is the default type. -\item wxOPEN\_TYPE\_SNAPSHOT: Loads all records of a result set at once. This will -need much more memory, but will result in -faster access to the ODBC data. -\end{itemize} - -The {\it option} parameter is not used yet. - -The constructor appends the wxRecordSet object to the parent database's list of -wxRecordSet objects, for later destruction when the wxDatabase is destroyed. - -\membersection{wxRecordSet::\destruct{wxRecordSet}} - -\func{}{\destruct{wxRecordSet}}{\void} - -Destructor. All data except that stored in user-defined variables will be lost. -It also unlinks the wxRecordSet object from the parent database's list of -wxRecordSet objects. - -\membersection{wxRecordSet::AddNew} - -\func{void}{AddNew}{\void} - -Not implemented. - -\membersection{wxRecordSet::BeginQuery} - -\func{bool}{BeginQuery}{\param{int}{ openType}, \param{const wxString\& }{sql = NULL}, \param{int}{ options = wxOPTION\_DEFAULT}} - -Not implemented. - -\membersection{wxRecordSet::BindVar} - -\func{void *}{BindVar}{\param{int}{ col}, \param{void *}{buf}, \param{long}{ size}} - -Binds a user-defined variable to the column col. Whenever the current field's -data changes, it will be copied into buf (maximum {\it size} bytes). - -\func{void *}{BindVar}{\param{const wxString\& }{col}, \param{void *}{buf}, \param{long}{ size}} - -The same as above, but uses the column name as the identifier. - -\membersection{wxRecordSet::CanAppend} - -\func{bool}{CanAppend}{\void} - -Not implemented. - -\membersection{wxRecordSet::Cancel} - -\func{void}{Cancel}{\void} - -Not implemented. - -\membersection{wxRecordSet::CanRestart} - -\func{bool}{CanRestart}{\void} - -Not implemented. - -\membersection{wxRecordSet::CanScroll} - -\func{bool}{CanScroll}{\void} - -Not implemented. - -\membersection{wxRecordSet::CanTransact} - -\func{bool}{CanTransact}{\void} - -Not implemented. - -\membersection{wxRecordSet::CanUpdate} - -\func{bool}{CanUpdate}{\void} - -Not implemented. - -\membersection{wxRecordSet::ConstructDefaultSQL} - -\func{bool}{ConstructDefaultSQL}{\void} - -Not implemented. - -\membersection{wxRecordSet::Delete} - -\func{bool}{Delete}{\void} - -Deletes the current record. Not implemented. - -\membersection{wxRecordSet::Edit} - -\func{void}{Edit}{\void} - -Not implemented. - -\membersection{wxRecordSet::EndQuery} - -\func{bool}{EndQuery}{\void} - -Not implemented. - -\membersection{wxRecordSet::ExecuteSQL}\label{wxrecordsetexecutesql} - -\func{bool}{ExecuteSQL}{\param{const wxString\& }{sql}} - -Directly executes a SQL statement. The data will be presented as a normal -result set. Note that the recordset must have been created as a snapshot, not -dynaset. Dynasets will be implemented in the near future. - -Examples of common SQL statements are given in \helpref{A selection of SQL commands}{sqlcommands}. - -\membersection{wxRecordSet::FillVars} - -\func{void}{FillVars}{\param{int}{ recnum}} - -Fills in the user-defined variables of the columns. You can set these -variables with wxQueryCol::BindVar. This function will be automatically -called after every successful database operation. - -\membersection{wxRecordSet::GetColName} - -\func{wxString}{GetColName}{\param{int}{ col}} - -Returns the name of the column at position {\it col}. Returns NULL if {\it col} does not -exist. - -\membersection{wxRecordSet::GetColType} - -\func{short}{GetColType}{\param{int}{ col}} - -Returns the data type of the column at position {\it col}. Returns SQL\_TYPE\_NULL -if {\it col} does not exist. - -\func{short}{GetColType}{\param{const wxString\& }{ name}} - -The same as above, but uses the column name as the identifier. - -See \helpref{ODBC SQL data types}{sqltypes} for a list -of possible data types. - -\membersection{wxRecordSet::GetColumns} - -\func{bool}{GetColumns}{\param{const wxString\& }{table = NULL}} - -Returns the columns of the table with the specified name. If no name is -given the class member {\it tablename} will be used. If both names are NULL -nothing will happen. The data will be presented as a normal result set, organized -as follows: - -\begin{twocollist}\itemsep=0pt -\twocolitem{0 (VARCHAR)}{TABLE\_QUALIFIER} -\twocolitem{1 (VARCHAR)}{TABLE\_OWNER} -\twocolitem{2 (VARCHAR)}{TABLE\_NAME} -\twocolitem{3 (VARCHAR)}{COLUMN\_NAME} -\twocolitem{4 (SMALLINT)}{DATA\_TYPE} -\twocolitem{5 (VARCHAR)}{TYPE\_NAME} -\twocolitem{6 (INTEGER)}{PRECISION} -\twocolitem{7 (INTEGER)}{LENGTH} -\twocolitem{8 (SMALLINT)}{SCALE} -\twocolitem{9 (SMALLINT)}{RADIX} -\twocolitem{10 (SMALLINT)}{NULLABLE} -\twocolitem{11 (VARCHAR)}{REMARKS} -\end{twocollist} - -\membersection{wxRecordSet::GetCurrentRecord} - -\func{long}{GetCurrentRecord}{\void} - -Not implemented. - -\membersection{wxRecordSet::GetDatabase} - -\func{wxDatabase *}{GetDatabase}{\void} - -Returns the wxDatabase object bound to a wxRecordSet. - -\membersection{wxRecordSet::GetDataSources}\label{wxrecordsetgetdatasources} - -\func{bool}{GetDataSources}{\void} - -Gets the currently-defined data sources via the ODBC manager. The data will be presented -as a normal result set. See the documentation for the ODBC function SQLDataSources for how the data -is organized. - -Example: - -\begin{verbatim} - wxDatabase Database; - - wxRecordSet *Record = new wxRecordSet(&Database); - - if (!Record->GetDataSources()) { - char buf[300]; - sprintf(buf, "%s %s\n", Database.GetErrorClass(), Database.GetErrorMessage()); - frame->output->SetValue(buf); - } - else { - do { - frame->DataSource->Append((char*)Record->GetFieldDataPtr(0, SQL_CHAR)); - } while (Record->MoveNext()); - } -\end{verbatim} - -\membersection{wxRecordSet::GetDefaultConnect} - -\func{wxString}{GetDefaultConnect}{\void} - -Not implemented. - -\membersection{wxRecordSet::GetDefaultSQL} - -\func{wxString}{GetDefaultSQL}{\void} - -Not implemented. - -\membersection{wxRecordSet::GetErrorCode} - -\func{wxRETCODE}{GetErrorCode}{\void} - -Returns the error code of the last ODBC action. This will be one of: - -\begin{twocollist}\itemsep=0pt -\twocolitem{SQL\_ERROR}{General error.} -\twocolitem{SQL\_INVALID\_HANDLE}{An invalid handle was passed to an ODBC function.} -\twocolitem{SQL\_NEED\_DATA}{ODBC expected some data.} -\twocolitem{SQL\_NO\_DATA\_FOUND}{No data was found by this ODBC call.} -\twocolitem{SQL\_SUCCESS}{The call was successful.} -\twocolitem{SQL\_SUCCESS\_WITH\_INFO}{The call was successful, but further information can be -obtained from the ODBC manager.} -\end{twocollist} - -\membersection{wxRecordSet::GetFieldData}\label{wxrecordsetgetfielddata} - -\func{bool}{GetFieldData}{\param{int}{ col}, \param{int}{ dataType}, \param{void *}{dataPtr}} - -Copies the current data of the column at position {\it col} into the buffer -\rtfsp{\it dataPtr}. To be sure to get the right type of data, the user has to pass the -correct data type. The function returns FALSE if {\it col} does not -exist or the wrong data type was given. - -\func{bool}{GetFieldData}{\param{const wxString\& }{name}, \param{int}{ dataType}, \param{void *}{dataPtr}} - -The same as above, but uses the column name as the identifier. - -See \helpref{ODBC SQL data types}{sqltypes} for a list -of possible data types. - -\membersection{wxRecordSet::GetFieldDataPtr}\label{wxrecordsetgetfielddataptr} - -\func{void *}{GetFieldDataPtr}{\param{int}{ col}, \param{int}{ dataType}} - -Returns the current data pointer of the column at position {\it col}. -To be sure to get the right type of data, the user has to pass the -data type. Returns NULL if {\it col} does not exist or if {\it dataType} is -incorrect. - -\func{void *}{GetFieldDataPtr}{\param{const wxString\& }{name}, \param{int}{ dataType}} - -The same as above, but uses the column name as the identifier. - -See \helpref{ODBC SQL data types}{sqltypes} for a list -of possible data types. - -\membersection{wxRecordSet::GetFilter} - -\func{wxString}{GetFilter}{\void} - -Returns the current filter. - -\membersection{wxRecordSet::GetForeignKeys} - -\func{bool}{GetPrimaryKeys}{\param{const wxString\& }{ptable = NULL}, \param{const wxString\& }{ftable -= NULL}} - -Returns a list of foreign keys in the specified table (columns in the -specified table that refer to primary keys in other tables), or -a list of foreign keys in other tables that refer to the primary key in -the specified table. - -If {\it ptable} contains a table name, this function returns a result -set containing the primary key of the specified table. - -If {\it ftable} contains a table name, this functions returns a result set -of containing all of the foreign keys in the specified table and the -primary keys (in other tables) to which they refer. - -If both {\it ptable} and {\it ftable} contain table names, this -function returns the foreign keys in the table specified in {\it -ftable} that refer to the primary key of the table specified in {\it -ptable}. This should be one key at most. - -GetForeignKeys returns results as a standard result set. If the foreign -keys associated with a primary key are requested, the result set is -ordered by FKTABLE\_QUALIFIER, FKTABLE\_OWNER, FKTABLE\_NAME, and KEY\_SEQ. -If the primary keys associated with a foreign key are requested, the -result set is ordered by PKTABLE\_QUALIFIER, PKTABLE\_OWNER, PKTABLE\_NAME, -and KEY\_SEQ. The following table lists the columns in the result set. - -\begin{twocollist}\itemsep=0pt -\twocolitem{0 (VARCHAR)}{PKTABLE\_QUALIFIER} -\twocolitem{1 (VARCHAR)}{PKTABLE\_OWNER} -\twocolitem{2 (VARCHAR)}{PKTABLE\_NAME} -\twocolitem{3 (VARCHAR)}{PKCOLUMN\_NAME} -\twocolitem{4 (VARCHAR)}{FKTABLE\_QUALIFIER} -\twocolitem{5 (VARCHAR)}{FKTABLE\_OWNER} -\twocolitem{6 (VARCHAR)}{FKTABLE\_NAME} -\twocolitem{7 (VARCHAR)}{FKCOLUMN\_NAME} -\twocolitem{8 (SMALLINT)}{KEY\_SEQ} -\twocolitem{9 (SMALLINT)}{UPDATE\_RULE} -\twocolitem{10 (SMALLINT)}{DELETE\_RULE} -\twocolitem{11 (VARCHAR)}{FK\_NAME} -\twocolitem{12 (VARCHAR)}{PK\_NAME} -\end{twocollist} - -\membersection{wxRecordSet::GetNumberCols} - -\func{long}{GetNumberCols}{\void} - -Returns the number of columns in the result set. - -\membersection{wxRecordSet::GetNumberFields} - -\func{int}{GetNumberFields}{\void} - -Not implemented. - -\membersection{wxRecordSet::GetNumberParams} - -\func{int}{GetNumberParams}{\void} - -Not implemented. - -\membersection{wxRecordSet::GetNumberRecords} - -\func{long}{GetNumberRecords}{\void} - -Returns the number of records in the result set. - -\membersection{wxRecordSet::GetPrimaryKeys} - -\func{bool}{GetPrimaryKeys}{\param{const wxString\& }{table = NULL}} - -Returns the column names that comprise the primary key of the table with the specified name. If no name is -given the class member {\it tablename} will be used. If both names are NULL -nothing will happen. The data will be presented as a normal result set, organized -as follows: - -\begin{twocollist}\itemsep=0pt -\twocolitem{0 (VARCHAR)}{TABLE\_QUALIFIER} -\twocolitem{1 (VARCHAR)}{TABLE\_OWNER} -\twocolitem{2 (VARCHAR)}{TABLE\_NAME} -\twocolitem{3 (VARCHAR)}{COLUMN\_NAME} -\twocolitem{4 (SMALLINT)}{KEY\_SEQ} -\twocolitem{5 (VARCHAR)}{PK\_NAME} -\end{twocollist} - -\membersection{wxRecordSet::GetOptions} - -\func{int}{GetOptions}{\void} - -Returns the options of the wxRecordSet. Options are not supported yet. - -\membersection{wxRecordSet::GetResultSet} - -\func{bool}{GetResultSet}{\void} - -Copies the data presented by ODBC into wxRecordSet. Depending on the -wxRecordSet type all or only one record(s) will be copied. -Usually this function will be called automatically after each successful -database operation. - -\membersection{wxRecordSet::GetSortString} - -\func{wxString}{GetSortString}{\void} - -Not implemented. - -\membersection{wxRecordSet::GetSQL} - -\func{wxString}{GetSQL}{\void} - -Not implemented. - -\membersection{wxRecordSet::GetTableName} - -\func{wxString}{GetTableName}{\void} - -Returns the name of the current table. - -\membersection{wxRecordSet::GetTables} - -\func{bool}{GetTables}{\void} - -Gets the tables of a database. The data will be presented as a normal result -set, organized as follows: - -\begin{twocollist}\itemsep=0pt -\twocolitem{0 (VARCHAR)}{TABLE\_QUALIFIER} -\twocolitem{1 (VARCHAR)}{TABLE\_OWNER} -\twocolitem{2 (VARCHAR)}{TABLE\_NAME} -\twocolitem{3 (VARCHAR)}{TABLE\_TYPE (TABLE, VIEW, SYSTEM TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY, -ALIAS, SYNONYM, or database-specific type)} -\twocolitem{4 (VARCHAR)}{REMARKS} -\end{twocollist} - -\membersection{wxRecordSet::GetType} - -\func{int}{GetType}{\void} - -Returns the type of the wxRecordSet: wxOPEN\_TYPE\_DYNASET or -wxOPEN\_TYPE\_SNAPSHOT. See the wxRecordSet description for details. - -\membersection{wxRecordSet::GoTo} - -\func{bool}{GoTo}{\param{long}{ n}} - -Moves the cursor to the record with the number n, where the first record -has the number 0. - -\membersection{wxRecordSet::IsBOF} - -\func{bool}{IsBOF}{\void} - -Returns TRUE if the user tried to move the cursor before the first record -in the set. - -\membersection{wxRecordSet::IsFieldDirty} - -\func{bool}{IsFieldDirty}{\param{int}{ field}} - -Returns TRUE if the given field has been changed but not saved yet. - -\func{bool}{IsFieldDirty}{\param{const wxString\& }{name}} - -Same as above, but uses the column name as the identifier. - -\membersection{wxRecordSet::IsFieldNull} - -\func{bool}{IsFieldNull}{\param{int}{ field}} - -Returns TRUE if the given field has no data. - -\func{bool}{IsFieldNull}{\param{const wxString\& }{ name}} - -Same as above, but uses the column name as the identifier. - -\membersection{wxRecordSet::IsColNullable} - -\func{bool}{IsColNullable}{\param{int}{ col}} - -Returns TRUE if the given column may contain no data. - -\func{bool}{IsColNullable}{\param{const wxString\& }{name}} - -Same as above, but uses the column name as the identifier. - -\membersection{wxRecordSet::IsEOF} - -\func{bool}{IsEOF}{\void} - -Returns TRUE if the user tried to move the cursor behind the last record -in the set. - -\membersection{wxRecordSet::IsDeleted} - -\func{bool}{IsDeleted}{\void} - -Not implemented. - -\membersection{wxRecordSet::IsOpen} - -\func{bool}{IsOpen}{\void} - -Returns TRUE if the parent database is open. - -\membersection{wxRecordSet::Move} - -\func{bool}{Move}{\param{long}{ rows}} - -Moves the cursor a given number of rows. Negative values are allowed. - -\membersection{wxRecordSet::MoveFirst} - -\func{bool}{MoveFirst}{\void} - -Moves the cursor to the first record. - -\membersection{wxRecordSet::MoveLast} - -\func{bool}{MoveLast}{\void} - -Moves the cursor to the last record. - -\membersection{wxRecordSet::MoveNext}\label{wxrecordsetmovenext} - -\func{bool}{MoveNext}{\void} - -Moves the cursor to the next record. - -\membersection{wxRecordSet::MovePrev}\label{wxrecordsetmoveprev} - -\func{bool}{MovePrev}{\void} - -Moves the cursor to the previous record. - -\membersection{wxRecordSet::Query} - -\func{bool}{Query}{\param{const wxString\& }{columns}, \param{const wxString\& }{table}, \param{const wxString\& }{filter = NULL}} - -Start a query. An SQL string of the following type will automatically be -generated and executed: ``SELECT columns FROM table WHERE filter". - -\membersection{wxRecordSet::RecordCountFinal} - -\func{bool}{RecordCountFinal}{\void} - -Not implemented. - -\membersection{wxRecordSet::Requery} - -\func{bool}{Requery}{\void} - -Re-executes the last query. Not implemented. - -\membersection{wxRecordSet::SetFieldDirty} - -\func{void}{SetFieldDirty}{\param{int}{ field}, \param{bool}{ dirty = TRUE}} - -Sets the dirty tag of the field field. Not implemented. - -\func{void}{SetFieldDirty}{\param{const wxString\& }{name}, \param{bool}{ dirty = TRUE}} - -Same as above, but uses the column name as the identifier. - -\membersection{wxRecordSet::SetDefaultSQL} - -\func{void}{SetDefaultSQL}{\param{const wxString\& }{s}} - -Not implemented. - -\membersection{wxRecordSet::SetFieldNull} - -\func{void}{SetFieldNull}{\param{void *}{p}, \param{bool }{isNull = TRUE}} - -Not implemented. - -\membersection{wxRecordSet::SetOptions} - -\func{void}{SetOptions}{\param{int}{ opt}} - -Sets the options of the wxRecordSet. Not implemented. - -\membersection{wxRecordSet::SetTableName} - -\func{void}{SetTableName}{\param{const wxString\& }{tablename}} - -Specify the name of the table you want to use. - -\membersection{wxRecordSet::SetType} - -\func{void}{SetType}{\param{int}{ type}} - -Sets the type of the wxRecordSet. See the wxRecordSet class description for details. - -\membersection{wxRecordSet::Update} - -\func{bool}{Update}{\void} - -Writes back the current record. Not implemented. - - diff --git a/docs/latex/wx/rect.tex b/docs/latex/wx/rect.tex deleted file mode 100644 index 48d4889041..0000000000 --- a/docs/latex/wx/rect.tex +++ /dev/null @@ -1,159 +0,0 @@ -\section{\class{wxRect}}\label{wxrect} - -A class for manipulating rectangles. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxPoint}{wxpoint}, \helpref{wxSize}{wxsize} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxRect::wxRect} - -\func{}{wxRect}{\void} - -Default constructor. - -\func{}{wxRect}{\param{int}{ x}, \param{int}{ y}, \param{int}{ width}, \param{int}{ height}} - -Creates a wxRect object from x, y, width and height values. - -\func{}{wxRect}{\param{const wxPoint\&}{ topLeft}, \param{const wxPoint\&}{ bottomRight}} - -Creates a wxRect object from top-left and bottom-right points. - -\func{}{wxRect}{\param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size}} - -Creates a wxRect object from position and size values. - -\membersection{wxRect::x} - -\member{int}{x} - -x member. - -\membersection{wxRect::y} - -\member{int}{y} - -y member. - -\membersection{wxRect::width} - -\member{int}{width} - -Width member. - -\membersection{wxRect::height} - -\member{int}{height} - -Height member. - -\membersection{wxRect::GetBottom}\label{wxrectgetbottom} - -\constfunc{int}{GetBottom}{\void} - -Gets the bottom point of the rectangle. - -\membersection{wxRect::GetHeight}\label{wxrectgetheight} - -\constfunc{int}{GetHeight}{\void} - -Gets the height member. - -\membersection{wxRect::GetLeft}\label{wxrectgetleft} - -\constfunc{int}{GetLeft}{\void} - -Gets the left point of the rectangle (the same as \helpref{wxRect::GetX}{wxrectgetx}). - -\membersection{wxRect::GetPosition}\label{wxrectgetposition} - -\constfunc{wxPoint}{GetPosition}{\void} - -Gets the position. - -\membersection{wxRect::GetRight}\label{wxrectgetright} - -\constfunc{int}{GetRight}{\void} - -Gets the right point of the rectangle. - -\membersection{wxRect::GetSize}\label{wxrectgetsize} - -\constfunc{wxSize}{GetSize}{\void} - -Gets the size. - -\membersection{wxRect::GetTop}\label{wxrectgettop} - -\constfunc{int}{GetTop}{\void} - -Gets the top point of the rectangle (the same as \helpref{wxRect::GetY}{wxrectgety}). - -\membersection{wxRect::GetWidth}\label{wxrectgetwidth} - -\constfunc{int}{GetWidth}{\void} - -Gets the width member. - -\membersection{wxRect::GetX}\label{wxrectgetx} - -\constfunc{int}{GetX}{\void} - -Gets the x member. - -\membersection{wxRect::GetY}\label{wxrectgety} - -\constfunc{int}{GetY}{\void} - -Gets the y member. - -\membersection{wxRect::SetHeight}\label{wxrectsetheight} - -\func{void}{SetHeight}{\param{int}{ height}} - -Sets the height. - -\membersection{wxRect::SetWidth}\label{wxrectsetwidth} - -\func{void}{SetWidth}{\param{int}{ width}} - -Sets the width. - -\membersection{wxRect::SetX}\label{wxrectsetx} - -\func{void}{SetX}{\param{int}{ x}} - -Sets the x position. - -\membersection{wxRect::SetY}\label{wxrectsety} - -\func{void}{SetY}{\param{int}{ y}} - -Sets the y position. - -\membersection{wxRect::operator $=$} - -\func{void}{operator $=$}{\param{const wxRect\& }{rect}} - -Assignment operator. - -\membersection{wxRect::operator $==$} - -\func{bool}{operator $==$}{\param{const wxRect\& }{rect}} - -Equality operator. - -\membersection{wxRect::operator $!=$} - -\func{bool}{operator $!=$}{\param{const wxRect\& }{rect}} - -Inequality operator. - - diff --git a/docs/latex/wx/referenc.tex b/docs/latex/wx/referenc.tex deleted file mode 100644 index ea75f9f517..0000000000 --- a/docs/latex/wx/referenc.tex +++ /dev/null @@ -1,82 +0,0 @@ -\documentstyle[a4,11pt,makeidx,verbatim,texhelp,fancyheadings,palatino]{thesis} -%KB: -\addtolength{\textwidth}{1in} -\addtolength{\oddsidemargin}{-0.5in} -\addtolength{\topmargin}{-0.5in} -\addtolength{\textheight}{1in} -\sloppy -%end of my changes -%\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report} -\newcommand{\indexit}[1]{#1\index{#1}} -\newcommand{\pipe}[0]{$\|$\ }% -\input psbox.tex - -% Remove this for processing with dvi2ps instead of dvips -%\special{!/@scaleunit 1 def} - -\parskip=10pt -\parindent=0pt -\title{Reference Manual for wxWindows 2.0: a portable C++ GUI toolkit} -\author{Julian Smart} -\date{July 31st 1998} - -\makeindex -\begin{document} -\maketitle - -\pagestyle{fancyplain} -\bibliographystyle{plain} -\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}} -\setfooter{\thepage}{}{}{}{}{\thepage} -\pagenumbering{roman} -\tableofcontents - - -\chapter*{Copyright notice} -\setheader{{\it COPYRIGHT}}{}{}{}{}{{\it COPYRIGHT}}% -\setfooter{\thepage}{}{}{}{}{\thepage} - -\begin{center} -Copyright (c) 1998 Julian Smart, Markus Holzem, Robert Roebling and other -members of the wxWindows team\\ -Portions (c) 1996 Artificial Intelligence Applications Institute\\ -\end{center} - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose is hereby granted without fee, provided that the -above copyright notice, author statement and this permission notice appear in -all copies of this software and related documentation. - -THE SOFTWARE IS PROVIDED ``AS-IS'' AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, -IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF -MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -IN NO EVENT SHALL THE ARTIFICIAL INTELLIGENCE APPLICATIONS INSTITUTE OR THE -UNIVERSITY OF EDINBURGH OR ANY MEMBERS OF THE WXWINDOWS TEAM BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF -DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH -THE USE OR PERFORMANCE OF THIS SOFTWARE. - -\chapter{This manual} -\pagenumbering{arabic}% -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage} - -wxWindows is a class library for C++ providing GUI (Graphical User -Interface) and other facilities on more than one platform. This document -gives detailed information about the classes and functions that make up -the wxWindows API (Application Programming Interface). Please refer to the -wxWindows user manual for a more general description of wxWindows. - -\input{classes.tex} -\input{category.tex} -\input{topics.tex} - -\addcontentsline{toc}{chapter}{Index} -\setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}% -\setfooter{\thepage}{}{}{}{}{\thepage} -\printindex - -\end{document} - diff --git a/docs/latex/wx/refs.bib b/docs/latex/wx/refs.bib deleted file mode 100644 index 836814c312..0000000000 --- a/docs/latex/wx/refs.bib +++ /dev/null @@ -1,59 +0,0 @@ -@techreport{robins87, -author = {Robins, Gabriel}, -title = {The {ISI} grapher: a portable tool for displaying graphs pictorially (ISI/RS-87-196)}, -institution = {University of South California}, -year = {1987}, -month = {September} -} -@book{helpbook, -author = {Boggan, Scott and Fakas, David and Welinske, Joe} -, title = {Developing on-line help for {W}indows} -, publisher = {Sams Publishing} -, address = {11711 North College, Carmel, Indiana 46032, USA} -, year = {1993} -} -@book{wong93, -author = {Wong, William} -, title = {Plug and play programming} -, publisher = {M and T Books} -, address = {115 West 18th Street, New York, New York 10011} -, year = {1993} -} -@book{pree94, -author = {Pree, Wolfgang} -, title = {Design patterns for object-oriented software development} -, publisher = {Addison-Wesley} -, address = {Reading, MA} -, year = {1994} -} -@book{gamma95, -author = {Gamma, Erich and Helm, Richard and Johnson, Ralph and Vlissides, John} -, title = {Design patterns: elements of reusable object-oriented software} -, publisher = {Addison-Wesley} -, address = {Reading, MA} -, year = {1994} -} -@book{kopka, -author = {Kopka, Helmut and Daly, Patrick W.} -, title = {A Guide to LaTeX} -, publisher = {Addison-Wesley} -, year = {1993} -} -@manual{smart95a, -author = {Smart, Julian} -, title = {wxCLIPS User Manual} -, publisher = {Artificial Intelligence Applications Institute} -, organization = {University of Edinburgh} -, address = {80 South Bridge, Edinburgh, EH1 1HN} -, year = {1995} -} - -@manual{smart95b, -author = {Smart, Julian} -, title = {Tex2RTF User Manual} -, publisher = {Artificial Intelligence Applications Institute} -, organization = {University of Edinburgh} -, address = {80 South Bridge, Edinburgh, EH1 1HN} -, year = {1995} -} - diff --git a/docs/latex/wx/region.tex b/docs/latex/wx/region.tex deleted file mode 100644 index 1d3c224ada..0000000000 --- a/docs/latex/wx/region.tex +++ /dev/null @@ -1,182 +0,0 @@ -\section{\class{wxRegion}}\label{wxregion} - -A wxRegion represents a simple or complex region on a device context or window. It uses -reference counting, so copying and assignment operations are fast. - -\wxheading{Derived from} - -\helpref{wxGDIObject}{wxgdiobject}\\ -\helpref{wxObject}{wxobject} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxRegion::wxRegion}\label{wxregionconstr} - -\func{}{wxRegion}{\void} - -Default constructor. - -\func{}{wxRegion}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}} - -Constructs a rectangular region with the given position and size. - -\func{}{wxRegion}{\param{const wxPoint\&}{ topLeft}, \param{const wxPoint\&}{ bottomRight}} - -Constructs a rectangular region from the top left point and the bottom right point. - -\func{}{wxRegion}{\param{const wxRect\&}{ rect}} - -Constructs a rectangular region a wxRect object. - -\func{}{wxRegion}{\param{const wxRegion\&}{ region}} - -Constructs a region by copying another region. - -\membersection{wxRegion::\destruct{wxRegion}} - -\func{}{\destruct{wxRegion}}{\void} - -Destructor. - -\membersection{wxRegion::Clear}\label{wxregionclear} - -\func{void}{Clear}{\void} - -Clears the current region. - -\membersection{wxRegion::Contains}\label{wxregioncontains} - -\constfunc{wxRegionContain}{Contains}{\param{long\& }{x}, \param{long\& }{y}} - -Returns a value indicating whether the given point is contained within the region. - -\constfunc{wxRegionContain}{Contains}{\param{const wxPoint\&}{ pt}} - -Returns a value indicating whether the given point is contained within the region. - -\constfunc{wxRegionContain}{Contains}{\param{long\& }{x}, \param{long\& }{y}, \param{long\& }{width}, \param{long\& }{height}} - -Returns a value indicating whether the given rectangle is contained within the region. - -\constfunc{wxRegionContain}{Contains}{\param{const wxRect\& }{rect}} - -Returns a value indicating whether the given rectangle is contained within the region. - -\wxheading{Return value} - -The return value is one of wxOutRegion, wxPartRegion and wxInRegion. - -On Windows, only wxOutRegion and wxInRegion are returned; a value wxInRegion then indicates that -all or some part of the region is contained in this region. - -\membersection{wxRegion::GetBox}\label{wxregiongetbox} - -\constfunc{void}{GetBox}{\param{long\& }{x}, \param{long\& }{y}, \param{long\& }{width}, \param{long\& }{height}} - -Returns the outer bounds of the region. - -\constfunc{wxRect}{GetBox}{\void} - -Returns the outer bounds of the region. - -\membersection{wxRegion::Intersect}\label{wxregionintersect} - -\func{bool}{Intersect}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}} - -Finds the intersection of this region and another, rectangular region, specified using position and size. - -\func{bool}{Intersect}{\param{const wxRect\&}{ rect}} - -Finds the intersection of this region and another, rectangular region. - -\func{bool}{Intersect}{\param{const wxRegion\&}{ region}} - -Finds the intersection of this region and another region. - -\wxheading{Return value} - -TRUE if successful, FALSE otherwise. - -\wxheading{Remarks} - -Creates the intersection of the two regions, that is, the parts which are in both regions. The result -is stored in this region. - -\membersection{wxRegion::IsEmpty}\label{wxregionisempty} - -\constfunc{bool}{IsEmpty}{\void} - -\func{bool}{IsEmpty}{\void} - -Returns TRUE if the region is empty, FALSE otherwise. - -\func{bool}{Subtract}{\param{const wxRect\&}{ rect}} - -Subtracts a rectangular region from this region. - -\func{bool}{Subtract}{\param{const wxRegion\&}{ region}} - -Subtracts a region from this region. - -\wxheading{Return value} - -TRUE if successful, FALSE otherwise. - -\wxheading{Remarks} - -This operation combines the parts of 'this' region that are not part of the second region. -The result is stored in this region. - -\membersection{wxRegion::Union}\label{wxregionunion} - -\func{bool}{Union}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}} - -Finds the union of this region and another, rectangular region, specified using position and size. - -\func{bool}{Union}{\param{const wxRect\&}{ rect}} - -Finds the union of this region and another, rectangular region. - -\func{bool}{Union}{\param{const wxRegion\&}{ region}} - -Finds the union of this region and another region. - -\wxheading{Return value} - -TRUE if successful, FALSE otherwise. - -\wxheading{Remarks} - -This operation creates a region that combines all of this region and the second region. -The result is stored in this region. - -\membersection{wxRegion::Xor}\label{wxregionxor} - -\func{bool}{Xor}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}} - -Finds the Xor of this region and another, rectangular region, specified using position and size. - -\func{bool}{Xor}{\param{const wxRect\&}{ rect}} - -Finds the Xor of this region and another, rectangular region. - -\func{bool}{Xor}{\param{const wxRegion\&}{ region}} - -Finds the Xor of this region and another region. - -\wxheading{Return value} - -TRUE if successful, FALSE otherwise. - -\wxheading{Remarks} - -This operation creates a region that combines all of this region and the second region, except -for any overlapping areas. The result is stored in this region. - -\membersection{wxRegion::operator $=$}\label{wxregionassign} - -\func{void}{operator $=$}{\param{const wxRegion\&}{ region}} - -Copies {\it region} by reference counting. - - diff --git a/docs/latex/wx/screendc.tex b/docs/latex/wx/screendc.tex deleted file mode 100644 index 9c5b06a3ef..0000000000 --- a/docs/latex/wx/screendc.tex +++ /dev/null @@ -1,55 +0,0 @@ -\section{\class{wxScreenDC}}\label{wxscreendc} - -A wxScreenDC can be used to paint on the screen. -This should normally be constructed as a temporary stack object; don't store -a wxScreenDC object. - -\wxheading{Derived from} - -\helpref{wxDC}{wxdc} - -\wxheading{See also} - -\helpref{wxDC}{wxdc}, \helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxPaintDC}{wxpaintdc},\rtfsp -\helpref{wxClientDC}{wxclientdc}, \helpref{wxWindowDC}{wxwindowdc} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxScreenDC::wxScreenDC} - -\func{}{wxScreenDC}{\void} - -Constructor. - -\membersection{wxScreenDC::StartDrawingOnTop}\label{wxscreendcstartdrawingontop} - -\func{bool}{StartDrawingOnTop}{\param{wxWindow*}{ window}} - -\func{bool}{StartDrawingOnTop}{\param{wxRect*}{ rect = NULL}} - -Use this in conjunction with \helpref{EndDrawingOnTop}{wxscreendcenddrawingontop} to -ensure that drawing to the screen occurs on top of existing windows. Without this, -some window systems (such as X) only allow drawing to take place underneath -other windows. - -By using the first form of this function, an application is specifying that -the area that will be drawn on coincides with the given window. - -By using the second form, an application can specify an area of the screen -which is to be drawn on. If NULL is passed, the whole screen is available. - -It is recommended that an area of the screen is specified because with large regions, -flickering effects are noticeable when destroying the temporary transparent window used -to implement this feature. - -You might use this pair of functions when implementing a drag feature, for example -as in the \helpref{wxSplitterWindow}{wxsplitterwindow} implementation. - -\membersection{wxScreenDC::EndDrawingOnTop}\label{wxscreendcenddrawingontop} - -\func{bool}{EndDrawingOnTop}{\void} - -Use this in conjunction with \helpref{StartDrawingOnTop}{wxscreendcstartdrawingontop}. - -This function destroys the temporary window created to implement on-top drawing (X only). - diff --git a/docs/latex/wx/scrolbar.tex b/docs/latex/wx/scrolbar.tex deleted file mode 100644 index 89526994eb..0000000000 --- a/docs/latex/wx/scrolbar.tex +++ /dev/null @@ -1,295 +0,0 @@ -\section{\class{wxScrollBar}}\label{wxscrollbar} - -A wxScrollBar is a control that represents a horizontal or -vertical scrollbar. It is distinct from the two scrollbars that some windows -provide automatically, but the two types of scrollbar share the way -events are received. - -\wxheading{Derived from} - -\helpref{wxControl}{wxcontrol}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Remarks} - -A scrollbar has the following main attributes: {\it range}, {\it thumb size}, {\it page size}, and {\it position}. - -The range is the total number of units associated with the view represented by the scrollbar. -For a table with 15 columns, the range would be 15. - -The thumb size is the number of units that are currently visible. For the table example, the window -might be sized so that only 5 columns are currently visible, in which case the application would -set the thumb size to 5. When the thumb size becomes the same as or greater than the range, -the scrollbar will be automatically hidden on most platforms. - -The page size is the number of units that the scrollbar should scroll by, when `paging' through -the data. This value is normally the same as the thumb size length, because -it is natural to assume that the visible window size defines a page. - -The scrollbar position is the current thumb position. - -Most applications will find it convenient to provide a function called {\bf AdjustScrollbars} which can -be called initially, from an {\bf OnSize} event handler, and whenever the application data -changes in size. It will adjust the view, object and page size according -to the size of the window and the size of the data. - -\wxheading{Window styles} - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxSB\_HORIZONTAL}}{Specifies a horizontal scrollbar.} -\twocolitem{\windowstyle{wxSB\_VERTICAL}}{Specifies a vertical scrollbar.} -\end{twocollist} - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Event handling} - -To process input from a scrollbar, use one of these event handler macros to direct input to member -functions that take a \helpref{wxScrollEvent}{wxscrollevent} argument: - -\twocolwidtha{7cm} -\begin{twocollist} -\twocolitem{{\bf EVT\_COMMAND\_SCROLL(id, func)}}{Catch all scroll commands.} -\twocolitem{{\bf EVT\_COMMAND\_TOP(id, func)}}{Catch a command to put the scroll thumb at the maximum position.} -\twocolitem{{\bf EVT\_COMMAND\_BOTTOM(id, func)}}{Catch a command to put the scroll thumb at the maximum position.} -\twocolitem{{\bf EVT\_COMMAND\_LINEUP(id, func)}}{Catch a line up command.} -\twocolitem{{\bf EVT\_COMMAND\_LINEDOWN(id, func)}}{Catch a line down command.} -\twocolitem{{\bf EVT\_COMMAND\_PAGEUP(id, func)}}{Catch a page up command.} -\twocolitem{{\bf EVT\_COMMAND\_PAGEDOWN(id, func)}}{Catch a page down command.} -\twocolitem{{\bf EVT\_COMMAND\_THUMBTRACK(id, func)}}{Catch a thumbtrack command (continuous movement of the scroll thumb).} -\end{twocollist}% - -\wxheading{See also} - -\helpref{Scrolling overview}{scrollingoverview},\rtfsp -\helpref{Event handling overview}{eventhandlingoverview},\rtfsp -\helpref{wxScrolledWindow}{wxscrolledwindow} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxScrollBar::wxScrollBar}\label{wxscrollbarconstr} - -\func{}{wxScrollBar}{\void} - -Default constructor. - -\func{}{wxScrollBar}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp -\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = wxSB\_HORIZONTAL}, \param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp -\param{const wxString\& }{name = ``scrollBar"}} - -Constructor, creating and showing a scrollbar. - -\wxheading{Parameters} - -\docparam{parent}{Parent window. Must not be NULL.} - -\docparam{id}{Window identifier. A value of -1 indicates a default value.} - -\docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.} - -\docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.} - -\docparam{style}{Window style. See \helpref{wxScrollBar}{wxscrollbar}.} - -\docparam{validator}{Window validator.} - -\docparam{name}{Window name.} - -\wxheading{See also} - -\helpref{wxScrollBar::Create}{wxscrollbarcreate}, \helpref{wxValidator}{wxvalidator} - -\membersection{wxScrollBar::\destruct{wxScrollBar}} - -\func{void}{\destruct{wxScrollBar}}{\void} - -Destructor, destroying the scrollbar. - -\membersection{wxScrollBar::Create}\label{wxscrollbarcreate} - -\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp -\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = wxSB\_HORIZONTAL}, \param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp -\param{const wxString\& }{name = ``scrollBar"}} - -Scrollbar creation function called by the scrollbar constructor. -See \helpref{wxScrollBar::wxScrollBar}{wxscrollbarconstr} for details. - -\membersection{wxScrollBar::GetRange}\label{wxscrollbargetrange} - -\constfunc{int}{GetRange}{\void} - -Returns the length of the scrollbar. - -\wxheading{See also} - -\helpref{wxScrollBar::SetScrollbar}{wxscrollbarsetscrollbar} - -\membersection{wxScrollBar::GetPageSize}\label{wxscrollbargetpagesize} - -\constfunc{int}{GetPageSize}{\void} - -Returns the page size of the scrollbar. This is the number of scroll units -that will be scrolled when the user pages up or down. Often it is the -same as the thumb size. - -\wxheading{See also} - -\helpref{wxScrollBar::SetScrollbar}{wxscrollbarsetscrollbar} - -\membersection{wxScrollBar::GetPosition}\label{wxscrollbargetposition} - -\constfunc{int}{GetPosition}{\void} - -Returns the current position of the scrollbar. - -\wxheading{See also} - -\helpref{wxScrollBar::SetPosition}{wxscrollbarsetposition} - -\membersection{wxScrollBar::GetThumbLength}\label{wxscrollbargetthumblength} - -\constfunc{int}{GetThumbLength}{\void} - -Returns the thumb or `view' size. - -\wxheading{See also} - -\helpref{wxScrollBar::SetScrollbar}{wxscrollbarsetscrollbar} - -\begin{comment} -\membersection{wxScrollBar::SetObjectLength}\label{wxscrollbarsetobjectlength} - -\func{void}{SetObjectLength}{\param{int}{ objectLength}} - -Sets the object length for the scrollbar. This is the total object size (virtual size). You must -call \helpref{SetViewLength}{wxscrollbarsetviewlength} {\it before} calling SetObjectLength. - -\wxheading{Parameters} - -\docparam{objectLength}{The object length of the scrollbar.} - -\wxheading{Remarks} - -Example: you are implementing scrollbars on a text window, where text lines have a maximum width -of 100 characters. Your text window has a current width of 60 characters. So the view length is 60, -and the object length is 100. The scrollbar will then enable you to scroll to see the other 40 characters. - -You will need to call {\bf SetViewLength} and {\bf SetObjectLength} whenever there -is a change in the size of the window (the view size) or the size of the -contents (the object length). - -\wxheading{See also} - -\helpref{wxScrollBar::GetObjectLength}{wxscrollbargetobjectlength} - -\membersection{wxScrollBar::SetPageSize}\label{wxscrollbarsetpagesize} - -\func{void}{SetPageSize}{\param{int}{ pageSize}} - -Sets the page size for the scrollbar. This is the number of scroll units which are scrolled when the -user pages down (clicks on the scrollbar outside the thumbtrack area). - -\wxheading{Parameters} - -\docparam{pageSize}{The page size in scroll units.} - -\wxheading{Remarks} - -At present, this needs to be called {\it before} other set functions. - -\wxheading{See also} - -\helpref{wxScrollBar::GetPageSize}{wxscrollbargetpagesize} -\end{comment} - -\membersection{wxScrollBar::SetPosition}\label{wxscrollbarsetposition} - -\func{void}{SetPosition}{\param{int}{ viewStart}} - -Sets the position of the scrollbar. - -\wxheading{Parameters} - -\docparam{viewStart}{The position of the scrollbar thumb.} - -\wxheading{See also} - -\helpref{wxScrollBar::GetPosition}{wxscrollbargetposition} - -\membersection{wxScrollBar::SetScrollbar}\label{wxscrollbarsetscrollbar} - -\func{virtual void}{SetScrollbar}{\param{int }{position},\rtfsp -\param{int }{thumbSize}, \param{int }{range},\rtfsp -\param{int }{pageSize},\rtfsp -\param{const bool }{refresh = TRUE}} - -Sets the scrollbar properties. - -\wxheading{Parameters} - -\docparam{position}{The position of the scrollbar in scroll units.} - -\docparam{thumbSize}{The size of the thumb, or visible portion of the scrollbar, in scroll units.} - -\docparam{range}{The maximum position of the scrollbar.} - -\docparam{pageSize}{The size of the page size in scroll units. This is the number of units -the scrollbar will scroll when it is paged up or down. Often it is the same as -the thumb size.} - -\docparam{refresh}{TRUE to redraw the scrollbar, FALSE otherwise.} - -\wxheading{Remarks} - -Let's say you wish to display 50 lines of text, using the same font. -The window is sized so that you can only see 16 lines at a time. - -You would use: - -{\small% -\begin{verbatim} - scrollbar->SetScrollbar(0, 16, 50, 15); -\end{verbatim} -} - -The page size is 1 less than the thumb size so that the last line of the previous -page will be visible on the next page, to help orient the user. - -Note that with the window at this size, the thumb position can never go -above 50 minus 16, or 34. - -You can determine how many lines are currently visible by dividing the current view -size by the character height in pixels. - -When defining your own scrollbar behaviour, you will always need to recalculate -the scrollbar settings when the window size changes. You could therefore put your -scrollbar calculations and SetScrollbar -call into a function named AdjustScrollbars, which can be called initially and also -from a \helpref{wxWindow::OnSize}{wxwindowonsize} event handler function. - -\wxheading{See also} - -\helpref{Scrolling overview}{scrollingoverview},\rtfsp -\helpref{wxWindow::SetScrollbar}{wxwindowsetscrollbar}, \helpref{wxScrolledWindow}{wxscrolledwindow} - -\begin{comment} -\membersection{wxScrollBar::SetViewLength}\label{wxscrollbarsetviewlength} - -\func{void}{SetViewLength}{\param{int}{ viewLength}} - -Sets the view length for the scrollbar. - -\wxheading{Parameters} - -\docparam{viewLength}{View length.} - -\wxheading{See also} - -\helpref{wxScrollBar::GetViewLength}{wxscrollbargetviewlength} -\end{comment} - diff --git a/docs/latex/wx/scrolevt.tex b/docs/latex/wx/scrolevt.tex deleted file mode 100644 index 7ed9ea26de..0000000000 --- a/docs/latex/wx/scrolevt.tex +++ /dev/null @@ -1,71 +0,0 @@ -\section{\class{wxScrollEvent}}\label{wxscrollevent} - -A scroll event holds information about events sent from scrollbars and scrolling windows. - -\wxheading{Derived from} - -\helpref{wxCommandEvent}{wxcommandevent}\\ -\helpref{wxEvent}{wxevent}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Event table macros} - -To process a scroll event, use these event handler macros to direct input to member -functions that take a wxScrollEvent argument. You can use EVT\_COMMAND\_SCROLL... macros -with window IDs for when intercepting scroll events from controls, or EVT\_SCROLL... macros -without window IDs for intercepting scroll events from the receiving window. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_SCROLL(func)}}{Process all scroll events.} -\twocolitem{{\bf EVT\_SCROLL\_TOP(func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-top events.} -\twocolitem{{\bf EVT\_SCROLL\_BOTTOM(func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-bottom events.} -\twocolitem{{\bf EVT\_SCROLL\_LINEUP(func)}}{Process wxEVT\_SCROLL\_LINEUP line up events.} -\twocolitem{{\bf EVT\_SCROLL\_LINEDOWN(func)}}{Process wxEVT\_SCROLL\_LINEDOWN line down events.} -\twocolitem{{\bf EVT\_SCROLL\_PAGEUP(func)}}{Process wxEVT\_SCROLL\_PAGEUP page up events.} -\twocolitem{{\bf EVT\_SCROLL\_PAGEDOWN(func)}}{Process wxEVT\_SCROLL\_PAGEDOWN page down events.} -\twocolitem{{\bf EVT\_SCROLL\_THUMBTRACK(func)}}{Process wxEVT\_SCROLL\_THUMBTRACK thumbtrack events (frequent events -sent as the user drags the thumtrack).} -\twocolitem{{\bf EVT\_COMMAND\_SCROLL(id, func)}}{Process all scroll events.} -\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_TOP(id, func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-top events.} -\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_BOTTOM(id, func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-bottom events.} -\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_LINEUP(id, func)}}{Process wxEVT\_SCROLL\_LINEUP line up events.} -\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_LINEDOWN(id, func)}}{Process wxEVT\_SCROLL\_LINEDOWN line down events.} -\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_PAGEUP(id, func)}}{Process wxEVT\_SCROLL\_PAGEUP page up events.} -\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_PAGEDOWN(id, func)}}{Process wxEVT\_SCROLL\_PAGEDOWN page down events.} -\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_THUMBTRACK(id, func)}}{Process wxEVT\_SCROLL\_THUMBTRACK thumbtrack events (frequent events -sent as the user drags the thumtrack).} -\end{twocollist}% - -\wxheading{Remarks} - -Note that unless specifying a scroll control identifier, you will need to test for scrollbar -orientation with \helpref{wxScrollEvent::GetOrientation}{wxscrolleventgetorientation}, since -horizontal and vertical scroll events are processed using the same event handler. - -\wxheading{See also} - -\helpref{wxWindow::OnScroll}{wxwindowonscroll}, \helpref{wxScrollBar}{wxscrollbar}, \helpref{Event handling overview}{eventhandlingoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxScrollEvent::wxScrollEvent} - -\func{}{wxScrollEvent}{\param{WXTYPE }{commandType = 0}, \param{int }{id = 0}, \param{int}{ pos = 0}, -\rtfsp\param{int}{ orientation = 0}} - -Constructor. - -\membersection{wxScrollEvent::GetOrientation}\label{wxscrolleventgetorientation} - -\constfunc{int}{GetOrientation}{\void} - -Returns wxHORIZONTAL or wxVERTICAL, depending on the orientation of the scrollbar. - -\membersection{wxScrollEvent::GetPosition}\label{wxscrolleventgetposition} - -\constfunc{int}{GetPosition}{\void} - -Returns the position of the scrollbar. - - diff --git a/docs/latex/wx/scrolwin.tex b/docs/latex/wx/scrolwin.tex deleted file mode 100644 index 631761b8a7..0000000000 --- a/docs/latex/wx/scrolwin.tex +++ /dev/null @@ -1,335 +0,0 @@ -\section{\class{wxScrolledWindow}}\label{wxscrolledwindow} - -The wxScrolledWindow class manages scrolling for its client area, transforming -the coordinates according to the scrollbar positions, and setting the -scroll positions, thumb sizes and ranges according to the area in view. - -As with all windows, an application can draw onto a wxScrolledWindow using a \helpref{device context}{dcoverview}. - -You have the option of handling the \helpref{OnPaint}{wxscrolledwindowonpaint} handler -or overriding the \helpref{OnDraw}{wxscrolledwindowondraw} function, which is passed -a pre-scrolled device context (prepared by \helpref{PrepareDC}{wxscrolledwindowpreparedc}). - -If you don't wish to calculate your own scrolling, you must call PrepareDC when not drawing from -within OnDraw, to set the device origin for the device context according to the current -scroll position. - -\wxheading{Derived from} - -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxRETAINED}}{Uses a backing pixmap to speed refreshes. Motif only.} -\end{twocollist} - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Remarks} - -Use wxScrolledWindow for applications where the user scrolls by a fixed amount, and -where a `page' can be interpreted to be the current visible portion of the window. For -more sophisticated applications, use the wxScrolledWindow implementation as a guide -to build your own scroll behaviour. - -\wxheading{See also} - -\helpref{wxScrollBar}{wxscrollbar}, \helpref{wxClientDC}{wxclientdc}, \helpref{wxPaintDC}{wxpaintdc} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxScrolledWindow::wxScrolledWindow}\label{wxscrolledwindowconstr} - -\func{}{wxScrolledWindow}{\void} - -Default constructor. - -\func{}{wxScrolledWindow}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id = -1},\rtfsp -\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = wxHSCROLL \pipe wxVSCROLL}, \param{const wxString\& }{name = ``scrolledWindow"}} - -Constructor. - -\wxheading{Parameters} - -\docparam{parent}{Parent window.} - -\docparam{id}{Window identifier. A value of -1 indicates a default value.} - -\docparam{pos}{Window position. If a position of (-1, -1) is specified then a default position -is chosen.} - -\docparam{size}{Window size. If a size of (-1, -1) is specified then the window is sized -appropriately.} - -\docparam{style}{Window style. See \helpref{wxScrolledWindow}{wxscrolledwindow}.} - -\docparam{name}{Window name.} - -\wxheading{Remarks} - -The window is initially created without visible scrollbars. -Call \helpref{wxScrolledWindow::SetScrollbars}{wxscrolledwindowsetscrollbars} to -specify how big the virtual window size should be. - -\membersection{wxScrolledWindow::\destruct{wxScrolledWindow}} - -\func{}{\destruct{wxScrolledWindow}}{\void} - -Destructor. - -\membersection{wxScrolledWindow::Create}\label{wxscrolledwindowcreate} - -\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id = -1},\rtfsp -\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = wxHSCROLL \pipe wxVSCROLL}, \param{const wxString\& }{name = ``scrolledWindow"}} - -Creates the window for two-step construction. Derived classes -should call or replace this function. See \helpref{wxScrolledWindow::wxScrolledWindow}{wxscrolledwindowconstr}\rtfsp -for details. - -\membersection{wxScrolledWindow::EnableScrolling}\label{wxscrolledwindowenablescrolling} - -\func{void}{EnableScrolling}{\param{const bool}{ xScrolling}, \param{const bool}{ yScrolling}} - -Enable or disable physical scrolling in the given direction. Physical -scrolling is the physical transfer of bits up or down the -screen when a scroll event occurs. If the application scrolls by a -variable amount (e.g. if there are different font sizes) then physical -scrolling will not work, and you should switch it off. - -\wxheading{Parameters} - -\docparam{xScrolling}{If TRUE, enables physical scrolling in the x direction.} - -\docparam{yScrolling}{If TRUE, enables physical scrolling in the y direction.} - -\wxheading{Remarks} - -Physical scrolling may not be available on all platforms. Where it is available, it is enabled -by default. - -\membersection{wxScrolledWindow::GetScrollPixelsPerUnit}\label{wxscrolledwindowgetscrollpixelsperunit} - -\constfunc{void}{GetScrollPixelsPerUnit}{\param{int* }{xUnit}, \param{int* }{yUnit}} - -Get the number of pixels per scroll unit (line), in each direction, as set -by \helpref{wxScrolledWindow::SetScrollbars}{wxscrolledwindowsetscrollbars}. A value of zero indicates no -scrolling in that direction. - -\wxheading{Parameters} - -\docparam{xUnit}{Receives the number of pixels per horizontal unit.} - -\docparam{yUnit}{Receives the number of pixels per vertical unit.} - -\wxheading{See also} - -\helpref{wxScrolledWindow::SetScrollbars}{wxscrolledwindowsetscrollbars},\rtfsp -\helpref{wxScrolledWindow::GetVirtualSize}{wxscrolledwindowgetvirtualsize} - -\membersection{wxScrolledWindow::GetVirtualSize}\label{wxscrolledwindowgetvirtualsize} - -\constfunc{void}{GetVirtualSize}{\param{int* }{x}, \param{int* }{y}} - -Gets the size in device units of the scrollable window area (as -opposed to the client size, which is the area of the window currently -visible). - -\wxheading{Parameters} - -\docparam{x}{Receives the length of the scrollable window, in pixels.} - -\docparam{y}{Receives the height of the scrollable window, in pixels.} - -\wxheading{Remarks} - -Use \helpref{wxDC::DeviceToLogicalX}{wxdcdevicetologicalx} and \helpref{wxDC::DeviceToLogicalY}{wxdcdevicetologicaly}\rtfsp -to translate these units to logical units. - -\wxheading{See also} - -\helpref{wxScrolledWindow::SetScrollbars}{wxscrolledwindowsetscrollbars},\rtfsp -\helpref{wxScrolledWindow::GetScrollPixelsPerUnit}{wxscrolledwindowgetscrollpixelsperunit} - -\membersection{wxScrolledWindow::IsRetained}\label{wxscrolledwindowisretained} - -\constfunc{bool}{IsRetained}{\void} - -TRUE if the window has a backing bitmap. - -\membersection{wxScrolledWindow::PrepareDC}\label{wxscrolledwindowpreparedc} - -\func{void}{PrepareDC}{\param{wxDC\& }{dc}} - -Call this function to prepare the device context for drawing a scrolled image. It -sets the device origin according to the current scroll position. - -PrepareDC is called automatically within the default \helpref{wxScrolledWindow::OnPaint}{wxscrolledwindowonpaint} event -handler, so your \helpref{wxScrolledWindow::OnDraw}{wxscrolledwindowondraw} override -will be passed a 'pre-scrolled' device context. However, if you wish to draw from -outside of OnDraw (via OnPaint), or you wish to implement OnPaint yourself, you must -call this function yourself. For example: - -\begin{verbatim} -void MyWindow::OnEvent(wxMouseEvent& event) -{ - wxClientDC dc(this); - PrepareDC(dc); - - dc.SetPen(*wxBLACK_PEN); - float x, y; - event.Position(&x, &y); - if (xpos > -1 && ypos > -1 && event.Dragging()) - { - dc.DrawLine(xpos, ypos, x, y); - } - xpos = x; - ypos = y; -} -\end{verbatim} - -\membersection{wxScrolledWindow::OnDraw}\label{wxscrolledwindowondraw} - -\func{virtual void}{OnDraw}{\param{wxDC\& }{dc}} - -Called by the default \helpref{wxScrolledWindow::OnPaint}{wxscrolledwindowonpaint} implementation -to allow the application to define painting behaviour without having to worry about -calling \helpref{wxScrolledWindow::PrepareDC}{wxscrolledwindowpreparedc}. - -\membersection{wxScrolledWindow::OnPaint}\label{wxscrolledwindowonpaint} - -\func{void}{OnPaint}{\param{wxPaintEvent\& }{event}} - -Sent to the window when the window must be refreshed. - -For more details, see \helpref{wxWindow::OnPaint}{wxwindowonpaint}. - -The default implementation for wxScrolledWindow's OnPaint handler is simply: - -\begin{verbatim} -void wxScrolledWindow::OnPaint(wxPaintEvent& event) -{ - wxPaintDC dc(this); - PrepareDC(dc); - - OnDraw(dc); -} -\end{verbatim} - -\membersection{wxScrolledWindow::OnScroll}\label{wxscrolledwindowonscroll} - -\func{void}{OnScroll}{\param{wxScrollEvent\& }{event}} - -Override this function to intercept scroll events. This -member function implements the default scroll behaviour. If -you do not call the default function, you will have to manage -all scrolling behaviour including drawing the window contents -at an appropriate position relative to the scrollbars. - -For more details, see \helpref{wxWindow::OnScroll}{wxwindowonscroll}. - -\wxheading{See also} - -\helpref{wxScrollEvent}{wxscrollevent} - -\membersection{wxScrolledWindow::Scroll}\label{wxscrolledwindowscroll} - -\func{void}{Scroll}{\param{int}{ x}, \param{int}{ y}} - -Scrolls a window so the view start is at the given point. - -\wxheading{Parameters} - -\docparam{x}{The x position to scroll to, in scroll units.} - -\docparam{y}{The y position to scroll to, in scroll units.} - -\wxheading{Remarks} - -The positions are in scroll units, not pixels, so to convert to pixels you -will have to multiply by the number of pixels per scroll increment. -If either parameter is -1, that position will be ignored (no change in -that direction). - -\wxheading{See also} - -\helpref{wxScrolledWindow::SetScrollbars}{wxscrolledwindowsetscrollbars},\rtfsp -\helpref{wxScrolledWindow::GetScrollPixelsPerUnit}{wxscrolledwindowgetscrollpixelsperunit} - -\membersection{wxScrolledWindow::SetScrollbars}\label{wxscrolledwindowsetscrollbars} - -\func{void}{SetScrollbars}{\param{int}{ pixelsPerUnitX}, \param{int}{ pixelsPerUnitY},\rtfsp -\param{int}{ noUnitsX}, \param{int}{ noUnitsY},\rtfsp -\param{int }{xPos = 0}, \param{int}{ yPos = 0}} - -Sets up vertical and/or horizontal scrollbars. - -\wxheading{Parameters} - -\docparam{pixelsPerUnitX}{Pixels per scroll unit in the horizontal direction.} - -\docparam{pixelsPerUnitY}{Pixels per scroll unit in the vertical direction.} - -\docparam{noUnitsX}{Number of units in the horizontal direction.} - -\docparam{noUnitsY}{Number of units in the vertical direction.} - -\docparam{xPos}{Position to initialize the scrollbars in the horizontal direction, in scroll units.} - -\docparam{yPos}{Position to initialize the scrollbars in the vertical direction, in scroll units.} - -\wxheading{Remarks} - -The first pair of parameters give the number of pixels per `scroll step', i.e. amount -moved when the up or down scroll arrows are pressed. -The second pair gives the length of scrollbar in scroll steps, which sets the size of the virtual -window. - -{\it xPos} and {\it yPos} optionally specify a position to scroll to immediately. - -For example, the following gives a window horizontal and vertical -scrollbars with 20 pixels per scroll step, and a size of 50 steps (1000 -pixels) in each direction. - -\begin{verbatim} - window->SetScrollbars(20, 20, 50, 50); -\end{verbatim} - -wxScrolledWindow manages the page size itself, -using the current client window size as the page size. - -Note that for more sophisticated scrolling applications, for example where -scroll steps may be variable according to the position in the document, it will be -necessary to derive a new class from wxWindow, overriding {\bf OnSize} and -adjusting the scrollbars appropriately. - -\membersection{wxScrolledWindow::ViewStart}\label{wxscrolledwindowviewstart} - -\constfunc{void}{ViewStart}{\param{int* }{x}, \param{int* }{ y}} - -Get the position at which the visible portion of the window starts. - -\wxheading{Parameters} - -\docparam{x}{Receives the first visible x position in scroll units.} - -\docparam{y}{Receives the first visible y position in scroll units.} - -\wxheading{Remarks} - -If either of the scrollbars is not at the home position, {\it x} and/or -\rtfsp{\it y} will be greater than zero. Combined with \helpref{wxWindow::GetClientSize}{wxwindowgetclientsize}, -the application can use this function to efficiently redraw only the -visible portion of the window. The positions are in logical scroll -units, not pixels, so to convert to pixels you will have to multiply -by the number of pixels per scroll increment. - -\wxheading{See also} - -\helpref{wxScrolledWindow::SetScrollbars}{wxscrolledwindowsetscrollbars} - diff --git a/docs/latex/wx/settings.tex b/docs/latex/wx/settings.tex deleted file mode 100644 index c85151e9b6..0000000000 --- a/docs/latex/wx/settings.tex +++ /dev/null @@ -1,141 +0,0 @@ -\section{\class{wxSystemSettings}}\label{wxsystemsettings} - -wxSystemSettings allows the application to ask for details about -the system. This can include settings such as standard colours, fonts, -and user interface element sizes. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxFont}{wxfont}, \helpref{wxColour}{wxcolour} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxSystemSettings::wxSystemSettings} - -\func{}{wxSystemSettings}{\void} - -Default constructor. You don't need to create an instance of wxSystemSettings -since all of its functions are static. - -\membersection{wxSystemSettings::GetSystemColour}\label{wxsystemsettingsgetsystemcolour} - -\func{static wxColour}{GetSystemColour}{\param{int}{ index}} - -Returns a system colour. - -{\it index} can be one of: - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf wxSYS\_COLOUR\_SCROLLBAR}}{The scrollbar grey area.} -\twocolitem{{\bf wxSYS\_COLOUR\_BACKGROUND}}{The desktop colour.} -\twocolitem{{\bf wxSYS\_COLOUR\_ACTIVECAPTION}}{Active window caption.} -\twocolitem{{\bf wxSYS\_COLOUR\_INACTIVECAPTION}}{Inactive window caption.} -\twocolitem{{\bf wxSYS\_COLOUR\_MENU}}{Menu background.} -\twocolitem{{\bf wxSYS\_COLOUR\_WINDOW}}{Window background.} -\twocolitem{{\bf wxSYS\_COLOUR\_WINDOWFRAME}}{Window frame.} -\twocolitem{{\bf wxSYS\_COLOUR\_MENUTEXT}}{Menu text.} -\twocolitem{{\bf wxSYS\_COLOUR\_WINDOWTEXT}}{Text in windows.} -\twocolitem{{\bf wxSYS\_COLOUR\_CAPTIONTEXT}}{Text in caption, size box and scrollbar arrow box.} -\twocolitem{{\bf wxSYS\_COLOUR\_ACTIVEBORDER}}{Active window border.} -\twocolitem{{\bf wxSYS\_COLOUR\_INACTIVEBORDER}}{Inactive window border.} -\twocolitem{{\bf wxSYS\_COLOUR\_APPWORKSPACE}}{Background colour MDI applications.} -\twocolitem{{\bf wxSYS\_COLOUR\_HIGHLIGHT}}{Item(s) selected in a control.} -\twocolitem{{\bf wxSYS\_COLOUR\_HIGHLIGHTTEXT}}{Text of item(s) selected in a control.} -\twocolitem{{\bf wxSYS\_COLOUR\_BTNFACE}}{Face shading on push buttons.} -\twocolitem{{\bf wxSYS\_COLOUR\_BTNSHADOW}}{Edge shading on push buttons.} -\twocolitem{{\bf wxSYS\_COLOUR\_GRAYTEXT}}{Greyed (disabled) text.} -\twocolitem{{\bf wxSYS\_COLOUR\_BTNTEXT}}{Text on push buttons.} -\twocolitem{{\bf wxSYS\_COLOUR\_INACTIVECAPTIONTEXT}}{Colour of text in active captions.} -\twocolitem{{\bf wxSYS\_COLOUR\_BTNHIGHLIGHT}}{Highlight colour for buttons (same as wxSYS\_COLOUR\_3DHILIGHT).} -\twocolitem{{\bf wxSYS\_COLOUR\_3DDKSHADOW}}{Dark shadow for three-dimensional dispaly elements.} -\twocolitem{{\bf wxSYS\_COLOUR\_3DLIGHT}}{Light colour for three-dimensional display elements.} -\twocolitem{{\bf wxSYS\_COLOUR\_INFOTEXT}}{Text colour for tooltip controls.} -\twocolitem{{\bf wxSYS\_COLOUR\_INFOBK}}{Background colour for tooltip controls.} -\twocolitem{{\bf wxSYS\_COLOUR\_DESKTOP}}{Same as wxSYS\_COLOUR\_BACKGROUND.} -\twocolitem{{\bf wxSYS\_COLOUR\_3DFACE}}{Same as wxSYS\_COLOUR\_BTNFACE.} -\twocolitem{{\bf wxSYS\_COLOUR\_3DSHADOW}}{Same as wxSYS\_COLOUR\_BTNSHADOW.} -\twocolitem{{\bf wxSYS\_COLOUR\_3DHIGHLIGHT}}{Same as wxSYS\_COLOUR\_BTNHIGHLIGHT.} -\twocolitem{{\bf wxSYS\_COLOUR\_3DHILIGHT}}{Same as wxSYS\_COLOUR\_BTNHIGHLIGHT.} -\twocolitem{{\bf wxSYS\_COLOUR\_BTNHILIGHT}}{Same as wxSYS\_COLOUR\_BTNHIGHLIGHT.} -\end{twocollist} - -\membersection{wxSystemSettings::GetSystemFont}\label{wxsystemsettingsgetsystemfont} - -\func{static wxFont}{GetSystemFont}{\param{int}{ index}} - -Returns a system font. - -{\it index} can be one of: - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf wxSYS\_OEM\_FIXED\_FONT}}{Original equipment manufacturer dependent fixed-pitch font.} -\twocolitem{{\bf wxSYS\_ANSI\_FIXED\_FONT}}{Windows fixed-pitch font.} -\twocolitem{{\bf wxSYS\_ANSI\_VAR\_FONT}}{Windows variable-pitch (proportional) font.} -\twocolitem{{\bf wxSYS\_SYSTEM\_FONT}}{System font.} -\twocolitem{{\bf wxSYS\_DEVICE\_DEFAULT\_FONT}}{Device-dependent font (Windows NT only).} -\twocolitem{{\bf wxSYS\_DEFAULT\_GUI\_FONT}}{Default font for user interface objects such as menus and dialog boxes. -Not available in versions of Windows earlier than Windows 95 or Windows NT 4.0.} -\end{twocollist} - -\membersection{wxSystemSettings::GetSystemMetric}\label{wxsystemsettingsgetsystemmetric} - -\func{static int}{GetSystemMetric}{\param{int}{ index}} - -Returns a system metric. - -{\it index} can be one of: - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf wxSYS\_MOUSE\_BUTTONS}}{Number of buttons on mouse, or zero if no mouse was installed.} -\twocolitem{{\bf wxSYS\_BORDER\_X}}{Width of single border.} -\twocolitem{{\bf wxSYS\_BORDER\_Y}}{Height of single border.} -\twocolitem{{\bf wxSYS\_CURSOR\_X}}{Width of cursor.} -\twocolitem{{\bf wxSYS\_CURSOR\_Y}}{Height of cursor.} -\twocolitem{{\bf wxSYS\_DCLICK\_X}}{Width in pixels of rectangle within which two successive mouse -clicks must fall to generate a double-click.} -\twocolitem{{\bf wxSYS\_DCLICK\_Y}}{Height in pixels of rectangle within which two successive mouse -clicks must fall to generate a double-click.} -\twocolitem{{\bf wxSYS\_DRAG\_X}}{Width in pixels of a rectangle centered on a drag point -to allow for limited movement of the mouse pointer before a drag operation begins.} -\twocolitem{{\bf wxSYS\_DRAG\_Y}}{Height in pixels of a rectangle centered on a drag point -to allow for limited movement of the mouse pointer before a drag operation begins.} -\twocolitem{{\bf wxSYS\_EDGE\_X}}{Width of a 3D border, in pixels. } -\twocolitem{{\bf wxSYS\_EDGE\_Y}}{Height of a 3D border, in pixels. } -\twocolitem{{\bf wxSYS\_HSCROLL\_ARROW\_X}}{Width of arrow bitmap on horizontal scrollbar.} -\twocolitem{{\bf wxSYS\_HSCROLL\_ARROW\_Y}}{Height of arrow bitmap on horizontal scrollbar.} -\twocolitem{{\bf wxSYS\_HTHUMB\_X}}{Width of horizontal scrollbar thumb.} -\twocolitem{{\bf wxSYS\_ICON\_X}}{The default width of an icon.} -\twocolitem{{\bf wxSYS\_ICON\_Y}}{The default height of an icon.} -\twocolitem{{\bf wxSYS\_ICONSPACING\_X}}{Width of a grid cell for items in large icon view, -in pixels. Each item fits into a rectangle of this size when arranged.} -\twocolitem{{\bf wxSYS\_ICONSPACING\_Y}}{Height of a grid cell for items in large icon view, -in pixels. Each item fits into a rectangle of this size when arranged.} -\twocolitem{{\bf wxSYS\_WINDOWMIN\_X}}{Minimum width of a window.} -\twocolitem{{\bf wxSYS\_WINDOWMIN\_Y}}{Minimum height of a window.} -\twocolitem{{\bf wxSYS\_SCREEN\_X}}{Width of the screen in pixels.} -\twocolitem{{\bf wxSYS\_SCREEN\_Y}}{Height of the screen in pixels.} -\twocolitem{{\bf wxSYS\_FRAMESIZE\_X}}{Width of the window frame for a wxTHICK\_FRAME window.} -\twocolitem{{\bf wxSYS\_FRAMESIZE\_Y}}{Height of the window frame for a wxTHICK\_FRAME window.} -\twocolitem{{\bf wxSYS\_SMALLICON\_X}}{Recommended width of a small icon (in window captions, and small icon view).} -\twocolitem{{\bf wxSYS\_SMALLICON\_Y}}{Recommended height of a small icon (in window captions, and small icon view).} -\twocolitem{{\bf wxSYS\_HSCROLL\_Y}}{Height of horizontal scrollbar in pixels.} -\twocolitem{{\bf wxSYS\_VSCROLL\_X}}{Width of vertical scrollbar in pixels.} -\twocolitem{{\bf wxSYS\_VSCROLL\_ARROW\_X}}{Width of arrow bitmap on a vertical scrollbar.} -\twocolitem{{\bf wxSYS\_VSCROLL\_ARROW\_Y}}{Height of arrow bitmap on a vertical scrollbar.} -\twocolitem{{\bf wxSYS\_VTHUMB\_Y}}{Height of vertical scrollbar thumb.} -\twocolitem{{\bf wxSYS\_CAPTION\_Y}}{Height of normal caption area.} -\twocolitem{{\bf wxSYS\_MENU\_Y}}{Height of single-line menu bar.} -\twocolitem{{\bf wxSYS\_NETWORK\_PRESENT}}{1 if there is a network present, 0 otherwise.} -\twocolitem{{\bf wxSYS\_PENWINDOWS\_PRESENT}}{1 if PenWindows is installed, 0 otherwise.} -\twocolitem{{\bf wxSYS\_SHOW\_SOUNDS}}{Non-zero if the user requires an application to present information visually in situations -where it would otherwise present the information only in audible form; zero otherwise.} -\twocolitem{{\bf wxSYS\_SWAP\_BUTTONS}}{Non-zero if the meanings of the left and right mouse buttons are swapped; zero otherwise.} -\end{twocollist} - diff --git a/docs/latex/wx/shelves.bmp b/docs/latex/wx/shelves.bmp deleted file mode 100644 index 2e9a62cc5c..0000000000 Binary files a/docs/latex/wx/shelves.bmp and /dev/null differ diff --git a/docs/latex/wx/size.tex b/docs/latex/wx/size.tex deleted file mode 100644 index be8212ff75..0000000000 --- a/docs/latex/wx/size.tex +++ /dev/null @@ -1,60 +0,0 @@ -\section{\class{wxSize}}\label{wxsize} - -A {\bf wxSize} is a useful data structure for graphics operations. -It simply contains integer {\it x} and {\it y} members. - -\wxheading{Derivation} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxPoint}{wxpoint}, \helpref{wxRealPoint}{wxrealpoint} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxSize::wxSize} - -\func{}{wxSize}{\void} - -\func{}{wxSize}{\param{int}{ x}, \param{int}{ y}} - -Creates a size object. - -\membersection{wxSize::x} - -\member{int}{x} - -x member. - -\membersection{wxSize::y} - -\member{int}{ y} - -y member. - -\membersection{wxSize::GetX}\label{wxsizegetx} - -\constfunc{int}{GetX}{\void} - -Gets the x member. - -\membersection{wxSize::GetY}\label{wxsizegety} - -\constfunc{int}{GetY}{\void} - -Gets the y member. - -\membersection{wxSize::Set}\label{wxsizeset} - -\func{void}{Set}{\param{int}{ x}, \param{int}{ y}} - -Sets the x and y members. - -\membersection{wxSize::operator $=$} - -\func{void}{operator $=$}{\param{const wxSize\& }{sz}} - -Assignment operator. - - diff --git a/docs/latex/wx/sizeevt.tex b/docs/latex/wx/sizeevt.tex deleted file mode 100644 index a06d99fa76..0000000000 --- a/docs/latex/wx/sizeevt.tex +++ /dev/null @@ -1,37 +0,0 @@ -\section{\class{wxSizeEvent}}\label{wxsizeevent} - -A size event holds information about size change events. - -\wxheading{Derived from} - -\helpref{wxEvent}{wxevent}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Event table macros} - -To process a size event, use this event handler macro to direct input to a member -function that takes a wxSizeEvent argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_SIZE(func)}}{Process a wxEVT\_SIZE event.} -\end{twocollist}% - -\wxheading{See also} - -\helpref{wxWindow::OnSize}{wxwindowonsize}, \helpref{wxSize}{wxsize}, \helpref{Event handling overview}{eventhandlingoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxSizeEvent::wxSizeEvent} - -\func{}{wxSizeEvent}{\param{const wxSize\& }{sz}, \param{int }{id = 0}} - -Constructor. - -\membersection{wxSizeEvent::GetSize}\label{wxsizeeventgetsize} - -\constfunc{wxSize}{GetSize}{\void} - -Returns the entire size of the window generating the size change event. - diff --git a/docs/latex/wx/slider.tex b/docs/latex/wx/slider.tex deleted file mode 100644 index 968974c5eb..0000000000 --- a/docs/latex/wx/slider.tex +++ /dev/null @@ -1,371 +0,0 @@ -\section{\class{wxSlider}}\label{wxslider} - -A slider is a control with a handle which can be pulled -back and forth to change the value. - -In Windows versions below Windows 95, a scrollbar is used to simulate the slider. In Windows 95, -the track bar control is used. - -Slider events are handled in the same way as a scrollbar. - -\wxheading{Derived from} - -\helpref{wxControl}{wxcontrol}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxSL\_HORIZONTAL}}{Displays the slider horizontally.} -\twocolitem{\windowstyle{wxSL\_VERTICAL}}{Displays the slider vertically.} -\twocolitem{\windowstyle{wxSL\_AUTOTICKS}}{Displays tick marks.} -\twocolitem{\windowstyle{wxSL\_LABELS}}{Displays minimum, maximum and value labels.} -\twocolitem{\windowstyle{wxSL\_LEFT}}{Displays ticks on the left, if a vertical slider.} -\twocolitem{\windowstyle{wxSL\_RIGHT}}{Displays ticks on the right, if a vertical slider.} -\twocolitem{\windowstyle{wxSL\_TOP}}{Displays ticks on the top, if a horizontal slider.} -\twocolitem{\windowstyle{wxSL\_SELRANGE}}{Allows the user to select a range on the slider. Windows 95 only.} -\end{twocollist} - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Event handling} - -To process input from a slider, use one of these event handler macros to direct input to member -functions that take a \helpref{wxScrollEvent}{wxscrollevent} argument: - -\twocolwidtha{7cm} -\begin{twocollist} -\twocolitem{{\bf EVT\_COMMAND\_SCROLL(id, func)}}{Catch all scroll commands.} -\twocolitem{{\bf EVT\_COMMAND\_TOP(id, func)}}{Catch a command to put the scroll thumb at the maximum position.} -\twocolitem{{\bf EVT\_COMMAND\_BOTTOM(id, func)}}{Catch a command to put the scroll thumb at the maximum position.} -\twocolitem{{\bf EVT\_COMMAND\_LINEUP(id, func)}}{Catch a line up command.} -\twocolitem{{\bf EVT\_COMMAND\_LINEDOWN(id, func)}}{Catch a line down command.} -\twocolitem{{\bf EVT\_COMMAND\_PAGEUP(id, func)}}{Catch a page up command.} -\twocolitem{{\bf EVT\_COMMAND\_PAGEDOWN(id, func)}}{Catch a page down command.} -\twocolitem{{\bf EVT\_COMMAND\_THUMBTRACK(id, func)}}{Catch a thumbtrack command (continuous movement of the scroll thumb).} -\twocolitem{{\bf EVT\_SLIDER(id, func)}}{Process a wxEVT\_COMMAND\_SLIDER\_UPDATED event, -when the slider is moved. Though provided for backward compatibility, this is obsolete.} -\end{twocollist}% - -\wxheading{See also} - -\helpref{Event handling overview}{eventhandlingoverview}, \helpref{wxScrollBar}{wxscrollbar} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxSlider::wxSlider}\label{wxsliderconstr} - -\func{}{wxSlider}{\void} - -Default slider. - -\func{}{wxSlider}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{int }{value },\rtfsp -\param{int}{ minValue}, \param{int}{ maxValue},\rtfsp -\param{const wxPoint\& }{point = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = wxSL\_HORIZONTAL},\rtfsp -\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp -\param{const wxString\& }{name = ``slider"}} - -Constructor, creating and showing a slider. - -\wxheading{Parameters} - -\docparam{parent}{Parent window. Must not be NULL.} - -\docparam{id}{Window identifier. A value of -1 indicates a default value.} - -\docparam{value}{Initial position for the slider.} - -\docparam{minValue}{Minimum slider position.} - -\docparam{maxValue}{Maximum slider position.} - -\docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.} - -\docparam{style}{Window style. See \helpref{wxSlider}{wxslider}.} - -\docparam{validator}{Window validator.} - -\docparam{name}{Window name.} - -\wxheading{See also} - -\helpref{wxSlider::Create}{wxslidercreate}, \helpref{wxValidator}{wxvalidator} - -\membersection{wxSlider::\destruct{wxSlider}} - -\func{void}{\destruct{wxSlider}}{\void} - -Destructor, destroying the slider. - -\membersection{wxSlider::ClearSel}\label{wxsliderclearsel} - -\func{void}{ClearSel}{\void} - -Clears the selection, for a slider with the {\bf wxSL\_SELRANGE} style. - -\wxheading{Remarks} - -Windows 95 only. - -\membersection{wxSlider::ClearTicks}\label{wxsliderclearticks} - -\func{void}{ClearTicks}{\void} - -Clears the ticks. - -\wxheading{Remarks} - -Windows 95 only. - -\membersection{wxSlider::Create}\label{wxslidercreate} - -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{int }{value },\rtfsp -\param{int}{ minValue}, \param{int}{ maxValue},\rtfsp -\param{const wxPoint\& }{point = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = wxSL\_HORIZONTAL},\rtfsp -\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp -\param{const wxString\& }{name = ``slider"}} - -Used for two-step slider construction. See \helpref{wxSlider::wxSlider}{wxsliderconstr}\rtfsp -for further details. - -\membersection{wxSlider::GetLineSize}\label{wxslidergetlinesize} - -\constfunc{int}{GetLineSize}{\void} - -Returns the line size. - -\wxheading{See also} - -\helpref{wxSlider::SetLineSize}{wxslidersetlinesize} - -\membersection{wxSlider::GetMax}\label{wxslidergetmax} - -\constfunc{int}{GetMax}{\void} - -Gets the maximum slider value. - -\wxheading{See also} - -\helpref{wxSlider::GetMin}{wxslidergetmin}, \helpref{wxSlider::SetRange}{wxslidersetrange} - -\membersection{wxSlider::GetMin}\label{wxslidergetmin} - -\constfunc{int}{GetMin}{\void} - -Gets the minimum slider value. - -\wxheading{See also} - -\helpref{wxSlider::GetMin}{wxslidergetmin}, \helpref{wxSlider::SetRange}{wxslidersetrange} - -\membersection{wxSlider::GetPageSize}\label{wxslidergetpagesize} - -\constfunc{int}{GetPageSize}{\void} - -Returns the page size. - -\wxheading{See also} - -\helpref{wxSlider::SetPageSize}{wxslidersetpagesize} - -\membersection{wxSlider::GetSelEnd}\label{wxslidergetselend} - -\constfunc{int}{GetSelEnd}{\void} - -Returns the selection end point. - -\wxheading{Remarks} - -Windows 95 only. - -\wxheading{See also} - -\helpref{wxSlider::GetSelStart}{wxslidergetselstart}, \helpref{wxSlider::SetSelection}{wxslidersetselection} - -\membersection{wxSlider::GetSelStart}\label{wxslidergetselstart} - -\constfunc{int}{GetSelStart}{\void} - -Returns the selection start point. - -\wxheading{Remarks} - -Windows 95 only. - -\wxheading{See also} - -\helpref{wxSlider::GetSelEnd}{wxslidergetselend}, \helpref{wxSlider::SetSelection}{wxslidersetselection} - -\membersection{wxSlider::GetThumbLength}\label{wxslidergetthumblength} - -\constfunc{int}{GetThumbLength}{\void} - -Returns the thumb length. - -\wxheading{Remarks} - -Windows 95 only. - -\wxheading{See also} - -\helpref{wxSlider::SetThumbLength}{wxslidersetthumblength} - -\membersection{wxSlider::GetTickFreq}\label{wxslidergettickfreq} - -\constfunc{int}{GetTickFreq}{\void} - -Returns the tick frequency. - -\wxheading{Remarks} - -Windows 95 only. - -\wxheading{See also} - -\helpref{wxSlider::SetTickFreq}{wxslidersettickfreq} - -\membersection{wxSlider::GetValue}\label{wxslidergetvalue} - -\constfunc{int}{GetValue}{\void} - -Gets the current slider value. - -\wxheading{See also} - -\helpref{wxSlider::GetMin}{wxslidergetmin}, \helpref{wxSlider::GetMax}{wxslidergetmax},\rtfsp -\helpref{wxSlider::SetValue}{wxslidersetvalue} - -\membersection{wxSlider::SetRange}\label{wxslidersetrange} - -\func{void}{SetRange}{\param{int}{ minValue}, \param{int}{ maxValue}} - -Sets the minimum and maximum slider values. - -\wxheading{See also} - -\helpref{wxSlider::GetMin}{wxslidergetmin}, \helpref{wxSlider::GetMax}{wxslidergetmax} - -\membersection{wxSlider::SetTickFreq}\label{wxslidersettickfreq} - -\func{void}{SetTickFreq}{\param{int }{n}, \param{int }{pos}} - -Sets the tick mark frequency and position. - -\wxheading{Parameters} - -\docparam{n}{Frequency. For example, if the frequency is set to two, a tick mark is displayed for -every other increment in the slider's range.} - -\docparam{pos}{Position. Must be greater than zero. TODO: what is this for?} - -\wxheading{Remarks} - -Windows 95 only. - -\wxheading{See also} - -\helpref{wxSlider::GetTickFreq}{wxslidergettickfreq} - -\membersection{wxSlider::SetLineSize}\label{wxslidersetlinesize} - -\func{void}{SetLineSize}{\param{int }{lineSize}} - -Sets the line size for the slider. - -\wxheading{Parameters} - -\docparam{lineSize}{The number of steps the slider moves when the user moves it up or down a line.} - -\wxheading{See also} - -\helpref{wxSlider::GetLineSize}{wxslidergetlinesize} - -\membersection{wxSlider::SetPageSize}\label{wxslidersetpagesize} - -\func{void}{SetPageSize}{\param{int }{pageSize}} - -Sets the page size for the slider. - -\wxheading{Parameters} - -\docparam{pageSize}{The number of steps the slider moves when the user pages up or down.} - -\wxheading{See also} - -\helpref{wxSlider::GetPageSize}{wxslidergetpagesize} - -\membersection{wxSlider::SetSelection}\label{wxslidersetselection} - -\func{void}{SetSelection}{\param{int }{startPos}, \param{int }{endPos}} - -Sets the selection. - -\wxheading{Parameters} - -\docparam{startPos}{The selection start position.} - -\docparam{endPos}{The selection end position.} - -\wxheading{Remarks} - -Windows 95 only. - -\wxheading{See also} - -\helpref{wxSlider::GetSelStart}{wxslidergetselstart}, \helpref{wxSlider::GetSelEnd}{wxslidergetselend} - -\membersection{wxSlider::SetThumbLength}\label{wxslidersetthumblength} - -\func{void}{SetThumbLength}{\param{int }{len}} - -Sets the slider thumb length. - -\wxheading{Parameters} - -\docparam{len}{The thumb length.} - -\wxheading{Remarks} - -Windows 95 only. - -\wxheading{See also} - -\helpref{wxSlider::GetThumbLength}{wxslidergetthumblength} - -\membersection{wxSlider::SetTick}\label{wxslidersettick} - -\func{void}{SetTick}{\param{int}{ tickPos}} - -Sets a tick position. - -\wxheading{Parameters} - -\docparam{tickPos}{The tick position.} - -\wxheading{Remarks} - -Windows 95 only. - -\wxheading{See also} - -\helpref{wxSlider::SetTickFreq}{wxslidersettickfreq} - -\membersection{wxSlider::SetValue}\label{wxslidersetvalue} - -\func{void}{SetValue}{\param{int}{ value}} - -Sets the slider position. - -\wxheading{Parameters} - -\docparam{value}{The slider position.} - -\wxheading{See also} - -\helpref{wxSlider::GetValue}{wxslidergetvalue} - diff --git a/docs/latex/wx/sngchdlg.tex b/docs/latex/wx/sngchdlg.tex deleted file mode 100644 index e5206ecd37..0000000000 --- a/docs/latex/wx/sngchdlg.tex +++ /dev/null @@ -1,94 +0,0 @@ -\section{\class{wxSingleChoiceDialog}}\label{wxsinglechoicedialog} - -This class represents a dialog that shows a list of strings, and allows -the user to select one. Double-clicking on a list item is equivalent to single-clicking -and then pressing OK. - -\wxheading{Derived from} - -\helpref{wxDialog}{wxdialog}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxSingleChoiceDialog overview}{wxsinglechoicedialogoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxSingleChoiceDialog::wxSingleChoiceDialog}\label{wxsinglechoicedialogconstr} - -\func{}{wxSingleChoiceDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message},\rtfsp -\param{const wxString\& }{caption}, \param{int }{n}, \param{const wxString* }{choices},\rtfsp -\param{char**}{ clientData = NULL}, \param{long }{style = wxOK \pipe wxCANCEL \pipe wxCENTRE},\rtfsp -\param{const wxPoint\& }{pos = wxDefaultPosition}} - -Constructor, taking an array of wxString choices and optional client data. - -\func{}{wxSingleChoiceDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message},\rtfsp -\param{const wxString\& }{caption}, \param{const wxStringList\& }{choices},\rtfsp -\param{char**}{ clientData = NULL}, \param{long }{style = wxOK \pipe wxCANCEL \pipe wxCENTRE},\rtfsp -\param{const wxPoint\& }{pos = wxDefaultPosition}} - -Constructor, taking a string list and optional client data. - -\wxheading{Parameters} - -\docparam{parent}{Parent window.} - -\docparam{message}{Message to show on the dialog.} - -\docparam{caption}{The dialog caption.} - -\docparam{n}{The number of choices.} - -\docparam{choices}{An array of strings, or a string list, containing the choices.} - -\docparam{style}{A dialog style (bitlist) containing flags chosen from the following: - -\twocolwidtha{5cm} -\begin{twocollist} -\twocolitem{{\bf wxOK}}{Show an OK button.} -\twocolitem{{\bf wxCANCEL}}{Show a Cancel button.} -\twocolitem{{\bf wxCENTRE}}{Centre the message. Not Windows.} -\end{twocollist} -} - -\docparam{pos}{Dialog position. Not Windows.} - -\wxheading{Remarks} - -Use \helpref{wxSingleChoiceDialog::ShowModal}{wxsinglechoicedialogshowmodal} to show the dialog. - - -\membersection{wxSingleChoiceDialog::\destruct{wxSingleChoiceDialog}} - -\func{}{\destruct{wxSingleChoiceDialog}}{\void} - -Destructor. - -\membersection{wxSingleChoiceDialog::GetSelection} - -\constfunc{int}{GetSelection}{\void} - -Returns the index of selected item. - -\membersection{wxSingleChoiceDialog::GetSelectionClientData} - -\constfunc{char*}{GetSelectionClientData}{\void} - -Returns the client data associated with the selection. - -\membersection{wxSingleChoiceDialog::GetStringSelection} - -\constfunc{wxString}{GetStringSelection}{\void} - -Returns the selected string. - -\membersection{wxSingleChoiceDialog::ShowModal}\label{wxsinglechoicedialogshowmodal} - -\func{int}{ShowModal}{\void} - -Shows the dialog, returning either wxID\_OK or wxID\_CANCEL. - diff --git a/docs/latex/wx/spinbutt.tex b/docs/latex/wx/spinbutt.tex deleted file mode 100644 index 454ea8a0a4..0000000000 --- a/docs/latex/wx/spinbutt.tex +++ /dev/null @@ -1,164 +0,0 @@ -\section{\class{wxSpinButton}}\label{wxspinbutton} - -A wxSpinButton has two small up and down (or left and right) arrow buttons. It is often -used next to a text control for increment and decrementing a value. - -\wxheading{Derived from} - -\helpref{wxControl}{wxcontrol}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxSP\_HORIZONTAL}}{Specifies a horizontal spin button.} -\twocolitem{\windowstyle{wxSP\_VERTICAL}}{Specifies a vertical spin button.} -\twocolitem{\windowstyle{wxSP\_ARROW\_KEYS}}{The user can use arrow keys.} -\twocolitem{\windowstyle{wxSP\_WRAP}}{The value wraps at the minimum and maximum.} -\end{twocollist} - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Remarks} - -TODO - -\wxheading{Event handling} - -To process input from a spin button, use one of these event handler macros to direct input to member -functions that take a \helpref{wxScrollEvent}{wxscrollevent} argument: - -\twocolwidtha{7cm} -\begin{twocollist} -\twocolitem{{\bf EVT\_SPIN(id, func)}}{Catch all scroll commands.} -\twocolitem{{\bf EVT\_SPIN\_UP(id, func)}}{Catch up (or left) commands.} -\twocolitem{{\bf EVT\_SPIN\_DOWN(id, func)}}{Catch down (or right) commands.} -\twocolitem{{\bf EVT\_COMMAND\_TOP(id, func)}}{Catch a command to put the scroll thumb at the maximum position.} -\twocolitem{{\bf EVT\_COMMAND\_SCROLL(id, func)}}{Catch all scroll commands.} -\twocolitem{{\bf EVT\_COMMAND\_TOP(id, func)}}{Catch a command to put the scroll thumb at the maximum position.} -\twocolitem{{\bf EVT\_COMMAND\_BOTTOM(id, func)}}{Catch a command to put the scroll thumb at the maximum position.} -\twocolitem{{\bf EVT\_COMMAND\_LINEUP(id, func)}}{Catch a line up command.} -\twocolitem{{\bf EVT\_COMMAND\_LINEDOWN(id, func)}}{Catch a line down command.} -\twocolitem{{\bf EVT\_COMMAND\_PAGEUP(id, func)}}{Catch a page up command.} -\twocolitem{{\bf EVT\_COMMAND\_PAGEDOWN(id, func)}}{Catch a page down command.} -\twocolitem{{\bf EVT\_COMMAND\_THUMBTRACK(id, func)}}{Catch a thumbtrack command (continuous movement of the scroll thumb).} -\end{twocollist}% - -\wxheading{See also} - -\helpref{Event handling overview}{eventhandlingoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxSpinButton::wxSpinButton}\label{wxspinbuttonconstr} - -\func{}{wxSpinButton}{\void} - -Default constructor. - -\func{}{wxSpinButton}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp -\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = wxSP\_HORIZONTAL}, \param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp -\param{const wxString\& }{name = ``spinButton"}} - -Constructor, creating and showing a spin button. - -\wxheading{Parameters} - -\docparam{parent}{Parent window. Must not be NULL.} - -\docparam{id}{Window identifier. A value of -1 indicates a default value.} - -\docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.} - -\docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.} - -\docparam{style}{Window style. See \helpref{wxSpinButton}{wxspinbutton}.} - -\docparam{validator}{Window validator.} - -\docparam{name}{Window name.} - -\wxheading{See also} - -\helpref{wxSpinButton::Create}{wxspinbuttoncreate}, \helpref{wxValidator}{wxvalidator} - -\membersection{wxSpinButton::\destruct{wxSpinButton}} - -\func{void}{\destruct{wxSpinButton}}{\void} - -Destructor, destroying the spin button. - -\membersection{wxSpinButton::Create}\label{wxspinbuttoncreate} - -\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp -\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = wxSP\_HORIZONTAL}, \param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp -\param{const wxString\& }{name = ``spinButton"}} - -Scrollbar creation function called by the spin button constructor. -See \helpref{wxSpinButton::wxSpinButton}{wxspinbuttonconstr} for details. - -\membersection{wxSpinButton::GetMax}\label{wxspinbuttongetmax} - -\constfunc{int}{GetMax}{\void} - -Returns the maximum permissable value. - -\wxheading{See also} - -\helpref{wxSpinButton::SetRange}{wxspinbuttonsetrange} - -\membersection{wxSpinButton::GetMin}\label{wxspinbuttongetmin} - -\constfunc{int}{GetMin}{\void} - -Returns the minimum permissable value. - -\wxheading{See also} - -\helpref{wxSpinButton::SetRange}{wxspinbuttonsetrange} - -\membersection{wxSpinButton::GetValue}\label{wxspinbuttongetvalue} - -\constfunc{int}{GetValue}{\void} - -Returns the current spin button value. - -\wxheading{See also} - -\helpref{wxSpinButton::SetValue}{wxspinbuttonsetvalue} - -\membersection{wxSpinButton::SetRange}\label{wxspinbuttonsetrange} - -\func{void}{SetRange}{\param{int}{ min}, \param{int}{ max}} - -Sets the range of the spin button. - -\wxheading{Parameters} - -\docparam{min}{The minimum value for the spin button.} - -\docparam{max}{The maximum value for the spin button.} - -\wxheading{See also} - -\helpref{wxSpinButton::GetMin}{wxspinbuttongetmin}, \helpref{wxSpinButton::GetMax}{wxspinbuttongetmax} - -\membersection{wxSpinButton::SetValue}\label{wxspinbuttonsetvalue} - -\func{void}{SetValue}{\param{int}{ value}} - -Sets the value of the spin button. - -\wxheading{Parameters} - -\docparam{value}{The value for the spin button.} - -\wxheading{See also} - -\helpref{wxSpinButton::GetValue}{wxspinbuttongetvalue} - diff --git a/docs/latex/wx/splitter.bmp b/docs/latex/wx/splitter.bmp deleted file mode 100644 index f52c2ff463..0000000000 Binary files a/docs/latex/wx/splitter.bmp and /dev/null differ diff --git a/docs/latex/wx/splitter.eps b/docs/latex/wx/splitter.eps deleted file mode 100644 index 43c72b63ba..0000000000 --- a/docs/latex/wx/splitter.eps +++ /dev/null @@ -1,301 +0,0 @@ -%!PS-Adobe-2.0 EPSF-1.2 -%%BoundingBox: 0 0 400 282 -%%Creator: JASC, Inc. -%%Title: D:\wx2\docs\latex\wx\splitter.eps -%%CreationDate: 0 -%%EndComments -/width 400 def -/height 282 def -/pixwidth 400 def -/pixheight 282 def -/picstr width string def -/psppic { -gsave width height 8 -[width 0 0 height 0 height neg] -{currentfile picstr readhexstring pop} -false 3 colorimage grestore } def -0 height neg translate pixwidth pixheight scale -psppic -000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -C0C0C0808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0C0C0C0C0C0C0C0C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0000000000000000000000000000000000000000000000000000000000000000000000000000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0808080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFF000000000000000000000000000000000000000000000000000000000000000000000000000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000C0C0C0808080808080808080808080808080808080808080808080808080808080808080000000C0C0C0808080808080808080808080808080808080808080808080808080808080000000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0808080808080808080808080808080808080808080808080808080808080808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0808080000000C0C0C0808080808080808080808080808080808080808080808080808080808080808080000000C0C0C0808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080000000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080808080808080808080808080808080808080808080808080808080808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0000000000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0000000000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0000000000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0000000000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0000000000000000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0000000000000000000C0C0C0C0C0C0C0C0C0808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0000000000000000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0000000000000000000C0C0C0C0C0C0C0C0C0808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0000000000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0000000000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0000000000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0000000000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000C0C0C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF808080000000C0C0C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF808080000000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF808080000000C0C0C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF808080000000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0808080000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF000000000000000000000000000000000000000000000000000000000000000000000000000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0808080808080808080808080808080808080808080808080808080808080808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0808080808080808080808080808080808080808080808080808080808080808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0000000000000000000C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0000000000000000000C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0000000000000000000000000000000C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0000000000000000000000000000000C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000FF0000FF0000FF0000FF0000FF0000000000000000000000000000FF0000FF0000FF0000FF0000000000000000000000000000FF0000FF0000FF0000FF0000000000000000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000FF0000000000000000000000000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000FFFF00FFFF00FFFF00FFFF00FFFF00000000000000000000000000FFFF00FFFF00FFFF00FFFF00000000000000000000000000FFFF00FFFF00FFFF00FFFF00000000000000FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00FFFF00000000000000000000000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000FF0000FF0000FF0000FF0000000000000000000000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000FFFF00FFFF00FFFF00FFFF00000000000000000000FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000FF0000FF0000FF0000FF0000000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000FFFF00FFFF00FFFF00FFFF00000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000FF0000FF0000FF0000FF0000000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000000000000000FF0000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000FFFF00FFFF00FFFF00FFFF00000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000000000000000FFFF00FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000FF0000FF0000FF0000000000000000000000000000000000000000000000FF0000FF0000000000000000FF0000FF0000FF0000FF0000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000FFFF00FFFF00FFFF00000000000000000000000000000000000000000000FFFF00FFFF00000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000FF0000FF0000000000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000FFFF00FFFF00000000FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000FF0000000000FF0000FF0000FF0000000000000000000000000000FF0000FF0000FF0000FF0000000000000000000000000000FF0000FF0000000000000000000000000000FF0000000000000000FF0000FF0000000000000000000000000000000000FF0000FF0000FF0000FF0000000000000000000000000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000FFFF00000000FFFF00FFFF00FFFF00000000000000000000000000FFFF00FFFF00FFFF00FFFF00000000000000000000000000FFFF00FFFF00000000000000000000000000FFFF00000000000000FFFF00FFFF00000000000000000000000000000000FFFF00FFFF00FFFF00FFFF00000000000000000000000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000FF0000FF0000000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000000000000000000000000000000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000000000000000000000000000000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF000000000000000000000000000000000000000000000000000000000000000000000000000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0808080808080808080808080808080808080808080808080808080808080808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0808080808080808080808080808080808080808080808080808080808080808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF000000000000000000000000000000000000000000000000000000000000000000000000000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0808080808080808080808080808080808080808080808080808080808080808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0808080808080808080808080808080808080808080808080808080808080808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0000000000000000000000000000000C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0000000000000000000000000000000C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0000000000000000000C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0000000000000000000C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000FF0000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF808080000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000FFFF00000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF808080000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C080808000000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0808080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0C0C0FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080FFFFFFC0C0C0C0C0C0C0C0C0808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080FFFFFFC0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0000000000000000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0000000C0C0C0000000C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0000000C0C0C0000000000000000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0000000C0C0C0000000C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000000000000000000000C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0000000C0C0C0000000C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0000000000000000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000000000000000000000000000C0C0C0000000C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0000080000080000000808080808080000000808000808000808000808000808000808000000000008000008000000000808080000000000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0000080000080808080FFFFFFFFFFFF808080FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00008000008000008000808080FFFFFF808080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000080C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0000080000080808080FFFFFFFFFFFF808080FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00008000008000008000808080FFFFFF808080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFF808080808080808080808080808080808080808080808080808080808080808080808080808080808080000000FFFFFF808080808080808080808080808080808080808080808080808080808080808080808080808080808080000000000080000080FFFFFF808080808080808080808080808080808080808080808080808080808080808080808080808080808080000000000080000080C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0000080000080808080FFFFFFFFFFFF808080808000808000808000808000808000808000000000008000008000808080FFFFFF808080000080000080000080FFFFFF000080000080000080FFFFFF000080000080FFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFF000080000080000080FFFFFFFFFFFFFFFFFFFFFFFF000080000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080000080FFFFFFFFFFFF000080000080000080FFFFFFFFFFFF000080000080000080FFFFFFFFFFFFFFFFFF000080000080FFFFFFFFFFFF000080000080000080000080000080FFFFFFFFFFFF000080000080000080FFFFFFFFFFFF000080000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080000080FFFFFFFFFFFFFFFFFFFFFFFF000080000080000080000080000080000080000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFF000080000080FFFFFFFFFFFF000080000080FFFFFFFFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000000080000080FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000000080000080C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0000080000080808080FFFFFFFFFFFF808080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF808080FFFFFF808080000080000080000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080000080000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080000080FFFFFFFFFFFF000080000080000080FFFFFFFFFFFF000080000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFF000080000080000080000080000080FFFFFFFFFFFF000080000080000080FFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080000080000080000080000080000080000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFC0C0C0C0C0C0C0C0C0000000000000000000000000000000000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000FFFFFFC0C0C0C0C0C0000000000000000000000000000000000000000000000000000000C0C0C0C0C0C0808080000000000080000080FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000000080000080C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0000080000080808080FFFFFFFFFFFF808080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF808080FFFFFF808080000080000080FFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFF000080000080000080FFFFFFFFFFFFFFFFFF000080000080FFFFFF000080000080000080000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080000080FFFFFFFFFFFF000080000080000080FFFFFFFFFFFF000080000080FFFFFFFFFFFFFFFFFF000080000080000080FFFFFFFFFFFF000080000080000080000080000080FFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080000080000080000080000080000080000080FFFFFFFFFFFF000080000080000080000080000080000080FFFFFFFFFFFFFFFFFF000080000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFC0C0C0C0C0C0C0C0C0000000000000000000000000000000000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000FFFFFFC0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0808080000000000080000080FFFFFFC0C0C0C0C0C0C0C0C0000000000000C0C0C0C0C0C0C0C0C0C0C0C0000000000000C0C0C0C0C0C0808080000000000080000080C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0000080000080808080FFFFFFFFFFFF808080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF808080FFFFFF808080000080000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFF000080000080000080FFFFFFFFFFFFFFFFFF000080000080000080000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080000080FFFFFFFFFFFF000080000080000080FFFFFFFFFFFF000080000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080000080000080000080000080000080000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080000080000080FFFFFFFFFFFFFFFFFF000080000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000FFFFFFC0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0808080000000000080000080FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0000000000000C0C0C0C0C0C0000000000000C0C0C0C0C0C0C0C0C0808080000000000080000080C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0000080000080808080FFFFFFFFFFFF808080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF808080FFFFFF808080000080000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080000080000080000080000080000080000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000FFFFFFC0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0808080000000000080000080FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000000000000000000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000000080000080C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0000080000080808080FFFFFFFFFFFF808080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000808080000000000080000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFF000080000080000080000080000080FFFFFFFFFFFFFFFFFFFFFFFF000080000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFF000080000080FFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFF000080000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080000080FFFFFFFFFFFFFFFFFFFFFFFF000080000080000080000080000080000080000080FFFFFFFFFFFF000080000080000080000080FFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080FFFFFFFFFFFFFFFFFFFFFFFF000080000080FFFFFFFFFFFF000080000080FFFFFFFFFFFFFFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000FFFFFFC0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0808080000000000080000080FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000000080000080C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0000080000080808080FFFFFFFFFFFF808080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000800000FF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFFFFFFFFFFFFFFFFFFF000080000080000080000080000080000080000080000080FFFFFFFFFFFF000080000080000080000080000080FFFFFFFFFFFF000080000080000080FFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFFFFFFF000080000080000080FFFFFFFFFFFF000080000080000080FFFFFFFFFFFF000080000080000080000080000080000080000080000080FFFFFFFFFFFF000080000080000080000080000080000080000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000FFFFFFC0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0808080000000000080000080FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000000000000000000000C0C0C0C0C0C0C0C0C0C0C0C0808080000000000080000080C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0000080000080808080FFFFFFFFFFFF808080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000800000FF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFFFFFFFFFFFFF000080000080000080000080000080000080000080000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080000080FFFFFFFFFFFF000080000080000080FFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFFFFFFF000080000080000080FFFFFFFFFFFF000080000080000080FFFFFFFFFFFF000080000080000080000080000080000080000080000080FFFFFFFFFFFF000080000080000080000080000080000080000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000FFFFFFC0C0C0C0C0C0000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0808080000000000080000080FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0000000000000C0C0C0C0C0C0000000000000C0C0C0C0C0C0C0C0C0808080000000000080000080C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0000080000080000000808080808080000000808080808080808080808080808080808080808080808080808080000000000080000000000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFFFFFFF000080FFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFFFFFFF000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000FFFFFFC0C0C0C0C0C0000000000000000000000000000000000000000000000000000000C0C0C0C0C0C0808080000000000080000080FFFFFFC0C0C0C0C0C0C0C0C0000000000000C0C0C0C0C0C0C0C0C0C0C0C0000000000000C0C0C0C0C0C0808080000000000080000080C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0000080000080800000FF0000FF0000800000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF808080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000FFFFFFC0C0C0C0C0C0000000000000000000000000000000000000000000000000000000C0C0C0C0C0C0808080000000000080000080FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000000080000080C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0000080000080800000FF0000FF0000800000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF808080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000000080000080FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000000080000080C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0000080000080800000FF0000FF0000800000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF808080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000080000080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000080000080C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0000080000080000000800000800000000000808080808080808080808080808080808080808080808080808080808080808080000000000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080000080C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0808080000000 -C0C0C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF808080000000 -C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0000000 -%%Trailer diff --git a/docs/latex/wx/splitter.gif b/docs/latex/wx/splitter.gif deleted file mode 100644 index bb6071e1bb..0000000000 --- a/docs/latex/wx/splitter.gif +++ /dev/null @@ -1 +0,0 @@ -GIF89a \ No newline at end of file diff --git a/docs/latex/wx/splitter.tex b/docs/latex/wx/splitter.tex deleted file mode 100644 index 9febf0b911..0000000000 --- a/docs/latex/wx/splitter.tex +++ /dev/null @@ -1,340 +0,0 @@ -\section{\class{wxSplitterWindow}}\label{wxsplitterwindow} - -\overview{wxSplitterWindow overview}{wxsplitterwindowoverview} - -This class manages up to two subwindows. The current view can be -split into two programmatically (perhaps from a menu command), and unsplit -either programmatically or via the wxSplitterWindow user interface. - -Appropriate 3D shading for the Windows 95 user interface is an option. - -\wxheading{Window styles} - -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxSP\_3D}}{Draws a 3D effect border and sash.} -\twocolitem{\windowstyle{wxSP\_BORDER}}{Draws a thin black border around the window, and a black sash.} -\twocolitem{\windowstyle{wxSP\_NOBORDER}}{No border, and a black sash.} -\end{twocollist} - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Derived from} - -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxSplitterWindow::wxSplitterWindow}\label{wxsplitterwindowconstr} - -\func{}{wxSplitterWindow}{\void} - -Default constructor. - -\func{}{wxSplitterWindow}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id}, \param{int }{x},\rtfsp -\param{const wxPoint\& }{point = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long }{style=wxSP\_3D}, \param{const wxString\&}{ name = "splitterWindow"}} - -Constructor for creating the window. - -\wxheading{Parameters} - -\docparam{parent}{The parent of the splitter window.} - -\docparam{id}{The window identifier.} - -\docparam{pos}{The window position.} - -\docparam{size}{The window size.} - -\docparam{style}{The window style. See \helpref{wxSplitterWindow}{wxsplitterwindow}.} - -\docparam{name}{The window name.} - -\wxheading{Remarks} - -After using this constructor, you must create either one or two subwindows -with the splitter window as parent, and then call one of \helpref{wxSplitterWindow::Initialize}{wxsplitterwindowinitialize},\rtfsp -\helpref{wxSplitterWindow::SplitVertically}{wxsplitterwindowsplitvertically} and \helpref{wxSplitterWindow::SplitHorizontally}{wxsplitterwindowsplithorizontally} in -order to set the pane(s). - -You can create two windows, with one hidden when not being shown; or you can -create and delete the second pane on demand. - -\wxheading{See also} - -\helpref{wxSplitterWindow::Initialize}{wxsplitterwindowinitialize}, \helpref{wxSplitterWindow::SplitVertically}{wxsplitterwindowsplitvertically},\rtfsp -\helpref{wxSplitterWindow::SplitHorizontally}{wxsplitterwindowsplithorizontally},\rtfsp -\helpref{wxSplitterWindow::Create}{wxsplitterwindowcreate} - -\membersection{wxSplitterWindow::\destruct{wxSplitterWindow}} - -\func{}{\destruct{wxSplitterWindow}}{\void} - -Destroys the wxSplitterWindow and its children. - -\membersection{wxSplitterWindow::Create}\label{wxsplitterwindowcreate} - -\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id}, \param{int }{x},\rtfsp -\param{const wxPoint\& }{point = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long }{style=wxSP\_3D}, \param{const wxString\&}{ name = "splitterWindow"}} - -Creation function, for two-step construction. See \helpref{wxSplitterWindow::wxSplitterWindow}{wxsplitterwindowconstr} for -details. - -\membersection{wxSplitterWindow::GetMinimumPaneSize}\label{wxsplitterwindowgetminimumpanesize} - -\constfunc{int}{GetMinimumPaneSize}{\void} - -Returns the current minimum pane size (defaults to zero). - -\wxheading{See also} - -\helpref{wxSplitterWindow::SetMinimumPaneSize}{wxsplitterwindowsetminimumpanesize} - -\membersection{wxSplitterWindow::GetSashPosition}\label{wxsplitterwindowgetsashposition} - -\func{int}{GetSashPosition}{\void} - -Returns the current sash position. - -\wxheading{See also} - -\helpref{wxSplitterWindow::SetSashPosition}{wxsplitterwindowsetsashposition} - -\membersection{wxSplitterWindow::GetSplitMode}\label{wxsplitterwindowgetsplitmode} - -\constfunc{int}{GetSplitMode}{\void} - -Gets the split mode. - -\wxheading{See also} - -\helpref{wxSplitterWindow::SetSplitMode}{wxsplitterwindowsetsplitmode}, \helpref{wxSplitterWindow::SplitVertically}{wxsplitterwindowsplitvertically},\rtfsp -\helpref{wxSplitterWindow::SplitHorizontally}{wxsplitterwindowsplithorizontally}. - -\membersection{wxSplitterWindow::GetWindow1}\label{wxsplitterwindowgetwindow1} - -\constfunc{wxWindow*}{GetWindow1}{\void} - -Returns the left/top or only pane. - -\membersection{wxSplitterWindow::GetWindow2}\label{wxsplitterwindowgetwindow2} - -\constfunc{wxWindow*}{GetWindow2}{\void} - -Returns the right/bottom pane. - -\membersection{wxSplitterWindow::Initialize}\label{wxsplitterwindowinitialize} - -\func{void}{Initialize}{\param{wxWindow* }{window}} - -Initializes the splitter window to have one pane. - -\wxheading{Parameters} - -\docparam{window}{The pane for the unsplit window.} - -\wxheading{Remarks} - -This should be called if you wish to initially view only a single pane in the splitter window. - -\wxheading{See also} - -\helpref{wxSplitterWindow::SplitVertically}{wxsplitterwindowsplitvertically},\rtfsp -\helpref{wxSplitterWindow::SplitHorizontally}{wxsplitterwindowsplithorizontally}. - -\membersection{wxSplitterWindow::IsSplit}\label{wxsplitterwindowissplit} - -\constfunc{bool}{IsSplit}{\void} - -Returns TRUE if the window is split, FALSE otherwise. - -\membersection{wxSplitterWindow::OnDoubleClickSash}\label{wxsplitterwindowondoubleclicksash} - -\func{virtual void}{OnDoubleClickSash}{\param{int }{x}, \param{int }{y}} - -Application-overridable function called when the sash is double-clicked with -the left mouse button. - -\wxheading{Parameters} - -\docparam{x}{The x position of the mouse cursor.} - -\docparam{y}{The y position of the mouse cursor.} - -\wxheading{Remarks} - -The default implementation of this function calls \helpref{Unsplit}{wxsplitterwindowunsplit} if -the minimum pane size is zero. - -\wxheading{See also} - -\helpref{wxSplitterWindow::Unsplit}{wxsplitterwindowunsplit} - -\membersection{wxSplitterWindow::OnUnsplit}\label{wxsplitterwindowonunsplit} - -\func{virtual void}{OnUnsplit}{\param{wxWindow* }{removed}} - -Application-overridable function called when the window is unsplit, either -programmatically or using the wxSplitterWindow user interface. - -\wxheading{Parameters} - -\docparam{removed}{The window being removed.} - -\wxheading{Remarks} - -The default implementation of this function simply hides {\it removed}. You -may wish to delete the window. - -\wxheading{See also} - -\helpref{wxSplitterWindow::Unsplit}{wxsplitterwindowunsplit} - -\membersection{wxSplitterWindow::SetSashPosition}\label{wxsplitterwindowsetsashposition} - -\func{void}{SetSashPosition}{\param{int }{position}, \param{const bool}{ redraw = TRUE}} - -Sets the sash position. - -\wxheading{Parameters} - -\docparam{position}{The sash position in pixels.} - -\docparam{redraw}{If TRUE, resizes the panes and redraws the sash and border.} - -\wxheading{Remarks} - -Does not currently check for an out-of-range value. - -\wxheading{See also} - -\helpref{wxSplitterWindow::GetSashPosition}{wxsplitterwindowgetsashposition} - -\membersection{wxSplitterWindow::SetMinimumPaneSize}\label{wxsplitterwindowsetminimumpanesize} - -\func{void}{SetMinimumPaneSize}{\param{int }{paneSize}} - -Sets the minimum pane size. - -\wxheading{Parameters} - -\docparam{paneSize}{Minimum pane size in pixels.} - -\wxheading{Remarks} - -The default minimum pane size is zero, which means that either pane can be reduced to zero by dragging -the sash, thus removing one of the panes. To prevent this behaviour (and veto out-of-range sash dragging), -set a minimum size, for example 20 pixels. - -\wxheading{See also} - -\helpref{wxSplitterWindow::GetMinimumPaneSize}{wxsplitterwindowgetminimumpanesize} - -\membersection{wxSplitterWindow::SetSplitMode}\label{wxsplitterwindowsetsplitmode} - -\func{void}{SetSplitMode}{\param{int }{mode}} - -Sets the split mode. - -\wxheading{Parameters} - -\docparam{mode}{Can be wxSPLIT\_VERTICAL or wxSPLIT\_HORIZONTAL.} - -\wxheading{Remarks} - -Only sets the internal variable; does not update the display. - -\wxheading{See also} - -\helpref{wxSplitterWindow::GetSplitMode}{wxsplitterwindowgetsplitmode}, \helpref{wxSplitterWindow::SplitVertically}{wxsplitterwindowsplitvertically},\rtfsp -\helpref{wxSplitterWindow::SplitHorizontally}{wxsplitterwindowsplithorizontally}. - -\membersection{wxSplitterWindow::SplitHorizontally}\label{wxsplitterwindowsplithorizontally} - -\func{bool}{SplitHorizontally}{\param{wxWindow* }{window1}, \param{wxWindow* }{window2}, - \param{int}{ sashPosition = -1}} - -Initializes the top and bottom panes of the splitter window. - -\wxheading{Parameters} - -\docparam{window1}{The top pane.} - -\docparam{window2}{The bottom pane.} - -\docparam{sashPosition}{The initial position of the sash. If the value is -1, a default position -is chosen.} - -\wxheading{Return value} - -TRUE if successful, FALSE otherwise (the window was already split). - -\wxheading{Remarks} - -This should be called if you wish to initially view two panes. It can also be called at any subsequent time, -but the application should check that the window is not currently split using \helpref{IsSplit}{wxsplitterwindowissplit}. - -\wxheading{See also} - -\helpref{wxSplitterWindow::SplitVertically}{wxsplitterwindowsplitvertically}, \helpref{wxSplitterWindow::IsSplit}{wxsplitterwindowissplit},\rtfsp -\helpref{wxSplitterWindow::Unsplit}{wxsplitterwindowunsplit}. - -\membersection{wxSplitterWindow::SplitVertically}\label{wxsplitterwindowsplitvertically} - -\func{bool}{SplitVertically}{\param{wxWindow* }{window1}, \param{wxWindow* }{window2}, - \param{int}{ sashPosition = -1}} - -Initializes the left and right panes of the splitter window. - -\wxheading{Parameters} - -\docparam{window1}{The left pane.} - -\docparam{window2}{The right pane.} - -\docparam{sashPosition}{The initial position of the sash. If the value is -1, a default position -is chosen.} - -\wxheading{Return value} - -TRUE if successful, FALSE otherwise (the window was already split). - -\wxheading{Remarks} - -This should be called if you wish to initially view two panes. It can also be called at any subsequent time, -but the application should check that the window is not currently split using \helpref{IsSplit}{wxsplitterwindowissplit}. - -\wxheading{See also} - -\helpref{wxSplitterWindow::SplitHorizontally}{wxsplitterwindowsplithorizontally}, \helpref{wxSplitterWindow::IsSplit}{wxsplitterwindowissplit},\rtfsp -\helpref{wxSplitterWindow::Unsplit}{wxsplitterwindowunsplit}. - -\membersection{wxSplitterWindow::Unsplit}\label{wxsplitterwindowunsplit} - -\func{bool}{Unsplit}{\param{wxWindow* }{toRemove = NULL}} - -Unsplits the window. - -\wxheading{Parameters} - -\docparam{toRemove}{The pane to remove, or NULL to remove the right or bottom pane.} - -\wxheading{Return value} - -TRUE if successful, FALSE otherwise (the window was not split). - -\wxheading{Remarks} - -This call will not actually delete the pane being removed; it calls \helpref{OnUnsplit}{wxsplitterwindowonunsplit}\rtfsp -which can be overridden for the desired behaviour. By default, the pane being removed is hidden. - -\wxheading{See also} - -\helpref{wxSplitterWindow::SplitHorizontally}{wxsplitterwindowsplithorizontally}, \helpref{wxSplitterWindow::SplitVertically}{wxsplitterwindowsplitvertically},\rtfsp -\helpref{wxSplitterWindow::IsSplit}{wxsplitterwindowissplit}, \helpref{wxSplitterWindow::OnUnsplit}{wxsplitterwindowonunsplit} - - - diff --git a/docs/latex/wx/statbmp.tex b/docs/latex/wx/statbmp.tex deleted file mode 100644 index f6afca75b4..0000000000 --- a/docs/latex/wx/statbmp.tex +++ /dev/null @@ -1,92 +0,0 @@ -\section{\class{wxStaticBitmap}}\label{wxstaticbitmap} - -A static bitmap control displays a bitmap. - -\wxheading{Derived from} - -\helpref{wxControl}{wxcontrol}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -There are no special styles for this control. - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{See also} - -\helpref{wxStaticBitmap}{wxstaticbitmap}, \helpref{wxStaticBox}{wxstaticbox} - -\wxheading{Remarks} - -The bitmap to be displayed should have a small number of colours, such as 16, to avoid -palette problems. - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxStaticBitmap::wxStaticBitmap}\label{wxstaticbitmapconstr} - -\func{}{wxStaticBitmap}{\void} - -Default constructor. - -\func{}{wxStaticBitmap}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp -\param{const wxBitmap\& }{label = ``"}, \param{const wxPosition\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = 0}, \param{const wxString\& }{name = ``staticBitmap"}} - -Constructor, creating and showing a text control. - -\wxheading{Parameters} - -\docparam{parent}{Parent window. Should not be NULL.} - -\docparam{id}{Control identifier. A value of -1 denotes a default value.} - -\docparam{label}{Bitmap label.} - -\docparam{pos}{Window position.} - -\docparam{size}{Window size.} - -\docparam{style}{Window style. See \helpref{wxStaticBitmap}{wxstaticbitmap}.} - -\docparam{name}{Window name.} - -\wxheading{See also} - -\helpref{wxStaticBitmap::Create}{wxstaticbitmapcreate} - -\membersection{wxStaticBitmap::Create}\label{wxstaticbitmapcreate} - -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp -\param{const wxBitmap\& }{label = ``"}, \param{const wxPosition\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = 0}, \param{const wxString\& }{name = ``staticBitmap"}} - -Creation function, for two-step construction. For details see \helpref{wxStaticBitmap::wxStaticBitmap}{wxstaticbitmapconstr}. - -\membersection{wxStaticBitmap::GetBitmap}\label{wxstaticbitmapgetbitmap} - -\constfunc{wxBitmap\&}{GetBitmap}{\void} - -Returns a reference to the label bitmap. - -\wxheading{See also} - -\helpref{wxStaticBitmap::SetBitmap}{wxstaticbitmapsetbitmap} - -\membersection{wxStaticBitmap::SetBitmap}\label{wxstaticbitmapsetbitmap} - -\func{virtual void}{SetBitmap}{\param{const wxBitmap\& }{ label}} - -Sets the bitmap label. - -\wxheading{Parameters} - -\docparam{label}{The new bitmap.} - -\wxheading{See also} - -\docparam{wxStaticBitmap::GetBitmap}{wxstaticbitmapgetbitmap} - diff --git a/docs/latex/wx/statbox.tex b/docs/latex/wx/statbox.tex deleted file mode 100644 index d57fbca254..0000000000 --- a/docs/latex/wx/statbox.tex +++ /dev/null @@ -1,72 +0,0 @@ -\section{\class{wxStaticBox}}\label{wxstaticbox} - -A static box is a rectangle drawn around other panel items to denote -a logical grouping of items. - -\wxheading{Derived from} - -\helpref{wxControl}{wxcontrol}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -There are no special styles for this control. - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{See also} - -\helpref{wxStaticText}{wxstatictext} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxStaticBox::wxStaticBox}\label{wxstaticboxconstr} - -\func{}{wxStaticBox}{\void} - -Default constructor. - -\func{}{wxStaticBox}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxString\& }{label},\rtfsp -\param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = 0}, \param{const wxString\& }{name = ``staticBox"}} - -Constructor, creating and showing a static box. - -\wxheading{Parameters} - -\docparam{parent}{Parent window. Must not be NULL.} - -\docparam{id}{Window identifier. A value of -1 indicates a default value.} - -\docparam{label}{Text to be displayed in the static box, the empty string for no label.} - -\docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.} - -\docparam{size}{Checkbox size. If the size (-1, -1) is specified then a default size is chosen.} - -\docparam{style}{Window style. See \helpref{wxStaticBox}{wxstaticbox}.} - -\docparam{name}{Window name.} - -\wxheading{See also} - -\helpref{wxStaticBox::Create}{wxstaticboxcreate} - -\membersection{wxStaticBox::\destruct{wxStaticBox}} - -\func{void}{\destruct{wxStaticBox}}{\void} - -Destructor, destroying the group box. - -\membersection{wxStaticBox::Create}\label{wxstaticboxcreate} - -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxString\& }{label},\rtfsp -\param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = 0}, \param{const wxString\& }{name = ``staticBox"}} - -Creates the static box for two-step construction. See \helpref{wxStaticBox::wxStaticBox}{wxstaticboxconstr}\rtfsp -for further details. - - diff --git a/docs/latex/wx/stattext.tex b/docs/latex/wx/stattext.tex deleted file mode 100644 index bae9c23bb1..0000000000 --- a/docs/latex/wx/stattext.tex +++ /dev/null @@ -1,84 +0,0 @@ -\section{\class{wxStaticText}}\label{wxstatictext} - -A static text control displays one or more lines of read-only text. - -TODO: should a static text have a validator? E.g. if you wanted -to use it to initialise the control with some text taken from -the validator. - -\wxheading{Derived from} - -\helpref{wxControl}{wxcontrol}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -There are no special styles for this control. - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{See also} - -\helpref{wxStaticBitmap}{wxstaticbitmap}, \helpref{wxStaticBox}{wxstaticbox} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxStaticText::wxStaticText}\label{wxstatictextconstr} - -\func{}{wxStaticText}{\void} - -Default constructor. - -\func{}{wxStaticText}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp -\param{const wxString\& }{label = ``"}, \param{const wxPosition\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = 0}, \param{const wxString\& }{name = ``staticText"}} - -Constructor, creating and showing a text control. - -\wxheading{Parameters} - -\docparam{parent}{Parent window. Should not be NULL.} - -\docparam{id}{Control identifier. A value of -1 denotes a default value.} - -\docparam{label}{Text label.} - -\docparam{pos}{Window position.} - -\docparam{size}{Window size.} - -\docparam{style}{Window style. See \helpref{wxStaticText}{wxstatictext}.} - -\docparam{name}{Window name.} - -\wxheading{See also} - -\helpref{wxStaticText::Create}{wxstatictextcreate} - -\membersection{wxStaticText::Create}\label{wxstatictextcreate} - -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp -\param{const wxString\& }{label = ``"}, \param{const wxPosition\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = 0}, \param{const wxString\& }{name = ``staticText"}} - -Creation function, for two-step construction. For details see \helpref{wxStaticText::wxStaticText}{wxstatictextconstr}. - -\membersection{wxStaticText::GetLabel}\label{wxstatictextgetlabel} - -\constfunc{wxString}{GetLabel}{\void} - -Returns the contents of the control. - -\membersection{wxStaticText::SetLabel}\label{wxstatictextsetlabel} - -\func{virtual void}{SetLabel}{\param{const wxString\& }{ label}} - -Sets the static text label. - -\wxheading{Parameters} - -\docparam{label}{The new label to set. It may contain newline characters.} - - diff --git a/docs/latex/wx/statusbr.tex b/docs/latex/wx/statusbr.tex deleted file mode 100644 index 965e30bc28..0000000000 --- a/docs/latex/wx/statusbr.tex +++ /dev/null @@ -1,245 +0,0 @@ -\section{\class{wxStatusBar}}\label{wxstatusbar} - -A status bar is a narrow window that can be placed along the bottom of a frame to give -small amounts of status information. It can contain one or more fields, one or more of which can -be variable length according to the size of the window. - -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxSB\_SIZEGRIP}}{On Windows 95, displays a gripper at right-hand side of -the status bar.} -\end{twocollist} - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Remarks} - -It is possible to create controls and other windows on the status bar. Position these windows -from an {\bf OnSize} event handler. - -\wxheading{See also} - -\helpref{wxFrame}{wxframe} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxStatusBar::wxStatusBar}\label{wxstatusbarconstr} - -\func{}{wxStatusBar}{\void} - -Default constructor. - -\func{}{wxStatusBar}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp -\param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp -\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp -\param{const wxString\& }{name = ``statusBar"}} - -Constructor, creating the window. - -\wxheading{Parameters} - -\docparam{parent}{The window parent, usually a frame.} - -\docparam{id}{The window identifier. It may take a value of -1 to indicate a default value.} - -\docparam{pos}{The window position. A value of (-1, -1) indicates a default position, chosen by -either the windowing system or wxWindows, depending on platform.} - -\docparam{size}{The window size. A value of (-1, -1) indicates a default size, chosen by -either the windowing system or wxWindows, depending on platform.} - -\docparam{style}{The window style. See \helpref{wxStatusBar}{wxstatusbar}.} - -\docparam{name}{The name of the window. This parameter is used to associate a name with the item, -allowing the application user to set Motif resource values for -individual windows.} - -\wxheading{See also} - -\helpref{wxStatusBar::Create}{wxstatusbarcreate} - -\membersection{wxStatusBar::\destruct{wxStatusBar}} - -\func{void}{\destruct{wxStatusBar}}{\void} - -Destructor. - -\membersection{wxStatusBar::Create}\label{wxstatusbarcreate} - -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp -\param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp -\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp -\param{const wxString\& }{name = ``statusBar"}} - -Creates the window, for two-step construction. - -See \helpref{wxStatusBar::wxStatusBar}{wxstatusbarconstr} for details. - -\membersection{wxStatusBar::GetFieldRect}\label{wxstatusbargetfieldrect} - -\constfunc{virtual bool}{GetFieldRect}{\param{int}{ i}, \param{wxRect\&}{ rect}} - -Returns the size and position of a fields internal bounding rectangle. - -\wxheading{Parameters} - -\docparam{i}{The field in question.} - -\docparam{rect}{The rectangle values are placed in this variable.} - -\wxheading{Return value} - -TRUE if the field index is valid, FALSE otherwise. - -\wxheading{See also} - -\helpref{wxRect}{wxrect} - -\membersection{wxStatusBar::GetFieldsCount}\label{wxstatusbargetfieldscount} - -\constfunc{int}{GetFieldsCount}{\void} - -Returns the number of fields in the status bar. - -\membersection{wxStatusBar::GetStatusText}\label{wxstatusbargetstatustext} - -\constfunc{virtual wxString}{GetStatusText}{\param{int}{ ir = 0}} - -Returns the string associated with a status bar field. - -\wxheading{Parameters} - -\docparam{i}{The number of the status field to retrieve, starting from zero.} - -\wxheading{Return value} - -The status field string if the field is valid, otherwise the empty string. - -\wxheading{See also} - -\helpref{wxStatusBar::SetStatusText}{wxstatusbarsetstatustext} - -\membersection{wxStatusBar::DrawField}\label{wxstatusbardrawfield} - -\func{virtual void}{DrawField}{\param{wxDC\& }{dc}, \param{int }{i}} - -Draws a field, including shaded borders and text. - -\wxheading{Parameters} - -\docparam{dc}{The device context to draw onto.} - -\docparam{i}{The field to be drawn.} - -\wxheading{See also} - -\helpref{wxStatusBar::DrawFieldText}{wxstatusbardrawfieldtext} - -\membersection{wxStatusBar::DrawFieldText}\label{wxstatusbardrawfieldtext} - -\func{virtual void}{DrawFieldText}{\param{wxDC\& }{dc}, \param{int }{i}} - -Draws a field's text. - -\wxheading{Parameters} - -\docparam{dc}{The device context to draw onto.} - -\docparam{i}{The field whose text is to be drawn.} - -\wxheading{See also} - -\helpref{wxStatusBar::DrawField}{wxstatusbardrawfield} - -\membersection{wxStatusBar::InitColours}\label{wxstatusbarinitcolours} - -\func{virtual void}{InitColours}{\void} - -Sets up the background colour and shading pens using suitable system colours (Windows) or tasteful shades -of grey (other platforms). - -\wxheading{Remarks} - -This function is called when the window is created, and also -from \helpref{wxStatusBar::OnSysColourChanged}{wxstatusbaronsyscolourchanged} on Windows. - -\wxheading{See also} - -\helpref{wxStatusBar::OnSysColourChanged}{wxstatusbaronsyscolourchanged} - -\membersection{wxStatusBar::OnSysColourChanged}\label{wxstatusbaronsyscolourchanged} - -\func{void}{OnSysColourChanged}{\param{wxSysColourChangedEvent\& }{event}} - -Handles a system colour change by calling \helpref{wxStatusBar::InitColours}{wxstatusbarinitcolours}, -and refreshes the window. - -\wxheading{Parameters} - -\docparam{event}{The colour change event.} - -\wxheading{See also} - -\helpref{wxStatusBar::InitColours}{wxstatusbarinitcolours} - -\membersection{wxStatusBar::SetFieldsCount}\label{wxstatusbarsetfieldscount} - -\func{virtual void}{SetFieldsCount}{\param{int}{ number = 1}, \param{int* }{widths = NULL}} - -Sets the number of fields, and optionally the field widths. - -\wxheading{Parameters} - -\docparam{number}{The number of fields.} - -\docparam{widths}{An array of {\it n} integers, each of which is a status field width -in pixels. A value of -1 indicates that the field is variable width; at least one -field must be -1.} - -\membersection{wxStatusBar::SetStatusText}\label{wxstatusbarsetstatustext} - -\func{virtual void}{SetStatusText}{\param{const wxString\& }{text}, \param{int}{ i = 0}} - -Sets the text for one field. - -\wxheading{Parameters} - -\docparam{text}{The text to be set. Use an empty string (``") to clear the field.} - -\docparam{i}{The field to set, starting from zero.} - -\wxheading{See also} - -\helpref{wxStatusBar::GetStatusText}{wxstatusbargetstatustext}, \helpref{wxFrame::SetStatusText}{wxframesetstatustext} - -\membersection{wxStatusBar::SetStatusWidths}\label{wxstatusbarsetstatuswidths} - -\func{virtual void}{SetStatusWidths}{\param{int}{ n}, \param{int *}{widths}} - -Sets the widths of the fields in the status line. - -\wxheading{Parameters} - -\docparam{n}{The number of fields in the status bar.} - -\docparam{widths}{Must contain an array of {\it n} integers, each of which is a status field width -in pixels. A value of -1 indicates that the field is variable width; at least one -field must be -1. You should delete this array after calling {\bf SetStatusWidths}.} - -\wxheading{Remarks} - -The widths of the variable fields are calculated from the total width of all fields, -minus the sum of widths of the non-variable fields, divided by the number of -variable fields. - -\wxheading{See also} - -\helpref{wxStatusBar::SetFieldsCount}{wxstatusbarsetfieldscount}, \helpref{wxFrame::SetStatusWidths}{wxframesetstatuswidths} - - diff --git a/docs/latex/wx/strlist.tex b/docs/latex/wx/strlist.tex deleted file mode 100644 index 0c45fe457e..0000000000 --- a/docs/latex/wx/strlist.tex +++ /dev/null @@ -1,68 +0,0 @@ -\section{\class{wxStringList}}\label{wxstringlist} - -A string list is a list which is assumed to contain strings, with a -specific member functions. Memory is allocated when strings are added to -the list, and deallocated by the destructor or by the {\bf Delete}\rtfsp -member. - -\wxheading{Derived from} - -\helpref{wxList}{wxlist}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxString}{wxstring}, \helpref{wxList}{wxlist} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxStringList::wxStringList} - -\func{}{wxStringList}{\void} - -Constructor. - -\func{void}{wxStringList}{\param{char* }{first}, ...} - -Constructor, taking NULL-terminated string argument list. wxStringList -allocates memory for the strings. - -\membersection{wxStringList::\destruct{wxStringList}} - -\func{}{\destruct{wxStringList}}{\void} - -Deletes string list, deallocating strings. - -\membersection{wxStringList::Add} - -\func{wxNode *}{Add}{\param{const wxString\& }{s}} - -Adds string to list, allocating memory. - -\membersection{wxStringList::Delete} - -\func{void}{Delete}{\param{const wxString\& }{s}} - -Searches for string and deletes from list, deallocating memory. - -\membersection{wxStringList::ListToArray} - -\func{char*}{ListToArray}{\param{bool}{ new\_copies = FALSE}} - -Converts the list to an array of strings, only allocating new memory if -\rtfsp{\bf new\_copies} is TRUE. - -\membersection{wxStringList::Member} - -\func{bool}{Member}{\param{const wxString\& }{s}} - -Returns TRUE if {\bf s} is a member of the list (tested using {\bf strcmp}). - -\membersection{wxStringList::Sort} - -\func{void}{Sort}{\void} - -Sorts the strings in ascending alphabetical order. Note that all nodes -(but not strings) get deallocated and new ones allocated. - - diff --git a/docs/latex/wx/sysclevt.tex b/docs/latex/wx/sysclevt.tex deleted file mode 100644 index dc1fd4918a..0000000000 --- a/docs/latex/wx/sysclevt.tex +++ /dev/null @@ -1,40 +0,0 @@ -\section{\class{wxSysColourChangedEvent}}\label{wxsyscolourchangedevent} - -This class is used for system colour change events, which are generated -when the user changes the colour settings using the control panel. -This is only appropriate under Windows. - -\wxheading{Derived from} - -\helpref{wxEvent}{wxevent}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Event table macros} - -To process a system colour changed event, use this event handler macro to direct input to a member -function that takes a wxSysColourChanged argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_SYS\_COLOUR\_CHANGED(func)}}{Process a wxEVT\_SYS\_COLOUR\_CHANGED event.} -\end{twocollist}% - -\wxheading{Remarks} - -The default event handler for this event propagates the event to child windows, since -Windows only sends the events to top-level windows. If -intercepting this event for a top-level window, remember to call the base class handler, -or to pass the event on to the window's children explicitly. - -\wxheading{See also} - -\helpref{wxWindow::OnSysColourChanged}{wxwindowonsyscolourchanged}, \helpref{Event handling overview}{eventhandlingoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxSysColourChangedEvent::wxSysColourChanged} - -\func{}{wxSysColourChanged}{\void} - -Constructor. - diff --git a/docs/latex/wx/tab.tex b/docs/latex/wx/tab.tex deleted file mode 100644 index d4c7ce3900..0000000000 --- a/docs/latex/wx/tab.tex +++ /dev/null @@ -1,568 +0,0 @@ -\section{\class{wxTabbedDialog}}\label{wxtabbeddialog} - -A dialog suitable for handling tabs. - -\wxheading{Derived from} - -\helpref{wxDialog}{wxdialog}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{Tab classes overview}{wxtaboverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxTabbedDialog::wxTabbedDialog} - -\func{}{wxTabbedDialog}{\param{wxWindow *}{parent}, \param{wxWindowID }{id}, - \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size}, - \param{long}{ style=wxDEFAULT\_DIALOG\_STYLE}, \param{const wxString\& }{name="dialogBox"}} - -Constructor. - -\membersection{wxTabbedDialog::\destruct{wxTabbedDialog}} - -\func{}{\destruct{wxTabbedDialog}}{\void} - -Destructor. This destructor deletes the tab view associated with the dialog box. -If you do not wish this to happen, set the tab view to NULL before destruction (for example, -in the OnCloseWindow event handler). - -\membersection{wxTabbedDialog::SetTabView} - -\func{void}{SetTabView}{\param{wxTabView *}{view}} - -Sets the tab view associated with the dialog box. - -\membersection{wxTabbedDialog::GetTabView} - -\func{wxTabView *}{GetTabView}{\void} - -Returns the tab view associated with the dialog box. - -\section{\class{wxTabbedPanel}}\label{wxtabbedpanel} - -A panel suitable for handling tabs. - -\wxheading{Derived from} - -\helpref{wxPanel}{wxpanel}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{Tab classes overview}{wxtaboverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxTabbedPanel::wxTabbedPanel} - -\func{}{wxTabbedPanel}{\param{wxWindow *}{parent}, \param{wxWindowID}{ id}, - \param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size}, - \param{long}{ style=0}, \param{const wxString\& }{name="panel"}} - -Constructor. - -\membersection{wxTabbedPanel::SetTabView} - -\func{void}{SetTabView}{\param{wxTabView *}{view}} - -Sets the tab view associated with the panel. - -\membersection{wxTabbedPanel::GetTabView} - -\func{wxTabView *}{GetTabView}{\void} - -Returns the tab view associated with the panel. - -\section{\class{wxTabControl}}\label{wxtabcontrol} - -You will rarely need to use this class directly. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\overview{Tab classes overview}{wxtaboverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxTabControl::wxTabControl} - -\func{void}{wxTabControl}{\param{wxTabView *}{view = NULL}} - -Constructor. - -\membersection{wxTabControl::GetColPosition} - -\func{int}{GetColPosition}{\void} - -Returns the position of the tab in the tab column. - -\membersection{wxTabControl::GetFont} - -\func{wxFont *}{GetFont}{\void} - -Returns the font to be used for this tab. - -\membersection{wxTabControl::GetHeight} - -\func{int}{GetHeight}{\void} - -Returns the tab height. - -\membersection{wxTabControl::GetId} - -\func{int}{GetId}{\void} - -Returns the tab identifier. - -\membersection{wxTabControl::GetLabel} - -\func{wxString}{GetLabel}{\void} - -Returns the tab label. - -\membersection{wxTabControl::GetRowPosition} - -\func{int}{GetRowPosition}{\void} - -Returns the position of the tab in the layer or row. - -\membersection{wxTabControl::GetSelected} - -\func{bool}{GetSelected}{\void} - -Returns the selected flag. - -\membersection{wxTabControl::GetWidth} - -\func{int}{GetWidth}{\void} - -Returns the tab width. - -\membersection{wxTabControl::GetX} - -\func{int}{GetX}{\void} - -Returns the x offset from the top-left of the view area. - -\membersection{wxTabControl::GetY} - -\func{int}{GetY}{\void} - -Returns the y offset from the top-left of the view area. - -\membersection{wxTabControl::HitTest} - -\func{bool}{HitTest}{\param{int}{ x}, \param{int}{ y}} - -Returns TRUE if the point x, y is within the tab area. - -\membersection{wxTabControl::OnDraw} - -\func{void}{OnDraw}{\param{wxDC\& }{dc}, \param{bool}{ lastInRow}} - -Draws the tab control on the given device context. - -\membersection{wxTabControl::SetColPosition} - -\func{void}{SetColPosition}{\param{int}{ pos}} - -Sets the position in the column. - -\membersection{wxTabControl::SetFont} - -\func{void}{SetFont}{\param{wxFont *}{font}} - -Sets the font to be used for this tab. - -\membersection{wxTabControl::SetId} - -\func{void}{SetId}{\param{int}{ id}} - -Sets the tab identifier. - -\membersection{wxTabControl::SetLabel} - -\func{void}{SetLabel}{\param{const wxString\& }{str}} - -Sets the label for the tab. - -\membersection{wxTabControl::SetPosition} - -\func{void}{SetPosition}{\param{int}{ x}, \param{int}{ y}} - -Sets the x and y offsets for this tab, measured from the top-left of the view area. - -\membersection{wxTabControl::SetRowPosition} - -\func{void}{SetRowPosition}{\param{int}{ pos}} - -Sets the position on the layer (row). - -\membersection{wxTabControl::SetSelected} - -\func{void}{SetSelected}{\param{bool }{selected}} - -Sets the selection flag for this tab (does not set the current tab for the view; -use wxTabView::SetSelectedTab for that). - -\membersection{wxTabControl::SetSize} - -\func{void}{SetSize}{\param{int}{ width}, \param{int}{ height}} - -Sets the width and height for this tab. - -\section{\class{wxTabView}}\label{wxtabview} - -Responsible for drawing tabs onto a window, and dealing with input. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxTabView overview}{wxtabviewoverview}, \helpref{wxPanelTabView}{wxpaneltabview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxTabView::wxTabView} - -\func{}{wxTabView}{\param{long }{style = wxTAB\_STYLE\_DRAW\_BOX \pipe wxTAB\_STYLE\_COLOUR\_INTERIOR}} - -Constructor. - -{\it style} may be a bit list of the following: - -\begin{twocollist}\itemsep=0pt -\twocolitem{wxTAB\_STYLE\_DRAW\_BOX}{Draw a box around the view area. Most commonly used for dialogs.} -\twocolitem{wxTAB\_STYLE\_COLOUR\_INTERIOR}{Draw tab backgrounds in the specified colour. Omitting this style -will ensure that the tab background matches the dialog background.} -\end{twocollist} - -\membersection{wxTabView::AddTab}\label{wxtabviewaddtab} - -\func{wxTabControl *}{AddTab}{\param{int}{ id}, \param{const wxString\& }{label}, \param{wxTabControl *}{existingTab=NULL}} - -Adds a tab to the view. - -{\it id} is the application-chosen identifier for the tab, which will be used in subsequent tab operations. - -{\it label} is the label to give the tab. - -{\it existingTab} maybe NULL to specify a new tab, or non-NULL to indicate that an existing tab should be used. - -A new layer (row) is started when the current layer has been filled up with tabs. - -\membersection{wxTabView::CalculateTabWidth}\label{wxtabviewcalculatetabwidth} - -\func{int}{CalculateTabWidth}{\param{int}{ noTabs}, \param{bool}{ adjustView = FALSE}} - -The application can specify the tab width using this function, in terms -of the number of tabs per layer (row) which will fit the view area, which -should have been set previously with SetViewRect. - -{\it noTabs} is the number of tabs which should take up the full width -of the view area. - -{\it adjustView} can be set to TRUE in order to readjust the view width -to exactly fit the given number of tabs. - -The new tab width is returned. - -\membersection{wxTabView::ClearTabs} - -\func{void}{ClearTabs}{\param{bool }{deleteTabs=TRUE}} - -Clears the tabs, deleting them if {\it deleteTabs} is TRUE. - -\membersection{wxTabView::Draw} - -\func{void}{Draw}{\param{wxDC\& }{dc}} - -Draws the tabs and (optionally) a box around the view area. - -\membersection{wxTabView::FindTabControlForId} - -\func{wxTabControl *}{FindTabControlForId}{\param{int}{ id}} - -Finds the wxTabControl corresponding to {\it id}. - -\membersection{wxTabView::FindTabControlForPosition} - -\func{wxTabControl *}{FindTabControlForPosition}{\param{int}{ layer}, \param{int}{ position}} - -Finds the wxTabControl at layer {\it layer}, position in layer {\it position}, both starting from -zero. Note that tabs change layer as they are selected or deselected. - -\membersection{wxTabView::GetBackgroundBrush} - -\func{wxBrush *}{GetBackgroundBrush}{\void} - -Returns the brush used to draw in the background colour. It is set when -SetBackgroundColour is called. - -\membersection{wxTabView::GetBackgroundColour} - -\func{wxColour}{GetBackgroundColour}{\void} - -Returns the colour used for each tab background. By default, this is -light grey. To ensure a match with the dialog or panel background, omit -the wxTAB\_STYLE\_COLOUR\_INTERIOR flag from the wxTabView constructor. - -\membersection{wxTabView::GetBackgroundPen} - -\func{wxPen *}{GetBackgroundPen}{\void} - -Returns the pen used to draw in the background colour. It is set when -SetBackgroundColour is called. - -\membersection{wxTabView::GetHighlightColour} - -\func{wxColour}{GetHighlightColour}{\void} - -Returns the colour used for bright highlights on the left side of `3D' surfaces. By default, this is white. - -\membersection{wxTabView::GetHighlightPen} - -\func{wxPen *}{GetHighlightPen}{\void} - -Returns the pen used to draw 3D effect highlights. This is set when -SetHighlightColour is called. - -\membersection{wxTabView::GetHorizontalTabOffset} - -\func{int}{GetHorizontalTabOffset}{\void} - -Returns the horizontal spacing by which each tab layer is offset from the one below. - -\membersection{wxTabView::GetNumberOfLayers} - -\func{int}{GetNumberOfLayers}{\void} - -Returns the number of layers (rows of tabs). - -\membersection{wxTabView::GetSelectedTabFont} - -\func{wxFont *}{GetSelectedTabFont}{\void} - -Returns the font to be used for the selected tab label. - -\membersection{wxTabView::GetShadowColour} - -\func{wxColour}{GetShadowColour}{\void} - -Returns the colour used for shadows on the right-hand side of `3D' surfaces. By default, this is dark grey. - -\membersection{wxTabView::GetTabHeight} - -\func{int}{GetTabHeight}{\void} - -Returns the tab default height. - -\membersection{wxTabView::GetTabFont} - -\func{wxFont *}{GetTabFont}{\void} - -Returns the tab label font. - -\membersection{wxTabView::GetTabSelectionHeight} - -\func{int}{GetTabSelectionHeight}{\void} - -Returns the height to be used for the currently selected tab; normally a few pixels -higher than the other tabs. - -\membersection{wxTabView::GetTabStyle} - -\func{long}{GetTabStyle}{\void} - -Returns the tab style. See constructor documentation for details of valid styles. - -\membersection{wxTabView::GetTabWidth} - -\func{int}{GetTabWidth}{\void} - -Returns the tab default width. - -\membersection{wxTabView::GetTextColour} - -\func{wxColour}{GetTextColour}{\void} - -Returns the colour used to draw label text. By default, this is -black. - -\membersection{wxTabView::GetTopMargin} - -\func{int}{GetTopMargin}{\void} - -Returns the height between the top of the view area and the bottom of the first -row of tabs. - -\membersection{wxTabView::GetShadowPen} - -\func{wxPen *}{GetShadowPen}{\void} - -Returns the pen used to draw 3D effect shadows. This is set when -SetShadowColour is called. - -\membersection{wxTabView::GetViewRect} - -\func{wxRectangle}{GetViewRect}{\void} - -Returns the rectangle specifying the view area (above which tabs are -placed). - -\membersection{wxTabView::GetVerticalTabTextSpacing} - -\func{int}{GetVerticalTabTextSpacing}{\void} - -Returns the vertical spacing between the top of an unselected tab, and the tab label. - -\membersection{wxTabView::GetWindow} - -\func{wwxWindow *}{GetWindow}{\void} - -Returns the window for the view. - -\membersection{wxTabView::OnCreateTabControl} - -\func{wxTabControl *}{OnCreateTabControl}{\void} - -Creates a new tab control. By default, this returns a wxTabControl object, but the application may wish -to define a derived class, in which case the tab view should be subclassed and this function overridden. - -\membersection{wxTabView::Layout} - -\func{void}{Layout}{\void} - -Recalculates the positions of the tabs, and adjusts the layer of the selected tab if necessary. - -You may want to call this function if the view width has changed (for example, from an OnSize handler). - -\membersection{wxTabView::OnEvent} - -\func{bool}{OnEvent}{\param{wxMouseEvent\& }{event}} - -Processes mouse events sent from the panel or dialog. Returns TRUE if the event was processed, -FALSE otherwise. - -\membersection{wxTabView::OnTabActivate} - -\func{void}{OnTabActivate}{\param{int}{ activateId}, \param{int}{ deactivateId}} - -Called when a tab is activated, with the new active tab id, and the former active tab id. - -\membersection{wxTabView::OnTabPreActivate} - -\func{bool}{OnTabPreActivate}{\param{int}{ activateId}, \param{int}{ deactivateId}} - -Called just before a tab is activated, with the new active tab id, and the former active tab id. - -If the function returns FALSE, the tab is not activated. - -\membersection{wxTabView::SetBackgroundColour} - -\func{void}{SetBackgroundColour}{\param{const wxColour\&}{ col}} - -Sets the colour to be used for each tab background. By default, this is -light grey. To ensure a match with the dialog or panel background, omit -the wxTAB\_STYLE\_COLOUR\_INTERIOR flag from the wxTabView constructor. - -\membersection{wxTabView::SetHighlightColour} - -\func{void}{SetHighlightColour}{\param{const wxColour\&}{ col}} - -Sets the colour to be used for bright highlights on the left side of `3D' surfaces. By default, this is white. - -\membersection{wxTabView::SetHorizontalTabOffset} - -\func{void}{SetHorizontalTabOffset}{\param{int}{ offset}} - -Sets the horizontal spacing by which each tab layer is offset from the one below. - -\membersection{wxTabView::SetSelectedTabFont} - -\func{void}{SetSelectedTabFont}{\param{wxFont *}{font}} - -Sets the font to be used for the selected tab label. - -\membersection{wxTabView::SetShadowColour} - -\func{void}{SetShadowColour}{\param{const wxColour\&}{ col}} - -Sets the colour to be used for shadows on the right-hand side of `3D' surfaces. By default, this is dark grey. - -\membersection{wxTabView::SetTabFont} - -\func{void}{SetTabFont}{\param{wxFont *}{font}} - -Sets the tab label font. - -\membersection{wxTabView::SetTabStyle} - -\func{void}{SetTabStyle}{\param{long}{ tabStyle}} - -Sets the tab style. See constructor documentation for details of valid styles. - -\membersection{wxTabView::SetTabSize} - -\func{void}{SetTabSize}{\param{int}{ width}, \param{int}{ height}} - -Sets the tab default width and height. - -\membersection{wxTabView::SetTabSelectionHeight} - -\func{void}{SetTabSelectionHeight}{\param{int}{ height}} - -Sets the height to be used for the currently selected tab; normally a few pixels -higher than the other tabs. - -\membersection{wxTabView::SetTabSelection} - -\func{void}{SetTabSelection}{\param{int}{ sel}, \param{bool}{ activateTool=TRUE}} - -Sets the selected tab, calling the application's OnTabActivate function. - -If {\it activateTool} is FALSE, OnTabActivate will not be called. - -\membersection{wxTabView::SetTextColour} - -\func{void}{SetTextColour}{\param{const wxColour\&}{ col}} - -Sets the colour to be used to draw label text. By default, this is -black. - -\membersection{wxTabView::SetTopMargin} - -\func{void}{SetTopMargin}{\param{int}{ margin}} - -Sets the height between the top of the view area and the bottom of the first -row of tabs. - -\membersection{wxTabView::SetVerticalTabTextSpacing} - -\func{void}{SetVerticalTabTextSpacing}{\param{int}{ spacing}} - -Sets the vertical spacing between the top of an unselected tab, and the tab label. - -\membersection{wxTabView::SetViewRect}\label{wxtabviewsetviewrect} - -\func{void}{SetViewRect}{\param{const wxRectangle\& }{rect}} - -Sets the rectangle specifying the view area (above which tabs are -placed). This must be set by the application. - -\membersection{wxTabView::SetWindow} - -\func{void}{SetWindow}{\param{wxWindow *}{window}} - -Set the window that the tab view will use for drawing onto. - diff --git a/docs/latex/wx/tabctrl.tex b/docs/latex/wx/tabctrl.tex deleted file mode 100644 index 05aa81886d..0000000000 --- a/docs/latex/wx/tabctrl.tex +++ /dev/null @@ -1,232 +0,0 @@ -\section{\class{wxTabCtrl}}\label{wxtabctrl} - -This class represents a tab control, which manages multiple tabs. - -\wxheading{Derived from} - -\helpref{wxControl}{wxcontrol}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxTabEvent}{wxtabevent}, \helpref{wxImageList}{wximagelist} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxTabCtrl::wxTabCtrl}\label{wxtabctrlconstr} - -\func{}{wxTabCtrl}{\void} - -Default constructor. - -\func{}{wxTabCtrl}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, - \param{const wxSize\&}{ size}, \param{long}{ style = 0}, \param{const wxString\& }{name = "tabCtrl"}} - -Constructs a tab control. - -\wxheading{Parameters} - -\docparam{parent}{The parent window. Must be non-NULL.} - -\docparam{id}{The window identifier.} - -\docparam{pos}{The window position.} - -\docparam{size}{The window size.} - -\docparam{style}{The window style. Its value is a bit list of zero or more of {\bf wxTC\_MULTILINE}, - {\bf wxTC\_RIGHTJUSTIFY}, {\bf wxTC\_FIXEDWIDTH} and {\bf wxTC\_OWNERDRAW}.} - -\membersection{wxTabCtrl::\destruct{wxTabCtrl}} - -\func{}{\destruct{wxTabCtrl}}{\void} - -Destroys the wxTabCtrl object. - -\membersection{wxTabCtrl::Create}\label{wxtabctrlcreate} - -\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, - \param{const wxSize\&}{ size}, \param{long}{ style = 0}, \param{const wxString\& }{name = "tabCtrl"}} - -Creates a tab control. See \helpref{wxTabCtrl::wxTabCtrl}{wxtabctrlconstr} for a description -of the parameters. - -\membersection{wxTabCtrl::DeleteAllItems}\label{wxtabctrldeleteallitems} - -\func{bool}{DeleteAllItems}{\void} - -Deletes all tab items. - -\membersection{wxTabCtrl::DeleteItem}\label{wxtabctrldeleteitem} - -\func{bool}{DeleteItem}{\param{int}{ item}} - -Deletes the specified tab item. - -\membersection{wxTabCtrl::GetCurFocus}\label{wxtabctrlgetcurfocus} - -\constfunc{int}{GetCurFocus}{\void} - -Returns the index for the tab with the focus, or -1 if none has the focus. - -\membersection{wxTabCtrl::GetImageList}\label{wxtabctrlgetimagelist} - -\constfunc{wxImageList*}{GetImageList}{\void} - -Returns the associated image list. - -\wxheading{See also} - -\helpref{wxImageList}{wximagelist}, \helpref{wxTabCtrl::SetImageList}{wxtabctrlsetimagelist} - -\membersection{wxTabCtrl::GetItemCount}\label{wxtabctrlgetitemcount} - -\constfunc{int}{GetItemCount}{\void} - -Returns the number of tabs in the tab control. - -\membersection{wxTabCtrl::GetItemData}\label{wxtabctrlgetitemdata} - -\constfunc{void*}{GetItemData}{\void} - -Returns the client data for the given tab. - -\membersection{wxTabCtrl::GetItemImage}\label{wxtabctrlgetitemimage} - -\constfunc{int}{GetItemImage}{\void} - -Returns the image index for the given tab. - -\membersection{wxTabCtrl::GetItemRect}\label{wxtabctrlgetitemrect} - -\constfunc{bool}{GetItemRect}{\param{int }{item}, \param{wxRect\&}{ rect}} - -Returns the rectangle bounding the given tab. - -\wxheading{See also} - -\helpref{wxRect}{wxrect} - -\membersection{wxTabCtrl::GetItemText}\label{wxtabctrlgetitemtext} - -\constfunc{wxString}{GetItemText}{\void} - -Returns the string for the given tab. - -\membersection{wxTabCtrl::GetRowCount}\label{wxtabctrlgetrowcount} - -\constfunc{bool}{GetRowCount}{\void} - -Returns the number of rows in the tab control. - -\membersection{wxTabCtrl::GetSelection}\label{wxtabctrlgetselection} - -\constfunc{int}{GetSelection}{\void} - -Returns the index for the currently selected tab. - -\wxheading{See also} - -\helpref{wxTabCtrl::SetSelection}{wxtabctrlsetselection} - -\membersection{wxTabCtrl::HitTest}\label{wxtabctrlhittest} - -\func{int}{HitTest}{\param{const wxPoint\&}{ pt}, \param{long\&}{ flags}} - -Tests whether a tab is at the specified position. - -\wxheading{Parameters} - -\docparam{pt}{Specifies the point for the hit test.} - -\docparam{flags}{Return value for detailed information. One of the following values: - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf wxTAB\_HITTEST\_NOWHERE}}{There was no tab under this point.} -\twocolitem{{\bf wxTAB\_HITTEST\_ONICON}}{The point was over an icon.} -\twocolitem{{\bf wxTAB\_HITTEST\_ONLABEL}}{The point was over a label.} -\twocolitem{{\bf wxTAB\_HITTEST\_ONITEM}}{The point was over an item, but not on the label or icon.} -\end{twocollist} -} - -\wxheading{Return value} - -Returns the zero-based tab index or -1 if no tab is at the specified position. - -\membersection{wxTabCtrl::InsertItem}\label{wxtabctrlinsertitem} - -\func{void}{InsertItem}{\param{int}{ item}, \param{const wxString\&}{ text}, \param{int }{imageId = -1}, - \param{void*}{ clientData = NULL}} - -Inserts a new tab. - -\wxheading{Parameters} - -\docparam{item}{Specifies the index for the new item.} - -\docparam{text}{Specifies the text for the new item.} - -\docparam{imageId}{Specifies the optional image index for the new item.} - -\docparam{clientData}{Specifies the optional client data for the new item.} - -\wxheading{Return value} - -TRUE if successful, FALSE otherwise. - -\membersection{wxTabCtrl::SetItemData}\label{wxtabctrlsetitemdata} - -\func{bool}{SetItemData}{\param{int}{ item}, \param{void*}{ data}} - -Sets the client data for a tab. - -\membersection{wxTabCtrl::SetItemImage}\label{wxtabctrlsetitemimage} - -\func{bool}{SetItemImage}{\param{int}{ item}, \param{int }{image}} - -Sets the image index for the given tab. {\it image} is an index into -the image list which was set with \helpref{wxTabCtrl::SetImageList}{wxtabctrlsetimagelist}. - -\membersection{wxTabCtrl::SetImageList}\label{wxtabctrlsetimagelist} - -\func{void}{SetImageList}{\param{wxImageList*}{ imageList}} - -Sets the image list for the tab control. - -\wxheading{See also} - -\helpref{wxImageList}{wximagelist} - -\membersection{wxTabCtrl::SetItemSize}\label{wxtabctrlsetitemsize} - -\func{void}{SetItemSize}{\param{const wxSize\&}{ size}} - -Sets the width and height of the tabs. - -\membersection{wxTabCtrl::SetItemText}\label{wxtabctrlsetitemtext} - -\func{bool}{SetItemText}{\param{int}{ item}, \param{const wxString\& }{text}} - -Sets the text for the given tab. - -\membersection{wxTabCtrl::SetPadding}\label{wxtabctrlsetpadding} - -\func{void}{SetPadding}{\param{const wxSize\&}{ padding}} - -Sets the amount of space around each tab's icon and label. - -\membersection{wxTabCtrl::SetSelection}\label{wxtabctrlsetselection} - -\func{int}{SetSelection}{\param{int}{ item}} - -Sets the selection for the given tab, returning the index of the previously -selected tab. Returns -1 if the call was unsuccessful. - -\wxheading{See also} - -\helpref{wxTabCtrl::GetSelection}{wxtabctrlgetselection} - - diff --git a/docs/latex/wx/tabevent.tex b/docs/latex/wx/tabevent.tex deleted file mode 100644 index 0ec2f36aad..0000000000 --- a/docs/latex/wx/tabevent.tex +++ /dev/null @@ -1,37 +0,0 @@ -\section{\class{wxTabEvent}}\label{wxtabevent} - -This class represents the events generated by a tab control. - -\wxheading{Derived from} - -\helpref{wxCommandEvent}{wxcommandevent}\\ -\helpref{wxEvent}{wxevent}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Event table macros} - -To process a tab event, use these event handler macros to direct input to member -functions that take a wxTabEvent argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_TAB\_SEL\_CHANGED(id, func)}}{Process a wxEVT\_TAB\_SEL\_CHANGED event, indicating that -the tab selection has changed.} -\twocolitem{{\bf EVT\_TAB\_SEL\_CHANGING(id, func)}}{Process a wxEVT\_TAB\_SEL\_CHANGING event, indicating that -the tab selection is changing.} -\end{twocollist}% - -\wxheading{See also} - -\helpref{wxTabCtrl}{wxtabctrl} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxTabEvent::wxTabEvent}\label{wxtabeventconstr} - -\func{}{wxTabEvent}{\param{WXTYPE}{ commandType = 0}, \param{int}{ id = 0}} - -Constructor. - - diff --git a/docs/latex/wx/tapp.tex b/docs/latex/wx/tapp.tex deleted file mode 100644 index c5e0322a72..0000000000 --- a/docs/latex/wx/tapp.tex +++ /dev/null @@ -1,56 +0,0 @@ -\section{wxApp overview}\label{wxappoverview} - -Classes: \helpref{wxApp}{wxapp} - -A wxWindows application does not have a {\it main} procedure; the equivalent is the -\rtfsp\helpref{OnInit}{wxapponinit} member defined for a class derived from wxApp.\rtfsp -\rtfsp{\it OnInit} will usually create a top window as a bare minimum. - -Unlike in earlier versions of wxWindows, OnInit does not return a frame. Instead it -returns a boolean value which indicates whether processing should continue (TRUE) or not (FALSE). -You call \helpref{wxApp::SetTopWindow}{wxappsettopwindow} to let wxWindows know -about the top window. - -Note that the program's command line arguments, represented by {\it -argc} and {\it argv}, are available from within wxApp member functions. - -An application closes by destroying all windows. Because all frames must -be destroyed for the application to exit, it is advisable to use parent -frames wherever possible when creating new frames, so that deleting the -top level frame will automatically delete child frames. The alternative -is to explicitly delete child frames in the top-level frame's \helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow}\rtfsp -handler. - -In emergencies the \helpref{wxExit}{wxexit} function can be called to kill the -application. - -An example of defining an application follows: - -\begin{verbatim} -class DerivedApp: public wxApp -{ - public: - bool OnInit(void); -}; - -IMPLEMENT_APP(DerivedApp) - -bool DerivedApp::OnInit(void) -{ - wxFrame *the_frame = new wxFrame(NULL, argv[0]); - ... - SetTopWindow(the_frame); - - return TRUE; -} -\end{verbatim} - -Note the use of IMPLEMENT\_APP(appClass), which allows wxWindows to dynamically create an instance of the application object -at the appropriate point in wxWindows initialization. Previous versions of wxWindows used -to rely on the creation of a global application object, but this is no longer recommended, -because required global initialization may not have been performed at application object -construction time. - -You can also use DECLARE\_APP(appClass) in a header file to declare the wxGetApp function which returns -a reference to the application object. - diff --git a/docs/latex/wx/taskbar.tex b/docs/latex/wx/taskbar.tex deleted file mode 100644 index f6a81a4288..0000000000 --- a/docs/latex/wx/taskbar.tex +++ /dev/null @@ -1,90 +0,0 @@ -\section{\class{wxTaskBarIcon}}\label{wxtaskbaricon} - -This class represents a Windows 95 taskbar icon, appearing in the `system tray' and responding to -mouse clicks. An icon has an optional tooltip. This class is only supported for Windows 95/NT. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxTaskBarIcon::wxTaskBarIcon}\label{wxtaskbariconconstr} - -\func{}{wxTaskBarIcon}{\void} - -Default constructor. - -\membersection{wxTaskBarIcon::\destruct{wxTaskBarIcon}} - -\func{}{\destruct{wxTaskBarIcon}}{\void} - -Destroys the wxTaskBarIcon object, removing the icon if not already removed. - -\membersection{wxTaskBarIcon::IsIconInstalled}\label{wxtaskbariconisiconinstalled} - -\func{bool}{IsIconInstalled}{\void} - -Returns TRUE if \helpref{SetIcon}{wxtaskbariconseticon} was called with no subsequent \helpref{RemoveIcon}{wxtaskbariconremoveicon}. - -\membersection{wxTaskBarIcon::IsOK}\label{wxtaskbariconisok} - -\func{bool}{IsOK}{\void} - -Returns TRUE if the object initialized successfully. - -\membersection{wxTaskBarIcon::OnLButtonDown}\label{wxtaskbaricononlbuttondown} - -\func{virtual void}{OnLButtonDown}{\void} - -Override this function to intercept left mouse button down events. - -\membersection{wxTaskBarIcon::OnLButtonDClick}\label{wxtaskbaricononlbuttondclick} - -\func{virtual void}{OnLButtonDClick}{\void} - -Override this function to intercept left mouse button double-click events. - -\membersection{wxTaskBarIcon::OnLButtonUp}\label{wxtaskbaricononlbuttonup} - -\func{virtual void}{OnLButtonUp}{\void} - -Override this function to intercept left mouse button up events. - -\membersection{wxTaskBarIcon::OnRButtonDown}\label{wxtaskbaricononrbuttondown} - -\func{virtual void}{OnRButtonDown}{\void} - -Override this function to intercept right mouse button down events. - -\membersection{wxTaskBarIcon::OnRButtonDClick}\label{wxtaskbaricononrbuttondclick} - -\func{virtual void}{OnRButtonDClick}{\void} - -Override this function to intercept right mouse button double-click events. - -\membersection{wxTaskBarIcon::OnRButtonUp}\label{wxtaskbaricononrbuttonup} - -\func{virtual void}{OnRButtonUp}{\void} - -Override this function to intercept right mouse button up events. - -\membersection{wxTaskBarIcon::OnMouseMove}\label{wxtaskbaricononmousemove} - -\func{virtual void}{OnMouseMove}{\void} - -Override this function to intercept mouse move events. - -\membersection{wxTaskBarIcon::RemoveIcon}\label{wxtaskbariconremoveicon} - -\func{bool}{RemoveIcon}{\void} - -Removes the icon previously set with \helpref{SetIcon}{wxtaskbariconseticon}. - -\membersection{wxTaskBarIcon::SetIcon}\label{wxtaskbariconseticon} - -\func{bool}{SetIcon}{\param{const wxIcon\&}{ icon}, \param{const wxString\& }{tooltip}} - -Sets the icon, and optional tooltip text. - - diff --git a/docs/latex/wx/tbitmap.tex b/docs/latex/wx/tbitmap.tex deleted file mode 100644 index 01cd32aae7..0000000000 --- a/docs/latex/wx/tbitmap.tex +++ /dev/null @@ -1,85 +0,0 @@ -\section{Bitmaps overview}\label{wxbitmapoverview} - -Classes: \helpref{wxBitmap}{wxbitmap}, \helpref{wxBitmapHandler}{wxbitmaphandler}, \helpref{wxIcon}{wxicon}, \helpref{wxCursor}{wxcursor}. - -The wxBitmap class encapsulates the concept of a platform-dependent bitmap, -either monochrome or colour. Platform-specific methods for creating a -wxBitmap object from an existing file are catered for, and -this is an occasion where conditional compilation will sometimes be -required. - -A bitmap created dynamically or loaded from a file can be selected -into a memory device context (instance of \helpref{wxMemoryDC}{wxmemorydc}). This -enables the bitmap to be copied to a window or memory device context -using \helpref{wxDC::Blit}{wxdcblit}, or to be used as a drawing surface. The {\bf -wxToolBarSimple} class is implemented using bitmaps, and the toolbar demo -shows one of the toolbar bitmaps being used for drawing a miniature -version of the graphic which appears on the main window. - -See \helpref{wxMemoryDC}{wxmemorydc} for an example of drawing onto a bitmap. - -The following shows the conditional compilation required to load a -bitmap in X and in Windows 3. The alternative is to use the string -version of the bitmap constructor, which loads a file under X and a -resource under Windows 3, but has the disadvantage of requiring the -X icon file to be available at run-time. - -\begin{verbatim} -#ifdef wx_x -#include "aiai.xbm" -#endif -#ifdef wx_msw - wxIcon *icon = new wxBitmap("aiai"); -#endif -#ifdef wx_x - wxIcon *icon = new wxBitmap(aiai_bits, aiai_width, aiai_height); -#endif -\end{verbatim} - -\subsection{Loading bitmaps: further information} - -There is provision for a number of bitmap -formats via the standard wxBitmap class. These facilities can -be enabled or disabled using settings in wx\_setup.h. - -XPM colour pixmaps may be loaded and saved under Windows and X, with -some restrictions imposed by the lack of colourmap facility when -using XPM files. The user may elect to use XPM files as a cross-platform -stabdard, or translate between XPM and BMP files using a suitable -utility. - -Also, under Windows, DIBs (device independent bitmaps with extension BMP) -may be dynamically loaded and saved. Under X, GIF and BMP files may be -loaded but not saved. - -\subsection{Bitmap format handlers} - -To provide extensibility, the functionality for loading and saving bitmap formats -is not implemented in the wxBitmap class, but in a number of handler classes, -derived from wxBitmapHandler. There is a static list of handlers which wxBitmap -examines when a file load/save operation is requested. Some handlers are provided as standard, but if you -have special requirements, you may wish to initialise the wxBitmap class with -some extra handlers which you write yourself or receive from a third party. - -To add a handler object to wxBitmap, your application needs to include the header which implements it, and -then call the static function \helpref{wxBitmap::AddHandler}{wxbitmapaddhandler}. For example: - -{\small -\begin{verbatim} - #include "JPEGBitmapHandler.h" - ... - // Initialisation - wxBitmap::AddHandler(new wxJPEGBitmapHandler); - ... -\end{verbatim} -} - -Assuming wxJPEGBitmapHandler has been written correctly, you should now be able to load and save JPEG files -using the usual wxBitmap API. - -To see how bitmap handlers are implemented, please look at the files {\tt bitmap.h} and {\tt bitmap.cpp}. - -\subsection{wxIcon overview}\label{wxiconoverview} - -TODO. - diff --git a/docs/latex/wx/tcommdlg.tex b/docs/latex/wx/tcommdlg.tex deleted file mode 100644 index d894847433..0000000000 --- a/docs/latex/wx/tcommdlg.tex +++ /dev/null @@ -1,212 +0,0 @@ -\section{Common dialogs overview}\label{commondialogsoverview} - -Classes: \helpref{wxColourDialog}{wxcolourdialog}, \helpref{wxFontDialog}{wxfontdialog}, -\rtfsp\helpref{wxPrintDialog}{wxprintdialog}, \helpref{wxFileDialog}{wxfiledialog},\rtfsp -\helpref{wxDirDialog}{wxdirdialog}, \helpref{wxTextEntryDialog}{wxtextentrydialog},\rtfsp -\helpref{wxMessageDialog}{wxmessagedialog}, \helpref{wxSingleChoiceDialog}{wxsinglechoicedialog},\rtfsp -\helpref{wxMultipleChoiceDialog}{wxmultiplechoicedialog} - -Common dialog classes and functions encapsulate commonly-needed dialog box requirements. -They are all `modal', grabbing the flow of control until the user dismisses the dialog, -to make them easy to use within an application. - -Some dialogs have both platform-dependent and platform-independent implementations, -so that if underlying windowing systems that do not provide the required functionality, -the generic classes and functions can stand in. For example, under MS Windows, wxColourDialog -uses the standard colour selector. There is also an equivalent called wxGenericColourDialog -for other platforms, and a macro defines wxColourDialog to be the same as wxGenericColourDialog -on non-MS Windows platforms. However, under MS Windows, the generic dialog can also be -used, for testing or other purposes. - -\subsection{wxColourDialog overview}\label{wxcolourdialogoverview} - -Classes: \helpref{wxColourDialog}{wxcolourdialog}, \helpref{wxColourData}{wxcolourdata} - -The wxColourDialog presents a colour selector to the user, and returns -with colour information. - -{\bf The MS Windows colour selector} - -Under Windows, the native colour selector common dialog is used. This -presents a dialog box with three main regions: at the top left, a -palette of 48 commonly-used colours is shown. Under this, there is a -palette of 16 `custom colours' which can be set by the application if -desired. Additionally, the user may open up the dialog box to show -a right-hand panel containing controls to select a precise colour, and add -it to the custom colour palette. - -{\bf The generic colour selector} - -Under non-MS Windows platforms, the colour selector is a simulation of -most of the features of the MS Windows selector. Two palettes of 48 -standard and 16 custom colours are presented, with the right-hand area -containing three sliders for the user to select a colour from red, -green and blue components. This colour may be added to the custom colour -palette, and will replace either the currently selected custom colour, -or the first one in the palette if none is selected. The RGB colour sliders -are not optional in the generic colour selector. The generic colour -selector is also available under MS Windows; use the name -wxGenericColourDialog. - -{\bf Example} - -In the samples/dialogs directory, there is an example of using -the wxColourDialog class. Here is an excerpt, which -sets various parameters of a wxColourData object, including -a grey scale for the custom colours. If the user did not cancel -the dialog, the application retrieves the selected colour and -uses it to set the background of a window. - -\begin{verbatim} - wxColourData data; - data.SetChooseFull(TRUE); - for (int i = 0; i < 16; i++) - { - wxColour colour(i*16, i*16, i*16); - data.SetCustomColour(i, colour); - } - - wxColourDialog dialog(this, &data); - if (dialog.ShowModal() == wxID_OK) - { - wxColourData retData = dialog.GetColourData(); - wxColour col = retData.GetColour(); - wxBrush brush(col, wxSOLID); - myWindow->SetBackground(brush); - myWindow->Clear(); - myWindow->Refresh(); - } -\end{verbatim} - - -\subsection{wxFontDialog overview}\label{wxfontdialogoverview} - -Classes: \helpref{wxFontDialog}{wxfontdialog}, \helpref{wxFontData}{wxfontdata} - -The wxFontDialog presents a font selector to the user, and returns -with font and colour information. - -{\bf The MS Windows font selector} - -Under Windows, the native font selector common dialog is used. This -presents a dialog box with controls for font name, point size, style, weight, -underlining, strikeout and text foreground colour. A sample of the -font is shown on a white area of the dialog box. Note that -in the translation from full MS Windows fonts to wxWindows font -conventions, strikeout is ignored and a font family (such as -Swiss or Modern) is deduced from the actual font name (such as Arial -or Courier). The full range of Windows fonts cannot be used in wxWindows -at present. - -{\bf The generic font selector} - -Under non-MS Windows platforms, the font selector is simpler. -Controls for font family, point size, style, weight, -underlining and text foreground colour are provided, and -a sample is shown upon a white background. The generic font selector -is also available under MS Windows; use the name wxGenericFontDialog. - -In both cases, the application is responsible for deleting the -new font returned from calling wxFontDialog::Show (if any). -This returned font is guaranteed to be a new object and not -one currently in use in the application. - -{\bf Example} - -In the samples/dialogs directory, there is an example of using -the wxFontDialog class. The application uses the returned font -and colour for drawing text on a canvas. Here is an excerpt: - -\begin{verbatim} - wxFontData data; - data.SetInitialFont(canvasFont); - data.SetColour(canvasTextColour); - - wxFontDialog dialog(this, &data); - if (dialog.ShowModal() == wxID_OK) - { - wxFontData retData = dialog.GetFontData(); - canvasFont = retData.GetChosenFont(); - canvasTextColour = retData.GetColour(); - myWindow->Refresh(); - } -\end{verbatim} - -\subsection{wxPrintDialog overview}\label{wxprintdialogoverview} - -Classes: \helpref{wxPrintDialog}{wxprintdialog}, \helpref{wxPrintData}{wxprintdata} - -This class represents the print and print setup common dialogs. -You may obtain a \helpref{wxPrinterDC}{wxprinterdc} device context from -a successfully dismissed print dialog. - -The samples/printing example shows how to use it: see \helpref{Printing overview}{printingoverview} for -an excerpt from this example. - -\subsection{wxFileDialog overview}\label{wxfiledialogoverview} - -Classes: \helpref{wxFileDialog}{wxfiledialog} - -Pops up a file selector box. In Windows, this is the common file selector -dialog. In X, this is a file selector box with somewhat less functionality. -The path and filename are distinct elements of a full file pathname. -If path is ``", the current directory will be used. If filename is ``", -no default filename will be supplied. The wildcard determines what files -are displayed in the file selector, and file extension supplies a type -extension for the required filename. Flags may be a combination of wxOPEN, -wxSAVE, wxOVERWRITE\_PROMPT, wxHIDE\_READONLY, or 0. They are only significant -at present in Windows. - -Both the X and Windows versions implement a wildcard filter. Typing a -filename containing wildcards (*, ?) in the filename text item, and -clicking on Ok, will result in only those files matching the pattern being -displayed. In the X version, supplying no default name will result in the -wildcard filter being inserted in the filename text item; the filter is -ignored if a default name is supplied. - -Under Windows (only), the wildcard may be a specification for multiple -types of file with a description for each, such as: - -\begin{verbatim} - "BMP files (*.bmp) | *.bmp | GIF files (*.gif) | *.gif" -\end{verbatim} - -\subsection{wxDirDialog overview}\label{wxdirdialogoverview} - -Classes: \helpref{wxDirDialog}{wxdirdialog} - -This dialog shows a directory selector dialog, allowing the user to select a single -directory. - -\subsection{wxTextEntryDialog overview}\label{wxtextentrydialogoverview} - -Classes: \helpref{wxTextEntryDialog}{wxtextentrydialog} - -This is a dialog with a text entry field. The value that the user -entered is obtained using \helpref{wxTextEntryDialog::GetValue}{wxtextentrydialoggetvalue}. - -\subsection{wxMessageDialog overview}\label{wxmessagedialogoverview} - -Classes: \helpref{wxMessageDialog}{wxmessagedialog} - -This dialog shows a message, plus buttons that can be chosen from OK, Cancel, Yes, and No. -Under Windows, an optional icon can be shown, such as an exclamation mark or question mark. - -The return value of \helpref{wxMessageDialog::ShowModal}{wxmessagedialogshowmodal} indicates -which button the user pressed. - -\subsection{wxSingleChoiceDialog overview}\label{wxsinglechoicedialogoverview} - -Classes: \helpref{wxSingleChoiceDialog}{wxsinglechoicedialog} - -This dialog shows a list of choices, plus OK and (optionally) Cancel. The user can -select one of them. The selection can be obtained from the dialog as an index, -a string or client data. - -\subsection{wxMultipleChoiceDialog overview}\label{wxmultiplechoicedialogoverview} - -Classes: \helpref{wxMultipleChoiceDialog}{wxmultiplechoicedialog} - -This dialog shows a list of choices, plus OK and (optionally) Cancel. The user can -select one or more of them. TODO. - diff --git a/docs/latex/wx/tconstr.tex b/docs/latex/wx/tconstr.tex deleted file mode 100644 index 14cbaae46d..0000000000 --- a/docs/latex/wx/tconstr.tex +++ /dev/null @@ -1,160 +0,0 @@ -\section{Constraints overview}\label{constraintsoverview} - -Classes: \helpref{wxLayoutConstraints}{wxlayoutconstraints}, \helpref{wxIndividualLayoutConstraint}{wxindividuallayoutconstraint}. - -Objects of class wxLayoutConstraint can be associated with a window to define the -way its subwindows are laid out, with respect to their siblings or parent. - -The class consists of the following eight constraints of class wxIndividualLayoutConstraint, -some or all of which should be accessed directly to set the appropriate -constraints. - -\begin{itemize}\itemsep=0pt -\item {\bf left:} represents the left hand edge of the window -\item {\bf right:} represents the right hand edge of the window -\item {\bf top:} represents the top edge of the window -\item {\bf bottom:} represents the bottom edge of the window -\item {\bf width:} represents the width of the window -\item {\bf height:} represents the height of the window -\item {\bf centreX:} represents the horizontal centre point of the window -\item {\bf centreY:} represents the vertical centre point of the window -\end{itemize} - -Most constraints are initially set to have the relationship wxUnconstrained, -which means that their values should be calculated by looking at known constraints. -The exceptions are {\it width} and {\it height}, which are set to wxAsIs to -ensure that if the user does not specify a constraint, the existing -width and height will be used, to be compatible with panel items which often -have take a default size. If the constraint is wxAsIs, the dimension will -not be changed. - -To call the \helpref{wxWindow::Layout}{wxwindowlayout} function which evaluates -constraints, you can either call wxWindow::SetAutoLayout to tell -default OnSize handlers to call Layout, or override OnSize and call Layout yourself. - -\subsection{Constraint layout: more detail} - -By default, windows do not have a wxLayoutConstraints object. In this case, much layout -must be done explicitly, by performing calculations in OnSize members, except -for the case of frames that have one subwindow, where wxFrame::OnSize takes care -of resizing the child. - -To avoid the need for these rather awkward calculations, the user can create -a wxLayoutConstraints object and associate it with a window with wxWindow::SetConstraints. -This object contains a constraint for each of the window edges, two for the centre point, -and two for the window size. By setting some or all of these constraints appropriately, -the user can achieve quite complex layout by defining relationships between windows. - -In wxWindows, each window can be constrained relative to either its {\it -siblings} on the same window, or the {\it parent}. The layout algorithm -therefore operates in a top-down manner, finding the correct layout for -the children of a window, then the layout for the grandchildren, and so -on. Note that this differs markedly from native Motif layout, where -constraints can ripple upwards and can eventually change the frame -window or dialog box size. We assume in wxWindows that the {\it user} is -always `boss' and specifies the size of the outer window, to which -subwindows must conform. Obviously, this might be a limitation in some -circumstances, but it suffices for most situations, and the -simplification avoids some of the nightmarish problems associated with -programming Motif. - -When the user sets constraints, many of the constraints for windows -edges and dimensions remain unconstrained. For a given window, -the wxWindow::Layout algorithm first resets all constraints -in all children to have unknown edge or dimension values, and then iterates through the constraints, -evaulating them. For unconstrained edges and dimensions, it -tries to find the value using known relationships that always hold. For example, -an unconstrained {\it width} may be calculated from the {\it left} and {\it right edges}, if -both are currently known. For edges and dimensions with user-supplied constraints, these -constraints are evaulated if the inputs of the constraint are known. - -The algorithm stops when all child edges and dimension are known (success), or there -there are unknown edges or dimensions but there has been no change in this cycle (failure). - -It then sets all the window positions and sizes according to the values it has found. - -Because the algorithm is iterative, the order in which constraints are considered is -irrelevant. - -\subsection{Window layout examples}\label{layoutexamples} - -\subsubsection{Example 1: subwindow layout} - -This example specifies a panel and a window side by side, -with a text subwindow below it. - -\begin{verbatim} - frame->panel = new wxPanel(frame, -1, wxPoint(0, 0), wxSize(1000, 500), 0); - frame->scrollWindow = new MyScrolledWindow(frame, -1, wxPoint(0, 0), wxSize(400, 400), wxRETAINED); - frame->text_window = new MyTextWindow(frame, -1, wxPoint(0, 250), wxSize(400, 250)); - - // Set constraints for panel subwindow - wxLayoutConstraints *c1 = new wxLayoutConstraints; - - c1->left.SameAs (frame, wxLeft); - c1->top.SameAs (frame, wxTop); - c1->right.PercentOf (frame, wxWidth, 50); - c1->height.PercentOf (frame, wxHeight, 50); - - frame->panel->SetConstraints(c1); - - // Set constraints for scrollWindow subwindow - wxLayoutConstraints *c2 = new wxLayoutConstraints; - - c2->left.SameAs (frame->panel, wxRight); - c2->top.SameAs (frame, wxTop); - c2->right.SameAs (frame, wxRight); - c2->height.PercentOf (frame, wxHeight, 50); - - frame->scrollWindow->SetConstraints(c2); - - // Set constraints for text subwindow - wxLayoutConstraints *c3 = new wxLayoutConstraints; - c3->left.SameAs (frame, wxLeft); - c3->top.Below (frame->panel); - c3->right.SameAs (frame, wxRight); - c3->bottom.SameAs (frame, wxBottom); - - frame->text_window->SetConstraints(c3); -\end{verbatim} - -\subsubsection{Example 2: panel item layout} - -This example sizes a button width to 80 percent of the panel width, and centres -it horizontally. A listbox and multitext item are placed below it. The listbox -takes up 40 percent of the panel width, and the multitext item takes up -the remainder of the width. Margins of 5 pixels are used. - -\begin{verbatim} - // Create some panel items - wxButton *btn1 = new wxButton(frame->panel, -1, "A button") ; - - wxLayoutConstraints *b1 = new wxLayoutConstraints; - b1->centreX.SameAs (frame->panel, wxCentreX); - b1->top.SameAs (frame->panel, wxTop, 5); - b1->width.PercentOf (frame->panel, wxWidth, 80); - b1->height.PercentOf (frame->panel, wxHeight, 10); - btn1->SetConstraints(b1); - - wxListBox *list = new wxListBox(frame->panel, -1, "A list", - wxPoint(-1, -1), wxSize(200, 100)); - - wxLayoutConstraints *b2 = new wxLayoutConstraints; - b2->top.Below (btn1, 5); - b2->left.SameAs (frame->panel, wxLeft, 5); - b2->width.PercentOf (frame->panel, wxWidth, 40); - b2->bottom.SameAs (frame->panel, wxBottom, 5); - list->SetConstraints(b2); - - wxTextCtrl *mtext = new wxTextCtrl(frame->panel, -1, "Multiline text", "Some text", - wxPoint(-1, -1), wxSize(150, 100), wxTE_MULTILINE); - - wxLayoutConstraints *b3 = new wxLayoutConstraints; - b3->top.Below (btn1, 5); - b3->left.RightOf (list, 5); - b3->right.SameAs (frame->panel, wxRight, 5); - b3->bottom.SameAs (frame->panel, wxBottom, 5); - mtext->SetConstraints(b3); -\end{verbatim} - - diff --git a/docs/latex/wx/tdb.tex b/docs/latex/wx/tdb.tex deleted file mode 100644 index 28c43f79b7..0000000000 --- a/docs/latex/wx/tdb.tex +++ /dev/null @@ -1,240 +0,0 @@ -\section{Database classes overview}\label{odbcoverview} - -Classes: \helpref{wxDatabase}{wxdatabase}, \helpref{wxRecordSet}{wxrecordset}, \helpref{wxQueryCol}{wxquerycol}, -\rtfsp\helpref{wxQueryField}{wxqueryfield} - -\normalboxd{IMPORTANT NOTE: The ODBC classes are a preliminary release and incomplete. Please -take this into account when using them. Feedback and bug fixes are appreciated, -as always. The classes are being developed by Olaf Klein (oklein@smallo.ruhr.de) and -Patrick Halke (patrick@zaphod.ruhr.de).} - -wxWindows provides a set of classes for accessing a subset of Microsoft's ODBC (Open Database Connectivity) -product. Currently, this wrapper is available under MS Windows only, although -ODBC may appear on other platforms, and a generic or product-specific SQL emulator for the ODBC -classes may be provided in wxWindows at a later date. - -ODBC presents a unified API (Application Programmer's Interface) to a -wide variety of databases, by interfacing indirectly to each database or -file via an ODBC driver. The language for most of the database -operations is SQL, so you need to learn a small amount of SQL as well as -the wxWindows ODBC wrapper API. Even though the databases may not be -SQL-based, the ODBC drivers translate SQL into appropriate operations -for the database or file: even text files have rudimentry ODBC support, -along with dBASE, Access, Excel and other file formats. - -The run-time files for ODBC are bundled with many existing database -packages, including MS Office. The required header files, sql.h and -sqlext.h, are bundled with several compilers including MS VC++ and -Watcom C++. The only other way to obtain these header files is from the -ODBC SDK, which is only available with the MS Developer Network CD-ROMs --- at great expense. If you have odbc.dll, you can make the required -import library odbc.lib using the tool `implib'. You need to have odbc.lib -in your compiler library path. - -The minimum you need to distribute with your application is odbc.dll, which must -go in the Windows system directory. For the application to function correctly, -ODBC drivers must be installed on the user's machine. If you do not use the database -classes, odbc.dll will be loaded but not called (so ODBC does not need to be -setup fully if no ODBC calls will be made). - -A sample is distributed with wxWindows in {\tt samples/odbc}. You will need to install -the sample dbf file as a data source using the ODBC setup utility, available from -the control panel if ODBC has been fully installed. - -\subsection{Procedures for writing an ODBC application} - -You first need to create a wxDatabase object. If you want to get information -from the ODBC manager instead of from a particular database (for example -using \helpref{wxRecordSet::GetDataSources}{wxrecordsetgetdatasources}), then you -do not need to call \helpref{wxDatabase::Open}{wxdatabaseopen}. -If you do wish to connect to a datasource, then call wxDatabase::Open. -You can reuse your wxDatabase object, calling wxDatabase::Close and wxDatabase::Open -multiple times. - -Then, create a wxRecordSet object for retrieving or sending information. -For ODBC manager information retrieval, you can create it as a dynaset (retrieve the -information as needed) or a snapshot (get all the data at once). -If you are going to call \helpref{wxRecordSet::ExecuteSQL}{wxrecordsetexecutesql}, you need to create it as a snapshot. -Dynaset mode is not yet implemented for user data. - -Having called a function such as wxRecordSet::ExecuteSQL or -wxRecordSet::GetDataSources, you may have a number of records -associated with the recordset, if appropriate to the operation. You can -now retrieve information such as the number of records retrieved and the -actual data itself. Use \helpref{wxRecordSet::GetFieldData}{wxrecordsetgetfielddata} or -\helpref{wxRecordSet::GetFieldDataPtr}{wxrecordsetgetfielddataptr} to get the data or a pointer to it, passing -a column index or name. The data returned will be for the current -record. To move around the records, use \helpref{wxRecordSet::MoveNext}{wxrecordsetmovenext}, -\rtfsp\helpref{wxRecordSet::MovePrev}{wxrecordsetmoveprev} and associated functions. - -You can use the same recordset for multiple operations, or delete -the recordset and create a new one. - -Note that when you delete a wxDatabase, any associated recordsets -also get deleted, so beware of holding onto invalid pointers. - -\subsection{wxDatabase overview}\label{wxdatabaseoverview} - -\overview{Database classes overview}{odbcoverview} - -Class: \helpref{wxDatabase}{wxdatabase} - -Every database object represents an ODBC connection. To do anything useful -with a database object you need to bind a wxRecordSet object to it. All you -can do with wxDatabase is opening/closing connections and getting some info -about it (users, passwords, and so on). - -\subsection{wxQueryCol overview}\label{wxquerycoloverview} - -\overview{Database classes overview}{odbcoverview} - -Class: \helpref{wxQueryCol}{wxquerycol} - -Every data column is represented by an instance of this class. -It contains the name and type of a column and a list of wxQueryFields where -the real data is stored. The links to user-defined variables are stored -here, as well. - -\subsection{wxQueryField overview}\label{wxqueryfieldoverview} - -\overview{Database classes overview}{odbcoverview} - -Class: \helpref{wxQueryField}{wxqueryfield} - -As every data column is represented by an instance of the class wxQueryCol, -every data item of a specific column is represented by an instance of -wxQueryField. Each column contains a list of wxQueryFields. If wxRecordSet is -of the type wxOPEN\_TYPE\_DYNASET, there will be only one field for each column, -which will be updated every time you call functions like wxRecordSet::Move -or wxRecordSet::GoTo. If wxRecordSet is of the type wxOPEN\_TYPE\_SNAPSHOT, -all data returned by an ODBC function will be loaded at once and the number -of wxQueryField instances for each column will depend on the number of records. - -\subsection{wxRecordSet overview}\label{wxrecordsetoverview} - -\overview{Database classes overview}{odbcoverview} - -Class: \helpref{wxRecordSet}{wxrecordset} - -Each wxRecordSet represents a database query. You can make multiple queries -at a time by using multiple wxRecordSets with a wxDatabase or you can make -your queries in sequential order using the same wxRecordSet. - -\subsection{ODBC SQL data types}\label{sqltypes} - -\overview{Database classes overview}{odbcoverview} - -These are the data types supported in ODBC SQL. Note that there are other, extended level conformance -types, not currently supported in wxWindows. - -\begin{twocollist}\itemsep=0pt -\twocolitem{CHAR(n)}{A character string of fixed length {\it n}.} -\twocolitem{VARCHAR(n)}{A varying length character string of maximum length {\it n}.} -\twocolitem{LONG VARCHAR(n)}{A varying length character string: equivalent to VARCHAR for the purposes -of ODBC.} -\twocolitem{DECIMAL(p, s)}{An exact numeric of precision {\it p} and scale {\it s}.} -\twocolitem{NUMERIC(p, s)}{Same as DECIMAL.} -\twocolitem{SMALLINT}{A 2 byte integer.} -\twocolitem{INTEGER}{A 4 byte integer.} -\twocolitem{REAL}{A 4 byte floating point number.} -\twocolitem{FLOAT}{An 8 byte floating point number.} -\twocolitem{DOUBLE PRECISION}{Same as FLOAT.} -\end{twocollist} - -These data types correspond to the following ODBC identifiers: - -\begin{twocollist}\itemsep=0pt -\twocolitem{SQL\_CHAR}{A character string of fixed length.} -\twocolitem{SQL\_VARCHAR}{A varying length character string.} -\twocolitem{SQL\_DECIMAL}{An exact numeric.} -\twocolitem{SQL\_NUMERIC}{Same as SQL\_DECIMAL.} -\twocolitem{SQL\_SMALLINT}{A 2 byte integer.} -\twocolitem{SQL\_INTEGER}{A 4 byte integer.} -\twocolitem{SQL\_REAL}{A 4 byte floating point number.} -\twocolitem{SQL\_FLOAT}{An 8 byte floating point number.} -\twocolitem{SQL\_DOUBLE}{Same as SQL\_FLOAT.} -\end{twocollist} - -\subsection{A selection of SQL commands}\label{sqlcommands} - -\overview{Database classes overview}{odbcoverview} - -The following is a very brief description of some common SQL commands, with -examples. - -\subsubsection{Create} - -Creates a table. - -Example: - -\begin{verbatim} -CREATE TABLE Book - (BookNumber INTEGER PRIMARY KEY - , CategoryCode CHAR(2) DEFAULT 'RO' NOT NULL - , Title VARCHAR(100) UNIQUE - , NumberOfPages SMALLINT - , RetailPriceAmount NUMERIC(5,2) - ) -\end{verbatim} - -\subsubsection{Insert} - -Inserts records into a table. - -Example: - -\begin{verbatim} -INSERT INTO Book - (BookNumber, CategoryCode, Title) - VALUES(5, 'HR', 'The Lark Ascending') -\end{verbatim} - -\subsubsection{Select} - -The Select operation retrieves rows and columns from a table. The criteria -for selection and the columns returned may be specified. - -Examples: - -\verb$SELECT * FROM Book$ - -Selects all rows and columns from table Book. - -\verb$SELECT Title, RetailPriceAmount FROM Book WHERE RetailPriceAmount > 20.0$ - -Selects columns Title and RetailPriceAmount from table Book, returning only -the rows that match the WHERE clause. - -\verb$SELECT * FROM Book WHERE CatCode = 'LL' OR CatCode = 'RR'$ - -Selects all columns from table Book, returning only -the rows that match the WHERE clause. - -\verb$SELECT * FROM Book WHERE CatCode IS NULL$ - -Selects all columns from table Book, returning only rows where the CatCode column -is NULL. - -\verb$SELECT * FROM Book ORDER BY Title$ - -Selects all columns from table Book, ordering by Title, in ascending order. To specify -descending order, add DESC after the ORDER BY Title clause. - -\verb$SELECT Title FROM Book WHERE RetailPriceAmount >= 20.0 AND RetailPriceAmount <= 35.0$ - -Selects records where RetailPriceAmount conforms to the WHERE expression. - -\subsubsection{Update} - -Updates records in a table. - -Example: - -\verb$UPDATE Incident SET X = 123 WHERE ASSET = 'BD34'$ - -This example sets a field in column `X' to the number 123, for the record -where the column ASSET has the value `BD34'. - - - diff --git a/docs/latex/wx/tdc.tex b/docs/latex/wx/tdc.tex deleted file mode 100644 index 08da3e8c9d..0000000000 --- a/docs/latex/wx/tdc.tex +++ /dev/null @@ -1,42 +0,0 @@ -\section{Device context overview}\label{dcoverview} - -Classes: \helpref{wxDC}{wxdc}, \helpref{wxPostScriptDC}{wxpostscriptdc},\rtfsp -\rtfsp\helpref{wxMetaFileDC}{wxmetafiledc}, \helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxPrinterDC}{wxprinterdc},\rtfsp -\helpref{wxScreenDC}{wxscreendc}, \helpref{wxClientDC}{wxclientdc}, \helpref{wxPaintDC}{wxpaintdc},\rtfsp -\helpref{wxWindowDC}{wxwindowdc}. - -A wxDC is a {\it device context} onto which graphics and text can be drawn. -The device context is intended to represent a number of output devices in a generic way, -with the same API being used throughout. - -Some device contexts are created temporarily in order to draw on a window. -This is true of \helpref{wxScreenDC}{wxscreendc}, \helpref{wxClientDC}{wxclientdc}, \helpref{wxPaintDC}{wxpaintdc}, -and \helpref{wxWindowDC}{wxwindowdc}. The following describes the differences between -these device contexts and when you should use them. - -\begin{itemize}\itemsep=0pt -\item {\bf wxScreenDC.} Use this to paint on the screen, as opposed to an individual window. -\item {\bf wxClientDC.} Use this to paint on the client area of window (the part without -borders and other decorations), but do not use it from within an \helpref{wxWindow::OnPaint}{wxwindowonpaint} event. -\item {\bf wxPaintDC.} Use this to paint on the client area of a window, but {\it only} from -within an \helpref{wxWindow::OnPaint}{wxwindowonpaint} event. -\item {\bf wxWindowDC.} Use this to paint on the whole area of a window, including decorations. -This may not be available on non-Windows platforms. -\end{itemize} - -To use a client, paint or window device context, create an object on the stack with -the window as argument, for example: - -\begin{verbatim} - void MyWindow::OnMyCmd(wxCommandEvent& event) - { - wxClientDC dc(window); - DrawMyPicture(dc); - } -\end{verbatim} - -Try to write code so it is parameterised by wxDC - if you do this, the same piece of code may -write to a number of different devices, by passing a different device context. This doesn't -work for everything (for example not all device contexts support bitmap drawing) but -will work most of the time. - diff --git a/docs/latex/wx/tdebug.tex b/docs/latex/wx/tdebug.tex deleted file mode 100644 index e996ebdfb2..0000000000 --- a/docs/latex/wx/tdebug.tex +++ /dev/null @@ -1,104 +0,0 @@ -\section{Debugging overview}\label{debuggingoverview} - -Classes: \helpref{wxDebugContext}{wxdebugcontext}, \helpref{wxDebugStreamBuf}{wxdebugstreambuf}, -\rtfsp\helpref{wxObject}{wxobject} - -Various classes, functions and macros are provided in wxWindows to help you debug -your application. Most of these are only available if you compile both wxWindows, -your application and {\it all} libraries that use wxWindows with the DEBUG flag -set to 1 or more. - -wxDebugContext is a class that never gets instantiated, but ties together -various functions and variables. It allows you to set the debugging stream, dump -all objects to that stream, write statistics about object allocation, and -check memory for errors. - -You can use the \helpref{WXTRACE}{trace} macro to output debugging information in DEBUG mode; -it will be defined to nothing for non-debugging code. - -It is good practice to define a Dump member function for each class you derive -from a wxWindows class, so that wxDebugContext::Dump can call it and -give valuable information about the state of the application. - -For wxDebugContext to do its work, the {\it new} and {\it delete}\rtfsp -operators for wxObject have been redefined to store extra information -about dynamically allocated objects (but not statically declared -objects). This slows down a debugging version of an application, but can -in theory find difficult-to-detect memory leaks (objects are not -deallocated), overwrites (writing past the end of your object) and -underwrites (writing to memory in front of the object). - -If you have difficulty tracking down a memory leak, recompile -in debugging mode and call wxDebugContext::Dump and wxDebugContext::Statistics -at appropriate places. They will tell you what objects have not yet been -deleted, and what kinds of object they are. - -If you use the macro WXDEBUG\_NEW instead of the normal 'new', the debugging -output (and error messages reporting memory problems) will also tell you what -file and on what line you allocated the object. - -To avoid the need for replacing existing new operators with WXDEBUG\_NEW, you -can write this at the top of each application file: - -\begin{verbatim} -#define new WXDEBUG\_NEW -\end{verbatim} - -In non-debugging mode, this will revert to the usual interpretation -of new. Note that for this not to mess up new-based allocation of non-wxObject derived classes and -built-in types, there are global definitions of new and delete which match -the syntax required for storing filename and line numbers. These merely -call malloc and free, and so do not do anything interesting. The definitions -may possibly cause multiple symbol problems for some compilers and so might -need to be omitted by setting the USE\_GLOBAL\_MEMORY\_OPERATORS to 0 in wx\_setup.h - -\subsection{wxDebugContext overview}\label{wxdebugcontextoverview} - -\overview{Debugging overview}{debuggingoverview} - -Class: \helpref{wxDebugContext}{wxdebugcontext} - -wxDebugContext is a class for performing various debugging and memory tracing -operations. wxDebugContext, and the related macros and function WXTRACE and -wxTrace, are only present if USE\_DEBUG\_CONTEXT is used. - -This class has only static data and function members, and there should be -no instances. Probably the most useful members are SetFile (for directing output -to a file, instead of the default standard error or debugger output); -Dump (for dumping the dynamically allocated objects) and PrintStatistics -(for dumping information about allocation of objects). You can also call -Check to check memory blocks for integrity. - -Here's an example of use. The SetCheckpoint ensures that only the -allocations done after the checkpoint will be dumped. Unfortunately -the define of new to WXDEBUG\_NEW does not work for Borland C++ (and -perhaps other compilers) because it fails to find the correct overloaded -operator for non-object usage of new. Instead, you need to use WXDEBUG\_NEW -explicitly if there are any examples of non-object new usage in the file. - -\begin{verbatim} -#define new WXDEBUG_NEW - - wxDebugContext::SetCheckpoint(); - - wxDebugContext::SetFile("c:\\temp\\debug.log"); - - wxString *thing = new wxString; - - // Proves that defining 'new' to be 'WXDEBUG_NEW' doesn't mess up - // non-object allocation. Doesn't work for Borland C++. - char *ordinaryNonObject = new char[1000]; - - wxDebugContext::Dump(); - wxDebugContext::PrintStatistics(); -\end{verbatim} - -You can use wxDebugContext if DEBUG is 1 or more, or you can use it -at any other time (if USE\_DEBUG\_CONTEXT is 1). It is not disabled -for DEBUG = 1 (as in earlier versions of wxWindows) because you -may not wish to recompile wxWindows and your entire application -just to make use of the error logging facility. This is especially -true in a Windows NT or Windows 95 environment, where you cannot -easily output to a debug window: wxDebugContext can be used to -write to log files instead. - diff --git a/docs/latex/wx/tdelwin.tex b/docs/latex/wx/tdelwin.tex deleted file mode 100644 index e8b591cde9..0000000000 --- a/docs/latex/wx/tdelwin.tex +++ /dev/null @@ -1,130 +0,0 @@ -\section{Window deletion overview}\label{windowdeletionoverview} - -Classes: \helpref{wxCloseEvent}{wxcloseevent}, \helpref{wxWindow}{wxwindow} - -Window deletion can be a confusing subject, so this overview is provided -to make it clear when and how you delete windows, or respond to user requests -to close windows. - -\wxheading{What is the sequence of events in a window deletion?} - -When the user clicks on the system close button or system close command, -in a frame or a dialog, wxWindows calls \helpref{wxWindow::Close}{wxwindowclose}. - -This function then generates a \helpref{wxCloseEvent}{wxcloseevent} event which -can be handled by the application (by using an EVT\_CLOSE event table entry). It is the duty of the application to -define a suitable event handler, and decide whether or not to destroy the window. -If the application is for some reason forcing the application to close, -the window should always be destroyed, otherwise there is the option to -ignore the request, or maybe wait until the user has answered a question -before deciding whether it's safe to close. - -The wxCloseEvent handler should only call \helpref{wxWindow::Destroy}{wxwindowdestroy} to -delete the window, and not use the {\bf delete} operator. This is because -for some window classes, wxWindows delays actual deletion of the window until all events have been processed, -since otherwise there is the danger that events will be sent to a non-existent window. - -\wxheading{How can the application close a window itself?} - -Your application can use the \helpref{wxWindow::Close}{wxwindowclose} event just as -the framework does. Pass a TRUE argument to this function to tell the event handler -that we definitely want to delete the frame. - -If for some reason you don't wish to use the {\bf Close} function to delete a window, at least use -the {\bf Destroy} function so that wxWindows can decide when it's safe to delete the window. - -\wxheading{What is the default behaviour?} - -By default, the close event handlers for wxFrame and wxDialog -both call the old \helpref{wxWindow::OnClose}{wxwindowonclose} handler -for backward compatibility. So you can still use the old form if you wish. - -In addition, the default close event handler for wxDialog simulates a Cancel command, -generating a wxID\_CANCEL event. Since the handler for this cancel event might -itself call {\bf Close}, there is a check for infinite looping. - -Under Windows, wxDialog also defines a handler for \helpref{wxWindow::OnCharHook}{wxwindowoncharhook} that -generates a Cancel event if the Escape key has been pressed. - -\wxheading{What should I do when the user calls up Exit from a menu?} - -You can simply call \helpref{wxWindow::Close}{wxwindowclose} on the frame. This -will invoke your own close event handler which may destroy the frame. - -You can do checking to see if your application can be safely exited at this point, -either from within your close event handler, or from within your exit menu command -handler. For example, you may wish to check that all files have been saved. -Give the user a chance to save and quit, to not save but quit anyway, or to cancel -the exit command altogether. - -\wxheading{What should I do to upgrade my 1.xx OnClose to 2.0?} - -In wxWindows 1.xx, the {\bf OnClose} function did not actually delete 'this', but signalled -to the calling function (either {\bf Close}, or the wxWindows framework) to delete -or not delete the window. - -You can still use this function unchanged in 2.0, but it's worth upgrading to -the new method in case future versions of wxWindows does not support the old one. - -To update your code, you should provide an event table entry in your frame or -dialog, using the EVT\_CLOSE macro. The event handler function might look like this: - -{\small% -\begin{verbatim} - void MyFrame::OnCloseWindow(wxCloseEvent& event) - { - // If the application forces the deletion, - // obey without question. - if (event.GetForce()) - { - this->Destroy(); - return; - } - - // Otherwise... - if (MyDataHasBeenModified()) - { - wxMessageDialog* dialog = new wxMessageDialog(this, - "Save changed data?", "My app", wxYES_NO|wxCANCEL); - - int ans = dialog->ShowModal(); - dialog->Close(TRUE); - - switch (ans) - { - case wxID_YES: // Save, then destroy, quitting app - SaveMyData(); - this->Destroy(); - break; - case wxID_NO: // Don't save; just destroy, quitting app - this->Destroy(); - break; - case wxID_CANCEL: // Do nothing - so don't quit app. - default: - break; - } - } - } -\end{verbatim} -}% - -\wxheading{How do I exit the application gracefully?} - -A wxWindows application automatically exits when the top frame (returned -from \helpref{wxApp::OnInit}{wxapponinit}) is destroyed. This may be modified -in later versions to exit only when the {\it last} top-level frame is destroyed. - -\wxheading{Do child windows get deleted automatically?} - -Yes, child windows are deleted from within the parent destructor. This includes any children -that are themselves frames or dialogs, so you may wish to close these child frame or dialog windows -explicitly from within the parent close handler. - -\wxheading{What about other kinds of window?} - -So far we've been talking about `managed' windows, i.e. frames and dialogs. Windows -with parents, such as controls, don't have delayed destruction and don't usually have -close event handlers, though you can implement them if you wish. For consistency, -continue to use the \helpref{wxWindow::Destroy}{wxwindowdestroy} function instead -of the {\bf delete} operator when deleting these kinds of windows explicitly. - diff --git a/docs/latex/wx/tdialog.tex b/docs/latex/wx/tdialog.tex deleted file mode 100644 index a3ac9fbd6a..0000000000 --- a/docs/latex/wx/tdialog.tex +++ /dev/null @@ -1,31 +0,0 @@ -\section{wxDialog overview}\label{wxdialogoverview} - -Classes: \helpref{wxDialog}{wxdialog} - -A dialog box is similar to a panel, in that it is a window which can -be used for placing controls, with the following exceptions: - -\begin{enumerate} -\item A surrounding frame is implicitly created. -\item Extra functionality is automatically given to the dialog box, - such as tabbing between items (currently Windows only). -\item If the dialog box is {\it modal}, the calling program is blocked - until the dialog box is dismissed. -\end{enumerate} - -Under Windows 3, modal dialogs have to be emulated using -modeless dialogs and a message loop. This is because Windows 3 expects -the contents of a modal dialog to be loaded from a resource file or -created on receipt of a dialog initialization message. This is too -restrictive for wxWindows, where any window may be created and displayed -before its contents are created. - -For a set of dialog convenience functions, including file selection, see -\rtfsp\helpref{Dialog functions}{dialogfunctions}. - -See also \helpref{wxPanel}{wxpanel} and \helpref{wxWindow}{wxwindow} for inherited -member functions. Validation of data in controls is covered -in \helpref{Validator overview}{validatoroverview}. - - - diff --git a/docs/latex/wx/tdocview.tex b/docs/latex/wx/tdocview.tex deleted file mode 100644 index 05d29bd93a..0000000000 --- a/docs/latex/wx/tdocview.tex +++ /dev/null @@ -1,305 +0,0 @@ -\section{Document/view overview}\label{docviewoverview} - -Classes: \helpref{wxDocument}{wxdocument}, \helpref{wxView}{wxview}, \helpref{wxDocTemplate}{wxdoctemplate},\rtfsp -\helpref{wxDocManager}{wxdocmanager}, \helpref{wxDocParentFrame}{wxdocparentframe}, \helpref{wxDocChildFrame}{wxdocchildframe}, -\rtfsp\helpref{wxDocMDIParentFrame}{wxdocmdiparentframe}, \helpref{wxDocMDIChildFrame}{wxdocmdichildframe}, -\rtfsp\helpref{wxCommand}{wxcommand}, \helpref{wxCommandProcessor}{wxcommandprocessor} - -The document/view framework is found in most application frameworks, because it -can dramatically simplify the code required to build many kinds of application. - -The idea is that you can model your application primarily in terms of {\it documents} to store data -and provide interface-independent operations upon it, and {\it views} to visualise and manipulate -the data. Documents know how to do input and output given stream objects, and views are responsible -for taking input from physical windows and performing the manipulation on the document data. -If a document's data changes, all views should be updated to reflect the change. - -The framework can provide many user-interface elements based on this model. Once you have defined -your own classes and the relationships between them, the framework takes care -of popping up file selectors, opening and closing files, asking the user to save -modifications, routing menu commands to appropriate (possibly default) code, even -some default print/preview functionality and support for command undo/redo. -The framework is highly modular, allowing overriding and replacement of functionality -and objects to achieve more than the default behaviour. - -These are the overall steps involved in creating an application based on the document/view framework: - -\begin{enumerate}\itemsep=0pt -\item Define your own document and view classes, overriding a minimal set of -member functions e.g. for input/output, drawing and initialization. -\item Define any subwindows -(such as a scrolled window) that are needed for the view(s). You may need to route some events -to views or documents, for example OnPaint needs to be routed to wxView::OnDraw. -\item Decide what style of interface you will use: Microsoft's MDI (multiple -document child frames surrounded by an overall frame), SDI (a separate, unconstrained frame -for each document), or single-window (one document open at a time, as in Windows Write). -\item Use the appropriate wxDocParentFrame and wxDocChildFrame classes. Construct an instance -of wxDocParentFrame in your wxApp::OnInit, and a wxDocChildFrame (if not single-window) when -you initialize a view. Create menus using standard menu ids (such as wxID\_OPEN, wxID\_PRINT), -routing non-application-specific identifiers to the base frame's OnMenuCommand. -\item Construct a single wxDocManager instance at the beginning of your wxApp::OnInit, and then -as many wxDocTemplate instances as necessary to define relationships between documents and -views. For a simple application, there will be just one wxDocTemplate. -\end{enumerate} - -If you wish to implement Undo/Redo, you need to derive your own class(es) from wxCommand -and use wxCommandProcessor::Submit instead of directly executing code. The framework will -take care of calling Undo and Do functions as appropriate, so long as the wxID\_UNDO and -wxID\_REDO menu items are defined in the view menu. - -Here are a few examples of the tailoring you can do to go beyond the default framework -behaviour: - -\begin{itemize}\itemsep=0pt -\item Override wxDocument::OnCreateCommandProcessor to define a different Do/Undo strategy, -or a command history editor. -\item Override wxView::OnCreatePrintout to create an instance of a derived \helpref{wxPrintout}{wxprintout}\rtfsp -class, to provide multi-page document facilities. -\item Override wxDocManager::SelectDocumentPath to provide a different file selector. -\item Limit the maximum number of open documents and the maximum number of undo commands. -\end{itemize} - -Note that to activate framework functionality, you need to use some or all of -the wxWindows \helpref{predefined command identifiers}{predefinedids} in your menus. - -\subsection{wxDocument overview}\label{wxdocumentoverview} - -\overview{Document/view framework overview}{docviewoverview} - -Class: \helpref{wxDocument}{wxdocument} - -The wxDocument class can be used to model an application's file-based -data. It is part of the document/view framework supported by wxWindows, -and cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocTemplate}{wxdoctemplate}\rtfsp -and \helpref{wxDocManager}{wxdocmanager} classes. - -Using this framework can save a lot of routine user-interface programming, -since a range of menu commands -- such as open, save, save as -- are supported automatically. -The programmer just needs to define a minimal set of classes and member functions -for the framework to call when necessary. Data, and the means to view and edit -the data, are explicitly separated out in this model, and the concept of multiple {\it views} onto -the same data is supported. - -Note that the document/view model will suit many but not all styles of application. -For example, it would be overkill for a simple file conversion utility, where there -may be no call for {\it views} on {\it documents} or the ability to open, edit and save -files. But probably the majority of applications are document-based. - -See the example application in {\tt samples/docview}. - -To use the abstract wxDocument class, you need to derive a new class and override -at least the member functions SaveObject and LoadObject. SaveObject and -LoadObject will be called by the framework when the document needs to be saved -or loaded. - -Use the macros DECLARE\_DYNAMIC\_CLASS and IMPLEMENT\_DYNAMIC\_CLASS in order -to allow the framework to create document objects on demand. When you create -a \helpref{wxDocTemplate}{wxdoctemplate} object on application initialization, you -should pass CLASSINFO(YourDocumentClass) to the wxDocTemplate constructor -so that it knows how to create an instance of this class. - -If you do not wish to use the wxWindows method of creating document -objects dynamically, you must override wxDocTemplate::CreateDocument -to return an instance of the appropriate class. - -\subsection{wxView overview}\label{wxviewoverview} - -\overview{Document/view framework overview}{docviewoverview} - -Class: \helpref{wxView}{wxview} - -The wxView class can be used to model the viewing and editing component of -an application's file-based data. It is part of the document/view framework supported by wxWindows, -and cooperates with the \helpref{wxDocument}{wxdocument}, \helpref{wxDocTemplate}{wxdoctemplate} -and \helpref{wxDocManager}{wxdocmanager} classes. - -See the example application in {\tt samples/docview}. - -To use the abstract wxView class, you need to derive a new class and override -at least the member functions OnCreate, OnDraw, OnUpdate and OnClose. You'll probably -want to override OnMenuCommand to respond to menu commands from the frame containing the -view. - -Use the macros DECLARE\_DYNAMIC\_CLASS and IMPLEMENT\_DYNAMIC\_CLASS in order -to allow the framework to create view objects on demand. When you create -a \helpref{wxDocTemplate}{wxdoctemplate} object on application initialization, you -should pass CLASSINFO(YourViewClass) to the wxDocTemplate constructor -so that it knows how to create an instance of this class. - -If you do not wish to use the wxWindows method of creating view -objects dynamically, you must override wxDocTemplate::CreateView -to return an instance of the appropriate class. - -\subsection{wxDocTemplate overview}\label{wxdoctemplateoverview} - -\overview{Document/view framework overview}{docviewoverview} - -Class: \helpref{wxDocTemplate}{wxdoctemplate} - -The wxDocTemplate class is used to model the relationship between a -document class and a view class. The application creates a document -template object for each document/view pair. The list of document -templates managed by the wxDocManager instance is used to create -documents and views. Each document template knows what file filters -and default extension are appropriate for a document/view combination, -and how to create a document or view. - -For example, you might write a small doodling application that can load -and save lists of line segments. If you had two views of the data -- graphical, -and a list of the segments -- then you would create one document class DoodleDocument, -and two view classes (DoodleGraphicView and DoodleListView). You would also -need two document templates, one for the graphical view and another for the -list view. You would pass the same document class and default file extension to both -document templates, but each would be passed a different view class. When -the user clicks on the Open menu item, the file selector is displayed -with a list of possible file filters -- one for each wxDocTemplate. Selecting -the filter selects the wxDocTemplate, and when -a file is selected, that template will be used for creating a document -and view. Under non-Windows platforms, the user will be prompted for -a list of templates before the file selector is shown, since most file selectors -do not allow a choice of file filters. - -For the case where an application has one document type and one view type, -a single document template is constructed, and dialogs will be appropriately -simplified. - -wxDocTemplate is part of the document/view framework supported by wxWindows, -and cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocument}{wxdocument} -and \helpref{wxDocManager}{wxdocmanager} classes. - -See the example application in {\tt samples/docview}. - -To use the wxDocTemplate class, you do not need to derive a new class. -Just pass relevant information to the constructor including CLASSINFO(YourDocumentClass) and -CLASSINFO(YourViewClass) to allow dynamic instance creation. -If you do not wish to use the wxWindows method of creating document -objects dynamically, you must override wxDocTemplate::CreateDocument -and wxDocTemplate::CreateView to return instances of the appropriate class. - -{\it NOTE}: the document template has nothing to do with the C++ template construct. C++ -templates are not used anywhere in wxWindows. - -\subsection{wxDocManager overview}\label{wxdocmanageroverview} - -\overview{Document/view framework overview}{docviewoverview} - -Class: \helpref{wxDocManager}{wxdocmanager} - -The wxDocManager class is part of the document/view framework supported by wxWindows, -and cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocument}{wxdocument}\rtfsp -and \helpref{wxDocTemplate}{wxdoctemplate} classes. - -A wxDocManager instance coordinates documents, views and document templates. It keeps a list of document and -and template instances, and much functionality is routed through this object, such -as providing selection and file dialogs. The application can use this class `as is' or -derive a class and override some members to extend or change the functionality. -Create an instance of this class near the beginning of your application initialization, -before any documents, views or templates are manipulated. - -There may be multiple wxDocManager instances in an application. - -See the example application in {\tt samples/docview}. - -\subsection{wxCommand overview}\label{wxcommandoverview} - -\overview{Document/view framework overview}{docviewoverview} - -Classes: \helpref{wxCommand}{wxcommand}, \helpref{wxCommandProcessor}{wxcommandprocessor} - -wxCommand is a base class for modelling an application command, -which is an action usually performed by selecting a menu item, pressing -a toolbar button or any other means provided by the application to -change the data or view. - -Instead of the application functionality being scattered around -switch statements and functions in a way that may be hard to -read and maintain, the functionality for a command is explicitly represented -as an object which can be manipulated by a framework or application. -When a user interface event occurs, the application {\it submits} a command -to a \helpref{wxCommandProcessor}{wxcommandprocessoroverview} object to execute and -store. - -The wxWindows document/view framework handles Undo and Redo by use of -wxCommand and wxCommandProcessor objects. You might find further uses -for wxCommand, such as implementing a macro facility that stores, loads -and replays commands. - -An application can derive a new class for every command, or, more likely, use -one class parameterized with an integer or string command identifier. - -\subsection{wxCommandProcessor overview}\label{wxcommandprocessoroverview} - -\overview{Document/view framework overview}{docviewoverview} - -Classes: \helpref{wxCommandProcessor}{wxcommandprocessor}, \helpref{wxCommand}{wxcommand} - -wxCommandProcessor is a class that maintains a history of wxCommand -instances, with undo/redo functionality built-in. Derive a new class from this -if you want different behaviour. - -\subsection{wxFileHistory overview}\label{wxfilehistoryoverview} - -\overview{Document/view framework overview}{docviewoverview} - -Classes: \helpref{wxFileHistory}{wxfilehistory}, \helpref{wxDocManager}{wxdocmanager} - -wxFileHistory encapsulates functionality to record the last few files visited, and -to allow the user to quickly load these files using the list appended to the File menu. - -Although wxFileHistory is used by wxDocManager, it can be used independently. You may wish -to derive from it to allow different behaviour, such as popping up a scrolling -list of files. - -By calling wxFileHistory::FileHistoryUseMenu you can associate a file menu with -the file history, that will be used for appending the filenames. They are -appended using menu identifiers in the range wxID\_FILE1 to wxID\_FILE9. - -In order to respond to a file load command from one of these identifiers, -you need to handle them using an event handler, for example: - -{\small -\begin{verbatim} -BEGIN_EVENT_TABLE(wxDocParentFrame, wxFrame) - EVT_MENU(wxID_EXIT, wxDocParentFrame::OnExit) - EVT_MENU_RANGE(wxID_FILE1, wxID_FILE9, wxDocParentFrame::OnMRUFile) -END_EVENT_TABLE() - -void wxDocParentFrame::OnExit(wxCommandEvent& WXUNUSED(event)) -{ - Close(); -} - -void wxDocParentFrame::OnMRUFile(wxCommandEvent& event) -{ - wxString f(m_docManager->GetHistoryFile(event.GetSelection() - wxID_FILE1)); - if (f != "") - (void)m_docManager->CreateDocument(f, wxDOC_SILENT); -} -\end{verbatim} -} - -\subsection{wxWindows predefined command identifiers}\label{predefinedids} - -To allow communication between the application's menus and the -document/view framework, several command identifiers are predefined for you -to use in menus. The framework recognizes them and processes them if you -forward commands from wxFrame::OnMenuCommand (or perhaps from toolbars and -other user interface constructs). - -\begin{itemize}\itemsep=0pt -\item wxID\_OPEN (5000) -\item wxID\_CLOSE (5001) -\item wxID\_NEW (5002) -\item wxID\_SAVE (5003) -\item wxID\_SAVEAS (5004) -\item wxID\_REVERT (5005) -\item wxID\_EXIT (5006) -\item wxID\_UNDO (5007) -\item wxID\_REDO (5008) -\item wxID\_HELP (5009) -\item wxID\_PRINT (5010) -\item wxID\_PRINT\_SETUP (5011) -\item wxID\_PREVIEW (5012) -\end{itemize} - - diff --git a/docs/latex/wx/tevent.tex b/docs/latex/wx/tevent.tex deleted file mode 100644 index 363f403a70..0000000000 --- a/docs/latex/wx/tevent.tex +++ /dev/null @@ -1,188 +0,0 @@ -\section{Event handling overview}\label{eventhandlingoverview} - -Classes: \helpref{wxEvtHandler}{wxevthandler}, \helpref{wxWindow}{wxwindow}, \helpref{wxEvent}{wxevent} - -\subsection{Introduction} - -Before version 2.0 of wxWindows, events were handled by the application -either by supplying callback functions, or by overriding virtual member -functions such as {\bf OnSize}. - -From wxWindows 2.0, {\it event tables} are used instead, with a few exceptions. - -An event table is placed in an implementation file to tell wxWindows how to map -events to member functions. These member functions are not virtual functions, but -they all similar in form: they take a single wxEvent-derived argument, and have a void return -type. - -Here's an example of an event table. - -\begin{verbatim} -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU (wxID_EXIT, MyFrame::OnExit) - EVT_MENU (DO_TEST, MyFrame::DoTest) - EVT_SIZE ( MyFrame::OnSize) - EVT_BUTTON (BUTTON1, MyFrame::OnButton1) -END_EVENT_TABLE() -\end{verbatim} - -The first two entries map menu commands to two different member functions. The EVT\_SIZE macro -doesn't need a window identifier, since normally you are only interested in the -current window's size events. (In fact you could intercept a particular window's size event -by using EVT\_CUSTOM(wxEVT\_SIZE, id, func).) - -The EVT\_BUTTON macro demonstrates that the originating event does not have to come from -the window class implementing the event table - if the event source is a button within a panel within a frame, this will still -work, because event tables are searched up through the hierarchy of windows. In this -case, the button's event table will be searched, then the parent panel's, then the frame's. - -As mentioned before, the member functions that handle events do not have to be virtual. -These member functions take an event argument, and the class of event differs according -to the type of event and the class of the originating window. For size -events, \helpref{wxSizeEvent}{wxsizeevent} is used. For menu commands and most control -commands (such as button presses), \helpref{wxCommandEvent}{wxcommandevent} is used. -When controls get more complicated, then specific event classes are used, such -as \helpref{wxTreeEvent}{wxtreeevent} for events from \helpref{wxTreeCtrl}{wxtreectrl} windows. - -As well as the event table in the implementation file, there must be a DECLARE\_EVENT\_TABLE -macro in the class definition. For example: - -{\small% -\begin{verbatim} -class MyFrame: public wxFrame { - - DECLARE_DYNAMIC_CLASS(MyFrame) - -public: - ... - void OnExit(wxCommandEvent& event); - void OnSize(wxSizeEvent& event); -protected: - int m_count; - ... - DECLARE_EVENT_TABLE() -}; -\end{verbatim} -}% - -\subsection{How events are processed}\label{eventprocessing} - -When an event is received from the windowing system, wxWindows calls \helpref{wxEvtHandler::ProcessEvent}{wxevthandlerprocessevent} on -the first event handler object belonging to the window generating the event. - -The normal order of event table searching by ProcessEvent is as follows: - -\begin{enumerate}\itemsep=0pt -\item If the object is disabled (via a call to \helpref{wxEvtHandler::SetEvtHandlerEnabled}{wxevthandlersetevthandlerenabled}) -the function skips to step (6). -\item If the object is a wxWindow, {\bf ProcessEvent} is recursively called on the window's\rtfsp -\helpref{wxValidator}{wxvalidator}. If this returns TRUE, the function exits. -\item {\bf SearchEventTable} is called for this event handler. If this fails, the base -class table is tried, and so on until no more tables exist or an appropriate function was found, -in which case the function exits. -\item The search is applied down the entire chain of event handlers (usually the chain has a length -of one). If this succeeds, the function exits. -\item If the object is a wxWindow and the event is a wxCommandEvent, {\bf ProcessEvent} is -recursively applied to the parent window's event handler. If this returns TRUE, the function exits. -\item Finally, {\bf ProcessEvent} is called on the wxApp object. -\end{enumerate} - -Note that your application may wish to override ProcessEvent to redirect processing of -events. This is done in the document/view framework, for example, to allow event handlers -to be defined in the document or view. - -\subsection{Pluggable event handlers} - -In fact, you don't have to derive a new class from a window class -if you don't want to. You can derive a new class from wxEvtHandler instead, -defining the appropriate event table, and then call -\rtfsp\helpref{wxWindow::SetEventHandler}{wxwindowseteventhandler} (or, preferably, -\rtfsp\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler}) to make this -event handler the object that responds to events. This way, you can avoid -a lot of class derivation, and use the same event handler object to -handle events from instances of different classes. If you ever have to call a window's event handler -manually, use the GetEventHandler function to retrieve the window's event handler and use that -to call the member function. By default, GetEventHandler returns a pointer to the window itself -unless an application has redirected event handling using SetEventHandler or PushEventHandler. - -One use of PushEventHandler is to temporarily or permanently change the -behaviour of the GUI. For example, you might want to invoke a dialog editor -in your application that changes aspects of dialog boxes. You can -grab all the input for an existing dialog box, and edit it `in situ', -before restoring its behaviour to normal. So even if the application -has derived new classes to customize behaviour, your utility can indulge -in a spot of body-snatching. It could be a useful technique for on-line -tutorials, too, where you take a user through a serious of steps and -don't want them to diverge from the lesson. Here, you can examine the events -coming from buttons and windows, and if acceptable, pass them through to -the original event handler. Use PushEventHandler/PopEventHandler -to form a chain of event handlers, where each handler processes a different -range of events independently from the other handlers. - -\subsection{Event macros summary}\label{eventmacros} - -\wxheading{Specifying an event table} - -\twocolwidtha{8cm}% -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{EVT\_CUSTOM(eventId, id, func)}}{Allows you to add a custom event table -entry by specifying the event identifier (such as wxEVT\_SIZE), the window identifier, -and a member function to call.} -\twocolitem{\windowstyle{EVT\_CUSTOM\_RANGE(eventId, id1, id2, func)}}{The same as EVT\_CUSTOM, -but responds to a range of window identifiers.} -\end{twocollist} - -\wxheading{Generic event table macros} - -\twocolwidtha{8cm}% -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{EVT\_CUSTOM(eventId, id, func)}}{Allows you to add a custom event table -entry by specifying the event identifier (such as wxEVT\_SIZE), the window identifier, -and a member function to call.} -\twocolitem{\windowstyle{EVT\_CUSTOM\_RANGE(eventId, id1, id2, func)}}{The same as EVT\_CUSTOM, -but responds to a range of window identifiers.} -\twocolitem{\windowstyle{EVT\_COMMAND(eventId, id, func)}}{The same as EVT\_CUSTOM, but -expects a member function with a wxCommandEvent argument.} -\twocolitem{\windowstyle{EVT\_COMMAND\_RANGE(eventId, id1, id2, func)}}{The same as EVT\_CUSTOM\_RANGE, but -expects a member function with a wxCommandEvent argument.} -\end{twocollist} - -\wxheading{Macros listed by event class} - -The documentation for specific event macros is organised by event class. Please refer -to these sections for details. - -\twocolwidtha{8cm}% -\begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxActivateEvent}{wxactivateevent}}{The EVT\_ACTIVATE and EVT\_ACTIVATE\_APP macros intercept -activation and deactivation events.} -\twocolitem{\helpref{wxCommandEvent}{wxcommandevent}}{A range of commonly-used control events.} -\twocolitem{\helpref{wxCloseEvent}{wxcloseevent}}{The EVT\_CLOSE macro handles window closure -called via \helpref{wxWindow::Close}{wxwindowclose}.} -\twocolitem{\helpref{wxDropFilesEvent}{wxdropfilesevent}}{The EVT\_DROP\_FILES macros handles -file drop events.} -\twocolitem{\helpref{wxEraseEvent}{wxeraseevent}}{The EVT\_ERASE\_BACKGROUND macro is used to handle window erase requests.} -\twocolitem{\helpref{wxFocusEvent}{wxfocusevent}}{The EVT\_SET\_FOCUS and EVT\_KILL\_FOCUS macros are used to handle keybaord focus events.} -\twocolitem{\helpref{wxKeyEvent}{wxkeyevent}}{EVT\_CHAR and EVT\_CHAR\_HOOK macros handle keyboard -input for any window.} -\twocolitem{\helpref{wxIdleEvent}{wxidleevent}}{The EVT\_IDLE macro handle application idle events -(to process background tasks, for example).} -\twocolitem{\helpref{wxInitDialogEvent}{wxinitdialogevent}}{The EVT\_INIT\_DIALOG macro is used -to handle dialog initialisation.} -\twocolitem{\helpref{wxListEvent}{wxlistevent}}{These macros handle \helpref{wxListCtrl}{wxlistctrl} events.} -\twocolitem{\helpref{wxMenuEvent}{wxmenuevent}}{These macros handle special menu events (not menu commands).} -\twocolitem{\helpref{wxMouseEvent}{wxmouseevent}}{Mouse event macros can handle either individual -mouse events or all mouse events.} -\twocolitem{\helpref{wxMoveEvent}{wxmoveevent}}{The EVT\_MOVE macro is used to handle a window move.} -\twocolitem{\helpref{wxUpdateUIEvent}{wxupdateuievent}}{The EVT\_UPDATE\_UI macro is used to handle user interface -update pseudo-events, which are generated to give the application the chance to update the visual state of menus, -toolbars and controls.} -\twocolitem{\helpref{wxPaintEvent}{wxpaintevent}}{The EVT\_PAINT macro is used to handle window paint requests.} -\twocolitem{\helpref{wxScrollEvent}{wxscrollevent}}{These macros are used to handle scroll events from -windows, \helpref{wxScrollBar}{wxscrollbar}, and \helpref{wxSpinButton}{wxspinbutton}.} -\twocolitem{\helpref{wxSizeEvent}{wxsizeevent}}{The EVT\_SIZE macro is used to handle a window resize.} -\twocolitem{\helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent}}{The EVT\_SYS\_COLOUR\_CHANGED macro is used to handle -events informing the application that the user has changed the system colours (Windows only).} -\twocolitem{\helpref{wxTreeEvent}{wxtreeevent}}{These macros handle \helpref{wxTreeCtrl}{wxtreectrl} events.} -\end{twocollist} - diff --git a/docs/latex/wx/tex2rtf.ini b/docs/latex/wx/tex2rtf.ini deleted file mode 100644 index a314d7ee23..0000000000 --- a/docs/latex/wx/tex2rtf.ini +++ /dev/null @@ -1,28 +0,0 @@ -;;; Tex2RTF initialisation file -runTwice = yes -titleFontSize = 12 -authorFontSize = 10 -authorFontSize = 10 -chapterFontSize = 12 -sectionFontSize = 12 -subsectionFontSize = 12 -contentsDepth = 2 -headerRule = yes -footerRule = yes -useHeadingStyles = yes -listItemIndent=40 -generateHPJ = no -htmlBrowseButtons = bitmap -winHelpContents = yes -winHelpVersion = 3 ; 3 for Windows 3.x, 4 for Windows 95 -winHelpTitle = "wxWindows Manual" -truncateFilenames = yes -combineSubSections = yes -\overview [2] {\rtfonly{See also }\settransparency{on}\sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}\settransparency{off}} -\htmlonly{\image{}{books.gif}}\helpref{#1}{#2} -\sethotspotcolour{on}\sethotspotunderline{on}} -\docparam [2]{\parskip{0}{\it #1}\htmlignore{\par}\parskip{10}\indented{1cm}{#2}} -\wxheading [1]{{\bf \htmlignore{\fcol{blue}{#1}}\htmlonly{\fcol{red}{#1}}}} -\const [0] {{\bf const}} -\constfunc [3] {{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}} -\windowstyle [1] {{\bf #1}\index{#1}} diff --git a/docs/latex/wx/texhelp.sty b/docs/latex/wx/texhelp.sty deleted file mode 100644 index af91bd531d..0000000000 --- a/docs/latex/wx/texhelp.sty +++ /dev/null @@ -1,298 +0,0 @@ -% LaTeX style file -% Name: texhelp.sty -% Author: Julian Smart -% -% Purpose -% ------- -% Style file to enable the simultaneous preparation of printed LaTeX and on-line -% hypertext manuals. -% Use in conjunction with Tex2RTF (see Tex2RTF documentation). -% -% Note that if a non-ASCII character starts a newline and there should be a space -% between the last word on the previous line and the first word on this line, -% you need to use \rtfsp to generate a space in Windows Help. \rtfsp is ignored -% in all other formats. -% -% Julian Smart -% Artificial Intelligence Applications Institute -% -% -% ============== C++/CLIPS Documentation Facilities ============== -% -% Each class definition should be typeset with e.g. -% -% \section{\class{Name}: Parent} -% -% followed by a description of the class. -% Each member should follow: -% -% \membersection{wxName::Member} -% -% with a description of what this member does. -% Then, one (or more if overloaded) member (function) in detail: -% -% \func{return type}{name}{args} -% or -% \member{type}{name} -% -% where args is a list of \param{type}{name}, ... - -% Function, e.g. -% e.g. to typeset -% -% void DoIt(char *string); -% -% write: -% -% \func{void}{DoIt}{\param{char *}{string}} -% - -\newcommand{\func}[3]{\hangafter=1\noindent\hangindent=10mm -{{\it #1} {\bf #2}\index{#2}}(#3)} - -% For function/type definition where the name is a pointer, -% e.g. to typeset -% -% typedef void (*wxFunction)(wxObject&) -% -% write: -% -% \pfunc{typedef void}{wxFunction}{param{wxObject&}} - -\newcommand{\pfunc}[3]{\hangafter=1\noindent\hangindent=10mm -{{\it #1} ({\bf *#2})\index{#2}}(#3)} - -% Use an ordinary \section command for class name definitions. - -% This is used for a member, such as wxBitmap: GetDepth -\newcommand{\membersection}[1]{\subsection*{#1}\index{#1}} - -% CLIPS function -\newcommand{\clipsfunc}[3]{\hangafter=1\noindent\hangindent=10mm -{{\bf #1} ({\bf #2}\index{#2}}#3)} - -\newcommand{\clipssection}[1]{\chapter{#1}} - -% This is used for a CLIPS function name -\newcommand{\functionsection}[1]{\subsection*{#1}} - -% Member: a type and a name -\newcommand{\member}[2]{{\bf #1 \it #2}} - -% C++ Parameter: a type and a name (no intervening space) -\newcommand{\param}[2]{{\it #1}{\bf #2}} - -% CLIPS Parameter: a type and a name (one intervening space) -\newcommand{\cparam}[2]{{\bf #1} {\it #2}} - -% Class: puts in index -\newcommand{\class}[1]{#1\index{#1}} - -%\newcommand{\docparam}[2]{\parskip=0pt {\it #1}\par\parskip=10pt\begin{indented}{1cm}{#2}\end{indented}} - -% Void type -\newcommand{\void}{{\it void}} - -% Typeset destructor -\newcommand{\destruct}[1]{{$\sim$}#1} - -% Typeset insert/extract operators -\newcommand{\cinsert}{$<<$} -\newcommand{\cextract}{$>>$} - - -% =================== Hypertext facilities =================== -% -% To insert hyperlinks (or references, in Latex), \label the sections -% or membersections \label{ref-label} immediately after the section, on the same line, -% and use \helpref{text-to-show}{ref-label} to make a reference. -% - -% Type text with section reference -\newcommand{\helpref}[2]{{\it #1} (p.\ \pageref{#2}) } - -% Type text with URL in verbatim mode -\newcommand{\urlref}[2]{#1 (\verb$#2$)} - -% Don't typeset section number in LaTeX -\newcommand{\helprefn}[2]{{\it #1}} - -% Like helpref, but popup text in WinHelp instead of hyperlinked -\newcommand{\popref}[2]{{\it #1}} - -% Like footnote, but popup text. -\newcommand{\footnotepopup}[2]{{\it #1}\footnote{#2}} - -% =================== On-line help specific macros =================== -% - -% Global document font size/family, help only. -\newcommand{\helpfontsize}[1]{} -\newcommand{\helpfontfamily}[1]{} - -% Ignore in all on-line help -\newcommand{\helpignore}[1]{#1} -% Only print in all on-line help -\newcommand{\helponly}[1]{} - -% Ignore in LaTeX -\newcommand{\latexignore}[1]{} -% Only print in LaTeX -\newcommand{\latexonly}[1]{#1} - -% Ignore in linear RTF -\newcommand{\rtfignore}[1]{#1} -% Only print in linear RTF -\newcommand{\rtfonly}[1]{} - -% Ignore in WinHelp RTF -\newcommand{\winhelpignore}[1]{#1} -% Only print in WinHelp RTF -\newcommand{\winhelponly}[1]{} - -% Ignore in wxHelp -\newcommand{\xlpignore}[1]{#1} -% Only print in wxHelp -\newcommand{\xlponly}[1]{} - -% Ignore in HTML -\newcommand{\htmlignore}[1]{#1} -% Only print in HTML -\newcommand{\htmlonly}[1]{} - -% Input a file only for help system (binder thickness is not a limitation -% in help systems!) -\newcommand{\helpinput}[1]{} - -\newcommand{\rtfsp}{ } % Force a space in RTF, ignore in Latex - -% =================== Miscellaneous macros =================== -% -% Headings consistent with generated ones -\newcommand{\myheading}[1]{\vspace*{25pt} -\begin{flushleft} -{\LARGE \bf #1} -\end{flushleft} -\vskip 20pt -} - -% Heading with entry in contents page. -\newcommand{\chapterheading}[1]{\myheading{#1} -\addcontentsline{toc}{chapter}{#1}} - -\newcommand{\sectionheading}[1]{\myheading{#1} -\addcontentsline{toc}{section}{#1}} - -% Glossary environment -\newenvironment{helpglossary}{\newpage\chapterheading{Glossary}\begin{description}}{\end{description}} - -% Glossary entry -\newcommand{\gloss}[1]{\item[#1]\index{#1}} - -% Image: EPS in Latex, BMP or MF (whatever's available) in RTF. Requires psbox. -\newcommand{\image}[2]{\psboxto(#1){#2}} - -% Image, left aligned (HTML) -\newcommand{\imager}[2]{\psboxto(#1){#2}} - -% Image, right aligned (HTML) -\newcommand{\imagel}[2]{\psboxto(#1){#2}} - -% Imagemap: principally for HTML only. In Latex, -% acts like \image. -\newcommand{\imagemap}[3]{\psboxto(#1){#2}} - -% Headers and footers -% \setheader{EvenPageLeft}{EvenPageCentre}{EvenPageRight} -% {OddPageLeft}{OddPageCentre}{OddPageRight} -\newcommand{\setheader}[6]{ -\lhead[\fancyplain{}{#1}]{\fancyplain{}{#4}} -\chead[\fancyplain{}{#2}]{\fancyplain{}{#5}} -\rhead[\fancyplain{}{#3}]{\fancyplain{}{#6}} -} - -% \setfooter{EvenPageLeft}{EvenPageCentre}{EvenPageRight} -% {OddPageLeft}{OddPageCentre}{OddPageRight} -\newcommand{\setfooter}[6]{ -\lfoot[\fancyplain{#1}{#1}]{\fancyplain{#4}{#4}} -\cfoot[\fancyplain{#2}{#2}]{\fancyplain{#5}{#5}} -\rfoot[\fancyplain{#3}{#3}]{\fancyplain{#6}{#6}} -} - -% Needed for telling RTF where margin paragraph should go -% in mirrored margins mode. -\newcommand{\marginpareven}[1]{\hspace*{0pt}\marginpar{#1}} -\newcommand{\marginparodd}[1]{\hspace*{0pt}\marginpar{#1}} - -% Environment for two-column table popular in WinHelp and manuals. -\newcommand{\twocolwidtha}[1]{\def\twocolwidthaval{#1}} -\newcommand{\twocolwidthb}[1]{\def\twocolwidthbval{#1}} -\newcommand{\twocolspacing}[1]{\def\twocolspacingval{#1}} - -\twocolwidtha{3cm} -\twocolwidthb{8.5cm} -\twocolspacing{2} - -\newcommand{\twocolitem}[2]{#1 & #2\\} -\newcommand{\twocolitemruled}[2]{#1 & #2\\\hline} - -\newenvironment{twocollist}{\renewcommand{\arraystretch}{\twocolspacingval}\begin{tabular}{lp{\twocolwidthbval}}}% -{\end{tabular}\renewcommand{\arraystretch}{1}} - -% Specifying table rows for RTF compatibility -\newcommand{\row}[1]{#1\\} - -% Use for the last ruled row for correct RTF generation. -\newcommand{\ruledrow}[1]{#1\\\hline} - -% Indentation environment. Arg1 is left margin size -\newenvironment{indented}[1]{\begin{list}{}{\leftmargin=#1}\item[]}% -{\end{list}} - -% Framed box of text, normal formatting. -\newcommand{\normalbox}[1]{\fbox{\vbox{#1}}} -% Double-framed box of text. -\newcommand{\normalboxd}[1]{\fbox{\fbox{\vbox{#1}}}} - -% WITHDRAWN -- can't do in RTF, easily. -% Framed box of text, horizontally centred. Ragged right within box. -% \newcommand{\centeredbox}[2]{\begin{center}\fbox{\parbox{#1}{\raggedright#2}}\end{center}} -% Double-framed box of text, horizontally centred. Ragged right within box. -% \newcommand{\centeredboxd}[2]{\begin{center}\fbox{\fbox{\parbox{#1}{\raggedright#2}}}\end{center}} - -% toocomplex environment: simply prints the argument in LaTeX, -% comes out verbatim in all generated formats. -\newenvironment{toocomplex}{}{} - -% Colour: dummy commands since LaTeX doesn't support colour. -% \definecolour{name}{red}{blue}{green} -% \fcol{name}{text} ; Foreground -% \bcol{name}{text} ; Background -\newcommand{\definecolour}[4]{} -\newcommand{\definecolor}[4]{} -\newcommand{\fcol}[2]{#2} -\newcommand{\bcol}[2]{#2} -\newcommand{\sethotspotcolour}[1]{} -\newcommand{\sethotspotunderline}[1]{} -\newcommand{\settransparency}[1]{} -\newcommand{\backslashraw}[0]{} -\newcommand{\lbraceraw}[0]{} -\newcommand{\rbraceraw}[0]{} -\newcommand{\registered}[0]{(r)} -\newcommand{\background}[1]{} -\newcommand{\textcolour}[1]{} -\newcommand{\overview}[2]{See \helpref{#1}{#2}.} -\newcommand{\docparam}[2]{{\it #1}\begin{list}{}{\leftmargin=1cm}\item[] -#2% -\end{list}} -\newcommand{\wxheading}[1]{{\bf #1}} -\newcommand{\const}[0]{{\bf const}} -\newcommand{\constfunc}[3]{{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}} -\newcommand{\windowstyle}[1]{{\bf #1}\index{#1}} - -\addtolength{\textwidth}{1in} -\addtolength{\oddsidemargin}{-0.5in} -\addtolength{\topmargin}{-0.5in} -\addtolength{\textheight}{1in} -\sloppy - diff --git a/docs/latex/wx/texpr.tex b/docs/latex/wx/texpr.tex deleted file mode 100644 index 0cf364f452..0000000000 --- a/docs/latex/wx/texpr.tex +++ /dev/null @@ -1,203 +0,0 @@ -\section{wxExpr overview}\label{exproverview} - -wxExpr is a C++ class reading and writing a subset of Prolog-like syntax, -supporting objects attribute/value pairs. - -wxExpr can be used to develop programs with readable and -robust data files. Within wxWindows itself, it is used to parse -the {\tt .wxr} dialog resource files. - -{\bf History of wxExpr} - -During the development of the tool Hardy within the AIAI, a need arose -for a data file format for C++ that was easy for both humans and -programs to read, was robust in the face of fast-moving software -development, and that provided some compatibility with AI languages -such as Prolog and LISP. - -The result was the wxExpr library (formerly called PrologIO), which is able to read and write a -Prolog-like attribute-value syntax, and is additionally capable of -writing LISP syntax for no extra programming effort. The advantages of -such a library are as follows: - -\begin{enumerate}\itemsep=0pt -\item The data files are readable by humans; -\item I/O routines are easier to write and debug compared with using binary files; -\item the files are robust: unrecognised data will just be ignored by the application -\item Inbuilt hashing gives a random access capability, useful for when linking -up C++ objects as data is read in; -\item Prolog and LISP programs can load the files using a single command. -\end{enumerate} - -The library was extended to use the ability to read and write -Prolog-like structures for remote procedure call (RPC) communication. -The next two sections outline the two main ways the library can be used. - -\subsection{wxExpr for data file manipulation}\itemsep=0pt - -The fact that the output is in Prolog syntax is irrelevant for most -programmers, who just need a reasonable I/O facility. Typical output -looks like this: - -\begin{verbatim} -diagram_definition(type = "Spirit Belief Network"). - -node_definition(type = "Model", - image_type = "Diamond", - attribute_for_label = "name", - attribute_for_status_line = "label", - colour = "CYAN", - default_width = 120, - default_height = 80, - text_size = 10, - can_resize = 1, - has_hypertext_item = 1, - attributes = ["name", "combining_function", "level_of_belief"]). - -arc_definition(type = "Potentially Confirming", - image_type = "Spline", - arrow_type = "End", - line_style = "Solid", - width = 1, - segmentable = 0, - attribute_for_label = "label", - attribute_for_status_line = "label", - colour = "BLACK", - text_size = 10, - has_hypertext_item = 1, - can_connect_to = ["Evidence", "Cluster", "Model", "Evidence", "Evidence", "Cluster"], - can_connect_from = ["Data", "Evidence", "Cluster", "Evidence", "Data", "Cluster"]). -\end{verbatim} - -This is substantially easier to read and debug than a series of numbers and -strings. - -Note the object-oriented style: a file comprises a series of {\it clauses}. -Each clause is an object with a {\it functor}\/ or object name, followed -by a list of attribute-value pairs enclosed in parentheses, and finished -with a full stop. Each attribute value may be a string, a word (no quotes), -an integer, a real number, or a list with potentially recursive elements. - -The way that the facility is used by an application to read in a file is -as follows: - -\begin{enumerate}\itemsep=0pt -\item The application creates a wxExprDatabase instance. -\item The application tells the database to read in the entire file. -\item The application searches the database for objects it requires, -decomposing the objects using the wxExpr API. The database may be hashed, -allowing rapid linking-up of application data. -\item The application deletes or clears the wxExprDatabase. -\end{enumerate} - -Writing a file is just as easy: - -\begin{enumerate}\itemsep=0pt -\item The application creates a wxExprDatabase instance. -\item The application adds objects to the database using the API. -\item The application tells the database to write out the entire database, -in Prolog or LISP notation. -\item The application deletes or clears the wxExprDatabase. -\end{enumerate} - -To use the library, include "wxexpr.h". - -\subsection{wxExpr compilation} - -For UNIX compilation, ensure that YACC and LEX or FLEX are on your system. Check that -the makefile uses the correct programs: a common error is to compile -y\_tab.c with a C++ compiler. Edit the CCLEX variable in make.env -to specify a C compiler. Also, do not attempt to compile lex\_yy.c -since it is included by y\_tab.c. - -For DOS compilation, the simplest thing is to copy dosyacc.c to y\_tab.c, and doslex.c to -lex\_yy.c. It is y\_tab.c that must be compiled (lex\_yy.c is included by -y\_tab.c) so if adding source files to a project file, ONLY add y\_tab.c -plus the .cc files. If you wish to alter the parser, you will need YACC -and FLEX on DOS. - -The DOS tools are available at the AIAI ftp site, in the tools directory. Note that -for FLEX installation, you need to copy flex.skl into the directory -c:/lib. - -If you are using Borland C++ and wish to regenerate lex\_yy.c and y\_tab.c -you need to generate lex\_yy.c with FLEX and then comment out the `malloc' and `free' -prototypes in lex\_yy.c. It will compile with lots of warnings. If you -get an undefined \_PROIO\_YYWRAP symbol when you link, you need to remove -USE\_DEFINE from the makefile and recompile. This is because the parser.y -file has a choice of defining this symbol as a function or as a define, -depending on what the version of FLEX expects. See the bottom of -parser.y, and if necessary edit it to make it compile in the opposite -way to the current compilation. - -To test out wxExpr compile the test program (samples/wxexpr/wxexpr.exe), -and try loading test.exp into the test -program. Then save it to another file. If the second is identical to the -first, wxExpr is in a working state. - -\subsection{Bugs} - -These are the known bugs: - -\begin{enumerate}\itemsep=0pt -\item Functors are permissable only in the main clause (object). -Therefore nesting of structures must be done using lists, not predicates -as in Prolog. -\item There is a limit to the size of strings read in (about 5000 bytes). -\end{enumerate} - -\subsection{Using wxExpr} - -This section is a brief introduction to using the wxExpr package. - -First, some terminology. A {\it wxExprDatabase}\/ is a list of {\it clauses}, -each of which represents an object or record which needs to be saved to a file. -A clause has a {\it functor}\/ (name), and a list of attributes, each of which -has a value. Attributes may take the following types of value: string, word, -integer, floating point number, and list. A list can itself contain any -type, allowing for nested data structures. - -Consider the following code. - -\begin{verbatim} -wxExprDatabase db; - -wxExpr *my_clause = new wxExpr("object"); -my_clause->AddAttributeValue("id", (long)1); -my_clause->AddAttributeValueString("name", "Julian Smart"); -db.Append(my_clause); - -ofstream file("my_file"); -db.Write(file); -\end{verbatim} - -This creates a database, constructs a clause, adds it to the database, -and writes the whole database to a file. The file it produces looks like -this: - -\begin{verbatim} -object(id = 1, - name = "Julian Smart"). -\end{verbatim} - -To read the database back in, the following will work: - -\begin{verbatim} -wxExprDatabase db; -db.Read("my_file"); - -db.BeginFind(); - -wxExpr *my_clause = db.FindClauseByFunctor("object"); -int id = 0; -wxString name = "None found"; - -my_clause->GetAttributeValue("id", id); -my_clause->GetAttributeValue("name", name); - -cout << "Id is " << id << ", name is " << name << "\n"; -\end{verbatim} - -Note the setting of defaults before attempting to retrieve attribute values, -since they may not be found. - diff --git a/docs/latex/wx/text.tex b/docs/latex/wx/text.tex deleted file mode 100644 index 271b7b9ac2..0000000000 --- a/docs/latex/wx/text.tex +++ /dev/null @@ -1,440 +0,0 @@ -\section{\class{wxTextCtrl}}\label{wxtextctrl} - -A text control allows text to be displayed and edited. It may be -single line or multiline. - -\wxheading{Derived from} - -streambuf\\ -\helpref{wxControl}{wxcontrol}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxTE\_PROCESS\_ENTER}}{The callback function will -receive the message wxEVENT\_TYPE\_TEXT\_ENTER\_COMMAND. Note -that this will break tab traversal for this panel item under -Windows.} -\twocolitem{\windowstyle{wxTE\_MULTILINE}}{The text control allows multiple lines.} -\twocolitem{\windowstyle{wxTE\_PASSWORD}}{The text will be echoed as asterisks.} -\twocolitem{\windowstyle{wxTE\_READONLY}}{The text will not be user-editable.} -\twocolitem{\windowstyle{wxHSCROLL}}{A vertical scrollbar will be present.} -\end{twocollist} - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Remarks} - -This class multiply-inherits from {\bf streambuf} where compilers allow, allowing code such -as the following: - -{\small% -\begin{verbatim} - wxTextCtrl *control = new wxTextCtrl(...); - - ostream stream(control) - - stream << 123.456 << " some text\n"; - stream.flush(); -\end{verbatim} -}% - -If your compiler does not support derivation from {\bf streambuf} and gives a compile error, define the symbol {\bf NO\_TEXT\_WINDOW\_STREAM} in the -wxTextCtrl header file. - -\wxheading{Event handling} - -To process input from a text control, use these event handler macros to direct input to member -functions that take a \helpref{wxCommandEvent}{wxcommandevent} argument. - -\twocolwidtha{7cm}% -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_TEXT(id, func)}}{Respond to a wxEVT\_COMMAND\_TEXT\_UPDATED event, -generated when the text changes.} -\twocolitem{{\bf EVT\_TEXT\_ENTER(id, func)}}{Respond to a wxEVT\_COMMAND\_TEXT\_ENTER event, -generated when enter is pressed in a single-line text control.} -\end{twocollist}% - -%\wxheading{See also} -% -%\helpref{wxRichTextCtrl}{wxrichtextctrl} -% -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxTextCtrl::wxTextCtrl}\label{wxtextctrlconstr} - -\func{}{wxTextCtrl}{\void} - -Default constructor. - -\func{}{wxTextCtrl}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp -\param{const wxString\& }{value = ``"}, \param{const wxPosition\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = 0}, \param{const wxValidator\& }{validator}, \param{const wxString\& }{name = ``text"}} - -Constructor, creating and showing a text control. - -\wxheading{Parameters} - -\docparam{parent}{Parent window. Should not be NULL.} - -\docparam{id}{Control identifier. A value of -1 denotes a default value.} - -\docparam{value}{Default text value.} - -\docparam{pos}{Text control position.} - -\docparam{size}{Text control size.} - -\docparam{style}{Window style. See \helpref{wxTextCtrl}{wxtextctrl}.} - -\docparam{validator}{Window validator.} - -\docparam{name}{Window name.} - -\wxheading{Remarks} - -Under Windows, if the {\bf wxTE\_MULTILINE} style is used, the window is implemented -as a Windows rich text control with unlimited capacity. Otherwise, normal edit control limits -apply. - -\wxheading{See also} - -\helpref{wxTextCtrl::Create}{wxtextctrlcreate}, \helpref{wxValidator}{wxvalidator} - -\membersection{wxTextCtrl::\destruct{wxTextCtrl}} - -\func{}{\destruct{wxTextCtrl}}{\void} - -Destructor, destroying the text control. - -\membersection{wxTextCtrl::Clear}\label{wxtextctrlclear} - -\func{virtual void}{Clear}{\void} - -Clears the text in the control. - -\membersection{wxTextCtrl::Copy}\label{wxtextctrlcopy} - -\func{virtual void}{Copy}{\void} - -Copies the selected text to the clipboard under Motif and MS Windows. - -\membersection{wxTextCtrl::Create}\label{wxtextctrlcreate} - -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp -\param{const wxString\& }{value = ``"}, \param{const wxPosition\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = 0}, \param{const wxValidator\& }{validator}, \param{const wxString\& }{name = ``text"}} - -Creates the text control for two-step construction. Derived classes -should call or replace this function. See \helpref{wxTextCtrl::wxTextCtrl}{wxtextctrlconstr}\rtfsp -for further details. - -\membersection{wxTextCtrl::Cut}\label{wxtextctrlcut} - -\func{virtual void}{Cut}{\void} - -Copies the selected text to the clipboard and removes the selection. - -\membersection{wxTextCtrl::DiscardEdits} - -\func{void}{DiscardEdits}{\void} - -Resets the internal `modified' flag as if the current edits had been saved. - -\membersection{wxTextCtrl::GetInsertionPoint}\label{wxtextctrlgetinsertionpoint} - -\constfunc{virtual long}{GetInsertionPoint}{\void} - -Returns the insertion point. - -\membersection{wxTextCtrl::GetLastPosition}\label{wxtextctrlgetlastposition} - -\constfunc{virtual long}{GetLastPosition}{\void} - -Returns the last position in the text control. - -\membersection{wxTextCtrl::GetLineLength}\label{wxtextctrlgetlinelength} - -\constfunc{int}{GetLineLength}{\param{long}{ lineNo}} - -Gets the length of the specified line. - -\wxheading{Parameters} - -\docparam{lineNo}{Line number (starting from zero).} - -\wxheading{Return value} - -The length of the line, or -1 if {\it lineNo} was invalid. - -\membersection{wxTextCtrl::GetLineText}\label{wxtextctrlgetlinetext} - -\constfunc{wxString}{GetLineText}{\param{long}{ lineNo}} - -Returns the contents of a given line in the text control. - -\wxheading{Parameters} - -\docparam{lineNo}{The line number, starting from zero.} - -\wxheading{Return value} - -The contents of the line. - -\membersection{wxTextCtrl::GetNumberOfLines}\label{wxtextctrlgetnumberoflines} - -\constfunc{int}{GetNumberOfLines}{\void} - -Returns the number of lines in the text control buffer. - -\membersection{wxTextCtrl::GetValue}\label{wxtextctrlgetvalue} - -\constfunc{wxString}{GetValue}{\void} - -Gets the contents of the control. - -\membersection{wxTextCtrl::IsModified}\label{wxtextctrlismodified} - -\constfunc{bool}{IsModified}{\void} - -Returns TRUE if the text has been modified. - -\membersection{wxTextCtrl::LoadFile}\label{wxtextctrlloadfile} - -\func{bool}{LoadFile}{\param{const wxString\& }{ filename}} - -Loads and displays the named file, if it exists. - -\wxheading{Parameters} - -\docparam{filename}{The filename of the file to load.} - -\wxheading{Return value} - -TRUE if successful, FALSE otherwise. - -\membersection{wxTextCtrl::OnChar}\label{wxtextctrlonchar} - -\func{void}{OnChar}{\param{wxKeyEvent\& }{event}} - -Default handler for character input. - -\wxheading{Remarks} - -It is possible to intercept character -input by overriding this member. Call this function -to let the default behaviour take place; not calling -it results in the character being ignored. You can -replace the {\it keyCode} member of {\it event} to -translate keystrokes. - -Note that Windows and Motif have different ways -of implementing the default behaviour. In Windows, -calling wxTextCtrl::OnChar immediately -processes the character. In Motif, -calling this function simply sets a flag -to let default processing happen. This might affect -the way in which you write your OnChar function -on different platforms. - -\wxheading{See also} - -\helpref{wxKeyEvent}{wxkeyevent} - -\membersection{wxTextCtrl::OnDropFiles}\label{wxtextctrlondropfiles} - -\func{void}{OnDropFiles}{\param{wxDropFilesEvent\& }{event}} - -This event handler function implements default drag and drop behaviour, which -is to load the first dropped file into the control. - -\wxheading{Parameters} - -\docparam{event}{The drop files event.} - -\wxheading{See also} - -\helpref{wxDropFilesEvent}{wxdropfilesevent} - -\membersection{wxTextCtrl::Paste}\label{wxtextctrlpaste} - -\func{virtual void}{Paste}{\void} - -Pastes text from the clipboard to the text item. - -\membersection{wxTextCtrl::PositionToXY}\label{wxtextctrlpositiontoxy} - -\constfunc{long}{PositionToXY}{\param{long }{pos}, \param{long *}{x}, \param{long *}{y}} - -Converts given character and line position to a position. - -\wxheading{Parameters} - -\docparam{pos}{Position.} - -\docparam{x}{Receives character position.} - -\docparam{y}{Receives line position.} - -\wxheading{See also} - -\helpref{wxTextCtrl::XYToPosition}{wxtextctrlxytoposition} - -\membersection{wxTextCtrl::Remove}\label{wxtextctrlremove} - -\func{virtual void}{Remove}{\param{long}{ from}, \param{long}{ to}} - -Removes the text between the two positions. - -\wxheading{Parameters} - -\docparam{from}{The first position.} - -\docparam{to}{The last position.} - -\membersection{wxTextCtrl::Replace}\label{wxtextctrlreplace} - -\func{virtual void}{Replace}{\param{long}{ from}, \param{long}{ to}, \param{const wxString\& }{value}} - -Replaces the text between two positions with the given text. - -\wxheading{Parameters} - -\docparam{from}{The first position.} - -\docparam{to}{The last position.} - -\docparam{value}{The value to replace the existing text with.} - -\membersection{wxTextCtrl::SaveFile}\label{wxtextctrlsavefile} - -\func{bool}{SaveFile}{\param{const wxString\& }{ filename}} - -Saves the contents of the control in a text file. - -\wxheading{Parameters} - -\docparam{filename}{The name of file in which to save the text.} - -\wxheading{Return value} - -TRUE if the operation was successful, FALSE otherwise. - -\membersection{wxTextCtrl::SetEditable}\label{wxtextctrlseteditable} - -\func{virtual void}{SetEditable}{\param{const bool}{ editable}} - -Makes the text item editable or read-only. - -\wxheading{Parameters} - -\docparam{editable}{If TRUE, the control is editable. If FALSE, the control is read-only.} - -\membersection{wxTextCtrl::SetInsertionPoint}\label{wxtextctrlsetinsertionpoint} - -\func{virtual void}{SetInsertionPoint}{\param{long}{ pos}} - -Sets the insertion point. Windows only. ?? - -\wxheading{Parameters} - -\docparam{pos}{Position to set.} - -\membersection{wxTextCtrl::SetInsertionPointEnd}\label{wxtextctrlsetinsertionpointend} - -\func{virtual void}{SetInsertionPointEnd}{\void} - -Sets the insertion point at the end of the text control. - -\membersection{wxTextCtrl::SetSelection}\label{wxtextctrlsetselection} - -\func{virtual void}{SetSelection}{\param{long}{ from}, \param{long}{ to}} - -Selects the text between the two positions. - -\wxheading{Parameters} - -\docparam{from}{The first position.} - -\docparam{to}{The last position.} - -\membersection{wxTextCtrl::SetValue}\label{wxtextctrlsetvalue} - -\func{virtual void}{SetValue}{\param{const wxString\& }{ value}} - -Sets the text value. - -\wxheading{Parameters} - -\docparam{value}{The new value to set. It may contain newline characters if the text control is multi-line.} - -\membersection{wxTextCtrl::ShowPosition}\label{wxtextctrlshowposition} - -\func{void}{ShowPosition}{\param{long}{ pos}} - -Makes the line containing the given position visible. - -\wxheading{Parameters} - -\docparam{pos}{The position that should be visible.} - -\membersection{wxTextCtrl::WriteText}\label{wxtextctrlwritetext} - -\func{void}{WriteText}{\param{const wxString\& }{ text}} - -Writes the text into the text control at the current position. - -\wxheading{Parameters} - -\docparam{text}{Text to write to the text control.} - -\wxheading{Remarks} - -Newlines in the text string -are the only control characters allowed, and they will cause appropriate -line breaks. See \helpref{wxTextCtrl::\cinsert}{wxtextctrlinsert} for more convenient ways of writing to the -window. - -\membersection{wxTextCtrl::XYToPosition}\label{wxtextctrlxytoposition} - -\func{long}{XYToPosition}{\param{long}{ x}, \param{long}{ y}} - -Converts the given character and line position to a position. - -\wxheading{Parameters} - -\docparam{x}{The character position.} - -\docparam{y}{The line position.} - -\wxheading{Return value} - -The position value. - -\membersection{wxTextCtrl::operator \cinsert}\label{wxtextctrlinsert} - -\func{wxTextCtrl\&}{operator \cinsert}{\param{const wxString\& }{s}} - -\func{wxTextCtrl\&}{operator \cinsert}{\param{int}{ i}} - -\func{wxTextCtrl\&}{operator \cinsert}{\param{long}{ i}} - -\func{wxTextCtrl\&}{operator \cinsert}{\param{float}{ f}} - -\func{wxTextCtrl\&}{operator \cinsert}{\param{double}{ d}} - -\func{wxTextCtrl\&}{operator \cinsert}{\param{char}{ c}} - -Operator definitions for writing to a text control, for example: - -\begin{verbatim} - wxTextCtrl *wnd = new wxTextCtrl(my_frame); - - (*wnd) << "Welcome to text control number " << 1 << ".\n"; -\end{verbatim} - - diff --git a/docs/latex/wx/textdlg.tex b/docs/latex/wx/textdlg.tex deleted file mode 100644 index ec2f8d1db5..0000000000 --- a/docs/latex/wx/textdlg.tex +++ /dev/null @@ -1,64 +0,0 @@ -\section{\class{wxTextEntryDialog}}\label{wxtextentrydialog} - -This class represents a dialog that requests a one-line text string from the user. -It is implemented as a generic wxWindows dialog. - -\wxheading{Derived from} - -\helpref{wxDialog}{wxdialog}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxTextEntryDialog overview}{wxtextentrydialogoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxTextEntryDialog::wxTextEntryDialog}\label{wxtextentrydialogconstr} - -\func{}{wxTextEntryDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message = "Please enter text"},\rtfsp -\param{const wxString\& }{defaultValue = ""}, \param{long }{style = wxOK \pipe wxCANCEL \pipe wxCENTRE}, \param{const wxPoint\& }{pos = wxDefaultPosition}} - -Constructor. Use \helpref{wxTextEntryDialog::ShowModal}{wxtextentrydialogshowmodal} to show the dialog. - -\wxheading{Parameters} - -\docparam{parent}{Parent window.} - -\docparam{message}{Message to show on the dialog.} - -\docparam{defaultValue}{The default value, which may be the empty string.} - -\docparam{style}{A dialog style, specifying the buttons (wxOK, wxCANCEL) and an optional wxCENTRE style.} - -\docparam{pos}{Dialog position.} - -\membersection{wxTextEntryDialog::\destruct{wxTextEntryDialog}} - -\func{}{\destruct{wxTextEntryDialog}}{\void} - -Destructor. - -\membersection{wxTextEntryDialog::GetValue}\label{wxtextentrydialoggetvalue} - -\constfunc{wxString}{GetValue}{\void} - -Returns the text that the user has entered if the user has pressed OK, or the original value -if the user has pressed Cancel. - -\membersection{wxTextEntryDialog::SetValue}\label{wxtextentrydialogsetvalue} - -\func{void}{SetValue}{\param{const wxString\& }{value}} - -Sets the default text value. - -\membersection{wxTextEntryDialog::ShowModal}\label{wxtextentrydialogshowmodal} - -\func{int}{ShowModal}{\void} - -Shows the dialog, returning wxID\_OK if the user pressed OK, and wxOK\_CANCEL -otherwise. - - diff --git a/docs/latex/wx/tfont.tex b/docs/latex/wx/tfont.tex deleted file mode 100644 index 47fbfdef2b..0000000000 --- a/docs/latex/wx/tfont.tex +++ /dev/null @@ -1,36 +0,0 @@ -\section{Font overview}\label{wxfontoverview} - -Class: \helpref{wxFont}{wxfont} - -A font is an object which determines the appearance of text, primarily -when drawing text to a window or device context. A font is determined by -up to six parameters: - -\begin{twocollist}\itemsep=0pt -\twocolitem{Point size}{This is the standard way of referring to text size.} -\twocolitem{Family}{Supported families are: - {\bf wxDEFAULT, wxDECORATIVE, wxROMAN, wxSCRIPT, wxSWISS, wxMODERN}. - {\bf wxMODERN} is a fixed pitch font; the others are either fixed or variable pitch.} -\twocolitem{Style}{The value can be {\bf wxNORMAL, wxSLANT} or {\bf wxITALIC}.} -\twocolitem{Weight}{The value can be {\bf wxNORMAL, wxLIGHT} or {\bf wxBOLD}.} -\twocolitem{Underlining}{The value can be TRUE or FALSE.} -\twocolitem{Face name}{An optional string specifying the actual typeface to be used. If NULL, -a default typeface will chosen based on the family.} -\end{twocollist} - -Specifying a family, rather than a specific typeface name, ensures a degree of portability -across platforms because a suitable font will be chosen for the given font family. - -Under Windows, the face name can be one of the installed fonts on the user's system. Since -the choice of fonts differs from system to system, either choose standard Windows fonts, -or if allowing the user to specify a face name, store the family id with any file that -might be transported to a different Windows machine or other platform. - -\normalbox{{\bf Note:} There is currently a difference between the appearance of fonts on the -two platforms, if the mapping mode is anything other than MM\_TEXT. -Under X, font size is always specified in points. Under MS Windows, the -unit for text is points but the text is scaled according to the -current mapping mode. However, user scaling on a device context will -also scale fonts under both environments.} - - diff --git a/docs/latex/wx/tgrid.tex b/docs/latex/wx/tgrid.tex deleted file mode 100644 index af721965bd..0000000000 --- a/docs/latex/wx/tgrid.tex +++ /dev/null @@ -1,40 +0,0 @@ -\section{wxGrid classes overview}\label{gridoverview} - -wxGrid is a class for displaying and editing tabular information. - -To use wxGrid, include the wxgrid.h header file and link with the -wxGrid library. Create a wxGrid object, or, if you need to override -some default behaviour, create an object of a class derived from wxGrid. -You need to call CreateGrid before there are any cells in the grid. - -All row and column positions start from zero, and dimensions are in pixels. - -If you make changes to row or column dimensions, call UpdateDimensions and -then AdjustScrollbars. If you make changes to the grid appearance (such as -a change of cell background colour or font), call Refresh for the changes -to be shown. - -\subsection{Example} - -The following fragment is taken from the file samples/grid/test.cpp. Note the -call to UpdateDimensions, which is required if the application -has changed any dimensions such as column width or row height. -You may also need to call AdjustScrollbars. In this case, AdjustScrollbars -isn't necessary because it will be called by wxGrid::OnSize which is invoked -when the window is first displayed. - -\begin{verbatim} - // Make a grid - frame->grid = new wxGrid(frame, 0, 0, 400, 400); - - frame->grid->CreateGrid(10, 8); - frame->grid->SetColumnWidth(3, 200); - frame->grid->SetRowHeight(4, 45); - frame->grid->SetCellValue("First cell", 0, 0); - frame->grid->SetCellValue("Another cell", 1, 1); - frame->grid->SetCellValue("Yet another cell", 2, 2); - frame->grid->SetCellTextFont(wxTheFontList->FindOrCreateFont(12, wxROMAN, wxITALIC, wxNORMAL), 0, 0); - frame->grid->SetCellTextColour(*wxRED, 1, 1); - frame->grid->SetCellBackgroundColour(*wxCYAN, 2, 2); - frame->grid->UpdateDimensions(); -\end{verbatim} diff --git a/docs/latex/wx/tguide.tex b/docs/latex/wx/tguide.tex deleted file mode 100644 index a4c4394351..0000000000 --- a/docs/latex/wx/tguide.tex +++ /dev/null @@ -1,56 +0,0 @@ -\section{Writing a wxWindows application: a rough guide}\label{roughguide} - -To set a wxWindows application going, you'll need to derive a \helpref{wxApp}{wxapp} class and -override \helpref{wxApp::OnInit}{wxapponinit}. - -An application must have a top-level \helpref{wxFrame}{wxframe} window (returned by \helpref{wxApp::OnInit}{wxapponinit}), -each frame containing one or more instances of \helpref{wxPanel}{wxpanel}, \helpref{wxSplitterWindow}{wxsplitterwindow}\rtfsp -or other windows and controls. - -A frame can have a \helpref{wxMenuBar}{wxmenubar}, a status line, and a \helpref{wxIcon}{wxicon} for -when the frame is iconized. - -A \helpref{wxPanel}{wxpanel} is used to place controls (classes derived from \helpref{wxControl}{wxcontrol}) -which are used for user interaction. Examples of controls are \helpref{wxButton}{wxbutton}, -\rtfsp\helpref{wxCheckBox}{wxcheckbox}, \helpref{wxChoice}{wxchoice}, \helpref{wxListBox}{wxlistbox}, -\rtfsp\helpref{wxRadioBox}{wxradiobox}, \helpref{wxSlider}{wxslider}. - -Instances of \helpref{wxDialog}{wxdialog} can also be used for panels, items and they have -the advantage of not requiring a separate frame. - -Instead of creating a dialog box and populating it with items, it is possible to choose -one of the convenient common dialog classes, such as \helpref{wxMessageDialog}{wxmessagedialog}\rtfsp -and \helpref{wxFileDialog}{wxfiledialog}. - -You never draw directly onto a window --- you use a {\it device context} (DC). \helpref{wxDC}{wxdc} is -the base for \helpref{wxClientDC}{wxclientdc}, \helpref{wxPaintDC}{wxpaintdc}, \helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxPostScriptDC}{wxpostscriptdc}, -\rtfsp\helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxMetaFileDC}{wxmetafiledc} and \helpref{wxPrinterDC}{wxprinterdc}. -If your drawing functions have {\bf wxDC} as a parameter, you can pass any of these DCs -to the function, and thus use the same code to draw to several different devices. -You can draw using the member functions of {\bf wxDC}, such as \helpref{wxDC::DrawLine}{wxdcdrawline}\rtfsp -and \helpref{wxDC::DrawText}{wxdcdrawtext}. Control colour on a window (\helpref{wxColour}{wxcolour}) with -brushes (\helpref{wxBrush}{wxbrush}) and pens (\helpref{wxPen}{wxpen}). - -To intercept events, you add a DECLARE\_EVENT\_TABLE macro to the window class declaration, -and put a BEGIN\_EVENT\_TABLE ... END\_EVENT\_TABLE block in the implementation file. Between these -macros, you add event macros which map the event (such as a mouse click) to a member function. -These might override predefined event handlers such as \helpref{wxWindow::OnChar}{wxwindowonchar} and -\rtfsp\helpref{wxWindow::OnMouseEvent}{wxwindowonmouseevent}. - -Most modern applications will have an on-line, hypertext help system; for this, you -need wxHelp and the \helpref{wxHelpControllerBase}{wxhelpcontrollerbase} class to control -wxHelp. To add sparkle, you might use the wxToolBar class (documented separately) -which makes heavy use of the \helpref{wxBitmap}{wxbitmap}. - -GUI applications aren't all graphical wizardry. List and hash table needs are -catered for by \helpref{wxList}{wxlist}, \helpref{wxStringList}{wxstringlist} and \helpref{wxHashTable}{wxhashtable}. -You will undoubtedly need some platform-independent \helpref{file functions}{filefunctions}, -and you may find it handy to maintain and search a list of paths using \helpref{wxPathList}{wxpathlist}. -There's a \helpref{miscellany}{miscellany} of operating system and other functions. - -If you have several communicating applications, you can try out the DDE-like functions, by -using the three classes \helpref{wxDDEClient}{wxddeclient}, \helpref{wxDDEServer}{wxddeserver} and -\rtfsp\helpref{wxDDEConnection}{wxddeconnection}. These use DDE under Windows, and a simulation using -sockets under UNIX. - - diff --git a/docs/latex/wx/thread.tex b/docs/latex/wx/thread.tex deleted file mode 100644 index 62d334e12a..0000000000 --- a/docs/latex/wx/thread.tex +++ /dev/null @@ -1,131 +0,0 @@ -\section{\class{wxThread}}\label{wxthread} - -A wxThread manages a system thread, code which executes as a mini-process within the application. - -\wxheading{Derived from} - -None. - -\wxheading{See also} - -\helpref{wxMutex}{wxmutex}, \helpref{wxCondition}{wxcondition} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxThread::wxThread}\label{wxthreadconstr} - -\func{}{wxThread}{\void} - -Default constructor. - -\membersection{wxThread::\destruct{wxThread}} - -\func{}{\destruct{wxThread}}{\void} - -Destroys the wxThread object. - -\membersection{wxThread::Create}\label{wxthreadcreate} - -\func{wxThreadError}{Create}{\void} - -Creates a thread control. - -\wxheading{Return value} - -One of: - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf THREAD\_NO\_ERROR}}{There was no error.} -\twocolitem{{\bf THREAD\_NO\_RESOURCE}}{There were insufficient resources to create a new thread.} -\twocolitem{{\bf THREAD\_RUNNING}}{The thread is already running.} -\end{twocollist} - -\membersection{wxThread::DeferDestroy}\label{wxthreaddeferdestroy} - -\func{void}{DeferDestroy}{\param{bool}{ defer}} - -If {\it defer} is TRUE, defers thread destruction. This function affects the -calling thread. - -\membersection{wxThread::Destroy}\label{wxthreaddestroy} - -\func{wxThreadError}{Destroy}{\void} - -Destroys the thread immediately unless the application has specified deferral via \helpref{wxThread::DeferDestroy}{wxthreaddeferdestroy}. - -\wxheading{Return value} - -One of: - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf THREAD\_NO\_ERROR}}{There was no error.} -\twocolitem{{\bf THREAD\_NOT\_RUNNING}}{The thread is not running.} -\end{twocollist} - -\membersection{wxThread::GetID}\label{wxthreadgetid} - -\constfunc{unsigned long}{GetID}{\void} - -Gets the thread identifier. - -\membersection{wxThread::GetPriority}\label{wxthreadgetpriority} - -\constfunc{int}{GetPriority}{\void} - -Gets the priority of the thread, between zero and 100. - -The following priorities are already defined: - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf WXTHREAD\_MIN\_PRIORITY}}{0} -\twocolitem{{\bf WXTHREAD\_DEFAULT\_PRIORITY}}{50} -\twocolitem{{\bf WXTHREAD\_MAX\_PRIORITY}}{100} -\end{twocollist} - -\membersection{wxThread::IsAlive}\label{wxthreadisalive} - -\constfunc{bool}{IsAlive}{\void} - -Returns TRUE if the thread is alive. - -\membersection{wxThread::IsMain}\label{wxthreadismain} - -\constfunc{bool}{IsMain}{\void} - -Returns TRUE if the thread is the main application thread. - -\membersection{wxThread::Join}\label{wxthreadjoin} - -\func{void*}{Join}{\void} - -Waits for the termination of the thread. Returns a platform-specific exit code. TODO - -\membersection{wxThread::OnExit}\label{wxthreadonexit} - -\func{void}{OnExit}{\void} - -Called when the thread exits. The default implementation calls \helpref{wxThread::Join}{wxthreadjoin}. - -\membersection{wxThread::SetPriority}\label{wxthreadsetpriority} - -\func{void}{SetPriority}{\param{int}{ priority}} - -Sets the priority of the thread, between zero and 100. This must be set before the thread is created. - -The following priorities are already defined: - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf WXTHREAD\_MIN\_PRIORITY}}{0} -\twocolitem{{\bf WXTHREAD\_DEFAULT\_PRIORITY}}{50} -\twocolitem{{\bf WXTHREAD\_MAX\_PRIORITY}}{100} -\end{twocollist} - - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: "referenc" -%%% End: diff --git a/docs/latex/wx/timaglst.tex b/docs/latex/wx/timaglst.tex deleted file mode 100644 index 8559b16c79..0000000000 --- a/docs/latex/wx/timaglst.tex +++ /dev/null @@ -1,6 +0,0 @@ -\section{wxImageList overview}\label{wximagelistoverview} - -Classes: \helpref{wxImageList}{wximagelist} - -TODO. - diff --git a/docs/latex/wx/time.tex b/docs/latex/wx/time.tex deleted file mode 100644 index 8ace4d25f2..0000000000 --- a/docs/latex/wx/time.tex +++ /dev/null @@ -1,17 +0,0 @@ -\section{\class{wxTime}}\label{wxtime} - -A class for manipulating times. - -TODO. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxDate}{wxDate} - -\latexignore{\rtfignore{\wxheading{Members}}} - - diff --git a/docs/latex/wx/timer.tex b/docs/latex/wx/timer.tex deleted file mode 100644 index 6f2094999f..0000000000 --- a/docs/latex/wx/timer.tex +++ /dev/null @@ -1,59 +0,0 @@ -\section{\class{wxTimer}}\label{wxtimer} - -The wxTimer object is an abstraction of MS Windows and X toolkit timers. To -use it, derive a new class and override the {\bf Notify} member to -perform the required action. Start with {\bf Start}, stop with {\bf -Stop}, it's as simple as that. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{::wxStartTimer}{wxstarttimer}, \helpref{::wxGetElapsedTime}{wxgetelapsedtime} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxTimer::wxTimer} - -\func{}{wxTimer}{\void} - -Constructor. - -\membersection{wxTimer::\destruct{wxTimer}} - -\func{}{\destruct{wxTimer}}{\void} - -Destructor. Stops the timer if activated. - -\membersection{wxTimer::Interval} - -\func{int}{Interval}{\void} - -Returns the current interval for the timer. - -\membersection{wxTimer::Notify} - -\func{void}{Notify}{\void} - -This member should be overridden by the user. It is called on timeout. - -\membersection{wxTimer::Start} - -\func{bool}{Start}{\param{int}{ milliseconds = -1}, \param{bool}{ oneShot=FALSE}} - -(Re)starts the timer. If {\it milliseconds}\/ is absent or -1, the -previous value is used. Returns FALSE if the timer could not be started, -TRUE otherwise (in MS Windows timers are a limited resource). - -If {\it oneShot} is FALSE (the default), the Notify function will be repeatedly -called. If TRUE, Notify will be called only once. - -\membersection{wxTimer::Stop} - -\func{void}{Stop}{\void} - -Stops the timer. - - diff --git a/docs/latex/wx/tipc.tex b/docs/latex/wx/tipc.tex deleted file mode 100644 index dc98cfb361..0000000000 --- a/docs/latex/wx/tipc.tex +++ /dev/null @@ -1,177 +0,0 @@ -\section{Interprocess communication overview}\label{ipcoverview} - -Classes: \helpref{wxDDEServer}{wxddeserver}, \helpref{wxDDEConnection}{wxddeconnection}, -\rtfsp\helpref{wxDDEClient}{wxddeclient}. - -TODO: rewrite. - -The following describes how wxWindows implements DDE. The following -three classes are central. - -\begin{enumerate}\itemsep=0pt -\item wxDDEClient. This represents the client application, and is used -only within a client program. -\item wxDDEServer. This represents the server application, and is used -only within a server program. -\item wxDDEConnection. This represents the connection from the current -client or server to the other application (server or client), and can be used -in both server and client programs. Most DDE -transactions operate on this object. -\end{enumerate} - -Messages between applications are usually identified by three variables: -connection object, topic name and item name. A data string is a fourth -element of some messages. To create a connection (a conversation in -Windows parlance), the client application sends the message -MakeConnection to the client object, with a string service name to -identify the server and a topic name to identify the topic for the -duration of the connection. Under UNIX, the service name must contain an -integer port identifier. - -The server then responds and either vetos the connection or allows it. -If allowed, a connection object is created which persists until the -connection is closed. The connection object is then used for subsequent -messages between client and server. - -To create a working server, the programmer must: - -\begin{enumerate}\itemsep=0pt -\item Derive a class from wxDDEServer. -\item Override the handler OnAcceptConnection for accepting or rejecting a connection, -on the basis of the topic argument. This member must create and return a connection -object if the connection is accepted. -\item Create an instance of your server object, and call Create to -activate it, giving it a service name. -\item Derive a class from wxDDEConnection. -\item Provide handlers for various messages that are sent to the server -side of a wxDDEConnection. -\end{enumerate} - -To create a working client, the programmer must: - -\begin{enumerate}\itemsep=0pt -\item Derive a class from wxDDEClient. -\item Override the handler OnMakeConnection to create and return -an appropriate connection object. -\item Create an instance of your client object. -\item Derive a class from wxDDEConnection. -\item Provide handlers for various messages that are sent to the client -side of a wxDDEConnection. -\item When appropriate, create a new connection by sending a MakeConnection -message to the client object, with arguments host name (processed in UNIX only), -service name, and topic name for this connection. The client object will call OnMakeConnection -to create a connection object of the desired type. -\item Use the wxDDEConnection member functions to send messages to the server. -\end{enumerate} - -\subsection{Data transfer} - -These are the ways that data can be transferred from one application to -another. - -\begin{itemize}\itemsep=0pt -\item {\bf Execute:} the client calls the server with a data string representing -a command to be executed. This succeeds or fails, depending on the -server's willingness to answer. If the client wants to find the result -of the Execute command other than success or failure, it has to explicitly -call Request. -\item {\bf Request:} the client asks the server for a particular data string -associated with a given item string. If the server is unwilling to -reply, the return value is NULL. Otherwise, the return value is a string -(actually a pointer to the connection buffer, so it should not be -deallocated by the application). -\item {\bf Poke:} The client sends a data string associated with an item -string directly to the server. This succeeds or fails. -\item {\bf Advise:} The client asks to be advised of any change in data -associated with a particular item. If the server agrees, the server will -send an OnAdvise message to the client along with the item and data. -\end{itemize} - -The default data type is wxCF\_TEXT (ASCII text), and the default data -size is the length of the null-terminated string. Windows-specific data -types could also be used on the PC. - -\subsection{Examples} - -See the sample programs {\it server}\/ and {\it client}\/ in the IPC -samples directory. Run the server, then the client. This demonstrates -using the Execute, Request, and Poke commands from the client, together -with an Advise loop: selecting an item in the server list box causes -that item to be highlighted in the client list box. - -See also the source for wxHelp, which is a DDE server, and the files -wx\_help.h and wx\_help.cc which implement the client interface to -wxHelp. - -\subsection{More DDE details} - -A wxDDEClient object represents the client part of a client-server DDE -(Dynamic Data Exchange) conversation (available in both -Windows and UNIX). - -To create a client which can communicate with a suitable server, -you need to derive a class from wxDDEConnection and another from wxDDEClient. -The custom wxDDEConnection class will intercept communications in -a `conversation' with a server, and the custom wxDDEServer is required -so that a user-overriden \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} member can return -a wxDDEConnection of the required class, when a connection is made. - -For example: - -\begin{verbatim} -class MyConnection: public wxDDEConnection -{ - public: - MyConnection(void)::wxDDEConnection(ipc_buffer, 3999) {} - ~MyConnection(void) { } - Bool OnAdvise(char *topic, char *item, char *data, int size, int format) - { wxMessageBox(topic, data); } -}; - -class MyClient: public wxDDEClient -{ - public: - MyClient(void) {} - wxDDEConnection *OnMakeConnection(void) { return new MyConnection; } -}; - -\end{verbatim} - -Here, {\bf MyConnection} will respond to \helpref{OnAdvise}{wxddeconnectiononadvise} messages sent -by the server. - -When the client application starts, it must first call \helpref{wxIPCInitialize}{wxipcinitialize}\rtfsp -before creating an instance of the derived wxDDEClient. In the following, command line -arguments are used to pass the host name (the name of the machine the server is running -on) and the server name (identifying the server process). Calling \helpref{wxDDEClient::MakeConnection}{wxddeclientmakeconnection}\rtfsp -implicitly creates an instance of {\bf MyConnection} if the request for a -connection is accepted, and the client then requests an {\it Advise} loop -from the server, where the server calls the client when data has changed. - -\begin{verbatim} - wxIPCInitialize(); - - char *server = "4242"; - char hostName[256]; - wxGetHostName(hostName, sizeof(hostName)); - - char *host = hostName; - - if (argc > 1) - server = argv[1]; - if (argc > 2) - host = argv[2]; - - // Create a new client - MyClient *client = new MyClient; - the_connection = (MyConnection *)client->MakeConnection(host, server, "IPC TEST"); - - if (!the_connection) - { - wxMessageBox("Failed to make connection to server", "Client Demo Error"); - return NULL; - } - the_connection->StartAdvise("Item"); -\end{verbatim} - - diff --git a/docs/latex/wx/tlistctl.tex b/docs/latex/wx/tlistctl.tex deleted file mode 100644 index 49f939255e..0000000000 --- a/docs/latex/wx/tlistctl.tex +++ /dev/null @@ -1,6 +0,0 @@ -\section{wxListCtrl overview}\label{wxlistctrloverview} - -Classes: \helpref{wxListCtrl}{wxlistctrl}, \helpref{wxImageList}{wximagelist} - -TODO. - diff --git a/docs/latex/wx/toolbar.tex b/docs/latex/wx/toolbar.tex deleted file mode 100644 index 701b3f3c36..0000000000 --- a/docs/latex/wx/toolbar.tex +++ /dev/null @@ -1,656 +0,0 @@ -\section{\class{wxToolBar}}\label{wxtoolbar} - -The name wxToolBar is defined to be a synonym for one of the following classes: - -\begin{itemize}\itemsep=0pt -\item {\bf wxToolBar95} The native Windows 95 toolbar. Used on Windows 95, NT 4 and above. -\item {\bf wxToolBarMSW} A Windows implementation. Used on 16-bit Windows. -\item {\bf wxToolBarGTK} The GTK toolbar. -\item {\bf wxToolBarSimple} A simple implementation, with scrolling. -Used on platforms with no native toolbar control, or where scrolling is required. -\end{itemize} - -Note that the base class {\bf wxToolBarBase} defines -automatic scrolling management functionality which is identical -to \helpref{wxScrolledWindow}{wxscrolledwindow}, so please refer to this class also. -Not all toolbars support scrolling, but wxToolBarSimple does. - -\wxheading{Derived from} - -wxToolBarBase\\ -\helpref{wxControl}{wxcontrol}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Remarks} - -You may also create a toolbar that is managed by the frame, by -calling \helpref{wxFrame::CreateToolBar}{wxframecreatetoolbar}. - -{\bf wxToolBar95:} Note that this toolbar paints tools to reflect user-selected colours. -The toolbar orientation must always be {\bf wxVERTICAL}. - -\wxheading{Window styles} - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxTB\_FLAT}}{Gives the toolbar a flat look ('coolbar' or 'flatbar' style). Windows 95 only.} -\twocolitem{\windowstyle{wxTB\_HORIZONTAL}}{Specifies horizontal layout.} -\twocolitem{\windowstyle{wxTB\_VERTICAL}}{Specifies vertical layout (not available for the Windows 95 -toolbar).} -\twocolitem{\windowstyle{wxTB\_3DBUTTONS}}{Gives wxToolBarSimple a mild 3D look to its buttons.} -\end{twocollist} - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Event handling} - -The toolbar class emits menu commands in the same was that a frame menubar does, -so you can use one EVT\_MENU macro for both a menu item and a toolbar button. -The event handler functions take a wxCommandEvent argument. For most event macros, -the identifier of the tool is passed, but for EVT\_TOOL\_ENTER the toolbar -window is passed and the tool id is retrieved from the wxCommandEvent. -This is because the id may be -1 when the mouse moves off a tool, and -1 is not -allowed as an identifier in the event system. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_TOOL(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_CLICKED event -(a synonym for wxEVT\_COMMAND\_MENU\_SELECTED). Pass the id of the tool.} -\twocolitem{{\bf EVT\_MENU(id, func)}}{The same as EVT\_TOOL.} -\twocolitem{{\bf EVT\_TOOL\_RANGE(id1, id2, func)}}{Process a wxEVT\_COMMAND\_TOOL\_CLICKED event -for a range id identifiers. Pass the ids of the tools.} -\twocolitem{{\bf EVT\_MENU\_RANGE(id1, id2, func)}}{The same as EVT\_TOOL\_RANGE.} - -\twocolitem{{\bf EVT\_TOOL\_RCLICKED(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_RCLICKED event. -Pass the id of the tool.} -\twocolitem{{\bf EVT\_TOOL\_RCLICKED\_RANGE(id1, id2, func)}}{Process a wxEVT\_COMMAND\_TOOL\_RCLICKED event -for a range of ids. Pass the ids of the tools.} -\twocolitem{{\bf EVT\_TOOL\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_ENTER event. -Pass the id of the toolbar itself. The value of wxCommandEvent::GetSelection is the tool id, or -1 if the mouse cursor has moved off a tool.} -\end{twocollist} - -\wxheading{See also} - -\overview{Toolbar overview}{wxtoolbaroverview},\rtfsp -\helpref{wxScrolledWindow}{wxscrolledwindow} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxToolBar::wxToolBar}\label{wxtoolbarconstr} - -\func{}{wxToolBar}{\void} - -Default constructor. - -\func{}{wxToolBar}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id}, - \param{const wxPoint\& }{pos = wxDefaultPosition}, - \param{const wxSize\& }{size = wxDefaultSize}, - \param{long }{style = wxTB\_HORIZONTAL \pipe wxNO\_BORDER}, - \param{const wxString\& }{name = wxPanelNameStr}} - -Constructs a toolbar. - -\wxheading{Parameters} - -\docparam{parent}{Pointer to a parent window.} - -\docparam{id}{Window identifier. If -1, will automatically create an identifier.} - -\docparam{pos}{Window position. wxDefaultPosition is (-1, -1) which indicates that wxWindows -should generate a default position for the window. If using the wxWindow class directly, supply -an actual position.} - -\docparam{size}{Window size. wxDefaultSize is (-1, -1) which indicates that wxWindows -should generate a default size for the window.} - -\docparam{style}{Window style. See \helpref{wxToolBar}{wxtoolbar} for details.} - -\docparam{name}{Window name.} - -\wxheading{Remarks} - -After a toolbar is created, you use \helpref{wxToolBar::AddTool}{wxtoolbaraddtool} and -perhaps \helpref{wxToolBar::AddSeparator}{wxtoolbaraddseparator}, and then you -must call \helpref{wxToolBar::Realize}{wxtoolbarrealize} to construct and display the toolbar -tools. - -You may also create a toolbar that is managed by the frame, by -calling \helpref{wxFrame::CreateToolBar}{wxframecreatetoolbar}. - -\membersection{wxToolBar::\destruct{wxToolBar}} - -\func{void}{\destruct{wxToolBar}}{\void} - -Toolbar destructor. - -\membersection{wxToolBar::AddSeparator}\label{wxtoolbaraddseparator} - -\func{void}{AddSeparator}{\void} - -Adds a separator for spacing groups of tools. - -\wxheading{See also} - -\helpref{wxToolBar::AddTool}{wxtoolbaraddtool}, \helpref{wxToolBar::SetToolSeparation}{wxtoolbarsettoolseparation} - -\membersection{wxToolBar::AddTool}\label{wxtoolbaraddtool} - -\func{wxToolBarTool*}{AddTool}{\param{int}{ toolIndex}, \param{const wxBitmap\&}{ bitmap1},\rtfsp -\param{const wxBitmap\&}{ bitmap2 = wxNullBitmap}, \param{bool}{ isToggle = FALSE},\rtfsp -\param{long}{ xPos = -1}, \param{long}{ yPos = -1},\rtfsp -\param{wxObject* }{clientData = NULL}, \param{const wxString\& }{shortHelpString = ""}, \param{const wxString\& }{longHelpString = ""}} - -Adds a tool to the toolbar. - -\wxheading{Parameters} - -\docparam{toolIndex}{An integer by which -the tool may be identified in subsequent operations.} - -\docparam{isToggle}{Specifies whether the tool is a toggle or not: a toggle tool may be in -two states, whereas a non-toggle tool is just a button.} - -\docparam{bitmap1}{The primary tool bitmap for toggle and button tools.} - -\docparam{bitmap2}{The second bitmap specifies the on-state bitmap for a toggle -tool. If this is NULL, either an inverted version of the primary bitmap is -used for the on-state of a toggle tool (monochrome displays) or a black -border is drawn around the tool (colour displays). Note that to pass a NULL value, -you need to cast it to (wxBitmap *) so that C++ can construct an appropriate temporary -wxBitmap object.} - -\docparam{xPos}{Specifies the x position of the tool if automatic layout is not suitable.} - -\docparam{yPos}{Specifies the y position of the tool if automatic layout is not suitable.} - -\docparam{clientData}{An optional pointer to client data which can be -retrieved later using \helpref{wxToolBar::GetToolClientData}{wxtoolbargettoolclientdata}.} - -\docparam{shortHelpString}{Used for displaying a tooltip for the tool in the -Windows 95 implementation of wxButtonBar. Pass the empty string if this is not required.} - -\docparam{longHelpString}{Used to displayer longer help, such as status line help. -Pass the empty string if this is not required.} - -\wxheading{Remarks} - -After you have added tools to a toolbar, you must call \helpref{wxToolBar::Realize}{wxtoolbarrealize} in -order to have the tools appear. - -\wxheading{See also} - -\helpref{wxToolBar::AddSeparator}{wxtoolbaraddseparator}, -\helpref{wxToolBar::Realize}{wxtoolbarrealize}, - -\membersection{wxToolBar::CreateTools}\label{wxtoolbarcreatetools} - -\func{bool}{CreateTools}{\void} - -This function is implemented for some toolbar classes to create the tools and display them. -The portable way of calling it is to call \helpref{wxToolBar::Realize}{wxtoolbarrealize} after -you have added tools and separators. - -\wxheading{See also} - -\helpref{wxToolBar::AddTool}{wxtoolbaraddtool}, \helpref{wxToolBar::Realize}{wxtoolbarrealize} - -\membersection{wxToolBar::DrawTool}\label{wxtoolbardrawtool} - -\func{void}{DrawTool}{\param{wxMemoryDC\& }{memDC}, \param{wxToolBarTool* }{tool}} - -Draws the specified tool onto the window using the given memory device context. - -\wxheading{Parameters} - -\docparam{memDC}{A memory DC to be used for drawing the tool.} - -\docparam{tool}{Tool to be drawn.} - -\wxheading{Remarks} - -For internal use only. - -\membersection{wxToolBar::EnableTool}\label{wxtoolbarenabletool} - -\func{void}{EnableTool}{\param{int }{toolIndex}, \param{const bool}{ enable}} - -Enables or disables the tool. - -\wxheading{Parameters} - -\docparam{toolIndex}{Tool to enable or disable.} - -\docparam{enable}{If TRUE, enables the tool, otherwise disables it.} - -\wxheading{Remarks} - -For wxToolBarSimple, does nothing. Some other implementations -will change the visible state of the tool to indicate that it is disabled. - -\wxheading{See also} - -\helpref{wxToolBar::GetToolEnabled}{wxtoolbargettoolenabled},\rtfsp -%\helpref{wxToolBar::SetToolState}{wxtoolbarsettoolstate},\rtfsp -\helpref{wxToolBar::ToggleTool}{wxtoolbartoggletool} - -\membersection{wxToolBar::FindToolForPosition}\label{wxtoolbarfindtoolforposition} - -\constfunc{wxToolBarTool*}{FindToolForPosition}{\param{const float}{ x}, \param{const float}{ y}} - -Finds a tool for the given mouse position. - -\wxheading{Parameters} - -\docparam{x}{X position.} - -\docparam{y}{Y position.} - -\wxheading{Return value} - -A pointer to a tool if a tool is found, or NULL otherwise. - -\wxheading{Remarks} - -Used internally, and should not need to be used by the programmer. - -\membersection{wxToolBar::GetToolSize}\label{wxtoolbargettoolsize} - -\func{wxSize}{GetToolSize}{\void} - -Returns the size of a whole button, which is usually larger than a tool bitmap because -of added 3D effects. - -\wxheading{See also} - -\helpref{wxToolBar::SetToolBitmapSize}{wxtoolbarsettoolbitmapsize},\rtfsp -\helpref{wxToolBar::GetToolBitmapSize}{wxtoolbargettoolbitmapsize} - -\membersection{wxToolBar::GetToolBitmapSize}\label{wxtoolbargettoolbitmapsize} - -\func{wxSize}{GetToolBitmapSize}{\void} - -Returns the size of bitmap that the toolbar expects to have. The default bitmap size is 16 by 15 pixels. - -\wxheading{Remarks} - -Note that this is the size of the bitmap you pass to \helpref{wxToolBar::AddTool}{wxtoolbaraddtool}, -and not the eventual size of the tool button. - -\wxheading{See also} - -\helpref{wxToolBar::SetToolBitmapSize}{wxtoolbarsettoolbitmapsize},\rtfsp -\helpref{wxToolBar::GetToolSize}{wxtoolbargettoolsize} - -\membersection{wxToolBar::GetMargins}\label{wxtoolbargetmargins} - -\constfunc{wxSize}{GetMargins}{\void} - -Returns the left/right and top/bottom margins, which are also used for inter-toolspacing. - -\wxheading{See also} - -\helpref{wxToolBar::SetMargins}{wxtoolbarsetmargins} - -\membersection{wxToolBar::GetMaxSize}\label{wxtoolbargetmaxsize} - -\constfunc{void}{GetMaxSize}{\param{float*}{ w}, \param{float*}{ h}} - -Gets the maximum size taken up by the tools after layout, including margins. -This can be used to size a frame around the toolbar window. - -\wxheading{Parameters} - -\docparam{w}{Receives the maximum horizontal size.} - -\docparam{h}{Receives the maximum vertical size.} - -\membersection{wxToolBar::GetToolClientData}\label{wxtoolbargettoolclientdata} - -\constfunc{wxObject*}{GetToolClientData}{\param{int }{toolIndex}} - -Get any client data associated with the tool. - -\wxheading{Parameters} - -\docparam{toolIndex}{Index of the tool, as passed to \helpref{wxToolBar::AddTool}{wxtoolbaraddtool}.} - -\wxheading{Return value} - -Client data, or NULL if there is none. - -\membersection{wxToolBar::GetToolEnabled}\label{wxtoolbargettoolenabled} - -\constfunc{bool}{GetToolEnabled}{\param{int }{toolIndex}} - -Called to determine whether a tool is enabled (responds to user input). - -\wxheading{Parameters} - -\docparam{toolIndex}{Index of the tool in question.} - -\wxheading{Return value} - -TRUE if the tool is enabled, FALSE otherwise. - -%\wxheading{See also} -% -%\helpref{wxToolBar::SetToolEnabled}{wxtoolbarsettoolenabled} -% -\membersection{wxToolBar::GetToolLongHelp}\label{wxtoolbargettoollonghelp} - -\constfunc{wxString}{GetToolLongHelp}{\param{int }{toolIndex}} - -Returns the long help for the given tool. - -\wxheading{Parameters} - -\docparam{toolIndex}{The tool in question.} - -\wxheading{See also} - -\helpref{wxToolBar::SetToolLongHelp}{wxtoolbarsettoollonghelp},\rtfsp -\helpref{wxToolBar::SetToolShortHelp}{wxtoolbarsettoolshorthelp}\rtfsp - -\membersection{wxToolBar::GetToolPacking}\label{wxtoolbargettoolpacking} - -\constfunc{int}{GetToolPacking}{\void} - -Returns the value used for packing tools. - -\wxheading{See also} - -\helpref{wxToolBar::SetToolPacking}{wxtoolbarsettoolpacking} - -\membersection{wxToolBar::GetToolSeparation}\label{wxtoolbargettoolseparation} - -\constfunc{int}{GetToolSeparation}{\void} - -Returns the default separator size. - -\wxheading{See also} - -\helpref{wxToolBar::SetToolSeparation}{wxtoolbarsettoolseparation} - -\membersection{wxToolBar::GetToolShortHelp}\label{wxtoolbargettoolshorthelp} - -\constfunc{wxString}{GetToolShortHelp}{\param{int }{toolIndex}} - -Returns the short help for the given tool. - -Returns the long help for the given tool. - -\wxheading{Parameters} - -\docparam{toolIndex}{The tool in question.} - -\wxheading{See also} - -\helpref{wxToolBar::GetToolLongHelp}{wxtoolbargettoollonghelp},\rtfsp -\helpref{wxToolBar::SetToolShortHelp}{wxtoolbarsettoolshorthelp}\rtfsp - -\membersection{wxToolBar::GetToolState}\label{wxtoolbargettoolstate} - -\constfunc{bool}{GetToolState}{\param{int }{toolIndex}} - -Gets the on/off state of a toggle tool. - -\wxheading{Parameters} - -\docparam{toolIndex}{The tool in question.} - -\wxheading{Return value} - -TRUE if the tool is toggled on, FALSE otherwise. - -%\wxheading{See also} -% -%\helpref{wxToolBar::SetToolState}{wxtoolbarsettoolstate} -% -\membersection{wxToolBar::Layout}\label{wxtoolbarlayout} - -\func{void}{Layout}{\void} - -Called by the application after the tools have been added to -automatically lay the tools out on the window. If you have given -absolute positions when adding the tools, do not call this. - -This function is only implemented for some toolbar classes. -The portable way of calling it is to call \helpref{wxToolBar::Realize}{wxtoolbarrealize} after -you have added tools and separators. - -\wxheading{See also} - -\helpref{wxToolBar::AddTool}{wxtoolbaraddtool}, \helpref{wxToolBar::Realize}{wxtoolbarrealize} - -\membersection{wxToolBar::OnLeftClick}\label{wxtoolbaronleftclick} - -\func{bool}{OnLeftClick}{\param{int}{ toolIndex}, \param{bool}{ toggleDown}} - -Called when the user clicks on a tool with the left mouse button. - -This is the old way of detecting tool clicks; although it will still work, -you should use the EVT\_MENU or EVT\_TOOL macro instead. - -\wxheading{Parameters} - -\docparam{toolIndex}{The identifier passed to \helpref{wxToolBar::AddTool}{wxtoolbaraddtool}.} - -\docparam{toggleDown}{TRUE if the tool is a toggle and the toggle is down, otherwise is FALSE.} - -\wxheading{Return value} - -If the tool is a toggle and this function returns FALSE, the toggle -toggle state (internal and visual) will not be changed. This provides a way of -specifying that toggle operations are not permitted in some circumstances. - -\wxheading{See also} - -\helpref{wxToolBar::OnMouseEnter}{wxtoolbaronmouseenter},\rtfsp -\helpref{wxToolBar::OnRightClick}{wxtoolbaronrightclick} - -\membersection{wxToolBar::OnMouseEnter}\label{wxtoolbaronmouseenter} - -\func{void}{OnMouseEnter}{\param{int}{ toolIndex}} - -This is called when the mouse cursor moves into a tool or out of -the toolbar. - -This is the old way of detecting mouse enter events; although it will still work, -you should use the EVT\_TOOL\_ENTER macro instead. - -\wxheading{Parameters} - -\docparam{toolIndex}{Greater than -1 if the mouse cursor has moved into the tool, -or -1 if the mouse cursor has moved. The -programmer can override this to provide extra information about the tool, -such as a short description on the status line.} - -\wxheading{Remarks} - -With some derived toolbar classes, if the mouse moves quickly out of the toolbar, wxWindows may not be able to -detect it. Therefore this function may not always be called when expected. - -\membersection{wxToolBar::OnRightClick}\label{wxtoolbaronrightclick} - -\func{void}{OnRightClick}{\param{int}{ toolIndex}, \param{float}{ x}, \param{float}{ y}} - -Called when the user clicks on a tool with the right mouse button. The -programmer should override this function to detect right tool clicks. - -This is the old way of detecting tool right clicks; although it will still work, -you should use the EVT\_TOOL\_RCLICKED macro instead. - -\wxheading{Parameters} - -\docparam{toolIndex}{The identifier passed to \helpref{wxToolBar::AddTool}{wxtoolbaraddtool}.} - -\docparam{x}{The x position of the mouse cursor.} - -\docparam{y}{The y position of the mouse cursor.} - -\wxheading{Remarks} - -A typical use of this member might be to pop up a menu. - -\wxheading{See also} - -\helpref{wxToolBar::OnMouseEnter}{wxtoolbaronmouseenter},\rtfsp -\helpref{wxToolBar::OnLeftClick}{wxtoolbaronleftclick} - -\membersection{wxToolBar::Realize}\label{wxtoolbarrealize} - -\func{bool}{Realize}{\void} - -This function should be called after you have added tools. It -calls, according to the implementation, -either \helpref{wxToolBar::CreateTools}{wxtoolbarcreatetools} or - \helpref{wxToolBar::Layout}{wxtoolbarlayout}. - -If you are using absolute positions for your tools when using a wxToolBarSimple object, -do not call this function. You must call it at all other times. - -\membersection{wxToolBar::SetToolBitmapSize}\label{wxtoolbarsettoolbitmapsize} - -\func{void}{SetToolBitmapSize}{\param{const wxSize\&}{ size}} - -Sets the default size of each tool bitmap. The default bitmap size is 16 by 15 pixels. - -\wxheading{Parameters} - -\docparam{size}{The size of the bitmaps in the toolbar.} - -\wxheading{Remarks} - -This should be called to tell the toolbar what the tool bitmap size is. Call -it before you add tools. - -Note that this is the size of the bitmap you pass to \helpref{wxToolBar::AddTool}{wxtoolbaraddtool}, -and not the eventual size of the tool button. - -\wxheading{See also} - -\helpref{wxToolBar::GetToolBitmapSize}{wxtoolbargettoolbitmapsize},\rtfsp -\helpref{wxToolBar::GetToolSize}{wxtoolbargettoolsize} - -\membersection{wxToolBar::SetMargins}\label{wxtoolbarsetmargins} - -\func{void}{SetMargins}{\param{const wxSize\&}{ size}} - -\func{void}{SetMargins}{\param{int}{ x}, \param{int}{ y}} - -Set the values to be used as margins for the toolbar. - -\wxheading{Parameters} - -\docparam{size}{Margin size.} - -\docparam{x}{Left margin, right margin and inter-tool separation value.} - -\docparam{y}{Top margin, bottom margin and inter-tool separation value.} - -\wxheading{Remarks} - -This must be called before the tools are added if absolute positioning is to be used, and the -default (zero-size) margins are to be overridden. - -\wxheading{See also} - -\helpref{wxToolBar::GetMargins}{wxtoolbargetmargins}, \helpref{wxSize}{wxsize} - -\membersection{wxToolBar::SetToolLongHelp}\label{wxtoolbarsettoollonghelp} - -\func{void}{SetToolLongHelp}{\param{int }{toolIndex}, \param{const wxString\& }{helpString}} - -Sets the long help for the given tool. - -\wxheading{Parameters} - -\docparam{toolIndex}{The tool in question.} - -\docparam{helpString}{A string for the long help.} - -\wxheading{Remarks} - -You might use the long help for displaying the tool purpose on the status line. - -\wxheading{See also} - -\helpref{wxToolBar::GetToolLongHelp}{wxtoolbargettoollonghelp},\rtfsp -\helpref{wxToolBar::SetToolShortHelp}{wxtoolbarsettoolshorthelp},\rtfsp - -\membersection{wxToolBar::SetToolPacking}\label{wxtoolbarsettoolpacking} - -\func{void}{SetToolPacking}{\param{int}{ packing}} - -Sets the value used for spacing tools. The default value is 1. - -\wxheading{Parameters} - -\docparam{packing}{The value for packing.} - -\wxheading{Remarks} - -The packing is used for spacing in the vertical direction if the toolbar is horizontal, -and for spacing in the horizontal direction if the toolbar is vertical. - -\wxheading{See also} - -\helpref{wxToolBar::GetToolPacking}{wxtoolbargettoolpacking} - -\membersection{wxToolBar::SetToolShortHelp}\label{wxtoolbarsettoolshorthelp} - -\func{void}{SetToolShortHelp}{\param{int }{toolIndex}, \param{const wxString\& }{helpString}} - -Sets the short help for the given tool. - -\wxheading{Parameters} - -\docparam{toolIndex}{The tool in question.} - -\docparam{helpString}{The string for the short help.} - -\wxheading{Remarks} - -An application might use short help for identifying the tool purpose in a tooltip. - -\wxheading{See also} - -\helpref{wxToolBar::GetToolShortHelp}{wxtoolbargettoolshorthelp}, \helpref{wxToolBar::SetToolLongHelp}{wxtoolbarsettoollonghelp} - -\membersection{wxToolBar::SetToolSeparation}\label{wxtoolbarsettoolseparation} - -\func{void}{SetToolSeparation}{\param{int}{ separation}} - -Sets the default separator size. The default value is 5. - -\wxheading{Parameters} - -\docparam{separation}{The separator size.} - -\wxheading{See also} - -\helpref{wxToolBar::AddSeparator}{wxtoolbaraddseparator} - -\membersection{wxToolBar::ToggleTool}\label{wxtoolbartoggletool} - -\func{void}{ToggleTool}{\param{int }{toolIndex}, \param{const bool}{ toggle}} - -Toggles a tool on or off. - -\wxheading{Parameters} - -\docparam{toolIndex}{Tool in question.} - -\docparam{toggle}{If TRUE, toggles the tool on, otherwise toggles it off.} - -\wxheading{Remarks} - -Only applies to a tool that has been specified as a toggle tool. - -\wxheading{See also} - -\helpref{wxToolBar::GetToolState}{wxtoolbargettoolstate} - - diff --git a/docs/latex/wx/topics.tex b/docs/latex/wx/topics.tex deleted file mode 100644 index bd87b29a42..0000000000 --- a/docs/latex/wx/topics.tex +++ /dev/null @@ -1,37 +0,0 @@ -\chapter{Topic overviews}\label{overviews} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -This chapter contains a selection of topic overviews. - -\input tapp.tex -\input tbitmap.tex -\input tdialog.tex -\input tfont.tex -\input tsplittr.tex -\input ttreectl.tex -\input tlistctl.tex -\input timaglst.tex -\input tcommdlg.tex -\input tconstr.tex -\input tdb.tex -\input tdc.tex -\input tdebug.tex -\input tdelwin.tex -\input tscroll.tex -\input tdocview.tex -\input tevent.tex -\input tguide.tex -\input tipc.tex -\input tprint.tex -\input tresourc.tex -\input truntime.tex -\input tstyles.tex -\input ttab.tex -\input ttoolbar.tex -\input tvalidat.tex -\input texpr.tex -\input tgrid.tex -\input tstring.tex -\input tusage.tex - diff --git a/docs/latex/wx/tprint.tex b/docs/latex/wx/tprint.tex deleted file mode 100644 index b6f031cc26..0000000000 --- a/docs/latex/wx/tprint.tex +++ /dev/null @@ -1,59 +0,0 @@ -\section{Printing overview}\label{printingoverview} - -Classes: \helpref{wxPrintout}{wxprintout}, \helpref{wxPrinter}{wxprinter},\rtfsp -\helpref{wxPrintPreview}{wxprintpreview}, \helpref{wxPrinterDC}{wxprinterdc},\rtfsp -\helpref{wxPrintDialog}{wxprintdialog}. - -The printing framework relies on the application to provide classes -whose member functions can respond to particular requests, such -as `print this page' or `does this page exist in the document?'. -This method allows wxWindows to take over the housekeeping duties of -turning preview pages, calling the print dialog box, creating -the printer device context, and so on: the application can concentrate -on the rendering of the information onto a device context. -The printing framework is mainly a Windows feature; PostScript -support under non-Windows platforms is emerging but has not been rigorously tested. - -The \helpref{document/view framework}{docviewoverview} creates a default wxPrintout -object for every view, calling wxView::OnDraw to achieve a -prepackaged print/preview facility. - -A document's printing ability is represented in an application by a -derived wxPrintout class. This class prints a page on request, and can -be passed to the Print function of a wxPrinter object to actually print -the document, or can be passed to a wxPrintPreview object to initiate -previewing. The following code (from the printing sample) shows how easy -it is to initiate printing, previewing and the print setup dialog, once the wxPrintout -functionality has been defined. Notice the use of MyPrintout for -both printing and previewing. All the preview user interface functionality -is taken care of by wxWindows. For details on how MyPrintout is defined, -please look at the printout sample code. - -\begin{verbatim} - case WXPRINT_PRINT: - { - wxPrinter printer; - MyPrintout printout("My printout"); - printer.Print(this, &printout, TRUE); - break; - } - case WXPRINT_PREVIEW: - { - // Pass two printout objects: for preview, and possible printing. - wxPrintPreview *preview = new wxPrintPreview(new MyPrintout, new MyPrintout); - wxPreviewFrame *frame = new wxPreviewFrame(preview, this, "Demo Print Preview", 100, 100, 600, 650); - frame->Centre(wxBOTH); - frame->Initialize(); - frame->Show(TRUE); - break; - } - case WXPRINT_PRINT_SETUP: - { - wxPrintDialog printerDialog(this); - printerDialog.GetPrintData().SetSetupDialog(TRUE); - printerDialog.Show(TRUE); - break; - } -\end{verbatim} - - diff --git a/docs/latex/wx/treectrl.tex b/docs/latex/wx/treectrl.tex deleted file mode 100644 index 2c2ac8ac38..0000000000 --- a/docs/latex/wx/treectrl.tex +++ /dev/null @@ -1,431 +0,0 @@ -\section{\class{wxTreeCtrl}}\label{wxtreectrl} - -A tree control presents information as a hierarchy, with items that may be expanded -to show further items. Items in a tree control are referenced by long integer handles. - -To intercept events from a tree control, use the event table macros described in \helpref{wxTreeEvent}{wxtreeevent}. - -\wxheading{Derived from} - -\helpref{wxControl}{wxcontrol}\\ -\helpref{wxWindow}{wxwindow}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxTR\_HAS\_BUTTONS}}{Use this style to show + and - buttons to the -left of parent items.} -\twocolitem{\windowstyle{wxTR\_EDIT\_LABELS}}{Use this style if you wish the user to be -able to edit labels in the tree control.} -\end{twocollist} - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Event handling} - -To process input from a tree control, use these event handler macros to direct input to member -functions that take a \helpref{wxTreeEvent}{wxtreeevent} argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_TREE\_BEGIN\_DRAG(id, func)}}{Begin dragging with the left mouse button.} -\twocolitem{{\bf EVT\_TREE\_BEGIN\_RDRAG(id, func)}}{Begin dragging with the right mouse button.} -\twocolitem{{\bf EVT\_TREE\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label.} -\twocolitem{{\bf EVT\_TREE\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label.} -\twocolitem{{\bf EVT\_TREE\_DELETE\_ITEM(id, func)}}{Delete an item.} -\twocolitem{{\bf EVT\_TREE\_GET\_INFO(id, func)}}{Request information from the application.} -\twocolitem{{\bf EVT\_TREE\_SET\_INFO(id, func)}}{Information is being supplied.} -\twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDED(id, func)}}{Parent has been expanded.} -\twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDING(id, func)}}{Parent is being expanded.} -\twocolitem{{\bf EVT\_TREE\_SEL\_CHANGED(id, func)}}{Selection has changed.} -\twocolitem{{\bf EVT\_TREE\_SEL\_CHANGING(id, func)}}{Selection is changing.} -\twocolitem{{\bf EVT\_TREE\_KEY\_DOWN(id, func)}}{A key has been pressed.} -\end{twocollist}% - -\wxheading{See also} - -\helpref{wxTreeCtrl overview}{wxtreectrloverview}, \helpref{wxListBox}{wxlistbox}, \helpref{wxListCtrl}{wxlistctrl},\rtfsp -\helpref{wxImageList}{wximagelist}, \helpref{wxTreeEvent}{wxtreeevent} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxTreeCtrl::wxTreeCtrl}\label{wxtreectrlconstr} - -\func{}{wxTreeCtrl}{\void} - -Default constructor. - -\func{}{wxTreeCtrl}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp -\param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp -\param{long}{ style = wxTR\_HAS\_BUTTONS}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listCtrl"}} - -Constructor, creating and showing a tree control. - -\wxheading{Parameters} - -\docparam{parent}{Parent window. Must not be NULL.} - -\docparam{id}{Window identifier. A value of -1 indicates a default value.} - -\docparam{pos}{Window position.} - -\docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized -appropriately.} - -\docparam{style}{Window style. See \helpref{wxTreeCtrl}{wxtreectrl}.} - -\docparam{validator}{Window validator.} - -\docparam{name}{Window name.} - -\wxheading{See also} - -\helpref{wxTreeCtrl::Create}{wxtreectrlcreate}, \helpref{wxValidator}{wxvalidator} - -\membersection{wxTreeCtrl::\destruct{wxTreeCtrl}} - -\func{void}{\destruct{wxTreeCtrl}}{\void} - -Destructor, destroying the list control. - -\membersection{wxTreeCtrl::Create}\label{wxtreectrlcreate} - -\func{bool}{wxTreeCtrl}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp -\param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp -\param{long}{ style = wxTR\_HAS\_BUTTONS}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listCtrl"}} - -Creates the tree control. See \helpref{wxTreeCtrl::wxTreeCtrl}{wxtreectrlconstr} for further details. - -\membersection{wxTreeCtrl::DeleteAllItems}\label{wxtreectrldeleteallitems} - -\func{bool}{DeleteAllItems}{\void} - -Deletes all the items in the control. - -\membersection{wxTreeCtrl::DeleteItem}\label{wxtreectrldeleteitem} - -\func{bool}{DeleteItem}{\param{long }{item}} - -Deletes the specified item. - -\membersection{wxTreeCtrl::EditLabel}\label{wxtreectrleditlabel} - -\func{wxTextCtrl*}{EditLabel}{\param{long }{item}, \param{wxClassInfo*}{ textControlClass = CLASSINFO(wxTextCtrl)}} - -Starts editing the label of the given item, returning the text control that the tree control uses for editing. - -Pass another {\it textControlClass} if a derived class is required. It usually will be, in order for -the application to detect when editing has finished and to call \helpref{wxTreeCtrl::EndEditLabel}{wxtreectrlendeditlabel}. - -Do not delete the text control yourself. - -This function is currently supported under Windows only. - -\wxheading{See also} - -\helpref{wxTreeCtrl::EndEditLabel}{wxtreectrlendeditlabel} - -\membersection{wxTreeCtrl::EndEditLabel}\label{wxtreectrlendeditlabel} - -\func{bool}{EndEditLabel}{\param{bool }{cancelEdit}} - -Ends label editing. If {\it cancelEdit} is TRUE, the edit will be cancelled. - -This function is currently supported under Windows only. - -\wxheading{See also} - -\helpref{wxTreeCtrl::EditLabel}{wxtreectrleditlabel} - -\membersection{wxTreeCtrl::EnsureVisible}\label{wxtreectrlensurevisible} - -\func{bool}{EnsureVisible}{\param{long }{item}} - -Scrolls and/or expands items to ensure that the given item is visible. - -\membersection{wxTreeCtrl::ExpandItem}\label{wxtreectrlexpanditem} - -\func{bool}{ExpandItem}{\param{long }{item}, \param{int }{action}} - -Expands the given item. - -{\it action} may be one of: - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxTREE\_EXPAND\_EXPAND}}{Expands the item.} -\twocolitem{\windowstyle{wxTREE\_EXPAND\_COLLAPSE}}{Collapses the item.} -\twocolitem{\windowstyle{wxTREE\_EXPAND\_COLLAPSE\_RESET}}{Collapses the item and removes the child items.} -\twocolitem{\windowstyle{wxTREE\_EXPAND\_TOGGLE}}{Expands if the item is collapsed, collapses if the item is expanded.} -\end{twocollist} - -\membersection{wxTreeCtrl::GetChild}\label{wxtreectrlgetchild} - -\constfunc{long}{GetChild}{\param{long }{item}} - -Call this function to retrieve the tree view item that is the first child of the item specified by {\it item}. - -\membersection{wxTreeCtrl::GetCount}\label{wxtreectrlgetcount} - -\constfunc{int}{GetCount}{\void} - -Returns the number of items in the control. - -\membersection{wxTreeCtrl::GetEditControl}\label{wxtreectrlgeteditcontrol} - -\constfunc{wxTextCtrl\&}{GetEditControl}{\void} - -Returns the edit control used to edit a label. - -\membersection{wxTreeCtrl::GetFirstVisibleItem}\label{wxtreectrlgetfirstvisibleitem} - -\constfunc{long}{GetFirstVisibleItem}{\void} - -Returns the first visible item. - -\membersection{wxTreeCtrl::GetImageList}\label{wxtreectrlgetimagelist} - -\constfunc{wxImageList*}{GetImageList}{\param{int }{which = wxIMAGE\_LIST\_NORMAL}} - -Returns the specified image list. {\it which} may be one of: - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxIMAGE\_LIST\_NORMAL}}{The normal (large icon) image list.} -\twocolitem{\windowstyle{wxIMAGE\_LIST\_SMALL}}{The small icon image list.} -\twocolitem{\windowstyle{wxIMAGE\_LIST\_STATE}}{The user-defined state image list (unimplemented).} -\end{twocollist} - -\membersection{wxTreeCtrl::GetIndent}\label{wxtreectrlgetindent} - -\constfunc{int}{GetIndent}{\void} - -Returns the current tree control indentation. - -\membersection{wxTreeCtrl::GetItem}\label{wxtreectrlgetitem} - -\constfunc{bool}{GetItem}{\param{wxTreeItem\& }{info}} - -Gets information about the item. See \helpref{wxTreeCtrl::SetItem}{wxtreectrlsetitem} for more -information. - -\membersection{wxTreeCtrl::GetItemData}\label{wxtreectrlgetitemdata} - -\constfunc{long}{GetItemData}{\param{long }{item}} - -Returns the client data associated with the item, if any. - -\membersection{wxTreeCtrl::GetItemRect}\label{wxtreectrlgetitemrect} - -\constfunc{bool}{GetItemRect}{\param{long }{item}, \param{wxRect\& }{rect}, \param{bool }{textOnly = FALSE}} - -Returns the position and size of the rectangle bounding the item. - -\membersection{wxTreeCtrl::GetItemState}\label{wxtreectrlgetitemstate} - -\constfunc{int}{GetItemState}{\param{long }{item}, \param{long }{stateMask}} - -Gets the item state. For a list of state flags, see \helpref{wxTreeCtrl::SetItem}{wxtreectrlsetitem}. - -\membersection{wxTreeCtrl::GetItemText}\label{wxtreectrlgetitemtext} - -\constfunc{wxString}{GetItemText}{\param{long }{item}} - -Returns the item label. - -\membersection{wxTreeCtrl::GetNextItem}\label{wxtreectrlgetnextitem} - -\constfunc{long}{GetNextItem}{\param{long }{item}, \param{int }{code}} - -Searches for an item using the given criterion, starting from {\it item}. - -Returns the item or 0 if unsuccessful. - -{\it code} can be one of: - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{wxTREE\_NEXT\_CARET}{Retrieves the currently selected item.} -\twocolitem{wxTREE\_NEXT\_CHILD}{Retrieves the first child item. The hItem parameter must be NULL.} -\twocolitem{wxTREE\_NEXT\_DROPHILITE}{Retrieves the item that is the target of a drag-and-drop operation.} -\twocolitem{wxTREE\_NEXT\_FIRSTVISIBLE}{Retrieves the first visible item.} -\twocolitem{wxTREE\_NEXT\_NEXT}{Retrieves the next sibling item.} -\twocolitem{wxTREE\_NEXT\_NEXTVISIBLE}{Retrieves the next visible item that follows the specified item.} -\twocolitem{wxTREE\_NEXT\_PARENT}{Retrieves the parent of the specified item.} -\twocolitem{wxTREE\_NEXT\_PREVIOUS}{Retrieves the previous sibling item.} -\twocolitem{wxTREE\_NEXT\_PREVIOUSVISIBLE}{Retrieves the first visible item that precedes the specified item.} -\twocolitem{wxTREE\_NEXT\_ROOT}{Retrieves the first child item of the root item of which the specified item is a part.} -\end{twocollist} - -\membersection{wxTreeCtrl::GetNextVisibleItem}\label{wxtreectrlgetnextvisibleitem} - -\constfunc{long}{GetNextVisibleItem}{\param{long }{item}} - -Returns the next visible item. - -\membersection{wxTreeCtrl::GetParent}\label{wxtreectrlgetparent} - -\constfunc{long}{GetParent}{\param{long }{item}} - -Returns the item's parent. - -\membersection{wxTreeCtrl::GetRootItem}\label{wxtreectrlgetrootitem} - -\constfunc{long}{GetRootItem}{\void} - -Returns the root item for the tree control. - -\membersection{wxTreeCtrl::GetSelection}\label{wxtreectrlgetselection} - -\constfunc{long}{GetSelection}{\void} - -Returns the selection, or 0 if there is no selection. - -\membersection{wxTreeCtrl::HitTest}\label{wxtreectrlhittest} - -\func{long}{HitTest}{\param{const wxPoint\& }{point}, \param{int\& }{flags}} - -Calculates which (if any) item is under the given point, returning extra information -in {\it flags}. {\it flags} is a bitlist of the following: - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{wxTREE\_HITTEST\_ABOVE}{Above the client area.} -\twocolitem{wxTREE\_HITTEST\_BELOW}{Below the client area.} -\twocolitem{wxTREE\_HITTEST\_NOWHERE}{In the client area but below the last item.} -\twocolitem{wxTREE\_HITTEST\_ONITEMBUTTON}{On the button associated with an item.} -\twocolitem{wxTREE\_HITTEST\_ONITEMICON}{On the bitmap associated with an item.} -\twocolitem{wxTREE\_HITTEST\_ONITEMINDENT}{In the indentation associated with an item.} -\twocolitem{wxTREE\_HITTEST\_ONITEMLABEL}{On the label (string) associated with an item.} -\twocolitem{wxTREE\_HITTEST\_ONITEMRIGHT}{In the area to the right of an item.} -\twocolitem{wxTREE\_HITTEST\_ONITEMSTATEICON}{On the state icon for a tree view item that is in a user-defined state.} -\twocolitem{wxTREE\_HITTEST\_TOLEFT}{To the right of the client area.} -\twocolitem{wxTREE\_HITTEST\_TORIGHT}{To the left of the client area.} -\end{twocollist} - -\membersection{wxTreeCtrl::InsertItem}\label{wxtreectrlinsertitem} - -\func{long}{InsertItem}{\param{long }{parent}, \param{wxTreeItem\& }{info}, \param{long }{insertAfter = wxTREE\_INSERT\_LAST}} - -Inserts an item. For more information on {\it info}, see \helpref{wxTreeCtrl::SetItem}{wxtreectrlsetitem}. - -\func{long}{InsertItem}{\param{long }{parent}, \param{const wxString\& }{label}, \param{int }{image = -1}, \param{int }{selImage = -1}, \param{long }{insertAfter = wxTREE\_INSERT\_LAST}} - -Inserts an item. - -If {\it image} > -1 and {\it selImage} is -1, the same image is used for -both selected and unselected items. - -\membersection{wxTreeCtrl::ItemHasChildren}\label{wxtreectrlitemhaschildren} - -\constfunc{bool}{ItemHasChildren}{\param{long }{item}} - -Returns TRUE if the item has children. - -\membersection{wxTreeCtrl::ScrollTo}\label{wxtreectrlscrollto} - -\func{bool}{ScrollTo}{\param{long }{item}} - -selects the specified item and scrolls the item into view, - -\membersection{wxTreeCtrl::SelectItem}\label{wxtreectrlselectitem} - -\func{bool}{SelectItem}{\param{long }{item}} - -Selects the given item. - -\membersection{wxTreeCtrl::SetIndent}\label{wxtreectrlsetindent} - -\func{void}{SetIndent}{\param{int }{indent}} - -Sets the indentation for the tree control. - -\membersection{wxTreeCtrl::SetImageList}\label{wxtreectrlsetimagelist} - -\func{void}{SetImageList}{\param{wxImageList*}{ imageList}, \param{int }{which = wxIMAGE\_LIST\_NORMAL}} - -Sets the image list. {\it which} should be one of wxIMAGE\_LIST\_NORMAL, wxIMAGE\_LIST\_SMALL and -wxIMAGE\_LIST\_STATE. - -\membersection{wxTreeCtrl::SetItem}\label{wxtreectrlsetitem} - -\func{bool}{SetItem}{\param{wxTreeItem\& }{info}} - -Sets the properties of the item. - -The members of wxTreeItem are as follows: - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{m\_mask}{A bitlist specifying the valid members. See below for mask flags.} -\twocolitem{m\_itemId}{The item identifier.} -\twocolitem{m\_state}{The item state. See below for state flags.} -\twocolitem{m\_stateMask}{A bitlist specifying the valid contents of {\it m\_state}. These flags -are taken from the same set of symbols as {\it m\_state}.} -\twocolitem{m\_text}{The item label.} -\twocolitem{m\_image}{The item image index (an index into the appropriate image list).} -\twocolitem{m\_selectedImage}{The item selected index (an index into the appropriate image list).} -\twocolitem{m\_children}{The number of child items that this item has.} -\twocolitem{m\_data}{The application-defined data associated with this item.} -\end{twocollist} - -Valid mask flags are: - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{wxTREE\_MASK\_HANDLE}{The {\it m\_itemId} member is valid.} -\twocolitem{wxTREE\_MASK\_STATE}{The {\it m\_state} member is valid.} -\twocolitem{wxTREE\_MASK\_TEXT}{The {\it m\_text} member is valid.} -\twocolitem{wxTREE\_MASK\_IMAGE}{The {\it m\_image} member is valid.} -\twocolitem{wxTREE\_MASK\_SELECTED\_IMAGE}{The {\it m\_selectedImage} member is valid.} -\twocolitem{wxTREE\_MASK\_CHILDREN}{The {\it m\_children} member is valid.} -\twocolitem{wxTREE\_MASK\_DATA}{The {\it m\_data} member is valid.} -\end{twocollist} - -Valid state and state mask flags are: - -\twocolwidtha{5cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{wxTREE\_STATE\_BOLD}{The label is emboldened.} -\twocolitem{wxTREE\_STATE\_DROPHILITED}{The item indicates it is a drop target.} -\twocolitem{wxTREE\_STATE\_EXPANDED}{The item is expanded.} -\twocolitem{wxTREE\_STATE\_EXPANDEDONCE}{The item's list of child items has been expanded at least once.} -\twocolitem{wxTREE\_STATE\_FOCUSED}{The item has the focus, so it is surrounded by a standard focus rectangle. -Only one item can have the focus.} -\twocolitem{wxTREE\_STATE\_SELECTED}{The item is selected.} -\twocolitem{wxTREE\_STATE\_CUT}{The item is selected as part of a cut and paste operation.} -\end{twocollist} - -\membersection{wxTreeCtrl::SetItemImage}\label{wxtreectrlsetitemimage} - -\func{bool}{SetItemImage}{\param{long }{item}, \param{int }{image}, \param{int }{selImage}} - -Sets the item image and selected image. These are indices into the assciated image list. - -\membersection{wxTreeCtrl::SetItemState}\label{wxtreectrlsetitemstate} - -\func{bool}{SetItemState}{\param{long }{item}, \param{long }{state}, \param{long }{stateMask}} - -Sets the item state. See \helpref{wxTreeCtrl::SetItem}{wxtreectrlsetitem} for valid state and state mask flags. - -\membersection{wxTreeCtrl::SetItemText}\label{wxtreectrlsetitemtext} - -\func{void}{SetItemText}{\param{long }{item}, \param{const wxString\& }{text}} - -Sets the item label. - -\membersection{wxTreeCtrl::SetItemData}\label{wxtreectrlsetitemdata} - -\func{bool}{SetItemData}{\param{long }{item}, \param{long }{data}} - -Sets the item client data. - -\membersection{wxTreeCtrl::SortChildren}\label{wxtreectrlsortchildren} - -\func{bool}{SortChildren}{\param{long }{item}} - -Sorts the children of the given item in ascending alphabetical order. - diff --git a/docs/latex/wx/treeevt.tex b/docs/latex/wx/treeevt.tex deleted file mode 100644 index f8cdc48c03..0000000000 --- a/docs/latex/wx/treeevt.tex +++ /dev/null @@ -1,67 +0,0 @@ -\section{\class{wxTreeEvent}}\label{wxtreeevent} - -A tree event holds information about events associated with wxTreeCtrl objects. - -\wxheading{Derived from} - -\helpref{wxCommandEvent}{wxcommandevent}\\ -\helpref{wxEvent}{wxevent}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Event table macros} - -To process input from a tree control, use these event handler macros to direct input to member -functions that take a wxTreeEvent argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_TREE\_BEGIN\_DRAG(id, func)}}{Begin dragging with the left mouse button.} -\twocolitem{{\bf EVT\_TREE\_BEGIN\_RDRAG(id, func)}}{Begin dragging with the right mouse button.} -\twocolitem{{\bf EVT\_TREE\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label.} -\twocolitem{{\bf EVT\_TREE\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label.} -\twocolitem{{\bf EVT\_TREE\_DELETE\_ITEM(id, func)}}{Delete an item.} -\twocolitem{{\bf EVT\_TREE\_GET\_INFO(id, func)}}{Request information from the application.} -\twocolitem{{\bf EVT\_TREE\_SET\_INFO(id, func)}}{Information is being supplied.} -\twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDED(id, func)}}{Parent has been expanded.} -\twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDING(id, func)}}{Parent is being expanded.} -\twocolitem{{\bf EVT\_TREE\_SEL\_CHANGED(id, func)}}{Selection has changed.} -\twocolitem{{\bf EVT\_TREE\_SEL\_CHANGING(id, func)}}{Selection is changing.} -\twocolitem{{\bf EVT\_TREE\_KEY\_DOWN(id, func)}}{A key has been pressed.} -\end{twocollist}% - -\wxheading{See also} - -\helpref{wxTreeCtrl}{wxtreectrl} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxTreeEvent::wxTreeEvent} - -\func{}{wxTreeEvent}{\param{WXTYPE }{commandType = 0}, \param{int }{id = 0}} - -Constructor. - -\membersection{wxTreeEvent::m\_code} - -\member{int}{m\_code} - -Key code if the event is a keypress event. - -\membersection{wxTreeEvent::m\_itemIndex} - -\member{wxTreeItem}{m\_item} - -The item. - -\membersection{wxTreeEvent::m\_oldItem} - -\member{long}{m\_oldItem} - -The old item index. - -\membersection{wxTreeEvent::m\_pointDrag} - -\member{wxPoint}{m\_pointDrag} - -The position of the mouse pointer if the event is a drag event. - diff --git a/docs/latex/wx/tresourc.tex b/docs/latex/wx/tresourc.tex deleted file mode 100644 index 5757aed65d..0000000000 --- a/docs/latex/wx/tresourc.tex +++ /dev/null @@ -1,337 +0,0 @@ -\section{The wxWindows resource system}\label{resourceformats} - -From version 1.61, wxWindows has an optional {\it resource file} facility, -which allows separation of dialog, menu, bitmap and icon specifications -from the application code. - -It is similar in principle to the Windows resource file (whose ASCII form is -suffixed .RC and whose binary form is suffixed .RES). The wxWindows resource -file is currently ASCII-only, suffixed .WXR. Note that under Windows, -the .WXR file does not {\it replace} the native Windows resource file, -it merely supplements it. There is no existing native resource format in X -(except for the defaults file, which has limited expressive power). - -Using wxWindows resources for panels and dialogs has an effect on how -you deal with panel item callbacks: you can't specify a callback function in -a resource file, so how do you achieve the same effect as with programmatic -panel construction? The solution is similar to that adopted by Windows, which -is to use the {\it parent} panel or dialog to intercept user events. - -From 1.61, wxWindows routes panel item events that do not have a callback -to the \helpref{OnCommand}{wxwindowoncommand} member of the panel (or dialog). So, to use -panel or dialog resources, you need to derive a new class and override the -default (empty) OnCommand member. The first argument is a reference -to a wxWindow, and the second is a reference to a wxCommandEvent. Check the -name of the panel item that's generating an event by using the \helpref{wxWindow::GetName}{wxwindowgetname}\rtfsp -function and a string comparison function such as \helpref{wxStringEq}{wxstringeq}. -You may need to cast the reference to an appropriate specific type to perform -some operations. - -To obtain a pointer to a panel item when you only have the name (for example, -when you need to set a value of a text item from outside of the {\bf OnCommand} function), -use the function \helpref{wxFindWindowByName}{wxfindwindowbyname}. - -For details of functions for manipulating resource files and loading -user interface elements, see \helpref{wxWindows resource functions}{resourcefuncs}. - -\subsection{The format of a .WXR file} - -A wxWindows resource file may look a little odd at first. It's C++ -compatible, comprising mostly of static string variable declarations with -PrologIO syntax within the string. - -Here's a sample .WXR file: - -\begin{verbatim} -/* - * wxWindows Resource File - * Written by wxBuilder - * - */ - -#include "noname.ids" - -static char *aiai_resource = "bitmap(name = 'aiai_resource',\ - bitmap = ['aiai', wxBITMAP_TYPE_BMP_RESOURCE, 'WINDOWS'],\ - bitmap = ['aiai.xpm', wxBITMAP_TYPE_XPM, 'X'])."; - -static char *menuBar11 = "menu(name = 'menuBar11',\ - menu = \ - [\ - ['&File', 1, '', \ - ['&Open File', 2, 'Open a file'],\ - ['&Save File', 3, 'Save a file'],\ - [],\ - ['E&xit', 4, 'Exit program']\ - ],\ - ['&Help', 5, '', \ - ['&About', 6, 'About this program']\ - ]\ - ])."; - -static char *project_resource = "icon(name = 'project_resource',\ - icon = ['project', wxBITMAP_TYPE_ICO_RESOURCE, 'WINDOWS'],\ - icon = ['project_data', wxBITMAP_TYPE_XBM, 'X'])."; - -static char *panel3 = "dialog(name = 'panel3',\ - style = '',\ - title = 'untitled',\ - button_font = [14, 'wxSWISS', 'wxNORMAL', 'wxBOLD', 0],\ - label_font = [10, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0],\ - x = 0, y = 37, width = 292, height = 164,\ - control = [wxButton, 'OK', '', 'button5', 23, 34, -1, -1, 'aiai_resource'],\ - control = [wxMessage, 'A Label', '', 'message7', 166, 61, -1, -1, 'aiai_resource'],\ - control = [wxText, 'Text', 'wxVERTICAL_LABEL', 'text8', 24, 110, -1, -1])."; -\end{verbatim} - -As you can see, C++-style comments are allowed, and apparently include files -are supported too: but this is a special case, where the included file -is a file of defines shared by the C++ application code and resource file -to relate identifiers (such as FILE\_OPEN) to integers. - -Each {\it resource object} is of standard PrologIO syntax, that is, -an object name such as {\bf dialog} or {\bf icon}, then an open -parenthesis, a list of comma-delimited attribute/value pairs, a closing -parenthesis, and a full stop. Backslashes are required to escape newlines, -for the benefit of C++ syntax. If double quotation marks are used to -delimit strings, they need to be escaped with backslash within a C++ string -(so it's easier to use single quotation marks instead). - -\normalbox{{\it A note on PrologIO string syntax:} A string that begins with -an alphabetic character, and contains only alphanumeric characters, -hyphens and underscores, need not be quoted at all. Single quotes and double -quotes may be used to delimit more complex strings. In fact, single-quoted -and no-quoted strings are actually called {\it words}, but are treated -as strings for the purpose of the resource system.} - -A resource file like this is typically included in the application main file, -as if it were a normal C++ file. This eliminates the need for a separate -resource file to be distributed alongside the executable. However, the -resource file can be dynamically loaded if desired (for example by a non-C++ -language such as CLIPS, Prolog or Python). - -Once included, the resources need to be `parsed' (interpreted), because -so far the data is just a number of static string variables. The function\rtfsp -{\bf ::wxResourceParseData} is called early on in initialization of the application -(usually in {\bf wxApp::OnInit}) with a variable as argument. This may need to be -called a number of times, one for each variable. However, more than one -resource `object' can be stored in one string variable at a time, so you can -get all your resources into one variable if you want to. - -{\bf ::wxResourceParseData} parses the contents of the resource, ready for use -by functions such as {\bf ::wxResourceCreateBitmap} and {\bf wxPanel::LoadFromResource}. - -If a wxWindows resource object (such as a bitmap resource) refers to a -C++ data structure, such as static XBM or XPM data, a further call ({\bf -::wxResourceRegisterBitmapData}) needs to be made on initialization to tell -wxWindows about this data. The wxWindows resource object will refer to a -string identifier, such as `project\_data' in the example file above. -This identifier will be looked up in a table to get the C++ static data -to use for the bitmap or icon. - -In the C++ fragment below, the WXR resource file is included, -and appropriate resource initialization is carried out in {\bf OnInit}. -Note that at this stage, no actual wxWindows dialogs, menus, bitmaps or -icons are created; their `templates' are merely being set up for later -use. - -\begin{verbatim} -/* - * File: noname.cc - * Purpose: main application module, generated by wxBuilder. - */ - -#include "wx.h" -#include "wx_help.h" -#include "noname.h" - -// Includes the dialog, menu etc. resources -#include "noname.wxr" - -// Includes XBM data -#include "project.xbm" - -// Declare an instance of the application: allows the program to start -AppClass theApp; - -// Called to initialize the program -wxFrame *AppClass::OnInit(void) -{ -#ifdef wx_x - wxResourceRegisterBitmapData("project_data", project_bits, project_width, project_height); -#endif - wxResourceParseData(menuBar11); - wxResourceParseData(aiai_resource); - wxResourceParseData(project_resource); - wxResourceParseData(panel3); - ... -} -\end{verbatim} - - -\subsection{Dialog resource format} - -A dialog resource object may be used for either panels or dialog boxes, and -consists of the following attributes. In the following, a {\it font specification}\rtfsp -is a list consisting of point size, family, style, weight, underlined, optional facename. - -\begin{twocollist}\itemsep=0pt -\twocolitemruled{Attribute}{Value} -\twocolitem{name}{The name of the resource.} -\twocolitem{style}{Optional dialog box or panel window style.} -\twocolitem{title}{The title of the dialog box (unused if a panel).}. -\twocolitem{modal}{Whether modal: 1 if modal, 0 if modeless, absent if a panel resource.} -\twocolitem{button\_font}{The font used for control buttons: a list comprising point size (integer), -family (string), font style (string), font weight (string) and underlining (0 or 1).} -\twocolitem{label\_font}{The font used for control labels: a list comprising point size (integer), -family (string), font style (string), font weight (string) and underlining (0 or 1).} -\twocolitem{x}{The x position of the dialog or panel.} -\twocolitem{y}{The y position of the dialog or panel.} -\twocolitem{width}{The width of the dialog or panel.} -\twocolitem{height}{The height of the dialog or panel.} -\twocolitem{background\_colour}{The background colour of the dialog or panel. Only valid if the style includes wxUSER\_COLOURS.} -\twocolitem{label\_colour}{The default label colour for the children of the dialog or panel. Only valid if the style includes wxUSER\_COLOURS.} -\twocolitem{button\_colour}{The default button text colour for the children of the dialog or panel. Only valid if the style includes wxUSER\_COLOURS.} -\twocolitem{label\_font}{Font spec} -\twocolitem{button\_font}{Font spec} -\end{twocollist} - -Then comes zero or more attributes named `control' for each control -(panel item) on the dialog or panel. The value is a list of further -elements. In the table below, the names in the first column correspond to -the first element of the value list, and the second column details the -remaining elements of the list. - -\begin{twocollist}\itemsep=0pt -\twocolitemruled{Control}{Values} -\twocolitem{wxButton}{title (string), window style (string), name (string), x, y, width, height, button bitmap resource (optional string), button font spec} -\twocolitem{wxCheckBox}{title (string), window style (string), name (string), x, y, width, height, default value (optional integer, 1 or 0), label font spec} -\twocolitem{wxChoice}{title (string), window style (string), name (string), x, y, width, height, values (optional list of strings), label font spec, button font spec} -\twocolitem{wxComboBox}{title (string), window style (string), name (string), x, y, width, height, default text value, values (optional list of strings), label font spec, button font spec} -\twocolitem{wxGauge}{title (string), window style (string), name (string), x, y, width, height, value (optional integer), range (optional integer), label font spec, button font spec} -\twocolitem{wxGroupBox}{title (string), window style (string), name (string), x, y, width, height, label font spec} -\twocolitem{wxListBox}{title (string), window style (string), name (string), x, y, width, height, values (optional list of strings), multiple (optional string, wxSINGLE or wxMULTIPLE), -label font spec, button font spec} -\twocolitem{wxMessage}{title (string), window style (string), name (string), x, y, width, height, message bitmap resource (optional string), label font spec} -\twocolitem{wxMultiText}{title (string), window style (string), name (string), x, y, width, height, default value (optional string), -label font spec, button font spec} -\twocolitem{wxRadioBox}{title (string), window style (string), name (string), x, y, width, height, values (optional list of strings), number of rows or cols, -label font spec, button font spec} -\twocolitem{wxRadioButton}{title (string), window style (string), name (string), x, y, width, height, default value (optional integer, 1 or 0), label font spec} -\twocolitem{wxScrollBar}{title (string), window style (string), name (string), x, y, width, height, value (optional integer), -page length (optional integer), object length (optional integer), view length (optional integer)} -\twocolitem{wxSlider}{title (string), window style (string), name (string), x, y, width, height, value (optional integer), minimum (optional integer), maximum (optional integer), -label font spec, button font spec} -\twocolitem{wxText}{title (string), window style (string), name (string), x, y, width, height, default value (optional string), -label font spec, button font spec} -\end{twocollist} - -\subsection{Menubar resource format} - -A menubar resource object consists of the following attributes. - -\begin{twocollist}\itemsep=0pt -\twocolitemruled{Attribute}{Value} -\twocolitem{name}{The name of the menubar resource.} -\twocolitem{menu}{A list containing all the menus, as detailed below.} -\end{twocollist} - -The value of the {\bf menu} attribute is a list of menu item specifications, where each menu -item specification is itself a list comprising: - -\begin{itemize}\itemsep=0pt -\item title (a string) -\item menu item identifier (a string or non-zero integer, see below) -\item help string (optional) -\item 0 or 1 for the `checkable' parameter (optional) -\item optionally, further menu item specifications if this item is a pulldown menu. -\end{itemize} - -If the menu item specification is the empty list ([]), this is interpreted as a menu separator. - -If further (optional) information is associated with each menu item in a future release of wxWindows, -it will be placed after the help string and before the optional pulldown menu specifications. - -Note that the menu item identifier must be an integer if the resource is being -included as C++ code and then parsed on initialisation. Unfortunately,\rtfsp -\verb$#$define substitution is not performed inside strings, and -therefore the program cannot know the mapping. However, if the .WXR file -is being loaded dynamically, wxWindows will attempt to replace string -identifiers with \verb$#$defined integers, because it is able to parse -the included \verb$#$defines. - -\subsection{Bitmap resource format} - -A bitmap resource object consists of a name attribute, and one or more {\bf bitmap} attributes. -There can be more than one of these to allow specification of bitmaps that are optimum for the -platform and display. - -\begin{itemize}\itemsep=0pt -\item Bitmap name or filename. -\item Type of bitmap; for example, wxBITMAP\_TYPE\_BMP\_RESOURCE. See class reference under {\bf wxBitmap} for -a full list). -\item Platform this bitmap is valid for; one of WINDOWS, X, MAC and ANY. -\item Number of colours (optional). -\item X resolution (optional). -\item Y resolution (optional). -\end{itemize} - -\subsection{Icon resource format} - -An icon resource object consists of a name attribute, and one or more {\bf icon} attributes. -There can be more than one of these to allow specification of icons that are optimum for the -platform and display. - -\begin{itemize}\itemsep=0pt -\item Icon name or filename. -\item Type of icon; for example, wxBITMAP\_TYPE\_ICO\_RESOURCE. See class reference under {\bf wxBitmap} for -a full list). -\item Platform this bitmap is valid for; one of WINDOWS, X, MAC and ANY. -\item Number of colours (optional). -\item X resolution (optional). -\item Y resolution (optional). -\end{itemize} - - -\subsection{Resource format design issues} - -The .WXR file format is a recent addition and subject to change. -The use of an ASCII resource file format may seem rather inefficient, but this -choice has a number of advantages: - -\begin{itemize}\itemsep=0pt -\item Since it is C++ compatible, it can be included into an application's source code, -eliminating the problems associated with distributing a separate resource file -with the executable. However, it can also be loaded dynamically from a file, which will be required -for non-C++ programs that use wxWindows. -\item No extra binary file format and separate converter need be maintained for the wxWindows project -(although others are welcome to add the equivalent of the Windows `rc' resource -parser and a binary format). -\item It would be difficult to append a binary resource component onto an executable -in a portable way. -\item The file format is essentially the PrologIO object format, for which -a parser already exists, so parsing is easy. For those programs that use PrologIO -anyway, the size overhead of the parser is minimal. -\end{itemize} - -The disadvantages of the approach include: - -\begin{itemize}\itemsep=0pt -\item Parsing adds a small execution overhead to program initialization. -\item Under 16-bit Windows especially, global data is at a premium. -Using a .RC resource table for some wxWindows resource data may be a partial solution, -although .RC strings are limited to 255 characters. -\item Without a resource preprocessor, it is not possible to substitute integers -for identifiers (so menu identifiers have to be written as integers in the resource -object, in addition to providing \verb$#$defines for application code convenience). -\end{itemize} - -\subsection{Compiling the resource system} - -To enable the resource system, set {\bf USE\_WX\_RESOURCES} to 1 in wx\_setup.h. -If your wxWindows makefile supports it, set the same name in the makefile to 1. - -You will also need to compile the PrologIO utility (not always the easiest -task): you will need YACC, and LEX (or FLEX). DOS versions of these are -available on the AIAI ftp site under /pub/wxwin/tools. - diff --git a/docs/latex/wx/truntime.tex b/docs/latex/wx/truntime.tex deleted file mode 100644 index 2d1da9c021..0000000000 --- a/docs/latex/wx/truntime.tex +++ /dev/null @@ -1,93 +0,0 @@ -\section{Run time class information overview}\label{runtimeclassoverview} - -Classes: \helpref{wxObject}{wxobject}, \helpref{wxClassInfo}{wxclassinfo}. - -One of the failings of C++ is that no run-time information is provided -about a class and its position in the inheritance hierarchy. -Another is that instances of a class cannot be created just by knowing the name of a class, -which makes facilities such as persistent storage hard to implement. - -Most C++ GUI frameworks overcome these limitations by means of a set of -macros and functions and wxWindows (from version 1.62) is no exception. -Each class that you wish to be known the type system should have -a macro such as DECLARE\_DYNAMIC\_CLASS just inside the class declaration. -The macro IMPLEMENT\_DYNAMIC\_CLASS should be in the implementation file. - -Variations on these \helpref{macros}{macros} are used for multiple inheritance, and abstract -classes that cannot be instantiated dynamically or otherwise. - -DECLARE\_DYNAMIC\_CLASS inserts a static wxClassInfo declaration into the -class, initialized by IMPLEMENT\_DYNAMIC\_CLASS. When initialized, the -wxClassInfo object inserts itself into a linked list (accessed through -wxClassInfo::first and wxClassInfo::next pointers). The linked list -is fully created by the time all global initialisation is done. - -IMPLEMENT\_DYNAMIC\_CLASS is a macro that not only initialises the static -wxClassInfo member, but defines a global function capable of creating a -dynamic object of the class in question. A pointer to this function is -stored in wxClassInfo, and is used when an object should be created -dynamically. - -wxObject::IsKindOf uses the linked list of wxClassInfo. It takes -a wxClassInfo argument, so use CLASSINFO(className) to return an -appropriate wxClassInfo pointer to use in this function. - -The function \helpref{wxCreateDynamicObject}{wxcreatedynamicobject} can be used -to construct a new object of a given type, by supplying a string name. -If you have a pointer to the wxClassInfo object instead, then you -can simply call wxClassInfo::CreateObject. - -\subsection{wxClassInfo}\label{wxclassinfooverview} - -\overview{Run time class information overview}{runtimeclassoverview} - -Class: \helpref{wxClassInfo}{wxclassinfo} - -This class stores meta-information about classes. An application -may use macros such as DECLARE\_DYNAMIC\_CLASS and IMPLEMENT\_DYNAMIC\_CLASS -to record run-time information about a class, including: - -\begin{itemize}\itemsep=0pt -\item its position in the inheritance hierarchy; -\item the base class name(s) (up to two base classes are permitted); -\item a string representation of the class name; -\item a function that can be called to construct an instance of this class. -\end{itemize} - -The DECLARE\_... macros declare a static wxClassInfo variable in a class, which is initialized -by macros of the form IMPLEMENT\_... in the implementation C++ file. Classes whose instances may be -constructed dynamically are given a global constructor function which returns a new object. - -You can get the wxClassInfo for a class by using the CLASSINFO macro, e.g. CLASSINFO(wxFrame). -You can get the wxClassInfo for an object using wxObject::GetClassInfo. - -See also \helpref{wxObject}{wxobject} and \helpref{wxCreateDynamicObject}{wxcreatedynamicobject}. - -\subsection{Example} - -In a header file wx\_frame.h: - -\begin{verbatim} -class wxFrame: public wxWindow -{ - DECLARE_DYNAMIC_CLASS(wxFrame) - - private: - char *frameTitle; - public: - ... -}; -\end{verbatim} - -In a C++ file wx\_frame.cc: - -\begin{verbatim} -IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow) - -wxFrame::wxFrame(void) -{ -... -} -\end{verbatim} - - diff --git a/docs/latex/wx/tscroll.tex b/docs/latex/wx/tscroll.tex deleted file mode 100644 index 40986ab426..0000000000 --- a/docs/latex/wx/tscroll.tex +++ /dev/null @@ -1,90 +0,0 @@ -\section{Scrolling overview}\label{scrollingoverview} - -Classes: \helpref{wxWindow}{wxwindow}, \helpref{wxScrolledWindow}{wxscrolledwindow}, \helpref{wxIcon}{wxicon}, \helpref{wxScrollBar}{wxscrollbar}. - -Scrollbars come in various guises in wxWindows. All windows have the potential -to show a vertical scrollbar and/or a horizontal scrollbar: it's a basic capability of a window. -However, in practice, not all windows do make use of scrollbars, such as a single-line wxTextCtrl. - -Because any class derived from \helpref{wxWindow}{wxwindow} may have scrollbars, -there are functions to manipulate the scrollbars and event handlers to intercept -scroll events. But just because a window generates a scroll event, doesn't mean -that the window necessarily handles it and physically scrolls the window. The base class -wxWindow in fact doesn't have any default functionality to handle scroll events. -If you created a wxWindow object with scrollbars, and then clicked on the scrollbars, nothing -at all would happen. This is deliberate, because the {\it interpretation} of scroll -events varies from one window class to another. - -\helpref{wxScrolledWindow}{wxscrolledwindow} (formerly wxCanvas) is an example of a window that -adds functionality to make scrolling really work. It assumes that scrolling happens in -consistent units, not different-sized jumps, and that page size is represented -by the visible portion of the window. It's suited to drawing applications, but perhaps -not so suitable for a sophisticated editor in which the amount scrolled may vary according -to the size of text on a given line. For this, you would derive from wxWindow and -implement scrolling yourself. \helpref{wxGrid}{wxgrid} is an example of a class -that implements its own scrolling, largely because columns and rows can vary in size. - -\wxheading{The scrollbar model} - -The function \helpref{wxWindow::SetScrollbar}{wxwindowsetscrollbar} gives a clue about -the way a scrollbar is modelled. This function takes the following arguments: - -\twocolwidtha{5cm}% -\begin{twocollist} -\twocolitem{orientation}{Which scrollbar: wxVERTICAL or wxHORIZONTAL.} -\twocolitem{position}{The position of the scrollbar in scroll units.} -\twocolitem{visible}{The size of the visible portion of the scrollbar, in scroll units.} -\twocolitem{range}{The maximum position of the scrollbar.} -\twocolitem{refresh}{Whether the scrollbar should be repainted.} -\end{twocollist}% - -{\it orientation} determines whether we're talking about -the built-in horizontal or vertical scrollbar. - -{\it position} is simply the position of the `thumb' (the bit you drag to scroll around). -It's given in scroll units, and so is relative to the total range of the scrollbar. - -{\it visible} gives the number of scroll units that represents the portion of the -window currently visible. Normally, a scrollbar is capable of indicating this visually -by showing a different length of thumb. - -{\it range} is the maximum value of the scrollbar, where zero is the start -position. You choose the units that suit you, -so if you wanted to display text that has 100 lines, you would set this to 100. -Note that this doesn't have to correspond to the number of pixels scrolled - it's -up to you how you actually show the contents of the window. - -{\it refresh} just indicates whether the scrollbar should be repainted immediately or not. - -\wxheading{An example} - -Let's say you wish to display 50 lines of text, using the same font. -The window is sized so that you can only see 16 lines at a time. - -You would use: - -{\small% -\begin{verbatim} - SetScrollbar(wxVERTICAL, 0, 16, 50); -\end{verbatim} -} - -Note that with the window at this size, the thumb position can never go -above 50 minus 16, or 34. - -You can determine how many lines are currently visible by dividing the current view -size by the character height in pixels. - -When defining your own scrollbar behaviour, you will always need to recalculate -the scrollbar settings when the window size changes. You could therefore put your -scrollbar calculations and SetScrollbar -call into a function named AdjustScrollbars, which can be called initially and also -from your \helpref{wxWindow::OnSize}{wxwindowonsize} event handler function. - -%\normalbox{{\bf For Windows programmers:} note that scrollbar range in wxWindows has a different meaning -%from that in Windows. In native Windows scrollbar calls, range is the number of positions that the scrollbar -%can physically scroll through - in our example above, it would be 34. But it's easier -%to think in terms of the number of units that the whole scrollbar represents - the virtual -%window size - which is why wxWindows does it differently.} - - diff --git a/docs/latex/wx/tsplittr.tex b/docs/latex/wx/tsplittr.tex deleted file mode 100644 index 2be27dee73..0000000000 --- a/docs/latex/wx/tsplittr.tex +++ /dev/null @@ -1,63 +0,0 @@ -\section{wxSplitterWindow overview}\label{wxsplitterwindowoverview} - -Classes: \helpref{wxSplitterWindow}{wxsplitterwindow} - -The following screenshot shows the appearance of a splitter window with a vertical split. - -$$\image{8cm;0cm}{splitter.eps}$$ - -The style wxSP\_3D has been used to show a 3D border and 3D sash. - -\subsection{Example} - -The following fragment shows how to create a splitter window, creating two -subwindows and hiding one of them. - -{\small -\begin{verbatim} - splitter = new wxSplitterWindow(this, -1, wxPoint(0, 0), wxSize(400, 400), wxSP_3D); - - leftWindow = new MyWindow(splitter); - leftWindow->SetScrollbars(20, 20, 50, 50); - - rightWindow = new MyWindow(splitter); - rightWindow->SetScrollbars(20, 20, 50, 50); - rightWindow->Show(FALSE); - - splitter->Initialize(leftWindow); - - // Set this to prevent unsplitting -// splitter->SetMinimumPaneSize(20); -\end{verbatim} -} - -The next fragment shows how the splitter window can be manipulated after creation. - -{\small -\begin{verbatim} - void MyFrame::OnSplitVertical(wxCommandEvent& event) - { - if ( splitter->IsSplit() ) - splitter->Unsplit(); - leftWindow->Show(TRUE); - rightWindow->Show(TRUE); - splitter->SplitVertically( leftWindow, rightWindow ); - } - - void MyFrame::OnSplitHorizontal(wxCommandEvent& event) - { - if ( splitter->IsSplit() ) - splitter->Unsplit(); - leftWindow->Show(TRUE); - rightWindow->Show(TRUE); - splitter->SplitHorizontally( leftWindow, rightWindow ); - } - - void MyFrame::OnUnsplit(wxCommandEvent& event) - { - if ( splitter->IsSplit() ) - splitter->Unsplit(); - } -\end{verbatim} -} - diff --git a/docs/latex/wx/tstring.tex b/docs/latex/wx/tstring.tex deleted file mode 100644 index 41b70d34bf..0000000000 --- a/docs/latex/wx/tstring.tex +++ /dev/null @@ -1,6 +0,0 @@ -\section{wxString overview}\label{wxstringoverview} - -Classes: \helpref{wxString}{wxstring} - -TODO. - diff --git a/docs/latex/wx/tstyles.tex b/docs/latex/wx/tstyles.tex deleted file mode 100644 index c31d33afa4..0000000000 --- a/docs/latex/wx/tstyles.tex +++ /dev/null @@ -1,14 +0,0 @@ -\section{Window styles}\label{windowstyles} - -Window styles are used to specify alternative behaviour and appearances for windows, when they are -created. The symbols are defined in such as way that they can be combined in a `bit-list' using the -C++ {\it bitwise-or} operator. For example: - -\begin{verbatim} - wxCAPTION | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME -\end{verbatim} - -For the window styles specific to each window class, please see the documentation -for the window. Most windows can use the generic styles listed for \helpref{wxWindow}{wxwindow} in -addition to their own styles. - diff --git a/docs/latex/wx/ttab.tex b/docs/latex/wx/ttab.tex deleted file mode 100644 index d7654a09fa..0000000000 --- a/docs/latex/wx/ttab.tex +++ /dev/null @@ -1,219 +0,0 @@ -\section{Tab classes overview}\label{wxtaboverview} - -Classes: \helpref{wxTabView}{wxtabview}, \helpref{wxPanelTabView}{wxpaneltabview}, - \helpref{wxTabbedPanel}{wxtabbedpanel}, \helpref{wxTabbedDialog}{wxtabbeddialog}, - \helpref{wxTabControl}{wxtabcontrol} - -The tab classes provides a way to display rows of tabs (like file divider tabs), which can be -used to switch between panels or other information. Tabs are most -commonly used in dialog boxes where the number of options is too great -to fit on one dialog. - -\wxheading{The appearance and behaviour of a wxTabbedDialog} - -The following screenshot shows the appearance of the sample tabbed dialog application. - -$$\image{8cm;0cm}{wxtab1.eps}$$ - -By clicking on the tabs, the user can display a different set of controls. In the example, -the Close and Help buttons remain constant. These two buttons are children of the main dialog box, -whereas the other controls are children of panels which are shown and hidden according to -which tab is active. - -A tabbed dialog may have several layers (rows) of tabs, each being -offset vertically and horizontally from the previous. Tabs work in -columns, in that when a tab is pressed, it swaps place with the tab on -the first row of the same column, in order to give the effect of -displaying that tab. All tabs must be of the same width. -This is a constraint of the implementation, but it also -means that the user will find it easier to find tabs since there are -distinct tab columns. On some tabbed dialog implementations, tabs jump around -seemingly randomly because tabs have different widths. -In this implementation, a tab can always be found on the same column. - -Tabs are always drawn along the top of the view area; the implementation does -not allow for vertical tabs or any other configuration. - -\wxheading{Using tabs} - -The tab classes provide facilities for switching between contexts by -means of `tabs', which look like file divider tabs. - -You must create both a {\it view} to handle the tabs, and a {\it window} to display the tabs -and related information. The wxTabbedDialog and wxTabbedPanel classes are provided for -convenience, but you could equally well construct your own window class and derived -tab view. - -If you wish to display a tabbed dialog - the most common use - you should follow these steps. - -\begin{enumerate}\itemsep=0pt -\item Create a new wxTabbedDialog class, and any buttons you wish always to be displayed -(regardless of which tab is active). -\item Create a new wxPanelTabView, passing the dialog as the first argument. -\item Set the view rectangle with \helpref{wxTabView::SetViewRect}{wxtabviewsetviewrect}, -to specify the area in which child panels will be -shown. The tabs will sit on top of this view rectangle. -\item Call \helpref{wxTabView::CalculateTabWidth}{wxtabviewcalculatetabwidth} to calculate -the width of the tabs based on the view area. This is optional if, for example, you have one row -of tabs which does not extend the full width of the view area. -\item Call \helpref{wxTabView::AddTab}{wxtabviewaddtab} for each of the tabs you wish to create, passing -a unique identifier and a tab label. -\item Construct a number of windows, one for each tab, and call \helpref{wxPanelTabView::AddTabWindow}{wxpaneltabviewaddtabwindow} for -each of these, passing a tab identifier and the window. -\item Set the tab selection. -\item Show the dialog. -\end{enumerate} - -Under Motif, you may also need to size the dialog just before setting the tab selection, for unknown reasons. - -Some constraints you need to be aware of: - -\begin{itemize}\itemsep=0pt -\item All tabs must be of the same width. -\item Omit the wxTAB\_STYLE\_COLOUR\_INTERIOR flag to ensure that the dialog background -and tab backgrounds match. -\end{itemize} - -\subsection{Example} - -The following fragment is taken from the file test.cpp. - -{\small -\begin{verbatim} -void MyDialog::Init(void) -{ - int dialogWidth = 365; - int dialogHeight = 390; - - wxButton *okButton = new wxButton(this, wxID_OK, "Close", wxPoint(100, 330), wxSize(80, 25)); - wxButton *cancelButton = new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(185, 330), wxSize(80, 25)); - wxButton *HelpButton = new wxButton(this, wxID_HELP, "Help", wxPoint(270, 330), wxSize(80, 25)); - okButton->SetDefault(); - - // Note, omit the wxTAB_STYLE_COLOUR_INTERIOR, so we will guarantee a match - // with the panel background, and save a bit of time. - wxPanelTabView *view = new wxPanelTabView(this, wxTAB_STYLE_DRAW_BOX); - - wxRectangle rect; - rect.x = 5; - rect.y = 70; - // Could calculate the view width from the tab width and spacing, - // as below, but let's assume we have a fixed view width. -// rect.width = view->GetTabWidth()*4 + 3*view->GetHorizontalTabSpacing(); - rect.width = 326; - rect.height = 250; - - view->SetViewRect(rect); - - // Calculate the tab width for 4 tabs, based on a view width of 326 and - // the current horizontal spacing. Adjust the view width to exactly fit - // the tabs. - view->CalculateTabWidth(4, TRUE); - - if (!view->AddTab(TEST_TAB_CAT, wxString("Cat"))) - return; - - if (!view->AddTab(TEST_TAB_DOG, wxString("Dog"))) - return; - if (!view->AddTab(TEST_TAB_GUINEAPIG, wxString("Guinea Pig"))) - return; - if (!view->AddTab(TEST_TAB_GOAT, wxString("Goat"))) - return; - if (!view->AddTab(TEST_TAB_ANTEATER, wxString("Ant-eater"))) - return; - if (!view->AddTab(TEST_TAB_SHEEP, wxString("Sheep"))) - return; - if (!view->AddTab(TEST_TAB_COW, wxString("Cow"))) - return; - if (!view->AddTab(TEST_TAB_HORSE, wxString("Horse"))) - return; - if (!view->AddTab(TEST_TAB_PIG, wxString("Pig"))) - return; - if (!view->AddTab(TEST_TAB_OSTRICH, wxString("Ostrich"))) - return; - if (!view->AddTab(TEST_TAB_AARDVARK, wxString("Aardvark"))) - return; - if (!view->AddTab(TEST_TAB_HUMMINGBIRD,wxString("Hummingbird"))) - return; - - // Add some panels - wxPanel *panel1 = new wxPanel(this, -1, wxPoint(rect.x + 20, rect.y + 10), wxSize(290, 220), wxTAB_TRAVERSAL); - (void)new wxButton(panel1, -1, "Press me", wxPoint(10, 10)); - (void)new wxTextCtrl(panel1, -1, "1234", wxPoint(10, 40), wxSize(120, 150)); - - view->AddTabWindow(TEST_TAB_CAT, panel1); - - wxPanel *panel2 = new wxPanel(this, -1, wxPoint(rect.x + 20, rect.y + 10), wxSize(290, 220)); - - wxString animals[] = { "Fox", "Hare", "Rabbit", "Sabre-toothed tiger", "T Rex" }; - (void)new wxListBox(panel2, -1, wxPoint(5, 5), wxSize(170, 80), 5, animals); - - (void)new wxTextCtrl(panel2, -1, "Some notes about the animals in this house", wxPoint(5, 100), wxSize(170, 100)), - wxTE_MULTILINE; - - view->AddTabWindow(TEST_TAB_DOG, panel2); - - // Don't know why this is necessary under Motif... -#ifdef wx_motif - this->SetSize(dialogWidth, dialogHeight-20); -#endif - - view->SetTabSelection(TEST_TAB_CAT); - - this->Centre(wxBOTH); -} -\end{verbatim} -} - -\subsection{wxTab change log} - -June 3rd 1997, Version 1.2 - -\begin{itemize}\itemsep=0pt -\item Fixed bug which drew some tabs incorrectly. -\item Altered sample to put buttons below tabs, as per standard -Windows conventions. -\item Added improvements from Hitachi Europe Limited: draws correctly -on Motif and Windows, and tabs are now rounded - much nicer. -\end{itemize} - -April 29th 1996, Version 1.1 - -\begin{itemize}\itemsep=0pt -\item Added SetHorizontalTabOffset, SetHorizontalTabSpacing. -\item Corrected bug in colouring tabs (1 pixel out). -\item Corrected bug in adding tabs: last tab on first row could overlap right-hand -edge. -\item Added Layout function to allow resizing of the view rectangle and subsequent redrawing -of the tabs. -\item Added WXTAB\_VERSION symbol. -\item Fixed bug in SetTabSelection which did not move the selected tab to the first row. -\item Added argument in SetTabSelection to optionally avoid calling activation code. -\item Changed wxPanelTabView API to allow use of any window, not just a panel, in a tab. -\end{itemize} - -April 24th 1996, Version 1.0 - -\begin{itemize}\itemsep=0pt -\item First release. -\end{itemize} - -\section{wxTabView overview}\label{wxtabviewoverview} - -Classes: \helpref{wxTabView}{wxtabview}, \helpref{wxPanelTabView}{wxpaneltabview} - -A wxTabView manages and draws a number of tabs. Because it is separate -from the tabbed window implementation, it can be reused in a number of contexts. -This library provides tabbed dialog and panel classes to use with the -wxPanelTabView class, but an application could derive other kinds of -view from wxTabView. - -For example, a help application might draw a representation of a book on -a window, with a row of tabs along the top. The new tab view class might -be called wxCanvasTabView, for example, with the wxBookCanvas posting -the OnEvent function to the wxCanvasTabView before processing further, -application-specific event processing. - -A window class designed to work with a view class must call the view's -OnEvent and Draw functions at appropriate times. - diff --git a/docs/latex/wx/ttoolbar.tex b/docs/latex/wx/ttoolbar.tex deleted file mode 100644 index ba3d90f1d0..0000000000 --- a/docs/latex/wx/ttoolbar.tex +++ /dev/null @@ -1,284 +0,0 @@ -\section{Toolbar overview}\label{wxtoolbaroverview} - -Classes: \helpref{wxToolBar}{wxtoolbar} - -The toolbar family of classes allows an application to use toolbars -in a variety of configurations and styles. - -The toolbar is a popular user interface component and contains a set of bitmap -buttons or toggles. A toolbar gives faster access to an application's facilities than -menus, which have to be popped up and selected rather laboriously. - -Instead of supplying one toolbar class with a number -of different implementations depending on platform, wxWindows separates -out the classes. This is because there are a number of different toolbar -styles that you may wish to use simultaneously, and also, future -toolbar implementations will emerge (for example, using the -new-style Windows `coolbar' as seen in Microsoft applications) which -cannot all be shoe-horned into the one class. - -For each platform, the symbol {\bf wxToolBar} is defined to be one of the -specific toolbar classes. - -The following is a summary of the toolbar classes and their differences. - -\begin{itemize}\itemsep=0pt -\item {\bf wxToolBarBase.} This is a base class with pure virtual functions, -and should not be used directly. -\item {\bf wxToolBarSimple.} A simple toolbar class written entirely with generic wxWindows -functionality. A simply 3D effect for buttons is possible, but it is not consistent -with the Windows look and feel. This toolbar can scroll, and you can have arbitrary -numbers of rows and columns. -\item {\bf wxToolBarMSW.} This class implements an old-style Windows toolbar, only on -Windows. There are small, three-dimensional buttons, which do not (currently) reflect -the current Windows colour settings: the buttons are grey. This is the default wxToolBar -on 16-bit windows. -\item {\bf wxToolBar95.} Uses the native Windows 95 toolbar class. It dynamically adjusts its -background and button colours according to user colour settings. -CreateTools must be called after the tools have been added. -No absolute positioning is supported but you can specify the number -of rows, and add tool separators with {\bf AddSeparator}. -Tooltips are supported. {\bf OnRightClick} is not supported. This is the default wxToolBar -on Windows 95, Windows NT 4 and above. -\end{itemize} - -A toolbar might appear as a single row of images under -the menubar, or it might be in a separate frame layout in several rows -and columns. The class handles the layout of the images, unless explicit -positioning is requested. - -A tool is a bitmap which can either be a button (there is no `state', -it just generates an event when clicked) or it can be a toggle. If a -toggle, a second bitmap can be provided to depict the `on' state; if -the second bitmap is omitted, either the inverse of the first bitmap -will be used (for monochrome displays) or a thick border is drawn -around the bitmap (for colour displays where inverting will not have -the desired result). - -The Windows-specific toolbar classes expect 16-colour bitmaps that are 16 pixels wide and 15 pixels -high. If you want to use a different size, call {\bf SetToolBitmapSize}\rtfsp -as the demo shows, before adding tools to the button bar. Don't supply more than -one bitmap for each tool, because the toolbar generates all three images (normal, -depressed and checked) from the single bitmap you give it. - -To intercept - -\subsection{Using the toolbar library} - -Include {\tt "wx/toolbar.h"}, or if using a class directly, one of: - -\begin{itemize}\itemsep=0pt -\item {\tt "wx/msw/tbarmsw.h} for wxToolBarMSW -\item {\tt "wx/msw/tbar95.h} for wxToolBar95 -\item {\tt "wx/tbarsmpl.h} for wxToolBarSimple -\end{itemize} - -Example of toolbar use are given in the sample program ``toolbar''. The -source is given below. - -{\small -\begin{verbatim} -///////////////////////////////////////////////////////////////////////////// -// Name: test.cpp -// Purpose: wxToolBar sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "wx/toolbar.h" -#include "test.h" - -IMPLEMENT_APP(MyApp) - -#ifdef __X__ -// TODO: include XBM or XPM icons for X apps -#endif - -// The `main program' equivalent, creating the windows and returning the -// main frame -bool MyApp::OnInit(void) -{ - // Create the main frame window - MyFrame* frame = new MyFrame(NULL, -1, "wxToolBar Sample", - wxPoint(100, 100), wxSize(450, 300)); - - // Give it a status line - frame->CreateStatusBar(); - - // Give it an icon -#ifdef __WXMSW__ - frame->SetIcon(wxIcon("mondrian")); -#endif -#ifdef __X__ - frame->SetIcon(wxIcon("mondrian.xbm")); -#endif - - // Make a menubar - wxMenu *fileMenu = new wxMenu; - fileMenu->Append(wxID_EXIT, "E&xit"); - - wxMenu *helpMenu = new wxMenu; - helpMenu->Append(wxID_HELP, "&About"); - - wxMenuBar* menuBar = new wxMenuBar; - - menuBar->Append(fileMenu, "&File"); - menuBar->Append(helpMenu, "&Help"); - - // Associate the menu bar with the frame - frame->SetMenuBar(menuBar); - - // Create the toolbar - frame->CreateToolBar(wxNO_BORDER|wxHORIZONTAL|wxTB_FLAT, ID_TOOLBAR); - - InitToolbar(frame->GetToolBar()); - - // Force a resize. This should probably be replaced by a call to a wxFrame - // function that lays out default decorations and the remaining content window. - frame->OnSize(wxSizeEvent(wxSize(-1, -1), frame->GetId())); - frame->Show(TRUE); - - frame->SetStatusText("Hello, wxWindows"); - - SetTopWindow(frame); - - return TRUE; -} - -bool MyApp::InitToolbar(wxToolBar* toolBar) -{ - toolBar->SetMargins(5, 5); - - // Set up toolbar - wxBitmap* toolBarBitmaps[8]; - -#ifdef __WXMSW__ - toolBarBitmaps[0] = new wxBitmap("icon1"); - toolBarBitmaps[1] = new wxBitmap("icon2"); - toolBarBitmaps[2] = new wxBitmap("icon3"); - toolBarBitmaps[3] = new wxBitmap("icon4"); - toolBarBitmaps[4] = new wxBitmap("icon5"); - toolBarBitmaps[5] = new wxBitmap("icon6"); - toolBarBitmaps[6] = new wxBitmap("icon7"); - toolBarBitmaps[7] = new wxBitmap("icon8"); -#endif -#ifdef __X__ - // TODO - toolBarBitmaps[0] = new wxBitmap(...); - toolBarBitmaps[1] = new wxBitmap(...); - toolBarBitmaps[2] = new wxBitmap(...); - toolBarBitmaps[3] = new wxBitmap(...); - toolBarBitmaps[4] = new wxBitmap(...); - toolBarBitmaps[5] = new wxBitmap(...); - toolBarBitmaps[6] = new wxBitmap(...); - toolBarBitmaps[7] = new wxBitmap(...); -#endif - -#ifdef __WXMSW__ - int width = 24; -#else - int width = 16; -#endif - int offX = 5; - int currentX = 5; - - toolBar->AddTool(wxID_NEW, *(toolBarBitmaps[0]), wxNullBitmap, FALSE, (float)currentX, -1, NULL, "New file"); - currentX += width + 5; - toolBar->AddTool(wxID_OPEN, *(toolBarBitmaps[1]), wxNullBitmap, FALSE, (float)currentX, -1, NULL, "Open file"); - currentX += width + 5; - toolBar->AddTool(wxID_SAVE, *(toolBarBitmaps[2]), wxNullBitmap, FALSE, (float)currentX, -1, NULL, "Save file"); - currentX += width + 5; - toolBar->AddSeparator(); - toolBar->AddTool(wxID_COPY, *(toolBarBitmaps[3]), wxNullBitmap, FALSE, (float)currentX, -1, NULL, "Copy"); - currentX += width + 5; - toolBar->AddTool(wxID_CUT, *(toolBarBitmaps[4]), wxNullBitmap, FALSE, (float)currentX, -1, NULL, "Cut"); - currentX += width + 5; - toolBar->AddTool(wxID_PASTE, *(toolBarBitmaps[5]), wxNullBitmap, FALSE, (float)currentX, -1, NULL, "Paste"); - currentX += width + 5; - toolBar->AddSeparator(); - toolBar->AddTool(wxID_PRINT, *(toolBarBitmaps[6]), wxNullBitmap, FALSE, (float)currentX, -1, NULL, "Print"); - currentX += width + 5; - toolBar->AddSeparator(); - toolBar->AddTool(wxID_HELP, *(toolBarBitmaps[7]), wxNullBitmap, FALSE, currentX, -1, NULL, "Help"); - - toolBar->Realize(); - - // Can delete the bitmaps since they're reference counted - int i; - for (i = 0; i < 8; i++) - delete toolBarBitmaps[i]; - - return TRUE; -} - -// wxID_HELP will be processed for the 'About' menu and the toolbar help button. - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(wxID_EXIT, MyFrame::OnQuit) - EVT_MENU(wxID_HELP, MyFrame::OnAbout) - EVT_CLOSE(MyFrame::OnCloseWindow) - EVT_TOOL_RANGE(wxID_OPEN, wxID_PASTE, MyFrame::OnToolLeftClick) - EVT_TOOL_ENTER(ID_TOOLBAR, MyFrame::OnToolEnter) -END_EVENT_TABLE() - -// Define my frame constructor -MyFrame::MyFrame(wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos, - const wxSize& size, long style): - wxFrame(parent, id, title, pos, size, style) -{ - m_textWindow = new wxTextCtrl(this, -1, "", wxPoint(0, 0), wxSize(-1, -1), wxTE_MULTILINE); -} - -void MyFrame::OnQuit(wxCommandEvent& event) -{ - Close(TRUE); -} - -void MyFrame::OnAbout(wxCommandEvent& event) -{ - (void)wxMessageBox("wxWindows wxToolBar demo\n", "About wxToolBar"); -} - -// Define the behaviour for the frame closing -// - must delete all frames except for the main one. -void MyFrame::OnCloseWindow(wxCloseEvent& event) -{ - Destroy(); -} - -void MyFrame::OnToolLeftClick(wxCommandEvent& event) -{ - wxString str; - str.Printf("Clicked on tool %d", event.GetId()); - SetStatusText(str); -} - -void MyFrame::OnToolEnter(wxCommandEvent& event) -{ - if (event.GetSelection() > -1) - { - wxString str; - str.Printf("This is tool number %d", event.GetSelection()); - SetStatusText(str); - } - else - SetStatusText(""); -} -\end{verbatim} -} - diff --git a/docs/latex/wx/ttreectl.tex b/docs/latex/wx/ttreectl.tex deleted file mode 100644 index fb6f85e216..0000000000 --- a/docs/latex/wx/ttreectl.tex +++ /dev/null @@ -1,6 +0,0 @@ -\section{wxTreeCtrl overview}\label{wxtreectrloverview} - -Classes: \helpref{wxTreeCtrl}{wxtreectrl}, \helpref{wxImageList}{wximagelist} - -TODO. - diff --git a/docs/latex/wx/tusage.tex b/docs/latex/wx/tusage.tex deleted file mode 100644 index ba9d767ada..0000000000 --- a/docs/latex/wx/tusage.tex +++ /dev/null @@ -1,22 +0,0 @@ -\section{Notes on using the reference}\label{referencenotes} - -In the descriptions of the wxWindows classes and their member -functions, note that descriptions of inherited member functions are not -duplicated in derived classes unless their behaviour is different. So in -using a class such as wxScrolledWindow, be aware that wxWindow functions may be -relevant. - -Note also that arguments with default values may be omitted from a -function call, for brevity. Size and position arguments may usually be -given a value of -1 (the default), in which case wxWindows will choose a -suitable value. - -Most strings are returned as wxString objects. However, for remaining -char * return values, the strings are allocated and -deallocated by wxWindows. Therefore, return values should always be -copied for long-term use, especially since the same buffer is often -used by wxWindows. - -The member functions are given in alphabetical order except for -constructors and destructors which appear first. - diff --git a/docs/latex/wx/tvalidat.tex b/docs/latex/wx/tvalidat.tex deleted file mode 100644 index 2709a704c6..0000000000 --- a/docs/latex/wx/tvalidat.tex +++ /dev/null @@ -1,116 +0,0 @@ -\section{Validator overview}\label{validatoroverview} - -Classes: \helpref{wxValidator}{wxvalidator}, \helpref{wxTextValidator}{wxtextvalidator} - -The aim of the validator concept is to make dialogs very much easier to write. -A validator is an object that can be plugged into a control (such as a wxTextCtrl), and -mediates between C++ data and the control, transferring the data in either direction -and validating it. It also is able to intercept events generated -by the control, providing filtering behaviour without the need to derive a new control class. - -You can use a stock validator, such as \helpref{wxTextValidator}{wxtextvalidator}; or -you can write your own. - -\wxheading{Example} - -Here is an example of wxTextValidator usage. - -\begin{verbatim} - wxTextCtrl *txt1 = new wxTextCtrl(this, VALIDATE_TEXT, "", - wxPoint(10, 10), wxSize(100, 80), 0, - wxTextValidator(wxFILTER_ALPHA, &g_data.m_string)); -\end{verbatim} - -In this example, the text validator object provides the following functionality: - -\begin{enumerate}\itemsep=0pt -\item It transfers the value of g\_data.m\_string (a wxString variable) to the wxTextCtrl when -the dialog is initialised. -\item It transfers the wxTextCtrl data back to this variable when the dialog is dismissed. -\item It filters input characters so that only alphabetic characters are allowed. -\end{enumerate} - -The validation and filtering of input is accomplished in two ways. When a character is input, -wxTextValidator checks the character against the allowed filter flag (wxFILTER\_ALPHA in this case). If -the character is inappropriate, it is vetoed (does not appear) and a warning beep sounds. -The second type of validation is performed when the dialog is about to be dismissed, so if -the default string contained invalid characters already, a dialog box is shown giving the -error, and the dialog is not dismissed. - -\wxheading{Anatomy of a validator} - -A programmer creating a new validator class should provide the following functionality. - -A validator constructor is responsible for allowing the programmer to specify the kind -of validation required, and perhaps a pointer to a C++ variable that is used for storing the -data for the control. If such a variable address is not supplied by the user, then -the validator should store the data internally. - -The \helpref{wxValidator::Validate}{wxvalidatorvalidate} member function should return -TRUE if the data in the control (not the C++ variable) is valid. It should also show -an appropriate message if data was not valid. - -The \helpref{wxValidator::TransferToWindow}{wxvalidatortransfertowindow} member function should -transfer the data from the validator or associated C++ variable to the control. - -The \helpref{wxValidator::TransferFromWindow}{wxvalidatortransferfromwindow} member function should -transfer the data from the control to the validator or associated C++ variable. - -There should be a copy constructor, and a \helpref{wxValidator::Clone}{wxvalidatorclone} function -which returns a copy of the validator object. This is important because validators -are passed by reference to window constructors, and must therefore be cloned internally. - -You can optionally define event handlers for the validator, to implement filtering. These handlers -will capture events before the control itself does. - -For an example implementation, see the valtext.h and valtext.cpp files in the wxWindows library. - -\wxheading{How validators interact with dialogs} - -For validators to work correctly, validator functions must be called at the right times during -dialog initialisation and dismissal. - -When a \helpref{wxDialog::Show}{wxdialogshow} is called (for a modeless dialog) -or \helpref{wxDialog::ShowModal}{wxdialogshowmodal} is called (for a modal dialog), -the function \helpref{wxWindow::InitDialog}{wxwindowinitdialog} is automatically called. -This in turn sends an initialisation event to the dialog. The default handler for -the wxEVT\_INIT\_DIALOG event is defined in the wxWindow class to simply call -the function \helpref{wxWindow::TransferDataToWindow}{wxwindowtransferdatatowindow}. This -function finds all the validators in the window's children and calls the TransferToWindow -function for each. Thus, data is transferred from C++ variables to the dialog -just as the dialog is being shown. - -\normalbox{If you are using a window or panel instead of a dialog, you will need to -call \helpref{wxWindow::InitDialog}{wxwindowinitdialog} explicitly before showing the -window.} - -When the user clicks on a button, for example the OK button, the application should -first call \helpref{wxWindow::Validate}{wxwindowvalidate}, which returns FALSE if -any of the child window validators failed to validate the window data. The button handler -should return immediately if validation failed. Secondly, the application should -call \helpref{wxWindow::TransferDataFromWindow}{wxwindowtransferdatafromwindow} and -return if this failed. It is then safe to end the dialog by calling EndModal (if modal) -or Show (if modeless). - -In fact, wxDialog contains a default command event handler for the wxID\_OK button. It goes like -this: - -\begin{verbatim} -void wxDialog::OnOK(wxCommandEvent& event) -{ - if ( Validate() && TransferDataFromWindow() ) - { - if ( IsModal() ) - EndModal(wxID_OK); - else - { - SetReturnCode(wxID_OK); - this->Show(FALSE); - } - } -} -\end{verbatim} - -So if using validators and a normal OK button, you may not even need to write any -code for handling dialog dismissal. - diff --git a/docs/latex/wx/up.gif b/docs/latex/wx/up.gif deleted file mode 100644 index f9e7031e64..0000000000 --- a/docs/latex/wx/up.gif +++ /dev/null @@ -1 +0,0 @@ -GIF87a \ No newline at end of file diff --git a/docs/latex/wx/upditer.tex b/docs/latex/wx/upditer.tex deleted file mode 100644 index 148d4960da..0000000000 --- a/docs/latex/wx/upditer.tex +++ /dev/null @@ -1,56 +0,0 @@ -\section{\class{wxUpdateIterator}}\label{wxupdateiterator} - -This class is used to iterate through all damaged regions of a window, within an OnPaint call. - -To use it, construct an iterator object on the stack and loop through the -regions, testing the object and incrementing the iterator at the end of the loop. - -See \helpref{wxScrolledWindow::OnPaint}{wxscrolledwindowonpaint} for an example of use. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxScrolledWindow::OnPaint}{wxscrolledwindowonpaint} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxUpdateIterator::wxUpdateIterator} - -\func{}{wxUpdateIterator}{\param{wxWindow* }{window}} - -Creates an iterator object. - -\membersection{wxUpdateIterator::GetX} - -\func{int}{GetX}{\void} - -Returns the x value for the current region. - -\membersection{wxUpdateIterator::GetY} - -\func{int}{GetY}{\void} - -Returns the y value for the current region. - -\membersection{wxUpdateIterator::GetWidth} - -\func{int}{GetWidth}{\void} - -Returns the width value for the current region. - -\membersection{wxUpdateIterator::GetHeight} - -\func{int}{GetWidth}{\void} - -Returns the width value for the current region. - -\membersection{wxUpdateIterator::operator $++$} - -\func{void}{operator $++$}{\void} - -Increments the iterator to the next region. - - diff --git a/docs/latex/wx/upduievt.tex b/docs/latex/wx/upduievt.tex deleted file mode 100644 index 2423083c1d..0000000000 --- a/docs/latex/wx/upduievt.tex +++ /dev/null @@ -1,141 +0,0 @@ -\section{\class{wxUpdateUIEvent}}\label{wxupdateuievent} - -This class is used for pseudo-events which are called by wxWindows -to give an application the chance to update various user interface elements. - -\wxheading{Derived from} - -\helpref{wxEvent}{wxevent}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Event table macros} - -To process a menu event, use these event handler macros to direct input to member -functions that take a wxUpdateUIEvent argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_UPDATE\_UI(id, func)}}{Process a wxEVT\_UPDATE\_UI event.} -\end{twocollist}% - -\wxheading{Remarks} - -Without update UI events, an application has to work hard to check/uncheck, enable/disable, -and set the text for elements such as menu items and toolbar buttons. -The code for doing this has to be mixed up with the code that is invoked when -an action is invoked for a menu item or button. - -With update UI events, you define an event handler to look at the state of -the application and change UI elements accordingly. wxWindows will call your -member functions in idle time, so you don't have to worry where to call this code. -In addition to being a clearer and more declarative method, it also means you -don't have to worry whether you're updating a toolbar or menubar identifier. -The same handler can update a menu item and toolbar button, if the identifier is the same. - -Instead of directly manipulating the menu or button, you call functions in the event -object, such as \helpref{wxUpdateUIEvent::Check}{wxupdateuieventcheck}. wxWindows -will determine whether such a call has been made, and which UI element to update. - -\wxheading{See also} - -\helpref{Event handling overview}{eventhandlingoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxUpdateUIEvent::wxUpdateUIEvent} - -\func{}{wxUpdateUIEvent}{\param{wxWindowID }{commandId = 0}} - -Constructor. - -\membersection{wxUpdateUIEvent::m\_checked} - -\member{bool}{m\_checked} - -TRUE if the element should be checked, FALSE otherwise. - -\membersection{wxUpdateUIEvent::m\_enabled} - -\member{bool}{m\_checked} - -TRUE if the element should be enabled, FALSE otherwise. - -\membersection{wxUpdateUIEvent::m\_setChecked} - -\member{bool}{m\_setChecked} - -TRUE if the application has set the {\bf m\_checked} member. - -\membersection{wxUpdateUIEvent::m\_setEnabled} - -\member{bool}{m\_setEnabled} - -TRUE if the application has set the {\bf m\_enabled} member. - -\membersection{wxUpdateUIEvent::m\_setText} - -\member{bool}{m\_setText} - -TRUE if the application has set the {\bf m\_text} member. - -\membersection{wxUpdateUIEvent::m\_text} - -\member{wxString}{m\_text} - -Holds the text with which the the application wishes to -update the UI element. - -\membersection{wxUpdateUIEvent::Check}\label{wxupdateuieventcheck} - -\func{void}{Check}{\param{bool}{ check}} - -Check or uncheck the UI element. - -\membersection{wxUpdateUIEvent::Enable}\label{wxupdateuieventenable} - -\func{void}{Enable}{\param{bool}{ enable}} - -Enable or disable the UI element. - -\membersection{wxUpdateUIEvent::GetChecked}\label{wxupdateuieventgetchecked} - -\constfunc{bool}{GetChecked}{\void} - -Returns TRUE if the UI element should be checked. - -\membersection{wxUpdateUIEvent::GetEnabled}\label{wxupdateuieventgetenabled} - -\constfunc{bool}{GetEnabled}{\void} - -Returns TRUE if the UI element should be enabled. - -\membersection{wxUpdateUIEvent::GetSetChecked}\label{wxupdateuieventgetsetchecked} - -\constfunc{bool}{GetSetChecked}{\void} - -Returns TRUE if the application has called {\bf SetChecked}. For wxWindows internal use only. - -\membersection{wxUpdateUIEvent::GetSetEnabled}\label{wxupdateuieventgetsetenabled} - -\constfunc{bool}{GetSetEnabled}{\void} - -Returns TRUE if the application has called {\bf SetEnabled}. For wxWindows internal use only. - -\membersection{wxUpdateUIEvent::GetSetText}\label{wxupdateuieventgetsettext} - -\constfunc{bool}{GetSetText}{\void} - -Returns TRUE if the application has called {\bf SetText}. For wxWindows internal use only. - -\membersection{wxUpdateUIEvent::GetText}\label{wxupdateuieventgettext} - -\constfunc{wxString}{GetText}{\void} - -Returns the text that should be set for the UI element. - -\membersection{wxUpdateUIEvent::SetText}\label{wxupdateuieventsettext} - -\func{void}{SetText}{\param{const wxString\&}{ text}} - -Sets the text for this UI element. - diff --git a/docs/latex/wx/validatr.tex b/docs/latex/wx/validatr.tex deleted file mode 100644 index c5c13bf4d2..0000000000 --- a/docs/latex/wx/validatr.tex +++ /dev/null @@ -1,90 +0,0 @@ -\section{\class{wxValidator}}\label{wxvalidator} - -wxValidator is the base class for a family of validator classes that mediate -between a class of control, and application data. - -A validator has three major roles: - -\begin{enumerate}\itemsep=0pt -\item to transfer data from a C++ variable or own storage to and from a control; -\item to validate data in a control, and show an appropriate error message; -\item to filter events (such as keystrokes), thereby changing the behaviour of the -associated control. -\end{enumerate} - -Validators can be plugged into controls dynamically. - -To specify a default, `null' validator, use the symbol {\bf wxDefaultValidator}. - -For more information, please see \helpref{Validator overview}{validatoroverview}. - -\wxheading{Derived from} - -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{Validator overview}{validatoroverview}, \helpref{wxTextValidator}{wxtextvalidator} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxValidator::wxValidator}\label{wxvalidatorconstr} - -\func{}{wxValidator}{\void} - -Constructor. - -\membersection{wxValidator::\destruct{wxValidator}} - -\func{}{\destruct{wxValidator}}{\void} - -Destructor. - -\membersection{wxValidator::Clone}\label{wxvalidatorclone} - -\constfunc{virtual wxValidator*}{Clone}{\void} - -All validator classes must implement the {\bf Clone} function, which returns -an identical copy of itself. This is because validators are passed to control -constructors as references which must be copied. Unlike objects such as pens -and brushes, it does not make sense to have a reference counting scheme -to do this cloning, because all validators should have separate -data. - -This base function returns NULL. - -\membersection{wxValidator::GetWindow}\label{wxvalidatorgetwindow} - -\constfunc{wxWindow*}{GetWindow}{\void} - -Returns the window associated with the validator. - -\membersection{wxValidator::SetWindow}\label{wxvalidatorsetwindow} - -\func{void}{SetWindow}{\param{wxWindow*}{ window}} - -Associates a window with the validator. - -\membersection{wxValidator::TransferFromWindow}\label{wxvalidatortransferfromwindow} - -\func{virtual bool}{TransferToWindow}{\param{wxWindow*}{ parent}} - -This overridable function is called when the value in the window must be -transferred to the validator. Return FALSE if there is a problem. - -\membersection{wxValidator::TransferToWindow}\label{wxvalidatortransfertowindow} - -\func{virtual bool}{TransferToWindow}{\param{wxWindow*}{ parent}} - -This overridable function is called when the value associated with the validator must be -transferred to the window. Return FALSE if there is a problem. - -\membersection{wxValidator::Validate}\label{wxvalidatorvalidate} - -\func{virtual bool}{Validate}{\param{wxWindow*}{ parent}} - -This overridable function is called when the value in the associated window must be validated. -Return FALSE if the value in the window is not valid; you may pop up an error dialog. - - diff --git a/docs/latex/wx/valtext.tex b/docs/latex/wx/valtext.tex deleted file mode 100644 index 9c7941cb2b..0000000000 --- a/docs/latex/wx/valtext.tex +++ /dev/null @@ -1,125 +0,0 @@ -\section{\class{wxTextValidator}}\label{wxtextvalidator} - -wxTextValidator validates text controls, providing a variety of filtering behaviours. - -For more information, please see \helpref{Validator overview}{validatoroverview}. - -\wxheading{Derived from} - -\helpref{wxValidator}{wxvalidator}\\ -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{Validator overview}{validatoroverview}, \helpref{wxValidator}{wxvalidator} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxTextValidator::wxTextValidator}\label{wxtextvalidatorconstr} - -\func{}{wxTextValidator}{\param{const wxTextValidator\&}{ validator}} - -Copy constructor. - -\func{}{wxTextValidator}{\param{long}{ style = wxFILTER\_NONE}, \param{wxString* }{valPtr = NULL}} - -Constructor, taking a style and optional pointer to a wxString variable. - -\wxheading{Parameters} - -\docparam{style}{A bitlist of flags, which can be: - -\twocolwidtha{5cm} -\begin{twocollist} -\twocolitem{{\bf wxFILTER\_NONE}}{No filtering takes place.} -\twocolitem{{\bf wxFILTER\_ASCII}}{Non-ASCII characters are filtered out.} -\twocolitem{{\bf wxFILTER\_ALPHA}}{Non-alpha characters are filtered out.} -\twocolitem{{\bf wxFILTER\_ALPHANUMERIC}}{Non-alphanumeric characters are filtered out.} -\twocolitem{{\bf wxFILTER\_NUMERIC}}{Non-numeric characters are filtered out.} -\twocolitem{{\bf wxFILTER\_INCLUDE\_LIST}}{Use an include list. The validator -checks if the user input is on the list, complaining if not.} -\twocolitem{{\bf wxFILTER\_EXCLUDE\_LIST}}{Use an exclude list. The validator -checks if the user input is on the list, complaining if it is.} -\end{twocollist} -} - -\docparam{valPtr}{A pointer to a wxString variable that contains the value. This variable -should have a lifetime equal to or longer than the validator lifetime (which is usually -determined by the lifetime of the window). If NULL, the validator uses its own internal -storage for the value.} - -\membersection{wxTextValidator::\destruct{wxTextValidator}} - -\func{}{\destruct{wxTextValidator}}{\void} - -Destructor. - -\membersection{wxTextValidator::Clone}\label{wxtextvalidatorclone} - -\constfunc{virtual wxTextValidator*}{Clone}{\void} - -Clones the text validator using the copy constructor. - -\membersection{wxTextValidator::GetExcludeList}\label{wxtextvalidatorgetexcludelist} - -\constfunc{wxStringList\&}{GetExcludeList}{\void} - -Returns a reference to the exclude list (the list of invalid values). - -\membersection{wxTextValidator::GetIncludeList}\label{wxtextvalidatorgetincludelist} - -\constfunc{wxStringList\&}{GetIncludeList}{\void} - -Returns a reference to the include list (the list of valid values). - -\membersection{wxTextValidator::GetStyle}\label{wxtextvalidatorgetstyle} - -\constfunc{long}{GetStyle}{\void} - -Returns the validator style. - -\membersection{wxTextValidator::OnChar}\label{wxtextvalidatoronchar} - -\func{void}{OnChar}{\param{wxKeyEvent\&}{ event}} - -Receives character input from the window and filters it according to the -current validator style. - -\membersection{wxTextValidator::SetExcludeList}\label{wxtextvalidatorsetexcludelist} - -\func{void}{SetExcludeList}{\param{const wxStringList\&}{ stringList}} - -Sets the exclude list (invalid values for the user input). - -\membersection{wxTextValidator::SetIncludeList}\label{wxtextvalidatorsetincludelist} - -\func{void}{SetIncludeList}{\param{const wxStringList\&}{ stringList}} - -Sets the include list (valid values for the user input). - -\membersection{wxTextValidator::SetStyle}\label{wxtextvalidatorsetstyle} - -\func{void}{SetStyle}{\param{long}{ style}} - -Sets the validator style. - -\membersection{wxTextValidator::TransferFromWindow}\label{wxtextvalidatortransferfromwindow} - -\func{virtual bool}{TransferToWindow}{\param{wxWindow*}{ parent}} - -Transfers the string value to the window. - -\membersection{wxTextValidator::TransferToWindow}\label{wxtextvalidatortransfertowindow} - -\func{virtual bool}{TransferToWindow}{\param{wxWindow*}{ parent}} - -Transfers the window value to the string. - -\membersection{wxTextValidator::Validate}\label{wxtextvalidatorvalidate} - -\func{virtual bool}{Validate}{\param{wxWindow*}{ parent}} - -Validates the window contents against the include or exclude lists, depending -on the validator style. - diff --git a/docs/latex/wx/view.tex b/docs/latex/wx/view.tex deleted file mode 100644 index f8ec2b2ebc..0000000000 --- a/docs/latex/wx/view.tex +++ /dev/null @@ -1,178 +0,0 @@ -\section{\class{wxView}}\label{wxview} - -The view class can be used to model the viewing and editing component of -an application's file-based data. It is part of the document/view framework supported by wxWindows, -and cooperates with the \helpref{wxDocument}{wxdocument}, \helpref{wxDocTemplate}{wxdoctemplate} -and \helpref{wxDocManager}{wxdocmanager} classes. - -\wxheading{Derived from} - -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxView overview}{wxviewoverview}, \helpref{wxDocument}{wxdocument}, \helpref{wxDocTemplate}{wxdoctemplate},\rtfsp -\helpref{wxDocManager}{wxdocmanager} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxView::m\_viewDocument} - -\member{wxDocument*}{m\_viewDocument} - -The document associated with this view. There may be more than one view per -document, but there can never be more than one document for one view. - -\membersection{wxView::m\_viewFrame} - -\member{wxFrame*}{m\_viewFrame} - -Frame associated with the view, if any. - -\membersection{wxView::m\_viewTypeName} - -\member{wxString}{m\_viewTypeName} - -The view type name given to the wxDocTemplate constructor, copied to this -variable when the view is created. Not currently used by the framework. - -\membersection{wxView::wxView} - -\func{}{wxView}{\param{wxDocument* }{doc = NULL}} - -Constructor. Define your own default constructor to initialize application-specific -data. - -\membersection{wxView::\destruct{wxView}} - -\func{}{\destruct{wxView}}{\void} - -Destructor. Removes itself from the document's list of views. - -\membersection{wxView::Activate} - -\func{virtual void}{Activate}{\param{bool}{ activate}} - -Call this from your view frame's OnActivate member to tell the framework which view is -currently active. If your windowing system doesn't call OnActivate, you may need to -call this function from OnMenuCommand or any place where you know the view must -be active, and the framework will need to get the current view. - -The prepackaged view frame wxDocChildFrame calls wxView::Activate from its OnActivate member -and from its OnMenuCommand member. - -This function calls wxView::OnActivateView. - -\membersection{wxView::Close} - -\func{virtual bool}{Close}{\param{bool}{ deleteWindow = TRUE}} - -Closes the view by calling OnClose. If {\it deleteWindow} is TRUE, this function should -delete the window associated with the view. - -\membersection{wxView::GetDocument} - -\constfunc{wxDocument*}{GetDocument}{\void} - -Gets a pointer to the document associated with the view. - -\membersection{wxView::GetDocumentManager} - -\constfunc{wxDocumentManager*}{GetDocumentManager}{\void} - -Returns a pointer to the document manager instance associated with this view. - -\membersection{wxView::GetFrame} - -\func{wxFrame *}{GetFrame}{\void} - -Gets the frame associated with the view (if any). - -\membersection{wxView::GetViewName} - -\constfunc{wxString}{GetViewName}{\void} - -Gets the name associated with the view (passed to the wxDocTemplate constructor). -Not currently used by the framework. - -\membersection{wxView::OnActivateView} - -\func{virtual void}{OnActivateView}{\param{bool }{activate}, \param{wxView *}{activeView}, \param{wxView *}{deactiveView}} - -Called when a view is activated by means of wxView::Activate. The default implementation does -nothing. - -\membersection{wxView::OnChangeFilename} - -\func{virtual void}{OnChangeFilename}{\void} - -Called when the filename has changed. The default implementation constructs a -suitable title and sets the title of the view frame (if any). - -\membersection{wxView::OnClose} - -\func{virtual bool}{OnClose}{\param{bool}{ deleteWindow}} - -Implements closing behaviour. The default implementation calls wxDocument::Close -to close the associated document. Does not delete the view. The application -may wish to do some cleaning up operations in this function, {\it if} a -call to wxDocument::Close succeeded. For example, if your application's -all share the same window, you need to disassociate the window from the view -and perhaps clear the window. If {\it deleteWindow} is TRUE, delete the -frame associated with the view. - -\membersection{wxView::OnCreate} - -\func{virtual bool}{OnCreate}{\param{wxDocument* }{doc}, \param{long}{ flags}} - -Called just after view construction to give the view a chance to initialize -itself based on the passed document and flags (unused). By default, simply -returns TRUE. If the function returns FALSE, the view will be deleted. - -The predefined document child frame, wxDocChildFrame, calls this function -automatically. - -\membersection{wxView::OnCreatePrintout} - -\func{virtual wxPrintout*}{OnCreatePrintout}{\void} - -If the printing framework is enabled in the library, this function returns a -\rtfsp\helpref{wxPrintout}{wxprintout} object for the purposes of printing. It should create a new object -everytime it is called; the framework will delete objects it creates. - -By default, this function returns an instance of wxDocPrintout, which prints -and previews one page by calling wxView::OnDraw. - -Override to return an instance of a class other than wxDocPrintout. - -\membersection{wxView::OnUpdate} - -\func{virtual void}{OnUpdate}{\param{wxView* }{sender}, \param{wxObject* }{hint}} - -Called when the view should be updated. {\it sender} is a pointer to the view -that sent the update request, or NULL if no single view requested the update (for instance, -when the document is opened). {\it hint} is as yet unused but may in future contain -application-specific information for making updating more efficient. - -\membersection{wxView::SetDocument} - -\func{void}{SetDocument}{\param{wxDocument* }{doc}} - -Associates the given document with the view. Normally called by the -framework. - -\membersection{wxView::SetFrame} - -\func{void}{SetFrame}{\param{wxFrame* }{frame}} - -Sets the frame associated with this view. The application should call this -if possible, to tell the view about the frame. - -\membersection{wxView::SetViewName} - -\func{void}{SetViewName}{\param{const wxString\& }{name}} - -Sets the view type name. Should only be called by the framework. - - diff --git a/docs/latex/wx/wave.tex b/docs/latex/wx/wave.tex deleted file mode 100644 index b694ab7cad..0000000000 --- a/docs/latex/wx/wave.tex +++ /dev/null @@ -1,64 +0,0 @@ -\section{\class{wxWave}}\label{wxwave} - -This class represents a short wave file, in Windows WAV format, that -can be stored in memory and played. Currently this class is for Windows -only. - -\wxheading{Derived from} - -\helpref{wxObject}{wxobject} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxWave::wxWave}\label{wxwaveconstr} - -\func{}{wxWave}{\void} - -Default constructor. - -\func{}{wxWave}{\param{const wxString\&}{ fileName}, \param{bool}{ isResource = FALSE}} - -Constructs a wave object from a file or resource. Call \helpref{wxWave::IsOk}{wxwaveisok} to -determine whether this succeeded. - -\wxheading{Parameters} - -\docparam{fileName}{The filename or Windows resource.} - -\docparam{isResource}{TRUE if {\it fileName} is a resource, FALSE if it is a filename.} - -\membersection{wxWave::\destruct{wxWave}} - -\func{}{\destruct{wxWave}}{\void} - -Destroys the wxWave object. - -\membersection{wxWave::Create}\label{wxwavecreate} - -\func{bool}{wxWave}{\param{const wxString\&}{ fileName}, \param{bool}{ isResource = FALSE}} - -Constructs a wave object from a file or resource. - -\wxheading{Parameters} - -\docparam{fileName}{The filename or Windows resource.} - -\docparam{isResource}{TRUE if {\it fileName} is a resource, FALSE if it is a filename.} - -\wxheading{Return value} - -TRUE if the call was successful, FALSE otherwise. - -\membersection{wxWave::IsOk}\label{wxwaveisok} - -\constfunc{bool}{IsOk}{\void} - -Returns TRUE if the object contains a successfully loaded file or resource, FALSE otherwise. - -\membersection{wxWave::Play}\label{wxwaveplay} - -\constfunc{bool}{Play}{\param{bool}{ async = TRUE}, \param{bool}{ looped = FALSE}} - -Plays the wave file synchronously or asynchronously, looped or single-shot. - - diff --git a/docs/latex/wx/window.tex b/docs/latex/wx/window.tex deleted file mode 100644 index 438d651f49..0000000000 --- a/docs/latex/wx/window.tex +++ /dev/null @@ -1,1886 +0,0 @@ -\section{\class{wxWindow}}\label{wxwindow} - -wxWindow is the base class for all windows. Any -children of the window will be deleted automatically by the destructor -before the window itself is deleted. - -\wxheading{Derived from} - -\helpref{wxEvtHandler}{wxevthandler}\\ -\helpref{wxObject}{wxobject} - -\wxheading{Window styles} - -The following styles can apply to all windows, although they will not always make sense for a particular -window class. - -\twocolwidtha{5cm}% -\begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxSIMPLE\_BORDER}}{Displays a thin border around the window. wxBORDER is the old name -for this style.} -\twocolitem{\windowstyle{wxDOUBLE\_BORDER}}{Displays a double border. Windows only.} -\twocolitem{\windowstyle{wxSUNKEN\_BORDER}}{Displays a sunken border.} -\twocolitem{\windowstyle{wxRAISED\_BORDER}}{Displays a sunken border.} -\twocolitem{\windowstyle{wxSTATIC\_BORDER}}{Displays a border suitable for a static control.} -\twocolitem{\windowstyle{wxTRANSPARENT\_WINDOW}}{The window is transparent, that is, it will not receive paint -events. Windows only.} -\twocolitem{\windowstyle{wxNO\_3D}}{Prevents the children of this window taking on 3D styles, even though -the application-wide policy is for 3D controls. Windows only.} -\twocolitem{\windowstyle{wxTAB\_TRAVERSAL}}{Use this to enable tab traversal for non-dialog windows.} -\twocolitem{\windowstyle{wxVSCROLL}}{Use this style to enable a vertical scrollbar.} -\twocolitem{\windowstyle{wxHSCROLL}}{Use this style to enable a horizontal scrollbar.} -\twocolitem{\windowstyle{wxCLIP\_CHILDREN}}{Use this style to eliminate flicker caused by the background being -repainted, then children being painted over them. Windows-only.} -\end{twocollist} - -See also \helpref{window styles overview}{windowstyles}. - -\wxheading{See also} - -\helpref{Event handling overview}{eventhandlingoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxWindow::wxWindow} - -\func{}{wxWindow}{\void} - -Default constructor. - -\func{}{wxWindow}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id}, - \param{const wxPoint\& }{pos = wxDefaultPosition}, - \param{const wxSize\& }{size = wxDefaultSize}, - \param{long }{style = 0}, - \param{const wxString\& }{name = wxPanelNameStr}} - -Constructs a window, which can be a child of a frame, dialog or any other non-control window. - -\wxheading{Parameters} - -\docparam{parent}{Pointer to a parent window.} - -\docparam{id}{Window identifier. If -1, will automatically create an identifier.} - -\docparam{pos}{Window position. wxDefaultPosition is (-1, -1) which indicates that wxWindows -should generate a default position for the window. If using the wxWindow class directly, supply -an actual position.} - -\docparam{size}{Window size. wxDefaultSize is (-1, -1) which indicates that wxWindows -should generate a default size for the window.} - -\docparam{style}{Window style. For generic window styles, please see \helpref{wxWindow}{wxwindow}.} - -\docparam{name}{Window name.} - -\membersection{wxWindow::\destruct{wxWindow}} - -\func{}{\destruct{wxWindow}}{\void} - -Destructor. Deletes all subwindows, then deletes itself. Instead of using -the {\bf delete} operator explicitly, you should normally -use \helpref{wxWindow::Destroy}{wxwindowdestroy} so that wxWindows -can delete a window only when it is safe to do so, in idle time. - -\wxheading{See also} - -\helpref{Window deletion overview}{windowdeletionoverview},\rtfsp -\helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow},\rtfsp -\helpref{wxWindow::Destroy}{wxwindowdestroy},\rtfsp -\helpref{wxCloseEvent}{wxcloseevent} - -\membersection{wxWindow::AddChild} - -\func{virtual void}{AddChild}{\param{wxWindow* }{child}} - -Adds a child window. This is called automatically by window creation -functions so should not be required by the application programmer. - -\wxheading{Parameters} - -\docparam{child}{Child window to add.} - -\membersection{wxWindow::CaptureMouse}\label{wxwindowcapturemouse} - -\func{virtual void}{CaptureMouse}{\void} - -Directs all mouse input to this window. Call \helpref{wxWindow::ReleaseMouse}{wxwindowreleasemouse} to -release the capture. - -\wxheading{See also} - -\helpref{wxWindow::ReleaseMouse}{wxwindowreleasemouse} - -\membersection{wxWindow::Center}\label{wxwindowcenter} - -\func{void}{Center}{\param{int}{ direction}} - -A synonym for \helpref{Centre}{wxwindowcentre}. - -\membersection{wxWindow::Centre}\label{wxwindowcentre} - -\func{virtual void}{Centre}{\param{int}{ direction = wxHORIZONTAL}} - -Centres the window. - -\wxheading{Parameters} - -\docparam{direction}{Specifies the direction for the centering. May be {\tt wxHORIZONTAL}, {\tt wxVERTICAL}\rtfsp -or {\tt wxBOTH}.} - -\wxheading{Remarks} - -The actual behaviour depends on the derived window. For a frame or dialog box, -centring is relative to the whole display. For a panel item, centring is -relative to the panel. - -\wxheading{See also} - -\helpref{wxWindow::Center}{wxwindowcenter} - -\membersection{wxWindow::Clear}\label{wxwindowclear} - -\func{void}{Clear}{\void} - -Clears the window by filling it with the current background colour. - -\membersection{wxWindow::ClientToScreen} - -\constfunc{virtual void}{ClientToScreen}{\param{int* }{x}, \param{int* }{y}} - -Converts to screen coordinates from coordinates relative to this window. - -\docparam{x}{A pointer to a integer value for the x coordinate. Pass the client coordinate in, and -a screen coordinate will be passed out.} - -\docparam{y}{A pointer to a integer value for the y coordinate. Pass the client coordinate in, and -a screen coordinate will be passed out.} - -\membersection{wxWindow::Close}\label{wxwindowclose} - -\func{virtual bool}{Close}{\param{const bool}{ force = FALSE}} - -The purpose of this call is to provide a safer way of destroying a window than using -the {\it delete} operator. - -\wxheading{Parameters} - -\docparam{force}{FALSE if the window's close handler should be able to veto the destruction -of this window, TRUE if it cannot.} - -\wxheading{Remarks} - -Close calls the \helpref{close handler}{wxcloseevent} for the window, providing an opportunity for the window to -choose whether to destroy the window. - -The close handler should check whether the window is being deleted forcibly, -using \helpref{wxCloseEvent::GetForce}{wxcloseeventgetforce}, in which case it should -destroy the window using \helpref{wxWindow::Destroy}{wxwindowdestroy}. - -Applies to managed windows (wxFrame and wxDialog classes) only. - -\wxheading{See also} - -\helpref{Window deletion overview}{windowdeletionoverview},\rtfsp -\helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow},\rtfsp -\helpref{wxWindow::Destroy}{wxwindowdestroy},\rtfsp -\helpref{wxCloseEvent}{wxcloseevent} - -\membersection{wxWindow::Destroy}\label{wxwindowdestroy} - -\func{virtual bool}{Destroy}{\void} - -Destroys the window safely. Use this function instead of the delete operator, since -different window classes can be destroyed differently. Frames and dialogs -are not destroyed immediately when this function is called - they are added -to a list of windows to be deleted on idle time, when all the window's events -have been processed. This prevents problems with events being sent to non-existant -windows. - -\wxheading{Return value} - -TRUE if the window has either been successfully deleted, or it has been added -to the list of windows pending real deletion. - -\membersection{wxWindow::DestroyChildren} - -\func{virtual void}{DestroyChildren}{\void} - -Destroys all children of a window. Called automatically by the destructor. - -\membersection{wxWindow::DragAcceptFiles}\label{wxwindowdragacceptfiles} - -\func{virtual void}{DragAcceptFiles}{\param{const bool}{ accept}} - -Enables or disables elibility for drop file events (OnDropFiles). - -\wxheading{Parameters} - -\docparam{accept}{If TRUE, the window is eligible for drop file events. If FALSE, the window -will not accept drop file events.} - -\wxheading{Remarks} - -Windows only. - -\wxheading{See also} - -\helpref{wxWindow::OnDropFiles}{wxwindowondropfiles} - -\membersection{wxWindow::Enable}\label{wxwindowenable} - -\func{virtual void}{Enable}{\param{const bool}{ enable}} - -Enable or disable the window for user input. - -\wxheading{Parameters} - -\docparam{enable}{If TRUE, enables the window for input. If FALSE, disables the window.} - -\wxheading{See also} - -\helpref{wxWindow::IsEnabled}{wxwindowisenabled} - -\membersection{wxWindow::FakePopupMenu}\label{wxwindowfakepopupmenu} - -\func{virtual bool}{FakePopupMenu}{\param{wxMenu* }{menu}, \param{int }{x}, \param{int }{y}} - -A replacement for wxWindow::PopupMenu for cases where the PopupMenu implementation -does not work correctly, in particular on Motif platforms. - -\wxheading{Parameters} - -\docparam{menu}{Menu to pop up.} - -\docparam{x}{Required x position for the menu to appear.} - -\docparam{y}{Required y position for the menu to appear.} - -\wxheading{Remarks} - -This is a cut-down version of PopupMenu using a dialog and listbox; pull-right menus -are not supported. - -\wxheading{See also} - -\helpref{wxMenu}{wxmenu}, \helpref{wxWindow::PopupMenu}{wxwindowpopupmenu} - -\membersection{wxWindow::FindFocus}\label{wxwindowfindfocus} - -\func{static wxWindow*}{FindFocus}{\void} - -Finds the window or control which currently has the keyboard focus. - -\wxheading{Remarks} - -Note that this is a static function, so it can be called without needing a wxWindow pointer. - -\wxheading{See also} - -\helpref{wxWindow::SetFocus}{wxwindowsetfocus} - -\membersection{wxWindow::Fit}\label{wxwindowfit} - -\func{virtual void}{Fit}{\void} - -Sizes the window so that it fits around its subwindows. - -\membersection{wxWindow::GetBackgroundColour}\label{wxwindowgetbackgroundcolour} - -\constfunc{virtual wxColour}{GetBackgroundColour}{\void} - -Returns the background colour of the window. - -\wxheading{See also} - -\helpref{wxWindow::SetBackgroundColour}{wxwindowsetbackgroundcolour},\rtfsp -\helpref{wxWindow::SetForegroundColour}{wxwindowsetforegroundcolour},\rtfsp -\helpref{wxWindow::GetForegroundColour}{wxwindowgetforegroundcolour},\rtfsp -\helpref{wxWindow::OnEraseBackground}{wxwindowonerasebackground} - -\membersection{wxWindow::GetCharHeight} - -\constfunc{virtual int}{GetCharHeight}{\void} - -Returns the character height for this window. - -\membersection{wxWindow::GetCharWidth} - -\constfunc{virtual int}{GetCharWidth}{\void} - -Returns the average character width for this window. - -\membersection{wxWindow::GetChildren} - -\func{wxList*}{GetChildren}{\void} - -Returns a pointer to the list of the window's children. - -\membersection{wxWindow::GetClientSize}\label{wxwindowgetclientsize} - -\constfunc{virtual void}{GetClientSize}{\param{int* }{width}, \param{int* }{height}} - -This gets the size of the window `client area' in pixels. The client area is the -area which may be drawn on by the programmer, excluding title bar, border etc. - -\wxheading{Parameters} - -\docparam{width}{Receives the client width in pixels.} - -\docparam{height}{Receives the client height in pixels.} - -\membersection{wxWindow::GetConstraints}\label{wxwindowgetconstraints} - -\constfunc{wxLayoutConstraints*}{GetConstraints}{\void} - -Returns a pointer to the window's layout constraints, or NULL if there are none. - -\membersection{wxWindow::GetDefaultItem}\label{wxwindowgetdefaultitem} - -\constfunc{wxButton*}{GetDefaultItem}{\void} - -Returns a pointer to the button which is the default for this window, or NULL. - -\membersection{wxWindow::GetEventHandler}\label{wxwindowgeteventhandler} - -\constfunc{wxEvtHandler*}{GetEventHandler}{\void} - -Returns the event handler for this window. By default, the window is its -own event handler. - -\wxheading{See also} - -\helpref{wxWindow::SetEventHandler}{wxwindowseteventhandler},\rtfsp -\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp -\helpref{wxWindow::PopEventHandler}{wxwindowpusheventhandler},\rtfsp -\helpref{wxEvtHandler::ProcessEvent}{wxevthandlerprocessevent},\rtfsp -\helpref{wxEvtHandler}{wxevthandler}\rtfsp - -\membersection{wxWindow::GetFont}\label{wxwindowgetfont} - -\constfunc{wxFont*}{GetFont}{\void} - -Returns a pointer to the font for this window. - -\wxheading{See also} - -\helpref{wxWindow::SetFont}{wxwindowsetfont} - -\membersection{wxWindow::GetForegroundColour}\label{wxwindowgetforegroundcolour} - -\func{virtual wxColour}{GetForegroundColour}{\void} - -Returns the foreground colour of the window. - -\wxheading{Remarks} - -The interpretation of foreground colour is open to interpretation according -to the window class; it may be the text colour or other colour, or it may not -be used at all. - -\wxheading{See also} - -\helpref{wxWindow::SetForegroundColour}{wxwindowsetforegroundcolour},\rtfsp -\helpref{wxWindow::SetBackgroundColour}{wxwindowsetbackgroundcolour},\rtfsp -\helpref{wxWindow::GetBackgroundColour}{wxwindowgetbackgroundcolour} - -\membersection{wxWindow::GetGrandParent} - -\constfunc{wxWindow*}{GetGrandParent}{\void} - -Returns the grandparent of a window, or NULL if there isn't one. - -\membersection{wxWindow::GetHandle} - -\constfunc{void*}{GetHandle}{\void} - -Returns the platform-specific handle of the physical window. Cast it to an appropriate -handle, such as {\bf HWND} for Windows or {\bf Widget} for Motif. - -\membersection{wxWindow::GetId}\label{wxwindowgetid} - -\constfunc{int}{GetId}{\void} - -Returns the identifier of the window. - -\wxheading{Remarks} - -Each window has an integer identifier. If the application has not provided one, -an identifier will be generated. - -TODO: perhaps there should be a default identifier for each class, rather -choosing one, which could clash with other ones. - -\wxheading{See also} - -\helpref{wxWindow::SetId}{wxwindowsetid} - -\membersection{wxWindow::GetPosition} - -\constfunc{virtual void}{GetPosition}{\param{int* }{x}, \param{int* }{y}} - -This gets the position of the window in pixels, relative to the parent window or -if no parent, relative to the whole display. - -\wxheading{Parameters} - -\docparam{x}{Receives the x position of the window.} - -\docparam{y}{Receives the y position of the window.} - -\membersection{wxWindow::GetLabel} - -\constfunc{virtual wxString\& }{GetLabel}{\void} - -Generic way of getting a label from any window, for -identification purposes. - -\wxheading{Remarks} - -The interpretation of this function differs from class to class. -For frames and dialogs, the value returned is the title. For buttons or static text controls, it is -the button text. This function can be useful for meta-programs (such as testing -tools or special-needs access programs) which need to identify windows -by name. - -\membersection{wxWindow::GetName}\label{wxwindowgetname} - -\constfunc{virtual wxString\& }{GetName}{\void} - -Returns the window's name. - -\wxheading{Remarks} - -This name is not guaranteed to be unique; it is up to the programmer to supply an appropriate -name in the window constructor or via \helpref{wxWindow::SetName}{wxwindowsetname}. - -\wxheading{See also} - -\helpref{wxWindow::SetName}{wxwindowsetname} - -\membersection{wxWindow::GetParent} - -\constfunc{virtual wxWindow*}{GetParent}{\void} - -Returns the parent of the window, or NULL if there is no parent. - -\membersection{wxWindow::GetReturnCode}\label{wxwindowgetreturncode} - -\func{int}{GetReturnCode}{\void} - -Gets the return code for this window. - -\wxheading{Remarks} - -A return code is normally associated with a modal dialog, where \helpref{wxDialog::ShowModal}{wxdialogshowmodal} returns -a code to the application. - -\wxheading{See also} - -\helpref{wxWindow::SetReturnCode}{wxwindowsetreturncode}, \helpref{wxDialog::ShowModal}{wxdialogshowmodal},\rtfsp -\helpref{wxDialog::EndModal}{wxdialogendmodal} - -\membersection{wxWindow::GetScrollThumb}\label{wxwindowgetscrollthumb} - -\func{virtual int}{GetScrollThumb}{\param{int }{orientation}} - -Returns the built-in scrollbar thumb size. - -\wxheading{See also} - -\helpref{wxWindow::SetScrollbar}{wxwindowsetscrollbar} - -\membersection{wxWindow::GetScrollPos}\label{wxwindowgetscrollpos} - -\func{virtual int}{GetScrollPos}{\param{int }{orientation}} - -Returns the built-in scrollbar position. - -\wxheading{See also} - -See \helpref{wxWindow::SetScrollbar}{wxwindowsetscrollbar} - -\membersection{wxWindow::GetScrollRange}\label{wxwindowgetscrollrange} - -\func{virtual int}{GetScrollRange}{\param{int }{orientation}} - -Returns the built-in scrollbar range. - -\wxheading{See also} - -\helpref{wxWindow::SetScrollbar}{wxwindowsetscrollbar} - -\membersection{wxWindow::GetSize} - -\constfunc{virtual void}{GetSize}{\param{int* }{width}, \param{int* }{height}} - -This gets the size of the entire window in pixels. - -\wxheading{Parameters} - -\docparam{width}{Receives the window width.} - -\docparam{height}{Receives the window height.} - -\membersection{wxWindow::GetTextExtent} - -\constfunc{virtual void}{GetTextExtent}{\param{const wxString\& }{string}, \param{int* }{x}, \param{int* }{y}, - \param{int* }{descent = NULL}, \param{int* }{externalLeading = NULL}, - \param{const wxFont* }{font = NULL}, \param{const bool}{ use16 = FALSE}} - -Gets the dimensions of the string as it would be drawn on the -window with the currently selected font. - -\wxheading{Parameters} - -\docparam{string}{String whose extent is to be measured.} - -\docparam{x}{Return value for width.} - -\docparam{y}{Return value for height.} - -\docparam{descent}{Return value for descent (optional).} - -\docparam{externalLeading}{Return value for external leading (optional).} - -\docparam{font}{Font to use instead of the current window font (optional).} - -\docparam{use16}{If TRUE, {\it string} contains 16-bit characters. The default is FALSE.} - -\membersection{wxWindow::GetTitle}\label{wxwindowgettitle} - -\func{virtual wxString}{GetTitle}{\void} - -Gets the window's title. Applicable only to frames and dialogs. - -\wxheading{See also} - -\helpref{wxWindow::SetTitle}{wxwindowsettitle} - -\membersection{wxWindow::GetWindowStyleFlag} - -\constfunc{long}{GetWindowStyleFlag}{\void} - -Gets the window style that was passed to the consructor or {\bf Create} member. - -\membersection{wxWindow::InitDialog}\label{wxwindowinitdialog} - -\func{void}{InitDialog}{\void} - -Sends an \helpref{wxWindow::OnInitDialog}{wxwindowoninitdialog} event, which -in turn transfers data to the dialog via validators. - -\wxheading{See also} - -\helpref{wxWindow::OnInitDialog}{wxwindowoninitdialog} - -\membersection{wxWindow::IsEnabled}\label{wxwindowisenabled} - -\constfunc{virtual bool}{IsEnabled}{\void} - -Returns TRUE if the window is enabled for input, FALSE otherwise. - -\wxheading{See also} - -\helpref{wxWindow::Enable}{wxwindowenable} - -\membersection{wxWindow::IsRetained}\label{wxwindowisretained} - -\constfunc{virtual bool}{IsRetained}{\void} - -Returns TRUE if the window is retained, FALSE otherwise. - -\wxheading{Remarks} - -Retained windows are only available on X platforms. - -\membersection{wxWindow::IsShown}\label{wxwindowisshown} - -\constfunc{virtual bool}{IsShown}{\void} - -Returns TRUE if the window is shown, FALSE if it has been hidden. - -\membersection{wxWindow::Layout}\label{wxwindowlayout} - -\func{void}{Layout}{\void} - -Invokes the constraint-based layout algorithm for this window. It is called -automatically by the default {\bf wxWindow::OnSize} member. - -\membersection{wxWindow::LoadFromResource}\label{wxwindowloadfromresource} - -\func{virtual bool}{LoadFromResource}{\param{wxWindow* }{parent},\rtfsp -\param{const wxString\& }{resourceName}, \param{const wxResourceTable* }{resourceTable = NULL}} - -Loads a panel or dialog from a resource file. - -\wxheading{Parameters} - -\docparam{parent}{Parent window.} - -\docparam{resourceName}{The name of the resource to load.} - -\docparam{resourceTable}{The resource table to load it from. If this is NULL, the -default resource table will be used.} - -\wxheading{Return value} - -TRUE if the operation succeeded, otherwise FALSE. - -\wxheading{Remarks} - -TODO - -\wxheading{See also} - -TODO - -\membersection{wxWindow::Lower}\label{wxwindowlower} - -\func{void}{Lower}{\void} - -Lowers the window to the bottom of the window hierarchy if it is a managed window (dialog -or frame). - -\membersection{wxWindow::MakeModal}\label{wxwindowmakemodal} - -\func{virtual void}{MakeModal}{\param{const bool }{flag}} - -Disables all other windows in the application so that -the user can only interact with this window. - -\wxheading{Parameters} - -\docparam{flag}{If TRUE, this call disables all other windows in the application so that -the user can only interact with this window. If FALSE, the effect is reversed.} - -\membersection{wxWindow::Move}\label{wxwindowmove} - -\func{void}{Move}{\param{int}{ x}, \param{int}{ y}} - -Moves the window to the given position. - -\wxheading{Parameters} - -\docparam{x}{Required x position.} - -\docparam{y}{Required y position.} - -\wxheading{Remarks} - -Implementations of SetSize can also implicitly implement the -wxWindow::Move function, which is defined in the base wxWindow class -as the call: - -\begin{verbatim} - SetSize(x, y, -1, -1, wxSIZE_USE_EXISTING); -\end{verbatim} - -\wxheading{See also} - -\helpref{wxWindow::SetSize}{wxwindowsetsize} - -\membersection{wxWindow::OnActivate}\label{wxwindowonactivate} - -\func{void}{OnActivate}{\param{wxActivateEvent\&}{ event}} - -Called when a window is activated or deactivated. - -\wxheading{Parameters} - -\docparam{event}{Object containing activation information.} - -\wxheading{Remarks} - -If the window is being activated, \helpref{wxActivateEvent::GetActive}{wxactivateeventgetactive} returns TRUE, -otherwise it returns FALSE (it is being deactivated). - -\wxheading{See also} - -\helpref{wxActivateEvent}{wxactivateevent},\rtfsp -\helpref{Event handling overview}{eventhandlingoverview} - -\membersection{wxWindow::OnChar}\label{wxwindowonchar} - -\func{void}{OnChar}{\param{wxKeyEvent\&}{ event}} - -Called when the user has pressed a key. - -\wxheading{Parameters} - -\docparam{event}{Object containing keypress information. See \helpref{wxKeyEvent}{wxkeyevent} for -details about this class.} - -\wxheading{Remarks} - -This member function is called in response to a keypress. To intercept this event, -use the EVT\_CHAR macro in an event table definition. Your {\bf OnChar} handler may call this -default function to achieve default keypress functionality. - -Note that the ASCII values do not have explicit key codes: they are passed as ASCII -values. - -Most, but not all, windows allow keypresses to be intercepted. - -\wxheading{See also} - -\helpref{wxKeyEvent}{wxkeyevent}, \helpref{wxWindow::OnCharHook}{wxwindowoncharhook},\rtfsp -\helpref{Event handling overview}{eventhandlingoverview} - -\membersection{wxWindow::OnCharHook}\label{wxwindowoncharhook} - -\func{void}{OnCharHook}{\param{wxKeyEvent\&}{ event}} - -This member is called to allow the window to intercept keyboard events -before they are processed by child windows. - -\wxheading{Parameters} - -\docparam{event}{Object containing keypress information. See \helpref{wxKeyEvent}{wxkeyevent} for -details about this class.} - -\wxheading{Remarks} - -This member function is called in response to a keypress, if the window is active. To intercept this event, -use the EVT\_CHAR\_HOOK macro in an event table definition. If you do not process a particular -keypress, call \helpref{wxEvent::Skip}{wxeventskip} to allow default processing. - -An example of using this function is in the implementation of escape-character processing for wxDialog, -where pressing ESC dismisses the dialog by {\bf OnCharHook} 'forging' a cancel button press event. - -Note that the ASCII values do not have explicit key codes: they are passed as ASCII -values. - -This function is only relevant to top-level windows (frames and dialogs), and under -Windows only. - -\wxheading{See also} - -\helpref{wxKeyEvent}{wxkeyevent}, \helpref{wxWindow::OnCharHook}{wxwindowoncharhook},\rtfsp -\helpref{wxApp::OnCharHook}{wxapponcharhook},\rtfsp -\helpref{Event handling overview}{eventhandlingoverview} - -\membersection{wxWindow::OnCommand}\label{wxwindowoncommand} - -\func{virtual void}{OnCommand}{\param{wxEvtHandler\& }{object}, \param{wxCommandEvent\& }{event}} - -This virtual member function is called if the control does not handle the command event. - -\wxheading{Parameters} - -\docparam{object}{Object receiving the command event.} - -\docparam{event}{Command event} - -\wxheading{Remarks} - -This virtual function is provided mainly for backward compatibility. You can also intercept commands -from child controls by using an event table, with identifiers or identifier ranges to identify -the control(s) in question. - -\wxheading{See also} - -\helpref{wxCommandEvent}{wxcommandevent},\rtfsp -\helpref{Event handling overview}{eventhandlingoverview} - -\membersection{wxWindow::OnClose}\label{wxwindowonclose} - -\func{virtual bool}{OnClose}{\void} - -Called when the user has tried to close a a frame -or dialog box using the window manager (X) or system menu (Windows). - -{\bf Note:} This is an obsolete function retained for backward compatibility. -It is superceded by the \helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow} event -handler. - -\wxheading{Return value} - -If TRUE is returned by OnClose, the window will be deleted by the system, otherwise the -attempt will be ignored. Do not delete the window from within this handler, although -you may delete other windows. - -\wxheading{Remarks} - -Derive your own class to handle this message. The default handler returns FALSE. - -\wxheading{See also} - -\helpref{Window deletion overview}{windowdeletionoverview},\rtfsp -\helpref{wxWindow::Close}{wxwindowclose},\rtfsp -\helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow},\rtfsp -\helpref{wxCloseEvent}{wxcloseevent} - -\membersection{wxWindow::OnCloseWindow}\label{wxwindowonclosewindow} - -\func{void}{OnCloseWindow}{\param{wxCloseEvent\& }{event}} - -This is an event handler function called when the user has tried to close a a frame -or dialog box using the window manager (X) or system menu (Windows). It is -called via the \helpref{wxWindow::Close}{wxwindowclose} function, so -that the application can also invoke the handler programmatically. - -Use the EVT\_CLOSE event table macro to handle close events. - -You should check whether the application is forcing the deletion of the window -using \helpref{wxCloseEvent::GetForce}{wxcloseeventgetforce}. If this is TRUE, -destroy the window using \helpref{wxWindow::Destroy}{wxwindowdestroy}. -If not, it is up to you whether you respond by destroying the window. - -\wxheading{Remarks} - -The \helpref{wxWindow::OnClose}{wxwindowonclose} virtual function remains -for backward compatibility with earlier versions of wxWindows. The -default {\bf OnCloseWindow} handler for wxFrame and wxDialog will call {\bf OnClose}, -destroying the window if it returns TRUE or if the close is being forced. - -\wxheading{See also} - -\helpref{Window deletion overview}{windowdeletionoverview},\rtfsp -\helpref{wxWindow::Close}{wxwindowclose},\rtfsp -\helpref{wxWindow::OnClose}{wxwindowonclose},\rtfsp -\helpref{wxWindow::Destroy}{wxwindowdestroy},\rtfsp -\helpref{wxCloseEvent}{wxcloseevent} - -\membersection{wxWindow::OnDropFiles}\label{wxwindowondropfiles} - -\func{void}{OnDropFiles}{\param{wxDropFilesEvent\&}{ event}} - -Called when files have been dragged from the file manager to the window. - -\wxheading{Parameters} - -\docparam{event}{Drop files event. For more information, see \helpref{wxDropFilesEvent}{wxdropfilesevent}.} - -\wxheading{Remarks} - -The window must have previously been enabled for dropping by calling -\rtfsp\helpref{wxWindow::DragAcceptFiles}{wxwindowdragacceptfiles}. - -This event is only generated under Windows. - -To intercept this event, use the EVT\_DROP\_FILES macro in an event table definition. - -\wxheading{See also} - -\helpref{wxDropFilesEvent}{wxdropfilesevent}, \helpref{wxWindow::DragAcceptFiles}{wxwindowdragacceptfiles},\rtfsp -\helpref{Event handling overview}{eventhandlingoverview} - -\membersection{wxWindow::OnEraseBackground}\label{wxwindowonerasebackground} - -\func{void}{OnEraseBackground}{\param{wxEraseEvent\&}{ event}} - -Called when the background of the window needs to be erased. - -\wxheading{Parameters} - -\docparam{event}{Erase background event. For more information, see \helpref{wxEraseEvent}{wxeraseevent}.} - -\wxheading{Remarks} - -This event is only generated under Windows. - -To intercept this event, use the EVT\_ERASE\_BACKGROUND macro in an event table definition. - -\wxheading{See also} - -\helpref{wxEraseEvent}{wxeraseevent}, \helpref{Event handling overview}{eventhandlingoverview} - -\membersection{wxWindow::OnKillFocus}\label{wxwindowonkillfocus} - -\func{void}{OnKillFocus}{\param{wxFocusEvent\& }{event}} - -Called when a window's focus is being killed. - -\wxheading{Parameters} - -\docparam{event}{The focus event. For more information, see \helpref{wxFocusEvent}{wxfocusevent}.} - -\wxheading{Remarks} - -To intercept this event, use the macro EVT\_KILL\_FOCUS in an event table definition. - -Most, but not all, windows respond to this event. - -\wxheading{See also} - -\helpref{wxFocusEvent}{wxfocusevent}, \helpref{wxWindow::OnSetFocus}{wxwindowonsetfocus},\rtfsp -\helpref{Event handling overview}{eventhandlingoverview} - -\membersection{wxWindow::OnIdle}\label{wxwindowonidle} - -\func{void}{Onidle}{\param{wxIdleEvent\& }{event}} - -Provide this member function for any processing which needs to be done -when the application is idle. - -\wxheading{See also} - -\helpref{wxApp::OnIdle}{wxapponidle}, \helpref{wxIdleEvent}{wxidleevent} - -\membersection{wxWindow::OnInitDialog}\label{wxwindowoninitdialog} - -\func{void}{OnInitDialog}{\param{wxInitDialogEvent\&}{ event}} - -Default handler for the wxEVT\_INIT\_DIALOG event. Calls \helpref{wxWindow::TransferDataToWindow}{wxwindowtransferdatatowindow}. - -\wxheading{Parameters} - -\docparam{event}{Dialog initialisation event.} - -\wxheading{Remarks} - -Gives the window the default behaviour of transferring data to child controls via -the validator that each control has. - -\wxheading{See also} - -\helpref{wxValidator}{wxvalidator}, \helpref{wxWindow::TransferDataToWindow}{wxwindowtransferdatatowindow} - -\membersection{wxWindow::OnMenuCommand}\label{wxwindowonmenucommand} - -\func{void}{OnMenuCommand}{\param{wxCommandEvent\& }{event}} - -Called when a menu command is received from a menu bar. - -\wxheading{Parameters} - -\docparam{event}{The menu command event. For more information, see \helpref{wxCommandEvent}{wxcommandevent}.} - -\wxheading{Remarks} - -A function with this name doesn't actually exist; you can choose any member function to receive -menu command events, using the EVT\_COMMAND macro for individual commands or EVT\_COMMAND\_RANGE for -a range of commands. - -\wxheading{See also} - -\helpref{wxCommandEvent}{wxcommandevent},\rtfsp -\helpref{wxWindow::OnMenuHighlight}{wxwindowonmenuhighlight},\rtfsp -\helpref{Event handling overview}{eventhandlingoverview} - -\membersection{wxWindow::OnMenuHighlight}\label{wxwindowonmenuhighlight} - -\func{void}{OnMenuHighlight}{\param{wxMenuEvent\& }{event}} - -Called when a menu select is received from a menu bar: that is, the -mouse cursor is over a menu item, but the left mouse button has not been -pressed. - -\wxheading{Parameters} - -\docparam{event}{The menu highlight event. For more information, see \helpref{wxMenuEvent}{wxmenuevent}.} - -\wxheading{Remarks} - -You can choose any member function to receive -menu select events, using the EVT\_MENU\_HIGHLIGHT macro for individual menu items or EVT\_MENU\_HIGHLIGHT\_ALL macro -for all menu items. - -The default implementation for \helpref{wxFrame::OnMenuHighlight}{wxframeonmenuhighlight} displays help -text in the first field of the status bar. - -This function was known as {\bf OnMenuSelect} in earlier versions of wxWindows, but this was confusing -since a selection is normally a left-click action. - -\wxheading{See also} - -\helpref{wxMenuEvent}{wxmenuevent},\rtfsp -\helpref{wxWindow::OnMenuCommand}{wxwindowonmenucommand},\rtfsp -\helpref{Event handling overview}{eventhandlingoverview} - - -\membersection{wxWindow::OnMouseEvent}\label{wxwindowonmouseevent} - -\func{void}{OnMouseEvent}{\param{wxMouseEvent\&}{ event}} - -Called when the user has initiated an event with the -mouse. - -\wxheading{Parameters} - -\docparam{event}{The mouse event. See \helpref{wxMouseEvent}{wxmouseevent} for -more details.} - -\wxheading{Remarks} - -Most, but not all, windows respond to this event. - -To intercept this event, use the EVT\_MOUSE\_EVENTS macro in an event table definition, or individual -mouse event macros such as EVT\_LEFT\_DOWN. - -\wxheading{See also} - -\helpref{wxMouseEvent}{wxmouseevent},\rtfsp -\helpref{Event handling overview}{eventhandlingoverview} - -\membersection{wxWindow::OnMove}\label{wxwindowonmove} - -\func{void}{OnMove}{\param{wxMoveEvent\& }{event}} - -Called when a window is moved. - -\wxheading{Parameters} - -\docparam{event}{The move event. For more information, see \helpref{wxMoveEvent}{wxmoveevent}.} - -\wxheading{Remarks} - -Use the EVT\_MOVE macro to intercept move events. - -\wxheading{Remarks} - -Not currently implemented. - -\wxheading{See also} - -\helpref{wxMoveEvent}{wxmoveevent},\rtfsp -\helpref{wxFrame::OnSize}{wxframeonsize},\rtfsp -\helpref{Event handling overview}{eventhandlingoverview} - -\membersection{wxWindow::OnPaint}\label{wxwindowonpaint} - -\func{void}{OnPaint}{\param{wxPaintEvent\& }{event}} - -Sent to the event handler when the window must be refreshed. - -\wxheading{Parameters} - -\docparam{event}{Paint event. For more information, see \helpref{wxPaintEvent}{wxpaintevent}.} - -\wxheading{Remarks} - -Use the EVT\_PAINT macro in an event table definition to intercept paint events. - -In a paint event handler, the application should always create a \helpref{wxPaintDC}{wxpaintdc} object. - -For example: - -\small{% -\begin{verbatim} - void MyWindow::OnPaint(wxPaintEvent& event) - { - wxPaintDC dc(this); - - DrawMyDocument(dc); - } -\end{verbatim} -}% - -You can optimize painting by retrieving the rectangles -that have been damaged and only repainting these. The rectangles are in -terms of the client area, and are unscrolled, so you will need to do -some calculations using the current view position to obtain logical, -scrolled units. - -Here is an example of using the \helpref{wxUpdateIterator}{wxupdateiterator} class: - -{\small% -\begin{verbatim} -// Called when window needs to be repainted. -void MyWindow::OnPaint(wxPaintEvent& event) -{ - wxPaintDC dc(this); - - // Find Out where the window is scrolled to - int vbX,vbY; // Top left corner of client - ViewStart(&vbX,&vbY); - - int vX,vY,vW,vH; // Dimensions of client area in pixels - wxUpdateIterator upd(this); // get the update rect list - - while (upd) - { - vX = upd.GetX(); - vY = upd.GetY(); - vW = upd.GetW(); - vH = upd.GetH(); - - // Alternatively we can do this: - // wxRect rect; - // upd.GetRect(&rect); - - // Repaint this rectangle - ...some code... - - upd ++ ; - } -} -\end{verbatim} -}% - -\wxheading{See also} - -\helpref{wxPaintEvent}{wxpaintevent},\rtfsp -\helpref{wxPaintDC}{wxpaintdc},\rtfsp -\helpref{Event handling overview}{eventhandlingoverview} - -\membersection{wxWindow::OnScroll}\label{wxwindowonscroll} - -\func{void}{OnScroll}{\param{wxScrollEvent\& }{event}} - -Called when a scroll event is received from one of the window's built-in scrollbars. - -\wxheading{Parameters} - -\docparam{event}{Command event. Retrieve the new scroll position by -calling \helpref{wxScrollEvent::GetPosition}{wxscrolleventgetposition}, and the -scrollbar orientation by calling \helpref{wxScrollEvent::GetOrientation}{wxscrolleventgetorientation}.} - -\wxheading{Remarks} - -Note that it is not possible to distinguish between horizontal and vertical scrollbars -until the function is executing (you can't have one function for vertical, another -for horizontal events). - -\wxheading{See also} - -\helpref{wxScrollEvent}{wxscrollevent},\rtfsp -\helpref{Event handling overview}{eventhandlingoverview} - -\membersection{wxWindow::OnSetFocus}\label{wxwindowonsetfocus} - -\func{void}{OnSetFocus}{\param{wxFocusEvent\& }{event}} - -Called when a window's focus is being set. - -\wxheading{Parameters} - -\docparam{event}{The focus event. For more information, see \helpref{wxFocusEvent}{wxfocusevent}.} - -\wxheading{Remarks} - -To intercept this event, use the macro EVT\_SET\_FOCUS in an event table definition. - -Most, but not all, windows respond to this event. - -\wxheading{See also} - -\helpref{wxFocusEvent}{wxfocusevent}, \helpref{wxWindow::OnKillFocus}{wxwindowonkillfocus},\rtfsp -\helpref{Event handling overview}{eventhandlingoverview} - -\membersection{wxWindow::OnSize}\label{wxwindowonsize} - -\func{void}{OnSize}{\param{wxSizeEvent\& }{event}} - -Called when the window has been resized. - -\wxheading{Parameters} - -\docparam{event}{Size event. For more information, see \helpref{wxSizeEvent}{wxsizeevent}.} - -\wxheading{Remarks} - -You may wish to use this for frames to resize their child windows as appropriate. - -Note that the size passed is of -the whole window: call \helpref{wxWindow::GetClientSize}{wxwindowgetclientsize} for the area which may be -used by the application. - -\wxheading{See also} - -\helpref{wxSizeEvent}{wxsizeevent},\rtfsp -\helpref{Event handling overview}{eventhandlingoverview} - -\membersection{wxWindow::OnSysColourChanged}\label{wxwindowonsyscolourchanged} - -\func{void}{OnSysColourChanged}{\param{wxOnSysColourChangedEvent\& }{event}} - -Called when the user has changed the system colours. - -\wxheading{Parameters} - -\docparam{event}{System colour change event. For more information, see \helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent}.} - -\wxheading{See also} - -\helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent},\rtfsp -\helpref{Event handling overview}{eventhandlingoverview} - -\membersection{wxWindow::PopEventHandler}\label{wxwindowpopeventhandler} - -\constfunc{wxEvtHandler*}{PopEventHandler}{\param{bool }{deleteHandler = FALSE}} - -Removes and returns the top-most event handler on the event handler stack. - -\wxheading{Parameters} - -\docparam{deleteHandler}{If this is TRUE, the handler will be deleted after it is removed. The -default value is FALSE.} - -\wxheading{See also} - -\helpref{wxWindow::SetEventHandler}{wxwindowseteventhandler},\rtfsp -\helpref{wxWindow::GetEventHandler}{wxwindowgeteventhandler},\rtfsp -\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp -\helpref{wxEvtHandler::ProcessEvent}{wxevthandlerprocessevent},\rtfsp -\helpref{wxEvtHandler}{wxevthandler}\rtfsp - -\membersection{wxWindow::PopupMenu}\label{wxwindowpopupmenu} - -\func{virtual bool}{PopupMenu}{\param{wxMenu* }{menu}, \param{int }{x}, \param{int }{y}} - -Pops up the given menu at the specified coordinates, relative to this -window, and returns control when the user has dismissed the menu. If a -menu item is selected, the callback defined for the menu is called with -wxMenu and wxCommandEvent reference arguments. The callback should access -the commandInt member of the event to check the selected menu identifier. - -\wxheading{Parameters} - -\docparam{menu}{Menu to pop up.} - -\docparam{x}{Required x position for the menu to appear.} - -\docparam{y}{Required y position for the menu to appear.} - -\wxheading{See also} - -\helpref{wxMenu}{wxmenu}, \helpref{wxWindow::FakePopupMenu}{wxwindowfakepopupmenu} - -\membersection{wxWindow::PushEventHandler}\label{wxwindowpusheventhandler} - -\func{void}{PushEventHandler}{\param{wxEvtHandler* }{handler}} - -Pushes this event handler onto the event stack for the window. - -\wxheading{Parameters} - -\docparam{handler}{Specifies the handler to be pushed.} - -\wxheading{Remarks} - -An event handler is an object that is capable of processing the events -sent to a window. By default, the window is its own event handler, but -an application may wish to substitute another, for example to allow -central implementation of event-handling for a variety of different -window classes. - -\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler} allows -an application to set up a chain of event handlers, where an event not handled by one event handler is -handed to the next one in the chain. Use \helpref{wxWindow::PopEventHandler}{wxwindowpopeventhandler} to -remove the event handler. - -\wxheading{See also} - -\helpref{wxWindow::SetEventHandler}{wxwindowseteventhandler},\rtfsp -\helpref{wxWindow::GetEventHandler}{wxwindowgeteventhandler},\rtfsp -\helpref{wxWindow::PopEventHandler}{wxwindowpusheventhandler},\rtfsp -\helpref{wxEvtHandler::ProcessEvent}{wxevthandlerprocessevent},\rtfsp -\helpref{wxEvtHandler}{wxevthandler} - -\membersection{wxWindow::Raise}\label{wxwindowraise} - -\func{void}{Raise}{\void} - -Raises the window to the top of the window hierarchy if it is a managed window (dialog -or frame). - -\membersection{wxWindow::Refresh}\label{wxwindowrefresh} - -\func{virtual void}{Refresh}{\param{const bool}{ eraseBackground = TRUE}, \param{const wxRect* }{rect -= NULL}} - -Causes a message or event to be generated to repaint the -window. - -\wxheading{Parameters} - -\docparam{eraseBackground}{If TRUE, the background will be -erased.} - -\docparam{rect}{If non-NULL, only the given rectangle will -be treated as damaged.} - -\membersection{wxWindow::ReleaseMouse}\label{wxwindowreleasemouse} - -\func{virtual void}{ReleaseMouse}{\void} - -Releases mouse input captured with \helpref{wxWindow::CaptureMouse}{wxwindowcapturemouse}. - -\wxheading{See also} - -\helpref{wxWindow::CaptureMouse}{wxwindowcapturemouse} - -\membersection{wxWindow::RemoveChild}\label{wxwindowremovechild} - -\func{virtual void}{RemoveChild}{\param{wxWindow* }{child}} - -Removes a child window. This is called automatically by window deletion -functions so should not be required by the application programmer. - -\wxheading{Parameters} - -\docparam{child}{Child window to remove.} - -\membersection{wxWindow::ScreenToClient} - -\constfunc{virtual void}{ScreenToClient}{\param{int* }{x}, \param{int* }{y}} - -Converts from screen to client window coordinates. - -\wxheading{Parameters} - -\docparam{x}{Stores the screen x coordinate and receives the client x coordinate.} - -\docparam{y}{Stores the screen x coordinate and receives the client x coordinate.} - -\membersection{wxWindow::ScrollWindow}\label{wxwindowscrollwindow} - -\func{virtual void}{ScrollWindow}{\param{int }{dx}, \param{int }{dy}, \param{const wxRect*}{ rect = NULL}} - -Physically scrolls the pixels in the window. - -\wxheading{Parameters} - -\docparam{dx}{Amount to scroll horizontally.} - -\docparam{dy}{Amount to scroll vertically.} - -\docparam{rect}{Rectangle to invalidate. If this is NULL, the whole window is invalidated. If you -pass a rectangle corresponding to the area of the window exposed by the scroll, your painting handler -can optimise painting by checking for the invalidated region.} - -\wxheading{Remarks} - -Available only under Windows. - -Use this function to optimise your scrolling implementations, to minimise the area that must be -redrawn. - -\membersection{wxWindow::SetAutoLayout}\label{wxwindowsetautolayout} - -\func{void}{SetAutoLayout}{\param{const bool}{ autoLayout}} - -Determines whether the \helpref{wxWindow::Layout}{wxwindowlayout} function will -be called automatically when the window is resized. - -\wxheading{Parameters} - -\docparam{autoLayout}{Set this to TRUE if you wish the Layout function to be called -from within wxWindow::OnSize functions.} - -\wxheading{See also} - -\helpref{wxWindow::SetConstraints}{wxwindowsetconstraints} - -\membersection{wxWindow::SetBackgroundColour}\label{wxwindowsetbackgroundcolour} - -\func{virtual void}{SetBackgroundColour}{\param{const wxColour\& }{colour}} - -Sets the background colour of the window. - -\wxheading{Parameters} - -\docparam{colour}{The colour to be used as the background colour.} - -\wxheading{Remarks} - -The background colour is usually painted by the default\rtfsp -\helpref{wxWindow::OnEraseBackground}{wxwindowonerasebackground} event handler function. - -\wxheading{See also} - -\helpref{wxWindow::GetBackgroundColour}{wxwindowgetbackgroundcolour},\rtfsp -\helpref{wxWindow::SetForegroundColour}{wxwindowsetforegroundcolour},\rtfsp -\helpref{wxWindow::GetForegroundColour}{wxwindowgetforegroundcolour},\rtfsp -\helpref{wxWindow::OnEraseBackground}{wxwindowonerasebackground} - -\membersection{wxWindow::SetConstraints}\label{wxwindowsetconstraints} - -\func{void}{SetConstraints}{\param{wxLayoutConstraints* }{constraints}} - -Sets the window to have the given layout constraints. The window -will then own the object, and will take care of its deletion. -If an existing layout constraints object is already owned by the -window, it will be deleted. - -\wxheading{Parameters} - -\docparam{constraints}{The constraints to set. Pass NULL to disassociate and delete the window's -constraints.} - -\wxheading{Remarks} - -You must call \helpref{wxWindow::SetAutoLayout}{wxwindowsetautolayout} to tell a window to use -the constraints automatically in OnSize; otherwise, you must -override OnSize and call Layout explicitly. - -\membersection{wxWindow::SetFocus}\label{wxwindowsetfocus} - -\func{virtual void}{SetFocus}{\void} - -This sets the window to receive keyboard input. - -\membersection{wxWindow::SetFont}\label{wxwindowsetfont} - -\func{void}{SetFont}{\param{const wxFont\& }{font}} - -Sets the font for this window. - -\wxheading{Parameters} - -\docparam{font}{Font to associate with this window.} - -\wxheading{See also} - -\helpref{wxWindow::GetFont}{wxwindowgetfont} - -\membersection{wxWindow::SetForegroundColour}\label{wxwindowsetforegroundcolour} - -\func{virtual void}{SetForegroundColour}{\param{const wxColour\& }{colour}} - -Sets the foreground colour of the window. - -\wxheading{Parameters} - -\docparam{colour}{The colour to be used as the foreground colour.} - -\wxheading{Remarks} - -The interpretation of foreground colour is open to interpretation according -to the window class; it may be the text colour or other colour, or it may not -be used at all. - -\wxheading{See also} - -\helpref{wxWindow::GetForegroundColour}{wxwindowgetforegroundcolour},\rtfsp -\helpref{wxWindow::SetBackgroundColour}{wxwindowsetbackgroundcolour},\rtfsp -\helpref{wxWindow::GetBackgroundColour}{wxwindowgetbackgroundcolour} - -\membersection{wxWindow::SetId}\label{wxwindowsetid} - -\func{void}{SetId}{\param{int}{ id}} - -Sets the identifier of the window. - -\wxheading{Remarks} - -Each window has an integer identifier. If the application has not provided one, -an identifier will be generated. Normally, the identifier should be provided -on creation and should not be modified subsequently. - -TODO: perhaps there should be a default identifier for each class, rather -choosing one, which could clash with other ones. - -\wxheading{See also} - -\helpref{wxWindow::GetId}{wxwindowgetid} - - -\membersection{wxWindow::SetName}\label{wxwindowsetname} - -\func{virtual void}{SetName}{\param{const wxString\& }{name}} - -Sets the window's name. - -\wxheading{Parameters} - -\docparam{name}{A name to set for the window.} - -\wxheading{See also} - -\helpref{wxWindow::GetName}{wxwindowgetname} - -\membersection{wxWindow::SetReturnCode}\label{wxwindowsetreturncode} - -\func{void}{SetReturnCode}{\param{int }{retCode}} - -Sets the return code for this window. - -\wxheading{Parameters} - -\docparam{retCode}{The integer return code, usually a control identifier.} - -\wxheading{Remarks} - -A return code is normally associated with a modal dialog, where \helpref{wxDialog::ShowModal}{wxdialogshowmodal} returns -a code to the application. The function \helpref{wxDialog::EndModal}{wxdialogendmodal} calls {\bf SetReturnCode}. - -\wxheading{See also} - -\helpref{wxWindow::GetReturnCode}{wxwindowgetreturncode}, \helpref{wxDialog::ShowModal}{wxdialogshowmodal},\rtfsp -\helpref{wxDialog::EndModal}{wxdialogendmodal} - -\membersection{wxWindow::SetScrollbar}\label{wxwindowsetscrollbar} - -\func{virtual void}{SetScrollbar}{\param{int }{orientation}, \param{int }{position},\rtfsp -\param{int }{thumbSize}, \param{int }{range},\rtfsp -\param{const bool }{refresh = TRUE}} - -Sets the scrollbar properties of a built-in scrollbar. - -\wxheading{Parameters} - -\docparam{orientation}{Determines the scrollbar whose page size is to be set. May be wxHORIZONTAL or wxVERTICAL.} - -\docparam{position}{The position of the scrollbar in scroll units.} - -\docparam{thumbSize}{The size of the thumb, or visible portion of the scrollbar, in scroll units.} - -\docparam{range}{The maximum position of the scrollbar.} - -\docparam{refresh}{TRUE to redraw the scrollbar, FALSE otherwise.} - -\wxheading{Remarks} - -Let's say you wish to display 50 lines of text, using the same font. -The window is sized so that you can only see 16 lines at a time. - -You would use: - -{\small% -\begin{verbatim} - SetScrollbar(wxVERTICAL, 0, 16, 50); -\end{verbatim} -} - -Note that with the window at this size, the thumb position can never go -above 50 minus 16, or 34. - -You can determine how many lines are currently visible by dividing the current view -size by the character height in pixels. - -When defining your own scrollbar behaviour, you will always need to recalculate -the scrollbar settings when the window size changes. You could therefore put your -scrollbar calculations and SetScrollbar -call into a function named AdjustScrollbars, which can be called initially and also -from your \helpref{wxWindow::OnSize}{wxwindowonsize} event handler function. - -\wxheading{See also} - -\helpref{Scrolling overview}{scrollingoverview},\rtfsp -\helpref{wxScrollBar}{wxscrollbar}, \helpref{wxScrolledWindow}{wxscrolledwindow} - -\begin{comment} -\membersection{wxWindow::SetScrollPage}\label{wxwindowsetscrollpage} - -\func{virtual void}{SetScrollPage}{\param{int }{orientation}, \param{int }{pageSize}, \param{const bool }{refresh = TRUE}} - -Sets the page size of one of the built-in scrollbars. - -\wxheading{Parameters} - -\docparam{orientation}{Determines the scrollbar whose page size is to be set. May be wxHORIZONTAL or wxVERTICAL.} - -\docparam{pageSize}{Page size in scroll units.} - -\docparam{refresh}{TRUE to redraw the scrollbar, FALSE otherwise.} - -\wxheading{Remarks} - -The page size of a scrollbar is the number of scroll units that the scroll thumb travels when you -click on the area above/left of or below/right of the thumb. Normally you will want a whole visible -page to be scrolled, i.e. the size of the current view (perhaps the window client size). This -value has to be adjusted when the window is resized, since the page size will have changed. - -In addition to specifying how far the scroll thumb travels when paging, in Motif and some versions of Windows -the thumb changes size to reflect the page size relative to the length of the document. When the -document size is only slightly bigger than the current view (window) size, almost all of the scrollbar -will be taken up by the thumb. When the two values become the same, the scrollbar will (on some systems) -disappear. - -Currently, this function should be called before SetPageRange, because of a quirk in the Windows -handling of pages and ranges. - -\wxheading{See also} - -\helpref{wxWindow::SetScrollPos}{wxwindowsetscrollpos},\rtfsp -\helpref{wxWindow::GetScrollPos}{wxwindowsetscrollpos},\rtfsp -\helpref{wxWindow::GetScrollPage}{wxwindowsetscrollpage},\rtfsp -\helpref{wxScrollBar}{wxscrollbar}, \helpref{wxScrolledWindow}{wxscrolledwindow} -\end{comment} - -\membersection{wxWindow::SetScrollPos}\label{wxwindowsetscrollpos} - -\func{virtual void}{SetScrollPos}{\param{int }{orientation}, \param{int }{pos}, \param{const bool }{refresh = TRUE}} - -Sets the position of one of the built-in scrollbars. - -\wxheading{Parameters} - -\docparam{orientation}{Determines the scrollbar whose position is to be set. May be wxHORIZONTAL or wxVERTICAL.} - -\docparam{pos}{Position in scroll units.} - -\docparam{refresh}{TRUE to redraw the scrollbar, FALSE otherwise.} - -\wxheading{Remarks} - -This function does not directly affect the contents of the window: it is up to the -application to take note of scrollbar attributes and redraw contents accordingly. - -\wxheading{See also} - -\helpref{wxWindow::SetScrollbar}{wxwindowsetscrollbar},\rtfsp -\helpref{wxWindow::GetScrollPos}{wxwindowsetscrollpos},\rtfsp -\helpref{wxWindow::GetScrollThumb}{wxwindowgetscrollthumb},\rtfsp -\helpref{wxScrollBar}{wxscrollbar}, \helpref{wxScrolledWindow}{wxscrolledwindow} - -\begin{comment} -\membersection{wxWindow::SetScrollRange}\label{wxwindowsetscrollrange} - -\func{virtual void}{SetScrollRange}{\param{int }{orientation}, \param{int }{range}, \param{const bool }{refresh = TRUE}} - -Sets the range of one of the built-in scrollbars. - -\wxheading{Parameters} - -\docparam{orientation}{Determines the scrollbar whose range is to be set. May be wxHORIZONTAL or wxVERTICAL.} - -\docparam{range}{Scroll range.} - -\docparam{refresh}{TRUE to redraw the scrollbar, FALSE otherwise.} - -\wxheading{Remarks} - -The range of a scrollbar is the number of steps that the thumb may travel, rather than the total -object length of the scrollbar. If you are implementing a scrolling window, for example, you -would adjust the scroll range when the window is resized, by subtracting the window view size from the -total virtual window size. When the two sizes are the same (all the window is visible), the range goes to zero -and usually the scrollbar will be automatically hidden. - -\wxheading{See also} - -\helpref{wxWindow::SetScrollPos}{wxwindowsetscrollpos},\rtfsp -\helpref{wxWindow::SetScrollPage}{wxwindowsetscrollpage},\rtfsp -\helpref{wxWindow::GetScrollPos}{wxwindowsetscrollpos},\rtfsp -\helpref{wxWindow::GetScrollPage}{wxwindowsetscrollpage},\rtfsp -\helpref{wxScrollBar}{wxscrollbar}, \helpref{wxScrolledWindow}{wxscrolledwindow} -\end{comment} - -\membersection{wxWindow::SetSize}\label{wxwindowsetsize} - -\func{virtual void}{SetSize}{\param{int}{ x}, \param{int}{ y}, \param{int}{ width}, \param{int}{ height}, - \param{int}{ sizeFlags = wxSIZE\_AUTO}} - -Sets the size and position of the window in pixels. - -\func{virtual void}{SetSize}{\param{int}{ width}, \param{int}{ height}} - -Sets the size of the window in pixels. - -\wxheading{Parameters} - -\docparam{x}{Required x position in pixels, or -1 to indicate that the existing -value should be used.} - -\docparam{y}{Required y position in pixels, or -1 to indicate that the existing -value should be used.} - -\docparam{width}{Required width in pixels, or -1 to indicate that the existing -value should be used.} - -\docparam{height}{Required height position in pixels, or -1 to indicate that the existing -value should be used.} - -\docparam{sizeFlags}{Indicates the interpretation of other parameters. It is a bit list of the following: - -{\bf wxSIZE\_AUTO\_WIDTH}: a -1 width value is taken to indicate -a wxWindows-supplied default width.\\ -{\bf wxSIZE\_AUTO\_HEIGHT}: a -1 height value is taken to indicate -a wxWindows-supplied default width.\\ -{\bf wxSIZE\_AUTO}: -1 size values are taken to indicate -a wxWindows-supplied default size.\\ -{\bf wxSIZE\_USE\_EXISTING}: existing dimensions should be used -if -1 values are supplied.\\ -{\bf wxSIZE\_ALLOW\_MINUS\_ONE}: allow dimensions of -1 and less to be interpreted -as real dimensions, not default values. -} - -\wxheading{Remarks} - -The second form is a convenience for calling the first form with default -x and y parameters, and must be used with non-default width and height values. - -The first form sets the position and optionally size, of the window. -Parameters may be -1 to indicate either that a default should be supplied -by wxWindows, or that the current value of the dimension should be used. - -\wxheading{See also} - -\helpref{wxWindow::Move}{wxwindowmove} - -\membersection{wxWindow::SetSizeHints}\label{wxwindowsetsizehints} - -\func{virtual void}{SetSizeHints}{\param{int}{ minW=-1}, \param{int}{ minH=-1}, \param{int}{ maxW=-1}, \param{int}{ maxH=-1}, - \param{int}{ incW=-1}, \param{int}{ incH=-1}} - -Allows specification of minimum and maximum window sizes, and window size increments. -If a pair of values is not set (or set to -1), the default values will be used. - -\wxheading{Parameters} - -\docparam{minW}{Specifies the minimum width allowable.} - -\docparam{minH}{Specifies the minimum height allowable.} - -\docparam{maxW}{Specifies the maximum width allowable.} - -\docparam{maxH}{Specifies the maximum height allowable.} - -\docparam{incW}{Specifies the increment for sizing the width (Motif/Xt only).} - -\docparam{incH}{Specifies the increment for sizing the height (Motif/Xt only).} - -\wxheading{Remarks} - -If this function is called, the user will not be able to size the window outside the -given bounds. - -The resizing increments are only significant under Motif or Xt. - -\membersection{wxWindow::SetClientSize} - -\func{virtual void}{SetClientSize}{\param{int}{ width}, \param{int}{ height}} - -This sets the size of the window client area in pixels. Using this function to size a window -tends to be more device-independent than \helpref{wxWindow::SetSize}{wxwindowsetsize}, since the application need not -worry about what dimensions the border or title bar have when trying to fit the window -around panel items, for example. - -\wxheading{Parameters} - -\docparam{width}{The required client area width.} - -\docparam{height}{The required client area height.} - -\membersection{wxWindow::SetPalette} - -\func{virtual void}{SetPalette}{\param{wxPalette* }{palette}} - -Obsolete - use \helpref{wxDC::SetPalette}{wxdcsetpalette} instead. - -\membersection{wxWindow::SetCursor}\label{wxwindowsetcursor} - -\func{virtual void}{SetCursor}{\param{const wxCursor\&}{cursor}} - -Sets the window's cursor. - -\wxheading{Parameters} - -\docparam{cursor}{Specifies the cursor that the window should normally display.} - -\wxheading{Remarks} - -Under Windows, you sometimes need to call ::wxSetCursor in addition to this -function if you want the cursor to change immediately, because under Windows, -wxWindows only sets the global cursor when it detects mouse movement. - -\wxheading{See also} - -\helpref{::wxSetCursor}{wxsetcursor}, \helpref{wxCursor}{wxcursor} - -\membersection{wxWindow::SetEventHandler}\label{wxwindowseteventhandler} - -\func{void}{SetEventHandler}{\param{wxEvtHandler* }{handler}} - -Sets the event handler for this window. - -\wxheading{Parameters} - -\docparam{handler}{Specifies the handler to be set.} - -\wxheading{Remarks} - -An event handler is an object that is capable of processing the events -sent to a window. By default, the window is its own event handler, but -an application may wish to substitute another, for example to allow -central implementation of event-handling for a variety of different -window classes. - -It is usually better to use \helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler} since -this sets up a chain of event handlers, where an event not handled by one event handler is -handed to the next one in the chain. - -\wxheading{See also} - -\helpref{wxWindow::GetEventHandler}{wxwindowgeteventhandler},\rtfsp -\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp -\helpref{wxWindow::PopEventHandler}{wxwindowpusheventhandler},\rtfsp -\helpref{wxEvtHandler::ProcessEvent}{wxevthandlerprocessevent},\rtfsp -\helpref{wxEvtHandler}{wxevthandler} - -\membersection{wxWindow::SetTitle}\label{wxwindowsettitle} - -\func{virtual void}{SetTitle}{\param{const wxString\& }{title}} - -Sets the window's title. Applicable only to frames and dialogs. - -\wxheading{Parameters} - -\docparam{title}{The window's title.} - -\wxheading{See also} - -\helpref{wxWindow::GetTitle}{wxwindowgettitle} - -\membersection{wxWindow::Show} - -\func{virtual bool}{Show}{\param{const bool}{ show}} - -Shows or hides the window. - -\wxheading{Parameters} - -\docparam{show}{If TRUE, displays the window and brings it to the front. Otherwise, -hides the window.} - -\wxheading{See also} - -\helpref{wxWindow::IsShown}{wxwindowisshown} - -\membersection{wxWindow::TransferDataFromWindow}\label{wxwindowtransferdatafromwindow} - -\func{virtual bool}{TransferDataFromWindow}{\void} - -Transfers values from child controls to data areas specified by their validators. Returns -FALSE if a transfer failed. - -\wxheading{See also} - -\helpref{wxWindow::TransferDataToWindow}{wxwindowtransferdatatowindow},\rtfsp -\helpref{wxValidator}{wxvalidator}, \helpref{wxWindow::Validate}{wxwindowvalidate} - -\membersection{wxWindow::TransferDataToWindow}\label{wxwindowtransferdatatowindow} - -\func{virtual bool}{TransferDataToWindow}{\void} - -Transfers values to child controls from data areas specified by their validators. - -\wxheading{Return value} - -Returns FALSE if a transfer failed. - -\wxheading{See also} - -\helpref{wxWindow::TransferDataFromWindow}{wxwindowtransferdatafromwindow},\rtfsp -\helpref{wxValidator}{wxvalidator}, \helpref{wxWindow::Validate}{wxwindowvalidate} - -\membersection{wxWindow::Validate}\label{wxwindowvalidate} - -\func{virtual bool}{Validate}{\void} - -Validates the current values of the child controls using their validators. - -\wxheading{Return value} - -Returns FALSE if any of the validations failed. - -\wxheading{See also} - -\helpref{wxWindow::TransferDataFromWindow}{wxwindowtransferdatafromwindow},\rtfsp -\helpref{wxWindow::TransferDataFromWindow}{wxwindowtransferdatafromwindow},\rtfsp -\helpref{wxValidator}{wxvalidator} - -\membersection{wxWindow::WarpPointer}\label{wxwindowwarppointer} - -\func{void}{WarpPointer}{\param{int}{ x}, \param{int}{ y}} - -Moves the pointer to the given position on the window. - -\wxheading{Parameters} - -\docparam{x}{The new x position for the cursor.} - -\docparam{y}{The new y position for the cursor.} - diff --git a/docs/latex/wx/windowdc.tex b/docs/latex/wx/windowdc.tex deleted file mode 100644 index ac0dcf681c..0000000000 --- a/docs/latex/wx/windowdc.tex +++ /dev/null @@ -1,33 +0,0 @@ -\section{\class{wxWindowDC}}\label{wxwindowdc} - -A wxWindowDC must be constructed if an application wishes to paint on the -whole area of a window (client and decorations). -This should normally be constructed as a temporary stack object; don't store -a wxWindowDC object. - -To draw on a window from inside {\bf OnPaint}, construct a \helpref{wxPaintDC}{wxpaintdc} object. - -To draw on the client area of a window from outside {\bf OnPaint}, construct a \helpref{wxClientDC}{wxclientdc} object. - -To draw on the whole window including decorations, construct a \helpref{wxWindowDC}{wxwindowdc} object -(Windows only). - -\wxheading{Derived from} - -\helpref{wxDC}{wxdc} - -\wxheading{See also} - -\helpref{wxDC}{wxdc}, \helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxPaintDC}{wxpaintdc},\rtfsp -\helpref{wxClientDC}{wxclientdc}, \helpref{wxScreenDC}{wxscreendc} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxWindowDC::wxWindowDC} - -\func{}{wxWindowDC}{\param{wxWindow*}{ window}} - -Constructor. Pass a pointer to the window on which you wish to paint. - - - diff --git a/docs/latex/wx/winhelp.tex b/docs/latex/wx/winhelp.tex deleted file mode 100644 index 0bf137c8b8..0000000000 --- a/docs/latex/wx/winhelp.tex +++ /dev/null @@ -1,107 +0,0 @@ -\section{\class{wxWinHelpController}}\label{wxwinhelpcontroller} - -This class provides the means to control a WinHelp instance. -Under Windows, wxHelpController is defined to be a synonym for wxWinHelpController. - -A help controller allows an application to display help, at the contents -or at a particular topic, and shut the help program down on termination. -This avoids proliferation of many instances of the help viewer whenever the -user requests a different topic via the application's menus or buttons. - -Typically, an application will create a help controller instance -when it starts, and immediately call {\bf Initialize}\rtfsp -to associate a filename with it. The help viewer will only get run, however, -just before the first call to display something. - -\wxheading{Derivation} - -\helpref{wxObject}{wxobject} - -\wxheading{See also} - -\helpref{wxHelpControllerBase}{wxhelpcontrollerbase} - -\wxheading{Include file} - -{\tt } - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxWinHelpController::wxWinHelpController} - -\func{}{wxWinHelpController}{\void} - -Constructs a help instance object, but does not invoke the help viewer. - -\membersection{wxWinHelpController::\destruct{wxWinHelpController}} - -\func{}{\destruct{wxWinHelpController}}{\void} - -Destroys the help instance, closing down the viewer if it is running. - -\membersection{wxWinHelpController::Initialize}\label{wxwinhelpcontrollerinitialize} - -\func{void}{Initialize}{\param{const wxString\& }{file}} - -Initializes the help instance with a help filename. Does not invoke the help viewer. -This must be called directly after the help instance object is created and before -any attempts to communicate with the viewer. - -You may omit the file extension and a suitable one will be chosen. - -\membersection{wxWinHelpController::DisplayBlock}\label{wxwinhelpcontrollerdisplayblock} - -\func{bool}{DisplayBlock}{\param{long}{ blockNo}} - -If the help viewer is not running, runs it and displays the file at the given block number. -The interpretation of {\it blockNo} differs between help viewers. If using Windows Help, this -refers to the context number. - -\membersection{wxWinHelpController::DisplayContents}\label{wxwinhelpcontrollerdisplaycontents} - -\func{bool}{DisplayContents}{\void} - -If the help viewer is not running, runs it and displays the -contents. - -\membersection{wxWinHelpController::DisplaySection}\label{wxwinhelpcontrollerdisplaysection} - -\func{bool}{DisplaySection}{\param{int}{ sectionNo}} - -DisplaySection does not apply to WinHelp. - -\membersection{wxWinHelpController::KeywordSearch}\label{wxwinhelpcontrollerkeywordsearch} - -\func{bool}{KeywordSearch}{\param{const wxString\& }{keyWord}} - -If the help viewer is not running, runs it, and searches for sections matching the given keyword. If one -match is found, the file is displayed at this section. If more than one -match is found, the first topic is displayed (Windows Help). - -\membersection{wxWinHelpController::LoadFile}\label{wxwinhelpcontrollerloadfile} - -\func{bool}{LoadFile}{\param{const wxString\& }{file = NULL}} - -If the help viewer is not running, runs it and loads the given file. -If the filename is not supplied or is -NULL, the file specified in {\bf Initialize} is used. If the viewer is -already displaying the specified file, it will not be reloaded. This -member function may be used before each display call in case the user -has opened another file. - -\membersection{wxWinHelpController::OnQuit}\label{wxwinhelpcontrolleronquit} - -\func{bool}{OnQuit}{\void} - -Overridable member called when this application's viewer is quit by the user. - -Not implemented. - -\membersection{wxWinHelpController::Quit}\label{wxwinhelpcontrollerquit} - -\func{bool}{Quit}{\void} - -If the viewer is running, quits it by disconnecting. - -For Windows Help, the viewer will only close if no other application is using it. - diff --git a/docs/latex/wx/wx.hpj b/docs/latex/wx/wx.hpj deleted file mode 100644 index eabbd5b007..0000000000 --- a/docs/latex/wx/wx.hpj +++ /dev/null @@ -1,13 +0,0 @@ - -[OPTIONS] -COMPRESS=HIGH -CONTENTS=Contents -TITLE=wxWindows Manual -BMROOT=..\..\..\..\wxwind~1\docs\latex\wx - -[FILES] -wx.rtf - -[CONFIG] -CreateButton("Up", "&Up", "JumpId(`wx.hlp', `Contents')") -BrowseButtons() diff --git a/docs/latex/wx/wxstring.tex b/docs/latex/wx/wxstring.tex deleted file mode 100644 index 5d1d728a2e..0000000000 --- a/docs/latex/wx/wxstring.tex +++ /dev/null @@ -1,525 +0,0 @@ -\section{\class{wxString}}\label{wxstring} - -\wxheading{Derived from} - -None - -\wxheading{See also} - -\overview{Overview}{wxstringoverview} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxString::wxString}\label{wxstringconstruct} - -\func{}{wxString}{\void} - -Default constructor. - -\func{}{wxString}{\param{const wxString\&}{ x}} - -Copy constructor. - -\func{}{wxString}{\param{char}{ ch}, \param{size\_t}{ n = 1}} - -Constructs a string of {\it n} copies of character {\it ch}. - -\func{}{wxString}{\param{const char*}{ psz}, \param{size\_t}{ nLength = STRING\_MAXLEN}} - -Takes first {\it nLength} characters from the C string {\it psz}. -The default value of STRING\_MAXLEN means take all the string. - -\func{}{wxString}{\param{const unsigned char*}{ psz}, \param{size\_t}{ nLength = STRING\_MAXLEN}} - -For compilers using unsigned char: takes first {\it nLength} characters from the C string {\it psz}. -The default value of STRING\_MAXLEN means take all the string. - -\func{}{wxString}{\param{const wchar\_t*}{ psz}} - -Constructs a string from the wide (UNICODE) string. - -\membersection{wxString::\destruct{wxString}}\label{wxstringdestruct} - -\func{}{\destruct{wxString}}{\void} - -String destructor. Note that this is not virtual, so wxString must not be inherited from. - -\membersection{wxString::Alloc}\label{wxstringAlloc} - -\func{void}{Alloc}{\param{uint}{ newsize}} - -Preallocate some space for wxString. Only works if the data of this string is not shared. - -\membersection{wxString::Append}\label{wxstringAppend} - -\func{wxString\&}{Append}{\param{const char*}{ psz}} - -Concatenates {\it psz} to this string, returning a reference to it. - -\func{wxString\&}{Append}{\param{char}{ ch}, \param{int}{ count = 1}} - -Concatenates character {\it ch} to this string, {\it count} times, returning a reference -to it. - -\membersection{wxString::After}\label{wxstringAfter} - -\constfunc{wxString}{After}{\param{char}{ ch}} - -Gets all the characters after the first occurence of {\it ch}. -Returns the empty string if {\it ch} is not found. - -\membersection{wxString::Before}\label{wxstringBefore} - -\constfunc{wxString}{Before}{\param{char}{ ch}} - -Gets all characters before the last occurence of {\it ch}. -Returns empty string if {\it ch} is not found. - -\membersection{wxString::Cmp}\label{wxstringcmp} - -\constfunc{int}{Cmp}{\param{const char*}{ psz}} - -Case-sensitive comparison. - -Returns 0 if equal, +1 if greater or -1 if less. - -See also CmpNoCase, IsSameAs. - -\membersection{wxString::CmpNoCase}\label{wxstringcmpnocase} - -\constfunc{int}{CmpNoCase}{\param{const char*}{ psz}} - -Case-insensitive comparison. - -Returns 0 if equal, +1 if greater or -1 if less. - -See also Cmp, IsSameAs. - -\membersection{wxString::CompareTo}\label{wxstringCompareTo} - -\begin{verbatim} -#define NO_POS ((int)(-1)) // undefined position -enum caseCompare {exact, ignoreCase}; -\end{verbatim} - -\constfunc{int}{CompareTo}{\param{const char*}{ psz}, \param{caseCompare}{ cmp = exact}} - -Case-sensitive comparison. Returns 0 if equal, 1 if greater or -1 if less. - -\membersection{wxString::Contains}\label{wxstringContains} - -\func{bool}{Contains}{\param{const wxString\&}{ str}} - -Returns 1 if target appears anyhere in wxString; else 0. - -\membersection{wxString::Empty}\label{wxstringempty} - -\func{void}{Empty}{\void} - -Reinitializes the string and frees the data. - -\membersection{wxString::Find}\label{wxstringfind} - -\constfunc{int}{Find}{\param{char}{ ch}, \param{bool}{ fromEnd = FALSE}} - -Searches for the given character. Returns the starting index, or -1 if not found. - -\constfunc{int}{Find}{\param{const char*}{ sz}} - -Searches for the given string. Returns the starting index, or -1 if not found. - -\membersection{wxString::First}\label{wxstringfirst} - -\func{size\_t}{First}{\param{char}{ c}} - -\constfunc{size\_t}{First}{\param{const char*}{ psz}} - -\constfunc{size\_t}{First}{\param{const wxString\&}{ str}} - -\constfunc{size\_t}{First}{\param{const char}{ ch}} - -Returns the first occurrence of the item. - -\membersection{wxString::GetChar}\label{wxstringgetchar} - -\constfunc{char}{GetChar}{\param{size\_t}{ n}} - -Returns the character at position {\it n} (read-only). - -\membersection{wxString::GetData}\label{wxstringGetData} - -\constfunc{const char*}{GetData}{\void} - -wxWindows compatibility conversion. Returns a constant pointer to the data in the string. - -\membersection{wxString::GetWritableChar}\label{wxstringgetwritablechar} - -\func{char\&}{GetWritableChar}{\param{size\_t}{ n}} - -Returns a reference to the character at position {\it n}. - -\membersection{wxString::GetWriteBuf}\label{wxstringgetwritebuf} - -\func{char*}{GetWriteBuf}{\param{uint}{ len}} - -Returns a writable buffer of at least {\it len} bytes. - -Call \helpref{wxString::UngetWriteBuf}{wxstringungetwritebuf} as soon as possible -to put the string back into a reasonable state. - -\membersection{wxString::Index}\label{wxstringIndex} - -\constfunc{size\_t}{Index}{\param{char}{ ch}, \param{int}{ startpos = 0}} - -Same as \helpref{wxString::Find}{wxstringfind}. - -\constfunc{size\_t}{Index}{\param{const char*}{ sz}} - -Same as \helpref{wxString::Find}{wxstringfind}. - -\constfunc{size\_t}{Index}{\param{const char*}{ sz}, \param{bool}{ caseSensitive = TRUE}, \param{bool}{ fromEnd = FALSE}} - -Search the element in the array, starting from either side. - -If {\it fromEnd} is TRUE, reverse search direction. - -If {\bf caseSensitive}, comparison is case sensitive (the default). - -Returns the index of the first item matched, or NOT\_FOUND. - -\membersection{wxString::Insert}\label{wxstringInsert} - -\func{void}{Insert}{\param{const wxString\&}{ str}, \param{uint}{ index}} - -Add new element at the given position. - -\membersection{wxString::IsAscii}\label{wxstringIsAscii} - -\constfunc{bool}{IsAscii}{\void} - -Returns TRUE if the string is ASCII. - -\membersection{wxString::IsEmpty}\label{wxstringisempty} - -\constfunc{bool}{IsEmpty}{\void} - -Returns TRUE if the string is NULL. - -\membersection{wxString::IsNull}\label{wxstringIsNull} - -\constfunc{bool}{IsNull}{\void} - -Returns TRUE if the string is NULL (same as IsEmpty). - -\membersection{wxString::IsNumber}\label{wxstringIsNumber} - -\constfunc{bool}{IsNumber}{\void} - -Returns TRUE if the string is a number. - -\membersection{wxString::IsSameAs}\label{wxstringissameas} - -\constfunc{bool}{IsSameAs}{\param{const char*}{ psz}, \param{bool}{ caseSensitive = TRUE}} - -Test for string equality, case-sensitive (default) or not. - -caseSensitive is TRUE by default (case matters). - -Returns TRUE if strings are equal, FALSE otherwise. - -See also Cmp, CmpNoCase. - -\membersection{wxString::IsWord}\label{wxstringIsWord} - -\constfunc{bool}{IsWord}{\void} - -Returns TRUE if the string is a word. TODO: what's the definition of a word? - -\membersection{wxString::Last}\label{wxstringLast} - -\constfunc{char}{Last}{\void} - -Returns the last character. - -\func{char\&}{Last}{\void} - -Returns a reference to the last character (writable). - -\membersection{wxString::Left}\label{wxstringleft} - -\constfunc{wxString}{Left}{\param{size\_t}{ count}} - -Returns the first {\it count} characters. - -\constfunc{wxString}{Left}{\param{char}{ ch}} - -Returns all characters before the first occurence of {\it ch}. -Returns the whole string if {\it ch} is not found. - -\membersection{wxString::Len}\label{wxstringlen} - -\constfunc{size\_t}{Len}{\void} - -Returns the length of the string. - -\membersection{wxString::Length}\label{wxstringlength} - -\constfunc{size\_t}{Length}{\void} - -Returns the length of the string (same as Len). - -\membersection{wxString::LowerCase}\label{wxstringLowerCase} - -\func{void}{LowerCase}{\void} - -Same as MakeLower. - -\membersection{wxString::MakeLower}\label{wxstringmakelower} - -\func{void}{MakeLower}{\void} - -Converts all characters to lower case. - -\membersection{wxString::MakeUpper}\label{wxstringmakeupper} - -\func{void}{MakeUpper}{\void} - -Converts all characters to upper case. - -\membersection{wxString::Matches}\label{wxstringMatches} - -\constfunc{bool}{Matches}{\param{const char*}{ szMask}} - -Returns TRUE if the string contents matches a mask containing '*' and '?'. - -\membersection{wxString::Mid}\label{wxstringmid} - -\constfunc{wxString}{Mid}{\param{size\_t}{ first}, \param{size\_t}{ count = STRING\_MAXLEN}} - -Returns a substring starting at {\it first}, with length {\it count}, or the rest of -the string if {\it count} is the default value. - -\membersection{wxString::Pad}\label{wxstringpad} - -\func{wxString\&}{Pad}{\param{size\_t}{ count}, \param{char}{ pad = ' '}, \param{bool}{ fromRight = TRUE}} - -Adds {\it count} copies of {\it pad} to the beginning, or to the end of the string (the default). - -Removes spaces from the left or from the right (default). - -\membersection{wxString::Prepend}\label{wxstringPrepend} - -\func{wxString\&}{Prepend}{\param{const wxString\&}{ str}} - -Prepends {\it str} to this string, returning a reference to this string. - -\membersection{wxString::Printf}\label{wxstringprintf} - -\func{int}{Printf}{\param{const char* }{pszFormat}, \param{}{...}} - -Similar to sprintf. Returns the number of characters written, or an integer less than zero -on error. - -\membersection{wxString::PrintfV}\label{wxstringprintfv} - -\func{int}{PrintfV}{\param{const char* }{pszFormat}, \param{va\_list}{ argPtr}} - -Similar to vprintf. Returns the number of characters written, or an integer less than zero -on error. - -\membersection{wxString::Remove}\label{wxstringRemove} - -\func{wxString\&}{Remove}{\param{size\_t}{ pos}} - -Same as Truncate. Removes the portion from {\it pos} to the end of the string. - -\func{wxString\&}{Remove}{\param{size\_t}{ pos}, \param{size\_t}{ len}} - -Removes the last {\it len} characters from the string, starting at {\it pos}. - -\membersection{wxString::RemoveLast}\label{wxstringremovelast} - -\func{wxString\&}{RemoveLast}{\void} - -Removes the last character. - -\membersection{wxString::Replace}\label{wxstringReplace} - -\func{uint}{Replace}{\param{const char*}{ szOld}, \param{const char*}{ szNew}, \param{bool}{ replaceAll}} - -Replace first (or all) occurences of substring with another one. - -{\it replaceAll}: global replace (default), or only the first occurence. - -Returns the number of replacements made. - -\membersection{wxString::Right}\label{wxstringright} - -\constfunc{wxString}{Right}{\param{size\_t}{ count}} - -Returns the last {\it count} characters. - -\constfunc{wxString}{Right}{\param{char}{ ch}} - -Returns all characters after the last occurence of {\it ch}. -Returns the whole string if {\it ch} is not found. - -\membersection{wxString::SetChar}\label{wxstringsetchar} - -\func{void}{SetChar}{\param{size\_t}{ n}, \param{char}{ch}} - -Sets the character at position {\it n}. - -\membersection{wxString::Shrink}\label{wxstringshrink} - -\func{void}{Shrink}{\void} - -Minimizes the string's memory. Only works if the data of this string is not shared. - -\membersection{wxString::sprintf}\label{wxstringsprintf} - -\func{void}{sprintf}{\param{const char* }{ fmt}} - -The same as Printf. - -\membersection{wxString::Strip}\label{wxstringStrip} - -\begin{verbatim} -enum stripType {leading = 0x1, trailing = 0x2, both = 0x3}; -\end{verbatim} - -\constfunc{wxString}{Strip}{\param{stripType}{ s = trailing}} - -Strip characters at the front and/or end. The same as Trim except that it -doesn't change this string. - -\membersection{wxString::Trim}\label{wxstringtrim} - -\func{wxString\&}{Trim}{\param{bool}{ fromRight = TRUE}} - -Removes spaces from the left or from the right (default). - -\membersection{wxString::Truncate}\label{wxstringtruncate} - -\func{wxString\&}{Truncate}{\param{size\_t}{ len}} - -Truncate the string to the given length. - -\membersection{wxString::UngetWriteBuf}\label{wxstringungetwritebuf} - -\func{void}{UngetWriteBuf}{\void} - -Puts the string back into a reasonable state, after -\rtfsp\helpref{wxString::GetWriteBuf}{wxstringgetwritebuf} was called. - -\membersection{wxString::UpperCase}\label{wxstringUpperCase} - -\func{void}{UpperCase}{\void} - -The same as MakeUpper. - -\membersection{wxString::operator $=$}\label{wxstringoperatorassign} - -\func{wxString\&}{operator $=$}{\param{const wxString\&}{ str}} - -\func{wxString\&}{operator $=$}{\param{const char*}{ psz}} - -\func{wxString\&}{operator $=$}{\param{char}{ c}} - -\func{wxString\&}{operator $=$}{\param{const unsigned char*}{ psz}} - -\func{wxString\&}{operator $=$}{\param{const wchar\_t*}{ pwz}} - -Assignment. - -\membersection{operator wxString::$+$}\label{wxstringoperatorplus} - -Concatenation. - -\func{wxString}{operator $+$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}} - -\func{wxString}{operator $+$}{\param{const wxString\&}{ x}, \param{const char*}{ y}} - -\func{wxString}{operator $+$}{\param{const wxString\&}{ x}, \param{char}{ y}} - -\func{wxString}{operator $+$}{\param{const char*}{ x}, \param{const wxString\&}{ y}} - -\membersection{wxString::operator $+=$}\label{wxstringPlusEqual} - -\func{void}{operator $+=$}{\param{const wxString\&}{ str}} - -\func{void}{operator $+=$}{\param{const char*}{ psz}} - -\func{void}{operator $+=$}{\param{char}{ c}} - -Concatenation. - -\membersection{wxString::operator []}\label{wxstringoperatorbracket} - -\func{char\&}{operator []}{\param{size\_t}{ i}} - -\func{char}{operator []}{\param{size\_t}{ i}} - -\func{char}{operator []}{\param{int}{ i}} - -Element extraction. - -\membersection{wxString::operator ()}\label{wxstringoperatorparenth} - -\func{wxString}{operator ()}{\param{size\_t}{ start}, \param{size\_t}{ len}} - -Same as Mid (substring extraction). - -\membersection{wxString::operator \cinsert}\label{wxstringoperatorout} - -\func{wxString\&}{operator \cinsert}{\\param{const wxString\&}{ str}} - -\func{wxString\&}{operator \cinsert}{\\param{const char*}{ psz}} - -\func{wxString\&}{operator \cinsert}{\\param{char }{ch}} - -Same as $+=$. - -\membersection{wxString::operator \cextract}\label{wxstringoperatorin} - -\func{friend istream\&}{operator \cextract}{\param{istream\&}{ is}, \param{wxString\&}{ str}} - -Extraction from a stream. - -\membersection{wxString::operator const char*}\label{wxstringoperatorconstcharpt} - -\constfunc{}{operator const char*}{\void} - -Implicit conversion to a C string. - -\membersection{Comparison operators}\label{wxstringComparison} - -\func{bool}{operator $==$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}} - -\func{bool}{operator $==$}{\param{const wxString\&}{ x}, \param{const char*}{ t}} - -\func{bool}{operator $!=$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}} - -\func{bool}{operator $!=$}{\param{const wxString\&}{ x}, \param{const char*}{ t}} - -\func{bool}{operator $>$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}} - -\func{bool}{operator $>$}{\param{const wxString\&}{ x}, \param{const char*}{ t}} - -\func{bool}{operator $>=$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}} - -\func{bool}{operator $>=$}{\param{const wxString\&}{ x}, \param{const char*}{ t}} - -\func{bool}{operator $<$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}} - -\func{bool}{operator $<$}{\param{const wxString\&}{ x}, \param{const char*}{ t}} - -\func{bool}{operator $<=$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}} - -\func{bool}{operator $<=$}{\param{const wxString\&}{ x}, \param{const char*}{ t}} - -\wxheading{Remarks} - -These comparisons are case-sensitive. - - diff --git a/docs/latex/wx/wxtab1.bmp b/docs/latex/wx/wxtab1.bmp deleted file mode 100644 index 754c02827e..0000000000 Binary files a/docs/latex/wx/wxtab1.bmp and /dev/null differ diff --git a/docs/latex/wx/wxtab1.eps b/docs/latex/wx/wxtab1.eps deleted file mode 100644 index eff7361042..0000000000 --- a/docs/latex/wx/wxtab1.eps +++ /dev/null @@ -1,1086 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: wxtab1.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 124 196 489 596 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -124 196 translate - -% size of image (on paper, in 1/72inch coords) -365 400 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 15 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 0000bf c0c0c0 808080 ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -365 400 8 % dimensions of data -[365 0 0 -400 0 400] % mapping matrix -rlecmapimage - -7f037f036b030000 -8103047f047f046804810300 -83030402037f037f0364038304020300 -8403040203017f017f0163018304020300 -8403040203017f017f0163018304020300 -8403040203017f017f0152010e0485000104020300 -8403040203017f017f0152018104020b028603000104020300 -840304020301810104040408010104040101040f01010404010404030101040701010412 -0104047f0175018104020b028603000104020300 -840304020301020101040a010104040101040f01010404010104010101040c0101041201 -0104010101047f017401810402010201000302010001028603000104020300 -840304020301020101040a010104040101040f01010404010104020101040b0101041201 -0104010101047f017401810402020201000102010002028603000104020300 -840304020301020101040401030401010404010104040201030402010404040101040201 -010401010104010103040101010401010304020104040401010401010104020103040101 -01048101048104017f0165018104020302030003028603000104020300 -840304020301020101040701010481010481040181010482040104810401810104820401 -048104018101048204010481040181010481040103010104020101040101010404010104 -810104820401048104018101048204010481040181010481040103010404020101040101 -0104810104820401048104017f0165018104020402010004028603000104020300 -840304020301020101040401040481010481040181010482040104810401810104820401 -040404810104810401810104810401030101040201010401010104010104048101048204 -010481040181010482040104810401810104810401030101040101010401010104010101 -04010102047f0167018104020302030003028603000104020300 -840304020301020101040301010401010104810104810401810104820401048104018101 -048204010481040103010104010101040401010402010104010101048101048104018101 -048204010482040104810401810104820401048104018101048104010301010401010104 -0101010401010104010102047f0167018104020202010001020100020286030001040203 -00 -840304020301020101040301010401010104810104810401810104820401048104018101 -048204010481040181010482040104810401810104810401030101040101010402010104 -810104810401810104820401048204010481040181010482040104810401810104810401 -03010104010101040101010401010104810104820401048104017f016501810402010201 -000302010001028603000104020300 -840304020301020101040401040481010403040101040402010304020104040401040403 -010104010104048101048104018101040204020104040401040403010304010101048101 -048104017f0165018104020b028603000104020300 -840304020301500101047f017f018104020b028603000104020300 -8403040203014c0104047f017f01820104030c0385000104020300 -8403040203017f017f0152010f00840104020300 -8403040203017f017f0163018304020300 -8403040203017f017f0163018304020300 -83030402047f047f04650482020300 -820304027f027f026702810300 -820304027f027f026702810300 -820304027f027f026702810300 -820304027f027f026702810300 -820304027f027f026702810300 -8203040218024f04820302044e04820302044e04820302044e048103020602810300 -8203040218028104024d0283030004024d0283030004024d0283030004024d0282030002 -0502810300 -8203040218028104024d0283030004024d0283030004024d0283030004024d0282030002 -0502810300 -8203040218028104024d0283030004024d0283030004024d0283030004024d0282030002 -0502810300 -8203040218028104024d0283030004024d0283030004024d0283030004024d0282030002 -0502810300 -8203040218028104024d0283030004024d0283030004024d0283030004024d0282030002 -0502810300 -8203040218028104021e0203000102810002260283030004021502020008028100020402 -81000205028100021a028303000402110281000210028100020f02810002140283030004 -020602810002020281000215028100020b02810002030281000207028100020902820300 -020502810300 -8203040218028104021e0281000201028100022802830300040214028100020102810002 -06028100020c028100021a028303000402100283000200020f028100020f028100021402 -83030004020602810002020281000223028100020d028100020902820300020502810300 - -8203040218028104021e0281000201028300020002810200830002000220028303000402 -130281000203028100028102000100810200010086020002000200028102000100010282 -000200810002170283030004021002830002000202020200010283000200028102008500 -020002000201028100028102000100010285000200020002820200021102830300040206 -028100020202830002000201028400020002000200010282000200020001028200020002 -000202010085020002000200810002860200020002000281020083000200020902820300 -020502810300 -8203040218028104021e0281000201028500020002000281020081000220028303000402 -130281000203028300020002010283000200028102008100028402000200020102820002 -008100028202000216028303000402100283000200020102810002010282000200810002 -820200028102008300020002010283000200020102820002008100028402000200021202 -830300040206020500820200020102820002008300020002830200020083000200028602 -000200020002010283000200028102008200020081000285020002000200810002820200 -028102008100020902820300020502810300 -8203040218028104021e0203000102830002000201028100022002830300040213028100 -020302810002810200810002010281000282020002010283000200020302810002010281 -0002160283030004020f0281000201028100020102030082020002010281000201028100 -028402000200020102030082020002010201001402830300040206028100020202830002 -000201028300020002820200028402000200028202000286020002000200020102830002 -000201028300020002010285000200020002010281000201028100020902820300020502 -810300 -8203040218028104021e0281000203028300020002010281000220028303000402130281 -000203028100020202810002820200028202000201028300020002030281000201028100 -02160283030004020f020400010281000201028300020002010281000201028100028402 -000200028202000201028300020002010283000200021202830300040206028100020202 -830002000201028300020002820200028402000200028202000286020002000200020102 -830002000201028300020002010285000200020002010281000201028100020902820300 -020502810300 -8203040218028104021e0281000203028300020002810200810002200283030004021402 -810002010281000282020002010283000200028202000201028300020002010283000200 -020102810002160283030004020e02810002030283000200028102008300020002010281 -000281020081000201028100020102810002810200830002000201028300020002120283 -030004020602810002020283000200028102008300020002820200028402000200028202 -000286020002000200020102830002000281020082000200810002860200020002000201 -028100028102008100020902820300020502810300 -8203040218028104021e0281000203028100028102008300020002200283030004021502 -020003020200010201008202000201028100028102000100010281000201028100021602 -83030004020e028100020302810002810200850002000200020202010082020002010281 -000202020100840200020002010281000282020002110283030004020602810002020281 -000281020085000200020002820200028402000200028202000286020002000200020102 -810002810200860002000200020081000284020002000202020100820200020902820300 -020502810300 -8203040218028104022a02810002200283030004024d0283030004024d0283030004022f -028100021b02820300020502810300 -82030402180281040226020300220283030004024d0283030004024d0283030004022b02 -03001d02820300020502810300 -8203040218028104024d0283030004024d0283030004024d0283030004024d0282030002 -0502810300 -8203040218028104024d0283030004024d0283030004024d0283030004024d0282030002 -0502810300 -8203040218028104024d0283030004024d0283030004024d0283030004024d0282030002 -0502810300 -8203040218028104024d0283030004024d0283030004024d0283030004024d0282030002 -0502810300 -820304020e024f04820302044e04820302044e04820302044e0481030207028203000205 -02810300 -820304020e028104024d0283030004024d0283030004024d0283030004024d0282030002 -0602820300020502810300 -820304020e028104024d0283030004024d0283030004024d0283030004024d0282030002 -0602820300020502810300 -820304020e028104024d0283030004024d0283030004024d0283030004024d0282030002 -0602820300020502810300 -820304020e028104024d0283030004024d0283030004024d0283030004024d0282030002 -0602820300020502810300 -820304020e028104024d0283030004024d0283030004024d0283030004024d0282030002 -0602820300020502810300 -820304020e028104021102810002080281000210028100021b0283030004021602030001 -028100022e0283030004021b0202002e028303000402160281000202028100022f028203 -00020602820300020502810300 -820304020e0281040210028300020002070281000210028100021b028303000402150281 -0002020283000200022e0283030004021a0281000201028100022c028303000402160281 -000202028100022f02820300020602820300020502810300 -820304020e02810402100283000200020102030081020001000502020002020200810200 -010001020200010283000200021002830300040215028100020402820002008100020102 -020002020200010282000200810002190283030004021902810002050202000102810002 -010281000201028100021c02830300040216028100020202810002810200010001028300 -0200028102000100020202001b02820300020602820300020502810300 -820304020e02810402100283000200020102810002010283000200020402810002010283 -000200020102830002000282020002010282000200810002110283030004021602010003 -020100010283000200020102830002000201028200020081000282020002180283030004 -021902810002040281000201028300020002840200020002820200021c02830300040216 -020500820200020102820002008100028202000201028300020002010281000219028203 -00020602820300020502810300 -820304020e028104020f0281000201028100028202000201028300020002040204000102 -030082020002810200030082020002120283030004021802010001028100020102820002 -000300810200030082020002010281000218028303000402190281000204028100020102 -810002880200020002000200021d02830300040216028100020202830002000201028300 -02000202020100020204001a02820300020602820300020502810300 -820304020e028104020f0204000102810002010283000200028102000100820200020302 -81000201028300020002820200020302810002120283030004021a028300020002010283 -000200020302810002030281000201028100021802830300040219028100020402810002 -0102810002880200020002000200021d0283030004021602810002020283000200020102 -83000200020402810002820200021d02820300020602820300020502810300 -820304020e028104020e0281000203028300020002010283000200020402810002010283 -000200028102008300020002820200020102830002000212028303000402150281000202 -028300020002010283000200020102830002000201028200020081000282020002180283 -030004021a02810002010283000200020102810002010281000201028100021e02830300 -040216028100020202830002000201028300020002010281000201028300020002010281 -00021902820300020602820300020502810300 -820304020e028104020e0281000203028300020002010282000200810002040202000202 -010083020002008100028102000100010281000212028303000402160203000102810002 -0102810002810200010002020200010282000200810002190283030004021b0202000202 -0200030281000201028100021e0283030004021602810002020281000281020001000102 -81000202020200020202001b02820300020602820300020502810300 -820304020e028104024d0283030004022e028100021c0283030004024d0283030004024d -02820300020602820300020502810300 -820304020e028104024d0283030004022e028100021c0283030004024d0283030004024d -02820300020602820300020502810300 -820304020e0281040245024f04810302070283030004024d0283030004024d0282030002 -0602820300020502810300 -820304020e0281040245028104024d0282030002060283030004024d0283030004024d02 -820300020602820300020502810300 -820304020e0281040245028104024d0282030002060283030004024d0283030004024d02 -820300020602820300020502810300 -820304020e0281040245028104024d0282030002060283030004024d0283030004024d02 -820300020602820300020502810300 -8203040204024f0483030204024d02820300044e04820302044e04810302070282030002 -0602820300020502810300 -8203040204028104024d0283030004024d0283030004024d0283030004024d0282030002 -0602820300020602820300020502810300 -8203040204028104024d0283030004024d0283030004024d0283030004024d0282030002 -0602820300020602820300020502810300 -8203040204028104024d0283030004024d0283030004024d0283030004024d0282030002 -0602820300020602820300020502810300 -8203040204028104024d0283030004024d0283030004024d0283030004024d0282030002 -0602820300020602820300020502810300 -8203040204028104024d0283030004024d0283030004024d0283030004024d0282030002 -0602820300020602820300020502810300 -8203040204028104021f0202000702810002200283030004021a0204002d028303000402 -0d0202000802810002140203000102810002140283030004021b0202000e028100021d02 -820300020602820300020602820300020502810300 -8203040204028104021e0281000201028100020502810002200283030004021a02010001 -0201002c0283030004020c0281000201028100021d028100020102810002160283030004 -021a0281000201028100020c028100021d02820300020602820300020602820300020502 -810300 -8203040204028104021d02810002050202008102000100200283030004021a0201000102 -010001020300020204001e0283030004020b028100020302830002000201028400020002 -000200020202000202020004028100020102830002000281020083000200020e02830300 -04021902810002030281000281020001000202020081020001001d028203000206028203 -00020602820300020502810300 -8203040204028104021d02810002040281000201028300020002200283030004021a0201 -0001020100810200810002810200820002008100028102008100021d0283030004020b02 -810002050281000201028500020002000201028300020002010283000200020102810002 -02028100020102850002000200028102008100020e028303000402190281000205028100 -0201028300020002010283000200021d0282030002060282030002060282030002050281 -0300 -8203040204028104021d028100020502030082020002200283030004021a020100010201 -00810200810002810200820002008100028102008100021d0283030004020b0281000201 -020200820200020102850002000200020102820002000300010203000302030001028300 -02000201028100020e028303000402190281000201020200820200020102810002810200 -0200820200021d02820300020602820300020602820300020502810300 -8203040204028104021d02810002040281000201028300020002200283030004021a0201 -0001020100810200810002810200820002008100028102008100021d0283030004020b02 -810002030283000200020102850002000200020102830002000203028100020102810002 -02028100020302830002000201028100020e028303000402190281000203028300020002 -01028300020002010283000200021d028203000206028203000206028203000205028103 -00 -8203040204028104021e0281000201028300020002810200830002000220028303000402 -1a02010001020100810200810002810200820002008100028102008100021d0283030004 -020c02810002010281000282020002810200850002000200020102830002000201028300 -0200028102008100020202810002030283000200028102008100020e0283030004021a02 -8100020102810002820200020102830002000281020083000200021d0282030002060282 -0300020602820300020502810300 -8203040204028104021f0202000202010083020002008100021f0283030004021a020400 -02020300020204001e0283030004020d0202000302010086020002000200020102810002 -810200010002020100820200020202810002030281000281020083000200020e02830300 -04021b020200030202000202010083020002008100021c02820300020602820300020602 -820300020502810300 -8203040204028104024d0283030004022802810002010201001e0283030004023c028100 -020e0283030004024d02820300020602820300020602820300020502810300 -8203040204028104024d028303000402290203001f028303000402380203001002830300 -04024d02820300020602820300020602820300020502810300 -8203040204028104024d0283030004024d0283030004024d0283030004024d0282030002 -0602820300020602820300020502810300 -8203040204028104024d0283030004024d0283030004024d0283030004024d0282030002 -0602820300020602820300020502810300 -8203040204028104024d0283030004024d0283030004024d0283030004024d0282030002 -0602820300020602820300020502810300 -8203040204028104024d0283030004024d0283030004024d0283030004024d0282030002 -0602820300020602820300020502810300 -82030402040252044e027f042304820300020602820300020602820300020502810300 -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104021602810002030281000205028100020b028100020e028100020d02 -8100027f026d02820300020602820300020602820300020502810300 -82030402040281040216028100020b028100020a028100021f028100027f026d02820300 -020602820300020602820300020502810300 -820304020402810402160281000203028100028102000100810200010004020200010202 -0004020200010203000102840002000200020002020200010281000281020001007f0269 -02820300020602820300020602820300020502810300 -820304020402810402160281000203028300020002010283000200020302810002010281 -000282020002030281000201028300020002010284000200020083000200028402000200 -0201028500020002000201028100027f0267028203000206028203000206028203000205 -02810300 -820304020402810402160281000203028100028102008100020102810002030281000201 -028100028202000204020300820200020102850002000200028202000282020002810200 -0200820200028102008100027f0269028203000206028203000206028203000205028103 -00 -820304020402810402160281000203028100020202810002820200020302810002010281 -000282020002030281000201028300020002010285000200020002820200028402000200 -020102830002000202028100027f02680282030002060282030002060282030002050281 -0300 -820304020402810402160281000203028300020002010283000200020302810002010281 -000282020002030281000281020083000200020102850002000200028202000284020002 -00028102008500020002000201028100027f026702820300020602820300020602820300 -020502810300 -820304020402810402160204008202000281020001000102010004020200020281000204 -020100840200020002010285000200020002820200028202000281020085000200020002 -81020001007f026902820300020602820300020602820300020502810300 -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f025f024d00150282030002060282030002060282030002050281 -0300 -82030402040281040215027f032b031c028100044b048203000213028203000206028203 -00020602820300020502810300 -82030402040281040215028103007f0028008104021b028100044a040103810002130282 -0300020602820300020602820300020502810300 -8203040204028104021502820300047f0419040b0201008104021b028100048104024802 -01038100021302820300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048102040804810300820004021b02810004 -81040214029d000200020002000200020002000200020002000200020002000200020002 -150201038100021302820300020602820300020602820300020502810300 -8203040204028104021502820300047f041904820204020702810300820004021b028100 -04810402480201038100021302820300020602820300020602820300020502810300 -8203040204028104021502820300048204000402048100047f0411048202040207028103 -00820004021b028100048104021402810002190281000215020103810002130282030002 -0602820300020602820300020502810300 -8203040204028104021502820300048204000402048100047f0411048202040207028103 -00820004021b028100048104024802010381000213028203000206028203000206028203 -00020502810300 -820304020402810402150282030004820400040204810004810400010001048300040004 -81040001007f0403048202040202028100020202810300820004021b0281000481040214 -028100028102000100010281000211028100021502010381000213028203000206028203 -00020602820300020502810300 -820304020402810402150282030004810400040082040004010482000400810004820400 -0401048100047f04010482020402010202000202810300820004021b0281000481040216 -028100020102830002000229020103810002130282030002060282030002060282030002 -0502810300 -820304020402810402150282030004820400040204810004810400020082040004010404 -007f0402048202040281020003000102810300820004021b028100048104021402010005 -028100028102000100020202000202020001028100021502010381000213028203000206 -02820300020602820300020502810300 -820304020402810402150282030004820400040204830004000401048300040004010481 -00047f040504820204020702810300820004021b02810004810402150281000204028300 -020002010283000200020102830002000201028100021702010381000213028203000206 -02820300020602820300020502810300 -820304020402810402150282030004820400040204830004000481040083000400040104 -81000401048100047f040104820204020702810300820004021b02810004810402140201 -000502830002000201028100028102008100020102040082020002150201038100021302 -820300020602820300020602820300020502810300 -820304020402810402150282030004820400040204810004810400850004000400040204 -02007f040304820204020702810300820004021b02810004810402150281000204028300 -02000201028100020202810002820200021b020103810002130282030002060282030002 -0602820300020502810300 -8203040204028104021502820300047f041904810203090301008104021b028100048104 -021402830002000201028500020002000201028300020002010283000200020102830002 -0002150201038100021302820300020602820300020602820300020502810300 -8203040204028104021502820300047f0419040d008104021b0281000481040217020200 -010281000281020001000202020002020200190201038100021302820300020602820300 -020602820300020502810300 -8203040204028104021502820300047f0419048f02040204020402040204020402000402 -1b0281000481040214028100021902810002150201038100021302820300020602820300 -020602820300020502810300 -8203040204028104021502820300047f041a048e0204020402040204020402040004021b -028100048104024802010381000213028203000206028203000206028203000205028103 -00 -8203040204028104021502820300047f0419048f02040204020402040204020402000402 -1b0281000481040214028100021902810002150201038100021302820300020602820300 -020602820300020502810300 -8203040204028104021502820300047f041a048e0204020402040204020402040004021b -0281000481040215029b0002000200020002000200020002000200020002000200020002 -0002160201038100021302820300020602820300020602820300020502810300 -820304020402810402150282030004810400030007048100040304810004030483000400 -047b048f020402040204020402040204020004021b028100048104024802010381000213 -02820300020602820300020602820300020502810300 -820304020402810402150282030004820400040204810004050481000403048100040504 -8100047c048e0204020402040204020402040004021b0281000481040248020103810002 -1302820300020602820300020602820300020502810300 -820304020402810402150282030004820400040204810004810400010001048200040081 -0004830400040081000481040002007b048f020402040204020402040204020004021b02 -820004034b038100021302820300020602820300020602820300020502810300 -820304020402810402150282030004810400030001048100040104820004008100048304 -00040081000486040004000400047b040b0201008104021b028100034c03810002130282 -0300020602820300020602820300020502810300 -820304020402810402150282030004820400048204000402040300820400040104830004 -00040104850004000400047b048102040804810300820004021c024d0015028203000206 -02820300020602820300020502810300 -820304020402810402150282030004820400040104810004820400040104830004000401 -0483000400040104850004000400047b04820204020702810300820004027f0283020300 -020602820300020602820300020502810300 -820304020402810402150282030004820400040104810004820400048104008200040081 -0004830400040081000486040004000400047b04820204020702810300820004027f0283 -020300020602820300020602820300020502810300 -820304020402810402150282030004820400040204810004810400860004000400040081 -0004830400040081000483040004008100047a04820204020702810300820004027f0283 -020300020602820300020602820300020502810300 -8203040204028104021502820300047f041904820204020702810300820004027f028302 -0300020602820300020602820300020502810300 -8203040204028104021502820300047f041904820204020702810300820004027f028302 -0300020602820300020602820300020502810300 -8203040204028104021502820300047f041904820204020702810300820004021c024d00 -1502820300020602820300020602820300020502810300 -8203040204028104021502820300047f041904820204020702810300820004021b028100 -044b04820300021302820300020602820300020602820300020502810300 -8203040204028104021502820300047f041904820204020702810300820004021b028100 -044a0401038100021302820300020602820300020602820300020502810300 -8203040204028104021502820300047f041904820204020702810300820004021b028100 -04810402480201038100021302820300020602820300020602820300020502810300 -82030402040281040215028203000401040300070481000411048100040c048100048204 -00040d048100040204810004820400044b04820204020702810300820004021b02810004 -810402480201038100021302820300020602820300020602820300020502810300 -820304020402810402150282030004820400040204810004050481000411048100040c04 -810004820400040d0481000402048100044e04820204020702810300820004021b028100 -04810402480201038100021302820300020602820300020602820300020502810300 -820304020402810402150282030004820400040504020001048200040081000484040004 -000481040001000404020001040200020402008104000100830400040081000401040200 -020401008204000401040200820400048104008300040004810400010001048300040004 -3b04820204020702810300820004021b0281000481040248020103810002130282030002 -0602820300020602820300020502810300 -820304020402810402150282030004010401000304810004010482000400810004830400 -040081000482040004010481000403048100048204000401048300040004010483000400 -048104008100048404000400040104830004000481040081000402048100048404000400 -0481040083000400040104820004008100043c04820204020702810300820004021b0281 -0004810402480201038100021302820300020602820300020602820300020502810300 -820304020402810402150282030004030401000204030082040004010483000400040104 -040004048100048204000401048300040004010483000400048204000401048200040003 -0082040004010481000402048100048404000400040104820004000300820400043d0482 -0204020702810300820004021b0281000481040218028100020202810002050281000220 -0201038100021302820300020602820300020602820300020502810300 -820304020402810402150282030004050483000400040104830004000401048300040004 -010481000403040200820400048204000401048300040004010483000400048204000401 -048300040004030481000401048100040204810004840400040004010483000400040304 -8100043d04820204020702810300820004021b0281000481040218028100020202810002 -0502810002200201038100021302820300020602820300020602820300020502810300 -820304020402810402150282030004820400040204830004000481040082000400810004 -840400040004010481000401048100040304810004820400040104830004000401048300 -040004820400040104830004000401048300040004810400810004020481000484040004 -00048104008300040004010483000400043d04820204020702810300820004021b028100 -0481040218028100020202810002810200010001028400020002008100021b0201038100 -021302820300020602820300020602820300020502810300 -820304020402810402150282030004010403000204010085040004000400810004820400 -040204020005040100010402000204020001040100820400040104810004810400010002 -0401008204000402040100820400048104008300040004810400010001048100043d0482 -0204020702810300820004021b0281000481040218020500820200020102840002000200 -810002820200021a02010381000213028203000206028203000206028203000205028103 -00 -82030402040281040215028203000451048100044504820204020702810300820004021b -028100048104021802810002020282000200030084020002000201028100021a02010381 -00021302820300020602820300020602820300020502810300 -8203040204028104021502820300044d0403004704820204020702810300820004021b02 -8100048104021802810002020283000200020302830002000201028100021a0201038100 -021302820300020602820300020602820300020502810300 -8203040204028104021502820300047f041904820204020702810300820004021b028100 -048104021802810002020283000200020102840002000200810002820200021a02010381 -00021302820300020602820300020602820300020502810300 -8203040204028104021502820300047f041904820204020702810300820004021b028100 -0481040218028100020202810002810200010001028400020002008100021b0201038100 -021302820300020602820300020602820300020502810300 -8203040204028104021502820300047f041904820204020702810300820004021b028100 -0481040227028100021e0201038100021302820300020602820300020602820300020502 -810300 -8203040204028104021502820300047f041904820204020702810300820004021b028100 -0481040227028100021e0201038100021302820300020602820300020602820300020502 -810300 -8203040204028104021502820300048104000300030404007f040a048202040207028103 -00820004021b028100048104024802010381000213028203000206028203000206028203 -00020502810300 -8203040204028104021502820300040204810004040481000402048100047f0408048102 -03090301008104021b028100048104024802010381000213028203000206028203000206 -02820300020502810300 -820304020402810402150282030004020481000404048100040204810004810400010001 -0481000401048100047c040d008104021b02810004810402480201038100021302820300 -020602820300020602820300020502810300 -820304020402810402150282030004020481000404040400010481000401048100048404 -000400047d040b0201008104021b02810004810402480201038100021302820300020602 -820300020602820300020502810300 -820304020402810402150282030004020481000404048100048204000401040400020481 -00047e048102040804810300820004021b02820004034b03810002130282030002060282 -0300020602820300020502810300 -820304020402810402150282030004020481000404048100040104810004820400040504 -8100047e04820204020702810300820004021b028100034c038100021302820300020602 -820300020602820300020502810300 -820304020402810402150282030004020481000404048100040104810004820400040104 -8100048404000400047d04820204020702810300820004021c024d001502820300020602 -820300020602820300020502810300 -820304020402810402150282030004020481000404048100040204810004810400010001 -0481000401048100047c04820204020702810300820004027f0283020300020602820300 -020602820300020502810300 -8203040204028104021502820300047f0419048202040281020003000102810300820004 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048202040201020200020281030082000402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048202040202028100020202810300820004 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f041904820204020702810300820004027f028302 -0300020602820300020602820300020502810300 -8203040204028104021502820300047f041904820204020702810300820004027f028302 -0300020602820300020602820300020502810300 -8203040204028104021502820300047f041904820204020702810300820004027f028302 -0300020602820300020602820300020502810300 -8203040204028104021502820300047f041904810203090301008104027f028302030002 -0602820300020602820300020502810300 -8203040204028104021502820300047f0419040d008104027f0283020300020602820300 -020602820300020502810300 -82030402040281040215028103027f021a020d008104027f028302030002060282030002 -0602820300020502810300 -82030402040281040215027f042b047f0201028203000206028203000206028203000205 -02810300 -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104021602810002020281000205028100027f027f021d02820300020602 -820300020602820300020502810300 -82030402040281040216020100020281000205028100027f027f021d0282030002060282 -0300020602820300020502810300 -820304020402810402160283000200028202000281020001008102000100010202000202 -02007f027f021202820300020602820300020602820300020502810300 -820304020402810402160283000200028402000200020102830002000282020002010283 -0002000201028100027f027f021002820300020602820300020602820300020502810300 - -820304020402810402160281000286020002000200020102830002000281020003000102 -01007f027f021302820300020602820300020602820300020502810300 -820304020402810402160281000286020002000200020102830002000282020002060281 -00027f027f021102820300020602820300020602820300020502810300 -820304020402810402160281000201020100820200020102830002000282020002010283 -0002000201028100027f027f021002820300020602820300020602820300020502810300 - -820304020402810402160281000202028100028102000100010201000102020002020200 -7f027f021202820300020602820300020602820300020502810300 -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -82030402040281040215027f032b037f0201028203000206028203000206028203000205 -02810300 -82030402040281040215028103007f0028008104027f0283020300020602820300020602 -820300020502810300 -8203040204028104021502820300047f04190482000204080483030004027f0283020300 -020602820300020602820300020502810300 -8203040204028104021502820300047f0419048300020402070283030004027f02830203 -00020602820300020602820300020502810300 -8203040204028104021502820300047f0419048300020402070283030004027f02830203 -00020602820300020602820300020502810300 -8203040204028104021502820300047f0419048300020402070283030004027f02830203 -00020602820300020602820300020502810300 -8203040204028104021502820300048104000200240481000415048100040f0481000403 -048100048204000418048100040d048100040f0483000204020202810002020283030004 -027f0283020300020602820300020602820300020502810300 -82030402040281040215028403000400040204810004220481000415048100040f048100 -0403048100048204000428048100040f04830002040201020200020283030004027f0283 -020300020602820300020602820300020502810300 -820304020402810402150284030004000405040200010482000400020002040200040403 -000204020081040001000104020002040200050402000104820004008100040104020001 -048100040104030002040200830400040081000401040200050402000104030001048400 -04000400020002040200010481000481040001000b048300020402810200030001028303 -0004027f0283020300020602820300020602820300020502810300 -820304020402810402150282030004810400810004020481000401048200040083000400 -048404000400040104810004020481000401048300040004010483000400048204000401 -048300040004010481000402048100040104820004008100048404000400040104830004 -000401048300040004030481000481040081000484040004000401048100040204810004 -010483000400040104840004000400830004000484040004000401048500040004000401 -0481000409048300020402070283030004027f0283020300020602820300020602820300 -020502810300 -820304020402810402150282030004020401000104810004010483000400048204000483 -040004000300030481000401048300040004010483000400048104000300010401000604 -030082040004010483000400040104830004000401048300040004030481000482040004 -010482000400030004040300820400040104850004000400048204000482040004810400 -0200820400048104008100040b048300020402070283030004027f028302030002060282 -0300020602820300020502810300 -820304020402810402150282030004040483000400040104830004000482040004840400 -040004060481000401048300040004010483000400048204000406048100040304810004 -010483000400040104830004000401048300040004010483000400040304810004820400 -040104830004000406048100040104830004000401048500040004000482040004840400 -0400040104830004000402048100040a048300020402070283030004027f028302030002 -0602820300020602820300020502810300 -820304020402810402150284030004000402048300040004010483000400048204000484 -040004000401048100040204810004010483000400040104830004000482040004010483 -000400040104810004020481000481040082000400810004840400040004010483000400 -048104008300040004030481000482040004010483000400040104810004020481000481 -040083000400040104850004000400048204000484040004000481040085000400040004 -01048100040904820002030903820004027f028302030002060282030002060282030002 -0502810300 -820304020402810402150282030004810400020002040200010481000482040004820400 -048104000100040481000401048100048104000100010401000104020002040200050401 -008504000400040081000401040200020401008304000400810004020401008204000401 -048100048104000100050401008404000400040104850004000400048204000482040004 -8104008500040004000481040001000b040d008104027f02830203000206028203000206 -02820300020502810300 -8203040204028104021502820300047f0419048100020a02820004027f02830203000206 -02820300020602820300020502810300 -8203040204028104021502820300047f04190482000204080483030004027f0283020300 -020602820300020602820300020502810300 -8203040204028104021502820300047f0419048300020402070283030004027f02830203 -00020602820300020602820300020502810300 -8203040204028104021502820300047f0419048300020402070283030004027f02830203 -00020602820300020602820300020502810300 -8203040204028104021502820300047f0419048300020402070283030004027f02830203 -00020602820300020602820300020502810300 -8203040204028104021502820300047f0419048300020402070283030004027f02830203 -00020602820300020602820300020502810300 -820304020402810402150284030004000408048100048204000403048100040804810004 -78048300020402070283030004027f028302030002060282030002060282030002050281 -0300 -8203040204028104021502820300040a04810004820400040e0481000478048300020402 -070283030004027f0283020300020602820300020602820300020502810300 -820304020402810402150285030004000400020003040200830400040081000482040004 -810400010004048200040081000401040200010481000401048100048104000100020402 -005e048300020402070283030004027f0283020300020602820300020602820300020502 -810300 -820304020402810402150286030004000400040104810004020481000481040081000486 -040004000400040104810004020401000104830004000401048300040004010483000400 -040104830004000401048100045c048300020402070283030004027f0283020300020602 -820300020602820300020502810300 -820304020402810402150286030004000400040104810004020481000482040004010483 -000400048104008100040404810004010483000400040104830004000401048100048104 -00810004010404005d048300020402070283030004027f02830203000206028203000206 -02820300020502810300 -820304020402810402150286030004000400040104810004020481000482040004010483 -000400040204810004030481000401048300040004010483000400040104810004020481 -0004820400046004820002030903820004027f0283020300020602820300020602820300 -020502810300 -820304020402810402150286030004000400040104810004020481000482040004010485 -000400040004010481000402048100040104830004000401048300040004810400830004 -00040104830004000401048100045c040d008104027f0283020300020602820300020602 -820300020502810300 -820304020402810402150286030004000400040104810004020401008204000401048300 -040004810400010004048100040104810004810400010002040100820400048104000100 -020402005e048d00040204020402040204020402048104027f0283020300020602820300 -020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048d00040204020402040204020402048104 -027f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048f00020402040204020402040204020402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048100020a02820004027f02830203000206 -02820300020602820300020502810300 -8203040204028104021502820300047f04190482000204080483030004027f0283020300 -020602820300020602820300020502810300 -8203040204028104021502820300047f0419048300020402070283030004027f02830203 -00020602820300020602820300020502810300 -8203040204028104021502820300047f0419048300020402070283030004027f02830203 -00020602820300020602820300020502810300 -8203040204028104021502820300047f0419048300020402070283030004027f02830203 -00020602820300020602820300020502810300 -8203040204028104021502820300047f0419048300020402810200030001028303000402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f041904830002040201020200020283030004027f -0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048300020402020281000202028303000402 -7f0283020300020602820300020602820300020502810300 -8203040204028104021502820300047f0419048300020402070283030004027f02830203 -00020602820300020602820300020502810300 -8203040204028104021502820300047f0419048300020402070283030004027f02830203 -00020602820300020602820300020502810300 -8203040204028104021502820300047f0419048300020402070283030004027f02830203 -00020602820300020602820300020502810300 -8203040204028104021502820300047f041904820002030903820004027f028302030002 -0602820300020602820300020502810300 -82030402040281040215028103027f021a020d008104027f028302030002060282030002 -0602820300020502810300 -82030402040281040215027f042b047f0201028203000206028203000206028203000205 -02810300 -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f024302820300020602820300020602820300020502810300 - -8203040204028104027f027f0243028203000206028203000307038100020502810300 -8203040204028104027f027f02430282030002060281030008000702810300 -8203040204028104027f027f024302820300020602820300020f02810300 -8203040204028104027f027f024302820300020602820300020f02810300 -8203040204028104027f027f024302820300020602820300020f02810300 -8203040204028104027f027f024302820300020602820300020f02810300 -8203040204028104027f027f024302820300020602820300020f02810300 -8203040204028104027f027f024302820300020602820300020f02810300 -8203040204028104027f027f024302820300020602820300020f02810300 -8203040204028104027f027f024302820300020602820300020f02810300 -8203040204028104027f027f024302820300020602820300020f02810300 -8203040204028104027f027f024302820300020602820300020f02810300 -8203040204028104027f027f024302820300020602820300020f02810300 -8203040204028104027f027f024302820300020602820300020f02810300 -8203040204028104027f027f024302820300020602820300020f02810300 -8203040204028104027f027f024302820300020602820300020f02810300 -8203040204028104027f027f024302820300020602820300020f02810300 -8203040204028104027f027f024302820300020602820300020f02810300 -8203040204028104027f027f024302820300020602820300020f02810300 -8203040204028104027f027f024302820300020602820300020f02810300 -8203040204028104027f027f0243028203000307038100020f02810300 -8203040204028104027f027f02430281030008001102810300 -8203040204028104027f027f024302820300021902810300 -8203040204028104027f027f024302820300021902810300 -8203040204028104027f027f024302820300021902810300 -8203040204028104027f027f024302820300021902810300 -8203040204028104027f027f024302820300021902810300 -8203040204028104027f027f024302820300021902810300 -8203040204028104027f027f024302820300021902810300 -8203040204028104027f027f024302820300021902810300 -8203040204028104027f027f024302820300021902810300 -8203040204028104027f027f024302820300021902810300 -8203040204028104027f027f024302820300021902810300 -8203040204028104027f027f024302820300021902810300 -8203040204028104027f027f024302820300021902810300 -8203040204028104027f027f024302820300021902810300 -8203040204028104027f027f024302820300021902810300 -8203040204028104027f027f024302820300021902810300 -8203040204028104027f027f024302820300021902810300 -8203040204028104027f027f024302820300021902810300 -8203040204028104037f037f0344038100021902810300 -8203040204027f007f0047001a02810300 -820304027f027f026702810300 -820304027f027f026702810300 -820304027f027f026702810300 -820304027f027f026702810300 -820304027f027f026702810300 -7f037f036b030000 -7f007f006c00 - -% -% Compression made this file 5.76% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/docs/latex/wx/wxtab1.gif b/docs/latex/wx/wxtab1.gif deleted file mode 100644 index 510fb5710b..0000000000 Binary files a/docs/latex/wx/wxtab1.gif and /dev/null differ diff --git a/docs/licence.txt b/docs/licence.txt deleted file mode 100644 index e9e6035d5c..0000000000 --- a/docs/licence.txt +++ /dev/null @@ -1,224 +0,0 @@ -wxWindows Licence ------------------ - -Copyright (c) 1998 Julian Smart, Markus Holzem - - -Preamble --------- - -This licence is intended to protect wxWindows, its developers, -and its users, so that the considerable investment it represents -is not abused. - -Unlike the L-GPL licence, you as a user are not obliged to -distribute wxWindows source code with your products. However, -you are prevented from selling the code without permission from -the authors, or denying others the rights to use or distribute -wxWindows in the way intended. - -The wxWindows Licence establishes the copyright for the code and -related material, and it gives you legal permission to copy, -distribute and/or modify the library. It also asserts that no -warranty is given by the authors for this or derived code. - -Finally, the licence specifies that any patent involving -wxWindows, must be licenced for everyone's free use. - -wxWindows Licence ------------------ - -Terms and conditions for copying, distribution and modification - -1. This Licence Agreement applies to any software library which -contains a notice placed by the copyright holder or other -authorized party saying it may be distributed under the terms of -this wxWindows Licence (also called "this Licence"). Each -licencee is addressed as "you". - -A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application -programs (which use some of those functions and data) to form -executables. - -The "Library", below, refers to any such software library or -work which has been distributed under these terms. A "work -based on the Library" means either the Library or any derivative -work under copyright law: that is to say, a work containing the -Library or a portion of it, either verbatim or with -modifications and/or translated straightforwardly into another -language. (Hereinafter, translation is included without -limitation in the term "modification".) - -"Source code" for a work means the preferred form of the work -for making modifications to it. For a library, complete source -code means all the source code for all modules it contains, plus -any associated interface definition files, plus the scripts used -to control compilation and installation of the library. - -Activities other than copying, distribution and modification are -not covered by this Licence; they are outside its scope. The act -of running a program using the Library is not restricted, and -output from such a program is covered only if its contents -constitute a work based on the Library (independent of the use -of the Library in a tool for writing it). Whether that is true -depends on what the Library does and what the program that uses -the Library does. - -2. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided -that you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep -intact all the notices that refer to this Licence and to the -absence of any warranty; and distribute a copy of this Licence -along with the Library. - -You may charge a fee for the physical act of transferring a -copy, and you may at your option offer warranty protection in -exchange for a fee. - -3. You may modify your copy or copies of the Library or any -portion of it, thus forming a work based on the Library, and -copy and distribute such modifications or work under the terms -of Section 1 above, provided that you cause the files modified -to carry prominent notices stating that you changed the files -and the date of any change. With agreement from the authors of -wxWindows, you may charge for value added to the Library, for -example, a commercially supported version, or a port to a new -platform. It is expected that collaboration between such -commercial interests and the free wxWindows community will yield -benefits to both parties, since wxWindows represents a -substantial investment of time and effort. It is not in the -spirit of this agreement that commercial exploitation of -wxWindows should in any way detract from the free version. - -4. You may copy and distribute the Library in object code or -derived library form under the terms of Sections 1 and 2 above -provided that you accompany it with the complete corresponding -machine-readable source code. - -If distribution of object code is made by offering access to -copy from a designated place, then offering equivalent access to -copy the source code from the same place satisfies the -requirement to distribute the source code, even though third -parties are not compelled to copy the source along with the -object code. - -5. You may not copy, modify, sublicence, link with, or -distribute the Library except as expressly provided under this -Licence. Any attempt otherwise to copy, modify, sublicence, -link with, or distribute the Library is void, and will -automatically terminate your rights under this Licence. -However, parties who have received copies, or rights, from you -under this Licence will not have their licences terminated so -long as such parties remain in full compliance. - -6. You are not required to accept this Licence, since you have -not signed it. However, nothing else grants you permission to -modify or distribute the Library or its derivative works. These -actions are prohibited by law if you do not accept this Licence. -Therefore, by modifying or distributing the Library (or any work -based on the Library), you indicate your acceptance of this -Licence to do so, and all its terms and conditions for copying, -distributing or modifying the Library or works based on it. - -7. Each time you redistribute the Library (or any work based on -the Library), the recipient automatically receives a licence -from the original licensor to copy, distribute, link with or -modify the Library subject to these terms and conditions. You -may not impose any further restrictions on the recipients' -exercise of the rights granted herein. You are not responsible -for enforcing compliance by third parties to this Licence. - -8. If, as a consequence of a court judgment or allegation of -patent infringement or for any other reason (not limited to -patent issues), conditions are imposed on you (whether by court -order, agreement or otherwise) that contradict the conditions of -this Licence, they do not excuse you from the conditions of this -Licence. If you cannot distribute so as to satisfy -simultaneously your obligations under this Licence and any other -pertinent obligations, then as a consequence you may not -distribute the Library at all. For example, if a patent licence -would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, -then the only way you could satisfy both it and this Licence -would be to refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable -under any particular circumstance, the balance of the section is -intended to apply, and the section as a whole is intended to -apply in other circumstances. - -It is not the purpose of this section to induce you to infringe -any patents or other property right claims or to contest -validity of any such claims; this section has the sole purpose -of protecting the integrity of the free software distribution -system which is implemented by public licence practices. Many -people have made generous contributions to the wide range of -software distributed through that system in reliance on -consistent application of that system; it is up to the -author/donor to decide if he or she is willing to distribute -software through any other system and a licencee cannot impose -that choice. - -This section is intended to make thoroughly clear what is -believed to be a consequence of the rest of this Licence. - -9. If the distribution and/or use of the Library is restricted -in certain countries either by patents or by copyrighted -interfaces, the original copyright holder who places the Library -under this Licence may add an explicit geographical distribution -limitation excluding those countries, so that distribution is -permitted only in or among countries not thus excluded. In such -case, this Licence incorporates the limitation as if written in -the body of this Licence. - -10. The authors of wxWindows may publish revised and/or new -versions of the wxWindows Licence from time to time. Such new -versions will be similar in spirit to the present version, but -may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the -Library specifies a version number of this Licence which applies -to it and "any later version", you have the option of following -the terms and conditions either of that version or of any later -version published by the wxWindows authors. If the Library does -not specify a licence version number, you may choose any version -ever published by the wxWindows authors. - -11. If you wish to incorporate parts of the Library into other -free programs whose distribution conditions are incompatible -with these, write to the program author to ask for permission. -For software which is copyrighted by the wxWindows authors, -write to the wxWindows authors. Our decision will be guided by -the two goals of preserving the free status of all derivatives -of our free software and of promoting the sharing and reuse of -software generally. - -NO WARRANTY ------------ - -12. BECAUSE THE LIBRARY IS LICENCED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE -LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT -WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE -QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE -LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY -SERVICING, REPAIR OR CORRECTION. - -13. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO -IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY -MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE -LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, -INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR -INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS -OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH -ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN -ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -END OF TERMS AND CONDITIONS - diff --git a/docs/msw/changes.txt b/docs/msw/changes.txt deleted file mode 100644 index 5af8da209b..0000000000 --- a/docs/msw/changes.txt +++ /dev/null @@ -1,316 +0,0 @@ - -wxWindows 2.0 for Windows Change Log ------------------------------------- - -Alpha 14, July 31st 1998 ------------------------- - -- Toolbar API has been simplified, and now - wxFrame::GetClientArea returns the available client - area when toolbar, status bar etc. have been accounted for. - wxFrame::CreateToolBar added in line with CreateStatusBar. -- Documentation updates, incl. for wxToolBar. -- New wxAcceleratorTable class plus wxFrame::SetAcceleratorTable. -- Various additions from other folk, e.g. streams, wxConfig - changes, wxNotebook. -- Added wxDocMDIParentFrame, wxDocMDIChildFrame for doc/view. - -Alpha 13, July 8th 1998 ------------------------ - -- Implemented wxPoint as identical to POINT on Windows, and - altered wxDC wxPoint functions to use wxPoint directly in - Windows functions, for efficiency. -- Cured wxASSERT bug in wxStatusBar95. -- #ifdefed out some bits in oleutils.cpp for compilers that - don't support it. -- Added some operators to wxPoint, wxSize. -- Added inline wxDC functions using wxPoint, wxSize, wxRect. - -Alpha 12, July 7th 1998 ------------------------ - -- Added wxApp::GetComCtl32Version, and wxTB_FLAT style, so can - have flat toolbars on Win98 or Win95 with IE >= 3 installed. - -Alpha 11, July 3rd 1998 ------------------------ - -- Added thread.h, thread.cpp. -- Changed Enabled, Checked to IsEnabled, IsChecked in wxMenu, - wxMenuBar. -- Changed wxMenuItem::SetBackColor to SetBackgroundColour, - SetTextColor to SetTextColour, and added or made public several - wxMenuItem accessors. -- Added two overloads to wxRegion::Contains. Added - wxRegion::IsEmpty for a more consistent naming convention. -- Added Vadim's wxDataObject and wxDropSource. -- ENTER/LEAVE events now work. -- Cured wxMemoryDC bug where the DC wasn't being deleted. -- Cured wxGauge SetSize major bugginess. -- Cured problem where if a GDI object was created on the stack, - then went out of scope, then another object was selected into - the DC, GDI objects would leak. This is because the assignment - to e.g. wxDC::m_pen would delete the GDI object without it first - being selected out of the DC. Cured by selecting the old DC object - first, then doing the assignment. -- Split up wxGaugeMSW, wxGauge95, wxSliderMSW, wxSlider95 -- Various other bug fixes and additions. - -Alpha 10, May 7th 1998 ----------------------- - -- Added desiredWidth, desiredHeight parameters to wxBitmapHandler - and wxIcon functions so that you can specify what size of - icon should be loaded. Probably will remain a Windows-specific thing. -- wxStatusBar95 now works for MDI frames. -- Toolbars in MDI frames now behave normally. They still - require application-supplied positioning code though. -- Changed installation instructions, makefiles and batch files - for compiling with Gnu-Win32/Mingw32/EGCS. Also timercmn.cpp - change to support Mingw32/EGCS. Bison now used by default. - -Alpha 9, April 27th 1998 ------------------------- - -- Cured bug in wxStatusBar95 that caused a crash if multiple - fields were used. -- Added Gnu-Win32 b19/Mingw32 support by changing resource - compilation and pragmas. -- Cured wxMenu bug introduced in alpha 8 - didn't respond to - commands because VZ changed the id setting in wxMenu::MSWCommand. - -Alpha 8, April 17th 1998 ------------------------- - -- Added IsNull to wxGDIObject to check if the ref data is present or not. -- Added PNG handler and sample - doesn't work for 16-bit PNGs for - some reason :-( -- Added wxJoystick class and event handling, and simple demo. -- Added simple wxWave class. Needs Stop() function. -- Added wxModule (module.h/module.cpp) to allow definition - of modules to be initialized and cleaned up on wxWindows - startup/exit. -- Start of Mingw32 compatibility (see minimal and dialogs samples - makefile.m95 files, and install.txt). -- Note: Windows printing has stopped working... will investigate. -VADIM'S CHANGES: -- Updated wxString: bug fixes, added wxArrayString, some - compatibility functions. -- Updated log.h/cpp, added wxApp::CreateLogTarget. -- file.h: new wxTempFile class. -- defs.h: added wxSB_SIZE_GRIP for wxStatusBar95 -- statbr95: wxStatusBar95 control. -- registry.h/cpp: wxRegKey class for Win95 registry. -- listbox.cpp: corrected some bugs with owner-drawn listboxes. -- wxConfig and wxFileConfig classes. - -Alpha 7, March 30th 1998 ------------------------- - -- Added tab classes, tab sample. -- Now can return FALSE from OnInit and windows will be - cleaned up properly before exit. -- Improved border handling so panels don't get borders - automatically. -- Debugged MDI activation from Window menu. -- Changes to memory debug handling, including checking for - memory leaks on application exit - but see issues.txt for - unresolved issues. -- Added wxTaskBarIcon (taskbar.cpp/h, plus samples/taskbar) - to allow maintenance of an icon in the Windows 95 taskbar - tray area. -- Got MFC sample working (MFC and wxWindows in the same - application), partly by tweaking ntwxwin.mak settings. -- Got DLL compilation working again (VC++). -- Changed wxProp/Dialog Editor filenames. - -Alpha 6, March 10th 1998 ------------------------- - -- Found stack error bug - stopped unwanted OnIdle recursion. -- Removed bug in wxTreeCtrl::InsertItem I added in alpha 5. -- Changed exit behaviour in wxApp/wxFrame/wxDialog. Now will - check if the number of top-level windows is zero before - exiting. Also, wxApp::GetTopWindow will return either - m_topWindow or the first member of wxTopLevelWindows, so you - don't have to call wxApp::SetTopWindow. -- Added dynarray.h/dynarray.cpp (from Vadim). -- Added first cut at OLE drag and drop (from Vadim). dnd sample - added. Drop target only at this stage. See src/msw/ole/*.cpp, - wx/include/msw/ole/*.h. WIN32 only because of UUID usage. - Doesn't work with GnuWin32 - no appropriate headers e.g. for - IUnknown. - Doesn't work with BC++ either - crashes on program startup. -- Added Vadim's owner-draw modifications - will probably remain - Windows-only. This enhances wxMenu, wxListBox. See ownerdrw sample. -- Added wxLB_OWNERDRAW for owner-draw listboxes. -- Vadim's wxCheckListBox derives from wxListBox. See checklst sample. - Doesn't entirely work for WIN16. -- Vadim has added wxMenuItem as a separate file menuitem.cpp. It - can also be used as an argument to wxMenu::Append, not just for - internal implementation. -- Some #ifdefs done for MINGW32 compilation (just alter OPTIONS - in makeg95.env, together with mingw32.bat). However, resource - binding is not working yet so most apps with dialogs crash. - -Alpha 5, 14th February 1998 ---------------------------- - -- GENERIC AND MSW-SPECIFIC CODE NOW TREATED AS TWO SEPARATE - DISTRIBUTIONS. This change log will therefore now refer to - the Windows-specific code only. See docs/changes.txt for generic - changes. -- Removed Windows-specific reference counting system (GDI - resources were cleaned up in idle time) - minimal - advantages now we have a wxWin reference counting system. -- Added missing WXDLLEXPORT keywords so DLL compilation works - again. -- Removed most warnings for GnuWin32 compilation. -- Added wxRegion/wxRegionIterator, but haven't yet used it in - e.g. wxDC. - -Alpha 4, 31st January 1998 --------------------------- - -- Changed wxDC functions to take longs instead of floats. GetSize now takes - integer pointers, plus a version that returns a wxSize. -- const keyword added to various wxDC functions. -- Under Windows, wxDC no longer has any knowledge of whether - an associated window is scrolled or not. Instead, the device - origin is set by wxScrolledWindow in wxScrolledWindow::PrepareDC. -- wxScrolledWindow applications can optionally override the virtual OnDraw - function instead of using the OnPaint event handler. The wxDC passed to - OnDraw will be translated by PrepareDC to reflect scrolling. - When drawing outside of OnDraw, must call PrepareDC explicitly. -- wxToolBarBase/wxToolBarSimple similarly changed to allow for - scrolling toolbars. -- Integrated wxPostScriptDC patches for 1.xx by Chris Breeze, - to help printing with multiple pages. -- IPC classes given base classes (wxConnectionBase etc.) which - define the API used by different implementations. DDE - implementation updated to use these base classes. -- wxHelpInstance now separated into wxHelpControllerBase (base - for all implementations), wxWinHelpController (uses standard - WinHelp), wxXLPHelPController (talks to wxHelp by DDE or - TCP/IP). There will be others eventually, such as - wxHTMLHelpController for Microsoft (and Netscape?) HTML Help. -- Added Vadim Zeitlin's wxString class plus - internationalization code (gettext simulation, wxLocale, etc.). - New files from Vadim: - include\wx\string.h - include\wx\debug.h - include\wx\file.h - include\wx\log.h - include\wx\intl.h - src\common\string.cpp - src\common\log.cpp - src\common\intl.cpp - src\common\file.cpp - No longer use GNU wxString files. -- Split off file-related functions into include\wx\filefn.h and - src\common\filefn.cpp. -- Borland C++ support (WIN32) for main library and - samples, using makefile.b32 files. -- Preparation done for allowing BC++ to compile wxWin as a DLL, - including changes to defs.h. -- wxIntPoint removed, wxPoint is now int, and wxRealPoint - introduced. -- Added wxShowEvent (generated when window is being shown or - hidden). -- Got minimal, docview, mdi samples working for 16-bit VC++ and - cured 16-bit problem with wxTextCtrl (removed global memory - trick). -- Updated GnuWin32 makefiles, checked minimal, mdi, docview samples. - -Alpha 3, September 1997 ------------------------ - -- wxListCtrl, wxTreeCtrl, wxImageList classes done. -- Instigated new file hierarchy, split files and classes up more logically. -- PrologIO and some other utils now put into core library. -- Revamped print/preview classes, added wxPageSetupDialog. -- Started documentation. - -Alpha 2, 30th April 1997 ------------------------- - -- EVT_... macros now have at least one argument, for conformance - with MetroWerks compiler. -- Added ids to .wxr file format. -- Got Dialog Editor compiled and running again but need - to extend functionality to be in line with new controls. - Added dialoged\test app to allow dynamic loading of .wxr files - for testing purposes. -- Rewrote wxBitmap to allow installable file type - handlers. -- Rewrote wxBitmapButton, wxStaticBitmap to not use Fafa. -- Wrote most of wxTreeCtrl and sample (need wxImageList to implement it - fully). -- Added back wxRadioBox. -- Tidied up wx_main.cpp, wxApp class, putting PenWin code in - a separate file. - -Alpha 1, 5th April 1997 ------------------------ - -At this point, the following has been achieved: - -- A lot, but not all, of the code has been revamped for better - naming conventions, protection of data members, and use of - wxString instead of char *. -- Obsolete functionality deleted (e.g. default wxPanel layout, - old system event system) and code size reduced. -- Class hierarchy changed (see design doc) - base classes such - as wxbWindow now removed. -- No longer includes windows.h in wxWin headers, by using stand-in - Windows types where needed e.g. WXHWND. -- PrologIO revised. -- wxScrolledWindow, wxStatusBar and new MDI classes added. - MDI is now achived using separate classes, not window styles. -- wxSystemSettings added, and made use of to reflect standard - Windows settings. -- SetButtonFont/SetLabelFont replaced by SetFont; font and colour - settings mucho rationalised. -- All windows are now subclassed with the same window proc to make - event handling far more consistent. Old internal wxWnd and derived - classes removed. -- API for controls revised, in particular addition of - wxValidator parameters and removal of labels for some controls. -- 1 validator written: see examples/validate. -- Event table system introduced (see most samples and - wx_event.cpp/ProcessEvent, wx_event.h). wxEvtHandler - made more flexible, with Push/PopEventHandler allowing a chain - of event handlers. -- wxRadioBox removed - will be added back soon. -- Toolbar class hierarchy revised: - wxToolBarBase - wxToolBarSimple (= old wxToolBar) - wxToolBar95 (= old wxButtonBar under Win95 - wxToolBarMSW (= old wxButtonBar under WIN16/WIN32) -- Constraint system debugged somewhat (sizers now work properly). -- wxFileDialog, wxDirDialog added; other common dialogs now - have class equivalents. Generic colour and font dialogs - rewritten to not need obsolete panel layout. -- .wxr resource system partially reinstated, though needs - an integer ID for controls. Hopefully the resource system - will be replaced by something better and more efficient - in the future. -- Device contexts no longer stored with window and accessed - with GetDC - use wxClientDC, wxPaintDC, wxWindowDC stack - variables instead. -- wxSlider uses trackbar class under Win95, and wxSL_LABELS flag - determines whether labels are shown. Other Win95-specific flags - introduced, e.g. for showing ticks. -- Styles introduced for dealing with 3D effects per window, for - any window: all Win95 3D effects supported, plus transparent windows. -- Major change to allow 3D effect support without CTL3D, under - Win95. -- Bitmap versions of button and checkbox separated out into new - classes, but unimplemented as yet because I intend to remove - the need for Fafa - it apparently causes GPFs in Win95 OSR 2. -- utils/wxprop classes working (except maybe wxPropertyFormView) - in preparation for use in Dialog Editor. -- GNU-WIN32 compilation verified (a month or so ago). - - diff --git a/docs/msw/install.txt b/docs/msw/install.txt deleted file mode 100644 index 7a38c06c4d..0000000000 --- a/docs/msw/install.txt +++ /dev/null @@ -1,127 +0,0 @@ - -Installing wxWindows 2.0 ------------------------- - -Unarchiving ------------ - -If there is a setup program, run the setup program that comes with the Windows version. -Do not install into a path that contains spaces. The installation program should set the -WXWIN environment variable, which will be activated when your machine is rebooted. - -If there is no setup program, it will come as a series of .zip -files: - -wx200gen.zip Generic source code and samples (required) -wx200msw.zip Windows-specific source code and samples (required) -wx200doc.zip Documentation source code (not required) -wx200hlp.zip WinHelp documentation -wx200pdf.zip Acrobat PDF documentation -wx200htm.zip HTML documentation - -Unarchive the required files plus any optional documentation -files into a suitable directory such as c:\wx. Alter your -WXWIN environment variable to point to this directory. - -Compilation ------------ - -At present, wxWindows compiles with VC++ 1.5, VC++ 4.0, VC++ 5.0, -BC++ 4.5/5.0, Gnu-Win32 b19, and Mingw32. - -Visual C++ 4.0/5.0 compilation ------------------------------- - -1. Change directory to wx\src\msw. Type 'nmake -f makefile.nt' to - make the wxWindows core library. -2. Change directory to wx\samples and type 'nmake -f makefile.nt' - to make all the samples. You can also make them individually. - -Visual C++ 1.5 compilation --------------------------- - -1. Change directory to wx\src\msw. Type 'nmake -f makefile.dos' to - make the wxWindows core library. -2. Change directory to wx\samples and type 'nmake -f makefile.dos' - to make all the samples. You can also make them individually. - NOTE: only a few samples have up-to-date makefiles, e.g. - minimal, docview, mdi. The utils makefile does not yet work. - -Borland C++ 4.5/5.0 compilation -------------------------------- - -1. Change directory to wx\src\msw. Type 'make -f makefile.b32' to - make the wxWindows core library. -2. Change directory to wx\samples and type 'make -f makefile.b32' - to make all the samples. You can also make them individually. - NOTE: only a few samples have up-to-date makefiles, e.g. - minimal, docview, mdi. The utils makefile does not yet work. - -Gnu-Win32 b19/Mingw32 compilation ---------------------------------- - -wxWindows 2.0 supports Gnu-Win32 b19, Mingw32, and Mingw32/EGCS. - -Thanks are due to Keith Garry Boyce (garp@opustel.com) and Cygnus for making -it all possible. - -From wxWindows 2.0 beta 9, both Gnu-Win32 b19 and Mingw32 (the minimal -distribution of Gnu-Win32) can be used with the same makefiles. - -Here are the steps required: - -- Retrieve and install the latest beta of Gnu-Win32, or Mingw32, as per the - instructions with either of these packages. - -- If using Mingw32 (including the EGCS variant), you need some - extra files to use the wxWindows makefiles. You can find these - files in ports/mingw32 on the ftp site or CD-ROM, as extra.zip. - These should be extracted to the Mingw32 directory. - -- Modify the file wx/src/cygnus.bat (or mingw32.bat or mingegcs.bat) - to set up appropriate variables, if necessary mounting drives. - Run it before compiling. - -- For Gnu-Win32, make sure there's a \tmp directory on your - Windows drive or bison will crash. - -- Edit wx/src/makeg95.env and search for MINGW32. Take note of - the comments for adjusting settings to suit Gnu-Win32 or - Mingw32. Basically, this is just a case of adding the __MINGW32__ symbol - to OPTIONS for Mingw32, or removing it for Cygnus Gnu-Win32. - For Mingw32/EGCS, add both __MINGW32__ and __EGCS__. - -- Use the makefile.g95 files for compiling wxWindows and samples, - e.g.: - > cd c:\wx\src\msw - > make -f makefile.g95 - > cd c:\wx\samples\minimal - > make -f makefile.g95 - -- Use the 'strip' command to reduce executable size. - -- With Cygnus Gnu-Win32, you can invoke gdb --nw myfile.exe to - debug an executable. - -- If using GnuWin32 b18, you will need to copy windres.exe - from e.g. the Mingw32 distribution, to a directory in your path. - -All targets have 'clean' targets to allow removal of object files -and other intermediate compiler files. - -Gotchas: - -- libwx.a is 28 MB or more - but only 2.9 MB if compiled with no - debug info (-g0) and level 4 optimization (-O4). -- install.exe doesn't have built-in decompression because lzexpand.lib - isn't available with Gnu-Win32. However, you can use it with external - decompression utilities. - -References: - - - The GNU-WIN32 site is at - http://www.cygnus.com/gnu-win32/ - - Mingw32 is available at: - http://agnes.dida.physik.uni-essen.de/~janjaap/mingw32/index.html - - See also http://web.ukonline.co.uk/julian.smart/wxwin/gnuwin32.htm - diff --git a/docs/msw/issues.txt b/docs/msw/issues.txt deleted file mode 100644 index 080459bb80..0000000000 --- a/docs/msw/issues.txt +++ /dev/null @@ -1,74 +0,0 @@ -Current issues and bugs ------------------------ - -Debugging code --------------- - -wxDebugContext and global memory operators doesn't work correctly, -for different (unresolved) reasons on different compilers. - -1) In VC++ 5.0, if you use wxDebugAlloc for new and wxDebugFree -for delete, you get a crash to do with deallocating the debug -buffer in wxDebugContext. So although the global operators are -defined, they are #ifdefed to just call malloc and free to avoid -the problem. This means that non-object memory checking doesn't work. -The problem does seem to be something to do with a pointer -mysteriously changing its address, very similar to 2). - -2) In BC++ 4.5, there isn't a crash, but instead the ofstream -pointer passed to SetStream from SetFile (which is called in -memcheck.cpp) gets mysteriously changed as it's passed to SetStream. -This means that when counting the number of outstanding memory -blocks, we can't compare the allocated block with m_debugStream -to say 'ignore this block because we can't free it before the -very end of the application'. Therefore it always looks like -there's a memory leak of one object, in memory.cpp, unless you -don't call wxDebugContext::SetFile. - -The fact that pointers appear to change in both cases must -indicate a common problem and solution. If we could use the -standard global memory operators for ofstream and -wxDebugStreamBuf it might help, but I don't know how to do that - -I've redefined 'new' throughout as WXDEBUG_NEW (which is itself -defined as the 3-argument operator). - -Config/registry classes ------------------------ - -Problems with Karsten's/Vadim's existing AppConfig classes: - -- use char* a lot instead of wxString -- rather hard to understand -- will need fairly substantial rewrite -- no native .ini functions (?) for guaranteed Windows - compatibility -- new wxWin docs required - -Good things: - -- exists! -- FileConfig independent of OS -- specifying a base class that will meet nearly all needs for - derived classes -- enumerator - -Other features we should probably have: - -- ability to specify vendor name/app name in constructor -- under Windows, ability to read/write all areas of registry - as an option - -Options: - -- rewrite AppConfig -- start from own CRegistry class -- take elements from both -- do the Windows stuff, let someone else write/adapt the - non-Windows classes - -Owner-draw menus ----------------- - -If USE_OWNER_DRAWN = 1 and you create a wxMenu, you get 'all bets -are off' memory checking warnings from wxWindows. - diff --git a/docs/msw/readme.txt b/docs/msw/readme.txt deleted file mode 100644 index 2ae9f1b797..0000000000 --- a/docs/msw/readme.txt +++ /dev/null @@ -1,5 +0,0 @@ -This is the wxWindows for Windows Preview. - -For more information, please see changes.txt, todo.txt, and the -manuals. - diff --git a/docs/msw/todo.txt b/docs/msw/todo.txt deleted file mode 100644 index 326531ddc8..0000000000 --- a/docs/msw/todo.txt +++ /dev/null @@ -1,183 +0,0 @@ - -Todo on wxWin 2.0, Windows platform ------------------------------------ - -HIGH PRIORITY -------------- - -Find/add wxThread sample - Arthur T-D? - -wxControl dimensions should be optionally based on dialog font -size for portability (dialog units as per Windows). - -Implement wxDC floating point transformations. - -Add wxDC::DeviceToLogical -> wxPoint etc (convenience accessors). - -Revamp Dialog Editor for new controls and properties (e.g. -window id). - -Tidy wxConfig API. - -Change DnD classes to use global symbols, and wxString. - -Update manual. - wxApp changes DONE - wxMenu changes DONE - wxModule DONE - wxRegion DONE - wxFile DONE - wxTempFile - wxMask DONE - wxDC:Blit DONE - wxTaskBarIcon DONE - wxMsgCatalog etc. - wxLog - wxConfig, wxRegKey - wxTabCtrl DONE - wxNotebook - wxWave DONE - wxJoystick DONE - wxStatusBar95 and wxFrame status bar functions - wxListBox changes (for ownerdraw functionality) - wxThread DONE (except for topic overview) - wxHelpController classes DONE (except for Unix ones) - wxString PARTLY DONE - Drag and drop (change API if required, e.g. const). - wxCheckListBox - wxAcceleratorTable - wxBaseArray, other arrays - (wxOwnerDrawn) - Document the include file for each class - Macros, e.g. wxASSERT - Stream classes - Functions - -Write tutorial. - -A wxDC function (or two) for drawing 3D edges. - -Makefiles for other compilers. Generic makefiles? -Rewrite makefiles to maintain simultaneous debug/release -objects. - -More wxSystemSettings (see comment in settings.cpp). - -wxSocket integration. - -Convert remaining utilities e.g. (GLCanvas; wxGraphLayout) and samples - -Check TODO entries. - -Shell function to invoke a document with open, print, whatever... - -Make use of Vadim's gettext implementation throughout wxWin code. -Document it. - -Retain callback functions; have semi-compatible callback function prototypes -for all controls, at least in WXWIN_COMPATIBLE mode, but -retain (Set)Callback for all compilations. This is following a -panicky response to losing callbacks. - -Merge dib.cpp, dibutils.cpp. - -Add a wxTabCtrl sample. - -Improve printing. More API functions for printer DCs (to get -printer characteristics) and more reliable printing framework. - -Add GetIcon, GetBitmap to wxImageList. Perhaps store bitmaps -in image list so we can get them later. - -LOW PRIORITY ------------- - -Debug PNG support in wxBitmap (no 4-bit support), and possibly add a convertor from PNG -to HICON. We could perhaps also support inclusion of PNGs into -a .res file as a custom resource. - -Fonts: ability to enumerate them. - -Angled text. - -Eliminate Set/GetDefaultBackgroundColour? Just take background -colour for child control instead. - -Think about reimplementing wxBitmapButton, wxStaticBitmap using -BS_BITMAP, SS_BITMAP - but this may not allow wxBitmap -argument, so instead just allow controls loaded from native -resource to deal with this style and call default processing. - -Better clipboard support. - -wxWizard class? - -Doc/view - have some standard views/docs e.g. wxTextView. - -wxClassWizard for generating files, chunks of code. - -Miscellaneous file/system function wrappers. - -wxImage or replacement; further wxBitmap/wxIcon etc. functions -(load animated icos). - -Integrate existing multimedia classes. - -Rich text class? - -Look at WinCE stuff incl. database classes. - -Improve conversion guide, compatibility classes, tools? - -Bug database. - -ActiveX support? - -OpenGL integration. - -Menu bitmaps - document Vadim's enhancements. - -Enhance Tex2RTF to generate Microsoft HTML help, perhaps Netscape -HTML help also. - -wxCreateDynamicObject is apparently slow: ~ 2000 calls to strcmp. Need to -use some kind of hash table scheme. - -Write wxDisplay class for querying settings and passing -to wxFrame to mirror the X situation (multiple displays). - -Write translator between old and new .wxr formats (including -substituting static text for obsolete labels). - -Improve and expand wxSizer classes. - -Write more validators. - -Classes for file/OS utility functions. - -Add support for more static controls e.g. wxStaticLine. - -GDI objects could be optimised further in constructors by -searching for a matching, pre-existing object, and assigning from -that, thus sharing the internal handle. A problem with this -arises if you wish to change the data. But this can be handled by -un-refing and creating a new handle. So we could reuse many -Windows GDI objects without troubling the programmer. We might -wish to switch this off in certain circumstances, e.g. - - wxEnableGDIReuse(FALSE); - wxBrush brush(...); - wxEnableGDIReuse(TRUE); - -or even - - wxGDIReuse reuse(FALSE); - wxBrush brush(...); - -which lasts until its scope ends. This might be needed e.g. if we -needed to ensure that the operation was maximally efficient -(creating a new object rather than searching may or may not be -more efficient). - -Perhaps rewrite wxFile to use FILE* descriptors, so Eof and Flush -can work. diff --git a/docs/readme.txt b/docs/readme.txt deleted file mode 100644 index dfff164e67..0000000000 --- a/docs/readme.txt +++ /dev/null @@ -1,10 +0,0 @@ -wxWindows 2.0 alpha -------------------- - -This is an alpha distribution of wxWindows 2.0. It may be made up -of sources for different platforms from different authors. - -For generic installation information, see the docs directory. For -platform-specific installation information see for example docs/msw or -docs/gtk. - diff --git a/docs/symbols.txt b/docs/symbols.txt deleted file mode 100644 index bee97d122b..0000000000 --- a/docs/symbols.txt +++ /dev/null @@ -1,61 +0,0 @@ -This is a list of preprocessor symbols used in the wxWindows source. - -GUIs: ------ - -__X__ any X, but not GTK -__WXMOTIF__ Motif -__WXXT__ Xt; mutually exclusive with WX_MOTIF (?) -__WXGTK__ GTK -__WXMSW__ Any Windows -__WXMAC__ MacOS -__UNIX__ any Unix -__WINDOWS__ any Windows -__WIN95__ GUI for Windows 95 and above; NT 4.0 and above. -__WIN32__ WIN32 API -__NT__ Windows NT -__WXCURSES__ CURSES -__WXSTUBS__ Stubbed version ('template' wxWin implementation) - -In fact, they should better all start with __WX instead of __ only. -The only GUIs implemented for 2.0 are __WXGTK__, __WXMSW__ and __WXMOTIF__ -yet. Any new ones, please start the define with __WX. - -OSes/machines: - -__HPUX__ -__SVR4__ -__SYSV__ -__LINUX__ -__SGI__ -__ULTRIX__ -__BSD__ -__VMS__ -__SUN__ Any Sun -__SUNOS__ -__SOLARIS__ -__ALPHA__ -__AIX__ -__DATA_GENERAL__ -__OSF__ -__FREEBSD__ - -Compilers: ----------- - -__GNUWIN32__ Gnu-Win32 compiler -__DJGPP__ DJGPP -__GNUG__ Gnu C++ on any platform -__BORLANDC__ Borland C++ -__WATCOMC__ Watcom C++ -__SYMANTECC__ Symantec C++ -__VISUALC__ VC++ -__SUNCC__ -__XLC__ ?? compiler - -wxWindows modes: ----------------- - -__WXDEBUG__ usage: #ifdef __DEBUG__ (=> debug mode, else => release) -WXDEBUG usage: #if DEBUG (0: release, 1: minimal debug code, ...) - diff --git a/docs/word/odbc.doc b/docs/word/odbc.doc deleted file mode 100644 index 670795d3af..0000000000 Binary files a/docs/word/odbc.doc and /dev/null differ diff --git a/docs/wxQt.html b/docs/wxQt.html deleted file mode 100644 index 87f7013694..0000000000 --- a/docs/wxQt.html +++ /dev/null @@ -1,70 +0,0 @@ - $Id$ -
-

Proposal for a port of wxWindows to Qt - wxQt

-

- Following the recent discussions - and flamewars about KDE vs Gnome, we got worried that we'll see a - repetition of the same damaging infighting from which Unix has - suffered before. Competition is a good thing, but the current - situation leaves application developers with a difficult decision to - make: Write for KDE, using qt/harmony or write for Gnome, using GTK? - Whatever happens to these projects, we will end up with a lot of - duplicated efforts and a mix of applications written for either of the - two environments. The result will not be the consistent look and feel - that both projects aim for. -

- - The people on the wxWindows developers team thought that we might have - a solution for this problem, if we can get some outside help to get it - done. Let us explain: wxWindows is a cross-platform development - toolkit, a library of C++ classes which provide GUI concepts as well - as other cross-platform issues such as container classes, debug - features or configuration management. It has been around since 1992 - and started by supporting Motif, XView and MS-Windows, with a direct - X11/Xt port added later. Last year, a major rewrite was started and we - now have a much advanced library, available for MS Windows, with a - Motif port under construction. Later last year, Robert Roebling set - out on a one-man project to build wxGTK, a gtk-based implementation of - wxWindows which in less than a year has become sufficiently stable to - use it as the main development platform of rather large - applications. The wxWindows license is a variant of the LGPL, - which should meet no objections from the free software community. In - fact, this has been an open source project long before the term became - commonly used. -

- - Our idea is, that if this is good enough to work across different - operating systems (a MacOS port is under construction, too), it could - easily bridge the gap between KDE and Gnome. The quick evolution of - wxGTK has shown that a new port based on an existing widget set or - toolkit can easily be created by a small team within a few - months. Therefore, we would like to start a project for a Qt/Harmony - based wxWindow library, wxQt. It would then be possible for - application developers to write the same source and compile it either - for KDE, Gnome or even any of the other supported systems. -

- - But for this we need help. The core developers are all pretty busy on - the existing ports, but we could provide significant help and support - for any such effort. A wxQt port could also recycle lots of existing - code from the other ports. - - Please, join us in this effort and, if you feel that you could - contribute, join the wxWindows developers mailing list for further - discussions. Just send a mail containing "subscribe" to - wxwin-developers-request@wx.dent.med.uni-muenchen.de -

- You can find some more information about wxWindows at the following places: -

-

-


- Karsten Ballueder Ballueder@usa.net http://Ballueder.home.ml.org/ diff --git a/include/wx/accel.h b/include/wx/accel.h deleted file mode 100644 index a36d4a0a44..0000000000 --- a/include/wx/accel.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_ACCEL_H_BASE_ -#define _WX_ACCEL_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/accel.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/accel.h" -#elif defined(__WXGTK__) -#include "wx/gtk/accel.h" -#elif defined(__WXQT__) -#include "wx/qt/accel.h" -#elif defined(__WXMAC__) -#include "wx/mac/accel.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/accel.h" -#endif - -#endif - // _WX_ACCEL_H_BASE_ diff --git a/include/wx/app.h b/include/wx/app.h deleted file mode 100644 index d454acf6fa..0000000000 --- a/include/wx/app.h +++ /dev/null @@ -1,78 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: app.h -// Purpose: wxApp inclusion -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_APP_H_BASE_ -#define _WX_APP_H_BASE_ - -#ifdef __WXMSW__ -class WXDLLEXPORT wxApp; -typedef wxApp* (*wxAppInitializerFunction) (void); -#endif - -#include "wx/object.h" - -#ifndef __WXMSW__ -typedef wxObject* (*wxAppInitializerFunction) (void); // returning wxApp* won't work with gcc -#endif - -#if defined(__WXMSW__) -#include "wx/msw/app.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/app.h" -#elif defined(__WXQT__) -#include "wx/qt/app.h" -#elif defined(__WXGTK__) -#include "wx/gtk/app.h" -#elif defined(__WXMAC__) -#include "wx/mac/app.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/app.h" -#endif - -// Having a global instance of this class allows -// wxApp to be aware of the app creator function. -// wxApp can then call this function to create a new -// app object. Convoluted, but necessary. - -class WXDLLEXPORT wxAppInitializer -{ -public: - wxAppInitializer(wxAppInitializerFunction fn) - { - wxApp::SetInitializerFunction(fn); - } -}; - -// Here's a macro you can use if your compiler -// really, really wants main() to be in your main program -// (e.g. hello.cpp). -// Now IMPLEMENT_APP should add this code if required. - -#if defined(__AIX__) || defined(__HPUX__) -#define IMPLEMENT_WXWIN_MAIN \ -extern int wxEntry( int argc, char *argv[] ); \ -int main(int argc, char *argv[]) { return wxEntry(argc, argv); } -#else -#define IMPLEMENT_WXWIN_MAIN -#endif - -#define IMPLEMENT_APP(appname) \ - wxApp *wxCreateApp(void) { return new appname; } \ - wxAppInitializer wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp); \ - appname& wxGetApp(void) { return *(appname *)wxTheApp; } \ - IMPLEMENT_WXWIN_MAIN - -#define DECLARE_APP(appname) \ - extern appname& wxGetApp(void) ; - - -#endif - // _WX_APP_H_BASE_ diff --git a/include/wx/bitmap.h b/include/wx/bitmap.h deleted file mode 100644 index f031e7041a..0000000000 --- a/include/wx/bitmap.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_BITMAP_H_BASE_ -#define _WX_BITMAP_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/bitmap.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/bitmap.h" -#elif defined(__WXGTK__) -#include "wx/gtk/bitmap.h" -#elif defined(__WXQT__) -#include "wx/qt/bitmap.h" -#elif defined(__WXMAC__) -#include "wx/mac/bitmap.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/bitmap.h" -#endif - -#endif - // _WX_BITMAP_H_BASE_ diff --git a/include/wx/bmpbuttn.h b/include/wx/bmpbuttn.h deleted file mode 100644 index 2ff65ebbb2..0000000000 --- a/include/wx/bmpbuttn.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef _WX_BMPBUTTON_H_BASE_ -#define _WX_BMPBUTTON_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/bmpbuttn.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/bmpbuttn.h" -#elif defined(__WXGTK__) -#include "wx/gtk/bmpbuttn.h" -#elif defined(__WXQT__) -#include "wx/qt/bmpbuttn.h" -#elif defined(__WXMAC__) -#include "wx/mac/bmpbuttn.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/bmpbuttn.h" -#endif - -#endif diff --git a/include/wx/brush.h b/include/wx/brush.h deleted file mode 100644 index e5d99b39a1..0000000000 --- a/include/wx/brush.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_BRUSH_H_BASE_ -#define _WX_BRUSH_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/brush.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/brush.h" -#elif defined(__WXGTK__) -#include "wx/gtk/brush.h" -#elif defined(__WXQT__) -#include "wx/qt/brush.h" -#elif defined(__WXMAC__) -#include "wx/mac/brush.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/brush.h" -#endif - -#endif - // _WX_BRUSH_H_BASE_ diff --git a/include/wx/button.h b/include/wx/button.h deleted file mode 100644 index 454a0a58f6..0000000000 --- a/include/wx/button.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_BUTTON_H_BASE_ -#define _WX_BUTTON_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/button.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/button.h" -#elif defined(__WXGTK__) -#include "wx/gtk/button.h" -#elif defined(__WXQT__) -#include "wx/qt/button.h" -#elif defined(__WXMAC__) -#include "wx/mac/button.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/button.h" -#endif - -#endif - // _WX_BUTTON_H_BASE_ diff --git a/include/wx/checkbox.h b/include/wx/checkbox.h deleted file mode 100644 index 47895df8cd..0000000000 --- a/include/wx/checkbox.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_CHECKBOX_H_BASE_ -#define _WX_CHECKBOX_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/checkbox.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/checkbox.h" -#elif defined(__WXGTK__) -#include "wx/gtk/checkbox.h" -#elif defined(__WXQT__) -#include "wx/qt/checkbox.h" -#elif defined(__WXMAC__) -#include "wx/mac/checkbox.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/checkbox.h" -#endif - -#endif - // _WX_CHECKBOX_H_BASE_ diff --git a/include/wx/checklst.h b/include/wx/checklst.h deleted file mode 100644 index 96f31e454f..0000000000 --- a/include/wx/checklst.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_CHECKLST_H_BASE_ -#define _WX_CHECKLST_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/checklst.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/checklst.h" -#elif defined(__WXGTK__) -#include "wx/gtk/checklst.h" -#elif defined(__WXQT__) -#include "wx/qt/checklst.h" -#elif defined(__WXMAC__) -#include "wx/mac/checklst.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/checklst.h" -#endif - -#endif - // _WX_CHECKLST_H_BASE_ diff --git a/include/wx/choicdlg.h b/include/wx/choicdlg.h deleted file mode 100644 index 52439ffd71..0000000000 --- a/include/wx/choicdlg.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _WX_CHOICDLG_H_BASE_ -#define _WX_CHOICDLG_H_BASE_ - -#include "wx/generic/choicdgg.h" - -#endif - // _WX_CHOICDLG_H_BASE_ diff --git a/include/wx/choice.h b/include/wx/choice.h deleted file mode 100644 index 1830d779aa..0000000000 --- a/include/wx/choice.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_CHOICE_H_BASE_ -#define _WX_CHOICE_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/choice.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/choice.h" -#elif defined(__WXGTK__) -#include "wx/gtk/choice.h" -#elif defined(__WXQT__) -#include "wx/qt/choice.h" -#elif defined(__WXMAC__) -#include "wx/mac/choice.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/choice.h" -#endif - -#endif - // _WX_CHOICE_H_BASE_ diff --git a/include/wx/clipbrd.h b/include/wx/clipbrd.h deleted file mode 100644 index c37f46116f..0000000000 --- a/include/wx/clipbrd.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_CLIPBRD_H_BASE_ -#define _WX_CLIPBRD_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/clipbrd.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/clipbrd.h" -#elif defined(__WXGTK__) -#include "wx/gtk/clipbrd.h" -#elif defined(__WXQT__) -#include "wx/gtk/clipbrd.h" -#elif defined(__WXMAC__) -#include "wx/mac/clipbrd.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/clipbrd.h" -#endif - -#endif - // _WX_CLIPBRD_H_BASE_ diff --git a/include/wx/cmndata.h b/include/wx/cmndata.h deleted file mode 100644 index dc4eeb3ee0..0000000000 --- a/include/wx/cmndata.h +++ /dev/null @@ -1,226 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: cmndata.h -// Purpose: Common GDI data classes -// Author: Julian Smart and others -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_CMNDATA_H_BASE_ -#define _WX_CMNDATA_H_BASE_ - -#ifdef __GNUG__ -#pragma interface "cmndata.h" -#endif - -#include "wx/font.h" -#include "wx/colour.h" - -class WXDLLEXPORT wxColourData: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxColourData) - public: - wxColour dataColour; - wxColour custColours[16]; - bool chooseFull; - - wxColourData(void); - ~wxColourData(void); - - inline void SetChooseFull(bool flag) { chooseFull = flag; } - inline bool GetChooseFull(void) { return chooseFull; } - inline void SetColour(wxColour& colour) { dataColour = colour; } - inline wxColour &GetColour(void) { return dataColour; } - - // Array of 16 custom colours - void SetCustomColour(int i, wxColour& colour); - wxColour GetCustomColour(int i); - - void operator=(const wxColourData& data); -}; - -class WXDLLEXPORT wxFontData: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxFontData) - public: - wxColour fontColour; - bool showHelp; - bool allowSymbols; - bool enableEffects; - wxFont initialFont; - wxFont chosenFont; - int minSize; - int maxSize; - - wxFontData(void); - ~wxFontData(void); - - inline void SetAllowSymbols(bool flag) { allowSymbols = flag; } - inline bool GetAllowSymbols(void) { return allowSymbols; } - inline void SetColour(const wxColour& colour) { fontColour = colour; } - inline wxColour &GetColour(void) { return fontColour; } - inline void SetShowHelp(bool flag) { showHelp = flag; } - inline bool GetShowHelp(void) { return showHelp; } - inline void EnableEffects(bool flag) { enableEffects = flag; } - inline bool GetEnableEffects(void) { return enableEffects; } - inline void SetInitialFont(const wxFont& font) { initialFont = font; } - inline wxFont GetInitialFont(void) { return initialFont; } - inline void SetChosenFont(const wxFont& font) { chosenFont = font; } - inline wxFont GetChosenFont(void) { return chosenFont; } - inline void SetRange(int minRange, int maxRange) { minSize = minRange; maxSize = maxRange; } - - void operator=(const wxFontData& data); -}; - -/* - * wxPrintData - * Encapsulates information displayed and edited in the printer dialog box. - */ - -class WXDLLEXPORT wxPrintData: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxPrintData) - - public: -#ifdef __WXMSW__ - void *printData; -#endif - int printFromPage; - int printToPage; - int printMinPage; - int printMaxPage; - int printNoCopies; - int printOrientation; - bool printAllPages; - bool printCollate; - bool printToFile; - bool printEnableSelection; - bool printEnablePageNumbers; - bool printEnableHelp; - bool printEnablePrintToFile; - bool printSetupDialog; - - wxPrintData(void); - ~wxPrintData(void); - - inline int GetFromPage(void) { return printFromPage; }; - inline int GetToPage(void) { return printToPage; }; - inline int GetMinPage(void) { return printMinPage; }; - inline int GetMaxPage(void) { return printMaxPage; }; - inline int GetNoCopies(void) { return printNoCopies; }; - inline bool GetAllPages(void) { return printAllPages; }; - inline bool GetCollate(void) { return printCollate; }; - inline bool GetPrintToFile(void) { return printToFile; }; - inline bool GetSetupDialog(void) { return printSetupDialog; }; - inline int GetOrientation(void) { return printOrientation; }; - - inline void SetFromPage(int v) { printFromPage = v; }; - inline void SetToPage(int v) { printToPage = v; }; - inline void SetMinPage(int v) { printMinPage = v; }; - inline void SetMaxPage(int v) { printMaxPage = v; }; - inline void SetNoCopies(int v) { printNoCopies = v; }; - inline void SetAllPages(bool flag) { printAllPages = flag; }; - inline void SetCollate(bool flag) { printCollate = flag; }; - inline void SetPrintToFile(bool flag) { printToFile = flag; }; - inline void SetSetupDialog(bool flag) { printSetupDialog = flag; }; - inline void SetOrientation(int orient) { printOrientation = orient; }; - - inline void EnablePrintToFile(bool flag) { printEnablePrintToFile = flag; }; - inline void EnableSelection(bool flag) { printEnableSelection = flag; }; - inline void EnablePageNumbers(bool flag) { printEnablePageNumbers = flag; }; - inline void EnableHelp(bool flag) { printEnableHelp = flag; }; - - inline bool GetEnablePrintToFile(void) { return printEnablePrintToFile; }; - inline bool GetEnableSelection(void) { return printEnableSelection; }; - inline bool GetEnablePageNumbers(void) { return printEnablePageNumbers; }; - inline bool GetEnableHelp(void) { return printEnableHelp; }; - - void operator=(const wxPrintData& data); - -#ifdef __WXMSW__ - // Convert to/from the PRINTDLG structure - void ConvertToNative(void); - void ConvertFromNative(void); - void SetOwnerWindow(wxWindow* win); - inline void* GetNativeData(void) { return printData; } -#endif -}; - -/* - * This is the data used (and returned) by the wxPageSetupDialog. - */ - -class WXDLLEXPORT wxPageSetupData: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxPageSetupData) - - public: -#if defined(__WIN95__) - void* m_pageSetupData; -#endif - wxPoint m_paperSize; - wxPoint m_minMarginTopLeft; - wxPoint m_minMarginBottomRight; - wxPoint m_marginTopLeft; - wxPoint m_marginBottomRight; - int m_orientation; - - // Flags - bool m_defaultMinMargins; - bool m_enableMargins; - bool m_enableOrientation; - bool m_enablePaper; - bool m_enablePrinter; - bool m_getDefaultInfo; // Equiv. to PSD_RETURNDEFAULT - bool m_enableHelp; - - wxPageSetupData(void); - ~wxPageSetupData(void); - - inline wxPoint GetPaperSize(void) { return m_paperSize; }; - inline wxPoint GetMinMarginTopLeft(void) { return m_minMarginTopLeft; }; - inline wxPoint GetMinMarginBottomRight(void) { return m_minMarginBottomRight; }; - inline wxPoint GetMarginTopLeft(void) { return m_marginTopLeft; }; - inline wxPoint GetMarginBottomRight(void) { return m_marginBottomRight; }; - inline int GetOrientation(void) { return m_orientation; }; - - inline bool GetDefaultMinMargins(void) { return m_defaultMinMargins; }; - inline bool GetEnableMargins(void) { return m_enableMargins; }; - inline bool GetEnableOrientation(void) { return m_enableOrientation; }; - inline bool GetEnablePaper(void) { return m_enablePaper; }; - inline bool GetEnablePrinter(void) { return m_enablePrinter; }; - inline bool GetDefaultInfo(void) { return m_getDefaultInfo; }; - inline bool GetEnableHelp(void) { return m_enableHelp; }; - - inline void SetPaperSize(const wxPoint& pt) { m_paperSize = pt; }; - inline void SetMinMarginTopLeft(const wxPoint& pt) { m_minMarginTopLeft = pt; }; - inline void SetMinMarginBottomRight(const wxPoint& pt) { m_minMarginBottomRight = pt; }; - inline void SetMarginTopLeft(const wxPoint& pt) { m_marginTopLeft = pt; }; - inline void SetMarginBottomRight(const wxPoint& pt) { m_marginBottomRight = pt; }; - inline void SetOrientation(int orient) { m_orientation = orient; }; - inline void SetDefaultMinMargins(bool flag) { m_defaultMinMargins = flag; }; - inline void SetDefaultInfo(bool flag) { m_getDefaultInfo = flag; }; - - inline void EnableMargins(bool flag) { m_enableMargins = flag; }; - inline void EnableOrientation(bool flag) { m_enableOrientation = flag; }; - inline void EnablePaper(bool flag) { m_enablePaper = flag; }; - inline void EnablePrinter(bool flag) { m_enablePrinter = flag; }; - inline void EnableHelp(bool flag) { m_enableHelp = flag; }; - -#if defined(__WIN95__) - // Convert to/from the PAGESETUPDLG structure - void ConvertToNative(void); - void ConvertFromNative(void); - void SetOwnerWindow(wxWindow* win); - inline void* GetNativeData(void) { return m_pageSetupData; } -#endif - - void operator=(const wxPageSetupData& data); -}; - - -#endif - // _WX_CMNDATA_H_BASE_ diff --git a/include/wx/colordlg.h b/include/wx/colordlg.h deleted file mode 100644 index 977c8e5bde..0000000000 --- a/include/wx/colordlg.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_COLORDLG_H_BASE_ -#define _WX_COLORDLG_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/colordlg.h" -#elif defined(__WXMOTIF__) -#include "wx/generic/colrdlgg.h" -#elif defined(__WXGTK__) -#include "wx/generic/colrdlgg.h" -#elif defined(__WXQT__) -#include "wx/generic/colrdlgg.h" -#elif defined(__WXMAC__) -#include "wx/generic/colrdlgg.h" -#elif defined(__WXSTUBS__) -#include "wx/generic/colrdlgg.h" -#endif - -#endif - // _WX_COLORDLG_H_BASE_ diff --git a/include/wx/colour.h b/include/wx/colour.h deleted file mode 100644 index 88b50afca5..0000000000 --- a/include/wx/colour.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_COLOUR_H_BASE_ -#define _WX_COLOUR_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/colour.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/colour.h" -#elif defined(__WXGTK__) -#include "wx/gtk/colour.h" -#elif defined(__WXQT__) -#include "wx/qt/colour.h" -#elif defined(__WXMAC__) -#include "wx/mac/colour.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/colour.h" -#endif - -#endif - // _WX_COLOUR_H_BASE_ diff --git a/include/wx/combobox.h b/include/wx/combobox.h deleted file mode 100644 index 26512aa0cd..0000000000 --- a/include/wx/combobox.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_COMBOBOX_H_BASE_ -#define _WX_COMBOBOX_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/combobox.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/combobox.h" -#elif defined(__WXGTK__) -#include "wx/gtk/combobox.h" -#elif defined(__WXQT__) -#include "wx/qt/combobox.h" -#elif defined(__WXMAC__) -#include "wx/mac/combobox.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/combobox.h" -#endif - -#endif - // _WX_COMBOBOX_H_BASE_ diff --git a/include/wx/confbase.h b/include/wx/confbase.h deleted file mode 100644 index 961d4c3ff8..0000000000 --- a/include/wx/confbase.h +++ /dev/null @@ -1,292 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: confbase.h -// Purpose: declaration of the base class of all config implementations -// (see also: fileconf.h and msw/regconf.h) -// Author: Karsten Ballüder & Vadim Zeitlin -// Modified by: -// Created: 07.04.98 (adapted from appconf.h) -// RCS-ID: $Id$ -// Copyright: (c) 1997 Karsten Ballüder Ballueder@usa.net -// Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_CONFBASE_H_ -#define _WX_CONFBASE_H_ - -#ifdef __GNUG__ -#pragma interface "confbase.h" -#endif - -// ---------------------------------------------------------------------------- -// compile options -// ---------------------------------------------------------------------------- - -// it won't compile without it anyhow -#ifndef USE_CONFIG - #error "Please define USE_CONFIG or remove config.cpp from your makefile" -#endif // USE_CONFIG - -// ---------------------------------------------------------------------------- -// constants -// ---------------------------------------------------------------------------- - -/// shall we be case sensitive in parsing variable names? -#ifndef wxCONFIG_CASE_SENSITIVE - #define wxCONFIG_CASE_SENSITIVE FALSE -#endif - -/// separates group and entry names (probably shouldn't be changed) -#ifndef wxCONFIG_PATH_SEPARATOR - #define wxCONFIG_PATH_SEPARATOR '/' -#endif - -/// introduces immutable entries -// (i.e. the ones which can't be changed from the local config file) -#ifndef wxCONFIG_IMMUTABLE_PREFIX - #define wxCONFIG_IMMUTABLE_PREFIX '!' -#endif - -/// should we use registry instead of configuration files under Win32? -// (i.e. whether wxConfigBase::Create() will create a wxFileConfig (if it's -// FALSE) or wxRegConfig (if it's true and we're under Win32) or wxIniConfig -// (under Win16)) -#ifndef wxCONFIG_WIN32_NATIVE - #define wxCONFIG_WIN32_NATIVE TRUE -#endif - -// Style flags for constructor style parameter -#define wxCONFIG_USE_LOCAL_FILE 1 -#define wxCONFIG_USE_GLOBAL_FILE 2 - -// ---------------------------------------------------------------------------- -// various helper global functions -// ---------------------------------------------------------------------------- - -/* - Replace environment variables ($SOMETHING) with their values. The format is - $VARNAME or ${VARNAME} where VARNAME contains alphanumeric characters and - '_' only. '$' must be escaped ('\$') in order to be taken literally. - */ -extern wxString wxExpandEnvVars(const wxString &sz); - -/* - Split path into parts removing '..' in progress - */ -extern void wxSplitPath(wxArrayString& aParts, const char *sz); - -// ---------------------------------------------------------------------------- -// abstract base class wxConfigBase which defines the interface for derived -// classes -// -// wxConfig organizes the items in a tree-like structure (modeled after the -// Unix/Dos filesystem). There are groups (directories) and keys (files). -// There is always one current group given by the current path. -// -// Keys are pairs "key_name = value" where value may be of string or integer -// (long) type (@@@ doubles and other types such as wxDate coming soon). -// ---------------------------------------------------------------------------- -class wxConfigBase -{ -public: - // static functions - // sets the config object, returns the previous pointer - static wxConfigBase *Set(wxConfigBase *pConfig); - // get the config object, creates it on demand unless DontCreateOnDemand - // was called - static wxConfigBase *Get() { if ( !ms_pConfig ) Create(); return ms_pConfig; } - // create a new config object: this function will create the "best" - // implementation of wxConfig available for the current platform, see - // comments near definition wxCONFIG_WIN32_NATIVE for details. It returns - // the created object and also sets it as ms_pConfig. - static wxConfigBase *Create(); - // should Get() try to create a new log object if the current one is NULL? - static void DontCreateOnDemand() { ms_bAutoCreate = FALSE; } - - // ctor & virtual dtor - // environment variable expansion is on by default -// wxConfigBase() { m_bExpandEnvVars = TRUE; m_bRecordDefaults = FALSE; } - - // ctor - - // Not all args will always be used by derived classes, but - // including them all in each class ensures compatibility. - // If appName is empty, uses wxApp name - wxConfigBase(const wxString& appName = "", const wxString& vendorName = "", - const wxString& localFilename = "", const wxString& globalFilename = "", - long style = 0); - - // empty but ensures that dtor of all derived classes is virtual - virtual ~wxConfigBase() { } - - // path management - // set current path: if the first character is '/', it's the absolute path, - // otherwise it's a relative path. '..' is supported. If the strPath - // doesn't exist it is created. - virtual void SetPath(const wxString& strPath) = 0; - // retrieve the current path (always as absolute path) - virtual const wxString& GetPath() const = 0; - - // enumeration: all functions here return false when there are no more items. - // you must pass the same lIndex to GetNext and GetFirst (don't modify it) - // enumerate subgroups - virtual bool GetFirstGroup(wxString& str, long& lIndex) const = 0; - virtual bool GetNextGroup (wxString& str, long& lIndex) const = 0; - // enumerate entries - virtual bool GetFirstEntry(wxString& str, long& lIndex) const = 0; - virtual bool GetNextEntry (wxString& str, long& lIndex) const = 0; - // get number of entries/subgroups in the current group, with or without - // it's subgroups - virtual size_t GetNumberOfEntries(bool bRecursive = FALSE) const = 0; - virtual size_t GetNumberOfGroups(bool bRecursive = FALSE) const = 0; - - // tests of existence - // returns TRUE if the group by this name exists - virtual bool HasGroup(const wxString& strName) const = 0; - // same as above, but for an entry - virtual bool HasEntry(const wxString& strName) const = 0; - // returns TRUE if either a group or an entry with a given name exist - bool Exists(const wxString& strName) const - { return HasGroup(strName) || HasEntry(strName); } - - // key access: returns TRUE if value was really read, FALSE if default used - // (and if the key is not found the default value is returned.) - // read a string from the key - virtual bool Read(const wxString& key, wxString *pStr) const = 0; - virtual bool Read(const wxString& key, wxString *pStr, const wxString& defVal) const; - - virtual wxString Read(const wxString& key, const wxString& defVal = "") const; - - virtual bool Read(const wxString& key, long *pl) const = 0; - virtual bool Read(const wxString& key, long *pl, long defVal) const; - - virtual long Read(const wxString& strKey, long defVal) const - { long l; Read(strKey, &l, defVal); return l; } - - // Convenience functions that are built on other forms - // double - virtual bool Read(const wxString& key, double* val) const; - virtual bool Read(const wxString& key, double* val, double defVal) const; - - // bool - virtual bool Read(const wxString& key, bool* val) const; - virtual bool Read(const wxString& key, bool* val, bool defVal) const; - - // write the value (return true on success) - virtual bool Write(const wxString& key, const wxString& value) = 0; - virtual bool Write(const wxString& key, long value) = 0; - - // Convenience functions - virtual bool Write(const wxString& key, double value); - virtual bool Write(const wxString& key, bool value); - - // permanently writes all changes - virtual bool Flush(bool bCurrentOnly = FALSE) = 0; - - // delete entries/groups - // deletes the specified entry and the group it belongs to if - // it was the last key in it and the second parameter is true - virtual bool DeleteEntry(const wxString& key, - bool bDeleteGroupIfEmpty = TRUE) = 0; - // delete the group (with all subgroups) - virtual bool DeleteGroup(const wxString& key) = 0; - // delete the whole underlying object (disk file, registry key, ...) - // primarly for use by desinstallation routine. - virtual bool DeleteAll() = 0; - - // options - // we can automatically expand environment variables in the config entries - // (this option is on by default, you can turn it on/off at any time) - bool IsExpandingEnvVars() const { return m_bExpandEnvVars; } - void SetExpandEnvVars(bool bDoIt = TRUE) { m_bExpandEnvVars = bDoIt; } - // recording of default values - void SetRecordDefaults(bool bDoIt = TRUE) { m_bRecordDefaults = bDoIt; } - bool IsRecordingDefaults() const { return m_bRecordDefaults; } - // does expansion only if needed - wxString ExpandEnvVars(const wxString& str) const - { - wxString tmp; // Required for BC++ - if (IsExpandingEnvVars()) - tmp = wxExpandEnvVars(str); - else - tmp = str; - return tmp; - } - - // misc accessors - inline wxString GetAppName() const { return m_appName; } - inline wxString GetVendorName() const { return m_vendorName; } - - inline void SetAppName(const wxString& appName) { m_appName = appName; } - inline void SetVendorName(const wxString& vendorName) { m_vendorName = vendorName; } - - inline void SetStyle(long style) { m_style = style; } - inline long GetStyle() const { return m_style; } - -protected: - static bool IsImmutable(const wxString& key) - { return key[0] == wxCONFIG_IMMUTABLE_PREFIX; } - -private: - // are we doing automatic environment variable expansion? - bool m_bExpandEnvVars; - // do we record default values? - bool m_bRecordDefaults; - - // static variables - static wxConfigBase *ms_pConfig; - static bool ms_bAutoCreate; - - // Application name and organisation name - wxString m_appName; - wxString m_vendorName; - - // Style flag - long m_style; -}; - - // a handy little class which changes current path to the path of given entry - // and restores it in dtor: so if you declare a local variable of this type, - // you work in the entry directory and the path is automatically restored - // when the function returns - // Taken out of wxConfig since not all compilers can cope with nested classes. - class wxConfigPathChanger - { - public: - // ctor/dtor do path changing/restorin - wxConfigPathChanger(const wxConfigBase *pContainer, const wxString& strEntry); - ~wxConfigPathChanger(); - - // get the key name - const wxString& Name() const { return m_strName; } - - private: - wxConfigBase *m_pContainer; // object we live in - wxString m_strName, // name of entry (i.e. name only) - m_strOldPath; // saved path - bool m_bChanged; // was the path changed? - }; - - -// ---------------------------------------------------------------------------- -// the native wxConfigBase implementation -// ---------------------------------------------------------------------------- - -// under Windows we prefer to use the native implementation -#if defined(__WXMSW__) && wxCONFIG_WIN32_NATIVE - #ifdef __WIN32__ - #define wxConfig wxRegConfig - #define classwxConfig classwxRegConfig - #else //WIN16 - #define wxConfig wxIniConfig - #define classwxConfig classwxIniConfig - #endif -#else // either we're under Unix or wish to use files even under Windows - #define wxConfig wxFileConfig - #define classwxConfig classwxFileConfig -#endif - - - -#endif // _WX_CONFIG_H_ - diff --git a/include/wx/config.h b/include/wx/config.h deleted file mode 100644 index d9ffb9fa58..0000000000 --- a/include/wx/config.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _WX_CONFIG_H_BASE_ -#define _WX_CONFIG_H_BASE_ - -#include "wx/confbase.h" - -#if defined(__WXMSW__) && defined(wxCONFIG_WIN32_NATIVE) -# ifdef __WIN32__ -# include "wx/msw/regconf.h" -#else -# include "wx/msw/iniconf.h" -# endif -#else -# include "wx/fileconf.h" -#endif - -#endif - // _WX_CONFIG_H_BASE_ diff --git a/include/wx/control.h b/include/wx/control.h deleted file mode 100644 index e4341393e8..0000000000 --- a/include/wx/control.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_CONTROL_H_BASE_ -#define _WX_CONTROL_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/control.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/control.h" -#elif defined(__WXGTK__) -#include "wx/gtk/control.h" -#elif defined(__WXQT__) -#include "wx/qt/control.h" -#elif defined(__WXMAC__) -#include "wx/mac/control.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/control.h" -#endif - -#endif - // _WX_CONTROL_H_BASE_ diff --git a/include/wx/cursor.h b/include/wx/cursor.h deleted file mode 100644 index 4ebe73a971..0000000000 --- a/include/wx/cursor.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_CURSOR_H_BASE_ -#define _WX_CURSOR_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/cursor.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/cursor.h" -#elif defined(__WXGTK__) -#include "wx/gtk/cursor.h" -#elif defined(__WXQT__) -#include "wx/qt/cursor.h" -#elif defined(__WXMAC__) -#include "wx/mac/cursor.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/cursor.h" -#endif - -#endif - // _WX_CURSOR_H_BASE_ diff --git a/include/wx/date.h b/include/wx/date.h deleted file mode 100644 index d21a53eb00..0000000000 --- a/include/wx/date.h +++ /dev/null @@ -1,131 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: date.h -// Purpose: wxDate class -// Author: Julian Smart, Steve Marcus, Eric Simon, Chris Hill, -// Charles D. Price -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DATE_H_ -#define _WX_DATE_H_ - -#ifdef __GNUG__ -#pragma interface "date.h" -#endif - -#include "wx/object.h" -#include "wx/string.h" - -#if USE_TIMEDATE - -enum wxdate_format_type {wxMDY, wxDAY, wxMONTH, wxFULL, wxEUROPEAN}; - -#define wxNO_CENTURY 0x02 -#define wxDATE_ABBR 0x04 - -class WXDLLEXPORT wxDate: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxDate) - protected: - unsigned long julian; // see julDate(); days since 1/1/4713 B.C. - int month; // see NMonth() - int day; // see Day() - int year; // see NYear4() - int day_of_week; // see NDOW(); 1 = Sunday, ... 7 = Saturday - - private: - int DisplayFormat; - unsigned char DisplayOptions; - - void julian_to_mdy (); // convert julian day to mdy - void julian_to_wday (); // convert julian day to day_of_week - void mdy_to_julian (); // convert mdy to julian day - - public: - wxDate (); - wxDate (long j); - wxDate (int m, int d, int y); - wxDate (const wxString& dat); - wxDate (const wxDate &dt); - - operator wxString (void); - void operator = (const wxDate& date); - void operator = (const wxString& date); - - wxDate operator + (long i); - wxDate operator + (int i); - - wxDate operator - (long i); - wxDate operator - (int i); - - long operator - (const wxDate &dt); - - wxDate &operator += (long i); - wxDate &operator -= (long i); - - wxDate &operator ++ (); // Prefix increment - wxDate &operator ++ (int); // Postfix increment - wxDate &operator -- (); // Prefix decrement - wxDate &operator -- (int); // Postfix decrement - - friend bool operator < (const wxDate &dt1, const wxDate &dt2); - friend bool operator <= (const wxDate &dt1, const wxDate &dt2); - friend bool operator > (const wxDate &dt1, const wxDate &dt2); - friend bool operator >= (const wxDate &dt1, const wxDate &dt2); - friend bool operator == (const wxDate &dt1, const wxDate &dt2); - friend bool operator != (const wxDate &dt1, const wxDate &dt2); - - friend ostream &operator << (ostream &os, const wxDate &dt); - - wxString FormatDate (int type=-1) const; - void SetFormat (int format); - int SetOption (int option, bool enable=TRUE); - - long GetJulianDate() const; // returns julian date - int GetDayOfYear() const; // returns relative date since Jan. 1 - bool IsLeapYear() const; // returns TRUE if leap year, FALSE if not - - // Version 4.0 Extension to Public Interface - CDP - - // These 'Set's modify the date object and actually SET it - // They all return a reference to self (*this) - - wxDate &Set(); // Sets to current system date - wxDate &Set(long lJulian); - wxDate &Set(int nMonth, int nDay, int nYear); - - wxDate &AddWeeks(int nCount = 1); // - wxDate &AddMonths(int nCount = 1); // May also pass neg# to decrement - wxDate &AddYears(int nCount = 1); // - - int GetDay() const; // Numeric Day of date object - int GetDaysInMonth(); // Number of days in month (1..31) - int GetFirstDayOfMonth() const; // First Day Of Month (1..7) - - wxString GetDayOfWeekName(); // Character Day Of Week ('Sunday'..'Saturday') - int GetDayOfWeek() const; // (1..7) - - int GetWeekOfMonth(); // Numeric Week Of Month (1..6) - int GetWeekOfYear(); // Numeric Week Of Year (1..52) - - wxString GetMonthName(); // Character Month name - int GetMonth() const; // Month Number (1..12) - wxDate GetMonthStart(); // First Date Of Month - wxDate GetMonthEnd(); // Last Date Of Month - - int GetYear() const; // eg. 1992 - wxDate GetYearStart(); // First Date Of Year - wxDate GetYearEnd(); // Last Date Of Year - - bool IsBetween(const wxDate& first, const wxDate& second) const; - - wxDate Previous(int dayOfWeek) const; -}; - -#endif -#endif - // _WX_DATE_H_ diff --git a/include/wx/datstrm.h b/include/wx/datstrm.h deleted file mode 100644 index de87a83323..0000000000 --- a/include/wx/datstrm.h +++ /dev/null @@ -1,48 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: datstrm.h -// Purpose: Data stream classes -// Author: Guilhem Lavaux -// Modified by: -// Created: 28/06/1998 -// RCS-ID: $Id$ -// Copyright: (c) Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DATSTREAM_H_ -#define _WX_DATSTREAM_H_ - -#ifdef __GNUG__ -#pragma interface "datstrm.h" -#endif - -#include - -class wxDataInputStream: public wxFilterInputStream { -public: - wxDataInputStream(wxInputStream& s); - virtual ~wxDataInputStream(); - - unsigned long Read32(); - unsigned short Read16(); - unsigned char Read8(); - double ReadDouble(); - wxString ReadLine(); - wxString ReadString(); -}; - -class wxDataOutputStream: public wxFilterOutputStream { - public: - wxDataOutputStream(wxOutputStream& s); - virtual ~wxDataOutputStream(); - - void Write32(unsigned long i); - void Write16(unsigned short i); - void Write8(unsigned char i); - void WriteDouble(double d); - void WriteLine(const wxString& line); - void WriteString(const wxString& string); -}; - -#endif - // _WX_DATSTREAM_H_ diff --git a/include/wx/db.h b/include/wx/db.h deleted file mode 100644 index 9f47abf00b..0000000000 --- a/include/wx/db.h +++ /dev/null @@ -1,362 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: db.h -// Purpose: Header file wxDB class. The wxDB class represents a connection -// to an ODBC data source. The wxDB class allows operations on the data -// source such as opening and closing the data source. -// Author: Doug Card -// Modified by: -// Created: 9.96 -// RCS-ID: $Id$ -// Copyright: (c) 1996 Remstar International, Inc. -// Licence: wxWindows licence, plus: -// Notice: This class library and its intellectual design are free of charge for use, -// modification, enhancement, debugging under the following conditions: -// 1) These classes may only be used as part of the implementation of a -// wxWindows-based application -// 2) All enhancements and bug fixes are to be submitted back to the wxWindows -// user groups free of all charges for use with the wxWindows library. -// 3) These classes may not be distributed as part of any other class library, -// DLL, text (written or electronic), other than a complete distribution of -// the wxWindows GUI development toolkit. -/////////////////////////////////////////////////////////////////////////////// - -/* -// SYNOPSIS START -// SYNOPSIS STOP -*/ - -#ifndef DB_DOT_H -#define DB_DOT_H - -#ifdef __GNUG__ -#pragma interface "db.h" -#endif - -#if defined(wx_msw) || defined(WIN32) -#include -#endif - -#define ODBCVER 0x0250 -#include -#include - -enum enumDummy {enumDum1}; - -#define SQL_C_BOOLEAN (sizeof(int) == 2 ? SQL_C_USHORT : SQL_C_ULONG) -#define SQL_C_ENUM (sizeof(enumDummy) == 2 ? SQL_C_USHORT : SQL_C_ULONG) //glt 2-21-97 - -/* -#ifndef Bool -#define Bool int -#endif - -#ifndef TRUE -#define TRUE 1 -#endif - -#ifndef FALSE -#define FALSE 0 -#endif -*/ - -// Database Globals -const DB_TYPE_NAME_LEN = 40; -const DB_MAX_STATEMENT_LEN = 2048; -const DB_MAX_WHERE_CLAUSE_LEN = 1024; -const DB_MAX_ERROR_MSG_LEN = 512; -const DB_MAX_ERROR_HISTORY = 5; -const DB_MAX_TABLE_NAME_LEN = 128; -const DB_MAX_COLUMN_NAME_LEN = 128; - -const DB_DATA_TYPE_VARCHAR = 1; -const DB_DATA_TYPE_INTEGER = 2; -const DB_DATA_TYPE_FLOAT = 3; -const DB_DATA_TYPE_DATE = 4; - -const DB_SELECT_KEYFIELDS = 1; -const DB_SELECT_WHERE = 2; -const DB_SELECT_MATCHING = 3; -const DB_SELECT_STATEMENT = 4; - -const DB_UPD_KEYFIELDS = 1; -const DB_UPD_WHERE = 2; - -const DB_DEL_KEYFIELDS = 1; -const DB_DEL_WHERE = 2; -const DB_DEL_MATCHING = 3; - -const DB_WHERE_KEYFIELDS = 1; -const DB_WHERE_MATCHING = 2; - -const DB_CURSOR0 = 0; -const DB_CURSOR1 = 1; -const DB_CURSOR2 = 2; -//const DB_CURSOR3 = 3; -//const DB_CURSOR4 = 4; -//const DB_CURSOR5 = 5; - -const DB_GRANT_SELECT = 1; -const DB_GRANT_INSERT = 2; -const DB_GRANT_UPDATE = 4; -const DB_GRANT_DELETE = 8; -const DB_GRANT_ALL = DB_GRANT_SELECT | DB_GRANT_INSERT | DB_GRANT_UPDATE | DB_GRANT_DELETE; - -// ODBC Error codes (derived from ODBC SqlState codes) -enum ODBC_ERRORS -{ - DB_FAILURE = 0, - DB_SUCCESS = 1, - DB_ERR_NOT_IN_USE, - DB_ERR_GENERAL_WARNING, // SqlState = '01000' - DB_ERR_DISCONNECT_ERROR, // SqlState = '01002' - DB_ERR_DATA_TRUNCATED, // SqlState = '01004' - DB_ERR_PRIV_NOT_REVOKED, // SqlState = '01006' - DB_ERR_INVALID_CONN_STR_ATTR, // SqlState = '01S00' - DB_ERR_ERROR_IN_ROW, // SqlState = '01S01' - DB_ERR_OPTION_VALUE_CHANGED, // SqlState = '01S02' - DB_ERR_NO_ROWS_UPD_OR_DEL, // SqlState = '01S03' - DB_ERR_MULTI_ROWS_UPD_OR_DEL, // SqlState = '01S04' - DB_ERR_WRONG_NO_OF_PARAMS, // SqlState = '07001' - DB_ERR_DATA_TYPE_ATTR_VIOL, // SqlState = '07006' - DB_ERR_UNABLE_TO_CONNECT, // SqlState = '08001' - DB_ERR_CONNECTION_IN_USE, // SqlState = '08002' - DB_ERR_CONNECTION_NOT_OPEN, // SqlState = '08003' - DB_ERR_REJECTED_CONNECTION, // SqlState = '08004' - DB_ERR_CONN_FAIL_IN_TRANS, // SqlState = '08007' - DB_ERR_COMM_LINK_FAILURE, // SqlState = '08S01' - DB_ERR_INSERT_VALUE_LIST_MISMATCH, // SqlState = '21S01' - DB_ERR_DERIVED_TABLE_MISMATCH, // SqlState = '21S02' - DB_ERR_STRING_RIGHT_TRUNC, // SqlState = '22001' - DB_ERR_NUMERIC_VALUE_OUT_OF_RNG, // SqlState = '22003' - DB_ERR_ERROR_IN_ASSIGNMENT, // SqlState = '22005' - DB_ERR_DATETIME_FLD_OVERFLOW, // SqlState = '22008' - DB_ERR_DIVIDE_BY_ZERO, // SqlState = '22012' - DB_ERR_STR_DATA_LENGTH_MISMATCH, // SqlState = '22026' - DB_ERR_INTEGRITY_CONSTRAINT_VIOL, // SqlState = '23000' - DB_ERR_INVALID_CURSOR_STATE, // SqlState = '24000' - DB_ERR_INVALID_TRANS_STATE, // SqlState = '25000' - DB_ERR_INVALID_AUTH_SPEC, // SqlState = '28000' - DB_ERR_INVALID_CURSOR_NAME, // SqlState = '34000' - DB_ERR_SYNTAX_ERROR_OR_ACCESS_VIOL, // SqlState = '37000' - DB_ERR_DUPLICATE_CURSOR_NAME, // SqlState = '3C000' - DB_ERR_SERIALIZATION_FAILURE, // SqlState = '40001' - DB_ERR_SYNTAX_ERROR_OR_ACCESS_VIOL2, // SqlState = '42000' - DB_ERR_OPERATION_ABORTED, // SqlState = '70100' - DB_ERR_UNSUPPORTED_FUNCTION, // SqlState = 'IM001' - DB_ERR_NO_DATA_SOURCE, // SqlState = 'IM002' - DB_ERR_DRIVER_LOAD_ERROR, // SqlState = 'IM003' - DB_ERR_SQLALLOCENV_FAILED, // SqlState = 'IM004' - DB_ERR_SQLALLOCCONNECT_FAILED, // SqlState = 'IM005' - DB_ERR_SQLSETCONNECTOPTION_FAILED, // SqlState = 'IM006' - DB_ERR_NO_DATA_SOURCE_DLG_PROHIB, // SqlState = 'IM007' - DB_ERR_DIALOG_FAILED, // SqlState = 'IM008' - DB_ERR_UNABLE_TO_LOAD_TRANSLATION_DLL, // SqlState = 'IM009' - DB_ERR_DATA_SOURCE_NAME_TOO_LONG, // SqlState = 'IM010' - DB_ERR_DRIVER_NAME_TOO_LONG, // SqlState = 'IM011' - DB_ERR_DRIVER_KEYWORD_SYNTAX_ERROR, // SqlState = 'IM012' - DB_ERR_TRACE_FILE_ERROR, // SqlState = 'IM013' - DB_ERR_TABLE_OR_VIEW_ALREADY_EXISTS, // SqlState = 'S0001' - DB_ERR_TABLE_NOT_FOUND, // SqlState = 'S0002' - DB_ERR_INDEX_ALREADY_EXISTS, // SqlState = 'S0011' - DB_ERR_INDEX_NOT_FOUND, // SqlState = 'S0012' - DB_ERR_COLUMN_ALREADY_EXISTS, // SqlState = 'S0021' - DB_ERR_COLUMN_NOT_FOUND, // SqlState = 'S0022' - DB_ERR_NO_DEFAULT_FOR_COLUMN, // SqlState = 'S0023' - DB_ERR_GENERAL_ERROR, // SqlState = 'S1000' - DB_ERR_MEMORY_ALLOCATION_FAILURE, // SqlState = 'S1001' - DB_ERR_INVALID_COLUMN_NUMBER, // SqlState = 'S1002' - DB_ERR_PROGRAM_TYPE_OUT_OF_RANGE, // SqlState = 'S1003' - DB_ERR_SQL_DATA_TYPE_OUT_OF_RANGE, // SqlState = 'S1004' - DB_ERR_OPERATION_CANCELLED, // SqlState = 'S1008' - DB_ERR_INVALID_ARGUMENT_VALUE, // SqlState = 'S1009' - DB_ERR_FUNCTION_SEQUENCE_ERROR, // SqlState = 'S1010' - DB_ERR_OPERATION_INVALID_AT_THIS_TIME, // SqlState = 'S1011' - DB_ERR_INVALID_TRANS_OPERATION_CODE, // SqlState = 'S1012' - DB_ERR_NO_CURSOR_NAME_AVAIL, // SqlState = 'S1015' - DB_ERR_INVALID_STR_OR_BUF_LEN, // SqlState = 'S1090' - DB_ERR_DESCRIPTOR_TYPE_OUT_OF_RANGE, // SqlState = 'S1091' - DB_ERR_OPTION_TYPE_OUT_OF_RANGE, // SqlState = 'S1092' - DB_ERR_INVALID_PARAM_NO, // SqlState = 'S1093' - DB_ERR_INVALID_SCALE_VALUE, // SqlState = 'S1094' - DB_ERR_FUNCTION_TYPE_OUT_OF_RANGE, // SqlState = 'S1095' - DB_ERR_INF_TYPE_OUT_OF_RANGE, // SqlState = 'S1096' - DB_ERR_COLUMN_TYPE_OUT_OF_RANGE, // SqlState = 'S1097' - DB_ERR_SCOPE_TYPE_OUT_OF_RANGE, // SqlState = 'S1098' - DB_ERR_NULLABLE_TYPE_OUT_OF_RANGE, // SqlState = 'S1099' - DB_ERR_UNIQUENESS_OPTION_TYPE_OUT_OF_RANGE, // SqlState = 'S1100' - DB_ERR_ACCURACY_OPTION_TYPE_OUT_OF_RANGE, // SqlState = 'S1101' - DB_ERR_DIRECTION_OPTION_OUT_OF_RANGE, // SqlState = 'S1103' - DB_ERR_INVALID_PRECISION_VALUE, // SqlState = 'S1104' - DB_ERR_INVALID_PARAM_TYPE, // SqlState = 'S1105' - DB_ERR_FETCH_TYPE_OUT_OF_RANGE, // SqlState = 'S1106' - DB_ERR_ROW_VALUE_OUT_OF_RANGE, // SqlState = 'S1107' - DB_ERR_CONCURRENCY_OPTION_OUT_OF_RANGE, // SqlState = 'S1108' - DB_ERR_INVALID_CURSOR_POSITION, // SqlState = 'S1109' - DB_ERR_INVALID_DRIVER_COMPLETION, // SqlState = 'S1110' - DB_ERR_INVALID_BOOKMARK_VALUE, // SqlState = 'S1111' - DB_ERR_DRIVER_NOT_CAPABLE, // SqlState = 'S1C00' - DB_ERR_TIMEOUT_EXPIRED // SqlState = 'S1T00' -}; - -struct DbStuff -{ - HENV Henv; - char Dsn[SQL_MAX_DSN_LENGTH+1]; // Data Source Name - char Uid[20]; // User ID - char AuthStr[20]; // Authorization string (password) -}; - -typedef struct -{ - char TypeName[DB_TYPE_NAME_LEN]; - int FsqlType; - long Precision; - short CaseSensitive; -// short MinimumScale; - short MaximumScale; -} SqlTypeInfo; - -class CcolInf -{ -public: - char tableName[DB_MAX_TABLE_NAME_LEN+1]; - char colName[DB_MAX_COLUMN_NAME_LEN+1]; - int sqlDataType; -}; - -class wxDB -{ -private: - - // Private data - bool dbIsOpen; - char *dsn; // Data source name - char *uid; // User ID - char *authStr; // Authorization string (password) - - // Private member functions - bool getDbInfo(void); - bool getDataTypeInfo(SWORD fSqlType, SqlTypeInfo &structSQLTypeInfo); - bool setConnectionOptions(void); - void logError(char *errMsg, char *SQLState); - -public: - - // The following structure contains database information gathered from the - // datasource when the datasource is first opened. - struct - { - char dbmsName[40]; // Name of the dbms product - char dbmsVer[20]; // Version # of the dbms product - char driverName[40]; // Driver name - char odbcVer[20]; // ODBC version of the driver - char drvMgrOdbcVer[20]; // ODBC version of the driver manager - char driverVer[40]; // Driver version - char serverName[40]; // Server Name, typically a connect string - char databaseName[128]; // Database filename - char outerJoins[2]; // Indicates whether the data source supports outer joins - char procedureSupport[2]; // Indicates whether the data source supports stored procedures - UWORD maxConnections; // Maximum # of connections the data source supports - UWORD maxStmts; // Maximum # of HSTMTs per HDBC - UWORD apiConfLvl; // ODBC API conformance level - UWORD cliConfLvl; // Indicates whether the data source is SAG compliant - UWORD sqlConfLvl; // SQL conformance level - UWORD cursorCommitBehavior; // Indicates how cursors are affected by a db commit - UWORD cursorRollbackBehavior; // Indicates how cursors are affected by a db rollback - UWORD supportNotNullClause; // Indicates if data source supports NOT NULL clause - char supportIEF[2]; // Integrity Enhancement Facility (Referential Integrity) - UDWORD txnIsolation; // Default transaction isolation level supported by the driver - UDWORD txnIsolationOptions; // Transaction isolation level options available - UDWORD fetchDirections; // Fetch directions supported - UDWORD lockTypes; // Lock types supported in SQLSetPos - UDWORD posOperations; // Position operations supported in SQLSetPos - UDWORD posStmts; // Position statements supported - UDWORD scrollConcurrency; // Concurrency control options supported for scrollable cursors - UDWORD scrollOptions; // Scroll Options supported for scrollable cursors - UDWORD staticSensitivity; // Indicates if additions, deletions and updates can be detected - UWORD txnCapable; // Indicates if the data source supports transactions - UDWORD loginTimeout; // Number seconds to wait for a login request - } dbInf; - - // ODBC handles - HENV henv; // ODBC Environment handle - HDBC hdbc; // ODBC DB Connection handle - HSTMT hstmt; // ODBC Statement handle - - // ODBC Error Inf. - char sqlState[20]; - SDWORD nativeError; - char errorMsg[SQL_MAX_MESSAGE_LENGTH]; - SWORD cbErrorMsg; - char errorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN]; - int DB_STATUS; - - //Error reporting mode - bool silent; - - // Inf. about logical data types VARCHAR, INTEGER, FLOAT and DATE. - // This inf. is obtained from the ODBC driver by use of the - // SQLGetTypeInfo() function. The key piece of inf. is the - // type name the data source uses for each logical data type. - // e.g. VARCHAR; Oracle calls it VARCHAR2. - SqlTypeInfo typeInfVarchar, typeInfInteger, typeInfFloat, typeInfDate; - - // Public member functions - wxDB(HENV &aHenv); - bool Open(char *Dsn, char *Uid, char *AuthStr); // Data Source Name, User ID, Password - void Close(void); - bool CommitTrans(void); - bool RollbackTrans(void); - bool DispAllErrors(HENV aHenv, HDBC aHdbc = SQL_NULL_HDBC, HSTMT aHstmt = SQL_NULL_HSTMT); - bool GetNextError(HENV aHenv, HDBC aHdbc = SQL_NULL_HDBC, HSTMT aHstmt = SQL_NULL_HSTMT); - void DispNextError(void); - bool CreateView(char *viewName, char *colList, char *pSqlStmt); - bool ExecSql(char *pSqlStmt); - bool Grant(int privileges, char *tableName, char *userList = "PUBLIC"); - int TranslateSqlState(char *SQLState); - CcolInf *GetColumns(char *tableName[]); - char *GetDatabaseName(void) {return dbInf.dbmsName;} - char *GetDataSource(void) {return dsn;} - char *GetUsername(void) {return uid;} - char *GetPassword(void) {return authStr;} - bool IsOpen(void) {return dbIsOpen;} - HENV GetHENV(void) {return henv;} - HDBC GetHDBC(void) {return hdbc;} - HSTMT GetHSTMT(void) {return hstmt;} - bool TableExists(char *tableName); // Table name can refer to a table, view, alias or synonym - void LogError(char *errMsg, char *SQLState = 0) {logError(errMsg, SQLState);} - -}; // wxDB - -// This structure forms a node in a linked list. The linked list of "DbList" objects -// keeps track of allocated database connections. This allows the application to -// open more than one database connection through ODBC for multiple transaction support -// or for multiple database support. - -struct DbList -{ - DbList *PtrPrev; // Pointer to previous item in the list - char Dsn[SQL_MAX_DSN_LENGTH+1]; // Data Source Name - wxDB *PtrDb; // Pointer to the wxDB object - bool Free; // Is item free or in use? - DbList *PtrNext; // Pointer to next item in the list -}; - -// The following routines allow a user to get new database connections, free them -// for other code segments to use, or close all of them when the application has -// completed. - -wxDB *GetDbConnection(DbStuff *pDbStuff); -bool FreeDbConnection(wxDB *pDb); -void CloseDbConnections(void); -int NumberDbConnectionsInUse(void); - -// This routine allows you to query a driver manager -// for a list of available datasources. Call this routine -// the first time using SQL_FETCH_FIRST. Continue to call it -// using SQL_FETCH_NEXT until you've exhausted the list. -bool GetDataSource(HENV henv, char *Dsn, SWORD DsnMax, char *DsDesc, SWORD DsDescMax, - UWORD direction = SQL_FETCH_NEXT); - -#endif - diff --git a/include/wx/dbtable.h b/include/wx/dbtable.h deleted file mode 100644 index 23e6d10f8a..0000000000 --- a/include/wx/dbtable.h +++ /dev/null @@ -1,165 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: table.h -// Purpose: Declaration of the wxTable class. -// Author: Doug Card -// Modified by: -// Created: 9.96 -// RCS-ID: $Id$ -// Copyright: (c) 1996 Remstar International, Inc. -// Licence: wxWindows licence, plus: -// Notice: This class library and its intellectual design are free of charge for use, -// modification, enhancement, debugging under the following conditions: -// 1) These classes may only be used as part of the implementation of a -// wxWindows-based application -// 2) All enhancements and bug fixes are to be submitted back to the wxWindows -// user groups free of all charges for use with the wxWindows library. -// 3) These classes may not be distributed as part of any other class library, -// DLL, text (written or electronic), other than a complete distribution of -// the wxWindows GUI development toolkit. -/////////////////////////////////////////////////////////////////////////////// - -/* -// SYNOPSIS START -// SYNOPSIS STOP -*/ - -#ifndef TABLE_DOT_H -#define TABLE_DOT_H - -#ifdef __GNUG__ -#pragma interface "dbtable.h" -#endif - -#include "wx/db.h" - -const ROWID_LEN = 24; // 18 is the max, 24 is in case it gets larger - -// The following class is used to define a column of a table. -// The wxTable constructor will dynamically allocate as many of -// these as there are columns in the table. The class derived -// from wxTable must initialize these column definitions in it's -// constructor. These column definitions provide inf. to the -// wxTable class which allows it to create a table in the data -// source, exchange data between the data source and the C++ -// object, and so on. - -class CcolDef -{ -public: - char ColName[DB_MAX_COLUMN_NAME_LEN+1]; // Column Name glt 4/19/97 added one for the null terminator - int DbDataType; // Logical Data Type; e.g. DB_DATA_TYPE_INTEGER - int SqlCtype; // C data type; e.g. SQL_C_LONG - void *PtrDataObj; // Address of the data object - int SzDataObj; // Size, in bytes, of the data object - bool KeyField; // TRUE if this column is part of the PRIMARY KEY to the table; Date fields should NOT be KeyFields. - bool Updateable; // Specifies whether this column is updateable - bool InsertAllowed; // Specifies whether this column should be included in an INSERT statement - bool DerivedCol; // Specifies whether this column is a derived value - SDWORD CbValue; // Internal use only!!! -}; // CcolDef - -// This structure is used when creating secondary indexes. -class CidxDef -{ -public: - char ColName[DB_MAX_COLUMN_NAME_LEN+1]; // Column Name glt 4/19/97 added one for the null terminator - bool Ascending; -}; // CidxDef - -class wxTable -{ -private: - - // Private member variables - int currCursorNo; - - // Private member functions - bool bindInsertParams(void); - bool bindUpdateParams(void); - bool bindCols(HSTMT cursor); - bool getRec(UWORD fetchType); - bool execDelete(char *pSqlStmt); - bool execUpdate(char *pSqlStmt); - bool query(int queryType, bool forUpdate, bool distinct, char *pSqlStmt = 0); - -public: - - // Pointer to the database object this table belongs to - wxDB *pDb; - - // ODBC Handles - HENV henv; // ODBC Environment handle - HDBC hdbc; // ODBC DB Connection handle - HSTMT hstmt; // ODBC Statement handle -// HSTMT c0, c1, c2, c3, c4, c5; // Cursors 0 through 5 - HSTMT c0, c1, c2; // Limited to Cursors 0 through 2 for now - HSTMT hstmtInsert; // ODBC Statement handle used specifically for inserts - HSTMT hstmtDelete; // ODBC Statement handle used specifically for deletes - HSTMT hstmtUpdate; // ODBC Statement handle used specifically for updates - HSTMT hstmtCount; // ODBC Statement handle used specifically for COUNT(*) - - // Table Inf. - char tableName[DB_MAX_TABLE_NAME_LEN+1]; // Table name - char queryTableName[DB_MAX_TABLE_NAME_LEN+1]; // Query Table Name - int noCols; // # of columns in the table - - // Column Definitions - CcolDef *colDefs; // Array of CcolDef structures - - // Where and Order By clauses - char *where; // Standard SQL where clause, minus the word WHERE - char *orderBy; // Standard SQL order by clause, minus the ORDER BY - - // Flags - bool selectForUpdate; - - // Public member functions - wxTable(wxDB *pwxDB, const char *tblName, const int nCols, const char *qryTblName = 0); - ~wxTable(); - bool Open(void); - bool CreateTable(void); - bool CreateIndex(char * idxName, bool unique, int noIdxCols, CidxDef *pIdxDefs); - bool CloseCursor(HSTMT cursor); - int Insert(void); - bool Update(void); - bool Update(char *pSqlStmt); - bool UpdateWhere(char *pWhereClause); - bool Delete(void); - bool DeleteWhere(char *pWhereClause); - bool DeleteMatching(void); - bool Query(bool forUpdate = FALSE, bool distinct = FALSE); - bool QueryBySqlStmt(char *pSqlStmt); - bool QueryMatching(bool forUpdate = FALSE, bool distinct = FALSE); - bool QueryOnKeyFields(bool forUpdate = FALSE, bool distinct = FALSE); - bool GetNext(void) { return(getRec(SQL_FETCH_NEXT)); } - bool operator++(int) { return(getRec(SQL_FETCH_NEXT)); } -#ifndef FWD_ONLY_CURSORS - bool GetPrev(void) { return(getRec(SQL_FETCH_PRIOR)); } - bool operator--(int) { return(getRec(SQL_FETCH_PRIOR)); } - bool GetFirst(void) { return(getRec(SQL_FETCH_FIRST)); } - bool GetLast(void) { return(getRec(SQL_FETCH_LAST)); } -#endif - bool IsCursorClosedOnCommit(void); - bool IsColNull(int colNo); - UWORD GetRowNum(void); - void GetSelectStmt(char *pSqlStmt, int typeOfSelect, bool distinct); - void GetDeleteStmt(char *pSqlStmt, int typeOfDel, char *pWhereClause = 0); - void GetUpdateStmt(char *pSqlStmt, int typeOfUpd, char *pWhereClause = 0); - void GetWhereClause(char *pWhereClause, int typeOfWhere); - bool CanSelectForUpdate(void); - bool CanUpdByROWID(void); - void ClearMemberVars(void); - bool SetQueryTimeout(UDWORD nSeconds); - void SetColDefs (int index, char *fieldName, int dataType, void *pData, int cType, - int size, bool keyField = FALSE, bool upd = TRUE, - bool insAllow = TRUE, bool derivedCol = FALSE); - bool SetCursor(int cursorNo = DB_CURSOR0); - int GetCursor(void) { return(currCursorNo); } - ULONG Count(void); - int DB_STATUS(void) { return(pDb->DB_STATUS); } - bool Refresh(void); - -}; // wxTable - -#endif - diff --git a/include/wx/dc.h b/include/wx/dc.h deleted file mode 100644 index 2cf32f30d2..0000000000 --- a/include/wx/dc.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_DC_H_BASE_ -#define _WX_DC_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/dc.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/dc.h" -#elif defined(__WXGTK__) -#include "wx/gtk/dc.h" -#elif defined(__WXQT__) -#include "wx/qt/dc.h" -#elif defined(__WXMAC__) -#include "wx/mac/dc.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/dc.h" -#endif - -#endif - // _WX_DC_H_BASE_ diff --git a/include/wx/dcclient.h b/include/wx/dcclient.h deleted file mode 100644 index 557e2f4dc2..0000000000 --- a/include/wx/dcclient.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_DCCLIENT_H_BASE_ -#define _WX_DCCLIENT_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/dcclient.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/dcclient.h" -#elif defined(__WXGTK__) -#include "wx/gtk/dcclient.h" -#elif defined(__WXQT__) -#include "wx/qt/dcclient.h" -#elif defined(__WXMAC__) -#include "wx/mac/dcclient.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/dcclient.h" -#endif - -#endif - // _WX_DCCLIENT_H_BASE_ diff --git a/include/wx/dcmemory.h b/include/wx/dcmemory.h deleted file mode 100644 index 84a814c4d6..0000000000 --- a/include/wx/dcmemory.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_DCMEMORY_H_BASE_ -#define _WX_DCMEMORY_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/dcmemory.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/dcmemory.h" -#elif defined(__WXGTK__) -#include "wx/gtk/dcmemory.h" -#elif defined(__WXQT__) -#include "wx/qt/dcmemory.h" -#elif defined(__WXMAC__) -#include "wx/mac/dcmemory.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/dcmemory.h" -#endif - -#endif - // _WX_DCMEMORY_H_BASE_ diff --git a/include/wx/dcprint.h b/include/wx/dcprint.h deleted file mode 100644 index 532323e9d2..0000000000 --- a/include/wx/dcprint.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _WX_DCPRINT_H_BASE_ -#define _WX_DCPRINT_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/dcprint.h" -#endif - -#endif - // _WX_DCPRINT_H_BASE_ diff --git a/include/wx/dcscreen.h b/include/wx/dcscreen.h deleted file mode 100644 index bd35719499..0000000000 --- a/include/wx/dcscreen.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_DCSCREEN_H_BASE_ -#define _WX_DCSCREEN_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/dcscreen.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/dcscreen.h" -#elif defined(__WXGTK__) -#include "wx/gtk/dcscreen.h" -#elif defined(__WXQT__) -#include "wx/qt/dcscreen.h" -#elif defined(__WXMAC__) -#include "wx/mac/dcscreen.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/dcscreen.h" -#endif - -#endif - // _WX_DCSCREEN_H_BASE_ diff --git a/include/wx/dde.h b/include/wx/dde.h deleted file mode 100644 index 908fb09388..0000000000 --- a/include/wx/dde.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_DDE_H_BASE_ -#define _WX_DDE_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/dde.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/dde.h" -#elif defined(__WXGTK__) -#include "wx/gtk/dde.h" -#elif defined(__WXQT__) -#include "wx/qt/dde.h" -#elif defined(__WXMAC__) -#include "wx/mac/dde.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/dde.h" -#endif - -#endif - // _WX_DDE_H_BASE_ diff --git a/include/wx/debug.h b/include/wx/debug.h deleted file mode 100644 index 26ed65b314..0000000000 --- a/include/wx/debug.h +++ /dev/null @@ -1,103 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: debug.h -// Purpose: Misc debug functions and macros -// Author: Vadim Zeitlin -// Modified by: -// Created: 29/01/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DEBUG_H_ -#define _WX_DEBUG_H_ - -#include - -// ---------------------------------------------------------------------------- -/** - @name Debugging macros - - All debugging macros rely on ASSERT() which in turn calls user-defined - OnAssert() function. To keep things simple, it's called even when the - expression is TRUE (i.e. everything is ok) and by default does nothing: just - returns the same value back. But if you redefine it to do something more sexy - (popping up a message box in your favourite GUI, sending you e-mail or - whatever) it will affect all ASSERTs, FAILs and CHECKs in your code. -
-
- Warning: if you don't like advices on programming style, don't read - further! ;-) -
-
- Extensive use of these macros is recommended! Remember that ASSERTs are - disabled in final (without WXDEBUG defined) build, so they add strictly - nothing to your program's code. On the other hand, CHECK macros do stay - even in release builds, but in general are not much of a burden, while - a judicious use of them might increase your program's stability. - - @memo Debugging macros (replacement for standard assert()) and more. - */ -// ---------------------------------------------------------------------------- -//@{ - -/** @name Macros which are completely disabled in 'release' mode */ -//@{ -#ifdef __WXDEBUG__ - /** - this function may be redefined to do something non trivial and is called - whenever one of debugging macros fails (i.e. condition is false in an - assertion) - @param szFile and nLine - file name and line number of the ASSERT - szMsg - optional message explaining the reason - */ - void wxOnAssert(const char *szFile, int nLine, const char *szMsg = (const char *) NULL); - - /// generic assert macro - #define wxASSERT(cond) if ( !(cond) ) wxOnAssert(__FILE__, __LINE__) - /// assert with additional message explaining it's cause - #define wxASSERT_MSG(x, m) if ( !(x) ) wxOnAssert(__FILE__, __LINE__, m) -#else - // nothing to do in release modes (hopefully at this moment there are - // no more bugs ;-) - #define wxASSERT(cond) - #define wxASSERT_MSG(x, m) -#endif //WXDEBUG - - /// special form of assert: always triggers it (in debug mode) -#define wxFAIL wxASSERT(0) - /// FAIL with some message -#define wxFAIL_MSG(msg) wxASSERT_MSG(0, msg) -//@} - -// NB: these macros work also in release mode! - -/** - These macros must be used only in invalid situation: for example, an - invalid parameter (NULL pointer) is passed to a function. Instead of - dereferencing it and causing core dump the function might try using - CHECK( p != NULL ) or CHECK( p != NULL, return LogError("p is NULL!!") ) - - @name Macros which remain even in 'release' mode -*/ -//@{ - /// check that expression is true, "return" if not (also FAILs in debug mode) -#define wxCHECK(x, rc) if (!(x)) {wxFAIL; return rc; } - /// as wxCHECK but with a message explaining why we fail -#define wxCHECK_MSG(x, rc, msg) if (!(x)) {wxFAIL_MSG(msg); return rc; } - /// check that expression is true, perform op if not -#define wxCHECK2(x, op) if (!(x)) {wxFAIL; op; } - /// as wxCHECK2 but with a message explaining why we fail -#define wxCHECK2_MSG(x, op, msg) if (!(x)) {wxFAIL_MSG(msg); op; } - /// special form of wxCHECK2: as wxCHECK, but for use in void functions - // NB: there is only one form (with msg parameter) and it's intentional: - // there is no other way to tell the caller what exactly went wrong - // from the void function (of course, the function shouldn't be void - // to begin with...) -#define wxCHECK_RET(x, msg) if (!(x)) {wxFAIL_MSG(msg); return; } -//@} - -//@} - -#endif // _WX_DEBUG_H_ - diff --git a/include/wx/defs.h b/include/wx/defs.h deleted file mode 100644 index b4fb9a7b29..0000000000 --- a/include/wx/defs.h +++ /dev/null @@ -1,883 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: defs.h -// Purpose: Declarations/definitions common to all wx source files -// Author: Julian Smart and others -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DEFS_H_ -#define _WX_DEFS_H_ - -#ifdef __GNUG__ -#pragma interface "defs.h" -#endif - -#ifdef __WXGTK__ - -#include "glib.h" -#include "gdk/gdk.h" -#include "gtk/gtk.h" - -#endif - -#include - -#include "wx/setup.h" -#include "wx/version.h" - -// Helps SGI compilation, apparently -#if defined(__SGI__) -#if defined(__GNUG__) -#define __need_wchar_t -#else -/* Note I use the term __SGI_CC__ for both cc and CC, its not a good idea to - * mix gcc and cc/CC, the name mangling is different */ -#define __SGI_CC__ -#endif -#endif - -// Eliminate double/float warnings -#ifdef _MSC_VER -# pragma warning(disable:4244) -#endif - - -////////////////////////////////////////////////////////////////////////////////// -// Currently Only MS-Windows/NT, XView and Motif are supported -// -#if defined(__HPUX__) && !defined(__WXMOTIF__) -# define __WXMOTIF__ -#endif -#if defined(__WXMOTIF__) -# define __X__ -#endif - -// wxWindows checks for WIN32, not __WIN32__ -#if ((defined(WIN32) || defined(__NT__)) && !defined(__WIN32__) && !defined(__WXSTUBS__)) -#define __WIN32__ -#endif - -#ifndef __WIN32__ -#define __WIN16__ -#endif - -#if !defined(__WIN95__) && (WINVER >= 0x0400) -#define __WIN95__ -#endif - -// Make sure the environment is set correctly -#if defined(__WXMSW__) && defined(__X__) -# error "Target can't be both X and Windows" -#elif !defined(__WXMOTIF__) && !defined(__WXMSW__) && !defined(__WXGTK__) && \ - !defined(__WXMAC__) && !defined(__X__) && !defined(__WXQT__) && !defined(__WXSTUBS__) -#error "No Target! Use -D[__WXMOTIF__|__WXGTK__|__WXMSW__|__WXMAC__|__WXQT__|__WXSTUBS__]" -#endif - -#if defined(__WXMOTIF__) || defined(__WXGTK__) || defined(__WXQT__) || defined(__WXSTUBS__) - -// Bool is now obsolete, use bool instead -// typedef int Bool; - -#ifndef TRUE -# define TRUE 1 -# define FALSE 0 -# define Bool_DEFINED -#endif - -#elif defined(__WXMSW__) - -#ifndef TRUE -# define TRUE 1 -# define FALSE 0 -#endif - -#endif - -// VC++ 4.0 is 1000. - -// Add more tests here for compilers that don't already define bool. -#if ( defined(_MSC_VER) && (_MSC_VER <= 1000) ) || (defined(__BORLANDC__) && (__BORLANDC__ < 0x500)) -typedef unsigned int bool; -#endif - -#if ( defined(_MSC_VER) && (_MSC_VER <= 800) ) || defined(__GNUWIN32__) -#define byte unsigned char -#endif - -typedef short int WXTYPE; -typedef int wxWindowID; - -// Macro to cut down on compiler warnings. -#if REMOVE_UNUSED_ARG -#define WXUNUSED(identifier) /* identifier */ -#else // stupid, broken compiler -#define WXUNUSED(identifier) identifier -#endif - -/* - * Making or using wxWindows as a Windows DLL - */ - -#ifdef __WXMSW__ - -#ifdef __BORLANDC__ - -# ifdef WXMAKINGDLL -# define WXDLLEXPORT __export -# define WXDLLEXPORT_DATA(type) type __export -# define WXDLLEXPORT_CTORFN __export -# elif defined(WXUSINGDLL) -# define WXDLLEXPORT __import -# define WXDLLEXPORT_DATA(type) type __import -# define WXDLLEXPORT_CTORFN -# else -# define WXDLLEXPORT -# define WXDLLEXPORT_DATA(type) type -# define WXDLLEXPORT_CTORFN -# endif - -#else - -# ifdef WXMAKINGDLL -# define WXDLLEXPORT __declspec( dllexport ) -# define WXDLLEXPORT_DATA(type) __declspec( dllexport ) type -# define WXDLLEXPORT_CTORFN __declspec( dllexport ) -# elif defined(WXUSINGDLL) -# define WXDLLEXPORT __declspec( dllimport ) -# define WXDLLEXPORT_DATA(type) __declspec( dllimport ) type -# define WXDLLEXPORT_CTORFN -# else -# define WXDLLEXPORT -# define WXDLLEXPORT_DATA(type) type -# define WXDLLEXPORT_CTORFN -# endif - -#endif - -#else -// Non-Windows -# define WXDLLEXPORT -# define WXDLLEXPORT_DATA(type) type -# define WXDLLEXPORT_CTORFN -#endif - -// For ostream, istream ofstream -#if defined(__BORLANDC__) && defined( _RTLDLL ) -# define WXDLLIMPORT __import -#else -# define WXDLLIMPORT -#endif - -class WXDLLEXPORT wxObject; -class WXDLLEXPORT wxEvent; - - /** symbolic constant used by all Find()-like functions returning positive - integer on success as failure indicator */ -#define NOT_FOUND (-1) - -// ---------------------------------------------------------------------------- -// Error codes -// ---------------------------------------------------------------------------- - -/// Standard error codes -enum ErrCode -{ - /// invalid parameter (in broad sense) - ERR_PARAM = (-4000), - /// no more data (iteration functions usually return this) - ERR_NODATA, - /// user cancelled the operation - ERR_CANCEL, - /// no error (the only non negative error code) - ERR_SUCCESS = 0 -}; - -// ---------------------------------------------------------------------------- -/** @name Very common macros */ -// ---------------------------------------------------------------------------- -//@{ -/// delete pointer if it is not NULL and NULL it afterwards -// (checking that it's !NULL before passing it to delete is just a -// a question of style, because delete will do it itself anyhow, but it might -// be considered as an error by some overzealous debugging implementations of -// the library, so we do it ourselves) -#if defined(__SGI_CC__) -// Okay this is bad styling, but the native SGI compiler is very picky, it -// wont let you compare/assign between a NULL (void *) and another pointer -// type. To be really clean we'd need to pass in another argument, the type -// of p. -// Also note the use of 0L, this would allow future possible 64bit support -// (as yet untested) by ensuring that we zero all the bits in a pointer -// (which is always the same length as a long (at least with the LP64 standard) -// --- offer aug 98 -#define wxDELETE(p) if ( (p) ) { delete (p); p = 0L; } -#else -#define wxDELETE(p) if ( (p) != NULL ) { delete p; p = NULL; } -#endif /* __SGI__CC__ */ - -// delete an array and NULL it (see comments above) -#if defined(__SGI_CC__) -// see above comment. -#define wxDELETEA(p) if ( (p) ) { delete [] (p); p = 0L; } -#else -#define wxDELETEA(p) if ( ((void *) (p)) != NULL ) { delete [] p; p = NULL; } -#endif /* __SGI__CC__ */ - -/// size of statically declared array -#define WXSIZEOF(array) (sizeof(array)/sizeof(array[0])) - -// ---------------------------------------------------------------------------- -// compiler and OS identification -// ---------------------------------------------------------------------------- - -// OS -#if defined(__HPUX__) || defined(____SVR4____) || defined(__LINUX__) || defined(__sgi ) - #ifndef __UNIX__ - #define __UNIX__ - #endif -#endif - -#ifndef __UNIX__ // Windows - #if defined(_MSC_VER) - #define __VISUALC__ - #elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__) - #define __BORLANDC__ - #elif defined(__WATCOMC__) - //#define __WATCOMC__ - #elif defined(__SC__) - #define __SYMANTECC__ - #endif // compiler - -#endif // OS - -// ---------------------------------------------------------------------------- -// compiler specific settings -// ---------------------------------------------------------------------------- - -// to allow compiling with warning level 4 under Microsoft Visual C++ some -// warnings just must be disabled -#ifdef __VISUALC__ - #pragma warning(disable: 4514) // unreferenced inline func has been removed -/* - you might be tempted to disable this one also: triggered by CHECK and FAIL - macros in debug.h, but it's, overall, is a rather useful one, so I leave it - and will try to find some way to disable this warning just for CHECK/FAIL. - Anyone? -*/ - #pragma warning(disable: 4127) // conditional expression is constant - -#endif // VC++ - -// Callback function type definition -typedef void (*wxFunction) (wxObject&, wxEvent&); - -/* - * Window style flags. - * Values are chosen so they can be |'ed in a bit list. - * Some styles are used across more than one group, - * so the values mustn't clash with others in the group. - * Otherwise, numbers can be reused across groups. - * - * From version 1.66: - * Window (cross-group) styles now take up the first half - * of the flag, and control-specific styles the - * second half. - * - */ - -/* - * Window (Frame/dialog/subwindow/panel item) style flags - */ -#define wxVSCROLL 0x80000000 -#define wxHSCROLL 0x40000000 -#define wxCAPTION 0x20000000 - -// New styles -#define wxDOUBLE_BORDER 0x10000000 -#define wxSUNKEN_BORDER 0x08000000 -#define wxRAISED_BORDER 0x04000000 -#define wxBORDER 0x02000000 -#define wxSIMPLE_BORDER 0x02000000 -#define wxSTATIC_BORDER 0x01000000 -#define wxTRANSPARENT_WINDOW 0x00100000 -#define wxNO_BORDER 0x00200000 - -#define wxUSER_COLOURS 0x00800000 - // Override CTL3D etc. control colour processing to - // allow own background colour - // OBSOLETE - use wxNO_3D instead -#define wxNO_3D 0x00800000 - // Override CTL3D or native 3D styles for children -#define wxCLIP_CHILDREN 0x00400000 - // Clip children when painting, which reduces flicker in - // e.g. frames and splitter windows, but can't be used in - // a panel where a static box must be 'transparent' (panel - // paints the background for it) - -// Add this style to a panel to get tab traversal working -// outside of dialogs. -#define wxTAB_TRAVERSAL 0x00080000 - -// Orientations -#define wxHORIZONTAL 0x01 -#define wxVERTICAL 0x02 -#define wxBOTH (wxVERTICAL|wxHORIZONTAL) -#define wxCENTER_FRAME 0x04 /* centering into frame rather than screen */ - -/* - * Frame/dialog style flags - */ -#define wxSTAY_ON_TOP 0x8000 -#define wxICONIZE 0x4000 -#define wxMINIMIZE wxICONIZE -#define wxMAXIMIZE 0x2000 -#define wxTHICK_FRAME 0x1000 -#define wxSYSTEM_MENU 0x0800 -#define wxMINIMIZE_BOX 0x0400 -#define wxMAXIMIZE_BOX 0x0200 -#define wxTINY_CAPTION_HORIZ 0x0100 -#define wxTINY_CAPTION_VERT 0x0080 -#define wxRESIZE_BOX wxMAXIMIZE_BOX -#define wxRESIZE_BORDER 0x0040 -#define wxDIALOG_MODAL 0x0020 -#define wxDIALOG_MODELESS 0x0000 - -#define wxDEFAULT_FRAME_STYLE (wxRESIZE_BORDER | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN) - -#if WXWIN_COMPATIBILITY -#define wxDEFAULT_FRAME wxDEFAULT_FRAME_STYLE -#endif - -#define wxDEFAULT_DIALOG_STYLE (wxSYSTEM_MENU|wxCAPTION|wxTHICK_FRAME) - -/* - * Subwindow style flags - */ -#define wxRETAINED 0x0001 -#define wxBACKINGSTORE wxRETAINED -// wxCanvas or wxPanel can optionally have a thick frame under MS Windows. -// #define wxTHICK_FRAME 0x1000 - -/* - * wxToolBar style flags - */ - -#define wxTB_3DBUTTONS 0x8000 -#define wxTB_HORIZONTAL 0x0002 -#define wxTB_VERTICAL 0x0004 -// Flatbar/Coolbar under Win98 -#define wxTB_FLAT 0x0008 - -/* - * Apply to all panel items - */ - -#define wxCOLOURED 0x0800 -// Alignment for panel item labels: replaces characters with zeros -// when creating label, so spaces can be included in string for alignment. -#define wxFIXED_LENGTH 0x0400 -#define wxALIGN_LEFT 0x0000 -#define wxALIGN_CENTER 0x0100 -#define wxALIGN_CENTRE 0x0100 -#define wxALIGN_RIGHT 0x0200 - -/* - * Styles for wxListBox - */ - -#define wxLB_SORT 0x0010 -#define wxLB_SINGLE 0x0020 -#define wxLB_MULTIPLE 0x0040 -#define wxLB_EXTENDED 0x0080 -// wxLB_OWNERDRAW is Windows-only -#define wxLB_OWNERDRAW 0x0100 -#define wxLB_NEEDED_SB 0x0200 -#define wxLB_ALWAYS_SB 0x0400 -#define wxLB_HSCROLL wxHSCROLL - -/* - * wxTextCtrl style flags - */ -#define wxPROCESS_ENTER 0x0004 -#define wxPASSWORD 0x0008 -#define wxTE_PROCESS_ENTER wxPROCESS_ENTER -#define wxTE_PASSWORD wxPASSWORD -#define wxTE_READONLY 0x0010 -#define wxTE_MULTILINE 0x0020 - -// MSW-only -#define wxTE_RICHTEXT 0x0020 - -/* - * wxComboBox style flags - */ -#define wxCB_SIMPLE 0x0004 -#define wxCB_SORT 0x0008 -#define wxCB_READONLY 0x0010 -#define wxCB_DROPDOWN 0x0020 - -/* - * wxRadioBox/wxRadioButton style flags - */ -#define wxRA_HORIZONTAL wxHORIZONTAL -#define wxRA_VERTICAL wxVERTICAL -#define wxRB_GROUP 0x0004 - -/* - * wxGauge flags - */ -#define wxGA_PROGRESSBAR 0x0004 -#define wxGA_HORIZONTAL wxHORIZONTAL -#define wxGA_VERTICAL wxVERTICAL - -/* - * wxSlider flags - */ - -#define wxSL_HORIZONTAL wxHORIZONTAL -#define wxSL_VERTICAL wxVERTICAL -// The next one is obsolete - use scroll events instead -#define wxSL_NOTIFY_DRAG 0x0000 -#define wxSL_AUTOTICKS 0x0008 -// #define wxSL_MANUALTICKS 0x0010 -#define wxSL_LABELS 0x0020 -#define wxSL_LEFT 0x0040 -#define wxSL_TOP 0x0080 -#define wxSL_RIGHT 0x0100 -#define wxSL_BOTTOM 0x0200 -#define wxSL_BOTH 0x0400 -#define wxSL_SELRANGE 0x0800 - -/* - * wxScrollBar flags - */ - -#define wxSB_HORIZONTAL wxHORIZONTAL -#define wxSB_VERTICAL wxVERTICAL - -/* - * wxButton flags - */ - -#define wxBU_AUTODRAW 0x0004 -#define wxBU_NOAUTODRAW 0x0000 - -/* - * wxTreeCtrl flags - */ - -#define wxTR_HAS_BUTTONS 0x0004 -#define wxTR_EDIT_LABELS 0x0008 -#define wxTR_LINES_AT_ROOT 0x0010 - -/* - * wxListCtrl flags - */ - -#define wxLC_ICON 0x0004 -#define wxLC_SMALL_ICON 0x0008 -#define wxLC_LIST 0x0010 -#define wxLC_REPORT 0x0020 -#define wxLC_ALIGN_TOP 0x0040 -#define wxLC_ALIGN_LEFT 0x0080 -#define wxLC_AUTOARRANGE 0x0100 -#define wxLC_USER_TEXT 0x0200 -#define wxLC_EDIT_LABELS 0x0400 -#define wxLC_NO_HEADER 0x0800 -#define wxLC_NO_SORT_HEADER 0x1000 -#define wxLC_SINGLE_SEL 0x2000 -#define wxLC_SORT_ASCENDING 0x4000 -#define wxLC_SORT_DESCENDING 0x8000 - -#define wxLC_MASK_TYPE (wxLC_ICON | wxLC_SMALL_ICON | wxLC_LIST | wxLC_REPORT) -#define wxLC_MASK_ALIGN (wxLC_ALIGN_TOP | wxLC_ALIGN_LEFT) -#define wxLC_MASK_SORT (wxLC_SORT_ASCENDING | wxLC_SORT_DESCENDING) - -// Omitted because (a) too much detail (b) not enough style flags -// #define wxLC_NO_SCROLL -// #define wxLC_NO_LABEL_WRAP -// #define wxLC_OWNERDRAW_FIXED -// #define wxLC_SHOW_SEL_ALWAYS - -/* - * wxSpinButton flags - */ - -#define wxSP_VERTICAL 0x0004 -#define wxSP_HORIZONTAL 0x0008 -#define wxSP_ARROW_KEYS 0x0010 -#define wxSP_WRAP 0x0020 - -/* - * wxSplitterWnd flags - */ - -#define wxSP_NOBORDER 0x0000 -#define wxSP_3D 0x0004 -#define wxSP_BORDER 0x0008 - -/* - * wxTabCtrl flags - */ - -#define wxTAB_MULTILINE 0x0000 -#define wxTAB_RIGHTJUSTIFY 0x0004 -#define wxTAB_FIXEDWIDTH 0x0008 -#define wxTAB_OWNERDRAW 0x0010 - -// Sorry, I changed my mind about these names... -#define wxTC_MULTILINE 0x0000 -#define wxTC_RIGHTJUSTIFY 0x0004 -#define wxTC_FIXEDWIDTH 0x0008 -#define wxTC_OWNERDRAW 0x0010 - -/* - * wxStatusBar95 flags - */ - -#define wxST_SIZEGRIP 0x0002 - -/* - * GDI descriptions - */ - -enum { -// Text font families - wxDEFAULT = 70, - wxDECORATIVE, - wxROMAN, - wxSCRIPT, - wxSWISS, - wxMODERN, - wxTELETYPE, /* @@@@ */ - -// Proportional or Fixed width fonts (not yet used) - wxVARIABLE = 80, - wxFIXED, - - wxNORMAL = 90, - wxLIGHT, - wxBOLD, -// Also wxNORMAL for normal (non-italic text) - wxITALIC, - wxSLANT, - -// Pen styles - wxSOLID = 100, - wxDOT, - wxLONG_DASH, - wxSHORT_DASH, - wxDOT_DASH, - wxUSER_DASH, - - wxTRANSPARENT, - -// Brush & Pen Stippling. Note that a stippled pen cannot be dashed!! -// Note also that stippling a Pen IS meaningfull, because a Line is -// drawn with a Pen, and without any Brush -- and it can be stippled. - wxSTIPPLE = 110, - wxBDIAGONAL_HATCH, - wxCROSSDIAG_HATCH, - wxFDIAGONAL_HATCH, - wxCROSS_HATCH, - wxHORIZONTAL_HATCH, - wxVERTICAL_HATCH, -#define IS_HATCH(s) ((s)>=wxBDIAGONAL_HATCH && (s)<=wxVERTICAL_HATCH) - - wxJOIN_BEVEL = 120, - wxJOIN_MITER, - wxJOIN_ROUND, - - wxCAP_ROUND = 130, - wxCAP_PROJECTING, - wxCAP_BUTT -}; - - -// Logical ops -typedef enum { - wxCLEAR, // 0 - wxXOR, // src XOR dst - wxINVERT, // NOT dst - wxOR_REVERSE, // src OR (NOT dst) - wxAND_REVERSE,// src AND (NOT dst) - wxCOPY, // src - wxAND, // src AND dst - wxAND_INVERT, // (NOT src) AND dst - wxNO_OP, // dst - wxNOR, // (NOT src) AND (NOT dst) - wxEQUIV, // (NOT src) XOR dst - wxSRC_INVERT, // (NOT src) - wxOR_INVERT, // (NOT src) OR dst - wxNAND, // (NOT src) OR (NOT dst) - wxOR, // src OR dst - wxSET, // 1 - wxSRC_OR, // source _bitmap_ OR destination - wxSRC_AND // source _bitmap_ AND destination -} form_ops_t; - -// Flood styles -#define wxFLOOD_SURFACE 1 -#define wxFLOOD_BORDER 2 - -// Polygon filling mode -#define wxODDEVEN_RULE 1 -#define wxWINDING_RULE 2 - -// ToolPanel in wxFrame -#define wxTOOL_TOP 1 -#define wxTOOL_BOTTOM 2 -#define wxTOOL_LEFT 3 -#define wxTOOL_RIGHT 4 - -// Dialog specifiers/return values - -#define wxOK 0x0001 -#define wxYES_NO 0x0002 -#define wxCANCEL 0x0004 -#define wxYES 0x0008 -#define wxNO 0x0010 - -#define wxICON_EXCLAMATION 0x0020 -#define wxICON_HAND 0x0040 -#define wxICON_QUESTION 0x0080 -#define wxICON_INFORMATION 0x0100 - -#define wxICON_STOP wxICON_HAND -#define wxICON_ASTERISK wxICON_INFORMATION -#define wxICON_MASK (0x0020|0x0040|0x0080|0x0100) - -#define wxCENTRE 0x0200 -#define wxCENTER wxCENTRE - -// Possible SetSize flags - -// Use internally-calculated width if -1 -#define wxSIZE_AUTO_WIDTH 0x0001 -// Use internally-calculated height if -1 -#define wxSIZE_AUTO_HEIGHT 0x0002 -// Use internally-calculated width and height if each is -1 -#define wxSIZE_AUTO (wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT) -// Ignore missing (-1) dimensions (use existing). -// For readability only: test for wxSIZE_AUTO_WIDTH/HEIGHT in code. -#define wxSIZE_USE_EXISTING 0x0000 -// Allow -1 as a valid position -#define wxSIZE_ALLOW_MINUS_ONE 0x0004 -// Don't do parent client adjustments (for implementation only) -#define wxSIZE_NO_ADJUSTMENTS 0x0008 - - -// Data format for drag & drop and clipboard operations -// numbers as per winuser.h - -enum wxDataFormat -{ - wxDF_TEXT = 1, /* CF_TEXT */ - wxDF_BITMAP = 2, /* CF_BITMAP */ - wxDF_METAFILE = 3, /* CF_METAFILEPICT */ - wxDF_DIB = 8, /* CF_DIB */ - wxDF_OEMTEXT = 7, /* CF_OEMTEXT */ - wxDF_FILENAME = 15 /* CF_HDROP */ -}; - -// Virtual keycodes - -enum _Virtual_keycodes { - WXK_BACK = 8, - WXK_TAB = 9, - WXK_RETURN = 13, - WXK_ESCAPE = 27, - WXK_SPACE = 32, - WXK_DELETE = 127, - - WXK_START = 300, - WXK_LBUTTON, - WXK_RBUTTON, - WXK_CANCEL, - WXK_MBUTTON, - WXK_CLEAR, - WXK_SHIFT, - WXK_CONTROL, - WXK_MENU, - WXK_PAUSE, - WXK_CAPITAL, - WXK_PRIOR, // Page up - WXK_NEXT, // Page down - WXK_END, - WXK_HOME, - WXK_LEFT, - WXK_UP, - WXK_RIGHT, - WXK_DOWN, - WXK_SELECT, - WXK_PRINT, - WXK_EXECUTE, - WXK_SNAPSHOT, - WXK_INSERT, - WXK_HELP, - WXK_NUMPAD0, - WXK_NUMPAD1, - WXK_NUMPAD2, - WXK_NUMPAD3, - WXK_NUMPAD4, - WXK_NUMPAD5, - WXK_NUMPAD6, - WXK_NUMPAD7, - WXK_NUMPAD8, - WXK_NUMPAD9, - WXK_MULTIPLY, - WXK_ADD, - WXK_SEPARATOR, - WXK_SUBTRACT, - WXK_DECIMAL, - WXK_DIVIDE, - WXK_F1, - WXK_F2, - WXK_F3, - WXK_F4, - WXK_F5, - WXK_F6, - WXK_F7, - WXK_F8, - WXK_F9, - WXK_F10, - WXK_F11, - WXK_F12, - WXK_F13, - WXK_F14, - WXK_F15, - WXK_F16, - WXK_F17, - WXK_F18, - WXK_F19, - WXK_F20, - WXK_F21, - WXK_F22, - WXK_F23, - WXK_F24, - WXK_NUMLOCK, - WXK_SCROLL, - WXK_PAGEUP, - WXK_PAGEDOWN -}; - -// Colours - see wx_gdi.cc for database - -// OS mnemonics -- Identify the running OS (useful for Windows) -// [Not all platforms are currently available or supported] -enum { - wxUNKNOWN_PLATFORM, - wxCURSES, // Text-only CURSES - wxXVIEW_X, // Sun's XView OpenLOOK toolkit - wxMOTIF_X, // OSF Motif 1.x.x - wxCOSE_X, // OSF Common Desktop Environment - wxNEXTSTEP, // NeXTStep - wxMACINTOSH, // Apple System 7 - wxGTK, // GTK - wxQT, // Qt - wxGEOS, // GEOS - wxOS2_PM, // OS/2 Workplace - wxWINDOWS, // Windows or WfW - wxPENWINDOWS, // Windows for Pen Computing - wxWINDOWS_NT, // Windows NT - wxWIN32S, // Windows 32S API - wxWIN95, // Windows 95 - wxWIN386 // Watcom 32-bit supervisor modus -}; - -// Printing -#ifndef wxPORTRAIT -#define wxPORTRAIT 1 -#define wxLANDSCAPE 2 -#endif - -// Standard menu identifiers -#define wxID_OPEN 5000 -#define wxID_CLOSE 5001 -#define wxID_NEW 5002 -#define wxID_SAVE 5003 -#define wxID_SAVEAS 5004 -#define wxID_REVERT 5005 -#define wxID_EXIT 5006 -#define wxID_UNDO 5007 -#define wxID_REDO 5008 -#define wxID_HELP 5009 -#define wxID_PRINT 5010 -#define wxID_PRINT_SETUP 5011 -#define wxID_PREVIEW 5012 -#define wxID_ABOUT 5013 -#define wxID_HELP_CONTENTS 5014 -#define wxID_HELP_COMMANDS 5015 -#define wxID_HELP_PROCEDURES 5016 -#define wxID_HELP_CONTEXT 5017 - -#define wxID_CUT 5030 -#define wxID_COPY 5031 -#define wxID_PASTE 5032 -#define wxID_CLEAR 5033 -#define wxID_FIND 5034 - -#define wxID_FILE1 5050 -#define wxID_FILE2 5051 -#define wxID_FILE3 5052 -#define wxID_FILE4 5053 -#define wxID_FILE5 5054 -#define wxID_FILE6 5055 -#define wxID_FILE7 5056 -#define wxID_FILE8 5057 -#define wxID_FILE9 5058 - -#define wxID_OK 5100 -#define wxID_CANCEL 5101 -#define wxID_APPLY 5102 -#define wxID_YES 5103 -#define wxID_NO 5104 -#define wxID_STATIC 5105 - -#ifdef __WXMSW__ -// Stand-ins for Windows types, to avoid -// #including all of windows.h - -typedef unsigned long WXHWND; -typedef unsigned long WXHANDLE; -typedef unsigned long WXHICON; -typedef unsigned long WXHFONT; -typedef unsigned long WXHMENU; -typedef unsigned long WXHPEN; -typedef unsigned long WXHBRUSH; -typedef unsigned long WXHPALETTE; -typedef unsigned long WXHCURSOR; -typedef unsigned long WXHRGN; -typedef unsigned long WXHACCEL; -typedef unsigned long WXHINSTANCE; -typedef unsigned long WXHBITMAP; -typedef unsigned long WXHIMAGELIST; -typedef unsigned long WXHGLOBAL; -typedef unsigned long WXHDC; -typedef unsigned int WXUINT; -typedef unsigned long WXDWORD; -typedef unsigned short WXWORD; -typedef unsigned int WXWPARAM; -typedef long WXLPARAM; -typedef unsigned long WXCOLORREF; -typedef void * WXRGNDATA; -typedef void * WXMSG; -typedef unsigned long WXHCONV; -typedef unsigned long WXHKEY; -typedef void * WXDRAWITEMSTRUCT; -typedef void * WXMEASUREITEMSTRUCT; -typedef void * WXLPCREATESTRUCT; -#ifdef __GNUWIN32__ -typedef int (*WXFARPROC)(); -#else -typedef int (__stdcall *WXFARPROC)(); -#endif - -#endif - -#endif - // _WX_DEFS_H_ diff --git a/include/wx/dialog.h b/include/wx/dialog.h deleted file mode 100644 index 823d2d4573..0000000000 --- a/include/wx/dialog.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_DIALOG_H_BASE_ -#define _WX_DIALOG_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/dialog.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/dialog.h" -#elif defined(__WXGTK__) -#include "wx/gtk/dialog.h" -#elif defined(__WXQT__) -#include "wx/qt/dialog.h" -#elif defined(__WXMAC__) -#include "wx/mac/dialog.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/dialog.h" -#endif - -#endif - // _WX_DIALOG_H_BASE_ diff --git a/include/wx/dirdlg.h b/include/wx/dirdlg.h deleted file mode 100644 index d22d17f544..0000000000 --- a/include/wx/dirdlg.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_DIRDLG_H_BASE_ -#define _WX_DIRDLG_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/dirdlg.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/dirdlg.h" -#elif defined(__WXGTK__) -#include "wx/gtk/dirdlg.h" -#elif defined(__WXQT__) -#include "wx/qt/dirdlg.h" -#elif defined(__WXMAC__) -#include "wx/mac/dirdlg.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/dirdlg.h" -#endif - -#endif - // _WX_DIRDLG_H_BASE_ diff --git a/include/wx/dnd.h b/include/wx/dnd.h deleted file mode 100644 index 84a61155ec..0000000000 --- a/include/wx/dnd.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _WX_DND_H_BASE_ -#define _WX_DND_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/ole/dropsrc.h" -#include "wx/msw/ole/droptgt.h" -#include "wx/msw/ole/dataobj.h" -#elif defined(__WXMOTIF__) -#elif defined(__WXGTK__) -#include "wx/gtk/dnd.h" -#elif defined(__WXQT__) -#include "wx/qt/dnd.h" -#elif defined(__WXMAC__) -#include "wx/mac/dnd.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/dnd.h" -#endif - -#endif - // _WX_DND_H_BASE_ diff --git a/include/wx/docmdi.h b/include/wx/docmdi.h deleted file mode 100644 index 195b6126f7..0000000000 --- a/include/wx/docmdi.h +++ /dev/null @@ -1,83 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: docmdi.h -// Purpose: Frame classes for MDI document/view applications -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DOCMDI_H_ -#define _WX_DOCMDI_H_ - -#ifdef __GNUG__ -#pragma interface "docmdi.h" -#endif - -#include "wx/docview.h" -#include "wx/mdi.h" - -/* - * Use this instead of wxMDIParentFrame - */ - -class wxDocMDIParentFrame: public wxMDIParentFrame -{ - DECLARE_CLASS(wxDocMDIParentFrame) - public: - wxDocMDIParentFrame(wxDocManager *manager, wxFrame *parent, wxWindowID id, - const wxString& title, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"); - - bool OnClose(void); - // Extend event processing to search the document manager's event table - virtual bool ProcessEvent(wxEvent& event); - - wxDocManager *GetDocumentManager(void) const { return m_docManager; } - - void OnExit(wxCommandEvent& event); - void OnMRUFile(wxCommandEvent& event); - - protected: - wxDocManager *m_docManager; - - -DECLARE_EVENT_TABLE() -}; - -/* - * Use this instead of wxMDIChildFrame - */ - -class WXDLLEXPORT wxDocMDIChildFrame: public wxMDIChildFrame -{ - DECLARE_CLASS(wxDocMDIChildFrame) - - public: - wxDocMDIChildFrame(wxDocument *doc, wxView *view, wxMDIParentFrame *frame, wxWindowID id, - const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long type = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"); - ~wxDocMDIChildFrame(void); - - bool OnClose(void); - // Extend event processing to search the view's event table - virtual bool ProcessEvent(wxEvent& event); - - void OnActivate(wxActivateEvent& event); - - inline wxDocument *GetDocument(void) const { return m_childDocument; } - inline wxView *GetView(void) const { return m_childView; } - inline void SetDocument(wxDocument *doc) { m_childDocument = doc; } - inline void SetView(wxView *view) { m_childView = view; } - protected: - wxDocument* m_childDocument; - wxView* m_childView; - -DECLARE_EVENT_TABLE() - -}; - -#endif - // _WX_DOCMDI_H_ diff --git a/include/wx/docview.h b/include/wx/docview.h deleted file mode 100644 index 008929ec76..0000000000 --- a/include/wx/docview.h +++ /dev/null @@ -1,519 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: docview.h -// Purpose: Doc/View classes -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DOCH__ -#define _WX_DOCH__ - -#ifdef __GNUG__ -#pragma interface "docview.h" -#endif - -#include "wx/defs.h" -#include "wx/list.h" -#include "wx/cmndata.h" -#include "wx/string.h" - -#if USE_PRINTING_ARCHITECTURE -#include "wx/print.h" -#endif - -class WXDLLEXPORT wxWindow; -class WXDLLEXPORT wxDocument; -class WXDLLEXPORT wxView; -class WXDLLEXPORT wxDocTemplate; -class WXDLLEXPORT wxDocManager; -class WXDLLEXPORT wxPrintInfo; -class WXDLLEXPORT wxCommand; -class WXDLLEXPORT wxCommandProcessor; -class WXDLLEXPORT wxFileHistory; - -class WXDLLIMPORT ostream; -class WXDLLIMPORT istream; - -// Document manager flags -#define wxDOC_SDI 1 -#define wxDOC_MDI 2 -#define wxDOC_NEW 4 -#define wxDOC_SILENT 8 -#define wxDEFAULT_DOCMAN_FLAGS wxDOC_SDI - -// Document template flags -#define wxTEMPLATE_VISIBLE 1 -#define wxTEMPLATE_INVISIBLE 2 -#define wxDEFAULT_TEMPLATE_FLAGS wxTEMPLATE_VISIBLE - -#define wxMAX_FILE_HISTORY 9 - -class WXDLLEXPORT wxDocument : public wxEvtHandler -{ - DECLARE_ABSTRACT_CLASS(wxDocument) - public: - wxDocument(wxDocument *parent = (wxDocument *) NULL); - ~wxDocument(void); - - void SetFilename(const wxString& filename, bool notifyViews = FALSE); - inline wxString GetFilename(void) const { return m_documentFile; } - inline void SetTitle(const wxString& title) { m_documentTitle = title; }; - inline wxString GetTitle(void) const { return m_documentTitle; } - inline void SetDocumentName(const wxString& name) { m_documentTypeName = name; }; - inline wxString GetDocumentName(void) const { return m_documentTypeName; } - // Has the document been saved yet? - inline bool GetDocumentSaved(void) { return m_savedYet; } - inline void SetDocumentSaved(bool saved = TRUE) { m_savedYet = saved; } - - virtual bool Close(void); - virtual bool Save(void); - virtual bool SaveAs(void); - virtual bool Revert(void); - - virtual ostream& SaveObject(ostream& stream); - virtual istream& LoadObject(istream& stream); - - // Called by wxWindows - virtual bool OnSaveDocument(const wxString& filename); - virtual bool OnOpenDocument(const wxString& filename); - virtual bool OnNewDocument(void); - virtual bool OnCloseDocument(void); - - // Prompts for saving if about to close a modified document. - // Returns TRUE if ok to close the document (may have saved in the - // meantime, or set modified to FALSE) - virtual bool OnSaveModified(void); - - // Called by framework if created automatically by the - // default document manager: gives document a chance to - // initialise and (usually) create a view - virtual bool OnCreate(const wxString& path, long flags); - - // By default, creates a base wxCommandProcessor. - virtual wxCommandProcessor *OnCreateCommandProcessor(void); - virtual inline wxCommandProcessor *GetCommandProcessor(void) const { return m_commandProcessor; } - virtual inline void SetCommandProcessor(wxCommandProcessor *proc) { m_commandProcessor = proc; } - - // Called after a view is added or removed. - // The default implementation deletes the document if this - // is there are no more views. - virtual void OnChangedViewList(void); - - virtual bool DeleteContents(void); - - virtual bool Draw(wxDC&); - virtual inline bool IsModified(void) const { return m_documentModified; } - virtual inline void Modify(bool mod) { m_documentModified = mod; } - - virtual bool AddView(wxView *view); - virtual bool RemoveView(wxView *view); - inline wxList& GetViews(void) const { return (wxList&) m_documentViews; } - wxView *GetFirstView(void) const; - - virtual void UpdateAllViews(wxView *sender = (wxView *) NULL, wxObject *hint = (wxObject *) NULL); - - // Remove all views (because we're closing the document) - virtual bool DeleteAllViews(void); - - // Other stuff - virtual wxDocManager *GetDocumentManager(void) const; - virtual inline wxDocTemplate *GetDocumentTemplate(void) const { return m_documentTemplate; } - virtual inline void SetDocumentTemplate(wxDocTemplate *temp) { m_documentTemplate = temp; } - - // Get title, or filename if no title, else [unnamed] - virtual bool GetPrintableName(wxString& buf) const; - - // Returns a window that can be used as a parent for document-related - // dialogs. Override if necessary. - virtual wxWindow *GetDocumentWindow(void) const; - protected: - wxList m_documentViews; - wxString m_documentFile; - wxString m_documentTitle; - wxString m_documentTypeName; - wxDocTemplate* m_documentTemplate; - bool m_documentModified; - wxDocument* m_documentParent; - wxCommandProcessor* m_commandProcessor; - bool m_savedYet; -}; - -class WXDLLEXPORT wxView: public wxEvtHandler -{ - DECLARE_ABSTRACT_CLASS(wxView) - public: - wxView(wxDocument *doc = (wxDocument *) NULL); - ~wxView(void); - - inline wxDocument *GetDocument(void) const { return m_viewDocument; } - void SetDocument(wxDocument *doc); - - inline wxString GetViewName(void) const { return m_viewTypeName; } - void SetViewName(const wxString& name) { m_viewTypeName = name; }; - - inline wxFrame *GetFrame(void) const { return m_viewFrame ; } - inline void SetFrame(wxFrame *frame) { m_viewFrame = frame; } - - virtual void OnActivateView(bool activate, wxView *activeView, wxView *deactiveView); - virtual void OnDraw(wxDC *dc) = 0; - virtual void OnPrint(wxDC *dc, wxObject *info); - virtual void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL); - virtual void OnChangeFilename(void); - - // Called by framework if created automatically by the - // default document manager class: gives view a chance to - // initialise - virtual bool OnCreate(wxDocument *WXUNUSED(doc), long WXUNUSED(flags)) { return TRUE; }; - - // Checks if the view is the last one for the document; if so, - // asks user to confirm save data (if modified). If ok, - // deletes itself and returns TRUE. - virtual bool Close(bool deleteWindow = TRUE); - - // Override to do cleanup/veto close - virtual bool OnClose(bool deleteWindow); - // Defeat compiler warning - inline bool OnClose(void) { return wxEvtHandler::OnClose(); } - - // Extend event processing to search the document's event table - virtual bool ProcessEvent(wxEvent& event); - - // A view's window can call this to notify the view it is (in)active. - // The function then notifies the document manager. - virtual void Activate(bool activate); - - inline wxDocManager *GetDocumentManager(void) const { return m_viewDocument->GetDocumentManager(); } - -#if USE_PRINTING_ARCHITECTURE - virtual wxPrintout *OnCreatePrintout(void); -#endif - - protected: - wxDocument* m_viewDocument; - wxString m_viewTypeName; - wxFrame* m_viewFrame; -}; - -// Represents user interface (and other) properties of documents and views -class WXDLLEXPORT wxDocTemplate: public wxObject -{ - DECLARE_CLASS(wxDocTemplate) - - friend class WXDLLEXPORT wxDocManager; - - public: - - // Associate document and view types. - // They're for identifying what view is associated with what - // template/document type - wxDocTemplate(wxDocManager *manager, const wxString& descr, const wxString& filter, const wxString& dir, - const wxString& ext, const wxString& docTypeName, const wxString& viewTypeName, - wxClassInfo *docClassInfo = (wxClassInfo *) NULL, wxClassInfo *viewClassInfo = (wxClassInfo *)NULL, - long flags = wxDEFAULT_TEMPLATE_FLAGS); - - ~wxDocTemplate(void); - - // By default, these two member functions dynamically creates document - // and view using dynamic instance construction. - // Override these if you need a different method of construction. - virtual wxDocument *CreateDocument(const wxString& path, long flags = 0); - virtual wxView *CreateView(wxDocument *doc, long flags = 0); - - inline wxString GetDefaultExtension(void) const { return m_defaultExt; }; - inline wxString GetDescription(void) const { return m_description; } - inline wxString GetDirectory(void) const { return m_directory; }; - inline wxDocManager *GetDocumentManager(void) const { return m_documentManager; } - inline void SetDocumentManager(wxDocManager *manager) { m_documentManager = manager; } - inline wxString GetFileFilter(void) const { return m_fileFilter; }; - inline long GetFlags(void) const { return m_flags; }; - virtual wxString GetViewName(void) const { return m_viewTypeName; } - virtual wxString GetDocumentName(void) const { return m_docTypeName; } - - inline void SetFileFilter(const wxString& filter) { m_fileFilter = filter; }; - inline void SetDirectory(const wxString& dir) { m_directory = dir; }; - inline void SetDescription(const wxString& descr) { m_description = descr; }; - inline void SetDefaultExtension(const wxString& ext) { m_defaultExt = ext; }; - inline void SetFlags(long flags) { m_flags = flags; }; - - inline bool IsVisible(void) const { return ((m_flags & wxTEMPLATE_VISIBLE) == wxTEMPLATE_VISIBLE); } - - protected: - long m_flags; - wxString m_fileFilter; - wxString m_directory; - wxString m_description; - wxString m_defaultExt; - wxString m_docTypeName; - wxString m_viewTypeName; - wxDocManager* m_documentManager; - - // For dynamic creation of appropriate instances. - wxClassInfo* m_docClassInfo; - wxClassInfo* m_viewClassInfo; - -}; - -// One object of this class may be created in an application, -// to manage all the templates and documents. -class WXDLLEXPORT wxDocManager: public wxEvtHandler -{ - DECLARE_DYNAMIC_CLASS(wxDocManager) - public: - wxDocManager(long flags = wxDEFAULT_DOCMAN_FLAGS, bool initialize = TRUE); - ~wxDocManager(void); - - virtual bool Initialize(void); - - // Handlers for common user commands -// virtual void OldOnMenuCommand(int command); - - void OnFileClose(wxCommandEvent& event); - void OnFileNew(wxCommandEvent& event); - void OnFileOpen(wxCommandEvent& event); - void OnFileRevert(wxCommandEvent& event); - void OnFileSave(wxCommandEvent& event); - void OnFileSaveAs(wxCommandEvent& event); - void OnPrint(wxCommandEvent& event); - void OnPrintSetup(wxCommandEvent& event); - void OnPreview(wxCommandEvent& event); - void OnUndo(wxCommandEvent& event); - void OnRedo(wxCommandEvent& event); - - // Extend event processing to search the view's event table - virtual bool ProcessEvent(wxEvent& event); - - virtual wxDocument *CreateDocument(const wxString& path, long flags = 0); - virtual wxView *CreateView(wxDocument *doc, long flags = 0); - virtual void DeleteTemplate(wxDocTemplate *temp, long flags = 0); - virtual bool FlushDoc(wxDocument *doc); - virtual wxDocTemplate *MatchTemplate(const wxString& path); - virtual wxDocTemplate *SelectDocumentPath(wxDocTemplate **templates, - int noTemplates, wxString& path, long flags, bool save = FALSE); - virtual wxDocTemplate *SelectDocumentType(wxDocTemplate **templates, - int noTemplates); - virtual wxDocTemplate *SelectViewType(wxDocTemplate **templates, - int noTemplates); - virtual wxDocTemplate *FindTemplateForPath(const wxString& path); - - void AssociateTemplate(wxDocTemplate *temp); - void DisassociateTemplate(wxDocTemplate *temp); - - wxDocument *GetCurrentDocument(void) const; - - inline void SetMaxDocsOpen(int n) { m_maxDocsOpen = n; } - inline int GetMaxDocsOpen(void) const { return m_maxDocsOpen; } - - // Add and remove a document from the manager's list - void AddDocument(wxDocument *doc); - void RemoveDocument(wxDocument *doc); - - // Clear remaining documents and templates - bool Clear(bool force = TRUE); - - // Views or windows should inform the document manager - // when a view is going in or out of focus - virtual void ActivateView(wxView *view, bool activate = TRUE, bool deleting = FALSE); - virtual wxView *GetCurrentView(void) const; - - virtual inline wxList& GetDocuments(void) const { return (wxList&) m_docs; } - - // Make a default document name - virtual bool MakeDefaultName(wxString& buf); - - virtual wxFileHistory *OnCreateFileHistory(void); - virtual inline wxFileHistory *GetFileHistory(void) const { return m_fileHistory; } - - // File history management - virtual void AddFileToHistory(const wxString& file); - virtual int GetNoHistoryFiles(void) const; - virtual wxString GetHistoryFile(int i) const; - virtual void FileHistoryUseMenu(wxMenu *menu); - virtual void FileHistoryLoad(const wxString& resourceFile, const wxString& section); - virtual void FileHistorySave(const wxString& resourceFile, const wxString& section); - protected: - long m_flags; - int m_defaultDocumentNameCounter; - int m_maxDocsOpen; - wxList m_docs; - wxList m_templates; - wxView* m_currentView; - wxFileHistory* m_fileHistory; - -DECLARE_EVENT_TABLE() -}; - -/* - * A default child frame - */ - -class WXDLLEXPORT wxDocChildFrame: public wxFrame -{ - DECLARE_CLASS(wxDocChildFrame) - - public: - wxDocChildFrame(wxDocument *doc, wxView *view, wxFrame *frame, wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long type = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"); - ~wxDocChildFrame(void); - - bool OnClose(void); - // Extend event processing to search the view's event table - virtual bool ProcessEvent(wxEvent& event); - -// void OldOnMenuCommand(int id); - void OnActivate(wxActivateEvent& event); - - inline wxDocument *GetDocument(void) const { return m_childDocument; } - inline wxView *GetView(void) const { return m_childView; } - inline void SetDocument(wxDocument *doc) { m_childDocument = doc; } - inline void SetView(wxView *view) { m_childView = view; } - protected: - wxDocument* m_childDocument; - wxView* m_childView; - -DECLARE_EVENT_TABLE() - -}; - -/* - * A default parent frame - */ - -class WXDLLEXPORT wxDocParentFrame: public wxFrame -{ - DECLARE_CLASS(wxDocParentFrame) - public: - wxDocParentFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long type = wxDEFAULT_FRAME, const wxString& name = "frame"); - - bool OnClose(void); - // Extend event processing to search the document manager's event table - virtual bool ProcessEvent(wxEvent& event); - -// void OldOnMenuCommand(int id); - wxDocManager *GetDocumentManager(void) const { return m_docManager; } - - void OnExit(wxCommandEvent& event); - void OnMRUFile(wxCommandEvent& event); - - protected: - wxDocManager *m_docManager; - -DECLARE_EVENT_TABLE() -}; - -/* - * Provide simple default printing facilities - */ - -#if USE_PRINTING_ARCHITECTURE -class WXDLLEXPORT wxDocPrintout: public wxPrintout -{ - DECLARE_DYNAMIC_CLASS(wxDocPrintout) - public: - wxDocPrintout(wxView *view = (wxView *) NULL, const wxString& title = "Printout"); - bool OnPrintPage(int page); - bool HasPage(int page); - bool OnBeginDocument(int startPage, int endPage); - void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo); - - virtual inline wxView *GetView(void) { return m_printoutView; } - protected: - wxView* m_printoutView; -}; -#endif - -/* - * Command processing framework - */ - -class WXDLLEXPORT wxCommand: public wxObject -{ - DECLARE_CLASS(wxCommand) - public: - wxCommand(bool canUndoIt = FALSE, const wxString& name = ""); - ~wxCommand(void); - - // Override this to perform a command - virtual bool Do(void) = 0; - - // Override this to undo a command - virtual bool Undo(void) = 0; - - virtual inline bool CanUndo(void) const { return m_canUndo; } - virtual inline wxString GetName(void) const { return m_commandName; } - protected: - bool m_canUndo; - wxString m_commandName; -}; - -class WXDLLEXPORT wxCommandProcessor: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxCommandProcessor) - public: - wxCommandProcessor(int maxCommands = 100); - ~wxCommandProcessor(void); - - // Pass a command to the processor. The processor calls Do(); - // if successful, is appended to the command history unless - // storeIt is FALSE. - virtual bool Submit(wxCommand *command, bool storeIt = TRUE); - virtual bool Undo(void); - virtual bool Redo(void); - virtual bool CanUndo(void); - - // Call this to manage an edit menu. - inline void SetEditMenu(wxMenu *menu) { m_commandEditMenu = menu; } - inline wxMenu *GetEditMenu(void) const { return m_commandEditMenu; } - virtual void SetMenuStrings(void); - virtual void Initialize(void); - - inline wxList& GetCommands(void) const { return (wxList&) m_commands; } - inline int GetMaxCommands(void) const { return m_maxNoCommands; } - virtual void ClearCommands(void); - - protected: - int m_maxNoCommands; - wxList m_commands; - wxNode* m_currentCommand; - wxMenu* m_commandEditMenu; -}; - -class WXDLLEXPORT wxFileHistory: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxFileHistory) - public: - wxFileHistory(int maxFiles = 9); - ~wxFileHistory(void); - - // File history management - virtual void AddFileToHistory(const wxString& file); - inline virtual int GetNoHistoryFiles(void) const { return m_fileHistoryN; } - virtual wxString GetHistoryFile(int i) const; - virtual int GetMaxFiles(void) const { return m_fileMaxFiles; } - virtual void FileHistoryUseMenu(wxMenu *menu); - virtual void FileHistoryLoad(const wxString& resourceFile, const wxString& section); - virtual void FileHistorySave(const wxString& resourceFile, const wxString& section); - protected: - // Last n files - char** m_fileHistory; - // Number of files saved - int m_fileHistoryN; - // Menu to maintain - wxMenu* m_fileMenu; - // Max files to maintain - int m_fileMaxFiles; -}; - -// For compatibility with existing file formats: -// converts from/to a stream to/from a temporary file. -bool WXDLLEXPORT wxTransferFileToStream(const wxString& filename, ostream& stream); -bool WXDLLEXPORT wxTransferStreamToFile(istream& stream, const wxString& filename); - - -#endif diff --git a/include/wx/dynarray.h b/include/wx/dynarray.h deleted file mode 100644 index 1afdd85316..0000000000 --- a/include/wx/dynarray.h +++ /dev/null @@ -1,407 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: dynarray.h -// Purpose: auto-resizable (i.e. dynamic) array support -// Author: Vadim Zeitlin -// Modified by: -// Created: 12.09.97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _DYNARRAY_H -#define _DYNARRAY_H - -#ifdef __GNUG__ -#pragma interface "dynarray.h" -#endif - -#include "wx/defs.h" -#include "wx/debug.h" - -/** @name Dynamic arrays and lists - @memo Arrays which grow on demand and do range checking (only in debug) - */ -//@{ - -// ---------------------------------------------------------------------------- -// constants -// ---------------------------------------------------------------------------- - -/** - the initial size by which an array/list grows when an element is added - default value avoids allocate one or two bytes when the array is created - which is rather inefficient -*/ -#define WX_ARRAY_DEFAULT_INITIAL_SIZE (16) - -// ---------------------------------------------------------------------------- -// types -// ---------------------------------------------------------------------------- - -/** - callback compare function for quick sort - must return negative value, 0 or positive value if pItem1 <, = or > pItem2 - */ - -#ifdef __VISUALC__ - #define CMPFUNC_CONV _cdecl -#else // !Visual C++ - #define CMPFUNC_CONV -#endif // compiler -typedef int (CMPFUNC_CONV *CMPFUNC)(const void* pItem1, const void* pItem2); - -// ---------------------------------------------------------------------------- -/** - base class managing data having size of type 'long' (not used directly) - - NB: for efficiency this often used class has no virtual functions (hence no - VTBL), even dtor is not virtual. If used as expected it won't - create any problems because ARRAYs from DEFINE_ARRAY have no dtor at all, - so it's not too important if it's not called (this happens when you cast - "SomeArray *" as "BaseArray *" and then delete it) - - @memo Base class for template array and list classes -*/ -// ---------------------------------------------------------------------------- -class wxBaseArray -{ -public: - /** @name ctors and dtor */ - //@{ - /// default ctor - wxBaseArray(); - /// copy ctor - wxBaseArray(const wxBaseArray& array); - /// assignment operator - wxBaseArray& operator=(const wxBaseArray& src); - /// not virtual, see above - /// EXCEPT for Gnu compiler to reduce warnings... -#ifdef __GNUG__ - virtual -#endif - ~wxBaseArray(); - //@} - - /** @name memory management */ - //@{ - /// empties the list, but doesn't release memory - void Empty() { m_uiCount = 0; } - /// empties the list and releases memory - void Clear(); - /// preallocates memory for given number of items - void Alloc(size_t uiSize); - //@} - - /** @name simple accessors */ - //@{ - /// number of elements in the array - size_t Count() const { return m_uiCount; } - /// is it empty? - bool IsEmpty() const { return m_uiCount == 0; } - //@} - -protected: - // these methods are protected because if they were public one could - // mistakenly call one of them instead of DEFINE_ARRAY's or LIST's - // type safe methods - - /** @name items access */ - //@{ - /// get item at position uiIndex (range checking is done in debug version) - long& Item(size_t uiIndex) const - { wxASSERT( uiIndex < m_uiCount ); return m_pItems[uiIndex]; } - /// same as Item() - long& operator[](size_t uiIndex) const { return Item(uiIndex); } - //@} - - /** @name item management */ - //@{ - /** - Search the element in the array, starting from the either side - @param bFromEnd if TRUE, start from the end - @return index of the first item matched or NOT_FOUND - @see NOT_FOUND - */ - int Index(long lItem, bool bFromEnd = FALSE) const; - /// search for an item using binary search in a sorted array - int Index(long lItem, CMPFUNC fnCompare) const; - /// add new element at the end - void Add(long lItem); - /// add item assuming the array is sorted with fnCompare function - void Add(long lItem, CMPFUNC fnCompare); - /// add new element at given position (it becomes Item[uiIndex]) - void Insert(long lItem, size_t uiIndex); - /// remove first item matching this value - void Remove(long lItem); - /// remove item by index - void Remove(size_t uiIndex); - //@} - - /// sort array elements using given compare function - void Sort(CMPFUNC fnCompare); - -private: - void Grow(); // makes array bigger if needed - - size_t m_uiSize, // current size of the array - m_uiCount; // current number of elements - - long *m_pItems; // pointer to data -}; - -// ============================================================================ -// template classes -// ============================================================================ - -// ---------------------------------------------------------------------------- -// This macro generates a new array class. It is intended for storage of simple -// types of sizeof()<=sizeof(long) or pointers if sizeof(pointer)<=sizeof(long) -// -// NB: it has only inline functions => takes no space at all -// ---------------------------------------------------------------------------- -#define _WX_DEFINE_ARRAY(T, name) \ -typedef int (CMPFUNC_CONV *CMPFUNC##T)(T *pItem1, T *pItem2); \ -class name : public wxBaseArray \ -{ \ -public: \ - name() \ - { wxASSERT( sizeof(T) <= sizeof(long) ); } \ - \ - name& operator=(const name& src) \ - { ((wxBaseArray *)this)->operator=((const wxBaseArray&)src); \ - return *this; } \ - \ - T& operator[](size_t uiIndex) const \ - { return (T&)(wxBaseArray::Item(uiIndex)); } \ - T& Item(size_t uiIndex) const \ - { return (T&)(wxBaseArray::Item(uiIndex)); } \ - T& Last() const \ - { return (T&)(wxBaseArray::Item(Count() - 1)); } \ - \ - int Index(T Item, bool bFromEnd = FALSE) const \ - { return wxBaseArray::Index((long)Item, bFromEnd); } \ - \ - void Add(T Item) \ - { wxBaseArray::Add((long)Item); } \ - void Insert(T Item, size_t uiIndex) \ - { wxBaseArray::Insert((long)Item, uiIndex) ; } \ - \ - void Remove(size_t uiIndex) { wxBaseArray::Remove(uiIndex); } \ - void Remove(T Item) \ - { int iIndex = Index(Item); \ - wxCHECK2_MSG( iIndex != NOT_FOUND, return, \ - "removing inexisting element in wxArray::Remove" ); \ - wxBaseArray::Remove((size_t)iIndex); } \ - \ - void Sort(CMPFUNC##T fCmp) { wxBaseArray::Sort((CMPFUNC)fCmp); } \ -} - -// ---------------------------------------------------------------------------- -// This is the same as the previous macro, but it defines a sorted array. -// Differences: -// 1) it must be given a COMPARE function in ctor which takes 2 items of type -// T* and should return -1, 0 or +1 if the first one is less/greater -// than/equal to the second one. -// 2) the Add() method inserts the item in such was that the array is always -// sorted (it uses the COMPARE function) -// 3) it has no Sort() method because it's always sorted -// 4) Index() method is much faster (the sorted arrays use binary search -// instead of linear one), but Add() is slower. -// -// Summary: use this class when the speed of Index() function is important, use -// the normal arrays otherwise. -// -// NB: it has only inline functions => takes no space at all -// ---------------------------------------------------------------------------- -#define _WX_DEFINE_SORTED_ARRAY(T, name) \ -typedef int (CMPFUNC_CONV *SCMPFUNC##T)(T pItem1, T pItem2); \ -class name : public wxBaseArray \ -{ \ -public: \ - name(SCMPFUNC##T fn) \ - { wxASSERT( sizeof(T) <= sizeof(long) ); m_fnCompare = fn; } \ - \ - name& operator=(const name& src) \ - { ((wxBaseArray *)this)->operator=((const wxBaseArray&)src); \ - m_fnCompare = src.m_fnCompare; \ - return *this; } \ - \ - T& operator[](size_t uiIndex) const \ - { return (T&)(wxBaseArray::Item(uiIndex)); } \ - T& Item(size_t uiIndex) const \ - { return (T&)(wxBaseArray::Item(uiIndex)); } \ - T& Last() const \ - { return (T&)(wxBaseArray::Item(Count() - 1)); } \ - \ - int Index(T Item) const \ - { return wxBaseArray::Index((long)Item, (CMPFUNC)m_fnCompare); }\ - \ - void Add(T Item) \ - { wxBaseArray::Add((long)Item, (CMPFUNC)m_fnCompare); } \ - \ - void Remove(size_t uiIndex) { wxBaseArray::Remove(uiIndex); } \ - void Remove(T Item) \ - { int iIndex = Index(Item); \ - wxCHECK2_MSG( iIndex != NOT_FOUND, return, \ - "removing inexisting element in wxArray::Remove" ); \ - wxBaseArray::Remove((size_t)iIndex); } \ - \ -private: \ - SCMPFUNC##T m_fnCompare; \ -} - -// ---------------------------------------------------------------------------- -// see WX_DECLARE_LIST and WX_DEFINE_LIST -// ---------------------------------------------------------------------------- -#define _WX_DECLARE_LIST(T, name) \ -typedef int (CMPFUNC_CONV *CMPFUNC##T)(T** pItem1, T** pItem2); \ -class name : public wxBaseArray \ -{ \ -public: \ - name() { } \ - name(const name& src); \ - name& operator=(const name& src); \ - \ - ~name(); \ - \ - T& operator[](size_t uiIndex) const \ - { return *(T*)wxBaseArray::Item(uiIndex); } \ - T& Item(size_t uiIndex) const \ - { return *(T*)wxBaseArray::Item(uiIndex); } \ - T& Last() const \ - { return *(T*)(wxBaseArray::Item(Count() - 1)); } \ - \ - int Index(const T& Item, bool bFromEnd = FALSE) const; \ - \ - void Add(const T& Item); \ - void Add(const T* pItem) \ - { wxBaseArray::Add((long)pItem); } \ - \ - void Insert(const T& Item, size_t uiIndex); \ - void Insert(const T* pItem, size_t uiIndex) \ - { wxBaseArray::Insert((long)pItem, uiIndex); } \ - \ - void Empty(); \ - \ - T* Detach(size_t uiIndex) \ - { T* p = (T*)wxBaseArray::Item(uiIndex); \ - wxBaseArray::Remove(uiIndex); return p; } \ - void Remove(size_t uiIndex); \ - \ - void Sort(CMPFUNC##T fCmp) { wxBaseArray::Sort((CMPFUNC)fCmp); } \ - \ -private: \ - void DoCopy(const name& src); \ -} - -// ---------------------------------------------------------------------------- -/** @name Macros for definition of dynamic arrays and lists - - These macros are ugly (especially if you look in the sources ;-), but they - allow us to define 'template' classes without actually using templates. -
-
- Range checking is performed in debug build for both arrays and lists. Type - checking is done at compile-time. Warning: arrays never shrink, they - only grow, so loading 10 millions in an array only to delete them 2 lines - below is not recommended. However, it does free memory when it's - destroyed, so if you destroy array also, it's ok. - */ -// ---------------------------------------------------------------------------- - -//@{ - /** - This macro generates a new array class. It is intended for storage of simple - types of sizeof()<=sizeof(long) or pointers if sizeof(pointer)<=sizeof(long) -
- NB: it has only inline functions => takes no space at all -
- - @memo declare and define array class 'name' containing elements of type 'T' - */ -#define WX_DEFINE_ARRAY(T, name) typedef T _A##name; \ - _WX_DEFINE_ARRAY(_A##name, name) - - /** - This macro does the same as WX_DEFINE_ARRAY except that the array will be - sorted with the specified compare function. - */ -#define WX_DEFINE_SORTED_ARRAY(T, name) typedef T _A##name; \ - _WX_DEFINE_SORTED_ARRAY(_A##name, name) - - /** - This macro generates a new list class which owns the objects it contains, - i.e. it will delete them when it is destroyed. An element is of type T*, - but arguments of type T& are taken (see below!) and T& is returned. -
- Don't use this for simple types such as "int" or "long"! - You _may_ use it for "double" but it's awfully inefficient. -
-
- Note on Add/Insert functions: -
- 1) function(T*) gives the object to the list, i.e. it will delete the - object when it's removed or in the list's dtor -
- 2) function(T&) will create a copy of the object and work with it -
-
- Also: -
- 1) Remove() will delete the object after removing it from the list -
- 2) Detach() just removes the object from the list (returning pointer to it) -
-
- NB1: Base type T should have an accessible copy ctor if Add(T&) is used, -
- NB2: Never ever cast a list to it's base type: as dtor is not virtual - it will provoke memory leaks -
-
- some functions of this class are not inline, so it takes some space to - define new class from this template. - - @memo declare list class 'name' containing elements of type 'T' - */ -#define WX_DECLARE_LIST(T, name) typedef T _L##name; \ - _WX_DECLARE_LIST(_L##name, name) - /** - To use a list class you must - -
  • #include "dynarray.h" -
  • DECLARE_LIST(element_type, list_class_name) -
  • #include "listimpl.cpp" -
  • DEFINE_LIST(list_class_name) // same as above! - -

    - This is necessary because at the moment of DEFINE_LIST class element_type - must be fully defined (i.e. forward declaration is not enough), while - DECLARE_LIST may be done anywhere. The separation of two allows to break - cicrcular dependencies with classes which have member variables of list - type. - - @memo define (must include listimpl.cpp!) list class 'name' - */ -#define WX_DEFINE_LIST(name) "don't forget to include listimpl.cpp!" -//@} - -// ---------------------------------------------------------------------------- -/** @name Some commonly used predefined arrays */ -// # overhead if not used? -// ---------------------------------------------------------------------------- - -//@{ - /** @name ArrayInt */ -WX_DEFINE_ARRAY(int, wxArrayInt); - /** @name ArrayLong */ -WX_DEFINE_ARRAY(long, wxArrayLong); - /** @name ArrayPtrVoid */ -WX_DEFINE_ARRAY(void *, wxArrayPtrVoid); -//@} - -//@} - -#endif // _DYNARRAY_H - diff --git a/include/wx/dynlib.h b/include/wx/dynlib.h deleted file mode 100644 index cebc563b7e..0000000000 --- a/include/wx/dynlib.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef _WX_DYNLIB_H__ -#define _WX_DYNLIB_H__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include -#include -#include -#include - -// --------------------------------------------------------------------------- -// wxLibrary - -class wxLibrary: public wxObject { - protected: - void *m_handle; - bool m_destroy; - public: - wxHashTable classTable; - - public: - wxLibrary(void *handle); - ~wxLibrary(void); - - // Get a symbol from the dynamic library - void *GetSymbol(const wxString& symbname); - - // Create the object whose classname is "name" - wxObject *CreateObject(const wxString& name); - - // Merge the symbols with the main symbols: WARNING! the library will not - // be unloaded. - void MergeWithSystem(); - - protected: - void PrepareClasses(wxClassInfo **first); -}; - -// --------------------------------------------------------------------------- -// wxLibraries - -class wxLibraries { - protected: - wxList m_loaded; - public: - wxLibraries(void); - ~wxLibraries(void); - - wxLibrary *LoadLibrary(const wxString& name); - wxObject *CreateObject(const wxString& name); -}; - -// --------------------------------------------------------------------------- -// Global variables - -extern wxLibraries wxTheLibraries; - -// --------------------------------------------------------------------------- -// Interesting defines - -#define WXDLL_ENTRY_FUNCTION() \ -extern "C" wxClassInfo **wxGetClassFirst(); \ -wxClassInfo **wxGetClassFirst() { \ - return &wxClassInfo::first; \ -} - -#endif diff --git a/include/wx/event.h b/include/wx/event.h deleted file mode 100644 index 1c58d1541c..0000000000 --- a/include/wx/event.h +++ /dev/null @@ -1,1272 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: event.h -// Purpose: Event classes -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_EVENTH__ -#define _WX_EVENTH__ - -#ifdef __GNUG__ -#pragma interface "event.h" -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/gdicmn.h" - -/* - * Event types - * - */ - -typedef int wxEventType; - -const wxEventType wxEVT_NULL = 0; -const wxEventType wxEVT_FIRST = 10000; - -const wxEventType wxEVT_COMMAND_BUTTON_CLICKED = wxEVT_FIRST + 1; -const wxEventType wxEVT_COMMAND_CHECKBOX_CLICKED = wxEVT_FIRST + 2; -const wxEventType wxEVT_COMMAND_CHOICE_SELECTED = wxEVT_FIRST + 3; -const wxEventType wxEVT_COMMAND_LISTBOX_SELECTED = wxEVT_FIRST + 4; -const wxEventType wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = wxEVT_FIRST + 5; -const wxEventType wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = wxEVT_FIRST + 6; -const wxEventType wxEVT_COMMAND_TEXT_UPDATED = wxEVT_FIRST + 7; -const wxEventType wxEVT_COMMAND_TEXT_ENTER = wxEVT_FIRST + 8; -const wxEventType wxEVT_COMMAND_MENU_SELECTED = wxEVT_FIRST + 9; -const wxEventType wxEVT_COMMAND_TOOL_CLICKED = wxEVT_COMMAND_MENU_SELECTED; -const wxEventType wxEVT_COMMAND_SLIDER_UPDATED = wxEVT_FIRST + 10; -const wxEventType wxEVT_COMMAND_RADIOBOX_SELECTED = wxEVT_FIRST + 11; -const wxEventType wxEVT_COMMAND_RADIOBUTTON_SELECTED = wxEVT_FIRST + 12; -//const wxEventType wxEVT_COMMAND_SCROLLBAR_UPDATED is now obsolete since we use wxEVT_SCROLL... events -const wxEventType wxEVT_COMMAND_SCROLLBAR_UPDATED = wxEVT_FIRST + 13; -const wxEventType wxEVT_COMMAND_VLBOX_SELECTED = wxEVT_FIRST + 14; -const wxEventType wxEVT_COMMAND_COMBOBOX_SELECTED = wxEVT_FIRST + 15; -const wxEventType wxEVT_COMMAND_TOOL_RCLICKED = wxEVT_FIRST + 16; -const wxEventType wxEVT_COMMAND_TOOL_ENTER = wxEVT_FIRST + 17; - -/* Mouse event types */ -const wxEventType wxEVT_LEFT_DOWN = wxEVT_FIRST + 100; -const wxEventType wxEVT_LEFT_UP = wxEVT_FIRST + 101; -const wxEventType wxEVT_MIDDLE_DOWN = wxEVT_FIRST + 102; -const wxEventType wxEVT_MIDDLE_UP = wxEVT_FIRST + 103; -const wxEventType wxEVT_RIGHT_DOWN = wxEVT_FIRST + 104; -const wxEventType wxEVT_RIGHT_UP = wxEVT_FIRST + 105; -const wxEventType wxEVT_MOTION = wxEVT_FIRST + 106; -const wxEventType wxEVT_ENTER_WINDOW = wxEVT_FIRST + 107; -const wxEventType wxEVT_LEAVE_WINDOW = wxEVT_FIRST + 108; -const wxEventType wxEVT_LEFT_DCLICK = wxEVT_FIRST + 109; -const wxEventType wxEVT_MIDDLE_DCLICK = wxEVT_FIRST + 110; -const wxEventType wxEVT_RIGHT_DCLICK = wxEVT_FIRST + 111; -const wxEventType wxEVT_SET_FOCUS = wxEVT_FIRST + 112; -const wxEventType wxEVT_KILL_FOCUS = wxEVT_FIRST + 113; - - // Non-client mouse events -const wxEventType wxEVT_NC_LEFT_DOWN = wxEVT_FIRST + 200; -const wxEventType wxEVT_NC_LEFT_UP = wxEVT_FIRST + 201; -const wxEventType wxEVT_NC_MIDDLE_DOWN = wxEVT_FIRST + 202; -const wxEventType wxEVT_NC_MIDDLE_UP = wxEVT_FIRST + 203; -const wxEventType wxEVT_NC_RIGHT_DOWN = wxEVT_FIRST + 204; -const wxEventType wxEVT_NC_RIGHT_UP = wxEVT_FIRST + 205; -const wxEventType wxEVT_NC_MOTION = wxEVT_FIRST + 206; -const wxEventType wxEVT_NC_ENTER_WINDOW = wxEVT_FIRST + 207; -const wxEventType wxEVT_NC_LEAVE_WINDOW = wxEVT_FIRST + 208; -const wxEventType wxEVT_NC_LEFT_DCLICK = wxEVT_FIRST + 209; -const wxEventType wxEVT_NC_MIDDLE_DCLICK = wxEVT_FIRST + 210; -const wxEventType wxEVT_NC_RIGHT_DCLICK = wxEVT_FIRST + 211; - -/* Character input event type */ -const wxEventType wxEVT_CHAR = wxEVT_FIRST + 212; -const wxEventType wxEVT_NAVIGATION_KEY = wxEVT_FIRST + 213; - - /* - * Scrollbar event identifiers - */ -const wxEventType wxEVT_SCROLL_TOP = wxEVT_FIRST + 300; -const wxEventType wxEVT_SCROLL_BOTTOM = wxEVT_FIRST + 301; -const wxEventType wxEVT_SCROLL_LINEUP = wxEVT_FIRST + 302; -const wxEventType wxEVT_SCROLL_LINEDOWN = wxEVT_FIRST + 303; -const wxEventType wxEVT_SCROLL_PAGEUP = wxEVT_FIRST + 304; -const wxEventType wxEVT_SCROLL_PAGEDOWN = wxEVT_FIRST + 305; -const wxEventType wxEVT_SCROLL_THUMBTRACK = wxEVT_FIRST + 306; - -const wxEventType wxEVT_SIZE = wxEVT_FIRST + 400; -const wxEventType wxEVT_MOVE = wxEVT_FIRST + 401; -const wxEventType wxEVT_CLOSE_WINDOW = wxEVT_FIRST + 402; -const wxEventType wxEVT_END_SESSION = wxEVT_FIRST + 403; -const wxEventType wxEVT_QUERY_END_SESSION = wxEVT_FIRST + 404; -const wxEventType wxEVT_ACTIVATE_APP = wxEVT_FIRST + 405; -const wxEventType wxEVT_POWER = wxEVT_FIRST + 406; -const wxEventType wxEVT_CHAR_HOOK = wxEVT_FIRST + 407; -const wxEventType wxEVT_KEY_UP = wxEVT_FIRST + 408; -const wxEventType wxEVT_ACTIVATE = wxEVT_FIRST + 409; -const wxEventType wxEVT_CREATE = wxEVT_FIRST + 410; -const wxEventType wxEVT_DESTROY = wxEVT_FIRST + 411; -const wxEventType wxEVT_SHOW = wxEVT_FIRST + 412; -const wxEventType wxEVT_ICONIZE = wxEVT_FIRST + 413; -const wxEventType wxEVT_MAXIMIZE = wxEVT_FIRST + 414; -const wxEventType wxEVT_MOUSE_CAPTURE_CHANGED = wxEVT_FIRST + 415; -const wxEventType wxEVT_PAINT = wxEVT_FIRST + 416; -const wxEventType wxEVT_ERASE_BACKGROUND = wxEVT_FIRST + 417; -const wxEventType wxEVT_NC_PAINT = wxEVT_FIRST + 418; -const wxEventType wxEVT_PAINT_ICON = wxEVT_FIRST + 419; -const wxEventType wxEVT_MENU_CHAR = wxEVT_FIRST + 420; -const wxEventType wxEVT_MENU_INIT = wxEVT_FIRST + 421; -const wxEventType wxEVT_MENU_HIGHLIGHT = wxEVT_FIRST + 422; -const wxEventType wxEVT_POPUP_MENU_INIT = wxEVT_FIRST + 423; -const wxEventType wxEVT_CONTEXT_MENU = wxEVT_FIRST + 424; -const wxEventType wxEVT_SYS_COLOUR_CHANGED = wxEVT_FIRST + 425; -const wxEventType wxEVT_SETTING_CHANGED = wxEVT_FIRST + 426; -const wxEventType wxEVT_QUERY_NEW_PALETTE = wxEVT_FIRST + 427; -const wxEventType wxEVT_PALETTE_CHANGED = wxEVT_FIRST + 428; -const wxEventType wxEVT_JOY_BUTTON_DOWN = wxEVT_FIRST + 429; -const wxEventType wxEVT_JOY_BUTTON_UP = wxEVT_FIRST + 430; -const wxEventType wxEVT_JOY_MOVE = wxEVT_FIRST + 431; -const wxEventType wxEVT_JOY_ZMOVE = wxEVT_FIRST + 432; -const wxEventType wxEVT_DROP_FILES = wxEVT_FIRST + 433; -const wxEventType wxEVT_DRAW_ITEM = wxEVT_FIRST + 434; -const wxEventType wxEVT_MEASURE_ITEM = wxEVT_FIRST + 435; -const wxEventType wxEVT_COMPARE_ITEM = wxEVT_FIRST + 436; -const wxEventType wxEVT_INIT_DIALOG = wxEVT_FIRST + 437; -const wxEventType wxEVT_IDLE = wxEVT_FIRST + 438; -const wxEventType wxEVT_UPDATE_UI = wxEVT_FIRST + 439; - /* System misc. */ -const wxEventType wxEVT_END_PROCESS = wxEVT_FIRST + 440; - - /* Generic command events */ - // Note: a click is a higher-level event - // than button down/up -const wxEventType wxEVT_COMMAND_LEFT_CLICK = wxEVT_FIRST + 500; -const wxEventType wxEVT_COMMAND_LEFT_DCLICK = wxEVT_FIRST + 501; -const wxEventType wxEVT_COMMAND_RIGHT_CLICK = wxEVT_FIRST + 502; -const wxEventType wxEVT_COMMAND_RIGHT_DCLICK = wxEVT_FIRST + 503; -const wxEventType wxEVT_COMMAND_SET_FOCUS = wxEVT_FIRST + 504; -const wxEventType wxEVT_COMMAND_KILL_FOCUS = wxEVT_FIRST + 505; -const wxEventType wxEVT_COMMAND_ENTER = wxEVT_FIRST + 506; - - /* Tree control event types */ -const wxEventType wxEVT_COMMAND_TREE_BEGIN_DRAG = wxEVT_FIRST + 600; -const wxEventType wxEVT_COMMAND_TREE_BEGIN_RDRAG = wxEVT_FIRST + 601; -const wxEventType wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT = wxEVT_FIRST + 602; -const wxEventType wxEVT_COMMAND_TREE_END_LABEL_EDIT = wxEVT_FIRST + 603; -const wxEventType wxEVT_COMMAND_TREE_DELETE_ITEM = wxEVT_FIRST + 604; -const wxEventType wxEVT_COMMAND_TREE_GET_INFO = wxEVT_FIRST + 605; -const wxEventType wxEVT_COMMAND_TREE_SET_INFO = wxEVT_FIRST + 606; -const wxEventType wxEVT_COMMAND_TREE_ITEM_EXPANDED = wxEVT_FIRST + 607; -const wxEventType wxEVT_COMMAND_TREE_ITEM_EXPANDING = wxEVT_FIRST + 608; -const wxEventType wxEVT_COMMAND_TREE_ITEM_COLLAPSED = wxEVT_FIRST + 609; -const wxEventType wxEVT_COMMAND_TREE_ITEM_COLLAPSING = wxEVT_FIRST + 610; -const wxEventType wxEVT_COMMAND_TREE_SEL_CHANGED = wxEVT_FIRST + 611; -const wxEventType wxEVT_COMMAND_TREE_SEL_CHANGING = wxEVT_FIRST + 612; -const wxEventType wxEVT_COMMAND_TREE_KEY_DOWN = wxEVT_FIRST + 613; - - /* List control event types */ -const wxEventType wxEVT_COMMAND_LIST_BEGIN_DRAG = wxEVT_FIRST + 700; -const wxEventType wxEVT_COMMAND_LIST_BEGIN_RDRAG = wxEVT_FIRST + 701; -const wxEventType wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT = wxEVT_FIRST + 702; -const wxEventType wxEVT_COMMAND_LIST_END_LABEL_EDIT = wxEVT_FIRST + 703; -const wxEventType wxEVT_COMMAND_LIST_DELETE_ITEM = wxEVT_FIRST + 704; -const wxEventType wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS = wxEVT_FIRST + 705; -const wxEventType wxEVT_COMMAND_LIST_GET_INFO = wxEVT_FIRST + 706; -const wxEventType wxEVT_COMMAND_LIST_SET_INFO = wxEVT_FIRST + 707; -const wxEventType wxEVT_COMMAND_LIST_ITEM_SELECTED = wxEVT_FIRST + 708; -const wxEventType wxEVT_COMMAND_LIST_ITEM_DESELECTED = wxEVT_FIRST + 709; -const wxEventType wxEVT_COMMAND_LIST_KEY_DOWN = wxEVT_FIRST + 710; -const wxEventType wxEVT_COMMAND_LIST_INSERT_ITEM = wxEVT_FIRST + 711; -const wxEventType wxEVT_COMMAND_LIST_COL_CLICK = wxEVT_FIRST + 712; - - /* Tab and notebook control event types */ -const wxEventType wxEVT_COMMAND_TAB_SEL_CHANGED = wxEVT_FIRST + 800; -const wxEventType wxEVT_COMMAND_TAB_SEL_CHANGING = wxEVT_FIRST + 801; -const wxEventType wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED = wxEVT_FIRST + 802; -const wxEventType wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING = wxEVT_FIRST + 803; - -// Compatibility - -#if WXWIN_COMPATIBILITY - -#define wxEVENT_TYPE_BUTTON_COMMAND wxEVT_COMMAND_BUTTON_CLICKED -#define wxEVENT_TYPE_CHECKBOX_COMMAND wxEVT_COMMAND_CHECKBOX_CLICKED -#define wxEVENT_TYPE_CHOICE_COMMAND wxEVT_COMMAND_CHOICE_SELECTED -#define wxEVENT_TYPE_LISTBOX_COMMAND wxEVT_COMMAND_LISTBOX_SELECTED -#define wxEVENT_TYPE_LISTBOX_DCLICK_COMMAND wxEVT_COMMAND_LISTBOX_DOUBLECLICKED -#define wxEVENT_TYPE_TEXT_COMMAND wxEVT_COMMAND_TEXT_UPDATED -#define wxEVENT_TYPE_MULTITEXT_COMMAND wxEVT_COMMAND_TEXT_UPDATED -#define wxEVENT_TYPE_MENU_COMMAND wxEVT_COMMAND_MENU_SELECTED -#define wxEVENT_TYPE_SLIDER_COMMAND wxEVT_COMMAND_SLIDER_UPDATED -#define wxEVENT_TYPE_RADIOBOX_COMMAND wxEVT_COMMAND_RADIOBOX_SELECTED -#define wxEVENT_TYPE_RADIOBUTTON_COMMAND wxEVT_COMMAND_RADIOBUTTON_SELECTED -#define wxEVENT_TYPE_TEXT_ENTER_COMMAND wxEVT_COMMAND_TEXT_ENTER -#define wxEVENT_TYPE_SET_FOCUS wxEVT_SET_FOCUS -#define wxEVENT_TYPE_KILL_FOCUS wxEVT_KILL_FOCUS -#define wxEVENT_TYPE_SCROLLBAR_COMMAND wxEVT_COMMAND_SCROLLBAR_UPDATED -#define wxEVENT_TYPE_VIRT_LISTBOX_COMMAND wxEVT_COMMAND_VLBOX_SELECTED -#define wxEVENT_TYPE_COMBOBOX_COMMAND wxEVT_COMMAND_COMBOBOX_SELECTED - -#define wxEVENT_TYPE_LEFT_DOWN wxEVT_LEFT_DOWN -#define wxEVENT_TYPE_LEFT_UP wxEVT_LEFT_UP -#define wxEVENT_TYPE_MIDDLE_DOWN wxEVT_MIDDLE_DOWN -#define wxEVENT_TYPE_MIDDLE_UP wxEVT_MIDDLE_UP -#define wxEVENT_TYPE_RIGHT_DOWN wxEVT_RIGHT_DOWN -#define wxEVENT_TYPE_RIGHT_UP wxEVT_RIGHT_UP -#define wxEVENT_TYPE_MOTION wxEVT_MOTION -#define wxEVENT_TYPE_ENTER_WINDOW wxEVT_ENTER_WINDOW -#define wxEVENT_TYPE_LEAVE_WINDOW wxEVT_LEAVE_WINDOW -#define wxEVENT_TYPE_LEFT_DCLICK wxEVT_LEFT_DCLICK -#define wxEVENT_TYPE_MIDDLE_DCLICK wxEVT_MIDDLE_DCLICK -#define wxEVENT_TYPE_RIGHT_DCLICK wxEVT_RIGHT_DCLICK -#define wxEVENT_TYPE_CHAR wxEVT_CHAR -#define wxEVENT_TYPE_SCROLL_TOP wxEVT_SCROLL_TOP -#define wxEVENT_TYPE_SCROLL_BOTTOM wxEVT_SCROLL_BOTTOM -#define wxEVENT_TYPE_SCROLL_LINEUP wxEVT_SCROLL_LINEUP -#define wxEVENT_TYPE_SCROLL_LINEDOWN wxEVT_SCROLL_LINEDOWN -#define wxEVENT_TYPE_SCROLL_PAGEUP wxEVT_SCROLL_PAGEUP -#define wxEVENT_TYPE_SCROLL_PAGEDOWN wxEVT_SCROLL_PAGEDOWN -#define wxEVENT_TYPE_SCROLL_THUMBTRACK wxEVT_SCROLL_THUMBTRACK - -#endif - -/* - * wxWindows events, covering all interesting things that might happen - * (button clicking, resizing, setting text in widgets, etc.). - * - * For each completely new event type, derive a new event class. - * An event CLASS represents a C++ class defining a range of similar event TYPES; - * examples are canvas events, panel item command events. - * An event TYPE is a unique identifier for a particular system event, - * such as a button press or a listbox deselection. - * - */ - -class WXDLLEXPORT wxEvent: public wxObject -{ - DECLARE_ABSTRACT_CLASS(wxEvent) - -public: - wxEvent(int id = 0); - inline ~wxEvent(void) {} - - inline void SetEventType(wxEventType typ) { m_eventType = typ; } - inline wxEventType GetEventType(void) const { return m_eventType; } - inline wxObject *GetEventObject(void) const { return m_eventObject; } - inline void SetEventObject(wxObject *obj) { m_eventObject = obj; } - inline long GetTimestamp(void) const { return m_timeStamp; } - inline void SetTimestamp(long ts = 0) { m_timeStamp = ts; } - inline int GetId() const { return m_id; } - inline void SetId(int Id) { m_id = Id; } - - // Can instruct event processor that we wish to ignore this event - // (treat as if the event table entry had not been found) - inline void Skip(bool skip = TRUE) { m_skipped = skip; } - inline bool GetSkipped(void) const { return m_skipped; }; - -public: - bool m_skipped; - wxObject* m_eventObject; - char* m_eventHandle; // Handle of an underlying windowing system event - wxEventType m_eventType; - long m_timeStamp; - int m_id; - wxObject* m_callbackUserData; - -}; - -// Item or menu event class -/* - wxEVT_COMMAND_BUTTON_CLICKED - wxEVT_COMMAND_CHECKBOX_CLICKED - wxEVT_COMMAND_CHOICE_SELECTED - wxEVT_COMMAND_LISTBOX_SELECTED - wxEVT_COMMAND_LISTBOX_DOUBLECLICKED - wxEVT_COMMAND_TEXT_UPDATED - wxEVT_COMMAND_TEXT_ENTER - wxEVT_COMMAND_MENU_SELECTED - wxEVT_COMMAND_SLIDER_UPDATED - wxEVT_COMMAND_RADIOBOX_SELECTED - wxEVT_COMMAND_RADIOBUTTON_SELECTED - wxEVT_COMMAND_SCROLLBAR_UPDATED - wxEVT_COMMAND_VLBOX_SELECTED - wxEVT_COMMAND_COMBOBOX_SELECTED -*/ - -class WXDLLEXPORT wxCommandEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxCommandEvent) - - wxCommandEvent(wxEventType commandType = wxEVT_NULL, int id = 0); - inline ~wxCommandEvent(void) {} - - /* - * Accessors dependent on context - * - */ - - // Set/Get listbox/choice client data - inline void SetClientData(char* clientData) { m_clientData = clientData; } - inline char *GetClientData() const { return m_clientData; } - - // Get listbox selection if single-choice - inline int GetSelection() const { return m_commandInt; } - - // Set/Get listbox/choice selection string - inline void SetString(char* s) { m_commandString = s; } - inline char *GetString() const { return m_commandString; } - - // Get checkbox value - inline bool Checked() const { return (m_commandInt != 0); } - - // TRUE if the listbox event was a selection. - inline bool IsSelection() const { return (m_extraLong != 0); } - - inline void SetExtraLong(long extraLong) { m_extraLong = extraLong; } - inline long GetExtraLong(void) const { return m_extraLong ; } - - inline void SetInt(int i) { m_commandInt = i; } - inline long GetInt(void) const { return m_commandInt ; } - - public: - char* m_commandString; // String event argument - int m_commandInt; - long m_extraLong; // Additional information (e.g. select/deselect) - char* m_clientData; // Arbitrary client data -}; - -// Scroll event class -/* - wxEVT_SCROLL_TOP - wxEVT_SCROLL_BOTTOM - wxEVT_SCROLL_LINEUP - wxEVT_SCROLL_LINEDOWN - wxEVT_SCROLL_PAGEUP - wxEVT_SCROLL_PAGEDOWN - wxEVT_SCROLL_THUMBTRACK -*/ - -class WXDLLEXPORT wxScrollEvent: public wxCommandEvent -{ - DECLARE_DYNAMIC_CLASS(wxScrollEvent) - - public: - wxScrollEvent(wxEventType commandType = wxEVT_NULL, int id = 0, int pos = 0, int orient = 0); - inline ~wxScrollEvent(void) {} - - /* - * Accessors - * - */ - - inline int GetOrientation(void) const { return (int) m_extraLong ; } - inline int GetPosition(void) const { return m_commandInt ; } - inline void SetOrientation(int orient) { m_extraLong = (long) orient; } - inline void SetPosition(int pos) { m_commandInt = pos; } -}; - -// Mouse event class - -/* - wxEVT_LEFT_DOWN - wxEVT_LEFT_UP - wxEVT_MIDDLE_DOWN - wxEVT_MIDDLE_UP - wxEVT_RIGHT_DOWN - wxEVT_RIGHT_UP - wxEVT_MOTION - wxEVT_ENTER_WINDOW - wxEVT_LEAVE_WINDOW - wxEVT_LEFT_DCLICK - wxEVT_MIDDLE_DCLICK - wxEVT_RIGHT_DCLICK - wxEVT_NC_LEFT_DOWN - wxEVT_NC_LEFT_UP, - wxEVT_NC_MIDDLE_DOWN, - wxEVT_NC_MIDDLE_UP, - wxEVT_NC_RIGHT_DOWN, - wxEVT_NC_RIGHT_UP, - wxEVT_NC_MOTION, - wxEVT_NC_ENTER_WINDOW, - wxEVT_NC_LEAVE_WINDOW, - wxEVT_NC_LEFT_DCLICK, - wxEVT_NC_MIDDLE_DCLICK, - wxEVT_NC_RIGHT_DCLICK, -*/ - -class WXDLLEXPORT wxDC; -class WXDLLEXPORT wxMouseEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxMouseEvent) - - public: - wxMouseEvent(wxEventType mouseType = wxEVT_NULL); - - // Was it a button event? (*doesn't* mean: is any button *down*?) - inline bool IsButton(void) const { return Button(-1); } - - // Was it a down event from button 1, 2 or 3 or any? - bool ButtonDown(int but = -1) const; - - // Was it a dclick event from button 1, 2 or 3 or any? - bool ButtonDClick(int but = -1) const; - - // Was it a up event from button 1, 2 or 3 or any? - bool ButtonUp(int but = -1) const; - - // Was the given button 1,2,3 or any changing state? - bool Button(int but) const; - - // Was the given button 1,2,3 or any in Down state? - bool ButtonIsDown(int but) const; - - // Find state of shift/control keys - inline bool ControlDown(void) const { return m_controlDown; } - inline bool MetaDown(void) const { return m_metaDown; } - inline bool AltDown(void) const { return m_altDown; } - inline bool ShiftDown(void) const { return m_shiftDown; } - - // Find which event was just generated - inline bool LeftDown(void) const { return (m_eventType == wxEVT_LEFT_DOWN); } - inline bool MiddleDown(void) const { return (m_eventType == wxEVT_MIDDLE_DOWN); } - inline bool RightDown(void) const { return (m_eventType == wxEVT_RIGHT_DOWN); } - - inline bool LeftUp(void) const { return (m_eventType == wxEVT_LEFT_UP); } - inline bool MiddleUp(void) const { return (m_eventType == wxEVT_MIDDLE_UP); } - inline bool RightUp(void) const { return (m_eventType == wxEVT_RIGHT_UP); } - - inline bool LeftDClick(void) const { return (m_eventType == wxEVT_LEFT_DCLICK); } - inline bool MiddleDClick(void) const { return (m_eventType == wxEVT_MIDDLE_DCLICK); } - inline bool RightDClick(void) const { return (m_eventType == wxEVT_RIGHT_DCLICK); } - - // Find the current state of the mouse buttons (regardless - // of current event type) - inline bool LeftIsDown(void) const { return m_leftDown; } - inline bool MiddleIsDown(void) const { return m_middleDown; } - inline bool RightIsDown(void) const { return m_rightDown; } - - // True if a button is down and the mouse is moving - inline bool Dragging(void) const { return ((m_eventType == wxEVENT_TYPE_MOTION) && (LeftIsDown() || MiddleIsDown() || RightIsDown())); } - - // True if the mouse is moving, and no button is down - inline bool Moving(void) const { return (m_eventType == wxEVT_MOTION); } - - // True if the mouse is just entering the window - inline bool Entering(void) const { return (m_eventType == wxEVT_ENTER_WINDOW); } - - // True if the mouse is just leaving the window - inline bool Leaving(void) const { return (m_eventType == wxEVT_LEAVE_WINDOW); } - - // Find the position of the event - inline void Position(long *xpos, long *ypos) const { *xpos = m_x; *ypos = m_y; } - - // Find the position of the event - inline wxPoint GetPosition() const { return wxPoint(m_x, m_y); } - - // Find the logical position of the event given the DC - wxPoint GetLogicalPosition(const wxDC& dc) const ; - - // Compatibility - inline void Position(float *xpos, float *ypos) const { *xpos = (float) m_x; *ypos = (float) m_y; } - - // Get X position - inline long GetX(void) const { return m_x; } - - // Get Y position - inline long GetY(void) const { return m_y; } - -public: - long m_x; - long m_y; - bool m_leftDown; - bool m_middleDown; - bool m_rightDown; - - bool m_controlDown; - bool m_shiftDown; - bool m_altDown; - bool m_metaDown; - -}; - -// Keyboard input event class - -/* - wxEVT_CHAR - wxEVT_CHAR_HOOK - wxEVT_KEY_UP - */ - -class WXDLLEXPORT wxKeyEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxKeyEvent) - -public: - wxKeyEvent(wxEventType keyType = wxEVT_NULL); - - // Find state of shift/control keys - inline bool ControlDown(void) const { return m_controlDown; } - inline bool MetaDown(void) const { return m_metaDown; } - inline bool AltDown(void) const { return m_altDown; } - inline bool ShiftDown(void) const { return m_shiftDown; } - inline long KeyCode(void) const { return m_keyCode; } - - // Find the position of the event - inline void Position(float *xpos, float *ypos) const { *xpos = m_x; *ypos = m_y; } - - // Get X position - inline float GetX(void) const { return m_x; } - - // Get Y position - inline float GetY(void) const { return m_y; } - -public: - float m_x ; - float m_y ; - long m_keyCode; - bool m_controlDown; - bool m_shiftDown; - bool m_altDown; - bool m_metaDown; - -}; - -// Size event class -/* - wxEVT_SIZE - */ - -class WXDLLEXPORT wxSizeEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxSizeEvent) - - public: - wxSize m_size; - - inline wxSizeEvent(void) { m_eventType = wxEVT_SIZE; } - inline wxSizeEvent(const wxSize& sz, int id = 0) - { m_eventType = wxEVT_SIZE; m_size.x = sz.x; m_size.y = sz.y; m_id = id; } - - inline wxSize GetSize(void) const { return m_size; } -}; - -// Move event class - -/* - wxEVT_MOVE - */ - -class WXDLLEXPORT wxMoveEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxMoveEvent) - - public: - wxPoint m_pos; - - inline wxMoveEvent(void) { m_eventType = wxEVT_MOVE; } - inline wxMoveEvent(const wxPoint& pos, int id = 0) - { m_eventType = wxEVT_MOVE; m_pos.x = pos.x; m_pos.y = pos.y; m_id = id; } - - inline wxPoint GetPosition(void) const { return m_pos; } -}; - -// Paint event class -/* - wxEVT_PAINT - wxEVT_NC_PAINT - wxEVT_PAINT_ICON - */ - -class WXDLLEXPORT wxPaintEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxPaintEvent) - - public: - inline wxPaintEvent(int Id = 0) { m_eventType = wxEVT_PAINT; m_id = Id; } -}; - -// Erase background event class -/* - wxEVT_ERASE_BACKGROUND - */ - -class WXDLLEXPORT wxDC; -class WXDLLEXPORT wxEraseEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxEraseEvent) - public: - wxDC *m_dc ; - inline wxEraseEvent(int Id = 0, wxDC *dc = (wxDC *) NULL) { m_eventType = wxEVT_ERASE_BACKGROUND; m_id = Id; m_dc = dc; } - inline wxDC *GetDC() const { return m_dc; } -}; - -// Focus event class -/* - wxEVT_SET_FOCUS - wxEVT_KILL_FOCUS - */ - -class WXDLLEXPORT wxFocusEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxFocusEvent) - - public: - inline wxFocusEvent(wxEventType type = wxEVT_NULL, int Id = 0) { m_eventType = type; m_id = Id; } -}; - -// Activate event class -/* - wxEVT_ACTIVATE - wxEVT_ACTIVATE_APP - */ - -class WXDLLEXPORT wxActivateEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxActivateEvent) - - public: - bool m_active; - inline wxActivateEvent(wxEventType type = wxEVT_NULL, bool active = TRUE, int Id = 0) { m_eventType = type; m_active = active; m_id = Id; } - inline bool GetActive(void) const { return m_active; } -}; - -// InitDialog event class -/* - wxEVT_INIT_DIALOG - */ - -class WXDLLEXPORT wxInitDialogEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxInitDialogEvent) - - public: - inline wxInitDialogEvent(int Id = 0) { m_eventType = wxEVT_INIT_DIALOG; m_id = Id; } -}; - -// Miscellaneous menu event class -/* - wxEVT_MENU_CHAR, - wxEVT_MENU_INIT, - wxEVT_MENU_HIGHLIGHT, - wxEVT_POPUP_MENU_INIT, - wxEVT_CONTEXT_MENU, -*/ - -class WXDLLEXPORT wxMenuEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxMenuEvent) - -public: - int m_menuId; - - inline wxMenuEvent(wxEventType type = wxEVT_NULL, int id = 0) { m_eventType = type; m_menuId = id; } - - inline int GetMenuId(void) const { return m_menuId; } -}; - -// Window close or session close event class -/* - wxEVT_CLOSE_WINDOW, - wxEVT_END_SESSION, - wxEVT_QUERY_END_SESSION - */ - -class WXDLLEXPORT wxCloseEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxCloseEvent) -public: - - inline wxCloseEvent(wxEventType type = wxEVT_NULL, int id = 0) - { m_eventType = type; m_sessionEnding = TRUE; m_loggingOff = TRUE; m_veto = FALSE; - m_id = id; m_force = FALSE; } - - inline bool GetSessionEnding(void) const { return m_sessionEnding; } - inline bool GetLoggingOff(void) const { return m_loggingOff; } - inline void Veto(bool veto = TRUE) { m_veto = veto; } - inline bool GetVeto(void) const { return m_veto; } - inline void SetForce(bool force) { m_force = force; } - inline bool GetForce(void) const { return m_force; } - - protected: - bool m_sessionEnding; - bool m_loggingOff; - bool m_veto; - bool m_force; - -}; - -/* - wxEVT_SHOW - */ - -class WXDLLEXPORT wxShowEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxShowEvent) -public: - - inline wxShowEvent(int id = 0, bool show = FALSE) - { m_eventType = wxEVT_SHOW; m_id = id; m_show = show; } - - inline void SetShow(bool show) { m_show = show; } - inline bool GetShow(void) const { return m_show; } - -protected: - bool m_show; -}; - -/* - wxEVT_ICONIZE - */ - -class WXDLLEXPORT wxIconizeEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxIconizeEvent) -public: - - inline wxIconizeEvent(int id = 0) - { m_eventType = wxEVT_ICONIZE; m_id = id; } -}; - -/* - wxEVT_MAXIMIZE - */ - -class WXDLLEXPORT wxMaximizeEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxMaximizeEvent) -public: - - inline wxMaximizeEvent(int id = 0) - { m_eventType = wxEVT_MAXIMIZE; m_id = id; } -}; - -// Joystick event class -/* - wxEVT_JOY_BUTTON_DOWN, - wxEVT_JOY_BUTTON_UP, - wxEVT_JOY_MOVE, - wxEVT_JOY_ZMOVE -*/ - -// Which joystick? Same as Windows ids so no conversion necessary. -#define wxJOYSTICK1 0 -#define wxJOYSTICK2 1 - -// Which button is down? -#define wxJOY_BUTTON1 1 -#define wxJOY_BUTTON2 2 -#define wxJOY_BUTTON3 4 -#define wxJOY_BUTTON4 8 -#define wxJOY_BUTTON_ANY -1 - -class WXDLLEXPORT wxJoystickEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxJoystickEvent) - - public: - wxPoint m_pos; - int m_zPosition; - int m_buttonChange; // Which button changed? - int m_buttonState; // Which buttons are down? - int m_joyStick; // Which joystick? - - inline wxJoystickEvent(wxEventType type = wxEVT_NULL, int state = 0, int joystick = wxJOYSTICK1, int change = 0) - { m_eventType = type; m_buttonState = state; m_pos = wxPoint(0,0); m_zPosition = 0; - m_joyStick = joystick; m_buttonChange = change; } - - inline wxPoint GetPosition(void) const { return m_pos; } - inline int GetZPosition(void) const { return m_zPosition; } - inline int GetButtonState(void) const { return m_buttonState; } - inline int GetButtonChange(void) const { return m_buttonChange; } - inline int GetJoystick(void) const { return m_joyStick; } - - inline void SetJoystick(int stick) { m_joyStick = stick; } - inline void SetButtonState(int state) { m_buttonState = state; } - inline void SetButtonChange(int change) { m_buttonChange = change; } - inline void SetPosition(const wxPoint& pos) { m_pos = pos; } - inline void SetZPosition(int zPos) { m_zPosition = zPos; } - - // Was it a button event? (*doesn't* mean: is any button *down*?) - inline bool IsButton(void) const { return ((GetEventType() == wxEVT_JOY_BUTTON_DOWN) || - (GetEventType() == wxEVT_JOY_BUTTON_DOWN)); } - - // Was it a move event? - inline bool IsMove(void) const { return (GetEventType() == wxEVT_JOY_MOVE) ; } - - // Was it a zmove event? - inline bool IsZMove(void) const { return (GetEventType() == wxEVT_JOY_ZMOVE) ; } - - // Was it a down event from button 1, 2, 3, 4 or any? - inline bool ButtonDown(int but = wxJOY_BUTTON_ANY) const - { return ((GetEventType() == wxEVT_JOY_BUTTON_DOWN) && - ((but == wxJOY_BUTTON_ANY) || (but == m_buttonChange))); } - - // Was it a up event from button 1, 2, 3 or any? - inline bool ButtonUp(int but = wxJOY_BUTTON_ANY) const - { return ((GetEventType() == wxEVT_JOY_BUTTON_UP) && - ((but == wxJOY_BUTTON_ANY) || (but == m_buttonChange))); } - - // Was the given button 1,2,3,4 or any in Down state? - inline bool ButtonIsDown(int but = wxJOY_BUTTON_ANY) const - { return (((but == wxJOY_BUTTON_ANY) && (m_buttonState != 0)) || - ((m_buttonState & but) == but)); } -}; - -// Drop files event class -/* - wxEVT_DROP_FILES - */ - -class WXDLLEXPORT wxDropFilesEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxDropFilesEvent) - - public: - int m_noFiles; - wxPoint m_pos; - wxString* m_files; // Memory (de)allocated by code calling ProcessEvent - - inline wxDropFilesEvent(wxEventType type = wxEVT_NULL, int noFiles = 0, wxString *files = (wxString *) NULL) - { m_eventType = type; m_noFiles = noFiles; m_files = files; } - - inline wxPoint GetPosition(void) const { return m_pos; } - inline int GetNumberOfFiles(void) const { return m_noFiles; } - inline wxString *GetFiles(void) const { return m_files; } -}; - -// Idle event -/* - wxEVT_IDLE - */ - -class WXDLLEXPORT wxIdleEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxIdleEvent) - -public: - inline wxIdleEvent(void) - { m_eventType = wxEVT_IDLE; m_requestMore = FALSE; } - - inline void RequestMore(bool needMore = TRUE) { m_requestMore = needMore; } - inline bool MoreRequested(void) const { return m_requestMore; } - -protected: - bool m_requestMore; -}; - -// Update UI event -/* - wxEVT_UPDATE_UI - */ - -class WXDLLEXPORT wxMenu; -class WXDLLEXPORT wxWindow; - -class WXDLLEXPORT wxUpdateUIEvent: public wxCommandEvent -{ - DECLARE_DYNAMIC_CLASS(wxUpdateUIEvent) - - inline wxUpdateUIEvent(wxWindowID commandId = 0) - { m_eventType = wxEVT_UPDATE_UI; m_id = commandId; - m_checked = FALSE; m_setChecked = FALSE; m_enabled = FALSE; m_setEnabled = FALSE; - m_setText = FALSE; m_text = ""; } - - inline bool GetChecked(void) const { return m_checked; } - inline bool GetEnabled(void) const { return m_enabled; } - inline wxString GetText(void) const { return m_text; } - inline bool GetSetText(void) const { return m_setText; } - inline bool GetSetChecked(void) const { return m_setChecked; } - inline bool GetSetEnabled(void) const { return m_setEnabled; } - - inline void Check(bool check) { m_checked = check; m_setChecked = TRUE; } - inline void Enable(bool enable) { m_enabled = enable; m_setEnabled = TRUE; } - inline void SetText(const wxString& text) { m_text = text; m_setText = TRUE; } - - protected: - - bool m_checked; - bool m_enabled; - bool m_setEnabled; - bool m_setText; - bool m_setChecked; - wxString m_text; - -}; - -/* - wxEVT_SYS_COLOUR_CHANGED - */ - -// TODO: shouldn't all events record the window ID? -class WXDLLEXPORT wxSysColourChangedEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxSysColourChangedEvent) - - public: - inline wxSysColourChangedEvent(void) - { m_eventType = wxEVT_SYS_COLOUR_CHANGED; } -}; - -/* - wxEVT_PALETTE_CHANGED - */ - -class WXDLLEXPORT wxPaletteChangedEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxPaletteChangedEvent) - -public: - inline wxPaletteChangedEvent(wxWindowID id = 0): wxEvent(id) - { m_eventType = wxEVT_PALETTE_CHANGED; m_changedWindow = (wxWindow *) NULL; } - - inline void SetChangedWindow(wxWindow* win) { m_changedWindow = win; } - inline wxWindow* GetChangedWindow() const { return m_changedWindow; } - -protected: - wxWindow* m_changedWindow; -}; - -/* - wxEVT_QUERY_NEW_PALETTE - Indicates the window is getting keyboard focus and should re-do its palette. - */ - -class WXDLLEXPORT wxQueryNewPaletteEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxQueryNewPaletteEvent) - -public: - inline wxQueryNewPaletteEvent(wxWindowID id = 0): wxEvent(id) - { m_eventType = wxEVT_QUERY_NEW_PALETTE; m_paletteRealized = FALSE; } - - // App sets this if it changes the palette. - inline void SetPaletteRealized(bool realized) { m_paletteRealized = realized; } - inline bool GetPaletteRealized() const { return m_paletteRealized; } - -protected: - bool m_paletteRealized; -}; - -/* - Event generated by dialog navigation keys - wxEVT_NAVIGATION_KEY - */ -// must derive from command event to be propagated to the parent -class WXDLLEXPORT wxNavigationKeyEvent : public wxCommandEvent -{ - DECLARE_DYNAMIC_CLASS(wxNavigationKeyEvent) - -public: - wxNavigationKeyEvent() : wxCommandEvent(wxEVT_NAVIGATION_KEY) { } - - // direction: forward (true) or backward (false) - bool GetDirection() const { return m_commandInt == 1; } - void SetDirection(bool bForward) { m_commandInt = bForward; } - - // it may be a window change event (MDI, notebook pages...) or a control - // change event - bool IsWindowChange() const { return m_extraLong == 1; } - void SetWindowChange(bool bIs) { m_extraLong = bIs; } - - // the child which has the focus currently (may be NULL - use - // wxWindow::FindFocus then) - wxWindow* GetCurrentFocus() const { return (wxWindow *)m_clientData; } - void SetCurrentFocus(wxWindow *win) { m_clientData = (char *)win; } -}; - -/* TODO - wxEVT_POWER, - wxEVT_CREATE, - wxEVT_DESTROY, - wxEVT_MOUSE_CAPTURE_CHANGED, - wxEVT_SETTING_CHANGED, // WM_WININICHANGE (NT) / WM_SETTINGCHANGE (Win95) -// wxEVT_FONT_CHANGED, // WM_FONTCHANGE: roll into wxEVT_SETTING_CHANGED, but remember to propagate - // wxEVT_FONT_CHANGED to all other windows (maybe). - wxEVT_DRAW_ITEM, // Leave these three as virtual functions in wxControl?? Platform-specific. - wxEVT_MEASURE_ITEM, - wxEVT_COMPARE_ITEM -*/ - -class WXDLLEXPORT wxWindow; -class WXDLLEXPORT wxControl; - -// struct WXDLLEXPORT wxEventTableEntry; - -typedef void (wxObject::*wxObjectEventFunction)(wxEvent&); - -struct WXDLLEXPORT wxEventTableEntry -{ - // For some reason, this can't be wxEventType, or VC++ complains. - int m_eventType; // main event type - int m_id; // control/menu/toolbar id - int m_lastId; // used for ranges of ids - wxObjectEventFunction m_fn; // function to call: not wxEventFunction, because - // of dependency problems - wxObject* m_callbackUserData; -}; - -struct WXDLLEXPORT wxEventTable -{ - const wxEventTable *baseTable; // Points to base event table (next in chain) - const wxEventTableEntry *entries; // Points to bottom of entry array -}; - -class WXDLLEXPORT wxEvtHandler: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxEvtHandler) - public: - wxEvtHandler(void); - ~wxEvtHandler(void); - - inline wxEvtHandler *GetNextHandler(void) const { return m_nextHandler; } - inline wxEvtHandler *GetPreviousHandler(void) const { return m_previousHandler; } - inline void SetNextHandler(wxEvtHandler *handler) { m_nextHandler = handler; } - inline void SetPreviousHandler(wxEvtHandler *handler) { m_previousHandler = handler; } - - inline void SetEvtHandlerEnabled(bool en) { m_enabled = en; } - inline bool GetEvtHandlerEnabled(void) const { return m_enabled; } - - inline virtual void OnCommand(wxWindow& WXUNUSED(win), wxCommandEvent& WXUNUSED(event)) {}; - // Called if child control has no - // callback function - // Default behaviour - virtual long Default(void) { if (GetNextHandler()) return GetNextHandler()->Default(); else return 0; }; - - virtual bool OnClose(void); - - inline char *GetClientData(void) const { return m_clientData; } - inline void SetClientData(char *clientData) { m_clientData = clientData; } - - virtual bool ProcessEvent(wxEvent& event); - virtual bool SearchEventTable(wxEventTable& table, wxEvent& event); - - void Connect( int id, int lastId, - int eventType, - wxObjectEventFunction func, - wxObject *userData = (wxObject *) NULL ); - - bool SearchDynamicEventTable( wxEvent& event ); - -private: - static const wxEventTableEntry sm_eventTableEntries[]; -protected: - static const wxEventTable sm_eventTable; - virtual const wxEventTable* GetEventTable() const; -protected: - wxEvtHandler* m_nextHandler; - wxEvtHandler* m_previousHandler; - char* m_clientData; // Any user client data - bool m_enabled; // Is event handler enabled? - wxList* m_dynamicEvents; - -}; - -typedef void (wxEvtHandler::*wxEventFunction)(wxEvent&); -typedef void (wxEvtHandler::*wxCommandEventFunction)(wxCommandEvent&); -typedef void (wxEvtHandler::*wxScrollEventFunction)(wxScrollEvent&); -typedef void (wxEvtHandler::*wxSizeEventFunction)(wxSizeEvent&); -typedef void (wxEvtHandler::*wxMoveEventFunction)(wxMoveEvent&); -typedef void (wxEvtHandler::*wxPaintEventFunction)(wxPaintEvent&); -typedef void (wxEvtHandler::*wxEraseEventFunction)(wxEraseEvent&); -typedef void (wxEvtHandler::*wxMouseEventFunction)(wxMouseEvent&); -typedef void (wxEvtHandler::*wxCharEventFunction)(wxKeyEvent&); -typedef void (wxEvtHandler::*wxFocusEventFunction)(wxFocusEvent&); -typedef void (wxEvtHandler::*wxActivateEventFunction)(wxActivateEvent&); -typedef void (wxEvtHandler::*wxMenuEventFunction)(wxMenuEvent&); -typedef void (wxEvtHandler::*wxJoystickEventFunction)(wxJoystickEvent&); -typedef void (wxEvtHandler::*wxDropFilesEventFunction)(wxDropFilesEvent&); -typedef void (wxEvtHandler::*wxInitDialogEventFunction)(wxInitDialogEvent&); -typedef void (wxEvtHandler::*wxSysColourChangedFunction)(wxSysColourChangedEvent&); -typedef void (wxEvtHandler::*wxUpdateUIEventFunction)(wxUpdateUIEvent&); -typedef void (wxEvtHandler::*wxIdleEventFunction)(wxIdleEvent&); -typedef void (wxEvtHandler::*wxCloseEventFunction)(wxCloseEvent&); -typedef void (wxEvtHandler::*wxShowEventFunction)(wxShowEvent&); -typedef void (wxEvtHandler::*wxIconizeEventFunction)(wxShowEvent&); -typedef void (wxEvtHandler::*wxMaximizeEventFunction)(wxShowEvent&); -typedef void (wxEvtHandler::*wxNavigationKeyEventFunction)(wxNavigationKeyEvent&); -typedef void (wxEvtHandler::*wxPaletteChangedEventFunction)(wxPaletteChangedEvent&); -typedef void (wxEvtHandler::*wxQueryNewPaletteEventFunction)(wxQueryNewPaletteEvent&); - -// N.B. In GNU-WIN32, you *have* to take the address of a member function -// (use &) or the compiler crashes... - -#define DECLARE_EVENT_TABLE() \ -private:\ - static const wxEventTableEntry sm_eventTableEntries[];\ -protected:\ - static const wxEventTable sm_eventTable;\ - virtual const wxEventTable* GetEventTable() const; - -#define BEGIN_EVENT_TABLE(theClass, baseClass) \ -const wxEventTable *theClass::GetEventTable() const { return &theClass::sm_eventTable; }\ -const wxEventTable theClass::sm_eventTable =\ - { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] };\ -const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ - -#define END_EVENT_TABLE() \ - { 0, 0, 0, 0 } }; - -/* - * Event table macros - */ - -// Generic events -#define EVT_CUSTOM(event, id, func) { event, id, -1, (wxObjectEventFunction) (wxEventFunction) & func, (wxObject *) NULL }, -#define EVT_CUSTOM_RANGE(event, id1, id2, func) { event, id1, id2, (wxObjectEventFunction) (wxEventFunction) & func, (wxObject *) NULL }, - -// Miscellaneous -#define EVT_SIZE(func) { wxEVT_SIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxSizeEventFunction) & func, (wxObject *) NULL }, -#define EVT_MOVE(func) { wxEVT_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMoveEventFunction) & func, (wxObject *) NULL }, -#define EVT_CLOSE(func) { wxEVT_CLOSE_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCloseEventFunction) & func, (wxObject *) NULL }, -#define EVT_PAINT(func) { wxEVT_PAINT, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxPaintEventFunction) & func, (wxObject *) NULL }, -#define EVT_ERASE_BACKGROUND(func) { wxEVT_ERASE_BACKGROUND, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxEraseEventFunction) & func, (wxObject *) NULL }, -#define EVT_CHAR(func) { wxEVT_CHAR, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCharEventFunction) & func, (wxObject *) NULL }, -#define EVT_CHAR_HOOK(func) { wxEVT_CHAR_HOOK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCharEventFunction) & func, NULL }, -#define EVT_MENU_HIGHLIGHT(id, func) { wxEVT_MENU_HIGHLIGHT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxMenuEventFunction) & func, (wxObject *) NULL }, -#define EVT_MENU_HIGHLIGHT_ALL(func) { wxEVT_MENU_HIGHLIGHT, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMenuEventFunction) & func, (wxObject *) NULL }, -#define EVT_SET_FOCUS(func) { wxEVT_SET_FOCUS, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxFocusEventFunction) & func, (wxObject *) NULL }, -#define EVT_KILL_FOCUS(func) { wxEVT_KILL_FOCUS, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxFocusEventFunction) & func, (wxObject *) NULL }, -#define EVT_ACTIVATE(func) { wxEVT_ACTIVATE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxActivateEventFunction) & func, (wxObject *) NULL }, -#define EVT_ACTIVATE_APP(func) { wxEVT_ACTIVATE_APP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxActivateEventFunction) & func, (wxObject *) NULL }, -#define EVT_END_SESSION(func) { wxEVT_END_SESSION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCloseEventFunction) & func, (wxObject *) NULL }, -#define EVT_QUERY_END_SESSION(func) { wxEVT_QUERY_END_SESSION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCloseEventFunction) & func, (wxObject *) NULL }, -#define EVT_DROP_FILES(func) { wxEVT_DROP_FILES, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxDropFilesEventFunction) & func, (wxObject *) NULL }, -#define EVT_INIT_DIALOG(func) { wxEVT_INIT_DIALOG, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxInitDialogEventFunction) & func, (wxObject *) NULL }, -#define EVT_SYS_COLOUR_CHANGED(func) { wxEVT_SYS_COLOUR_CHANGED, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxSysColourChangedFunction) & func, (wxObject *) NULL }, -#define EVT_SHOW(func) { wxEVT_SHOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxShowEventFunction) & func, (wxObject *) NULL }, -#define EVT_MAXIMIZE(func) { wxEVT_MAXIMIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMaximizeEventFunction) & func, (wxObject *) NULL }, -#define EVT_ICONIZE(func) { wxEVT_ICONIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxIconizeEventFunction) & func, (wxObject *) NULL }, -#define EVT_NAVIGATION_KEY(func) { wxEVT_NAVIGATION_KEY, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNavigationKeyEventFunction) & func, (wxObject *) NULL }, -#define EVT_PALETTE_CHANGED(func) { wxEVT_PALETTE_CHANGED, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxPaletteChangedEventFunction) & func, (wxObject *) NULL }, -#define EVT_QUERY_NEW_PALETTE(func) { wxEVT_QUERY_NEW_PALETTE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxQueryNewPaletteEventFunction) & func, (wxObject *) NULL }, - -// Mouse events -#define EVT_LEFT_DOWN(func) { wxEVT_LEFT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, -#define EVT_LEFT_UP(func) { wxEVT_LEFT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, -#define EVT_MIDDLE_DOWN(func) { wxEVT_MIDDLE_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, -#define EVT_MIDDLE_UP(func) { wxEVT_MIDDLE_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, -#define EVT_RIGHT_DOWN(func) { wxEVT_RIGHT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, -#define EVT_RIGHT_UP(func) { wxEVT_RIGHT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, -#define EVT_MOTION(func) { wxEVT_MOTION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, -#define EVT_LEFT_DCLICK(func) { wxEVT_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, -#define EVT_MIDDLE_DCLICK(func) { wxEVT_MIDDLE_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, -#define EVT_RIGHT_DCLICK(func) { wxEVT_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, -#define EVT_LEAVE_WINDOW(func) { wxEVT_LEAVE_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, -#define EVT_ENTER_WINDOW(func) { wxEVT_ENTER_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, - -// All mouse events -#define EVT_MOUSE_EVENTS(func) \ - { wxEVT_LEFT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_LEFT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_MIDDLE_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_MIDDLE_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_RIGHT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_RIGHT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_MOTION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_MIDDLE_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_ENTER_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_LEAVE_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, - -// EVT_COMMAND -#define EVT_COMMAND(id, cmd, fn) { cmd, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_COMMAND_RANGE(id1, id2, cmd, fn) { cmd, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, N(wxObject *) ULL }, - -// Scrolling -#define EVT_SCROLL(func) \ - { wxEVT_SCROLL_TOP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_SCROLL_BOTTOM, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_SCROLL_LINEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_SCROLL_LINEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_SCROLL_PAGEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_SCROLL_PAGEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_SCROLL_THUMBTRACK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, - -#define EVT_SCROLL_TOP(func) { wxEVT_SCROLL_TOP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, -#define EVT_SCROLL_BOTTOM(func) { wxEVT_SCROLL_BOTTOM, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, -#define EVT_SCROLL_LINEUP(func) { wxEVT_SCROLL_LINEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, -#define EVT_SCROLL_LINEDOWN(func) { wxEVT_SCROLL_LINEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, -#define EVT_SCROLL_PAGEUP(func) { wxEVT_SCROLL_PAGEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, -#define EVT_SCROLL_PAGEDOWN(func) { wxEVT_SCROLL_PAGEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, -#define EVT_SCROLL_THUMBTRACK(func) { wxEVT_SCROLL_THUMBTRACK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, - -// Scrolling, with an id -#define EVT_COMMAND_SCROLL(id, func) \ - { wxEVT_SCROLL_TOP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_SCROLL_BOTTOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_SCROLL_PAGEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_SCROLL_PAGEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, - -#define EVT_COMMAND_SCROLL_TOP(id, func) { wxEVT_SCROLL_TOP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, -#define EVT_COMMAND_SCROLL_BOTTOM(id, func) { wxEVT_SCROLL_BOTTOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, -#define EVT_COMMAND_SCROLL_LINEUP(id, func) { wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, -#define EVT_COMMAND_SCROLL_LINEDOWN(id, func) { wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, -#define EVT_COMMAND_SCROLL_PAGEUP(id, func) { wxEVT_SCROLL_PAGEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, -#define EVT_COMMAND_SCROLL_PAGEDOWN(id, func) { wxEVT_SCROLL_PAGEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, -#define EVT_COMMAND_SCROLL_THUMBTRACK(id, func) { wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, - -// Convenience macros for commonly-used commands -#define EVT_BUTTON(id, fn) { wxEVT_COMMAND_BUTTON_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_CHECKBOX(id, fn) { wxEVT_COMMAND_CHECKBOX_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_CHOICE(id, fn) { wxEVT_COMMAND_CHOICE_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_LISTBOX(id, fn) { wxEVT_COMMAND_LISTBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_LISTBOX_DCLICK(id, fn) { wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TEXT(id, fn) { wxEVT_COMMAND_TEXT_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TEXT_ENTER(id, fn) { wxEVT_COMMAND_TEXT_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_MENU(id, fn) { wxEVT_COMMAND_MENU_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_MENU_RANGE(id1, id2, fn) { wxEVT_COMMAND_MENU_SELECTED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_SLIDER(id, fn) { wxEVT_COMMAND_SLIDER_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_RADIOBOX(id, fn) { wxEVT_COMMAND_RADIOBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_RADIOBUTTON(id, fn) { wxEVT_COMMAND_RADIOBUTTON_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -// EVT_SCROLLBAR is now obsolete since we use EVT_COMMAND_SCROLL... events -#define EVT_SCROLLBAR(id, fn) { wxEVT_COMMAND_SCROLLBAR_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_VLBOX(id, fn) { wxEVT_COMMAND_VLBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_COMBOBOX(id, fn) { wxEVT_COMMAND_COMBOBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TOOL(id, fn) { wxEVT_COMMAND_TOOL_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TOOL_RANGE(id1, id2, fn) { wxEVT_COMMAND_TOOL_CLICKED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TOOL_RCLICKED(id, fn) { wxEVT_COMMAND_TOOL_RCLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TOOL_RCLICKED_RANGE(id1, id2, fn) { wxEVT_COMMAND_TOOL_RCLICKED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TOOL_ENTER(id, fn) { wxEVT_COMMAND_TOOL_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_CHECKLISTBOX(id, fn) { wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, - -// Generic command events -#define EVT_COMMAND_LEFT_CLICK(id, fn) { wxEVT_COMMAND_LEFT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_COMMAND_LEFT_DCLICK(id, fn) { wxEVT_COMMAND_LEFT_DCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_COMMAND_RIGHT_CLICK(id, fn) { wxEVT_COMMAND_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_COMMAND_RIGHT_DCLICK(id, fn) { wxEVT_COMMAND_RIGHT_DCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_COMMAND_SET_FOCUS(id, fn) { wxEVT_COMMAND_SET_FOCUS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_COMMAND_KILL_FOCUS(id, fn) { wxEVT_COMMAND_KILL_FOCUS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, -#define EVT_COMMAND_ENTER(id, fn) { wxEVT_COMMAND_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, - -// Joystick events -#define EVT_JOY_DOWN(func) \ - { wxEVT_JOY_BUTTON_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL }, -#define EVT_JOY_UP(func) \ - { wxEVT_JOY_BUTTON_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL }, -#define EVT_JOY_MOVE(func) \ - { wxEVT_JOY_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL }, -#define EVT_JOY_ZMOVE(func) \ - { wxEVT_JOY_ZMOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL }, - -// All joystick events -#define EVT_JOYSTICK_EVENTS(func) \ - { wxEVT_JOY_BUTTON_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_JOY_BUTTON_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_JOY_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_JOY_ZMOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL },\ - -// Idle event -#define EVT_IDLE(func) \ - { wxEVT_IDLE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxIdleEventFunction) & func, (wxObject *) NULL },\ - -// Update UI event -#define EVT_UPDATE_UI(id, func) \ - { wxEVT_UPDATE_UI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxUpdateUIEventFunction) & func, (wxObject *) NULL },\ - -#endif - // _WX_EVENTH__ diff --git a/include/wx/expr.h b/include/wx/expr.h deleted file mode 100644 index 0ea70c6d85..0000000000 --- a/include/wx/expr.h +++ /dev/null @@ -1,129 +0,0 @@ -/* ////////////////////////////////////////////////////////////////////////// -// Name: expr.h -// Purpose: C helper defines and functions for wxExpr class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -////////////////////////////////////////////////////////////////////////// */ - -#ifndef _WX_EXPRH__ -#define _WX_EXPRH__ - -#include -#include - -#ifdef ____HPUX__ -#define alloca malloc -#endif - -/* Rename all YACC/LEX stuff or we'll conflict with other - * applications - */ - -#define yyback PROIO_yyback -#define yylook PROIO_yylook -#define yywrap PROIO_yywrap -#define yyoutput PROIO_yyoutput -#define yylex PROIO_yylex -#define yyerror PROIO_yyerror -#define input PROIO_input -#define unput PROIO_unput - -#define yyleng PROIO_yyleng -#define yytext PROIO_yytext -#define yymorfg PROIO_yymorfg -#define yylineno PROIO_yylineno -#define yytchar PROIO_yytchar -#define yyin PROIO_yyin -#define yyout PROIO_yyout -#define yysvf PROIO_yysvf -#define yyestate PROIO_yyestate -#define yysvec PROIO_yysvec -#define yybgin PROIO_yybgin -#define yyprevious PROIO_yyprevious -#define yylhs PROIO_yylhs -#define yylen PROIO_yylen -#define yydefred PROIO_yydefred -#define yydgoto PROIO_yydgoto -#define yysindex PROIO_yysindex -#define yyrindex PROIO_yyrindex -#define yygindex PROIO_yygindex -#define yytable PROIO_yytable -#define yycheck PROIO_yycheck -#define yyname PROIO_yyname -#define yyrule PROIO_yyrule -#define yydebug PROIO_yydebug -#define yynerrs PROIO_yynerrs -#define yyerrflag PROIO_yyerrflag -#define yychar PROIO_yychar -#define yyvsp PROIO_yyvsp -#define yyssp PROIO_yyssp -#define yyval PROIO_yyval -#define yylval PROIO_yylval -#define yyss PROIO_yyss -#define yyvs PROIO_yyvs -#define yyparse PROIO_yyparse - -/* +++steve162e: more defines necessary */ -#define yy_init_buffer PROIO_yy_init_buffer -#define yy_create_buffer PROIO_yy_create_buffer -#define yy_load_buffer_state PROIO_yy_load_buffer_state -#define yyrestart PROIO_yyrestart -#define yy_switch_to_buffer PROIO_yy_switch_to_buffer -#define yy_delete_buffer PROIO_yy_delete_buffer -/* ---steve162e */ - -/* WG 1/96: still more for flex 2.5 */ -#define yy_scan_buffer PROIO_scan_buffer -#define yy_scan_string PROIO_scan_string -#define yy_scan_bytes PROIO_scan_bytes -#define yy_flex_debug PROIO_flex_debug -#define yy_flush_buffer PROIO_flush_buffer -#define yyleng PROIO_yyleng -#define yytext PROIO_yytext - -#ifdef __cplusplus -extern "C" { -char *proio_cons(char *, char *); -char * make_integer(char *); -char * make_word(char *); -char * make_string(char *); -char * make_real(char *, char *); -char * make_exp(char *, char *); -char * make_exp2(char *, char *, char*); -void add_expr(char *); -void process_command(char *); -void syntax_error(char *); -} -#else -#if __BORLANDC__ -char *proio_cons(char *, char *); -char * make_integer(char *); -char * make_word(char *); -char * make_string(char *); -char * make_real(char *, char *); -char * make_exp(char *, char *); -char * make_exp2(char *, char *, char*); -void add_expr(char *); -void process_command(char *); -void syntax_error(char *); -#else -char *proio_cons(); -char * make_integer(); -char * make_word(); -char * make_string(); -char * make_real(); -char * make_exp(); -char * make_exp2(); - -void add_expr(); -void process_command(); -void syntax_error(); -#endif -#endif - -#endif - /* _WX_EXPRH__ */ diff --git a/include/wx/file.h b/include/wx/file.h deleted file mode 100644 index 31c2aa6699..0000000000 --- a/include/wx/file.h +++ /dev/null @@ -1,178 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: file.cpp -// Purpose: wxFile - encapsulates low-level "file descriptor" -// wxTempFile - safely replace the old file -// Author: Vadim Zeitlin -// Modified by: -// Created: 29/01/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef __FILEH__ -#define __FILEH__ - -#ifdef __GNUG__ -#pragma interface "file.h" -#endif - -#ifndef WX_PRECOMP - #include "wx/string.h" - #include "wx/filefn.h" -#endif - -// ---------------------------------------------------------------------------- -// constants -// ---------------------------------------------------------------------------- - -// we redefine these constants here because S_IREAD &c are _not_ standard -// however, we do assume that the values correspond to the Unix umask bits -#define wxS_IRUSR 00400 -#define wxS_IWUSR 00200 -#define wxS_IXUSR 00100 - -#define wxS_IRGRP 00040 -#define wxS_IWGRP 00020 -#define wxS_IXGRP 00010 - -#define wxS_IROTH 00004 -#define wxS_IWOTH 00002 -#define wxS_IXOTH 00001 - -// default mode for the new files: corresponds to umask 022 -#define wxS_DEFAULT (wxS_IRUSR | wxS_IWUSR | wxS_IRGRP | wxS_IWGRP |\ - wxS_IROTH | wxS_IWOTH) - -// ---------------------------------------------------------------------------- -// class wxFile: raw file IO -// -// NB: for space efficiency this class has no virtual functions, including -// dtor which is _not_ virtual, so it shouldn't be used as a base class. -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxFile -{ -public: - // more file constants - // ------------------- - // opening mode - enum OpenMode { read, write, read_write, write_append }; - // standard values for file descriptor - enum { fd_invalid = -1, fd_stdin, fd_stdout, fd_stderr }; - - // static functions - // ---------------- - // check whether a regular file by this name exists - static bool Exists(const char *name); - // check whetther we can access the given file in given mode - // (only read and write make sense here) - static bool Access(const char *name, OpenMode mode); - - // ctors - // ----- - // def ctor - wxFile() { m_fd = fd_invalid; } - // open specified file (may fail, use IsOpened()) - wxFile(const char *szFileName, OpenMode mode = read); - // attach to (already opened) file - wxFile(int fd) { m_fd = fd; } - - // open/close - // create a new file (with the default value of bOverwrite, it will fail if - // the file already exists, otherwise it will overwrite it and succeed) - bool Create(const char *szFileName, bool bOverwrite = FALSE, - int access = wxS_DEFAULT); - bool Open(const char *szFileName, OpenMode mode = read, - int access = wxS_DEFAULT); - bool Close(); // Close is a NOP if not opened - - // assign an existing file descriptor and get it back from wxFile object - void Attach(int fd) { Close(); m_fd = fd; } - void Detach() { m_fd = fd_invalid; } - int fd() const { return m_fd; } - - // read/write (unbuffered) - // returns number of bytes read or ofsInvalid on error - off_t Read(void *pBuf, off_t nCount); - // returns true on success - size_t Write(const void *pBuf, size_t nCount); - // returns true on success - bool Write(const wxString& s) { return Write(s.c_str(), s.Len()) != 0; } - // flush data not yet written - bool Flush(); - - // file pointer operations (return ofsInvalid on failure) - // move ptr ofs bytes related to start/current off_t/end of file - off_t Seek(off_t ofs, wxSeekMode mode = wxFromStart); - // move ptr to ofs bytes before the end - off_t SeekEnd(off_t ofs = 0) { return Seek(ofs, wxFromEnd); } - // get current off_t - off_t Tell() const; - // get current file length - off_t Length() const; - - // simple accessors - // is file opened? - bool IsOpened() const { return m_fd != fd_invalid; } - // is end of file reached? - bool Eof() const; - // is an error occured? - bool Error() const { return m_error; } - - // dtor closes the file if opened - virtual ~wxFile(); // Temporally virtual because of wxFileStream: I'll change back in a near future. - -private: - // copy ctor and assignment operator are private because - // it doesn't make sense to copy files this way: - // attempt to do it will provoke a compile-time error. - wxFile(const wxFile&); - wxFile& operator=(const wxFile&); - - int m_fd; // file descriptor or INVALID_FD if not opened - bool m_error; // error memory -}; - -// ---------------------------------------------------------------------------- -// class wxTempFile: if you want to replace another file, create an instance -// of wxTempFile passing the name of the file to be replaced to the ctor. Then -// you can write to wxTempFile and call Commit() function to replace the old -// file (and close this one) or call Discard() to cancel the modification. If -// you call neither of them, dtor will call Discard(). -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxTempFile -{ -public: - // ctors - // default - wxTempFile() { } - // associates the temp file with the file to be replaced and opens it - wxTempFile(const wxString& strName); - - // open the temp file (strName is the name of file to be replaced) - bool Open(const wxString& strName); - - // is the file opened? - bool IsOpened() const { return m_file.IsOpened(); } - - // I/O (both functions return true on success, false on failure) - bool Write(const void *p, size_t n) { return m_file.Write(p, n) != 0; } - bool Write(const wxString& str) { return m_file.Write(str); } - - // different ways to close the file - // validate changes and delete the old file of name m_strName - bool Commit(); - // discard changes - void Discard(); - - // dtor calls Discard() if file is still opened - ~wxTempFile(); - -private: - wxString m_strName, // name of the file to replace in Commit() - m_strTemp; // temporary file name - wxFile m_file; // the temporary file -}; - -#endif - // _WX_FILEH__ diff --git a/include/wx/fileconf.h b/include/wx/fileconf.h deleted file mode 100644 index 4b1dbceaaa..0000000000 --- a/include/wx/fileconf.h +++ /dev/null @@ -1,350 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: fileconf.h -// Purpose: wxFileConfig derivation of wxConfigBase -// Author: Vadim Zeitlin -// Modified by: -// Created: 07.04.98 (adapted from appconf.cpp) -// RCS-ID: $Id$ -// Copyright: (c) 1997 Karsten Ballüder & Vadim Zeitlin -// Ballueder@usa.net -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _FILECONF_H -#define _FILECONF_H - -#ifdef __GNUG__ -#pragma interface "fileconf.h" -#endif - -#include "wx/defs.h" -#include "wx/textfile.h" -#include "wx/string.h" - -// ---------------------------------------------------------------------------- -// compile options -// ---------------------------------------------------------------------------- - -// it won't compile without it anyhow -#ifndef USE_CONFIG - #error "Please define USE_CONFIG or remove fileconf.cpp from your makefile" -#endif // USE_CONFIG - -// ---------------------------------------------------------------------------- -// wxFileConfig -// ---------------------------------------------------------------------------- - -/* - wxFileConfig derives from base Config and implements file based config class, - i.e. it uses ASCII disk files to store the information. These files are - alternatively called INI, .conf or .rc in the documentation. They are - organized in groups or sections, which can nest (i.e. a group contains - subgroups, which contain their own subgroups &c). Each group has some - number of entries, which are "key = value" pairs. More precisely, the format - is: - - # comments are allowed after either ';' or '#' (Win/UNIX standard) - - # blank lines (as above) are ignored - - # global entries are members of special (no name) top group - written_for = Windows - platform = Linux - - # the start of the group 'Foo' - [Foo] # may put comments like this also - # following 3 lines are entries - key = value - another_key = " strings with spaces in the beginning should be quoted, \ - otherwise the spaces are lost" - last_key = but you don't have to put " normally (nor quote them, like here) - - # subgroup of the group 'Foo' - # (order is not important, only the name is: separator is '/', as in paths) - [Foo/Bar] - # entries prefixed with "!" are immutable, i.e. can't be changed if they are - # set in the system-wide config file - !special_key = value - bar_entry = whatever - - [Foo/Bar/Fubar] # depth is (theoretically :-) unlimited - # may have the same name as key in another section - bar_entry = whatever not - - You have {read/write/delete}Entry functions (guess what they do) and also - setCurrentPath to select current group. enum{Subgroups/Entries} allow you - to get all entries in the config file (in the current group). Finally, - flush() writes immediately all changed entries to disk (otherwise it would - be done automatically in dtor) - - wxFileConfig manages not less than 2 config files for each program: global - and local (or system and user if you prefer). Entries are read from both of - them and the local entries override the global ones unless the latter is - immutable (prefixed with '!') in which case a warning message is generated - and local value is ignored. Of course, the changes are always written to local - file only. - - The names of these files can be specified in a number of ways. First of all, - you can use the standard convention: using the ctor which takes 'strAppName' - parameter will probably be sufficient for 90% of cases. If, for whatever - reason you wish to use the files with some other names, you can always use the - second ctor. - - wxFileConfig also may automatically expand the values of environment variables - in the entries it reads: for example, if you have an entry - score_file = $HOME/.score - a call to Read(&str, "score_file") will return a complete path to .score file - unless the expansion was previousle disabled with SetExpandEnvVars(FALSE) call - (it's on by default, the current status can be retrieved with - IsExpandingEnvVars function). -*/ - -class wxFileConfig : public wxConfigBase -{ -public: - // construct the "standard" full name for global (system-wide) and - // local (user-specific) config files from the base file name. - // - // the following are the filenames returned by this functions: - // global local - // Unix /etc/file.ext ~/.file - // Win %windir%\file.ext %USERPROFILE%\file.ext - // - // where file is the basename of szFile, ext is it's extension - // or .conf (Unix) or .ini (Win) if it has none - static wxString GetGlobalFileName(const char *szFile); - static wxString GetLocalFileName(const char *szFile); - - // ctor & dtor - -#if 0 - // the names of local and global (if not disabled) config files are - // constructed using Get{Local|Global}FileName functions described above - // (szAppName is just the (short) name of your application) - wxFileConfig(const char *szAppName, bool bLocalOnly = FALSE); - // this ctor allows you to specify custom names for both files (if strGlobal - // isn't a full path, it's considered to be relative to the standard - // directory, i.e. /etc under Unix and %windir% under Windows, if strLocal - // is not an absolute path, it's considered to be relative to the user's - // directory). If either of strings is empty, the corresponding file is not - // used. - wxFileConfig(const wxString& strLocal, const wxString& strGlobal); -#endif - - // New constructor: one size fits all. Specify wxCONFIG_USE_LOCAL_FILE - // or wxCONFIG_USE_GLOBAL_FILE to say which files should be used. - wxFileConfig(const wxString& appName, const wxString& vendorName = "", - const wxString& localFilename = "", const wxString& globalFilename = "", - long style = wxCONFIG_USE_LOCAL_FILE); - - // dtor will save unsaved data - virtual ~wxFileConfig(); - - // implement inherited pure virtual functions - virtual void SetPath(const wxString& strPath); - virtual const wxString& GetPath() const { return m_strPath; } - - virtual bool GetFirstGroup(wxString& str, long& lIndex) const; - virtual bool GetNextGroup (wxString& str, long& lIndex) const; - virtual bool GetFirstEntry(wxString& str, long& lIndex) const; - virtual bool GetNextEntry (wxString& str, long& lIndex) const; - - virtual size_t GetNumberOfEntries(bool bRecursive = FALSE) const; - virtual size_t GetNumberOfGroups(bool bRecursive = FALSE) const; - - virtual bool HasGroup(const wxString& strName) const; - virtual bool HasEntry(const wxString& strName) const; - - virtual bool Read(const wxString& key, wxString *pStr) const; - virtual bool Read(const wxString& key, wxString *pStr, const wxString& defValue) const; - virtual bool Read(const wxString& key, long *pl) const; - - // The following are necessary to satisfy the compiler - wxString Read(const wxString& key, const wxString& defVal) const - { return wxConfigBase::Read(key, defVal); } - bool Read(const wxString& key, long *pl, long defVal) const - { return wxConfigBase::Read(key, pl, defVal); } - long Read(const wxString& key, long defVal) const - { return wxConfigBase::Read(key, defVal); } - bool Read(const wxString& key, double* val) const - { return wxConfigBase::Read(key, val); } - bool Read(const wxString& key, double* val, double defVal) const - { return wxConfigBase::Read(key, val, defVal); } - - virtual bool Write(const wxString& key, const wxString& szValue); - virtual bool Write(const wxString& key, long lValue); - - virtual bool Flush(bool bCurrentOnly = FALSE); - - virtual bool DeleteEntry(const wxString& key, bool bGroupIfEmptyAlso); - virtual bool DeleteGroup(const wxString& szKey); - virtual bool DeleteAll(); - -public: - // fwd decl - class ConfigGroup; - class ConfigEntry; - - // we store all lines of the local config file as a linked list in memory - class LineList - { - public: - // ctor - LineList(const wxString& str, LineList *pNext = (LineList *) NULL) : m_strLine(str) - { SetNext(pNext); SetPrev((LineList *) NULL); } - - // - LineList *Next() const { return m_pNext; } - LineList *Prev() const { return m_pPrev; } - void SetNext(LineList *pNext) { m_pNext = pNext; } - void SetPrev(LineList *pPrev) { m_pPrev = pPrev; } - - // - void SetText(const wxString& str) { m_strLine = str; } - const wxString& Text() const { return m_strLine; } - - private: - wxString m_strLine; // line contents - LineList *m_pNext, // next node - *m_pPrev; // previous one - }; - - // functions to work with this list - LineList *LineListAppend(const wxString& str); - LineList *LineListInsert(const wxString& str, - LineList *pLine); // NULL => Prepend() - void LineListRemove(LineList *pLine); - bool LineListIsEmpty(); - -private: - // GetXXXFileame helpers: return ('/' terminated) directory names - static wxString GetGlobalDir(); - static wxString GetLocalDir(); - - // common part of all ctors (assumes that m_str{Local|Global}File are already - // initialized - void Init(); - - // common part of from dtor and DeleteAll - void CleanUp(); - - // parse the whole file - void Parse(wxTextFile& file, bool bLocal); - - // the same as SetPath("/") - void SetRootPath(); - - // member variables - // ---------------- - LineList *m_linesHead, // head of the linked list - *m_linesTail; // tail - - wxString m_strLocalFile, // local file name passed to ctor - m_strGlobalFile; // global - wxString m_strPath; // current path (not '/' terminated) - - ConfigGroup *m_pRootGroup, // the top (unnamed) group - *m_pCurrentGroup; // the current group - -//protected: --- if wxFileConfig::ConfigEntry is not public, functions in -// ConfigGroup such as Find/AddEntry can't return "ConfigEntry *" -public: - WX_DEFINE_SORTED_ARRAY(ConfigEntry *, ArrayEntries); - WX_DEFINE_SORTED_ARRAY(ConfigGroup *, ArrayGroups); - - class ConfigEntry - { - private: - ConfigGroup *m_pParent; // group that contains us - wxString m_strName, // entry name - m_strValue; // value - bool m_bDirty, // changed since last read? - m_bImmutable; // can be overriden locally? - int m_nLine; // used if m_pLine == NULL only - LineList *m_pLine; // pointer to our line in the linked list - // or NULL if it was found in global file - - public: - ConfigEntry(ConfigGroup *pParent, const wxString& strName, int nLine); - - // simple accessors - const wxString& Name() const { return m_strName; } - const wxString& Value() const { return m_strValue; } - ConfigGroup *Group() const { return m_pParent; } - bool IsDirty() const { return m_bDirty; } - bool IsImmutable() const { return m_bImmutable; } - bool IsLocal() const { return m_pLine != 0; } - int Line() const { return m_nLine; } - LineList *GetLine() const { return m_pLine; } - - // modify entry attributes - void SetValue(const wxString& strValue, bool bUser = TRUE); - void SetDirty(); - void SetLine(LineList *pLine); - }; - - class ConfigGroup - { - private: - wxFileConfig *m_pConfig; // config object we belong to - ConfigGroup *m_pParent; // parent group (NULL for root group) - ArrayEntries m_aEntries; // entries in this group - ArrayGroups m_aSubgroups; // subgroups - wxString m_strName; // group's name - bool m_bDirty; // if FALSE => all subgroups are not dirty - LineList *m_pLine; // pointer to our line in the linked list - ConfigEntry *m_pLastEntry; // last entry/subgroup of this group in the - ConfigGroup *m_pLastGroup; // local file (we insert new ones after it) - - // DeleteSubgroupByName helper - bool DeleteSubgroup(ConfigGroup *pGroup); - - public: - // ctor - ConfigGroup(ConfigGroup *pParent, const wxString& strName, wxFileConfig *); - - // dtor deletes all entries and subgroups also - ~ConfigGroup(); - - // simple accessors - const wxString& Name() const { return m_strName; } - ConfigGroup *Parent() const { return m_pParent; } - wxFileConfig *Config() const { return m_pConfig; } - bool IsDirty() const { return m_bDirty; } - - bool IsEmpty() const { return Entries().IsEmpty() && Groups().IsEmpty(); } - const ArrayEntries& Entries() const { return m_aEntries; } - const ArrayGroups& Groups() const { return m_aSubgroups; } - - // find entry/subgroup (NULL if not found) - ConfigGroup *FindSubgroup(const char *szName) const; - ConfigEntry *FindEntry (const char *szName) const; - - // delete entry/subgroup, return FALSE if doesn't exist - bool DeleteSubgroupByName(const char *szName); - bool DeleteEntry(const char *szName); - - // create new entry/subgroup returning pointer to newly created element - ConfigGroup *AddSubgroup(const wxString& strName); - ConfigEntry *AddEntry (const wxString& strName, int nLine = NOT_FOUND); - - // will also recursively set parent's dirty flag - void SetDirty(); - void SetLine(LineList *pLine); - - // - wxString GetFullName() const; - - // get the last line belonging to an entry/subgroup of this group - LineList *GetGroupLine(); // line which contains [group] - LineList *GetLastEntryLine(); // after which our subgroups start - LineList *GetLastGroupLine(); // after which the next group starts - - // called by entries/subgroups when they're created/deleted - void SetLastEntry(ConfigEntry *pEntry) { m_pLastEntry = pEntry; } - void SetLastGroup(ConfigGroup *pGroup) { m_pLastGroup = pGroup; } - }; -}; - -#endif //_FILECONF_H - diff --git a/include/wx/filedlg.h b/include/wx/filedlg.h deleted file mode 100644 index cfb3737190..0000000000 --- a/include/wx/filedlg.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_FILEDLG_H_BASE_ -#define _WX_FILEDLG_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/filedlg.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/filedlg.h" -#elif defined(__WXGTK__) -#include "wx/gtk/filedlg.h" -#elif defined(__WXQT__) -#include "wx/qt/filedlg.h" -#elif defined(__WXMAC__) -#include "wx/mac/filedlg.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/filedlg.h" -#endif - -#endif - // _WX_FILEDLG_H_BASE_ diff --git a/include/wx/filefn.h b/include/wx/filefn.h deleted file mode 100644 index c7c5b3ff7f..0000000000 --- a/include/wx/filefn.h +++ /dev/null @@ -1,208 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: filefn.h -// Purpose: File- and directory-related functions -// Author: Julian Smart -// Modified by: -// Created: 29/01/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _FILEFN_H_ -#define _FILEFN_H_ - -#ifdef __GNUG__ -#pragma interface "filefn.h" -#endif - -#include - -// ---------------------------------------------------------------------------- -// constants -// ---------------------------------------------------------------------------- - -// define off_t -#include - -#ifdef _MSC_VER - #define off_t _off_t -#endif - -const off_t wxInvalidOffset = (off_t)-1; - -typedef enum { - wxFromStart, - wxFromCurrent, - wxFromEnd -} wxSeekMode; - -// ---------------------------------------------------------------------------- -// functions -// ---------------------------------------------------------------------------- -bool WXDLLEXPORT wxFileExists(const wxString& filename); -#define FileExists wxFileExists - -// does the path exist? (may have or not '/' or '\\' at the end) -bool WXDLLEXPORT wxPathExists(const char *pszPathName); - -#define wxDirExists wxPathExists -#define DirExists wxDirExists - -bool WXDLLEXPORT wxIsAbsolutePath(const wxString& filename); -#define IsAbsolutePath wxIsAbsolutePath - -// Get filename -char* WXDLLEXPORT wxFileNameFromPath(char *path); -wxString WXDLLEXPORT wxFileNameFromPath(const wxString& path); -#define FileNameFromPath wxFileNameFromPath - -// Get directory -char* WXDLLEXPORT wxPathOnly(char *path); -wxString WXDLLEXPORT wxPathOnly(const wxString& path); -#define PathOnly wxPathOnly - -// wxString version -wxString WXDLLEXPORT wxRealPath(const wxString& path); - -void WXDLLEXPORT wxDos2UnixFilename(char *s); -#define Dos2UnixFilename wxDos2UnixFilename - -void WXDLLEXPORT wxUnix2DosFilename(char *s); -#define Unix2DosFilename wxUnix2DosFilename - -// Strip the extension, in situ -void WXDLLEXPORT wxStripExtension(char *buffer); -void WXDLLEXPORT wxStripExtension(wxString& buffer); - -// Get a temporary filename, opening and closing the file. -char* WXDLLEXPORT wxGetTempFileName(const wxString& prefix, char *buf = (char *) NULL); - -// Expand file name (~/ and ${OPENWINHOME}/ stuff) -char* WXDLLEXPORT wxExpandPath(char *dest, const char *path); - -// Contract w.r.t environment ( -> ${OPENWINHOME}/lib) -// and make (if under the home tree) relative to home -// [caller must copy-- volatile] -char* WXDLLEXPORT wxContractPath (const wxString& filename, - const wxString& envname = "", const wxString& user = ""); - -// Destructive removal of /./ and /../ stuff -char* WXDLLEXPORT wxRealPath(char *path); - -// Allocate a copy of the full absolute path -char* WXDLLEXPORT wxCopyAbsolutePath(const wxString& path); - -// Get first file name matching given wild card. -// Flags are reserved for future use. -#define wxFILE 1 -#define wxDIR 2 -char* WXDLLEXPORT wxFindFirstFile(const char *spec, int flags = wxFILE); -char* WXDLLEXPORT wxFindNextFile(void); - -// Does the pattern contain wildcards? -bool WXDLLEXPORT wxIsWild(const wxString& pattern); - -// Does the pattern match the text (usually a filename)? -// If dot_special is TRUE, doesn't match * against . (eliminating -// `hidden' dot files) -bool WXDLLEXPORT wxMatchWild(const wxString& pattern, const wxString& text, bool dot_special = TRUE); - -// Concatenate two files to form third -bool WXDLLEXPORT wxConcatFiles(const wxString& file1, const wxString& file2, const wxString& file3); - -// Copy file1 to file2 -bool WXDLLEXPORT wxCopyFile(const wxString& file1, const wxString& file2); - -// Remove file -bool WXDLLEXPORT wxRemoveFile(const wxString& file); - -// Rename file -bool WXDLLEXPORT wxRenameFile(const wxString& file1, const wxString& file2); - -// Get current working directory. -// If buf is NULL, allocates space using new, else -// copies into buf. -// IMPORTANT NOTE getcwd is know not to work under some releases -// of Win32s 1.3, according to MS release notes! -char* WXDLLEXPORT wxGetWorkingDirectory(char *buf = (char *) NULL, int sz = 1000); - -// Set working directory -bool WXDLLEXPORT wxSetWorkingDirectory(const wxString& d); - -// Make directory -bool WXDLLEXPORT wxMkdir(const wxString& dir); - -// Remove directory. Flags reserved for future use. -bool WXDLLEXPORT wxRmdir(const wxString& dir, int flags = 0); - -// separators in file names -#define FILE_SEP_EXT '.' -#define FILE_SEP_DSK ':' -#define FILE_SEP_PATH_DOS '\\' -#define FILE_SEP_PATH_UNIX '/' - -// separator in the path list (as in PATH environment variable) -// NB: these are strings and not characters on purpose! -#define PATH_SEP_DOS ";" -#define PATH_SEP_UNIX ":" - -// platform independent versions -#ifdef __UNIX__ - #define FILE_SEP_PATH FILE_SEP_PATH_UNIX - #define PATH_SEP PATH_SEP_UNIX -#else // Windows - #define FILE_SEP_PATH FILE_SEP_PATH_DOS - #define PATH_SEP PATH_SEP_DOS -#endif // Unix/Windows - -// this is useful for wxString::IsSameAs(): to compare two file names use -// filename1.IsSameAs(filename2, wxARE_FILENAMES_CASE_SENSITIVE) -#ifdef __UNIX__ - #define wxARE_FILENAMES_CASE_SENSITIVE TRUE -#else // Windows - #define wxARE_FILENAMES_CASE_SENSITIVE FALSE -#endif // Unix/Windows - -// is the char a path separator? -inline bool wxIsPathSeparator(char c) - { return c == FILE_SEP_PATH_DOS || c == FILE_SEP_PATH_UNIX; } - -// does the string ends with path separator? -bool WXDLLEXPORT wxEndsWithPathSeparator(const char *pszFileName); - -// split the full path into path (including drive for DOS), name and extension -// (understands both '/' and '\\') -void WXDLLEXPORT wxSplitPath(const char *pszFileName, - wxString *pstrPath, - wxString *pstrName, - wxString *pstrExt); - -// find a file in a list of directories, returns false if not found -bool WXDLLEXPORT wxFindFileInPath(wxString *pStr, const char *pszPath, const char *pszFile); - -// ---------------------------------------------------------------------------- -// classes -// ---------------------------------------------------------------------------- - -// Path searching -class WXDLLEXPORT wxPathList: public wxStringList -{ - DECLARE_DYNAMIC_CLASS(wxPathList) - - public: - void AddEnvList(const wxString& envVariable); // Adds all paths in environment variable - void Add(const wxString& path); - wxString FindValidPath(const wxString& filename); // Find the first full path - // for which the file exists - wxString FindAbsoluteValidPath(const wxString& filename); // Find the first full path - // for which the file exists; ensure it's an absolute - // path that gets returned. - void EnsureFileAccessible(const wxString& path); // Given full path and filename, - // add path to list - bool Member(const wxString& path); -}; - -#endif - // _WX_FILEFN_H_ - diff --git a/include/wx/font.h b/include/wx/font.h deleted file mode 100644 index 165c9c9f06..0000000000 --- a/include/wx/font.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_FONT_H_BASE_ -#define _WX_FONT_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/font.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/font.h" -#elif defined(__WXGTK__) -#include "wx/gtk/font.h" -#elif defined(__WXQT__) -#include "wx/qt/font.h" -#elif defined(__WXMAC__) -#include "wx/mac/font.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/font.h" -#endif - -#endif - // _WX_FONT_H_BASE_ diff --git a/include/wx/fontdlg.h b/include/wx/fontdlg.h deleted file mode 100644 index 20445e8842..0000000000 --- a/include/wx/fontdlg.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef _WX_FONTDLG_H_BASE_ -#define _WX_FONTDLG_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/fontdlg.h" -#elif defined(__WXMOTIF__) -#include "wx/generic/fontdlgg.h" -# define wxFontDialog wxGenericFontDialog -# define classwxFontDialog classwxGenericFontDialog -#elif defined(__WXGTK__) -#include "wx/generic/fontdlgg.h" -# define wxFontDialog wxGenericFontDialog -# define classwxFontDialog classwxGenericFontDialog -#elif defined(__WXQT__) -#include "wx/generic/fontdlgg.h" -# define wxFontDialog wxGenericFontDialog -# define classwxFontDialog classwxGenericFontDialog -#elif defined(__WXMAC__) -#include "wx/generic/fontdlgg.h" -# define wxFontDialog wxGenericFontDialog -# define classwxFontDialog classwxGenericFontDialog -#elif defined(__WXSTUBS__) -#include "wx/generic/fontdlgg.h" -# define wxFontDialog wxGenericFontDialog -# define classwxFontDialog classwxGenericFontDialog -#endif - -#endif - // _WX_FONTDLG_H_BASE_ diff --git a/include/wx/frame.h b/include/wx/frame.h deleted file mode 100644 index 329561fd9a..0000000000 --- a/include/wx/frame.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_FRAME_H_BASE_ -#define _WX_FRAME_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/frame.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/frame.h" -#elif defined(__WXGTK__) -#include "wx/gtk/frame.h" -#elif defined(__WXQT__) -#include "wx/qt/frame.h" -#elif defined(__WXMAC__) -#include "wx/mac/frame.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/frame.h" -#endif - -#endif - // _WX_FRAME_H_BASE_ diff --git a/include/wx/fstream.h b/include/wx/fstream.h deleted file mode 100644 index eab87dab21..0000000000 --- a/include/wx/fstream.h +++ /dev/null @@ -1,65 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: fstream.h -// Purpose: File stream classes -// Author: Guilhem Lavaux -// Modified by: -// Created: 11/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Guilhem Lavaux -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// -#ifndef _WX_WXFSTREAM_H__ -#define _WX_WXFSTREAM_H__ - -#include -#include -#include -#include - -class wxFileInputStream: public wxInputStream, virtual public wxFile { - public: - wxFileInputStream(const wxString& fileName); - virtual ~wxFileInputStream(); - - virtual char Peek(); - - virtual bool Eof() const { return wxFile::Eof(); } - - bool Ok() const { return wxFile::IsOpened(); } - - protected: - wxFileInputStream() {} - - size_t DoRead(void *buffer, size_t size); - off_t DoSeekInput(off_t pos, wxSeekMode mode); - off_t DoTellInput() const; -}; - -class wxFileOutputStream: public wxOutputStream, virtual public wxFile { - public: - wxFileOutputStream(const wxString& fileName); - virtual ~wxFileOutputStream(); - - // To solve an ambiguity on GCC - inline wxOutputStream& Write(const void *buffer, size_t size) - { return wxOutputStream::Write(buffer, size); } - - void Sync(); - - bool Ok() const { return wxFile::IsOpened(); } - - protected: - wxFileOutputStream() {} - - size_t DoWrite(const void *buffer, size_t size); - off_t DoSeekOutput(off_t pos, wxSeekMode mode); - off_t DoTellOutput() const; -}; - -class wxFileStream: public wxFileInputStream, public wxFileOutputStream { - public: - wxFileStream(const wxString& fileName); - virtual ~wxFileStream(); -}; - -#endif diff --git a/include/wx/gauge.h b/include/wx/gauge.h deleted file mode 100644 index abf8a1f7e0..0000000000 --- a/include/wx/gauge.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_GAUGE_H_BASE_ -#define _WX_GAUGE_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/gauge.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/gauge.h" -#elif defined(__WXGTK__) -#include "wx/gtk/gauge.h" -#elif defined(__WXQT__) -#include "wx/qt/gauge.h" -#elif defined(__WXMAC__) -#include "wx/mac/gauge.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/gauge.h" -#endif - -#endif - // _WX_GAUGE_H_BASE_ diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h deleted file mode 100644 index 17517cce8a..0000000000 --- a/include/wx/gdicmn.h +++ /dev/null @@ -1,356 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gdicmn.h -// Purpose: Common GDI classes, types and declarations -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_GDICMNH__ -#define _WX_GDICMNH__ - -#ifdef __GNUG__ -#pragma interface "gdicmn.h" -#endif - -#include "wx/object.h" -#include "wx/list.h" -#include "wx/hash.h" -#include "wx/string.h" -#include "wx/setup.h" -#include "wx/colour.h" - -// Standard cursors -typedef enum { - wxCURSOR_ARROW = 1, - wxCURSOR_BULLSEYE, - wxCURSOR_CHAR, - wxCURSOR_CROSS, - wxCURSOR_HAND, - wxCURSOR_IBEAM, - wxCURSOR_LEFT_BUTTON, - wxCURSOR_MAGNIFIER, - wxCURSOR_MIDDLE_BUTTON, - wxCURSOR_NO_ENTRY, - wxCURSOR_PAINT_BRUSH, - wxCURSOR_PENCIL, - wxCURSOR_POINT_LEFT, - wxCURSOR_POINT_RIGHT, - wxCURSOR_QUESTION_ARROW, - wxCURSOR_RIGHT_BUTTON, - wxCURSOR_SIZENESW, - wxCURSOR_SIZENS, - wxCURSOR_SIZENWSE, - wxCURSOR_SIZEWE, - wxCURSOR_SIZING, - wxCURSOR_SPRAYCAN, - wxCURSOR_WAIT, - wxCURSOR_WATCH, - wxCURSOR_BLANK -#ifdef __X__ - /* Not yet implemented for Windows */ - , wxCURSOR_CROSS_REVERSE, - wxCURSOR_DOUBLE_ARROW, - wxCURSOR_BASED_ARROW_UP, - wxCURSOR_BASED_ARROW_DOWN -#endif -} _standard_cursors_t; - -class WXDLLEXPORT wxSize -{ -public: - long x; - long y; - inline wxSize() { x = 0; y = 0; } - inline wxSize(long xx, long yy) { x = xx; y = yy; } - inline wxSize(const wxSize& sz) { x = sz.x; y = sz.y; } - inline void operator = (const wxSize& sz) { x = sz.x; y = sz.y; } - inline wxSize operator + (const wxSize& sz) { return wxSize(x + sz.x, y + sz.y); } - inline wxSize operator - (const wxSize& sz) { return wxSize(x - sz.x, y - sz.y); } - inline void Set(long xx, long yy) { x = xx; y = yy; } - inline long GetX() const { return x; } - inline long GetY() const { return y; } -}; - -// Point -class WXDLLEXPORT wxRealPoint -{ - public: - double x; - double y; - inline wxRealPoint() { x = 0.0; y = 0.0; }; - inline wxRealPoint(double _x, double _y) { x = _x; y = _y; }; - inline wxRealPoint operator + (const wxRealPoint& pt) { return wxRealPoint(x + pt.x, y + pt.y); } - inline wxRealPoint operator - (const wxRealPoint& pt) { return wxRealPoint(x - pt.x, y - pt.y); } - - inline void operator = (const wxRealPoint& pt) { x = pt.x; y = pt.y; } -}; - -class WXDLLEXPORT wxPoint -{ - public: -#if defined(__WXMSW__) && !defined(__WIN32__) - int x; - int y; -#else - long x; - long y; -#endif - - inline wxPoint() { x = 0; y = 0; }; - wxPoint(long the_x, long the_y) { x = the_x; y = the_y; }; - wxPoint(const wxPoint& pt) { x = pt.x; y = pt.y; }; - - inline void operator = (const wxPoint& pt) { x = pt.x; y = pt.y; } - inline wxPoint operator + (const wxPoint& pt) { return wxPoint(x + pt.x, y + pt.y); } - inline wxPoint operator - (const wxPoint& pt) { return wxPoint(x - pt.x, y - pt.y); } -}; - -#if WXWIN_COMPATIBILITY -#define wxIntPoint wxPoint -#define wxRectangle wxRect -#endif - -class WXDLLEXPORT wxRect -{ -public: - wxRect() ; - wxRect(long x, long y, long w, long h); - wxRect(const wxPoint& topLeft, const wxPoint& bottomRight); - wxRect(const wxPoint& pos, const wxSize& size); - wxRect(const wxRect& rect); - - inline long GetX() const { return x; } - inline void SetX(long X) { x = X; } - inline long GetY() const { return y; } - inline void SetY(long Y) { y = Y; } - inline long GetWidth() const { return width; } - inline void SetWidth(long w) { width = w; } - inline long GetHeight() const { return height; } - inline void SetHeight(long h) { height = h; } - - inline wxPoint GetPosition() { return wxPoint(x, y); } - inline wxSize GetSize() { return wxSize(width, height); } - - inline long GetLeft() const { return x; } - inline long GetTop() const { return y; } - inline long GetBottom() const { return y + height; } - inline long GetRight() const { return x + width; } - - wxRect& operator = (const wxRect& rect); - bool operator == (const wxRect& rect); - bool operator != (const wxRect& rect); -public: - long x, y, width, height; -}; - -class WXDLLEXPORT wxBrush; -class WXDLLEXPORT wxPen; -class WXDLLEXPORT wxBitmap; -class WXDLLEXPORT wxIcon; -class WXDLLEXPORT wxCursor; -class WXDLLEXPORT wxFont; -class WXDLLEXPORT wxPalette; -class WXDLLEXPORT wxPalette; - -/* - * Bitmap flags - */ - -// Hint to indicate filetype -#define wxBITMAP_TYPE_BMP 1 -#define wxBITMAP_TYPE_BMP_RESOURCE 2 -#define wxBITMAP_TYPE_ICO 3 -#define wxBITMAP_TYPE_ICO_RESOURCE 4 -#define wxBITMAP_TYPE_CUR 5 -#define wxBITMAP_TYPE_CUR_RESOURCE 6 -#define wxBITMAP_TYPE_XBM 7 -#define wxBITMAP_TYPE_XBM_DATA 8 -#define wxBITMAP_TYPE_XPM 9 -#define wxBITMAP_TYPE_XPM_DATA 10 -#define wxBITMAP_TYPE_TIF 11 -#define wxBITMAP_TYPE_TIF_RESOURCE 12 -#define wxBITMAP_TYPE_GIF 13 -#define wxBITMAP_TYPE_GIF_RESOURCE 14 -#define wxBITMAP_TYPE_PNG 15 -#define wxBITMAP_TYPE_PNG_RESOURCE 16 -#define wxBITMAP_TYPE_ANY 50 - -#define wxBITMAP_TYPE_RESOURCE wxBITMAP_TYPE_BMP_RESOURCE - -class WXDLLEXPORT wxBitmap; -class WXDLLEXPORT wxCursor; -class WXDLLEXPORT wxIcon; -class WXDLLEXPORT wxColour; -class WXDLLEXPORT wxString; - -// Management of pens, brushes and fonts -class WXDLLEXPORT wxPenList: public wxList -{ - DECLARE_DYNAMIC_CLASS(wxPenList) - public: - inline wxPenList() - { } - ~wxPenList(); - void AddPen(wxPen *pen); - void RemovePen(wxPen *pen); - wxPen *FindOrCreatePen(const wxColour& colour, int width, int style); - wxPen *FindOrCreatePen(const wxString& colour, int width, int style); -}; - -class WXDLLEXPORT wxBrushList: public wxList -{ - DECLARE_DYNAMIC_CLASS(wxBrushList) - public: - inline wxBrushList() - { } - ~wxBrushList(); - void AddBrush(wxBrush *brush); - void RemoveBrush(wxBrush *brush); - wxBrush *FindOrCreateBrush(const wxColour& colour, int style); - wxBrush *FindOrCreateBrush(const wxString& colour, int style); -}; - -WXDLLEXPORT_DATA(extern const char*) wxEmptyString; - -class WXDLLEXPORT wxFontList: public wxList -{ - DECLARE_DYNAMIC_CLASS(wxFontList) - public: - inline wxFontList() - { } - ~wxFontList(); - void AddFont(wxFont *font); - void RemoveFont(wxFont *font); - wxFont *FindOrCreateFont(int pointSize, int family, int style, int weight, - bool underline = FALSE, const wxString& face = wxEmptyString); -}; - -class WXDLLEXPORT wxColourDatabase: public wxList -{ - DECLARE_CLASS(wxColourDatabase) - public: - wxColourDatabase(int type); - ~wxColourDatabase() ; - // Not const because it may add a name to the database - wxColour *FindColour(const wxString& colour) ; - wxString FindName(const wxColour& colour) const; - void Initialize(); -}; - -class WXDLLEXPORT wxBitmapList: public wxList -{ - DECLARE_DYNAMIC_CLASS(wxBitmapList) - public: - wxBitmapList(); - ~wxBitmapList(); - - void AddBitmap(wxBitmap *bitmap); - void RemoveBitmap(wxBitmap *bitmap); -}; - -// Lists of GDI objects -WXDLLEXPORT_DATA(extern wxPenList*) wxThePenList; -WXDLLEXPORT_DATA(extern wxBrushList*) wxTheBrushList; -WXDLLEXPORT_DATA(extern wxFontList*) wxTheFontList; -WXDLLEXPORT_DATA(extern wxBitmapList*) wxTheBitmapList; - -// Stock objects -WXDLLEXPORT_DATA(extern wxFont*) wxNORMAL_FONT; -WXDLLEXPORT_DATA(extern wxFont*) wxSMALL_FONT; -WXDLLEXPORT_DATA(extern wxFont*) wxITALIC_FONT; -WXDLLEXPORT_DATA(extern wxFont*) wxSWISS_FONT; - -WXDLLEXPORT_DATA(extern wxPen*) wxRED_PEN; -WXDLLEXPORT_DATA(extern wxPen*) wxCYAN_PEN; -WXDLLEXPORT_DATA(extern wxPen*) wxGREEN_PEN; -WXDLLEXPORT_DATA(extern wxPen*) wxBLACK_PEN; -WXDLLEXPORT_DATA(extern wxPen*) wxWHITE_PEN; -WXDLLEXPORT_DATA(extern wxPen*) wxTRANSPARENT_PEN; -WXDLLEXPORT_DATA(extern wxPen*) wxBLACK_DASHED_PEN; -WXDLLEXPORT_DATA(extern wxPen*) wxGREY_PEN; -WXDLLEXPORT_DATA(extern wxPen*) wxMEDIUM_GREY_PEN; -WXDLLEXPORT_DATA(extern wxPen*) wxLIGHT_GREY_PEN; - -WXDLLEXPORT_DATA(extern wxBrush*) wxBLUE_BRUSH; -WXDLLEXPORT_DATA(extern wxBrush*) wxGREEN_BRUSH; -WXDLLEXPORT_DATA(extern wxBrush*) wxWHITE_BRUSH; -WXDLLEXPORT_DATA(extern wxBrush*) wxBLACK_BRUSH; -WXDLLEXPORT_DATA(extern wxBrush*) wxGREY_BRUSH; -WXDLLEXPORT_DATA(extern wxBrush*) wxMEDIUM_GREY_BRUSH; -WXDLLEXPORT_DATA(extern wxBrush*) wxLIGHT_GREY_BRUSH; -WXDLLEXPORT_DATA(extern wxBrush*) wxTRANSPARENT_BRUSH; -WXDLLEXPORT_DATA(extern wxBrush*) wxCYAN_BRUSH; -WXDLLEXPORT_DATA(extern wxBrush*) wxRED_BRUSH; - -WXDLLEXPORT_DATA(extern wxColour*) wxBLACK; -WXDLLEXPORT_DATA(extern wxColour*) wxWHITE; -WXDLLEXPORT_DATA(extern wxColour*) wxRED; -WXDLLEXPORT_DATA(extern wxColour*) wxBLUE; -WXDLLEXPORT_DATA(extern wxColour*) wxGREEN; -WXDLLEXPORT_DATA(extern wxColour*) wxCYAN; -WXDLLEXPORT_DATA(extern wxColour*) wxLIGHT_GREY; - -// 'Null' objects -WXDLLEXPORT_DATA(extern wxBitmap) wxNullBitmap; -WXDLLEXPORT_DATA(extern wxIcon) wxNullIcon; -WXDLLEXPORT_DATA(extern wxCursor) wxNullCursor; -WXDLLEXPORT_DATA(extern wxPen) wxNullPen; -WXDLLEXPORT_DATA(extern wxBrush) wxNullBrush; -WXDLLEXPORT_DATA(extern wxPalette) wxNullPalette; -WXDLLEXPORT_DATA(extern wxFont) wxNullFont; -WXDLLEXPORT_DATA(extern wxColour) wxNullColour; - -// Stock cursors types -WXDLLEXPORT_DATA(extern wxCursor*) wxSTANDARD_CURSOR; -WXDLLEXPORT_DATA(extern wxCursor*) wxHOURGLASS_CURSOR; -WXDLLEXPORT_DATA(extern wxCursor*) wxCROSS_CURSOR; - -WXDLLEXPORT_DATA(extern wxColourDatabase*) wxTheColourDatabase; -extern void WXDLLEXPORT wxInitializeStockObjects(); -extern void WXDLLEXPORT wxInitializeStockLists(); -extern void WXDLLEXPORT wxDeleteStockObjects(); -extern void WXDLLEXPORT wxDeleteStockLists(); - -extern bool WXDLLEXPORT wxColourDisplay(); - -// Returns depth of screen -extern int WXDLLEXPORT wxDisplayDepth(); -#define wxGetDisplayDepth wxDisplayDepth - -extern void WXDLLEXPORT wxDisplaySize(int *width, int *height); -extern wxSize WXDLLEXPORT wxGetDisplaySize(); - -extern void WXDLLEXPORT wxSetCursor(const wxCursor& cursor); - -// Useful macro for create icons portably - -#ifdef __WXMSW__ -# define wxICON(X) wxIcon(X##_icon); -#elif defined(__X__) -# define wxICON(X) wxIcon(X##_bits, X##_width, X##_height); -#else -# define wxICON wxIcon -#endif - -/* - Example: - #define wxbuild_icon "wxbuild" - - wxIcon *icon = new wxICON(wxbuild); - */ - -class WXDLLEXPORT wxResourceCache: public wxList -{ - DECLARE_DYNAMIC_CLASS(wxResourceCache) - public: - wxResourceCache(); - wxResourceCache(const unsigned int the_key_type); - ~wxResourceCache(); -}; - -#endif - // _WX_GDICMNH__ diff --git a/include/wx/gdiobj.h b/include/wx/gdiobj.h deleted file mode 100644 index 39762ec749..0000000000 --- a/include/wx/gdiobj.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_GDIOBJ_H_BASE_ -#define _WX_GDIOBJ_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/gdiobj.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/gdiobj.h" -#elif defined(__WXGTK__) -#include "wx/gtk/gdiobj.h" -#elif defined(__WXQT__) -#include "wx/qt/gdiobj.h" -#elif defined(__WXMAC__) -#include "wx/mac/gdiobj.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/gdiobj.h" -#endif - -#endif - // _WX_GDIOBJ_H_BASE_ diff --git a/include/wx/generic/choicdgg.h b/include/wx/generic/choicdgg.h deleted file mode 100644 index 0fbf506718..0000000000 --- a/include/wx/generic/choicdgg.h +++ /dev/null @@ -1,102 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: choicdgg.h -// Purpose: Generic choice dialogs -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __CHOICEDLGH_G__ -#define __CHOICEDLGH_G__ - -#ifdef __GNUG__ -#pragma interface "choicdgg.h" -#endif - -#include "wx/setup.h" -#include "wx/dialog.h" - -#define wxCHOICE_HEIGHT 150 -#define wxCHOICE_WIDTH 200 - -#define wxID_LISTBOX 3000 - -class WXDLLEXPORT wxSingleChoiceDialog: public wxDialog -{ -DECLARE_DYNAMIC_CLASS(wxSingleChoiceDialog) -public: - wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, - int n, const wxString *choices, char **clientData = (char **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); - - wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, - const wxStringList& choices, char **clientData = (char **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); - - bool Create(wxWindow *parent, const wxString& message, const wxString& caption, - int n, const wxString *choices, char **clientData = (char **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); - bool Create(wxWindow *parent, const wxString& message, const wxString& caption, - const wxStringList& choices, char **clientData = (char **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); - - void SetSelection(int sel) ; - inline int GetSelection(void) const { return m_selection; } - inline wxString GetStringSelection(void) const { return m_stringSelection; } - inline char *GetSelectionClientData(void) const { return m_clientData; } - - void OnOK(wxCommandEvent& event); - void OnListBoxDClick(wxCommandEvent& event); - -DECLARE_EVENT_TABLE() - -protected: - long m_dialogStyle; - int m_selection; - wxString m_stringSelection; - char* m_clientData; -}; - -wxString WXDLLEXPORT wxGetSingleChoice(const wxString& message, const wxString& caption, - int n, const wxString *choices, wxWindow *parent = (wxWindow *) NULL, - int x = -1, int y = -1, bool centre = TRUE, - int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); - -wxString WXDLLEXPORT wxGetSingleChoice(const wxString& message, const wxString& caption, - int n, char *choices[], wxWindow *parent = (wxWindow *) NULL, - int x = -1, int y = -1, bool centre = TRUE, - int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); - -// Same as above but gets position in list of strings, instead of string, -// or -1 if no selection -int WXDLLEXPORT wxGetSingleChoiceIndex(const wxString& message, const wxString& caption, - int n, const wxString *choices, wxWindow *parent = (wxWindow *) NULL, - int x = -1, int y = -1, bool centre = TRUE, - int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); - -int WXDLLEXPORT wxGetSingleChoiceIndex(const wxString& message, const wxString& caption, - int n, char *choices[], wxWindow *parent = (wxWindow *) NULL, - int x = -1, int y = -1, bool centre = TRUE, - int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); - -// Return client data instead -char* WXDLLEXPORT wxGetSingleChoiceData(const wxString& message, const wxString& caption, - int n, const wxString *choices, char **client_data, - wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1, - bool centre = TRUE, - int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); - -char* WXDLLEXPORT wxGetSingleChoiceData(const wxString& message, const wxString& caption, - int n, char *choices[], char **client_data, - wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1, - bool centre = TRUE, - int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); - -/* -int WXDLLEXPORT wxGetMultipleChoice(const wxString& message, const wxString& caption, - int n, const wxString *choices, - int nsel, int * selection, - wxWindow *parent = NULL, int x = -1 , int y = -1, bool centre = TRUE, - int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); -*/ - -#endif diff --git a/include/wx/generic/colrdlgg.h b/include/wx/generic/colrdlgg.h deleted file mode 100644 index 23fac19e1a..0000000000 --- a/include/wx/generic/colrdlgg.h +++ /dev/null @@ -1,123 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: colrdlgg.h -// Purpose: wxGenericColourDialog -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __COLORDLGH_G__ -#define __COLORDLGH_G__ - -#ifdef __GNUG__ -#pragma interface "colrdlgg.h" -#endif - -#include "wx/setup.h" -#include "wx/gdicmn.h" -#include "wx/dialog.h" -#include "wx/cmndata.h" - -#define wxID_ADD_CUSTOM 3000 -#define wxID_RED_SLIDER 3001 -#define wxID_GREEN_SLIDER 3002 -#define wxID_BLUE_SLIDER 3003 - -class WXDLLEXPORT wxSlider; -class WXDLLEXPORT wxGenericColourDialog: public wxDialog -{ - DECLARE_DYNAMIC_CLASS(wxGenericColourDialog) - protected: - wxColourData colourData; - wxWindow *dialogParent; - - // Area reserved for grids of colours - wxRectangle standardColoursRect; - wxRectangle customColoursRect; - wxRectangle singleCustomColourRect; - - // Size of each colour rectangle - wxIntPoint smallRectangleSize; - - // For single customizable colour - wxIntPoint customRectangleSize; - - // Grid spacing (between rectangles) - int gridSpacing; - - // Section spacing (between left and right halves of dialog box) - int sectionSpacing; - - // 48 'standard' colours - wxColour standardColours[48]; - - // 16 'custom' colours - wxColour customColours[16]; - - // One single custom colour (use sliders) - wxColour singleCustomColour; - - // Which colour is selected? An index into one of the two areas. - int colourSelection; - int whichKind; // 1 for standard colours, 2 for custom colours, - - wxSlider *redSlider; - wxSlider *greenSlider; - wxSlider *blueSlider; - - int buttonY; - - int okButtonX; - int customButtonX; - -// static bool colourDialogCancelled; - public: - wxGenericColourDialog(void); - wxGenericColourDialog(wxWindow *parent, wxColourData *data = (wxColourData *) NULL); - ~wxGenericColourDialog(void); - - bool Create(wxWindow *parent, wxColourData *data = (wxColourData *) NULL); - - int ShowModal(void); - wxColourData GetColourData(void) { return colourData; } - - // Internal functions - void OnMouseEvent(wxMouseEvent& event); - void OnPaint(wxPaintEvent& event); - - bool OnClose(void); - - virtual void CalculateMeasurements(void); - virtual void CreateWidgets(void); - virtual void InitializeColours(void); - - virtual void PaintBasicColours(wxDC& dc); - virtual void PaintCustomColours(wxDC& dc); - virtual void PaintCustomColour(wxDC& dc); - virtual void PaintHighlight(wxDC& dc, bool draw); - - virtual void OnBasicColourClick(int which); - virtual void OnCustomColourClick(int which); - -/* - virtual void OnOk(void); - virtual void OnCancel(void); - virtual void OnAddCustom(void); -*/ - void OnAddCustom(wxCommandEvent& event); - - void OnRedSlider(wxCommandEvent& event); - void OnGreenSlider(wxCommandEvent& event); - void OnBlueSlider(wxCommandEvent& event); - -DECLARE_EVENT_TABLE() -}; - -#ifdef __WXGTK__ -typedef wxGenericColourDialog wxColourDialog; -#endif - -#endif diff --git a/include/wx/generic/fontdlgg.h b/include/wx/generic/fontdlgg.h deleted file mode 100644 index c8a6e76c09..0000000000 --- a/include/wx/generic/fontdlgg.h +++ /dev/null @@ -1,95 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: fontdlgg.h -// Purpose: wxGenericFontDialog -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __FONTDLGH_G__ -#define __FONTDLGH_G__ - -#ifdef __GNUG__ -#pragma interface "fontdlgg.h" -#endif - -#include "wx/setup.h" -#include "wx/gdicmn.h" -#include "wx/font.h" -#include "wx/dialog.h" -#include "wx/cmndata.h" - -/* - * FONT DIALOG - */ - -class WXDLLEXPORT wxChoice; -class WXDLLEXPORT wxText; -class WXDLLEXPORT wxCheckBox; - -#define wxID_FONT_UNDERLINE 3000 -#define wxID_FONT_STYLE 3001 -#define wxID_FONT_WEIGHT 3002 -#define wxID_FONT_FAMILY 3003 -#define wxID_FONT_COLOUR 3004 -#define wxID_FONT_SIZE 3005 - -class WXDLLEXPORT wxGenericFontDialog: public wxDialog -{ - DECLARE_DYNAMIC_CLASS(wxGenericFontDialog) - protected: - wxFontData fontData; - wxFont dialogFont; - wxWindow *dialogParent; - - // Area reserved for font display - wxRectangle fontRect; - - wxChoice *familyChoice; - wxChoice *styleChoice; - wxChoice *weightChoice; - wxChoice *colourChoice; - wxCheckBox *underLineCheckBox; - wxChoice *pointSizeChoice; - bool m_useEvents; - -// static bool fontDialogCancelled; - public: - - wxGenericFontDialog(void); - wxGenericFontDialog(wxWindow *parent, wxFontData *data = (wxFontData *) NULL); - ~wxGenericFontDialog(void); - - bool Create(wxWindow *parent, wxFontData *data = (wxFontData *) NULL); - - int ShowModal(void); - - inline wxFontData& GetFontData(void) { return fontData; } - - // Internal functions - void OnPaint(wxPaintEvent& event); - - bool OnClose(void); - - virtual void CreateWidgets(void); - virtual void InitializeFont(void); - - virtual void PaintFontBackground(wxDC& dc); - virtual void PaintFont(wxDC& dc); - - void OnChangeFont(wxCommandEvent& event); - -DECLARE_EVENT_TABLE() -}; - -char* WXDLLEXPORT wxFontFamilyIntToString(int family); -char* WXDLLEXPORT wxFontWeightIntToString(int weight); -char* WXDLLEXPORT wxFontStyleIntToString(int style); -int WXDLLEXPORT wxFontFamilyStringToInt(char *family); -int WXDLLEXPORT wxFontWeightStringToInt(char *weight); -int WXDLLEXPORT wxFontStyleStringToInt(char *style); - -#endif diff --git a/include/wx/generic/gridg.h b/include/wx/generic/gridg.h deleted file mode 100644 index bf05ca26d3..0000000000 --- a/include/wx/generic/gridg.h +++ /dev/null @@ -1,324 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gridg.h -// Purpose: wxGenericGrid -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __GRIDH_G__ -#define __GRIDH_G__ - -#ifdef __GNUG__ -#pragma interface "gridg.h" -#endif - -#include "wx/defs.h" -#include "wx/panel.h" -#include "wx/string.h" -#include "wx/scrolbar.h" - -#define wxGRID_DEFAULT_EDIT_WIDTH 300 -#define wxGRID_DEFAULT_EDIT_HEIGHT 27 -#define wxGRID_DEFAULT_EDIT_X 2 -#define wxGRID_DEFAULT_EDIT_Y 1 -#define wxGRID_DEFAULT_SHEET_TOP 31 -#define wxGRID_DEFAULT_SHEET_LEFT 0 -#define wxGRID_DEFAULT_CELL_HEIGHT 20 -#define wxGRID_DEFAULT_CELL_WIDTH 80 -#define wxGRID_DEFAULT_VERTICAL_LABEL_WIDTH 40 -#define wxGRID_DEFAULT_HORIZONAL_LABEL_HEIGHT 20 - -#ifndef wxLEFT -#define wxLEFT 0x0400 -#endif - -#ifndef wxRIGHT -#define wxRIGHT 0x0800 -#endif - -#define WXGENERIC_GRID_VERSION 0.4 - -class WXDLLEXPORT wxGridCell; -class WXDLLEXPORT wxGenericGrid: public wxPanel -{ - DECLARE_DYNAMIC_CLASS(wxGenericGrid) - public: - wxGenericGrid(void); - - inline wxGenericGrid(wxWindow *parent, int x, int y, int width, int height, long style = 0, char *name = "grid") - { - Create(parent, -1, wxPoint(x, y), wxSize(width, height), style, name); - } - inline wxGenericGrid(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style = 0, const wxString& name = "grid") - { - Create(parent, id, pos, size, style, name); - } - ~wxGenericGrid(void); - - void OnPaint(wxPaintEvent& event); - void OnEraseBackground(wxEraseEvent& event); - void OnMouseEvent(wxMouseEvent& event); - void OnSize(wxSizeEvent& event); - - bool Create(wxWindow *parent, wxWindowID, const wxPoint& pos, const wxSize& size, long style = 0, const wxString& name = "grid"); - - bool CreateGrid(int nRows, int nCols, wxString **cellValues = (wxString **) NULL, short *widths = (short *) NULL, - short defaultWidth = wxGRID_DEFAULT_CELL_WIDTH, short defaultHeight = wxGRID_DEFAULT_CELL_HEIGHT); - void PaintGrid(wxDC& dc); - void ClearGrid(void); - virtual wxGridCell *GetCell(int row, int col); - inline wxGridCell ***GetCells(void) { return m_gridCells; } - bool InsertCols(int pos = 0, int n = 1, bool updateLabels = TRUE); - bool InsertRows(int pos = 0, int n = 1, bool updateLabels = TRUE); - bool AppendCols(int n = 1, bool updateLabels = TRUE); - bool AppendRows(int n = 1, bool updateLabels = TRUE); - bool DeleteCols(int pos = 0, int n = 1, bool updateLabels = TRUE); - bool DeleteRows(int pos = 0, int n = 1, bool updateLabels = TRUE); - - // Cell accessors - void SetCellValue(const wxString& val, int row, int col); - wxString& GetCellValue(int row, int col); - void SetCellAlignment(int flag, int row, int col); - void SetCellAlignment(int flag); - int GetCellAlignment(int row, int col); - int GetCellAlignment(void); - void SetCellTextColour(const wxColour& val, int row, int col); - void SetCellTextColour(const wxColour& col); - wxColour& GetCellTextColour(int row, int col); - inline wxColour& GetCellTextColour(void) { return m_cellTextColour; } - void SetCellBackgroundColour(const wxColour& col); - void SetCellBackgroundColour(const wxColour& colour, int row, int col); - inline wxColour& GetCellBackgroundColour(void) { return m_cellBackgroundColour; } - wxColour& GetCellBackgroundColour(int row, int col); - inline wxFont *GetCellTextFont(void) { return m_cellTextFont; } - wxFont *GetCellTextFont(int row, int col); - void SetCellTextFont(wxFont *fnt); - void SetCellTextFont(wxFont *fnt, int row, int col); - wxBitmap *GetCellBitmap(int row, int col); - void SetCellBitmap(wxBitmap *bitmap, int row, int col); - - // Size accessors - void SetColumnWidth(int col, int width); - int GetColumnWidth(int col); - void SetRowHeight(int row, int height); - int GetRowHeight(int row); - - // Label accessors - void SetLabelSize(int orientation, int sz); - int GetLabelSize(int orientation); - void SetLabelAlignment(int orientation, int alignment); - int GetLabelAlignment(int orientation); - wxGridCell *GetLabelCell(int orientation, int pos); - void SetLabelValue(int orientation, const wxString& val, int pos); - wxString& GetLabelValue(int orientation, int pos); - void SetLabelTextColour(const wxColour& colour); - void SetLabelBackgroundColour(const wxColour& colour); - inline wxColour& GetLabelTextColour(void) { return m_labelTextColour; } - inline wxColour& GetLabelBackgroundColour(void) { return m_labelBackgroundColour; } - inline wxFont *GetLabelTextFont(void) { return m_labelTextFont; } - inline void SetLabelTextFont(wxFont *fnt) { m_labelTextFont = fnt; } - - // Miscellaneous accessors - inline int GetCursorRow(void) { return m_wCursorRow; } - inline int GetCursorColumn(void) { return m_wCursorColumn; } - void SetGridCursor(int row, int col); - inline int GetRows(void) { return m_totalRows; } - inline int GetCols(void) { return m_totalCols; } - inline int GetScrollPosX(void) { return m_scrollPosX; } - inline int GetScrollPosY(void) { return m_scrollPosY; } - inline void SetScrollPosX(int pos) { m_scrollPosX = pos; } - inline void SetScrollPosY(int pos) { m_scrollPosY = pos; } - inline wxTextCtrl *GetTextItem(void) { return m_textItem; } - inline wxScrollBar *GetHorizScrollBar(void) { return m_hScrollBar; } - inline wxScrollBar *GetVertScrollBar(void) { return m_vScrollBar; } - inline bool GetEditable(void) { return m_editable; } - void SetEditable(bool edit); - inline wxRectangle& GetCurrentRect(void) { return m_currentRect; } - inline bool CurrentCellVisible(void) { return m_currentRectVisible; } - inline void SetDividerPen(wxPen *pen) { m_divisionPen = pen; } - inline wxPen *GetDividerPen(void) { return m_divisionPen; } - - // High-level event handling - // Override e.g. to check value of current cell; but call - // base member for default processing. - virtual void OnSelectCellImplementation(wxDC *dc, int row, int col); - - virtual void OnSelectCell(int WXUNUSED(row), int WXUNUSED(col)) {}; - - // Override to create your own class of grid cell - virtual wxGridCell *OnCreateCell(void); - - // Override to change labels e.g. creation of grid, inserting/deleting a row/col. - // By default, auto-labels the grid. - virtual void OnChangeLabels(void); - - // Override to change the label of the edit field when selecting a cell - // By default, sets it to e.g. A12 - virtual void OnChangeSelectionLabel(void); - - // Override for event processing - virtual void OnCellChange(int WXUNUSED(row), int WXUNUSED(col)) {}; - virtual void OnCellLeftClick(int WXUNUSED(row), int WXUNUSED(col), int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(control), bool WXUNUSED(shift)) {}; - virtual void OnCellRightClick(int WXUNUSED(row), int WXUNUSED(col), int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(control), bool WXUNUSED(shift)) {}; - virtual void OnLabelLeftClick(int WXUNUSED(row), int WXUNUSED(col), int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(control), bool WXUNUSED(shift)) {}; - virtual void OnLabelRightClick(int WXUNUSED(row), int WXUNUSED(col), int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(control), bool WXUNUSED(shift)) {}; - - // Activation: call from wxFrame::OnActivate - void OnActivate(bool active); - - // Miscellaneous - void AdjustScrollbars(void); - void UpdateDimensions(void); - - /* INTERNAL - */ - void SetCurrentRect (int Row, int Column, int canvasW = -1, int canvasH = -1); - void HighlightCell (wxDC *dc); - void DrawCellText(void); - void SetGridClippingRegion(wxDC *dc); - virtual bool CellHitTest(int x, int y, int *row, int *col); - virtual bool LabelSashHitTest(int x, int y, int *orientation, int *rowOrCol, int *startPos); - virtual bool LabelHitTest(int x, int y, int *row, int *col); - // Painting - virtual void DrawLabelAreas(wxDC *dc); - virtual void DrawEditableArea(wxDC *dc); - virtual void DrawGridLines(wxDC *dc); - virtual void DrawColumnLabels(wxDC *dc); - virtual void DrawColumnLabel(wxDC *dc, wxRectangle *rect, int col); - virtual void DrawRowLabels(wxDC *dc); - virtual void DrawRowLabel(wxDC *dc, wxRectangle *rect, int row); - virtual void DrawCells(wxDC *dc); - virtual void DrawCellValue(wxDC *dc, wxRectangle *rect, int row, int col); - virtual void DrawCellBackground(wxDC *dc, wxRectangle *rect, int row, int col); - virtual void DrawTextRect(wxDC *dc, const wxString& text, wxRectangle *rect, int flag); - virtual void DrawBitmapRect(wxDC *dc, wxBitmap *bitmap, wxRectangle *rect, int flag); - - // Refresh cell and optionally set the text field - void RefreshCell(int row, int col, bool setText = FALSE); - - // Don't refresh within the outer pair of these. - inline void BeginBatch(void) { m_batchCount ++; } - inline void EndBatch(void) { m_batchCount --; } - inline int GetBatchCount(void) { return m_batchCount; } - - void OnText(wxCommandEvent& ev); - void OnGridScroll(wxScrollEvent& ev); - - protected: - wxPanel* m_editingPanel; // Contains the text control - wxTextCtrl* m_textItem; - wxScrollBar* m_hScrollBar; - wxScrollBar* m_vScrollBar; - int m_wCursorRow; - int m_wCursorColumn; - wxRectangle m_currentRect; - bool m_currentRectVisible; - wxGridCell*** m_gridCells; - wxGridCell** m_rowLabelCells; - wxGridCell** m_colLabelCells; - bool m_editCreated; - bool m_editable; - - int m_totalRows; - int m_totalCols; - - // Row and column we're currently looking at - int m_scrollPosX; - int m_scrollPosY; - - // Dimensions - int m_leftOfSheet; - int m_topOfSheet; - int m_rightOfSheet; // Calculated from m_colWidths - int m_bottomOfSheet; // Calculated from m_rowHeights - int m_totalGridWidth; // Total 'virtual' size - int m_totalGridHeight; - int m_cellHeight; // For now, a default - int m_verticalLabelWidth; - int m_horizontalLabelHeight; - int m_verticalLabelAlignment; - int m_horizontalLabelAlignment; - int m_cellAlignment; - short* m_colWidths; // Dynamically allocated - short* m_rowHeights; // Dynamically allocated - int m_scrollWidth; // Vert. scroll width, horiz. scroll height - - // Colours - wxColour m_cellTextColour; - wxColour m_cellBackgroundColour; - wxFont* m_cellTextFont; - wxColour m_labelTextColour; - wxColour m_labelBackgroundColour; - wxBrush* m_labelBackgroundBrush; - wxFont* m_labelTextFont; - wxPen* m_divisionPen; - wxBitmap* m_doubleBufferingBitmap; - - // Position of Edit control - wxRectangle m_editControlPosition; - - // Drag status - int m_dragStatus; - int m_dragRowOrCol; - int m_dragStartPosition; - int m_dragLastPosition; - wxCursor* m_horizontalSashCursor; - wxCursor* m_verticalSashCursor; - - // To avoid multiple refreshes, use Begin/EndBatch - int m_batchCount; - -DECLARE_EVENT_TABLE() -}; - -#define wxGRID_TEXT_CTRL 2000 -#define wxGRID_HSCROLL 2001 -#define wxGRID_VSCROLL 2002 - -class WXDLLEXPORT wxGridCell: public wxObject -{ - public: - wxString textValue; - wxFont *font; - wxColour textColour; - wxColour backgroundColour; - wxBrush *backgroundBrush; - wxBitmap *cellBitmap; - int alignment; - - wxGridCell(wxGenericGrid *window = (wxGenericGrid *) NULL); - ~wxGridCell(void); - - virtual wxString& GetTextValue(void) { return textValue; } - virtual void SetTextValue(const wxString& str) { textValue = str; } - inline wxFont *GetFont(void) { return font; } - inline void SetFont(wxFont *f) { font = f; } - inline wxColour& GetTextColour(void) { return textColour; } - inline void SetTextColour(const wxColour& colour) { textColour = colour; } - inline wxColour& GetBackgroundColour(void) { return backgroundColour; } - void SetBackgroundColour(const wxColour& colour); - inline wxBrush *GetBackgroundBrush(void) { return backgroundBrush; } - inline void SetBackgroundBrush(wxBrush *brush) { backgroundBrush = brush; } - inline int GetAlignment(void) { return alignment; } - inline void SetAlignment(int align) { alignment = align; } - inline wxBitmap *GetCellBitmap(void) { return cellBitmap; } - inline void SetCellBitmap(wxBitmap *bitmap) { cellBitmap = bitmap; } -}; - -class WXDLLEXPORT wxGrid: public wxGenericGrid -{ - public: - wxGrid(void):wxGenericGrid() {} - wxGrid(wxWindow *parent, int x=-1, int y=-1, int width=-1, int height=-1, - long style=0, char *name = "gridWindow"): - wxGenericGrid(parent, x, y, width, height, style, name) - { - } -}; - -#endif - diff --git a/include/wx/generic/helpxlp.h b/include/wx/generic/helpxlp.h deleted file mode 100644 index 5c0b26d257..0000000000 --- a/include/wx/generic/helpxlp.h +++ /dev/null @@ -1,127 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: helpxlp.h -// Purpose: Help system: wxHelp implementation -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -/* sccsid[] = "@(#)wx_help.h 1.2 5/9/94" */ - -#ifndef __HELPXLPH__ -#define __HELPXLPH__ - -#ifdef __GNUG__ -#pragma interface "helpxlp.h" -#endif - -#include -#include "wx/wx.h" - -#if USE_HELP - -#include "wx/helpbase.h" - -#ifdef __WXMSW__ -#include "wx/dde.h" -#else -// Or whatever it'll be called -#include "wx/ipctcp.h" -#endif - -class WXDLLEXPORT wxXLPHelpController; - -// Connection class for implementing the connection between the -// wxHelp process and the application -class WXDLLEXPORT wxXLPHelpConnection: public - -#ifdef __WXMSW__ - wxDDEConnection -#else - wxTCPConnection -#endif - -{ - friend class wxXLPHelpController; - - DECLARE_DYNAMIC_CLASS(wxXLPHelpConnection) - - public: - - wxXLPHelpConnection(wxXLPHelpController *instance); - bool OnDisconnect(void); - - private: - wxXLPHelpController *helpInstance; -}; - -// Connection class for implementing the client process -// controlling the wxHelp process -class WXDLLEXPORT wxXLPHelpClient: public - -#ifdef __WXMSW__ - wxDDEClient -#else - wxTCPClient -#endif - -{ -DECLARE_CLASS(wxXLPHelpClient) - - friend class WXDLLEXPORT wxXLPHelpController; -public: - wxXLPHelpClient(wxXLPHelpController* c) { m_controller = c; } - - wxConnectionBase *OnMakeConnection(void) - { return new wxXLPHelpConnection(m_controller); - } -protected: - wxXLPHelpController* m_controller; -}; - -// An application can have one or more instances of wxHelp, -// represented by an object of this class. -// Nothing happens on initial creation; the application -// must call a member function to display help. -// If the instance of wxHelp is already active, that instance -// will be used for subsequent help. - -class WXDLLEXPORT wxXLPHelpController: public wxHelpControllerBase -{ - friend class WXDLLEXPORT wxXLPHelpConnection; - DECLARE_CLASS(wxXLPHelpController) - - public: - wxXLPHelpController(void); - ~wxXLPHelpController(void); - - // Must call this to set the filename and server name - virtual bool Initialize(const wxString& file, int server = -1); - // If file is "", reloads file given in Initialize - virtual bool LoadFile(const wxString& file = ""); - virtual bool DisplayContents(void); - virtual bool DisplaySection(int sectionNo); - virtual bool DisplayBlock(long blockNo); - virtual bool KeywordSearch(const wxString& k); - - virtual bool Quit(void); - virtual void OnQuit(void); - - // Private - bool Run(void); - - protected: - wxString helpFile; - wxString helpHost; - int helpServer; - bool helpRunning; - wxXLPHelpConnection* helpConnection; - wxXLPHelpClient helpClient; -}; - -#endif // USE_HELP -#endif - // __HELPXLPH__ diff --git a/include/wx/generic/imaglist.h b/include/wx/generic/imaglist.h deleted file mode 100644 index d13864cbbf..0000000000 --- a/include/wx/generic/imaglist.h +++ /dev/null @@ -1,78 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: imaglist.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __IMAGELISTH_G__ -#define __IMAGELISTH_G__ - -#ifdef __GNUG__ -#pragma interface "imaglist.h" -#endif - -#include "wx/defs.h" -#include "wx/gdicmn.h" -#include "wx/bitmap.h" -#include "wx/dc.h" - -/* - * wxImageList is used for wxListCtrl, wxTreeCtrl. These controls refer to - * images for their items by an index into an image list. - * A wxImageList is capable of creating images with optional masks from - * a variety of sources - a single bitmap plus a colour to indicate the mask, - * two bitmaps, or an icon. - * - * Image lists can also create and draw images used for drag and drop functionality. - * This is not yet implemented in wxImageList. We need to discuss a generic API - * for doing drag and drop and see whether it ties in with the Win95 view of it. - * See below for candidate functions and an explanation of how they might be - * used. - */ - -// Flags for Draw -#define wxIMAGELIST_DRAW_NORMAL 0x0001 -#define wxIMAGELIST_DRAW_TRANSPARENT 0x0002 -#define wxIMAGELIST_DRAW_SELECTED 0x0004 -#define wxIMAGELIST_DRAW_FOCUSED 0x0008 - -// Flag values for Set/GetImageList -enum { - wxIMAGE_LIST_NORMAL, // Normal icons - wxIMAGE_LIST_SMALL, // Small icons - wxIMAGE_LIST_STATE // State icons: unimplemented (see WIN32 documentation) -}; - -class wxImageList: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxImageList) - - public: - - wxImageList() { } - wxImageList( int width, int height, bool mask = TRUE, int initialCount = 1 ); - ~wxImageList(); - bool Create(); - int GetImageCount() const; - int Add( const wxBitmap &bitmap ); - wxBitmap *GetBitmap(int index); - bool Replace( int index, const wxBitmap &bitmap ); - bool Remove( int index ); - bool RemoveAll(); - bool GetSize( int index, int &width, int &height ) const; - bool Draw(int index, wxDC& dc, int x, int y, - int flags = wxIMAGELIST_DRAW_NORMAL, bool solidBackground = FALSE ); - - private: - - wxList m_images; - int m_width; - int m_height; -}; - -#endif // __IMAGELISTH_G__ - diff --git a/include/wx/generic/listctrl.h b/include/wx/generic/listctrl.h deleted file mode 100644 index 4fd5c12df3..0000000000 --- a/include/wx/generic/listctrl.h +++ /dev/null @@ -1,630 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: listctrl.h -// Purpose: Generic list control -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __LISTCTRLH_G__ -#define __LISTCTRLH_G__ - -#ifdef __GNUG__ -#pragma interface "listctrl.h" -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/imaglist.h" -#include "wx/control.h" -#include "wx/timer.h" -#include "wx/textctrl.h" -#include "wx/dcclient.h" -#include "wx/scrolwin.h" -#include "wx/settings.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxListItem; -class wxListEvent; -class wxListCtrl; - -//----------------------------------------------------------------------------- -// internal classes -//----------------------------------------------------------------------------- - -class wxListHeaderData; -class wxListItemData; -class wxListLineData; - -class wxListHeaderWindow; -class wxListMainWindow; - -class wxListRenameTimer; -//class wxListTextCtrl; - -//----------------------------------------------------------------------------- -// types -//----------------------------------------------------------------------------- - -// type of compare function for wxListCtrl sort operation -typedef int (*wxListCtrlCompare)(long item1, long item2, long sortData); - -//----------------------------------------------------------------------------- -// wxListCtrl flags -//----------------------------------------------------------------------------- - -#define wxLC_ICON 0x0004 -#define wxLC_SMALL_ICON 0x0008 -#define wxLC_LIST 0x0010 -#define wxLC_REPORT 0x0020 -#define wxLC_ALIGN_TOP 0x0040 -#define wxLC_ALIGN_LEFT 0x0080 -#define wxLC_AUTOARRANGE 0x0100 // not supported in wxGLC -#define wxLC_USER_TEXT 0x0200 // not supported in wxGLC (how does it work?) -#define wxLC_EDIT_LABELS 0x0400 -#define wxLC_NO_HEADER 0x0800 // not supported in wxGLC -#define wxLC_NO_SORT_HEADER 0x1000 // not supported in wxGLC -#define wxLC_SINGLE_SEL 0x2000 -#define wxLC_SORT_ASCENDING 0x4000 -#define wxLC_SORT_DESCENDING 0x8000 // not supported in wxGLC - -#define wxLC_MASK_TYPE (wxLC_ICON | wxLC_SMALL_ICON | wxLC_LIST | wxLC_REPORT) -#define wxLC_MASK_ALIGN (wxLC_ALIGN_TOP | wxLC_ALIGN_LEFT) -#define wxLC_MASK_SORT (wxLC_SORT_ASCENDING | wxLC_SORT_DESCENDING) - -// Omitted because (a) too much detail (b) not enough style flags -// #define wxLC_NO_SCROLL -// #define wxLC_NO_LABEL_WRAP -// #define wxLC_OWNERDRAW_FIXED -// #define wxLC_SHOW_SEL_ALWAYS - -// Mask flags to tell app/GUI what fields of wxListItem are valid -#define wxLIST_MASK_STATE 0x0001 -#define wxLIST_MASK_TEXT 0x0002 -#define wxLIST_MASK_IMAGE 0x0004 -#define wxLIST_MASK_DATA 0x0008 -#define wxLIST_SET_ITEM 0x0010 -#define wxLIST_MASK_WIDTH 0x0020 -#define wxLIST_MASK_FORMAT 0x0040 - -// State flags for indicating the state of an item -#define wxLIST_STATE_DONTCARE 0x0000 -#define wxLIST_STATE_DROPHILITED 0x0001 // not supported in wxGLC -#define wxLIST_STATE_FOCUSED 0x0002 -#define wxLIST_STATE_SELECTED 0x0004 -#define wxLIST_STATE_CUT 0x0008 // not supported in wxGLC - -// Hit test flags, used in HitTest // wxGLC suppots 20 and 80 -#define wxLIST_HITTEST_ABOVE 0x0001 // Above the client area. -#define wxLIST_HITTEST_BELOW 0x0002 // Below the client area. -#define wxLIST_HITTEST_NOWHERE 0x0004 // In the client area but below the last item. -#define wxLIST_HITTEST_ONITEMICON 0x0020 // On the bitmap associated with an item. -#define wxLIST_HITTEST_ONITEMLABEL 0x0080 // On the label (string) associated with an item. -#define wxLIST_HITTEST_ONITEMRIGHT 0x0100 // In the area to the right of an item. -#define wxLIST_HITTEST_ONITEMSTATEICON 0x0200 // On the state icon for a tree view item that is in a user-defined state. -#define wxLIST_HITTEST_TOLEFT 0x0400 // To the right of the client area. -#define wxLIST_HITTEST_TORIGHT 0x0800 // To the left of the client area. - -#define wxLIST_HITTEST_ONITEM (wxLIST_HITTEST_ONITEMICON | wxLIST_HITTEST_ONITEMLABEL | wxLIST_HITTEST_ONITEMSTATEICON) - - - -// Flags for GetNextItem // always wxLIST_NEXT_ALL in wxGLC -enum { - wxLIST_NEXT_ABOVE, // Searches for an item above the specified item - wxLIST_NEXT_ALL, // Searches for subsequent item by index - wxLIST_NEXT_BELOW, // Searches for an item below the specified item - wxLIST_NEXT_LEFT, // Searches for an item to the left of the specified item - wxLIST_NEXT_RIGHT // Searches for an item to the right of the specified item -}; - -// Alignment flags for Arrange // always wxLIST_ALIGN_LEFT in wxGLC -enum { - wxLIST_ALIGN_DEFAULT, - wxLIST_ALIGN_LEFT, - wxLIST_ALIGN_TOP, - wxLIST_ALIGN_SNAP_TO_GRID -}; - -// Column format // always wxLIST_FORMAT_LEFT in wxGLC -enum { - wxLIST_FORMAT_LEFT, - wxLIST_FORMAT_RIGHT, - wxLIST_FORMAT_CENTRE, - wxLIST_FORMAT_CENTER = wxLIST_FORMAT_CENTRE -}; - -// Autosize values for SetColumnWidth -enum { - wxLIST_AUTOSIZE = -1, // always 80 in wxGLC (what else?) - wxLIST_AUTOSIZE_USEHEADER = -2 -}; - -// Flag values for GetItemRect -enum { - wxLIST_RECT_BOUNDS, - wxLIST_RECT_ICON, - wxLIST_RECT_LABEL -}; - -// Flag values for FindItem // not supported by wxGLC -enum { - wxLIST_FIND_UP, - wxLIST_FIND_DOWN, - wxLIST_FIND_LEFT, - wxLIST_FIND_RIGHT -}; - -//----------------------------------------------------------------------------- -// wxListItem -//----------------------------------------------------------------------------- - -class wxListItem: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxListItem) - - public: - long m_mask; // Indicates what fields are valid - long m_itemId; // The zero-based item position - int m_col; // Zero-based column, if in report mode - long m_state; // The state of the item - long m_stateMask; // Which flags of m_state are valid (uses same flags) - wxString m_text; // The label/header text - int m_image; // The zero-based index into an image list - long m_data; // App-defined data - wxColour *m_colour; // only wxGLC, not supported by Windows ;-> - - // For columns only - int m_format; // left, right, centre - int m_width; // width of column - - wxListItem(void); -}; - -//----------------------------------------------------------------------------- -// wxListEvent -//----------------------------------------------------------------------------- - -class WXDLLEXPORT wxListEvent: public wxCommandEvent -{ - DECLARE_DYNAMIC_CLASS(wxListEvent) - - public: - wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0); - - int m_code; - long m_itemIndex; - long m_oldItemIndex; - int m_col; - bool m_cancelled; - wxPoint m_pointDrag; - - wxListItem m_item; -}; - -typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&); - -#define EVT_LIST_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, -#define EVT_LIST_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, -#define EVT_LIST_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, -#define EVT_LIST_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, -#define EVT_LIST_DELETE_ITEM(id, fn) { wxEVT_COMMAND_LIST_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, -#define EVT_LIST_DELETE_ALL_ITEMS(id, fn) { wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, -#define EVT_LIST_GET_INFO(id, fn) { wxEVT_COMMAND_LIST_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, -#define EVT_LIST_SET_INFO(id, fn) { wxEVT_COMMAND_LIST_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, -#define EVT_LIST_ITEM_SELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, -#define EVT_LIST_ITEM_DESELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_DESELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, -#define EVT_LIST_KEY_DOWN(id, fn) { wxEVT_COMMAND_LIST_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, -#define EVT_LIST_INSERT_ITEM(id, fn) { wxEVT_COMMAND_LIST_INSERT_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, -#define EVT_LIST_COL_CLICK(id, fn) { wxEVT_COMMAND_LIST_COL_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, - - -//----------------------------------------------------------------------------- -// wxListItemData (internal) -//----------------------------------------------------------------------------- - -class wxListItemData : public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxListItemData); - - protected: - wxString m_text; - int m_image; - long m_data; - int m_xpos,m_ypos; - int m_width,m_height; - wxColour *m_colour; - - public: - wxListItemData(void); - wxListItemData( const wxListItem &info ); - void SetItem( const wxListItem &info ); - void SetText( const wxString &s ); - void SetImage( int image ); - void SetData( long data ); - void SetPosition( int x, int y ); - void SetSize( int width, int height ); - void SetColour( wxColour *col ); - bool HasImage(void) const; - bool HasText(void) const; - bool IsHit( int x, int y ) const; - void GetText( wxString &s ); - int GetX( void ) const; - int GetY( void ) const; - int GetWidth(void) const; - int GetHeight(void) const; - int GetImage(void) const; - void GetItem( wxListItem &info ); - wxColour *GetColour(void); -}; - -//----------------------------------------------------------------------------- -// wxListHeaderData (internal) -//----------------------------------------------------------------------------- - -class wxListHeaderData : public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxListHeaderData); - - protected: - long m_mask; - int m_image; - wxString m_text; - int m_format; - int m_width; - int m_xpos,m_ypos; - int m_height; - - public: - wxListHeaderData(void); - wxListHeaderData( const wxListItem &info ); - void SetItem( const wxListItem &item ); - void SetPosition( int x, int y ); - void SetWidth( int w ); - void SetFormat( int format ); - void SetHeight( int h ); - bool HasImage(void) const; - bool HasText(void) const; - bool IsHit( int x, int y ) const; - void GetItem( wxListItem &item ); - void GetText( wxString &s ); - int GetImage(void) const; - int GetWidth(void) const; - int GetFormat(void) const; -}; - -//----------------------------------------------------------------------------- -// wxListLineData (internal) -//----------------------------------------------------------------------------- - -class wxListLineData : public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxListLineData); - - protected: - wxList m_items; - wxRectangle m_bound_all; - wxRectangle m_bound_label; - wxRectangle m_bound_icon; - wxRectangle m_bound_hilight; - int m_mode; - bool m_hilighted; - wxBrush *m_hilightBrush; - int m_spacing; - wxListMainWindow *m_owner; - - void DoDraw( wxPaintDC *dc, bool hilight, bool paintBG ); - - public: - wxListLineData( void ) {}; - wxListLineData( wxListMainWindow *owner, int mode, wxBrush *hilightBrush ); - void CalculateSize( wxPaintDC *dc, int spacing ); - void SetPosition( wxPaintDC *dc, int x, int y, int window_width ); - void SetColumnPosition( int index, int x ); - void GetSize( int &width, int &height ); - void GetExtent( int &x, int &y, int &width, int &height ); - void GetLabelExtent( int &x, int &y, int &width, int &height ); - long IsHit( int x, int y ); - void InitItems( int num ); - void SetItem( int index, const wxListItem &info ); - void GetItem( int index, wxListItem &info ); - void GetText( int index, wxString &s ); - void SetText( int index, const wxString s ); - int GetImage( int index ); - void GetRect( wxRectangle &rect ); - void Hilight( bool on ); - void ReverseHilight( void ); - void DrawRubberBand( wxPaintDC *dc, bool on ); - void Draw( wxPaintDC *dc ); - bool IsInRect( int x, int y, const wxRectangle &rect ); - bool IsHilighted( void ); - void AssignRect( wxRectangle &dest, int x, int y, int width, int height ); - void AssignRect( wxRectangle &dest, const wxRectangle &source ); -}; - -//----------------------------------------------------------------------------- -// wxListHeaderWindow (internal) -//----------------------------------------------------------------------------- - -class wxListHeaderWindow : public wxWindow -{ - DECLARE_DYNAMIC_CLASS(wxListHeaderWindow) - - protected: - wxListMainWindow *m_owner; - wxCursor *m_currentCursor; - wxCursor *m_resizeCursor; - - public: - wxListHeaderWindow( void ); - wxListHeaderWindow( wxWindow *win, wxWindowID id, wxListMainWindow *owner, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = 0, const wxString &name = "columntitles" ); - void DoDrawRect( wxPaintDC *dc, int x, int y, int w, int h ); - void OnPaint( wxPaintEvent &event ); - void OnMouse( wxMouseEvent &event ); - void OnSetFocus( wxFocusEvent &event ); - - DECLARE_EVENT_TABLE() -}; - -//----------------------------------------------------------------------------- -// wxListRenameTimer (internal) -//----------------------------------------------------------------------------- - -class wxListRenameTimer: public wxTimer -{ - private: - wxListMainWindow *m_owner; - - public: - wxListRenameTimer( wxListMainWindow *owner ); - void Notify(); -}; - -//----------------------------------------------------------------------------- -// wxListTextCtrl (internal) -//----------------------------------------------------------------------------- - -class wxListTextCtrl: public wxTextCtrl -{ - DECLARE_DYNAMIC_CLASS(wxListTextCtrl); - - private: - bool *m_accept; - wxString *m_res; - wxListMainWindow *m_owner; - - public: - wxListTextCtrl(void) {}; - wxListTextCtrl( wxWindow *parent, const wxWindowID id, - bool *accept, wxString *res, wxListMainWindow *owner, - const wxString &value = "", - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - int style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString &name = "wxListTextCtrlText" ); - void OnChar( wxKeyEvent &event ); - void OnKillFocus( wxFocusEvent &event ); - - DECLARE_EVENT_TABLE() -}; - -//----------------------------------------------------------------------------- -// wxListMainWindow (internal) -//----------------------------------------------------------------------------- - -class wxListMainWindow: public wxScrolledWindow -{ - DECLARE_DYNAMIC_CLASS(wxListMainWindow); - - public: - long m_mode; - wxList m_lines; - wxList m_columns; - wxListLineData *m_current; - int m_visibleLines; - wxBrush *m_hilightBrush; - wxColour *m_hilightColour; - wxFont *m_myFont; - int m_xScroll,m_yScroll; - bool m_dirty; - wxImageList *m_small_image_list; - wxImageList *m_normal_image_list; - int m_small_spacing; - int m_normal_spacing; - bool m_hasFocus; - bool m_usedKeys; - bool m_lastOnSame; - wxTimer *m_renameTimer; -// wxListTextCtrl *m_text; - bool m_renameAccept; - wxString m_renameRes; - bool m_isCreated; - int m_dragCount; - - public: - wxListMainWindow(void); - wxListMainWindow( wxWindow *parent, wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = 0, const wxString &name = "listctrl" ); - ~wxListMainWindow(void); - void RefreshLine( wxListLineData *line ); - void OnPaint( wxPaintEvent &event ); - void HilightAll( bool on ); - void ActivateLine( wxListLineData *line ); - void SendNotify( wxListLineData *line, wxEventType command ); - void FocusLine( wxListLineData *line ); - void UnfocusLine( wxListLineData *line ); - void SelectLine( wxListLineData *line ); - void DeselectLine( wxListLineData *line ); - void DeleteLine( wxListLineData *line ); - void RenameLine( wxListLineData *line, const wxString &newName ); - void StartLabelEdit( wxListLineData *line ); - void OnRenameTimer(void); - void OnRenameAccept(void); - void OnMouse( wxMouseEvent &event ); - void MoveToFocus( void ); - void OnArrowChar( wxListLineData *newCurrent, bool shiftDown ); - void OnChar( wxKeyEvent &event ); - void OnSetFocus( wxFocusEvent &event ); - void OnKillFocus( wxFocusEvent &event ); - void OnSize( wxSizeEvent &event ); - wxFont *GetMyFont( void ); - void DrawImage( int index, wxPaintDC *dc, int x, int y ); - void GetImageSize( int index, int &width, int &height ); - int GetIndexOfLine( const wxListLineData *line ); - int GetTextLength( wxString &s ); // should be const - - void SetImageList( wxImageList *imageList, int which ); - void SetItemSpacing( int spacing, bool isSmall = FALSE ); - int GetItemSpacing( bool isSmall = FALSE ); - void SetColumn( int col, wxListItem &item ); - void SetColumnWidth( int col, int width ); - void GetColumn( int col, wxListItem &item ); - int GetColumnWidth( int vol ); - int GetColumnCount( void ); - int GetCountPerPage( void ); - void SetItem( wxListItem &item ); - void GetItem( wxListItem &item ); - void SetItemState( long item, long state, long stateMask ); - int GetItemState( long item, long stateMask ); - int GetItemCount( void ); - void GetItemRect( long index, wxRectangle &rect ); - bool GetItemPosition(long item, wxPoint& pos); - int GetSelectedItemCount( void ); - void SetMode( long mode ); - long GetMode( void ) const; - void CalculatePositions( void ); - void RealizeChanges(void); - long GetNextItem( long item, int geometry, int state ); - void DeleteItem( long index ); - void DeleteAllItems( void ); - void DeleteColumn( int col ); - void DeleteEverything( void ); - void EnsureVisible( long index ); - long FindItem(long start, const wxString& str, bool partial = FALSE ); - long FindItem(long start, long data); - long HitTest( int x, int y, int &flags ); - void InsertItem( wxListItem &item ); -// void AddItem( wxListItem &item ); - void InsertColumn( long col, wxListItem &item ); -// void AddColumn( wxListItem &item ); - void SortItems( wxListCtrlCompare fn, long data ); - virtual bool OnListNotify( wxListEvent &event ); - - DECLARE_EVENT_TABLE() -}; - -//----------------------------------------------------------------------------- -// wxListCtrl -//----------------------------------------------------------------------------- - -class wxListCtrl: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxListCtrl); - - public: - - wxListCtrl(void); - wxListCtrl( wxWindow *parent, wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = 0, const wxString &name = "listctrl" ); - ~wxListCtrl(void); - bool Create( wxWindow *parent, wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = 0, const wxString &name = "listctrl" ); - void OnSize( wxSizeEvent &event ); - bool GetColumn( int col, wxListItem& item ); - bool SetColumn( int col, wxListItem& item ); - int GetColumnWidth( int col ); - bool SetColumnWidth( int col, int width); - int GetCountPerPage(void); // not the same in wxGLC as in Windows, I think -// wxText& GetEditControl(void) const; // not supported in wxGLC - bool GetItem( wxListItem& info ); - bool SetItem( wxListItem& info ) ; - long SetItem( long index, int col, const wxString& label, int imageId = -1 ); - int GetItemState( long item, long stateMask ); - bool SetItemState( long item, long state, long stateMask); - bool SetItemImage( long item, int image, int selImage); - wxString GetItemText( long item ); - void SetItemText( long item, const wxString& str ); - long GetItemData( long item ); - bool SetItemData( long item, long data ); - bool GetItemRect( long item, wxRectangle& rect, int code = wxLIST_RECT_BOUNDS ); - bool GetItemPosition( long item, wxPoint& pos ); - bool SetItemPosition( long item, const wxPoint& pos ); // not supported in wxGLC - int GetItemCount(void); - void SetItemSpacing( int spacing, bool isSmall = FALSE ); - int GetItemSpacing( bool isSmall ); - int GetSelectedItemCount(void); -// wxColour GetTextColour(void) const; // wxGLC has colours for every Item (see wxListItem) -// void SetTextColour(const wxColour& col); - long GetTopItem(void); - void SetSingleStyle( long style, bool add = TRUE ) ; - void SetWindowStyleFlag(long style); - void RecreateWindow(void) {}; - long GetNextItem(long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE) const; - wxImageList *GetImageList(int which); - void SetImageList(wxImageList *imageList, int which) ; - bool Arrange( int flag = wxLIST_ALIGN_DEFAULT ); // always wxLIST_ALIGN_LEFT in wxGLC - bool DeleteItem( long item ); - bool DeleteAllItems(void) ; - bool DeleteColumn( int col ); -// wxText& Edit(long item) ; // not supported in wxGLC - bool EnsureVisible( long item ); - long FindItem(long start, const wxString& str, bool partial = FALSE ); - long FindItem(long start, long data); - long FindItem(long start, const wxPoint& pt, int direction); // not supported in wxGLC - long HitTest(const wxPoint& point, int& flags); - long InsertItem(wxListItem& info); - long InsertItem(long index, const wxString& label); - long InsertItem(long index, int imageIndex); - long InsertItem(long index, const wxString& label, int imageIndex); - long InsertColumn(long col, wxListItem& info); - long InsertColumn(long col, const wxString& heading, int format = wxLIST_FORMAT_LEFT, - int width = -1); - bool ScrollList(int dx, int dy); - bool SortItems(wxListCtrlCompare fn, long data); - bool Update(long item); - virtual bool OnListNotify(wxListEvent& WXUNUSED(event)) { return FALSE; } - void OnIdle( wxIdleEvent &event ); - - // We have to hand down a few functions - - void SetDropTarget( wxDropTarget *dropTarget ) - { m_mainWin->SetDropTarget( dropTarget ); } - wxDropTarget *GetDropTarget() const - { return m_mainWin->GetDropTarget(); } - void SetCursor( const wxCursor &cursor ) - { m_mainWin->SetCursor( cursor); } - wxColour GetBackgroundColour() const - { return m_mainWin->GetBackgroundColour(); } - void SetBackgroundColour( const wxColour &colour ) - { m_mainWin->SetBackgroundColour( colour ); } - wxColour GetForegroundColour() const - { return m_mainWin->GetForegroundColour(); } - void SetForegroundColour( const wxColour &colour ) - { m_mainWin->SetForegroundColour( colour ); } - bool PopupMenu( wxMenu *menu, int x, int y ) - { return m_mainWin->PopupMenu( menu, x, y ); } - - protected: - -// wxListTextCtrl m_textCtrl; - wxImageList *m_imageListNormal; - wxImageList *m_imageListSmall; - wxImageList *m_imageListState; // what's that ? - wxListHeaderWindow *m_headerWin; - wxListMainWindow *m_mainWin; - - DECLARE_EVENT_TABLE() - -}; - - -#endif // __LISTCTRLH_G__ diff --git a/include/wx/generic/msgdlgg.h b/include/wx/generic/msgdlgg.h deleted file mode 100644 index 84a58194f8..0000000000 --- a/include/wx/generic/msgdlgg.h +++ /dev/null @@ -1,52 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: msgdlgg.h -// Purpose: Generic wxMessageDialog -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __MSGDLGH_G__ -#define __MSGDLGH_G__ - -#ifdef __GNUG__ -#pragma interface "msgdlgg.h" -#endif - -#include "wx/setup.h" -#include "wx/dialog.h" - -// type is an 'or' (|) of wxOK, wxCANCEL, wxYES_NO -// Returns wxYES/NO/OK/CANCEL - -WXDLLEXPORT_DATA(extern const char*) wxMessageBoxCaptionStr; - -class WXDLLEXPORT wxGenericMessageDialog: public wxDialog -{ -DECLARE_DYNAMIC_CLASS(wxGenericMessageDialog) -protected: - long m_dialogStyle; -public: - wxGenericMessageDialog(wxWindow *parent, const wxString& message, const wxString& caption = wxMessageBoxCaptionStr, - long style = wxOK|wxCENTRE, const wxPoint& pos = wxDefaultPosition); - - void OnYes(wxCommandEvent& event); - void OnNo(wxCommandEvent& event); - void OnCancel(wxCommandEvent& event); - -DECLARE_EVENT_TABLE() -}; - -#ifndef __WXMSW__ -#define wxMessageDialog wxGenericMessageDialog - -int wxMessageBox(const wxString& message, const wxString& caption = wxMessageBoxCaptionStr, - long style = wxOK|wxCENTRE, wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1); - -#endif - -#endif - // __MSGDLGH_G__ diff --git a/include/wx/generic/panelg.h b/include/wx/generic/panelg.h deleted file mode 100644 index b20133534f..0000000000 --- a/include/wx/generic/panelg.h +++ /dev/null @@ -1,76 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: panelg.h -// Purpose: wxPanel: similar to wxWindows but is coloured as for a dialog -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __PANELH_G__ -#define __PANELH_G__ - -#ifdef __GNUG__ -#pragma interface "panelg.h" -#endif - -#include "wx/window.h" - -WXDLLEXPORT_DATA(extern const char*) wxPanelNameStr; - -// Dialog boxes -class WXDLLEXPORT wxPanel: public wxWindow -{ -public: - wxPanel(); - - // Old-style constructor (no default values for coordinates to avoid ambiguity - // with the new one) - inline wxPanel(wxWindow *parent, - int x, int y, int width, int height, - long style = wxTAB_TRAVERSAL | wxNO_BORDER, - const wxString& name = wxPanelNameStr) - { - Create(parent, -1, wxPoint(x, y), wxSize(width, height), style, name); - } - - // Constructor - inline wxPanel(wxWindow *parent, wxWindowID id = -1, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxTAB_TRAVERSAL | wxNO_BORDER, - const wxString& name = wxPanelNameStr) - { - Create(parent, id, pos, size, style, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxTAB_TRAVERSAL | wxNO_BORDER, - const wxString& name = wxPanelNameStr); - - // Sends an OnInitDialog event, which in turns transfers data to - // to the dialog via validators. - virtual void InitDialog(); - - // overriden base class virtuals - virtual void SetFocus(); - - // callbacks - // Responds to colour changes - void OnSysColourChanged(wxSysColourChangedEvent& event); - // Process a keyboard navigation message (Tab traversal) - void OnNavigationKey(wxNavigationKeyEvent& event); - -protected: - bool SetFocusToNextChild(wxNode *nodeCurrent = (wxNode *) NULL, bool bForward = TRUE); - -DECLARE_DYNAMIC_CLASS(wxPanel) -DECLARE_EVENT_TABLE() -}; - -#endif - // __PANELH_G__ diff --git a/include/wx/generic/printps.h b/include/wx/generic/printps.h deleted file mode 100644 index 15213b91a0..0000000000 --- a/include/wx/generic/printps.h +++ /dev/null @@ -1,57 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: printps.h -// Purpose: wxPostScriptPrinter, wxPostScriptPrintPreview -// wxGenericPageSetupDialog -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __PRINTPSH__ -#define __PRINTPSH__ - -#ifdef __GNUG__ -#pragma interface "printps.h" -#endif - -#include "wx/prntbase.h" - -/* - * Represents the printer: manages printing a wxPrintout object - */ - -class WXDLLEXPORT wxPostScriptPrinter: public wxPrinterBase -{ - DECLARE_DYNAMIC_CLASS(wxPostScriptPrinter) - - public: - wxPostScriptPrinter(wxPrintData *data = (wxPrintData *) NULL); - ~wxPostScriptPrinter(void); - - virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = TRUE); - virtual bool PrintDialog(wxWindow *parent); - virtual bool Setup(wxWindow *parent); -}; - -/* - * wxPrintPreview - * Programmer creates an object of this class to preview a wxPrintout. - */ - -class WXDLLEXPORT wxPostScriptPrintPreview: public wxPrintPreviewBase -{ - DECLARE_CLASS(wxPostScriptPrintPreview) - - public: - wxPostScriptPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting = (wxPrintout *) NULL, wxPrintData *data = (wxPrintData *) NULL); - ~wxPostScriptPrintPreview(void); - - virtual bool Print(bool interactive); - virtual void DetermineScaling(void); -}; - -#endif - // __PRINTPSH__ diff --git a/include/wx/generic/prntdlgg.h b/include/wx/generic/prntdlgg.h deleted file mode 100644 index 1ae7148ded..0000000000 --- a/include/wx/generic/prntdlgg.h +++ /dev/null @@ -1,145 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: prntdlgg.h -// Purpose: wxGenericPrintDialog, wxGenericPrintSetupDialog, -// wxGenericPageSetupDialog -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __PRINTDLGH_G_ -#define __PRINTDLGH_G_ - -#ifdef __GNUG__ -#pragma interface "prntdlgg.h" -#endif - -#include "wx/defs.h" -#include "wx/dialog.h" -#include "wx/dc.h" -#include "wx/cmndata.h" -#include "wx/postscrp.h" - -class WXDLLEXPORT wxTextCtrl; -class WXDLLEXPORT wxButton; -class WXDLLEXPORT wxCheckBox; -class WXDLLEXPORT wxChoice; -class WXDLLEXPORT wxStaticText; -class WXDLLEXPORT wxRadioBox; - -/* - * Simulated Print and Print Setup dialogs - * for non-Windows platforms (and Windows using PostScript print/preview) - */ - -#define wxPRINTID_STATIC 10 -#define wxPRINTID_RANGE 11 -#define wxPRINTID_FROM 12 -#define wxPRINTID_TO 13 -#define wxPRINTID_COPIES 14 -#define wxPRINTID_PRINTTOFILE 15 -#define wxPRINTID_SETUP 16 - -class WXDLLEXPORT wxGenericPrintDialog: public wxDialog -{ - DECLARE_DYNAMIC_CLASS(wxGenericPrintDialog) - - public: - wxStaticText *printerMessage; - wxButton *setupButton; - wxButton *helpButton; - wxRadioBox *rangeRadioBox; - wxTextCtrl *fromText; - wxTextCtrl *toText; - wxTextCtrl *noCopiesText; - wxCheckBox *printToFileCheckBox; - wxCheckBox *collateCopiesCheckBox; - - wxPrintData printData; - wxGenericPrintDialog(wxWindow *parent, wxPrintData* data); - ~wxGenericPrintDialog(void); - - void OnSetup(wxCommandEvent& event); - void OnRange(wxCommandEvent& event); - void OnOK(wxCommandEvent& event); - - virtual bool TransferDataFromWindow(void); - virtual bool TransferDataToWindow(void); - - virtual int ShowModal(void); - - inline wxPrintData& GetPrintData(void) { return printData; } - wxDC *GetPrintDC(void); - -DECLARE_EVENT_TABLE() -}; - -#define wxPRINTID_PRINTCOLOUR 10 -#define wxPRINTID_ORIENTATION 11 -#define wxPRINTID_COMMAND 12 -#define wxPRINTID_OPTIONS 13 -#define wxPRINTID_PAPERSIZE 14 - -class WXDLLEXPORT wxGenericPrintSetupDialog: public wxDialog -{ - DECLARE_CLASS(wxGenericPrintSetupDialog) - - public: - wxRadioBox *orientationRadioBox; - wxTextCtrl *printerCommandText; - wxTextCtrl *printerOptionsText; - wxCheckBox *colourCheckBox; - wxChoice *paperTypeChoice; - - wxPrintSetupData printData; - wxGenericPrintSetupDialog(wxWindow *parent, wxPrintSetupData* data); - ~wxGenericPrintSetupDialog(void); - - virtual bool TransferDataFromWindow(void); - virtual bool TransferDataToWindow(void); - - wxChoice *CreatePaperTypeChoice(int* x, int* y); - inline wxPrintSetupData& GetPrintData(void) { return printData; } -}; - -#define wxPRINTID_LEFTMARGIN 30 -#define wxPRINTID_RIGHTMARGIN 31 -#define wxPRINTID_TOPMARGIN 32 -#define wxPRINTID_BOTTOMMARGIN 33 - -class WXDLLEXPORT wxGenericPageSetupDialog: public wxDialog -{ - DECLARE_CLASS(wxGenericPageSetupDialog) - - public: - wxButton *printerButton; - wxRadioBox *orientationRadioBox; - wxTextCtrl *marginLeftText; - wxTextCtrl *marginTopText; - wxTextCtrl *marginRightText; - wxTextCtrl *marginBottomText; - wxChoice *paperTypeChoice; - - static bool pageSetupDialogCancelled; - - wxPageSetupData pageData; - - wxGenericPageSetupDialog(wxWindow *parent, wxPageSetupData* data = (wxPageSetupData*) NULL); - ~wxGenericPageSetupDialog(void); - - virtual bool TransferDataFromWindow(void); - virtual bool TransferDataToWindow(void); - - void OnPrinter(wxCommandEvent& event); - - wxChoice *CreatePaperTypeChoice(int* x, int* y); - inline wxPageSetupData& GetPageSetupData(void) { return pageData; } - -DECLARE_EVENT_TABLE() -}; - -#endif - // __PRINTDLGH_G__ diff --git a/include/wx/generic/scrolwin.h b/include/wx/generic/scrolwin.h deleted file mode 100644 index 8a337fa77d..0000000000 --- a/include/wx/generic/scrolwin.h +++ /dev/null @@ -1,138 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: scrolwin.h -// Purpose: wxScrolledWindow class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef __SCROLWINH_G__ -#define __SCROLWINH_G__ - -#ifdef __GNUG__ -#pragma interface "scrolwin.h" -#endif - -#include "wx/window.h" - -WXDLLEXPORT_DATA(extern const char*) wxPanelNameStr; - -class WXDLLEXPORT wxScrolledWindow: public wxWindow -{ - DECLARE_ABSTRACT_CLASS(wxScrolledWindow) - -public: - wxScrolledWindow(void); - inline wxScrolledWindow(wxWindow *parent, wxWindowID id = -1, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxHSCROLL|wxVSCROLL, - const wxString& name = wxPanelNameStr) - { - Create(parent, id, pos, size, style, name); - } - - inline ~wxScrolledWindow(void) {} - - bool Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxHSCROLL|wxVSCROLL, - const wxString& name = wxPanelNameStr); - - // Set client size - // Should take account of scrollbars -// virtual void SetClientSize(int width, int size); - - // Is the window retained? -// inline bool IsRetained(void) const; - - // Number of pixels per user unit (0 or -1 for no scrollbar) - // Length of virtual canvas in user units - // Length of page in user units - virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY, - int noUnitsX, int noUnitsY, - int xPos = 0, int yPos = 0, - bool noRefresh = FALSE ); - - // Physically scroll the window - virtual void Scroll(int x_pos, int y_pos); - -#if WXWIN_COMPATIBILITY - virtual void GetScrollUnitsPerPage(int *x_page, int *y_page) const; -#endif - - int GetScrollPageSize(int orient) const ; - void SetScrollPageSize(int orient, int pageSize); - - virtual void GetScrollPixelsPerUnit(int *x_unit, int *y_unit) const; - // Enable/disable Windows scrolling in either direction. - // If TRUE, wxWindows scrolls the canvas and only a bit of - // the canvas is invalidated; no Clear() is necessary. - // If FALSE, the whole canvas is invalidated and a Clear() is - // necessary. Disable for when the scroll increment is used - // to actually scroll a non-constant distance - virtual void EnableScrolling(bool x_scrolling, bool y_scrolling); - - // Get the view start - virtual void ViewStart(int *x, int *y) const; - - // Actual size in pixels when scrolling is taken into account - virtual void GetVirtualSize(int *x, int *y) const; - - // Set the scale factor, used in PrepareDC - inline void SetScale(double xs, double ys) { m_scaleX = xs; m_scaleY = ys; } - inline double GetScaleX() const { return m_scaleX; } - inline double GetScaleY() const { return m_scaleY; } - - virtual void CalcScrolledPosition(int x, int y, int *xx, int *yy) const ; - virtual void CalcUnscrolledPosition(int x, int y, float *xx, float *yy) const ; - - // Adjust the scrollbars - virtual void AdjustScrollbars(void); - - void OnScroll(wxScrollEvent& event); - void OnSize(wxSizeEvent& event); - void OnPaint(wxPaintEvent& event); - - // Override this function to draw the graphic. - virtual void OnDraw(wxDC& WXUNUSED(dc)) {}; - - // Override this function if you don't want to have wxScrolledWindow - // automatically change the origin according to the scroll position. - virtual void PrepareDC(wxDC& dc); - -public: - //////////////////////////////////////////////////////////////////////// - //// IMPLEMENTATION - - // Calculate scroll increment - virtual int CalcScrollInc(wxScrollEvent& event); - - //////////////////////////////////////////////////////////////////////// - //// PROTECTED DATA -protected: - int m_xScrollPixelsPerLine; - int m_yScrollPixelsPerLine; - bool m_xScrollingEnabled; - bool m_yScrollingEnabled; - int m_xScrollPosition; - int m_yScrollPosition; - int m_xScrollLines; - int m_yScrollLines; - int m_xScrollLinesPerPage; - int m_yScrollLinesPerPage; - double m_scaleX; - double m_scaleY; - -DECLARE_EVENT_TABLE() -}; - -//////////////////////////////////////////////////////////////////////// -//// INLINES - -#endif - // __SCROLWINH_G__ diff --git a/include/wx/generic/splitter.h b/include/wx/generic/splitter.h deleted file mode 100644 index f128338dc7..0000000000 --- a/include/wx/generic/splitter.h +++ /dev/null @@ -1,180 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: splitter.h -// Purpose: wxSplitterWindow class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef __SPLITTERH_G__ -#define __SPLITTERH_G__ - -#ifdef __GNUG__ -#pragma interface "splitter.h" -#endif - -#include "wx/defs.h" -#include "wx/window.h" -#include "wx/string.h" - -#define WXSPLITTER_VERSION 1.0 - -#define wxSPLIT_HORIZONTAL 1 -#define wxSPLIT_VERTICAL 2 - -#define wxSPLIT_DRAG_NONE 0 -#define wxSPLIT_DRAG_DRAGGING 1 -#define wxSPLIT_DRAG_LEFT_DOWN 2 - -/* - * wxSplitterWindow maintains one or two panes, with - * an optional vertical or horizontal split which - * can be used with the mouse or programmatically. - */ - -// TODO: -// 1) Perhaps make the borders sensitive to dragging in order to create a split. -// The MFC splitter window manages scrollbars as well so is able to -// put sash buttons on the scrollbars, but we probably don't want to go down -// this path. -// 2) for wxWindows 2.0, we must find a way to set the WS_CLIPCHILDREN style -// to prevent flickering. (WS_CLIPCHILDREN doesn't work in all cases so can't be -// standard). - -class WXDLLEXPORT wxSplitterWindow: public wxWindow -{ - DECLARE_DYNAMIC_CLASS(wxSplitterWindow) - - public: - -//////////////////////////////////////////////////////////////////////////// -// Public API - - // Default constructor - wxSplitterWindow(void); - - // Normal constructor - wxSplitterWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = wxSP_3D|wxCLIP_CHILDREN, const wxString& name = "splitter"); - ~wxSplitterWindow(void); - - // Gets the only or left/top pane - inline wxWindow *GetWindow1(void) { return m_windowOne; } - - // Gets the right/bottom pane - inline wxWindow *GetWindow2(void) { return m_windowTwo; } - - // Sets the split mode - inline void SetSplitMode(int mode) { m_splitMode = mode; } - - // Gets the split mode - inline int GetSplitMode(void) const { return m_splitMode; }; - - // Initialize with one window - void Initialize(wxWindow *window); - - // Associates the given window with window 2, drawing the appropriate sash - // and changing the split mode. - // Does nothing and returns FALSE if the window is already split. - // A sashPosition of -1 means choose a default sash position. - bool SplitVertically(wxWindow *window1, wxWindow *window2, int sashPosition = -1); - bool SplitHorizontally(wxWindow *window1, wxWindow *window2, int sashPosition = -1); - - // Removes the specified (or second) window from the view - // Doesn't actually delete the window. - bool Unsplit(wxWindow *toRemove = (wxWindow *) NULL); - - // Is the window split? - inline bool IsSplit(void) const { return (m_windowTwo != NULL); } - - // Sets the sash size - inline void SetSashSize(int width) { m_sashSize = width; } - - // Sets the border size - inline void SetBorderSize(int width) { m_borderSize = width; } - - // Gets the sash size - inline int GetSashSize(void) const { return m_sashSize; } - - // Gets the border size - inline int GetBorderSize(void) const { return m_borderSize; } - - // Set the sash position - void SetSashPosition(int position, bool redaw = TRUE); - - // Gets the sash position - inline int GetSashPosition(void) const { return m_sashPosition; } - - // If this is zero, we can remove panes by dragging the sash. - inline void SetMinimumPaneSize(int min) { m_minimumPaneSize = min; } - inline int GetMinimumPaneSize(void) const { return m_minimumPaneSize; } - - // If the sash is moved to an extreme position, a subwindow - // is removed from the splitter window, and the app is - // notified. The app should delete or hide the window. - virtual void OnUnsplit(wxWindow *removed) { removed->Show(FALSE); } - - // Called when the sash is double-clicked. - // The default behaviour is to remove the sash if the - // minimum pane size is zero. - virtual void OnDoubleClickSash(int x, int y); - -//////////////////////////////////////////////////////////////////////////// -// Implementation - - // Paints the border and sash - void OnPaint(wxPaintEvent& event); - - // Handles mouse events - void OnMouseEvent(wxMouseEvent& ev); - - // Adjusts the panes - void OnSize(wxSizeEvent& event); - - // Draws borders - void DrawBorders(wxDC& dc); - - // Draws the sash - void DrawSash(wxDC& dc); - - // Draws the sash tracker (for whilst moving the sash) - void DrawSashTracker(int x, int y); - - // Tests for x, y over sash - bool SashHitTest(int x, int y, int tolerance = 2); - - // Resizes subwindows - void SizeWindows(void); - - // Initialize colours - void InitColours(void); - - protected: - int m_splitMode; - wxWindow* m_windowOne; - wxWindow* m_windowTwo; - int m_dragMode; - int m_oldX; - int m_oldY; - int m_borderSize; - int m_sashSize; // Sash width or height - int m_sashPosition; // Number of pixels from left or top - int m_firstX; - int m_firstY; - int m_minimumPaneSize; - wxCursor* m_sashCursorWE; - wxCursor* m_sashCursorNS; - wxPen* m_sashTrackerPen; - wxPen* m_lightShadowPen; - wxPen* m_mediumShadowPen; - wxPen* m_darkShadowPen; - wxPen* m_hilightPen; - wxBrush* m_faceBrush; - wxPen* m_facePen; -DECLARE_EVENT_TABLE() -}; - -#endif diff --git a/include/wx/generic/statusbr.h b/include/wx/generic/statusbr.h deleted file mode 100644 index d6a6909b0f..0000000000 --- a/include/wx/generic/statusbr.h +++ /dev/null @@ -1,92 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: statusbr.h -// Purpose: wxStatusBar class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef __STATUSBRH_G__ -#define __STATUSBRH_G__ - -#ifdef __GNUG__ -#pragma interface "statusbr.h" -#endif - -#include "wx/window.h" - -WXDLLEXPORT_DATA(extern const char*) wxPanelNameStr; - -class WXDLLEXPORT wxStatusBar: public wxWindow -{ - DECLARE_DYNAMIC_CLASS(wxStatusBar) - -public: - wxStatusBar(void); - inline wxStatusBar(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxPanelNameStr) - { - Create(parent, id, pos, size, style, name); - } - - ~wxStatusBar(); - - bool Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxPanelNameStr); - - // Create status line - virtual void SetFieldsCount(int number=1, const int widths[] = (const int *) NULL); - inline int GetFieldsCount() const { return m_nFields; } - - // Set status line text - virtual void SetStatusText(const wxString& text, int number = 0); - virtual wxString GetStatusText(int number = 0) const; - - // Set status line widths - virtual void SetStatusWidths(int n, const int widths_field[]); - - virtual void DrawFieldText(wxDC& dc, int i); - virtual void DrawField(wxDC& dc, int i); - - // Get the position and size of the field's internal bounding rectangle - virtual bool GetFieldRect(int i, wxRectangle& rect) const; - - inline int GetBorderX() const { return m_borderX; } - inline int GetBorderY() const { return m_borderY; } - inline void SetBorderX(int x); - inline void SetBorderY(int y); - - //////////////////////////////////////////////////////////////////////// - // Implementation - - void OnPaint(wxPaintEvent& event); - - virtual void InitColours(); - - // Responds to colour changes - void OnSysColourChanged(wxSysColourChangedEvent& event); - -protected: - int * m_statusWidths; - int m_nFields; - wxString * m_statusStrings; - int m_borderX; - int m_borderY; - wxFont m_defaultStatusBarFont; - wxPen m_mediumShadowPen; - wxPen m_hilightPen; - - DECLARE_EVENT_TABLE() -}; - -#endif - // __STATUSBRH_G__ diff --git a/include/wx/generic/tabg.h b/include/wx/generic/tabg.h deleted file mode 100644 index 0924fa0c2d..0000000000 --- a/include/wx/generic/tabg.h +++ /dev/null @@ -1,343 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tabg.h -// Purpose: Generic tabbed dialogs -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __TABGH_G__ -#define __TABGH_G__ - -#ifdef __GNUG__ -#pragma interface "tabg.h" -#endif - -#define WXTAB_VERSION 1.1 - -#include "wx/hash.h" -#include "wx/string.h" - -class wxTabView; - -/* - * A wxTabControl is the internal and visual representation - * of the tab. - */ - -class wxTabControl: public wxObject -{ -DECLARE_DYNAMIC_CLASS(wxTabControl) -public: - wxTabControl(wxTabView *v = (wxTabView *) NULL); - ~wxTabControl(void); - - virtual void OnDraw(wxDC& dc, bool lastInRow); - inline void SetLabel(const wxString& str) { m_controlLabel = str; } - inline wxString GetLabel(void) const { return m_controlLabel; } - - inline void SetFont(wxFont *f) { m_labelFont = f; } - inline wxFont *GetFont(void) const { return m_labelFont; } - - inline void SetSelected(bool sel) { m_isSelected = sel; } - inline bool IsSelected(void) const { return m_isSelected; } - - inline void SetPosition(int x, int y) { m_offsetX = x; m_offsetY = y; } - inline void SetSize(int x, int y) { m_width = x; m_height = y; } - - inline void SetRowPosition(int r) { m_rowPosition = r; } - inline int GetRowPosition() const { return m_rowPosition; } - inline void SetColPosition(int c) { m_colPosition = c; } - inline int GetColPosition() const { return m_colPosition; } - - inline int GetX(void) const { return m_offsetX; } - inline int GetY(void) const { return m_offsetY; } - inline int GetWidth(void) const { return m_width; } - inline int GetHeight(void) const { return m_height; } - - inline int GetId(void) const { return m_id; } - inline void SetId(int i) { m_id = i; } - - virtual bool HitTest(int x, int y) const ; - -protected: - wxTabView* m_view; - wxString m_controlLabel; - bool m_isSelected; - wxFont* m_labelFont; - int m_offsetX; // Offsets from top-left of tab view area (the area below the tabs) - int m_offsetY; - int m_width; - int m_height; - int m_id; - int m_rowPosition; // Position in row from 0 - int m_colPosition; // Position in col from 0 -}; - -/* - * Each wxTabLayer is a list of tabs. E.g. there - * are 3 layers in the MS Word Options dialog. - */ - -class wxTabLayer: public wxList -{ - DECLARE_DYNAMIC_CLASS(wxTabLayer) - public: - wxTabLayer(void) - { - } -}; - -/* - * The wxTabView controls and draws the tabbed object - */ - -#define wxTAB_STYLE_DRAW_BOX 1 // Draws 3D boxes round tab layers -#define wxTAB_STYLE_COLOUR_INTERIOR 2 // Colours interior of tabs, otherwise draws outline - -class wxTabView: public wxObject -{ -DECLARE_DYNAMIC_CLASS(wxTabView) -public: - wxTabView(long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR); - ~wxTabView(); - - inline int GetNumberOfLayers() const { return m_layers.Number(); } - inline wxList& GetLayers() { return m_layers; } - - inline void SetWindow(wxWindow* wnd) { m_window = wnd; } - inline wxWindow* GetWindow(void) const { return m_window; } - - // Automatically positions tabs - wxTabControl *AddTab(int id, const wxString& label, wxTabControl *existingTab = (wxTabControl *) NULL); - - void ClearTabs(bool deleteTabs = TRUE); - - // Layout tabs (optional, e.g. if resizing window) - void Layout(void); - - // Draw all tabs - virtual void Draw(wxDC& dc); - - // Process mouse event, return FALSE if we didn't process it - virtual bool OnEvent(wxMouseEvent& event); - - // Called when a tab is activated - virtual void OnTabActivate(int activateId, int deactivateId); - // Allows vetoing - virtual bool OnTabPreActivate(int WXUNUSED(activateId), int WXUNUSED(deactivateId) ) { return TRUE; }; - - // Allows use of application-supplied wxTabControl classes. - virtual wxTabControl *OnCreateTabControl(void) { return new wxTabControl(this); } - - void SetHighlightColour(const wxColour& col); - void SetShadowColour(const wxColour& col); - void SetBackgroundColour(const wxColour& col); - inline void SetTextColour(const wxColour& col) { m_textColour = col; } - - inline wxColour GetHighlightColour(void) const { return m_highlightColour; } - inline wxColour GetShadowColour(void) const { return m_shadowColour; } - inline wxColour GetBackgroundColour(void) const { return m_backgroundColour; } - inline wxColour GetTextColour(void) const { return m_textColour; } - inline wxPen *GetHighlightPen(void) const { return m_highlightPen; } - inline wxPen *GetShadowPen(void) const { return m_shadowPen; } - inline wxPen *GetBackgroundPen(void) const { return m_backgroundPen; } - inline wxBrush *GetBackgroundBrush(void) const { return m_backgroundBrush; } - - inline void SetViewRect(const wxRectangle& rect) { m_tabViewRect = rect; } - inline wxRect GetViewRect(void) const { return m_tabViewRect; } - - // Calculate tab width to fit to view, and optionally adjust the view - // to fit the tabs exactly. - int CalculateTabWidth(int noTabs, bool adjustView = FALSE); - - inline void SetTabStyle(long style) { m_tabStyle = style; } - inline long GetTabStyle(void) const { return m_tabStyle; } - - inline void SetTabSize(int w, int h) { m_tabWidth = w; m_tabHeight = h; } - inline int GetTabWidth(void) const { return m_tabWidth; } - inline int GetTabHeight(void) const { return m_tabHeight; } - inline void SetTabSelectionHeight(int h) { m_tabSelectionHeight = h; } - inline int GetTabSelectionHeight(void) const { return m_tabSelectionHeight; } - - inline int GetTopMargin(void) const { return m_topMargin; } - inline void SetTopMargin(int margin) { m_topMargin = margin; } - - void SetTabSelection(int sel, bool activateTool = TRUE); - inline int GetTabSelection() const { return m_tabSelection; } - - // Find tab control for id - wxTabControl *FindTabControlForId(int id) const ; - - // Find tab control for layer, position (starting from zero) - wxTabControl *FindTabControlForPosition(int layer, int position) const ; - - inline int GetHorizontalTabOffset() const { return m_tabHorizontalOffset; } - inline int GetHorizontalTabSpacing() const { return m_tabHorizontalSpacing; } - inline void SetHorizontalTabOffset(int sp) { m_tabHorizontalOffset = sp; } - inline void SetHorizontalTabSpacing(int sp) { m_tabHorizontalSpacing = sp; } - - inline void SetVerticalTabTextSpacing(int s) { m_tabVerticalTextSpacing = s; } - inline int GetVerticalTabTextSpacing() const { return m_tabVerticalTextSpacing; } - - inline wxFont *GetTabFont() const { return m_tabFont; } - inline void SetTabFont(wxFont *f) { m_tabFont = f; } - - inline wxFont *GetSelectedTabFont() const { return m_tabSelectedFont; } - inline void SetSelectedTabFont(wxFont *f) { m_tabSelectedFont = f; } - // Find the node and the column at which this control is positioned. - wxNode *FindTabNodeAndColumn(wxTabControl *control, int *col) const ; - - // Do the necessary to change to this tab - virtual bool ChangeTab(wxTabControl *control); - - // Move the selected tab to the bottom layer, if necessary, - // without calling app activation code - bool MoveSelectionTab(wxTabControl *control); - - inline int GetNumberOfTabs() const { return m_noTabs; } - -protected: - // List of layers, from front to back. - wxList m_layers; - - // Selected tab - int m_tabSelection; - - // Usual tab height - int m_tabHeight; - - // The height of the selected tab - int m_tabSelectionHeight; - - // Usual tab width - int m_tabWidth; - - // Space between tabs - int m_tabHorizontalSpacing; - - // Space between top of normal tab and text - int m_tabVerticalTextSpacing; - - // Horizontal offset of each tab row above the first - int m_tabHorizontalOffset; - - // The distance between the bottom of the first tab row - // and the top of the client area (i.e. the margin) - int m_topMargin; - - // The position and size of the view above which the tabs are placed. - // I.e., the internal client area of the sheet. - wxRect m_tabViewRect; - - // Bitlist of styles - long m_tabStyle; - - // Colours - wxColour m_highlightColour; - wxColour m_shadowColour; - wxColour m_backgroundColour; - wxColour m_textColour; - - // Pen and brush cache - wxPen* m_highlightPen; - wxPen* m_shadowPen; - wxPen* m_backgroundPen; - wxBrush* m_backgroundBrush; - - wxFont* m_tabFont; - wxFont* m_tabSelectedFont; - - int m_noTabs; - - wxWindow* m_window; -}; - -/* - * A dialog box class that is tab-friendly - */ - -class wxTabbedDialog: public wxDialog -{ -DECLARE_DYNAMIC_CLASS(wxTabbedDialog) - -public: - - wxTabbedDialog(wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long windowStyle = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxDialogNameStr); - ~wxTabbedDialog(void); - - inline wxTabView *GetTabView() const { return m_tabView; } - inline void SetTabView(wxTabView *v) { m_tabView = v; } - - void OnCloseWindow(wxCloseEvent& event); - void OnMouseEvent(wxMouseEvent& event); - void OnPaint(wxPaintEvent& event); - -protected: - wxTabView* m_tabView; - -DECLARE_EVENT_TABLE() -}; - -/* - * A panel class that is tab-friendly - */ - -class wxTabbedPanel: public wxPanel -{ -DECLARE_DYNAMIC_CLASS(wxTabbedPanel) - -public: - - wxTabbedPanel(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long windowStyle = 0, const wxString& name = wxPanelNameStr); - ~wxTabbedPanel(void); - - inline wxTabView *GetTabView() const { return m_tabView; } - inline void SetTabView(wxTabView *v) { m_tabView = v; } - - void OnMouseEvent(wxMouseEvent& event); - void OnPaint(wxPaintEvent& event); - -protected: - wxTabView* m_tabView; - -DECLARE_EVENT_TABLE() -}; - -class wxPanelTabView: public wxTabView -{ -DECLARE_DYNAMIC_CLASS(wxPanelTabView) -public: - wxPanelTabView(wxPanel *pan, long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR); - ~wxPanelTabView(void); - - // Called when a tab is activated - virtual void OnTabActivate(int activateId, int deactivateId); - - // Specific to this class - void AddTabWindow(int id, wxWindow *window); - wxWindow *GetTabWindow(int id) const ; - void ClearWindows(bool deleteWindows = TRUE); - inline wxWindow *GetCurrentWindow() const { return m_currentWindow; } - - void ShowWindowForTab(int id); - -protected: - // List of panels, one for each tab. Indexed - // by tab ID. - wxList m_tabWindows; - wxWindow* m_currentWindow; - wxPanel* m_panel; -}; - -#endif - diff --git a/include/wx/generic/textdlgg.h b/include/wx/generic/textdlgg.h deleted file mode 100644 index 5b5eccb267..0000000000 --- a/include/wx/generic/textdlgg.h +++ /dev/null @@ -1,51 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: textdlgg.h -// Purpose: wxStatusBar class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef __TEXTDLGH_G__ -#define __TEXTDLGH_G__ - -#ifdef __GNUG__ -#pragma interface "textdlgg.h" -#endif - -#include "wx/setup.h" -#include "wx/dialog.h" - -// Handy dialog functions (will be converted into classes at some point) -WXDLLEXPORT_DATA(extern const char*) wxGetTextFromUserPromptStr; -WXDLLEXPORT_DATA(extern const char*) wxEmptyString; - -#define wxID_TEXT 3000 - -class WXDLLEXPORT wxTextEntryDialog: public wxDialog -{ -DECLARE_DYNAMIC_CLASS(wxTextEntryDialog) -protected: - long m_dialogStyle; - wxString m_value; -public: - wxTextEntryDialog(wxWindow *parent, const wxString& message, const wxString& caption = wxGetTextFromUserPromptStr, - const wxString& value = wxEmptyString, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); - - inline void SetValue(const wxString& val) { m_value = val; } - inline wxString GetValue(void) const { return m_value; } - - void OnOK(wxCommandEvent& event); - -DECLARE_EVENT_TABLE() -}; - -wxString WXDLLEXPORT wxGetTextFromUser(const wxString& message, const wxString& caption = wxGetTextFromUserPromptStr, - const wxString& default_value = wxEmptyString, wxWindow *parent = (wxWindow *) NULL, - int x = -1, int y = -1, bool centre = TRUE); - -#endif - // __TEXTDLGH_G__ diff --git a/include/wx/generic/treectrl.h b/include/wx/generic/treectrl.h deleted file mode 100644 index 8e9af20297..0000000000 --- a/include/wx/generic/treectrl.h +++ /dev/null @@ -1,351 +0,0 @@ -/* - * Author: Robert Roebling - * - * Copyright: (C) 1997,1998 Robert Roebling - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the wxWindows Licence, which - * you have received with this library (see Licence.htm). - * - */ - -#ifndef __GTKTREECTRLH_G__ -#define __GTKTREECTRLH_G__ - -#ifdef __GNUG__ -#pragma interface "treectrl.h" -#endif - -#include "wx/defs.h" -#include "wx/string.h" -#include "wx/list.h" -#include "wx/control.h" -#include "wx/event.h" -#include "wx/imaglist.h" -#include "wx/scrolwin.h" -#include "wx/dcclient.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxTreeItem; -class wxTreeEvent; - -class wxGenericTreeItem; -class wxTreeCtrl; - -class wxImageList; - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -// WXDLLEXPORT extern const char *wxTreeNameStr; - -#define wxTREE_MASK_HANDLE 0x0001 -#define wxTREE_MASK_STATE 0x0002 -#define wxTREE_MASK_TEXT 0x0004 -#define wxTREE_MASK_IMAGE 0x0008 -#define wxTREE_MASK_SELECTED_IMAGE 0x0010 -#define wxTREE_MASK_CHILDREN 0x0020 -#define wxTREE_MASK_DATA 0x0040 - -#define wxTREE_STATE_BOLD 0x0001 -#define wxTREE_STATE_DROPHILITED 0x0002 -#define wxTREE_STATE_EXPANDED 0x0004 -#define wxTREE_STATE_EXPANDEDONCE 0x0008 -#define wxTREE_STATE_FOCUSED 0x0010 -#define wxTREE_STATE_SELECTED 0x0020 -#define wxTREE_STATE_CUT 0x0040 - -#define wxTREE_HITTEST_ABOVE 0x0001 // Above the client area. -#define wxTREE_HITTEST_BELOW 0x0002 // Below the client area. -#define wxTREE_HITTEST_NOWHERE 0x0004 // In the client area but below the last item. -#define wxTREE_HITTEST_ONITEMBUTTON 0x0010 // On the button associated with an item. -#define wxTREE_HITTEST_ONITEMICON 0x0020 // On the bitmap associated with an item. -#define wxTREE_HITTEST_ONITEMINDENT 0x0040 // In the indentation associated with an item. -#define wxTREE_HITTEST_ONITEMLABEL 0x0080 // On the label (string) associated with an item. -#define wxTREE_HITTEST_ONITEMRIGHT 0x0100 // In the area to the right of an item. -#define wxTREE_HITTEST_ONITEMSTATEICON 0x0200 // On the state icon for a tree view item that is in a user-defined state. -#define wxTREE_HITTEST_TOLEFT 0x0400 // To the right of the client area. -#define wxTREE_HITTEST_TORIGHT 0x0800 // To the left of the client area. - -#define wxTREE_HITTEST_ONITEM (wxTREE_HITTEST_ONITEMICON | wxTREE_HITTEST_ONITEMLABEL | wxTREE_HITTEST_ONITEMSTATEICON) - -// Flags for GetNextItem -enum { - wxTREE_NEXT_CARET, // Retrieves the currently selected item. - wxTREE_NEXT_CHILD, // Retrieves the first child item. The hItem parameter must be NULL. - wxTREE_NEXT_DROPHILITE, // Retrieves the item that is the target of a drag-and-drop operation. - wxTREE_NEXT_FIRSTVISIBLE, // Retrieves the first visible item. - wxTREE_NEXT_NEXT, // Retrieves the next sibling item. - wxTREE_NEXT_NEXTVISIBLE, // Retrieves the next visible item that follows the specified item. - wxTREE_NEXT_PARENT, // Retrieves the parent of the specified item. - wxTREE_NEXT_PREVIOUS, // Retrieves the previous sibling item. - wxTREE_NEXT_PREVIOUSVISIBLE, // Retrieves the first visible item that precedes the specified item. - wxTREE_NEXT_ROOT // Retrieves the first child item of the root item of which the specified item is a part. -}; - -// Flags for ExpandItem -enum { - wxTREE_EXPAND_EXPAND, - wxTREE_EXPAND_COLLAPSE, - wxTREE_EXPAND_COLLAPSE_RESET, - wxTREE_EXPAND_TOGGLE -}; - -// Flags for InsertItem -enum { - wxTREE_INSERT_LAST = -1, - wxTREE_INSERT_FIRST = -2, - wxTREE_INSERT_SORT = -3 -}; - -/* defined in "wx/event.h" - wxEVT_COMMAND_TREE_BEGIN_DRAG, - wxEVT_COMMAND_TREE_BEGIN_RDRAG, - wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, - wxEVT_COMMAND_TREE_END_LABEL_EDIT, - wxEVT_COMMAND_TREE_DELETE_ITEM, - wxEVT_COMMAND_TREE_GET_INFO, - wxEVT_COMMAND_TREE_SET_INFO, - wxEVT_COMMAND_TREE_ITEM_EXPANDED, - wxEVT_COMMAND_TREE_ITEM_EXPANDING, - wxEVT_COMMAND_TREE_SEL_CHANGED, - wxEVT_COMMAND_TREE_SEL_CHANGING, - wxEVT_COMMAND_TREE_KEY_DOWN -*/ - -//----------------------------------------------------------------------------- -// wxTreeItem -//----------------------------------------------------------------------------- - -class WXDLLEXPORT wxTreeItem: public wxObject -{ -public: - long m_mask; - long m_itemId; - long m_state; - long m_stateMask; - wxString m_text; - int m_image; - int m_selectedImage; - int m_children; - long m_data; - - wxTreeItem(); - - // Accessors - inline long GetMask() const { return m_mask; } - inline long GetItemId() const { return m_itemId; } - inline long GetState() const { return m_state; } - inline long GetStateMask() const { return m_stateMask; } - inline wxString GetText() const { return m_text; } - inline int GetImage() const { return m_image; } - inline int GetSelectedImage() const { return m_selectedImage; } - inline int GetChildren() const { return m_children; } - inline long GetData() const { return m_data; } - - inline void SetMask(long mask) { m_mask = mask; } - inline void SetItemId(long id) { m_itemId = m_itemId = id; } - inline void GetState(long state) { m_state = state; } - inline void SetStateMask(long stateMask) { m_stateMask = stateMask; } - inline void GetText(const wxString& text) { m_text = text; } - inline void SetImage(int image) { m_image = image; } - inline void SetSelectedImage(int selImage) { m_selectedImage = selImage; } - inline void SetChildren(int children) { m_children = children; } - inline void SetData(long data) { m_data = data; } - - DECLARE_DYNAMIC_CLASS(wxTreeItem) -}; - -//----------------------------------------------------------------------------- -// wxTreeEvent -//----------------------------------------------------------------------------- - -class WXDLLEXPORT wxTreeEvent: public wxCommandEvent -{ - DECLARE_DYNAMIC_CLASS(wxTreeEvent) - - public: - wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0); - - int m_code; - wxTreeItem m_item; - long m_oldItem; - wxPoint m_pointDrag; - - inline long GetOldItem() const { return m_oldItem; } - inline wxTreeItem& GetItem() const { return (wxTreeItem&) m_item; } - inline wxPoint GetPoint() const { return m_pointDrag; } - inline void SetCode(int code) { m_code = code; } - inline int GetCode() const { return m_code; } -}; - -typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); - -#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, - -//----------------------------------------------------------------------------- -// wxGenericTreeItem -//----------------------------------------------------------------------------- - -class WXDLLEXPORT wxGenericTreeItem: public wxTreeItem -{ - DECLARE_DYNAMIC_CLASS(wxGenericTreeItem) - - public: - bool m_hasChildren, - m_isCollapsed; - - int m_x,m_y; - int m_height,m_width; - int m_xCross,m_yCross; - int m_level; - wxList m_children; - wxGenericTreeItem *m_parent; - bool m_hasHilight; - - wxGenericTreeItem() {}; - wxGenericTreeItem( wxGenericTreeItem *parent ); - wxGenericTreeItem( wxGenericTreeItem *parent, const wxTreeItem& item, wxDC *dc ); - void SetItem( const wxTreeItem &item, wxDC *dc ); - void SetText( const wxString &text, wxDC *dc ); - void Reset(); - void GetItem( wxTreeItem &item ) const; - void AddChild( const wxTreeItem &item ); - bool HasChildren(); - bool HasPlus(); - int NumberOfVisibleDescendents(); - int NumberOfVisibleChildren(); - wxGenericTreeItem *FindItem( long itemId ) const; - void AddChild( wxGenericTreeItem *child ); - void SetCross( int x, int y ); - void GetSize( int &x, int &y ); - long HitTest( const wxPoint& point, int &flags ); - void PrepareEvent( wxTreeEvent &event ); - void SendKeyDown( wxWindow *target ); - void SendSelected( wxWindow *target ); - void SendDelete( wxWindow *target ); - void SendExpand( wxWindow *target ); - void SendCollapse( wxWindow *target ); - void SetHilight( bool set = TRUE ); - bool HasHilight(); - bool IsExpanded() const { return !m_isCollapsed; } -}; - -//----------------------------------------------------------------------------- -// wxTreeCtrl -//----------------------------------------------------------------------------- - -class wxTreeCtrl: public wxScrolledWindow -{ -public: - wxTreeCtrl(); - wxTreeCtrl(wxWindow *parent, const wxWindowID id = -1, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxTR_HAS_BUTTONS, - const wxString& name = "wxTreeCtrl" ); - ~wxTreeCtrl(); - bool Create(wxWindow *parent, const wxWindowID id = -1, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxTR_HAS_BUTTONS, - const wxString& name = "wxTreeCtrl"); - - int GetCount() const; - long InsertItem( long parent, const wxString& label, int image = -1, - int selImage = -1, long insertAfter = wxTREE_INSERT_LAST ); - long InsertItem( long parent, wxTreeItem &info, - long insertAfter = wxTREE_INSERT_LAST ); - void DeleteItem( long item ); - void DeleteChildren( long item ); - bool DeleteAllItems(); - bool ExpandItem(long item) { return ExpandItem(item, wxTREE_EXPAND_EXPAND); } - bool CollapseItem(long item) { return ExpandItem(item, wxTREE_EXPAND_COLLAPSE); } - bool ToggleItem(long item) { return ExpandItem(item, wxTREE_EXPAND_TOGGLE); } - bool ExpandItem( long item, int action ); - - // is the item expanded now? - bool IsItemExpanded(long item) - { - wxGenericTreeItem *pItem = FindItem(item); - return pItem && (pItem->GetState() & wxTREE_STATE_EXPANDED); - } - - bool GetItem( wxTreeItem &info ) const; - long GetItemData( long item ) const; - wxString GetItemText( long item ) const; - int GetItemImage(long item) const; - long GetParent( long item ) const; - long GetRootItem() const; - long GetChild(long item) const; - long GetNextItem(long item, int code) const; - long GetSelection() const; - bool SelectItem( long item ); - bool ItemHasChildren( long item ) const; - void SetIndent( int indent ); - int GetIndent() const; - bool SetItem( wxTreeItem &info ); - bool SetItemData( long item, long data ); - bool SetItemText( long item, const wxString &text ); - void SetItemImage(long item, int image, int imageSel) const; - long HitTest( const wxPoint& point, int &flags ); - - int GetItemState(long item, long stateMask) const; - bool SetItemState(long item, long state, long stateMask); - - void AdjustMyScrollbars(); - void PaintLevel( wxGenericTreeItem *item, wxPaintDC &dc, int level, int &y ); - void OnPaint( const wxPaintEvent &event ); - void OnSetFocus( const wxFocusEvent &event ); - void OnKillFocus( const wxFocusEvent &event ); - void OnChar( wxKeyEvent &event ); - void OnMouse( const wxMouseEvent &event ); - - wxImageList *GetImageList(int which = wxIMAGE_LIST_NORMAL) const; - void SetImageList(wxImageList *imageList, int which = wxIMAGE_LIST_NORMAL); - -private: - // set the selection to the specified item generating appropriate event(s) - void SelectItem(wxGenericTreeItem *item); - - wxGenericTreeItem *m_anchor; - wxGenericTreeItem *m_current; - bool m_hasFocus; - int m_xScroll,m_yScroll; - int m_indent; - long m_lastId; - int m_lineHeight; - wxPen m_dottedPen; - bool m_isCreated; - wxBrush *m_hilightBrush; - wxImageList *m_imageList; - wxImageList *m_smallImageList; - - void CalculateLevel( wxGenericTreeItem *item, wxPaintDC &dc, int level, int &y ); - void CalculatePositions(); - wxGenericTreeItem *FindItem( long itemId ) const; - void RefreshLine( wxGenericTreeItem *item ); - - DECLARE_EVENT_TABLE() - DECLARE_DYNAMIC_CLASS(wxTreeCtrl) -}; - -#endif - // __GTKTREECTRLH_G__ diff --git a/include/wx/grid.h b/include/wx/grid.h deleted file mode 100644 index 668f69a3e3..0000000000 --- a/include/wx/grid.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef _WX_GRID_H_BASE_ -#define _WX_GRID_H_BASE_ - -#include "wx/generic/gridg.h" - -#ifndef wxGrid -#define wxGrid wxGenericGrid -#endif - -#endif - // _WX_GRID_H_BASE_ diff --git a/include/wx/gtk/accel.h b/include/wx/gtk/accel.h deleted file mode 100644 index 44bfd043ae..0000000000 --- a/include/wx/gtk/accel.h +++ /dev/null @@ -1,106 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: accel.h -// Purpose: wxAcceleratorTable class -// Author: Robert -// Modified by: -// RCS-ID: -// Copyright: (c) Robert Roebling -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __GTKACCELH__ -#define __GTKACCELH__ - -#ifdef __GNUG__ -#pragma interface "accel.h" -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/event.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxAcceleratorEntry; -class wxAcceleratorTable; - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -extern wxAcceleratorTable wxNullAcceleratorTable; - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -// Hold Ctrl key down -#define wxACCEL_ALT 0x01 - -// Hold Ctrl key down -#define wxACCEL_CTRL 0x02 - - // Hold Shift key down -#define wxACCEL_SHIFT 0x04 - - // Hold no other key -#define wxACCEL_NORMAL 0x00 - -//----------------------------------------------------------------------------- -// wxAcceleratorEntry -//----------------------------------------------------------------------------- - -class wxAcceleratorEntry -{ - public: - - wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0) - { m_flags = flags; m_keyCode = keyCode; m_command = cmd; } - - inline void Set(int flags, int keyCode, int cmd) - { m_flags = flags; m_keyCode = keyCode; m_command = cmd; } - - inline int GetFlags() const { return m_flags; } - inline int GetKeyCode() const { return m_keyCode; } - inline int GetCommand() const { return m_command; } - - int m_flags; - int m_keyCode; // ASCII or virtual keycode - int m_command; // Command id to generate -}; - -//----------------------------------------------------------------------------- -// wxAcceleratorTable -//----------------------------------------------------------------------------- - -class wxAcceleratorTable: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxAcceleratorTable) - - public: - wxAcceleratorTable(); - wxAcceleratorTable(int n, wxAcceleratorEntry entries[] ); - ~wxAcceleratorTable(); - - inline wxAcceleratorTable(const wxAcceleratorTable& accel) - { Ref(accel); } - inline wxAcceleratorTable(const wxAcceleratorTable* accel) - { if (accel) Ref(*accel); } - inline wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) - { if (*this == accel) return (*this); Ref(accel); return *this; } - inline bool operator == (const wxAcceleratorTable& accel) - { return m_refData == accel.m_refData; } - inline bool operator != (const wxAcceleratorTable& accel) - { return m_refData != accel.m_refData; } - - bool Ok() const; - -// private: - - int GetCommand( wxKeyEvent &event ); - -}; - -#endif diff --git a/include/wx/gtk/app.h b/include/wx/gtk/app.h deleted file mode 100644 index 53f89a2abe..0000000000 --- a/include/wx/gtk/app.h +++ /dev/null @@ -1,134 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: app.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __GTKAPPH__ -#define __GTKAPPH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/window.h" -#include "wx/frame.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxApp; -class wxLog; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern wxApp *wxTheApp; - -//----------------------------------------------------------------------------- -// global functions -//----------------------------------------------------------------------------- - -void wxExit(void); -bool wxYield(void); - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -#define wxPRINT_WINDOWS 1 -#define wxPRINT_POSTSCRIPT 2 - -//----------------------------------------------------------------------------- -// wxApp -//----------------------------------------------------------------------------- - -class wxApp: public wxEvtHandler -{ - DECLARE_DYNAMIC_CLASS(wxApp) - - public: - - wxApp(void); - ~wxApp(void); - - static void SetInitializerFunction(wxAppInitializerFunction fn) { m_appInitFn = fn; } - static wxAppInitializerFunction GetInitializerFunction(void) { return m_appInitFn; } - - virtual bool OnInit(void); - virtual bool OnInitGui(void); - virtual int OnRun(void); - virtual int OnExit(void); - - wxWindow *GetTopWindow(void); - void SetTopWindow( wxWindow *win ); - virtual int MainLoop(void); - void ExitMainLoop(void); - bool Initialized(void); - virtual bool Pending(void); - virtual void Dispatch(void); - - inline void SetWantDebugOutput(bool flag) { m_wantDebugOutput = flag; } - inline bool GetWantDebugOutput(void) { return m_wantDebugOutput; } - - void OnIdle( wxIdleEvent &event ); - bool SendIdleEvents(void); - bool SendIdleEvents( wxWindow* win ); - - inline wxString GetAppName(void) const { - if (m_appName != "") - return m_appName; - else return m_className; - } - inline void SetAppName(const wxString& name) { m_appName = name; }; - inline wxString GetClassName(void) const { return m_className; } - inline void SetClassName(const wxString& name) { m_className = name; } - const wxString& GetVendorName() const { return m_vendorName; } - void SetVendorName(const wxString& name) { m_vendorName = name; } - - inline void SetExitOnFrameDelete(bool flag) { m_exitOnFrameDelete = flag; } - inline bool GetExitOnFrameDelete(void) const { return m_exitOnFrameDelete; } - - void SetPrintMode(int WXUNUSED(mode) ) {}; - int GetPrintMode(void) const { return wxPRINT_POSTSCRIPT; }; - - // override this function to create default log target of arbitrary - // user-defined classv (default implementation creates a wxLogGui object) - virtual wxLog *CreateLogTarget(); - - // GTK implementation - - static void CommonInit(void); - static void CommonCleanUp(void); - - bool ProcessIdle(void); - void DeletePendingObjects(void); - - bool m_initialized; - bool m_exitOnFrameDelete; - bool m_wantDebugOutput; - wxWindow *m_topWindow; - - gint m_idleTag; - - int argc; - char **argv; - - static wxAppInitializerFunction m_appInitFn; - -private: - wxString m_vendorName, - m_appName, - m_className; - - DECLARE_EVENT_TABLE() -}; - -#endif // __GTKAPPH__ diff --git a/include/wx/gtk/bitmap.h b/include/wx/gtk/bitmap.h deleted file mode 100644 index 18f13ad7e3..0000000000 --- a/include/wx/gtk/bitmap.h +++ /dev/null @@ -1,142 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bitmap.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKBITMAPH__ -#define __GTKBITMAPH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/palette.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxDC; -class wxPaintDC; -class wxMemoryDC; -class wxToolBar; -class wxBitmapButton; -class wxStaticBitmap; -class wxFrame; -class wxDialog; -class wxTreeCtrl; - -class wxMask; -class wxBitmap; - -//----------------------------------------------------------------------------- -// wxMask -//----------------------------------------------------------------------------- - -class wxMask: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxMask) - - public: - - wxMask(); - wxMask( const wxBitmap& bitmap, const wxColour& colour ); - wxMask( const wxBitmap& bitmap, int paletteIndex ); - wxMask( const wxBitmap& bitmap ); - ~wxMask(); - - private: - - friend wxBitmap; - friend wxDC; - friend wxPaintDC; - friend wxToolBar; - friend wxBitmapButton; - friend wxStaticBitmap; - friend wxFrame; - friend wxDialog; - friend wxTreeCtrl; - - GdkBitmap *GetBitmap() const; - - protected: - - GdkBitmap *m_bitmap; - -}; - -//----------------------------------------------------------------------------- -// wxBitmap -//----------------------------------------------------------------------------- - -// CMB 20/5/98: added xbm constructor and GetBitmap() method -class wxBitmap: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxBitmap) - - public: - - wxBitmap(); - wxBitmap( int width, int height, int depth = -1 ); - wxBitmap( const char bits[], int width, int height, int depth = 1 ); - wxBitmap( char **bits ); - wxBitmap( const wxBitmap& bmp ); - wxBitmap( const wxBitmap* bmp ); - wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM); - ~wxBitmap(); - wxBitmap& operator = ( const wxBitmap& bmp ); - bool operator == ( const wxBitmap& bmp ); - bool operator != ( const wxBitmap& bmp ); - bool Ok() const; - - int GetHeight() const; - int GetWidth() const; - int GetDepth() const; - void SetHeight( int height ); - void SetWidth( int width ); - void SetDepth( int depth ); - - wxMask *GetMask() const; - void SetMask( wxMask *mask ); - - void Resize( int height, int width ); - - bool SaveFile( const wxString &name, int type, wxPalette *palette = (wxPalette *) NULL ); - bool LoadFile( const wxString &name, int type = wxBITMAP_TYPE_XPM); - - wxPalette *GetPalette() const; - wxPalette *GetColourMap() const - { return GetPalette(); }; - - private: - - friend wxDC; - friend wxPaintDC; - friend wxMemoryDC; - friend wxToolBar; - friend wxBitmapButton; - friend wxStaticBitmap; - friend wxFrame; - friend wxDialog; - friend wxTreeCtrl; - - GdkPixmap *GetPixmap() const; - GdkBitmap *GetBitmap() const; - - void DestroyImage(); - void RecreateImage(); - void Render(); - - // no data :-) -}; - -#endif // __GTKBITMAPH__ diff --git a/include/wx/gtk/bmpbuttn.h b/include/wx/gtk/bmpbuttn.h deleted file mode 100644 index 6800d97bf4..0000000000 --- a/include/wx/gtk/bmpbuttn.h +++ /dev/null @@ -1,72 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bmpbutton.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __BMPBUTTONH__ -#define __BMPBUTTONH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxBitmapButton; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxButtonNameStr; - -//----------------------------------------------------------------------------- -// wxBitmapButton -//----------------------------------------------------------------------------- - -class wxBitmapButton: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxBitmapButton) - - public: - - wxBitmapButton(void); - inline wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) - { - Create(parent, id, bitmap, pos, size, style, validator, name); - } - bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); - void SetDefault(void); - void SetLabel( const wxString &label ); - wxString GetLabel(void) const; - virtual void SetLabel(const wxBitmap& bitmap) { SetBitmapLabel(bitmap); } - virtual void SetBitmapLabel( const wxBitmap& bitmap ); - wxBitmap& GetBitmapLabel(void) const { return (wxBitmap&) m_bitmap; } - - public: - - wxBitmap m_bitmap; - -}; -#endif // __BMPBUTTONH__ diff --git a/include/wx/gtk/brush.h b/include/wx/gtk/brush.h deleted file mode 100644 index 32048f67b7..0000000000 --- a/include/wx/gtk/brush.h +++ /dev/null @@ -1,60 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: brush.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKBRUSHH__ -#define __GTKBRUSHH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/gdiobj.h" -#include "wx/bitmap.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxBrush; - -//----------------------------------------------------------------------------- -// wxBrush -//----------------------------------------------------------------------------- - -class wxBrush: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxBrush) - - public: - - wxBrush(void); - wxBrush( const wxColour &colour, int style ); - wxBrush( const wxString &colourName, int style ); - wxBrush( const wxBitmap &stippleBitmap ); - wxBrush( const wxBrush &brush ); - wxBrush( const wxBrush *brush ); - ~wxBrush(void); - wxBrush& operator = ( const wxBrush& brush ); - bool operator == ( const wxBrush& brush ); - bool operator != ( const wxBrush& brush ); - bool Ok(void) const; - - int GetStyle(void) const; - wxColour &GetColour(void) const; - wxBitmap *GetStipple(void) const; - - // no data :-) -}; - -#endif // __GTKBRUSHH__ diff --git a/include/wx/gtk/button.h b/include/wx/gtk/button.h deleted file mode 100644 index 0d5bf16b5c..0000000000 --- a/include/wx/gtk/button.h +++ /dev/null @@ -1,65 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: button.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKBUTTONH__ -#define __GTKBUTTONH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxButton; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxButtonNameStr; - -//----------------------------------------------------------------------------- -// wxButton -//----------------------------------------------------------------------------- - -class wxButton: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxButton) - - public: - - wxButton(void); - inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } - bool Create(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); - void SetDefault(void); - void SetLabel( const wxString &label ); - void Enable( bool enable ); -}; - -#endif // __GTKBUTTONH__ diff --git a/include/wx/gtk/checkbox.h b/include/wx/gtk/checkbox.h deleted file mode 100644 index d949234568..0000000000 --- a/include/wx/gtk/checkbox.h +++ /dev/null @@ -1,64 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: checkbox.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKCHECKBOXH__ -#define __GTKCHECKBOXH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxCheckBox; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxCheckBoxNameStr; - -//----------------------------------------------------------------------------- -// wxCheckBox -//----------------------------------------------------------------------------- - -class wxCheckBox: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxCheckBox) - - public: - - wxCheckBox(void); - inline wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } - bool Create( wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr ); - void SetValue( bool state ); - bool GetValue(void) const; -}; - -#endif // __GTKCHECKBOXH__ diff --git a/include/wx/gtk/choice.h b/include/wx/gtk/choice.h deleted file mode 100644 index 36f403bb74..0000000000 --- a/include/wx/gtk/choice.h +++ /dev/null @@ -1,78 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: choice.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKCHOICEH__ -#define __GTKCHOICEH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxChoice; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxChoiceNameStr; - -//----------------------------------------------------------------------------- -// wxChoice -//----------------------------------------------------------------------------- - -class wxChoice: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxChoice) - - public: - - wxChoice(void); - inline wxChoice( wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (const wxString *) NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr ) - { - Create(parent, id, pos, size, n, choices, style, validator, name); - } - bool Create( wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (wxString *) NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr ); - void Append( const wxString &item ); - void Clear(void); - void Delete(int n); - int FindString( const wxString &string ) const; - int GetColumns(void) const; - int GetSelection(void); - wxString GetString( int n ) const; - wxString GetStringSelection(void) const; - int Number(void) const; - void SetColumns( int n = 1 ); - void SetSelection( int n ); - void SetStringSelection( const wxString &string ); -}; - -#endif // __GTKCHOICEH__ diff --git a/include/wx/gtk/colour.h b/include/wx/gtk/colour.h deleted file mode 100644 index dc12c815ff..0000000000 --- a/include/wx/gtk/colour.h +++ /dev/null @@ -1,77 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: colour.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKCOLOURH__ -#define __GTKCOLOURH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/gdiobj.h" -#include "wx/palette.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxDC; -class wxPaintDC; -class wxBitmap; -class wxWindow; - -class wxColour; - -//----------------------------------------------------------------------------- -// wxColour -//----------------------------------------------------------------------------- - -class wxColour: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxColour) - - public: - - wxColour(void); - wxColour( char red, char green, char blue ); - wxColour( const wxString &colourName ); - wxColour( const wxColour& col ); - wxColour( const wxColour* col ); - ~wxColour(void); - wxColour& operator = ( const wxColour& col ); - wxColour& operator = ( const wxString& colourName ); - bool operator == ( const wxColour& col ); - bool operator != ( const wxColour& col ); - void Set( const unsigned char red, const unsigned char green, const unsigned char blue ); - unsigned char Red(void) const; - unsigned char Green(void) const; - unsigned char Blue(void) const; - bool Ok(void) const; - - private: - public: - - friend wxDC; - friend wxPaintDC; - friend wxBitmap; - friend wxWindow; - - void CalcPixel( GdkColormap *cmap ); - int GetPixel(void); - GdkColor *GetColor(void); - - // no data :-) -}; - -#endif // __GTKCOLOURH__ diff --git a/include/wx/gtk/combobox.h b/include/wx/gtk/combobox.h deleted file mode 100644 index a0d3c36083..0000000000 --- a/include/wx/gtk/combobox.h +++ /dev/null @@ -1,108 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: combobox.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: $Id$ -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKCOMBOBOXH__ -#define __GTKCOMBOBOXH__ - -#ifdef __GNUG__ -#pragma interface "combobox.h" -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxComboBox; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char* wxComboBoxNameStr; -extern const char* wxEmptyString; - -//----------------------------------------------------------------------------- -// wxComboBox -//----------------------------------------------------------------------------- - -class wxComboBox: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxComboBox) - - public: - inline wxComboBox(void) {} - - inline wxComboBox(wxWindow *parent, wxWindowID id, - const wxString& value = wxEmptyString, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (const wxString *) NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr) - { - Create(parent, id, value, pos, size, n, choices, style, validator, name); - } - bool Create(wxWindow *parent, wxWindowID id, - const wxString& value = wxEmptyString, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (const wxString *) NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); - - // List functions - void Clear(void); - void Append( const wxString &item ); - void Append( const wxString &item, char* clientData ); - void Delete( int n ); - int FindString( const wxString &item ); - char* GetClientData( int n ); - void SetClientData( int n, char * clientData ); - int GetSelection(void) const; - wxString GetString( int n ) const; - wxString GetStringSelection(void) const; - int Number(void) const; - void SetSelection( int n ); - void SetStringSelection( const wxString &string ); - - // Text field functions - wxString GetValue(void) const ; - void SetValue(const wxString& value); - - // Clipboard operations - void Copy(void); - void Cut(void); - void Paste(void); - void SetInsertionPoint(long pos); - void SetInsertionPointEnd(void); - long GetInsertionPoint(void) const ; - long GetLastPosition(void) const ; - void Replace(long from, long to, const wxString& value); - void Remove(long from, long to); - void SetSelection(long from, long to); - void SetEditable(bool editable); - - private: - - wxList m_clientData; - - public: - - bool m_alreadySent; -}; - -#endif // __GTKCOMBOBOXH__ diff --git a/include/wx/gtk/control.h b/include/wx/gtk/control.h deleted file mode 100644 index 5aa8a1b39a..0000000000 --- a/include/wx/gtk/control.h +++ /dev/null @@ -1,60 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: control.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKCONTROLH__ -#define __GTKCONTROLH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/window.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxControl; - -//----------------------------------------------------------------------------- -// wxControl -//----------------------------------------------------------------------------- - -class wxControl: public wxWindow -{ -DECLARE_DYNAMIC_CLASS(wxControl) - -public: - // construction - wxControl(); - wxControl( wxWindow *parent, wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = 0, const wxString &name = wxPanelNameStr ); - - // overridables - virtual void Command( wxCommandEvent &event ); - - // accessors - // this function will filter out '&' characters and will put the accelerator - // char (the one immediately after '&') into m_chAccel (@@ not yet) - virtual void SetLabel( const wxString &label ); - virtual wxString GetLabel() const; - -protected: - wxString m_label; - // when we implement keyboard interface we will make use of this, but not yet - //char m_chAccel; -}; - -#endif // __GTKCONTROLH__ diff --git a/include/wx/gtk/cursor.h b/include/wx/gtk/cursor.h deleted file mode 100644 index b760e0b512..0000000000 --- a/include/wx/gtk/cursor.h +++ /dev/null @@ -1,61 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: cursor.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKCURSORH__ -#define __GTKCURSORH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/gdicmn.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxWindow; - -class wxCursor; - -//----------------------------------------------------------------------------- -// wxCursor -//----------------------------------------------------------------------------- - -class wxCursor: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxCursor) - - public: - - wxCursor(void); - wxCursor( int cursorId ); - wxCursor( const wxCursor &cursor ); - wxCursor( const wxCursor *cursor ); - ~wxCursor(void); - wxCursor& operator = ( const wxCursor& cursor ); - bool operator == ( const wxCursor& cursor ); - bool operator != ( const wxCursor& cursor ); - bool Ok(void) const; - - private: - public: - - friend wxWindow; - - GdkCursor *GetCursor(void) const; - - // no data :-) -}; - -#endif // __GTKCURSORH__ diff --git a/include/wx/gtk/dc.h b/include/wx/gtk/dc.h deleted file mode 100644 index 683413cd67..0000000000 --- a/include/wx/gtk/dc.h +++ /dev/null @@ -1,301 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dc.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKDCH__ -#define __GTKDCH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/gdicmn.h" -#include "wx/pen.h" -#include "wx/brush.h" -#include "wx/icon.h" -#include "wx/font.h" -#include "wx/gdicmn.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxDC; - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -#define MM_TEXT 0 -#define MM_ISOTROPIC 1 -#define MM_ANISOTROPIC 2 -#define MM_LOMETRIC 3 -#define MM_HIMETRIC 4 -#define MM_TWIPS 5 -#define MM_POINTS 6 -#define MM_METRIC 7 - -//----------------------------------------------------------------------------- -// global variables -//----------------------------------------------------------------------------- - -extern int wxPageNumber; - -//----------------------------------------------------------------------------- -// wxDC -//----------------------------------------------------------------------------- - -class wxDC: public wxObject -{ - DECLARE_ABSTRACT_CLASS(wxDC) - - public: - - wxDC(void); - ~wxDC(void); - - void BeginDrawing(void) {}; - void EndDrawing(void) {}; - - virtual bool Ok(void) const { return m_ok; }; - - virtual void FloodFill( long x1, long y1, wxColour *col, int style=wxFLOOD_SURFACE ) = 0; - virtual bool GetPixel( long x1, long y1, wxColour *col ) const = 0; - - virtual void DrawLine( long x1, long y1, long x2, long y2 ) = 0; - virtual void CrossHair( long x, long y ) = 0; - virtual void DrawArc( long x1, long y1, long x2, long y2, double xc, double yc ); - virtual void DrawEllipticArc( long x, long y, long width, long height, double sa, double ea ) = 0; - virtual void DrawPoint( long x, long y ) = 0; - virtual void DrawPoint( wxPoint& point ); - - virtual void DrawLines( int n, wxPoint points[], long xoffset = 0, long yoffset = 0 ) = 0; - virtual void DrawLines( wxList *points, long xoffset = 0, long yoffset = 0 ); - virtual void DrawPolygon( int n, wxPoint points[], long xoffset = 0, long yoffset = 0, - int fillStyle=wxODDEVEN_RULE ) = 0; - virtual void DrawPolygon( wxList *lines, long xoffset = 0, long yoffset = 0, - int fillStyle=wxODDEVEN_RULE ); - - virtual void DrawRectangle( long x, long y, long width, long height ) = 0; - virtual void DrawRoundedRectangle( long x, long y, long width, long height, double radius = 20.0 ) = 0; - virtual void DrawEllipse( long x, long y, long width, long height ) = 0; - - virtual void DrawSpline( long x1, long y1, long x2, long y2, long x3, long y3 ); - virtual void DrawSpline( wxList *points ); - virtual void DrawSpline( int n, wxPoint points[] ); - - virtual bool CanDrawBitmap(void) const = 0; - virtual void DrawIcon( const wxIcon &icon, long x, long y ) - { DrawIcon( icon, x, y, TRUE ); } - virtual void DrawIcon( const wxIcon &icon, long x, long y, bool useMask ); - void DrawBitmap( const wxBitmap &bmp, long x, long y, bool useMask=FALSE ) - { DrawIcon( *((wxIcon*)(&bmp)), x, y, useMask ); } - virtual bool Blit( long xdest, long ydest, long width, long height, - wxDC *source, long xsrc, long ysrc, int logical_func = wxCOPY, bool useMask=FALSE ) = 0; - - virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE ) = 0; - virtual bool CanGetTextExtent(void) const = 0; - virtual void GetTextExtent( const wxString &string, long *width, long *height, - long *descent = (long *) NULL, long *externalLeading = (long *) NULL, - wxFont *theFont = (wxFont *) NULL, bool use16 = FALSE ) = 0; - virtual long GetCharWidth(void) = 0; - virtual long GetCharHeight(void) = 0; - - virtual void Clear(void) = 0; - - virtual void SetFont( const wxFont &font ) = 0; - virtual wxFont *GetFont(void) { return &m_font; }; - - virtual void SetPen( const wxPen &pen ) = 0; - virtual wxPen *GetPen(void) { return &m_pen; }; - - virtual void SetBrush( const wxBrush &brush ) = 0; - virtual wxBrush *GetBrush(void) { return &m_brush; }; - - virtual void SetBackground( const wxBrush &brush ) = 0; - virtual wxBrush *GetBackground(void) { return &m_backgroundBrush; }; - - virtual void SetLogicalFunction( int function ) = 0; - virtual int GetLogicalFunction(void) { return m_logicalFunction; }; - - virtual void SetTextForeground( const wxColour &col ); - virtual void SetTextBackground( const wxColour &col ); - virtual wxColour& GetTextBackground(void) const { return (wxColour&)m_textBackgroundColour; }; - virtual wxColour& GetTextForeground(void) const { return (wxColour&)m_textForegroundColour; }; - - virtual void SetBackgroundMode( int mode ) = 0; - virtual int GetBackgroundMode(void) { return m_backgroundMode; }; - - virtual void SetPalette( const wxPalette& palette ) = 0; - void SetColourMap( const wxPalette& palette ) { SetPalette(palette); }; - - // the first two must be overridden and called - virtual void SetClippingRegion( long x, long y, long width, long height ); - virtual void DestroyClippingRegion(void); - virtual void GetClippingBox( long *x, long *y, long *width, long *height ) const; - - virtual inline long MinX(void) const { return m_minX; } - virtual inline long MaxX(void) const { return m_maxX; } - virtual inline long MinY(void) const { return m_minY; } - virtual inline long MaxY(void) const { return m_maxY; } - - virtual void GetSize( int* width, int* height ) const; - inline wxSize GetSize(void) const { int w, h; GetSize(&w, &h); return wxSize(w, h); } - virtual void GetSizeMM( long* width, long* height ) const; - - virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return TRUE; }; - virtual void EndDoc(void) {}; - virtual void StartPage(void) {}; - virtual void EndPage(void) {}; - - virtual void SetMapMode( int mode ); - virtual int GetMapMode(void) const { return m_mappingMode; }; - - virtual void SetUserScale( double x, double y ); - virtual void GetUserScale( double *x, double *y ); - virtual void SetLogicalScale( double x, double y ); - virtual void GetLogicalScale( double *x, double *y ); - - virtual void SetLogicalOrigin( long x, long y ); - virtual void GetLogicalOrigin( long *x, long *y ); - virtual void SetDeviceOrigin( long x, long y ); - virtual void GetDeviceOrigin( long *x, long *y ); - - virtual void SetAxisOrientation( bool xLeftRight, bool yBottomUp ); - - virtual void SetOptimization( bool WXUNUSED(optimize) ) {}; - virtual bool GetOptimization(void) { return m_optimize; }; - - virtual long DeviceToLogicalX(long x) const; - virtual long DeviceToLogicalY(long y) const; - virtual long DeviceToLogicalXRel(long x) const; - virtual long DeviceToLogicalYRel(long y) const; - virtual long LogicalToDeviceX(long x) const; - virtual long LogicalToDeviceY(long y) const; - virtual long LogicalToDeviceXRel(long x) const; - virtual long LogicalToDeviceYRel(long y) const; - - public: - - void CalcBoundingBox( long x, long y ); - void ComputeScaleAndOrigin(void); - - long XDEV2LOG(long x) const - { - long new_x = x - m_deviceOriginX; - if (new_x > 0) - return (long)((double)(new_x) / m_scaleX + 0.5) * m_signX + m_logicalOriginX; - else - return (long)((double)(new_x) / m_scaleX - 0.5) * m_signX + m_logicalOriginX; - } - long XDEV2LOGREL(long x) const - { - if (x > 0) - return (long)((double)(x) / m_scaleX + 0.5); - else - return (long)((double)(x) / m_scaleX - 0.5); - } - long YDEV2LOG(long y) const - { - long new_y = y - m_deviceOriginY; - if (new_y > 0) - return (long)((double)(new_y) / m_scaleY + 0.5) * m_signY + m_logicalOriginY; - else - return (long)((double)(new_y) / m_scaleY - 0.5) * m_signY + m_logicalOriginY; - } - long YDEV2LOGREL(long y) const - { - if (y > 0) - return (long)((double)(y) / m_scaleY + 0.5); - else - return (long)((double)(y) / m_scaleY - 0.5); - } - long XLOG2DEV(long x) const - { - long new_x = x - m_logicalOriginX; - if (new_x > 0) - return (long)((double)(new_x) * m_scaleX + 0.5) * m_signX + m_deviceOriginX; - else - return (long)((double)(new_x) * m_scaleX - 0.5) * m_signX + m_deviceOriginX; - } - long XLOG2DEVREL(long x) const - { - if (x > 0) - return (long)((double)(x) * m_scaleX + 0.5); - else - return (long)((double)(x) * m_scaleX - 0.5); - } - long YLOG2DEV(long y) const - { - long new_y = y - m_logicalOriginY; - if (new_y > 0) - return (long)((double)(new_y) * m_scaleY + 0.5) * m_signY + m_deviceOriginY; - else - return (long)((double)(new_y) * m_scaleY - 0.5) * m_signY + m_deviceOriginY; - } - long YLOG2DEVREL(long y) const - { - if (y > 0) - return (long)((double)(y) * m_scaleY + 0.5); - else - return (long)((double)(y) * m_scaleY - 0.5); - } - - virtual void DrawOpenSpline( wxList *points ) = 0; - - public: - - bool m_ok; - bool m_colour; - - // not sure, what these mean - bool m_clipping; // Is clipping on right now ? - bool m_isInteractive; // Is GetPixel possible ? - bool m_autoSetting; // wxMSW only ? - bool m_dontDelete; // wxMSW only ? - bool m_optimize; // wxMSW only ? - wxString m_filename; // Not sure where this belongs. - - wxPen m_pen; - wxBrush m_brush; - wxBrush m_backgroundBrush; - wxColour m_textForegroundColour; - wxColour m_textBackgroundColour; - wxFont m_font; - - int m_logicalFunction; - int m_backgroundMode; - int m_textAlignment; // gone in wxWin 2.0 ? - - int m_mappingMode; - - // not sure what for, but what is a mm on a screen you don't know the size of? - double m_mm_to_pix_x,m_mm_to_pix_y; - - long m_deviceOriginX,m_deviceOriginY; // Sum of the two above. - - long m_logicalOriginX,m_logicalOriginY; // User defined. - - double m_scaleX,m_scaleY; - double m_logicalScaleX,m_logicalScaleY; - double m_userScaleX,m_userScaleY; - long m_signX,m_signY; - - bool m_needComputeScaleX,m_needComputeScaleY; // not yet used - - float m_scaleFactor; // wxPSDC wants to have this. Will disappear. - - long m_clipX1,m_clipY1,m_clipX2,m_clipY2; - long m_minX,m_maxX,m_minY,m_maxY; -}; - -#endif // __GTKDCH__ diff --git a/include/wx/gtk/dcclient.h b/include/wx/gtk/dcclient.h deleted file mode 100644 index 590ed11b6a..0000000000 --- a/include/wx/gtk/dcclient.h +++ /dev/null @@ -1,109 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcclient.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKDCCLIENTH__ -#define __GTKDCCLIENTH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/dc.h" -#include "wx/window.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxPaintDC; -typedef wxPaintDC wxClientDC; -typedef wxPaintDC wxWindowDC; - -//----------------------------------------------------------------------------- -// wxPaintDC -//----------------------------------------------------------------------------- - -class wxPaintDC: public wxDC -{ - DECLARE_DYNAMIC_CLASS(wxPaintDC) - - public: - - wxPaintDC(void); - wxPaintDC( wxWindow *win ); - - ~wxPaintDC(void); - - virtual void FloodFill( long x1, long y1, wxColour *col, int style=wxFLOOD_SURFACE ); - virtual bool GetPixel( long x1, long y1, wxColour *col ) const; - - virtual void DrawLine( long x1, long y1, long x2, long y2 ); - virtual void CrossHair( long x, long y ); - virtual void DrawArc( long x1, long y1, long x2, long y2, double xc, double yc ); - virtual void DrawEllipticArc( long x, long y, long width, long height, double sa, double ea ); - virtual void DrawPoint( long x, long y ); - - virtual void DrawLines( int n, wxPoint points[], long xoffset = 0, long yoffset = 0 ); - virtual void DrawLines( wxList *points, long xoffset = 0, long yoffset = 0 ); - virtual void DrawPolygon( int n, wxPoint points[], long xoffset = 0, long yoffset = 0, - int fillStyle=wxODDEVEN_RULE ); - virtual void DrawPolygon( wxList *lines, long xoffset = 0, long yoffset = 0, - int fillStyle=wxODDEVEN_RULE ); - - virtual void DrawRectangle( long x, long y, long width, long height ); - virtual void DrawRoundedRectangle( long x, long y, long width, long height, double radius = 20.0 ); - virtual void DrawEllipse( long x, long y, long width, long height ); - - virtual bool CanDrawBitmap(void) const; - virtual void DrawIcon( const wxIcon &icon, long x, long y, bool useMask=FALSE ); - virtual bool Blit( long xdest, long ydest, long width, long height, - wxDC *source, long xsrc, long ysrc, int logical_func = wxCOPY, bool useMask=FALSE ); - - virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE ); - virtual bool CanGetTextExtent(void) const; - virtual void GetTextExtent( const wxString &string, long *width, long *height, - long *descent = (long *) NULL, long *externalLeading = (long *) NULL, - wxFont *theFont = (wxFont *) NULL, bool use16 = FALSE ); - virtual long GetCharWidth(void); - virtual long GetCharHeight(void); - - virtual void Clear(void); - - virtual void SetFont( const wxFont &font ); - virtual void SetPen( const wxPen &pen ); - virtual void SetBrush( const wxBrush &brush ); - virtual void SetBackground( const wxBrush &brush ); - virtual void SetLogicalFunction( int function ); - virtual void SetTextForeground( const wxColour &col ); - virtual void SetTextBackground( const wxColour &col ); - virtual void SetBackgroundMode( int mode ); - virtual void SetPalette( const wxPalette& palette ); - - virtual void SetClippingRegion( long x, long y, long width, long height ); - virtual void DestroyClippingRegion(void); - - virtual void DrawOpenSpline( wxList *points ); - - public: // shouldn't be public - - GdkWindow *m_window; - GdkGC *m_penGC; - GdkGC *m_brushGC; - GdkGC *m_textGC; - GdkGC *m_bgGC; - GdkColormap *m_cmap; - bool m_isDrawable; - - void SetUpDC(void); - GdkWindow *GetWindow(void); -}; - -#endif // __GTKDCCLIENTH__ diff --git a/include/wx/gtk/dcmemory.h b/include/wx/gtk/dcmemory.h deleted file mode 100644 index c5854c5110..0000000000 --- a/include/wx/gtk/dcmemory.h +++ /dev/null @@ -1,50 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcmemory.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKDCMEMORYH__ -#define __GTKDCMEMORYH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/dcclient.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxMemoryDC; - -//----------------------------------------------------------------------------- -// wxMemoryDC -//----------------------------------------------------------------------------- - -class WXDLLEXPORT wxMemoryDC: public wxPaintDC -{ - DECLARE_DYNAMIC_CLASS(wxMemoryDC) - - public: - wxMemoryDC(void); - wxMemoryDC( wxDC *dc ); // Create compatible DC - ~wxMemoryDC(void); - virtual void SelectObject( const wxBitmap& bitmap ); - void GetSize( int *width, int *height ) const; - - private: - friend wxPaintDC; - wxBitmap m_selected; -}; - -#endif - // __GTKDCMEMORYH__ - diff --git a/include/wx/gtk/dcscreen.h b/include/wx/gtk/dcscreen.h deleted file mode 100644 index fdbb7344cc..0000000000 --- a/include/wx/gtk/dcscreen.h +++ /dev/null @@ -1,32 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcscreen.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKDCSCREENH__ -#define __GTKDCSCREENH__ - -#include "wx/dcclient.h" - -class WXDLLEXPORT wxScreenDC: public wxPaintDC -{ - DECLARE_DYNAMIC_CLASS(wxScreenDC) - - public: - wxScreenDC(void); - ~wxScreenDC(void); - - static bool StartDrawingOnTop( wxWindow *window ); - static bool StartDrawingOnTop( wxRectangle *rect = (wxRectangle *) NULL ); - static bool EndDrawingOnTop(void); -}; - -#endif - // __GTKDCSCREENH__ - diff --git a/include/wx/gtk/dialog.h b/include/wx/gtk/dialog.h deleted file mode 100644 index 236b8cc024..0000000000 --- a/include/wx/gtk/dialog.h +++ /dev/null @@ -1,107 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dialog.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKDIALOGH__ -#define __GTKDIALOGH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/event.h" -#include "wx/window.h" -#include "wx/icon.h" - -//----------------------------------------------------------------------------- -// forward decls -//----------------------------------------------------------------------------- - -class wxRadioBox; - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxDialog; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxDialogNameStr; - -//----------------------------------------------------------------------------- -// wxDialog -//----------------------------------------------------------------------------- - -class wxDialog: public wxWindow -{ - DECLARE_DYNAMIC_CLASS(wxDialog) - - public: - - wxDialog(void); - wxDialog( wxWindow *parent, wxWindowID id, const wxString &title, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr ); - bool Create( wxWindow *parent, wxWindowID id, const wxString &title, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr ); - ~wxDialog(void); - void SetTitle(const wxString& title); - wxString GetTitle(void) const; - bool OnClose(void); - void OnApply( wxCommandEvent &event ); - void OnCancel( wxCommandEvent &event ); - void OnOK( wxCommandEvent &event ); - void OnPaint(wxPaintEvent& event); - bool Destroy(void); - void OnCloseWindow(wxCloseEvent& event); -/* - void OnCharHook(wxKeyEvent& event); -*/ - virtual bool Show( bool show ); - virtual int ShowModal(void); - virtual void EndModal(int retCode); - virtual bool IsModal(void) const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); } - void SetModal( bool modal ); - virtual void InitDialog(void); - virtual void Centre( int direction = wxHORIZONTAL ); - - virtual void SetSizeHints( int minW, int minH, int maxW, int maxH, int incW = -1 ); - - virtual void SetIcon( const wxIcon &icon ); - virtual void Iconize( bool WXUNUSED(iconize)) { } - virtual bool IsIconized(void) const { return FALSE; } - bool Iconized(void) const { return IsIconized(); } - virtual void Maximize(void) { } - virtual void Restore(void) { } - - private: - - friend wxWindow; - friend wxDC; - friend wxRadioBox; - - bool m_modalShowing; - wxString m_title; - wxIcon m_icon; - - virtual void ImplementSetPosition(); - - DECLARE_EVENT_TABLE() - -}; - -#endif // __GTKDIALOGH__ diff --git a/include/wx/gtk/dirdlg.h b/include/wx/gtk/dirdlg.h deleted file mode 100644 index 7d8829f55b..0000000000 --- a/include/wx/gtk/dirdlg.h +++ /dev/null @@ -1,35 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dirdlg.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __DIRDIALOGH__ -#define __DIRDIALOGH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" -#include "wx/dialog.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxDirDialog; - -//----------------------------------------------------------------------------- -// wxDirDialog -//----------------------------------------------------------------------------- - -#endif // __DIRDIALOGH__ diff --git a/include/wx/gtk/dnd.h b/include/wx/gtk/dnd.h deleted file mode 100644 index fa97fdc5cd..0000000000 --- a/include/wx/gtk/dnd.h +++ /dev/null @@ -1,254 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: dnd.h -// Purpose: declaration of the wxDropTarget class -// Author: Robert Roebling -// RCS-ID: -// Copyright: (c) 1998 Vadim Zeitlin, Robert Roebling -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKDNDH__ -#define __GTKDNDH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/cursor.h" - -//------------------------------------------------------------------------- -// classes -//------------------------------------------------------------------------- - -class wxWindow; - -class wxDataObject; -class wxTextDataObject; -class wxFileDataObject; - -class wxDropTarget; -class wxTextDropTarget; -class wxFileDropTarget; - -class wxDropSource; - -//------------------------------------------------------------------------- -// wxDataObject -//------------------------------------------------------------------------- - -class wxDataObject: public wxObject -{ -public: - // all data formats (values are the same as in windows.h, do not change!) - enum StdFormat - { - Invalid, - Text, - Bitmap, - MetafilePict, - Sylk, - Dif, - Tiff, - OemText, - Dib, - Palette, - Pendata, - Riff, - Wave, - UnicodeText, - EnhMetafile, - Hdrop, - Locale, - Max - }; - - // function to return symbolic name of clipboard format (debug messages) - static const char *GetFormatName(wxDataFormat format); - - // ctor & dtor - wxDataObject() {}; - ~wxDataObject() {}; - - // pure virtuals to override - // get the best suited format for our data - virtual wxDataFormat GetPreferredFormat() const = 0; - // decide if we support this format (should be one of values of - // StdFormat enumerations or a user-defined format) - virtual bool IsSupportedFormat(wxDataFormat format) const = 0; - // get the (total) size of data - virtual size_t GetDataSize() const = 0; - // copy raw data to provided pointer - virtual void GetDataHere(void *pBuf) const = 0; - -}; - -// ---------------------------------------------------------------------------- -// wxTextDataObject is a specialization of wxDataObject for text data -// ---------------------------------------------------------------------------- - -class wxTextDataObject : public wxDataObject -{ -public: - // ctors - wxTextDataObject() { } - wxTextDataObject(const wxString& strText) : m_strText(strText) { } - void Init(const wxString& strText) { m_strText = strText; } - - // implement base class pure virtuals - virtual wxDataFormat GetPreferredFormat() const - { return wxDF_TEXT; } - virtual bool IsSupportedFormat(wxDataFormat format) const - { return format == wxDF_TEXT; } - virtual size_t GetDataSize() const - { return m_strText.Len() + 1; } // +1 for trailing '\0'of course - virtual void GetDataHere(void *pBuf) const - { memcpy(pBuf, m_strText.c_str(), GetDataSize()); } - -private: - wxString m_strText; - -}; - -// ---------------------------------------------------------------------------- -// wxFileDataObject is a specialization of wxDataObject for file names -// ---------------------------------------------------------------------------- - -class wxFileDataObject : public wxDataObject -{ -public: - - wxFileDataObject(void) { } - void AddFile( const wxString &file ) - { m_files += file; m_files += ";"; } - - // implement base class pure virtuals - virtual wxDataFormat GetPreferredFormat() const - { return wxDF_FILENAME; } - virtual bool IsSupportedFormat(wxDataFormat format) const - { return format == wxDF_FILENAME; } - virtual size_t GetDataSize() const - { return m_files.Len() + 1; } // +1 for trailing '\0'of course - virtual void GetDataHere(void *pBuf) const - { memcpy(pBuf, m_files.c_str(), GetDataSize()); } - -private: - wxString m_files; - -}; -//------------------------------------------------------------------------- -// wxDropTarget -//------------------------------------------------------------------------- - -class wxDropTarget: public wxObject -{ - public: - - wxDropTarget(); - ~wxDropTarget(); - - virtual void OnEnter() { } - virtual void OnLeave() { } - virtual bool OnDrop( long x, long y, const void *pData ) = 0; - -// protected: - - friend wxWindow; - - // Override these to indicate what kind of data you support: - - virtual size_t GetFormatCount() const = 0; - virtual wxDataFormat GetFormat(size_t n) const = 0; - - void Drop( GdkEvent *event, int x, int y ); - void RegisterWidget( GtkWidget *widget ); - void UnregisterWidget( GtkWidget *widget ); -}; - -//------------------------------------------------------------------------- -// wxTextDropTarget -//------------------------------------------------------------------------- - -class wxTextDropTarget: public wxDropTarget -{ - public: - - wxTextDropTarget() {}; - virtual bool OnDrop( long x, long y, const void *pData ); - virtual bool OnDropText( long x, long y, const char *psz ); - - protected: - - virtual size_t GetFormatCount() const; - virtual wxDataFormat GetFormat(size_t n) const; -}; - -// ---------------------------------------------------------------------------- -// A drop target which accepts files (dragged from File Manager or Explorer) -// ---------------------------------------------------------------------------- - -class wxFileDropTarget: public wxDropTarget -{ - public: - - wxFileDropTarget() {}; - - virtual bool OnDrop(long x, long y, const void *pData); - virtual bool OnDropFiles( long x, long y, - size_t nFiles, const char * const aszFiles[]); - - protected: - - virtual size_t GetFormatCount() const; - virtual wxDataFormat GetFormat(size_t n) const; -}; - -//------------------------------------------------------------------------- -// wxDropSource -//------------------------------------------------------------------------- - -class wxDropSource: public wxObject -{ - public: - - enum DragResult - { - Error, // error prevented the d&d operation from completing - None, // drag target didn't accept the data - Copy, // the data was successfully copied - Move, // the data was successfully moved - Cancel // the operation was cancelled by user (not an error) - }; - - wxDropSource( wxWindow *win ); - wxDropSource( wxDataObject &data, wxWindow *win ); - - ~wxDropSource(void); - - void SetData( wxDataObject &data ); - DragResult DoDragDrop( bool bAllowMove = FALSE ); - - virtual bool GiveFeedback( DragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return TRUE; }; - - protected: - - friend void gtk_drag_callback( GtkWidget *widget, GdkEvent *event, wxDropSource *source ); - - void RegisterWindow(void); - void UnregisterWindow(void); - - GtkWidget *m_widget; - wxWindow *m_window; - DragResult m_retValue; - wxDataObject *m_data; - - wxCursor m_defaultCursor; - wxCursor m_goaheadCursor; -}; - -#endif - //__GTKDNDH__ - diff --git a/include/wx/gtk/filedlg.h b/include/wx/gtk/filedlg.h deleted file mode 100644 index dd4452794b..0000000000 --- a/include/wx/gtk/filedlg.h +++ /dev/null @@ -1,96 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: filedlg.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKFILEDLGH__ -#define __GTKFILEDLGH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/dialog.h" - -//------------------------------------------------------------------------- -// File selector -//------------------------------------------------------------------------- - -extern const char *wxFileSelectorPromptStr; -extern const char *wxFileSelectorDefaultWildcardStr; - -class wxFileDialog: public wxDialog -{ - - DECLARE_DYNAMIC_CLASS(wxFileDialog) - - friend void gtk_filedialog_ok_callback( GtkWidget *widget, gpointer data ); - - public: - - wxFileDialog() {}; - - wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, - const wxString& defaultDir = "", const wxString& defaultFile = "", - const wxString& wildCard = wxFileSelectorDefaultWildcardStr, - long style = 0, const wxPoint& pos = wxDefaultPosition); - - inline void SetMessage(const wxString& message) { m_message = message; } - inline void SetPath(const wxString& path) { m_path = path; } - inline void SetDirectory(const wxString& dir) { m_dir = dir; } - inline void SetFilename(const wxString& name) { m_fileName = name; } - inline void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; } - inline void SetStyle(long style) { m_dialogStyle = style; } - inline void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; } - - inline wxString GetMessage(void) const { return m_message; } - inline wxString GetPath(void) const { return m_path; } - inline wxString GetDirectory(void) const { return m_dir; } - inline wxString GetFilename(void) const { return m_fileName; } - inline wxString GetWildcard(void) const { return m_wildCard; } - inline long GetStyle(void) const { return m_dialogStyle; } - inline int GetFilterIndex(void) const { return m_filterIndex ; } - - int ShowModal(void); - - protected: - - wxString m_message; - long m_dialogStyle; - wxWindow * m_parent; - wxString m_dir; - wxString m_path; // Full path - wxString m_fileName; - wxString m_wildCard; - int m_filterIndex; -}; - -#define wxOPEN 1 -#define wxSAVE 2 -#define wxOVERWRITE_PROMPT 4 -#define wxHIDE_READONLY 8 -#define wxFILE_MUST_EXIST 16 - -// File selector - backward compatibility - -char* wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = (const char *) NULL, - const char *default_filename = (const char *) NULL, const char *default_extension = (const char *) NULL, - const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0, - wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1); - -char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name = (const char *) NULL, - wxWindow *parent = (wxWindow *) NULL); - -char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name = (const char *) NULL, - wxWindow *parent = (wxWindow *) NULL); - - - -#endif - // __GTKFILEDLGH__ diff --git a/include/wx/gtk/font.h b/include/wx/gtk/font.h deleted file mode 100644 index a1ce86dfe0..0000000000 --- a/include/wx/gtk/font.h +++ /dev/null @@ -1,120 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: font.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKFONTH__ -#define __GTKFONTH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/hash.h" -#include "wx/gdiobj.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxDC; -class wxPaintDC; -class wxWindow; - -class wxFont; -class wxFontNameDirectory; - -//----------------------------------------------------------------------------- -// global variables -//----------------------------------------------------------------------------- - -//extern wxFontNameDirectory *wxTheFontNameDirectory; // defined below - -//----------------------------------------------------------------------------- -// wxFont -//----------------------------------------------------------------------------- - -class wxFont: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxFont) - - public: - wxFont(void); - wxFont( int PointSize, int FontIdOrFamily, int Style, int Weight, - bool underlined = FALSE, const char *Face= ( const char *) NULL ); - wxFont( int PointSize, const char *Face, int Family, int Style, int Weight, - bool underlined = FALSE ); - wxFont( const wxFont& font ); - wxFont( const wxFont* font ); - ~wxFont(void); - wxFont& operator = ( const wxFont& font ); - bool operator == ( const wxFont& font ); - bool operator != ( const wxFont& font ); - bool Ok(); - - int GetPointSize(void) const; - wxString GetFaceName(void) const; - int GetFamily(void) const; - wxString GetFamilyString(void) const; - int GetFontId(void) const; - wxString GetFaceString(void) const; - int GetStyle(void) const; - wxString GetStyleString(void) const; - int GetWeight(void) const; - wxString GetWeightString(void) const; - bool GetUnderlined(void) const; - - wxFont( char *xFontName ); - - private: - - friend wxDC; - friend wxPaintDC; - friend wxWindow; - - GdkFont* GetInternalFont(float scale = 1.0) const; - - // no data :-) -}; - -//----------------------------------------------------------------------------- -// wxFontDirectory -//----------------------------------------------------------------------------- - -class wxFontNameDirectory: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxFontNameDirectory) - - public: - wxFontNameDirectory(void); - ~wxFontNameDirectory(); - - void Initialize(void); - void Initialize(int fontid, int family, const char *name); - - int FindOrCreateFontId(const char *name, int family); - char* GetAFMName(int fontid, int weight, int style); - int GetFamily(int fontid); - int GetFontId(const char *name); - char* GetFontName(int fontid); - int GetNewFontId(void); - char* GetPostScriptName(int fontid, int weight, int style); - char* GetScreenName(int fontid, int weight, int style); - - - class wxHashTable *table; - int nextFontId; -}; - -extern wxFontNameDirectory *wxTheFontNameDirectory; - -#endif // __GTKFONTH__ diff --git a/include/wx/gtk/frame.h b/include/wx/gtk/frame.h deleted file mode 100644 index 1cb5ec51cf..0000000000 --- a/include/wx/gtk/frame.h +++ /dev/null @@ -1,125 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: frame.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKFRAMEH__ -#define __GTKFRAMEH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/window.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxMDIChildFrame; -class wxMDIClientWindow; -class wxMenu; -class wxMenuBar; -class wxToolBar; -class wxStatusBar; - -class wxFrame; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxFrameNameStr; -extern const char *wxToolBarNameStr; - -//----------------------------------------------------------------------------- -// wxFrame -//----------------------------------------------------------------------------- - -class wxFrame: public wxWindow -{ - DECLARE_DYNAMIC_CLASS(wxFrame) -public: - - wxFrame(); - wxFrame( wxWindow *parent, wxWindowID id, const wxString &title, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr ); - bool Create( wxWindow *parent, wxWindowID id, const wxString &title, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr ); - ~wxFrame(); - bool Destroy(); - - virtual bool Show( bool show ); - virtual void Enable( bool enable ); - virtual void Centre( int direction = wxHORIZONTAL ); - - virtual void GetClientSize( int *width, int *height ) const; - virtual void SetClientSize( int const width, int const height ); - - virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0, - const wxString& name = "statusBar"); - virtual wxStatusBar *OnCreateStatusBar( int number, long style, wxWindowID id, - const wxString& name ); - virtual wxStatusBar *GetStatusBar() const; - virtual void SetStatusText( const wxString &text, int number = 0 ); - virtual void SetStatusWidths( int n, const int widths_field[] ); - - virtual wxToolBar* CreateToolBar( long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1, - const wxString& name = wxToolBarNameStr); - virtual wxToolBar *OnCreateToolBar( long style, wxWindowID id, const wxString& name ); - virtual wxToolBar *GetToolBar(void) const; - - virtual void SetMenuBar( wxMenuBar *menuBar ); - virtual wxMenuBar *GetMenuBar() const; - - virtual void SetTitle( const wxString &title ); - virtual wxString GetTitle() const { return m_title; } - - virtual void SetIcon( const wxIcon &icon ); - virtual void Iconize( bool WXUNUSED(iconize)) { } - virtual bool IsIconized(void) const { return FALSE; } - bool Iconized(void) const { return IsIconized(); } - virtual void Maximize(bool WXUNUSED(maximize)) {} - virtual void Restore(void) {} - - void OnActivate( wxActivateEvent &WXUNUSED(event) ) { } // called from docview.cpp - void OnSize( wxSizeEvent &event ); - void OnCloseWindow( wxCloseEvent& event ); - void OnIdle(wxIdleEvent& event); - - virtual void AddChild( wxWindow *child ); - virtual void GtkOnSize( int x, int y, int width, int height ); - -private: - friend wxWindow; - friend wxMDIChildFrame; - friend wxMDIClientWindow; - - // update frame's menus (called from OnIdle) - void DoMenuUpdates(); - void DoMenuUpdates(wxMenu* menu); - virtual void ImplementSetPosition(); - - GtkWidget *m_mainWindow; - wxMenuBar *m_frameMenuBar; - wxStatusBar *m_frameStatusBar; - wxToolBar *m_frameToolBar; - int m_toolBarHeight; - bool m_addPrivateChild; // for toolbar (and maybe menubar) - wxString m_title; - wxIcon m_icon; - - DECLARE_EVENT_TABLE() -}; - -#endif // __GTKFRAMEH__ diff --git a/include/wx/gtk/gauge.h b/include/wx/gtk/gauge.h deleted file mode 100644 index 51e9563b56..0000000000 --- a/include/wx/gtk/gauge.h +++ /dev/null @@ -1,83 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gauge.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKGAUGEH__ -#define __GTKGAUGEH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxGauge; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char* wxGaugeNameStr; - -//----------------------------------------------------------------------------- -// wxGaugeBox -//----------------------------------------------------------------------------- - -class wxGauge: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxGauge) - - public: - inline wxGauge(void) { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = TRUE; } - - inline wxGauge( wxWindow *parent, wxWindowID id, - int range, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxGA_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr ) - { - Create(parent, id, range, pos, size, style, validator, name); - } - bool Create( wxWindow *parent, wxWindowID id, - int range, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxGA_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr ); - void SetShadowWidth( int WXUNUSED(w) ) {}; - void SetBezelFace( int WXUNUSED(w) ) {}; - void SetRange( int r ); - void SetValue( int pos ); - int GetShadowWidth(void) const { return 0; }; - int GetBezelFace(void) const { return 0; }; - int GetRange(void) const; - int GetValue(void) const; - - // Are we a Win95/GTK progress bar, or a normal gauge? - inline bool GetProgressBar(void) const { return m_useProgressBar; } - - protected: - - int m_rangeMax; - int m_gaugePos; - bool m_useProgressBar; -}; - -#endif // __GTKGAUGEH__ diff --git a/include/wx/gtk/gdiobj.h b/include/wx/gtk/gdiobj.h deleted file mode 100644 index 2b6a5d1921..0000000000 --- a/include/wx/gtk/gdiobj.h +++ /dev/null @@ -1,37 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gdiobj.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GDIOBJH__ -#define __GDIOBJH__ - -#include "wx/object.h" - -#ifdef __GNUG__ -#pragma interface -#endif - -class WXDLLEXPORT wxGDIObject: public wxObject -{ -DECLARE_DYNAMIC_CLASS(wxGDIObject) - public: - inline wxGDIObject(void) { m_visible = FALSE; }; - inline ~wxGDIObject(void) {}; - - virtual bool GetVisible(void) { return m_visible; } - virtual void SetVisible(bool v) { m_visible = v; } - -protected: - bool m_visible; // Can a pointer to this object be safely taken? - // - only if created within FindOrCreate... -}; - -#endif - // __GDIOBJH__ diff --git a/include/wx/gtk/icon.h b/include/wx/gtk/icon.h deleted file mode 100644 index 7596879cd9..0000000000 --- a/include/wx/gtk/icon.h +++ /dev/null @@ -1,50 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: icon.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKICONH__ -#define __GTKICONH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/bitmap.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxIcon; - -//----------------------------------------------------------------------------- -// wxIcon -//----------------------------------------------------------------------------- - -class wxIcon: public wxBitmap -{ - DECLARE_DYNAMIC_CLASS(wxIcon) - -public: - - wxIcon(void); - wxIcon(const wxIcon& icon); - wxIcon(const wxIcon* icon); - wxIcon( char **bits, int width=-1, int height=-1 ); - - wxIcon& operator = (const wxIcon& icon); - inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; } - inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; } -}; - - -#endif // __GTKICONH__ diff --git a/include/wx/gtk/joystick.h b/include/wx/gtk/joystick.h deleted file mode 100644 index 957c16581a..0000000000 --- a/include/wx/gtk/joystick.h +++ /dev/null @@ -1,102 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: joystick.h -// Purpose: wxJoystick class -// Author: Guilhem Lavaux -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __JOYSTICKH__ -#define __JOYSTICKH__ - -#ifdef __GNUG__ -#pragma interface "joystick.h" -#endif - -#include "wx/event.h" -#include "wx/thread.h" - -class WXDLLEXPORT wxJoystick: public wxObject, public wxThread -{ - DECLARE_DYNAMIC_CLASS(wxJoystick) - public: - /* - * Public interface - */ - - wxJoystick(int joystick = wxJOYSTICK1); - - // Attributes - //////////////////////////////////////////////////////////////////////////// - - wxPoint GetPosition(void) const; - int GetZPosition(void) const; - int GetButtonState(void) const; - int GetPOVPosition(void) const; - int GetPOVCTSPosition(void) const; - int GetRudderPosition(void) const; - int GetUPosition(void) const; - int GetVPosition(void) const; - int GetMovementThreshold(void) const; - void SetMovementThreshold(int threshold) ; - - // Capabilities - //////////////////////////////////////////////////////////////////////////// - - bool IsOk(void) const; // Checks that the joystick is functioning - int GetNumberJoysticks(void) const ; - int GetManufacturerId(void) const ; - int GetProductId(void) const ; - wxString GetProductName(void) const ; - int GetXMin(void) const; - int GetYMin(void) const; - int GetZMin(void) const; - int GetXMax(void) const; - int GetYMax(void) const; - int GetZMax(void) const; - int GetNumberButtons(void) const; - int GetNumberAxes(void) const; - int GetMaxButtons(void) const; - int GetMaxAxes(void) const; - int GetPollingMin(void) const; - int GetPollingMax(void) const; - int GetRudderMin(void) const; - int GetRudderMax(void) const; - int GetUMin(void) const; - int GetUMax(void) const; - int GetVMin(void) const; - int GetVMax(void) const; - - bool HasRudder(void) const; - bool HasZ(void) const; - bool HasU(void) const; - bool HasV(void) const; - bool HasPOV(void) const; - bool HasPOV4Dir(void) const; - bool HasPOVCTS(void) const; - - // Operations - //////////////////////////////////////////////////////////////////////////// - - // pollingFreq = 0 means that movement events are sent when above the threshold. - // If pollingFreq > 0, events are received every this many milliseconds. - bool SetCapture(wxWindow* win, int pollingFreq = 0); - bool ReleaseCapture(void); - -protected: - int m_joystick; - wxPoint m_lastposition; - int m_axe[15]; - int m_buttons; - wxWindow *m_catchwin; - int m_polling; - - void *Entry(void); -}; - -#endif - // __JOYSTICKH__ - diff --git a/include/wx/gtk/listbox.h b/include/wx/gtk/listbox.h deleted file mode 100644 index 22cbe344a9..0000000000 --- a/include/wx/gtk/listbox.h +++ /dev/null @@ -1,98 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: listbox.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKLISTBOXH__ -#define __GTKLISTBOXH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxListBox; -class wxArrayInt; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxListBoxNameStr; - -//----------------------------------------------------------------------------- -// wxListBox -//----------------------------------------------------------------------------- - -class wxListBox: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxListBox) - - public: - - wxListBox(void); - inline wxListBox( wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (const wxString *) NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr ) - { - Create(parent, id, pos, size, n, choices, style, validator, name); - } - bool Create( wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (const wxString *) NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr ); - void Append( const wxString &item ); - void Append( const wxString &item, char *clientData ); - void Clear(void); - void Delete( int n ); - void Deselect( int n ); - int FindString( const wxString &item ) const; - char *GetClientData( int n ) const; - int GetSelection(void) const; - int GetSelections( class wxArrayInt &) const; - wxString GetString( int n ) const; - wxString GetStringSelection(void) const; - int Number(void); - bool Selected( int n ); - void Set( int n, const wxString *choices ); - void SetClientData( int n, char *clientData ); - void SetFirstItem( int n ); - void SetFirstItem( const wxString &item ); - void SetSelection( int n, bool select = TRUE ); - void SetString( int n, const wxString &string ); - void SetStringSelection( const wxString &string, bool select = TRUE ); - - virtual GtkWidget *GetConnectWidget(void); - - private: - - GtkList *m_list; - wxList m_clientData; - - public: - - int GetIndex( GtkWidget *item ) const; -}; - -#endif // __GTKLISTBOXH__ diff --git a/include/wx/gtk/mdi.h b/include/wx/gtk/mdi.h deleted file mode 100644 index 081cd5a407..0000000000 --- a/include/wx/gtk/mdi.h +++ /dev/null @@ -1,186 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: mdi.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __MDIH__ -#define __MDIH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" -#include "wx/panel.h" -#include "wx/frame.h" -#include "wx/toolbar.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxMDIParentFrame; -class wxMDIClientWindow; -class wxMDIChildFrame; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char* wxFrameNameStr; -extern const char* wxStatusLineNameStr; - -//----------------------------------------------------------------------------- -// wxMDIParentFrame -//----------------------------------------------------------------------------- - -class wxMDIParentFrame: public wxFrame -{ - DECLARE_DYNAMIC_CLASS(wxMDIParentFrame) - - friend class wxMDIChildFrame; - - public: - - wxMDIParentFrame(void); - wxMDIParentFrame( wxWindow *parent, - wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr ); - ~wxMDIParentFrame(void); - bool Create( wxWindow *parent, - wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr ); - - - void GetClientSize(int *width, int *height) const; - wxMDIChildFrame *GetActiveChild(void) const; - - wxMDIClientWindow *GetClientWindow(void) const; - virtual wxMDIClientWindow *OnCreateClient(void); - - virtual void Cascade(void) {}; - virtual void Tile(void) {}; - virtual void ArrangeIcons(void) {}; - virtual void ActivateNext(void); - virtual void ActivatePrevious(void); - - void OnActivate( wxActivateEvent& event ); - void OnSysColourChanged( wxSysColourChangedEvent& event ); - - //private: - - wxMDIChildFrame *m_currentChild; - - void SetMDIMenuBar( wxMenuBar *menu_bar ); - virtual void GtkOnSize( int x, int y, int width, int height ); - - private: - - wxMDIClientWindow *m_clientWindow; - bool m_parentFrameActive; - wxMenuBar *m_mdiMenuBar; - - DECLARE_EVENT_TABLE() -}; - -//----------------------------------------------------------------------------- -// wxMDIChildFrame -//----------------------------------------------------------------------------- - -class wxMDIChildFrame: public wxFrame -{ - DECLARE_DYNAMIC_CLASS(wxMDIChildFrame) - - public: - - wxMDIChildFrame(void); - wxMDIChildFrame( wxMDIParentFrame *parent, - wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr ); - ~wxMDIChildFrame(void); - bool Create( wxMDIParentFrame *parent, - wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr ); - - virtual void SetMenuBar( wxMenuBar *menu_bar ); - virtual wxMenuBar *GetMenuBar(); - - virtual void GetClientSize( int *width, int *height ) const; - virtual void AddChild( wxWindow *child ); - - virtual void Activate(void); - - // no status bars - virtual wxStatusBar* CreateStatusBar( int WXUNUSED(number)=1, long WXUNUSED(style)=1, - wxWindowID WXUNUSED(id)=1, const wxString& WXUNUSED(name)=WXSTRINGCAST NULL ) {return (wxStatusBar*)NULL; } - virtual wxStatusBar *GetStatusBar() { return (wxStatusBar*)NULL; } - virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number) ) {} - virtual void SetStatusWidths( int WXUNUSED(n), int *WXUNUSED(width) ) {} - - // no size hints - virtual void SetSizeHints( int WXUNUSED(minW), int WXUNUSED(minH), int WXUNUSED(maxW), - int WXUNUSED(maxH), int WXUNUSED(incW) ) {} - - // no toolbar bars - virtual wxToolBar* CreateToolBar( long WXUNUSED(style), wxWindowID WXUNUSED(id), - const wxString& WXUNUSED(name) ) { return (wxToolBar*)NULL; } - virtual wxToolBar *GetToolBar() { return (wxToolBar*)NULL; } - - // no icon - void SetIcon( const wxIcon &icon ) { m_icon = icon; } - - // no title - void SetTitle( const wxString &title ) { m_title = title; } - wxString GetTitle() const { return m_title; } - - // no maximize etc - virtual void Maximize(void) {} - virtual void Restore(void) {} - - void OnActivate( wxActivateEvent &event ); - - public: - - wxMenuBar *m_menuBar; - -// private: - - GtkNotebookPage *m_page; - - DECLARE_EVENT_TABLE() -}; - -//----------------------------------------------------------------------------- -// wxMDIClientWindow -//----------------------------------------------------------------------------- - -class wxMDIClientWindow: public wxWindow -{ - DECLARE_DYNAMIC_CLASS(wxMDIClientWindow) - - public: - - wxMDIClientWindow(void); - wxMDIClientWindow( wxMDIParentFrame *parent, long style = 0 ); - ~wxMDIClientWindow(void); - virtual bool CreateClient( wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL ); - void AddChild( wxWindow *child ); -}; - -#endif // __MDIH__ - diff --git a/include/wx/gtk/menu.h b/include/wx/gtk/menu.h deleted file mode 100644 index 9258a25e85..0000000000 --- a/include/wx/gtk/menu.h +++ /dev/null @@ -1,181 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: menu.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKMENUH__ -#define __GTKMENUH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/window.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxMenuBar; -class wxMenuItem; -class wxMenu; - -//----------------------------------------------------------------------------- -// const -//----------------------------------------------------------------------------- - -#define ID_SEPARATOR (-1) - -//----------------------------------------------------------------------------- -// wxMenuBar -//----------------------------------------------------------------------------- - -class wxMenuBar: public wxWindow -{ -DECLARE_DYNAMIC_CLASS(wxMenuBar) - -public: - wxMenuBar(); - void Append( wxMenu *menu, const wxString &title ); - - int FindMenuItem( const wxString &menuString, const wxString &itemString ) const; - wxMenuItem* FindMenuItemById( int id ) const; - - void Check( int id, bool check ); - bool Checked( int id ) const; - void Enable( int id, bool enable ); - bool Enabled( int id ) const; - inline bool IsEnabled(int Id) const { return Enabled(Id); }; - inline bool IsChecked(int Id) const { return Checked(Id); }; - - int GetMenuCount() const { return m_menus.Number(); } - wxMenu *GetMenu(int n) const { return (wxMenu *)m_menus.Nth(n)->Data(); } - - wxList m_menus; - GtkWidget *m_menubar; -}; - -//----------------------------------------------------------------------------- -// wxMenu -//----------------------------------------------------------------------------- - -class wxMenuItem: public wxObject -{ -DECLARE_DYNAMIC_CLASS(wxMenuItem) - -public: - wxMenuItem(); - - // accessors - // id - void SetId(int id) { m_id = id; } - int GetId() const { return m_id; } - bool IsSeparator() const { return m_id == ID_SEPARATOR; } - - // the item's text - void SetText(const wxString& str); - const wxString& GetText() const { return m_text; } - - // what kind of menu item we are - void SetCheckable(bool checkable) { m_isCheckMenu = checkable; } - bool IsCheckable() const { return m_isCheckMenu; } - void SetSubMenu(wxMenu *menu) { m_subMenu = menu; } - wxMenu *GetSubMenu() const { return m_subMenu; } - bool IsSubMenu() const { return m_subMenu != NULL; } - - // state - void Enable( bool enable = TRUE ); - bool IsEnabled() const { return m_isEnabled; } - void Check( bool check = TRUE ); - bool IsChecked() const; - - // help string (displayed in the status bar by default) - void SetHelp(const wxString& str) { m_helpStr = str; } - const wxString& GetHelp() const { return m_helpStr; } - - // implementation - void SetMenuItem(GtkWidget *menuItem) { m_menuItem = menuItem; } - GtkWidget *GetMenuItem() const { return m_menuItem; } - -private: - int m_id; - wxString m_text; - bool m_isCheckMenu; - bool m_isChecked; - bool m_isEnabled; - wxMenu *m_subMenu; - wxString m_helpStr; - - GtkWidget *m_menuItem; // GtkMenuItem -}; - -class wxMenu: public wxEvtHandler -{ -DECLARE_DYNAMIC_CLASS(wxMenu) - -public: - // construction - wxMenu( const wxString& title = wxEmptyString, const wxFunction func = (wxFunction) NULL ); - - // operations - // title - void SetTitle(const wxString& label); - const wxString GetTitle() const; - // menu creation - void AppendSeparator(); - void Append(int id, const wxString &item, - const wxString &helpStr = "", bool checkable = FALSE); - void Append(int id, const wxString &item, - wxMenu *subMenu, const wxString &helpStr = "" ); - void Break() {}; - - // find item by name/id - int FindItem( const wxString itemString ) const; - wxMenuItem *FindItem( int id ) const; - wxMenuItem *FindItemForId( int id ) const { return FindItem( id ); } - - // get/set item's state - void Enable( int id, bool enable ); - bool IsEnabled( int id ) const; - void Check( int id, bool check ); - bool IsChecked( int id ) const; - - void SetLabel( int id, const wxString &label ); - wxString GetLabel(int id) const; - - // helpstring - virtual void SetHelpString(int id, const wxString& helpString); - virtual wxString GetHelpString(int id) const ; - - // accessors - wxList& GetItems() { return m_items; } - - inline void Callback(const wxFunction func) { m_callback = func; } - - inline void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; } - inline wxEvtHandler *GetEventHandler() { return m_eventHandler; } - -public: - int FindMenuIdByMenuItem( GtkWidget *menuItem ) const; - void SetInvokingWindow( wxWindow *win ); - wxWindow *GetInvokingWindow(); - - wxString m_title; - wxList m_items; - wxWindow *m_invokingWindow; - wxFunction m_callback; - wxEvtHandler *m_eventHandler; - - GtkWidget *m_menu; // GtkMenu -}; - -#endif // __GTKMENUH__ diff --git a/include/wx/gtk/notebook.h b/include/wx/gtk/notebook.h deleted file mode 100644 index 097101d094..0000000000 --- a/include/wx/gtk/notebook.h +++ /dev/null @@ -1,185 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: notebook.h -// Purpose: wxNotebook class -// Author: Robert Roebling -// Modified by: -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef __NOTEBOOKH__ -#define __NOTEBOOKH__ - -#ifdef __GNUG__ -#pragma interface "notebook.h" -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxImageList; -class wxNotebook; -class wxNotebookPage; - -// ---------------------------------------------------------------------------- -// notebook events -// ---------------------------------------------------------------------------- - -class wxNotebookEvent : public wxCommandEvent -{ -public: - wxNotebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0, - int nSel = -1, int nOldSel = -1) - : wxCommandEvent(commandType, id) { m_nSel = nSel; m_nOldSel = nOldSel; } - - // accessors - int GetSelection() const { return m_nSel; } - int GetOldSelection() const { return m_nOldSel; } - -private: - int m_nSel, // currently selected page - m_nOldSel; // previously selected page - - DECLARE_DYNAMIC_CLASS(wxNotebookEvent) -}; - -//----------------------------------------------------------------------------- -// wxNotebook -//----------------------------------------------------------------------------- - -class wxNotebook : public wxControl -{ -public: - // ctors - // ----- - // default for dynamic class - wxNotebook(); - // the same arguments as for wxControl (@@@ any special styles?) - wxNotebook(wxWindow *parent, - wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = "notebook"); - // Create() function - bool Create(wxWindow *parent, - wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = "notebook"); - // dtor - ~wxNotebook(); - - // accessors - // --------- - // get number of pages in the dialog - int GetPageCount() const; - - // set the currently selected page, return the index of the previously - // selected one (or -1 on error) - // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events - int SetSelection(int nPage); - // cycle thru the tabs - void AdvanceSelection(bool bForward = TRUE); - // get the currently selected page - int GetSelection() const; - - // set/get the title of a page - bool SetPageText(int nPage, const wxString& strText); - wxString GetPageText(int nPage) const; - - // image list stuff: each page may have an image associated with it. All - // the images belong to an image list, so you have to - // 1) create an image list - // 2) associate it with the notebook - // 3) set for each page it's image - // associate image list with a control - void SetImageList(wxImageList* imageList); - // get pointer (may be NULL) to the associated image list - wxImageList* GetImageList() const { return m_imageList; } - - // sets/returns item's image index in the current image list - int GetPageImage(int nPage) const; - bool SetPageImage(int nPage, int nImage); - - // currently it's always 1 because wxGTK doesn't support multi-row - // tab controls - int GetRowCount() const; - - // control the appearance of the notebook pages - // set the size (the same for all pages) - void SetPageSize(const wxSize& size); - // set the padding between tabs (in pixels) - void SetPadding(const wxSize& padding); - - // operations - // ---------- - // remove one page from the notebook - bool DeletePage(int nPage); - // remove all pages - bool DeleteAllPages(); - // adds a new page to the notebook (it will be deleted ny the notebook, - // don't delete it yourself). If bSelect, this page becomes active. - bool AddPage(wxWindow *pPage, - const wxString& strText, - bool bSelect = FALSE, - int imageId = -1); - // @@@@ VZ: I don't know how to implement InsertPage() - - // get the panel which represents the given page - wxWindow *GetPage(int nPage) const; - - // implementation - // -------------- - // base class virtuals - virtual void AddChild(wxWindow *child); - virtual void SetConstraintSizes(bool recurse); - virtual bool DoPhase(int phase); - -private: - // common part of all ctors - void Init(); - - // helper function - wxNotebookPage* GetNotebookPage(int page) const; - - wxImageList* m_imageList; - wxList m_pages; - size_t m_idHandler; // the change page handler id - - DECLARE_DYNAMIC_CLASS(wxNotebook) -}; - -// ---------------------------------------------------------------------------- -// event macros -// ---------------------------------------------------------------------------- -typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&); - -#define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \ - { \ - wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, \ - id, \ - -1, \ - (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \ - NULL \ - }, - -#define EVT_NOTEBOOK_PAGE_CHANGING(id, fn) \ - { \ - wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, \ \ - id, \ - -1, \ - (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \ - NULL \ - }, - -#endif - // __NOTEBOOKH__ diff --git a/include/wx/gtk/palette.h b/include/wx/gtk/palette.h deleted file mode 100644 index d6b7bbb64b..0000000000 --- a/include/wx/gtk/palette.h +++ /dev/null @@ -1,60 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: palette.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKPALETTEH__ -#define __GTKPALETTEH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/gdiobj.h" -#include "wx/gdicmn.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxPalette; - -//----------------------------------------------------------------------------- -// wxPalette -//----------------------------------------------------------------------------- - -class wxPalette: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxPalette) - - public: - - wxPalette(void); - wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue ); - wxPalette( const wxPalette& palette ); - wxPalette( const wxPalette* palette ); - ~wxPalette(void); - wxPalette& operator = ( const wxPalette& palette ); - bool operator == ( const wxPalette& palette ); - bool operator != ( const wxPalette& palette ); - bool Ok(void) const; - - bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); - int GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const; - bool GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const; - - // no data -}; - -#define wxColorMap wxPalette -#define wxColourMap wxPalette - -#endif // __GTKPALETTEH__ diff --git a/include/wx/gtk/pen.h b/include/wx/gtk/pen.h deleted file mode 100644 index a0eaa2a59b..0000000000 --- a/include/wx/gtk/pen.h +++ /dev/null @@ -1,68 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: pen.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKPENH__ -#define __GTKPENH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/gdiobj.h" -#include "wx/gdicmn.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxPen; - -//----------------------------------------------------------------------------- -// wxPen -//----------------------------------------------------------------------------- - -class wxPen: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxPen) - - public: - - wxPen(void); - wxPen( const wxColour &colour, int width, int style ); - wxPen( const wxString &colourName, int width, int style ); - wxPen( const wxPen& pen ); - wxPen( const wxPen* pen ); - ~wxPen(void); - wxPen& operator = ( const wxPen& pen ); - bool operator == ( const wxPen& pen ); - bool operator != ( const wxPen& pen ); - - void SetColour( const wxColour &colour ); - void SetColour( const wxString &colourName ); - void SetColour( int red, int green, int blue ); - void SetCap( int capStyle ); - void SetJoin( int joinStyle ); - void SetStyle( int style ); - void SetWidth( int width ); - wxColour &GetColour(void) const; - int GetCap(void) const; - int GetJoin(void) const; - int GetStyle(void) const; - int GetWidth(void) const; - bool Ok(void) const; - - // no data :-) -}; - -#endif // __GTKPENH__ diff --git a/include/wx/gtk/radiobox.h b/include/wx/gtk/radiobox.h deleted file mode 100644 index 04d5ea8879..0000000000 --- a/include/wx/gtk/radiobox.h +++ /dev/null @@ -1,92 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: radiobox.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKRADIOBOXH__ -#define __GTKRADIOBOXH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" -#include "wx/bitmap.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxRadioBox; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxRadioBoxNameStr; - -//----------------------------------------------------------------------------- -// wxRadioBox -//----------------------------------------------------------------------------- - -class wxRadioBox: public wxControl -{ - - DECLARE_DYNAMIC_CLASS(wxRadioBox) - - public: - - wxRadioBox(void); - inline wxRadioBox( wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (const wxString *) NULL, - int majorDim = 0, long style = wxRA_HORIZONTAL, - const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr ) - { - Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name ); - } - bool Create( wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (const wxString *) NULL, - int majorDim = 0, long style = wxRA_HORIZONTAL, - const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr ); - int FindString( const wxString& s) const; - void SetSelection( int n ); - int GetSelection(void) const; - wxString GetString( int n ) const; - wxString GetLabel(void) const; - void SetLabel( const wxString& label ); - void SetLabel( int item, const wxString& label ); - void SetLabel( int item, wxBitmap *bitmap ); - wxString GetLabel( int item ) const; - bool Show( bool show ); - void Enable( bool enable ); - void Enable( int item, bool enable ); - void Show( int item, bool show ); - virtual wxString GetStringSelection(void) const; - virtual bool SetStringSelection( const wxString& s ); - virtual int Number(void) const; - int GetNumberOfRowsOrCols(void) const; - void SetNumberOfRowsOrCols( int n ); - - private: - - GtkRadioButton *m_radio; - - public: - - bool m_alreadySent; -}; - -#endif // __GTKRADIOBOXH__ diff --git a/include/wx/gtk/radiobut.h b/include/wx/gtk/radiobut.h deleted file mode 100644 index 61e7130035..0000000000 --- a/include/wx/gtk/radiobut.h +++ /dev/null @@ -1,66 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: radiobut.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKRADIOBUTTONH__ -#define __GTKRADIOBUTTONH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxRadioButton; - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern const char* wxRadioButtonNameStr; - -//----------------------------------------------------------------------------- -// wxRadioButton -//----------------------------------------------------------------------------- - -class wxRadioButton: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxRadioButton) - - public: - inline wxRadioButton(void) {} - inline wxRadioButton( wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr ) - { - Create( parent, id, label, pos, size, style, validator, name ); - } - bool Create(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr ); - virtual void SetLabel(const wxString& label); - virtual void SetValue(bool val); - virtual bool GetValue(void) const; -}; - -#endif // __GTKRADIOBUTTONH__ diff --git a/include/wx/gtk/region.h b/include/wx/gtk/region.h deleted file mode 100644 index 35e146938c..0000000000 --- a/include/wx/gtk/region.h +++ /dev/null @@ -1,134 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: region.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __REGIONH__ -#define __REGIONH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/list.h" -#include "wx/gdiobj.h" -#include "wx/gdicmn.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxRegion; - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -enum wxRegionContain -{ - wxOutRegion = 0, wxPartRegion = 1, wxInRegion = 2 -}; - -// So far, for internal use only -enum wxRegionOp { -wxRGN_AND, // Creates the intersection of the two combined regions. -wxRGN_COPY, // Creates a copy of the region identified by hrgnSrc1. -wxRGN_DIFF, // Combines the parts of hrgnSrc1 that are not part of hrgnSrc2. -wxRGN_OR, // Creates the union of two combined regions. -wxRGN_XOR // Creates the union of two combined regions except for any overlapping areas. -}; - -//----------------------------------------------------------------------------- -// wxRegion -//----------------------------------------------------------------------------- - -class wxRegion : public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxRegion); - - public: - - wxRegion( long x, long y, long w, long h ); - wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight ); - wxRegion( const wxRect& rect ); - wxRegion(void); - ~wxRegion(void); - - inline wxRegion( const wxRegion& r ) - { Ref(r); } - inline wxRegion& operator = ( const wxRegion& r ) - { Ref(r); return (*this); } - - void Clear(void); - - bool Union( long x, long y, long width, long height ); - bool Union( const wxRect& rect ); - bool Union( const wxRegion& region ); - - bool Intersect( long x, long y, long width, long height ); - bool Intersect( const wxRect& rect ); - bool Intersect( const wxRegion& region ); - - bool Subtract( long x, long y, long width, long height ); - bool Subtract( const wxRect& rect ); - bool Subtract( const wxRegion& region ); - - bool Xor( long x, long y, long width, long height ); - bool Xor( const wxRect& rect ); - bool Xor( const wxRegion& region ); - - void GetBox( long& x, long& y, long&w, long &h ) const; - wxRect GetBox(void) const ; - - bool Empty(void) const; - - wxRegionContain Contains( long x, long y ) const; - wxRegionContain Contains( long x, long y, long w, long h ) const; - wxRegionContain Contains(const wxPoint& pt) const; - wxRegionContain Contains(const wxRect& rect) const; - - public: - - wxList *GetRectList() const; - GdkRegion *GetRegion(void) const; -}; - -class wxRegionIterator: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxRegionIterator); - - public: - - wxRegionIterator(void); - wxRegionIterator(const wxRegion& region); - - void Reset(void) { m_current = 0; } - void Reset(const wxRegion& region); - - operator bool (void) const; - bool HaveRects(void) const; - - void operator ++ (void); - void operator ++ (int); - - long GetX(void) const; - long GetY(void) const; - long GetW(void) const; - long GetWidth(void) const { return GetW(); } - long GetH(void) const; - long GetHeight(void) const { return GetH(); } - - private: - - long m_current; - wxRegion m_region; -}; - - -#endif - // __REGIONH__ diff --git a/include/wx/gtk/scrolbar.h b/include/wx/gtk/scrolbar.h deleted file mode 100644 index 27941a616b..0000000000 --- a/include/wx/gtk/scrolbar.h +++ /dev/null @@ -1,87 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: scrolbar.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKSCROLLBARH__ -#define __GTKSCROLLBARH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxScrollBar; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxScrollBarNameStr; - -//----------------------------------------------------------------------------- -// wxScrollBar -//----------------------------------------------------------------------------- - -class wxScrollBar: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxScrollBar) - - public: - - wxScrollBar(void) { m_adjust = (GtkAdjustment *) NULL; m_oldPos = 0.0; }; - inline wxScrollBar( wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSB_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr ) - { - Create( parent, id, pos, size, style, validator, name ); - } - bool Create( wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSB_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr ); - ~wxScrollBar(void); - int GetPosition(void) const; - int GetThumbSize() const; - int GetPageSize() const; - int GetRange() const; - virtual void SetPosition( int viewStart ); - virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize, - bool refresh = TRUE ); - - // Backward compatibility - int GetValue(void) const; - void SetValue( int viewStart ); - void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const; - int GetViewLength() const; - int GetObjectLength() const; - void SetPageSize( int pageLength ); - void SetObjectLength( int objectLength ); - void SetViewLength( int viewLength ); - - public: - - GtkAdjustment *m_adjust; - float m_oldPos; -}; - -#endif - // __GTKSCROLLBARH__ diff --git a/include/wx/gtk/settings.h b/include/wx/gtk/settings.h deleted file mode 100644 index b446e86b1f..0000000000 --- a/include/wx/gtk/settings.h +++ /dev/null @@ -1,43 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: settings.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKSETTINGSH__ -#define __GTKSETTINGSH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/gdicmn.h" -#include "wx/pen.h" -#include "wx/font.h" - -class WXDLLEXPORT wxSystemSettings: public wxObject -{ -public: - inline wxSystemSettings(void) {} - - inline static void Init() {} - static void Done(); - - // Get a system colour - static wxColour GetSystemColour(int index); - - // Get a system font - static wxFont GetSystemFont(int index); - - // Get a system metric, e.g. scrollbar size - static int GetSystemMetric(int index); -}; - -#endif - // __GTKSETTINGSH__ diff --git a/include/wx/gtk/slider.h b/include/wx/gtk/slider.h deleted file mode 100644 index 2915e8380f..0000000000 --- a/include/wx/gtk/slider.h +++ /dev/null @@ -1,94 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: slider.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKSLIDERH__ -#define __GTKSLIDERH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxSlider; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxSliderNameStr; - -//----------------------------------------------------------------------------- -// wxSlider -//----------------------------------------------------------------------------- - -class wxSlider: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxSlider) - - public: - wxSlider(void); - inline wxSlider( wxWindow *parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSL_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr ) - { - Create( parent, id, value, minValue, maxValue, pos, size, style, validator, name ); - } - ~wxSlider(void); - bool Create(wxWindow *parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSL_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr ); - virtual int GetValue(void) const; - virtual void SetValue( int ); - void GetSize( int *x, int *y ) const; - void SetSize( int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO ); - void GetPosition( int *x, int *y ) const; - void SetRange( int minValue, int maxValue ); - int GetMin(void) const; - int GetMax(void) const; - void SetTickFreq( int n, int pos ); - int GetTickFreq(void) const; - void SetPageSize( int pageSize ); - int GetPageSize(void) const; - void ClearSel(void); - void ClearTicks(void); - void SetLineSize( int lineSize ); - int GetLineSize(void) const; - int GetSelEnd(void) const; - int GetSelStart(void) const; - void SetSelection( int minPos, int maxPos ); - void SetThumbLength( int len ); - int GetThumbLength(void) const; - void SetTick( int tickPos ); - - public: - - GtkAdjustment *m_adjust; - float m_oldPos; - -}; - -#endif // __GTKSLIDERH__ diff --git a/include/wx/gtk/statbmp.h b/include/wx/gtk/statbmp.h deleted file mode 100644 index b534110b1d..0000000000 --- a/include/wx/gtk/statbmp.h +++ /dev/null @@ -1,60 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: statbmp.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKSTATICBITMAPH__ -#define __GTKSTATICBITMAPH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxStaticBitmap; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char* wxStaticBitmapNameStr; - -//----------------------------------------------------------------------------- -// wxStaticBitmap -//----------------------------------------------------------------------------- - -class wxStaticBitmap: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxStaticBitmap) - - public: - - wxStaticBitmap(void); - wxStaticBitmap( wxWindow *parent, wxWindowID id, const wxBitmap& label, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = wxStaticBitmapNameStr ); - bool Create( wxWindow *parent, wxWindowID id, const wxBitmap& label, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = wxStaticBitmapNameStr); - virtual void SetBitmap( const wxBitmap& bitmap ); - wxBitmap& GetBitmap(void) const { return (wxBitmap&)m_bitmap; } - - private: - - wxBitmap m_bitmap; -}; - -#endif // __GTKSTATICBITMAPH__ diff --git a/include/wx/gtk/statbox.h b/include/wx/gtk/statbox.h deleted file mode 100644 index a6248a6bc9..0000000000 --- a/include/wx/gtk/statbox.h +++ /dev/null @@ -1,55 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: stabox.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKSTATICBOXH__ -#define __GTKSTATICBOXH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxStaticBox; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxStaticBoxNameStr; - -//----------------------------------------------------------------------------- -// wxStaticBox -//----------------------------------------------------------------------------- - -class wxStaticBox: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxStaticBox) - - public: - - wxStaticBox(void); - wxStaticBox( wxWindow *parent, wxWindowID id, const wxString &label, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = 0, const wxString &name = wxStaticBoxNameStr ); - bool Create( wxWindow *parent, wxWindowID id, const wxString &label, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = 0, const wxString &name = wxStaticBoxNameStr ); -}; - -#endif // __GTKSTATICBOXH__ diff --git a/include/wx/gtk/stattext.h b/include/wx/gtk/stattext.h deleted file mode 100644 index e60303c890..0000000000 --- a/include/wx/gtk/stattext.h +++ /dev/null @@ -1,57 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: stattext.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKSTATICTEXTH__ -#define __GTKSTATICTEXTH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxStaticText; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxStaticTextNameStr; - -//----------------------------------------------------------------------------- -// wxStaticText -//----------------------------------------------------------------------------- - -class wxStaticText: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxStaticText) - - public: - - wxStaticText(void); - wxStaticText( wxWindow *parent, wxWindowID id, const wxString &label, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = 0, const wxString &name = wxStaticTextNameStr ); - bool Create( wxWindow *parent, wxWindowID id, const wxString &label, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = 0, const wxString &name = wxStaticTextNameStr ); - wxString GetLabel(void) const; - void SetLabel( const wxString &label ); -}; - -#endif // __GTKSTATICTEXTH__ diff --git a/include/wx/gtk/tbargtk.h b/include/wx/gtk/tbargtk.h deleted file mode 100644 index 93f6e7bafc..0000000000 --- a/include/wx/gtk/tbargtk.h +++ /dev/null @@ -1,140 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tbargtk.h -// Purpose: GTK toolbar -// Author: Robert Roebling -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Robert Roebling -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __TBARGTKH__ -#define __TBARGTKH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxToolBarTool; -class wxToolBar; - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -#define wxTOOL_STYLE_BUTTON 1 -#define wxTOOL_STYLE_SEPARATOR 2 - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxToolBarNameStr; - -//----------------------------------------------------------------------------- -// wxToolBarTool -//----------------------------------------------------------------------------- - -class wxToolBarTool: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxToolBarTool) - - public: - - wxToolBarTool(void) {}; - wxToolBarTool( wxToolBar *owner, int theIndex = 0, - const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap, - bool toggle = FALSE, wxObject *clientData = (wxObject *) NULL, - const wxString& shortHelpString = "", const wxString& longHelpString = "", - GtkWidget *item = (GtkWidget *) NULL ); - ~wxToolBarTool(void); - - public: - - int m_toolStyle; - wxObject *m_clientData; - int m_index; - bool m_toggleState; - bool m_isToggle; - bool m_deleteSecondBitmap; - bool m_enabled; - wxBitmap m_bitmap1; - wxBitmap m_bitmap2; - bool m_isMenuCommand; - wxString m_shortHelpString; - wxString m_longHelpString; - wxToolBar *m_owner; - GtkWidget *m_item; -}; - -//----------------------------------------------------------------------------- -// wxToolBar -//----------------------------------------------------------------------------- - -class wxToolBar: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxToolBar) - - public: - - wxToolBar(void); - wxToolBar( wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = wxToolBarNameStr ); - ~wxToolBar(void); - - bool Create( wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = wxToolBarNameStr); - - // Only allow toggle if returns TRUE. Call when left button up. - virtual bool OnLeftClick(int toolIndex, bool toggleDown); - - // Call when right button down. - virtual void OnRightClick(int toolIndex, float x, float y); - - // Called when the mouse cursor enters a tool bitmap. - // Argument is -1 if mouse is exiting the toolbar. - virtual void OnMouseEnter(int toolIndex); - - // If pushedBitmap is NULL, a reversed version of bitmap is - // created and used as the pushed/toggled image. - // If toggle is TRUE, the button toggles between the two states. - virtual wxToolBarTool *AddTool( int toolIndex, const wxBitmap& bitmap, - const wxBitmap& pushedBitmap = wxNullBitmap, bool toggle = FALSE, - float xPos = -1, float yPos = -1, wxObject *clientData = (wxObject *)NULL, - const wxString& helpString1 = "", const wxString& helpString2 = ""); - virtual void AddSeparator(void); - virtual void ClearTools(void); - - virtual void Realize(void); - - virtual void EnableTool(int toolIndex, bool enable); - virtual void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on - virtual wxObject *GetToolClientData(int index) const; - - virtual bool GetToolState(int toolIndex) const; - virtual bool GetToolEnabled(int toolIndex) const; - - virtual void SetMargins(int x, int y); - void SetMargins(const wxSize& size) { SetMargins(size.x, size.y); }; - virtual void SetToolPacking(int packing); - virtual void SetToolSeparation(int separation); - - public: - - GtkToolbar *m_toolbar; - wxList m_tools; -}; - -#endif - // __TBARGTKH__ - diff --git a/include/wx/gtk/textctrl.h b/include/wx/gtk/textctrl.h deleted file mode 100644 index 034f218b7b..0000000000 --- a/include/wx/gtk/textctrl.h +++ /dev/null @@ -1,115 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: textctrl.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: $Id$ -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKTEXTCTRLH__ -#define __GTKTEXTCTRLH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/control.h" - -#if USE_IOSTREAMH -#include -#else -#include -#endif - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxTextCtrl; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxTextCtrlNameStr; - -//----------------------------------------------------------------------------- -// wxTextCtrl -//----------------------------------------------------------------------------- - -class wxTextCtrl: public wxControl, public streambuf -{ - DECLARE_EVENT_TABLE() - DECLARE_DYNAMIC_CLASS(wxTextCtrl); - - public: - wxTextCtrl(); - wxTextCtrl( wxWindow *parent, wxWindowID id, const wxString &value = "", - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - int style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString &name = wxTextCtrlNameStr ); - bool Create( wxWindow *parent, wxWindowID id, const wxString &value = "", - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - int style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString &name = wxTextCtrlNameStr ); - wxString GetValue() const; - void SetValue( const wxString &value ); - void WriteText( const wxString &text ); - - bool LoadFile( const wxString &file ); - bool SaveFile( const wxString &file ); - bool IsModified() const { return m_modified; } - void SetModified() { m_modified = TRUE; } - void DiscardEdits() { m_modified = FALSE; } -/* - wxString GetLineText( long lineNo ) const; - void OnDropFiles( wxDropFilesEvent &event ); - long PositionToXY( long pos, long *x, long *y ) const; - long XYToPosition( long x, long y ); - int GetNumberOfLines(); -*/ - virtual void SetInsertionPoint( long pos ); - virtual void SetInsertionPointEnd(); - virtual void SetEditable( bool editable ); - virtual void SetSelection( long from, long to ); - void ShowPosition( long pos ); - virtual long GetInsertionPoint() const; - virtual long GetLastPosition() const; - virtual void Remove( long from, long to ); - virtual void Replace( long from, long to, const wxString &value ); - void Cut(); - void Copy(); - void Paste(); - void Delete(); - - void OnChar( wxKeyEvent &event ); - - int overflow(int i); - int sync(); - int underflow(); - - wxTextCtrl& operator<<(const wxString& s); - wxTextCtrl& operator<<(int i); - wxTextCtrl& operator<<(long i); - wxTextCtrl& operator<<(float f); - wxTextCtrl& operator<<(double d); - wxTextCtrl& operator<<(const char c); - - virtual GtkWidget* GetConnectWidget(void); - virtual bool IsOwnGtkWindow( GdkWindow *window ); - - private: - - bool m_modified; - GtkWidget *m_text; -}; - -#endif // __GTKTEXTCTRLH__ - - diff --git a/include/wx/gtk/timer.h b/include/wx/gtk/timer.h deleted file mode 100644 index 821c03b30d..0000000000 --- a/include/wx/gtk/timer.h +++ /dev/null @@ -1,53 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: timer.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKTIMERH__ -#define __GTKTIMERH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" - -//----------------------------------------------------------------------------- -// derived classes -//----------------------------------------------------------------------------- - -class wxTimer; - -//----------------------------------------------------------------------------- -// wxTimer -//----------------------------------------------------------------------------- - -class wxTimer: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxTimer) - - public: - - wxTimer(void); - ~wxTimer(void); - int Interval(void); - bool OneShot(void); - virtual void Notify(void); - void Start( int millisecs = -1, bool oneShot = FALSE ); - void Stop(void); - - private: - - int m_tag; - int m_time; - bool m_oneShot; -}; - -#endif // __GTKTIMERH__ diff --git a/include/wx/gtk/treectrl.h b/include/wx/gtk/treectrl.h deleted file mode 100644 index 61be492ad1..0000000000 --- a/include/wx/gtk/treectrl.h +++ /dev/null @@ -1,334 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: treectrl.h -// Purpose: -// Author: Denis Pershin -// Created: 08/08/98 -// Id: $Id$ -// Copyright: (c) 1998 Denis Pershin and Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __GTKTREECTRL_H__ -#define __GTKTREECTRL_H__ - -#ifdef __GNUG__ -#pragma interface "treectrl.h" -#endif - -#include "wx/defs.h" -#include "wx/string.h" -#include "wx/list.h" -#include "wx/control.h" -#include "wx/event.h" -#include "wx/imaglist.h" -#include "wx/scrolwin.h" -#include "wx/dcclient.h" - -#include - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxTreeItem; -class wxTreeCtrl; -class wxTreeEvent; - -class wxImageList; - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -// WXDLLEXPORT extern const char *wxTreeNameStr; - -#define wxTREE_MASK_HANDLE 0x0001 -#define wxTREE_MASK_STATE 0x0002 -#define wxTREE_MASK_TEXT 0x0004 -#define wxTREE_MASK_IMAGE 0x0008 -#define wxTREE_MASK_SELECTED_IMAGE 0x0010 -#define wxTREE_MASK_CHILDREN 0x0020 -#define wxTREE_MASK_DATA 0x0040 - -#define wxTREE_STATE_BOLD 0x0001 -#define wxTREE_STATE_DROPHILITED 0x0002 -#define wxTREE_STATE_EXPANDED 0x0004 -#define wxTREE_STATE_EXPANDEDONCE 0x0008 -#define wxTREE_STATE_FOCUSED 0x0010 -#define wxTREE_STATE_SELECTED 0x0020 -#define wxTREE_STATE_CUT 0x0040 - -#define wxTREE_HITTEST_ABOVE 0x0001 // Above the client area. -#define wxTREE_HITTEST_BELOW 0x0002 // Below the client area. -#define wxTREE_HITTEST_NOWHERE 0x0004 // In the client area but below the last item. -#define wxTREE_HITTEST_ONITEMBUTTON 0x0010 // On the button associated with an item. -#define wxTREE_HITTEST_ONITEMICON 0x0020 // On the bitmap associated with an item. -#define wxTREE_HITTEST_ONITEMINDENT 0x0040 // In the indentation associated with an item. -#define wxTREE_HITTEST_ONITEMLABEL 0x0080 // On the label (string) associated with an item. -#define wxTREE_HITTEST_ONITEMRIGHT 0x0100 // In the area to the right of an item. -#define wxTREE_HITTEST_ONITEMSTATEICON 0x0200 // On the state icon for a tree view item that is in a user-defined state. -#define wxTREE_HITTEST_TOLEFT 0x0400 // To the right of the client area. -#define wxTREE_HITTEST_TORIGHT 0x0800 // To the left of the client area. - -#define wxTREE_HITTEST_ONITEM (wxTREE_HITTEST_ONITEMICON | wxTREE_HITTEST_ONITEMLABEL | wxTREE_HITTEST_ONITEMSTATEICON) - -// Flags for GetNextItem -enum { - wxTREE_NEXT_CARET, // Retrieves the currently selected item. - wxTREE_NEXT_CHILD, // Retrieves the first child item. The hItem parameter must be NULL. - wxTREE_NEXT_DROPHILITE, // Retrieves the item that is the target of a drag-and-drop operation. - wxTREE_NEXT_FIRSTVISIBLE, // Retrieves the first visible item. - wxTREE_NEXT_NEXT, // Retrieves the next sibling item. - wxTREE_NEXT_NEXTVISIBLE, // Retrieves the next visible item that follows the specified item. - wxTREE_NEXT_PARENT, // Retrieves the parent of the specified item. - wxTREE_NEXT_PREVIOUS, // Retrieves the previous sibling item. - wxTREE_NEXT_PREVIOUSVISIBLE, // Retrieves the first visible item that precedes the specified item. - wxTREE_NEXT_ROOT // Retrieves the first child item of the root item of which the specified item is a part. -}; - -// Flags for ExpandItem -enum { - wxTREE_EXPAND_EXPAND, - wxTREE_EXPAND_COLLAPSE, - wxTREE_EXPAND_COLLAPSE_RESET, - wxTREE_EXPAND_TOGGLE -}; - -// Flags for InsertItem -enum { - wxTREE_INSERT_LAST = -1, - wxTREE_INSERT_FIRST = -2, - wxTREE_INSERT_SORT = -3 -}; - -//----------------------------------------------------------------------------- -// wxTreeItem -//----------------------------------------------------------------------------- - - -class WXDLLEXPORT wxTreeItem: public wxObject -{ -public: - wxTreeCtrl *m_owner; - GtkWidget *m_parentwidget; - GtkTreeItem *m_widget; - GtkTree *m_tree; - long m_mask; - long m_itemId; - long m_state; - long m_stateMask; - wxString m_text; - int m_image; - int m_selectedImage; - int m_children; - wxList m_childlist; - long m_data; - - wxTreeItem(); - wxTreeItem(GtkWidget *parent, const wxTreeItem &item); - ~wxTreeItem(); - - void Create(); - - void AddChild(wxTreeItem *child); - void DeleteChildren(); - bool HasChildren(); - wxTreeItem *FindItem(long itemId) const; - wxTreeItem *FindItem(GtkTreeItem *item) const; - - // Accessors - inline long GetMask() const { return m_mask; } - inline long GetItemId() const { return m_itemId; } - inline long GetState() const { return m_state; } - inline long GetStateMask() const { return m_stateMask; } - inline wxString GetText() const { return m_text; } - inline int GetImage() const { return m_image; } - inline int GetSelectedImage() const { return m_selectedImage; } - inline const wxList &GetChildren() const { return m_childlist; } - inline long GetData() const { return m_data; } - - inline void SetMask(long mask) { m_mask = mask; } - inline void SetItemId(long id) { m_itemId = m_itemId = id; } - inline void GetState(long state) { m_state = state; } - inline void SetStateMask(long stateMask) { m_stateMask = stateMask; } - inline void GetText(const wxString& text) { m_text = text; } - inline void SetImage(int image) { m_image = image; } - inline void SetSelectedImage(int selImage) { m_selectedImage = selImage; } - inline void SetChildren(const wxList &children) { m_childlist = children; } - inline void SetData(long data) { m_data = data; } - - int NumberOfVisibleDescendents(); -private: - friend wxTreeCtrl; - friend void gtk_treeitem_expand_callback(GtkWidget *widget, wxTreeItem *treeitem); - friend void gtk_treeitem_collapse_callback(GtkWidget *widget, wxTreeItem *treeitem); - friend void gtk_treeitem_select_callback( GtkWidget *WXUNUSED(widget), wxTreeItem *treeitem); - friend void gtk_treeitem_deselect_callback( GtkWidget *WXUNUSED(widget), wxTreeItem *treeitem); - - void AddSubtree(); - void PrepareEvent(wxTreeEvent &event); - void SendDelete(wxWindow *target); - void SendExpand(wxWindow *target); - void SendExpanding(wxWindow *target); - void SendCollapse(wxWindow *target); - void SendCollapsing(wxWindow *target); - void SendSelChanged(wxWindow *target); - void SendSelChanging(wxWindow *target); - - inline wxTreeItem *GetChild(long no) { - return (wxTreeItem *)(m_childlist.Nth(no)->Data()); - } - inline long GetChildrenNumber() { - return m_childlist.Number(); - } - - guint expand_handler; - guint collapse_handler; - -// It is a quick hack to make TreeCtrl working... I do not know why -// but signals is GTK does not disconnected... - bool ignore; - - DECLARE_DYNAMIC_CLASS(wxTreeItem) -}; - -//----------------------------------------------------------------------------- -// wxTreeCtrl -//----------------------------------------------------------------------------- - -class wxTreeCtrl: public wxScrolledWindow { -public: - GtkTree *m_tree; - - wxTreeCtrl(); - wxTreeCtrl(wxWindow *parent, const wxWindowID id = -1, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxTR_HAS_BUTTONS, - const wxString& name = "wxTreeCtrl" ); - ~wxTreeCtrl(); - bool Create(wxWindow *parent, const wxWindowID id = -1, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxTR_HAS_BUTTONS, - const wxString& name = "wxTreeCtrl"); - - int GetCount() const; - - long InsertItem( long parent, const wxString& label, - int image = -1, int selImage = -1, - long insertAfter = wxTREE_INSERT_LAST ); - - long InsertItem( long parent, wxTreeItem &info, - long insertAfter = wxTREE_INSERT_LAST ); - void DeleteItem( long item ); - void DeleteChildren( long item ); - bool DeleteAllItems(); - - bool ExpandItem(long item) { return ExpandItem(item, wxTREE_EXPAND_EXPAND); } - bool ExpandItem( long item, int action ); - - bool CollapseItem(long item) { return ExpandItem(item, wxTREE_EXPAND_COLLAPSE); } - bool ToggleItem(long item) { return ExpandItem(item, wxTREE_EXPAND_TOGGLE); } - - // is the item expanded now? - bool IsItemExpanded(long item) - { - wxTreeItem *pItem = FindItem(item); - return pItem && (pItem->GetState() & wxTREE_STATE_EXPANDED); - } - -/* - bool GetItem( wxTreeItem &info ) const; -*/ - - long GetItemData( long item ) const; - wxString GetItemText( long item ) const; - int GetItemImage(long item) const; - long GetParent( long item ) const; - long GetRootItem() const; -/* - long GetSelection() const; - bool SelectItem( long item ); -*/ - - bool ItemHasChildren( long item ) const; - void SetIndent( int indent ); - int GetIndent() const; - -/* - bool SetItem( wxTreeItem &info ); - bool SetItemData( long item, long data ); - bool SetItemText( long item, const wxString &text ); - void SetItemImage(long item, int image, int imageSel) const; - long HitTest( const wxPoint& point, int &flags ); -*/ - - wxTreeItem *FindItem(GtkTreeItem *item) const; - - wxImageList *GetImageList(int which = wxIMAGE_LIST_NORMAL) const; - void SetImageList(wxImageList *imageList, int which = wxIMAGE_LIST_NORMAL); - -private: - // set the selection to the specified item generating appropriate event(s) if - // not disabled - void SelectItem(wxTreeItem *item, bool bDoEvents = TRUE); - - wxTreeItem *m_anchor; - wxTreeItem *m_current; - int m_indent; - long m_lastId; - bool m_isCreated; - wxImageList *m_imageList; - wxImageList *m_smallImageList; - - void CalculateLevel( wxTreeItem *item, wxPaintDC &dc, int level, int &y ); - void CalculatePositions(); - wxTreeItem *FindItem( long itemId ) const; - -// DECLARE_EVENT_TABLE() - DECLARE_DYNAMIC_CLASS(wxTreeCtrl) -}; - -//----------------------------------------------------------------------------- -// wxTreeEvent -//----------------------------------------------------------------------------- - -class WXDLLEXPORT wxTreeEvent: public wxCommandEvent -{ - DECLARE_DYNAMIC_CLASS(wxTreeEvent) - - public: - wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0); - - int m_code; - wxTreeItem m_item; - long m_oldItem; - wxPoint m_pointDrag; - - inline long GetOldItem() const { return m_oldItem; } - inline wxTreeItem& GetItem() const { return (wxTreeItem&) m_item; } - inline wxPoint GetPoint() const { return m_pointDrag; } - inline void SetCode(int code) { m_code = code; } - inline int GetCode() const { return m_code; } -}; - -typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); - -#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn , (wxObject *) NULL }, -#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, ( wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, ( wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, - -#endif - // __GTKTREECTRL_H__ diff --git a/include/wx/gtk/win_gtk.h b/include/wx/gtk/win_gtk.h deleted file mode 100644 index d42e89bebe..0000000000 --- a/include/wx/gtk/win_gtk.h +++ /dev/null @@ -1,69 +0,0 @@ -/* /////////////////////////////////////////////////////////////////////////// -// Name: win_gtk.h -// Purpose: wxWindows's GTK base widget -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////// */ - - -#ifndef __GTK_MYFIXED_H__ -#define __GTK_MYFIXED_H__ - - -#include -#include - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#define GTK_MYFIXED(obj) GTK_CHECK_CAST (obj, gtk_myfixed_get_type (), GtkMyFixed) -#define GTK_MYFIXED_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_myfixed_get_type (), GtkMyFixedClass) -#define GTK_IS_MYFIXED(obj) GTK_CHECK_TYPE (obj, gtk_myfixed_get_type ()) - - -typedef struct _GtkMyFixed GtkMyFixed; -typedef struct _GtkMyFixedClass GtkMyFixedClass; -typedef struct _GtkMyFixedChild GtkMyFixedChild; - -struct _GtkMyFixed -{ - GtkContainer container; - - GList *children; -}; - -struct _GtkMyFixedClass -{ - GtkContainerClass parent_class; -}; - -struct _GtkMyFixedChild -{ - GtkWidget *widget; - gint16 x; - gint16 y; -}; - -guint gtk_myfixed_get_type (void); -GtkWidget* gtk_myfixed_new (void); -void gtk_myfixed_put (GtkMyFixed *myfixed, - GtkWidget *widget, - gint16 x, - gint16 y); -void gtk_myfixed_move (GtkMyFixed *myfixed, - GtkWidget *widget, - gint16 x, - gint16 y); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __GTK_MYFIXED_H__ */ diff --git a/include/wx/gtk/window.h b/include/wx/gtk/window.h deleted file mode 100644 index 665c3ee0c7..0000000000 --- a/include/wx/gtk/window.h +++ /dev/null @@ -1,318 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: window.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKWINDOWH__ -#define __GTKWINDOWH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/event.h" -#include "wx/validate.h" -#include "wx/cursor.h" -#include "wx/font.h" -#include "wx/dc.h" -#include "wx/region.h" -#include "wx/dnd.h" -#include "wx/accel.h" - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxFrameNameStr; -extern wxList wxTopLevelWindows; - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxLayoutConstraints; -class wxSizer; -class wxResourceTable; -class wxItemResource; - -class wxWindow; -class wxCanvas; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxPanelNameStr; -extern const wxSize wxDefaultSize; -extern const wxPoint wxDefaultPosition; - -//----------------------------------------------------------------------------- -// wxWindow -//----------------------------------------------------------------------------- - -class wxWindow: public wxEvtHandler -{ -public: - wxWindow(); - inline wxWindow(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxPanelNameStr) - { - Create(parent, id, pos, size, style, name); - } - bool Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxPanelNameStr); - virtual ~wxWindow(); - - virtual bool LoadFromResource( wxWindow *parent, const wxString& resourceName, - const wxResourceTable *table = (const wxResourceTable *) NULL); - virtual wxControl *CreateItem( const wxItemResource *childResource, - const wxResourceTable *table = (const wxResourceTable *) NULL); - - bool Close( bool force = FALSE ); - virtual bool Destroy(); - virtual bool DestroyChildren(); - - virtual void PrepareDC( wxDC &dc ); - - virtual void SetSize( int x, int y, int width, int height, - int sizeFlags = wxSIZE_AUTO ); - virtual void SetSize( int width, int height ); - virtual void Move( int x, int y ); - virtual void GetSize( int *width, int *height ) const; - virtual void SetClientSize( int const width, int const height ); - virtual void GetClientSize( int *width, int *height ) const; - virtual void GetPosition( int *x, int *y ) const; - virtual void Centre( int direction = wxHORIZONTAL ); - inline void Center(int direction = wxHORIZONTAL) { Centre(direction); } - virtual void Fit(); - - virtual void SetSizeHints( int minW, int minH, int maxW = -1, int maxH = -1, int incW = -1, int incH = -1 ); - - void OnSize( wxSizeEvent &event ); - void OnIdle( wxIdleEvent& event ); - - virtual bool Show( bool show ); - virtual void Enable( bool enable ); - virtual void MakeModal( bool modal ); - virtual bool IsEnabled() const { return m_isEnabled; } - inline bool Enabled(void) const { return IsEnabled(); } - virtual void SetFocus(); - virtual bool OnClose(); - - virtual void AddChild( wxWindow *child ); - wxList *GetChildren(); - virtual void RemoveChild( wxWindow *child ); - void SetReturnCode( int retCode ); - int GetReturnCode(); - wxWindow *GetParent() const - { return m_parent; } - wxWindow *GetGrandParent(void) const - { return (m_parent ? m_parent->m_parent : (wxWindow*)NULL); } - void SetParent( wxWindow *p ) - { m_parent = p; } - - wxEvtHandler *GetEventHandler(); - void SetEventHandler( wxEvtHandler *handler ); - void PushEventHandler( wxEvtHandler *handler ); - wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE ); - - virtual wxValidator *GetValidator(); - virtual void SetValidator( const wxValidator &validator ); - - virtual void SetAcceleratorTable( const wxAcceleratorTable& accel ); - virtual wxAcceleratorTable *GetAcceleratorTable() { return &m_acceleratorTable; } - - bool IsBeingDeleted(); - - void SetId( wxWindowID id ); - wxWindowID GetId(); - - void SetCursor( const wxCursor &cursor ); - - virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL ); - virtual void Clear(); - - virtual wxRegion GetUpdateRegion() const; - virtual bool IsExposed(int x, int y) const; - virtual bool IsExposed(int x, int y, int w, int h) const; - virtual bool IsExposed(const wxPoint& pt) const; - virtual bool IsExposed(const wxRect& rect) const; - - virtual wxColour GetBackgroundColour() const; - virtual void SetBackgroundColour( const wxColour &colour ); - virtual wxColour GetForegroundColour() const; - virtual void SetForegroundColour( const wxColour &colour ); - - virtual int GetCharHeight(void) const; - virtual int GetCharWidth(void) const; - virtual void GetTextExtent( const wxString& string, int *x, int *y, - int *descent = (int *) NULL, - int *externalLeading = (int *) NULL, - const wxFont *theFont = (const wxFont *) NULL, bool use16 = FALSE) const; - - virtual void SetDefaultBackgroundColour( const wxColour& col ) - { m_defaultBackgroundColour = col; } - virtual wxColour GetDefaultBackgroundColour() const - { return m_defaultBackgroundColour; } - virtual void SetDefaultForegroundColour( const wxColour& col ) - { m_defaultForegroundColour = col; } - virtual wxColour GetDefaultForegroundColour() const - { return m_defaultForegroundColour; } - - virtual void SetFont( const wxFont &font ); - virtual wxFont *GetFont(); - // For backward compatibility - inline virtual void SetButtonFont(const wxFont& font) { SetFont(font); } - inline virtual void SetLabelFont(const wxFont& font) { SetFont(font); } - inline virtual wxFont *GetLabelFont() { return GetFont(); }; - inline virtual wxFont *GetButtonFont() { return GetFont(); }; - virtual void SetWindowStyleFlag( long flag ); - virtual long GetWindowStyleFlag() const; - virtual void CaptureMouse(); - virtual void ReleaseMouse(); - virtual void SetTitle( const wxString &title ); - virtual wxString GetTitle() const; - virtual void SetName( const wxString &name ); - virtual wxString GetName() const; - virtual wxString GetLabel() const; - - void OnSysColourChanged( wxSysColourChangedEvent &WXUNUSED(event) ) {}; - - virtual bool IsShown() const; - - virtual void Raise(void); - virtual void Lower(void); - - virtual bool IsRetained(); - virtual wxWindow *FindWindow( long id ); - virtual wxWindow *FindWindow( const wxString& name ); - void AllowDoubleClick( bool WXUNUSED(allow) ) {}; - void SetDoubleClick( bool WXUNUSED(allow) ) {}; - virtual void ClientToScreen( int *x, int *y ); - virtual void ScreenToClient( int *x, int *y ); - - virtual bool Validate(); - virtual bool TransferDataToWindow(); - virtual bool TransferDataFromWindow(); - void OnInitDialog( wxInitDialogEvent &event ); - virtual void InitDialog(); - - virtual bool PopupMenu( wxMenu *menu, int x, int y ); - - virtual void SetDropTarget( wxDropTarget *dropTarget ); - virtual wxDropTarget *GetDropTarget() const; - - virtual void SetScrollbar( int orient, int pos, int thumbVisible, - int range, bool refresh = TRUE ); - virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE ); - virtual int GetScrollPos( int orient ) const; - virtual int GetScrollThumb( int orient ) const; - virtual int GetScrollRange( int orient ) const; - virtual void ScrollWindow( int dx, int dy, const wxRect* rect = (wxRect *) NULL ); - - virtual bool AcceptsFocus() const; - void UpdateWindowUI(); - -public: // cannot get private going yet - - virtual GtkWidget* GetConnectWidget(void); - virtual bool IsOwnGtkWindow( GdkWindow *window ); - - void PreCreation( wxWindow *parent, wxWindowID id, const wxPoint &pos, - const wxSize &size, long style, const wxString &name ); - void PostCreation(); - bool HasVMT(); - virtual void ImplementSetSize(); - virtual void ImplementSetPosition(); - - wxWindow *m_parent; - wxList m_children; - int m_x,m_y; - int m_width,m_height; - int m_minWidth,m_minHeight; - int m_maxWidth,m_maxHeight; - int m_retCode; - wxEvtHandler *m_eventHandler; - wxValidator *m_windowValidator; - wxDropTarget *m_pDropTarget; - wxWindowID m_windowId; - wxCursor *m_cursor; - wxFont m_font; - wxColour m_backgroundColour; - wxColour m_defaultBackgroundColour; - wxColour m_foregroundColour ; - wxColour m_defaultForegroundColour; - wxRegion m_updateRegion; - long m_windowStyle; - bool m_isShown; - bool m_isEnabled; - wxString m_windowName; - wxAcceleratorTable m_acceleratorTable; - - GtkWidget *m_widget; - GtkWidget *m_wxwindow; - GtkAdjustment *m_hAdjust,*m_vAdjust; - float m_oldHorizontalPos; - float m_oldVerticalPos; - bool m_needParent; - bool m_hasScrolling; - bool m_hasVMT; - bool m_sizeSet; - bool m_resizing; - -public: - - wxLayoutConstraints *m_constraints; - wxList *m_constraintsInvolvedIn; - wxSizer *m_windowSizer; - wxWindow *m_sizerParent; - bool m_autoLayout; - - wxLayoutConstraints *GetConstraints() const; - void SetConstraints( wxLayoutConstraints *constraints ); - void SetAutoLayout( bool autoLayout ); - bool GetAutoLayout() const; - bool Layout(); - void SetSizer( wxSizer *sizer ); - wxSizer *GetSizer() const; - void SetSizerParent( wxWindow *win ); - wxWindow *GetSizerParent() const; - void UnsetConstraints(wxLayoutConstraints *c); - inline wxList *GetConstraintsInvolvedIn() const ; - void AddConstraintReference(wxWindow *otherWin); - void RemoveConstraintReference(wxWindow *otherWin); - void DeleteRelatedConstraints(); - virtual void ResetConstraints(); - virtual void SetConstraintSizes(bool recurse = TRUE); - virtual bool LayoutPhase1(int *noChanges); - virtual bool LayoutPhase2(int *noChanges); - virtual bool DoPhase(int); - virtual void TransformSizerToActual(int *x, int *y) const ; - virtual void SizerSetSize(int x, int y, int w, int h); - virtual void SizerMove(int x, int y); - virtual void SetSizeConstraint(int x, int y, int w, int h); - virtual void MoveConstraint(int x, int y); - virtual void GetSizeConstraint(int *w, int *h) const ; - virtual void GetClientSizeConstraint(int *w, int *h) const ; - virtual void GetPositionConstraint(int *x, int *y) const ; - - DECLARE_DYNAMIC_CLASS(wxWindow) - DECLARE_EVENT_TABLE() -}; - -#endif // __GTKWINDOWH__ diff --git a/include/wx/gtk1/accel.h b/include/wx/gtk1/accel.h deleted file mode 100644 index 44bfd043ae..0000000000 --- a/include/wx/gtk1/accel.h +++ /dev/null @@ -1,106 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: accel.h -// Purpose: wxAcceleratorTable class -// Author: Robert -// Modified by: -// RCS-ID: -// Copyright: (c) Robert Roebling -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __GTKACCELH__ -#define __GTKACCELH__ - -#ifdef __GNUG__ -#pragma interface "accel.h" -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/event.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxAcceleratorEntry; -class wxAcceleratorTable; - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -extern wxAcceleratorTable wxNullAcceleratorTable; - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -// Hold Ctrl key down -#define wxACCEL_ALT 0x01 - -// Hold Ctrl key down -#define wxACCEL_CTRL 0x02 - - // Hold Shift key down -#define wxACCEL_SHIFT 0x04 - - // Hold no other key -#define wxACCEL_NORMAL 0x00 - -//----------------------------------------------------------------------------- -// wxAcceleratorEntry -//----------------------------------------------------------------------------- - -class wxAcceleratorEntry -{ - public: - - wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0) - { m_flags = flags; m_keyCode = keyCode; m_command = cmd; } - - inline void Set(int flags, int keyCode, int cmd) - { m_flags = flags; m_keyCode = keyCode; m_command = cmd; } - - inline int GetFlags() const { return m_flags; } - inline int GetKeyCode() const { return m_keyCode; } - inline int GetCommand() const { return m_command; } - - int m_flags; - int m_keyCode; // ASCII or virtual keycode - int m_command; // Command id to generate -}; - -//----------------------------------------------------------------------------- -// wxAcceleratorTable -//----------------------------------------------------------------------------- - -class wxAcceleratorTable: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxAcceleratorTable) - - public: - wxAcceleratorTable(); - wxAcceleratorTable(int n, wxAcceleratorEntry entries[] ); - ~wxAcceleratorTable(); - - inline wxAcceleratorTable(const wxAcceleratorTable& accel) - { Ref(accel); } - inline wxAcceleratorTable(const wxAcceleratorTable* accel) - { if (accel) Ref(*accel); } - inline wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) - { if (*this == accel) return (*this); Ref(accel); return *this; } - inline bool operator == (const wxAcceleratorTable& accel) - { return m_refData == accel.m_refData; } - inline bool operator != (const wxAcceleratorTable& accel) - { return m_refData != accel.m_refData; } - - bool Ok() const; - -// private: - - int GetCommand( wxKeyEvent &event ); - -}; - -#endif diff --git a/include/wx/gtk1/app.h b/include/wx/gtk1/app.h deleted file mode 100644 index 53f89a2abe..0000000000 --- a/include/wx/gtk1/app.h +++ /dev/null @@ -1,134 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: app.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __GTKAPPH__ -#define __GTKAPPH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/window.h" -#include "wx/frame.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxApp; -class wxLog; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern wxApp *wxTheApp; - -//----------------------------------------------------------------------------- -// global functions -//----------------------------------------------------------------------------- - -void wxExit(void); -bool wxYield(void); - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -#define wxPRINT_WINDOWS 1 -#define wxPRINT_POSTSCRIPT 2 - -//----------------------------------------------------------------------------- -// wxApp -//----------------------------------------------------------------------------- - -class wxApp: public wxEvtHandler -{ - DECLARE_DYNAMIC_CLASS(wxApp) - - public: - - wxApp(void); - ~wxApp(void); - - static void SetInitializerFunction(wxAppInitializerFunction fn) { m_appInitFn = fn; } - static wxAppInitializerFunction GetInitializerFunction(void) { return m_appInitFn; } - - virtual bool OnInit(void); - virtual bool OnInitGui(void); - virtual int OnRun(void); - virtual int OnExit(void); - - wxWindow *GetTopWindow(void); - void SetTopWindow( wxWindow *win ); - virtual int MainLoop(void); - void ExitMainLoop(void); - bool Initialized(void); - virtual bool Pending(void); - virtual void Dispatch(void); - - inline void SetWantDebugOutput(bool flag) { m_wantDebugOutput = flag; } - inline bool GetWantDebugOutput(void) { return m_wantDebugOutput; } - - void OnIdle( wxIdleEvent &event ); - bool SendIdleEvents(void); - bool SendIdleEvents( wxWindow* win ); - - inline wxString GetAppName(void) const { - if (m_appName != "") - return m_appName; - else return m_className; - } - inline void SetAppName(const wxString& name) { m_appName = name; }; - inline wxString GetClassName(void) const { return m_className; } - inline void SetClassName(const wxString& name) { m_className = name; } - const wxString& GetVendorName() const { return m_vendorName; } - void SetVendorName(const wxString& name) { m_vendorName = name; } - - inline void SetExitOnFrameDelete(bool flag) { m_exitOnFrameDelete = flag; } - inline bool GetExitOnFrameDelete(void) const { return m_exitOnFrameDelete; } - - void SetPrintMode(int WXUNUSED(mode) ) {}; - int GetPrintMode(void) const { return wxPRINT_POSTSCRIPT; }; - - // override this function to create default log target of arbitrary - // user-defined classv (default implementation creates a wxLogGui object) - virtual wxLog *CreateLogTarget(); - - // GTK implementation - - static void CommonInit(void); - static void CommonCleanUp(void); - - bool ProcessIdle(void); - void DeletePendingObjects(void); - - bool m_initialized; - bool m_exitOnFrameDelete; - bool m_wantDebugOutput; - wxWindow *m_topWindow; - - gint m_idleTag; - - int argc; - char **argv; - - static wxAppInitializerFunction m_appInitFn; - -private: - wxString m_vendorName, - m_appName, - m_className; - - DECLARE_EVENT_TABLE() -}; - -#endif // __GTKAPPH__ diff --git a/include/wx/gtk1/bitmap.h b/include/wx/gtk1/bitmap.h deleted file mode 100644 index 18f13ad7e3..0000000000 --- a/include/wx/gtk1/bitmap.h +++ /dev/null @@ -1,142 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bitmap.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKBITMAPH__ -#define __GTKBITMAPH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/palette.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxDC; -class wxPaintDC; -class wxMemoryDC; -class wxToolBar; -class wxBitmapButton; -class wxStaticBitmap; -class wxFrame; -class wxDialog; -class wxTreeCtrl; - -class wxMask; -class wxBitmap; - -//----------------------------------------------------------------------------- -// wxMask -//----------------------------------------------------------------------------- - -class wxMask: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxMask) - - public: - - wxMask(); - wxMask( const wxBitmap& bitmap, const wxColour& colour ); - wxMask( const wxBitmap& bitmap, int paletteIndex ); - wxMask( const wxBitmap& bitmap ); - ~wxMask(); - - private: - - friend wxBitmap; - friend wxDC; - friend wxPaintDC; - friend wxToolBar; - friend wxBitmapButton; - friend wxStaticBitmap; - friend wxFrame; - friend wxDialog; - friend wxTreeCtrl; - - GdkBitmap *GetBitmap() const; - - protected: - - GdkBitmap *m_bitmap; - -}; - -//----------------------------------------------------------------------------- -// wxBitmap -//----------------------------------------------------------------------------- - -// CMB 20/5/98: added xbm constructor and GetBitmap() method -class wxBitmap: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxBitmap) - - public: - - wxBitmap(); - wxBitmap( int width, int height, int depth = -1 ); - wxBitmap( const char bits[], int width, int height, int depth = 1 ); - wxBitmap( char **bits ); - wxBitmap( const wxBitmap& bmp ); - wxBitmap( const wxBitmap* bmp ); - wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM); - ~wxBitmap(); - wxBitmap& operator = ( const wxBitmap& bmp ); - bool operator == ( const wxBitmap& bmp ); - bool operator != ( const wxBitmap& bmp ); - bool Ok() const; - - int GetHeight() const; - int GetWidth() const; - int GetDepth() const; - void SetHeight( int height ); - void SetWidth( int width ); - void SetDepth( int depth ); - - wxMask *GetMask() const; - void SetMask( wxMask *mask ); - - void Resize( int height, int width ); - - bool SaveFile( const wxString &name, int type, wxPalette *palette = (wxPalette *) NULL ); - bool LoadFile( const wxString &name, int type = wxBITMAP_TYPE_XPM); - - wxPalette *GetPalette() const; - wxPalette *GetColourMap() const - { return GetPalette(); }; - - private: - - friend wxDC; - friend wxPaintDC; - friend wxMemoryDC; - friend wxToolBar; - friend wxBitmapButton; - friend wxStaticBitmap; - friend wxFrame; - friend wxDialog; - friend wxTreeCtrl; - - GdkPixmap *GetPixmap() const; - GdkBitmap *GetBitmap() const; - - void DestroyImage(); - void RecreateImage(); - void Render(); - - // no data :-) -}; - -#endif // __GTKBITMAPH__ diff --git a/include/wx/gtk1/bmpbuttn.h b/include/wx/gtk1/bmpbuttn.h deleted file mode 100644 index 6800d97bf4..0000000000 --- a/include/wx/gtk1/bmpbuttn.h +++ /dev/null @@ -1,72 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bmpbutton.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __BMPBUTTONH__ -#define __BMPBUTTONH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxBitmapButton; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxButtonNameStr; - -//----------------------------------------------------------------------------- -// wxBitmapButton -//----------------------------------------------------------------------------- - -class wxBitmapButton: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxBitmapButton) - - public: - - wxBitmapButton(void); - inline wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) - { - Create(parent, id, bitmap, pos, size, style, validator, name); - } - bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); - void SetDefault(void); - void SetLabel( const wxString &label ); - wxString GetLabel(void) const; - virtual void SetLabel(const wxBitmap& bitmap) { SetBitmapLabel(bitmap); } - virtual void SetBitmapLabel( const wxBitmap& bitmap ); - wxBitmap& GetBitmapLabel(void) const { return (wxBitmap&) m_bitmap; } - - public: - - wxBitmap m_bitmap; - -}; -#endif // __BMPBUTTONH__ diff --git a/include/wx/gtk1/brush.h b/include/wx/gtk1/brush.h deleted file mode 100644 index 32048f67b7..0000000000 --- a/include/wx/gtk1/brush.h +++ /dev/null @@ -1,60 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: brush.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKBRUSHH__ -#define __GTKBRUSHH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/gdiobj.h" -#include "wx/bitmap.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxBrush; - -//----------------------------------------------------------------------------- -// wxBrush -//----------------------------------------------------------------------------- - -class wxBrush: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxBrush) - - public: - - wxBrush(void); - wxBrush( const wxColour &colour, int style ); - wxBrush( const wxString &colourName, int style ); - wxBrush( const wxBitmap &stippleBitmap ); - wxBrush( const wxBrush &brush ); - wxBrush( const wxBrush *brush ); - ~wxBrush(void); - wxBrush& operator = ( const wxBrush& brush ); - bool operator == ( const wxBrush& brush ); - bool operator != ( const wxBrush& brush ); - bool Ok(void) const; - - int GetStyle(void) const; - wxColour &GetColour(void) const; - wxBitmap *GetStipple(void) const; - - // no data :-) -}; - -#endif // __GTKBRUSHH__ diff --git a/include/wx/gtk1/button.h b/include/wx/gtk1/button.h deleted file mode 100644 index 0d5bf16b5c..0000000000 --- a/include/wx/gtk1/button.h +++ /dev/null @@ -1,65 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: button.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKBUTTONH__ -#define __GTKBUTTONH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxButton; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxButtonNameStr; - -//----------------------------------------------------------------------------- -// wxButton -//----------------------------------------------------------------------------- - -class wxButton: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxButton) - - public: - - wxButton(void); - inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } - bool Create(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); - void SetDefault(void); - void SetLabel( const wxString &label ); - void Enable( bool enable ); -}; - -#endif // __GTKBUTTONH__ diff --git a/include/wx/gtk1/checkbox.h b/include/wx/gtk1/checkbox.h deleted file mode 100644 index d949234568..0000000000 --- a/include/wx/gtk1/checkbox.h +++ /dev/null @@ -1,64 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: checkbox.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKCHECKBOXH__ -#define __GTKCHECKBOXH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxCheckBox; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxCheckBoxNameStr; - -//----------------------------------------------------------------------------- -// wxCheckBox -//----------------------------------------------------------------------------- - -class wxCheckBox: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxCheckBox) - - public: - - wxCheckBox(void); - inline wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } - bool Create( wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr ); - void SetValue( bool state ); - bool GetValue(void) const; -}; - -#endif // __GTKCHECKBOXH__ diff --git a/include/wx/gtk1/choice.h b/include/wx/gtk1/choice.h deleted file mode 100644 index 36f403bb74..0000000000 --- a/include/wx/gtk1/choice.h +++ /dev/null @@ -1,78 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: choice.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKCHOICEH__ -#define __GTKCHOICEH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxChoice; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxChoiceNameStr; - -//----------------------------------------------------------------------------- -// wxChoice -//----------------------------------------------------------------------------- - -class wxChoice: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxChoice) - - public: - - wxChoice(void); - inline wxChoice( wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (const wxString *) NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr ) - { - Create(parent, id, pos, size, n, choices, style, validator, name); - } - bool Create( wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (wxString *) NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr ); - void Append( const wxString &item ); - void Clear(void); - void Delete(int n); - int FindString( const wxString &string ) const; - int GetColumns(void) const; - int GetSelection(void); - wxString GetString( int n ) const; - wxString GetStringSelection(void) const; - int Number(void) const; - void SetColumns( int n = 1 ); - void SetSelection( int n ); - void SetStringSelection( const wxString &string ); -}; - -#endif // __GTKCHOICEH__ diff --git a/include/wx/gtk1/colour.h b/include/wx/gtk1/colour.h deleted file mode 100644 index dc12c815ff..0000000000 --- a/include/wx/gtk1/colour.h +++ /dev/null @@ -1,77 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: colour.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKCOLOURH__ -#define __GTKCOLOURH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/gdiobj.h" -#include "wx/palette.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxDC; -class wxPaintDC; -class wxBitmap; -class wxWindow; - -class wxColour; - -//----------------------------------------------------------------------------- -// wxColour -//----------------------------------------------------------------------------- - -class wxColour: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxColour) - - public: - - wxColour(void); - wxColour( char red, char green, char blue ); - wxColour( const wxString &colourName ); - wxColour( const wxColour& col ); - wxColour( const wxColour* col ); - ~wxColour(void); - wxColour& operator = ( const wxColour& col ); - wxColour& operator = ( const wxString& colourName ); - bool operator == ( const wxColour& col ); - bool operator != ( const wxColour& col ); - void Set( const unsigned char red, const unsigned char green, const unsigned char blue ); - unsigned char Red(void) const; - unsigned char Green(void) const; - unsigned char Blue(void) const; - bool Ok(void) const; - - private: - public: - - friend wxDC; - friend wxPaintDC; - friend wxBitmap; - friend wxWindow; - - void CalcPixel( GdkColormap *cmap ); - int GetPixel(void); - GdkColor *GetColor(void); - - // no data :-) -}; - -#endif // __GTKCOLOURH__ diff --git a/include/wx/gtk1/combobox.h b/include/wx/gtk1/combobox.h deleted file mode 100644 index a0d3c36083..0000000000 --- a/include/wx/gtk1/combobox.h +++ /dev/null @@ -1,108 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: combobox.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: $Id$ -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKCOMBOBOXH__ -#define __GTKCOMBOBOXH__ - -#ifdef __GNUG__ -#pragma interface "combobox.h" -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxComboBox; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char* wxComboBoxNameStr; -extern const char* wxEmptyString; - -//----------------------------------------------------------------------------- -// wxComboBox -//----------------------------------------------------------------------------- - -class wxComboBox: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxComboBox) - - public: - inline wxComboBox(void) {} - - inline wxComboBox(wxWindow *parent, wxWindowID id, - const wxString& value = wxEmptyString, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (const wxString *) NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr) - { - Create(parent, id, value, pos, size, n, choices, style, validator, name); - } - bool Create(wxWindow *parent, wxWindowID id, - const wxString& value = wxEmptyString, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (const wxString *) NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); - - // List functions - void Clear(void); - void Append( const wxString &item ); - void Append( const wxString &item, char* clientData ); - void Delete( int n ); - int FindString( const wxString &item ); - char* GetClientData( int n ); - void SetClientData( int n, char * clientData ); - int GetSelection(void) const; - wxString GetString( int n ) const; - wxString GetStringSelection(void) const; - int Number(void) const; - void SetSelection( int n ); - void SetStringSelection( const wxString &string ); - - // Text field functions - wxString GetValue(void) const ; - void SetValue(const wxString& value); - - // Clipboard operations - void Copy(void); - void Cut(void); - void Paste(void); - void SetInsertionPoint(long pos); - void SetInsertionPointEnd(void); - long GetInsertionPoint(void) const ; - long GetLastPosition(void) const ; - void Replace(long from, long to, const wxString& value); - void Remove(long from, long to); - void SetSelection(long from, long to); - void SetEditable(bool editable); - - private: - - wxList m_clientData; - - public: - - bool m_alreadySent; -}; - -#endif // __GTKCOMBOBOXH__ diff --git a/include/wx/gtk1/control.h b/include/wx/gtk1/control.h deleted file mode 100644 index 5aa8a1b39a..0000000000 --- a/include/wx/gtk1/control.h +++ /dev/null @@ -1,60 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: control.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKCONTROLH__ -#define __GTKCONTROLH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/window.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxControl; - -//----------------------------------------------------------------------------- -// wxControl -//----------------------------------------------------------------------------- - -class wxControl: public wxWindow -{ -DECLARE_DYNAMIC_CLASS(wxControl) - -public: - // construction - wxControl(); - wxControl( wxWindow *parent, wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = 0, const wxString &name = wxPanelNameStr ); - - // overridables - virtual void Command( wxCommandEvent &event ); - - // accessors - // this function will filter out '&' characters and will put the accelerator - // char (the one immediately after '&') into m_chAccel (@@ not yet) - virtual void SetLabel( const wxString &label ); - virtual wxString GetLabel() const; - -protected: - wxString m_label; - // when we implement keyboard interface we will make use of this, but not yet - //char m_chAccel; -}; - -#endif // __GTKCONTROLH__ diff --git a/include/wx/gtk1/cursor.h b/include/wx/gtk1/cursor.h deleted file mode 100644 index b760e0b512..0000000000 --- a/include/wx/gtk1/cursor.h +++ /dev/null @@ -1,61 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: cursor.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKCURSORH__ -#define __GTKCURSORH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/gdicmn.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxWindow; - -class wxCursor; - -//----------------------------------------------------------------------------- -// wxCursor -//----------------------------------------------------------------------------- - -class wxCursor: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxCursor) - - public: - - wxCursor(void); - wxCursor( int cursorId ); - wxCursor( const wxCursor &cursor ); - wxCursor( const wxCursor *cursor ); - ~wxCursor(void); - wxCursor& operator = ( const wxCursor& cursor ); - bool operator == ( const wxCursor& cursor ); - bool operator != ( const wxCursor& cursor ); - bool Ok(void) const; - - private: - public: - - friend wxWindow; - - GdkCursor *GetCursor(void) const; - - // no data :-) -}; - -#endif // __GTKCURSORH__ diff --git a/include/wx/gtk1/dc.h b/include/wx/gtk1/dc.h deleted file mode 100644 index 683413cd67..0000000000 --- a/include/wx/gtk1/dc.h +++ /dev/null @@ -1,301 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dc.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKDCH__ -#define __GTKDCH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/gdicmn.h" -#include "wx/pen.h" -#include "wx/brush.h" -#include "wx/icon.h" -#include "wx/font.h" -#include "wx/gdicmn.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxDC; - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -#define MM_TEXT 0 -#define MM_ISOTROPIC 1 -#define MM_ANISOTROPIC 2 -#define MM_LOMETRIC 3 -#define MM_HIMETRIC 4 -#define MM_TWIPS 5 -#define MM_POINTS 6 -#define MM_METRIC 7 - -//----------------------------------------------------------------------------- -// global variables -//----------------------------------------------------------------------------- - -extern int wxPageNumber; - -//----------------------------------------------------------------------------- -// wxDC -//----------------------------------------------------------------------------- - -class wxDC: public wxObject -{ - DECLARE_ABSTRACT_CLASS(wxDC) - - public: - - wxDC(void); - ~wxDC(void); - - void BeginDrawing(void) {}; - void EndDrawing(void) {}; - - virtual bool Ok(void) const { return m_ok; }; - - virtual void FloodFill( long x1, long y1, wxColour *col, int style=wxFLOOD_SURFACE ) = 0; - virtual bool GetPixel( long x1, long y1, wxColour *col ) const = 0; - - virtual void DrawLine( long x1, long y1, long x2, long y2 ) = 0; - virtual void CrossHair( long x, long y ) = 0; - virtual void DrawArc( long x1, long y1, long x2, long y2, double xc, double yc ); - virtual void DrawEllipticArc( long x, long y, long width, long height, double sa, double ea ) = 0; - virtual void DrawPoint( long x, long y ) = 0; - virtual void DrawPoint( wxPoint& point ); - - virtual void DrawLines( int n, wxPoint points[], long xoffset = 0, long yoffset = 0 ) = 0; - virtual void DrawLines( wxList *points, long xoffset = 0, long yoffset = 0 ); - virtual void DrawPolygon( int n, wxPoint points[], long xoffset = 0, long yoffset = 0, - int fillStyle=wxODDEVEN_RULE ) = 0; - virtual void DrawPolygon( wxList *lines, long xoffset = 0, long yoffset = 0, - int fillStyle=wxODDEVEN_RULE ); - - virtual void DrawRectangle( long x, long y, long width, long height ) = 0; - virtual void DrawRoundedRectangle( long x, long y, long width, long height, double radius = 20.0 ) = 0; - virtual void DrawEllipse( long x, long y, long width, long height ) = 0; - - virtual void DrawSpline( long x1, long y1, long x2, long y2, long x3, long y3 ); - virtual void DrawSpline( wxList *points ); - virtual void DrawSpline( int n, wxPoint points[] ); - - virtual bool CanDrawBitmap(void) const = 0; - virtual void DrawIcon( const wxIcon &icon, long x, long y ) - { DrawIcon( icon, x, y, TRUE ); } - virtual void DrawIcon( const wxIcon &icon, long x, long y, bool useMask ); - void DrawBitmap( const wxBitmap &bmp, long x, long y, bool useMask=FALSE ) - { DrawIcon( *((wxIcon*)(&bmp)), x, y, useMask ); } - virtual bool Blit( long xdest, long ydest, long width, long height, - wxDC *source, long xsrc, long ysrc, int logical_func = wxCOPY, bool useMask=FALSE ) = 0; - - virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE ) = 0; - virtual bool CanGetTextExtent(void) const = 0; - virtual void GetTextExtent( const wxString &string, long *width, long *height, - long *descent = (long *) NULL, long *externalLeading = (long *) NULL, - wxFont *theFont = (wxFont *) NULL, bool use16 = FALSE ) = 0; - virtual long GetCharWidth(void) = 0; - virtual long GetCharHeight(void) = 0; - - virtual void Clear(void) = 0; - - virtual void SetFont( const wxFont &font ) = 0; - virtual wxFont *GetFont(void) { return &m_font; }; - - virtual void SetPen( const wxPen &pen ) = 0; - virtual wxPen *GetPen(void) { return &m_pen; }; - - virtual void SetBrush( const wxBrush &brush ) = 0; - virtual wxBrush *GetBrush(void) { return &m_brush; }; - - virtual void SetBackground( const wxBrush &brush ) = 0; - virtual wxBrush *GetBackground(void) { return &m_backgroundBrush; }; - - virtual void SetLogicalFunction( int function ) = 0; - virtual int GetLogicalFunction(void) { return m_logicalFunction; }; - - virtual void SetTextForeground( const wxColour &col ); - virtual void SetTextBackground( const wxColour &col ); - virtual wxColour& GetTextBackground(void) const { return (wxColour&)m_textBackgroundColour; }; - virtual wxColour& GetTextForeground(void) const { return (wxColour&)m_textForegroundColour; }; - - virtual void SetBackgroundMode( int mode ) = 0; - virtual int GetBackgroundMode(void) { return m_backgroundMode; }; - - virtual void SetPalette( const wxPalette& palette ) = 0; - void SetColourMap( const wxPalette& palette ) { SetPalette(palette); }; - - // the first two must be overridden and called - virtual void SetClippingRegion( long x, long y, long width, long height ); - virtual void DestroyClippingRegion(void); - virtual void GetClippingBox( long *x, long *y, long *width, long *height ) const; - - virtual inline long MinX(void) const { return m_minX; } - virtual inline long MaxX(void) const { return m_maxX; } - virtual inline long MinY(void) const { return m_minY; } - virtual inline long MaxY(void) const { return m_maxY; } - - virtual void GetSize( int* width, int* height ) const; - inline wxSize GetSize(void) const { int w, h; GetSize(&w, &h); return wxSize(w, h); } - virtual void GetSizeMM( long* width, long* height ) const; - - virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return TRUE; }; - virtual void EndDoc(void) {}; - virtual void StartPage(void) {}; - virtual void EndPage(void) {}; - - virtual void SetMapMode( int mode ); - virtual int GetMapMode(void) const { return m_mappingMode; }; - - virtual void SetUserScale( double x, double y ); - virtual void GetUserScale( double *x, double *y ); - virtual void SetLogicalScale( double x, double y ); - virtual void GetLogicalScale( double *x, double *y ); - - virtual void SetLogicalOrigin( long x, long y ); - virtual void GetLogicalOrigin( long *x, long *y ); - virtual void SetDeviceOrigin( long x, long y ); - virtual void GetDeviceOrigin( long *x, long *y ); - - virtual void SetAxisOrientation( bool xLeftRight, bool yBottomUp ); - - virtual void SetOptimization( bool WXUNUSED(optimize) ) {}; - virtual bool GetOptimization(void) { return m_optimize; }; - - virtual long DeviceToLogicalX(long x) const; - virtual long DeviceToLogicalY(long y) const; - virtual long DeviceToLogicalXRel(long x) const; - virtual long DeviceToLogicalYRel(long y) const; - virtual long LogicalToDeviceX(long x) const; - virtual long LogicalToDeviceY(long y) const; - virtual long LogicalToDeviceXRel(long x) const; - virtual long LogicalToDeviceYRel(long y) const; - - public: - - void CalcBoundingBox( long x, long y ); - void ComputeScaleAndOrigin(void); - - long XDEV2LOG(long x) const - { - long new_x = x - m_deviceOriginX; - if (new_x > 0) - return (long)((double)(new_x) / m_scaleX + 0.5) * m_signX + m_logicalOriginX; - else - return (long)((double)(new_x) / m_scaleX - 0.5) * m_signX + m_logicalOriginX; - } - long XDEV2LOGREL(long x) const - { - if (x > 0) - return (long)((double)(x) / m_scaleX + 0.5); - else - return (long)((double)(x) / m_scaleX - 0.5); - } - long YDEV2LOG(long y) const - { - long new_y = y - m_deviceOriginY; - if (new_y > 0) - return (long)((double)(new_y) / m_scaleY + 0.5) * m_signY + m_logicalOriginY; - else - return (long)((double)(new_y) / m_scaleY - 0.5) * m_signY + m_logicalOriginY; - } - long YDEV2LOGREL(long y) const - { - if (y > 0) - return (long)((double)(y) / m_scaleY + 0.5); - else - return (long)((double)(y) / m_scaleY - 0.5); - } - long XLOG2DEV(long x) const - { - long new_x = x - m_logicalOriginX; - if (new_x > 0) - return (long)((double)(new_x) * m_scaleX + 0.5) * m_signX + m_deviceOriginX; - else - return (long)((double)(new_x) * m_scaleX - 0.5) * m_signX + m_deviceOriginX; - } - long XLOG2DEVREL(long x) const - { - if (x > 0) - return (long)((double)(x) * m_scaleX + 0.5); - else - return (long)((double)(x) * m_scaleX - 0.5); - } - long YLOG2DEV(long y) const - { - long new_y = y - m_logicalOriginY; - if (new_y > 0) - return (long)((double)(new_y) * m_scaleY + 0.5) * m_signY + m_deviceOriginY; - else - return (long)((double)(new_y) * m_scaleY - 0.5) * m_signY + m_deviceOriginY; - } - long YLOG2DEVREL(long y) const - { - if (y > 0) - return (long)((double)(y) * m_scaleY + 0.5); - else - return (long)((double)(y) * m_scaleY - 0.5); - } - - virtual void DrawOpenSpline( wxList *points ) = 0; - - public: - - bool m_ok; - bool m_colour; - - // not sure, what these mean - bool m_clipping; // Is clipping on right now ? - bool m_isInteractive; // Is GetPixel possible ? - bool m_autoSetting; // wxMSW only ? - bool m_dontDelete; // wxMSW only ? - bool m_optimize; // wxMSW only ? - wxString m_filename; // Not sure where this belongs. - - wxPen m_pen; - wxBrush m_brush; - wxBrush m_backgroundBrush; - wxColour m_textForegroundColour; - wxColour m_textBackgroundColour; - wxFont m_font; - - int m_logicalFunction; - int m_backgroundMode; - int m_textAlignment; // gone in wxWin 2.0 ? - - int m_mappingMode; - - // not sure what for, but what is a mm on a screen you don't know the size of? - double m_mm_to_pix_x,m_mm_to_pix_y; - - long m_deviceOriginX,m_deviceOriginY; // Sum of the two above. - - long m_logicalOriginX,m_logicalOriginY; // User defined. - - double m_scaleX,m_scaleY; - double m_logicalScaleX,m_logicalScaleY; - double m_userScaleX,m_userScaleY; - long m_signX,m_signY; - - bool m_needComputeScaleX,m_needComputeScaleY; // not yet used - - float m_scaleFactor; // wxPSDC wants to have this. Will disappear. - - long m_clipX1,m_clipY1,m_clipX2,m_clipY2; - long m_minX,m_maxX,m_minY,m_maxY; -}; - -#endif // __GTKDCH__ diff --git a/include/wx/gtk1/dcclient.h b/include/wx/gtk1/dcclient.h deleted file mode 100644 index 590ed11b6a..0000000000 --- a/include/wx/gtk1/dcclient.h +++ /dev/null @@ -1,109 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcclient.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKDCCLIENTH__ -#define __GTKDCCLIENTH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/dc.h" -#include "wx/window.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxPaintDC; -typedef wxPaintDC wxClientDC; -typedef wxPaintDC wxWindowDC; - -//----------------------------------------------------------------------------- -// wxPaintDC -//----------------------------------------------------------------------------- - -class wxPaintDC: public wxDC -{ - DECLARE_DYNAMIC_CLASS(wxPaintDC) - - public: - - wxPaintDC(void); - wxPaintDC( wxWindow *win ); - - ~wxPaintDC(void); - - virtual void FloodFill( long x1, long y1, wxColour *col, int style=wxFLOOD_SURFACE ); - virtual bool GetPixel( long x1, long y1, wxColour *col ) const; - - virtual void DrawLine( long x1, long y1, long x2, long y2 ); - virtual void CrossHair( long x, long y ); - virtual void DrawArc( long x1, long y1, long x2, long y2, double xc, double yc ); - virtual void DrawEllipticArc( long x, long y, long width, long height, double sa, double ea ); - virtual void DrawPoint( long x, long y ); - - virtual void DrawLines( int n, wxPoint points[], long xoffset = 0, long yoffset = 0 ); - virtual void DrawLines( wxList *points, long xoffset = 0, long yoffset = 0 ); - virtual void DrawPolygon( int n, wxPoint points[], long xoffset = 0, long yoffset = 0, - int fillStyle=wxODDEVEN_RULE ); - virtual void DrawPolygon( wxList *lines, long xoffset = 0, long yoffset = 0, - int fillStyle=wxODDEVEN_RULE ); - - virtual void DrawRectangle( long x, long y, long width, long height ); - virtual void DrawRoundedRectangle( long x, long y, long width, long height, double radius = 20.0 ); - virtual void DrawEllipse( long x, long y, long width, long height ); - - virtual bool CanDrawBitmap(void) const; - virtual void DrawIcon( const wxIcon &icon, long x, long y, bool useMask=FALSE ); - virtual bool Blit( long xdest, long ydest, long width, long height, - wxDC *source, long xsrc, long ysrc, int logical_func = wxCOPY, bool useMask=FALSE ); - - virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE ); - virtual bool CanGetTextExtent(void) const; - virtual void GetTextExtent( const wxString &string, long *width, long *height, - long *descent = (long *) NULL, long *externalLeading = (long *) NULL, - wxFont *theFont = (wxFont *) NULL, bool use16 = FALSE ); - virtual long GetCharWidth(void); - virtual long GetCharHeight(void); - - virtual void Clear(void); - - virtual void SetFont( const wxFont &font ); - virtual void SetPen( const wxPen &pen ); - virtual void SetBrush( const wxBrush &brush ); - virtual void SetBackground( const wxBrush &brush ); - virtual void SetLogicalFunction( int function ); - virtual void SetTextForeground( const wxColour &col ); - virtual void SetTextBackground( const wxColour &col ); - virtual void SetBackgroundMode( int mode ); - virtual void SetPalette( const wxPalette& palette ); - - virtual void SetClippingRegion( long x, long y, long width, long height ); - virtual void DestroyClippingRegion(void); - - virtual void DrawOpenSpline( wxList *points ); - - public: // shouldn't be public - - GdkWindow *m_window; - GdkGC *m_penGC; - GdkGC *m_brushGC; - GdkGC *m_textGC; - GdkGC *m_bgGC; - GdkColormap *m_cmap; - bool m_isDrawable; - - void SetUpDC(void); - GdkWindow *GetWindow(void); -}; - -#endif // __GTKDCCLIENTH__ diff --git a/include/wx/gtk1/dcmemory.h b/include/wx/gtk1/dcmemory.h deleted file mode 100644 index c5854c5110..0000000000 --- a/include/wx/gtk1/dcmemory.h +++ /dev/null @@ -1,50 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcmemory.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKDCMEMORYH__ -#define __GTKDCMEMORYH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/dcclient.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxMemoryDC; - -//----------------------------------------------------------------------------- -// wxMemoryDC -//----------------------------------------------------------------------------- - -class WXDLLEXPORT wxMemoryDC: public wxPaintDC -{ - DECLARE_DYNAMIC_CLASS(wxMemoryDC) - - public: - wxMemoryDC(void); - wxMemoryDC( wxDC *dc ); // Create compatible DC - ~wxMemoryDC(void); - virtual void SelectObject( const wxBitmap& bitmap ); - void GetSize( int *width, int *height ) const; - - private: - friend wxPaintDC; - wxBitmap m_selected; -}; - -#endif - // __GTKDCMEMORYH__ - diff --git a/include/wx/gtk1/dcscreen.h b/include/wx/gtk1/dcscreen.h deleted file mode 100644 index fdbb7344cc..0000000000 --- a/include/wx/gtk1/dcscreen.h +++ /dev/null @@ -1,32 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcscreen.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKDCSCREENH__ -#define __GTKDCSCREENH__ - -#include "wx/dcclient.h" - -class WXDLLEXPORT wxScreenDC: public wxPaintDC -{ - DECLARE_DYNAMIC_CLASS(wxScreenDC) - - public: - wxScreenDC(void); - ~wxScreenDC(void); - - static bool StartDrawingOnTop( wxWindow *window ); - static bool StartDrawingOnTop( wxRectangle *rect = (wxRectangle *) NULL ); - static bool EndDrawingOnTop(void); -}; - -#endif - // __GTKDCSCREENH__ - diff --git a/include/wx/gtk1/dialog.h b/include/wx/gtk1/dialog.h deleted file mode 100644 index 236b8cc024..0000000000 --- a/include/wx/gtk1/dialog.h +++ /dev/null @@ -1,107 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dialog.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKDIALOGH__ -#define __GTKDIALOGH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/event.h" -#include "wx/window.h" -#include "wx/icon.h" - -//----------------------------------------------------------------------------- -// forward decls -//----------------------------------------------------------------------------- - -class wxRadioBox; - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxDialog; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxDialogNameStr; - -//----------------------------------------------------------------------------- -// wxDialog -//----------------------------------------------------------------------------- - -class wxDialog: public wxWindow -{ - DECLARE_DYNAMIC_CLASS(wxDialog) - - public: - - wxDialog(void); - wxDialog( wxWindow *parent, wxWindowID id, const wxString &title, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr ); - bool Create( wxWindow *parent, wxWindowID id, const wxString &title, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr ); - ~wxDialog(void); - void SetTitle(const wxString& title); - wxString GetTitle(void) const; - bool OnClose(void); - void OnApply( wxCommandEvent &event ); - void OnCancel( wxCommandEvent &event ); - void OnOK( wxCommandEvent &event ); - void OnPaint(wxPaintEvent& event); - bool Destroy(void); - void OnCloseWindow(wxCloseEvent& event); -/* - void OnCharHook(wxKeyEvent& event); -*/ - virtual bool Show( bool show ); - virtual int ShowModal(void); - virtual void EndModal(int retCode); - virtual bool IsModal(void) const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); } - void SetModal( bool modal ); - virtual void InitDialog(void); - virtual void Centre( int direction = wxHORIZONTAL ); - - virtual void SetSizeHints( int minW, int minH, int maxW, int maxH, int incW = -1 ); - - virtual void SetIcon( const wxIcon &icon ); - virtual void Iconize( bool WXUNUSED(iconize)) { } - virtual bool IsIconized(void) const { return FALSE; } - bool Iconized(void) const { return IsIconized(); } - virtual void Maximize(void) { } - virtual void Restore(void) { } - - private: - - friend wxWindow; - friend wxDC; - friend wxRadioBox; - - bool m_modalShowing; - wxString m_title; - wxIcon m_icon; - - virtual void ImplementSetPosition(); - - DECLARE_EVENT_TABLE() - -}; - -#endif // __GTKDIALOGH__ diff --git a/include/wx/gtk1/dirdlg.h b/include/wx/gtk1/dirdlg.h deleted file mode 100644 index 7d8829f55b..0000000000 --- a/include/wx/gtk1/dirdlg.h +++ /dev/null @@ -1,35 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dirdlg.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __DIRDIALOGH__ -#define __DIRDIALOGH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" -#include "wx/dialog.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxDirDialog; - -//----------------------------------------------------------------------------- -// wxDirDialog -//----------------------------------------------------------------------------- - -#endif // __DIRDIALOGH__ diff --git a/include/wx/gtk1/dnd.h b/include/wx/gtk1/dnd.h deleted file mode 100644 index fa97fdc5cd..0000000000 --- a/include/wx/gtk1/dnd.h +++ /dev/null @@ -1,254 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: dnd.h -// Purpose: declaration of the wxDropTarget class -// Author: Robert Roebling -// RCS-ID: -// Copyright: (c) 1998 Vadim Zeitlin, Robert Roebling -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKDNDH__ -#define __GTKDNDH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/cursor.h" - -//------------------------------------------------------------------------- -// classes -//------------------------------------------------------------------------- - -class wxWindow; - -class wxDataObject; -class wxTextDataObject; -class wxFileDataObject; - -class wxDropTarget; -class wxTextDropTarget; -class wxFileDropTarget; - -class wxDropSource; - -//------------------------------------------------------------------------- -// wxDataObject -//------------------------------------------------------------------------- - -class wxDataObject: public wxObject -{ -public: - // all data formats (values are the same as in windows.h, do not change!) - enum StdFormat - { - Invalid, - Text, - Bitmap, - MetafilePict, - Sylk, - Dif, - Tiff, - OemText, - Dib, - Palette, - Pendata, - Riff, - Wave, - UnicodeText, - EnhMetafile, - Hdrop, - Locale, - Max - }; - - // function to return symbolic name of clipboard format (debug messages) - static const char *GetFormatName(wxDataFormat format); - - // ctor & dtor - wxDataObject() {}; - ~wxDataObject() {}; - - // pure virtuals to override - // get the best suited format for our data - virtual wxDataFormat GetPreferredFormat() const = 0; - // decide if we support this format (should be one of values of - // StdFormat enumerations or a user-defined format) - virtual bool IsSupportedFormat(wxDataFormat format) const = 0; - // get the (total) size of data - virtual size_t GetDataSize() const = 0; - // copy raw data to provided pointer - virtual void GetDataHere(void *pBuf) const = 0; - -}; - -// ---------------------------------------------------------------------------- -// wxTextDataObject is a specialization of wxDataObject for text data -// ---------------------------------------------------------------------------- - -class wxTextDataObject : public wxDataObject -{ -public: - // ctors - wxTextDataObject() { } - wxTextDataObject(const wxString& strText) : m_strText(strText) { } - void Init(const wxString& strText) { m_strText = strText; } - - // implement base class pure virtuals - virtual wxDataFormat GetPreferredFormat() const - { return wxDF_TEXT; } - virtual bool IsSupportedFormat(wxDataFormat format) const - { return format == wxDF_TEXT; } - virtual size_t GetDataSize() const - { return m_strText.Len() + 1; } // +1 for trailing '\0'of course - virtual void GetDataHere(void *pBuf) const - { memcpy(pBuf, m_strText.c_str(), GetDataSize()); } - -private: - wxString m_strText; - -}; - -// ---------------------------------------------------------------------------- -// wxFileDataObject is a specialization of wxDataObject for file names -// ---------------------------------------------------------------------------- - -class wxFileDataObject : public wxDataObject -{ -public: - - wxFileDataObject(void) { } - void AddFile( const wxString &file ) - { m_files += file; m_files += ";"; } - - // implement base class pure virtuals - virtual wxDataFormat GetPreferredFormat() const - { return wxDF_FILENAME; } - virtual bool IsSupportedFormat(wxDataFormat format) const - { return format == wxDF_FILENAME; } - virtual size_t GetDataSize() const - { return m_files.Len() + 1; } // +1 for trailing '\0'of course - virtual void GetDataHere(void *pBuf) const - { memcpy(pBuf, m_files.c_str(), GetDataSize()); } - -private: - wxString m_files; - -}; -//------------------------------------------------------------------------- -// wxDropTarget -//------------------------------------------------------------------------- - -class wxDropTarget: public wxObject -{ - public: - - wxDropTarget(); - ~wxDropTarget(); - - virtual void OnEnter() { } - virtual void OnLeave() { } - virtual bool OnDrop( long x, long y, const void *pData ) = 0; - -// protected: - - friend wxWindow; - - // Override these to indicate what kind of data you support: - - virtual size_t GetFormatCount() const = 0; - virtual wxDataFormat GetFormat(size_t n) const = 0; - - void Drop( GdkEvent *event, int x, int y ); - void RegisterWidget( GtkWidget *widget ); - void UnregisterWidget( GtkWidget *widget ); -}; - -//------------------------------------------------------------------------- -// wxTextDropTarget -//------------------------------------------------------------------------- - -class wxTextDropTarget: public wxDropTarget -{ - public: - - wxTextDropTarget() {}; - virtual bool OnDrop( long x, long y, const void *pData ); - virtual bool OnDropText( long x, long y, const char *psz ); - - protected: - - virtual size_t GetFormatCount() const; - virtual wxDataFormat GetFormat(size_t n) const; -}; - -// ---------------------------------------------------------------------------- -// A drop target which accepts files (dragged from File Manager or Explorer) -// ---------------------------------------------------------------------------- - -class wxFileDropTarget: public wxDropTarget -{ - public: - - wxFileDropTarget() {}; - - virtual bool OnDrop(long x, long y, const void *pData); - virtual bool OnDropFiles( long x, long y, - size_t nFiles, const char * const aszFiles[]); - - protected: - - virtual size_t GetFormatCount() const; - virtual wxDataFormat GetFormat(size_t n) const; -}; - -//------------------------------------------------------------------------- -// wxDropSource -//------------------------------------------------------------------------- - -class wxDropSource: public wxObject -{ - public: - - enum DragResult - { - Error, // error prevented the d&d operation from completing - None, // drag target didn't accept the data - Copy, // the data was successfully copied - Move, // the data was successfully moved - Cancel // the operation was cancelled by user (not an error) - }; - - wxDropSource( wxWindow *win ); - wxDropSource( wxDataObject &data, wxWindow *win ); - - ~wxDropSource(void); - - void SetData( wxDataObject &data ); - DragResult DoDragDrop( bool bAllowMove = FALSE ); - - virtual bool GiveFeedback( DragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return TRUE; }; - - protected: - - friend void gtk_drag_callback( GtkWidget *widget, GdkEvent *event, wxDropSource *source ); - - void RegisterWindow(void); - void UnregisterWindow(void); - - GtkWidget *m_widget; - wxWindow *m_window; - DragResult m_retValue; - wxDataObject *m_data; - - wxCursor m_defaultCursor; - wxCursor m_goaheadCursor; -}; - -#endif - //__GTKDNDH__ - diff --git a/include/wx/gtk1/filedlg.h b/include/wx/gtk1/filedlg.h deleted file mode 100644 index dd4452794b..0000000000 --- a/include/wx/gtk1/filedlg.h +++ /dev/null @@ -1,96 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: filedlg.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKFILEDLGH__ -#define __GTKFILEDLGH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/dialog.h" - -//------------------------------------------------------------------------- -// File selector -//------------------------------------------------------------------------- - -extern const char *wxFileSelectorPromptStr; -extern const char *wxFileSelectorDefaultWildcardStr; - -class wxFileDialog: public wxDialog -{ - - DECLARE_DYNAMIC_CLASS(wxFileDialog) - - friend void gtk_filedialog_ok_callback( GtkWidget *widget, gpointer data ); - - public: - - wxFileDialog() {}; - - wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, - const wxString& defaultDir = "", const wxString& defaultFile = "", - const wxString& wildCard = wxFileSelectorDefaultWildcardStr, - long style = 0, const wxPoint& pos = wxDefaultPosition); - - inline void SetMessage(const wxString& message) { m_message = message; } - inline void SetPath(const wxString& path) { m_path = path; } - inline void SetDirectory(const wxString& dir) { m_dir = dir; } - inline void SetFilename(const wxString& name) { m_fileName = name; } - inline void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; } - inline void SetStyle(long style) { m_dialogStyle = style; } - inline void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; } - - inline wxString GetMessage(void) const { return m_message; } - inline wxString GetPath(void) const { return m_path; } - inline wxString GetDirectory(void) const { return m_dir; } - inline wxString GetFilename(void) const { return m_fileName; } - inline wxString GetWildcard(void) const { return m_wildCard; } - inline long GetStyle(void) const { return m_dialogStyle; } - inline int GetFilterIndex(void) const { return m_filterIndex ; } - - int ShowModal(void); - - protected: - - wxString m_message; - long m_dialogStyle; - wxWindow * m_parent; - wxString m_dir; - wxString m_path; // Full path - wxString m_fileName; - wxString m_wildCard; - int m_filterIndex; -}; - -#define wxOPEN 1 -#define wxSAVE 2 -#define wxOVERWRITE_PROMPT 4 -#define wxHIDE_READONLY 8 -#define wxFILE_MUST_EXIST 16 - -// File selector - backward compatibility - -char* wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = (const char *) NULL, - const char *default_filename = (const char *) NULL, const char *default_extension = (const char *) NULL, - const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0, - wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1); - -char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name = (const char *) NULL, - wxWindow *parent = (wxWindow *) NULL); - -char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name = (const char *) NULL, - wxWindow *parent = (wxWindow *) NULL); - - - -#endif - // __GTKFILEDLGH__ diff --git a/include/wx/gtk1/font.h b/include/wx/gtk1/font.h deleted file mode 100644 index a1ce86dfe0..0000000000 --- a/include/wx/gtk1/font.h +++ /dev/null @@ -1,120 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: font.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKFONTH__ -#define __GTKFONTH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/hash.h" -#include "wx/gdiobj.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxDC; -class wxPaintDC; -class wxWindow; - -class wxFont; -class wxFontNameDirectory; - -//----------------------------------------------------------------------------- -// global variables -//----------------------------------------------------------------------------- - -//extern wxFontNameDirectory *wxTheFontNameDirectory; // defined below - -//----------------------------------------------------------------------------- -// wxFont -//----------------------------------------------------------------------------- - -class wxFont: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxFont) - - public: - wxFont(void); - wxFont( int PointSize, int FontIdOrFamily, int Style, int Weight, - bool underlined = FALSE, const char *Face= ( const char *) NULL ); - wxFont( int PointSize, const char *Face, int Family, int Style, int Weight, - bool underlined = FALSE ); - wxFont( const wxFont& font ); - wxFont( const wxFont* font ); - ~wxFont(void); - wxFont& operator = ( const wxFont& font ); - bool operator == ( const wxFont& font ); - bool operator != ( const wxFont& font ); - bool Ok(); - - int GetPointSize(void) const; - wxString GetFaceName(void) const; - int GetFamily(void) const; - wxString GetFamilyString(void) const; - int GetFontId(void) const; - wxString GetFaceString(void) const; - int GetStyle(void) const; - wxString GetStyleString(void) const; - int GetWeight(void) const; - wxString GetWeightString(void) const; - bool GetUnderlined(void) const; - - wxFont( char *xFontName ); - - private: - - friend wxDC; - friend wxPaintDC; - friend wxWindow; - - GdkFont* GetInternalFont(float scale = 1.0) const; - - // no data :-) -}; - -//----------------------------------------------------------------------------- -// wxFontDirectory -//----------------------------------------------------------------------------- - -class wxFontNameDirectory: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxFontNameDirectory) - - public: - wxFontNameDirectory(void); - ~wxFontNameDirectory(); - - void Initialize(void); - void Initialize(int fontid, int family, const char *name); - - int FindOrCreateFontId(const char *name, int family); - char* GetAFMName(int fontid, int weight, int style); - int GetFamily(int fontid); - int GetFontId(const char *name); - char* GetFontName(int fontid); - int GetNewFontId(void); - char* GetPostScriptName(int fontid, int weight, int style); - char* GetScreenName(int fontid, int weight, int style); - - - class wxHashTable *table; - int nextFontId; -}; - -extern wxFontNameDirectory *wxTheFontNameDirectory; - -#endif // __GTKFONTH__ diff --git a/include/wx/gtk1/frame.h b/include/wx/gtk1/frame.h deleted file mode 100644 index 1cb5ec51cf..0000000000 --- a/include/wx/gtk1/frame.h +++ /dev/null @@ -1,125 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: frame.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKFRAMEH__ -#define __GTKFRAMEH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/window.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxMDIChildFrame; -class wxMDIClientWindow; -class wxMenu; -class wxMenuBar; -class wxToolBar; -class wxStatusBar; - -class wxFrame; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxFrameNameStr; -extern const char *wxToolBarNameStr; - -//----------------------------------------------------------------------------- -// wxFrame -//----------------------------------------------------------------------------- - -class wxFrame: public wxWindow -{ - DECLARE_DYNAMIC_CLASS(wxFrame) -public: - - wxFrame(); - wxFrame( wxWindow *parent, wxWindowID id, const wxString &title, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr ); - bool Create( wxWindow *parent, wxWindowID id, const wxString &title, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr ); - ~wxFrame(); - bool Destroy(); - - virtual bool Show( bool show ); - virtual void Enable( bool enable ); - virtual void Centre( int direction = wxHORIZONTAL ); - - virtual void GetClientSize( int *width, int *height ) const; - virtual void SetClientSize( int const width, int const height ); - - virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0, - const wxString& name = "statusBar"); - virtual wxStatusBar *OnCreateStatusBar( int number, long style, wxWindowID id, - const wxString& name ); - virtual wxStatusBar *GetStatusBar() const; - virtual void SetStatusText( const wxString &text, int number = 0 ); - virtual void SetStatusWidths( int n, const int widths_field[] ); - - virtual wxToolBar* CreateToolBar( long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1, - const wxString& name = wxToolBarNameStr); - virtual wxToolBar *OnCreateToolBar( long style, wxWindowID id, const wxString& name ); - virtual wxToolBar *GetToolBar(void) const; - - virtual void SetMenuBar( wxMenuBar *menuBar ); - virtual wxMenuBar *GetMenuBar() const; - - virtual void SetTitle( const wxString &title ); - virtual wxString GetTitle() const { return m_title; } - - virtual void SetIcon( const wxIcon &icon ); - virtual void Iconize( bool WXUNUSED(iconize)) { } - virtual bool IsIconized(void) const { return FALSE; } - bool Iconized(void) const { return IsIconized(); } - virtual void Maximize(bool WXUNUSED(maximize)) {} - virtual void Restore(void) {} - - void OnActivate( wxActivateEvent &WXUNUSED(event) ) { } // called from docview.cpp - void OnSize( wxSizeEvent &event ); - void OnCloseWindow( wxCloseEvent& event ); - void OnIdle(wxIdleEvent& event); - - virtual void AddChild( wxWindow *child ); - virtual void GtkOnSize( int x, int y, int width, int height ); - -private: - friend wxWindow; - friend wxMDIChildFrame; - friend wxMDIClientWindow; - - // update frame's menus (called from OnIdle) - void DoMenuUpdates(); - void DoMenuUpdates(wxMenu* menu); - virtual void ImplementSetPosition(); - - GtkWidget *m_mainWindow; - wxMenuBar *m_frameMenuBar; - wxStatusBar *m_frameStatusBar; - wxToolBar *m_frameToolBar; - int m_toolBarHeight; - bool m_addPrivateChild; // for toolbar (and maybe menubar) - wxString m_title; - wxIcon m_icon; - - DECLARE_EVENT_TABLE() -}; - -#endif // __GTKFRAMEH__ diff --git a/include/wx/gtk1/gauge.h b/include/wx/gtk1/gauge.h deleted file mode 100644 index 51e9563b56..0000000000 --- a/include/wx/gtk1/gauge.h +++ /dev/null @@ -1,83 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gauge.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKGAUGEH__ -#define __GTKGAUGEH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxGauge; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char* wxGaugeNameStr; - -//----------------------------------------------------------------------------- -// wxGaugeBox -//----------------------------------------------------------------------------- - -class wxGauge: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxGauge) - - public: - inline wxGauge(void) { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = TRUE; } - - inline wxGauge( wxWindow *parent, wxWindowID id, - int range, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxGA_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr ) - { - Create(parent, id, range, pos, size, style, validator, name); - } - bool Create( wxWindow *parent, wxWindowID id, - int range, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxGA_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr ); - void SetShadowWidth( int WXUNUSED(w) ) {}; - void SetBezelFace( int WXUNUSED(w) ) {}; - void SetRange( int r ); - void SetValue( int pos ); - int GetShadowWidth(void) const { return 0; }; - int GetBezelFace(void) const { return 0; }; - int GetRange(void) const; - int GetValue(void) const; - - // Are we a Win95/GTK progress bar, or a normal gauge? - inline bool GetProgressBar(void) const { return m_useProgressBar; } - - protected: - - int m_rangeMax; - int m_gaugePos; - bool m_useProgressBar; -}; - -#endif // __GTKGAUGEH__ diff --git a/include/wx/gtk1/gdiobj.h b/include/wx/gtk1/gdiobj.h deleted file mode 100644 index 2b6a5d1921..0000000000 --- a/include/wx/gtk1/gdiobj.h +++ /dev/null @@ -1,37 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gdiobj.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GDIOBJH__ -#define __GDIOBJH__ - -#include "wx/object.h" - -#ifdef __GNUG__ -#pragma interface -#endif - -class WXDLLEXPORT wxGDIObject: public wxObject -{ -DECLARE_DYNAMIC_CLASS(wxGDIObject) - public: - inline wxGDIObject(void) { m_visible = FALSE; }; - inline ~wxGDIObject(void) {}; - - virtual bool GetVisible(void) { return m_visible; } - virtual void SetVisible(bool v) { m_visible = v; } - -protected: - bool m_visible; // Can a pointer to this object be safely taken? - // - only if created within FindOrCreate... -}; - -#endif - // __GDIOBJH__ diff --git a/include/wx/gtk1/icon.h b/include/wx/gtk1/icon.h deleted file mode 100644 index 7596879cd9..0000000000 --- a/include/wx/gtk1/icon.h +++ /dev/null @@ -1,50 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: icon.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKICONH__ -#define __GTKICONH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/bitmap.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxIcon; - -//----------------------------------------------------------------------------- -// wxIcon -//----------------------------------------------------------------------------- - -class wxIcon: public wxBitmap -{ - DECLARE_DYNAMIC_CLASS(wxIcon) - -public: - - wxIcon(void); - wxIcon(const wxIcon& icon); - wxIcon(const wxIcon* icon); - wxIcon( char **bits, int width=-1, int height=-1 ); - - wxIcon& operator = (const wxIcon& icon); - inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; } - inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; } -}; - - -#endif // __GTKICONH__ diff --git a/include/wx/gtk1/joystick.h b/include/wx/gtk1/joystick.h deleted file mode 100644 index 957c16581a..0000000000 --- a/include/wx/gtk1/joystick.h +++ /dev/null @@ -1,102 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: joystick.h -// Purpose: wxJoystick class -// Author: Guilhem Lavaux -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __JOYSTICKH__ -#define __JOYSTICKH__ - -#ifdef __GNUG__ -#pragma interface "joystick.h" -#endif - -#include "wx/event.h" -#include "wx/thread.h" - -class WXDLLEXPORT wxJoystick: public wxObject, public wxThread -{ - DECLARE_DYNAMIC_CLASS(wxJoystick) - public: - /* - * Public interface - */ - - wxJoystick(int joystick = wxJOYSTICK1); - - // Attributes - //////////////////////////////////////////////////////////////////////////// - - wxPoint GetPosition(void) const; - int GetZPosition(void) const; - int GetButtonState(void) const; - int GetPOVPosition(void) const; - int GetPOVCTSPosition(void) const; - int GetRudderPosition(void) const; - int GetUPosition(void) const; - int GetVPosition(void) const; - int GetMovementThreshold(void) const; - void SetMovementThreshold(int threshold) ; - - // Capabilities - //////////////////////////////////////////////////////////////////////////// - - bool IsOk(void) const; // Checks that the joystick is functioning - int GetNumberJoysticks(void) const ; - int GetManufacturerId(void) const ; - int GetProductId(void) const ; - wxString GetProductName(void) const ; - int GetXMin(void) const; - int GetYMin(void) const; - int GetZMin(void) const; - int GetXMax(void) const; - int GetYMax(void) const; - int GetZMax(void) const; - int GetNumberButtons(void) const; - int GetNumberAxes(void) const; - int GetMaxButtons(void) const; - int GetMaxAxes(void) const; - int GetPollingMin(void) const; - int GetPollingMax(void) const; - int GetRudderMin(void) const; - int GetRudderMax(void) const; - int GetUMin(void) const; - int GetUMax(void) const; - int GetVMin(void) const; - int GetVMax(void) const; - - bool HasRudder(void) const; - bool HasZ(void) const; - bool HasU(void) const; - bool HasV(void) const; - bool HasPOV(void) const; - bool HasPOV4Dir(void) const; - bool HasPOVCTS(void) const; - - // Operations - //////////////////////////////////////////////////////////////////////////// - - // pollingFreq = 0 means that movement events are sent when above the threshold. - // If pollingFreq > 0, events are received every this many milliseconds. - bool SetCapture(wxWindow* win, int pollingFreq = 0); - bool ReleaseCapture(void); - -protected: - int m_joystick; - wxPoint m_lastposition; - int m_axe[15]; - int m_buttons; - wxWindow *m_catchwin; - int m_polling; - - void *Entry(void); -}; - -#endif - // __JOYSTICKH__ - diff --git a/include/wx/gtk1/listbox.h b/include/wx/gtk1/listbox.h deleted file mode 100644 index 22cbe344a9..0000000000 --- a/include/wx/gtk1/listbox.h +++ /dev/null @@ -1,98 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: listbox.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKLISTBOXH__ -#define __GTKLISTBOXH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxListBox; -class wxArrayInt; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxListBoxNameStr; - -//----------------------------------------------------------------------------- -// wxListBox -//----------------------------------------------------------------------------- - -class wxListBox: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxListBox) - - public: - - wxListBox(void); - inline wxListBox( wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (const wxString *) NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr ) - { - Create(parent, id, pos, size, n, choices, style, validator, name); - } - bool Create( wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (const wxString *) NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr ); - void Append( const wxString &item ); - void Append( const wxString &item, char *clientData ); - void Clear(void); - void Delete( int n ); - void Deselect( int n ); - int FindString( const wxString &item ) const; - char *GetClientData( int n ) const; - int GetSelection(void) const; - int GetSelections( class wxArrayInt &) const; - wxString GetString( int n ) const; - wxString GetStringSelection(void) const; - int Number(void); - bool Selected( int n ); - void Set( int n, const wxString *choices ); - void SetClientData( int n, char *clientData ); - void SetFirstItem( int n ); - void SetFirstItem( const wxString &item ); - void SetSelection( int n, bool select = TRUE ); - void SetString( int n, const wxString &string ); - void SetStringSelection( const wxString &string, bool select = TRUE ); - - virtual GtkWidget *GetConnectWidget(void); - - private: - - GtkList *m_list; - wxList m_clientData; - - public: - - int GetIndex( GtkWidget *item ) const; -}; - -#endif // __GTKLISTBOXH__ diff --git a/include/wx/gtk1/mdi.h b/include/wx/gtk1/mdi.h deleted file mode 100644 index 081cd5a407..0000000000 --- a/include/wx/gtk1/mdi.h +++ /dev/null @@ -1,186 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: mdi.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __MDIH__ -#define __MDIH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" -#include "wx/panel.h" -#include "wx/frame.h" -#include "wx/toolbar.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxMDIParentFrame; -class wxMDIClientWindow; -class wxMDIChildFrame; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char* wxFrameNameStr; -extern const char* wxStatusLineNameStr; - -//----------------------------------------------------------------------------- -// wxMDIParentFrame -//----------------------------------------------------------------------------- - -class wxMDIParentFrame: public wxFrame -{ - DECLARE_DYNAMIC_CLASS(wxMDIParentFrame) - - friend class wxMDIChildFrame; - - public: - - wxMDIParentFrame(void); - wxMDIParentFrame( wxWindow *parent, - wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr ); - ~wxMDIParentFrame(void); - bool Create( wxWindow *parent, - wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr ); - - - void GetClientSize(int *width, int *height) const; - wxMDIChildFrame *GetActiveChild(void) const; - - wxMDIClientWindow *GetClientWindow(void) const; - virtual wxMDIClientWindow *OnCreateClient(void); - - virtual void Cascade(void) {}; - virtual void Tile(void) {}; - virtual void ArrangeIcons(void) {}; - virtual void ActivateNext(void); - virtual void ActivatePrevious(void); - - void OnActivate( wxActivateEvent& event ); - void OnSysColourChanged( wxSysColourChangedEvent& event ); - - //private: - - wxMDIChildFrame *m_currentChild; - - void SetMDIMenuBar( wxMenuBar *menu_bar ); - virtual void GtkOnSize( int x, int y, int width, int height ); - - private: - - wxMDIClientWindow *m_clientWindow; - bool m_parentFrameActive; - wxMenuBar *m_mdiMenuBar; - - DECLARE_EVENT_TABLE() -}; - -//----------------------------------------------------------------------------- -// wxMDIChildFrame -//----------------------------------------------------------------------------- - -class wxMDIChildFrame: public wxFrame -{ - DECLARE_DYNAMIC_CLASS(wxMDIChildFrame) - - public: - - wxMDIChildFrame(void); - wxMDIChildFrame( wxMDIParentFrame *parent, - wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr ); - ~wxMDIChildFrame(void); - bool Create( wxMDIParentFrame *parent, - wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr ); - - virtual void SetMenuBar( wxMenuBar *menu_bar ); - virtual wxMenuBar *GetMenuBar(); - - virtual void GetClientSize( int *width, int *height ) const; - virtual void AddChild( wxWindow *child ); - - virtual void Activate(void); - - // no status bars - virtual wxStatusBar* CreateStatusBar( int WXUNUSED(number)=1, long WXUNUSED(style)=1, - wxWindowID WXUNUSED(id)=1, const wxString& WXUNUSED(name)=WXSTRINGCAST NULL ) {return (wxStatusBar*)NULL; } - virtual wxStatusBar *GetStatusBar() { return (wxStatusBar*)NULL; } - virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number) ) {} - virtual void SetStatusWidths( int WXUNUSED(n), int *WXUNUSED(width) ) {} - - // no size hints - virtual void SetSizeHints( int WXUNUSED(minW), int WXUNUSED(minH), int WXUNUSED(maxW), - int WXUNUSED(maxH), int WXUNUSED(incW) ) {} - - // no toolbar bars - virtual wxToolBar* CreateToolBar( long WXUNUSED(style), wxWindowID WXUNUSED(id), - const wxString& WXUNUSED(name) ) { return (wxToolBar*)NULL; } - virtual wxToolBar *GetToolBar() { return (wxToolBar*)NULL; } - - // no icon - void SetIcon( const wxIcon &icon ) { m_icon = icon; } - - // no title - void SetTitle( const wxString &title ) { m_title = title; } - wxString GetTitle() const { return m_title; } - - // no maximize etc - virtual void Maximize(void) {} - virtual void Restore(void) {} - - void OnActivate( wxActivateEvent &event ); - - public: - - wxMenuBar *m_menuBar; - -// private: - - GtkNotebookPage *m_page; - - DECLARE_EVENT_TABLE() -}; - -//----------------------------------------------------------------------------- -// wxMDIClientWindow -//----------------------------------------------------------------------------- - -class wxMDIClientWindow: public wxWindow -{ - DECLARE_DYNAMIC_CLASS(wxMDIClientWindow) - - public: - - wxMDIClientWindow(void); - wxMDIClientWindow( wxMDIParentFrame *parent, long style = 0 ); - ~wxMDIClientWindow(void); - virtual bool CreateClient( wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL ); - void AddChild( wxWindow *child ); -}; - -#endif // __MDIH__ - diff --git a/include/wx/gtk1/menu.h b/include/wx/gtk1/menu.h deleted file mode 100644 index 9258a25e85..0000000000 --- a/include/wx/gtk1/menu.h +++ /dev/null @@ -1,181 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: menu.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKMENUH__ -#define __GTKMENUH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/window.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxMenuBar; -class wxMenuItem; -class wxMenu; - -//----------------------------------------------------------------------------- -// const -//----------------------------------------------------------------------------- - -#define ID_SEPARATOR (-1) - -//----------------------------------------------------------------------------- -// wxMenuBar -//----------------------------------------------------------------------------- - -class wxMenuBar: public wxWindow -{ -DECLARE_DYNAMIC_CLASS(wxMenuBar) - -public: - wxMenuBar(); - void Append( wxMenu *menu, const wxString &title ); - - int FindMenuItem( const wxString &menuString, const wxString &itemString ) const; - wxMenuItem* FindMenuItemById( int id ) const; - - void Check( int id, bool check ); - bool Checked( int id ) const; - void Enable( int id, bool enable ); - bool Enabled( int id ) const; - inline bool IsEnabled(int Id) const { return Enabled(Id); }; - inline bool IsChecked(int Id) const { return Checked(Id); }; - - int GetMenuCount() const { return m_menus.Number(); } - wxMenu *GetMenu(int n) const { return (wxMenu *)m_menus.Nth(n)->Data(); } - - wxList m_menus; - GtkWidget *m_menubar; -}; - -//----------------------------------------------------------------------------- -// wxMenu -//----------------------------------------------------------------------------- - -class wxMenuItem: public wxObject -{ -DECLARE_DYNAMIC_CLASS(wxMenuItem) - -public: - wxMenuItem(); - - // accessors - // id - void SetId(int id) { m_id = id; } - int GetId() const { return m_id; } - bool IsSeparator() const { return m_id == ID_SEPARATOR; } - - // the item's text - void SetText(const wxString& str); - const wxString& GetText() const { return m_text; } - - // what kind of menu item we are - void SetCheckable(bool checkable) { m_isCheckMenu = checkable; } - bool IsCheckable() const { return m_isCheckMenu; } - void SetSubMenu(wxMenu *menu) { m_subMenu = menu; } - wxMenu *GetSubMenu() const { return m_subMenu; } - bool IsSubMenu() const { return m_subMenu != NULL; } - - // state - void Enable( bool enable = TRUE ); - bool IsEnabled() const { return m_isEnabled; } - void Check( bool check = TRUE ); - bool IsChecked() const; - - // help string (displayed in the status bar by default) - void SetHelp(const wxString& str) { m_helpStr = str; } - const wxString& GetHelp() const { return m_helpStr; } - - // implementation - void SetMenuItem(GtkWidget *menuItem) { m_menuItem = menuItem; } - GtkWidget *GetMenuItem() const { return m_menuItem; } - -private: - int m_id; - wxString m_text; - bool m_isCheckMenu; - bool m_isChecked; - bool m_isEnabled; - wxMenu *m_subMenu; - wxString m_helpStr; - - GtkWidget *m_menuItem; // GtkMenuItem -}; - -class wxMenu: public wxEvtHandler -{ -DECLARE_DYNAMIC_CLASS(wxMenu) - -public: - // construction - wxMenu( const wxString& title = wxEmptyString, const wxFunction func = (wxFunction) NULL ); - - // operations - // title - void SetTitle(const wxString& label); - const wxString GetTitle() const; - // menu creation - void AppendSeparator(); - void Append(int id, const wxString &item, - const wxString &helpStr = "", bool checkable = FALSE); - void Append(int id, const wxString &item, - wxMenu *subMenu, const wxString &helpStr = "" ); - void Break() {}; - - // find item by name/id - int FindItem( const wxString itemString ) const; - wxMenuItem *FindItem( int id ) const; - wxMenuItem *FindItemForId( int id ) const { return FindItem( id ); } - - // get/set item's state - void Enable( int id, bool enable ); - bool IsEnabled( int id ) const; - void Check( int id, bool check ); - bool IsChecked( int id ) const; - - void SetLabel( int id, const wxString &label ); - wxString GetLabel(int id) const; - - // helpstring - virtual void SetHelpString(int id, const wxString& helpString); - virtual wxString GetHelpString(int id) const ; - - // accessors - wxList& GetItems() { return m_items; } - - inline void Callback(const wxFunction func) { m_callback = func; } - - inline void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; } - inline wxEvtHandler *GetEventHandler() { return m_eventHandler; } - -public: - int FindMenuIdByMenuItem( GtkWidget *menuItem ) const; - void SetInvokingWindow( wxWindow *win ); - wxWindow *GetInvokingWindow(); - - wxString m_title; - wxList m_items; - wxWindow *m_invokingWindow; - wxFunction m_callback; - wxEvtHandler *m_eventHandler; - - GtkWidget *m_menu; // GtkMenu -}; - -#endif // __GTKMENUH__ diff --git a/include/wx/gtk1/notebook.h b/include/wx/gtk1/notebook.h deleted file mode 100644 index 097101d094..0000000000 --- a/include/wx/gtk1/notebook.h +++ /dev/null @@ -1,185 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: notebook.h -// Purpose: wxNotebook class -// Author: Robert Roebling -// Modified by: -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef __NOTEBOOKH__ -#define __NOTEBOOKH__ - -#ifdef __GNUG__ -#pragma interface "notebook.h" -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxImageList; -class wxNotebook; -class wxNotebookPage; - -// ---------------------------------------------------------------------------- -// notebook events -// ---------------------------------------------------------------------------- - -class wxNotebookEvent : public wxCommandEvent -{ -public: - wxNotebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0, - int nSel = -1, int nOldSel = -1) - : wxCommandEvent(commandType, id) { m_nSel = nSel; m_nOldSel = nOldSel; } - - // accessors - int GetSelection() const { return m_nSel; } - int GetOldSelection() const { return m_nOldSel; } - -private: - int m_nSel, // currently selected page - m_nOldSel; // previously selected page - - DECLARE_DYNAMIC_CLASS(wxNotebookEvent) -}; - -//----------------------------------------------------------------------------- -// wxNotebook -//----------------------------------------------------------------------------- - -class wxNotebook : public wxControl -{ -public: - // ctors - // ----- - // default for dynamic class - wxNotebook(); - // the same arguments as for wxControl (@@@ any special styles?) - wxNotebook(wxWindow *parent, - wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = "notebook"); - // Create() function - bool Create(wxWindow *parent, - wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = "notebook"); - // dtor - ~wxNotebook(); - - // accessors - // --------- - // get number of pages in the dialog - int GetPageCount() const; - - // set the currently selected page, return the index of the previously - // selected one (or -1 on error) - // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events - int SetSelection(int nPage); - // cycle thru the tabs - void AdvanceSelection(bool bForward = TRUE); - // get the currently selected page - int GetSelection() const; - - // set/get the title of a page - bool SetPageText(int nPage, const wxString& strText); - wxString GetPageText(int nPage) const; - - // image list stuff: each page may have an image associated with it. All - // the images belong to an image list, so you have to - // 1) create an image list - // 2) associate it with the notebook - // 3) set for each page it's image - // associate image list with a control - void SetImageList(wxImageList* imageList); - // get pointer (may be NULL) to the associated image list - wxImageList* GetImageList() const { return m_imageList; } - - // sets/returns item's image index in the current image list - int GetPageImage(int nPage) const; - bool SetPageImage(int nPage, int nImage); - - // currently it's always 1 because wxGTK doesn't support multi-row - // tab controls - int GetRowCount() const; - - // control the appearance of the notebook pages - // set the size (the same for all pages) - void SetPageSize(const wxSize& size); - // set the padding between tabs (in pixels) - void SetPadding(const wxSize& padding); - - // operations - // ---------- - // remove one page from the notebook - bool DeletePage(int nPage); - // remove all pages - bool DeleteAllPages(); - // adds a new page to the notebook (it will be deleted ny the notebook, - // don't delete it yourself). If bSelect, this page becomes active. - bool AddPage(wxWindow *pPage, - const wxString& strText, - bool bSelect = FALSE, - int imageId = -1); - // @@@@ VZ: I don't know how to implement InsertPage() - - // get the panel which represents the given page - wxWindow *GetPage(int nPage) const; - - // implementation - // -------------- - // base class virtuals - virtual void AddChild(wxWindow *child); - virtual void SetConstraintSizes(bool recurse); - virtual bool DoPhase(int phase); - -private: - // common part of all ctors - void Init(); - - // helper function - wxNotebookPage* GetNotebookPage(int page) const; - - wxImageList* m_imageList; - wxList m_pages; - size_t m_idHandler; // the change page handler id - - DECLARE_DYNAMIC_CLASS(wxNotebook) -}; - -// ---------------------------------------------------------------------------- -// event macros -// ---------------------------------------------------------------------------- -typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&); - -#define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \ - { \ - wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, \ - id, \ - -1, \ - (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \ - NULL \ - }, - -#define EVT_NOTEBOOK_PAGE_CHANGING(id, fn) \ - { \ - wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, \ \ - id, \ - -1, \ - (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \ - NULL \ - }, - -#endif - // __NOTEBOOKH__ diff --git a/include/wx/gtk1/palette.h b/include/wx/gtk1/palette.h deleted file mode 100644 index d6b7bbb64b..0000000000 --- a/include/wx/gtk1/palette.h +++ /dev/null @@ -1,60 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: palette.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKPALETTEH__ -#define __GTKPALETTEH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/gdiobj.h" -#include "wx/gdicmn.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxPalette; - -//----------------------------------------------------------------------------- -// wxPalette -//----------------------------------------------------------------------------- - -class wxPalette: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxPalette) - - public: - - wxPalette(void); - wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue ); - wxPalette( const wxPalette& palette ); - wxPalette( const wxPalette* palette ); - ~wxPalette(void); - wxPalette& operator = ( const wxPalette& palette ); - bool operator == ( const wxPalette& palette ); - bool operator != ( const wxPalette& palette ); - bool Ok(void) const; - - bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); - int GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const; - bool GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const; - - // no data -}; - -#define wxColorMap wxPalette -#define wxColourMap wxPalette - -#endif // __GTKPALETTEH__ diff --git a/include/wx/gtk1/pen.h b/include/wx/gtk1/pen.h deleted file mode 100644 index a0eaa2a59b..0000000000 --- a/include/wx/gtk1/pen.h +++ /dev/null @@ -1,68 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: pen.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKPENH__ -#define __GTKPENH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/gdiobj.h" -#include "wx/gdicmn.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxPen; - -//----------------------------------------------------------------------------- -// wxPen -//----------------------------------------------------------------------------- - -class wxPen: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxPen) - - public: - - wxPen(void); - wxPen( const wxColour &colour, int width, int style ); - wxPen( const wxString &colourName, int width, int style ); - wxPen( const wxPen& pen ); - wxPen( const wxPen* pen ); - ~wxPen(void); - wxPen& operator = ( const wxPen& pen ); - bool operator == ( const wxPen& pen ); - bool operator != ( const wxPen& pen ); - - void SetColour( const wxColour &colour ); - void SetColour( const wxString &colourName ); - void SetColour( int red, int green, int blue ); - void SetCap( int capStyle ); - void SetJoin( int joinStyle ); - void SetStyle( int style ); - void SetWidth( int width ); - wxColour &GetColour(void) const; - int GetCap(void) const; - int GetJoin(void) const; - int GetStyle(void) const; - int GetWidth(void) const; - bool Ok(void) const; - - // no data :-) -}; - -#endif // __GTKPENH__ diff --git a/include/wx/gtk1/radiobox.h b/include/wx/gtk1/radiobox.h deleted file mode 100644 index 04d5ea8879..0000000000 --- a/include/wx/gtk1/radiobox.h +++ /dev/null @@ -1,92 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: radiobox.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKRADIOBOXH__ -#define __GTKRADIOBOXH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" -#include "wx/bitmap.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxRadioBox; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxRadioBoxNameStr; - -//----------------------------------------------------------------------------- -// wxRadioBox -//----------------------------------------------------------------------------- - -class wxRadioBox: public wxControl -{ - - DECLARE_DYNAMIC_CLASS(wxRadioBox) - - public: - - wxRadioBox(void); - inline wxRadioBox( wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (const wxString *) NULL, - int majorDim = 0, long style = wxRA_HORIZONTAL, - const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr ) - { - Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name ); - } - bool Create( wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (const wxString *) NULL, - int majorDim = 0, long style = wxRA_HORIZONTAL, - const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr ); - int FindString( const wxString& s) const; - void SetSelection( int n ); - int GetSelection(void) const; - wxString GetString( int n ) const; - wxString GetLabel(void) const; - void SetLabel( const wxString& label ); - void SetLabel( int item, const wxString& label ); - void SetLabel( int item, wxBitmap *bitmap ); - wxString GetLabel( int item ) const; - bool Show( bool show ); - void Enable( bool enable ); - void Enable( int item, bool enable ); - void Show( int item, bool show ); - virtual wxString GetStringSelection(void) const; - virtual bool SetStringSelection( const wxString& s ); - virtual int Number(void) const; - int GetNumberOfRowsOrCols(void) const; - void SetNumberOfRowsOrCols( int n ); - - private: - - GtkRadioButton *m_radio; - - public: - - bool m_alreadySent; -}; - -#endif // __GTKRADIOBOXH__ diff --git a/include/wx/gtk1/radiobut.h b/include/wx/gtk1/radiobut.h deleted file mode 100644 index 61e7130035..0000000000 --- a/include/wx/gtk1/radiobut.h +++ /dev/null @@ -1,66 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: radiobut.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKRADIOBUTTONH__ -#define __GTKRADIOBUTTONH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxRadioButton; - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern const char* wxRadioButtonNameStr; - -//----------------------------------------------------------------------------- -// wxRadioButton -//----------------------------------------------------------------------------- - -class wxRadioButton: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxRadioButton) - - public: - inline wxRadioButton(void) {} - inline wxRadioButton( wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr ) - { - Create( parent, id, label, pos, size, style, validator, name ); - } - bool Create(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr ); - virtual void SetLabel(const wxString& label); - virtual void SetValue(bool val); - virtual bool GetValue(void) const; -}; - -#endif // __GTKRADIOBUTTONH__ diff --git a/include/wx/gtk1/region.h b/include/wx/gtk1/region.h deleted file mode 100644 index 35e146938c..0000000000 --- a/include/wx/gtk1/region.h +++ /dev/null @@ -1,134 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: region.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __REGIONH__ -#define __REGIONH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/list.h" -#include "wx/gdiobj.h" -#include "wx/gdicmn.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxRegion; - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -enum wxRegionContain -{ - wxOutRegion = 0, wxPartRegion = 1, wxInRegion = 2 -}; - -// So far, for internal use only -enum wxRegionOp { -wxRGN_AND, // Creates the intersection of the two combined regions. -wxRGN_COPY, // Creates a copy of the region identified by hrgnSrc1. -wxRGN_DIFF, // Combines the parts of hrgnSrc1 that are not part of hrgnSrc2. -wxRGN_OR, // Creates the union of two combined regions. -wxRGN_XOR // Creates the union of two combined regions except for any overlapping areas. -}; - -//----------------------------------------------------------------------------- -// wxRegion -//----------------------------------------------------------------------------- - -class wxRegion : public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxRegion); - - public: - - wxRegion( long x, long y, long w, long h ); - wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight ); - wxRegion( const wxRect& rect ); - wxRegion(void); - ~wxRegion(void); - - inline wxRegion( const wxRegion& r ) - { Ref(r); } - inline wxRegion& operator = ( const wxRegion& r ) - { Ref(r); return (*this); } - - void Clear(void); - - bool Union( long x, long y, long width, long height ); - bool Union( const wxRect& rect ); - bool Union( const wxRegion& region ); - - bool Intersect( long x, long y, long width, long height ); - bool Intersect( const wxRect& rect ); - bool Intersect( const wxRegion& region ); - - bool Subtract( long x, long y, long width, long height ); - bool Subtract( const wxRect& rect ); - bool Subtract( const wxRegion& region ); - - bool Xor( long x, long y, long width, long height ); - bool Xor( const wxRect& rect ); - bool Xor( const wxRegion& region ); - - void GetBox( long& x, long& y, long&w, long &h ) const; - wxRect GetBox(void) const ; - - bool Empty(void) const; - - wxRegionContain Contains( long x, long y ) const; - wxRegionContain Contains( long x, long y, long w, long h ) const; - wxRegionContain Contains(const wxPoint& pt) const; - wxRegionContain Contains(const wxRect& rect) const; - - public: - - wxList *GetRectList() const; - GdkRegion *GetRegion(void) const; -}; - -class wxRegionIterator: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxRegionIterator); - - public: - - wxRegionIterator(void); - wxRegionIterator(const wxRegion& region); - - void Reset(void) { m_current = 0; } - void Reset(const wxRegion& region); - - operator bool (void) const; - bool HaveRects(void) const; - - void operator ++ (void); - void operator ++ (int); - - long GetX(void) const; - long GetY(void) const; - long GetW(void) const; - long GetWidth(void) const { return GetW(); } - long GetH(void) const; - long GetHeight(void) const { return GetH(); } - - private: - - long m_current; - wxRegion m_region; -}; - - -#endif - // __REGIONH__ diff --git a/include/wx/gtk1/scrolbar.h b/include/wx/gtk1/scrolbar.h deleted file mode 100644 index 27941a616b..0000000000 --- a/include/wx/gtk1/scrolbar.h +++ /dev/null @@ -1,87 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: scrolbar.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKSCROLLBARH__ -#define __GTKSCROLLBARH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxScrollBar; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxScrollBarNameStr; - -//----------------------------------------------------------------------------- -// wxScrollBar -//----------------------------------------------------------------------------- - -class wxScrollBar: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxScrollBar) - - public: - - wxScrollBar(void) { m_adjust = (GtkAdjustment *) NULL; m_oldPos = 0.0; }; - inline wxScrollBar( wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSB_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr ) - { - Create( parent, id, pos, size, style, validator, name ); - } - bool Create( wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSB_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr ); - ~wxScrollBar(void); - int GetPosition(void) const; - int GetThumbSize() const; - int GetPageSize() const; - int GetRange() const; - virtual void SetPosition( int viewStart ); - virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize, - bool refresh = TRUE ); - - // Backward compatibility - int GetValue(void) const; - void SetValue( int viewStart ); - void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const; - int GetViewLength() const; - int GetObjectLength() const; - void SetPageSize( int pageLength ); - void SetObjectLength( int objectLength ); - void SetViewLength( int viewLength ); - - public: - - GtkAdjustment *m_adjust; - float m_oldPos; -}; - -#endif - // __GTKSCROLLBARH__ diff --git a/include/wx/gtk1/settings.h b/include/wx/gtk1/settings.h deleted file mode 100644 index b446e86b1f..0000000000 --- a/include/wx/gtk1/settings.h +++ /dev/null @@ -1,43 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: settings.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKSETTINGSH__ -#define __GTKSETTINGSH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/gdicmn.h" -#include "wx/pen.h" -#include "wx/font.h" - -class WXDLLEXPORT wxSystemSettings: public wxObject -{ -public: - inline wxSystemSettings(void) {} - - inline static void Init() {} - static void Done(); - - // Get a system colour - static wxColour GetSystemColour(int index); - - // Get a system font - static wxFont GetSystemFont(int index); - - // Get a system metric, e.g. scrollbar size - static int GetSystemMetric(int index); -}; - -#endif - // __GTKSETTINGSH__ diff --git a/include/wx/gtk1/slider.h b/include/wx/gtk1/slider.h deleted file mode 100644 index 2915e8380f..0000000000 --- a/include/wx/gtk1/slider.h +++ /dev/null @@ -1,94 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: slider.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKSLIDERH__ -#define __GTKSLIDERH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxSlider; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxSliderNameStr; - -//----------------------------------------------------------------------------- -// wxSlider -//----------------------------------------------------------------------------- - -class wxSlider: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxSlider) - - public: - wxSlider(void); - inline wxSlider( wxWindow *parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSL_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr ) - { - Create( parent, id, value, minValue, maxValue, pos, size, style, validator, name ); - } - ~wxSlider(void); - bool Create(wxWindow *parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSL_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr ); - virtual int GetValue(void) const; - virtual void SetValue( int ); - void GetSize( int *x, int *y ) const; - void SetSize( int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO ); - void GetPosition( int *x, int *y ) const; - void SetRange( int minValue, int maxValue ); - int GetMin(void) const; - int GetMax(void) const; - void SetTickFreq( int n, int pos ); - int GetTickFreq(void) const; - void SetPageSize( int pageSize ); - int GetPageSize(void) const; - void ClearSel(void); - void ClearTicks(void); - void SetLineSize( int lineSize ); - int GetLineSize(void) const; - int GetSelEnd(void) const; - int GetSelStart(void) const; - void SetSelection( int minPos, int maxPos ); - void SetThumbLength( int len ); - int GetThumbLength(void) const; - void SetTick( int tickPos ); - - public: - - GtkAdjustment *m_adjust; - float m_oldPos; - -}; - -#endif // __GTKSLIDERH__ diff --git a/include/wx/gtk1/statbmp.h b/include/wx/gtk1/statbmp.h deleted file mode 100644 index b534110b1d..0000000000 --- a/include/wx/gtk1/statbmp.h +++ /dev/null @@ -1,60 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: statbmp.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKSTATICBITMAPH__ -#define __GTKSTATICBITMAPH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxStaticBitmap; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char* wxStaticBitmapNameStr; - -//----------------------------------------------------------------------------- -// wxStaticBitmap -//----------------------------------------------------------------------------- - -class wxStaticBitmap: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxStaticBitmap) - - public: - - wxStaticBitmap(void); - wxStaticBitmap( wxWindow *parent, wxWindowID id, const wxBitmap& label, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = wxStaticBitmapNameStr ); - bool Create( wxWindow *parent, wxWindowID id, const wxBitmap& label, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = wxStaticBitmapNameStr); - virtual void SetBitmap( const wxBitmap& bitmap ); - wxBitmap& GetBitmap(void) const { return (wxBitmap&)m_bitmap; } - - private: - - wxBitmap m_bitmap; -}; - -#endif // __GTKSTATICBITMAPH__ diff --git a/include/wx/gtk1/statbox.h b/include/wx/gtk1/statbox.h deleted file mode 100644 index a6248a6bc9..0000000000 --- a/include/wx/gtk1/statbox.h +++ /dev/null @@ -1,55 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: stabox.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKSTATICBOXH__ -#define __GTKSTATICBOXH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxStaticBox; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxStaticBoxNameStr; - -//----------------------------------------------------------------------------- -// wxStaticBox -//----------------------------------------------------------------------------- - -class wxStaticBox: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxStaticBox) - - public: - - wxStaticBox(void); - wxStaticBox( wxWindow *parent, wxWindowID id, const wxString &label, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = 0, const wxString &name = wxStaticBoxNameStr ); - bool Create( wxWindow *parent, wxWindowID id, const wxString &label, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = 0, const wxString &name = wxStaticBoxNameStr ); -}; - -#endif // __GTKSTATICBOXH__ diff --git a/include/wx/gtk1/stattext.h b/include/wx/gtk1/stattext.h deleted file mode 100644 index e60303c890..0000000000 --- a/include/wx/gtk1/stattext.h +++ /dev/null @@ -1,57 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: stattext.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKSTATICTEXTH__ -#define __GTKSTATICTEXTH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxStaticText; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxStaticTextNameStr; - -//----------------------------------------------------------------------------- -// wxStaticText -//----------------------------------------------------------------------------- - -class wxStaticText: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxStaticText) - - public: - - wxStaticText(void); - wxStaticText( wxWindow *parent, wxWindowID id, const wxString &label, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = 0, const wxString &name = wxStaticTextNameStr ); - bool Create( wxWindow *parent, wxWindowID id, const wxString &label, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = 0, const wxString &name = wxStaticTextNameStr ); - wxString GetLabel(void) const; - void SetLabel( const wxString &label ); -}; - -#endif // __GTKSTATICTEXTH__ diff --git a/include/wx/gtk1/tbargtk.h b/include/wx/gtk1/tbargtk.h deleted file mode 100644 index 93f6e7bafc..0000000000 --- a/include/wx/gtk1/tbargtk.h +++ /dev/null @@ -1,140 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tbargtk.h -// Purpose: GTK toolbar -// Author: Robert Roebling -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Robert Roebling -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __TBARGTKH__ -#define __TBARGTKH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxToolBarTool; -class wxToolBar; - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -#define wxTOOL_STYLE_BUTTON 1 -#define wxTOOL_STYLE_SEPARATOR 2 - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxToolBarNameStr; - -//----------------------------------------------------------------------------- -// wxToolBarTool -//----------------------------------------------------------------------------- - -class wxToolBarTool: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxToolBarTool) - - public: - - wxToolBarTool(void) {}; - wxToolBarTool( wxToolBar *owner, int theIndex = 0, - const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap, - bool toggle = FALSE, wxObject *clientData = (wxObject *) NULL, - const wxString& shortHelpString = "", const wxString& longHelpString = "", - GtkWidget *item = (GtkWidget *) NULL ); - ~wxToolBarTool(void); - - public: - - int m_toolStyle; - wxObject *m_clientData; - int m_index; - bool m_toggleState; - bool m_isToggle; - bool m_deleteSecondBitmap; - bool m_enabled; - wxBitmap m_bitmap1; - wxBitmap m_bitmap2; - bool m_isMenuCommand; - wxString m_shortHelpString; - wxString m_longHelpString; - wxToolBar *m_owner; - GtkWidget *m_item; -}; - -//----------------------------------------------------------------------------- -// wxToolBar -//----------------------------------------------------------------------------- - -class wxToolBar: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxToolBar) - - public: - - wxToolBar(void); - wxToolBar( wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = wxToolBarNameStr ); - ~wxToolBar(void); - - bool Create( wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = wxToolBarNameStr); - - // Only allow toggle if returns TRUE. Call when left button up. - virtual bool OnLeftClick(int toolIndex, bool toggleDown); - - // Call when right button down. - virtual void OnRightClick(int toolIndex, float x, float y); - - // Called when the mouse cursor enters a tool bitmap. - // Argument is -1 if mouse is exiting the toolbar. - virtual void OnMouseEnter(int toolIndex); - - // If pushedBitmap is NULL, a reversed version of bitmap is - // created and used as the pushed/toggled image. - // If toggle is TRUE, the button toggles between the two states. - virtual wxToolBarTool *AddTool( int toolIndex, const wxBitmap& bitmap, - const wxBitmap& pushedBitmap = wxNullBitmap, bool toggle = FALSE, - float xPos = -1, float yPos = -1, wxObject *clientData = (wxObject *)NULL, - const wxString& helpString1 = "", const wxString& helpString2 = ""); - virtual void AddSeparator(void); - virtual void ClearTools(void); - - virtual void Realize(void); - - virtual void EnableTool(int toolIndex, bool enable); - virtual void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on - virtual wxObject *GetToolClientData(int index) const; - - virtual bool GetToolState(int toolIndex) const; - virtual bool GetToolEnabled(int toolIndex) const; - - virtual void SetMargins(int x, int y); - void SetMargins(const wxSize& size) { SetMargins(size.x, size.y); }; - virtual void SetToolPacking(int packing); - virtual void SetToolSeparation(int separation); - - public: - - GtkToolbar *m_toolbar; - wxList m_tools; -}; - -#endif - // __TBARGTKH__ - diff --git a/include/wx/gtk1/textctrl.h b/include/wx/gtk1/textctrl.h deleted file mode 100644 index 034f218b7b..0000000000 --- a/include/wx/gtk1/textctrl.h +++ /dev/null @@ -1,115 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: textctrl.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: $Id$ -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKTEXTCTRLH__ -#define __GTKTEXTCTRLH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/control.h" - -#if USE_IOSTREAMH -#include -#else -#include -#endif - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxTextCtrl; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxTextCtrlNameStr; - -//----------------------------------------------------------------------------- -// wxTextCtrl -//----------------------------------------------------------------------------- - -class wxTextCtrl: public wxControl, public streambuf -{ - DECLARE_EVENT_TABLE() - DECLARE_DYNAMIC_CLASS(wxTextCtrl); - - public: - wxTextCtrl(); - wxTextCtrl( wxWindow *parent, wxWindowID id, const wxString &value = "", - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - int style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString &name = wxTextCtrlNameStr ); - bool Create( wxWindow *parent, wxWindowID id, const wxString &value = "", - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - int style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString &name = wxTextCtrlNameStr ); - wxString GetValue() const; - void SetValue( const wxString &value ); - void WriteText( const wxString &text ); - - bool LoadFile( const wxString &file ); - bool SaveFile( const wxString &file ); - bool IsModified() const { return m_modified; } - void SetModified() { m_modified = TRUE; } - void DiscardEdits() { m_modified = FALSE; } -/* - wxString GetLineText( long lineNo ) const; - void OnDropFiles( wxDropFilesEvent &event ); - long PositionToXY( long pos, long *x, long *y ) const; - long XYToPosition( long x, long y ); - int GetNumberOfLines(); -*/ - virtual void SetInsertionPoint( long pos ); - virtual void SetInsertionPointEnd(); - virtual void SetEditable( bool editable ); - virtual void SetSelection( long from, long to ); - void ShowPosition( long pos ); - virtual long GetInsertionPoint() const; - virtual long GetLastPosition() const; - virtual void Remove( long from, long to ); - virtual void Replace( long from, long to, const wxString &value ); - void Cut(); - void Copy(); - void Paste(); - void Delete(); - - void OnChar( wxKeyEvent &event ); - - int overflow(int i); - int sync(); - int underflow(); - - wxTextCtrl& operator<<(const wxString& s); - wxTextCtrl& operator<<(int i); - wxTextCtrl& operator<<(long i); - wxTextCtrl& operator<<(float f); - wxTextCtrl& operator<<(double d); - wxTextCtrl& operator<<(const char c); - - virtual GtkWidget* GetConnectWidget(void); - virtual bool IsOwnGtkWindow( GdkWindow *window ); - - private: - - bool m_modified; - GtkWidget *m_text; -}; - -#endif // __GTKTEXTCTRLH__ - - diff --git a/include/wx/gtk1/timer.h b/include/wx/gtk1/timer.h deleted file mode 100644 index 821c03b30d..0000000000 --- a/include/wx/gtk1/timer.h +++ /dev/null @@ -1,53 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: timer.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKTIMERH__ -#define __GTKTIMERH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" - -//----------------------------------------------------------------------------- -// derived classes -//----------------------------------------------------------------------------- - -class wxTimer; - -//----------------------------------------------------------------------------- -// wxTimer -//----------------------------------------------------------------------------- - -class wxTimer: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxTimer) - - public: - - wxTimer(void); - ~wxTimer(void); - int Interval(void); - bool OneShot(void); - virtual void Notify(void); - void Start( int millisecs = -1, bool oneShot = FALSE ); - void Stop(void); - - private: - - int m_tag; - int m_time; - bool m_oneShot; -}; - -#endif // __GTKTIMERH__ diff --git a/include/wx/gtk1/treectrl.h b/include/wx/gtk1/treectrl.h deleted file mode 100644 index 61be492ad1..0000000000 --- a/include/wx/gtk1/treectrl.h +++ /dev/null @@ -1,334 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: treectrl.h -// Purpose: -// Author: Denis Pershin -// Created: 08/08/98 -// Id: $Id$ -// Copyright: (c) 1998 Denis Pershin and Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __GTKTREECTRL_H__ -#define __GTKTREECTRL_H__ - -#ifdef __GNUG__ -#pragma interface "treectrl.h" -#endif - -#include "wx/defs.h" -#include "wx/string.h" -#include "wx/list.h" -#include "wx/control.h" -#include "wx/event.h" -#include "wx/imaglist.h" -#include "wx/scrolwin.h" -#include "wx/dcclient.h" - -#include - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxTreeItem; -class wxTreeCtrl; -class wxTreeEvent; - -class wxImageList; - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -// WXDLLEXPORT extern const char *wxTreeNameStr; - -#define wxTREE_MASK_HANDLE 0x0001 -#define wxTREE_MASK_STATE 0x0002 -#define wxTREE_MASK_TEXT 0x0004 -#define wxTREE_MASK_IMAGE 0x0008 -#define wxTREE_MASK_SELECTED_IMAGE 0x0010 -#define wxTREE_MASK_CHILDREN 0x0020 -#define wxTREE_MASK_DATA 0x0040 - -#define wxTREE_STATE_BOLD 0x0001 -#define wxTREE_STATE_DROPHILITED 0x0002 -#define wxTREE_STATE_EXPANDED 0x0004 -#define wxTREE_STATE_EXPANDEDONCE 0x0008 -#define wxTREE_STATE_FOCUSED 0x0010 -#define wxTREE_STATE_SELECTED 0x0020 -#define wxTREE_STATE_CUT 0x0040 - -#define wxTREE_HITTEST_ABOVE 0x0001 // Above the client area. -#define wxTREE_HITTEST_BELOW 0x0002 // Below the client area. -#define wxTREE_HITTEST_NOWHERE 0x0004 // In the client area but below the last item. -#define wxTREE_HITTEST_ONITEMBUTTON 0x0010 // On the button associated with an item. -#define wxTREE_HITTEST_ONITEMICON 0x0020 // On the bitmap associated with an item. -#define wxTREE_HITTEST_ONITEMINDENT 0x0040 // In the indentation associated with an item. -#define wxTREE_HITTEST_ONITEMLABEL 0x0080 // On the label (string) associated with an item. -#define wxTREE_HITTEST_ONITEMRIGHT 0x0100 // In the area to the right of an item. -#define wxTREE_HITTEST_ONITEMSTATEICON 0x0200 // On the state icon for a tree view item that is in a user-defined state. -#define wxTREE_HITTEST_TOLEFT 0x0400 // To the right of the client area. -#define wxTREE_HITTEST_TORIGHT 0x0800 // To the left of the client area. - -#define wxTREE_HITTEST_ONITEM (wxTREE_HITTEST_ONITEMICON | wxTREE_HITTEST_ONITEMLABEL | wxTREE_HITTEST_ONITEMSTATEICON) - -// Flags for GetNextItem -enum { - wxTREE_NEXT_CARET, // Retrieves the currently selected item. - wxTREE_NEXT_CHILD, // Retrieves the first child item. The hItem parameter must be NULL. - wxTREE_NEXT_DROPHILITE, // Retrieves the item that is the target of a drag-and-drop operation. - wxTREE_NEXT_FIRSTVISIBLE, // Retrieves the first visible item. - wxTREE_NEXT_NEXT, // Retrieves the next sibling item. - wxTREE_NEXT_NEXTVISIBLE, // Retrieves the next visible item that follows the specified item. - wxTREE_NEXT_PARENT, // Retrieves the parent of the specified item. - wxTREE_NEXT_PREVIOUS, // Retrieves the previous sibling item. - wxTREE_NEXT_PREVIOUSVISIBLE, // Retrieves the first visible item that precedes the specified item. - wxTREE_NEXT_ROOT // Retrieves the first child item of the root item of which the specified item is a part. -}; - -// Flags for ExpandItem -enum { - wxTREE_EXPAND_EXPAND, - wxTREE_EXPAND_COLLAPSE, - wxTREE_EXPAND_COLLAPSE_RESET, - wxTREE_EXPAND_TOGGLE -}; - -// Flags for InsertItem -enum { - wxTREE_INSERT_LAST = -1, - wxTREE_INSERT_FIRST = -2, - wxTREE_INSERT_SORT = -3 -}; - -//----------------------------------------------------------------------------- -// wxTreeItem -//----------------------------------------------------------------------------- - - -class WXDLLEXPORT wxTreeItem: public wxObject -{ -public: - wxTreeCtrl *m_owner; - GtkWidget *m_parentwidget; - GtkTreeItem *m_widget; - GtkTree *m_tree; - long m_mask; - long m_itemId; - long m_state; - long m_stateMask; - wxString m_text; - int m_image; - int m_selectedImage; - int m_children; - wxList m_childlist; - long m_data; - - wxTreeItem(); - wxTreeItem(GtkWidget *parent, const wxTreeItem &item); - ~wxTreeItem(); - - void Create(); - - void AddChild(wxTreeItem *child); - void DeleteChildren(); - bool HasChildren(); - wxTreeItem *FindItem(long itemId) const; - wxTreeItem *FindItem(GtkTreeItem *item) const; - - // Accessors - inline long GetMask() const { return m_mask; } - inline long GetItemId() const { return m_itemId; } - inline long GetState() const { return m_state; } - inline long GetStateMask() const { return m_stateMask; } - inline wxString GetText() const { return m_text; } - inline int GetImage() const { return m_image; } - inline int GetSelectedImage() const { return m_selectedImage; } - inline const wxList &GetChildren() const { return m_childlist; } - inline long GetData() const { return m_data; } - - inline void SetMask(long mask) { m_mask = mask; } - inline void SetItemId(long id) { m_itemId = m_itemId = id; } - inline void GetState(long state) { m_state = state; } - inline void SetStateMask(long stateMask) { m_stateMask = stateMask; } - inline void GetText(const wxString& text) { m_text = text; } - inline void SetImage(int image) { m_image = image; } - inline void SetSelectedImage(int selImage) { m_selectedImage = selImage; } - inline void SetChildren(const wxList &children) { m_childlist = children; } - inline void SetData(long data) { m_data = data; } - - int NumberOfVisibleDescendents(); -private: - friend wxTreeCtrl; - friend void gtk_treeitem_expand_callback(GtkWidget *widget, wxTreeItem *treeitem); - friend void gtk_treeitem_collapse_callback(GtkWidget *widget, wxTreeItem *treeitem); - friend void gtk_treeitem_select_callback( GtkWidget *WXUNUSED(widget), wxTreeItem *treeitem); - friend void gtk_treeitem_deselect_callback( GtkWidget *WXUNUSED(widget), wxTreeItem *treeitem); - - void AddSubtree(); - void PrepareEvent(wxTreeEvent &event); - void SendDelete(wxWindow *target); - void SendExpand(wxWindow *target); - void SendExpanding(wxWindow *target); - void SendCollapse(wxWindow *target); - void SendCollapsing(wxWindow *target); - void SendSelChanged(wxWindow *target); - void SendSelChanging(wxWindow *target); - - inline wxTreeItem *GetChild(long no) { - return (wxTreeItem *)(m_childlist.Nth(no)->Data()); - } - inline long GetChildrenNumber() { - return m_childlist.Number(); - } - - guint expand_handler; - guint collapse_handler; - -// It is a quick hack to make TreeCtrl working... I do not know why -// but signals is GTK does not disconnected... - bool ignore; - - DECLARE_DYNAMIC_CLASS(wxTreeItem) -}; - -//----------------------------------------------------------------------------- -// wxTreeCtrl -//----------------------------------------------------------------------------- - -class wxTreeCtrl: public wxScrolledWindow { -public: - GtkTree *m_tree; - - wxTreeCtrl(); - wxTreeCtrl(wxWindow *parent, const wxWindowID id = -1, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxTR_HAS_BUTTONS, - const wxString& name = "wxTreeCtrl" ); - ~wxTreeCtrl(); - bool Create(wxWindow *parent, const wxWindowID id = -1, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxTR_HAS_BUTTONS, - const wxString& name = "wxTreeCtrl"); - - int GetCount() const; - - long InsertItem( long parent, const wxString& label, - int image = -1, int selImage = -1, - long insertAfter = wxTREE_INSERT_LAST ); - - long InsertItem( long parent, wxTreeItem &info, - long insertAfter = wxTREE_INSERT_LAST ); - void DeleteItem( long item ); - void DeleteChildren( long item ); - bool DeleteAllItems(); - - bool ExpandItem(long item) { return ExpandItem(item, wxTREE_EXPAND_EXPAND); } - bool ExpandItem( long item, int action ); - - bool CollapseItem(long item) { return ExpandItem(item, wxTREE_EXPAND_COLLAPSE); } - bool ToggleItem(long item) { return ExpandItem(item, wxTREE_EXPAND_TOGGLE); } - - // is the item expanded now? - bool IsItemExpanded(long item) - { - wxTreeItem *pItem = FindItem(item); - return pItem && (pItem->GetState() & wxTREE_STATE_EXPANDED); - } - -/* - bool GetItem( wxTreeItem &info ) const; -*/ - - long GetItemData( long item ) const; - wxString GetItemText( long item ) const; - int GetItemImage(long item) const; - long GetParent( long item ) const; - long GetRootItem() const; -/* - long GetSelection() const; - bool SelectItem( long item ); -*/ - - bool ItemHasChildren( long item ) const; - void SetIndent( int indent ); - int GetIndent() const; - -/* - bool SetItem( wxTreeItem &info ); - bool SetItemData( long item, long data ); - bool SetItemText( long item, const wxString &text ); - void SetItemImage(long item, int image, int imageSel) const; - long HitTest( const wxPoint& point, int &flags ); -*/ - - wxTreeItem *FindItem(GtkTreeItem *item) const; - - wxImageList *GetImageList(int which = wxIMAGE_LIST_NORMAL) const; - void SetImageList(wxImageList *imageList, int which = wxIMAGE_LIST_NORMAL); - -private: - // set the selection to the specified item generating appropriate event(s) if - // not disabled - void SelectItem(wxTreeItem *item, bool bDoEvents = TRUE); - - wxTreeItem *m_anchor; - wxTreeItem *m_current; - int m_indent; - long m_lastId; - bool m_isCreated; - wxImageList *m_imageList; - wxImageList *m_smallImageList; - - void CalculateLevel( wxTreeItem *item, wxPaintDC &dc, int level, int &y ); - void CalculatePositions(); - wxTreeItem *FindItem( long itemId ) const; - -// DECLARE_EVENT_TABLE() - DECLARE_DYNAMIC_CLASS(wxTreeCtrl) -}; - -//----------------------------------------------------------------------------- -// wxTreeEvent -//----------------------------------------------------------------------------- - -class WXDLLEXPORT wxTreeEvent: public wxCommandEvent -{ - DECLARE_DYNAMIC_CLASS(wxTreeEvent) - - public: - wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0); - - int m_code; - wxTreeItem m_item; - long m_oldItem; - wxPoint m_pointDrag; - - inline long GetOldItem() const { return m_oldItem; } - inline wxTreeItem& GetItem() const { return (wxTreeItem&) m_item; } - inline wxPoint GetPoint() const { return m_pointDrag; } - inline void SetCode(int code) { m_code = code; } - inline int GetCode() const { return m_code; } -}; - -typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); - -#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn , (wxObject *) NULL }, -#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, ( wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, ( wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, - -#endif - // __GTKTREECTRL_H__ diff --git a/include/wx/gtk1/win_gtk.h b/include/wx/gtk1/win_gtk.h deleted file mode 100644 index d42e89bebe..0000000000 --- a/include/wx/gtk1/win_gtk.h +++ /dev/null @@ -1,69 +0,0 @@ -/* /////////////////////////////////////////////////////////////////////////// -// Name: win_gtk.h -// Purpose: wxWindows's GTK base widget -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////// */ - - -#ifndef __GTK_MYFIXED_H__ -#define __GTK_MYFIXED_H__ - - -#include -#include - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#define GTK_MYFIXED(obj) GTK_CHECK_CAST (obj, gtk_myfixed_get_type (), GtkMyFixed) -#define GTK_MYFIXED_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_myfixed_get_type (), GtkMyFixedClass) -#define GTK_IS_MYFIXED(obj) GTK_CHECK_TYPE (obj, gtk_myfixed_get_type ()) - - -typedef struct _GtkMyFixed GtkMyFixed; -typedef struct _GtkMyFixedClass GtkMyFixedClass; -typedef struct _GtkMyFixedChild GtkMyFixedChild; - -struct _GtkMyFixed -{ - GtkContainer container; - - GList *children; -}; - -struct _GtkMyFixedClass -{ - GtkContainerClass parent_class; -}; - -struct _GtkMyFixedChild -{ - GtkWidget *widget; - gint16 x; - gint16 y; -}; - -guint gtk_myfixed_get_type (void); -GtkWidget* gtk_myfixed_new (void); -void gtk_myfixed_put (GtkMyFixed *myfixed, - GtkWidget *widget, - gint16 x, - gint16 y); -void gtk_myfixed_move (GtkMyFixed *myfixed, - GtkWidget *widget, - gint16 x, - gint16 y); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __GTK_MYFIXED_H__ */ diff --git a/include/wx/gtk1/window.h b/include/wx/gtk1/window.h deleted file mode 100644 index 665c3ee0c7..0000000000 --- a/include/wx/gtk1/window.h +++ /dev/null @@ -1,318 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: window.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKWINDOWH__ -#define __GTKWINDOWH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/event.h" -#include "wx/validate.h" -#include "wx/cursor.h" -#include "wx/font.h" -#include "wx/dc.h" -#include "wx/region.h" -#include "wx/dnd.h" -#include "wx/accel.h" - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxFrameNameStr; -extern wxList wxTopLevelWindows; - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxLayoutConstraints; -class wxSizer; -class wxResourceTable; -class wxItemResource; - -class wxWindow; -class wxCanvas; - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxPanelNameStr; -extern const wxSize wxDefaultSize; -extern const wxPoint wxDefaultPosition; - -//----------------------------------------------------------------------------- -// wxWindow -//----------------------------------------------------------------------------- - -class wxWindow: public wxEvtHandler -{ -public: - wxWindow(); - inline wxWindow(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxPanelNameStr) - { - Create(parent, id, pos, size, style, name); - } - bool Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxPanelNameStr); - virtual ~wxWindow(); - - virtual bool LoadFromResource( wxWindow *parent, const wxString& resourceName, - const wxResourceTable *table = (const wxResourceTable *) NULL); - virtual wxControl *CreateItem( const wxItemResource *childResource, - const wxResourceTable *table = (const wxResourceTable *) NULL); - - bool Close( bool force = FALSE ); - virtual bool Destroy(); - virtual bool DestroyChildren(); - - virtual void PrepareDC( wxDC &dc ); - - virtual void SetSize( int x, int y, int width, int height, - int sizeFlags = wxSIZE_AUTO ); - virtual void SetSize( int width, int height ); - virtual void Move( int x, int y ); - virtual void GetSize( int *width, int *height ) const; - virtual void SetClientSize( int const width, int const height ); - virtual void GetClientSize( int *width, int *height ) const; - virtual void GetPosition( int *x, int *y ) const; - virtual void Centre( int direction = wxHORIZONTAL ); - inline void Center(int direction = wxHORIZONTAL) { Centre(direction); } - virtual void Fit(); - - virtual void SetSizeHints( int minW, int minH, int maxW = -1, int maxH = -1, int incW = -1, int incH = -1 ); - - void OnSize( wxSizeEvent &event ); - void OnIdle( wxIdleEvent& event ); - - virtual bool Show( bool show ); - virtual void Enable( bool enable ); - virtual void MakeModal( bool modal ); - virtual bool IsEnabled() const { return m_isEnabled; } - inline bool Enabled(void) const { return IsEnabled(); } - virtual void SetFocus(); - virtual bool OnClose(); - - virtual void AddChild( wxWindow *child ); - wxList *GetChildren(); - virtual void RemoveChild( wxWindow *child ); - void SetReturnCode( int retCode ); - int GetReturnCode(); - wxWindow *GetParent() const - { return m_parent; } - wxWindow *GetGrandParent(void) const - { return (m_parent ? m_parent->m_parent : (wxWindow*)NULL); } - void SetParent( wxWindow *p ) - { m_parent = p; } - - wxEvtHandler *GetEventHandler(); - void SetEventHandler( wxEvtHandler *handler ); - void PushEventHandler( wxEvtHandler *handler ); - wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE ); - - virtual wxValidator *GetValidator(); - virtual void SetValidator( const wxValidator &validator ); - - virtual void SetAcceleratorTable( const wxAcceleratorTable& accel ); - virtual wxAcceleratorTable *GetAcceleratorTable() { return &m_acceleratorTable; } - - bool IsBeingDeleted(); - - void SetId( wxWindowID id ); - wxWindowID GetId(); - - void SetCursor( const wxCursor &cursor ); - - virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL ); - virtual void Clear(); - - virtual wxRegion GetUpdateRegion() const; - virtual bool IsExposed(int x, int y) const; - virtual bool IsExposed(int x, int y, int w, int h) const; - virtual bool IsExposed(const wxPoint& pt) const; - virtual bool IsExposed(const wxRect& rect) const; - - virtual wxColour GetBackgroundColour() const; - virtual void SetBackgroundColour( const wxColour &colour ); - virtual wxColour GetForegroundColour() const; - virtual void SetForegroundColour( const wxColour &colour ); - - virtual int GetCharHeight(void) const; - virtual int GetCharWidth(void) const; - virtual void GetTextExtent( const wxString& string, int *x, int *y, - int *descent = (int *) NULL, - int *externalLeading = (int *) NULL, - const wxFont *theFont = (const wxFont *) NULL, bool use16 = FALSE) const; - - virtual void SetDefaultBackgroundColour( const wxColour& col ) - { m_defaultBackgroundColour = col; } - virtual wxColour GetDefaultBackgroundColour() const - { return m_defaultBackgroundColour; } - virtual void SetDefaultForegroundColour( const wxColour& col ) - { m_defaultForegroundColour = col; } - virtual wxColour GetDefaultForegroundColour() const - { return m_defaultForegroundColour; } - - virtual void SetFont( const wxFont &font ); - virtual wxFont *GetFont(); - // For backward compatibility - inline virtual void SetButtonFont(const wxFont& font) { SetFont(font); } - inline virtual void SetLabelFont(const wxFont& font) { SetFont(font); } - inline virtual wxFont *GetLabelFont() { return GetFont(); }; - inline virtual wxFont *GetButtonFont() { return GetFont(); }; - virtual void SetWindowStyleFlag( long flag ); - virtual long GetWindowStyleFlag() const; - virtual void CaptureMouse(); - virtual void ReleaseMouse(); - virtual void SetTitle( const wxString &title ); - virtual wxString GetTitle() const; - virtual void SetName( const wxString &name ); - virtual wxString GetName() const; - virtual wxString GetLabel() const; - - void OnSysColourChanged( wxSysColourChangedEvent &WXUNUSED(event) ) {}; - - virtual bool IsShown() const; - - virtual void Raise(void); - virtual void Lower(void); - - virtual bool IsRetained(); - virtual wxWindow *FindWindow( long id ); - virtual wxWindow *FindWindow( const wxString& name ); - void AllowDoubleClick( bool WXUNUSED(allow) ) {}; - void SetDoubleClick( bool WXUNUSED(allow) ) {}; - virtual void ClientToScreen( int *x, int *y ); - virtual void ScreenToClient( int *x, int *y ); - - virtual bool Validate(); - virtual bool TransferDataToWindow(); - virtual bool TransferDataFromWindow(); - void OnInitDialog( wxInitDialogEvent &event ); - virtual void InitDialog(); - - virtual bool PopupMenu( wxMenu *menu, int x, int y ); - - virtual void SetDropTarget( wxDropTarget *dropTarget ); - virtual wxDropTarget *GetDropTarget() const; - - virtual void SetScrollbar( int orient, int pos, int thumbVisible, - int range, bool refresh = TRUE ); - virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE ); - virtual int GetScrollPos( int orient ) const; - virtual int GetScrollThumb( int orient ) const; - virtual int GetScrollRange( int orient ) const; - virtual void ScrollWindow( int dx, int dy, const wxRect* rect = (wxRect *) NULL ); - - virtual bool AcceptsFocus() const; - void UpdateWindowUI(); - -public: // cannot get private going yet - - virtual GtkWidget* GetConnectWidget(void); - virtual bool IsOwnGtkWindow( GdkWindow *window ); - - void PreCreation( wxWindow *parent, wxWindowID id, const wxPoint &pos, - const wxSize &size, long style, const wxString &name ); - void PostCreation(); - bool HasVMT(); - virtual void ImplementSetSize(); - virtual void ImplementSetPosition(); - - wxWindow *m_parent; - wxList m_children; - int m_x,m_y; - int m_width,m_height; - int m_minWidth,m_minHeight; - int m_maxWidth,m_maxHeight; - int m_retCode; - wxEvtHandler *m_eventHandler; - wxValidator *m_windowValidator; - wxDropTarget *m_pDropTarget; - wxWindowID m_windowId; - wxCursor *m_cursor; - wxFont m_font; - wxColour m_backgroundColour; - wxColour m_defaultBackgroundColour; - wxColour m_foregroundColour ; - wxColour m_defaultForegroundColour; - wxRegion m_updateRegion; - long m_windowStyle; - bool m_isShown; - bool m_isEnabled; - wxString m_windowName; - wxAcceleratorTable m_acceleratorTable; - - GtkWidget *m_widget; - GtkWidget *m_wxwindow; - GtkAdjustment *m_hAdjust,*m_vAdjust; - float m_oldHorizontalPos; - float m_oldVerticalPos; - bool m_needParent; - bool m_hasScrolling; - bool m_hasVMT; - bool m_sizeSet; - bool m_resizing; - -public: - - wxLayoutConstraints *m_constraints; - wxList *m_constraintsInvolvedIn; - wxSizer *m_windowSizer; - wxWindow *m_sizerParent; - bool m_autoLayout; - - wxLayoutConstraints *GetConstraints() const; - void SetConstraints( wxLayoutConstraints *constraints ); - void SetAutoLayout( bool autoLayout ); - bool GetAutoLayout() const; - bool Layout(); - void SetSizer( wxSizer *sizer ); - wxSizer *GetSizer() const; - void SetSizerParent( wxWindow *win ); - wxWindow *GetSizerParent() const; - void UnsetConstraints(wxLayoutConstraints *c); - inline wxList *GetConstraintsInvolvedIn() const ; - void AddConstraintReference(wxWindow *otherWin); - void RemoveConstraintReference(wxWindow *otherWin); - void DeleteRelatedConstraints(); - virtual void ResetConstraints(); - virtual void SetConstraintSizes(bool recurse = TRUE); - virtual bool LayoutPhase1(int *noChanges); - virtual bool LayoutPhase2(int *noChanges); - virtual bool DoPhase(int); - virtual void TransformSizerToActual(int *x, int *y) const ; - virtual void SizerSetSize(int x, int y, int w, int h); - virtual void SizerMove(int x, int y); - virtual void SetSizeConstraint(int x, int y, int w, int h); - virtual void MoveConstraint(int x, int y); - virtual void GetSizeConstraint(int *w, int *h) const ; - virtual void GetClientSizeConstraint(int *w, int *h) const ; - virtual void GetPositionConstraint(int *x, int *y) const ; - - DECLARE_DYNAMIC_CLASS(wxWindow) - DECLARE_EVENT_TABLE() -}; - -#endif // __GTKWINDOWH__ diff --git a/include/wx/hash.h b/include/wx/hash.h deleted file mode 100644 index e154046cf5..0000000000 --- a/include/wx/hash.h +++ /dev/null @@ -1,98 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: hash.h -// Purpose: wxHashTable class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_WXHASHH__ -#define _WX_WXHASHH__ - -#ifdef __GNUG__ -#pragma interface "hash.h" -#endif - -#include "wx/object.h" -#include "wx/list.h" - -/* - * A hash table is an array of user-definable size with lists - * of data items hanging off the array positions. Usually there'll - * be a hit, so no search is required; otherwise we'll have to run down - * the list to find the desired item. -*/ - -class WXDLLEXPORT wxHashTable: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxHashTable) - - public: - int n; - int current_position; - wxNode *current_node; - - unsigned int key_type; - wxList **hash_table; - - wxHashTable(int the_key_type = wxKEY_INTEGER, int size = 1000); - ~wxHashTable(void); - - bool Create(int the_key_type = wxKEY_INTEGER, int size = 1000); - - // Note that there are 2 forms of Put, Get. - // With a key and a value, the *value* will be checked - // when a collision is detected. Otherwise, if there are - // 2 items with a different value but the same key, - // we'll retrieve the WRONG ONE. So where possible, - // supply the required value along with the key. - // In fact, the value-only versions make a key, and still store - // the value. The use of an explicit key might be required - // e.g. when combining several values into one key. - // When doing that, it's highly likely we'll get a collision, - // e.g. 1 + 2 = 3, 2 + 1 = 3. - - // key and value are NOT necessarily the same - void Put(long key, long value, wxObject *object); - void Put(long key, const char *value, wxObject *object); - - // key and value are the same - void Put(long value, wxObject *object); - void Put(const char *value, wxObject *object); - - // key and value not the same - wxObject *Get(long key, long value) const; - wxObject *Get(long key, const char *value) const; - - // key and value are the same - wxObject *Get(long value) const; - wxObject *Get(const char *value) const; - - // Deletes entry and returns data if found - wxObject *Delete(long key); - wxObject *Delete(const char *key); - - wxObject *Delete(long key, int value); - wxObject *Delete(long key, const char *value); - - // Construct your own integer key from a string, e.g. in case - // you need to combine it with something - long MakeKey(const char *string) const; - - // Way of iterating through whole hash table (e.g. to delete everything) - // Not necessary, of course, if you're only storing pointers to - // objects maintained separately - - void BeginFind(void); - wxNode *Next(void); - - void DeleteContents(bool flag); - void Clear(void); - -}; - -#endif - // _WX_WXHASHH__ diff --git a/include/wx/help.h b/include/wx/help.h deleted file mode 100644 index 71bff121f6..0000000000 --- a/include/wx/help.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef _WX_HELP_H_BASE_ -#define _WX_HELP_H_BASE_ - -#ifdef __WXMSW__ -#include "wx/msw/helpwin.h" -#elif defined(__WXGTK__) -#include "wx/generic/helphtml.h" -#else -#include "wx/generic/helpxlp.h" -#endif - -#ifdef __WXMSW__ -#define wxHelpController wxWinHelpController -#define classwxHelpController classwxWinHelpController -#elif defined(__WXGTK__) -#define wxHelpController wxHTMLHelpController -#define classwxHelpController classwxHTMLHelpController -#else -#define wxHelpController wxXLPHelpController -#define classwxHelpController classwxXLPHelpController -#endif - -#endif - // _WX_HELP_H_BASE_ diff --git a/include/wx/helpbase.h b/include/wx/helpbase.h deleted file mode 100644 index b1ee1c693b..0000000000 --- a/include/wx/helpbase.h +++ /dev/null @@ -1,51 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: helpbase.h -// Purpose: Help system base classes -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_HELPBASEH__ -#define _WX_HELPBASEH__ - -#ifdef __GNUG__ -#pragma interface "helpbase.h" -#endif - -#include "wx/wx.h" - -#if USE_HELP - -// Defines the API for help controllers -class WXDLLEXPORT wxHelpControllerBase: public wxObject -{ - DECLARE_CLASS(wxHelpControllerBase) - - public: - inline wxHelpControllerBase(void) {} - inline ~wxHelpControllerBase(void) {}; - - // Must call this to set the filename and server name. - // server is only required when implementing TCP/IP-based - // help controllers. - virtual bool Initialize(const wxString& file, int server) { return FALSE; }; - virtual bool Initialize(const wxString& file) = 0; - - // If file is "", reloads file given in Initialize - virtual bool LoadFile(const wxString& file = "") = 0; - virtual bool DisplayContents(void) = 0; - virtual bool DisplaySection(int sectionNo) = 0; - virtual bool DisplayBlock(long blockNo) = 0; - virtual bool KeywordSearch(const wxString& k) = 0; - - virtual bool Quit(void) = 0; - virtual void OnQuit(void) {}; -}; - -#endif // USE_HELP -#endif - // _WX_HELPBASEH__ diff --git a/include/wx/helphtml.h b/include/wx/helphtml.h deleted file mode 100644 index 20ce2789ab..0000000000 --- a/include/wx/helphtml.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _WX_HELPHTML_H_BASE_ -#define _WX_HELPHTML_H_BASE_ - -#include "wx/generic/helphtml.h" - -#endif - // _WX_HELPHTML_H_BASE_ diff --git a/include/wx/helpwin.h b/include/wx/helpwin.h deleted file mode 100644 index 5743288dad..0000000000 --- a/include/wx/helpwin.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _WX_HELPWIN_H_BASE_ -#define _WX_HELPWIN_H_BASE_ - -#include "wx/msw/helpwin.h" - -#endif - // _WX_HELPWIN_H_BASE_ diff --git a/include/wx/helpxlp.h b/include/wx/helpxlp.h deleted file mode 100644 index b9f6af78eb..0000000000 --- a/include/wx/helpxlp.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _WX_HELPXLP_H_BASE_ -#define _WX_HELPXLP_H_BASE_ - -#include "wx/generic/helpxlp.h" - -#endif - // _WX_HELPXLP_H_BASE_ diff --git a/include/wx/icon.h b/include/wx/icon.h deleted file mode 100644 index 2baded96c3..0000000000 --- a/include/wx/icon.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_ICON_H_BASE_ -#define _WX_ICON_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/icon.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/icon.h" -#elif defined(__WXGTK__) -#include "wx/gtk/icon.h" -#elif defined(__WXQT__) -#include "wx/qt/icon.h" -#elif defined(__WXMAC__) -#include "wx/mac/icon.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/icon.h" -#endif - -#endif - // _WX_ICON_H_BASE_ diff --git a/include/wx/imaglist.h b/include/wx/imaglist.h deleted file mode 100644 index e62b821a80..0000000000 --- a/include/wx/imaglist.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_IMAGLIST_H_BASE_ -#define _WX_IMAGLIST_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/imaglist.h" -#elif defined(__WXMOTIF__) -#include "wx/generic/imaglist.h" -#elif defined(__WXGTK__) -#include "wx/generic/imaglist.h" -#elif defined(__WXQT__) -#include "wx/generic/imaglist.h" -#elif defined(__WXMAC__) -#include "wx/generic/imaglist.h" -#elif defined(__WXSTUBS__) -#include "wx/generic/imaglist.h" -#endif - -#endif - // _WX_IMAGLIST_H_BASE_ diff --git a/include/wx/intl.h b/include/wx/intl.h deleted file mode 100644 index 5eba6c1840..0000000000 --- a/include/wx/intl.h +++ /dev/null @@ -1,128 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: intl.h -// Purpose: Internationalization and localisation for wxWindows -// Author: Vadim Zeitlin -// Modified by: -// Created: 29/01/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef __INTLH__ -#define __INTLH__ - -#ifdef __GNUG__ -#pragma interface "intl.h" -#endif - -#include "wx/defs.h" -#include "wx/string.h" - -// ============================================================================ -// global decls -// ============================================================================ - -// ---------------------------------------------------------------------------- -// simple types -// ---------------------------------------------------------------------------- - -// # adjust if necessary -typedef unsigned char size_t8; -typedef unsigned long size_t32; - -// ---------------------------------------------------------------------------- -// macros -// ---------------------------------------------------------------------------- - -// gettext() style macro -#define _(str) wxGetTranslation(str) - -// ---------------------------------------------------------------------------- -// forward decls -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxLocale; -class WXDLLEXPORT wxMsgCatalog; -extern WXDLLEXPORT_DATA(wxLocale *) g_pLocale; - -// ============================================================================ -// locale support -// ============================================================================ - -// ---------------------------------------------------------------------------- -// wxLocale: encapsulates all language dependent settings, including current -// message catalogs, date, time and currency formats (#### to do) &c -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxLocale -{ -public: - // ctor & dtor - // call Init() if you use this ctor - wxLocale(); - // the ctor has a side effect of changing current locale - wxLocale(const char *szName, // name (for messages) - const char *szShort = (const char *) NULL, // dir prefix (for msg files) - const char *szLocale = (const char *) NULL, // locale (for setlocale) - bool bLoadDefault = TRUE) // preload wxstd.mo? - { Init(szName, szShort, szLocale, bLoadDefault); } - // the same as a function (returns TRUE on success) - bool Init(const char *szName, - const char *szShort = (const char *) NULL, - const char *szLocale = (const char *) NULL, - bool bLoadDefault = TRUE); - // restores old locale - ~wxLocale(); - - // returns locale name - const char *GetLocale() const { return m_strLocale; } - - // add a catalog: it's searched for in standard places (current directory - // first, system one after). It will be used for message lookup by - // GetString(). - // - // Returns 'true' if it was successfully loaded - bool AddCatalog(const char *szDomain); - - // check if the given catalog is loaded - bool IsLoaded(const char *szDomain) const; - - // retrieve the translation for a string in all loaded domains unless - // the szDomain parameter is specified (and then only this domain is - // searched) - // - // return original string if translation is not available - // (in this case an error message is generated the first time - // a string is not found; use wxLogNull to suppress it) - // - // domains are searched in the last to first order, i.e. catalogs - // added later override those added before. - const char *GetString(const char *szOrigString, - const char *szDomain = (const char *) NULL) const; - -private: - // find catalog by name in a linked list, return NULL if !found - wxMsgCatalog *FindCatalog(const char *szDomain) const; - - wxString m_strLocale, // this locale name - m_strShort; // short name for the locale - - const char *m_pszOldLocale; // previous locale from setlocale() - wxLocale *m_pOldLocale; // previous wxLocale - - wxMsgCatalog *m_pMsgCat; // pointer to linked list of catalogs -}; - -// ---------------------------------------------------------------------------- -// global functions -// ---------------------------------------------------------------------------- -WXDLLEXPORT wxLocale* wxGetLocale(); - -// get the translation of the string in the current locale -inline WXDLLEXPORT const char *wxGetTranslation(const char *sz) -{ - wxLocale *pLoc = wxGetLocale(); - return pLoc == (wxLocale *) NULL ? sz : pLoc->GetString(sz); -} - -#endif - // _WX_INTLH__ diff --git a/include/wx/ipcbase.h b/include/wx/ipcbase.h deleted file mode 100644 index 1ceda4baa2..0000000000 --- a/include/wx/ipcbase.h +++ /dev/null @@ -1,97 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: ipcbase.h -// Purpose: Base classes for IPC -// Author: Julian Smart -// Modified by: -// Created: 4/1/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_IPCBASEH__ -#define _WX_IPCBASEH__ - -#ifdef __GNUG__ -#pragma interface "ipcbase.h" -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" - -class WXDLLEXPORT wxDDEServerBase; -class WXDLLEXPORT wxDDEClientBase; - -class WXDLLEXPORT wxConnectionBase: public wxObject -{ - DECLARE_CLASS(wxConnectionBase) - public: - inline wxConnectionBase(void) {} - inline ~wxConnectionBase(void) {} - - // Calls that CLIENT can make - virtual bool Execute(char *data, int size = -1, wxDataFormat format = wxDF_TEXT ) = 0; - virtual bool Execute(const wxString& str) { return Execute((char *)(const char *)str, -1, wxDF_TEXT); } - virtual char *Request(const wxString& item, int *size = (int *) NULL, wxDataFormat format = wxDF_TEXT) = 0; - virtual bool Poke(const wxString& item, char *data, int size = -1, wxDataFormat format = wxDF_TEXT) = 0; - virtual bool StartAdvise(const wxString& item) = 0; - virtual bool StopAdvise(const wxString& item) = 0; - - // Calls that SERVER can make - virtual bool Advise(const wxString& item, char *data, int size = -1, wxDataFormat format = wxDF_TEXT) = 0; - - // Calls that both can make - virtual bool Disconnect(void) = 0; - - // Callbacks to SERVER - override at will - virtual bool OnExecute( const wxString& WXUNUSED(topic), char *WXUNUSED(data), int WXUNUSED(size), - int WXUNUSED(format) ) { return FALSE; }; - virtual char *OnRequest( const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item), - int *WXUNUSED(size), int WXUNUSED(format) ) { return (char *) NULL; }; - virtual bool OnPoke( const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item), char *WXUNUSED(data), - int WXUNUSED(size), int WXUNUSED(format) ) { return FALSE; }; - virtual bool OnStartAdvise( const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item) ) - { return FALSE; }; - virtual bool OnStopAdvise( const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item) ) - { return FALSE; }; - - // Callbacks to CLIENT - override at will - virtual bool OnAdvise( const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item), char *WXUNUSED(data), - int WXUNUSED(size), int WXUNUSED(format) ) { return FALSE; }; - - // Callbacks to BOTH - - // Default behaviour is to delete connection and return TRUE - virtual bool OnDisconnect(void) = 0; -}; - -class WXDLLEXPORT wxServerBase: public wxObject -{ - DECLARE_CLASS(wxServerBase) - public: - - inline wxServerBase(void) {} - inline ~wxServerBase(void) {}; - virtual bool Create(const wxString& serverName) = 0; // Returns FALSE if can't create server (e.g. port - // number is already in use) - virtual wxConnectionBase *OnAcceptConnection(const wxString& topic) = 0; - -}; - -class WXDLLEXPORT wxClientBase: public wxObject -{ - DECLARE_CLASS(wxClientBase) - public: - inline wxClientBase(void) {}; - inline ~wxClientBase(void) {}; - virtual bool ValidHost(const wxString& host) = 0; - virtual wxConnectionBase *MakeConnection(const wxString& host, const wxString& server, const wxString& topic) = 0; - // Call this to make a connection. - // Returns NULL if cannot. - virtual wxConnectionBase *OnMakeConnection(void) = 0; // Tailor this to return own connection. - -}; - -#endif - // _WX_IPCBASEH__ diff --git a/include/wx/joystick.h b/include/wx/joystick.h deleted file mode 100644 index 5391c9c5c3..0000000000 --- a/include/wx/joystick.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _WX_JOYSTICK_H_BASE_ -#define _WX_JOYSTICK_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/joystick.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/joystick.h" -#elif defined(__WXGTK__) -#include "wx/gtk/joystick.h" -#elif defined(__WXMAC__) -#include "wx/mac/joystick.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/joystick.h" -#endif - -#endif - // _WX_JOYSTICK_H_BASE_ diff --git a/include/wx/layout.h b/include/wx/layout.h deleted file mode 100644 index 83b610a2ea..0000000000 --- a/include/wx/layout.h +++ /dev/null @@ -1,312 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: layout.h -// Purpose: Layout classes -// Author: Julian Smart -// Modified by: -// Created: 29/01/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_LAYOUTH__ -#define _WX_LAYOUTH__ - -#ifdef __GNUG__ -#pragma interface "layout.h" -#endif - -#include "wx/defs.h" - -class WXDLLEXPORT wxWindow; - -// X stupidly defines these in X.h -#ifdef Above -#undef Above -#endif -#ifdef Below -#undef Below -#endif - -#define wxLAYOUT_DEFAULT_MARGIN 0 - -enum wxEdge { wxLeft, wxTop, wxRight, wxBottom, wxWidth, wxHeight, - wxCentre, wxCenter = wxCentre, wxCentreX, wxCentreY }; -enum wxRelationship { wxUnconstrained = 0, - wxAsIs, - wxPercentOf, - wxAbove, - wxBelow, - wxLeftOf, - wxRightOf, - wxSameAs, - wxAbsolute }; - -class WXDLLEXPORT wxLayoutConstraints; -class WXDLLEXPORT wxIndividualLayoutConstraint: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxIndividualLayoutConstraint) - - protected: - // To be allowed to modify the internal variables - friend class wxIndividualLayoutConstraint_Serialize; - - // 'This' window is the parent or sibling of otherWin - wxWindow *otherWin; - - wxEdge myEdge; - wxRelationship relationship; - int margin; - int value; - int percent; - wxEdge otherEdge; - bool done; - - public: - wxIndividualLayoutConstraint(); - ~wxIndividualLayoutConstraint(); - - void Set(wxRelationship rel, wxWindow *otherW, wxEdge otherE, int val = 0, int marg = wxLAYOUT_DEFAULT_MARGIN); - - // - // Sibling relationships - // - void LeftOf(wxWindow *sibling, int marg = wxLAYOUT_DEFAULT_MARGIN); - void RightOf(wxWindow *sibling, int marg = wxLAYOUT_DEFAULT_MARGIN); - void Above(wxWindow *sibling, int marg = wxLAYOUT_DEFAULT_MARGIN); - void Below(wxWindow *sibling, int marg = wxLAYOUT_DEFAULT_MARGIN); - - // - // 'Same edge' alignment - // - void SameAs(wxWindow *otherW, wxEdge edge, int marg = wxLAYOUT_DEFAULT_MARGIN); - - // The edge is a percentage of the other window's edge - void PercentOf(wxWindow *otherW, wxEdge wh, int per); - - // - // Edge has absolute value - // - void Absolute(int val); - - // - // Dimension is unconstrained - // - inline void Unconstrained() { relationship = wxUnconstrained; } - - // - // Dimension is 'as is' (use current size settings) - // - inline void AsIs() { relationship = wxAsIs; } - - // - // Accessors - // - inline wxWindow *GetOtherWindow() { return otherWin; } - inline wxEdge GetMyEdge() const { return myEdge; } - inline void SetEdge(wxEdge which) { myEdge = which; } - inline void SetValue(int v) { value = v; } - inline int GetMargin() { return margin; } - inline void SetMargin(int m) { margin = m; } - inline int GetValue() const { return value; } - inline int GetPercent() const { return percent; } - inline int GetOtherEdge() const { return otherEdge; } - inline bool GetDone() const { return done; } - inline void SetDone(bool d) { done = d; } - inline wxRelationship GetRelationship() { return relationship; } - inline void SetRelationship(wxRelationship r) { relationship = r; } - - // Reset constraint if it mentions otherWin - bool ResetIfWin(wxWindow *otherW); - - // Try to satisfy constraint - bool SatisfyConstraint(wxLayoutConstraints *constraints, wxWindow *win); - - // Get the value of this edge or dimension, or if this - // is not determinable, -1. - int GetEdge(wxEdge which, wxWindow *thisWin, wxWindow *other) const; -}; - -class WXDLLEXPORT wxLayoutConstraints: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxLayoutConstraints) - - public: - // Edge constraints - wxIndividualLayoutConstraint left; - wxIndividualLayoutConstraint top; - wxIndividualLayoutConstraint right; - wxIndividualLayoutConstraint bottom; - // Size constraints - wxIndividualLayoutConstraint width; - wxIndividualLayoutConstraint height; - // Centre constraints - wxIndividualLayoutConstraint centreX; - wxIndividualLayoutConstraint centreY; - - wxLayoutConstraints(); - ~wxLayoutConstraints(); - - bool SatisfyConstraints(wxWindow *win, int *noChanges); - bool AreSatisfied() const - { - return left.GetDone() && top.GetDone() && right.GetDone() && - bottom.GetDone() && centreX.GetDone() && centreY.GetDone(); - } -}; - -bool WXDLLEXPORT wxOldDoLayout(wxWindow *win); - -/* - -Algorithm: - - Each sizer has a Layout function. - - wxExpandSizer::Layout ; E.g. for resizeable windows - - - parent size must be known (i.e. called - from OnSize or explicitly) - - call Layout on each child to give it a chance to resize - (e.g. child shrinks around its own children): - stop when all children return TRUE, or no change - - evaluate constraints on self to set size - - wxShrinkSizer::Layout ; E.g. fit-to-contents windows - ; Perhaps 2 rowcols, one above other. - - - call Layout on each child to give it a chance to resize - (e.g. child shrinks around its own children): - stop when each returns TRUE, or no change - - fit around children - (what if some want to be centred? E.g. OK/Cancel rowcol. - - done by centring e.g. bottom sizer w.r.t. top sizer. - (sibling relationship only)) - - evaluate own constraints (e.g. may be below another window) - - IF parent is a real window (remember: a real window can - have only one child sizer, although a sizer can have several child - (real) windows), then resize this parent WITHOUT invoking Layout - again. - Frame and dialog box OnSizes can check if the sizer is a shrink - sizer; if not, can call layout. Maybe have virtual bool AutoSizeLayout() - to determine this. - -How to relayout if a child sizer/window changes? Need to go all the way -to the top of the hierarchy and call Layout() again. - - wxRowColSizer::Layout - - - Similar to wxShrinkSizer only instead of shrinking to fit - contents, more sophisticated layout of contents, and THEN - shrinking (possibly). - - Do the same parent window check/setsize as for wxShrinkSizer. - -*/ - -typedef enum { - wxSizerShrink, - wxSizerExpand, - wxSizerNone -} wxSizerBehaviour; - -#define wxTYPE_SIZER 90 - -class WXDLLEXPORT wxSizer: public wxWindow -{ - DECLARE_DYNAMIC_CLASS(wxSizer) - - private: - protected: - wxSizerBehaviour sizerBehaviour; - int borderX; - int borderY; - int sizerWidth; - int sizerHeight; - int sizerX; - int sizerY; - public: - wxSizer(); - wxSizer(wxWindow *parent, wxSizerBehaviour behav = wxSizerNone); - ~wxSizer(); - - bool Create(wxWindow *parent, wxSizerBehaviour behav = wxSizerNone); - virtual void SetSize(int x, int y, int w, int h, int flags = wxSIZE_AUTO); - // Avoid compiler warning - void SetSize(int w, int h) { wxWindow::SetSize(w, h); } - virtual void Move(int x, int y); - virtual void GetSize(int *w, int *h) const; - inline virtual void GetClientSize(int *w, int *h) const { GetSize(w, h); } - virtual void GetPosition(int *x, int *y) const; - - inline void SizerSetSize(int x, int y, int w, int h) - { SetSize(x, y, w, h); } - inline void SizerMove(int x, int y) - { Move(x, y); } - - virtual void SetBorder(int w, int h); - inline int GetBorderX() { return borderX ; } - inline int GetBorderY() { return borderY ; } - - virtual void AddSizerChild(wxWindow *child); - virtual void RemoveSizerChild(wxWindow *child); - - inline virtual void SetBehaviour(wxSizerBehaviour b) { sizerBehaviour = b; } - inline virtual wxSizerBehaviour GetBehaviour() { return sizerBehaviour; } - - virtual bool LayoutPhase1(int *); - virtual bool LayoutPhase2(int *); -}; - -#define wxSIZER_ROWS TRUE -#define wxSIZER_COLS FALSE - -class WXDLLEXPORT wxRowColSizer: public wxSizer -{ - DECLARE_DYNAMIC_CLASS(wxRowColSizer) - - private: - protected: - bool rowOrCol; - int rowOrColSize; - int xSpacing; - int ySpacing; - public: - // rowOrCol = TRUE to be laid out in rows, otherwise in columns. - wxRowColSizer(); - wxRowColSizer(wxWindow *parent, bool rowOrCol = wxSIZER_ROWS, int rowsOrColSize = 20, wxSizerBehaviour = wxSizerShrink); - ~wxRowColSizer(); - - bool Create(wxWindow *parent, bool rowOrCol = wxSIZER_ROWS, int rowsOrColSize = 20, wxSizerBehaviour = wxSizerShrink); - void SetSize(int x, int y, int w, int h, int flags = wxSIZE_AUTO); - // Avoid compiler warning - void SetSize(int w, int h) { wxSizer::SetSize(w, h); } - - inline virtual void SetRowOrCol(bool rc) { rowOrCol = rc; } - inline virtual bool GetRowOrCol() { return rowOrCol; } - inline virtual void SetRowOrColSize(int n) { rowOrColSize = n; } - inline virtual int GetRowOrColSize() { return rowOrColSize; } - inline virtual void SetSpacing(int x, int y) { xSpacing = x; ySpacing = y; } - inline virtual void GetSpacing(int *x, int *y) { *x = xSpacing; *y = ySpacing; } - - bool LayoutPhase1(int *); - bool LayoutPhase2(int *); -}; - -class WXDLLEXPORT wxSpacingSizer: public wxSizer -{ - DECLARE_DYNAMIC_CLASS(wxSpacingSizer) - - private: - protected: - public: - wxSpacingSizer(); - wxSpacingSizer(wxWindow *parent, wxRelationship rel, wxWindow *other, int spacing); - wxSpacingSizer(wxWindow *parent); - ~wxSpacingSizer(); - - bool Create(wxWindow *parent, wxRelationship rel, wxWindow *other, int sp); - bool Create(wxWindow *parent); -}; - -#endif - // _WX_LAYOUTH__ diff --git a/include/wx/list.h b/include/wx/list.h deleted file mode 100644 index 9f3753d37c..0000000000 --- a/include/wx/list.h +++ /dev/null @@ -1,143 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: list.h -// Purpose: wxList, wxStringList classes -// Author: Julian Smart -// Modified by: -// Created: 29/01/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_LISTH__ -#define _WX_LISTH__ - -#ifdef __GNUG__ -#pragma interface "list.h" -#endif - -#include "wx/defs.h" -#include "wx/object.h" - -class WXDLLEXPORT wxList; - -#define wxKEY_NONE 0 -#define wxKEY_INTEGER 1 -#define wxKEY_STRING 2 -class WXDLLEXPORT wxNode: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxNode) - private: - - wxObject *data; - wxNode *next; - wxNode *previous; - - public: - wxList *list; - - // Optional key stuff - union - { - long integer; - char *string; - } key; - - wxNode(wxList *the_list = (wxList *) NULL, wxNode *last_one = (wxNode *) NULL, wxNode *next_one = (wxNode *) NULL, wxObject *object = (wxObject *) NULL); - wxNode(wxList *the_list, wxNode *last_one, wxNode *next_one, - wxObject *object, long the_key); - wxNode(wxList *the_list, wxNode *last_one, wxNode *next_one, - wxObject *object, const char *the_key); - ~wxNode(void); - - inline wxNode *Next(void) const { return next; } - inline wxNode *Previous(void) const { return previous; } - inline wxObject *Data(void) const { return (wxObject *)data; } - inline void SetData(wxObject *the_data) { data = the_data; } -}; - -// type of compare function for list sort operation (as in 'qsort') -typedef int (*wxSortCompareFunction)(const void *elem1, const void *elem2); -typedef int (*wxListIterateFunction)(wxObject *o); - -class WXDLLEXPORT wxList: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxList) - - public: - int n; - int destroy_data; - wxNode *first_node; - wxNode *last_node; - unsigned int key_type; - - wxList(void); - wxList(const unsigned int the_key_type); - wxList(int N, wxObject *Objects[]); - wxList(wxObject *object, ...); - - ~wxList(void); - - inline int Number(void) const { return n; } - - // Append to end of list - wxNode *Append(wxObject *object); - - // Insert at front of list - wxNode *Insert(wxObject *object); - - // Insert before given node - wxNode *Insert(wxNode *position, wxObject *object); - - // Keyed append - wxNode *Append(long key, wxObject *object); - wxNode *Append(const char *key, wxObject *object); - - bool DeleteNode(wxNode *node); - bool DeleteObject(wxObject *object); // Finds object pointer and - // deletes node (and object if - // DeleteContents is on) - void Clear(void); // Delete all nodes - - inline wxNode *First(void) const { return first_node; } - inline wxNode *Last(void) const { return last_node; } - wxNode *Nth(int i) const; // nth node counting from 0 - - // Keyed search - wxNode *Find(long key) const; - wxNode *Find(const char *key) const; - - wxNode *Member(wxObject *object) const; - - inline void DeleteContents(int destroy) { destroy_data = destroy; } - // Instruct it to destroy user data - // when deleting nodes - // this function allows the sorting of arbitrary lists by giving - // a function to compare two list elements. - void Sort(const wxSortCompareFunction compfunc); - - wxObject *FirstThat(wxListIterateFunction func); - void ForEach(wxListIterateFunction func); - wxObject *LastThat(wxListIterateFunction func); -}; - -// String list class. N.B. this always copies strings -// with Add and deletes them itself. -class WXDLLEXPORT wxStringList: public wxList -{ - DECLARE_DYNAMIC_CLASS(wxStringList) - - public: - wxStringList(void); - wxStringList(const char *first ...); - ~wxStringList(void); - - virtual wxNode *Add(const char *s); - virtual void Delete(const char *s); - virtual char **ListToArray(bool new_copies = FALSE) const; - virtual void Sort(void); - virtual bool Member(const char *s) const; -}; - -#endif - // _WX_LISTH__ diff --git a/include/wx/listbox.h b/include/wx/listbox.h deleted file mode 100644 index 9d8a3460db..0000000000 --- a/include/wx/listbox.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_LISTBOX_H_BASE_ -#define _WX_LISTBOX_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/listbox.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/listbox.h" -#elif defined(__WXGTK__) -#include "wx/gtk/listbox.h" -#elif defined(__WXQT__) -#include "wx/qt/listbox.h" -#elif defined(__WXMAC__) -#include "wx/mac/listbox.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/listbox.h" -#endif - -#endif - // _WX_LISTBOX_H_BASE_ diff --git a/include/wx/listctrl.h b/include/wx/listctrl.h deleted file mode 100644 index d1fd4f9043..0000000000 --- a/include/wx/listctrl.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_LISTCTRL_H_BASE_ -#define _WX_LISTCTRL_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/listctrl.h" -#elif defined(__WXMOTIF__) -#include "wx/generic/listctrl.h" -#elif defined(__WXGTK__) -#include "wx/generic/listctrl.h" -#elif defined(__WXQT__) -#include "wx/generic/listctrl.h" -#elif defined(__WXMAC__) -#include "wx/generic/listctrl.h" -#elif defined(__WXSTUBS__) -#include "wx/generic/listctrl.h" -#endif - -#endif - // _WX_LISTCTRL_H_BASE_ diff --git a/include/wx/listimpl.cpp b/include/wx/listimpl.cpp deleted file mode 100644 index e3513099c8..0000000000 --- a/include/wx/listimpl.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: listimpl.cpp -// Purpose: helper file for implementation of dynamic lists -// Author: Vadim Zeitlin -// Modified by: -// Created: 16.10.97 -// RCS-ID: $Id$ -// Copyright: (c) 1997 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -/***************************************************************************** - * Purpose: implements methods of "template" class declared in DECLARE_LIST * - * macro and which couldn't be implemented inline (because they * - * need the full definition of type T in scope) * - * * - * Usage: 1) #include dynarray.h * - * 2) WX_DECLARE_LIST * - * 3) #include listimpl.cpp * - * 4) WX_DEFINE_LIST * - *****************************************************************************/ - -// macro implements remaining (not inline) methods of template list -// (it's private to this file) -#define _DEFINE_LIST(T, name) \ -name::~name() \ -{ \ - Empty(); \ -} \ - \ -void name::DoCopy(const name& src) \ -{ \ - for ( uint ui = 0; ui < src.Count(); ui++ ) \ - Add(src[ui]); \ -} \ - \ -name& name::operator=(const name& src) \ -{ \ - Empty(); \ - DoCopy(src); \ - \ - return *this; \ -} \ - \ -name::name(const name& src) \ -{ \ - DoCopy(src); \ -} \ - \ -void name::Empty() \ -{ \ - for ( uint ui = 0; ui < Count(); ui++ ) \ - delete (T*)BaseArray::Item(ui); \ - \ - BaseArray::Clear(); \ -} \ - \ -void name::Remove(uint uiIndex) \ -{ \ - wxCHECK( uiIndex < Count() ); \ - \ - delete (T*)BaseArray::Item(uiIndex); \ - \ - BaseArray::Remove(uiIndex); \ -} \ - \ -void name::Add(const T& item) \ -{ \ - T* pItem = new T(item); \ - if ( pItem != NULL ) \ - Add(pItem); \ -} \ - \ -void name::Insert(const T& item, uint uiIndex) \ -{ \ - T* pItem = new T(item); \ - if ( pItem != NULL ) \ - Insert(pItem, uiIndex); \ -} \ - \ -int name::Index(const T& Item, Bool bFromEnd) const \ -{ \ - if ( bFromEnd ) { \ - if ( Count() > 0 ) { \ - uint ui = Count() - 1; \ - do { \ - if ( (T*)BaseArray::Item(ui) == &Item ) \ - return ui; \ - ui--; \ - } \ - while ( ui != 0 ); \ - } \ - } \ - else { \ - for( uint ui = 0; ui < Count(); ui++ ) { \ - if( (T*)BaseArray::Item(ui) == &Item ) \ - return ui; \ - } \ - } \ - \ - return NOT_FOUND; \ -} - -// redefine the macro so that now it will generate the class implementation -// old value would provoke a compile-time error if this file is not included -#undef WX_DEFINE_LIST -#define WX_DEFINE_LIST(name) _DEFINE_LIST(_L##name, name) - -// don't pollute preprocessor's name space -#undef _DEFINE_LIST - diff --git a/include/wx/log.h b/include/wx/log.h deleted file mode 100644 index feb245959a..0000000000 --- a/include/wx/log.h +++ /dev/null @@ -1,380 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: log.h -// Purpose: Assorted wxLogXXX functions, and wxLog (sink for logs) -// Author: Vadim Zeitlin -// Modified by: -// Created: 29/01/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_LOG_H_ -#define _WX_LOG_H_ - -#ifdef __GNUG__ -#pragma interface "log.h" -#endif - -// ---------------------------------------------------------------------------- -// constants -// ---------------------------------------------------------------------------- - -// different standard log levels (you may also define your own) -enum -{ - wxLOG_FatalError, // program can't continue, abort immediately - wxLOG_Error, // a serious error, user must be informed about it - wxLOG_Warning, // user is normally informed about it but may be ignored - wxLOG_Message, // normal message (i.e. normal output of a non GUI app) - wxLOG_Info, // informational message (a.k.a. 'Verbose') - wxLOG_Status, // informational: might go to the status line of GUI app - wxLOG_Debug, // never shown to the user, disabled in release mode - wxLOG_Trace, // trace messages are also only enabled in debug mode - wxLOG_Progress, // used for progress indicator (not yet) - wxLOG_User = 100 // user defined levels start here -}; - -// meaning of different bits of the trace mask (which allows selectively -// enable/disable some trace messages) -#define wxTraceMemAlloc 0x0001 // trace memory allocation (new/delete) -#define wxTraceMessages 0x0002 // trace window messages/X callbacks -#define wxTraceResAlloc 0x0004 // trace GDI resource allocation -#define wxTraceRefCount 0x0008 // trace various ref counting operations - -#ifdef __WXMSW__ - #define wxTraceOleCalls 0x0100 // OLE interface calls -#endif - -typedef unsigned long wxTraceMask; -typedef unsigned long wxLogLevel; - -// ---------------------------------------------------------------------------- -// forward declarations -// ---------------------------------------------------------------------------- -class wxTextCtrl; -class wxLogFrame; -class wxFrame; -class ostream; - -// ---------------------------------------------------------------------------- -// derive from this class to redirect (or suppress, or ...) log messages -// normally, only a single instance of this class exists but it's not enforced -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxLog -{ -public: - // ctor - wxLog(); - - // sink function - static void OnLog(wxLogLevel level, const char *szString) - { if ( ms_pLogger != 0 ) ms_pLogger->DoLog(level, szString); } - - // message buffering - // flush shows all messages if they're not logged immediately - // (FILE and iostream logs don't need it, but wxGuiLog does to avoid - // showing 17 modal dialogs one after another) - virtual void Flush(); - // call to Flush() may be optimized: call it only if this function - // returns true (although Flush() also returns immediately if there - // is no messages, this functions is more efficient because inline) - bool HasPendingMessages() const { return m_bHasMessages; } - - // only one sink is active at each moment - // get current log target, will call wxApp::CreateLogTarget() to create one - // if - static wxLog *GetActiveTarget(); - // change log target, pLogger = NULL disables logging, - // returns the previous log target - static wxLog *SetActiveTarget(wxLog *pLogger); - - // functions controlling the default wxLog behaviour - // verbose mode is activated by standard command-line '-verbose' option - void SetVerbose(bool bVerbose = TRUE) { m_bVerbose = bVerbose; } - // sets the format for timestamp prepended by wxLog::DoLog(): it's - // passed to strftime() function, see it's documentation for details. - // no time stamp at all if szTF is NULL or empty - // NB: the string is not copied, so it's lifetime must be long enough! - void SetTimeStampFormat(const char *szTF) { m_szTimeFormat = szTF; } - // trace mask (see wxTraceXXX constants for details) - static void SetTraceMask(wxTraceMask ulMask) { ms_ulTraceMask = ulMask; } - // should GetActiveTarget() try to create a new log object if the current - // is NULL? - static void DontCreateOnDemand() { ms_bAutoCreate = FALSE; } - - // accessors - // gets the verbose status - bool GetVerbose() const { return m_bVerbose; } - // get current time format - const char *GetTimeStampFormat() const { return m_szTimeFormat; } - // get trace mask - static wxTraceMask GetTraceMask() { return ms_ulTraceMask; } - - // make dtor virtual for all derived classes - virtual ~wxLog() { } - -protected: - bool m_bHasMessages; - - bool m_bVerbose; // FALSE => ignore LogInfo messages - const char *m_szTimeFormat; // format for strftime() - - // the logging functions that can be overriden - // default DoLog() prepends the time stamp and a prefix corresponding - // to the message to szString and then passes it to DoLogString() - virtual void DoLog(wxLogLevel level, const char *szString); - // default DoLogString does nothing but is not pure virtual because if - // you override DoLog() you might not need it at all - virtual void DoLogString(const char *szString); - - // helpers - // put the time stamp in the current format into the string - wxString TimeStamp() const; - -private: - // static variables - // ---------------- - static wxLog *ms_pLogger; // currently active log sink - static bool ms_bAutoCreate; // automatically create new log targets? - static wxTraceMask ms_ulTraceMask; // controls wxLogTrace behaviour -}; - -// ---------------------------------------------------------------------------- -// "trivial" derivations of wxLog -// ---------------------------------------------------------------------------- - -// log everything to a "FILE *", stderr by default -class WXDLLEXPORT wxLogStderr : public wxLog -{ -public: - // redirect log output to a FILE - wxLogStderr(FILE *fp = (FILE *) NULL); - -private: - // implement sink function - virtual void DoLogString(const char *szString); - - FILE *m_fp; -}; - -// log everything to an "ostream", cerr by default -class ostream; -class WXDLLEXPORT wxLogStream : public wxLog -{ -public: - // redirect log output to an ostream - wxLogStream(ostream *ostr = (ostream *) NULL); - -protected: - // implement sink function - virtual void DoLogString(const char *szString); - - // @@ using ptr here to avoid including from this file - ostream *m_ostr; -}; - -// log everything to a text window (GUI only of course) -class WXDLLEXPORT wxLogTextCtrl : public wxLogStream -{ -public: - // we just create an ostream from wxTextCtrl and use it in base class - wxLogTextCtrl(wxTextCtrl *pTextCtrl); - ~wxLogTextCtrl(); -}; - -// ---------------------------------------------------------------------------- -// GUI log target, the default one for wxWindows programs -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxLogGui : public wxLog -{ -public: - // ctor - wxLogGui(); - - // show all messages that were logged since the last Flush() - virtual void Flush(); - -protected: - virtual void DoLog(wxLogLevel level, const char *szString); - - wxArrayString m_aMessages; - bool m_bErrors; -}; - -// ---------------------------------------------------------------------------- -// (background) log window: this class forwards all log messages to the log -// target which was active when it was instantiated, but also collects them -// to the log window. This window has it's own menu which allows the user to -// close it, clear the log contents or save it to the file. -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxLogWindow : public wxLog -{ -public: - wxLogWindow(wxFrame *pParent, // the parent frame (can be NULL) - const char *szTitle, // the title of the frame - bool bShow = TRUE, // show window immediately? - bool bPassToOld = TRUE); // pass log messages to the old target? - ~wxLogWindow(); - - // window operations - // show/hide the log window - void Show(bool bShow = TRUE); - // retrieve the pointer to the frame - wxFrame *GetFrame() const; - - // accessors - // the previous log target (may be NULL) - wxLog *GetOldLog() const { return m_pOldLog; } - // are we passing the messages to the previous log target? - bool IsPassingMessages() const { return m_bPassMessages; } - - // we can pass the messages to the previous log target (we're in this mode by - // default: we collect all messages in the window, but also let the default - // processing take place) - void PassMessages(bool bDoPass) { m_bPassMessages = bDoPass; } - - // base class virtuals - // we don't need it ourselves, but we pass it to the previous logger - virtual void Flush(); - - // overridables - // called immediately after the log frame creation allowing for - // any extra initializations - virtual void OnFrameCreate(wxFrame *frame); - // called right before the log frame is going to be deleted - virtual void OnFrameDelete(wxFrame *frame); - -protected: - virtual void DoLog(wxLogLevel level, const char *szString); - virtual void DoLogString(const char *szString); - -private: - bool m_bPassMessages; // pass messages to m_pOldLog? - wxLog *m_pOldLog; // previous log target - wxLogFrame *m_pLogFrame; // the log frame -}; - -// ---------------------------------------------------------------------------- -// /dev/null log target: suppress logging until this object goes out of scope -// ---------------------------------------------------------------------------- - -// example of usage: -/* -void Foo() { - wxFile file; - - // wxFile.Open() normally complains if file can't be opened, we don't want it - wxLogNull logNo; - if ( !file.Open("bar") ) - ... process error ourselves ... - - // ~wxLogNull called, old log sink restored -} -*/ -class WXDLLEXPORT wxLogNull -{ -public: - // ctor saves old log target, dtor restores it - wxLogNull() { m_pPrevLogger = wxLog::SetActiveTarget((wxLog *) NULL); } - ~wxLogNull() { (void)wxLog::SetActiveTarget(m_pPrevLogger); } - -private: - wxLog *m_pPrevLogger; // old log target -}; - -// ============================================================================ -// global functions -// ============================================================================ - -// ---------------------------------------------------------------------------- -// Log functions should be used by application instead of stdio, iostream &c -// for log messages for easy redirection -// ---------------------------------------------------------------------------- - -// define wxLog -// ------------------- - -#define DECLARE_LOG_FUNCTION(level) \ - extern void WXDLLEXPORT wxLog##level(const char *szFormat, ...) -#define DECLARE_LOG_FUNCTION2(level, arg1) \ - extern void WXDLLEXPORT wxLog##level(arg1, const char *szFormat, ...) - -// a generic function for all levels (level is passes as parameter) -DECLARE_LOG_FUNCTION2(Generic, wxLogLevel level); - -// one function per each level -DECLARE_LOG_FUNCTION(FatalError); -DECLARE_LOG_FUNCTION(Error); -DECLARE_LOG_FUNCTION(Warning); -DECLARE_LOG_FUNCTION(Message); -DECLARE_LOG_FUNCTION(Info); -DECLARE_LOG_FUNCTION(Verbose); - -// this function sends the log message to the status line of the top level -// application frame, if any -DECLARE_LOG_FUNCTION(Status); - -// this one is the same as previous except that it allows to explicitly -// specify the frame to which the output should go -DECLARE_LOG_FUNCTION2(Status, wxFrame *pFrame); - -// additional one: as wxLogError, but also logs last system call error code -// and the corresponding error message if available -DECLARE_LOG_FUNCTION(SysError); - -// and another one which also takes the error code (for those broken APIs -// that don't set the errno (like registry APIs in Win32)) -DECLARE_LOG_FUNCTION2(SysError, long lErrCode); - -// debug functions do nothing in release mode -#ifdef __WXDEBUG__ - DECLARE_LOG_FUNCTION(Debug); - - // first king of LogTrace is uncoditional: it doesn't check the level, - // while the second one does nothing if all of level bits are not set - // in wxLog::GetActive()->GetTraceMask(). - DECLARE_LOG_FUNCTION(Trace); - DECLARE_LOG_FUNCTION2(Trace, wxTraceMask mask); -#else //!debug - // these functions do nothing - inline void wxLogDebug(const char *, ...) { } - inline void wxLogTrace(const char *, ...) { } - inline void wxLogTrace(wxTraceMask, const char *, ...) { } -#endif - - -// are we in 'verbose' mode? -// (note that it's often handy to change this var manually from the -// debugger, thus enabling/disabling verbose reporting for some -// parts of the program only) -WXDLLEXPORT_DATA(extern bool) g_bVerbose; - -// fwd decl to avoid including iostream.h here -class ostream; - -// ---------------------------------------------------------------------------- -// get error code/error message from system in a portable way -// ---------------------------------------------------------------------------- - -// return the last system error code -unsigned long WXDLLEXPORT wxSysErrorCode(); -// return the error message for given (or last if 0) error code -const char* WXDLLEXPORT wxSysErrorMsg(unsigned long nErrCode = 0); - -// ---------------------------------------------------------------------------- -// debug only logging functions: use them with API name and error code -// ---------------------------------------------------------------------------- - -#ifdef __WXDEBUG__ - #define wxLogApiError(api, rc) \ - wxLogDebug("At %s(%d) '%s' failed with error %lx (%s).", \ - __FILE__, __LINE__, api, \ - rc, wxSysErrorMsg(rc)) - #define wxLogLastError(api) wxLogApiError(api, wxSysErrorCode()) -#else //!debug - inline void wxLogApiError(const char *, long) { } - inline void wxLogLastError(const char *) { } -#endif //debug/!debug - -#endif // _WX_LOG_H_ diff --git a/include/wx/matrix.h b/include/wx/matrix.h deleted file mode 100644 index 8204b66f39..0000000000 --- a/include/wx/matrix.h +++ /dev/null @@ -1,144 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: matrix.h -// Purpose: wxTransformMatrix class. NOT YET USED -// Author: Chris Breeze, Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_MATRIXH__ -#define _WX_MATRIXH__ - -#ifdef __GNUG__ -#pragma interface "matrix.h" -#endif - -#include "wx/object.h" - -// A simple 3x3 matrix. This may be replaced by a more general matrix -// class some day. -// -// Note: this is intended to be used in wxDC at some point to replace -// the current system of scaling/translation. It is not yet used. - -class WXDLLEXPORT wxTransformMatrix: public wxObject -{ -public: - wxTransformMatrix(void); - wxTransformMatrix(const wxTransformMatrix& mat); - - double GetValue(int row, int col) const; - void SetValue(int row, int col, double value); - - void operator = (const wxTransformMatrix& mat); - bool operator == (const wxTransformMatrix& mat); - bool operator != (const wxTransformMatrix& mat); - - double& operator()(int row, int col); - double operator()(int row, int col) const; - - // Invert matrix - bool Invert(void); - - // Make into identity matrix - bool Identity(void); - - // Is the matrix the identity matrix? - // Only returns a flag, which is set whenever an operation - // is done. - inline bool IsIdentity(void) const { return m_isIdentity; }; - - // This does an actual check. - inline bool IsIdentity1(void) const ; - - // Isotropic scaling - bool Scale(double scale); - - // Translate - bool Translate(double x, double y); - - // Rotate - bool Rotate(double angle); - - // Transform X value from logical to device - inline double TransformX(double x) const; - - // Transform Y value from logical to device - inline double TransformY(double y) const; - - // Transform a point from logical to device coordinates - bool TransformPoint(double x, double y, double& tx, double& ty) const; - - // Transform a point from device to logical coordinates. - - // Example of use: - // wxTransformMatrix mat = dc.GetTransformation(); - // mat.Invert(); - // mat.InverseTransformPoint(x, y, x1, y1); - // OR (shorthand:) - // dc.LogicalToDevice(x, y, x1, y1); - // The latter is slightly less efficient if we're doing several - // conversions, since the matrix is inverted several times. - - // N.B. 'this' matrix is the inverse at this point - - bool InverseTransformPoint(double x, double y, double& tx, double& ty) const; - -public: - double m_matrix[3][3]; - bool m_isIdentity; -/* - double m11, m21, m31; - double m12, m22, m32; - double m13, m23, m33; -*/ -}; - - -/* -The code is wrong and doesn't compile. Chris Breeze als reported, that -some functions of wxTransformMatrix cannot work because it is not -known if he matrix has been inverted. Be careful when using it. - -// Transform X value from logical to device -inline double wxTransformMatrix::TransformX(double x) const -{ - return (m_isIdentity ? x : (x * m_matrix[0][0] + y * m_matrix[1][0] + m_matrix[2][0])); -} - -// Transform Y value from logical to device -inline double wxTransformMatrix::TransformY(double y) const -{ - return (m_isIdentity ? y : (x * m_matrix[0][1] + y * m_matrix[1][1] + m_matrix[2][1])); -} -*/ - -// Is the matrix the identity matrix? -// Perhaps there's some kind of optimization we can do to make this -// a faster operation. E.g. each operation (scale, translate etc.) -// checks whether it's still the identity matrix and sets a flag. -inline bool wxTransformMatrix::IsIdentity1(void) const -{ - return - (m_matrix[0][0] == 1.0 && - m_matrix[1][1] == 1.0 && - m_matrix[2][2] == 1.0 && - m_matrix[1][0] == 0.0 && - m_matrix[2][0] == 0.0 && - m_matrix[0][1] == 0.0 && - m_matrix[2][1] == 0.0 && - m_matrix[0][2] == 0.0 && - m_matrix[1][2] == 0.0) ; -} - -// Calculates the determinant of a 2 x 2 matrix -inline double wxCalculateDet(double a11, double a21, double a12, double a22) -{ - return a11 * a22 - a12 * a21; -} - -#endif - // _WX_MATRIXH__ diff --git a/include/wx/mdi.h b/include/wx/mdi.h deleted file mode 100644 index 1ce5e5555c..0000000000 --- a/include/wx/mdi.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_MDI_H_BASE_ -#define _WX_MDI_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/mdi.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/mdi.h" -#elif defined(__WXGTK__) -#include "wx/gtk/mdi.h" -#elif defined(__WXQT__) -#include "wx/qt/mdi.h" -#elif defined(__WXMAC__) -#include "wx/mac/mdi.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/mdi.h" -#endif - -#endif - // _WX_MDI_H_BASE_ diff --git a/include/wx/memory.h b/include/wx/memory.h deleted file mode 100644 index 9a17ad3ac9..0000000000 --- a/include/wx/memory.h +++ /dev/null @@ -1,279 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: memory.h -// Purpose: MDI classes -// Author: Arthur Seaton, Julian Smart -// Modified by: -// Created: 29/01/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_MEMORYH__ -#define _WX_MEMORYH__ - -#ifdef __GNUG__ -#pragma interface "memory.h" -#endif - -#include "wx/defs.h" - -/* - The macro which will be expanded to include the file and line number - info, or to be a straight call to the new operator. -*/ - -#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT - -#include - -#if USE_IOSTREAMH -#include -#else -#include -#endif - -#include "wx/string.h" - -#ifndef WXDEBUG_NEW -#define WXDEBUG_NEW new(__FILE__,__LINE__) -#endif - -#if WXDEBUG -void * wxDebugAlloc(size_t size, char * fileName, int lineNum, bool isObject, bool isVect = FALSE); -void wxDebugFree(void * buf, bool isVect = FALSE); - -// Global versions of the new and delete operators. -// Currently, these merely call malloc and free; only the wxObject -// operators do something interesting. But this allows WXDEBUG_NEW to -// work for all 'new's in a file. -#if USE_GLOBAL_MEMORY_OPERATORS - -#ifdef new -#undef new -#endif - -void * operator new (size_t size, char * fileName, int lineNum); -void operator delete (void * buf); - -#if !( defined (_MSC_VER) && (_MSC_VER <= 1000) ) -void * operator new[] (size_t size, char * fileName, int lineNum); -void operator delete[] (void * buf); -#endif - -#define new WXDEBUG_NEW - -#endif -#endif - -typedef unsigned int wxMarkerType; - -/* - Define the struct which will be placed at the start of all dynamically - allocated memory. -*/ - -class WXDLLEXPORT wxMemStruct { - -friend class WXDLLEXPORT wxDebugContext; // access to the m_next pointer for list traversal. - -public: -public: - int AssertList (); - - size_t RequestSize () { return m_reqSize; } - wxMarkerType Marker () { return m_firstMarker; } - - // When an object is deleted we set the id slot to a specific value. - inline void SetDeleted (); - inline int IsDeleted (); - - int Append (); - int Unlink (); - - // Used to determine if the object is really a wxMemStruct. - // Not a foolproof test by any means, but better than none I hope! - int AssertIt (); - - // Do all validation on a node. - int ValidateNode (); - - // Check the integrity of a node and of the list, node by node. - int CheckBlock (); - int CheckAllPrevious (); - - // Print a single node. - void PrintNode (); - - // Called when the memory linking functions get an error. - void ErrorMsg (const char *); - void ErrorMsg (); - - inline void *GetActualData(void) const { return m_actualData; } - - void Dump(void); - -public: - // Check for underwriting. There are 2 of these checks. This one - // inside the struct and another right after the struct. - wxMarkerType m_firstMarker; - - // File name and line number are from cpp. - char* m_fileName; - int m_lineNum; - - // The amount of memory requested by the caller. - size_t m_reqSize; - - // Used to try to verify that we really are dealing with an object - // of the required class. Can be 1 of 2 values these indicating a valid - // wxMemStruct object, or a deleted wxMemStruct object. - wxMarkerType m_id; - - wxMemStruct * m_prev; - wxMemStruct * m_next; - - void * m_actualData; - bool m_isObject; -}; - - -typedef void (wxMemStruct::*PmSFV) (); - - -/* - Debugging class. This will only have a single instance, but it\'s - a reasonable way to keep everything together and to make this - available for change if needed by someone else. - A lot of this stuff would be better off within the wxMemStruct class, but - it\'s stuff which we need to access at times when there is no wxMemStruct - object so we use this class instead. Think of it as a collection of - globals which have to do with the wxMemStruct class. -*/ - -class WXDLLEXPORT wxDebugContext { - -protected: - // Used to set alignment for markers. - static size_t CalcAlignment (); - - // Returns the amount of padding needed after something of the given - // size. This is so that when we cast pointers backwards and forwards - // the pointer value will be valid for a wxMarkerType. - static size_t GetPadding (const size_t size) ; - - // Traverse the list. - static void TraverseList (PmSFV, wxMemStruct *from = NULL); - - static streambuf *m_streamBuf; - static ostream *m_debugStream; - - static int debugLevel; - static bool debugOn; - -public: - // Set a checkpoint to dump only the memory from - // a given point - static wxMemStruct *checkPoint; - - wxDebugContext(void); - ~wxDebugContext(void); - - static bool HasStream(void) { return (m_debugStream != NULL); }; - static ostream& GetStream(void) { return *m_debugStream; } - static streambuf *GetStreamBuf(void) { return m_streamBuf; } - static void SetStream(ostream *stream, streambuf *buf = NULL); - static bool SetFile(const wxString& file); - static bool SetStandardError(void); - - static int GetLevel(void) { return debugLevel; } - static void SetLevel(int level) { debugLevel = level; } - - static bool GetDebugMode(void) { return debugOn; } - static void SetDebugMode(bool flag) { debugOn = flag; } - - static void SetCheckpoint(bool all = FALSE); - static wxMemStruct *GetCheckpoint(void) { return checkPoint; } - - // Calculated from the request size and any padding needed - // before the final marker. - static size_t PaddedSize (const size_t reqSize); - - // Calc the total amount of space we need from the system - // to satisfy a caller request. This includes all padding. - static size_t TotSize (const size_t reqSize); - - // Return valid pointers to offsets within the allocated memory. - static char * StructPos (const char * buf); - static char * MidMarkerPos (const char * buf); - static char * CallerMemPos (const char * buf); - static char * EndMarkerPos (const char * buf, const size_t size); - - // Given a pointer to the start of the caller requested area - // return a pointer to the start of the entire alloc\'d buffer. - static char * StartPos (const char * caller); - - // Access to the list. - static wxMemStruct * GetHead () { return m_head; } - static wxMemStruct * GetTail () { return m_tail; } - - // Set the list sentinals. - static wxMemStruct * SetHead (wxMemStruct * st) { return (m_head = st); } - static wxMemStruct * SetTail (wxMemStruct * st) { return (m_tail = st); } - - // If this is set then every new operation checks the validity - // of the all previous nodes in the list. - static bool GetCheckPrevious () { return m_checkPrevious; } - static void SetCheckPrevious (bool value) { m_checkPrevious = value; } - - // Checks all nodes, or all nodes if checkAll is TRUE - static int Check(bool checkAll = FALSE); - - // Print out the list of wxMemStruct nodes. - static bool PrintList(void); - - // Dump objects - static bool Dump(void); - - // Print statistics - static bool PrintStatistics(bool detailed = TRUE); - - // Print out the classes in the application. - static bool PrintClasses(void); - - // Count the number of non-wxDebugContext-related objects - // that are outstanding - static int CountObjectsLeft(void); - -private: - // Store these here to allow access to the list without - // needing to have a wxMemStruct object. - static wxMemStruct* m_head; - static wxMemStruct* m_tail; - - // Set to FALSE if we're not checking all previous nodes when - // we do a new. Set to TRUE when we are. - static bool m_checkPrevious; -}; - -// Output a debug mess., in a system dependent fashion. -void WXDLLEXPORT wxTrace(const char *fmt ...); -void WXDLLEXPORT wxTraceLevel(int level, const char *fmt ...); - -#define WXTRACE wxTrace -#define WXTRACELEVEL wxTraceLevel - -#else // else part for the #if WXDEBUG - -inline void wxTrace(const char *WXUNUSED(fmt)) {} -inline void wxTraceLevel(int WXUNUSED(level), const char *WXUNUSED(fmt)) {} - -#define WXTRACE TRUE ? (void)0 : wxTrace -#define WXTRACELEVEL TRUE ? (void)0 : wxTraceLevel -#define WXDEBUG_NEW new - -#endif // WXDEBUG - -#endif - // _WX_MEMORYH__ - diff --git a/include/wx/menu.h b/include/wx/menu.h deleted file mode 100644 index 2d0ce9798b..0000000000 --- a/include/wx/menu.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_MENU_H_BASE_ -#define _WX_MENU_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/menu.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/menu.h" -#elif defined(__WXGTK__) -#include "wx/gtk/menu.h" -#elif defined(__WXQT__) -#include "wx/qt/menu.h" -#elif defined(__WXMAC__) -#include "wx/mac/menu.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/menu.h" -#endif - -#endif - // _WX_MENU_H_BASE_ diff --git a/include/wx/menuitem.h b/include/wx/menuitem.h deleted file mode 100644 index 5d32a5f426..0000000000 --- a/include/wx/menuitem.h +++ /dev/null @@ -1,95 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: menuitem.h -// Purpose: wxMenuItem class -// Author: Vadim Zeitlin -// Modified by: -// Created: 11.11.97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _MENUITEM_H -#define _MENUITEM_H - -#ifdef __GNUG__ -#pragma interface "menuitem.h" -#endif - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- - -#include "wx/setup.h" - -// an exception to the general rule that a normal header doesn't include other -// headers - only because ownerdrw.h is not always included and I don't want -// to write #ifdef's everywhere... -#if USE_OWNER_DRAWN -#include "wx/ownerdrw.h" -#endif - -// ---------------------------------------------------------------------------- -// constants -// ---------------------------------------------------------------------------- - -// id for a separator line in the menu (invalid for normal item) -#define ID_SEPARATOR (-1) - -// ---------------------------------------------------------------------------- -// wxMenuItem: an item in the menu, optionally implements owner-drawn behaviour -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxMenuItem: public wxObject -#if USE_OWNER_DRAWN - , public wxOwnerDrawn -#endif -{ -DECLARE_DYNAMIC_CLASS(wxMenuItem) - -public: - // ctor & dtor - wxMenuItem(wxMenu *pParentMenu = NULL, int id = ID_SEPARATOR, - const wxString& strName = "", const wxString& wxHelp = "", - bool bCheckable = FALSE, wxMenu *pSubMenu = NULL); - virtual ~wxMenuItem(); - - // accessors (some more are inherited from wxOwnerDrawn or are below) - bool IsSeparator() const { return m_idItem == ID_SEPARATOR; } - bool IsEnabled() const { return m_bEnabled; } - bool IsChecked() const { return m_bChecked; } - - int GetId() const { return m_idItem; } - const wxString& GetHelp() const { return m_strHelp; } - wxMenu *GetSubMenu() const { return m_pSubMenu; } - - // operations - void SetName(const wxString& strName) { m_strName = strName; } - void SetHelp(const wxString& strHelp) { m_strHelp = strHelp; } - - void Enable(bool bDoEnable = TRUE); - void Check(bool bDoCheck = TRUE); - - void DeleteSubMenu(); - -private: - int m_idItem; // numeric id of the item - wxString m_strHelp; // associated help string - wxMenu *m_pSubMenu, // may be NULL - *m_pParentMenu; // menu this item is contained in - bool m_bEnabled, // enabled or greyed? - m_bChecked; // checked? (only if checkable) - -#if USE_OWNER_DRAWN - // wxOwnerDrawn base class already has these variables - nothing to do - -#else //!owner drawn - bool m_bCheckable; // can be checked? - wxString m_strName; // name or label of the item - -public: - const wxString& GetName() const { return m_strName; } - bool IsCheckable() const { return m_bCheckable; } -#endif //owner drawn -}; - -#endif //_MENUITEM_H \ No newline at end of file diff --git a/include/wx/metafile.h b/include/wx/metafile.h deleted file mode 100644 index dab13f19f2..0000000000 --- a/include/wx/metafile.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _WX_METAFILE_H_BASE_ -#define _WX_METAFILE_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/metafile.h" -#endif - -#endif - // _WX_METAFILE_H_BASE_ diff --git a/include/wx/minifram.h b/include/wx/minifram.h deleted file mode 100644 index 3b45d33a52..0000000000 --- a/include/wx/minifram.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _WX_MINIFRAM_H_BASE_ -#define _WX_MINIFRAMH_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/minifram.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/minifram.h" -#elif defined(__WXGTK__) -#include "wx/gtk/minifram.h" -#elif defined(__WXMAC__) -#include "wx/mac/minifram.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/minifram.h" -#endif - -#endif - // _WX_MINIFRAM_H_BASE_ diff --git a/include/wx/module.h b/include/wx/module.h deleted file mode 100644 index c91f0e126a..0000000000 --- a/include/wx/module.h +++ /dev/null @@ -1,49 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: module.h -// Purpose: Modules handling -// Author: Wolfram Gloger/adapted by Guilhem Lavaux -// Modified by: -// Created: 04/11/98 -// RCS-ID: $Id$ -// Copyright: (c) Wolfram Gloger and Guilhem Lavaux -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_MODULEH__ -#define _WX_MODULEH__ - -#ifdef __GNUG__ -#pragma interface "module.h" -#endif - -#include "wx/object.h" -#include "wx/list.h" -#include "wx/setup.h" - -class WXDLLEXPORT wxModule: public wxObject -{ -public: - wxModule(void) {} - ~wxModule(void) {} - - // If returns FALSE, quits the application immediately. - bool Init(void) { return OnInit(); } - void Exit(void) { OnExit(); } - - // Override both of these - virtual bool OnInit(void) = 0; - virtual void OnExit(void) = 0; - - static void RegisterModule(wxModule* module); - static bool RegisterModules(void); - static bool InitializeModules(void); - static void CleanUpModules(void); - -protected: - static wxList m_modules; - -DECLARE_CLASS(wxModule) -}; - -#endif - diff --git a/include/wx/msgdlg.h b/include/wx/msgdlg.h deleted file mode 100644 index 81aba4972c..0000000000 --- a/include/wx/msgdlg.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_MSGDLG_H_BASE_ -#define _WX_MSGDLG_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/msgdlg.h" -#elif defined(__WXMOTIF__) -#include "wx/generic/msgdlgg.h" -#elif defined(__WXGTK__) -#include "wx/generic/msgdlgg.h" -#elif defined(__WXQT__) -#include "wx/generic/msgdlgg.h" -#elif defined(__WXMAC__) -#include "wx/generic/msgdlgg.h" -#elif defined(__WXSTUBS__) -#include "wx/generic/msgdlgg.h" -#endif - -#endif - // _WX_MSGDLG_H_BASE_ diff --git a/include/wx/mstream.h b/include/wx/mstream.h deleted file mode 100644 index a07ce80ceb..0000000000 --- a/include/wx/mstream.h +++ /dev/null @@ -1,71 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: mstream.h -// Purpose: Memory stream classes -// Author: Guilhem Lavaux -// Modified by: -// Created: 11/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Guilhem Lavaux -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// -#ifndef _WX_WXMMSTREAM_H__ -#define _WX_WXMMSTREAM_H__ - -#include - -class wxMemoryStreamBase { - protected: - wxMemoryStreamBase(); - virtual ~wxMemoryStreamBase(); - - bool ChangeBufferSize(size_t new_length); - - protected: - bool m_persistent; - size_t m_length; - char *m_buffer; - int m_iolimit; -}; - -class wxMemoryInputStream: virtual public wxMemoryStreamBase, public wxInputStream { - public: - wxMemoryInputStream(const char *data, size_t length); - virtual ~wxMemoryInputStream(); - - char Peek(); - - protected: - - size_t DoRead(void *buffer, size_t size); - off_t DoSeekInput(off_t pos, wxSeekMode mode); - off_t DoTellInput() const { return m_position_i; } - - protected: - off_t m_position_i; -}; - -class wxMemoryOutputStream: virtual public wxMemoryStreamBase, public wxOutputStream { - public: - wxMemoryOutputStream(char *data = NULL, size_t length = 0); - virtual ~wxMemoryOutputStream(); - - char *GetData() { Sync(); return m_buffer; } - size_t GetLength() { Sync(); return m_length; } - - protected: - - size_t DoWrite(const void *buffer, size_t size); - off_t DoSeekOutput(off_t pos, wxSeekMode mode); - off_t DoTellOutput() const { return m_position_o; } - - protected: - off_t m_position_o; -}; - -class wxMemoryStream: public wxMemoryInputStream, public wxMemoryOutputStream { - public: - wxMemoryStream(char *data = NULL, size_t length = 0); - virtual ~wxMemoryStream(); -}; - -#endif diff --git a/include/wx/msw/accel.h b/include/wx/msw/accel.h deleted file mode 100644 index 2f2c013a10..0000000000 --- a/include/wx/msw/accel.h +++ /dev/null @@ -1,81 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: accel.h -// Purpose: wxAcceleratorTable class -// Author: Julian Smart -// Modified by: -// Created: 31/7/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_ACCEL_H_ -#define _WX_ACCEL_H_ - -#ifdef __GNUG__ -#pragma interface "accel.h" -#endif - -#include "wx/object.h" - -class WXDLLEXPORT wxAcceleratorTable; - -// Hold Ctrl key down -#define wxACCEL_ALT 0x01 - -// Hold Ctrl key down -#define wxACCEL_CTRL 0x02 - - // Hold Shift key down -#define wxACCEL_SHIFT 0x04 - - // Hold no other key -#define wxACCEL_NORMAL 0x00 - -class WXDLLEXPORT wxAcceleratorEntry -{ -public: - wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0) - { - m_flags = flags; m_keyCode = keyCode; m_command = cmd; - } - - inline void Set(int flags, int keyCode, int cmd) - { m_flags = flags; m_keyCode = keyCode; m_command = cmd; } - - inline int GetFlags() const { return m_flags; } - inline int GetKeyCode() const { return m_keyCode; } - inline int GetCommand() const { return m_command; } - - int m_flags; - int m_keyCode; // ASCII or virtual keycode - int m_command; // Command id to generate -}; - -class WXDLLEXPORT wxAcceleratorTable: public wxObject -{ -DECLARE_DYNAMIC_CLASS(wxAcceleratorTable) -public: - wxAcceleratorTable(); - wxAcceleratorTable(const wxString& resource); // Load from .rc resource - wxAcceleratorTable(int n, wxAcceleratorEntry entries[]); // Load from array - - // Copy constructors - inline wxAcceleratorTable(const wxAcceleratorTable& accel) { Ref(accel); } - inline wxAcceleratorTable(const wxAcceleratorTable* accel) { if (accel) Ref(*accel); } - - ~wxAcceleratorTable(); - - inline wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) { if (*this == accel) return (*this); Ref(accel); return *this; } - inline bool operator == (const wxAcceleratorTable& accel) { return m_refData == accel.m_refData; } - inline bool operator != (const wxAcceleratorTable& accel) { return m_refData != accel.m_refData; } - - bool Ok(void) const; - void SetHACCEL(WXHACCEL hAccel); - WXHACCEL GetHACCEL() const; -}; - -WXDLLEXPORT_DATA(extern wxAcceleratorTable) wxNullAcceleratorTable; - -#endif - // _WX_ACCEL_H_ diff --git a/include/wx/msw/app.h b/include/wx/msw/app.h deleted file mode 100644 index 0889410bf6..0000000000 --- a/include/wx/msw/app.h +++ /dev/null @@ -1,166 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: app.h -// Purpose: wxApp class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_APP_H_ -#define _WX_APP_H_ - -#ifdef __GNUG__ -#pragma interface "app.h" -#endif - -#include "wx/defs.h" -#include "wx/object.h" - -class WXDLLEXPORT wxFrame; -class WXDLLEXPORT wxWindow; -class WXDLLEXPORT wxApp ; -class WXDLLEXPORT wxKeyEvent; -class WXDLLEXPORT wxLog; - -#define wxPRINT_WINDOWS 1 -#define wxPRINT_POSTSCRIPT 2 - -WXDLLEXPORT_DATA(extern wxApp*) wxTheApp; - -void WXDLLEXPORT wxCleanUp(); -void WXDLLEXPORT wxCommonCleanUp(); // Call this from the platform's wxCleanUp() -void WXDLLEXPORT wxCommonInit(); // Call this from the platform's initialization - -// Force an exit from main loop -void WXDLLEXPORT wxExit(); - -// Yield to other apps/messages -bool WXDLLEXPORT wxYield(); - -// Represents the application. Derive OnInit and declare -// a new App object to start application -class WXDLLEXPORT wxApp: public wxEvtHandler -{ - DECLARE_DYNAMIC_CLASS(wxApp) - wxApp(); - inline ~wxApp() {} - - static void SetInitializerFunction(wxAppInitializerFunction fn) { m_appInitFn = fn; } - static wxAppInitializerFunction GetInitializerFunction() { return m_appInitFn; } - - virtual int MainLoop(); - void ExitMainLoop(); - bool Initialized(); - virtual bool Pending() ; - virtual void Dispatch() ; - - virtual void OnIdle(wxIdleEvent& event); - -// Generic - virtual bool OnInit() { return FALSE; }; - - // No specific tasks to do here. - virtual bool OnInitGui() { return TRUE; } - - // Called to set off the main loop - virtual int OnRun() { return MainLoop(); }; - virtual int OnExit() { return 0; } - - inline void SetPrintMode(int mode) { m_printMode = mode; } - inline int GetPrintMode() const { return m_printMode; } - - inline void SetExitOnFrameDelete(bool flag) { m_exitOnFrameDelete = flag; } - inline bool GetExitOnFrameDelete() const { return m_exitOnFrameDelete; } - - inline wxString GetAppName() const { - if (m_appName != "") - return m_appName; - else return m_className; - } - - inline void SetAppName(const wxString& name) { m_appName = name; }; - inline wxString GetClassName() const { return m_className; } - inline void SetClassName(const wxString& name) { m_className = name; } - - void SetVendorName(const wxString& vendorName) { m_vendorName = vendorName; } - const wxString& GetVendorName() const { return m_vendorName; } - - wxWindow *GetTopWindow() const ; - inline void SetTopWindow(wxWindow *win) { m_topWindow = win; } - - inline void SetWantDebugOutput(bool flag) { m_wantDebugOutput = flag; } - inline bool GetWantDebugOutput() { return m_wantDebugOutput; } - - // Send idle event to all top-level windows. - // Returns TRUE if more idle time is requested. - bool SendIdleEvents(); - - // Send idle event to window and all subwindows - // Returns TRUE if more idle time is requested. - bool SendIdleEvents(wxWindow* win); - - inline void SetAuto3D(bool flag) { m_auto3D = flag; } - inline bool GetAuto3D() const { return m_auto3D; } - - // Creates a log object - virtual wxLog* CreateLogTarget(); - -public: -// void (*work_proc)(wxApp*app); // work procedure; - int argc; - char ** argv; - -protected: - bool m_wantDebugOutput ; - wxString m_className; - wxString m_appName, - m_vendorName; - wxWindow * m_topWindow; - bool m_exitOnFrameDelete; - bool m_showOnInit; - int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT - bool m_auto3D ; // Always use 3D controls, except - // where overriden - static wxAppInitializerFunction m_appInitFn; - -/* Windows-specific wxApp definitions */ - -public: - - // Implementation - static bool Initialize(WXHINSTANCE instance); - static void CommonInit(); - static bool RegisterWindowClasses(); - static void CleanUp(); - static void CommonCleanUp(); - virtual bool DoMessage(); - virtual bool ProcessMessage(WXMSG* pMsg); - void DeletePendingObjects(); - bool ProcessIdle(); - int GetComCtl32Version() const; - -public: - static long sm_lastMessageTime; - int m_nCmdShow; - -protected: - bool m_keepGoing ; -// bool m_resourceCollection; -// bool m_pendingCleanup; // TRUE if we need to check the GDI object lists for cleanup - -DECLARE_EVENT_TABLE() -}; - -#if !defined(_WINDLL) || (defined(_WINDLL) && defined(WXMAKINGDLL)) -int WXDLLEXPORT wxEntry(WXHINSTANCE hInstance, WXHINSTANCE hPrevInstance, char *lpszCmdLine, - int nCmdShow, bool enterLoop = TRUE); -#else -int WXDLLEXPORT wxEntry(WXHINSTANCE hInstance); -#endif - -#endif - // _WX_APP_H_ - diff --git a/include/wx/msw/bitmap.h b/include/wx/msw/bitmap.h deleted file mode 100644 index 200f9705ee..0000000000 --- a/include/wx/msw/bitmap.h +++ /dev/null @@ -1,215 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bitmap.h -// Purpose: wxBitmap class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_BITMAP_H_ -#define _WX_BITMAP_H_ - -#ifdef __GNUG__ -#pragma interface "bitmap.h" -#endif - -#include "wx/gdiobj.h" -#include "wx/gdicmn.h" -#include "wx/palette.h" - -// Bitmap -class WXDLLEXPORT wxDC; -class WXDLLEXPORT wxControl; -class WXDLLEXPORT wxBitmap; -class WXDLLEXPORT wxBitmapHandler; -class WXDLLEXPORT wxIcon; -class WXDLLEXPORT wxCursor; - -// A mask is a mono bitmap used for drawing bitmaps -// transparently. -class WXDLLEXPORT wxMask: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxMask) - -public: - wxMask(void); - - // Construct a mask from a bitmap and a colour indicating - // the transparent area - wxMask(const wxBitmap& bitmap, const wxColour& colour); - - // Construct a mask from a bitmap and a palette index indicating - // the transparent area - wxMask(const wxBitmap& bitmap, int paletteIndex); - - // Construct a mask from a mono bitmap (copies the bitmap). - wxMask(const wxBitmap& bitmap); - - ~wxMask(void); - - bool Create(const wxBitmap& bitmap, const wxColour& colour); - bool Create(const wxBitmap& bitmap, int paletteIndex); - bool Create(const wxBitmap& bitmap); - - // Implementation - inline WXHBITMAP GetMaskBitmap(void) const { return m_maskBitmap; } - inline void SetMaskBitmap(WXHBITMAP bmp) { m_maskBitmap = bmp; } -protected: - WXHBITMAP m_maskBitmap; -}; - -class WXDLLEXPORT wxBitmapRefData: public wxGDIRefData -{ - friend class WXDLLEXPORT wxBitmap; - friend class WXDLLEXPORT wxIcon; - friend class WXDLLEXPORT wxCursor; -public: - wxBitmapRefData(void); - ~wxBitmapRefData(void); - -public: - int m_width; - int m_height; - int m_depth; - bool m_ok; - int m_numColors; - wxPalette m_bitmapPalette; - int m_quality; - -#ifdef __WXMSW__ - WXHBITMAP m_hBitmap; - wxDC * m_selectedInto; // So bitmap knows whether it's been selected into - // a device context (for error checking) - wxMask * m_bitmapMask; // Option mask -#endif -}; - -#define M_BITMAPDATA ((wxBitmapRefData *)m_refData) - -class WXDLLEXPORT wxBitmapHandler: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxBitmapHandler) -public: - wxBitmapHandler(void) { m_name = ""; m_extension = ""; m_type = 0; }; - - virtual bool Create(wxBitmap *bitmap, void *data, long flags, int width, int height, int depth = 1); - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth, int desiredHeight); - virtual bool SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL); - - inline void SetName(const wxString& name) { m_name = name; } - inline void SetExtension(const wxString& ext) { m_extension = ext; } - inline void SetType(long type) { m_type = type; } - inline wxString GetName(void) const { return m_name; } - inline wxString GetExtension(void) const { return m_extension; } - inline long GetType(void) const { return m_type; } -protected: - wxString m_name; - wxString m_extension; - long m_type; -}; -#define M_BITMAPHANDLERDATA ((wxBitmapRefData *)bitmap->GetRefData()) - -class WXDLLEXPORT wxBitmap: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxBitmap) - - friend class WXDLLEXPORT wxBitmapHandler; - -public: - wxBitmap(void); // Platform-specific - - // Copy constructors - inline wxBitmap(const wxBitmap& bitmap) - { Ref(bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); } - inline wxBitmap(const wxBitmap* bitmap) { if (bitmap) Ref(*bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); } - - // Initialize with raw data - wxBitmap(const char bits[], int width, int height, int depth = 1); - -#if USE_XPM_IN_MSW - class wxItem; - // Initialize with XPM data - wxBitmap(const char **data, wxItem *anItem = NULL); -#endif - - // Load a file or resource - wxBitmap(const wxString& name, long type = wxBITMAP_TYPE_BMP_RESOURCE); - - // New constructor for generalised creation from data - wxBitmap(void *data, long type, int width, int height, int depth = 1); - - // If depth is omitted, will create a bitmap compatible with the display - wxBitmap(int width, int height, int depth = -1); - ~wxBitmap(void); - - virtual bool Create(int width, int height, int depth = -1); - virtual bool Create(void *data, long type, int width, int height, int depth = 1); - virtual bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_BMP_RESOURCE); - virtual bool SaveFile(const wxString& name, int type, const wxPalette *cmap = NULL); - - inline bool Ok(void) const { return (M_BITMAPDATA && M_BITMAPDATA->m_ok); } - inline int GetWidth(void) const { return (M_BITMAPDATA ? M_BITMAPDATA->m_width : 0); } - inline int GetHeight(void) const { return (M_BITMAPDATA ? M_BITMAPDATA->m_height : 0); } - inline int GetDepth(void) const { return (M_BITMAPDATA ? M_BITMAPDATA->m_depth : 0); } - inline int GetQuality(void) const { return (M_BITMAPDATA ? M_BITMAPDATA->m_quality : 0); } - void SetWidth(int w); - void SetHeight(int h); - void SetDepth(int d); - void SetQuality(int q); - void SetOk(bool isOk); -#if WXWIN_COMPATIBILITY - inline wxPalette *GetColourMap(void) const { return GetPalette(); } - void SetColourMap(wxPalette *cmap) { SetPalette(*cmap); }; -#endif - inline wxPalette* GetPalette(void) const { return (M_BITMAPDATA ? (& M_BITMAPDATA->m_bitmapPalette) : NULL); } - void SetPalette(const wxPalette& palette); - - inline wxMask *GetMask(void) const { return (M_BITMAPDATA ? M_BITMAPDATA->m_bitmapMask : NULL); } - void SetMask(wxMask *mask) ; - - inline wxBitmap& operator = (const wxBitmap& bitmap) { if (*this == bitmap) return (*this); Ref(bitmap); return *this; } - inline bool operator == (const wxBitmap& bitmap) { return m_refData == bitmap.m_refData; } - inline bool operator != (const wxBitmap& bitmap) { return m_refData != bitmap.m_refData; } - - // Format handling - static inline wxList& GetHandlers(void) { return sm_handlers; } - static void AddHandler(wxBitmapHandler *handler); - static void InsertHandler(wxBitmapHandler *handler); - static bool RemoveHandler(const wxString& name); - static wxBitmapHandler *FindHandler(const wxString& name); - static wxBitmapHandler *FindHandler(const wxString& extension, long bitmapType); - static wxBitmapHandler *FindHandler(long bitmapType); - - static void InitStandardHandlers(void); - static void CleanUpHandlers(void); -protected: - static wxList sm_handlers; - - // Implementation -public: - void SetHBITMAP(WXHBITMAP bmp); - inline WXHBITMAP GetHBITMAP(void) const { return (M_BITMAPDATA ? M_BITMAPDATA->m_hBitmap : 0); } - inline void SetSelectedInto(wxDC *dc) { if (M_BITMAPDATA) M_BITMAPDATA->m_selectedInto = dc; } - inline wxDC *GetSelectedInto(void) const { return (M_BITMAPDATA ? M_BITMAPDATA->m_selectedInto : NULL); } - bool FreeResource(bool force = FALSE); - - // Creates a bitmap that matches the device context's depth, from - // an arbitray bitmap. At present, the original bitmap must have an - // associated palette. (TODO: use a default palette if no palette exists.) - // This function is necessary for you to Blit an arbitrary bitmap (which may have - // the wrong depth). wxDC::SelectObject will compare the depth of the bitmap - // with the DC's depth, and create a new bitmap if the depths differ. - // Eventually we should perhaps make this a public API function so that - // an app can efficiently produce bitmaps of the correct depth. - // The Windows solution is to use SetDibBits to blit an arbotrary DIB directly to a DC, but - // this is too Windows-specific, hence this solution of quietly converting the wxBitmap. - // Contributed by Frederic Villeneuve - wxBitmap GetBitmapForDC(wxDC& dc) const; - -}; -#endif - // _WX_BITMAP_H_ diff --git a/include/wx/msw/blank.cur b/include/wx/msw/blank.cur deleted file mode 100644 index 048f06b4ae..0000000000 Binary files a/include/wx/msw/blank.cur and /dev/null differ diff --git a/include/wx/msw/bmpbuttn.h b/include/wx/msw/bmpbuttn.h deleted file mode 100644 index 956c9128f9..0000000000 --- a/include/wx/msw/bmpbuttn.h +++ /dev/null @@ -1,85 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bmpbuttn.h -// Purpose: wxBitmapButton class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_BMPBUTTN_H_ -#define _WX_BMPBUTTN_H_ - -#ifdef __GNUG__ -#pragma interface "bmpbuttn.h" -#endif - -#include "wx/button.h" - -WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr; - -#define wxDEFAULT_BUTTON_MARGIN 4 - -class WXDLLEXPORT wxBitmapButton: public wxButton -{ - DECLARE_DYNAMIC_CLASS(wxBitmapButton) - public: - inline wxBitmapButton(void) { m_marginX = wxDEFAULT_BUTTON_MARGIN; m_marginY = wxDEFAULT_BUTTON_MARGIN; } - inline wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) - { - Create(parent, id, bitmap, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); - - virtual void SetLabel(const wxBitmap& bitmap) - { - SetBitmapLabel(bitmap); - } - - virtual void SetBitmapLabel(const wxBitmap& bitmap); - -#if WXWIN_COMPATIBILITY - inline wxBitmap *GetBitmap(void) const { return (wxBitmap *) & m_buttonBitmap; } -#endif - - inline wxBitmap& GetBitmapLabel(void) const { return (wxBitmap&) m_buttonBitmap; } - inline wxBitmap& GetBitmapSelected(void) const { return (wxBitmap&) m_buttonBitmapSelected; } - inline wxBitmap& GetBitmapFocus(void) const { return (wxBitmap&) m_buttonBitmapFocus; } - inline wxBitmap& GetBitmapDisabled(void) const { return (wxBitmap&) m_buttonBitmapDisabled; } - - inline void SetBitmapSelected(const wxBitmap& sel) { m_buttonBitmapSelected = sel; }; - inline void SetBitmapFocus(const wxBitmap& focus) { m_buttonBitmapFocus = focus; }; - inline void SetBitmapDisabled(const wxBitmap& disabled) { m_buttonBitmapDisabled = disabled; }; - - inline void SetMargins(int x, int y) { m_marginX = x; m_marginY = y; } - inline int GetMarginX(void) { return m_marginX; } - inline int GetMarginY(void) { return m_marginY; } - - // Implementation - virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item); - virtual void DrawFace( WXHDC dc, int left, int top, int right, int bottom, bool sel ); - virtual void DrawButtonFocus( WXHDC dc, int left, int top, int right, int bottom, bool sel ); - virtual void DrawButtonDisable( WXHDC dc, int left, int top, int right, int bottom, bool with_marg ); - - protected: - wxBitmap m_buttonBitmap; - wxBitmap m_buttonBitmapSelected; - wxBitmap m_buttonBitmapFocus; - wxBitmap m_buttonBitmapDisabled; - int m_marginX; - int m_marginY; -}; - -#endif - // _WX_BMPBUTTN_H_ diff --git a/include/wx/msw/brush.h b/include/wx/msw/brush.h deleted file mode 100644 index e68db683b5..0000000000 --- a/include/wx/msw/brush.h +++ /dev/null @@ -1,81 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: brush.h -// Purpose: wxBrush class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_BRUSH_H_ -#define _WX_BRUSH_H_ - -#ifdef __GNUG__ -#pragma interface "brush.h" -#endif - -#include "wx/gdicmn.h" -#include "wx/gdiobj.h" -#include "wx/bitmap.h" - -class WXDLLEXPORT wxBrush; - -class WXDLLEXPORT wxBrushRefData: public wxGDIRefData -{ - friend class WXDLLEXPORT wxBrush; -public: - wxBrushRefData(void); - wxBrushRefData(const wxBrushRefData& data); - ~wxBrushRefData(void); - -protected: - int m_style; - wxBitmap m_stipple ; - wxColour m_colour; - WXHBRUSH m_hBrush; -}; - -#define M_BRUSHDATA ((wxBrushRefData *)m_refData) - -// Brush -class WXDLLEXPORT wxBrush: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxBrush) - -public: - wxBrush(void); - wxBrush(const wxColour& col, int style); - wxBrush(const wxString& col, int style); - wxBrush(const wxBitmap& stipple); - inline wxBrush(const wxBrush& brush) { Ref(brush); } - inline wxBrush(const wxBrush* brush) { if (brush) Ref(*brush); } - ~wxBrush(void); - - virtual void SetColour(const wxColour& col) ; - virtual void SetColour(const wxString& col) ; - virtual void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ; - virtual void SetStyle(int style) ; - virtual void SetStipple(const wxBitmap& stipple) ; - - inline wxBrush& operator = (const wxBrush& brush) { if (*this == brush) return (*this); Ref(brush); return *this; } - inline bool operator == (const wxBrush& brush) { return m_refData == brush.m_refData; } - inline bool operator != (const wxBrush& brush) { return m_refData != brush.m_refData; } - - inline wxColour& GetColour(void) const { return (M_BRUSHDATA ? M_BRUSHDATA->m_colour : wxNullColour); }; - inline int GetStyle(void) const { return (M_BRUSHDATA ? M_BRUSHDATA->m_style : 0); }; - inline wxBitmap *GetStipple(void) const { return (M_BRUSHDATA ? & M_BRUSHDATA->m_stipple : 0); }; - - virtual bool Ok(void) const { return (m_refData != NULL) ; } - - // Internal - bool RealizeResource(void); - WXHANDLE GetResourceHandle(void) ; - bool FreeResource(bool force = FALSE); - bool IsFree(void); - void Unshare(); -}; - -#endif - // _WX_BRUSH_H_ diff --git a/include/wx/msw/bullseye.cur b/include/wx/msw/bullseye.cur deleted file mode 100644 index 308c07d332..0000000000 Binary files a/include/wx/msw/bullseye.cur and /dev/null differ diff --git a/include/wx/msw/button.h b/include/wx/msw/button.h deleted file mode 100644 index 34e0824d6d..0000000000 --- a/include/wx/msw/button.h +++ /dev/null @@ -1,56 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: button.h -// Purpose: wxButton class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_BUTTON_H_ -#define _WX_BUTTON_H_ - -#ifdef __GNUG__ -#pragma interface "button.h" -#endif - -#include "wx/control.h" -#include "wx/gdicmn.h" - -WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr; - -// Pushbutton -class WXDLLEXPORT wxButton: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxButton) - public: - inline wxButton(void) {} - inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); - - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - virtual void SetDefault(void); - virtual void SetLabel(const wxString& label); - virtual wxString GetLabel(void) const ; - virtual void Command(wxCommandEvent& event); - virtual bool MSWCommand(WXUINT param, WXWORD id); - virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam); -}; - -#endif - // _WX_BUTTON_H_ diff --git a/include/wx/msw/checkbox.h b/include/wx/msw/checkbox.h deleted file mode 100644 index e5ddc460f6..0000000000 --- a/include/wx/msw/checkbox.h +++ /dev/null @@ -1,84 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: checkbox.h -// Purpose: wxCheckBox class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_CHECKBOX_H_ -#define _WX_CHECKBOX_H_ - -#ifdef __GNUG__ -#pragma interface "checkbox.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxCheckBoxNameStr; - -// Checkbox item (single checkbox) -class WXDLLEXPORT wxBitmap; -class WXDLLEXPORT wxCheckBox: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxCheckBox) - - public: - inline wxCheckBox(void) { } - inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); - virtual void SetValue(bool); - virtual bool GetValue(void) const ; - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - virtual bool MSWCommand(WXUINT param, WXWORD id); - virtual void SetLabel(const wxString& label); - virtual void Command(wxCommandEvent& event); - virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam); -}; - -class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox -{ - DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox) - - public: - int checkWidth ; - int checkHeight ; - - inline wxBitmapCheckBox(void) { checkWidth = -1; checkHeight = -1; } - inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); - virtual void SetValue(bool); - virtual bool GetValue(void) const ; - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - virtual void SetLabel(const wxBitmap *bitmap); -}; -#endif - // _WX_CHECKBOX_H_ diff --git a/include/wx/msw/checklst.h b/include/wx/msw/checklst.h deleted file mode 100644 index 163291f121..0000000000 --- a/include/wx/msw/checklst.h +++ /dev/null @@ -1,66 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: checklst.h -// Purpose: wxCheckListBox class - a listbox with checkable items -// Author: Vadim Zeitlin -// Modified by: -// Created: 16.11.97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -#ifndef __CHECKLST__H_ -#define __CHECKLST__H_ - -#ifdef __GNUG__ -#pragma interface "checklst.h" -#endif - -typedef unsigned int size_t; - -#if !USE_OWNER_DRAWN - #error "wxCheckListBox class requires owner-drawn functionality." -#endif - -class wxCheckListBoxItem; // fwd decl, define in checklst.cpp - -class wxCheckListBox : public wxListBox -{ - DECLARE_DYNAMIC_CLASS(wxCheckListBox) -public: - // ctors - wxCheckListBox(); - wxCheckListBox(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int nStrings = 0, - const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); -// const wxFont& font = wxNullFont); - - // items may be checked - bool IsChecked(size_t uiIndex) const; - void Check(size_t uiIndex, bool bCheck = TRUE); - - // accessors - size_t GetItemHeight() const { return m_nItemHeight; } - -protected: - // we create our items ourselves and they have non-standard size, - // so we need to override these functions - virtual wxOwnerDrawn *CreateItem(size_t n); - virtual bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item); - - // pressing space or clicking the check box toggles the item - void OnChar(wxKeyEvent& event); - void OnLeftClick(wxMouseEvent& event); - -private: - size_t m_nItemHeight; // height of checklistbox items (the same for all) - - DECLARE_EVENT_TABLE() -}; - -#endif //_CHECKLST_H diff --git a/include/wx/msw/choice.h b/include/wx/msw/choice.h deleted file mode 100644 index e3fd471b6d..0000000000 --- a/include/wx/msw/choice.h +++ /dev/null @@ -1,80 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: choice.h -// Purpose: wxChoice class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_CHOICE_H_ -#define _WX_CHOICE_H_ - -#ifdef __GNUG__ -#pragma interface "choice.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxChoiceNameStr; - -// Choice item -class WXDLLEXPORT wxChoice: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxChoice) - - public: - inline wxChoice(void) { m_noStrings = 0; } - - inline wxChoice(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr) - { - Create(parent, id, pos, size, n, choices, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr); - - virtual void Append(const wxString& item); - virtual void Delete(int n); - virtual void Clear(void); - virtual int GetSelection(void) const ; - virtual void SetSelection(int n); - virtual int FindString(const wxString& s) const; - virtual wxString GetString(int n) const ; - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - virtual wxString GetStringSelection(void) const ; - virtual bool SetStringSelection(const wxString& sel); - - virtual inline int Number(void) const { return m_noStrings; } - virtual void Command(wxCommandEvent& event); - - virtual bool MSWCommand(WXUINT param, WXWORD id); - - virtual inline void SetColumns(int WXUNUSED(n) = 1 ) { /* No effect */ } ; - virtual inline int GetColumns(void) const { return 1 ; }; - - virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam); - - long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); - -protected: - int m_noStrings; - -}; - -#endif - // _WX_CHOICE_H_ diff --git a/include/wx/msw/clipbrd.h b/include/wx/msw/clipbrd.h deleted file mode 100644 index 6e816fab56..0000000000 --- a/include/wx/msw/clipbrd.h +++ /dev/null @@ -1,111 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: clipbrd.h -// Purpose: Clipboard functionality -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_CLIPBRD_H_ -#define _WX_CLIPBRD_H_ - -#ifdef __GNUG__ -#pragma interface "clipbrd.h" -#endif - -#include "wx/defs.h" -#include "wx/setup.h" - -#if USE_CLIPBOARD - -#include "wx/list.h" - -bool WXDLLEXPORT wxOpenClipboard(void); -bool WXDLLEXPORT wxClipboardOpen(void); -bool WXDLLEXPORT wxCloseClipboard(void); -bool WXDLLEXPORT wxEmptyClipboard(void); -bool WXDLLEXPORT wxIsClipboardFormatAvailable(int dataFormat); -bool WXDLLEXPORT wxSetClipboardData(int dataFormat, wxObject *obj, int width = 0, int height = 0); -wxObject* WXDLLEXPORT wxGetClipboardData(int dataFormat, long *len = NULL); -int WXDLLEXPORT wxEnumClipboardFormats(int dataFormat); -int WXDLLEXPORT wxRegisterClipboardFormat(char *formatName); -bool WXDLLEXPORT wxGetClipboardFormatName(int dataFormat, char *formatName, int maxCount); - -/* The following is Matthew Flatt's implementation of the MSW - * side of generic clipboard functionality. - */ - -/* A clipboard client holds data belonging to the clipboard. - For plain text, a client is not necessary. */ -class WXDLLEXPORT wxClipboardClient : public wxObject -{ - DECLARE_ABSTRACT_CLASS(wxClipboardClient) - - public: - /* This list should be filled in with strings indicating the formats - this client can provide. Almost all clients will provide "TEXT". - Format names should be 4 characters long, so things will work - out on the Macintosh */ - wxStringList formats; - - /* This method is called when the client is losing the selection. */ - virtual void BeingReplaced(void) = 0; - - /* This method is called when someone wants the data this client is - supplying to the clipboard. "format" is a string indicating the - format of the data - one of the strings from the "formats" - list. "*size" should be filled with the size of the resulting - data. In the case of text, "*size" does not count the - NULL terminator. */ - virtual char *GetData(char *format, long *size) = 0; -}; - -/* ONE instance of this class: */ -class WXDLLEXPORT wxClipboard : public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxClipboard) - - public: - wxClipboardClient *clipOwner; - char *cbString, *sentString, *receivedString; - void *receivedTargets; - long receivedLength; -#ifdef __XVIEW__ - long sel_owner; -#endif - - wxClipboard(); - ~wxClipboard(); - - /* Set the clipboard data owner. "time" comes from the event record. */ - void SetClipboardClient(wxClipboardClient *, long time); - - /* Set the clipboard string; does not require a client. */ - void SetClipboardString(char *, long time); - - /* Get data from the clipboard in the format "TEXT". */ - char *GetClipboardString(long time); - - /* Get data from the clipboard */ - char *GetClipboardData(char *format, long *length, long time); - - /* Get the clipboard client directly. Will be NULL if clipboard data - is a string, or if some other application owns the clipboard. - This can be useful for shortcutting data translation, if the - clipboard user can check for a specific client. (This is used - by the wxMediaEdit class.) */ - wxClipboardClient *GetClipboardClient(void); -}; - -/* Initialize wxTheClipboard. Can be called repeatedly */ -void WXDLLEXPORT wxInitClipboard(void); - -/* The clipboard */ -WXDLLEXPORT_DATA(extern wxClipboard*) wxTheClipboard; - -#endif // USE_CLIPBOARD -#endif - // _WX_CLIPBRD_H_ diff --git a/include/wx/msw/clock.cur b/include/wx/msw/clock.cur deleted file mode 100644 index 6693b04d6b..0000000000 Binary files a/include/wx/msw/clock.cur and /dev/null differ diff --git a/include/wx/msw/colordlg.h b/include/wx/msw/colordlg.h deleted file mode 100644 index 5643ef6f2f..0000000000 --- a/include/wx/msw/colordlg.h +++ /dev/null @@ -1,45 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: colordlg.h -// Purpose: wxColourDialog class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_COLORDLG_H_ -#define _WX_COLORDLG_H_ - -#ifdef __GNUG__ -#pragma interface "colordlg.h" -#endif - -#include "wx/setup.h" -#include "wx/dialog.h" -#include "wx/cmndata.h" - -/* - * COLOUR DIALOG - */ - -class WXDLLEXPORT wxColourDialog: public wxDialog -{ -DECLARE_DYNAMIC_CLASS(wxColourDialog) -public: - wxColourDialog(void); - wxColourDialog(wxWindow *parent, wxColourData *data = NULL); - - bool Create(wxWindow *parent, wxColourData *data = NULL); - - int ShowModal(void); - wxColourData& GetColourData(void) { return m_colourData; } - -protected: - wxColourData m_colourData; - wxWindow* m_dialogParent; -}; - -#endif - // _WX_COLORDLG_H_ diff --git a/include/wx/msw/colour.h b/include/wx/msw/colour.h deleted file mode 100644 index 9e001f03e7..0000000000 --- a/include/wx/msw/colour.h +++ /dev/null @@ -1,71 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: colour.h -// Purpose: wxColour class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_COLOUR_H_ -#define _WX_COLOUR_H_ - -#ifdef __GNUG__ -#pragma interface "colour.h" -#endif - -// Colour -class WXDLLEXPORT wxColour: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxColour) -public: - wxColour(void); - wxColour(const unsigned char r, const unsigned char g, const unsigned char b); - wxColour(unsigned long colRGB) { Set(colRGB); } - wxColour(const wxColour& col); - wxColour(const wxString& col); - ~wxColour(void) ; - wxColour& operator =(const wxColour& src) ; - wxColour& operator =(const wxString& src) ; - inline int Ok(void) const { return (m_isInit) ; } - - void Set(unsigned char r, unsigned char g, unsigned char b); - void Set(unsigned long colRGB) - { - // we don't need to know sizeof(long) here because we assume that the three - // least significant bytes contain the R, G and B values - Set((unsigned char)colRGB, - (unsigned char)(colRGB >> 8), - (unsigned char)(colRGB >> 16)); - } - - // Let's remove this inelegant function -#if WXWIN_COMPATIBILITY - void Get(unsigned char *r, unsigned char *g, unsigned char *b) const; -#endif - - inline unsigned char Red(void) const { return m_red; } - inline unsigned char Green(void) const { return m_green; } - inline unsigned char Blue(void) const { return m_blue; } - - inline bool operator == (const wxColour& colour) { return (m_red == colour.m_red && m_green == colour.m_green && m_blue == colour.m_blue); } - - inline bool operator != (const wxColour& colour) { return (!(m_red == colour.m_red && m_green == colour.m_green && m_blue == colour.m_blue)); } - - WXCOLORREF GetPixel(void) const { return m_pixel; }; - - private: - bool m_isInit; - unsigned char m_red; - unsigned char m_blue; - unsigned char m_green; - public: - WXCOLORREF m_pixel ; -}; - -#define wxColor wxColour - -#endif - // _WX_COLOUR_H_ diff --git a/include/wx/msw/combobox.h b/include/wx/msw/combobox.h deleted file mode 100644 index 0739774280..0000000000 --- a/include/wx/msw/combobox.h +++ /dev/null @@ -1,83 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: combobox.h -// Purpose: wxComboBox class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_COMBOBOX_H_ -#define _WX_COMBOBOX_H_ - -#ifdef __GNUG__ -#pragma interface "combobox.h" -#endif - -#include "wx/choice.h" - -#if USE_COMBOBOX - -WXDLLEXPORT_DATA(extern const char*) wxComboBoxNameStr; -WXDLLEXPORT_DATA(extern const char*) wxEmptyString; - -// Combobox item -class WXDLLEXPORT wxComboBox: public wxChoice -{ - DECLARE_DYNAMIC_CLASS(wxComboBox) - - public: - inline wxComboBox(void) {} - - inline wxComboBox(wxWindow *parent, wxWindowID id, - const wxString& value = wxEmptyString, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr) - { - Create(parent, id, value, pos, size, n, choices, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxString& value = wxEmptyString, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); - - // List functions: see wxChoice - - // Text field functions - virtual wxString GetValue(void) const ; - virtual void SetValue(const wxString& value); - - // Clipboard operations - virtual void Copy(void); - virtual void Cut(void); - virtual void Paste(void); - virtual void SetInsertionPoint(long pos); - virtual void SetInsertionPointEnd(void); - virtual long GetInsertionPoint(void) const ; - virtual long GetLastPosition(void) const ; - virtual void Replace(long from, long to, const wxString& value); - virtual void Remove(long from, long to); - virtual void SetSelection(int n) - { - wxChoice::SetSelection(n); - } - virtual void SetSelection(long from, long to); - virtual void SetEditable(bool editable); - - virtual bool MSWCommand(WXUINT param, WXWORD id); -}; - -#endif // USE_COMBOBOX -#endif - // _WX_COMBOBOX_H_ diff --git a/include/wx/msw/control.h b/include/wx/msw/control.h deleted file mode 100644 index 495799bf32..0000000000 --- a/include/wx/msw/control.h +++ /dev/null @@ -1,86 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: control.h -// Purpose: wxControl class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_CONTROL_H_ -#define _WX_CONTROL_H_ - -#ifdef __GNUG__ -#pragma interface "control.h" -#endif - -#include "wx/window.h" -#include "wx/list.h" -#include "wx/validate.h" - -// General item class -class WXDLLEXPORT wxControl: public wxWindow -{ - DECLARE_ABSTRACT_CLASS(wxControl) -public: - wxControl(void); - ~wxControl(void); - - virtual void Command(wxCommandEvent& WXUNUSED(event)) = 0; // Simulates an event - virtual void ProcessCommand(wxCommandEvent& event); // Calls the callback and - // appropriate event handlers - virtual void SetClientSize(int width, int height); - virtual void SetLabel(const wxString& label); - virtual wxString GetLabel(void) const ; - -#if WXWIN_COMPATIBILITY - inline virtual void SetButtonColour(const wxColour& WXUNUSED(col)) { } - inline wxColour*GetButtonColour(void) const { return NULL; } - - inline virtual void SetLabelFont(const wxFont& font); - inline virtual void SetButtonFont(const wxFont& font); - inline wxFont *GetLabelFont(void) const ; - inline wxFont *GetButtonFont(void) const ; -#endif - - // Places item in centre of panel - so can't be used BEFORE panel->Fit() - void Centre(int direction = wxHORIZONTAL); - inline void Callback(const wxFunction function); // Adds callback - - // MSW-specific - - // Window procedure - virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); - virtual void MSWOnMouseMove(int x, int y, WXUINT flags); - virtual bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam); - - void OnEraseBackground(wxEraseEvent& event); - - // For ownerdraw items - virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *WXUNUSED(item)) { return FALSE; }; - virtual bool MSWOnMeasure(WXMEASUREITEMSTRUCT *WXUNUSED(item)) { return FALSE; }; - - inline wxFunction GetCallback(void) { return m_callback; } - inline wxList& GetSubcontrols(void) { return m_subControls; } -protected: - wxFunction m_callback; // Callback associated with the window - - // MSW implementation - wxList m_subControls; // For controls like radiobuttons which are really composite - -DECLARE_EVENT_TABLE() -}; - -inline void wxControl::Callback(const wxFunction function) { m_callback = function; }; // Adds callback - -#if WXWIN_COMPATIBILITY -inline wxFont *wxControl::GetLabelFont(void) const { return GetFont() ; } -inline wxFont *wxControl::GetButtonFont(void) const { return GetFont() ; } -inline void wxControl::SetLabelFont(const wxFont& font) { SetFont(font); } -inline void wxControl::SetButtonFont(const wxFont& font) { SetFont(font); } -#endif - -#endif - // _WX_CONTROL_H_ diff --git a/include/wx/msw/ctl3d/ctl3d.h b/include/wx/msw/ctl3d/ctl3d.h deleted file mode 100644 index de7e67aa50..0000000000 --- a/include/wx/msw/ctl3d/ctl3d.h +++ /dev/null @@ -1,61 +0,0 @@ -/*----------------------------------------------------------------------- -| CTL3D.DLL -| -| Adds 3d effects to Windows controls -| -| See ctl3d.doc for info -| ------------------------------------------------------------------------*/ -#ifdef __cplusplus -extern "C" { -#endif - - -BOOL WINAPI Ctl3dSubclassDlg(HWND, WORD); -BOOL WINAPI Ctl3dSubclassDlgEx(HWND, DWORD); -WORD WINAPI Ctl3dGetVer(void); -BOOL WINAPI Ctl3dEnabled(void); -HBRUSH WINAPI Ctl3dCtlColor(HDC, LONG); // ARCHAIC, use Ctl3dCtlColorEx -HBRUSH WINAPI Ctl3dCtlColorEx(UINT wm, WPARAM wParam, LPARAM lParam); -BOOL WINAPI Ctl3dColorChange(void); -BOOL WINAPI Ctl3dSubclassCtl(HWND); -LONG WINAPI Ctl3dDlgFramePaint(HWND, UINT, WPARAM, LPARAM); - -BOOL WINAPI Ctl3dAutoSubclass(HANDLE); - -BOOL WINAPI Ctl3dRegister(HANDLE); -BOOL WINAPI Ctl3dUnregister(HANDLE); - -//begin DBCS: far east short cut key support -VOID WINAPI Ctl3dWinIniChange(void); -//end DBCS - - -/* Ctl3dSubclassDlg3d flags */ -#define CTL3D_BUTTONS 0x0001 -#define CTL3D_LISTBOXES 0x0002 -#define CTL3D_EDITS 0x0004 -#define CTL3D_COMBOS 0x0008 -#define CTL3D_STATICTEXTS 0x0010 -#define CTL3D_STATICFRAMES 0x0020 - -#define CTL3D_NODLGWINDOW 0x00010000 -#define CTL3D_ALL 0xffff - -#define WM_DLGBORDER (WM_USER+3567) -/* WM_DLGBORDER *(int FAR *)lParam return codes */ -#define CTL3D_NOBORDER 0 -#define CTL3D_BORDER 1 - -#define WM_DLGSUBCLASS (WM_USER+3568) -/* WM_DLGSUBCLASS *(int FAR *)lParam return codes */ -#define CTL3D_NOSUBCLASS 0 -#define CTL3D_SUBCLASS 1 - -/* Resource ID for 3dcheck.bmp (for .lib version of ctl3d) */ -#define CTL3D_3DCHECK 26567 - - -#ifdef __cplusplus -} -#endif diff --git a/include/wx/msw/curico.h b/include/wx/msw/curico.h deleted file mode 100644 index b85a39b194..0000000000 --- a/include/wx/msw/curico.h +++ /dev/null @@ -1,22 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: curico.h -// Purpose: Icon and cursor functions -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -HICON ReadIconFile( char *szFileName, HINSTANCE hInst, - int *W = 0, int *H = 0); -HCURSOR ReadCursorFile( char *szFileName, HINSTANCE hInst, - int *W = 0, int *H = 0, int *XHot = 0, int *YHot = 0); -HCURSOR IconToCursor( char *szFileName, HINSTANCE hInst, int XHot, int YHot, - int *W = 0, int *H = 0); -HICON CursorToIcon( char *szFileName, HINSTANCE hInst, - int *W = 0, int *H = 0); - -HCURSOR MakeCursorFromBitmap(HINSTANCE hInst, HBITMAP hBitmap, POINT *pPoint); -HICON MakeIconFromBitmap(HINSTANCE hInst, HBITMAP hBitmap); diff --git a/include/wx/msw/curicop.h b/include/wx/msw/curicop.h deleted file mode 100644 index 1ec5056e90..0000000000 --- a/include/wx/msw/curicop.h +++ /dev/null @@ -1,63 +0,0 @@ -// PRIVATE STUFF FOLLOWS UNTIL END - -// Header signatures for various resources -#define BFT_ICON 0x4349 /* 'IC' */ -#define BFT_BITMAP 0x4d42 /* 'BM' */ -#define BFT_CURSOR 0x5450 /* 'PT' */ - -// This WIDTHBYTES macro determines the number of BYTES per scan line. -#define WIDTHBYTES( i) ((i + 31) / 32 * 4) -#define IS_WIN30_DIB( lpbi) ((*(LPDWORD)( lpbi)) == sizeof( BITMAPINFOHEADER)) - -WORD DIBNumColors(LPSTR pv); -WORD PaletteSize(LPSTR lpbi); - - -struct tagCURFILEHEADER { WORD wReserved; // Always 0 - WORD wResourceType; // 2 = cursor - WORD wResourceCount; // Number of icons in the file - }; - -typedef struct tagCURFILEHEADER CURFILEHEADER; - -struct tagCURFILERES { - BYTE bWidth; // Width of image - BYTE bHeight; // Height of image - BYTE bColorCount; // Number of colors in image (2, 8, or 16) - BYTE bReserved1; // Reserved - WORD wXHotspot; // x coordinate of hotspot - WORD wYHotspot; // y coordinate of hotspot - DWORD dwDIBSize; // Size of DIB for this image - DWORD dwDIBOffset; // Offset to DIB for this image - }; - -typedef struct tagCURFILERES CURFILERES; - -HANDLE ReadCur( LPSTR szFileName, LPPOINT lpptHotSpot, int *W = 0, int *H = 0); -HBITMAP ColorDDBToMonoDDB( HBITMAP hbm); -HCURSOR MakeCursor( HANDLE hDIB, LPPOINT lpptHotSpot, HINSTANCE hInst); - -struct tagICONFILEHEADER { - WORD wReserved; // Always 0 - WORD wResourceType; // 1 = icon - WORD wResourceCount; // Number of icons in the file - }; - -typedef struct tagICONFILEHEADER ICONFILEHEADER; - -struct tagICONFILERES { - BYTE bWidth; // Width of image - BYTE bHeight; // Height of image - BYTE bColorCount; // Number of colors in image (2, 8, or 16) - BYTE bReserved1; // Reserved - WORD wReserved2; - WORD wReserved3; - DWORD dwDIBSize; // Size of DIB for this image - DWORD dwDIBOffset; // Offset to DIB for this image - }; - -typedef struct tagICONFILERES ICONFILERES; - -HANDLE ReadIcon( char *szFileName, int *W = 0, int *H = 0); -HICON MakeIcon( HANDLE hDIB, HINSTANCE hInst); - diff --git a/include/wx/msw/cursor.h b/include/wx/msw/cursor.h deleted file mode 100644 index f72d922d05..0000000000 --- a/include/wx/msw/cursor.h +++ /dev/null @@ -1,69 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: cursor.h -// Purpose: wxCursor class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_CURSOR_H_ -#define _WX_CURSOR_H_ - -#ifdef __GNUG__ -#pragma interface "cursor.h" -#endif - -#include "wx/bitmap.h" - -class WXDLLEXPORT wxCursorRefData: public wxBitmapRefData -{ - friend class WXDLLEXPORT wxBitmap; - friend class WXDLLEXPORT wxCursor; -public: - wxCursorRefData(void); - ~wxCursorRefData(void); - -protected: - WXHCURSOR m_hCursor; - bool m_destroyCursor; -}; - -#define M_CURSORDATA ((wxCursorRefData *)m_refData) -#define M_CURSORHANDLERDATA ((wxCursorRefData *)bitmap->m_refData) - -// Cursor -class WXDLLEXPORT wxCursor: public wxBitmap -{ - DECLARE_DYNAMIC_CLASS(wxCursor) - -public: - wxCursor(void); - - // Copy constructors - inline wxCursor(const wxCursor& cursor) { Ref(cursor); } - inline wxCursor(const wxCursor* cursor) { /* UnRef(); */ if (cursor) Ref(*cursor); } - - wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1, - const char maskBits[] = NULL); - wxCursor(const wxString& name, long flags = wxBITMAP_TYPE_CUR_RESOURCE, - int hotSpotX = 0, int hotSpotY = 0); - wxCursor(int cursor_type); - ~wxCursor(void); - - virtual bool Ok(void) const { return (m_refData != NULL && M_CURSORDATA->m_hCursor) ; } - - inline wxCursor& operator = (const wxCursor& cursor) { if (*this == cursor) return (*this); Ref(cursor); return *this; } - inline bool operator == (const wxCursor& cursor) { return m_refData == cursor.m_refData; } - inline bool operator != (const wxCursor& cursor) { return m_refData != cursor.m_refData; } - - void SetHCURSOR(WXHCURSOR cursor); - inline WXHCURSOR GetHCURSOR(void) const { return (M_CURSORDATA ? M_CURSORDATA->m_hCursor : 0); } - - bool FreeResource(bool force = FALSE); -}; - -#endif - // _WX_CURSOR_H_ diff --git a/include/wx/msw/dc.h b/include/wx/msw/dc.h deleted file mode 100644 index 94e313b973..0000000000 --- a/include/wx/msw/dc.h +++ /dev/null @@ -1,419 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dc.h -// Purpose: wxDC class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DC_H_ -#define _WX_DC_H_ - -#ifdef __GNUG__ -#pragma interface "dc.h" -#endif - -#include "wx/pen.h" -#include "wx/brush.h" -#include "wx/icon.h" -#include "wx/font.h" -#include "wx/gdicmn.h" - -class WXDLLEXPORT wxDC: public wxObject -{ - DECLARE_ABSTRACT_CLASS(wxDC) - protected: -public: - wxDC(void); - ~wxDC(void); - - inline void wxDC::BeginDrawing(void) {} - inline void wxDC::EndDrawing(void) {} - - virtual void FloodFill(long x1, long y1, const wxColour& col, int style=wxFLOOD_SURFACE) ; - inline void FloodFill(const wxPoint& pt, const wxColour& col, int style=wxFLOOD_SURFACE) - { - FloodFill(pt.x, pt.y, col, style); - } - - virtual bool GetPixel(long x1, long y1, wxColour *col) const ; - inline bool GetPixel(const wxPoint& pt, wxColour *col) const - { - return GetPixel(pt.x, pt.y, col); - } - - virtual void DrawLine(long x1, long y1, long x2, long y2); - inline void DrawLine(const wxPoint& pt1, const wxPoint& pt2) - { - DrawLine(pt1.x, pt1.y, pt2.x, pt2.y); - } - - virtual void CrossHair(long x, long y) ; - inline void CrossHair(const wxPoint& pt) - { - CrossHair(pt.x, pt.y); - } - - virtual void DrawArc(long x1,long y1,long x2,long y2,long xc, long yc); - inline void DrawArc(const wxPoint& pt1, const wxPoint& pt2, const wxPoint& centre) - { - DrawArc(pt1.x, pt1.y, pt2.x, pt2.y, centre.x, centre.y); - } - - virtual void DrawEllipticArc (long x, long y, long w, long h, double sa, double ea); - virtual void DrawEllipticArc (const wxPoint& pt, const wxSize& sz, double sa, double ea) - { - DrawEllipticArc(pt.x, pt.y, sz.x, sz.y, sa, ea); - } - - virtual void DrawPoint(long x, long y); - inline void DrawPoint(const wxPoint& pt) - { - DrawPoint(pt.x, pt.y); - } - - virtual void DrawLines(int n, wxPoint points[], long xoffset = 0, long yoffset = 0); - - virtual void DrawPolygon(int n, wxPoint points[], long xoffset = 0, long yoffset = 0, int fillStyle=wxODDEVEN_RULE); - - virtual void DrawRectangle(long x, long y, long width, long height); - inline void DrawRectangle(const wxPoint& pt, const wxSize& sz) - { - DrawRectangle(pt.x, pt.y, sz.x, sz.y); - } - inline void DrawRectangle(const wxRect& rect) - { - DrawRectangle(rect.x, rect.y, rect.width, rect.height); - } - - virtual void DrawRoundedRectangle(long x, long y, long width, long height, double radius = 20.0); - inline void DrawRoundedRectangle(const wxPoint& pt, const wxSize& sz, double radius = 20.0) - { - DrawRoundedRectangle(pt.x, pt.y, sz.x, sz.y, radius); - } - inline void DrawRoundedRectangle(const wxRect& rect, double radius = 20.0) - { - DrawRoundedRectangle(rect.x, rect.y, rect.width, rect.height, radius); - } - - virtual void DrawEllipse(long x, long y, long width, long height); - inline void DrawEllipse(const wxPoint& pt, const wxSize& sz) - { - DrawEllipse(pt.x, pt.y, sz.x, sz.y); - } - inline void DrawEllipse(const wxRect& rect) - { - DrawEllipse(rect.x, rect.y, rect.width, rect.height); - } - - virtual void DrawIcon(const wxIcon& icon, long x, long y); - inline void DrawIcon(const wxIcon& icon, const wxPoint& pt) - { - DrawIcon(icon, pt.x, pt.y); - } - - inline void DrawPoint(wxPoint& point) { DrawPoint(point.x, point.y); } - virtual void DrawLines(wxList *list, long xoffset = 0, long yoffset = 0); - virtual void DrawPolygon(wxList *list, long xoffset = 0, long yoffset = 0, int fillStyle=wxODDEVEN_RULE); - - virtual void DrawText(const wxString& text, long x, long y, bool use16bit = FALSE); - inline void DrawText(const wxString& text, const wxPoint& pt, bool use16bit = FALSE) - { - DrawText(text, pt.x, pt.y, use16bit); - } - - virtual bool Blit(long xdest, long ydest, long width, long height, - wxDC *source, long xsrc, long ysrc, int rop = wxCOPY, bool useMask = FALSE); - inline bool Blit(const wxPoint& destPt, const wxSize& sz, - wxDC *source, const wxPoint& srcPt, int rop = wxCOPY, bool useMask = FALSE) - { - return Blit(destPt.x, destPt.y, sz.x, sz.y, source, srcPt.x, srcPt.y, rop, useMask); - } - -#if USE_SPLINES - // Splines - // 3-point spline - virtual void DrawSpline(long x1, long y1, long x2, long y2, long x3, long y3); - // Any number of control points - a list of pointers to wxPoints - virtual void DrawSpline(wxList *points); - virtual void DrawSpline(int n, wxPoint points[]); -#endif - virtual void Clear(void); - virtual void SetFont(const wxFont& font); - virtual void SetPen(const wxPen& pen); - virtual void SetBrush(const wxBrush& brush); - virtual void SetLogicalFunction(int function); - virtual void SetBackground(const wxBrush& brush); - virtual void SetBackgroundMode(int mode); - - virtual void SetClippingRegion(long x, long y, long width, long height); - inline void SetClippingRegion(const wxPoint& pt, const wxSize& sz) - { - SetClippingRegion(pt.x, pt.y, sz.x, sz.y); - } - inline void SetClippingRegion(const wxRect& rect) - { - SetClippingRegion(rect.x, rect.y, rect.width, rect.height); - } - - virtual void SetPalette(const wxPalette& palette); -#if WXWIN_COMPATIBILITY - virtual inline void SetColourMap(const wxPalette& palette) { SetPalette(palette); }; -#endif - virtual void DestroyClippingRegion(void); - virtual long GetCharHeight(void) const; - virtual long GetCharWidth(void) const; - virtual void GetTextExtent(const wxString& string, long *x, long *y, - long *descent = NULL, long *externalLeading = NULL, - wxFont *theFont = NULL, bool use16bit = FALSE) const; -#if WXWIN_COMPATIBILITY - void GetTextExtent(const wxString& string, float *x, float *y, - float *descent = NULL, float *externalLeading = NULL, - wxFont *theFont = NULL, bool use16bit = FALSE) const ; -#endif - - // Size in device units - virtual void GetSize(int* width, int* height) const; - inline wxSize GetSize(void) const { int w, h; GetSize(&w, &h); return wxSize(w, h); } - - // Size in mm - virtual void GetSizeMM(long* width, long* height) const ; - - // Compatibility -#if WXWIN_COMPATIBILITY - inline void GetSize(float* width, float* height) const { int w, h; GetSize(& w, & h); *width = w; *height = h; } - inline void GetSizeMM(float *width, float *height) const { long w, h; GetSizeMM(& w, & h); *width = (float) w; *height = (float) h; } -#endif - - virtual bool StartDoc(const wxString& message); - virtual void EndDoc(void); - virtual void StartPage(void); - virtual void EndPage(void); - virtual void SetMapMode(int mode); - virtual void SetUserScale(double x, double y); - virtual void SetSystemScale(double x, double y); - virtual void SetLogicalOrigin(long x, long y); - virtual void SetDeviceOrigin(long x, long y); - virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp); - - // This group of functions does actual conversion - // of the input, as you'd expect. - - long DeviceToLogicalX(long x) const; - long DeviceToLogicalY(long y) const; - long DeviceToLogicalXRel(long x) const; - long DeviceToLogicalYRel(long y) const; - long LogicalToDeviceX(long x) const; - long LogicalToDeviceY(long y) const; - long LogicalToDeviceXRel(long x) const; - long LogicalToDeviceYRel(long y) const; - - // This group of functions may not do any conversion - // if m_scaleGDI is TRUE, since the HDC does the - // conversion automatically. - // m_scaleGDI NOW OBSOLETE - long ImplDeviceToLogicalX(long x) const; - long ImplDeviceToLogicalY(long y) const; - long ImplDeviceToLogicalXRel(long x) const; - long ImplDeviceToLogicalYRel(long y) const; - long ImplLogicalToDeviceX(long x) const; - long ImplLogicalToDeviceY(long y) const; - long ImplLogicalToDeviceXRel(long x) const; - long ImplLogicalToDeviceYRel(long y) const; - - virtual bool CanDrawBitmap(void) const; - virtual bool CanGetTextExtent(void) const; - - virtual void SetTextForeground(const wxColour& colour); - virtual void SetTextBackground(const wxColour& colour); - inline virtual bool Ok(void) const {return m_ok;}; - inline virtual int GetMapMode(void) const {return m_mappingMode;}; - - inline virtual wxBrush *GetBackground(void) const { return (wxBrush*) &m_backgroundBrush ;} - inline virtual wxBrush *GetBrush(void) const { return (wxBrush*) &m_brush ;} - inline virtual wxFont *GetFont(void) const { return (wxFont*) &m_font ;} - inline virtual int GetLogicalFunction(void) const { return m_logicalFunction ;} - inline virtual wxPen *GetPen(void) const { return (wxPen*) &m_pen ;} - inline virtual wxColour&GetTextBackground(void) const { return (wxColour&) m_textBackgroundColour ;} - inline virtual wxColour&GetTextForeground(void) const { return (wxColour&) m_textForegroundColour ;} - - virtual void SetLogicalScale(double x, double y); - virtual inline void GetUserScale(double* x, double *y) const { *x = m_userScaleX; *y = m_userScaleY; } - virtual void CalcBoundingBox(long x, long y); - // Get the final bounding box of the PostScript or Metafile picture. - virtual inline long MinX(void) const { return m_minX; } - virtual inline long MaxX(void) const { return m_maxX; } - virtual inline long MinY(void) const { return m_minY; } - virtual inline long MaxY(void) const { return m_maxY; } - // Sometimes we need to override optimization, e.g. - // if other software is drawing onto our surface and we - // can't be sure of who's done what. - virtual inline void SetOptimization(bool WXUNUSED(opt)) { } - virtual inline bool GetOptimization(void) { return FALSE; } - - virtual void GetClippingBox(long *x,long *y,long *w,long *h) const ; - inline void GetClippingBox(wxRect& rect) const - { - long x, y, w, h; - GetClippingBox(&x, &y, &w, &h); rect.x = x; rect.y = y; rect.width = w; rect.height = h; - } - - // This should probably be made available on other platforms - int wxDC::GetDepth(void) const ; - -// Implementation - virtual void SetRop(WXHDC cdc); - virtual void DoClipping(WXHDC cdc); - virtual void SelectOldObjects(WXHDC dc); - - inline wxWindow *GetWindow(void) const { return m_canvas; } - inline void SetWindow(wxWindow *win) { m_canvas = win; } - inline WXHDC GetHDC(void) const { return m_hDC; } - inline void SetHDC(WXHDC dc, bool bOwnsDC = FALSE) { m_hDC = dc; m_bOwnsDC = bOwnsDC; } - -protected: - bool m_colour; - bool m_ok; - bool m_clipping; - bool m_isInteractive; - - // Coordinate system variables - long m_logicalOriginX; - long m_logicalOriginY; - - long m_deviceOriginX; - long m_deviceOriginY; - - double m_logicalScaleX; - double m_logicalScaleY; - - double m_userScaleX; - double m_userScaleY; - - int m_signX; // Used by SetAxisOrientation() to - int m_signY; // invert the axes - - int m_mappingMode; - - long m_minX; // bounding box - long m_minY; - long m_maxX; - long m_maxY; - - int m_logicalFunction; - int m_backgroundMode; - - wxPen m_pen; - wxBrush m_brush; - wxBrush m_backgroundBrush; - wxColour m_textForegroundColour; - wxColour m_textBackgroundColour; - wxFont m_font; - wxPalette m_palette; - int m_clipX1; - int m_clipY1; - int m_clipX2; - int m_clipY2; -// bool m_dontDelete; - int m_windowExtX; - int m_windowExtY; - double m_systemScaleX; - double m_systemScaleY; - - wxWindow * m_canvas; - wxBitmap m_selectedBitmap; - wxString m_filename; - - // TRUE => DeleteDC() in dtor, FALSE => only ReleaseDC() it - bool m_bOwnsDC; - - WXHDC m_hDC; - int m_hDCCount; - - // Store all old GDI objects when do a SelectObject, - // so we can select them back in (this unselecting user's - // objects) so we can safely delete the DC. - WXHBITMAP m_oldBitmap; - WXHPEN m_oldPen; - WXHBRUSH m_oldBrush; - WXHFONT m_oldFont; - WXHPALETTE m_oldPalette; - - // Stores scaling, translation, rotation -// wxTransformMatrix m_transformMatrix; - - // Do we wish to scale GDI objects too, e.g. pen width? -// bool m_scaleGDI; -}; - -// Logical to device -// Absolute -#define XLOG2DEV(x) ImplLogicalToDeviceX(x) - -#define YLOG2DEV(y) ImplLogicalToDeviceY(y) - -// Relative -#define XLOG2DEVREL(x) ImplLogicalToDeviceXRel(x) -#define YLOG2DEVREL(y) ImplLogicalToDeviceYRel(y) - -// Device to logical -// Absolute -#define XDEV2LOG(x) ImplDeviceToLogicalX(x) - -#define YDEV2LOG(y) ImplDeviceToLogicalY(y) - -// Relative -#define XDEV2LOGREL(x) ImplDeviceToLogicalXRel(x) -#define YDEV2LOGREL(y) ImplDeviceToLogicalYRel(y) - -/* - * Have the same macros as for XView but not for every operation: - * just for calculating window/viewport extent (a better way of scaling). - */ - -// Logical to device -// Absolute -#define MS_XLOG2DEV(x) LogicalToDevice(x) - -#define MS_YLOG2DEV(y) LogicalToDevice(y) - -// Relative -#define MS_XLOG2DEVREL(x) LogicalToDeviceXRel(x) -#define MS_YLOG2DEVREL(y) LogicalToDeviceYRel(y) - -// Device to logical -// Absolute -#define MS_XDEV2LOG(x) DeviceToLogicalX(x) - -#define MS_YDEV2LOG(y) DeviceToLogicalY(y) - -// Relative -#define MS_XDEV2LOGREL(x) DeviceToLogicalXRel(x) -#define MS_YDEV2LOGREL(y) DeviceToLogicalYRel(y) - -#define MM_POINTS 7 -#define MM_METRIC 8 - -extern int wxPageNumber; - -// Conversion -#define METRIC_CONVERSION_CONSTANT 0.0393700787 - -// Scaling factors for various unit conversions -#define mm2inches (METRIC_CONVERSION_CONSTANT) -#define inches2mm (1/METRIC_CONVERSION_CONSTANT) - -#define mm2twips (METRIC_CONVERSION_CONSTANT*1440) -#define twips2mm (1/(METRIC_CONVERSION_CONSTANT*1440)) - -#define mm2pt (METRIC_CONVERSION_CONSTANT*72) -#define pt2mm (1/(METRIC_CONVERSION_CONSTANT*72)) - -#define wx_round(a) (int)((a)+.5) - - -#endif - // _WX_DC_H_ diff --git a/include/wx/msw/dcclient.h b/include/wx/msw/dcclient.h deleted file mode 100644 index 3d3ba31886..0000000000 --- a/include/wx/msw/dcclient.h +++ /dev/null @@ -1,65 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcclient.h -// Purpose: wxClientDC class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DCCLIENT_H_ -#define _WX_DCCLIENT_H_ - -#ifdef __GNUG__ -#pragma interface "dcclient.h" -#endif - -#include "wx/dc.h" - -class WXDLLEXPORT wxClientDC: public wxDC -{ - DECLARE_DYNAMIC_CLASS(wxClientDC) - - public: - wxClientDC(void); - - // Create a DC corresponding to a canvas - wxClientDC(wxWindow *win); - - ~wxClientDC(void); -}; - -class WXDLLEXPORT wxWindowDC: public wxDC -{ - DECLARE_DYNAMIC_CLASS(wxWindowDC) - - public: - wxWindowDC(void); - - // Create a DC corresponding to a canvas - wxWindowDC(wxWindow *win); - - ~wxWindowDC(void); -}; - -class WXDLLEXPORT wxPaintDC: public wxDC -{ - DECLARE_DYNAMIC_CLASS(wxPaintDC) - - public: - wxPaintDC(void); - - // Create a DC corresponding to a canvas - wxPaintDC(wxWindow *win); - - ~wxPaintDC(void); - - protected: - static WXHDC ms_PaintHDC; - static size_t ms_PaintCount; -}; - -#endif - // _WX_DCCLIENT_H_ diff --git a/include/wx/msw/dcmemory.h b/include/wx/msw/dcmemory.h deleted file mode 100644 index f278bc447e..0000000000 --- a/include/wx/msw/dcmemory.h +++ /dev/null @@ -1,35 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcmemory.h -// Purpose: wxMemoryDC class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DCMEMORY_H_ -#define _WX_DCMEMORY_H_ - -#ifdef __GNUG__ -#pragma interface "dcmemory.h" -#endif - -#include "wx/dcclient.h" - -class WXDLLEXPORT wxMemoryDC: public wxDC -{ - DECLARE_DYNAMIC_CLASS(wxMemoryDC) - - public: - wxMemoryDC(void); - wxMemoryDC(wxDC *dc); // Create compatible DC - - ~wxMemoryDC(void); - virtual void SelectObject(const wxBitmap& bitmap); - virtual void GetSize(int* width, int* height) const; -}; - -#endif - // _WX_DCMEMORY_H_ diff --git a/include/wx/msw/dcprint.h b/include/wx/msw/dcprint.h deleted file mode 100644 index 8ad3c3574b..0000000000 --- a/include/wx/msw/dcprint.h +++ /dev/null @@ -1,38 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcprint.h -// Purpose: wxPrinterDC class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DCPRINT_H_ -#define _WX_DCPRINT_H_ - -#ifdef __GNUG__ -#pragma interface "dcprint.h" -#endif - -#include "wx/dc.h" - -class WXDLLEXPORT wxPrinterDC: public wxDC -{ - public: - DECLARE_CLASS(wxPrinterDC) - - // Create a printer DC - wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = TRUE, int orientation = wxPORTRAIT); - wxPrinterDC(WXHDC theDC); - - ~wxPrinterDC(void); -}; - -// Gets an HDC for the default printer configuration -WXHDC WXDLLEXPORT wxGetPrinterDC(int orientation); - -#endif - // _WX_DCPRINT_H_ - diff --git a/include/wx/msw/dcscreen.h b/include/wx/msw/dcscreen.h deleted file mode 100644 index 6a64c9e934..0000000000 --- a/include/wx/msw/dcscreen.h +++ /dev/null @@ -1,39 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcscreen.h -// Purpose: wxScreenDC class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DCSCREEN_H_ -#define _WX_DCSCREEN_H_ - -#ifdef __GNUG__ -#pragma interface "dcscreen.h" -#endif - -#include "wx/dc.h" - -class WXDLLEXPORT wxScreenDC: public wxDC -{ - DECLARE_DYNAMIC_CLASS(wxScreenDC) - - public: - // Create a DC representing the whole screen - wxScreenDC(void); - ~wxScreenDC(void); - - // Compatibility with X's requirements for - // drawing on top of all windows - static bool StartDrawingOnTop(wxWindow* WXUNUSED(window)) { return TRUE; } - static bool StartDrawingOnTop(wxRectangle* WXUNUSED(rect) = NULL) { return TRUE; } - static bool EndDrawingOnTop(void) { return TRUE; } -}; - -#endif - // _WX_DCSCREEN_H_ - diff --git a/include/wx/msw/dde.h b/include/wx/msw/dde.h deleted file mode 100644 index 183c55243c..0000000000 --- a/include/wx/msw/dde.h +++ /dev/null @@ -1,162 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dde.h -// Purpose: DDE class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DDE_H_ -#define _WX_DDE_H_ - -#ifdef __GNUG__ -#pragma interface "dde.h" -#endif - -#include "wx/ipcbase.h" - -/* - * Mini-DDE implementation - - Most transactions involve a topic name and an item name (choose these - as befits your application). - - A client can: - - - ask the server to execute commands (data) associated with a topic - - request data from server by topic and item - - poke data into the server - - ask the server to start an advice loop on topic/item - - ask the server to stop an advice loop - - A server can: - - - respond to execute, request, poke and advice start/stop - - send advise data to client - - Note that this limits the server in the ways it can send data to the - client, i.e. it can't send unsolicited information. - * - */ - -class WXDLLEXPORT wxDDEServer; -class WXDLLEXPORT wxDDEClient; - -class WXDLLEXPORT wxDDEConnection: public wxConnectionBase -{ - DECLARE_DYNAMIC_CLASS(wxDDEConnection) -public: - wxDDEConnection(char *buffer, int size); - wxDDEConnection(void); - ~wxDDEConnection(void); - - // Calls that CLIENT can make - virtual bool Execute(char *data, int size = -1, wxDataFormat format = wxDF_TEXT); - virtual bool Execute(const wxString& str) { return Execute((char *)(const char *)str, -1, wxDF_TEXT); } - virtual char *Request(const wxString& item, int *size = NULL, wxDataFormat format = wxDF_TEXT); - virtual bool Poke(const wxString& item, char *data, int size = -1, wxDataFormat format = wxDF_TEXT); - virtual bool StartAdvise(const wxString& item); - virtual bool StopAdvise(const wxString& item); - - // Calls that SERVER can make - virtual bool Advise(const wxString& item, char *data, int size = -1, wxDataFormat format = wxDF_TEXT); - - // Calls that both can make - virtual bool Disconnect(void); - - // Callbacks to SERVER - override at will - virtual bool OnExecute(const wxString& topic, char *data, int size, wxDataFormat format) { return FALSE; }; - virtual char *OnRequest(const wxString& topic, const wxString& item, int *size, wxDataFormat format) { return NULL; }; - virtual bool OnPoke(const wxString& topic, const wxString& item, char *data, int size, wxDataFormat format) { return FALSE; }; - virtual bool OnStartAdvise(const wxString& topic, const wxString& item) { return FALSE; }; - virtual bool OnStopAdvise(const wxString& topic, const wxString& item) { return FALSE; }; - - // Callbacks to CLIENT - override at will - virtual bool OnAdvise(const wxString& topic, const wxString& item, char *data, int size, wxDataFormat format) { return FALSE; }; - - // Callbacks to BOTH - - // Default behaviour is to delete connection and return TRUE - virtual bool OnDisconnect(void); - - public: - char* m_bufPtr; - wxString m_topicName; - int m_bufSize; - wxDDEServer* m_server; - wxDDEClient* m_client; - - WXHCONV m_hConv; - char* m_sendingData; - int m_dataSize; - wxDataFormat m_dataType; -}; - -class WXDLLEXPORT wxDDEServer: public wxServerBase -{ - DECLARE_DYNAMIC_CLASS(wxDDEServer) - public: - - wxDDEServer(void); - ~wxDDEServer(void); - bool Create(const wxString& server_name); // Returns FALSE if can't create server (e.g. port - // number is already in use) - virtual wxConnectionBase *OnAcceptConnection(const wxString& topic); - - //////////////////////////////////////////////////////////// - // Implementation - - // Find/delete wxDDEConnection corresponding to the HCONV - wxDDEConnection *FindConnection(WXHCONV conv); - bool DeleteConnection(WXHCONV conv); - inline wxString& GetServiceName(void) const { return (wxString&) m_serviceName; } - inline wxList& GetConnections(void) const { return (wxList&) m_connections; } - - protected: - int m_lastError; - wxString m_serviceName; - wxList m_connections; -}; - -class WXDLLEXPORT wxDDEClient: public wxClientBase -{ - DECLARE_DYNAMIC_CLASS(wxDDEClient) - public: - wxDDEClient(void); - ~wxDDEClient(void); - bool ValidHost(const wxString& host); - virtual wxConnectionBase *MakeConnection(const wxString& host, const wxString& server, const wxString& topic); - // Call this to make a connection. - // Returns NULL if cannot. - virtual wxConnectionBase *OnMakeConnection(void); // Tailor this to return own connection. - - //////////////////////////////////////////////////////////// - // Implementation - - // Find/delete wxDDEConnection corresponding to the HCONV - wxDDEConnection *FindConnection(WXHCONV conv); - bool DeleteConnection(WXHCONV conv); - inline wxList& GetConnections(void) const { return (wxList&) m_connections; } - - protected: - int m_lastError; - wxList m_connections; -}; - -void WXDLLEXPORT wxDDEInitialize(); -void WXDLLEXPORT wxDDECleanUp(); - -// Compatibility -#if WXWIN_COMPATIBILITY -#define wxServer wxDDEServer -#define wxClient wxDDEClient -#define wxConnection wxDDEConnection -#define wxIPCInitialize wxDDEInitialize -#define wxIPCCleanUp wxDDECleanUp -#endif - -#endif - // _WX_DDE_H_ diff --git a/include/wx/msw/dialog.h b/include/wx/msw/dialog.h deleted file mode 100644 index d4a19e94e8..0000000000 --- a/include/wx/msw/dialog.h +++ /dev/null @@ -1,121 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dialog.h -// Purpose: wxDialog class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DIALOG_H_ -#define _WX_DIALOG_H_ - -#ifdef __GNUG__ -#pragma interface "dialog.h" -#endif - -#include "wx/panel.h" - -WXDLLEXPORT_DATA(extern const char*) wxDialogNameStr; - -// Dialog boxes -class WXDLLEXPORT wxDialog: public wxPanel -{ - DECLARE_DYNAMIC_CLASS(wxDialog) - protected: - bool m_modalShowing; -public: - - wxDialog(void); - - // Constructor with a modal flag, but no window id - the old convention - inline wxDialog(wxWindow *parent, - const wxString& title, bool modal, - int x = -1, int y= -1, int width = 500, int height = 500, - long style = wxDEFAULT_DIALOG_STYLE, - const wxString& name = wxDialogNameStr) - { - long modalStyle = modal ? wxDIALOG_MODAL : wxDIALOG_MODELESS ; - Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), style|modalStyle, name); - } - - // Constructor with no modal flag - the new convention. - inline wxDialog(wxWindow *parent, wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, - const wxString& name = wxDialogNameStr) - { - Create(parent, id, title, pos, size, style, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxString& title, // bool modal = FALSE, // TODO make this a window style? - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, - const wxString& name = wxDialogNameStr); - - ~wxDialog(void); - - virtual bool Destroy(void); - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - void SetClientSize(int width, int height); - void GetPosition(int *x, int *y) const; - bool Show(bool show); - bool IsShown(void) const ; - void Iconize(bool iconize); - -#if WXWIN_COMPATIBILITY - inline bool Iconized(void) const { return IsIconized(); }; -#endif - - virtual bool IsIconized(void) const; - void Fit(void); - - void SetTitle(const wxString& title); - wxString GetTitle(void) const ; - - bool OnClose(void); - void OnCharHook(wxKeyEvent& event); - void OnPaint(wxPaintEvent& event); - void OnCloseWindow(wxCloseEvent& event); - - void SetModal(bool flag); - - virtual void Centre(int direction = wxBOTH); - virtual bool IsModal(void) const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); } - - // For now, same as Show(TRUE) but returns return code - virtual int ShowModal(void); - virtual void EndModal(int retCode); - - // Standard buttons - void OnOK(wxCommandEvent& event); - void OnApply(wxCommandEvent& event); - void OnCancel(wxCommandEvent& event); - - // Responds to colour changes - void OnSysColourChanged(wxSysColourChangedEvent& event); - - // IMPLEMENTATION - virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); - virtual long MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); - virtual bool MSWProcessMessage(WXMSG* pMsg); -// virtual bool MSWOnEraseBkgnd(WXHDC pDC); - virtual bool MSWOnClose(void); - inline bool IsModalShowing() const { return m_modalShowing ; } - virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam); - -protected: - WXHWND m_hwndOldFocus; // the window which had focus before we were shown - -DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_DIALOG_H_ diff --git a/include/wx/msw/dib.h b/include/wx/msw/dib.h deleted file mode 100644 index 885663d0a8..0000000000 --- a/include/wx/msw/dib.h +++ /dev/null @@ -1,26 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dib.h -// Purpose: Routines for loading and saving DIBs -// Author: Various -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -// Save (device dependent) wxBitmap as a DIB -bool wxSaveBitmap(char *filename, wxBitmap *bitmap, wxColourMap *colourmap = NULL); - -// Load device independent bitmap into device dependent bitmap -wxBitmap *wxLoadBitmap(char *filename, wxColourMap **colourmap = NULL); - -// Load into existing bitmap; -bool wxLoadIntoBitmap(char *filename, wxBitmap *bitmap, wxColourMap **pal = NULL); - -HANDLE BitmapToDIB (HBITMAP hBitmap, HPALETTE hPal); -BOOL ReadDIB(LPSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette); -HANDLE ReadDIB2(LPSTR lpFileName); -LPSTR FindDIBBits (LPSTR lpbi); -HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER lpInfo); - diff --git a/include/wx/msw/dibutils.h b/include/wx/msw/dibutils.h deleted file mode 100644 index 746660d688..0000000000 --- a/include/wx/msw/dibutils.h +++ /dev/null @@ -1,131 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dibutils.h -// Purpose: Utilities for DIBs -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Microsoft, Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -/*************************************************************************** - - (C) Copyright 1994 Microsoft Corp. All rights reserved. - - You have a royalty-free right to use, modify, reproduce and - distribute the Sample Files (and/or any modified version) in - any way you find useful, provided that you agree that - Microsoft has no warranty obligations or liability for any - Sample Application Files which are modified. - - **************************************************************************/ - -/*************************************************************************** - Functions for handling Device Independent Bitmaps and clearing the - System Palette. - **************************************************************************/ - -#ifndef SAMPLES_UTILS_H -#define SAMPLES_UTILS_H - -#ifdef __GNUG__ -#pragma interface "dibutils.h" -#endif - -typedef LPBITMAPINFOHEADER PDIB; -typedef HANDLE HDIB; - -/*************************************************************************** - External function declarations - **************************************************************************/ - -void ClearSystemPalette(void); -PDIB DibOpenFile(LPSTR szFile); -int DibWriteFile(LPSTR szFile, LPBITMAPINFOHEADER lpbi); -BOOL DibSetUsage(PDIB pdib, HPALETTE hpal,UINT wUsage); -PDIB DibCreate(int bits, int dx, int dy); -BOOL DibMapToPalette(PDIB pdib, HPALETTE hpal); -HPALETTE MakePalette(const BITMAPINFO FAR* Info, UINT flags); - -/**************************************************************************** - Internal function declarations - ***************************************************************************/ - -PDIB DibReadBitmapInfo(HFILE fh); - -/**************************************************************************** - DIB macros. - ***************************************************************************/ - -#ifdef WIN32 - #define HandleFromDib(lpbi) GlobalHandle(lpbi) -#else - #define HandleFromDib(lpbi) (HANDLE)GlobalHandle(SELECTOROF(lpbi)) -#endif - -#define DibFromHandle(h) (PDIB)GlobalLock(h) - -#define DibFree(pdib) GlobalFreePtr(pdib) - -#define WIDTHBYTES(i) ((unsigned)((i+31)&(~31))/8) /* ULONG aligned ! */ - -#define DibWidth(lpbi) (UINT)(((LPBITMAPINFOHEADER)(lpbi))->biWidth) -#define DibHeight(lpbi) (UINT)(((LPBITMAPINFOHEADER)(lpbi))->biHeight) -#define DibBitCount(lpbi) (UINT)(((LPBITMAPINFOHEADER)(lpbi))->biBitCount) -#define DibCompression(lpbi) (DWORD)(((LPBITMAPINFOHEADER)(lpbi))->biCompression) - -#define DibWidthBytesN(lpbi, n) (UINT)WIDTHBYTES((UINT)(lpbi)->biWidth * (UINT)(n)) -#define DibWidthBytes(lpbi) DibWidthBytesN(lpbi, (lpbi)->biBitCount) - -#define DibSizeImage(lpbi) ((lpbi)->biSizeImage == 0 \ - ? ((DWORD)(UINT)DibWidthBytes(lpbi) * (DWORD)(UINT)(lpbi)->biHeight) \ - : (lpbi)->biSizeImage) - -#define DibSize(lpbi) ((lpbi)->biSize + (lpbi)->biSizeImage + (int)(lpbi)->biClrUsed * sizeof(RGBQUAD)) -#define DibPaletteSize(lpbi) (DibNumColors(lpbi) * sizeof(RGBQUAD)) - -#define DibFlipY(lpbi, y) ((int)(lpbi)->biHeight-1-(y)) - -//HACK for NT BI_BITFIELDS DIBs -#ifdef WIN32 - #define DibPtr(lpbi) ((lpbi)->biCompression == BI_BITFIELDS \ - ? (LPVOID)(DibColors(lpbi) + 3) \ - : (LPVOID)(DibColors(lpbi) + (UINT)(lpbi)->biClrUsed)) -#else - #define DibPtr(lpbi) (LPVOID)(DibColors(lpbi) + (UINT)(lpbi)->biClrUsed) -#endif - -#define DibColors(lpbi) ((RGBQUAD FAR *)((LPBYTE)(lpbi) + (int)(lpbi)->biSize)) - -#define DibNumColors(lpbi) ((lpbi)->biClrUsed == 0 && (lpbi)->biBitCount <= 8 \ - ? (int)(1 << (int)(lpbi)->biBitCount) \ - : (int)(lpbi)->biClrUsed) - -#define DibXYN(lpbi,pb,x,y,n) (LPVOID)( \ - (BYTE _huge *)(pb) + \ - (UINT)((UINT)(x) * (UINT)(n) / 8u) + \ - ((DWORD)DibWidthBytesN(lpbi,n) * (DWORD)(UINT)(y))) - -#define DibXY(lpbi,x,y) DibXYN(lpbi,DibPtr(lpbi),x,y,(lpbi)->biBitCount) - -#define FixBitmapInfo(lpbi) if ((lpbi)->biSizeImage == 0) \ - (lpbi)->biSizeImage = DibSizeImage(lpbi); \ - if ((lpbi)->biClrUsed == 0) \ - (lpbi)->biClrUsed = DibNumColors(lpbi); \ - if ((lpbi)->biCompression == BI_BITFIELDS && (lpbi)->biClrUsed == 0) \ - ; // (lpbi)->biClrUsed = 3; - -#define DibInfo(pDIB) ((BITMAPINFO FAR *)(pDIB)) - -/***************************************************************************/ - -#ifndef BI_BITFIELDS - #define BI_BITFIELDS 3 -#endif - -#ifndef HALFTONE - #define HALFTONE COLORONCOLOR -#endif - -#endif diff --git a/include/wx/msw/dirdlg.h b/include/wx/msw/dirdlg.h deleted file mode 100644 index 7f3a8dd5f9..0000000000 --- a/include/wx/msw/dirdlg.h +++ /dev/null @@ -1,47 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dirdlg.h -// Purpose: wxDirDialog class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DIRDLG_H_ -#define _WX_DIRDLG_H_ - -#ifdef __GNUG__ -#pragma interface "dirdlg.h" -#endif - -#include "wx/dialog.h" - -class WXDLLEXPORT wxDirDialog: public wxDialog -{ -DECLARE_DYNAMIC_CLASS(wxDirDialog) -public: - wxDirDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, - const wxString& defaultPath = "", - long style = 0, const wxPoint& pos = wxDefaultPosition); - - inline void SetMessage(const wxString& message) { m_message = message; } - inline void SetPath(const wxString& path) { m_path = path; } - inline void SetStyle(long style) { m_dialogStyle = style; } - - inline wxString GetMessage(void) const { return m_message; } - inline wxString GetPath(void) const { return m_path; } - inline long GetStyle(void) const { return m_dialogStyle; } - - int ShowModal(void); - -protected: - wxString m_message; - long m_dialogStyle; - wxWindow * m_parent; - wxString m_path; -}; - -#endif - // _WX_DIRDLG_H_ diff --git a/include/wx/msw/disable.bmp b/include/wx/msw/disable.bmp deleted file mode 100644 index 8859e1b9ae..0000000000 Binary files a/include/wx/msw/disable.bmp and /dev/null differ diff --git a/include/wx/msw/filedlg.h b/include/wx/msw/filedlg.h deleted file mode 100644 index 356dc8ea03..0000000000 --- a/include/wx/msw/filedlg.h +++ /dev/null @@ -1,89 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: filedlg.h -// Purpose: wxFileDialog class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_FILEDLG_H_ -#define _WX_FILEDLG_H_ - -#ifdef __GNUG__ -#pragma interface "filedlg.h" -#endif - -#include "wx/dialog.h" - -/* - * File selector - */ - -WXDLLEXPORT_DATA(extern const char*) wxFileSelectorPromptStr; -WXDLLEXPORT_DATA(extern const char*) wxFileSelectorDefaultWildcardStr; - -class WXDLLEXPORT wxFileDialog: public wxDialog -{ -DECLARE_DYNAMIC_CLASS(wxFileDialog) -protected: - wxString m_message; - long m_dialogStyle; - wxWindow * m_parent; - wxString m_dir; - wxString m_path; // Full path - wxString m_fileName; - wxString m_wildCard; - int m_filterIndex; -public: - wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, - const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildCard = wxFileSelectorDefaultWildcardStr, - long style = 0, const wxPoint& pos = wxDefaultPosition); - - inline void SetMessage(const wxString& message) { m_message = message; } - inline void SetPath(const wxString& path) { m_path = path; } - inline void SetDirectory(const wxString& dir) { m_dir = dir; } - inline void SetFilename(const wxString& name) { m_fileName = name; } - inline void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; } - inline void SetStyle(long style) { m_dialogStyle = style; } - inline void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; } - - inline wxString GetMessage(void) const { return m_message; } - inline wxString GetPath(void) const { return m_path; } - inline wxString GetDirectory(void) const { return m_dir; } - inline wxString GetFilename(void) const { return m_fileName; } - inline wxString GetWildcard(void) const { return m_wildCard; } - inline long GetStyle(void) const { return m_dialogStyle; } - inline int GetFilterIndex(void) const { return m_filterIndex ; } - - int ShowModal(void); -}; - -#define wxOPEN 0x0001 -#define wxSAVE 0x0002 -#define wxOVERWRITE_PROMPT 0x0004 -#define wxHIDE_READONLY 0x0008 -#define wxFILE_MUST_EXIST 0x0010 - -// File selector - backward compatibility -char* WXDLLEXPORT wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL, - const char *default_filename = NULL, const char *default_extension = NULL, - const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0, - wxWindow *parent = NULL, int x = -1, int y = -1); - -// An extended version of wxFileSelector -char* WXDLLEXPORT wxFileSelectorEx(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL, - const char *default_filename = NULL, int *indexDefaultExtension = NULL, - const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0, - wxWindow *parent = NULL, int x = -1, int y = -1); - -// Generic file load dialog -char* WXDLLEXPORT wxLoadFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL); - -// Generic file save dialog -char* WXDLLEXPORT wxSaveFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL); - -#endif - // _WX_FILEDLG_H_ diff --git a/include/wx/msw/font.h b/include/wx/msw/font.h deleted file mode 100644 index 83079df94d..0000000000 --- a/include/wx/msw/font.h +++ /dev/null @@ -1,102 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: font.h -// Purpose: wxFont class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_FONT_H_ -#define _WX_FONT_H_ - -#ifdef __GNUG__ -#pragma interface "font.h" -#endif - -#include "wx/gdiobj.h" - -class WXDLLEXPORT wxFont; - -class WXDLLEXPORT wxFontRefData: public wxGDIRefData -{ - friend class WXDLLEXPORT wxFont; -public: - wxFontRefData(void); - wxFontRefData(const wxFontRefData& data); - ~wxFontRefData(void); -protected: - bool m_temporary; // If TRUE, the pointer to the actual font - // is temporary and SHOULD NOT BE DELETED by - // destructor - int m_pointSize; - int m_family; - int m_fontId; - int m_style; - int m_weight; - bool m_underlined; - wxString m_faceName; - WXHFONT m_hFont; - -}; - -#define M_FONTDATA ((wxFontRefData *)m_refData) - -WXDLLEXPORT_DATA(extern const char*) wxEmptyString; - -// Font -class WXDLLEXPORT wxFont: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxFont) -public: - wxFont(void); - wxFont(int PointSize, int Family, int Style, int Weight, bool underlined = FALSE, const wxString& Face = wxEmptyString); - inline wxFont(const wxFont& font) { Ref(font); } - inline wxFont(const wxFont* font) { if (font) Ref(*font); } - - ~wxFont(void); - - bool Create(int PointSize, int Family, int Style, int Weight, bool underlined = FALSE, const wxString& Face = wxEmptyString); - - // Internal - virtual bool RealizeResource(void); - virtual WXHANDLE GetResourceHandle(void) ; - virtual bool FreeResource(bool force = FALSE); -/* - virtual bool UseResource(void); - virtual bool ReleaseResource(void); -*/ - - virtual bool IsFree(void); - virtual bool Ok(void) const { return (m_refData != NULL) ; } - - inline int GetPointSize(void) const { return M_FONTDATA->m_pointSize; } - inline int GetFamily(void) const { return M_FONTDATA->m_family; } - inline int GetFontId(void) const { return M_FONTDATA->m_fontId; } /* New font system */ - inline int GetStyle(void) const { return M_FONTDATA->m_style; } - inline int GetWeight(void) const { return M_FONTDATA->m_weight; } - wxString GetFamilyString(void) const ; - wxString GetFaceName(void) const ; - wxString GetStyleString(void) const ; - wxString GetWeightString(void) const ; - inline bool GetUnderlined(void) const { return M_FONTDATA->m_underlined; } - - void SetPointSize(int pointSize); - void SetFamily(int family); - void SetStyle(int style); - void SetWeight(int weight); - void SetFaceName(const wxString& faceName); - void SetUnderlined(bool underlined); - - inline wxFont& operator = (const wxFont& font) { if (*this == font) return (*this); Ref(font); return *this; } - inline bool operator == (const wxFont& font) { return m_refData == font.m_refData; } - inline bool operator != (const wxFont& font) { return m_refData != font.m_refData; } - -protected: - void Unshare(); -}; - -#endif - // _WX_FONT_H_ diff --git a/include/wx/msw/fontdlg.h b/include/wx/msw/fontdlg.h deleted file mode 100644 index 43d5d315be..0000000000 --- a/include/wx/msw/fontdlg.h +++ /dev/null @@ -1,46 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: fontdlg.h -// Purpose: wxFontDialog class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_FONTDLG_H_ -#define _WX_FONTDLG_H_ - -#ifdef __GNUG__ -#pragma interface "fontdlg.h" -#endif - -#include "wx/dialog.h" -#include "wx/cmndata.h" - -/* - * FONT DIALOG - */ - -class WXDLLEXPORT wxFontDialog: public wxDialog -{ -DECLARE_DYNAMIC_CLASS(wxFontDialog) - -public: - wxFontDialog(void); - wxFontDialog(wxWindow *parent, wxFontData *data = NULL); - - bool Create(wxWindow *parent, wxFontData *data = NULL); - - int ShowModal(void); - wxFontData& GetFontData(void) { return m_fontData; } - -protected: - wxWindow *m_dialogParent; - wxFontData m_fontData; -}; - -#endif - // _WX_FONTDLG_H_ - diff --git a/include/wx/msw/frame.h b/include/wx/msw/frame.h deleted file mode 100644 index 8735c243b8..0000000000 --- a/include/wx/msw/frame.h +++ /dev/null @@ -1,172 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: frame.h -// Purpose: wxFrame class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_FRAME_H_ -#define _WX_FRAME_H_ - -#ifdef __GNUG__ -#pragma interface "frame.h" -#endif - -#include "wx/window.h" -#include "wx/toolbar.h" -#include "wx/msw/accel.h" - -WXDLLEXPORT_DATA(extern const char*) wxFrameNameStr; -WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr; - -class WXDLLEXPORT wxMenuBar; -class WXDLLEXPORT wxStatusBar; - -class WXDLLEXPORT wxFrame: public wxWindow { - - DECLARE_DYNAMIC_CLASS(wxFrame) - -public: - wxFrame(void); - inline wxFrame(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) - { - Create(parent, id, title, pos, size, style, name); - } - - ~wxFrame(void); - - bool Create(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); - - virtual bool Destroy(void); - void SetClientSize(int width, int height); - void GetClientSize(int *width, int *height) const; - - void GetSize(int *width, int *height) const ; - void GetPosition(int *x, int *y) const ; - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - - virtual bool OnClose(void); - - void OnSize(wxSizeEvent& event); - void OnMenuHighlight(wxMenuEvent& event); - void OnActivate(wxActivateEvent& event); - void OnIdle(wxIdleEvent& event); - void OnCloseWindow(wxCloseEvent& event); - - bool Show(bool show); - - // Set menu bar - void SetMenuBar(wxMenuBar *menu_bar); - virtual wxMenuBar *GetMenuBar(void) const ; - - // Set title - void SetTitle(const wxString& title); - wxString GetTitle(void) const ; - - void Centre(int direction = wxBOTH); - - // Call this to simulate a menu command - virtual void Command(int id); - virtual void ProcessCommand(int id); - - // Set icon - virtual void SetIcon(const wxIcon& icon); - - // Create status line - virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0, - const wxString& name = "statusBar"); - inline wxStatusBar *GetStatusBar() const { return m_frameStatusBar; } - virtual void PositionStatusBar(void); - virtual wxStatusBar *OnCreateStatusBar(int number, long style, wxWindowID id, - const wxString& name); - - // Create toolbar - virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1, const wxString& name = wxToolBarNameStr); - virtual wxToolBar *OnCreateToolBar(long style, wxWindowID id, const wxString& name); - // If made known to the frame, the frame will manage it automatically. - virtual inline void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; } - virtual inline wxToolBar *GetToolBar(void) const { return m_frameToolBar; } - virtual void PositionToolBar(void); - - // Set status line text - virtual void SetStatusText(const wxString& text, int number = 0); - - // Set status line widths - virtual void SetStatusWidths(int n, const int widths_field[]); - - // Hint to tell framework which status bar to use - // TODO: should this go into a wxFrameworkSettings class perhaps? - static void UseNativeStatusBar(bool useNative) { m_useNativeStatusBar = useNative; }; - static bool UsesNativeStatusBar(void) { return m_useNativeStatusBar; }; - - // Fit frame around subwindows - virtual void Fit(void); - - // Iconize - virtual void Iconize(bool iconize); - - virtual bool IsIconized(void) const ; - - // Compatibility - inline bool Iconized(void) const { return IsIconized(); } - - virtual void Maximize(bool maximize); -// virtual bool LoadAccelerators(const wxString& table); - - // Responds to colour changes - void OnSysColourChanged(wxSysColourChangedEvent& event); - - // Query app for menu item updates (called from OnIdle) - void DoMenuUpdates(void); - void DoMenuUpdates(wxMenu* menu); - - WXHMENU GetWinMenu(void) const ; - - // Checks if there is a toolbar, and returns the first free client position - virtual wxPoint GetClientAreaOrigin() const; - - // Handlers - bool MSWOnPaint(void); - WXHICON MSWOnQueryDragIcon(void); - void MSWOnSize(int x, int y, WXUINT flag); - bool MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control); - bool MSWOnClose(void); - void MSWOnMenuHighlight(WXWORD item, WXWORD flags, WXHMENU sysmenu); - bool MSWProcessMessage(WXMSG *msg); - bool MSWTranslateMessage(WXMSG *msg); - void MSWCreate(int id, wxWindow *parent, const char *WXUNUSED(wclass), wxWindow *wx_win, const char *title, - int x, int y, int width, int height, long style); - -protected: - // propagate our state change to all child frames - void IconizeChildFrames(bool bIconize); - - wxMenuBar * m_frameMenuBar; - wxStatusBar * m_frameStatusBar; - wxIcon m_icon; - bool m_iconized; - WXHICON m_defaultIcon; - static bool m_useNativeStatusBar; - wxToolBar * m_frameToolBar ; - - DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_FRAME_H_ diff --git a/include/wx/msw/gauge.h b/include/wx/msw/gauge.h deleted file mode 100644 index 0751cada22..0000000000 --- a/include/wx/msw/gauge.h +++ /dev/null @@ -1,30 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gauge.h -// Purpose: wxGauge header, includes gauge class headers as appropriate -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_GAUGE_H_ -#define _WX_GAUGE_H_ - -#ifdef __GNUG__ -#pragma interface "gauge.h" -#endif - -#ifdef __WIN95__ -#include "wx/msw/gauge95.h" -#define wxGauge wxGauge95 -#define classwxGauge classwxGauge95 -#else -#include "wx/msw/gaugemsw.h" -#define wxGauge wxGaugeMSW -#define classwxGauge classwxGaugeMSW -#endif - -#endif - // _WX_GAUGE_H_ diff --git a/include/wx/msw/gauge95.h b/include/wx/msw/gauge95.h deleted file mode 100644 index 362a758654..0000000000 --- a/include/wx/msw/gauge95.h +++ /dev/null @@ -1,77 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gauge95.h -// Purpose: wxGauge95 class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _GAUGE95_H_ -#define _GAUGE95_H_ - -#ifdef __GNUG__ -#pragma interface "gauge95.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr; - -// Group box -class WXDLLEXPORT wxGauge95: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxGauge95) - public: - inline wxGauge95(void) { m_rangeMax = 0; m_gaugePos = 0; } - - inline wxGauge95(wxWindow *parent, wxWindowID id, - int range, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxGA_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr) - { - Create(parent, id, range, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - int range, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxGA_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr); - - void SetShadowWidth(int w); - void SetBezelFace(int w); - void SetRange(int r); - void SetValue(int pos); - - int GetShadowWidth(void) const ; - int GetBezelFace(void) const ; - int GetRange(void) const ; - int GetValue(void) const ; - - void SetForegroundColour(const wxColour& col); - void SetBackgroundColour(const wxColour& col); - - // Backward compatibility -#if WXWIN_COMPATIBILITY - inline void SetButtonColour(const wxColour& col) { SetForegroundColour(col); } -#endif - - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - - virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ; - - protected: - int m_rangeMax; - int m_gaugePos; -}; - -#endif - // _GAUGEMSW_H_ diff --git a/include/wx/msw/gaugemsw.h b/include/wx/msw/gaugemsw.h deleted file mode 100644 index c3c5954ff4..0000000000 --- a/include/wx/msw/gaugemsw.h +++ /dev/null @@ -1,77 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gaugemsw.h -// Purpose: wxGauge class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _GAUGEMSW_H_ -#define _GAUGEMSW_H_ - -#ifdef __GNUG__ -#pragma interface "gaugemsw.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr; - -// Group box -class WXDLLEXPORT wxGaugeMSW: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxGaugeMSW) - public: - inline wxGaugeMSW(void) { m_rangeMax = 0; m_gaugePos = 0; } - - inline wxGaugeMSW(wxWindow *parent, wxWindowID id, - int range, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxGA_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr) - { - Create(parent, id, range, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - int range, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxGA_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr); - - void SetShadowWidth(int w); - void SetBezelFace(int w); - void SetRange(int r); - void SetValue(int pos); - - int GetShadowWidth(void) const ; - int GetBezelFace(void) const ; - int GetRange(void) const ; - int GetValue(void) const ; - - void SetForegroundColour(const wxColour& col); - void SetBackgroundColour(const wxColour& col); - - // Backward compatibility -#if WXWIN_COMPATIBILITY - inline void SetButtonColour(const wxColour& col) { SetForegroundColour(col); } -#endif - - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - - virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ; - - protected: - int m_rangeMax; - int m_gaugePos; -}; - -#endif - // _GAUGEMSW_H_ diff --git a/include/wx/msw/gdiobj.h b/include/wx/msw/gdiobj.h deleted file mode 100644 index 1950d12ffe..0000000000 --- a/include/wx/msw/gdiobj.h +++ /dev/null @@ -1,67 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gdiobj.h -// Purpose: wxGDIObject class: base class for other GDI classes -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_GDIOBJ_H_ -#define _WX_GDIOBJ_H_ - -#include "wx/object.h" - -#ifdef __GNUG__ -#pragma interface "gdiobj.h" -#endif - -// wxGDIRefData is the reference-counted data part of a GDI object. -// It contains another counter, m_usageCount, which counts the number -// of times this object has been used; e.g. in SetFont, the count -// is incremented. This is different from reference counting, -// where only the constructors, destructors and (un)clone operations -// affect the reference count. -// THIS IS NOW BEING REMOVED AS REDUNDANT AND ERROR-PRONE - -class WXDLLEXPORT wxGDIRefData: public wxObjectRefData { -public: - inline wxGDIRefData(void) - { - } -}; - -#define M_GDIDATA ((wxGDIRefData *)m_refData) - -class WXDLLEXPORT wxGDIObject: public wxObject -{ -DECLARE_DYNAMIC_CLASS(wxGDIObject) - public: - inline wxGDIObject(void) { m_visible = FALSE; }; - inline ~wxGDIObject(void) {}; - - // Creates the resource - virtual bool RealizeResource(void) { return FALSE; }; - - // Frees the resource - virtual bool FreeResource(bool WXUNUSED(force) = FALSE) { return FALSE; }; - - virtual bool IsFree(void) { return FALSE; }; - - inline bool IsNull(void) const { return (m_refData == 0); } - - // Returns handle. - virtual WXHANDLE GetResourceHandle(void) { return 0; } - - virtual bool GetVisible(void) { return m_visible; } - virtual void SetVisible(bool v) { m_visible = v; } - -protected: - bool m_visible; // Can a pointer to this object be safely taken? - // - only if created within FindOrCreate... -}; - -#endif - // _WX_GDIOBJ_H_ diff --git a/include/wx/msw/hand.cur b/include/wx/msw/hand.cur deleted file mode 100644 index ce349aa332..0000000000 Binary files a/include/wx/msw/hand.cur and /dev/null differ diff --git a/include/wx/msw/heart.cur b/include/wx/msw/heart.cur deleted file mode 100644 index 53811dcc55..0000000000 Binary files a/include/wx/msw/heart.cur and /dev/null differ diff --git a/include/wx/msw/helpwin.h b/include/wx/msw/helpwin.h deleted file mode 100644 index 786155231f..0000000000 --- a/include/wx/msw/helpwin.h +++ /dev/null @@ -1,54 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: helpwin.h -// Purpose: Help system: WinHelp implementation -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_HELPWIN_H_ -#define _WX_HELPWIN_H_ - -#ifdef __GNUG__ -#pragma interface "helpwin.h" -#endif - -#include "wx/wx.h" - -#if USE_HELP - -#include "wx/helpbase.h" - -class WXDLLEXPORT wxWinHelpController: public wxHelpControllerBase -{ - DECLARE_CLASS(wxWinHelpController) - - public: - wxWinHelpController(void); - ~wxWinHelpController(void); - - // Must call this to set the filename and server name - virtual bool Initialize(const wxString& file); - - // If file is "", reloads file given in Initialize - virtual bool LoadFile(const wxString& file = ""); - virtual bool DisplayContents(void); - virtual bool DisplaySection(int sectionNo); - virtual bool DisplayBlock(long blockNo); - virtual bool KeywordSearch(const wxString& k); - - virtual bool Quit(void); - virtual void OnQuit(void); - - inline wxString GetHelpFile(void) const { return m_helpFile; } - -protected: - wxString m_helpFile; -}; - -#endif // USE_HELP -#endif - // _WX_HELPWIN_H_ diff --git a/include/wx/msw/icon.h b/include/wx/msw/icon.h deleted file mode 100644 index 27d7311298..0000000000 --- a/include/wx/msw/icon.h +++ /dev/null @@ -1,102 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: icon.h -// Purpose: wxIcon class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_ICON_H_ -#define _WX_ICON_H_ - -#ifdef __GNUG__ -#pragma interface "icon.h" -#endif - -#include "wx/bitmap.h" - -class WXDLLEXPORT wxIconRefData: public wxBitmapRefData -{ - friend class WXDLLEXPORT wxBitmap; - friend class WXDLLEXPORT wxIcon; -public: - wxIconRefData(void); - ~wxIconRefData(void); - -public: - WXHICON m_hIcon; -}; - -#define M_ICONDATA ((wxIconRefData *)m_refData) -#define M_ICONHANDLERDATA ((wxIconRefData *)bitmap->GetRefData()) - -// Icon -class WXDLLEXPORT wxIcon: public wxBitmap -{ - DECLARE_DYNAMIC_CLASS(wxIcon) - -public: - wxIcon(void); - - // Copy constructors - inline wxIcon(const wxIcon& icon) { Ref(icon); } - inline wxIcon(const wxIcon* icon) { /* UnRef(); */ if (icon) Ref(*icon); } - - wxIcon(const char bits[], int width, int height); - wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE, - int desiredWidth = -1, int desiredHeight = -1); - ~wxIcon(void); - - bool LoadFile(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE, - int desiredWidth = -1, int desiredHeight = -1); - - inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; } - inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; } - inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; } - - void SetHICON(WXHICON ico); - inline WXHICON GetHICON(void) const { return (M_ICONDATA ? M_ICONDATA->m_hIcon : 0); } - - virtual bool Ok(void) const { return (m_refData != NULL && M_ICONDATA->m_hIcon) ; } - - bool FreeResource(bool force = FALSE); -}; - -// TODO: Put these in separate, private header - -class WXDLLEXPORT wxICOFileHandler: public wxBitmapHandler -{ - DECLARE_DYNAMIC_CLASS(wxICOFileHandler) -public: - inline wxICOFileHandler(void) - { - m_name = "ICO icon file"; - m_extension = "ico"; - m_type = wxBITMAP_TYPE_ICO; - }; - - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth = -1, int desiredHeight = -1); -}; - -class WXDLLEXPORT wxICOResourceHandler: public wxBitmapHandler -{ - DECLARE_DYNAMIC_CLASS(wxICOResourceHandler) -public: - inline wxICOResourceHandler(void) - { - m_name = "ICO resource"; - m_extension = "ico"; - m_type = wxBITMAP_TYPE_ICO_RESOURCE; - }; - - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth = -1, int desiredHeight = -1); - -}; - -#endif - // _WX_ICON_H_ diff --git a/include/wx/msw/imaglist.h b/include/wx/msw/imaglist.h deleted file mode 100644 index 153cfd00d1..0000000000 --- a/include/wx/msw/imaglist.h +++ /dev/null @@ -1,226 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: imaglist.h -// Purpose: wxImageList class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_IMAGLIST_H_ -#define _WX_IMAGLIST_H_ - -#ifdef __GNUG__ -#pragma interface "imaglist.h" -#endif - -#include "wx/bitmap.h" - -/* - * wxImageList is used for wxListCtrl, wxTreeCtrl. These controls refer to - * images for their items by an index into an image list. - * A wxImageList is capable of creating images with optional masks from - * a variety of sources - a single bitmap plus a colour to indicate the mask, - * two bitmaps, or an icon. - * - * Image lists can also create and draw images used for drag and drop functionality. - * This is not yet implemented in wxImageList. We need to discuss a generic API - * for doing drag and drop and see whether it ties in with the Win95 view of it. - * See below for candidate functions and an explanation of how they might be - * used. - */ - -// Flags for Draw -#define wxIMAGELIST_DRAW_NORMAL 0x0001 -#define wxIMAGELIST_DRAW_TRANSPARENT 0x0002 -#define wxIMAGELIST_DRAW_SELECTED 0x0004 -#define wxIMAGELIST_DRAW_FOCUSED 0x0008 - -// Flag values for Set/GetImageList -enum { - wxIMAGE_LIST_NORMAL, // Normal icons - wxIMAGE_LIST_SMALL, // Small icons - wxIMAGE_LIST_STATE // State icons: unimplemented (see WIN32 documentation) -}; - -// Eventually we'll make this a reference-counted wxGDIObject. For -// now, the app must take care of ownership issues. That is, the -// image lists must be explicitly deleted after the control(s) that uses them -// is (are) deleted, or when the app exits. -class WXDLLEXPORT wxImageList: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxImageList) - public: - /* - * Public interface - */ - - wxImageList(void); - - // Creates an image list. - // Specify the width and height of the images in the list, - // whether there are masks associated with them (e.g. if creating images - // from icons), and the initial size of the list. - inline wxImageList(int width, int height, bool mask = TRUE, int initialCount = 1) - { - Create(width, height, mask, initialCount); - } - ~wxImageList(void); - - - // Attributes - //////////////////////////////////////////////////////////////////////////// - - // Returns the number of images in the image list. - int GetImageCount(void) const; - - // Operations - //////////////////////////////////////////////////////////////////////////// - - // Creates an image list - // width, height specify the size of the images in the list (all the same). - // mask specifies whether the images have masks or not. - // initialNumber is the initial number of images to reserve. - bool Create(int width, int height, bool mask = TRUE, int initialNumber = 1); - - // Adds a bitmap, and optionally a mask bitmap. - // Note that wxImageList creates *new* bitmaps, so you may delete - // 'bitmap' and 'mask' after calling Add. - int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap); - - // Adds a bitmap, using the specified colour to create the mask bitmap - // Note that wxImageList creates *new* bitmaps, so you may delete - // 'bitmap' after calling Add. - int Add(const wxBitmap& bitmap, const wxColour& maskColour); - - // Adds a bitmap and mask from an icon. - int Add(const wxIcon& icon); - - // Replaces a bitmap, optionally passing a mask bitmap. - // Note that wxImageList creates new bitmaps, so you may delete - // 'bitmap' and 'mask' after calling Replace. - bool Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap); - -/* Not supported by Win95 - // Replacing a bitmap, using the specified colour to create the mask bitmap - // Note that wxImageList creates new bitmaps, so you may delete - // 'bitmap'. - bool Replace(int index, const wxBitmap& bitmap, const wxColour& maskColour); -*/ - - // Replaces a bitmap and mask from an icon. - // You can delete 'icon' after calling Replace. - bool Replace(int index, const wxIcon& icon); - - // Removes the image at the given index. - bool Remove(int index); - - // Remove all images - bool RemoveAll(void); - - // Draws the given image on a dc at the specified position. - // If 'solidBackground' is TRUE, Draw sets the image list background - // colour to the background colour of the wxDC, to speed up - // drawing by eliminating masked drawing where possible. - bool Draw(int index, wxDC& dc, int x, int y, - int flags = wxIMAGELIST_DRAW_NORMAL, bool solidBackground = FALSE); - - // TODO: miscellaneous functionality -/* - wxIcon *MakeIcon(int index); - bool SetOverlayImage(int index, int overlayMask); - -*/ - - // TODO: Drag-and-drop related functionality. - -#if 0 - // Creates a new drag image by combining the given image (typically a mouse cursor image) - // with the current drag image. - bool SetDragCursorImage(int index, const wxPoint& hotSpot); - - // If successful, returns a pointer to the temporary image list that is used for dragging; - // otherwise, NULL. - // dragPos: receives the current drag position. - // hotSpot: receives the offset of the drag image relative to the drag position. - static wxImageList *GetDragImageList(wxPoint& dragPos, wxPoint& hotSpot); - - // Call this function to begin dragging an image. This function creates a temporary image list - // that is used for dragging. The image combines the specified image and its mask with the - // current cursor. In response to subsequent mouse move messages, you can move the drag image - // by using the DragMove member function. To end the drag operation, you can use the EndDrag - // member function. - bool BeginDrag(int index, const wxPoint& hotSpot); - - // Ends a drag operation. - bool EndDrag(void); - - // Call this function to move the image that is being dragged during a drag-and-drop operation. - // This function is typically called in response to a mouse move message. To begin a drag - // operation, use the BeginDrag member function. - static bool DragMove(const wxPoint& point); - - // During a drag operation, locks updates to the window specified by lockWindow and displays - // the drag image at the position specified by point. - // The coordinates are relative to the window's upper left corner, so you must compensate - // for the widths of window elements, such as the border, title bar, and menu bar, when - // specifying the coordinates. - // If lockWindow is NULL, this function draws the image in the display context associated - // with the desktop window, and coordinates are relative to the upper left corner of the screen. - // This function locks all other updates to the given window during the drag operation. - // If you need to do any drawing during a drag operation, such as highlighting the target - // of a drag-and-drop operation, you can temporarily hide the dragged image by using the - // wxImageList::DragLeave function. - - // lockWindow: pointer to the window that owns the drag image. - // point: position at which to display the drag image. Coordinates are relative to the - // upper left corner of the window (not the client area). - - static bool DragEnter( wxWindow *lockWindow, const wxPoint& point ); - - // Unlocks the window specified by pWndLock and hides the drag image, allowing the - // window to be updated. - static bool DragLeave( wxWindow *lockWindow ); - - /* Here's roughly how you'd use these functions if implemented in this Win95-like way: - - 1) Starting to drag: - - wxImageList *dragImageList = new wxImageList(16, 16, TRUE); - dragImageList->Add(myDragImage); // Provide an image to combine with the current cursor - dragImageList->BeginDrag(0, wxPoint(0, 0)); - wxShowCursor(FALSE); // wxShowCursor not yet implemented in wxWin - myWindow->CaptureMouse(); - - 2) Dragging: - - // Called within mouse move event. Could also use dragImageList instead of assuming - // these are static functions. - // These two functions could possibly be combined into one, since DragEnter is - // a bit obscure. - wxImageList::DragMove(wxPoint(x, y)); // x, y are current cursor position - wxImageList::DragEnter(NULL, wxPoint(x, y)); // NULL assumes dragging across whole screen - - 3) Finishing dragging: - - dragImageList->EndDrag(); - myWindow->ReleaseMouse(); - wxShowCursor(TRUE); -*/ - -#endif - - // Implementation - //////////////////////////////////////////////////////////////////////////// - - // Returns the native image list handle - inline WXHIMAGELIST GetHIMAGELIST(void) const { return m_hImageList; } - -protected: - WXHIMAGELIST m_hImageList; -}; - -#endif - // _WX_IMAGLIST_H_ diff --git a/include/wx/msw/iniconf.h b/include/wx/msw/iniconf.h deleted file mode 100644 index 2d56f13f28..0000000000 --- a/include/wx/msw/iniconf.h +++ /dev/null @@ -1,104 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: include/wx/msw/iniconf.h -// Purpose: INI-file based wxConfigBase implementation -// Author: Vadim Zeitlin -// Modified by: -// Created: 27.07.98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _INICONF_H -#define _INICONF_H - -// ---------------------------------------------------------------------------- -// wxIniConfig is a wxConfig implementation which uses MS Windows INI files to -// store the data. Because INI files don't really support arbitrary nesting of -// groups, we do the following: -// (1) in win.ini file we store all entries in the [vendor] section and -// the value group1/group2/key is mapped to the value group1_group2_key -// in this section, i.e. all path separators are replaced with underscore -// (2) in appname.ini file we map group1/group2/group3/key to the entry -// group2_group3_key in [group1] -// -// Of course, it might lead to indesirable results if '_' is also used in key -// names (i.e. group/key is the same as group_key) and also GetPath() result -// may be not what you would expect it to be. -// -// Another limitation: the keys and section names are never case-sensitive -// which might differ from wxFileConfig it it was compiled with -// wxCONFIG_CASE_SENSITIVE option. -// ---------------------------------------------------------------------------- - -// for this class, "local" file is the file appname.ini and the global file -// is the [vendor] subsection of win.ini (default for "vendor" is to be the -// same as appname). The file name (strAppName parameter) may, in fact, -// contain the full path to the file. If it doesn't, the file is searched for -// in the Windows directory. -class wxIniConfig : public wxConfigBase -{ -public: - // ctor & dtor - // if strAppName doesn't contain the extension and is not an absolute path, - // ".ini" is appended to it. if strVendor is empty, it's taken to be the - // same as strAppName. - wxIniConfig(const wxString& strAppName = wxEmptyString, const wxString& strVendor = wxEmptyString, - const wxString& localFilename = wxEmptyString, const wxString& globalFilename = wxEmptyString, long style = wxCONFIG_USE_LOCAL_FILE); - virtual ~wxIniConfig(); - - // implement inherited pure virtual functions - virtual void SetPath(const wxString& strPath); - virtual const wxString& GetPath() const; - - virtual bool GetFirstGroup(wxString& str, long& lIndex) const; - virtual bool GetNextGroup (wxString& str, long& lIndex) const; - virtual bool GetFirstEntry(wxString& str, long& lIndex) const; - virtual bool GetNextEntry (wxString& str, long& lIndex) const; - - virtual size_t GetNumberOfEntries(bool bRecursive = FALSE) const; - virtual size_t GetNumberOfGroups(bool bRecursive = FALSE) const; - - virtual bool HasGroup(const wxString& strName) const; - virtual bool HasEntry(const wxString& strName) const; - - // return TRUE if the current group is empty - bool IsEmpty() const; - - // read/write - bool Read(const wxString& key, wxString *pStr) const; - bool Read(const wxString& key, wxString *pStr, const wxString& szDefault) const; - bool Read(const wxString& key, long *plResult) const; - - // The following are necessary to satisfy the compiler - wxString Read(const wxString& key, const wxString& defVal) const - { return wxConfigBase::Read(key, defVal); } - bool Read(const wxString& key, long *pl, long defVal) const - { return wxConfigBase::Read(key, pl, defVal); } - long Read(const wxString& key, long defVal) const - { return wxConfigBase::Read(key, defVal); } - bool Read(const wxString& key, double* val) const - { return wxConfigBase::Read(key, val); } - bool Read(const wxString& key, double* val, double defVal) const - { return wxConfigBase::Read(key, val, defVal); } - - bool Write(const wxString& key, const wxString& szValue); - bool Write(const wxString& key, long lValue); - - virtual bool Flush(bool bCurrentOnly = FALSE); - - virtual bool DeleteEntry(const char *szKey, bool bGroupIfEmptyAlso); - virtual bool DeleteGroup(const char *szKey); - virtual bool DeleteAll(); - -private: - // helpers - wxString GetPrivateKeyName(const wxString& szKey) const; - wxString GetKeyName(const wxString& szKey) const; - - wxString m_strLocalFilename; // name of the private INI file - wxString m_strGroup, // current group in appname.ini file - m_strPath; // the rest of the path (no trailing '_'!) -}; - -#endif //_INICONF_H \ No newline at end of file diff --git a/include/wx/msw/joystick.h b/include/wx/msw/joystick.h deleted file mode 100644 index 4b15a0245e..0000000000 --- a/include/wx/msw/joystick.h +++ /dev/null @@ -1,93 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: joystick.h -// Purpose: wxJoystick class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_JOYSTICK_H_ -#define _WX_JOYSTICK_H_ - -#ifdef __GNUG__ -#pragma interface "joystick.h" -#endif - -#include "wx/event.h" - -class WXDLLEXPORT wxJoystick: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxJoystick) - public: - /* - * Public interface - */ - - wxJoystick(int joystick = wxJOYSTICK1) { m_joystick = joystick; }; - - // Attributes - //////////////////////////////////////////////////////////////////////////// - - wxPoint GetPosition(void) const; - int GetZPosition(void) const; - int GetButtonState(void) const; - int GetPOVPosition(void) const; - int GetPOVCTSPosition(void) const; - int GetRudderPosition(void) const; - int GetUPosition(void) const; - int GetVPosition(void) const; - int GetMovementThreshold(void) const; - void SetMovementThreshold(int threshold) ; - - // Capabilities - //////////////////////////////////////////////////////////////////////////// - - bool IsOk(void) const; // Checks that the joystick is functioning - int GetNumberJoysticks(void) const ; - int GetManufacturerId(void) const ; - int GetProductId(void) const ; - wxString GetProductName(void) const ; - int GetXMin(void) const; - int GetYMin(void) const; - int GetZMin(void) const; - int GetXMax(void) const; - int GetYMax(void) const; - int GetZMax(void) const; - int GetNumberButtons(void) const; - int GetNumberAxes(void) const; - int GetMaxButtons(void) const; - int GetMaxAxes(void) const; - int GetPollingMin(void) const; - int GetPollingMax(void) const; - int GetRudderMin(void) const; - int GetRudderMax(void) const; - int GetUMin(void) const; - int GetUMax(void) const; - int GetVMin(void) const; - int GetVMax(void) const; - - bool HasRudder(void) const; - bool HasZ(void) const; - bool HasU(void) const; - bool HasV(void) const; - bool HasPOV(void) const; - bool HasPOV4Dir(void) const; - bool HasPOVCTS(void) const; - - // Operations - //////////////////////////////////////////////////////////////////////////// - - // pollingFreq = 0 means that movement events are sent when above the threshold. - // If pollingFreq > 0, events are received every this many milliseconds. - bool SetCapture(wxWindow* win, int pollingFreq = 0); - bool ReleaseCapture(void); - -protected: - int m_joystick; -}; - -#endif - // _WX_JOYSTICK_H_ diff --git a/include/wx/msw/listbox.h b/include/wx/msw/listbox.h deleted file mode 100644 index b11df5edd3..0000000000 --- a/include/wx/msw/listbox.h +++ /dev/null @@ -1,136 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: listbox.h -// Purpose: wxListBox class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_LISTBOX_H_ -#define _WX_LISTBOX_H_ - -#ifdef __GNUG__ -#pragma interface "listbox.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxListBoxNameStr; - -#if USE_OWNER_DRAWN - class WXDLLEXPORT wxOwnerDrawn; - - // define the array of list box items - #include - WX_DEFINE_ARRAY(wxOwnerDrawn *, wxListBoxItemsArray); -#endif - -// forward decl for GetSelections() -class wxArrayInt; - -WXDLLEXPORT_DATA(extern const char*) wxEmptyString; - -// List box item -class WXDLLEXPORT wxListBox: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxListBox) - public: - - wxListBox(void); - inline wxListBox(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr) - { - Create(parent, id, pos, size, n, choices, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); - - ~wxListBox(); - - bool MSWCommand(WXUINT param, WXWORD id); - -#if USE_OWNER_DRAWN - bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item); - bool MSWOnDraw(WXDRAWITEMSTRUCT *item); - - // plug-in for derived classes - virtual wxOwnerDrawn *CreateItem(size_t n); - - // allows to get the item and use SetXXX functions to set it's appearance - wxOwnerDrawn *GetItem(size_t n) const { return m_aItems[n]; } -#endif - - virtual void Append(const wxString& item); - virtual void Append(const wxString& item, char *clientData); - virtual void Set(int n, const wxString* choices, char **clientData = NULL); - virtual int FindString(const wxString& s) const ; - virtual void Clear(void); - virtual void SetSelection(int n, bool select = TRUE); - - virtual void Deselect(int n); - - // For single choice list item only - virtual int GetSelection() const ; - virtual void Delete(int n); - virtual char *GetClientData(int n) const ; - virtual void SetClientData(int n, char *clientData); - virtual void SetString(int n, const wxString& s); - - // For single or multiple choice list item - virtual int GetSelections(wxArrayInt& aSelections) const; - virtual bool Selected(int n) const ; - virtual wxString GetString(int n) const ; - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - - // Set the specified item at the first visible item - // or scroll to max range. - virtual void SetFirstItem(int n) ; - virtual void SetFirstItem(const wxString& s) ; - - virtual void InsertItems(int nItems, const wxString items[], int pos); - - virtual wxString GetStringSelection(void) const ; - virtual bool SetStringSelection(const wxString& s, bool flag = TRUE); - virtual int Number(void) const ; - - void Command(wxCommandEvent& event); - - // Windows-specific code to set the horizontal extent of - // the listbox, if necessary. If s is non-NULL, it's - // used to calculate the horizontal extent. - // Otherwise, all strings are used. - virtual void SetHorizontalExtent(const wxString& s = wxEmptyString); - - virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam); - - virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); - virtual void SetupColours(void); - - protected: - int m_noItems; - int m_selected; - -#if USE_OWNER_DRAWN - // control items - wxListBoxItemsArray m_aItems; -#endif - -}; - -#endif - // _WX_LISTBOX_H_ diff --git a/include/wx/msw/listctrl.h b/include/wx/msw/listctrl.h deleted file mode 100644 index 9f6693955b..0000000000 --- a/include/wx/msw/listctrl.h +++ /dev/null @@ -1,479 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: listctrl.h -// Purpose: wxListCtrl class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_LISTCTRL_H_ -#define _WX_LISTCTRL_H_ - -#ifdef __GNUG__ -#pragma interface "listctrl.h" -#endif - -#include "wx/control.h" -#include "wx/event.h" -#include "wx/imaglist.h" - -/* - The wxListCtrl can show lists of items in four different modes: - wxLC_LIST: multicolumn list view, with optional small icons (icons could be - optional for some platforms). Columns are computed automatically, - i.e. you don't set columns as in wxLC_REPORT. In other words, - the list wraps, unlike a wxListBox. - wxLC_REPORT: single or multicolumn report view (with optional header) - wxLC_ICON: large icon view, with optional labels - wxLC_SMALL_ICON: small icon view, with optional labels - - You can change the style dynamically, either with SetSingleStyle or - SetWindowStyleFlag. - - Further window styles: - - wxLC_ALIGN_TOP icons align to the top (default) - wxLC_ALIGN_LEFT icons align to the left - wxLC_AUTOARRANGE icons arrange themselves - wxLC_USER_TEXT the app provides label text on demand, except for column headers - wxLC_EDIT_LABELS labels are editable: app will be notified. - wxLC_NO_HEADER no header in report mode - wxLC_NO_SORT_HEADER can't click on header - wxLC_SINGLE_SEL single selection - wxLC_SORT_ASCENDING sort ascending (must still supply a comparison callback in SortItems) - wxLC_SORT_DESCENDING sort descending (ditto) - - Items are referred to by their index (position in the list starting from zero). - - Label text is supplied via insertion/setting functions and is stored by the - control, unless the wxLC_USER_TEXT style has been specified, in which case - the app will be notified when text is required (see sample). - - Images are dealt with by (optionally) associating 3 image lists with the control. - Zero-based indexes into these image lists indicate which image is to be used for - which item. Each image in an image list can contain a mask, and can be made out - of either a bitmap, two bitmaps or an icon. See ImagList.h for more details. - - Notifications are passed via the wxWindows 2.0 event system, or using virtual - functions in wxWindows 1.66. - - See the sample wxListCtrl app for API usage. - - TODO: - - addition of further convenience functions - to avoid use of wxListItem in some functions - - state/overlay images: probably not needed. - - in Win95, you can be called back to supply other information - besides text, such as state information. This saves no memory - and is probably superfluous to requirements. - - discover why SetWindowLong doesn't properly change the - style, requiring RecreateWindow instead. - - testing of whole API, extending current sample. - - - */ - -// Mask flags to tell app/GUI what fields of wxListItem are valid -#define wxLIST_MASK_STATE 0x0001 -#define wxLIST_MASK_TEXT 0x0002 -#define wxLIST_MASK_IMAGE 0x0004 -#define wxLIST_MASK_DATA 0x0008 -#define wxLIST_SET_ITEM 0x0010 -#define wxLIST_MASK_WIDTH 0x0020 -#define wxLIST_MASK_FORMAT 0x0040 - -// State flags for indicating the state of an item -#define wxLIST_STATE_DONTCARE 0x0000 -#define wxLIST_STATE_DROPHILITED 0x0001 -#define wxLIST_STATE_FOCUSED 0x0002 -#define wxLIST_STATE_SELECTED 0x0004 -#define wxLIST_STATE_CUT 0x0008 - -// Hit test flags, used in HitTest -#define wxLIST_HITTEST_ABOVE 0x0001 // Above the client area. -#define wxLIST_HITTEST_BELOW 0x0002 // Below the client area. -#define wxLIST_HITTEST_NOWHERE 0x0004 // In the client area but below the last item. -#define wxLIST_HITTEST_ONITEMICON 0x0020 // On the bitmap associated with an item. -#define wxLIST_HITTEST_ONITEMLABEL 0x0080 // On the label (string) associated with an item. -#define wxLIST_HITTEST_ONITEMRIGHT 0x0100 // In the area to the right of an item. -#define wxLIST_HITTEST_ONITEMSTATEICON 0x0200 // On the state icon for a tree view item that is in a user-defined state. -#define wxLIST_HITTEST_TOLEFT 0x0400 // To the left of the client area. -#define wxLIST_HITTEST_TORIGHT 0x0800 // To the right of the client area. - -#define wxLIST_HITTEST_ONITEM (wxLIST_HITTEST_ONITEMICON | wxLIST_HITTEST_ONITEMLABEL wxLIST_HITTEST_ONITEMSTATEICON) - -// Flags for GetNextItem -enum { - wxLIST_NEXT_ABOVE, // Searches for an item above the specified item - wxLIST_NEXT_ALL, // Searches for subsequent item by index - wxLIST_NEXT_BELOW, // Searches for an item below the specified item - wxLIST_NEXT_LEFT, // Searches for an item to the left of the specified item - wxLIST_NEXT_RIGHT, // Searches for an item to the right of the specified item -}; - -// Alignment flags for Arrange -enum { - wxLIST_ALIGN_DEFAULT, - wxLIST_ALIGN_LEFT, - wxLIST_ALIGN_TOP, - wxLIST_ALIGN_SNAP_TO_GRID -}; - -// Column format -enum { - wxLIST_FORMAT_LEFT, - wxLIST_FORMAT_RIGHT, - wxLIST_FORMAT_CENTRE, - wxLIST_FORMAT_CENTER = wxLIST_FORMAT_CENTRE -}; - -// Autosize values for SetColumnWidth -enum { - wxLIST_AUTOSIZE = -1, - wxLIST_AUTOSIZE_USEHEADER = -2 -}; - -// Flag values for GetItemRect -enum { - wxLIST_RECT_BOUNDS, - wxLIST_RECT_ICON, - wxLIST_RECT_LABEL -}; - -// Flag values for FindItem -enum { - wxLIST_FIND_UP, - wxLIST_FIND_DOWN, - wxLIST_FIND_LEFT, - wxLIST_FIND_RIGHT -}; - -// wxListItem: data representing an item, or report field. -// It also doubles up to represent entire column information -// when inserting or setting a column. -class WXDLLEXPORT wxListItem: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxListItem) -public: - long m_mask; // Indicates what fields are valid - long m_itemId; // The zero-based item position - int m_col; // Zero-based column, if in report mode - long m_state; // The state of the item - long m_stateMask; // Which flags of m_state are valid (uses same flags) - wxString m_text; // The label/header text - int m_image; // The zero-based index into an image list - long m_data; // App-defined data - - // For columns only - int m_format; // left, right, centre - int m_width; // width of column - - wxListItem(void); -}; - -// type of compare function for wxListCtrl sort operation -typedef int (*wxListCtrlCompare)(long item1, long item2, long sortData); - -class WXDLLEXPORT wxListCtrl: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxListCtrl) - public: - /* - * Public interface - */ - - wxListCtrl(void); - - inline wxListCtrl(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, - const wxString& name = "listCtrl") - { - Create(parent, id, pos, size, style, validator, name); - } - ~wxListCtrl(void); - - bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxListCtrl"); - - - // Attributes - //////////////////////////////////////////////////////////////////////////// - - // Sets the background colour (GetBackgroundColour already implicit in - // wxWindow class) - void SetBackgroundColour(const wxColour& col); - - // Gets information about this column - bool GetColumn(int col, wxListItem& item) const; - - // Sets information about this column - bool SetColumn(int col, wxListItem& item) ; - - // Gets the column width - int GetColumnWidth(int col) const; - - // Sets the column width - bool SetColumnWidth(int col, int width) ; - - // Gets the number of items that can fit vertically in the - // visible area of the list control (list or report view) - // or the total number of items in the list control (icon - // or small icon view) - int GetCountPerPage(void) const; - - // Gets the edit control for editing labels. - wxTextCtrl* GetEditControl(void) const; - - // Gets information about the item - bool GetItem(wxListItem& info) const ; - - // Sets information about the item - bool SetItem(wxListItem& info) ; - - // Sets a string field at a particular column - long SetItem(long index, int col, const wxString& label, int imageId = -1); - - // Gets the item state - int GetItemState(long item, long stateMask) const ; - - // Sets the item state - bool SetItemState(long item, long state, long stateMask) ; - - // Sets the item image - bool SetItemImage(long item, int image, int selImage) ; - - // Gets the item text - wxString GetItemText(long item) const ; - - // Sets the item text - void SetItemText(long item, const wxString& str) ; - - // Gets the item data - long GetItemData(long item) const ; - - // Sets the item data - bool SetItemData(long item, long data) ; - - // Gets the item rectangle - bool GetItemRect(long item, wxRectangle& rect, int code = wxLIST_RECT_BOUNDS) const ; - - // Gets the item position - bool GetItemPosition(long item, wxPoint& pos) const ; - - // Sets the item position - bool SetItemPosition(long item, const wxPoint& pos) ; - - // Gets the number of items in the list control - int GetItemCount(void) const; - - // Gets the number of columns in the list control - int GetColumnCount(void) const; - - // Retrieves the spacing between icons in pixels. - // If small is TRUE, gets the spacing for the small icon - // view, otherwise the large icon view. - int GetItemSpacing(bool isSmall) const; - - // Gets the number of selected items in the list control - int GetSelectedItemCount(void) const; - - // Gets the text colour of the listview - wxColour GetTextColour(void) const; - - // Sets the text colour of the listview - void SetTextColour(const wxColour& col); - - // Gets the index of the topmost visible item when in - // list or report view - long GetTopItem(void) const ; - - // Add or remove a single window style - void SetSingleStyle(long style, bool add = TRUE) ; - - // Set the whole window style - void SetWindowStyleFlag(long style) ; - - // Searches for an item, starting from 'item'. - // item can be -1 to find the first item that matches the - // specified flags. - // Returns the item or -1 if unsuccessful. - long GetNextItem(long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE) const ; - - // Implementation: converts wxWindows style to MSW style. - // Can be a single style flag or a bit list. - // oldStyle is 'normalised' so that it doesn't contain - // conflicting styles. - long ConvertToMSWStyle(long& oldStyle, long style) const; - - // Gets one of the three image lists - wxImageList *GetImageList(int which) const ; - - // Sets the image list - // N.B. There's a quirk in the Win95 list view implementation. - // If in wxLC_LIST mode, it'll *still* display images by the labels if - // there's a small-icon image list set for the control - even though you - // haven't specified wxLIST_MASK_IMAGE when inserting. - // So you have to set a NULL small-icon image list to be sure that - // the wxLC_LIST mode works without icons. Of course, you may want icons... - void SetImageList(wxImageList *imageList, int which) ; - - // Operations - //////////////////////////////////////////////////////////////////////////// - - // Arranges the items - bool Arrange(int flag = wxLIST_ALIGN_DEFAULT); - - // Deletes an item - bool DeleteItem(long item); - - // Deletes all items - bool DeleteAllItems(void) ; - - // Deletes a column - bool DeleteColumn(int col); - - // Deletes all columns - bool DeleteAllColumns(void); - - // Clears items, and columns if there are any. - void ClearAll(void); - - // Edit the label - wxTextCtrl* EditLabel(long item, wxClassInfo* textControlClass = CLASSINFO(wxTextCtrl)); - - // End label editing, optionally cancelling the edit - bool EndEditLabel(bool cancel); - - // Ensures this item is visible - bool EnsureVisible(long item) ; - - // Find an item whose label matches this string, starting from the item after 'start' - // or the beginning if 'start' is -1. - long FindItem(long start, const wxString& str, bool partial = FALSE); - - // Find an item whose data matches this data, starting from the item after 'start' - // or the beginning if 'start' is -1. - long FindItem(long start, long data); - - // Find an item nearest this position in the specified direction, starting from - // the item after 'start' or the beginning if 'start' is -1. - long FindItem(long start, const wxPoint& pt, int direction); - - // Determines which item (if any) is at the specified point, - // giving details in 'flags' (see wxLIST_HITTEST_... flags above) - long HitTest(const wxPoint& point, int& flags); - - // Inserts an item, returning the index of the new item if successful, - // -1 otherwise. - // TOD: Should also have some further convenience functions - // which don't require setting a wxListItem object - long InsertItem(wxListItem& info); - - // Insert a string item - long InsertItem(long index, const wxString& label); - - // Insert an image item - long InsertItem(long index, int imageIndex); - - // Insert an image/string item - long InsertItem(long index, const wxString& label, int imageIndex); - - // For list view mode (only), inserts a column. - long InsertColumn(long col, wxListItem& info); - - long InsertColumn(long col, const wxString& heading, int format = wxLIST_FORMAT_LEFT, - int width = -1); - - // Scrolls the list control. If in icon, small icon or report view mode, - // x specifies the number of pixels to scroll. If in list view mode, x - // specifies the number of columns to scroll. - // If in icon, small icon or list view mode, y specifies the number of pixels - // to scroll. If in report view mode, y specifies the number of lines to scroll. - bool ScrollList(int dx, int dy); - - // Sort items. - - // fn is a function which takes 3 long arguments: item1, item2, data. - // item1 is the long data associated with a first item (NOT the index). - // item2 is the long data associated with a second item (NOT the index). - // data is the same value as passed to SortItems. - // The return value is a negative number if the first item should precede the second - // item, a positive number of the second item should precede the first, - // or zero if the two items are equivalent. - - // data is arbitrary data to be passed to the sort function. - bool SortItems(wxListCtrlCompare fn, long data); - -/* Why should we need this function? Leave for now. - * WE NEED IT because item data may have changed, - * but the display needs refreshing (in string callback mode) - // Updates an item. If the list control has the wxLI_AUTO_ARRANGE style, - // the items will be rearranged. - bool Update(long item); -*/ - - void Command(wxCommandEvent& event) { ProcessCommand(event); }; - - // IMPLEMENTATION - bool MSWCommand(WXUINT param, WXWORD id); - bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam); - - // Recreate window - seems to be necessary when changing a style. - void RecreateWindow(void); - - // Add to pool: necessary because Windows needs to have a string - // still exist across 3 callbacks. - char *AddPool(const wxString& str); - -protected: - wxTextCtrl* m_textCtrl; // The control used for editing a label - wxImageList * m_imageListNormal; // The image list for normal icons - wxImageList * m_imageListSmall; // The image list for small icons - wxImageList * m_imageListState; // The image list state icons (not implemented yet) - - long m_baseStyle; // Basic Windows style flags, for recreation purposes - wxStringList m_stringPool; // Pool of 3 strings to satisfy Windows callback - // requirements - int m_colCount; // Windows doesn't have GetColumnCount so must - // keep track of inserted/deleted columns - -}; - -class WXDLLEXPORT wxListEvent: public wxCommandEvent -{ - DECLARE_DYNAMIC_CLASS(wxListEvent) - - public: - wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0); - - int m_code; - long m_itemIndex; - long m_oldItemIndex; - int m_col; - bool m_cancelled; - wxPoint m_pointDrag; - - wxListItem m_item; -}; - -typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&); - -#define EVT_LIST_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_DELETE_ITEM(id, fn) { wxEVT_COMMAND_LIST_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_DELETE_ALL_ITEMS(id, fn) { wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_GET_INFO(id, fn) { wxEVT_COMMAND_LIST_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_SET_INFO(id, fn) { wxEVT_COMMAND_LIST_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_ITEM_SELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_ITEM_DESELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_DESELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_KEY_DOWN(id, fn) { wxEVT_COMMAND_LIST_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_INSERT_ITEM(id, fn) { wxEVT_COMMAND_LIST_INSERT_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_COL_CLICK(id, fn) { wxEVT_COMMAND_LIST_COL_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, - -#endif - // _WX_LISTCTRL_H_ diff --git a/include/wx/msw/magnif1.cur b/include/wx/msw/magnif1.cur deleted file mode 100644 index bb4c8978d6..0000000000 Binary files a/include/wx/msw/magnif1.cur and /dev/null differ diff --git a/include/wx/msw/mdi.h b/include/wx/msw/mdi.h deleted file mode 100644 index 658aa6c63d..0000000000 --- a/include/wx/msw/mdi.h +++ /dev/null @@ -1,209 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: mdi.h -// Purpose: MDI (Multiple Document Interface) classes -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_MDI_H_ -#define _WX_MDI_H_ - -#ifdef __GNUG__ -#pragma interface "mdi.h" -#endif - -#include "wx/frame.h" - -WXDLLEXPORT_DATA(extern const char*) wxFrameNameStr; -WXDLLEXPORT_DATA(extern const char*) wxStatusLineNameStr; - -class WXDLLEXPORT wxMDIClientWindow; -class WXDLLEXPORT wxMDIChildFrame; - -class WXDLLEXPORT wxMDIParentFrame: public wxFrame -{ - DECLARE_DYNAMIC_CLASS(wxMDIParentFrame) - - friend class WXDLLEXPORT wxMDIChildFrame; - public: - - wxMDIParentFrame(void); - inline wxMDIParentFrame(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr) - { - Create(parent, id, title, pos, size, style, name); - } - - ~wxMDIParentFrame(void); - - bool Create(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr); - -/* -#if WXWIN_COMPATIBILITY - virtual void OldOnActivate(bool flag); - virtual void OldOnSize(int x, int y); -#endif -*/ - - void OnSize(wxSizeEvent& event); - void OnActivate(wxActivateEvent& event); - - void SetMenuBar(wxMenuBar *menu_bar); - - // Gets the size available for subwindows after menu size, toolbar size - // and status bar size have been subtracted. If you want to manage your own - // toolbar(s), don't call SetToolBar. - void GetClientSize(int *width, int *height) const; - - // Get the active MDI child window (Windows only) - wxMDIChildFrame *GetActiveChild(void) const ; - - // Get the client window - inline wxMDIClientWindow *GetClientWindow(void) const ; - - // Create the client window class (don't Create the window, - // just return a new class) - virtual wxMDIClientWindow *OnCreateClient(void) ; - - inline WXHMENU GetWindowMenu(void) const ; - - // MDI operations - virtual void Cascade(void); - virtual void Tile(void); - virtual void ArrangeIcons(void); - virtual void ActivateNext(void); - virtual void ActivatePrevious(void); - - // Handlers - void MSWOnSize(int x, int y, WXUINT flag); - bool MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control); - void MSWOnMenuHighlight(WXWORD item, WXWORD flags, WXHMENU sysmenu); - bool MSWProcessMessage(WXMSG *msg); - bool MSWTranslateMessage(WXMSG *msg); - void MSWOnCreate(WXLPCREATESTRUCT cs); - long MSWDefWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam); - bool MSWOnEraseBkgnd(WXHDC pDC); - bool MSWOnDestroy(void); - bool MSWOnActivate(int state, bool minimized, WXHWND activate); - - // Responds to colour changes - void OnSysColourChanged(wxSysColourChangedEvent& event); - - protected: - wxMDIClientWindow * m_clientWindow; - wxMDIChildFrame * m_currentChild; - WXHMENU m_windowMenu; - bool m_parentFrameActive; // TRUE if MDI Frame is intercepting - // commands, not child -DECLARE_EVENT_TABLE() -}; - -// Inlines -inline wxMDIClientWindow *wxMDIParentFrame::GetClientWindow(void) const { return m_clientWindow; } -inline WXHMENU wxMDIParentFrame::GetWindowMenu(void) const { return m_windowMenu; } - -class WXDLLEXPORT wxMDIChildFrame: public wxFrame -{ - DECLARE_DYNAMIC_CLASS(wxMDIChildFrame) - public: - - wxMDIChildFrame(void); - inline wxMDIChildFrame(wxMDIParentFrame *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) - { - Create(parent, id, title, pos, size, style, name); - } - - ~wxMDIChildFrame(void); - - bool Create(wxMDIParentFrame *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); - - // Set menu bar - void SetMenuBar(wxMenuBar *menu_bar); - void SetClientSize(int width, int height); - void GetPosition(int *x, int *y) const ; - - // MDI operations - virtual void Maximize(void); - virtual void Restore(void); - virtual void Activate(void); - - // Handlers - - long MSWOnMDIActivate(long bActivate, WXHWND, WXHWND); - void MSWOnSize(int x, int y, WXUINT); - void MSWOnWindowPosChanging(void *lpPos); - bool MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control); - long MSWDefWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam); - bool MSWProcessMessage(WXMSG *msg); - bool MSWTranslateMessage(WXMSG *msg); - void MSWDestroyWindow(void); - - // Implementation - bool ResetWindowStyle(void *vrect); - protected: -// bool m_active; -}; - -class WXDLLEXPORT wxMDIClientWindow: public wxWindow -{ - DECLARE_DYNAMIC_CLASS(wxMDIClientWindow) - public: - - wxMDIClientWindow(void) ; - inline wxMDIClientWindow(wxMDIParentFrame *parent, long style = 0) - { - CreateClient(parent, style); - } - - ~wxMDIClientWindow(void); - - // Note: this is virtual, to allow overridden behaviour. - virtual bool CreateClient(wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL); - - // Explicitly call default scroll behaviour - void OnScroll(wxScrollEvent& event); - - // Window procedure - virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); - - // Calls an appropriate default window procedure - virtual long MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); - - // Should hand the message to the default proc - long MSWOnMDIActivate(long bActivate, WXHWND, WXHWND); - -protected: - int m_scrollX; - int m_scrollY; -DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_MDI_H_ diff --git a/include/wx/msw/menu.h b/include/wx/msw/menu.h deleted file mode 100644 index f5d0a6a1a6..0000000000 --- a/include/wx/msw/menu.h +++ /dev/null @@ -1,180 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: menu.h -// Purpose: wxMenu, wxMenuBar classes -// Author: Julian Smart -// Modified by: Vadim Zeitlin (wxMenuItem is now in separate file) -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_MENU_H_ -#define _WX_MENU_H_ - -#ifdef __GNUG__ -#pragma interface "menu.h" -#endif - -#include "wx/defs.h" -#include "wx/event.h" - -class WXDLLEXPORT wxMenuItem; -class WXDLLEXPORT wxMenuBar; -class WXDLLEXPORT wxMenu; - -WXDLLEXPORT_DATA(extern const char*) wxEmptyString; - -// ---------------------------------------------------------------------------- -// Menu -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxMenu: public wxEvtHandler -{ - DECLARE_DYNAMIC_CLASS(wxMenu) - -public: - // ctor & dtor - wxMenu(const wxString& title = wxEmptyString, const wxFunction func = NULL); - ~wxMenu(); - - // construct menu - // append items to the menu - // separator line - void AppendSeparator(); - // normal item - void Append(int id, const wxString& Label, const wxString& helpString = wxEmptyString, - bool checkable = FALSE); - // a submenu - void Append(int id, const wxString& Label, wxMenu *SubMenu, - const wxString& helpString = wxEmptyString); - // the most generic form (create wxMenuItem first and use it's functions) - void Append(wxMenuItem *pItem); - // insert a break in the menu - void Break(); - // delete an item - void Delete(int id); /* If it's a submenu, menu is not destroyed. VZ: why? */ - - // menu item control - void Enable(int id, bool Flag); - bool Enabled(int id) const; - inline bool IsEnabled(int id) const { return Enabled(id); }; - void Check(int id, bool Flag); - bool Checked(int id) const; - inline bool IsChecked(int id) const { return Checked(id); }; - - // item properties - // title - void SetTitle(const wxString& label); - const wxString GetTitle() const; - // label - void SetLabel(int id, const wxString& label); - wxString GetLabel(int id) const; - // help string - virtual void SetHelpString(int id, const wxString& helpString); - virtual wxString GetHelpString(int id) const ; - - // find item - // Finds the item id matching the given string, NOT_FOUND if not found. - virtual int FindItem(const wxString& itemString) const ; - // Find wxMenuItem by ID, and item's menu too if itemMenu is !NULL. - wxMenuItem *FindItemForId(int itemId, wxMenu **itemMenu = NULL) const; - - void ProcessCommand(wxCommandEvent& event); - inline void Callback(const wxFunction func) { m_callback = func; } - - virtual void SetParent(wxEvtHandler *parent) { m_parent = parent; } - inline void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; } - inline wxEvtHandler *GetEventHandler() { return m_eventHandler; } - - inline wxList& GetItems() const { return (wxList&) m_menuItems; } - - // IMPLEMENTATION - bool MSWCommand(WXUINT param, WXWORD id); - - void SetInvokingWindow(wxWindow *pWin) { m_pInvokingWindow = pWin; } - wxWindow *GetInvokingWindow() const { return m_pInvokingWindow; } - - // semi-private accessors - // get the window which contains this menu - wxWindow *GetWindow() const; - // get the menu handle - WXHMENU GetHMenu() const; - -private: - bool m_doBreak ; - -public: - // This is used when m_hMenu is NULL because we don't want to - // delete it in ~wxMenu (it's been added to a parent menu). - // But we'll still need the handle for other purposes. - // Might be better to have a flag saying whether it's deleteable or not. - WXHMENU m_savehMenu ; // Used for Enable() on popup - WXHMENU m_hMenu; - wxFunction m_callback; - - int m_noItems; - wxString m_title; - wxMenu * m_topLevelMenu; - wxMenuBar * m_menuBar; - wxList m_menuItems; - wxEvtHandler * m_parent; - wxEvtHandler * m_eventHandler; - wxWindow *m_pInvokingWindow; -}; - -// ---------------------------------------------------------------------------- -// Menu Bar (a la Windows) -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxFrame; -class WXDLLEXPORT wxMenuBar: public wxEvtHandler -{ - DECLARE_DYNAMIC_CLASS(wxMenuBar) - -public: - wxMenuBar(); - wxMenuBar(int n, wxMenu *menus[], const wxString titles[]); - ~wxMenuBar(); - - void Append(wxMenu *menu, const wxString& title); - // Must only be used AFTER menu has been attached to frame, - // otherwise use individual menus to enable/disable items - void Enable(int Id, bool Flag); - bool Enabled(int Id) const ; - inline bool IsEnabled(int Id) const { return Enabled(Id); }; - void EnableTop(int pos, bool Flag); - void Check(int id, bool Flag); - bool Checked(int id) const ; - inline bool IsChecked(int Id) const { return Checked(Id); }; - void SetLabel(int id, const wxString& label) ; - wxString GetLabel(int id) const ; - void SetLabelTop(int pos, const wxString& label) ; - wxString GetLabelTop(int pos) const ; - virtual void Delete(wxMenu *menu, int index = 0); /* Menu not destroyed */ - virtual bool OnAppend(wxMenu *menu, const char *title); - virtual bool OnDelete(wxMenu *menu, int index); - - virtual void SetHelpString(int Id, const wxString& helpString); - virtual wxString GetHelpString(int Id) const ; - - virtual int FindMenuItem(const wxString& menuString, const wxString& itemString) const ; - - // Find wxMenuItem for item ID, and return item's - // menu too if itemMenu is non-NULL. - wxMenuItem *FindItemForId(int itemId, wxMenu **menuForItem = NULL) const ; - - inline void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; } - inline wxEvtHandler *GetEventHandler() { return m_eventHandler; } - - inline int GetMenuCount() const { return m_menuCount; } - inline wxMenu* GetMenu(int i) const { return m_menus[i]; } - - public: - wxEvtHandler * m_eventHandler; - int m_menuCount; - wxMenu ** m_menus; - wxString * m_titles; - wxFrame * m_menuBarFrame; - WXHMENU m_hMenu; -}; - -#endif // _WX_MENU_H_ diff --git a/include/wx/msw/metafile.h b/include/wx/msw/metafile.h deleted file mode 100644 index 993e8738fa..0000000000 --- a/include/wx/msw/metafile.h +++ /dev/null @@ -1,104 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: metafile.h -// Purpose: wxMetaFile, wxMetaFileDC classes -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef _WX_METAFIILE_H_ -#define _WX_METAFIILE_H_ - -#ifdef __GNUG__ -#pragma interface "metafile.h" -#endif - -#include "wx/setup.h" - -#if USE_METAFILE -#include "wx/dc.h" - -/* - * Metafile and metafile device context classes - work in Windows 3.1 only - * - */ - -class WXDLLEXPORT wxDC; -class WXDLLEXPORT wxMetaFile: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxMetaFile) - public: - wxMetaFile(const wxString& file = ""); - ~wxMetaFile(void); - - // After this is called, the metafile cannot be used for anything - // since it is now owned by the clipboard. - virtual bool SetClipboard(int width = 0, int height = 0); - - virtual bool Play(wxDC *dc); - inline bool Ok(void) { return m_metaFile != 0; }; - - // Implementation - inline WXHANDLE GetHMETAFILE(void) { return m_metaFile; } - inline void SetHMETAFILE(WXHANDLE mf) { m_metaFile = mf; } - inline int GetWindowsMappingMode(void) { return m_windowsMappingMode; } - inline void SetWindowsMappingMode(int mm) { m_windowsMappingMode = mm; } - -protected: - WXHANDLE m_metaFile; - int m_windowsMappingMode; -}; - -class WXDLLEXPORT wxMetaFileDC: public wxDC -{ - DECLARE_DYNAMIC_CLASS(wxMetaFileDC) - - public: - // Don't supply origin and extent - // Supply them to wxMakeMetaFilePlaceable instead. - wxMetaFileDC(const wxString& file = ""); - - // Supply origin and extent (recommended). - // Then don't need to supply them to wxMakeMetaFilePlaceable. - wxMetaFileDC(const wxString& file, int xext, int yext, int xorg, int yorg); - - ~wxMetaFileDC(void); - - // Should be called at end of drawing - virtual wxMetaFile *Close(void); - virtual void SetMapMode(int mode); - virtual void GetTextExtent(const wxString& string, float *x, float *y, - float *descent = NULL, float *externalLeading = NULL, - wxFont *theFont = NULL, bool use16bit = FALSE); - - // Implementation - inline wxMetaFile *GetMetaFile(void) { return m_metaFile; } - inline void SetMetaFile(wxMetaFile *mf) { m_metaFile = mf; } - inline int GetWindowsMappingMode(void) { return m_windowsMappingMode; } - inline void SetWindowsMappingMode(int mm) { m_windowsMappingMode = mm; } - -protected: - int m_windowsMappingMode; - wxMetaFile *m_metaFile; -}; - -/* - * Pass filename of existing non-placeable metafile, and bounding box. - * Adds a placeable metafile header, sets the mapping mode to anisotropic, - * and sets the window origin and extent to mimic the MM_TEXT mapping mode. - * - */ - -// No origin or extent -bool WXDLLEXPORT wxMakeMetaFilePlaceable(const wxString& filename, float scale = 1.0); - -// Optional origin and extent -bool WXDLLEXPORT wxMakeMetaFilePlaceable(const wxString& filename, int x1, int y1, int x2, int y2, float scale = 1.0, bool useOriginAndExtent = TRUE); - -#endif // USE_METAFILE -#endif - // _WX_METAFIILE_H_ diff --git a/include/wx/msw/minifram.h b/include/wx/msw/minifram.h deleted file mode 100644 index 1debcd0082..0000000000 --- a/include/wx/msw/minifram.h +++ /dev/null @@ -1,46 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: minifram.h -// Purpose: wxMiniFrame class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_MINIFRAM_H_ -#define _WX_MINIFRAM_H_ - -#ifdef __GNUG__ -#pragma interface "minifram.h" -#endif - -#include "wx/frame.h" - -class WXDLLEXPORT wxMiniFrame: public wxFrame { - - DECLARE_DYNAMIC_CLASS(wxMiniFrame) - -public: - inline wxMiniFrame(void) {} - inline wxMiniFrame(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME|wxTINY_CAPTION_HORIZ, - const wxString& name = wxFrameNameStr) - { - Create(parent, id, title, pos, size, style, name); - } - - ~wxMiniFrame(void); - - long MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); - -protected: -}; - -#endif - // _WX_MINIFRAM_H_ diff --git a/include/wx/msw/msgdlg.h b/include/wx/msw/msgdlg.h deleted file mode 100644 index 51f7d0e39d..0000000000 --- a/include/wx/msw/msgdlg.h +++ /dev/null @@ -1,49 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: msgdlg.h -// Purpose: wxMessageDialog class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_MSGBOXDLG_H_ -#define _WX_MSGBOXDLG_H_ - -#ifdef __GNUG__ -#pragma interface "msgdlg.h" -#endif - -#include "wx/setup.h" -#include "wx/dialog.h" - -/* - * Message box dialog - */ - -WXDLLEXPORT_DATA(extern const char*) wxMessageBoxCaptionStr; - -class WXDLLEXPORT wxMessageDialog: public wxDialog -{ -DECLARE_DYNAMIC_CLASS(wxMessageDialog) -protected: - wxString m_caption; - wxString m_message; - long m_dialogStyle; - wxWindow * m_parent; -public: - wxMessageDialog(wxWindow *parent, const wxString& message, const wxString& caption = wxMessageBoxCaptionStr, - long style = wxOK|wxCENTRE, const wxPoint& pos = wxDefaultPosition); - - int ShowModal(void); -}; - - -int WXDLLEXPORT wxMessageBox(const wxString& message, const wxString& caption = wxMessageBoxCaptionStr, - long style = wxOK|wxCENTRE, - wxWindow *parent = NULL, int x = -1, int y = -1); - -#endif - // _WX_MSGBOXDLG_H_ diff --git a/include/wx/msw/noentry.cur b/include/wx/msw/noentry.cur deleted file mode 100644 index b002e96b36..0000000000 Binary files a/include/wx/msw/noentry.cur and /dev/null differ diff --git a/include/wx/msw/notebook.h b/include/wx/msw/notebook.h deleted file mode 100644 index c4ebd06ffe..0000000000 --- a/include/wx/msw/notebook.h +++ /dev/null @@ -1,209 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: msw/notebook.h -// Purpose: MSW/GTK compatible notebook (a.k.a. property sheet) -// Author: Robert Roebling -// Modified by: Vadim Zeitlin for Windows version -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _NOTEBOOK_H -#define _NOTEBOOK_H - -#ifdef __GNUG__ - #pragma interface "notebook.h" -#endif - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- -#ifndef _DYNARRAY_H - #include -#endif //_DYNARRAY_H - -// ---------------------------------------------------------------------------- -// types -// ---------------------------------------------------------------------------- - -// fwd declarations -class wxImageList; -class wxWindow; - -// array of notebook pages -typedef wxWindow wxNotebookPage; // so far, any window can be a page -WX_DEFINE_ARRAY(wxNotebookPage *, wxArrayPages); - -// ---------------------------------------------------------------------------- -// notebook events -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxNotebookEvent : public wxCommandEvent -{ -public: - wxNotebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0, - int nSel = -1, int nOldSel = -1) - : wxCommandEvent(commandType, id) { m_nSel = nSel; m_nOldSel = nOldSel; } - - // accessors - // the currently selected page (-1 if none) - int GetSelection() const { return m_nSel; } - void SetSelection(int nSel) { m_nSel = nSel; } - // the page that was selected before the change (-1 if none) - int GetOldSelection() const { return m_nOldSel; } - void SetOldSelection(int nOldSel) { m_nOldSel = nOldSel; } - -private: - int m_nSel, // currently selected page - m_nOldSel; // previously selected page - - DECLARE_DYNAMIC_CLASS(wxNotebookEvent) -}; - -// ---------------------------------------------------------------------------- -// wxNotebook -// ---------------------------------------------------------------------------- - -// @@@ this class should really derive from wxTabCtrl, but the interface is not -// exactly the same, so I can't do it right now and instead we reimplement -// part of wxTabCtrl here -class WXDLLEXPORT wxNotebook : public wxControl -{ -public: - // ctors - // ----- - // default for dynamic class - wxNotebook(); - // the same arguments as for wxControl (@@@ any special styles?) - wxNotebook(wxWindow *parent, - wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = "notebook"); - // Create() function - bool Create(wxWindow *parent, - wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = "notebook"); - // dtor - ~wxNotebook(); - - // accessors - // --------- - // get number of pages in the dialog - int GetPageCount() const; - - // set the currently selected page, return the index of the previously - // selected one (or -1 on error) - // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events - int SetSelection(int nPage); - // cycle thru the tabs - void AdvanceSelection(bool bForward = TRUE); - // get the currently selected page - int GetSelection() const { return m_nSelection; } - - // set/get the title of a page - bool SetPageText(int nPage, const wxString& strText); - wxString GetPageText(int nPage) const; - - // image list stuff: each page may have an image associated with it. All - // the images belong to an image list, so you have to - // 1) create an image list - // 2) associate it with the notebook - // 3) set for each page it's image - // associate image list with a control - void SetImageList(wxImageList* imageList); - // get pointer (may be NULL) to the associated image list - wxImageList* GetImageList() const { return m_pImageList; } - - // sets/returns item's image index in the current image list - int GetPageImage(int nPage) const; - bool SetPageImage(int nPage, int nImage); - - // currently it's always 1 because wxGTK doesn't support multi-row - // tab controls - int GetRowCount() const; - - // control the appearance of the notebook pages - // set the size (the same for all pages) - void SetPageSize(const wxSize& size); - // set the padding between tabs (in pixels) - void SetPadding(const wxSize& padding); - - // operations - // ---------- - // remove one page from the notebook - bool DeletePage(int nPage); - // remove all pages - bool DeleteAllPages(); - // adds a new page to the notebook (it will be deleted ny the notebook, - // don't delete it yourself). If bSelect, this page becomes active. - bool AddPage(wxNotebookPage *pPage, - const wxString& strText, - bool bSelect = FALSE, - int imageId = -1); - // the same as AddPage(), but adds it at the specified position - bool InsertPage(int nPage, - wxNotebookPage *pPage, - const wxString& strText, - bool bSelect = FALSE, - int imageId = -1); - // get the panel which represents the given page - wxNotebookPage *GetPage(int nPage) { return m_aPages[nPage]; } - - // callbacks - // --------- - void OnSize(wxSizeEvent& event); - void OnSelChange(wxNotebookEvent& event); - void OnSetFocus(wxFocusEvent& event); - void OnNavigationKey(wxNavigationKeyEvent& event); - - // base class virtuals - // ------------------- - virtual void Command(wxCommandEvent& event); - virtual bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam); - virtual void SetConstraintSizes(bool recurse = TRUE); - virtual bool DoPhase(int nPhase); - -protected: - // common part of all ctors - void Init(); - - // helper functions - void ChangePage(int nOldSel, int nSel); // change pages - - wxImageList *m_pImageList; // we can have an associated image list - wxArrayPages m_aPages; // array of pages - - int m_nSelection; // the current selection (-1 if none) - - DECLARE_DYNAMIC_CLASS(wxNotebook) - DECLARE_EVENT_TABLE() -}; - -// ---------------------------------------------------------------------------- -// event macros -// ---------------------------------------------------------------------------- -typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&); - -#define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \ - { \ - wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, \ - id, \ - -1, \ - (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \ - NULL \ - }, - -#define EVT_NOTEBOOK_PAGE_CHANGING(id, fn) \ - { \ - wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, \ \ - id, \ - -1, \ - (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \ - NULL \ - }, - -#endif // _NOTEBOOK_H diff --git a/include/wx/msw/ole/dataobj.h b/include/wx/msw/ole/dataobj.h deleted file mode 100644 index 0f952805d1..0000000000 --- a/include/wx/msw/ole/dataobj.h +++ /dev/null @@ -1,109 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: ole/dataobj.h -// Purpose: declaration of the wxDataObject class -// Author: Vadim Zeitlin -// Modified by: -// Created: 10.05.98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_OLEDATAOBJ_H -#define _WX_OLEDATAOBJ_H - -// ---------------------------------------------------------------------------- -// forward declarations -// ---------------------------------------------------------------------------- -struct IDataObject; - -// ---------------------------------------------------------------------------- -// wxDataObject is a "smart" and polymorphic piece of data. -// -// @@@ it's currently "read-only" from COM point of view, i.e. we don't support -// SetData. We don't support all advise functions neither (but it's easy to -// do if we really want them) -// ---------------------------------------------------------------------------- - -class wxDataObject -{ -public: - // all data formats (values are the same as in windows.h, do not change!) - enum StdFormat - { - Invalid, - Text, - Bitmap, - MetafilePict, - Sylk, - Dif, - Tiff, - OemText, - Dib, - Palette, - Pendata, - Riff, - Wave, - UnicodeText, - EnhMetafile, - Hdrop, - Locale, - Max - }; - - // function to return symbolic name of clipboard format (debug messages) - static const char *GetFormatName(wxDataFormat format); - - // ctor & dtor - wxDataObject(); - ~wxDataObject(); - - // pure virtuals to override - // get the best suited format for our data - virtual wxDataFormat GetPreferredFormat() const = 0; - // decide if we support this format (should be one of values of - // StdFormat enumerations or a user-defined format) - virtual bool IsSupportedFormat(wxDataFormat format) const = 0; - // get the (total) size of data - virtual size_t GetDataSize() const = 0; - // copy raw data to provided pointer - virtual void GetDataHere(void *pBuf) const = 0; - - // accessors - // retrieve IDataObject interface (for other OLE related classes) - IDataObject *GetInterface() const { return m_pIDataObject; } - -private: - IDataObject *m_pIDataObject; // pointer to the COM interface -}; - -// ---------------------------------------------------------------------------- -// wxTextDataObject is a specialization of wxDataObject for text data -// ---------------------------------------------------------------------------- -class wxTextDataObject : public wxDataObject -{ -public: - // ctors - wxTextDataObject(); - wxTextDataObject(const wxString& strText) : m_strText(strText) { } - void Init(const wxString& strText) { m_strText = strText; } - - // implement base class pure virtuals - virtual wxDataFormat GetPreferredFormat() const - { return (wxDataFormat) wxDataObject::Text; } - virtual bool IsSupportedFormat(wxDataFormat format) const - { return format == wxDataObject::Text || format == wxDataObject::Locale; } - virtual size_t GetDataSize() const - { return m_strText.Len() + 1; } // +1 for trailing '\0'of course - virtual void GetDataHere(void *pBuf) const - { memcpy(pBuf, m_strText.c_str(), GetDataSize()); } - -private: - wxString m_strText; -}; - -// ---------------------------------------------------------------------------- -// @@@ TODO: wx{Bitmap|Metafile|...}DataObject -// ---------------------------------------------------------------------------- - -#endif //_WX_OLEDATAOBJ_H diff --git a/include/wx/msw/ole/dropsrc.h b/include/wx/msw/ole/dropsrc.h deleted file mode 100644 index e16968b285..0000000000 --- a/include/wx/msw/ole/dropsrc.h +++ /dev/null @@ -1,73 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: ole/dropsrc.h -// Purpose: declaration of the wxDropSource class -// Author: Vadim Zeitlin -// Modified by: -// Created: 06.03.98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_OLEDROPSRC_H -#define _WX_OLEDROPSRC_H - -#ifdef __GNUG__ -#pragma interface -#endif - -#if !USE_DRAG_AND_DROP - #error "You should #define USE_DRAG_AND_DROP to 1 to compile this file!" -#endif //WX_DRAG_DROP - -// ---------------------------------------------------------------------------- -// forward declarations -// ---------------------------------------------------------------------------- -class wxIDropSource; -class wxDataObject; - -// ---------------------------------------------------------------------------- -// wxDropSource is used to start the drag-&-drop operation on associated -// wxDataObject object. It's responsible for giving UI feedback while dragging. -// ---------------------------------------------------------------------------- -class wxDropSource -{ -public: - enum DragResult - { - Error, // error prevented the d&d operation from completing - None, // drag target didn't accept the data - Copy, // the data was successfully copied - Move, // the data was successfully moved - Cancel // the operation was cancelled by user (not an error) - }; - - // ctors: if you use default ctor you must call SetData() later! - // NB: the "wxWindow *win" parameter is unused and is here only for wxGTK - // compatibility - wxDropSource(wxWindow *win = NULL); - wxDropSource(wxDataObject& data, wxWindow *win = NULL); - - void SetData(wxDataObject& data); - - virtual ~wxDropSource(); - - // do it (call this in response to a mouse button press, for example) - // params: if bAllowMove is false, data can be only copied - DragResult DoDragDrop(bool bAllowMove = FALSE); - - // overridable: you may give some custom UI feedback during d&d operation - // in this function (it's called on each mouse move, so it shouldn't be too - // slow). Just return false if you want default feedback. - virtual bool GiveFeedback(DragResult effect, bool bScrolling); - -protected: - void Init(); - - wxDataObject *m_pData; // pointer to associated data object - -private: - wxIDropSource *m_pIDropSource; // the pointer to COM interface -}; - -#endif //_WX_OLEDROPSRC_H \ No newline at end of file diff --git a/include/wx/msw/ole/droptgt.h b/include/wx/msw/ole/droptgt.h deleted file mode 100644 index cf990ef5a0..0000000000 --- a/include/wx/msw/ole/droptgt.h +++ /dev/null @@ -1,111 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: ole/droptgt.h -// Purpose: declaration of the wxDropTarget class -// Author: Vadim Zeitlin -// Modified by: -// Created: 06.03.98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// prolog -// ============================================================================ -#ifndef _WX_OLEDROPTGT_H -#define _WX_OLEDROPTGT_H - -#ifdef __GNUG__ -#pragma interface "droptgt.h" -#endif - -#if !USE_DRAG_AND_DROP - #error "You should #define USE_DRAG_AND_DROP to 1 to compile this file!" -#endif //WX_DRAG_DROP - -// ---------------------------------------------------------------------------- -// forward declarations -// ---------------------------------------------------------------------------- -class wxIDropTarget; -struct IDataObject; - -// ---------------------------------------------------------------------------- -// An instance of the class wxDropTarget may be associated with any wxWindow -// derived object via SetDropTarget() function. If this is done, the virtual -// methods of wxDropTarget are called when something is dropped on the window. -// -// Note that wxDropTarget is an abstract base class (ABC) and you should derive -// your own class from it implementing pure virtual function in order to use it -// (all of them, including protected ones which are called by the class itself) -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxDropTarget -{ -public: - // ctor & dtor - wxDropTarget(); - virtual ~wxDropTarget(); - - // normally called by wxWindow on window creation/destruction, but might be - // called `manually' as well. Register() returns true on success. - bool Register(WXHWND hwnd); - void Revoke(WXHWND hwnd); - - // do we accept this kind of data? - virtual bool IsAcceptedData(IDataObject *pIDataSource) const; - - // called when mouse enters/leaves the window: might be used to give - // some visual feedback to the user - virtual void OnEnter() { } - virtual void OnLeave() { } - - // this function is called when data is dropped. - // (x, y) are the coordinates of the drop - virtual bool OnDrop(long x, long y, const void *pData) = 0; - -protected: - // Override these to indicate what kind of data you support: the first - // format to which data can be converted is used. The classes below show - // how it can be done in the simplest cases. - // how many different (clipboard) formats do you support? - virtual size_t GetFormatCount() const = 0; - // return the n-th supported format - virtual wxDataFormat GetFormat(size_t n) const = 0; - -private: - wxIDropTarget *m_pIDropTarget; // the pointer to COM interface -}; - -// ---------------------------------------------------------------------------- -// A simple wxDropTarget derived class for text data: you only need to -// override OnDropText() to get something working -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxTextDropTarget : public wxDropTarget -{ -public: - virtual bool OnDrop(long x, long y, const void *pData); - virtual bool OnDropText(long x, long y, const char *psz) = 0; - -protected: - virtual size_t GetFormatCount() const; - virtual wxDataFormat GetFormat(size_t n) const; -}; - -// ---------------------------------------------------------------------------- -// A drop target which accepts files (dragged from File Manager or Explorer) -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxFileDropTarget : public wxDropTarget -{ -public: - virtual bool OnDrop(long x, long y, const void *pData); - - // params: the number of files and the array of file names - virtual bool OnDropFiles(long x, long y, - size_t nFiles, const char * const aszFiles[]) = 0; - -protected: - virtual size_t GetFormatCount() const; - virtual wxDataFormat GetFormat(size_t n) const; -}; - -// ============================================================================ -#endif //_WX_OLEDROPTGT_H diff --git a/include/wx/msw/ole/oleutils.h b/include/wx/msw/ole/oleutils.h deleted file mode 100644 index 2335dd5468..0000000000 --- a/include/wx/msw/ole/oleutils.h +++ /dev/null @@ -1,146 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: oleutils.h -// Purpose: OLE helper routines, OLE debugging support &c -// Author: Vadim Zeitlin -// Modified by: -// Created: 19.02.1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_OLEUTILS_H -#define _WX_OLEUTILS_H - -#ifdef __GNUG__ -#pragma interface "oleutils.h" -#endif - -#include "wx/defs.h" - -// ============================================================================ -// General purpose functions and macros -// ============================================================================ - -// ---------------------------------------------------------------------------- -// misc helper functions/macros -// ---------------------------------------------------------------------------- - -// release the interface pointer (if !NULL) -inline void ReleaseInterface(IUnknown *pIUnk) -{ - if ( pIUnk != NULL ) - pIUnk->Release(); -} - -// release the interface pointer (if !NULL) and make it NULL -#define RELEASE_AND_NULL(p) if ( (p) != NULL ) { p->Release(); p = NULL; }; - -// return TRUE if the iid is in the array -bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount); - -// ============================================================================ -// IUnknown implementation helpers -// ============================================================================ - -/* - The most dumb implementation of IUnknown methods. We don't support - aggregation nor containment, but for 99% of cases this simple - implementation is quite enough. - - Usage is trivial: here is all you should have - 1) DECLARE_IUNKNOWN_METHOS in your (IUnknown derived!) class declaration - 2) BEGIN/END_IID_TABLE with ADD_IID in between for all interfaces you - support (at least all for which you intent to return 'this' from QI, - i.e. you should derive from IFoo if you have ADD_IID(Foo)) somewhere else - 3) IMPLEMENT_IUNKNOWN_METHOS somewhere also - - These macros are quite simple: AddRef and Release are trivial and QI does - lookup in a static member array of IIDs and returns 'this' if it founds - the requested interface in it or E_NOINTERFACE if not. - */ - -// declare the methods and the member variable containing reference count -// you must also define the ms_aIids array somewhere with BEGIN_IID_TABLE -// and friends (see below) -#define DECLARE_IUNKNOWN_METHODS \ - public: \ - STDMETHODIMP QueryInterface(REFIID, void **); \ - STDMETHODIMP_(ULONG) AddRef(); \ - STDMETHODIMP_(ULONG) Release(); \ - private: \ - static const IID *ms_aIids[]; \ - ULONG m_cRef - -// macros for declaring supported interfaces -// NB: you should write ADD_INTERFACE(Foo) and not ADD_INTERFACE(IID_IFoo)! -#define BEGIN_IID_TABLE(cname) const IID *cname::ms_aIids[] = { -#define ADD_IID(iid) &IID_I##iid, -#define END_IID_TABLE } - -// implementation is as straightforward as possible -// Parameter: classname - the name of the class -#define IMPLEMENT_IUNKNOWN_METHODS(classname) \ - STDMETHODIMP classname::QueryInterface(REFIID riid, void **ppv) \ - { \ - wxLogQueryInterface(#classname, riid); \ - \ - if ( IsIidFromList(riid, ms_aIids, WXSIZEOF(ms_aIids)) ) { \ - *ppv = this; \ - AddRef(); \ - \ - return S_OK; \ - } \ - else { \ - *ppv = NULL; \ - \ - return (HRESULT) E_NOINTERFACE; \ - } \ - } \ - \ - STDMETHODIMP_(ULONG) classname::AddRef() \ - { \ - wxLogAddRef(#classname, m_cRef); \ - \ - return ++m_cRef; \ - } \ - \ - STDMETHODIMP_(ULONG) classname::Release() \ - { \ - wxLogRelease(#classname, m_cRef); \ - \ - if ( --m_cRef == 0 ) { \ - delete this; \ - return 0; \ - } \ - else \ - return m_cRef; \ - } - -// ============================================================================ -// Debugging support -// ============================================================================ - -#if defined(__WXDEBUG__) && defined(_MSC_VER) && (_MSC_VER > 1000) -// ---------------------------------------------------------------------------- -// -// ---------------------------------------------------------------------------- - -// ---------------------------------------------------------------------------- -// All OLE specific log functions have DebugTrace level (as LogTrace) -// ---------------------------------------------------------------------------- - -// tries to translate riid into a symbolic name, if possible -void wxLogQueryInterface(const char *szInterface, REFIID riid); - -// these functions print out the new value of reference counter -void wxLogAddRef (const char *szInterface, ULONG cRef); -void wxLogRelease(const char *szInterface, ULONG cRef); - -#else //!WXDEBUG - #define wxLogQueryInterface(szInterface, riid) - #define wxLogAddRef(szInterface, cRef) - #define wxLogRelease(szInterface, cRef) -#endif //WXDEBUG - -#endif //_WX_OLEUTILS_H \ No newline at end of file diff --git a/include/wx/msw/ole/uuid.h b/include/wx/msw/ole/uuid.h deleted file mode 100644 index 4da624b09e..0000000000 --- a/include/wx/msw/ole/uuid.h +++ /dev/null @@ -1,91 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: ole/uuid.h -// Purpose: encapsulates an UUID with some added helper functions -// Author: Vadim Zeitlin -// Modified by: -// Created: 11.07.97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows licence -// -// Notes: you should link your project with RPCRT4.LIB! -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_OLEUUID_H -#define _WX_OLEUUID_H - -#ifdef __GNUG__ -#pragma interface "uuid.h" -#endif - -// ------------------------------------------------------------------ -// UUID (Universally Unique IDentifier) definition -// ------------------------------------------------------------------ - -// ----- taken from RPC.H -#ifndef UUID_DEFINED // in some cases RPC.H will be already - #ifdef __WIN32__ // included, so avoid redefinition - typedef struct - { - unsigned long Data1; - unsigned short Data2; - unsigned short Data3; - unsigned char Data4[8]; - } UUID; // UUID = GUID = CLSID = LIBID = IID - #else // WIN16 - #error "Don't know about UUIDs on this platform" - #endif // WIN32 -#endif // UUID_DEFINED - -#ifndef GUID_DEFINED - typedef UUID GUID; - #define UUID_DEFINED // prevent redefinition -#endif // GUID_DEFINED - -typedef unsigned char uchar; - -// ------------------------------------------------------------------ -// a class to store UUID and it's string representation -// ------------------------------------------------------------------ - -// uses RPC functions to create/convert Universally Unique Identifiers -class Uuid -{ -private: - UUID m_uuid; - uchar *m_pszUuid; // this string is alloc'd and freed by RPC - char *m_pszCForm; // this string is allocated in Set/Create - - void UuidToCForm(); - - // function used to set initial state by all ctors - void Init() { m_pszUuid = NULL; m_pszCForm = NULL; } - -public: - // ctors & dtor - Uuid() { Init(); } - Uuid(const char *pc) { Init(); Set(pc); } - Uuid(const UUID &uuid) { Init(); Set(uuid); } - ~Uuid(); - - // copy ctor and assignment operator needed for this class - Uuid(const Uuid& uuid); - Uuid& operator=(const Uuid& uuid); - - // create a brand new UUID - void Create(); - - // set value of UUID - bool Set(const char *pc); // from a string, returns true if ok - void Set(const UUID& uuid); // from another UUID (never fails) - - // accessors - operator const UUID*() const { return &m_uuid; } - operator const char*() const { return (char *)(m_pszUuid); } - - // return string representation of the UUID in the C form - // (as in DEFINE_GUID macro) - const char *CForm() const { return m_pszCForm; } -}; - -#endif //_WX_OLEUUID_H \ No newline at end of file diff --git a/include/wx/msw/palette.h b/include/wx/msw/palette.h deleted file mode 100644 index 510882fa18..0000000000 --- a/include/wx/msw/palette.h +++ /dev/null @@ -1,66 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: palette.h -// Purpose: wxPalette class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_PALETTE_H_ -#define _WX_PALETTE_H_ - -#ifdef __GNUG__ -#pragma interface "palette.h" -#endif - -#include "wx/gdiobj.h" - -class WXDLLEXPORT wxPalette; - -class WXDLLEXPORT wxPaletteRefData: public wxGDIRefData -{ - friend class WXDLLEXPORT wxPalette; -public: - wxPaletteRefData(void); - ~wxPaletteRefData(void); -protected: - WXHPALETTE m_hPalette; -}; - -#define M_PALETTEDATA ((wxPaletteRefData *)m_refData) - -class WXDLLEXPORT wxPalette: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxPalette) - -public: - wxPalette(void); - inline wxPalette(const wxPalette& palette) { Ref(palette); } - inline wxPalette(const wxPalette* palette) { /* UnRef(); */ if (palette) Ref(*palette); } - - wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); - ~wxPalette(void); - bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); - int GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const; - bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const; - - virtual bool Ok(void) const { return (m_refData != NULL) ; } - - inline wxPalette& operator = (const wxPalette& palette) { if (*this == palette) return (*this); Ref(palette); return *this; } - inline bool operator == (const wxPalette& palette) { return m_refData == palette.m_refData; } - inline bool operator != (const wxPalette& palette) { return m_refData != palette.m_refData; } - - virtual bool FreeResource(bool force = FALSE); - - inline WXHPALETTE GetHPALETTE(void) const { return (M_PALETTEDATA ? M_PALETTEDATA->m_hPalette : 0); } - void SetHPALETTE(WXHPALETTE pal); -}; - -#define wxColorMap wxPalette -#define wxColourMap wxPalette - -#endif - // _WX_PALETTE_H_ diff --git a/include/wx/msw/pbrush.cur b/include/wx/msw/pbrush.cur deleted file mode 100644 index 97212e3faa..0000000000 Binary files a/include/wx/msw/pbrush.cur and /dev/null differ diff --git a/include/wx/msw/pen.h b/include/wx/msw/pen.h deleted file mode 100644 index 7635328dbd..0000000000 --- a/include/wx/msw/pen.h +++ /dev/null @@ -1,100 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: pen.h -// Purpose: wxPen class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_PEN_H_ -#define _WX_PEN_H_ - -#ifdef __GNUG__ -#pragma interface "pen.h" -#endif - -#include "wx/gdiobj.h" - -typedef WXDWORD wxDash ; - -class WXDLLEXPORT wxPen; - -class WXDLLEXPORT wxPenRefData: public wxGDIRefData -{ - friend class WXDLLEXPORT wxPen; -public: - wxPenRefData(void); - wxPenRefData(const wxPenRefData& data); - ~wxPenRefData(void); - -protected: - int m_width; - int m_style; - int m_join ; - int m_cap ; - wxBitmap m_stipple ; - int m_nbDash ; - wxDash * m_dash ; - wxColour m_colour; - WXHPEN m_hPen; -}; - -#define M_PENDATA ((wxPenRefData *)m_refData) - -// Pen -class WXDLLEXPORT wxPen: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxPen) -public: - wxPen(void); - wxPen(const wxColour& col, int width, int style); - wxPen(const wxString& col, int width, int style); - wxPen(const wxBitmap& stipple, int width); - inline wxPen(const wxPen& pen) { Ref(pen); } - inline wxPen(const wxPen* pen) { if (pen) Ref(*pen); } - ~wxPen(void); - - inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; } - inline bool operator == (const wxPen& pen) { return m_refData == pen.m_refData; } - inline bool operator != (const wxPen& pen) { return m_refData != pen.m_refData; } - - virtual bool Ok(void) const { return (m_refData != NULL) ; } - - // Override in order to recreate the pen - void SetColour(const wxColour& col) ; - void SetColour(const wxString& col) ; - void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ; - - void SetWidth(int width) ; - void SetStyle(int style) ; - void SetStipple(const wxBitmap& stipple) ; - void SetDashes(int nb_dashes, const wxDash *dash) ; - void SetJoin(int join) ; - void SetCap(int cap) ; - - inline wxColour& GetColour(void) const { return (M_PENDATA ? M_PENDATA->m_colour : wxNullColour); }; - inline int GetWidth(void) const { return (M_PENDATA ? M_PENDATA->m_width : 0); }; - inline int GetStyle(void) const { return (M_PENDATA ? M_PENDATA->m_style : 0); }; - inline int GetJoin(void) const { return (M_PENDATA ? M_PENDATA->m_join : 0); }; - inline int GetCap(void) const { return (M_PENDATA ? M_PENDATA->m_cap : 0); }; - inline int GetDashes(wxDash **ptr) const { - *ptr = (M_PENDATA ? M_PENDATA->m_dash : NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 0); - } - - inline wxBitmap *GetStipple(void) const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : NULL); }; - - // Internal - bool RealizeResource(void); - bool FreeResource(bool force = FALSE); - WXHANDLE GetResourceHandle(void) ; - bool IsFree(void); - void Unshare(); -}; - -int wx2msPenStyle(int wx_style); - -#endif - // _WX_PEN_H_ diff --git a/include/wx/msw/pencil.cur b/include/wx/msw/pencil.cur deleted file mode 100644 index 231ed1e79f..0000000000 Binary files a/include/wx/msw/pencil.cur and /dev/null differ diff --git a/include/wx/msw/pnghand.h b/include/wx/msw/pnghand.h deleted file mode 100644 index 3fb34992fe..0000000000 --- a/include/wx/msw/pnghand.h +++ /dev/null @@ -1,31 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: pnghand.h -// Purpose: PNG bitmap handler -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Microsoft, Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma interface "pnghand.h" -#endif - -class WXDLLEXPORT wxPNGFileHandler: public wxBitmapHandler -{ - DECLARE_DYNAMIC_CLASS(wxPNGFileHandler) -public: - inline wxPNGFileHandler(void) - { - m_name = "PNG bitmap file"; - m_extension = "bmp"; - m_type = wxBITMAP_TYPE_PNG; - }; - - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth, int desiredHeight); - virtual bool SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL); -}; - diff --git a/include/wx/msw/pngread.h b/include/wx/msw/pngread.h deleted file mode 100644 index 637904521a..0000000000 --- a/include/wx/msw/pngread.h +++ /dev/null @@ -1,294 +0,0 @@ -/* - * File: pngread.h - * Purpose: PNG file reader - * Author: Alejandro Aguilar Sierra/Julian Smart - * Created: 1995 - * Copyright: (c) 1995, Alejandro Aguilar Sierra - * - * - */ - -#ifndef _WX_PNGREAD__ -#define _WX_PNGREAD__ - -#ifdef __GNUG__ -#pragma interface "pngread.h" -#endif - -#ifndef byte -typedef unsigned char byte; -#endif - -#define WXIMA_COLORS DIB_PAL_COLORS - -#ifdef __WIN32__ -typedef byte* ImagePointerType; -#else -typedef byte huge* ImagePointerType; -#endif - -typedef struct -{ - byte red; - byte green; - byte blue; -} rgb_color_struct; - - -#define COLORTYPE_PALETTE 1 -#define COLORTYPE_COLOR 2 -#define COLORTYPE_ALPHA 4 - -class wxPNGReader -{ -protected: - int filetype; - char filename[255]; - ImagePointerType RawImage; // Image data - - int Width, Height; // Dimensions - int Depth; // (bits x pixel) - int ColorType; // Bit 1 = Palette used - // Bit 2 = Color used - // Bit 3 = Alpha used - - long EfeWidth; // Efective Width - - LPBITMAPINFOHEADER lpbi; - int bgindex; - wxPalette* Palette; - bool imageOK; -friend class wxPNGReaderIter; -public: - wxPNGReader(void); - wxPNGReader (char* ImageFileName); // Read an image file - ~wxPNGReader (); - - void Create(int width, int height, int deep, int colortype=-1); - - bool ReadFile( char* ImageFileName=0 ); - bool SaveFile( char* ImageFileName=0 ); - bool SaveXPM(char *filename, char *name = 0); - int GetWidth( void ) const { return Width; }; - int GetHeight( void ) const { return Height; }; - int GetDepth( void ) const { return Depth; }; - int GetColorType( void ) const { return ColorType; }; - - int GetIndex(int x, int y); - bool GetRGB(int x, int y, byte* r, byte* g, byte* b); - - bool SetIndex(int x, int y, int index); - bool SetRGB(int x, int y, byte r, byte g, byte b); - - // ColorMap settings - bool SetPalette(wxPalette* colourmap); - bool SetPalette(int n, rgb_color_struct *rgb_struct); - bool SetPalette(int n, byte *r, byte *g=0, byte *b=0); - wxPalette* GetPalette() const { return Palette; } - - void NullData(); - inline int GetBGIndex(void) { return bgindex; } - - inline bool Inside(int x, int y) - { return (0<=y && yRawImage; - Itx = Ity = 0; - Stepx = Stepy = 0; -} - -inline -wxPNGReaderIter::operator wxPNGReader* () -{ - return ima; -} - -inline -bool wxPNGReaderIter::ItOK () -{ - if (ima) - return ima->Inside(Itx, Ity); - else - return FALSE; -} - - -inline void wxPNGReaderIter::reset() -{ - IterImage = ima->RawImage; - Itx = Ity = 0; -} - -inline void wxPNGReaderIter::upset() -{ - Itx = 0; - Ity = ima->Height-1; - IterImage = ima->RawImage + ima->EfeWidth*(ima->Height-1); -} - -inline bool wxPNGReaderIter::NextRow() -{ - if (++Ity >= ima->Height) return 0; - IterImage += ima->EfeWidth; - return 1; -} - -inline bool wxPNGReaderIter::PrevRow() -{ - if (--Ity < 0) return 0; - IterImage -= ima->EfeWidth; - return 1; -} - -////////////////////////// AD - for interlace /////////////////////////////// -inline void wxPNGReaderIter::SetY(int y) -{ - if ((y < 0) || (y > ima->Height)) return; - Ity = y; - IterImage = ima->RawImage + ima->EfeWidth*y; -} - -///////////////////////////////////////////////////////////////////////////// - -inline void wxPNGReaderIter::SetRow(byte *buf, int n) -{ -// Here should be bcopy or memcpy - //_fmemcpy(IterImage, (void far *)buf, n); - if (n<0) - n = ima->GetWidth(); - - for (int i=0; iEfeWidth) - return 1; - else - if (++Ity < ima->Height) - { - IterImage += ima->EfeWidth; - Itx = 0; - return 1; - } else - return 0; -} - -inline bool wxPNGReaderIter::PrevByte() -{ - if (--Itx >= 0) - return 1; - else - if (--Ity >= 0) - { - IterImage -= ima->EfeWidth; - Itx = 0; - return 1; - } else - return 0; -} - -inline bool wxPNGReaderIter::NextStep() -{ - Itx += Stepx; - if (Itx < ima->EfeWidth) - return 1; - else { - Ity += Stepy; - if (Ity < ima->Height) - { - IterImage += ima->EfeWidth; - Itx = 0; - return 1; - } else - return 0; - } -} - -inline bool wxPNGReaderIter::PrevStep() -{ - Itx -= Stepx; - if (Itx >= 0) - return 1; - else { - Ity -= Stepy; - if (Ity >= 0 && Ity < ima->Height) - { - IterImage -= ima->EfeWidth; - Itx = 0; - return 1; - } else - return 0; - } -} - -#endif - diff --git a/include/wx/msw/pntleft.cur b/include/wx/msw/pntleft.cur deleted file mode 100644 index 222b25b864..0000000000 Binary files a/include/wx/msw/pntleft.cur and /dev/null differ diff --git a/include/wx/msw/pntright.cur b/include/wx/msw/pntright.cur deleted file mode 100644 index e9b6b5037e..0000000000 Binary files a/include/wx/msw/pntright.cur and /dev/null differ diff --git a/include/wx/msw/printdlg.h b/include/wx/msw/printdlg.h deleted file mode 100644 index cf14ef75b0..0000000000 --- a/include/wx/msw/printdlg.h +++ /dev/null @@ -1,71 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: printdlg.h -// Purpose: wxPrintDialog, wxPageSetupDialog classes -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_PRINTDLG_H_ -#define _WX_PRINTDLG_H_ - -#ifdef __GNUG__ -#pragma interface "printdlg.h" -#endif - -#include "wx/dialog.h" -#include "wx/cmndata.h" - -/* - * wxPrinterDialog - * The common dialog for printing. - */ - -class WXDLLEXPORT wxDC; -class WXDLLEXPORT wxPrintDialog: public wxDialog -{ - DECLARE_DYNAMIC_CLASS(wxPrintDialog) - - private: - wxPrintData printData; - wxDC *printerDC; - bool destroyDC; - char *deviceName; - char *driverName; - char *portName; - wxWindow *dialogParent; - public: - wxPrintDialog(void); - wxPrintDialog(wxWindow *parent, wxPrintData* data = NULL); - ~wxPrintDialog(void); - - bool Create(wxWindow *parent, wxPrintData* data = NULL); - virtual int ShowModal(void); - - inline wxPrintData& GetPrintData(void) { return printData; } - virtual wxDC *GetPrintDC(void); -}; - -class WXDLLEXPORT wxPageSetupDialog: public wxDialog -{ - DECLARE_DYNAMIC_CLASS(wxPageSetupDialog) - - private: - wxPageSetupData m_pageSetupData; - wxWindow* m_dialogParent; - public: - wxPageSetupDialog(void); - wxPageSetupDialog(wxWindow *parent, wxPageSetupData *data = NULL); - ~wxPageSetupDialog(void); - - bool Create(wxWindow *parent, wxPageSetupData *data = NULL); - virtual int ShowModal(void); - - inline wxPageSetupData& GetPageSetupData(void) { return m_pageSetupData; } -}; - -#endif - // _WX_PRINTDLG_H_ diff --git a/include/wx/msw/printwin.h b/include/wx/msw/printwin.h deleted file mode 100644 index 2f92fa3ca9..0000000000 --- a/include/wx/msw/printwin.h +++ /dev/null @@ -1,59 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: printwin.h -// Purpose: wxWindowsPrinter, wxWindowsPrintPreview classes -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_PRINTWIN_H_ -#define _WX_PRINTWIN_H_ - -#ifdef __GNUG__ -#pragma interface "printwin.h" -#endif - -#include "wx/prntbase.h" - -/* - * Represents the printer: manages printing a wxPrintout object - */ - -class WXDLLEXPORT wxWindowsPrinter: public wxPrinterBase -{ - DECLARE_DYNAMIC_CLASS(wxWindowsPrinter) - - public: - wxWindowsPrinter(wxPrintData *data = NULL); - ~wxWindowsPrinter(void); - - virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = TRUE); - virtual bool PrintDialog(wxWindow *parent); - virtual bool Setup(wxWindow *parent); - - private: - WXFARPROC m_lpAbortProc; -}; - -/* - * wxPrintPreview - * Programmer creates an object of this class to preview a wxPrintout. - */ - -class WXDLLEXPORT wxWindowsPrintPreview: public wxPrintPreviewBase -{ - DECLARE_CLASS(wxWindowsPrintPreview) - - public: - wxWindowsPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting = NULL, wxPrintData *data = NULL); - ~wxWindowsPrintPreview(void); - - virtual bool Print(bool interactive); - virtual void DetermineScaling(void); -}; - -#endif - // _WX_PRINTWIN_H_ diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h deleted file mode 100644 index c764c5641f..0000000000 --- a/include/wx/msw/private.h +++ /dev/null @@ -1,155 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: private.h -// Purpose: Private declarations -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_PRIVATE_H_ -#define _WX_PRIVATE_H_ - -#include "wx/defs.h" - -#include - -#define VIEWPORT_EXTENT 1000 - -class WXDLLEXPORT wxFont ; - -void WXDLLEXPORT wxGetCharSize(WXHWND wnd, int *x, int *y,wxFont *the_font); -void WXDLLEXPORT wxSliderEvent(WXHWND control, WXWORD wParam, WXWORD pos); -wxWindow* WXDLLEXPORT wxFindWinFromHandle(WXHWND hWnd); -void WXDLLEXPORT wxScrollBarEvent(WXHWND hbar, WXWORD wParam, WXWORD pos); - -WXDLLEXPORT_DATA(extern HICON) wxSTD_FRAME_ICON; -WXDLLEXPORT_DATA(extern HICON) wxSTD_MDIPARENTFRAME_ICON; -WXDLLEXPORT_DATA(extern HICON) wxSTD_MDICHILDFRAME_ICON; -WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_FRAME_ICON; -WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_MDIPARENTFRAME_ICON; -WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_MDICHILDFRAME_ICON; -WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT; - -extern HINSTANCE WXDLLEXPORT wxGetInstance(); -void WXDLLEXPORT wxFillLogFont(LOGFONT *logFont, wxFont *font); -wxFont WXDLLEXPORT wxCreateFontFromLogFont(LOGFONT *logFont); // , bool createNew = TRUE); - -#ifdef __GNUWIN32__ -# define CASTWNDPROC (long unsigned) -#else -# ifdef __BORLANDC__ -# define CASTWNDPROC -# else -# if defined (__WIN32__) && defined(STRICT) - typedef long (_stdcall * WndProcCast) (HWND, unsigned int, unsigned int, long); -# define CASTWNDPROC (WndProcCast) -# else -# define CASTWNDPROC -# endif -# endif -#endif - -#if !defined(APIENTRY) // NT defines APIENTRY, 3.x not -#define APIENTRY FAR PASCAL -#endif - -#ifdef __WIN32__ -#define _EXPORT /**/ -#else -#define _EXPORT _export -typedef signed short int SHORT ; -#endif - -#if !defined(__WIN32__) // 3.x uses FARPROC for dialogs -#define DLGPROC FARPROC -#endif - -#if USE_PENWIN -void WXDLLEXPORT wxRegisterPenWin(void); -void WXDLLEXPORT wxCleanUpPenWin(void); -void WXDLLEXPORT wxEnablePenAppHooks (bool hook); -#endif - -#if USE_ITSY_BITSY -#define IBS_HORZCAPTION 0x4000L -#define IBS_VERTCAPTION 0x8000L - -UINT WINAPI ibGetCaptionSize( HWND hWnd ) ; -UINT WINAPI ibSetCaptionSize( HWND hWnd, UINT nSize ) ; -LRESULT WINAPI ibDefWindowProc( HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam ) ; -VOID WINAPI ibAdjustWindowRect( HWND hWnd, LPRECT lprc ) ; -#endif - -/* When implementing a new item, be sure to: - * - * - add the item to the parent panel - * - set window_parent to the parent - * - NULL any extra child window pointers not created for this item - * (e.g. label control that wasn't needed) - * - delete any extra child windows in the destructor (e.g. label control) - * - implement GetSize and SetSize - * - to find panel position if coordinates are (-1, -1), use GetPosition - * - call AdvanceCursor after creation, for panel layout mechanism. - * - */ - -#if CTL3D -#include -#endif - -/* - * Decide what window classes we're going to use - * for this combination of CTl3D/FAFA settings - */ - -#define STATIC_CLASS "STATIC" -#define STATIC_FLAGS (SS_LEFT|WS_CHILD|WS_VISIBLE) -#define CHECK_CLASS "BUTTON" -#define CHECK_FLAGS (BS_AUTOCHECKBOX|WS_TABSTOP|WS_CHILD) -#define CHECK_IS_FAFA FALSE -#define RADIO_CLASS "BUTTON" -#define RADIO_FLAGS (BS_AUTORADIOBUTTON|WS_CHILD|WS_VISIBLE) -#define RADIO_SIZE 20 -#define RADIO_IS_FAFA FALSE -#define PURE_WINDOWS -#define GROUP_CLASS "BUTTON" -#define GROUP_FLAGS (BS_GROUPBOX|WS_CHILD|WS_VISIBLE) - -/* -#define BITCHECK_FLAGS (FB_BITMAP|FC_BUTTONDRAW|FC_DEFAULT|WS_VISIBLE) -#define BITRADIO_FLAGS (FC_BUTTONDRAW|FB_BITMAP|FC_RADIO|WS_CHILD|WS_VISIBLE) -*/ - -#define MEANING_CHARACTER '0' -#define DEFAULT_ITEM_WIDTH 200 -#define DEFAULT_ITEM_HEIGHT 80 -#define EDIT_CONTROL_FACTOR (15.0/10.0) - // Scale font to get edit control height - -// Generic subclass proc, for panel item moving/sizing and intercept -// EDIT control VK_RETURN messages -extern LONG APIENTRY _EXPORT - wxSubclassedGenericControlProc(WXHWND hWnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); - -// Find maximum size of window/rectangle -extern void WXDLLEXPORT wxFindMaxSize(WXHWND hwnd, RECT *rect); - -// List of scrollbar controls -WXDLLEXPORT_DATA(extern wxList) wxScrollBarList; -// The MakeProcInstance version of the function wxSubclassedGenericControlProc -WXDLLEXPORT_DATA(extern FARPROC) wxGenericControlSubClassProc; -WXDLLEXPORT_DATA(extern char*) wxBuffer; -WXDLLEXPORT_DATA(extern HINSTANCE) wxhInstance; - -wxWindow* WXDLLEXPORT wxFindControlFromHandle(WXHWND hWnd); -void WXDLLEXPORT wxAddControlHandle(WXHWND hWnd, wxWindow *item); - -#if !defined(__WIN32__) && !defined(WS_EX_CLIENTEDGE) -#define WS_EX_CLIENTEDGE 0 -#endif - -#endif - // _WX_PRIVATE_H_ diff --git a/include/wx/msw/query.cur b/include/wx/msw/query.cur deleted file mode 100644 index 3578e90fd9..0000000000 Binary files a/include/wx/msw/query.cur and /dev/null differ diff --git a/include/wx/msw/radiobox.h b/include/wx/msw/radiobox.h deleted file mode 100644 index ba988b1022..0000000000 --- a/include/wx/msw/radiobox.h +++ /dev/null @@ -1,139 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: radiobox.h -// Purpose: wxRadioBox class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_RADIOBOX_H_ -#define _WX_RADIOBOX_H_ - -#ifdef __GNUG__ -#pragma interface "radiobox.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxRadioBoxNameStr; - -// List box item -class WXDLLEXPORT wxBitmap ; - -class WXDLLEXPORT wxRadioBox: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxRadioBox) -public: - wxRadioBox(void); - -#if WXWIN_COMPATIBILITY - wxRadioBox(wxWindow *parent, wxFunction func, const char *title, - int x = -1, int y = -1, int width = -1, int height = -1, - int n = 0, char **choices = NULL, - int majorDim = 0, long style = wxRA_HORIZONTAL, const char *name = wxRadioBoxNameStr); - -/* - inline wxRadioBox(wxWindow *parent, wxFunction func, const char *title, - int x, int y, int width, int height, - int n, wxBitmap **choices, - int majorDim = 0, long style = wxRA_HORIZONTAL, const char *name = wxRadioBoxNameStr) - { - Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), n, (const wxBitmap **)choices, majorDim, style, - wxDefaultValidator, name); - Callback(func); - } -*/ - -#endif - - inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - int majorDim = 0, long style = wxRA_HORIZONTAL, - const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr) - { - Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name); - } - -/* - wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxBitmap *choices[] = NULL, - int majorDim = 0, long style = wxRA_HORIZONTAL, - const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr) - { - Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name); - } -*/ - - ~wxRadioBox(void); - - bool Create(wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - int majorDim = 0, long style = wxRA_HORIZONTAL, - const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); - -/* - bool Create(wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxBitmap *choices[] = NULL, - int majorDim = 0, long style = wxRA_HORIZONTAL, - const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); -*/ - - virtual bool MSWCommand(WXUINT param, WXWORD id); - virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam); - - int FindString(const wxString& s) const; - void SetSelection(int N); - int GetSelection(void) const; - wxString GetString(int N) const; - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - void GetSize(int *x, int *y) const; - void GetPosition(int *x, int *y) const; - wxString GetLabel(void) const; - void SetLabel(const wxString& label); - void SetLabel(int item, const wxString& label) ; - void SetLabel(int item, wxBitmap *bitmap) ; - wxString GetLabel(int item) const; - bool Show(bool show); - void SetFocus(void); - void Enable(bool enable); - void Enable(int item, bool enable); - void Show(int item, bool show) ; - inline void SetLabelFont(const wxFont& WXUNUSED(font)) {}; - inline void SetButtonFont(const wxFont& font) { SetFont(font); } - - virtual wxString GetStringSelection(void) const; - virtual bool SetStringSelection(const wxString& s); - inline virtual int Number(void) const { return m_noItems; } ; - void Command(wxCommandEvent& event); - - inline int GetNumberOfRowsOrCols(void) const { return m_noRowsOrCols; } - inline void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; } - - // Implementation - inline WXHWND *GetRadioButtons(void) const { return m_radioButtons; } - bool ContainsHWND(WXHWND hWnd) const ; - - long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); - -protected: - WXHWND * m_radioButtons; - int m_majorDim ; - int * m_radioWidth ; // for bitmaps - int * m_radioHeight ; - - int m_noItems; - int m_noRowsOrCols; - int m_selectedButton; - -}; - -#endif - // _WX_RADIOBOX_H_ diff --git a/include/wx/msw/radiobut.h b/include/wx/msw/radiobut.h deleted file mode 100644 index a2514e7574..0000000000 --- a/include/wx/msw/radiobut.h +++ /dev/null @@ -1,92 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: radiobut.h -// Purpose: wxRadioButton class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_RADIOBUT_H_ -#define _WX_RADIOBUT_H_ - -#ifdef __GNUG__ -#pragma interface "radiobut.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxRadioButtonNameStr; - -class WXDLLEXPORT wxRadioButton: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxRadioButton) - protected: - public: - inline wxRadioButton(void) {} - inline wxRadioButton(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr); - - virtual void SetLabel(const wxString& label); - virtual void SetValue(bool val); - virtual bool GetValue(void) const ; - - void Command(wxCommandEvent& event); - virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam); -}; - -// Not implemented -#if 0 -class WXDLLEXPORT wxBitmap ; - -WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr; - -class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton -{ - DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton) - protected: - wxBitmap *theButtonBitmap; - public: - inline wxBitmapRadioButton(void) { theButtonBitmap = NULL; } - inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id, - const wxBitmap *label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxBitmapRadioButtonNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxBitmap *label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxBitmapRadioButtonNameStr); - - virtual void SetLabel(const wxBitmap *label); - virtual void SetValue(bool val) ; - virtual bool GetValue(void) const ; -}; -#endif - -#endif - // _WX_RADIOBUT_H_ diff --git a/include/wx/msw/regconf.h b/include/wx/msw/regconf.h deleted file mode 100644 index 3c33e2731a..0000000000 --- a/include/wx/msw/regconf.h +++ /dev/null @@ -1,98 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: msw/regconf.h -// Purpose: Registry based implementation of wxConfigBase -// Author: Vadim Zeitlin -// Modified by: -// Created: 27.04.98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _REGCONF_H -#define _REGCONF_H - -#ifdef __GNUG__ -#pragma interface "regconf.h" -#endif - -#ifndef _REGISTRY_H - #include -#endif - -// ---------------------------------------------------------------------------- -// wxRegConfig -// ---------------------------------------------------------------------------- - -class wxRegConfig : public wxConfigBase -{ -public: - // ctor & dtor - // will store data in HKLM\appName and HKCU\appName - wxRegConfig(const wxString& appName = wxEmptyString, const wxString& vendorName = wxEmptyString, - const wxString& localFilename = wxEmptyString, const wxString& globalFilename = wxEmptyString, - long style = 0); - - // dtor will save unsaved data - virtual ~wxRegConfig(); - - // implement inherited pure virtual functions - // ------------------------------------------ - - // path management - virtual void SetPath(const wxString& strPath); - virtual const wxString& GetPath() const { return m_strPath; } - - // entry/subgroup info - // enumerate all of them - virtual bool GetFirstGroup(wxString& str, long& lIndex) const; - virtual bool GetNextGroup (wxString& str, long& lIndex) const; - virtual bool GetFirstEntry(wxString& str, long& lIndex) const; - virtual bool GetNextEntry (wxString& str, long& lIndex) const; - - // tests for existence - virtual bool HasGroup(const wxString& strName) const; - virtual bool HasEntry(const wxString& strName) const; - - // get number of entries/subgroups in the current group, with or without - // it's subgroups - virtual size_t GetNumberOfEntries(bool bRecursive = FALSE) const; - virtual size_t GetNumberOfGroups(bool bRecursive = FALSE) const; - - // read/write - bool Read(const wxString& key, wxString *pStr) const; - bool Read(const wxString& key, wxString *pStr, const wxString& szDefault) const; - bool Read(const wxString& key, long *plResult) const; - - // The following are necessary to satisfy the compiler - wxString Read(const wxString& key, const wxString& defVal) const - { return wxConfigBase::Read(key, defVal); } - bool Read(const wxString& key, long *pl, long defVal) const - { return wxConfigBase::Read(key, pl, defVal); } - long Read(const wxString& key, long defVal) const - { return wxConfigBase::Read(key, defVal); } - bool Read(const wxString& key, double* val) const - { return wxConfigBase::Read(key, val); } - bool Read(const wxString& key, double* val, double defVal) const - { return wxConfigBase::Read(key, val, defVal); } - - bool Write(const wxString& key, const wxString& szValue); - bool Write(const wxString& key, long lValue); - - virtual bool Flush(bool /* bCurrentOnly = FALSE */ ) { return TRUE; } - - // delete - virtual bool DeleteEntry(const wxString& key, bool bGroupIfEmptyAlso); - virtual bool DeleteGroup(const wxString& key); - virtual bool DeleteAll(); - -private: - // these keys are opened during all lifetime of wxRegConfig object - wxRegKey m_keyLocalRoot, m_keyLocal, - m_keyGlobalRoot, m_keyGlobal; - - // current path (not '/' terminated) - wxString m_strPath; -}; - -#endif //_REGCONF_H diff --git a/include/wx/msw/region.h b/include/wx/msw/region.h deleted file mode 100644 index 0ac45586ec..0000000000 --- a/include/wx/msw/region.h +++ /dev/null @@ -1,137 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: region.h -// Purpose: wxRegion class -// Author: Markus Holzem, Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_REGION_H_ -#define _WX_REGION_H_ - -#ifdef __GNUG__ -#pragma interface "region.h" -#endif - -#include "wx/list.h" -#include "wx/gdiobj.h" - -class WXDLLEXPORT wxRect; -class WXDLLEXPORT wxPoint; - -enum wxRegionContain { - wxOutRegion = 0, wxPartRegion = 1, wxInRegion = 2 -}; - -// So far, for internal use only -enum wxRegionOp { -wxRGN_AND, // Creates the intersection of the two combined regions. -wxRGN_COPY, // Creates a copy of the region identified by hrgnSrc1. -wxRGN_DIFF, // Combines the parts of hrgnSrc1 that are not part of hrgnSrc2. -wxRGN_OR, // Creates the union of two combined regions. -wxRGN_XOR // Creates the union of two combined regions except for any overlapping areas. -}; - -class WXDLLEXPORT wxRegion : public wxGDIObject { -DECLARE_DYNAMIC_CLASS(wxRegion); - friend class WXDLLEXPORT wxRegionIterator; -public: - wxRegion(long x, long y, long w, long h); - wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight); - wxRegion(const wxRect& rect); - wxRegion(WXHRGN hRegion); // Hangs on to this region - - wxRegion(void); - ~wxRegion(void); - - //# Copying - inline wxRegion(const wxRegion& r) - { Ref(r); } - inline wxRegion& operator = (const wxRegion& r) - { Ref(r); return (*this); } - - //# Modify region - // Clear current region - void Clear(void); - - // Union rectangle or region with this. - inline bool Union(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_OR); } - inline bool Union(const wxRect& rect) { return Combine(rect, wxRGN_OR); } - inline bool Union(const wxRegion& region) { return Combine(region, wxRGN_OR); } - - // Intersect rectangle or region with this. - inline bool Intersect(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_AND); } - inline bool Intersect(const wxRect& rect) { return Combine(rect, wxRGN_AND); } - inline bool Intersect(const wxRegion& region) { return Combine(region, wxRGN_AND); } - - // Subtract rectangle or region from this: - // Combines the parts of 'this' that are not part of the second region. - inline bool Subtract(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_DIFF); } - inline bool Subtract(const wxRect& rect) { return Combine(rect, wxRGN_DIFF); } - inline bool Subtract(const wxRegion& region) { return Combine(region, wxRGN_DIFF); } - - // XOR: the union of two combined regions except for any overlapping areas. - inline bool Xor(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_XOR); } - inline bool Xor(const wxRect& rect) { return Combine(rect, wxRGN_XOR); } - inline bool Xor(const wxRegion& region) { return Combine(region, wxRGN_XOR); } - - //# Information on region - // Outer bounds of region - void GetBox(long& x, long& y, long&w, long &h) const; - wxRect GetBox(void) const ; - - // Is region empty? - bool Empty(void) const; - inline bool IsEmpty(void) const { return Empty(); } - - //# Tests - // Does the region contain the point (x,y)? - wxRegionContain Contains(long x, long y) const; - // Does the region contain the point pt? - wxRegionContain Contains(const wxPoint& pt) const; - // Does the region contain the rectangle (x, y, w, h)? - wxRegionContain Contains(long x, long y, long w, long h) const; - // Does the region contain the rectangle rect? - wxRegionContain Contains(const wxRect& rect) const; - -// Internal - bool Combine(long x, long y, long width, long height, wxRegionOp op); - bool Combine(const wxRegion& region, wxRegionOp op); - bool Combine(const wxRect& rect, wxRegionOp op); -}; - -class WXDLLEXPORT wxRegionIterator : public wxObject { -DECLARE_DYNAMIC_CLASS(wxRegionIterator); -public: - wxRegionIterator(void); - wxRegionIterator(const wxRegion& region); - ~wxRegionIterator(void); - - void Reset(void) { m_current = 0; } - void Reset(const wxRegion& region); - - operator bool (void) const { return m_current < m_numRects; } - bool HaveRects(void) const { return m_current < m_numRects; } - - void operator ++ (void); - void operator ++ (int); - - long GetX(void) const; - long GetY(void) const; - long GetW(void) const; - long GetWidth(void) const { return GetW(); } - long GetH(void) const; - long GetHeight(void) const { return GetH(); } - -private: - long m_current; - long m_numRects; - wxRegion m_region; - wxRect* m_rects; -}; - -#endif - // _WX_REGION_H_ diff --git a/include/wx/msw/registry.h b/include/wx/msw/registry.h deleted file mode 100644 index c330e7dbf0..0000000000 --- a/include/wx/msw/registry.h +++ /dev/null @@ -1,214 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: msw/registry.h -// Purpose: Registry classes and functions -// Author: Vadim Zeitlin -// Modified by: -// Created: 03.04.198 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _REGISTRY_H -#define _REGISTRY_H - -#ifdef __GNUG__ -#pragma interface "registry.h" -#endif - -// ---------------------------------------------------------------------------- -// mutable hack (see also registry.cpp) -// ---------------------------------------------------------------------------- -#if USE_MUTABLE - #define MUTABLE mutable -#else - #define MUTABLE -#endif - -// ---------------------------------------------------------------------------- -// types used in this module -// ---------------------------------------------------------------------------- - -/* -#ifndef HKEY_DEFINED - #define HKEY_DEFINED - #define HKEY unsigned long -#endif -*/ - -typedef unsigned long ulong; - -// ---------------------------------------------------------------------------- -// class wxRegKey encapsulates window HKEY handle -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxRegKey -{ -public: - // NB: do _not_ change the values of elements in these enumerations! - - // registry value types (with comments from winnt.h) - enum ValueType - { - Type_None, // No value type - Type_String, // Unicode nul terminated string -#ifdef __WIN32__ - Type_Expand_String, // Unicode nul terminated string - // (with environment variable references) - Type_Binary, // Free form binary - Type_Dword, // 32-bit number - Type_Dword_little_endian, // 32-bit number (same as Type_DWORD) - Type_Dword_big_endian, // 32-bit number - Type_Link, // Symbolic Link (unicode) - Type_Multi_String, // Multiple Unicode strings - Type_Resource_list, // Resource list in the resource map - Type_Full_resource_descriptor, // Resource list in the hardware description - Type_Resource_requirements_list, // ??? -#endif //WIN32 - }; - - // predefined registry keys - enum StdKey - { - HKCR, // classes root -#ifdef __WIN32__ - HKCU, // current user - HKLM, // local machine - HKUSR, // users - HKPD, // performance data (@@ NT only?) -#if WINVER >= 0x0400 - HKCC, // current config - HKDD, // dynamic data -#endif // Winver -#endif // Win32/16 - }; - - // information about standard (predefined) registry keys - // number of standard keys - static const size_t nStdKeys; - // get the name of a standard key - static const char *GetStdKeyName(size_t key); - // get the short name of a standard key - static const char *GetStdKeyShortName(size_t key); - // get StdKey from root HKEY - static StdKey GetStdKeyFromHkey(WXHKEY hkey); - - // extacts the std key prefix from the string (return value) and - // leaves only the part after it (i.e. modifies the string passed!) - static StdKey ExtractKeyName(wxString& str); - - // ctors - // root key is set to HKCR (the only root key under Win16) - wxRegKey(); - // strKey is the full name of the key (i.e. starting with HKEY_xxx...) - wxRegKey(const wxString& strKey); - // strKey is the name of key under (standard key) keyParent - wxRegKey(StdKey keyParent, const wxString& strKey); - // strKey is the name of key under (previously created) keyParent - wxRegKey(const wxRegKey& keyParent, const wxString& strKey); - // - ~wxRegKey(); - - // change key (closes the previously opened key if any) - // the name is absolute, i.e. should start with HKEY_xxx - void SetName(const wxString& strKey); - // the name is relative to the parent key - void SetName(StdKey keyParent, const wxString& strKey); - // the name is relative to the parent key - void SetName(const wxRegKey& keyParent, const wxString& strKey); - // hKey should be opened and will be closed in wxRegKey dtor - void SetHkey(WXHKEY hKey); - - // get infomation about the key - // get the (full) key name. Abbreviate std root keys if bShortPrefix. - wxString GetName(bool bShortPrefix = TRUE) const; - // return true if the key exists - bool Exists() const; - // get the info about key (any number of these pointers may be NULL) - -#ifdef __GNUWIN32__ - bool GetKeyInfo(size_t *pnSubKeys, // number of subkeys - size_t *pnMaxKeyLen, // max len of subkey name - size_t *pnValues, // number of values - size_t *pnMaxValueLen) const; -#else - bool GetKeyInfo(ulong *pnSubKeys, // number of subkeys - ulong *pnMaxKeyLen, // max len of subkey name - ulong *pnValues, // number of values - ulong *pnMaxValueLen) const; -#endif - // return true if the key is opened - bool IsOpened() const { return m_hKey != 0; } - // for "if ( !key ) wxLogError(...)" kind of expressions - operator bool() const { return m_dwLastError == 0; } - - // operations on the key itself - // explicitly open the key (will be automatically done by all functions - // which need the key to be opened if the key is not opened yet) - bool Open(); - // create the key: will fail if the key already exists and bOkIfExists - bool Create(bool bOkIfExists = TRUE); - // close the key (will be automatically done in dtor) - bool Close(); - - // deleting keys/values - // deletes this key and all of it's subkeys/values - bool DeleteSelf(); - // deletes the subkey with all of it's subkeys/values recursively - bool DeleteKey(const char *szKey); - // deletes the named value (may be NULL to remove the default value) - bool DeleteValue(const char *szValue); - - // access to values and subkeys - // get value type - ValueType GetValueType(const char *szValue); - - // assignment operators set the default value of the key - wxRegKey& operator=(const wxString& strValue) - { SetValue(NULL, strValue); return *this; } - wxRegKey& operator=(long lValue) - { SetValue(NULL, lValue); return *this; } - - // conversion operators query the default value of the key - operator wxString() const; - - // set the string value - bool SetValue(const char *szValue, const wxString& strValue); - // return the string value - bool QueryValue(const char *szValue, wxString& strValue) const; - -#ifdef __WIN32__ - // set the numeric value - bool SetValue(const char *szValue, long lValue); - // return the numeric value - bool QueryValue(const char *szValue, long *plValue) const; -#endif //Win32 - - // query existence of a key/value - // return true if value exists - bool HasValue(const char *szKey) const; - // return true if given subkey exists - bool HasSubKey(const char *szKey) const; - // return true if any subkeys exist - bool HasSubkeys() const; - - // enumerate values and subkeys - bool GetFirstValue(wxString& strValueName, long& lIndex); - bool GetNextValue (wxString& strValueName, long& lIndex) const; - - bool GetFirstKey (wxString& strKeyName , long& lIndex); - bool GetNextKey (wxString& strKeyName , long& lIndex) const; - -private: - // no copy ctor/assignment operator - wxRegKey(const wxRegKey& key); // not implemented - wxRegKey& operator=(const wxRegKey& key); // not implemented - - WXHKEY m_hKey, // our handle - m_hRootKey; // handle of the top key (i.e. StdKey) - wxString m_strKey; // key name (relative to m_hRootKey) - - MUTABLE long m_dwLastError; // last error (0 if none) -}; - -#endif //_REGISTRY_H - diff --git a/include/wx/msw/roller.cur b/include/wx/msw/roller.cur deleted file mode 100644 index bb7f166133..0000000000 Binary files a/include/wx/msw/roller.cur and /dev/null differ diff --git a/include/wx/msw/scrolbar.h b/include/wx/msw/scrolbar.h deleted file mode 100644 index cf461ecd59..0000000000 --- a/include/wx/msw/scrolbar.h +++ /dev/null @@ -1,91 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: scrollbar.h -// Purpose: wxScrollBar class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_SCROLBAR_H_ -#define _WX_SCROLBAR_H_ - -#ifdef __GNUG__ -#pragma interface "scrolbar.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxScrollBarNameStr; - -// Scrollbar item -class WXDLLEXPORT wxScrollBar: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxScrollBar) - -public: - inline wxScrollBar(void) { m_pageSize = 0; m_viewSize = 0; m_objectSize = 0; } - ~wxScrollBar(void); - - inline wxScrollBar(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSB_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr) - { - Create(parent, id, pos, size, style, validator, name); - } - bool Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSB_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr); - - int GetPosition(void) const ; - inline int GetThumbSize() const { return m_pageSize; } - inline int GetPageSize() const { return m_viewSize; } - inline int GetRange() const { return m_objectSize; } - - virtual void SetPosition(int viewStart); - virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize, - bool refresh = TRUE); - -#if WXWIN_COMPATIBILITY - // Backward compatibility - inline int GetValue(void) const { return GetPosition(); } - inline void SetValue(int viewStart) { SetPosition(viewStart); } - void GetValues(int *viewStart, int *viewLength, int *objectLength, - int *pageLength) const ; - inline int GetViewLength() const { return m_viewSize; } - inline int GetObjectLength() const { return m_objectSize; } - - void SetPageSize(int pageLength); - void SetObjectLength(int objectLength); - void SetViewLength(int viewLength); -#endif - - void Command(wxCommandEvent& event); - virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam); - void MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control); - void MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control); - -#if WXWIN_COMPATIBILITY - // Backward compatibility: generate an old-style scroll command - void OnScroll(wxScrollEvent& event); -#endif - -protected: - int m_pageSize; - int m_viewSize; - int m_objectSize; - -DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_SCROLBAR_H_ diff --git a/include/wx/msw/settings.h b/include/wx/msw/settings.h deleted file mode 100644 index 2df189e9ae..0000000000 --- a/include/wx/msw/settings.h +++ /dev/null @@ -1,129 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: settings.h -// Purpose: wxSystemSettings class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_SETTINGS_H_ -#define _WX_SETTINGS_H_ - -#ifdef __GNUG__ -#pragma interface "settings.h" -#endif - -#include "wx/setup.h" - -#define wxSYS_WHITE_BRUSH 0 -#define wxSYS_LTGRAY_BRUSH 1 -#define wxSYS_GRAY_BRUSH 2 -#define wxSYS_DKGRAY_BRUSH 3 -#define wxSYS_BLACK_BRUSH 4 -#define wxSYS_NULL_BRUSH 5 -#define wxSYS_HOLLOW_BRUSH wxSYS_NULL_BRUSH -#define wxSYS_WHITE_PEN 6 -#define wxSYS_BLACK_PEN 7 -#define wxSYS_NULL_PEN 8 -#define wxSYS_OEM_FIXED_FONT 10 -#define wxSYS_ANSI_FIXED_FONT 11 -#define wxSYS_ANSI_VAR_FONT 12 -#define wxSYS_SYSTEM_FONT 13 -#define wxSYS_DEVICE_DEFAULT_FONT 14 -#define wxSYS_DEFAULT_PALETTE 15 -#define wxSYS_SYSTEM_FIXED_FONT 16 // Obsolete -#define wxSYS_DEFAULT_GUI_FONT 17 - -#define wxSYS_COLOUR_SCROLLBAR 0 -#define wxSYS_COLOUR_BACKGROUND 1 -#define wxSYS_COLOUR_ACTIVECAPTION 2 -#define wxSYS_COLOUR_INACTIVECAPTION 3 -#define wxSYS_COLOUR_MENU 4 -#define wxSYS_COLOUR_WINDOW 5 -#define wxSYS_COLOUR_WINDOWFRAME 6 -#define wxSYS_COLOUR_MENUTEXT 7 -#define wxSYS_COLOUR_WINDOWTEXT 8 -#define wxSYS_COLOUR_CAPTIONTEXT 9 -#define wxSYS_COLOUR_ACTIVEBORDER 10 -#define wxSYS_COLOUR_INACTIVEBORDER 11 -#define wxSYS_COLOUR_APPWORKSPACE 12 -#define wxSYS_COLOUR_HIGHLIGHT 13 -#define wxSYS_COLOUR_HIGHLIGHTTEXT 14 -#define wxSYS_COLOUR_BTNFACE 15 -#define wxSYS_COLOUR_BTNSHADOW 16 -#define wxSYS_COLOUR_GRAYTEXT 17 -#define wxSYS_COLOUR_BTNTEXT 18 -#define wxSYS_COLOUR_INACTIVECAPTIONTEXT 19 -#define wxSYS_COLOUR_BTNHIGHLIGHT 20 - -#define wxSYS_COLOUR_3DDKSHADOW 21 -#define wxSYS_COLOUR_3DLIGHT 22 -#define wxSYS_COLOUR_INFOTEXT 23 -#define wxSYS_COLOUR_INFOBK 24 - -#define wxSYS_COLOUR_DESKTOP wxSYS_COLOUR_BACKGROUND -#define wxSYS_COLOUR_3DFACE wxSYS_COLOUR_BTNFACE -#define wxSYS_COLOUR_3DSHADOW wxSYS_COLOUR_BTNSHADOW -#define wxSYS_COLOUR_3DHIGHLIGHT wxSYS_COLOUR_BTNHIGHLIGHT -#define wxSYS_COLOUR_3DHILIGHT wxSYS_COLOUR_BTNHIGHLIGHT -#define wxSYS_COLOUR_BTNHILIGHT wxSYS_COLOUR_BTNHIGHLIGHT - -// Metrics -#define wxSYS_MOUSE_BUTTONS 1 -#define wxSYS_BORDER_X 2 -#define wxSYS_BORDER_Y 3 -#define wxSYS_CURSOR_X 4 -#define wxSYS_CURSOR_Y 5 -#define wxSYS_DCLICK_X 6 -#define wxSYS_DCLICK_Y 7 -#define wxSYS_DRAG_X 8 -#define wxSYS_DRAG_Y 9 -#define wxSYS_EDGE_X 10 -#define wxSYS_EDGE_Y 11 -#define wxSYS_HSCROLL_ARROW_X 12 -#define wxSYS_HSCROLL_ARROW_Y 13 -#define wxSYS_HTHUMB_X 14 -#define wxSYS_ICON_X 15 -#define wxSYS_ICON_Y 16 -#define wxSYS_ICONSPACING_X 17 -#define wxSYS_ICONSPACING_Y 18 -#define wxSYS_WINDOWMIN_X 19 -#define wxSYS_WINDOWMIN_Y 20 -#define wxSYS_SCREEN_X 21 -#define wxSYS_SCREEN_Y 22 -#define wxSYS_FRAMESIZE_X 23 -#define wxSYS_FRAMESIZE_Y 24 -#define wxSYS_SMALLICON_X 25 -#define wxSYS_SMALLICON_Y 26 -#define wxSYS_HSCROLL_Y 27 -#define wxSYS_VSCROLL_X 28 -#define wxSYS_VSCROLL_ARROW_X 29 -#define wxSYS_VSCROLL_ARROW_Y 30 -#define wxSYS_VTHUMB_Y 31 -#define wxSYS_CAPTION_Y 32 -#define wxSYS_MENU_Y 33 -#define wxSYS_NETWORK_PRESENT 34 -#define wxSYS_PENWINDOWS_PRESENT 35 -#define wxSYS_SHOW_SOUNDS 36 -#define wxSYS_SWAP_BUTTONS 37 - -class WXDLLEXPORT wxSystemSettings: public wxObject -{ -public: - inline wxSystemSettings(void) {} - - // Get a system colour - static wxColour GetSystemColour(int index); - - // Get a system font - static wxFont GetSystemFont(int index); - - // Get a system metric, e.g. scrollbar size - static int GetSystemMetric(int index); -}; - -#endif - // _WX_SETTINGS_H_ diff --git a/include/wx/msw/setup.h b/include/wx/msw/setup.h deleted file mode 100644 index b75fcc9949..0000000000 --- a/include/wx/msw/setup.h +++ /dev/null @@ -1,283 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: setup.h -// Purpose: Configuration for the library -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_SETUP_H_ -#define _WX_SETUP_H_ - -/* - * General features - * - */ - -#define USE_CONFIG 1 - // Use wxConfig, with CreateConfig in wxApp -#define _WX_GOODCOMPILER__ - // gcc can have problems, but Windows compilers - // are generally OK. -#define WXWIN_COMPATIBILITY 1 - // Compatibility with 1.66 API. - // Level 0: no backward compatibility, all new features - // Level 1: wxDC, OnSize (etc.) compatibility, but - // some new features such as event tables - -#define USE_AUTOTRANS 1 - // Define wxTString -#define USE_POSTSCRIPT 1 - // 0 for no PostScript device context -#define USE_AFM_FOR_POSTSCRIPT 0 - // 1 to use font metric files in GetTextExtent -#define USE_METAFILE 1 - // 0 for no Metafile and metafile device context -#define USE_FORM 0 - // 0 for no wxForm -#define USE_IPC 1 - // 0 for no interprocess comms -// Note: wxHELP uses IPC under X so these are interdependent! -#define USE_HELP 1 - // 0 for no help facility -#define USE_RESOURCES 1 - // 0 for no wxGetResource/wxWriteResource -#define USE_CONSTRAINTS 1 - // 0 for no window layout constraint system - -#define USE_TIMEDATE 1 - // 0 for no wxTime/wxDate classes - -#define USE_CLIPBOARD 1 - // 0 for no clipboard functions -#define USE_SPLINES 1 - // 0 for no splines -#define USE_XFIG_SPLINE_CODE 1 - // 1 for XFIG spline code, 0 for AIAI spline code. -// AIAI spline code is slower, but freer of copyright issues. - -#define USE_DRAG_AND_DROP 1 - // 0 for no drag and drop - -#define USE_TOOLBAR 1 - // Define 1 to use toolbar classes -#define USE_BUTTONBAR 1 - // Define 1 to use buttonbar classes (enhanced toolbar - // for MS Windows) -#define USE_GAUGE 1 - // Define 1 to use Microsoft's gauge (Windows) - // or Bull's gauge (Motif) library (both in contrib). -#define USE_COMBOBOX 1 - // Define 1 to use COMBOXBOX control (Windows) - // or FWW's ComboBox widget (Motif). -#define USE_RADIOBUTTON 1 - // Define 1 to use radio button control - -#define USE_SCROLLBAR 1 - // Define 1 to compile contributed wxScrollBar class -#define USE_XPM_IN_X 1 -#define USE_XPM_IN_MSW 0 - // Define 1 to support the XPM package in wxBitmap, - // separated by platform. If 1, you must link in - // the XPM library to your applications. -#define USE_IMAGE_LOADING_IN_X 1 - // Use dynamic icon/bitmap loading/saving code in utils/image under X. - // If this is 1, you will need to link your applications - // with image_X.lib. where X is motif, ol, or hp. - -#define USE_IMAGE_LOADING_IN_MSW 1 - // Use dynamic DIB loading/saving code in utils/dib under MSW. -#define USE_RESOURCE_LOADING_IN_MSW 0 - // Use dynamic icon/cursor loading/saving code - // under MSW. -#define USE_WX_RESOURCES 1 - // Use .wxr resource mechanism (requires PrologIO library) - -#define USE_GNU_WXSTRING 0 - // Define 1 to use modified GNU wxString class - // from (stefan.hammes@urz.uni-heidelberg.de) in contrib\string - // TODO: why does this give an unresolved 'wxRegex::Search' - // symbol if 1? - -#define HAVE_SOCKET 1 - // Use WinSock if 1 -#define USE_DOC_VIEW_ARCHITECTURE 1 - // Set to 0 to disable document/view architecture -#define USE_PRINTING_ARCHITECTURE 1 - // Set to 0 to disable print/preview architecture code -#define USE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1 - // Set to 0 to disable PostScript print/preview architecture code - // under Windows (just use Windows printing). -#define USE_DYNAMIC_CLASSES 1 - // If 1, enables provision of run-time type information. - // NOW MANDATORY: don't change. -#define USE_MEMORY_TRACING 1 - // If 1, enables debugging versions of wxObject::new and - // wxObject::delete *IF* WXDEBUG is also defined. - // WARNING: this code may not work with all architectures, especially - // if alignment is an issue. -#define USE_DEBUG_CONTEXT 1 - // If 1, enables wxDebugContext, for - // writing error messages to file, etc. - // If WXDEBUG is not defined, will still use - // normal memory operators. - // It's recommended to set this to 1, - // since you may well need to output - // an error log in a production - // version (or non-debugging beta) -#define USE_GLOBAL_MEMORY_OPERATORS 1 - // In debug mode, cause new and delete to be redefined globally. - // If this causes problems (e.g. link errors), set this to 0. - -#define REMOVE_UNUSED_ARG 1 - // Set this to 0 if your compiler can't cope - // with omission of prototype parameters. - -#define USE_C_MAIN 0 - // Set to 1 to use main.c instead of main.cpp (UNIX only) - -#define USE_ODBC 1 - // Define 1 to use ODBC classes - -#define USE_IOSTREAMH 1 - // VC++ 4.2 and above allows and - // but you can't mix them. Set to 1 for , - // 0 for - -#define USE_WXCONFIG 1 - // if enabled, compiles built-in OS independent wxConfig - // class and it's file (any platform) and registry (Win) - // based implementations -/* - * Finer detail - * - */ - -#define USE_APPLE_IEEE 1 - // if enabled, the float codec written by Apple - // will be used to write, in a portable way, - // float on the disk - -/* - * MS Windows/Windows NT - * - */ - -#if defined(__WIN95__) -#define CTL3D 0 -#else -#define CTL3D 1 - // Define 1 to use Microsoft CTL3D library. - // See note above about using FAFA and CTL3D. -#endif - -#define USE_COMMON_DIALOGS 1 - // On rare occasions (e.g. using DJGPP) may want - // to omit common dialogs - // (e.g. file selector, printer dialog). - // Switching this off also switches off - // the printing architecture and interactive - // wxPrinterDC. -#define USE_ITSY_BITSY 1 - // Define 1 to use Microsoft's ItsyBitsy - // small title bar library, for wxMiniFrame -#define USE_BITMAP_MESSAGE 1 - // Define 1 to use bitmap messages. -#define USE_PORTABLE_FONTS_IN_MSW 0 - // Define 1 to use new portable font scheme in Windows - // (used by default under X) -#define FONT_SIZE_COMPATIBILITY 0 - // Define 1 for font size to be backward compatible - // to 1.63 and earlier. 1.64 and later define point - // sizes to be compatible with Windows. -#define USE_GENERIC_DIALOGS_IN_MSW 1 - // Define 1 to use generic dialogs in Windows, even though - // they duplicate native common dialog (e.g. wxColourDialog) -#define USE_PENWINDOWS 0 - // Set to 1 to use PenWindows - -#define USE_OWNER_DRAWN 0 - // Owner-drawn menus and listboxes - -#define USE_NATIVE_STATUSBAR 1 - // Set to 0 to use cross-platform wxStatusBar - -/* - * Any platform - * - */ - -#define USE_TYPEDEFS 0 - // Use typedefs not classes for wxPoint - // and others, to reduce overhead and avoid - // MS C7 memory bug. Bounds checker - // complains about deallocating - // arrays of wxPoints if wxPoint is a class. - -#if (!defined(WIN32) && !defined(__WIN32__)) || defined(__GNUWIN32__) || defined(__BORLANDC__) -// Can't use OLE drag and drop in Windows 3.1 because we don't know how -// to implement UUIDs -// GnuWin32 doesn't have appropriate headers for e.g. IUnknown. -#undef USE_DRAG_AND_DROP -#define USE_DRAG_AND_DROP 0 -#endif - -// Only WIN32 supports wxStatusBar95 -#if !defined(__WIN32__) && USE_NATIVE_STATUSBAR -#undef USE_NATIVE_STATUSBAR -#define USE_NATIVE_STATUSBAR 0 -#endif - -// Minimal setup e.g. for compiling small utilities -#define MINIMAL_WXWINDOWS_SETUP 0 - -#if MINIMAL_WXWINDOWS_SETUP -#undef USE_POSTSCRIPT -# define USE_POSTSCRIPT 0 -#undef USE_PRINTING_ARCHITECTURE -# define USE_PRINTING_ARCHITECTURE 0 -#undef USE_POSTSCRIPT_ARCHITECTURE_IN_MSW -# define USE_POSTSCRIPT_ARCHITECTURE_IN_MSW 0 -#undef USE_METAFILE -# define USE_METAFILE 0 -#undef USE_FORM -# define USE_FORM 0 -#undef USE_SPLINES -# define USE_SPLINES 0 -#undef USE_SCROLLBAR -# define USE_SCROLLBAR 0 -#undef USE_COMBOBOX -# define USE_COMBOBOX 0 -#undef USE_RADIOBUTTON -# define USE_RADIOBUTTON 0 -#undef USE_XPM_IN_MSW -# define USE_XPM_IN_MSW 0 -#undef USE_WX_RESOURCES -# define USE_WX_RESOURCES 0 -#undef USE_DOC_VIEW_ARCHITECTURE -# define USE_DOC_VIEW_ARCHITECTURE 0 -#undef USE_GNU_WXSTRING -# define USE_GNU_WXSTRING 0 -#undef USE_ODBC -# define USE_ODBC 0 -#undef USE_TIMEDATE -# define USE_TIMEDATE 0 -#undef CTL3D -# define CTL3D 0 -#undef USE_ITSY_BITSY -# define USE_ITSY_BITSY 0 -#undef USE_IMAGE_LOADING_IN_MSW -# define USE_IMAGE_LOADING_IN_MSW 0 -#undef USE_GAUGE -# define USE_GAUGE 0 -#undef USE_RESOURCE_LOADING_IN_MSW -# define USE_RESOURCE_LOADING_IN_MSW 0 -#undef USE_DRAG_AND_DROP -# define USE_DRAG_AND_DROP 0 -#endif - -#endif - // _WX_SETUP_H_ diff --git a/include/wx/msw/size.cur b/include/wx/msw/size.cur deleted file mode 100644 index 01a731c1b2..0000000000 Binary files a/include/wx/msw/size.cur and /dev/null differ diff --git a/include/wx/msw/slider.h b/include/wx/msw/slider.h deleted file mode 100644 index 07ae358658..0000000000 --- a/include/wx/msw/slider.h +++ /dev/null @@ -1,30 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: slider.h -// Purpose: wxSlider header, includes slider class headers as appropriate -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _SLIDER_H_ -#define _SLIDER_H_ - -#ifdef __GNUG__ -#pragma interface "slider.h" -#endif - -#ifdef __WIN95__ -#include "wx/msw/slider95.h" -#define wxSlider wxSlider95 -#define classwxSlider classwxSlider95 -#else -#include "wx/msw/slidrmsw.h" -#define wxSlider wxSliderMSW -#define classwxSlider classwxSliderMSW -#endif - -#endif - // _SLIDER_H_ diff --git a/include/wx/msw/slider95.h b/include/wx/msw/slider95.h deleted file mode 100644 index ed8c6523c3..0000000000 --- a/include/wx/msw/slider95.h +++ /dev/null @@ -1,110 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: slider95.h -// Purpose: wxSlider95 class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _SLIDER95_H_ -#define _SLIDER95_H_ - -#ifdef __GNUG__ -#pragma interface "slider95.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr; - -// Slider -class WXDLLEXPORT wxSlider95: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxSlider95) - -public: - wxSlider95(void); - - inline wxSlider95(wxWindow *parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSL_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr) - { - Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name); - } - - ~wxSlider95(void); - - bool Create(wxWindow *parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSL_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr); - - virtual int GetValue(void) const ; - virtual void SetValue(int); - void GetSize(int *x, int *y) const ; - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - void GetPosition(int *x, int *y) const ; - bool Show(bool show); - - void SetRange(int minValue, int maxValue); - - inline int GetMin(void) const { return m_rangeMin; } - inline int GetMax(void) const { return m_rangeMax; } - - // For trackbars only - void SetTickFreq(int n, int pos); - inline int GetTickFreq(void) const { return m_tickFreq; } - void SetPageSize(int pageSize); - int GetPageSize(void) const ; - void ClearSel(void) ; - void ClearTicks(void) ; - void SetLineSize(int lineSize); - int GetLineSize(void) const ; - int GetSelEnd(void) const ; - int GetSelStart(void) const ; - void SetSelection(int minPos, int maxPos); - void SetThumbLength(int len) ; - int GetThumbLength(void) const ; - void SetTick(int tickPos) ; - - // IMPLEMENTATION - inline WXHWND GetStaticMin() const { return m_staticMin; } - inline WXHWND GetStaticMax() const { return m_staticMax; } - inline WXHWND GetEditValue() const { return m_staticValue; } - virtual bool ContainsHWND(WXHWND hWnd) const; - - // Backward compatibility: translate to familiar wxEVT_COMMAND_SLIDER_UPDATED -#if WXWIN_COMPATIBILITY - void OnScroll(wxScrollEvent& event); -#endif - - void Command(wxCommandEvent& event); - virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam); - void MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control); - void MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control); - - protected: - WXHWND m_staticMin; - WXHWND m_staticMax; - WXHWND m_staticValue; - int m_rangeMin; - int m_rangeMax; - int m_pageSize; - int m_lineSize; - int m_tickFreq; -DECLARE_EVENT_TABLE() -}; - -#endif - // _SLIDER95_H_ diff --git a/include/wx/msw/slidrmsw.h b/include/wx/msw/slidrmsw.h deleted file mode 100644 index 8384086d1e..0000000000 --- a/include/wx/msw/slidrmsw.h +++ /dev/null @@ -1,110 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: slidrmsw.h -// Purpose: wxSliderMSW class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _SLIDRMSW_H_ -#define _SLIDRMSW_H_ - -#ifdef __GNUG__ -#pragma interface "slidrmsw.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr; - -// Slider -class WXDLLEXPORT wxSliderMSW: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxSliderMSW) - -public: - wxSliderMSW(void); - - inline wxSliderMSW(wxWindow *parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSL_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr) - { - Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name); - } - - ~wxSliderMSW(void); - - bool Create(wxWindow *parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSL_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr); - - virtual int GetValue(void) const ; - virtual void SetValue(int); - void GetSize(int *x, int *y) const ; - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - void GetPosition(int *x, int *y) const ; - bool Show(bool show); - - void SetRange(int minValue, int maxValue); - - inline int GetMin(void) const { return m_rangeMin; } - inline int GetMax(void) const { return m_rangeMax; } - - // For trackbars only - void SetTickFreq(int n, int pos); - inline int GetTickFreq(void) const { return m_tickFreq; } - void SetPageSize(int pageSize); - int GetPageSize(void) const ; - void ClearSel(void) ; - void ClearTicks(void) ; - void SetLineSize(int lineSize); - int GetLineSize(void) const ; - int GetSelEnd(void) const ; - int GetSelStart(void) const ; - void SetSelection(int minPos, int maxPos); - void SetThumbLength(int len) ; - int GetThumbLength(void) const ; - void SetTick(int tickPos) ; - - // IMPLEMENTATION - inline WXHWND GetStaticMin() const { return m_staticMin; } - inline WXHWND GetStaticMax() const { return m_staticMax; } - inline WXHWND GetEditValue() const { return m_staticValue; } - virtual bool ContainsHWND(WXHWND hWnd) const; - - // Backward compatibility: translate to familiar wxEVT_COMMAND_SLIDER_UPDATED -#if WXWIN_COMPATIBILITY - void OnScroll(wxScrollEvent& event); -#endif - - void Command(wxCommandEvent& event); - virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam); - void MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control); - void MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control); - - protected: - WXHWND m_staticMin; - WXHWND m_staticMax; - WXHWND m_staticValue; - int m_rangeMin; - int m_rangeMax; - int m_pageSize; - int m_lineSize; - int m_tickFreq; -DECLARE_EVENT_TABLE() -}; - -#endif - // _SLIDRMSW_H_ diff --git a/include/wx/msw/spinbutt.h b/include/wx/msw/spinbutt.h deleted file mode 100644 index 31e2b9dbf0..0000000000 --- a/include/wx/msw/spinbutt.h +++ /dev/null @@ -1,107 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: spinbutt.h -// Purpose: wxSpinButton class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_SPINBUTT_H_ -#define _WX_SPINBUTT_H_ - -#ifdef __GNUG__ -#pragma interface "spinbutt.h" -#endif - -#include "wx/control.h" -#include "wx/event.h" - -#if defined(__WIN95__) - -/* - The wxSpinButton is like a small scrollbar than is often placed next - to a text control. - - wxSP_HORIZONTAL: horizontal spin button - wxSP_VERTICAL: vertical spin button (the default) - wxSP_ARROW_KEYS: arrow keys increment/decrement value - wxSP_WRAP: value wraps at either end - */ - -class WXDLLEXPORT wxSpinButton: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxSpinButton) - public: - /* - * Public interface - */ - - wxSpinButton(void); - - inline wxSpinButton(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxSP_VERTICAL, const wxString& name = "wxSpinButton") - { - Create(parent, id, pos, size, style, name); - } - ~wxSpinButton(void); - - bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxSP_VERTICAL, const wxString& name = "wxSpinButton"); - - - // Attributes - //////////////////////////////////////////////////////////////////////////// - - int GetValue(void) const ; - void SetValue(int val) ; - void SetRange(int minVal, int maxVal) ; - inline int GetMin(void) const { return m_min; } - inline int GetMax(void) const { return m_max; } - - // Operations - //////////////////////////////////////////////////////////////////////////// - - void Command(wxCommandEvent& event) { ProcessCommand(event); }; - - // IMPLEMENTATION - bool MSWCommand(WXUINT param, WXWORD id); - bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam); - void MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control); - void MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control); - -protected: - int m_min; - int m_max; -}; - -class WXDLLEXPORT wxSpinEvent: public wxScrollEvent -{ - DECLARE_DYNAMIC_CLASS(wxSpinEvent) - - public: - wxSpinEvent(wxEventType commandType = wxEVT_NULL, int id = 0); -}; - -typedef void (wxEvtHandler::*wxSpinEventFunction)(wxSpinEvent&); - -// Spin events - -#define EVT_SPIN_UP(id, func) { wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func } -#define EVT_SPIN_DOWN(id, func) { wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func } - -#define EVT_SPIN(id, func) \ - { wxEVT_SCROLL_TOP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\ - { wxEVT_SCROLL_BOTTOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\ - { wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\ - { wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\ - { wxEVT_SCROLL_PAGEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\ - { wxEVT_SCROLL_PAGEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\ - { wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func }, - -#endif - // _WX_WIN95__ -#endif - // _WX_SPINBUTT_H_ diff --git a/include/wx/msw/statbmp.h b/include/wx/msw/statbmp.h deleted file mode 100644 index b6aca08bb1..0000000000 --- a/include/wx/msw/statbmp.h +++ /dev/null @@ -1,67 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: statbmp.h -// Purpose: wxStaticBitmap class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_STATBMP_H_ -#define _WX_STATBMP_H_ - -#ifdef __GNUG__ -#pragma interface "statbmp.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxStaticBitmapNameStr; - -class WXDLLEXPORT wxStaticBitmap: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxStaticBitmap) - public: - inline wxStaticBitmap(void) { } - - inline wxStaticBitmap(wxWindow *parent, wxWindowID id, - const wxBitmap& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxStaticBitmapNameStr) - { - Create(parent, id, label, pos, size, style, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxBitmap& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxStaticBitmapNameStr); - - virtual void SetBitmap(const wxBitmap& bitmap); - - virtual void Command(wxCommandEvent& WXUNUSED(event)) {}; - virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {}; - - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - - inline wxBitmap& GetBitmap(void) const { return (wxBitmap&) m_messageBitmap; } - - // overriden base class virtuals - virtual bool AcceptsFocus() const { return FALSE; } - - // Implementation - virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item); - virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); - protected: - wxBitmap m_messageBitmap; - -}; - -#endif - // _WX_STATBMP_H_ diff --git a/include/wx/msw/statbox.h b/include/wx/msw/statbox.h deleted file mode 100644 index 97e3722a70..0000000000 --- a/include/wx/msw/statbox.h +++ /dev/null @@ -1,63 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: statbox.h -// Purpose: wxStaticBox class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_STATBOX_H_ -#define _WX_STATBOX_H_ - -#ifdef __GNUG__ -#pragma interface "statbox.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxStaticBoxNameStr; - -// Group box -class WXDLLEXPORT wxStaticBox: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxStaticBox) - - public: - inline wxStaticBox(void) {} - inline wxStaticBox(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxStaticBoxNameStr) - { - Create(parent, id, label, pos, size, style, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxStaticBoxNameStr); - - virtual void Command(wxCommandEvent& WXUNUSED(event)) {}; - virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {}; - - void OnEraseBackground(wxEraseEvent& event); - - virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); - - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - void SetLabel(const wxString& label); - virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam); - -DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_STATBOX_H_ diff --git a/include/wx/msw/statbr95.h b/include/wx/msw/statbr95.h deleted file mode 100644 index 4950dd85b8..0000000000 --- a/include/wx/msw/statbr95.h +++ /dev/null @@ -1,55 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: msw/statbr95.h -// Purpose: native implementation of wxStatusBar -// Author: Vadim Zeitlin -// Modified by: -// Created: 04.04.98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _STATBR95_H -#define _STATBR95_H - -#ifdef __GNUG__ -#pragma interface "statbr95.h" -#endif - -#if USE_NATIVE_STATUSBAR - -class WXDLLEXPORT wxStatusBar95 : public wxStatusBar -{ - DECLARE_DYNAMIC_CLASS(wxStatusBar95); - -public: - // ctors - wxStatusBar95(); - wxStatusBar95(wxWindow *parent, wxWindowID id = -1, long style = wxST_SIZEGRIP); - - // create status line - bool Create(wxWindow *parent, wxWindowID id = -1, long style = wxST_SIZEGRIP); - - // a status line can have several (<256) fields numbered from 0 - virtual void SetFieldsCount(int number = 1, const int widths[] = NULL); - - // each field of status line has it's own text - virtual void SetStatusText(const wxString& text, int number = 0); - virtual wxString GetStatusText(int number = 0) const; - - // set status line fields' widths - virtual void SetStatusWidths(int n, const int widths_field[]); - - // we're going to process WM_SIZE (of the parent window) - void OnSize(wxSizeEvent& event); - - DECLARE_EVENT_TABLE() - -protected: - void CopyFieldsWidth(const int widths[]); - void SetFieldsWidth(); -}; - -#endif // USE_NATIVE_STATUSBAR - -#endif //_STATBR95_H \ No newline at end of file diff --git a/include/wx/msw/stattext.h b/include/wx/msw/stattext.h deleted file mode 100644 index dbb3646a0a..0000000000 --- a/include/wx/msw/stattext.h +++ /dev/null @@ -1,64 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: stattext.h -// Purpose: wxStaticText class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_STATTEXT_H_ -#define _WX_STATTEXT_H_ - -#ifdef __GNUG__ -#pragma interface "stattext.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxStaticTextNameStr; - -class WXDLLEXPORT wxStaticText: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxStaticText) - public: - inline wxStaticText(void) { } - - inline wxStaticText(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxStaticTextNameStr) - { - Create(parent, id, label, pos, size, style, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxStaticTextNameStr); - - // accessors - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - void SetLabel(const wxString&); - - // operations - virtual void Command(wxCommandEvent& WXUNUSED(event)) {}; - virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {}; - - // overriden base class virtuals - virtual bool AcceptsFocus() const { return FALSE; } - - // callbacks - virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam); - virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); -}; - -#endif - // _WX_STATTEXT_H_ diff --git a/include/wx/msw/tabctrl.h b/include/wx/msw/tabctrl.h deleted file mode 100644 index 798c61b322..0000000000 --- a/include/wx/msw/tabctrl.h +++ /dev/null @@ -1,153 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tabctrl.h -// Purpose: wxTabCtrl class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_TABCTRL_H_ -#define _WX_TABCTRL_H_ - -#ifdef __GNUG__ -#pragma interface "tabctrl.h" -#endif - -class wxImageList; - -// WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr; - -/* - * Flags returned by HitTest - */ - -#define wxTAB_HITTEST_NOWHERE 1 -#define wxTAB_HITTEST_ONICON 2 -#define wxTAB_HITTEST_ONLABEL 4 -#define wxTAB_HITTEST_ONITEM 6 - -class WXDLLEXPORT wxTabCtrl: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxTabCtrl) - public: - /* - * Public interface - */ - - wxTabCtrl(); - - inline wxTabCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = "tabCtrl") - { - Create(parent, id, pos, size, style, name); - } - ~wxTabCtrl(); - -// Accessors - - // Get the selection - int GetSelection() const; - - // Get the tab with the current keyboard focus - int GetCurFocus() const; - - // Get the associated image list - wxImageList* GetImageList() const; - - // Get the number of items - int GetItemCount() const; - - // Get the rect corresponding to the tab - bool GetItemRect(int item, wxRect& rect) const; - - // Get the number of rows - int GetRowCount() const; - - // Get the item text - wxString GetItemText(int item) const ; - - // Get the item image - int GetItemImage(int item) const; - - // Get the item data - void* GetItemData(int item) const; - - // Set the selection - int SetSelection(int item); - - // Set the image list - void SetImageList(wxImageList* imageList); - - // Set the text for an item - bool SetItemText(int item, const wxString& text); - - // Set the image for an item - bool SetItemImage(int item, int image); - - // Set the data for an item - bool SetItemData(int item, void* data); - - // Set the size for a fixed-width tab control - void SetItemSize(const wxSize& size); - - // Set the padding between tabs - void SetPadding(const wxSize& padding); - -// Operations - - bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = "tabCtrl"); - - // Delete all items - bool DeleteAllItems(); - - // Delete an item - bool DeleteItem(int item); - - // Hit test - int HitTest(const wxPoint& pt, long& flags); - - // Insert an item - bool InsertItem(int item, const wxString& text, int imageId = -1, void* data = NULL); - -// Implementation - - // Call default behaviour - void OnPaint(wxPaintEvent& event) { Default() ; } - void OnSize(wxSizeEvent& event) { Default() ; } - void OnMouseEvent(wxMouseEvent& event) { Default() ; } - void OnKillFocus(wxFocusEvent& event) { Default() ; } - - void Command(wxCommandEvent& event); - bool MSWCommand(WXUINT param, WXWORD id); - bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam); - - // Responds to colour changes - void OnSysColourChanged(wxSysColourChangedEvent& event); - -protected: - wxImageList* m_imageList; - -DECLARE_EVENT_TABLE() -}; - -class WXDLLEXPORT wxTabEvent: public wxCommandEvent -{ - DECLARE_DYNAMIC_CLASS(wxTabEvent) - - public: - wxTabEvent(wxEventType commandType = wxEVT_NULL, int id = 0); -}; - -typedef void (wxEvtHandler::*wxTabEventFunction)(wxTabEvent&); - -#define EVT_TAB_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TAB_SEL_CHANGED, \ - id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL }, -#define EVT_TAB_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TAB_SEL_CHANGING, \ - id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL }, - -#endif - // _WX_TABCTRL_H_ diff --git a/include/wx/msw/taskbar.h b/include/wx/msw/taskbar.h deleted file mode 100644 index 36703ce96d..0000000000 --- a/include/wx/msw/taskbar.h +++ /dev/null @@ -1,66 +0,0 @@ -///////////////////////////////////////////////////////////////////////// -// File: taskbar.h -// Purpose: Defines wxTaskBarIcon class for manipulating icons on the -// Windows task bar. -// Author: Julian Smart -// Modified by: -// Created: 24/3/98 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////// - -#ifndef _TASKBAR_H_ -#define _TASKBAR_H_ - -#ifdef __GNUG__ -#pragma interface "taskbar.h" -#endif - -#include -#include - -class wxTaskBarIcon: public wxObject -{ -public: - wxTaskBarIcon(void); - virtual ~wxTaskBarIcon(void); - -// Accessors - inline WXHWND GetHWND() const { return m_hWnd; } - inline bool IsOK() const { return (m_hWnd != 0) ; } - inline bool IsIconInstalled() const { return m_iconAdded; } - -// Operations - bool SetIcon(const wxIcon& icon, const wxString& tooltip = ""); - bool RemoveIcon(void); - -// Overridables - virtual void OnMouseMove(void); - virtual void OnLButtonDown(void); - virtual void OnLButtonUp(void); - virtual void OnRButtonDown(void); - virtual void OnRButtonUp(void); - virtual void OnLButtonDClick(void); - virtual void OnRButtonDClick(void); - -// Implementation - static wxTaskBarIcon* FindObjectForHWND(WXHWND hWnd); - static void AddObject(wxTaskBarIcon* obj); - static void RemoveObject(wxTaskBarIcon* obj); - static bool RegisterWindowClass(); - static WXHWND CreateTaskBarWindow(); - long WindowProc( WXHWND hWnd, unsigned int msg, unsigned int wParam, long lParam ); - -// Data members -protected: - WXHWND m_hWnd; - bool m_iconAdded; - static wxList sm_taskBarIcons; - static bool sm_registeredClass; - static unsigned int sm_taskbarMsg; -}; - -#endif - // _TASKBAR_H_ - diff --git a/include/wx/msw/tbar95.h b/include/wx/msw/tbar95.h deleted file mode 100644 index 2b9e0e2b45..0000000000 --- a/include/wx/msw/tbar95.h +++ /dev/null @@ -1,98 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tbar95.h -// Purpose: wxToolBar95 (Windows 95 toolbar) class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_TBAR95_H_ -#define _WX_TBAR95_H_ - -#ifdef __GNUG__ -#pragma interface "tbar95.h" -#endif - -#if USE_BUTTONBAR && USE_TOOLBAR -#include "wx/tbarbase.h" - -WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr; - -class WXDLLEXPORT wxToolBar95: public wxToolBarBase -{ - DECLARE_DYNAMIC_CLASS(wxToolBar95) - public: - /* - * Public interface - */ - - wxToolBar95(void); - - inline wxToolBar95(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER|wxTB_HORIZONTAL, - const wxString& name = wxToolBarNameStr) - { - Create(parent, id, pos, size, style, name); - } - ~wxToolBar95(void); - - bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER|wxTB_HORIZONTAL, - const wxString& name = wxToolBarNameStr); - - // Call default behaviour - void OnPaint(wxPaintEvent& event) { Default() ; } - void OnSize(wxSizeEvent& event) { Default() ; } - void OnMouseEvent(wxMouseEvent& event) { Default() ; } - void OnKillFocus(wxFocusEvent& event) { Default() ; } - - // Handle wxToolBar95 events - - // If pushedBitmap is NULL, a reversed version of bitmap is - // created and used as the pushed/toggled image. - // If toggle is TRUE, the button toggles between the two states. - wxToolBarTool *AddTool(int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, - bool toggle = FALSE, long xPos = -1, long yPos = -1, wxObject *clientData = NULL, - const wxString& helpString1 = "", const wxString& helpString2 = ""); - - // Set default bitmap size - void SetToolBitmapSize(const wxSize& size); - void EnableTool(int toolIndex, bool enable); // additional drawing on enabling - void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on - void ClearTools(void); - - // The button size is bigger than the bitmap size - wxSize GetToolSize(void) const; - - wxSize GetMaxSize(void) const; - void GetSize(int *w, int *y) const; - - virtual bool GetToolState(int toolIndex) const; - - // Add all the buttons: required for Win95. - virtual bool CreateTools(void); - virtual void SetRows(int nRows); - virtual void Layout(void) {} - - // The post-tool-addition call - bool Realize() { return CreateTools(); }; - - // IMPLEMENTATION - bool MSWCommand(WXUINT param, WXWORD id); - bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam); - - // Responds to colour changes - void OnSysColourChanged(wxSysColourChangedEvent& event); - -protected: - WXHBITMAP m_hBitmap; - -DECLARE_EVENT_TABLE() -}; - -#endif // USE_TOOL/BUTTONBAR -#endif - // _WX_TBAR95_H_ diff --git a/include/wx/msw/tbarmsw.h b/include/wx/msw/tbarmsw.h deleted file mode 100644 index f39ee7bd71..0000000000 --- a/include/wx/msw/tbarmsw.h +++ /dev/null @@ -1,123 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tbarmsw.h -// Purpose: wxToolBarMSW class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_TBARMSW_H_ -#define _WX_TBARMSW_H_ - -#ifdef __GNUG__ -#pragma interface "tbarmsw.h" -#endif - -#if USE_BUTTONBAR && USE_TOOLBAR -#include "wx/tbarbase.h" - -WXDLLEXPORT_DATA(extern const char*) wxButtonBarNameStr; - -class WXDLLEXPORT wxMemoryDC; - -// Non-Win95 (WIN32, WIN16, UNIX) version - -class WXDLLEXPORT wxToolBarMSW: public wxToolBarBase -{ - DECLARE_DYNAMIC_CLASS(wxToolBarMSW) -public: - /* - * Public interface - */ - wxToolBarMSW(void); - - inline wxToolBarMSW(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER|wxTB_HORIZONTAL, const wxString& name = wxButtonBarNameStr) - { - Create(parent, id, pos, size, style, name); - } - bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER|wxTB_HORIZONTAL, const wxString& name = wxButtonBarNameStr); - - ~wxToolBarMSW(void); - - // Handle wxWindows events - void OnPaint(wxPaintEvent& event); - void OnSize(wxSizeEvent& event); - void OnMouseEvent(wxMouseEvent& event); - - // If pushedBitmap is NULL, a reversed version of bitmap is - // created and used as the pushed/toggled image. - // If toggle is TRUE, the button toggles between the two states. - wxToolBarTool *AddTool(int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, - bool toggle = FALSE, long xPos = -1, long yPos = -1, wxObject *clientData = NULL, - const wxString& helpString1 = "", const wxString& helpString2 = ""); - - void DrawTool(wxDC& dc, wxMemoryDC& memDc, wxToolBarTool *tool); - - // Set default bitmap size - virtual void SetToolBitmapSize(const wxSize& size); - void EnableTool(int toolIndex, bool enable); // additional drawing on enabling - - // The button size is bigger than the bitmap size - wxSize GetToolSize(void) const; - - void Layout(void); - - // The post-tool-addition call - bool Realize() { Layout(); return TRUE; }; - - protected: - void DrawTool(wxDC& dc, wxToolBarTool *tool, int state); - - void GetSysColors(void); - bool InitGlobalObjects(void); - void FreeGlobalObjects(void); - void PatB(WXHDC hdc,int x,int y,int dx,int dy, long rgb); - void CreateMask(WXHDC hDC, int xoffset, int yoffset, int dx, int dy); - void DrawBlankButton(WXHDC hdc, int x, int y, int dx, int dy, int state); - void DrawButton(WXHDC hdc, int x, int y, int dx, int dy, wxToolBarTool *tool, int state); - WXHBITMAP CreateDitherBitmap(); - bool CreateDitherBrush(void); - bool FreeDitherBrush(void); - WXHBITMAP CreateMappedBitmap(WXHINSTANCE hInstance, void *lpBitmapInfo); - WXHBITMAP CreateMappedBitmap(WXHINSTANCE hInstance, WXHBITMAP hBitmap); - -protected: - int m_currentRowsOrColumns; - long m_lastX, m_lastY; - - WXHBRUSH m_hbrDither; - WXDWORD m_rgbFace; - WXDWORD m_rgbShadow; - WXDWORD m_rgbHilight; - WXDWORD m_rgbFrame; - -// -// m_hdcMono is the DC that holds a mono bitmap, m_hbmMono -// that is used to create highlights -// of button faces. -// m_hbmDefault hold the default bitmap if there is one. -// - WXHDC m_hdcMono; - WXHBITMAP m_hbmMono; - WXHBITMAP m_hbmDefault; - -DECLARE_EVENT_TABLE() -}; - -// -// States (not all of them currently used) -// -#define wxTBSTATE_CHECKED 0x01 // radio button is checked -#define wxTBSTATE_PRESSED 0x02 // button is being depressed (any style) -#define wxTBSTATE_ENABLED 0x04 // button is enabled -#define wxTBSTATE_HIDDEN 0x08 // button is hidden -#define wxTBSTATE_INDETERMINATE 0x10 // button is indeterminate - -#endif // USE_TOOL/BUTTONBAR -#endif - // _WX_TBARMSW_H_ diff --git a/include/wx/msw/textctrl.h b/include/wx/msw/textctrl.h deleted file mode 100644 index 44928ded07..0000000000 --- a/include/wx/msw/textctrl.h +++ /dev/null @@ -1,156 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: textctrl.h -// Purpose: wxTextCtrl class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_TEXTCTRL_H_ -#define _WX_TEXTCTRL_H_ - -#ifdef __GNUG__ -#pragma interface "textctrl.h" -#endif - -#include "wx/control.h" - -#if USE_IOSTREAMH -#include -#else -#include -#endif - -WXDLLEXPORT_DATA(extern const char*) wxTextCtrlNameStr; -WXDLLEXPORT_DATA(extern const char*) wxEmptyString; - -// Single-line text item -class WXDLLEXPORT wxTextCtrl: public wxControl - -// 16-bit Borland 4.0 doesn't seem to allow multiple inheritance with wxWindow and streambuf: -// it complains about deriving a huge class from the huge class streambuf. !! -// Also, can't use streambuf if making or using a DLL :-( - -#if (defined(__BORLANDC__) && !defined(__WIN32__)) || defined(__MWERKS__) || defined(_WINDLL) || defined(WXUSINGDLL) || defined(WXMAKINGDLL) -#define NO_TEXT_WINDOW_STREAM -#endif - -#ifndef NO_TEXT_WINDOW_STREAM -, public streambuf -#endif - -{ - DECLARE_DYNAMIC_CLASS(wxTextCtrl) - -public: - // creation - // -------- - wxTextCtrl(); - inline wxTextCtrl(wxWindow *parent, wxWindowID id, - const wxString& value = wxEmptyString, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxTextCtrlNameStr) -#ifndef NO_TEXT_WINDOW_STREAM - :streambuf() -#endif - { - Create(parent, id, value, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxString& value = wxEmptyString, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxTextCtrlNameStr); - - // accessors - // --------- - virtual wxString GetValue() const ; - virtual void SetValue(const wxString& value); - - virtual int GetLineLength(long lineNo) const; - virtual wxString GetLineText(long lineNo) const; - virtual int GetNumberOfLines() const; - - // operations - // ---------- - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - - // Clipboard operations - virtual void Copy(); - virtual void Cut(); - virtual void Paste(); - - virtual void SetInsertionPoint(long pos); - virtual void SetInsertionPointEnd(); - virtual long GetInsertionPoint() const ; - virtual long GetLastPosition() const ; - virtual void Replace(long from, long to, const wxString& value); - virtual void Remove(long from, long to); - virtual void SetSelection(long from, long to); - virtual void SetEditable(bool editable); - - // streambuf implementation -#ifndef NO_TEXT_WINDOW_STREAM - int overflow(int i); - int sync(); - int underflow(); -#endif - - wxTextCtrl& operator<<(const wxString& s); - wxTextCtrl& operator<<(int i); - wxTextCtrl& operator<<(long i); - wxTextCtrl& operator<<(float f); - wxTextCtrl& operator<<(double d); - wxTextCtrl& operator<<(const char c); - - virtual bool LoadFile(const wxString& file); - virtual bool SaveFile(const wxString& file); - virtual void WriteText(const wxString& text); - virtual void DiscardEdits(); - virtual bool IsModified() const; - -#if WXWIN_COMPATIBILITY - inline bool Modified() const { return IsModified(); } -#endif - - virtual long XYToPosition(long x, long y) const ; - virtual void PositionToXY(long pos, long *x, long *y) const ; - virtual void ShowPosition(long pos); - virtual void Clear(); - - // callbacks - // --------- - void OnDropFiles(wxDropFilesEvent& event); - void OnChar(wxKeyEvent& event); // Process 'enter' if required - void OnEraseBackground(wxEraseEvent& event); - - // Implementation - // -------------- - virtual void Command(wxCommandEvent& event); - virtual bool MSWCommand(WXUINT param, WXWORD id); - inline bool IsRich() const { return m_isRich; } - inline void SetRichEdit(bool isRich) { m_isRich = isRich; } - virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, - WXLPARAM lParam); - - virtual void AdoptAttributesFromHWND(); - virtual void SetupColours(); - virtual long MSWGetDlgCode(); - -protected: - bool m_isRich; // Are we using rich text edit to implement this? - wxString m_fileName; - - DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_TEXTCTRL_H_ diff --git a/include/wx/msw/timer.h b/include/wx/msw/timer.h deleted file mode 100644 index 42287be447..0000000000 --- a/include/wx/msw/timer.h +++ /dev/null @@ -1,52 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: timer.h -// Purpose: wxTimer class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_TIMER_H_ -#define _WX_TIMER_H_ - -#ifdef __GNUG__ -#pragma interface "timer.h" -#endif - -#include "wx/object.h" - -class WXDLLEXPORT wxTimer: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxTimer) - - public: - bool oneShot ; - int milli ; - int lastMilli ; - - long id; - public: - wxTimer(void); - ~wxTimer(void); - virtual bool Start(int milliseconds = -1,bool one_shot = FALSE); // Start timer - virtual void Stop(void); // Stop timer - virtual void Notify(void) = 0; // Override this member - inline int Interval(void) { return milli ; }; // Returns the current interval time (0 if stop) -}; - -// Timer functions (milliseconds) -void WXDLLEXPORT wxStartTimer(void); -// Gets time since last wxStartTimer or wxGetElapsedTime -long WXDLLEXPORT wxGetElapsedTime(bool resetTimer = TRUE); - -// EXPERIMENTAL: comment this out if it doesn't compile. -bool WXDLLEXPORT wxGetLocalTime(long *timeZone, int *dstObserved); - -// Get number of seconds since 00:00:00 GMT, Jan 1st 1970. -long WXDLLEXPORT wxGetCurrentTime(void); - -#endif - // _WX_TIMERH_ diff --git a/include/wx/msw/treectrl.h b/include/wx/msw/treectrl.h deleted file mode 100644 index 647cc4cec3..0000000000 --- a/include/wx/msw/treectrl.h +++ /dev/null @@ -1,298 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: treectrl.h -// Purpose: wxTreeCtrl class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_TREECTRL_H_ -#define _WX_TREECTRL_H_ - -#ifdef __GNUG__ -#pragma interface "treectrl.h" -#endif - -#include "wx/control.h" -#include "wx/event.h" -#include "wx/imaglist.h" - -// WXDLLEXPORT_DATA(extern const char*) wxTreeNameStr; - -#define wxTREE_MASK_HANDLE 0x0001 -#define wxTREE_MASK_STATE 0x0002 -#define wxTREE_MASK_TEXT 0x0004 -#define wxTREE_MASK_IMAGE 0x0008 -#define wxTREE_MASK_SELECTED_IMAGE 0x0010 -#define wxTREE_MASK_CHILDREN 0x0020 -#define wxTREE_MASK_DATA 0x0040 - -#define wxTREE_STATE_BOLD 0x0001 -#define wxTREE_STATE_DROPHILITED 0x0002 -#define wxTREE_STATE_EXPANDED 0x0004 -#define wxTREE_STATE_EXPANDEDONCE 0x0008 -#define wxTREE_STATE_FOCUSED 0x0010 -#define wxTREE_STATE_SELECTED 0x0020 -#define wxTREE_STATE_CUT 0x0040 - -#define wxTREE_HITTEST_ABOVE 0x0001 // Above the client area. -#define wxTREE_HITTEST_BELOW 0x0002 // Below the client area. -#define wxTREE_HITTEST_NOWHERE 0x0004 // In the client area but below the last item. -#define wxTREE_HITTEST_ONITEMBUTTON 0x0010 // On the button associated with an item. -#define wxTREE_HITTEST_ONITEMICON 0x0020 // On the bitmap associated with an item. -#define wxTREE_HITTEST_ONITEMINDENT 0x0040 // In the indentation associated with an item. -#define wxTREE_HITTEST_ONITEMLABEL 0x0080 // On the label (string) associated with an item. -#define wxTREE_HITTEST_ONITEMRIGHT 0x0100 // In the area to the right of an item. -#define wxTREE_HITTEST_ONITEMSTATEICON 0x0200 // On the state icon for a tree view item that is in a user-defined state. -#define wxTREE_HITTEST_TOLEFT 0x0400 // To the right of the client area. -#define wxTREE_HITTEST_TORIGHT 0x0800 // To the left of the client area. - -#define wxTREE_HITTEST_ONITEM (wxTREE_HITTEST_ONITEMICON | wxTREE_HITTEST_ONITEMLABEL | wxTREE_HITTEST_ONITEMSTATEICON) - -// Flags for GetNextItem -enum { - wxTREE_NEXT_CARET, // Retrieves the currently selected item. - wxTREE_NEXT_CHILD, // Retrieves the first child item. The hItem parameter must be NULL. - wxTREE_NEXT_DROPHILITE, // Retrieves the item that is the target of a drag-and-drop operation. - wxTREE_NEXT_FIRSTVISIBLE, // Retrieves the first visible item. - wxTREE_NEXT_NEXT, // Retrieves the next sibling item. - wxTREE_NEXT_NEXTVISIBLE, // Retrieves the next visible item that follows the specified item. - wxTREE_NEXT_PARENT, // Retrieves the parent of the specified item. - wxTREE_NEXT_PREVIOUS, // Retrieves the previous sibling item. - wxTREE_NEXT_PREVIOUSVISIBLE, // Retrieves the first visible item that precedes the specified item. - wxTREE_NEXT_ROOT // Retrieves the first child item of the root item of which the specified item is a part. -}; - -// Flags for ExpandItem -enum { - wxTREE_EXPAND_EXPAND, - wxTREE_EXPAND_COLLAPSE, - wxTREE_EXPAND_COLLAPSE_RESET, - wxTREE_EXPAND_TOGGLE -}; - -// Flags for InsertItem -#define wxTREE_INSERT_FIRST 0xFFFF0001 -#define wxTREE_INSERT_LAST 0xFFFF0002 -#define wxTREE_INSERT_SORT 0xFFFF0003 - -class WXDLLEXPORT wxTreeItem: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxTreeItem) -public: - long m_mask; - long m_itemId; - long m_state; - long m_stateMask; - wxString m_text; - int m_image; - int m_selectedImage; - int m_children; - long m_data; - - wxTreeItem(); - -// Accessors - inline long GetMask() const { return m_mask; } - inline long GetItemId() const { return m_itemId; } - inline long GetState() const { return m_state; } - inline long GetStateMask() const { return m_stateMask; } - inline wxString GetText() const { return m_text; } - inline int GetImage() const { return m_image; } - inline int GetSelectedImage() const { return m_selectedImage; } - inline int GetChildren() const { return m_children; } - inline long GetData() const { return m_data; } - - inline void SetMask(long mask) { m_mask = mask; } - inline void SetItemId(long id) { m_itemId = m_itemId = id; } - inline void SetState(long state) { m_state = state; } - inline void SetStateMask(long stateMask) { m_stateMask = stateMask; } - inline void GetText(const wxString& text) { m_text = text; } - inline void SetImage(int image) { m_image = image; } - inline void GetSelectedImage(int selImage) { m_selectedImage = selImage; } - inline void SetChildren(int children) { m_children = children; } - inline void SetData(long data) { m_data = data; } -}; - -class WXDLLEXPORT wxTreeCtrl: public wxControl -{ -public: - /* - * Public interface - */ - - // creation - // -------- - wxTreeCtrl(); - - inline wxTreeCtrl(wxWindow *parent, wxWindowID id = -1, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = "wxTreeCtrl") - { - Create(parent, id, pos, size, style, validator, name); - } - ~wxTreeCtrl(); - - bool Create(wxWindow *parent, wxWindowID id = -1, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = "wxTreeCtrl"); - - // accessors - // --------- - // - int GetCount() const; - - // indent - int GetIndent() const; - void SetIndent(int indent); - // image list - wxImageList *GetImageList(int which = wxIMAGE_LIST_NORMAL) const; - void SetImageList(wxImageList *imageList, int which = wxIMAGE_LIST_NORMAL); - - // navigation inside the tree - long GetNextItem(long item, int code) const; - bool ItemHasChildren(long item) const; - long GetChild(long item) const; - long GetParent(long item) const; - long GetFirstVisibleItem() const; - long GetNextVisibleItem(long item) const; - long GetSelection() const; - long GetRootItem() const; - - // generic function for (g|s)etting item attributes - bool GetItem(wxTreeItem& info) const; - bool SetItem(wxTreeItem& info); - // item state - int GetItemState(long item, long stateMask) const; - bool SetItemState(long item, long state, long stateMask); - // item image - bool SetItemImage(long item, int image, int selImage); - // item text - wxString GetItemText(long item) const; - void SetItemText(long item, const wxString& str); - // custom data associated with the item - long GetItemData(long item) const; - bool SetItemData(long item, long data); - // convenience function - bool IsItemExpanded(long item) - { - return (GetItemState(item, wxTREE_STATE_EXPANDED) & - wxTREE_STATE_EXPANDED) != 0; - } - - // bounding rect - bool GetItemRect(long item, wxRectangle& rect, bool textOnly = FALSE) const; - // - wxTextCtrl* GetEditControl() const; - - // operations - // ---------- - // adding/deleting items - bool DeleteItem(long item); - long InsertItem(long parent, wxTreeItem& info, - long insertAfter = wxTREE_INSERT_LAST); - // If image > -1 and selImage == -1, the same image is used for - // both selected and unselected items. - long InsertItem(long parent, const wxString& label, - int image = -1, int selImage = -1, - long insertAfter = wxTREE_INSERT_LAST); - - // changing item state - bool ExpandItem(long item) { return ExpandItem(item, wxTREE_EXPAND_EXPAND); } - bool CollapseItem(long item) { return ExpandItem(item, wxTREE_EXPAND_COLLAPSE); } - bool ToggleItem(long item) { return ExpandItem(item, wxTREE_EXPAND_TOGGLE); } - // common interface for {Expand|Collapse|Toggle}Item - bool ExpandItem(long item, int action); - - // - bool SelectItem(long item); - bool ScrollTo(long item); - bool DeleteAllItems(); - - // Edit the label (tree must have the focus) - wxTextCtrl* EditLabel(long item, wxClassInfo* textControlClass = CLASSINFO(wxTextCtrl)); - - // End label editing, optionally cancelling the edit - bool EndEditLabel(bool cancel); - - long HitTest(const wxPoint& point, int& flags); - // wxImageList *CreateDragImage(long item); - bool SortChildren(long item); - bool EnsureVisible(long item); - - // IMPLEMENTATION - void Command(wxCommandEvent& event) { ProcessCommand(event); }; - bool MSWCommand(WXUINT param, WXWORD id); - bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam); - -protected: - wxTextCtrl* m_textCtrl; - wxImageList* m_imageListNormal; - wxImageList* m_imageListState; - - DECLARE_DYNAMIC_CLASS(wxTreeCtrl) -}; - -/* - wxEVT_COMMAND_TREE_BEGIN_DRAG, - wxEVT_COMMAND_TREE_BEGIN_RDRAG, - wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, - wxEVT_COMMAND_TREE_END_LABEL_EDIT, - wxEVT_COMMAND_TREE_DELETE_ITEM, - wxEVT_COMMAND_TREE_GET_INFO, - wxEVT_COMMAND_TREE_SET_INFO, - wxEVT_COMMAND_TREE_ITEM_EXPANDED, - wxEVT_COMMAND_TREE_ITEM_EXPANDING, - wxEVT_COMMAND_TREE_ITEM_COLLAPSED, - wxEVT_COMMAND_TREE_ITEM_COLLAPSING, - wxEVT_COMMAND_TREE_SEL_CHANGED, - wxEVT_COMMAND_TREE_SEL_CHANGING, - wxEVT_COMMAND_TREE_KEY_DOWN -*/ - -class WXDLLEXPORT wxTreeEvent: public wxCommandEvent -{ - DECLARE_DYNAMIC_CLASS(wxTreeEvent) - - public: - wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0); - - int m_code; - wxTreeItem m_item; - long m_oldItem; - wxPoint m_pointDrag; - - inline long GetOldItem() const { return m_oldItem; } - inline wxTreeItem& GetItem() const { return (wxTreeItem&) m_item; } - inline wxPoint GetPoint() const { return m_pointDrag; } - inline int GetCode() const { return m_code; } -}; - -typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); - -#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, - -#endif - // _WX_TREECTRL_H_ diff --git a/include/wx/msw/watch1.cur b/include/wx/msw/watch1.cur deleted file mode 100644 index 323f01c3e5..0000000000 Binary files a/include/wx/msw/watch1.cur and /dev/null differ diff --git a/include/wx/msw/wave.h b/include/wx/msw/wave.h deleted file mode 100644 index ce7e14fbe4..0000000000 --- a/include/wx/msw/wave.h +++ /dev/null @@ -1,43 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: wave.h -// Purpose: wxWave class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_WAVE_H_ -#define _WX_WAVE_H_ - -#ifdef __GNUG__ -#pragma interface "wave.h" -#endif - -#include "wx/object.h" - -class wxWave : public wxObject -{ -public: - wxWave(); - wxWave(const wxString& fileName, bool isResource = FALSE); - ~wxWave(); - -public: - bool Create(const wxString& fileName, bool isResource = FALSE); - bool IsOk() const { return (m_waveData ? TRUE : FALSE); }; - bool Play(bool async = TRUE, bool looped = FALSE) const; - -protected: - bool Free(); - -private: - byte* m_waveData; - int m_waveLength; - bool m_isResource; -}; - -#endif - diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h deleted file mode 100644 index 716be46606..0000000000 --- a/include/wx/msw/window.h +++ /dev/null @@ -1,747 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: window.h -// Purpose: wxWindow class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_WINDOW_H_ -#define _WX_WINDOW_H_ - -#ifdef __GNUG__ -#pragma interface "window.h" -#endif - -#include "wx/gdicmn.h" -#include "wx/icon.h" -#include "wx/cursor.h" -#include "wx/pen.h" -#include "wx/font.h" -#include "wx/validate.h" -#include "wx/event.h" -#include "wx/string.h" -#include "wx/list.h" -#include "wx/region.h" -#include "wx/msw/accel.h" - -#define wxKEY_SHIFT 1 -#define wxKEY_CTRL 2 - -/* - * Base class for frame, panel, canvas, panel items, dialog box. - * - */ - -/* - * Event handler: windows have themselves as their event handlers - * by default, but their event handlers could be set to another - * object entirely. This separation can reduce the amount of - * derivation required, and allow alteration of a window's functionality - * (e.g. by a resource editor that temporarily switches event handlers). - */ - -class WXDLLEXPORT wxWindow; -class WXDLLEXPORT wxEvent; -class WXDLLEXPORT wxCommandEvent; -class WXDLLEXPORT wxKeyEvent; -class WXDLLEXPORT wxControl; -class WXDLLEXPORT wxCursor; -class WXDLLEXPORT wxColourMap; -class WXDLLEXPORT wxFont; -class WXDLLEXPORT wxMenu; -class WXDLLEXPORT wxRectangle; -class WXDLLEXPORT wxBitmap; -class WXDLLEXPORT wxSizer; -class WXDLLEXPORT wxList; -class WXDLLEXPORT wxLayoutConstraints; -class WXDLLEXPORT wxMouseEvent; -class WXDLLEXPORT wxButton; -class WXDLLEXPORT wxColour; -class WXDLLEXPORT wxBrush; -class WXDLLEXPORT wxPen; -class WXDLLEXPORT wxIcon; -class WXDLLEXPORT wxDC; -class WXDLLEXPORT wxValidator; - -#if USE_DRAG_AND_DROP -class WXDLLEXPORT wxDropTarget; -#endif - -#if USE_WX_RESOURCES -class WXDLLEXPORT wxResourceTable; -class WXDLLEXPORT wxItemResource; -#endif - -WXDLLEXPORT_DATA(extern const char*) wxPanelNameStr; - -WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize; -WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition; - -class WXDLLEXPORT wxWindow: public wxEvtHandler -{ - DECLARE_ABSTRACT_CLASS(wxWindow) - - friend class wxDC; - friend class wxPaintDC; - -public: - wxWindow(void); - inline wxWindow(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxPanelNameStr) - { - m_children = new wxList; - Create(parent, id, pos, size, style, name); - } - - virtual ~wxWindow(void); - - bool Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxPanelNameStr); - - // Fit the window around the items - virtual void Fit(void); - - // Show or hide the window - virtual bool Show(bool show); - - // Is the window shown? - virtual bool IsShown(void) const; - - // Raise the window to the top of the Z order - virtual void Raise(void); - - // Lower the window to the bottom of the Z order - virtual void Lower(void); - - // Is the window enabled? - virtual bool IsEnabled(void) const; - - // For compatibility - inline bool Enabled(void) const { return IsEnabled(); } - - // Dialog support: override these and call - // base class members to add functionality - // that can't be done using validators. - - // Transfer values to controls. If returns FALSE, - // it's an application error (pops up a dialog) - virtual bool TransferDataToWindow(void); - - // Transfer values from controls. If returns FALSE, - // transfer failed: don't quit - virtual bool TransferDataFromWindow(void); - - // Validate controls. If returns FALSE, - // validation failed: don't quit - virtual bool Validate(void); - - // Return code for dialogs - inline void SetReturnCode(int retCode); - inline int GetReturnCode(void); - - // Set the cursor - virtual void SetCursor(const wxCursor& cursor); - inline virtual wxCursor *GetCursor(void) const { return (wxCursor *)& m_windowCursor; }; - - // Get the window with the focus - static wxWindow *FindFocus(void); - - // Get character size - virtual int GetCharHeight(void) const; - virtual int GetCharWidth(void) const; - - // Get overall window size - virtual void GetSize(int *width, int *height) const; - - // Get window position, relative to parent (or screen if no parent) - virtual void GetPosition(int *x, int *y) const; - - // Get client (application-useable) size - virtual void GetClientSize(int *width, int *height) const; - - // Set overall size and position - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - inline virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); } - inline virtual void Move(int x, int y) { SetSize(x, y, -1, -1, wxSIZE_USE_EXISTING); } - - // Set client size - virtual void SetClientSize(int width, int size); - - // Convert client to screen coordinates - virtual void ClientToScreen(int *x, int *y) const; - - // Convert screen to client coordinates - virtual void ScreenToClient(int *x, int *y) const; - - // Set the focus to this window - virtual void SetFocus(void); - - // Capture/release mouse - virtual void CaptureMouse(void); - virtual void ReleaseMouse(void); - - // Enable or disable the window - virtual void Enable(bool enable); - -#if USE_DRAG_AND_DROP - // Associate a drop target with this window (if the window already had a drop - // target, it's deleted!) and return the current drop target (may be NULL). - void SetDropTarget(wxDropTarget *pDropTarget); - wxDropTarget *GetDropTarget() const { return m_pDropTarget; } -#endif - - // Accept files for dragging - virtual void DragAcceptFiles(bool accept); - - // Update region access - virtual wxRegion GetUpdateRegion() const; - virtual bool IsExposed(int x, int y, int w, int h) const; - virtual bool IsExposed(const wxPoint& pt) const; - virtual bool IsExposed(const wxRect& rect) const; - - // Set/get the window title - virtual inline void SetTitle(const wxString& WXUNUSED(title)) {}; - inline virtual wxString GetTitle(void) const { return wxString(""); }; - // Most windows have the concept of a label; for frames, this is the - // title; for items, this is the label or button text. - inline virtual wxString GetLabel(void) const { return GetTitle(); } - - // Set/get the window name (used for resource setting in X) - inline virtual wxString GetName(void) const; - inline virtual void SetName(const wxString& name); - - // Centre the window - virtual void Centre(int direction) ; - inline void Center(int direction = wxHORIZONTAL) { Centre(direction); } - - // Popup a menu - virtual bool PopupMenu(wxMenu *menu, int x, int y); - - // Send the window a refresh event - virtual void Refresh(bool eraseBack = TRUE, const wxRectangle *rect = NULL); - -#if WXWIN_COMPATIBILITY - // Set/get scroll attributes - virtual void SetScrollRange(int orient, int range, bool refresh = TRUE); - virtual void SetScrollPage(int orient, int page, bool refresh = TRUE); - virtual int OldGetScrollRange(int orient) const; - virtual int GetScrollPage(int orient) const; -#endif - - // New functions that will replace the above. - virtual void SetScrollbar(int orient, int pos, int thumbVisible, - int range, bool refresh = TRUE); - - virtual void SetScrollPos(int orient, int pos, bool refresh = TRUE); - virtual int GetScrollPos(int orient) const; - virtual int GetScrollRange(int orient) const; - virtual int GetScrollThumb(int orient) const; - - virtual void ScrollWindow(int dx, int dy, const wxRectangle *rect = NULL); - - // Caret manipulation - virtual void CreateCaret(int w, int h); - virtual void CreateCaret(const wxBitmap *bitmap); - virtual void DestroyCaret(void); - virtual void ShowCaret(bool show); - virtual void SetCaretPos(int x, int y); - virtual void GetCaretPos(int *x, int *y) const; - - // Tell window how much it can be sized - virtual void SetSizeHints(int minW = -1, int minH = -1, int maxW = -1, int maxH = -1, int incW = -1, int incH = -1); - - // Set/get the window's identifier - inline int GetId() const; - inline void SetId(int id); - - // Make the window modal (all other windows unresponsive) - virtual void MakeModal(bool modal); - - // Get the private handle (platform-dependent) - inline void *GetHandle(void) const; - - // Set/get the window's relatives - inline wxWindow *GetParent(void) const; - inline void SetParent(wxWindow *p) ; - inline wxWindow *GetGrandParent(void) const; - inline wxList *GetChildren() const; - - // Set/get the window's font - virtual void SetFont(const wxFont& f); - inline virtual wxFont *GetFont(void) const; - - // Set/get the window's validator - void SetValidator(const wxValidator& validator); - inline wxValidator *GetValidator(void) const; - - // Set/get the window's style - inline void SetWindowStyleFlag(long flag); - inline long GetWindowStyleFlag(void) const; - - // Set/get double-clickability - // TODO: we probably wish to get rid of this, and - // always allow double clicks. - inline void SetDoubleClick(bool flag); - inline bool GetDoubleClick(void) const; - inline void AllowDoubleClick(bool value) { SetDoubleClick(value); } - - // Old way to handle a control command - virtual void OnCommand(wxWindow& win, wxCommandEvent& event); - - // Set/get event handler - inline void SetEventHandler(wxEvtHandler *handler); - inline wxEvtHandler *GetEventHandler(void) const; - - // Push/pop event handler (i.e. allow a chain of event handlers - // be searched) - void PushEventHandler(wxEvtHandler *handler) ; - wxEvtHandler *PopEventHandler(bool deleteHandler = FALSE) ; - - // Close the window by calling OnClose, posting a deletion - virtual bool Close(bool force = FALSE); - - // Destroy the window (delayed, if a managed window) - virtual bool Destroy(void) ; - - // Mode for telling default OnSize members to - // call Layout(), if not using Sizers, just top-down constraints - inline void SetAutoLayout(bool a); - inline bool GetAutoLayout(void) const; - - // Set/get constraints - inline wxLayoutConstraints *GetConstraints(void) const; - void SetConstraints(wxLayoutConstraints *c); - - // Set/get window background colour - inline virtual void SetBackgroundColour(const wxColour& col); - inline virtual wxColour GetBackgroundColour(void) const; - - // Set/get window foreground colour - inline virtual void SetForegroundColour(const wxColour& col); - inline virtual wxColour GetForegroundColour(void) const; - - // TODO: are these really necessary??? - // Set/get window default background colour (for children to inherit) - inline virtual void SetDefaultBackgroundColour(const wxColour& col); - inline virtual wxColour GetDefaultBackgroundColour(void) const; - - // Set/get window default foreground colour (for children to inherit) - inline virtual void SetDefaultForegroundColour(const wxColour& col); - inline virtual wxColour GetDefaultForegroundColour(void) const; - - // For backward compatibility - inline virtual void SetButtonFont(const wxFont& font) { SetFont(font); } - inline virtual void SetLabelFont(const wxFont& font) { SetFont(font); } - inline virtual wxFont *GetLabelFont(void) const { return GetFont(); }; - inline virtual wxFont *GetButtonFont(void) const { return GetFont(); }; - - // Get the default button, if there is one - inline virtual wxButton *GetDefaultItem(void) const; - inline virtual void SetDefaultItem(wxButton *but); - - virtual void SetAcceleratorTable(const wxAcceleratorTable& accel); - - // Override to define new behaviour for default action (e.g. double clicking - // on a listbox) - virtual void OnDefaultAction(wxControl *initiatingItem); - - // Resource loading -#if USE_WX_RESOURCES - virtual bool LoadFromResource(wxWindow *parent, const wxString& resourceName, const wxResourceTable *table = NULL); - virtual wxControl *CreateItem(const wxItemResource *childResource, const wxResourceTable *table = NULL); -#endif - - // Native resource loading - virtual bool LoadNativeDialog(wxWindow* parent, wxWindowID& id); - virtual bool LoadNativeDialog(wxWindow* parent, const wxString& name); - virtual wxWindow* GetWindowChild1(wxWindowID& id); - virtual wxWindow* GetWindowChild(wxWindowID& id); - - virtual void GetTextExtent(const wxString& string, int *x, int *y, - int *descent = NULL, - int *externalLeading = NULL, - const wxFont *theFont = NULL, bool use16 = FALSE) const; - - // Is the window retained? - inline bool IsRetained(void) const; - - // Warp the pointer the given position - virtual void WarpPointer(int x_pos, int y_pos) ; - - // Clear the window - virtual void Clear(void); - - // Find a window by id or name - virtual wxWindow *FindWindow(long id); - virtual wxWindow *FindWindow(const wxString& name); - - // Constraint operations - bool Layout(void); - void SetSizer(wxSizer *sizer); // Adds sizer child to this window - inline wxSizer *GetSizer(void) const ; - inline wxWindow *GetSizerParent(void) const ; - inline void SetSizerParent(wxWindow *win); - - // Do Update UI processing for controls - void UpdateWindowUI(void); - - void OnEraseBackground(wxEraseEvent& event); - void OnChar(wxKeyEvent& event); - void OnPaint(wxPaintEvent& event); - void OnIdle(wxIdleEvent& event); - - // Does this window want to accept keyboard focus? - virtual bool AcceptsFocus() const; - -public: - //////////////////////////////////////////////////////////////////////// - //// IMPLEMENTATION - - // For implementation purposes - sometimes decorations make the client area - // smaller - virtual wxPoint GetClientAreaOrigin() const; - - // Makes an adjustment to the window position (for example, a frame that has - // a toolbar that it manages itself). - virtual void AdjustForParentClientOrigin(int& x, int& y, int sizeFlags); - - // Windows subclassing - void SubclassWin(WXHWND hWnd); - void UnsubclassWin(void); - virtual long Default(void); - virtual bool MSWCommand(WXUINT param, WXWORD id); - virtual bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam); - virtual wxWindow *FindItem(int id) const; - virtual wxWindow *FindItemByHWND(WXHWND hWnd, bool controlOnly = FALSE) const ; - virtual void PreDelete(WXHDC dc); // Allows system cleanup - // TO DO: how many of these need to be virtual? - virtual WXHWND GetHWND(void) const ; - virtual void SetHWND(WXHWND hWnd); - - // Make a Windows extended style from the given wxWindows window style - virtual WXDWORD MakeExtendedStyle(long style, bool eliminateBorders = TRUE); - // Determine whether 3D effects are wanted - virtual WXDWORD Determine3DEffects(WXDWORD defaultBorderStyle, bool *want3D); - - virtual void AddChild(wxWindow *child); // Adds reference to the child object - virtual void RemoveChild(wxWindow *child); // Removes reference to child - // (but doesn't delete the child object) - virtual void DestroyChildren(void); // Removes and destroys all children - - inline bool IsBeingDeleted(void); - - // MSW only: TRUE if this control is part of the main control - virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return FALSE; }; - - // Constraint implementation - void UnsetConstraints(wxLayoutConstraints *c); - inline wxList *GetConstraintsInvolvedIn(void) const ; - // Back-pointer to other windows we're involved with, so if we delete - // this window, we must delete any constraints we're involved with. - void AddConstraintReference(wxWindow *otherWin); - void RemoveConstraintReference(wxWindow *otherWin); - void DeleteRelatedConstraints(void); - - virtual void ResetConstraints(void); - virtual void SetConstraintSizes(bool recurse = TRUE); - virtual bool LayoutPhase1(int *noChanges); - virtual bool LayoutPhase2(int *noChanges); - virtual bool DoPhase(int); - // Transforms from sizer coordinate space to actual - // parent coordinate space - virtual void TransformSizerToActual(int *x, int *y) const ; - - // Set size with transformation to actual coordinates if nec. - virtual void SizerSetSize(int x, int y, int w, int h); - virtual void SizerMove(int x, int y); - - // Only set/get the size/position of the constraint (if any) - virtual void SetSizeConstraint(int x, int y, int w, int h); - virtual void MoveConstraint(int x, int y); - virtual void GetSizeConstraint(int *w, int *h) const ; - virtual void GetClientSizeConstraint(int *w, int *h) const ; - virtual void GetPositionConstraint(int *x, int *y) const ; - - wxObject *GetChild(int number) const ; - - void MSWCreate(int id, wxWindow *parent, const char *wclass, wxWindow *wx_win, const char *title, - int x, int y, int width, int height, - WXDWORD style, const char *dialog_template = NULL, - WXDWORD exendedStyle = 0); - - // Actually defined in wx_canvs.cc since requires wxCanvas declaration - virtual void MSWDeviceToLogical(float *x, float *y) const ; - - // Create an appropriate wxWindow from a HWND - virtual wxWindow* CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd); - - // Make sure the window style reflects the HWND style (roughly) - virtual void AdoptAttributesFromHWND(void); - - // Setup background and foreground colours correctly - virtual void SetupColours(void); - - // Saves the last message information before calling base version - virtual bool ProcessEvent(wxEvent& event); - - // Handlers - virtual void MSWOnCreate(WXLPCREATESTRUCT cs); - virtual bool MSWOnPaint(void); - virtual WXHICON MSWOnQueryDragIcon(void) { return 0; } - virtual void MSWOnSize(int x, int y, WXUINT flag); - virtual void MSWOnWindowPosChanging(void *lpPos); - virtual void MSWOnHScroll(WXWORD nSBCode, WXWORD pos, WXHWND control); - virtual void MSWOnVScroll(WXWORD nSBCode, WXWORD pos, WXHWND control); - virtual bool MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control); - virtual long MSWOnSysCommand(WXWPARAM wParam, WXLPARAM lParam); - virtual bool MSWOnNotify(WXWPARAM wParam, WXLPARAM lParam); - virtual WXHBRUSH MSWOnCtlColor(WXHDC dc, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam); - virtual bool MSWOnColorChange(WXHWND hWnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); - virtual long MSWOnPaletteChanged(WXHWND hWndPalChange); - virtual long MSWOnQueryNewPalette(); - virtual bool MSWOnEraseBkgnd(WXHDC pDC); - virtual void MSWOnMenuHighlight(WXWORD item, WXWORD flags, WXHMENU sysmenu); - virtual void MSWOnInitMenuPopup(WXHMENU menu, int pos, bool isSystem); - virtual bool MSWOnClose(void); - virtual bool MSWOnDestroy(void); - virtual bool MSWOnSetFocus(WXHWND wnd); - virtual bool MSWOnKillFocus(WXHWND wnd); - virtual void MSWOnDropFiles(WXWPARAM wParam); - virtual bool MSWOnInitDialog(WXHWND hWndFocus); - virtual void MSWOnShow(bool show, int status); - - // TODO: rationalise these functions into 1 or 2 which take the - // event type as argument. - virtual void MSWOnLButtonDown(int x, int y, WXUINT flags); - virtual void MSWOnLButtonUp(int x, int y, WXUINT flags); - virtual void MSWOnLButtonDClick(int x, int y, WXUINT flags); - - virtual void MSWOnMButtonDown(int x, int y, WXUINT flags); - virtual void MSWOnMButtonUp(int x, int y, WXUINT flags); - virtual void MSWOnMButtonDClick(int x, int y, WXUINT flags); - - virtual void MSWOnRButtonDown(int x, int y, WXUINT flags); - virtual void MSWOnRButtonUp(int x, int y, WXUINT flags); - virtual void MSWOnRButtonDClick(int x, int y, WXUINT flags); - - virtual void MSWOnMouseMove(int x, int y, WXUINT flags); - virtual void MSWOnMouseEnter(int x, int y, WXUINT flags); - virtual void MSWOnMouseLeave(int x, int y, WXUINT flags); - - virtual void MSWOnChar(WXWORD wParam, WXLPARAM lParam, bool isASCII = FALSE); - - virtual bool MSWOnActivate(int flag, bool minimized, WXHWND activate); - virtual long MSWOnMDIActivate(long flag, WXHWND activate, WXHWND deactivate); - - virtual bool MSWOnDrawItem(int id, WXDRAWITEMSTRUCT *item); - virtual bool MSWOnMeasureItem(int id, WXMEASUREITEMSTRUCT *item); - - virtual void MSWOnJoyDown(int joystick, int x, int y, WXUINT flags); - virtual void MSWOnJoyUp(int joystick, int x, int y, WXUINT flags); - virtual void MSWOnJoyMove(int joystick, int x, int y, WXUINT flags); - virtual void MSWOnJoyZMove(int joystick, int z, WXUINT flags); - - virtual long MSWGetDlgCode(); - - // Window procedure - virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); - - // Calls an appropriate default window procedure - virtual long MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); - virtual bool MSWProcessMessage(WXMSG* pMsg); - virtual bool MSWTranslateMessage(WXMSG* pMsg); - virtual void MSWDestroyWindow(void); - - // Detach "Window" menu from menu bar so it doesn't get deleted - void MSWDetachWindowMenu(void); - - inline WXFARPROC MSWGetOldWndProc() const; - inline void MSWSetOldWndProc(WXFARPROC proc); - - // Define for each class of dialog and control - virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam); - - inline void SetShowing(bool show); - inline bool IsUserEnabled(void) const; - inline bool GetUseCtl3D(void) const ; - inline bool GetTransparentBackground(void) const ; - - // Responds to colour changes: passes event on to children. - void OnSysColourChanged(wxSysColourChangedEvent& event); - - // Transfers data to any child controls - void OnInitDialog(wxInitDialogEvent& event); - - // Sends an OnInitDialog event, which in turns transfers data to - // to the window via validators. - virtual void InitDialog(void); - - //////////////////////////////////////////////////////////////////////// - //// PROTECTED DATA -protected: - wxAcceleratorTable m_acceleratorTable; - int m_windowId; - long m_windowStyle; // Store the window's style - wxEvtHandler * m_windowEventHandler; // Usually is 'this' - wxLayoutConstraints * m_constraints; // Constraints for this window - wxList * m_constraintsInvolvedIn; // List of constraints we're involved in - wxSizer * m_windowSizer; // Window's top-level sizer (if any) - wxWindow * m_sizerParent; // Window's parent sizer (if any) - bool m_autoLayout; // Whether to call Layout() in OnSize - wxWindow * m_windowParent; // Each window always knows its parent - wxValidator * m_windowValidator; - // Old window proc, for subclassed controls - WXFARPROC m_oldWndProc; - bool m_useCtl3D; // Using CTL3D for this control - - bool m_inOnSize; // Protection against OnSize reentry -#ifndef _WX_WIN32__ - // Pointer to global memory, for EDIT controls that need - // special treatment to reduce USER area consumption. - WXHGLOBAL m_globalHandle; -#endif - - bool m_winEnabled; - int m_minSizeX; - int m_minSizeY; - int m_maxSizeX; - int m_maxSizeY; - - // Caret data - int m_caretWidth; - int m_caretHeight; - bool m_caretEnabled; - bool m_caretShown; - wxFont m_windowFont; // Window's font - bool m_isShown; - bool m_doubleClickAllowed ; - wxCursor m_windowCursor; // Window's cursor - bool m_winCaptured; - wxString m_windowName; // Window name - -#if USE_EXTENDED_STATICS - wxList m_staticItems; -#endif - - wxButton * m_defaultItem; - - wxColour m_backgroundColour ; - wxColour m_defaultBackgroundColour; - - wxColour m_foregroundColour ; - wxColour m_defaultForegroundColour; - - bool m_backgroundTransparent; - - int m_xThumbSize; - int m_yThumbSize; - - float m_lastXPos; - float m_lastYPos; - int m_lastEvent; - - bool m_mouseInWindow; - -#if USE_DRAG_AND_DROP - wxDropTarget *m_pDropTarget; // the current drop target or NULL -#endif //USE_DRAG_AND_DROP - -public: - WXHWND m_hWnd; // MS Windows window handle - WXUINT m_lastMsg; - WXWPARAM m_lastWParam; - WXLPARAM m_lastLParam; - - wxRegion m_updateRegion; -/* - wxRectangle m_updateRect; // Bounding box for screen damage area -#ifdef __WIN32__ - WXHRGN m_updateRgn; // NT allows access to the rectangle list -#endif -*/ - -// WXHANDLE m_acceleratorTable; - WXHMENU m_hMenu; // Menu, if any - wxList * m_children; // Window's children - int m_returnCode; - bool m_isBeingDeleted; // Fudge because can't access parent - // when being deleted - -DECLARE_EVENT_TABLE() -}; - -//////////////////////////////////////////////////////////////////////// -//// INLINES - -inline void *wxWindow::GetHandle(void) const { return (void *)GetHWND(); } -inline int wxWindow::GetId() const { return m_windowId; } -inline void wxWindow::SetId(int id) { m_windowId = id; } -inline wxWindow *wxWindow::GetParent(void) const { return m_windowParent; } -inline void wxWindow::SetParent(wxWindow *p) { m_windowParent = p; } -inline wxWindow *wxWindow::GetGrandParent(void) const { return (m_windowParent ? m_windowParent->m_windowParent : NULL); } -inline wxList *wxWindow::GetChildren() const { return m_children; } -inline wxFont *wxWindow::GetFont(void) const { return (wxFont *) & m_windowFont; } -inline wxString wxWindow::GetName(void) const { return m_windowName; } -inline void wxWindow::SetName(const wxString& name) { m_windowName = name; } -inline long wxWindow::GetWindowStyleFlag(void) const { return m_windowStyle; } -inline void wxWindow::SetWindowStyleFlag(long flag) { m_windowStyle = flag; } -inline void wxWindow::SetDoubleClick(bool flag) { m_doubleClickAllowed = flag; } -inline bool wxWindow::GetDoubleClick(void) const { return m_doubleClickAllowed; } -inline void wxWindow::SetEventHandler(wxEvtHandler *handler) { m_windowEventHandler = handler; } -inline wxEvtHandler *wxWindow::GetEventHandler(void) const { return m_windowEventHandler; } -inline void wxWindow::SetAutoLayout(bool a) { m_autoLayout = a; } -inline bool wxWindow::GetAutoLayout(void) const { return m_autoLayout; } -inline wxLayoutConstraints *wxWindow::GetConstraints(void) const { return m_constraints; } -inline void wxWindow::SetBackgroundColour(const wxColour& col) { m_backgroundColour = col; }; -inline wxColour wxWindow::GetBackgroundColour(void) const { return m_backgroundColour; }; -inline void wxWindow::SetForegroundColour(const wxColour& col) { m_foregroundColour = col; }; -inline wxColour wxWindow::GetForegroundColour(void) const { return m_foregroundColour; }; -inline void wxWindow::SetDefaultForegroundColour(const wxColour& col) { m_defaultForegroundColour = col; }; -inline wxColour wxWindow::GetDefaultForegroundColour(void) const { return m_defaultForegroundColour; }; -inline void wxWindow::SetDefaultBackgroundColour(const wxColour& col) { m_defaultBackgroundColour = col; }; -inline wxColour wxWindow::GetDefaultBackgroundColour(void) const { return m_defaultBackgroundColour; }; - -inline wxButton *wxWindow::GetDefaultItem(void) const { return m_defaultItem; } -inline void wxWindow::SetDefaultItem(wxButton *but) { m_defaultItem = but; } -inline bool wxWindow::IsRetained(void) const { return ((m_windowStyle & wxRETAINED) == wxRETAINED); } - -inline void wxWindow::SetShowing(bool show) { m_isShown = show; } -inline wxList *wxWindow::GetConstraintsInvolvedIn(void) const { return m_constraintsInvolvedIn; } -inline wxSizer *wxWindow::GetSizer(void) const { return m_windowSizer; } -inline wxWindow *wxWindow::GetSizerParent(void) const { return m_sizerParent; } -inline void wxWindow::SetSizerParent(wxWindow *win) { m_sizerParent = win; } -inline WXFARPROC wxWindow::MSWGetOldWndProc() const { return m_oldWndProc; } -inline void wxWindow::MSWSetOldWndProc(WXFARPROC proc) { m_oldWndProc = proc; } -inline wxValidator *wxWindow::GetValidator(void) const { return m_windowValidator; } -inline bool wxWindow::IsUserEnabled(void) const { return m_winEnabled; } -inline bool wxWindow::GetUseCtl3D(void) const { return m_useCtl3D; } -inline bool wxWindow::GetTransparentBackground(void) const { return m_backgroundTransparent; } -inline void wxWindow::SetReturnCode(int retCode) { m_returnCode = retCode; } -inline int wxWindow::GetReturnCode(void) { return m_returnCode; } -inline bool wxWindow::IsBeingDeleted(void) { return m_isBeingDeleted; } - -// Window specific (so far) -wxWindow* WXDLLEXPORT wxGetActiveWindow(void); - -WXDLLEXPORT_DATA(extern wxList) wxTopLevelWindows; - -int WXDLLEXPORT wxCharCodeMSWToWX(int keySym); -int WXDLLEXPORT wxCharCodeWXToMSW(int id, bool *IsVirtual); - -// Allocates control ids -int WXDLLEXPORT NewControlId(void); - -#endif - // _WX_WINDOW_H_ diff --git a/include/wx/msw/wx.rc b/include/wx/msw/wx.rc deleted file mode 100644 index 9bbc41a3ed..0000000000 --- a/include/wx/msw/wx.rc +++ /dev/null @@ -1,110 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// File: wx.rc -// Purpose: wxWindows resource definitions. ALWAYS include -// this in your application resource file. -// -// wxWindows version 1.50 -// Copyright (c) 1993 Artificial Intelligence Applications Institute, -// The University of Edinburgh -// -// Author: Julian Smart -// Date: 9-4-93 -// -// Permission to use, copy, modify, and distribute this software and its -// documentation for any purpose is hereby granted without fee, provided -// that the above copyright notice, author statement and this permission -// notice appear in all copies of this software and related documentation. -// -// THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, -// IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF -// MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -// -// IN NO EVENT SHALL THE ARTIFICIAL INTELLIGENCE APPLICATIONS INSTITUTE OR THE -// UNIVERSITY OF EDINBURGH BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR -// CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM -// LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF -// DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH -// THE USE OR PERFORMANCE OF THIS SOFTWARE. -///////////////////////////////////////////////////////////////////////////// -// -// - -#ifdef __GNUWIN32__ -#include -#else -#include -#endif - -////////////////////////////////////////////////////////////////////////////// -// -// Dummy Dialog for all wxCAPTION Dialog boxes -// - -wxCaptionDialog DIALOG DISCARDABLE 34, 22, 144, 75 -STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION "Dummy dialog" -BEGIN - LTEXT "", -1,-2,-2,1,1 //necessary for __WATCOMC__ -END - -// -// Dummy dialog for dialog boxes without caption & with thin frame -// -wxNoCaptionDialog DIALOG 34, 22, 144, 75 -STYLE WS_POPUP -BEGIN - LTEXT "", -1,-2,-2,1,1 //necessary for __WATCOMC__ -END - -////////////////////////////////////////////////////////////////////////////// -// -// This is the MDI Window menu -// - -wxWindowMenu MENU DISCARDABLE -BEGIN - POPUP "&Window" - BEGIN - MENUITEM "&Cascade", 4002 - MENUITEM "&Tile", 4001 - MENUITEM "&Arrange icons", 4003 - MENUITEM "&Next", 4004 - END -END - -////////////////////////////////////////////////////////////////////////////// -// -// Standard wxWindows Cursors -// - -WXCURSOR_HAND CURSOR DISCARDABLE "wx/msw/hand.cur" -WXCURSOR_BULLSEYE CURSOR DISCARDABLE "wx/msw/bullseye.cur" -WXCURSOR_PENCIL CURSOR DISCARDABLE "wx/msw/pencil.cur" -WXCURSOR_MAGNIFIER CURSOR DISCARDABLE "wx/msw/magnif1.cur" -WXCURSOR_NO_ENTRY CURSOR DISCARDABLE "wx/msw/noentry.cur" -WXCURSOR_SIZING CURSOR DISCARDABLE "wx/msw/size.cur" -WXCURSOR_ROLLER CURSOR DISCARDABLE "wx/msw/roller.cur" -WXCURSOR_WATCH CURSOR DISCARDABLE "wx/msw/watch1.cur" -WXCURSOR_PBRUSH CURSOR DISCARDABLE "wx/msw/pbrush.cur" -WXCURSOR_PLEFT CURSOR DISCARDABLE "wx/msw/pntleft.cur" -WXCURSOR_PRIGHT CURSOR DISCARDABLE "wx/msw/pntright.cur" -WXCURSOR_QARROW CURSOR DISCARDABLE "wx/msw/query.cur" -WXCURSOR_BLANK CURSOR DISCARDABLE "wx/msw/blank.cur" - -////////////////////////////////////////////////////////////////////////////// -// -// Default Icons -// - -wxDEFAULT_FRAME ICON "wx/msw/std.ico" -wxDEFAULT_MDIPARENTFRAME ICON "wx/msw/mdi.ico" -wxDEFAULT_MDICHILDFRAME ICON "wx/msw/child.ico" - -////////////////////////////////////////////////////////////////////////////// -// -// Bitmaps -// - -wxDISABLE_BUTTON_BITMAP BITMAP "wx/msw/disable.bmp" - - diff --git a/include/wx/notebook.h b/include/wx/notebook.h deleted file mode 100644 index 4d2aaafc5c..0000000000 --- a/include/wx/notebook.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_NOTEBOOK_H_BASE_ -#define _WX_NOTEBOOK_H_BASE_ - -#if defined(__WXMSW__) - #include "wx/msw/notebook.h" -#elif defined(__WXMOTIF__) - #include "wx/motif/notebook.h" -#elif defined(__WXGTK__) - #include "wx/gtk/notebook.h" -#elif defined(__WXQT__) - #include "wx/qt/notebook.h" -#elif defined(__WXMAC__) - #include "wx/mac/notebook.h" -#elif defined(__WXSTUBS__) - #include "wx/stubs/notebook.h" -#endif - -#endif - // _WX_NOTEBOOK_H_BASE_ diff --git a/include/wx/object.h b/include/wx/object.h deleted file mode 100644 index 314c1c6f5a..0000000000 --- a/include/wx/object.h +++ /dev/null @@ -1,234 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: object.h -// Purpose: wxObject class, plus run-time type information macros -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_OBJECTH__ -#define _WX_OBJECTH__ - -#ifdef __GNUG__ -#pragma interface "object.h" -#endif - -#include "wx/defs.h" - -class WXDLLEXPORT wxObject; - -#if USE_DYNAMIC_CLASSES - -#ifdef __GNUWIN32__ -#ifdef GetClassName -#undef GetClassName -#endif -#endif - -class WXDLLEXPORT wxClassInfo; -class WXDLLIMPORT ostream; -class WXDLLEXPORT wxInputStream; -class WXDLLEXPORT wxObjectInputStream; -class WXDLLEXPORT wxObjectOutputStream; -class WXDLLEXPORT wxHashTable; -class WXDLLEXPORT wxObject_Serialize; - -/* - * Dynamic object system declarations - */ - -typedef wxObject * (*wxObjectConstructorFn) (void); - -class WXDLLEXPORT wxClassInfo -{ - public: - char *className; - char *baseClassName1; - char *baseClassName2; - int objectSize; - wxObjectConstructorFn objectConstructor; - - // Pointers to base wxClassInfos: set in InitializeClasses - // called from wx_main.cc - wxClassInfo *baseInfo1; - wxClassInfo *baseInfo2; - - static wxClassInfo *first; - wxClassInfo *next; - - static wxHashTable classTable; - - wxClassInfo(char *cName, char *baseName1, char *baseName2, int sz, wxObjectConstructorFn fn); - - wxObject *CreateObject(void); - - inline char *GetClassName(void) const { return className; } - inline char *GetBaseClassName1(void) const { return baseClassName1; } - inline char *GetBaseClassName2(void) const { return baseClassName2; } - inline int GetSize(void) const { return objectSize; } - bool IsKindOf(wxClassInfo *info); - - static wxClassInfo *FindClass(char *c); - // Initializes parent pointers for fast searching. - static void InitializeClasses(void); -}; - -wxObject* WXDLLEXPORT wxCreateDynamicObject(char *name); - -#ifdef USE_SERIAL -wxObject* WXDLLEXPORT wxCreateStoredObject( wxInputStream& stream ); -#endif - -#define DECLARE_DYNAMIC_CLASS(name) \ - public:\ - static wxClassInfo class##name;\ - wxClassInfo *GetClassInfo() \ - { return &name::class##name; } - -#define DECLARE_ABSTRACT_CLASS(name) DECLARE_DYNAMIC_CLASS(name) -#define DECLARE_CLASS(name) DECLARE_DYNAMIC_CLASS(name) - -////// -////// for concrete classes -////// - -// Single inheritance with one base class -#define IMPLEMENT_DYNAMIC_CLASS(name, basename) \ -wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \ - { return new name; }\ - wxClassInfo name::class##name((char *) #name, (char *) #basename, (char *) NULL, (int) sizeof(name), (wxObjectConstructorFn) wxConstructorFor##name); - -// Multiple inheritance with two base classes -#define IMPLEMENT_DYNAMIC_CLASS2(name, basename1, basename2) \ -wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \ - { return new name; }\ - wxClassInfo name::class##name((char *) #name, (char *) #basename1, (char *) #basename2, (int) sizeof(name), (wxObjectConstructorFn) wxConstructorFor##name); - -////// -////// for abstract classes -////// - -// Single inheritance with one base class -#define IMPLEMENT_ABSTRACT_CLASS(name, basename) \ - wxClassInfo name::class##name((char *) #name, (char *) #basename, \ - (char *) NULL, (int) sizeof(name), (wxObjectConstructorFn) NULL); - -// Multiple inheritance with two base classes -#define IMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2) \ - wxClassInfo name::class##name((char *) #name, (char *) #basename1, (char *) #basename2, (int) sizeof(name), (wxObjectConstructorFn) NULL); - -#define IMPLEMENT_CLASS IMPLEMENT_ABSTRACT_CLASS -#define IMPLEMENT_CLASS2 IMPLEMENT_ABSTRACT_CLASS2 - -#define CLASSINFO(name) (&name::class##name) - -#else - -// No dynamic class system: so stub out the macros -#define DECLARE_DYNAMIC_CLASS(name) -#define DECLARE_ABSTRACT_CLASS(name) -#define DECLARE_CLASS(name) -#define IMPLEMENT_DYNAMIC_CLASS(name, basename) -#define IMPLEMENT_DYNAMIC_CLASS2(name, basename1, basename2) -#define IMPLEMENT_ABSTRACT_CLASS(name, basename) -#define IMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2) -#define IMPLEMENT_CLASS IMPLEMENT_ABSTRACT_CLASS -#define IMPLEMENT_CLASS2 IMPLEMENT_ABSTRACT_CLASS2 - -#endif - -#define IS_KIND_OF(obj, className) obj->IsKindOf(&className::class##className) - -// Unfortunately Borland seems to need this include. -#ifdef __BORLANDC__ -#if USE_IOSTREAMH -#include -#else -#include -#endif -#endif - -class WXDLLEXPORT wxObjectRefData; - -class WXDLLEXPORT wxObject -{ - public: - - // This is equivalent to using the macro DECLARE_ABSTRACT_CLASS - static wxClassInfo classwxObject; - - wxObject(void); - virtual ~wxObject(void); - - virtual wxClassInfo *GetClassInfo(void) { return &classwxObject; } - - bool IsKindOf(wxClassInfo *info); - -#if WXDEBUG && USE_MEMORY_TRACING - void * operator new (size_t size, char * fileName = NULL, int lineNum = 0); - void operator delete (void * buf); - - // Cause problems for VC++ -#ifndef _MSC_VER - void * operator new[] (size_t size, char * fileName = NULL, int lineNum = 0); - void operator delete[] (void * buf); -#endif - -#endif - -#if WXDEBUG || USE_DEBUG_CONTEXT - virtual void Dump(ostream& str); -#endif - -#ifdef USE_SERIAL - virtual void StoreObject( wxObjectOutputStream &stream ); - virtual void LoadObject( wxObjectInputStream &stream ); -#endif - - // make a 'clone' of the object - void Ref(const wxObject& clone); - - // destroy a reference - void UnRef(void); - - inline wxObjectRefData *GetRefData(void) const { return m_refData; } - inline void SetRefData(wxObjectRefData *data) { m_refData = data; } - -protected: - wxObjectRefData *m_refData; -#ifdef USE_SERIAL - wxObject_Serialize *m_serialObj; -#endif -}; - -/* - * wxObjectData - */ - -class WXDLLEXPORT wxObjectRefData { - - friend class wxObject; - -public: - wxObjectRefData(void); - virtual ~wxObjectRefData(void); - - inline int GetRefCount(void) const { return m_count; } -private: - int m_count; -}; - -#if WXDEBUG && USE_GLOBAL_MEMORY_OPERATORS -#ifndef WXDEBUG_NEW -#define WXDEBUG_NEW new(__FILE__,__LINE__) -#endif -#define new WXDEBUG_NEW -#endif - -#endif - // _WX_OBJECTH__ - - diff --git a/include/wx/objstrm.h b/include/wx/objstrm.h deleted file mode 100644 index 699492671c..0000000000 --- a/include/wx/objstrm.h +++ /dev/null @@ -1,83 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: objstrm.h -// Purpose: wxObjectStream classes -// Author: Guilhem Lavaux -// Modified by: -// Created: 16/07/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// -#ifndef _WX_WXOBJSTRM_H__ -#define _WX_WXOBJSTRM_H__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/stream.h" - -class wxObjectStreamInfo : public wxObject { - public: - wxString object_name; - int n_children, children_removed; - wxList children; - wxObjectStreamInfo *parent; - wxObject *object; - bool duplicate, recall; -}; - -class wxObjectOutputStream : public wxFilterOutputStream { - public: - wxObjectOutputStream(wxOutputStream& s); - - void AddChild(wxObject *obj); - bool SaveObject(wxObject& obj); - - bool FirstStage() const { return m_stage == 0; } - - wxString GetObjectName(wxObject *obj); - - protected: - void WriteObjectDef(wxObjectStreamInfo& info); - void ProcessObjectDef(wxObjectStreamInfo *info); - void ProcessObjectData(wxObjectStreamInfo *info); - - protected: - int m_stage; - bool m_saving; - wxObjectStreamInfo *m_current_info; - wxList m_saved_objs; -}; - -class wxObjectInputStream : public wxFilterInputStream { - public: - wxObjectInputStream(wxInputStream& s); - - bool SecondCall() const { return m_secondcall; } - void Recall(bool on = TRUE) { m_current_info->recall = on; } - - wxObject *GetChild(int no) const; - wxObject *GetChild(); - int NumberOfChildren() const { return m_current_info->n_children; } - void RemoveChildren(int nb); - wxObject *GetParent() const; - wxObject *LoadObject(); - - wxObject *SolveName(const wxString& objName) const; - - protected: - bool ReadObjectDef(wxObjectStreamInfo *info); - wxObjectStreamInfo *ProcessObjectDef(wxObjectStreamInfo *info); - void ProcessObjectData(wxObjectStreamInfo *info); - - protected: - bool m_secondcall; - wxObjectStreamInfo *m_current_info; - wxList m_solver; -}; - -#endif diff --git a/include/wx/odbc.h b/include/wx/odbc.h deleted file mode 100644 index 5a3b3899a4..0000000000 --- a/include/wx/odbc.h +++ /dev/null @@ -1,334 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: odbc.h -// Purpose: ODBC classes -// Author: Olaf Klein, Patrick Halke, Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#include "wx/setup.h" - -#if USE_ODBC - -#ifdef __GNUG__ -#pragma interface "odbc.h" -#endif - -#ifndef _WX_ODBCH__ -#define _WX_ODBCH__ - -#ifdef __WXMSW__ -#include -#endif - -#ifdef __WXGTK__ -extern "C" { -#include <../iodbc/postgres/isqlext.h> -#include <../iodbc/postgres/odbc_funcs.h> -#include <../iodbc/postgres/odbc_types.h> -} -#else -#include -#endif - -#include "wx/defs.h" -#include "wx/list.h" -#include "wx/string.h" - -typedef RETCODE wxRETCODE; - -// Recordset open types -#define wxOPEN_TYPE_DYNASET 1 -#define wxOPEN_TYPE_SNAPSHOT 2 -#define wxOPEN_TYPE_FORWARD_ONLY 3 - -// Recordset open options -#define wxOPTION_DEFAULT 1 -#define wxOPTION_APPEND_ONLY 2 -#define wxOPTION_READ_ONLY 3 - -// Data types -class WXDLLEXPORT wxRecordSet; - -class WXDLLEXPORT wxDatabase: public wxObject -{ - // JACS - DECLARE_DYNAMIC_CLASS(wxDatabase) - private: - protected: - static HENV hEnv; - static int refCount; - - HDBC hDBC; - char* username; - char* password; - char* datasource; - char* dbname; - char* connectstring; - bool isOpen; - - // error-handling variables - wxRETCODE retcode; - char sqlstate[SQL_SQLSTATE_SIZE+1]; // error class and subclass - char errmsg[SQL_MAX_MESSAGE_LENGTH]; // error message - long nat_err; // error number by ODBC driver - bool err_occured; - - wxList recordSets; // Record sets: Added by JACS - - public: - wxDatabase(void); - ~wxDatabase(void); - - bool Open(char *, bool exclusive =FALSE, bool readOnly =TRUE, char *username ="ODBC", char *password =""); - bool Close(void); - - // Cleanup operations, added by JACS - void DeleteRecordSets(void); // Called when the database is deleted - void ResetRecordSets(void); // Required if the database is closed - inline wxList& GetRecordSets(void) { return recordSets; } - - inline char *GetUsername(void) { return username; } - inline char *GetPassword(void) { return password; } - inline char *GetDataSource(void) { return datasource; } - inline bool IsOpen(void) { return isOpen; } - inline wxRETCODE GetErrorCode(void) { return retcode; } - inline HDBC GetHDBC(void) { return hDBC; } - inline HENV GetHENV(void) { return hEnv; } - - void SetPassword(char *s); - void SetUsername(char *s); - void SetDataSource(char *s); - - // Database attributes - char *GetDatabaseName(void); - bool CanUpdate(void); - bool CanTransact(void); - bool InWaitForDataSource(void); - void SetLoginTimeout(long seconds); - void SetQueryTimeout(long seconds); - void SetSynchronousMode(bool synchronous); - - // Database operations - bool BeginTrans(void); - bool CommitTrans(void); - bool RollbackTrans(void); - void Cancel(void); - - // Error handling - bool ErrorOccured(void); - char* GetErrorMessage(void); - long GetErrorNumber(void); - char* GetErrorClass(void); - inline void ErrorSnapshot(HSTMT =SQL_NULL_HSTMT); - - // Overridables - virtual void OnSetOptions(wxRecordSet *recordSet); - virtual void OnWaitForDataSource(bool stillExecuting); - - bool GetInfo(long infoType, long *buf); - bool GetInfo(long infoType, char *buf, int bufSize = -1); - - // implementation = TRUE means get the DLL version. - // Otherwise, returns header file version. - wxString GetODBCVersionString(bool implementation = TRUE); - float GetODBCVersionFloat(bool implementation = TRUE); -}; - -// Represents a data row -class WXDLLEXPORT wxQueryField: public wxObject -{ - // JACS - DECLARE_DYNAMIC_CLASS(wxQueryField) - private: - void *data; - short type; - long size; - bool dirty; - - bool AllocData(void); - - public: - wxQueryField(void); - ~wxQueryField(void); - - bool SetData(void*, long); - void SetDirty(bool =TRUE); - void ClearData(void); - void SetType(short); - void SetSize(long); - - void* GetData(void); - short GetType(void); - long GetSize(void); - - bool IsDirty(void); -}; - -// Represents a column description -class WXDLLEXPORT wxQueryCol: public wxObject -{ - // JACS - DECLARE_DYNAMIC_CLASS(wxQueryCol) - private: - short type; - char *name; - bool nullable; - long varsize; - void* var; - - public: - wxList fields; - - wxQueryCol(void); - ~wxQueryCol(void); - - void* BindVar(void*, long); - void FillVar(int); - void AppendField(void*, long); - bool SetData(int, void*, long); - void SetName(char*); - void SetNullable(bool); - void SetFieldDirty(int, bool =TRUE); - void SetType(short); - - char* GetName(void); - short GetType(void); - bool IsNullable(void); - void* GetData(int); - long GetSize(int); - - bool IsFieldDirty(int); -}; - -class WXDLLEXPORT wxRecordSet: public wxObject -{ - // JACS - DECLARE_DYNAMIC_CLASS(wxRecordSet) - private: - int cursor; - int type; - int options; - - protected: - HSTMT hStmt; - int nFields; - int nParams; - int nRecords; - short nCols; - char *recordFilter; - char *sortString; - char *defaultSQL; - char* tablename; - wxDatabase *parentdb; - wxRETCODE retcode; - wxList cols; - wxList fetchbuf; - - void FillVars(int); - - public: - // JACS gave parent a default value for benefit of IMPLEMENT_DYNAMIC_CLASS - wxRecordSet(wxDatabase *parent = NULL, int =wxOPEN_TYPE_DYNASET, int =wxOPTION_DEFAULT); - ~wxRecordSet(void); - - // My own, lower-level functions. - bool BeginQuery(int openType, char *sql = NULL, int options = wxOPTION_DEFAULT); - bool EndQuery(void); - bool Query(char* columns, char* table =NULL, char *filter =NULL); - - // Attributes - inline int GetNumberFields(void) { return nFields; } - inline int GetNumberParams(void) { return nParams; } - long GetNumberRecords(void); - long GetNumberCols(void); - inline char *GetFilter(void) { return recordFilter; } - inline char *GetSortString(void) { return sortString; } - inline wxDatabase *GetDatabase(void) { return parentdb; } - inline wxRETCODE GetErrorCode(void) { return retcode; } - bool CanAppend(void); - bool CanRestart(void); - bool CanScroll(void); - bool CanTransact(void); - bool CanUpdate(void); - long GetCurrentRecord(void); - bool RecordCountFinal(void); - bool GetResultSet(void); - bool ExecuteSQL(char*); - bool GetTables(void); - bool GetColumns(char* =NULL); - bool GetPrimaryKeys(char* =NULL); - bool GetForeignKeys(char* , char * ); - char *GetTableName(void); - void SetTableName(char*); - char *GetSQL(void); - bool IsOpen(void); - bool IsBOF(void); - bool IsEOF(void); - bool IsDeleted(void); - - bool GetFieldData(int colPos, int dataType, void *dataPtr); - bool GetFieldData(const char*, int dataType, void *dataPtr); - void* GetFieldDataPtr(int, int); - void* GetFieldDataPtr(const char*, int); - char* GetColName(int); - short GetColType(int); - short GetColType(const char*); - void* BindVar(int, void*, long); - void* BindVar(const char*, void*, long); - - void SetType(int); - int GetType(void); - void SetOptions(int); - int GetOptions(void); - - // Update operations - void AddNew(void); - bool Delete(void); - void Edit(void); - bool Update(void); - - // Record navigation - virtual bool Move(long rows); - virtual bool MoveFirst(void); - virtual bool MoveLast(void); - virtual bool MoveNext(void); - virtual bool MovePrev(void); - virtual bool GoTo(long); - - // Others - bool GetDataSources(void); - - // Associate a column name/position with a data location - // bool BindColumn(int colPos, int dataType, void *dataPtr); - - void Cancel(void); - bool IsFieldDirty(int); - bool IsFieldDirty(const char*); - bool IsFieldNull(int); - bool IsFieldNull(const char*); - bool IsColNullable(int); - bool IsColNullable(const char*); - virtual bool Requery(void); - virtual void SetFieldDirty(int, bool dirty = TRUE); - virtual void SetFieldDirty(const char*, bool dirty = TRUE); - void SetFieldNull(void *p, bool isNull = TRUE); - - // Overridables - virtual char *GetDefaultConnect(void); - virtual char *GetDefaultSQL(void); - - // Internal - - // Build SQL query from column specification - bool ConstructDefaultSQL(void); - void SetDefaultSQL(char *s); - bool ReleaseHandle(void); // Added JACS -}; - -#endif - -#endif // USE_ODBC diff --git a/include/wx/ownerdrw.h b/include/wx/ownerdrw.h deleted file mode 100644 index 050d8d9986..0000000000 --- a/include/wx/ownerdrw.h +++ /dev/null @@ -1,135 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: ownerdrw.h -// Purpose: interface for owner-drawn GUI elements -// Author: Vadim Zeitlin -// Modified by: -// Created: 11.11.97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _OWNERDRW_H -#define _OWNERDRW_H - -#ifdef __GNUG__ -#pragma interface "ownerdrw.h" -#endif - -typedef wxColour wxColor; -typedef unsigned int size_t; - -// ---------------------------------------------------------------------------- -// wxOwnerDrawn - a mix-in base class, derive from it to implement owner-drawn -// behaviour -// -// wxOwnerDrawn supports drawing of an item with non standard font, color and -// also supports 3 bitmaps: either a checked/unchecked bitmap for a checkable -// element or one unchangeable bitmap otherwise. -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxOwnerDrawn -{ -public: - // ctor & dtor - wxOwnerDrawn(const wxString& str = "", - bool bCheckable = FALSE, - bool bMenuItem = FALSE); // @@ kludge for colors - virtual ~wxOwnerDrawn() { } - - // fix appearance - inline void SetFont(const wxFont& font) - { m_font = font; m_bOwnerDrawn = TRUE; } - - inline wxFont& GetFont() const { return (wxFont &)m_font; } - - inline void SetTextColour(const wxColour& colText) - { m_colText = colText; m_bOwnerDrawn = TRUE; } - - inline wxColour& GetTextColour() const { return (wxColour&) m_colText; } - - inline void SetBackgroundColour(const wxColour& colBack) - { m_colBack = colBack; m_bOwnerDrawn = TRUE; } - - inline wxColour& GetBackgroundColour() const - { return (wxColour&) m_colBack ; } - - inline void SetBitmaps(const wxBitmap& bmpChecked, - const wxBitmap& bmpUnchecked = wxNullBitmap) - { m_bmpChecked = bmpChecked; - m_bmpUnchecked = bmpUnchecked; - m_bOwnerDrawn = TRUE; } - - inline wxBitmap& GetBitmap(bool bChecked = TRUE) const - { return (wxBitmap &)(bChecked ? m_bmpChecked : m_bmpUnchecked); } - - // the height of the menu checkmark (or bitmap) is determined by the font - // for the current item, but the width should be always the same (for the - // items to be aligned), so by default it's taken to be the same as for - // the last item (and default width for the first one). - // - // NB: default is too small for bitmaps, but ok for checkmarks. - inline void SetMarginWidth(int nWidth) - { ms_nLastMarginWidth = m_nMarginWidth = (size_t) nWidth; - if ( ((size_t) nWidth) != ms_nDefaultMarginWidth ) m_bOwnerDrawn = TRUE; } - - inline int GetMarginWidth() const { return (int) m_nMarginWidth; } - inline static int GetDefaultMarginWidth() { return (int) ms_nDefaultMarginWidth; } - - // accessors - void SetName(const wxString& strName) { m_strName = strName; } - const wxString& GetName() const { return m_strName; } - bool IsCheckable() const { return m_bCheckable; } - - // this function might seem strange, but if it returns FALSE it means that - // no non-standard attribute are set, so there is no need for this control - // to be owner-drawn. Moreover, you can force owner-drawn to FALSE if you - // want to change, say, the color for the item but only if it is owner-drawn - // (see wxMenuItem::wxMenuItem for example) - inline bool IsOwnerDrawn() const { return m_bOwnerDrawn; } - inline void ResetOwnerDrawn() { m_bOwnerDrawn = FALSE; } - -public: - // constants used in OnDrawItem - // (they have the same values as corresponding Win32 constants) - enum wxODAction - { - wxODDrawAll = 0x0001, // redraw entire control - wxODSelectChanged = 0x0002, // selection changed (see Status.Select) - wxODFocusChanged = 0x0004, // keyboard focus changed (see Status.Focus) - }; - - enum wxODStatus - { - wxODSelected = 0x0001, // control is currently selected - wxODGrayed = 0x0002, // item is to be grayed - wxODDisabled = 0x0004, // item is to be drawn as disabled - wxODChecked = 0x0008, // item is to be checked - wxODHasFocus = 0x0010, // item has the keyboard focus - wxODDefault = 0x0020, // item is the default item - }; - - // virtual functions to implement drawing (return TRUE if processed) - virtual bool OnMeasureItem(size_t *pwidth, size_t *pheight); - virtual bool OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODStatus stat); - -protected: - wxString m_strName; // label for a manu item - -private: - static size_t ms_nDefaultMarginWidth; // menu check mark width - static size_t ms_nLastMarginWidth; // handy for aligning all items - - bool m_bCheckable, // used only for menu or check listbox items - m_bOwnerDrawn; // true if something is non standard - - wxFont m_font; // font to use for drawing - wxColor m_colText, // color ----"---"---"---- - m_colBack; // background color - wxBitmap m_bmpChecked, // bitmap to put near the item - m_bmpUnchecked; // (checked is used also for 'uncheckable' items) - - size_t m_nHeight, // font height - m_nMarginWidth; // space occupied by bitmap to the left of the item -}; - -#endif //_OWNERDRW_H \ No newline at end of file diff --git a/include/wx/palette.h b/include/wx/palette.h deleted file mode 100644 index 9702d374a1..0000000000 --- a/include/wx/palette.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_PALETTE_H_BASE_ -#define _WX_PALETTE_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/palette.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/palette.h" -#elif defined(__WXGTK__) -#include "wx/gtk/palette.h" -#elif defined(__WXQT__) -#include "wx/qt/palette.h" -#elif defined(__WXMAC__) -#include "wx/mac/palette.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/palette.h" -#endif - -#endif - // _WX_PALETTE_H_BASE_ diff --git a/include/wx/panel.h b/include/wx/panel.h deleted file mode 100644 index 0bfa7daaca..0000000000 --- a/include/wx/panel.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _WX_PANEL_H_BASE_ -#define _WX_PANEL_H_BASE_ - -#include "wx/generic/panelg.h" - -#endif - // _WX_PANELH_BASE_ diff --git a/include/wx/pen.h b/include/wx/pen.h deleted file mode 100644 index d132d8a7c9..0000000000 --- a/include/wx/pen.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_PEN_H_BASE_ -#define _WX_PEN_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/pen.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/pen.h" -#elif defined(__WXGTK__) -#include "wx/gtk/pen.h" -#elif defined(__WXQT__) -#include "wx/qt/pen.h" -#elif defined(__WXMAC__) -#include "wx/mac/pen.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/pen.h" -#endif - -#endif - // _WX_PEN_H_BASE_ diff --git a/include/wx/pnghand.h b/include/wx/pnghand.h deleted file mode 100644 index 405e234ba5..0000000000 --- a/include/wx/pnghand.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _WX_PNGHAND_H_BASE_ -#define _WX_PNGHAND_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/pnghand.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/pnghand.h" -#elif defined(__WXGTK__) -#include "wx/gtk/pnghand.h" -#elif defined(__WXMAC__) -#include "wx/mac/pnghand.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/pnghand.h" -#endif - -#endif - // _WX_PNGHAND_H_BASE_ diff --git a/include/wx/postscrp.h b/include/wx/postscrp.h deleted file mode 100644 index 18c6fbc430..0000000000 --- a/include/wx/postscrp.h +++ /dev/null @@ -1,299 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: postscrp.h -// Purpose: wxPostScriptDC class -// Author: Julian Smart and others -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_POSTSCRPH__ -#define _WX_POSTSCRPH__ - -#ifdef __GNUG__ -#pragma interface "postscrp.h" -#endif - -#include "wx/dc.h" -#include "wx/dialog.h" - -#if USE_POSTSCRIPT - -class WXDLLIMPORT ofstream; -class WXDLLEXPORT wxPostScriptDC: public wxDC -{ - DECLARE_DYNAMIC_CLASS(wxPostScriptDC) - - public: - // Create a printer DC - wxPostScriptDC(void); - wxPostScriptDC(const wxString& output, bool interactive = TRUE, wxWindow *parent = (wxWindow *) NULL); - - ~wxPostScriptDC(void); - - bool Create(const wxString& output, bool interactive = TRUE, wxWindow *parent = (wxWindow *) NULL); - - virtual bool PrinterDialog(wxWindow *parent = (wxWindow *) NULL); - - inline virtual void BeginDrawing(void) {} ; - inline virtual void EndDrawing(void) {} ; - - void FloodFill(long x1, long y1, wxColour *col, int style=wxFLOOD_SURFACE) ; - bool GetPixel(long x1, long y1, wxColour *col) const; - - void DrawLine(long x1, long y1, long x2, long y2); - void CrossHair(long x, long y) ; - void DrawArc(long x1,long y1,long x2,long y2,long xc,long yc); - void DrawEllipticArc(long x,long y,long w,long h,double sa,double ea); - void DrawPoint(long x, long y); - // Avoid compiler warning - void DrawPoint(wxPoint& point) { wxDC::DrawPoint(point); } - void DrawLines(int n, wxPoint points[], long xoffset = 0, long yoffset = 0); - // Avoid compiler warning - void DrawLines(wxList *lines, long xoffset = 0, long yoffset = 0) - { wxDC::DrawLines(lines, xoffset, yoffset); } - void DrawPolygon(int n, wxPoint points[], long xoffset = 0, long yoffset = 0, int fillStyle=wxODDEVEN_RULE); - // Avoid compiler warning - void DrawPolygon(wxList *lines, long xoffset = 0, long yoffset = 0, int fillStyle=wxODDEVEN_RULE) - { wxDC::DrawPolygon(lines, xoffset, yoffset, fillStyle); } - void DrawRectangle(long x, long y, long width, long height); - void DrawRoundedRectangle(long x, long y, long width, long height, double radius = 20); - void DrawEllipse(long x, long y, long width, long height); - - // RR: I define these in wxDC, after all they all do the same everywhere - -#ifdef __WXMSW__ - // Splines - // 3-point spline - void DrawSpline(long x1, long y1, long x2, long y2, long x3, long y3); - // Any number of control points - a list of pointers to wxPoints - void DrawSpline(wxList *points); - void DrawSpline(int n, wxPoint points[]); -#endif - - void DrawOpenSpline(wxList *points); - - void DrawIcon(const wxIcon& icon, long x, long y); -#ifdef __WXGTK__ - void DrawIcon(const wxIcon& icon, long x, long y, bool WXUNUSED(usemask) ) - { DrawIcon( icon, x, y ); } -#endif - void DrawText(const wxString& text, long x, long y, bool use16 = FALSE); - - void Clear(void); - void SetFont(const wxFont& font); - void SetPen(const wxPen& pen); - void SetBrush(const wxBrush& brush); - void SetLogicalFunction(int function); - void SetBackground(const wxBrush& brush); - void SetClippingRegion(long x, long y, long width, long height); - void DestroyClippingRegion(void); - - bool StartDoc(const wxString& message); - void EndDoc(void); - void StartPage(void); - void EndPage(void); - - long GetCharHeight(void); - long GetCharWidth(void); - void GetTextExtent(const wxString& string, long *x, long *y, - long *descent = (long *) NULL, - long *externalLeading = (long *) NULL, - wxFont *theFont = (wxFont *) NULL, bool use16 = FALSE); - virtual void SetLogicalOrigin(long x, long y); - virtual void CalcBoundingBox(long x, long y); - - void SetMapMode(int mode); - void SetUserScale(double x, double y); - long DeviceToLogicalX(int x) const; - long DeviceToLogicalY(int y) const; - long DeviceToLogicalXRel(int x) const; - long DeviceToLogicalYRel(int y) const; - long LogicalToDeviceX(long x) const; - long LogicalToDeviceY(long y) const; - long LogicalToDeviceXRel(long x) const; - long LogicalToDeviceYRel(long y) const; - bool Blit(long xdest, long ydest, long width, long height, - wxDC *source, long xsrc, long ysrc, int rop = wxCOPY, bool useMask = FALSE); - inline bool CanGetTextExtent(void) const { return FALSE; } - inline bool CanDrawBitmap(void) const { return FALSE; } - - void GetSize(int* width, int* height) const; - void GetSizeMM(long *width, long *height) const; - - inline void SetBackgroundMode(int WXUNUSED(mode)) {}; - inline void SetPalette(const wxPalette& WXUNUSED(palette)) {} - - inline ofstream *GetStream(void) const { return m_pstream; } - inline int GetYOrigin(void) const { return m_yOrigin; } - - void SetupCTM(); - -protected: - int m_yOrigin; // For EPS - ofstream * m_pstream; // PostScript output stream - wxString m_title; - unsigned char m_currentRed; - unsigned char m_currentGreen; - unsigned char m_currentBlue; - double m_scaleFactor; -}; - -#define wxID_PRINTER_COMMAND 1 -#define wxID_PRINTER_OPTIONS 2 -#define wxID_PRINTER_ORIENTATION 3 -#define wxID_PRINTER_MODES 4 -#define wxID_PRINTER_X_SCALE 5 -#define wxID_PRINTER_Y_SCALE 6 -#define wxID_PRINTER_X_TRANS 7 -#define wxID_PRINTER_Y_TRANS 8 - -class WXDLLEXPORT wxPostScriptPrintDialog: public wxDialog -{ -DECLARE_CLASS(wxPostScriptPrintDialog) -public: - wxPostScriptPrintDialog (wxWindow *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE); - - virtual int ShowModal(void) ; -}; - - -// Print Orientation (Should also add Left, Right) -enum { - PS_PORTRAIT = 1, - PS_LANDSCAPE = 2 -};// ps_orientation = PS_PORTRAIT; - -// Print Actions -enum { - PS_PRINTER, - PS_FILE, - PS_PREVIEW -};// ps_action = PS_PREVIEW; - -// PostScript printer settings -void WXDLLEXPORT wxSetPrinterCommand(const char *cmd); -void WXDLLEXPORT wxSetPrintPreviewCommand(const char *cmd); -void WXDLLEXPORT wxSetPrinterOptions(const char *flags); -void WXDLLEXPORT wxSetPrinterOrientation(int orientation); -void WXDLLEXPORT wxSetPrinterScaling(double x, double y); -void WXDLLEXPORT wxSetPrinterTranslation(long x, long y); -void WXDLLEXPORT wxSetPrinterMode(int mode); -void WXDLLEXPORT wxSetPrinterFile(const char *f); -void WXDLLEXPORT wxSetAFMPath(const char *f); - -// Get current values -char* WXDLLEXPORT wxGetPrinterCommand(void); -char* WXDLLEXPORT wxGetPrintPreviewCommand(void); -char* WXDLLEXPORT wxGetPrinterOptions(void); -int WXDLLEXPORT wxGetPrinterOrientation(void); -void WXDLLEXPORT wxGetPrinterScaling(double* x, double* y); -void WXDLLEXPORT wxGetPrinterTranslation(long *x, long *y); -int WXDLLEXPORT wxGetPrinterMode(void); -char* WXDLLEXPORT wxGetPrinterFile(void); -char* WXDLLEXPORT wxGetAFMPath(void); - -/* - * PostScript print setup information - */ - -class WXDLLEXPORT wxPrintSetupData: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxPrintSetupData) - - public: - char *printerCommand; - char *previewCommand; - char *printerFlags; - char *printerFile; - int printerOrient; - double printerScaleX; - double printerScaleY; - long printerTranslateX; - long printerTranslateY; - // 1 = Preview, 2 = print to file, 3 = send to printer - int printerMode; - char *afmPath; - // A name in the paper database (see wx_print.h: the printing framework) - char *paperName; - bool printColour; - public: - wxPrintSetupData(void); - ~wxPrintSetupData(void); - - void SetPrinterCommand(const char *cmd); - void SetPaperName(const char *paper); - void SetPrintPreviewCommand(const char *cmd); - void SetPrinterOptions(const char *flags); - void SetPrinterFile(const char *f); - void SetPrinterOrientation(int orient); - void SetPrinterScaling(double x, double y); - void SetPrinterTranslation(long x, long y); - // 1 = Preview, 2 = print to file, 3 = send to printer - void SetPrinterMode(int mode); - void SetAFMPath(const char *f); - void SetColour(bool col); - - // Get current values - char *GetPrinterCommand(void); - char *GetPrintPreviewCommand(void); - char *GetPrinterOptions(void); - char *GetPrinterFile(void); - char *GetPaperName(void); - int GetPrinterOrientation(void); - void GetPrinterScaling(double* x, double* y); - void GetPrinterTranslation(long *x, long *y); - int GetPrinterMode(void); - char *GetAFMPath(void); - bool GetColour(void); - - void operator=(wxPrintSetupData& data); -}; - -extern wxPrintSetupData* WXDLLEXPORT wxThePrintSetupData; -extern void WXDLLEXPORT wxInitializePrintSetupData(bool init = TRUE); - -/* - * Again, this only really needed for non-Windows platforms - * or if you want to test the PostScript printing under Windows. - */ - -class WXDLLEXPORT wxPrintPaperType: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxPrintPaperType) - - public: - int widthMM; - int heightMM; - int widthPixels; - int heightPixels; - char *pageName; - - wxPrintPaperType(const char *name = (const char *) NULL, int wmm = 0, int hmm = 0, int wp = 0, int hp = 0); - ~wxPrintPaperType(void); -}; - -class WXDLLEXPORT wxPrintPaperDatabase: public wxList -{ - DECLARE_DYNAMIC_CLASS(wxPrintPaperDatabase) - - public: - wxPrintPaperDatabase(void); - ~wxPrintPaperDatabase(void); - - void CreateDatabase(void); - void ClearDatabase(void); - - void AddPaperType(const char *name, int wmm, int hmm, int wp, int hp); - wxPrintPaperType *FindPaperType(const char *name); -}; - -WXDLLEXPORT_DATA(extern wxPrintPaperDatabase*) wxThePrintPaperDatabase; - -#endif // USE_POSTSCRIPT -#endif - // _WX_POSTSCRPH__ diff --git a/include/wx/print.h b/include/wx/print.h deleted file mode 100644 index 4d63fb0e56..0000000000 --- a/include/wx/print.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _WX_PRINT_H_BASE_ -#define _WX_PRINT_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/printwin.h" - -#ifndef wxPrinter -#define wxPrinter wxWindowsPrinter -#endif -#ifndef wxPrintPreview -#define wxPrintPreview wxWindowsPrintPreview -#endif - -#else -#include "wx/generic/printps.h" - -#ifndef wxPrinter -#define wxPrinter wxPostScriptPrinter -#endif -#ifndef wxPrintPreview -#define wxPrintPreview wxPostScriptPrintPreview -#endif - -#endif - - -#endif - // _WX_PRINT_H_BASE_ diff --git a/include/wx/printdlg.h b/include/wx/printdlg.h deleted file mode 100644 index a1455213a1..0000000000 --- a/include/wx/printdlg.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_PRINTDLG_H_BASE_ -#define _WX_PRINTDLG_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/printdlg.h" -#elif defined(__WXMOTIF__) -#include "wx/generic/prntdlgg.h" -#elif defined(__WXGTK__) -#include "wx/generic/prntdlgg.h" -#elif defined(__WXQT__) -#include "wx/generic/prntdlgg.h" -#elif defined(__WXMAC__) -#include "wx/generic/prntdlgg.h" -#elif defined(__WXSRUBS__) -#include "wx/generic/prntdlgg.h" -#endif - -#endif - // _WX_PRINTDLG_H_BASE_ diff --git a/include/wx/prntbase.h b/include/wx/prntbase.h deleted file mode 100644 index 6f49d54757..0000000000 --- a/include/wx/prntbase.h +++ /dev/null @@ -1,342 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: prntbase.h -// Purpose: Base classes for printing framework -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_PRNTBASEH__ -#define _WX_PRNTBASEH__ - -#ifdef __GNUG__ -#pragma interface "prntbase.h" -#endif - -#include "wx/defs.h" -#include "wx/event.h" -#include "wx/cmndata.h" -#include "wx/panel.h" -#include "wx/scrolwin.h" -#include "wx/dialog.h" -#include "wx/frame.h" - -class WXDLLEXPORT wxDC; -class WXDLLEXPORT wxButton; -class WXDLLEXPORT wxChoice; -class WXDLLEXPORT wxPrintout; -class WXDLLEXPORT wxPrinterBase; -class WXDLLEXPORT wxPrintDialog; -class WXDLLEXPORT wxPrintPreviewBase; -class WXDLLEXPORT wxPreviewCanvas; -class WXDLLEXPORT wxPreviewControlBar; -class WXDLLEXPORT wxPreviewFrame; - -/* - * Represents the printer: manages printing a wxPrintout object - */ - -class WXDLLEXPORT wxPrinterBase: public wxObject -{ - DECLARE_CLASS(wxPrinterBase) - -public: - wxPrinterBase(wxPrintData *data = (wxPrintData *) NULL); - ~wxPrinterBase(); - - virtual wxWindow *CreateAbortWindow(wxWindow *parent, wxPrintout *printout); - virtual void ReportError(wxWindow *parent, wxPrintout *printout, char *message); - inline wxPrintData& GetPrintData() { return m_printData; }; - inline bool GetAbort() { return sm_abortIt; } - - /////////////////////////////////////////////////////////////////////////// - // OVERRIDES - - virtual bool Setup(wxWindow *parent) = 0; - virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = TRUE) = 0; - virtual bool PrintDialog(wxWindow *parent) = 0; - -protected: - wxPrintData m_printData; - wxPrintout* m_currentPrintout; -public: - static wxWindow* sm_abortWindow; - static bool sm_abortIt; - -}; - -/* - * wxPrintout - * Represents an object via which a document may be printed. - * The programmer derives from this, overrides (at least) OnPrintPage, - * and passes it to a wxPrinter object for printing, or a wxPrintPreview - * object for previewing. - */ - -class WXDLLEXPORT wxPrintout: public wxObject -{ - DECLARE_ABSTRACT_CLASS(wxPrintout) - -public: - wxPrintout(const wxString& title = "Printout"); - ~wxPrintout(); - - virtual bool OnBeginDocument(int startPage, int endPage); - virtual void OnEndDocument(); - virtual void OnBeginPrinting(); - virtual void OnEndPrinting(); - - // Guaranteed to be before any other functions are called - inline virtual void OnPreparePrinting() { } - - virtual bool HasPage(int page); - virtual bool OnPrintPage(int page) = 0; - virtual void GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo); - - inline virtual wxString GetTitle() { return m_printoutTitle; } - - inline wxDC *GetDC() { return m_printoutDC; } - inline void SetDC(wxDC *dc) { m_printoutDC = dc; } - inline void SetPageSizePixels(int w, int h) { m_pageWidthPixels = w; m_pageHeightPixels = h; } - inline void GetPageSizePixels(int *w, int *h) { *w = m_pageWidthPixels; *h = m_pageHeightPixels; } - inline void SetPageSizeMM(int w, int h) { m_pageWidthMM = w; m_pageHeightMM = h; } - inline void GetPageSizeMM(int *w, int *h) { *w = m_pageWidthMM; *h = m_pageHeightMM; } - - inline void SetPPIScreen(int x, int y) { m_PPIScreenX = x; m_PPIScreenY = y; } - inline void GetPPIScreen(int *x, int *y) { *x = m_PPIScreenX; *y = m_PPIScreenY; } - inline void SetPPIPrinter(int x, int y) { m_PPIPrinterX = x; m_PPIPrinterY = y; } - inline void GetPPIPrinter(int *x, int *y) { *x = m_PPIPrinterX; *y = m_PPIPrinterY; } - - inline virtual bool IsPreview() { return m_isPreview; } - - inline virtual void SetIsPreview(bool p) { m_isPreview = p; } - -private: - wxString m_printoutTitle; - wxDC* m_printoutDC; - - int m_pageWidthPixels; - int m_pageHeightPixels; - - int m_pageWidthMM; - int m_pageHeightMM; - - int m_PPIScreenX; - int m_PPIScreenY; - int m_PPIPrinterX; - int m_PPIPrinterY; - - bool m_isPreview; -}; - -/* - * wxPreviewCanvas - * Canvas upon which a preview is drawn. - */ - -class WXDLLEXPORT wxPreviewCanvas: public wxScrolledWindow -{ - DECLARE_CLASS(wxPreviewCanvas) - -public: - wxPreviewCanvas(wxPrintPreviewBase *preview, wxWindow *parent, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = "canvas"); - ~wxPreviewCanvas(); - - void OnPaint(wxPaintEvent& event); - - // Responds to colour changes - void OnSysColourChanged(wxSysColourChangedEvent& event); - -private: - wxPrintPreviewBase* m_printPreview; - -DECLARE_EVENT_TABLE() -}; - -/* - * wxPreviewFrame - * Default frame for showing preview. - */ - -class WXDLLEXPORT wxPreviewFrame: public wxFrame -{ - DECLARE_CLASS(wxPreviewFrame) - -public: - wxPreviewFrame(wxPrintPreviewBase *preview, wxFrame *parent, const wxString& title = "Print Preview", - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME, const wxString& name = "frame"); - ~wxPreviewFrame(); - - bool OnClose(); - virtual void Initialize(); - virtual void CreateCanvas(); - virtual void CreateControlBar(); - -protected: - wxWindow* m_previewCanvas; - wxPreviewControlBar* m_controlBar; - wxPrintPreviewBase* m_printPreview; -}; - -/* - * wxPreviewControlBar - * A panel with buttons for controlling a print preview. - * The programmer may wish to use other means for controlling - * the print preview. - */ - -#define wxPREVIEW_PRINT 1 -#define wxPREVIEW_PREVIOUS 2 -#define wxPREVIEW_NEXT 4 -#define wxPREVIEW_ZOOM 8 - -#define wxPREVIEW_DEFAULT wxPREVIEW_PREVIOUS|wxPREVIEW_NEXT|wxPREVIEW_ZOOM - -// Ids for controls -#define wxID_PREVIEW_CLOSE 1 -#define wxID_PREVIEW_NEXT 2 -#define wxID_PREVIEW_PREVIOUS 3 -#define wxID_PREVIEW_PRINT 4 -#define wxID_PREVIEW_ZOOM 5 - -class WXDLLEXPORT wxPreviewControlBar: public wxPanel -{ - DECLARE_CLASS(wxPreviewControlBar) - -public: - wxPreviewControlBar(wxPrintPreviewBase *preview, long buttons, - wxWindow *parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = "panel"); - ~wxPreviewControlBar(); - - virtual void CreateButtons(); - virtual void SetZoomControl(int zoom); - virtual int GetZoomControl(); - inline virtual wxPrintPreviewBase *GetPrintPreview() const { return m_printPreview; } - - void OnPrint(wxCommandEvent& event); - void OnClose(wxCommandEvent& event); - void OnNext(wxCommandEvent& event); - void OnPrevious(wxCommandEvent& event); - void OnZoom(wxCommandEvent& event); - void OnPaint(wxPaintEvent& event); - -protected: - wxPrintPreviewBase* m_printPreview; - wxButton* m_closeButton; - wxButton* m_nextPageButton; - wxButton* m_previousPageButton; - wxButton* m_printButton; - wxChoice* m_zoomControl; - long m_buttonFlags; - -DECLARE_EVENT_TABLE() -}; - -/* - * wxPrintPreview - * Programmer creates an object of this class to preview a wxPrintout. - */ - -class WXDLLEXPORT wxPrintPreviewBase: public wxObject -{ - DECLARE_CLASS(wxPrintPreviewBase) - -public: - wxPrintPreviewBase(wxPrintout *printout, wxPrintout *printoutForPrinting = (wxPrintout *) NULL, wxPrintData *data = (wxPrintData *) NULL); - ~wxPrintPreviewBase(); - - virtual bool SetCurrentPage(int pageNum); - inline int GetCurrentPage() const { return m_currentPage; }; - - inline void SetPrintout(wxPrintout *printout) { m_previewPrintout = printout; }; - inline wxPrintout *GetPrintout() const { return m_previewPrintout; }; - inline wxPrintout *GetPrintoutForPrinting() const { return m_printPrintout; }; - - inline void SetFrame(wxFrame *frame) { m_previewFrame = frame; }; - inline void SetCanvas(wxWindow *canvas) { m_previewCanvas = canvas; }; - - inline virtual wxFrame *GetFrame() const { return m_previewFrame; } - inline virtual wxWindow *GetCanvas() const { return m_previewCanvas; } - - // The preview canvas should call this from OnPaint - virtual bool PaintPage(wxWindow *canvas, wxDC& dc); - - // This draws a blank page onto the preview canvas - virtual bool DrawBlankPage(wxWindow *canvas, wxDC& dc); - - // This is called by wxPrintPreview to render a page into - // a wxMemoryDC. - virtual bool RenderPage(int pageNum); - - inline wxPrintData& GetPrintData() { return m_printData; } - - virtual void SetZoom(int percent); - inline int GetZoom() const { return m_currentZoom; }; - - inline int GetMaxPage() const { return m_maxPage; } - inline int GetMinPage() const { return m_minPage; } - - inline bool Ok() const { return m_isOk; } - inline void SetOk(bool ok) { m_isOk = ok; } - - /////////////////////////////////////////////////////////////////////////// - // OVERRIDES - - // If we own a wxPrintout that can be used for printing, this - // will invoke the actual printing procedure. Called - // by the wxPreviewControlBar. - virtual bool Print(bool interactive) = 0; - - // Calculate scaling that needs to be done to get roughly - // the right scaling for the screen pretending to be - // the currently selected printer. - virtual void DetermineScaling() = 0; - -protected: - wxPrintData m_printData; - wxWindow* m_previewCanvas; - wxFrame* m_previewFrame; - wxBitmap* m_previewBitmap; - wxPrintout* m_previewPrintout; - wxPrintout* m_printPrintout; - int m_currentPage; - int m_currentZoom; - float m_previewScale; - int m_topMargin; - int m_leftMargin; - int m_pageWidth; - int m_pageHeight; - int m_minPage; - int m_maxPage; - protected: - bool m_isOk; -}; - -/* - * Abort dialog - */ - -class WXDLLEXPORT wxPrintAbortDialog: public wxDialog -{ -public: - wxPrintAbortDialog(wxWindow *parent, - const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = "dialog"): - wxDialog(parent, -1, title, pos, size, style, name) - { - } - - void OnCancel(wxCommandEvent& event); - - DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_PRNTBASEH__ diff --git a/include/wx/process.h b/include/wx/process.h deleted file mode 100644 index a6dc295a62..0000000000 --- a/include/wx/process.h +++ /dev/null @@ -1,58 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: process.h -// Purpose: wxProcess class -// Author: Guilhem Lavaux -// Modified by: -// Created: 24/06/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_PROCESSH__ -#define _WX_PROCESSH__ - -#ifdef __GNUG__ -#pragma interface "process.h" -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/event.h" - -class WXDLLEXPORT wxProcess: public wxEvtHandler -{ - DECLARE_DYNAMIC_CLASS(wxProcess) - public: - - wxProcess(wxEvtHandler *parent = (wxEvtHandler *) NULL, int id = -1); - virtual ~wxProcess(); - - virtual void OnTerminate(int pid); - - protected: - int m_id; -}; - -// Process Event handling - -class WXDLLEXPORT wxProcessEvent: public wxEvent -{ - DECLARE_DYNAMIC_CLASS(wxProcessEvent) - public: - - wxProcessEvent(int id = 0, int pid = -1); - - inline int GetPid() { return m_pid; } - inline void SetPid(int pid) { m_pid = pid; } - - public: - int m_pid; -}; - -typedef void (wxObject::*wxProcessEventFunction)(wxProcessEvent&); - -#define EVT_END_PROCESS(id, func) { wxEVT_END_TERMINATE, id, -1, (wxObjectEvent) (wxEventFunction) (wxProcessEventFunction) & fn, NULL}, - -#endif - // _WX_PROCESSH__ diff --git a/include/wx/qt/app.h b/include/wx/qt/app.h deleted file mode 100644 index cb50ba9c9e..0000000000 --- a/include/wx/qt/app.h +++ /dev/null @@ -1,153 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: app.h -// Purpose: wxApp class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_APP_H_ -#define _WX_APP_H_ - -#ifdef __GNUG__ -#pragma interface "app.h" -#endif - -#include "wx/defs.h" -#include "wx/object.h" - -class WXDLLEXPORT wxFrame; -class WXDLLEXPORT wxWindow; -class WXDLLEXPORT wxApp ; -class WXDLLEXPORT wxKeyEvent; -class WXDLLEXPORT wxLog; - -#define wxPRINT_WINDOWS 1 -#define wxPRINT_POSTSCRIPT 2 - -WXDLLEXPORT_DATA(extern wxApp*) wxTheApp; - -void WXDLLEXPORT wxCleanUp(); -void WXDLLEXPORT wxCommonCleanUp(); // Call this from the platform's wxCleanUp() -void WXDLLEXPORT wxCommonInit(); // Call this from the platform's initialization - -// Force an exit from main loop -void WXDLLEXPORT wxExit(); - -// Yield to other apps/messages -bool WXDLLEXPORT wxYield(); - -// Represents the application. Derive OnInit and declare -// a new App object to start application -class WXDLLEXPORT wxApp: public wxEvtHandler -{ - DECLARE_DYNAMIC_CLASS(wxApp) - wxApp(); - inline ~wxApp() {} - - static void SetInitializerFunction(wxAppInitializerFunction fn) { m_appInitFn = fn; } - static wxAppInitializerFunction GetInitializerFunction() { return m_appInitFn; } - - virtual int MainLoop(); - void ExitMainLoop(); - bool Initialized(); - virtual bool Pending() ; - virtual void Dispatch() ; - - virtual void OnIdle(wxIdleEvent& event); - -// Generic - virtual bool OnInit() { return FALSE; }; - - // No specific tasks to do here. - virtual bool OnInitGui() { return TRUE; } - - // Called to set off the main loop - virtual int OnRun() { return MainLoop(); }; - virtual int OnExit() { return 0; } - - inline void SetPrintMode(int mode) { m_printMode = mode; } - inline int GetPrintMode() const { return m_printMode; } - - inline void SetExitOnFrameDelete(bool flag) { m_exitOnFrameDelete = flag; } - inline bool GetExitOnFrameDelete() const { return m_exitOnFrameDelete; } - - inline wxString GetAppName() const { - if (m_appName != "") - return m_appName; - else return m_className; - } - - inline void SetAppName(const wxString& name) { m_appName = name; }; - inline wxString GetClassName() const { return m_className; } - inline void SetClassName(const wxString& name) { m_className = name; } - - void SetVendorName(const wxString& vendorName) { m_vendorName = vendorName; } - const wxString& GetVendorName() const { return m_vendorName; } - - wxWindow *GetTopWindow() const ; - inline void SetTopWindow(wxWindow *win) { m_topWindow = win; } - - inline void SetWantDebugOutput(bool flag) { m_wantDebugOutput = flag; } - inline bool GetWantDebugOutput() { return m_wantDebugOutput; } - - // Send idle event to all top-level windows. - // Returns TRUE if more idle time is requested. - bool SendIdleEvents(); - - // Send idle event to window and all subwindows - // Returns TRUE if more idle time is requested. - bool SendIdleEvents(wxWindow* win); - - // Windows only, but for compatibility... - inline void SetAuto3D(bool flag) { m_auto3D = flag; } - inline bool GetAuto3D() const { return m_auto3D; } - - // Creates a log object - virtual wxLog* CreateLogTarget(); - -public: - // Will always be set to the appropriate, main-style values. - int argc; - char ** argv; - -protected: - bool m_wantDebugOutput ; - wxString m_className; - wxString m_appName, - m_vendorName; - wxWindow * m_topWindow; - bool m_exitOnFrameDelete; - bool m_showOnInit; - int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT - bool m_auto3D ; // Always use 3D controls, except - // where overriden - static wxAppInitializerFunction m_appInitFn; - -public: - - // Implementation - static void CommonInit(); - static void CommonCleanUp(); - void DeletePendingObjects(); - bool ProcessIdle(); - -public: - static long sm_lastMessageTime; - int m_nCmdShow; - -protected: - bool m_keepGoing ; - -DECLARE_EVENT_TABLE() -}; - -// TODO: add platform-specific arguments -int WXDLLEXPORT wxEntry( int argc, char *argv[] ); - -#endif - // _WX_APP_H_ - diff --git a/include/wx/qt/bitmap.h b/include/wx/qt/bitmap.h deleted file mode 100644 index 195944f835..0000000000 --- a/include/wx/qt/bitmap.h +++ /dev/null @@ -1,198 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bitmap.h -// Purpose: wxBitmap class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_BITMAP_H_ -#define _WX_BITMAP_H_ - -#ifdef __GNUG__ -#pragma interface "bitmap.h" -#endif - -#include "wx/gdiobj.h" -#include "wx/gdicmn.h" -#include "wx/palette.h" - -// Bitmap -class WXDLLEXPORT wxDC; -class WXDLLEXPORT wxControl; -class WXDLLEXPORT wxBitmap; -class WXDLLEXPORT wxBitmapHandler; -class WXDLLEXPORT wxIcon; -class WXDLLEXPORT wxCursor; - -// A mask is a mono bitmap used for drawing bitmaps -// transparently. -class WXDLLEXPORT wxMask: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxMask) - -public: - wxMask(); - - // Construct a mask from a bitmap and a colour indicating - // the transparent area - wxMask(const wxBitmap& bitmap, const wxColour& colour); - - // Construct a mask from a bitmap and a palette index indicating - // the transparent area - wxMask(const wxBitmap& bitmap, int paletteIndex); - - // Construct a mask from a mono bitmap (copies the bitmap). - wxMask(const wxBitmap& bitmap); - - ~wxMask(); - - bool Create(const wxBitmap& bitmap, const wxColour& colour); - bool Create(const wxBitmap& bitmap, int paletteIndex); - bool Create(const wxBitmap& bitmap); - -/* TODO: platform-specific data access - // Implementation - inline WXHBITMAP GetMaskBitmap() const { return m_maskBitmap; } - inline void SetMaskBitmap(WXHBITMAP bmp) { m_maskBitmap = bmp; } -protected: - WXHBITMAP m_maskBitmap; -*/ -}; - -class WXDLLEXPORT wxBitmapRefData: public wxGDIRefData -{ - friend class WXDLLEXPORT wxBitmap; - friend class WXDLLEXPORT wxIcon; - friend class WXDLLEXPORT wxCursor; -public: - wxBitmapRefData(); - ~wxBitmapRefData(); - -public: - int m_width; - int m_height; - int m_depth; - bool m_ok; - int m_numColors; - wxPalette m_bitmapPalette; - int m_quality; - -/* WXHBITMAP m_hBitmap; TODO: platform-specific handle */ - wxMask * m_bitmapMask; // Optional mask -}; - -#define M_BITMAPDATA ((wxBitmapRefData *)m_refData) - -class WXDLLEXPORT wxBitmapHandler: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxBitmapHandler) -public: - wxBitmapHandler() { m_name = ""; m_extension = ""; m_type = 0; }; - - virtual bool Create(wxBitmap *bitmap, void *data, long flags, int width, int height, int depth = 1); - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth, int desiredHeight); - virtual bool SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL); - - inline void SetName(const wxString& name) { m_name = name; } - inline void SetExtension(const wxString& ext) { m_extension = ext; } - inline void SetType(long type) { m_type = type; } - inline wxString GetName() const { return m_name; } - inline wxString GetExtension() const { return m_extension; } - inline long GetType() const { return m_type; } -protected: - wxString m_name; - wxString m_extension; - long m_type; -}; - -#define M_BITMAPHANDLERDATA ((wxBitmapRefData *)bitmap->GetRefData()) - -class WXDLLEXPORT wxBitmap: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxBitmap) - - friend class WXDLLEXPORT wxBitmapHandler; - -public: - wxBitmap(); // Platform-specific - - // Copy constructors - inline wxBitmap(const wxBitmap& bitmap) - { Ref(bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); } - inline wxBitmap(const wxBitmap* bitmap) { if (bitmap) Ref(*bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); } - - // Initialize with raw data. - wxBitmap(const char bits[], int width, int height, int depth = 1); - -/* TODO: maybe implement XPM reading - // Initialize with XPM data - wxBitmap(const char **data); -*/ - - // Load a file or resource - // TODO: make default type whatever's appropriate for the platform. - wxBitmap(const wxString& name, long type = wxBITMAP_TYPE_BMP_RESOURCE); - - // Constructor for generalised creation from data - wxBitmap(void *data, long type, int width, int height, int depth = 1); - - // If depth is omitted, will create a bitmap compatible with the display - wxBitmap(int width, int height, int depth = -1); - ~wxBitmap(); - - virtual bool Create(int width, int height, int depth = -1); - virtual bool Create(void *data, long type, int width, int height, int depth = 1); - virtual bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_BMP_RESOURCE); - virtual bool SaveFile(const wxString& name, int type, const wxPalette *cmap = NULL); - - inline bool Ok() const { return (M_BITMAPDATA && M_BITMAPDATA->m_ok); } - inline int GetWidth() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_width : 0); } - inline int GetHeight() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_height : 0); } - inline int GetDepth() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_depth : 0); } - inline int GetQuality() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_quality : 0); } - void SetWidth(int w); - void SetHeight(int h); - void SetDepth(int d); - void SetQuality(int q); - void SetOk(bool isOk); - - inline wxPalette* GetPalette() const { return (M_BITMAPDATA ? (& M_BITMAPDATA->m_bitmapPalette) : NULL); } - void SetPalette(const wxPalette& palette); - - inline wxMask *GetMask() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_bitmapMask : NULL); } - void SetMask(wxMask *mask) ; - - inline wxBitmap& operator = (const wxBitmap& bitmap) { if (*this == bitmap) return (*this); Ref(bitmap); return *this; } - inline bool operator == (const wxBitmap& bitmap) { return m_refData == bitmap.m_refData; } - inline bool operator != (const wxBitmap& bitmap) { return m_refData != bitmap.m_refData; } - - // Format handling - static inline wxList& GetHandlers() { return sm_handlers; } - static void AddHandler(wxBitmapHandler *handler); - static void InsertHandler(wxBitmapHandler *handler); - static bool RemoveHandler(const wxString& name); - static wxBitmapHandler *FindHandler(const wxString& name); - static wxBitmapHandler *FindHandler(const wxString& extension, long bitmapType); - static wxBitmapHandler *FindHandler(long bitmapType); - - static void InitStandardHandlers(); - static void CleanUpHandlers(); -protected: - static wxList sm_handlers; - -/* - // TODO: Implementation -public: - void SetHBITMAP(WXHBITMAP bmp); - inline WXHBITMAP GetHBITMAP() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_hBitmap : 0); } - bool FreeResource(bool force = FALSE); -*/ - -}; -#endif - // _WX_BITMAP_H_ diff --git a/include/wx/qt/bmpbuttn.h b/include/wx/qt/bmpbuttn.h deleted file mode 100644 index defe39e438..0000000000 --- a/include/wx/qt/bmpbuttn.h +++ /dev/null @@ -1,83 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bmpbuttn.h -// Purpose: wxBitmapButton class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_BMPBUTTN_H_ -#define _WX_BMPBUTTN_H_ - -#ifdef __GNUG__ -#pragma interface "bmpbuttn.h" -#endif - -#include "wx/button.h" - -WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr; - -#define wxDEFAULT_BUTTON_MARGIN 4 - -class WXDLLEXPORT wxBitmapButton: public wxButton -{ - DECLARE_DYNAMIC_CLASS(wxBitmapButton) - public: - inline wxBitmapButton() { m_marginX = wxDEFAULT_BUTTON_MARGIN; m_marginY = wxDEFAULT_BUTTON_MARGIN; } - inline wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) - { - Create(parent, id, bitmap, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); - - virtual void SetLabel(const wxBitmap& bitmap) - { - SetBitmapLabel(bitmap); - } - - virtual void SetBitmapLabel(const wxBitmap& bitmap); - - inline wxBitmap& GetBitmapLabel() const { return (wxBitmap&) m_buttonBitmap; } - inline wxBitmap& GetBitmapSelected() const { return (wxBitmap&) m_buttonBitmapSelected; } - inline wxBitmap& GetBitmapFocus() const { return (wxBitmap&) m_buttonBitmapFocus; } - inline wxBitmap& GetBitmapDisabled() const { return (wxBitmap&) m_buttonBitmapDisabled; } - - inline void SetBitmapSelected(const wxBitmap& sel) { m_buttonBitmapSelected = sel; }; - inline void SetBitmapFocus(const wxBitmap& focus) { m_buttonBitmapFocus = focus; }; - inline void SetBitmapDisabled(const wxBitmap& disabled) { m_buttonBitmapDisabled = disabled; }; - - inline void SetMargins(int x, int y) { m_marginX = x; m_marginY = y; } - inline int GetMarginX() { return m_marginX; } - inline int GetMarginY() { return m_marginY; } - -/* - // TODO: Implementation - virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item); - virtual void DrawFace( WXHDC dc, int left, int top, int right, int bottom, bool sel ); - virtual void DrawButtonFocus( WXHDC dc, int left, int top, int right, int bottom, bool sel ); - virtual void DrawButtonDisable( WXHDC dc, int left, int top, int right, int bottom, bool with_marg ); -*/ - - protected: - wxBitmap m_buttonBitmap; - wxBitmap m_buttonBitmapSelected; - wxBitmap m_buttonBitmapFocus; - wxBitmap m_buttonBitmapDisabled; - int m_marginX; - int m_marginY; -}; - -#endif - // _WX_BMPBUTTN_H_ diff --git a/include/wx/qt/brush.h b/include/wx/qt/brush.h deleted file mode 100644 index 2475bd0b24..0000000000 --- a/include/wx/qt/brush.h +++ /dev/null @@ -1,86 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: brush.h -// Purpose: wxBrush class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_BRUSH_H_ -#define _WX_BRUSH_H_ - -#ifdef __GNUG__ -#pragma interface "brush.h" -#endif - -#include "wx/gdicmn.h" -#include "wx/gdiobj.h" -#include "wx/bitmap.h" - -class WXDLLEXPORT wxBrush; - -class WXDLLEXPORT wxBrushRefData: public wxGDIRefData -{ - friend class WXDLLEXPORT wxBrush; -public: - wxBrushRefData(); - wxBrushRefData(const wxBrushRefData& data); - ~wxBrushRefData(); - -protected: - int m_style; - wxBitmap m_stipple ; - wxColour m_colour; - -/* TODO: implementation - WXHBRUSH m_hBrush; -*/ -}; - -#define M_BRUSHDATA ((wxBrushRefData *)m_refData) - -// Brush -class WXDLLEXPORT wxBrush: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxBrush) - -public: - wxBrush(); - wxBrush(const wxColour& col, int style); - wxBrush(const wxString& col, int style); - wxBrush(const wxBitmap& stipple); - inline wxBrush(const wxBrush& brush) { Ref(brush); } - inline wxBrush(const wxBrush* brush) { if (brush) Ref(*brush); } - ~wxBrush(); - - virtual void SetColour(const wxColour& col) ; - virtual void SetColour(const wxString& col) ; - virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ; - virtual void SetStyle(int style) ; - virtual void SetStipple(const wxBitmap& stipple) ; - - inline wxBrush& operator = (const wxBrush& brush) { if (*this == brush) return (*this); Ref(brush); return *this; } - inline bool operator == (const wxBrush& brush) { return m_refData == brush.m_refData; } - inline bool operator != (const wxBrush& brush) { return m_refData != brush.m_refData; } - - inline wxColour& GetColour() const { return (M_BRUSHDATA ? M_BRUSHDATA->m_colour : wxNullColour); }; - inline int GetStyle() const { return (M_BRUSHDATA ? M_BRUSHDATA->m_style : 0); }; - inline wxBitmap *GetStipple() const { return (M_BRUSHDATA ? & M_BRUSHDATA->m_stipple : 0); }; - - virtual bool Ok() const { return (m_refData != NULL) ; } - -// Implementation - - // Useful helper: create the brush resource - void RealizeResource(); - - // When setting properties, we must make sure we're not changing - // another object - void Unshare(); -}; - -#endif - // _WX_BRUSH_H_ diff --git a/include/wx/qt/button.h b/include/wx/qt/button.h deleted file mode 100644 index 68b67d8c96..0000000000 --- a/include/wx/qt/button.h +++ /dev/null @@ -1,53 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: button.h -// Purpose: wxButton class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_BUTTON_H_ -#define _WX_BUTTON_H_ - -#ifdef __GNUG__ -#pragma interface "button.h" -#endif - -#include "wx/control.h" -#include "wx/gdicmn.h" - -WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr; - -// Pushbutton -class WXDLLEXPORT wxButton: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxButton) - public: - inline wxButton() {} - inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); - - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - virtual void SetDefault(); - virtual void SetLabel(const wxString& label); - virtual wxString GetLabel() const ; - virtual void Command(wxCommandEvent& event); -}; - -#endif - // _WX_BUTTON_H_ diff --git a/include/wx/qt/checkbox.h b/include/wx/qt/checkbox.h deleted file mode 100644 index 8bf41d9958..0000000000 --- a/include/wx/qt/checkbox.h +++ /dev/null @@ -1,81 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: checkbox.h -// Purpose: wxCheckBox class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_CHECKBOX_H_ -#define _WX_CHECKBOX_H_ - -#ifdef __GNUG__ -#pragma interface "checkbox.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxCheckBoxNameStr; - -// Checkbox item (single checkbox) -class WXDLLEXPORT wxBitmap; -class WXDLLEXPORT wxCheckBox: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxCheckBox) - - public: - inline wxCheckBox() { } - inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); - virtual void SetValue(bool); - virtual bool GetValue() const ; - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - virtual void SetLabel(const wxString& label); - virtual void Command(wxCommandEvent& event); -}; - -class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox -{ - DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox) - - public: - int checkWidth ; - int checkHeight ; - - inline wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; } - inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); - virtual void SetValue(bool); - virtual bool GetValue() const ; - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - virtual void SetLabel(const wxBitmap *bitmap); -}; -#endif - // _WX_CHECKBOX_H_ diff --git a/include/wx/qt/choice.h b/include/wx/qt/choice.h deleted file mode 100644 index 7f360ed5cc..0000000000 --- a/include/wx/qt/choice.h +++ /dev/null @@ -1,72 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: choice.h -// Purpose: wxChoice class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_CHOICE_H_ -#define _WX_CHOICE_H_ - -#ifdef __GNUG__ -#pragma interface "choice.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxChoiceNameStr; - -// Choice item -class WXDLLEXPORT wxChoice: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxChoice) - - public: - inline wxChoice() { m_noStrings = 0; } - - inline wxChoice(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr) - { - Create(parent, id, pos, size, n, choices, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr); - - virtual void Append(const wxString& item); - virtual void Delete(int n); - virtual void Clear(); - virtual int GetSelection() const ; - virtual void SetSelection(int n); - virtual int FindString(const wxString& s) const; - virtual wxString GetString(int n) const ; - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - virtual wxString GetStringSelection() const ; - virtual bool SetStringSelection(const wxString& sel); - - virtual inline int Number() const { return m_noStrings; } - virtual void Command(wxCommandEvent& event); - - virtual inline void SetColumns(int WXUNUSED(n) = 1 ) { /* No effect */ } ; - virtual inline int GetColumns() const { return 1 ; }; - -protected: - int m_noStrings; -}; - -#endif - // _WX_CHOICE_H_ diff --git a/include/wx/qt/colour.h b/include/wx/qt/colour.h deleted file mode 100644 index e8fca8e3b4..0000000000 --- a/include/wx/qt/colour.h +++ /dev/null @@ -1,68 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: colour.h -// Purpose: wxColour class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_COLOUR_H_ -#define _WX_COLOUR_H_ - -#ifdef __GNUG__ -#pragma interface "colour.h" -#endif - -// Colour -class WXDLLEXPORT wxColour: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxColour) -public: - wxColour(); - wxColour(unsigned char r, unsigned char g, unsigned char b); - wxColour(unsigned long colRGB) { Set(colRGB); } - wxColour(const wxColour& col); - wxColour(const wxString& col); - ~wxColour() ; - wxColour& operator =(const wxColour& src) ; - wxColour& operator =(const wxString& src) ; - inline int Ok() const { return (m_isInit) ; } - - void Set(unsigned char r, unsigned char g, unsigned char b); - void Set(unsigned long colRGB) - { - // we don't need to know sizeof(long) here because we assume that the three - // least significant bytes contain the R, G and B values - Set((unsigned char)colRGB, - (unsigned char)(colRGB >> 8), - (unsigned char)(colRGB >> 16)); - } - - inline unsigned char Red() const { return m_red; } - inline unsigned char Green() const { return m_green; } - inline unsigned char Blue() const { return m_blue; } - - inline bool operator == (const wxColour& colour) { return (m_red == colour.m_red && m_green == colour.m_green && m_blue == colour.m_blue); } - - inline bool operator != (const wxColour& colour) { return (!(m_red == colour.m_red && m_green == colour.m_green && m_blue == colour.m_blue)); } - - WXCOLORREF GetPixel() const { return m_pixel; }; - - private: - bool m_isInit; - unsigned char m_red; - unsigned char m_blue; - unsigned char m_green; - public: -/* TODO: implementation - WXCOLORREF m_pixel ; -*/ -}; - -#define wxColor wxColour - -#endif - // _WX_COLOUR_H_ diff --git a/include/wx/qt/combobox.h b/include/wx/qt/combobox.h deleted file mode 100644 index 86895e561c..0000000000 --- a/include/wx/qt/combobox.h +++ /dev/null @@ -1,78 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: combobox.h -// Purpose: wxComboBox class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_COMBOBOX_H_ -#define _WX_COMBOBOX_H_ - -#ifdef __GNUG__ -#pragma interface "combobox.h" -#endif - -#include "wx/choice.h" - -WXDLLEXPORT_DATA(extern const char*) wxComboBoxNameStr; -WXDLLEXPORT_DATA(extern const char*) wxEmptyString; - -// Combobox item -class WXDLLEXPORT wxComboBox: public wxChoice -{ - DECLARE_DYNAMIC_CLASS(wxComboBox) - - public: - inline wxComboBox() {} - - inline wxComboBox(wxWindow *parent, wxWindowID id, - const wxString& value = wxEmptyString, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr) - { - Create(parent, id, value, pos, size, n, choices, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxString& value = wxEmptyString, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); - - // List functions: see wxChoice - - // Text field functions - virtual wxString GetValue() const ; - virtual void SetValue(const wxString& value); - - // Clipboard operations - virtual void Copy(); - virtual void Cut(); - virtual void Paste(); - virtual void SetInsertionPoint(long pos); - virtual void SetInsertionPointEnd(); - virtual long GetInsertionPoint() const ; - virtual long GetLastPosition() const ; - virtual void Replace(long from, long to, const wxString& value); - virtual void Remove(long from, long to); - virtual void SetSelection(int n) - { - wxChoice::SetSelection(n); - } - virtual void SetSelection(long from, long to); - virtual void SetEditable(bool editable); -}; - -#endif - // _WX_COMBOBOX_H_ diff --git a/include/wx/qt/control.h b/include/wx/qt/control.h deleted file mode 100644 index 5432b5c5e7..0000000000 --- a/include/wx/qt/control.h +++ /dev/null @@ -1,50 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: control.h -// Purpose: wxControl class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_CONTROL_H_ -#define _WX_CONTROL_H_ - -#ifdef __GNUG__ -#pragma interface "control.h" -#endif - -#include "wx/window.h" -#include "wx/list.h" -#include "wx/validate.h" - -// General item class -class WXDLLEXPORT wxControl: public wxWindow -{ - DECLARE_ABSTRACT_CLASS(wxControl) -public: - wxControl(); - ~wxControl(); - - virtual void Command(wxCommandEvent& WXUNUSED(event)) = 0; // Simulates an event - virtual void ProcessCommand(wxCommandEvent& event); // Calls the callback and - // appropriate event handlers - virtual void SetLabel(const wxString& label); - virtual wxString GetLabel() const ; - - // Places item in centre of panel - so can't be used BEFORE panel->Fit() - void Centre(int direction = wxHORIZONTAL); - inline void Callback(const wxFunction function) { m_callback = function; }; // Adds callback - - inline wxFunction GetCallback() { return m_callback; } - -protected: - wxFunction m_callback; // Callback associated with the window - -DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_CONTROL_H_ diff --git a/include/wx/qt/cursor.h b/include/wx/qt/cursor.h deleted file mode 100644 index 9cf490cdc6..0000000000 --- a/include/wx/qt/cursor.h +++ /dev/null @@ -1,75 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: cursor.h -// Purpose: wxCursor class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_CURSOR_H_ -#define _WX_CURSOR_H_ - -#ifdef __GNUG__ -#pragma interface "cursor.h" -#endif - -#include "wx/bitmap.h" - -class WXDLLEXPORT wxCursorRefData: public wxBitmapRefData -{ - friend class WXDLLEXPORT wxBitmap; - friend class WXDLLEXPORT wxCursor; -public: - wxCursorRefData(); - ~wxCursorRefData(); - -protected: -/* TODO: implementation - WXHCURSOR m_hCursor; -*/ -}; - -#define M_CURSORDATA ((wxCursorRefData *)m_refData) -#define M_CURSORHANDLERDATA ((wxCursorRefData *)bitmap->m_refData) - -// Cursor -class WXDLLEXPORT wxCursor: public wxBitmap -{ - DECLARE_DYNAMIC_CLASS(wxCursor) - -public: - wxCursor(); - - // Copy constructors - inline wxCursor(const wxCursor& cursor) { Ref(cursor); } - inline wxCursor(const wxCursor* cursor) { if (cursor) Ref(*cursor); } - - wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1, - const char maskBits[] = NULL); - - /* TODO: make default type suit platform */ - wxCursor(const wxString& name, long flags = wxBITMAP_TYPE_CUR_RESOURCE, - int hotSpotX = 0, int hotSpotY = 0); - - wxCursor(int cursor_type); - ~wxCursor(); - - virtual bool Ok() const { return (m_refData != NULL && M_CURSORDATA->m_hCursor) ; } - - inline wxCursor& operator = (const wxCursor& cursor) { if (*this == cursor) return (*this); Ref(cursor); return *this; } - inline bool operator == (const wxCursor& cursor) { return m_refData == cursor.m_refData; } - inline bool operator != (const wxCursor& cursor) { return m_refData != cursor.m_refData; } - -/* TODO: implementation - void SetHCURSOR(WXHCURSOR cursor); - inline WXHCURSOR GetHCURSOR() const { return (M_CURSORDATA ? M_CURSORDATA->m_hCursor : 0); } -*/ -}; - -extern WXDLLEXPORT void wxSetCursor(const wxCursor& cursor); - -#endif - // _WX_CURSOR_H_ diff --git a/include/wx/qt/dc.h b/include/wx/qt/dc.h deleted file mode 100644 index eb10154ab9..0000000000 --- a/include/wx/qt/dc.h +++ /dev/null @@ -1,375 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dc.h -// Purpose: wxDC class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DC_H_ -#define _WX_DC_H_ - -#ifdef __GNUG__ -#pragma interface "dc.h" -#endif - -#include "wx/pen.h" -#include "wx/brush.h" -#include "wx/icon.h" -#include "wx/font.h" -#include "wx/gdicmn.h" - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -#define MM_TEXT 0 -#define MM_ISOTROPIC 1 -#define MM_ANISOTROPIC 2 -#define MM_LOMETRIC 3 -#define MM_HIMETRIC 4 -#define MM_TWIPS 5 -#define MM_POINTS 6 -#define MM_METRIC 7 - -//----------------------------------------------------------------------------- -// global variables -//----------------------------------------------------------------------------- - -extern int wxPageNumber; - -//----------------------------------------------------------------------------- -// wxDC -//----------------------------------------------------------------------------- - -class WXDLLEXPORT wxDC: public wxObject -{ - DECLARE_ABSTRACT_CLASS(wxDC) - - public: - - wxDC(void); - ~wxDC(void); - - void BeginDrawing(void) {}; - void EndDrawing(void) {}; - - virtual bool Ok(void) const { return m_ok; }; - - virtual void FloodFill( long x1, long y1, wxColour *col, int style=wxFLOOD_SURFACE ) = 0; - inline void FloodFill(const wxPoint& pt, const wxColour& col, int style=wxFLOOD_SURFACE) - { - FloodFill(pt.x, pt.y, col, style); - } - virtual bool GetPixel( long x1, long y1, wxColour *col ) const = 0; - inline bool GetPixel(const wxPoint& pt, wxColour *col) const - { - return GetPixel(pt.x, pt.y, col); - } - - virtual void DrawLine( long x1, long y1, long x2, long y2 ) = 0; - inline void DrawLine(const wxPoint& pt1, const wxPoint& pt2) - { - DrawLine(pt1.x, pt1.y, pt2.x, pt2.y); - } - - virtual void CrossHair( long x, long y ) = 0; - inline void CrossHair(const wxPoint& pt) - { - CrossHair(pt.x, pt.y); - } - - virtual void DrawArc( long x1, long y1, long x2, long y2, double xc, double yc ) = 0; - inline void DrawArc(const wxPoint& pt1, const wxPoint& pt2, double xc, double yc) - { - DrawArc(pt1.x, pt1.y, pt2.x, pt2.y, xc, yc); - } - - virtual void DrawEllipticArc( long x, long y, long width, long height, double sa, double ea ) = 0; - virtual void DrawEllipticArc (const wxPoint& pt, const wxSize& sz, double sa, double ea) - { - DrawEllipticArc(pt.x, pt.y, sz.x, sz.y, sa, ea); - } - - virtual void DrawPoint( long x, long y ) = 0; - virtual void DrawPoint( wxPoint& point ); - - virtual void DrawLines( int n, wxPoint points[], long xoffset = 0, long yoffset = 0 ) = 0; - virtual void DrawLines( wxList *points, long xoffset = 0, long yoffset = 0 ); - virtual void DrawPolygon( int n, wxPoint points[], long xoffset = 0, long yoffset = 0, - int fillStyle=wxODDEVEN_RULE ) = 0; - virtual void DrawPolygon( wxList *lines, long xoffset = 0, long yoffset = 0, - int fillStyle=wxODDEVEN_RULE ); - - virtual void DrawRectangle( long x, long y, long width, long height ) = 0; - inline void DrawRectangle(const wxPoint& pt, const wxSize& sz) - { - DrawRectangle(pt.x, pt.y, sz.x, sz.y); - } - inline void DrawRectangle(const wxRect& rect) - { - DrawRectangle(rect.x, rect.y, rect.width, rect.height); - } - virtual void DrawRoundedRectangle( long x, long y, long width, long height, double radius = 20.0 ) = 0; - inline void DrawRoundedRectangle(const wxPoint& pt, const wxSize& sz, double radius = 20.0) - { - DrawRoundedRectangle(pt.x, pt.y, sz.x, sz.y, radius); - } - inline void DrawRoundedRectangle(const wxRect& rect, double radius = 20.0) - { - DrawRoundedRectangle(rect.x, rect.y, rect.width, rect.height, radius); - } - - virtual void DrawEllipse( long x, long y, long width, long height ) = 0; - inline void DrawEllipse(const wxPoint& pt, const wxSize& sz) - { - DrawEllipse(pt.x, pt.y, sz.x, sz.y); - } - inline void DrawEllipse(const wxRect& rect) - { - DrawEllipse(rect.x, rect.y, rect.width, rect.height); - } - - virtual void DrawIcon(const wxIcon& icon, long x, long y) = 0; - - virtual void DrawSpline( long x1, long y1, long x2, long y2, long x3, long y3 ); - virtual void DrawSpline( wxList *points ); - virtual void DrawSpline( int n, wxPoint points[] ); - - virtual bool CanDrawBitmap(void) const = 0; - - virtual void DrawIcon( const wxIcon &icon, long x, long y, bool useMask=FALSE ); - inline void DrawIcon(const wxIcon& icon, const wxPoint& pt) - { - DrawIcon(icon, pt.x, pt.y); - } - - // TODO DrawBitmap is not always the same as DrawIcon, especially if bitmaps and - // icons are implemented differently. - void DrawBitmap( const wxBitmap &bmp, long x, long y, bool useMask=FALSE ) - { DrawIcon( *((wxIcon*)(&bmp)), x, y, useMask ); } - - virtual bool Blit( long xdest, long ydest, long width, long height, - wxDC *source, long xsrc, long ysrc, int logical_func = wxCOPY, bool useMask=FALSE ) = 0; - inline bool Blit(const wxPoint& destPt, const wxSize& sz, - wxDC *source, const wxPoint& srcPt, int rop = wxCOPY, bool useMask = FALSE) - { - return Blit(destPt.x, destPt.y, sz.x, sz.y, source, srcPt.x, srcPt.y, rop, useMask); - } - - virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE ) = 0; - inline void DrawText(const wxString& text, const wxPoint& pt, bool use16bit = FALSE) - { - DrawText(text, pt.x, pt.y, use16bit); - } - - virtual bool CanGetTextExtent(void) const = 0; - virtual void GetTextExtent( const wxString &string, long *width, long *height, - long *descent = NULL, long *externalLeading = NULL, - wxFont *theFont = NULL, bool use16 = FALSE ) = 0; - virtual long GetCharWidth(void) = 0; - virtual long GetCharHeight(void) = 0; - - virtual void Clear(void) = 0; - - virtual void SetFont( const wxFont &font ) = 0; - virtual wxFont *GetFont(void) const { return &m_font; }; - - virtual void SetPen( const wxPen &pen ) = 0; - virtual wxPen *GetPen(void) const { return &m_pen; }; - - virtual void SetBrush( const wxBrush &brush ) = 0; - virtual wxBrush *GetBrush(void) const { return &m_brush; }; - - virtual void SetBackground( const wxBrush &brush ) = 0; - virtual wxBrush *GetBackground(void) const { return &m_backgroundBrush; }; - - virtual void SetLogicalFunction( int function ) = 0; - virtual int GetLogicalFunction(void) const { return m_logicalFunction; }; - - virtual void SetTextForeground( const wxColour &col ); - virtual void SetTextBackground( const wxColour &col ); - virtual wxColour& GetTextBackground(void) const { return (wxColour&)m_textBackgroundColour; }; - virtual wxColour& GetTextForeground(void) const { return (wxColour&)m_textForegroundColour; }; - - virtual void SetBackgroundMode( int mode ) = 0; - virtual int GetBackgroundMode(void) const { return m_backgroundMode; }; - - virtual void SetPalette( const wxPalette& palette ) = 0; - void SetColourMap( const wxPalette& palette ) { SetPalette(palette); }; - - // the first two must be overridden and called - virtual void SetClippingRegion( long x, long y, long width, long height ); - virtual void DestroyClippingRegion(void); - virtual void GetClippingBox( long *x, long *y, long *width, long *height ) const; - - virtual inline long MinX(void) const { return m_minX; } - virtual inline long MaxX(void) const { return m_maxX; } - virtual inline long MinY(void) const { return m_minY; } - virtual inline long MaxY(void) const { return m_maxY; } - - virtual void GetSize( int* width, int* height ) const; - inline wxSize GetSize(void) const { int w, h; GetSize(&w, &h); return wxSize(w, h); } - virtual void GetSizeMM( long* width, long* height ) const; - - virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return TRUE; }; - virtual void EndDoc(void) {}; - virtual void StartPage(void) {}; - virtual void EndPage(void) {}; - - virtual void SetMapMode( int mode ); - virtual int GetMapMode(void) const { return m_mappingMode; }; - - virtual void SetUserScale( double x, double y ); - virtual void GetUserScale( double *x, double *y ); - virtual void SetLogicalScale( double x, double y ); - virtual void GetLogicalScale( double *x, double *y ); - - virtual void SetLogicalOrigin( long x, long y ); - virtual void GetLogicalOrigin( long *x, long *y ); - virtual void SetDeviceOrigin( long x, long y ); - virtual void GetDeviceOrigin( long *x, long *y ); - virtual void SetInternalDeviceOrigin( long x, long y ); - virtual void GetInternalDeviceOrigin( long *x, long *y ); - - virtual void SetAxisOrientation( bool xLeftRight, bool yBottomUp ); - - virtual void SetOptimization( bool WXUNUSED(optimize) ) {}; - virtual bool GetOptimization(void) { return m_optimize; }; - - virtual long DeviceToLogicalX(long x) const; - virtual long DeviceToLogicalY(long y) const; - virtual long DeviceToLogicalXRel(long x) const; - virtual long DeviceToLogicalYRel(long y) const; - virtual long LogicalToDeviceX(long x) const; - virtual long LogicalToDeviceY(long y) const; - virtual long LogicalToDeviceXRel(long x) const; - virtual long LogicalToDeviceYRel(long y) const; - - public: - - void CalcBoundingBox( long x, long y ); - void ComputeScaleAndOrigin(void); - - long XDEV2LOG(long x) const - { - long new_x = x - m_deviceOriginX; - if (new_x > 0) - return (long)((double)(new_x) / m_scaleX + 0.5) * m_signX + m_logicalOriginX; - else - return (long)((double)(new_x) / m_scaleX - 0.5) * m_signX + m_logicalOriginX; - } - long XDEV2LOGREL(long x) const - { - if (x > 0) - return (long)((double)(x) / m_scaleX + 0.5); - else - return (long)((double)(x) / m_scaleX - 0.5); - } - long YDEV2LOG(long y) const - { - long new_y = y - m_deviceOriginY; - if (new_y > 0) - return (long)((double)(new_y) / m_scaleY + 0.5) * m_signY + m_logicalOriginY; - else - return (long)((double)(new_y) / m_scaleY - 0.5) * m_signY + m_logicalOriginY; - } - long YDEV2LOGREL(long y) const - { - if (y > 0) - return (long)((double)(y) / m_scaleY + 0.5); - else - return (long)((double)(y) / m_scaleY - 0.5); - } - long XLOG2DEV(long x) const - { - long new_x = x - m_logicalOriginX; - if (new_x > 0) - return (long)((double)(new_x) * m_scaleX + 0.5) * m_signX + m_deviceOriginX; - else - return (long)((double)(new_x) * m_scaleX - 0.5) * m_signX + m_deviceOriginX; - } - long XLOG2DEVREL(long x) const - { - if (x > 0) - return (long)((double)(x) * m_scaleX + 0.5); - else - return (long)((double)(x) * m_scaleX - 0.5); - } - long YLOG2DEV(long y) const - { - long new_y = y - m_logicalOriginY; - if (new_y > 0) - return (long)((double)(new_y) * m_scaleY + 0.5) * m_signY + m_deviceOriginY; - else - return (long)((double)(new_y) * m_scaleY - 0.5) * m_signY + m_deviceOriginY; - } - long YLOG2DEVREL(long y) const - { - if (y > 0) - return (long)((double)(y) * m_scaleY + 0.5); - else - return (long)((double)(y) * m_scaleY - 0.5); - } - - virtual void DrawOpenSpline( wxList *points ) = 0; - - public: - - bool m_ok; - bool m_colour; - - // not sure, what these mean - bool m_clipping; // Is clipping on right now ? - bool m_isInteractive; // Is GetPixel possible ? - bool m_autoSetting; // wxMSW only ? - bool m_dontDelete; // wxMSW only ? - bool m_optimize; // wxMSW only ? - wxString m_filename; // Not sure where this belongs. - - wxPen m_pen; - wxBrush m_brush; - wxBrush m_backgroundBrush; - wxColour m_textForegroundColour; - wxColour m_textBackgroundColour; - wxFont m_font; - - int m_logicalFunction; - int m_backgroundMode; - int m_textAlignment; // gone in wxWin 2.0 ? - - int m_mappingMode; - - // not sure what for, but what is a mm on a screen you don't know the size of? - double m_mm_to_pix_x,m_mm_to_pix_y; - - long m_internalDeviceOriginX,m_internalDeviceOriginY; // If un-scrolled is non-zero or - // d.o. changes with scrolling. - // Set using SetInternalDeviceOrigin(). - - long m_externalDeviceOriginX,m_externalDeviceOriginY; // To be set by external classes - // such as wxScrolledWindow - // using SetDeviceOrigin() - - long m_deviceOriginX,m_deviceOriginY; // Sum of the two above. - - long m_logicalOriginX,m_logicalOriginY; // User defined. - - double m_scaleX,m_scaleY; - double m_logicalScaleX,m_logicalScaleY; - double m_userScaleX,m_userScaleY; - long m_signX,m_signY; - - bool m_needComputeScaleX,m_needComputeScaleY; // not yet used - - float m_scaleFactor; // wxPSDC wants to have this. Will disappear. - - long m_clipX1,m_clipY1,m_clipX2,m_clipY2; - long m_minX,m_maxX,m_minY,m_maxY; -}; - -#endif - // _WX_DC_H_ diff --git a/include/wx/qt/dcclient.h b/include/wx/qt/dcclient.h deleted file mode 100644 index 828a507d75..0000000000 --- a/include/wx/qt/dcclient.h +++ /dev/null @@ -1,100 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcclient.h -// Purpose: wxClientDC, wxPaintDC and wxWindowDC classes -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DCCLIENT_H_ -#define _WX_DCCLIENT_H_ - -#ifdef __GNUG__ -#pragma interface "dcclient.h" -#endif - -#include "wx/dc.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class WXDLLEXPORT wxPaintDC; - -// Under Windows, wxClientDC, wxPaintDC and wxWindowDC are implemented differently. -// On many platforms, however, they will be the same. - -typedef wxPaintDC wxClientDC; -typedef wxPaintDC wxWindowDC; - -//----------------------------------------------------------------------------- -// wxPaintDC -//----------------------------------------------------------------------------- - -class WXDLLEXPORT wxPaintDC: public wxDC -{ - DECLARE_DYNAMIC_CLASS(wxPaintDC) - - public: - - wxPaintDC(void); - wxPaintDC( wxWindow *win ); - - ~wxPaintDC(void); - - virtual void FloodFill( long x1, long y1, wxColour *col, int style=wxFLOOD_SURFACE ); - virtual bool GetPixel( long x1, long y1, wxColour *col ) const; - - virtual void DrawLine( long x1, long y1, long x2, long y2 ); - virtual void CrossHair( long x, long y ); - virtual void DrawArc( long x1, long y1, long x2, long y2, double xc, double yc ); - virtual void DrawEllipticArc( long x, long y, long width, long height, double sa, double ea ); - virtual void DrawPoint( long x, long y ); - - virtual void DrawLines( int n, wxPoint points[], long xoffset = 0, long yoffset = 0 ); - virtual void DrawLines( wxList *points, long xoffset = 0, long yoffset = 0 ); - virtual void DrawPolygon( int n, wxPoint points[], long xoffset = 0, long yoffset = 0, - int fillStyle=wxODDEVEN_RULE ); - virtual void DrawPolygon( wxList *lines, long xoffset = 0, long yoffset = 0, - int fillStyle=wxODDEVEN_RULE ); - - virtual void DrawRectangle( long x, long y, long width, long height ); - virtual void DrawRoundedRectangle( long x, long y, long width, long height, double radius = 20.0 ); - virtual void DrawEllipse( long x, long y, long width, long height ); - - virtual bool CanDrawBitmap(void) const; - virtual void DrawIcon( const wxIcon &icon, long x, long y, bool useMask=FALSE ); - virtual bool Blit( long xdest, long ydest, long width, long height, - wxDC *source, long xsrc, long ysrc, int logical_func = wxCOPY, bool useMask=FALSE ); - - virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE ); - virtual bool CanGetTextExtent(void) const; - virtual void GetTextExtent( const wxString &string, long *width, long *height, - long *descent = NULL, long *externalLeading = NULL, - wxFont *theFont = NULL, bool use16 = FALSE ); - virtual long GetCharWidth(void); - virtual long GetCharHeight(void); - - virtual void Clear(void); - - virtual void SetFont( const wxFont &font ); - virtual void SetPen( const wxPen &pen ); - virtual void SetBrush( const wxBrush &brush ); - virtual void SetBackground( const wxBrush &brush ); - virtual void SetLogicalFunction( int function ); - virtual void SetTextForeground( const wxColour &col ); - virtual void SetTextBackground( const wxColour &col ); - virtual void SetBackgroundMode( int mode ); - virtual void SetPalette( const wxPalette& palette ); - - virtual void SetClippingRegion( long x, long y, long width, long height ); - virtual void DestroyClippingRegion(void); - - virtual void DrawOpenSpline( wxList *points ); -}; - -#endif - // _WX_DCCLIENT_H_ diff --git a/include/wx/qt/dcmemory.h b/include/wx/qt/dcmemory.h deleted file mode 100644 index c6c5737642..0000000000 --- a/include/wx/qt/dcmemory.h +++ /dev/null @@ -1,38 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcmemory.h -// Purpose: wxMemoryDC class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DCMEMORY_H_ -#define _WX_DCMEMORY_H_ - -#ifdef __GNUG__ -#pragma interface "dcmemory.h" -#endif - -#include "wx/dcclient.h" - -class WXDLLEXPORT wxMemoryDC: public wxPaintDC -{ - DECLARE_DYNAMIC_CLASS(wxMemoryDC) - - public: - wxMemoryDC(void); - wxMemoryDC( wxDC *dc ); // Create compatible DC - ~wxMemoryDC(void); - virtual void SelectObject( const wxBitmap& bitmap ); - void GetSize( int *width, int *height ) const; - - private: - friend wxPaintDC; - wxBitmap m_selected; -}; - -#endif - // _WX_DCMEMORY_H_ diff --git a/include/wx/qt/dcscreen.h b/include/wx/qt/dcscreen.h deleted file mode 100644 index 12d4996e70..0000000000 --- a/include/wx/qt/dcscreen.h +++ /dev/null @@ -1,39 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcscreen.h -// Purpose: wxScreenDC class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DCSCREEN_H_ -#define _WX_DCSCREEN_H_ - -#ifdef __GNUG__ -#pragma interface "dcscreen.h" -#endif - -#include "wx/dcclient.h" - -class WXDLLEXPORT wxScreenDC: public wxPaintDC -{ - DECLARE_DYNAMIC_CLASS(wxScreenDC) - - public: - // Create a DC representing the whole screen - wxScreenDC(); - ~wxScreenDC(); - - // Compatibility with X's requirements for - // drawing on top of all windows - static bool StartDrawingOnTop(wxWindow* WXUNUSED(window)) { return TRUE; } - static bool StartDrawingOnTop(wxRectangle* WXUNUSED(rect) = NULL) { return TRUE; } - static bool EndDrawingOnTop() { return TRUE; } -}; - -#endif - // _WX_DCSCREEN_H_ - diff --git a/include/wx/qt/dialog.h b/include/wx/qt/dialog.h deleted file mode 100644 index ebd7bff2a8..0000000000 --- a/include/wx/qt/dialog.h +++ /dev/null @@ -1,98 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dialog.h -// Purpose: wxDialog class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DIALOG_H_ -#define _WX_DIALOG_H_ - -#ifdef __GNUG__ -#pragma interface "dialog.h" -#endif - -#include "wx/panel.h" - -WXDLLEXPORT_DATA(extern const char*) wxDialogNameStr; - -// Dialog boxes -class WXDLLEXPORT wxDialog: public wxPanel -{ - DECLARE_DYNAMIC_CLASS(wxDialog) -public: - - wxDialog(); - - // Constructor with a modal flag, but no window id - the old convention - inline wxDialog(wxWindow *parent, - const wxString& title, bool modal, - int x = -1, int y= -1, int width = 500, int height = 500, - long style = wxDEFAULT_DIALOG_STYLE, - const wxString& name = wxDialogNameStr) - { - long modalStyle = modal ? wxDIALOG_MODAL : wxDIALOG_MODELESS ; - Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), style|modalStyle, name); - } - - // Constructor with no modal flag - the new convention. - inline wxDialog(wxWindow *parent, wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, - const wxString& name = wxDialogNameStr) - { - Create(parent, id, title, pos, size, style, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxString& title, // bool modal = FALSE, // TODO make this a window style? - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, - const wxString& name = wxDialogNameStr); - - ~wxDialog(); - - virtual bool Destroy(); - void SetClientSize(int width, int height); - void GetPosition(int *x, int *y) const; - bool Show(bool show); - void Iconize(bool iconize); - - virtual bool IsIconized() const; - void Fit(); - - void SetTitle(const wxString& title); - wxString GetTitle() const ; - - bool OnClose(); - void OnCharHook(wxKeyEvent& event); - void OnCloseWindow(wxCloseEvent& event); - - void SetModal(bool flag); - - virtual void Centre(int direction = wxBOTH); - virtual bool IsModal() const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); } - - virtual int ShowModal(); - virtual void EndModal(int retCode); - - // Standard buttons - void OnOK(wxCommandEvent& event); - void OnApply(wxCommandEvent& event); - void OnCancel(wxCommandEvent& event); - - // Responds to colour changes - void OnSysColourChanged(wxSysColourChangedEvent& event); - -DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_DIALOG_H_ diff --git a/include/wx/qt/dirdlg.h b/include/wx/qt/dirdlg.h deleted file mode 100644 index fe36bb7fec..0000000000 --- a/include/wx/qt/dirdlg.h +++ /dev/null @@ -1,47 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dirdlg.h -// Purpose: wxDirDialog class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DIRDLG_H_ -#define _WX_DIRDLG_H_ - -#ifdef __GNUG__ -#pragma interface "dirdlg.h" -#endif - -#include "wx/dialog.h" - -class WXDLLEXPORT wxDirDialog: public wxDialog -{ -DECLARE_DYNAMIC_CLASS(wxDirDialog) -public: - wxDirDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, - const wxString& defaultPath = "", - long style = 0, const wxPoint& pos = wxDefaultPosition); - - inline void SetMessage(const wxString& message) { m_message = message; } - inline void SetPath(const wxString& path) { m_path = path; } - inline void SetStyle(long style) { m_dialogStyle = style; } - - inline wxString GetMessage() const { return m_message; } - inline wxString GetPath() const { return m_path; } - inline long GetStyle() const { return m_dialogStyle; } - - int ShowModal(); - -protected: - wxString m_message; - long m_dialogStyle; - wxWindow * m_parent; - wxString m_path; -}; - -#endif - // _WX_DIRDLG_H_ diff --git a/include/wx/qt/dnd.h b/include/wx/qt/dnd.h deleted file mode 100644 index 217561903a..0000000000 --- a/include/wx/qt/dnd.h +++ /dev/null @@ -1,239 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: dnd.h -// Purpose: declaration of the wxDropTarget class -// Author: Robert Roebling -// RCS-ID: -// Copyright: (c) 1998 Vadim Zeitlin, Robert Roebling -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - - -#ifndef __GTKDNDH__ -#define __GTKDNDH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/cursor.h" - -//------------------------------------------------------------------------- -// classes -//------------------------------------------------------------------------- - -class wxWindow; - -class wxDataObject; -class wxTextDataObject; -class wxFileDataObject; - -class wxDropTarget; -class wxTextDropTarget; -class wxFileDropTarget; - -class wxDropSource; - -//------------------------------------------------------------------------- -// wxDataObject -//------------------------------------------------------------------------- - -class wxDataObject: public wxObject -{ -public: - // all data formats (values are the same as in windows.h, do not change!) - enum StdFormat - { - Invalid, - Text, - Bitmap, - MetafilePict, - Sylk, - Dif, - Tiff, - OemText, - Dib, - Palette, - Pendata, - Riff, - Wave, - UnicodeText, - EnhMetafile, - Hdrop, - Locale, - Max - }; - - // function to return symbolic name of clipboard format (debug messages) - static const char *GetFormatName(wxDataFormat format); - - // ctor & dtor - wxDataObject() {}; - ~wxDataObject() {}; - - // pure virtuals to override - // get the best suited format for our data - virtual wxDataFormat GetPreferredFormat() const = 0; - // decide if we support this format (should be one of values of - // StdFormat enumerations or a user-defined format) - virtual bool IsSupportedFormat(wxDataFormat format) const = 0; - // get the (total) size of data - virtual size_t GetDataSize() const = 0; - // copy raw data to provided pointer - virtual void GetDataHere(void *pBuf) const = 0; - -}; - -// ---------------------------------------------------------------------------- -// wxTextDataObject is a specialization of wxDataObject for text data -// ---------------------------------------------------------------------------- - -class wxTextDataObject : public wxDataObject -{ -public: - // ctors - wxTextDataObject() { } - wxTextDataObject(const wxString& strText) : m_strText(strText) { } - void Init(const wxString& strText) { m_strText = strText; } - - // implement base class pure virtuals - virtual wxDataFormat GetPreferredFormat() const - { return wxDF_TEXT; } - virtual bool IsSupportedFormat(wxDataFormat format) const - { return format == wxDF_TEXT; } - virtual size_t GetDataSize() const - { return m_strText.Len() + 1; } // +1 for trailing '\0'of course - virtual void GetDataHere(void *pBuf) const - { memcpy(pBuf, m_strText.c_str(), GetDataSize()); } - -private: - wxString m_strText; - -}; - -// ---------------------------------------------------------------------------- -// wxFileDataObject is a specialization of wxDataObject for file names -// ---------------------------------------------------------------------------- - -class wxFileDataObject : public wxDataObject -{ -public: - - wxFileDataObject(void) { } - void AddFile( const wxString &file ) - { m_files += file; m_files += ";"; } - - // implement base class pure virtuals - virtual wxDataFormat GetPreferredFormat() const - { return wxDF_FILENAME; } - virtual bool IsSupportedFormat(wxDataFormat format) const - { return format == wxDF_FILENAME; } - virtual size_t GetDataSize() const - { return m_files.Len() + 1; } // +1 for trailing '\0'of course - virtual void GetDataHere(void *pBuf) const - { memcpy(pBuf, m_files.c_str(), GetDataSize()); } - -private: - wxString m_files; - -}; -//------------------------------------------------------------------------- -// wxDropTarget -//------------------------------------------------------------------------- - -class wxDropTarget: public wxObject -{ - public: - - wxDropTarget(); - ~wxDropTarget(); - - virtual void OnEnter() { } - virtual void OnLeave() { } - virtual bool OnDrop( long x, long y, const void *pData ) = 0; - -// protected: - - friend wxWindow; - - // Override these to indicate what kind of data you support: - - virtual size_t GetFormatCount() const = 0; - virtual wxDataFormat GetFormat(size_t n) const = 0; -}; - -//------------------------------------------------------------------------- -// wxTextDropTarget -//------------------------------------------------------------------------- - -class wxTextDropTarget: public wxDropTarget -{ - public: - - wxTextDropTarget() {}; - virtual bool OnDrop( long x, long y, const void *pData ); - virtual bool OnDropText( long x, long y, const char *psz ); - - protected: - - virtual size_t GetFormatCount() const; - virtual wxDataFormat GetFormat(size_t n) const; -}; - -// ---------------------------------------------------------------------------- -// A drop target which accepts files (dragged from File Manager or Explorer) -// ---------------------------------------------------------------------------- - -class wxFileDropTarget: public wxDropTarget -{ - public: - - wxFileDropTarget() {}; - - virtual bool OnDrop(long x, long y, const void *pData); - virtual bool OnDropFiles( long x, long y, - size_t nFiles, const char * const aszFiles[]); - - protected: - - virtual size_t GetFormatCount() const; - virtual wxDataFormat GetFormat(size_t n) const; -}; - -//------------------------------------------------------------------------- -// wxDropSource -//------------------------------------------------------------------------- - -class wxDropSource: public wxObject -{ - public: - - enum DragResult - { - Error, // error prevented the d&d operation from completing - None, // drag target didn't accept the data - Copy, // the data was successfully copied - Move, // the data was successfully moved - Cancel // the operation was cancelled by user (not an error) - }; - - wxDropSource( wxWindow *win ); - wxDropSource( wxDataObject &data, wxWindow *win ); - - ~wxDropSource(void); - - void SetData( wxDataObject &data ); - DragResult DoDragDrop( bool bAllowMove = FALSE ); - - virtual bool GiveFeedback( DragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return TRUE; }; - - protected: - - wxDataObject *m_data; -}; - -#endif - //__GTKDNDH__ - diff --git a/include/wx/qt/filedlg.h b/include/wx/qt/filedlg.h deleted file mode 100644 index 0259f2d943..0000000000 --- a/include/wx/qt/filedlg.h +++ /dev/null @@ -1,89 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: filedlg.h -// Purpose: wxFileDialog class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_FILEDLG_H_ -#define _WX_FILEDLG_H_ - -#ifdef __GNUG__ -#pragma interface "filedlg.h" -#endif - -#include "wx/dialog.h" - -/* - * File selector - */ - -WXDLLEXPORT_DATA(extern const char*) wxFileSelectorPromptStr; -WXDLLEXPORT_DATA(extern const char*) wxFileSelectorDefaultWildcardStr; - -class WXDLLEXPORT wxFileDialog: public wxDialog -{ -DECLARE_DYNAMIC_CLASS(wxFileDialog) -protected: - wxString m_message; - long m_dialogStyle; - wxWindow * m_parent; - wxString m_dir; - wxString m_path; // Full path - wxString m_fileName; - wxString m_wildCard; - int m_filterIndex; -public: - wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, - const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildCard = wxFileSelectorDefaultWildcardStr, - long style = 0, const wxPoint& pos = wxDefaultPosition); - - inline void SetMessage(const wxString& message) { m_message = message; } - inline void SetPath(const wxString& path) { m_path = path; } - inline void SetDirectory(const wxString& dir) { m_dir = dir; } - inline void SetFilename(const wxString& name) { m_fileName = name; } - inline void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; } - inline void SetStyle(long style) { m_dialogStyle = style; } - inline void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; } - - inline wxString GetMessage() const { return m_message; } - inline wxString GetPath() const { return m_path; } - inline wxString GetDirectory() const { return m_dir; } - inline wxString GetFilename() const { return m_fileName; } - inline wxString GetWildcard() const { return m_wildCard; } - inline long GetStyle() const { return m_dialogStyle; } - inline int GetFilterIndex() const { return m_filterIndex ; } - - int ShowModal(); -}; - -#define wxOPEN 0x0001 -#define wxSAVE 0x0002 -#define wxOVERWRITE_PROMPT 0x0004 -#define wxHIDE_READONLY 0x0008 -#define wxFILE_MUST_EXIST 0x0010 - -// File selector - backward compatibility -char* WXDLLEXPORT wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL, - const char *default_filename = NULL, const char *default_extension = NULL, - const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0, - wxWindow *parent = NULL, int x = -1, int y = -1); - -// An extended version of wxFileSelector -char* WXDLLEXPORT wxFileSelectorEx(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL, - const char *default_filename = NULL, int *indexDefaultExtension = NULL, - const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0, - wxWindow *parent = NULL, int x = -1, int y = -1); - -// Generic file load dialog -char* WXDLLEXPORT wxLoadFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL); - -// Generic file save dialog -char* WXDLLEXPORT wxSaveFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL); - -#endif - // _WX_FILEDLG_H_ diff --git a/include/wx/qt/font.h b/include/wx/qt/font.h deleted file mode 100644 index 2079f2d0f0..0000000000 --- a/include/wx/qt/font.h +++ /dev/null @@ -1,88 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: font.h -// Purpose: wxFont class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_FONT_H_ -#define _WX_FONT_H_ - -#ifdef __GNUG__ -#pragma interface "font.h" -#endif - -#include "wx/gdiobj.h" - -class WXDLLEXPORT wxFont; - -class WXDLLEXPORT wxFontRefData: public wxGDIRefData -{ - friend class WXDLLEXPORT wxFont; -public: - wxFontRefData(); - ~wxFontRefData(); -protected: - int m_pointSize; - int m_family; - int m_style; - int m_weight; - bool m_underlined; - wxString m_faceName; -/* TODO: implementation - WXHFONT m_hFont; -*/ -}; - -#define M_FONTDATA ((wxFontRefData *)m_refData) - -WXDLLEXPORT_DATA(extern const char*) wxEmptyString; - -// Font -class WXDLLEXPORT wxFont: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxFont) -public: - wxFont(); - wxFont(int pointSize, int family, int style, int weight, bool underlined = FALSE, const wxString& faceName = wxEmptyString); - inline wxFont(const wxFont& font) { Ref(font); } - inline wxFont(const wxFont* font) { if (font) Ref(*font); } - - ~wxFont(); - - bool Create(int pointSize, int family, int style, int weight, bool underlined = FALSE, const wxString& faceName = wxEmptyString); - - virtual bool Ok() const { return (m_refData != NULL) ; } - - inline int GetPointSize() const { return M_FONTDATA->m_pointSize; } - inline int GetFamily() const { return M_FONTDATA->m_family; } - inline int GetStyle() const { return M_FONTDATA->m_style; } - inline int GetWeight() const { return M_FONTDATA->m_weight; } - wxString GetFamilyString() const ; - wxString GetFaceName() const ; - wxString GetStyleString() const ; - wxString GetWeightString() const ; - inline bool GetUnderlined() const { return M_FONTDATA->m_underlined; } - - void SetPointSize(int pointSize); - void SetFamily(int family); - void SetStyle(int style); - void SetWeight(int weight); - void SetFaceName(const wxString& faceName); - void SetUnderlined(bool underlined); - - inline wxFont& operator = (const wxFont& font) { if (*this == font) return (*this); Ref(font); return *this; } - inline bool operator == (const wxFont& font) { return m_refData == font.m_refData; } - inline bool operator != (const wxFont& font) { return m_refData != font.m_refData; } - - // Implementation -protected: - void Unshare(); -}; - -#endif - // _WX_FONT_H_ diff --git a/include/wx/qt/frame.h b/include/wx/qt/frame.h deleted file mode 100644 index 70247ae171..0000000000 --- a/include/wx/qt/frame.h +++ /dev/null @@ -1,156 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: frame.h -// Purpose: wxFrame class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_FRAME_H_ -#define _WX_FRAME_H_ - -#ifdef __GNUG__ -#pragma interface "frame.h" -#endif - -#include "wx/window.h" -#include "wx/toolbar.h" -#include "wx/accel.h" - -WXDLLEXPORT_DATA(extern const char*) wxFrameNameStr; -WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr; - -class WXDLLEXPORT wxMenuBar; -class WXDLLEXPORT wxStatusBar; - -class WXDLLEXPORT wxFrame: public wxWindow { - - DECLARE_DYNAMIC_CLASS(wxFrame) - -public: - wxFrame(); - inline wxFrame(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) - { - Create(parent, id, title, pos, size, style, name); - } - - ~wxFrame(); - - bool Create(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); - - virtual bool Destroy(); - void SetClientSize(int width, int height); - void GetClientSize(int *width, int *height) const; - - void GetSize(int *width, int *height) const ; - void GetPosition(int *x, int *y) const ; - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - - virtual bool OnClose(); - - void OnSize(wxSizeEvent& event); - void OnMenuHighlight(wxMenuEvent& event); - void OnActivate(wxActivateEvent& event); - void OnIdle(wxIdleEvent& event); - void OnCloseWindow(wxCloseEvent& event); - - bool Show(bool show); - - // Set menu bar - void SetMenuBar(wxMenuBar *menu_bar); - virtual wxMenuBar *GetMenuBar() const ; - - // Set title - void SetTitle(const wxString& title); - wxString GetTitle() const ; - - void Centre(int direction = wxBOTH); - - // Call this to simulate a menu command - virtual void Command(int id); - virtual void ProcessCommand(int id); - - // Set icon - virtual void SetIcon(const wxIcon& icon); - - // Create status line - virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0, - const wxString& name = "statusBar"); - inline wxStatusBar *GetStatusBar() const { return m_frameStatusBar; } - virtual void PositionStatusBar(); - virtual wxStatusBar *OnCreateStatusBar(int number, long style, wxWindowID id, - const wxString& name); - - // Create toolbar - virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1, const wxString& name = wxToolBarNameStr); - virtual wxToolBar *OnCreateToolBar(long style, wxWindowID id, const wxString& name); - // If made known to the frame, the frame will manage it automatically. - virtual inline void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; } - virtual inline wxToolBar *GetToolBar() const { return m_frameToolBar; } - virtual void PositionToolBar(); - - // Set status line text - virtual void SetStatusText(const wxString& text, int number = 0); - - // Set status line widths - virtual void SetStatusWidths(int n, const int widths_field[]); - - // Hint to tell framework which status bar to use - // TODO: should this go into a wxFrameworkSettings class perhaps? - static void UseNativeStatusBar(bool useNative) { m_useNativeStatusBar = useNative; }; - static bool UsesNativeStatusBar() { return m_useNativeStatusBar; }; - - // Fit frame around subwindows - virtual void Fit(); - - // Iconize - virtual void Iconize(bool iconize); - - virtual bool IsIconized() const ; - - // Compatibility - inline bool Iconized() const { return IsIconized(); } - - virtual void Maximize(bool maximize); - - virtual void SetAcceleratorTable(const wxAcceleratorTable& accel); - - // Responds to colour changes - void OnSysColourChanged(wxSysColourChangedEvent& event); - - // Query app for menu item updates (called from OnIdle) - void DoMenuUpdates(); - void DoMenuUpdates(wxMenu* menu); - - // Checks if there is a toolbar, and returns the first free client position - virtual wxPoint GetClientAreaOrigin() const; - -protected: - wxMenuBar * m_frameMenuBar; - wxStatusBar * m_frameStatusBar; - wxIcon m_icon; - bool m_iconized; - static bool m_useNativeStatusBar; - wxToolBar * m_frameToolBar ; - wxAcceleratorTable m_acceleratorTable; - - DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_FRAME_H_ diff --git a/include/wx/qt/gauge.h b/include/wx/qt/gauge.h deleted file mode 100644 index ce19d9ef1f..0000000000 --- a/include/wx/qt/gauge.h +++ /dev/null @@ -1,69 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gauge.h -// Purpose: wxGauge class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_GAUGE_H_ -#define _WX_GAUGE_H_ - -#ifdef __GNUG__ -#pragma interface "gauge.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr; - -// Group box -class WXDLLEXPORT wxGauge: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxGauge) - public: - inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; } - - inline wxGauge(wxWindow *parent, wxWindowID id, - int range, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxGA_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr) - { - Create(parent, id, range, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - int range, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxGA_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr); - - void SetShadowWidth(int w); - void SetBezelFace(int w); - void SetRange(int r); - void SetValue(int pos); - - int GetShadowWidth() const ; - int GetBezelFace() const ; - int GetRange() const ; - int GetValue() const ; - - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - - virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ; - - protected: - int m_rangeMax; - int m_gaugePos; -}; - -#endif - // _WX_GAUGE_H_ diff --git a/include/wx/qt/gdiobj.h b/include/wx/qt/gdiobj.h deleted file mode 100644 index 9263d4d6ad..0000000000 --- a/include/wx/qt/gdiobj.h +++ /dev/null @@ -1,48 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gdiobj.h -// Purpose: wxGDIObject class: base class for other GDI classes -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_GDIOBJ_H_ -#define _WX_GDIOBJ_H_ - -#include "wx/object.h" - -#ifdef __GNUG__ -#pragma interface "gdiobj.h" -#endif - -class WXDLLEXPORT wxGDIRefData: public wxObjectRefData { -public: - inline wxGDIRefData() - { - } -}; - -#define M_GDIDATA ((wxGDIRefData *)m_refData) - -class WXDLLEXPORT wxGDIObject: public wxObject -{ -DECLARE_DYNAMIC_CLASS(wxGDIObject) - public: - inline wxGDIObject() { m_visible = FALSE; }; - inline ~wxGDIObject() {}; - - inline bool IsNull() const { return (m_refData == 0); } - - virtual bool GetVisible() { return m_visible; } - virtual void SetVisible(bool v) { m_visible = v; } - -protected: - bool m_visible; // Can a pointer to this object be safely taken? - // - only if created within FindOrCreate... -}; - -#endif - // _WX_GDIOBJ_H_ diff --git a/include/wx/qt/icon.h b/include/wx/qt/icon.h deleted file mode 100644 index f68c23154b..0000000000 --- a/include/wx/qt/icon.h +++ /dev/null @@ -1,107 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: icon.h -// Purpose: wxIcon class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_ICON_H_ -#define _WX_ICON_H_ - -#ifdef __GNUG__ -#pragma interface "icon.h" -#endif - -#include "wx/bitmap.h" - -class WXDLLEXPORT wxIconRefData: public wxBitmapRefData -{ - friend class WXDLLEXPORT wxBitmap; - friend class WXDLLEXPORT wxIcon; -public: - wxIconRefData(); - ~wxIconRefData(); - -public: -/* TODO: whatever your actual icon handle is - WXHICON m_hIcon; -*/ -}; - -#define M_ICONDATA ((wxIconRefData *)m_refData) -#define M_ICONHANDLERDATA ((wxIconRefData *)bitmap->GetRefData()) - -// Icon -class WXDLLEXPORT wxIcon: public wxBitmap -{ - DECLARE_DYNAMIC_CLASS(wxIcon) - -public: - wxIcon(); - - // Copy constructors - inline wxIcon(const wxIcon& icon) { Ref(icon); } - inline wxIcon(const wxIcon* icon) { if (icon) Ref(*icon); } - - wxIcon(const char bits[], int width, int height); - wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE, - int desiredWidth = -1, int desiredHeight = -1); - ~wxIcon(); - - bool LoadFile(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE, - int desiredWidth = -1, int desiredHeight = -1); - - inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; } - inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; } - inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; } - -/* TODO: implementation - void SetHICON(WXHICON ico); - inline WXHICON GetHICON() const { return (M_ICONDATA ? M_ICONDATA->m_hIcon : 0); } -*/ - -/* TODO */ - virtual bool Ok() const { return (m_refData != NULL) ; } -}; - -/* Example handlers. TODO: write your own handlers for relevant types. - -class WXDLLEXPORT wxICOFileHandler: public wxBitmapHandler -{ - DECLARE_DYNAMIC_CLASS(wxICOFileHandler) -public: - inline wxICOFileHandler() - { - m_name = "ICO icon file"; - m_extension = "ico"; - m_type = wxBITMAP_TYPE_ICO; - }; - - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth = -1, int desiredHeight = -1); -}; - -class WXDLLEXPORT wxICOResourceHandler: public wxBitmapHandler -{ - DECLARE_DYNAMIC_CLASS(wxICOResourceHandler) -public: - inline wxICOResourceHandler() - { - m_name = "ICO resource"; - m_extension = "ico"; - m_type = wxBITMAP_TYPE_ICO_RESOURCE; - }; - - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth = -1, int desiredHeight = -1); - -}; - -*/ - -#endif - // _WX_ICON_H_ diff --git a/include/wx/qt/joystick.h b/include/wx/qt/joystick.h deleted file mode 100644 index 30324fc035..0000000000 --- a/include/wx/qt/joystick.h +++ /dev/null @@ -1,93 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: joystick.h -// Purpose: wxJoystick class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_JOYSTICK_H_ -#define _WX_JOYSTICK_H_ - -#ifdef __GNUG__ -#pragma interface "joystick.h" -#endif - -#include "wx/event.h" - -class WXDLLEXPORT wxJoystick: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxJoystick) - public: - /* - * Public interface - */ - - wxJoystick(int joystick = wxJOYSTICK1) { m_joystick = joystick; }; - - // Attributes - //////////////////////////////////////////////////////////////////////////// - - wxPoint GetPosition() const; - int GetZPosition() const; - int GetButtonState() const; - int GetPOVPosition() const; - int GetPOVCTSPosition() const; - int GetRudderPosition() const; - int GetUPosition() const; - int GetVPosition() const; - int GetMovementThreshold() const; - void SetMovementThreshold(int threshold) ; - - // Capabilities - //////////////////////////////////////////////////////////////////////////// - - bool IsOk() const; // Checks that the joystick is functioning - int GetNumberJoysticks() const ; - int GetManufacturerId() const ; - int GetProductId() const ; - wxString GetProductName() const ; - int GetXMin() const; - int GetYMin() const; - int GetZMin() const; - int GetXMax() const; - int GetYMax() const; - int GetZMax() const; - int GetNumberButtons() const; - int GetNumberAxes() const; - int GetMaxButtons() const; - int GetMaxAxes() const; - int GetPollingMin() const; - int GetPollingMax() const; - int GetRudderMin() const; - int GetRudderMax() const; - int GetUMin() const; - int GetUMax() const; - int GetVMin() const; - int GetVMax() const; - - bool HasRudder() const; - bool HasZ() const; - bool HasU() const; - bool HasV() const; - bool HasPOV() const; - bool HasPOV4Dir() const; - bool HasPOVCTS() const; - - // Operations - //////////////////////////////////////////////////////////////////////////// - - // pollingFreq = 0 means that movement events are sent when above the threshold. - // If pollingFreq > 0, events are received every this many milliseconds. - bool SetCapture(wxWindow* win, int pollingFreq = 0); - bool ReleaseCapture(); - -protected: - int m_joystick; -}; - -#endif - // _WX_JOYSTICK_H_ diff --git a/include/wx/qt/listbox.h b/include/wx/qt/listbox.h deleted file mode 100644 index d95db4379b..0000000000 --- a/include/wx/qt/listbox.h +++ /dev/null @@ -1,97 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: listbox.h -// Purpose: wxListBox class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_LISTBOX_H_ -#define _WX_LISTBOX_H_ - -#ifdef __GNUG__ -#pragma interface "listbox.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxListBoxNameStr; - -// forward decl for GetSelections() -class WXDLLEXPORT wxArrayInt; - -WXDLLEXPORT_DATA(extern const char*) wxEmptyString; - -// List box item -class WXDLLEXPORT wxListBox: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxListBox) - public: - - wxListBox(); - inline wxListBox(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr) - { - Create(parent, id, pos, size, n, choices, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); - - ~wxListBox(); - - virtual void Append(const wxString& item); - virtual void Append(const wxString& item, char *clientData); - virtual void Set(int n, const wxString* choices, char **clientData = NULL); - virtual int FindString(const wxString& s) const ; - virtual void Clear(); - virtual void SetSelection(int n, bool select = TRUE); - - virtual void Deselect(int n); - - // For single choice list item only - virtual int GetSelection() const ; - virtual void Delete(int n); - virtual char *GetClientData(int n) const ; - virtual void SetClientData(int n, char *clientData); - virtual void SetString(int n, const wxString& s); - - // For single or multiple choice list item - virtual int GetSelections(wxArrayInt& aSelections) const; - virtual bool Selected(int n) const ; - virtual wxString GetString(int n) const ; - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - - // Set the specified item at the first visible item - // or scroll to max range. - virtual void SetFirstItem(int n) ; - virtual void SetFirstItem(const wxString& s) ; - - virtual void InsertItems(int nItems, const wxString items[], int pos); - - virtual wxString GetStringSelection() const ; - virtual bool SetStringSelection(const wxString& s, bool flag = TRUE); - virtual int Number() const ; - - void Command(wxCommandEvent& event); - - protected: - int m_noItems; - int m_selected; -}; - -#endif - // _WX_LISTBOX_H_ diff --git a/include/wx/qt/mdi.h b/include/wx/qt/mdi.h deleted file mode 100644 index 1daec94008..0000000000 --- a/include/wx/qt/mdi.h +++ /dev/null @@ -1,160 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: mdi.h -// Purpose: MDI (Multiple Document Interface) classes. -// This doesn't have to be implemented just like Windows, -// it could be a tabbed design as in wxGTK. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_MDI_H_ -#define _WX_MDI_H_ - -#ifdef __GNUG__ -#pragma interface "mdi.h" -#endif - -#include "wx/frame.h" - -WXDLLEXPORT_DATA(extern const char*) wxFrameNameStr; -WXDLLEXPORT_DATA(extern const char*) wxStatusLineNameStr; - -class WXDLLEXPORT wxMDIClientWindow; -class WXDLLEXPORT wxMDIChildFrame; - -class WXDLLEXPORT wxMDIParentFrame: public wxFrame -{ -DECLARE_DYNAMIC_CLASS(wxMDIParentFrame) - - friend class WXDLLEXPORT wxMDIChildFrame; -public: - - wxMDIParentFrame(); - inline wxMDIParentFrame(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, // Scrolling refers to client window - const wxString& name = wxFrameNameStr) - { - Create(parent, id, title, pos, size, style, name); - } - - ~wxMDIParentFrame(); - - bool Create(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr); - - void OnSize(wxSizeEvent& event); - void OnActivate(wxActivateEvent& event); - - void SetMenuBar(wxMenuBar *menu_bar); - - // Gets the size available for subwindows after menu size, toolbar size - // and status bar size have been subtracted. If you want to manage your own - // toolbar(s), don't call SetToolBar. - void GetClientSize(int *width, int *height) const; - - // Get the active MDI child window (Windows only) - wxMDIChildFrame *GetActiveChild() const ; - - // Get the client window - inline wxMDIClientWindow *GetClientWindow() const { return m_clientWindow; }; - - // Create the client window class (don't Create the window, - // just return a new class) - virtual wxMDIClientWindow *OnCreateClient() ; - - // MDI operations - virtual void Cascade(); - virtual void Tile(); - virtual void ArrangeIcons(); - virtual void ActivateNext(); - virtual void ActivatePrevious(); - -protected: - -DECLARE_EVENT_TABLE() -}; - -class WXDLLEXPORT wxMDIChildFrame: public wxFrame -{ -DECLARE_DYNAMIC_CLASS(wxMDIChildFrame) -public: - - wxMDIChildFrame(); - inline wxMDIChildFrame(wxMDIParentFrame *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) - { - Create(parent, id, title, pos, size, style, name); - } - - ~wxMDIChildFrame(); - - bool Create(wxMDIParentFrame *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); - - // Set menu bar - void SetMenuBar(wxMenuBar *menu_bar); - void SetClientSize(int width, int height); - void GetPosition(int *x, int *y) const ; - - // MDI operations - virtual void Maximize(); - virtual void Restore(); - virtual void Activate(); -}; - -/* The client window is a child of the parent MDI frame, and itself - * contains the child MDI frames. - * However, you create the MDI children as children of the MDI parent: - * only in the implementation does the client window become the parent - * of the children. Phew! So the children are sort of 'adopted'... - */ - -class WXDLLEXPORT wxMDIClientWindow: public wxWindow -{ - DECLARE_DYNAMIC_CLASS(wxMDIClientWindow) - public: - - wxMDIClientWindow() ; - inline wxMDIClientWindow(wxMDIParentFrame *parent, long style = 0) - { - CreateClient(parent, style); - } - - ~wxMDIClientWindow(); - - // Note: this is virtual, to allow overridden behaviour. - virtual bool CreateClient(wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL); - - // Explicitly call default scroll behaviour - void OnScroll(wxScrollEvent& event); - -protected: - -DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_MDI_H_ diff --git a/include/wx/qt/menu.h b/include/wx/qt/menu.h deleted file mode 100644 index 1654602141..0000000000 --- a/include/wx/qt/menu.h +++ /dev/null @@ -1,157 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: menu.h -// Purpose: wxMenu, wxMenuBar classes -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_MENU_H_ -#define _WX_MENU_H_ - -#ifdef __GNUG__ -#pragma interface "menu.h" -#endif - -#include "wx/defs.h" -#include "wx/event.h" - -class WXDLLEXPORT wxMenuItem; -class WXDLLEXPORT wxMenuBar; -class WXDLLEXPORT wxMenu; - -WXDLLEXPORT_DATA(extern const char*) wxEmptyString; - -// ---------------------------------------------------------------------------- -// Menu -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxMenu: public wxEvtHandler -{ - DECLARE_DYNAMIC_CLASS(wxMenu) - -public: - // ctor & dtor - wxMenu(const wxString& title = wxEmptyString, const wxFunction func = NULL); - ~wxMenu(); - - // construct menu - // append items to the menu - // separator line - void AppendSeparator(); - // normal item - void Append(int id, const wxString& Label, const wxString& helpString = wxEmptyString, - bool checkable = FALSE); - // a submenu - void Append(int id, const wxString& Label, wxMenu *SubMenu, - const wxString& helpString = wxEmptyString); - // the most generic form (create wxMenuItem first and use it's functions) - void Append(wxMenuItem *pItem); - // insert a break in the menu - void Break(); - // delete an item - void Delete(int id); - - // menu item control - void Enable(int id, bool Flag); - bool Enabled(int id) const; - inline bool IsEnabled(int id) const { return Enabled(id); }; - void Check(int id, bool Flag); - bool Checked(int id) const; - inline bool IsChecked(int id) const { return IsChecked(id); }; - - // item properties - // title - void SetTitle(const wxString& label); - const wxString& GetTitle() const; - // label - void SetLabel(int id, const wxString& label); - wxString GetLabel(int id) const; - // help string - virtual void SetHelpString(int id, const wxString& helpString); - virtual wxString GetHelpString(int id) const ; - - // find item - // Finds the item id matching the given string, -1 if not found. - virtual int FindItem(const wxString& itemString) const ; - // Find wxMenuItem by ID, and item's menu too if itemMenu is !NULL. - wxMenuItem *FindItemForId(int itemId, wxMenu **itemMenu = NULL) const; - - void ProcessCommand(wxCommandEvent& event); - inline void Callback(const wxFunction func) { m_callback = func; } - - virtual void SetParent(wxEvtHandler *parent) { m_parent = parent; } - inline void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; } - inline wxEvtHandler *GetEventHandler() { return m_eventHandler; } - - inline wxList& GetItems() const { return (wxList&) m_menuItems; } - -public: - wxFunction m_callback; - - int m_noItems; - wxString m_title; - wxMenuBar * m_menuBar; - wxList m_menuItems; - wxEvtHandler * m_parent; - wxEvtHandler * m_eventHandler; -}; - -// ---------------------------------------------------------------------------- -// Menu Bar (a la Windows) -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxFrame; -class WXDLLEXPORT wxMenuBar: public wxEvtHandler -{ - DECLARE_DYNAMIC_CLASS(wxMenuBar) - - wxMenuBar(); - wxMenuBar(int n, wxMenu *menus[], const wxString titles[]); - ~wxMenuBar(); - - void Append(wxMenu *menu, const wxString& title); - // Must only be used AFTER menu has been attached to frame, - // otherwise use individual menus to enable/disable items - void Enable(int Id, bool Flag); - bool Enabled(int Id) const ; - inline bool IsEnabled(int Id) const { return Enabled(Id); }; - void EnableTop(int pos, bool Flag); - void Check(int id, bool Flag); - bool Checked(int id) const ; - inline bool IsChecked(int Id) const { return Checked(Id); }; - void SetLabel(int id, const wxString& label) ; - wxString GetLabel(int id) const ; - void SetLabelTop(int pos, const wxString& label) ; - wxString GetLabelTop(int pos) const ; - virtual void Delete(wxMenu *menu, int index = 0); /* Menu not destroyed */ - virtual bool OnAppend(wxMenu *menu, const char *title); - virtual bool OnDelete(wxMenu *menu, int index); - - virtual void SetHelpString(int Id, const wxString& helpString); - virtual wxString GetHelpString(int Id) const ; - - virtual int FindMenuItem(const wxString& menuString, const wxString& itemString) const ; - - // Find wxMenuItem for item ID, and return item's - // menu too if itemMenu is non-NULL. - wxMenuItem *FindItemForId(int itemId, wxMenu **menuForItem = NULL) const ; - - inline void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; } - inline wxEvtHandler *GetEventHandler() { return m_eventHandler; } - - inline int GetMenuCount() const { return m_menuCount; } - inline wxMenu* GetMenu(int i) const { return m_menus[i]; } - - public: - wxEvtHandler * m_eventHandler; - int m_menuCount; - wxMenu ** m_menus; - wxString * m_titles; - wxFrame * m_menuBarFrame; -/* TODO: data that represents the actual menubar when created. - */ -}; - -#endif // _WX_MENU_H_ diff --git a/include/wx/qt/notebook.h b/include/wx/qt/notebook.h deleted file mode 100644 index b5834ec181..0000000000 --- a/include/wx/qt/notebook.h +++ /dev/null @@ -1,202 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: notebook.h -// Purpose: MSW/GTK compatible notebook (a.k.a. property sheet) -// Author: AUTHOR -// Modified by: -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_NOTEBOOK_H_ -#define _WX_NOTEBOOK_H_ - -#ifdef __GNUG__ -#pragma interface "notebook.h" -#endif - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- -#include - -// ---------------------------------------------------------------------------- -// types -// ---------------------------------------------------------------------------- - -// fwd declarations -class WXDLLEXPORT wxImageList; -class WXDLLEXPORT wxWindow; - -// array of notebook pages -typedef wxWindow wxNotebookPage; // so far, any window can be a page -WX_DEFINE_ARRAY(wxNotebookPage *, wxArrayPages); - -// ---------------------------------------------------------------------------- -// notebook events -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxNotebookEvent : public wxCommandEvent -{ -public: - wxNotebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0, - int nSel = -1, int nOldSel = -1) - : wxCommandEvent(commandType, id) { m_nSel = nSel; m_nOldSel = nOldSel; } - - // accessors - int GetSelection() const { return m_nSel; } - int GetOldSelection() const { return m_nOldSel; } - -private: - int m_nSel, // currently selected page - m_nOldSel; // previously selected page - - DECLARE_DYNAMIC_CLASS(wxNotebookEvent) -}; - -// ---------------------------------------------------------------------------- -// wxNotebook -// ---------------------------------------------------------------------------- - -// @@@ this class should really derive from wxTabCtrl, but the interface is not -// exactly the same, so I can't do it right now and instead we reimplement -// part of wxTabCtrl here -class wxNotebook : public wxControl -{ -public: - // ctors - // ----- - // default for dynamic class - wxNotebook(); - // the same arguments as for wxControl (@@@ any special styles?) - wxNotebook(wxWindow *parent, - wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = "notebook"); - // Create() function - bool Create(wxWindow *parent, - wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = "notebook"); - // dtor - ~wxNotebook(); - - // accessors - // --------- - // get number of pages in the dialog - int GetPageCount() const; - - // set the currently selected page, return the index of the previously - // selected one (or -1 on error) - // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events - int SetSelection(int nPage); - // cycle thru the tabs - void AdvanceSelection(bool bForward = TRUE); - // get the currently selected page - int GetSelection() const { return m_nSelection; } - - // set/get the title of a page - bool SetPageText(int nPage, const wxString& strText); - wxString GetPageText(int nPage) const; - - // image list stuff: each page may have an image associated with it. All - // the images belong to an image list, so you have to - // 1) create an image list - // 2) associate it with the notebook - // 3) set for each page it's image - // associate image list with a control - void SetImageList(wxImageList* imageList); - // get pointer (may be NULL) to the associated image list - wxImageList* GetImageList() const { return m_pImageList; } - - // sets/returns item's image index in the current image list - int GetPageImage(int nPage) const; - bool SetPageImage(int nPage, int nImage); - - // currently it's always 1 because wxGTK doesn't support multi-row - // tab controls - int GetRowCount() const; - - // control the appearance of the notebook pages - // set the size (the same for all pages) - void SetPageSize(const wxSize& size); - // set the padding between tabs (in pixels) - void SetPadding(const wxSize& padding); - - // operations - // ---------- - // remove one page from the notebook - bool DeletePage(int nPage); - // remove all pages - bool DeleteAllPages(); - // adds a new page to the notebook (it will be deleted ny the notebook, - // don't delete it yourself). If bSelect, this page becomes active. - bool AddPage(wxNotebookPage *pPage, - const wxString& strText, - bool bSelect = FALSE, - int imageId = -1); - // the same as AddPage(), but adds it at the specified position - bool InsertPage(int nPage, - wxNotebookPage *pPage, - const wxString& strText, - bool bSelect = FALSE, - int imageId = -1); - // get the panel which represents the given page - wxNotebookPage *GetPage(int nPage) { return m_aPages[nPage]; } - - // callbacks - // --------- - void OnSize(wxSizeEvent& event); - void OnSelChange(wxNotebookEvent& event); - void OnSetFocus(wxFocusEvent& event); - void OnNavigationKey(wxNavigationKeyEvent& event); - - // base class virtuals - // ------------------- - virtual void Command(wxCommandEvent& event); - virtual void SetConstraintSizes(bool recurse = TRUE); - virtual bool DoPhase(int nPhase); - -protected: - // common part of all ctors - void Init(); - - // helper functions - void ChangePage(int nOldSel, int nSel); // change pages - - wxImageList *m_pImageList; // we can have an associated image list - wxArrayPages m_aPages; // array of pages - - int m_nSelection; // the current selection (-1 if none) - - DECLARE_DYNAMIC_CLASS(wxNotebook) - DECLARE_EVENT_TABLE() -}; - -// ---------------------------------------------------------------------------- -// event macros -// ---------------------------------------------------------------------------- -typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&); - -#define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \ - { \ - wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, \ - id, \ - -1, \ - (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \ - NULL \ - }, - -#define EVT_NOTEBOOK_PAGE_CHANGING(id, fn) \ - { \ - wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, \ \ - id, \ - -1, \ - (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \ - NULL \ - }, - -#endif // _WX_NOTEBOOK_H_ diff --git a/include/wx/qt/palette.h b/include/wx/qt/palette.h deleted file mode 100644 index a5c85bb1d0..0000000000 --- a/include/wx/qt/palette.h +++ /dev/null @@ -1,66 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: palette.h -// Purpose: wxPalette class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_PALETTE_H_ -#define _WX_PALETTE_H_ - -#ifdef __GNUG__ -#pragma interface "palette.h" -#endif - -#include "wx/gdiobj.h" - -class WXDLLEXPORT wxPalette; - -class WXDLLEXPORT wxPaletteRefData: public wxGDIRefData -{ - friend class WXDLLEXPORT wxPalette; -public: - wxPaletteRefData(); - ~wxPaletteRefData(); -/* TODO: implementation -protected: - WXHPALETTE m_hPalette; -*/ -}; - -#define M_PALETTEDATA ((wxPaletteRefData *)m_refData) - -class WXDLLEXPORT wxPalette: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxPalette) - -public: - wxPalette(); - inline wxPalette(const wxPalette& palette) { Ref(palette); } - inline wxPalette(const wxPalette* palette) { UnRef(); if (palette) Ref(*palette); } - - wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); - ~wxPalette(); - bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); - int GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const; - bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const; - - virtual bool Ok() const { return (m_refData != NULL) ; } - - inline wxPalette& operator = (const wxPalette& palette) { if (*this == palette) return (*this); Ref(palette); return *this; } - inline bool operator == (const wxPalette& palette) { return m_refData == palette.m_refData; } - inline bool operator != (const wxPalette& palette) { return m_refData != palette.m_refData; } - - virtual bool FreeResource(bool force = FALSE); -/* TODO: implementation - inline WXHPALETTE GetHPALETTE() const { return (M_PALETTEDATA ? M_PALETTEDATA->m_hPalette : 0); } - void SetHPALETTE(WXHPALETTE pal); -*/ -}; - -#endif - // _WX_PALETTE_H_ diff --git a/include/wx/qt/pen.h b/include/wx/qt/pen.h deleted file mode 100644 index 0e23c99daf..0000000000 --- a/include/wx/qt/pen.h +++ /dev/null @@ -1,102 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: pen.h -// Purpose: wxPen class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_PEN_H_ -#define _WX_PEN_H_ - -#ifdef __GNUG__ -#pragma interface "pen.h" -#endif - -#include "wx/gdiobj.h" - -typedef WXDWORD wxDash ; - -class WXDLLEXPORT wxPen; - -class WXDLLEXPORT wxPenRefData: public wxGDIRefData -{ - friend class WXDLLEXPORT wxPen; -public: - wxPenRefData(); - wxPenRefData(const wxPenRefData& data); - ~wxPenRefData(); - -protected: - int m_width; - int m_style; - int m_join ; - int m_cap ; - wxBitmap m_stipple ; - int m_nbDash ; - wxDash * m_dash ; - wxColour m_colour; -/* TODO: implementation - WXHPEN m_hPen; -*/ -}; - -#define M_PENDATA ((wxPenRefData *)m_refData) - -// Pen -class WXDLLEXPORT wxPen: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxPen) -public: - wxPen(); - wxPen(const wxColour& col, int width, int style); - wxPen(const wxString& col, int width, int style); - wxPen(const wxBitmap& stipple, int width); - inline wxPen(const wxPen& pen) { Ref(pen); } - inline wxPen(const wxPen* pen) { if (pen) Ref(*pen); } - ~wxPen(); - - inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; } - inline bool operator == (const wxPen& pen) { return m_refData == pen.m_refData; } - inline bool operator != (const wxPen& pen) { return m_refData != pen.m_refData; } - - virtual bool Ok() const { return (m_refData != NULL) ; } - - // Override in order to recreate the pen - void SetColour(const wxColour& col) ; - void SetColour(const wxString& col) ; - void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ; - - void SetWidth(int width) ; - void SetStyle(int style) ; - void SetStipple(const wxBitmap& stipple) ; - void SetDashes(int nb_dashes, const wxDash *dash) ; - void SetJoin(int join) ; - void SetCap(int cap) ; - - inline wxColour& GetColour() const { return (M_PENDATA ? M_PENDATA->m_colour : wxNullColour); }; - inline int GetWidth() const { return (M_PENDATA ? M_PENDATA->m_width : 0); }; - inline int GetStyle() const { return (M_PENDATA ? M_PENDATA->m_style : 0); }; - inline int GetJoin() const { return (M_PENDATA ? M_PENDATA->m_join : 0); }; - inline int GetCap() const { return (M_PENDATA ? M_PENDATA->m_cap : 0); }; - inline int GetDashes(wxDash **ptr) const { - *ptr = (M_PENDATA ? M_PENDATA->m_dash : NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 0); - } - - inline wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : NULL); }; - -// Implementation - - // Useful helper: create the brush resource - void RealizeResource(); - - // When setting properties, we must make sure we're not changing - // another object - void Unshare(); -}; - -#endif - // _WX_PEN_H_ diff --git a/include/wx/qt/radiobox.h b/include/wx/qt/radiobox.h deleted file mode 100644 index cb7c5ba405..0000000000 --- a/include/wx/qt/radiobox.h +++ /dev/null @@ -1,88 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: radiobox.h -// Purpose: wxRadioBox class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_RADIOBOX_H_ -#define _WX_RADIOBOX_H_ - -#ifdef __GNUG__ -#pragma interface "radiobox.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxRadioBoxNameStr; - -// List box item -class WXDLLEXPORT wxBitmap ; - -class WXDLLEXPORT wxRadioBox: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxRadioBox) -public: - wxRadioBox(); - - inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - int majorDim = 0, long style = wxRA_HORIZONTAL, - const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr) - { - Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name); - } - - ~wxRadioBox(); - - bool Create(wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - int majorDim = 0, long style = wxRA_HORIZONTAL, - const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); - - int FindString(const wxString& s) const; - void SetSelection(int N); - int GetSelection() const; - wxString GetString(int N) const; - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - void GetSize(int *x, int *y) const; - void GetPosition(int *x, int *y) const; - wxString GetLabel() const; - void SetLabel(const wxString& label); - void SetLabel(int item, const wxString& label) ; - wxString GetLabel(int item) const; - bool Show(bool show); - void SetFocus(); - void Enable(bool enable); - void Enable(int item, bool enable); - void Show(int item, bool show) ; - inline void SetLabelFont(const wxFont& WXUNUSED(font)) {}; - inline void SetButtonFont(const wxFont& font) { SetFont(font); } - - virtual wxString GetStringSelection() const; - virtual bool SetStringSelection(const wxString& s); - inline virtual int Number() const { return m_noItems; } ; - void Command(wxCommandEvent& event); - - inline int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; } - inline void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; } - -protected: -/* TODO: implementation - WXHWND * m_radioButtons; -*/ - int m_majorDim ; - int m_noItems; - int m_noRowsOrCols; - int m_selectedButton; - -}; - -#endif - // _WX_RADIOBOX_H_ diff --git a/include/wx/qt/radiobut.h b/include/wx/qt/radiobut.h deleted file mode 100644 index 7a4ce62d50..0000000000 --- a/include/wx/qt/radiobut.h +++ /dev/null @@ -1,92 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: radiobut.h -// Purpose: wxRadioButton class -// Author: AUTHOR -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_RADIOBUT_H_ -#define _WX_RADIOBUT_H_ - -#ifdef __GNUG__ -#pragma interface "radiobut.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxRadioButtonNameStr; - -class WXDLLEXPORT wxRadioButton: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxRadioButton) - protected: - public: - inline wxRadioButton() {} - inline wxRadioButton(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr); - - virtual void SetLabel(const wxString& label); - virtual void SetValue(bool val); - virtual bool GetValue() const ; - - void Command(wxCommandEvent& event); - virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam); -}; - -// Not implemented -#if 0 -class WXDLLEXPORT wxBitmap ; - -WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr; - -class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton -{ - DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton) - protected: - wxBitmap *theButtonBitmap; - public: - inline wxBitmapRadioButton() { theButtonBitmap = NULL; } - inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id, - const wxBitmap *label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxBitmapRadioButtonNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxBitmap *label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxBitmapRadioButtonNameStr); - - virtual void SetLabel(const wxBitmap *label); - virtual void SetValue(bool val) ; - virtual bool GetValue() const ; -}; -#endif - -#endif - // _WX_RADIOBUT_H_ diff --git a/include/wx/qt/region.h b/include/wx/qt/region.h deleted file mode 100644 index 02bf97845f..0000000000 --- a/include/wx/qt/region.h +++ /dev/null @@ -1,140 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: region.h -// Purpose: wxRegion class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_REGION_H_ -#define _WX_REGION_H_ - -#ifdef __GNUG__ -#pragma interface "region.h" -#endif - -#include "wx/list.h" -#include "wx/gdiobj.h" - -class WXDLLEXPORT wxRect; -class WXDLLEXPORT wxPoint; - -enum wxRegionContain { - wxOutRegion = 0, wxPartRegion = 1, wxInRegion = 2 -}; - -// So far, for internal use only -enum wxRegionOp { -wxRGN_AND, // Creates the intersection of the two combined regions. -wxRGN_COPY, // Creates a copy of the region identified by hrgnSrc1. -wxRGN_DIFF, // Combines the parts of hrgnSrc1 that are not part of hrgnSrc2. -wxRGN_OR, // Creates the union of two combined regions. -wxRGN_XOR // Creates the union of two combined regions except for any overlapping areas. -}; - -class WXDLLEXPORT wxRegion : public wxGDIObject { -DECLARE_DYNAMIC_CLASS(wxRegion); - friend class WXDLLEXPORT wxRegionIterator; -public: - wxRegion(long x, long y, long w, long h); - wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight); - wxRegion(const wxRect& rect); - -/* TODO: implementation - wxRegion(WXHRGN hRegion); // Hangs on to this region -*/ - - wxRegion(); - ~wxRegion(); - - //# Copying - inline wxRegion(const wxRegion& r) - { Ref(r); } - inline wxRegion& operator = (const wxRegion& r) - { Ref(r); return (*this); } - - //# Modify region - // Clear current region - void Clear(); - - // Union rectangle or region with this. - inline bool Union(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_OR); } - inline bool Union(const wxRect& rect) { return Combine(rect, wxRGN_OR); } - inline bool Union(const wxRegion& region) { return Combine(region, wxRGN_OR); } - - // Intersect rectangle or region with this. - inline bool Intersect(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_AND); } - inline bool Intersect(const wxRect& rect) { return Combine(rect, wxRGN_AND); } - inline bool Intersect(const wxRegion& region) { return Combine(region, wxRGN_AND); } - - // Subtract rectangle or region from this: - // Combines the parts of 'this' that are not part of the second region. - inline bool Subtract(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_DIFF); } - inline bool Subtract(const wxRect& rect) { return Combine(rect, wxRGN_DIFF); } - inline bool Subtract(const wxRegion& region) { return Combine(region, wxRGN_DIFF); } - - // XOR: the union of two combined regions except for any overlapping areas. - inline bool Xor(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_XOR); } - inline bool Xor(const wxRect& rect) { return Combine(rect, wxRGN_XOR); } - inline bool Xor(const wxRegion& region) { return Combine(region, wxRGN_XOR); } - - //# Information on region - // Outer bounds of region - void GetBox(long& x, long& y, long&w, long &h) const; - wxRect GetBox() const ; - - // Is region empty? - bool Empty() const; - inline bool IsEmpty() const { return Empty(); } - - //# Tests - // Does the region contain the point (x,y)? - wxRegionContain Contains(long x, long y) const; - // Does the region contain the point pt? - wxRegionContain Contains(const wxPoint& pt) const; - // Does the region contain the rectangle (x, y, w, h)? - wxRegionContain Contains(long x, long y, long w, long h) const; - // Does the region contain the rectangle rect? - wxRegionContain Contains(const wxRect& rect) const; - -// Internal - bool Combine(long x, long y, long width, long height, wxRegionOp op); - bool Combine(const wxRegion& region, wxRegionOp op); - bool Combine(const wxRect& rect, wxRegionOp op); -}; - -class WXDLLEXPORT wxRegionIterator : public wxObject { -DECLARE_DYNAMIC_CLASS(wxRegionIterator); -public: - wxRegionIterator(); - wxRegionIterator(const wxRegion& region); - ~wxRegionIterator(); - - void Reset() { m_current = 0; } - void Reset(const wxRegion& region); - - operator bool () const { return m_current < m_numRects; } - bool HaveRects() const { return m_current < m_numRects; } - - void operator ++ (); - void operator ++ (int); - - long GetX() const; - long GetY() const; - long GetW() const; - long GetWidth() const { return GetW(); } - long GetH() const; - long GetHeight() const { return GetH(); } - -private: - long m_current; - long m_numRects; - wxRegion m_region; - wxRect* m_rects; -}; - -#endif - // _WX_REGION_H_ diff --git a/include/wx/qt/scrolbar.h b/include/wx/qt/scrolbar.h deleted file mode 100644 index eeef6727c5..0000000000 --- a/include/wx/qt/scrolbar.h +++ /dev/null @@ -1,68 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: scrollbar.h -// Purpose: wxScrollBar class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_SCROLBAR_H_ -#define _WX_SCROLBAR_H_ - -#ifdef __GNUG__ -#pragma interface "scrolbar.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxScrollBarNameStr; - -// Scrollbar item -class WXDLLEXPORT wxScrollBar: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxScrollBar) - -public: - inline wxScrollBar() { m_pageSize = 0; m_viewSize = 0; m_objectSize = 0; } - ~wxScrollBar(); - - inline wxScrollBar(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSB_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr) - { - Create(parent, id, pos, size, style, validator, name); - } - bool Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSB_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr); - - int GetPosition() const ; - inline int GetThumbSize() const { return m_pageSize; } - inline int GetPageSize() const { return m_viewSize; } - inline int GetRange() const { return m_objectSize; } - - virtual void SetPosition(int viewStart); - virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize, - bool refresh = TRUE); - - void Command(wxCommandEvent& event); - -protected: - int m_pageSize; - int m_viewSize; - int m_objectSize; - -DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_SCROLBAR_H_ diff --git a/include/wx/qt/settings.h b/include/wx/qt/settings.h deleted file mode 100644 index 7cd3cbe19e..0000000000 --- a/include/wx/qt/settings.h +++ /dev/null @@ -1,129 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: settings.h -// Purpose: wxSystemSettings class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_SETTINGS_H_ -#define _WX_SETTINGS_H_ - -#ifdef __GNUG__ -#pragma interface "settings.h" -#endif - -#include "wx/setup.h" - -#define wxSYS_WHITE_BRUSH 0 -#define wxSYS_LTGRAY_BRUSH 1 -#define wxSYS_GRAY_BRUSH 2 -#define wxSYS_DKGRAY_BRUSH 3 -#define wxSYS_BLACK_BRUSH 4 -#define wxSYS_NULL_BRUSH 5 -#define wxSYS_HOLLOW_BRUSH wxSYS_NULL_BRUSH -#define wxSYS_WHITE_PEN 6 -#define wxSYS_BLACK_PEN 7 -#define wxSYS_NULL_PEN 8 -#define wxSYS_OEM_FIXED_FONT 10 -#define wxSYS_ANSI_FIXED_FONT 11 -#define wxSYS_ANSI_VAR_FONT 12 -#define wxSYS_SYSTEM_FONT 13 -#define wxSYS_DEVICE_DEFAULT_FONT 14 -#define wxSYS_DEFAULT_PALETTE 15 -#define wxSYS_SYSTEM_FIXED_FONT 16 // Obsolete -#define wxSYS_DEFAULT_GUI_FONT 17 - -#define wxSYS_COLOUR_SCROLLBAR 0 -#define wxSYS_COLOUR_BACKGROUND 1 -#define wxSYS_COLOUR_ACTIVECAPTION 2 -#define wxSYS_COLOUR_INACTIVECAPTION 3 -#define wxSYS_COLOUR_MENU 4 -#define wxSYS_COLOUR_WINDOW 5 -#define wxSYS_COLOUR_WINDOWFRAME 6 -#define wxSYS_COLOUR_MENUTEXT 7 -#define wxSYS_COLOUR_WINDOWTEXT 8 -#define wxSYS_COLOUR_CAPTIONTEXT 9 -#define wxSYS_COLOUR_ACTIVEBORDER 10 -#define wxSYS_COLOUR_INACTIVEBORDER 11 -#define wxSYS_COLOUR_APPWORKSPACE 12 -#define wxSYS_COLOUR_HIGHLIGHT 13 -#define wxSYS_COLOUR_HIGHLIGHTTEXT 14 -#define wxSYS_COLOUR_BTNFACE 15 -#define wxSYS_COLOUR_BTNSHADOW 16 -#define wxSYS_COLOUR_GRAYTEXT 17 -#define wxSYS_COLOUR_BTNTEXT 18 -#define wxSYS_COLOUR_INACTIVECAPTIONTEXT 19 -#define wxSYS_COLOUR_BTNHIGHLIGHT 20 - -#define wxSYS_COLOUR_3DDKSHADOW 21 -#define wxSYS_COLOUR_3DLIGHT 22 -#define wxSYS_COLOUR_INFOTEXT 23 -#define wxSYS_COLOUR_INFOBK 24 - -#define wxSYS_COLOUR_DESKTOP wxSYS_COLOUR_BACKGROUND -#define wxSYS_COLOUR_3DFACE wxSYS_COLOUR_BTNFACE -#define wxSYS_COLOUR_3DSHADOW wxSYS_COLOUR_BTNSHADOW -#define wxSYS_COLOUR_3DHIGHLIGHT wxSYS_COLOUR_BTNHIGHLIGHT -#define wxSYS_COLOUR_3DHILIGHT wxSYS_COLOUR_BTNHIGHLIGHT -#define wxSYS_COLOUR_BTNHILIGHT wxSYS_COLOUR_BTNHIGHLIGHT - -// Metrics -#define wxSYS_MOUSE_BUTTONS 1 -#define wxSYS_BORDER_X 2 -#define wxSYS_BORDER_Y 3 -#define wxSYS_CURSOR_X 4 -#define wxSYS_CURSOR_Y 5 -#define wxSYS_DCLICK_X 6 -#define wxSYS_DCLICK_Y 7 -#define wxSYS_DRAG_X 8 -#define wxSYS_DRAG_Y 9 -#define wxSYS_EDGE_X 10 -#define wxSYS_EDGE_Y 11 -#define wxSYS_HSCROLL_ARROW_X 12 -#define wxSYS_HSCROLL_ARROW_Y 13 -#define wxSYS_HTHUMB_X 14 -#define wxSYS_ICON_X 15 -#define wxSYS_ICON_Y 16 -#define wxSYS_ICONSPACING_X 17 -#define wxSYS_ICONSPACING_Y 18 -#define wxSYS_WINDOWMIN_X 19 -#define wxSYS_WINDOWMIN_Y 20 -#define wxSYS_SCREEN_X 21 -#define wxSYS_SCREEN_Y 22 -#define wxSYS_FRAMESIZE_X 23 -#define wxSYS_FRAMESIZE_Y 24 -#define wxSYS_SMALLICON_X 25 -#define wxSYS_SMALLICON_Y 26 -#define wxSYS_HSCROLL_Y 27 -#define wxSYS_VSCROLL_X 28 -#define wxSYS_VSCROLL_ARROW_X 29 -#define wxSYS_VSCROLL_ARROW_Y 30 -#define wxSYS_VTHUMB_Y 31 -#define wxSYS_CAPTION_Y 32 -#define wxSYS_MENU_Y 33 -#define wxSYS_NETWORK_PRESENT 34 -#define wxSYS_PENWINDOWS_PRESENT 35 -#define wxSYS_SHOW_SOUNDS 36 -#define wxSYS_SWAP_BUTTONS 37 - -class WXDLLEXPORT wxSystemSettings: public wxObject -{ -public: - inline wxSystemSettings() {} - - // Get a system colour - static wxColour GetSystemColour(int index); - - // Get a system font - static wxFont GetSystemFont(int index); - - // Get a system metric, e.g. scrollbar size - static int GetSystemMetric(int index); -}; - -#endif - // _WX_SETTINGS_H_ diff --git a/include/wx/qt/slider.h b/include/wx/qt/slider.h deleted file mode 100644 index 239e914e5c..0000000000 --- a/include/wx/qt/slider.h +++ /dev/null @@ -1,91 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: slider.h -// Purpose: wxSlider class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_SLIDER_H_ -#define _WX_SLIDER_H_ - -#ifdef __GNUG__ -#pragma interface "slider.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr; - -// Slider -class WXDLLEXPORT wxSlider: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxSlider) - -public: - wxSlider(); - - inline wxSlider(wxWindow *parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSL_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr) - { - Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name); - } - - ~wxSlider(); - - bool Create(wxWindow *parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSL_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr); - - virtual int GetValue() const ; - virtual void SetValue(int); - void GetSize(int *x, int *y) const ; - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - void GetPosition(int *x, int *y) const ; - bool Show(bool show); - - void SetRange(int minValue, int maxValue); - - inline int GetMin() const { return m_rangeMin; } - inline int GetMax() const { return m_rangeMax; } - - // For trackbars only - void SetTickFreq(int n, int pos); - inline int GetTickFreq() const { return m_tickFreq; } - void SetPageSize(int pageSize); - int GetPageSize() const ; - void ClearSel() ; - void ClearTicks() ; - void SetLineSize(int lineSize); - int GetLineSize() const ; - int GetSelEnd() const ; - int GetSelStart() const ; - void SetSelection(int minPos, int maxPos); - void SetThumbLength(int len) ; - int GetThumbLength() const ; - void SetTick(int tickPos) ; - - void Command(wxCommandEvent& event); - protected: - int m_rangeMin; - int m_rangeMax; - int m_pageSize; - int m_lineSize; - int m_tickFreq; -DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_SLIDER_H_ diff --git a/include/wx/qt/statbmp.h b/include/wx/qt/statbmp.h deleted file mode 100644 index f371fddd2d..0000000000 --- a/include/wx/qt/statbmp.h +++ /dev/null @@ -1,64 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: statbmp.h -// Purpose: wxStaticBitmap class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_STATBMP_H_ -#define _WX_STATBMP_H_ - -#ifdef __GNUG__ -#pragma interface "statbmp.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxStaticBitmapNameStr; - -class WXDLLEXPORT wxStaticBitmap: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxStaticBitmap) - public: - inline wxStaticBitmap() { } - - inline wxStaticBitmap(wxWindow *parent, wxWindowID id, - const wxBitmap& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxStaticBitmapNameStr) - { - Create(parent, id, label, pos, size, style, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxBitmap& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxStaticBitmapNameStr); - - virtual void SetBitmap(const wxBitmap& bitmap); - - virtual void Command(wxCommandEvent& WXUNUSED(event)) {}; - virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {}; - - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - - inline wxBitmap& GetBitmap() const { return (wxBitmap&) m_messageBitmap; } - - // overriden base class virtuals - virtual bool AcceptsFocus() const { return FALSE; } - - protected: - wxBitmap m_messageBitmap; - -}; - -#endif - // _WX_STATBMP_H_ diff --git a/include/wx/qt/statbox.h b/include/wx/qt/statbox.h deleted file mode 100644 index 1aa4a6f88a..0000000000 --- a/include/wx/qt/statbox.h +++ /dev/null @@ -1,57 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: statbox.h -// Purpose: wxStaticBox class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_STATBOX_H_ -#define _WX_STATBOX_H_ - -#ifdef __GNUG__ -#pragma interface "statbox.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxStaticBoxNameStr; - -// Group box -class WXDLLEXPORT wxStaticBox: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxStaticBox) - - public: - inline wxStaticBox() {} - inline wxStaticBox(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxStaticBoxNameStr) - { - Create(parent, id, label, pos, size, style, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxStaticBoxNameStr); - - virtual void Command(wxCommandEvent& WXUNUSED(event)) {}; - virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {}; - - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - void SetLabel(const wxString& label); - -DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_STATBOX_H_ diff --git a/include/wx/qt/stattext.h b/include/wx/qt/stattext.h deleted file mode 100644 index aa8eaf229e..0000000000 --- a/include/wx/qt/stattext.h +++ /dev/null @@ -1,56 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: stattext.h -// Purpose: wxStaticText class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_STATTEXT_H_ -#define _WX_STATTEXT_H_ - -#ifdef __GNUG__ -#pragma interface "stattext.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxStaticTextNameStr; - -class WXDLLEXPORT wxStaticText: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxStaticText) - public: - inline wxStaticText() { } - - inline wxStaticText(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxStaticTextNameStr) - { - Create(parent, id, label, pos, size, style, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxStaticTextNameStr); - - // accessors - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - void SetLabel(const wxString&); - - // operations - virtual void Command(wxCommandEvent& WXUNUSED(event)) {}; - virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {}; -}; - -#endif - // _WX_STATTEXT_H_ diff --git a/include/wx/qt/tbargtk.h b/include/wx/qt/tbargtk.h deleted file mode 100644 index f6a3636927..0000000000 --- a/include/wx/qt/tbargtk.h +++ /dev/null @@ -1,139 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tbargtk.h -// Purpose: GTK toolbar -// Author: Robert Roebling -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Robert Roebling -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __TBARGTKH__ -#define __TBARGTKH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxToolBarTool; -class wxToolBar; - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -#define wxTOOL_STYLE_BUTTON 1 -#define wxTOOL_STYLE_SEPARATOR 2 - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -extern const char *wxToolBarNameStr; - -//----------------------------------------------------------------------------- -// wxToolBarTool -//----------------------------------------------------------------------------- - -class wxToolBarTool: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxToolBarTool) - - public: - - wxToolBarTool(void) {}; - wxToolBarTool( wxToolBar *owner, int theIndex = 0, - const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap, - bool toggle = FALSE, wxObject *clientData = NULL, - const wxString& shortHelpString = "", const wxString& longHelpString = ""); - ~wxToolBarTool(void); - - public: - - int m_toolStyle; - wxObject *m_clientData; - int m_index; - bool m_toggleState; - bool m_isToggle; - bool m_deleteSecondBitmap; - bool m_enabled; - wxBitmap m_bitmap1; - wxBitmap m_bitmap2; - bool m_isMenuCommand; - wxString m_shortHelpString; - wxString m_longHelpString; - wxToolBar *m_owner; -}; - -//----------------------------------------------------------------------------- -// wxToolBar -//----------------------------------------------------------------------------- - -class wxToolBar: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxToolBar) - - public: - - wxToolBar(void); - wxToolBar( wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = wxToolBarNameStr ); - ~wxToolBar(void); - - bool Create( wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = wxToolBarNameStr); - - // Only allow toggle if returns TRUE. Call when left button up. - virtual bool OnLeftClick(int toolIndex, bool toggleDown); - - // Call when right button down. - virtual void OnRightClick(int toolIndex, float x, float y); - - // Called when the mouse cursor enters a tool bitmap. - // Argument is -1 if mouse is exiting the toolbar. - virtual void OnMouseEnter(int toolIndex); - - // If pushedBitmap is NULL, a reversed version of bitmap is - // created and used as the pushed/toggled image. - // If toggle is TRUE, the button toggles between the two states. - virtual wxToolBarTool *AddTool( int toolIndex, const wxBitmap& bitmap, - const wxBitmap& pushedBitmap = wxNullBitmap, bool toggle = FALSE, - float xPos = -1, float yPos = -1, wxObject *clientData = NULL, - const wxString& helpString1 = "", const wxString& helpString2 = ""); - virtual void AddSeparator(void); - virtual void ClearTools(void); - - virtual void Realize(void); - - virtual void EnableTool(int toolIndex, bool enable); - virtual void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on - virtual wxObject *GetToolClientData(int index) const; - - virtual bool GetToolState(int toolIndex) const; - virtual bool GetToolEnabled(int toolIndex) const; - - virtual void SetMargins(int x, int y); - void SetMargins(const wxSize& size) { SetMargins(size.x, size.y); }; - virtual void SetToolPacking(int packing); - virtual void SetToolSeparation(int separation); - - public: - - wxList m_tools; - - DECLARE_EVENT_TABLE() -}; - -#endif - // __TBARGTKH__ - diff --git a/include/wx/qt/textctrl.h b/include/wx/qt/textctrl.h deleted file mode 100644 index 7c3d7b1ac2..0000000000 --- a/include/wx/qt/textctrl.h +++ /dev/null @@ -1,139 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: textctrl.h -// Purpose: wxTextCtrl class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_TEXTCTRL_H_ -#define _WX_TEXTCTRL_H_ - -#ifdef __GNUG__ -#pragma interface "textctrl.h" -#endif - -#include "wx/control.h" - -#if USE_IOSTREAMH -#include -#else -#include -#endif - -WXDLLEXPORT_DATA(extern const char*) wxTextCtrlNameStr; -WXDLLEXPORT_DATA(extern const char*) wxEmptyString; - -// Single-line text item -class WXDLLEXPORT wxTextCtrl: public wxControl - -// TODO Some platforms/compilers don't like inheritance from streambuf. - -#if (defined(__BORLANDC__) && !defined(__WIN32__)) || defined(__MWERKS__) -#define NO_TEXT_WINDOW_STREAM -#endif - -#ifndef NO_TEXT_WINDOW_STREAM -, public streambuf -#endif - -{ - DECLARE_DYNAMIC_CLASS(wxTextCtrl) - -public: - // creation - // -------- - wxTextCtrl(); - inline wxTextCtrl(wxWindow *parent, wxWindowID id, - const wxString& value = wxEmptyString, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxTextCtrlNameStr) -#ifndef NO_TEXT_WINDOW_STREAM - :streambuf() -#endif - { - Create(parent, id, value, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxString& value = wxEmptyString, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxTextCtrlNameStr); - - // accessors - // --------- - virtual wxString GetValue() const ; - virtual void SetValue(const wxString& value); - - virtual int GetLineLength(long lineNo) const; - virtual wxString GetLineText(long lineNo) const; - virtual int GetNumberOfLines() const; - - // operations - // ---------- - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - - // Clipboard operations - virtual void Copy(); - virtual void Cut(); - virtual void Paste(); - - virtual void SetInsertionPoint(long pos); - virtual void SetInsertionPointEnd(); - virtual long GetInsertionPoint() const ; - virtual long GetLastPosition() const ; - virtual void Replace(long from, long to, const wxString& value); - virtual void Remove(long from, long to); - virtual void SetSelection(long from, long to); - virtual void SetEditable(bool editable); - - // streambuf implementation -#ifndef NO_TEXT_WINDOW_STREAM - int overflow(int i); - int sync(); - int underflow(); -#endif - - wxTextCtrl& operator<<(const wxString& s); - wxTextCtrl& operator<<(int i); - wxTextCtrl& operator<<(long i); - wxTextCtrl& operator<<(float f); - wxTextCtrl& operator<<(double d); - wxTextCtrl& operator<<(const char c); - - virtual bool LoadFile(const wxString& file); - virtual bool SaveFile(const wxString& file); - virtual void WriteText(const wxString& text); - virtual void DiscardEdits(); - virtual bool IsModified() const; - - virtual long XYToPosition(long x, long y) const ; - virtual void PositionToXY(long pos, long *x, long *y) const ; - virtual void ShowPosition(long pos); - virtual void Clear(); - - // callbacks - // --------- - void OnDropFiles(wxDropFilesEvent& event); - void OnChar(wxKeyEvent& event); // Process 'enter' if required - void OnEraseBackground(wxEraseEvent& event); - - // Implementation - // -------------- - virtual void Command(wxCommandEvent& event); - -protected: - wxString m_fileName; - - DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_TEXTCTRL_H_ diff --git a/include/wx/qt/timer.h b/include/wx/qt/timer.h deleted file mode 100644 index 22fa2eed59..0000000000 --- a/include/wx/qt/timer.h +++ /dev/null @@ -1,57 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: timer.h -// Purpose: wxTimer class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_TIMER_H_ -#define _WX_TIMER_H_ - -#ifdef __GNUG__ -#pragma interface "timer.h" -#endif - -#include "wx/object.h" - -class WXDLLEXPORT wxTimer: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxTimer) - - public: - wxTimer(); - ~wxTimer(); - virtual bool Start(int milliseconds = -1,bool one_shot = FALSE); // Start timer - virtual void Stop(); // Stop timer - virtual void Notify() = 0; // Override this member - inline int Interval() { return m_milli ; }; // Returns the current interval time (0 if stop) - -protected: - bool m_oneShot ; - int m_milli ; - int m_lastMilli ; - long m_id; - -}; - -/* Note: these are implemented in common/timercmn.cpp, so need to implement them separately. - * But you may need to modify timercmn.cpp. - */ - -// Timer functions (milliseconds) -void WXDLLEXPORT wxStartTimer(); -// Gets time since last wxStartTimer or wxGetElapsedTime -long WXDLLEXPORT wxGetElapsedTime(bool resetTimer = TRUE); - -// EXPERIMENTAL: comment this out if it doesn't compile. -bool WXDLLEXPORT wxGetLocalTime(long *timeZone, int *dstObserved); - -// Get number of seconds since 00:00:00 GMT, Jan 1st 1970. -long WXDLLEXPORT wxGetCurrentTime(); - -#endif - // _WX_TIMER_H_ diff --git a/include/wx/qt/window.h b/include/wx/qt/window.h deleted file mode 100644 index c024635909..0000000000 --- a/include/wx/qt/window.h +++ /dev/null @@ -1,547 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: window.h -// Purpose: wxWindow class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_WINDOW_H_ -#define _WX_WINDOW_H_ - -#ifdef __GNUG__ -#pragma interface "window.h" -#endif - -#include "wx/gdicmn.h" -#include "wx/icon.h" -#include "wx/cursor.h" -#include "wx/pen.h" -#include "wx/font.h" -#include "wx/validate.h" -#include "wx/event.h" -#include "wx/string.h" -#include "wx/list.h" -#include "wx/region.h" - -#define wxKEY_SHIFT 1 -#define wxKEY_CTRL 2 - -/* - * Base class for frame, panel, canvas, panel items, dialog box. - * - */ - -/* - * Event handler: windows have themselves as their event handlers - * by default, but their event handlers could be set to another - * object entirely. This separation can reduce the amount of - * derivation required, and allow alteration of a window's functionality - * (e.g. by a resource editor that temporarily switches event handlers). - */ - -class WXDLLEXPORT wxWindow; -class WXDLLEXPORT wxEvent; -class WXDLLEXPORT wxCommandEvent; -class WXDLLEXPORT wxKeyEvent; -class WXDLLEXPORT wxControl; -class WXDLLEXPORT wxCursor; -class WXDLLEXPORT wxColourMap; -class WXDLLEXPORT wxFont; -class WXDLLEXPORT wxMenu; -class WXDLLEXPORT wxRectangle; -class WXDLLEXPORT wxBitmap; -class WXDLLEXPORT wxSizer; -class WXDLLEXPORT wxList; -class WXDLLEXPORT wxLayoutConstraints; -class WXDLLEXPORT wxMouseEvent; -class WXDLLEXPORT wxButton; -class WXDLLEXPORT wxColour; -class WXDLLEXPORT wxBrush; -class WXDLLEXPORT wxPen; -class WXDLLEXPORT wxIcon; -class WXDLLEXPORT wxDC; -class WXDLLEXPORT wxValidator; - -#if USE_DRAG_AND_DROP -class WXDLLEXPORT wxDropTarget; -#endif - -#if USE_WX_RESOURCES -class WXDLLEXPORT wxResourceTable; -class WXDLLEXPORT wxItemResource; -#endif - -WXDLLEXPORT_DATA(extern const char*) wxPanelNameStr; - -WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize; -WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition; - -class WXDLLEXPORT wxWindow: public wxEvtHandler -{ - DECLARE_ABSTRACT_CLASS(wxWindow) - - friend class wxDC; - friend class wxPaintDC; - -public: - wxWindow(); - inline wxWindow(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxPanelNameStr) - { - m_children = new wxList; - Create(parent, id, pos, size, style, name); - } - - virtual ~wxWindow(); - - bool Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxPanelNameStr); - - // Fit the window around the items - virtual void Fit(); - - // Show or hide the window - virtual bool Show(bool show); - - // Is the window shown? - virtual bool IsShown() const; - - // Raise the window to the top of the Z order - virtual void Raise(); - - // Lower the window to the bottom of the Z order - virtual void Lower(); - - // Is the window enabled? - virtual bool IsEnabled() const; - - // For compatibility - inline bool Enabled() const { return IsEnabled(); } - - // Dialog support: override these and call - // base class members to add functionality - // that can't be done using validators. - - // Transfer values to controls. If returns FALSE, - // it's an application error (pops up a dialog) - virtual bool TransferDataToWindow(); - - // Transfer values from controls. If returns FALSE, - // transfer failed: don't quit - virtual bool TransferDataFromWindow(); - - // Validate controls. If returns FALSE, - // validation failed: don't quit - virtual bool Validate(); - - // Return code for dialogs - inline void SetReturnCode(int retCode); - inline int GetReturnCode(); - - // Set the cursor - virtual void SetCursor(const wxCursor& cursor); - inline virtual wxCursor *GetCursor() const { return (wxCursor *)& m_windowCursor; }; - - // Get the window with the focus - static wxWindow *FindFocus(); - - // Get character size - virtual int GetCharHeight() const; - virtual int GetCharWidth() const; - - // Get overall window size - virtual void GetSize(int *width, int *height) const; - - // Get window position, relative to parent (or screen if no parent) - virtual void GetPosition(int *x, int *y) const; - - // Get client (application-useable) size - virtual void GetClientSize(int *width, int *height) const; - - // Set overall size and position - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - inline virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); } - inline virtual void Move(int x, int y) { SetSize(x, y, -1, -1, wxSIZE_USE_EXISTING); } - - // Set client size - virtual void SetClientSize(int width, int size); - - // Convert client to screen coordinates - virtual void ClientToScreen(int *x, int *y) const; - - // Convert screen to client coordinates - virtual void ScreenToClient(int *x, int *y) const; - - // Set the focus to this window - virtual void SetFocus(); - - // Capture/release mouse - virtual void CaptureMouse(); - virtual void ReleaseMouse(); - - // Enable or disable the window - virtual void Enable(bool enable); - -#if USE_DRAG_AND_DROP - // Associate a drop target with this window (if the window already had a drop - // target, it's deleted!) and return the current drop target (may be NULL). - void SetDropTarget(wxDropTarget *pDropTarget); - wxDropTarget *GetDropTarget() const { return m_pDropTarget; } -#endif - - // Accept files for dragging - virtual void DragAcceptFiles(bool accept); - - // Update region access - virtual wxRegion GetUpdateRegion() const; - virtual bool IsExposed(int x, int y, int w, int h) const; - virtual bool IsExposed(const wxPoint& pt) const; - virtual bool IsExposed(const wxRect& rect) const; - - // Set/get the window title - virtual inline void SetTitle(const wxString& WXUNUSED(title)) {}; - inline virtual wxString GetTitle() const { return wxString(""); }; - // Most windows have the concept of a label; for frames, this is the - // title; for items, this is the label or button text. - inline virtual wxString GetLabel() const { return GetTitle(); } - - // Set/get the window name (used for resource setting in X) - inline virtual wxString GetName() const; - inline virtual void SetName(const wxString& name); - - // Centre the window - virtual void Centre(int direction) ; - inline void Center(int direction = wxHORIZONTAL) { Centre(direction); } - - // Popup a menu - virtual bool PopupMenu(wxMenu *menu, int x, int y); - - // Send the window a refresh event - virtual void Refresh(bool eraseBack = TRUE, const wxRectangle *rect = NULL); - - // New functions that will replace the above. - virtual void SetScrollbar(int orient, int pos, int thumbVisible, - int range, bool refresh = TRUE); - - virtual void SetScrollPos(int orient, int pos, bool refresh = TRUE); - virtual int GetScrollPos(int orient) const; - virtual int GetScrollRange(int orient) const; - virtual int GetScrollThumb(int orient) const; - - virtual void ScrollWindow(int dx, int dy, const wxRectangle *rect = NULL); - - // Caret manipulation - virtual void CreateCaret(int w, int h); - virtual void CreateCaret(const wxBitmap *bitmap); - virtual void DestroyCaret(); - virtual void ShowCaret(bool show); - virtual void SetCaretPos(int x, int y); - virtual void GetCaretPos(int *x, int *y) const; - - // Tell window how much it can be sized - virtual void SetSizeHints(int minW = -1, int minH = -1, int maxW = -1, int maxH = -1, int incW = -1, int incH = -1); - - // Set/get the window's identifier - inline int GetId() const; - inline void SetId(int id); - - // Make the window modal (all other windows unresponsive) - virtual void MakeModal(bool modal); - - // Get the private handle (platform-dependent) - inline void *GetHandle() const; - - // Set/get the window's relatives - inline wxWindow *GetParent() const; - inline void SetParent(wxWindow *p) ; - inline wxWindow *GetGrandParent() const; - inline wxList *GetChildren() const; - - // Set/get the window's font - virtual void SetFont(const wxFont& f); - inline virtual wxFont *GetFont() const; - - // Set/get the window's validator - void SetValidator(const wxValidator& validator); - inline wxValidator *GetValidator() const; - - // Set/get the window's style - inline void SetWindowStyleFlag(long flag); - inline long GetWindowStyleFlag() const; - - // Set/get event handler - inline void SetEventHandler(wxEvtHandler *handler); - inline wxEvtHandler *GetEventHandler() const; - - // Push/pop event handler (i.e. allow a chain of event handlers - // be searched) - void PushEventHandler(wxEvtHandler *handler) ; - wxEvtHandler *PopEventHandler(bool deleteHandler = FALSE) ; - - // Close the window by calling OnClose, posting a deletion - virtual bool Close(bool force = FALSE); - - // Destroy the window (delayed, if a managed window) - virtual bool Destroy() ; - - // Mode for telling default OnSize members to - // call Layout(), if not using Sizers, just top-down constraints - inline void SetAutoLayout(bool a); - inline bool GetAutoLayout() const; - - // Set/get constraints - inline wxLayoutConstraints *GetConstraints() const; - void SetConstraints(wxLayoutConstraints *c); - - // Set/get window background colour - inline virtual void SetBackgroundColour(const wxColour& col); - inline virtual wxColour GetBackgroundColour() const; - - // Set/get window foreground colour - inline virtual void SetForegroundColour(const wxColour& col); - inline virtual wxColour GetForegroundColour() const; - - // Set/get window default background colour (for children to inherit). - // NOTE: these may be removed in later revisions. - inline virtual void SetDefaultBackgroundColour(const wxColour& col); - inline virtual wxColour GetDefaultBackgroundColour(void) const; - - // Set/get window default foreground colour (for children to inherit) - inline virtual void SetDefaultForegroundColour(const wxColour& col); - inline virtual wxColour GetDefaultForegroundColour(void) const; - - // Get the default button, if there is one - inline virtual wxButton *GetDefaultItem() const; - inline virtual void SetDefaultItem(wxButton *but); - - // Override to define new behaviour for default action (e.g. double clicking - // on a listbox) - virtual void OnDefaultAction(wxControl *initiatingItem); - - // Resource loading -#if USE_WX_RESOURCES - virtual bool LoadFromResource(wxWindow *parent, const wxString& resourceName, const wxResourceTable *table = NULL); - virtual wxControl *CreateItem(const wxItemResource *childResource, const wxResourceTable *table = NULL); -#endif - - // Native resource loading - virtual bool LoadNativeDialog(wxWindow* parent, wxWindowID& id); - virtual bool LoadNativeDialog(wxWindow* parent, const wxString& name); - virtual wxWindow* GetWindowChild1(wxWindowID& id); - virtual wxWindow* GetWindowChild(wxWindowID& id); - - virtual void GetTextExtent(const wxString& string, int *x, int *y, - int *descent = NULL, - int *externalLeading = NULL, - const wxFont *theFont = NULL, bool use16 = FALSE) const; - - // Is the window retained? - inline bool IsRetained() const; - - // Warp the pointer the given position - virtual void WarpPointer(int x_pos, int y_pos) ; - - // Clear the window - virtual void Clear(); - - // Find a window by id or name - virtual wxWindow *FindWindow(long id); - virtual wxWindow *FindWindow(const wxString& name); - - // Constraint operations - bool Layout(); - void SetSizer(wxSizer *sizer); // Adds sizer child to this window - inline wxSizer *GetSizer() const ; - inline wxWindow *GetSizerParent() const ; - inline void SetSizerParent(wxWindow *win); - - // Do Update UI processing for controls - void UpdateWindowUI(); - - void OnEraseBackground(wxEraseEvent& event); - void OnChar(wxKeyEvent& event); - void OnPaint(wxPaintEvent& event); - void OnIdle(wxIdleEvent& event); - - // Does this window want to accept keyboard focus? - virtual bool AcceptsFocus() const; - -public: - //////////////////////////////////////////////////////////////////////// - //// IMPLEMENTATION - - // For implementation purposes - sometimes decorations make the client area - // smaller - virtual wxPoint GetClientAreaOrigin() const; - - // Makes an adjustment to the window position (for example, a frame that has - // a toolbar that it manages itself). - virtual void AdjustForParentClientOrigin(int& x, int& y, int sizeFlags); - - // Executes the default message - virtual long Default(); - -/* TODO: you may need something like this - // Determine whether 3D effects are wanted - virtual WXDWORD Determine3DEffects(WXDWORD defaultBorderStyle, bool *want3D); -*/ - - virtual void AddChild(wxWindow *child); // Adds reference to the child object - virtual void RemoveChild(wxWindow *child); // Removes reference to child - // (but doesn't delete the child object) - virtual void DestroyChildren(); // Removes and destroys all children - - // Constraint implementation - void UnsetConstraints(wxLayoutConstraints *c); - inline wxList *GetConstraintsInvolvedIn() const ; - // Back-pointer to other windows we're involved with, so if we delete - // this window, we must delete any constraints we're involved with. - void AddConstraintReference(wxWindow *otherWin); - void RemoveConstraintReference(wxWindow *otherWin); - void DeleteRelatedConstraints(); - - virtual void ResetConstraints(); - virtual void SetConstraintSizes(bool recurse = TRUE); - virtual bool LayoutPhase1(int *noChanges); - virtual bool LayoutPhase2(int *noChanges); - virtual bool DoPhase(int); - // Transforms from sizer coordinate space to actual - // parent coordinate space - virtual void TransformSizerToActual(int *x, int *y) const ; - - // Set size with transformation to actual coordinates if nec. - virtual void SizerSetSize(int x, int y, int w, int h); - virtual void SizerMove(int x, int y); - - // Only set/get the size/position of the constraint (if any) - virtual void SetSizeConstraint(int x, int y, int w, int h); - virtual void MoveConstraint(int x, int y); - virtual void GetSizeConstraint(int *w, int *h) const ; - virtual void GetClientSizeConstraint(int *w, int *h) const ; - virtual void GetPositionConstraint(int *x, int *y) const ; - - wxObject *GetChild(int number) const ; - - inline void SetShowing(bool show); - inline bool IsUserEnabled() const; - inline bool GetTransparentBackground() const ; - - // Responds to colour changes: passes event on to children. - void OnSysColourChanged(wxSysColourChangedEvent& event); - - // Transfers data to any child controls - void OnInitDialog(wxInitDialogEvent& event); - - // Sends an OnInitDialog event, which in turns transfers data to - // to the window via validators. - virtual void InitDialog(); - - //////////////////////////////////////////////////////////////////////// - //// PROTECTED DATA -protected: - int m_windowId; - long m_windowStyle; // Store the window's style - wxEvtHandler * m_windowEventHandler; // Usually is 'this' - wxLayoutConstraints * m_constraints; // Constraints for this window - wxList * m_constraintsInvolvedIn; // List of constraints we're involved in - wxSizer * m_windowSizer; // Window's top-level sizer (if any) - wxWindow * m_sizerParent; // Window's parent sizer (if any) - bool m_autoLayout; // Whether to call Layout() in OnSize - wxWindow * m_windowParent; // Each window always knows its parent - wxValidator * m_windowValidator; - int m_minSizeX; - int m_minSizeY; - int m_maxSizeX; - int m_maxSizeY; - - // Caret data - int m_caretWidth; - int m_caretHeight; - bool m_caretEnabled; - bool m_caretShown; - wxFont m_windowFont; // Window's font - wxCursor m_windowCursor; // Window's cursor - wxString m_windowName; // Window name - - wxButton * m_defaultItem; - - wxColour m_backgroundColour ; - wxColour m_foregroundColour ; - wxColour m_defaultBackgroundColour; - wxColour m_defaultForegroundColour; - -#if USE_DRAG_AND_DROP - wxDropTarget *m_pDropTarget; // the current drop target or NULL -#endif //USE_DRAG_AND_DROP - -public: - wxRegion m_updateRegion; - wxList * m_children; // Window's children - int m_returnCode; - -DECLARE_EVENT_TABLE() -}; - -//////////////////////////////////////////////////////////////////////// -//// INLINES - -inline void *wxWindow::GetHandle() const { return (void *)NULL; } -inline int wxWindow::GetId() const { return m_windowId; } -inline void wxWindow::SetId(int id) { m_windowId = id; } -inline wxWindow *wxWindow::GetParent() const { return m_windowParent; } -inline void wxWindow::SetParent(wxWindow *p) { m_windowParent = p; } -inline wxWindow *wxWindow::GetGrandParent() const { return (m_windowParent ? m_windowParent->m_windowParent : NULL); } -inline wxList *wxWindow::GetChildren() const { return m_children; } -inline wxFont *wxWindow::GetFont() const { return (wxFont *) & m_windowFont; } -inline wxString wxWindow::GetName() const { return m_windowName; } -inline void wxWindow::SetName(const wxString& name) { m_windowName = name; } -inline long wxWindow::GetWindowStyleFlag() const { return m_windowStyle; } -inline void wxWindow::SetWindowStyleFlag(long flag) { m_windowStyle = flag; } -inline void wxWindow::SetDoubleClick(bool flag) { m_doubleClickAllowed = flag; } -inline bool wxWindow::GetDoubleClick() const { return m_doubleClickAllowed; } -inline void wxWindow::SetEventHandler(wxEvtHandler *handler) { m_windowEventHandler = handler; } -inline wxEvtHandler *wxWindow::GetEventHandler() const { return m_windowEventHandler; } -inline void wxWindow::SetAutoLayout(bool a) { m_autoLayout = a; } -inline bool wxWindow::GetAutoLayout() const { return m_autoLayout; } -inline wxLayoutConstraints *wxWindow::GetConstraints() const { return m_constraints; } -inline void wxWindow::SetBackgroundColour(const wxColour& col) { m_backgroundColour = col; }; -inline wxColour wxWindow::GetBackgroundColour() const { return m_backgroundColour; }; -inline void wxWindow::SetForegroundColour(const wxColour& col) { m_foregroundColour = col; }; -inline wxColour wxWindow::GetForegroundColour() const { return m_foregroundColour; }; -inline void wxWindow::SetDefaultForegroundColour(const wxColour& col) { m_defaultForegroundColour = col; }; -inline wxColour wxWindow::GetDefaultForegroundColour(void) const { return m_defaultForegroundColour; }; -inline void wxWindow::SetDefaultBackgroundColour(const wxColour& col) { m_defaultBackgroundColour = col; }; -inline wxColour wxWindow::GetDefaultBackgroundColour(void) const { return m_defaultBackgroundColour; }; - -inline wxButton *wxWindow::GetDefaultItem() const { return m_defaultItem; } -inline void wxWindow::SetDefaultItem(wxButton *but) { m_defaultItem = but; } -inline bool wxWindow::IsRetained() const { return ((m_windowStyle & wxRETAINED) == wxRETAINED); } - -inline void wxWindow::SetShowing(bool show) { m_isShown = show; } -inline wxList *wxWindow::GetConstraintsInvolvedIn() const { return m_constraintsInvolvedIn; } -inline wxSizer *wxWindow::GetSizer() const { return m_windowSizer; } -inline wxWindow *wxWindow::GetSizerParent() const { return m_sizerParent; } -inline void wxWindow::SetSizerParent(wxWindow *win) { m_sizerParent = win; } -inline wxValidator *wxWindow::GetValidator() const { return m_windowValidator; } -inline bool wxWindow::IsUserEnabled() const { return m_winEnabled; } -inline bool wxWindow::GetTransparentBackground() const { return m_backgroundTransparent; } -inline void wxWindow::SetReturnCode(int retCode) { m_returnCode = retCode; } -inline int wxWindow::GetReturnCode() { return m_returnCode; } - -// Get the active window. -wxWindow* WXDLLEXPORT wxGetActiveWindow(); - -WXDLLEXPORT_DATA(extern wxList) wxTopLevelWindows; - -#endif - // _WX_WINDOW_H_ diff --git a/include/wx/radiobox.h b/include/wx/radiobox.h deleted file mode 100644 index 2f0253ddb9..0000000000 --- a/include/wx/radiobox.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_RADIOBOX_H_BASE_ -#define _WX_RADIOBOX_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/radiobox.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/radiobox.h" -#elif defined(__WXGTK__) -#include "wx/gtk/radiobox.h" -#elif defined(__WXQT__) -#include "wx/qt/radiobox.h" -#elif defined(__WXMAC__) -#include "wx/mac/radiobox.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/radiobox.h" -#endif - -#endif - // _WX_RADIOBOX_H_BASE_ diff --git a/include/wx/radiobut.h b/include/wx/radiobut.h deleted file mode 100644 index ce602dcc0f..0000000000 --- a/include/wx/radiobut.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_RADIOBUT_H_BASE_ -#define _WX_RADIOBUT_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/radiobut.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/radiobut.h" -#elif defined(__WXGTK__) -#include "wx/gtk/radiobut.h" -#elif defined(__WXQT__) -#include "wx/qt/radiobut.h" -#elif defined(__WXMAC__) -#include "wx/mac/radiobut.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/radiobut.h" -#endif - -#endif - // _WX_RADIOBUT_H_BASE_ diff --git a/include/wx/region.h b/include/wx/region.h deleted file mode 100644 index 9c5afd22bc..0000000000 --- a/include/wx/region.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_REGION_H_BASE_ -#define _WX_REGION_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/region.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/region.h" -#elif defined(__WXGTK__) -#include "wx/gtk/region.h" -#elif defined(__WXQT__) -#include "wx/qt/region.h" -#elif defined(__WXMAC__) -#include "wx/mac/region.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/region.h" -#endif - -#endif - // _WX_REGION_H_BASE_ diff --git a/include/wx/resource.h b/include/wx/resource.h deleted file mode 100644 index 38771607ce..0000000000 --- a/include/wx/resource.h +++ /dev/null @@ -1,174 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: resource.h -// Purpose: Resource processing -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_RESOURCEH__ -#define _WX_RESOURCEH__ - -#ifdef __GNUG__ -#pragma interface "resource.h" -#endif - -#include "wx/setup.h" - -#if USE_WX_RESOURCES -#include - -// A few further types not in wx_types.h -#define wxRESOURCE_TYPE_SEPARATOR 1000 -#define wxRESOURCE_TYPE_XBM_DATA 1001 -#define wxRESOURCE_TYPE_XPM_DATA 1002 - -#define RESOURCE_PLATFORM_WINDOWS 1 -#define RESOURCE_PLATFORM_X 2 -#define RESOURCE_PLATFORM_MAC 3 -#define RESOURCE_PLATFORM_ANY 4 - -/* - * Internal format for control/panel item - */ - -class WXDLLEXPORT wxItemResource: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxItemResource) - - protected: - wxList children; - char *itemType; - int x, y, width, height; - char *title; - char *name; - long windowStyle; - long value1, value2, value3, value5; - char *value4; - int m_windowId; - wxStringList *stringValues; // Optional string values - wxBitmap *bitmap; - wxColour *backgroundColour; - wxColour *labelColour; - wxColour *buttonColour; - wxFont *windowFont; - public: - - wxItemResource(void); - ~wxItemResource(void); - - void SetType(char *typ); - inline void SetStyle(long styl) { windowStyle = styl; } - inline void SetId(int id) { m_windowId = id; } - inline void SetBitmap(wxBitmap *bm) { bitmap = bm; } - inline wxBitmap *GetBitmap(void) { return bitmap; } - inline void SetFont(wxFont *font) { windowFont = font; } - inline wxFont *GetFont(void) { return windowFont; } - inline void SetSize(int xx, int yy, int ww, int hh) - { x = xx; y = yy; width = ww; height = hh; } - void SetTitle(char *t); - void SetName(char *n); - inline void SetValue1(long v) { value1 = v; } - inline void SetValue2(long v) { value2 = v; } - inline void SetValue3(long v) { value3 = v; } - inline void SetValue5(long v) { value5 = v; } - void SetValue4(char *v); - void SetStringValues(wxStringList *svalues); - - inline char *GetType(void) { return itemType; } - inline int GetX(void) { return x; } - inline int GetY(void) { return y; } - inline int GetWidth(void) { return width; } - inline int GetHeight(void) { return height; } - - inline char *GetTitle(void) { return title; } - inline char *GetName(void) { return name; } - inline long GetStyle(void) { return windowStyle; } - inline int GetId(void) { return m_windowId; } - - inline long GetValue1(void) { return value1; } - inline long GetValue2(void) { return value2; } - inline long GetValue3(void) { return value3; } - inline long GetValue5(void) { return value5; } - inline char *GetValue4(void) { return value4; } - inline wxList& GetChildren(void) { return children; } - inline wxStringList *GetStringValues(void) { return stringValues; } - - inline void SetBackgroundColour(wxColour *col) { if (backgroundColour) delete backgroundColour; backgroundColour = col; } - inline void SetLabelColour(wxColour *col) { if (labelColour) delete labelColour; labelColour = col; } - inline void SetButtonColour(wxColour *col) { if (buttonColour) delete buttonColour; buttonColour = col; } - - inline wxColour *GetBackgroundColour(void) { return backgroundColour; } - inline wxColour *GetLabelColour(void) { return labelColour; } - inline wxColour *GetButtonColour(void) { return buttonColour; } -}; - -/* - * Resource table (normally only one of these) - */ - -class WXDLLEXPORT wxResourceTable: public wxHashTable -{ - DECLARE_DYNAMIC_CLASS(wxResourceTable) - - protected: - - public: - wxHashTable identifiers; - - wxResourceTable(void); - ~wxResourceTable(void); - - virtual wxItemResource *FindResource(const wxString& name) const; - virtual void AddResource(wxItemResource *item); - virtual bool DeleteResource(const wxString& name); - - virtual bool ParseResourceFile(char *filename); - virtual bool ParseResourceData(char *data); - virtual bool SaveResource(char *filename); - - // Register XBM/XPM data - virtual bool RegisterResourceBitmapData(char *name, char bits[], int width, int height); - virtual bool RegisterResourceBitmapData(char *name, char **data); - - virtual wxControl *CreateItem(wxWindow *panel, wxItemResource *childResource) const; - - virtual void ClearTable(void); -}; - -extern void WXDLLEXPORT wxInitializeResourceSystem(void); -extern void WXDLLEXPORT wxCleanUpResourceSystem(void); - -WXDLLEXPORT_DATA(extern wxResourceTable*) wxDefaultResourceTable; -extern long WXDLLEXPORT wxParseWindowStyle(char *style); - -class WXDLLEXPORT wxMenuBar; -class WXDLLEXPORT wxMenu; -class WXDLLEXPORT wxBitmap; -class WXDLLEXPORT wxIcon; -extern wxBitmap* WXDLLEXPORT wxResourceCreateBitmap(char *resource, wxResourceTable *table = (wxResourceTable *) NULL); -extern wxIcon* WXDLLEXPORT wxResourceCreateIcon(char *resource, wxResourceTable *table = (wxResourceTable *) NULL); -extern wxMenuBar* WXDLLEXPORT wxResourceCreateMenuBar(char *resource, wxResourceTable *table = (wxResourceTable *) NULL, wxMenuBar *menuBar = (wxMenuBar *) NULL); -extern wxMenu* WXDLLEXPORT wxResourceCreateMenu(char *resource, wxResourceTable *table = (wxResourceTable *) NULL); -extern bool WXDLLEXPORT wxResourceParseData(char *resource, wxResourceTable *table = (wxResourceTable *) NULL); -extern bool WXDLLEXPORT wxResourceParseFile(char *filename, wxResourceTable *table = (wxResourceTable *) NULL); -extern bool WXDLLEXPORT wxResourceParseString(char *s, wxResourceTable *table = (wxResourceTable *) NULL); -extern void WXDLLEXPORT wxResourceClear(wxResourceTable *table = (wxResourceTable *) NULL); -// Register XBM/XPM data -extern bool WXDLLEXPORT wxResourceRegisterBitmapData(char *name, char bits[], int width, int height, wxResourceTable *table = (wxResourceTable *) NULL); -extern bool WXDLLEXPORT wxResourceRegisterBitmapData(char *name, char **data, wxResourceTable *table = (wxResourceTable *) NULL); -#define wxResourceRegisterIconData wxResourceRegisterBitmapData - -/* - * Resource identifer code: #define storage - */ - -extern bool WXDLLEXPORT wxResourceAddIdentifier(char *name, int value, wxResourceTable *table = (wxResourceTable *) NULL); -extern int WXDLLEXPORT wxResourceGetIdentifier(char *name, wxResourceTable *table = (wxResourceTable *) NULL); - -#endif -#endif - // _WX_RESOURCEH__ diff --git a/include/wx/scrolbar.h b/include/wx/scrolbar.h deleted file mode 100644 index 49f9a11b05..0000000000 --- a/include/wx/scrolbar.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_SCROLBAR_H_BASE_ -#define _WX_SCROLBAR_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/scrolbar.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/scrolbar.h" -#elif defined(__WXGTK__) -#include "wx/gtk/scrolbar.h" -#elif defined(__WXQT__) -#include "wx/qt/scrolbar.h" -#elif defined(__WXMAC__) -#include "wx/mac/scrolbar.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/scrolbar.h" -#endif - -#endif - // _WX_SCROLBAR_H_BASE_ diff --git a/include/wx/scrolwin.h b/include/wx/scrolwin.h deleted file mode 100644 index 44298184bb..0000000000 --- a/include/wx/scrolwin.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _WX_SCROLWIN_H_BASE_ -#define _WX_SCROLWIN_H_BASE_ - -#include "wx/generic/scrolwin.h" - -#endif - // _WX_SCROLWIN_H_BASE_ diff --git a/include/wx/serbase.h b/include/wx/serbase.h deleted file mode 100644 index f4c3be113e..0000000000 --- a/include/wx/serbase.h +++ /dev/null @@ -1,57 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: serbase.h -// Purpose: Serialization plug-ins -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// -#ifndef _WX_WX_SERBASEH_H__ -#define _WX_WX_SERBASEH_H__ - -#include - -#define WXSERIAL(classname) classname##_Serialize - -class wxObject_Serialize : public wxObject { - DECLARE_DYNAMIC_CLASS(wxObject_Serialize) - public: - wxObject_Serialize() {} - virtual ~wxObject_Serialize() {} - - void SetObject(wxObject *obj) { m_object = obj; } - wxObject *Object() { return m_object; } - - protected: - wxObject *m_object; -}; - - -#define DECLARE_SERIAL_CLASS(classname, parent) \ -class WXSERIAL(classname) : public WXSERIAL(parent) { \ - DECLARE_DYNAMIC_CLASS(classname##_Serialize) \ - public: \ - WXSERIAL(classname)() { } \ - virtual ~WXSERIAL(classname)() { } \ -\ - virtual void StoreObject(wxObjectOutputStream& stream); \ - virtual void LoadObject(wxObjectInputStream& stream); \ -}; - -#define DECLARE_ALIAS_SERIAL_CLASS(classname, parent) \ -class WXSERIAL(classname) : public WXSERIAL(parent) { \ - DECLARE_DYNAMIC_CLASS(classname##_Serialize) \ - public: \ - WXSERIAL(classname)() { } \ - virtual ~WXSERIAL(classname)() { } \ -}; - -#define IMPLEMENT_SERIAL_CLASS(classname, parent) \ -IMPLEMENT_DYNAMIC_CLASS(classname##_Serialize, parent##_Serialize) - -#define IMPLEMENT_ALIAS_SERIAL_CLASS(classname, parent) \ -IMPLEMENT_DYNAMIC_CLASS(classname##_Serialize, parent##_Serialize) - -#endif diff --git a/include/wx/settings.h b/include/wx/settings.h deleted file mode 100644 index 1dfc5d9280..0000000000 --- a/include/wx/settings.h +++ /dev/null @@ -1,123 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: settings.h -// Purpose: wxSystemSettings defines; includes platform settings.h -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_SETTINGS_H_BASE_ -#define _WX_SETTINGS_H_BASE_ - -#define wxSYS_WHITE_BRUSH 0 -#define wxSYS_LTGRAY_BRUSH 1 -#define wxSYS_GRAY_BRUSH 2 -#define wxSYS_DKGRAY_BRUSH 3 -#define wxSYS_BLACK_BRUSH 4 -#define wxSYS_NULL_BRUSH 5 -#define wxSYS_HOLLOW_BRUSH wxSYS_NULL_BRUSH -#define wxSYS_WHITE_PEN 6 -#define wxSYS_BLACK_PEN 7 -#define wxSYS_NULL_PEN 8 -#define wxSYS_OEM_FIXED_FONT 10 -#define wxSYS_ANSI_FIXED_FONT 11 -#define wxSYS_ANSI_VAR_FONT 12 -#define wxSYS_SYSTEM_FONT 13 -#define wxSYS_DEVICE_DEFAULT_FONT 14 -#define wxSYS_DEFAULT_PALETTE 15 -#define wxSYS_SYSTEM_FIXED_FONT 16 -#define wxSYS_DEFAULT_GUI_FONT 17 - -#define wxSYS_COLOUR_SCROLLBAR 0 -#define wxSYS_COLOUR_BACKGROUND 1 -#define wxSYS_COLOUR_ACTIVECAPTION 2 -#define wxSYS_COLOUR_INACTIVECAPTION 3 -#define wxSYS_COLOUR_MENU 4 -#define wxSYS_COLOUR_WINDOW 5 -#define wxSYS_COLOUR_WINDOWFRAME 6 -#define wxSYS_COLOUR_MENUTEXT 7 -#define wxSYS_COLOUR_WINDOWTEXT 8 -#define wxSYS_COLOUR_CAPTIONTEXT 9 -#define wxSYS_COLOUR_ACTIVEBORDER 10 -#define wxSYS_COLOUR_INACTIVEBORDER 11 -#define wxSYS_COLOUR_APPWORKSPACE 12 -#define wxSYS_COLOUR_HIGHLIGHT 13 -#define wxSYS_COLOUR_HIGHLIGHTTEXT 14 -#define wxSYS_COLOUR_BTNFACE 15 -#define wxSYS_COLOUR_BTNSHADOW 16 -#define wxSYS_COLOUR_GRAYTEXT 17 -#define wxSYS_COLOUR_BTNTEXT 18 -#define wxSYS_COLOUR_INACTIVECAPTIONTEXT 19 -#define wxSYS_COLOUR_BTNHIGHLIGHT 20 - -#define wxSYS_COLOUR_3DDKSHADOW 21 -#define wxSYS_COLOUR_3DLIGHT 22 -#define wxSYS_COLOUR_INFOTEXT 23 -#define wxSYS_COLOUR_INFOBK 24 - -#define wxSYS_COLOUR_DESKTOP wxSYS_COLOUR_BACKGROUND -#define wxSYS_COLOUR_3DFACE wxSYS_COLOUR_BTNFACE -#define wxSYS_COLOUR_3DSHADOW wxSYS_COLOUR_BTNSHADOW -#define wxSYS_COLOUR_3DHIGHLIGHT wxSYS_COLOUR_BTNHIGHLIGHT -#define wxSYS_COLOUR_3DHILIGHT wxSYS_COLOUR_BTNHIGHLIGHT -#define wxSYS_COLOUR_BTNHILIGHT wxSYS_COLOUR_BTNHIGHLIGHT - -// Metrics -#define wxSYS_MOUSE_BUTTONS 1 -#define wxSYS_BORDER_X 2 -#define wxSYS_BORDER_Y 3 -#define wxSYS_CURSOR_X 4 -#define wxSYS_CURSOR_Y 5 -#define wxSYS_DCLICK_X 6 -#define wxSYS_DCLICK_Y 7 -#define wxSYS_DRAG_X 8 -#define wxSYS_DRAG_Y 9 -#define wxSYS_EDGE_X 10 -#define wxSYS_EDGE_Y 11 -#define wxSYS_HSCROLL_ARROW_X 12 -#define wxSYS_HSCROLL_ARROW_Y 13 -#define wxSYS_HTHUMB_X 14 -#define wxSYS_ICON_X 15 -#define wxSYS_ICON_Y 16 -#define wxSYS_ICONSPACING_X 17 -#define wxSYS_ICONSPACING_Y 18 -#define wxSYS_WINDOWMIN_X 19 -#define wxSYS_WINDOWMIN_Y 20 -#define wxSYS_SCREEN_X 21 -#define wxSYS_SCREEN_Y 22 -#define wxSYS_FRAMESIZE_X 23 -#define wxSYS_FRAMESIZE_Y 24 -#define wxSYS_SMALLICON_X 25 -#define wxSYS_SMALLICON_Y 26 -#define wxSYS_HSCROLL_Y 27 -#define wxSYS_VSCROLL_X 28 -#define wxSYS_VSCROLL_ARROW_X 29 -#define wxSYS_VSCROLL_ARROW_Y 30 -#define wxSYS_VTHUMB_Y 31 -#define wxSYS_CAPTION_Y 32 -#define wxSYS_MENU_Y 33 -#define wxSYS_NETWORK_PRESENT 34 -#define wxSYS_PENWINDOWS_PRESENT 35 -#define wxSYS_SHOW_SOUNDS 36 -#define wxSYS_SWAP_BUTTONS 37 - -#if defined(__WXMSW__) -#include "wx/msw/settings.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/settings.h" -#elif defined(__WXGTK__) -#include "wx/gtk/settings.h" -#elif defined(__WXQT__) -#include "wx/qt/settings.h" -#elif defined(__WXMAC__) -#include "wx/mac/settings.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/settings.h" -#endif - -#endif - // _WX_SETTINGS_H_BASE_ - diff --git a/include/wx/setup.h b/include/wx/setup.h deleted file mode 100644 index 54936598ae..0000000000 --- a/include/wx/setup.h +++ /dev/null @@ -1,26 +0,0 @@ - -#ifndef _WX_SETUP_H_BASE_ -#define _WX_SETUP_H_BASE_ - -/* compatibility code, to be removed asap: */ - -#if !defined(__WXMSW__) && !defined(__WXGTK__) && !defined(__WXMOTIF__) && !defined(__WXQT__) && !defined(__WXSTUBS__) && !defined(__WXMAC__) -# error No __WXxxx__ define set! Please define one of __WXGTK__,__WXMSW__,__WXMOTIF__,__WXMAC__,__WXQT__,__WXSTUBS__ -#endif - -#if defined(__WXMSW__) -#include "wx/msw/setup.h" -#elif defined(__WXMAC__) -#include "wx/mac/setup.h" -#elif defined(__WXQT__) -#include "wx/qt/setup.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/setup.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/setup.h" -#elif defined(__WXGTK__) -#include "wx/gtk/setup.h" -#endif - -#endif - /* _WX_SETUP_H_BASE_ */ diff --git a/include/wx/slider.h b/include/wx/slider.h deleted file mode 100644 index 739a311aa5..0000000000 --- a/include/wx/slider.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_SLIDER_H_BASE_ -#define _WX_SLIDER_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/slider.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/slider.h" -#elif defined(__WXGTK__) -#include "wx/gtk/slider.h" -#elif defined(__WXQT__) -#include "wx/qt/slider.h" -#elif defined(__WXMAC__) -#include "wx/mac/slider.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/slider.h" -#endif - -#endif - // _WX_SLIDER_H_BASE_ diff --git a/include/wx/spinbutt.h b/include/wx/spinbutt.h deleted file mode 100644 index 7d1c5c3806..0000000000 --- a/include/wx/spinbutt.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_SPINBUTT_H_BASE_ -#define _WX_SPINBUTT_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/spinbutt.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/spinbutt.h" -#elif defined(__WXGTK__) -#include "wx/gtk/spinbutt.h" -#elif defined(__WXQT__) -#include "wx/qt/spinbutt.h" -#elif defined(__WXMAC__) -#include "wx/mac/spinbutt.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/spinbutt.h" -#endif - -#endif - // _WX_SPINBUTT_H_BASE_ diff --git a/include/wx/splitter.h b/include/wx/splitter.h deleted file mode 100644 index 0a5232403b..0000000000 --- a/include/wx/splitter.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _WX_SPLITTER_H_BASE_ -#define _WX_SPLITTER_H_BASE_ - -#include "wx/generic/splitter.h" - -#endif - // _WX_SPLITTER_H_BASE_ diff --git a/include/wx/statbmp.h b/include/wx/statbmp.h deleted file mode 100644 index 0f32d687a3..0000000000 --- a/include/wx/statbmp.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_STATBMP_H_BASE_ -#define _WX_STATBMP_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/statbmp.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/statbmp.h" -#elif defined(__WXGTK__) -#include "wx/gtk/statbmp.h" -#elif defined(__WXQT__) -#include "wx/qt/statbmp.h" -#elif defined(__WXMAC__) -#include "wx/mac/statbmp.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/statbmp.h" -#endif - -#endif - // _WX_STATBMP_H_BASE_ diff --git a/include/wx/statbox.h b/include/wx/statbox.h deleted file mode 100644 index f1a8bd6eea..0000000000 --- a/include/wx/statbox.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_STATBOX_H_BASE_ -#define _WX_STATBOX_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/statbox.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/statbox.h" -#elif defined(__WXGTK__) -#include "wx/gtk/statbox.h" -#elif defined(__WXQT__) -#include "wx/qt/statbox.h" -#elif defined(__WXMAC__) -#include "wx/mac/statbox.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/statbox.h" -#endif - -#endif - // _WX_STATBOX_H_BASE_ diff --git a/include/wx/stattext.h b/include/wx/stattext.h deleted file mode 100644 index abfbbd5be6..0000000000 --- a/include/wx/stattext.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_STATTEXT_H_BASE_ -#define _WX_STATTEXT_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/stattext.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/stattext.h" -#elif defined(__WXGTK__) -#include "wx/gtk/stattext.h" -#elif defined(__WXQT__) -#include "wx/qt/stattext.h" -#elif defined(__WXMAC__) -#include "wx/mac/stattext.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/stattext.h" -#endif - -#endif - // _WX_STATTEXT_H_BASE_ diff --git a/include/wx/statusbr.h b/include/wx/statusbr.h deleted file mode 100644 index 327238fbd2..0000000000 --- a/include/wx/statusbr.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _WX_STATUSBR_H_BASE_ -#define _WX_STATUSBR_H_BASE_ - -#include "wx/generic/statusbr.h" - -#endif - // _WX_STATUSBR_H_BASE_ diff --git a/include/wx/stream.h b/include/wx/stream.h deleted file mode 100644 index d966c7da37..0000000000 --- a/include/wx/stream.h +++ /dev/null @@ -1,215 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: stream.h -// Purpose: "wxWindows stream" base classes -// Author: Guilhem Lavaux -// Modified by: -// Created: 11/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_WXSTREAM_H__ -#define _WX_WXSTREAM_H__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include -#include "wx/object.h" -#include "wx/string.h" -#include "wx/filefn.h" // for off_t, wxInvalidOffset and wxSeekMode - -class WXDLLEXPORT wxInputStream; -class WXDLLEXPORT wxOutputStream; - -typedef wxInputStream& (*__wxInputManip)(wxInputStream&); -typedef wxOutputStream& (*__wxOutputManip)(wxOutputStream&); - -wxOutputStream& WXDLLEXPORT wxEndL(wxOutputStream& o_stream); - -class WXDLLEXPORT wxStreamBuffer { - public: - wxStreamBuffer(wxInputStream& stream); - wxStreamBuffer(wxOutputStream& stream); - ~wxStreamBuffer(); - - void Read(void *buffer, size_t size); - void Write(const void *buffer, size_t size); - void WriteBack(char c); - - void SetBufferIO(char *buffer_start, char *buffer_end); - void SetBufferIO(size_t bufsize); - void ResetBuffer(); - - void SetBufferPosition(char *buffer_position) - { m_buffer_pos = buffer_position; } - void SetIntPosition(size_t pos) - { m_buffer_pos = m_buffer_start + pos; } - char *GetBufferPosition() const { return m_buffer_pos; } - size_t GetIntPosition() const { return m_buffer_pos - m_buffer_start; } - - char *GetBufferStart() const { return m_buffer_start; } - char *GetBufferEnd() const { return m_buffer_end; } - size_t GetBufferSize() const { return m_buffer_size; } - size_t GetLastAccess() const { return m_buffer_end - m_buffer_start; } - - protected: - char *m_buffer_start, *m_buffer_end, *m_buffer_pos; - size_t m_buffer_size; - - wxInputStream *m_istream; - wxOutputStream *m_ostream; -}; - -/* - * wxStream: base classes - */ -class WXDLLEXPORT wxInputStream { - public: - wxInputStream(); - virtual ~wxInputStream(); - - // IO functions - virtual char Peek() = 0; - virtual char GetC(); - virtual wxInputStream& Read(void *buffer, size_t size); - wxInputStream& Read(wxOutputStream& stream_out); - - // Position functions - virtual off_t SeekI(off_t pos, wxSeekMode mode = wxFromStart); - virtual off_t TellI() const; - - // State functions - bool Eof() const { return m_eof; } - size_t LastRead() { return m_lastread; } - wxStreamBuffer *InputStreamBuffer() { return m_i_streambuf; } - - // Operators - wxInputStream& operator>>(wxOutputStream& out) { return Read(out); } - wxInputStream& operator>>(wxString& line); - wxInputStream& operator>>(char& c); - wxInputStream& operator>>(short& i); - wxInputStream& operator>>(int& i); - wxInputStream& operator>>(long& i); - wxInputStream& operator>>(float& i); - wxInputStream& operator>>(wxObject *& obj); - - wxInputStream& operator>>(unsigned char& c) { return operator>>((char&)c); } - wxInputStream& operator>>(unsigned short& i) { return operator>>((short&)i); } - wxInputStream& operator>>(unsigned int& i) { return operator>>((int&)i); } - wxInputStream& operator>>(unsigned long& i) { return operator>>((long&)i); } - wxInputStream& operator>>( __wxInputManip func) { return func(*this); } - - protected: - friend class wxStreamBuffer; - friend class wxFilterInputStream; - - wxInputStream(wxStreamBuffer *buffer); - - virtual size_t DoRead(void *buffer, size_t size) = 0; - virtual off_t DoSeekInput(off_t pos, wxSeekMode mode) = 0; - virtual off_t DoTellInput() const = 0; - - protected: - bool m_eof, m_i_destroybuf; - size_t m_lastread; - wxStreamBuffer *m_i_streambuf; -}; - -class WXDLLEXPORT wxOutputStream { - public: - wxOutputStream(); - virtual ~wxOutputStream(); - - virtual wxOutputStream& Write(const void *buffer, size_t size); - wxOutputStream& Write(wxInputStream& stream_in); - - virtual off_t SeekO(off_t pos, wxSeekMode mode = wxFromStart); - virtual off_t TellO() const; - - virtual bool Bad() const { return m_bad; } - virtual size_t LastWrite() const { return m_lastwrite; } - wxStreamBuffer *OutputStreamBuffer() { return m_o_streambuf; } - - virtual void Sync(); - - wxOutputStream& operator<<(wxInputStream& out) { return Write(out); } - wxOutputStream& operator<<(const char *string); - wxOutputStream& operator<<(wxString& string); - wxOutputStream& operator<<(char c); - wxOutputStream& operator<<(short i); - wxOutputStream& operator<<(int i); - wxOutputStream& operator<<(long i); - wxOutputStream& operator<<(double f); - wxOutputStream& operator<<(wxObject& obj); - - wxOutputStream& operator<<(float f) { return operator<<((double)f); } - wxOutputStream& operator<<(unsigned char c) { return operator<<((char)c); } - wxOutputStream& operator<<(unsigned short i) { return operator<<((short)i); } - wxOutputStream& operator<<(unsigned int i) { return operator<<((int)i); } - wxOutputStream& operator<<(unsigned long i) { return operator<<((long)i); } - wxOutputStream& operator<<( __wxOutputManip func) { return func(*this); } - - protected: - friend class wxStreamBuffer; - friend class wxFilterOutputStream; - - wxOutputStream(wxStreamBuffer *buffer); - - virtual size_t DoWrite(const void *buffer, size_t size) = 0; - virtual off_t DoSeekOutput(off_t pos, wxSeekMode mode) = 0; - virtual off_t DoTellOutput() const = 0; - - protected: - bool m_bad, m_o_destroybuf; - size_t m_lastwrite; - wxStreamBuffer *m_o_streambuf; -}; - -/* - * "Filter" streams - */ - -class WXDLLEXPORT wxFilterInputStream: public wxInputStream { - public: - wxFilterInputStream(wxInputStream& stream); - virtual ~wxFilterInputStream(); - - virtual char Peek() { return m_parent_i_stream->Peek(); } - - virtual bool Eof() const { return m_parent_i_stream->Eof(); } - virtual size_t LastRead() const { return m_parent_i_stream->LastRead(); } - virtual off_t TellI() const { return m_parent_i_stream->TellI(); } - - protected: - virtual size_t DoRead(void *buffer, size_t size); - virtual off_t DoSeekInput(off_t pos, wxSeekMode mode); - virtual off_t DoTellInput() const; - - protected: - wxInputStream *m_parent_i_stream; -}; - -class WXDLLEXPORT wxFilterOutputStream: public wxOutputStream { - public: - wxFilterOutputStream(wxOutputStream& stream); - virtual ~wxFilterOutputStream(); - - virtual bool Bad() const { return m_parent_o_stream->Bad(); } - virtual size_t LastWrite() const { return m_parent_o_stream->LastWrite(); } - virtual off_t TellO() const { return m_parent_o_stream->TellO(); } - - protected: - // The forward is implicitely done by wxStreamBuffer. - - virtual size_t DoWrite(const void *buffer, size_t size); - virtual off_t DoSeekOutput(off_t pos, wxSeekMode mode); - virtual off_t DoTellOutput() const; - - protected: - wxOutputStream *m_parent_o_stream; -}; - -#endif diff --git a/include/wx/string.h b/include/wx/string.h deleted file mode 100644 index 592e5835f5..0000000000 --- a/include/wx/string.h +++ /dev/null @@ -1,930 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: string.h -// Purpose: wxString class -// Author: Vadim Zeitlin -// Modified by: -// Created: 29/01/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_WXSTRINGH__ -#define _WX_WXSTRINGH__ - -#ifdef __GNUG__ -#pragma interface "string.h" -#endif - -/* Dependencies (should be included before this header): - * string.h - * stdio.h - * stdarg.h - * limits.h - */ -#include -#include -#include -#include -#include - -#ifndef WX_PRECOMP - #include "wx/defs.h" // Robert Roebling - #ifdef WXSTRING_IS_WXOBJECT - #include "wx/object.h" - #endif -#endif - -#include "wx/debug.h" - -/** @name wxString library - @memo Efficient wxString class [more or less] compatible with MFC CString, - wxWindows wxString and std::string and some handy functions - missing from string.h. - */ -//@{ - -// --------------------------------------------------------------------------- -// macros -// --------------------------------------------------------------------------- - -/** @name Macros - @memo You can switch off wxString/std::string compatibility if desired - */ -/// compile the std::string compatibility functions -#define STD_STRING_COMPATIBILITY - -/// define to derive wxString from wxObject -#undef WXSTRING_IS_WXOBJECT - -/// maximum possible length for a string means "take all string" everywhere -// (as sizeof(StringData) is unknown here we substract 100) -#define STRING_MAXLEN (UINT_MAX - 100) - -// 'naughty' cast -#define WXSTRINGCAST (char *)(const char *) - -// NB: works only inside wxString class -#define ASSERT_VALID_INDEX(i) wxASSERT( (unsigned)(i) < Len() ) - -// --------------------------------------------------------------------------- -/** @name Global functions complementing standard C string library - @memo replacements for strlen() and portable strcasecmp() - */ -// --------------------------------------------------------------------------- - -/// checks whether the passed in pointer is NULL and if the string is empty -inline bool WXDLLEXPORT IsEmpty(const char *p) { return !p || !*p; } - -/// safe version of strlen() (returns 0 if passed NULL pointer) -inline size_t WXDLLEXPORT Strlen(const char *psz) - { return psz ? strlen(psz) : 0; } - -/// portable strcasecmp/_stricmp -inline int WXDLLEXPORT Stricmp(const char *psz1, const char *psz2) -{ -#if defined(_MSC_VER) - return _stricmp(psz1, psz2); -#elif defined(__BORLANDC__) - return stricmp(psz1, psz2); -#elif defined(__UNIX__) || defined(__GNUWIN32__) - return strcasecmp(psz1, psz2); -#else - // almost all compilers/libraries provide this function (unfortunately under - // different names), that's why we don't implement our own which will surely - // be more efficient than this code (uncomment to use): - /* - register char c1, c2; - do { - c1 = tolower(*psz1++); - c2 = tolower(*psz2++); - } while ( c1 && (c1 == c2) ); - - return c1 - c2; - */ - - #error "Please define string case-insensitive compare for your OS/compiler" -#endif // OS/compiler -} - -// ---------------------------------------------------------------------------- -// global data -// ---------------------------------------------------------------------------- - -// global pointer to empty string -WXDLLEXPORT_DATA(extern const char*) g_szNul; - -// return an empty wxString -class WXDLLEXPORT wxString; // not yet defined -inline const wxString& wxGetEmptyString() { return *(wxString *)&g_szNul; } - -// --------------------------------------------------------------------------- -// string data prepended with some housekeeping info (used by wxString class), -// is never used directly (but had to be put here to allow inlining) -// --------------------------------------------------------------------------- -struct WXDLLEXPORT wxStringData -{ - int nRefs; // reference count - size_t nDataLength, // actual string length - nAllocLength; // allocated memory size - - // mimics declaration 'char data[nAllocLength]' - char* data() const { return (char*)(this + 1); } - - // empty string has a special ref count so it's never deleted - bool IsEmpty() const { return nRefs == -1; } - bool IsShared() const { return nRefs > 1; } - - // lock/unlock - void Lock() { if ( !IsEmpty() ) nRefs++; } - void Unlock() { if ( !IsEmpty() && --nRefs == 0) free(this); } - - // if we had taken control over string memory (GetWriteBuf), it's - // intentionally put in invalid state - void Validate(bool b) { nRefs = b ? 1 : 0; } - bool IsValid() const { return nRefs != 0; } -}; - -// --------------------------------------------------------------------------- -/** - This is (yet another one) String class for C++ programmers. It doesn't use - any of "advanced" C++ features (i.e. templates, exceptions, namespaces...) - thus you should be able to compile it with practicaly any C++ compiler. - This class uses copy-on-write technique, i.e. identical strings share the - same memory as long as neither of them is changed. - - This class aims to be as compatible as possible with the new standard - std::string class, but adds some additional functions and should be - at least as efficient than the standard implementation. - - Performance note: it's more efficient to write functions which take - "const String&" arguments than "const char *" if you assign the argument - to another string. - - It was compiled and tested under Win32, Linux (libc 5 & 6), Solaris 5.5. - - To do: - - ressource support (string tables in ressources) - - more wide character (UNICODE) support - - regular expressions support - -@memo A non-template portable wxString class implementing copy-on-write. -@author VZ -@version 1.3 -*/ -// --------------------------------------------------------------------------- -#ifdef WXSTRING_IS_WXOBJECT - class WXDLLEXPORT wxString : public wxObject - { - DECLARE_DYNAMIC_CLASS(wxString) -#else //WXSTRING_IS_WXOBJECT - class WXDLLEXPORT wxString - { -#endif //WXSTRING_IS_WXOBJECT - -friend class wxArrayString; - - // NB: special care was taken in arrangin the member functions in such order - // that all inline functions can be effectively inlined -private: - // points to data preceded by wxStringData structure with ref count info - char *m_pchData; - - // accessor to string data - wxStringData* GetStringData() const { return (wxStringData*)m_pchData - 1; } - - // string (re)initialization functions - // initializes the string to the empty value (must be called only from - // ctors, use Reinit() otherwise) - void Init() { m_pchData = (char *)g_szNul; } - // initializaes the string with (a part of) C-string - void InitWith(const char *psz, size_t nPos = 0, size_t nLen = STRING_MAXLEN); - // as Init, but also frees old data - void Reinit() { GetStringData()->Unlock(); Init(); } - - // memory allocation - // allocates memory for string of lenght nLen - void AllocBuffer(size_t nLen); - // copies data to another string - void AllocCopy(wxString&, int, int) const; - // effectively copies data to string - void AssignCopy(size_t, const char *); - - // append a (sub)string - void ConcatSelf(int nLen, const char *src); - - // functions called before writing to the string: they copy it if there - // are other references to our data (should be the only owner when writing) - void CopyBeforeWrite(); - void AllocBeforeWrite(size_t); - -public: - /** @name constructors & dtor */ - //@{ - /// ctor for an empty string - wxString() { Init(); } - /// copy ctor - wxString(const wxString& stringSrc) - { - wxASSERT( stringSrc.GetStringData()->IsValid() ); - - if ( stringSrc.IsEmpty() ) { - // nothing to do for an empty string - Init(); - } - else { - m_pchData = stringSrc.m_pchData; // share same data - GetStringData()->Lock(); // => one more copy - } - } - /// string containing nRepeat copies of ch - wxString(char ch, size_t nRepeat = 1); - /// ctor takes first nLength characters from C string - // (default value of STRING_MAXLEN means take all the string) - wxString(const char *psz, size_t nLength = STRING_MAXLEN) - { InitWith(psz, 0, nLength); } - /// from C string (for compilers using unsigned char) - wxString(const unsigned char* psz, size_t nLength = STRING_MAXLEN); - /// from wide (UNICODE) string - wxString(const wchar_t *pwz); - /// dtor is not virtual, this class must not be inherited from! - ~wxString() { GetStringData()->Unlock(); } - //@} - - /** @name generic attributes & operations */ - //@{ - /// as standard strlen() - size_t Len() const { return GetStringData()->nDataLength; } - /// string contains any characters? - bool IsEmpty() const { return Len() == 0; } - /// reinitialize string (and free data!) - void Empty() - { - if ( GetStringData()->nDataLength != 0 ) - Reinit(); - - wxASSERT( GetStringData()->nDataLength == 0 ); - wxASSERT( GetStringData()->nAllocLength == 0 ); - } - - /// Is an ascii value - bool IsAscii() const; - /// Is a number - bool IsNumber() const; - /// Is a word - bool IsWord() const; - //@} - - /** @name data access (all indexes are 0 based) */ - //@{ - /// read access - char GetChar(size_t n) const - { ASSERT_VALID_INDEX( n ); return m_pchData[n]; } - /// read/write access - char& GetWritableChar(size_t n) - { ASSERT_VALID_INDEX( n ); CopyBeforeWrite(); return m_pchData[n]; } - /// write access - void SetChar(size_t n, char ch) - { ASSERT_VALID_INDEX( n ); CopyBeforeWrite(); m_pchData[n] = ch; } - - /// get last character - char Last() const - { wxASSERT( !IsEmpty() ); return m_pchData[Len() - 1]; } - /// get writable last character - char& Last() - { wxASSERT( !IsEmpty() ); CopyBeforeWrite(); return m_pchData[Len()-1]; } - - /// operator version of GetChar - char operator[](size_t n) const - { ASSERT_VALID_INDEX( n ); return m_pchData[n]; } - /// operator version of GetChar - char operator[](int n) const - { ASSERT_VALID_INDEX( n ); return m_pchData[n]; } - /// operator version of GetWritableChar - char& operator[](size_t n) - { ASSERT_VALID_INDEX( n ); CopyBeforeWrite(); return m_pchData[n]; } - - /// implicit conversion to C string - operator const char*() const { return m_pchData; } - /// explicit conversion to C string (use this with printf()!) - const char* c_str() const { return m_pchData; } - /// - const char* GetData() const { return m_pchData; } - //@} - - /** @name overloaded assignment */ - //@{ - /// - wxString& operator=(const wxString& stringSrc); - /// - wxString& operator=(char ch); - /// - wxString& operator=(const char *psz); - /// - wxString& operator=(const unsigned char* psz); - /// - wxString& operator=(const wchar_t *pwz); - //@} - - /** @name string concatenation */ - //@{ - /** @name in place concatenation */ - /** @name concatenate and return the result - left to right associativity of << allows to write - things like "str << str1 << str2 << ..." */ - //@{ - /// as += - wxString& operator<<(const wxString& s) - { - wxASSERT( s.GetStringData()->IsValid() ); - - ConcatSelf(s.Len(), s); - return *this; - } - /// as += - wxString& operator<<(const char *psz) - { ConcatSelf(Strlen(psz), psz); return *this; } - /// as += - wxString& operator<<(char ch) { ConcatSelf(1, &ch); return *this; } - //@} - - //@{ - /// string += string - void operator+=(const wxString& s) { (void)operator<<(s); } - /// string += C string - void operator+=(const char *psz) { (void)operator<<(psz); } - /// string += char - void operator+=(char ch) { (void)operator<<(ch); } - //@} - - /** @name return resulting string */ - //@{ - /// - friend wxString operator+(const wxString& string1, const wxString& string2); - /// - friend wxString operator+(const wxString& string, char ch); - /// - friend wxString operator+(char ch, const wxString& string); - /// - friend wxString operator+(const wxString& string, const char *psz); - /// - friend wxString operator+(const char *psz, const wxString& string); - //@} - //@} - - /** @name string comparison */ - //@{ - /** - case-sensitive comparison - @return 0 if equal, +1 if greater or -1 if less - @see CmpNoCase, IsSameAs - */ - int Cmp(const char *psz) const { return strcmp(c_str(), psz); } - /** - case-insensitive comparison, return code as for wxString::Cmp() - @see: Cmp, IsSameAs - */ - int CmpNoCase(const char *psz) const { return Stricmp(c_str(), psz); } - /** - test for string equality, case-sensitive (default) or not - @param bCase is TRUE by default (case matters) - @return TRUE if strings are equal, FALSE otherwise - @see Cmp, CmpNoCase - */ - bool IsSameAs(const char *psz, bool bCase = TRUE) const - { return !(bCase ? Cmp(psz) : CmpNoCase(psz)); } - //@} - - /** @name other standard string operations */ - //@{ - /** @name simple sub-string extraction - */ - //@{ - /** - return substring starting at nFirst of length - nCount (or till the end if nCount = default value) - */ - wxString Mid(size_t nFirst, size_t nCount = STRING_MAXLEN) const; - /// get first nCount characters - wxString Left(size_t nCount) const; - /// get all characters before the first occurence of ch - /// (returns the whole string if ch not found) - wxString Left(char ch) const; - /// get all characters before the last occurence of ch - /// (returns empty string if ch not found) - wxString Before(char ch) const; - /// get all characters after the first occurence of ch - /// (returns empty string if ch not found) - wxString After(char ch) const; - /// get last nCount characters - wxString Right(size_t nCount) const; - /// get all characters after the last occurence of ch - /// (returns the whole string if ch not found) - wxString Right(char ch) const; - //@} - - /** @name case conversion */ - //@{ - /// - wxString& MakeUpper(); - /// - wxString& MakeLower(); - //@} - - /** @name trimming/padding whitespace (either side) and truncating */ - //@{ - /// remove spaces from left or from right (default) side - wxString& Trim(bool bFromRight = TRUE); - /// add nCount copies chPad in the beginning or at the end (default) - wxString& Pad(size_t nCount, char chPad = ' ', bool bFromRight = TRUE); - /// truncate string to given length - wxString& Truncate(size_t uiLen); - //@} - - /** @name searching and replacing */ - //@{ - /// searching (return starting index, or -1 if not found) - int Find(char ch, bool bFromEnd = FALSE) const; // like strchr/strrchr - /// searching (return starting index, or -1 if not found) - int Find(const char *pszSub) const; // like strstr - /** - replace first (or all) occurences of substring with another one - @param bReplaceAll: global replace (default) or only the first occurence - @return the number of replacements made - */ - size_t Replace(const char *szOld, const char *szNew, bool bReplaceAll = TRUE); - //@} - - /// check if the string contents matches a mask containing '*' and '?' - bool Matches(const char *szMask) const; - //@} - - /** @name formated input/output */ - //@{ - /// as sprintf(), returns the number of characters written or < 0 on error - int Printf(const char *pszFormat, ...); - /// as vprintf(), returns the number of characters written or < 0 on error - int PrintfV(const char* pszFormat, va_list argptr); - //@} - - /** @name raw access to string memory */ - //@{ - /// ensure that string has space for at least nLen characters - // only works if the data of this string is not shared - void Alloc(size_t nLen); - /// minimize the string's memory - // only works if the data of this string is not shared - void Shrink(); - /** - get writable buffer of at least nLen bytes. - Unget() *must* be called a.s.a.p. to put string back in a reasonable - state! - */ - char *GetWriteBuf(size_t nLen); - /// call this immediately after GetWriteBuf() has been used - void UngetWriteBuf(); - //@} - - /** @name wxWindows compatibility functions */ - //@{ - /// values for second parameter of CompareTo function - enum caseCompare {exact, ignoreCase}; - /// values for first parameter of Strip function - enum stripType {leading = 0x1, trailing = 0x2, both = 0x3}; - /// same as Printf() - inline int sprintf(const char *pszFormat, ...) - { - va_list argptr; - va_start(argptr, pszFormat); - int iLen = PrintfV(pszFormat, argptr); - va_end(argptr); - return iLen; - } - - /// same as Cmp - inline int CompareTo(const char* psz, caseCompare cmp = exact) const - { return cmp == exact ? Cmp(psz) : CmpNoCase(psz); } - - /// same as Mid (substring extraction) - inline wxString operator()(size_t start, size_t len) const - { return Mid(start, len); } - - /// same as += or << - inline wxString& Append(const char* psz) { return *this << psz; } - inline wxString& Append(char ch, int count = 1) - { wxString str(ch, count); (*this) += str; return *this; } - - /// - wxString& Prepend(const wxString& str) - { *this = str + *this; return *this; } - /// same as Len - size_t Length() const { return Len(); } - /// same as MakeLower - void LowerCase() { MakeLower(); } - /// same as MakeUpper - void UpperCase() { MakeUpper(); } - /// same as Trim except that it doesn't change this string - wxString Strip(stripType w = trailing) const; - - /// same as Find (more general variants not yet supported) - size_t Index(const char* psz) const { return Find(psz); } - size_t Index(char ch) const { return Find(ch); } - /// same as Truncate - wxString& Remove(size_t pos) { return Truncate(pos); } - wxString& RemoveLast() { return Truncate(Len() - 1); } - - wxString& Remove(size_t nStart, size_t nLen) { return erase( nStart, nLen ); } - - int First( const char ch ) const { return Find(ch); } - int First( const char* psz ) const { return Find(psz); } - int First( const wxString &str ) const { return Find(str); } - - int Last( const char ch ) const { return Find(ch, TRUE); } - - /// same as IsEmpty - bool IsNull() const { return IsEmpty(); } - //@} - -#ifdef STD_STRING_COMPATIBILITY - /** @name std::string compatibility functions */ - - /// an 'invalid' value for string index - static const size_t npos; - - //@{ - /** @name constructors */ - //@{ - /// take nLen chars starting at nPos - wxString(const wxString& str, size_t nPos, size_t nLen = npos) - { - wxASSERT( str.GetStringData()->IsValid() ); - InitWith(str.c_str(), nPos, nLen == npos ? 0 : nLen); - } - /// take all characters from pStart to pEnd - wxString(const void *pStart, const void *pEnd); - //@} - /** @name lib.string.capacity */ - //@{ - /// return the length of the string - size_t size() const { return Len(); } - /// return the length of the string - size_t length() const { return Len(); } - /// return the maximum size of the string - size_t max_size() const { return STRING_MAXLEN; } - /// resize the string, filling the space with c if c != 0 - void resize(size_t nSize, char ch = '\0'); - /// delete the contents of the string - void clear() { Empty(); } - /// returns true if the string is empty - bool empty() const { return IsEmpty(); } - //@} - /** @name lib.string.access */ - //@{ - /// return the character at position n - char at(size_t n) const { return GetChar(n); } - /// returns the writable character at position n - char& at(size_t n) { return GetWritableChar(n); } - //@} - /** @name lib.string.modifiers */ - //@{ - /** @name append something to the end of this one */ - //@{ - /// append a string - wxString& append(const wxString& str) - { *this += str; return *this; } - /// append elements str[pos], ..., str[pos+n] - wxString& append(const wxString& str, size_t pos, size_t n) - { ConcatSelf(n, str.c_str() + pos); return *this; } - /// append first n (or all if n == npos) characters of sz - wxString& append(const char *sz, size_t n = npos) - { ConcatSelf(n == npos ? Strlen(sz) : n, sz); return *this; } - - /// append n copies of ch - wxString& append(size_t n, char ch) { return Pad(n, ch); } - //@} - - /** @name replaces the contents of this string with another one */ - //@{ - /// same as `this_string = str' - wxString& assign(const wxString& str) { return (*this) = str; } - /// same as ` = str[pos..pos + n] - wxString& assign(const wxString& str, size_t pos, size_t n) - { return *this = wxString((const char *)str + pos, n); } - /// same as `= first n (or all if n == npos) characters of sz' - wxString& assign(const char *sz, size_t n = npos) - { return *this = wxString(sz, n); } - /// same as `= n copies of ch' - wxString& assign(size_t n, char ch) - { return *this = wxString(ch, n); } - - //@} - - /** @name inserts something at position nPos into this one */ - //@{ - /// insert another string - wxString& insert(size_t nPos, const wxString& str); - /// insert n chars of str starting at nStart (in str) - wxString& insert(size_t nPos, const wxString& str, size_t nStart, size_t n) - { return insert(nPos, wxString((const char *)str + nStart, n)); } - - /// insert first n (or all if n == npos) characters of sz - wxString& insert(size_t nPos, const char *sz, size_t n = npos) - { return insert(nPos, wxString(sz, n)); } - /// insert n copies of ch - wxString& insert(size_t nPos, size_t n, char ch) - { return insert(nPos, wxString(ch, n)); } - - //@} - - /** @name deletes a part of the string */ - //@{ - /// delete characters from nStart to nStart + nLen - wxString& erase(size_t nStart = 0, size_t nLen = npos); - //@} - - /** @name replaces a substring of this string with another one */ - //@{ - /// replaces the substring of length nLen starting at nStart - wxString& replace(size_t nStart, size_t nLen, const char* sz); - /// replaces the substring with nCount copies of ch - wxString& replace(size_t nStart, size_t nLen, size_t nCount, char ch); - /// replaces a substring with another substring - wxString& replace(size_t nStart, size_t nLen, - const wxString& str, size_t nStart2, size_t nLen2); - /// replaces the substring with first nCount chars of sz - wxString& replace(size_t nStart, size_t nLen, - const char* sz, size_t nCount); - //@} - //@} - - /// swap two strings - void swap(wxString& str); - - /** @name string operations */ - //@{ - /** All find() functions take the nStart argument which specifies - the position to start the search on, the default value is 0. - - All functions return npos if there were no match. - - @name string search - */ - //@{ - /** - @name find a match for the string/character in this string - */ - //@{ - /// find a substring - size_t find(const wxString& str, size_t nStart = 0) const; - - // VC++ 1.5 can't cope with this syntax. -#if ! (defined(_MSC_VER) && !defined(__WIN32__)) - /// find first n characters of sz - size_t find(const char* sz, size_t nStart = 0, size_t n = npos) const; -#endif - /// find the first occurence of character ch after nStart - size_t find(char ch, size_t nStart = 0) const; - - // wxWin compatibility - inline bool Contains(const wxString& str) { return Find(str) != -1; } - - //@} - - /** - @name rfind() family is exactly like find() but works right to left - */ - //@{ - /// as find, but from the end - size_t rfind(const wxString& str, size_t nStart = npos) const; - /// as find, but from the end - // VC++ 1.5 can't cope with this syntax. -#if ! (defined(_MSC_VER) && !defined(__WIN32__)) - size_t rfind(const char* sz, size_t nStart = npos, - size_t n = npos) const; - /// as find, but from the end - size_t rfind(char ch, size_t nStart = npos) const; -#endif - //@} - - /** - @name find first/last occurence of any character in the set - */ - //@{ - /// - size_t find_first_of(const wxString& str, size_t nStart = 0) const; - /// - size_t find_first_of(const char* sz, size_t nStart = 0) const; - /// same as find(char, size_t) - size_t find_first_of(char c, size_t nStart = 0) const; - - /// - size_t find_last_of (const wxString& str, size_t nStart = npos) const; - /// - size_t find_last_of (const char* s, size_t nStart = npos) const; - /// same as rfind(char, size_t) - size_t find_last_of (char c, size_t nStart = npos) const; - //@} - - /** - @name find first/last occurence of any character not in the set - */ - //@{ - /// - size_t find_first_not_of(const wxString& str, size_t nStart = 0) const; - /// - size_t find_first_not_of(const char* s, size_t nStart = 0) const; - /// - size_t find_first_not_of(char ch, size_t nStart = 0) const; - - /// - size_t find_last_not_of(const wxString& str, size_t nStart=npos) const; - /// - size_t find_last_not_of(const char* s, size_t nStart = npos) const; - /// - size_t find_last_not_of(char ch, size_t nStart = npos) const; - //@} - //@} - - /** - All compare functions return -1, 0 or 1 if the [sub]string - is less, equal or greater than the compare() argument. - - @name comparison - */ - //@{ - /// just like strcmp() - int compare(const wxString& str) const { return Cmp(str); } - /// comparison with a substring - int compare(size_t nStart, size_t nLen, const wxString& str) const; - /// comparison of 2 substrings - int compare(size_t nStart, size_t nLen, - const wxString& str, size_t nStart2, size_t nLen2) const; - /// just like strcmp() - int compare(const char* sz) const { return Cmp(sz); } - /// substring comparison with first nCount characters of sz - int compare(size_t nStart, size_t nLen, - const char* sz, size_t nCount = npos) const; - //@} - wxString substr(size_t nStart = 0, size_t nLen = npos) const; - //@} -#endif -}; - -// ---------------------------------------------------------------------------- -/** The string array uses it's knowledge of internal structure of the String - class to optimize string storage. Normally, we would store pointers to - string, but as String is, in fact, itself a pointer (sizeof(String) is - sizeof(char *)) we store these pointers instead. The cast to "String *" - is really all we need to turn such pointer into a string! - - Of course, it can be called a dirty hack, but we use twice less memory - and this approach is also more speed efficient, so it's probably worth it. - - Usage notes: when a string is added/inserted, a new copy of it is created, - so the original string may be safely deleted. When a string is retrieved - from the array (operator[] or Item() method), a reference is returned. - - @name wxArrayString - @memo probably the most commonly used array type - array of strings - */ -// ---------------------------------------------------------------------------- -class wxArrayString -{ -public: - /** @name ctors and dtor */ - //@{ - /// default ctor - wxArrayString(); - /// copy ctor - wxArrayString(const wxArrayString& array); - /// assignment operator - wxArrayString& operator=(const wxArrayString& src); - /// not virtual, this class can't be derived from - ~wxArrayString(); - //@} - - /** @name memory management */ - //@{ - /// empties the list, but doesn't release memory - void Empty(); - /// empties the list and releases memory - void Clear(); - /// preallocates memory for given number of items - void Alloc(size_t nCount); - /// minimzes the memory usage (by freeing all extra memory) - void Shrink(); - //@} - - /** @name simple accessors */ - //@{ - /// number of elements in the array - size_t Count() const { return m_nCount; } - /// is it empty? - bool IsEmpty() const { return m_nCount == 0; } - //@} - - /** @name items access (range checking is done in debug version) */ - //@{ - /// get item at position uiIndex - wxString& Item(size_t nIndex) const - { wxASSERT( nIndex < m_nCount ); return *(wxString *)&(m_pItems[nIndex]); } - /// same as Item() - wxString& operator[](size_t nIndex) const { return Item(nIndex); } - /// get last item - wxString& Last() const { wxASSERT( !IsEmpty() ); return Item(Count() - 1); } - //@} - - /** @name item management */ - //@{ - /** - Search the element in the array, starting from the either side - @param if bFromEnd reverse search direction - @param if bCase, comparison is case sensitive (default) - @return index of the first item matched or NOT_FOUND - @see NOT_FOUND - */ - int Index (const char *sz, bool bCase = TRUE, bool bFromEnd = FALSE) const; - /// add new element at the end - void Add (const wxString& str); - /// add new element at given position - void Insert(const wxString& str, size_t uiIndex); - /// remove first item matching this value - void Remove(const char *sz); - /// remove item by index - void Remove(size_t nIndex); - //@} - - /// sort array elements - void Sort(bool bCase = TRUE, bool bReverse = FALSE); - -private: - void Grow(); // makes array bigger if needed - void Free(); // free the string stored - - size_t m_nSize, // current size of the array - m_nCount; // current number of elements - - char **m_pItems; // pointer to data -}; - -// --------------------------------------------------------------------------- -/** @name wxString comparison functions - @memo Comparisons are case sensitive - */ -// --------------------------------------------------------------------------- -//@{ -inline bool operator==(const wxString& s1, const wxString& s2) { return s1.Cmp(s2) == 0; } -/// -inline bool operator==(const wxString& s1, const char * s2) { return s1.Cmp(s2) == 0; } -/// -inline bool operator==(const char * s1, const wxString& s2) { return s2.Cmp(s1) == 0; } -/// -inline bool operator!=(const wxString& s1, const wxString& s2) { return s1.Cmp(s2) != 0; } -/// -inline bool operator!=(const wxString& s1, const char * s2) { return s1.Cmp(s2) != 0; } -/// -inline bool operator!=(const char * s1, const wxString& s2) { return s2.Cmp(s1) != 0; } -/// -inline bool operator< (const wxString& s1, const wxString& s2) { return s1.Cmp(s2) < 0; } -/// -inline bool operator< (const wxString& s1, const char * s2) { return s1.Cmp(s2) < 0; } -/// -inline bool operator< (const char * s1, const wxString& s2) { return s2.Cmp(s1) > 0; } -/// -inline bool operator> (const wxString& s1, const wxString& s2) { return s1.Cmp(s2) > 0; } -/// -inline bool operator> (const wxString& s1, const char * s2) { return s1.Cmp(s2) > 0; } -/// -inline bool operator> (const char * s1, const wxString& s2) { return s2.Cmp(s1) < 0; } -/// -inline bool operator<=(const wxString& s1, const wxString& s2) { return s1.Cmp(s2) <= 0; } -/// -inline bool operator<=(const wxString& s1, const char * s2) { return s1.Cmp(s2) <= 0; } -/// -inline bool operator<=(const char * s1, const wxString& s2) { return s2.Cmp(s1) >= 0; } -/// -inline bool operator>=(const wxString& s1, const wxString& s2) { return s1.Cmp(s2) >= 0; } -/// -inline bool operator>=(const wxString& s1, const char * s2) { return s1.Cmp(s2) >= 0; } -/// -inline bool operator>=(const char * s1, const wxString& s2) { return s2.Cmp(s1) <= 0; } -//@} - -// --------------------------------------------------------------------------- -/** @name Global functions complementing standard C string library - @memo replacements for strlen() and portable strcasecmp() - */ -// --------------------------------------------------------------------------- - -#ifdef STD_STRING_COMPATIBILITY - -// fwd decl -class WXDLLEXPORT istream; - -istream& WXDLLEXPORT operator>>(istream& is, wxString& str); - -#endif //std::string compatibility - -#endif // _WX_WXSTRINGH__ - -//@} diff --git a/include/wx/stubs/accel.h b/include/wx/stubs/accel.h deleted file mode 100644 index 10e43ef5e8..0000000000 --- a/include/wx/stubs/accel.h +++ /dev/null @@ -1,80 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: accel.h -// Purpose: wxAcceleratorTable class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_ACCEL_H_ -#define _WX_ACCEL_H_ - -#ifdef __GNUG__ -#pragma interface "accel.h" -#endif - -#include "wx/object.h" -#include "wx/string.h" - -class WXDLLEXPORT wxAcceleratorTable; - -// Hold Ctrl key down -#define wxACCEL_ALT 0x01 - -// Hold Ctrl key down -#define wxACCEL_CTRL 0x02 - - // Hold Shift key down -#define wxACCEL_SHIFT 0x04 - - // Hold no key down -#define wxACCEL_NONE 0x00 - -class WXDLLEXPORT wxAcceleratorEntry -{ -public: - wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0) - { - m_flags = flags; m_keyCode = keyCode; m_command = cmd; - } - - inline void Set(int flags, int keyCode, int cmd) - { m_flags = flags; m_keyCode = keyCode; m_command = cmd; } - - inline int GetFlags() const { return m_flags; } - inline int GetKeyCode() const { return m_keyCode; } - inline int GetCommand() const { return m_command; } - - int m_flags; - int m_keyCode; // ASCII or virtual keycode - int m_command; // Command id to generate -}; - -class WXDLLEXPORT wxAcceleratorTable: public wxObject -{ -DECLARE_DYNAMIC_CLASS(wxAcceleratorTable) -public: - wxAcceleratorTable(); - wxAcceleratorTable(const wxString& resource); // Load from .rc resource - wxAcceleratorTable(int n, wxAcceleratorEntry entries[]); // Load from array - - // Copy constructors - inline wxAcceleratorTable(const wxAcceleratorTable& accel) { Ref(accel); } - inline wxAcceleratorTable(const wxAcceleratorTable* accel) { if (accel) Ref(*accel); } - - ~wxAcceleratorTable(); - - inline wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) { if (*this == accel) return (*this); Ref(accel); return *this; } - inline bool operator == (const wxAcceleratorTable& accel) { return m_refData == accel.m_refData; } - inline bool operator != (const wxAcceleratorTable& accel) { return m_refData != accel.m_refData; } - - bool Ok() const; -}; - -WXDLLEXPORT_DATA(extern wxAcceleratorTable) wxNullAcceleratorTable; - -#endif - // _WX_ACCEL_H_ diff --git a/include/wx/stubs/app.h b/include/wx/stubs/app.h deleted file mode 100644 index 3b1467fec5..0000000000 --- a/include/wx/stubs/app.h +++ /dev/null @@ -1,155 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: app.h -// Purpose: wxApp class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_APP_H_ -#define _WX_APP_H_ - -#ifdef __GNUG__ -#pragma interface "app.h" -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/gdicmn.h" -#include "wx/event.h" - -class WXDLLEXPORT wxFrame; -class WXDLLEXPORT wxWindow; -class WXDLLEXPORT wxApp ; -class WXDLLEXPORT wxKeyEvent; -class WXDLLEXPORT wxLog; - -#define wxPRINT_WINDOWS 1 -#define wxPRINT_POSTSCRIPT 2 - -WXDLLEXPORT_DATA(extern wxApp*) wxTheApp; - -void WXDLLEXPORT wxCleanUp(); -void WXDLLEXPORT wxCommonCleanUp(); // Call this from the platform's wxCleanUp() -void WXDLLEXPORT wxCommonInit(); // Call this from the platform's initialization - -// Force an exit from main loop -void WXDLLEXPORT wxExit(); - -// Yield to other apps/messages -bool WXDLLEXPORT wxYield(); - -// Represents the application. Derive OnInit and declare -// a new App object to start application -class WXDLLEXPORT wxApp: public wxEvtHandler -{ - DECLARE_DYNAMIC_CLASS(wxApp) - wxApp(); - inline ~wxApp() {} - - static void SetInitializerFunction(wxAppInitializerFunction fn) { m_appInitFn = fn; } - static wxAppInitializerFunction GetInitializerFunction() { return m_appInitFn; } - - virtual int MainLoop(); - void ExitMainLoop(); - bool Initialized(); - virtual bool Pending() ; - virtual void Dispatch() ; - - virtual void OnIdle(wxIdleEvent& event); - -// Generic - virtual bool OnInit() { return FALSE; }; - - // No specific tasks to do here. - virtual bool OnInitGui() { return TRUE; } - - // Called to set off the main loop - virtual int OnRun() { return MainLoop(); }; - virtual int OnExit() { return 0; } - - inline void SetPrintMode(int mode) { m_printMode = mode; } - inline int GetPrintMode() const { return m_printMode; } - - inline void SetExitOnFrameDelete(bool flag) { m_exitOnFrameDelete = flag; } - inline bool GetExitOnFrameDelete() const { return m_exitOnFrameDelete; } - - inline wxString GetAppName() const { - if (m_appName != "") - return m_appName; - else return m_className; - } - - inline void SetAppName(const wxString& name) { m_appName = name; }; - inline wxString GetClassName() const { return m_className; } - inline void SetClassName(const wxString& name) { m_className = name; } - - void SetVendorName(const wxString& vendorName) { m_vendorName = vendorName; } - const wxString& GetVendorName() const { return m_vendorName; } - - wxWindow *GetTopWindow() const ; - inline void SetTopWindow(wxWindow *win) { m_topWindow = win; } - - inline void SetWantDebugOutput(bool flag) { m_wantDebugOutput = flag; } - inline bool GetWantDebugOutput() { return m_wantDebugOutput; } - - // Send idle event to all top-level windows. - // Returns TRUE if more idle time is requested. - bool SendIdleEvents(); - - // Send idle event to window and all subwindows - // Returns TRUE if more idle time is requested. - bool SendIdleEvents(wxWindow* win); - - // Windows only, but for compatibility... - inline void SetAuto3D(bool flag) { m_auto3D = flag; } - inline bool GetAuto3D() const { return m_auto3D; } - - // Creates a log object - virtual wxLog* CreateLogTarget(); - -public: - // Will always be set to the appropriate, main-style values. - int argc; - char ** argv; - -protected: - bool m_wantDebugOutput ; - wxString m_className; - wxString m_appName, - m_vendorName; - wxWindow * m_topWindow; - bool m_exitOnFrameDelete; - bool m_showOnInit; - int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT - bool m_auto3D ; // Always use 3D controls, except - // where overriden - static wxAppInitializerFunction m_appInitFn; - -public: - - // Implementation - static void CommonInit(); - static void CommonCleanUp(); - void DeletePendingObjects(); - bool ProcessIdle(); - -public: - static long sm_lastMessageTime; - int m_nCmdShow; - -protected: - bool m_keepGoing ; - -DECLARE_EVENT_TABLE() -}; - -// TODO: add platform-specific arguments -int WXDLLEXPORT wxEntry( int argc, char *argv[] ); - -#endif - // _WX_APP_H_ - diff --git a/include/wx/stubs/bitmap.h b/include/wx/stubs/bitmap.h deleted file mode 100644 index 195944f835..0000000000 --- a/include/wx/stubs/bitmap.h +++ /dev/null @@ -1,198 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bitmap.h -// Purpose: wxBitmap class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_BITMAP_H_ -#define _WX_BITMAP_H_ - -#ifdef __GNUG__ -#pragma interface "bitmap.h" -#endif - -#include "wx/gdiobj.h" -#include "wx/gdicmn.h" -#include "wx/palette.h" - -// Bitmap -class WXDLLEXPORT wxDC; -class WXDLLEXPORT wxControl; -class WXDLLEXPORT wxBitmap; -class WXDLLEXPORT wxBitmapHandler; -class WXDLLEXPORT wxIcon; -class WXDLLEXPORT wxCursor; - -// A mask is a mono bitmap used for drawing bitmaps -// transparently. -class WXDLLEXPORT wxMask: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxMask) - -public: - wxMask(); - - // Construct a mask from a bitmap and a colour indicating - // the transparent area - wxMask(const wxBitmap& bitmap, const wxColour& colour); - - // Construct a mask from a bitmap and a palette index indicating - // the transparent area - wxMask(const wxBitmap& bitmap, int paletteIndex); - - // Construct a mask from a mono bitmap (copies the bitmap). - wxMask(const wxBitmap& bitmap); - - ~wxMask(); - - bool Create(const wxBitmap& bitmap, const wxColour& colour); - bool Create(const wxBitmap& bitmap, int paletteIndex); - bool Create(const wxBitmap& bitmap); - -/* TODO: platform-specific data access - // Implementation - inline WXHBITMAP GetMaskBitmap() const { return m_maskBitmap; } - inline void SetMaskBitmap(WXHBITMAP bmp) { m_maskBitmap = bmp; } -protected: - WXHBITMAP m_maskBitmap; -*/ -}; - -class WXDLLEXPORT wxBitmapRefData: public wxGDIRefData -{ - friend class WXDLLEXPORT wxBitmap; - friend class WXDLLEXPORT wxIcon; - friend class WXDLLEXPORT wxCursor; -public: - wxBitmapRefData(); - ~wxBitmapRefData(); - -public: - int m_width; - int m_height; - int m_depth; - bool m_ok; - int m_numColors; - wxPalette m_bitmapPalette; - int m_quality; - -/* WXHBITMAP m_hBitmap; TODO: platform-specific handle */ - wxMask * m_bitmapMask; // Optional mask -}; - -#define M_BITMAPDATA ((wxBitmapRefData *)m_refData) - -class WXDLLEXPORT wxBitmapHandler: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxBitmapHandler) -public: - wxBitmapHandler() { m_name = ""; m_extension = ""; m_type = 0; }; - - virtual bool Create(wxBitmap *bitmap, void *data, long flags, int width, int height, int depth = 1); - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth, int desiredHeight); - virtual bool SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL); - - inline void SetName(const wxString& name) { m_name = name; } - inline void SetExtension(const wxString& ext) { m_extension = ext; } - inline void SetType(long type) { m_type = type; } - inline wxString GetName() const { return m_name; } - inline wxString GetExtension() const { return m_extension; } - inline long GetType() const { return m_type; } -protected: - wxString m_name; - wxString m_extension; - long m_type; -}; - -#define M_BITMAPHANDLERDATA ((wxBitmapRefData *)bitmap->GetRefData()) - -class WXDLLEXPORT wxBitmap: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxBitmap) - - friend class WXDLLEXPORT wxBitmapHandler; - -public: - wxBitmap(); // Platform-specific - - // Copy constructors - inline wxBitmap(const wxBitmap& bitmap) - { Ref(bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); } - inline wxBitmap(const wxBitmap* bitmap) { if (bitmap) Ref(*bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); } - - // Initialize with raw data. - wxBitmap(const char bits[], int width, int height, int depth = 1); - -/* TODO: maybe implement XPM reading - // Initialize with XPM data - wxBitmap(const char **data); -*/ - - // Load a file or resource - // TODO: make default type whatever's appropriate for the platform. - wxBitmap(const wxString& name, long type = wxBITMAP_TYPE_BMP_RESOURCE); - - // Constructor for generalised creation from data - wxBitmap(void *data, long type, int width, int height, int depth = 1); - - // If depth is omitted, will create a bitmap compatible with the display - wxBitmap(int width, int height, int depth = -1); - ~wxBitmap(); - - virtual bool Create(int width, int height, int depth = -1); - virtual bool Create(void *data, long type, int width, int height, int depth = 1); - virtual bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_BMP_RESOURCE); - virtual bool SaveFile(const wxString& name, int type, const wxPalette *cmap = NULL); - - inline bool Ok() const { return (M_BITMAPDATA && M_BITMAPDATA->m_ok); } - inline int GetWidth() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_width : 0); } - inline int GetHeight() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_height : 0); } - inline int GetDepth() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_depth : 0); } - inline int GetQuality() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_quality : 0); } - void SetWidth(int w); - void SetHeight(int h); - void SetDepth(int d); - void SetQuality(int q); - void SetOk(bool isOk); - - inline wxPalette* GetPalette() const { return (M_BITMAPDATA ? (& M_BITMAPDATA->m_bitmapPalette) : NULL); } - void SetPalette(const wxPalette& palette); - - inline wxMask *GetMask() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_bitmapMask : NULL); } - void SetMask(wxMask *mask) ; - - inline wxBitmap& operator = (const wxBitmap& bitmap) { if (*this == bitmap) return (*this); Ref(bitmap); return *this; } - inline bool operator == (const wxBitmap& bitmap) { return m_refData == bitmap.m_refData; } - inline bool operator != (const wxBitmap& bitmap) { return m_refData != bitmap.m_refData; } - - // Format handling - static inline wxList& GetHandlers() { return sm_handlers; } - static void AddHandler(wxBitmapHandler *handler); - static void InsertHandler(wxBitmapHandler *handler); - static bool RemoveHandler(const wxString& name); - static wxBitmapHandler *FindHandler(const wxString& name); - static wxBitmapHandler *FindHandler(const wxString& extension, long bitmapType); - static wxBitmapHandler *FindHandler(long bitmapType); - - static void InitStandardHandlers(); - static void CleanUpHandlers(); -protected: - static wxList sm_handlers; - -/* - // TODO: Implementation -public: - void SetHBITMAP(WXHBITMAP bmp); - inline WXHBITMAP GetHBITMAP() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_hBitmap : 0); } - bool FreeResource(bool force = FALSE); -*/ - -}; -#endif - // _WX_BITMAP_H_ diff --git a/include/wx/stubs/bmpbuttn.h b/include/wx/stubs/bmpbuttn.h deleted file mode 100644 index defe39e438..0000000000 --- a/include/wx/stubs/bmpbuttn.h +++ /dev/null @@ -1,83 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bmpbuttn.h -// Purpose: wxBitmapButton class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_BMPBUTTN_H_ -#define _WX_BMPBUTTN_H_ - -#ifdef __GNUG__ -#pragma interface "bmpbuttn.h" -#endif - -#include "wx/button.h" - -WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr; - -#define wxDEFAULT_BUTTON_MARGIN 4 - -class WXDLLEXPORT wxBitmapButton: public wxButton -{ - DECLARE_DYNAMIC_CLASS(wxBitmapButton) - public: - inline wxBitmapButton() { m_marginX = wxDEFAULT_BUTTON_MARGIN; m_marginY = wxDEFAULT_BUTTON_MARGIN; } - inline wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) - { - Create(parent, id, bitmap, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); - - virtual void SetLabel(const wxBitmap& bitmap) - { - SetBitmapLabel(bitmap); - } - - virtual void SetBitmapLabel(const wxBitmap& bitmap); - - inline wxBitmap& GetBitmapLabel() const { return (wxBitmap&) m_buttonBitmap; } - inline wxBitmap& GetBitmapSelected() const { return (wxBitmap&) m_buttonBitmapSelected; } - inline wxBitmap& GetBitmapFocus() const { return (wxBitmap&) m_buttonBitmapFocus; } - inline wxBitmap& GetBitmapDisabled() const { return (wxBitmap&) m_buttonBitmapDisabled; } - - inline void SetBitmapSelected(const wxBitmap& sel) { m_buttonBitmapSelected = sel; }; - inline void SetBitmapFocus(const wxBitmap& focus) { m_buttonBitmapFocus = focus; }; - inline void SetBitmapDisabled(const wxBitmap& disabled) { m_buttonBitmapDisabled = disabled; }; - - inline void SetMargins(int x, int y) { m_marginX = x; m_marginY = y; } - inline int GetMarginX() { return m_marginX; } - inline int GetMarginY() { return m_marginY; } - -/* - // TODO: Implementation - virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item); - virtual void DrawFace( WXHDC dc, int left, int top, int right, int bottom, bool sel ); - virtual void DrawButtonFocus( WXHDC dc, int left, int top, int right, int bottom, bool sel ); - virtual void DrawButtonDisable( WXHDC dc, int left, int top, int right, int bottom, bool with_marg ); -*/ - - protected: - wxBitmap m_buttonBitmap; - wxBitmap m_buttonBitmapSelected; - wxBitmap m_buttonBitmapFocus; - wxBitmap m_buttonBitmapDisabled; - int m_marginX; - int m_marginY; -}; - -#endif - // _WX_BMPBUTTN_H_ diff --git a/include/wx/stubs/brush.h b/include/wx/stubs/brush.h deleted file mode 100644 index 2475bd0b24..0000000000 --- a/include/wx/stubs/brush.h +++ /dev/null @@ -1,86 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: brush.h -// Purpose: wxBrush class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_BRUSH_H_ -#define _WX_BRUSH_H_ - -#ifdef __GNUG__ -#pragma interface "brush.h" -#endif - -#include "wx/gdicmn.h" -#include "wx/gdiobj.h" -#include "wx/bitmap.h" - -class WXDLLEXPORT wxBrush; - -class WXDLLEXPORT wxBrushRefData: public wxGDIRefData -{ - friend class WXDLLEXPORT wxBrush; -public: - wxBrushRefData(); - wxBrushRefData(const wxBrushRefData& data); - ~wxBrushRefData(); - -protected: - int m_style; - wxBitmap m_stipple ; - wxColour m_colour; - -/* TODO: implementation - WXHBRUSH m_hBrush; -*/ -}; - -#define M_BRUSHDATA ((wxBrushRefData *)m_refData) - -// Brush -class WXDLLEXPORT wxBrush: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxBrush) - -public: - wxBrush(); - wxBrush(const wxColour& col, int style); - wxBrush(const wxString& col, int style); - wxBrush(const wxBitmap& stipple); - inline wxBrush(const wxBrush& brush) { Ref(brush); } - inline wxBrush(const wxBrush* brush) { if (brush) Ref(*brush); } - ~wxBrush(); - - virtual void SetColour(const wxColour& col) ; - virtual void SetColour(const wxString& col) ; - virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ; - virtual void SetStyle(int style) ; - virtual void SetStipple(const wxBitmap& stipple) ; - - inline wxBrush& operator = (const wxBrush& brush) { if (*this == brush) return (*this); Ref(brush); return *this; } - inline bool operator == (const wxBrush& brush) { return m_refData == brush.m_refData; } - inline bool operator != (const wxBrush& brush) { return m_refData != brush.m_refData; } - - inline wxColour& GetColour() const { return (M_BRUSHDATA ? M_BRUSHDATA->m_colour : wxNullColour); }; - inline int GetStyle() const { return (M_BRUSHDATA ? M_BRUSHDATA->m_style : 0); }; - inline wxBitmap *GetStipple() const { return (M_BRUSHDATA ? & M_BRUSHDATA->m_stipple : 0); }; - - virtual bool Ok() const { return (m_refData != NULL) ; } - -// Implementation - - // Useful helper: create the brush resource - void RealizeResource(); - - // When setting properties, we must make sure we're not changing - // another object - void Unshare(); -}; - -#endif - // _WX_BRUSH_H_ diff --git a/include/wx/stubs/button.h b/include/wx/stubs/button.h deleted file mode 100644 index 68b67d8c96..0000000000 --- a/include/wx/stubs/button.h +++ /dev/null @@ -1,53 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: button.h -// Purpose: wxButton class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_BUTTON_H_ -#define _WX_BUTTON_H_ - -#ifdef __GNUG__ -#pragma interface "button.h" -#endif - -#include "wx/control.h" -#include "wx/gdicmn.h" - -WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr; - -// Pushbutton -class WXDLLEXPORT wxButton: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxButton) - public: - inline wxButton() {} - inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); - - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - virtual void SetDefault(); - virtual void SetLabel(const wxString& label); - virtual wxString GetLabel() const ; - virtual void Command(wxCommandEvent& event); -}; - -#endif - // _WX_BUTTON_H_ diff --git a/include/wx/stubs/checkbox.h b/include/wx/stubs/checkbox.h deleted file mode 100644 index 8bf41d9958..0000000000 --- a/include/wx/stubs/checkbox.h +++ /dev/null @@ -1,81 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: checkbox.h -// Purpose: wxCheckBox class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_CHECKBOX_H_ -#define _WX_CHECKBOX_H_ - -#ifdef __GNUG__ -#pragma interface "checkbox.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxCheckBoxNameStr; - -// Checkbox item (single checkbox) -class WXDLLEXPORT wxBitmap; -class WXDLLEXPORT wxCheckBox: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxCheckBox) - - public: - inline wxCheckBox() { } - inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); - virtual void SetValue(bool); - virtual bool GetValue() const ; - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - virtual void SetLabel(const wxString& label); - virtual void Command(wxCommandEvent& event); -}; - -class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox -{ - DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox) - - public: - int checkWidth ; - int checkHeight ; - - inline wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; } - inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); - virtual void SetValue(bool); - virtual bool GetValue() const ; - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - virtual void SetLabel(const wxBitmap *bitmap); -}; -#endif - // _WX_CHECKBOX_H_ diff --git a/include/wx/stubs/checklst.h b/include/wx/stubs/checklst.h deleted file mode 100644 index 19b4ccb8d3..0000000000 --- a/include/wx/stubs/checklst.h +++ /dev/null @@ -1,47 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: checklst.h -// Purpose: wxCheckListBox class - a listbox with checkable items -// Note: this is an optional class. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_CHECKLST_H_ -#define _WX_CHECKLST_H_ - -#ifdef __GNUG__ -#pragma interface "checklst.h" -#endif - -#include "wx/listbox.h" - -typedef unsigned int size_t; - -class wxCheckListBox : public wxListBox -{ - DECLARE_DYNAMIC_CLASS(wxCheckListBox) -public: - // ctors - wxCheckListBox(); - wxCheckListBox(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int nStrings = 0, - const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); - - // items may be checked - bool IsChecked(size_t uiIndex) const; - void Check(size_t uiIndex, bool bCheck = TRUE); - - DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_CHECKLST_H_ diff --git a/include/wx/stubs/choice.h b/include/wx/stubs/choice.h deleted file mode 100644 index 7f360ed5cc..0000000000 --- a/include/wx/stubs/choice.h +++ /dev/null @@ -1,72 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: choice.h -// Purpose: wxChoice class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_CHOICE_H_ -#define _WX_CHOICE_H_ - -#ifdef __GNUG__ -#pragma interface "choice.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxChoiceNameStr; - -// Choice item -class WXDLLEXPORT wxChoice: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxChoice) - - public: - inline wxChoice() { m_noStrings = 0; } - - inline wxChoice(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr) - { - Create(parent, id, pos, size, n, choices, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr); - - virtual void Append(const wxString& item); - virtual void Delete(int n); - virtual void Clear(); - virtual int GetSelection() const ; - virtual void SetSelection(int n); - virtual int FindString(const wxString& s) const; - virtual wxString GetString(int n) const ; - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - virtual wxString GetStringSelection() const ; - virtual bool SetStringSelection(const wxString& sel); - - virtual inline int Number() const { return m_noStrings; } - virtual void Command(wxCommandEvent& event); - - virtual inline void SetColumns(int WXUNUSED(n) = 1 ) { /* No effect */ } ; - virtual inline int GetColumns() const { return 1 ; }; - -protected: - int m_noStrings; -}; - -#endif - // _WX_CHOICE_H_ diff --git a/include/wx/stubs/clipbrd.h b/include/wx/stubs/clipbrd.h deleted file mode 100644 index 697dc9d939..0000000000 --- a/include/wx/stubs/clipbrd.h +++ /dev/null @@ -1,104 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: clipbrd.h -// Purpose: Clipboard functionality. -// Note: this functionality is under review, and -// is derived from wxWindows 1.xx code. Please contact -// the wxWindows developers for further information. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_CLIPBRD_H_ -#define _WX_CLIPBRD_H_ - -#ifdef __GNUG__ -#pragma interface "clipbrd.h" -#endif - -#include "wx/defs.h" -#include "wx/setup.h" - -#include "wx/list.h" - -bool WXDLLEXPORT wxOpenClipboard(); -bool WXDLLEXPORT wxClipboardOpen(); -bool WXDLLEXPORT wxCloseClipboard(); -bool WXDLLEXPORT wxEmptyClipboard(); -bool WXDLLEXPORT wxIsClipboardFormatAvailable(int dataFormat); -bool WXDLLEXPORT wxSetClipboardData(int dataFormat, wxObject *obj, int width = 0, int height = 0); -wxObject* WXDLLEXPORT wxGetClipboardData(int dataFormat, long *len = NULL); -int WXDLLEXPORT wxEnumClipboardFormats(int dataFormat); -int WXDLLEXPORT wxRegisterClipboardFormat(char *formatName); -bool WXDLLEXPORT wxGetClipboardFormatName(int dataFormat, char *formatName, int maxCount); - -/* A clipboard client holds data belonging to the clipboard. - For plain text, a client is not necessary. */ -class WXDLLEXPORT wxClipboardClient : public wxObject -{ - DECLARE_ABSTRACT_CLASS(wxClipboardClient) - - public: - /* This list should be filled in with strings indicating the formats - this client can provide. Almost all clients will provide "TEXT". - Format names should be 4 characters long, so things will work - out on the Macintosh */ - wxStringList formats; - - /* This method is called when the client is losing the selection. */ - virtual void BeingReplaced() = 0; - - /* This method is called when someone wants the data this client is - supplying to the clipboard. "format" is a string indicating the - format of the data - one of the strings from the "formats" - list. "*size" should be filled with the size of the resulting - data. In the case of text, "*size" does not count the - NULL terminator. */ - virtual char *GetData(char *format, long *size) = 0; -}; - -/* ONE instance of this class: */ -class WXDLLEXPORT wxClipboard : public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxClipboard) - - public: - wxClipboardClient *clipOwner; - char *cbString, *sentString, *receivedString; - void *receivedTargets; - long receivedLength; - - wxClipboard(); - ~wxClipboard(); - - /* Set the clipboard data owner. "time" comes from the event record. */ - void SetClipboardClient(wxClipboardClient *, long time); - - /* Set the clipboard string; does not require a client. */ - void SetClipboardString(char *, long time); - - /* Get data from the clipboard in the format "TEXT". */ - char *GetClipboardString(long time); - - /* Get data from the clipboard */ - char *GetClipboardData(char *format, long *length, long time); - - /* Get the clipboard client directly. Will be NULL if clipboard data - is a string, or if some other application owns the clipboard. - This can be useful for shortcutting data translation, if the - clipboard user can check for a specific client. (This is used - by the wxMediaEdit class.) */ - wxClipboardClient *GetClipboardClient(); -}; - -/* Initialize wxTheClipboard. Can be called repeatedly */ -void WXDLLEXPORT wxInitClipboard(); - -/* The clipboard */ -WXDLLEXPORT_DATA(extern wxClipboard*) wxTheClipboard; - -#endif - // _WX_CLIPBRD_H_ diff --git a/include/wx/stubs/colordlg.h b/include/wx/stubs/colordlg.h deleted file mode 100644 index 556c2f316e..0000000000 --- a/include/wx/stubs/colordlg.h +++ /dev/null @@ -1,46 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: colordlg.h -// Purpose: wxColourDialog class. Use generic version if no -// platform-specific implementation. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_COLORDLG_H_ -#define _WX_COLORDLG_H_ - -#ifdef __GNUG__ -#pragma interface "colordlg.h" -#endif - -#include "wx/setup.h" -#include "wx/dialog.h" -#include "wx/cmndata.h" - -/* - * Platform-specific colour dialog implementation - */ - -class WXDLLEXPORT wxColourDialog: public wxDialog -{ -DECLARE_DYNAMIC_CLASS(wxColourDialog) -public: - wxColourDialog(); - wxColourDialog(wxWindow *parent, wxColourData *data = NULL); - - bool Create(wxWindow *parent, wxColourData *data = NULL); - - int ShowModal(); - wxColourData& GetColourData() { return m_colourData; } - -protected: - wxColourData m_colourData; - wxWindow* m_dialogParent; -}; - -#endif - // _WX_COLORDLG_H_ diff --git a/include/wx/stubs/colour.h b/include/wx/stubs/colour.h deleted file mode 100644 index 452d946cdc..0000000000 --- a/include/wx/stubs/colour.h +++ /dev/null @@ -1,73 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: colour.h -// Purpose: wxColour class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_COLOUR_H_ -#define _WX_COLOUR_H_ - -#ifdef __GNUG__ -#pragma interface "colour.h" -#endif - -#include "wx/object.h" -#include "wx/string.h" - -// Colour -class WXDLLEXPORT wxColour: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxColour) -public: - wxColour(); - wxColour(unsigned char r, unsigned char g, unsigned char b); - wxColour(unsigned long colRGB) { Set(colRGB); } - wxColour(const wxColour& col); - wxColour(const wxString& col); - ~wxColour() ; - wxColour& operator =(const wxColour& src) ; - wxColour& operator =(const wxString& src) ; - inline int Ok() const { return (m_isInit) ; } - - void Set(unsigned char r, unsigned char g, unsigned char b); - void Set(unsigned long colRGB) - { - // we don't need to know sizeof(long) here because we assume that the three - // least significant bytes contain the R, G and B values - Set((unsigned char)colRGB, - (unsigned char)(colRGB >> 8), - (unsigned char)(colRGB >> 16)); - } - - inline unsigned char Red() const { return m_red; } - inline unsigned char Green() const { return m_green; } - inline unsigned char Blue() const { return m_blue; } - - inline bool operator == (const wxColour& colour) { return (m_red == colour.m_red && m_green == colour.m_green && m_blue == colour.m_blue); } - - inline bool operator != (const wxColour& colour) { return (!(m_red == colour.m_red && m_green == colour.m_green && m_blue == colour.m_blue)); } - -/* TODO - WXCOLORREF GetPixel() const { return m_pixel; }; -*/ - - private: - bool m_isInit; - unsigned char m_red; - unsigned char m_blue; - unsigned char m_green; - public: -/* TODO: implementation - WXCOLORREF m_pixel ; -*/ -}; - -#define wxColor wxColour - -#endif - // _WX_COLOUR_H_ diff --git a/include/wx/stubs/combobox.h b/include/wx/stubs/combobox.h deleted file mode 100644 index 86895e561c..0000000000 --- a/include/wx/stubs/combobox.h +++ /dev/null @@ -1,78 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: combobox.h -// Purpose: wxComboBox class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_COMBOBOX_H_ -#define _WX_COMBOBOX_H_ - -#ifdef __GNUG__ -#pragma interface "combobox.h" -#endif - -#include "wx/choice.h" - -WXDLLEXPORT_DATA(extern const char*) wxComboBoxNameStr; -WXDLLEXPORT_DATA(extern const char*) wxEmptyString; - -// Combobox item -class WXDLLEXPORT wxComboBox: public wxChoice -{ - DECLARE_DYNAMIC_CLASS(wxComboBox) - - public: - inline wxComboBox() {} - - inline wxComboBox(wxWindow *parent, wxWindowID id, - const wxString& value = wxEmptyString, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr) - { - Create(parent, id, value, pos, size, n, choices, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxString& value = wxEmptyString, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); - - // List functions: see wxChoice - - // Text field functions - virtual wxString GetValue() const ; - virtual void SetValue(const wxString& value); - - // Clipboard operations - virtual void Copy(); - virtual void Cut(); - virtual void Paste(); - virtual void SetInsertionPoint(long pos); - virtual void SetInsertionPointEnd(); - virtual long GetInsertionPoint() const ; - virtual long GetLastPosition() const ; - virtual void Replace(long from, long to, const wxString& value); - virtual void Remove(long from, long to); - virtual void SetSelection(int n) - { - wxChoice::SetSelection(n); - } - virtual void SetSelection(long from, long to); - virtual void SetEditable(bool editable); -}; - -#endif - // _WX_COMBOBOX_H_ diff --git a/include/wx/stubs/control.h b/include/wx/stubs/control.h deleted file mode 100644 index 5432b5c5e7..0000000000 --- a/include/wx/stubs/control.h +++ /dev/null @@ -1,50 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: control.h -// Purpose: wxControl class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_CONTROL_H_ -#define _WX_CONTROL_H_ - -#ifdef __GNUG__ -#pragma interface "control.h" -#endif - -#include "wx/window.h" -#include "wx/list.h" -#include "wx/validate.h" - -// General item class -class WXDLLEXPORT wxControl: public wxWindow -{ - DECLARE_ABSTRACT_CLASS(wxControl) -public: - wxControl(); - ~wxControl(); - - virtual void Command(wxCommandEvent& WXUNUSED(event)) = 0; // Simulates an event - virtual void ProcessCommand(wxCommandEvent& event); // Calls the callback and - // appropriate event handlers - virtual void SetLabel(const wxString& label); - virtual wxString GetLabel() const ; - - // Places item in centre of panel - so can't be used BEFORE panel->Fit() - void Centre(int direction = wxHORIZONTAL); - inline void Callback(const wxFunction function) { m_callback = function; }; // Adds callback - - inline wxFunction GetCallback() { return m_callback; } - -protected: - wxFunction m_callback; // Callback associated with the window - -DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_CONTROL_H_ diff --git a/include/wx/stubs/cursor.h b/include/wx/stubs/cursor.h deleted file mode 100644 index 027745838a..0000000000 --- a/include/wx/stubs/cursor.h +++ /dev/null @@ -1,76 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: cursor.h -// Purpose: wxCursor class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_CURSOR_H_ -#define _WX_CURSOR_H_ - -#ifdef __GNUG__ -#pragma interface "cursor.h" -#endif - -#include "wx/bitmap.h" - -class WXDLLEXPORT wxCursorRefData: public wxBitmapRefData -{ - friend class WXDLLEXPORT wxBitmap; - friend class WXDLLEXPORT wxCursor; -public: - wxCursorRefData(); - ~wxCursorRefData(); - -protected: -/* TODO: implementation - WXHCURSOR m_hCursor; -*/ -}; - -#define M_CURSORDATA ((wxCursorRefData *)m_refData) -#define M_CURSORHANDLERDATA ((wxCursorRefData *)bitmap->m_refData) - -// Cursor -class WXDLLEXPORT wxCursor: public wxBitmap -{ - DECLARE_DYNAMIC_CLASS(wxCursor) - -public: - wxCursor(); - - // Copy constructors - inline wxCursor(const wxCursor& cursor) { Ref(cursor); } - inline wxCursor(const wxCursor* cursor) { if (cursor) Ref(*cursor); } - - wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1, - const char maskBits[] = NULL); - - /* TODO: make default type suit platform */ - wxCursor(const wxString& name, long flags = wxBITMAP_TYPE_CUR_RESOURCE, - int hotSpotX = 0, int hotSpotY = 0); - - wxCursor(int cursor_type); - ~wxCursor(); - - // TODO: also verify the internal cursor handle - virtual bool Ok() const { return (m_refData != NULL) ; } - - inline wxCursor& operator = (const wxCursor& cursor) { if (*this == cursor) return (*this); Ref(cursor); return *this; } - inline bool operator == (const wxCursor& cursor) { return m_refData == cursor.m_refData; } - inline bool operator != (const wxCursor& cursor) { return m_refData != cursor.m_refData; } - -/* TODO: implementation - void SetHCURSOR(WXHCURSOR cursor); - inline WXHCURSOR GetHCURSOR() const { return (M_CURSORDATA ? M_CURSORDATA->m_hCursor : 0); } -*/ -}; - -extern WXDLLEXPORT void wxSetCursor(const wxCursor& cursor); - -#endif - // _WX_CURSOR_H_ diff --git a/include/wx/stubs/dc.h b/include/wx/stubs/dc.h deleted file mode 100644 index f2c2ca6c4d..0000000000 --- a/include/wx/stubs/dc.h +++ /dev/null @@ -1,376 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dc.h -// Purpose: wxDC class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DC_H_ -#define _WX_DC_H_ - -#ifdef __GNUG__ -#pragma interface "dc.h" -#endif - -#include "wx/pen.h" -#include "wx/brush.h" -#include "wx/icon.h" -#include "wx/font.h" -#include "wx/gdicmn.h" - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -#ifndef MM_TEXT -#define MM_TEXT 0 -#define MM_ISOTROPIC 1 -#define MM_ANISOTROPIC 2 -#define MM_LOMETRIC 3 -#define MM_HIMETRIC 4 -#define MM_TWIPS 5 -#define MM_POINTS 6 -#define MM_METRIC 7 -#endif - -//----------------------------------------------------------------------------- -// global variables -//----------------------------------------------------------------------------- - -extern int wxPageNumber; - -//----------------------------------------------------------------------------- -// wxDC -//----------------------------------------------------------------------------- - -class WXDLLEXPORT wxDC: public wxObject -{ - DECLARE_ABSTRACT_CLASS(wxDC) - - public: - - wxDC(void); - ~wxDC(void); - - void BeginDrawing(void) {}; - void EndDrawing(void) {}; - - virtual bool Ok(void) const { return m_ok; }; - - virtual void FloodFill( long x1, long y1, wxColour* col, int style=wxFLOOD_SURFACE ) = 0; - inline void FloodFill(const wxPoint& pt, const wxColour& col, int style=wxFLOOD_SURFACE) - { - FloodFill(pt.x, pt.y, (wxColour*) & col, style); - } - - virtual bool GetPixel( long x1, long y1, wxColour *col ) const = 0; - inline bool GetPixel(const wxPoint& pt, wxColour *col) const - { - return GetPixel(pt.x, pt.y, col); - } - - virtual void DrawLine( long x1, long y1, long x2, long y2 ) = 0; - inline void DrawLine(const wxPoint& pt1, const wxPoint& pt2) - { - DrawLine(pt1.x, pt1.y, pt2.x, pt2.y); - } - - virtual void CrossHair( long x, long y ) = 0; - inline void CrossHair(const wxPoint& pt) - { - CrossHair(pt.x, pt.y); - } - - virtual void DrawArc( long x1, long y1, long x2, long y2, long xc, long yc ) = 0; - inline void DrawArc(const wxPoint& pt1, const wxPoint& pt2, const wxPoint& centre) - { - DrawArc(pt1.x, pt1.y, pt2.x, pt2.y, centre.x, centre.y); - } - - virtual void DrawEllipticArc( long x, long y, long width, long height, double sa, double ea ) = 0; - virtual void DrawEllipticArc (const wxPoint& pt, const wxSize& sz, double sa, double ea) - { - DrawEllipticArc(pt.x, pt.y, sz.x, sz.y, sa, ea); - } - - virtual void DrawPoint( long x, long y ) = 0; - virtual void DrawPoint( wxPoint& point ); - - virtual void DrawLines( int n, wxPoint points[], long xoffset = 0, long yoffset = 0 ) = 0; - virtual void DrawLines( wxList *points, long xoffset = 0, long yoffset = 0 ); - virtual void DrawPolygon( int n, wxPoint points[], long xoffset = 0, long yoffset = 0, - int fillStyle=wxODDEVEN_RULE ) = 0; - virtual void DrawPolygon( wxList *lines, long xoffset = 0, long yoffset = 0, - int fillStyle=wxODDEVEN_RULE ); - - virtual void DrawRectangle( long x, long y, long width, long height ) = 0; - inline void DrawRectangle(const wxPoint& pt, const wxSize& sz) - { - DrawRectangle(pt.x, pt.y, sz.x, sz.y); - } - inline void DrawRectangle(const wxRect& rect) - { - DrawRectangle(rect.x, rect.y, rect.width, rect.height); - } - virtual void DrawRoundedRectangle( long x, long y, long width, long height, double radius = 20.0 ) = 0; - inline void DrawRoundedRectangle(const wxPoint& pt, const wxSize& sz, double radius = 20.0) - { - DrawRoundedRectangle(pt.x, pt.y, sz.x, sz.y, radius); - } - inline void DrawRoundedRectangle(const wxRect& rect, double radius = 20.0) - { - DrawRoundedRectangle(rect.x, rect.y, rect.width, rect.height, radius); - } - - virtual void DrawEllipse( long x, long y, long width, long height ) = 0; - inline void DrawEllipse(const wxPoint& pt, const wxSize& sz) - { - DrawEllipse(pt.x, pt.y, sz.x, sz.y); - } - inline void DrawEllipse(const wxRect& rect) - { - DrawEllipse(rect.x, rect.y, rect.width, rect.height); - } - - virtual void DrawSpline( long x1, long y1, long x2, long y2, long x3, long y3 ); - virtual void DrawSpline( wxList *points ); - virtual void DrawSpline( int n, wxPoint points[] ); - - virtual bool CanDrawBitmap(void) const = 0; - - virtual void DrawIcon( const wxIcon &icon, long x, long y, bool useMask=FALSE ); - inline void DrawIcon(const wxIcon& icon, const wxPoint& pt) - { - DrawIcon(icon, pt.x, pt.y); - } - - // TODO DrawBitmap is not always the same as DrawIcon, especially if bitmaps and - // icons are implemented differently. - void DrawBitmap( const wxBitmap &bmp, long x, long y, bool useMask=FALSE ) - { DrawIcon( *((wxIcon*)(&bmp)), x, y, useMask ); } - - virtual bool Blit( long xdest, long ydest, long width, long height, - wxDC *source, long xsrc, long ysrc, int logical_func = wxCOPY, bool useMask=FALSE ) = 0; - inline bool Blit(const wxPoint& destPt, const wxSize& sz, - wxDC *source, const wxPoint& srcPt, int rop = wxCOPY, bool useMask = FALSE) - { - return Blit(destPt.x, destPt.y, sz.x, sz.y, source, srcPt.x, srcPt.y, rop, useMask); - } - - virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE ) = 0; - inline void DrawText(const wxString& text, const wxPoint& pt, bool use16bit = FALSE) - { - DrawText(text, pt.x, pt.y, use16bit); - } - - virtual bool CanGetTextExtent(void) const = 0; - virtual void GetTextExtent( const wxString &string, long *width, long *height, - long *descent = NULL, long *externalLeading = NULL, - wxFont *theFont = NULL, bool use16 = FALSE ) = 0; - virtual long GetCharWidth(void) = 0; - virtual long GetCharHeight(void) = 0; - - virtual void Clear(void) = 0; - - virtual void SetFont( const wxFont &font ) = 0; - virtual wxFont *GetFont(void) const { return (wxFont*) &m_font; }; - - virtual void SetPen( const wxPen &pen ) = 0; - virtual wxPen *GetPen(void) const { return (wxPen*) &m_pen; }; - - virtual void SetBrush( const wxBrush &brush ) = 0; - virtual wxBrush *GetBrush(void) const { return (wxBrush*) &m_brush; }; - - virtual void SetBackground( const wxBrush &brush ) = 0; - virtual wxBrush *GetBackground(void) const { return (wxBrush*) &m_backgroundBrush; }; - - virtual void SetLogicalFunction( int function ) = 0; - virtual int GetLogicalFunction(void) const { return m_logicalFunction; }; - - virtual void SetTextForeground( const wxColour &col ); - virtual void SetTextBackground( const wxColour &col ); - virtual wxColour& GetTextBackground(void) const { return (wxColour&)m_textBackgroundColour; }; - virtual wxColour& GetTextForeground(void) const { return (wxColour&)m_textForegroundColour; }; - - virtual void SetBackgroundMode( int mode ) = 0; - virtual int GetBackgroundMode(void) const { return m_backgroundMode; }; - - virtual void SetPalette( const wxPalette& palette ) = 0; - void SetColourMap( const wxPalette& palette ) { SetPalette(palette); }; - - // the first two must be overridden and called - virtual void SetClippingRegion( long x, long y, long width, long height ); - virtual void DestroyClippingRegion(void); - virtual void GetClippingBox( long *x, long *y, long *width, long *height ) const; - - virtual inline long MinX(void) const { return m_minX; } - virtual inline long MaxX(void) const { return m_maxX; } - virtual inline long MinY(void) const { return m_minY; } - virtual inline long MaxY(void) const { return m_maxY; } - - virtual void GetSize( int* width, int* height ) const; - inline wxSize GetSize(void) const { int w, h; GetSize(&w, &h); return wxSize(w, h); } - virtual void GetSizeMM( long* width, long* height ) const; - - virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return TRUE; }; - virtual void EndDoc(void) {}; - virtual void StartPage(void) {}; - virtual void EndPage(void) {}; - - virtual void SetMapMode( int mode ); - virtual int GetMapMode(void) const { return m_mappingMode; }; - - virtual void SetUserScale( double x, double y ); - virtual void GetUserScale( double *x, double *y ); - virtual void SetLogicalScale( double x, double y ); - virtual void GetLogicalScale( double *x, double *y ); - - virtual void SetLogicalOrigin( long x, long y ); - virtual void GetLogicalOrigin( long *x, long *y ); - virtual void SetDeviceOrigin( long x, long y ); - virtual void GetDeviceOrigin( long *x, long *y ); - virtual void SetInternalDeviceOrigin( long x, long y ); - virtual void GetInternalDeviceOrigin( long *x, long *y ); - - virtual void SetAxisOrientation( bool xLeftRight, bool yBottomUp ); - - virtual void SetOptimization( bool WXUNUSED(optimize) ) {}; - virtual bool GetOptimization(void) { return m_optimize; }; - - virtual long DeviceToLogicalX(long x) const; - virtual long DeviceToLogicalY(long y) const; - virtual long DeviceToLogicalXRel(long x) const; - virtual long DeviceToLogicalYRel(long y) const; - virtual long LogicalToDeviceX(long x) const; - virtual long LogicalToDeviceY(long y) const; - virtual long LogicalToDeviceXRel(long x) const; - virtual long LogicalToDeviceYRel(long y) const; - - public: - - void CalcBoundingBox( long x, long y ); - void ComputeScaleAndOrigin(void); - - long XDEV2LOG(long x) const - { - long new_x = x - m_deviceOriginX; - if (new_x > 0) - return (long)((double)(new_x) / m_scaleX + 0.5) * m_signX + m_logicalOriginX; - else - return (long)((double)(new_x) / m_scaleX - 0.5) * m_signX + m_logicalOriginX; - } - long XDEV2LOGREL(long x) const - { - if (x > 0) - return (long)((double)(x) / m_scaleX + 0.5); - else - return (long)((double)(x) / m_scaleX - 0.5); - } - long YDEV2LOG(long y) const - { - long new_y = y - m_deviceOriginY; - if (new_y > 0) - return (long)((double)(new_y) / m_scaleY + 0.5) * m_signY + m_logicalOriginY; - else - return (long)((double)(new_y) / m_scaleY - 0.5) * m_signY + m_logicalOriginY; - } - long YDEV2LOGREL(long y) const - { - if (y > 0) - return (long)((double)(y) / m_scaleY + 0.5); - else - return (long)((double)(y) / m_scaleY - 0.5); - } - long XLOG2DEV(long x) const - { - long new_x = x - m_logicalOriginX; - if (new_x > 0) - return (long)((double)(new_x) * m_scaleX + 0.5) * m_signX + m_deviceOriginX; - else - return (long)((double)(new_x) * m_scaleX - 0.5) * m_signX + m_deviceOriginX; - } - long XLOG2DEVREL(long x) const - { - if (x > 0) - return (long)((double)(x) * m_scaleX + 0.5); - else - return (long)((double)(x) * m_scaleX - 0.5); - } - long YLOG2DEV(long y) const - { - long new_y = y - m_logicalOriginY; - if (new_y > 0) - return (long)((double)(new_y) * m_scaleY + 0.5) * m_signY + m_deviceOriginY; - else - return (long)((double)(new_y) * m_scaleY - 0.5) * m_signY + m_deviceOriginY; - } - long YLOG2DEVREL(long y) const - { - if (y > 0) - return (long)((double)(y) * m_scaleY + 0.5); - else - return (long)((double)(y) * m_scaleY - 0.5); - } - - virtual void DrawOpenSpline( wxList *points ) = 0; - - public: - - bool m_ok; - bool m_colour; - - // not sure, what these mean - bool m_clipping; // Is clipping on right now ? - bool m_isInteractive; // Is GetPixel possible ? - bool m_autoSetting; // wxMSW only ? - bool m_dontDelete; // wxMSW only ? - bool m_optimize; // wxMSW only ? - wxString m_filename; // Not sure where this belongs. - - wxPen m_pen; - wxBrush m_brush; - wxBrush m_backgroundBrush; - wxColour m_textForegroundColour; - wxColour m_textBackgroundColour; - wxFont m_font; - - int m_logicalFunction; - int m_backgroundMode; - int m_textAlignment; // gone in wxWin 2.0 ? - - int m_mappingMode; - - // not sure what for, but what is a mm on a screen you don't know the size of? - double m_mm_to_pix_x,m_mm_to_pix_y; - - long m_internalDeviceOriginX,m_internalDeviceOriginY; // If un-scrolled is non-zero or - // d.o. changes with scrolling. - // Set using SetInternalDeviceOrigin(). - - long m_externalDeviceOriginX,m_externalDeviceOriginY; // To be set by external classes - // such as wxScrolledWindow - // using SetDeviceOrigin() - - long m_deviceOriginX,m_deviceOriginY; // Sum of the two above. - - long m_logicalOriginX,m_logicalOriginY; // User defined. - - double m_scaleX,m_scaleY; - double m_logicalScaleX,m_logicalScaleY; - double m_userScaleX,m_userScaleY; - long m_signX,m_signY; - - bool m_needComputeScaleX,m_needComputeScaleY; // not yet used - - float m_scaleFactor; // wxPSDC wants to have this. Will disappear. - - long m_clipX1,m_clipY1,m_clipX2,m_clipY2; - long m_minX,m_maxX,m_minY,m_maxY; -}; - -#endif - // _WX_DC_H_ diff --git a/include/wx/stubs/dcclient.h b/include/wx/stubs/dcclient.h deleted file mode 100644 index ce81dec72c..0000000000 --- a/include/wx/stubs/dcclient.h +++ /dev/null @@ -1,101 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcclient.h -// Purpose: wxClientDC, wxPaintDC and wxWindowDC classes -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DCCLIENT_H_ -#define _WX_DCCLIENT_H_ - -#ifdef __GNUG__ -#pragma interface "dcclient.h" -#endif - -#include "wx/dc.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class WXDLLEXPORT wxPaintDC; -class WXDLLEXPORT wxWindow; - -// Under Windows, wxClientDC, wxPaintDC and wxWindowDC are implemented differently. -// On many platforms, however, they will be the same. - -typedef wxPaintDC wxClientDC; -typedef wxPaintDC wxWindowDC; - -//----------------------------------------------------------------------------- -// wxPaintDC -//----------------------------------------------------------------------------- - -class WXDLLEXPORT wxPaintDC: public wxDC -{ - DECLARE_DYNAMIC_CLASS(wxPaintDC) - - public: - - wxPaintDC(void); - wxPaintDC( wxWindow *win ); - - ~wxPaintDC(void); - - virtual void FloodFill( long x1, long y1, wxColour* col, int style=wxFLOOD_SURFACE ); - virtual bool GetPixel( long x1, long y1, wxColour *col ) const; - - virtual void DrawLine( long x1, long y1, long x2, long y2 ); - virtual void CrossHair( long x, long y ); - virtual void DrawArc( long x1, long y1, long x2, long y2, long xc, long yc ); - virtual void DrawEllipticArc( long x, long y, long width, long height, double sa, double ea ); - virtual void DrawPoint( long x, long y ); - - virtual void DrawLines( int n, wxPoint points[], long xoffset = 0, long yoffset = 0 ); - virtual void DrawLines( wxList *points, long xoffset = 0, long yoffset = 0 ); - virtual void DrawPolygon( int n, wxPoint points[], long xoffset = 0, long yoffset = 0, - int fillStyle=wxODDEVEN_RULE ); - virtual void DrawPolygon( wxList *lines, long xoffset = 0, long yoffset = 0, - int fillStyle=wxODDEVEN_RULE ); - - virtual void DrawRectangle( long x, long y, long width, long height ); - virtual void DrawRoundedRectangle( long x, long y, long width, long height, double radius = 20.0 ); - virtual void DrawEllipse( long x, long y, long width, long height ); - - virtual bool CanDrawBitmap(void) const; - virtual void DrawIcon( const wxIcon &icon, long x, long y, bool useMask=FALSE ); - virtual bool Blit( long xdest, long ydest, long width, long height, - wxDC *source, long xsrc, long ysrc, int logical_func = wxCOPY, bool useMask=FALSE ); - - virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE ); - virtual bool CanGetTextExtent(void) const; - virtual void GetTextExtent( const wxString &string, long *width, long *height, - long *descent = NULL, long *externalLeading = NULL, - wxFont *theFont = NULL, bool use16 = FALSE ); - virtual long GetCharWidth(void); - virtual long GetCharHeight(void); - - virtual void Clear(void); - - virtual void SetFont( const wxFont &font ); - virtual void SetPen( const wxPen &pen ); - virtual void SetBrush( const wxBrush &brush ); - virtual void SetBackground( const wxBrush &brush ); - virtual void SetLogicalFunction( int function ); - virtual void SetTextForeground( const wxColour &col ); - virtual void SetTextBackground( const wxColour &col ); - virtual void SetBackgroundMode( int mode ); - virtual void SetPalette( const wxPalette& palette ); - - virtual void SetClippingRegion( long x, long y, long width, long height ); - virtual void DestroyClippingRegion(void); - - virtual void DrawOpenSpline( wxList *points ); -}; - -#endif - // _WX_DCCLIENT_H_ diff --git a/include/wx/stubs/dcmemory.h b/include/wx/stubs/dcmemory.h deleted file mode 100644 index c6c5737642..0000000000 --- a/include/wx/stubs/dcmemory.h +++ /dev/null @@ -1,38 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcmemory.h -// Purpose: wxMemoryDC class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DCMEMORY_H_ -#define _WX_DCMEMORY_H_ - -#ifdef __GNUG__ -#pragma interface "dcmemory.h" -#endif - -#include "wx/dcclient.h" - -class WXDLLEXPORT wxMemoryDC: public wxPaintDC -{ - DECLARE_DYNAMIC_CLASS(wxMemoryDC) - - public: - wxMemoryDC(void); - wxMemoryDC( wxDC *dc ); // Create compatible DC - ~wxMemoryDC(void); - virtual void SelectObject( const wxBitmap& bitmap ); - void GetSize( int *width, int *height ) const; - - private: - friend wxPaintDC; - wxBitmap m_selected; -}; - -#endif - // _WX_DCMEMORY_H_ diff --git a/include/wx/stubs/dcprint.h b/include/wx/stubs/dcprint.h deleted file mode 100644 index 2ea66d15bf..0000000000 --- a/include/wx/stubs/dcprint.h +++ /dev/null @@ -1,34 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcprint.h -// Purpose: wxPrinterDC class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DCPRINT_H_ -#define _WX_DCPRINT_H_ - -#ifdef __GNUG__ -#pragma interface "dcprint.h" -#endif - -#include "wx/dc.h" - -class WXDLLEXPORT wxPrinterDC: public wxDC -{ - public: - DECLARE_CLASS(wxPrinterDC) - - // Create a printer DC - wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = TRUE, int orientation = wxPORTRAIT); - - ~wxPrinterDC(); -}; - -#endif - // _WX_DCPRINT_H_ - diff --git a/include/wx/stubs/dcscreen.h b/include/wx/stubs/dcscreen.h deleted file mode 100644 index 12d4996e70..0000000000 --- a/include/wx/stubs/dcscreen.h +++ /dev/null @@ -1,39 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcscreen.h -// Purpose: wxScreenDC class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DCSCREEN_H_ -#define _WX_DCSCREEN_H_ - -#ifdef __GNUG__ -#pragma interface "dcscreen.h" -#endif - -#include "wx/dcclient.h" - -class WXDLLEXPORT wxScreenDC: public wxPaintDC -{ - DECLARE_DYNAMIC_CLASS(wxScreenDC) - - public: - // Create a DC representing the whole screen - wxScreenDC(); - ~wxScreenDC(); - - // Compatibility with X's requirements for - // drawing on top of all windows - static bool StartDrawingOnTop(wxWindow* WXUNUSED(window)) { return TRUE; } - static bool StartDrawingOnTop(wxRectangle* WXUNUSED(rect) = NULL) { return TRUE; } - static bool EndDrawingOnTop() { return TRUE; } -}; - -#endif - // _WX_DCSCREEN_H_ - diff --git a/include/wx/stubs/dialog.h b/include/wx/stubs/dialog.h deleted file mode 100644 index ebd7bff2a8..0000000000 --- a/include/wx/stubs/dialog.h +++ /dev/null @@ -1,98 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dialog.h -// Purpose: wxDialog class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DIALOG_H_ -#define _WX_DIALOG_H_ - -#ifdef __GNUG__ -#pragma interface "dialog.h" -#endif - -#include "wx/panel.h" - -WXDLLEXPORT_DATA(extern const char*) wxDialogNameStr; - -// Dialog boxes -class WXDLLEXPORT wxDialog: public wxPanel -{ - DECLARE_DYNAMIC_CLASS(wxDialog) -public: - - wxDialog(); - - // Constructor with a modal flag, but no window id - the old convention - inline wxDialog(wxWindow *parent, - const wxString& title, bool modal, - int x = -1, int y= -1, int width = 500, int height = 500, - long style = wxDEFAULT_DIALOG_STYLE, - const wxString& name = wxDialogNameStr) - { - long modalStyle = modal ? wxDIALOG_MODAL : wxDIALOG_MODELESS ; - Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), style|modalStyle, name); - } - - // Constructor with no modal flag - the new convention. - inline wxDialog(wxWindow *parent, wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, - const wxString& name = wxDialogNameStr) - { - Create(parent, id, title, pos, size, style, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxString& title, // bool modal = FALSE, // TODO make this a window style? - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, - const wxString& name = wxDialogNameStr); - - ~wxDialog(); - - virtual bool Destroy(); - void SetClientSize(int width, int height); - void GetPosition(int *x, int *y) const; - bool Show(bool show); - void Iconize(bool iconize); - - virtual bool IsIconized() const; - void Fit(); - - void SetTitle(const wxString& title); - wxString GetTitle() const ; - - bool OnClose(); - void OnCharHook(wxKeyEvent& event); - void OnCloseWindow(wxCloseEvent& event); - - void SetModal(bool flag); - - virtual void Centre(int direction = wxBOTH); - virtual bool IsModal() const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); } - - virtual int ShowModal(); - virtual void EndModal(int retCode); - - // Standard buttons - void OnOK(wxCommandEvent& event); - void OnApply(wxCommandEvent& event); - void OnCancel(wxCommandEvent& event); - - // Responds to colour changes - void OnSysColourChanged(wxSysColourChangedEvent& event); - -DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_DIALOG_H_ diff --git a/include/wx/stubs/dirdlg.h b/include/wx/stubs/dirdlg.h deleted file mode 100644 index 44f96238e2..0000000000 --- a/include/wx/stubs/dirdlg.h +++ /dev/null @@ -1,49 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dirdlg.h -// Purpose: wxDirDialog class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DIRDLG_H_ -#define _WX_DIRDLG_H_ - -#ifdef __GNUG__ -#pragma interface "dirdlg.h" -#endif - -#include "wx/dialog.h" - -WXDLLEXPORT_DATA(extern const char*) wxFileSelectorPromptStr; - -class WXDLLEXPORT wxDirDialog: public wxDialog -{ -DECLARE_DYNAMIC_CLASS(wxDirDialog) -public: - wxDirDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, - const wxString& defaultPath = "", - long style = 0, const wxPoint& pos = wxDefaultPosition); - - inline void SetMessage(const wxString& message) { m_message = message; } - inline void SetPath(const wxString& path) { m_path = path; } - inline void SetStyle(long style) { m_dialogStyle = style; } - - inline wxString GetMessage() const { return m_message; } - inline wxString GetPath() const { return m_path; } - inline long GetStyle() const { return m_dialogStyle; } - - int ShowModal(); - -protected: - wxString m_message; - long m_dialogStyle; - wxWindow * m_parent; - wxString m_path; -}; - -#endif - // _WX_DIRDLG_H_ diff --git a/include/wx/stubs/dnd.h b/include/wx/stubs/dnd.h deleted file mode 100644 index 2d3ad2f737..0000000000 --- a/include/wx/stubs/dnd.h +++ /dev/null @@ -1,238 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: dnd.h -// Purpose: Declaration of the wxDropTarget, wxDropSource class etc. -// Author: AUTHOR -// RCS-ID: $Id$ -// Copyright: (c) 1998 AUTHOR -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_DND_H_ -#define _WX_DND_H_ - -#ifdef __GNUG__ -#pragma interface "dnd.h" -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/string.h" -#include "wx/cursor.h" - -//------------------------------------------------------------------------- -// classes -//------------------------------------------------------------------------- - -class WXDLLEXPORT wxWindow; - -class WXDLLEXPORT wxDataObject; -class WXDLLEXPORT wxTextDataObject; -class WXDLLEXPORT wxFileDataObject; - -class WXDLLEXPORT wxDropTarget; -class WXDLLEXPORT wxTextDropTarget; -class WXDLLEXPORT wxFileDropTarget; - -class WXDLLEXPORT wxDropSource; - -//------------------------------------------------------------------------- -// wxDataObject -//------------------------------------------------------------------------- - -class WXDLLEXPORT wxDataObject: public wxObject -{ -public: - // all data formats (values are the same as in windows.h, do not change!) - enum StdFormat - { - Invalid, - Text, - Bitmap, - MetafilePict, - Sylk, - Dif, - Tiff, - OemText, - Dib, - Palette, - Pendata, - Riff, - Wave, - UnicodeText, - EnhMetafile, - Hdrop, - Locale, - Max - }; - - // function to return symbolic name of clipboard format (debug messages) - static const char *GetFormatName(wxDataFormat format); - - // ctor & dtor - wxDataObject() {}; - ~wxDataObject() {}; - - // pure virtuals to override - // get the best suited format for our data - virtual wxDataFormat GetPreferredFormat() const = 0; - // decide if we support this format (should be one of values of - // StdFormat enumerations or a user-defined format) - virtual bool IsSupportedFormat(wxDataFormat format) const = 0; - // get the (total) size of data - virtual size_t GetDataSize() const = 0; - // copy raw data to provided pointer - virtual void GetDataHere(void *pBuf) const = 0; - -}; - -// ---------------------------------------------------------------------------- -// wxTextDataObject is a specialization of wxDataObject for text data -// ---------------------------------------------------------------------------- - -class WXDLLEXPORT wxTextDataObject : public wxDataObject -{ -public: - // ctors - wxTextDataObject() { } - wxTextDataObject(const wxString& strText) : m_strText(strText) { } - void Init(const wxString& strText) { m_strText = strText; } - - // implement base class pure virtuals - virtual wxDataFormat GetPreferredFormat() const - { return wxDF_TEXT; } - virtual bool IsSupportedFormat(wxDataFormat format) const - { return format == wxDF_TEXT; } - virtual size_t GetDataSize() const - { return m_strText.Len() + 1; } // +1 for trailing '\0'of course - virtual void GetDataHere(void *pBuf) const - { memcpy(pBuf, m_strText.c_str(), GetDataSize()); } - -private: - wxString m_strText; - -}; - -// ---------------------------------------------------------------------------- -// wxFileDataObject is a specialization of wxDataObject for file names -// ---------------------------------------------------------------------------- - -class WXDLLEXPORT wxFileDataObject : public wxDataObject -{ -public: - - wxFileDataObject(void) { } - void AddFile( const wxString &file ) - { m_files += file; m_files += ";"; } - - // implement base class pure virtuals - virtual wxDataFormat GetPreferredFormat() const - { return wxDF_FILENAME; } - virtual bool IsSupportedFormat(wxDataFormat format) const - { return format == wxDF_FILENAME; } - virtual size_t GetDataSize() const - { return m_files.Len() + 1; } // +1 for trailing '\0'of course - virtual void GetDataHere(void *pBuf) const - { memcpy(pBuf, m_files.c_str(), GetDataSize()); } - -private: - wxString m_files; - -}; -//------------------------------------------------------------------------- -// wxDropTarget -//------------------------------------------------------------------------- - -class WXDLLEXPORT wxDropTarget: public wxObject -{ - public: - - wxDropTarget(); - ~wxDropTarget(); - - virtual void OnEnter() { } - virtual void OnLeave() { } - virtual bool OnDrop( long x, long y, const void *pData ) = 0; - -// protected: - - friend wxWindow; - - // Override these to indicate what kind of data you support: - - virtual size_t GetFormatCount() const = 0; - virtual wxDataFormat GetFormat(size_t n) const = 0; -}; - -//------------------------------------------------------------------------- -// wxTextDropTarget -//------------------------------------------------------------------------- - -class WXDLLEXPORT wxTextDropTarget: public wxDropTarget -{ - public: - - wxTextDropTarget() {}; - virtual bool OnDrop( long x, long y, const void *pData ); - virtual bool OnDropText( long x, long y, const char *psz ); - - protected: - - virtual size_t GetFormatCount() const; - virtual wxDataFormat GetFormat(size_t n) const; -}; - -// ---------------------------------------------------------------------------- -// A drop target which accepts files (dragged from File Manager or Explorer) -// ---------------------------------------------------------------------------- - -class WXDLLEXPORT wxFileDropTarget: public wxDropTarget -{ - public: - - wxFileDropTarget() {}; - - virtual bool OnDrop(long x, long y, const void *pData); - virtual bool OnDropFiles( long x, long y, - size_t nFiles, const char * const aszFiles[]); - - protected: - - virtual size_t GetFormatCount() const; - virtual wxDataFormat GetFormat(size_t n) const; -}; - -//------------------------------------------------------------------------- -// wxDropSource -//------------------------------------------------------------------------- - -class WXDLLEXPORT wxDropSource: public wxObject -{ - public: - - enum DragResult - { - Error, // error prevented the d&d operation from completing - None, // drag target didn't accept the data - Copy, // the data was successfully copied - Move, // the data was successfully moved - Cancel // the operation was cancelled by user (not an error) - }; - - wxDropSource( wxWindow *win ); - wxDropSource( wxDataObject &data, wxWindow *win ); - - ~wxDropSource(void); - - void SetData( wxDataObject &data ); - DragResult DoDragDrop( bool bAllowMove = FALSE ); - - virtual bool GiveFeedback( DragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return TRUE; }; - - protected: - - wxDataObject *m_data; -}; - -#endif - //_WX_DND_H_ - diff --git a/include/wx/stubs/filedlg.h b/include/wx/stubs/filedlg.h deleted file mode 100644 index 0259f2d943..0000000000 --- a/include/wx/stubs/filedlg.h +++ /dev/null @@ -1,89 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: filedlg.h -// Purpose: wxFileDialog class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_FILEDLG_H_ -#define _WX_FILEDLG_H_ - -#ifdef __GNUG__ -#pragma interface "filedlg.h" -#endif - -#include "wx/dialog.h" - -/* - * File selector - */ - -WXDLLEXPORT_DATA(extern const char*) wxFileSelectorPromptStr; -WXDLLEXPORT_DATA(extern const char*) wxFileSelectorDefaultWildcardStr; - -class WXDLLEXPORT wxFileDialog: public wxDialog -{ -DECLARE_DYNAMIC_CLASS(wxFileDialog) -protected: - wxString m_message; - long m_dialogStyle; - wxWindow * m_parent; - wxString m_dir; - wxString m_path; // Full path - wxString m_fileName; - wxString m_wildCard; - int m_filterIndex; -public: - wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, - const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildCard = wxFileSelectorDefaultWildcardStr, - long style = 0, const wxPoint& pos = wxDefaultPosition); - - inline void SetMessage(const wxString& message) { m_message = message; } - inline void SetPath(const wxString& path) { m_path = path; } - inline void SetDirectory(const wxString& dir) { m_dir = dir; } - inline void SetFilename(const wxString& name) { m_fileName = name; } - inline void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; } - inline void SetStyle(long style) { m_dialogStyle = style; } - inline void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; } - - inline wxString GetMessage() const { return m_message; } - inline wxString GetPath() const { return m_path; } - inline wxString GetDirectory() const { return m_dir; } - inline wxString GetFilename() const { return m_fileName; } - inline wxString GetWildcard() const { return m_wildCard; } - inline long GetStyle() const { return m_dialogStyle; } - inline int GetFilterIndex() const { return m_filterIndex ; } - - int ShowModal(); -}; - -#define wxOPEN 0x0001 -#define wxSAVE 0x0002 -#define wxOVERWRITE_PROMPT 0x0004 -#define wxHIDE_READONLY 0x0008 -#define wxFILE_MUST_EXIST 0x0010 - -// File selector - backward compatibility -char* WXDLLEXPORT wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL, - const char *default_filename = NULL, const char *default_extension = NULL, - const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0, - wxWindow *parent = NULL, int x = -1, int y = -1); - -// An extended version of wxFileSelector -char* WXDLLEXPORT wxFileSelectorEx(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL, - const char *default_filename = NULL, int *indexDefaultExtension = NULL, - const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0, - wxWindow *parent = NULL, int x = -1, int y = -1); - -// Generic file load dialog -char* WXDLLEXPORT wxLoadFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL); - -// Generic file save dialog -char* WXDLLEXPORT wxSaveFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL); - -#endif - // _WX_FILEDLG_H_ diff --git a/include/wx/stubs/font.h b/include/wx/stubs/font.h deleted file mode 100644 index 601657c657..0000000000 --- a/include/wx/stubs/font.h +++ /dev/null @@ -1,90 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: font.h -// Purpose: wxFont class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_FONT_H_ -#define _WX_FONT_H_ - -#ifdef __GNUG__ -#pragma interface "font.h" -#endif - -#include "wx/gdiobj.h" - -class WXDLLEXPORT wxFont; - -class WXDLLEXPORT wxFontRefData: public wxGDIRefData -{ - friend class WXDLLEXPORT wxFont; -public: - wxFontRefData(); - wxFontRefData(const wxFontRefData& data); - ~wxFontRefData(); -protected: - int m_pointSize; - int m_family; - int m_style; - int m_weight; - bool m_underlined; - wxString m_faceName; -/* TODO: implementation - WXHFONT m_hFont; -*/ -}; - -#define M_FONTDATA ((wxFontRefData *)m_refData) - -WXDLLEXPORT_DATA(extern const char*) wxEmptyString; - -// Font -class WXDLLEXPORT wxFont: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxFont) -public: - wxFont(); - wxFont(int pointSize, int family, int style, int weight, bool underlined = FALSE, const wxString& faceName = wxEmptyString); - inline wxFont(const wxFont& font) { Ref(font); } - inline wxFont(const wxFont* font) { if (font) Ref(*font); } - - ~wxFont(); - - bool Create(int pointSize, int family, int style, int weight, bool underlined = FALSE, const wxString& faceName = wxEmptyString); - - virtual bool Ok() const { return (m_refData != NULL) ; } - - inline int GetPointSize() const { return M_FONTDATA->m_pointSize; } - inline int GetFamily() const { return M_FONTDATA->m_family; } - inline int GetStyle() const { return M_FONTDATA->m_style; } - inline int GetWeight() const { return M_FONTDATA->m_weight; } - wxString GetFamilyString() const ; - wxString GetFaceName() const ; - wxString GetStyleString() const ; - wxString GetWeightString() const ; - inline bool GetUnderlined() const { return M_FONTDATA->m_underlined; } - - void SetPointSize(int pointSize); - void SetFamily(int family); - void SetStyle(int style); - void SetWeight(int weight); - void SetFaceName(const wxString& faceName); - void SetUnderlined(bool underlined); - - inline wxFont& operator = (const wxFont& font) { if (*this == font) return (*this); Ref(font); return *this; } - inline bool operator == (const wxFont& font) { return m_refData == font.m_refData; } - inline bool operator != (const wxFont& font) { return m_refData != font.m_refData; } - - // Implementation -protected: - bool RealizeResource(); - void Unshare(); -}; - -#endif - // _WX_FONT_H_ diff --git a/include/wx/stubs/fontdlg.h b/include/wx/stubs/fontdlg.h deleted file mode 100644 index 39da6fd967..0000000000 --- a/include/wx/stubs/fontdlg.h +++ /dev/null @@ -1,46 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: fontdlg.h -// Purpose: wxFontDialog class. Use generic version if no -// platform-specific implementation. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_FONTDLG_H_ -#define _WX_FONTDLG_H_ - -#ifdef __GNUG__ -#pragma interface "fontdlg.h" -#endif - -#include "wx/dialog.h" -#include "wx/cmndata.h" - -/* - * Font dialog - */ - -class WXDLLEXPORT wxFontDialog: public wxDialog -{ -DECLARE_DYNAMIC_CLASS(wxFontDialog) -public: - wxFontDialog(); - wxFontDialog(wxWindow *parent, wxFontData *data = NULL); - - bool Create(wxWindow *parent, wxFontData *data = NULL); - - int ShowModal(); - wxFontData& GetFontData() { return m_fontData; } - -protected: - wxWindow* m_dialogParent; - wxFontData m_fontData; -}; - -#endif - // _WX_FONTDLG_H_ - diff --git a/include/wx/stubs/frame.h b/include/wx/stubs/frame.h deleted file mode 100644 index 70247ae171..0000000000 --- a/include/wx/stubs/frame.h +++ /dev/null @@ -1,156 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: frame.h -// Purpose: wxFrame class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_FRAME_H_ -#define _WX_FRAME_H_ - -#ifdef __GNUG__ -#pragma interface "frame.h" -#endif - -#include "wx/window.h" -#include "wx/toolbar.h" -#include "wx/accel.h" - -WXDLLEXPORT_DATA(extern const char*) wxFrameNameStr; -WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr; - -class WXDLLEXPORT wxMenuBar; -class WXDLLEXPORT wxStatusBar; - -class WXDLLEXPORT wxFrame: public wxWindow { - - DECLARE_DYNAMIC_CLASS(wxFrame) - -public: - wxFrame(); - inline wxFrame(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) - { - Create(parent, id, title, pos, size, style, name); - } - - ~wxFrame(); - - bool Create(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); - - virtual bool Destroy(); - void SetClientSize(int width, int height); - void GetClientSize(int *width, int *height) const; - - void GetSize(int *width, int *height) const ; - void GetPosition(int *x, int *y) const ; - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - - virtual bool OnClose(); - - void OnSize(wxSizeEvent& event); - void OnMenuHighlight(wxMenuEvent& event); - void OnActivate(wxActivateEvent& event); - void OnIdle(wxIdleEvent& event); - void OnCloseWindow(wxCloseEvent& event); - - bool Show(bool show); - - // Set menu bar - void SetMenuBar(wxMenuBar *menu_bar); - virtual wxMenuBar *GetMenuBar() const ; - - // Set title - void SetTitle(const wxString& title); - wxString GetTitle() const ; - - void Centre(int direction = wxBOTH); - - // Call this to simulate a menu command - virtual void Command(int id); - virtual void ProcessCommand(int id); - - // Set icon - virtual void SetIcon(const wxIcon& icon); - - // Create status line - virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0, - const wxString& name = "statusBar"); - inline wxStatusBar *GetStatusBar() const { return m_frameStatusBar; } - virtual void PositionStatusBar(); - virtual wxStatusBar *OnCreateStatusBar(int number, long style, wxWindowID id, - const wxString& name); - - // Create toolbar - virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1, const wxString& name = wxToolBarNameStr); - virtual wxToolBar *OnCreateToolBar(long style, wxWindowID id, const wxString& name); - // If made known to the frame, the frame will manage it automatically. - virtual inline void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; } - virtual inline wxToolBar *GetToolBar() const { return m_frameToolBar; } - virtual void PositionToolBar(); - - // Set status line text - virtual void SetStatusText(const wxString& text, int number = 0); - - // Set status line widths - virtual void SetStatusWidths(int n, const int widths_field[]); - - // Hint to tell framework which status bar to use - // TODO: should this go into a wxFrameworkSettings class perhaps? - static void UseNativeStatusBar(bool useNative) { m_useNativeStatusBar = useNative; }; - static bool UsesNativeStatusBar() { return m_useNativeStatusBar; }; - - // Fit frame around subwindows - virtual void Fit(); - - // Iconize - virtual void Iconize(bool iconize); - - virtual bool IsIconized() const ; - - // Compatibility - inline bool Iconized() const { return IsIconized(); } - - virtual void Maximize(bool maximize); - - virtual void SetAcceleratorTable(const wxAcceleratorTable& accel); - - // Responds to colour changes - void OnSysColourChanged(wxSysColourChangedEvent& event); - - // Query app for menu item updates (called from OnIdle) - void DoMenuUpdates(); - void DoMenuUpdates(wxMenu* menu); - - // Checks if there is a toolbar, and returns the first free client position - virtual wxPoint GetClientAreaOrigin() const; - -protected: - wxMenuBar * m_frameMenuBar; - wxStatusBar * m_frameStatusBar; - wxIcon m_icon; - bool m_iconized; - static bool m_useNativeStatusBar; - wxToolBar * m_frameToolBar ; - wxAcceleratorTable m_acceleratorTable; - - DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_FRAME_H_ diff --git a/include/wx/stubs/gauge.h b/include/wx/stubs/gauge.h deleted file mode 100644 index ce19d9ef1f..0000000000 --- a/include/wx/stubs/gauge.h +++ /dev/null @@ -1,69 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gauge.h -// Purpose: wxGauge class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_GAUGE_H_ -#define _WX_GAUGE_H_ - -#ifdef __GNUG__ -#pragma interface "gauge.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr; - -// Group box -class WXDLLEXPORT wxGauge: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxGauge) - public: - inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; } - - inline wxGauge(wxWindow *parent, wxWindowID id, - int range, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxGA_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr) - { - Create(parent, id, range, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - int range, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxGA_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr); - - void SetShadowWidth(int w); - void SetBezelFace(int w); - void SetRange(int r); - void SetValue(int pos); - - int GetShadowWidth() const ; - int GetBezelFace() const ; - int GetRange() const ; - int GetValue() const ; - - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - - virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ; - - protected: - int m_rangeMax; - int m_gaugePos; -}; - -#endif - // _WX_GAUGE_H_ diff --git a/include/wx/stubs/gdiobj.h b/include/wx/stubs/gdiobj.h deleted file mode 100644 index 9263d4d6ad..0000000000 --- a/include/wx/stubs/gdiobj.h +++ /dev/null @@ -1,48 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gdiobj.h -// Purpose: wxGDIObject class: base class for other GDI classes -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_GDIOBJ_H_ -#define _WX_GDIOBJ_H_ - -#include "wx/object.h" - -#ifdef __GNUG__ -#pragma interface "gdiobj.h" -#endif - -class WXDLLEXPORT wxGDIRefData: public wxObjectRefData { -public: - inline wxGDIRefData() - { - } -}; - -#define M_GDIDATA ((wxGDIRefData *)m_refData) - -class WXDLLEXPORT wxGDIObject: public wxObject -{ -DECLARE_DYNAMIC_CLASS(wxGDIObject) - public: - inline wxGDIObject() { m_visible = FALSE; }; - inline ~wxGDIObject() {}; - - inline bool IsNull() const { return (m_refData == 0); } - - virtual bool GetVisible() { return m_visible; } - virtual void SetVisible(bool v) { m_visible = v; } - -protected: - bool m_visible; // Can a pointer to this object be safely taken? - // - only if created within FindOrCreate... -}; - -#endif - // _WX_GDIOBJ_H_ diff --git a/include/wx/stubs/helpxxxx.h b/include/wx/stubs/helpxxxx.h deleted file mode 100644 index d53c28b7e4..0000000000 --- a/include/wx/stubs/helpxxxx.h +++ /dev/null @@ -1,52 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: helpxxxx.h -// Purpose: Help system: native implementation for your system. Replace -// XXXX with suitable name. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_HELPXXXX_H_ -#define _WX_HELPXXXX_H_ - -#ifdef __GNUG__ -#pragma interface "helpxxxx.h" -#endif - -#include "wx/wx.h" - -#include "wx/helpbase.h" - -class WXDLLEXPORT wxXXXXHelpController: public wxHelpControllerBase -{ - DECLARE_CLASS(wxXXXXHelpController) - - public: - wxXXXXHelpController(); - ~wxXXXXHelpController(); - - // Must call this to set the filename and server name - virtual bool Initialize(const wxString& file); - - // If file is "", reloads file given in Initialize - virtual bool LoadFile(const wxString& file = ""); - virtual bool DisplayContents(); - virtual bool DisplaySection(int sectionNo); - virtual bool DisplayBlock(long blockNo); - virtual bool KeywordSearch(const wxString& k); - - virtual bool Quit(); - virtual void OnQuit(); - - inline wxString GetHelpFile() const { return m_helpFile; } - -protected: - wxString m_helpFile; -}; - -#endif - // _WX_HELPXXXX_H_ diff --git a/include/wx/stubs/icon.h b/include/wx/stubs/icon.h deleted file mode 100644 index f68c23154b..0000000000 --- a/include/wx/stubs/icon.h +++ /dev/null @@ -1,107 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: icon.h -// Purpose: wxIcon class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_ICON_H_ -#define _WX_ICON_H_ - -#ifdef __GNUG__ -#pragma interface "icon.h" -#endif - -#include "wx/bitmap.h" - -class WXDLLEXPORT wxIconRefData: public wxBitmapRefData -{ - friend class WXDLLEXPORT wxBitmap; - friend class WXDLLEXPORT wxIcon; -public: - wxIconRefData(); - ~wxIconRefData(); - -public: -/* TODO: whatever your actual icon handle is - WXHICON m_hIcon; -*/ -}; - -#define M_ICONDATA ((wxIconRefData *)m_refData) -#define M_ICONHANDLERDATA ((wxIconRefData *)bitmap->GetRefData()) - -// Icon -class WXDLLEXPORT wxIcon: public wxBitmap -{ - DECLARE_DYNAMIC_CLASS(wxIcon) - -public: - wxIcon(); - - // Copy constructors - inline wxIcon(const wxIcon& icon) { Ref(icon); } - inline wxIcon(const wxIcon* icon) { if (icon) Ref(*icon); } - - wxIcon(const char bits[], int width, int height); - wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE, - int desiredWidth = -1, int desiredHeight = -1); - ~wxIcon(); - - bool LoadFile(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE, - int desiredWidth = -1, int desiredHeight = -1); - - inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; } - inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; } - inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; } - -/* TODO: implementation - void SetHICON(WXHICON ico); - inline WXHICON GetHICON() const { return (M_ICONDATA ? M_ICONDATA->m_hIcon : 0); } -*/ - -/* TODO */ - virtual bool Ok() const { return (m_refData != NULL) ; } -}; - -/* Example handlers. TODO: write your own handlers for relevant types. - -class WXDLLEXPORT wxICOFileHandler: public wxBitmapHandler -{ - DECLARE_DYNAMIC_CLASS(wxICOFileHandler) -public: - inline wxICOFileHandler() - { - m_name = "ICO icon file"; - m_extension = "ico"; - m_type = wxBITMAP_TYPE_ICO; - }; - - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth = -1, int desiredHeight = -1); -}; - -class WXDLLEXPORT wxICOResourceHandler: public wxBitmapHandler -{ - DECLARE_DYNAMIC_CLASS(wxICOResourceHandler) -public: - inline wxICOResourceHandler() - { - m_name = "ICO resource"; - m_extension = "ico"; - m_type = wxBITMAP_TYPE_ICO_RESOURCE; - }; - - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth = -1, int desiredHeight = -1); - -}; - -*/ - -#endif - // _WX_ICON_H_ diff --git a/include/wx/stubs/imaglist.h b/include/wx/stubs/imaglist.h deleted file mode 100644 index 7e66ffb36a..0000000000 --- a/include/wx/stubs/imaglist.h +++ /dev/null @@ -1,145 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: imaglist.h -// Purpose: wxImageList class. Note: if your GUI doesn't have -// an image list equivalent, you can use the generic class -// in src/generic. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_IMAGLIST_H_ -#define _WX_IMAGLIST_H_ - -#ifdef __GNUG__ -#pragma interface "imaglist.h" -#endif - -#include "wx/bitmap.h" - -/* - * wxImageList is used for wxListCtrl, wxTreeCtrl. These controls refer to - * images for their items by an index into an image list. - * A wxImageList is capable of creating images with optional masks from - * a variety of sources - a single bitmap plus a colour to indicate the mask, - * two bitmaps, or an icon. - * - */ - -// Flags for Draw -#define wxIMAGELIST_DRAW_NORMAL 0x0001 -#define wxIMAGELIST_DRAW_TRANSPARENT 0x0002 -#define wxIMAGELIST_DRAW_SELECTED 0x0004 -#define wxIMAGELIST_DRAW_FOCUSED 0x0008 - -// Flag values for Set/GetImageList -enum { - wxIMAGE_LIST_NORMAL, // Normal icons - wxIMAGE_LIST_SMALL, // Small icons - wxIMAGE_LIST_STATE // State icons: unimplemented (see WIN32 documentation) -}; - -// Eventually we'll make this a reference-counted wxGDIObject. For -// now, the app must take care of ownership issues. That is, the -// image lists must be explicitly deleted after the control(s) that uses them -// is (are) deleted, or when the app exits. -class WXDLLEXPORT wxImageList: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxImageList) - public: - /* - * Public interface - */ - - wxImageList(); - - // Creates an image list. - // Specify the width and height of the images in the list, - // whether there are masks associated with them (e.g. if creating images - // from icons), and the initial size of the list. - inline wxImageList(int width, int height, bool mask = TRUE, int initialCount = 1) - { - Create(width, height, mask, initialCount); - } - ~wxImageList(); - - - // Attributes - //////////////////////////////////////////////////////////////////////////// - - // Returns the number of images in the image list. - int GetImageCount() const; - - // Operations - //////////////////////////////////////////////////////////////////////////// - - // Creates an image list - // width, height specify the size of the images in the list (all the same). - // mask specifies whether the images have masks or not. - // initialNumber is the initial number of images to reserve. - bool Create(int width, int height, bool mask = TRUE, int initialNumber = 1); - - // Adds a bitmap, and optionally a mask bitmap. - // Note that wxImageList creates *new* bitmaps, so you may delete - // 'bitmap' and 'mask' after calling Add. - int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap); - - // Adds a bitmap, using the specified colour to create the mask bitmap - // Note that wxImageList creates *new* bitmaps, so you may delete - // 'bitmap' after calling Add. - int Add(const wxBitmap& bitmap, const wxColour& maskColour); - - // Adds a bitmap and mask from an icon. - int Add(const wxIcon& icon); - - // Replaces a bitmap, optionally passing a mask bitmap. - // Note that wxImageList creates new bitmaps, so you may delete - // 'bitmap' and 'mask' after calling Replace. - bool Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap); - -/* Not supported by Win95 - // Replacing a bitmap, using the specified colour to create the mask bitmap - // Note that wxImageList creates new bitmaps, so you may delete - // 'bitmap'. - bool Replace(int index, const wxBitmap& bitmap, const wxColour& maskColour); -*/ - - // Replaces a bitmap and mask from an icon. - // You can delete 'icon' after calling Replace. - bool Replace(int index, const wxIcon& icon); - - // Removes the image at the given index. - bool Remove(int index); - - // Remove all images - bool RemoveAll(); - - // Draws the given image on a dc at the specified position. - // If 'solidBackground' is TRUE, Draw sets the image list background - // colour to the background colour of the wxDC, to speed up - // drawing by eliminating masked drawing where possible. - bool Draw(int index, wxDC& dc, int x, int y, - int flags = wxIMAGELIST_DRAW_NORMAL, bool solidBackground = FALSE); - -/* TODO (optional?) - wxIcon *MakeIcon(int index); -*/ - -/* TODO - // Implementation - //////////////////////////////////////////////////////////////////////////// - - // Returns the native image list handle - inline WXHIMAGELIST GetHIMAGELIST() const { return m_hImageList; } - -protected: - WXHIMAGELIST m_hImageList; -*/ - -}; - -#endif - // _WX_IMAGLIST_H_ diff --git a/include/wx/stubs/joystick.h b/include/wx/stubs/joystick.h deleted file mode 100644 index 30324fc035..0000000000 --- a/include/wx/stubs/joystick.h +++ /dev/null @@ -1,93 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: joystick.h -// Purpose: wxJoystick class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_JOYSTICK_H_ -#define _WX_JOYSTICK_H_ - -#ifdef __GNUG__ -#pragma interface "joystick.h" -#endif - -#include "wx/event.h" - -class WXDLLEXPORT wxJoystick: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxJoystick) - public: - /* - * Public interface - */ - - wxJoystick(int joystick = wxJOYSTICK1) { m_joystick = joystick; }; - - // Attributes - //////////////////////////////////////////////////////////////////////////// - - wxPoint GetPosition() const; - int GetZPosition() const; - int GetButtonState() const; - int GetPOVPosition() const; - int GetPOVCTSPosition() const; - int GetRudderPosition() const; - int GetUPosition() const; - int GetVPosition() const; - int GetMovementThreshold() const; - void SetMovementThreshold(int threshold) ; - - // Capabilities - //////////////////////////////////////////////////////////////////////////// - - bool IsOk() const; // Checks that the joystick is functioning - int GetNumberJoysticks() const ; - int GetManufacturerId() const ; - int GetProductId() const ; - wxString GetProductName() const ; - int GetXMin() const; - int GetYMin() const; - int GetZMin() const; - int GetXMax() const; - int GetYMax() const; - int GetZMax() const; - int GetNumberButtons() const; - int GetNumberAxes() const; - int GetMaxButtons() const; - int GetMaxAxes() const; - int GetPollingMin() const; - int GetPollingMax() const; - int GetRudderMin() const; - int GetRudderMax() const; - int GetUMin() const; - int GetUMax() const; - int GetVMin() const; - int GetVMax() const; - - bool HasRudder() const; - bool HasZ() const; - bool HasU() const; - bool HasV() const; - bool HasPOV() const; - bool HasPOV4Dir() const; - bool HasPOVCTS() const; - - // Operations - //////////////////////////////////////////////////////////////////////////// - - // pollingFreq = 0 means that movement events are sent when above the threshold. - // If pollingFreq > 0, events are received every this many milliseconds. - bool SetCapture(wxWindow* win, int pollingFreq = 0); - bool ReleaseCapture(); - -protected: - int m_joystick; -}; - -#endif - // _WX_JOYSTICK_H_ diff --git a/include/wx/stubs/listbox.h b/include/wx/stubs/listbox.h deleted file mode 100644 index d95db4379b..0000000000 --- a/include/wx/stubs/listbox.h +++ /dev/null @@ -1,97 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: listbox.h -// Purpose: wxListBox class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_LISTBOX_H_ -#define _WX_LISTBOX_H_ - -#ifdef __GNUG__ -#pragma interface "listbox.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxListBoxNameStr; - -// forward decl for GetSelections() -class WXDLLEXPORT wxArrayInt; - -WXDLLEXPORT_DATA(extern const char*) wxEmptyString; - -// List box item -class WXDLLEXPORT wxListBox: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxListBox) - public: - - wxListBox(); - inline wxListBox(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr) - { - Create(parent, id, pos, size, n, choices, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); - - ~wxListBox(); - - virtual void Append(const wxString& item); - virtual void Append(const wxString& item, char *clientData); - virtual void Set(int n, const wxString* choices, char **clientData = NULL); - virtual int FindString(const wxString& s) const ; - virtual void Clear(); - virtual void SetSelection(int n, bool select = TRUE); - - virtual void Deselect(int n); - - // For single choice list item only - virtual int GetSelection() const ; - virtual void Delete(int n); - virtual char *GetClientData(int n) const ; - virtual void SetClientData(int n, char *clientData); - virtual void SetString(int n, const wxString& s); - - // For single or multiple choice list item - virtual int GetSelections(wxArrayInt& aSelections) const; - virtual bool Selected(int n) const ; - virtual wxString GetString(int n) const ; - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - - // Set the specified item at the first visible item - // or scroll to max range. - virtual void SetFirstItem(int n) ; - virtual void SetFirstItem(const wxString& s) ; - - virtual void InsertItems(int nItems, const wxString items[], int pos); - - virtual wxString GetStringSelection() const ; - virtual bool SetStringSelection(const wxString& s, bool flag = TRUE); - virtual int Number() const ; - - void Command(wxCommandEvent& event); - - protected: - int m_noItems; - int m_selected; -}; - -#endif - // _WX_LISTBOX_H_ diff --git a/include/wx/stubs/listctrl.h b/include/wx/stubs/listctrl.h deleted file mode 100644 index e8f26286d8..0000000000 --- a/include/wx/stubs/listctrl.h +++ /dev/null @@ -1,451 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: listctrl.h -// Purpose: wxListCtrl class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_LISTCTRL_H_ -#define _WX_LISTCTRL_H_ - -#ifdef __GNUG__ -#pragma interface "listctrl.h" -#endif - -#include "wx/control.h" -#include "wx/event.h" -#include "wx/imaglist.h" - -/* - The wxListCtrl can show lists of items in four different modes: - wxLC_LIST: multicolumn list view, with optional small icons (icons could be - optional for some platforms). Columns are computed automatically, - i.e. you don't set columns as in wxLC_REPORT. In other words, - the list wraps, unlike a wxListBox. - wxLC_REPORT: single or multicolumn report view (with optional header) - wxLC_ICON: large icon view, with optional labels - wxLC_SMALL_ICON: small icon view, with optional labels - - You can change the style dynamically, either with SetSingleStyle or - SetWindowStyleFlag. - - Further window styles: - - wxLC_ALIGN_TOP icons align to the top (default) - wxLC_ALIGN_LEFT icons align to the left - wxLC_AUTOARRANGE icons arrange themselves - wxLC_USER_TEXT the app provides label text on demand, except for column headers - wxLC_EDIT_LABELS labels are editable: app will be notified. - wxLC_NO_HEADER no header in report mode - wxLC_NO_SORT_HEADER can't click on header - wxLC_SINGLE_SEL single selection - wxLC_SORT_ASCENDING sort ascending (must still supply a comparison callback in SortItems) - wxLC_SORT_DESCENDING sort descending (ditto) - - Items are referred to by their index (position in the list starting from zero). - - Label text is supplied via insertion/setting functions and is stored by the - control, unless the wxLC_USER_TEXT style has been specified, in which case - the app will be notified when text is required (see sample). - - Images are dealt with by (optionally) associating 3 image lists with the control. - Zero-based indexes into these image lists indicate which image is to be used for - which item. Each image in an image list can contain a mask, and can be made out - of either a bitmap, two bitmaps or an icon. See ImagList.h for more details. - - Notifications are passed via the wxWindows 2.0 event system. - - See the sample wxListCtrl app for API usage. - - */ - -// Mask flags to tell app/GUI what fields of wxListItem are valid -#define wxLIST_MASK_STATE 0x0001 -#define wxLIST_MASK_TEXT 0x0002 -#define wxLIST_MASK_IMAGE 0x0004 -#define wxLIST_MASK_DATA 0x0008 -#define wxLIST_SET_ITEM 0x0010 -#define wxLIST_MASK_WIDTH 0x0020 -#define wxLIST_MASK_FORMAT 0x0040 - -// State flags for indicating the state of an item -#define wxLIST_STATE_DONTCARE 0x0000 -#define wxLIST_STATE_DROPHILITED 0x0001 -#define wxLIST_STATE_FOCUSED 0x0002 -#define wxLIST_STATE_SELECTED 0x0004 -#define wxLIST_STATE_CUT 0x0008 - -// Hit test flags, used in HitTest -#define wxLIST_HITTEST_ABOVE 0x0001 // Above the client area. -#define wxLIST_HITTEST_BELOW 0x0002 // Below the client area. -#define wxLIST_HITTEST_NOWHERE 0x0004 // In the client area but below the last item. -#define wxLIST_HITTEST_ONITEMICON 0x0020 // On the bitmap associated with an item. -#define wxLIST_HITTEST_ONITEMLABEL 0x0080 // On the label (string) associated with an item. -#define wxLIST_HITTEST_ONITEMRIGHT 0x0100 // In the area to the right of an item. -#define wxLIST_HITTEST_ONITEMSTATEICON 0x0200 // On the state icon for a tree view item that is in a user-defined state. -#define wxLIST_HITTEST_TOLEFT 0x0400 // To the left of the client area. -#define wxLIST_HITTEST_TORIGHT 0x0800 // To the right of the client area. - -#define wxLIST_HITTEST_ONITEM (wxLIST_HITTEST_ONITEMICON | wxLIST_HITTEST_ONITEMLABEL wxLIST_HITTEST_ONITEMSTATEICON) - -// Flags for GetNextItem -enum { - wxLIST_NEXT_ABOVE, // Searches for an item above the specified item - wxLIST_NEXT_ALL, // Searches for subsequent item by index - wxLIST_NEXT_BELOW, // Searches for an item below the specified item - wxLIST_NEXT_LEFT, // Searches for an item to the left of the specified item - wxLIST_NEXT_RIGHT, // Searches for an item to the right of the specified item -}; - -// Alignment flags for Arrange -enum { - wxLIST_ALIGN_DEFAULT, - wxLIST_ALIGN_LEFT, - wxLIST_ALIGN_TOP, - wxLIST_ALIGN_SNAP_TO_GRID -}; - -// Column format -enum { - wxLIST_FORMAT_LEFT, - wxLIST_FORMAT_RIGHT, - wxLIST_FORMAT_CENTRE, - wxLIST_FORMAT_CENTER = wxLIST_FORMAT_CENTRE -}; - -// Autosize values for SetColumnWidth -enum { - wxLIST_AUTOSIZE = -1, - wxLIST_AUTOSIZE_USEHEADER = -2 -}; - -// Flag values for GetItemRect -enum { - wxLIST_RECT_BOUNDS, - wxLIST_RECT_ICON, - wxLIST_RECT_LABEL -}; - -// Flag values for FindItem -enum { - wxLIST_FIND_UP, - wxLIST_FIND_DOWN, - wxLIST_FIND_LEFT, - wxLIST_FIND_RIGHT -}; - -// wxListItem: data representing an item, or report field. -// It also doubles up to represent entire column information -// when inserting or setting a column. -class WXDLLEXPORT wxListItem: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxListItem) -public: - long m_mask; // Indicates what fields are valid - long m_itemId; // The zero-based item position - int m_col; // Zero-based column, if in report mode - long m_state; // The state of the item - long m_stateMask; // Which flags of m_state are valid (uses same flags) - wxString m_text; // The label/header text - int m_image; // The zero-based index into an image list - long m_data; // App-defined data - - // For columns only - int m_format; // left, right, centre - int m_width; // width of column - - wxListItem(); -}; - -// type of compare function for wxListCtrl sort operation -typedef int (*wxListCtrlCompare)(long item1, long item2, long sortData); - -class WXDLLEXPORT wxListCtrl: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxListCtrl) - public: - /* - * Public interface - */ - - wxListCtrl(); - - inline wxListCtrl(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, - const wxString& name = "listCtrl") - { - Create(parent, id, pos, size, style, validator, name); - } - ~wxListCtrl(); - - bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxListCtrl"); - - - // Attributes - //////////////////////////////////////////////////////////////////////////// - - // Gets information about this column - bool GetColumn(int col, wxListItem& item) const; - - // Sets information about this column - bool SetColumn(int col, wxListItem& item) ; - - // Gets the column width - int GetColumnWidth(int col) const; - - // Sets the column width - bool SetColumnWidth(int col, int width) ; - - // Gets the number of items that can fit vertically in the - // visible area of the list control (list or report view) - // or the total number of items in the list control (icon - // or small icon view) - int GetCountPerPage() const; - - // Gets the edit control for editing labels. - wxTextCtrl* GetEditControl() const; - - // Gets information about the item - bool GetItem(wxListItem& info) const ; - - // Sets information about the item - bool SetItem(wxListItem& info) ; - - // Sets a string field at a particular column - long SetItem(long index, int col, const wxString& label, int imageId = -1); - - // Gets the item state - int GetItemState(long item, long stateMask) const ; - - // Sets the item state - bool SetItemState(long item, long state, long stateMask) ; - - // Sets the item image - bool SetItemImage(long item, int image, int selImage) ; - - // Gets the item text - wxString GetItemText(long item) const ; - - // Sets the item text - void SetItemText(long item, const wxString& str) ; - - // Gets the item data - long GetItemData(long item) const ; - - // Sets the item data - bool SetItemData(long item, long data) ; - - // Gets the item rectangle - bool GetItemRect(long item, wxRectangle& rect, int code = wxLIST_RECT_BOUNDS) const ; - - // Gets the item position - bool GetItemPosition(long item, wxPoint& pos) const ; - - // Sets the item position - bool SetItemPosition(long item, const wxPoint& pos) ; - - // Gets the number of items in the list control - int GetItemCount() const; - - // Gets the number of columns in the list control - int GetColumnCount() const; - - // Retrieves the spacing between icons in pixels. - // If small is TRUE, gets the spacing for the small icon - // view, otherwise the large icon view. - int GetItemSpacing(bool isSmall) const; - - // Gets the number of selected items in the list control - int GetSelectedItemCount() const; - - // Gets the text colour of the listview - wxColour GetTextColour() const; - - // Sets the text colour of the listview - void SetTextColour(const wxColour& col); - - // Gets the index of the topmost visible item when in - // list or report view - long GetTopItem() const ; - - // Add or remove a single window style - void SetSingleStyle(long style, bool add = TRUE) ; - - // Set the whole window style - void SetWindowStyleFlag(long style) ; - - // Searches for an item, starting from 'item'. - // item can be -1 to find the first item that matches the - // specified flags. - // Returns the item or -1 if unsuccessful. - long GetNextItem(long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE) const ; - - // Implementation: converts wxWindows style to MSW style. - // Can be a single style flag or a bit list. - // oldStyle is 'normalised' so that it doesn't contain - // conflicting styles. - long ConvertToMSWStyle(long& oldStyle, long style) const; - - // Gets one of the three image lists - wxImageList *GetImageList(int which) const ; - - // Sets the image list - // N.B. There's a quirk in the Win95 list view implementation. - // If in wxLC_LIST mode, it'll *still* display images by the labels if - // there's a small-icon image list set for the control - even though you - // haven't specified wxLIST_MASK_IMAGE when inserting. - // So you have to set a NULL small-icon image list to be sure that - // the wxLC_LIST mode works without icons. Of course, you may want icons... - void SetImageList(wxImageList *imageList, int which) ; - - // Operations - //////////////////////////////////////////////////////////////////////////// - - // Arranges the items - bool Arrange(int flag = wxLIST_ALIGN_DEFAULT); - - // Deletes an item - bool DeleteItem(long item); - - // Deletes all items - bool DeleteAllItems() ; - - // Deletes a column - bool DeleteColumn(int col); - - // Deletes all columns - bool DeleteAllColumns(); - - // Clears items, and columns if there are any. - void ClearAll(); - - // Edit the label - wxTextCtrl* EditLabel(long item, wxClassInfo* textControlClass = CLASSINFO(wxTextCtrl)); - - // End label editing, optionally cancelling the edit - bool EndEditLabel(bool cancel); - - // Ensures this item is visible - bool EnsureVisible(long item) ; - - // Find an item whose label matches this string, starting from the item after 'start' - // or the beginning if 'start' is -1. - long FindItem(long start, const wxString& str, bool partial = FALSE); - - // Find an item whose data matches this data, starting from the item after 'start' - // or the beginning if 'start' is -1. - long FindItem(long start, long data); - - // Find an item nearest this position in the specified direction, starting from - // the item after 'start' or the beginning if 'start' is -1. - long FindItem(long start, const wxPoint& pt, int direction); - - // Determines which item (if any) is at the specified point, - // giving details in 'flags' (see wxLIST_HITTEST_... flags above) - long HitTest(const wxPoint& point, int& flags); - - // Inserts an item, returning the index of the new item if successful, - // -1 otherwise. - // TOD: Should also have some further convenience functions - // which don't require setting a wxListItem object - long InsertItem(wxListItem& info); - - // Insert a string item - long InsertItem(long index, const wxString& label); - - // Insert an image item - long InsertItem(long index, int imageIndex); - - // Insert an image/string item - long InsertItem(long index, const wxString& label, int imageIndex); - - // For list view mode (only), inserts a column. - long InsertColumn(long col, wxListItem& info); - - long InsertColumn(long col, const wxString& heading, int format = wxLIST_FORMAT_LEFT, - int width = -1); - - // Scrolls the list control. If in icon, small icon or report view mode, - // x specifies the number of pixels to scroll. If in list view mode, x - // specifies the number of columns to scroll. - // If in icon, small icon or list view mode, y specifies the number of pixels - // to scroll. If in report view mode, y specifies the number of lines to scroll. - bool ScrollList(int dx, int dy); - - // Sort items. - - // fn is a function which takes 3 long arguments: item1, item2, data. - // item1 is the long data associated with a first item (NOT the index). - // item2 is the long data associated with a second item (NOT the index). - // data is the same value as passed to SortItems. - // The return value is a negative number if the first item should precede the second - // item, a positive number of the second item should precede the first, - // or zero if the two items are equivalent. - - // data is arbitrary data to be passed to the sort function. - bool SortItems(wxListCtrlCompare fn, long data); - -/* Why should we need this function? Leave for now. - * We might need it because item data may have changed, - * but the display needs refreshing (in string callback mode) - // Updates an item. If the list control has the wxLI_AUTO_ARRANGE style, - // the items will be rearranged. - bool Update(long item); -*/ - - void Command(wxCommandEvent& event) { ProcessCommand(event); }; - -protected: - wxTextCtrl* m_textCtrl; // The control used for editing a label - wxImageList * m_imageListNormal; // The image list for normal icons - wxImageList * m_imageListSmall; // The image list for small icons - wxImageList * m_imageListState; // The image list state icons (not implemented yet) - - long m_baseStyle; // Basic Windows style flags, for recreation purposes - wxStringList m_stringPool; // Pool of 3 strings to satisfy Windows callback - // requirements - int m_colCount; // Windows doesn't have GetColumnCount so must - // keep track of inserted/deleted columns - -}; - -class WXDLLEXPORT wxListEvent: public wxCommandEvent -{ - DECLARE_DYNAMIC_CLASS(wxListEvent) - - public: - wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0); - - int m_code; - long m_itemIndex; - long m_oldItemIndex; - int m_col; - bool m_cancelled; - wxPoint m_pointDrag; - - wxListItem m_item; -}; - -typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&); - -#define EVT_LIST_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_DELETE_ITEM(id, fn) { wxEVT_COMMAND_LIST_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_DELETE_ALL_ITEMS(id, fn) { wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_GET_INFO(id, fn) { wxEVT_COMMAND_LIST_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_SET_INFO(id, fn) { wxEVT_COMMAND_LIST_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_ITEM_SELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_ITEM_DESELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_DESELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_KEY_DOWN(id, fn) { wxEVT_COMMAND_LIST_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_INSERT_ITEM(id, fn) { wxEVT_COMMAND_LIST_INSERT_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_COL_CLICK(id, fn) { wxEVT_COMMAND_LIST_COL_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, - -#endif - // _WX_LISTCTRL_H_ diff --git a/include/wx/stubs/mdi.h b/include/wx/stubs/mdi.h deleted file mode 100644 index 6f9fc294e2..0000000000 --- a/include/wx/stubs/mdi.h +++ /dev/null @@ -1,164 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: mdi.h -// Purpose: MDI (Multiple Document Interface) classes. -// This doesn't have to be implemented just like Windows, -// it could be a tabbed design as in wxGTK. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_MDI_H_ -#define _WX_MDI_H_ - -#ifdef __GNUG__ -#pragma interface "mdi.h" -#endif - -#include "wx/frame.h" - -WXDLLEXPORT_DATA(extern const char*) wxFrameNameStr; -WXDLLEXPORT_DATA(extern const char*) wxStatusLineNameStr; - -class WXDLLEXPORT wxMDIClientWindow; -class WXDLLEXPORT wxMDIChildFrame; - -class WXDLLEXPORT wxMDIParentFrame: public wxFrame -{ -DECLARE_DYNAMIC_CLASS(wxMDIParentFrame) - - friend class WXDLLEXPORT wxMDIChildFrame; -public: - - wxMDIParentFrame(); - inline wxMDIParentFrame(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, // Scrolling refers to client window - const wxString& name = wxFrameNameStr) - { - Create(parent, id, title, pos, size, style, name); - } - - ~wxMDIParentFrame(); - - bool Create(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr); - - void OnSize(wxSizeEvent& event); - void OnActivate(wxActivateEvent& event); - void OnSysColourChanged(wxSysColourChangedEvent& event); - - void SetMenuBar(wxMenuBar *menu_bar); - - // Gets the size available for subwindows after menu size, toolbar size - // and status bar size have been subtracted. If you want to manage your own - // toolbar(s), don't call SetToolBar. - void GetClientSize(int *width, int *height) const; - - // Get the active MDI child window (Windows only) - wxMDIChildFrame *GetActiveChild() const ; - - // Get the client window - inline wxMDIClientWindow *GetClientWindow() const { return m_clientWindow; }; - - // Create the client window class (don't Create the window, - // just return a new class) - virtual wxMDIClientWindow *OnCreateClient() ; - - // MDI operations - virtual void Cascade(); - virtual void Tile(); - virtual void ArrangeIcons(); - virtual void ActivateNext(); - virtual void ActivatePrevious(); - -protected: - - // TODO maybe have this member - wxMDIClientWindow *m_clientWindow; - -DECLARE_EVENT_TABLE() -}; - -class WXDLLEXPORT wxMDIChildFrame: public wxFrame -{ -DECLARE_DYNAMIC_CLASS(wxMDIChildFrame) -public: - - wxMDIChildFrame(); - inline wxMDIChildFrame(wxMDIParentFrame *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) - { - Create(parent, id, title, pos, size, style, name); - } - - ~wxMDIChildFrame(); - - bool Create(wxMDIParentFrame *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); - - // Set menu bar - void SetMenuBar(wxMenuBar *menu_bar); - void SetClientSize(int width, int height); - void GetPosition(int *x, int *y) const ; - - // MDI operations - virtual void Maximize(); - virtual void Restore(); - virtual void Activate(); -}; - -/* The client window is a child of the parent MDI frame, and itself - * contains the child MDI frames. - * However, you create the MDI children as children of the MDI parent: - * only in the implementation does the client window become the parent - * of the children. Phew! So the children are sort of 'adopted'... - */ - -class WXDLLEXPORT wxMDIClientWindow: public wxWindow -{ - DECLARE_DYNAMIC_CLASS(wxMDIClientWindow) - public: - - wxMDIClientWindow() ; - inline wxMDIClientWindow(wxMDIParentFrame *parent, long style = 0) - { - CreateClient(parent, style); - } - - ~wxMDIClientWindow(); - - // Note: this is virtual, to allow overridden behaviour. - virtual bool CreateClient(wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL); - - // Explicitly call default scroll behaviour - void OnScroll(wxScrollEvent& event); - -protected: - -DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_MDI_H_ diff --git a/include/wx/stubs/menu.h b/include/wx/stubs/menu.h deleted file mode 100644 index 8f1323723c..0000000000 --- a/include/wx/stubs/menu.h +++ /dev/null @@ -1,157 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: menu.h -// Purpose: wxMenu, wxMenuBar classes -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_MENU_H_ -#define _WX_MENU_H_ - -#ifdef __GNUG__ -#pragma interface "menu.h" -#endif - -#include "wx/defs.h" -#include "wx/event.h" - -class WXDLLEXPORT wxMenuItem; -class WXDLLEXPORT wxMenuBar; -class WXDLLEXPORT wxMenu; - -WXDLLEXPORT_DATA(extern const char*) wxEmptyString; - -// ---------------------------------------------------------------------------- -// Menu -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxMenu: public wxEvtHandler -{ - DECLARE_DYNAMIC_CLASS(wxMenu) - -public: - // ctor & dtor - wxMenu(const wxString& title = wxEmptyString, const wxFunction func = NULL); - ~wxMenu(); - - // construct menu - // append items to the menu - // separator line - void AppendSeparator(); - // normal item - void Append(int id, const wxString& Label, const wxString& helpString = wxEmptyString, - bool checkable = FALSE); - // a submenu - void Append(int id, const wxString& Label, wxMenu *SubMenu, - const wxString& helpString = wxEmptyString); - // the most generic form (create wxMenuItem first and use it's functions) - void Append(wxMenuItem *pItem); - // insert a break in the menu - void Break(); - // delete an item - void Delete(int id); - - // menu item control - void Enable(int id, bool Flag); - bool Enabled(int id) const; - inline bool IsEnabled(int id) const { return Enabled(id); }; - void Check(int id, bool Flag); - bool Checked(int id) const; - inline bool IsChecked(int id) const { return IsChecked(id); }; - - // item properties - // title - void SetTitle(const wxString& label); - const wxString GetTitle() const; - // label - void SetLabel(int id, const wxString& label); - wxString GetLabel(int id) const; - // help string - virtual void SetHelpString(int id, const wxString& helpString); - virtual wxString GetHelpString(int id) const ; - - // find item - // Finds the item id matching the given string, -1 if not found. - virtual int FindItem(const wxString& itemString) const ; - // Find wxMenuItem by ID, and item's menu too if itemMenu is !NULL. - wxMenuItem *FindItemForId(int itemId, wxMenu **itemMenu = NULL) const; - - void ProcessCommand(wxCommandEvent& event); - inline void Callback(const wxFunction func) { m_callback = func; } - - virtual void SetParent(wxEvtHandler *parent) { m_parent = parent; } - inline void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; } - inline wxEvtHandler *GetEventHandler() { return m_eventHandler; } - - inline wxList& GetItems() const { return (wxList&) m_menuItems; } - -public: - wxFunction m_callback; - - int m_noItems; - wxString m_title; - wxMenuBar * m_menuBar; - wxList m_menuItems; - wxEvtHandler * m_parent; - wxEvtHandler * m_eventHandler; -}; - -// ---------------------------------------------------------------------------- -// Menu Bar (a la Windows) -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxFrame; -class WXDLLEXPORT wxMenuBar: public wxEvtHandler -{ - DECLARE_DYNAMIC_CLASS(wxMenuBar) - - wxMenuBar(); - wxMenuBar(int n, wxMenu *menus[], const wxString titles[]); - ~wxMenuBar(); - - void Append(wxMenu *menu, const wxString& title); - // Must only be used AFTER menu has been attached to frame, - // otherwise use individual menus to enable/disable items - void Enable(int Id, bool Flag); - bool Enabled(int Id) const ; - inline bool IsEnabled(int Id) const { return Enabled(Id); }; - void EnableTop(int pos, bool Flag); - void Check(int id, bool Flag); - bool Checked(int id) const ; - inline bool IsChecked(int Id) const { return Checked(Id); }; - void SetLabel(int id, const wxString& label) ; - wxString GetLabel(int id) const ; - void SetLabelTop(int pos, const wxString& label) ; - wxString GetLabelTop(int pos) const ; - virtual void Delete(wxMenu *menu, int index = 0); /* Menu not destroyed */ - virtual bool OnAppend(wxMenu *menu, const char *title); - virtual bool OnDelete(wxMenu *menu, int index); - - virtual void SetHelpString(int Id, const wxString& helpString); - virtual wxString GetHelpString(int Id) const ; - - virtual int FindMenuItem(const wxString& menuString, const wxString& itemString) const ; - - // Find wxMenuItem for item ID, and return item's - // menu too if itemMenu is non-NULL. - wxMenuItem *FindItemForId(int itemId, wxMenu **menuForItem = NULL) const ; - - inline void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; } - inline wxEvtHandler *GetEventHandler() { return m_eventHandler; } - - inline int GetMenuCount() const { return m_menuCount; } - inline wxMenu* GetMenu(int i) const { return m_menus[i]; } - - public: - wxEvtHandler * m_eventHandler; - int m_menuCount; - wxMenu ** m_menus; - wxString * m_titles; - wxFrame * m_menuBarFrame; -/* TODO: data that represents the actual menubar when created. - */ -}; - -#endif // _WX_MENU_H_ diff --git a/include/wx/stubs/metafile.h b/include/wx/stubs/metafile.h deleted file mode 100644 index eb86b97a04..0000000000 --- a/include/wx/stubs/metafile.h +++ /dev/null @@ -1,101 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: metafile.h -// Purpose: wxMetaFile, wxMetaFileDC classes. -// This probably should be restricted to Windows platforms, -// but if there is an equivalent on your platform, great. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifndef _WX_METAFIILE_H_ -#define _WX_METAFIILE_H_ - -#ifdef __GNUG__ -#pragma interface "metafile.h" -#endif - -#include "wx/setup.h" - -/* - * Metafile and metafile device context classes - work in Windows 3.1 only - * - */ - -class WXDLLEXPORT wxDC; -class WXDLLEXPORT wxMetaFile: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxMetaFile) - public: - wxMetaFile(const wxString& file = ""); - ~wxMetaFile(); - - // After this is called, the metafile cannot be used for anything - // since it is now owned by the clipboard. - virtual bool SetClipboard(int width = 0, int height = 0); - - virtual bool Play(wxDC *dc); - // TODO - inline bool Ok() { return FALSE; }; - -/* TODO: Implementation - inline WXHANDLE GetHMETAFILE() { return m_metaFile; } - inline void SetHMETAFILE(WXHANDLE mf) { m_metaFile = mf; } - -protected: - WXHANDLE m_metaFile; -*/ -}; - -class WXDLLEXPORT wxMetaFileDC: public wxDC -{ - DECLARE_DYNAMIC_CLASS(wxMetaFileDC) - - public: - // Don't supply origin and extent - // Supply them to wxMakeMetaFilePlaceable instead. - wxMetaFileDC(const wxString& file = ""); - - // Supply origin and extent (recommended). - // Then don't need to supply them to wxMakeMetaFilePlaceable. - wxMetaFileDC(const wxString& file, int xext, int yext, int xorg, int yorg); - - ~wxMetaFileDC(); - - // Should be called at end of drawing - virtual wxMetaFile *Close(); - virtual void SetMapMode(int mode); - virtual void GetTextExtent(const wxString& string, float *x, float *y, - float *descent = NULL, float *externalLeading = NULL, - wxFont *theFont = NULL, bool use16bit = FALSE); - - // Implementation - inline wxMetaFile *GetMetaFile() { return m_metaFile; } - inline void SetMetaFile(wxMetaFile *mf) { m_metaFile = mf; } - inline int GetWindowsMappingMode() { return m_windowsMappingMode; } - inline void SetWindowsMappingMode(int mm) { m_windowsMappingMode = mm; } - -protected: - int m_windowsMappingMode; - wxMetaFile *m_metaFile; -}; - -/* - * Pass filename of existing non-placeable metafile, and bounding box. - * Adds a placeable metafile header, sets the mapping mode to anisotropic, - * and sets the window origin and extent to mimic the MM_TEXT mapping mode. - * - */ - -// No origin or extent -bool WXDLLEXPORT wxMakeMetaFilePlaceable(const wxString& filename, float scale = 1.0); - -// Optional origin and extent -bool WXDLLEXPORT wxMakeMetaFilePlaceable(const wxString& filename, int x1, int y1, int x2, int y2, float scale = 1.0, bool useOriginAndExtent = TRUE); - -#endif - // _WX_METAFIILE_H_ diff --git a/include/wx/stubs/minifram.h b/include/wx/stubs/minifram.h deleted file mode 100644 index 8f1644d558..0000000000 --- a/include/wx/stubs/minifram.h +++ /dev/null @@ -1,46 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: minifram.h -// Purpose: wxMiniFrame class. A small frame for e.g. floating toolbars. -// If there is no equivalent on your platform, just make it a -// normal frame. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_MINIFRAM_H_ -#define _WX_MINIFRAM_H_ - -#ifdef __GNUG__ -#pragma interface "minifram.h" -#endif - -#include "wx/frame.h" - -class WXDLLEXPORT wxMiniFrame: public wxFrame { - - DECLARE_DYNAMIC_CLASS(wxMiniFrame) - -public: - inline wxMiniFrame() {} - inline wxMiniFrame(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE|wxTINY_CAPTION_HORIZ, - const wxString& name = wxFrameNameStr) - { - // Use wxFrame constructor in absence of more specific code. - Create(parent, id, title, pos, size, style, name); - } - - ~wxMiniFrame() {} -protected: -}; - -#endif - // _WX_MINIFRAM_H_ diff --git a/include/wx/stubs/msgdlg.h b/include/wx/stubs/msgdlg.h deleted file mode 100644 index 58fa8e51ae..0000000000 --- a/include/wx/stubs/msgdlg.h +++ /dev/null @@ -1,50 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: msgdlg.h -// Purpose: wxMessageDialog class. Use generic version if no -// platform-specific implementation. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_MSGBOXDLG_H_ -#define _WX_MSGBOXDLG_H_ - -#ifdef __GNUG__ -#pragma interface "msgdlg.h" -#endif - -#include "wx/setup.h" -#include "wx/dialog.h" - -/* - * Message box dialog - */ - -WXDLLEXPORT_DATA(extern const char*) wxMessageBoxCaptionStr; - -class WXDLLEXPORT wxMessageDialog: public wxDialog -{ -DECLARE_DYNAMIC_CLASS(wxMessageDialog) -protected: - wxString m_caption; - wxString m_message; - long m_dialogStyle; - wxWindow * m_parent; -public: - wxMessageDialog(wxWindow *parent, const wxString& message, const wxString& caption = wxMessageBoxCaptionStr, - long style = wxOK|wxCENTRE, const wxPoint& pos = wxDefaultPosition); - - int ShowModal(); -}; - - -int WXDLLEXPORT wxMessageBox(const wxString& message, const wxString& caption = wxMessageBoxCaptionStr, - long style = wxOK|wxCENTRE, - wxWindow *parent = NULL, int x = -1, int y = -1); - -#endif - // _WX_MSGBOXDLG_H_ diff --git a/include/wx/stubs/notebook.h b/include/wx/stubs/notebook.h deleted file mode 100644 index 9b0794f359..0000000000 --- a/include/wx/stubs/notebook.h +++ /dev/null @@ -1,204 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: notebook.h -// Purpose: MSW/GTK compatible notebook (a.k.a. property sheet) -// Author: AUTHOR -// Modified by: -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_NOTEBOOK_H_ -#define _WX_NOTEBOOK_H_ - -#ifdef __GNUG__ -#pragma interface "notebook.h" -#endif - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- -#include "wx/dynarray.h" -#include "wx/event.h" -#include "wx/control.h" - -// ---------------------------------------------------------------------------- -// types -// ---------------------------------------------------------------------------- - -// fwd declarations -class WXDLLEXPORT wxImageList; -class WXDLLEXPORT wxWindow; - -// array of notebook pages -typedef wxWindow wxNotebookPage; // so far, any window can be a page -WX_DEFINE_ARRAY(wxNotebookPage *, wxArrayPages); - -// ---------------------------------------------------------------------------- -// notebook events -// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxNotebookEvent : public wxCommandEvent -{ -public: - wxNotebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0, - int nSel = -1, int nOldSel = -1) - : wxCommandEvent(commandType, id) { m_nSel = nSel; m_nOldSel = nOldSel; } - - // accessors - int GetSelection() const { return m_nSel; } - int GetOldSelection() const { return m_nOldSel; } - -private: - int m_nSel, // currently selected page - m_nOldSel; // previously selected page - - DECLARE_DYNAMIC_CLASS(wxNotebookEvent) -}; - -// ---------------------------------------------------------------------------- -// wxNotebook -// ---------------------------------------------------------------------------- - -// @@@ this class should really derive from wxTabCtrl, but the interface is not -// exactly the same, so I can't do it right now and instead we reimplement -// part of wxTabCtrl here -class wxNotebook : public wxControl -{ -public: - // ctors - // ----- - // default for dynamic class - wxNotebook(); - // the same arguments as for wxControl (@@@ any special styles?) - wxNotebook(wxWindow *parent, - wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = "notebook"); - // Create() function - bool Create(wxWindow *parent, - wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = "notebook"); - // dtor - ~wxNotebook(); - - // accessors - // --------- - // get number of pages in the dialog - int GetPageCount() const; - - // set the currently selected page, return the index of the previously - // selected one (or -1 on error) - // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events - int SetSelection(int nPage); - // cycle thru the tabs - void AdvanceSelection(bool bForward = TRUE); - // get the currently selected page - int GetSelection() const { return m_nSelection; } - - // set/get the title of a page - bool SetPageText(int nPage, const wxString& strText); - wxString GetPageText(int nPage) const; - - // image list stuff: each page may have an image associated with it. All - // the images belong to an image list, so you have to - // 1) create an image list - // 2) associate it with the notebook - // 3) set for each page it's image - // associate image list with a control - void SetImageList(wxImageList* imageList); - // get pointer (may be NULL) to the associated image list - wxImageList* GetImageList() const { return m_pImageList; } - - // sets/returns item's image index in the current image list - int GetPageImage(int nPage) const; - bool SetPageImage(int nPage, int nImage); - - // currently it's always 1 because wxGTK doesn't support multi-row - // tab controls - int GetRowCount() const; - - // control the appearance of the notebook pages - // set the size (the same for all pages) - void SetPageSize(const wxSize& size); - // set the padding between tabs (in pixels) - void SetPadding(const wxSize& padding); - - // operations - // ---------- - // remove one page from the notebook - bool DeletePage(int nPage); - // remove all pages - bool DeleteAllPages(); - // adds a new page to the notebook (it will be deleted ny the notebook, - // don't delete it yourself). If bSelect, this page becomes active. - bool AddPage(wxNotebookPage *pPage, - const wxString& strText, - bool bSelect = FALSE, - int imageId = -1); - // the same as AddPage(), but adds it at the specified position - bool InsertPage(int nPage, - wxNotebookPage *pPage, - const wxString& strText, - bool bSelect = FALSE, - int imageId = -1); - // get the panel which represents the given page - wxNotebookPage *GetPage(int nPage) { return m_aPages[nPage]; } - - // callbacks - // --------- - void OnSize(wxSizeEvent& event); - void OnSelChange(wxNotebookEvent& event); - void OnSetFocus(wxFocusEvent& event); - void OnNavigationKey(wxNavigationKeyEvent& event); - - // base class virtuals - // ------------------- - virtual void Command(wxCommandEvent& event); - virtual void SetConstraintSizes(bool recurse = TRUE); - virtual bool DoPhase(int nPhase); - -protected: - // common part of all ctors - void Init(); - - // helper functions - void ChangePage(int nOldSel, int nSel); // change pages - - wxImageList *m_pImageList; // we can have an associated image list - wxArrayPages m_aPages; // array of pages - - int m_nSelection; // the current selection (-1 if none) - - DECLARE_DYNAMIC_CLASS(wxNotebook) - DECLARE_EVENT_TABLE() -}; - -// ---------------------------------------------------------------------------- -// event macros -// ---------------------------------------------------------------------------- -typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&); - -#define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \ - { \ - wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, \ - id, \ - -1, \ - (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \ - NULL \ - }, - -#define EVT_NOTEBOOK_PAGE_CHANGING(id, fn) \ - { \ - wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, \ \ - id, \ - -1, \ - (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \ - NULL \ - }, - -#endif // _WX_NOTEBOOK_H_ diff --git a/include/wx/stubs/palette.h b/include/wx/stubs/palette.h deleted file mode 100644 index 1d198fc6e3..0000000000 --- a/include/wx/stubs/palette.h +++ /dev/null @@ -1,65 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: palette.h -// Purpose: wxPalette class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_PALETTE_H_ -#define _WX_PALETTE_H_ - -#ifdef __GNUG__ -#pragma interface "palette.h" -#endif - -#include "wx/gdiobj.h" - -class WXDLLEXPORT wxPalette; - -class WXDLLEXPORT wxPaletteRefData: public wxGDIRefData -{ - friend class WXDLLEXPORT wxPalette; -public: - wxPaletteRefData(); - ~wxPaletteRefData(); -/* TODO: implementation -protected: - WXHPALETTE m_hPalette; -*/ -}; - -#define M_PALETTEDATA ((wxPaletteRefData *)m_refData) - -class WXDLLEXPORT wxPalette: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxPalette) - -public: - wxPalette(); - inline wxPalette(const wxPalette& palette) { Ref(palette); } - inline wxPalette(const wxPalette* palette) { UnRef(); if (palette) Ref(*palette); } - - wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); - ~wxPalette(); - bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); - int GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const; - bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const; - - virtual bool Ok() const { return (m_refData != NULL) ; } - - inline wxPalette& operator = (const wxPalette& palette) { if (*this == palette) return (*this); Ref(palette); return *this; } - inline bool operator == (const wxPalette& palette) { return m_refData == palette.m_refData; } - inline bool operator != (const wxPalette& palette) { return m_refData != palette.m_refData; } - -/* TODO: implementation - inline WXHPALETTE GetHPALETTE() const { return (M_PALETTEDATA ? M_PALETTEDATA->m_hPalette : 0); } - void SetHPALETTE(WXHPALETTE pal); -*/ -}; - -#endif - // _WX_PALETTE_H_ diff --git a/include/wx/stubs/pen.h b/include/wx/stubs/pen.h deleted file mode 100644 index da7b165e38..0000000000 --- a/include/wx/stubs/pen.h +++ /dev/null @@ -1,104 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: pen.h -// Purpose: wxPen class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_PEN_H_ -#define _WX_PEN_H_ - -#ifdef __GNUG__ -#pragma interface "pen.h" -#endif - -#include "wx/gdiobj.h" -#include "wx/colour.h" -#include "wx/bitmap.h" - -typedef long wxDash ; - -class WXDLLEXPORT wxPen; - -class WXDLLEXPORT wxPenRefData: public wxGDIRefData -{ - friend class WXDLLEXPORT wxPen; -public: - wxPenRefData(); - wxPenRefData(const wxPenRefData& data); - ~wxPenRefData(); - -protected: - int m_width; - int m_style; - int m_join ; - int m_cap ; - wxBitmap m_stipple ; - int m_nbDash ; - wxDash * m_dash ; - wxColour m_colour; -/* TODO: implementation - WXHPEN m_hPen; -*/ -}; - -#define M_PENDATA ((wxPenRefData *)m_refData) - -// Pen -class WXDLLEXPORT wxPen: public wxGDIObject -{ - DECLARE_DYNAMIC_CLASS(wxPen) -public: - wxPen(); - wxPen(const wxColour& col, int width, int style); - wxPen(const wxString& col, int width, int style); - wxPen(const wxBitmap& stipple, int width); - inline wxPen(const wxPen& pen) { Ref(pen); } - inline wxPen(const wxPen* pen) { if (pen) Ref(*pen); } - ~wxPen(); - - inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; } - inline bool operator == (const wxPen& pen) { return m_refData == pen.m_refData; } - inline bool operator != (const wxPen& pen) { return m_refData != pen.m_refData; } - - virtual bool Ok() const { return (m_refData != NULL) ; } - - // Override in order to recreate the pen - void SetColour(const wxColour& col) ; - void SetColour(const wxString& col) ; - void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ; - - void SetWidth(int width) ; - void SetStyle(int style) ; - void SetStipple(const wxBitmap& stipple) ; - void SetDashes(int nb_dashes, const wxDash *dash) ; - void SetJoin(int join) ; - void SetCap(int cap) ; - - inline wxColour& GetColour() const { return (M_PENDATA ? M_PENDATA->m_colour : wxNullColour); }; - inline int GetWidth() const { return (M_PENDATA ? M_PENDATA->m_width : 0); }; - inline int GetStyle() const { return (M_PENDATA ? M_PENDATA->m_style : 0); }; - inline int GetJoin() const { return (M_PENDATA ? M_PENDATA->m_join : 0); }; - inline int GetCap() const { return (M_PENDATA ? M_PENDATA->m_cap : 0); }; - inline int GetDashes(wxDash **ptr) const { - *ptr = (M_PENDATA ? M_PENDATA->m_dash : NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 0); - } - - inline wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : NULL); }; - -// Implementation - - // Useful helper: create the brush resource - bool RealizeResource(); - - // When setting properties, we must make sure we're not changing - // another object - void Unshare(); -}; - -#endif - // _WX_PEN_H_ diff --git a/include/wx/stubs/print.h b/include/wx/stubs/print.h deleted file mode 100644 index bac3703496..0000000000 --- a/include/wx/stubs/print.h +++ /dev/null @@ -1,56 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: print.h -// Purpose: wxPrinter, wxPrintPreview classes -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_PRINT_H_ -#define _WX_PRINT_H_ - -#ifdef __GNUG__ -#pragma interface "print.h" -#endif - -#include "wx/prntbase.h" - -/* - * Represents the printer: manages printing a wxPrintout object - */ - -class WXDLLEXPORT wxPrinter: public wxPrinterBase -{ - DECLARE_DYNAMIC_CLASS(wxPrinter) - - public: - wxPrinter(wxPrintData *data = NULL); - ~wxPrinter(); - - virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = TRUE); - virtual bool PrintDialog(wxWindow *parent); - virtual bool Setup(wxWindow *parent); -}; - -/* - * wxPrintPreview - * Programmer creates an object of this class to preview a wxPrintout. - */ - -class WXDLLEXPORT wxPrintPreview: public wxPrintPreviewBase -{ - DECLARE_CLASS(wxPrintPreview) - - public: - wxPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting = NULL, wxPrintData *data = NULL); - ~wxPrintPreview(); - - virtual bool Print(bool interactive); - virtual void DetermineScaling(); -}; - -#endif - // _WX_PRINT_H_ diff --git a/include/wx/stubs/printdlg.h b/include/wx/stubs/printdlg.h deleted file mode 100644 index ac31a49096..0000000000 --- a/include/wx/stubs/printdlg.h +++ /dev/null @@ -1,70 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: printdlg.h -// Purpose: wxPrintDialog, wxPageSetupDialog classes. -// Use generic, PostScript version if no -// platform-specific implementation. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_PRINTDLG_H_ -#define _WX_PRINTDLG_H_ - -#ifdef __GNUG__ -#pragma interface "printdlg.h" -#endif - -#include "wx/dialog.h" -#include "wx/cmndata.h" - -/* - * wxPrinterDialog - * The common dialog for printing. - */ - -class WXDLLEXPORT wxDC; -class WXDLLEXPORT wxPrintDialog: public wxDialog -{ - DECLARE_DYNAMIC_CLASS(wxPrintDialog) - - public: - wxPrintDialog(); - wxPrintDialog(wxWindow *parent, wxPrintData* data = NULL); - ~wxPrintDialog(); - - bool Create(wxWindow *parent, wxPrintData* data = NULL); - virtual int ShowModal(); - - inline wxPrintData& GetPrintData() { return m_printData; } - virtual wxDC *GetPrintDC(); - - private: - wxPrintData m_printData; - wxDC* m_printerDC; - wxWindow* m_dialogParent; -}; - -class WXDLLEXPORT wxPageSetupDialog: public wxDialog -{ - DECLARE_DYNAMIC_CLASS(wxPageSetupDialog) - - private: - wxPageSetupData m_pageSetupData; - wxWindow* m_dialogParent; - public: - wxPageSetupDialog(); - wxPageSetupDialog(wxWindow *parent, wxPageSetupData *data = NULL); - ~wxPageSetupDialog(); - - bool Create(wxWindow *parent, wxPageSetupData *data = NULL); - virtual int ShowModal(); - - inline wxPageSetupData& GetPageSetupData() { return m_pageSetupData; } -}; - -#endif - // _WX_PRINTDLG_H_ diff --git a/include/wx/stubs/private.h b/include/wx/stubs/private.h deleted file mode 100644 index 922c172436..0000000000 --- a/include/wx/stubs/private.h +++ /dev/null @@ -1,21 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: private.h -// Purpose: Private declarations -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_PRIVATE_H_ -#define _WX_PRIVATE_H_ - -#include "wx/defs.h" - -/* TODO: put any private declarations here. - */ - -#endif - // _WX_PRIVATE_H_ diff --git a/include/wx/stubs/radiobox.h b/include/wx/stubs/radiobox.h deleted file mode 100644 index cb7c5ba405..0000000000 --- a/include/wx/stubs/radiobox.h +++ /dev/null @@ -1,88 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: radiobox.h -// Purpose: wxRadioBox class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_RADIOBOX_H_ -#define _WX_RADIOBOX_H_ - -#ifdef __GNUG__ -#pragma interface "radiobox.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxRadioBoxNameStr; - -// List box item -class WXDLLEXPORT wxBitmap ; - -class WXDLLEXPORT wxRadioBox: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxRadioBox) -public: - wxRadioBox(); - - inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - int majorDim = 0, long style = wxRA_HORIZONTAL, - const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr) - { - Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name); - } - - ~wxRadioBox(); - - bool Create(wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - int majorDim = 0, long style = wxRA_HORIZONTAL, - const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); - - int FindString(const wxString& s) const; - void SetSelection(int N); - int GetSelection() const; - wxString GetString(int N) const; - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - void GetSize(int *x, int *y) const; - void GetPosition(int *x, int *y) const; - wxString GetLabel() const; - void SetLabel(const wxString& label); - void SetLabel(int item, const wxString& label) ; - wxString GetLabel(int item) const; - bool Show(bool show); - void SetFocus(); - void Enable(bool enable); - void Enable(int item, bool enable); - void Show(int item, bool show) ; - inline void SetLabelFont(const wxFont& WXUNUSED(font)) {}; - inline void SetButtonFont(const wxFont& font) { SetFont(font); } - - virtual wxString GetStringSelection() const; - virtual bool SetStringSelection(const wxString& s); - inline virtual int Number() const { return m_noItems; } ; - void Command(wxCommandEvent& event); - - inline int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; } - inline void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; } - -protected: -/* TODO: implementation - WXHWND * m_radioButtons; -*/ - int m_majorDim ; - int m_noItems; - int m_noRowsOrCols; - int m_selectedButton; - -}; - -#endif - // _WX_RADIOBOX_H_ diff --git a/include/wx/stubs/radiobut.h b/include/wx/stubs/radiobut.h deleted file mode 100644 index 8e8bf1313d..0000000000 --- a/include/wx/stubs/radiobut.h +++ /dev/null @@ -1,90 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: radiobut.h -// Purpose: wxRadioButton class -// Author: AUTHOR -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_RADIOBUT_H_ -#define _WX_RADIOBUT_H_ - -#ifdef __GNUG__ -#pragma interface "radiobut.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxRadioButtonNameStr; - -class WXDLLEXPORT wxRadioButton: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxRadioButton) - protected: - public: - inline wxRadioButton() {} - inline wxRadioButton(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr); - - virtual void SetLabel(const wxString& label); - virtual void SetValue(bool val); - virtual bool GetValue() const ; - - void Command(wxCommandEvent& event); -}; - -// Not implemented -#if 0 -class WXDLLEXPORT wxBitmap ; - -WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr; - -class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton -{ - DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton) - protected: - wxBitmap *theButtonBitmap; - public: - inline wxBitmapRadioButton() { theButtonBitmap = NULL; } - inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id, - const wxBitmap *label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxBitmapRadioButtonNameStr) - { - Create(parent, id, label, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxBitmap *label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxBitmapRadioButtonNameStr); - - virtual void SetLabel(const wxBitmap *label); - virtual void SetValue(bool val) ; - virtual bool GetValue() const ; -}; -#endif - -#endif - // _WX_RADIOBUT_H_ diff --git a/include/wx/stubs/region.h b/include/wx/stubs/region.h deleted file mode 100644 index 6353a7dc16..0000000000 --- a/include/wx/stubs/region.h +++ /dev/null @@ -1,135 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: region.h -// Purpose: wxRegion class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_REGION_H_ -#define _WX_REGION_H_ - -#ifdef __GNUG__ -#pragma interface "region.h" -#endif - -#include "wx/list.h" -#include "wx/gdiobj.h" - -class WXDLLEXPORT wxRect; -class WXDLLEXPORT wxPoint; - -enum wxRegionContain { - wxOutRegion = 0, wxPartRegion = 1, wxInRegion = 2 -}; - -// So far, for internal use only -enum wxRegionOp { -wxRGN_AND, // Creates the intersection of the two combined regions. -wxRGN_COPY, // Creates a copy of the region identified by hrgnSrc1. -wxRGN_DIFF, // Combines the parts of hrgnSrc1 that are not part of hrgnSrc2. -wxRGN_OR, // Creates the union of two combined regions. -wxRGN_XOR // Creates the union of two combined regions except for any overlapping areas. -}; - -class WXDLLEXPORT wxRegion : public wxGDIObject { -DECLARE_DYNAMIC_CLASS(wxRegion); - friend class WXDLLEXPORT wxRegionIterator; -public: - wxRegion(long x, long y, long w, long h); - wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight); - wxRegion(const wxRect& rect); - wxRegion(); - ~wxRegion(); - - //# Copying - inline wxRegion(const wxRegion& r) - { Ref(r); } - inline wxRegion& operator = (const wxRegion& r) - { Ref(r); return (*this); } - - //# Modify region - // Clear current region - void Clear(); - - // Union rectangle or region with this. - inline bool Union(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_OR); } - inline bool Union(const wxRect& rect) { return Combine(rect, wxRGN_OR); } - inline bool Union(const wxRegion& region) { return Combine(region, wxRGN_OR); } - - // Intersect rectangle or region with this. - inline bool Intersect(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_AND); } - inline bool Intersect(const wxRect& rect) { return Combine(rect, wxRGN_AND); } - inline bool Intersect(const wxRegion& region) { return Combine(region, wxRGN_AND); } - - // Subtract rectangle or region from this: - // Combines the parts of 'this' that are not part of the second region. - inline bool Subtract(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_DIFF); } - inline bool Subtract(const wxRect& rect) { return Combine(rect, wxRGN_DIFF); } - inline bool Subtract(const wxRegion& region) { return Combine(region, wxRGN_DIFF); } - - // XOR: the union of two combined regions except for any overlapping areas. - inline bool Xor(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_XOR); } - inline bool Xor(const wxRect& rect) { return Combine(rect, wxRGN_XOR); } - inline bool Xor(const wxRegion& region) { return Combine(region, wxRGN_XOR); } - - //# Information on region - // Outer bounds of region - void GetBox(long& x, long& y, long&w, long &h) const; - wxRect GetBox() const ; - - // Is region empty? - bool Empty() const; - inline bool IsEmpty() const { return Empty(); } - - //# Tests - // Does the region contain the point (x,y)? - wxRegionContain Contains(long x, long y) const; - // Does the region contain the point pt? - wxRegionContain Contains(const wxPoint& pt) const; - // Does the region contain the rectangle (x, y, w, h)? - wxRegionContain Contains(long x, long y, long w, long h) const; - // Does the region contain the rectangle rect? - wxRegionContain Contains(const wxRect& rect) const; - -// Internal - bool Combine(long x, long y, long width, long height, wxRegionOp op); - bool Combine(const wxRegion& region, wxRegionOp op); - bool Combine(const wxRect& rect, wxRegionOp op); -}; - -class WXDLLEXPORT wxRegionIterator : public wxObject { -DECLARE_DYNAMIC_CLASS(wxRegionIterator); -public: - wxRegionIterator(); - wxRegionIterator(const wxRegion& region); - ~wxRegionIterator(); - - void Reset() { m_current = 0; } - void Reset(const wxRegion& region); - - operator bool () const { return m_current < m_numRects; } - bool HaveRects() const { return m_current < m_numRects; } - - void operator ++ (); - void operator ++ (int); - - long GetX() const; - long GetY() const; - long GetW() const; - long GetWidth() const { return GetW(); } - long GetH() const; - long GetHeight() const { return GetH(); } - -private: - long m_current; - long m_numRects; - wxRegion m_region; - wxRect* m_rects; -}; - -#endif - // _WX_REGION_H_ diff --git a/include/wx/stubs/scrolbar.h b/include/wx/stubs/scrolbar.h deleted file mode 100644 index eeef6727c5..0000000000 --- a/include/wx/stubs/scrolbar.h +++ /dev/null @@ -1,68 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: scrollbar.h -// Purpose: wxScrollBar class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_SCROLBAR_H_ -#define _WX_SCROLBAR_H_ - -#ifdef __GNUG__ -#pragma interface "scrolbar.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxScrollBarNameStr; - -// Scrollbar item -class WXDLLEXPORT wxScrollBar: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxScrollBar) - -public: - inline wxScrollBar() { m_pageSize = 0; m_viewSize = 0; m_objectSize = 0; } - ~wxScrollBar(); - - inline wxScrollBar(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSB_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr) - { - Create(parent, id, pos, size, style, validator, name); - } - bool Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSB_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr); - - int GetPosition() const ; - inline int GetThumbSize() const { return m_pageSize; } - inline int GetPageSize() const { return m_viewSize; } - inline int GetRange() const { return m_objectSize; } - - virtual void SetPosition(int viewStart); - virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize, - bool refresh = TRUE); - - void Command(wxCommandEvent& event); - -protected: - int m_pageSize; - int m_viewSize; - int m_objectSize; - -DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_SCROLBAR_H_ diff --git a/include/wx/stubs/settings.h b/include/wx/stubs/settings.h deleted file mode 100644 index 8ed994f1ba..0000000000 --- a/include/wx/stubs/settings.h +++ /dev/null @@ -1,133 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: settings.h -// Purpose: wxSystemSettings class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_SETTINGS_H_ -#define _WX_SETTINGS_H_ - -#ifdef __GNUG__ -#pragma interface "settings.h" -#endif - -#include "wx/setup.h" -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/colour.h" -#include "wx/font.h" - -#define wxSYS_WHITE_BRUSH 0 -#define wxSYS_LTGRAY_BRUSH 1 -#define wxSYS_GRAY_BRUSH 2 -#define wxSYS_DKGRAY_BRUSH 3 -#define wxSYS_BLACK_BRUSH 4 -#define wxSYS_NULL_BRUSH 5 -#define wxSYS_HOLLOW_BRUSH wxSYS_NULL_BRUSH -#define wxSYS_WHITE_PEN 6 -#define wxSYS_BLACK_PEN 7 -#define wxSYS_NULL_PEN 8 -#define wxSYS_OEM_FIXED_FONT 10 -#define wxSYS_ANSI_FIXED_FONT 11 -#define wxSYS_ANSI_VAR_FONT 12 -#define wxSYS_SYSTEM_FONT 13 -#define wxSYS_DEVICE_DEFAULT_FONT 14 -#define wxSYS_DEFAULT_PALETTE 15 -#define wxSYS_SYSTEM_FIXED_FONT 16 // Obsolete -#define wxSYS_DEFAULT_GUI_FONT 17 - -#define wxSYS_COLOUR_SCROLLBAR 0 -#define wxSYS_COLOUR_BACKGROUND 1 -#define wxSYS_COLOUR_ACTIVECAPTION 2 -#define wxSYS_COLOUR_INACTIVECAPTION 3 -#define wxSYS_COLOUR_MENU 4 -#define wxSYS_COLOUR_WINDOW 5 -#define wxSYS_COLOUR_WINDOWFRAME 6 -#define wxSYS_COLOUR_MENUTEXT 7 -#define wxSYS_COLOUR_WINDOWTEXT 8 -#define wxSYS_COLOUR_CAPTIONTEXT 9 -#define wxSYS_COLOUR_ACTIVEBORDER 10 -#define wxSYS_COLOUR_INACTIVEBORDER 11 -#define wxSYS_COLOUR_APPWORKSPACE 12 -#define wxSYS_COLOUR_HIGHLIGHT 13 -#define wxSYS_COLOUR_HIGHLIGHTTEXT 14 -#define wxSYS_COLOUR_BTNFACE 15 -#define wxSYS_COLOUR_BTNSHADOW 16 -#define wxSYS_COLOUR_GRAYTEXT 17 -#define wxSYS_COLOUR_BTNTEXT 18 -#define wxSYS_COLOUR_INACTIVECAPTIONTEXT 19 -#define wxSYS_COLOUR_BTNHIGHLIGHT 20 - -#define wxSYS_COLOUR_3DDKSHADOW 21 -#define wxSYS_COLOUR_3DLIGHT 22 -#define wxSYS_COLOUR_INFOTEXT 23 -#define wxSYS_COLOUR_INFOBK 24 - -#define wxSYS_COLOUR_DESKTOP wxSYS_COLOUR_BACKGROUND -#define wxSYS_COLOUR_3DFACE wxSYS_COLOUR_BTNFACE -#define wxSYS_COLOUR_3DSHADOW wxSYS_COLOUR_BTNSHADOW -#define wxSYS_COLOUR_3DHIGHLIGHT wxSYS_COLOUR_BTNHIGHLIGHT -#define wxSYS_COLOUR_3DHILIGHT wxSYS_COLOUR_BTNHIGHLIGHT -#define wxSYS_COLOUR_BTNHILIGHT wxSYS_COLOUR_BTNHIGHLIGHT - -// Metrics -#define wxSYS_MOUSE_BUTTONS 1 -#define wxSYS_BORDER_X 2 -#define wxSYS_BORDER_Y 3 -#define wxSYS_CURSOR_X 4 -#define wxSYS_CURSOR_Y 5 -#define wxSYS_DCLICK_X 6 -#define wxSYS_DCLICK_Y 7 -#define wxSYS_DRAG_X 8 -#define wxSYS_DRAG_Y 9 -#define wxSYS_EDGE_X 10 -#define wxSYS_EDGE_Y 11 -#define wxSYS_HSCROLL_ARROW_X 12 -#define wxSYS_HSCROLL_ARROW_Y 13 -#define wxSYS_HTHUMB_X 14 -#define wxSYS_ICON_X 15 -#define wxSYS_ICON_Y 16 -#define wxSYS_ICONSPACING_X 17 -#define wxSYS_ICONSPACING_Y 18 -#define wxSYS_WINDOWMIN_X 19 -#define wxSYS_WINDOWMIN_Y 20 -#define wxSYS_SCREEN_X 21 -#define wxSYS_SCREEN_Y 22 -#define wxSYS_FRAMESIZE_X 23 -#define wxSYS_FRAMESIZE_Y 24 -#define wxSYS_SMALLICON_X 25 -#define wxSYS_SMALLICON_Y 26 -#define wxSYS_HSCROLL_Y 27 -#define wxSYS_VSCROLL_X 28 -#define wxSYS_VSCROLL_ARROW_X 29 -#define wxSYS_VSCROLL_ARROW_Y 30 -#define wxSYS_VTHUMB_Y 31 -#define wxSYS_CAPTION_Y 32 -#define wxSYS_MENU_Y 33 -#define wxSYS_NETWORK_PRESENT 34 -#define wxSYS_PENWINDOWS_PRESENT 35 -#define wxSYS_SHOW_SOUNDS 36 -#define wxSYS_SWAP_BUTTONS 37 - -class WXDLLEXPORT wxSystemSettings: public wxObject -{ -public: - inline wxSystemSettings() {} - - // Get a system colour - static wxColour GetSystemColour(int index); - - // Get a system font - static wxFont GetSystemFont(int index); - - // Get a system metric, e.g. scrollbar size - static int GetSystemMetric(int index); -}; - -#endif - // _WX_SETTINGS_H_ diff --git a/include/wx/stubs/setup.h b/include/wx/stubs/setup.h deleted file mode 100644 index dc99dbf74b..0000000000 --- a/include/wx/stubs/setup.h +++ /dev/null @@ -1,118 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: setup.h -// Purpose: Configuration for the library -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_SETUP_H_ -#define _WX_SETUP_H_ - -/* - * General features - * - */ - -#define USE_CONFIG 1 - // Use wxConfig, with CreateConfig in wxApp -#define _WX_GOODCOMPILER__ - // gcc can have problems, but Windows compilers - // are generally OK. -#define WXWIN_COMPATIBILITY 1 - // Compatibility with 1.66 API. - // Level 0: no backward compatibility, all new features - // Level 1: wxDC, OnSize (etc.) compatibility, but - // some new features such as event tables - -#define USE_POSTSCRIPT 1 - // 0 for no PostScript device context -#define USE_AFM_FOR_POSTSCRIPT 0 - // 1 to use font metric files in GetTextExtent -#define USE_METAFILE 1 - // 0 for no Metafile and metafile device context -#define USE_IPC 1 - // 0 for no interprocess comms -#define USE_HELP 1 - // 0 for no help facility -#define USE_RESOURCES 1 - // 0 for no wxGetResource/wxWriteResource -#define USE_CLIPBOARD 1 - // 0 for no clipboard functions -#define USE_SPLINES 1 - // 0 for no splines -#define USE_XFIG_SPLINE_CODE 1 - // 1 for XFIG spline code, 0 for AIAI spline code. -// AIAI spline code is slower, but freer of copyright issues. - // 0 for no splines - -#define USE_TOOLBAR 1 - // Use toolbars -#define USE_DRAG_AND_DROP 1 - // 0 for no drag and drop - -#define USE_WX_RESOURCES 1 - // Use .wxr resource mechanism (requires PrologIO library) - -#define USE_DOC_VIEW_ARCHITECTURE 1 - // Set to 0 to disable document/view architecture -#define USE_PRINTING_ARCHITECTURE 1 - // Set to 0 to disable print/preview architecture code -#define USE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1 - // Set to 0 to disable PostScript print/preview architecture code - // under Windows (just use Windows printing). -#define USE_DYNAMIC_CLASSES 1 - // If 1, enables provision of run-time type information. - // NOW MANDATORY: don't change. -#define USE_MEMORY_TRACING 1 - // If 1, enables debugging versions of wxObject::new and - // wxObject::delete *IF* WXDEBUG is also defined. - // WARNING: this code may not work with all architectures, especially - // if alignment is an issue. -#define USE_DEBUG_CONTEXT 1 - // If 1, enables wxDebugContext, for - // writing error messages to file, etc. - // If WXDEBUG is not defined, will still use - // normal memory operators. - // It's recommended to set this to 1, - // since you may well need to output - // an error log in a production - // version (or non-debugging beta) -#define USE_GLOBAL_MEMORY_OPERATORS 0 - // In debug mode, cause new and delete to be redefined globally. - // If this causes problems (e.g. link errors), set this to 0. - -#define REMOVE_UNUSED_ARG 1 - // Set this to 0 if your compiler can't cope - // with omission of prototype parameters. - -#define USE_C_MAIN 0 - // Set to 1 to use main.c instead of main.cpp (UNIX only) - -#define USE_ODBC 1 - // Define 1 to use ODBC classes - -#define USE_IOSTREAMH 1 - // VC++ 4.2 and above allows and - // but you can't mix them. Set to 1 for , - // 0 for - -#define USE_WXCONFIG 1 - // if enabled, compiles built-in OS independent wxConfig - // class and it's file (any platform) and registry (Win) - // based implementations -/* - * Finer detail - * - */ - -#define USE_APPLE_IEEE 1 - // if enabled, the float codec written by Apple - // will be used to write, in a portable way, - // float on the disk - -#endif - // _WX_SETUP_H_ diff --git a/include/wx/stubs/slider.h b/include/wx/stubs/slider.h deleted file mode 100644 index 239e914e5c..0000000000 --- a/include/wx/stubs/slider.h +++ /dev/null @@ -1,91 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: slider.h -// Purpose: wxSlider class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_SLIDER_H_ -#define _WX_SLIDER_H_ - -#ifdef __GNUG__ -#pragma interface "slider.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr; - -// Slider -class WXDLLEXPORT wxSlider: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxSlider) - -public: - wxSlider(); - - inline wxSlider(wxWindow *parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSL_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr) - { - Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name); - } - - ~wxSlider(); - - bool Create(wxWindow *parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxSL_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr); - - virtual int GetValue() const ; - virtual void SetValue(int); - void GetSize(int *x, int *y) const ; - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - void GetPosition(int *x, int *y) const ; - bool Show(bool show); - - void SetRange(int minValue, int maxValue); - - inline int GetMin() const { return m_rangeMin; } - inline int GetMax() const { return m_rangeMax; } - - // For trackbars only - void SetTickFreq(int n, int pos); - inline int GetTickFreq() const { return m_tickFreq; } - void SetPageSize(int pageSize); - int GetPageSize() const ; - void ClearSel() ; - void ClearTicks() ; - void SetLineSize(int lineSize); - int GetLineSize() const ; - int GetSelEnd() const ; - int GetSelStart() const ; - void SetSelection(int minPos, int maxPos); - void SetThumbLength(int len) ; - int GetThumbLength() const ; - void SetTick(int tickPos) ; - - void Command(wxCommandEvent& event); - protected: - int m_rangeMin; - int m_rangeMax; - int m_pageSize; - int m_lineSize; - int m_tickFreq; -DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_SLIDER_H_ diff --git a/include/wx/stubs/spinbutt.h b/include/wx/stubs/spinbutt.h deleted file mode 100644 index afdb978c3f..0000000000 --- a/include/wx/stubs/spinbutt.h +++ /dev/null @@ -1,97 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: spinbutt.h -// Purpose: wxSpinButton class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_SPINBUTT_H_ -#define _WX_SPINBUTT_H_ - -#ifdef __GNUG__ -#pragma interface "spinbutt.h" -#endif - -#include "wx/control.h" -#include "wx/event.h" - -/* - The wxSpinButton is like a small scrollbar than is often placed next - to a text control. - - wxSP_HORIZONTAL: horizontal spin button - wxSP_VERTICAL: vertical spin button (the default) - wxSP_ARROW_KEYS: arrow keys increment/decrement value - wxSP_WRAP: value wraps at either end - */ - -class WXDLLEXPORT wxSpinButton: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxSpinButton) - public: - /* - * Public interface - */ - - wxSpinButton(); - - inline wxSpinButton(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxSP_VERTICAL, const wxString& name = "wxSpinButton") - { - Create(parent, id, pos, size, style, name); - } - ~wxSpinButton(); - - bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxSP_VERTICAL, const wxString& name = "wxSpinButton"); - - - // Attributes - //////////////////////////////////////////////////////////////////////////// - - int GetValue() const ; - void SetValue(int val) ; - void SetRange(int minVal, int maxVal) ; - inline int GetMin() const { return m_min; } - inline int GetMax() const { return m_max; } - - // Operations - //////////////////////////////////////////////////////////////////////////// - - void Command(wxCommandEvent& event) { ProcessCommand(event); }; - -protected: - int m_min; - int m_max; -}; - -class WXDLLEXPORT wxSpinEvent: public wxScrollEvent -{ - DECLARE_DYNAMIC_CLASS(wxSpinEvent) - - public: - wxSpinEvent(wxEventType commandType = wxEVT_NULL, int id = 0); -}; - -typedef void (wxEvtHandler::*wxSpinEventFunction)(wxSpinEvent&); - -// Spin events - -#define EVT_SPIN_UP(id, func) { wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func } -#define EVT_SPIN_DOWN(id, func) { wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func } - -#define EVT_SPIN(id, func) \ - { wxEVT_SCROLL_TOP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\ - { wxEVT_SCROLL_BOTTOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\ - { wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\ - { wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\ - { wxEVT_SCROLL_PAGEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\ - { wxEVT_SCROLL_PAGEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\ - { wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func }, - -#endif - // _WX_SPINBUTT_H_ diff --git a/include/wx/stubs/statbmp.h b/include/wx/stubs/statbmp.h deleted file mode 100644 index f371fddd2d..0000000000 --- a/include/wx/stubs/statbmp.h +++ /dev/null @@ -1,64 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: statbmp.h -// Purpose: wxStaticBitmap class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_STATBMP_H_ -#define _WX_STATBMP_H_ - -#ifdef __GNUG__ -#pragma interface "statbmp.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxStaticBitmapNameStr; - -class WXDLLEXPORT wxStaticBitmap: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxStaticBitmap) - public: - inline wxStaticBitmap() { } - - inline wxStaticBitmap(wxWindow *parent, wxWindowID id, - const wxBitmap& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxStaticBitmapNameStr) - { - Create(parent, id, label, pos, size, style, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxBitmap& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxStaticBitmapNameStr); - - virtual void SetBitmap(const wxBitmap& bitmap); - - virtual void Command(wxCommandEvent& WXUNUSED(event)) {}; - virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {}; - - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - - inline wxBitmap& GetBitmap() const { return (wxBitmap&) m_messageBitmap; } - - // overriden base class virtuals - virtual bool AcceptsFocus() const { return FALSE; } - - protected: - wxBitmap m_messageBitmap; - -}; - -#endif - // _WX_STATBMP_H_ diff --git a/include/wx/stubs/statbox.h b/include/wx/stubs/statbox.h deleted file mode 100644 index 1aa4a6f88a..0000000000 --- a/include/wx/stubs/statbox.h +++ /dev/null @@ -1,57 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: statbox.h -// Purpose: wxStaticBox class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_STATBOX_H_ -#define _WX_STATBOX_H_ - -#ifdef __GNUG__ -#pragma interface "statbox.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxStaticBoxNameStr; - -// Group box -class WXDLLEXPORT wxStaticBox: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxStaticBox) - - public: - inline wxStaticBox() {} - inline wxStaticBox(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxStaticBoxNameStr) - { - Create(parent, id, label, pos, size, style, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxStaticBoxNameStr); - - virtual void Command(wxCommandEvent& WXUNUSED(event)) {}; - virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {}; - - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - void SetLabel(const wxString& label); - -DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_STATBOX_H_ diff --git a/include/wx/stubs/stattext.h b/include/wx/stubs/stattext.h deleted file mode 100644 index aa8eaf229e..0000000000 --- a/include/wx/stubs/stattext.h +++ /dev/null @@ -1,56 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: stattext.h -// Purpose: wxStaticText class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_STATTEXT_H_ -#define _WX_STATTEXT_H_ - -#ifdef __GNUG__ -#pragma interface "stattext.h" -#endif - -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxStaticTextNameStr; - -class WXDLLEXPORT wxStaticText: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxStaticText) - public: - inline wxStaticText() { } - - inline wxStaticText(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxStaticTextNameStr) - { - Create(parent, id, label, pos, size, style, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxStaticTextNameStr); - - // accessors - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - void SetLabel(const wxString&); - - // operations - virtual void Command(wxCommandEvent& WXUNUSED(event)) {}; - virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {}; -}; - -#endif - // _WX_STATTEXT_H_ diff --git a/include/wx/stubs/statusbr.h b/include/wx/stubs/statusbr.h deleted file mode 100644 index c5dcc0dc7d..0000000000 --- a/include/wx/stubs/statusbr.h +++ /dev/null @@ -1,54 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: statusbr.h -// Purpose: native implementation of wxStatusBar. Optional; can use generic -// version instead. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_STATBAR_H_ -#define _WX_STATBAR_H_ - -#ifdef __GNUG__ -#pragma interface "statbar.h" -#endif - -#include "wx/generic/statusbr.h" - -class WXDLLEXPORT wxStatusBarXX : public wxStatusBar -{ - DECLARE_DYNAMIC_CLASS(wxStatusBarXX); - -public: - // ctors - wxStatusBarXX(); - wxStatusBarXX(wxWindow *parent, wxWindowID id = -1, long style = wxST_SIZEGRIP); - - // create status line - bool Create(wxWindow *parent, wxWindowID id = -1, long style = wxST_SIZEGRIP); - - // a status line can have several (<256) fields numbered from 0 - virtual void SetFieldsCount(int number = 1, const int widths[] = NULL); - - // each field of status line has its own text - virtual void SetStatusText(const wxString& text, int number = 0); - virtual wxString GetStatusText(int number = 0) const; - - // set status line fields' widths - virtual void SetStatusWidths(int n, const int widths_field[]); - - void OnSize(wxSizeEvent& event); - - DECLARE_EVENT_TABLE() - -protected: - void CopyFieldsWidth(const int widths[]); - void SetFieldsWidth(); -}; - -#endif - // _WX_STATBAR_H_ \ No newline at end of file diff --git a/include/wx/stubs/tabctrl.h b/include/wx/stubs/tabctrl.h deleted file mode 100644 index 80740019b4..0000000000 --- a/include/wx/stubs/tabctrl.h +++ /dev/null @@ -1,138 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tabctrl.h -// Purpose: wxTabCtrl class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_TABCTRL_H_ -#define _WX_TABCTRL_H_ - -#ifdef __GNUG__ -#pragma interface "tabctrl.h" -#endif - -class wxImageList; - -/* - * Flags returned by HitTest - */ - -#define wxTAB_HITTEST_NOWHERE 1 -#define wxTAB_HITTEST_ONICON 2 -#define wxTAB_HITTEST_ONLABEL 4 -#define wxTAB_HITTEST_ONITEM 6 - -class WXDLLEXPORT wxTabCtrl: public wxControl -{ - DECLARE_DYNAMIC_CLASS(wxTabCtrl) - public: - /* - * Public interface - */ - - wxTabCtrl(); - - inline wxTabCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = "tabCtrl") - { - Create(parent, id, pos, size, style, name); - } - ~wxTabCtrl(); - -// Accessors - - // Get the selection - int GetSelection() const; - - // Get the tab with the current keyboard focus - int GetCurFocus() const; - - // Get the associated image list - wxImageList* GetImageList() const; - - // Get the number of items - int GetItemCount() const; - - // Get the rect corresponding to the tab - bool GetItemRect(int item, wxRect& rect) const; - - // Get the number of rows - int GetRowCount() const; - - // Get the item text - wxString GetItemText(int item) const ; - - // Get the item image - int GetItemImage(int item) const; - - // Get the item data - void* GetItemData(int item) const; - - // Set the selection - int SetSelection(int item); - - // Set the image list - void SetImageList(wxImageList* imageList); - - // Set the text for an item - bool SetItemText(int item, const wxString& text); - - // Set the image for an item - bool SetItemImage(int item, int image); - - // Set the data for an item - bool SetItemData(int item, void* data); - - // Set the size for a fixed-width tab control - void SetItemSize(const wxSize& size); - - // Set the padding between tabs - void SetPadding(const wxSize& padding); - -// Operations - - bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = "tabCtrl"); - - // Delete all items - bool DeleteAllItems(); - - // Delete an item - bool DeleteItem(int item); - - // Hit test - int HitTest(const wxPoint& pt, long& flags); - - // Insert an item - bool InsertItem(int item, const wxString& text, int imageId = -1, void* data = NULL); - - void Command(wxCommandEvent& event); - -protected: - wxImageList* m_imageList; - -DECLARE_EVENT_TABLE() -}; - -class WXDLLEXPORT wxTabEvent: public wxCommandEvent -{ - DECLARE_DYNAMIC_CLASS(wxTabEvent) - - public: - wxTabEvent(wxEventType commandType = wxEVT_NULL, int id = 0); -}; - -typedef void (wxEvtHandler::*wxTabEventFunction)(wxTabEvent&); - -#define EVT_TAB_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TAB_SEL_CHANGED, \ - id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL }, -#define EVT_TAB_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TAB_SEL_CHANGING, \ - id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL }, - -#endif - // _WX_TABCTRL_H_ diff --git a/include/wx/stubs/taskbar.h b/include/wx/stubs/taskbar.h deleted file mode 100644 index 7f4a36b8b4..0000000000 --- a/include/wx/stubs/taskbar.h +++ /dev/null @@ -1,49 +0,0 @@ -///////////////////////////////////////////////////////////////////////// -// File: taskbar.h -// Purpose: Defines wxTaskBarIcon class for manipulating icons on the -// task bar. Optional. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////// - -#ifndef _WX_TASKBAR_H_ -#define _WX_TASKBAR_H_ - -#ifdef __GNUG__ -#pragma interface "taskbar.h" -#endif - -#include -#include - -class wxTaskBarIcon: public wxObject -{ -public: - wxTaskBarIcon(); - virtual ~wxTaskBarIcon(); - -// Accessors - -// Operations - bool SetIcon(const wxIcon& icon, const wxString& tooltip = ""); - bool RemoveIcon(); - -// Overridables - virtual void OnMouseMove(); - virtual void OnLButtonDown(); - virtual void OnLButtonUp(); - virtual void OnRButtonDown(); - virtual void OnRButtonUp(); - virtual void OnLButtonDClick(); - virtual void OnRButtonDClick(); - -// Data members -protected: -}; - -#endif - // _WX_TASKBAR_H_ diff --git a/include/wx/stubs/textctrl.h b/include/wx/stubs/textctrl.h deleted file mode 100644 index 7c3d7b1ac2..0000000000 --- a/include/wx/stubs/textctrl.h +++ /dev/null @@ -1,139 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: textctrl.h -// Purpose: wxTextCtrl class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_TEXTCTRL_H_ -#define _WX_TEXTCTRL_H_ - -#ifdef __GNUG__ -#pragma interface "textctrl.h" -#endif - -#include "wx/control.h" - -#if USE_IOSTREAMH -#include -#else -#include -#endif - -WXDLLEXPORT_DATA(extern const char*) wxTextCtrlNameStr; -WXDLLEXPORT_DATA(extern const char*) wxEmptyString; - -// Single-line text item -class WXDLLEXPORT wxTextCtrl: public wxControl - -// TODO Some platforms/compilers don't like inheritance from streambuf. - -#if (defined(__BORLANDC__) && !defined(__WIN32__)) || defined(__MWERKS__) -#define NO_TEXT_WINDOW_STREAM -#endif - -#ifndef NO_TEXT_WINDOW_STREAM -, public streambuf -#endif - -{ - DECLARE_DYNAMIC_CLASS(wxTextCtrl) - -public: - // creation - // -------- - wxTextCtrl(); - inline wxTextCtrl(wxWindow *parent, wxWindowID id, - const wxString& value = wxEmptyString, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxTextCtrlNameStr) -#ifndef NO_TEXT_WINDOW_STREAM - :streambuf() -#endif - { - Create(parent, id, value, pos, size, style, validator, name); - } - - bool Create(wxWindow *parent, wxWindowID id, - const wxString& value = wxEmptyString, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxTextCtrlNameStr); - - // accessors - // --------- - virtual wxString GetValue() const ; - virtual void SetValue(const wxString& value); - - virtual int GetLineLength(long lineNo) const; - virtual wxString GetLineText(long lineNo) const; - virtual int GetNumberOfLines() const; - - // operations - // ---------- - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - - // Clipboard operations - virtual void Copy(); - virtual void Cut(); - virtual void Paste(); - - virtual void SetInsertionPoint(long pos); - virtual void SetInsertionPointEnd(); - virtual long GetInsertionPoint() const ; - virtual long GetLastPosition() const ; - virtual void Replace(long from, long to, const wxString& value); - virtual void Remove(long from, long to); - virtual void SetSelection(long from, long to); - virtual void SetEditable(bool editable); - - // streambuf implementation -#ifndef NO_TEXT_WINDOW_STREAM - int overflow(int i); - int sync(); - int underflow(); -#endif - - wxTextCtrl& operator<<(const wxString& s); - wxTextCtrl& operator<<(int i); - wxTextCtrl& operator<<(long i); - wxTextCtrl& operator<<(float f); - wxTextCtrl& operator<<(double d); - wxTextCtrl& operator<<(const char c); - - virtual bool LoadFile(const wxString& file); - virtual bool SaveFile(const wxString& file); - virtual void WriteText(const wxString& text); - virtual void DiscardEdits(); - virtual bool IsModified() const; - - virtual long XYToPosition(long x, long y) const ; - virtual void PositionToXY(long pos, long *x, long *y) const ; - virtual void ShowPosition(long pos); - virtual void Clear(); - - // callbacks - // --------- - void OnDropFiles(wxDropFilesEvent& event); - void OnChar(wxKeyEvent& event); // Process 'enter' if required - void OnEraseBackground(wxEraseEvent& event); - - // Implementation - // -------------- - virtual void Command(wxCommandEvent& event); - -protected: - wxString m_fileName; - - DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_TEXTCTRL_H_ diff --git a/include/wx/stubs/timer.h b/include/wx/stubs/timer.h deleted file mode 100644 index 22fa2eed59..0000000000 --- a/include/wx/stubs/timer.h +++ /dev/null @@ -1,57 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: timer.h -// Purpose: wxTimer class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_TIMER_H_ -#define _WX_TIMER_H_ - -#ifdef __GNUG__ -#pragma interface "timer.h" -#endif - -#include "wx/object.h" - -class WXDLLEXPORT wxTimer: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxTimer) - - public: - wxTimer(); - ~wxTimer(); - virtual bool Start(int milliseconds = -1,bool one_shot = FALSE); // Start timer - virtual void Stop(); // Stop timer - virtual void Notify() = 0; // Override this member - inline int Interval() { return m_milli ; }; // Returns the current interval time (0 if stop) - -protected: - bool m_oneShot ; - int m_milli ; - int m_lastMilli ; - long m_id; - -}; - -/* Note: these are implemented in common/timercmn.cpp, so need to implement them separately. - * But you may need to modify timercmn.cpp. - */ - -// Timer functions (milliseconds) -void WXDLLEXPORT wxStartTimer(); -// Gets time since last wxStartTimer or wxGetElapsedTime -long WXDLLEXPORT wxGetElapsedTime(bool resetTimer = TRUE); - -// EXPERIMENTAL: comment this out if it doesn't compile. -bool WXDLLEXPORT wxGetLocalTime(long *timeZone, int *dstObserved); - -// Get number of seconds since 00:00:00 GMT, Jan 1st 1970. -long WXDLLEXPORT wxGetCurrentTime(); - -#endif - // _WX_TIMER_H_ diff --git a/include/wx/stubs/toolbar.h b/include/wx/stubs/toolbar.h deleted file mode 100644 index e42c5827ef..0000000000 --- a/include/wx/stubs/toolbar.h +++ /dev/null @@ -1,77 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: toolbar.h -// Purpose: wxToolBar class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_TOOLBAR_H_ -#define _WX_TOOLBAR_H_ - -#ifdef __GNUG__ -#pragma interface "toolbar.h" -#endif - -#include "wx/tbarbase.h" - -WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr; - -class WXDLLEXPORT wxToolBar: public wxToolBarBase -{ - DECLARE_DYNAMIC_CLASS(wxToolBar) - public: - /* - * Public interface - */ - - wxToolBar(); - - inline wxToolBar(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER|wxTB_HORIZONTAL, - const wxString& name = wxToolBarNameStr) - { - Create(parent, id, pos, size, style, name); - } - ~wxToolBar(); - - bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER|wxTB_HORIZONTAL, - const wxString& name = wxToolBarNameStr); - - // If pushedBitmap is NULL, a reversed version of bitmap is - // created and used as the pushed/toggled image. - // If toggle is TRUE, the button toggles between the two states. - wxToolBarTool *AddTool(int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, - bool toggle = FALSE, long xPos = -1, long yPos = -1, wxObject *clientData = NULL, - const wxString& helpString1 = "", const wxString& helpString2 = ""); - - // Set default bitmap size - void SetToolBitmapSize(const wxSize& size); - void EnableTool(int toolIndex, bool enable); // additional drawing on enabling - void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on - void ClearTools(); - - // The button size is bigger than the bitmap size - wxSize GetToolSize() const; - - wxSize GetMaxSize() const; - - // Add all the buttons - virtual bool CreateTools(); - virtual void Layout() {} - - // The post-tool-addition call. TODO: do here whatever's - // necessary for completing the toolbar construction. - bool Realize() { return CreateTools(); }; - -protected: - -DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_TOOLBAR_H_ diff --git a/include/wx/stubs/treectrl.h b/include/wx/stubs/treectrl.h deleted file mode 100644 index c788fea4fe..0000000000 --- a/include/wx/stubs/treectrl.h +++ /dev/null @@ -1,295 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: treectrl.h -// Purpose: wxTreeCtrl class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_TREECTRL_H_ -#define _WX_TREECTRL_H_ - -#ifdef __GNUG__ -#pragma interface "treectrl.h" -#endif - -#include "wx/control.h" -#include "wx/event.h" -#include "wx/imaglist.h" - -#define wxTREE_MASK_HANDLE 0x0001 -#define wxTREE_MASK_STATE 0x0002 -#define wxTREE_MASK_TEXT 0x0004 -#define wxTREE_MASK_IMAGE 0x0008 -#define wxTREE_MASK_SELECTED_IMAGE 0x0010 -#define wxTREE_MASK_CHILDREN 0x0020 -#define wxTREE_MASK_DATA 0x0040 - -#define wxTREE_STATE_BOLD 0x0001 -#define wxTREE_STATE_DROPHILITED 0x0002 -#define wxTREE_STATE_EXPANDED 0x0004 -#define wxTREE_STATE_EXPANDEDONCE 0x0008 -#define wxTREE_STATE_FOCUSED 0x0010 -#define wxTREE_STATE_SELECTED 0x0020 -#define wxTREE_STATE_CUT 0x0040 - -#define wxTREE_HITTEST_ABOVE 0x0001 // Above the client area. -#define wxTREE_HITTEST_BELOW 0x0002 // Below the client area. -#define wxTREE_HITTEST_NOWHERE 0x0004 // In the client area but below the last item. -#define wxTREE_HITTEST_ONITEMBUTTON 0x0010 // On the button associated with an item. -#define wxTREE_HITTEST_ONITEMICON 0x0020 // On the bitmap associated with an item. -#define wxTREE_HITTEST_ONITEMINDENT 0x0040 // In the indentation associated with an item. -#define wxTREE_HITTEST_ONITEMLABEL 0x0080 // On the label (string) associated with an item. -#define wxTREE_HITTEST_ONITEMRIGHT 0x0100 // In the area to the right of an item. -#define wxTREE_HITTEST_ONITEMSTATEICON 0x0200 // On the state icon for a tree view item that is in a user-defined state. -#define wxTREE_HITTEST_TOLEFT 0x0400 // To the right of the client area. -#define wxTREE_HITTEST_TORIGHT 0x0800 // To the left of the client area. - -#define wxTREE_HITTEST_ONITEM (wxTREE_HITTEST_ONITEMICON | wxTREE_HITTEST_ONITEMLABEL | wxTREE_HITTEST_ONITEMSTATEICON) - -// Flags for GetNextItem -enum { - wxTREE_NEXT_CARET, // Retrieves the currently selected item. - wxTREE_NEXT_CHILD, // Retrieves the first child item. The hItem parameter must be NULL. - wxTREE_NEXT_DROPHILITE, // Retrieves the item that is the target of a drag-and-drop operation. - wxTREE_NEXT_FIRSTVISIBLE, // Retrieves the first visible item. - wxTREE_NEXT_NEXT, // Retrieves the next sibling item. - wxTREE_NEXT_NEXTVISIBLE, // Retrieves the next visible item that follows the specified item. - wxTREE_NEXT_PARENT, // Retrieves the parent of the specified item. - wxTREE_NEXT_PREVIOUS, // Retrieves the previous sibling item. - wxTREE_NEXT_PREVIOUSVISIBLE, // Retrieves the first visible item that precedes the specified item. - wxTREE_NEXT_ROOT // Retrieves the first child item of the root item of which the specified item is a part. -}; - -// Flags for ExpandItem -enum { - wxTREE_EXPAND_EXPAND, - wxTREE_EXPAND_COLLAPSE, - wxTREE_EXPAND_COLLAPSE_RESET, - wxTREE_EXPAND_TOGGLE -}; - -// Flags for InsertItem -enum { - wxTREE_INSERT_LAST = -1, - wxTREE_INSERT_FIRST = -2, - wxTREE_INSERT_SORT = -3 -}; - -class WXDLLEXPORT wxTreeItem: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxTreeItem) -public: - long m_mask; - long m_itemId; - long m_state; - long m_stateMask; - wxString m_text; - int m_image; - int m_selectedImage; - int m_children; - long m_data; - - wxTreeItem(); - -// Accessors - inline long GetMask() const { return m_mask; } - inline long GetItemId() const { return m_itemId; } - inline long GetState() const { return m_state; } - inline long GetStateMask() const { return m_stateMask; } - inline wxString GetText() const { return m_text; } - inline int GetImage() const { return m_image; } - inline int GetSelectedImage() const { return m_selectedImage; } - inline int GetChildren() const { return m_children; } - inline long GetData() const { return m_data; } - - inline void SetMask(long mask) { m_mask = mask; } - inline void SetItemId(long id) { m_itemId = m_itemId = id; } - inline void SetState(long state) { m_state = state; } - inline void SetStateMask(long stateMask) { m_stateMask = stateMask; } - inline void GetText(const wxString& text) { m_text = text; } - inline void SetImage(int image) { m_image = image; } - inline void GetSelectedImage(int selImage) { m_selectedImage = selImage; } - inline void SetChildren(int children) { m_children = children; } - inline void SetData(long data) { m_data = data; } -}; - -class WXDLLEXPORT wxTreeCtrl: public wxControl -{ -public: - /* - * Public interface - */ - - // creation - // -------- - wxTreeCtrl(); - - inline wxTreeCtrl(wxWindow *parent, wxWindowID id = -1, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = "wxTreeCtrl") - { - Create(parent, id, pos, size, style, validator, name); - } - ~wxTreeCtrl(); - - bool Create(wxWindow *parent, wxWindowID id = -1, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = "wxTreeCtrl"); - - // accessors - // --------- - // - int GetCount() const; - - // indent - int GetIndent() const; - void SetIndent(int indent); - // image list - wxImageList *GetImageList(int which = wxIMAGE_LIST_NORMAL) const; - void SetImageList(wxImageList *imageList, int which = wxIMAGE_LIST_NORMAL); - - // navigation inside the tree - long GetNextItem(long item, int code) const; - bool ItemHasChildren(long item) const; - long GetChild(long item) const; - long GetParent(long item) const; - long GetFirstVisibleItem() const; - long GetNextVisibleItem(long item) const; - long GetSelection() const; - long GetRootItem() const; - - // generic function for (g|s)etting item attributes - bool GetItem(wxTreeItem& info) const; - bool SetItem(wxTreeItem& info); - // item state - int GetItemState(long item, long stateMask) const; - bool SetItemState(long item, long state, long stateMask); - // item image - bool SetItemImage(long item, int image, int selImage); - // item text - wxString GetItemText(long item) const; - void SetItemText(long item, const wxString& str); - // custom data associated with the item - long GetItemData(long item) const; - bool SetItemData(long item, long data); - // convenience function - bool IsItemExpanded(long item) - { - return (GetItemState(item, wxTREE_STATE_EXPANDED) & - wxTREE_STATE_EXPANDED) != 0; - } - - // bounding rect - bool GetItemRect(long item, wxRectangle& rect, bool textOnly = FALSE) const; - // - wxTextCtrl* GetEditControl() const; - - // operations - // ---------- - // adding/deleting items - bool DeleteItem(long item); - long InsertItem(long parent, wxTreeItem& info, - long insertAfter = wxTREE_INSERT_LAST); - // If image > -1 and selImage == -1, the same image is used for - // both selected and unselected items. - long InsertItem(long parent, const wxString& label, - int image = -1, int selImage = -1, - long insertAfter = wxTREE_INSERT_LAST); - - // changing item state - bool ExpandItem(long item) { return ExpandItem(item, wxTREE_EXPAND_EXPAND); } - bool CollapseItem(long item) { return ExpandItem(item, wxTREE_EXPAND_COLLAPSE); } - bool ToggleItem(long item) { return ExpandItem(item, wxTREE_EXPAND_TOGGLE); } - // common interface for {Expand|Collapse|Toggle}Item - bool ExpandItem(long item, int action); - - // - bool SelectItem(long item); - bool ScrollTo(long item); - bool DeleteAllItems(); - - // Edit the label (tree must have the focus) - wxTextCtrl* EditLabel(long item, wxClassInfo* textControlClass = CLASSINFO(wxTextCtrl)); - - // End label editing, optionally cancelling the edit - bool EndEditLabel(bool cancel); - - long HitTest(const wxPoint& point, int& flags); - // wxImageList *CreateDragImage(long item); - bool SortChildren(long item); - bool EnsureVisible(long item); - - void Command(wxCommandEvent& event) { ProcessCommand(event); }; - -protected: - wxTextCtrl* m_textCtrl; - wxImageList* m_imageListNormal; - wxImageList* m_imageListState; - - DECLARE_DYNAMIC_CLASS(wxTreeCtrl) -}; - -/* - wxEVT_COMMAND_TREE_BEGIN_DRAG, - wxEVT_COMMAND_TREE_BEGIN_RDRAG, - wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, - wxEVT_COMMAND_TREE_END_LABEL_EDIT, - wxEVT_COMMAND_TREE_DELETE_ITEM, - wxEVT_COMMAND_TREE_GET_INFO, - wxEVT_COMMAND_TREE_SET_INFO, - wxEVT_COMMAND_TREE_ITEM_EXPANDED, - wxEVT_COMMAND_TREE_ITEM_EXPANDING, - wxEVT_COMMAND_TREE_ITEM_COLLAPSED, - wxEVT_COMMAND_TREE_ITEM_COLLAPSING, - wxEVT_COMMAND_TREE_SEL_CHANGED, - wxEVT_COMMAND_TREE_SEL_CHANGING, - wxEVT_COMMAND_TREE_KEY_DOWN -*/ - -class WXDLLEXPORT wxTreeEvent: public wxCommandEvent -{ - DECLARE_DYNAMIC_CLASS(wxTreeEvent) - - public: - wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0); - - int m_code; - wxTreeItem m_item; - long m_oldItem; - wxPoint m_pointDrag; - - inline long GetOldItem() const { return m_oldItem; } - inline wxTreeItem& GetItem() const { return (wxTreeItem&) m_item; } - inline wxPoint GetPoint() const { return m_pointDrag; } - inline int GetCode() const { return m_code; } -}; - -typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); - -#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, - -#endif - // _WX_TREECTRL_H_ diff --git a/include/wx/stubs/wave.h b/include/wx/stubs/wave.h deleted file mode 100644 index e55bd5aa5f..0000000000 --- a/include/wx/stubs/wave.h +++ /dev/null @@ -1,44 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: wave.h -// Purpose: wxWave class (loads and plays short Windows .wav files). -// Optional on non-Windows platforms. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_WAVE_H_ -#define _WX_WAVE_H_ - -#ifdef __GNUG__ -#pragma interface "wave.h" -#endif - -#include "wx/object.h" - -class wxWave : public wxObject -{ -public: - wxWave(); - wxWave(const wxString& fileName, bool isResource = FALSE); - ~wxWave(); - -public: - bool Create(const wxString& fileName, bool isResource = FALSE); - bool IsOk() const { return (m_waveData ? TRUE : FALSE); }; - bool Play(bool async = TRUE, bool looped = FALSE) const; - -protected: - bool Free(); - -private: - char* m_waveData; - int m_waveLength; - bool m_isResource; -}; - -#endif - // _WX_WAVE_H_ diff --git a/include/wx/stubs/window.h b/include/wx/stubs/window.h deleted file mode 100644 index 541dd58040..0000000000 --- a/include/wx/stubs/window.h +++ /dev/null @@ -1,543 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: window.h -// Purpose: wxWindow class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_WINDOW_H_ -#define _WX_WINDOW_H_ - -#ifdef __GNUG__ -#pragma interface "window.h" -#endif - -#include "wx/gdicmn.h" -#include "wx/icon.h" -#include "wx/cursor.h" -#include "wx/pen.h" -#include "wx/font.h" -#include "wx/validate.h" -#include "wx/event.h" -#include "wx/string.h" -#include "wx/list.h" -#include "wx/region.h" - -#define wxKEY_SHIFT 1 -#define wxKEY_CTRL 2 - -/* - * Base class for frame, panel, canvas, panel items, dialog box. - * - */ - -/* - * Event handler: windows have themselves as their event handlers - * by default, but their event handlers could be set to another - * object entirely. This separation can reduce the amount of - * derivation required, and allow alteration of a window's functionality - * (e.g. by a resource editor that temporarily switches event handlers). - */ - -class WXDLLEXPORT wxWindow; -class WXDLLEXPORT wxEvent; -class WXDLLEXPORT wxCommandEvent; -class WXDLLEXPORT wxKeyEvent; -class WXDLLEXPORT wxControl; -class WXDLLEXPORT wxCursor; -class WXDLLEXPORT wxColourMap; -class WXDLLEXPORT wxFont; -class WXDLLEXPORT wxMenu; -class WXDLLEXPORT wxRectangle; -class WXDLLEXPORT wxBitmap; -class WXDLLEXPORT wxSizer; -class WXDLLEXPORT wxList; -class WXDLLEXPORT wxLayoutConstraints; -class WXDLLEXPORT wxMouseEvent; -class WXDLLEXPORT wxButton; -class WXDLLEXPORT wxColour; -class WXDLLEXPORT wxBrush; -class WXDLLEXPORT wxPen; -class WXDLLEXPORT wxIcon; -class WXDLLEXPORT wxDC; -class WXDLLEXPORT wxValidator; - -#if USE_DRAG_AND_DROP -class WXDLLEXPORT wxDropTarget; -#endif - -#if USE_WX_RESOURCES -class WXDLLEXPORT wxResourceTable; -class WXDLLEXPORT wxItemResource; -#endif - -WXDLLEXPORT_DATA(extern const char*) wxPanelNameStr; - -WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize; -WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition; - -class WXDLLEXPORT wxWindow: public wxEvtHandler -{ - DECLARE_ABSTRACT_CLASS(wxWindow) - - friend class wxDC; - friend class wxPaintDC; - -public: - wxWindow(); - inline wxWindow(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxPanelNameStr) - { - m_children = new wxList; - Create(parent, id, pos, size, style, name); - } - - virtual ~wxWindow(); - - bool Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxPanelNameStr); - - // Fit the window around the items - virtual void Fit(); - - // Show or hide the window - virtual bool Show(bool show); - - // Is the window shown? - virtual bool IsShown() const; - - // Raise the window to the top of the Z order - virtual void Raise(); - - // Lower the window to the bottom of the Z order - virtual void Lower(); - - // Is the window enabled? - virtual bool IsEnabled() const; - - // For compatibility - inline bool Enabled() const { return IsEnabled(); } - - // Dialog support: override these and call - // base class members to add functionality - // that can't be done using validators. - - // Transfer values to controls. If returns FALSE, - // it's an application error (pops up a dialog) - virtual bool TransferDataToWindow(); - - // Transfer values from controls. If returns FALSE, - // transfer failed: don't quit - virtual bool TransferDataFromWindow(); - - // Validate controls. If returns FALSE, - // validation failed: don't quit - virtual bool Validate(); - - // Return code for dialogs - inline void SetReturnCode(int retCode); - inline int GetReturnCode(); - - // Set the cursor - virtual void SetCursor(const wxCursor& cursor); - inline virtual wxCursor *GetCursor() const { return (wxCursor *)& m_windowCursor; }; - - // Get the window with the focus - static wxWindow *FindFocus(); - - // Get character size - virtual int GetCharHeight() const; - virtual int GetCharWidth() const; - - // Get overall window size - virtual void GetSize(int *width, int *height) const; - - // Get window position, relative to parent (or screen if no parent) - virtual void GetPosition(int *x, int *y) const; - - // Get client (application-useable) size - virtual void GetClientSize(int *width, int *height) const; - - // Set overall size and position - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - inline virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); } - inline virtual void Move(int x, int y) { SetSize(x, y, -1, -1, wxSIZE_USE_EXISTING); } - - // Set client size - virtual void SetClientSize(int width, int size); - - // Convert client to screen coordinates - virtual void ClientToScreen(int *x, int *y) const; - - // Convert screen to client coordinates - virtual void ScreenToClient(int *x, int *y) const; - - // Set the focus to this window - virtual void SetFocus(); - - // Capture/release mouse - virtual void CaptureMouse(); - virtual void ReleaseMouse(); - - // Enable or disable the window - virtual void Enable(bool enable); - -#if USE_DRAG_AND_DROP - // Associate a drop target with this window (if the window already had a drop - // target, it's deleted!) and return the current drop target (may be NULL). - void SetDropTarget(wxDropTarget *pDropTarget); - wxDropTarget *GetDropTarget() const { return m_pDropTarget; } -#endif - - // Accept files for dragging - virtual void DragAcceptFiles(bool accept); - - // Update region access - virtual wxRegion GetUpdateRegion() const; - virtual bool IsExposed(int x, int y, int w, int h) const; - virtual bool IsExposed(const wxPoint& pt) const; - virtual bool IsExposed(const wxRect& rect) const; - - // Set/get the window title - virtual inline void SetTitle(const wxString& WXUNUSED(title)) {}; - inline virtual wxString GetTitle() const { return wxString(""); }; - // Most windows have the concept of a label; for frames, this is the - // title; for items, this is the label or button text. - inline virtual wxString GetLabel() const { return GetTitle(); } - - // Set/get the window name (used for resource setting in X) - inline virtual wxString GetName() const; - inline virtual void SetName(const wxString& name); - - // Centre the window - virtual void Centre(int direction) ; - inline void Center(int direction = wxHORIZONTAL) { Centre(direction); } - - // Popup a menu - virtual bool PopupMenu(wxMenu *menu, int x, int y); - - // Send the window a refresh event - virtual void Refresh(bool eraseBack = TRUE, const wxRectangle *rect = NULL); - - // New functions that will replace the above. - virtual void SetScrollbar(int orient, int pos, int thumbVisible, - int range, bool refresh = TRUE); - - virtual void SetScrollPos(int orient, int pos, bool refresh = TRUE); - virtual int GetScrollPos(int orient) const; - virtual int GetScrollRange(int orient) const; - virtual int GetScrollThumb(int orient) const; - - virtual void ScrollWindow(int dx, int dy, const wxRectangle *rect = NULL); - - // Caret manipulation - virtual void CreateCaret(int w, int h); - virtual void CreateCaret(const wxBitmap *bitmap); - virtual void DestroyCaret(); - virtual void ShowCaret(bool show); - virtual void SetCaretPos(int x, int y); - virtual void GetCaretPos(int *x, int *y) const; - - // Tell window how much it can be sized - virtual void SetSizeHints(int minW = -1, int minH = -1, int maxW = -1, int maxH = -1, int incW = -1, int incH = -1); - - // Set/get the window's identifier - inline int GetId() const; - inline void SetId(int id); - - // Make the window modal (all other windows unresponsive) - virtual void MakeModal(bool modal); - - // Get the private handle (platform-dependent) - inline void *GetHandle() const; - - // Set/get the window's relatives - inline wxWindow *GetParent() const; - inline void SetParent(wxWindow *p) ; - inline wxWindow *GetGrandParent() const; - inline wxList *GetChildren() const; - - // Set/get the window's font - virtual void SetFont(const wxFont& f); - inline virtual wxFont *GetFont() const; - - // Set/get the window's validator - void SetValidator(const wxValidator& validator); - inline wxValidator *GetValidator() const; - - // Set/get the window's style - inline void SetWindowStyleFlag(long flag); - inline long GetWindowStyleFlag() const; - - // Set/get event handler - inline void SetEventHandler(wxEvtHandler *handler); - inline wxEvtHandler *GetEventHandler() const; - - // Push/pop event handler (i.e. allow a chain of event handlers - // be searched) - void PushEventHandler(wxEvtHandler *handler) ; - wxEvtHandler *PopEventHandler(bool deleteHandler = FALSE) ; - - // Close the window by calling OnClose, posting a deletion - virtual bool Close(bool force = FALSE); - - // Destroy the window (delayed, if a managed window) - virtual bool Destroy() ; - - // Mode for telling default OnSize members to - // call Layout(), if not using Sizers, just top-down constraints - inline void SetAutoLayout(bool a); - inline bool GetAutoLayout() const; - - // Set/get constraints - inline wxLayoutConstraints *GetConstraints() const; - void SetConstraints(wxLayoutConstraints *c); - - // Set/get window background colour - inline virtual void SetBackgroundColour(const wxColour& col); - inline virtual wxColour GetBackgroundColour() const; - - // Set/get window foreground colour - inline virtual void SetForegroundColour(const wxColour& col); - inline virtual wxColour GetForegroundColour() const; - - // Set/get window default background colour (for children to inherit). - // NOTE: these may be removed in later revisions. - inline virtual void SetDefaultBackgroundColour(const wxColour& col); - inline virtual wxColour GetDefaultBackgroundColour(void) const; - - // Set/get window default foreground colour (for children to inherit) - inline virtual void SetDefaultForegroundColour(const wxColour& col); - inline virtual wxColour GetDefaultForegroundColour(void) const; - - // Get the default button, if there is one - inline virtual wxButton *GetDefaultItem() const; - inline virtual void SetDefaultItem(wxButton *but); - - // Override to define new behaviour for default action (e.g. double clicking - // on a listbox) - virtual void OnDefaultAction(wxControl *initiatingItem); - - // Resource loading -#if USE_WX_RESOURCES - virtual bool LoadFromResource(wxWindow *parent, const wxString& resourceName, const wxResourceTable *table = NULL); - virtual wxControl *CreateItem(const wxItemResource *childResource, const wxResourceTable *table = NULL); -#endif - - // Native resource loading - virtual bool LoadNativeDialog(wxWindow* parent, wxWindowID& id); - virtual bool LoadNativeDialog(wxWindow* parent, const wxString& name); - virtual wxWindow* GetWindowChild1(wxWindowID& id); - virtual wxWindow* GetWindowChild(wxWindowID& id); - - virtual void GetTextExtent(const wxString& string, int *x, int *y, - int *descent = NULL, - int *externalLeading = NULL, - const wxFont *theFont = NULL, bool use16 = FALSE) const; - - // Is the window retained? - inline bool IsRetained() const; - - // Warp the pointer the given position - virtual void WarpPointer(int x_pos, int y_pos) ; - - // Clear the window - virtual void Clear(); - - // Find a window by id or name - virtual wxWindow *FindWindow(long id); - virtual wxWindow *FindWindow(const wxString& name); - - // Constraint operations - bool Layout(); - void SetSizer(wxSizer *sizer); // Adds sizer child to this window - inline wxSizer *GetSizer() const ; - inline wxWindow *GetSizerParent() const ; - inline void SetSizerParent(wxWindow *win); - - // Do Update UI processing for controls - void UpdateWindowUI(); - - void OnEraseBackground(wxEraseEvent& event); - void OnChar(wxKeyEvent& event); - void OnPaint(wxPaintEvent& event); - void OnIdle(wxIdleEvent& event); - - // Does this window want to accept keyboard focus? - virtual bool AcceptsFocus() const; - -public: - //////////////////////////////////////////////////////////////////////// - //// IMPLEMENTATION - - // For implementation purposes - sometimes decorations make the client area - // smaller - virtual wxPoint GetClientAreaOrigin() const; - - // Makes an adjustment to the window position (for example, a frame that has - // a toolbar that it manages itself). - virtual void AdjustForParentClientOrigin(int& x, int& y, int sizeFlags); - - // Executes the default message - virtual long Default(); - -/* TODO: you may need something like this - // Determine whether 3D effects are wanted - virtual WXDWORD Determine3DEffects(WXDWORD defaultBorderStyle, bool *want3D); -*/ - - virtual void AddChild(wxWindow *child); // Adds reference to the child object - virtual void RemoveChild(wxWindow *child); // Removes reference to child - // (but doesn't delete the child object) - virtual void DestroyChildren(); // Removes and destroys all children - - inline bool IsBeingDeleted() const { return FALSE; } // TODO: Should probably eliminate this - - // Constraint implementation - void UnsetConstraints(wxLayoutConstraints *c); - inline wxList *GetConstraintsInvolvedIn() const ; - // Back-pointer to other windows we're involved with, so if we delete - // this window, we must delete any constraints we're involved with. - void AddConstraintReference(wxWindow *otherWin); - void RemoveConstraintReference(wxWindow *otherWin); - void DeleteRelatedConstraints(); - - virtual void ResetConstraints(); - virtual void SetConstraintSizes(bool recurse = TRUE); - virtual bool LayoutPhase1(int *noChanges); - virtual bool LayoutPhase2(int *noChanges); - virtual bool DoPhase(int); - // Transforms from sizer coordinate space to actual - // parent coordinate space - virtual void TransformSizerToActual(int *x, int *y) const ; - - // Set size with transformation to actual coordinates if nec. - virtual void SizerSetSize(int x, int y, int w, int h); - virtual void SizerMove(int x, int y); - - // Only set/get the size/position of the constraint (if any) - virtual void SetSizeConstraint(int x, int y, int w, int h); - virtual void MoveConstraint(int x, int y); - virtual void GetSizeConstraint(int *w, int *h) const ; - virtual void GetClientSizeConstraint(int *w, int *h) const ; - virtual void GetPositionConstraint(int *x, int *y) const ; - - wxObject *GetChild(int number) const ; - - // Generates a new id for controls - static int NewControlId(); - - // Responds to colour changes: passes event on to children. - void OnSysColourChanged(wxSysColourChangedEvent& event); - - // Transfers data to any child controls - void OnInitDialog(wxInitDialogEvent& event); - - // Sends an OnInitDialog event, which in turns transfers data to - // to the window via validators. - virtual void InitDialog(); - - //////////////////////////////////////////////////////////////////////// - //// PROTECTED DATA -protected: - int m_windowId; - long m_windowStyle; // Store the window's style - wxEvtHandler * m_windowEventHandler; // Usually is 'this' - wxLayoutConstraints * m_constraints; // Constraints for this window - wxList * m_constraintsInvolvedIn; // List of constraints we're involved in - wxSizer * m_windowSizer; // Window's top-level sizer (if any) - wxWindow * m_sizerParent; // Window's parent sizer (if any) - bool m_autoLayout; // Whether to call Layout() in OnSize - wxWindow * m_windowParent; // Each window always knows its parent - wxValidator * m_windowValidator; - int m_minSizeX; - int m_minSizeY; - int m_maxSizeX; - int m_maxSizeY; - - // Caret data - int m_caretWidth; - int m_caretHeight; - bool m_caretEnabled; - bool m_caretShown; - wxFont m_windowFont; // Window's font - wxCursor m_windowCursor; // Window's cursor - wxString m_windowName; // Window name - - wxButton * m_defaultItem; - - wxColour m_backgroundColour ; - wxColour m_foregroundColour ; - wxColour m_defaultBackgroundColour; - wxColour m_defaultForegroundColour; - -#if USE_DRAG_AND_DROP - wxDropTarget *m_pDropTarget; // the current drop target or NULL -#endif //USE_DRAG_AND_DROP - -public: - wxRegion m_updateRegion; - wxList * m_children; // Window's children - int m_returnCode; - -DECLARE_EVENT_TABLE() -}; - -//////////////////////////////////////////////////////////////////////// -//// INLINES - -inline void *wxWindow::GetHandle() const { return (void *)NULL; } -inline int wxWindow::GetId() const { return m_windowId; } -inline void wxWindow::SetId(int id) { m_windowId = id; } -inline wxWindow *wxWindow::GetParent() const { return m_windowParent; } -inline void wxWindow::SetParent(wxWindow *p) { m_windowParent = p; } -inline wxWindow *wxWindow::GetGrandParent() const { return (m_windowParent ? m_windowParent->m_windowParent : NULL); } -inline wxList *wxWindow::GetChildren() const { return m_children; } -inline wxFont *wxWindow::GetFont() const { return (wxFont *) & m_windowFont; } -inline wxString wxWindow::GetName() const { return m_windowName; } -inline void wxWindow::SetName(const wxString& name) { m_windowName = name; } -inline long wxWindow::GetWindowStyleFlag() const { return m_windowStyle; } -inline void wxWindow::SetWindowStyleFlag(long flag) { m_windowStyle = flag; } -inline void wxWindow::SetEventHandler(wxEvtHandler *handler) { m_windowEventHandler = handler; } -inline wxEvtHandler *wxWindow::GetEventHandler() const { return m_windowEventHandler; } -inline void wxWindow::SetAutoLayout(bool a) { m_autoLayout = a; } -inline bool wxWindow::GetAutoLayout() const { return m_autoLayout; } -inline wxLayoutConstraints *wxWindow::GetConstraints() const { return m_constraints; } -inline void wxWindow::SetBackgroundColour(const wxColour& col) { m_backgroundColour = col; }; -inline wxColour wxWindow::GetBackgroundColour() const { return m_backgroundColour; }; -inline void wxWindow::SetForegroundColour(const wxColour& col) { m_foregroundColour = col; }; -inline wxColour wxWindow::GetForegroundColour() const { return m_foregroundColour; }; -inline void wxWindow::SetDefaultForegroundColour(const wxColour& col) { m_defaultForegroundColour = col; }; -inline wxColour wxWindow::GetDefaultForegroundColour(void) const { return m_defaultForegroundColour; }; -inline void wxWindow::SetDefaultBackgroundColour(const wxColour& col) { m_defaultBackgroundColour = col; }; -inline wxColour wxWindow::GetDefaultBackgroundColour(void) const { return m_defaultBackgroundColour; }; - -inline wxButton *wxWindow::GetDefaultItem() const { return m_defaultItem; } -inline void wxWindow::SetDefaultItem(wxButton *but) { m_defaultItem = but; } -inline bool wxWindow::IsRetained() const { return ((m_windowStyle & wxRETAINED) == wxRETAINED); } - -inline wxList *wxWindow::GetConstraintsInvolvedIn() const { return m_constraintsInvolvedIn; } -inline wxSizer *wxWindow::GetSizer() const { return m_windowSizer; } -inline wxWindow *wxWindow::GetSizerParent() const { return m_sizerParent; } -inline void wxWindow::SetSizerParent(wxWindow *win) { m_sizerParent = win; } -inline wxValidator *wxWindow::GetValidator() const { return m_windowValidator; } -inline void wxWindow::SetReturnCode(int retCode) { m_returnCode = retCode; } -inline int wxWindow::GetReturnCode() { return m_returnCode; } - -// Get the active window. -wxWindow* WXDLLEXPORT wxGetActiveWindow(); - -WXDLLEXPORT_DATA(extern wxList) wxTopLevelWindows; - -#endif - // _WX_WINDOW_H_ diff --git a/include/wx/tab.h b/include/wx/tab.h deleted file mode 100644 index 808f9c7146..0000000000 --- a/include/wx/tab.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _WX_TAB_H_BASE_ -#define _WX_TAB_H_BASE_ - -#include "wx/generic/tabg.h" - -#endif - // _WX_TAB_H_BASE_ diff --git a/include/wx/tabctrl.h b/include/wx/tabctrl.h deleted file mode 100644 index c766f72bf3..0000000000 --- a/include/wx/tabctrl.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _WX_TABCTRL_H_BASE_ -#define _WX_TABCTRL_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/tabctrl.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/tabctrl.h" -#elif defined(__WXGTK__) -#elif defined(__WXMAC__) -#include "wx/mac/tabctrl.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/tabctrl.h" -#endif - -#endif - // _WX_TABCTRL_H_BASE_ diff --git a/include/wx/taskbar.h b/include/wx/taskbar.h deleted file mode 100644 index 5b70d8573d..0000000000 --- a/include/wx/taskbar.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _WX_TASKBAR_H_BASE_ -#define _WX_TASKBAR_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/taskbar.h" -#elif defined(__WXMOTIF__) -#elif defined(__WXGTK__) -#elif defined(__WXQT__) -#elif defined(__WXMAC__) -#elif defined(__WXSTUBS__) -#include "wx/stubs/taskbar.h" -#endif - -#endif - // _WX_TASKBAR_H_BASE_ diff --git a/include/wx/tbar95.h b/include/wx/tbar95.h deleted file mode 100644 index 5e1a009544..0000000000 --- a/include/wx/tbar95.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _WX_TBAR95_H_BASE_ -#define _WX_TBAR95_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/tbar95.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/tbar95.h" -#elif defined(__WXGTK__) -#include "wx/gtk/tbar95.h" -#endif - -#endif - // _WX_TBAR95_H_BASE_ diff --git a/include/wx/tbarbase.h b/include/wx/tbarbase.h deleted file mode 100644 index 260b2526a0..0000000000 --- a/include/wx/tbarbase.h +++ /dev/null @@ -1,243 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tbarbase.h -// Purpose: Base class for toolbar classes -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_TBARBASE_H_ -#define _WX_TBARBASE_H_ - -#ifdef __GNUG__ -#pragma interface "tbarbase.h" -#endif - -#include "wx/setup.h" -#include "wx/defs.h" - -#include "wx/bitmap.h" -#include "wx/list.h" -#include "wx/control.h" - -WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr; -WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize; -WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition; - -#define wxTOOL_STYLE_BUTTON 1 -#define wxTOOL_STYLE_SEPARATOR 2 - -class WXDLLEXPORT wxToolBarTool: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxToolBarTool) - public: - wxToolBarTool(int theIndex = 0, const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap, - bool toggle = FALSE, long xPos = -1, long yPos = -1, - const wxString& shortHelpString = "", const wxString& longHelpString = ""); - ~wxToolBarTool (); - inline void SetSize( long w, long h ) { m_width = w; m_height = h; } - inline long GetWidth () const { return m_width; } - inline long GetHeight () const { return m_height; } - -public: - int m_toolStyle; - wxObject * m_clientData; - int m_index; - long m_x; - long m_y; - long m_width; - long m_height; - bool m_toggleState; - bool m_isToggle; - bool m_deleteSecondBitmap; - bool m_enabled; - wxBitmap m_bitmap1; - wxBitmap m_bitmap2; - bool m_isMenuCommand; - wxString m_shortHelpString; - wxString m_longHelpString; -}; - -class WXDLLEXPORT wxToolBarBase : public wxControl -{ - DECLARE_ABSTRACT_CLASS(wxToolBarBase) - public: - - wxToolBarBase(void); - ~wxToolBarBase(void); - - // Handle wxToolBar events - - // Only allow toggle if returns TRUE. Call when left button up. - virtual bool OnLeftClick(int toolIndex, bool toggleDown); - - // Call when right button down. - virtual void OnRightClick(int toolIndex, long x, long y); - - // Called when the mouse cursor enters a tool bitmap. - // Argument is -1 if mouse is exiting the toolbar. - virtual void OnMouseEnter(int toolIndex); - - // If pushedBitmap is NULL, a reversed version of bitmap is - // created and used as the pushed/toggled image. - // If toggle is TRUE, the button toggles between the two states. - virtual wxToolBarTool *AddTool(int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, - bool toggle = FALSE, long xPos = -1, long yPos = -1, wxObject *clientData = NULL, - const wxString& helpString1 = "", const wxString& helpString2 = ""); - virtual void AddSeparator(void); - virtual void ClearTools(void); - - virtual void EnableTool(int toolIndex, bool enable); - virtual void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on - virtual void SetToggle(int toolIndex, bool toggle); // Set this to be togglable (or not) - virtual wxObject *GetToolClientData(int index) const; - inline wxList& GetTools(void) const { return (wxList&) m_tools; } - - // After the toolbar has initialized, this is the size the tools take up -#if WXWXIN_COMPATIBILITY - inline void GetMaxSize ( long * width, long * height ) const - { wxSize maxSize(GetMaxSize()); *width = maxSize.x; *height = maxSize.y; } -#endif - virtual wxSize GetMaxSize ( void ) const; - - virtual bool GetToolState(int toolIndex) const; - virtual bool GetToolEnabled(int toolIndex) const; - virtual wxToolBarTool *FindToolForPosition(long x, long y) const; - - virtual void SetToolShortHelp(int toolIndex, const wxString& helpString); - virtual wxString GetToolShortHelp(int toolIndex) const; - virtual void SetToolLongHelp(int toolIndex, const wxString& helpString); - virtual wxString GetToolLongHelp(int toolIndex) const; - - virtual void SetMargins(int x, int y); - inline void SetMargins(const wxSize& size) { SetMargins((int) size.x, (int) size.y); } - virtual void SetToolPacking(int packing); - virtual void SetToolSeparation(int separation); - - inline virtual wxSize GetToolMargins(void) { return wxSize(m_xMargin, m_yMargin); } - inline virtual int GetToolPacking(void) { return m_toolPacking; } - inline virtual int GetToolSeparation(void) { return m_toolSeparation; } - - virtual void SetToolBitmapSize(const wxSize& size) { m_defaultWidth = size.x; m_defaultHeight = size.y; }; - virtual wxSize GetToolBitmapSize(void) const { return wxSize(m_defaultWidth, m_defaultHeight); } - - // The button size (in some implementations) is bigger than the bitmap size: this returns - // the total button size. - virtual wxSize GetToolSize(void) const { return wxSize(m_defaultWidth, m_defaultHeight); } ; - - // Compatibility -#if WXWIN_COMPATIBILITY - inline void SetDefaultSize(int w, int h) { SetDefaultSize(wxSize(w, h)); } - inline long GetDefaultWidth(void) const { return m_defaultWidth; } - inline long GetDefaultHeight(void) const { return m_defaultHeight; } - inline int GetDefaultButtonWidth(void) const { return (int) GetDefaultButtonSize().x; }; - inline int GetDefaultButtonHeight(void) const { return (int) GetDefaultButtonSize().y; }; - virtual void SetDefaultSize(const wxSize& size) { SetToolBitmapSize(size); } - virtual wxSize GetDefaultSize(void) const { return GetToolBitmapSize(); } - virtual wxSize GetDefaultButtonSize(void) const { return GetToolSize(); } -#endif - - // Lay the tools out - virtual void Layout(void); - - // Add all the buttons: required for Win95. - virtual bool CreateTools(void) { return TRUE; } - - // Calls the appropriate function after tools have been created. - // E.g. Layout, or CreateTools. - virtual bool Realize() = 0; - - void Command(wxCommandEvent& event); - - // SCROLLING: this has to be copied from wxScrolledWindow since wxToolBarBase - // inherits from wxControl. This could have been put into wxToolBarSimple, - // but we might want any derived toolbar class to be scrollable. - - // Number of pixels per user unit (0 or -1 for no scrollbar) - // Length of virtual canvas in user units - virtual void SetScrollbars(int horizontal, int vertical, - int x_length, int y_length, - int x_pos = 0, int y_pos = 0); - - // Physically scroll the window - virtual void Scroll(int x_pos, int y_pos); - virtual void GetScrollPixelsPerUnit(int *x_unit, int *y_unit) const; - virtual void EnableScrolling(bool x_scrolling, bool y_scrolling); - virtual void AdjustScrollbars(void); - - // Prepare the DC by translating it according to the current scroll position - virtual void PrepareDC(wxDC& dc); - - int GetScrollPageSize(int orient) const ; - void SetScrollPageSize(int orient, int pageSize); - - // Get the view start - virtual void ViewStart(int *x, int *y) const; - - // Actual size in pixels when scrolling is taken into account - virtual void GetVirtualSize(int *x, int *y) const; - - // Do the toolbar button updates (check for EVT_UPDATE_UI handlers) - virtual void DoToolbarUpdates(void); - - inline void SetMaxRowsCols(int rows, int cols) { m_maxRows = rows; m_maxCols = cols; } - inline int GetMaxRows() const { return m_maxRows; } - inline int GetMaxCols() const { return m_maxCols; } - - void OnScroll(wxScrollEvent& event); - void OnSize(wxSizeEvent& event); - void OnIdle(wxIdleEvent& event); - - // Required to force normal cursor-setting behaviour in Windows -#ifdef __WXMSW__ - virtual void MSWOnMouseMove(int x, int y, WXUINT flags); -#endif - - protected: - wxList m_tools; -// int m_tilingDirection; -// int m_rowsOrColumns; - int m_maxRows; - int m_maxCols; - long m_maxWidth, m_maxHeight; - int m_currentTool; // Tool where mouse currently is - int m_pressedTool; // Tool where mouse pressed - int m_xMargin; - int m_yMargin; - int m_toolPacking; - int m_toolSeparation; - long m_defaultWidth; - long m_defaultHeight; - -public: - //////////////////////////////////////////////////////////////////////// - //// IMPLEMENTATION - - // Calculate scroll increment - virtual int CalcScrollInc(wxScrollEvent& event); - - //////////////////////////////////////////////////////////////////////// - //// PROTECTED DATA -protected: - int m_xScrollPixelsPerLine; - int m_yScrollPixelsPerLine; - bool m_xScrollingEnabled; - bool m_yScrollingEnabled; - int m_xScrollPosition; - int m_yScrollPosition; - bool m_calcScrolledOffset; // If TRUE, wxCanvasDC uses scrolled offsets - int m_xScrollLines; - int m_yScrollLines; - int m_xScrollLinesPerPage; - int m_yScrollLinesPerPage; - -public: - DECLARE_EVENT_TABLE() -}; - -#endif - // _WX_TBARBASE_H_ - diff --git a/include/wx/tbarmsw.h b/include/wx/tbarmsw.h deleted file mode 100644 index 4b9d761fcf..0000000000 --- a/include/wx/tbarmsw.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _WX_TBARMSW_H_BASE_ -#define _WX_TBARMSW_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/tbarmsw.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/tbarmsw.h" -#elif defined(__WXGTK__) -#include "wx/gtk/tbarmsw.h" -#endif - -#endif - // _WX_TBARMSW_H_BASE_ diff --git a/include/wx/tbarsmpl.h b/include/wx/tbarsmpl.h deleted file mode 100644 index add138a78d..0000000000 --- a/include/wx/tbarsmpl.h +++ /dev/null @@ -1,79 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tbarsmpl.h -// Purpose: wxToolBarSimple class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_TBARSMPLH__ -#define _WX_TBARSMPLH__ - -#ifdef __GNUG__ -#pragma interface "tbarsmpl.h" -#endif - -#include "wx/defs.h" - -#if USE_TOOLBAR - -#include "wx/bitmap.h" -#include "wx/list.h" -#include "wx/tbarbase.h" - -WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr; -WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize; -WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition; - -// XView can't cope properly with panels that behave like canvases -// (e.g. no scrollbars in panels) -class WXDLLEXPORT wxToolBarSimple : public wxToolBarBase -{ - DECLARE_DYNAMIC_CLASS(wxToolBarSimple) - - public: - - wxToolBarSimple(void); - inline wxToolBarSimple(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER|wxTB_HORIZONTAL, - const wxString& name = wxToolBarNameStr) - { - Create(parent, id, pos, size, style, name); - } - ~wxToolBarSimple(void); - - bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER|wxTB_HORIZONTAL, const wxString& name = wxToolBarNameStr); - - void OnPaint(wxPaintEvent& event); - void OnSize(wxSizeEvent& event); - void OnMouseEvent(wxMouseEvent& event); - void OnKillFocus(wxFocusEvent& event); - - // Handle wxToolBar events - - virtual void DrawTool(wxDC& dc, wxMemoryDC& memDC, wxToolBarTool *tool); - virtual void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on - - virtual void SpringUpButton(int index); - - void Layout(void); - - // The post-tool-addition call - bool Realize() { Layout(); return TRUE; }; - -protected: - int m_currentRowsOrColumns; - long m_lastX, m_lastY; - -DECLARE_EVENT_TABLE() - -}; - -#endif // USE_TOOLBAR -#endif - // _WX_TBARSMPLH__ - diff --git a/include/wx/textctrl.h b/include/wx/textctrl.h deleted file mode 100644 index 4123afeb1f..0000000000 --- a/include/wx/textctrl.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_TEXTCTRL_H_BASE_ -#define _WX_TEXTCTRL_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/textctrl.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/textctrl.h" -#elif defined(__WXGTK__) -#include "wx/gtk/textctrl.h" -#elif defined(__WXQT__) -#include "wx/qt/textctrl.h" -#elif defined(__WXMAC__) -#include "wx/mac/textctrl.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/textctrl.h" -#endif - -#endif - // _WX_TEXTCTRL_H_BASE_ diff --git a/include/wx/textdlg.h b/include/wx/textdlg.h deleted file mode 100644 index 491bd8b4fa..0000000000 --- a/include/wx/textdlg.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _WX_TEXTDLG_H_BASE_ -#define _WX_TEXTDLG_H_BASE_ - -#include "wx/generic/textdlgg.h" - -#endif - // _WX_TEXTDLG_H_BASE_ diff --git a/include/wx/textfile.h b/include/wx/textfile.h deleted file mode 100644 index e1b7849565..0000000000 --- a/include/wx/textfile.h +++ /dev/null @@ -1,123 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: textfile.h -// Purpose: class wxTextFile to work with text files of _small_ size -// (file is fully loaded in memory) and which understands CR/LF -// differences between platforms. -// Author: Vadim Zeitlin -// Modified by: -// Created: 03.04.98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _TEXTFILE_H -#define _TEXTFILE_H - -#ifdef __GNUG__ -#pragma interface "textfile.h" -#endif - -#include "wx/defs.h" -#include "wx/string.h" -#include "wx/file.h" -#include "wx/dynarray.h" - -// ---------------------------------------------------------------------------- -// wxTextFile -// ---------------------------------------------------------------------------- -class wxTextFile -{ -public: - // constants - enum Type - { - Type_None, // incomplete (the last line of the file only) - Type_Unix, // line is terminated with 'CR' = 0xA = 10 = '\n' - Type_Dos, // 'LF' 'CR' - Type_Mac // 'LF' = 0xD = 12 = '\r' - }; - - // default type for current platform (determined at compile time) - static const Type typeDefault; - - // ctors - // def ctor, use Open(string) - wxTextFile() { } - // - wxTextFile(const wxString& strFile); - - // file operations - // file exists? - bool Exists() const; - // Open() also loads file in memory on success - bool Open(); - // same as Open() but with (another) file name - bool Open(const wxString& strFile); - // closes the file and frees memory, losing all changes - bool Close(); - // is file currently opened? - bool IsOpened() const { return m_file.IsOpened(); } - - // accessors - // get the number of lines in the file - size_t GetLineCount() const { return m_aLines.Count(); } - // the returned line may be modified (but don't add CR/LF at the end!) - wxString& GetLine(size_t n) const { return m_aLines[n]; } - wxString& operator[](size_t n) const { return m_aLines[n]; } - // get the type of the line (see also GetEOL) - Type GetLineType(size_t n) const { return m_aTypes[n]; } - // guess the type of file (m_file is supposed to be opened) - Type GuessType() const; - // get the name of the file - const char *GetName() const { return m_strFile.c_str(); } - - // add/remove lines - // add a line to the end - void AddLine(const wxString& str, Type type = typeDefault) - { m_aLines.Add(str); m_aTypes.Add(type); } - // insert a line before the line number n - void InsertLine(const wxString& str, size_t n, Type type = typeDefault) - { m_aLines.Insert(str, n); m_aTypes.Insert(type, n); } - // delete one line - void RemoveLine(size_t n) { m_aLines.Remove(n); m_aTypes.Remove(n); } - - // change the file on disk (default argument means "don't change type") - // possibly in another format - bool Write(Type typeNew = Type_None); - - // get the file termination string - inline static const char *GetEOL(Type type = typeDefault) - { - switch ( type ) { - case Type_None: return ""; - case Type_Unix: return "\n"; - case Type_Dos: return "\r\n"; - case Type_Mac: return "\r"; - - default: - wxFAIL_MSG("bad file type in wxTextFile::GetEOL."); - return (const char *) NULL; - } - } - - // dtor - ~wxTextFile(); - -private: - // copy ctor/assignment operator not implemented - wxTextFile(const wxTextFile&); - wxTextFile& operator=(const wxTextFile&); - - // read the file in memory (m_file is supposed to be just opened) - bool Read(); - - WX_DEFINE_ARRAY(Type, ArrayFileType); - - wxFile m_file; // current file - ArrayFileType m_aTypes; // type of each line - wxArrayString m_aLines; // lines of file - wxString m_strFile; // name of the file -}; - -#endif //_TEXTFILE_H diff --git a/include/wx/thread.h b/include/wx/thread.h deleted file mode 100644 index 9700b4ddfd..0000000000 --- a/include/wx/thread.h +++ /dev/null @@ -1,158 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: thread.h -// Purpose: Thread API -// Author: Guilhem Lavaux -// Modified by: -// Created: 04/13/98 -// RCS-ID: $Id$ -// Copyright: (c) Guilhem Lavaux -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef __THREADH__ -#define __THREADH__ - -#ifdef __GNUG__ -#pragma interface "thread.h" -#endif - -#include "wx/object.h" -#include "wx/setup.h" - -typedef enum { - MUTEX_NO_ERROR=0, - MUTEX_DEAD_LOCK, // Mutex has been already locked by THE CALLING thread - MUTEX_BUSY, // Mutex has been already locked by ONE thread - MUTEX_UNLOCKED -} wxMutexError; - -typedef enum { - THREAD_NO_ERROR=0, // No error - THREAD_NO_RESOURCE, // No resource left to create a new thread - THREAD_RUNNING, // The thread is already running - THREAD_NOT_RUNNING, // The thread isn't running - THREAD_MISC_ERROR // Some other error -} wxThreadError; - -// defines the interval of priority. -#define WXTHREAD_MIN_PRIORITY 0 -#define WXTHREAD_DEFAULT_PRIORITY 50 -#define WXTHREAD_MAX_PRIORITY 100 - -// --------------------------------------------------------------------------- -// Mutex handler -class WXDLLEXPORT wxMutexInternal; -class WXDLLEXPORT wxMutex { -public: - // constructor & destructor - wxMutex(); - ~wxMutex(); - - // Lock the mutex. - wxMutexError Lock(); - // Try to lock the mutex: if it can't, returns immediately with an error. - wxMutexError TryLock(); - // Unlock the mutex. - wxMutexError Unlock(); - - // Returns true if the mutex is locked. - bool IsLocked() const { return (m_locked > 0); } -protected: - friend class wxCondition; - - int m_locked; - wxMutexInternal *p_internal; -}; - -// --------------------------------------------------------------------------- -// Condition handler. -class wxConditionInternal; -class WXDLLEXPORT wxCondition { -public: - // constructor & destructor - wxCondition(); - ~wxCondition(); - - // Waits indefinitely. - void Wait(wxMutex& mutex); - // Waits until a signal is raised or the timeout is elapsed. - bool Wait(wxMutex& mutex, unsigned long sec, unsigned long nsec); - // Raises a signal: only one "Waiter" is released. - void Signal(); - // Broadcasts to all "Waiters". - void Broadcast(); -private: - wxConditionInternal *p_internal; -}; - -// --------------------------------------------------------------------------- -// Thread management class -class wxThreadInternal; -class WXDLLEXPORT wxThread { -public: - // constructor & destructor. - wxThread(); - virtual ~wxThread(); - - // Create a new thread, this method should check there is only one thread - // running by object. - wxThreadError Create(); - - // Destroys the thread immediately if the defer flag isn't true. - wxThreadError Destroy(); - - // Pause a running thread - wxThreadError Pause(); - - // Resume a paused thread - wxThreadError Resume(); - - // Switches on the defer flag. - void DeferDestroy(bool on); - - // Waits for the termination of the thread. - void *Join(); - - // Sets the priority to "prio". (Warning: The priority can only be set before - // the thread is created) - void SetPriority(int prio); - // Get the current priority. - int GetPriority() const; - - // Get the thread ID - unsigned long GetID() const; - - // Returns true if the thread is alive. - bool IsAlive() const; - // Returns true if the thread is running (not paused, not killed). - bool IsRunning() const; - // Returns true if the thread is the main thread (aka the GUI thread). - static bool IsMain(); - - // Called when thread exits. - virtual void OnExit(); - - // Returns the wxThread object which corresponds to the ID. - static wxThread *GetThreadFromID(unsigned long id); -protected: - // In case, the DIFFER flag is true, enables another thread to kill this one. - void TestDestroy(); - // Exits from the current thread. - void Exit(void *status = NULL); -private: - // Entry point for the thread. - virtual void *Entry() = 0; - -private: - friend class wxThreadInternal; - - wxThreadInternal *p_internal; -}; - -// --------------------------------------------------------------------------- -// Global variables - -// GUI mutex. -WXDLLEXPORT_DATA(extern wxMutex) wxMainMutex; - -#endif diff --git a/include/wx/time.h b/include/wx/time.h deleted file mode 100644 index 74461c55af..0000000000 --- a/include/wx/time.h +++ /dev/null @@ -1,97 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: time.h -// Purpose: wxTime class, from NIHCL -// Author: Julian Smart, after K. E. Gorlen -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_TIMEH__ -#define _WX_TIMEH__ - -#include "wx/object.h" - -#if USE_TIMEDATE - -#ifdef __GNUG__ -#pragma interface "time.h" -#endif - -class WXDLLEXPORT wxDate; - -typedef unsigned short hourTy; -typedef unsigned short minuteTy; -typedef unsigned short secondTy; -typedef unsigned long clockTy; - -class WXDLLEXPORT wxTime: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxTime) - -public: // type definitions - enum tFormat { wx12h, wx24h }; - enum tPrecision { wxStdMinSec, wxStdMin }; -private: - static tFormat Format; - static tPrecision Precision; - - clockTy sec; /* seconds since 1/1/1901 */ - - bool IsDST() const; - wxTime GetLocalTime() const; -private: // static member functions - static wxTime GetLocalTime(const wxDate& date, hourTy h=0, minuteTy m=0, secondTy s=0); - static wxTime GetBeginDST(unsigned year); - static wxTime GetEndDST(unsigned year); -public: - wxTime(); // current time - wxTime(clockTy s) { sec = s; } - wxTime(const wxTime& t) { (*this) = t ; } - wxTime(hourTy h, minuteTy m, secondTy s =0, bool dst =FALSE); - wxTime(const wxDate&, hourTy h =0, minuteTy m =0, secondTy s=0, bool dst =FALSE); - // Convert to string - operator char * (void); - operator wxDate() const; - bool operator<(const wxTime& t) const { return sec < t.sec; } - bool operator<=(const wxTime& t) const { return sec <= t.sec; } - bool operator>(const wxTime& t) const { return sec > t.sec; } - bool operator>=(const wxTime& t) const { return sec >= t.sec; } - bool operator==(const wxTime& t) const { return sec == t.sec; } - bool operator!=(const wxTime& t) const { return sec != t.sec; } - void operator=(const wxTime& t) { sec = t.sec; } - friend wxTime operator+(const wxTime& t, long s) { return wxTime(t.sec+s); } - friend wxTime operator+(long s, const wxTime& t) { return wxTime(t.sec+s); } - long operator-(const wxTime& t) const { return sec - t.sec; } - wxTime operator-(long s) const { return wxTime(sec-s); } - void operator+=(long s) { sec += s; } - void operator-=(long s) { sec -= s; } - bool IsBetween(const wxTime& a, const wxTime& b) const; - hourTy GetHour() const; // hour in local time - hourTy GetHourGMT() const; // hour in GMT - minuteTy GetMinute() const; // minute in local time - minuteTy GetMinuteGMT() const; // minute in GMT - secondTy GetSecond() const; // second in local time or GMT - clockTy GetSeconds() const { return sec; } - wxTime Max(const wxTime&) const; - wxTime Min(const wxTime&) const; - static void SetFormat(const tFormat lFormat = wx12h, - const tPrecision lPrecision = wxStdMinSec); - char *FormatTime() const; -/* - virtual int compare(const Object&) const; - virtual void deepenShallowCopy(); // {} - virtual unsigned hash() const; - virtual bool isEqual(const Object&) const; - virtual void printOn(ostream& strm =cout) const; - virtual const Class* species() const; -*/ -}; - -#endif - // USE_TIMEDATE -#endif - // _WX_TIMEH__ - diff --git a/include/wx/timer.h b/include/wx/timer.h deleted file mode 100644 index 4cf5c35b26..0000000000 --- a/include/wx/timer.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_TIMER_H_BASE_ -#define _WX_TIMER_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/timer.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/timer.h" -#elif defined(__WXGTK__) -#include "wx/gtk/timer.h" -#elif defined(__WXQT__) -#include "wx/qt/timer.h" -#elif defined(__WXMAC__) -#include "wx/mac/timer.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/timer.h" -#endif - -#endif - // _WX_TIMER_H_BASE_ diff --git a/include/wx/toolbar.h b/include/wx/toolbar.h deleted file mode 100644 index 3e09456f59..0000000000 --- a/include/wx/toolbar.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef _TOOLBAR_H_BASE_ -#define _TOOLBAR_H_BASE_ - -// the application code should use only wxToolBar which is #define'd to be the -// native implementation for each platform -#if defined(__WXMSW__) && defined(__WIN95__) -# include "wx/msw/tbar95.h" -# define wxToolBar wxToolBar95 -# define classwxToolBar classwxToolBar95 -#elif defined(__WXMSW__) -# include "wx/msw/tbarmsw.h" -# define wxToolBar wxToolBarMSW -# define classwxToolBar classwxToolBarMSW -#elif defined(__WXGTK__) -# include "wx/gtk/tbargtk.h" -#elif defined(__WXQT__) -# include "wx/qt/tbarqt.h" -#elif defined(__WXMAC__) -# include "wx/mac/toolbar.h" -#elif defined(__WXSTUBS__) -# include "wx/stubs/toolbar.h" -#endif - -#endif - // _TOOLBAR_H_BASE_ diff --git a/include/wx/treectrl.h b/include/wx/treectrl.h deleted file mode 100644 index 0fce45a8a2..0000000000 --- a/include/wx/treectrl.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_TREECTRL_H_BASE_ -#define _WX_TREECTRL_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/treectrl.h" -#elif defined(__WXMOTIF__) -#include "wx/generic/treectrl.h" -#elif defined(__WXGTK__) -#include "wx/generic/treectrl.h" -#elif defined(__WXQT__) -#include "wx/qt/treectrl.h" -#elif defined(__WXMAC__) -#include "wx/generic/treectrl.h" -#elif defined(__WXSTUBS__) -#include "wx/generic/treectrl.h" -#endif - -#endif - // _WX_TREECTRL_H_BASE_ diff --git a/include/wx/types.h b/include/wx/types.h deleted file mode 100644 index 962783f387..0000000000 --- a/include/wx/types.h +++ /dev/null @@ -1,97 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: types.h -// Purpose: Type identifiers, used by resource system -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_TYPESH__ -#define _WX_TYPESH__ - -#ifdef __GNUG__ -// #pragma interface "types.h" -#endif - -// Types of objects -#define wxTYPE_ANY 0 -#define wxTYPE_OBJECT wxTYPE_ANY -#define wxTYPE_WINDOW 1 -#define wxTYPE_DIALOG_BOX 2 -#define wxTYPE_ITEM 3 -#define wxTYPE_PANEL 4 -#define wxTYPE_CANVAS 5 -#define wxTYPE_TEXT_WINDOW 6 -#define wxTYPE_FRAME 7 - -#define wxTYPE_BUTTON 8 -#define wxTYPE_TEXT 9 -#define wxTYPE_MESSAGE 10 -#define wxTYPE_CHOICE 11 -#define wxTYPE_LIST_BOX 12 -#define wxTYPE_SLIDER 13 -#define wxTYPE_CHECK_BOX 14 -#define wxTYPE_MENU 15 -#define wxTYPE_MENU_BAR 16 -#define wxTYPE_MULTI_TEXT 17 -#define wxTYPE_RADIO_BOX 18 -#define wxTYPE_GROUP_BOX 19 -#define wxTYPE_GAUGE 20 -#define wxTYPE_SCROLL_BAR 21 -#define wxTYPE_VIRT_LIST_BOX 22 -#define wxTYPE_COMBO_BOX 23 -#define wxTYPE_RADIO_BUTTON 24 - -#define wxTYPE_EVENT 25 -#define wxTYPE_DC 26 -#define wxTYPE_DC_CANVAS 27 -#define wxTYPE_DC_POSTSCRIPT 28 -#define wxTYPE_DC_PRINTER 29 -#define wxTYPE_DC_METAFILE 30 -#define wxTYPE_DC_MEMORY 31 -#define wxTYPE_MOUSE_EVENT 32 -#define wxTYPE_KEY_EVENT 33 -#define wxTYPE_COMMAND_EVENT 34 -#define wxTYPE_DC_PANEL 35 - -#define wxTYPE_PEN 40 -#define wxTYPE_BRUSH 41 -#define wxTYPE_FONT 42 -#define wxTYPE_ICON 42 -#define wxTYPE_BITMAP 43 -#define wxTYPE_METAFILE 44 -#define wxTYPE_TIMER 45 -#define wxTYPE_COLOUR 46 -#define wxTYPE_COLOURMAP 47 -#define wxTYPE_CURSOR 48 - -#define wxTYPE_DDE_CLIENT 60 -#define wxTYPE_DDE_SERVER 61 -#define wxTYPE_DDE_CONNECTION 62 - -#define wxTYPE_HELP_INSTANCE 63 - -#define wxTYPE_LIST 70 -#define wxTYPE_STRING_LIST 71 -#define wxTYPE_HASH_TABLE 72 -#define wxTYPE_NODE 73 -#define wxTYPE_APP 74 -#define wxTYPE_DATE 75 - -#define wxTYPE_ENHANCED_DIALOG 80 -#define wxTYPE_TOOLBAR 81 -#define wxTYPE_BUTTONBAR 82 - -#define wxTYPE_DATABASE 90 -#define wxTYPE_QUERY_FIELD 91 -#define wxTYPE_QUERY_COL 92 -#define wxTYPE_RECORDSET 93 - -#define wxTYPE_USER 500 - -#endif - // _WX_TYPESH__ - diff --git a/include/wx/utils.h b/include/wx/utils.h deleted file mode 100644 index ed0115dc82..0000000000 --- a/include/wx/utils.h +++ /dev/null @@ -1,312 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: utils.h -// Purpose: Miscellaneous utilities -// Author: Julian Smart -// Modified by: -// Created: 29/01/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_UTILSH__ -#define _WX_UTILSH__ - -#ifdef __GNUG__ -#pragma interface "utils.h" -#endif - -#include "wx/setup.h" -#include "wx/object.h" -#include "wx/list.h" -#include "wx/window.h" -#include "wx/filefn.h" -#include "wx/process.h" - -#if USE_IOSTREAMH -#include -#else -#include -#endif - -#ifdef __X__ -#ifndef __VMS__ -/*steve: these two are not known under VMS */ -#include -#include -#endif -#endif - -#include - -#ifdef __GNUWIN32__ -#define stricmp strcasecmp -#define strnicmp strncasecmp -#endif - -// Forward declaration -class WXDLLEXPORT wxFrame; - -// Stupid ASCII macros -#define wxToUpper(C) (((C) >= 'a' && (C) <= 'z')? (C) - 'a' + 'A': (C)) -#define wxToLower(C) (((C) >= 'A' && (C) <= 'Z')? (C) - 'A' + 'a': (C)) - -// Return a string with the current date/time -wxString WXDLLEXPORT wxNow(void); - -// Make a copy of this string using 'new' -char* WXDLLEXPORT copystring(const char *s); - -// Generate a unique ID -long WXDLLEXPORT wxNewId(void); -#define NewId wxNewId - -// Ensure subsequent IDs don't clash with this one -void WXDLLEXPORT wxRegisterId(long id); -#define RegisterId wxRegisterId - -// Return the current ID -long WXDLLEXPORT wxGetCurrentId(void); - -// Useful buffer -WXDLLEXPORT_DATA(extern char*) wxBuffer; - -WXDLLEXPORT_DATA(extern const char*) wxFloatToStringStr; -WXDLLEXPORT_DATA(extern const char*) wxDoubleToStringStr; - -// Various conversions -void WXDLLEXPORT StringToFloat(char *s, float *number); -char* WXDLLEXPORT FloatToString(float number, const char *fmt = wxFloatToStringStr); -void WXDLLEXPORT StringToDouble(char *s, double *number); -char* WXDLLEXPORT DoubleToString(double number, const char *fmt = wxDoubleToStringStr); -void WXDLLEXPORT StringToInt(char *s, int *number); -void WXDLLEXPORT StringToLong(char *s, long *number); -char* WXDLLEXPORT IntToString(int number); -char* WXDLLEXPORT LongToString(long number); - -// Matches string one within string two regardless of case -bool WXDLLEXPORT StringMatch(char *one, char *two, bool subString = TRUE, bool exact = FALSE); - -// A shorter way of using strcmp -#define wxStringEq(s1, s2) (s1 && s2 && (strcmp(s1, s2) == 0)) - -// Convert 2-digit hex number to decimal -int WXDLLEXPORT wxHexToDec(char *buf); - -// Convert decimal integer to 2-character hex string -void WXDLLEXPORT wxDecToHex(int dec, char *buf); - -// Execute another program. Returns 0 if there was an error, a PID otherwise. -long WXDLLEXPORT wxExecute(char **argv, bool Async = FALSE, - wxProcess *process = (wxProcess *) NULL); -long WXDLLEXPORT wxExecute(const wxString& command, bool Async = FALSE, - wxProcess *process = (wxProcess *) NULL); - -#define wxSIGTERM 1 - -int WXDLLEXPORT wxKill(long pid, int sig=wxSIGTERM); - -// Execute a command in an interactive shell window -// If no command then just the shell -bool WXDLLEXPORT wxShell(const wxString& command = ""); - -// Sleep for nSecs seconds under UNIX, do nothing under Windows -void WXDLLEXPORT wxSleep(int nSecs); - -// Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX) -long WXDLLEXPORT wxGetFreeMemory(void); - -// Consume all events until no more left -void WXDLLEXPORT wxFlushEvents(void); - -/* - * Network and username functions. - * - */ - -// Get eMail address -bool WXDLLEXPORT wxGetEmailAddress(char *buf, int maxSize); - -// Get hostname. -bool WXDLLEXPORT wxGetHostName(char *buf, int maxSize); - -// Get user ID e.g. jacs -bool WXDLLEXPORT wxGetUserId(char *buf, int maxSize); - -// Get user name e.g. Julian Smart -bool WXDLLEXPORT wxGetUserName(char *buf, int maxSize); - -/* - * Strip out any menu codes - */ -char* WXDLLEXPORT wxStripMenuCodes(char *in, char *out = (char *) NULL); - -// Find the window/widget with the given title or label. -// Pass a parent to begin the search from, or NULL to look through -// all windows. -wxWindow* WXDLLEXPORT wxFindWindowByLabel(const wxString& title, wxWindow *parent = (wxWindow *) NULL); - -// Find window by name, and if that fails, by label. -wxWindow* WXDLLEXPORT wxFindWindowByName(const wxString& name, wxWindow *parent = (wxWindow *) NULL); - -// Returns menu item id or -1 if none. -int WXDLLEXPORT wxFindMenuItemId(wxFrame *frame, const wxString& menuString, const wxString& itemString); - -// A debugging stream buffer. -// Under Windows, this writes to the Windows debug output. -// Under other platforms, it writes to cerr. - -// ALl this horrible gubbins required for Borland, because the calling -// convention needs to be the same as for streambuf. -// Thanks to Gerhard.Vogt@embl-heidelberg.de for this solution. - -#if defined(__BORLANDC__) && defined(__BCOPT__) && !defined(_RTL_ALLOW_po) && !defined(__FLAT__) -#pragma option -po- -#endif - -// Can't export a class derived from a non-export class -#if !defined(_WINDLL) && !defined(WXUSINGDLL) - -#ifdef new -#undef new -#endif - -class WXDLLEXPORT wxDebugStreamBuf: public streambuf -{ - public: - wxDebugStreamBuf(void); - ~wxDebugStreamBuf(void) {} - - int overflow(int i); - inline int underflow(void) { return EOF; } - int sync(void); -}; - -#if WXDEBUG && USE_GLOBAL_MEMORY_OPERATORS -#define new WXDEBUG_NEW -#endif - -#endif - -#if defined(__BORLANDC__) && defined(__BCOPT__) && !defined(_RTL_ALLOW_po) && !defined(__FLAT__) -#pragma option -po. -#endif - -/* -#if (!defined(__MINMAX_DEFINED) && !defined(max)) -#define max(a,b) (((a) > (b)) ? (a) : (b)) -#define min(a,b) (((a) < (b)) ? (a) : (b)) -#define __MINMAX_DEFINED 1 -#endif -*/ -#define wxMax(a,b) (((a) > (b)) ? (a) : (b)) -#define wxMin(a,b) (((a) < (b)) ? (a) : (b)) - -// Yield to other apps/messages -bool WXDLLEXPORT wxYield(void); - -// Format a message on the standard error (UNIX) or the debugging -// stream (Windows) -void WXDLLEXPORT wxDebugMsg(const char *fmt ...) ; - -// Sound the bell -void WXDLLEXPORT wxBell(void) ; - -// Get OS version -int WXDLLEXPORT wxGetOsVersion(int *majorVsn= (int *) NULL,int *minorVsn= (int *) NULL) ; - -// Set the cursor to the busy cursor for all windows -class WXDLLEXPORT wxCursor; -WXDLLEXPORT_DATA(extern wxCursor*) wxHOURGLASS_CURSOR; -void WXDLLEXPORT wxBeginBusyCursor(wxCursor *cursor = wxHOURGLASS_CURSOR); - -// Restore cursor to normal -void WXDLLEXPORT wxEndBusyCursor(void); - -// TRUE if we're between the above two calls -bool WXDLLEXPORT wxIsBusy(void); - -/* Error message functions used by wxWindows */ - -// Non-fatal error (continues) -WXDLLEXPORT_DATA(extern const char*) wxInternalErrorStr; -void WXDLLEXPORT wxError(const wxString& msg, const wxString& title = wxInternalErrorStr); - -// Fatal error (exits) -WXDLLEXPORT_DATA(extern const char*) wxFatalErrorStr; -void WXDLLEXPORT wxFatalError(const wxString& msg, const wxString& title = wxFatalErrorStr); - -// Reading and writing resources (eg WIN.INI, .Xdefaults) -#if USE_RESOURCES -bool WXDLLEXPORT wxWriteResource(const wxString& section, const wxString& entry, const wxString& value, const wxString& file = ""); -bool WXDLLEXPORT wxWriteResource(const wxString& section, const wxString& entry, float value, const wxString& file = ""); -bool WXDLLEXPORT wxWriteResource(const wxString& section, const wxString& entry, long value, const wxString& file = ""); -bool WXDLLEXPORT wxWriteResource(const wxString& section, const wxString& entry, int value, const wxString& file = ""); - -bool WXDLLEXPORT wxGetResource(const wxString& section, const wxString& entry, char **value, const wxString& file = ""); -bool WXDLLEXPORT wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file = ""); -bool WXDLLEXPORT wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file = ""); -bool WXDLLEXPORT wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file = ""); -#endif // USE_RESOURCES - -#ifdef __UNIX__ -// 'X' Only, will soon vanish.... -// Get current Home dir and copy to dest -char* WXDLLEXPORT wxGetHomeDir( char *dest ); -#endif -// Get the user's home dir (caller must copy--- volatile) -// returns NULL is no HOME dir is known -char* WXDLLEXPORT wxGetUserHome(const wxString& user = ""); - -// Check whether this window wants to process messages, e.g. Stop button -// in long calculations. -bool WXDLLEXPORT wxCheckForInterrupt(wxWindow *wnd); - -void WXDLLEXPORT wxGetMousePosition( int* x, int* y ); - -// MSW only: get user-defined resource from the .res file. -// Returns NULL or newly-allocated memory, so use delete[] to clean up. -#ifdef __WXMSW__ -extern const char* WXDLLEXPORT wxUserResourceStr; -char* WXDLLEXPORT wxLoadUserResource(const wxString& resourceName, const wxString& resourceType = wxUserResourceStr); -#endif - -// X only -#ifdef __X__ -// Get X display: often needed in the wxWindows implementation. -Display *wxGetDisplay(void); -/* Matthew Flatt: Added wxSetDisplay and wxGetDisplayName */ -bool wxSetDisplay(const wxString& display_name); -wxString wxGetDisplayName(void); -#endif - -#ifdef __X__ - -#include - -#define wxMAX_RGB 0xff -#define wxMAX_SV 1000 -#define wxSIGN(x) ((x < 0) ? -x : x) -#define wxH_WEIGHT 4 -#define wxS_WEIGHT 1 -#define wxV_WEIGHT 2 - -typedef struct wx_hsv { - int h,s,v; - } wxHSV; - -#define wxMax3(x,y,z) ((x > y) ? ((x > z) ? x : z) : ((y > z) ? y : z)) -#define wxMin3(x,y,z) ((x < y) ? ((x < z) ? x : z) : ((y < z) ? y : z)) - -#define wxMax2(x,y) ((x > y) ? x : y) -#define wxMin2(x,y) ((x < y) ? x : y) - -void wxHSVToXColor(wxHSV *hsv,XColor *xcolor); -void wxXColorToHSV(wxHSV *hsv,XColor *xcolor); -void wxAllocNearestColor(Display *display,Colormap colormap,XColor *xcolor); -void wxAllocColor(Display *display,Colormap colormap,XColor *xcolor); - -#endif //__X__ - -#endif - // _WX_UTILSH__ diff --git a/include/wx/validate.h b/include/wx/validate.h deleted file mode 100644 index a67d9cba9b..0000000000 --- a/include/wx/validate.h +++ /dev/null @@ -1,70 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: validate.h -// Purpose: wxValidator class -// Author: Julian Smart -// Modified by: -// Created: 29/01/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_VALIDATEH__ -#define _WX_VALIDATEH__ - -#ifdef __GNUG__ -#pragma interface "validate.h" -#endif - -#include "wx/event.h" - -class WXDLLEXPORT wxWindow; - -/* - A validator has up to three purposes: - - 1) To validate the data in the window that's associated - with the validator. - 2) To transfer data to and from the window. - 3) To filter input, using its role as a wxEvtHandler - to intercept e.g. OnChar. - - Note that wxValidator and derived classes use reference counting. - */ - -class WXDLLEXPORT wxValidator: public wxEvtHandler -{ -DECLARE_DYNAMIC_CLASS(wxValidator) -public: - wxValidator(void); - ~wxValidator(); - - // Make a clone of this validator (or return NULL) - currently necessary - // if you're passing a reference to a validator. - // Another possibility is to always pass a pointer to a new validator - // (so the calling code can use a copy constructor of the relevant class). - virtual wxValidator *Clone(void) const { return (wxValidator *) NULL; } - inline bool Copy(const wxValidator& val) { m_validatorWindow = val.m_validatorWindow; return TRUE; } - - // Called when the value in the window must be validated. - // This function can pop up an error message. - virtual bool Validate(wxWindow *WXUNUSED(parent)) { return FALSE; }; - - // Called to transfer data to the window - virtual bool TransferToWindow(void) { return FALSE; } - - // Called to transfer data from the window - virtual bool TransferFromWindow(void) { return FALSE; }; - - // ACCESSORS - inline wxWindow *GetWindow(void) const { return m_validatorWindow; } - inline void SetWindow(wxWindow *win) { m_validatorWindow = win; } - -protected: - wxWindow *m_validatorWindow; -}; - -WXDLLEXPORT_DATA(extern const wxValidator) wxDefaultValidator; - -#endif - // _WX_VALIDATEH__ diff --git a/include/wx/valtext.h b/include/wx/valtext.h deleted file mode 100644 index bd2bb8d93b..0000000000 --- a/include/wx/valtext.h +++ /dev/null @@ -1,77 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: valtext.h -// Purpose: wxTextValidator class -// Author: Julian Smart -// Modified by: -// Created: 29/01/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_VALTEXTH__ -#define _WX_VALTEXTH__ - -#ifdef __GNUG__ -#pragma interface "valtext.h" -#endif - -#include "wx/validate.h" - -#define wxFILTER_NONE 0x0000 -#define wxFILTER_ASCII 0x0001 -#define wxFILTER_ALPHA 0x0002 -#define wxFILTER_ALPHANUMERIC 0x0004 -#define wxFILTER_NUMERIC 0x0008 -#define wxFILTER_INCLUDE_LIST 0x0010 -#define wxFILTER_EXCLUDE_LIST 0x0020 - -class WXDLLEXPORT wxTextValidator: public wxValidator -{ -DECLARE_DYNAMIC_CLASS(wxTextValidator) -public: - wxTextValidator(long style = wxFILTER_NONE, wxString *val = (wxString *) NULL); - wxTextValidator(const wxTextValidator& val); - - ~wxTextValidator(); - - // Make a clone of this validator (or return NULL) - currently necessary - // if you're passing a reference to a validator. - // Another possibility is to always pass a pointer to a new validator - // (so the calling code can use a copy constructor of the relevant class). - virtual wxValidator *Clone(void) const { return new wxTextValidator(*this); } - bool Copy(const wxTextValidator& val); - - // Called when the value in the window must be validated. - // This function can pop up an error message. - virtual bool Validate(wxWindow *parent); - - // Called to transfer data to the window - virtual bool TransferToWindow(void); - - // Called to transfer data to the window - virtual bool TransferFromWindow(void); - - // ACCESSORS - inline long GetStyle(void) const { return m_validatorStyle; } - inline void SetStyle(long style) { m_validatorStyle = style; } - - void SetIncludeList(const wxStringList& list); - inline wxStringList& GetIncludeList(void) { return m_includeList; } - - void SetExcludeList(const wxStringList& list); - inline wxStringList& GetExcludeList(void) { return m_excludeList; } - - // Filter keystrokes - void OnChar(wxKeyEvent& event); - -DECLARE_EVENT_TABLE() - -protected: - long m_validatorStyle; - wxString * m_stringValue; - wxStringList m_includeList; - wxStringList m_excludeList; -}; - -#endif diff --git a/include/wx/version.h b/include/wx/version.h deleted file mode 100644 index 68f7db190e..0000000000 --- a/include/wx/version.h +++ /dev/null @@ -1,25 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: version.h -// Purpose: wxWindows version numbers -// Author: Julian Smart -// Modified by: -// Created: 29/01/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_VERSIONH__ -#define _WX_VERSIONH__ - -/* Bump-up with each new version */ -#define wxMAJOR_VERSION 2 -#define wxMINOR_VERSION 0 -#define wxRELEASE_NUMBER 0 -#define wxVERSION_STRING "wxWindows 2.0" -#define wxVERSION_NUMBER (wxMAJOR_VERSION * 1000) + (wxMINOR_VERSION * 100) + wxRELEASE_NUMBER -#define wxBETA_NUMBER 12 -#define wxVERSION_FLOAT float(wxMAJOR_VERSION + (wxMINOR_VERSION/10.0) + (wxRELEASE_NUMBER/100.0) + (wxBETA_NUMBER/10000.0)) - -#endif - // _WX_VERSIONH__ diff --git a/include/wx/window.h b/include/wx/window.h deleted file mode 100644 index 583eb9fb07..0000000000 --- a/include/wx/window.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _WX_WINDOW_H_BASE_ -#define _WX_WINDOW_H_BASE_ - -#if defined(__WXMSW__) -#include "wx/msw/window.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/window.h" -#elif defined(__WXGTK__) -#include "wx/gtk/window.h" -#elif defined(__WXQT__) -#include "wx/qt/window.h" -#elif defined(__WXMAC__) -#include "wx/mac/window.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/window.h" -#endif - -#endif - // _WX_WINDOW_H_BASE_ diff --git a/include/wx/wx.h b/include/wx/wx.h deleted file mode 100644 index 98c80c43ed..0000000000 --- a/include/wx/wx.h +++ /dev/null @@ -1,74 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: wx.h -// Purpose: wxWindows main include file -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_WXH__ -#define _WX_WXH__ - -#include "wx/setup.h" // Which features to include - user editable -#include "wx/defs.h" -#include "wx/string.h" -#include "wx/window.h" -#include "wx/panel.h" -#include "wx/frame.h" -#include "wx/dc.h" -#include "wx/dcclient.h" -#include "wx/dcmemory.h" -#include "wx/dcprint.h" -#include "wx/dcscreen.h" -#include "wx/postscrp.h" -#include "wx/button.h" -#include "wx/bmpbuttn.h" -#include "wx/checkbox.h" -#include "wx/choice.h" -#include "wx/scrolbar.h" -#include "wx/stattext.h" -#include "wx/statbmp.h" -#include "wx/statbox.h" -#include "wx/listbox.h" -#include "wx/radiobox.h" -#include "wx/radiobut.h" -#include "wx/textctrl.h" -#include "wx/slider.h" -#include "wx/gauge.h" -#include "wx/combobox.h" -#include "wx/menu.h" -#include "wx/app.h" -#include "wx/event.h" -#include "wx/list.h" -#include "wx/pen.h" -#include "wx/brush.h" -#include "wx/palette.h" -#include "wx/icon.h" -#include "wx/cursor.h" -#include "wx/dialog.h" -#include "wx/timer.h" -#include "wx/utils.h" -#include "wx/settings.h" -#include "wx/layout.h" -#include "wx/memory.h" -#include "wx/mdi.h" -#include "wx/scrolwin.h" -#include "wx/statusbr.h" -#include "wx/scrolbar.h" -#include "wx/msgdlg.h" -#include "wx/choicdlg.h" -#include "wx/textdlg.h" -#include "wx/filedlg.h" -#include "wx/dirdlg.h" -#include "wx/cmndata.h" -#include "wx/intl.h" -#ifdef USE_SERIAL -#include "wx/objstrm.h" -#include "wx/serbase.h" -#endif - -#endif - // _WX_WXH__ diff --git a/include/wx/wxexpr.h b/include/wx/wxexpr.h deleted file mode 100644 index 480ecbc2a4..0000000000 --- a/include/wx/wxexpr.h +++ /dev/null @@ -1,281 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: wxexpr.h -// Purpose: Prolog-like file I/O, used by resource system. -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_WXEXPRH__ -#define _WX_WXEXPRH__ - -#ifdef __GNUG__ -#pragma interface "wxexpr.h" -#endif - -#include - -#include "wx/defs.h" -#include "wx/string.h" - -#if USE_IOSTREAMH -#include -#else -#include -#endif - -#include "wx/list.h" -#include "wx/hash.h" - -#include "wx/expr.h" - -// Compatibility -#define PrologExpr wxExpr -#define PrologDatabase wxExprDatabase -#define proioErrorHandler wxExprErrorHandler -#define PROIO_ERROR_GENERAL 1 -#define PROIO_ERROR_SYNTAX 2 -#define PrologNull wxExprNull -#define PrologInteger wxExprInteger -#define PrologReal wxExprReal -#define PrologWord wxExprWord -#define PrologString wxExprString -#define PrologList wxExprList -#define PrologType wxExprType - -// Error types -#define WXEXPR_ERROR_GENERAL 1 -#define WXEXPR_ERROR_SYNTAX 2 - -// Error handler function definition. If app returns TRUE, -// carry on processing. -typedef bool (*wxExprErrorHandler) (int errorType, char *msg); - -WXDLLEXPORT_DATA(extern wxExprErrorHandler) currentwxExprErrorHandler; - -WXDLLEXPORT_DATA(extern "C" FILE*) yyin; - -extern "C" int WXDLLEXPORT yyparse(void); - -typedef enum { - wxExprNull, - wxExprInteger, - wxExprReal, - wxExprWord, - wxExprString, - wxExprList -} wxExprType; - -class WXDLLEXPORT wxExprDatabase; - -class WXDLLEXPORT wxExpr -{ - public: - wxObject *client_data; - wxExprType type; - union { - long integer; - char *word; - char *string; - double real; - wxExpr *first; // If is a list expr, points to the first node - } value; - - wxExpr *next; // If this is a node in a list, points to the next node - wxExpr *last; // If is a list expr, points to the last node - - wxExpr(wxExprType the_type, char *word_or_string, bool allocate); - wxExpr(const wxString& functor); // Assume this is a new clause - pass functor - wxExpr(wxExprType the_type, const wxString& word_or_string = ""); - wxExpr(long the_integer); - wxExpr(double the_real); - wxExpr(wxList *the_list); - ~wxExpr(void); - - inline wxExprType Type(void) const { return type; } - inline long IntegerValue(void) const - { - if (type == wxExprInteger) - return value.integer; - else if (type == wxExprReal) - return (long)value.real; - else return 0; - } - - inline double RealValue(void) const { - if (type == wxExprReal) - return value.real; - else if (type == wxExprInteger) - return (double)value.integer; - else return (double)0.0; - } - - inline wxString WordValue(void) const { - if (type == wxExprWord) - return value.word; - else if (type == wxExprString) - return wxString(value.string); - else return wxString(""); - } - - inline wxString StringValue(void) const { - if (type == wxExprString) - return wxString(value.string); - else if (type == wxExprWord) - return wxString(value.word); - else return wxString(""); - } - - // Get nth arg of clause (starting from 1) - wxExpr *Arg(wxExprType type, int arg) const; - - // Return nth argument of a list expression (starting from zero) - wxExpr *Nth(int arg) const; - - // Returns the number of elements in a list expression - int Number(void) const; - - // Make a clone - wxExpr *Copy(void) const; - - wxExpr *GetAttributeValueNode(const wxString& word) const; // Use only for a clause or list - wxExpr *AttributeValue(const wxString& word) const; // Use only for a clause - wxString Functor(void) const; // Only for a clause - bool IsFunctor(const wxString& s) const; // Only for a clause - void WriteClause(ostream& stream); // Write this expression as a top-level clause - void WriteExpr(ostream& stream); // Write as any other subexpression - void WriteLispExpr(ostream& stream); - - // Append an expression to a list - void Append(wxExpr *expr); - // Insert at beginning of list - void Insert(wxExpr *expr); - - // Get first expr in list - inline wxExpr *GetFirst(void) const { return ((type == wxExprList) ? value.first : (wxExpr*)NULL); } - - // Get next expr if this is a node in a list - inline wxExpr *GetNext(void) const { return next; } - - // Get last expr in list - inline wxExpr *GetLast(void) const { return ((type == wxExprList) ? last : (wxExpr*)NULL); } - - // This should really be called SetAttributeValue since any existing - // attribute-value is deleted first. - void AddAttributeValue(const wxString& attribute, long value); - void AddAttributeValue(const wxString& attribute, double value); - void AddAttributeValueWord(const wxString& attribute, const wxString& value); - void AddAttributeValueString(const wxString& attribute, const wxString& value); - void AddAttributeValue(const wxString& attribute, wxList *value); - void AddAttributeValue(const wxString& attribute, wxExpr *value); - void AddAttributeValueStringList(const wxString& attribute, wxList *string_list); - - void DeleteAttributeValue(const wxString& attribute); - - bool GetAttributeValue(const wxString& att, int& var) const; - bool GetAttributeValue(const wxString& att, long& var) const; - bool GetAttributeValue(const wxString& att, float& var) const; - bool GetAttributeValue(const wxString& att, double& var) const; - bool GetAttributeValue(const wxString& att, wxString& var) const; // Word OR string -> string - bool GetAttributeValue(const wxString& att, wxExpr **var) const; - - // Compatibility with old PrologIO - inline void AssignAttributeValue(char *att, int *var) const { GetAttributeValue(att, *var); } - inline void AssignAttributeValue(char *att, long *var) const { GetAttributeValue(att, *var); } - inline void AssignAttributeValue(char *att, float *var) const { GetAttributeValue(att, *var); } - inline void AssignAttributeValue(char *att, double *var) const { GetAttributeValue(att, *var); } - inline void AssignAttributeValue(char *att, wxExpr **var) const { GetAttributeValue(att, var); } - void AssignAttributeValue(char *att, char **var) const ; // Word OR string -> string - - // Add string items to list if the list attribute exists - bool GetAttributeValueStringList(const wxString& att, wxList *var) const; - - // Associate other data with this expression, e.g. when reading in a - // number of linked items - store C++ object pointer with the expression - // so we can index into the wxExpr database and fish out the pointer. - inline void SetClientData(wxObject *data) { client_data = data; } - inline wxObject *GetClientData(void) const { return client_data; } -}; - -class WXDLLEXPORT wxExprDatabase: public wxList -{ - DECLARE_DYNAMIC_CLASS(wxExprDatabase) - private: - wxNode *position; // Where we are in a search - wxHashTable *hash_table; - wxString attribute_to_hash; - public: - int noErrors; - - wxExprDatabase(wxExprErrorHandler handler = 0); - - // Use hashing on both the functor, and the attribute of - // specified type (wxExprString or wxExprInteger) and name. - // So to find node 45 - // (i.e. match the clause node(id=45, ...)) - // it usually requires 1 look-up: the keys for functor and attribute - // are added together. - // Obviously if the attribute was missing in a clause, it would - // fail to be found by this method, but could be retrieved by a - // linear search using BeginFind and FindClauseByFunctor, - // or just searching through the list as per usual. - - wxExprDatabase(wxExprType type, const wxString& attribute, int size = 500, - wxExprErrorHandler handler = 0); - - ~wxExprDatabase(void); - - void BeginFind(void) ; // Initialise a search - wxExpr *FindClause(long id) ; // Find a term based on an integer id attribute - // e.g. node(id=23, type=rectangle, ....). - - // Find on basis of attribute/value pairs, e.g. type=rectangle - // This doesn't use hashing; it's a linear search. - wxExpr *FindClause(const wxString& word, const wxString& value); - wxExpr *FindClause(const wxString& word, long value); - wxExpr *FindClause(const wxString& word, double value); - wxExpr *FindClauseByFunctor(const wxString& functor); - - wxExpr *HashFind(const wxString& functor, const wxString& value) const; - wxExpr *HashFind(const wxString& functor, long value) const; - - void Append(wxExpr *expr); // Does cleverer things if hashing is on - void ClearDatabase(void); - inline int GetErrorCount() const { return noErrors; } - bool Read(const wxString& filename); - bool ReadFromString(const wxString& buffer); - bool Write(const wxString& fileName); - bool Write(ostream& stream); - void WriteLisp(ostream& stream); - - // Compatibility - inline bool ReadProlog(char *filename) { return Read(wxString(filename)); } - inline bool ReadPrologFromString(char *buffer) { return ReadFromString(wxString(buffer)); } - inline void WriteProlog(ostream& stream) { Write(stream); } -}; - -// Function call-style interface - some more convenience wrappers/unwrappers - -// Make a call -wxExpr* WXDLLEXPORT wxExprMakeCall(const wxString& functor ...); - -#define wxExprMakeInteger(x) (new wxExpr((long)x)) -#define wxExprMakeReal(x) (new wxExpr((double)x)) -#define wxExprMakeString(x) (new wxExpr(wxExprString, x)) -#define wxExprMakeWord(x) (new wxExpr(wxExprWord, x)) -#define wxExprMake(x) (new wxExpr(x)) - -// Checks functor -bool WXDLLEXPORT wxExprIsFunctor(wxExpr *expr, const wxString& functor); - -// Temporary variable for communicating between wxexpr.cpp and YACC/LEX -WXDLLEXPORT_DATA(extern wxExprDatabase*) thewxExprDatabase; - -// YACC/LEX can leave memory lying around... -extern "C" int WXDLLEXPORT wxExprCleanUp(); - -#endif - diff --git a/include/wx/wxprec.h b/include/wx/wxprec.h deleted file mode 100644 index 9e12d8f875..0000000000 --- a/include/wx/wxprec.h +++ /dev/null @@ -1,61 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: wxprec.h -// Purpose: Includes the appropriate files for precompiled headers -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -// check if to use precompiled headers -#if (defined(__BORLANDC__) || defined(_MSC_VER) || defined(__WATCOMC__) || defined(__GNUWIN32__)) && defined(__WXMSW__) -#if !NOPCH -#define WX_PRECOMP -#endif -#endif - -// For some reason, this must be defined for common dialogs to work. -#ifdef __WATCOMC__ -#define INCLUDE_COMMDLG_H 1 -#endif - -// include the wx definitions -#ifdef WX_PRECOMP -#include "wx/wx.h" - -// Comment this out if you don't mind slower compilation of the wxWindows -// library -#include - -#ifdef GetClassInfo -#undef GetClassInfo -#endif - -#ifdef GetClassName -#undef GetClassName -#endif - -#ifdef DrawText -#undef DrawText -#endif - -#ifdef GetCharWidth -#undef GetCharWidth -#endif - -#ifdef StartDoc -#undef StartDoc -#endif - -#ifdef FindWindow -#undef FindWindow -#endif - -#ifdef FindResource -#undef FindResource -#endif - -#endif - diff --git a/include/wx/zstream.h b/include/wx/zstream.h deleted file mode 100644 index 6d68c5fc75..0000000000 --- a/include/wx/zstream.h +++ /dev/null @@ -1,59 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: zstream.h -// Purpose: Memory stream classes -// Author: Guilhem Lavaux -// Modified by: -// Created: 11/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Guilhem Lavaux -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// -#ifndef _WX_WXZSTREAM_H__ -#define _WX_WXZSTREAM_H__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include -#include "../zlib/zlib.h" - -class wxZlibInputStream: public wxFilterInputStream { - public: - wxZlibInputStream(wxInputStream& stream); - virtual ~wxZlibInputStream(); - - bool Eof() const; - - protected: - size_t DoRead(void *buffer, size_t size); - off_t DoSeekInput(off_t WXUNUSED(pos), wxSeekMode WXUNUSED(mode)) { return wxInvalidOffset; } - off_t DoTellInput() const { return wxInvalidOffset; } - - protected: - size_t m_z_size; - unsigned char *m_z_buffer; - struct z_stream_s m_inflate; -}; - -class wxZlibOutputStream: public wxFilterOutputStream { - public: - wxZlibOutputStream(wxOutputStream& stream); - virtual ~wxZlibOutputStream(); - - void Sync(); - - bool Bad() const; - - protected: - size_t DoWrite(const void *buffer, size_t size); - off_t DoSeekOutput(off_t WXUNUSED(pos), wxSeekMode WXUNUSED(mode)) { return wxInvalidOffset; } - off_t DoTellOutput() const { return wxInvalidOffset; } - - protected: - size_t m_z_size; - unsigned char *m_z_buffer; - struct z_stream_s m_deflate; -}; - -#endif diff --git a/install-sh b/install-sh deleted file mode 100755 index ebc66913e9..0000000000 --- a/install-sh +++ /dev/null @@ -1,250 +0,0 @@ -#! /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 diff --git a/install/unix/.cvsignore b/install/unix/.cvsignore deleted file mode 100644 index 33c4fd3c62..0000000000 --- a/install/unix/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -configure -config.cache -config.status -Linux.system.cache -linux-gnu.system.cache -system.list diff --git a/lib/.cvsignore b/lib/.cvsignore deleted file mode 100644 index 4daa84b813..0000000000 --- a/lib/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Linux -linux-gnu diff --git a/lib/dummy b/lib/dummy deleted file mode 100644 index bfdf726d49..0000000000 --- a/lib/dummy +++ /dev/null @@ -1 +0,0 @@ -I'm just here to force the creation of a LIB directory. diff --git a/misc/afm/Cour.afm b/misc/afm/Cour.afm deleted file mode 100644 index f54e284ba7..0000000000 --- a/misc/afm/Cour.afm +++ /dev/null @@ -1,341 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Wed Feb 25 16:01:10 PST 1987 -FontName Courier -EncodingScheme AdobeStandardEncoding -FullName Courier -FamilyName Courier -Weight Medium -ItalicAngle 0.0 -IsFixedPitch true -UnderlinePosition -82 -UnderlineThickness 40 -Version 001.003 -FontBBox -40 -290 640 795 -CapHeight 583 -XHeight 437 -Descender -207 -Ascender 624 -StartCharMetrics 260 -C 32 ; WX 600 ; N space ; B 560 -40 640 40 ; -C 33 ; WX 600 ; N exclam ; B 240 -5 360 639 ; -C 34 ; WX 600 ; N quotedbl ; B 126 314 474 603 ; -C 35 ; WX 600 ; N numbersign ; B 72 -82 528 665 ; -C 36 ; WX 600 ; N dollar ; B 93 -113 507 675 ; -C 37 ; WX 600 ; N percent ; B 67 -35 533 639 ; -C 38 ; WX 600 ; N ampersand ; B 85 -35 498 540 ; -C 39 ; WX 600 ; N quoteright ; B 135 304 340 613 ; -C 40 ; WX 600 ; N parenleft ; B 274 -144 478 623 ; -C 41 ; WX 600 ; N parenright ; B 127 -144 331 623 ; -C 42 ; WX 600 ; N asterisk ; B 93 210 507 624 ; -C 43 ; WX 600 ; N plus ; B 52 12 548 550 ; -C 44 ; WX 600 ; N comma ; B 135 -155 340 155 ; -C 45 ; WX 600 ; N hyphen ; B 52 241 548 321 ; -C 46 ; WX 600 ; N period ; B 250 10 350 90 ; -C 47 ; WX 600 ; N slash ; B 93 -103 507 686 ; -C 48 ; WX 600 ; N zero ; B 93 -35 507 639 ; -C 49 ; WX 600 ; N one ; B 93 -20 507 624 ; -C 50 ; WX 600 ; N two ; B 64 -20 498 639 ; -C 51 ; WX 600 ; N three ; B 76 -35 519 639 ; -C 52 ; WX 600 ; N four ; B 85 -20 498 624 ; -C 53 ; WX 600 ; N five ; B 76 -35 519 624 ; -C 54 ; WX 600 ; N six ; B 116 -35 530 639 ; -C 55 ; WX 600 ; N seven ; B 85 -20 498 624 ; -C 56 ; WX 600 ; N eight ; B 93 -35 507 639 ; -C 57 ; WX 600 ; N nine ; B 116 -35 530 639 ; -C 58 ; WX 600 ; N colon ; B 250 10 350 392 ; -C 59 ; WX 600 ; N semicolon ; B 139 -116 350 392 ; -C 60 ; WX 600 ; N less ; B 52 12 548 550 ; -C 61 ; WX 600 ; N equal ; B 31 168 569 394 ; -C 62 ; WX 600 ; N greater ; B 52 12 548 550 ; -C 63 ; WX 600 ; N question ; B 114 -5 507 598 ; -C 64 ; WX 600 ; N at ; B 85 -82 498 644 ; -C 65 ; WX 600 ; N A ; B -11 -20 611 583 ; -C 66 ; WX 600 ; N B ; B 23 -20 561 583 ; -C 67 ; WX 600 ; N C ; B 43 -35 554 598 ; -C 68 ; WX 600 ; N D ; B 23 -20 540 583 ; -C 69 ; WX 600 ; N E ; B 23 -20 540 583 ; -C 70 ; WX 600 ; N F ; B 23 -20 540 583 ; -C 71 ; WX 600 ; N G ; B 43 -35 582 598 ; -C 72 ; WX 600 ; N H ; B 33 -20 571 583 ; -C 73 ; WX 600 ; N I ; B 93 -20 507 583 ; -C 74 ; WX 600 ; N J ; B 64 -35 603 583 ; -C 75 ; WX 600 ; N K ; B 23 -20 592 583 ; -C 76 ; WX 600 ; N L ; B 43 -20 561 583 ; -C 77 ; WX 600 ; N M ; B -9 -20 613 583 ; -C 78 ; WX 600 ; N N ; B 2 -20 582 583 ; -C 79 ; WX 600 ; N O ; B 31 -35 569 598 ; -C 80 ; WX 600 ; N P ; B 23 -20 519 583 ; -C 81 ; WX 600 ; N Q ; B 31 -136 569 598 ; -C 82 ; WX 600 ; N R ; B 23 -20 609 583 ; -C 83 ; WX 600 ; N S ; B 72 -35 528 598 ; -C 84 ; WX 600 ; N T ; B 52 -20 548 583 ; -C 85 ; WX 600 ; N U ; B 20 -35 580 583 ; -C 86 ; WX 600 ; N V ; B -11 -20 611 583 ; -C 87 ; WX 600 ; N W ; B 0 -20 600 583 ; -C 88 ; WX 600 ; N X ; B 20 -20 580 583 ; -C 89 ; WX 600 ; N Y ; B 31 -20 569 583 ; -C 90 ; WX 600 ; N Z ; B 83 -20 517 583 ; -C 91 ; WX 600 ; N bracketleft ; B 260 -144 465 624 ; -C 92 ; WX 600 ; N backslash ; B 93 -103 507 686 ; -C 93 ; WX 600 ; N bracketright ; B 135 -144 340 624 ; -C 94 ; WX 600 ; N asciicircum ; B 93 335 507 624 ; -C 95 ; WX 600 ; N underscore ; B -32 -290 632 -210 ; -C 96 ; WX 600 ; N quoteleft ; B 260 304 465 613 ; -C 97 ; WX 600 ; N a ; B 52 -35 561 452 ; -C 98 ; WX 600 ; N b ; B 2 -35 561 624 ; -C 99 ; WX 600 ; N c ; B 64 -35 555 452 ; -C 100 ; WX 600 ; N d ; B 43 -35 603 624 ; -C 101 ; WX 600 ; N e ; B 43 -35 540 452 ; -C 102 ; WX 600 ; N f ; B 85 -20 561 624 ; L i fi ; L l fl ; -C 103 ; WX 600 ; N g ; B 43 -207 582 452 ; -C 104 ; WX 600 ; N h ; B 23 -20 571 624 ; -C 105 ; WX 600 ; N i ; B 72 -20 528 665 ; -C 106 ; WX 600 ; N j ; B 127 -207 478 665 ; -C 107 ; WX 600 ; N k ; B 43 -20 561 624 ; -C 108 ; WX 600 ; N l ; B 72 -20 528 624 ; -C 109 ; WX 600 ; N m ; B -9 -20 613 452 ; -C 110 ; WX 600 ; N n ; B 33 -20 561 452 ; -C 111 ; WX 600 ; N o ; B 52 -35 548 452 ; -C 112 ; WX 600 ; N p ; B 2 -207 561 452 ; -C 113 ; WX 600 ; N q ; B 43 -207 603 452 ; -C 114 ; WX 600 ; N r ; B 64 -20 561 448 ; -C 115 ; WX 600 ; N s ; B 83 -35 517 452 ; -C 116 ; WX 600 ; N t ; B 23 -35 519 582 ; -C 117 ; WX 600 ; N u ; B 23 -35 561 437 ; -C 118 ; WX 600 ; N v ; B 10 -20 590 437 ; -C 119 ; WX 600 ; N w ; B 10 -20 590 437 ; -C 120 ; WX 600 ; N x ; B 31 -20 569 437 ; -C 121 ; WX 600 ; N y ; B 31 -207 569 437 ; -C 122 ; WX 600 ; N z ; B 95 -20 509 437 ; -C 123 ; WX 600 ; N braceleft ; B 177 -144 423 624 ; -C 124 ; WX 600 ; N bar ; B 260 -144 340 624 ; -C 125 ; WX 600 ; N braceright ; B 177 -144 423 624 ; -C 126 ; WX 600 ; N asciitilde ; B 72 189 528 373 ; -C 161 ; WX 600 ; N exclamdown ; B 240 -207 360 415 ; -C 162 ; WX 600 ; N cent ; B 93 -19 489 665 ; -C 163 ; WX 600 ; N sterling ; B 43 -20 540 598 ; -C 164 ; WX 600 ; N fraction ; B 31 120 569 492 ; -C 165 ; WX 600 ; N yen ; B 31 -20 569 583 ; -C 166 ; WX 600 ; N florin ; B 67 -113 538 639 ; -C 167 ; WX 600 ; N section ; B 46 -87 554 629 ; -C 168 ; WX 600 ; N currency ; B 83 75 517 509 ; -C 169 ; WX 600 ; N quotesingle ; B 230 304 370 613 ; -C 170 ; WX 600 ; N quotedblleft ; B 93 340 507 619 ; -C 171 ; WX 600 ; N guillemotleft ; B 43 -20 561 437 ; -C 172 ; WX 600 ; N guilsinglleft ; B 43 -20 332 437 ; -C 173 ; WX 600 ; N guilsinglright ; B 273 -20 561 437 ; -C 174 ; WX 600 ; N fi ; B -10 -20 610 665 ; -C 175 ; WX 600 ; N fl ; B -10 -20 610 624 ; -C 177 ; WX 600 ; N endash ; B 52 241 548 321 ; -C 178 ; WX 600 ; N dagger ; B 104 -82 496 624 ; -C 179 ; WX 600 ; N daggerdbl ; B 104 -82 496 624 ; -C 180 ; WX 600 ; N periodcentered ; B 250 266 350 346 ; -C 182 ; WX 600 ; N paragraph ; B 59 -87 545 629 ; -C 183 ; WX 600 ; N bullet ; B 260 266 340 346 ; -C 184 ; WX 600 ; N quotesinglbase ; B 135 -165 340 144 ; -C 185 ; WX 600 ; N quotedblbase ; B 93 -139 507 139 ; -C 186 ; WX 600 ; N quotedblright ; B 93 340 507 619 ; -C 187 ; WX 600 ; N guillemotright ; B 43 -20 561 437 ; -C 188 ; WX 600 ; N ellipsis ; B 60 -5 540 75 ; -C 189 ; WX 600 ; N perthousand ; B 10 -35 590 639 ; -C 191 ; WX 600 ; N questiondown ; B 93 -207 486 415 ; -C 193 ; WX 600 ; N grave ; B 135 450 340 639 ; -C 194 ; WX 600 ; N acute ; B 260 450 465 639 ; -C 195 ; WX 600 ; N circumflex ; B 135 450 465 624 ; -C 196 ; WX 600 ; N tilde ; B 125 441 475 580 ; -C 197 ; WX 600 ; N macron ; B 135 476 465 556 ; -C 198 ; WX 600 ; N breve ; B 135 450 465 624 ; -C 199 ; WX 600 ; N dotaccent ; B 260 491 340 571 ; -C 200 ; WX 600 ; N dieresis ; B 156 491 444 571 ; -C 202 ; WX 600 ; N ring ; B 187 413 413 634 ; -C 203 ; WX 600 ; N cedilla ; B 190 -186 397 40 ; -C 205 ; WX 600 ; N hungarumlaut ; B 135 450 465 639 ; -C 206 ; WX 600 ; N ogonek ; B 260 -165 453 40 ; -C 207 ; WX 600 ; N caron ; B 135 450 465 624 ; -C 208 ; WX 600 ; N emdash ; B -19 241 619 321 ; -C 225 ; WX 600 ; N AE ; B -10 -20 610 583 ; -C 227 ; WX 600 ; N ordfeminine ; B 127 179 478 598 ; -C 232 ; WX 600 ; N Lslash ; B 23 -20 561 583 ; -C 233 ; WX 600 ; N Oslash ; B 20 -61 580 623 ; -C 234 ; WX 600 ; N OE ; B -10 -20 610 583 ; -C 235 ; WX 600 ; N ordmasculine ; B 131 179 469 598 ; -C 241 ; WX 600 ; N ae ; B -10 -35 600 452 ; -C 245 ; WX 600 ; N dotlessi ; B 72 -20 528 437 ; -C 248 ; WX 600 ; N lslash ; B 72 -20 528 624 ; -C 249 ; WX 600 ; N oslash ; B 33 -61 563 478 ; -C 250 ; WX 600 ; N oe ; B -10 -35 600 452 ; -C 251 ; WX 600 ; N germandbls ; B 23 -35 519 624 ; -C -1 ; WX 600 ; N Aacute ; B -11 -20 611 789 ; -C -1 ; WX 600 ; N Acircumflex ; B -11 -20 611 774 ; -C -1 ; WX 600 ; N Adieresis ; B -11 -20 611 721 ; -C -1 ; WX 600 ; N Agrave ; B -11 -20 611 789 ; -C -1 ; WX 600 ; N Aring ; B -11 -20 611 795 ; -C -1 ; WX 600 ; N Atilde ; B -11 -20 611 730 ; -C -1 ; WX 600 ; N Ccedilla ; B 43 -186 554 598 ; -C -1 ; WX 600 ; N Eacute ; B 23 -20 540 789 ; -C -1 ; WX 600 ; N Ecircumflex ; B 23 -20 540 774 ; -C -1 ; WX 600 ; N Edieresis ; B 23 -20 540 721 ; -C -1 ; WX 600 ; N Egrave ; B 23 -20 540 789 ; -C -1 ; WX 600 ; N Eth ; B 23 -20 540 583 ; -C -1 ; WX 600 ; N Gcaron ; B 43 -35 582 774 ; -C -1 ; WX 600 ; N IJ ; B -10 -35 610 583 ; -C -1 ; WX 600 ; N Iacute ; B 93 -20 507 789 ; -C -1 ; WX 600 ; N Icircumflex ; B 93 -20 507 774 ; -C -1 ; WX 600 ; N Idieresis ; B 93 -20 507 721 ; -C -1 ; WX 600 ; N Idot ; B 93 -20 507 721 ; -C -1 ; WX 600 ; N Igrave ; B 93 -20 507 789 ; -C -1 ; WX 600 ; N LL ; B -20 -20 620 583 ; -C -1 ; WX 600 ; N Ntilde ; B 2 -20 582 730 ; -C -1 ; WX 600 ; N Oacute ; B 31 -35 569 789 ; -C -1 ; WX 600 ; N Ocircumflex ; B 31 -35 569 774 ; -C -1 ; WX 600 ; N Odieresis ; B 31 -35 569 721 ; -C -1 ; WX 600 ; N Ograve ; B 31 -35 569 789 ; -C -1 ; WX 600 ; N Otilde ; B 31 -35 569 730 ; -C -1 ; WX 600 ; N Scaron ; B 72 -35 528 774 ; -C -1 ; WX 600 ; N Scedilla ; B 72 -186 528 598 ; -C -1 ; WX 600 ; N Thorn ; B 23 -20 539 583 ; -C -1 ; WX 600 ; N Uacute ; B 20 -35 580 789 ; -C -1 ; WX 600 ; N Ucircumflex ; B 20 -35 580 774 ; -C -1 ; WX 600 ; N Udieresis ; B 20 -35 580 721 ; -C -1 ; WX 600 ; N Ugrave ; B 20 -35 580 789 ; -C -1 ; WX 600 ; N Yacute ; B 31 -20 569 789 ; -C -1 ; WX 600 ; N Ydieresis ; B 31 -20 569 721 ; -C -1 ; WX 600 ; N Zcaron ; B 83 -20 517 774 ; -C -1 ; WX 600 ; N aacute ; B 52 -35 561 660 ; -C -1 ; WX 600 ; N acircumflex ; B 52 -35 561 653 ; -C -1 ; WX 600 ; N adieresis ; B 52 -35 561 592 ; -C -1 ; WX 600 ; N agrave ; B 52 -35 561 660 ; -C -1 ; WX 600 ; N aring ; B 52 -35 561 686 ; -C -1 ; WX 600 ; N arrowboth ; B -40 110 640 490 ; -C -1 ; WX 600 ; N arrowdown ; B 110 -20 490 639 ; -C -1 ; WX 600 ; N arrowleft ; B -40 110 640 490 ; -C -1 ; WX 600 ; N arrowright ; B -40 110 640 490 ; -C -1 ; WX 600 ; N arrowup ; B 110 -20 490 639 ; -C -1 ; WX 600 ; N atilde ; B 52 -35 561 618 ; -C -1 ; WX 600 ; N brokenbar ; B 260 -144 340 624 ; -C -1 ; WX 600 ; N ccedilla ; B 64 -186 555 452 ; -C -1 ; WX 600 ; N center ; B 0 -20 600 624 ; -C -1 ; WX 600 ; N copyright ; B -20 -35 620 598 ; -C -1 ; WX 600 ; N dectab ; B -5 -20 605 248 ; -C -1 ; WX 600 ; N degree ; B 135 294 465 624 ; -C -1 ; WX 600 ; N divide ; B 52 51 548 531 ; -C -1 ; WX 600 ; N down ; B 154 -20 446 452 ; -C -1 ; WX 600 ; N eacute ; B 43 -35 540 664 ; -C -1 ; WX 600 ; N ecircumflex ; B 43 -35 540 653 ; -C -1 ; WX 600 ; N edieresis ; B 43 -35 540 592 ; -C -1 ; WX 600 ; N egrave ; B 43 -35 540 664 ; -C -1 ; WX 600 ; N eth ; B 52 -35 548 639 ; -C -1 ; WX 600 ; N format ; B -15 -207 65 624 ; -C -1 ; WX 600 ; N gcaron ; B 43 -207 582 645 ; -C -1 ; WX 600 ; N graybox ; B 35 -40 565 640 ; -C -1 ; WX 600 ; N iacute ; B 72 -20 528 660 ; -C -1 ; WX 600 ; N icircumflex ; B 72 -20 528 634 ; -C -1 ; WX 600 ; N idieresis ; B 72 -20 528 592 ; -C -1 ; WX 600 ; N igrave ; B 72 -20 528 656 ; -C -1 ; WX 600 ; N ij ; B 10 -207 550 665 ; -C -1 ; WX 600 ; N indent ; B 54 60 546 352 ; -C -1 ; WX 600 ; N largebullet ; B 260 266 340 346 ; -C -1 ; WX 600 ; N left ; B 54 60 546 352 ; -C -1 ; WX 600 ; N lira ; B 43 -20 540 598 ; -C -1 ; WX 600 ; N ll ; B 0 -20 600 624 ; -C -1 ; WX 600 ; N logicalnot ; B 52 154 548 394 ; -C -1 ; WX 600 ; N merge ; B 154 -20 446 452 ; -C -1 ; WX 600 ; N minus ; B 52 241 548 321 ; -C -1 ; WX 600 ; N mu ; B 23 -207 561 437 ; -C -1 ; WX 600 ; N multiply ; B 82 12 518 470 ; -C -1 ; WX 600 ; N notegraphic ; B 150 -5 450 639 ; -C -1 ; WX 600 ; N ntilde ; B 33 -20 561 618 ; -C -1 ; WX 600 ; N oacute ; B 52 -35 548 649 ; -C -1 ; WX 600 ; N ocircumflex ; B 52 -35 548 653 ; -C -1 ; WX 600 ; N odieresis ; B 52 -35 548 592 ; -C -1 ; WX 600 ; N ograve ; B 52 -35 548 649 ; -C -1 ; WX 600 ; N onehalf ; B -10 -20 610 624 ; -C -1 ; WX 600 ; N onequarter ; B -10 -20 610 624 ; -C -1 ; WX 600 ; N onesuperior ; B 160 200 440 624 ; -C -1 ; WX 600 ; N otilde ; B 52 -35 548 597 ; -C -1 ; WX 600 ; N overscore ; B -32 559 632 639 ; -C -1 ; WX 600 ; N plusminus ; B 52 -20 548 550 ; -C -1 ; WX 600 ; N prescription ; B 23 -20 609 583 ; -C -1 ; WX 600 ; N registered ; B -20 -35 620 598 ; -C -1 ; WX 600 ; N return ; B -24 -20 624 608 ; -C -1 ; WX 600 ; N scaron ; B 83 -35 517 645 ; -C -1 ; WX 600 ; N scedilla ; B 83 -186 517 452 ; -C -1 ; WX 600 ; N square ; B -24 -20 624 608 ; -C -1 ; WX 600 ; N stop ; B -24 -20 624 608 ; -C -1 ; WX 600 ; N tab ; B -24 -20 624 608 ; -C -1 ; WX 600 ; N thorn ; B 2 -207 561 624 ; -C -1 ; WX 600 ; N threequarters ; B -10 -20 610 639 ; -C -1 ; WX 600 ; N threesuperior ; B 155 191 452 639 ; -C -1 ; WX 600 ; N trademark ; B -20 230 620 583 ; -C -1 ; WX 600 ; N twosuperior ; B 140 200 431 639 ; -C -1 ; WX 600 ; N uacute ; B 23 -35 561 656 ; -C -1 ; WX 600 ; N ucircumflex ; B 23 -35 561 634 ; -C -1 ; WX 600 ; N udieresis ; B 23 -35 561 592 ; -C -1 ; WX 600 ; N ugrave ; B 23 -35 561 656 ; -C -1 ; WX 600 ; N up ; B 154 -20 446 452 ; -C -1 ; WX 600 ; N yacute ; B 31 -207 569 656 ; -C -1 ; WX 600 ; N ydieresis ; B 31 -207 569 571 ; -C -1 ; WX 600 ; N zcaron ; B 95 -20 509 645 ; -EndCharMetrics -StartComposites 58 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 0 146 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 0 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 0 146 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 0 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 0 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 0 0 ; -CC Yacute 2 ; PCC Y 0 0 ; PCC acute 0 146 ; -CC yacute 2 ; PCC y 0 0 ; PCC acute 0 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 0 146 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 0 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 0 146 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 0 146 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 0 146 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 0 146 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 0 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 0 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 0 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 0 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 146 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 0 146 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 0 146 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 146 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex 0 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis 0 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 0 146 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 0 146 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 0 146 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 0 146 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 0 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 0 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 0 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 0 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 0 146 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 0 146 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 0 146 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 0 146 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 0 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 0 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 0 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 0 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 0 146 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 0 146 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 0 146 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 0 146 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 0 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 0 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 0 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 0 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 0 146 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 0 146 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 0 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 0 146 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 0 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 0 146 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ; -EndComposites -EndFontMetrics diff --git a/misc/afm/CourBo.afm b/misc/afm/CourBo.afm deleted file mode 100644 index 5a2fbdc071..0000000000 --- a/misc/afm/CourBo.afm +++ /dev/null @@ -1,341 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Wed Feb 25 16:06:47 PST 1987 -FontName Courier-Bold -EncodingScheme AdobeStandardEncoding -FullName Courier Bold -FamilyName Courier -Weight Bold -ItalicAngle 0.0 -IsFixedPitch true -UnderlinePosition -85 -UnderlineThickness 100 -Version 001.003 -FontBBox -100 -350 700 855 -CapHeight 633 -XHeight 487 -Descender -257 -Ascender 674 -StartCharMetrics 260 -C 32 ; WX 600 ; N space ; B 500 -100 700 100 ; -C 33 ; WX 600 ; N exclam ; B 170 -65 430 689 ; -C 34 ; WX 600 ; N quotedbl ; B 66 254 534 663 ; -C 35 ; WX 600 ; N numbersign ; B 12 -142 588 725 ; -C 36 ; WX 600 ; N dollar ; B 33 -173 567 735 ; -C 37 ; WX 600 ; N percent ; B 7 -65 593 689 ; -C 38 ; WX 600 ; N ampersand ; B 25 -65 558 600 ; -C 39 ; WX 600 ; N quoteright ; B 75 244 400 674 ; -C 40 ; WX 600 ; N parenleft ; B 214 -204 538 683 ; -C 41 ; WX 600 ; N parenright ; B 67 -204 391 683 ; -C 42 ; WX 600 ; N asterisk ; B 33 150 567 674 ; -C 43 ; WX 600 ; N plus ; B -8 -48 608 610 ; -C 44 ; WX 600 ; N comma ; B 75 -215 400 215 ; -C 45 ; WX 600 ; N hyphen ; B -8 181 608 381 ; -C 46 ; WX 600 ; N period ; B 190 -50 410 150 ; -C 47 ; WX 600 ; N slash ; B 33 -163 567 746 ; -C 48 ; WX 600 ; N zero ; B 33 -65 567 689 ; -C 49 ; WX 600 ; N one ; B 33 -50 567 674 ; -C 50 ; WX 600 ; N two ; B 4 -50 558 689 ; -C 51 ; WX 600 ; N three ; B 16 -65 579 689 ; -C 52 ; WX 600 ; N four ; B 25 -50 558 674 ; -C 53 ; WX 600 ; N five ; B 16 -65 579 674 ; -C 54 ; WX 600 ; N six ; B 56 -65 590 689 ; -C 55 ; WX 600 ; N seven ; B 25 -50 558 674 ; -C 56 ; WX 600 ; N eight ; B 33 -65 567 689 ; -C 57 ; WX 600 ; N nine ; B 56 -65 590 689 ; -C 58 ; WX 600 ; N colon ; B 190 -50 410 472 ; -C 59 ; WX 600 ; N semicolon ; B 79 -176 410 472 ; -C 60 ; WX 600 ; N less ; B -8 -48 608 610 ; -C 61 ; WX 600 ; N equal ; B -29 88 629 474 ; -C 62 ; WX 600 ; N greater ; B -8 -48 608 610 ; -C 63 ; WX 600 ; N question ; B 54 -65 567 648 ; -C 64 ; WX 600 ; N at ; B 26 -142 559 705 ; -C 65 ; WX 600 ; N A ; B -71 -50 671 633 ; -C 66 ; WX 600 ; N B ; B -37 -50 621 633 ; -C 67 ; WX 600 ; N C ; B -17 -65 614 648 ; -C 68 ; WX 600 ; N D ; B -37 -50 600 633 ; -C 69 ; WX 600 ; N E ; B -37 -50 600 633 ; -C 70 ; WX 600 ; N F ; B -37 -50 600 633 ; -C 71 ; WX 600 ; N G ; B -17 -65 642 648 ; -C 72 ; WX 600 ; N H ; B -27 -50 631 633 ; -C 73 ; WX 600 ; N I ; B 33 -50 567 633 ; -C 74 ; WX 600 ; N J ; B 4 -65 663 633 ; -C 75 ; WX 600 ; N K ; B -37 -50 652 633 ; -C 76 ; WX 600 ; N L ; B -17 -50 621 633 ; -C 77 ; WX 600 ; N M ; B -69 -50 673 633 ; -C 78 ; WX 600 ; N N ; B -58 -50 642 633 ; -C 79 ; WX 600 ; N O ; B -29 -65 629 648 ; -C 80 ; WX 600 ; N P ; B -37 -50 579 633 ; -C 81 ; WX 600 ; N Q ; B -29 -196 629 648 ; -C 82 ; WX 600 ; N R ; B -37 -50 669 633 ; -C 83 ; WX 600 ; N S ; B 12 -65 588 648 ; -C 84 ; WX 600 ; N T ; B -8 -50 608 633 ; -C 85 ; WX 600 ; N U ; B -40 -65 640 633 ; -C 86 ; WX 600 ; N V ; B -71 -50 671 633 ; -C 87 ; WX 600 ; N W ; B -60 -50 660 633 ; -C 88 ; WX 600 ; N X ; B -40 -50 640 633 ; -C 89 ; WX 600 ; N Y ; B -29 -50 629 633 ; -C 90 ; WX 600 ; N Z ; B 23 -50 577 633 ; -C 91 ; WX 600 ; N bracketleft ; B 200 -204 525 674 ; -C 92 ; WX 600 ; N backslash ; B 33 -163 567 746 ; -C 93 ; WX 600 ; N bracketright ; B 75 -204 400 674 ; -C 94 ; WX 600 ; N asciicircum ; B 33 275 567 674 ; -C 95 ; WX 600 ; N underscore ; B -92 -350 692 -150 ; -C 96 ; WX 600 ; N quoteleft ; B 200 244 525 674 ; -C 97 ; WX 600 ; N a ; B -8 -65 621 502 ; -C 98 ; WX 600 ; N b ; B -58 -65 621 674 ; -C 99 ; WX 600 ; N c ; B 4 -65 615 502 ; -C 100 ; WX 600 ; N d ; B -17 -65 663 674 ; -C 101 ; WX 600 ; N e ; B -17 -65 600 502 ; -C 102 ; WX 600 ; N f ; B 25 -50 621 674 ; L i fi ; L l fl ; -C 103 ; WX 600 ; N g ; B -17 -257 642 502 ; -C 104 ; WX 600 ; N h ; B -37 -50 631 674 ; -C 105 ; WX 600 ; N i ; B 12 -50 588 725 ; -C 106 ; WX 600 ; N j ; B 67 -257 538 725 ; -C 107 ; WX 600 ; N k ; B -17 -50 621 674 ; -C 108 ; WX 600 ; N l ; B 12 -50 588 674 ; -C 109 ; WX 600 ; N m ; B -69 -50 673 502 ; -C 110 ; WX 600 ; N n ; B -27 -50 621 502 ; -C 111 ; WX 600 ; N o ; B -8 -65 608 502 ; -C 112 ; WX 600 ; N p ; B -58 -257 621 502 ; -C 113 ; WX 600 ; N q ; B -17 -257 663 502 ; -C 114 ; WX 600 ; N r ; B 4 -50 621 501 ; -C 115 ; WX 600 ; N s ; B 23 -65 577 502 ; -C 116 ; WX 600 ; N t ; B -37 -65 579 642 ; -C 117 ; WX 600 ; N u ; B -37 -65 621 487 ; -C 118 ; WX 600 ; N v ; B -50 -50 650 487 ; -C 119 ; WX 600 ; N w ; B -50 -50 650 487 ; -C 120 ; WX 600 ; N x ; B -29 -50 629 487 ; -C 121 ; WX 600 ; N y ; B -29 -257 629 487 ; -C 122 ; WX 600 ; N z ; B 35 -50 569 487 ; -C 123 ; WX 600 ; N braceleft ; B 117 -204 483 674 ; -C 124 ; WX 600 ; N bar ; B 200 -204 400 674 ; -C 125 ; WX 600 ; N braceright ; B 117 -204 483 674 ; -C 126 ; WX 600 ; N asciitilde ; B 12 129 588 433 ; -C 161 ; WX 600 ; N exclamdown ; B 170 -257 430 475 ; -C 162 ; WX 600 ; N cent ; B 33 -79 549 725 ; -C 163 ; WX 600 ; N sterling ; B -17 -50 600 648 ; -C 164 ; WX 600 ; N fraction ; B -29 60 629 552 ; -C 165 ; WX 600 ; N yen ; B -29 -50 629 633 ; -C 166 ; WX 600 ; N florin ; B 7 -173 598 689 ; -C 167 ; WX 600 ; N section ; B -14 -147 614 689 ; -C 168 ; WX 600 ; N currency ; B 23 15 577 569 ; -C 169 ; WX 600 ; N quotesingle ; B 170 244 430 674 ; -C 170 ; WX 600 ; N quotedblleft ; B 33 280 567 678 ; -C 171 ; WX 600 ; N guillemotleft ; B -17 -50 621 487 ; -C 172 ; WX 600 ; N guilsinglleft ; B -17 -50 392 487 ; -C 173 ; WX 600 ; N guilsinglright ; B 213 -50 621 487 ; -C 174 ; WX 600 ; N fi ; B -70 -50 670 725 ; -C 175 ; WX 600 ; N fl ; B -70 -50 670 674 ; -C 177 ; WX 600 ; N endash ; B -8 181 608 381 ; -C 178 ; WX 600 ; N dagger ; B 44 -142 556 674 ; -C 179 ; WX 600 ; N daggerdbl ; B 44 -142 556 674 ; -C 180 ; WX 600 ; N periodcentered ; B 190 206 410 406 ; -C 182 ; WX 600 ; N paragraph ; B -1 -147 605 689 ; -C 183 ; WX 600 ; N bullet ; B 200 206 400 406 ; -C 184 ; WX 600 ; N quotesinglbase ; B 75 -225 400 204 ; -C 185 ; WX 600 ; N quotedblbase ; B 33 -199 567 199 ; -C 186 ; WX 600 ; N quotedblright ; B 33 280 567 678 ; -C 187 ; WX 600 ; N guillemotright ; B -17 -50 621 487 ; -C 188 ; WX 600 ; N ellipsis ; B 0 -65 600 135 ; -C 189 ; WX 600 ; N perthousand ; B -50 -65 650 689 ; -C 191 ; WX 600 ; N questiondown ; B 33 -257 546 475 ; -C 193 ; WX 600 ; N grave ; B 75 390 400 689 ; -C 194 ; WX 600 ; N acute ; B 200 390 525 689 ; -C 195 ; WX 600 ; N circumflex ; B 75 390 525 674 ; -C 196 ; WX 600 ; N tilde ; B 65 381 535 640 ; -C 197 ; WX 600 ; N macron ; B 75 416 525 616 ; -C 198 ; WX 600 ; N breve ; B 75 390 525 674 ; -C 199 ; WX 600 ; N dotaccent ; B 200 431 400 631 ; -C 200 ; WX 600 ; N dieresis ; B 96 431 504 631 ; -C 202 ; WX 600 ; N ring ; B 127 353 473 694 ; -C 203 ; WX 600 ; N cedilla ; B 130 -246 457 100 ; -C 205 ; WX 600 ; N hungarumlaut ; B 75 390 525 689 ; -C 206 ; WX 600 ; N ogonek ; B 200 -225 513 100 ; -C 207 ; WX 600 ; N caron ; B 75 390 525 674 ; -C 208 ; WX 600 ; N emdash ; B -79 181 679 381 ; -C 225 ; WX 600 ; N AE ; B -70 -50 670 633 ; -C 227 ; WX 600 ; N ordfeminine ; B 68 120 539 649 ; -C 232 ; WX 600 ; N Lslash ; B -37 -50 621 633 ; -C 233 ; WX 600 ; N Oslash ; B -40 -121 640 683 ; -C 234 ; WX 600 ; N OE ; B -70 -50 670 633 ; -C 235 ; WX 600 ; N ordmasculine ; B 72 120 530 649 ; -C 241 ; WX 600 ; N ae ; B -70 -65 660 502 ; -C 245 ; WX 600 ; N dotlessi ; B 12 -50 588 487 ; -C 248 ; WX 600 ; N lslash ; B 12 -50 588 674 ; -C 249 ; WX 600 ; N oslash ; B -27 -121 623 538 ; -C 250 ; WX 600 ; N oe ; B -70 -65 660 502 ; -C 251 ; WX 600 ; N germandbls ; B -37 -65 579 674 ; -C -1 ; WX 600 ; N Aacute ; B -71 -50 671 839 ; -C -1 ; WX 600 ; N Acircumflex ; B -71 -50 671 824 ; -C -1 ; WX 600 ; N Adieresis ; B -71 -50 671 781 ; -C -1 ; WX 600 ; N Agrave ; B -71 -50 671 839 ; -C -1 ; WX 600 ; N Aring ; B -71 -50 671 855 ; -C -1 ; WX 600 ; N Atilde ; B -71 -50 671 790 ; -C -1 ; WX 600 ; N Ccedilla ; B -17 -246 614 648 ; -C -1 ; WX 600 ; N Eacute ; B -37 -50 600 839 ; -C -1 ; WX 600 ; N Ecircumflex ; B -37 -50 600 824 ; -C -1 ; WX 600 ; N Edieresis ; B -37 -50 600 781 ; -C -1 ; WX 600 ; N Egrave ; B -37 -50 600 839 ; -C -1 ; WX 600 ; N Eth ; B -37 -50 600 633 ; -C -1 ; WX 600 ; N Gcaron ; B -17 -65 642 824 ; -C -1 ; WX 600 ; N IJ ; B -70 -65 670 633 ; -C -1 ; WX 600 ; N Iacute ; B 33 -50 567 839 ; -C -1 ; WX 600 ; N Icircumflex ; B 33 -50 567 824 ; -C -1 ; WX 600 ; N Idieresis ; B 33 -50 567 781 ; -C -1 ; WX 600 ; N Idot ; B 33 -50 567 781 ; -C -1 ; WX 600 ; N Igrave ; B 33 -50 567 839 ; -C -1 ; WX 600 ; N LL ; B -80 -50 680 633 ; -C -1 ; WX 600 ; N Ntilde ; B -58 -50 642 790 ; -C -1 ; WX 600 ; N Oacute ; B -29 -65 629 839 ; -C -1 ; WX 600 ; N Ocircumflex ; B -29 -65 629 824 ; -C -1 ; WX 600 ; N Odieresis ; B -29 -65 629 781 ; -C -1 ; WX 600 ; N Ograve ; B -29 -65 629 839 ; -C -1 ; WX 600 ; N Otilde ; B -29 -65 629 790 ; -C -1 ; WX 600 ; N Scaron ; B 12 -65 588 824 ; -C -1 ; WX 600 ; N Scedilla ; B 12 -246 588 648 ; -C -1 ; WX 600 ; N Thorn ; B -37 -50 599 633 ; -C -1 ; WX 600 ; N Uacute ; B -40 -65 640 839 ; -C -1 ; WX 600 ; N Ucircumflex ; B -40 -65 640 824 ; -C -1 ; WX 600 ; N Udieresis ; B -40 -65 640 781 ; -C -1 ; WX 600 ; N Ugrave ; B -40 -65 640 839 ; -C -1 ; WX 600 ; N Yacute ; B -29 -50 629 839 ; -C -1 ; WX 600 ; N Ydieresis ; B -29 -50 629 781 ; -C -1 ; WX 600 ; N Zcaron ; B 23 -50 577 824 ; -C -1 ; WX 600 ; N aacute ; B -8 -65 621 710 ; -C -1 ; WX 600 ; N acircumflex ; B -8 -65 621 703 ; -C -1 ; WX 600 ; N adieresis ; B -8 -65 621 652 ; -C -1 ; WX 600 ; N agrave ; B -8 -65 621 710 ; -C -1 ; WX 600 ; N aring ; B -8 -65 621 746 ; -C -1 ; WX 600 ; N arrowboth ; B -100 50 700 550 ; -C -1 ; WX 600 ; N arrowdown ; B 50 -50 550 689 ; -C -1 ; WX 600 ; N arrowleft ; B -100 50 700 550 ; -C -1 ; WX 600 ; N arrowright ; B -100 50 700 550 ; -C -1 ; WX 600 ; N arrowup ; B 50 -50 550 689 ; -C -1 ; WX 600 ; N atilde ; B -8 -65 621 678 ; -C -1 ; WX 600 ; N brokenbar ; B 200 -204 400 674 ; -C -1 ; WX 600 ; N ccedilla ; B 4 -246 615 502 ; -C -1 ; WX 600 ; N center ; B -60 -50 660 684 ; -C -1 ; WX 600 ; N copyright ; B -80 -65 680 648 ; -C -1 ; WX 600 ; N dectab ; B -65 -50 665 308 ; -C -1 ; WX 600 ; N degree ; B 75 234 525 674 ; -C -1 ; WX 600 ; N divide ; B -8 -9 608 591 ; -C -1 ; WX 600 ; N down ; B 94 -50 506 502 ; -C -1 ; WX 600 ; N eacute ; B -17 -65 600 714 ; -C -1 ; WX 600 ; N ecircumflex ; B -17 -65 600 703 ; -C -1 ; WX 600 ; N edieresis ; B -17 -65 600 652 ; -C -1 ; WX 600 ; N egrave ; B -17 -65 600 714 ; -C -1 ; WX 600 ; N eth ; B -8 -65 608 689 ; -C -1 ; WX 600 ; N format ; B -75 -257 125 674 ; -C -1 ; WX 600 ; N gcaron ; B -17 -257 642 695 ; -C -1 ; WX 600 ; N graybox ; B -25 -100 625 700 ; -C -1 ; WX 600 ; N iacute ; B 12 -50 588 710 ; -C -1 ; WX 600 ; N icircumflex ; B 12 -50 588 684 ; -C -1 ; WX 600 ; N idieresis ; B 12 -50 588 652 ; -C -1 ; WX 600 ; N igrave ; B 12 -50 588 706 ; -C -1 ; WX 600 ; N ij ; B -50 -257 610 725 ; -C -1 ; WX 600 ; N indent ; B -6 0 606 412 ; -C -1 ; WX 600 ; N largebullet ; B 200 206 400 406 ; -C -1 ; WX 600 ; N left ; B -6 0 606 412 ; -C -1 ; WX 600 ; N lira ; B -17 -50 600 648 ; -C -1 ; WX 600 ; N ll ; B -60 -50 660 674 ; -C -1 ; WX 600 ; N logicalnot ; B -8 94 608 454 ; -C -1 ; WX 600 ; N merge ; B 94 -50 506 502 ; -C -1 ; WX 600 ; N minus ; B -8 181 608 381 ; -C -1 ; WX 600 ; N mu ; B -37 -257 621 487 ; -C -1 ; WX 600 ; N multiply ; B 22 -48 578 530 ; -C -1 ; WX 600 ; N notegraphic ; B 80 -65 520 689 ; -C -1 ; WX 600 ; N ntilde ; B -27 -50 621 678 ; -C -1 ; WX 600 ; N oacute ; B -8 -65 608 699 ; -C -1 ; WX 600 ; N ocircumflex ; B -8 -65 608 703 ; -C -1 ; WX 600 ; N odieresis ; B -8 -65 608 652 ; -C -1 ; WX 600 ; N ograve ; B -8 -65 608 699 ; -C -1 ; WX 600 ; N onehalf ; B -70 -65 670 674 ; -C -1 ; WX 600 ; N onequarter ; B -70 -50 670 674 ; -C -1 ; WX 600 ; N onesuperior ; B 100 140 500 674 ; -C -1 ; WX 600 ; N otilde ; B -8 -65 608 657 ; -C -1 ; WX 600 ; N overscore ; B -92 489 692 689 ; -C -1 ; WX 600 ; N plusminus ; B -8 -50 608 610 ; -C -1 ; WX 600 ; N prescription ; B -37 -50 669 633 ; -C -1 ; WX 600 ; N registered ; B -80 -65 680 648 ; -C -1 ; WX 600 ; N return ; B -84 -50 684 668 ; -C -1 ; WX 600 ; N scaron ; B 23 -65 577 695 ; -C -1 ; WX 600 ; N scedilla ; B 23 -246 577 502 ; -C -1 ; WX 600 ; N square ; B -84 -50 684 668 ; -C -1 ; WX 600 ; N stop ; B -84 -50 684 668 ; -C -1 ; WX 600 ; N tab ; B -84 -50 684 668 ; -C -1 ; WX 600 ; N thorn ; B -58 -257 621 674 ; -C -1 ; WX 600 ; N threequarters ; B -70 -50 670 689 ; -C -1 ; WX 600 ; N threesuperior ; B 95 131 512 689 ; -C -1 ; WX 600 ; N trademark ; B -80 170 680 633 ; -C -1 ; WX 600 ; N twosuperior ; B 80 140 491 689 ; -C -1 ; WX 600 ; N uacute ; B -37 -65 621 706 ; -C -1 ; WX 600 ; N ucircumflex ; B -37 -65 621 684 ; -C -1 ; WX 600 ; N udieresis ; B -37 -65 621 652 ; -C -1 ; WX 600 ; N ugrave ; B -37 -65 621 706 ; -C -1 ; WX 600 ; N up ; B 94 -50 506 502 ; -C -1 ; WX 600 ; N yacute ; B -29 -257 629 706 ; -C -1 ; WX 600 ; N ydieresis ; B -29 -257 629 631 ; -C -1 ; WX 600 ; N zcaron ; B 35 -50 569 695 ; -EndCharMetrics -StartComposites 58 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 0 146 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 0 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 0 146 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 0 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 0 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 0 0 ; -CC Yacute 2 ; PCC Y 0 0 ; PCC acute 0 146 ; -CC yacute 2 ; PCC y 0 0 ; PCC acute 0 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 0 146 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 0 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 0 146 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 0 146 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 0 146 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 0 146 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 0 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 0 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 0 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 0 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 146 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 0 146 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 0 146 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 146 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex 0 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis 0 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 0 146 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 0 146 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 0 146 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 0 146 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 0 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 0 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 0 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 0 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 0 146 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 0 146 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 0 146 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 0 146 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 0 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 0 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 0 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 0 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 0 146 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 0 146 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 0 146 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 0 146 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 0 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 0 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 0 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 0 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 0 146 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 0 146 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 0 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 0 146 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 0 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 0 146 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ; -EndComposites -EndFontMetrics diff --git a/misc/afm/CourBoO.afm b/misc/afm/CourBoO.afm deleted file mode 100644 index 603eab5278..0000000000 --- a/misc/afm/CourBoO.afm +++ /dev/null @@ -1,341 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Wed Feb 25 16:19:52 PST 1987 -FontName Courier-BoldOblique -EncodingScheme AdobeStandardEncoding -FullName Courier Bold Oblique -FamilyName Courier -Weight Bold -ItalicAngle -12.0 -IsFixedPitch true -UnderlinePosition -85 -UnderlineThickness 100 -Version 001.003 -FontBBox -145 -350 817 855 -CapHeight 633 -XHeight 487 -Descender -257 -Ascender 674 -StartCharMetrics 260 -C 32 ; WX 600 ; N space ; B 500 -100 700 100 ; -C 33 ; WX 600 ; N exclam ; B 197 -65 549 689 ; -C 34 ; WX 600 ; N quotedbl ; B 171 254 654 663 ; -C 35 ; WX 600 ; N numbersign ; B 52 -142 672 725 ; -C 36 ; WX 600 ; N dollar ; B 51 -173 659 735 ; -C 37 ; WX 600 ; N percent ; B 58 -65 671 689 ; -C 38 ; WX 600 ; N ampersand ; B 52 -65 607 600 ; -C 39 ; WX 600 ; N quoteright ; B 148 244 522 674 ; -C 40 ; WX 600 ; N parenleft ; B 255 -204 662 683 ; -C 41 ; WX 600 ; N parenright ; B 45 -204 452 683 ; -C 42 ; WX 600 ; N asterisk ; B 131 150 665 674 ; -C 43 ; WX 600 ; N plus ; B 52 -48 668 610 ; -C 44 ; WX 600 ; N comma ; B 51 -215 424 215 ; -C 45 ; WX 600 ; N hyphen ; B 52 181 668 381 ; -C 46 ; WX 600 ; N period ; B 201 -50 421 150 ; -C 47 ; WX 600 ; N slash ; B 20 -163 704 746 ; -C 48 ; WX 600 ; N zero ; B 82 -65 649 689 ; -C 49 ; WX 600 ; N one ; B 44 -50 578 674 ; -C 50 ; WX 600 ; N two ; B 15 -50 656 689 ; -C 51 ; WX 600 ; N three ; B 30 -65 659 689 ; -C 52 ; WX 600 ; N four ; B 65 -50 618 674 ; -C 53 ; WX 600 ; N five ; B 33 -65 660 674 ; -C 54 ; WX 600 ; N six ; B 108 -65 712 689 ; -C 55 ; WX 600 ; N seven ; B 136 -50 680 674 ; -C 56 ; WX 600 ; N eight ; B 64 -65 655 689 ; -C 57 ; WX 600 ; N nine ; B 67 -65 665 689 ; -C 58 ; WX 600 ; N colon ; B 201 -50 489 472 ; -C 59 ; WX 600 ; N semicolon ; B 63 -176 489 472 ; -C 60 ; WX 600 ; N less ; B 52 -48 716 610 ; -C 61 ; WX 600 ; N equal ; B 11 88 708 474 ; -C 62 ; WX 600 ; N greater ; B 3 -48 668 610 ; -C 63 ; WX 600 ; N question ; B 148 -65 657 648 ; -C 64 ; WX 600 ; N at ; B 61 -142 640 705 ; -C 65 ; WX 600 ; N A ; B -60 -50 682 633 ; -C 66 ; WX 600 ; N B ; B -26 -50 670 633 ; -C 67 ; WX 600 ; N C ; B 31 -65 713 648 ; -C 68 ; WX 600 ; N D ; B -26 -50 670 633 ; -C 69 ; WX 600 ; N E ; B -26 -50 692 633 ; -C 70 ; WX 600 ; N F ; B -26 -50 713 633 ; -C 71 ; WX 600 ; N G ; B 29 -65 713 648 ; -C 72 ; WX 600 ; N H ; B -16 -50 723 633 ; -C 73 ; WX 600 ; N I ; B 44 -50 680 633 ; -C 74 ; WX 600 ; N J ; B 22 -65 776 633 ; -C 75 ; WX 600 ; N K ; B -26 -50 744 633 ; -C 76 ; WX 600 ; N L ; B -6 -50 665 633 ; -C 77 ; WX 600 ; N M ; B -58 -50 776 633 ; -C 78 ; WX 600 ; N N ; B -26 -50 755 633 ; -C 79 ; WX 600 ; N O ; B 26 -65 696 648 ; -C 80 ; WX 600 ; N P ; B -26 -50 666 633 ; -C 81 ; WX 600 ; N Q ; B 26 -196 696 648 ; -C 82 ; WX 600 ; N R ; B -26 -50 680 633 ; -C 83 ; WX 600 ; N S ; B 23 -65 680 648 ; -C 84 ; WX 600 ; N T ; B 72 -50 721 633 ; -C 85 ; WX 600 ; N U ; B 61 -65 753 633 ; -C 86 ; WX 600 ; N V ; B 42 -50 784 633 ; -C 87 ; WX 600 ; N W ; B 50 -50 773 633 ; -C 88 ; WX 600 ; N X ; B -29 -50 742 633 ; -C 89 ; WX 600 ; N Y ; B 76 -50 742 633 ; -C 90 ; WX 600 ; N Z ; B 34 -50 669 633 ; -C 91 ; WX 600 ; N bracketleft ; B 178 -204 647 674 ; -C 92 ; WX 600 ; N backslash ; B 170 -163 554 746 ; -C 93 ; WX 600 ; N bracketright ; B 53 -204 522 674 ; -C 94 ; WX 600 ; N asciicircum ; B 113 275 647 674 ; -C 95 ; WX 600 ; N underscore ; B -145 -350 639 -150 ; -C 96 ; WX 600 ; N quoteleft ; B 322 244 598 674 ; -C 97 ; WX 600 ; N a ; B 16 -65 632 502 ; -C 98 ; WX 600 ; N b ; B -47 -65 670 674 ; -C 99 ; WX 600 ; N c ; B 44 -65 672 502 ; -C 100 ; WX 600 ; N d ; B 23 -65 701 674 ; -C 101 ; WX 600 ; N e ; B 25 -65 650 502 ; -C 102 ; WX 600 ; N f ; B 36 -50 740 674 ; L i fi ; L l fl ; -C 103 ; WX 600 ; N g ; B 25 -257 724 502 ; -C 104 ; WX 600 ; N h ; B -16 -50 642 674 ; -C 105 ; WX 600 ; N i ; B 23 -50 599 725 ; -C 106 ; WX 600 ; N j ; B 34 -257 620 725 ; -C 107 ; WX 600 ; N k ; B -6 -50 661 674 ; -C 108 ; WX 600 ; N l ; B 23 -50 599 674 ; -C 109 ; WX 600 ; N m ; B -58 -50 684 502 ; -C 110 ; WX 600 ; N n ; B -16 -50 632 502 ; -C 111 ; WX 600 ; N o ; B 34 -65 656 502 ; -C 112 ; WX 600 ; N p ; B -91 -257 671 502 ; -C 113 ; WX 600 ; N q ; B 27 -257 745 502 ; -C 114 ; WX 600 ; N r ; B 15 -50 699 501 ; -C 115 ; WX 600 ; N s ; B 34 -65 638 502 ; -C 116 ; WX 600 ; N t ; B 45 -65 599 642 ; -C 117 ; WX 600 ; N u ; B 45 -65 640 487 ; -C 118 ; WX 600 ; N v ; B 32 -50 732 487 ; -C 119 ; WX 600 ; N w ; B 32 -50 732 487 ; -C 120 ; WX 600 ; N x ; B -18 -50 690 487 ; -C 121 ; WX 600 ; N y ; B -62 -257 711 487 ; -C 122 ; WX 600 ; N z ; B 46 -50 640 487 ; -C 123 ; WX 600 ; N braceleft ; B 168 -204 605 674 ; -C 124 ; WX 600 ; N bar ; B 178 -204 522 674 ; -C 125 ; WX 600 ; N braceright ; B 95 -204 534 674 ; -C 126 ; WX 600 ; N asciitilde ; B 67 129 652 433 ; -C 161 ; WX 600 ; N exclamdown ; B 143 -257 490 475 ; -C 162 ; WX 600 ; N cent ; B 96 -79 643 725 ; -C 163 ; WX 600 ; N sterling ; B 15 -50 620 648 ; -C 164 ; WX 600 ; N fraction ; B 5 60 725 552 ; -C 165 ; WX 600 ; N yen ; B 77 -50 742 633 ; -C 166 ; WX 600 ; N florin ; B -6 -173 720 689 ; -C 167 ; WX 600 ; N section ; B 18 -147 697 689 ; -C 168 ; WX 600 ; N currency ; B 47 15 677 569 ; -C 169 ; WX 600 ; N quotesingle ; B 273 244 552 674 ; -C 170 ; WX 600 ; N quotedblleft ; B 156 280 648 678 ; -C 171 ; WX 600 ; N guillemotleft ; B 27 -50 703 487 ; -C 172 ; WX 600 ; N guilsinglleft ; B 27 -50 474 487 ; -C 173 ; WX 600 ; N guilsinglright ; B 224 -50 665 487 ; -C 174 ; WX 600 ; N fi ; B -59 -50 681 725 ; -C 175 ; WX 600 ; N fl ; B -59 -50 687 674 ; -C 177 ; WX 600 ; N endash ; B 52 181 668 381 ; -C 178 ; WX 600 ; N dagger ; B 126 -142 638 674 ; -C 179 ; WX 600 ; N daggerdbl ; B 75 -142 638 674 ; -C 180 ; WX 600 ; N periodcentered ; B 255 206 475 406 ; -C 182 ; WX 600 ; N paragraph ; B 72 -147 730 689 ; -C 183 ; WX 600 ; N bullet ; B 265 206 465 406 ; -C 184 ; WX 600 ; N quotesinglbase ; B 48 -225 422 204 ; -C 185 ; WX 600 ; N quotedblbase ; B 12 -199 588 199 ; -C 186 ; WX 600 ; N quotedblright ; B 114 280 690 678 ; -C 187 ; WX 600 ; N guillemotright ; B -6 -50 665 487 ; -C 188 ; WX 600 ; N ellipsis ; B 7 -65 607 135 ; -C 189 ; WX 600 ; N perthousand ; B 55 -65 679 689 ; -C 191 ; WX 600 ; N questiondown ; B 26 -257 533 475 ; -C 193 ; WX 600 ; N grave ; B 200 390 504 689 ; -C 194 ; WX 600 ; N acute ; B 304 390 650 689 ; -C 195 ; WX 600 ; N circumflex ; B 179 390 629 674 ; -C 196 ; WX 600 ; N tilde ; B 171 381 646 640 ; -C 197 ; WX 600 ; N macron ; B 185 416 635 616 ; -C 198 ; WX 600 ; N breve ; B 196 390 647 674 ; -C 199 ; WX 600 ; N dotaccent ; B 313 431 513 631 ; -C 200 ; WX 600 ; N dieresis ; B 209 431 617 631 ; -C 202 ; WX 600 ; N ring ; B 237 353 586 694 ; -C 203 ; WX 600 ; N cedilla ; B 103 -246 436 100 ; -C 205 ; WX 600 ; N hungarumlaut ; B 179 390 650 689 ; -C 206 ; WX 600 ; N ogonek ; B 184 -225 490 100 ; -C 207 ; WX 600 ; N caron ; B 197 390 647 674 ; -C 208 ; WX 600 ; N emdash ; B -19 181 739 381 ; -C 225 ; WX 600 ; N AE ; B -59 -50 763 633 ; -C 227 ; WX 600 ; N ordfeminine ; B 114 120 590 649 ; -C 232 ; WX 600 ; N Lslash ; B -6 -50 665 633 ; -C 233 ; WX 600 ; N Oslash ; B -44 -121 764 683 ; -C 234 ; WX 600 ; N OE ; B -16 -50 763 633 ; -C 235 ; WX 600 ; N ordmasculine ; B 118 120 623 649 ; -C 241 ; WX 600 ; N ae ; B -39 -65 711 502 ; -C 245 ; WX 600 ; N dotlessi ; B 23 -50 599 487 ; -C 248 ; WX 600 ; N lslash ; B 23 -50 604 674 ; -C 249 ; WX 600 ; N oslash ; B -31 -121 716 538 ; -C 250 ; WX 600 ; N oe ; B -30 -65 711 502 ; -C 251 ; WX 600 ; N germandbls ; B -26 -65 618 674 ; -C -1 ; WX 600 ; N Aacute ; B -60 -50 682 839 ; -C -1 ; WX 600 ; N Acircumflex ; B -60 -50 682 824 ; -C -1 ; WX 600 ; N Adieresis ; B -60 -50 682 781 ; -C -1 ; WX 600 ; N Agrave ; B -60 -50 682 839 ; -C -1 ; WX 600 ; N Aring ; B -60 -50 682 855 ; -C -1 ; WX 600 ; N Atilde ; B -60 -50 682 790 ; -C -1 ; WX 600 ; N Ccedilla ; B 31 -246 713 648 ; -C -1 ; WX 600 ; N Eacute ; B -26 -50 692 839 ; -C -1 ; WX 600 ; N Ecircumflex ; B -26 -50 692 824 ; -C -1 ; WX 600 ; N Edieresis ; B -26 -50 692 781 ; -C -1 ; WX 600 ; N Egrave ; B -26 -50 692 839 ; -C -1 ; WX 600 ; N Eth ; B -26 -50 670 633 ; -C -1 ; WX 600 ; N Gcaron ; B 29 -65 713 824 ; -C -1 ; WX 600 ; N IJ ; B -59 -65 783 633 ; -C -1 ; WX 600 ; N Iacute ; B 44 -50 680 839 ; -C -1 ; WX 600 ; N Icircumflex ; B 44 -50 680 824 ; -C -1 ; WX 600 ; N Idieresis ; B 44 -50 680 781 ; -C -1 ; WX 600 ; N Idot ; B 44 -50 680 781 ; -C -1 ; WX 600 ; N Igrave ; B 44 -50 680 839 ; -C -1 ; WX 600 ; N LL ; B -69 -50 712 633 ; -C -1 ; WX 600 ; N Ntilde ; B -26 -50 755 790 ; -C -1 ; WX 600 ; N Oacute ; B 26 -65 696 839 ; -C -1 ; WX 600 ; N Ocircumflex ; B 26 -65 696 824 ; -C -1 ; WX 600 ; N Odieresis ; B 26 -65 696 781 ; -C -1 ; WX 600 ; N Ograve ; B 26 -65 696 839 ; -C -1 ; WX 600 ; N Otilde ; B 26 -65 696 790 ; -C -1 ; WX 600 ; N Scaron ; B 23 -65 680 824 ; -C -1 ; WX 600 ; N Scedilla ; B 23 -246 680 648 ; -C -1 ; WX 600 ; N Thorn ; B -26 -50 663 633 ; -C -1 ; WX 600 ; N Uacute ; B 61 -65 753 839 ; -C -1 ; WX 600 ; N Ucircumflex ; B 61 -65 753 824 ; -C -1 ; WX 600 ; N Udieresis ; B 61 -65 753 781 ; -C -1 ; WX 600 ; N Ugrave ; B 61 -65 753 839 ; -C -1 ; WX 600 ; N Yacute ; B 76 -50 742 839 ; -C -1 ; WX 600 ; N Ydieresis ; B 76 -50 742 781 ; -C -1 ; WX 600 ; N Zcaron ; B 34 -50 679 824 ; -C -1 ; WX 600 ; N aacute ; B 16 -65 632 710 ; -C -1 ; WX 600 ; N acircumflex ; B 16 -65 635 703 ; -C -1 ; WX 600 ; N adieresis ; B 16 -65 632 652 ; -C -1 ; WX 600 ; N agrave ; B 16 -65 632 710 ; -C -1 ; WX 600 ; N aring ; B 16 -65 632 746 ; -C -1 ; WX 600 ; N arrowboth ; B -36 50 764 550 ; -C -1 ; WX 600 ; N arrowdown ; B 93 -50 593 689 ; -C -1 ; WX 600 ; N arrowleft ; B -36 50 764 550 ; -C -1 ; WX 600 ; N arrowright ; B -36 50 764 550 ; -C -1 ; WX 600 ; N arrowup ; B 143 -50 643 689 ; -C -1 ; WX 600 ; N atilde ; B 16 -65 654 678 ; -C -1 ; WX 600 ; N brokenbar ; B 178 -204 522 674 ; -C -1 ; WX 600 ; N ccedilla ; B 44 -246 672 502 ; -C -1 ; WX 600 ; N center ; B 2 -50 722 684 ; -C -1 ; WX 600 ; N copyright ; B -27 -65 743 648 ; -C -1 ; WX 600 ; N dectab ; B -54 -50 676 308 ; -C -1 ; WX 600 ; N degree ; B 171 234 624 674 ; -C -1 ; WX 600 ; N divide ; B 52 -9 668 591 ; -C -1 ; WX 600 ; N down ; B 127 -50 539 502 ; -C -1 ; WX 600 ; N eacute ; B 25 -65 650 714 ; -C -1 ; WX 600 ; N ecircumflex ; B 25 -65 650 703 ; -C -1 ; WX 600 ; N edieresis ; B 25 -65 650 652 ; -C -1 ; WX 600 ; N egrave ; B 25 -65 650 714 ; -C -1 ; WX 600 ; N eth ; B 28 -65 695 689 ; -C -1 ; WX 600 ; N format ; B -108 -257 247 674 ; -C -1 ; WX 600 ; N gcaron ; B 25 -257 724 695 ; -C -1 ; WX 600 ; N graybox ; B -25 -100 753 700 ; -C -1 ; WX 600 ; N iacute ; B 23 -50 599 710 ; -C -1 ; WX 600 ; N icircumflex ; B 23 -50 599 684 ; -C -1 ; WX 600 ; N idieresis ; B 23 -50 599 652 ; -C -1 ; WX 600 ; N igrave ; B 23 -50 599 706 ; -C -1 ; WX 600 ; N ij ; B -39 -257 692 725 ; -C -1 ; WX 600 ; N indent ; B 38 0 650 412 ; -C -1 ; WX 600 ; N largebullet ; B 265 206 465 406 ; -C -1 ; WX 600 ; N left ; B 38 0 650 412 ; -C -1 ; WX 600 ; N lira ; B 15 -50 620 648 ; -C -1 ; WX 600 ; N ll ; B -49 -50 682 674 ; -C -1 ; WX 600 ; N logicalnot ; B 67 94 683 454 ; -C -1 ; WX 600 ; N merge ; B 127 -50 569 502 ; -C -1 ; WX 600 ; N minus ; B 52 181 668 381 ; -C -1 ; WX 600 ; N mu ; B 13 -257 640 487 ; -C -1 ; WX 600 ; N multiply ; B 33 -48 669 530 ; -C -1 ; WX 600 ; N notegraphic ; B 107 -65 639 689 ; -C -1 ; WX 600 ; N ntilde ; B -16 -50 632 678 ; -C -1 ; WX 600 ; N oacute ; B 34 -65 656 699 ; -C -1 ; WX 600 ; N ocircumflex ; B 34 -65 656 703 ; -C -1 ; WX 600 ; N odieresis ; B 34 -65 656 652 ; -C -1 ; WX 600 ; N ograve ; B 34 -65 656 699 ; -C -1 ; WX 600 ; N onehalf ; B -14 -65 725 674 ; -C -1 ; WX 600 ; N onequarter ; B -14 -50 741 674 ; -C -1 ; WX 600 ; N onesuperior ; B 151 140 551 674 ; -C -1 ; WX 600 ; N otilde ; B 34 -65 656 657 ; -C -1 ; WX 600 ; N overscore ; B 33 489 817 689 ; -C -1 ; WX 600 ; N plusminus ; B 3 -50 677 610 ; -C -1 ; WX 600 ; N prescription ; B -26 -50 680 633 ; -C -1 ; WX 600 ; N registered ; B -27 -65 743 648 ; -C -1 ; WX 600 ; N return ; B -24 -50 805 668 ; -C -1 ; WX 600 ; N scaron ; B 34 -65 651 695 ; -C -1 ; WX 600 ; N scedilla ; B 34 -246 638 502 ; -C -1 ; WX 600 ; N square ; B -73 -50 805 668 ; -C -1 ; WX 600 ; N stop ; B -73 -50 805 668 ; -C -1 ; WX 600 ; N tab ; B -73 -50 744 668 ; -C -1 ; WX 600 ; N thorn ; B -91 -257 671 674 ; -C -1 ; WX 600 ; N threequarters ; B -3 -50 711 689 ; -C -1 ; WX 600 ; N threesuperior ; B 155 131 612 689 ; -C -1 ; WX 600 ; N trademark ; B 18 170 793 633 ; -C -1 ; WX 600 ; N twosuperior ; B 131 140 601 689 ; -C -1 ; WX 600 ; N uacute ; B 45 -65 640 706 ; -C -1 ; WX 600 ; N ucircumflex ; B 45 -65 640 684 ; -C -1 ; WX 600 ; N udieresis ; B 45 -65 640 652 ; -C -1 ; WX 600 ; N ugrave ; B 45 -65 640 706 ; -C -1 ; WX 600 ; N up ; B 157 -50 569 502 ; -C -1 ; WX 600 ; N yacute ; B -62 -257 711 706 ; -C -1 ; WX 600 ; N ydieresis ; B -62 -257 711 631 ; -C -1 ; WX 600 ; N zcaron ; B 46 -50 651 695 ; -EndCharMetrics -StartComposites 58 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 0 146 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 0 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 0 146 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 0 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 0 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 0 0 ; -CC Yacute 2 ; PCC Y 0 0 ; PCC acute 0 146 ; -CC yacute 2 ; PCC y 0 0 ; PCC acute 0 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 0 146 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 0 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 0 146 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 0 146 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 0 146 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 0 146 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 0 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 0 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 0 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 0 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 146 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 0 146 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 0 146 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 146 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex 0 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis 0 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 0 146 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 0 146 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 0 146 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 0 146 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 0 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 0 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 0 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 0 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 0 146 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 0 146 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 0 146 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 0 146 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 0 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 0 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 0 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 0 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 0 146 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 0 146 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 0 146 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 0 146 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 0 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 0 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 0 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 0 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 0 146 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 0 146 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 0 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 0 146 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 0 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 0 146 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ; -EndComposites -EndFontMetrics diff --git a/misc/afm/CourO.afm b/misc/afm/CourO.afm deleted file mode 100644 index 0911df46f9..0000000000 --- a/misc/afm/CourO.afm +++ /dev/null @@ -1,341 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Wed Feb 25 16:13:37 PST 1987 -FontName Courier-Oblique -EncodingScheme AdobeStandardEncoding -FullName Courier Oblique -FamilyName Courier -Weight Medium -ItalicAngle -12.0 -IsFixedPitch true -UnderlinePosition -82 -UnderlineThickness 40 -Version 001.003 -FontBBox -85 -290 759 795 -CapHeight 583 -XHeight 437 -Descender -207 -Ascender 624 -StartCharMetrics 260 -C 32 ; WX 600 ; N space ; B 560 -40 640 40 ; -C 33 ; WX 600 ; N exclam ; B 257 -5 483 639 ; -C 34 ; WX 600 ; N quotedbl ; B 231 314 594 603 ; -C 35 ; WX 600 ; N numbersign ; B 116 -82 608 665 ; -C 36 ; WX 600 ; N dollar ; B 111 -113 601 675 ; -C 37 ; WX 600 ; N percent ; B 118 -35 611 639 ; -C 38 ; WX 600 ; N ampersand ; B 112 -35 547 540 ; -C 39 ; WX 600 ; N quoteright ; B 208 304 462 613 ; -C 40 ; WX 600 ; N parenleft ; B 315 -144 602 623 ; -C 41 ; WX 600 ; N parenright ; B 105 -144 392 623 ; -C 42 ; WX 600 ; N asterisk ; B 191 210 605 624 ; -C 43 ; WX 600 ; N plus ; B 112 12 608 550 ; -C 44 ; WX 600 ; N comma ; B 111 -155 364 155 ; -C 45 ; WX 600 ; N hyphen ; B 112 241 608 321 ; -C 46 ; WX 600 ; N period ; B 261 10 361 90 ; -C 47 ; WX 600 ; N slash ; B 80 -103 644 686 ; -C 48 ; WX 600 ; N zero ; B 139 -35 590 639 ; -C 49 ; WX 600 ; N one ; B 97 -20 511 624 ; -C 50 ; WX 600 ; N two ; B 68 -20 596 639 ; -C 51 ; WX 600 ; N three ; B 90 -35 599 639 ; -C 52 ; WX 600 ; N four ; B 125 -20 560 624 ; -C 53 ; WX 600 ; N five ; B 93 -35 602 624 ; -C 54 ; WX 600 ; N six ; B 167 -35 654 639 ; -C 55 ; WX 600 ; N seven ; B 196 -20 622 624 ; -C 56 ; WX 600 ; N eight ; B 124 -35 595 639 ; -C 57 ; WX 600 ; N nine ; B 120 -35 606 639 ; -C 58 ; WX 600 ; N colon ; B 261 10 425 392 ; -C 59 ; WX 600 ; N semicolon ; B 123 -116 425 392 ; -C 60 ; WX 600 ; N less ; B 112 12 656 550 ; -C 61 ; WX 600 ; N equal ; B 75 168 644 394 ; -C 62 ; WX 600 ; N greater ; B 63 12 608 550 ; -C 63 ; WX 600 ; N question ; B 211 -5 597 598 ; -C 64 ; WX 600 ; N at ; B 120 -82 580 644 ; -C 65 ; WX 600 ; N A ; B -7 -20 615 583 ; -C 66 ; WX 600 ; N B ; B 27 -20 610 583 ; -C 67 ; WX 600 ; N C ; B 91 -35 655 598 ; -C 68 ; WX 600 ; N D ; B 27 -20 610 583 ; -C 69 ; WX 600 ; N E ; B 27 -20 634 583 ; -C 70 ; WX 600 ; N F ; B 27 -20 655 583 ; -C 71 ; WX 600 ; N G ; B 89 -35 655 598 ; -C 72 ; WX 600 ; N H ; B 37 -20 665 583 ; -C 73 ; WX 600 ; N I ; B 97 -20 622 583 ; -C 74 ; WX 600 ; N J ; B 82 -35 718 583 ; -C 75 ; WX 600 ; N K ; B 27 -20 686 583 ; -C 76 ; WX 600 ; N L ; B 47 -20 605 583 ; -C 77 ; WX 600 ; N M ; B -5 -20 718 583 ; -C 78 ; WX 600 ; N N ; B 27 -20 697 583 ; -C 79 ; WX 600 ; N O ; B 83 -35 636 598 ; -C 80 ; WX 600 ; N P ; B 27 -20 606 583 ; -C 81 ; WX 600 ; N Q ; B 84 -136 636 598 ; -C 82 ; WX 600 ; N R ; B 27 -20 613 583 ; -C 83 ; WX 600 ; N S ; B 76 -35 622 598 ; -C 84 ; WX 600 ; N T ; B 129 -20 663 583 ; -C 85 ; WX 600 ; N U ; B 119 -35 695 583 ; -C 86 ; WX 600 ; N V ; B 104 -20 726 583 ; -C 87 ; WX 600 ; N W ; B 103 -20 715 583 ; -C 88 ; WX 600 ; N X ; B 24 -20 684 583 ; -C 89 ; WX 600 ; N Y ; B 129 -20 684 583 ; -C 90 ; WX 600 ; N Z ; B 87 -20 611 583 ; -C 91 ; WX 600 ; N bracketleft ; B 238 -144 589 624 ; -C 92 ; WX 600 ; N backslash ; B 230 -103 494 686 ; -C 93 ; WX 600 ; N bracketright ; B 113 -144 464 624 ; -C 94 ; WX 600 ; N asciicircum ; B 173 335 587 624 ; -C 95 ; WX 600 ; N underscore ; B -85 -290 579 -210 ; -C 96 ; WX 600 ; N quoteleft ; B 382 304 538 613 ; -C 97 ; WX 600 ; N a ; B 74 -35 565 452 ; -C 98 ; WX 600 ; N b ; B 6 -35 610 624 ; -C 99 ; WX 600 ; N c ; B 104 -35 614 452 ; -C 100 ; WX 600 ; N d ; B 83 -35 643 624 ; -C 101 ; WX 600 ; N e ; B 85 -35 590 452 ; -C 102 ; WX 600 ; N f ; B 89 -20 682 624 ; L i fi ; L l fl ; -C 103 ; WX 600 ; N g ; B 85 -207 666 452 ; -C 104 ; WX 600 ; N h ; B 37 -20 575 624 ; -C 105 ; WX 600 ; N i ; B 76 -20 532 665 ; -C 106 ; WX 600 ; N j ; B 92 -207 562 665 ; -C 107 ; WX 600 ; N k ; B 47 -20 603 624 ; -C 108 ; WX 600 ; N l ; B 76 -20 532 624 ; -C 109 ; WX 600 ; N m ; B -5 -20 621 452 ; -C 110 ; WX 600 ; N n ; B 37 -20 565 452 ; -C 111 ; WX 600 ; N o ; B 91 -35 597 452 ; -C 112 ; WX 600 ; N p ; B -33 -207 612 452 ; -C 113 ; WX 600 ; N q ; B 85 -207 687 452 ; -C 114 ; WX 600 ; N r ; B 68 -20 639 448 ; -C 115 ; WX 600 ; N s ; B 87 -35 580 452 ; -C 116 ; WX 600 ; N t ; B 107 -35 541 582 ; -C 117 ; WX 600 ; N u ; B 107 -35 582 437 ; -C 118 ; WX 600 ; N v ; B 94 -20 674 437 ; -C 119 ; WX 600 ; N w ; B 94 -20 674 437 ; -C 120 ; WX 600 ; N x ; B 35 -20 632 437 ; -C 121 ; WX 600 ; N y ; B -4 -207 653 437 ; -C 122 ; WX 600 ; N z ; B 99 -20 582 437 ; -C 123 ; WX 600 ; N braceleft ; B 228 -144 547 624 ; -C 124 ; WX 600 ; N bar ; B 238 -144 464 624 ; -C 125 ; WX 600 ; N braceright ; B 155 -144 474 624 ; -C 126 ; WX 600 ; N asciitilde ; B 127 189 592 373 ; -C 161 ; WX 600 ; N exclamdown ; B 209 -207 430 415 ; -C 162 ; WX 600 ; N cent ; B 156 -19 583 665 ; -C 163 ; WX 600 ; N sterling ; B 68 -20 560 598 ; -C 164 ; WX 600 ; N fraction ; B 65 120 665 492 ; -C 165 ; WX 600 ; N yen ; B 137 -20 684 583 ; -C 166 ; WX 600 ; N florin ; B 54 -113 663 639 ; -C 167 ; WX 600 ; N section ; B 78 -87 637 629 ; -C 168 ; WX 600 ; N currency ; B 107 75 617 509 ; -C 169 ; WX 600 ; N quotesingle ; B 333 304 492 613 ; -C 170 ; WX 600 ; N quotedblleft ; B 216 340 588 619 ; -C 171 ; WX 600 ; N guillemotleft ; B 87 -20 645 437 ; -C 172 ; WX 600 ; N guilsinglleft ; B 87 -20 416 437 ; -C 173 ; WX 600 ; N guilsinglright ; B 277 -20 605 437 ; -C 174 ; WX 600 ; N fi ; B -6 -20 628 665 ; -C 175 ; WX 600 ; N fl ; B -6 -20 629 624 ; -C 177 ; WX 600 ; N endash ; B 112 241 608 321 ; -C 178 ; WX 600 ; N dagger ; B 188 -82 580 624 ; -C 179 ; WX 600 ; N daggerdbl ; B 135 -82 580 624 ; -C 180 ; WX 600 ; N periodcentered ; B 315 266 415 346 ; -C 182 ; WX 600 ; N paragraph ; B 132 -87 670 629 ; -C 183 ; WX 600 ; N bullet ; B 325 266 405 346 ; -C 184 ; WX 600 ; N quotesinglbase ; B 108 -165 362 144 ; -C 185 ; WX 600 ; N quotedblbase ; B 72 -139 528 139 ; -C 186 ; WX 600 ; N quotedblright ; B 174 340 630 619 ; -C 187 ; WX 600 ; N guillemotright ; B 47 -20 605 437 ; -C 188 ; WX 600 ; N ellipsis ; B 67 -5 547 75 ; -C 189 ; WX 600 ; N perthousand ; B 117 -35 619 639 ; -C 191 ; WX 600 ; N questiondown ; B 85 -207 470 415 ; -C 193 ; WX 600 ; N grave ; B 262 450 444 639 ; -C 194 ; WX 600 ; N acute ; B 364 450 592 639 ; -C 195 ; WX 600 ; N circumflex ; B 239 450 569 624 ; -C 196 ; WX 600 ; N tilde ; B 231 441 586 580 ; -C 197 ; WX 600 ; N macron ; B 245 476 575 556 ; -C 198 ; WX 600 ; N breve ; B 258 450 589 624 ; -C 199 ; WX 600 ; N dotaccent ; B 373 491 453 571 ; -C 200 ; WX 600 ; N dieresis ; B 269 491 557 571 ; -C 202 ; WX 600 ; N ring ; B 297 413 526 634 ; -C 203 ; WX 600 ; N cedilla ; B 163 -186 376 40 ; -C 205 ; WX 600 ; N hungarumlaut ; B 239 450 592 639 ; -C 206 ; WX 600 ; N ogonek ; B 244 -165 430 40 ; -C 207 ; WX 600 ; N caron ; B 259 450 589 624 ; -C 208 ; WX 600 ; N emdash ; B 41 241 679 321 ; -C 225 ; WX 600 ; N AE ; B -6 -20 705 583 ; -C 227 ; WX 600 ; N ordfeminine ; B 174 179 529 598 ; -C 232 ; WX 600 ; N Lslash ; B 47 -20 605 583 ; -C 233 ; WX 600 ; N Oslash ; B 16 -61 704 623 ; -C 234 ; WX 600 ; N OE ; B 42 -20 705 583 ; -C 235 ; WX 600 ; N ordmasculine ; B 178 179 563 598 ; -C 241 ; WX 600 ; N ae ; B 19 -35 651 452 ; -C 245 ; WX 600 ; N dotlessi ; B 76 -20 532 437 ; -C 248 ; WX 600 ; N lslash ; B 76 -20 544 624 ; -C 249 ; WX 600 ; N oslash ; B 29 -61 656 478 ; -C 250 ; WX 600 ; N oe ; B 28 -35 651 452 ; -C 251 ; WX 600 ; N germandbls ; B 27 -35 558 624 ; -C -1 ; WX 600 ; N Aacute ; B -7 -20 615 789 ; -C -1 ; WX 600 ; N Acircumflex ; B -7 -20 615 774 ; -C -1 ; WX 600 ; N Adieresis ; B -7 -20 615 721 ; -C -1 ; WX 600 ; N Agrave ; B -7 -20 615 789 ; -C -1 ; WX 600 ; N Aring ; B -7 -20 615 795 ; -C -1 ; WX 600 ; N Atilde ; B -7 -20 615 730 ; -C -1 ; WX 600 ; N Ccedilla ; B 91 -186 655 598 ; -C -1 ; WX 600 ; N Eacute ; B 27 -20 634 789 ; -C -1 ; WX 600 ; N Ecircumflex ; B 27 -20 634 774 ; -C -1 ; WX 600 ; N Edieresis ; B 27 -20 634 721 ; -C -1 ; WX 600 ; N Egrave ; B 27 -20 634 789 ; -C -1 ; WX 600 ; N Eth ; B 27 -20 610 583 ; -C -1 ; WX 600 ; N Gcaron ; B 89 -35 655 774 ; -C -1 ; WX 600 ; N IJ ; B -6 -35 725 583 ; -C -1 ; WX 600 ; N Iacute ; B 97 -20 622 789 ; -C -1 ; WX 600 ; N Icircumflex ; B 97 -20 622 774 ; -C -1 ; WX 600 ; N Idieresis ; B 97 -20 622 721 ; -C -1 ; WX 600 ; N Idot ; B 97 -20 622 721 ; -C -1 ; WX 600 ; N Igrave ; B 97 -20 622 789 ; -C -1 ; WX 600 ; N LL ; B -16 -20 652 583 ; -C -1 ; WX 600 ; N Ntilde ; B 27 -20 697 730 ; -C -1 ; WX 600 ; N Oacute ; B 83 -35 636 789 ; -C -1 ; WX 600 ; N Ocircumflex ; B 83 -35 636 774 ; -C -1 ; WX 600 ; N Odieresis ; B 83 -35 636 721 ; -C -1 ; WX 600 ; N Ograve ; B 83 -35 636 789 ; -C -1 ; WX 600 ; N Otilde ; B 83 -35 636 730 ; -C -1 ; WX 600 ; N Scaron ; B 76 -35 622 774 ; -C -1 ; WX 600 ; N Scedilla ; B 76 -186 622 598 ; -C -1 ; WX 600 ; N Thorn ; B 27 -20 603 583 ; -C -1 ; WX 600 ; N Uacute ; B 119 -35 695 789 ; -C -1 ; WX 600 ; N Ucircumflex ; B 119 -35 695 774 ; -C -1 ; WX 600 ; N Udieresis ; B 119 -35 695 721 ; -C -1 ; WX 600 ; N Ugrave ; B 119 -35 695 789 ; -C -1 ; WX 600 ; N Yacute ; B 129 -20 684 789 ; -C -1 ; WX 600 ; N Ydieresis ; B 129 -20 684 721 ; -C -1 ; WX 600 ; N Zcaron ; B 87 -20 621 774 ; -C -1 ; WX 600 ; N aacute ; B 74 -35 565 660 ; -C -1 ; WX 600 ; N acircumflex ; B 74 -35 575 653 ; -C -1 ; WX 600 ; N adieresis ; B 74 -35 565 592 ; -C -1 ; WX 600 ; N agrave ; B 74 -35 565 660 ; -C -1 ; WX 600 ; N aring ; B 74 -35 565 686 ; -C -1 ; WX 600 ; N arrowboth ; B 24 110 704 490 ; -C -1 ; WX 600 ; N arrowdown ; B 146 -20 526 639 ; -C -1 ; WX 600 ; N arrowleft ; B 24 110 704 490 ; -C -1 ; WX 600 ; N arrowright ; B 24 110 704 490 ; -C -1 ; WX 600 ; N arrowup ; B 205 -20 585 639 ; -C -1 ; WX 600 ; N atilde ; B 74 -35 594 618 ; -C -1 ; WX 600 ; N brokenbar ; B 238 -144 464 624 ; -C -1 ; WX 600 ; N ccedilla ; B 104 -186 614 452 ; -C -1 ; WX 600 ; N center ; B 62 -20 662 624 ; -C -1 ; WX 600 ; N copyright ; B 33 -35 683 598 ; -C -1 ; WX 600 ; N dectab ; B -1 -20 609 248 ; -C -1 ; WX 600 ; N degree ; B 231 294 564 624 ; -C -1 ; WX 600 ; N divide ; B 112 51 608 531 ; -C -1 ; WX 600 ; N down ; B 181 -20 473 452 ; -C -1 ; WX 600 ; N eacute ; B 85 -35 590 664 ; -C -1 ; WX 600 ; N ecircumflex ; B 85 -35 590 653 ; -C -1 ; WX 600 ; N edieresis ; B 85 -35 590 592 ; -C -1 ; WX 600 ; N egrave ; B 85 -35 590 664 ; -C -1 ; WX 600 ; N eth ; B 87 -35 637 639 ; -C -1 ; WX 600 ; N format ; B -50 -207 189 624 ; -C -1 ; WX 600 ; N gcaron ; B 85 -207 666 645 ; -C -1 ; WX 600 ; N graybox ; B 35 -40 693 640 ; -C -1 ; WX 600 ; N iacute ; B 76 -20 532 660 ; -C -1 ; WX 600 ; N icircumflex ; B 76 -20 532 634 ; -C -1 ; WX 600 ; N idieresis ; B 76 -20 532 592 ; -C -1 ; WX 600 ; N igrave ; B 76 -20 532 656 ; -C -1 ; WX 600 ; N ij ; B 14 -207 634 665 ; -C -1 ; WX 600 ; N indent ; B 98 60 590 352 ; -C -1 ; WX 600 ; N largebullet ; B 325 266 405 346 ; -C -1 ; WX 600 ; N left ; B 98 60 590 352 ; -C -1 ; WX 600 ; N lira ; B 68 -20 560 598 ; -C -1 ; WX 600 ; N ll ; B 4 -20 624 624 ; -C -1 ; WX 600 ; N logicalnot ; B 127 154 623 394 ; -C -1 ; WX 600 ; N merge ; B 181 -20 511 452 ; -C -1 ; WX 600 ; N minus ; B 112 241 608 321 ; -C -1 ; WX 600 ; N mu ; B 71 -207 582 437 ; -C -1 ; WX 600 ; N multiply ; B 93 12 609 470 ; -C -1 ; WX 600 ; N notegraphic ; B 167 -5 573 639 ; -C -1 ; WX 600 ; N ntilde ; B 37 -20 569 618 ; -C -1 ; WX 600 ; N oacute ; B 91 -35 597 649 ; -C -1 ; WX 600 ; N ocircumflex ; B 91 -35 597 653 ; -C -1 ; WX 600 ; N odieresis ; B 91 -35 597 592 ; -C -1 ; WX 600 ; N ograve ; B 91 -35 597 649 ; -C -1 ; WX 600 ; N onehalf ; B 46 -20 665 624 ; -C -1 ; WX 600 ; N onequarter ; B 46 -20 681 624 ; -C -1 ; WX 600 ; N onesuperior ; B 211 200 491 624 ; -C -1 ; WX 600 ; N otilde ; B 91 -35 597 597 ; -C -1 ; WX 600 ; N overscore ; B 95 559 759 639 ; -C -1 ; WX 600 ; N plusminus ; B 56 -20 617 550 ; -C -1 ; WX 600 ; N prescription ; B 27 -20 613 583 ; -C -1 ; WX 600 ; N registered ; B 33 -35 683 598 ; -C -1 ; WX 600 ; N return ; B 36 -20 745 608 ; -C -1 ; WX 600 ; N scaron ; B 87 -35 593 645 ; -C -1 ; WX 600 ; N scedilla ; B 87 -186 580 452 ; -C -1 ; WX 600 ; N square ; B -20 -20 745 608 ; -C -1 ; WX 600 ; N stop ; B -20 -20 745 608 ; -C -1 ; WX 600 ; N tab ; B -20 -20 684 608 ; -C -1 ; WX 600 ; N thorn ; B -33 -207 612 624 ; -C -1 ; WX 600 ; N threequarters ; B 57 -20 651 639 ; -C -1 ; WX 600 ; N threesuperior ; B 215 191 552 639 ; -C -1 ; WX 600 ; N trademark ; B 78 230 735 583 ; -C -1 ; WX 600 ; N twosuperior ; B 191 200 541 639 ; -C -1 ; WX 600 ; N uacute ; B 107 -35 582 656 ; -C -1 ; WX 600 ; N ucircumflex ; B 107 -35 582 634 ; -C -1 ; WX 600 ; N udieresis ; B 107 -35 582 592 ; -C -1 ; WX 600 ; N ugrave ; B 107 -35 582 656 ; -C -1 ; WX 600 ; N up ; B 219 -20 511 452 ; -C -1 ; WX 600 ; N yacute ; B -4 -207 653 656 ; -C -1 ; WX 600 ; N ydieresis ; B -4 -207 653 571 ; -C -1 ; WX 600 ; N zcaron ; B 99 -20 593 645 ; -EndCharMetrics -StartComposites 58 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 0 146 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 0 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 0 146 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 0 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 0 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 0 0 ; -CC Yacute 2 ; PCC Y 0 0 ; PCC acute 0 146 ; -CC yacute 2 ; PCC y 0 0 ; PCC acute 0 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 0 146 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 0 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 0 146 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 0 146 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 0 146 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 0 146 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 0 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 0 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 0 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 0 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 146 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 0 146 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 0 146 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 146 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex 0 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis 0 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 0 146 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 0 146 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 0 146 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 0 146 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 0 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 0 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 0 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 0 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 0 146 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 0 146 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 0 146 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 0 146 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 0 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 0 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 0 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 0 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 0 146 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 0 146 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 0 146 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 0 146 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 0 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 0 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 0 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 0 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 0 146 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 0 146 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 0 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 0 146 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 0 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 0 146 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ; -EndComposites -EndFontMetrics diff --git a/misc/afm/Helv.afm b/misc/afm/Helv.afm deleted file mode 100644 index b17a3909d4..0000000000 --- a/misc/afm/Helv.afm +++ /dev/null @@ -1,435 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Tue Aug 5 11:33:55 PDT 1986 -FontName Helvetica -EncodingScheme AdobeStandardEncoding -FullName Helvetica -FamilyName Helvetica -Weight Medium -ItalicAngle 0.0 -IsFixedPitch false -UnderlinePosition -97 -UnderlineThickness 73 -Version 001.001 -Notice Helvetica is a registered trademark of Allied Corporation. -FontBBox -174 -220 1001 944 -CapHeight 729 -XHeight 525 -Descender -219 -Ascender 729 -StartCharMetrics 228 -C 32 ; WX 278 ; N space ; B 0 0 0 0 ; -C 33 ; WX 278 ; N exclam ; B 124 0 208 729 ; -C 34 ; WX 355 ; N quotedbl ; B 52 462 305 708 ; -C 35 ; WX 556 ; N numbersign ; B 14 -20 542 698 ; -C 36 ; WX 556 ; N dollar ; B 33 -125 518 770 ; -C 37 ; WX 889 ; N percent ; B 29 -20 859 708 ; -C 38 ; WX 667 ; N ampersand ; B 52 -23 637 710 ; -C 39 ; WX 222 ; N quoteright ; B 64 476 158 708 ; -C 40 ; WX 333 ; N parenleft ; B 73 -213 291 729 ; -C 41 ; WX 333 ; N parenright ; B 38 -213 256 729 ; -C 42 ; WX 389 ; N asterisk ; B 40 452 343 740 ; -C 43 ; WX 584 ; N plus ; B 50 -10 534 474 ; -C 44 ; WX 278 ; N comma ; B 87 -150 192 104 ; -C 45 ; WX 333 ; N hyphen ; B 46 240 284 313 ; -C 46 ; WX 278 ; N period ; B 87 0 191 104 ; -C 47 ; WX 278 ; N slash ; B -8 -21 284 708 ; -C 48 ; WX 556 ; N zero ; B 43 -23 507 709 ; -C 49 ; WX 556 ; N one ; B 102 0 347 709 ; -C 50 ; WX 556 ; N two ; B 34 0 511 710 ; -C 51 ; WX 556 ; N three ; B 32 -23 506 709 ; -C 52 ; WX 556 ; N four ; B 28 0 520 709 ; -C 53 ; WX 556 ; N five ; B 35 -23 513 709 ; -C 54 ; WX 556 ; N six ; B 43 -23 513 709 ; -C 55 ; WX 556 ; N seven ; B 46 0 520 709 ; -C 56 ; WX 556 ; N eight ; B 37 -23 513 709 ; -C 57 ; WX 556 ; N nine ; B 38 -23 509 709 ; -C 58 ; WX 278 ; N colon ; B 110 0 214 525 ; -C 59 ; WX 278 ; N semicolon ; B 110 -150 215 516 ; -C 60 ; WX 584 ; N less ; B 45 -10 534 474 ; -C 61 ; WX 584 ; N equal ; B 50 112 534 352 ; -C 62 ; WX 584 ; N greater ; B 50 -10 539 474 ; -C 63 ; WX 556 ; N question ; B 77 0 509 738 ; -C 64 ; WX 1015 ; N at ; B 34 -146 951 737 ; -C 65 ; WX 667 ; N A ; B 17 0 653 729 ; -C 66 ; WX 667 ; N B ; B 79 0 623 729 ; -C 67 ; WX 722 ; N C ; B 48 -23 677 741 ; -C 68 ; WX 722 ; N D ; B 89 0 667 729 ; -C 69 ; WX 667 ; N E ; B 90 0 613 729 ; -C 70 ; WX 611 ; N F ; B 90 0 579 729 ; -C 71 ; WX 778 ; N G ; B 44 -23 709 741 ; -C 72 ; WX 722 ; N H ; B 83 0 644 729 ; -C 73 ; WX 278 ; N I ; B 100 0 194 729 ; -C 74 ; WX 500 ; N J ; B 17 -26 426 729 ; -C 75 ; WX 667 ; N K ; B 79 0 658 729 ; -C 76 ; WX 556 ; N L ; B 80 0 533 729 ; -C 77 ; WX 833 ; N M ; B 75 0 761 729 ; -C 78 ; WX 722 ; N N ; B 76 0 646 729 ; -C 79 ; WX 778 ; N O ; B 38 -23 742 741 ; -C 80 ; WX 667 ; N P ; B 91 0 617 730 ; -C 81 ; WX 778 ; N Q ; B 38 -59 742 741 ; -C 82 ; WX 722 ; N R ; B 93 0 679 729 ; -C 83 ; WX 667 ; N S ; B 48 -23 621 741 ; -C 84 ; WX 611 ; N T ; B 21 0 593 729 ; -C 85 ; WX 722 ; N U ; B 85 -23 645 729 ; -C 86 ; WX 667 ; N V ; B 30 0 645 729 ; -C 87 ; WX 944 ; N W ; B 22 0 929 729 ; -C 88 ; WX 667 ; N X ; B 22 0 649 729 ; -C 89 ; WX 667 ; N Y ; B 13 0 661 729 ; -C 90 ; WX 611 ; N Z ; B 28 0 583 729 ; -C 91 ; WX 278 ; N bracketleft ; B 64 -214 250 729 ; -C 92 ; WX 278 ; N backslash ; B -8 -20 284 729 ; -C 93 ; WX 278 ; N bracketright ; B 23 -215 209 729 ; -C 94 ; WX 469 ; N asciicircum ; B 44 333 425 713 ; -C 95 ; WX 556 ; N underscore ; B -22 -175 578 -125 ; -C 96 ; WX 222 ; N quoteleft ; B 65 459 158 708 ; -C 97 ; WX 556 ; N a ; B 42 -23 535 540 ; -C 98 ; WX 556 ; N b ; B 54 -23 523 729 ; -C 99 ; WX 500 ; N c ; B 31 -23 477 540 ; -C 100 ; WX 556 ; N d ; B 26 -23 495 729 ; -C 101 ; WX 556 ; N e ; B 40 -23 513 541 ; -C 102 ; WX 278 ; N f ; B 18 0 258 733 ; L i fi ; L l fl ; -C 103 ; WX 556 ; N g ; B 29 -220 489 540 ; -C 104 ; WX 556 ; N h ; B 70 0 486 729 ; -C 105 ; WX 222 ; N i ; B 66 0 150 729 ; -C 106 ; WX 222 ; N j ; B -18 -220 153 729 ; -C 107 ; WX 500 ; N k ; B 58 0 502 729 ; -C 108 ; WX 222 ; N l ; B 68 0 152 729 ; -C 109 ; WX 833 ; N m ; B 71 0 763 540 ; -C 110 ; WX 556 ; N n ; B 70 0 487 540 ; -C 111 ; WX 556 ; N o ; B 36 -23 510 540 ; -C 112 ; WX 556 ; N p ; B 54 -219 523 540 ; -C 113 ; WX 556 ; N q ; B 26 -219 495 540 ; -C 114 ; WX 333 ; N r ; B 69 0 321 540 ; -C 115 ; WX 500 ; N s ; B 34 -24 459 540 ; -C 116 ; WX 278 ; N t ; B 14 -24 254 667 ; -C 117 ; WX 556 ; N u ; B 65 -23 482 525 ; -C 118 ; WX 500 ; N v ; B 10 0 486 525 ; -C 119 ; WX 722 ; N w ; B 6 0 708 525 ; -C 120 ; WX 500 ; N x ; B 17 0 473 525 ; -C 121 ; WX 500 ; N y ; B 20 -219 478 525 ; -C 122 ; WX 500 ; N z ; B 31 0 457 525 ; -C 123 ; WX 334 ; N braceleft ; B 43 -214 276 731 ; -C 124 ; WX 260 ; N bar ; B 100 -215 160 729 ; -C 125 ; WX 334 ; N braceright ; B 29 -214 262 731 ; -C 126 ; WX 584 ; N asciitilde ; B 75 267 508 438 ; -C 161 ; WX 333 ; N exclamdown ; B 121 -214 205 525 ; -C 162 ; WX 556 ; N cent ; B 52 -120 510 628 ; -C 163 ; WX 556 ; N sterling ; B 26 -21 535 726 ; -C 164 ; WX 167 ; N fraction ; B -174 -21 336 708 ; -C 165 ; WX 556 ; N yen ; B 11 0 545 710 ; -C 166 ; WX 556 ; N florin ; B 11 -214 542 742 ; -C 167 ; WX 556 ; N section ; B 44 -215 506 729 ; -C 168 ; WX 556 ; N currency ; B 67 126 489 554 ; -C 169 ; WX 191 ; N quotesingle ; B 48 462 142 708 ; -C 170 ; WX 333 ; N quotedblleft ; B 48 459 299 708 ; -C 171 ; WX 556 ; N guillemotleft ; B 98 106 455 438 ; -C 172 ; WX 333 ; N guilsinglleft ; B 91 112 243 436 ; -C 173 ; WX 333 ; N guilsinglright ; B 85 112 239 436 ; -C 174 ; WX 500 ; N fi ; B 12 0 436 733 ; -C 175 ; WX 500 ; N fl ; B 17 0 430 733 ; -C 177 ; WX 556 ; N endash ; B -5 240 561 313 ; -C 178 ; WX 556 ; N dagger ; B 38 -178 513 710 ; -C 179 ; WX 556 ; N daggerdbl ; B 38 -178 513 710 ; -C 180 ; WX 278 ; N periodcentered ; B 87 318 211 442 ; -C 182 ; WX 537 ; N paragraph ; B 48 -178 522 729 ; -C 183 ; WX 350 ; N bullet ; B 50 220 300 470 ; -C 184 ; WX 222 ; N quotesinglbase ; B 64 -129 158 103 ; -C 185 ; WX 333 ; N quotedblbase ; B 47 -129 300 103 ; -C 186 ; WX 333 ; N quotedblright ; B 49 476 302 708 ; -C 187 ; WX 556 ; N guillemotright ; B 98 106 451 438 ; -C 188 ; WX 1000 ; N ellipsis ; B 115 0 885 104 ; -C 189 ; WX 1000 ; N perthousand ; B 9 -20 993 740 ; -C 191 ; WX 611 ; N questiondown ; B 95 -213 528 525 ; -C 193 ; WX 333 ; N grave ; B 22 592 231 740 ; -C 194 ; WX 333 ; N acute ; B 92 592 301 740 ; -C 195 ; WX 333 ; N circumflex ; B 20 591 307 741 ; -C 196 ; WX 333 ; N tilde ; B 5 589 319 716 ; -C 197 ; WX 333 ; N macron ; B 28 621 302 694 ; -C 198 ; WX 333 ; N breve ; B 15 594 316 729 ; -C 199 ; WX 333 ; N dotaccent ; B 115 605 219 709 ; -C 200 ; WX 333 ; N dieresis ; B 30 605 296 708 ; -C 202 ; WX 333 ; N ring ; B 79 566 255 741 ; -C 203 ; WX 333 ; N cedilla ; B 39 -214 287 0 ; -C 205 ; WX 333 ; N hungarumlaut ; B -35 592 348 740 ; -C 206 ; WX 333 ; N ogonek ; B 57 -189 265 15 ; -C 207 ; WX 333 ; N caron ; B 19 590 306 740 ; -C 208 ; WX 1000 ; N emdash ; B -9 240 1001 313 ; -C 225 ; WX 1000 ; N AE ; B 11 0 950 729 ; -C 227 ; WX 370 ; N ordfeminine ; B 37 301 333 740 ; -C 232 ; WX 556 ; N Lslash ; B 0 0 552 729 ; -C 233 ; WX 778 ; N Oslash ; B 30 -23 744 742 ; -C 234 ; WX 1000 ; N OE ; B 43 -20 959 739 ; -C 235 ; WX 365 ; N ordmasculine ; B 40 301 324 741 ; -C 241 ; WX 889 ; N ae ; B 34 -20 845 546 ; -C 245 ; WX 278 ; N dotlessi ; B 94 0 178 525 ; -C 248 ; WX 222 ; N lslash ; B 0 0 212 729 ; -C 249 ; WX 611 ; N oslash ; B 18 -27 529 548 ; -C 250 ; WX 944 ; N oe ; B 40 -22 899 540 ; -C 251 ; WX 611 ; N germandbls ; B 126 -20 566 729 ; -C -1 ; WX 667 ; N Aacute ; B 17 0 653 939 ; -C -1 ; WX 667 ; N Acircumflex ; B 17 0 653 940 ; -C -1 ; WX 667 ; N Adieresis ; B 17 0 653 907 ; -C -1 ; WX 667 ; N Agrave ; B 17 0 653 939 ; -C -1 ; WX 667 ; N Aring ; B 17 0 653 940 ; -C -1 ; WX 667 ; N Atilde ; B 17 0 653 915 ; -C -1 ; WX 722 ; N Ccedilla ; B 48 -214 677 741 ; -C -1 ; WX 667 ; N Eacute ; B 90 0 613 939 ; -C -1 ; WX 667 ; N Ecircumflex ; B 90 0 613 940 ; -C -1 ; WX 667 ; N Edieresis ; B 90 0 613 907 ; -C -1 ; WX 667 ; N Egrave ; B 90 0 613 939 ; -C -1 ; WX 722 ; N Eth ; B 0 0 667 729 ; -C -1 ; WX 278 ; N Iacute ; B 71 0 280 939 ; -C -1 ; WX 278 ; N Icircumflex ; B -1 0 286 940 ; -C -1 ; WX 278 ; N Idieresis ; B 9 0 275 907 ; -C -1 ; WX 278 ; N Igrave ; B 1 0 210 939 ; -C -1 ; WX 722 ; N Ntilde ; B 76 0 646 915 ; -C -1 ; WX 778 ; N Oacute ; B 38 -23 742 939 ; -C -1 ; WX 778 ; N Ocircumflex ; B 38 -23 742 940 ; -C -1 ; WX 778 ; N Odieresis ; B 38 -23 742 907 ; -C -1 ; WX 778 ; N Ograve ; B 38 -23 742 939 ; -C -1 ; WX 778 ; N Otilde ; B 38 -23 742 915 ; -C -1 ; WX 667 ; N Scaron ; B 48 -23 621 939 ; -C -1 ; WX 667 ; N Thorn ; B 91 0 617 729 ; -C -1 ; WX 722 ; N Uacute ; B 85 -23 645 939 ; -C -1 ; WX 722 ; N Ucircumflex ; B 85 -23 645 940 ; -C -1 ; WX 722 ; N Udieresis ; B 85 -23 645 907 ; -C -1 ; WX 722 ; N Ugrave ; B 85 -23 645 939 ; -C -1 ; WX 667 ; N Yacute ; B 13 0 661 944 ; -C -1 ; WX 667 ; N Ydieresis ; B 13 0 661 907 ; -C -1 ; WX 611 ; N Zcaron ; B 28 0 583 939 ; -C -1 ; WX 556 ; N aacute ; B 42 -23 535 740 ; -C -1 ; WX 556 ; N acircumflex ; B 42 -23 535 741 ; -C -1 ; WX 556 ; N adieresis ; B 42 -23 535 708 ; -C -1 ; WX 556 ; N agrave ; B 42 -23 535 740 ; -C -1 ; WX 556 ; N aring ; B 42 -23 535 741 ; -C -1 ; WX 556 ; N atilde ; B 42 -23 535 716 ; -C -1 ; WX 260 ; N brokenbar ; B 100 -215 160 729 ; -C -1 ; WX 500 ; N ccedilla ; B 31 -214 477 540 ; -C -1 ; WX 737 ; N copyright ; B -13 -23 751 741 ; -C -1 ; WX 400 ; N degree ; B 50 409 350 709 ; -C -1 ; WX 584 ; N divide ; B 50 -10 534 474 ; -C -1 ; WX 556 ; N eacute ; B 40 -23 513 740 ; -C -1 ; WX 556 ; N ecircumflex ; B 40 -23 513 741 ; -C -1 ; WX 556 ; N edieresis ; B 40 -23 513 708 ; -C -1 ; WX 556 ; N egrave ; B 40 -23 513 740 ; -C -1 ; WX 556 ; N eth ; B 36 -23 510 729 ; -C -1 ; WX 278 ; N iacute ; B 65 0 274 740 ; -C -1 ; WX 278 ; N icircumflex ; B -7 0 280 741 ; -C -1 ; WX 278 ; N idieresis ; B 3 0 269 708 ; -C -1 ; WX 278 ; N igrave ; B -5 0 204 740 ; -C -1 ; WX 584 ; N logicalnot ; B 40 82 544 352 ; -C -1 ; WX 584 ; N minus ; B 40 194 544 270 ; -C -1 ; WX 556 ; N mu ; B 65 -219 482 525 ; -C -1 ; WX 584 ; N multiply ; B 50 -10 534 476 ; -C -1 ; WX 556 ; N ntilde ; B 70 0 487 716 ; -C -1 ; WX 556 ; N oacute ; B 36 -23 510 740 ; -C -1 ; WX 556 ; N ocircumflex ; B 36 -23 510 741 ; -C -1 ; WX 556 ; N odieresis ; B 36 -23 510 708 ; -C -1 ; WX 556 ; N ograve ; B 36 -23 510 740 ; -C -1 ; WX 834 ; N onehalf ; B 30 -21 804 709 ; -C -1 ; WX 834 ; N onequarter ; B 30 -21 804 709 ; -C -1 ; WX 333 ; N onesuperior ; B 60 284 219 709 ; -C -1 ; WX 556 ; N otilde ; B 36 -23 510 716 ; -C -1 ; WX 584 ; N plusminus ; B 40 0 544 618 ; -C -1 ; WX 737 ; N registered ; B -13 -23 751 741 ; -C -1 ; WX 500 ; N scaron ; B 34 -24 459 740 ; -C -1 ; WX 556 ; N thorn ; B 54 -219 523 729 ; -C -1 ; WX 834 ; N threequarters ; B 30 -21 804 709 ; -C -1 ; WX 333 ; N threesuperior ; B 12 270 320 709 ; -C -1 ; WX 1000 ; N trademark ; B 63 320 938 741 ; -C -1 ; WX 333 ; N twosuperior ; B 11 284 321 710 ; -C -1 ; WX 556 ; N uacute ; B 65 -23 482 740 ; -C -1 ; WX 556 ; N ucircumflex ; B 65 -23 482 741 ; -C -1 ; WX 556 ; N udieresis ; B 65 -23 482 708 ; -C -1 ; WX 556 ; N ugrave ; B 65 -23 482 740 ; -C -1 ; WX 500 ; N yacute ; B 20 -219 478 740 ; -C -1 ; WX 500 ; N ydieresis ; B 20 -219 478 708 ; -C -1 ; WX 500 ; N zcaron ; B 31 0 457 740 ; -EndCharMetrics -StartKernData -StartKernPairs 105 - -KPX A y -18 -KPX A w -18 -KPX A v -18 -KPX A space -55 -KPX A quoteright -74 -KPX A Y -74 -KPX A W -37 -KPX A V -74 -KPX A T -74 - -KPX F period -111 -KPX F comma -111 -KPX F A -55 - -KPX L y -37 -KPX L space -37 -KPX L quoteright -55 -KPX L Y -74 -KPX L W -74 -KPX L V -74 -KPX L T -74 - -KPX P space -18 -KPX P period -129 -KPX P comma -129 -KPX P A -74 - -KPX R Y -18 -KPX R W -18 -KPX R V -18 -KPX R T -18 - -KPX T y -55 -KPX T w -55 -KPX T u -37 -KPX T space -18 -KPX T semicolon -111 -KPX T s -111 -KPX T r -37 -KPX T period -111 -KPX T o -111 -KPX T i -37 -KPX T hyphen -55 -KPX T e -111 -KPX T comma -111 -KPX T colon -111 -KPX T c -111 -KPX T a -111 -KPX T O -18 -KPX T A -74 - -KPX V y -37 -KPX V u -37 -KPX V semicolon -37 -KPX V r -37 -KPX V period -92 -KPX V o -55 -KPX V i -18 -KPX V hyphen -55 -KPX V e -55 -KPX V comma -92 -KPX V colon -37 -KPX V a -74 -KPX V A -74 - -KPX W y -9 -KPX W u -18 -KPX W semicolon -18 -KPX W r -18 -KPX W period -55 -KPX W o -18 -KPX W i 0 -KPX W hyphen -18 -KPX W e -18 -KPX W comma -55 -KPX W colon -18 -KPX W a -37 -KPX W A -37 - -KPX Y v -55 -KPX Y u -55 -KPX Y space -18 -KPX Y semicolon -65 -KPX Y q -92 -KPX Y period -129 -KPX Y p -74 -KPX Y o -92 -KPX Y i -37 -KPX Y hyphen -92 -KPX Y e -92 -KPX Y comma -129 -KPX Y colon -55 -KPX Y a -74 -KPX Y A -74 - -KPX f quoteright 18 -KPX f f -18 - -KPX one one -74 - -KPX quoteleft quoteleft -18 - -KPX quoteright space -37 -KPX quoteright s -18 -KPX quoteright quoteright -18 - -KPX r quoteright 37 -KPX r period -55 -KPX r comma -55 - -KPX space Y -18 -KPX space T -18 -KPX space A -55 - -KPX v period -74 -KPX v comma -74 - -KPX w period -55 -KPX w comma -55 - -KPX y period -74 -KPX y comma -74 -EndKernPairs -EndKernData -StartComposites 56 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 199 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 83 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 167 199 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 83 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 207 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 96 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 167 199 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 83 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 194 199 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 194 199 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 194 199 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 194 199 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 111 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 111 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 111 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 111 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute -21 199 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -21 199 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -21 199 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave -21 199 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 188 199 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 188 199 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 188 199 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 188 199 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 117 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 117 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 117 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 117 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 167 199 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 167 199 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 167 199 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 167 199 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 111 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 111 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 111 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 111 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 222 199 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 222 199 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 222 199 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 222 199 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 111 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 111 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 111 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 111 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 167 199 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 111 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 200 199 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 117 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 222 199 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 111 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 167 199 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 111 0 ; -EndComposites -EndFontMetrics diff --git a/misc/afm/HelvBo.afm b/misc/afm/HelvBo.afm deleted file mode 100644 index 5f14f52069..0000000000 --- a/misc/afm/HelvBo.afm +++ /dev/null @@ -1,431 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Tue Aug 5 11:40:08 PDT 1986 -FontName Helvetica-Bold -EncodingScheme AdobeStandardEncoding -FullName Helvetica Bold -FamilyName Helvetica -Weight Bold -ItalicAngle 0.0 -IsFixedPitch false -UnderlinePosition -106 -UnderlineThickness 73 -Version 001.001 -Notice Helvetica is a registered trademark of Allied Corporation. -FontBBox -173 -221 1003 936 -CapHeight 729 -XHeight 542 -Descender -219 -Ascender 729 -StartCharMetrics 228 -C 32 ; WX 278 ; N space ; B 0 0 0 0 ; -C 33 ; WX 333 ; N exclam ; B 112 0 262 729 ; -C 34 ; WX 474 ; N quotedbl ; B 50 470 424 729 ; -C 35 ; WX 556 ; N numbersign ; B 3 -30 553 696 ; -C 36 ; WX 556 ; N dollar ; B 22 -125 526 765 ; -C 37 ; WX 889 ; N percent ; B 22 -18 863 708 ; -C 38 ; WX 722 ; N ampersand ; B 55 -20 694 729 ; -C 39 ; WX 278 ; N quoteright ; B 66 469 201 729 ; -C 40 ; WX 333 ; N parenleft ; B 40 -202 303 729 ; -C 41 ; WX 333 ; N parenright ; B 22 -202 285 729 ; -C 42 ; WX 389 ; N asterisk ; B 23 385 356 730 ; -C 43 ; WX 584 ; N plus ; B 50 -10 534 474 ; -C 44 ; WX 278 ; N comma ; B 64 -174 214 146 ; -C 45 ; WX 333 ; N hyphen ; B 26 208 298 344 ; -C 46 ; WX 278 ; N period ; B 64 0 214 146 ; -C 47 ; WX 278 ; N slash ; B 2 -14 275 715 ; -C 48 ; WX 556 ; N zero ; B 29 -23 517 725 ; -C 49 ; WX 556 ; N one ; B 68 0 378 709 ; -C 50 ; WX 556 ; N two ; B 30 0 515 726 ; -C 51 ; WX 556 ; N three ; B 29 -23 516 726 ; -C 52 ; WX 556 ; N four ; B 24 0 522 709 ; -C 53 ; WX 556 ; N five ; B 27 -24 517 709 ; -C 54 ; WX 556 ; N six ; B 32 -23 519 727 ; -C 55 ; WX 556 ; N seven ; B 29 0 528 709 ; -C 56 ; WX 556 ; N eight ; B 22 -23 525 726 ; -C 57 ; WX 556 ; N nine ; B 28 -23 516 728 ; -C 58 ; WX 333 ; N colon ; B 113 0 263 521 ; -C 59 ; WX 333 ; N semicolon ; B 113 -174 263 521 ; -C 60 ; WX 584 ; N less ; B 40 -10 529 474 ; -C 61 ; WX 584 ; N equal ; B 50 52 534 412 ; -C 62 ; WX 584 ; N greater ; B 40 -10 529 474 ; -C 63 ; WX 611 ; N question ; B 64 0 556 744 ; -C 64 ; WX 975 ; N at ; B 27 -136 947 746 ; -C 65 ; WX 722 ; N A ; B 26 0 703 729 ; -C 66 ; WX 722 ; N B ; B 82 0 666 729 ; -C 67 ; WX 722 ; N C ; B 44 -23 685 741 ; -C 68 ; WX 722 ; N D ; B 77 0 681 729 ; -C 69 ; WX 667 ; N E ; B 79 0 624 729 ; -C 70 ; WX 611 ; N F ; B 74 0 586 729 ; -C 71 ; WX 778 ; N G ; B 42 -24 711 741 ; -C 72 ; WX 722 ; N H ; B 68 0 657 729 ; -C 73 ; WX 278 ; N I ; B 63 0 213 729 ; -C 74 ; WX 556 ; N J ; B 24 -23 486 729 ; -C 75 ; WX 722 ; N K ; B 74 0 717 729 ; -C 76 ; WX 611 ; N L ; B 80 0 579 729 ; -C 77 ; WX 833 ; N M ; B 66 0 776 729 ; -C 78 ; WX 722 ; N N ; B 68 0 661 729 ; -C 79 ; WX 778 ; N O ; B 40 -23 742 741 ; -C 80 ; WX 667 ; N P ; B 76 0 633 729 ; -C 81 ; WX 778 ; N Q ; B 43 -54 745 741 ; -C 82 ; WX 722 ; N R ; B 80 0 677 729 ; -C 83 ; WX 667 ; N S ; B 32 -23 633 741 ; -C 84 ; WX 611 ; N T ; B 14 0 598 729 ; -C 85 ; WX 722 ; N U ; B 76 -23 654 729 ; -C 86 ; WX 667 ; N V ; B 24 0 647 729 ; -C 87 ; WX 944 ; N W ; B 13 0 932 729 ; -C 88 ; WX 667 ; N X ; B 22 0 653 729 ; -C 89 ; WX 667 ; N Y ; B 27 0 650 729 ; -C 90 ; WX 611 ; N Z ; B 30 0 578 729 ; -C 91 ; WX 333 ; N bracketleft ; B 66 -202 308 729 ; -C 92 ; WX 278 ; N backslash ; B -12 -21 289 708 ; -C 93 ; WX 333 ; N bracketright ; B 18 -202 260 729 ; -C 94 ; WX 584 ; N asciicircum ; B 61 271 522 696 ; -C 95 ; WX 556 ; N underscore ; B -22 -200 578 -130 ; -C 96 ; WX 278 ; N quoteleft ; B 67 469 202 729 ; -C 97 ; WX 556 ; N a ; B 27 -24 524 551 ; -C 98 ; WX 611 ; N b ; B 59 -23 575 729 ; -C 99 ; WX 556 ; N c ; B 34 -23 522 551 ; -C 100 ; WX 611 ; N d ; B 29 -23 545 729 ; -C 101 ; WX 556 ; N e ; B 22 -23 525 551 ; -C 102 ; WX 333 ; N f ; B 14 0 313 729 ; L i fi ; L l fl ; -C 103 ; WX 611 ; N g ; B 34 -220 541 551 ; -C 104 ; WX 611 ; N h ; B 67 0 541 729 ; -C 105 ; WX 278 ; N i ; B 67 0 207 729 ; -C 106 ; WX 278 ; N j ; B 4 -219 210 729 ; -C 107 ; WX 556 ; N k ; B 59 0 548 729 ; -C 108 ; WX 278 ; N l ; B 67 0 207 729 ; -C 109 ; WX 889 ; N m ; B 60 0 824 553 ; -C 110 ; WX 611 ; N n ; B 63 0 546 551 ; -C 111 ; WX 611 ; N o ; B 35 -23 569 551 ; -C 112 ; WX 611 ; N p ; B 58 -219 574 551 ; -C 113 ; WX 611 ; N q ; B 28 -219 544 551 ; -C 114 ; WX 389 ; N r ; B 63 0 370 553 ; -C 115 ; WX 556 ; N s ; B 29 -23 520 551 ; -C 116 ; WX 333 ; N t ; B 14 -23 301 678 ; -C 117 ; WX 611 ; N u ; B 58 -23 541 542 ; -C 118 ; WX 556 ; N v ; B 14 0 536 542 ; -C 119 ; WX 778 ; N w ; B 5 0 766 542 ; -C 120 ; WX 556 ; N x ; B 16 0 535 542 ; -C 121 ; WX 556 ; N y ; B 9 -219 538 542 ; -C 122 ; WX 500 ; N z ; B 21 0 468 542 ; -C 123 ; WX 389 ; N braceleft ; B 37 -202 317 729 ; -C 124 ; WX 280 ; N bar ; B 100 -202 180 729 ; -C 125 ; WX 389 ; N braceright ; B 72 -202 352 729 ; -C 126 ; WX 584 ; N asciitilde ; B 60 144 519 322 ; -C 161 ; WX 333 ; N exclamdown ; B 66 -187 216 542 ; -C 162 ; WX 556 ; N cent ; B 37 -122 522 637 ; -C 163 ; WX 556 ; N sterling ; B 31 -20 537 717 ; -C 164 ; WX 167 ; N fraction ; B -173 -20 337 715 ; -C 165 ; WX 556 ; N yen ; B 5 0 552 705 ; -C 166 ; WX 556 ; N florin ; B 21 -221 535 745 ; -C 167 ; WX 556 ; N section ; B 33 -201 518 728 ; -C 168 ; WX 556 ; N currency ; B 26 105 530 604 ; -C 169 ; WX 238 ; N quotesingle ; B 50 469 188 729 ; -C 170 ; WX 500 ; N quotedblleft ; B 71 469 433 729 ; -C 171 ; WX 556 ; N guillemotleft ; B 88 71 468 484 ; -C 172 ; WX 333 ; N guilsinglleft ; B 83 73 250 476 ; -C 173 ; WX 333 ; N guilsinglright ; B 80 73 247 476 ; -C 174 ; WX 611 ; N fi ; B 9 0 548 729 ; -C 175 ; WX 611 ; N fl ; B 12 0 546 729 ; -C 177 ; WX 556 ; N endash ; B -9 208 557 313 ; -C 178 ; WX 556 ; N dagger ; B 31 -195 523 708 ; -C 179 ; WX 556 ; N daggerdbl ; B 28 -195 520 708 ; -C 180 ; WX 278 ; N periodcentered ; B 64 318 188 442 ; -C 182 ; WX 556 ; N paragraph ; B 20 -195 529 729 ; -C 183 ; WX 350 ; N bullet ; B 50 175 300 425 ; -C 184 ; WX 278 ; N quotesinglbase ; B 66 -135 201 125 ; -C 185 ; WX 500 ; N quotedblbase ; B 72 -164 432 141 ; -C 186 ; WX 500 ; N quotedblright ; B 73 469 440 729 ; -C 187 ; WX 556 ; N guillemotright ; B 88 71 462 482 ; -C 188 ; WX 1000 ; N ellipsis ; B 92 0 908 146 ; -C 189 ; WX 1000 ; N perthousand ; B 11 -20 990 745 ; -C 191 ; WX 611 ; N questiondown ; B 51 -192 544 542 ; -C 193 ; WX 333 ; N grave ; B 17 595 213 745 ; -C 194 ; WX 333 ; N acute ; B 121 595 317 745 ; -C 195 ; WX 333 ; N circumflex ; B 8 598 326 745 ; -C 196 ; WX 333 ; N tilde ; B -9 595 345 729 ; -C 197 ; WX 333 ; N macron ; B 16 629 315 717 ; -C 198 ; WX 333 ; N breve ; B 35 593 299 736 ; -C 199 ; WX 333 ; N dotaccent ; B 112 607 222 729 ; -C 200 ; WX 333 ; N dieresis ; B 18 609 314 731 ; -C 202 ; WX 333 ; N ring ; B 77 565 257 745 ; -C 203 ; WX 333 ; N cedilla ; B 27 -220 294 -9 ; -C 205 ; WX 333 ; N hungarumlaut ; B -44 595 340 745 ; -C 206 ; WX 333 ; N ogonek ; B 45 -195 268 38 ; -C 207 ; WX 333 ; N caron ; B 9 598 327 745 ; -C 208 ; WX 1000 ; N emdash ; B -7 208 1003 313 ; -C 225 ; WX 1000 ; N AE ; B 1 0 966 729 ; -C 227 ; WX 370 ; N ordfeminine ; B 31 277 329 746 ; -C 232 ; WX 611 ; N Lslash ; B 0 0 597 729 ; -C 233 ; WX 778 ; N Oslash ; B 31 -34 755 754 ; -C 234 ; WX 1000 ; N OE ; B 28 -20 970 741 ; -C 235 ; WX 365 ; N ordmasculine ; B 23 276 343 745 ; -C 241 ; WX 889 ; N ae ; B 27 -20 857 555 ; -C 245 ; WX 278 ; N dotlessi ; B 67 0 207 542 ; -C 248 ; WX 278 ; N lslash ; B 0 0 252 729 ; -C 249 ; WX 611 ; N oslash ; B 11 -34 598 561 ; -C 250 ; WX 944 ; N oe ; B 23 -21 920 554 ; -C 251 ; WX 611 ; N germandbls ; B 67 -16 575 730 ; -C -1 ; WX 722 ; N Aacute ; B 26 0 703 936 ; -C -1 ; WX 722 ; N Acircumflex ; B 26 0 703 936 ; -C -1 ; WX 722 ; N Adieresis ; B 26 0 703 922 ; -C -1 ; WX 722 ; N Agrave ; B 26 0 703 936 ; -C -1 ; WX 722 ; N Aring ; B 26 0 703 936 ; -C -1 ; WX 722 ; N Atilde ; B 26 0 703 920 ; -C -1 ; WX 722 ; N Ccedilla ; B 44 -220 685 741 ; -C -1 ; WX 667 ; N Eacute ; B 79 0 624 936 ; -C -1 ; WX 667 ; N Ecircumflex ; B 79 0 624 936 ; -C -1 ; WX 667 ; N Edieresis ; B 79 0 624 922 ; -C -1 ; WX 667 ; N Egrave ; B 79 0 624 936 ; -C -1 ; WX 722 ; N Eth ; B -18 0 681 729 ; -C -1 ; WX 278 ; N Iacute ; B 63 0 290 936 ; -C -1 ; WX 278 ; N Icircumflex ; B -19 0 299 936 ; -C -1 ; WX 278 ; N Idieresis ; B -9 0 287 922 ; -C -1 ; WX 278 ; N Igrave ; B -10 0 213 936 ; -C -1 ; WX 722 ; N Ntilde ; B 68 0 661 920 ; -C -1 ; WX 778 ; N Oacute ; B 40 -23 742 936 ; -C -1 ; WX 778 ; N Ocircumflex ; B 40 -23 742 936 ; -C -1 ; WX 778 ; N Odieresis ; B 40 -23 742 922 ; -C -1 ; WX 778 ; N Ograve ; B 40 -23 742 936 ; -C -1 ; WX 778 ; N Otilde ; B 40 -23 742 920 ; -C -1 ; WX 667 ; N Scaron ; B 32 -23 633 936 ; -C -1 ; WX 667 ; N Thorn ; B 76 0 633 729 ; -C -1 ; WX 722 ; N Uacute ; B 76 -23 654 936 ; -C -1 ; WX 722 ; N Ucircumflex ; B 76 -23 654 936 ; -C -1 ; WX 722 ; N Udieresis ; B 76 -23 654 922 ; -C -1 ; WX 722 ; N Ugrave ; B 76 -23 654 936 ; -C -1 ; WX 667 ; N Yacute ; B 27 0 650 932 ; -C -1 ; WX 667 ; N Ydieresis ; B 27 0 650 922 ; -C -1 ; WX 611 ; N Zcaron ; B 30 0 578 936 ; -C -1 ; WX 556 ; N aacute ; B 27 -24 524 745 ; -C -1 ; WX 556 ; N acircumflex ; B 27 -24 524 745 ; -C -1 ; WX 556 ; N adieresis ; B 27 -24 524 731 ; -C -1 ; WX 556 ; N agrave ; B 27 -24 524 745 ; -C -1 ; WX 556 ; N aring ; B 27 -24 524 745 ; -C -1 ; WX 556 ; N atilde ; B 27 -24 524 729 ; -C -1 ; WX 280 ; N brokenbar ; B 100 -202 180 729 ; -C -1 ; WX 556 ; N ccedilla ; B 34 -220 522 551 ; -C -1 ; WX 737 ; N copyright ; B -14 -20 751 745 ; -C -1 ; WX 400 ; N degree ; B 50 425 350 725 ; -C -1 ; WX 584 ; N divide ; B 50 -10 534 474 ; -C -1 ; WX 556 ; N eacute ; B 22 -23 525 745 ; -C -1 ; WX 556 ; N ecircumflex ; B 22 -23 525 745 ; -C -1 ; WX 556 ; N edieresis ; B 22 -23 525 731 ; -C -1 ; WX 556 ; N egrave ; B 22 -23 525 745 ; -C -1 ; WX 611 ; N eth ; B 35 -23 569 730 ; -C -1 ; WX 278 ; N iacute ; B 67 0 290 745 ; -C -1 ; WX 278 ; N icircumflex ; B -19 0 299 745 ; -C -1 ; WX 278 ; N idieresis ; B -9 0 287 731 ; -C -1 ; WX 278 ; N igrave ; B -10 0 207 745 ; -C -1 ; WX 584 ; N logicalnot ; B 40 121 544 412 ; -C -1 ; WX 584 ; N minus ; B 40 174 544 290 ; -C -1 ; WX 611 ; N mu ; B 58 -219 541 542 ; -C -1 ; WX 584 ; N multiply ; B 50 -10 534 474 ; -C -1 ; WX 611 ; N ntilde ; B 63 0 546 729 ; -C -1 ; WX 611 ; N oacute ; B 35 -23 569 745 ; -C -1 ; WX 611 ; N ocircumflex ; B 35 -23 569 745 ; -C -1 ; WX 611 ; N odieresis ; B 35 -23 569 731 ; -C -1 ; WX 611 ; N ograve ; B 35 -23 569 745 ; -C -1 ; WX 834 ; N onehalf ; B 30 -20 803 715 ; -C -1 ; WX 834 ; N onequarter ; B 30 -20 804 715 ; -C -1 ; WX 333 ; N onesuperior ; B 46 284 247 709 ; -C -1 ; WX 611 ; N otilde ; B 35 -23 569 729 ; -C -1 ; WX 584 ; N plusminus ; B 40 0 544 674 ; -C -1 ; WX 737 ; N registered ; B -14 -20 751 745 ; -C -1 ; WX 556 ; N scaron ; B 29 -23 520 745 ; -C -1 ; WX 611 ; N thorn ; B 58 -219 574 729 ; -C -1 ; WX 834 ; N threequarters ; B 30 -20 804 725 ; -C -1 ; WX 333 ; N threesuperior ; B 8 271 325 720 ; -C -1 ; WX 1000 ; N trademark ; B 71 341 929 745 ; -C -1 ; WX 333 ; N twosuperior ; B 9 284 324 719 ; -C -1 ; WX 611 ; N uacute ; B 58 -23 541 745 ; -C -1 ; WX 611 ; N ucircumflex ; B 58 -23 541 745 ; -C -1 ; WX 611 ; N udieresis ; B 58 -23 541 731 ; -C -1 ; WX 611 ; N ugrave ; B 58 -23 541 745 ; -C -1 ; WX 556 ; N yacute ; B 9 -219 538 745 ; -C -1 ; WX 556 ; N ydieresis ; B 9 -219 538 731 ; -C -1 ; WX 500 ; N zcaron ; B 21 0 468 745 ; -EndCharMetrics -StartKernData -StartKernPairs 101 - -KPX A y -37 -KPX A w -18 -KPX A v -37 -KPX A space -37 -KPX A quoteright -55 -KPX A Y -92 -KPX A W -55 -KPX A V -74 -KPX A T -74 - -KPX F period -111 -KPX F comma -111 -KPX F A -55 - -KPX L y -37 -KPX L space -18 -KPX L quoteright -55 -KPX L Y -92 -KPX L W -55 -KPX L V -74 -KPX L T -74 - -KPX P space -18 -KPX P period -129 -KPX P comma -129 -KPX P A -74 - -KPX R Y -37 -KPX R W -18 -KPX R V -18 - -KPX T y -74 -KPX T w -74 -KPX T u -74 -KPX T semicolon -111 -KPX T s -74 -KPX T r -55 -KPX T period -111 -KPX T o -74 -KPX T i -18 -KPX T hyphen -55 -KPX T e -74 -KPX T comma -111 -KPX T colon -111 -KPX T c -74 -KPX T a -74 -KPX T O -18 -KPX T A -74 - -KPX V y -37 -KPX V u -37 -KPX V semicolon -55 -KPX V r -55 -KPX V period -92 -KPX V o -74 -KPX V i -18 -KPX V hyphen -55 -KPX V e -55 -KPX V comma -92 -KPX V colon -55 -KPX V a -55 -KPX V A -74 - -KPX W y -18 -KPX W u -18 -KPX W semicolon -18 -KPX W r -18 -KPX W period -55 -KPX W o -18 -KPX W i -9 -KPX W hyphen -20 -KPX W e -18 -KPX W comma -55 -KPX W colon -18 -KPX W a -37 -KPX W A -55 - -KPX Y v -55 -KPX Y u -55 -KPX Y space -18 -KPX Y semicolon -74 -KPX Y q -74 -KPX Y period -111 -KPX Y p -55 -KPX Y o -74 -KPX Y i -37 -KPX Y hyphen -55 -KPX Y e -55 -KPX Y comma -111 -KPX Y colon -74 -KPX Y a -55 -KPX Y A -92 - -KPX f quoteright 18 - -KPX one one -55 - -KPX quoteleft quoteleft -37 - -KPX quoteright space -55 -KPX quoteright s -37 -KPX quoteright quoteright -37 - -KPX r quoteright 37 -KPX r period -55 -KPX r comma -55 - -KPX space Y -18 -KPX space A -37 - -KPX v period -74 -KPX v comma -74 - -KPX w period -37 -KPX w comma -37 - -KPX y period -74 -KPX y comma -74 -EndKernPairs -EndKernData -StartComposites 56 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 191 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 83 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 167 191 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 111 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 207 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 117 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 167 191 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 111 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 197 191 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 197 191 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 197 191 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 197 191 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 139 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 139 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 139 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 139 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute -27 191 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -27 191 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -27 191 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave -27 191 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 188 191 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 188 191 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 188 191 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 188 191 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 111 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 111 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 111 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 111 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 197 191 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 197 191 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 197 191 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 197 191 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 111 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 111 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 111 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 111 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 222 191 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 222 191 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 222 191 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 222 191 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 139 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 139 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 139 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 139 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 197 191 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 111 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 200 191 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 146 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 222 191 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 139 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 197 191 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 111 0 ; -EndComposites -EndFontMetrics diff --git a/misc/afm/HelvBoO.afm b/misc/afm/HelvBoO.afm deleted file mode 100644 index dfe3bef5cc..0000000000 --- a/misc/afm/HelvBoO.afm +++ /dev/null @@ -1,429 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Tue Aug 5 11:51:40 PDT 1986 -FontName Helvetica-BoldOblique -EncodingScheme AdobeStandardEncoding -FullName Helvetica Bold Oblique -FamilyName Helvetica -Weight Bold -ItalicAngle -12.0 -IsFixedPitch false -UnderlinePosition -106 -UnderlineThickness 105 -Version 001.001 -Notice Helvetica is a registered trademark of Allied Corporation -FontBBox -177 -221 1107 936 -CapHeight 729 -XHeight 542 -Descender -219 -Ascender 729 -StartCharMetrics 228 -C 32 ; WX 278 ; N space ; B 0 0 0 0 ; -C 33 ; WX 333 ; N exclam ; B 112 0 417 729 ; -C 34 ; WX 474 ; N quotedbl ; B 177 470 579 729 ; -C 35 ; WX 556 ; N numbersign ; B 33 -30 660 696 ; -C 36 ; WX 556 ; N dollar ; B 59 -125 628 765 ; -C 37 ; WX 889 ; N percent ; B 129 -18 903 708 ; -C 38 ; WX 722 ; N ampersand ; B 89 -20 720 729 ; -C 39 ; WX 278 ; N quoteright ; B 166 469 356 729 ; -C 40 ; WX 333 ; N parenleft ; B 84 -202 458 729 ; -C 41 ; WX 333 ; N parenright ; B -21 -202 356 729 ; -C 42 ; WX 389 ; N asterisk ; B 145 385 478 730 ; -C 43 ; WX 584 ; N plus ; B 87 -10 596 474 ; -C 44 ; WX 278 ; N comma ; B 27 -174 245 146 ; -C 45 ; WX 333 ; N hyphen ; B 70 208 371 344 ; -C 46 ; WX 278 ; N period ; B 64 0 245 146 ; -C 47 ; WX 278 ; N slash ; B -1 -14 427 715 ; -C 48 ; WX 556 ; N zero ; B 81 -23 614 725 ; -C 49 ; WX 556 ; N one ; B 172 0 529 709 ; -C 50 ; WX 556 ; N two ; B 30 0 628 726 ; -C 51 ; WX 556 ; N three ; B 67 -23 613 726 ; -C 52 ; WX 556 ; N four ; B 57 0 599 709 ; -C 53 ; WX 556 ; N five ; B 59 -24 641 709 ; -C 54 ; WX 556 ; N six ; B 85 -23 625 727 ; -C 55 ; WX 556 ; N seven ; B 131 0 679 709 ; -C 56 ; WX 556 ; N eight ; B 60 -23 620 726 ; -C 57 ; WX 556 ; N nine ; B 68 -23 611 728 ; -C 58 ; WX 333 ; N colon ; B 113 0 374 521 ; -C 59 ; WX 333 ; N semicolon ; B 76 -174 374 521 ; -C 60 ; WX 584 ; N less ; B 77 -10 630 474 ; -C 61 ; WX 584 ; N equal ; B 61 52 622 412 ; -C 62 ; WX 584 ; N greater ; B 38 -10 591 474 ; -C 63 ; WX 611 ; N question ; B 168 0 672 744 ; -C 64 ; WX 975 ; N at ; B 73 -136 1032 746 ; -C 65 ; WX 722 ; N A ; B 26 0 703 729 ; -C 66 ; WX 722 ; N B ; B 82 0 762 729 ; -C 67 ; WX 722 ; N C ; B 107 -23 793 741 ; -C 68 ; WX 722 ; N D ; B 77 0 776 729 ; -C 69 ; WX 667 ; N E ; B 79 0 762 729 ; -C 70 ; WX 611 ; N F ; B 74 0 741 729 ; -C 71 ; WX 778 ; N G ; B 107 -24 819 741 ; -C 72 ; WX 722 ; N H ; B 68 0 812 729 ; -C 73 ; WX 278 ; N I ; B 63 0 368 729 ; -C 74 ; WX 556 ; N J ; B 59 -23 641 729 ; -C 75 ; WX 722 ; N K ; B 74 0 843 729 ; -C 76 ; WX 611 ; N L ; B 80 0 606 729 ; -C 77 ; WX 833 ; N M ; B 66 0 931 729 ; -C 78 ; WX 722 ; N N ; B 68 0 816 729 ; -C 79 ; WX 778 ; N O ; B 106 -23 828 741 ; -C 80 ; WX 667 ; N P ; B 76 0 747 729 ; -C 81 ; WX 778 ; N Q ; B 109 -54 831 741 ; -C 82 ; WX 722 ; N R ; B 80 0 785 729 ; -C 83 ; WX 667 ; N S ; B 76 -23 725 741 ; -C 84 ; WX 611 ; N T ; B 142 0 753 729 ; -C 85 ; WX 722 ; N U ; B 119 -23 809 729 ; -C 86 ; WX 667 ; N V ; B 179 0 802 729 ; -C 87 ; WX 944 ; N W ; B 168 0 1087 729 ; -C 88 ; WX 667 ; N X ; B 22 0 802 729 ; -C 89 ; WX 667 ; N Y ; B 182 0 805 729 ; -C 90 ; WX 611 ; N Z ; B 30 0 733 729 ; -C 91 ; WX 333 ; N bracketleft ; B 23 -202 463 729 ; -C 92 ; WX 278 ; N backslash ; B 138 -21 285 708 ; -C 93 ; WX 333 ; N bracketright ; B -25 -202 415 729 ; -C 94 ; WX 584 ; N asciicircum ; B 119 271 580 696 ; -C 95 ; WX 556 ; N underscore ; B -65 -200 550 -130 ; -C 96 ; WX 278 ; N quoteleft ; B 167 469 357 729 ; -C 97 ; WX 556 ; N a ; B 50 -24 578 551 ; -C 98 ; WX 611 ; N b ; B 59 -23 640 729 ; -C 99 ; WX 556 ; N c ; B 77 -23 597 551 ; -C 100 ; WX 611 ; N d ; B 79 -23 700 729 ; -C 101 ; WX 556 ; N e ; B 64 -23 591 551 ; -C 102 ; WX 333 ; N f ; B 90 0 464 729 ; L i fi ; L l fl ; -C 103 ; WX 611 ; N g ; B 26 -220 656 551 ; -C 104 ; WX 611 ; N h ; B 67 0 629 729 ; -C 105 ; WX 278 ; N i ; B 67 0 362 729 ; -C 106 ; WX 278 ; N j ; B -43 -219 365 729 ; -C 107 ; WX 556 ; N k ; B 59 0 651 729 ; -C 108 ; WX 278 ; N l ; B 67 0 362 729 ; -C 109 ; WX 889 ; N m ; B 60 0 911 553 ; -C 110 ; WX 611 ; N n ; B 63 0 629 551 ; -C 111 ; WX 611 ; N o ; B 82 -23 634 551 ; -C 112 ; WX 611 ; N p ; B 11 -219 637 551 ; -C 113 ; WX 611 ; N q ; B 72 -219 659 551 ; -C 114 ; WX 389 ; N r ; B 63 0 487 553 ; -C 115 ; WX 556 ; N s ; B 60 -23 589 551 ; -C 116 ; WX 333 ; N t ; B 101 -23 414 678 ; -C 117 ; WX 611 ; N u ; B 88 -23 656 542 ; -C 118 ; WX 556 ; N v ; B 129 0 651 542 ; -C 119 ; WX 778 ; N w ; B 120 0 881 542 ; -C 120 ; WX 556 ; N x ; B 16 0 648 542 ; -C 121 ; WX 556 ; N y ; B 37 -219 653 542 ; -C 122 ; WX 500 ; N z ; B 21 0 575 542 ; -C 123 ; WX 389 ; N braceleft ; B 84 -202 472 729 ; -C 124 ; WX 280 ; N bar ; B 57 -202 335 729 ; -C 125 ; WX 389 ; N braceright ; B 29 -202 419 729 ; -C 126 ; WX 584 ; N asciitilde ; B 97 144 581 322 ; -C 161 ; WX 333 ; N exclamdown ; B 26 -187 331 542 ; -C 162 ; WX 556 ; N cent ; B 79 -122 598 637 ; -C 163 ; WX 556 ; N sterling ; B 49 -20 629 717 ; -C 164 ; WX 167 ; N fraction ; B -177 -20 489 715 ; -C 165 ; WX 556 ; N yen ; B 107 0 702 705 ; -C 166 ; WX 556 ; N florin ; B -21 -221 690 745 ; -C 167 ; WX 556 ; N section ; B 56 -201 596 728 ; -C 168 ; WX 556 ; N currency ; B 66 105 644 604 ; -C 169 ; WX 238 ; N quotesingle ; B 177 469 343 729 ; -C 170 ; WX 500 ; N quotedblleft ; B 171 469 588 729 ; -C 171 ; WX 556 ; N guillemotleft ; B 135 71 571 484 ; -C 172 ; WX 333 ; N guilsinglleft ; B 128 73 351 476 ; -C 173 ; WX 333 ; N guilsinglright ; B 96 73 319 476 ; -C 174 ; WX 611 ; N fi ; B 85 0 703 729 ; -C 175 ; WX 611 ; N fl ; B 88 0 701 729 ; -C 177 ; WX 556 ; N endash ; B 35 208 624 313 ; -C 178 ; WX 556 ; N dagger ; B 109 -195 626 708 ; -C 179 ; WX 556 ; N daggerdbl ; B 35 -195 623 708 ; -C 180 ; WX 278 ; N periodcentered ; B 143 318 270 442 ; -C 182 ; WX 556 ; N paragraph ; B 121 -195 684 729 ; -C 183 ; WX 350 ; N bullet ; B 111 175 367 425 ; -C 184 ; WX 278 ; N quotesinglbase ; B 37 -135 228 125 ; -C 185 ; WX 500 ; N quotedblbase ; B 37 -164 462 141 ; -C 186 ; WX 500 ; N quotedblright ; B 173 469 595 729 ; -C 187 ; WX 556 ; N guillemotright ; B 103 71 533 482 ; -C 188 ; WX 1000 ; N ellipsis ; B 92 0 939 146 ; -C 189 ; WX 1000 ; N perthousand ; B 72 -20 1021 745 ; -C 191 ; WX 611 ; N questiondown ; B 52 -192 556 542 ; -C 193 ; WX 333 ; N grave ; B 175 595 339 745 ; -C 194 ; WX 333 ; N acute ; B 247 595 475 745 ; -C 195 ; WX 333 ; N circumflex ; B 135 598 453 745 ; -C 196 ; WX 333 ; N tilde ; B 117 595 500 729 ; -C 197 ; WX 333 ; N macron ; B 150 629 467 717 ; -C 198 ; WX 333 ; N breve ; B 188 593 455 736 ; -C 199 ; WX 333 ; N dotaccent ; B 241 607 377 729 ; -C 200 ; WX 333 ; N dieresis ; B 147 609 469 731 ; -C 202 ; WX 333 ; N ring ; B 214 565 398 745 ; -C 203 ; WX 333 ; N cedilla ; B -13 -220 270 -9 ; -C 205 ; WX 333 ; N hungarumlaut ; B 82 595 498 745 ; -C 206 ; WX 333 ; N ogonek ; B 23 -195 248 38 ; -C 207 ; WX 333 ; N caron ; B 167 598 485 745 ; -C 208 ; WX 1000 ; N emdash ; B 37 208 1070 313 ; -C 225 ; WX 1000 ; N AE ; B 1 0 1104 729 ; -C 227 ; WX 370 ; N ordfeminine ; B 96 277 451 746 ; -C 232 ; WX 611 ; N Lslash ; B 54 0 624 729 ; -C 233 ; WX 778 ; N Oslash ; B 34 -34 906 754 ; -C 234 ; WX 1000 ; N OE ; B 90 -20 1107 741 ; -C 235 ; WX 365 ; N ordmasculine ; B 92 276 471 745 ; -C 241 ; WX 889 ; N ae ; B 54 -20 927 555 ; -C 245 ; WX 278 ; N dotlessi ; B 67 0 322 542 ; -C 248 ; WX 278 ; N lslash ; B 50 0 372 729 ; -C 249 ; WX 611 ; N oslash ; B 12 -34 709 561 ; -C 250 ; WX 944 ; N oe ; B 71 -21 986 554 ; -C 251 ; WX 611 ; N germandbls ; B 67 -16 654 730 ; -C -1 ; WX 722 ; N Aacute ; B 26 0 714 936 ; -C -1 ; WX 722 ; N Acircumflex ; B 26 0 703 936 ; -C -1 ; WX 722 ; N Adieresis ; B 26 0 708 922 ; -C -1 ; WX 722 ; N Agrave ; B 26 0 703 936 ; -C -1 ; WX 722 ; N Aring ; B 26 0 703 936 ; -C -1 ; WX 722 ; N Atilde ; B 26 0 739 920 ; -C -1 ; WX 722 ; N Ccedilla ; B 107 -220 793 741 ; -C -1 ; WX 667 ; N Eacute ; B 79 0 762 936 ; -C -1 ; WX 667 ; N Ecircumflex ; B 79 0 762 936 ; -C -1 ; WX 667 ; N Edieresis ; B 79 0 762 922 ; -C -1 ; WX 667 ; N Egrave ; B 79 0 762 936 ; -C -1 ; WX 722 ; N Eth ; B 53 0 776 729 ; -C -1 ; WX 278 ; N Iacute ; B 63 0 489 936 ; -C -1 ; WX 278 ; N Icircumflex ; B 63 0 467 936 ; -C -1 ; WX 278 ; N Idieresis ; B 63 0 483 922 ; -C -1 ; WX 278 ; N Igrave ; B 63 0 368 936 ; -C -1 ; WX 722 ; N Ntilde ; B 68 0 816 920 ; -C -1 ; WX 778 ; N Oacute ; B 106 -23 828 936 ; -C -1 ; WX 778 ; N Ocircumflex ; B 106 -23 828 936 ; -C -1 ; WX 778 ; N Odieresis ; B 106 -23 828 922 ; -C -1 ; WX 778 ; N Ograve ; B 106 -23 828 936 ; -C -1 ; WX 778 ; N Otilde ; B 106 -23 828 920 ; -C -1 ; WX 667 ; N Scaron ; B 76 -23 725 936 ; -C -1 ; WX 667 ; N Thorn ; B 76 0 730 729 ; -C -1 ; WX 722 ; N Uacute ; B 119 -23 809 936 ; -C -1 ; WX 722 ; N Ucircumflex ; B 119 -23 809 936 ; -C -1 ; WX 722 ; N Udieresis ; B 119 -23 809 922 ; -C -1 ; WX 722 ; N Ugrave ; B 119 -23 809 936 ; -C -1 ; WX 667 ; N Yacute ; B 182 0 805 932 ; -C -1 ; WX 667 ; N Ydieresis ; B 182 0 805 922 ; -C -1 ; WX 611 ; N Zcaron ; B 30 0 733 936 ; -C -1 ; WX 556 ; N aacute ; B 50 -24 587 745 ; -C -1 ; WX 556 ; N acircumflex ; B 50 -24 578 745 ; -C -1 ; WX 556 ; N adieresis ; B 50 -24 581 731 ; -C -1 ; WX 556 ; N agrave ; B 50 -24 578 745 ; -C -1 ; WX 556 ; N aring ; B 50 -24 578 745 ; -C -1 ; WX 556 ; N atilde ; B 50 -24 612 729 ; -C -1 ; WX 280 ; N brokenbar ; B 57 -202 335 729 ; -C -1 ; WX 556 ; N ccedilla ; B 77 -220 597 551 ; -C -1 ; WX 737 ; N copyright ; B 54 -20 837 745 ; -C -1 ; WX 400 ; N degree ; B 169 425 476 725 ; -C -1 ; WX 584 ; N divide ; B 87 -10 596 474 ; -C -1 ; WX 556 ; N eacute ; B 64 -23 591 745 ; -C -1 ; WX 556 ; N ecircumflex ; B 64 -23 591 745 ; -C -1 ; WX 556 ; N edieresis ; B 64 -23 591 731 ; -C -1 ; WX 556 ; N egrave ; B 64 -23 591 745 ; -C -1 ; WX 611 ; N eth ; B 82 -23 633 730 ; -C -1 ; WX 278 ; N iacute ; B 67 0 448 745 ; -C -1 ; WX 278 ; N icircumflex ; B 67 0 426 745 ; -C -1 ; WX 278 ; N idieresis ; B 67 0 442 731 ; -C -1 ; WX 278 ; N igrave ; B 67 0 322 745 ; -C -1 ; WX 584 ; N logicalnot ; B 103 121 632 412 ; -C -1 ; WX 584 ; N minus ; B 77 174 606 290 ; -C -1 ; WX 611 ; N mu ; B 11 -219 656 542 ; -C -1 ; WX 584 ; N multiply ; B 66 -10 617 474 ; -C -1 ; WX 611 ; N ntilde ; B 63 0 646 729 ; -C -1 ; WX 611 ; N oacute ; B 82 -23 634 745 ; -C -1 ; WX 611 ; N ocircumflex ; B 82 -23 634 745 ; -C -1 ; WX 611 ; N odieresis ; B 82 -23 634 731 ; -C -1 ; WX 611 ; N ograve ; B 82 -23 634 745 ; -C -1 ; WX 834 ; N onehalf ; B 120 -20 871 715 ; -C -1 ; WX 834 ; N onequarter ; B 151 -20 846 715 ; -C -1 ; WX 333 ; N onesuperior ; B 169 284 398 709 ; -C -1 ; WX 611 ; N otilde ; B 82 -23 639 729 ; -C -1 ; WX 584 ; N plusminus ; B 40 0 639 674 ; -C -1 ; WX 737 ; N registered ; B 55 -20 837 745 ; -C -1 ; WX 556 ; N scaron ; B 60 -23 597 745 ; -C -1 ; WX 611 ; N thorn ; B 11 -219 641 729 ; -C -1 ; WX 834 ; N threequarters ; B 116 -20 863 725 ; -C -1 ; WX 333 ; N threesuperior ; B 92 271 442 720 ; -C -1 ; WX 1000 ; N trademark ; B 213 341 1087 745 ; -C -1 ; WX 333 ; N twosuperior ; B 69 284 452 719 ; -C -1 ; WX 611 ; N uacute ; B 88 -23 656 745 ; -C -1 ; WX 611 ; N ucircumflex ; B 88 -23 656 745 ; -C -1 ; WX 611 ; N udieresis ; B 88 -23 656 731 ; -C -1 ; WX 611 ; N ugrave ; B 88 -23 656 745 ; -C -1 ; WX 556 ; N yacute ; B 37 -219 653 745 ; -C -1 ; WX 556 ; N ydieresis ; B 37 -219 653 731 ; -C -1 ; WX 500 ; N zcaron ; B 21 0 575 745 ; -EndCharMetrics -StartKernData -StartKernPairs 99 - -KPX A space -37 -KPX A quoteright -55 -KPX A Y -74 -KPX A W -55 -KPX A V -74 -KPX A T -74 - -KPX F period -111 -KPX F comma -111 -KPX F A -55 - -KPX L space -18 -KPX L quoteright -74 -KPX L Y -74 -KPX L W -55 -KPX L V -55 -KPX L T -74 - -KPX P space -37 -KPX P period -129 -KPX P comma -129 -KPX P A -74 - -KPX R Y -18 -KPX R W -18 -KPX R T -18 - -KPX T y -37 -KPX T w -37 -KPX T u -18 -KPX T semicolon -74 -KPX T s -37 -KPX T r -18 -KPX T period -74 -KPX T o -37 -KPX T i -18 -KPX T hyphen -55 -KPX T e -37 -KPX T comma -74 -KPX T colon -74 -KPX T c -37 -KPX T a -37 -KPX T O -18 -KPX T A -74 - -KPX V y -18 -KPX V u -18 -KPX V semicolon -37 -KPX V r -18 -KPX V period -92 -KPX V o -37 -KPX V i -37 -KPX V hyphen -37 -KPX V e -37 -KPX V comma -92 -KPX V colon -37 -KPX V a -37 -KPX V A -74 - -KPX W y -18 -KPX W u -18 -KPX W semicolon -37 -KPX W r -18 -KPX W period -74 -KPX W o -18 -KPX W i -9 -KPX W hyphen -37 -KPX W e -18 -KPX W comma -74 -KPX W colon -37 -KPX W a -18 -KPX W A -55 - -KPX Y v -37 -KPX Y u -37 -KPX Y space -18 -KPX Y semicolon -55 -KPX Y q -37 -KPX Y period -92 -KPX Y p -37 -KPX Y i -37 -KPX Y o -37 -KPX Y hyphen -74 -KPX Y e -37 -KPX Y comma -92 -KPX Y colon -55 -KPX Y a -37 -KPX Y A -74 - -KPX f quoteright 18 -KPX f f -18 - -KPX one one -74 - -KPX quoteleft quoteleft -37 - -KPX quoteright t 18 -KPX quoteright space -37 -KPX quoteright s -18 -KPX quoteright quoteright -37 - -KPX r quoteright 37 -KPX r period -55 -KPX r comma -55 - -KPX space Y -18 -KPX space A -37 - -KPX v period -55 -KPX v comma -55 - -KPX w period -37 -KPX w comma -37 - -KPX y period -37 -KPX y comma -37 -EndKernPairs -EndKernData -StartComposites 56 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 187 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 83 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 167 187 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 111 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 194 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 111 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 167 187 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 111 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 194 187 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 194 187 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 194 187 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 194 187 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 139 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 139 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 139 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 139 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute -27 187 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -27 187 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -27 187 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave -27 187 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 167 187 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 167 187 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 167 187 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 167 187 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 111 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 111 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 111 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 111 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 194 187 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 194 187 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 194 187 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 194 187 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 111 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 111 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 111 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 111 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 222 187 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 222 187 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 222 187 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 222 187 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 139 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 139 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 139 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 139 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 194 187 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 111 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 194 187 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 139 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 222 187 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 139 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 194 187 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 111 0 ; -EndComposites -EndFontMetrics diff --git a/misc/afm/HelvO.afm b/misc/afm/HelvO.afm deleted file mode 100644 index c24bdc1c20..0000000000 --- a/misc/afm/HelvO.afm +++ /dev/null @@ -1,428 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Tue Aug 5 11:45:36 PDT 1986 -FontName Helvetica-Oblique -EncodingScheme AdobeStandardEncoding -FullName Helvetica Oblique -FamilyName Helvetica -Weight Medium -ItalicAngle -12.0 -IsFixedPitch false -UnderlinePosition -106 -UnderlineThickness 73 -Version 001.001 -Notice Helvetica is a registered trademark of Allied Corporation. -FontBBox -178 -220 1108 944 -CapHeight 729 -XHeight 525 -Descender -219 -Ascender 729 -StartCharMetrics 228 -C 32 ; WX 278 ; N space ; B 0 0 0 0 ; -C 33 ; WX 278 ; N exclam ; B 124 0 363 729 ; -C 34 ; WX 355 ; N quotedbl ; B 177 462 455 708 ; -C 35 ; WX 556 ; N numbersign ; B 54 -20 649 698 ; -C 36 ; WX 556 ; N dollar ; B 69 -125 613 770 ; -C 37 ; WX 889 ; N percent ; B 134 -20 895 708 ; -C 38 ; WX 667 ; N ampersand ; B 83 -23 644 710 ; -C 39 ; WX 222 ; N quoteright ; B 165 476 308 708 ; -C 40 ; WX 333 ; N parenleft ; B 113 -213 446 729 ; -C 41 ; WX 333 ; N parenright ; B -7 -213 325 729 ; -C 42 ; WX 389 ; N asterisk ; B 169 452 471 740 ; -C 43 ; WX 584 ; N plus ; B 92 -10 591 474 ; -C 44 ; WX 278 ; N comma ; B 55 -150 214 104 ; -C 45 ; WX 333 ; N hyphen ; B 97 240 351 313 ; -C 46 ; WX 278 ; N period ; B 87 0 213 104 ; -C 47 ; WX 278 ; N slash ; B -12 -21 434 708 ; -C 48 ; WX 556 ; N zero ; B 98 -23 598 709 ; -C 49 ; WX 556 ; N one ; B 208 0 498 709 ; -C 50 ; WX 556 ; N two ; B 34 0 620 710 ; -C 51 ; WX 556 ; N three ; B 71 -23 599 709 ; -C 52 ; WX 556 ; N four ; B 63 0 573 709 ; -C 53 ; WX 556 ; N five ; B 70 -23 629 709 ; -C 54 ; WX 556 ; N six ; B 93 -23 611 709 ; -C 55 ; WX 556 ; N seven ; B 137 0 671 709 ; -C 56 ; WX 556 ; N eight ; B 74 -23 604 709 ; -C 57 ; WX 556 ; N nine ; B 83 -23 599 709 ; -C 58 ; WX 278 ; N colon ; B 110 0 326 525 ; -C 59 ; WX 278 ; N semicolon ; B 78 -150 325 516 ; -C 60 ; WX 584 ; N less ; B 87 -10 635 474 ; -C 61 ; WX 584 ; N equal ; B 74 112 609 352 ; -C 62 ; WX 584 ; N greater ; B 48 -10 596 474 ; -C 63 ; WX 556 ; N question ; B 184 0 630 738 ; -C 64 ; WX 1015 ; N at ; B 80 -146 1036 737 ; -C 65 ; WX 667 ; N A ; B 17 0 653 729 ; -C 66 ; WX 667 ; N B ; B 79 0 711 729 ; -C 67 ; WX 722 ; N C ; B 112 -23 770 741 ; -C 68 ; WX 722 ; N D ; B 89 0 759 729 ; -C 69 ; WX 667 ; N E ; B 90 0 751 729 ; -C 70 ; WX 611 ; N F ; B 90 0 734 729 ; -C 71 ; WX 778 ; N G ; B 109 -23 809 741 ; -C 72 ; WX 722 ; N H ; B 83 0 799 729 ; -C 73 ; WX 278 ; N I ; B 100 0 349 729 ; -C 74 ; WX 500 ; N J ; B 47 -26 581 729 ; -C 75 ; WX 667 ; N K ; B 79 0 813 729 ; -C 76 ; WX 556 ; N L ; B 80 0 551 729 ; -C 77 ; WX 833 ; N M ; B 75 0 916 729 ; -C 78 ; WX 722 ; N N ; B 76 0 801 729 ; -C 79 ; WX 778 ; N O ; B 104 -23 828 741 ; -C 80 ; WX 667 ; N P ; B 91 0 733 730 ; -C 81 ; WX 778 ; N Q ; B 104 -59 828 741 ; -C 82 ; WX 722 ; N R ; B 93 0 770 729 ; -C 83 ; WX 667 ; N S ; B 89 -23 714 741 ; -C 84 ; WX 611 ; N T ; B 158 0 748 729 ; -C 85 ; WX 722 ; N U ; B 124 -23 800 729 ; -C 86 ; WX 667 ; N V ; B 185 0 800 729 ; -C 87 ; WX 944 ; N W ; B 177 0 1084 729 ; -C 88 ; WX 667 ; N X ; B 22 0 794 729 ; -C 89 ; WX 667 ; N Y ; B 168 0 816 729 ; -C 90 ; WX 611 ; N Z ; B 28 0 737 729 ; -C 91 ; WX 278 ; N bracketleft ; B 19 -214 405 729 ; -C 92 ; WX 278 ; N backslash ; B 147 -20 280 729 ; -C 93 ; WX 278 ; N bracketright ; B -23 -215 364 729 ; -C 94 ; WX 469 ; N asciicircum ; B 115 333 496 713 ; -C 95 ; WX 556 ; N underscore ; B -59 -175 551 -125 ; -C 96 ; WX 222 ; N quoteleft ; B 163 459 308 708 ; -C 97 ; WX 556 ; N a ; B 65 -23 568 540 ; -C 98 ; WX 556 ; N b ; B 54 -23 588 729 ; -C 99 ; WX 500 ; N c ; B 76 -23 554 540 ; -C 100 ; WX 556 ; N d ; B 73 -23 650 729 ; -C 101 ; WX 556 ; N e ; B 84 -23 580 541 ; -C 102 ; WX 278 ; N f ; B 89 0 413 733 ; L i fi ; L l fl ; -C 103 ; WX 556 ; N g ; B 32 -220 601 540 ; -C 104 ; WX 556 ; N h ; B 70 0 574 729 ; -C 105 ; WX 222 ; N i ; B 66 0 305 729 ; -C 106 ; WX 222 ; N j ; B -65 -220 308 729 ; -C 107 ; WX 500 ; N k ; B 58 0 584 729 ; -C 108 ; WX 222 ; N l ; B 68 0 307 729 ; -C 109 ; WX 833 ; N m ; B 71 0 852 540 ; -C 110 ; WX 556 ; N n ; B 70 0 574 540 ; -C 111 ; WX 556 ; N o ; B 80 -23 576 540 ; -C 112 ; WX 556 ; N p ; B 7 -219 586 540 ; -C 113 ; WX 556 ; N q ; B 71 -219 607 540 ; -C 114 ; WX 333 ; N r ; B 69 0 436 540 ; -C 115 ; WX 500 ; N s ; B 61 -24 520 540 ; -C 116 ; WX 278 ; N t ; B 97 -24 366 667 ; -C 117 ; WX 556 ; N u ; B 88 -23 594 525 ; -C 118 ; WX 500 ; N v ; B 122 0 598 525 ; -C 119 ; WX 722 ; N w ; B 118 0 820 525 ; -C 120 ; WX 500 ; N x ; B 17 0 583 525 ; -C 121 ; WX 500 ; N y ; B 8 -219 590 525 ; -C 122 ; WX 500 ; N z ; B 31 0 557 525 ; -C 123 ; WX 334 ; N braceleft ; B 91 -214 431 731 ; -C 124 ; WX 260 ; N bar ; B 54 -215 315 729 ; -C 125 ; WX 334 ; N braceright ; B -16 -214 324 731 ; -C 126 ; WX 584 ; N asciitilde ; B 137 267 594 438 ; -C 161 ; WX 333 ; N exclamdown ; B 76 -214 317 525 ; -C 162 ; WX 556 ; N cent ; B 96 -120 585 628 ; -C 163 ; WX 556 ; N sterling ; B 44 -21 628 726 ; -C 164 ; WX 167 ; N fraction ; B -178 -21 486 708 ; -C 165 ; WX 556 ; N yen ; B 100 0 696 710 ; -C 166 ; WX 556 ; N florin ; B -32 -214 696 742 ; -C 167 ; WX 556 ; N section ; B 63 -215 589 729 ; -C 168 ; WX 556 ; N currency ; B 110 126 593 554 ; -C 169 ; WX 191 ; N quotesingle ; B 173 462 292 708 ; -C 170 ; WX 333 ; N quotedblleft ; B 146 459 449 708 ; -C 171 ; WX 556 ; N guillemotleft ; B 147 106 548 438 ; -C 172 ; WX 333 ; N guilsinglleft ; B 140 112 336 436 ; -C 173 ; WX 333 ; N guilsinglright ; B 109 112 307 436 ; -C 174 ; WX 500 ; N fi ; B 83 0 591 733 ; -C 175 ; WX 500 ; N fl ; B 88 0 585 733 ; -C 177 ; WX 556 ; N endash ; B 46 240 628 313 ; -C 178 ; WX 556 ; N dagger ; B 127 -178 620 710 ; -C 179 ; WX 556 ; N daggerdbl ; B 51 -178 620 710 ; -C 180 ; WX 278 ; N periodcentered ; B 166 318 293 442 ; -C 182 ; WX 537 ; N paragraph ; B 145 -178 677 729 ; -C 183 ; WX 350 ; N bullet ; B 120 220 376 470 ; -C 184 ; WX 222 ; N quotesinglbase ; B 37 -129 180 103 ; -C 185 ; WX 333 ; N quotedblbase ; B 20 -129 322 103 ; -C 186 ; WX 333 ; N quotedblright ; B 150 476 452 708 ; -C 187 ; WX 556 ; N guillemotright ; B 121 106 518 438 ; -C 188 ; WX 1000 ; N ellipsis ; B 115 0 907 104 ; -C 189 ; WX 1000 ; N perthousand ; B 93 -20 1024 740 ; -C 191 ; WX 611 ; N questiondown ; B 86 -213 531 525 ; -C 193 ; WX 333 ; N grave ; B 179 592 357 740 ; -C 194 ; WX 333 ; N acute ; B 218 592 458 740 ; -C 195 ; WX 333 ; N circumflex ; B 146 591 433 741 ; -C 196 ; WX 333 ; N tilde ; B 130 589 471 716 ; -C 197 ; WX 333 ; N macron ; B 160 621 450 694 ; -C 198 ; WX 333 ; N breve ; B 165 594 471 729 ; -C 199 ; WX 333 ; N dotaccent ; B 244 605 370 709 ; -C 200 ; WX 333 ; N dieresis ; B 159 605 446 708 ; -C 202 ; WX 333 ; N ring ; B 216 566 396 741 ; -C 203 ; WX 333 ; N cedilla ; B 1 -214 264 0 ; -C 205 ; WX 333 ; N hungarumlaut ; B 91 592 505 740 ; -C 206 ; WX 333 ; N ogonek ; B 35 -189 246 15 ; -C 207 ; WX 333 ; N caron ; B 176 590 463 740 ; -C 208 ; WX 1000 ; N emdash ; B 42 240 1068 313 ; -C 225 ; WX 1000 ; N AE ; B 11 0 1087 729 ; -C 227 ; WX 370 ; N ordfeminine ; B 107 301 441 740 ; -C 232 ; WX 556 ; N Lslash ; B 61 0 570 729 ; -C 233 ; WX 778 ; N Oslash ; B 32 -23 867 742 ; -C 234 ; WX 1000 ; N OE ; B 101 -20 1108 739 ; -C 235 ; WX 365 ; N ordmasculine ; B 114 301 452 741 ; -C 241 ; WX 889 ; N ae ; B 59 -20 915 546 ; -C 245 ; WX 278 ; N dotlessi ; B 94 0 290 525 ; -C 248 ; WX 222 ; N lslash ; B 62 0 312 729 ; -C 249 ; WX 611 ; N oslash ; B 19 -27 639 548 ; -C 250 ; WX 944 ; N oe ; B 85 -22 966 540 ; -C 251 ; WX 611 ; N germandbls ; B 126 -20 655 729 ; -C -1 ; WX 667 ; N Aacute ; B 17 0 667 939 ; -C -1 ; WX 667 ; N Acircumflex ; B 17 0 653 940 ; -C -1 ; WX 667 ; N Adieresis ; B 17 0 655 907 ; -C -1 ; WX 667 ; N Agrave ; B 17 0 653 939 ; -C -1 ; WX 667 ; N Aring ; B 17 0 653 940 ; -C -1 ; WX 667 ; N Atilde ; B 17 0 680 915 ; -C -1 ; WX 722 ; N Ccedilla ; B 112 -214 770 741 ; -C -1 ; WX 667 ; N Eacute ; B 90 0 751 939 ; -C -1 ; WX 667 ; N Ecircumflex ; B 90 0 751 940 ; -C -1 ; WX 667 ; N Edieresis ; B 90 0 751 907 ; -C -1 ; WX 667 ; N Egrave ; B 90 0 751 939 ; -C -1 ; WX 722 ; N Eth ; B 73 0 759 729 ; -C -1 ; WX 278 ; N Iacute ; B 100 0 479 939 ; -C -1 ; WX 278 ; N Icircumflex ; B 100 0 454 940 ; -C -1 ; WX 278 ; N Idieresis ; B 100 0 467 907 ; -C -1 ; WX 278 ; N Igrave ; B 100 0 378 939 ; -C -1 ; WX 722 ; N Ntilde ; B 76 0 801 915 ; -C -1 ; WX 778 ; N Oacute ; B 104 -23 828 939 ; -C -1 ; WX 778 ; N Ocircumflex ; B 104 -23 828 940 ; -C -1 ; WX 778 ; N Odieresis ; B 104 -23 828 907 ; -C -1 ; WX 778 ; N Ograve ; B 104 -23 828 939 ; -C -1 ; WX 778 ; N Otilde ; B 104 -23 828 915 ; -C -1 ; WX 667 ; N Scaron ; B 89 -23 714 939 ; -C -1 ; WX 667 ; N Thorn ; B 91 0 707 729 ; -C -1 ; WX 722 ; N Uacute ; B 124 -23 800 939 ; -C -1 ; WX 722 ; N Ucircumflex ; B 124 -23 800 940 ; -C -1 ; WX 722 ; N Udieresis ; B 124 -23 800 907 ; -C -1 ; WX 722 ; N Ugrave ; B 124 -23 800 939 ; -C -1 ; WX 667 ; N Yacute ; B 168 0 816 944 ; -C -1 ; WX 667 ; N Ydieresis ; B 168 0 816 907 ; -C -1 ; WX 611 ; N Zcaron ; B 28 0 737 939 ; -C -1 ; WX 556 ; N aacute ; B 65 -23 570 740 ; -C -1 ; WX 556 ; N acircumflex ; B 65 -23 568 741 ; -C -1 ; WX 556 ; N adieresis ; B 65 -23 568 708 ; -C -1 ; WX 556 ; N agrave ; B 65 -23 568 740 ; -C -1 ; WX 556 ; N aring ; B 65 -23 568 741 ; -C -1 ; WX 556 ; N atilde ; B 65 -23 583 716 ; -C -1 ; WX 260 ; N brokenbar ; B 54 -215 315 729 ; -C -1 ; WX 500 ; N ccedilla ; B 76 -214 554 540 ; -C -1 ; WX 737 ; N copyright ; B 55 -23 836 741 ; -C -1 ; WX 400 ; N degree ; B 165 409 472 709 ; -C -1 ; WX 584 ; N divide ; B 92 -10 591 474 ; -C -1 ; WX 556 ; N eacute ; B 84 -23 580 740 ; -C -1 ; WX 556 ; N ecircumflex ; B 84 -23 580 741 ; -C -1 ; WX 556 ; N edieresis ; B 84 -23 580 708 ; -C -1 ; WX 556 ; N egrave ; B 84 -23 580 740 ; -C -1 ; WX 556 ; N eth ; B 80 -23 572 729 ; -C -1 ; WX 278 ; N iacute ; B 94 0 431 740 ; -C -1 ; WX 278 ; N icircumflex ; B 94 0 406 741 ; -C -1 ; WX 278 ; N idieresis ; B 94 0 419 708 ; -C -1 ; WX 278 ; N igrave ; B 94 0 330 740 ; -C -1 ; WX 584 ; N logicalnot ; B 99 82 619 352 ; -C -1 ; WX 584 ; N minus ; B 81 194 601 270 ; -C -1 ; WX 556 ; N mu ; B 18 -219 594 525 ; -C -1 ; WX 584 ; N multiply ; B 59 -10 625 476 ; -C -1 ; WX 556 ; N ntilde ; B 70 0 589 716 ; -C -1 ; WX 556 ; N oacute ; B 80 -23 576 740 ; -C -1 ; WX 556 ; N ocircumflex ; B 80 -23 576 741 ; -C -1 ; WX 556 ; N odieresis ; B 80 -23 576 708 ; -C -1 ; WX 556 ; N ograve ; B 80 -23 576 740 ; -C -1 ; WX 834 ; N onehalf ; B 116 -21 869 709 ; -C -1 ; WX 834 ; N onequarter ; B 147 -21 836 709 ; -C -1 ; WX 333 ; N onesuperior ; B 184 284 370 709 ; -C -1 ; WX 556 ; N otilde ; B 80 -23 583 716 ; -C -1 ; WX 584 ; N plusminus ; B 40 0 621 618 ; -C -1 ; WX 737 ; N registered ; B 55 -23 836 741 ; -C -1 ; WX 500 ; N scaron ; B 61 -24 547 740 ; -C -1 ; WX 556 ; N thorn ; B 7 -219 588 729 ; -C -1 ; WX 834 ; N threequarters ; B 114 -21 868 709 ; -C -1 ; WX 333 ; N threesuperior ; B 96 270 435 709 ; -C -1 ; WX 1000 ; N trademark ; B 208 320 1096 741 ; -C -1 ; WX 333 ; N twosuperior ; B 71 284 447 710 ; -C -1 ; WX 556 ; N uacute ; B 88 -23 594 740 ; -C -1 ; WX 556 ; N ucircumflex ; B 88 -23 594 741 ; -C -1 ; WX 556 ; N udieresis ; B 88 -23 594 708 ; -C -1 ; WX 556 ; N ugrave ; B 88 -23 594 740 ; -C -1 ; WX 500 ; N yacute ; B 8 -219 590 740 ; -C -1 ; WX 500 ; N ydieresis ; B 8 -219 590 708 ; -C -1 ; WX 500 ; N zcaron ; B 31 0 557 740 ; -EndCharMetrics -StartKernData -StartKernPairs 98 - -KPX A y -9 -KPX A w -18 -KPX A v -18 -KPX A space -37 -KPX A quoteright -37 -KPX A Y -74 -KPX A W -18 -KPX A V -55 -KPX A T -74 - -KPX F space -18 -KPX F period -129 -KPX F comma -129 -KPX F A -74 - -KPX L y -18 -KPX L space -18 -KPX L quoteright -55 -KPX L Y -92 -KPX L W -37 -KPX L V -55 -KPX L T -74 - -KPX P space -37 -KPX P period -129 -KPX P comma -129 -KPX P A -74 - -KPX R Y -37 -KPX R W -18 -KPX R V -18 -KPX R T -18 - -KPX T y -74 -KPX T w -74 -KPX T u -74 -KPX T semicolon -74 -KPX T s -92 -KPX T r -74 -KPX T period -92 -KPX T o -92 -KPX T i -9 -KPX T hyphen -92 -KPX T e -92 -KPX T comma -92 -KPX T colon -74 -KPX T c -92 -KPX T a -92 -KPX T O -18 -KPX T A -74 - -KPX V y -18 -KPX V u -18 -KPX V semicolon -18 -KPX V r -18 -KPX V period -74 -KPX V o -37 -KPX V i -18 -KPX V hyphen -37 -KPX V e -37 -KPX V comma -74 -KPX V colon -18 -KPX V a -37 -KPX V A -55 - -KPX W period -37 -KPX W i -9 -KPX W hyphen -18 -KPX W e -18 -KPX W comma -37 -KPX W a -18 -KPX W A -18 - -KPX Y v -37 -KPX Y u -37 -KPX Y space -18 -KPX Y semicolon -37 -KPX Y q -55 -KPX Y period -92 -KPX Y p -55 -KPX Y o -55 -KPX Y i -18 -KPX Y hyphen -74 -KPX Y e -55 -KPX Y comma -92 -KPX Y colon -37 -KPX Y a -74 -KPX Y A -55 - -KPX f quoteright 37 - -KPX one one -74 - -KPX quoteleft quoteleft -37 - -KPX quoteright space -55 -KPX quoteright s -18 -KPX quoteright quoteright -37 - -KPX r quoteright 37 -KPX r period -37 -KPX r hyphen -18 -KPX r comma -55 - -KPX space Y -18 -KPX space A -37 - -KPX v period -74 -KPX v comma -74 - -KPX w period -55 -KPX w comma -55 - -KPX y period -74 -KPX y comma -74 -EndKernPairs -EndKernData -StartComposites 56 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 204 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 83 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 167 204 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 83 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 194 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 83 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 167 204 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 83 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 194 204 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 194 204 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 194 204 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 194 204 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 111 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 111 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 111 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 111 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute -27 204 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -27 204 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -27 204 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave -27 204 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 167 204 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 167 204 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 167 204 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 167 204 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 111 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 111 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 111 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 111 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 167 204 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 167 204 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 167 204 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 167 204 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 111 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 111 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 111 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 111 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 222 204 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 222 204 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 222 204 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 222 204 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 111 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 111 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 111 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 111 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 167 204 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 111 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 194 204 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 111 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 222 204 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 111 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 167 204 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 111 0 ; -EndComposites -EndFontMetrics diff --git a/misc/afm/TimesBo.afm b/misc/afm/TimesBo.afm deleted file mode 100644 index a821d74c50..0000000000 --- a/misc/afm/TimesBo.afm +++ /dev/null @@ -1,454 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Tue Aug 5 11:02:18 PDT 1986 -FontName Times-Bold -EncodingScheme AdobeStandardEncoding -FullName Times Bold -FamilyName Times -Weight Bold -ItalicAngle 0.0 -IsFixedPitch false -UnderlinePosition -99 -UnderlineThickness 95 -Version 001.001 -Notice Times is a trademark of Allied Corporation. -FontBBox -172 -256 1008 965 -CapHeight 681 -XHeight 460 -Descender -210 -Ascender 670 -StartCharMetrics 228 -C 32 ; WX 250 ; N space ; B 0 0 0 0 ; -C 33 ; WX 333 ; N exclam ; B 84 -18 248 690 ; -C 34 ; WX 555 ; N quotedbl ; B 67 371 425 690 ; -C 35 ; WX 500 ; N numbersign ; B -13 -17 514 684 ; -C 36 ; WX 500 ; N dollar ; B 28 -116 474 732 ; -C 37 ; WX 1000 ; N percent ; B 122 -11 881 692 ; -C 38 ; WX 833 ; N ampersand ; B 54 -17 773 690 ; -C 39 ; WX 333 ; N quoteright ; B 77 347 257 680 ; -C 40 ; WX 333 ; N parenleft ; B 49 -169 301 699 ; -C 41 ; WX 333 ; N parenright ; B 26 -169 278 699 ; -C 42 ; WX 500 ; N asterisk ; B 57 262 445 690 ; -C 43 ; WX 570 ; N plus ; B 50 -10 520 460 ; -C 44 ; WX 250 ; N comma ; B 37 -181 214 157 ; -C 45 ; WX 333 ; N hyphen ; B 48 170 283 285 ; -C 46 ; WX 250 ; N period ; B 43 -19 207 145 ; -C 47 ; WX 278 ; N slash ; B 1 -17 279 750 ; -C 48 ; WX 500 ; N zero ; B 26 -18 472 690 ; -C 49 ; WX 500 ; N one ; B 61 0 448 690 ; -C 50 ; WX 500 ; N two ; B 18 0 473 683 ; -C 51 ; WX 500 ; N three ; B 17 -19 463 683 ; -C 52 ; WX 500 ; N four ; B 23 0 472 681 ; -C 53 ; WX 500 ; N five ; B 23 -17 465 681 ; -C 54 ; WX 500 ; N six ; B 30 -18 470 684 ; -C 55 ; WX 500 ; N seven ; B 23 0 468 679 ; -C 56 ; WX 500 ; N eight ; B 22 -17 470 685 ; -C 57 ; WX 500 ; N nine ; B 26 -18 468 684 ; -C 58 ; WX 333 ; N colon ; B 83 -18 247 473 ; -C 59 ; WX 333 ; N semicolon ; B 85 -181 262 472 ; -C 60 ; WX 570 ; N less ; B 45 -10 520 460 ; -C 61 ; WX 570 ; N equal ; B 50 91 520 375 ; -C 62 ; WX 570 ; N greater ; B 50 -10 525 460 ; -C 63 ; WX 500 ; N question ; B 57 -17 438 681 ; -C 64 ; WX 930 ; N at ; B 50 -147 889 677 ; -C 65 ; WX 722 ; N A ; B 22 0 696 681 ; -C 66 ; WX 667 ; N B ; B 24 0 609 681 ; -C 67 ; WX 722 ; N C ; B 42 -17 669 690 ; -C 68 ; WX 722 ; N D ; B 22 0 684 681 ; -C 69 ; WX 667 ; N E ; B 21 0 637 681 ; -C 70 ; WX 611 ; N F ; B 17 0 582 681 ; -C 71 ; WX 778 ; N G ; B 41 -17 748 690 ; -C 72 ; WX 778 ; N H ; B 26 0 748 681 ; -C 73 ; WX 389 ; N I ; B 17 0 366 680 ; -C 74 ; WX 500 ; N J ; B 9 -89 475 681 ; -C 75 ; WX 778 ; N K ; B 29 0 761 681 ; -C 76 ; WX 667 ; N L ; B 21 0 633 681 ; -C 77 ; WX 944 ; N M ; B 21 0 914 681 ; -C 78 ; WX 722 ; N N ; B 20 -10 697 681 ; -C 79 ; WX 778 ; N O ; B 43 -18 733 690 ; -C 80 ; WX 611 ; N P ; B 24 0 593 681 ; -C 81 ; WX 778 ; N Q ; B 24 -182 751 690 ; -C 82 ; WX 722 ; N R ; B 26 0 695 681 ; -C 83 ; WX 556 ; N S ; B 43 -19 506 690 ; -C 84 ; WX 667 ; N T ; B 30 0 629 681 ; -C 85 ; WX 722 ; N U ; B 20 -19 700 681 ; -C 86 ; WX 722 ; N V ; B 22 -18 696 681 ; -C 87 ; WX 1000 ; N W ; B 19 -18 979 680 ; -C 88 ; WX 722 ; N X ; B 23 0 695 681 ; -C 89 ; WX 722 ; N Y ; B 19 0 697 680 ; -C 90 ; WX 667 ; N Z ; B 37 0 624 681 ; -C 91 ; WX 333 ; N bracketleft ; B 73 -142 296 674 ; -C 92 ; WX 278 ; N backslash ; B 1 -17 279 750 ; -C 93 ; WX 333 ; N bracketright ; B 38 -142 261 674 ; -C 94 ; WX 581 ; N asciicircum ; B 102 290 486 690 ; -C 95 ; WX 500 ; N underscore ; B -2 -256 502 -182 ; -C 96 ; WX 333 ; N quoteleft ; B 72 357 252 691 ; -C 97 ; WX 500 ; N a ; B 25 -19 484 472 ; -C 98 ; WX 556 ; N b ; B 29 -18 512 670 ; -C 99 ; WX 444 ; N c ; B 24 -17 423 472 ; -C 100 ; WX 556 ; N d ; B 31 -17 523 670 ; -C 101 ; WX 444 ; N e ; B 25 -18 415 474 ; -C 102 ; WX 333 ; N f ; B 20 0 386 690 ; L i fi ; L l fl ; -C 103 ; WX 500 ; N g ; B 25 -210 474 472 ; -C 104 ; WX 556 ; N h ; B 29 0 523 670 ; -C 105 ; WX 278 ; N i ; B 27 0 249 690 ; -C 106 ; WX 333 ; N j ; B -57 -212 256 690 ; -C 107 ; WX 556 ; N k ; B 24 0 528 670 ; -C 108 ; WX 278 ; N l ; B 25 0 247 670 ; -C 109 ; WX 833 ; N m ; B 28 0 804 471 ; -C 110 ; WX 556 ; N n ; B 28 0 523 473 ; -C 111 ; WX 500 ; N o ; B 25 -18 473 472 ; -C 112 ; WX 556 ; N p ; B 30 -210 513 473 ; -C 113 ; WX 556 ; N q ; B 32 -210 535 472 ; -C 114 ; WX 444 ; N r ; B 29 0 417 473 ; -C 115 ; WX 389 ; N s ; B 29 -17 359 472 ; -C 116 ; WX 333 ; N t ; B 22 -19 320 627 ; -C 117 ; WX 556 ; N u ; B 23 -17 524 460 ; -C 118 ; WX 500 ; N v ; B 20 -14 479 460 ; -C 119 ; WX 722 ; N w ; B 10 -14 709 460 ; -C 120 ; WX 500 ; N x ; B 11 0 488 460 ; -C 121 ; WX 500 ; N y ; B 19 -212 475 460 ; -C 122 ; WX 444 ; N z ; B 25 0 414 460 ; -C 123 ; WX 394 ; N braceleft ; B 44 -142 342 674 ; -C 124 ; WX 220 ; N bar ; B 77 -195 151 720 ; -C 125 ; WX 394 ; N braceright ; B 38 -142 336 674 ; -C 126 ; WX 520 ; N asciitilde ; B 19 237 493 461 ; -C 161 ; WX 333 ; N exclamdown ; B 85 -210 249 498 ; -C 162 ; WX 500 ; N cent ; B 44 -148 460 586 ; -C 163 ; WX 500 ; N sterling ; B 25 -17 471 682 ; -C 164 ; WX 167 ; N fraction ; B -172 -17 335 690 ; -C 165 ; WX 500 ; N yen ; B -20 0 521 681 ; -C 166 ; WX 500 ; N florin ; B 2 -157 496 713 ; -C 167 ; WX 500 ; N section ; B 63 -148 438 677 ; -C 168 ; WX 500 ; N currency ; B 3 105 498 604 ; -C 169 ; WX 278 ; N quotesingle ; B 69 371 205 690 ; -C 170 ; WX 500 ; N quotedblleft ; B 33 346 479 679 ; -C 171 ; WX 500 ; N guillemotleft ; B 25 44 471 436 ; -C 172 ; WX 333 ; N guilsinglleft ; B 51 44 302 436 ; -C 173 ; WX 333 ; N guilsinglright ; B 26 44 277 436 ; -C 174 ; WX 556 ; N fi ; B 24 0 532 690 ; -C 175 ; WX 556 ; N fl ; B 25 0 529 691 ; -C 177 ; WX 500 ; N endash ; B -4 179 500 270 ; -C 178 ; WX 500 ; N dagger ; B 52 -141 446 690 ; -C 179 ; WX 500 ; N daggerdbl ; B 57 -138 451 681 ; -C 180 ; WX 250 ; N periodcentered ; B 43 270 167 394 ; -C 182 ; WX 540 ; N paragraph ; B 30 -190 533 681 ; -C 183 ; WX 350 ; N bullet ; B 50 175 300 425 ; -C 184 ; WX 333 ; N quotesinglbase ; B 77 -179 257 154 ; -C 185 ; WX 500 ; N quotedblbase ; B 31 -179 477 154 ; -C 186 ; WX 500 ; N quotedblright ; B 31 347 477 680 ; -C 187 ; WX 500 ; N guillemotright ; B 24 44 470 436 ; -C 188 ; WX 1000 ; N ellipsis ; B 85 -18 915 146 ; -C 189 ; WX 1000 ; N perthousand ; B 1 -55 993 718 ; -C 191 ; WX 500 ; N questiondown ; B 56 -210 437 488 ; -C 193 ; WX 333 ; N grave ; B 26 523 242 695 ; -C 194 ; WX 333 ; N acute ; B 83 523 299 695 ; -C 195 ; WX 333 ; N circumflex ; B 28 520 304 690 ; -C 196 ; WX 333 ; N tilde ; B 34 559 298 671 ; -C 197 ; WX 333 ; N macron ; B 34 543 297 600 ; -C 198 ; WX 333 ; N breve ; B 32 529 300 667 ; -C 199 ; WX 333 ; N dotaccent ; B 112 515 222 625 ; -C 200 ; WX 333 ; N dieresis ; B 33 556 297 652 ; -C 202 ; WX 333 ; N ring ; B 55 522 279 746 ; -C 203 ; WX 333 ; N cedilla ; B 42 -211 293 -10 ; -C 205 ; WX 333 ; N hungarumlaut ; B 32 539 320 753 ; -C 206 ; WX 333 ; N ogonek ; B 60 -179 277 70 ; -C 207 ; WX 333 ; N caron ; B 32 520 298 690 ; -C 208 ; WX 1000 ; N emdash ; B -2 185 1008 280 ; -C 225 ; WX 1000 ; N AE ; B 19 0 954 681 ; -C 227 ; WX 300 ; N ordfeminine ; B 12 286 288 685 ; -C 232 ; WX 667 ; N Lslash ; B 0 0 612 681 ; -C 233 ; WX 778 ; N Oslash ; B 45 -75 735 740 ; -C 234 ; WX 1000 ; N OE ; B 24 -7 979 683 ; -C 235 ; WX 330 ; N ordmasculine ; B 31 286 299 685 ; -C 241 ; WX 722 ; N ae ; B 30 -17 691 474 ; -C 245 ; WX 278 ; N dotlessi ; B 28 0 250 460 ; -C 248 ; WX 278 ; N lslash ; B 0 0 326 670 ; -C 249 ; WX 500 ; N oslash ; B 27 -95 474 550 ; -C 250 ; WX 722 ; N oe ; B 26 -17 689 473 ; -C 251 ; WX 556 ; N germandbls ; B 22 -18 513 689 ; -C -1 ; WX 722 ; N Aacute ; B 22 0 696 914 ; -C -1 ; WX 722 ; N Acircumflex ; B 22 0 696 909 ; -C -1 ; WX 722 ; N Adieresis ; B 22 0 696 871 ; -C -1 ; WX 722 ; N Agrave ; B 22 0 696 914 ; -C -1 ; WX 722 ; N Aring ; B 22 0 696 965 ; -C -1 ; WX 722 ; N Atilde ; B 22 0 696 890 ; -C -1 ; WX 722 ; N Ccedilla ; B 42 -211 669 690 ; -C -1 ; WX 667 ; N Eacute ; B 21 0 637 914 ; -C -1 ; WX 667 ; N Ecircumflex ; B 21 0 637 909 ; -C -1 ; WX 667 ; N Edieresis ; B 21 0 637 871 ; -C -1 ; WX 667 ; N Egrave ; B 21 0 637 914 ; -C -1 ; WX 722 ; N Eth ; B 22 0 685 681 ; -C -1 ; WX 389 ; N Iacute ; B 17 0 366 914 ; -C -1 ; WX 389 ; N Icircumflex ; B 17 0 366 909 ; -C -1 ; WX 389 ; N Idieresis ; B 17 0 366 871 ; -C -1 ; WX 389 ; N Igrave ; B 17 0 366 914 ; -C -1 ; WX 722 ; N Ntilde ; B 20 -10 697 890 ; -C -1 ; WX 778 ; N Oacute ; B 43 -18 733 914 ; -C -1 ; WX 778 ; N Ocircumflex ; B 43 -18 733 909 ; -C -1 ; WX 778 ; N Odieresis ; B 43 -18 733 871 ; -C -1 ; WX 778 ; N Ograve ; B 43 -18 733 914 ; -C -1 ; WX 778 ; N Otilde ; B 43 -18 733 890 ; -C -1 ; WX 556 ; N Scaron ; B 43 -19 506 909 ; -C -1 ; WX 611 ; N Thorn ; B 24 0 594 681 ; -C -1 ; WX 722 ; N Uacute ; B 20 -19 700 914 ; -C -1 ; WX 722 ; N Ucircumflex ; B 20 -19 700 909 ; -C -1 ; WX 722 ; N Udieresis ; B 20 -19 700 871 ; -C -1 ; WX 722 ; N Ugrave ; B 20 -19 700 914 ; -C -1 ; WX 722 ; N Yacute ; B 19 0 697 916 ; -C -1 ; WX 722 ; N Ydieresis ; B 19 0 697 871 ; -C -1 ; WX 667 ; N Zcaron ; B 37 0 624 909 ; -C -1 ; WX 500 ; N aacute ; B 25 -19 484 695 ; -C -1 ; WX 500 ; N acircumflex ; B 25 -19 484 690 ; -C -1 ; WX 500 ; N adieresis ; B 25 -19 484 652 ; -C -1 ; WX 500 ; N agrave ; B 25 -19 484 695 ; -C -1 ; WX 500 ; N aring ; B 25 -19 484 746 ; -C -1 ; WX 500 ; N atilde ; B 25 -19 484 671 ; -C -1 ; WX 220 ; N brokenbar ; B 77 -195 151 720 ; -C -1 ; WX 444 ; N ccedilla ; B 24 -211 423 472 ; -C -1 ; WX 747 ; N copyright ; B 16 -17 730 690 ; -C -1 ; WX 400 ; N degree ; B 50 390 350 690 ; -C -1 ; WX 570 ; N divide ; B 50 -10 520 460 ; -C -1 ; WX 444 ; N eacute ; B 25 -18 415 695 ; -C -1 ; WX 444 ; N ecircumflex ; B 25 -18 415 690 ; -C -1 ; WX 444 ; N edieresis ; B 25 -18 415 652 ; -C -1 ; WX 444 ; N egrave ; B 25 -18 415 695 ; -C -1 ; WX 500 ; N eth ; B 26 -17 474 670 ; -C -1 ; WX 278 ; N iacute ; B 28 0 265 695 ; -C -1 ; WX 278 ; N icircumflex ; B -6 0 270 690 ; -C -1 ; WX 278 ; N idieresis ; B -1 0 263 652 ; -C -1 ; WX 278 ; N igrave ; B -8 0 250 695 ; -C -1 ; WX 570 ; N logicalnot ; B 50 94 520 375 ; -C -1 ; WX 570 ; N minus ; B 50 188 520 262 ; -C -1 ; WX 556 ; N mu ; B 23 -210 524 460 ; -C -1 ; WX 570 ; N multiply ; B 50 -10 520 460 ; -C -1 ; WX 556 ; N ntilde ; B 28 0 523 671 ; -C -1 ; WX 500 ; N oacute ; B 25 -18 473 695 ; -C -1 ; WX 500 ; N ocircumflex ; B 25 -18 473 690 ; -C -1 ; WX 500 ; N odieresis ; B 25 -18 473 652 ; -C -1 ; WX 500 ; N ograve ; B 25 -18 473 695 ; -C -1 ; WX 750 ; N onehalf ; B 30 -18 720 690 ; -C -1 ; WX 750 ; N onequarter ; B 30 -18 720 690 ; -C -1 ; WX 300 ; N onesuperior ; B 24 276 275 690 ; -C -1 ; WX 500 ; N otilde ; B 25 -18 473 671 ; -C -1 ; WX 570 ; N plusminus ; B 50 0 520 600 ; -C -1 ; WX 747 ; N registered ; B 16 -17 730 690 ; -C -1 ; WX 389 ; N scaron ; B 29 -17 359 690 ; -C -1 ; WX 556 ; N thorn ; B 30 -210 513 670 ; -C -1 ; WX 750 ; N threequarters ; B 30 -18 720 690 ; -C -1 ; WX 300 ; N threesuperior ; B 5 269 294 690 ; -C -1 ; WX 1000 ; N trademark ; B 30 277 970 681 ; -C -1 ; WX 300 ; N twosuperior ; B 2 276 298 686 ; -C -1 ; WX 556 ; N uacute ; B 23 -17 524 695 ; -C -1 ; WX 556 ; N ucircumflex ; B 23 -17 524 690 ; -C -1 ; WX 556 ; N udieresis ; B 23 -17 524 652 ; -C -1 ; WX 556 ; N ugrave ; B 23 -17 524 695 ; -C -1 ; WX 500 ; N yacute ; B 19 -212 475 695 ; -C -1 ; WX 500 ; N ydieresis ; B 19 -212 475 652 ; -C -1 ; WX 444 ; N zcaron ; B 25 0 414 690 ; -EndCharMetrics -StartKernData -StartKernPairs 124 - -KPX A y -74 -KPX A w -74 -KPX A v -74 -KPX A space -55 -KPX A quoteright -74 -KPX A Y -92 -KPX A W -111 -KPX A V -129 -KPX A T -74 - -KPX F space -37 -KPX F period -92 -KPX F comma -92 -KPX F A -74 - -KPX L y -55 -KPX L space -55 -KPX L quoteright -92 -KPX L Y -92 -KPX L W -92 -KPX L V -92 -KPX L T -92 - -KPX P space -55 -KPX P period -92 -KPX P comma -92 -KPX P A -74 - -KPX R y -35 -KPX R Y -35 -KPX R W -35 -KPX R V -35 -KPX R T -35 - -KPX T y -74 -KPX T w -74 -KPX T u -92 -KPX T space -18 -KPX T semicolon -74 -KPX T s -92 -KPX T r -74 -KPX T period -74 -KPX T o -92 -KPX T i -18 -KPX T hyphen -92 -KPX T e -92 -KPX T comma -74 -KPX T colon -74 -KPX T c -92 -KPX T a -92 -KPX T O -18 -KPX T A -74 - -KPX V y -92 -KPX V u -92 -KPX V space -18 -KPX V semicolon -92 -KPX V r -74 -KPX V period -129 -KPX V o -92 -KPX V i -37 -KPX V hyphen -74 -KPX V e -92 -KPX V comma -129 -KPX V colon -92 -KPX V a -92 -KPX V O -20 -KPX V A -129 - -KPX W y -37 -KPX W u -18 -KPX W space -18 -KPX W semicolon -55 -KPX W r -18 -KPX W period -92 -KPX W o -55 -KPX W i -18 -KPX W hyphen -37 -KPX W e -55 -KPX W comma -92 -KPX W colon -55 -KPX W a -55 -KPX W A -111 - -KPX Y v -111 -KPX Y u -92 -KPX Y space -37 -KPX Y semicolon -92 -KPX Y q -111 -KPX Y period -92 -KPX Y p -92 -KPX Y o -111 -KPX Y i -37 -KPX Y hyphen -92 -KPX Y e -111 -KPX Y comma -92 -KPX Y colon -92 -KPX Y a -111 -KPX Y A -92 - -KPX f quoteright 55 -KPX f f 0 - -KPX one one -55 - -KPX quoteleft quoteleft -74 - -KPX quoteright space -74 -KPX quoteright s -37 -KPX quoteright quoteright -74 - -KPX r z 0 -KPX r y 0 -KPX r x 0 -KPX r w 0 -KPX r t 0 -KPX r space -18 -KPX r quoteright 18 -KPX r q -18 -KPX r period -92 -KPX r o -18 -KPX r hyphen -37 -KPX r h 0 -KPX r e -18 -KPX r comma -92 -KPX r c -18 - -KPX space Y -37 -KPX space W -18 -KPX space V -18 -KPX space T -18 -KPX space A -55 - -KPX v period -55 -KPX v comma -55 - -KPX w period -55 -KPX w comma -55 - -KPX y period -55 -KPX y comma -55 -EndKernPairs -EndKernData -StartComposites 56 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 167 219 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 55 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 111 219 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 28 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 207 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 68 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 194 219 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 83 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 221 219 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 221 219 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 221 219 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 221 219 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 104 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 104 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 104 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 104 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute 28 219 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 28 219 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 28 219 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave 28 219 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -34 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -34 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -34 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -34 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 174 219 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 174 219 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 174 219 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 174 219 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 61 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 61 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 61 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 61 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 187 219 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 187 219 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 187 219 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 187 219 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 76 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 76 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 76 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 76 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 222 219 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 222 219 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 222 219 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 222 219 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 83 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 83 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 83 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 83 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 187 219 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 76 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 194 219 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 111 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 222 219 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 83 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 187 219 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 76 0 ; -EndComposites -EndFontMetrics diff --git a/misc/afm/TimesBoO.afm b/misc/afm/TimesBoO.afm deleted file mode 100644 index cf4ca76a17..0000000000 --- a/misc/afm/TimesBoO.afm +++ /dev/null @@ -1,438 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Tue Aug 5 11:23:15 PDT 1986 -FontName Times-BoldItalic -EncodingScheme AdobeStandardEncoding -FullName Times Bold Italic -FamilyName Times -Weight Bold -ItalicAngle -15.0 -IsFixedPitch false -UnderlinePosition -98 -UnderlineThickness 54 -Version 001.001 -Notice Times is a trademark of Allied Corporation. -FontBBox -168 -232 1014 894 -CapHeight 662 -XHeight 458 -Descender -203 -Ascender 682 -StartCharMetrics 228 -C 32 ; WX 250 ; N space ; B 0 0 0 0 ; -C 33 ; WX 389 ; N exclam ; B 66 -13 367 676 ; -C 34 ; WX 555 ; N quotedbl ; B 142 367 549 693 ; -C 35 ; WX 500 ; N numbersign ; B 4 0 496 662 ; -C 36 ; WX 500 ; N dollar ; B -20 -101 492 723 ; -C 37 ; WX 833 ; N percent ; B 39 -8 784 685 ; -C 38 ; WX 778 ; N ampersand ; B 41 -19 727 676 ; -C 39 ; WX 333 ; N quoteright ; B 80 362 282 675 ; -C 40 ; WX 333 ; N parenleft ; B 28 -179 340 676 ; -C 41 ; WX 333 ; N parenright ; B -44 -179 268 676 ; -C 42 ; WX 500 ; N asterisk ; B 56 244 445 676 ; -C 43 ; WX 570 ; N plus ; B 33 0 537 505 ; -C 44 ; WX 250 ; N comma ; B -10 -181 192 132 ; -C 45 ; WX 333 ; N hyphen ; B 33 167 299 282 ; -C 46 ; WX 250 ; N period ; B 23 -13 170 133 ; -C 47 ; WX 278 ; N slash ; B -11 -18 289 682 ; -C 48 ; WX 500 ; N zero ; B 17 -13 472 676 ; -C 49 ; WX 500 ; N one ; B 5 0 415 676 ; -C 50 ; WX 500 ; N two ; B -27 0 441 676 ; -C 51 ; WX 500 ; N three ; B -15 -13 445 676 ; -C 52 ; WX 500 ; N four ; B -15 0 498 676 ; -C 53 ; WX 500 ; N five ; B -11 -13 482 662 ; -C 54 ; WX 500 ; N six ; B 23 -13 504 676 ; -C 55 ; WX 500 ; N seven ; B 51 0 519 662 ; -C 56 ; WX 500 ; N eight ; B 3 -13 471 676 ; -C 57 ; WX 500 ; N nine ; B -12 -13 470 676 ; -C 58 ; WX 333 ; N colon ; B 52 -13 291 458 ; -C 59 ; WX 333 ; N semicolon ; B 13 -181 291 458 ; -C 60 ; WX 570 ; N less ; B 31 -14 540 524 ; -C 61 ; WX 570 ; N equal ; B 33 116 537 401 ; -C 62 ; WX 570 ; N greater ; B 31 -14 540 524 ; -C 63 ; WX 500 ; N question ; B 78 -13 465 676 ; -C 64 ; WX 832 ; N at ; B -9 -150 838 691 ; -C 65 ; WX 667 ; N A ; B -51 0 602 676 ; -C 66 ; WX 667 ; N B ; B -24 0 618 662 ; -C 67 ; WX 667 ; N C ; B 22 -18 660 677 ; -C 68 ; WX 722 ; N D ; B -31 0 693 662 ; -C 69 ; WX 667 ; N E ; B -27 0 646 662 ; -C 70 ; WX 667 ; N F ; B -20 0 646 662 ; -C 71 ; WX 722 ; N G ; B 21 -18 699 676 ; -C 72 ; WX 778 ; N H ; B -24 0 791 662 ; -C 73 ; WX 389 ; N I ; B -22 0 412 662 ; -C 74 ; WX 500 ; N J ; B -45 -98 519 662 ; -C 75 ; WX 667 ; N K ; B -31 0 685 662 ; -C 76 ; WX 611 ; N L ; B -22 0 584 662 ; -C 77 ; WX 889 ; N M ; B -29 -12 907 662 ; -C 78 ; WX 722 ; N N ; B -27 -18 740 662 ; -C 79 ; WX 722 ; N O ; B 27 -18 684 676 ; -C 80 ; WX 611 ; N P ; B -27 0 608 662 ; -C 81 ; WX 722 ; N Q ; B 27 -203 684 676 ; -C 82 ; WX 667 ; N R ; B -29 0 616 662 ; -C 83 ; WX 556 ; N S ; B 6 -18 524 676 ; -C 84 ; WX 611 ; N T ; B 39 0 632 662 ; -C 85 ; WX 722 ; N U ; B 66 -18 736 662 ; -C 86 ; WX 667 ; N V ; B 48 -18 692 662 ; -C 87 ; WX 889 ; N W ; B 48 -18 914 662 ; -C 88 ; WX 667 ; N X ; B -24 0 687 662 ; -C 89 ; WX 611 ; N Y ; B 46 0 625 662 ; -C 90 ; WX 611 ; N Z ; B -1 0 594 662 ; -C 91 ; WX 333 ; N bracketleft ; B -7 -157 388 682 ; -C 92 ; WX 278 ; N backslash ; B 1 0 465 682 ; -C 93 ; WX 333 ; N bracketright ; B -65 -157 330 682 ; -C 94 ; WX 570 ; N asciicircum ; B 34 259 536 662 ; -C 95 ; WX 500 ; N underscore ; B 0 -127 500 -89 ; -C 96 ; WX 333 ; N quoteleft ; B 117 363 319 676 ; -C 97 ; WX 500 ; N a ; B 9 -14 480 458 ; -C 98 ; WX 500 ; N b ; B 21 -13 474 682 ; -C 99 ; WX 444 ; N c ; B 25 -13 418 458 ; -C 100 ; WX 500 ; N d ; B 9 -13 541 682 ; -C 101 ; WX 444 ; N e ; B 25 -13 413 458 ; -C 102 ; WX 333 ; N f ; B -146 -203 460 682 ; L i fi ; L l fl ; -C 103 ; WX 500 ; N g ; B -27 -203 498 458 ; -C 104 ; WX 556 ; N h ; B 12 -13 518 682 ; -C 105 ; WX 278 ; N i ; B 25 -13 284 676 ; -C 106 ; WX 278 ; N j ; B -152 -203 311 676 ; -C 107 ; WX 500 ; N k ; B 10 -13 511 682 ; -C 108 ; WX 278 ; N l ; B 31 -13 312 682 ; -C 109 ; WX 778 ; N m ; B 16 -13 744 458 ; -C 110 ; WX 556 ; N n ; B 24 -13 518 458 ; -C 111 ; WX 500 ; N o ; B 27 -13 467 458 ; -C 112 ; WX 500 ; N p ; B -79 -203 481 458 ; -C 113 ; WX 500 ; N q ; B 21 -203 486 459 ; -C 114 ; WX 389 ; N r ; B 9 0 415 458 ; -C 115 ; WX 389 ; N s ; B 16 -13 364 459 ; -C 116 ; WX 278 ; N t ; B 16 -14 305 592 ; -C 117 ; WX 556 ; N u ; B 48 -13 521 458 ; -C 118 ; WX 444 ; N v ; B 50 -13 432 458 ; -C 119 ; WX 667 ; N w ; B 50 -13 642 458 ; -C 120 ; WX 500 ; N x ; B -5 -13 498 458 ; -C 121 ; WX 444 ; N y ; B -60 -203 423 458 ; -C 122 ; WX 389 ; N z ; B -24 -58 394 448 ; -C 123 ; WX 348 ; N braceleft ; B 31 -154 381 686 ; -C 124 ; WX 220 ; N bar ; B 70 0 151 682 ; -C 125 ; WX 348 ; N braceright ; B -31 -161 319 679 ; -C 126 ; WX 570 ; N asciitilde ; B 33 158 537 353 ; -C 161 ; WX 389 ; N exclamdown ; B 21 -232 321 458 ; -C 162 ; WX 500 ; N cent ; B 50 -142 443 570 ; -C 163 ; WX 500 ; N sterling ; B -32 -13 505 676 ; -C 164 ; WX 167 ; N fraction ; B -161 0 327 662 ; -C 165 ; WX 500 ; N yen ; B -15 0 565 662 ; -C 166 ; WX 500 ; N florin ; B -86 -154 530 682 ; -C 167 ; WX 500 ; N section ; B 36 -143 454 676 ; -C 168 ; WX 500 ; N currency ; B -3 110 503 612 ; -C 169 ; WX 278 ; N quotesingle ; B 126 367 295 693 ; -C 170 ; WX 500 ; N quotedblleft ; B 57 363 513 676 ; -C 171 ; WX 500 ; N guillemotleft ; B 21 33 474 416 ; -C 172 ; WX 333 ; N guilsinglleft ; B 42 33 310 416 ; -C 173 ; WX 333 ; N guilsinglright ; B 23 38 291 421 ; -C 174 ; WX 556 ; N fi ; B -157 -203 538 682 ; -C 175 ; WX 556 ; N fl ; B -149 -203 577 682 ; -C 177 ; WX 500 ; N endash ; B -11 176 511 266 ; -C 178 ; WX 500 ; N dagger ; B 90 -146 489 676 ; -C 179 ; WX 500 ; N daggerdbl ; B 11 -143 487 675 ; -C 180 ; WX 250 ; N periodcentered ; B 51 179 200 328 ; -C 182 ; WX 500 ; N paragraph ; B 61 -189 592 682 ; -C 183 ; WX 350 ; N bullet ; B 50 175 300 425 ; -C 184 ; WX 333 ; N quotesinglbase ; B 66 -181 268 132 ; -C 185 ; WX 500 ; N quotedblbase ; B -57 -181 398 132 ; -C 186 ; WX 500 ; N quotedblright ; B 56 362 509 675 ; -C 187 ; WX 500 ; N guillemotright ; B 21 38 474 421 ; -C 188 ; WX 1000 ; N ellipsis ; B 93 -13 906 133 ; -C 189 ; WX 1000 ; N perthousand ; B 7 -49 985 699 ; -C 191 ; WX 500 ; N questiondown ; B 30 -203 417 487 ; -C 193 ; WX 333 ; N grave ; B 115 511 325 690 ; -C 194 ; WX 333 ; N acute ; B 168 511 405 690 ; -C 195 ; WX 333 ; N circumflex ; B 70 510 394 682 ; -C 196 ; WX 333 ; N tilde ; B 69 530 424 648 ; -C 197 ; WX 333 ; N macron ; B 81 547 420 616 ; -C 198 ; WX 333 ; N breve ; B 99 511 414 671 ; -C 199 ; WX 333 ; N dotaccent ; B 180 519 308 648 ; -C 200 ; WX 333 ; N dieresis ; B 85 519 424 648 ; -C 202 ; WX 333 ; N ring ; B 141 466 352 676 ; -C 203 ; WX 333 ; N cedilla ; B 32 -216 264 5 ; -C 205 ; WX 333 ; N hungarumlaut ; B 28 538 339 750 ; -C 206 ; WX 333 ; N ogonek ; B -37 -173 192 44 ; -C 207 ; WX 333 ; N caron ; B 109 511 437 683 ; -C 208 ; WX 1000 ; N emdash ; B -14 176 1014 266 ; -C 225 ; WX 944 ; N AE ; B -41 0 931 662 ; -C 227 ; WX 266 ; N ordfeminine ; B -24 286 291 676 ; -C 232 ; WX 611 ; N Lslash ; B -22 0 584 662 ; -C 233 ; WX 722 ; N Oslash ; B 27 -124 684 754 ; -C 234 ; WX 944 ; N OE ; B 23 -8 936 670 ; -C 235 ; WX 300 ; N ordmasculine ; B 1 286 300 676 ; -C 241 ; WX 722 ; N ae ; B 15 -13 685 458 ; -C 245 ; WX 278 ; N dotlessi ; B 27 -13 260 458 ; -C 248 ; WX 278 ; N lslash ; B 12 -13 326 682 ; -C 249 ; WX 500 ; N oslash ; B 27 -118 467 556 ; -C 250 ; WX 722 ; N oe ; B 26 -13 687 458 ; -C 251 ; WX 500 ; N germandbls ; B -168 -203 497 682 ; -C -1 ; WX 667 ; N Aacute ; B -51 0 602 894 ; -C -1 ; WX 667 ; N Acircumflex ; B -51 0 602 886 ; -C -1 ; WX 667 ; N Adieresis ; B -51 0 602 852 ; -C -1 ; WX 667 ; N Agrave ; B -51 0 602 894 ; -C -1 ; WX 667 ; N Aring ; B -51 0 602 880 ; -C -1 ; WX 667 ; N Atilde ; B -51 0 602 852 ; -C -1 ; WX 667 ; N Ccedilla ; B 22 -216 660 677 ; -C -1 ; WX 667 ; N Eacute ; B -27 0 646 894 ; -C -1 ; WX 667 ; N Ecircumflex ; B -27 0 646 886 ; -C -1 ; WX 667 ; N Edieresis ; B -27 0 646 852 ; -C -1 ; WX 667 ; N Egrave ; B -27 0 646 894 ; -C -1 ; WX 722 ; N Eth ; B -31 0 693 662 ; -C -1 ; WX 389 ; N Iacute ; B -22 0 433 894 ; -C -1 ; WX 389 ; N Icircumflex ; B -22 0 422 886 ; -C -1 ; WX 389 ; N Idieresis ; B -22 0 452 852 ; -C -1 ; WX 389 ; N Igrave ; B -22 0 412 894 ; -C -1 ; WX 722 ; N Ntilde ; B -27 -18 740 852 ; -C -1 ; WX 722 ; N Oacute ; B 27 -18 684 894 ; -C -1 ; WX 722 ; N Ocircumflex ; B 27 -18 684 886 ; -C -1 ; WX 722 ; N Odieresis ; B 27 -18 684 852 ; -C -1 ; WX 722 ; N Ograve ; B 27 -18 684 894 ; -C -1 ; WX 722 ; N Otilde ; B 27 -18 684 852 ; -C -1 ; WX 556 ; N Scaron ; B 6 -18 549 887 ; -C -1 ; WX 611 ; N Thorn ; B -27 0 572 662 ; -C -1 ; WX 722 ; N Uacute ; B 66 -18 736 894 ; -C -1 ; WX 722 ; N Ucircumflex ; B 66 -18 736 886 ; -C -1 ; WX 722 ; N Udieresis ; B 66 -18 736 852 ; -C -1 ; WX 722 ; N Ugrave ; B 66 -18 736 894 ; -C -1 ; WX 611 ; N Yacute ; B 46 0 625 894 ; -C -1 ; WX 611 ; N Ydieresis ; B 46 0 625 852 ; -C -1 ; WX 611 ; N Zcaron ; B -1 0 594 887 ; -C -1 ; WX 500 ; N aacute ; B 9 -14 489 690 ; -C -1 ; WX 500 ; N acircumflex ; B 9 -14 480 682 ; -C -1 ; WX 500 ; N adieresis ; B 9 -14 508 648 ; -C -1 ; WX 500 ; N agrave ; B 9 -14 480 690 ; -C -1 ; WX 500 ; N aring ; B 9 -14 480 676 ; -C -1 ; WX 500 ; N atilde ; B 9 -14 508 648 ; -C -1 ; WX 220 ; N brokenbar ; B 70 0 151 682 ; -C -1 ; WX 444 ; N ccedilla ; B 25 -216 418 458 ; -C -1 ; WX 747 ; N copyright ; B 23 -18 723 676 ; -C -1 ; WX 400 ; N degree ; B 70 376 370 676 ; -C -1 ; WX 570 ; N divide ; B 33 0 537 505 ; -C -1 ; WX 444 ; N eacute ; B 25 -13 461 690 ; -C -1 ; WX 444 ; N ecircumflex ; B 25 -13 450 682 ; -C -1 ; WX 444 ; N edieresis ; B 25 -13 480 648 ; -C -1 ; WX 444 ; N egrave ; B 25 -13 413 690 ; -C -1 ; WX 500 ; N eth ; B 27 -13 498 682 ; -C -1 ; WX 278 ; N iacute ; B 27 -13 378 690 ; -C -1 ; WX 278 ; N icircumflex ; B 27 -13 367 682 ; -C -1 ; WX 278 ; N idieresis ; B 27 -13 397 648 ; -C -1 ; WX 278 ; N igrave ; B 27 -13 298 690 ; -C -1 ; WX 606 ; N logicalnot ; B 51 120 555 401 ; -C -1 ; WX 606 ; N minus ; B 51 210 555 300 ; -C -1 ; WX 576 ; N mu ; B -63 -210 521 458 ; -C -1 ; WX 570 ; N multiply ; B 33 0 537 504 ; -C -1 ; WX 556 ; N ntilde ; B 24 -13 536 648 ; -C -1 ; WX 500 ; N oacute ; B 27 -13 489 690 ; -C -1 ; WX 500 ; N ocircumflex ; B 27 -13 478 682 ; -C -1 ; WX 500 ; N odieresis ; B 27 -13 508 648 ; -C -1 ; WX 500 ; N ograve ; B 27 -13 467 690 ; -C -1 ; WX 750 ; N onehalf ; B 30 0 720 676 ; -C -1 ; WX 750 ; N onequarter ; B 30 0 720 676 ; -C -1 ; WX 300 ; N onesuperior ; B 17 270 283 676 ; -C -1 ; WX 500 ; N otilde ; B 27 -13 508 648 ; -C -1 ; WX 570 ; N plusminus ; B 33 0 537 665 ; -C -1 ; WX 747 ; N registered ; B 23 -18 723 676 ; -C -1 ; WX 389 ; N scaron ; B 16 -13 465 683 ; -C -1 ; WX 500 ; N thorn ; B -79 -203 474 682 ; -C -1 ; WX 750 ; N threequarters ; B 30 0 720 676 ; -C -1 ; WX 300 ; N threesuperior ; B 0 263 299 676 ; -C -1 ; WX 1000 ; N trademark ; B 40 272 980 676 ; -C -1 ; WX 300 ; N twosuperior ; B -2 270 302 676 ; -C -1 ; WX 556 ; N uacute ; B 48 -13 521 690 ; -C -1 ; WX 556 ; N ucircumflex ; B 48 -13 521 682 ; -C -1 ; WX 556 ; N udieresis ; B 48 -13 536 648 ; -C -1 ; WX 556 ; N ugrave ; B 48 -13 521 690 ; -C -1 ; WX 444 ; N yacute ; B -60 -203 461 690 ; -C -1 ; WX 444 ; N ydieresis ; B -60 -203 480 648 ; -C -1 ; WX 389 ; N zcaron ; B -24 -58 465 683 ; -EndCharMetrics -StartKernData -StartKernPairs 108 - -KPX A y -74 -KPX A w -74 -KPX A v -74 -KPX A space -55 -KPX A quoteright -74 -KPX A Y -55 -KPX A W -92 -KPX A V -74 -KPX A T -55 - -KPX F space -18 -KPX F period -129 -KPX F comma -129 -KPX F A -92 - -KPX L y -37 -KPX L space -37 -KPX L quoteright -55 -KPX L Y -37 -KPX L W -37 -KPX L V -37 -KPX L T -18 - -KPX P space -37 -KPX P period -129 -KPX P comma -129 -KPX P A -74 - -KPX R y -18 -KPX R Y -18 -KPX R W -18 -KPX R V -18 - -KPX T y -37 -KPX T w -37 -KPX T u -37 -KPX T semicolon -74 -KPX T s -92 -KPX T r -37 -KPX T period -92 -KPX T o -92 -KPX T i -37 -KPX T hyphen -92 -KPX T e -92 -KPX T comma -92 -KPX T colon -74 -KPX T c -92 -KPX T a -92 -KPX T O -18 -KPX T A -55 - -KPX V y -74 -KPX V u -55 -KPX V space -18 -KPX V semicolon -74 -KPX V r -55 -KPX V period -129 -KPX V o -111 -KPX V i -55 -KPX V hyphen -55 -KPX V e -111 -KPX V comma -129 -KPX V colon -74 -KPX V a -111 -KPX V A -74 - -KPX W y -55 -KPX W u -55 -KPX W space -18 -KPX W semicolon -55 -KPX W r -74 -KPX W period -74 -KPX W o -74 -KPX W i -37 -KPX W hyphen -37 -KPX W e -74 -KPX W comma -74 -KPX W colon -55 -KPX W a -74 -KPX W A -74 - -KPX Y v -92 -KPX Y u -92 -KPX Y space -37 -KPX Y semicolon -92 -KPX Y q -111 -KPX Y period -74 -KPX Y p -74 -KPX Y o -111 -KPX Y i -55 -KPX Y hyphen -92 -KPX Y e -111 -KPX Y comma -92 -KPX Y colon -92 -KPX Y a -92 -KPX Y A -74 - -KPX f quoteright 55 -KPX f f -18 - -KPX one one -55 - -KPX quoteleft quoteleft -74 - -KPX quoteright t -37 -KPX quoteright space -74 -KPX quoteright s -74 -KPX quoteright quoteright -74 - -KPX r quoteright 37 -KPX r period -55 -KPX r comma -55 - -KPX space Y -18 -KPX space W -18 -KPX space A -37 - -KPX v period -37 -KPX v comma -37 - -KPX w period -37 -KPX w comma -37 - -KPX y period -37 -KPX y comma -37 -EndKernPairs -EndKernData -StartComposites 56 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 204 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 28 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 111 204 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 28 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 167 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 55 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 139 204 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 55 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 194 204 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 194 204 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 194 204 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 194 204 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 111 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 111 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 111 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 111 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute 28 204 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 28 204 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 28 204 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave 28 204 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 167 204 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 167 204 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 167 204 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 167 204 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 55 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 55 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 55 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 55 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 167 204 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 167 204 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 167 204 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 167 204 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 83 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 83 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 83 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 83 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 194 204 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 194 204 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 194 204 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 194 204 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 83 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 83 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 83 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 83 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 167 204 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 83 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 194 204 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 111 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 194 204 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 83 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 167 204 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 83 0 ; -EndComposites -EndFontMetrics diff --git a/misc/afm/TimesO.afm b/misc/afm/TimesO.afm deleted file mode 100644 index b8ffc6a0f3..0000000000 --- a/misc/afm/TimesO.afm +++ /dev/null @@ -1,450 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Tue Aug 5 11:12:17 PDT 1986 -FontName Times-Italic -EncodingScheme AdobeStandardEncoding -FullName Times Italic -FamilyName Times -Weight Medium -ItalicAngle -15.5 -IsFixedPitch false -UnderlinePosition -96 -UnderlineThickness 48 -Version 001.001 -Notice Times is a trademark of Allied Corporation. -FontBBox -176 -252 990 930 -CapHeight 660 -XHeight 446 -Descender -206 -Ascender 684 -StartCharMetrics 228 -C 32 ; WX 250 ; N space ; B 0 0 0 0 ; -C 33 ; WX 333 ; N exclam ; B 46 -10 296 670 ; -C 34 ; WX 420 ; N quotedbl ; B 107 442 402 673 ; -C 35 ; WX 500 ; N numbersign ; B -7 -6 508 683 ; -C 36 ; WX 500 ; N dollar ; B 13 -102 481 735 ; -C 37 ; WX 833 ; N percent ; B 63 -14 770 682 ; -C 38 ; WX 778 ; N ampersand ; B 60 -22 698 673 ; -C 39 ; WX 333 ; N quoteright ; B 69 458 206 678 ; -C 40 ; WX 333 ; N parenleft ; B 41 -180 312 662 ; -C 41 ; WX 333 ; N parenright ; B 19 -178 286 664 ; -C 42 ; WX 500 ; N asterisk ; B 60 268 434 684 ; -C 43 ; WX 675 ; N plus ; B 85 0 589 505 ; -C 44 ; WX 250 ; N comma ; B 57 -126 194 94 ; -C 45 ; WX 333 ; N hyphen ; B 55 192 276 254 ; -C 46 ; WX 250 ; N period ; B 75 -10 175 90 ; -C 47 ; WX 278 ; N slash ; B 2 -14 252 641 ; -C 48 ; WX 500 ; N zero ; B 19 -9 470 683 ; -C 49 ; WX 500 ; N one ; B 31 0 390 684 ; -C 50 ; WX 500 ; N two ; B -7 0 429 682 ; -C 51 ; WX 500 ; N three ; B -7 -12 443 682 ; -C 52 ; WX 500 ; N four ; B -8 0 454 681 ; -C 53 ; WX 500 ; N five ; B -12 -15 462 666 ; -C 54 ; WX 500 ; N six ; B 24 -8 497 685 ; -C 55 ; WX 500 ; N seven ; B 56 -12 512 666 ; -C 56 ; WX 500 ; N eight ; B 12 -7 475 681 ; -C 57 ; WX 500 ; N nine ; B 10 -18 470 684 ; -C 58 ; WX 333 ; N colon ; B 86 -10 284 444 ; -C 59 ; WX 333 ; N semicolon ; B 63 -124 292 441 ; -C 60 ; WX 675 ; N less ; B 83 -7 592 515 ; -C 61 ; WX 675 ; N equal ; B 85 125 589 383 ; -C 62 ; WX 675 ; N greater ; B 82 -7 591 515 ; -C 63 ; WX 500 ; N question ; B 105 -10 439 670 ; -C 64 ; WX 920 ; N at ; B 39 -191 866 648 ; -C 65 ; WX 611 ; N A ; B -45 0 564 672 ; -C 66 ; WX 611 ; N B ; B -28 0 562 660 ; -C 67 ; WX 667 ; N C ; B 33 -23 653 672 ; -C 68 ; WX 722 ; N D ; B -27 0 671 660 ; -C 69 ; WX 611 ; N E ; B -17 0 609 660 ; -C 70 ; WX 611 ; N F ; B -17 0 609 660 ; -C 71 ; WX 722 ; N G ; B 31 -23 701 672 ; -C 72 ; WX 722 ; N H ; B -26 0 742 660 ; -C 73 ; WX 333 ; N I ; B -26 0 357 660 ; -C 74 ; WX 444 ; N J ; B -36 -22 479 660 ; -C 75 ; WX 667 ; N K ; B -15 0 702 660 ; -C 76 ; WX 556 ; N L ; B -32 0 535 660 ; -C 77 ; WX 833 ; N M ; B -24 0 850 660 ; -C 78 ; WX 667 ; N N ; B -36 -12 698 660 ; -C 79 ; WX 722 ; N O ; B 42 -23 676 671 ; -C 80 ; WX 611 ; N P ; B -16 0 582 660 ; -C 81 ; WX 722 ; N Q ; B 41 -186 681 671 ; -C 82 ; WX 611 ; N R ; B -32 0 566 660 ; -C 83 ; WX 500 ; N S ; B 9 -22 483 674 ; -C 84 ; WX 556 ; N T ; B 32 0 602 660 ; -C 85 ; WX 722 ; N U ; B 77 -21 747 660 ; -C 86 ; WX 611 ; N V ; B 44 -20 659 660 ; -C 87 ; WX 833 ; N W ; B 35 -20 875 660 ; -C 88 ; WX 611 ; N X ; B -45 0 633 660 ; -C 89 ; WX 556 ; N Y ; B 44 0 600 660 ; -C 90 ; WX 556 ; N Z ; B -19 0 581 660 ; -C 91 ; WX 389 ; N bracketleft ; B 22 -170 391 654 ; -C 92 ; WX 278 ; N backslash ; B 2 -12 252 651 ; -C 93 ; WX 389 ; N bracketright ; B -31 -170 341 654 ; -C 94 ; WX 422 ; N asciicircum ; B 0 254 503 660 ; -C 95 ; WX 500 ; N underscore ; B -9 -252 510 -206 ; -C 96 ; WX 333 ; N quoteleft ; B 149 457 286 677 ; -C 97 ; WX 500 ; N a ; B 15 -11 474 446 ; -C 98 ; WX 500 ; N b ; B 24 -12 475 682 ; -C 99 ; WX 444 ; N c ; B 32 -11 420 446 ; -C 100 ; WX 500 ; N d ; B 15 -11 521 684 ; -C 101 ; WX 444 ; N e ; B 34 -13 412 446 ; -C 102 ; WX 278 ; N f ; B -148 -207 415 684 ; L i fi ; L l fl ; -C 103 ; WX 500 ; N g ; B 10 -209 471 445 ; -C 104 ; WX 500 ; N h ; B 23 -10 473 684 ; -C 105 ; WX 278 ; N i ; B 43 -10 263 660 ; -C 106 ; WX 278 ; N j ; B -109 -207 287 660 ; -C 107 ; WX 444 ; N k ; B 16 -12 460 685 ; -C 108 ; WX 278 ; N l ; B 41 -10 276 685 ; -C 109 ; WX 722 ; N m ; B 11 -10 698 447 ; -C 110 ; WX 500 ; N n ; B 23 -10 471 447 ; -C 111 ; WX 500 ; N o ; B 27 -13 467 448 ; -C 112 ; WX 500 ; N p ; B -75 -206 465 446 ; -C 113 ; WX 500 ; N q ; B 20 -206 483 445 ; -C 114 ; WX 389 ; N r ; B 24 0 392 446 ; -C 115 ; WX 389 ; N s ; B 16 -14 367 446 ; -C 116 ; WX 278 ; N t ; B 38 -10 288 548 ; -C 117 ; WX 500 ; N u ; B 42 -11 472 447 ; -C 118 ; WX 444 ; N v ; B 24 -11 423 444 ; -C 119 ; WX 667 ; N w ; B 14 -10 650 447 ; -C 120 ; WX 444 ; N x ; B -31 -10 450 446 ; -C 121 ; WX 444 ; N y ; B -27 -209 420 445 ; -C 122 ; WX 389 ; N z ; B 2 0 380 434 ; -C 123 ; WX 400 ; N braceleft ; B 65 -179 411 675 ; -C 124 ; WX 275 ; N bar ; B -22 -188 251 670 ; -C 125 ; WX 400 ; N braceright ; B -66 -179 300 675 ; -C 126 ; WX 541 ; N asciitilde ; B 18 169 522 340 ; -C 161 ; WX 389 ; N exclamdown ; B 59 -213 317 468 ; -C 162 ; WX 500 ; N cent ; B 62 -146 449 564 ; -C 163 ; WX 500 ; N sterling ; B -5 -9 498 672 ; -C 164 ; WX 167 ; N fraction ; B -176 -15 338 672 ; -C 165 ; WX 500 ; N yen ; B 13 0 609 684 ; -C 166 ; WX 500 ; N florin ; B 3 -189 492 688 ; -C 167 ; WX 500 ; N section ; B 42 -96 455 743 ; -C 168 ; WX 500 ; N currency ; B 3 105 498 604 ; -C 169 ; WX 214 ; N quotesingle ; B 99 453 247 678 ; -C 170 ; WX 556 ; N quotedblleft ; B 166 457 510 677 ; -C 171 ; WX 500 ; N guillemotleft ; B 54 39 444 400 ; -C 172 ; WX 333 ; N guilsinglleft ; B 60 39 285 400 ; -C 173 ; WX 333 ; N guilsinglright ; B 49 34 269 406 ; -C 174 ; WX 500 ; N fi ; B -136 -207 468 684 ; -C 175 ; WX 500 ; N fl ; B -140 -207 509 684 ; -C 177 ; WX 500 ; N endash ; B -3 194 501 242 ; -C 178 ; WX 500 ; N dagger ; B 92 -93 480 734 ; -C 179 ; WX 500 ; N daggerdbl ; B 20 -93 482 743 ; -C 180 ; WX 250 ; N periodcentered ; B 75 192 199 316 ; -C 182 ; WX 523 ; N paragraph ; B 87 -196 533 675 ; -C 183 ; WX 350 ; N bullet ; B 50 175 300 425 ; -C 184 ; WX 333 ; N quotesinglbase ; B 83 -126 220 94 ; -C 185 ; WX 556 ; N quotedblbase ; B 63 -126 407 94 ; -C 186 ; WX 556 ; N quotedblright ; B 68 458 412 678 ; -C 187 ; WX 500 ; N guillemotright ; B 59 34 442 406 ; -C 188 ; WX 889 ; N ellipsis ; B 62 -10 828 90 ; -C 189 ; WX 1000 ; N perthousand ; B 9 -65 990 690 ; -C 191 ; WX 500 ; N questiondown ; B 55 -215 395 462 ; -C 193 ; WX 333 ; N grave ; B 160 491 333 659 ; -C 194 ; WX 333 ; N acute ; B 154 501 375 680 ; -C 195 ; WX 333 ; N circumflex ; B 96 495 374 669 ; -C 196 ; WX 333 ; N tilde ; B 114 518 386 639 ; -C 197 ; WX 333 ; N macron ; B 120 543 380 603 ; -C 198 ; WX 333 ; N breve ; B 140 512 401 645 ; -C 199 ; WX 333 ; N dotaccent ; B 112 515 222 625 ; -C 200 ; WX 333 ; N dieresis ; B 117 534 389 634 ; -C 202 ; WX 333 ; N ring ; B 239 509 433 703 ; -C 203 ; WX 333 ; N cedilla ; B -30 -206 214 0 ; -C 205 ; WX 333 ; N hungarumlaut ; B 62 532 348 749 ; -C 206 ; WX 333 ; N ogonek ; B -44 -159 169 40 ; -C 207 ; WX 333 ; N caron ; B 138 495 422 669 ; -C 208 ; WX 889 ; N emdash ; B -65 194 945 242 ; -C 225 ; WX 889 ; N AE ; B -46 0 889 660 ; -C 227 ; WX 276 ; N ordfeminine ; B 32 300 310 677 ; -C 232 ; WX 556 ; N Lslash ; B 0 0 567 660 ; -C 233 ; WX 722 ; N Oslash ; B 40 -110 683 738 ; -C 234 ; WX 944 ; N OE ; B 30 -10 943 668 ; -C 235 ; WX 310 ; N ordmasculine ; B 45 301 310 679 ; -C 241 ; WX 667 ; N ae ; B 24 -12 638 448 ; -C 245 ; WX 278 ; N dotlessi ; B 47 -10 226 447 ; -C 248 ; WX 278 ; N lslash ; B 0 -10 264 685 ; -C 249 ; WX 500 ; N oslash ; B 28 -132 468 560 ; -C 250 ; WX 667 ; N oe ; B 26 -15 643 445 ; -C 251 ; WX 500 ; N germandbls ; B -167 -209 492 684 ; -C -1 ; WX 611 ; N Aacute ; B -45 0 564 907 ; -C -1 ; WX 611 ; N Acircumflex ; B -45 0 564 896 ; -C -1 ; WX 611 ; N Adieresis ; B -45 0 564 861 ; -C -1 ; WX 611 ; N Agrave ; B -45 0 564 886 ; -C -1 ; WX 611 ; N Aring ; B -45 0 564 930 ; -C -1 ; WX 611 ; N Atilde ; B -45 0 564 866 ; -C -1 ; WX 667 ; N Ccedilla ; B 33 -206 653 672 ; -C -1 ; WX 611 ; N Eacute ; B -17 0 609 907 ; -C -1 ; WX 611 ; N Ecircumflex ; B -17 0 609 896 ; -C -1 ; WX 611 ; N Edieresis ; B -17 0 609 861 ; -C -1 ; WX 611 ; N Egrave ; B -17 0 609 886 ; -C -1 ; WX 722 ; N Eth ; B -27 0 671 660 ; -C -1 ; WX 333 ; N Iacute ; B -26 0 389 907 ; -C -1 ; WX 333 ; N Icircumflex ; B -26 0 388 896 ; -C -1 ; WX 333 ; N Idieresis ; B -26 0 403 861 ; -C -1 ; WX 333 ; N Igrave ; B -26 0 357 886 ; -C -1 ; WX 667 ; N Ntilde ; B -36 -12 698 866 ; -C -1 ; WX 722 ; N Oacute ; B 42 -23 676 907 ; -C -1 ; WX 722 ; N Ocircumflex ; B 42 -23 676 896 ; -C -1 ; WX 722 ; N Odieresis ; B 42 -23 676 861 ; -C -1 ; WX 722 ; N Ograve ; B 42 -23 676 886 ; -C -1 ; WX 722 ; N Otilde ; B 42 -23 676 866 ; -C -1 ; WX 500 ; N Scaron ; B 9 -22 506 896 ; -C -1 ; WX 611 ; N Thorn ; B -16 0 547 660 ; -C -1 ; WX 722 ; N Uacute ; B 77 -21 747 907 ; -C -1 ; WX 722 ; N Ucircumflex ; B 77 -21 747 896 ; -C -1 ; WX 722 ; N Udieresis ; B 77 -21 747 861 ; -C -1 ; WX 722 ; N Ugrave ; B 77 -21 747 886 ; -C -1 ; WX 556 ; N Yacute ; B 44 0 600 894 ; -C -1 ; WX 556 ; N Ydieresis ; B 44 0 600 861 ; -C -1 ; WX 556 ; N Zcaron ; B -19 0 581 896 ; -C -1 ; WX 500 ; N aacute ; B 15 -11 474 680 ; -C -1 ; WX 500 ; N acircumflex ; B 15 -11 474 669 ; -C -1 ; WX 500 ; N adieresis ; B 15 -11 479 634 ; -C -1 ; WX 500 ; N agrave ; B 15 -11 474 659 ; -C -1 ; WX 500 ; N aring ; B 15 -11 474 703 ; -C -1 ; WX 500 ; N atilde ; B 15 -11 476 639 ; -C -1 ; WX 275 ; N brokenbar ; B -22 -188 251 670 ; -C -1 ; WX 444 ; N ccedilla ; B 32 -206 420 446 ; -C -1 ; WX 760 ; N copyright ; B 40 -22 719 672 ; -C -1 ; WX 400 ; N degree ; B 70 384 370 684 ; -C -1 ; WX 675 ; N divide ; B 85 0 589 505 ; -C -1 ; WX 444 ; N eacute ; B 34 -13 444 680 ; -C -1 ; WX 444 ; N ecircumflex ; B 34 -13 443 669 ; -C -1 ; WX 444 ; N edieresis ; B 34 -13 458 634 ; -C -1 ; WX 444 ; N egrave ; B 34 -13 412 659 ; -C -1 ; WX 500 ; N eth ; B 27 -13 487 682 ; -C -1 ; WX 278 ; N iacute ; B 47 -10 341 680 ; -C -1 ; WX 278 ; N icircumflex ; B 47 -10 340 669 ; -C -1 ; WX 278 ; N idieresis ; B 47 -10 355 634 ; -C -1 ; WX 278 ; N igrave ; B 47 -10 299 659 ; -C -1 ; WX 675 ; N logicalnot ; B 85 113 589 383 ; -C -1 ; WX 675 ; N minus ; B 85 222 589 286 ; -C -1 ; WX 500 ; N mu ; B -60 -206 472 446 ; -C -1 ; WX 675 ; N multiply ; B 85 0 589 504 ; -C -1 ; WX 500 ; N ntilde ; B 23 -10 471 639 ; -C -1 ; WX 500 ; N oacute ; B 27 -13 467 680 ; -C -1 ; WX 500 ; N ocircumflex ; B 27 -13 467 669 ; -C -1 ; WX 500 ; N odieresis ; B 27 -13 479 634 ; -C -1 ; WX 500 ; N ograve ; B 27 -13 467 659 ; -C -1 ; WX 750 ; N onehalf ; B 30 -15 720 684 ; -C -1 ; WX 750 ; N onequarter ; B 30 -15 720 684 ; -C -1 ; WX 300 ; N onesuperior ; B 43 274 277 683 ; -C -1 ; WX 500 ; N otilde ; B 27 -13 476 639 ; -C -1 ; WX 675 ; N plusminus ; B 85 0 589 645 ; -C -1 ; WX 760 ; N registered ; B 40 -22 719 672 ; -C -1 ; WX 389 ; N scaron ; B 16 -14 450 669 ; -C -1 ; WX 500 ; N thorn ; B -75 -206 465 682 ; -C -1 ; WX 750 ; N threequarters ; B 30 -15 720 684 ; -C -1 ; WX 300 ; N threesuperior ; B 13 267 306 684 ; -C -1 ; WX 980 ; N trademark ; B 35 268 945 672 ; -C -1 ; WX 300 ; N twosuperior ; B 8 274 292 684 ; -C -1 ; WX 500 ; N uacute ; B 42 -11 472 680 ; -C -1 ; WX 500 ; N ucircumflex ; B 42 -11 472 669 ; -C -1 ; WX 500 ; N udieresis ; B 42 -11 473 634 ; -C -1 ; WX 500 ; N ugrave ; B 42 -11 472 659 ; -C -1 ; WX 444 ; N yacute ; B -27 -209 431 680 ; -C -1 ; WX 444 ; N ydieresis ; B -27 -209 445 634 ; -C -1 ; WX 389 ; N zcaron ; B 2 0 450 669 ; -EndCharMetrics -StartKernData -StartKernPairs 120 - -KPX A y -55 -KPX A w -55 -KPX A v -55 -KPX A space -18 -KPX A quoteright -37 -KPX A Y -55 -KPX A W -37 -KPX A V -50 -KPX A T -37 - -KPX F period -129 -KPX F comma -129 -KPX F A -129 - -KPX L y -30 -KPX L space -18 -KPX L quoteright -37 -KPX L Y -20 -KPX L W -37 -KPX L V -37 -KPX L T -20 - -KPX P space -18 -KPX P period -129 -KPX P comma -129 -KPX P A -129 - -KPX R y -18 -KPX R Y -18 -KPX R W -18 -KPX R V -18 -KPX R T 0 - -KPX T y -74 -KPX T w -74 -KPX T u -55 -KPX T space -18 -KPX T semicolon -65 -KPX T s -92 -KPX T r -55 -KPX T period -74 -KPX T o -92 -KPX T i -55 -KPX T hyphen -74 -KPX T e -92 -KPX T comma -74 -KPX T colon -55 -KPX T c -92 -KPX T a -92 -KPX T O -18 -KPX T A -74 - -KPX V y -92 -KPX V u -74 -KPX V space -18 -KPX V semicolon -74 -KPX V r -74 -KPX V period -129 -KPX V o -111 -KPX V i -74 -KPX V hyphen -55 -KPX V e -111 -KPX V comma -129 -KPX V colon -65 -KPX V a -111 -KPX V O -30 -KPX V A -74 - -KPX W y -92 -KPX W u -55 -KPX W semicolon -65 -KPX W r -55 -KPX W period -92 -KPX W o -92 -KPX W i -55 -KPX W hyphen -37 -KPX W e -92 -KPX W comma -92 -KPX W colon -65 -KPX W a -92 -KPX W A -70 - -KPX Y v -92 -KPX Y u -92 -KPX Y semicolon -65 -KPX Y q -111 -KPX Y period -92 -KPX Y p -92 -KPX Y o -92 -KPX Y i -74 -KPX Y hyphen -74 -KPX Y e -92 -KPX Y comma -92 -KPX Y colon -65 -KPX Y a -92 -KPX Y A -70 - -KPX f quoteright 92 - -KPX one one -74 - -KPX quoteleft quoteleft -111 - -KPX quoteright t -111 -KPX quoteright space -111 -KPX quoteright s -129 -KPX quoteright quoteright -111 - -KPX r y 0 -KPX r x 0 -KPX r w 0 -KPX r v 0 -KPX r u 0 -KPX r t 0 -KPX r r 0 -KPX r quoteright 37 -KPX r q -37 -KPX r period -111 -KPX r o -37 -KPX r hyphen -20 -KPX r h -18 -KPX r g -37 -KPX r e -37 -KPX r d -37 -KPX r comma -111 -KPX r c -37 - -KPX space A -18 - -KPX v period -74 -KPX v comma -74 - -KPX w period -74 -KPX w comma -74 - -KPX y period -55 -KPX y comma -55 -EndKernPairs -EndKernData -StartComposites 56 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 111 227 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 28 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 83 227 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 28 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 188 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 61 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 111 227 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 55 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 228 227 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 228 227 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 228 227 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 228 227 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 83 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 83 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 83 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 83 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute 14 227 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 14 227 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 14 227 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave 14 227 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -34 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -34 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -34 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -34 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 160 227 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 160 227 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 160 227 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 160 227 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 68 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 68 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 68 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 68 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 146 227 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 146 227 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 146 227 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 146 227 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 89 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 89 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 89 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 89 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 221 227 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 221 227 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 221 227 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 221 227 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 89 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 89 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 89 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 89 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 146 227 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 89 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 181 227 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 76 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 221 227 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 89 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 80 227 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 29 0 ; -EndComposites -EndFontMetrics diff --git a/misc/afm/TimesRo.afm b/misc/afm/TimesRo.afm deleted file mode 100644 index 3f8ce6b22a..0000000000 --- a/misc/afm/TimesRo.afm +++ /dev/null @@ -1,443 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Tue Aug 5 10:51:57 PDT 1986 -FontName Times-Roman -EncodingScheme AdobeStandardEncoding -FullName Times Roman -FamilyName Times -Weight Roman -ItalicAngle 0.0 -IsFixedPitch false -UnderlinePosition -109 -UnderlineThickness 49 -Version 001.001 -Notice Times Roman is a trademark of Allied Corporation. -FontBBox -170 -223 1024 896 -CapHeight 662 -XHeight 448 -Descender -217 -Ascender 682 -StartCharMetrics 228 -C 32 ; WX 250 ; N space ; B 0 0 0 0 ; -C 33 ; WX 333 ; N exclam ; B 109 -14 224 676 ; -C 34 ; WX 408 ; N quotedbl ; B 70 445 337 685 ; -C 35 ; WX 500 ; N numbersign ; B 4 0 495 662 ; -C 36 ; WX 500 ; N dollar ; B 44 -87 456 727 ; -C 37 ; WX 833 ; N percent ; B 61 -14 772 676 ; -C 38 ; WX 778 ; N ampersand ; B 42 -14 750 676 ; -C 39 ; WX 333 ; N quoteright ; B 103 432 242 676 ; -C 40 ; WX 333 ; N parenleft ; B 49 -177 304 676 ; -C 41 ; WX 333 ; N parenright ; B 29 -177 284 676 ; -C 42 ; WX 500 ; N asterisk ; B 64 265 437 683 ; -C 43 ; WX 564 ; N plus ; B 30 7 534 512 ; -C 44 ; WX 250 ; N comma ; B 63 -143 202 101 ; -C 45 ; WX 333 ; N hyphen ; B 43 194 289 257 ; -C 46 ; WX 250 ; N period ; B 68 -14 183 101 ; -C 47 ; WX 278 ; N slash ; B -12 -108 302 682 ; -C 48 ; WX 500 ; N zero ; B 24 -14 476 676 ; -C 49 ; WX 500 ; N one ; B 111 0 394 676 ; -C 50 ; WX 500 ; N two ; B 30 0 475 676 ; -C 51 ; WX 500 ; N three ; B 44 -14 431 676 ; -C 52 ; WX 500 ; N four ; B 12 0 472 676 ; -C 53 ; WX 500 ; N five ; B 32 -14 438 688 ; -C 54 ; WX 500 ; N six ; B 35 -14 468 682 ; -C 55 ; WX 500 ; N seven ; B 20 -14 449 662 ; -C 56 ; WX 500 ; N eight ; B 53 -14 442 676 ; -C 57 ; WX 500 ; N nine ; B 30 -22 460 676 ; -C 58 ; WX 278 ; N colon ; B 81 -14 196 458 ; -C 59 ; WX 278 ; N semicolon ; B 63 -143 202 458 ; -C 60 ; WX 564 ; N less ; B 27 0 536 522 ; -C 61 ; WX 564 ; N equal ; B 30 132 534 390 ; -C 62 ; WX 564 ; N greater ; B 27 0 536 522 ; -C 63 ; WX 444 ; N question ; B 49 -14 395 676 ; -C 64 ; WX 921 ; N at ; B 0 -155 819 675 ; -C 65 ; WX 722 ; N A ; B 15 0 706 676 ; -C 66 ; WX 667 ; N B ; B 20 0 596 662 ; -C 67 ; WX 667 ; N C ; B 33 -14 637 676 ; -C 68 ; WX 722 ; N D ; B 20 0 689 662 ; -C 69 ; WX 611 ; N E ; B 12 0 597 662 ; -C 70 ; WX 556 ; N F ; B 12 0 544 662 ; -C 71 ; WX 722 ; N G ; B 27 -14 704 676 ; -C 72 ; WX 722 ; N H ; B 20 0 703 662 ; -C 73 ; WX 333 ; N I ; B 18 0 316 662 ; -C 74 ; WX 389 ; N J ; B 10 -14 376 662 ; -C 75 ; WX 722 ; N K ; B 20 0 709 662 ; -C 76 ; WX 611 ; N L ; B 12 0 598 662 ; -C 77 ; WX 889 ; N M ; B 19 0 871 662 ; -C 78 ; WX 722 ; N N ; B 12 -14 709 662 ; -C 79 ; WX 722 ; N O ; B 33 -14 688 676 ; -C 80 ; WX 556 ; N P ; B 11 0 542 662 ; -C 81 ; WX 722 ; N Q ; B 33 -177 701 676 ; -C 82 ; WX 667 ; N R ; B 12 0 654 662 ; -C 83 ; WX 556 ; N S ; B 42 -14 491 676 ; -C 84 ; WX 611 ; N T ; B 18 0 594 662 ; -C 85 ; WX 722 ; N U ; B 16 -14 705 662 ; -C 86 ; WX 722 ; N V ; B 20 -14 701 662 ; -C 87 ; WX 944 ; N W ; B 9 -14 936 662 ; -C 88 ; WX 722 ; N X ; B 12 0 706 662 ; -C 89 ; WX 722 ; N Y ; B 22 0 703 662 ; -C 90 ; WX 611 ; N Z ; B 7 0 597 662 ; -C 91 ; WX 333 ; N bracketleft ; B 88 -156 299 662 ; -C 92 ; WX 278 ; N backslash ; B -83 0 361 682 ; -C 93 ; WX 333 ; N bracketright ; B 34 -156 245 662 ; -C 94 ; WX 469 ; N asciicircum ; B 13 256 456 662 ; -C 95 ; WX 500 ; N underscore ; B 0 -133 500 -84 ; -C 96 ; WX 333 ; N quoteleft ; B 91 432 230 676 ; -C 97 ; WX 444 ; N a ; B 37 -10 442 458 ; -C 98 ; WX 500 ; N b ; B 9 -10 474 682 ; -C 99 ; WX 444 ; N c ; B 25 -10 412 458 ; -C 100 ; WX 500 ; N d ; B 26 -13 491 682 ; -C 101 ; WX 444 ; N e ; B 22 -10 421 458 ; -C 102 ; WX 333 ; N f ; B 20 0 383 682 ; L i fi ; L l fl ; -C 103 ; WX 500 ; N g ; B 27 -217 470 458 ; -C 104 ; WX 500 ; N h ; B 9 0 490 682 ; -C 105 ; WX 278 ; N i ; B 22 0 259 682 ; -C 106 ; WX 278 ; N j ; B -54 -217 212 682 ; -C 107 ; WX 500 ; N k ; B 1 0 500 682 ; -C 108 ; WX 278 ; N l ; B 20 0 259 682 ; -C 109 ; WX 778 ; N m ; B 13 0 764 458 ; -C 110 ; WX 500 ; N n ; B 9 0 490 458 ; -C 111 ; WX 500 ; N o ; B 30 -10 470 458 ; -C 112 ; WX 500 ; N p ; B 2 -217 470 458 ; -C 113 ; WX 500 ; N q ; B 24 -217 498 459 ; -C 114 ; WX 333 ; N r ; B 4 0 335 458 ; -C 115 ; WX 389 ; N s ; B 51 -10 348 458 ; -C 116 ; WX 278 ; N t ; B 13 -10 279 580 ; -C 117 ; WX 500 ; N u ; B 9 -10 479 448 ; -C 118 ; WX 500 ; N v ; B 10 -10 468 448 ; -C 119 ; WX 722 ; N w ; B 21 -10 694 448 ; -C 120 ; WX 500 ; N x ; B 17 0 479 448 ; -C 121 ; WX 500 ; N y ; B 15 -217 476 448 ; -C 122 ; WX 444 ; N z ; B 25 0 418 448 ; -C 123 ; WX 480 ; N braceleft ; B 110 -165 341 682 ; -C 124 ; WX 200 ; N bar ; B 68 0 132 682 ; -C 125 ; WX 480 ; N braceright ; B 139 -165 370 682 ; -C 126 ; WX 541 ; N asciitilde ; B 18 176 522 347 ; -C 161 ; WX 333 ; N exclamdown ; B 109 -217 224 458 ; -C 162 ; WX 500 ; N cent ; B 53 -138 448 579 ; -C 163 ; WX 500 ; N sterling ; B 11 -14 491 676 ; -C 164 ; WX 167 ; N fraction ; B -170 -14 346 676 ; -C 165 ; WX 500 ; N yen ; B -43 0 502 662 ; -C 166 ; WX 500 ; N florin ; B 6 -185 490 676 ; -C 167 ; WX 500 ; N section ; B 72 -148 426 676 ; -C 168 ; WX 500 ; N currency ; B -2 99 503 600 ; -C 169 ; WX 180 ; N quotesingle ; B 47 445 133 685 ; -C 170 ; WX 444 ; N quotedblleft ; B 27 432 399 676 ; -C 171 ; WX 500 ; N guillemotleft ; B 32 35 449 422 ; -C 172 ; WX 333 ; N guilsinglleft ; B 45 35 271 422 ; -C 173 ; WX 333 ; N guilsinglright ; B 62 36 288 423 ; -C 174 ; WX 556 ; N fi ; B 33 0 521 678 ; -C 175 ; WX 556 ; N fl ; B 29 0 521 682 ; -C 177 ; WX 500 ; N endash ; B -7 201 507 250 ; -C 178 ; WX 500 ; N dagger ; B 54 -149 440 676 ; -C 179 ; WX 500 ; N daggerdbl ; B 54 -153 439 676 ; -C 180 ; WX 250 ; N periodcentered ; B 68 204 183 319 ; -C 182 ; WX 453 ; N paragraph ; B 0 -207 373 662 ; -C 183 ; WX 350 ; N bullet ; B 50 175 300 425 ; -C 184 ; WX 333 ; N quotesinglbase ; B 103 -143 242 101 ; -C 185 ; WX 444 ; N quotedblbase ; B 45 -143 417 101 ; -C 186 ; WX 444 ; N quotedblright ; B 45 432 417 676 ; -C 187 ; WX 500 ; N guillemotright ; B 51 35 468 422 ; -C 188 ; WX 1000 ; N ellipsis ; B 110 -14 891 101 ; -C 189 ; WX 1000 ; N perthousand ; B 3 -14 1024 676 ; -C 191 ; WX 444 ; N questiondown ; B 49 -217 395 458 ; -C 193 ; WX 333 ; N grave ; B 16 507 243 678 ; -C 194 ; WX 333 ; N acute ; B 93 507 317 678 ; -C 195 ; WX 333 ; N circumflex ; B 11 507 323 674 ; -C 196 ; WX 333 ; N tilde ; B 1 532 332 638 ; -C 197 ; WX 333 ; N macron ; B 11 547 323 601 ; -C 198 ; WX 333 ; N breve ; B 26 507 308 664 ; -C 199 ; WX 333 ; N dotaccent ; B 116 523 216 623 ; -C 200 ; WX 333 ; N dieresis ; B 18 523 316 623 ; -C 202 ; WX 333 ; N ring ; B 67 483 266 682 ; -C 203 ; WX 333 ; N cedilla ; B 53 -215 262 0 ; -C 205 ; WX 333 ; N hungarumlaut ; B 8 528 372 700 ; -C 206 ; WX 333 ; N ogonek ; B 68 -155 245 -10 ; -C 207 ; WX 333 ; N caron ; B 11 507 323 674 ; -C 208 ; WX 1000 ; N emdash ; B -8 201 1007 250 ; -C 225 ; WX 889 ; N AE ; B 5 0 869 662 ; -C 227 ; WX 276 ; N ordfeminine ; B 15 307 278 676 ; -C 232 ; WX 611 ; N Lslash ; B 12 0 598 662 ; -C 233 ; WX 722 ; N Oslash ; B 33 -80 688 734 ; -C 234 ; WX 889 ; N OE ; B 21 -7 877 669 ; -C 235 ; WX 310 ; N ordmasculine ; B 15 307 301 676 ; -C 241 ; WX 667 ; N ae ; B 38 -10 634 458 ; -C 245 ; WX 278 ; N dotlessi ; B 22 0 259 458 ; -C 248 ; WX 278 ; N lslash ; B 20 0 259 682 ; -C 249 ; WX 500 ; N oslash ; B 30 -108 470 549 ; -C 250 ; WX 722 ; N oe ; B 30 -10 690 458 ; -C 251 ; WX 500 ; N germandbls ; B 12 -10 468 682 ; -C -1 ; WX 722 ; N Aacute ; B 15 0 706 892 ; -C -1 ; WX 722 ; N Acircumflex ; B 15 0 706 888 ; -C -1 ; WX 722 ; N Adieresis ; B 15 0 706 837 ; -C -1 ; WX 722 ; N Agrave ; B 15 0 706 892 ; -C -1 ; WX 722 ; N Aring ; B 15 0 706 896 ; -C -1 ; WX 722 ; N Atilde ; B 15 0 706 852 ; -C -1 ; WX 667 ; N Ccedilla ; B 33 -215 637 676 ; -C -1 ; WX 611 ; N Eacute ; B 12 0 597 892 ; -C -1 ; WX 611 ; N Ecircumflex ; B 12 0 597 888 ; -C -1 ; WX 611 ; N Edieresis ; B 12 0 597 837 ; -C -1 ; WX 611 ; N Egrave ; B 12 0 597 892 ; -C -1 ; WX 722 ; N Eth ; B 20 0 689 662 ; -C -1 ; WX 333 ; N Iacute ; B 18 0 317 892 ; -C -1 ; WX 333 ; N Icircumflex ; B 11 0 323 888 ; -C -1 ; WX 333 ; N Idieresis ; B 18 0 316 837 ; -C -1 ; WX 333 ; N Igrave ; B 16 0 316 892 ; -C -1 ; WX 722 ; N Ntilde ; B 12 -14 709 852 ; -C -1 ; WX 722 ; N Oacute ; B 33 -14 688 892 ; -C -1 ; WX 722 ; N Ocircumflex ; B 33 -14 688 888 ; -C -1 ; WX 722 ; N Odieresis ; B 33 -14 688 837 ; -C -1 ; WX 722 ; N Ograve ; B 33 -14 688 892 ; -C -1 ; WX 722 ; N Otilde ; B 33 -14 688 852 ; -C -1 ; WX 556 ; N Scaron ; B 42 -14 491 888 ; -C -1 ; WX 556 ; N Thorn ; B 11 0 542 662 ; -C -1 ; WX 722 ; N Uacute ; B 16 -14 705 892 ; -C -1 ; WX 722 ; N Ucircumflex ; B 16 -14 705 888 ; -C -1 ; WX 722 ; N Udieresis ; B 16 -14 705 837 ; -C -1 ; WX 722 ; N Ugrave ; B 16 -14 705 892 ; -C -1 ; WX 722 ; N Yacute ; B 22 0 703 892 ; -C -1 ; WX 722 ; N Ydieresis ; B 22 0 703 837 ; -C -1 ; WX 611 ; N Zcaron ; B 7 0 597 888 ; -C -1 ; WX 444 ; N aacute ; B 37 -10 442 678 ; -C -1 ; WX 444 ; N acircumflex ; B 37 -10 442 674 ; -C -1 ; WX 444 ; N adieresis ; B 37 -10 442 623 ; -C -1 ; WX 444 ; N agrave ; B 37 -10 442 678 ; -C -1 ; WX 444 ; N aring ; B 37 -10 442 682 ; -C -1 ; WX 444 ; N atilde ; B 37 -10 442 638 ; -C -1 ; WX 200 ; N brokenbar ; B 68 0 132 682 ; -C -1 ; WX 444 ; N ccedilla ; B 25 -215 412 458 ; -C -1 ; WX 760 ; N copyright ; B 42 -14 717 676 ; -C -1 ; WX 400 ; N degree ; B 50 376 350 676 ; -C -1 ; WX 564 ; N divide ; B 30 10 534 512 ; -C -1 ; WX 444 ; N eacute ; B 22 -10 421 678 ; -C -1 ; WX 444 ; N ecircumflex ; B 22 -10 421 674 ; -C -1 ; WX 444 ; N edieresis ; B 22 -10 421 623 ; -C -1 ; WX 444 ; N egrave ; B 22 -10 421 678 ; -C -1 ; WX 500 ; N eth ; B 30 -10 470 682 ; -C -1 ; WX 278 ; N iacute ; B 22 0 290 678 ; -C -1 ; WX 278 ; N icircumflex ; B -16 0 296 674 ; -C -1 ; WX 278 ; N idieresis ; B -9 0 289 623 ; -C -1 ; WX 278 ; N igrave ; B -11 0 259 678 ; -C -1 ; WX 564 ; N logicalnot ; B 30 120 534 390 ; -C -1 ; WX 564 ; N minus ; B 30 229 534 293 ; -C -1 ; WX 500 ; N mu ; B 9 -223 479 448 ; -C -1 ; WX 564 ; N multiply ; B 30 8 534 512 ; -C -1 ; WX 500 ; N ntilde ; B 9 0 490 638 ; -C -1 ; WX 500 ; N oacute ; B 30 -10 470 678 ; -C -1 ; WX 500 ; N ocircumflex ; B 30 -10 470 674 ; -C -1 ; WX 500 ; N odieresis ; B 30 -10 470 623 ; -C -1 ; WX 500 ; N ograve ; B 30 -10 470 678 ; -C -1 ; WX 750 ; N onehalf ; B 30 -14 720 676 ; -C -1 ; WX 750 ; N onequarter ; B 30 -14 720 676 ; -C -1 ; WX 300 ; N onesuperior ; B 58 270 242 676 ; -C -1 ; WX 500 ; N otilde ; B 30 -10 470 638 ; -C -1 ; WX 564 ; N plusminus ; B 30 0 534 612 ; -C -1 ; WX 760 ; N registered ; B 43 -14 718 676 ; -C -1 ; WX 389 ; N scaron ; B 39 -10 351 674 ; -C -1 ; WX 500 ; N thorn ; B 2 -217 470 682 ; -C -1 ; WX 750 ; N threequarters ; B 30 -14 720 676 ; -C -1 ; WX 300 ; N threesuperior ; B 24 262 275 676 ; -C -1 ; WX 980 ; N trademark ; B 35 258 945 662 ; -C -1 ; WX 300 ; N twosuperior ; B 5 270 294 676 ; -C -1 ; WX 500 ; N uacute ; B 9 -10 479 678 ; -C -1 ; WX 500 ; N ucircumflex ; B 9 -10 479 674 ; -C -1 ; WX 500 ; N udieresis ; B 9 -10 479 623 ; -C -1 ; WX 500 ; N ugrave ; B 9 -10 479 678 ; -C -1 ; WX 500 ; N yacute ; B 15 -217 476 678 ; -C -1 ; WX 500 ; N ydieresis ; B 15 -217 476 623 ; -C -1 ; WX 444 ; N zcaron ; B 25 0 418 674 ; -EndCharMetrics -StartKernData -StartKernPairs 113 - -KPX A y -92 -KPX A w -92 -KPX A v -74 -KPX A space -55 -KPX A quoteright -111 -KPX A Y -92 -KPX A W -80 -KPX A V -129 -KPX A T -111 - -KPX F period -80 -KPX F comma -80 -KPX F A -74 - -KPX L y -55 -KPX L space -37 -KPX L quoteright -92 -KPX L Y -100 -KPX L W -74 -KPX L V -92 -KPX L T -92 - -KPX P space -37 -KPX P period -111 -KPX P comma -111 -KPX P A -92 - -KPX R y -40 -KPX R Y -55 -KPX R W -55 -KPX R V -80 -KPX R T -60 - -KPX T y -70 -KPX T w -70 -KPX T u -35 -KPX T space -18 -KPX T semicolon -55 -KPX T s -70 -KPX T r -35 -KPX T period -74 -KPX T o -70 -KPX T i -35 -KPX T hyphen -92 -KPX T e -70 -KPX T comma -74 -KPX T colon -50 -KPX T c -70 -KPX T a -70 -KPX T O -18 -KPX T A -80 - -KPX V y -111 -KPX V u -60 -KPX V space -18 -KPX V semicolon -74 -KPX V r -60 -KPX V period -129 -KPX V o -129 -KPX V i -60 -KPX V hyphen -92 -KPX V e -111 -KPX V comma -129 -KPX V colon -74 -KPX V a -111 -KPX V A -129 - -KPX W y -60 -KPX W u -40 -KPX W space -18 -KPX W semicolon -37 -KPX W r -40 -KPX W period -92 -KPX W o -80 -KPX W i -40 -KPX W hyphen -55 -KPX W e -80 -KPX W comma -92 -KPX W colon -37 -KPX W a -80 -KPX W A -111 - -KPX Y v -100 -KPX Y u -111 -KPX Y space -37 -KPX Y semicolon -92 -KPX Y q -111 -KPX Y period -129 -KPX Y p -92 -KPX Y o -100 -KPX Y i -55 -KPX Y hyphen -111 -KPX Y e -100 -KPX Y comma -129 -KPX Y colon -92 -KPX Y a -100 -KPX Y A -111 - -KPX f quoteright 55 -KPX f f -18 - -KPX one one -37 - -KPX quoteleft quoteleft -74 - -KPX quoteright t -18 -KPX quoteright space -74 -KPX quoteright s -55 -KPX quoteright quoteright -74 - -KPX r quoteright 37 -KPX r period -55 -KPX r hyphen -20 -KPX r g -18 -KPX r comma -40 - -KPX space Y -37 -KPX space W -18 -KPX space V -18 -KPX space T -18 -KPX space A -55 - -KPX v period -65 -KPX v comma -65 - -KPX w period -65 -KPX w comma -65 - -KPX y period -65 -KPX y comma -65 -EndKernPairs -EndKernData -StartComposites 56 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 214 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 55 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 111 214 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 28 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 167 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 55 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 194 214 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 83 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 194 214 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 194 214 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 194 214 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 194 214 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 83 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 83 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 83 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 83 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 214 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 0 214 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 0 214 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 214 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 139 214 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 139 214 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 139 214 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 139 214 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 55 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 55 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 55 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 55 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 194 214 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 194 214 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 194 214 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 194 214 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 55 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 55 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 55 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 55 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 194 214 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 194 214 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 194 214 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 194 214 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 83 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 83 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 83 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 83 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 194 214 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 55 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 194 214 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 83 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 194 214 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 83 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 194 214 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 55 0 ; -EndComposites -EndFontMetrics diff --git a/misc/gs_afm/Cour.afm b/misc/gs_afm/Cour.afm deleted file mode 100644 index 2ccfea4b0f..0000000000 --- a/misc/gs_afm/Cour.afm +++ /dev/null @@ -1,255 +0,0 @@ -StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 8/19/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. -FontName NimbusMonL-Regu -FullName Nimbus Mono L Regular -FamilyName Nimbus Mono L -Weight Regular -ItalicAngle 0.0 -IsFixedPitch false -UnderlinePosition -100 -UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW -EncodingScheme AdobeStandardEncoding -FontBBox -12 -216 612 811 -CapHeight 563 -XHeight 417 -Descender -186 -Ascender 604 -StartCharMetrics 232 -C 32 ; WX 600 ; N space ; B 295 0 295 0 ; -C 33 ; WX 600 ; N exclam ; B 240 -15 360 618 ; -C 34 ; WX 600 ; N quotedbl ; B 146 315 454 604 ; -C 35 ; WX 600 ; N numbersign ; B 92 -62 508 647 ; -C 36 ; WX 600 ; N dollar ; B 113 -92 487 655 ; -C 37 ; WX 600 ; N percent ; B 87 -12 513 611 ; -C 38 ; WX 600 ; N ampersand ; B 105 -16 478 519 ; -C 39 ; WX 600 ; N quoteright ; B 135 314 340 604 ; -C 40 ; WX 600 ; N parenleft ; B 294 -124 458 604 ; -C 41 ; WX 600 ; N parenright ; B 147 -124 311 604 ; -C 42 ; WX 600 ; N asterisk ; B 113 250 487 604 ; -C 43 ; WX 600 ; N plus ; B 72 32 528 530 ; -C 44 ; WX 600 ; N comma ; B 135 -145 340 145 ; -C 45 ; WX 600 ; N hyphen ; B 72 258 528 299 ; -C 46 ; WX 600 ; N period ; B 226 -15 374 116 ; -C 47 ; WX 600 ; N slash ; B 113 -81 487 668 ; -C 48 ; WX 600 ; N zero ; B 113 -15 487 618 ; -C 49 ; WX 600 ; N one ; B 113 0 487 612 ; -C 50 ; WX 600 ; N two ; B 84 0 478 618 ; -C 51 ; WX 600 ; N three ; B 96 -15 499 618 ; -C 52 ; WX 600 ; N four ; B 105 0 478 604 ; -C 53 ; WX 600 ; N five ; B 96 -15 499 604 ; -C 54 ; WX 600 ; N six ; B 136 -15 510 618 ; -C 55 ; WX 600 ; N seven ; B 105 -1 478 604 ; -C 56 ; WX 600 ; N eight ; B 113 -15 487 618 ; -C 57 ; WX 600 ; N nine ; B 136 -15 510 618 ; -C 58 ; WX 600 ; N colon ; B 226 -15 374 417 ; -C 59 ; WX 600 ; N semicolon ; B 139 -145 350 417 ; -C 60 ; WX 600 ; N less ; B 72 44 522 518 ; -C 61 ; WX 600 ; N equal ; B 51 190 549 375 ; -C 62 ; WX 600 ; N greater ; B 78 44 528 518 ; -C 63 ; WX 600 ; N question ; B 134 -15 487 577 ; -C 64 ; WX 600 ; N at ; B 105 -62 478 624 ; -C 65 ; WX 600 ; N A ; B 9 0 591 563 ; -C 66 ; WX 600 ; N B ; B 43 0 541 563 ; -C 67 ; WX 600 ; N C ; B 63 -16 534 576 ; -C 68 ; WX 600 ; N D ; B 43 0 520 563 ; -C 69 ; WX 600 ; N E ; B 43 0 520 563 ; -C 70 ; WX 600 ; N F ; B 43 0 520 563 ; -C 71 ; WX 600 ; N G ; B 63 -16 562 576 ; -C 72 ; WX 600 ; N H ; B 53 0 551 563 ; -C 73 ; WX 600 ; N I ; B 113 0 487 563 ; -C 74 ; WX 600 ; N J ; B 84 -16 583 563 ; -C 75 ; WX 600 ; N K ; B 43 0 572 563 ; -C 76 ; WX 600 ; N L ; B 63 0 541 563 ; -C 77 ; WX 600 ; N M ; B 11 0 593 563 ; -C 78 ; WX 600 ; N N ; B 22 0 562 563 ; -C 79 ; WX 600 ; N O ; B 51 -16 549 576 ; -C 80 ; WX 600 ; N P ; B 43 0 499 563 ; -C 81 ; WX 600 ; N Q ; B 51 -115 549 576 ; -C 82 ; WX 600 ; N R ; B 43 0 589 563 ; -C 83 ; WX 600 ; N S ; B 92 -16 508 576 ; -C 84 ; WX 600 ; N T ; B 72 0 528 563 ; -C 85 ; WX 600 ; N U ; B 40 -16 560 563 ; -C 86 ; WX 600 ; N V ; B 9 0 591 563 ; -C 87 ; WX 600 ; N W ; B 20 0 580 563 ; -C 88 ; WX 600 ; N X ; B 40 0 560 563 ; -C 89 ; WX 600 ; N Y ; B 51 0 549 563 ; -C 90 ; WX 600 ; N Z ; B 103 0 497 563 ; -C 91 ; WX 600 ; N bracketleft ; B 280 -124 445 604 ; -C 92 ; WX 600 ; N backslash ; B 113 -81 487 668 ; -C 93 ; WX 600 ; N bracketright ; B 155 -124 320 604 ; -C 94 ; WX 600 ; N asciicircum ; B 113 354 487 615 ; -C 95 ; WX 600 ; N underscore ; B -12 -125 612 -75 ; -C 96 ; WX 600 ; N quoteleft ; B 260 343 465 604 ; -C 97 ; WX 600 ; N a ; B 72 -16 541 431 ; -C 98 ; WX 600 ; N b ; B 22 -16 541 604 ; -C 99 ; WX 600 ; N c ; B 84 -16 535 431 ; -C 100 ; WX 600 ; N d ; B 63 -16 583 604 ; -C 101 ; WX 600 ; N e ; B 63 -16 520 431 ; -C 102 ; WX 600 ; N f ; B 105 0 541 604 ; -C 103 ; WX 600 ; N g ; B 63 -186 562 431 ; -C 104 ; WX 600 ; N h ; B 43 0 551 604 ; -C 105 ; WX 600 ; N i ; B 92 0 508 624 ; -C 106 ; WX 600 ; N j ; B 147 -186 458 624 ; -C 107 ; WX 600 ; N k ; B 63 0 541 604 ; -C 108 ; WX 600 ; N l ; B 92 0 508 604 ; -C 109 ; WX 600 ; N m ; B 11 0 593 431 ; -C 110 ; WX 600 ; N n ; B 53 0 541 431 ; -C 111 ; WX 600 ; N o ; B 72 -16 528 431 ; -C 112 ; WX 600 ; N p ; B 22 -186 541 431 ; -C 113 ; WX 600 ; N q ; B 63 -186 583 431 ; -C 114 ; WX 600 ; N r ; B 84 0 541 427 ; -C 115 ; WX 600 ; N s ; B 103 -16 497 431 ; -C 116 ; WX 600 ; N t ; B 43 -16 499 563 ; -C 117 ; WX 600 ; N u ; B 43 -16 541 417 ; -C 118 ; WX 600 ; N v ; B 30 0 570 417 ; -C 119 ; WX 600 ; N w ; B 30 0 570 417 ; -C 120 ; WX 600 ; N x ; B 51 0 549 417 ; -C 121 ; WX 600 ; N y ; B 51 -186 549 417 ; -C 122 ; WX 600 ; N z ; B 115 0 489 417 ; -C 123 ; WX 600 ; N braceleft ; B 197 -124 403 604 ; -C 124 ; WX 600 ; N bar ; B 280 -124 320 604 ; -C 125 ; WX 600 ; N braceright ; B 197 -124 403 604 ; -C 126 ; WX 600 ; N asciitilde ; B 92 212 508 348 ; -C 161 ; WX 600 ; N exclamdown ; B 240 -216 360 417 ; -C 162 ; WX 600 ; N cent ; B 113 -13 469 630 ; -C 163 ; WX 600 ; N sterling ; B 63 0 520 578 ; -C 164 ; WX 600 ; N fraction ; B 50 139 549 470 ; -C 165 ; WX 600 ; N yen ; B 51 0 549 563 ; -C 166 ; WX 600 ; N florin ; B 87 -93 518 618 ; -C 167 ; WX 600 ; N section ; B 66 -62 534 603 ; -C 168 ; WX 600 ; N currency ; B 103 95 497 489 ; -C 169 ; WX 600 ; N quotesingle ; B 236 315 364 604 ; -C 170 ; WX 600 ; N quotedblleft ; B 93 343 507 604 ; -C 171 ; WX 600 ; N guillemotleft ; B 63 0 541 417 ; -C 172 ; WX 600 ; N guilsinglleft ; B 63 0 312 417 ; -C 173 ; WX 600 ; N guilsinglright ; B 293 0 541 417 ; -C 174 ; WX 600 ; N fi ; B 10 0 585 624 ; -C 175 ; WX 600 ; N fl ; B 10 0 587 604 ; -C 177 ; WX 600 ; N endash ; B 72 261 528 302 ; -C 178 ; WX 600 ; N dagger ; B 124 -63 476 604 ; -C 179 ; WX 600 ; N daggerdbl ; B 124 -62 476 604 ; -C 180 ; WX 600 ; N periodcentered ; B 226 217 374 348 ; -C 182 ; WX 600 ; N paragraph ; B 79 -62 525 604 ; -C 183 ; WX 600 ; N bullet ; B 202 141 398 337 ; -C 184 ; WX 600 ; N quotesinglbase ; B 135 -145 340 145 ; -C 185 ; WX 600 ; N quotedblbase ; B 93 -116 507 145 ; -C 186 ; WX 600 ; N quotedblright ; B 93 343 507 604 ; -C 187 ; WX 600 ; N guillemotright ; B 63 0 541 417 ; -C 188 ; WX 600 ; N ellipsis ; B 51 -15 549 84 ; -C 189 ; WX 600 ; N perthousand ; B 34 -9 564 614 ; -C 191 ; WX 600 ; N questiondown ; B 113 -175 466 417 ; -C 193 ; WX 600 ; N grave ; B 155 490 320 639 ; -C 194 ; WX 600 ; N acute ; B 280 490 445 639 ; -C 195 ; WX 600 ; N circumflex ; B 155 490 445 639 ; -C 196 ; WX 600 ; N tilde ; B 145 516 455 605 ; -C 197 ; WX 600 ; N macron ; B 155 536 445 576 ; -C 198 ; WX 600 ; N breve ; B 155 490 445 620 ; -C 199 ; WX 600 ; N dotaccent ; B 250 511 350 611 ; -C 200 ; WX 600 ; N dieresis ; B 140 511 461 611 ; -C 202 ; WX 600 ; N ring ; B 207 480 393 661 ; -C 203 ; WX 600 ; N cedilla ; B 210 -173 377 0 ; -C 205 ; WX 600 ; N hungarumlaut ; B 155 490 445 633 ; -C 206 ; WX 600 ; N ogonek ; B 280 -155 433 0 ; -C 207 ; WX 600 ; N caron ; B 155 490 445 639 ; -C 208 ; WX 600 ; N emdash ; B 1 261 599 302 ; -C 225 ; WX 600 ; N AE ; B 10 0 590 563 ; -C 227 ; WX 600 ; N ordfeminine ; B 155 279 447 574 ; -C 232 ; WX 600 ; N Lslash ; B 43 0 541 563 ; -C 233 ; WX 600 ; N Oslash ; B 40 -43 560 605 ; -C 234 ; WX 600 ; N OE ; B 10 0 590 563 ; -C 235 ; WX 600 ; N ordmasculine ; B 154 284 448 577 ; -C 241 ; WX 600 ; N ae ; B 12 -16 578 431 ; -C 245 ; WX 600 ; N dotlessi ; B 92 0 508 417 ; -C 248 ; WX 600 ; N lslash ; B 92 0 508 604 ; -C 249 ; WX 600 ; N oslash ; B 53 -43 543 458 ; -C 250 ; WX 600 ; N oe ; B 12 -16 578 431 ; -C 251 ; WX 600 ; N germandbls ; B 43 -16 499 604 ; -C -1 ; WX 600 ; N Yacute ; B 51 0 549 789 ; -C -1 ; WX 600 ; N Ucircumflex ; B 40 -16 560 789 ; -C -1 ; WX 600 ; N Ugrave ; B 40 -16 560 789 ; -C -1 ; WX 600 ; N Zcaron ; B 103 0 497 789 ; -C -1 ; WX 600 ; N Ydieresis ; B 51 0 549 761 ; -C -1 ; WX 600 ; N threesuperior ; B 181 251 416 612 ; -C -1 ; WX 600 ; N Uacute ; B 40 -16 560 789 ; -C -1 ; WX 600 ; N twosuperior ; B 175 259 405 612 ; -C -1 ; WX 600 ; N Udieresis ; B 40 -16 560 761 ; -C -1 ; WX 600 ; N middot ; B 226 217 374 348 ; -C -1 ; WX 600 ; N onesuperior ; B 191 259 410 612 ; -C -1 ; WX 600 ; N aacute ; B 72 -16 541 639 ; -C -1 ; WX 600 ; N agrave ; B 72 -16 541 639 ; -C -1 ; WX 600 ; N acircumflex ; B 72 -16 541 639 ; -C -1 ; WX 600 ; N Scaron ; B 92 -16 508 789 ; -C -1 ; WX 600 ; N Otilde ; B 51 -16 549 755 ; -C -1 ; WX 600 ; N sfthyphen ; B 72 258 528 299 ; -C -1 ; WX 600 ; N atilde ; B 72 -16 541 605 ; -C -1 ; WX 600 ; N aring ; B 72 -16 541 661 ; -C -1 ; WX 600 ; N adieresis ; B 72 -16 541 611 ; -C -1 ; WX 600 ; N Ograve ; B 51 -16 549 789 ; -C -1 ; WX 600 ; N Ocircumflex ; B 51 -16 549 789 ; -C -1 ; WX 600 ; N Odieresis ; B 51 -16 549 761 ; -C -1 ; WX 600 ; N Ntilde ; B 22 0 562 755 ; -C -1 ; WX 600 ; N edieresis ; B 63 -16 520 611 ; -C -1 ; WX 600 ; N eacute ; B 63 -16 520 639 ; -C -1 ; WX 600 ; N egrave ; B 63 -16 520 639 ; -C -1 ; WX 600 ; N Icircumflex ; B 113 0 487 789 ; -C -1 ; WX 600 ; N ecircumflex ; B 63 -16 520 639 ; -C -1 ; WX 600 ; N Igrave ; B 113 0 487 789 ; -C -1 ; WX 600 ; N Iacute ; B 113 0 487 789 ; -C -1 ; WX 600 ; N Idieresis ; B 113 0 487 761 ; -C -1 ; WX 600 ; N degree ; B 155 346 445 636 ; -C -1 ; WX 600 ; N Ecircumflex ; B 43 0 520 789 ; -C -1 ; WX 600 ; N minus ; B 72 261 528 302 ; -C -1 ; WX 600 ; N multiply ; B 118 100 482 464 ; -C -1 ; WX 600 ; N divide ; B 72 25 528 540 ; -C -1 ; WX 600 ; N Egrave ; B 43 0 520 789 ; -C -1 ; WX 600 ; N trademark ; B 4 243 598 563 ; -C -1 ; WX 600 ; N Oacute ; B 51 -16 549 789 ; -C -1 ; WX 600 ; N thorn ; B 22 -186 541 590 ; -C -1 ; WX 600 ; N eth ; B 72 -17 528 620 ; -C -1 ; WX 600 ; N Eacute ; B 43 0 520 789 ; -C -1 ; WX 600 ; N ccedilla ; B 84 -173 535 431 ; -C -1 ; WX 600 ; N idieresis ; B 92 0 508 611 ; -C -1 ; WX 600 ; N iacute ; B 92 0 508 639 ; -C -1 ; WX 600 ; N igrave ; B 92 0 508 639 ; -C -1 ; WX 600 ; N plusminus ; B 72 0 528 529 ; -C -1 ; WX 600 ; N onehalf ; B 23 0 573 612 ; -C -1 ; WX 600 ; N onequarter ; B 16 0 580 612 ; -C -1 ; WX 600 ; N threequarters ; B 6 0 580 612 ; -C -1 ; WX 600 ; N icircumflex ; B 92 0 508 639 ; -C -1 ; WX 600 ; N Edieresis ; B 43 0 520 761 ; -C -1 ; WX 600 ; N ntilde ; B 53 0 541 605 ; -C -1 ; WX 600 ; N Aring ; B 9 0 591 811 ; -C -1 ; WX 600 ; N odieresis ; B 72 -16 528 611 ; -C -1 ; WX 600 ; N oacute ; B 72 -16 528 639 ; -C -1 ; WX 600 ; N ograve ; B 72 -16 528 639 ; -C -1 ; WX 600 ; N ocircumflex ; B 72 -16 528 639 ; -C -1 ; WX 600 ; N otilde ; B 72 -16 528 605 ; -C -1 ; WX 600 ; N scaron ; B 103 -16 497 639 ; -C -1 ; WX 600 ; N udieresis ; B 43 -16 541 611 ; -C -1 ; WX 600 ; N uacute ; B 43 -16 541 639 ; -C -1 ; WX 600 ; N ugrave ; B 43 -16 541 639 ; -C -1 ; WX 600 ; N ucircumflex ; B 43 -16 541 639 ; -C -1 ; WX 600 ; N yacute ; B 51 -186 549 639 ; -C -1 ; WX 600 ; N zcaron ; B 115 0 489 639 ; -C -1 ; WX 600 ; N ydieresis ; B 51 -186 549 611 ; -C -1 ; WX 600 ; N copyright ; B 3 -15 596 578 ; -C -1 ; WX 600 ; N registered ; B 3 -15 596 578 ; -C -1 ; WX 600 ; N Atilde ; B 9 0 591 755 ; -C -1 ; WX 600 ; N nbspace ; B 295 0 295 0 ; -C -1 ; WX 600 ; N Ccedilla ; B 63 -173 534 576 ; -C -1 ; WX 600 ; N Acircumflex ; B 9 0 591 789 ; -C -1 ; WX 600 ; N Agrave ; B 9 0 591 789 ; -C -1 ; WX 600 ; N logicalnot ; B 72 168 528 438 ; -C -1 ; WX 600 ; N Aacute ; B 9 0 591 789 ; -C -1 ; WX 600 ; N Eth ; B 0 0 520 563 ; -C -1 ; WX 600 ; N brokenbar ; B 280 -124 320 604 ; -C -1 ; WX 600 ; N Thorn ; B 43 0 499 563 ; -C -1 ; WX 600 ; N Adieresis ; B 9 0 591 761 ; -C -1 ; WX 600 ; N mu ; B 43 -200 541 417 ; -C -1 ; WX 600 ; N .notdef ; B 295 0 295 0 ; -EndCharMetrics -EndFontMetrics diff --git a/misc/gs_afm/CourBo.afm b/misc/gs_afm/CourBo.afm deleted file mode 100644 index 2ea312d1fb..0000000000 --- a/misc/gs_afm/CourBo.afm +++ /dev/null @@ -1,255 +0,0 @@ -StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 8/3/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. -FontName NimbusMonL-Bold -FullName Nimbus Mono L Bold -FamilyName Nimbus Mono L -Weight Bold -ItalicAngle 0.0 -IsFixedPitch false -UnderlinePosition -100 -UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW -EncodingScheme AdobeStandardEncoding -FontBBox -43 -229 630 871 -CapHeight 583 -XHeight 437 -Descender -205 -Ascender 624 -StartCharMetrics 232 -C 32 ; WX 600 ; N space ; B 375 0 375 0 ; -C 33 ; WX 600 ; N exclam ; B 220 -15 381 638 ; -C 34 ; WX 600 ; N quotedbl ; B 136 312 464 602 ; -C 35 ; WX 600 ; N numbersign ; B 62 -92 538 675 ; -C 36 ; WX 600 ; N dollar ; B 83 -123 517 684 ; -C 37 ; WX 600 ; N percent ; B 80 -15 521 617 ; -C 38 ; WX 600 ; N ampersand ; B 75 -14 508 550 ; -C 39 ; WX 600 ; N quoteright ; B 147 331 351 623 ; -C 40 ; WX 600 ; N parenleft ; B 264 -153 488 632 ; -C 41 ; WX 600 ; N parenright ; B 117 -153 341 632 ; -C 42 ; WX 600 ; N asterisk ; B 83 208 517 622 ; -C 43 ; WX 600 ; N plus ; B 42 0 558 560 ; -C 44 ; WX 600 ; N comma ; B 147 -158 351 134 ; -C 45 ; WX 600 ; N hyphen ; B 42 229 558 329 ; -C 46 ; WX 600 ; N period ; B 225 -15 375 117 ; -C 47 ; WX 600 ; N slash ; B 83 -113 517 695 ; -C 48 ; WX 600 ; N zero ; B 83 -15 517 638 ; -C 49 ; WX 600 ; N one ; B 83 0 517 638 ; -C 50 ; WX 600 ; N two ; B 54 0 508 638 ; -C 51 ; WX 600 ; N three ; B 66 -15 529 638 ; -C 52 ; WX 600 ; N four ; B 75 0 508 622 ; -C 53 ; WX 600 ; N five ; B 66 -15 529 622 ; -C 54 ; WX 600 ; N six ; B 105 -15 540 638 ; -C 55 ; WX 600 ; N seven ; B 75 -1 508 622 ; -C 56 ; WX 600 ; N eight ; B 83 -15 517 638 ; -C 57 ; WX 600 ; N nine ; B 106 -15 541 638 ; -C 58 ; WX 600 ; N colon ; B 225 -15 375 437 ; -C 59 ; WX 600 ; N semicolon ; B 147 -158 351 437 ; -C 60 ; WX 600 ; N less ; B 42 54 544 501 ; -C 61 ; WX 600 ; N equal ; B 42 138 558 422 ; -C 62 ; WX 600 ; N greater ; B 56 53 558 500 ; -C 63 ; WX 600 ; N question ; B 104 -15 517 598 ; -C 64 ; WX 600 ; N at ; B 76 -151 509 620 ; -C 65 ; WX 600 ; N A ; B -21 0 621 583 ; -C 66 ; WX 600 ; N B ; B 13 0 571 583 ; -C 67 ; WX 600 ; N C ; B 33 -14 564 597 ; -C 68 ; WX 600 ; N D ; B 13 0 550 583 ; -C 69 ; WX 600 ; N E ; B 13 0 550 583 ; -C 70 ; WX 600 ; N F ; B 13 0 550 583 ; -C 71 ; WX 600 ; N G ; B 33 -14 592 597 ; -C 72 ; WX 600 ; N H ; B 23 0 581 583 ; -C 73 ; WX 600 ; N I ; B 83 0 517 583 ; -C 74 ; WX 600 ; N J ; B 54 -14 613 583 ; -C 75 ; WX 600 ; N K ; B 13 0 602 584 ; -C 76 ; WX 600 ; N L ; B 33 0 571 583 ; -C 77 ; WX 600 ; N M ; B -19 0 623 584 ; -C 78 ; WX 600 ; N N ; B -8 0 592 583 ; -C 79 ; WX 600 ; N O ; B 21 -14 579 597 ; -C 80 ; WX 600 ; N P ; B 13 0 529 583 ; -C 81 ; WX 600 ; N Q ; B 21 -145 579 597 ; -C 82 ; WX 600 ; N R ; B 13 0 619 583 ; -C 83 ; WX 600 ; N S ; B 62 -14 538 597 ; -C 84 ; WX 600 ; N T ; B 42 0 558 583 ; -C 85 ; WX 600 ; N U ; B 10 -14 590 583 ; -C 86 ; WX 600 ; N V ; B -21 0 621 583 ; -C 87 ; WX 600 ; N W ; B -10 0 610 583 ; -C 88 ; WX 600 ; N X ; B 10 0 590 584 ; -C 89 ; WX 600 ; N Y ; B 21 0 579 584 ; -C 90 ; WX 600 ; N Z ; B 73 0 527 583 ; -C 91 ; WX 600 ; N bracketleft ; B 250 -148 475 627 ; -C 92 ; WX 600 ; N backslash ; B 83 -113 517 695 ; -C 93 ; WX 600 ; N bracketright ; B 125 -148 350 627 ; -C 94 ; WX 600 ; N asciicircum ; B 83 325 517 652 ; -C 95 ; WX 600 ; N underscore ; B -12 -125 612 -75 ; -C 96 ; WX 600 ; N quoteleft ; B 249 348 453 602 ; -C 97 ; WX 600 ; N a ; B 42 -16 571 450 ; -C 98 ; WX 600 ; N b ; B -8 -14 571 624 ; -C 99 ; WX 600 ; N c ; B 54 -16 565 450 ; -C 100 ; WX 600 ; N d ; B 33 -14 613 624 ; -C 101 ; WX 600 ; N e ; B 33 -16 550 450 ; -C 102 ; WX 600 ; N f ; B 75 0 571 623 ; -C 103 ; WX 600 ; N g ; B 33 -205 592 451 ; -C 104 ; WX 600 ; N h ; B 13 0 581 624 ; -C 105 ; WX 600 ; N i ; B 62 0 538 623 ; -C 106 ; WX 600 ; N j ; B 117 -205 488 623 ; -C 107 ; WX 600 ; N k ; B 33 0 571 624 ; -C 108 ; WX 600 ; N l ; B 62 0 538 624 ; -C 109 ; WX 600 ; N m ; B -19 0 623 450 ; -C 110 ; WX 600 ; N n ; B 23 0 571 450 ; -C 111 ; WX 600 ; N o ; B 42 -16 558 450 ; -C 112 ; WX 600 ; N p ; B -8 -205 571 450 ; -C 113 ; WX 600 ; N q ; B 33 -205 613 450 ; -C 114 ; WX 600 ; N r ; B 54 0 571 449 ; -C 115 ; WX 600 ; N s ; B 73 -16 527 450 ; -C 116 ; WX 600 ; N t ; B 13 -16 529 591 ; -C 117 ; WX 600 ; N u ; B 13 -13 571 437 ; -C 118 ; WX 600 ; N v ; B 0 0 600 437 ; -C 119 ; WX 600 ; N w ; B 0 0 600 437 ; -C 120 ; WX 600 ; N x ; B 21 0 579 437 ; -C 121 ; WX 600 ; N y ; B 21 -205 579 437 ; -C 122 ; WX 600 ; N z ; B 85 0 519 437 ; -C 123 ; WX 600 ; N braceleft ; B 167 -153 433 623 ; -C 124 ; WX 600 ; N bar ; B 250 -153 350 622 ; -C 125 ; WX 600 ; N braceright ; B 167 -153 433 623 ; -C 126 ; WX 600 ; N asciitilde ; B 62 179 538 385 ; -C 161 ; WX 600 ; N exclamdown ; B 220 -227 381 426 ; -C 162 ; WX 600 ; N cent ; B 83 -44 499 661 ; -C 163 ; WX 600 ; N sterling ; B 33 0 550 598 ; -C 164 ; WX 600 ; N fraction ; B 21 102 580 500 ; -C 165 ; WX 600 ; N yen ; B 21 0 579 580 ; -C 166 ; WX 600 ; N florin ; B 57 -123 548 638 ; -C 167 ; WX 600 ; N section ; B 36 -170 564 583 ; -C 168 ; WX 600 ; N currency ; B 73 64 527 519 ; -C 169 ; WX 600 ; N quotesingle ; B 236 312 364 602 ; -C 170 ; WX 600 ; N quotedblleft ; B 98 348 502 602 ; -C 171 ; WX 600 ; N guillemotleft ; B 33 20 571 415 ; -C 172 ; WX 600 ; N guilsinglleft ; B 33 20 342 415 ; -C 173 ; WX 600 ; N guilsinglright ; B 263 20 571 415 ; -C 174 ; WX 600 ; N fi ; B -14 0 619 624 ; -C 175 ; WX 600 ; N fl ; B -17 0 617 623 ; -C 177 ; WX 600 ; N endash ; B 42 229 558 329 ; -C 178 ; WX 600 ; N dagger ; B 94 -92 506 622 ; -C 179 ; WX 600 ; N daggerdbl ; B 94 -92 506 622 ; -C 180 ; WX 600 ; N periodcentered ; B 225 214 375 346 ; -C 182 ; WX 600 ; N paragraph ; B 49 -174 558 583 ; -C 183 ; WX 600 ; N bullet ; B 150 154 449 453 ; -C 184 ; WX 600 ; N quotesinglbase ; B 147 -158 351 134 ; -C 185 ; WX 600 ; N quotedblbase ; B 87 -120 491 134 ; -C 186 ; WX 600 ; N quotedblright ; B 87 348 491 602 ; -C 187 ; WX 600 ; N guillemotright ; B 33 20 571 415 ; -C 188 ; WX 600 ; N ellipsis ; B 25 -15 575 117 ; -C 189 ; WX 600 ; N perthousand ; B 0 0 600 618 ; -C 191 ; WX 600 ; N questiondown ; B 83 -227 496 386 ; -C 193 ; WX 600 ; N grave ; B 125 496 350 696 ; -C 194 ; WX 600 ; N acute ; B 250 496 475 696 ; -C 195 ; WX 600 ; N circumflex ; B 125 497 476 696 ; -C 196 ; WX 600 ; N tilde ; B 115 523 485 656 ; -C 197 ; WX 600 ; N macron ; B 125 546 475 626 ; -C 198 ; WX 600 ; N breve ; B 125 503 475 687 ; -C 199 ; WX 600 ; N dotaccent ; B 240 534 360 654 ; -C 200 ; WX 600 ; N dieresis ; B 136 534 464 654 ; -C 202 ; WX 600 ; N ring ; B 177 486 423 727 ; -C 203 ; WX 600 ; N cedilla ; B 180 -229 407 0 ; -C 205 ; WX 600 ; N hungarumlaut ; B 125 496 475 694 ; -C 206 ; WX 600 ; N ogonek ; B 250 -208 463 0 ; -C 207 ; WX 600 ; N caron ; B 125 497 476 696 ; -C 208 ; WX 600 ; N emdash ; B -29 229 629 329 ; -C 225 ; WX 600 ; N AE ; B -20 0 614 583 ; -C 227 ; WX 600 ; N ordfeminine ; B 118 182 489 595 ; -C 232 ; WX 600 ; N Lslash ; B 12 0 571 583 ; -C 233 ; WX 600 ; N Oslash ; B 9 -70 590 638 ; -C 234 ; WX 600 ; N OE ; B -20 0 612 583 ; -C 235 ; WX 600 ; N ordmasculine ; B 122 182 480 595 ; -C 241 ; WX 600 ; N ae ; B -13 -16 612 450 ; -C 245 ; WX 600 ; N dotlessi ; B 62 0 538 437 ; -C 248 ; WX 600 ; N lslash ; B 62 0 538 624 ; -C 249 ; WX 600 ; N oslash ; B 23 -70 573 494 ; -C 250 ; WX 600 ; N oe ; B -11 -16 613 450 ; -C 251 ; WX 600 ; N germandbls ; B 13 -16 529 623 ; -C -1 ; WX 600 ; N Yacute ; B 21 0 579 839 ; -C -1 ; WX 600 ; N Ucircumflex ; B 10 -14 590 839 ; -C -1 ; WX 600 ; N Ugrave ; B 10 -14 590 839 ; -C -1 ; WX 600 ; N Zcaron ; B 73 0 527 839 ; -C -1 ; WX 600 ; N Ydieresis ; B 21 0 579 798 ; -C -1 ; WX 600 ; N threesuperior ; B 157 238 442 637 ; -C -1 ; WX 600 ; N Uacute ; B 10 -14 590 839 ; -C -1 ; WX 600 ; N twosuperior ; B 149 247 429 637 ; -C -1 ; WX 600 ; N Udieresis ; B 10 -14 590 798 ; -C -1 ; WX 600 ; N middot ; B 225 214 375 346 ; -C -1 ; WX 600 ; N onesuperior ; B 166 247 434 638 ; -C -1 ; WX 600 ; N aacute ; B 42 -16 571 696 ; -C -1 ; WX 600 ; N agrave ; B 42 -16 571 696 ; -C -1 ; WX 600 ; N acircumflex ; B 42 -16 571 696 ; -C -1 ; WX 600 ; N Scaron ; B 62 -14 538 839 ; -C -1 ; WX 600 ; N Otilde ; B 21 -14 579 799 ; -C -1 ; WX 600 ; N sfthyphen ; B 42 229 558 329 ; -C -1 ; WX 600 ; N atilde ; B 42 -16 571 656 ; -C -1 ; WX 600 ; N aring ; B 42 -16 571 727 ; -C -1 ; WX 600 ; N adieresis ; B 42 -16 571 654 ; -C -1 ; WX 600 ; N Ograve ; B 21 -14 579 839 ; -C -1 ; WX 600 ; N Ocircumflex ; B 21 -14 579 839 ; -C -1 ; WX 600 ; N Odieresis ; B 21 -14 579 798 ; -C -1 ; WX 600 ; N Ntilde ; B -8 0 592 799 ; -C -1 ; WX 600 ; N edieresis ; B 33 -16 550 654 ; -C -1 ; WX 600 ; N eacute ; B 33 -16 550 696 ; -C -1 ; WX 600 ; N egrave ; B 33 -16 550 696 ; -C -1 ; WX 600 ; N Icircumflex ; B 83 0 517 839 ; -C -1 ; WX 600 ; N ecircumflex ; B 33 -16 550 696 ; -C -1 ; WX 600 ; N Igrave ; B 83 0 517 839 ; -C -1 ; WX 600 ; N Iacute ; B 83 0 517 839 ; -C -1 ; WX 600 ; N Idieresis ; B 83 0 517 798 ; -C -1 ; WX 600 ; N degree ; B 125 243 475 596 ; -C -1 ; WX 600 ; N Ecircumflex ; B 13 0 550 839 ; -C -1 ; WX 600 ; N minus ; B 42 230 558 330 ; -C -1 ; WX 600 ; N multiply ; B 100 80 500 480 ; -C -1 ; WX 600 ; N divide ; B 42 28 558 533 ; -C -1 ; WX 600 ; N Egrave ; B 13 0 550 839 ; -C -1 ; WX 600 ; N trademark ; B -33 220 620 583 ; -C -1 ; WX 600 ; N Oacute ; B 21 -14 579 839 ; -C -1 ; WX 600 ; N thorn ; B -8 -205 571 624 ; -C -1 ; WX 600 ; N eth ; B 42 -16 558 646 ; -C -1 ; WX 600 ; N Eacute ; B 13 0 550 839 ; -C -1 ; WX 600 ; N ccedilla ; B 54 -229 565 450 ; -C -1 ; WX 600 ; N idieresis ; B 62 0 538 654 ; -C -1 ; WX 600 ; N iacute ; B 62 0 538 696 ; -C -1 ; WX 600 ; N igrave ; B 62 0 538 696 ; -C -1 ; WX 600 ; N plusminus ; B 42 0 558 624 ; -C -1 ; WX 600 ; N onehalf ; B -34 0 629 638 ; -C -1 ; WX 600 ; N onequarter ; B -34 0 629 638 ; -C -1 ; WX 600 ; N threequarters ; B -43 0 630 637 ; -C -1 ; WX 600 ; N icircumflex ; B 62 0 538 696 ; -C -1 ; WX 600 ; N Edieresis ; B 13 0 550 798 ; -C -1 ; WX 600 ; N ntilde ; B 23 0 571 656 ; -C -1 ; WX 600 ; N Aring ; B -21 0 621 871 ; -C -1 ; WX 600 ; N odieresis ; B 42 -16 558 654 ; -C -1 ; WX 600 ; N oacute ; B 42 -16 558 696 ; -C -1 ; WX 600 ; N ograve ; B 42 -16 558 696 ; -C -1 ; WX 600 ; N ocircumflex ; B 42 -16 558 696 ; -C -1 ; WX 600 ; N otilde ; B 42 -16 558 656 ; -C -1 ; WX 600 ; N scaron ; B 73 -16 527 696 ; -C -1 ; WX 600 ; N udieresis ; B 13 -13 571 654 ; -C -1 ; WX 600 ; N uacute ; B 13 -13 571 696 ; -C -1 ; WX 600 ; N ugrave ; B 13 -13 571 696 ; -C -1 ; WX 600 ; N ucircumflex ; B 13 -13 571 696 ; -C -1 ; WX 600 ; N yacute ; B 21 -205 579 696 ; -C -1 ; WX 600 ; N zcaron ; B 85 0 519 696 ; -C -1 ; WX 600 ; N ydieresis ; B 21 -205 579 654 ; -C -1 ; WX 600 ; N copyright ; B -7 -15 606 598 ; -C -1 ; WX 600 ; N registered ; B -7 -15 606 598 ; -C -1 ; WX 600 ; N Atilde ; B -21 0 621 799 ; -C -1 ; WX 600 ; N nbspace ; B 375 0 375 0 ; -C -1 ; WX 600 ; N Ccedilla ; B 33 -229 564 597 ; -C -1 ; WX 600 ; N Acircumflex ; B -21 0 621 839 ; -C -1 ; WX 600 ; N Agrave ; B -21 0 621 839 ; -C -1 ; WX 600 ; N logicalnot ; B 42 115 465 445 ; -C -1 ; WX 600 ; N Aacute ; B -21 0 621 839 ; -C -1 ; WX 600 ; N Eth ; B 0 0 550 583 ; -C -1 ; WX 600 ; N brokenbar ; B 250 -153 354 622 ; -C -1 ; WX 600 ; N Thorn ; B 14 0 523 583 ; -C -1 ; WX 600 ; N Adieresis ; B -21 0 621 798 ; -C -1 ; WX 600 ; N mu ; B 13 -153 571 437 ; -C -1 ; WX 600 ; N .notdef ; B 375 0 375 0 ; -EndCharMetrics -EndFontMetrics diff --git a/misc/gs_afm/CourBoO.afm b/misc/gs_afm/CourBoO.afm deleted file mode 100644 index 6b37f99b2a..0000000000 --- a/misc/gs_afm/CourBoO.afm +++ /dev/null @@ -1,255 +0,0 @@ -StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 8/3/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. -FontName NimbusMonL-BoldObli -FullName Nimbus Mono L Bold Oblique -FamilyName Nimbus Mono L -Weight Bold -ItalicAngle -12.0 -IsFixedPitch false -UnderlinePosition -100 -UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW -EncodingScheme AdobeStandardEncoding -FontBBox -61 -229 735 871 -CapHeight 583 -XHeight 437 -Descender -205 -Ascender 624 -StartCharMetrics 232 -C 32 ; WX 600 ; N space ; B 386 0 386 0 ; -C 33 ; WX 600 ; N exclam ; B 234 -15 501 638 ; -C 34 ; WX 600 ; N quotedbl ; B 243 312 592 602 ; -C 35 ; WX 600 ; N numbersign ; B 101 -92 623 675 ; -C 36 ; WX 600 ; N dollar ; B 100 -123 610 684 ; -C 37 ; WX 600 ; N percent ; B 131 -15 599 617 ; -C 38 ; WX 600 ; N ampersand ; B 102 -14 557 550 ; -C 39 ; WX 600 ; N quoteright ; B 222 331 483 623 ; -C 40 ; WX 600 ; N parenleft ; B 304 -153 613 632 ; -C 41 ; WX 600 ; N parenright ; B 94 -153 403 632 ; -C 42 ; WX 600 ; N asterisk ; B 178 208 614 622 ; -C 43 ; WX 600 ; N plus ; B 101 0 619 560 ; -C 44 ; WX 600 ; N comma ; B 118 -158 379 134 ; -C 45 ; WX 600 ; N hyphen ; B 101 229 619 329 ; -C 46 ; WX 600 ; N period ; B 234 -15 387 117 ; -C 47 ; WX 600 ; N slash ; B 69 -113 656 695 ; -C 48 ; WX 600 ; N zero ; B 130 -15 602 638 ; -C 49 ; WX 600 ; N one ; B 93 0 529 638 ; -C 50 ; WX 600 ; N two ; B 54 0 602 638 ; -C 51 ; WX 600 ; N three ; B 80 -15 609 638 ; -C 52 ; WX 600 ; N four ; B 104 0 579 622 ; -C 53 ; WX 600 ; N five ; B 83 -15 610 622 ; -C 54 ; WX 600 ; N six ; B 154 -15 663 638 ; -C 55 ; WX 600 ; N seven ; B 184 -1 640 622 ; -C 56 ; WX 600 ; N eight ; B 114 -15 608 638 ; -C 57 ; WX 600 ; N nine ; B 115 -15 624 638 ; -C 58 ; WX 600 ; N colon ; B 234 -15 455 437 ; -C 59 ; WX 600 ; N semicolon ; B 118 -158 431 437 ; -C 60 ; WX 600 ; N less ; B 102 54 642 501 ; -C 61 ; WX 600 ; N equal ; B 81 138 638 422 ; -C 62 ; WX 600 ; N greater ; B 76 53 616 500 ; -C 63 ; WX 600 ; N question ; B 197 -15 608 598 ; -C 64 ; WX 600 ; N at ; B 98 -151 582 620 ; -C 65 ; WX 600 ; N A ; B -11 0 633 583 ; -C 66 ; WX 600 ; N B ; B 22 0 620 583 ; -C 67 ; WX 600 ; N C ; B 80 -14 663 597 ; -C 68 ; WX 600 ; N D ; B 23 0 622 583 ; -C 69 ; WX 600 ; N E ; B 23 0 652 583 ; -C 70 ; WX 600 ; N F ; B 23 0 674 583 ; -C 71 ; WX 600 ; N G ; B 79 -14 667 597 ; -C 72 ; WX 600 ; N H ; B 32 0 675 583 ; -C 73 ; WX 600 ; N I ; B 93 0 632 583 ; -C 74 ; WX 600 ; N J ; B 64 -14 727 583 ; -C 75 ; WX 600 ; N K ; B 22 0 687 583 ; -C 76 ; WX 600 ; N L ; B 42 0 616 583 ; -C 77 ; WX 600 ; N M ; B -10 0 728 583 ; -C 78 ; WX 600 ; N N ; B 21 0 706 583 ; -C 79 ; WX 600 ; N O ; B 75 -14 649 597 ; -C 80 ; WX 600 ; N P ; B 23 0 617 583 ; -C 81 ; WX 600 ; N Q ; B 75 -145 649 597 ; -C 82 ; WX 600 ; N R ; B 23 0 631 583 ; -C 83 ; WX 600 ; N S ; B 72 -14 634 597 ; -C 84 ; WX 600 ; N T ; B 121 0 682 583 ; -C 85 ; WX 600 ; N U ; B 110 -14 705 583 ; -C 86 ; WX 600 ; N V ; B 91 0 735 583 ; -C 87 ; WX 600 ; N W ; B 98 0 725 583 ; -C 88 ; WX 600 ; N X ; B 19 0 692 583 ; -C 89 ; WX 600 ; N Y ; B 128 0 694 583 ; -C 90 ; WX 600 ; N Z ; B 73 0 628 583 ; -C 91 ; WX 600 ; N bracketleft ; B 219 -148 598 627 ; -C 92 ; WX 600 ; N backslash ; B 219 -113 504 695 ; -C 93 ; WX 600 ; N bracketright ; B 104 -148 483 627 ; -C 94 ; WX 600 ; N asciicircum ; B 161 325 598 652 ; -C 95 ; WX 600 ; N underscore ; B -61 -125 564 -75 ; -C 96 ; WX 600 ; N quoteleft ; B 377 348 534 602 ; -C 97 ; WX 600 ; N a ; B 65 -16 583 450 ; -C 98 ; WX 600 ; N b ; B 2 -14 623 624 ; -C 99 ; WX 600 ; N c ; B 93 -16 626 450 ; -C 100 ; WX 600 ; N d ; B 74 -14 664 624 ; -C 101 ; WX 600 ; N e ; B 74 -16 600 450 ; -C 102 ; WX 600 ; N f ; B 84 0 691 623 ; -C 103 ; WX 600 ; N g ; B 73 -205 675 451 ; -C 104 ; WX 600 ; N h ; B 33 0 593 624 ; -C 105 ; WX 600 ; N i ; B 72 0 550 623 ; -C 106 ; WX 600 ; N j ; B 83 -205 581 623 ; -C 107 ; WX 600 ; N k ; B 42 0 606 624 ; -C 108 ; WX 600 ; N l ; B 72 0 550 624 ; -C 109 ; WX 600 ; N m ; B -9 0 635 450 ; -C 110 ; WX 600 ; N n ; B 33 0 583 450 ; -C 111 ; WX 600 ; N o ; B 84 -16 609 450 ; -C 112 ; WX 600 ; N p ; B -42 -205 623 450 ; -C 113 ; WX 600 ; N q ; B 75 -205 696 450 ; -C 114 ; WX 600 ; N r ; B 64 0 650 449 ; -C 115 ; WX 600 ; N s ; B 83 -16 592 450 ; -C 116 ; WX 600 ; N t ; B 94 -16 547 591 ; -C 117 ; WX 600 ; N u ; B 94 -13 603 437 ; -C 118 ; WX 600 ; N v ; B 81 0 683 437 ; -C 119 ; WX 600 ; N w ; B 82 0 684 437 ; -C 120 ; WX 600 ; N x ; B 30 0 641 437 ; -C 121 ; WX 600 ; N y ; B -13 -205 662 437 ; -C 122 ; WX 600 ; N z ; B 85 0 599 437 ; -C 123 ; WX 600 ; N braceleft ; B 217 -153 556 623 ; -C 124 ; WX 600 ; N bar ; B 227 -153 472 622 ; -C 125 ; WX 600 ; N braceright ; B 144 -153 483 623 ; -C 126 ; WX 600 ; N asciitilde ; B 114 179 606 385 ; -C 161 ; WX 600 ; N exclamdown ; B 186 -227 453 426 ; -C 162 ; WX 600 ; N cent ; B 144 -44 593 661 ; -C 163 ; WX 600 ; N sterling ; B 64 0 571 598 ; -C 164 ; WX 600 ; N fraction ; B 52 102 676 500 ; -C 165 ; WX 600 ; N yen ; B 133 0 693 580 ; -C 166 ; WX 600 ; N florin ; B 43 -123 672 638 ; -C 167 ; WX 600 ; N section ; B 45 -170 643 583 ; -C 168 ; WX 600 ; N currency ; B 96 64 626 519 ; -C 169 ; WX 600 ; N quotesingle ; B 343 312 492 602 ; -C 170 ; WX 600 ; N quotedblleft ; B 226 348 583 602 ; -C 171 ; WX 600 ; N guillemotleft ; B 80 20 654 415 ; -C 172 ; WX 600 ; N guilsinglleft ; B 80 20 425 415 ; -C 173 ; WX 600 ; N guilsinglright ; B 273 20 617 415 ; -C 174 ; WX 600 ; N fi ; B -4 0 633 624 ; -C 175 ; WX 600 ; N fl ; B -8 0 645 623 ; -C 177 ; WX 600 ; N endash ; B 101 229 619 329 ; -C 178 ; WX 600 ; N dagger ; B 175 -92 589 622 ; -C 179 ; WX 600 ; N daggerdbl ; B 123 -92 589 622 ; -C 180 ; WX 600 ; N periodcentered ; B 283 214 436 346 ; -C 182 ; WX 600 ; N paragraph ; B 108 -174 672 583 ; -C 183 ; WX 600 ; N bullet ; B 211 154 517 453 ; -C 184 ; WX 600 ; N quotesinglbase ; B 118 -158 379 134 ; -C 185 ; WX 600 ; N quotedblbase ; B 66 -120 519 134 ; -C 186 ; WX 600 ; N quotedblright ; B 166 348 619 602 ; -C 187 ; WX 600 ; N guillemotright ; B 43 20 617 415 ; -C 188 ; WX 600 ; N ellipsis ; B 34 -15 587 117 ; -C 189 ; WX 600 ; N perthousand ; B 104 0 627 618 ; -C 191 ; WX 600 ; N questiondown ; B 70 -227 481 386 ; -C 193 ; WX 600 ; N grave ; B 264 496 464 696 ; -C 194 ; WX 600 ; N acute ; B 362 496 616 696 ; -C 195 ; WX 600 ; N circumflex ; B 237 497 590 696 ; -C 196 ; WX 600 ; N tilde ; B 233 523 619 656 ; -C 197 ; WX 600 ; N macron ; B 249 546 600 626 ; -C 198 ; WX 600 ; N breve ; B 261 503 614 687 ; -C 199 ; WX 600 ; N dotaccent ; B 365 534 487 656 ; -C 200 ; WX 600 ; N dieresis ; B 261 534 590 655 ; -C 202 ; WX 600 ; N ring ; B 303 486 554 727 ; -C 203 ; WX 600 ; N cedilla ; B 143 -229 381 0 ; -C 205 ; WX 600 ; N hungarumlaut ; B 237 496 616 694 ; -C 206 ; WX 600 ; N ogonek ; B 222 -208 433 0 ; -C 207 ; WX 600 ; N caron ; B 264 497 617 696 ; -C 208 ; WX 600 ; N emdash ; B 30 229 690 329 ; -C 225 ; WX 600 ; N AE ; B -10 0 717 583 ; -C 227 ; WX 600 ; N ordfeminine ; B 170 182 559 595 ; -C 232 ; WX 600 ; N Lslash ; B 43 0 616 583 ; -C 233 ; WX 600 ; N Oslash ; B 4 -70 717 638 ; -C 234 ; WX 600 ; N OE ; B 34 0 717 583 ; -C 235 ; WX 600 ; N ordmasculine ; B 168 182 566 595 ; -C 241 ; WX 600 ; N ae ; B 14 -16 665 450 ; -C 245 ; WX 600 ; N dotlessi ; B 72 0 550 437 ; -C 248 ; WX 600 ; N lslash ; B 72 0 557 624 ; -C 249 ; WX 600 ; N oslash ; B 17 -70 669 494 ; -C 250 ; WX 600 ; N oe ; B 28 -16 666 450 ; -C 251 ; WX 600 ; N germandbls ; B 22 -16 569 623 ; -C -1 ; WX 600 ; N Yacute ; B 128 0 694 839 ; -C -1 ; WX 600 ; N Ucircumflex ; B 110 -14 705 839 ; -C -1 ; WX 600 ; N Ugrave ; B 110 -14 705 839 ; -C -1 ; WX 600 ; N Zcaron ; B 73 0 644 839 ; -C -1 ; WX 600 ; N Ydieresis ; B 128 0 694 800 ; -C -1 ; WX 600 ; N threesuperior ; B 218 238 543 637 ; -C -1 ; WX 600 ; N Uacute ; B 110 -14 705 839 ; -C -1 ; WX 600 ; N twosuperior ; B 202 247 538 637 ; -C -1 ; WX 600 ; N Udieresis ; B 110 -14 705 800 ; -C -1 ; WX 600 ; N middot ; B 283 214 436 346 ; -C -1 ; WX 600 ; N onesuperior ; B 224 247 494 638 ; -C -1 ; WX 600 ; N aacute ; B 66 -16 584 696 ; -C -1 ; WX 600 ; N agrave ; B 65 -16 583 696 ; -C -1 ; WX 600 ; N acircumflex ; B 65 -16 583 696 ; -C -1 ; WX 600 ; N Scaron ; B 72 -14 657 839 ; -C -1 ; WX 600 ; N Otilde ; B 75 -14 656 799 ; -C -1 ; WX 600 ; N sfthyphen ; B 101 229 619 329 ; -C -1 ; WX 600 ; N atilde ; B 65 -16 612 656 ; -C -1 ; WX 600 ; N aring ; B 65 -16 583 727 ; -C -1 ; WX 600 ; N adieresis ; B 65 -16 583 655 ; -C -1 ; WX 600 ; N Ograve ; B 75 -14 649 839 ; -C -1 ; WX 600 ; N Ocircumflex ; B 75 -14 649 839 ; -C -1 ; WX 600 ; N Odieresis ; B 75 -14 649 800 ; -C -1 ; WX 600 ; N Ntilde ; B 21 0 706 799 ; -C -1 ; WX 600 ; N edieresis ; B 74 -16 600 655 ; -C -1 ; WX 600 ; N eacute ; B 74 -16 600 696 ; -C -1 ; WX 600 ; N egrave ; B 74 -16 600 696 ; -C -1 ; WX 600 ; N Icircumflex ; B 93 0 632 839 ; -C -1 ; WX 600 ; N ecircumflex ; B 74 -16 600 696 ; -C -1 ; WX 600 ; N Igrave ; B 93 0 632 839 ; -C -1 ; WX 600 ; N Iacute ; B 93 0 632 839 ; -C -1 ; WX 600 ; N Idieresis ; B 93 0 632 800 ; -C -1 ; WX 600 ; N degree ; B 210 243 568 596 ; -C -1 ; WX 600 ; N Ecircumflex ; B 23 0 652 839 ; -C -1 ; WX 600 ; N minus ; B 101 230 619 330 ; -C -1 ; WX 600 ; N multiply ; B 126 80 592 480 ; -C -1 ; WX 600 ; N divide ; B 101 28 619 533 ; -C -1 ; WX 600 ; N Egrave ; B 23 0 652 839 ; -C -1 ; WX 600 ; N trademark ; B 60 220 732 583 ; -C -1 ; WX 600 ; N Oacute ; B 75 -14 649 839 ; -C -1 ; WX 600 ; N thorn ; B -42 -205 623 624 ; -C -1 ; WX 600 ; N eth ; B 83 -16 617 646 ; -C -1 ; WX 600 ; N Eacute ; B 23 0 652 839 ; -C -1 ; WX 600 ; N ccedilla ; B 92 -229 626 450 ; -C -1 ; WX 600 ; N idieresis ; B 72 0 575 656 ; -C -1 ; WX 600 ; N iacute ; B 71 0 574 696 ; -C -1 ; WX 600 ; N igrave ; B 72 0 550 696 ; -C -1 ; WX 600 ; N plusminus ; B 52 0 640 624 ; -C -1 ; WX 600 ; N onehalf ; B 25 0 685 638 ; -C -1 ; WX 600 ; N onequarter ; B 25 0 673 638 ; -C -1 ; WX 600 ; N threequarters ; B 18 0 673 637 ; -C -1 ; WX 600 ; N icircumflex ; B 72 0 573 696 ; -C -1 ; WX 600 ; N Edieresis ; B 23 0 652 800 ; -C -1 ; WX 600 ; N ntilde ; B 33 0 613 656 ; -C -1 ; WX 600 ; N Aring ; B -11 0 633 871 ; -C -1 ; WX 600 ; N odieresis ; B 84 -16 609 655 ; -C -1 ; WX 600 ; N oacute ; B 84 -16 609 696 ; -C -1 ; WX 600 ; N ograve ; B 84 -16 609 696 ; -C -1 ; WX 600 ; N ocircumflex ; B 84 -16 609 696 ; -C -1 ; WX 600 ; N otilde ; B 84 -16 626 656 ; -C -1 ; WX 600 ; N scaron ; B 83 -16 627 696 ; -C -1 ; WX 600 ; N udieresis ; B 94 -13 603 655 ; -C -1 ; WX 600 ; N uacute ; B 94 -13 603 696 ; -C -1 ; WX 600 ; N ugrave ; B 94 -13 603 696 ; -C -1 ; WX 600 ; N ucircumflex ; B 94 -13 603 696 ; -C -1 ; WX 600 ; N yacute ; B -13 -205 662 696 ; -C -1 ; WX 600 ; N zcaron ; B 85 0 619 696 ; -C -1 ; WX 600 ; N ydieresis ; B -13 -205 662 655 ; -C -1 ; WX 600 ; N copyright ; B 48 -15 675 598 ; -C -1 ; WX 600 ; N registered ; B 48 -15 675 598 ; -C -1 ; WX 600 ; N Atilde ; B -11 0 633 799 ; -C -1 ; WX 600 ; N nbspace ; B 386 0 386 0 ; -C -1 ; WX 600 ; N Ccedilla ; B 80 -229 663 597 ; -C -1 ; WX 600 ; N Acircumflex ; B -11 0 633 839 ; -C -1 ; WX 600 ; N Agrave ; B -11 0 633 839 ; -C -1 ; WX 600 ; N logicalnot ; B 125 115 560 445 ; -C -1 ; WX 600 ; N Aacute ; B -11 0 633 839 ; -C -1 ; WX 600 ; N Eth ; B 23 0 622 583 ; -C -1 ; WX 600 ; N brokenbar ; B 227 -153 472 622 ; -C -1 ; WX 600 ; N Thorn ; B 23 0 588 583 ; -C -1 ; WX 600 ; N Adieresis ; B -11 0 633 800 ; -C -1 ; WX 600 ; N mu ; B 72 -153 603 440 ; -C -1 ; WX 600 ; N .notdef ; B 386 0 386 0 ; -EndCharMetrics -EndFontMetrics diff --git a/misc/gs_afm/CourO.afm b/misc/gs_afm/CourO.afm deleted file mode 100644 index 51e4ee6b81..0000000000 --- a/misc/gs_afm/CourO.afm +++ /dev/null @@ -1,255 +0,0 @@ -StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 8/19/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. -FontName NimbusMonL-ReguObli -FullName Nimbus Mono L Regular Oblique -FamilyName Nimbus Mono L -Weight Regular -ItalicAngle -12.0 -IsFixedPitch false -UnderlinePosition -100 -UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW -EncodingScheme AdobeStandardEncoding -FontBBox -61 -216 710 811 -CapHeight 563 -XHeight 417 -Descender -186 -Ascender 604 -StartCharMetrics 232 -C 32 ; WX 600 ; N space ; B 319 0 319 0 ; -C 33 ; WX 600 ; N exclam ; B 246 -15 463 618 ; -C 34 ; WX 600 ; N quotedbl ; B 254 315 582 604 ; -C 35 ; WX 600 ; N numbersign ; B 137 -62 589 647 ; -C 36 ; WX 600 ; N dollar ; B 131 -92 582 655 ; -C 37 ; WX 600 ; N percent ; B 137 -12 591 611 ; -C 38 ; WX 600 ; N ampersand ; B 132 -16 527 519 ; -C 39 ; WX 600 ; N quoteright ; B 207 314 468 604 ; -C 40 ; WX 600 ; N parenleft ; B 335 -124 583 604 ; -C 41 ; WX 600 ; N parenright ; B 124 -124 372 604 ; -C 42 ; WX 600 ; N asterisk ; B 211 250 586 604 ; -C 43 ; WX 600 ; N plus ; B 131 32 588 530 ; -C 44 ; WX 600 ; N comma ; B 110 -145 371 145 ; -C 45 ; WX 600 ; N hyphen ; B 131 258 588 299 ; -C 46 ; WX 600 ; N period ; B 235 -15 386 116 ; -C 47 ; WX 600 ; N slash ; B 99 -81 625 668 ; -C 48 ; WX 600 ; N zero ; B 156 -15 571 618 ; -C 49 ; WX 600 ; N one ; B 117 0 492 612 ; -C 50 ; WX 600 ; N two ; B 84 0 572 618 ; -C 51 ; WX 600 ; N three ; B 110 -15 579 618 ; -C 52 ; WX 600 ; N four ; B 141 0 545 604 ; -C 53 ; WX 600 ; N five ; B 113 -15 584 604 ; -C 54 ; WX 600 ; N six ; B 184 -15 631 618 ; -C 55 ; WX 600 ; N seven ; B 215 -1 606 604 ; -C 56 ; WX 600 ; N eight ; B 143 -15 576 618 ; -C 57 ; WX 600 ; N nine ; B 142 -15 589 618 ; -C 58 ; WX 600 ; N colon ; B 235 -15 450 417 ; -C 59 ; WX 600 ; N semicolon ; B 114 -145 426 417 ; -C 60 ; WX 600 ; N less ; B 131 44 627 518 ; -C 61 ; WX 600 ; N equal ; B 95 190 625 375 ; -C 62 ; WX 600 ; N greater ; B 92 44 588 518 ; -C 63 ; WX 600 ; N question ; B 231 -15 581 577 ; -C 64 ; WX 600 ; N at ; B 139 -62 561 624 ; -C 65 ; WX 600 ; N A ; B 13 0 596 563 ; -C 66 ; WX 600 ; N B ; B 47 0 591 563 ; -C 67 ; WX 600 ; N C ; B 110 -16 635 576 ; -C 68 ; WX 600 ; N D ; B 47 0 592 563 ; -C 69 ; WX 600 ; N E ; B 47 0 619 563 ; -C 70 ; WX 600 ; N F ; B 47 0 640 563 ; -C 71 ; WX 600 ; N G ; B 108 -16 636 576 ; -C 72 ; WX 600 ; N H ; B 57 0 646 563 ; -C 73 ; WX 600 ; N I ; B 117 0 603 563 ; -C 74 ; WX 600 ; N J ; B 100 -16 699 563 ; -C 75 ; WX 600 ; N K ; B 47 0 662 563 ; -C 76 ; WX 600 ; N L ; B 67 0 585 563 ; -C 77 ; WX 600 ; N M ; B 15 0 700 563 ; -C 78 ; WX 600 ; N N ; B 46 0 678 563 ; -C 79 ; WX 600 ; N O ; B 102 -16 616 576 ; -C 80 ; WX 600 ; N P ; B 47 0 587 563 ; -C 81 ; WX 600 ; N Q ; B 102 -115 616 576 ; -C 82 ; WX 600 ; N R ; B 47 0 594 563 ; -C 83 ; WX 600 ; N S ; B 96 -16 602 576 ; -C 84 ; WX 600 ; N T ; B 152 0 648 563 ; -C 85 ; WX 600 ; N U ; B 136 -16 676 563 ; -C 86 ; WX 600 ; N V ; B 124 0 707 563 ; -C 87 ; WX 600 ; N W ; B 122 0 696 563 ; -C 88 ; WX 600 ; N X ; B 44 0 662 563 ; -C 89 ; WX 600 ; N Y ; B 153 0 665 563 ; -C 90 ; WX 600 ; N Z ; B 103 0 590 563 ; -C 91 ; WX 600 ; N bracketleft ; B 254 -124 570 604 ; -C 92 ; WX 600 ; N backslash ; B 250 -81 474 668 ; -C 93 ; WX 600 ; N bracketright ; B 132 -124 448 604 ; -C 94 ; WX 600 ; N asciicircum ; B 192 354 567 615 ; -C 95 ; WX 600 ; N underscore ; B -61 -125 564 -75 ; -C 96 ; WX 600 ; N quoteleft ; B 388 343 544 604 ; -C 97 ; WX 600 ; N a ; B 93 -16 546 431 ; -C 98 ; WX 600 ; N b ; B 26 -16 591 604 ; -C 99 ; WX 600 ; N c ; B 122 -16 596 431 ; -C 100 ; WX 600 ; N d ; B 102 -16 630 604 ; -C 101 ; WX 600 ; N e ; B 104 -16 570 431 ; -C 102 ; WX 600 ; N f ; B 109 0 663 604 ; -C 103 ; WX 600 ; N g ; B 105 -186 647 431 ; -C 104 ; WX 600 ; N h ; B 55 0 556 604 ; -C 105 ; WX 600 ; N i ; B 96 0 513 624 ; -C 106 ; WX 600 ; N j ; B 112 -186 547 624 ; -C 107 ; WX 600 ; N k ; B 67 0 578 604 ; -C 108 ; WX 600 ; N l ; B 96 0 513 604 ; -C 109 ; WX 600 ; N m ; B 15 0 603 431 ; -C 110 ; WX 600 ; N n ; B 57 0 546 431 ; -C 111 ; WX 600 ; N o ; B 111 -16 577 431 ; -C 112 ; WX 600 ; N p ; B -13 -186 593 431 ; -C 113 ; WX 600 ; N q ; B 105 -186 668 431 ; -C 114 ; WX 600 ; N r ; B 88 0 619 427 ; -C 115 ; WX 600 ; N s ; B 108 -16 558 431 ; -C 116 ; WX 600 ; N t ; B 127 -16 518 563 ; -C 117 ; WX 600 ; N u ; B 127 -16 569 417 ; -C 118 ; WX 600 ; N v ; B 114 0 655 417 ; -C 119 ; WX 600 ; N w ; B 114 0 655 417 ; -C 120 ; WX 600 ; N x ; B 55 0 611 417 ; -C 121 ; WX 600 ; N y ; B 22 -186 634 417 ; -C 122 ; WX 600 ; N z ; B 115 0 563 417 ; -C 123 ; WX 600 ; N braceleft ; B 248 -124 528 604 ; -C 124 ; WX 600 ; N bar ; B 257 -124 444 604 ; -C 125 ; WX 600 ; N braceright ; B 175 -124 455 604 ; -C 126 ; WX 600 ; N asciitilde ; B 145 212 575 348 ; -C 161 ; WX 600 ; N exclamdown ; B 222 -216 439 417 ; -C 162 ; WX 600 ; N cent ; B 175 -13 563 630 ; -C 163 ; WX 600 ; N sterling ; B 90 0 541 578 ; -C 164 ; WX 600 ; N fraction ; B 84 139 645 470 ; -C 165 ; WX 600 ; N yen ; B 161 0 665 563 ; -C 166 ; WX 600 ; N florin ; B 74 -93 643 618 ; -C 167 ; WX 600 ; N section ; B 91 -62 624 603 ; -C 168 ; WX 600 ; N currency ; B 127 95 597 489 ; -C 169 ; WX 600 ; N quotesingle ; B 344 315 492 604 ; -C 170 ; WX 600 ; N quotedblleft ; B 221 343 586 604 ; -C 171 ; WX 600 ; N guillemotleft ; B 108 0 626 417 ; -C 172 ; WX 600 ; N guilsinglleft ; B 108 0 397 417 ; -C 173 ; WX 600 ; N guilsinglright ; B 297 0 585 417 ; -C 174 ; WX 600 ; N fi ; B 14 0 615 624 ; -C 175 ; WX 600 ; N fl ; B 14 0 611 604 ; -C 177 ; WX 600 ; N endash ; B 131 261 588 302 ; -C 178 ; WX 600 ; N dagger ; B 208 -63 561 604 ; -C 179 ; WX 600 ; N daggerdbl ; B 154 -62 561 604 ; -C 180 ; WX 600 ; N periodcentered ; B 285 217 436 348 ; -C 182 ; WX 600 ; N paragraph ; B 152 -62 648 604 ; -C 183 ; WX 600 ; N bullet ; B 253 141 449 337 ; -C 184 ; WX 600 ; N quotesinglbase ; B 110 -145 371 145 ; -C 185 ; WX 600 ; N quotedblbase ; B 73 -116 538 145 ; -C 186 ; WX 600 ; N quotedblright ; B 170 343 635 604 ; -C 187 ; WX 600 ; N guillemotright ; B 67 0 585 417 ; -C 188 ; WX 600 ; N ellipsis ; B 57 -15 556 85 ; -C 189 ; WX 600 ; N perthousand ; B 91 -9 598 614 ; -C 191 ; WX 600 ; N questiondown ; B 105 -175 455 417 ; -C 193 ; WX 600 ; N grave ; B 286 490 429 639 ; -C 194 ; WX 600 ; N acute ; B 388 490 577 639 ; -C 195 ; WX 600 ; N circumflex ; B 263 490 554 639 ; -C 196 ; WX 600 ; N tilde ; B 258 516 579 605 ; -C 197 ; WX 600 ; N macron ; B 273 536 564 576 ; -C 198 ; WX 600 ; N breve ; B 281 490 573 620 ; -C 199 ; WX 600 ; N dotaccent ; B 368 511 469 612 ; -C 200 ; WX 600 ; N dieresis ; B 258 511 580 612 ; -C 202 ; WX 600 ; N ring ; B 326 480 516 661 ; -C 203 ; WX 600 ; N cedilla ; B 181 -173 356 0 ; -C 205 ; WX 600 ; N hungarumlaut ; B 263 490 576 633 ; -C 206 ; WX 600 ; N ogonek ; B 258 -155 408 0 ; -C 207 ; WX 600 ; N caron ; B 286 490 577 639 ; -C 208 ; WX 600 ; N emdash ; B 60 261 659 302 ; -C 225 ; WX 600 ; N AE ; B 14 0 690 563 ; -C 227 ; WX 600 ; N ordfeminine ; B 229 279 511 574 ; -C 232 ; WX 600 ; N Lslash ; B 66 0 586 563 ; -C 233 ; WX 600 ; N Oslash ; B 34 -43 685 605 ; -C 234 ; WX 600 ; N OE ; B 62 0 690 563 ; -C 235 ; WX 600 ; N ordmasculine ; B 243 284 543 577 ; -C 241 ; WX 600 ; N ae ; B 36 -16 630 431 ; -C 245 ; WX 600 ; N dotlessi ; B 96 0 513 417 ; -C 248 ; WX 600 ; N lslash ; B 96 0 524 604 ; -C 249 ; WX 600 ; N oslash ; B 47 -43 637 458 ; -C 250 ; WX 600 ; N oe ; B 50 -16 630 431 ; -C 251 ; WX 600 ; N germandbls ; B 47 -16 539 604 ; -C -1 ; WX 600 ; N Yacute ; B 153 0 665 789 ; -C -1 ; WX 600 ; N Ucircumflex ; B 136 -16 676 789 ; -C -1 ; WX 600 ; N Ugrave ; B 136 -16 676 789 ; -C -1 ; WX 600 ; N Zcaron ; B 103 0 605 789 ; -C -1 ; WX 600 ; N Ydieresis ; B 153 0 665 762 ; -C -1 ; WX 600 ; N threesuperior ; B 245 251 516 612 ; -C -1 ; WX 600 ; N Uacute ; B 136 -16 676 789 ; -C -1 ; WX 600 ; N twosuperior ; B 230 259 514 612 ; -C -1 ; WX 600 ; N Udieresis ; B 136 -16 676 762 ; -C -1 ; WX 600 ; N middot ; B 285 217 436 348 ; -C -1 ; WX 600 ; N onesuperior ; B 249 259 469 612 ; -C -1 ; WX 600 ; N aacute ; B 93 -16 546 639 ; -C -1 ; WX 600 ; N agrave ; B 93 -16 546 639 ; -C -1 ; WX 600 ; N acircumflex ; B 93 -16 546 639 ; -C -1 ; WX 600 ; N Scaron ; B 96 -16 618 789 ; -C -1 ; WX 600 ; N Otilde ; B 103 -16 618 755 ; -C -1 ; WX 600 ; N sfthyphen ; B 131 258 588 299 ; -C -1 ; WX 600 ; N atilde ; B 93 -16 570 605 ; -C -1 ; WX 600 ; N aring ; B 93 -16 546 661 ; -C -1 ; WX 600 ; N adieresis ; B 93 -16 570 612 ; -C -1 ; WX 600 ; N Ograve ; B 102 -16 616 789 ; -C -1 ; WX 600 ; N Ocircumflex ; B 102 -16 616 789 ; -C -1 ; WX 600 ; N Odieresis ; B 102 -16 616 762 ; -C -1 ; WX 600 ; N Ntilde ; B 46 0 678 755 ; -C -1 ; WX 600 ; N edieresis ; B 104 -16 585 612 ; -C -1 ; WX 600 ; N eacute ; B 104 -16 570 639 ; -C -1 ; WX 600 ; N egrave ; B 104 -16 570 639 ; -C -1 ; WX 600 ; N Icircumflex ; B 117 0 603 789 ; -C -1 ; WX 600 ; N ecircumflex ; B 104 -16 570 639 ; -C -1 ; WX 600 ; N Igrave ; B 117 0 603 789 ; -C -1 ; WX 600 ; N Iacute ; B 117 0 603 789 ; -C -1 ; WX 600 ; N Idieresis ; B 117 0 611 762 ; -C -1 ; WX 600 ; N degree ; B 257 346 553 636 ; -C -1 ; WX 600 ; N Ecircumflex ; B 47 0 619 789 ; -C -1 ; WX 600 ; N minus ; B 131 261 588 302 ; -C -1 ; WX 600 ; N multiply ; B 143 100 577 464 ; -C -1 ; WX 600 ; N divide ; B 131 25 588 541 ; -C -1 ; WX 600 ; N Egrave ; B 47 0 619 789 ; -C -1 ; WX 600 ; N trademark ; B 90 243 710 563 ; -C -1 ; WX 600 ; N Oacute ; B 102 -16 616 789 ; -C -1 ; WX 600 ; N thorn ; B -13 -186 593 590 ; -C -1 ; WX 600 ; N eth ; B 111 -17 582 620 ; -C -1 ; WX 600 ; N Eacute ; B 47 0 619 789 ; -C -1 ; WX 600 ; N ccedilla ; B 122 -173 596 431 ; -C -1 ; WX 600 ; N idieresis ; B 96 0 567 612 ; -C -1 ; WX 600 ; N iacute ; B 96 0 535 639 ; -C -1 ; WX 600 ; N igrave ; B 96 0 513 639 ; -C -1 ; WX 600 ; N plusminus ; B 76 0 597 529 ; -C -1 ; WX 600 ; N onehalf ; B 82 0 627 612 ; -C -1 ; WX 600 ; N onequarter ; B 74 0 619 612 ; -C -1 ; WX 600 ; N threequarters ; B 70 0 619 612 ; -C -1 ; WX 600 ; N icircumflex ; B 95 0 536 639 ; -C -1 ; WX 600 ; N Edieresis ; B 47 0 619 762 ; -C -1 ; WX 600 ; N ntilde ; B 57 0 570 605 ; -C -1 ; WX 600 ; N Aring ; B 13 0 596 811 ; -C -1 ; WX 600 ; N odieresis ; B 111 -16 580 612 ; -C -1 ; WX 600 ; N oacute ; B 111 -16 577 639 ; -C -1 ; WX 600 ; N ograve ; B 111 -16 577 639 ; -C -1 ; WX 600 ; N ocircumflex ; B 111 -16 577 639 ; -C -1 ; WX 600 ; N otilde ; B 111 -16 586 605 ; -C -1 ; WX 600 ; N scaron ; B 107 -16 584 639 ; -C -1 ; WX 600 ; N udieresis ; B 127 -16 572 612 ; -C -1 ; WX 600 ; N uacute ; B 127 -16 569 639 ; -C -1 ; WX 600 ; N ugrave ; B 127 -16 569 639 ; -C -1 ; WX 600 ; N ucircumflex ; B 127 -16 569 639 ; -C -1 ; WX 600 ; N yacute ; B 22 -186 634 639 ; -C -1 ; WX 600 ; N zcaron ; B 115 0 576 639 ; -C -1 ; WX 600 ; N ydieresis ; B 22 -186 634 612 ; -C -1 ; WX 600 ; N copyright ; B 57 -15 663 578 ; -C -1 ; WX 600 ; N registered ; B 57 -15 663 578 ; -C -1 ; WX 600 ; N Atilde ; B 13 0 596 755 ; -C -1 ; WX 600 ; N nbspace ; B 319 0 319 0 ; -C -1 ; WX 600 ; N Ccedilla ; B 110 -173 635 576 ; -C -1 ; WX 600 ; N Acircumflex ; B 13 0 596 789 ; -C -1 ; WX 600 ; N Agrave ; B 13 0 596 789 ; -C -1 ; WX 600 ; N logicalnot ; B 160 168 621 438 ; -C -1 ; WX 600 ; N Aacute ; B 13 0 596 789 ; -C -1 ; WX 600 ; N Eth ; B 47 0 592 563 ; -C -1 ; WX 600 ; N brokenbar ; B 257 -124 444 604 ; -C -1 ; WX 600 ; N Thorn ; B 47 0 566 563 ; -C -1 ; WX 600 ; N Adieresis ; B 13 0 596 762 ; -C -1 ; WX 600 ; N mu ; B 86 -200 569 417 ; -C -1 ; WX 600 ; N .notdef ; B 319 0 319 0 ; -EndCharMetrics -EndFontMetrics diff --git a/misc/gs_afm/Helv.afm b/misc/gs_afm/Helv.afm deleted file mode 100644 index 56de4d61bb..0000000000 --- a/misc/gs_afm/Helv.afm +++ /dev/null @@ -1,1257 +0,0 @@ -StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 8/3/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. -FontName NimbusSanL-ReguCond -FullName Nimbus Sans L Regular Condensed -FamilyName Nimbus Sans L -Weight Regular -ItalicAngle 0.0 -IsFixedPitch false -UnderlinePosition -100 -UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW -EncodingScheme AdobeStandardEncoding -FontBBox -136 -225 820 944 -CapHeight 718 -XHeight 523 -Descender -207 -Ascender 718 -StartCharMetrics 232 -C 32 ; WX 228 ; N space ; B 21 0 21 0 ; -C 33 ; WX 228 ; N exclam ; B 74 0 153 718 ; -C 34 ; WX 291 ; N quotedbl ; B 57 463 234 718 ; -C 35 ; WX 456 ; N numbersign ; B 23 0 434 688 ; -C 36 ; WX 456 ; N dollar ; B 26 -115 426 775 ; -C 37 ; WX 729 ; N percent ; B 32 -19 697 703 ; -C 38 ; WX 547 ; N ampersand ; B 36 -15 529 718 ; -C 39 ; WX 182 ; N quoteright ; B 43 462 129 718 ; -C 40 ; WX 273 ; N parenleft ; B 56 -207 245 733 ; -C 41 ; WX 273 ; N parenright ; B 28 -207 217 733 ; -C 42 ; WX 319 ; N asterisk ; B 32 431 286 718 ; -C 43 ; WX 479 ; N plus ; B 32 0 447 505 ; -C 44 ; WX 228 ; N comma ; B 71 -147 157 107 ; -C 45 ; WX 273 ; N hyphen ; B 36 232 237 322 ; -C 46 ; WX 228 ; N period ; B 71 0 157 107 ; -C 47 ; WX 228 ; N slash ; B -14 -19 242 737 ; -C 48 ; WX 456 ; N zero ; B 30 -19 426 703 ; -C 49 ; WX 456 ; N one ; B 83 0 294 703 ; -C 50 ; WX 456 ; N two ; B 21 0 416 703 ; -C 51 ; WX 456 ; N three ; B 28 -19 428 703 ; -C 52 ; WX 456 ; N four ; B 20 0 429 703 ; -C 53 ; WX 456 ; N five ; B 26 -19 421 688 ; -C 54 ; WX 456 ; N six ; B 31 -19 425 703 ; -C 55 ; WX 456 ; N seven ; B 30 0 429 688 ; -C 56 ; WX 456 ; N eight ; B 31 -19 424 703 ; -C 57 ; WX 456 ; N nine ; B 34 -19 421 703 ; -C 58 ; WX 228 ; N colon ; B 71 0 157 516 ; -C 59 ; WX 228 ; N semicolon ; B 71 -147 157 516 ; -C 60 ; WX 479 ; N less ; B 39 10 440 496 ; -C 61 ; WX 479 ; N equal ; B 32 115 447 390 ; -C 62 ; WX 479 ; N greater ; B 39 10 440 496 ; -C 63 ; WX 456 ; N question ; B 46 0 403 727 ; -C 64 ; WX 832 ; N at ; B 121 -19 712 737 ; -C 65 ; WX 547 ; N A ; B 11 0 536 718 ; -C 66 ; WX 547 ; N B ; B 61 0 514 718 ; -C 67 ; WX 592 ; N C ; B 36 -19 558 737 ; -C 68 ; WX 592 ; N D ; B 66 0 553 718 ; -C 69 ; WX 547 ; N E ; B 71 0 505 718 ; -C 70 ; WX 501 ; N F ; B 71 0 478 718 ; -C 71 ; WX 638 ; N G ; B 39 -19 577 737 ; -C 72 ; WX 592 ; N H ; B 63 0 530 718 ; -C 73 ; WX 228 ; N I ; B 75 0 154 718 ; -C 74 ; WX 410 ; N J ; B 14 -19 351 718 ; -C 75 ; WX 547 ; N K ; B 62 0 544 718 ; -C 76 ; WX 456 ; N L ; B 62 0 440 718 ; -C 77 ; WX 683 ; N M ; B 60 0 624 718 ; -C 78 ; WX 592 ; N N ; B 62 0 530 718 ; -C 79 ; WX 638 ; N O ; B 32 -19 606 737 ; -C 80 ; WX 547 ; N P ; B 71 0 510 718 ; -C 81 ; WX 638 ; N Q ; B 32 -56 606 737 ; -C 82 ; WX 592 ; N R ; B 72 0 561 718 ; -C 83 ; WX 547 ; N S ; B 40 -19 508 737 ; -C 84 ; WX 501 ; N T ; B 11 0 490 718 ; -C 85 ; WX 592 ; N U ; B 65 -19 528 718 ; -C 86 ; WX 547 ; N V ; B 16 0 531 718 ; -C 87 ; WX 774 ; N W ; B 13 0 761 718 ; -C 88 ; WX 547 ; N X ; B 16 0 531 718 ; -C 89 ; WX 547 ; N Y ; B 11 0 535 718 ; -C 90 ; WX 501 ; N Z ; B 19 0 482 718 ; -C 91 ; WX 228 ; N bracketleft ; B 52 -196 205 722 ; -C 92 ; WX 228 ; N backslash ; B -14 -19 242 737 ; -C 93 ; WX 228 ; N bracketright ; B 23 -196 176 722 ; -C 94 ; WX 385 ; N asciicircum ; B -11 264 396 688 ; -C 95 ; WX 456 ; N underscore ; B 0 -125 456 -75 ; -C 96 ; WX 182 ; N quoteleft ; B 53 469 139 725 ; -C 97 ; WX 456 ; N a ; B 30 -15 435 538 ; -C 98 ; WX 456 ; N b ; B 48 -15 424 718 ; -C 99 ; WX 410 ; N c ; B 25 -15 391 538 ; -C 100 ; WX 456 ; N d ; B 29 -15 409 718 ; -C 101 ; WX 456 ; N e ; B 33 -15 423 538 ; -C 102 ; WX 228 ; N f ; B 11 0 215 728 ; -C 103 ; WX 456 ; N g ; B 33 -220 409 538 ; -C 104 ; WX 456 ; N h ; B 53 0 403 718 ; -C 105 ; WX 182 ; N i ; B 55 0 127 718 ; -C 106 ; WX 182 ; N j ; B -13 -210 127 718 ; -C 107 ; WX 410 ; N k ; B 55 0 411 718 ; -C 108 ; WX 182 ; N l ; B 55 0 127 718 ; -C 109 ; WX 683 ; N m ; B 53 0 631 538 ; -C 110 ; WX 456 ; N n ; B 53 0 403 538 ; -C 111 ; WX 456 ; N o ; B 29 -14 427 538 ; -C 112 ; WX 456 ; N p ; B 48 -207 424 538 ; -C 113 ; WX 456 ; N q ; B 29 -207 405 538 ; -C 114 ; WX 273 ; N r ; B 63 0 272 538 ; -C 115 ; WX 410 ; N s ; B 26 -15 380 538 ; -C 116 ; WX 228 ; N t ; B 11 -7 211 669 ; -C 117 ; WX 456 ; N u ; B 56 -15 401 523 ; -C 118 ; WX 410 ; N v ; B 7 0 403 523 ; -C 119 ; WX 592 ; N w ; B 11 0 581 523 ; -C 120 ; WX 410 ; N x ; B 9 0 402 523 ; -C 121 ; WX 410 ; N y ; B 9 -214 401 523 ; -C 122 ; WX 410 ; N z ; B 25 0 385 523 ; -C 123 ; WX 274 ; N braceleft ; B 34 -196 239 722 ; -C 124 ; WX 213 ; N bar ; B 77 -19 137 737 ; -C 125 ; WX 274 ; N braceright ; B 34 -196 239 722 ; -C 126 ; WX 479 ; N asciitilde ; B 50 181 429 322 ; -C 161 ; WX 273 ; N exclamdown ; B 97 -195 176 523 ; -C 162 ; WX 456 ; N cent ; B 42 -115 421 623 ; -C 163 ; WX 456 ; N sterling ; B 27 -16 442 718 ; -C 164 ; WX 137 ; N fraction ; B -136 -19 273 703 ; -C 165 ; WX 456 ; N yen ; B 2 0 453 688 ; -C 166 ; WX 456 ; N florin ; B -9 -207 411 737 ; -C 167 ; WX 456 ; N section ; B 35 -191 420 737 ; -C 168 ; WX 456 ; N currency ; B 23 99 433 603 ; -C 169 ; WX 157 ; N quotesingle ; B 48 463 108 718 ; -C 170 ; WX 273 ; N quotedblleft ; B 31 469 252 725 ; -C 171 ; WX 456 ; N guillemotleft ; B 80 108 376 446 ; -C 172 ; WX 273 ; N guilsinglleft ; B 72 108 201 446 ; -C 173 ; WX 273 ; N guilsinglright ; B 72 108 201 446 ; -C 174 ; WX 410 ; N fi ; B 11 0 356 728 ; -C 175 ; WX 410 ; N fl ; B 11 0 354 728 ; -C 177 ; WX 456 ; N endash ; B 0 240 456 313 ; -C 178 ; WX 456 ; N dagger ; B 35 -159 421 718 ; -C 179 ; WX 456 ; N daggerdbl ; B 35 -159 421 718 ; -C 180 ; WX 228 ; N periodcentered ; B 63 190 166 315 ; -C 182 ; WX 440 ; N paragraph ; B 15 -173 408 718 ; -C 183 ; WX 287 ; N bullet ; B 15 202 273 517 ; -C 184 ; WX 182 ; N quotesinglbase ; B 43 -149 129 107 ; -C 185 ; WX 273 ; N quotedblbase ; B 21 -149 242 107 ; -C 186 ; WX 273 ; N quotedblright ; B 21 462 242 718 ; -C 187 ; WX 456 ; N guillemotright ; B 80 108 376 446 ; -C 188 ; WX 820 ; N ellipsis ; B 94 0 726 107 ; -C 189 ; WX 820 ; N perthousand ; B 6 -19 815 703 ; -C 191 ; WX 501 ; N questiondown ; B 75 -201 432 525 ; -C 193 ; WX 273 ; N grave ; B 11 593 173 734 ; -C 194 ; WX 273 ; N acute ; B 100 593 262 734 ; -C 195 ; WX 273 ; N circumflex ; B 17 593 256 734 ; -C 196 ; WX 273 ; N tilde ; B -3 606 276 722 ; -C 197 ; WX 273 ; N macron ; B 8 627 265 684 ; -C 198 ; WX 273 ; N breve ; B 11 595 263 731 ; -C 199 ; WX 273 ; N dotaccent ; B 99 604 174 706 ; -C 200 ; WX 273 ; N dieresis ; B 33 604 240 706 ; -C 202 ; WX 273 ; N ring ; B 61 572 212 756 ; -C 203 ; WX 273 ; N cedilla ; B 37 -225 212 0 ; -C 205 ; WX 273 ; N hungarumlaut ; B 25 593 335 734 ; -C 206 ; WX 273 ; N ogonek ; B 60 -225 235 0 ; -C 207 ; WX 273 ; N caron ; B 17 593 256 734 ; -C 208 ; WX 820 ; N emdash ; B 0 240 820 313 ; -C 225 ; WX 820 ; N AE ; B 7 0 780 718 ; -C 227 ; WX 303 ; N ordfeminine ; B 20 304 284 737 ; -C 232 ; WX 456 ; N Lslash ; B -16 0 440 718 ; -C 233 ; WX 638 ; N Oslash ; B 32 -19 607 737 ; -C 234 ; WX 820 ; N OE ; B 30 -19 791 737 ; -C 235 ; WX 299 ; N ordmasculine ; B 20 304 280 737 ; -C 241 ; WX 729 ; N ae ; B 30 -15 695 538 ; -C 245 ; WX 228 ; N dotlessi ; B 78 0 150 523 ; -C 248 ; WX 182 ; N lslash ; B -16 0 198 718 ; -C 249 ; WX 501 ; N oslash ; B 23 -22 440 545 ; -C 250 ; WX 774 ; N oe ; B 29 -15 740 538 ; -C 251 ; WX 501 ; N germandbls ; B 55 -15 468 728 ; -C -1 ; WX 547 ; N Yacute ; B 11 0 535 929 ; -C -1 ; WX 592 ; N Ucircumflex ; B 65 -19 528 929 ; -C -1 ; WX 592 ; N Ugrave ; B 65 -19 528 929 ; -C -1 ; WX 501 ; N Zcaron ; B 19 0 482 929 ; -C -1 ; WX 547 ; N Ydieresis ; B 11 0 535 901 ; -C -1 ; WX 273 ; N threesuperior ; B 4 270 266 714 ; -C -1 ; WX 592 ; N Uacute ; B 65 -19 528 929 ; -C -1 ; WX 273 ; N twosuperior ; B 3 280 265 714 ; -C -1 ; WX 592 ; N Udieresis ; B 65 -19 528 901 ; -C -1 ; WX 228 ; N middot ; B 63 190 166 315 ; -C -1 ; WX 273 ; N onesuperior ; B 35 281 182 703 ; -C -1 ; WX 456 ; N aacute ; B 30 -15 435 734 ; -C -1 ; WX 456 ; N agrave ; B 30 -15 435 734 ; -C -1 ; WX 456 ; N acircumflex ; B 30 -15 435 734 ; -C -1 ; WX 547 ; N Scaron ; B 40 -19 508 929 ; -C -1 ; WX 638 ; N Otilde ; B 32 -19 606 917 ; -C -1 ; WX 273 ; N sfthyphen ; B 36 232 237 322 ; -C -1 ; WX 456 ; N atilde ; B 30 -15 435 722 ; -C -1 ; WX 456 ; N aring ; B 30 -15 435 769 ; -C -1 ; WX 456 ; N adieresis ; B 30 -15 435 706 ; -C -1 ; WX 638 ; N Ograve ; B 32 -19 606 929 ; -C -1 ; WX 638 ; N Ocircumflex ; B 32 -19 606 929 ; -C -1 ; WX 638 ; N Odieresis ; B 32 -19 606 901 ; -C -1 ; WX 592 ; N Ntilde ; B 62 0 530 917 ; -C -1 ; WX 456 ; N edieresis ; B 33 -15 423 706 ; -C -1 ; WX 456 ; N eacute ; B 33 -15 423 734 ; -C -1 ; WX 456 ; N egrave ; B 33 -15 423 734 ; -C -1 ; WX 228 ; N Icircumflex ; B -5 0 234 929 ; -C -1 ; WX 456 ; N ecircumflex ; B 33 -15 423 734 ; -C -1 ; WX 228 ; N Igrave ; B -11 0 153 929 ; -C -1 ; WX 228 ; N Iacute ; B 75 0 240 903 ; -C -1 ; WX 228 ; N Idieresis ; B 11 0 218 901 ; -C -1 ; WX 328 ; N degree ; B 44 411 284 703 ; -C -1 ; WX 547 ; N Ecircumflex ; B 71 0 505 929 ; -C -1 ; WX 479 ; N minus ; B 32 216 447 289 ; -C -1 ; WX 479 ; N multiply ; B 32 0 447 506 ; -C -1 ; WX 479 ; N divide ; B 32 -19 447 524 ; -C -1 ; WX 547 ; N Egrave ; B 71 0 505 929 ; -C -1 ; WX 820 ; N trademark ; B 38 306 740 718 ; -C -1 ; WX 638 ; N Oacute ; B 32 -19 606 929 ; -C -1 ; WX 456 ; N thorn ; B 48 -207 424 718 ; -C -1 ; WX 456 ; N eth ; B 29 -15 428 737 ; -C -1 ; WX 547 ; N Eacute ; B 71 0 505 929 ; -C -1 ; WX 410 ; N ccedilla ; B 25 -225 391 538 ; -C -1 ; WX 228 ; N idieresis ; B 11 0 218 706 ; -C -1 ; WX 228 ; N iacute ; B 78 0 240 734 ; -C -1 ; WX 228 ; N igrave ; B -11 0 151 734 ; -C -1 ; WX 479 ; N plusminus ; B 32 0 447 561 ; -C -1 ; WX 684 ; N onehalf ; B 35 -19 634 703 ; -C -1 ; WX 684 ; N onequarter ; B 60 -19 620 703 ; -C -1 ; WX 684 ; N threequarters ; B 37 -19 664 714 ; -C -1 ; WX 228 ; N icircumflex ; B -5 0 234 734 ; -C -1 ; WX 547 ; N Edieresis ; B 71 0 505 901 ; -C -1 ; WX 456 ; N ntilde ; B 53 0 403 722 ; -C -1 ; WX 547 ; N Aring ; B 11 0 536 944 ; -C -1 ; WX 456 ; N odieresis ; B 29 -14 427 706 ; -C -1 ; WX 456 ; N oacute ; B 29 -14 427 734 ; -C -1 ; WX 456 ; N ograve ; B 29 -14 427 734 ; -C -1 ; WX 456 ; N ocircumflex ; B 29 -14 427 734 ; -C -1 ; WX 456 ; N otilde ; B 29 -14 427 722 ; -C -1 ; WX 410 ; N scaron ; B 26 -15 380 734 ; -C -1 ; WX 456 ; N udieresis ; B 56 -15 401 706 ; -C -1 ; WX 456 ; N uacute ; B 56 -15 401 734 ; -C -1 ; WX 456 ; N ugrave ; B 56 -15 401 734 ; -C -1 ; WX 456 ; N ucircumflex ; B 56 -15 401 734 ; -C -1 ; WX 410 ; N yacute ; B 9 -214 401 734 ; -C -1 ; WX 410 ; N zcaron ; B 25 0 385 734 ; -C -1 ; WX 410 ; N ydieresis ; B 9 -214 401 706 ; -C -1 ; WX 604 ; N copyright ; B -11 -19 617 737 ; -C -1 ; WX 604 ; N registered ; B -11 -19 617 737 ; -C -1 ; WX 547 ; N Atilde ; B 11 0 536 917 ; -C -1 ; WX 228 ; N nbspace ; B 21 0 21 0 ; -C -1 ; WX 592 ; N Ccedilla ; B 36 -225 558 737 ; -C -1 ; WX 547 ; N Acircumflex ; B 11 0 536 929 ; -C -1 ; WX 547 ; N Agrave ; B 11 0 536 929 ; -C -1 ; WX 479 ; N logicalnot ; B 32 108 447 390 ; -C -1 ; WX 547 ; N Aacute ; B 11 0 536 929 ; -C -1 ; WX 592 ; N Eth ; B 0 0 553 718 ; -C -1 ; WX 213 ; N brokenbar ; B 77 -19 137 737 ; -C -1 ; WX 547 ; N Thorn ; B 71 0 510 718 ; -C -1 ; WX 547 ; N Adieresis ; B 11 0 536 901 ; -C -1 ; WX 456 ; N mu ; B 56 -207 401 523 ; -C -1 ; WX 228 ; N .notdef ; B 21 0 21 0 ; -EndCharMetrics -StartKernData -StartKernPairs 998 -KPX A C -28 -KPX A Ccedilla -29 -KPX A G -30 -KPX A O -28 -KPX A Odieresis -28 -KPX A Q -28 -KPX A T -74 -KPX A U -29 -KPX A Uacute -29 -KPX A Ucircumflex -29 -KPX A Udieresis -29 -KPX A Ugrave -29 -KPX A V -56 -KPX A W -39 -KPX A Y -78 -KPX A a -3 -KPX A b 0 -KPX A c -10 -KPX A ccedilla -11 -KPX A comma 5 -KPX A d -11 -KPX A e -14 -KPX A g -14 -KPX A guillemotleft -40 -KPX A guilsinglleft -36 -KPX A hyphen -2 -KPX A o -14 -KPX A period 5 -KPX A q -11 -KPX A quotedblright -37 -KPX A quoteright -48 -KPX A t -15 -KPX A u -12 -KPX A v -27 -KPX A w -21 -KPX A y -28 -KPX Aacute C -28 -KPX Aacute G -30 -KPX Aacute O -28 -KPX Aacute Q -28 -KPX Aacute T -74 -KPX Aacute U -29 -KPX Aacute V -56 -KPX Aacute W -39 -KPX Aacute Y -78 -KPX Aacute a -3 -KPX Aacute b 0 -KPX Aacute c -10 -KPX Aacute comma 5 -KPX Aacute d -11 -KPX Aacute e -14 -KPX Aacute g -14 -KPX Aacute guillemotleft -40 -KPX Aacute guilsinglleft -36 -KPX Aacute hyphen -2 -KPX Aacute o -14 -KPX Aacute period 5 -KPX Aacute q -11 -KPX Aacute quoteright -48 -KPX Aacute t -15 -KPX Aacute u -12 -KPX Aacute v -27 -KPX Aacute w -21 -KPX Aacute y -28 -KPX Acircumflex C -28 -KPX Acircumflex G -30 -KPX Acircumflex O -28 -KPX Acircumflex Q -28 -KPX Acircumflex T -74 -KPX Acircumflex U -29 -KPX Acircumflex V -56 -KPX Acircumflex W -39 -KPX Acircumflex Y -78 -KPX Acircumflex comma 5 -KPX Acircumflex period 5 -KPX Adieresis C -28 -KPX Adieresis G -30 -KPX Adieresis O -28 -KPX Adieresis Q -28 -KPX Adieresis T -74 -KPX Adieresis U -29 -KPX Adieresis V -56 -KPX Adieresis W -39 -KPX Adieresis Y -78 -KPX Adieresis a -3 -KPX Adieresis b 0 -KPX Adieresis c -10 -KPX Adieresis comma 5 -KPX Adieresis d -11 -KPX Adieresis g -14 -KPX Adieresis guillemotleft -40 -KPX Adieresis guilsinglleft -36 -KPX Adieresis hyphen -2 -KPX Adieresis o -14 -KPX Adieresis period 5 -KPX Adieresis q -11 -KPX Adieresis quotedblright -37 -KPX Adieresis quoteright -48 -KPX Adieresis t -15 -KPX Adieresis u -12 -KPX Adieresis v -27 -KPX Adieresis w -21 -KPX Adieresis y -28 -KPX Agrave C -28 -KPX Agrave G -30 -KPX Agrave O -28 -KPX Agrave Q -28 -KPX Agrave T -74 -KPX Agrave U -29 -KPX Agrave V -56 -KPX Agrave W -39 -KPX Agrave Y -78 -KPX Agrave comma 5 -KPX Agrave period 5 -KPX Aring C -28 -KPX Aring G -30 -KPX Aring O -28 -KPX Aring Q -28 -KPX Aring T -74 -KPX Aring U -29 -KPX Aring V -56 -KPX Aring W -39 -KPX Aring Y -78 -KPX Aring a -3 -KPX Aring b 0 -KPX Aring c -10 -KPX Aring comma 5 -KPX Aring d -11 -KPX Aring e -14 -KPX Aring g -14 -KPX Aring guillemotleft -40 -KPX Aring guilsinglleft -36 -KPX Aring hyphen -2 -KPX Aring o -14 -KPX Aring period 5 -KPX Aring q -11 -KPX Aring quotedblright -37 -KPX Aring quoteright -48 -KPX Aring t -15 -KPX Aring u -12 -KPX Aring v -27 -KPX Aring w -21 -KPX Aring y -28 -KPX Atilde C -28 -KPX Atilde G -30 -KPX Atilde O -28 -KPX Atilde Q -28 -KPX Atilde T -74 -KPX Atilde U -29 -KPX Atilde V -56 -KPX Atilde W -39 -KPX Atilde Y -78 -KPX Atilde comma 5 -KPX Atilde period 5 -KPX B A -15 -KPX B AE -14 -KPX B Aacute -15 -KPX B Acircumflex -15 -KPX B Adieresis -15 -KPX B Aring -15 -KPX B Atilde -15 -KPX B O -3 -KPX B OE 0 -KPX B Oacute -3 -KPX B Ocircumflex -3 -KPX B Odieresis -3 -KPX B Ograve -3 -KPX B Oslash 0 -KPX B V -25 -KPX B W -15 -KPX B Y -31 -KPX C A -25 -KPX C AE -24 -KPX C Aacute -25 -KPX C Adieresis -25 -KPX C Aring -25 -KPX C H -6 -KPX C K -5 -KPX C O -4 -KPX C Oacute -4 -KPX C Odieresis -4 -KPX Ccedilla A -28 -KPX D A -33 -KPX D Aacute -33 -KPX D Acircumflex -33 -KPX D Adieresis -33 -KPX D Agrave -33 -KPX D Aring -33 -KPX D Atilde -33 -KPX D J -1 -KPX D T -30 -KPX D V -32 -KPX D W -18 -KPX D X -38 -KPX D Y -44 -KPX F A -55 -KPX F Aacute -55 -KPX F Acircumflex -55 -KPX F Adieresis -55 -KPX F Agrave -55 -KPX F Aring -55 -KPX F Atilde -55 -KPX F J -50 -KPX F O -15 -KPX F Odieresis -15 -KPX F a -26 -KPX F aacute -26 -KPX F adieresis -26 -KPX F ae -26 -KPX F aring -26 -KPX F comma -102 -KPX F e -19 -KPX F eacute -19 -KPX F hyphen -12 -KPX F i -8 -KPX F j -8 -KPX F o -17 -KPX F oacute -17 -KPX F odieresis -17 -KPX F oe -17 -KPX F oslash -17 -KPX F period -102 -KPX F r -32 -KPX F u -28 -KPX G A -4 -KPX G AE -2 -KPX G Aacute -4 -KPX G Acircumflex -4 -KPX G Adieresis -4 -KPX G Agrave -4 -KPX G Aring -4 -KPX G Atilde -4 -KPX G T -31 -KPX G V -36 -KPX G W -20 -KPX G Y -47 -KPX J A -22 -KPX J AE -21 -KPX J Adieresis -22 -KPX J Aring -22 -KPX K C -37 -KPX K G -40 -KPX K O -37 -KPX K OE -33 -KPX K Oacute -37 -KPX K Odieresis -37 -KPX K S -27 -KPX K T 22 -KPX K a -6 -KPX K adieresis -6 -KPX K ae -6 -KPX K aring -6 -KPX K e -26 -KPX K hyphen -38 -KPX K o -26 -KPX K oacute -26 -KPX K odieresis -26 -KPX K u -21 -KPX K udieresis -21 -KPX K y -52 -KPX L A 18 -KPX L AE 20 -KPX L Aacute 18 -KPX L Adieresis 18 -KPX L Aring 18 -KPX L C -28 -KPX L Ccedilla -32 -KPX L G -31 -KPX L O -29 -KPX L Oacute -29 -KPX L Ocircumflex -29 -KPX L Odieresis -29 -KPX L Ograve -29 -KPX L Otilde -29 -KPX L S -11 -KPX L T -81 -KPX L U -25 -KPX L Udieresis -25 -KPX L V -78 -KPX L W -50 -KPX L Y -92 -KPX L hyphen -110 -KPX L quotedblright -105 -KPX L quoteright -116 -KPX L u -9 -KPX L udieresis -9 -KPX L y -47 -KPX N A -4 -KPX N AE -2 -KPX N Aacute -4 -KPX N Adieresis -4 -KPX N Aring -4 -KPX N C 1 -KPX N Ccedilla 0 -KPX N G -1 -KPX N O 1 -KPX N Oacute 1 -KPX N Odieresis 1 -KPX N a -1 -KPX N aacute -1 -KPX N adieresis -1 -KPX N ae -1 -KPX N aring -1 -KPX N comma -4 -KPX N e 1 -KPX N eacute 1 -KPX N o 1 -KPX N oacute 1 -KPX N odieresis 1 -KPX N oslash 4 -KPX N period -4 -KPX N u 0 -KPX N udieresis 0 -KPX O A -29 -KPX O AE -29 -KPX O Aacute -29 -KPX O Adieresis -29 -KPX O Aring -29 -KPX O T -27 -KPX O V -30 -KPX O W -14 -KPX O X -34 -KPX O Y -42 -KPX Oacute A -29 -KPX Oacute T -27 -KPX Oacute V -30 -KPX Oacute W -14 -KPX Oacute Y -42 -KPX Ocircumflex T -27 -KPX Ocircumflex V -30 -KPX Ocircumflex Y -42 -KPX Odieresis A -29 -KPX Odieresis T -27 -KPX Odieresis V -30 -KPX Odieresis W -14 -KPX Odieresis X -34 -KPX Odieresis Y -42 -KPX Ograve T -27 -KPX Ograve V -30 -KPX Ograve Y -42 -KPX Oslash A -27 -KPX Otilde T -27 -KPX Otilde V -30 -KPX Otilde Y -42 -KPX P A -62 -KPX P AE -64 -KPX P Aacute -62 -KPX P Adieresis -62 -KPX P Aring -62 -KPX P J -70 -KPX P a -21 -KPX P aacute -21 -KPX P adieresis -21 -KPX P ae -21 -KPX P aring -21 -KPX P comma -123 -KPX P e -24 -KPX P eacute -24 -KPX P hyphen -28 -KPX P o -24 -KPX P oacute -24 -KPX P odieresis -24 -KPX P oe -22 -KPX P oslash -22 -KPX P period -123 -KPX R C -7 -KPX R Ccedilla -7 -KPX R G -9 -KPX R O -6 -KPX R OE -3 -KPX R Oacute -6 -KPX R Odieresis -6 -KPX R T -11 -KPX R U -8 -KPX R Udieresis -8 -KPX R V -22 -KPX R W -15 -KPX R Y -28 -KPX R a -6 -KPX R aacute -6 -KPX R adieresis -6 -KPX R ae -6 -KPX R aring -6 -KPX R e -5 -KPX R eacute -5 -KPX R hyphen 4 -KPX R o -5 -KPX R oacute -5 -KPX R odieresis -5 -KPX R oe -5 -KPX R u -4 -KPX R uacute -5 -KPX R udieresis -5 -KPX R y -1 -KPX S A -15 -KPX S AE -14 -KPX S Aacute -15 -KPX S Adieresis -15 -KPX S Aring -15 -KPX S T -14 -KPX S V -25 -KPX S W -17 -KPX S Y -31 -KPX S t -2 -KPX T A -78 -KPX T AE -76 -KPX T Aacute -78 -KPX T Acircumflex -78 -KPX T Adieresis -78 -KPX T Agrave -78 -KPX T Aring -78 -KPX T Atilde -78 -KPX T C -27 -KPX T G -31 -KPX T J -80 -KPX T O -26 -KPX T OE -21 -KPX T Oacute -26 -KPX T Ocircumflex -26 -KPX T Odieresis -26 -KPX T Ograve -26 -KPX T Oslash -27 -KPX T Otilde -26 -KPX T S -15 -KPX T V 17 -KPX T W 19 -KPX T Y 19 -KPX T a -79 -KPX T ae -79 -KPX T c -73 -KPX T colon -95 -KPX T comma -80 -KPX T e -77 -KPX T g -76 -KPX T guillemotleft -100 -KPX T guilsinglleft -96 -KPX T hyphen -60 -KPX T i -2 -KPX T j -2 -KPX T o -77 -KPX T oslash -72 -KPX T period -80 -KPX T r -77 -KPX T s -74 -KPX T semicolon -93 -KPX T u -75 -KPX T v -79 -KPX T w -80 -KPX T y -79 -KPX U A -32 -KPX U AE -32 -KPX U Aacute -32 -KPX U Acircumflex -32 -KPX U Adieresis -32 -KPX U Aring -32 -KPX U Atilde -32 -KPX U comma -24 -KPX U m -1 -KPX U n -1 -KPX U p 0 -KPX U period -22 -KPX U r -6 -KPX Uacute A -32 -KPX Uacute comma -24 -KPX Uacute m -1 -KPX Uacute n -1 -KPX Uacute p 0 -KPX Uacute period -22 -KPX Uacute r -6 -KPX Ucircumflex A -32 -KPX Udieresis A -32 -KPX Udieresis b 0 -KPX Udieresis comma -24 -KPX Udieresis m -1 -KPX Udieresis n -1 -KPX Udieresis p 0 -KPX Udieresis period -22 -KPX Udieresis r -6 -KPX Ugrave A -32 -KPX V A -58 -KPX V AE -60 -KPX V Aacute -58 -KPX V Acircumflex -58 -KPX V Adieresis -58 -KPX V Agrave -58 -KPX V Aring -58 -KPX V Atilde -58 -KPX V C -30 -KPX V G -34 -KPX V O -30 -KPX V Oacute -30 -KPX V Ocircumflex -30 -KPX V Odieresis -30 -KPX V Ograve -30 -KPX V Oslash -27 -KPX V Otilde -30 -KPX V S -26 -KPX V T 18 -KPX V a -47 -KPX V ae -47 -KPX V colon -41 -KPX V comma -73 -KPX V e -46 -KPX V g -44 -KPX V guillemotleft -68 -KPX V guilsinglleft -64 -KPX V hyphen -29 -KPX V i -5 -KPX V o -46 -KPX V oslash -41 -KPX V period -73 -KPX V r -37 -KPX V semicolon -41 -KPX V u -35 -KPX V y -12 -KPX W A -42 -KPX W AE -43 -KPX W Aacute -42 -KPX W Acircumflex -42 -KPX W Adieresis -42 -KPX W Agrave -42 -KPX W Aring -42 -KPX W Atilde -42 -KPX W C -15 -KPX W G -18 -KPX W O -15 -KPX W Oacute -15 -KPX W Ocircumflex -15 -KPX W Odieresis -15 -KPX W Ograve -15 -KPX W Oslash -12 -KPX W Otilde -15 -KPX W S -19 -KPX W T 20 -KPX W a -29 -KPX W ae -29 -KPX W colon -31 -KPX W comma -46 -KPX W e -26 -KPX W g -24 -KPX W guillemotleft -48 -KPX W guilsinglleft -44 -KPX W hyphen -9 -KPX W i -3 -KPX W o -26 -KPX W oslash -21 -KPX W period -46 -KPX W r -26 -KPX W semicolon -31 -KPX W u -24 -KPX W y -2 -KPX X C -33 -KPX X O -33 -KPX X Odieresis -33 -KPX X Q -33 -KPX X a -12 -KPX X e -31 -KPX X hyphen -40 -KPX X o -31 -KPX X u -27 -KPX X y -42 -KPX Y A -80 -KPX Y AE -82 -KPX Y Aacute -80 -KPX Y Acircumflex -80 -KPX Y Adieresis -80 -KPX Y Agrave -80 -KPX Y Aring -80 -KPX Y Atilde -80 -KPX Y C -42 -KPX Y G -47 -KPX Y O -43 -KPX Y Oacute -43 -KPX Y Ocircumflex -43 -KPX Y Odieresis -43 -KPX Y Ograve -43 -KPX Y Oslash -44 -KPX Y Otilde -43 -KPX Y S -33 -KPX Y T 20 -KPX Y a -73 -KPX Y ae -73 -KPX Y colon -60 -KPX Y comma -92 -KPX Y e -74 -KPX Y g -73 -KPX Y guillemotleft -103 -KPX Y guilsinglleft -99 -KPX Y hyphen -68 -KPX Y i -3 -KPX Y o -74 -KPX Y oslash -69 -KPX Y p -48 -KPX Y period -92 -KPX Y semicolon -60 -KPX Y u -54 -KPX Y v -31 -KPX Z v -24 -KPX Z y -25 -KPX a j -6 -KPX a quoteright -10 -KPX a v -19 -KPX a w -14 -KPX a y -20 -KPX aacute v -19 -KPX aacute w -14 -KPX aacute y -20 -KPX adieresis v -19 -KPX adieresis w -14 -KPX adieresis y -20 -KPX ae v -17 -KPX ae w -11 -KPX ae y -19 -KPX agrave v -19 -KPX agrave w -14 -KPX agrave y -20 -KPX aring v -19 -KPX aring w -14 -KPX aring y -20 -KPX b v -13 -KPX b w -8 -KPX b y -15 -KPX c h 2 -KPX c k 1 -KPX comma one -83 -KPX comma quotedblright -22 -KPX comma quoteright -33 -KPX e quoteright -5 -KPX e t -9 -KPX e v -16 -KPX e w -11 -KPX e x -19 -KPX e y -18 -KPX eacute v -16 -KPX eacute w -11 -KPX eacute y -18 -KPX ecircumflex v -16 -KPX ecircumflex w -11 -KPX ecircumflex y -18 -KPX eight four 6 -KPX eight one -36 -KPX eight seven -16 -KPX f a -9 -KPX f aacute -9 -KPX f adieresis -9 -KPX f ae -9 -KPX f aring -9 -KPX f e -13 -KPX f eacute -13 -KPX f f 17 -KPX f i -5 -KPX f j -5 -KPX f l -5 -KPX f o -12 -KPX f oacute -12 -KPX f odieresis -12 -KPX f oe -12 -KPX f oslash -8 -KPX f quoteright 12 -KPX f s -4 -KPX f t 17 -KPX five four 4 -KPX five one -56 -KPX five seven -16 -KPX four four 8 -KPX four one -65 -KPX four seven -39 -KPX g a 1 -KPX g adieresis 1 -KPX g ae 1 -KPX g aring 1 -KPX g e 4 -KPX g eacute 4 -KPX g l 4 -KPX g oacute 4 -KPX g odieresis 4 -KPX g r 0 -KPX guillemotright A -42 -KPX guillemotright AE -43 -KPX guillemotright Aacute -42 -KPX guillemotright Adieresis -42 -KPX guillemotright Aring -42 -KPX guillemotright T -101 -KPX guillemotright V -68 -KPX guillemotright W -48 -KPX guillemotright Y -102 -KPX guilsinglright A -38 -KPX guilsinglright AE -39 -KPX guilsinglright Aacute -38 -KPX guilsinglright Adieresis -38 -KPX guilsinglright Aring -38 -KPX guilsinglright T -96 -KPX guilsinglright V -64 -KPX guilsinglright W -44 -KPX guilsinglright Y -98 -KPX h quoteright -3 -KPX h y -14 -KPX hyphen A -3 -KPX hyphen AE -4 -KPX hyphen Aacute -3 -KPX hyphen Adieresis -3 -KPX hyphen Aring -3 -KPX hyphen T -61 -KPX hyphen V -29 -KPX hyphen W -9 -KPX hyphen Y -67 -KPX i T -2 -KPX i j 0 -KPX k a -5 -KPX k aacute -5 -KPX k adieresis -5 -KPX k ae -5 -KPX k aring -5 -KPX k comma 1 -KPX k e -19 -KPX k eacute -19 -KPX k g -18 -KPX k hyphen -31 -KPX k o -19 -KPX k oacute -19 -KPX k odieresis -19 -KPX k period 1 -KPX k s -9 -KPX k u -3 -KPX k udieresis -3 -KPX l v -3 -KPX l y -3 -KPX m p 4 -KPX m v -13 -KPX m w -7 -KPX m y -14 -KPX n T -75 -KPX n p 4 -KPX n quoteright -3 -KPX n v -14 -KPX n w -8 -KPX n y -14 -KPX nine four 1 -KPX nine one -31 -KPX nine seven -19 -KPX o T -77 -KPX o quoteright -8 -KPX o t -7 -KPX o v -15 -KPX o w -9 -KPX o x -18 -KPX o y -17 -KPX oacute v -15 -KPX oacute w -9 -KPX oacute y -17 -KPX ocircumflex t -7 -KPX odieresis t -7 -KPX odieresis v -15 -KPX odieresis w -9 -KPX odieresis x -18 -KPX odieresis y -17 -KPX ograve v -15 -KPX ograve w -9 -KPX ograve y -17 -KPX one comma -54 -KPX one eight -46 -KPX one five -49 -KPX one four -59 -KPX one nine -47 -KPX one one -90 -KPX one period -54 -KPX one seven -64 -KPX one six -44 -KPX one three -51 -KPX one two -50 -KPX one zero -43 -KPX p t -6 -KPX p y -15 -KPX period one -83 -KPX period quotedblright -22 -KPX period quoteright -33 -KPX q c 5 -KPX q u 1 -KPX quotedblbase A 24 -KPX quotedblbase AE 25 -KPX quotedblbase T -60 -KPX quotedblbase V -53 -KPX quotedblbase W -25 -KPX quotedblbase Y -71 -KPX quotedblleft A -41 -KPX quotedblleft AE -45 -KPX quotedblleft Aacute -41 -KPX quotedblleft Adieresis -41 -KPX quotedblleft Aring -41 -KPX quotedblleft T 16 -KPX quotedblleft V 24 -KPX quotedblleft W 31 -KPX quotedblleft Y 14 -KPX quotedblright A -49 -KPX quotedblright AE -52 -KPX quotedblright Aacute -49 -KPX quotedblright Adieresis -49 -KPX quotedblright Aring -49 -KPX quotedblright T 11 -KPX quotedblright V 16 -KPX quotedblright W 23 -KPX quotedblright Y 9 -KPX quoteleft A -52 -KPX quoteleft AE -56 -KPX quoteleft Aacute -52 -KPX quoteleft Adieresis -52 -KPX quoteleft Aring -52 -KPX quoteleft T 5 -KPX quoteleft V 13 -KPX quoteleft W 20 -KPX quoteleft Y 3 -KPX quoteright A -60 -KPX quoteright AE -63 -KPX quoteright Aacute -60 -KPX quoteright Adieresis -60 -KPX quoteright Aring -60 -KPX quoteright comma -48 -KPX quoteright d -16 -KPX quoteright o -24 -KPX quoteright period -48 -KPX quoteright r -15 -KPX quoteright s -13 -KPX quoteright t -3 -KPX quoteright v 0 -KPX quoteright w 1 -KPX quoteright y 0 -KPX r a -3 -KPX r aacute -3 -KPX r acircumflex -3 -KPX r adieresis -3 -KPX r ae -3 -KPX r agrave -3 -KPX r aring -3 -KPX r c -6 -KPX r ccedilla -3 -KPX r colon -5 -KPX r comma -48 -KPX r d -3 -KPX r e -10 -KPX r eacute -10 -KPX r ecircumflex -10 -KPX r egrave -10 -KPX r f 23 -KPX r g -4 -KPX r h 2 -KPX r hyphen -30 -KPX r i 1 -KPX r j 0 -KPX r k 1 -KPX r l 1 -KPX r m 2 -KPX r n 2 -KPX r o -11 -KPX r oacute -11 -KPX r ocircumflex -11 -KPX r odieresis -11 -KPX r oe -7 -KPX r ograve -11 -KPX r oslash -7 -KPX r p 4 -KPX r period -48 -KPX r q -4 -KPX r quoteright 13 -KPX r r -3 -KPX r s 2 -KPX r semicolon -5 -KPX r t 23 -KPX r u 0 -KPX r v 24 -KPX r w 22 -KPX r x 19 -KPX r y 23 -KPX r z 6 -KPX s quoteright -5 -KPX s t -5 -KPX seven colon -47 -KPX seven comma -95 -KPX seven eight -15 -KPX seven five -22 -KPX seven four -72 -KPX seven one -34 -KPX seven period -95 -KPX seven seven 3 -KPX seven six -24 -KPX seven three -14 -KPX seven two -13 -KPX six four 6 -KPX six one -31 -KPX six seven -13 -KPX t S -8 -KPX t a 1 -KPX t aacute 1 -KPX t adieresis 1 -KPX t ae 1 -KPX t aring 1 -KPX t colon -13 -KPX t e -10 -KPX t eacute -10 -KPX t h 1 -KPX t o -10 -KPX t oacute -10 -KPX t odieresis -10 -KPX t quoteright 10 -KPX t semicolon -13 -KPX three four 8 -KPX three one -34 -KPX three seven -15 -KPX two four -38 -KPX two one -29 -KPX two seven -13 -KPX u quoteright 5 -KPX v a -16 -KPX v aacute -16 -KPX v acircumflex -16 -KPX v adieresis -16 -KPX v ae -16 -KPX v agrave -16 -KPX v aring -16 -KPX v atilde -16 -KPX v c -12 -KPX v colon -8 -KPX v comma -51 -KPX v e -16 -KPX v eacute -16 -KPX v ecircumflex -16 -KPX v egrave -16 -KPX v g -15 -KPX v hyphen -3 -KPX v l -2 -KPX v o -16 -KPX v oacute -16 -KPX v odieresis -16 -KPX v ograve -16 -KPX v oslash -12 -KPX v period -51 -KPX v s -10 -KPX v semicolon -8 -KPX w a -13 -KPX w aacute -13 -KPX w acircumflex -13 -KPX w adieresis -13 -KPX w ae -13 -KPX w agrave -13 -KPX w aring -13 -KPX w atilde -13 -KPX w c -5 -KPX w colon -10 -KPX w comma -37 -KPX w e -9 -KPX w eacute -9 -KPX w ecircumflex -9 -KPX w egrave -9 -KPX w g -8 -KPX w hyphen 3 -KPX w l -4 -KPX w o -9 -KPX w oacute -9 -KPX w odieresis -9 -KPX w ograve -9 -KPX w oslash -5 -KPX w period -37 -KPX w s -7 -KPX w semicolon -10 -KPX x a -10 -KPX x c -13 -KPX x e -17 -KPX x eacute -17 -KPX x o -17 -KPX x q -14 -KPX y a -16 -KPX y aacute -16 -KPX y acircumflex -16 -KPX y adieresis -16 -KPX y ae -16 -KPX y agrave -16 -KPX y aring -16 -KPX y atilde -16 -KPX y c -13 -KPX y colon -9 -KPX y comma -50 -KPX y e -17 -KPX y eacute -17 -KPX y ecircumflex -17 -KPX y egrave -17 -KPX y g -15 -KPX y hyphen -2 -KPX y l -3 -KPX y o -17 -KPX y oacute -17 -KPX y odieresis -17 -KPX y ograve -17 -KPX y oslash -12 -KPX y period -49 -KPX y s -11 -KPX y semicolon -9 -KPX zero four 5 -KPX zero one -31 -KPX zero seven -21 -EndKernPairs -EndKernData -EndFontMetrics diff --git a/misc/gs_afm/HelvBo.afm b/misc/gs_afm/HelvBo.afm deleted file mode 100644 index a1100ae8d8..0000000000 --- a/misc/gs_afm/HelvBo.afm +++ /dev/null @@ -1,1257 +0,0 @@ -StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 8/3/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. -FontName NimbusSanL-BoldCond -FullName Nimbus Sans L Bold Condensed -FamilyName Nimbus Sans L -Weight Bold -ItalicAngle 0.0 -IsFixedPitch false -UnderlinePosition -100 -UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW -EncodingScheme AdobeStandardEncoding -FontBBox -139 -228 822 975 -CapHeight 718 -XHeight 532 -Descender -207 -Ascender 718 -StartCharMetrics 232 -C 32 ; WX 228 ; N space ; B 21 0 21 0 ; -C 33 ; WX 273 ; N exclam ; B 74 0 200 718 ; -C 34 ; WX 389 ; N quotedbl ; B 80 447 308 718 ; -C 35 ; WX 456 ; N numbersign ; B 15 0 441 698 ; -C 36 ; WX 456 ; N dollar ; B 24 -115 429 775 ; -C 37 ; WX 729 ; N percent ; B 23 -19 706 710 ; -C 38 ; WX 592 ; N ampersand ; B 44 -19 575 718 ; -C 39 ; WX 228 ; N quoteright ; B 57 445 171 718 ; -C 40 ; WX 273 ; N parenleft ; B 29 -207 257 734 ; -C 41 ; WX 273 ; N parenright ; B 16 -207 244 734 ; -C 42 ; WX 319 ; N asterisk ; B 22 387 297 718 ; -C 43 ; WX 479 ; N plus ; B 33 0 446 506 ; -C 44 ; WX 228 ; N comma ; B 52 -168 175 147 ; -C 45 ; WX 273 ; N hyphen ; B 22 215 251 345 ; -C 46 ; WX 228 ; N period ; B 52 0 175 147 ; -C 47 ; WX 228 ; N slash ; B -27 -19 255 737 ; -C 48 ; WX 456 ; N zero ; B 26 -19 430 710 ; -C 49 ; WX 456 ; N one ; B 57 0 310 710 ; -C 50 ; WX 456 ; N two ; B 21 0 419 710 ; -C 51 ; WX 456 ; N three ; B 22 -19 423 710 ; -C 52 ; WX 456 ; N four ; B 22 0 431 710 ; -C 53 ; WX 456 ; N five ; B 22 -19 423 698 ; -C 54 ; WX 456 ; N six ; B 25 -19 426 710 ; -C 55 ; WX 456 ; N seven ; B 20 0 433 698 ; -C 56 ; WX 456 ; N eight ; B 26 -19 430 710 ; -C 57 ; WX 456 ; N nine ; B 25 -19 428 710 ; -C 58 ; WX 273 ; N colon ; B 75 0 198 512 ; -C 59 ; WX 273 ; N semicolon ; B 75 -168 198 512 ; -C 60 ; WX 479 ; N less ; B 31 -15 448 521 ; -C 61 ; WX 479 ; N equal ; B 33 87 446 419 ; -C 62 ; WX 479 ; N greater ; B 31 -15 448 521 ; -C 63 ; WX 501 ; N question ; B 49 0 456 727 ; -C 64 ; WX 800 ; N at ; B 97 -19 702 737 ; -C 65 ; WX 592 ; N A ; B 16 0 576 718 ; -C 66 ; WX 592 ; N B ; B 62 0 549 718 ; -C 67 ; WX 592 ; N C ; B 36 -19 561 737 ; -C 68 ; WX 592 ; N D ; B 62 0 562 718 ; -C 69 ; WX 547 ; N E ; B 62 0 509 718 ; -C 70 ; WX 501 ; N F ; B 62 0 481 718 ; -C 71 ; WX 638 ; N G ; B 36 -19 585 737 ; -C 72 ; WX 592 ; N H ; B 58 0 534 718 ; -C 73 ; WX 228 ; N I ; B 52 0 175 718 ; -C 74 ; WX 456 ; N J ; B 18 -18 397 718 ; -C 75 ; WX 592 ; N K ; B 71 0 592 718 ; -C 76 ; WX 501 ; N L ; B 62 0 478 718 ; -C 77 ; WX 683 ; N M ; B 57 0 627 718 ; -C 78 ; WX 592 ; N N ; B 57 0 536 718 ; -C 79 ; WX 638 ; N O ; B 36 -19 602 737 ; -C 80 ; WX 547 ; N P ; B 62 0 514 718 ; -C 81 ; WX 638 ; N Q ; B 36 -52 604 737 ; -C 82 ; WX 592 ; N R ; B 62 0 555 718 ; -C 83 ; WX 547 ; N S ; B 32 -19 516 737 ; -C 84 ; WX 501 ; N T ; B 11 0 490 718 ; -C 85 ; WX 592 ; N U ; B 59 -19 534 718 ; -C 86 ; WX 547 ; N V ; B 16 0 531 718 ; -C 87 ; WX 774 ; N W ; B 13 0 762 718 ; -C 88 ; WX 547 ; N X ; B 11 0 535 718 ; -C 89 ; WX 547 ; N Y ; B 12 0 535 718 ; -C 90 ; WX 501 ; N Z ; B 20 0 481 718 ; -C 91 ; WX 273 ; N bracketleft ; B 52 -196 253 722 ; -C 92 ; WX 228 ; N backslash ; B -27 -19 255 737 ; -C 93 ; WX 273 ; N bracketright ; B 20 -196 221 722 ; -C 94 ; WX 479 ; N asciicircum ; B 51 323 428 698 ; -C 95 ; WX 456 ; N underscore ; B 0 -125 456 -75 ; -C 96 ; WX 228 ; N quoteleft ; B 57 454 171 727 ; -C 97 ; WX 456 ; N a ; B 24 -14 432 546 ; -C 98 ; WX 501 ; N b ; B 50 -14 474 718 ; -C 99 ; WX 456 ; N c ; B 28 -14 430 546 ; -C 100 ; WX 501 ; N d ; B 28 -14 452 718 ; -C 101 ; WX 456 ; N e ; B 19 -14 433 546 ; -C 102 ; WX 273 ; N f ; B 8 0 261 727 ; -C 103 ; WX 501 ; N g ; B 33 -217 453 546 ; -C 104 ; WX 501 ; N h ; B 53 0 448 718 ; -C 105 ; WX 228 ; N i ; B 57 0 171 725 ; -C 106 ; WX 228 ; N j ; B 2 -214 171 725 ; -C 107 ; WX 456 ; N k ; B 57 0 461 718 ; -C 108 ; WX 228 ; N l ; B 57 0 171 718 ; -C 109 ; WX 729 ; N m ; B 52 0 677 546 ; -C 110 ; WX 501 ; N n ; B 53 0 448 546 ; -C 111 ; WX 501 ; N o ; B 28 -14 474 546 ; -C 112 ; WX 501 ; N p ; B 51 -207 474 546 ; -C 113 ; WX 501 ; N q ; B 28 -207 453 546 ; -C 114 ; WX 319 ; N r ; B 52 0 306 546 ; -C 115 ; WX 456 ; N s ; B 25 -14 426 546 ; -C 116 ; WX 273 ; N t ; B 8 -6 253 676 ; -C 117 ; WX 501 ; N u ; B 54 -14 447 532 ; -C 118 ; WX 456 ; N v ; B 11 0 445 532 ; -C 119 ; WX 638 ; N w ; B 8 0 631 532 ; -C 120 ; WX 456 ; N x ; B 12 0 444 532 ; -C 121 ; WX 456 ; N y ; B 8 -214 442 532 ; -C 122 ; WX 410 ; N z ; B 16 0 394 532 ; -C 123 ; WX 319 ; N braceleft ; B 39 -196 299 722 ; -C 124 ; WX 230 ; N bar ; B 69 -19 161 737 ; -C 125 ; WX 319 ; N braceright ; B 20 -196 280 722 ; -C 126 ; WX 479 ; N asciitilde ; B 50 173 429 336 ; -C 161 ; WX 273 ; N exclamdown ; B 74 -186 200 532 ; -C 162 ; WX 456 ; N cent ; B 28 -118 430 628 ; -C 163 ; WX 456 ; N sterling ; B 23 -16 444 718 ; -C 164 ; WX 137 ; N fraction ; B -139 -19 276 710 ; -C 165 ; WX 456 ; N yen ; B -7 0 463 698 ; -C 166 ; WX 456 ; N florin ; B -8 -210 423 737 ; -C 167 ; WX 456 ; N section ; B 28 -184 428 727 ; -C 168 ; WX 456 ; N currency ; B -2 76 458 636 ; -C 169 ; WX 195 ; N quotesingle ; B 57 447 138 718 ; -C 170 ; WX 410 ; N quotedblleft ; B 52 454 358 727 ; -C 171 ; WX 456 ; N guillemotleft ; B 72 76 384 484 ; -C 172 ; WX 273 ; N guilsinglleft ; B 68 76 205 484 ; -C 173 ; WX 273 ; N guilsinglright ; B 68 76 205 484 ; -C 174 ; WX 501 ; N fi ; B 8 0 444 727 ; -C 175 ; WX 501 ; N fl ; B 8 0 444 727 ; -C 177 ; WX 456 ; N endash ; B 0 226 456 333 ; -C 178 ; WX 456 ; N dagger ; B 30 -171 426 718 ; -C 179 ; WX 456 ; N daggerdbl ; B 30 -171 426 718 ; -C 180 ; WX 228 ; N periodcentered ; B 48 172 180 334 ; -C 182 ; WX 456 ; N paragraph ; B -7 -191 442 700 ; -C 183 ; WX 287 ; N bullet ; B 8 194 279 524 ; -C 184 ; WX 228 ; N quotesinglbase ; B 57 -146 171 127 ; -C 185 ; WX 410 ; N quotedblbase ; B 52 -146 358 127 ; -C 186 ; WX 410 ; N quotedblright ; B 52 445 358 718 ; -C 187 ; WX 456 ; N guillemotright ; B 72 76 384 484 ; -C 188 ; WX 820 ; N ellipsis ; B 75 0 745 147 ; -C 189 ; WX 820 ; N perthousand ; B -2 -19 822 710 ; -C 191 ; WX 501 ; N questiondown ; B 45 -195 452 532 ; -C 193 ; WX 273 ; N grave ; B -19 604 184 750 ; -C 194 ; WX 273 ; N acute ; B 89 604 292 750 ; -C 195 ; WX 273 ; N circumflex ; B -8 604 281 750 ; -C 196 ; WX 273 ; N tilde ; B -14 610 287 737 ; -C 197 ; WX 273 ; N macron ; B -5 605 278 678 ; -C 198 ; WX 273 ; N breve ; B -2 604 275 750 ; -C 199 ; WX 273 ; N dotaccent ; B 85 614 189 729 ; -C 200 ; WX 273 ; N dieresis ; B 5 614 268 729 ; -C 202 ; WX 273 ; N ring ; B 48 568 225 776 ; -C 203 ; WX 273 ; N cedilla ; B 5 -228 201 0 ; -C 205 ; WX 273 ; N hungarumlaut ; B 7 604 399 750 ; -C 206 ; WX 273 ; N ogonek ; B 58 -228 249 0 ; -C 207 ; WX 273 ; N caron ; B -8 604 281 750 ; -C 208 ; WX 820 ; N emdash ; B 0 226 820 333 ; -C 225 ; WX 820 ; N AE ; B 4 0 782 718 ; -C 227 ; WX 303 ; N ordfeminine ; B 18 276 285 737 ; -C 232 ; WX 501 ; N Lslash ; B -16 0 478 718 ; -C 233 ; WX 638 ; N Oslash ; B 27 -27 610 745 ; -C 234 ; WX 820 ; N OE ; B 30 -19 788 737 ; -C 235 ; WX 299 ; N ordmasculine ; B 5 276 295 737 ; -C 241 ; WX 729 ; N ae ; B 24 -14 704 546 ; -C 245 ; WX 228 ; N dotlessi ; B 57 0 171 532 ; -C 248 ; WX 228 ; N lslash ; B -15 0 243 718 ; -C 249 ; WX 501 ; N oslash ; B 18 -29 483 560 ; -C 250 ; WX 774 ; N oe ; B 28 -14 748 546 ; -C 251 ; WX 501 ; N germandbls ; B 57 -14 475 731 ; -C -1 ; WX 547 ; N Yacute ; B 12 0 535 936 ; -C -1 ; WX 592 ; N Ucircumflex ; B 59 -19 534 936 ; -C -1 ; WX 592 ; N Ugrave ; B 59 -19 534 936 ; -C -1 ; WX 501 ; N Zcaron ; B 20 0 481 936 ; -C -1 ; WX 547 ; N Ydieresis ; B 12 0 535 915 ; -C -1 ; WX 273 ; N threesuperior ; B 7 271 267 722 ; -C -1 ; WX 592 ; N Uacute ; B 59 -19 534 936 ; -C -1 ; WX 273 ; N twosuperior ; B 7 283 266 722 ; -C -1 ; WX 592 ; N Udieresis ; B 59 -19 534 915 ; -C -1 ; WX 228 ; N middot ; B 48 172 180 334 ; -C -1 ; WX 273 ; N onesuperior ; B 21 283 194 710 ; -C -1 ; WX 456 ; N aacute ; B 24 -14 432 750 ; -C -1 ; WX 456 ; N agrave ; B 24 -14 432 750 ; -C -1 ; WX 456 ; N acircumflex ; B 24 -14 432 750 ; -C -1 ; WX 547 ; N Scaron ; B 32 -19 516 936 ; -C -1 ; WX 638 ; N Otilde ; B 36 -19 602 923 ; -C -1 ; WX 273 ; N sfthyphen ; B 22 215 251 345 ; -C -1 ; WX 456 ; N atilde ; B 24 -14 432 737 ; -C -1 ; WX 456 ; N aring ; B 24 -14 432 803 ; -C -1 ; WX 456 ; N adieresis ; B 24 -14 432 729 ; -C -1 ; WX 638 ; N Ograve ; B 36 -19 602 936 ; -C -1 ; WX 638 ; N Ocircumflex ; B 36 -19 602 936 ; -C -1 ; WX 638 ; N Odieresis ; B 36 -19 602 915 ; -C -1 ; WX 592 ; N Ntilde ; B 57 0 536 923 ; -C -1 ; WX 456 ; N edieresis ; B 19 -14 433 729 ; -C -1 ; WX 456 ; N eacute ; B 19 -14 433 750 ; -C -1 ; WX 456 ; N egrave ; B 19 -14 433 750 ; -C -1 ; WX 228 ; N Icircumflex ; B -30 0 259 936 ; -C -1 ; WX 456 ; N ecircumflex ; B 19 -14 433 750 ; -C -1 ; WX 228 ; N Igrave ; B -41 0 175 936 ; -C -1 ; WX 228 ; N Iacute ; B 52 0 270 936 ; -C -1 ; WX 228 ; N Idieresis ; B -17 0 246 915 ; -C -1 ; WX 328 ; N degree ; B 47 426 281 712 ; -C -1 ; WX 547 ; N Ecircumflex ; B 62 0 509 936 ; -C -1 ; WX 479 ; N minus ; B 33 197 446 309 ; -C -1 ; WX 479 ; N multiply ; B 33 1 447 505 ; -C -1 ; WX 479 ; N divide ; B 33 -42 446 548 ; -C -1 ; WX 547 ; N Egrave ; B 62 0 509 936 ; -C -1 ; WX 820 ; N trademark ; B 36 306 784 718 ; -C -1 ; WX 638 ; N Oacute ; B 36 -19 602 936 ; -C -1 ; WX 501 ; N thorn ; B 51 -207 474 718 ; -C -1 ; WX 501 ; N eth ; B 28 -14 474 737 ; -C -1 ; WX 547 ; N Eacute ; B 62 0 509 936 ; -C -1 ; WX 456 ; N ccedilla ; B 28 -228 430 546 ; -C -1 ; WX 228 ; N idieresis ; B -17 0 246 729 ; -C -1 ; WX 228 ; N iacute ; B 57 0 270 750 ; -C -1 ; WX 228 ; N igrave ; B -41 0 171 750 ; -C -1 ; WX 479 ; N plusminus ; B 33 0 446 578 ; -C -1 ; WX 684 ; N onehalf ; B 21 -19 651 710 ; -C -1 ; WX 684 ; N onequarter ; B 21 -19 628 710 ; -C -1 ; WX 684 ; N threequarters ; B 13 -19 655 722 ; -C -1 ; WX 228 ; N icircumflex ; B -30 0 259 750 ; -C -1 ; WX 547 ; N Edieresis ; B 62 0 509 915 ; -C -1 ; WX 501 ; N ntilde ; B 53 0 448 737 ; -C -1 ; WX 592 ; N Aring ; B 16 0 576 975 ; -C -1 ; WX 501 ; N odieresis ; B 28 -14 474 729 ; -C -1 ; WX 501 ; N oacute ; B 28 -14 474 750 ; -C -1 ; WX 501 ; N ograve ; B 28 -14 474 750 ; -C -1 ; WX 501 ; N ocircumflex ; B 28 -14 474 750 ; -C -1 ; WX 501 ; N otilde ; B 28 -14 474 737 ; -C -1 ; WX 456 ; N scaron ; B 25 -14 426 750 ; -C -1 ; WX 501 ; N udieresis ; B 54 -14 447 729 ; -C -1 ; WX 501 ; N uacute ; B 54 -14 447 750 ; -C -1 ; WX 501 ; N ugrave ; B 54 -14 447 750 ; -C -1 ; WX 501 ; N ucircumflex ; B 54 -14 447 750 ; -C -1 ; WX 456 ; N yacute ; B 8 -214 442 750 ; -C -1 ; WX 410 ; N zcaron ; B 16 0 394 750 ; -C -1 ; WX 456 ; N ydieresis ; B 8 -214 442 729 ; -C -1 ; WX 604 ; N copyright ; B -9 -19 614 737 ; -C -1 ; WX 604 ; N registered ; B -9 -19 613 737 ; -C -1 ; WX 592 ; N Atilde ; B 16 0 576 923 ; -C -1 ; WX 228 ; N nbspace ; B 21 0 21 0 ; -C -1 ; WX 592 ; N Ccedilla ; B 36 -228 561 737 ; -C -1 ; WX 592 ; N Acircumflex ; B 16 0 576 936 ; -C -1 ; WX 592 ; N Agrave ; B 16 0 576 936 ; -C -1 ; WX 479 ; N logicalnot ; B 33 108 446 419 ; -C -1 ; WX 592 ; N Aacute ; B 16 0 576 936 ; -C -1 ; WX 592 ; N Eth ; B -4 0 562 718 ; -C -1 ; WX 230 ; N brokenbar ; B 69 -19 161 737 ; -C -1 ; WX 547 ; N Thorn ; B 62 0 514 718 ; -C -1 ; WX 592 ; N Adieresis ; B 16 0 576 915 ; -C -1 ; WX 501 ; N mu ; B 54 -207 447 532 ; -C -1 ; WX 228 ; N .notdef ; B 21 0 21 0 ; -EndCharMetrics -StartKernData -StartKernPairs 998 -KPX A C -26 -KPX A Ccedilla -26 -KPX A G -27 -KPX A O -27 -KPX A Odieresis -27 -KPX A Q -27 -KPX A T -62 -KPX A U -24 -KPX A Uacute -24 -KPX A Ucircumflex -24 -KPX A Udieresis -24 -KPX A Ugrave -24 -KPX A V -50 -KPX A W -41 -KPX A Y -69 -KPX A a -1 -KPX A b -1 -KPX A c -11 -KPX A ccedilla -11 -KPX A comma 17 -KPX A d -11 -KPX A e -7 -KPX A g -16 -KPX A guillemotleft -35 -KPX A guilsinglleft -33 -KPX A hyphen 7 -KPX A o -14 -KPX A period 17 -KPX A q -12 -KPX A quotedblright -48 -KPX A quoteright -50 -KPX A t -13 -KPX A u -12 -KPX A v -29 -KPX A w -19 -KPX A y -27 -KPX Aacute C -26 -KPX Aacute G -27 -KPX Aacute O -27 -KPX Aacute Q -27 -KPX Aacute T -62 -KPX Aacute U -24 -KPX Aacute V -50 -KPX Aacute W -41 -KPX Aacute Y -69 -KPX Aacute a -1 -KPX Aacute b -1 -KPX Aacute c -11 -KPX Aacute comma 17 -KPX Aacute d -11 -KPX Aacute e -7 -KPX Aacute g -16 -KPX Aacute guillemotleft -35 -KPX Aacute guilsinglleft -33 -KPX Aacute hyphen 7 -KPX Aacute o -14 -KPX Aacute period 17 -KPX Aacute q -12 -KPX Aacute quoteright -50 -KPX Aacute t -13 -KPX Aacute u -12 -KPX Aacute v -29 -KPX Aacute w -19 -KPX Aacute y -27 -KPX Acircumflex C -26 -KPX Acircumflex G -27 -KPX Acircumflex O -27 -KPX Acircumflex Q -27 -KPX Acircumflex T -62 -KPX Acircumflex U -24 -KPX Acircumflex V -50 -KPX Acircumflex W -41 -KPX Acircumflex Y -69 -KPX Acircumflex comma 17 -KPX Acircumflex period 17 -KPX Adieresis C -26 -KPX Adieresis G -27 -KPX Adieresis O -27 -KPX Adieresis Q -27 -KPX Adieresis T -62 -KPX Adieresis U -24 -KPX Adieresis V -50 -KPX Adieresis W -41 -KPX Adieresis Y -69 -KPX Adieresis a -1 -KPX Adieresis b -1 -KPX Adieresis c -11 -KPX Adieresis comma 17 -KPX Adieresis d -11 -KPX Adieresis g -16 -KPX Adieresis guillemotleft -35 -KPX Adieresis guilsinglleft -33 -KPX Adieresis hyphen 7 -KPX Adieresis o -14 -KPX Adieresis period 17 -KPX Adieresis q -12 -KPX Adieresis quotedblright -48 -KPX Adieresis quoteright -50 -KPX Adieresis t -13 -KPX Adieresis u -12 -KPX Adieresis v -29 -KPX Adieresis w -19 -KPX Adieresis y -27 -KPX Agrave C -26 -KPX Agrave G -27 -KPX Agrave O -27 -KPX Agrave Q -27 -KPX Agrave T -62 -KPX Agrave U -24 -KPX Agrave V -50 -KPX Agrave W -41 -KPX Agrave Y -69 -KPX Agrave comma 17 -KPX Agrave period 17 -KPX Aring C -26 -KPX Aring G -27 -KPX Aring O -27 -KPX Aring Q -27 -KPX Aring T -62 -KPX Aring U -24 -KPX Aring V -50 -KPX Aring W -41 -KPX Aring Y -69 -KPX Aring a -1 -KPX Aring b -1 -KPX Aring c -11 -KPX Aring comma 17 -KPX Aring d -11 -KPX Aring e -7 -KPX Aring g -16 -KPX Aring guillemotleft -35 -KPX Aring guilsinglleft -33 -KPX Aring hyphen 7 -KPX Aring o -14 -KPX Aring period 17 -KPX Aring q -12 -KPX Aring quotedblright -48 -KPX Aring quoteright -50 -KPX Aring t -13 -KPX Aring u -12 -KPX Aring v -29 -KPX Aring w -19 -KPX Aring y -27 -KPX Atilde C -26 -KPX Atilde G -27 -KPX Atilde O -27 -KPX Atilde Q -27 -KPX Atilde T -62 -KPX Atilde U -24 -KPX Atilde V -50 -KPX Atilde W -41 -KPX Atilde Y -69 -KPX Atilde comma 17 -KPX Atilde period 17 -KPX B A -17 -KPX B AE -11 -KPX B Aacute -17 -KPX B Acircumflex -17 -KPX B Adieresis -17 -KPX B Aring -17 -KPX B Atilde -17 -KPX B O -4 -KPX B OE 1 -KPX B Oacute -4 -KPX B Ocircumflex -4 -KPX B Odieresis -4 -KPX B Ograve -4 -KPX B Oslash 0 -KPX B V -22 -KPX B W -17 -KPX B Y -29 -KPX C A -19 -KPX C AE -14 -KPX C Aacute -19 -KPX C Adieresis -19 -KPX C Aring -19 -KPX C H 1 -KPX C K -5 -KPX C O -2 -KPX C Oacute -2 -KPX C Odieresis -2 -KPX Ccedilla A -21 -KPX D A -24 -KPX D Aacute -24 -KPX D Acircumflex -24 -KPX D Adieresis -24 -KPX D Agrave -24 -KPX D Aring -24 -KPX D Atilde -24 -KPX D J 8 -KPX D T -3 -KPX D V -20 -KPX D W -13 -KPX D X -22 -KPX D Y -31 -KPX F A -43 -KPX F Aacute -43 -KPX F Acircumflex -43 -KPX F Adieresis -43 -KPX F Agrave -43 -KPX F Aring -43 -KPX F Atilde -43 -KPX F J -14 -KPX F O -10 -KPX F Odieresis -10 -KPX F a -15 -KPX F aacute -15 -KPX F adieresis -15 -KPX F ae -16 -KPX F aring -15 -KPX F comma -71 -KPX F e -6 -KPX F eacute -6 -KPX F hyphen 8 -KPX F i -6 -KPX F j -6 -KPX F o -11 -KPX F oacute -11 -KPX F odieresis -11 -KPX F oe -11 -KPX F oslash -11 -KPX F period -71 -KPX F r -22 -KPX F u -23 -KPX G A 1 -KPX G AE 7 -KPX G Aacute 1 -KPX G Acircumflex 1 -KPX G Adieresis 1 -KPX G Agrave 1 -KPX G Aring 1 -KPX G Atilde 1 -KPX G T -7 -KPX G V -24 -KPX G W -15 -KPX G Y -35 -KPX J A -21 -KPX J AE -15 -KPX J Adieresis -21 -KPX J Aring -21 -KPX K C -35 -KPX K G -36 -KPX K O -36 -KPX K OE -30 -KPX K Oacute -36 -KPX K Odieresis -36 -KPX K S -18 -KPX K T 23 -KPX K a 0 -KPX K adieresis 0 -KPX K ae -1 -KPX K aring 0 -KPX K e -17 -KPX K hyphen -26 -KPX K o -25 -KPX K oacute -25 -KPX K odieresis -25 -KPX K u -19 -KPX K udieresis -19 -KPX K y -48 -KPX L A 16 -KPX L AE 22 -KPX L Aacute 16 -KPX L Adieresis 16 -KPX L Aring 16 -KPX L C -13 -KPX L Ccedilla -16 -KPX L G -15 -KPX L O -16 -KPX L Oacute -16 -KPX L Ocircumflex -16 -KPX L Odieresis -16 -KPX L Ograve -16 -KPX L Otilde -16 -KPX L S 3 -KPX L T -70 -KPX L U -12 -KPX L Udieresis -12 -KPX L V -64 -KPX L W -50 -KPX L Y -83 -KPX L hyphen -8 -KPX L quotedblright -116 -KPX L quoteright -118 -KPX L u -7 -KPX L udieresis -7 -KPX L y -41 -KPX N A 0 -KPX N AE 6 -KPX N Aacute 0 -KPX N Adieresis 0 -KPX N Aring 0 -KPX N C 6 -KPX N Ccedilla 6 -KPX N G 5 -KPX N O 6 -KPX N Oacute 6 -KPX N Odieresis 6 -KPX N a 7 -KPX N aacute 7 -KPX N adieresis 7 -KPX N ae 6 -KPX N aring 7 -KPX N comma 12 -KPX N e 12 -KPX N eacute 12 -KPX N o 5 -KPX N oacute 5 -KPX N odieresis 5 -KPX N oslash 7 -KPX N period 12 -KPX N u 5 -KPX N udieresis 5 -KPX O A -27 -KPX O AE -22 -KPX O Aacute -27 -KPX O Adieresis -27 -KPX O Aring -27 -KPX O T -9 -KPX O V -26 -KPX O W -17 -KPX O X -26 -KPX O Y -38 -KPX Oacute A -27 -KPX Oacute T -9 -KPX Oacute V -26 -KPX Oacute W -17 -KPX Oacute Y -38 -KPX Ocircumflex T -9 -KPX Ocircumflex V -26 -KPX Ocircumflex Y -38 -KPX Odieresis A -27 -KPX Odieresis T -9 -KPX Odieresis V -26 -KPX Odieresis W -17 -KPX Odieresis X -26 -KPX Odieresis Y -38 -KPX Ograve T -9 -KPX Ograve V -26 -KPX Ograve Y -38 -KPX Oslash A -24 -KPX Otilde T -9 -KPX Otilde V -26 -KPX Otilde Y -38 -KPX P A -51 -KPX P AE -47 -KPX P Aacute -51 -KPX P Adieresis -51 -KPX P Aring -51 -KPX P J -36 -KPX P a -12 -KPX P aacute -12 -KPX P adieresis -12 -KPX P ae -13 -KPX P aring -12 -KPX P comma -92 -KPX P e -10 -KPX P eacute -10 -KPX P hyphen -3 -KPX P o -16 -KPX P oacute -16 -KPX P odieresis -16 -KPX P oe -16 -KPX P oslash -16 -KPX P period -92 -KPX R C -2 -KPX R Ccedilla -2 -KPX R G -3 -KPX R O -3 -KPX R OE 1 -KPX R Oacute -3 -KPX R Odieresis -3 -KPX R T 3 -KPX R U -1 -KPX R Udieresis -1 -KPX R V -16 -KPX R W -12 -KPX R Y -24 -KPX R a 0 -KPX R aacute 0 -KPX R adieresis 0 -KPX R ae -1 -KPX R aring 0 -KPX R e 2 -KPX R eacute 2 -KPX R hyphen 14 -KPX R o -4 -KPX R oacute -4 -KPX R odieresis -4 -KPX R oe -4 -KPX R u -1 -KPX R uacute -2 -KPX R udieresis -2 -KPX R y 3 -KPX S A -10 -KPX S AE -5 -KPX S Aacute -10 -KPX S Adieresis -10 -KPX S Aring -10 -KPX S T 0 -KPX S V -20 -KPX S W -15 -KPX S Y -27 -KPX S t 2 -KPX T A -63 -KPX T AE -59 -KPX T Aacute -63 -KPX T Acircumflex -63 -KPX T Adieresis -63 -KPX T Agrave -63 -KPX T Aring -63 -KPX T Atilde -63 -KPX T C -8 -KPX T G -10 -KPX T J -67 -KPX T O -9 -KPX T OE -3 -KPX T Oacute -9 -KPX T Ocircumflex -9 -KPX T Odieresis -9 -KPX T Ograve -9 -KPX T Oslash -9 -KPX T Otilde -9 -KPX T S 6 -KPX T V 22 -KPX T W 23 -KPX T Y 23 -KPX T a -62 -KPX T ae -63 -KPX T c -62 -KPX T colon -73 -KPX T comma -55 -KPX T e -58 -KPX T g -65 -KPX T guillemotleft -84 -KPX T guilsinglleft -82 -KPX T hyphen -40 -KPX T i -2 -KPX T j -2 -KPX T o -65 -KPX T oslash -61 -KPX T period -55 -KPX T r -59 -KPX T s -63 -KPX T semicolon -73 -KPX T u -63 -KPX T v -68 -KPX T w -67 -KPX T y -67 -KPX U A -24 -KPX U AE -20 -KPX U Aacute -24 -KPX U Acircumflex -24 -KPX U Adieresis -24 -KPX U Aring -24 -KPX U Atilde -24 -KPX U comma -6 -KPX U m 4 -KPX U n 3 -KPX U p 4 -KPX U period -3 -KPX U r 4 -KPX Uacute A -24 -KPX Uacute comma -6 -KPX Uacute m 4 -KPX Uacute n 3 -KPX Uacute p 4 -KPX Uacute period -3 -KPX Uacute r 4 -KPX Ucircumflex A -24 -KPX Udieresis A -24 -KPX Udieresis b 4 -KPX Udieresis comma -6 -KPX Udieresis m 4 -KPX Udieresis n 3 -KPX Udieresis p 4 -KPX Udieresis period -3 -KPX Udieresis r 4 -KPX Ugrave A -24 -KPX V A -51 -KPX V AE -46 -KPX V Aacute -51 -KPX V Acircumflex -51 -KPX V Adieresis -51 -KPX V Agrave -51 -KPX V Aring -51 -KPX V Atilde -51 -KPX V C -25 -KPX V G -26 -KPX V O -26 -KPX V Oacute -26 -KPX V Ocircumflex -26 -KPX V Odieresis -26 -KPX V Ograve -26 -KPX V Oslash -22 -KPX V Otilde -26 -KPX V S -13 -KPX V T 22 -KPX V a -38 -KPX V ae -39 -KPX V colon -38 -KPX V comma -52 -KPX V e -34 -KPX V g -40 -KPX V guillemotleft -59 -KPX V guilsinglleft -57 -KPX V hyphen -14 -KPX V i -4 -KPX V o -41 -KPX V oslash -37 -KPX V period -52 -KPX V r -27 -KPX V semicolon -38 -KPX V u -31 -KPX V y -7 -KPX W A -40 -KPX W AE -36 -KPX W Aacute -40 -KPX W Acircumflex -40 -KPX W Adieresis -40 -KPX W Agrave -40 -KPX W Aring -40 -KPX W Atilde -40 -KPX W C -15 -KPX W G -16 -KPX W O -16 -KPX W Oacute -16 -KPX W Ocircumflex -16 -KPX W Odieresis -16 -KPX W Ograve -16 -KPX W Oslash -12 -KPX W Otilde -16 -KPX W S -8 -KPX W T 24 -KPX W a -26 -KPX W ae -27 -KPX W colon -31 -KPX W comma -36 -KPX W e -21 -KPX W g -28 -KPX W guillemotleft -47 -KPX W guilsinglleft -45 -KPX W hyphen -2 -KPX W i -2 -KPX W o -28 -KPX W oslash -25 -KPX W period -36 -KPX W r -21 -KPX W semicolon -31 -KPX W u -24 -KPX W y -1 -KPX X C -26 -KPX X O -27 -KPX X Odieresis -27 -KPX X Q -27 -KPX X a -5 -KPX X e -20 -KPX X hyphen -21 -KPX X o -27 -KPX X u -24 -KPX X y -35 -KPX Y A -67 -KPX Y AE -62 -KPX Y Aacute -67 -KPX Y Acircumflex -67 -KPX Y Adieresis -67 -KPX Y Agrave -67 -KPX Y Aring -67 -KPX Y Atilde -67 -KPX Y C -36 -KPX Y G -38 -KPX Y O -37 -KPX Y Oacute -37 -KPX Y Ocircumflex -37 -KPX Y Odieresis -37 -KPX Y Ograve -37 -KPX Y Oslash -37 -KPX Y Otilde -37 -KPX Y S -19 -KPX Y T 24 -KPX Y a -58 -KPX Y ae -59 -KPX Y colon -52 -KPX Y comma -65 -KPX Y e -54 -KPX Y g -61 -KPX Y guillemotleft -83 -KPX Y guilsinglleft -81 -KPX Y hyphen -42 -KPX Y i -2 -KPX Y o -61 -KPX Y oslash -57 -KPX Y p -39 -KPX Y period -65 -KPX Y semicolon -52 -KPX Y u -45 -KPX Y v -22 -KPX Z v -9 -KPX Z y -8 -KPX a j 0 -KPX a quoteright -7 -KPX a v -15 -KPX a w -5 -KPX a y -13 -KPX aacute v -15 -KPX aacute w -5 -KPX aacute y -13 -KPX adieresis v -15 -KPX adieresis w -5 -KPX adieresis y -13 -KPX ae v -16 -KPX ae w -6 -KPX ae y -15 -KPX agrave v -15 -KPX agrave w -5 -KPX agrave y -13 -KPX aring v -15 -KPX aring w -5 -KPX aring y -13 -KPX b v -15 -KPX b w -5 -KPX b y -14 -KPX c h 0 -KPX c k -2 -KPX comma one -59 -KPX comma quotedblright -18 -KPX comma quoteright -20 -KPX e quoteright -8 -KPX e t -2 -KPX e v -15 -KPX e w -6 -KPX e x -16 -KPX e y -14 -KPX eacute v -15 -KPX eacute w -6 -KPX eacute y -14 -KPX ecircumflex v -15 -KPX ecircumflex w -6 -KPX ecircumflex y -14 -KPX eight four 12 -KPX eight one -15 -KPX eight seven 0 -KPX f a -4 -KPX f aacute -4 -KPX f adieresis -4 -KPX f ae -6 -KPX f aring -4 -KPX f e -5 -KPX f eacute -5 -KPX f f 17 -KPX f i -3 -KPX f j -7 -KPX f l -3 -KPX f o -12 -KPX f oacute -12 -KPX f odieresis -12 -KPX f oe -12 -KPX f oslash -9 -KPX f quoteright 11 -KPX f s -5 -KPX f t 17 -KPX five four 8 -KPX five one -20 -KPX five seven -2 -KPX four four 12 -KPX four one -37 -KPX four seven -19 -KPX g a 5 -KPX g adieresis 5 -KPX g ae 4 -KPX g aring 5 -KPX g e 10 -KPX g eacute 10 -KPX g l 3 -KPX g oacute 4 -KPX g odieresis 4 -KPX g r 6 -KPX guillemotright A -36 -KPX guillemotright AE -31 -KPX guillemotright Aacute -36 -KPX guillemotright Adieresis -36 -KPX guillemotright Aring -36 -KPX guillemotright T -84 -KPX guillemotright V -59 -KPX guillemotright W -48 -KPX guillemotright Y -86 -KPX guilsinglright A -33 -KPX guilsinglright AE -28 -KPX guilsinglright Aacute -33 -KPX guilsinglright Adieresis -33 -KPX guilsinglright Aring -33 -KPX guilsinglright T -82 -KPX guilsinglright V -57 -KPX guilsinglright W -45 -KPX guilsinglright Y -84 -KPX h quoteright -7 -KPX h y -14 -KPX hyphen A 6 -KPX hyphen AE 12 -KPX hyphen Aacute 6 -KPX hyphen Adieresis 6 -KPX hyphen Aring 6 -KPX hyphen T -40 -KPX hyphen V -14 -KPX hyphen W -3 -KPX hyphen Y -45 -KPX i T -2 -KPX i j -1 -KPX k a 0 -KPX k aacute 0 -KPX k adieresis 0 -KPX k ae 0 -KPX k aring 0 -KPX k comma 15 -KPX k e -6 -KPX k eacute -6 -KPX k g -14 -KPX k hyphen -10 -KPX k o -13 -KPX k oacute -13 -KPX k odieresis -13 -KPX k period 15 -KPX k s -8 -KPX k u -4 -KPX k udieresis 0 -KPX l v -7 -KPX l y -5 -KPX m p 3 -KPX m v -16 -KPX m w -7 -KPX m y -14 -KPX n T -63 -KPX n p 3 -KPX n quoteright -7 -KPX n v -16 -KPX n w -7 -KPX n y -14 -KPX nine four 10 -KPX nine one -11 -KPX nine seven -4 -KPX o T -64 -KPX o quoteright -13 -KPX o t -5 -KPX o v -18 -KPX o w -8 -KPX o x -20 -KPX o y -17 -KPX oacute v -18 -KPX oacute w -8 -KPX oacute y -17 -KPX ocircumflex t -5 -KPX odieresis t -5 -KPX odieresis v -18 -KPX odieresis w -8 -KPX odieresis x -20 -KPX odieresis y -17 -KPX ograve v -18 -KPX ograve w -8 -KPX ograve y -17 -KPX one comma -32 -KPX one eight -32 -KPX one five -33 -KPX one four -47 -KPX one nine -32 -KPX one one -65 -KPX one period -32 -KPX one seven -47 -KPX one six -28 -KPX one three -36 -KPX one two -37 -KPX one zero -28 -KPX p t -1 -KPX p y -14 -KPX period one -59 -KPX period quotedblright -18 -KPX period quoteright -20 -KPX q c 6 -KPX q u 4 -KPX quotedblbase A 16 -KPX quotedblbase AE 21 -KPX quotedblbase T -56 -KPX quotedblbase V -53 -KPX quotedblbase W -38 -KPX quotedblbase Y -69 -KPX quotedblleft A -49 -KPX quotedblleft AE -45 -KPX quotedblleft Aacute -49 -KPX quotedblleft Adieresis -49 -KPX quotedblleft Aring -49 -KPX quotedblleft T 3 -KPX quotedblleft V 10 -KPX quotedblleft W 15 -KPX quotedblleft Y 2 -KPX quotedblright A -52 -KPX quotedblright AE -48 -KPX quotedblright Aacute -52 -KPX quotedblright Adieresis -52 -KPX quotedblright Aring -52 -KPX quotedblright T 4 -KPX quotedblright V 7 -KPX quotedblright W 12 -KPX quotedblright Y 0 -KPX quoteleft A -51 -KPX quoteleft AE -47 -KPX quoteleft Aacute -51 -KPX quoteleft Adieresis -51 -KPX quoteleft Aring -51 -KPX quoteleft T 1 -KPX quoteleft V 7 -KPX quoteleft W 12 -KPX quoteleft Y 0 -KPX quoteright A -55 -KPX quoteright AE -51 -KPX quoteright Aacute -55 -KPX quoteright Adieresis -55 -KPX quoteright Aring -55 -KPX quoteright comma -31 -KPX quoteright d -18 -KPX quoteright o -24 -KPX quoteright period -31 -KPX quoteright r -7 -KPX quoteright s -15 -KPX quoteright t 4 -KPX quoteright v 0 -KPX quoteright w 5 -KPX quoteright y 2 -KPX r a -1 -KPX r aacute -1 -KPX r acircumflex -1 -KPX r adieresis -1 -KPX r ae -2 -KPX r agrave -1 -KPX r aring -1 -KPX r c -4 -KPX r ccedilla -1 -KPX r colon -12 -KPX r comma -42 -KPX r d -2 -KPX r e 0 -KPX r eacute 0 -KPX r ecircumflex 0 -KPX r egrave 0 -KPX r f 17 -KPX r g -2 -KPX r h -5 -KPX r hyphen -25 -KPX r i -7 -KPX r j -7 -KPX r k -7 -KPX r l -7 -KPX r m -5 -KPX r n -5 -KPX r o -6 -KPX r oacute -6 -KPX r ocircumflex -6 -KPX r odieresis -6 -KPX r oe -6 -KPX r ograve -6 -KPX r oslash -6 -KPX r p -4 -KPX r period -42 -KPX r q -3 -KPX r quoteright 13 -KPX r r -5 -KPX r s -1 -KPX r semicolon -12 -KPX r t 17 -KPX r u -6 -KPX r v 15 -KPX r w 16 -KPX r x 10 -KPX r y 16 -KPX r z 5 -KPX s quoteright -11 -KPX s t -5 -KPX seven colon -40 -KPX seven comma -71 -KPX seven eight -2 -KPX seven five -9 -KPX seven four -53 -KPX seven one -4 -KPX seven period -71 -KPX seven seven 14 -KPX seven six -6 -KPX seven three 1 -KPX seven two 1 -KPX six four 10 -KPX six one -13 -KPX six seven 1 -KPX t S 1 -KPX t a 4 -KPX t aacute 4 -KPX t adieresis 4 -KPX t ae 4 -KPX t aring 4 -KPX t colon -5 -KPX t e -1 -KPX t eacute -1 -KPX t h 5 -KPX t o -8 -KPX t oacute -8 -KPX t odieresis -8 -KPX t quoteright 7 -KPX t semicolon -4 -KPX three four 8 -KPX three one -18 -KPX three seven -3 -KPX two four -11 -KPX two one -11 -KPX two seven 0 -KPX u quoteright 1 -KPX v a -17 -KPX v aacute -17 -KPX v acircumflex -17 -KPX v adieresis -17 -KPX v ae -18 -KPX v agrave -17 -KPX v aring -17 -KPX v atilde -17 -KPX v c -16 -KPX v colon -13 -KPX v comma -35 -KPX v e -12 -KPX v eacute -12 -KPX v ecircumflex -12 -KPX v egrave -12 -KPX v g -18 -KPX v hyphen 5 -KPX v l -7 -KPX v o -19 -KPX v oacute -19 -KPX v odieresis -19 -KPX v ograve -19 -KPX v oslash -16 -KPX v period -35 -KPX v s -17 -KPX v semicolon -13 -KPX w a -7 -KPX w aacute -7 -KPX w acircumflex -7 -KPX w adieresis -7 -KPX w ae -8 -KPX w agrave -7 -KPX w aring -7 -KPX w atilde -7 -KPX w c -6 -KPX w colon -10 -KPX w comma -20 -KPX w e -2 -KPX w eacute -2 -KPX w ecircumflex -2 -KPX w egrave -2 -KPX w g -8 -KPX w hyphen 14 -KPX w l -3 -KPX w o -9 -KPX w oacute -9 -KPX w odieresis -9 -KPX w ograve -9 -KPX w oslash -6 -KPX w period -20 -KPX w s -8 -KPX w semicolon -10 -KPX x a -10 -KPX x c -17 -KPX x e -13 -KPX x eacute -13 -KPX x o -20 -KPX x q -17 -KPX y a -18 -KPX y aacute -18 -KPX y acircumflex -18 -KPX y adieresis -18 -KPX y ae -19 -KPX y agrave -18 -KPX y aring -18 -KPX y atilde -18 -KPX y c -18 -KPX y colon -14 -KPX y comma -36 -KPX y e -14 -KPX y eacute -14 -KPX y ecircumflex -14 -KPX y egrave -14 -KPX y g -20 -KPX y hyphen 4 -KPX y l -8 -KPX y o -20 -KPX y oacute -20 -KPX y odieresis -20 -KPX y ograve -20 -KPX y oslash -17 -KPX y period -35 -KPX y s -19 -KPX y semicolon -14 -KPX zero four 11 -KPX zero one -10 -KPX zero seven -1 -EndKernPairs -EndKernData -EndFontMetrics diff --git a/misc/gs_afm/HelvBoO.afm b/misc/gs_afm/HelvBoO.afm deleted file mode 100644 index 37efe8a3b8..0000000000 --- a/misc/gs_afm/HelvBoO.afm +++ /dev/null @@ -1,1257 +0,0 @@ -StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 8/3/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. -FontName NimbusSanL-BoldCondItal -FullName Nimbus Sans L Bold Condensed Italic -FamilyName Nimbus Sans L -Weight Bold -ItalicAngle -9.0 -IsFixedPitch false -UnderlinePosition -100 -UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW -EncodingScheme AdobeStandardEncoding -FontBBox -143 -228 913 989 -CapHeight 718 -XHeight 532 -Descender -207 -Ascender 718 -StartCharMetrics 232 -C 32 ; WX 228 ; N space ; B 21 0 21 0 ; -C 33 ; WX 273 ; N exclam ; B 77 0 325 718 ; -C 34 ; WX 389 ; N quotedbl ; B 158 447 433 718 ; -C 35 ; WX 456 ; N numbersign ; B 49 0 528 698 ; -C 36 ; WX 456 ; N dollar ; B 55 -115 510 775 ; -C 37 ; WX 729 ; N percent ; B 112 -19 739 710 ; -C 38 ; WX 592 ; N ampersand ; B 73 -19 600 718 ; -C 39 ; WX 228 ; N quoteright ; B 137 445 297 718 ; -C 40 ; WX 273 ; N parenleft ; B 62 -207 385 734 ; -C 41 ; WX 273 ; N parenright ; B -21 -207 302 734 ; -C 42 ; WX 319 ; N asterisk ; B 120 387 394 718 ; -C 43 ; WX 479 ; N plus ; B 67 0 500 506 ; -C 44 ; WX 228 ; N comma ; B 23 -168 201 146 ; -C 45 ; WX 273 ; N hyphen ; B 60 215 311 345 ; -C 46 ; WX 228 ; N period ; B 52 0 201 146 ; -C 47 ; WX 228 ; N slash ; B -30 -19 383 737 ; -C 48 ; WX 456 ; N zero ; B 71 -19 506 710 ; -C 49 ; WX 456 ; N one ; B 142 0 434 710 ; -C 50 ; WX 456 ; N two ; B 21 0 508 710 ; -C 51 ; WX 456 ; N three ; B 54 -19 499 710 ; -C 52 ; WX 456 ; N four ; B 50 0 490 710 ; -C 53 ; WX 456 ; N five ; B 53 -19 522 698 ; -C 54 ; WX 456 ; N six ; B 70 -19 507 710 ; -C 55 ; WX 456 ; N seven ; B 102 0 555 698 ; -C 56 ; WX 456 ; N eight ; B 57 -19 505 710 ; -C 57 ; WX 456 ; N nine ; B 64 -19 504 710 ; -C 58 ; WX 273 ; N colon ; B 75 0 288 512 ; -C 59 ; WX 273 ; N semicolon ; B 46 -168 288 512 ; -C 60 ; WX 479 ; N less ; B 67 -15 537 521 ; -C 61 ; WX 479 ; N equal ; B 48 87 519 419 ; -C 62 ; WX 479 ; N greater ; B 30 -15 500 521 ; -C 63 ; WX 501 ; N question ; B 135 0 550 727 ; -C 64 ; WX 800 ; N at ; B 152 -19 782 737 ; -C 65 ; WX 592 ; N A ; B 16 0 576 718 ; -C 66 ; WX 592 ; N B ; B 62 0 626 718 ; -C 67 ; WX 592 ; N C ; B 88 -19 647 737 ; -C 68 ; WX 592 ; N D ; B 62 0 637 718 ; -C 69 ; WX 547 ; N E ; B 62 0 620 718 ; -C 70 ; WX 501 ; N F ; B 62 0 606 718 ; -C 71 ; WX 638 ; N G ; B 89 -19 670 737 ; -C 72 ; WX 592 ; N H ; B 58 0 659 718 ; -C 73 ; WX 228 ; N I ; B 52 0 301 718 ; -C 74 ; WX 456 ; N J ; B 49 -18 522 718 ; -C 75 ; WX 592 ; N K ; B 71 0 703 718 ; -C 76 ; WX 501 ; N L ; B 62 0 501 718 ; -C 77 ; WX 683 ; N M ; B 57 0 752 718 ; -C 78 ; WX 592 ; N N ; B 57 0 661 718 ; -C 79 ; WX 638 ; N O ; B 88 -19 675 737 ; -C 80 ; WX 547 ; N P ; B 62 0 605 718 ; -C 81 ; WX 638 ; N Q ; B 88 -52 675 737 ; -C 82 ; WX 592 ; N R ; B 62 0 638 718 ; -C 83 ; WX 547 ; N S ; B 66 -19 588 737 ; -C 84 ; WX 501 ; N T ; B 114 0 615 718 ; -C 85 ; WX 592 ; N U ; B 96 -19 659 718 ; -C 86 ; WX 547 ; N V ; B 141 0 656 718 ; -C 87 ; WX 774 ; N W ; B 138 0 887 718 ; -C 88 ; WX 547 ; N X ; B 11 0 648 718 ; -C 89 ; WX 547 ; N Y ; B 137 0 661 718 ; -C 90 ; WX 501 ; N Z ; B 20 0 604 718 ; -C 91 ; WX 273 ; N bracketleft ; B 17 -196 379 722 ; -C 92 ; WX 228 ; N backslash ; B 101 -19 252 737 ; -C 93 ; WX 273 ; N bracketright ; B -14 -196 347 722 ; -C 94 ; WX 479 ; N asciicircum ; B 107 323 484 698 ; -C 95 ; WX 456 ; N underscore ; B -22 -125 443 -75 ; -C 96 ; WX 228 ; N quoteleft ; B 136 454 296 727 ; -C 97 ; WX 456 ; N a ; B 45 -14 478 546 ; -C 98 ; WX 501 ; N b ; B 50 -14 529 718 ; -C 99 ; WX 456 ; N c ; B 65 -14 491 546 ; -C 100 ; WX 501 ; N d ; B 67 -14 577 718 ; -C 101 ; WX 456 ; N e ; B 58 -14 486 546 ; -C 102 ; WX 273 ; N f ; B 71 0 385 727 ; -C 103 ; WX 501 ; N g ; B 31 -217 546 546 ; -C 104 ; WX 501 ; N h ; B 53 0 516 718 ; -C 105 ; WX 228 ; N i ; B 57 0 298 725 ; -C 106 ; WX 228 ; N j ; B -35 -214 298 725 ; -C 107 ; WX 456 ; N k ; B 57 0 549 718 ; -C 108 ; WX 228 ; N l ; B 57 0 297 718 ; -C 109 ; WX 729 ; N m ; B 52 0 746 546 ; -C 110 ; WX 501 ; N n ; B 53 0 516 546 ; -C 111 ; WX 501 ; N o ; B 67 -14 527 546 ; -C 112 ; WX 501 ; N p ; B 15 -207 529 546 ; -C 113 ; WX 501 ; N q ; B 66 -207 545 546 ; -C 114 ; WX 319 ; N r ; B 52 0 401 546 ; -C 115 ; WX 456 ; N s ; B 52 -14 479 546 ; -C 116 ; WX 273 ; N t ; B 82 -6 346 676 ; -C 117 ; WX 501 ; N u ; B 80 -14 540 532 ; -C 118 ; WX 456 ; N v ; B 103 0 538 532 ; -C 119 ; WX 638 ; N w ; B 101 0 723 532 ; -C 120 ; WX 456 ; N x ; B 12 0 531 532 ; -C 121 ; WX 456 ; N y ; B 34 -214 535 532 ; -C 122 ; WX 410 ; N z ; B 16 0 478 532 ; -C 123 ; WX 319 ; N braceleft ; B 77 -196 425 722 ; -C 124 ; WX 230 ; N bar ; B 66 -19 289 737 ; -C 125 ; WX 319 ; N braceright ; B -14 -196 333 722 ; -C 126 ; WX 479 ; N asciitilde ; B 94 173 473 336 ; -C 161 ; WX 273 ; N exclamdown ; B 41 -186 290 532 ; -C 162 ; WX 456 ; N cent ; B 65 -118 491 628 ; -C 163 ; WX 456 ; N sterling ; B 41 -16 520 718 ; -C 164 ; WX 137 ; N fraction ; B -143 -19 399 710 ; -C 165 ; WX 456 ; N yen ; B 49 0 585 698 ; -C 166 ; WX 456 ; N florin ; B -41 -210 548 737 ; -C 167 ; WX 456 ; N section ; B 50 -184 491 727 ; -C 168 ; WX 456 ; N currency ; B 22 76 558 636 ; -C 169 ; WX 195 ; N quotesingle ; B 135 447 263 718 ; -C 170 ; WX 410 ; N quotedblleft ; B 132 454 482 727 ; -C 171 ; WX 456 ; N guillemotleft ; B 111 76 468 484 ; -C 172 ; WX 273 ; N guilsinglleft ; B 106 76 289 484 ; -C 173 ; WX 273 ; N guilsinglright ; B 81 76 264 484 ; -C 174 ; WX 501 ; N fi ; B 71 0 571 727 ; -C 175 ; WX 501 ; N fl ; B 71 0 570 727 ; -C 177 ; WX 456 ; N endash ; B 40 227 514 333 ; -C 178 ; WX 456 ; N dagger ; B 97 -171 513 718 ; -C 179 ; WX 456 ; N daggerdbl ; B 38 -171 515 718 ; -C 180 ; WX 228 ; N periodcentered ; B 90 172 226 334 ; -C 182 ; WX 456 ; N paragraph ; B 80 -191 564 700 ; -C 183 ; WX 287 ; N bullet ; B 68 194 345 524 ; -C 184 ; WX 228 ; N quotesinglbase ; B 34 -146 194 127 ; -C 185 ; WX 410 ; N quotedblbase ; B 29 -146 380 127 ; -C 186 ; WX 410 ; N quotedblright ; B 132 445 483 718 ; -C 187 ; WX 456 ; N guillemotright ; B 85 76 443 484 ; -C 188 ; WX 820 ; N ellipsis ; B 75 0 770 146 ; -C 189 ; WX 820 ; N perthousand ; B 62 -19 851 710 ; -C 191 ; WX 501 ; N questiondown ; B 44 -195 459 532 ; -C 193 ; WX 273 ; N grave ; B 112 604 290 750 ; -C 194 ; WX 273 ; N acute ; B 194 604 423 750 ; -C 195 ; WX 273 ; N circumflex ; B 97 604 387 750 ; -C 196 ; WX 273 ; N tilde ; B 92 610 415 737 ; -C 197 ; WX 273 ; N macron ; B 100 604 396 678 ; -C 198 ; WX 273 ; N breve ; B 128 604 405 750 ; -C 199 ; WX 273 ; N dotaccent ; B 192 614 316 729 ; -C 200 ; WX 273 ; N dieresis ; B 112 614 395 729 ; -C 202 ; WX 273 ; N ring ; B 164 568 344 776 ; -C 203 ; WX 273 ; N cedilla ; B -30 -228 180 0 ; -C 205 ; WX 273 ; N hungarumlaut ; B 113 604 529 750 ; -C 206 ; WX 273 ; N ogonek ; B 33 -228 216 0 ; -C 207 ; WX 273 ; N caron ; B 123 604 412 750 ; -C 208 ; WX 820 ; N emdash ; B 40 227 878 333 ; -C 225 ; WX 820 ; N AE ; B 4 0 902 718 ; -C 227 ; WX 303 ; N ordfeminine ; B 75 276 381 737 ; -C 232 ; WX 501 ; N Lslash ; B 28 0 501 718 ; -C 233 ; WX 638 ; N Oslash ; B 29 -27 733 745 ; -C 234 ; WX 820 ; N OE ; B 81 -19 913 737 ; -C 235 ; WX 299 ; N ordmasculine ; B 75 276 398 737 ; -C 241 ; WX 729 ; N ae ; B 46 -14 757 546 ; -C 245 ; WX 228 ; N dotlessi ; B 57 0 264 532 ; -C 248 ; WX 228 ; N lslash ; B 33 0 334 718 ; -C 249 ; WX 501 ; N oslash ; B 18 -29 575 560 ; -C 250 ; WX 774 ; N oe ; B 67 -14 801 546 ; -C 251 ; WX 501 ; N germandbls ; B 57 -14 539 731 ; -C -1 ; WX 547 ; N Yacute ; B 137 0 661 936 ; -C -1 ; WX 592 ; N Ucircumflex ; B 96 -19 659 936 ; -C -1 ; WX 592 ; N Ugrave ; B 96 -19 659 936 ; -C -1 ; WX 501 ; N Zcaron ; B 20 0 604 936 ; -C -1 ; WX 547 ; N Ydieresis ; B 137 0 661 915 ; -C -1 ; WX 273 ; N threesuperior ; B 75 271 361 722 ; -C -1 ; WX 592 ; N Uacute ; B 96 -19 659 936 ; -C -1 ; WX 273 ; N twosuperior ; B 57 283 368 722 ; -C -1 ; WX 592 ; N Udieresis ; B 96 -19 659 915 ; -C -1 ; WX 228 ; N middot ; B 90 172 226 334 ; -C -1 ; WX 273 ; N onesuperior ; B 121 283 318 710 ; -C -1 ; WX 456 ; N aacute ; B 45 -14 514 750 ; -C -1 ; WX 456 ; N agrave ; B 45 -14 478 750 ; -C -1 ; WX 456 ; N acircumflex ; B 45 -14 478 750 ; -C -1 ; WX 547 ; N Scaron ; B 66 -19 588 936 ; -C -1 ; WX 638 ; N Otilde ; B 88 -19 675 923 ; -C -1 ; WX 273 ; N sfthyphen ; B 60 215 311 345 ; -C -1 ; WX 456 ; N atilde ; B 45 -14 507 737 ; -C -1 ; WX 456 ; N aring ; B 45 -14 478 803 ; -C -1 ; WX 456 ; N adieresis ; B 45 -14 487 729 ; -C -1 ; WX 638 ; N Ograve ; B 88 -19 675 936 ; -C -1 ; WX 638 ; N Ocircumflex ; B 88 -19 675 936 ; -C -1 ; WX 638 ; N Odieresis ; B 88 -19 675 915 ; -C -1 ; WX 592 ; N Ntilde ; B 57 0 661 923 ; -C -1 ; WX 456 ; N edieresis ; B 58 -14 488 729 ; -C -1 ; WX 456 ; N eacute ; B 58 -14 515 750 ; -C -1 ; WX 456 ; N egrave ; B 58 -14 486 750 ; -C -1 ; WX 228 ; N Icircumflex ; B 52 0 397 936 ; -C -1 ; WX 456 ; N ecircumflex ; B 58 -14 486 750 ; -C -1 ; WX 228 ; N Igrave ; B 52 0 301 936 ; -C -1 ; WX 228 ; N Iacute ; B 52 0 433 936 ; -C -1 ; WX 228 ; N Idieresis ; B 52 0 405 915 ; -C -1 ; WX 328 ; N degree ; B 143 426 383 712 ; -C -1 ; WX 547 ; N Ecircumflex ; B 62 0 620 936 ; -C -1 ; WX 479 ; N minus ; B 67 197 500 309 ; -C -1 ; WX 479 ; N multiply ; B 47 1 520 505 ; -C -1 ; WX 479 ; N divide ; B 67 -42 500 548 ; -C -1 ; WX 547 ; N Egrave ; B 62 0 620 936 ; -C -1 ; WX 820 ; N trademark ; B 146 306 909 718 ; -C -1 ; WX 638 ; N Oacute ; B 88 -19 675 936 ; -C -1 ; WX 501 ; N thorn ; B 15 -207 529 718 ; -C -1 ; WX 501 ; N eth ; B 67 -14 549 737 ; -C -1 ; WX 547 ; N Eacute ; B 62 0 620 936 ; -C -1 ; WX 456 ; N ccedilla ; B 65 -228 491 546 ; -C -1 ; WX 228 ; N idieresis ; B 57 0 373 729 ; -C -1 ; WX 228 ; N iacute ; B 57 0 401 750 ; -C -1 ; WX 228 ; N igrave ; B 57 0 268 750 ; -C -1 ; WX 479 ; N plusminus ; B 33 0 512 578 ; -C -1 ; WX 684 ; N onehalf ; B 108 -19 704 710 ; -C -1 ; WX 684 ; N onequarter ; B 108 -19 661 710 ; -C -1 ; WX 684 ; N threequarters ; B 82 -19 688 722 ; -C -1 ; WX 228 ; N icircumflex ; B 57 0 365 750 ; -C -1 ; WX 547 ; N Edieresis ; B 62 0 620 915 ; -C -1 ; WX 501 ; N ntilde ; B 53 0 529 737 ; -C -1 ; WX 592 ; N Aring ; B 16 0 576 989 ; -C -1 ; WX 501 ; N odieresis ; B 67 -14 527 729 ; -C -1 ; WX 501 ; N oacute ; B 67 -14 537 750 ; -C -1 ; WX 501 ; N ograve ; B 67 -14 527 750 ; -C -1 ; WX 501 ; N ocircumflex ; B 67 -14 527 750 ; -C -1 ; WX 501 ; N otilde ; B 67 -14 529 737 ; -C -1 ; WX 456 ; N scaron ; B 52 -14 503 750 ; -C -1 ; WX 501 ; N udieresis ; B 80 -14 540 729 ; -C -1 ; WX 501 ; N uacute ; B 80 -14 540 750 ; -C -1 ; WX 501 ; N ugrave ; B 80 -14 540 750 ; -C -1 ; WX 501 ; N ucircumflex ; B 80 -14 540 750 ; -C -1 ; WX 456 ; N yacute ; B 34 -214 535 750 ; -C -1 ; WX 410 ; N zcaron ; B 16 0 480 750 ; -C -1 ; WX 456 ; N ydieresis ; B 34 -214 535 729 ; -C -1 ; WX 604 ; N copyright ; B 46 -19 685 737 ; -C -1 ; WX 604 ; N registered ; B 45 -19 684 737 ; -C -1 ; WX 592 ; N Atilde ; B 16 0 607 923 ; -C -1 ; WX 228 ; N nbspace ; B 21 0 21 0 ; -C -1 ; WX 592 ; N Ccedilla ; B 88 -228 647 737 ; -C -1 ; WX 592 ; N Acircumflex ; B 16 0 579 936 ; -C -1 ; WX 592 ; N Agrave ; B 16 0 576 936 ; -C -1 ; WX 479 ; N logicalnot ; B 86 108 519 419 ; -C -1 ; WX 592 ; N Aacute ; B 16 0 615 936 ; -C -1 ; WX 592 ; N Eth ; B 51 0 637 718 ; -C -1 ; WX 230 ; N brokenbar ; B 66 -19 289 737 ; -C -1 ; WX 547 ; N Thorn ; B 62 0 588 718 ; -C -1 ; WX 592 ; N Adieresis ; B 16 0 587 915 ; -C -1 ; WX 501 ; N mu ; B 18 -207 540 532 ; -C -1 ; WX 228 ; N .notdef ; B 21 0 21 0 ; -EndCharMetrics -StartKernData -StartKernPairs 998 -KPX A C -30 -KPX A Ccedilla -29 -KPX A G -31 -KPX A O -31 -KPX A Odieresis -31 -KPX A Q -30 -KPX A T -72 -KPX A U -29 -KPX A Uacute -29 -KPX A Ucircumflex -29 -KPX A Udieresis -29 -KPX A Ugrave -29 -KPX A V -56 -KPX A W -46 -KPX A Y -74 -KPX A a -11 -KPX A b -11 -KPX A c -15 -KPX A ccedilla -14 -KPX A comma 9 -KPX A d -14 -KPX A e -11 -KPX A g -19 -KPX A guillemotleft -41 -KPX A guilsinglleft -39 -KPX A hyphen 1 -KPX A o -17 -KPX A period 11 -KPX A q -14 -KPX A quotedblright -54 -KPX A quoteright -56 -KPX A t -16 -KPX A u -16 -KPX A v -34 -KPX A w -24 -KPX A y -32 -KPX Aacute C -31 -KPX Aacute G -32 -KPX Aacute O -32 -KPX Aacute Q -32 -KPX Aacute T -72 -KPX Aacute U -30 -KPX Aacute V -56 -KPX Aacute W -46 -KPX Aacute Y -74 -KPX Aacute a -11 -KPX Aacute b -11 -KPX Aacute c -16 -KPX Aacute comma 9 -KPX Aacute d -15 -KPX Aacute e -12 -KPX Aacute g -19 -KPX Aacute guillemotleft -42 -KPX Aacute guilsinglleft -39 -KPX Aacute hyphen 1 -KPX Aacute o -19 -KPX Aacute period 10 -KPX Aacute q -15 -KPX Aacute quoteright -56 -KPX Aacute t -17 -KPX Aacute u -17 -KPX Aacute v -33 -KPX Aacute w -24 -KPX Aacute y -32 -KPX Acircumflex C -29 -KPX Acircumflex G -30 -KPX Acircumflex O -30 -KPX Acircumflex Q -30 -KPX Acircumflex T -72 -KPX Acircumflex U -29 -KPX Acircumflex V -56 -KPX Acircumflex W -46 -KPX Acircumflex Y -74 -KPX Acircumflex comma 10 -KPX Acircumflex period 11 -KPX Adieresis C -30 -KPX Adieresis G -31 -KPX Adieresis O -31 -KPX Adieresis Q -31 -KPX Adieresis T -72 -KPX Adieresis U -30 -KPX Adieresis V -56 -KPX Adieresis W -46 -KPX Adieresis Y -74 -KPX Adieresis a -11 -KPX Adieresis b -11 -KPX Adieresis c -15 -KPX Adieresis comma 9 -KPX Adieresis d -15 -KPX Adieresis g -19 -KPX Adieresis guillemotleft -42 -KPX Adieresis guilsinglleft -39 -KPX Adieresis hyphen 1 -KPX Adieresis o -18 -KPX Adieresis period 10 -KPX Adieresis q -15 -KPX Adieresis quotedblright -54 -KPX Adieresis quoteright -56 -KPX Adieresis t -16 -KPX Adieresis u -16 -KPX Adieresis v -34 -KPX Adieresis w -24 -KPX Adieresis y -32 -KPX Agrave C -30 -KPX Agrave G -31 -KPX Agrave O -31 -KPX Agrave Q -30 -KPX Agrave T -72 -KPX Agrave U -29 -KPX Agrave V -56 -KPX Agrave W -46 -KPX Agrave Y -74 -KPX Agrave comma 9 -KPX Agrave period 11 -KPX Aring C -30 -KPX Aring G -31 -KPX Aring O -31 -KPX Aring Q -30 -KPX Aring T -72 -KPX Aring U -29 -KPX Aring V -56 -KPX Aring W -46 -KPX Aring Y -74 -KPX Aring a -11 -KPX Aring b -11 -KPX Aring c -15 -KPX Aring comma 9 -KPX Aring d -14 -KPX Aring e -11 -KPX Aring g -19 -KPX Aring guillemotleft -41 -KPX Aring guilsinglleft -39 -KPX Aring hyphen 1 -KPX Aring o -17 -KPX Aring period 11 -KPX Aring q -14 -KPX Aring quotedblright -54 -KPX Aring quoteright -56 -KPX Aring t -16 -KPX Aring u -16 -KPX Aring v -34 -KPX Aring w -24 -KPX Aring y -32 -KPX Atilde C -31 -KPX Atilde G -32 -KPX Atilde O -32 -KPX Atilde Q -32 -KPX Atilde T -73 -KPX Atilde U -31 -KPX Atilde V -56 -KPX Atilde W -46 -KPX Atilde Y -74 -KPX Atilde comma 9 -KPX Atilde period 9 -KPX B A -26 -KPX B AE -21 -KPX B Aacute -26 -KPX B Acircumflex -26 -KPX B Adieresis -26 -KPX B Aring -26 -KPX B Atilde -26 -KPX B O -12 -KPX B OE -6 -KPX B Oacute -12 -KPX B Ocircumflex -12 -KPX B Odieresis -12 -KPX B Ograve -12 -KPX B Oslash -8 -KPX B V -30 -KPX B W -21 -KPX B Y -40 -KPX C A -29 -KPX C AE -23 -KPX C Aacute -29 -KPX C Adieresis -29 -KPX C Aring -29 -KPX C H -7 -KPX C K -13 -KPX C O -12 -KPX C Oacute -12 -KPX C Odieresis -12 -KPX Ccedilla A -31 -KPX D A -31 -KPX D Aacute -31 -KPX D Acircumflex -31 -KPX D Adieresis -31 -KPX D Agrave -31 -KPX D Aring -31 -KPX D Atilde -31 -KPX D J -1 -KPX D T -14 -KPX D V -25 -KPX D W -15 -KPX D X -28 -KPX D Y -43 -KPX F A -53 -KPX F Aacute -53 -KPX F Acircumflex -53 -KPX F Adieresis -53 -KPX F Agrave -53 -KPX F Aring -53 -KPX F Atilde -53 -KPX F J -24 -KPX F O -19 -KPX F Odieresis -19 -KPX F a -24 -KPX F aacute -24 -KPX F adieresis -24 -KPX F ae -24 -KPX F aring -24 -KPX F comma -77 -KPX F e -15 -KPX F eacute -15 -KPX F hyphen 0 -KPX F i -14 -KPX F j -13 -KPX F o -20 -KPX F oacute -20 -KPX F odieresis -20 -KPX F oe -19 -KPX F oslash -20 -KPX F period -77 -KPX F r -30 -KPX F u -31 -KPX G A -8 -KPX G AE -2 -KPX G Aacute -8 -KPX G Acircumflex -8 -KPX G Adieresis -8 -KPX G Agrave -8 -KPX G Aring -8 -KPX G Atilde -8 -KPX G T -18 -KPX G V -29 -KPX G W -20 -KPX G Y -47 -KPX J A -30 -KPX J AE -25 -KPX J Adieresis -30 -KPX J Aring -30 -KPX K C -41 -KPX K G -43 -KPX K O -42 -KPX K OE -36 -KPX K Oacute -42 -KPX K Odieresis -42 -KPX K S -30 -KPX K T 14 -KPX K a -10 -KPX K adieresis -10 -KPX K ae -11 -KPX K aring -10 -KPX K e -27 -KPX K hyphen -34 -KPX K o -35 -KPX K oacute -35 -KPX K odieresis -35 -KPX K u -30 -KPX K udieresis -30 -KPX K y -57 -KPX L A 6 -KPX L AE 12 -KPX L Aacute 6 -KPX L Adieresis 6 -KPX L Aring 6 -KPX L C -25 -KPX L Ccedilla -26 -KPX L G -27 -KPX L O -26 -KPX L Oacute -26 -KPX L Ocircumflex -26 -KPX L Odieresis -26 -KPX L Ograve -26 -KPX L Otilde -26 -KPX L S -8 -KPX L T -79 -KPX L U -23 -KPX L Udieresis -23 -KPX L V -75 -KPX L W -60 -KPX L Y -92 -KPX L hyphen -19 -KPX L quotedblright -123 -KPX L quoteright -125 -KPX L u -17 -KPX L udieresis -17 -KPX L y -50 -KPX N A -10 -KPX N AE -4 -KPX N Aacute -10 -KPX N Adieresis -10 -KPX N Aring -10 -KPX N C -3 -KPX N Ccedilla -2 -KPX N G -4 -KPX N O -4 -KPX N Oacute -4 -KPX N Odieresis -4 -KPX N a -1 -KPX N aacute -1 -KPX N adieresis -1 -KPX N ae -2 -KPX N aring -1 -KPX N comma 5 -KPX N e 2 -KPX N eacute 2 -KPX N o -3 -KPX N oacute -3 -KPX N odieresis -3 -KPX N oslash 0 -KPX N period 5 -KPX N u -2 -KPX N udieresis -2 -KPX O A -35 -KPX O AE -29 -KPX O Aacute -35 -KPX O Adieresis -35 -KPX O Aring -35 -KPX O T -21 -KPX O V -29 -KPX O W -20 -KPX O X -32 -KPX O Y -50 -KPX Oacute A -35 -KPX Oacute T -21 -KPX Oacute V -29 -KPX Oacute W -20 -KPX Oacute Y -50 -KPX Ocircumflex T -21 -KPX Ocircumflex V -29 -KPX Ocircumflex Y -50 -KPX Odieresis A -35 -KPX Odieresis T -21 -KPX Odieresis V -29 -KPX Odieresis W -20 -KPX Odieresis X -32 -KPX Odieresis Y -50 -KPX Ograve T -21 -KPX Ograve V -29 -KPX Ograve Y -50 -KPX Oslash A -31 -KPX Otilde T -21 -KPX Otilde V -29 -KPX Otilde Y -50 -KPX P A -61 -KPX P AE -56 -KPX P Aacute -61 -KPX P Adieresis -61 -KPX P Aring -61 -KPX P J -45 -KPX P a -22 -KPX P aacute -22 -KPX P adieresis -22 -KPX P ae -22 -KPX P aring -22 -KPX P comma -98 -KPX P e -20 -KPX P eacute -20 -KPX P hyphen -13 -KPX P o -25 -KPX P oacute -25 -KPX P odieresis -25 -KPX P oe -25 -KPX P oslash -25 -KPX P period -98 -KPX R C -9 -KPX R Ccedilla -8 -KPX R G -10 -KPX R O -10 -KPX R OE -4 -KPX R Oacute -10 -KPX R Odieresis -10 -KPX R T -9 -KPX R U -8 -KPX R Udieresis -8 -KPX R V -27 -KPX R W -18 -KPX R Y -36 -KPX R a -6 -KPX R aacute -6 -KPX R adieresis -6 -KPX R ae -7 -KPX R aring -6 -KPX R e -3 -KPX R eacute -3 -KPX R hyphen 7 -KPX R o -9 -KPX R oacute -9 -KPX R odieresis -9 -KPX R oe -9 -KPX R u -7 -KPX R uacute -7 -KPX R udieresis -7 -KPX R y -6 -KPX S A -20 -KPX S AE -14 -KPX S Aacute -20 -KPX S Adieresis -20 -KPX S Aring -20 -KPX S T -12 -KPX S V -29 -KPX S W -19 -KPX S Y -39 -KPX S t -5 -KPX T A -72 -KPX T AE -68 -KPX T Aacute -72 -KPX T Acircumflex -72 -KPX T Adieresis -72 -KPX T Agrave -72 -KPX T Aring -72 -KPX T Atilde -72 -KPX T C -17 -KPX T G -18 -KPX T J -77 -KPX T O -19 -KPX T OE -12 -KPX T Oacute -19 -KPX T Ocircumflex -19 -KPX T Odieresis -19 -KPX T Ograve -19 -KPX T Oslash -19 -KPX T Otilde -19 -KPX T S -2 -KPX T V 11 -KPX T W 13 -KPX T Y 13 -KPX T a -68 -KPX T ae -69 -KPX T c -68 -KPX T colon -78 -KPX T comma -61 -KPX T e -64 -KPX T g -69 -KPX T guillemotleft -92 -KPX T guilsinglleft -89 -KPX T hyphen -46 -KPX T i -9 -KPX T j -9 -KPX T o -71 -KPX T oslash -67 -KPX T period -61 -KPX T r -64 -KPX T s -69 -KPX T semicolon -79 -KPX T u -68 -KPX T v -77 -KPX T w -72 -KPX T y -76 -KPX U A -32 -KPX U AE -27 -KPX U Aacute -32 -KPX U Acircumflex -32 -KPX U Adieresis -32 -KPX U Aring -32 -KPX U Atilde -32 -KPX U comma -14 -KPX U m -5 -KPX U n -5 -KPX U p -5 -KPX U period -11 -KPX U r -5 -KPX Uacute A -32 -KPX Uacute comma -14 -KPX Uacute m -5 -KPX Uacute n -5 -KPX Uacute p -5 -KPX Uacute period -11 -KPX Uacute r -5 -KPX Ucircumflex A -32 -KPX Udieresis A -32 -KPX Udieresis b -5 -KPX Udieresis comma -14 -KPX Udieresis m -5 -KPX Udieresis n -5 -KPX Udieresis p -5 -KPX Udieresis period -11 -KPX Udieresis r -5 -KPX Ugrave A -32 -KPX V A -57 -KPX V AE -52 -KPX V Aacute -57 -KPX V Acircumflex -57 -KPX V Adieresis -57 -KPX V Agrave -57 -KPX V Aring -57 -KPX V Atilde -57 -KPX V C -32 -KPX V G -33 -KPX V O -33 -KPX V Oacute -33 -KPX V Ocircumflex -33 -KPX V Odieresis -33 -KPX V Ograve -33 -KPX V Oslash -29 -KPX V Otilde -33 -KPX V S -22 -KPX V T 13 -KPX V a -45 -KPX V ae -46 -KPX V colon -47 -KPX V comma -58 -KPX V e -41 -KPX V g -45 -KPX V guillemotleft -67 -KPX V guilsinglleft -65 -KPX V hyphen -21 -KPX V i -12 -KPX V o -47 -KPX V oslash -44 -KPX V period -58 -KPX V r -36 -KPX V semicolon -47 -KPX V u -40 -KPX V y -17 -KPX W A -47 -KPX W AE -42 -KPX W Aacute -47 -KPX W Acircumflex -47 -KPX W Adieresis -47 -KPX W Agrave -47 -KPX W Aring -47 -KPX W Atilde -47 -KPX W C -22 -KPX W G -23 -KPX W O -23 -KPX W Oacute -23 -KPX W Ocircumflex -23 -KPX W Odieresis -23 -KPX W Ograve -23 -KPX W Oslash -19 -KPX W Otilde -23 -KPX W S -17 -KPX W T 15 -KPX W a -32 -KPX W ae -33 -KPX W colon -40 -KPX W comma -42 -KPX W e -28 -KPX W g -32 -KPX W guillemotleft -55 -KPX W guilsinglleft -52 -KPX W hyphen -9 -KPX W i -10 -KPX W o -34 -KPX W oslash -31 -KPX W period -42 -KPX W r -27 -KPX W semicolon -41 -KPX W u -32 -KPX W y -11 -KPX X C -32 -KPX X O -33 -KPX X Odieresis -33 -KPX X Q -33 -KPX X a -15 -KPX X e -31 -KPX X hyphen -27 -KPX X o -37 -KPX X u -34 -KPX X y -44 -KPX Y A -73 -KPX Y AE -68 -KPX Y Aacute -73 -KPX Y Acircumflex -73 -KPX Y Adieresis -73 -KPX Y Agrave -73 -KPX Y Aring -73 -KPX Y Atilde -73 -KPX Y C -45 -KPX Y G -46 -KPX Y O -46 -KPX Y Oacute -46 -KPX Y Ocircumflex -46 -KPX Y Odieresis -46 -KPX Y Ograve -46 -KPX Y Oslash -45 -KPX Y Otilde -46 -KPX Y S -27 -KPX Y T 16 -KPX Y a -64 -KPX Y ae -65 -KPX Y colon -61 -KPX Y comma -70 -KPX Y e -60 -KPX Y g -64 -KPX Y guillemotleft -91 -KPX Y guilsinglleft -88 -KPX Y hyphen -49 -KPX Y i -9 -KPX Y o -66 -KPX Y oslash -63 -KPX Y p -48 -KPX Y period -70 -KPX Y semicolon -61 -KPX Y u -54 -KPX Y v -31 -KPX Z v -19 -KPX Z y -18 -KPX a j -2 -KPX a quoteright -11 -KPX a v -16 -KPX a w -7 -KPX a y -17 -KPX aacute v -17 -KPX aacute w -8 -KPX aacute y -17 -KPX adieresis v -17 -KPX adieresis w -8 -KPX adieresis y -17 -KPX ae v -17 -KPX ae w -7 -KPX ae y -19 -KPX agrave v -16 -KPX agrave w -7 -KPX agrave y -17 -KPX aring v -16 -KPX aring w -7 -KPX aring y -17 -KPX b v -16 -KPX b w -6 -KPX b y -17 -KPX c h -6 -KPX c k -8 -KPX comma one -64 -KPX comma quotedblright -27 -KPX comma quoteright -29 -KPX e quoteright -12 -KPX e t -4 -KPX e v -16 -KPX e w -6 -KPX e x -19 -KPX e y -18 -KPX eacute v -17 -KPX eacute w -8 -KPX eacute y -18 -KPX ecircumflex v -16 -KPX ecircumflex w -6 -KPX ecircumflex y -18 -KPX eight four 2 -KPX eight one -24 -KPX eight seven -10 -KPX f a -12 -KPX f aacute -12 -KPX f adieresis -12 -KPX f ae -13 -KPX f aring -12 -KPX f e -10 -KPX f eacute -10 -KPX f f 12 -KPX f i -11 -KPX f j -11 -KPX f l -11 -KPX f o -16 -KPX f oacute -16 -KPX f odieresis -16 -KPX f oe -16 -KPX f oslash -13 -KPX f quoteright 0 -KPX f s -13 -KPX f t 12 -KPX five four 0 -KPX five one -30 -KPX five seven -10 -KPX four four 3 -KPX four one -46 -KPX four seven -27 -KPX g a -2 -KPX g adieresis -2 -KPX g ae -3 -KPX g aring -2 -KPX g e 1 -KPX g eacute 1 -KPX g l 0 -KPX g oacute -5 -KPX g odieresis -5 -KPX g r 1 -KPX guillemotright A -41 -KPX guillemotright AE -36 -KPX guillemotright Aacute -41 -KPX guillemotright Adieresis -41 -KPX guillemotright Aring -41 -KPX guillemotright T -89 -KPX guillemotright V -63 -KPX guillemotright W -51 -KPX guillemotright Y -91 -KPX guilsinglright A -40 -KPX guilsinglright AE -34 -KPX guilsinglright Aacute -40 -KPX guilsinglright Adieresis -40 -KPX guilsinglright Aring -40 -KPX guilsinglright T -87 -KPX guilsinglright V -61 -KPX guilsinglright W -49 -KPX guilsinglright Y -89 -KPX h quoteright -13 -KPX h y -19 -KPX hyphen A 1 -KPX hyphen AE 6 -KPX hyphen Aacute 1 -KPX hyphen Adieresis 1 -KPX hyphen Aring 1 -KPX hyphen T -45 -KPX hyphen V -19 -KPX hyphen W -8 -KPX hyphen Y -51 -KPX i T -9 -KPX i j -3 -KPX k a -9 -KPX k aacute -9 -KPX k adieresis -9 -KPX k ae -9 -KPX k aring -9 -KPX k comma 6 -KPX k e -12 -KPX k eacute -12 -KPX k g -17 -KPX k hyphen -16 -KPX k o -18 -KPX k oacute -18 -KPX k odieresis -18 -KPX k period 7 -KPX k s -16 -KPX k u -12 -KPX k udieresis -6 -KPX l v -14 -KPX l y -13 -KPX m p -2 -KPX m v -17 -KPX m w -8 -KPX m y -18 -KPX n T -67 -KPX n p -3 -KPX n quoteright -13 -KPX n v -18 -KPX n w -9 -KPX n y -19 -KPX nine four 0 -KPX nine one -21 -KPX nine seven -14 -KPX o T -68 -KPX o quoteright -17 -KPX o t -7 -KPX o v -19 -KPX o w -9 -KPX o x -23 -KPX o y -21 -KPX oacute v -19 -KPX oacute w -9 -KPX oacute y -21 -KPX ocircumflex t -7 -KPX odieresis t -7 -KPX odieresis v -19 -KPX odieresis w -9 -KPX odieresis x -23 -KPX odieresis y -21 -KPX ograve v -19 -KPX ograve w -9 -KPX ograve y -21 -KPX one comma -39 -KPX one eight -41 -KPX one five -40 -KPX one four -57 -KPX one nine -41 -KPX one one -74 -KPX one period -39 -KPX one seven -55 -KPX one six -39 -KPX one three -46 -KPX one two -47 -KPX one zero -38 -KPX p t -4 -KPX p y -18 -KPX period one -64 -KPX period quotedblright -27 -KPX period quoteright -29 -KPX q c -2 -KPX q u -2 -KPX quotedblbase A 9 -KPX quotedblbase AE 15 -KPX quotedblbase T -61 -KPX quotedblbase V -58 -KPX quotedblbase W -43 -KPX quotedblbase Y -74 -KPX quotedblleft A -55 -KPX quotedblleft AE -50 -KPX quotedblleft Aacute -55 -KPX quotedblleft Adieresis -55 -KPX quotedblleft Aring -55 -KPX quotedblleft T -6 -KPX quotedblleft V 4 -KPX quotedblleft W 9 -KPX quotedblleft Y -6 -KPX quotedblright A -57 -KPX quotedblright AE -53 -KPX quotedblright Aacute -57 -KPX quotedblright Adieresis -57 -KPX quotedblright Aring -57 -KPX quotedblright T -4 -KPX quotedblright V 2 -KPX quotedblright W 8 -KPX quotedblright Y -8 -KPX quoteleft A -57 -KPX quoteleft AE -52 -KPX quoteleft Aacute -57 -KPX quoteleft Adieresis -57 -KPX quoteleft Aring -57 -KPX quoteleft T -8 -KPX quoteleft V 2 -KPX quoteleft W 7 -KPX quoteleft Y -8 -KPX quoteright A -59 -KPX quoteright AE -55 -KPX quoteright Aacute -59 -KPX quoteright Adieresis -59 -KPX quoteright Aring -59 -KPX quoteright comma -35 -KPX quoteright d -23 -KPX quoteright o -29 -KPX quoteright period -35 -KPX quoteright r -11 -KPX quoteright s -21 -KPX quoteright t -1 -KPX quoteright v -3 -KPX quoteright w 0 -KPX quoteright y -2 -KPX r a -9 -KPX r aacute -9 -KPX r acircumflex -9 -KPX r adieresis -9 -KPX r ae -9 -KPX r agrave -9 -KPX r aring -9 -KPX r c -12 -KPX r ccedilla -7 -KPX r colon -19 -KPX r comma -47 -KPX r d -9 -KPX r e -8 -KPX r eacute -8 -KPX r ecircumflex -8 -KPX r egrave -8 -KPX r f 12 -KPX r g -6 -KPX r h -10 -KPX r hyphen -30 -KPX r i -13 -KPX r j -12 -KPX r k -12 -KPX r l -12 -KPX r m -10 -KPX r n -11 -KPX r o -13 -KPX r oacute -13 -KPX r ocircumflex -13 -KPX r odieresis -13 -KPX r oe -12 -KPX r ograve -13 -KPX r oslash -12 -KPX r p -10 -KPX r period -47 -KPX r q -8 -KPX r quoteright 4 -KPX r r -10 -KPX r s -8 -KPX r semicolon -19 -KPX r t 12 -KPX r u -12 -KPX r v 8 -KPX r w 10 -KPX r x 4 -KPX r y 9 -KPX r z 0 -KPX s quoteright -12 -KPX s t -8 -KPX seven colon -48 -KPX seven comma -77 -KPX seven eight -11 -KPX seven five -20 -KPX seven four -59 -KPX seven one -14 -KPX seven period -77 -KPX seven seven 5 -KPX seven six -16 -KPX seven three -8 -KPX seven two -8 -KPX six four 0 -KPX six one -23 -KPX six seven -9 -KPX t S -5 -KPX t a -3 -KPX t aacute -3 -KPX t adieresis -3 -KPX t ae -3 -KPX t aring -3 -KPX t colon -19 -KPX t e -6 -KPX t eacute -6 -KPX t h -4 -KPX t o -12 -KPX t oacute -12 -KPX t odieresis -12 -KPX t quoteright -1 -KPX t semicolon -19 -KPX three four 0 -KPX three one -27 -KPX three seven -13 -KPX two four -21 -KPX two one -21 -KPX two seven -10 -KPX u quoteright -4 -KPX v a -21 -KPX v aacute -21 -KPX v acircumflex -21 -KPX v adieresis -21 -KPX v ae -22 -KPX v agrave -21 -KPX v aring -21 -KPX v atilde -21 -KPX v c -21 -KPX v colon -20 -KPX v comma -40 -KPX v e -17 -KPX v eacute -17 -KPX v ecircumflex -17 -KPX v egrave -17 -KPX v g -21 -KPX v hyphen 0 -KPX v l -12 -KPX v o -23 -KPX v oacute -23 -KPX v odieresis -23 -KPX v ograve -23 -KPX v oslash -20 -KPX v period -40 -KPX v s -22 -KPX v semicolon -20 -KPX w a -12 -KPX w aacute -12 -KPX w acircumflex -12 -KPX w adieresis -12 -KPX w ae -13 -KPX w agrave -12 -KPX w aring -12 -KPX w atilde -12 -KPX w c -11 -KPX w colon -18 -KPX w comma -25 -KPX w e -8 -KPX w eacute -8 -KPX w ecircumflex -8 -KPX w egrave -8 -KPX w g -12 -KPX w hyphen 8 -KPX w l -9 -KPX w o -14 -KPX w oacute -14 -KPX w odieresis -14 -KPX w ograve -14 -KPX w oslash -11 -KPX w period -25 -KPX w s -13 -KPX w semicolon -18 -KPX x a -19 -KPX x c -22 -KPX x e -18 -KPX x eacute -18 -KPX x o -25 -KPX x q -21 -KPX y a -23 -KPX y aacute -23 -KPX y acircumflex -23 -KPX y adieresis -23 -KPX y ae -24 -KPX y agrave -23 -KPX y aring -23 -KPX y atilde -23 -KPX y c -23 -KPX y colon -21 -KPX y comma -41 -KPX y e -19 -KPX y eacute -19 -KPX y ecircumflex -19 -KPX y egrave -19 -KPX y g -24 -KPX y hyphen 0 -KPX y l -14 -KPX y o -25 -KPX y oacute -25 -KPX y odieresis -25 -KPX y ograve -25 -KPX y oslash -21 -KPX y period -40 -KPX y s -24 -KPX y semicolon -22 -KPX zero four 2 -KPX zero one -20 -KPX zero seven -12 -EndKernPairs -EndKernData -EndFontMetrics diff --git a/misc/gs_afm/HelvO.afm b/misc/gs_afm/HelvO.afm deleted file mode 100644 index 4bb7bf2079..0000000000 --- a/misc/gs_afm/HelvO.afm +++ /dev/null @@ -1,1257 +0,0 @@ -StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 8/3/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. -FontName NimbusSanL-ReguCondItal -FullName Nimbus Sans L Regular Condensed Italic -FamilyName Nimbus Sans L -Weight Regular -ItalicAngle -9.0 -IsFixedPitch false -UnderlinePosition -100 -UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW -EncodingScheme AdobeStandardEncoding -FontBBox -139 -225 915 944 -CapHeight 718 -XHeight 523 -Descender -207 -Ascender 718 -StartCharMetrics 232 -C 32 ; WX 228 ; N space ; B 21 0 21 0 ; -C 33 ; WX 228 ; N exclam ; B 74 0 278 718 ; -C 34 ; WX 291 ; N quotedbl ; B 138 463 359 718 ; -C 35 ; WX 456 ; N numbersign ; B 60 0 517 688 ; -C 36 ; WX 456 ; N dollar ; B 57 -115 506 775 ; -C 37 ; WX 729 ; N percent ; B 120 -19 729 703 ; -C 38 ; WX 547 ; N ampersand ; B 63 -15 530 718 ; -C 39 ; WX 182 ; N quoteright ; B 124 463 254 718 ; -C 40 ; WX 273 ; N parenleft ; B 89 -207 372 733 ; -C 41 ; WX 273 ; N parenright ; B -7 -207 276 733 ; -C 42 ; WX 319 ; N asterisk ; B 135 431 389 718 ; -C 43 ; WX 479 ; N plus ; B 70 0 497 505 ; -C 44 ; WX 228 ; N comma ; B 46 -147 175 106 ; -C 45 ; WX 273 ; N hyphen ; B 77 232 293 322 ; -C 46 ; WX 228 ; N period ; B 71 0 175 106 ; -C 47 ; WX 228 ; N slash ; B -17 -19 370 737 ; -C 48 ; WX 456 ; N zero ; B 77 -19 499 703 ; -C 49 ; WX 456 ; N one ; B 170 0 417 703 ; -C 50 ; WX 456 ; N two ; B 21 0 506 703 ; -C 51 ; WX 456 ; N three ; B 61 -19 500 703 ; -C 52 ; WX 456 ; N four ; B 50 0 472 703 ; -C 53 ; WX 456 ; N five ; B 55 -19 509 688 ; -C 54 ; WX 456 ; N six ; B 74 -19 504 703 ; -C 55 ; WX 456 ; N seven ; B 112 0 549 688 ; -C 56 ; WX 456 ; N eight ; B 60 -19 497 703 ; -C 57 ; WX 456 ; N nine ; B 67 -19 499 703 ; -C 58 ; WX 228 ; N colon ; B 71 0 247 516 ; -C 59 ; WX 228 ; N semicolon ; B 46 -147 247 516 ; -C 60 ; WX 479 ; N less ; B 77 10 526 496 ; -C 61 ; WX 479 ; N equal ; B 52 115 515 390 ; -C 62 ; WX 479 ; N greater ; B 41 10 490 496 ; -C 63 ; WX 456 ; N question ; B 132 0 500 727 ; -C 64 ; WX 832 ; N at ; B 176 -19 791 737 ; -C 65 ; WX 547 ; N A ; B 11 0 536 718 ; -C 66 ; WX 547 ; N B ; B 61 0 583 718 ; -C 67 ; WX 592 ; N C ; B 88 -19 640 737 ; -C 68 ; WX 592 ; N D ; B 66 0 626 718 ; -C 69 ; WX 547 ; N E ; B 71 0 625 718 ; -C 70 ; WX 501 ; N F ; B 71 0 603 718 ; -C 71 ; WX 638 ; N G ; B 91 -19 655 737 ; -C 72 ; WX 592 ; N H ; B 63 0 655 718 ; -C 73 ; WX 228 ; N I ; B 75 0 279 718 ; -C 74 ; WX 410 ; N J ; B 39 -19 476 718 ; -C 75 ; WX 547 ; N K ; B 62 0 662 718 ; -C 76 ; WX 456 ; N L ; B 62 0 455 718 ; -C 77 ; WX 683 ; N M ; B 60 0 749 718 ; -C 78 ; WX 592 ; N N ; B 62 0 655 718 ; -C 79 ; WX 638 ; N O ; B 86 -19 677 737 ; -C 80 ; WX 547 ; N P ; B 71 0 604 718 ; -C 81 ; WX 638 ; N Q ; B 86 -56 677 737 ; -C 82 ; WX 592 ; N R ; B 72 0 634 718 ; -C 83 ; WX 547 ; N S ; B 74 -19 584 737 ; -C 84 ; WX 501 ; N T ; B 122 0 615 718 ; -C 85 ; WX 592 ; N U ; B 101 -19 653 718 ; -C 86 ; WX 547 ; N V ; B 142 0 656 718 ; -C 87 ; WX 774 ; N W ; B 138 0 886 718 ; -C 88 ; WX 547 ; N X ; B 16 0 647 718 ; -C 89 ; WX 547 ; N Y ; B 137 0 661 718 ; -C 90 ; WX 501 ; N Z ; B 19 0 607 718 ; -C 91 ; WX 228 ; N bracketleft ; B 17 -196 331 722 ; -C 92 ; WX 228 ; N backslash ; B 115 -19 239 737 ; -C 93 ; WX 228 ; N bracketright ; B -11 -196 302 722 ; -C 94 ; WX 385 ; N asciicircum ; B 35 264 442 688 ; -C 95 ; WX 456 ; N underscore ; B -22 -125 443 -75 ; -C 96 ; WX 182 ; N quoteleft ; B 135 470 265 725 ; -C 97 ; WX 456 ; N a ; B 50 -15 458 538 ; -C 98 ; WX 456 ; N b ; B 48 -15 479 718 ; -C 99 ; WX 410 ; N c ; B 61 -15 454 538 ; -C 100 ; WX 456 ; N d ; B 69 -15 534 718 ; -C 101 ; WX 456 ; N e ; B 69 -15 474 538 ; -C 102 ; WX 228 ; N f ; B 71 0 341 728 ; -C 103 ; WX 456 ; N g ; B 34 -220 500 538 ; -C 104 ; WX 456 ; N h ; B 53 0 470 718 ; -C 105 ; WX 182 ; N i ; B 55 0 252 718 ; -C 106 ; WX 182 ; N j ; B -49 -210 252 718 ; -C 107 ; WX 410 ; N k ; B 55 0 492 718 ; -C 108 ; WX 182 ; N l ; B 55 0 252 718 ; -C 109 ; WX 683 ; N m ; B 53 0 699 538 ; -C 110 ; WX 456 ; N n ; B 53 0 470 538 ; -C 111 ; WX 456 ; N o ; B 68 -14 479 538 ; -C 112 ; WX 456 ; N p ; B 11 -207 479 538 ; -C 113 ; WX 456 ; N q ; B 69 -207 496 538 ; -C 114 ; WX 273 ; N r ; B 63 0 365 538 ; -C 115 ; WX 410 ; N s ; B 52 -15 434 538 ; -C 116 ; WX 228 ; N t ; B 84 -7 302 669 ; -C 117 ; WX 456 ; N u ; B 77 -15 492 523 ; -C 118 ; WX 410 ; N v ; B 98 0 495 523 ; -C 119 ; WX 592 ; N w ; B 103 0 673 523 ; -C 120 ; WX 410 ; N x ; B 9 0 487 523 ; -C 121 ; WX 410 ; N y ; B 12 -214 492 523 ; -C 122 ; WX 410 ; N z ; B 25 0 468 523 ; -C 123 ; WX 274 ; N braceleft ; B 75 -196 365 722 ; -C 124 ; WX 213 ; N bar ; B 74 -19 265 737 ; -C 125 ; WX 274 ; N braceright ; B 0 -196 291 722 ; -C 126 ; WX 479 ; N asciitilde ; B 91 181 476 322 ; -C 161 ; WX 273 ; N exclamdown ; B 63 -195 267 523 ; -C 162 ; WX 456 ; N cent ; B 78 -115 479 623 ; -C 163 ; WX 456 ; N sterling ; B 40 -16 520 718 ; -C 164 ; WX 137 ; N fraction ; B -139 -19 396 703 ; -C 165 ; WX 456 ; N yen ; B 67 0 573 688 ; -C 166 ; WX 456 ; N florin ; B -43 -207 537 737 ; -C 167 ; WX 456 ; N section ; B 63 -191 479 737 ; -C 168 ; WX 456 ; N currency ; B 49 99 530 603 ; -C 169 ; WX 157 ; N quotesingle ; B 129 463 233 718 ; -C 170 ; WX 273 ; N quotedblleft ; B 113 470 378 725 ; -C 171 ; WX 456 ; N guillemotleft ; B 120 108 454 446 ; -C 172 ; WX 273 ; N guilsinglleft ; B 112 108 279 446 ; -C 173 ; WX 273 ; N guilsinglright ; B 91 108 257 446 ; -C 174 ; WX 410 ; N fi ; B 71 0 481 728 ; -C 175 ; WX 410 ; N fl ; B 71 0 479 728 ; -C 177 ; WX 456 ; N endash ; B 42 240 510 313 ; -C 178 ; WX 456 ; N dagger ; B 110 -159 510 718 ; -C 179 ; WX 456 ; N daggerdbl ; B 43 -159 511 718 ; -C 180 ; WX 228 ; N periodcentered ; B 106 190 211 315 ; -C 182 ; WX 440 ; N paragraph ; B 103 -173 533 718 ; -C 183 ; WX 287 ; N bullet ; B 74 202 339 517 ; -C 184 ; WX 182 ; N quotesinglbase ; B 17 -149 147 106 ; -C 185 ; WX 273 ; N quotedblbase ; B -5 -149 260 106 ; -C 186 ; WX 273 ; N quotedblright ; B 102 463 367 718 ; -C 187 ; WX 456 ; N guillemotright ; B 98 108 433 446 ; -C 188 ; WX 820 ; N ellipsis ; B 94 0 744 106 ; -C 189 ; WX 820 ; N perthousand ; B 72 -19 844 703 ; -C 191 ; WX 501 ; N questiondown ; B 70 -201 438 525 ; -C 193 ; WX 273 ; N grave ; B 139 593 276 734 ; -C 194 ; WX 273 ; N acute ; B 203 593 390 734 ; -C 195 ; WX 273 ; N circumflex ; B 121 593 359 734 ; -C 196 ; WX 273 ; N tilde ; B 102 606 402 722 ; -C 197 ; WX 273 ; N macron ; B 117 627 384 684 ; -C 198 ; WX 273 ; N breve ; B 137 595 391 731 ; -C 199 ; WX 273 ; N dotaccent ; B 204 604 297 706 ; -C 200 ; WX 273 ; N dieresis ; B 138 604 363 706 ; -C 202 ; WX 273 ; N ring ; B 175 572 330 756 ; -C 203 ; WX 273 ; N cedilla ; B 2 -225 191 0 ; -C 205 ; WX 273 ; N hungarumlaut ; B 129 593 463 734 ; -C 206 ; WX 273 ; N ogonek ; B 35 -225 204 0 ; -C 207 ; WX 273 ; N caron ; B 145 593 384 734 ; -C 208 ; WX 820 ; N emdash ; B 42 240 875 313 ; -C 225 ; WX 820 ; N AE ; B 7 0 899 718 ; -C 227 ; WX 303 ; N ordfeminine ; B 82 304 368 737 ; -C 232 ; WX 456 ; N Lslash ; B 34 0 455 718 ; -C 233 ; WX 638 ; N Oslash ; B 35 -19 730 737 ; -C 234 ; WX 820 ; N OE ; B 80 -19 915 737 ; -C 235 ; WX 299 ; N ordmasculine ; B 82 304 384 737 ; -C 241 ; WX 729 ; N ae ; B 50 -15 746 538 ; -C 245 ; WX 228 ; N dotlessi ; B 78 0 241 523 ; -C 248 ; WX 182 ; N lslash ; B 34 0 284 718 ; -C 249 ; WX 501 ; N oslash ; B 24 -22 531 545 ; -C 250 ; WX 774 ; N oe ; B 68 -15 791 538 ; -C 251 ; WX 501 ; N germandbls ; B 55 -15 539 728 ; -C -1 ; WX 547 ; N Yacute ; B 137 0 661 929 ; -C -1 ; WX 592 ; N Ucircumflex ; B 101 -19 653 929 ; -C -1 ; WX 592 ; N Ugrave ; B 101 -19 653 929 ; -C -1 ; WX 501 ; N Zcaron ; B 19 0 607 929 ; -C -1 ; WX 547 ; N Ydieresis ; B 137 0 661 901 ; -C -1 ; WX 273 ; N threesuperior ; B 74 270 358 714 ; -C -1 ; WX 592 ; N Uacute ; B 101 -19 653 929 ; -C -1 ; WX 273 ; N twosuperior ; B 52 281 368 714 ; -C -1 ; WX 592 ; N Udieresis ; B 101 -19 653 901 ; -C -1 ; WX 228 ; N middot ; B 106 190 211 315 ; -C -1 ; WX 273 ; N onesuperior ; B 136 281 305 703 ; -C -1 ; WX 456 ; N aacute ; B 50 -15 482 734 ; -C -1 ; WX 456 ; N agrave ; B 50 -15 458 734 ; -C -1 ; WX 456 ; N acircumflex ; B 50 -15 458 734 ; -C -1 ; WX 547 ; N Scaron ; B 74 -19 584 929 ; -C -1 ; WX 638 ; N Otilde ; B 86 -19 677 917 ; -C -1 ; WX 273 ; N sfthyphen ; B 77 232 293 322 ; -C -1 ; WX 456 ; N atilde ; B 50 -15 486 722 ; -C -1 ; WX 456 ; N aring ; B 50 -15 458 769 ; -C -1 ; WX 456 ; N adieresis ; B 50 -15 458 706 ; -C -1 ; WX 638 ; N Ograve ; B 86 -19 677 929 ; -C -1 ; WX 638 ; N Ocircumflex ; B 86 -19 677 929 ; -C -1 ; WX 638 ; N Odieresis ; B 86 -19 677 901 ; -C -1 ; WX 592 ; N Ntilde ; B 62 0 655 917 ; -C -1 ; WX 456 ; N edieresis ; B 69 -15 474 706 ; -C -1 ; WX 456 ; N eacute ; B 69 -15 482 734 ; -C -1 ; WX 456 ; N egrave ; B 69 -15 474 734 ; -C -1 ; WX 228 ; N Icircumflex ; B 75 0 370 929 ; -C -1 ; WX 456 ; N ecircumflex ; B 69 -15 474 734 ; -C -1 ; WX 228 ; N Igrave ; B 75 0 288 929 ; -C -1 ; WX 228 ; N Iacute ; B 75 0 401 929 ; -C -1 ; WX 228 ; N Idieresis ; B 75 0 375 901 ; -C -1 ; WX 328 ; N degree ; B 138 411 384 703 ; -C -1 ; WX 547 ; N Ecircumflex ; B 71 0 625 929 ; -C -1 ; WX 479 ; N minus ; B 70 216 497 289 ; -C -1 ; WX 479 ; N multiply ; B 41 0 526 506 ; -C -1 ; WX 479 ; N divide ; B 70 -19 497 524 ; -C -1 ; WX 547 ; N Egrave ; B 71 0 625 929 ; -C -1 ; WX 820 ; N trademark ; B 152 306 866 718 ; -C -1 ; WX 638 ; N Oacute ; B 86 -19 677 929 ; -C -1 ; WX 456 ; N thorn ; B 11 -207 479 718 ; -C -1 ; WX 456 ; N eth ; B 67 -15 506 737 ; -C -1 ; WX 547 ; N Eacute ; B 71 0 625 929 ; -C -1 ; WX 410 ; N ccedilla ; B 61 -225 454 538 ; -C -1 ; WX 228 ; N idieresis ; B 78 0 341 706 ; -C -1 ; WX 228 ; N iacute ; B 78 0 368 734 ; -C -1 ; WX 228 ; N igrave ; B 78 0 254 734 ; -C -1 ; WX 479 ; N plusminus ; B 32 0 507 561 ; -C -1 ; WX 684 ; N onehalf ; B 93 -19 688 703 ; -C -1 ; WX 684 ; N onequarter ; B 123 -19 658 703 ; -C -1 ; WX 684 ; N threequarters ; B 106 -19 706 714 ; -C -1 ; WX 228 ; N icircumflex ; B 78 0 336 734 ; -C -1 ; WX 547 ; N Edieresis ; B 71 0 625 901 ; -C -1 ; WX 456 ; N ntilde ; B 53 0 486 722 ; -C -1 ; WX 547 ; N Aring ; B 11 0 536 944 ; -C -1 ; WX 456 ; N odieresis ; B 68 -14 479 706 ; -C -1 ; WX 456 ; N oacute ; B 68 -14 482 734 ; -C -1 ; WX 456 ; N ograve ; B 68 -14 479 734 ; -C -1 ; WX 456 ; N ocircumflex ; B 68 -14 479 734 ; -C -1 ; WX 456 ; N otilde ; B 68 -14 494 722 ; -C -1 ; WX 410 ; N scaron ; B 52 -15 453 734 ; -C -1 ; WX 456 ; N udieresis ; B 77 -15 492 706 ; -C -1 ; WX 456 ; N uacute ; B 77 -15 492 734 ; -C -1 ; WX 456 ; N ugrave ; B 77 -15 492 734 ; -C -1 ; WX 456 ; N ucircumflex ; B 77 -15 492 734 ; -C -1 ; WX 410 ; N yacute ; B 12 -214 492 734 ; -C -1 ; WX 410 ; N zcaron ; B 25 0 468 734 ; -C -1 ; WX 410 ; N ydieresis ; B 12 -214 492 706 ; -C -1 ; WX 604 ; N copyright ; B 44 -19 687 737 ; -C -1 ; WX 604 ; N registered ; B 44 -19 687 737 ; -C -1 ; WX 547 ; N Atilde ; B 11 0 573 917 ; -C -1 ; WX 228 ; N nbspace ; B 21 0 21 0 ; -C -1 ; WX 592 ; N Ccedilla ; B 88 -225 640 737 ; -C -1 ; WX 547 ; N Acircumflex ; B 11 0 536 929 ; -C -1 ; WX 547 ; N Agrave ; B 11 0 536 929 ; -C -1 ; WX 479 ; N logicalnot ; B 87 108 515 390 ; -C -1 ; WX 547 ; N Aacute ; B 11 0 561 929 ; -C -1 ; WX 592 ; N Eth ; B 57 0 626 718 ; -C -1 ; WX 213 ; N brokenbar ; B 74 -19 265 737 ; -C -1 ; WX 547 ; N Thorn ; B 71 0 584 718 ; -C -1 ; WX 547 ; N Adieresis ; B 11 0 536 901 ; -C -1 ; WX 456 ; N mu ; B 20 -207 492 523 ; -C -1 ; WX 228 ; N .notdef ; B 21 0 21 0 ; -EndCharMetrics -StartKernData -StartKernPairs 998 -KPX A C -30 -KPX A Ccedilla -30 -KPX A G -33 -KPX A O -30 -KPX A Odieresis -30 -KPX A Q -30 -KPX A T -81 -KPX A U -32 -KPX A Uacute -32 -KPX A Ucircumflex -32 -KPX A Udieresis -32 -KPX A Ugrave -32 -KPX A V -61 -KPX A W -43 -KPX A Y -82 -KPX A a -11 -KPX A b -6 -KPX A c -11 -KPX A ccedilla -11 -KPX A comma 0 -KPX A d -13 -KPX A e -15 -KPX A g -16 -KPX A guillemotleft -43 -KPX A guilsinglleft -39 -KPX A hyphen -6 -KPX A o -16 -KPX A period 1 -KPX A q -13 -KPX A quotedblright -40 -KPX A quoteright -51 -KPX A t -17 -KPX A u -15 -KPX A v -30 -KPX A w -25 -KPX A y -31 -KPX Aacute C -31 -KPX Aacute G -34 -KPX Aacute O -31 -KPX Aacute Q -31 -KPX Aacute T -81 -KPX Aacute U -33 -KPX Aacute V -61 -KPX Aacute W -43 -KPX Aacute Y -82 -KPX Aacute a -12 -KPX Aacute b -6 -KPX Aacute c -12 -KPX Aacute comma 0 -KPX Aacute d -14 -KPX Aacute e -16 -KPX Aacute g -16 -KPX Aacute guillemotleft -44 -KPX Aacute guilsinglleft -40 -KPX Aacute hyphen -6 -KPX Aacute o -17 -KPX Aacute period 0 -KPX Aacute q -14 -KPX Aacute quoteright -52 -KPX Aacute t -18 -KPX Aacute u -16 -KPX Aacute v -31 -KPX Aacute w -25 -KPX Aacute y -31 -KPX Acircumflex C -30 -KPX Acircumflex G -33 -KPX Acircumflex O -30 -KPX Acircumflex Q -30 -KPX Acircumflex T -81 -KPX Acircumflex U -32 -KPX Acircumflex V -61 -KPX Acircumflex W -43 -KPX Acircumflex Y -82 -KPX Acircumflex comma 0 -KPX Acircumflex period 1 -KPX Adieresis C -30 -KPX Adieresis G -33 -KPX Adieresis O -30 -KPX Adieresis Q -30 -KPX Adieresis T -81 -KPX Adieresis U -32 -KPX Adieresis V -61 -KPX Adieresis W -43 -KPX Adieresis Y -82 -KPX Adieresis a -11 -KPX Adieresis b -6 -KPX Adieresis c -11 -KPX Adieresis comma 0 -KPX Adieresis d -13 -KPX Adieresis g -16 -KPX Adieresis guillemotleft -43 -KPX Adieresis guilsinglleft -39 -KPX Adieresis hyphen -6 -KPX Adieresis o -16 -KPX Adieresis period 1 -KPX Adieresis q -13 -KPX Adieresis quotedblright -40 -KPX Adieresis quoteright -51 -KPX Adieresis t -17 -KPX Adieresis u -15 -KPX Adieresis v -30 -KPX Adieresis w -25 -KPX Adieresis y -31 -KPX Agrave C -30 -KPX Agrave G -33 -KPX Agrave O -30 -KPX Agrave Q -30 -KPX Agrave T -81 -KPX Agrave U -32 -KPX Agrave V -61 -KPX Agrave W -43 -KPX Agrave Y -82 -KPX Agrave comma 0 -KPX Agrave period 1 -KPX Aring C -30 -KPX Aring G -33 -KPX Aring O -30 -KPX Aring Q -30 -KPX Aring T -81 -KPX Aring U -32 -KPX Aring V -61 -KPX Aring W -43 -KPX Aring Y -82 -KPX Aring a -11 -KPX Aring b -6 -KPX Aring c -11 -KPX Aring comma 0 -KPX Aring d -13 -KPX Aring e -15 -KPX Aring g -16 -KPX Aring guillemotleft -43 -KPX Aring guilsinglleft -39 -KPX Aring hyphen -6 -KPX Aring o -16 -KPX Aring period 1 -KPX Aring q -13 -KPX Aring quotedblright -40 -KPX Aring quoteright -51 -KPX Aring t -17 -KPX Aring u -15 -KPX Aring v -30 -KPX Aring w -25 -KPX Aring y -31 -KPX Atilde C -31 -KPX Atilde G -35 -KPX Atilde O -31 -KPX Atilde Q -31 -KPX Atilde T -81 -KPX Atilde U -34 -KPX Atilde V -61 -KPX Atilde W -43 -KPX Atilde Y -82 -KPX Atilde comma -1 -KPX Atilde period 0 -KPX B A -22 -KPX B AE -21 -KPX B Aacute -22 -KPX B Acircumflex -22 -KPX B Adieresis -22 -KPX B Aring -22 -KPX B Atilde -22 -KPX B O -9 -KPX B OE -5 -KPX B Oacute -9 -KPX B Ocircumflex -9 -KPX B Odieresis -9 -KPX B Ograve -9 -KPX B Oslash -7 -KPX B V -34 -KPX B W -17 -KPX B Y -42 -KPX C A -33 -KPX C AE -32 -KPX C Aacute -33 -KPX C Adieresis -33 -KPX C Aring -33 -KPX C H -13 -KPX C K -13 -KPX C O -13 -KPX C Oacute -13 -KPX C Odieresis -13 -KPX Ccedilla A -37 -KPX D A -40 -KPX D Aacute -40 -KPX D Acircumflex -40 -KPX D Adieresis -40 -KPX D Agrave -40 -KPX D Aring -40 -KPX D Atilde -40 -KPX D J -9 -KPX D T -36 -KPX D V -37 -KPX D W -19 -KPX D X -43 -KPX D Y -55 -KPX F A -64 -KPX F Aacute -64 -KPX F Acircumflex -64 -KPX F Adieresis -64 -KPX F Agrave -64 -KPX F Aring -64 -KPX F Atilde -64 -KPX F J -59 -KPX F O -22 -KPX F Odieresis -22 -KPX F a -32 -KPX F aacute -32 -KPX F adieresis -32 -KPX F ae -32 -KPX F aring -32 -KPX F comma -107 -KPX F e -26 -KPX F eacute -26 -KPX F hyphen -18 -KPX F i -15 -KPX F j -15 -KPX F o -26 -KPX F oacute -26 -KPX F odieresis -26 -KPX F oe -24 -KPX F oslash -24 -KPX F period -107 -KPX F r -38 -KPX F u -34 -KPX G A -11 -KPX G AE -9 -KPX G Aacute -11 -KPX G Acircumflex -11 -KPX G Adieresis -11 -KPX G Agrave -11 -KPX G Aring -11 -KPX G Atilde -11 -KPX G T -38 -KPX G V -40 -KPX G W -23 -KPX G Y -58 -KPX J A -30 -KPX J AE -29 -KPX J Adieresis -30 -KPX J Aring -30 -KPX K C -41 -KPX K G -45 -KPX K O -41 -KPX K OE -37 -KPX K Oacute -41 -KPX K Odieresis -41 -KPX K S -37 -KPX K T 15 -KPX K a -15 -KPX K adieresis -15 -KPX K ae -15 -KPX K aring -15 -KPX K e -35 -KPX K hyphen -43 -KPX K o -36 -KPX K oacute -36 -KPX K odieresis -36 -KPX K u -29 -KPX K udieresis -29 -KPX K y -59 -KPX L A 10 -KPX L AE 12 -KPX L Aacute 10 -KPX L Adieresis 10 -KPX L Aring 10 -KPX L C -36 -KPX L Ccedilla -39 -KPX L G -40 -KPX L O -38 -KPX L Oacute -38 -KPX L Ocircumflex -38 -KPX L Odieresis -38 -KPX L Ograve -38 -KPX L Otilde -38 -KPX L S -20 -KPX L T -87 -KPX L U -34 -KPX L Udieresis -34 -KPX L V -87 -KPX L W -58 -KPX L Y -99 -KPX L hyphen -114 -KPX L quotedblright -108 -KPX L quoteright -120 -KPX L u -16 -KPX L udieresis -16 -KPX L y -53 -KPX N A -12 -KPX N AE -10 -KPX N Aacute -12 -KPX N Adieresis -12 -KPX N Aring -12 -KPX N C -6 -KPX N Ccedilla -5 -KPX N G -10 -KPX N O -6 -KPX N Oacute -6 -KPX N Odieresis -6 -KPX N a -8 -KPX N aacute -8 -KPX N adieresis -8 -KPX N ae -8 -KPX N aring -8 -KPX N comma -10 -KPX N e -5 -KPX N eacute -5 -KPX N o -6 -KPX N oacute -6 -KPX N odieresis -6 -KPX N oslash -1 -KPX N period -10 -KPX N u -5 -KPX N udieresis -5 -KPX O A -36 -KPX O AE -36 -KPX O Aacute -36 -KPX O Adieresis -36 -KPX O Aring -36 -KPX O T -34 -KPX O V -34 -KPX O W -16 -KPX O X -39 -KPX O Y -53 -KPX Oacute A -36 -KPX Oacute T -34 -KPX Oacute V -34 -KPX Oacute W -16 -KPX Oacute Y -53 -KPX Ocircumflex T -34 -KPX Ocircumflex V -34 -KPX Ocircumflex Y -53 -KPX Odieresis A -36 -KPX Odieresis T -34 -KPX Odieresis V -34 -KPX Odieresis W -16 -KPX Odieresis X -39 -KPX Odieresis Y -53 -KPX Ograve T -34 -KPX Ograve V -34 -KPX Ograve Y -53 -KPX Oslash A -33 -KPX Otilde T -34 -KPX Otilde V -34 -KPX Otilde Y -53 -KPX P A -70 -KPX P AE -72 -KPX P Aacute -70 -KPX P Adieresis -70 -KPX P Aring -70 -KPX P J -78 -KPX P a -27 -KPX P aacute -27 -KPX P adieresis -27 -KPX P ae -27 -KPX P aring -27 -KPX P comma -126 -KPX P e -30 -KPX P eacute -30 -KPX P hyphen -35 -KPX P o -31 -KPX P oacute -31 -KPX P odieresis -31 -KPX P oe -29 -KPX P oslash -29 -KPX P period -126 -KPX R C -11 -KPX R Ccedilla -10 -KPX R G -15 -KPX R O -11 -KPX R OE -7 -KPX R Oacute -11 -KPX R Odieresis -11 -KPX R T -19 -KPX R U -13 -KPX R Udieresis -13 -KPX R V -33 -KPX R W -17 -KPX R Y -39 -KPX R a -11 -KPX R aacute -11 -KPX R adieresis -11 -KPX R ae -11 -KPX R aring -11 -KPX R e -9 -KPX R eacute -9 -KPX R hyphen 0 -KPX R o -10 -KPX R oacute -10 -KPX R odieresis -10 -KPX R oe -9 -KPX R u -8 -KPX R uacute -9 -KPX R udieresis -9 -KPX R y -10 -KPX S A -22 -KPX S AE -21 -KPX S Aacute -22 -KPX S Adieresis -22 -KPX S Aring -22 -KPX S T -22 -KPX S V -36 -KPX S W -20 -KPX S Y -42 -KPX S t -10 -KPX T A -86 -KPX T AE -84 -KPX T Aacute -86 -KPX T Acircumflex -86 -KPX T Adieresis -86 -KPX T Agrave -86 -KPX T Aring -86 -KPX T Atilde -86 -KPX T C -33 -KPX T G -39 -KPX T J -88 -KPX T O -34 -KPX T OE -28 -KPX T Oacute -34 -KPX T Ocircumflex -34 -KPX T Odieresis -34 -KPX T Ograve -34 -KPX T Oslash -35 -KPX T Otilde -34 -KPX T S -23 -KPX T V 7 -KPX T W 10 -KPX T Y 9 -KPX T a -83 -KPX T ae -83 -KPX T c -76 -KPX T colon -106 -KPX T comma -84 -KPX T e -80 -KPX T g -78 -KPX T guillemotleft -104 -KPX T guilsinglleft -100 -KPX T hyphen -65 -KPX T i -9 -KPX T j -9 -KPX T o -81 -KPX T oslash -76 -KPX T period -84 -KPX T r -81 -KPX T s -78 -KPX T semicolon -102 -KPX T u -79 -KPX T v -87 -KPX T w -85 -KPX T y -88 -KPX U A -37 -KPX U AE -38 -KPX U Aacute -37 -KPX U Acircumflex -37 -KPX U Adieresis -37 -KPX U Aring -37 -KPX U Atilde -37 -KPX U comma -30 -KPX U m -9 -KPX U n -9 -KPX U p -7 -KPX U period -27 -KPX U r -14 -KPX Uacute A -37 -KPX Uacute comma -30 -KPX Uacute m -9 -KPX Uacute n -9 -KPX Uacute p -7 -KPX Uacute period -27 -KPX Uacute r -14 -KPX Ucircumflex A -37 -KPX Udieresis A -37 -KPX Udieresis b -7 -KPX Udieresis comma -30 -KPX Udieresis m -9 -KPX Udieresis n -9 -KPX Udieresis p -7 -KPX Udieresis period -27 -KPX Udieresis r -14 -KPX Ugrave A -37 -KPX V A -63 -KPX V AE -64 -KPX V Aacute -63 -KPX V Acircumflex -63 -KPX V Adieresis -63 -KPX V Agrave -63 -KPX V Aring -63 -KPX V Atilde -63 -KPX V C -36 -KPX V G -39 -KPX V O -35 -KPX V Oacute -35 -KPX V Ocircumflex -35 -KPX V Odieresis -35 -KPX V Ograve -35 -KPX V Oslash -33 -KPX V Otilde -35 -KPX V S -33 -KPX V T 12 -KPX V a -52 -KPX V ae -52 -KPX V colon -48 -KPX V comma -77 -KPX V e -49 -KPX V g -47 -KPX V guillemotleft -72 -KPX V guilsinglleft -68 -KPX V hyphen -34 -KPX V i -10 -KPX V o -51 -KPX V oslash -45 -KPX V period -77 -KPX V r -43 -KPX V semicolon -48 -KPX V u -40 -KPX V y -19 -KPX W A -46 -KPX W AE -47 -KPX W Aacute -46 -KPX W Acircumflex -46 -KPX W Adieresis -46 -KPX W Agrave -46 -KPX W Aring -46 -KPX W Atilde -46 -KPX W C -20 -KPX W G -23 -KPX W O -20 -KPX W Oacute -20 -KPX W Ocircumflex -20 -KPX W Odieresis -20 -KPX W Ograve -20 -KPX W Oslash -17 -KPX W Otilde -20 -KPX W S -25 -KPX W T 13 -KPX W a -32 -KPX W ae -32 -KPX W colon -38 -KPX W comma -50 -KPX W e -29 -KPX W g -27 -KPX W guillemotleft -52 -KPX W guilsinglleft -48 -KPX W hyphen -14 -KPX W i -9 -KPX W o -31 -KPX W oslash -25 -KPX W period -50 -KPX W r -30 -KPX W semicolon -38 -KPX W u -28 -KPX W y -10 -KPX X C -37 -KPX X O -37 -KPX X Odieresis -37 -KPX X Q -37 -KPX X a -20 -KPX X e -40 -KPX X hyphen -45 -KPX X o -41 -KPX X u -35 -KPX X y -50 -KPX Y A -85 -KPX Y AE -86 -KPX Y Aacute -85 -KPX Y Acircumflex -85 -KPX Y Adieresis -85 -KPX Y Agrave -85 -KPX Y Aring -85 -KPX Y Atilde -85 -KPX Y C -48 -KPX Y G -53 -KPX Y O -48 -KPX Y Oacute -48 -KPX Y Ocircumflex -48 -KPX Y Odieresis -48 -KPX Y Ograve -48 -KPX Y Oslash -50 -KPX Y Otilde -48 -KPX Y S -39 -KPX Y T 14 -KPX Y a -78 -KPX Y ae -79 -KPX Y colon -67 -KPX Y comma -95 -KPX Y e -77 -KPX Y g -75 -KPX Y guillemotleft -106 -KPX Y guilsinglleft -102 -KPX Y hyphen -72 -KPX Y i -8 -KPX Y o -78 -KPX Y oslash -72 -KPX Y p -53 -KPX Y period -95 -KPX Y semicolon -67 -KPX Y u -60 -KPX Y v -38 -KPX Z v -32 -KPX Z y -33 -KPX a j -9 -KPX a quoteright -13 -KPX a v -21 -KPX a w -16 -KPX a y -24 -KPX aacute v -22 -KPX aacute w -17 -KPX aacute y -24 -KPX adieresis v -21 -KPX adieresis w -16 -KPX adieresis y -24 -KPX ae v -18 -KPX ae w -13 -KPX ae y -23 -KPX agrave v -21 -KPX agrave w -16 -KPX agrave y -24 -KPX aring v -21 -KPX aring w -16 -KPX aring y -24 -KPX b v -15 -KPX b w -9 -KPX b y -19 -KPX c h -3 -KPX c k -4 -KPX comma one -88 -KPX comma quotedblright -27 -KPX comma quoteright -38 -KPX e quoteright -8 -KPX e t -12 -KPX e v -18 -KPX e w -12 -KPX e x -22 -KPX e y -22 -KPX eacute v -18 -KPX eacute w -13 -KPX eacute y -22 -KPX ecircumflex v -18 -KPX ecircumflex w -12 -KPX ecircumflex y -22 -KPX eight four -1 -KPX eight one -43 -KPX eight seven -24 -KPX f a -14 -KPX f aacute -14 -KPX f adieresis -14 -KPX f ae -14 -KPX f aring -14 -KPX f e -16 -KPX f eacute -16 -KPX f f 11 -KPX f i -10 -KPX f j -10 -KPX f l -10 -KPX f o -17 -KPX f oacute -17 -KPX f odieresis -17 -KPX f oe -15 -KPX f oslash -11 -KPX f quoteright 1 -KPX f s -10 -KPX f t 11 -KPX five four -3 -KPX five one -63 -KPX five seven -23 -KPX four four 1 -KPX four one -72 -KPX four seven -47 -KPX g a -5 -KPX g adieresis -5 -KPX g ae -5 -KPX g aring -5 -KPX g e -3 -KPX g eacute -3 -KPX g l 0 -KPX g oacute -3 -KPX g odieresis -3 -KPX g r -3 -KPX guillemotright A -47 -KPX guillemotright AE -47 -KPX guillemotright Aacute -47 -KPX guillemotright Adieresis -47 -KPX guillemotright Aring -47 -KPX guillemotright T -104 -KPX guillemotright V -72 -KPX guillemotright W -50 -KPX guillemotright Y -107 -KPX guilsinglright A -43 -KPX guilsinglright AE -44 -KPX guilsinglright Aacute -43 -KPX guilsinglright Adieresis -43 -KPX guilsinglright Aring -43 -KPX guilsinglright T -100 -KPX guilsinglright V -68 -KPX guilsinglright W -46 -KPX guilsinglright Y -103 -KPX h quoteright -7 -KPX h y -18 -KPX hyphen A -8 -KPX hyphen AE -8 -KPX hyphen Aacute -8 -KPX hyphen Adieresis -8 -KPX hyphen Aring -8 -KPX hyphen T -65 -KPX hyphen V -34 -KPX hyphen W -13 -KPX hyphen Y -72 -KPX i T -9 -KPX i j -3 -KPX k a -12 -KPX k aacute -12 -KPX k adieresis -12 -KPX k ae -12 -KPX k aring -12 -KPX k comma -5 -KPX k e -21 -KPX k eacute -21 -KPX k g -20 -KPX k hyphen -35 -KPX k o -23 -KPX k oacute -23 -KPX k odieresis -23 -KPX k period -4 -KPX k s -16 -KPX k u -8 -KPX k udieresis -8 -KPX l v -9 -KPX l y -10 -KPX m p 0 -KPX m v -15 -KPX m w -10 -KPX m y -18 -KPX n T -79 -KPX n p -1 -KPX n quoteright -7 -KPX n v -16 -KPX n w -11 -KPX n y -18 -KPX nine four -6 -KPX nine one -40 -KPX nine seven -27 -KPX o T -80 -KPX o quoteright -10 -KPX o t -10 -KPX o v -16 -KPX o w -10 -KPX o x -20 -KPX o y -20 -KPX oacute v -16 -KPX oacute w -10 -KPX oacute y -20 -KPX ocircumflex t -10 -KPX odieresis t -10 -KPX odieresis v -16 -KPX odieresis w -10 -KPX odieresis x -20 -KPX odieresis y -20 -KPX ograve v -16 -KPX ograve w -10 -KPX ograve y -20 -KPX one comma -59 -KPX one eight -53 -KPX one five -53 -KPX one four -65 -KPX one nine -54 -KPX one one -96 -KPX one period -59 -KPX one seven -71 -KPX one six -51 -KPX one three -57 -KPX one two -57 -KPX one zero -51 -KPX p t -9 -KPX p y -19 -KPX period one -88 -KPX period quotedblright -28 -KPX period quoteright -39 -KPX q c 0 -KPX q u -3 -KPX quotedblbase A 18 -KPX quotedblbase AE 19 -KPX quotedblbase T -65 -KPX quotedblbase V -58 -KPX quotedblbase W -30 -KPX quotedblbase Y -76 -KPX quotedblleft A -46 -KPX quotedblleft AE -49 -KPX quotedblleft Aacute -46 -KPX quotedblleft Adieresis -46 -KPX quotedblleft Aring -46 -KPX quotedblleft T 9 -KPX quotedblleft V 18 -KPX quotedblleft W 26 -KPX quotedblleft Y 7 -KPX quotedblright A -54 -KPX quotedblright AE -56 -KPX quotedblright Aacute -54 -KPX quotedblright Adieresis -54 -KPX quotedblright Aring -54 -KPX quotedblright T 3 -KPX quotedblright V 11 -KPX quotedblright W 18 -KPX quotedblright Y 0 -KPX quoteleft A -57 -KPX quoteleft AE -60 -KPX quoteleft Aacute -57 -KPX quoteleft Adieresis -57 -KPX quoteleft Aring -57 -KPX quoteleft T -2 -KPX quoteleft V 7 -KPX quoteleft W 15 -KPX quoteleft Y -4 -KPX quoteright A -65 -KPX quoteright AE -67 -KPX quoteright Aacute -65 -KPX quoteright Adieresis -65 -KPX quoteright Aring -65 -KPX quoteright comma -52 -KPX quoteright d -20 -KPX quoteright o -29 -KPX quoteright period -52 -KPX quoteright r -19 -KPX quoteright s -17 -KPX quoteright t -9 -KPX quoteright v -3 -KPX quoteright w -3 -KPX quoteright y -4 -KPX r a -9 -KPX r aacute -9 -KPX r acircumflex -9 -KPX r adieresis -9 -KPX r ae -9 -KPX r agrave -9 -KPX r aring -9 -KPX r c -11 -KPX r ccedilla -8 -KPX r colon -12 -KPX r comma -52 -KPX r d -9 -KPX r e -15 -KPX r eacute -15 -KPX r ecircumflex -15 -KPX r egrave -15 -KPX r f 17 -KPX r g -8 -KPX r h -4 -KPX r hyphen -34 -KPX r i -5 -KPX r j -5 -KPX r k -5 -KPX r l -5 -KPX r m -4 -KPX r n -4 -KPX r o -18 -KPX r oacute -18 -KPX r ocircumflex -18 -KPX r odieresis -18 -KPX r oe -15 -KPX r ograve -18 -KPX r oslash -15 -KPX r p -1 -KPX r period -52 -KPX r q -9 -KPX r quoteright 3 -KPX r r -9 -KPX r s -4 -KPX r semicolon -12 -KPX r t 17 -KPX r u -5 -KPX r v 17 -KPX r w 15 -KPX r x 12 -KPX r y 16 -KPX r z 0 -KPX s quoteright -6 -KPX s t -11 -KPX seven colon -55 -KPX seven comma -99 -KPX seven eight -24 -KPX seven five -30 -KPX seven four -77 -KPX seven one -42 -KPX seven period -99 -KPX seven seven -3 -KPX seven six -32 -KPX seven three -22 -KPX seven two -22 -KPX six four -1 -KPX six one -39 -KPX six seven -21 -KPX t S -14 -KPX t a -5 -KPX t aacute -5 -KPX t adieresis -5 -KPX t ae -5 -KPX t aring -5 -KPX t colon -19 -KPX t e -12 -KPX t eacute -12 -KPX t h -6 -KPX t o -13 -KPX t oacute -13 -KPX t odieresis -13 -KPX t quoteright 2 -KPX t semicolon -19 -KPX three four 0 -KPX three one -41 -KPX three seven -23 -KPX two four -46 -KPX two one -37 -KPX two seven -21 -KPX u quoteright 0 -KPX v a -20 -KPX v aacute -20 -KPX v acircumflex -20 -KPX v adieresis -20 -KPX v ae -20 -KPX v agrave -20 -KPX v aring -20 -KPX v atilde -20 -KPX v c -15 -KPX v colon -14 -KPX v comma -54 -KPX v e -19 -KPX v eacute -19 -KPX v ecircumflex -19 -KPX v egrave -19 -KPX v g -17 -KPX v hyphen -7 -KPX v l -7 -KPX v o -20 -KPX v oacute -20 -KPX v odieresis -20 -KPX v ograve -20 -KPX v oslash -16 -KPX v period -54 -KPX v s -15 -KPX v semicolon -14 -KPX w a -16 -KPX w aacute -16 -KPX w acircumflex -16 -KPX w adieresis -16 -KPX w ae -16 -KPX w agrave -16 -KPX w aring -16 -KPX w atilde -16 -KPX w c -8 -KPX w colon -16 -KPX w comma -40 -KPX w e -12 -KPX w eacute -12 -KPX w ecircumflex -12 -KPX w egrave -12 -KPX w g -10 -KPX w hyphen 0 -KPX w l -9 -KPX w o -13 -KPX w oacute -13 -KPX w odieresis -13 -KPX w ograve -13 -KPX w oslash -8 -KPX w period -40 -KPX w s -11 -KPX w semicolon -16 -KPX x a -17 -KPX x c -16 -KPX x e -20 -KPX x eacute -20 -KPX x o -21 -KPX x q -17 -KPX y a -21 -KPX y aacute -21 -KPX y acircumflex -21 -KPX y adieresis -21 -KPX y ae -21 -KPX y agrave -21 -KPX y aring -21 -KPX y atilde -21 -KPX y c -16 -KPX y colon -15 -KPX y comma -54 -KPX y e -20 -KPX y eacute -20 -KPX y ecircumflex -20 -KPX y egrave -20 -KPX y g -18 -KPX y hyphen -6 -KPX y l -8 -KPX y o -21 -KPX y oacute -21 -KPX y odieresis -21 -KPX y ograve -21 -KPX y oslash -16 -KPX y period -53 -KPX y s -16 -KPX y semicolon -15 -KPX zero four -2 -KPX zero one -40 -KPX zero seven -28 -EndKernPairs -EndKernData -EndFontMetrics diff --git a/misc/gs_afm/TimesBo.afm b/misc/gs_afm/TimesBo.afm deleted file mode 100644 index 1947d3ab1d..0000000000 --- a/misc/gs_afm/TimesBo.afm +++ /dev/null @@ -1,1257 +0,0 @@ -StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 11/17/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. -FontName NimbusRomNo9L-Medi -FullName Nimbus Roman No9 L Medium -FamilyName Nimbus Roman No9 L -Weight Bold -ItalicAngle 0.0 -IsFixedPitch false -UnderlinePosition -100 -UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW -EncodingScheme AdobeStandardEncoding -FontBBox -168 -218 1000 948 -CapHeight 676 -XHeight 461 -Descender -205 -Ascender 676 -StartCharMetrics 232 -C 32 ; WX 250 ; N space ; B 125 0 125 0 ; -C 33 ; WX 333 ; N exclam ; B 81 -13 251 691 ; -C 34 ; WX 555 ; N quotedbl ; B 83 404 472 691 ; -C 35 ; WX 500 ; N numbersign ; B 4 0 496 700 ; -C 36 ; WX 500 ; N dollar ; B 29 -99 472 750 ; -C 37 ; WX 1000 ; N percent ; B 124 -14 877 692 ; -C 38 ; WX 833 ; N ampersand ; B 62 -16 787 691 ; -C 39 ; WX 333 ; N quoteright ; B 79 356 263 691 ; -C 40 ; WX 333 ; N parenleft ; B 46 -168 306 694 ; -C 41 ; WX 333 ; N parenright ; B 27 -168 287 694 ; -C 42 ; WX 500 ; N asterisk ; B 56 255 447 691 ; -C 43 ; WX 570 ; N plus ; B 33 0 537 506 ; -C 44 ; WX 250 ; N comma ; B 39 -180 223 155 ; -C 45 ; WX 333 ; N hyphen ; B 44 171 287 287 ; -C 46 ; WX 250 ; N period ; B 41 -13 210 156 ; -C 47 ; WX 278 ; N slash ; B -24 -19 302 691 ; -C 48 ; WX 500 ; N zero ; B 24 -13 476 688 ; -C 49 ; WX 500 ; N one ; B 65 0 442 688 ; -C 50 ; WX 500 ; N two ; B 17 0 478 688 ; -C 51 ; WX 500 ; N three ; B 16 -14 468 688 ; -C 52 ; WX 500 ; N four ; B 19 0 475 688 ; -C 53 ; WX 500 ; N five ; B 22 -8 470 676 ; -C 54 ; WX 500 ; N six ; B 28 -13 475 688 ; -C 55 ; WX 500 ; N seven ; B 17 0 477 676 ; -C 56 ; WX 500 ; N eight ; B 28 -13 472 688 ; -C 57 ; WX 500 ; N nine ; B 26 -13 473 688 ; -C 58 ; WX 333 ; N colon ; B 82 -13 251 472 ; -C 59 ; WX 333 ; N semicolon ; B 82 -180 266 472 ; -C 60 ; WX 570 ; N less ; B 31 -12 539 518 ; -C 61 ; WX 570 ; N equal ; B 33 107 537 399 ; -C 62 ; WX 570 ; N greater ; B 31 -12 539 518 ; -C 63 ; WX 500 ; N question ; B 57 -13 445 689 ; -C 64 ; WX 930 ; N at ; B 108 -19 822 691 ; -C 65 ; WX 722 ; N A ; B 9 0 689 690 ; -C 66 ; WX 667 ; N B ; B 16 0 619 676 ; -C 67 ; WX 722 ; N C ; B 49 -19 687 691 ; -C 68 ; WX 722 ; N D ; B 14 0 690 676 ; -C 69 ; WX 667 ; N E ; B 16 0 641 676 ; -C 70 ; WX 611 ; N F ; B 16 0 583 676 ; -C 71 ; WX 778 ; N G ; B 37 -19 755 691 ; -C 72 ; WX 778 ; N H ; B 21 0 759 676 ; -C 73 ; WX 389 ; N I ; B 20 0 370 676 ; -C 74 ; WX 500 ; N J ; B 3 -96 479 676 ; -C 75 ; WX 778 ; N K ; B 30 0 769 676 ; -C 76 ; WX 667 ; N L ; B 19 0 638 676 ; -C 77 ; WX 944 ; N M ; B 14 0 921 676 ; -C 78 ; WX 722 ; N N ; B 16 -18 701 676 ; -C 79 ; WX 778 ; N O ; B 35 -19 743 691 ; -C 80 ; WX 611 ; N P ; B 16 0 600 676 ; -C 81 ; WX 778 ; N Q ; B 35 -176 743 691 ; -C 82 ; WX 722 ; N R ; B 26 0 715 676 ; -C 83 ; WX 556 ; N S ; B 35 -19 513 692 ; -C 84 ; WX 667 ; N T ; B 31 0 636 676 ; -C 85 ; WX 722 ; N U ; B 16 -19 701 676 ; -C 86 ; WX 722 ; N V ; B 16 -18 701 676 ; -C 87 ; WX 1000 ; N W ; B 19 -15 981 676 ; -C 88 ; WX 722 ; N X ; B 16 0 699 676 ; -C 89 ; WX 722 ; N Y ; B 15 0 699 676 ; -C 90 ; WX 667 ; N Z ; B 28 0 634 676 ; -C 91 ; WX 333 ; N bracketleft ; B 67 -149 301 678 ; -C 92 ; WX 278 ; N backslash ; B -25 -19 303 691 ; -C 93 ; WX 333 ; N bracketright ; B 32 -149 266 678 ; -C 94 ; WX 581 ; N asciicircum ; B 73 311 509 676 ; -C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; -C 96 ; WX 333 ; N quoteleft ; B 70 356 254 691 ; -C 97 ; WX 500 ; N a ; B 25 -14 488 473 ; -C 98 ; WX 556 ; N b ; B 17 -14 521 676 ; -C 99 ; WX 444 ; N c ; B 25 -14 430 473 ; -C 100 ; WX 556 ; N d ; B 25 -14 534 676 ; -C 101 ; WX 444 ; N e ; B 25 -14 426 473 ; -C 102 ; WX 333 ; N f ; B 14 0 389 691 ; -C 103 ; WX 500 ; N g ; B 28 -206 483 473 ; -C 104 ; WX 556 ; N h ; B 16 0 534 676 ; -C 105 ; WX 278 ; N i ; B 16 0 255 691 ; -C 106 ; WX 333 ; N j ; B -57 -203 263 691 ; -C 107 ; WX 556 ; N k ; B 22 0 543 676 ; -C 108 ; WX 278 ; N l ; B 16 0 255 676 ; -C 109 ; WX 833 ; N m ; B 16 0 814 473 ; -C 110 ; WX 556 ; N n ; B 21 0 539 473 ; -C 111 ; WX 500 ; N o ; B 25 -14 476 473 ; -C 112 ; WX 556 ; N p ; B 19 -205 524 473 ; -C 113 ; WX 556 ; N q ; B 34 -205 536 473 ; -C 114 ; WX 444 ; N r ; B 29 0 434 473 ; -C 115 ; WX 389 ; N s ; B 25 -14 361 473 ; -C 116 ; WX 333 ; N t ; B 20 -12 332 630 ; -C 117 ; WX 556 ; N u ; B 16 -14 537 461 ; -C 118 ; WX 500 ; N v ; B 21 -14 485 461 ; -C 119 ; WX 722 ; N w ; B 23 -14 707 461 ; -C 120 ; WX 500 ; N x ; B 12 0 484 461 ; -C 121 ; WX 500 ; N y ; B 16 -205 480 461 ; -C 122 ; WX 444 ; N z ; B 21 0 420 461 ; -C 123 ; WX 394 ; N braceleft ; B 22 -175 340 698 ; -C 124 ; WX 220 ; N bar ; B 66 -19 154 691 ; -C 125 ; WX 394 ; N braceright ; B 54 -175 372 698 ; -C 126 ; WX 520 ; N asciitilde ; B 29 175 491 331 ; -C 161 ; WX 333 ; N exclamdown ; B 82 -203 252 501 ; -C 162 ; WX 500 ; N cent ; B 53 -140 458 588 ; -C 163 ; WX 500 ; N sterling ; B 21 -14 477 684 ; -C 164 ; WX 167 ; N fraction ; B -168 -12 329 688 ; -C 165 ; WX 500 ; N yen ; B -64 0 547 676 ; -C 166 ; WX 500 ; N florin ; B 0 -155 498 706 ; -C 167 ; WX 500 ; N section ; B 57 -132 443 691 ; -C 168 ; WX 500 ; N currency ; B -26 61 526 613 ; -C 169 ; WX 278 ; N quotesingle ; B 75 404 204 691 ; -C 170 ; WX 500 ; N quotedblleft ; B 32 356 486 691 ; -C 171 ; WX 500 ; N guillemotleft ; B 23 36 473 415 ; -C 172 ; WX 333 ; N guilsinglleft ; B 51 36 305 415 ; -C 173 ; WX 333 ; N guilsinglright ; B 28 36 282 415 ; -C 174 ; WX 556 ; N fi ; B 14 0 536 691 ; -C 175 ; WX 556 ; N fl ; B 14 0 536 691 ; -C 177 ; WX 500 ; N endash ; B 0 181 500 271 ; -C 178 ; WX 500 ; N dagger ; B 47 -134 453 691 ; -C 179 ; WX 500 ; N daggerdbl ; B 45 -132 456 691 ; -C 180 ; WX 250 ; N periodcentered ; B 41 248 210 417 ; -C 182 ; WX 540 ; N paragraph ; B 0 -186 519 676 ; -C 183 ; WX 350 ; N bullet ; B 35 198 315 478 ; -C 184 ; WX 333 ; N quotesinglbase ; B 79 -180 263 155 ; -C 185 ; WX 500 ; N quotedblbase ; B 14 -180 468 155 ; -C 186 ; WX 500 ; N quotedblright ; B 14 356 468 691 ; -C 187 ; WX 500 ; N guillemotright ; B 27 36 477 415 ; -C 188 ; WX 1000 ; N ellipsis ; B 82 -13 917 156 ; -C 189 ; WX 1000 ; N perthousand ; B 7 -29 995 706 ; -C 191 ; WX 500 ; N questiondown ; B 55 -201 443 501 ; -C 193 ; WX 333 ; N grave ; B 8 528 246 713 ; -C 194 ; WX 333 ; N acute ; B 86 528 324 713 ; -C 195 ; WX 333 ; N circumflex ; B -2 528 335 704 ; -C 196 ; WX 333 ; N tilde ; B -16 547 349 674 ; -C 197 ; WX 333 ; N macron ; B 1 565 331 637 ; -C 198 ; WX 333 ; N breve ; B 15 528 318 691 ; -C 199 ; WX 333 ; N dotaccent ; B 103 537 232 666 ; -C 200 ; WX 333 ; N dieresis ; B -2 537 337 666 ; -C 202 ; WX 333 ; N ring ; B 60 537 273 750 ; -C 203 ; WX 333 ; N cedilla ; B 68 -218 294 0 ; -C 205 ; WX 333 ; N hungarumlaut ; B -13 528 425 713 ; -C 206 ; WX 333 ; N ogonek ; B 90 -173 319 44 ; -C 207 ; WX 333 ; N caron ; B -2 528 335 704 ; -C 208 ; WX 1000 ; N emdash ; B 0 181 1000 271 ; -C 225 ; WX 1000 ; N AE ; B 4 0 951 676 ; -C 227 ; WX 300 ; N ordfeminine ; B -1 397 301 688 ; -C 232 ; WX 667 ; N Lslash ; B 19 0 638 676 ; -C 233 ; WX 778 ; N Oslash ; B 35 -74 743 737 ; -C 234 ; WX 1000 ; N OE ; B 22 -5 981 684 ; -C 235 ; WX 330 ; N ordmasculine ; B 18 397 312 688 ; -C 241 ; WX 722 ; N ae ; B 33 -14 693 473 ; -C 245 ; WX 278 ; N dotlessi ; B 16 0 255 461 ; -C 248 ; WX 278 ; N lslash ; B -22 0 303 676 ; -C 249 ; WX 500 ; N oslash ; B 25 -92 476 549 ; -C 250 ; WX 722 ; N oe ; B 22 -14 696 473 ; -C 251 ; WX 556 ; N germandbls ; B 19 -12 517 691 ; -C -1 ; WX 722 ; N Yacute ; B 15 0 699 923 ; -C -1 ; WX 722 ; N Ucircumflex ; B 16 -19 701 914 ; -C -1 ; WX 722 ; N Ugrave ; B 16 -19 701 923 ; -C -1 ; WX 667 ; N Zcaron ; B 28 0 634 914 ; -C -1 ; WX 722 ; N Ydieresis ; B 15 0 699 876 ; -C -1 ; WX 300 ; N threesuperior ; B 3 268 297 688 ; -C -1 ; WX 722 ; N Uacute ; B 16 -19 701 923 ; -C -1 ; WX 300 ; N twosuperior ; B 0 275 300 688 ; -C -1 ; WX 722 ; N Udieresis ; B 16 -19 701 876 ; -C -1 ; WX 250 ; N middot ; B 41 248 210 417 ; -C -1 ; WX 300 ; N onesuperior ; B 28 275 273 688 ; -C -1 ; WX 500 ; N aacute ; B 25 -14 488 713 ; -C -1 ; WX 500 ; N agrave ; B 25 -14 488 713 ; -C -1 ; WX 500 ; N acircumflex ; B 25 -14 488 704 ; -C -1 ; WX 556 ; N Scaron ; B 35 -19 513 914 ; -C -1 ; WX 778 ; N Otilde ; B 35 -19 743 884 ; -C -1 ; WX 333 ; N sfthyphen ; B 44 171 287 287 ; -C -1 ; WX 500 ; N atilde ; B 25 -14 488 674 ; -C -1 ; WX 500 ; N aring ; B 25 -14 488 750 ; -C -1 ; WX 500 ; N adieresis ; B 25 -14 488 666 ; -C -1 ; WX 778 ; N Ograve ; B 35 -19 743 923 ; -C -1 ; WX 778 ; N Ocircumflex ; B 35 -19 743 914 ; -C -1 ; WX 778 ; N Odieresis ; B 35 -19 743 876 ; -C -1 ; WX 722 ; N Ntilde ; B 16 -18 701 884 ; -C -1 ; WX 444 ; N edieresis ; B 25 -14 426 666 ; -C -1 ; WX 444 ; N eacute ; B 25 -14 426 713 ; -C -1 ; WX 444 ; N egrave ; B 25 -14 426 713 ; -C -1 ; WX 389 ; N Icircumflex ; B 20 0 370 914 ; -C -1 ; WX 444 ; N ecircumflex ; B 25 -14 426 704 ; -C -1 ; WX 389 ; N Igrave ; B 20 0 370 923 ; -C -1 ; WX 389 ; N Iacute ; B 20 0 370 923 ; -C -1 ; WX 389 ; N Idieresis ; B 20 0 370 876 ; -C -1 ; WX 400 ; N degree ; B 57 402 343 688 ; -C -1 ; WX 667 ; N Ecircumflex ; B 16 0 641 914 ; -C -1 ; WX 570 ; N minus ; B 33 209 537 297 ; -C -1 ; WX 570 ; N multiply ; B 48 16 522 490 ; -C -1 ; WX 570 ; N divide ; B 33 -31 537 537 ; -C -1 ; WX 667 ; N Egrave ; B 16 0 641 923 ; -C -1 ; WX 1000 ; N trademark ; B 24 271 977 676 ; -C -1 ; WX 778 ; N Oacute ; B 35 -19 743 923 ; -C -1 ; WX 556 ; N thorn ; B 19 -205 524 676 ; -C -1 ; WX 500 ; N eth ; B 25 -14 476 691 ; -C -1 ; WX 667 ; N Eacute ; B 16 0 641 923 ; -C -1 ; WX 444 ; N ccedilla ; B 25 -218 430 473 ; -C -1 ; WX 278 ; N idieresis ; B -36 0 303 666 ; -C -1 ; WX 278 ; N iacute ; B 16 0 290 713 ; -C -1 ; WX 278 ; N igrave ; B -26 0 255 713 ; -C -1 ; WX 570 ; N plusminus ; B 33 0 537 568 ; -C -1 ; WX 750 ; N onehalf ; B -7 -12 775 688 ; -C -1 ; WX 750 ; N onequarter ; B 28 -12 743 688 ; -C -1 ; WX 750 ; N threequarters ; B 23 -12 733 688 ; -C -1 ; WX 278 ; N icircumflex ; B -36 0 301 704 ; -C -1 ; WX 667 ; N Edieresis ; B 16 0 641 876 ; -C -1 ; WX 556 ; N ntilde ; B 21 0 539 674 ; -C -1 ; WX 722 ; N Aring ; B 9 0 689 948 ; -C -1 ; WX 500 ; N odieresis ; B 25 -14 476 666 ; -C -1 ; WX 500 ; N oacute ; B 25 -14 476 713 ; -C -1 ; WX 500 ; N ograve ; B 25 -14 476 713 ; -C -1 ; WX 500 ; N ocircumflex ; B 25 -14 476 704 ; -C -1 ; WX 500 ; N otilde ; B 25 -14 476 674 ; -C -1 ; WX 389 ; N scaron ; B 25 -14 363 704 ; -C -1 ; WX 556 ; N udieresis ; B 16 -14 537 666 ; -C -1 ; WX 556 ; N uacute ; B 16 -14 537 713 ; -C -1 ; WX 556 ; N ugrave ; B 16 -14 537 713 ; -C -1 ; WX 556 ; N ucircumflex ; B 16 -14 537 704 ; -C -1 ; WX 500 ; N yacute ; B 16 -205 480 713 ; -C -1 ; WX 444 ; N zcaron ; B 21 0 420 704 ; -C -1 ; WX 500 ; N ydieresis ; B 16 -205 480 666 ; -C -1 ; WX 747 ; N copyright ; B 26 -19 721 691 ; -C -1 ; WX 747 ; N registered ; B 26 -19 721 691 ; -C -1 ; WX 722 ; N Atilde ; B 9 0 689 884 ; -C -1 ; WX 250 ; N nbspace ; B 125 0 125 0 ; -C -1 ; WX 722 ; N Ccedilla ; B 49 -218 687 691 ; -C -1 ; WX 722 ; N Acircumflex ; B 9 0 689 914 ; -C -1 ; WX 722 ; N Agrave ; B 9 0 689 923 ; -C -1 ; WX 570 ; N logicalnot ; B 33 108 537 399 ; -C -1 ; WX 722 ; N Aacute ; B 9 0 689 923 ; -C -1 ; WX 722 ; N Eth ; B 6 0 690 676 ; -C -1 ; WX 220 ; N brokenbar ; B 66 -19 154 691 ; -C -1 ; WX 611 ; N Thorn ; B 16 0 600 676 ; -C -1 ; WX 722 ; N Adieresis ; B 9 0 689 876 ; -C -1 ; WX 556 ; N mu ; B 33 -206 536 461 ; -C -1 ; WX 250 ; N .notdef ; B 125 0 125 0 ; -EndCharMetrics -StartKernData -StartKernPairs 998 -KPX A C -73 -KPX A Ccedilla -78 -KPX A G -68 -KPX A O -68 -KPX A Odieresis -68 -KPX A Q -68 -KPX A T -59 -KPX A U -66 -KPX A Uacute -66 -KPX A Ucircumflex -66 -KPX A Udieresis -66 -KPX A Ugrave -66 -KPX A V -130 -KPX A W -116 -KPX A Y -74 -KPX A a -5 -KPX A b -22 -KPX A c -34 -KPX A ccedilla -43 -KPX A comma 1 -KPX A d -28 -KPX A e -32 -KPX A g -7 -KPX A guillemotleft -53 -KPX A guilsinglleft -67 -KPX A hyphen -30 -KPX A o -36 -KPX A period 0 -KPX A q -38 -KPX A quotedblright -76 -KPX A quoteright -108 -KPX A t -27 -KPX A u -30 -KPX A v -84 -KPX A w -80 -KPX A y -84 -KPX Aacute C -73 -KPX Aacute G -68 -KPX Aacute O -68 -KPX Aacute Q -68 -KPX Aacute T -59 -KPX Aacute U -66 -KPX Aacute V -130 -KPX Aacute W -116 -KPX Aacute Y -74 -KPX Aacute a -5 -KPX Aacute b -22 -KPX Aacute c -34 -KPX Aacute comma 1 -KPX Aacute d -28 -KPX Aacute e -32 -KPX Aacute g -7 -KPX Aacute guillemotleft -53 -KPX Aacute guilsinglleft -67 -KPX Aacute hyphen -30 -KPX Aacute o -36 -KPX Aacute period 0 -KPX Aacute q -38 -KPX Aacute quoteright -108 -KPX Aacute t -27 -KPX Aacute u -30 -KPX Aacute v -84 -KPX Aacute w -80 -KPX Aacute y -84 -KPX Acircumflex C -73 -KPX Acircumflex G -68 -KPX Acircumflex O -68 -KPX Acircumflex Q -68 -KPX Acircumflex T -59 -KPX Acircumflex U -66 -KPX Acircumflex V -130 -KPX Acircumflex W -116 -KPX Acircumflex Y -74 -KPX Acircumflex comma 1 -KPX Acircumflex period 0 -KPX Adieresis C -73 -KPX Adieresis G -68 -KPX Adieresis O -68 -KPX Adieresis Q -68 -KPX Adieresis T -59 -KPX Adieresis U -66 -KPX Adieresis V -130 -KPX Adieresis W -116 -KPX Adieresis Y -74 -KPX Adieresis a -5 -KPX Adieresis b -22 -KPX Adieresis c -34 -KPX Adieresis comma 1 -KPX Adieresis d -28 -KPX Adieresis g -7 -KPX Adieresis guillemotleft -53 -KPX Adieresis guilsinglleft -67 -KPX Adieresis hyphen -30 -KPX Adieresis o -36 -KPX Adieresis period 0 -KPX Adieresis q -38 -KPX Adieresis quotedblright -76 -KPX Adieresis quoteright -108 -KPX Adieresis t -27 -KPX Adieresis u -30 -KPX Adieresis v -84 -KPX Adieresis w -80 -KPX Adieresis y -84 -KPX Agrave C -73 -KPX Agrave G -68 -KPX Agrave O -68 -KPX Agrave Q -68 -KPX Agrave T -59 -KPX Agrave U -66 -KPX Agrave V -130 -KPX Agrave W -116 -KPX Agrave Y -74 -KPX Agrave comma 1 -KPX Agrave period 0 -KPX Aring C -73 -KPX Aring G -68 -KPX Aring O -68 -KPX Aring Q -68 -KPX Aring T -59 -KPX Aring U -66 -KPX Aring V -130 -KPX Aring W -116 -KPX Aring Y -74 -KPX Aring a -5 -KPX Aring b -22 -KPX Aring c -34 -KPX Aring comma 1 -KPX Aring d -28 -KPX Aring e -32 -KPX Aring g -7 -KPX Aring guillemotleft -53 -KPX Aring guilsinglleft -67 -KPX Aring hyphen -30 -KPX Aring o -36 -KPX Aring period 0 -KPX Aring q -38 -KPX Aring quotedblright -76 -KPX Aring quoteright -108 -KPX Aring t -27 -KPX Aring u -30 -KPX Aring v -84 -KPX Aring w -80 -KPX Aring y -84 -KPX Atilde C -73 -KPX Atilde G -68 -KPX Atilde O -68 -KPX Atilde Q -68 -KPX Atilde T -59 -KPX Atilde U -66 -KPX Atilde V -130 -KPX Atilde W -116 -KPX Atilde Y -74 -KPX Atilde comma 1 -KPX Atilde period 0 -KPX B A -34 -KPX B AE -32 -KPX B Aacute -34 -KPX B Acircumflex -34 -KPX B Adieresis -34 -KPX B Aring -34 -KPX B Atilde -34 -KPX B O -12 -KPX B OE -4 -KPX B Oacute -12 -KPX B Ocircumflex -12 -KPX B Odieresis -12 -KPX B Ograve -12 -KPX B Oslash -11 -KPX B V -45 -KPX B W -46 -KPX B Y -44 -KPX C A -25 -KPX C AE -22 -KPX C Aacute -25 -KPX C Adieresis -25 -KPX C Aring -25 -KPX C H -2 -KPX C K -6 -KPX C O -14 -KPX C Oacute -14 -KPX C Odieresis -14 -KPX Ccedilla A -33 -KPX D A -55 -KPX D Aacute -55 -KPX D Acircumflex -55 -KPX D Adieresis -55 -KPX D Agrave -55 -KPX D Aring -55 -KPX D Atilde -55 -KPX D J -38 -KPX D T -6 -KPX D V -60 -KPX D W -50 -KPX D X -50 -KPX D Y -59 -KPX F A -80 -KPX F Aacute -80 -KPX F Acircumflex -80 -KPX F Adieresis -80 -KPX F Agrave -80 -KPX F Aring -80 -KPX F Atilde -80 -KPX F J -42 -KPX F O -7 -KPX F Odieresis -7 -KPX F a -50 -KPX F aacute -50 -KPX F adieresis -22 -KPX F ae -53 -KPX F aring -50 -KPX F comma -59 -KPX F e -51 -KPX F eacute -51 -KPX F hyphen -34 -KPX F i -1 -KPX F j -26 -KPX F o -54 -KPX F oacute -54 -KPX F odieresis -25 -KPX F oe -52 -KPX F oslash -53 -KPX F period -60 -KPX F r -7 -KPX F u -10 -KPX G A -27 -KPX G AE -24 -KPX G Aacute -27 -KPX G Acircumflex -27 -KPX G Adieresis -27 -KPX G Agrave -27 -KPX G Aring -27 -KPX G Atilde -27 -KPX G T -41 -KPX G V -33 -KPX G W -35 -KPX G Y -33 -KPX J A -30 -KPX J AE -27 -KPX J Adieresis -30 -KPX J Aring -30 -KPX K C -61 -KPX K G -56 -KPX K O -56 -KPX K OE -45 -KPX K Oacute -56 -KPX K Odieresis -56 -KPX K S 13 -KPX K T -2 -KPX K a 6 -KPX K adieresis 6 -KPX K ae 3 -KPX K aring 6 -KPX K e -20 -KPX K hyphen -47 -KPX K o -24 -KPX K oacute -24 -KPX K odieresis -24 -KPX K u -18 -KPX K udieresis -18 -KPX K y -83 -KPX L A -1 -KPX L AE 1 -KPX L Aacute -1 -KPX L Adieresis -1 -KPX L Aring -1 -KPX L C -11 -KPX L Ccedilla -14 -KPX L G -5 -KPX L O -5 -KPX L Oacute -5 -KPX L Ocircumflex -5 -KPX L Odieresis -5 -KPX L Ograve -5 -KPX L Otilde -5 -KPX L S 2 -KPX L T -74 -KPX L U -29 -KPX L Udieresis -29 -KPX L V -106 -KPX L W -87 -KPX L Y -89 -KPX L hyphen 24 -KPX L quotedblright -37 -KPX L quoteright -69 -KPX L u -11 -KPX L udieresis -13 -KPX L y -49 -KPX N A -19 -KPX N AE -16 -KPX N Aacute -19 -KPX N Adieresis -19 -KPX N Aring -19 -KPX N C -22 -KPX N Ccedilla -22 -KPX N G -16 -KPX N O -15 -KPX N Oacute -15 -KPX N Odieresis -15 -KPX N a -16 -KPX N aacute -16 -KPX N adieresis -16 -KPX N ae -19 -KPX N aring -16 -KPX N comma 1 -KPX N e -14 -KPX N eacute -14 -KPX N o -16 -KPX N oacute -16 -KPX N odieresis -16 -KPX N oslash -15 -KPX N period 0 -KPX N u -17 -KPX N udieresis -17 -KPX O A -56 -KPX O AE -54 -KPX O Aacute -56 -KPX O Adieresis -56 -KPX O Aring -56 -KPX O T -9 -KPX O V -60 -KPX O W -54 -KPX O X -51 -KPX O Y -59 -KPX Oacute A -56 -KPX Oacute T -9 -KPX Oacute V -60 -KPX Oacute W -54 -KPX Oacute Y -59 -KPX Ocircumflex T -9 -KPX Ocircumflex V -60 -KPX Ocircumflex Y -59 -KPX Odieresis A -56 -KPX Odieresis T -9 -KPX Odieresis V -60 -KPX Odieresis W -54 -KPX Odieresis X -51 -KPX Odieresis Y -59 -KPX Ograve T -9 -KPX Ograve V -60 -KPX Ograve Y -59 -KPX Oslash A -52 -KPX Otilde T -9 -KPX Otilde V -60 -KPX Otilde Y -59 -KPX P A -82 -KPX P AE -94 -KPX P Aacute -82 -KPX P Adieresis -82 -KPX P Aring -82 -KPX P J -68 -KPX P a -20 -KPX P aacute -20 -KPX P adieresis -19 -KPX P ae -23 -KPX P aring -20 -KPX P comma -86 -KPX P e -30 -KPX P eacute -30 -KPX P hyphen -39 -KPX P o -33 -KPX P oacute -33 -KPX P odieresis -22 -KPX P oe -31 -KPX P oslash -34 -KPX P period -87 -KPX R C -36 -KPX R Ccedilla -37 -KPX R G -30 -KPX R O -29 -KPX R OE -22 -KPX R Oacute -29 -KPX R Odieresis -29 -KPX R T -26 -KPX R U -37 -KPX R Udieresis -37 -KPX R V -53 -KPX R W -54 -KPX R Y -52 -KPX R a 7 -KPX R aacute 7 -KPX R adieresis 7 -KPX R ae 4 -KPX R aring 7 -KPX R e -19 -KPX R eacute -19 -KPX R hyphen -30 -KPX R o -23 -KPX R oacute -23 -KPX R odieresis -23 -KPX R oe -21 -KPX R u -17 -KPX R uacute -17 -KPX R udieresis -17 -KPX R y -27 -KPX S A -24 -KPX S AE -21 -KPX S Aacute -24 -KPX S Adieresis -24 -KPX S Aring -24 -KPX S T -16 -KPX S V -9 -KPX S W -10 -KPX S Y -8 -KPX S t -10 -KPX T A -46 -KPX T AE -44 -KPX T Aacute -46 -KPX T Acircumflex -46 -KPX T Adieresis -46 -KPX T Agrave -46 -KPX T Aring -46 -KPX T Atilde -46 -KPX T C -17 -KPX T G -11 -KPX T J -43 -KPX T O -9 -KPX T OE -3 -KPX T Oacute -9 -KPX T Ocircumflex -9 -KPX T Odieresis -9 -KPX T Ograve -9 -KPX T Oslash -11 -KPX T Otilde -9 -KPX T S -2 -KPX T V 11 -KPX T W 9 -KPX T Y 11 -KPX T a -65 -KPX T ae -69 -KPX T c -88 -KPX T colon -85 -KPX T comma -63 -KPX T e -86 -KPX T g -68 -KPX T guillemotleft -99 -KPX T guilsinglleft -113 -KPX T hyphen -73 -KPX T i -16 -KPX T j -40 -KPX T o -88 -KPX T oslash -87 -KPX T period -64 -KPX T r -61 -KPX T s -59 -KPX T semicolon -85 -KPX T u -89 -KPX T v -106 -KPX T w -107 -KPX T y -104 -KPX U A -55 -KPX U AE -52 -KPX U Aacute -55 -KPX U Acircumflex -55 -KPX U Adieresis -55 -KPX U Aring -55 -KPX U Atilde -55 -KPX U comma -17 -KPX U m -23 -KPX U n -25 -KPX U p -28 -KPX U period -18 -KPX U r -29 -KPX Uacute A -55 -KPX Uacute comma -17 -KPX Uacute m -23 -KPX Uacute n -25 -KPX Uacute p -28 -KPX Uacute period -18 -KPX Uacute r -29 -KPX Ucircumflex A -55 -KPX Udieresis A -55 -KPX Udieresis b 10 -KPX Udieresis comma -17 -KPX Udieresis m -23 -KPX Udieresis n -25 -KPX Udieresis p -28 -KPX Udieresis period -18 -KPX Udieresis r -29 -KPX Ugrave A -55 -KPX V A -114 -KPX V AE -113 -KPX V Aacute -114 -KPX V Acircumflex -114 -KPX V Adieresis -114 -KPX V Agrave -114 -KPX V Aring -114 -KPX V Atilde -114 -KPX V C -70 -KPX V G -64 -KPX V O -63 -KPX V Oacute -63 -KPX V Ocircumflex -63 -KPX V Odieresis -63 -KPX V Ograve -63 -KPX V Oslash -65 -KPX V Otilde -63 -KPX V S -25 -KPX V T 8 -KPX V a -87 -KPX V ae -90 -KPX V colon -94 -KPX V comma -94 -KPX V e -86 -KPX V g -87 -KPX V guillemotleft -98 -KPX V guilsinglleft -112 -KPX V hyphen -68 -KPX V i -12 -KPX V o -89 -KPX V oslash -87 -KPX V period -95 -KPX V r -60 -KPX V semicolon -94 -KPX V u -58 -KPX V y -56 -KPX W A -99 -KPX W AE -102 -KPX W Aacute -99 -KPX W Acircumflex -99 -KPX W Adieresis -99 -KPX W Agrave -99 -KPX W Aring -99 -KPX W Atilde -99 -KPX W C -58 -KPX W G -52 -KPX W O -51 -KPX W Oacute -51 -KPX W Ocircumflex -51 -KPX W Odieresis -51 -KPX W Ograve -51 -KPX W Oslash -50 -KPX W Otilde -51 -KPX W S -24 -KPX W T 9 -KPX W a -70 -KPX W ae -73 -KPX W colon -80 -KPX W comma -72 -KPX W e -68 -KPX W g -70 -KPX W guillemotleft -79 -KPX W guilsinglleft -93 -KPX W hyphen -49 -KPX W i -11 -KPX W o -70 -KPX W oslash -69 -KPX W period -73 -KPX W r -49 -KPX W semicolon -80 -KPX W u -45 -KPX W y -44 -KPX X C -63 -KPX X O -56 -KPX X Odieresis -56 -KPX X Q -57 -KPX X a 0 -KPX X e -27 -KPX X hyphen -43 -KPX X o -31 -KPX X u -25 -KPX X y -90 -KPX Y A -64 -KPX Y AE -62 -KPX Y Aacute -64 -KPX Y Acircumflex -64 -KPX Y Adieresis -64 -KPX Y Agrave -64 -KPX Y Aring -64 -KPX Y Atilde -64 -KPX Y C -71 -KPX Y G -65 -KPX Y O -64 -KPX Y Oacute -64 -KPX Y Ocircumflex -64 -KPX Y Odieresis -64 -KPX Y Ograve -64 -KPX Y Oslash -68 -KPX Y Otilde -64 -KPX Y S -26 -KPX Y T 7 -KPX Y a -83 -KPX Y ae -87 -KPX Y colon -103 -KPX Y comma -80 -KPX Y e -93 -KPX Y g -86 -KPX Y guillemotleft -111 -KPX Y guilsinglleft -125 -KPX Y hyphen -87 -KPX Y i -13 -KPX Y o -96 -KPX Y oslash -95 -KPX Y p -72 -KPX Y period -81 -KPX Y semicolon -103 -KPX Y u -76 -KPX Y v -78 -KPX Z v -45 -KPX Z y -45 -KPX a j -39 -KPX a quoteright -34 -KPX a v -39 -KPX a w -40 -KPX a y -44 -KPX aacute v -39 -KPX aacute w -40 -KPX aacute y -44 -KPX adieresis v -39 -KPX adieresis w -40 -KPX adieresis y -44 -KPX ae v -33 -KPX ae w -34 -KPX ae y -37 -KPX agrave v -39 -KPX agrave w -40 -KPX agrave y -44 -KPX aring v -39 -KPX aring w -40 -KPX aring y -44 -KPX b v -39 -KPX b w -40 -KPX b y -42 -KPX c h -17 -KPX c k -18 -KPX comma one -12 -KPX comma quotedblright 9 -KPX comma quoteright -23 -KPX e quoteright -20 -KPX e t -11 -KPX e v -30 -KPX e w -31 -KPX e x -19 -KPX e y -32 -KPX eacute v -30 -KPX eacute w -31 -KPX eacute y -32 -KPX ecircumflex v -30 -KPX ecircumflex w -31 -KPX ecircumflex y -32 -KPX eight four 11 -KPX eight one -19 -KPX eight seven 0 -KPX f a -17 -KPX f aacute -17 -KPX f adieresis 14 -KPX f ae -20 -KPX f aring -14 -KPX f e -29 -KPX f eacute -29 -KPX f f 12 -KPX f i 22 -KPX f j -1 -KPX f l 33 -KPX f o -32 -KPX f oacute -32 -KPX f odieresis 11 -KPX f oe -30 -KPX f oslash -31 -KPX f quoteright 18 -KPX f s -8 -KPX f t -3 -KPX five four 1 -KPX five one -28 -KPX five seven -9 -KPX four four 13 -KPX four one -35 -KPX four seven -16 -KPX g a -15 -KPX g adieresis -15 -KPX g ae -18 -KPX g aring -15 -KPX g e -20 -KPX g eacute -20 -KPX g l 0 -KPX g oacute -20 -KPX g odieresis -20 -KPX g r 1 -KPX guillemotright A -41 -KPX guillemotright AE -46 -KPX guillemotright Aacute -41 -KPX guillemotright Adieresis -41 -KPX guillemotright Aring -41 -KPX guillemotright T -100 -KPX guillemotright V -102 -KPX guillemotright W -84 -KPX guillemotright Y -106 -KPX guilsinglright A -55 -KPX guilsinglright AE -60 -KPX guilsinglright Aacute -55 -KPX guilsinglright Adieresis -55 -KPX guilsinglright Aring -55 -KPX guilsinglright T -114 -KPX guilsinglright V -116 -KPX guilsinglright W -98 -KPX guilsinglright Y -120 -KPX h quoteright -30 -KPX h y -34 -KPX hyphen A -18 -KPX hyphen AE -24 -KPX hyphen Aacute -18 -KPX hyphen Adieresis -18 -KPX hyphen Aring -18 -KPX hyphen T -74 -KPX hyphen V -72 -KPX hyphen W -54 -KPX hyphen Y -83 -KPX i T -18 -KPX i j -36 -KPX k a -3 -KPX k aacute -3 -KPX k adieresis -3 -KPX k ae -6 -KPX k aring -3 -KPX k comma 0 -KPX k e -33 -KPX k eacute -33 -KPX k g -4 -KPX k hyphen -47 -KPX k o -38 -KPX k oacute -38 -KPX k odieresis -38 -KPX k period 0 -KPX k s 5 -KPX k u -5 -KPX k udieresis -5 -KPX l v -22 -KPX l y -19 -KPX m p -16 -KPX m v -32 -KPX m w -33 -KPX m y -33 -KPX n T -56 -KPX n p -15 -KPX n quoteright -28 -KPX n v -31 -KPX n w -32 -KPX n y -32 -KPX nine four 2 -KPX nine one -26 -KPX nine seven 10 -KPX o T -88 -KPX o quoteright -28 -KPX o t -11 -KPX o v -42 -KPX o w -38 -KPX o x -29 -KPX o y -43 -KPX oacute v -42 -KPX oacute w -38 -KPX oacute y -43 -KPX ocircumflex t -11 -KPX odieresis t -11 -KPX odieresis v -42 -KPX odieresis w -38 -KPX odieresis x -29 -KPX odieresis y -43 -KPX ograve v -42 -KPX ograve w -38 -KPX ograve y -43 -KPX one comma -16 -KPX one eight -34 -KPX one five -16 -KPX one four -56 -KPX one nine -9 -KPX one one -27 -KPX one period -17 -KPX one seven -56 -KPX one six -47 -KPX one three -9 -KPX one two -2 -KPX one zero -35 -KPX p t -11 -KPX p y -33 -KPX period one -21 -KPX period quotedblright 4 -KPX period quoteright -27 -KPX q c -14 -KPX q u -15 -KPX quotedblbase A 18 -KPX quotedblbase AE 20 -KPX quotedblbase T -59 -KPX quotedblbase V -98 -KPX quotedblbase W -75 -KPX quotedblbase Y -73 -KPX quotedblleft A -59 -KPX quotedblleft AE -78 -KPX quotedblleft Aacute -59 -KPX quotedblleft Adieresis -59 -KPX quotedblleft Aring -59 -KPX quotedblleft T 9 -KPX quotedblleft V 15 -KPX quotedblleft W 13 -KPX quotedblleft Y 15 -KPX quotedblright A -72 -KPX quotedblright AE -91 -KPX quotedblright Aacute -72 -KPX quotedblright Adieresis -72 -KPX quotedblright Aring -72 -KPX quotedblright T 4 -KPX quotedblright V 5 -KPX quotedblright W 4 -KPX quotedblright Y 6 -KPX quoteleft A -92 -KPX quoteleft AE -111 -KPX quoteleft Aacute -92 -KPX quoteleft Adieresis -92 -KPX quoteleft Aring -92 -KPX quoteleft T -22 -KPX quoteleft V -17 -KPX quoteleft W -19 -KPX quoteleft Y -17 -KPX quoteright A -91 -KPX quoteright AE -110 -KPX quoteright Aacute -91 -KPX quoteright Adieresis -91 -KPX quoteright Aring -91 -KPX quoteright comma -34 -KPX quoteright d -31 -KPX quoteright o -34 -KPX quoteright period -35 -KPX quoteright r -27 -KPX quoteright s -17 -KPX quoteright t -19 -KPX quoteright v -25 -KPX quoteright w -23 -KPX quoteright y -22 -KPX r a -6 -KPX r aacute -6 -KPX r acircumflex -6 -KPX r adieresis -6 -KPX r ae -8 -KPX r agrave -6 -KPX r aring -6 -KPX r c -15 -KPX r ccedilla -10 -KPX r colon -16 -KPX r comma -67 -KPX r d -13 -KPX r e -11 -KPX r eacute -11 -KPX r ecircumflex -11 -KPX r egrave -11 -KPX r f 11 -KPX r g -5 -KPX r h -15 -KPX r hyphen -18 -KPX r i 6 -KPX r j -12 -KPX r k -15 -KPX r l -14 -KPX r m 6 -KPX r n 3 -KPX r o -14 -KPX r oacute -14 -KPX r ocircumflex -14 -KPX r odieresis -14 -KPX r oe -12 -KPX r ograve -14 -KPX r oslash -14 -KPX r p 3 -KPX r period -68 -KPX r q -15 -KPX r quoteright -8 -KPX r r 0 -KPX r s 0 -KPX r semicolon -16 -KPX r t 9 -KPX r u 8 -KPX r v 8 -KPX r w 7 -KPX r x 10 -KPX r y 8 -KPX r z -1 -KPX s quoteright -17 -KPX s t -7 -KPX seven colon -64 -KPX seven comma -57 -KPX seven eight -18 -KPX seven five -34 -KPX seven four -54 -KPX seven one -25 -KPX seven period -58 -KPX seven seven -6 -KPX seven six -36 -KPX seven three -20 -KPX seven two -21 -KPX six four 13 -KPX six one -43 -KPX six seven -7 -KPX t S 11 -KPX t a 11 -KPX t aacute 11 -KPX t adieresis 11 -KPX t ae 7 -KPX t aring 11 -KPX t colon -12 -KPX t e -1 -KPX t eacute -1 -KPX t h -4 -KPX t o -3 -KPX t oacute -3 -KPX t odieresis -3 -KPX t quoteright -31 -KPX t semicolon -12 -KPX three four 9 -KPX three one -33 -KPX three seven -15 -KPX two four 14 -KPX two one -29 -KPX two seven -7 -KPX u quoteright -25 -KPX v a -23 -KPX v aacute -23 -KPX v acircumflex -23 -KPX v adieresis -23 -KPX v ae -25 -KPX v agrave -23 -KPX v aring -23 -KPX v atilde -23 -KPX v c -40 -KPX v colon -23 -KPX v comma -56 -KPX v e -35 -KPX v eacute -35 -KPX v ecircumflex -35 -KPX v egrave -35 -KPX v g -23 -KPX v hyphen -28 -KPX v l -16 -KPX v o -40 -KPX v oacute -40 -KPX v odieresis -40 -KPX v ograve -40 -KPX v oslash -39 -KPX v period -57 -KPX v s -16 -KPX v semicolon -23 -KPX w a -23 -KPX w aacute -23 -KPX w acircumflex -23 -KPX w adieresis -23 -KPX w ae -25 -KPX w agrave -23 -KPX w aring -23 -KPX w atilde -23 -KPX w c -36 -KPX w colon -23 -KPX w comma -51 -KPX w e -34 -KPX w eacute -34 -KPX w ecircumflex -34 -KPX w egrave -34 -KPX w g -23 -KPX w hyphen -23 -KPX w l -16 -KPX w o -36 -KPX w oacute -36 -KPX w odieresis -36 -KPX w ograve -36 -KPX w oslash -35 -KPX w period -52 -KPX w s -16 -KPX w semicolon -23 -KPX x a -2 -KPX x c -30 -KPX x e -28 -KPX x eacute -28 -KPX x o -30 -KPX x q -32 -KPX y a -32 -KPX y aacute -32 -KPX y acircumflex -32 -KPX y adieresis -32 -KPX y ae -34 -KPX y agrave -32 -KPX y aring -32 -KPX y atilde -32 -KPX y c -43 -KPX y colon -28 -KPX y comma -56 -KPX y e -40 -KPX y eacute -40 -KPX y ecircumflex -40 -KPX y egrave -40 -KPX y g -31 -KPX y hyphen -29 -KPX y l -19 -KPX y o -43 -KPX y oacute -43 -KPX y odieresis -43 -KPX y ograve -43 -KPX y oslash -42 -KPX y period -57 -KPX y s -24 -KPX y semicolon -28 -KPX zero four 11 -KPX zero one -31 -KPX zero seven 7 -EndKernPairs -EndKernData -EndFontMetrics diff --git a/misc/gs_afm/TimesBoO.afm b/misc/gs_afm/TimesBoO.afm deleted file mode 100644 index a31acdadc5..0000000000 --- a/misc/gs_afm/TimesBoO.afm +++ /dev/null @@ -1,1253 +0,0 @@ -StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 2/11/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. -FontName NimbusRomNo9L-MediItal -FullName Nimbus Roman No9 L Medium Italic -FamilyName Nimbus Roman No9 L -Weight Bold -ItalicAngle -15.0 -IsFixedPitch false -UnderlinePosition -100 -UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW -EncodingScheme AdobeStandardEncoding -FontBBox -200 -218 996 949 -CapHeight 669 -XHeight 449 -Descender -205 -Ascender 699 -StartCharMetrics 232 -C 32 ; WX 250 ; N space ; B 125 0 125 0 ; -C 33 ; WX 389 ; N exclam ; B 67 -13 370 684 ; -C 34 ; WX 555 ; N quotedbl ; B 136 398 536 685 ; -C 35 ; WX 500 ; N numbersign ; B -33 0 533 700 ; -C 36 ; WX 500 ; N dollar ; B -20 -100 497 733 ; -C 37 ; WX 833 ; N percent ; B 39 -10 793 692 ; -C 38 ; WX 778 ; N ampersand ; B 5 -19 699 682 ; -C 39 ; WX 333 ; N quoteright ; B 98 369 302 685 ; -C 40 ; WX 333 ; N parenleft ; B 28 -179 344 685 ; -C 41 ; WX 333 ; N parenright ; B -44 -179 271 685 ; -C 42 ; WX 500 ; N asterisk ; B 65 252 456 685 ; -C 43 ; WX 570 ; N plus ; B 33 0 537 506 ; -C 44 ; WX 250 ; N comma ; B -60 -182 144 134 ; -C 45 ; WX 333 ; N hyphen ; B 2 166 271 282 ; -C 46 ; WX 250 ; N period ; B -9 -13 139 135 ; -C 47 ; WX 278 ; N slash ; B -64 -18 342 685 ; -C 48 ; WX 500 ; N zero ; B 17 -14 477 683 ; -C 49 ; WX 500 ; N one ; B 5 0 419 683 ; -C 50 ; WX 500 ; N two ; B -27 0 446 683 ; -C 51 ; WX 500 ; N three ; B -15 -13 450 683 ; -C 52 ; WX 500 ; N four ; B -15 0 503 683 ; -C 53 ; WX 500 ; N five ; B -11 -13 487 669 ; -C 54 ; WX 500 ; N six ; B 23 -15 509 679 ; -C 55 ; WX 500 ; N seven ; B 52 0 525 669 ; -C 56 ; WX 500 ; N eight ; B 3 -13 476 683 ; -C 57 ; WX 500 ; N nine ; B -12 -10 475 683 ; -C 58 ; WX 333 ; N colon ; B 23 -13 264 459 ; -C 59 ; WX 333 ; N semicolon ; B -25 -183 264 459 ; -C 60 ; WX 570 ; N less ; B 31 -12 539 518 ; -C 61 ; WX 570 ; N equal ; B 33 107 537 399 ; -C 62 ; WX 570 ; N greater ; B 31 -12 539 518 ; -C 63 ; WX 500 ; N question ; B 79 -13 470 684 ; -C 64 ; WX 832 ; N at ; B 63 -18 770 685 ; -C 65 ; WX 667 ; N A ; B -67 0 593 683 ; -C 66 ; WX 667 ; N B ; B -24 0 624 669 ; -C 67 ; WX 667 ; N C ; B 32 -18 677 685 ; -C 68 ; WX 722 ; N D ; B -46 0 685 669 ; -C 69 ; WX 667 ; N E ; B -27 0 653 669 ; -C 70 ; WX 667 ; N F ; B -13 0 660 669 ; -C 71 ; WX 722 ; N G ; B 21 -18 706 685 ; -C 72 ; WX 778 ; N H ; B -24 0 799 669 ; -C 73 ; WX 389 ; N I ; B -32 0 406 669 ; -C 74 ; WX 500 ; N J ; B -46 -99 524 669 ; -C 75 ; WX 667 ; N K ; B -21 0 702 669 ; -C 76 ; WX 611 ; N L ; B -22 0 590 669 ; -C 77 ; WX 889 ; N M ; B -29 -12 917 669 ; -C 78 ; WX 722 ; N N ; B -27 -15 748 669 ; -C 79 ; WX 722 ; N O ; B 27 -18 691 685 ; -C 80 ; WX 611 ; N P ; B -27 0 613 669 ; -C 81 ; WX 722 ; N Q ; B 27 -208 691 685 ; -C 82 ; WX 667 ; N R ; B -29 0 623 669 ; -C 83 ; WX 556 ; N S ; B 2 -18 526 685 ; -C 84 ; WX 611 ; N T ; B 50 0 650 669 ; -C 85 ; WX 722 ; N U ; B 67 -18 744 669 ; -C 86 ; WX 667 ; N V ; B 65 -18 715 669 ; -C 87 ; WX 889 ; N W ; B 65 -18 940 669 ; -C 88 ; WX 667 ; N X ; B -24 0 694 669 ; -C 89 ; WX 611 ; N Y ; B 73 0 659 669 ; -C 90 ; WX 611 ; N Z ; B -11 0 590 669 ; -C 91 ; WX 333 ; N bracketleft ; B -37 -159 362 674 ; -C 92 ; WX 278 ; N backslash ; B -1 -18 279 685 ; -C 93 ; WX 333 ; N bracketright ; B -56 -157 343 674 ; -C 94 ; WX 570 ; N asciicircum ; B 67 304 503 669 ; -C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; -C 96 ; WX 333 ; N quoteleft ; B 128 369 332 685 ; -C 97 ; WX 500 ; N a ; B -21 -14 455 462 ; -C 98 ; WX 500 ; N b ; B -14 -13 444 699 ; -C 99 ; WX 444 ; N c ; B -5 -13 392 462 ; -C 100 ; WX 500 ; N d ; B -21 -13 517 699 ; -C 101 ; WX 444 ; N e ; B 5 -13 398 462 ; -C 102 ; WX 333 ; N f ; B -169 -205 446 698 ; -C 103 ; WX 500 ; N g ; B -52 -203 478 462 ; -C 104 ; WX 556 ; N h ; B -13 -9 498 699 ; -C 105 ; WX 278 ; N i ; B 2 -9 262 684 ; -C 106 ; WX 278 ; N j ; B -189 -207 279 685 ; -C 107 ; WX 500 ; N k ; B -23 -8 483 699 ; -C 108 ; WX 278 ; N l ; B 2 -9 290 699 ; -C 109 ; WX 778 ; N m ; B -14 -9 722 462 ; -C 110 ; WX 556 ; N n ; B -6 -9 493 462 ; -C 111 ; WX 500 ; N o ; B -3 -13 441 462 ; -C 112 ; WX 500 ; N p ; B -120 -205 446 462 ; -C 113 ; WX 500 ; N q ; B 1 -205 471 462 ; -C 114 ; WX 389 ; N r ; B -21 0 389 462 ; -C 115 ; WX 389 ; N s ; B -19 -13 333 462 ; -C 116 ; WX 278 ; N t ; B -11 -9 281 594 ; -C 117 ; WX 556 ; N u ; B 15 -9 492 462 ; -C 118 ; WX 444 ; N v ; B 16 -13 401 462 ; -C 119 ; WX 667 ; N w ; B 16 -13 614 462 ; -C 120 ; WX 500 ; N x ; B -46 -13 469 462 ; -C 121 ; WX 444 ; N y ; B -94 -205 392 462 ; -C 122 ; WX 389 ; N z ; B -43 -78 368 449 ; -C 123 ; WX 348 ; N braceleft ; B 5 -187 436 686 ; -C 124 ; WX 220 ; N bar ; B 66 -18 154 685 ; -C 125 ; WX 348 ; N braceright ; B -129 -187 302 686 ; -C 126 ; WX 570 ; N asciitilde ; B 54 175 516 331 ; -C 161 ; WX 389 ; N exclamdown ; B 19 -205 320 494 ; -C 162 ; WX 500 ; N cent ; B 42 -143 439 576 ; -C 163 ; WX 500 ; N sterling ; B -32 -12 510 683 ; -C 164 ; WX 167 ; N fraction ; B -169 -14 324 683 ; -C 165 ; WX 500 ; N yen ; B 33 0 628 669 ; -C 166 ; WX 500 ; N florin ; B -87 -156 537 707 ; -C 167 ; WX 500 ; N section ; B 36 -143 459 685 ; -C 168 ; WX 500 ; N currency ; B -26 34 526 586 ; -C 169 ; WX 278 ; N quotesingle ; B 128 398 268 685 ; -C 170 ; WX 500 ; N quotedblleft ; B 53 369 513 685 ; -C 171 ; WX 500 ; N guillemotleft ; B 12 32 468 415 ; -C 172 ; WX 333 ; N guilsinglleft ; B 32 32 303 415 ; -C 173 ; WX 333 ; N guilsinglright ; B 10 32 281 415 ; -C 174 ; WX 556 ; N fi ; B -188 -205 514 703 ; -C 175 ; WX 556 ; N fl ; B -186 -205 553 704 ; -C 177 ; WX 500 ; N endash ; B -40 178 477 269 ; -C 178 ; WX 500 ; N dagger ; B 91 -145 494 685 ; -C 179 ; WX 500 ; N daggerdbl ; B 10 -139 493 685 ; -C 180 ; WX 250 ; N periodcentered ; B 51 257 199 405 ; -C 182 ; WX 500 ; N paragraph ; B -57 -193 562 669 ; -C 183 ; WX 350 ; N bullet ; B 0 175 350 525 ; -C 184 ; WX 333 ; N quotesinglbase ; B -5 -182 199 134 ; -C 185 ; WX 500 ; N quotedblbase ; B -57 -182 403 134 ; -C 186 ; WX 500 ; N quotedblright ; B 53 369 513 685 ; -C 187 ; WX 500 ; N guillemotright ; B 12 32 468 415 ; -C 188 ; WX 1000 ; N ellipsis ; B 40 -13 852 135 ; -C 189 ; WX 1000 ; N perthousand ; B 7 -29 996 706 ; -C 191 ; WX 500 ; N questiondown ; B 30 -205 421 492 ; -C 193 ; WX 333 ; N grave ; B 85 516 297 697 ; -C 194 ; WX 333 ; N acute ; B 139 516 379 697 ; -C 195 ; WX 333 ; N circumflex ; B 40 516 367 690 ; -C 196 ; WX 333 ; N tilde ; B 48 536 407 655 ; -C 197 ; WX 333 ; N macron ; B 51 553 393 623 ; -C 198 ; WX 333 ; N breve ; B 71 516 387 678 ; -C 199 ; WX 333 ; N dotaccent ; B 163 525 293 655 ; -C 200 ; WX 333 ; N dieresis ; B 55 525 397 655 ; -C 202 ; WX 333 ; N ring ; B 127 541 340 754 ; -C 203 ; WX 333 ; N cedilla ; B -80 -218 156 5 ; -C 205 ; WX 333 ; N hungarumlaut ; B 69 516 498 697 ; -C 206 ; WX 333 ; N ogonek ; B -40 -173 189 44 ; -C 207 ; WX 333 ; N caron ; B 79 516 411 690 ; -C 208 ; WX 1000 ; N emdash ; B -40 178 977 269 ; -C 225 ; WX 944 ; N AE ; B -64 0 918 669 ; -C 227 ; WX 266 ; N ordfeminine ; B 16 399 330 685 ; -C 232 ; WX 611 ; N Lslash ; B -22 0 590 669 ; -C 233 ; WX 722 ; N Oslash ; B 27 -125 691 764 ; -C 234 ; WX 944 ; N OE ; B 23 -8 946 677 ; -C 235 ; WX 300 ; N ordmasculine ; B 56 400 350 685 ; -C 241 ; WX 722 ; N ae ; B -5 -13 673 462 ; -C 245 ; WX 278 ; N dotlessi ; B 2 -9 238 462 ; -C 248 ; WX 278 ; N lslash ; B -13 -9 301 699 ; -C 249 ; WX 500 ; N oslash ; B -3 -119 441 560 ; -C 250 ; WX 722 ; N oe ; B 6 -13 674 462 ; -C 251 ; WX 500 ; N germandbls ; B -200 -200 473 705 ; -C -1 ; WX 611 ; N Yacute ; B 73 0 659 904 ; -C -1 ; WX 722 ; N Ucircumflex ; B 67 -18 744 897 ; -C -1 ; WX 722 ; N Ugrave ; B 67 -18 744 904 ; -C -1 ; WX 611 ; N Zcaron ; B -11 0 590 897 ; -C -1 ; WX 611 ; N Ydieresis ; B 73 0 659 862 ; -C -1 ; WX 300 ; N threesuperior ; B 17 265 321 683 ; -C -1 ; WX 722 ; N Uacute ; B 67 -18 744 904 ; -C -1 ; WX 300 ; N twosuperior ; B 2 274 313 683 ; -C -1 ; WX 722 ; N Udieresis ; B 67 -18 744 862 ; -C -1 ; WX 250 ; N middot ; B 51 257 199 405 ; -C -1 ; WX 300 ; N onesuperior ; B 30 274 301 683 ; -C -1 ; WX 500 ; N aacute ; B -21 -14 463 697 ; -C -1 ; WX 500 ; N agrave ; B -21 -14 455 697 ; -C -1 ; WX 500 ; N acircumflex ; B -21 -14 455 690 ; -C -1 ; WX 556 ; N Scaron ; B 2 -18 526 897 ; -C -1 ; WX 722 ; N Otilde ; B 27 -18 691 862 ; -C -1 ; WX 333 ; N sfthyphen ; B 2 166 271 282 ; -C -1 ; WX 500 ; N atilde ; B -21 -14 491 655 ; -C -1 ; WX 500 ; N aring ; B -21 -14 455 754 ; -C -1 ; WX 500 ; N adieresis ; B -21 -14 471 655 ; -C -1 ; WX 722 ; N Ograve ; B 27 -18 691 904 ; -C -1 ; WX 722 ; N Ocircumflex ; B 27 -18 691 897 ; -C -1 ; WX 722 ; N Odieresis ; B 27 -18 691 862 ; -C -1 ; WX 722 ; N Ntilde ; B -27 -15 748 862 ; -C -1 ; WX 444 ; N edieresis ; B 5 -13 443 655 ; -C -1 ; WX 444 ; N eacute ; B 5 -13 435 697 ; -C -1 ; WX 444 ; N egrave ; B 5 -13 398 697 ; -C -1 ; WX 389 ; N Icircumflex ; B -32 0 420 897 ; -C -1 ; WX 444 ; N ecircumflex ; B 5 -13 423 690 ; -C -1 ; WX 389 ; N Igrave ; B -32 0 406 904 ; -C -1 ; WX 389 ; N Iacute ; B -32 0 407 907 ; -C -1 ; WX 389 ; N Idieresis ; B -32 0 445 862 ; -C -1 ; WX 400 ; N degree ; B 83 397 369 683 ; -C -1 ; WX 667 ; N Ecircumflex ; B -27 0 653 897 ; -C -1 ; WX 606 ; N minus ; B 51 209 555 297 ; -C -1 ; WX 570 ; N multiply ; B 48 16 522 490 ; -C -1 ; WX 570 ; N divide ; B 33 -29 537 535 ; -C -1 ; WX 667 ; N Egrave ; B -27 0 653 904 ; -C -1 ; WX 1000 ; N trademark ; B 32 263 968 669 ; -C -1 ; WX 722 ; N Oacute ; B 27 -18 691 904 ; -C -1 ; WX 500 ; N thorn ; B -120 -205 446 699 ; -C -1 ; WX 500 ; N eth ; B -3 -13 454 699 ; -C -1 ; WX 667 ; N Eacute ; B -27 0 653 904 ; -C -1 ; WX 444 ; N ccedilla ; B -24 -218 392 462 ; -C -1 ; WX 278 ; N idieresis ; B 2 -9 360 655 ; -C -1 ; WX 278 ; N iacute ; B 2 -9 352 697 ; -C -1 ; WX 278 ; N igrave ; B 2 -9 260 697 ; -C -1 ; WX 570 ; N plusminus ; B 33 0 537 568 ; -C -1 ; WX 750 ; N onehalf ; B -9 -14 723 683 ; -C -1 ; WX 750 ; N onequarter ; B 7 -14 721 683 ; -C -1 ; WX 750 ; N threequarters ; B 7 -14 726 683 ; -C -1 ; WX 278 ; N icircumflex ; B -2 -9 325 690 ; -C -1 ; WX 667 ; N Edieresis ; B -27 0 653 862 ; -C -1 ; WX 556 ; N ntilde ; B -6 -9 504 655 ; -C -1 ; WX 667 ; N Aring ; B -67 0 593 949 ; -C -1 ; WX 500 ; N odieresis ; B -3 -13 466 655 ; -C -1 ; WX 500 ; N oacute ; B -3 -13 463 697 ; -C -1 ; WX 500 ; N ograve ; B -3 -13 441 697 ; -C -1 ; WX 500 ; N ocircumflex ; B -3 -13 451 690 ; -C -1 ; WX 500 ; N otilde ; B -3 -13 491 655 ; -C -1 ; WX 389 ; N scaron ; B -19 -13 439 690 ; -C -1 ; WX 556 ; N udieresis ; B 15 -9 494 655 ; -C -1 ; WX 556 ; N uacute ; B 15 -9 492 697 ; -C -1 ; WX 556 ; N ugrave ; B 15 -9 492 697 ; -C -1 ; WX 556 ; N ucircumflex ; B 15 -9 492 690 ; -C -1 ; WX 444 ; N yacute ; B -94 -205 435 697 ; -C -1 ; WX 389 ; N zcaron ; B -43 -78 424 690 ; -C -1 ; WX 444 ; N ydieresis ; B -94 -205 438 655 ; -C -1 ; WX 747 ; N copyright ; B 30 -18 718 685 ; -C -1 ; WX 747 ; N registered ; B 30 -18 718 685 ; -C -1 ; WX 667 ; N Atilde ; B -67 0 593 862 ; -C -1 ; WX 250 ; N nbspace ; B 125 0 125 0 ; -C -1 ; WX 667 ; N Ccedilla ; B 32 -218 677 685 ; -C -1 ; WX 667 ; N Acircumflex ; B -67 0 593 897 ; -C -1 ; WX 667 ; N Agrave ; B -67 0 593 904 ; -C -1 ; WX 606 ; N logicalnot ; B 51 108 555 399 ; -C -1 ; WX 667 ; N Aacute ; B -67 0 593 904 ; -C -1 ; WX 722 ; N Eth ; B -31 0 700 669 ; -C -1 ; WX 220 ; N brokenbar ; B 66 -18 154 685 ; -C -1 ; WX 611 ; N Thorn ; B -27 0 573 669 ; -C -1 ; WX 667 ; N Adieresis ; B -67 0 593 862 ; -C -1 ; WX 576 ; N mu ; B -60 -207 516 449 ; -C -1 ; WX 250 ; N .notdef ; B 125 0 125 0 ; -EndCharMetrics -StartKernData -StartKernPairs 994 -KPX A C -61 -KPX A Ccedilla -63 -KPX A G -59 -KPX A O -53 -KPX A Odieresis -53 -KPX A Q -55 -KPX A T -33 -KPX A U -61 -KPX A Uacute -61 -KPX A Ucircumflex -61 -KPX A Udieresis -61 -KPX A Ugrave -61 -KPX A V -109 -KPX A W -107 -KPX A Y -44 -KPX A a -6 -KPX A b -1 -KPX A c -20 -KPX A ccedilla -29 -KPX A comma 0 -KPX A d -5 -KPX A e -25 -KPX A g -21 -KPX A guillemotleft -58 -KPX A guilsinglleft -68 -KPX A hyphen -22 -KPX A o -23 -KPX A period 2 -KPX A q -18 -KPX A quotedblright -78 -KPX A quoteright -101 -KPX A t -4 -KPX A u -17 -KPX A v -51 -KPX A w -56 -KPX A y -67 -KPX Aacute C -61 -KPX Aacute G -59 -KPX Aacute O -53 -KPX Aacute Q -55 -KPX Aacute T -33 -KPX Aacute U -61 -KPX Aacute V -109 -KPX Aacute W -107 -KPX Aacute Y -44 -KPX Aacute a -6 -KPX Aacute b -1 -KPX Aacute c -20 -KPX Aacute comma 0 -KPX Aacute d -5 -KPX Aacute e -25 -KPX Aacute g -21 -KPX Aacute guillemotleft -58 -KPX Aacute guilsinglleft -68 -KPX Aacute hyphen -22 -KPX Aacute o -23 -KPX Aacute period 2 -KPX Aacute q -18 -KPX Aacute quoteright -101 -KPX Aacute t -4 -KPX Aacute u -17 -KPX Aacute v -51 -KPX Aacute w -56 -KPX Aacute y -67 -KPX Acircumflex C -61 -KPX Acircumflex G -59 -KPX Acircumflex O -53 -KPX Acircumflex Q -55 -KPX Acircumflex T -33 -KPX Acircumflex U -61 -KPX Acircumflex V -109 -KPX Acircumflex W -107 -KPX Acircumflex Y -44 -KPX Acircumflex comma 0 -KPX Acircumflex period 2 -KPX Adieresis C -61 -KPX Adieresis G -59 -KPX Adieresis O -53 -KPX Adieresis Q -55 -KPX Adieresis T -33 -KPX Adieresis U -61 -KPX Adieresis V -109 -KPX Adieresis W -107 -KPX Adieresis Y -44 -KPX Adieresis a -6 -KPX Adieresis b -1 -KPX Adieresis c -20 -KPX Adieresis comma 0 -KPX Adieresis d -5 -KPX Adieresis g -21 -KPX Adieresis guillemotleft -58 -KPX Adieresis guilsinglleft -68 -KPX Adieresis hyphen -22 -KPX Adieresis o -23 -KPX Adieresis period 2 -KPX Adieresis q -18 -KPX Adieresis quotedblright -78 -KPX Adieresis quoteright -101 -KPX Adieresis t -4 -KPX Adieresis u -17 -KPX Adieresis v -51 -KPX Adieresis w -56 -KPX Adieresis y -67 -KPX Agrave C -61 -KPX Agrave G -59 -KPX Agrave O -53 -KPX Agrave Q -55 -KPX Agrave T -33 -KPX Agrave U -61 -KPX Agrave V -109 -KPX Agrave W -107 -KPX Agrave Y -44 -KPX Agrave comma 0 -KPX Agrave period 2 -KPX Aring C -61 -KPX Aring G -59 -KPX Aring O -53 -KPX Aring Q -55 -KPX Aring T -33 -KPX Aring U -61 -KPX Aring V -109 -KPX Aring W -107 -KPX Aring Y -44 -KPX Aring a -6 -KPX Aring b -1 -KPX Aring c -20 -KPX Aring comma 0 -KPX Aring d -5 -KPX Aring e -25 -KPX Aring g -21 -KPX Aring guillemotleft -58 -KPX Aring guilsinglleft -68 -KPX Aring hyphen -22 -KPX Aring o -23 -KPX Aring period 2 -KPX Aring q -18 -KPX Aring quotedblright -78 -KPX Aring quoteright -101 -KPX Aring t -4 -KPX Aring u -17 -KPX Aring v -51 -KPX Aring w -56 -KPX Aring y -67 -KPX Atilde C -61 -KPX Atilde G -59 -KPX Atilde O -53 -KPX Atilde Q -55 -KPX Atilde T -33 -KPX Atilde U -61 -KPX Atilde V -109 -KPX Atilde W -107 -KPX Atilde Y -44 -KPX Atilde comma 0 -KPX Atilde period 2 -KPX B A -33 -KPX B AE -34 -KPX B Aacute -33 -KPX B Acircumflex -33 -KPX B Adieresis -33 -KPX B Aring -33 -KPX B Atilde -33 -KPX B O -22 -KPX B OE -19 -KPX B Oacute -22 -KPX B Ocircumflex -22 -KPX B Odieresis -22 -KPX B Ograve -22 -KPX B Oslash -22 -KPX B V -48 -KPX B W -51 -KPX B Y -52 -KPX C A -24 -KPX C AE -26 -KPX C Aacute -24 -KPX C Adieresis -24 -KPX C Aring -24 -KPX C H -26 -KPX C K -28 -KPX C O -25 -KPX C Oacute -25 -KPX C Odieresis -25 -KPX Ccedilla A -30 -KPX D A -52 -KPX D Aacute -52 -KPX D Acircumflex -52 -KPX D Adieresis -52 -KPX D Agrave -52 -KPX D Aring -52 -KPX D Atilde -52 -KPX D J -66 -KPX D T -27 -KPX D V -60 -KPX D W -58 -KPX D X -63 -KPX D Y -63 -KPX F A -99 -KPX F Aacute -99 -KPX F Acircumflex -99 -KPX F Adieresis -99 -KPX F Agrave -99 -KPX F Aring -99 -KPX F Atilde -99 -KPX F J -88 -KPX F O -48 -KPX F Odieresis -48 -KPX F a -74 -KPX F aacute -75 -KPX F adieresis -48 -KPX F ae -83 -KPX F aring -75 -KPX F comma -96 -KPX F e -85 -KPX F eacute -86 -KPX F hyphen -54 -KPX F i -29 -KPX F j -34 -KPX F o -81 -KPX F oacute -82 -KPX F odieresis -45 -KPX F oe -86 -KPX F oslash -82 -KPX F period -97 -KPX F r -32 -KPX F u -36 -KPX G A -14 -KPX G AE -15 -KPX G Aacute -14 -KPX G Acircumflex -14 -KPX G Adieresis -14 -KPX G Agrave -14 -KPX G Aring -14 -KPX G Atilde -14 -KPX G T -42 -KPX G V -27 -KPX G W -27 -KPX G Y -31 -KPX J A -39 -KPX J AE -41 -KPX J Adieresis -39 -KPX J Aring -39 -KPX K C -49 -KPX K G -45 -KPX K O -44 -KPX K OE -43 -KPX K Oacute -44 -KPX K Odieresis -44 -KPX K S -1 -KPX K T 0 -KPX K a 3 -KPX K adieresis 3 -KPX K ae -4 -KPX K aring 3 -KPX K e -15 -KPX K hyphen -30 -KPX K o -13 -KPX K oacute -13 -KPX K odieresis -13 -KPX K u -8 -KPX K udieresis -8 -KPX K y -68 -KPX L A 28 -KPX L AE 26 -KPX L Aacute 28 -KPX L Adieresis 28 -KPX L Aring 28 -KPX L C 0 -KPX L Ccedilla 0 -KPX L G 5 -KPX L O 4 -KPX L Oacute 4 -KPX L Ocircumflex 4 -KPX L Odieresis 4 -KPX L Ograve 4 -KPX L Otilde 4 -KPX L S 1 -KPX L T -30 -KPX L U -17 -KPX L Udieresis -17 -KPX L V -77 -KPX L W -75 -KPX L Y -41 -KPX L hyphen 41 -KPX L quotedblright -46 -KPX L quoteright -68 -KPX L u 6 -KPX L udieresis 6 -KPX L y -23 -KPX N A -39 -KPX N AE -40 -KPX N Aacute -39 -KPX N Adieresis -39 -KPX N Aring -39 -KPX N C -31 -KPX N Ccedilla -30 -KPX N G -27 -KPX N O -32 -KPX N Oacute -32 -KPX N Odieresis -32 -KPX N a -25 -KPX N aacute -26 -KPX N adieresis -26 -KPX N ae -33 -KPX N aring -26 -KPX N comma -24 -KPX N e -36 -KPX N eacute -38 -KPX N o -32 -KPX N oacute -34 -KPX N odieresis -34 -KPX N oslash -34 -KPX N period -25 -KPX N u -32 -KPX N udieresis -32 -KPX O A -56 -KPX O AE -65 -KPX O Aacute -56 -KPX O Adieresis -56 -KPX O Aring -56 -KPX O T -18 -KPX O V -52 -KPX O W -55 -KPX O X -61 -KPX O Y -56 -KPX Oacute A -56 -KPX Oacute T -18 -KPX Oacute V -52 -KPX Oacute W -55 -KPX Oacute Y -56 -KPX Ocircumflex T -18 -KPX Ocircumflex V -52 -KPX Ocircumflex Y -56 -KPX Odieresis A -56 -KPX Odieresis T -18 -KPX Odieresis V -52 -KPX Odieresis W -55 -KPX Odieresis X -61 -KPX Odieresis Y -56 -KPX Ograve T -18 -KPX Ograve V -52 -KPX Ograve Y -56 -KPX Oslash A -56 -KPX Otilde T -18 -KPX Otilde V -52 -KPX Otilde Y -56 -KPX P A -89 -KPX P AE -104 -KPX P Aacute -89 -KPX P Adieresis -89 -KPX P Aring -89 -KPX P J -105 -KPX P a -53 -KPX P aacute -53 -KPX P adieresis -38 -KPX P ae -61 -KPX P aring -53 -KPX P comma -108 -KPX P e -60 -KPX P eacute -60 -KPX P hyphen -57 -KPX P o -55 -KPX P oacute -55 -KPX P odieresis -35 -KPX P oe -60 -KPX P oslash -55 -KPX P period -109 -KPX R C -33 -KPX R Ccedilla -32 -KPX R G -28 -KPX R O -33 -KPX R OE -31 -KPX R Oacute -33 -KPX R Odieresis -33 -KPX R T -24 -KPX R U -43 -KPX R Udieresis -43 -KPX R V -46 -KPX R W -49 -KPX R Y -40 -KPX R a -1 -KPX R aacute -1 -KPX R adieresis -1 -KPX R ae -9 -KPX R aring -1 -KPX R e -20 -KPX R eacute -20 -KPX R hyphen -30 -KPX R o -18 -KPX R oacute -18 -KPX R odieresis -18 -KPX R oe -23 -KPX R u -13 -KPX R uacute -13 -KPX R udieresis -13 -KPX R y -12 -KPX S A -11 -KPX S AE -12 -KPX S Aacute -11 -KPX S Adieresis -11 -KPX S Aring -11 -KPX S T -33 -KPX S V -20 -KPX S W -20 -KPX S Y -24 -KPX S t -6 -KPX T A -52 -KPX T AE -54 -KPX T Aacute -52 -KPX T Acircumflex -52 -KPX T Adieresis -52 -KPX T Agrave -52 -KPX T Aring -52 -KPX T Atilde -52 -KPX T C -16 -KPX T G -10 -KPX T J -63 -KPX T O -21 -KPX T OE -18 -KPX T Oacute -21 -KPX T Ocircumflex -21 -KPX T Odieresis -21 -KPX T Ograve -21 -KPX T Oslash -22 -KPX T Otilde -21 -KPX T S -17 -KPX T V 15 -KPX T W 15 -KPX T Y 11 -KPX T a -83 -KPX T ae -91 -KPX T c -89 -KPX T colon -98 -KPX T comma -77 -KPX T e -94 -KPX T g -95 -KPX T guillemotleft -110 -KPX T guilsinglleft -120 -KPX T hyphen -74 -KPX T i -19 -KPX T j -27 -KPX T o -90 -KPX T oslash -92 -KPX T period -78 -KPX T r -76 -KPX T s -78 -KPX T semicolon -98 -KPX T u -90 -KPX T v -89 -KPX T w -89 -KPX T y -86 -KPX U A -65 -KPX U AE -66 -KPX U Aacute -65 -KPX U Acircumflex -65 -KPX U Adieresis -65 -KPX U Aring -65 -KPX U Atilde -65 -KPX U comma -39 -KPX U m -34 -KPX U n -38 -KPX U p -28 -KPX U period -40 -KPX U r -30 -KPX Uacute A -65 -KPX Uacute comma -39 -KPX Uacute m -34 -KPX Uacute n -38 -KPX Uacute p -28 -KPX Uacute period -40 -KPX Uacute r -30 -KPX Ucircumflex A -65 -KPX Udieresis A -65 -KPX Udieresis b 1 -KPX Udieresis comma -39 -KPX Udieresis m -34 -KPX Udieresis n -38 -KPX Udieresis p -28 -KPX Udieresis period -40 -KPX Udieresis r -30 -KPX Ugrave A -65 -KPX V A -98 -KPX V AE -111 -KPX V Aacute -98 -KPX V Acircumflex -98 -KPX V Adieresis -98 -KPX V Agrave -98 -KPX V Aring -98 -KPX V Atilde -98 -KPX V C -59 -KPX V G -54 -KPX V O -63 -KPX V Oacute -63 -KPX V Ocircumflex -63 -KPX V Odieresis -63 -KPX V Ograve -63 -KPX V Oslash -63 -KPX V Otilde -63 -KPX V S -28 -KPX V T 7 -KPX V a -75 -KPX V ae -84 -KPX V colon -95 -KPX V comma -95 -KPX V e -86 -KPX V g -82 -KPX V guillemotleft -98 -KPX V guilsinglleft -108 -KPX V hyphen -61 -KPX V i -12 -KPX V o -82 -KPX V oslash -83 -KPX V period -97 -KPX V r -39 -KPX V semicolon -95 -KPX V u -43 -KPX V y -33 -KPX W A -82 -KPX W AE -85 -KPX W Aacute -82 -KPX W Acircumflex -82 -KPX W Adieresis -82 -KPX W Agrave -82 -KPX W Aring -82 -KPX W Atilde -82 -KPX W C -47 -KPX W G -42 -KPX W O -48 -KPX W Oacute -48 -KPX W Ocircumflex -48 -KPX W Odieresis -48 -KPX W Ograve -48 -KPX W Oslash -48 -KPX W Otilde -48 -KPX W S -32 -KPX W T 7 -KPX W a -51 -KPX W ae -60 -KPX W colon -78 -KPX W comma -62 -KPX W e -63 -KPX W g -63 -KPX W guillemotleft -74 -KPX W guilsinglleft -84 -KPX W hyphen -37 -KPX W i -12 -KPX W o -58 -KPX W oslash -60 -KPX W period -63 -KPX W r -32 -KPX W semicolon -79 -KPX W u -36 -KPX W y -26 -KPX X C -56 -KPX X O -57 -KPX X Odieresis -57 -KPX X Q -57 -KPX X a -9 -KPX X e -28 -KPX X hyphen -45 -KPX X o -26 -KPX X u -21 -KPX X y -81 -KPX Y A -45 -KPX Y AE -47 -KPX Y Aacute -45 -KPX Y Acircumflex -45 -KPX Y Adieresis -45 -KPX Y Agrave -45 -KPX Y Aring -45 -KPX Y Atilde -45 -KPX Y C -59 -KPX Y G -55 -KPX Y O -60 -KPX Y Oacute -60 -KPX Y Ocircumflex -60 -KPX Y Odieresis -60 -KPX Y Ograve -60 -KPX Y Oslash -60 -KPX Y Otilde -60 -KPX Y S -28 -KPX Y T 7 -KPX Y a -69 -KPX Y ae -77 -KPX Y colon -91 -KPX Y comma -67 -KPX Y e -80 -KPX Y g -81 -KPX Y guillemotleft -97 -KPX Y guilsinglleft -107 -KPX Y hyphen -64 -KPX Y i -12 -KPX Y o -76 -KPX Y oslash -77 -KPX Y p -50 -KPX Y period -69 -KPX Y semicolon -91 -KPX Y u -56 -KPX Y v -54 -KPX Z v -27 -KPX Z y -38 -KPX a j -2 -KPX a quoteright -22 -KPX a v -5 -KPX a w -5 -KPX a y -3 -KPX aacute v -5 -KPX aacute w -5 -KPX aacute y -3 -KPX adieresis v -5 -KPX adieresis w -5 -KPX adieresis y -3 -KPX ae v -5 -KPX ae w -5 -KPX ae y -8 -KPX agrave v -5 -KPX agrave w -5 -KPX agrave y -3 -KPX aring v -5 -KPX aring w -5 -KPX aring y -3 -KPX b v -12 -KPX b w -12 -KPX b y -17 -KPX c h -20 -KPX c k -16 -KPX comma one -26 -KPX comma quotedblright -3 -KPX comma quoteright -25 -KPX e quoteright -13 -KPX e t -3 -KPX e v -3 -KPX e w -3 -KPX e x -15 -KPX e y -6 -KPX eacute v -3 -KPX eacute w -3 -KPX eacute y -6 -KPX ecircumflex v -3 -KPX ecircumflex w -3 -KPX ecircumflex y -6 -KPX eight four -4 -KPX eight one -52 -KPX eight seven -13 -KPX f a -23 -KPX f aacute -24 -KPX f adieresis 17 -KPX f ae -31 -KPX f aring -21 -KPX f e -35 -KPX f eacute -36 -KPX f f 2 -KPX f i 20 -KPX f j 12 -KPX f l 43 -KPX f o -30 -KPX f oacute -31 -KPX f odieresis 20 -KPX f oe -35 -KPX f oslash -31 -KPX f quoteright 12 -KPX f s -14 -KPX f t 9 -KPX five four -13 -KPX five one -56 -KPX five seven -37 -KPX four four 1 -KPX four one -50 -KPX four seven -21 -KPX g a -25 -KPX g adieresis -25 -KPX g ae -34 -KPX g aring -25 -KPX g e -32 -KPX g eacute -32 -KPX g l -21 -KPX g oacute -27 -KPX g odieresis -27 -KPX g r 3 -KPX guillemotright A -28 -KPX guillemotright AE -37 -KPX guillemotright Aacute -28 -KPX guillemotright Adieresis -28 -KPX guillemotright Aring -28 -KPX guillemotright T -75 -KPX guillemotright V -79 -KPX guillemotright W -75 -KPX guillemotright Y -82 -KPX guilsinglright A -38 -KPX guilsinglright AE -47 -KPX guilsinglright Aacute -38 -KPX guilsinglright Adieresis -38 -KPX guilsinglright Aring -38 -KPX guilsinglright T -85 -KPX guilsinglright V -89 -KPX guilsinglright W -85 -KPX guilsinglright Y -92 -KPX h quoteright -33 -KPX h y -20 -KPX hyphen A -11 -KPX hyphen AE -20 -KPX hyphen Aacute -11 -KPX hyphen Adieresis -11 -KPX hyphen Aring -11 -KPX hyphen T -59 -KPX hyphen V -62 -KPX hyphen W -59 -KPX hyphen Y -69 -KPX i T -21 -KPX i j -5 -KPX k a 10 -KPX k aacute 10 -KPX k adieresis 10 -KPX k ae 2 -KPX k aring 10 -KPX k comma 19 -KPX k e -2 -KPX k eacute -2 -KPX k g -13 -KPX k hyphen 0 -KPX k o 1 -KPX k oacute 1 -KPX k odieresis 1 -KPX k period 17 -KPX k s 1 -KPX k u 2 -KPX k udieresis 2 -KPX l v -12 -KPX l y -8 -KPX m p 0 -KPX m v -16 -KPX m w -16 -KPX m y -16 -KPX n T -57 -KPX n p -3 -KPX n quoteright -33 -KPX n v -20 -KPX n w -20 -KPX n y -20 -KPX nine four -18 -KPX nine one -67 -KPX nine seven -12 -KPX o T -75 -KPX o quoteright -22 -KPX o t -2 -KPX o v -21 -KPX o w -21 -KPX o x -26 -KPX o y -28 -KPX oacute v -21 -KPX oacute w -21 -KPX oacute y -28 -KPX ocircumflex t -4 -KPX odieresis t -4 -KPX odieresis v -21 -KPX odieresis w -21 -KPX odieresis x -26 -KPX odieresis y -28 -KPX ograve v -21 -KPX ograve w -21 -KPX ograve y -28 -KPX one comma -38 -KPX one eight -55 -KPX one five -45 -KPX one four -74 -KPX one nine -40 -KPX one one -48 -KPX one period -39 -KPX one seven -65 -KPX one six -62 -KPX one three -43 -KPX one two -32 -KPX one zero -48 -KPX p t -3 -KPX p y -12 -KPX period one -32 -KPX period quotedblright -7 -KPX period quoteright -29 -KPX q c -6 -KPX q u -3 -KPX quotedblbase A 25 -KPX quotedblbase AE 23 -KPX quotedblbase T -38 -KPX quotedblbase V -79 -KPX quotedblbase W -75 -KPX quotedblbase Y -48 -KPX quotedblleft A -75 -KPX quotedblleft AE -98 -KPX quotedblleft Aacute -75 -KPX quotedblleft Adieresis -75 -KPX quotedblleft Aring -75 -KPX quotedblleft T -11 -KPX quotedblleft V 3 -KPX quotedblleft W 3 -KPX quotedblleft Y 0 -KPX quotedblright A -71 -KPX quotedblright AE -94 -KPX quotedblright Aacute -71 -KPX quotedblright Adieresis -71 -KPX quotedblright Aring -71 -KPX quotedblright T -1 -KPX quotedblright V 6 -KPX quotedblright W 6 -KPX quotedblright Y 2 -KPX quoteleft A -82 -KPX quoteleft AE -105 -KPX quoteleft Aacute -82 -KPX quoteleft Adieresis -82 -KPX quoteleft Aring -82 -KPX quoteleft T -18 -KPX quoteleft V -3 -KPX quoteleft W -3 -KPX quoteleft Y -7 -KPX quoteright A -93 -KPX quoteright AE -115 -KPX quoteright Aacute -93 -KPX quoteright Adieresis -93 -KPX quoteright Aring -93 -KPX quoteright comma -55 -KPX quoteright d -50 -KPX quoteright o -49 -KPX quoteright period -57 -KPX quoteright r -24 -KPX quoteright s -25 -KPX quoteright t -19 -KPX quoteright v -23 -KPX quoteright w -23 -KPX quoteright y -17 -KPX r a -13 -KPX r aacute -13 -KPX r acircumflex -13 -KPX r adieresis -13 -KPX r ae -22 -KPX r agrave -13 -KPX r aring -13 -KPX r c -15 -KPX r ccedilla -8 -KPX r colon -30 -KPX r comma -68 -KPX r d -14 -KPX r e -20 -KPX r eacute -20 -KPX r ecircumflex -20 -KPX r egrave -20 -KPX r f 8 -KPX r g -4 -KPX r h -16 -KPX r hyphen -13 -KPX r i 17 -KPX r j 12 -KPX r k -12 -KPX r l -13 -KPX r m 10 -KPX r n 6 -KPX r o -15 -KPX r oacute -15 -KPX r ocircumflex -15 -KPX r odieresis -15 -KPX r oe -19 -KPX r ograve -15 -KPX r oslash -15 -KPX r p 16 -KPX r period -69 -KPX r q -19 -KPX r quoteright 0 -KPX r r 14 -KPX r s 1 -KPX r semicolon -30 -KPX r t 12 -KPX r u 10 -KPX r v 20 -KPX r w 20 -KPX r x 7 -KPX r y 20 -KPX r z 10 -KPX s quoteright -22 -KPX s t -6 -KPX seven colon -90 -KPX seven comma -79 -KPX seven four -79 -KPX seven one -43 -KPX seven period -81 -KPX seven seven -27 -KPX seven six -59 -KPX six four 2 -KPX six one -52 -KPX six seven -32 -KPX t S -11 -KPX t a 10 -KPX t aacute 10 -KPX t adieresis 10 -KPX t ae 2 -KPX t aring 10 -KPX t colon -22 -KPX t e -2 -KPX t eacute -2 -KPX t h -5 -KPX t o 1 -KPX t oacute 1 -KPX t odieresis 1 -KPX t quoteright -19 -KPX t semicolon -23 -KPX three four -15 -KPX three one -67 -KPX three seven -27 -KPX two four -8 -KPX two one -48 -KPX two seven -27 -KPX u quoteright -34 -KPX v a -20 -KPX v aacute -20 -KPX v acircumflex -20 -KPX v adieresis -20 -KPX v ae -28 -KPX v agrave -20 -KPX v aring -20 -KPX v atilde -20 -KPX v c -24 -KPX v colon -51 -KPX v comma -51 -KPX v e -28 -KPX v eacute -28 -KPX v ecircumflex -28 -KPX v egrave -28 -KPX v g -20 -KPX v hyphen -1 -KPX v l -24 -KPX v o -24 -KPX v oacute -24 -KPX v odieresis -24 -KPX v ograve -24 -KPX v oslash -24 -KPX v period -51 -KPX v s -18 -KPX v semicolon -51 -KPX w a -24 -KPX w aacute -24 -KPX w acircumflex -24 -KPX w adieresis -24 -KPX w ae -32 -KPX w agrave -24 -KPX w aring -24 -KPX w atilde -24 -KPX w c -30 -KPX w colon -56 -KPX w comma -53 -KPX w e -34 -KPX w eacute -34 -KPX w ecircumflex -34 -KPX w egrave -34 -KPX w g -26 -KPX w hyphen -7 -KPX w l -29 -KPX w o -30 -KPX w oacute -30 -KPX w odieresis -30 -KPX w ograve -30 -KPX w oslash -30 -KPX w period -53 -KPX w s -24 -KPX w semicolon -56 -KPX x a -1 -KPX x c -9 -KPX x e -13 -KPX x eacute -13 -KPX x o -10 -KPX x q -11 -KPX y a -11 -KPX y aacute -12 -KPX y acircumflex -12 -KPX y adieresis -12 -KPX y ae -19 -KPX y agrave -12 -KPX y aring -12 -KPX y atilde -12 -KPX y c -17 -KPX y colon -43 -KPX y comma -25 -KPX y e -22 -KPX y eacute -23 -KPX y ecircumflex -23 -KPX y egrave -23 -KPX y g -23 -KPX y hyphen 2 -KPX y l -16 -KPX y o -17 -KPX y oacute -19 -KPX y odieresis -19 -KPX y ograve -19 -KPX y oslash -19 -KPX y period -26 -KPX y s -13 -KPX y semicolon -44 -KPX zero four -1 -KPX zero one -50 -KPX zero seven -12 -EndKernPairs -EndKernData -EndFontMetrics diff --git a/misc/gs_afm/TimesO.afm b/misc/gs_afm/TimesO.afm deleted file mode 100644 index b643994a97..0000000000 --- a/misc/gs_afm/TimesO.afm +++ /dev/null @@ -1,1253 +0,0 @@ -StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 2/11/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. -FontName NimbusRomNo9L-ReguItal -FullName Nimbus Roman No9 L Regular Italic -FamilyName Nimbus Roman No9 L -Weight Regular -ItalicAngle -15.0 -IsFixedPitch false -UnderlinePosition -100 -UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW -EncodingScheme AdobeStandardEncoding -FontBBox -169 -217 1010 904 -CapHeight 653 -XHeight 432 -Descender -205 -Ascender 683 -StartCharMetrics 232 -C 32 ; WX 250 ; N space ; B 125 0 125 0 ; -C 33 ; WX 333 ; N exclam ; B 39 -11 302 667 ; -C 34 ; WX 420 ; N quotedbl ; B 144 421 432 666 ; -C 35 ; WX 500 ; N numbersign ; B 2 0 540 676 ; -C 36 ; WX 500 ; N dollar ; B 31 -89 497 731 ; -C 37 ; WX 833 ; N percent ; B 79 -13 790 676 ; -C 38 ; WX 778 ; N ampersand ; B 76 -18 723 666 ; -C 39 ; WX 333 ; N quoteright ; B 151 436 290 666 ; -C 40 ; WX 333 ; N parenleft ; B 42 -181 315 669 ; -C 41 ; WX 333 ; N parenright ; B 16 -180 289 669 ; -C 42 ; WX 500 ; N asterisk ; B 128 255 492 666 ; -C 43 ; WX 675 ; N plus ; B 86 0 590 506 ; -C 44 ; WX 250 ; N comma ; B -4 -129 135 101 ; -C 45 ; WX 333 ; N hyphen ; B 49 192 282 255 ; -C 46 ; WX 250 ; N period ; B 27 -11 138 100 ; -C 47 ; WX 278 ; N slash ; B -65 -18 386 666 ; -C 48 ; WX 500 ; N zero ; B 32 -7 497 676 ; -C 49 ; WX 500 ; N one ; B 49 0 409 676 ; -C 50 ; WX 500 ; N two ; B 12 0 452 676 ; -C 51 ; WX 500 ; N three ; B 15 -7 465 676 ; -C 52 ; WX 500 ; N four ; B 1 0 479 676 ; -C 53 ; WX 500 ; N five ; B 15 -7 491 666 ; -C 54 ; WX 500 ; N six ; B 30 -7 521 686 ; -C 55 ; WX 500 ; N seven ; B 75 -8 537 666 ; -C 56 ; WX 500 ; N eight ; B 30 -7 493 676 ; -C 57 ; WX 500 ; N nine ; B 23 -17 492 676 ; -C 58 ; WX 333 ; N colon ; B 50 -11 261 441 ; -C 59 ; WX 333 ; N semicolon ; B 27 -129 261 441 ; -C 60 ; WX 675 ; N less ; B 84 -10 592 516 ; -C 61 ; WX 675 ; N equal ; B 86 120 590 386 ; -C 62 ; WX 675 ; N greater ; B 84 -10 592 516 ; -C 63 ; WX 500 ; N question ; B 132 -12 472 664 ; -C 64 ; WX 920 ; N at ; B 118 -18 806 666 ; -C 65 ; WX 611 ; N A ; B -51 0 564 668 ; -C 66 ; WX 611 ; N B ; B -8 0 588 653 ; -C 67 ; WX 667 ; N C ; B 66 -18 689 666 ; -C 68 ; WX 722 ; N D ; B -8 0 700 653 ; -C 69 ; WX 611 ; N E ; B -1 0 634 653 ; -C 70 ; WX 611 ; N F ; B 8 0 645 653 ; -C 71 ; WX 722 ; N G ; B 52 -18 722 666 ; -C 72 ; WX 722 ; N H ; B -8 0 767 653 ; -C 73 ; WX 333 ; N I ; B -8 0 384 653 ; -C 74 ; WX 444 ; N J ; B -6 -18 491 653 ; -C 75 ; WX 667 ; N K ; B 7 0 722 653 ; -C 76 ; WX 556 ; N L ; B -8 0 559 653 ; -C 77 ; WX 833 ; N M ; B -18 0 873 653 ; -C 78 ; WX 667 ; N N ; B -20 -15 727 653 ; -C 79 ; WX 722 ; N O ; B 60 -18 706 666 ; -C 80 ; WX 611 ; N P ; B 0 0 605 653 ; -C 81 ; WX 722 ; N Q ; B 59 -182 699 666 ; -C 82 ; WX 611 ; N R ; B -13 0 588 653 ; -C 83 ; WX 500 ; N S ; B 17 -18 508 667 ; -C 84 ; WX 556 ; N T ; B 59 0 633 653 ; -C 85 ; WX 722 ; N U ; B 102 -18 765 653 ; -C 86 ; WX 611 ; N V ; B 76 -18 688 653 ; -C 87 ; WX 833 ; N W ; B 71 -18 906 653 ; -C 88 ; WX 611 ; N X ; B -29 0 655 653 ; -C 89 ; WX 556 ; N Y ; B 78 0 633 653 ; -C 90 ; WX 556 ; N Z ; B -6 0 606 653 ; -C 91 ; WX 389 ; N bracketleft ; B 21 -153 391 663 ; -C 92 ; WX 278 ; N backslash ; B -41 -18 319 666 ; -C 93 ; WX 389 ; N bracketright ; B 12 -153 382 663 ; -C 94 ; WX 422 ; N asciicircum ; B 0 301 422 666 ; -C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; -C 96 ; WX 333 ; N quoteleft ; B 171 436 310 666 ; -C 97 ; WX 500 ; N a ; B 17 -11 476 441 ; -C 98 ; WX 500 ; N b ; B 23 -11 473 683 ; -C 99 ; WX 444 ; N c ; B 30 -11 425 441 ; -C 100 ; WX 500 ; N d ; B 15 -13 527 683 ; -C 101 ; WX 444 ; N e ; B 31 -11 412 441 ; -C 102 ; WX 278 ; N f ; B -147 -207 424 678 ; -C 103 ; WX 500 ; N g ; B 8 -206 472 441 ; -C 104 ; WX 500 ; N h ; B 19 -9 478 683 ; -C 105 ; WX 278 ; N i ; B 49 -11 264 654 ; -C 106 ; WX 278 ; N j ; B -124 -207 276 654 ; -C 107 ; WX 444 ; N k ; B 14 -11 461 683 ; -C 108 ; WX 278 ; N l ; B 41 -11 279 683 ; -C 109 ; WX 722 ; N m ; B 12 -9 704 441 ; -C 110 ; WX 500 ; N n ; B 14 -9 474 441 ; -C 111 ; WX 500 ; N o ; B 27 -11 468 441 ; -C 112 ; WX 500 ; N p ; B -75 -205 469 441 ; -C 113 ; WX 500 ; N q ; B 25 -209 483 441 ; -C 114 ; WX 389 ; N r ; B 45 0 412 441 ; -C 115 ; WX 389 ; N s ; B 16 -13 366 442 ; -C 116 ; WX 278 ; N t ; B 37 -11 296 546 ; -C 117 ; WX 500 ; N u ; B 42 -11 475 441 ; -C 118 ; WX 444 ; N v ; B 21 -18 426 441 ; -C 119 ; WX 667 ; N w ; B 16 -18 648 441 ; -C 120 ; WX 444 ; N x ; B -27 -11 447 441 ; -C 121 ; WX 444 ; N y ; B -24 -206 426 441 ; -C 122 ; WX 389 ; N z ; B -2 -81 380 428 ; -C 123 ; WX 400 ; N braceleft ; B 51 -177 407 687 ; -C 124 ; WX 275 ; N bar ; B 105 -18 171 666 ; -C 125 ; WX 400 ; N braceright ; B -7 -177 349 687 ; -C 126 ; WX 541 ; N asciitilde ; B 40 186 502 320 ; -C 161 ; WX 389 ; N exclamdown ; B 59 -205 321 474 ; -C 162 ; WX 500 ; N cent ; B 77 -143 472 560 ; -C 163 ; WX 500 ; N sterling ; B 10 -6 517 670 ; -C 164 ; WX 167 ; N fraction ; B -169 -10 337 676 ; -C 165 ; WX 500 ; N yen ; B 27 0 603 653 ; -C 166 ; WX 500 ; N florin ; B 25 -182 507 682 ; -C 167 ; WX 500 ; N section ; B 53 -162 461 666 ; -C 168 ; WX 500 ; N currency ; B -22 53 522 597 ; -C 169 ; WX 214 ; N quotesingle ; B 132 421 241 666 ; -C 170 ; WX 556 ; N quotedblleft ; B 166 436 514 666 ; -C 171 ; WX 500 ; N guillemotleft ; B 53 37 445 403 ; -C 172 ; WX 333 ; N guilsinglleft ; B 51 37 281 403 ; -C 173 ; WX 333 ; N guilsinglright ; B 52 37 282 403 ; -C 174 ; WX 500 ; N fi ; B -141 -207 481 681 ; -C 175 ; WX 500 ; N fl ; B -141 -204 518 682 ; -C 177 ; WX 500 ; N endash ; B -6 197 505 243 ; -C 178 ; WX 500 ; N dagger ; B 101 -159 488 666 ; -C 179 ; WX 500 ; N daggerdbl ; B 22 -143 491 666 ; -C 180 ; WX 250 ; N periodcentered ; B 70 199 181 310 ; -C 182 ; WX 523 ; N paragraph ; B 55 -123 616 653 ; -C 183 ; WX 350 ; N bullet ; B 40 191 310 461 ; -C 184 ; WX 333 ; N quotesinglbase ; B 44 -129 183 101 ; -C 185 ; WX 556 ; N quotedblbase ; B 57 -129 405 101 ; -C 186 ; WX 556 ; N quotedblright ; B 151 436 499 666 ; -C 187 ; WX 500 ; N guillemotright ; B 55 37 447 403 ; -C 188 ; WX 889 ; N ellipsis ; B 57 -11 762 100 ; -C 189 ; WX 1000 ; N perthousand ; B 25 -19 1010 706 ; -C 191 ; WX 500 ; N questiondown ; B 28 -205 367 473 ; -C 193 ; WX 333 ; N grave ; B 121 492 311 664 ; -C 194 ; WX 333 ; N acute ; B 180 494 403 664 ; -C 195 ; WX 333 ; N circumflex ; B 91 492 385 661 ; -C 196 ; WX 333 ; N tilde ; B 100 517 427 624 ; -C 197 ; WX 333 ; N macron ; B 99 532 411 583 ; -C 198 ; WX 333 ; N breve ; B 117 492 418 650 ; -C 199 ; WX 333 ; N dotaccent ; B 207 508 305 606 ; -C 200 ; WX 333 ; N dieresis ; B 107 508 405 606 ; -C 202 ; WX 333 ; N ring ; B 155 508 355 707 ; -C 203 ; WX 333 ; N cedilla ; B -30 -217 182 0 ; -C 205 ; WX 333 ; N hungarumlaut ; B 93 494 486 664 ; -C 206 ; WX 333 ; N ogonek ; B -20 -169 200 40 ; -C 207 ; WX 333 ; N caron ; B 121 492 426 661 ; -C 208 ; WX 889 ; N emdash ; B -6 197 894 243 ; -C 225 ; WX 889 ; N AE ; B -27 0 911 653 ; -C 227 ; WX 276 ; N ordfeminine ; B 42 406 352 676 ; -C 232 ; WX 556 ; N Lslash ; B -8 0 559 653 ; -C 233 ; WX 722 ; N Oslash ; B 60 -105 699 722 ; -C 234 ; WX 944 ; N OE ; B 49 -8 964 666 ; -C 235 ; WX 310 ; N ordmasculine ; B 67 406 362 676 ; -C 241 ; WX 667 ; N ae ; B 23 -11 640 441 ; -C 245 ; WX 278 ; N dotlessi ; B 49 -11 235 441 ; -C 248 ; WX 278 ; N lslash ; B 37 -11 307 683 ; -C 249 ; WX 500 ; N oslash ; B 28 -135 469 554 ; -C 250 ; WX 667 ; N oe ; B 20 -12 646 441 ; -C 251 ; WX 500 ; N germandbls ; B -168 -207 493 679 ; -C -1 ; WX 556 ; N Yacute ; B 78 0 633 876 ; -C -1 ; WX 722 ; N Ucircumflex ; B 102 -18 765 873 ; -C -1 ; WX 722 ; N Ugrave ; B 102 -18 765 876 ; -C -1 ; WX 556 ; N Zcaron ; B -6 0 606 873 ; -C -1 ; WX 556 ; N Ydieresis ; B 78 0 633 818 ; -C -1 ; WX 300 ; N threesuperior ; B 43 268 339 676 ; -C -1 ; WX 722 ; N Uacute ; B 102 -18 765 876 ; -C -1 ; WX 300 ; N twosuperior ; B 33 271 324 676 ; -C -1 ; WX 722 ; N Udieresis ; B 102 -18 765 818 ; -C -1 ; WX 250 ; N middot ; B 70 199 181 310 ; -C -1 ; WX 300 ; N onesuperior ; B 43 271 284 676 ; -C -1 ; WX 500 ; N aacute ; B 17 -11 487 664 ; -C -1 ; WX 500 ; N agrave ; B 17 -11 476 664 ; -C -1 ; WX 500 ; N acircumflex ; B 17 -11 476 661 ; -C -1 ; WX 500 ; N Scaron ; B 17 -18 520 873 ; -C -1 ; WX 722 ; N Otilde ; B 60 -18 706 836 ; -C -1 ; WX 333 ; N sfthyphen ; B 49 192 282 255 ; -C -1 ; WX 500 ; N atilde ; B 17 -11 511 624 ; -C -1 ; WX 500 ; N aring ; B 17 -11 476 707 ; -C -1 ; WX 500 ; N adieresis ; B 17 -11 489 606 ; -C -1 ; WX 722 ; N Ograve ; B 60 -18 706 876 ; -C -1 ; WX 722 ; N Ocircumflex ; B 60 -18 706 873 ; -C -1 ; WX 722 ; N Odieresis ; B 60 -18 706 818 ; -C -1 ; WX 667 ; N Ntilde ; B -20 -15 727 836 ; -C -1 ; WX 444 ; N edieresis ; B 31 -11 451 606 ; -C -1 ; WX 444 ; N eacute ; B 31 -11 459 664 ; -C -1 ; WX 444 ; N egrave ; B 31 -11 412 664 ; -C -1 ; WX 333 ; N Icircumflex ; B -8 0 425 873 ; -C -1 ; WX 444 ; N ecircumflex ; B 31 -11 441 661 ; -C -1 ; WX 333 ; N Igrave ; B -8 0 384 876 ; -C -1 ; WX 333 ; N Iacute ; B -8 0 403 876 ; -C -1 ; WX 333 ; N Idieresis ; B -8 0 435 818 ; -C -1 ; WX 400 ; N degree ; B 101 390 387 676 ; -C -1 ; WX 611 ; N Ecircumflex ; B -1 0 634 873 ; -C -1 ; WX 675 ; N minus ; B 86 220 590 286 ; -C -1 ; WX 675 ; N multiply ; B 93 8 582 497 ; -C -1 ; WX 675 ; N divide ; B 86 -11 590 517 ; -C -1 ; WX 611 ; N Egrave ; B -1 0 634 876 ; -C -1 ; WX 980 ; N trademark ; B 30 247 957 653 ; -C -1 ; WX 722 ; N Oacute ; B 60 -18 706 876 ; -C -1 ; WX 500 ; N thorn ; B -75 -205 469 683 ; -C -1 ; WX 500 ; N eth ; B 27 -11 482 683 ; -C -1 ; WX 611 ; N Eacute ; B -1 0 634 876 ; -C -1 ; WX 444 ; N ccedilla ; B 26 -217 425 441 ; -C -1 ; WX 278 ; N idieresis ; B 49 -11 353 606 ; -C -1 ; WX 278 ; N iacute ; B 49 -11 356 664 ; -C -1 ; WX 278 ; N igrave ; B 49 -11 284 664 ; -C -1 ; WX 675 ; N plusminus ; B 86 0 590 568 ; -C -1 ; WX 750 ; N onehalf ; B 34 -10 749 676 ; -C -1 ; WX 750 ; N onequarter ; B 33 -10 736 676 ; -C -1 ; WX 750 ; N threequarters ; B 23 -10 736 676 ; -C -1 ; WX 278 ; N icircumflex ; B 34 -11 328 661 ; -C -1 ; WX 611 ; N Edieresis ; B -1 0 634 818 ; -C -1 ; WX 500 ; N ntilde ; B 14 -9 476 624 ; -C -1 ; WX 611 ; N Aring ; B -51 0 564 904 ; -C -1 ; WX 500 ; N odieresis ; B 27 -11 489 606 ; -C -1 ; WX 500 ; N oacute ; B 27 -11 487 664 ; -C -1 ; WX 500 ; N ograve ; B 27 -11 468 664 ; -C -1 ; WX 500 ; N ocircumflex ; B 27 -11 468 661 ; -C -1 ; WX 500 ; N otilde ; B 27 -11 496 624 ; -C -1 ; WX 389 ; N scaron ; B 16 -13 454 661 ; -C -1 ; WX 500 ; N udieresis ; B 42 -11 479 606 ; -C -1 ; WX 500 ; N uacute ; B 42 -11 477 664 ; -C -1 ; WX 500 ; N ugrave ; B 42 -11 475 664 ; -C -1 ; WX 500 ; N ucircumflex ; B 42 -11 475 661 ; -C -1 ; WX 444 ; N yacute ; B -24 -206 459 664 ; -C -1 ; WX 389 ; N zcaron ; B -2 -81 434 661 ; -C -1 ; WX 444 ; N ydieresis ; B -24 -206 441 606 ; -C -1 ; WX 760 ; N copyright ; B 41 -18 719 666 ; -C -1 ; WX 760 ; N registered ; B 41 -18 719 666 ; -C -1 ; WX 611 ; N Atilde ; B -51 0 566 836 ; -C -1 ; WX 250 ; N nbspace ; B 125 0 125 0 ; -C -1 ; WX 667 ; N Ccedilla ; B 66 -217 689 666 ; -C -1 ; WX 611 ; N Acircumflex ; B -51 0 564 873 ; -C -1 ; WX 611 ; N Agrave ; B -51 0 564 876 ; -C -1 ; WX 675 ; N logicalnot ; B 86 108 590 386 ; -C -1 ; WX 611 ; N Aacute ; B -51 0 564 876 ; -C -1 ; WX 722 ; N Eth ; B -8 0 700 653 ; -C -1 ; WX 275 ; N brokenbar ; B 105 -18 171 666 ; -C -1 ; WX 611 ; N Thorn ; B 0 0 569 653 ; -C -1 ; WX 611 ; N Adieresis ; B -51 0 564 818 ; -C -1 ; WX 500 ; N mu ; B -30 -209 497 428 ; -C -1 ; WX 250 ; N .notdef ; B 125 0 125 0 ; -EndCharMetrics -StartKernData -StartKernPairs 994 -KPX A C -50 -KPX A Ccedilla -49 -KPX A G -44 -KPX A O -45 -KPX A Odieresis -45 -KPX A Q -43 -KPX A T -14 -KPX A U -56 -KPX A Uacute -56 -KPX A Ucircumflex -56 -KPX A Udieresis -56 -KPX A Ugrave -56 -KPX A V -81 -KPX A W -74 -KPX A Y -21 -KPX A a -3 -KPX A b 0 -KPX A c -18 -KPX A ccedilla -28 -KPX A comma 8 -KPX A d -3 -KPX A e -17 -KPX A g -25 -KPX A guillemotleft -44 -KPX A guilsinglleft -43 -KPX A hyphen -12 -KPX A o -17 -KPX A period 9 -KPX A q -12 -KPX A quotedblright -92 -KPX A quoteright -92 -KPX A t -6 -KPX A u -9 -KPX A v -50 -KPX A w -43 -KPX A y -57 -KPX Aacute C -50 -KPX Aacute G -44 -KPX Aacute O -45 -KPX Aacute Q -43 -KPX Aacute T -14 -KPX Aacute U -56 -KPX Aacute V -81 -KPX Aacute W -74 -KPX Aacute Y -21 -KPX Aacute a -3 -KPX Aacute b 0 -KPX Aacute c -18 -KPX Aacute comma 8 -KPX Aacute d -3 -KPX Aacute e -17 -KPX Aacute g -25 -KPX Aacute guillemotleft -44 -KPX Aacute guilsinglleft -43 -KPX Aacute hyphen -12 -KPX Aacute o -17 -KPX Aacute period 9 -KPX Aacute q -12 -KPX Aacute quoteright -92 -KPX Aacute t -6 -KPX Aacute u -9 -KPX Aacute v -50 -KPX Aacute w -43 -KPX Aacute y -57 -KPX Acircumflex C -50 -KPX Acircumflex G -44 -KPX Acircumflex O -45 -KPX Acircumflex Q -43 -KPX Acircumflex T -14 -KPX Acircumflex U -56 -KPX Acircumflex V -81 -KPX Acircumflex W -74 -KPX Acircumflex Y -21 -KPX Acircumflex comma 8 -KPX Acircumflex period 9 -KPX Adieresis C -50 -KPX Adieresis G -44 -KPX Adieresis O -45 -KPX Adieresis Q -43 -KPX Adieresis T -14 -KPX Adieresis U -56 -KPX Adieresis V -81 -KPX Adieresis W -74 -KPX Adieresis Y -21 -KPX Adieresis a -3 -KPX Adieresis b 0 -KPX Adieresis c -18 -KPX Adieresis comma 8 -KPX Adieresis d -3 -KPX Adieresis g -25 -KPX Adieresis guillemotleft -44 -KPX Adieresis guilsinglleft -43 -KPX Adieresis hyphen -12 -KPX Adieresis o -17 -KPX Adieresis period 9 -KPX Adieresis q -12 -KPX Adieresis quotedblright -92 -KPX Adieresis quoteright -92 -KPX Adieresis t -6 -KPX Adieresis u -9 -KPX Adieresis v -50 -KPX Adieresis w -43 -KPX Adieresis y -57 -KPX Agrave C -50 -KPX Agrave G -44 -KPX Agrave O -45 -KPX Agrave Q -43 -KPX Agrave T -14 -KPX Agrave U -56 -KPX Agrave V -81 -KPX Agrave W -74 -KPX Agrave Y -21 -KPX Agrave comma 8 -KPX Agrave period 9 -KPX Aring C -50 -KPX Aring G -44 -KPX Aring O -45 -KPX Aring Q -43 -KPX Aring T -14 -KPX Aring U -56 -KPX Aring V -81 -KPX Aring W -74 -KPX Aring Y -21 -KPX Aring a -3 -KPX Aring b 0 -KPX Aring c -18 -KPX Aring comma 8 -KPX Aring d -3 -KPX Aring e -17 -KPX Aring g -25 -KPX Aring guillemotleft -44 -KPX Aring guilsinglleft -43 -KPX Aring hyphen -12 -KPX Aring o -17 -KPX Aring period 9 -KPX Aring q -12 -KPX Aring quotedblright -92 -KPX Aring quoteright -92 -KPX Aring t -6 -KPX Aring u -9 -KPX Aring v -50 -KPX Aring w -43 -KPX Aring y -57 -KPX Atilde C -50 -KPX Atilde G -44 -KPX Atilde O -45 -KPX Atilde Q -43 -KPX Atilde T -14 -KPX Atilde U -56 -KPX Atilde V -81 -KPX Atilde W -74 -KPX Atilde Y -21 -KPX Atilde comma 8 -KPX Atilde period 8 -KPX B A -22 -KPX B AE -34 -KPX B Aacute -22 -KPX B Acircumflex -22 -KPX B Adieresis -22 -KPX B Aring -22 -KPX B Atilde -22 -KPX B O -13 -KPX B OE -5 -KPX B Oacute -13 -KPX B Ocircumflex -13 -KPX B Odieresis -13 -KPX B Ograve -13 -KPX B Oslash -13 -KPX B V -32 -KPX B W -29 -KPX B Y -39 -KPX C A -13 -KPX C AE -28 -KPX C Aacute -13 -KPX C Adieresis -13 -KPX C Aring -13 -KPX C H -13 -KPX C K -21 -KPX C O -19 -KPX C Oacute -19 -KPX C Odieresis -19 -KPX Ccedilla A -16 -KPX D A -35 -KPX D Aacute -35 -KPX D Acircumflex -35 -KPX D Adieresis -35 -KPX D Agrave -35 -KPX D Aring -35 -KPX D Atilde -35 -KPX D J -32 -KPX D T -9 -KPX D V -41 -KPX D W -35 -KPX D X -39 -KPX D Y -49 -KPX F A -72 -KPX F Aacute -72 -KPX F Acircumflex -72 -KPX F Adieresis -72 -KPX F Agrave -72 -KPX F Aring -72 -KPX F Atilde -72 -KPX F J -60 -KPX F O -40 -KPX F Odieresis -40 -KPX F a -76 -KPX F aacute -77 -KPX F adieresis -52 -KPX F ae -81 -KPX F aring -70 -KPX F comma -95 -KPX F e -82 -KPX F eacute -83 -KPX F hyphen -45 -KPX F i -36 -KPX F j -41 -KPX F o -79 -KPX F oacute -80 -KPX F odieresis -52 -KPX F oe -74 -KPX F oslash -80 -KPX F period -98 -KPX F r -52 -KPX F u -50 -KPX G A -17 -KPX G AE -29 -KPX G Aacute -17 -KPX G Acircumflex -17 -KPX G Adieresis -17 -KPX G Agrave -17 -KPX G Aring -17 -KPX G Atilde -17 -KPX G T -13 -KPX G V -5 -KPX G W -2 -KPX G Y -12 -KPX J A -40 -KPX J AE -52 -KPX J Adieresis -40 -KPX J Aring -40 -KPX K C -55 -KPX K G -53 -KPX K O -46 -KPX K OE -45 -KPX K Oacute -46 -KPX K Odieresis -46 -KPX K S 6 -KPX K T 21 -KPX K a -4 -KPX K adieresis -4 -KPX K ae -5 -KPX K aring -4 -KPX K e -18 -KPX K hyphen -57 -KPX K o -18 -KPX K oacute -18 -KPX K odieresis -18 -KPX K u -10 -KPX K udieresis -10 -KPX K y -87 -KPX L A 44 -KPX L AE 32 -KPX L Aacute 44 -KPX L Adieresis 44 -KPX L Aring 44 -KPX L C 6 -KPX L Ccedilla 4 -KPX L G 11 -KPX L O 10 -KPX L Oacute 10 -KPX L Ocircumflex 10 -KPX L Odieresis 10 -KPX L Ograve 10 -KPX L Otilde 10 -KPX L S 20 -KPX L T -13 -KPX L U -8 -KPX L Udieresis -8 -KPX L V -55 -KPX L W -48 -KPX L Y -20 -KPX L hyphen 47 -KPX L quotedblright -92 -KPX L quoteright -92 -KPX L u 12 -KPX L udieresis 10 -KPX L y -29 -KPX N A -20 -KPX N AE -32 -KPX N Aacute -20 -KPX N Adieresis -20 -KPX N Aring -20 -KPX N C -20 -KPX N Ccedilla -19 -KPX N G -14 -KPX N O -20 -KPX N Oacute -20 -KPX N Odieresis -20 -KPX N a -22 -KPX N aacute -23 -KPX N adieresis -23 -KPX N ae -26 -KPX N aring -23 -KPX N comma -13 -KPX N e -28 -KPX N eacute -30 -KPX N o -25 -KPX N oacute -26 -KPX N odieresis -26 -KPX N oslash -27 -KPX N period -16 -KPX N u -24 -KPX N udieresis -25 -KPX O A -37 -KPX O AE -68 -KPX O Aacute -37 -KPX O Adieresis -37 -KPX O Aring -37 -KPX O T -3 -KPX O V -45 -KPX O W -39 -KPX O X -40 -KPX O Y -50 -KPX Oacute A -37 -KPX Oacute T -3 -KPX Oacute V -45 -KPX Oacute W -39 -KPX Oacute Y -50 -KPX Ocircumflex T -3 -KPX Ocircumflex V -45 -KPX Ocircumflex Y -50 -KPX Odieresis A -37 -KPX Odieresis T -3 -KPX Odieresis V -45 -KPX Odieresis W -39 -KPX Odieresis X -40 -KPX Odieresis Y -50 -KPX Ograve T -3 -KPX Ograve V -45 -KPX Ograve Y -50 -KPX Oslash A -37 -KPX Otilde T -3 -KPX Otilde V -45 -KPX Otilde Y -50 -KPX P A -78 -KPX P AE -115 -KPX P Aacute -78 -KPX P Adieresis -78 -KPX P Aring -78 -KPX P J -89 -KPX P a -73 -KPX P aacute -73 -KPX P adieresis -64 -KPX P ae -79 -KPX P aring -73 -KPX P comma -117 -KPX P e -78 -KPX P eacute -78 -KPX P hyphen -64 -KPX P o -72 -KPX P oacute -72 -KPX P odieresis -64 -KPX P oe -66 -KPX P oslash -73 -KPX P period -120 -KPX R C -25 -KPX R Ccedilla -24 -KPX R G -19 -KPX R O -26 -KPX R OE -17 -KPX R Oacute -26 -KPX R Odieresis -26 -KPX R T 0 -KPX R U -35 -KPX R Udieresis -35 -KPX R V -31 -KPX R W -28 -KPX R Y -19 -KPX R a -2 -KPX R aacute -2 -KPX R adieresis -2 -KPX R ae -3 -KPX R aring -2 -KPX R e -15 -KPX R eacute -15 -KPX R hyphen -29 -KPX R o -15 -KPX R oacute -15 -KPX R odieresis -15 -KPX R oe -15 -KPX R u -7 -KPX R uacute -7 -KPX R udieresis -7 -KPX R y 3 -KPX S A -2 -KPX S AE -14 -KPX S Aacute -2 -KPX S Adieresis -2 -KPX S Aring -2 -KPX S T 1 -KPX S V 5 -KPX S W 8 -KPX S Y -1 -KPX S t -13 -KPX T A -33 -KPX T AE -45 -KPX T Aacute -33 -KPX T Acircumflex -33 -KPX T Adieresis -33 -KPX T Agrave -33 -KPX T Aring -33 -KPX T Atilde -33 -KPX T C -14 -KPX T G -7 -KPX T J -39 -KPX T O -21 -KPX T OE -8 -KPX T Oacute -21 -KPX T Ocircumflex -21 -KPX T Odieresis -21 -KPX T Ograve -21 -KPX T Oslash -21 -KPX T Otilde -21 -KPX T S -2 -KPX T V 41 -KPX T W 43 -KPX T Y 33 -KPX T a -80 -KPX T ae -81 -KPX T c -87 -KPX T colon -84 -KPX T comma -70 -KPX T e -90 -KPX T g -102 -KPX T guillemotleft -103 -KPX T guilsinglleft -102 -KPX T hyphen -68 -KPX T i -16 -KPX T j -20 -KPX T o -87 -KPX T oslash -89 -KPX T period -71 -KPX T r -87 -KPX T s -74 -KPX T semicolon -92 -KPX T u -86 -KPX T v -73 -KPX T w -69 -KPX T y -69 -KPX U A -49 -KPX U AE -69 -KPX U Aacute -49 -KPX U Acircumflex -49 -KPX U Adieresis -49 -KPX U Aring -49 -KPX U Atilde -49 -KPX U comma -35 -KPX U m -28 -KPX U n -29 -KPX U p -32 -KPX U period -39 -KPX U r -41 -KPX Uacute A -49 -KPX Uacute comma -35 -KPX Uacute m -28 -KPX Uacute n -29 -KPX Uacute p -32 -KPX Uacute period -39 -KPX Uacute r -41 -KPX Ucircumflex A -49 -KPX Udieresis A -49 -KPX Udieresis b 1 -KPX Udieresis comma -35 -KPX Udieresis m -28 -KPX Udieresis n -29 -KPX Udieresis p -32 -KPX Udieresis period -39 -KPX Udieresis r -41 -KPX Ugrave A -49 -KPX V A -65 -KPX V AE -101 -KPX V Aacute -65 -KPX V Acircumflex -65 -KPX V Adieresis -65 -KPX V Agrave -65 -KPX V Aring -65 -KPX V Atilde -65 -KPX V C -47 -KPX V G -41 -KPX V O -47 -KPX V Oacute -47 -KPX V Ocircumflex -47 -KPX V Odieresis -47 -KPX V Ograve -47 -KPX V Oslash -47 -KPX V Otilde -47 -KPX V S -15 -KPX V T 32 -KPX V a -66 -KPX V ae -71 -KPX V colon -81 -KPX V comma -76 -KPX V e -73 -KPX V g -83 -KPX V guillemotleft -81 -KPX V guilsinglleft -80 -KPX V hyphen -44 -KPX V i -16 -KPX V o -69 -KPX V oslash -71 -KPX V period -80 -KPX V r -44 -KPX V semicolon -78 -KPX V u -39 -KPX V y -12 -KPX W A -56 -KPX W AE -85 -KPX W Aacute -56 -KPX W Acircumflex -56 -KPX W Adieresis -56 -KPX W Agrave -56 -KPX W Aring -56 -KPX W Atilde -56 -KPX W C -38 -KPX W G -32 -KPX W O -39 -KPX W Oacute -39 -KPX W Ocircumflex -39 -KPX W Odieresis -39 -KPX W Ograve -39 -KPX W Oslash -39 -KPX W Otilde -39 -KPX W S -17 -KPX W T 30 -KPX W a -53 -KPX W ae -58 -KPX W colon -76 -KPX W comma -58 -KPX W e -59 -KPX W g -74 -KPX W guillemotleft -68 -KPX W guilsinglleft -67 -KPX W hyphen -31 -KPX W i -18 -KPX W o -56 -KPX W oslash -58 -KPX W period -61 -KPX W r -39 -KPX W semicolon -73 -KPX W u -34 -KPX W y -7 -KPX X C -48 -KPX X O -44 -KPX X Odieresis -44 -KPX X Q -42 -KPX X a -2 -KPX X e -15 -KPX X hyphen -41 -KPX X o -15 -KPX X u -7 -KPX X y -62 -KPX Y A -27 -KPX Y AE -39 -KPX Y Aacute -27 -KPX Y Acircumflex -27 -KPX Y Adieresis -27 -KPX Y Agrave -27 -KPX Y Aring -27 -KPX Y Atilde -27 -KPX Y C -51 -KPX Y G -45 -KPX Y O -52 -KPX Y Oacute -52 -KPX Y Ocircumflex -52 -KPX Y Odieresis -52 -KPX Y Ograve -52 -KPX Y Oslash -51 -KPX Y Otilde -52 -KPX Y S -15 -KPX Y T 32 -KPX Y a -72 -KPX Y ae -75 -KPX Y colon -78 -KPX Y comma -64 -KPX Y e -78 -KPX Y g -94 -KPX Y guillemotleft -93 -KPX Y guilsinglleft -92 -KPX Y hyphen -60 -KPX Y i -16 -KPX Y o -75 -KPX Y oslash -77 -KPX Y p -52 -KPX Y period -65 -KPX Y semicolon -86 -KPX Y u -58 -KPX Y v -35 -KPX Z v -12 -KPX Z y -30 -KPX a j -22 -KPX a quoteright -29 -KPX a v 0 -KPX a w 4 -KPX a y 4 -KPX aacute v 0 -KPX aacute w 4 -KPX aacute y 4 -KPX adieresis v 0 -KPX adieresis w 4 -KPX adieresis y 4 -KPX ae v 2 -KPX ae w 5 -KPX ae y 5 -KPX agrave v 0 -KPX agrave w 4 -KPX agrave y 4 -KPX aring v 0 -KPX aring w 4 -KPX aring y 4 -KPX b v -10 -KPX b w -7 -KPX b y -7 -KPX c h -30 -KPX c k -29 -KPX comma one -42 -KPX comma quotedblright -40 -KPX comma quoteright -40 -KPX e quoteright -21 -KPX e t -16 -KPX e v 0 -KPX e w 2 -KPX e x -10 -KPX e y 2 -KPX eacute v 0 -KPX eacute w 2 -KPX eacute y 2 -KPX ecircumflex v 0 -KPX ecircumflex w 2 -KPX ecircumflex y 2 -KPX eight four 13 -KPX eight one -58 -KPX eight seven -1 -KPX f a -26 -KPX f aacute -27 -KPX f adieresis -2 -KPX f ae -30 -KPX f aring -17 -KPX f e -32 -KPX f eacute -33 -KPX f f 30 -KPX f i 17 -KPX f j 13 -KPX f l 42 -KPX f o -29 -KPX f oacute -30 -KPX f odieresis -2 -KPX f oe -25 -KPX f oslash -31 -KPX f quoteright 18 -KPX f s -20 -KPX f t 18 -KPX five four -5 -KPX five one -71 -KPX five seven -28 -KPX four four 12 -KPX four one -71 -KPX four seven -27 -KPX g a -41 -KPX g adieresis -42 -KPX g ae -46 -KPX g aring -42 -KPX g e -45 -KPX g eacute -45 -KPX g l -46 -KPX g oacute -41 -KPX g odieresis -41 -KPX g r -21 -KPX guillemotright A -24 -KPX guillemotright AE -49 -KPX guillemotright Aacute -24 -KPX guillemotright Adieresis -24 -KPX guillemotright Aring -24 -KPX guillemotright T -76 -KPX guillemotright V -75 -KPX guillemotright W -66 -KPX guillemotright Y -80 -KPX guilsinglright A -23 -KPX guilsinglright AE -48 -KPX guilsinglright Aacute -23 -KPX guilsinglright Adieresis -23 -KPX guilsinglright Aring -23 -KPX guilsinglright T -75 -KPX guilsinglright V -74 -KPX guilsinglright W -65 -KPX guilsinglright Y -79 -KPX h quoteright -31 -KPX h y -5 -KPX hyphen A 3 -KPX hyphen AE -22 -KPX hyphen Aacute 3 -KPX hyphen Adieresis 3 -KPX hyphen Aring 3 -KPX hyphen T -45 -KPX hyphen V -43 -KPX hyphen W -34 -KPX hyphen Y -53 -KPX i T -10 -KPX i j -31 -KPX k a 12 -KPX k aacute 12 -KPX k adieresis 12 -KPX k ae 9 -KPX k aring 12 -KPX k comma 27 -KPX k e 5 -KPX k eacute 5 -KPX k g -27 -KPX k hyphen -27 -KPX k o 6 -KPX k oacute 6 -KPX k odieresis 6 -KPX k period 26 -KPX k s 7 -KPX k u 8 -KPX k udieresis 8 -KPX l v -13 -KPX l y -9 -KPX m p -4 -KPX m v -6 -KPX m w -4 -KPX m y -3 -KPX n T -40 -KPX n p -7 -KPX n quoteright -34 -KPX n v -10 -KPX n w -7 -KPX n y -7 -KPX nine four 1 -KPX nine one -65 -KPX nine seven -5 -KPX o T -62 -KPX o quoteright -24 -KPX o t -14 -KPX o v -18 -KPX o w -15 -KPX o x -32 -KPX o y -15 -KPX oacute v -18 -KPX oacute w -15 -KPX oacute y -15 -KPX ocircumflex t -16 -KPX odieresis t -16 -KPX odieresis v -18 -KPX odieresis w -15 -KPX odieresis x -32 -KPX odieresis y -15 -KPX ograve v -18 -KPX ograve w -15 -KPX ograve y -15 -KPX one comma -52 -KPX one eight -57 -KPX one five -55 -KPX one four -69 -KPX one nine -61 -KPX one one -69 -KPX one period -56 -KPX one seven -61 -KPX one six -50 -KPX one three -55 -KPX one two -50 -KPX one zero -42 -KPX p t -14 -KPX p y -7 -KPX period one -43 -KPX period quotedblright -39 -KPX period quoteright -39 -KPX q c -13 -KPX q u -11 -KPX quotedblbase A 3 -KPX quotedblbase AE -11 -KPX quotedblbase T -62 -KPX quotedblbase V -96 -KPX quotedblbase W -84 -KPX quotedblbase Y -68 -KPX quotedblleft A -87 -KPX quotedblleft AE -141 -KPX quotedblleft Aacute -87 -KPX quotedblleft Adieresis -87 -KPX quotedblleft Aring -87 -KPX quotedblleft T -18 -KPX quotedblleft V -17 -KPX quotedblleft W -15 -KPX quotedblleft Y -25 -KPX quotedblright A -94 -KPX quotedblright AE -148 -KPX quotedblright Aacute -94 -KPX quotedblright Adieresis -94 -KPX quotedblright Aring -94 -KPX quotedblright T -21 -KPX quotedblright V -21 -KPX quotedblright W -18 -KPX quotedblright Y -30 -KPX quoteleft A -78 -KPX quoteleft AE -132 -KPX quoteleft Aacute -78 -KPX quoteleft Adieresis -78 -KPX quoteleft Aring -78 -KPX quoteleft T -9 -KPX quoteleft V -8 -KPX quoteleft W -5 -KPX quoteleft Y -15 -KPX quoteright A -87 -KPX quoteright AE -141 -KPX quoteright Aacute -87 -KPX quoteright Adieresis -87 -KPX quoteright Aring -87 -KPX quoteright comma -74 -KPX quoteright d -80 -KPX quoteright o -78 -KPX quoteright period -78 -KPX quoteright r -57 -KPX quoteright s -63 -KPX quoteright t -49 -KPX quoteright v -31 -KPX quoteright w -26 -KPX quoteright y -25 -KPX r a -27 -KPX r aacute -27 -KPX r acircumflex -27 -KPX r adieresis -27 -KPX r ae -34 -KPX r agrave -27 -KPX r aring -27 -KPX r c -24 -KPX r ccedilla -15 -KPX r colon -28 -KPX r comma -68 -KPX r d -30 -KPX r e -32 -KPX r eacute -32 -KPX r ecircumflex -32 -KPX r egrave -32 -KPX r f 23 -KPX r g -19 -KPX r h -16 -KPX r hyphen -51 -KPX r i 8 -KPX r j 3 -KPX r k -15 -KPX r l -21 -KPX r m 17 -KPX r n 16 -KPX r o -26 -KPX r oacute -26 -KPX r ocircumflex -26 -KPX r odieresis -26 -KPX r oe -21 -KPX r ograve -26 -KPX r oslash -27 -KPX r p 13 -KPX r period -72 -KPX r q -29 -KPX r quoteright -4 -KPX r r 4 -KPX r s -16 -KPX r semicolon -28 -KPX r t 12 -KPX r u 11 -KPX r v 29 -KPX r w 32 -KPX r x 8 -KPX r y 32 -KPX r z 0 -KPX s quoteright -21 -KPX s t -12 -KPX seven colon -88 -KPX seven comma -79 -KPX seven four -64 -KPX seven one -47 -KPX seven period -82 -KPX seven seven -11 -KPX seven six -37 -KPX six four 17 -KPX six one -70 -KPX six seven -37 -KPX t S -9 -KPX t a -6 -KPX t aacute -6 -KPX t adieresis -6 -KPX t ae -10 -KPX t aring -6 -KPX t colon -29 -KPX t e -13 -KPX t eacute -13 -KPX t h -12 -KPX t o -11 -KPX t oacute -11 -KPX t odieresis -11 -KPX t quoteright -21 -KPX t semicolon -26 -KPX three four -9 -KPX three one -77 -KPX three seven -15 -KPX two four -12 -KPX two one -48 -KPX two seven -22 -KPX u quoteright -32 -KPX v a -24 -KPX v aacute -26 -KPX v acircumflex -26 -KPX v adieresis -26 -KPX v ae -29 -KPX v agrave -26 -KPX v aring -26 -KPX v atilde -26 -KPX v c -26 -KPX v colon -48 -KPX v comma -47 -KPX v e -30 -KPX v eacute -32 -KPX v ecircumflex -32 -KPX v egrave -32 -KPX v g -36 -KPX v hyphen 0 -KPX v l -29 -KPX v o -26 -KPX v oacute -28 -KPX v odieresis -28 -KPX v ograve -28 -KPX v oslash -29 -KPX v period -51 -KPX v s -30 -KPX v semicolon -48 -KPX w a -26 -KPX w aacute -27 -KPX w acircumflex -27 -KPX w adieresis -27 -KPX w ae -31 -KPX w agrave -27 -KPX w aring -27 -KPX w atilde -27 -KPX w c -28 -KPX w colon -49 -KPX w comma -46 -KPX w e -32 -KPX w eacute -33 -KPX w ecircumflex -33 -KPX w egrave -33 -KPX w g -38 -KPX w hyphen -3 -KPX w l -30 -KPX w o -28 -KPX w oacute -30 -KPX w odieresis -30 -KPX w ograve -30 -KPX w oslash -30 -KPX w period -51 -KPX w s -32 -KPX w semicolon -49 -KPX x a 5 -KPX x c -2 -KPX x e -2 -KPX x eacute -2 -KPX x o 0 -KPX x q 1 -KPX y a -14 -KPX y aacute -16 -KPX y acircumflex -16 -KPX y adieresis -16 -KPX y ae -19 -KPX y agrave -16 -KPX y aring -16 -KPX y atilde -16 -KPX y c -16 -KPX y colon -48 -KPX y comma -23 -KPX y e -20 -KPX y eacute -22 -KPX y ecircumflex -22 -KPX y egrave -22 -KPX y g -36 -KPX y hyphen 5 -KPX y l -20 -KPX y o -16 -KPX y oacute -18 -KPX y odieresis -18 -KPX y ograve -18 -KPX y oslash -19 -KPX y period -27 -KPX y s -20 -KPX y semicolon -46 -KPX zero four 14 -KPX zero one -51 -KPX zero seven -3 -EndKernPairs -EndKernData -EndFontMetrics diff --git a/misc/gs_afm/TimesRo.afm b/misc/gs_afm/TimesRo.afm deleted file mode 100644 index a272b449b5..0000000000 --- a/misc/gs_afm/TimesRo.afm +++ /dev/null @@ -1,1257 +0,0 @@ -StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 11/17/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. -FontName NimbusRomNo9L-Regu -FullName Nimbus Roman No9 L Regular -FamilyName Nimbus Roman No9 L -Weight Regular -ItalicAngle 0.0 -IsFixedPitch false -UnderlinePosition -100 -UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW -EncodingScheme AdobeStandardEncoding -FontBBox -168 -218 1000 915 -CapHeight 662 -XHeight 450 -Descender -217 -Ascender 683 -StartCharMetrics 232 -C 32 ; WX 250 ; N space ; B 125 0 125 0 ; -C 33 ; WX 333 ; N exclam ; B 130 -9 236 676 ; -C 34 ; WX 408 ; N quotedbl ; B 77 431 331 676 ; -C 35 ; WX 500 ; N numbersign ; B 5 0 496 662 ; -C 36 ; WX 500 ; N dollar ; B 44 -87 457 727 ; -C 37 ; WX 833 ; N percent ; B 61 -13 772 676 ; -C 38 ; WX 778 ; N ampersand ; B 42 -13 750 676 ; -C 39 ; WX 333 ; N quoteright ; B 79 433 218 676 ; -C 40 ; WX 333 ; N parenleft ; B 48 -177 304 676 ; -C 41 ; WX 333 ; N parenright ; B 29 -177 285 676 ; -C 42 ; WX 500 ; N asterisk ; B 69 265 432 676 ; -C 43 ; WX 564 ; N plus ; B 30 0 534 506 ; -C 44 ; WX 250 ; N comma ; B 56 -141 195 102 ; -C 45 ; WX 333 ; N hyphen ; B 39 194 285 257 ; -C 46 ; WX 250 ; N period ; B 70 -11 181 100 ; -C 47 ; WX 278 ; N slash ; B -9 -14 287 676 ; -C 48 ; WX 500 ; N zero ; B 24 -14 476 676 ; -C 49 ; WX 500 ; N one ; B 111 0 394 676 ; -C 50 ; WX 500 ; N two ; B 30 0 475 676 ; -C 51 ; WX 500 ; N three ; B 43 -14 431 676 ; -C 52 ; WX 500 ; N four ; B 12 0 472 676 ; -C 53 ; WX 500 ; N five ; B 32 -14 438 688 ; -C 54 ; WX 500 ; N six ; B 34 -14 468 684 ; -C 55 ; WX 500 ; N seven ; B 20 -8 449 662 ; -C 56 ; WX 500 ; N eight ; B 56 -14 445 676 ; -C 57 ; WX 500 ; N nine ; B 30 -22 459 676 ; -C 58 ; WX 278 ; N colon ; B 81 -11 192 459 ; -C 59 ; WX 278 ; N semicolon ; B 80 -141 219 459 ; -C 60 ; WX 564 ; N less ; B 28 -10 536 516 ; -C 61 ; WX 564 ; N equal ; B 30 120 534 386 ; -C 62 ; WX 564 ; N greater ; B 28 -10 536 516 ; -C 63 ; WX 444 ; N question ; B 68 -8 414 676 ; -C 64 ; WX 921 ; N at ; B 116 -14 809 676 ; -C 65 ; WX 722 ; N A ; B 15 0 706 674 ; -C 66 ; WX 667 ; N B ; B 17 0 593 662 ; -C 67 ; WX 667 ; N C ; B 28 -14 633 676 ; -C 68 ; WX 722 ; N D ; B 16 0 685 662 ; -C 69 ; WX 611 ; N E ; B 12 0 597 662 ; -C 70 ; WX 556 ; N F ; B 12 0 546 662 ; -C 71 ; WX 722 ; N G ; B 32 -14 709 676 ; -C 72 ; WX 722 ; N H ; B 19 0 702 662 ; -C 73 ; WX 333 ; N I ; B 18 0 315 662 ; -C 74 ; WX 389 ; N J ; B 10 -14 370 662 ; -C 75 ; WX 722 ; N K ; B 34 0 723 662 ; -C 76 ; WX 611 ; N L ; B 12 0 598 662 ; -C 77 ; WX 889 ; N M ; B 12 0 863 662 ; -C 78 ; WX 722 ; N N ; B 12 -11 707 662 ; -C 79 ; WX 722 ; N O ; B 34 -14 688 676 ; -C 80 ; WX 556 ; N P ; B 16 0 542 662 ; -C 81 ; WX 722 ; N Q ; B 34 -178 701 676 ; -C 82 ; WX 667 ; N R ; B 17 0 659 662 ; -C 83 ; WX 556 ; N S ; B 42 -14 491 676 ; -C 84 ; WX 611 ; N T ; B 17 0 593 662 ; -C 85 ; WX 722 ; N U ; B 14 -14 705 662 ; -C 86 ; WX 722 ; N V ; B 16 -11 697 662 ; -C 87 ; WX 944 ; N W ; B 5 -11 932 662 ; -C 88 ; WX 722 ; N X ; B 10 0 704 662 ; -C 89 ; WX 722 ; N Y ; B 22 0 703 662 ; -C 90 ; WX 611 ; N Z ; B 9 0 597 662 ; -C 91 ; WX 333 ; N bracketleft ; B 88 -156 299 662 ; -C 92 ; WX 278 ; N backslash ; B -9 -14 287 676 ; -C 93 ; WX 333 ; N bracketright ; B 34 -156 245 662 ; -C 94 ; WX 469 ; N asciicircum ; B 24 297 446 662 ; -C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; -C 96 ; WX 333 ; N quoteleft ; B 115 433 254 676 ; -C 97 ; WX 444 ; N a ; B 37 -10 442 460 ; -C 98 ; WX 500 ; N b ; B 3 -10 468 683 ; -C 99 ; WX 444 ; N c ; B 25 -10 412 460 ; -C 100 ; WX 500 ; N d ; B 27 -10 491 683 ; -C 101 ; WX 444 ; N e ; B 25 -10 424 460 ; -C 102 ; WX 333 ; N f ; B 20 0 383 683 ; -C 103 ; WX 500 ; N g ; B 28 -218 470 460 ; -C 104 ; WX 500 ; N h ; B 9 0 487 683 ; -C 105 ; WX 278 ; N i ; B 16 0 253 683 ; -C 106 ; WX 278 ; N j ; B -70 -218 194 683 ; -C 107 ; WX 500 ; N k ; B 7 0 505 683 ; -C 108 ; WX 278 ; N l ; B 19 0 257 683 ; -C 109 ; WX 778 ; N m ; B 16 0 775 460 ; -C 110 ; WX 500 ; N n ; B 16 0 485 460 ; -C 111 ; WX 500 ; N o ; B 29 -10 470 460 ; -C 112 ; WX 500 ; N p ; B 5 -217 470 460 ; -C 113 ; WX 500 ; N q ; B 24 -217 488 461 ; -C 114 ; WX 333 ; N r ; B 5 0 335 460 ; -C 115 ; WX 389 ; N s ; B 51 -10 348 459 ; -C 116 ; WX 278 ; N t ; B 13 -10 279 579 ; -C 117 ; WX 500 ; N u ; B 9 -10 479 450 ; -C 118 ; WX 500 ; N v ; B 19 -14 477 450 ; -C 119 ; WX 722 ; N w ; B 21 -14 694 450 ; -C 120 ; WX 500 ; N x ; B 17 0 479 450 ; -C 121 ; WX 500 ; N y ; B 14 -218 475 450 ; -C 122 ; WX 444 ; N z ; B 27 0 418 450 ; -C 123 ; WX 480 ; N braceleft ; B 100 -181 350 680 ; -C 124 ; WX 200 ; N bar ; B 67 -14 133 676 ; -C 125 ; WX 480 ; N braceright ; B 130 -181 380 680 ; -C 126 ; WX 541 ; N asciitilde ; B 40 186 502 320 ; -C 161 ; WX 333 ; N exclamdown ; B 97 -218 203 468 ; -C 162 ; WX 500 ; N cent ; B 53 -138 448 579 ; -C 163 ; WX 500 ; N sterling ; B 12 -8 490 676 ; -C 164 ; WX 167 ; N fraction ; B -168 -14 331 676 ; -C 165 ; WX 500 ; N yen ; B -53 0 512 662 ; -C 166 ; WX 500 ; N florin ; B 7 -189 490 676 ; -C 167 ; WX 500 ; N section ; B 70 -148 426 676 ; -C 168 ; WX 500 ; N currency ; B -22 58 522 602 ; -C 169 ; WX 180 ; N quotesingle ; B 48 431 133 676 ; -C 170 ; WX 444 ; N quotedblleft ; B 43 433 414 676 ; -C 171 ; WX 500 ; N guillemotleft ; B 42 33 456 416 ; -C 172 ; WX 333 ; N guilsinglleft ; B 63 33 285 416 ; -C 173 ; WX 333 ; N guilsinglright ; B 48 33 270 416 ; -C 174 ; WX 556 ; N fi ; B 31 0 521 683 ; -C 175 ; WX 556 ; N fl ; B 32 0 521 683 ; -C 177 ; WX 500 ; N endash ; B 0 201 500 250 ; -C 178 ; WX 500 ; N dagger ; B 59 -149 442 676 ; -C 179 ; WX 500 ; N daggerdbl ; B 58 -153 442 676 ; -C 180 ; WX 250 ; N periodcentered ; B 70 199 181 310 ; -C 182 ; WX 453 ; N paragraph ; B -22 -154 450 662 ; -C 183 ; WX 350 ; N bullet ; B 40 196 310 466 ; -C 184 ; WX 333 ; N quotesinglbase ; B 79 -141 218 102 ; -C 185 ; WX 444 ; N quotedblbase ; B 45 -141 416 102 ; -C 186 ; WX 444 ; N quotedblright ; B 30 433 401 676 ; -C 187 ; WX 500 ; N guillemotright ; B 44 33 458 416 ; -C 188 ; WX 1000 ; N ellipsis ; B 111 -11 888 100 ; -C 189 ; WX 1000 ; N perthousand ; B 7 -19 994 706 ; -C 191 ; WX 444 ; N questiondown ; B 30 -218 376 467 ; -C 193 ; WX 333 ; N grave ; B 19 507 242 678 ; -C 194 ; WX 333 ; N acute ; B 93 507 317 678 ; -C 195 ; WX 333 ; N circumflex ; B 11 507 322 674 ; -C 196 ; WX 333 ; N tilde ; B 1 532 331 638 ; -C 197 ; WX 333 ; N macron ; B 11 547 322 601 ; -C 198 ; WX 333 ; N breve ; B 26 507 307 664 ; -C 199 ; WX 333 ; N dotaccent ; B 118 523 217 622 ; -C 200 ; WX 333 ; N dieresis ; B 18 523 316 622 ; -C 202 ; WX 333 ; N ring ; B 67 512 266 711 ; -C 203 ; WX 333 ; N cedilla ; B 52 -215 261 0 ; -C 205 ; WX 333 ; N hungarumlaut ; B -3 507 377 678 ; -C 206 ; WX 333 ; N ogonek ; B 64 -165 249 0 ; -C 207 ; WX 333 ; N caron ; B 11 507 322 674 ; -C 208 ; WX 1000 ; N emdash ; B 0 201 1000 250 ; -C 225 ; WX 889 ; N AE ; B 0 0 863 662 ; -C 227 ; WX 276 ; N ordfeminine ; B 4 394 270 676 ; -C 232 ; WX 611 ; N Lslash ; B 12 0 598 662 ; -C 233 ; WX 722 ; N Oslash ; B 34 -80 688 734 ; -C 234 ; WX 889 ; N OE ; B 30 -6 885 668 ; -C 235 ; WX 310 ; N ordmasculine ; B 6 394 304 676 ; -C 241 ; WX 667 ; N ae ; B 38 -10 632 460 ; -C 245 ; WX 278 ; N dotlessi ; B 16 0 253 460 ; -C 248 ; WX 278 ; N lslash ; B 19 0 259 683 ; -C 249 ; WX 500 ; N oslash ; B 29 -112 470 551 ; -C 250 ; WX 722 ; N oe ; B 30 -10 690 460 ; -C 251 ; WX 500 ; N germandbls ; B 12 -9 468 683 ; -C -1 ; WX 722 ; N Yacute ; B 22 0 703 890 ; -C -1 ; WX 722 ; N Ucircumflex ; B 14 -14 705 886 ; -C -1 ; WX 722 ; N Ugrave ; B 14 -14 705 890 ; -C -1 ; WX 611 ; N Zcaron ; B 9 0 597 886 ; -C -1 ; WX 722 ; N Ydieresis ; B 22 0 703 834 ; -C -1 ; WX 300 ; N threesuperior ; B 15 262 291 676 ; -C -1 ; WX 722 ; N Uacute ; B 14 -14 705 890 ; -C -1 ; WX 300 ; N twosuperior ; B 1 270 296 676 ; -C -1 ; WX 722 ; N Udieresis ; B 14 -14 705 834 ; -C -1 ; WX 250 ; N middot ; B 70 199 181 310 ; -C -1 ; WX 300 ; N onesuperior ; B 57 270 248 676 ; -C -1 ; WX 444 ; N aacute ; B 37 -10 442 678 ; -C -1 ; WX 444 ; N agrave ; B 37 -10 442 678 ; -C -1 ; WX 444 ; N acircumflex ; B 37 -10 442 674 ; -C -1 ; WX 556 ; N Scaron ; B 42 -14 491 886 ; -C -1 ; WX 722 ; N Otilde ; B 34 -14 688 850 ; -C -1 ; WX 333 ; N sfthyphen ; B 39 194 285 257 ; -C -1 ; WX 444 ; N atilde ; B 37 -10 442 638 ; -C -1 ; WX 444 ; N aring ; B 37 -10 442 722 ; -C -1 ; WX 444 ; N adieresis ; B 37 -10 442 622 ; -C -1 ; WX 722 ; N Ograve ; B 34 -14 688 890 ; -C -1 ; WX 722 ; N Ocircumflex ; B 34 -14 688 886 ; -C -1 ; WX 722 ; N Odieresis ; B 34 -14 688 834 ; -C -1 ; WX 722 ; N Ntilde ; B 12 -11 707 850 ; -C -1 ; WX 444 ; N edieresis ; B 25 -10 424 622 ; -C -1 ; WX 444 ; N eacute ; B 25 -10 424 678 ; -C -1 ; WX 444 ; N egrave ; B 25 -10 424 678 ; -C -1 ; WX 333 ; N Icircumflex ; B 11 0 322 886 ; -C -1 ; WX 444 ; N ecircumflex ; B 25 -10 424 674 ; -C -1 ; WX 333 ; N Igrave ; B 18 0 315 890 ; -C -1 ; WX 333 ; N Iacute ; B 18 0 317 890 ; -C -1 ; WX 333 ; N Idieresis ; B 18 0 316 834 ; -C -1 ; WX 400 ; N degree ; B 57 390 343 676 ; -C -1 ; WX 611 ; N Ecircumflex ; B 12 0 597 886 ; -C -1 ; WX 564 ; N minus ; B 30 220 534 286 ; -C -1 ; WX 564 ; N multiply ; B 38 8 527 497 ; -C -1 ; WX 564 ; N divide ; B 30 -10 534 516 ; -C -1 ; WX 611 ; N Egrave ; B 12 0 597 890 ; -C -1 ; WX 980 ; N trademark ; B 30 256 957 662 ; -C -1 ; WX 722 ; N Oacute ; B 34 -14 688 890 ; -C -1 ; WX 500 ; N thorn ; B 5 -217 470 683 ; -C -1 ; WX 500 ; N eth ; B 29 -10 471 686 ; -C -1 ; WX 611 ; N Eacute ; B 12 0 597 890 ; -C -1 ; WX 444 ; N ccedilla ; B 25 -215 412 460 ; -C -1 ; WX 278 ; N idieresis ; B 11 0 269 622 ; -C -1 ; WX 278 ; N iacute ; B 16 0 290 678 ; -C -1 ; WX 278 ; N igrave ; B -8 0 253 678 ; -C -1 ; WX 564 ; N plusminus ; B 30 0 534 568 ; -C -1 ; WX 750 ; N onehalf ; B 31 -14 746 676 ; -C -1 ; WX 750 ; N onequarter ; B 37 -14 718 676 ; -C -1 ; WX 750 ; N threequarters ; B 15 -14 718 676 ; -C -1 ; WX 278 ; N icircumflex ; B -16 0 295 674 ; -C -1 ; WX 611 ; N Edieresis ; B 12 0 597 834 ; -C -1 ; WX 500 ; N ntilde ; B 16 0 485 638 ; -C -1 ; WX 722 ; N Aring ; B 15 0 706 915 ; -C -1 ; WX 500 ; N odieresis ; B 29 -10 470 622 ; -C -1 ; WX 500 ; N oacute ; B 29 -10 470 678 ; -C -1 ; WX 500 ; N ograve ; B 29 -10 470 678 ; -C -1 ; WX 500 ; N ocircumflex ; B 29 -10 470 674 ; -C -1 ; WX 500 ; N otilde ; B 29 -10 470 638 ; -C -1 ; WX 389 ; N scaron ; B 39 -10 350 674 ; -C -1 ; WX 500 ; N udieresis ; B 9 -10 479 622 ; -C -1 ; WX 500 ; N uacute ; B 9 -10 479 678 ; -C -1 ; WX 500 ; N ugrave ; B 9 -10 479 678 ; -C -1 ; WX 500 ; N ucircumflex ; B 9 -10 479 674 ; -C -1 ; WX 500 ; N yacute ; B 14 -218 475 678 ; -C -1 ; WX 444 ; N zcaron ; B 27 0 418 674 ; -C -1 ; WX 500 ; N ydieresis ; B 14 -218 475 622 ; -C -1 ; WX 760 ; N copyright ; B 38 -14 722 676 ; -C -1 ; WX 760 ; N registered ; B 38 -14 722 676 ; -C -1 ; WX 722 ; N Atilde ; B 15 0 706 850 ; -C -1 ; WX 250 ; N nbspace ; B 125 0 125 0 ; -C -1 ; WX 667 ; N Ccedilla ; B 28 -215 633 676 ; -C -1 ; WX 722 ; N Acircumflex ; B 15 0 706 886 ; -C -1 ; WX 722 ; N Agrave ; B 15 0 706 890 ; -C -1 ; WX 564 ; N logicalnot ; B 30 108 534 386 ; -C -1 ; WX 722 ; N Aacute ; B 15 0 706 890 ; -C -1 ; WX 722 ; N Eth ; B 16 0 685 662 ; -C -1 ; WX 200 ; N brokenbar ; B 67 -14 133 676 ; -C -1 ; WX 556 ; N Thorn ; B 16 0 542 662 ; -C -1 ; WX 722 ; N Adieresis ; B 15 0 706 834 ; -C -1 ; WX 500 ; N mu ; B 36 -218 512 450 ; -C -1 ; WX 250 ; N .notdef ; B 125 0 125 0 ; -EndCharMetrics -StartKernData -StartKernPairs 998 -KPX A C -53 -KPX A Ccedilla -57 -KPX A G -57 -KPX A O -58 -KPX A Odieresis -58 -KPX A Q -60 -KPX A T -54 -KPX A U -62 -KPX A Uacute -62 -KPX A Ucircumflex -62 -KPX A Udieresis -62 -KPX A Ugrave -62 -KPX A V -132 -KPX A W -113 -KPX A Y -81 -KPX A a -6 -KPX A b -19 -KPX A c -29 -KPX A ccedilla -29 -KPX A comma -3 -KPX A d -28 -KPX A e -27 -KPX A g -19 -KPX A guillemotleft -64 -KPX A guilsinglleft -74 -KPX A hyphen -23 -KPX A o -40 -KPX A period -10 -KPX A q -21 -KPX A quotedblright -91 -KPX A quoteright -116 -KPX A t -20 -KPX A u -28 -KPX A v -82 -KPX A w -73 -KPX A y -83 -KPX Aacute C -53 -KPX Aacute G -57 -KPX Aacute O -58 -KPX Aacute Q -60 -KPX Aacute T -54 -KPX Aacute U -62 -KPX Aacute V -132 -KPX Aacute W -113 -KPX Aacute Y -81 -KPX Aacute a -6 -KPX Aacute b -19 -KPX Aacute c -29 -KPX Aacute comma -3 -KPX Aacute d -28 -KPX Aacute e -27 -KPX Aacute g -19 -KPX Aacute guillemotleft -64 -KPX Aacute guilsinglleft -74 -KPX Aacute hyphen -23 -KPX Aacute o -40 -KPX Aacute period -10 -KPX Aacute q -21 -KPX Aacute quoteright -116 -KPX Aacute t -20 -KPX Aacute u -28 -KPX Aacute v -82 -KPX Aacute w -73 -KPX Aacute y -83 -KPX Acircumflex C -53 -KPX Acircumflex G -57 -KPX Acircumflex O -58 -KPX Acircumflex Q -60 -KPX Acircumflex T -54 -KPX Acircumflex U -62 -KPX Acircumflex V -132 -KPX Acircumflex W -113 -KPX Acircumflex Y -81 -KPX Acircumflex comma -3 -KPX Acircumflex period -10 -KPX Adieresis C -53 -KPX Adieresis G -57 -KPX Adieresis O -58 -KPX Adieresis Q -60 -KPX Adieresis T -54 -KPX Adieresis U -62 -KPX Adieresis V -132 -KPX Adieresis W -113 -KPX Adieresis Y -81 -KPX Adieresis a -6 -KPX Adieresis b -19 -KPX Adieresis c -29 -KPX Adieresis comma -3 -KPX Adieresis d -28 -KPX Adieresis g -19 -KPX Adieresis guillemotleft -64 -KPX Adieresis guilsinglleft -74 -KPX Adieresis hyphen -23 -KPX Adieresis o -40 -KPX Adieresis period -10 -KPX Adieresis q -21 -KPX Adieresis quotedblright -91 -KPX Adieresis quoteright -116 -KPX Adieresis t -20 -KPX Adieresis u -28 -KPX Adieresis v -82 -KPX Adieresis w -73 -KPX Adieresis y -83 -KPX Agrave C -53 -KPX Agrave G -57 -KPX Agrave O -58 -KPX Agrave Q -60 -KPX Agrave T -54 -KPX Agrave U -62 -KPX Agrave V -132 -KPX Agrave W -113 -KPX Agrave Y -81 -KPX Agrave comma -3 -KPX Agrave period -10 -KPX Aring C -53 -KPX Aring G -57 -KPX Aring O -58 -KPX Aring Q -60 -KPX Aring T -54 -KPX Aring U -62 -KPX Aring V -132 -KPX Aring W -113 -KPX Aring Y -81 -KPX Aring a -6 -KPX Aring b -19 -KPX Aring c -29 -KPX Aring comma -3 -KPX Aring d -28 -KPX Aring e -27 -KPX Aring g -19 -KPX Aring guillemotleft -64 -KPX Aring guilsinglleft -74 -KPX Aring hyphen -23 -KPX Aring o -40 -KPX Aring period -10 -KPX Aring q -21 -KPX Aring quotedblright -91 -KPX Aring quoteright -116 -KPX Aring t -20 -KPX Aring u -28 -KPX Aring v -82 -KPX Aring w -73 -KPX Aring y -83 -KPX Atilde C -53 -KPX Atilde G -57 -KPX Atilde O -58 -KPX Atilde Q -60 -KPX Atilde T -54 -KPX Atilde U -62 -KPX Atilde V -132 -KPX Atilde W -113 -KPX Atilde Y -81 -KPX Atilde comma -3 -KPX Atilde period -10 -KPX B A -51 -KPX B AE -43 -KPX B Aacute -51 -KPX B Acircumflex -51 -KPX B Adieresis -51 -KPX B Aring -51 -KPX B Atilde -51 -KPX B O -24 -KPX B OE -19 -KPX B Oacute -24 -KPX B Ocircumflex -24 -KPX B Odieresis -24 -KPX B Ograve -24 -KPX B Oslash -23 -KPX B V -65 -KPX B W -59 -KPX B Y -68 -KPX C A -23 -KPX C AE -15 -KPX C Aacute -23 -KPX C Adieresis -23 -KPX C Aring -23 -KPX C H -2 -KPX C K -10 -KPX C O -12 -KPX C Oacute -12 -KPX C Odieresis -12 -KPX Ccedilla A -27 -KPX D A -67 -KPX D Aacute -67 -KPX D Acircumflex -67 -KPX D Adieresis -67 -KPX D Agrave -67 -KPX D Aring -67 -KPX D Atilde -67 -KPX D J -41 -KPX D T -9 -KPX D V -70 -KPX D W -57 -KPX D X -64 -KPX D Y -73 -KPX F A -71 -KPX F Aacute -71 -KPX F Acircumflex -71 -KPX F Adieresis -71 -KPX F Agrave -71 -KPX F Aring -71 -KPX F Atilde -71 -KPX F J -13 -KPX F O -10 -KPX F Odieresis -10 -KPX F a -34 -KPX F aacute -34 -KPX F adieresis -10 -KPX F ae -36 -KPX F aring -34 -KPX F comma -51 -KPX F e -19 -KPX F eacute -19 -KPX F hyphen 3 -KPX F i -13 -KPX F j -20 -KPX F o -21 -KPX F oacute -21 -KPX F odieresis -21 -KPX F oe -21 -KPX F oslash -21 -KPX F period -58 -KPX F r -10 -KPX F u -11 -KPX G A -26 -KPX G AE -19 -KPX G Aacute -26 -KPX G Acircumflex -26 -KPX G Adieresis -26 -KPX G Agrave -26 -KPX G Aring -26 -KPX G Atilde -26 -KPX G T -21 -KPX G V -23 -KPX G W -18 -KPX G Y -26 -KPX J A -53 -KPX J AE -46 -KPX J Adieresis -53 -KPX J Aring -53 -KPX K C -44 -KPX K G -49 -KPX K O -50 -KPX K OE -44 -KPX K Oacute -50 -KPX K Odieresis -50 -KPX K S 1 -KPX K T 0 -KPX K a 2 -KPX K adieresis 2 -KPX K ae 0 -KPX K aring 2 -KPX K e -19 -KPX K hyphen -63 -KPX K o -31 -KPX K oacute -31 -KPX K odieresis -31 -KPX K u -19 -KPX K udieresis -19 -KPX K y -87 -KPX L A 0 -KPX L AE 6 -KPX L Aacute 0 -KPX L Adieresis 0 -KPX L Aring 0 -KPX L C 1 -KPX L Ccedilla 0 -KPX L G 0 -KPX L O -3 -KPX L Oacute -3 -KPX L Ocircumflex -3 -KPX L Odieresis -3 -KPX L Ograve -3 -KPX L Otilde -3 -KPX L S 5 -KPX L T -73 -KPX L U -26 -KPX L Udieresis -26 -KPX L V -115 -KPX L W -89 -KPX L Y -100 -KPX L hyphen 25 -KPX L quotedblright -100 -KPX L quoteright -125 -KPX L u -10 -KPX L udieresis -10 -KPX L y -57 -KPX N A -28 -KPX N AE -21 -KPX N Aacute -28 -KPX N Adieresis -28 -KPX N Aring -28 -KPX N C -17 -KPX N Ccedilla -17 -KPX N G -20 -KPX N O -20 -KPX N Oacute -20 -KPX N Odieresis -20 -KPX N a -27 -KPX N aacute -27 -KPX N adieresis -27 -KPX N ae -27 -KPX N aring -27 -KPX N comma -14 -KPX N e -17 -KPX N eacute -17 -KPX N o -21 -KPX N oacute -21 -KPX N odieresis -21 -KPX N oslash -20 -KPX N period -21 -KPX N u -25 -KPX N udieresis -25 -KPX O A -58 -KPX O AE -51 -KPX O Aacute -58 -KPX O Adieresis -58 -KPX O Aring -58 -KPX O T -9 -KPX O V -69 -KPX O W -55 -KPX O X -56 -KPX O Y -72 -KPX Oacute A -58 -KPX Oacute T -9 -KPX Oacute V -69 -KPX Oacute W -55 -KPX Oacute Y -72 -KPX Ocircumflex T -9 -KPX Ocircumflex V -69 -KPX Ocircumflex Y -72 -KPX Odieresis A -58 -KPX Odieresis T -9 -KPX Odieresis V -69 -KPX Odieresis W -55 -KPX Odieresis X -56 -KPX Odieresis Y -72 -KPX Ograve T -9 -KPX Ograve V -69 -KPX Ograve Y -72 -KPX Oslash A -58 -KPX Otilde T -9 -KPX Otilde V -69 -KPX Otilde Y -72 -KPX P A -90 -KPX P AE -91 -KPX P Aacute -90 -KPX P Adieresis -90 -KPX P Aring -90 -KPX P J -51 -KPX P a -18 -KPX P aacute -18 -KPX P adieresis -18 -KPX P ae -18 -KPX P aring -18 -KPX P comma -94 -KPX P e -23 -KPX P eacute -23 -KPX P hyphen -38 -KPX P o -25 -KPX P oacute -25 -KPX P odieresis -25 -KPX P oe -25 -KPX P oslash -25 -KPX P period -101 -KPX R C -42 -KPX R Ccedilla -42 -KPX R G -44 -KPX R O -45 -KPX R OE -40 -KPX R Oacute -45 -KPX R Odieresis -45 -KPX R T -34 -KPX R U -56 -KPX R Udieresis -56 -KPX R V -73 -KPX R W -68 -KPX R Y -76 -KPX R a -2 -KPX R aacute -2 -KPX R adieresis -2 -KPX R ae -5 -KPX R aring -2 -KPX R e -23 -KPX R eacute -23 -KPX R hyphen -52 -KPX R o -36 -KPX R oacute -36 -KPX R odieresis -36 -KPX R oe -31 -KPX R u -24 -KPX R uacute -24 -KPX R udieresis -24 -KPX R y -36 -KPX S A -37 -KPX S AE -30 -KPX S Aacute -37 -KPX S Adieresis -37 -KPX S Aring -37 -KPX S T -19 -KPX S V -27 -KPX S W -21 -KPX S Y -30 -KPX S t -20 -KPX T A -53 -KPX T AE -45 -KPX T Aacute -53 -KPX T Acircumflex -53 -KPX T Adieresis -53 -KPX T Agrave -53 -KPX T Aring -53 -KPX T Atilde -53 -KPX T C -8 -KPX T G -10 -KPX T J -18 -KPX T O -10 -KPX T OE -3 -KPX T Oacute -10 -KPX T Ocircumflex -10 -KPX T Odieresis -10 -KPX T Ograve -10 -KPX T Oslash -10 -KPX T Otilde -10 -KPX T S -10 -KPX T V 14 -KPX T W 20 -KPX T Y 11 -KPX T a -77 -KPX T ae -80 -KPX T c -87 -KPX T colon -88 -KPX T comma -74 -KPX T e -86 -KPX T g -91 -KPX T guillemotleft -115 -KPX T guilsinglleft -125 -KPX T hyphen -73 -KPX T i -18 -KPX T j -25 -KPX T o -90 -KPX T oslash -89 -KPX T period -82 -KPX T r -50 -KPX T s -73 -KPX T semicolon -87 -KPX T u -93 -KPX T v -105 -KPX T w -106 -KPX T y -102 -KPX U A -65 -KPX U AE -58 -KPX U Aacute -65 -KPX U Acircumflex -65 -KPX U Adieresis -65 -KPX U Aring -65 -KPX U Atilde -65 -KPX U comma -32 -KPX U m -33 -KPX U n -31 -KPX U p -28 -KPX U period -37 -KPX U r -27 -KPX Uacute A -65 -KPX Uacute comma -32 -KPX Uacute m -33 -KPX Uacute n -31 -KPX Uacute p -28 -KPX Uacute period -37 -KPX Uacute r -27 -KPX Ucircumflex A -65 -KPX Udieresis A -65 -KPX Udieresis b 21 -KPX Udieresis comma -32 -KPX Udieresis m -33 -KPX Udieresis n -31 -KPX Udieresis p -28 -KPX Udieresis period -37 -KPX Udieresis r -27 -KPX Ugrave A -65 -KPX V A -124 -KPX V AE -104 -KPX V Aacute -124 -KPX V Acircumflex -124 -KPX V Adieresis -124 -KPX V Agrave -124 -KPX V Aring -124 -KPX V Atilde -124 -KPX V C -64 -KPX V G -67 -KPX V O -67 -KPX V Oacute -67 -KPX V Ocircumflex -67 -KPX V Odieresis -67 -KPX V Ograve -67 -KPX V Oslash -66 -KPX V Otilde -67 -KPX V S -47 -KPX V T 10 -KPX V a -89 -KPX V ae -89 -KPX V colon -89 -KPX V comma -105 -KPX V e -85 -KPX V g -101 -KPX V guillemotleft -109 -KPX V guilsinglleft -119 -KPX V hyphen -69 -KPX V i -20 -KPX V o -89 -KPX V oslash -88 -KPX V period -112 -KPX V r -56 -KPX V semicolon -89 -KPX V u -51 -KPX V y -54 -KPX W A -113 -KPX W AE -98 -KPX W Aacute -113 -KPX W Acircumflex -113 -KPX W Adieresis -113 -KPX W Agrave -113 -KPX W Aring -113 -KPX W Atilde -113 -KPX W C -53 -KPX W G -56 -KPX W O -56 -KPX W Oacute -56 -KPX W Ocircumflex -56 -KPX W Odieresis -56 -KPX W Ograve -56 -KPX W Oslash -55 -KPX W Otilde -56 -KPX W S -41 -KPX W T 17 -KPX W a -80 -KPX W ae -81 -KPX W colon -81 -KPX W comma -89 -KPX W e -72 -KPX W g -91 -KPX W guillemotleft -97 -KPX W guilsinglleft -107 -KPX W hyphen -57 -KPX W i -13 -KPX W o -76 -KPX W oslash -75 -KPX W period -96 -KPX W r -47 -KPX W semicolon -81 -KPX W u -43 -KPX W y -45 -KPX X C -54 -KPX X O -59 -KPX X Odieresis -59 -KPX X Q -61 -KPX X a -7 -KPX X e -28 -KPX X hyphen -55 -KPX X o -41 -KPX X u -29 -KPX X y -96 -KPX Y A -74 -KPX Y AE -67 -KPX Y Aacute -74 -KPX Y Acircumflex -74 -KPX Y Adieresis -74 -KPX Y Agrave -74 -KPX Y Aring -74 -KPX Y Atilde -74 -KPX Y C -68 -KPX Y G -71 -KPX Y O -69 -KPX Y Oacute -69 -KPX Y Ocircumflex -69 -KPX Y Odieresis -69 -KPX Y Ograve -69 -KPX Y Oslash -69 -KPX Y Otilde -69 -KPX Y S -44 -KPX Y T 13 -KPX Y a -99 -KPX Y ae -102 -KPX Y colon -109 -KPX Y comma -96 -KPX Y e -103 -KPX Y g -112 -KPX Y guillemotleft -135 -KPX Y guilsinglleft -145 -KPX Y hyphen -98 -KPX Y i -17 -KPX Y o -107 -KPX Y oslash -106 -KPX Y p -88 -KPX Y period -103 -KPX Y semicolon -108 -KPX Y u -78 -KPX Y v -86 -KPX Z v -48 -KPX Z y -50 -KPX a j -26 -KPX a quoteright -40 -KPX a v -30 -KPX a w -31 -KPX a y -32 -KPX aacute v -30 -KPX aacute w -31 -KPX aacute y -32 -KPX adieresis v -30 -KPX adieresis w -31 -KPX adieresis y -32 -KPX ae v -27 -KPX ae w -28 -KPX ae y -30 -KPX agrave v -30 -KPX agrave w -31 -KPX agrave y -32 -KPX aring v -30 -KPX aring w -31 -KPX aring y -32 -KPX b v -27 -KPX b w -28 -KPX b y -32 -KPX c h -15 -KPX c k -20 -KPX comma one -52 -KPX comma quotedblright -29 -KPX comma quoteright -53 -KPX e quoteright -30 -KPX e t -10 -KPX e v -27 -KPX e w -28 -KPX e x -35 -KPX e y -30 -KPX eacute v -27 -KPX eacute w -28 -KPX eacute y -30 -KPX ecircumflex v -27 -KPX ecircumflex w -28 -KPX ecircumflex y -30 -KPX eight four 0 -KPX eight one -63 -KPX eight seven -15 -KPX f a -24 -KPX f aacute -24 -KPX f adieresis 12 -KPX f ae -25 -KPX f aring -7 -KPX f e -34 -KPX f eacute -34 -KPX f f 6 -KPX f i 15 -KPX f j 8 -KPX f l 44 -KPX f o -38 -KPX f oacute -38 -KPX f odieresis -1 -KPX f oe -37 -KPX f oslash -38 -KPX f quoteright 17 -KPX f s -21 -KPX f t 10 -KPX five four -9 -KPX five one -70 -KPX five seven -36 -KPX four four 14 -KPX four one -75 -KPX four seven -42 -KPX g a -18 -KPX g adieresis -18 -KPX g ae -18 -KPX g aring -18 -KPX g e -24 -KPX g eacute -24 -KPX g l -7 -KPX g oacute -26 -KPX g odieresis -26 -KPX g r 11 -KPX guillemotright A -62 -KPX guillemotright AE -61 -KPX guillemotright Aacute -62 -KPX guillemotright Adieresis -62 -KPX guillemotright Aring -62 -KPX guillemotright T -114 -KPX guillemotright V -117 -KPX guillemotright W -95 -KPX guillemotright Y -138 -KPX guilsinglright A -72 -KPX guilsinglright AE -71 -KPX guilsinglright Aacute -72 -KPX guilsinglright Adieresis -72 -KPX guilsinglright Aring -72 -KPX guilsinglright T -124 -KPX guilsinglright V -128 -KPX guilsinglright W -105 -KPX guilsinglright Y -149 -KPX h quoteright -38 -KPX h y -30 -KPX hyphen A -27 -KPX hyphen AE -25 -KPX hyphen Aacute -27 -KPX hyphen Adieresis -27 -KPX hyphen Aring -27 -KPX hyphen T -77 -KPX hyphen V -82 -KPX hyphen W -59 -KPX hyphen Y -108 -KPX i T -28 -KPX i j -36 -KPX k a 1 -KPX k aacute 1 -KPX k adieresis 1 -KPX k ae -1 -KPX k aring 1 -KPX k comma 4 -KPX k e -19 -KPX k eacute -19 -KPX k g -11 -KPX k hyphen -64 -KPX k o -32 -KPX k oacute -32 -KPX k odieresis -32 -KPX k period -2 -KPX k s 5 -KPX k u 14 -KPX k udieresis 14 -KPX l v -28 -KPX l y -25 -KPX m p -9 -KPX m v -30 -KPX m w -31 -KPX m y -31 -KPX n T -55 -KPX n p -13 -KPX n quoteright -40 -KPX n v -30 -KPX n w -31 -KPX n y -31 -KPX nine four -7 -KPX nine one -63 -KPX nine seven -6 -KPX o T -91 -KPX o quoteright -34 -KPX o t -9 -KPX o v -36 -KPX o w -36 -KPX o x -36 -KPX o y -39 -KPX oacute v -36 -KPX oacute w -36 -KPX oacute y -39 -KPX ocircumflex t -9 -KPX odieresis t -9 -KPX odieresis v -36 -KPX odieresis w -36 -KPX odieresis x -36 -KPX odieresis y -39 -KPX ograve v -36 -KPX ograve w -36 -KPX ograve y -39 -KPX one comma -48 -KPX one eight -68 -KPX one five -37 -KPX one four -72 -KPX one nine -61 -KPX one one -78 -KPX one period -55 -KPX one seven -78 -KPX one six -66 -KPX one three -41 -KPX one two -34 -KPX one zero -54 -KPX p t -6 -KPX p y -28 -KPX period one -61 -KPX period quotedblright -34 -KPX period quoteright -58 -KPX q c -8 -KPX q u -12 -KPX quotedblbase A 12 -KPX quotedblbase AE 19 -KPX quotedblbase T -60 -KPX quotedblbase V -105 -KPX quotedblbase W -76 -KPX quotedblbase Y -87 -KPX quotedblleft A -86 -KPX quotedblleft AE -91 -KPX quotedblleft Aacute -86 -KPX quotedblleft Adieresis -86 -KPX quotedblleft Aring -86 -KPX quotedblleft T 14 -KPX quotedblleft V 1 -KPX quotedblleft W 7 -KPX quotedblleft Y -1 -KPX quotedblright A -94 -KPX quotedblright AE -99 -KPX quotedblright Aacute -94 -KPX quotedblright Adieresis -94 -KPX quotedblright Aring -94 -KPX quotedblright T 11 -KPX quotedblright V 0 -KPX quotedblright W 6 -KPX quotedblright Y -2 -KPX quoteleft A -111 -KPX quoteleft AE -115 -KPX quoteleft Aacute -111 -KPX quoteleft Adieresis -111 -KPX quoteleft Aring -111 -KPX quoteleft T -9 -KPX quoteleft V -23 -KPX quoteleft W -17 -KPX quoteleft Y -26 -KPX quoteright A -130 -KPX quoteright AE -135 -KPX quoteright Aacute -130 -KPX quoteright Adieresis -130 -KPX quoteright Aring -130 -KPX quoteright comma -71 -KPX quoteright d -57 -KPX quoteright o -54 -KPX quoteright period -78 -KPX quoteright r -44 -KPX quoteright s -47 -KPX quoteright t -44 -KPX quoteright v -47 -KPX quoteright w -47 -KPX quoteright y -45 -KPX r a -2 -KPX r aacute -2 -KPX r acircumflex -2 -KPX r adieresis -2 -KPX r ae -3 -KPX r agrave -2 -KPX r aring -2 -KPX r c -9 -KPX r ccedilla -8 -KPX r colon -7 -KPX r comma -41 -KPX r d -10 -KPX r e -5 -KPX r eacute -5 -KPX r ecircumflex -5 -KPX r egrave -5 -KPX r f 19 -KPX r g -15 -KPX r h -6 -KPX r hyphen -46 -KPX r i 20 -KPX r j 14 -KPX r k -10 -KPX r l -18 -KPX r m 20 -KPX r n 22 -KPX r o -8 -KPX r oacute -8 -KPX r ocircumflex -8 -KPX r odieresis -8 -KPX r oe -7 -KPX r ograve -8 -KPX r oslash -7 -KPX r p 25 -KPX r period -48 -KPX r q -10 -KPX r quoteright -19 -KPX r r 26 -KPX r s 0 -KPX r semicolon -7 -KPX r t 23 -KPX r u 19 -KPX r v 20 -KPX r w 19 -KPX r x 17 -KPX r y 22 -KPX r z 2 -KPX s quoteright -38 -KPX s t -15 -KPX seven colon -68 -KPX seven comma -72 -KPX seven eight -40 -KPX seven five -59 -KPX seven four -63 -KPX seven one -56 -KPX seven period -79 -KPX seven seven -20 -KPX seven six -46 -KPX seven three -35 -KPX seven two -31 -KPX six four 12 -KPX six one -74 -KPX six seven -29 -KPX t S 2 -KPX t a 10 -KPX t aacute 10 -KPX t adieresis 10 -KPX t ae 9 -KPX t aring 10 -KPX t colon -8 -KPX t e 0 -KPX t eacute 0 -KPX t h 10 -KPX t o -8 -KPX t oacute -8 -KPX t odieresis -8 -KPX t quoteright -29 -KPX t semicolon -8 -KPX three four -6 -KPX three one -76 -KPX three seven -29 -KPX two four 0 -KPX two one -60 -KPX two seven -16 -KPX u quoteright -36 -KPX v a -24 -KPX v aacute -24 -KPX v acircumflex -24 -KPX v adieresis -24 -KPX v ae -24 -KPX v agrave -24 -KPX v aring -24 -KPX v atilde -24 -KPX v c -37 -KPX v colon -20 -KPX v comma -69 -KPX v e -35 -KPX v eacute -35 -KPX v ecircumflex -35 -KPX v egrave -35 -KPX v g -41 -KPX v hyphen -28 -KPX v l -31 -KPX v o -37 -KPX v oacute -37 -KPX v odieresis -37 -KPX v ograve -37 -KPX v oslash -38 -KPX v period -76 -KPX v s -20 -KPX v semicolon -20 -KPX w a -26 -KPX w aacute -26 -KPX w acircumflex -26 -KPX w adieresis -26 -KPX w ae -27 -KPX w agrave -26 -KPX w aring -26 -KPX w atilde -26 -KPX w c -33 -KPX w colon -23 -KPX w comma -64 -KPX w e -31 -KPX w eacute -31 -KPX w ecircumflex -31 -KPX w egrave -31 -KPX w g -43 -KPX w hyphen -24 -KPX w l -33 -KPX w o -36 -KPX w oacute -36 -KPX w odieresis -36 -KPX w ograve -36 -KPX w oslash -34 -KPX w period -71 -KPX w s -23 -KPX w semicolon -23 -KPX x a -11 -KPX x c -34 -KPX x e -32 -KPX x eacute -32 -KPX x o -45 -KPX x q -26 -KPX y a -30 -KPX y aacute -30 -KPX y acircumflex -30 -KPX y adieresis -30 -KPX y ae -31 -KPX y agrave -30 -KPX y aring -30 -KPX y atilde -30 -KPX y c -37 -KPX y colon -23 -KPX y comma -66 -KPX y e -35 -KPX y eacute -35 -KPX y ecircumflex -35 -KPX y egrave -35 -KPX y g -48 -KPX y hyphen -27 -KPX y l -32 -KPX y o -39 -KPX y oacute -39 -KPX y odieresis -39 -KPX y ograve -39 -KPX y oslash -38 -KPX y period -73 -KPX y s -26 -KPX y semicolon -23 -KPX zero four 12 -KPX zero one -55 -KPX zero seven -5 -EndKernPairs -EndKernData -EndFontMetrics diff --git a/misc/imlib/im_palette.pal b/misc/imlib/im_palette.pal deleted file mode 100644 index 7464319c3f..0000000000 --- a/misc/imlib/im_palette.pal +++ /dev/null @@ -1,64 +0,0 @@ -0x0 0x0 0x0 -0xff 0xff 0xff -0xdd 0xdd 0xdd -0xbb 0xbb 0xbb -0x99 0x99 0x99 -0x77 0x77 0x77 -0x55 0x55 0x55 -0x33 0x33 0x33 -0x88 0x0 0x0 -0xcc 0x0 0x0 -0xff 0x0 0x0 -0xff 0x44 0x0 -0xff 0x88 0x0 -0xff 0xcc 0x0 -0xff 0xff 0x0 -0xcc 0xcc 0x0 -0x88 0x88 0x0 -0x60 0x60 0x0 -0x0 0x43 0x0 -0x0 0x7f 0x0 -0x0 0xcc 0x0 -0x0 0xff 0x0 -0x0 0x44 0x44 -0x0 0x88 0x88 -0x0 0xff 0xff -0x0 0x0 0x44 -0x0 0x0 0x88 -0x0 0x0 0xff -0xff 0xcc 0x97 -0xef 0xb1 0x7b -0xdf 0x98 0x5f -0xbf 0x87 0x56 -0x9f 0x6b 0x42 -0x7f 0x57 0x26 -0x5f 0x39 0xc -0x3f 0x1c 0x0 -0x21 0x0 0x0 -0x0 0x43 0x87 -0x2d 0x70 0xaf -0x5a 0x9e 0xd7 -0x87 0xcc 0xff -0xff 0xe0 0xba -0x21 0x43 0xf -0x3d 0x5d 0x25 -0x59 0x78 0x3a -0x75 0x93 0x4f -0x91 0xae 0x64 -0xad 0xc8 0x7a -0xf0 0xa8 0xef -0xd0 0x88 0xd0 -0xaf 0x66 0xaf -0x8e 0x44 0x8e -0x6d 0x22 0x6d -0x4b 0x0 0x4b -0xff 0xc0 0xbc -0xff 0x93 0x91 -0xff 0x66 0x67 -0xd8 0xf2 0xbf -0xff 0xc9 0x68 -0xff 0x96 0x67 -0xa5 0x60 0xff -0x51 0xff 0x99 -0x3f 0xa5 0x63 -0x98 0x90 0x67 diff --git a/misc/imlib/imrc b/misc/imlib/imrc deleted file mode 100644 index 5849d45bb7..0000000000 --- a/misc/imlib/imrc +++ /dev/null @@ -1,99 +0,0 @@ -################################ -# Config file for Imlib # -################################ - -# The file that contains palette entries for a global palette for all Imlib -# based programs. -# options: full path to palette file -PaletteFile /etc/im_palette.pal -# This defines if when the display is greater than 8 bit, that it still remaps -# the images to the palette defined, rather than using "perfect" rendering -# options: yes/no -PaletteOverride no -# If remapping to the palette, whether to use Floyd-Steinberg dithering. Saying -# yes will slow things down though. -# options: yes/no -Dither yes -# when remapping to the palette, saying fast will reduce accuracy, but improve -# speed quite considerably -# options: fast/slow -Remap fast -# This turns on dithering for 15/16 bpp. This makes smooth gradients look much -# smoother - in fact almost perfect. You will find it nigh impossible to tell -# the difference between 15/16bpp dithered and 24bpp. Unless you have extra -# CPU to burn, its not recommended, unless you are a image quality freak, and -# you insist on maximum quality in 15/16bpp. It does slow things down. It -# would be best to leave it off and let the applications themselves allow -# you to select it for certain purposes only. -HighQuality off -# This option if specified off will force MIT-SHM off, otherwise will allow -# Imlib to work it out itself. -Mit-Shm on -# This will turn shared pixmaps on or off (off forces off, on lets imlib -# work it out). This is yet another speedup. leave it on unless it doesn't -# work.. then turn it off. -SharedPixmaps off -# This speeds up rendering considerably, but may not work on your hardware -# due to it bypassing a few layers and byte-twiddling the rendered image data -# manually, and due to endianess, bit-ordering or RGB ordering it may screw up -# and not work, so try it.. if things work great!, if not, wait until a -# renderer for your situation is written, or write one yourself and donate -# it. It's easy to do, just look at rend.c -FastRender on -# This is in fact a workaround due to Solaris's shared memory theories. -# This specifies the maximum size of a shared memory chunk in bytes. If an -# image is larger that this in bytes for the video mode you're in, imlib will -# not use MIT-SHM. if you comment this out, imlib will use as much memory as -# necessary to render the image. -# Shm_Max_Size 1000000 -# This turns Image loading (24) bit caching on or off. HIGHLY suggested to be -# turned ON! -Image_Cache on -# Image cache size in bytes. As with any cache, the more, the better. If you -# load the same image more than once. Imlib will used a previously loaded -# copy, and if its freed, the Image_Cache_Size amount of bytes of image data -# are kept even after being freed, in case the same image is loaded again soon -# afterwards. Neat eh? -Image_Cache_Size 4000000 -# This turns the pixmap caching system on or off. If on, only well-behaved -# programs that conform to the specs for using Imlib will exhibit the -# behavior as expected. It is suggested to leave this on, as it will boost -# performance considerably, speed-wise and memory-wise. The reason apps need -# to be well-behaved is so that they don't go drawing on, and XFreePixmap'ing -# these pixmaps themselves, because this will trample all over the cache -# and give very horrid effects, or even make the apps crash with segfaults or -# Xlib errors. -Pixmap_Cache on -# Pixmap cache is in **-> BITS <-**... the end result is APPROXIMATELY -# 10000000 bits of pixmap make your Xserver grow by 1Mb of RAM (VERY rough). -# As with any cache, the more, the better. The more you have, the less likely -# it is that you will get cache misses and so performance on scaling the same -# image to commonly used sizes (ie if 3 or 4 sizes of the same image are used) -# will be lightning fast, in fact in some tests I did, in 16bpp up to 38 times -# as fast, and in 8bpp (with dithering on) up to 105 times faster!!! (these -# are nominal figures obtained on my machine. these are MAXIMUM speedup -# results. Results may vary on other machines and according to the way -# programs are written and use Imlib) -Pixmap_Cache_Size 40000000 -# This FORCES Imlib to use the hexadecimal visual id stated here if it is -# defined in the imrc. This bypasses Imlib's routines that hunt for the best -# visual. You can obtain a list of visual ID's using the xdpyinfo command. -# You should only need this if Imlib doesn't pick the correct visual or you -# have strange hardware/Xserver combinations. -#ForceVisualID 22 -# This allows Imlib to fall back on Imagemagick and/or NETPBM -# utilities if it can't load the file. -Fallback on -# Default Gamma, Brightness and Contrast stuff.... -Gamma 1.0 -Brightness 1.0 -Contrast 1.0 -Red_Gamma 1.0 -Red_Brightness 1.0 -Red_Contrast 1.0 -Green_Gamma 1.0 -Green_Brightness 1.0 -Green_Contrast 1.0 -Blue_Gamma 1.0 -Blue_Brightness 1.0 -Blue_Contrast 1.0 diff --git a/mkinstalldirs b/mkinstalldirs deleted file mode 100644 index fef1eb9418..0000000000 --- a/mkinstalldirs +++ /dev/null @@ -1,36 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman -# 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 diff --git a/samples/Makefile b/samples/Makefile deleted file mode 100644 index 57ec5f3f82..0000000000 --- a/samples/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../setup/general/makedirs diff --git a/samples/checklst/bell.bmp b/samples/checklst/bell.bmp deleted file mode 100644 index 279b827162..0000000000 Binary files a/samples/checklst/bell.bmp and /dev/null differ diff --git a/samples/checklst/checklst.cpp b/samples/checklst/checklst.cpp deleted file mode 100644 index a44be861b1..0000000000 --- a/samples/checklst/checklst.cpp +++ /dev/null @@ -1,185 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: checklst.cpp -// Purpose: wxCheckListBox sample -// Author: Vadim Zeitlin -// Modified by: -// Created: 13.11.97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// headers & declarations -// ============================================================================ - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif - -#ifndef WX_PRECOMP - #include "wx/wx.h" -#endif - -#include "wx/ownerdrw.h" -#include "wx/menuitem.h" -#include "wx/msw/checklst.h" - -// Define a new application type -class CheckListBoxApp: public wxApp -{ -public: - bool OnInit(); -}; - -// Define a new frame type -class CheckListBoxFrame : public wxFrame -{ -public: - // ctor & dtor - CheckListBoxFrame(wxFrame *frame, char *title, int x, int y, int w, int h); - ~CheckListBoxFrame(); - - // notifications - void OnQuit (wxCommandEvent& event); - void OnAbout (wxCommandEvent& event); - void OnListboxSelect (wxCommandEvent& event); - void OnCheckboxToggle (wxCommandEvent& event); - void OnListboxDblClick (wxCommandEvent& event); - bool OnClose () { return TRUE; } - - DECLARE_EVENT_TABLE() - -private: - wxCheckListBox *m_pListBox; -}; - -enum -{ - Menu_Quit = 1, - Control_First = 1000, - Control_Listbox, Control_Listbox2, -}; - -BEGIN_EVENT_TABLE(CheckListBoxFrame, wxFrame) - EVT_MENU(Menu_Quit, CheckListBoxFrame::OnQuit) - EVT_LISTBOX(Control_Listbox, CheckListBoxFrame::OnListboxSelect) - EVT_CHECKLISTBOX(Control_Listbox, CheckListBoxFrame::OnCheckboxToggle) - EVT_COMMAND(Control_Listbox, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, - CheckListBoxFrame::OnListboxDblClick) -END_EVENT_TABLE() - -IMPLEMENT_APP(CheckListBoxApp); - -// init our app: create windows -bool CheckListBoxApp::OnInit(void) -{ - CheckListBoxFrame *pFrame = new CheckListBoxFrame(NULL, "wxWindows Ownerdraw Sample", - 50, 50, 450, 320); - SetTopWindow(pFrame); - - return TRUE; -} - -// main frame constructor -CheckListBoxFrame::CheckListBoxFrame(wxFrame *frame, char *title, int x, int y, int w, int h) - : wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) -{ - // set the icon - SetIcon(wxIcon("mondrian")); - - // Make a menubar - wxMenu *file_menu = new wxMenu; - - // construct submenu - file_menu->Append(Menu_Quit, "E&xit"); - - wxMenuBar *menu_bar = new wxMenuBar; - menu_bar->Append(file_menu, "&File"); - SetMenuBar(menu_bar); - - // make a panel with some controls - wxPanel *pPanel = new wxPanel(this, -1, wxPoint(0, 0), - wxSize(400, 200), wxTAB_TRAVERSAL); - - // check list box - static const char* aszChoices[] = { "Hello", "world", "and", - "goodbye", "cruel", "world", - "-------", "owner-drawn", "listbox" }; - - wxString *astrChoices = new wxString[WXSIZEOF(aszChoices)]; - uint ui; - for ( ui = 0; ui < WXSIZEOF(aszChoices); ui++ ) - astrChoices[ui] = aszChoices[ui]; - - m_pListBox = new wxCheckListBox - ( - pPanel, // parent - Control_Listbox, // control id - wxPoint(10, 10), // listbox poistion - wxSize(400, 200), // listbox size - WXSIZEOF(aszChoices), // number of strings - astrChoices // array of strings - ); - - delete [] astrChoices; - - for ( ui = 0; ui < WXSIZEOF(aszChoices); ui += 2 ) { - m_pListBox->GetItem(ui)->SetBackColor(wxColor(200, 200, 200)); - } - - m_pListBox->Check(2); - - // create the status line - const int widths[] = { -1, 60 }; - CreateStatusBar(2); - SetStatusWidths(2, widths); - SetStatusText("no selection", 0); - - Show(TRUE); -} - -CheckListBoxFrame::~CheckListBoxFrame() -{ -} - -void CheckListBoxFrame::OnQuit(wxCommandEvent& event) -{ - Close(TRUE); -} - -void CheckListBoxFrame::OnAbout(wxCommandEvent& event) -{ - wxMessageDialog dialog(this, "Demo of wxCheckListBox control\n" - "About wxCheckListBox", wxYES_NO | wxCANCEL); - dialog.ShowModal(); -} - -void CheckListBoxFrame::OnListboxSelect(wxCommandEvent& event) -{ - wxString strSelection; - uint nSel = event.GetSelection(); - strSelection.sprintf("item %d selected (%schecked)", nSel, - m_pListBox->IsChecked(nSel) ? "" : "not "); - SetStatusText(strSelection); -} - -void CheckListBoxFrame::OnListboxDblClick(wxCommandEvent& event) -{ - wxString strSelection; - strSelection.sprintf("item %d double clicked", m_pListBox->GetSelection()); - wxMessageDialog dialog(this, strSelection); - dialog.ShowModal(); -} - -void CheckListBoxFrame::OnCheckboxToggle(wxCommandEvent& event) -{ - wxString strSelection; - uint nItem = event.GetInt(); - strSelection.sprintf("item %d was %schecked", nItem, - m_pListBox->IsChecked(nItem) ? "" : "un"); - SetStatusText(strSelection); -} \ No newline at end of file diff --git a/samples/checklst/checklst.def b/samples/checklst/checklst.def deleted file mode 100644 index 57c46fbcb1..0000000000 --- a/samples/checklst/checklst.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME CHECKLST -DESCRIPTION 'wxCheckListBox sample' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 4048 -STACKSIZE 16000 diff --git a/samples/checklst/checklst.rc b/samples/checklst/checklst.rc deleted file mode 100644 index bbc00bdf4b..0000000000 --- a/samples/checklst/checklst.rc +++ /dev/null @@ -1,6 +0,0 @@ -mondrian ICON "mondrian.ico" -bell BITMAP "bell.bmp" -sound BITMAP "sound.bmp" -nosound BITMAP "nosound.bmp" -#include "wx/msw/wx.rc" - diff --git a/samples/checklst/makefile.b32 b/samples/checklst/makefile.b32 deleted file mode 100644 index 59adb52171..0000000000 --- a/samples/checklst/makefile.b32 +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds checklst example (DOS). - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXINC = $(WXDIR)\include\msw -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 - -TARGET=checklst - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = checklst.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -checklst.obj: checklst.$(SRCSUFF) - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - diff --git a/samples/checklst/makefile.dos b/samples/checklst/makefile.dos deleted file mode 100644 index c33ea5e450..0000000000 --- a/samples/checklst/makefile.dos +++ /dev/null @@ -1,65 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds checklst example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\checklst - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = checklst.$(SRCSUFF) -OBJECTS = checklst.obj - -all: checklst.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -checklst.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) checklst.obj checklst.def checklst.res - link $(LINKFLAGS) @<< -checklst.obj $(WXDIR)\src\msw\dummy.obj, -checklst, -NUL, -$(LIBS), -checklst.def -; -<< - rc -K checklst.res - -checklst.obj: checklst.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -checklst.res : checklst.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include checklst - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/checklst/makefile.g95 b/samples/checklst/makefile.g95 deleted file mode 100644 index 3fb8e70772..0000000000 --- a/samples/checklst/makefile.g95 +++ /dev/null @@ -1,37 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for checklst example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/checklst.$(OBJSUFF) $(OBJDIR)/checklst_resources.$(OBJSUFF) - -all: $(OBJDIR) checklst$(GUISUFFIX)$(EXESUFF) - -wx: - -$(OBJDIR): - mkdir $(OBJDIR) - -checklst$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o checklst$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/checklst.$(OBJSUFF): checklst.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ checklst.$(SRCSUFF) - -$(OBJDIR)/checklst_resources.o: checklst.rc - $(RESCOMP) -i checklst.rc -o $(OBJDIR)/checklst_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) checklst$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/checklst/makefile.nt b/samples/checklst/makefile.nt deleted file mode 100644 index 44c4478783..0000000000 --- a/samples/checklst/makefile.nt +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds checklst example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\checklst -PROGRAM=checklst - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/checklst/mondrian.ico b/samples/checklst/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/samples/checklst/mondrian.ico and /dev/null differ diff --git a/samples/checklst/nosound.bmp b/samples/checklst/nosound.bmp deleted file mode 100644 index 51da0811ec..0000000000 Binary files a/samples/checklst/nosound.bmp and /dev/null differ diff --git a/samples/checklst/sound.bmp b/samples/checklst/sound.bmp deleted file mode 100644 index 26f5f1883e..0000000000 Binary files a/samples/checklst/sound.bmp and /dev/null differ diff --git a/samples/config/.cvsignore b/samples/config/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/config/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/config/Makefile b/samples/config/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/config/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/config/Makefile.in b/samples/config/Makefile.in deleted file mode 100644 index 95613d0b42..0000000000 --- a/samples/config/Makefile.in +++ /dev/null @@ -1,24 +0,0 @@ -# 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 diff --git a/samples/config/conftest.cpp b/samples/config/conftest.cpp deleted file mode 100644 index 3d0b4b5217..0000000000 --- a/samples/config/conftest.cpp +++ /dev/null @@ -1,232 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: conftest.cpp -// Purpose: demo of wxConfig and related classes -// Author: Vadim Zeitlin -// Modified by: -// Created: 03.08.98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- -#include "wx/wxprec.h" - -#ifndef WX_PRECOMP - #include "wx/wx.h" -#endif //precompiled headers - -#include "wx/log.h" -#include "wx/config.h" - -// ---------------------------------------------------------------------------- -// classes -// ---------------------------------------------------------------------------- -class MyApp: public wxApp -{ -public: - // implement base class virtuals - virtual bool OnInit(); - virtual int OnExit(); -}; - -class MyFrame: public wxFrame -{ -public: - MyFrame(); - virtual ~MyFrame(); - - // callbacks - void OnQuit(wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); - void OnDelete(wxCommandEvent& event); - bool OnClose() { return TRUE; } - -private: - wxTextCtrl *m_text; - wxCheckBox *m_check; - - DECLARE_EVENT_TABLE() -}; - -enum -{ - Minimal_Quit, - Minimal_About, - Minimal_Delete -}; - -// ---------------------------------------------------------------------------- -// event tables -// ---------------------------------------------------------------------------- -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(Minimal_Quit, MyFrame::OnQuit) - EVT_MENU(Minimal_About, MyFrame::OnAbout) - EVT_MENU(Minimal_Delete, MyFrame::OnDelete) -END_EVENT_TABLE() - -// ============================================================================ -// implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// application -// ---------------------------------------------------------------------------- -IMPLEMENT_APP(MyApp) - -// `Main program' equivalent, creating windows and returning main app frame -bool MyApp::OnInit() -{ - // we're using wxConfig's "create-on-demand" feature: it will create the - // config object when it's used for the first time. It has a number of - // advantages compared with explicitly creating our wxConfig: - // 1) we don't pay for it if we don't use it - // 2) there is no danger to create it twice - - // application and vendor name are used by wxConfig to construct the name - // of the config file/registry key and must be set before the first call - // to Get() if you want to override the default values (the application - // name is the name of the executable and the vendor name is the same) - SetVendorName("wxWindows"); - SetAppName("conftest"); // not needed, it's the default value - - wxConfigBase *pConfig = wxConfigBase::Get(); - - // or you could also write something like this: - // wxFileConfig *pConfig = new wxFileConfig("conftest"); - // wxConfigBase::Set(pConfig); - // where you can also specify the file names explicitly if you wish. - // Of course, calling Set() is optional and you only must do it if - // you want to later retrieve this pointer with Get(). - - // create the main program window - MyFrame *frame = new MyFrame; - frame->Show(TRUE); - SetTopWindow(frame); - - // use our config object... - if ( pConfig->Read("/Controls/Check", 1l) != 0 ) { - wxMessageBox("You can disable this message box by unchecking\n" - "the checkbox in the main window (of course, a real\n" - "program would have a checkbox right here but we\n" - "keep it simple)", "Welcome to wxConfig demo", - wxICON_INFORMATION | wxOK); - } - - return TRUE; -} - -int MyApp::OnExit() -{ - // clean up: Set() returns the active config object as Get() does, but unlike - // Get() it doesn't try to create one if there is none (definitely not what - // we want here!) - delete wxConfigBase::Set((wxConfigBase *) NULL); - - return 0; -} - -// ---------------------------------------------------------------------------- -// frame -// ---------------------------------------------------------------------------- - -// main frame ctor -MyFrame::MyFrame() - : wxFrame((wxFrame *) NULL, -1, "wxConfig Demo") -{ - // menu - wxMenu *file_menu = new wxMenu; - - file_menu->Append(Minimal_Delete, "&Delete", "Delete config file"); - file_menu->AppendSeparator(); - file_menu->Append(Minimal_About, "&About", "About this sample"); - file_menu->AppendSeparator(); - file_menu->Append(Minimal_Quit, "E&xit", "Exit the program"); - wxMenuBar *menu_bar = new wxMenuBar; - menu_bar->Append(file_menu, "&File"); - SetMenuBar(menu_bar); - - CreateStatusBar(); - - // child controls - wxPanel *panel = new wxPanel(this); - (void)new wxStaticText(panel, -1, "These controls remember their values!", - wxPoint(10, 10), wxSize(300, 20)); - m_text = new wxTextCtrl(panel, -1, "", wxPoint(10, 40), wxSize(300, 20)); - m_check = new wxCheckBox(panel, -1, "show welcome message box at startup", - wxPoint(10, 70), wxSize(300, 20)); - - // restore the control's values from the config - - // NB: in this program, the config object is already created at this moment - // because we had called Get() from MyApp::OnInit(). However, if you later - // change the code and don't create it before this line, it won't break - // anything - unlike if you manually create wxConfig object with Create() - // or in any other way (then you must be sure to create it before using it!). - wxConfigBase *pConfig = wxConfigBase::Get(); - - // we could write Read("/Controls/Text") as well, it's just to show SetPath() - pConfig->SetPath("/Controls"); - - m_text->SetValue(pConfig->Read("Text", "")); - m_check->SetValue(pConfig->Read("Check", 1l) != 0); - - // SetPath() understands ".." - pConfig->SetPath("../MainFrame"); - - // restore frame position and size - int x = pConfig->Read("x", 50), - y = pConfig->Read("y", 50), - w = pConfig->Read("w", 350), - h = pConfig->Read("h", 200); - Move(x, y); - SetClientSize(w, h); -} - -void MyFrame::OnQuit(wxCommandEvent&) -{ - Close(TRUE); -} - -void MyFrame::OnAbout(wxCommandEvent&) -{ - wxMessageBox("wxConfig demo\n© Vadim Zeitlin 1998", "About", - wxICON_INFORMATION | wxOK); -} - -void MyFrame::OnDelete(wxCommandEvent&) -{ - if ( wxConfigBase::Get()->DeleteAll() ) { - wxLogMessage("Config file/registry key successfully deleted."); - - delete wxConfigBase::Set((wxConfigBase *) NULL); - wxConfigBase::DontCreateOnDemand(); - } - else - wxLogError("Deleting config file/registry key failed."); -} - -MyFrame::~MyFrame() -{ - // save the control's values to the config - wxConfigBase *pConfig = wxConfigBase::Get(); - if ( pConfig == NULL ) - return; - pConfig->Write("/Controls/Text", m_text->GetValue()); - pConfig->Write("/Controls/Check", m_check->GetValue()); - - // save the frame position - int x, y, w, h; - GetClientSize(&w, &h); - GetPosition(&x, &y); - pConfig->Write("/MainFrame/x", (long) x); - pConfig->Write("/MainFrame/y", (long) y); - pConfig->Write("/MainFrame/w", (long) w); - pConfig->Write("/MainFrame/h", (long) h); -} diff --git a/samples/config/conftest.rc b/samples/config/conftest.rc deleted file mode 100644 index 82bdf07561..0000000000 --- a/samples/config/conftest.rc +++ /dev/null @@ -1,2 +0,0 @@ -#include "wx/msw/wx.rc" - diff --git a/samples/config/makefile.nt b/samples/config/makefile.nt deleted file mode 100644 index 3d516b5d9e..0000000000 --- a/samples/config/makefile.nt +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds conftest example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\conftest -PROGRAM=conftest - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/controls/.cvsignore b/samples/controls/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/controls/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/controls/Makefile b/samples/controls/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/controls/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/controls/Makefile.in b/samples/controls/Makefile.in deleted file mode 100644 index f011b493a7..0000000000 --- a/samples/controls/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# 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 diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp deleted file mode 100644 index e0e3ea5cc1..0000000000 --- a/samples/controls/controls.cpp +++ /dev/null @@ -1,416 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: minimal.cpp -// Purpose: Controls wxWindows sample -// Author: Robert Roebling -// Modified by: -// RCS-ID: $Id$ -// Copyright: (c) Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "minimal.cpp" -#pragma interface "minimal.cpp" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "wx/notebook.h" - -#ifdef __WXGTK__ -#include "mondrian.xpm" -#endif - -//---------------------------------------------------------------------- -// class definitions -//---------------------------------------------------------------------- - -class MyApp: public wxApp -{ - public: - bool OnInit(void); -}; - -class MyPanel: public wxPanel -{ - public: - - MyPanel(wxFrame *frame, int x, int y, int w, int h); - - void OnSize( wxSizeEvent& event ); - void OnListBox( wxCommandEvent &event ); - void OnListBoxButtons( wxCommandEvent &event ); - void OnChoice( wxCommandEvent &event ); - void OnChoiceButtons( wxCommandEvent &event ); - void OnCombo( wxCommandEvent &event ); - void OnComboButtons( wxCommandEvent &event ); - void OnRadio( wxCommandEvent &event ); - void OnRadioButtons( wxCommandEvent &event ); - - wxListBox *m_listbox; - wxChoice *m_choice; - wxComboBox *m_combo; - wxRadioBox *m_radio; - - wxTextCtrl *m_text; - wxNotebook *m_notebook; - - DECLARE_EVENT_TABLE() -}; - -class MyFrame: public wxFrame -{ - public: - - MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h); - - public: - - void OnQuit(wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); - bool OnClose(void) { return TRUE; } - - DECLARE_EVENT_TABLE() -}; - -//---------------------------------------------------------------------- -// main() -//---------------------------------------------------------------------- - -IMPLEMENT_APP (MyApp) - -//---------------------------------------------------------------------- -// MyApp -//---------------------------------------------------------------------- - -const int MINIMAL_QUIT = 100; -const int MINIMAL_TEXT = 101; -const int MINIMAL_ABOUT = 102; - -bool MyApp::OnInit(void) -{ - // Create the main frame window - MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "Controls wxWindows App", 50, 50, 500, 420 ); - - // Give it an icon -#ifdef __WXMSW__ - frame->SetIcon(wxIcon("mondrian")); -#else - frame->SetIcon(wxIcon( mondrian_xpm )); -#endif - - wxMenu *file_menu = new wxMenu; - - file_menu->Append(MINIMAL_ABOUT, "&About"); - file_menu->Append(MINIMAL_QUIT, "E&xit"); - wxMenuBar *menu_bar = new wxMenuBar; - menu_bar->Append(file_menu, "&File"); - frame->SetMenuBar(menu_bar); - - frame->Show(TRUE); - - SetTopWindow(frame); - - return TRUE; -} - -//---------------------------------------------------------------------- -// MyPanel -//---------------------------------------------------------------------- - -const ID_NOTEBOOK = 1000; - -const ID_LISTBOX = 130; -const ID_LISTBOX_SEL_NUM = 131; -const ID_LISTBOX_SEL_STR = 132; -const ID_LISTBOX_CLEAR = 133; -const ID_LISTBOX_APPEND = 134; -const ID_LISTBOX_DELETE = 135; - -const ID_CHOICE = 120; -const ID_CHOICE_SEL_NUM = 121; -const ID_CHOICE_SEL_STR = 122; -const ID_CHOICE_CLEAR = 123; -const ID_CHOICE_APPEND = 124; -const ID_CHOICE_DELETE = 125; - -const ID_COMBO = 140; -const ID_COMBO_SEL_NUM = 141; -const ID_COMBO_SEL_STR = 142; -const ID_COMBO_CLEAR = 143; -const ID_COMBO_APPEND = 144; -const ID_COMBO_DELETE = 145; - -const ID_TEXT = 150; - -const ID_RADIOBOX = 160; -const ID_RADIOBOX_SEL_NUM = 161; -const ID_RADIOBOX_SEL_STR = 162; - -BEGIN_EVENT_TABLE(MyPanel, wxPanel) - EVT_SIZE ( MyPanel::OnSize) - EVT_LISTBOX (ID_LISTBOX, MyPanel::OnListBox) - EVT_BUTTON (ID_LISTBOX_SEL_NUM, MyPanel::OnListBoxButtons) - EVT_BUTTON (ID_LISTBOX_SEL_STR, MyPanel::OnListBoxButtons) - EVT_BUTTON (ID_LISTBOX_CLEAR, MyPanel::OnListBoxButtons) - EVT_BUTTON (ID_LISTBOX_APPEND, MyPanel::OnListBoxButtons) - EVT_BUTTON (ID_LISTBOX_DELETE, MyPanel::OnListBoxButtons) - EVT_CHOICE (ID_CHOICE, MyPanel::OnChoice) - EVT_BUTTON (ID_CHOICE_SEL_NUM, MyPanel::OnChoiceButtons) - EVT_BUTTON (ID_CHOICE_SEL_STR, MyPanel::OnChoiceButtons) - EVT_BUTTON (ID_CHOICE_CLEAR, MyPanel::OnChoiceButtons) - EVT_BUTTON (ID_CHOICE_APPEND, MyPanel::OnChoiceButtons) - EVT_BUTTON (ID_CHOICE_DELETE, MyPanel::OnChoiceButtons) - EVT_CHOICE (ID_COMBO, MyPanel::OnCombo) - EVT_BUTTON (ID_COMBO_SEL_NUM, MyPanel::OnComboButtons) - EVT_BUTTON (ID_COMBO_SEL_STR, MyPanel::OnComboButtons) - EVT_BUTTON (ID_COMBO_CLEAR, MyPanel::OnComboButtons) - EVT_BUTTON (ID_COMBO_APPEND, MyPanel::OnComboButtons) - EVT_BUTTON (ID_COMBO_DELETE, MyPanel::OnComboButtons) - EVT_RADIOBOX (ID_RADIOBOX, MyPanel::OnRadio) - EVT_BUTTON (ID_RADIOBOX_SEL_NUM, MyPanel::OnRadioButtons) - EVT_BUTTON (ID_RADIOBOX_SEL_STR, MyPanel::OnRadioButtons) -END_EVENT_TABLE() - -MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) : - wxPanel( frame, -1, wxPoint(x, y), wxSize(w, h) ) -{ - m_text = new wxTextCtrl( this, -1, "This is the log window.\n", wxPoint(0,50), wxSize(100,50), wxTE_MULTILINE ); - - m_notebook = new wxNotebook( this, ID_NOTEBOOK, wxPoint(0,0), wxSize(200,150) ); - - wxString choices[] = - { - "This", - "is a", - "wonderful", - "example.", - }; - - wxPanel *panel = new wxPanel(m_notebook); - m_listbox = new wxListBox( panel, ID_LISTBOX, wxPoint(10,10), wxSize(120,70), 4, choices ); - (void)new wxButton( panel, ID_LISTBOX_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(100,30) ); - (void)new wxButton( panel, ID_LISTBOX_SEL_STR, "Select 'This'", wxPoint(300,30), wxSize(100,30) ); - (void)new wxButton( panel, ID_LISTBOX_CLEAR, "Clear", wxPoint(180,80), wxSize(100,30) ); - (void)new wxButton( panel, ID_LISTBOX_APPEND, "Append 'Hi!'", wxPoint(300,80), wxSize(100,30) ); - (void)new wxButton( panel, ID_LISTBOX_DELETE, "Delete selected item", wxPoint(180,130), wxSize(140,30) ); - m_notebook->AddPage(panel, "wxList"); - - panel = new wxPanel(m_notebook); - m_choice = new wxChoice( panel, ID_CHOICE, wxPoint(10,10), wxSize(120,-1), 4, choices ); - (void)new wxButton( panel, ID_CHOICE_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(100,30) ); - (void)new wxButton( panel, ID_CHOICE_SEL_STR, "Select 'This'", wxPoint(300,30), wxSize(100,30) ); - (void)new wxButton( panel, ID_CHOICE_CLEAR, "Clear", wxPoint(180,80), wxSize(100,30) ); - (void)new wxButton( panel, ID_CHOICE_APPEND, "Append 'Hi!'", wxPoint(300,80), wxSize(100,30) ); - (void)new wxButton( panel, ID_CHOICE_DELETE, "Delete selected item", wxPoint(180,130), wxSize(140,30) ); - m_notebook->AddPage(panel, "wxChoice"); - - panel = new wxPanel(m_notebook); - m_combo = new wxComboBox( panel, ID_COMBO, "This", wxPoint(10,10), wxSize(170,-1), 4, choices ); - (void)new wxButton( panel, ID_COMBO_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(100,30) ); - (void)new wxButton( panel, ID_COMBO_SEL_STR, "Select 'This'", wxPoint(300,30), wxSize(100,30) ); - (void)new wxButton( panel, ID_COMBO_CLEAR, "Clear", wxPoint(180,80), wxSize(100,30) ); - (void)new wxButton( panel, ID_COMBO_APPEND, "Append 'Hi!'", wxPoint(300,80), wxSize(100,30) ); - (void)new wxButton( panel, ID_COMBO_DELETE, "Delete selected item", wxPoint(180,130), wxSize(140,30) ); - m_notebook->AddPage(panel, "wxComboBox"); - - wxTextCtrl *text = new wxTextCtrl( m_notebook, ID_TEXT, "Write text here.", wxPoint(10,10), wxSize(120,100), wxTE_MULTILINE ); - m_notebook->AddPage( text, "wxTextCtrl" ); - - panel = new wxPanel(m_notebook); - m_radio = new wxRadioBox( panel, ID_RADIOBOX, "This", wxPoint(10,10), wxSize(-1,-1), 4, choices ); - (void)new wxButton( panel, ID_RADIOBOX_SEL_NUM, "Select #2", wxPoint(200,30), wxSize(100,30) ); - (void)new wxButton( panel, ID_RADIOBOX_SEL_STR, "Select 'This'", wxPoint(200,80), wxSize(100,30) ); - m_notebook->AddPage(panel, "wxRadioBox"); -} - -void MyPanel::OnSize( wxSizeEvent& WXUNUSED(event) ) -{ - int x = 0; - int y = 0; - GetClientSize( &x, &y ); - - if (m_notebook) m_notebook->SetSize( 2, 2, x-4, y*2/3-4 ); - if (m_text) m_text->SetSize( 2, y*2/3+2, x-4, y/3-4 ); -} - -void MyPanel::OnListBox( wxCommandEvent &event ) -{ - m_text->WriteText( "ListBox selection string is: " ); - m_text->WriteText( event.GetString() ); - m_text->WriteText( "\n" ); -} - -void MyPanel::OnListBoxButtons( wxCommandEvent &event ) -{ - switch (event.GetId()) - { - case ID_LISTBOX_SEL_NUM: - { - m_listbox->SetSelection( 2 ); - break; - } - case ID_LISTBOX_SEL_STR: - { - m_listbox->SetStringSelection( "This" ); - break; - } - case ID_LISTBOX_CLEAR: - { - m_listbox->Clear(); - break; - } - case ID_LISTBOX_APPEND: - { - m_listbox->Append( "Hi!" ); - break; - } - case ID_LISTBOX_DELETE: - { - int idx = m_listbox->GetSelection(); - m_listbox->Delete( idx ); - break; - } - } -} - -void MyPanel::OnChoice( wxCommandEvent &event ) -{ - m_text->WriteText( "Choice selection string is: " ); - m_text->WriteText( event.GetString() ); - m_text->WriteText( "\n" ); -} - -void MyPanel::OnChoiceButtons( wxCommandEvent &event ) -{ - switch (event.GetId()) - { - case ID_CHOICE_SEL_NUM: - { - m_choice->SetSelection( 2 ); - break; - } - case ID_CHOICE_SEL_STR: - { - m_choice->SetStringSelection( "This" ); - break; - } - case ID_CHOICE_CLEAR: - { - m_choice->Clear(); - break; - } - case ID_CHOICE_APPEND: - { - m_choice->Append( "Hi!" ); - break; - } - case ID_CHOICE_DELETE: - { - int idx = m_choice->GetSelection(); - m_choice->Delete( idx ); - break; - } - } -} - -void MyPanel::OnCombo( wxCommandEvent &event ) -{ - m_text->WriteText( "ComboBox selection string is: " ); - m_text->WriteText( event.GetString() ); - m_text->WriteText( "\n" ); -} - -void MyPanel::OnComboButtons( wxCommandEvent &event ) -{ - switch (event.GetId()) - { - case ID_COMBO_SEL_NUM: - { - m_combo->SetSelection( 2 ); - break; - } - case ID_COMBO_SEL_STR: - { - m_combo->SetStringSelection( "This" ); - break; - } - case ID_COMBO_CLEAR: - { - m_combo->Clear(); - break; - } - case ID_COMBO_APPEND: - { - m_combo->Append( "Hi!" ); - break; - } - case ID_COMBO_DELETE: - { - int idx = m_combo->GetSelection(); - m_combo->Delete( idx ); - break; - } - } -} - -void MyPanel::OnRadio( wxCommandEvent &event ) -{ - m_text->WriteText( "RadioBox selection string is: " ); - m_text->WriteText( event.GetString() ); - m_text->WriteText( "\n" ); -} - -void MyPanel::OnRadioButtons( wxCommandEvent &event ) -{ - switch (event.GetId()) - { - case ID_RADIOBOX_SEL_NUM: - { - m_radio->SetSelection( 2 ); - break; - } - case ID_RADIOBOX_SEL_STR: - { - m_radio->SetStringSelection( "This" ); - break; - } - } -} - -//---------------------------------------------------------------------- -// MyFrame -//---------------------------------------------------------------------- - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(MINIMAL_QUIT, MyFrame::OnQuit) - EVT_MENU(MINIMAL_ABOUT, MyFrame::OnAbout) -END_EVENT_TABLE() - -MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h): - wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) -{ - (void)new MyPanel( this, 10, 10, 300, 100 ); -} - -void MyFrame::OnQuit (wxCommandEvent& WXUNUSED(event) ) -{ - Close(TRUE); -} - -void MyFrame::OnAbout( wxCommandEvent& WXUNUSED(event) ) -{ - wxMessageDialog dialog(this, "This is a control sample", "About Controls", wxOK ); - dialog.ShowModal(); -} - - diff --git a/samples/controls/controls.def b/samples/controls/controls.def deleted file mode 100644 index a6c3f21cf7..0000000000 --- a/samples/controls/controls.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME Controls -DESCRIPTION 'wxWindows controls sample' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 4048 -STACKSIZE 16000 diff --git a/samples/controls/controls.rc b/samples/controls/controls.rc deleted file mode 100644 index 7655c62a4c..0000000000 --- a/samples/controls/controls.rc +++ /dev/null @@ -1,3 +0,0 @@ -mondrian ICON "mondrian.ico" -#include "wx/msw/wx.rc" - diff --git a/samples/controls/makefile.b32 b/samples/controls/makefile.b32 deleted file mode 100644 index 783ce3b083..0000000000 --- a/samples/controls/makefile.b32 +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds controls example (DOS). - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXINC = $(WXDIR)\include\msw -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 ole2w32 - -TARGET=controls - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = controls.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -controls.obj: controls.$(SRCSUFF) - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - diff --git a/samples/controls/makefile.dos b/samples/controls/makefile.dos deleted file mode 100644 index 81466d023d..0000000000 --- a/samples/controls/makefile.dos +++ /dev/null @@ -1,65 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds controls example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\controls - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = controls.$(SRCSUFF) -OBJECTS = controls.obj - -all: controls.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -controls.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) controls.obj controls.def controls.res - link $(LINKFLAGS) @<< -controls.obj $(WXDIR)\src\msw\dummy.obj, -controls, -NUL, -$(LIBS), -controls.def -; -<< - rc -K controls.res - -controls.obj: controls.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -controls.res : controls.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include controls - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/controls/makefile.g95 b/samples/controls/makefile.g95 deleted file mode 100644 index 3d2f52233f..0000000000 --- a/samples/controls/makefile.g95 +++ /dev/null @@ -1,37 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for controls example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/controls.$(OBJSUFF) $(OBJDIR)/controls_resources.$(OBJSUFF) - -all: $(OBJDIR) controls$(GUISUFFIX)$(EXESUFF) - -wx: - -$(OBJDIR): - mkdir $(OBJDIR) - -controls$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o controls$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/controls.$(OBJSUFF): controls.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ controls.$(SRCSUFF) - -$(OBJDIR)/controls_resources.o: controls.rc - $(RESCOMP) -i controls.rc -o $(OBJDIR)/controls_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) controls$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/controls/makefile.nt b/samples/controls/makefile.nt deleted file mode 100644 index 3c3fb68cff..0000000000 --- a/samples/controls/makefile.nt +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds controls example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\controls -PROGRAM=controls - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/controls/mondrian.ico b/samples/controls/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/samples/controls/mondrian.ico and /dev/null differ diff --git a/samples/controls/mondrian.xpm b/samples/controls/mondrian.xpm deleted file mode 100644 index 409f27a843..0000000000 --- a/samples/controls/mondrian.xpm +++ /dev/null @@ -1,44 +0,0 @@ -/* XPM */ -static char *mondrian_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 6 1", -" c Black", -". c Blue", -"X c #00bf00", -"o c Red", -"O c Yellow", -"+ c Gray100", -/* pixels */ -" ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" " -}; diff --git a/samples/db/dbtest.cpp b/samples/db/dbtest.cpp deleted file mode 100644 index 165444a0ad..0000000000 --- a/samples/db/dbtest.cpp +++ /dev/null @@ -1,2041 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: dbtest.cpp -// Purpose: wxWindows database demo app -// Author: George Tasker -// Modified by: -// Created: 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Remstar International, Inc. -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -/* - * SYNOPSIS START - - This sample program demonstrates the cross-platform ODBC database classes - donated by the development team at Remstar International. - - The table this sample is based on is developer contact table, and shows - some of the simple uses of the database classes wxDB and wxTable. - - - - * SYNOPSIS END - */ - -#ifdef __GNUG__ -#pragma implementation "dbtest.h" -#endif - -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif //__BORLANDC__ - -#ifndef WX_PRECOMP -#include -#endif //WX_PRECOMP - -IMPLEMENT_APP(DatabaseDemoApp) - -#include // Included strictly for reading the text file with the database parameters - -#include // Required in the file which will get the data source connection -#include // Has the wxTable object from which all data objects will inherit their data table functionality - -extern DbList *PtrBegDbList; // from wx_db.cpp, used in getting back error results from db connections - -#include "dbtest.h" // Header file for this demonstration program -#include "listdb.h" // Code to support the "Lookup" button on the editor dialog -extern char ListDB_Selection[]; // Used to return the first column value for the selected line from the listDB routines -extern char ListDB_Selection2[]; // Used to return the second column value for the selected line from the listDB routines - -DatabaseDemoFrame *DemoFrame; // Pointer to the main frame - - -// This statement initializes the whole application and calls OnInit -DatabaseDemoApp DatabaseDemoApp; - - -/* Pointer to the main database connection used in the program. This - * pointer would normally be used for doing things as database lookups - * for user login names and passwords, getting workstation settings, etc. - * ---> IMPORTANT <--- - * - * For each database object created which uses this wxDB pointer - * connection to the database, when a CommitTrans() or RollBackTrans() - * will commit or rollback EVERY object which uses this wxDB pointer. - * - * To allow each table object (those derived from wxTable) to be - * individually committed or rolled back, you MUST use a different - * instance of wxDB in the constructor of the table. Doing so creates - * more overhead, and will use more database connections (some DBs have - * connection limits...), so use connections sparringly. - * - * It is recommended that one "main" database connection be created for - * the entire program to use for READ-ONLY database accesses, but for each - * table object which will do a CommitTrans() or RollbackTrans() that a - * new wxDB object be created and used for it. - */ -wxDB *READONLY_DB; - - -/* - * This function will return the exact string(s) from the database engine - * indicating all error conditions which have just occured during the - * last call to the database engine. - * - * This demo uses the returned string by displaying it in a wxMessageBox. The - * formatting therefore is not the greatest, but this is just a demo, not a - * finished product. :-) gt - * - * NOTE: The value returned by this function is for temporary use only and - * should be copied for long term use - */ -char *GetExtendedDBErrorMsg(char *ErrFile, int ErrLine) -{ - static wxString msg; - - wxString tStr; - - if (ErrFile || ErrLine) - { - msg += "\n"; - msg.Append ('-',80); - msg += "\nFile: "; - msg += ErrFile; - msg += " Line: "; - tStr.sprintf("%d",ErrLine); - msg += tStr.GetData(); - msg += "\n"; - } - - msg.Append ('-',80); - msg.Append ("\nODBC ERRORS\n"); - msg.Append ('-',80); - msg += "\n"; - // Scan through each database connection displaying - // any ODBC errors that have occured. - for (DbList *pDbList = PtrBegDbList; pDbList; pDbList = pDbList->PtrNext) - { - // Skip over any free connections - if (pDbList->Free) - continue; - // Display errors for this connection - for (int i = 0; i < DB_MAX_ERROR_HISTORY; i++) - { - if (pDbList->PtrDb->errorList[i]) - { - msg.Append(pDbList->PtrDb->errorList[i]); - if (strcmp(pDbList->PtrDb->errorList[i],"") != 0) - msg.Append("\n"); - } - } - } - msg += "\n"; - - return msg.GetData(); -} // GetExtendedDBErrorMsg - - - -// `Main program' equivalent, creating windows and returning main app frame -wxFrame *DatabaseDemoApp::OnInit(void) -{ - // Create the main frame window - DemoFrame = new DatabaseDemoFrame(NULL, "wxWindows Database Demo", 50, 50, 537, 480); - - // Give it an icon -#ifdef __WXMSW__ - DemoFrame->SetIcon(wxIcon("db_icon")); -#endif -#ifdef __X__ - DemoFrame->SetIcon(wxIcon("db.xbm")); -#endif - - // Make a menubar - wxMenu *file_menu = new wxMenu; - file_menu->Append(FILE_CREATE, "&Create contact table"); - file_menu->Append(FILE_EXIT, "E&xit"); - - wxMenu *edit_menu = new wxMenu; - edit_menu->Append(EDIT_PARAMETERS, "&Parameters..."); - - wxMenu *about_menu = new wxMenu; - about_menu->Append(ABOUT_DEMO, "&About"); - - wxMenuBar *menu_bar = new wxMenuBar; - menu_bar->Append(file_menu, "&File"); - menu_bar->Append(edit_menu, "&Edit"); - menu_bar->Append(about_menu, "&About"); - DemoFrame->SetMenuBar(menu_bar); - - // Initialize the ODBC Environment for Database Operations - if (SQLAllocEnv(&DbConnectInf.Henv) != SQL_SUCCESS) - { - wxMessageBox("A problem occured while trying to get a connection to the data source","DB CONNECTION ERROR",wxOK | wxICON_EXCLAMATION); - return NULL; - } - - FILE *paramFile; - if ((paramFile = fopen(paramFilename, "r")) == NULL) - { - wxString tStr; - tStr.sprintf("Unable to open the parameter file '%s' for reading.\n\nYou must specify the data source, user name, and\npassword that will be used and save those settings.",paramFilename); - wxMessageBox(tStr.GetData(),"File I/O Error...",wxOK | wxICON_EXCLAMATION); - DemoFrame->BuildParameterDialog(NULL); - if ((paramFile = fopen(paramFilename, "r")) == NULL) - return FALSE; - } - - char buffer[1000+1]; - fgets(buffer, sizeof(params.ODBCSource), paramFile); - buffer[strlen(buffer)-1] = '\0'; - strcpy(params.ODBCSource,buffer); - - fgets(buffer, sizeof(params.UserName), paramFile); - buffer[strlen(buffer)-1] = '\0'; - strcpy(params.UserName,buffer); - - fgets(buffer, sizeof(params.Password), paramFile); - buffer[strlen(buffer)-1] = '\0'; - strcpy(params.Password,buffer); - - fclose(paramFile); - - // Connect to datasource - strcpy(DbConnectInf.Dsn, params.ODBCSource); // ODBC data source name (created with ODBC Administrator under Win95/NT) - strcpy(DbConnectInf.Uid, params.UserName); // database username - must already exist in the data source - strcpy(DbConnectInf.AuthStr, params.Password); // password database username - READONLY_DB = GetDbConnection(&DbConnectInf); - if (READONLY_DB == 0) - { - wxMessageBox("Unable to connect to the data source.\n\nCheck the name of your data source to verify it has been correctly entered/spelled.\n\nWith some databases, the user name and password must\nbe created with full rights to the CONTACT table prior to making a connection\n(using tools provided by the database manufacturer)", "DB CONNECTION ERROR...",wxOK | wxICON_EXCLAMATION); - DemoFrame->BuildParameterDialog(NULL); - strcpy(DbConnectInf.Dsn, ""); - strcpy(DbConnectInf.Uid, ""); - strcpy(DbConnectInf.AuthStr, ""); - wxMessageBox("Now exiting program.\n\nRestart program to try any new settings.","Notice...",wxOK | wxICON_INFORMATION); - return(FALSE); - } - - DemoFrame->BuildEditorDialog(); - - // Show the frame - DemoFrame->Show(TRUE); - - // Return the main frame window - return DemoFrame; -} // DatabaseDemoApp::OnInit() - - - -// DatabaseDemoFrame constructor -DatabaseDemoFrame::DatabaseDemoFrame(wxFrame *frame, char *title, int x, int y, int w, int h): - wxFrame(frame, title, x, y, w, h) -{ -// Put any code in necessary for initializing the main frame here -} - - -// Intercept menu commands -void DatabaseDemoFrame::OnMenuCommand(int id) -{ - switch (id) - { - case FILE_CREATE: - CreateDataTable(); - break; - case FILE_EXIT: - Close(); - break; - case EDIT_PARAMETERS: - if ((pEditorDlg->mode != mCreate) && (pEditorDlg->mode != mEdit)) - BuildParameterDialog(this); - else - wxMessageBox("Cannot change database parameters while creating or editing a record","Notice...",wxOK | wxICON_INFORMATION); - break; - case ABOUT_DEMO: - wxMessageBox("wxWindows sample program for database classes\n\nContributed on 27 July 1998","About...",wxOK | wxICON_INFORMATION); - break; - } -} // DatabaseDemoFrame::OnMenuCommand() - - -Bool DatabaseDemoFrame::OnClose(void) -{ - // Put any additional checking necessary to make certain it is alright - // to close the program here that is not done elsewhere - - return TRUE; -} // DatabaseDemoFrame::OnClose() - - -void DatabaseDemoFrame::CreateDataTable() -{ - Bool Ok = (wxMessageBox("Any data currently residing in the table will be erased.\n\nAre you sure?","Confirm",wxYES_NO|wxICON_QUESTION) == wxYES); - - if (!Ok) - return; - - wxBeginBusyCursor(); - - Bool success = TRUE; - - Ccontact *Contact = new Ccontact(); - if (!Contact) - { - wxEndBusyCursor(); - wxMessageBox("Error allocating memory for 'Ccontact'object.\n\nTable was not created.","Error...",wxOK | wxICON_EXCLAMATION); - return; - } - - if (!Contact->CreateTable()) - { - wxEndBusyCursor(); - wxString tStr; - tStr = "Error creating CONTACTS table.\nTable was not created.\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); - wxMessageBox(tStr.GetData(),"ODBC Error...",wxOK | wxICON_EXCLAMATION); - success = FALSE; - } - else - { - if (!Contact->CreateIndexes()) - { - wxEndBusyCursor(); - wxString tStr; - tStr = "Error creating CONTACTS indexes.\nIndexes will be unavailable.\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); - wxMessageBox(tStr.GetData(),"ODBC Error...",wxOK | wxICON_EXCLAMATION); - success = FALSE; - } - } - wxEndBusyCursor(); - - delete Contact; - - if (success) - wxMessageBox("Table and index(es) were successfully created.","Notice...",wxOK | wxICON_INFORMATION); -} // DatabaseDemoFrame::CreateDataTable() - - -void DatabaseDemoFrame::BuildEditorDialog() -{ - pEditorDlg = new CeditorDlg(this); - if (!pEditorDlg) - wxMessageBox("Unable to create the editor dialog for some reason","Error...",wxOK | wxICON_EXCLAMATION); -} // DatabaseDemoFrame::BuildEditorDialog() - - -void DatabaseDemoFrame::BuildParameterDialog(wxWindow *parent) -{ - pParamDlg = new CparameterDlg(parent); - - if (!pParamDlg) - wxMessageBox("Unable to create the parameter dialog for some reason","Error...",wxOK | wxICON_EXCLAMATION); -} // DatabaseDemoFrame::BuildParameterDialog() - - -/* - * Constructor note: If no wxDB object is passed in, a new connection to the database - * is created for this instance of Ccontact. This can be a slow process depending - * on the database engine being used, and some database engines have a limit on the - * number of connections (either hard limits, or license restricted) so care should - * be used to use as few connections as is necessary. - * IMPORTANT: Objects which share a wxDB pointer are ALL acted upon whenever a member - * function of pDb is called (i.e. CommitTrans() or RollbackTrans(), so if modifying - * or creating a table objects which use the same pDb, know that all the objects - * will be committed or rolled back when any of the objects has this function call made. - */ -Ccontact::Ccontact (wxDB *pwxDB) : wxTable(pwxDB ? pwxDB : GetDbConnection(&DbConnectInf),CONTACT_TABLE_NAME,CONTACT_NO_COLS) -{ - // This is used to represent whether the database connection should be released - // when this instance of the object is deleted. If using the same connection - // for multiple instance of database objects, then the connection should only be - // released when the last database instance using the connection is deleted - freeDbConn = !pwxDB; - - SetupColumns(); - -} // Ccontact Constructor - - -void Ccontact::Initialize() -{ - Name[0] = 0; - Addr1[0] = 0; - Addr2[0] = 0; - City[0] = 0; - State[0] = 0; - PostalCode[0] = 0; - Country[0] = 0; - JoinDate.year = 1980; - JoinDate.month = 1; - JoinDate.day = 1; - JoinDate.hour = 0; - JoinDate.minute = 0; - JoinDate.second = 0; - JoinDate.fraction = 0; - NativeLanguage = langENGLISH; - IsDeveloper = FALSE; - Contributions = 0; - LinesOfCode = 0L; -} // Ccontact::Initialize - - -Ccontact::~Ccontact() -{ - if (freeDbConn) - { - if (!FreeDbConnection(pDb)) - { - wxString tStr; - tStr = "Unable to Free the Ccontact data table handle\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); - wxMessageBox(tStr.GetData(),"ODBC Error...",wxOK | wxICON_EXCLAMATION); - } - } -} // Ccontract destructor - - -/* - * Handles setting up all the connections for the interface from the wxTable - * functions to interface to the data structure used to store records in - * memory, and for all the column definitions that define the table structure - */ -void Ccontact::SetupColumns() -{ - SetColDefs ( 0,"NAME", DB_DATA_TYPE_VARCHAR, Name, SQL_C_CHAR, sizeof(Name), TRUE, TRUE); // Primary index - SetColDefs ( 1,"ADDRESS1", DB_DATA_TYPE_VARCHAR, Addr1, SQL_C_CHAR, sizeof(Addr1), FALSE,TRUE); - SetColDefs ( 2,"ADDRESS2", DB_DATA_TYPE_VARCHAR, Addr2, SQL_C_CHAR, sizeof(Addr2), FALSE,TRUE); - SetColDefs ( 3,"CITY", DB_DATA_TYPE_VARCHAR, City, SQL_C_CHAR, sizeof(City), FALSE,TRUE); - SetColDefs ( 4,"STATE", DB_DATA_TYPE_VARCHAR, State, SQL_C_CHAR, sizeof(State), FALSE,TRUE); - SetColDefs ( 5,"POSTAL_CODE", DB_DATA_TYPE_VARCHAR, PostalCode, SQL_C_CHAR, sizeof(PostalCode), FALSE,TRUE); - SetColDefs ( 6,"COUNTRY", DB_DATA_TYPE_VARCHAR, Country, SQL_C_CHAR, sizeof(Country), FALSE,TRUE); - SetColDefs ( 7,"JOIN_DATE", DB_DATA_TYPE_DATE, &JoinDate, SQL_C_TIMESTAMP, sizeof(JoinDate), FALSE,TRUE); - SetColDefs ( 8,"NATIVE_LANGUAGE", DB_DATA_TYPE_INTEGER, &NativeLanguage, SQL_C_ENUM, sizeof(NativeLanguage), FALSE,TRUE); - SetColDefs ( 9,"IS_DEVELOPER", DB_DATA_TYPE_INTEGER, &IsDeveloper, SQL_C_BOOLEAN, sizeof(Bool), FALSE,TRUE); - SetColDefs (10,"CONTRIBUTIONS", DB_DATA_TYPE_INTEGER, &Contributions, SQL_C_USHORT, sizeof(Contributions), FALSE,TRUE); - SetColDefs (11,"LINES_OF_CODE", DB_DATA_TYPE_INTEGER, &LinesOfCode, SQL_C_ULONG, sizeof(LinesOfCode), FALSE,TRUE); -} // Ccontact::SetupColumns - - -Bool Ccontact::CreateIndexes(void) -{ - // This index could easily be accomplished with an "orderBy" clause, - // but is done to show how to construct a non-primary index. - wxString indexName; - CidxDef idxDef[2]; - - Bool Ok = TRUE; - - strcpy(idxDef[0].ColName, "IS_DEVELOPER"); - idxDef[0].Ascending = TRUE; - - strcpy(idxDef[1].ColName, "NAME"); - idxDef[1].Ascending = TRUE; - - indexName = CONTACT_TABLE_NAME; - indexName += "_IDX1"; - Ok = CreateIndex(indexName.GetData(), TRUE, 2, idxDef); - - return Ok; -} // Ccontact::CreateIndexes() - - -/* - * Having a function to do a query on the primary key (and possibly others) is - * very efficient and tighter coding so that it is available where ever the object - * is. Great for use with multiple tables when not using views or outer joins - */ -Bool Ccontact::FetchByName(char *name) -{ - whereStr.sprintf("NAME = '%s'",name); - where = this->whereStr.GetData(); - orderBy = 0; - - if (!Query()) - return(FALSE); - - // Fetch the record - return(GetNext()); - -} // Ccontact::FetchByName() - - -/* - * - * ************* DIALOGS *************** - * - */ - - -/* CeditorDlg constructor - * - * Creates the dialog used for creating/editing/deleting/copying a Ccontact object. - * This dialog actually is drawn in the main frame of the program - * - * An instance of Ccontact is created - "Contact" - which is used to hold the Ccontact - * object that is currently being worked with. - */ -CeditorDlg::CeditorDlg(wxWindow *parent) : wxPanel (parent, 1, 1, 460, 455) -{ - // Since the ::OnCommand() function is overridden, this prevents the widget - // detection in ::OnCommand() until all widgets have been initialized to prevent - // uninitialized pointers from crashing the program - widgetPtrsSet = FALSE; - - // Create the data structure and a new database connection. - // (As there is not a pDb being passed in the constructor, a new database - // connection is created) - Contact = new Ccontact(); - - if (!Contact) - { - wxMessageBox("Unable to instantiate an instance of Ccontact","Error...",wxOK | wxICON_EXCLAMATION); - return; - } - - // Check if the table exists or not. If it doesn't, ask the user if they want to - // create the table. Continue trying to create the table until it exists, or user aborts - while (!Contact->pDb->TableExists((char *)CONTACT_TABLE_NAME)) - { - wxString tStr; - tStr.sprintf("Unable to open the table '%s'.\n\nTable may need to be created...?\n\n",CONTACT_TABLE_NAME); - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); - wxMessageBox(tStr.GetData(),"ODBC Error...",wxOK | wxICON_EXCLAMATION); - - Bool createTable = (wxMessageBox("Do you wish to try to create/clear the CONTACTS table?","Confirm",wxYES_NO|wxICON_QUESTION) == wxYES); - - if (!createTable) - { - delete Contact; - Close(); - DemoFrame->Close(); - return; - } - else - DemoFrame->CreateDataTable(); - } - - // Tables must be "opened" before anything other than creating/deleting table can be done - if (!Contact->Open()) - { - // Table does exist, there was some problem opening it. Currently this should - // never fail, except in the case of the table not exisiting. Open() basically - // only sets up variable/pointer values, other than checking for table existence. - if (Contact->pDb->TableExists((char *)CONTACT_TABLE_NAME)) - { - wxString tStr; - tStr.sprintf("Unable to open the table '%s'.\n\n",CONTACT_TABLE_NAME); - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); - wxMessageBox(tStr.GetData(),"ODBC Error...",wxOK | wxICON_EXCLAMATION); - delete Contact; - Close(); - DemoFrame->Close(); - return; - } - } - - // Build the dialog - SetLabelPosition(wxHORIZONTAL); - - wxFont *ButtonFont = new wxFont(12,wxSWISS,wxNORMAL,wxBOLD); - wxFont *TextFont = new wxFont(12,wxSWISS,wxNORMAL,wxNORMAL); - - SetButtonFont(ButtonFont); - SetLabelFont(TextFont); - SetLabelPosition(wxVERTICAL); - - wxGroupBox *FunctionGrp = new wxGroupBox(this, "", 15, 1, 497, 69, 0, "FunctionGrp"); - wxGroupBox *SearchGrp = new wxGroupBox(this, "", 417, 1, 95, 242, 0, "SearchGrp"); - - pCreateBtn = new wxButton(this, NULL, "&Create", 25, 21, 70, 35, 0, "CreateBtn"); - pEditBtn = new wxButton(this, NULL, "&Edit", 102, 21, 70, 35, 0, "EditBtn"); - pDeleteBtn = new wxButton(this, NULL, "&Delete", 179, 21, 70, 35, 0, "DeleteBtn"); - pCopyBtn = new wxButton(this, NULL, "Cop&y", 256, 21, 70, 35, 0, "CopyBtn"); - pSaveBtn = new wxButton(this, NULL, "&Save", 333, 21, 70, 35, 0, "SaveBtn"); - pCancelBtn = new wxButton(this, NULL, "C&ancel", 430, 21, 70, 35, 0, "CancelBtn"); - - pPrevBtn = new wxButton(this, NULL, "<< &Prev",430, 81, 70, 35, 0, "PrevBtn"); - pNextBtn = new wxButton(this, NULL, "&Next >>",430, 121, 70, 35, 0, "NextBtn"); - pQueryBtn = new wxButton(this, NULL, "&Query", 430, 161, 70, 35, 0, "QueryBtn"); - pResetBtn = new wxButton(this, NULL, "&Reset", 430, 200, 70, 35, 0, "ResetBtn"); - - pNameMsg = new wxMessage(this, "Name:", 17, 80, -1, -1, 0, "NameMsg"); - pNameTxt = new wxText(this, NULL, "", "", 17, 97, 308, 25, 0, "NameTxt"); - pNameListBtn = new wxButton(this, NULL, "&Lookup", 333, 99, 70, 24, 0, "LookupBtn"); - - pAddress1Msg = new wxMessage(this, "Address:", 17, 130, -1, -1, 0, "Address1Msg"); - pAddress1Txt = new wxText(this, NULL, "", "", 17, 147, 308, 25, 0, "Address1Txt"); - - pAddress2Msg = new wxMessage(this, "Address:", 17, 180, -1, -1, 0, "Address2Msg"); - pAddress2Txt = new wxText(this, NULL, "", "", 17, 197, 308, 25, 0, "Address2Txt"); - - pCityMsg = new wxMessage(this, "City:", 17, 230, -1, -1, 0, "CityMsg"); - pCityTxt = new wxText(this, NULL, "", "", 17, 247, 225, 25, 0, "CityTxt"); - - pStateMsg = new wxMessage(this, "State:", 250, 230, -1, -1, 0, "StateMsg"); - pStateTxt = new wxText(this, NULL, "", "", 250, 247, 153, 25, 0, "StateTxt"); - - pCountryMsg = new wxMessage(this, "Country:", 17, 280, -1, -1, 0, "CountryMsg"); - pCountryTxt = new wxText(this, NULL, "", "", 17, 297, 225, 25, 0, "CountryTxt"); - - pPostalCodeMsg = new wxMessage(this, "Postal Code:", 250, 280, -1, -1, 0, "PostalCodeMsg"); - pPostalCodeTxt = new wxText(this, NULL, "", "", 250, 297, 153, 25, 0, "PostalCodeTxt"); - - char *choice_strings[5]; - choice_strings[0] = "English"; - choice_strings[1] = "French"; - choice_strings[2] = "German"; - choice_strings[3] = "Spanish"; - choice_strings[4] = "Other"; - pNativeLangChoice = new wxChoice(this, NULL, "",17, 346, 277, -1, 5, choice_strings); - pNativeLangMsg = new wxMessage(this, "Native language:", 17, 330, -1, -1, 0, "NativeLangMsg"); - - char *radio_strings[2]; - radio_strings[0] = "No"; - radio_strings[1] = "Yes"; - pDeveloperRadio = new wxRadioBox(this,NULL,"Developer:",303,330,-1,-1,2,radio_strings,2,wxHORIZONTAL|wxFLAT); - - pJoinDateMsg = new wxMessage(this, "Date joined:", 17, 380, -1, -1, 0, "JoinDateMsg"); - pJoinDateTxt = new wxText(this, NULL, "", "", 17, 397, 150, 25, 0, "JoinDateTxt"); - - pContribMsg = new wxMessage(this, "Contributions:", 175, 380, -1, -1, 0, "ContribMsg"); - pContribTxt = new wxText(this, NULL, "", "", 175, 397, 120, 25, 0, "ContribTxt"); - - pLinesMsg = new wxMessage(this, "Lines of code:", 303, 380, -1, -1, 0, "LinesMsg"); - pLinesTxt = new wxText(this, NULL, "", "", 303, 397, 100, 25, 0, "LinesTxt"); - - // Now that all the widgets on the panel are created, its safe to allow ::OnCommand() to - // handle all widget processing - widgetPtrsSet = TRUE; - - // Setup the orderBy and where clauses to return back a single record as the result set, - // as there will only be one record being shown on the dialog at a time, this optimizes - // network traffic by only returning a one row result - - Contact->orderBy = "NAME"; // field name to sort by - - // The wxString "whereStr" is not a member of the wxTable object, it is a member variable - // specifically in the Ccontact class. It is used here for simpler construction of a varying - // length string, and then after the string is built, the wxTable member variable "where" is - // assigned the pointer to the constructed string. - // - // The constructed where clause below has a sub-query within it "SELECT MIN(NAME) FROM %s" - // to achieve a single row (in this case the first name in alphabetical order). - Contact->whereStr.sprintf("NAME = (SELECT MIN(NAME) FROM %s)",Contact->tableName); - - // NOTE: GetData() returns a pointer which may not be valid later, so this is short term use only - Contact->where = Contact->whereStr.GetData(); - - // Perform the Query to get the result set. - // NOTE: If there are no rows returned, that is a valid result, so Query() would return TRUE. - // Only if there is a database error will Query() come back as FALSE - if (!Contact->Query()) - { - wxString tStr; - tStr = "ODBC error during Query()\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); - wxMessageBox(tStr.GetData(),"ODBC Error...",wxOK | wxICON_EXCLAMATION); - GetParent()->Close(); - return; - } - - // Since Query succeeded, now get the row that was returned - if (!Contact->GetNext()) - // If the GetNext() failed at this point, then there are no rows to retrieve, - // so clear the values in the members of "Contact" so that PutData() blanks the - // widgets on the dialog - Contact->Initialize(); - - SetMode(mView); - PutData(); - - Show(TRUE); -} // CeditorDlg constructor - - -Bool CeditorDlg::OnClose() -{ - // Clean up time - if ((mode != mCreate) && (mode != mEdit)) - { - if (Contact) - delete Contact; - return TRUE; - } - else - { - wxMessageBox("Must finish processing the current record being created/modified before exiting","Notice...",wxOK | wxICON_INFORMATION); - return FALSE; - } -} // CeditorDlg::OnClose() - - -void CeditorDlg::OnCommand(wxWindow& win, wxCommandEvent& event) -{ - wxString widgetName; - - widgetName = win.GetName(); - - if (!widgetPtrsSet) - return; - - if (widgetName == pCreateBtn->GetName()) - { - Contact->Initialize(); - PutData(); - SetMode( mCreate ); - pNameTxt->SetValue(""); - pNameTxt->SetFocus(); - return; - } - - if (widgetName == pEditBtn->GetName()) - { - saveName = Contact->Name; - SetMode( mEdit ); - pNameTxt->SetFocus(); - return; - } - - if (widgetName == pCopyBtn->GetName()) - { - SetMode(mCreate); - pNameTxt->SetValue(""); - pNameTxt->SetFocus(); - return; - } - - if (widgetName == pDeleteBtn->GetName()) - { - Bool Ok = (wxMessageBox("Are you sure?","Confirm",wxYES_NO|wxICON_QUESTION) == wxYES); - - if (!Ok) - return; - - if (Ok && Contact->Delete()) - { - // NOTE: Deletions are not finalized until a CommitTrans() is performed. - // If the commit were not performed, the program will continue to - // show the table contents as if they were deleted until this instance - // of Ccontact is deleted. If the Commit wasn't performed, the - // database will automatically Rollback the changes when the database - // connection is terminated - Contact->pDb->CommitTrans(); - - // Try to get the row that followed the just deleted row in the orderBy sequence - if (!GetNextRec()) - { - // There was now row (in sequence) after the just deleted row, so get the - // row which preceded the just deleted row - if (!GetPrevRec()) - { - // There are now no rows remaining, so clear the dialog widgets - Contact->Initialize(); - PutData(); - } - } - SetMode(mode); // force reset of button enable/disable - } - else - // Delete failed - Contact->pDb->RollbackTrans(); - - SetMode(mView); - return; - } - - if (widgetName == pSaveBtn->GetName()) - { - Save(); - return; - } - - if (widgetName == pCancelBtn->GetName()) - { - Bool Ok = (wxMessageBox("Are you sure?","Confirm",wxYES_NO|wxICON_QUESTION) == wxYES); - - if (!Ok) - return; - - if (!strcmp(saveName.GetData(),"")) - { - Contact->Initialize(); - PutData(); - SetMode(mView); - return; - } - else - { - // Requery previous record - if (Contact->FetchByName(saveName.GetData())) - { - PutData(); - SetMode(mView); - return; - } - } - - // Previous record not available, retrieve first record in table - Contact->whereStr = "NAME = (SELECT MIN(NAME) FROM "; - Contact->whereStr += Contact->tableName; - Contact->whereStr += ")"; - - Contact->where = Contact->whereStr.GetData(); - if (!Contact->Query()) - { - wxString tStr; - tStr = "ODBC error during Query()\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); - wxMessageBox(tStr.GetData(),"ODBC Error...",wxOK | wxICON_EXCLAMATION); - SetMode(mView); - return; - } - if (Contact->GetNext()) // Successfully read first record - { - PutData(); - SetMode(mView); - return; - } - // No contacts are available, clear dialog - Contact->Initialize(); - PutData(); - SetMode(mView); - return; - } // Cancel Button - - if (widgetName == pPrevBtn->GetName()) - { - if (!GetPrevRec()) - wxBell(); - return; - } // Prev Button - - if (widgetName == pNextBtn->GetName()) - { - if (!GetNextRec()) - wxBell(); - return; - } // Next Button - - if (widgetName == pQueryBtn->GetName()) - { - // Display the query dialog box - char qryWhere[DB_MAX_WHERE_CLAUSE_LEN+1]; - strcpy(qryWhere, Contact->qryWhereStr.GetData()); - char *tblName[] = {(char *)CONTACT_TABLE_NAME, 0}; - new CqueryDlg(GetParent(), Contact->pDb, tblName, qryWhere); - - // Query the first record in the new record set and - // display it, if the query string has changed. - if (strcmp(qryWhere, Contact->qryWhereStr.GetData())) - { - Contact->orderBy = "NAME"; - Contact->whereStr = "NAME = (SELECT MIN(NAME) FROM "; - Contact->whereStr += CONTACT_TABLE_NAME; - // Append the query where string (if there is one) - Contact->qryWhereStr = qryWhere; - if (strlen(qryWhere)) - { - Contact->whereStr += " WHERE "; - Contact->whereStr += Contact->qryWhereStr; - } - // Close the expression with a right paren - Contact->whereStr += ")"; - // Requery the table - Contact->where = Contact->whereStr.GetData(); - if (!Contact->Query()) - { - wxString tStr; - tStr = "ODBC error during Query()\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); - wxMessageBox(tStr.GetData(),"ODBC Error...",wxOK | wxICON_EXCLAMATION); - return; - } - // Display the first record from the query set - if (!Contact->GetNext()) - Contact->Initialize(); - PutData(); - } - - // Enable/Disable the reset button - pResetBtn->Enable(!Contact->qryWhereStr.Empty()); - - return; - } // Query button - - - if (widgetName == pResetBtn->GetName()) - { - // Clear the additional where criteria established by the query feature - Contact->qryWhereStr = ""; - - // Query the first record in the table - Contact->orderBy = "NAME"; - Contact->whereStr = "NAME = (SELECT MIN(NAME) FROM "; - Contact->whereStr += CONTACT_TABLE_NAME; - Contact->whereStr += ")"; - Contact->where = Contact->whereStr.GetData(); - if (!Contact->Query()) - { - wxString tStr; - tStr = "ODBC error during Query()\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); - wxMessageBox(tStr.GetData(),"ODBC Error...",wxOK | wxICON_EXCLAMATION); - return; - } - if (!Contact->GetNext()) - Contact->Initialize(); - PutData(); - pResetBtn->Enable(FALSE); - - return; - } // Reset button - - - if (widgetName == pNameListBtn->GetName()) - { - new ClookUpDlg(/* wxWindow *parent */ this, - /* char *windowTitle */ "Select contact name", - /* char *tableName */ (char *) CONTACT_TABLE_NAME, - /* char *dispCol1 */ "NAME", - /* char *dispCol2 */ "JOIN_DATE", - /* char *where */ "", - /* char *orderBy */ "NAME", - /* Bool distinctValues */ TRUE); - - if (ListDB_Selection && strlen(ListDB_Selection)) - { - wxString w = "NAME = '"; - w += ListDB_Selection; - w += "'"; - GetRec(w.GetData()); - } - - return; - } - -} // CeditorDlg::OnCommand() - - -void CeditorDlg::FieldsEditable() -{ - pNameTxt->Enable((mode == mCreate) || (mode == mEdit)); - pAddress1Txt->Enable((mode == mCreate) || (mode == mEdit)); - pAddress2Txt->Enable((mode == mCreate) || (mode == mEdit)); - pCityTxt->Enable((mode == mCreate) || (mode == mEdit)); - pStateTxt->Enable((mode == mCreate) || (mode == mEdit)); - pPostalCodeTxt->Enable((mode == mCreate) || (mode == mEdit)); - pCountryTxt->Enable((mode == mCreate) || (mode == mEdit)); - - pJoinDateTxt->Enable((mode == mCreate) || (mode == mEdit)); - pContribTxt->Enable((mode == mCreate) || (mode == mEdit)); - pLinesTxt->Enable((mode == mCreate) || (mode == mEdit)); - pNativeLangChoice->Enable((mode == mCreate) || (mode == mEdit)); - pDeveloperRadio->Enable((mode == mCreate) || (mode == mEdit)); - -} // CeditorDlg::FieldsEditable() - - -void CeditorDlg::SetMode(enum DialogModes m) -{ - Bool edit = FALSE; - - mode = m; - switch (mode) - { - case mCreate: - case mEdit: - edit = TRUE; - break; - case mView: - case mSearch: - edit = FALSE; - break; - default: - break; - }; - - if (widgetPtrsSet) - { - pCreateBtn->Enable( !edit ); - pEditBtn->Enable( !edit && (strcmp(Contact->Name,"")!=0) ); - pDeleteBtn->Enable( !edit && (strcmp(Contact->Name,"")!=0) ); - pCopyBtn->Enable( !edit && (strcmp(Contact->Name,"")!=0) ); - pSaveBtn->Enable( edit ); - pCancelBtn->Enable( edit ); - pPrevBtn->Enable( !edit ); - pNextBtn->Enable( !edit ); - pQueryBtn->Enable( !edit ); - pResetBtn->Enable( !edit && !Contact->qryWhereStr.Empty() ); - pNameListBtn->Enable( !edit ); - } - - FieldsEditable(); -} // CeditorDlg::SetMode() - - -Bool CeditorDlg::PutData() -{ - wxString tStr; - - pNameTxt->SetValue(Contact->Name); - pAddress1Txt->SetValue(Contact->Addr1); - pAddress2Txt->SetValue(Contact->Addr2); - pCityTxt->SetValue(Contact->City); - pStateTxt->SetValue(Contact->State); - pCountryTxt->SetValue(Contact->Country); - pPostalCodeTxt->SetValue(Contact->PostalCode); - - tStr.sprintf("%d/%d/%d",Contact->JoinDate.month,Contact->JoinDate.day,Contact->JoinDate.year); - pJoinDateTxt->SetValue(tStr.GetData()); - - tStr.sprintf("%d",Contact->Contributions); - pContribTxt->SetValue(tStr.GetData()); - - tStr.sprintf("%lu",Contact->LinesOfCode); - pLinesTxt->SetValue(tStr.GetData()); - - pNativeLangChoice->SetSelection(Contact->NativeLanguage); - - pDeveloperRadio->SetSelection(Contact->IsDeveloper); - - return TRUE; -} // Ceditor::PutData() - - -/* - * Reads the data out of all the widgets on the dialog. Some data evaluation is done - * to ensure that there is a name entered and that the date field is valid. - * - * A return value of TRUE means that valid data was retrieved from the dialog, otherwise - * invalid data was found (and a message was displayed telling the user what to fix), and - * the data was not placed into the appropraite fields of Ccontact - */ -Bool CeditorDlg::GetData() -{ - // Validate that the data currently entered into the widgets is valid data - - wxString tStr; - tStr = pNameTxt->GetValue(); - if (!strcmp(tStr.GetData(),"")) - { - wxMessageBox("A name is required for entry into the contact table","Notice...",wxOK | wxICON_INFORMATION); - return FALSE; - } - - Bool invalid = FALSE; - int mm,dd,yyyy; - int first, second; - - tStr = pJoinDateTxt->GetValue(); - if (tStr.Freq('/') != 2) - invalid = TRUE; - - // Find the month, day, and year tokens - if (!invalid) - { - first = tStr.First('/'); - second = tStr.Last('/'); - - mm = atoi(tStr.SubString(0,first)); - dd = atoi(tStr.SubString(first+1,second)); - yyyy = atoi(tStr.SubString(second+1,tStr.Length()-1)); - - invalid = !(mm && dd && yyyy); - } - - // Force Year 2000 compliance - if (!invalid && (yyyy < 1000)) - invalid = TRUE; - - // Check the token ranges for validity - if (!invalid) - { - if (yyyy > 9999) - invalid = TRUE; - else if ((mm < 1) || (mm > 12)) - invalid = TRUE; - else - { - if (dd < 1) - invalid = TRUE; - else - { - int days[12] = {31,28,31,30,31,30, - 31,31,30,31,30,31}; - if (dd > days[mm-1]) - { - invalid = TRUE; - if ((dd == 29) && (mm == 2)) - { - if (((yyyy % 4) == 0) && (((yyyy % 100) != 0) || ((yyyy % 400) == 0))) - invalid = FALSE; - } - } - } - } - } - - if (!invalid) - { - Contact->JoinDate.month = mm; - Contact->JoinDate.day = dd; - Contact->JoinDate.year = yyyy; - } - else - { - wxMessageBox("Improper date format. Please check the date\nspecified and try again.\n\nNOTE: Dates are in american format (MM/DD/YYYY)","Notice...",wxOK | wxICON_INFORMATION); - return FALSE; - } - - tStr = pNameTxt->GetValue(); - strcpy(Contact->Name,tStr.GetData()); - strcpy(Contact->Addr1,pAddress1Txt->GetValue()); - strcpy(Contact->Addr2,pAddress2Txt->GetValue()); - strcpy(Contact->City,pCityTxt->GetValue()); - strcpy(Contact->State,pStateTxt->GetValue()); - strcpy(Contact->Country,pCountryTxt->GetValue()); - strcpy(Contact->PostalCode,pPostalCodeTxt->GetValue()); - - Contact->Contributions = atoi(pContribTxt->GetValue()); - Contact->LinesOfCode = atol(pLinesTxt->GetValue()); - - Contact->NativeLanguage = (enum Language) pNativeLangChoice->GetSelection(); - Contact->IsDeveloper = pDeveloperRadio->GetSelection(); - - return TRUE; -} // CeditorDlg::GetData() - - -/* - * Retrieve data from the dialog, verify the validity of the data, and if it is valid, - * try to insert/update the data to the table based on the current 'mode' the dialog - * is set to. - * - * A return value of TRUE means the insert/update was completed successfully, a return - * value of FALSE means that Save() failed. If returning FALSE, then this function - * has displayed a detailed error message for the user. - */ -Bool CeditorDlg::Save() -{ - Bool failed = FALSE; - - // Read the data in the widgets of the dialog to get the user's data - if (!GetData()) - failed = TRUE; - - // Perform any other required validations necessary before saving - - - if (!failed) - { - wxBeginBusyCursor(); - - if (mode == mCreate) - { - RETCODE result = Contact->Insert(); - - failed = (result != DB_SUCCESS); - if (failed) - { - // Some errors may be expected, like a duplicate key, so handle those instances with - // specific error messages. - if (result == DB_ERR_INTEGRITY_CONSTRAINT_VIOL) - { - wxString tStr; - tStr = "A duplicate key value already exists in the table.\nUnable to save record\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); - wxMessageBox(tStr.GetData(),"ODBC Error...",wxOK | wxICON_EXCLAMATION); - } - else - { - // Some other unexpexted error occurred - wxString tStr; - tStr = "Database insert failed\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); - wxMessageBox(tStr.GetData(),"ODBC Error...",wxOK | wxICON_EXCLAMATION); - } - } - } - else // mode == mEdit - { - if (!Contact->Update()) - { - wxString tStr; - tStr = "Database update failed\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); - wxMessageBox(tStr.GetData(),"ODBC Error...",wxOK | wxICON_EXCLAMATION); - failed = TRUE; - } - } - - if (!failed) - { - Contact->pDb->CommitTrans(); - SetMode(mView); // Sets the dialog mode back to viewing after save is successful - } - else - Contact->pDb->RollbackTrans(); - - wxEndBusyCursor(); - } - - return !failed; -} // CeditorDlg::Save() - - -/* - * Where this program is only showing a single row at a time in the dialog, - * a special where clause must be built to find just the single row which, - * in sequence, would follow the currently displayed row. - */ -Bool CeditorDlg::GetNextRec() -{ - wxString w; - - w = "NAME = (SELECT MIN(NAME) FROM "; - w += Contact->tableName; - w += " WHERE NAME > '"; - w += Contact->Name; - w += "'"; - - // If a query where string is currently set, append that criteria - if (!Contact->qryWhereStr.Empty()) - { - w += " AND ("; - w += Contact->qryWhereStr; - w += ")"; - } - - w += ")"; - - return(GetRec(w.GetData())); - -} // CeditorDlg::GetNextRec() - - -/* - * Where this program is only showing a single row at a time in the dialog, - * a special where clause must be built to find just the single row which, - * in sequence, would precede the currently displayed row. - */ -Bool CeditorDlg::GetPrevRec() -{ - wxString w; - - w = "NAME = (SELECT MAX(NAME) FROM "; - w += Contact->tableName; - w += " WHERE NAME < '"; - w += Contact->Name; - w += "'"; - - // If a query where string is currently set, append that criteria - if (!Contact->qryWhereStr.Empty()) - { - w += " AND ("; - w += Contact->qryWhereStr; - w += ")"; - } - - w += ")"; - - return(GetRec(w.GetData())); - -} // CeditorDlg::GetPrevRec() - - -/* - * This function is here to avoid duplicating this same code in both the - * GetPrevRec() and GetNextRec() functions - */ -Bool CeditorDlg::GetRec(char *whereStr) -{ - Contact->where = whereStr; - Contact->orderBy = "NAME"; - - if (!Contact->Query()) - { - wxString tStr; - tStr = "ODBC error during Query()\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); - wxMessageBox(tStr.GetData(),"ODBC Error...",wxOK | wxICON_EXCLAMATION); - - return(FALSE); - } - - if (Contact->GetNext()) - { - PutData(); - return(TRUE); - } - else - return(FALSE); -} // CeditorDlg::GetRec() - - - -/* - * CparameterDlg constructor - */ -CparameterDlg::CparameterDlg(wxWindow *parent) : wxDialogBox (parent, "ODBC parameter settings", 1, -1, -1, 400, 275) -{ - // Since the ::OnCommand() function is overridden, this prevents the widget - // detection in ::OnCommand() until all widgets have been initialized to prevent - // uninitialized pointers from crashing the program - widgetPtrsSet = FALSE; - - // Build the dialog - SetLabelPosition(wxVERTICAL); - - wxFont *ButtonFont = new wxFont(12,wxSWISS,wxNORMAL,wxBOLD); - wxFont *TextFont = new wxFont(12,wxSWISS,wxNORMAL,wxNORMAL); - - SetButtonFont(ButtonFont); - SetLabelFont(TextFont); - SetLabelPosition(wxVERTICAL); - - pParamODBCSourceMsg = new wxMessage(this, "ODBC data sources:", 10, 10, -1, -1, 0, "ParamODBCSourceMsg"); - pParamODBCSourceList = new wxListBox(this, NULL, "", wxSINGLE|wxALWAYS_SB, 10, 29, 285, 150, 0, 0, 0, "ParamODBCSourceList"); - - pParamUserNameMsg = new wxMessage(this, "Database user name:", 10, 193, -1, -1, 0, "ParamUserNameMsg"); - pParamUserNameTxt = new wxText(this, NULL, "", "", 10, 209, 140, 25, 0, "ParamUserNameTxt"); - - pParamPasswordMsg = new wxMessage(this, "Password:", 156, 193, -1, -1, 0, "ParamPasswordMsg"); - pParamPasswordTxt = new wxText(this, NULL, "", "", 156, 209, 140, 25, 0, "ParamPasswordTxt"); - - pParamSaveBtn = new wxButton(this, NULL, "&Save", 310, 21, 70, 35, 0, "ParamSaveBtn"); - pParamCancelBtn = new wxButton(this, NULL, "C&ancel", 310, 66, 70, 35, 0, "ParamCancelBtn"); - - // Now that all the widgets on the panel are created, its safe to allow ::OnCommand() to - // handle all widget processing - widgetPtrsSet = TRUE; - - saved = FALSE; - savedParamSettings = DatabaseDemoApp.params; - - Centre(wxBOTH); - PutData(); - Show(TRUE); -} // CparameterDlg constructor - - -Bool CparameterDlg::OnClose() -{ - // Put any additional checking necessary to make certain it is alright - // to close the program here that is not done elsewhere - if (!saved) - { - Bool Ok = (wxMessageBox("No changes have been saved.\n\nAre you sure you wish exit the parameter screen?","Confirm",wxYES_NO|wxICON_QUESTION) == wxYES); - - if (!Ok) - return FALSE; - - DatabaseDemoApp.params = savedParamSettings; - } - - if (GetParent() != NULL) - GetParent()->SetFocus(); - return TRUE; -} // Cparameter::OnClose() - - -void CparameterDlg::OnCommand(wxWindow& win, wxCommandEvent& event) -{ - wxString widgetName; - - widgetName = win.GetName(); - - if (!widgetPtrsSet) - return; - - if (widgetName == pParamSaveBtn->GetName()) - { - if (Save()) - { - wxString tStr; - tStr = "Database parameters have been saved."; - if (GetParent() != NULL) // The parameter dialog was not called during startup due to a missing cfg file - tStr += "\nNew parameters will take effect the next time the program is started."; - wxMessageBox(tStr.GetData(),"Notice...",wxOK | wxICON_INFORMATION); - saved = TRUE; - Close(); - } - return; - } - - if (widgetName == pParamCancelBtn->GetName()) - { - Close(); - return; - } -} // CparameterDlg::OnCommand() - - -Bool CparameterDlg::PutData() -{ - // Fill the data source list box - FillDataSourceList(); - - // Fill in the fields from the params object - pParamODBCSourceList->SetStringSelection(DatabaseDemoApp.params.ODBCSource); - pParamUserNameTxt->SetValue(DatabaseDemoApp.params.UserName); - pParamPasswordTxt->SetValue(DatabaseDemoApp.params.Password); - return TRUE; -} // CparameterDlg::PutData() - - -Bool CparameterDlg::GetData() -{ - wxString tStr; - if (pParamODBCSourceList->GetStringSelection()) - { - tStr = pParamODBCSourceList->GetStringSelection(); - if (tStr.Length() > (sizeof(DatabaseDemoApp.params.ODBCSource)-1)) - { - wxString errmsg; - errmsg.sprintf("ODBC Data source name is longer than the data structure to hold it.\n'Cparameter.ODBCSource' must have a larger character array\nto handle a data source with this long of a name\n\nThe data source currently selected is %d characters long.",tStr.Length()); - wxMessageBox(errmsg.GetData(),"Internal program error...",wxOK | wxICON_EXCLAMATION); - return FALSE; - } - strcpy(DatabaseDemoApp.params.ODBCSource, tStr.GetData()); - } - else - return FALSE; - - tStr = pParamUserNameTxt->GetValue(); - if (tStr.Length() > (sizeof(DatabaseDemoApp.params.UserName)-1)) - { - wxString errmsg; - errmsg.sprintf("User name is longer than the data structure to hold it.\n'Cparameter.UserName' must have a larger character array\nto handle a data source with this long of a name\n\nThe user name currently specified is %d characters long.",tStr.Length()); - wxMessageBox(errmsg.GetData(),"Internal program error...",wxOK | wxICON_EXCLAMATION); - return FALSE; - } - strcpy(DatabaseDemoApp.params.UserName, tStr.GetData()); - - tStr = pParamPasswordTxt->GetValue(); - if (tStr.Length() > (sizeof(DatabaseDemoApp.params.Password)-1)) - { - wxString errmsg; - errmsg.sprintf("Password is longer than the data structure to hold it.\n'Cparameter.Password' must have a larger character array\nto handle a data source with this long of a name\n\nThe password currently specified is %d characters long.",tStr.Length()); - wxMessageBox(errmsg.GetData(),"Internal program error...",wxOK | wxICON_EXCLAMATION); - return FALSE; - } - strcpy(DatabaseDemoApp.params.Password,tStr.GetData()); - return TRUE; -} // CparameterDlg::GetData() - - -Bool CparameterDlg::Save() -{ - Cparameters saveParams = DatabaseDemoApp.params; - if (!GetData()) - { - DatabaseDemoApp.params = saveParams; - return FALSE; - } - - FILE *paramFile; - if ((paramFile = fopen(paramFilename, "wt")) == NULL) - { - wxString tStr; - tStr.sprintf("Unable to write/overwrite '%s'.",paramFilename); - wxMessageBox(tStr.GetData(),"File I/O Error...",wxOK | wxICON_EXCLAMATION); - return FALSE; - } - - fputs(DatabaseDemoApp.params.ODBCSource, paramFile); - fputc('\n', paramFile); - fputs(DatabaseDemoApp.params.UserName, paramFile); - fputc('\n', paramFile); - fputs(DatabaseDemoApp.params.Password, paramFile); - fputc('\n', paramFile); - fclose(paramFile); - - return TRUE; -} // CparameterDlg::Save() - - -void CparameterDlg::FillDataSourceList() -{ - char Dsn[SQL_MAX_DSN_LENGTH + 1]; - char DsDesc[255]; - wxStringList strList; - - while(GetDataSource(DbConnectInf.Henv, Dsn, SQL_MAX_DSN_LENGTH+1, DsDesc, 255)) - strList.Add(Dsn); - - strList.Sort(); - strList.Add(""); - char **p = strList.ListToArray(); - - for (int i = 0; strlen(p[i]); i++) - pParamODBCSourceList->Append(p[i]); -} // CparameterDlg::CparameterDlg::FillDataSourceList() - - -// CqueryDlg() constructor -CqueryDlg::CqueryDlg(wxWindow *parent, wxDB *pDb, char *tblName[], char *pWhereArg) : wxDialogBox (parent, "Query", 1, -1, -1, 480, 360) -{ - wxBeginBusyCursor(); - - colInf = 0; - dbTable = 0; - masterTableName = tblName[0]; - widgetPtrsSet = FALSE; - pDB = pDb; - - // Initialize the WHERE clause from the string passed in - pWhere = pWhereArg; // Save a pointer to the output buffer - if (strlen(pWhere) > DB_MAX_WHERE_CLAUSE_LEN) // Check the length of the buffer passed in - { - wxString s; - s.sprintf("Maximum where clause length exceeded.\nLength must be less than %d", DB_MAX_WHERE_CLAUSE_LEN+1); - wxMessageBox(s.GetData(),"Error...",wxOK | wxICON_EXCLAMATION); - Close(); - return; - } - - // Build the dialog - SetLabelPosition(wxVERTICAL); - - wxFont *ButtonFont = new wxFont(12,wxSWISS,wxNORMAL,wxBOLD); - wxFont *TextFont = new wxFont(12,wxSWISS,wxNORMAL,wxNORMAL); - - SetButtonFont(ButtonFont); - SetLabelFont(TextFont); - SetLabelPosition(wxVERTICAL); - - pQueryCol1Msg = new wxMessage(this, "Column 1:", 10, 10, 69, 16, 0, "QueryCol1Msg"); - pQueryCol1Choice = new wxChoice(this, NULL, "", 10, 27, 250, 27, 0, 0, 0, "QueryCol1Choice"); - - pQueryNotMsg = new wxMessage(this, "NOT", 268, 10, -1, -1, 0, "QueryNotMsg"); - pQueryNotCheck = new wxCheckBox(this, NULL, "", 275, 37, 20, 20, 0, "QueryNotCheck"); - - char *choice_strings[9]; - choice_strings[0] = "="; - choice_strings[1] = "<"; - choice_strings[2] = ">"; - choice_strings[3] = "<="; - choice_strings[4] = ">="; - choice_strings[5] = "Begins"; - choice_strings[6] = "Contains"; - choice_strings[7] = "Like"; - choice_strings[8] = "Between"; - pQueryOperatorMsg = new wxMessage(this, "Operator:", 305, 10, -1, -1, 0, "QueryOperatorMsg"); - pQueryOperatorChoice = new wxChoice(this, NULL, "", 305, 27, 80, 27, 9, choice_strings, 0, "QueryOperatorChoice"); - - pQueryCol2Msg = new wxMessage(this, "Column 2:", 10, 65, 69, 16, 0, "QueryCol2Msg"); - pQueryCol2Choice = new wxChoice(this, NULL, "", 10, 82, 250, 27, 0, 0, 0, "QueryCol2Choice"); - - pQuerySqlWhereMsg = new wxMessage(this, "SQL where clause:", 10, 141, -1, -1, 0, "QuerySqlWhereMsg"); - pQuerySqlWhereMtxt = new wxMultiText(this, NULL, "", "", 10, 159, 377, 134, 0, "QuerySqlWhereMtxt"); - - pQueryAddBtn = new wxButton(this, NULL, "&Add", 406, 24, 56, 26, 0, "QueryAddBtn"); - pQueryAndBtn = new wxButton(this, NULL, "A&nd", 406, 58, 56, 26, 0, "QueryAndBtn"); - pQueryOrBtn = new wxButton(this, NULL, "&Or", 406, 92, 56, 26, 0, "QueryOrBtn"); - - pQueryLParenBtn = new wxButton(this, NULL, "(", 406, 126, 26, 26, 0, "QueryLParenBtn"); - pQueryRParenBtn = new wxButton(this, NULL, ")", 436, 126, 26, 26, 0, "QueryRParenBtn"); - - pQueryDoneBtn = new wxButton(this, NULL, "&Done", 406, 185, 56, 26, 0, "QueryDoneBtn"); - pQueryClearBtn = new wxButton(this, NULL, "C&lear", 406, 218, 56, 26, 0, "QueryClearBtn"); - pQueryCountBtn = new wxButton(this, NULL, "&Count", 406, 252, 56, 26, 0, "QueryCountBtn"); - - pQueryValue1Msg = new wxMessage(this, "Value:", 277, 66, -1, -1, 0, "QueryValue1Msg"); - pQueryValue1Txt = new wxText(this, NULL, "", "", 277, 83, 108, 25, 0, "QueryValue1Txt"); - - pQueryValue2Msg = new wxMessage(this, "AND", 238, 126, -1, -1, 0, "QueryValue2Msg"); - pQueryValue2Txt = new wxText(this, NULL, "", "", 277, 120, 108, 25, 0, "QueryValue2Txt"); - - pQueryHintGrp = new wxGroupBox(this, "", 10, 291, 377, 40, 0, "QueryHintGrp"); - pQueryHintMsg = new wxMessage(this, "", 16, 306, -1, -1, 0, "QueryHintMsg"); - - widgetPtrsSet = TRUE; - // Initialize the dialog - wxString qualName; - pQueryCol2Choice->Append("VALUE -->"); - colInf = pDB->GetColumns(tblName); - for (int i = 0; colInf[i].colName && strlen(colInf[i].colName); i++) - { - // If there is more than one table being queried, qualify - // the column names with the table name prefix. - if (tblName[1] && strlen(tblName[1])) - { - qualName.sprintf("%s.%s", colInf[i].tableName, colInf[i].colName); - pQueryCol1Choice->Append(qualName.GetData()); - pQueryCol2Choice->Append(qualName.GetData()); - } - else // Single table query, append just the column names - { - pQueryCol1Choice->Append(colInf[i].colName); - pQueryCol2Choice->Append(colInf[i].colName); - } - } - - pQueryCol1Choice->SetSelection(0); - pQueryCol2Choice->SetSelection(0); - pQueryOperatorChoice->SetSelection(0); - - pQueryValue2Msg->Show(FALSE); - pQueryValue2Txt->Show(FALSE); - - pQueryHintMsg->SetLabel(langQRY_EQ); - - pQuerySqlWhereMtxt->SetValue(pWhere); - - wxEndBusyCursor(); - - // Display the dialog window - SetModal(TRUE); - Centre(wxBOTH); - Show(TRUE); - -} // CqueryDlg() constructor - - -void CqueryDlg::OnCommand(wxWindow& win, wxCommandEvent& event) -{ - // Widget pointers won't be set when the dialog is constructed. - // Control is passed through this function once for each widget on - // a dialog as the dialog is constructed. - if (!widgetPtrsSet) - return; - - wxString widgetName = win.GetName(); - - // Operator choice box - if (widgetName == pQueryOperatorChoice->GetName()) - { - // Set the help text - switch((qryOp) pQueryOperatorChoice->GetSelection()) - { - case qryOpEQ: - pQueryHintMsg->SetLabel(langQRY_EQ); - break; - case qryOpLT: - pQueryHintMsg->SetLabel(langQRY_LT); - break; - case qryOpGT: - pQueryHintMsg->SetLabel(langQRY_GT); - break; - case qryOpLE: - pQueryHintMsg->SetLabel(langQRY_LE); - break; - case qryOpGE: - pQueryHintMsg->SetLabel(langQRY_GE); - break; - case qryOpBEGINS: - pQueryHintMsg->SetLabel(langQRY_BEGINS); - break; - case qryOpCONTAINS: - pQueryHintMsg->SetLabel(langQRY_CONTAINS); - break; - case qryOpLIKE: - pQueryHintMsg->SetLabel(langQRY_LIKE); - break; - case qryOpBETWEEN: - pQueryHintMsg->SetLabel(langQRY_BETWEEN); - break; - } - - // Hide the value2 widget - pQueryValue2Msg->Show(FALSE); // BETWEEN will show this widget - pQueryValue2Txt->Show(FALSE); // BETWEEN will show this widget - - // Disable the NOT operator for <, <=, >, >= - switch((qryOp) pQueryOperatorChoice->GetSelection()) - { - case qryOpLT: - case qryOpGT: - case qryOpLE: - case qryOpGE: - pQueryNotCheck->SetValue(0); - pQueryNotCheck->Enable(FALSE); - break; - default: - pQueryNotCheck->Enable(TRUE); - break; - } - - // Manipulate the dialog to handle the selected operator - switch((qryOp) pQueryOperatorChoice->GetSelection()) - { - case qryOpEQ: - case qryOpLT: - case qryOpGT: - case qryOpLE: - case qryOpGE: - pQueryCol2Choice->Enable(TRUE); - if (pQueryCol2Choice->GetSelection()) // Column name is highlighted - { - pQueryValue1Msg->Show(FALSE); - pQueryValue1Txt->Show(FALSE); - } - else // "Value" is highlighted - { - pQueryValue1Msg->Show(TRUE); - pQueryValue1Txt->Show(TRUE); - pQueryValue1Txt->SetFocus(); - } - break; - case qryOpBEGINS: - case qryOpCONTAINS: - case qryOpLIKE: - pQueryCol2Choice->SetSelection(0); - pQueryCol2Choice->Enable(FALSE); - pQueryValue1Msg->Show(TRUE); - pQueryValue1Txt->Show(TRUE); - pQueryValue1Txt->SetFocus(); - break; - case qryOpBETWEEN: - pQueryCol2Choice->SetSelection(0); - pQueryCol2Choice->Enable(FALSE); - pQueryValue2Msg->Show(TRUE); - pQueryValue2Txt->Show(TRUE); - pQueryValue1Msg->Show(TRUE); - pQueryValue1Txt->Show(TRUE); - pQueryValue1Txt->SetFocus(); - break; - } - - return; - - } // Operator choice box - - // Column 2 choice - if (widgetName == pQueryCol2Choice->GetName()) - { - if (pQueryCol2Choice->GetSelection()) // Column name is highlighted - { - pQueryValue1Msg->Show(FALSE); - pQueryValue1Txt->Show(FALSE); - } - else // "Value" is highlighted - { - pQueryValue1Msg->Show(TRUE); - pQueryValue1Txt->Show(TRUE); - pQueryValue1Txt->SetFocus(); - } - return; - - } // Column 2 choice - - // Add button - if (widgetName == pQueryAddBtn->GetName()) - { - ProcessAddBtn(); - return; - - } // Add button - - // And button - if (widgetName == pQueryAndBtn->GetName()) - { - AppendToWhere(" AND\n"); - return; - - } // And button - - // Or button - if (widgetName == pQueryOrBtn->GetName()) - { - AppendToWhere(" OR\n"); - return; - - } // Or button - - // Left Paren button - if (widgetName == pQueryLParenBtn->GetName()) - { - AppendToWhere("("); - return; - - } // Left Paren button - - // Right paren button - if (widgetName == pQueryRParenBtn->GetName()) - { - AppendToWhere(")"); - return; - - } // Right Paren button - - // Done button - if (widgetName == pQueryDoneBtn->GetName()) - { - // Be sure the where clause will not overflow the output buffer - if (strlen(pQuerySqlWhereMtxt->GetValue()) > DB_MAX_WHERE_CLAUSE_LEN) - { - wxString s; - s.sprintf("Maximum where clause length exceeded.\nLength must be less than %d", DB_MAX_WHERE_CLAUSE_LEN+1); - wxMessageBox(s.GetData(),"Error...",wxOK | wxICON_EXCLAMATION); - return; - } - // Validate the where clause for things such as matching parens - if (!ValidateWhereClause()) - return; - // Copy the where clause to the output buffer and exit - strcpy(pWhere, pQuerySqlWhereMtxt->GetValue()); - Close(); - return; - - } // Done button - - // Clear button - if (widgetName == pQueryClearBtn->GetName()) - { - Bool Ok = (wxMessageBox("Are you sure you wish to clear the Query?","Confirm",wxYES_NO|wxICON_QUESTION) == wxYES); - - if (Ok) - pQuerySqlWhereMtxt->SetValue(""); - return; - - } // Clear button - - // Count button - if (widgetName == pQueryCountBtn->GetName()) - { - wxBeginBusyCursor(); - ProcessCountBtn(); - wxEndBusyCursor(); - return; - - } // Count button - -} // CqueryDlg::OnCommand - - -Bool CqueryDlg::OnClose() -{ - // Clean up - if (colInf) - { - delete [] colInf; - colInf = 0; - } - - if (dbTable) - { - delete dbTable; - dbTable = 0; - } - - GetParent()->SetFocus(); - wxEndBusyCursor(); - return TRUE; - -} // CqueryDlg::OnClose() - -/* -Bool CqueryDlg::SetWidgetPtrs() -{ - Bool abort = FALSE; - - abort = abort || !(pQueryCol1Choice = (wxChoice *)GetWidgetPtr("QueryCol1Choice",this)); - abort = abort || !(pQueryNotCheck = (wxCheckBox *)GetWidgetPtr("QueryNotCheck",this)); - abort = abort || !(pQueryOperatorChoice = (wxChoice *)GetWidgetPtr("QueryOperatorChoice",this)); - abort = abort || !(pQueryCol2Choice = (wxChoice *)GetWidgetPtr("QueryCol2Choice",this)); - abort = abort || !(pQueryValue1Txt = (wxText *)GetWidgetPtr("QueryValue1Txt",this)); - abort = abort || !(pQueryValue2Txt = (wxText *)GetWidgetPtr("QueryValue2Txt",this)); - abort = abort || !(pQuerySqlWhereMtxt = (wxMultiText *)GetWidgetPtr("QuerySqlWhereMtxt",this)); - abort = abort || !(pQueryAddBtn = (wxButton *)GetWidgetPtr("QueryAddBtn",this)); - abort = abort || !(pQueryAndBtn = (wxButton *)GetWidgetPtr("QueryAndBtn",this)); - abort = abort || !(pQueryOrBtn = (wxButton *)GetWidgetPtr("QueryOrBtn",this)); - abort = abort || !(pQueryLParenBtn = (wxButton *)GetWidgetPtr("QueryLParenBtn",this)); - abort = abort || !(pQueryRParenBtn = (wxButton *)GetWidgetPtr("QueryRParenBtn",this)); - abort = abort || !(pQueryDoneBtn = (wxButton *)GetWidgetPtr("QueryDoneBtn",this)); - abort = abort || !(pQueryClearBtn = (wxButton *)GetWidgetPtr("QueryClearBtn",this)); - abort = abort || !(pQueryCountBtn = (wxButton *)GetWidgetPtr("QueryCountBtn",this)); - abort = abort || !(pQueryHelpBtn = (wxButton *)GetWidgetPtr("QueryHelpBtn",this)); - abort = abort || !(pQueryHintMsg = (wxMessage *)GetWidgetPtr("QueryHintMsg",this)); - - pFocusTxt = NULL; - - return(widgetPtrsSet = !abort); - -} // CqueryDlg::SetWidgetPtrs -*/ - -void CqueryDlg::AppendToWhere(char *s) -{ - wxString whereStr = pQuerySqlWhereMtxt->GetValue(); - whereStr += s; - pQuerySqlWhereMtxt->SetValue(whereStr.GetData()); - -} // CqueryDlg::AppendToWhere() - - -void CqueryDlg::ProcessAddBtn() -{ - qryOp oper = (qryOp) pQueryOperatorChoice->GetSelection(); - - // Verify that eveything is filled in correctly - if (pQueryCol2Choice->GetSelection() == 0) // "Value" is selected - { - // Verify that value 1 is filled in - if (strlen(pQueryValue1Txt->GetValue()) == 0) - { - wxBell(); - pQueryValue1Txt->SetFocus(); - return; - } - // For the BETWEEN operator, value 2 must be filled in as well - if (oper == qryOpBETWEEN && - strlen(pQueryValue2Txt->GetValue()) == 0) - { - wxBell(); - pQueryValue2Txt->SetFocus(); - return; - } - } - - // Build the expression and append it to the where clause window - wxString s = pQueryCol1Choice->GetStringSelection(); - - if (pQueryNotCheck->GetValue() && (oper != qryOpEQ)) - s += " NOT"; - - switch(oper) - { - case qryOpEQ: - if (pQueryNotCheck->GetValue()) // NOT box is checked - s += " <>"; - else - s += " ="; - break; - case qryOpLT: - s += " <"; - break; - case qryOpGT: - s += " >"; - break; - case qryOpLE: - s += " <="; - break; - case qryOpGE: - s += " >="; - break; - case qryOpBEGINS: - case qryOpCONTAINS: - case qryOpLIKE: - s += " LIKE"; - break; - case qryOpBETWEEN: - s += " BETWEEN"; - break; - } - - s += " "; - - int col1Idx = pQueryCol1Choice->GetSelection(); - - Bool quote = FALSE; - if (colInf[col1Idx].sqlDataType == SQL_VARCHAR || - oper == qryOpBEGINS || - oper == qryOpCONTAINS || - oper == qryOpLIKE) - quote = TRUE; - - if (pQueryCol2Choice->GetSelection()) // Column name - s += pQueryCol2Choice->GetStringSelection(); - else // Column 2 is a "value" - { - if (quote) - s += "'"; - if (oper == qryOpCONTAINS) - s += "%"; - s += pQueryValue1Txt->GetValue(); - if (oper == qryOpCONTAINS || oper == qryOpBEGINS) - s += "%"; - if (quote) - s += "'"; - } - - if (oper == qryOpBETWEEN) - { - s += " AND "; - if (quote) - s += "'"; - s += pQueryValue2Txt->GetValue(); - if (quote) - s += "'"; - } - - AppendToWhere(s.GetData()); - -} // CqueryDlg::ProcessAddBtn() - - -void CqueryDlg::ProcessCountBtn() -{ - if (!ValidateWhereClause()) - return; - - if (dbTable == 0) // wxTable object needs to be created and opened - { - if (!(dbTable = new wxTable(pDB, masterTableName, 0))) - { - wxMessageBox("Memory allocation failed creating a wxTable object.","Error...",wxOK | wxICON_EXCLAMATION); - return; - } - if (!dbTable->Open()) - { - wxString tStr; - tStr = "ODBC error during Open()\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); - wxMessageBox(tStr.GetData(),"ODBC Error...",wxOK | wxICON_EXCLAMATION); - return; - } - } - - // Count() with WHERE clause - dbTable->where = pQuerySqlWhereMtxt->GetValue(); - ULONG whereCnt = dbTable->Count(); - - // Count() of all records in the table - dbTable->where = 0; - ULONG totalCnt = dbTable->Count(); - - if (whereCnt > 0 || totalCnt == 0) - { - wxString tStr; - tStr.sprintf("%lu of %lu records match the query criteria.",whereCnt,totalCnt); - wxMessageBox(tStr.GetData(),"Notice...",wxOK | wxICON_INFORMATION); - } - else - { - wxString tStr; - tStr.sprintf("%lu of %lu records match the query criteria.\n\nEither the criteria entered produced a result set\nwith no records, or there was a syntactical error\nin the clause you entered.\n\nPress the details button to see if any database errors were reported.",whereCnt,totalCnt); - wxMessageBox(tStr.GetData(),"Notice...",wxOK | wxICON_INFORMATION); - } - - // After a wxMessageBox, the focus does not necessarily return to the - // window which was the focus when the message box popped up, so return - // focus to the Query dialog for certain - SetFocus(); - -} // CqueryDlg::ProcessCountBtn() - - -Bool CqueryDlg::ValidateWhereClause() -{ - wxString where = pQuerySqlWhereMtxt->GetValue(); - - if (where.Freq('(') != where.Freq(')')) - { - wxMessageBox("There are mismatched parenthesis in the constructed where clause","Error...",wxOK | wxICON_EXCLAMATION); - return(FALSE); - } - // After a wxMessageBox, the focus does not necessarily return to the - // window which was the focus when the message box popped up, so return - // focus to the Query dialog for certain - SetFocus(); - - return(TRUE); - -} // CqueryDlg::ValidateWhereClause() diff --git a/samples/db/dbtest.def b/samples/db/dbtest.def deleted file mode 100644 index 013825e9e7..0000000000 --- a/samples/db/dbtest.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME DBTEST -DESCRIPTION 'Database wxWindows application' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 8192 diff --git a/samples/db/dbtest.h b/samples/db/dbtest.h deleted file mode 100644 index 76ee48eaba..0000000000 --- a/samples/db/dbtest.h +++ /dev/null @@ -1,286 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: dbtest.h -// Purpose: wxWindows database demo app -// Author: George Tasker -// Modified by: -// Created: 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Remstar International, Inc. -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -#pragma interface "dbtest.h" - -#include -#include - -enum DialogModes {mView,mCreate,mEdit,mSearch}; - -// ID for the menu quit command -#define FILE_CREATE 100 -#define FILE_EXIT 199 -#define EDIT_PARAMETERS 200 -#define ABOUT_DEMO 300 - - -// Name of the table to be created/opened -const char CONTACT_TABLE_NAME[] = "CONTACTS"; - -// Nuber of columns in the above table -const int CONTACT_NO_COLS = 12; // 0-11 - -// Global structure for holding ODBC connection information -struct DbStuff DbConnectInf; - -enum Language {langENGLISH, langFRENCH, langGERMAN, langSPANISH, langOTHER}; - -// Forward class declarations -class CeditorDlg; -class CparameterDlg; - -const char paramFilename[] = "database.cfg"; - - -/* - * This class contains the actual data members that are used for transferring - * data back and forth from the database to the program. - * - * NOTE: The object described in this class is just for example purposes, and has no - * real meaning other than to show each type of field being used by the database - */ -class CstructContact : public wxObject -{ - public: - char Name[ 50+1 ]; // Contact's name - char Addr1[ 50+1 ]; - char Addr2[ 50+1 ]; - char City[ 25+1 ]; - char State[ 25+1 ]; - char PostalCode[ 15+1 ]; - char Country[ 20+1 ]; - TIMESTAMP_STRUCT JoinDate; // Date on which this person joined the wxWindows project - Language NativeLanguage; // Enumerated type indicating person's native language - bool IsDeveloper; // Is this person a developer for wxWindows, or just a subscriber - int Contributions; // Something to show off an integer field - ULONG LinesOfCode; // Something to show off a 'long' field -}; // CstructContact - - -// -// NOTE: Ccontact inherits wxTable, which gives access to all the database functionality -// -class Ccontact : public wxTable, public CstructContact -{ - private: - bool freeDbConn; - void SetupColumns(); - - public: - wxString whereStr; - wxString qryWhereStr; // Where string returned from the query dialog - - Ccontact(wxDB *pwxDB=NULL); - ~Ccontact(); - - void Initialize(); - bool CreateIndexes(void); - bool FetchByName(char *name); - -}; // Ccontact class definition - - -typedef struct Cparameters -{ - // The length of these strings were arbitrarily picked, and are - // dependent on the OS and database engine you will be using. - char ODBCSource[100+1]; - char UserName[25+1]; - char Password[25+1]; -} Cparameters; - - -// Define a new application type -class DatabaseDemoApp: public wxApp -{ - public: - Cparameters params; - wxFrame *OnInit(void); -}; // DatabaseDemoApp - -DECLARE_APP(DatabaseDemoApp) - -// Define a new frame type -class DatabaseDemoFrame: public wxFrame -{ - private: - CeditorDlg *pEditorDlg; - CparameterDlg *pParamDlg; - - public: - DatabaseDemoFrame(wxFrame *frame, char *title, int x, int y, int w, int h); - - void OnMenuCommand(int id); - bool OnClose(void); - - void CreateDataTable(); - void BuildEditorDialog(); - void BuildParameterDialog(wxWindow *parent); -}; // DatabaseDemoFrame - - - -// *************************** CeditorDlg *************************** - -class CeditorDlg : public wxPanel -{ - private: - bool widgetPtrsSet; - wxString saveName; - - // Pointers to all widgets on the dialog - wxButton *pCreateBtn, *pEditBtn, *pDeleteBtn, *pCopyBtn, *pSaveBtn, *pCancelBtn; - wxButton *pPrevBtn, *pNextBtn, *pQueryBtn, *pResetBtn, *pDoneBtn, *pHelpBtn; - wxButton *pNameListBtn; - wxText *pNameTxt, *pAddress1Txt, *pAddress2Txt,*pCityTxt, *pStateTxt, *pCountryTxt,*pPostalCodeTxt; - wxMessage *pNameMsg, *pAddress1Msg, *pAddress2Msg,*pCityMsg, *pStateMsg, *pCountryMsg,*pPostalCodeMsg; - wxText *pJoinDateTxt,*pContribTxt, *pLinesTxt; - wxMessage *pJoinDateMsg,*pContribMsg, *pLinesMsg; - wxRadioBox *pDeveloperRadio; - wxChoice *pNativeLangChoice; - wxMessage *pNativeLangMsg; - - public: - enum DialogModes mode; - Ccontact *Contact; // this is the table object that will be being manipulated - - CeditorDlg(wxWindow *parent); - bool OnClose(void); - void OnCommand(wxWindow& win, wxCommandEvent& event); - void OnActivate(bool) {}; // necessary for hot keys - - void FieldsEditable(); - void SetMode(enum DialogModes m); - bool PutData(); - bool GetData(); - bool Save(); - bool GetNextRec(); - bool GetPrevRec(); - bool GetRec(char *whereStr); -}; // CeditorDlg - - -// *************************** CparameterDlg *************************** - -class CparameterDlg : public wxDialogBox -{ - private: - bool widgetPtrsSet; - enum DialogModes mode; - bool saved; - Cparameters savedParamSettings; - - // Pointers to all widgets on the dialog - wxMessage *pParamODBCSourceMsg; - wxListBox *pParamODBCSourceList; - wxMessage *pParamUserNameMsg, *pParamPasswordMsg; - wxText *pParamUserNameTxt, *pParamPasswordTxt; - wxButton *pParamSaveBtn, *pParamCancelBtn; - - public: - CparameterDlg(wxWindow *parent); - bool OnClose(void); - void OnCommand(wxWindow& win, wxCommandEvent& event); - void OnActivate(bool) {}; // necessary for hot keys - - bool PutData(); - bool GetData(); - bool Save(); - void FillDataSourceList(); - -}; // CparameterDlg - - -// *************************** CqueryDlg *************************** - - -// QUERY DIALOG -enum qryOp -{ - qryOpEQ, - qryOpLT, - qryOpGT, - qryOpLE, - qryOpGE, - qryOpBEGINS, - qryOpCONTAINS, - qryOpLIKE, - qryOpBETWEEN -}; - - -// Query strings -char * const langQRY_EQ = "column = column | value"; -char * const langQRY_LT = "column < column | value"; -char * const langQRY_GT = "column > column | value"; -char * const langQRY_LE = "column <= column | value"; -char * const langQRY_GE = "column >= column | value"; -char * const langQRY_BEGINS = "columns that BEGIN with the string entered"; -char * const langQRY_CONTAINS = "columns that CONTAIN the string entered"; -char * const langQRY_LIKE = "% matches 0 or more of any char; _ matches 1 char"; -char * const langQRY_BETWEEN = "column BETWEEN value AND value"; - - -class CqueryDlg : public wxDialogBox -{ - private: - CcolInf *colInf; // Column inf. returned by db->GetColumns() - wxTable *dbTable; - char *masterTableName; - char *pWhere; // A pointer to the storage for the resulting where clause - wxDB *pDB; - - public: - bool widgetPtrsSet; - - // Widget pointers - wxMessage *pQueryCol1Msg; - wxChoice *pQueryCol1Choice; - wxMessage *pQueryNotMsg; - wxCheckBox *pQueryNotCheck; - wxMessage *pQueryOperatorMsg; - wxChoice *pQueryOperatorChoice; - wxMessage *pQueryCol2Msg; - wxChoice *pQueryCol2Choice; - wxMessage *pQueryValue1Msg; - wxText *pQueryValue1Txt; - wxMessage *pQueryValue2Msg; - wxText *pQueryValue2Txt; - wxMessage *pQuerySqlWhereMsg; - wxMultiText *pQuerySqlWhereMtxt; - wxButton *pQueryAddBtn; - wxButton *pQueryAndBtn; - wxButton *pQueryOrBtn; - wxButton *pQueryLParenBtn; - wxButton *pQueryRParenBtn; - wxButton *pQueryDoneBtn; - wxButton *pQueryClearBtn; - wxButton *pQueryCountBtn; - wxButton *pQueryHelpBtn; - wxGroupBox *pQueryHintGrp; - wxMessage *pQueryHintMsg; - - wxText *pFocusTxt; - - CqueryDlg(wxWindow *parent, wxDB *pDb, char *tblName[], char *pWhereArg); - - void OnCommand(wxWindow& win, wxCommandEvent& event); - bool OnClose(); - void OnActivate(bool) {}; // necessary for hot keys - -// bool SetWidgetPtrs(); - void AppendToWhere(char *s); - void ProcessAddBtn(); - void ProcessCountBtn(); - bool ValidateWhereClause(); - -}; // CqueryDlg diff --git a/samples/db/dbtest.ico b/samples/db/dbtest.ico deleted file mode 100644 index c4dbd3f784..0000000000 Binary files a/samples/db/dbtest.ico and /dev/null differ diff --git a/samples/db/dbtest.rc b/samples/db/dbtest.rc deleted file mode 100644 index 31d5205e01..0000000000 --- a/samples/db/dbtest.rc +++ /dev/null @@ -1,3 +0,0 @@ -db_icon ICON "dbtest.ico" -#include "wx.rc" - diff --git a/samples/db/listdb.cpp b/samples/db/listdb.cpp deleted file mode 100644 index 330c79db2a..0000000000 --- a/samples/db/listdb.cpp +++ /dev/null @@ -1,412 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: listdb.cpp -// Purpose: Data table lookup listbox code -// Author: George Tasker/Doug Card -// Modified by: -// Created: 1996 -// RCS-ID: $Id$ -// Copyright: (c) 1996 Remstar International, Inc. -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -/* -// SYNOPSIS START - - Member functions for the classes defined in LISTDB.H - - This class is used to present a generic ListBox lookup window for - use with any of the object creation/selection choice widgets. This - dialog window will present a (possibly) scrolling list of values - that come from a data table source. Based on the object type passed - in the constructor, a ListBox is built to present the user with a - single selection listbox. - - The string selected from the list box is stored in the Global variable - "ListDB_Seclection", and will remain set until another interation of this - routine is called. - - For each object (database) type that is to be used, an overridden - constructor should be written to appropriately link to the proper - data table/object for building the list. - - The data table record access is all handled through the routines - in this module, interfacing with the methods defined in wxTable. - - All objects which use data table access must be initialized and - have opened the table prior to passing them in the dialog - constructor, and the 'where' query should already have been set - and performed before creating this dialog instance. - -// SYNOPSIS STOP -*/ - -#ifdef __GNUG__ -#pragma implementation "listdb.h" -#endif - -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif //__BORLANDC__ - -#ifndef WX_PRECOMP -#include -#endif //WX_PRECOMP - -#include - -#include "listdb.h" - -// Global structure for holding ODBC connection information -extern DbStuff DbConnectInf; - -// Global database connection -extern wxDB *READONLY_DB; - - -// Used for passing the selected listbox selection back to the calling -// routine. This variable must be declared as 'extern' in the calling -// source module -char ListDB_Selection[LOOKUP_COL_LEN+1]; - -// If the listbox contains two columns of data, the second column is -// returned in this variable. -char ListDB_Selection2[LOOKUP_COL_LEN+1]; - -// Constants -const LISTDB_NO_SPACES_BETWEEN_COLS = 3; - - -// Clookup constructor -Clookup::Clookup(char *tblName, char *colName) : wxTable(READONLY_DB, tblName, 1) -{ - - SetColDefs (0, colName, DB_DATA_TYPE_VARCHAR, lookupCol, SQL_C_CHAR, LOOKUP_COL_LEN+1, FALSE, FALSE); - -} // Clookup() - - -// Clookup2 constructor -Clookup2::Clookup2(char *tblName, char *colName1, char *colName2, wxDB *pDb) - : wxTable(pDb, tblName, (1 + (strlen(colName2) > 0))) -{ - int i = 0; - - SetColDefs (i, colName1, DB_DATA_TYPE_VARCHAR, lookupCol1, SQL_C_CHAR, LOOKUP_COL_LEN+1, FALSE, FALSE); - - if (strlen(colName2) > 0) - SetColDefs (++i, colName2, DB_DATA_TYPE_VARCHAR, lookupCol2, SQL_C_CHAR, LOOKUP_COL_LEN+1, FALSE, FALSE); - -} // Clookup2() - - -// This is a generic lookup constructor that will work with any table and any column -ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName, char *colName, - char *where, char *orderBy) : wxDialogBox (parent, "Select...", 1, -1, -1, 400, 290) -{ - wxBeginBusyCursor(); - - strcpy(ListDB_Selection,""); - widgetPtrsSet = FALSE; - lookup = 0; - lookup2 = 0; - noDisplayCols = 1; - col1Len = 0; - - // Build the dialog - SetLabelPosition(wxVERTICAL); - - wxFont *ButtonFont = new wxFont(12,wxSWISS,wxNORMAL,wxBOLD); - wxFont *TextFont = new wxFont(12,wxSWISS,wxNORMAL,wxNORMAL); - - SetButtonFont(ButtonFont); - SetLabelFont(TextFont); - SetLabelPosition(wxVERTICAL); - - pLookUpSelectList = new wxListBox(this, NULL, "", wxSINGLE|wxALWAYS_SB, 5, 15, 384, 195, 0, 0, 0, "LookUpSelectList"); - pLookUpOkBtn = new wxButton(this, NULL, "&Ok", 113, 222, 70, 35, 0, "LookUpOkBtn"); - pLookUpCancelBtn = new wxButton(this, NULL, "C&ancel", 212, 222, 70, 35, 0, "LookUpCancelBtn"); - - widgetPtrsSet = TRUE; - - // Query the lookup table and display the result set - if (!(lookup = new Clookup(tableName, colName))) - { - wxMessageBox("Error allocating memory for 'Clookup'object.","Error..."); - Close(); - return; - } - - if (!lookup->Open()) - { - wxString tStr; - tStr.sprintf("Unable to open the table '%s'.",tableName); - wxMessageBox(tStr.GetData(),"ODBC Error..."); - Close(); - return; - } - - lookup->orderBy = orderBy; - lookup->where = where; - if (!lookup->Query()) - { - wxMessageBox("ODBC error during Query()","ODBC Error..."); - Close(); - return; - } - - // Fill in the list box from the query result set - while (lookup->GetNext()) - pLookUpSelectList->Append(lookup->lookupCol); - - // Highlight the first list item - pLookUpSelectList->SetSelection(0); - - // Make the OK activate by pressing Enter - if (pLookUpSelectList->Number()) - pLookUpOkBtn->SetDefault(); - else - { - pLookUpCancelBtn->SetDefault(); - pLookUpOkBtn->Enable(FALSE); - } - - // Display the dialog window - SetTitle(windowTitle); - Centre(wxBOTH); - wxEndBusyCursor(); - Show(TRUE); - -} // Generic lookup constructor - - -// -// This is a generic lookup constructor that will work with any table and any column. -// It extends the capabilites of the lookup dialog in the following ways: -// -// 1) 2 columns rather than one -// 2) The ability to select DISTINCT column values -// -// Only set distinctValues equal to true if necessary. In many cases, the constraints -// of the index(es) will enforce this uniqueness. Selecting DISTINCT does require -// overhead by the database to ensure that all values returned are distinct. Therefore, -// use this ONLY when you need it. -// -// For complicated queries, you can pass in the sql select statement. This would be -// necessary if joins are involved since by default both columns must come from the -// same table. -// -// If you do query by sql statement, you must pass in the maximum lenght of column1, -// since it cannot be derived when you query using your own sql statement. -// -// The optional database connection can be used if you'd like the lookup class -// to use a database pointer other than the global READONLY_DB. This is necessary if -// records are being saved, but not committed to the db, yet should be included -// in the lookup window. -// -ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName, - char *dispCol1, char *dispCol2, char *where, char *orderBy, bool distinctValues, - char *selectStmt, int maxLenCol1, wxDB *pDb, bool allowOk) : wxDialogBox (parent, "Select...", 1, -1, -1, 400, 290) -{ - wxBeginBusyCursor(); - - strcpy(ListDB_Selection,""); - strcpy(ListDB_Selection2,""); - widgetPtrsSet = FALSE; - lookup = 0; - lookup2 = 0; - noDisplayCols = (strlen(dispCol2) ? 2 : 1); - col1Len = 0; - - // Build the dialog - SetLabelPosition(wxVERTICAL); - - wxFont *ButtonFont = new wxFont(12,wxSWISS,wxNORMAL,wxBOLD); - wxFont *TextFont = new wxFont(12,wxSWISS,wxNORMAL,wxNORMAL); - wxFont *FixedFont = new wxFont(12,wxMODERN,wxNORMAL,wxNORMAL); - - SetButtonFont(ButtonFont); - SetLabelFont(TextFont); - SetLabelPosition(wxVERTICAL); - - // this is done with fixed font so that the second column (if any) will be left - // justified in the second column - SetButtonFont(FixedFont); - pLookUpSelectList = new wxListBox(this, NULL, "", wxSINGLE|wxALWAYS_SB, 5, 15, 384, 195, 0, 0, 0, "LookUpSelectList"); - SetButtonFont(ButtonFont); - pLookUpOkBtn = new wxButton(this, NULL, "&Ok", 113, 222, 70, 35, 0, "LookUpOkBtn"); - pLookUpCancelBtn = new wxButton(this, NULL, "C&ancel", 212, 222, 70, 35, 0, "LookUpCancelBtn"); - - widgetPtrsSet = TRUE; - - // Query the lookup table and display the result set - if (!(lookup2 = new Clookup2(tableName, dispCol1, dispCol2, pDb))) - { - wxMessageBox("Error allocating memory for 'Clookup2'object.","Error..."); - Close(); - return; - } - - if (!lookup2->Open()) - { - wxString tStr; - tStr.sprintf("Unable to open the table '%s'.",tableName); - wxMessageBox(tStr.GetData(),"ODBC Error..."); - Close(); - return; - } - - // If displaying 2 columns, determine the maximum length of column1 - int maxColLen; - if (maxLenCol1) - maxColLen = col1Len = maxLenCol1; // user passed in max col length for column 1 - else - { - maxColLen = LOOKUP_COL_LEN; - if (strlen(dispCol2)) - { - wxString q = "SELECT MAX({fn LENGTH("; - q += dispCol1; - q += ")}), NULL"; - q += " FROM "; - q += tableName; - if (strlen(where)) - { - q += " WHERE "; - q += where; - } - if (!lookup2->QueryBySqlStmt(q.GetData())) - { - wxMessageBox("ODBC error during QueryBySqlStmt()","ODBC Error..."); - Close(); - return; - } - if (lookup2->GetNext()) - maxColLen = col1Len = atoi(lookup2->lookupCol1); - else - wxMessageBox("ODBC error during GetNext()","ODBC Error..."); - } - } - - // Query the actual record set - if (selectStmt && strlen(selectStmt)) // Query by sql stmt passed in - { - if (!lookup2->QueryBySqlStmt(selectStmt)) - { - wxMessageBox("ODBC error during QueryBySqlStmt()","ODBC Error..."); - Close(); - return; - } - } - else // Query using where and order by clauses - { - lookup2->orderBy = orderBy; - lookup2->where = where; - if (!lookup2->Query(FALSE, distinctValues)) - { - wxMessageBox("ODBC error during Query()","ODBC Error..."); - Close(); - return; - } - } - - // Fill in the list box from the query result set - wxString s; - while (lookup2->GetNext()) - { - s = lookup2->lookupCol1; - if (strlen(dispCol2)) // Append the optional column 2 - { - s.Append(' ', (maxColLen + LISTDB_NO_SPACES_BETWEEN_COLS - strlen(lookup2->lookupCol1))); - s.Append(lookup2->lookupCol2); - } - pLookUpSelectList->Append(s.GetData()); - } - - // Highlight the first list item - pLookUpSelectList->SetSelection(0); - - // Make the OK activate by pressing Enter - if (pLookUpSelectList->Number()) - pLookUpOkBtn->SetDefault(); - else - { - pLookUpCancelBtn->SetDefault(); - pLookUpOkBtn->Enable(FALSE); - } - - pLookUpOkBtn->Enable(allowOk); - - // Display the dialog window - SetTitle(windowTitle); - Centre(wxBOTH); - wxEndBusyCursor(); - Show(TRUE); - -} // Generic lookup constructor 2 - - -bool ClookUpDlg::OnClose(void) -{ - widgetPtrsSet = FALSE; - GetParent()->Enable(TRUE); - - if (lookup) - delete lookup; - if (lookup2) - delete lookup2; - - wxEndBusyCursor(); - return TRUE; - -} // ClookUpDlg::OnClose - - -void ClookUpDlg::OnCommand(wxWindow& win, wxCommandEvent& event) -{ - wxString widgetName = win.GetName(); - - if (widgetPtrsSet) - { - // OK Button - if (widgetName == pLookUpOkBtn->GetName()) - { - if (pLookUpSelectList->GetSelection() != -1) - { - if (noDisplayCols == 1) - strcpy (ListDB_Selection, pLookUpSelectList->GetStringSelection()); - else // 2 display columns - { - wxString s = pLookUpSelectList->GetStringSelection(); - // Column 1 - s = s.SubString(0, col1Len-1); - s = s.Strip(); - strcpy(ListDB_Selection, s.GetData()); - // Column 2 - s = pLookUpSelectList->GetStringSelection(); - s = s.From(col1Len + LISTDB_NO_SPACES_BETWEEN_COLS); - s = s.Strip(); - strcpy(ListDB_Selection2, s.GetData()); - } - } - else - { - strcpy(ListDB_Selection,""); - strcpy(ListDB_Selection2,""); - } - Close(); - } // OK Button - - // Cancel Button - if (widgetName == pLookUpCancelBtn->GetName()) - { - strcpy (ListDB_Selection,""); - strcpy (ListDB_Selection2,""); - Close(); - } // Cancel Button - } - -}; // ClookUpDlg::OnCommand - -// *********************************** listdb.cpp ********************************** diff --git a/samples/db/listdb.h b/samples/db/listdb.h deleted file mode 100644 index 0d966c961e..0000000000 --- a/samples/db/listdb.h +++ /dev/null @@ -1,125 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: listdb.h -// Purpose: wxWindows database demo app -// Author: George Tasker -// Modified by: -// Created: 1996 -// RCS-ID: $Id$ -// Copyright: (c) 1996 Remstar International, Inc. -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -#pragma interface "listdb.h" - -/* -/* -// SYNOPSIS START - - Contains dialog class for creating a data table lookup listbox - -// SYNOPSIS STOP -*/ - -#ifndef LISTDB_DOT_H -#define LISTDB_DOT_H - - -#include - -const LOOKUP_COL_LEN = 250; - -// Global database connection -extern wxDB *READONLY_DB; - -// Clookup class -class Clookup : public wxTable -{ - public: - - char lookupCol[LOOKUP_COL_LEN+1]; - - Clookup(char *tblName, char *colName); - -}; // Clookup - -// Clookup2 class -class Clookup2 : public wxTable -{ - public: - - char lookupCol1[LOOKUP_COL_LEN+1]; - char lookupCol2[LOOKUP_COL_LEN+1]; - - Clookup2(char *tblName, char *colName1, char *colName2, wxDB *pDb); - -}; // Clookup2 - -class ClookUpDlg : public wxDialogBox -{ - private: - bool widgetPtrsSet; - int currentCursor; - Clookup *lookup; - Clookup2 *lookup2; - int noDisplayCols; - int col1Len; - - wxListBox *pLookUpSelectList; - wxButton *pLookUpOkBtn; - wxButton *pLookUpCancelBtn; - - public: - - // This is a generic lookup constructor that will work with any table and any column - ClookUpDlg(wxWindow *parent, - char *windowTitle, - char *tableName, - char *colName, - char *where, - char *orderBy); - - // - // This is a generic lookup constructor that will work with any table and any column. - // It extends the capabilites of the lookup dialog in the following ways: - // - // 1) 2 columns rather than one - // 2) The ability to select DISTINCT column values - // - // Only set distinctValues equal to true if necessary. In many cases, the constraints - // of the index(es) will enforce this uniqueness. Selecting DISTINCT does require - // overhead by the database to ensure that all values returned are distinct. Therefore, - // use this ONLY when you need it. - // - // For complicated queries, you can pass in the sql select statement. This would be - // necessary if joins are involved since by default both columns must come from the - // same table. - // - // If you do query by sql statement, you must pass in the maximum length of column1, - // since it cannot be derived when you query using your own sql statement. - // - // The optional database connection can be used if you'd like the lookup class - // to use a database pointer other than the global READONLY_DB. This is necessary if - // records are being saved, but not committed to the db, yet should be included - // in the lookup window. - // - ClookUpDlg(wxWindow *parent, - char *windowTitle, - char *tableName, - char *dispCol1, // Must have at least 1 display column - char *dispCol2, // Optional - char *where, - char *orderBy, - bool distinctValues, // e.g. SELECT DISTINCT ... - char *selectStmt = 0, // If you wish to query by SQLstmt (complicated lookups) - int maxLenCol1 = 0, // Mandatory if querying by SQLstmt - wxDB *pDb = READONLY_DB, // Database connection pointer - bool allowOk = TRUE); // is the OK button enabled - - void OnCommand(wxWindow& win, wxCommandEvent& event); - bool OnClose(); - void OnActivate(bool) {}; // necessary for hot keys -}; - -#endif // LISTDB_DOT_H - -// ************************************ listdb.h ********************************* diff --git a/samples/db/makefile.nt b/samples/db/makefile.nt deleted file mode 100644 index 2db0a71c6e..0000000000 --- a/samples/db/makefile.nt +++ /dev/null @@ -1,97 +0,0 @@ -# -# File: makefile.nt -# Author: George Tasker -# Created: 1998 -# Updated: -# -# "%W% %G%" -# -# Makefile : Builds database example (MS VC++). - -!if "$(FINAL)" == "" -FINAL=0 -!endif - - -!if "$(MSVCDIR)" == "" -MSVCDIR=c:\devstudio\vc -!endif - -# Set WXDIR for your system -WXDIR = $(WXWIN) -THISDIR = $(WXDIR)\samples\database -WXODBCDIR = $(WXDIR)\utils\wxodbc - -!if "$(MSVCDIR)" == "" -DBLIBS=$(MSDEVDIR)\lib\odbc32.lib -!else -DBLIBS=$(MSVCDIR)\lib\odbc32.lib -!endif - -EXTRAINC = -I$(WXODBCDIR)\src -EXTRALIBS = $(DBLIBS) $(WXODBCDIR)\lib\wxodbc.lib - -!include $(WXDIR)\src\ntwxwin.mak - -PROGRAM=database - -OBJECTS = $(PROGRAM).$(OBJSUFF) listdb.$(OBJSUFF) - -all: wxodbc $(PROGRAM).exe - -$(PROGRAM): $(PROGRAM).exe - -gt: - cd $(CPPFLAGS) - -wxodbc: - cd $(WXODBCDIR)\src - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - cd $(WXODBCDIR)\src - nmake -f makefile.nt clean - cd $(THISDIR) - - -$(PROGRAM).exe: $(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -listdb.$(OBJSUFF): $(*B).$(SRCSUFF) $(*B).h - $(cc) @<< -$(CPPFLAGS) /c /Fo$(*B).$(OBJSUFF) /Tp $(*B).$(SRCSUFF) -<< - - -$(PROGRAM).$(OBJSUFF): $(PROGRAM).$(SRCSUFF) $(PROGRAM).h listdb.h - $(cc) @<< -$(CPPFLAGS) /c /Fo$(*B).$(OBJSUFF) /Tp $(*B).$(SRCSUFF) -<< - - -$(PROGRAM).res: $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/db/makefile.unx b/samples/db/makefile.unx deleted file mode 100644 index 3c4142d09b..0000000000 --- a/samples/db/makefile.unx +++ /dev/null @@ -1,71 +0,0 @@ -# -# File: makefile.unx -# Author: Terry Tompkins -# Created: 1998 -# Updated: -# Copyright: (c) 1998, Remstar International -# -# Makefile for wxDB (UNIX). - -OBJDIR=database -OBJSUFF=.o -SRCSUFF=.cpp -WXDIR = $(WXWIN) - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/make.env - -PROGRAM=database - -OBJECTS = $(OBJDIR)/$(PROGRAM).$(OBJSUFF) $(OBJDIR)/table.$(OBJSUFF) $(OBJDIR)/db.$(OBJSUFF) $(OBJDIR)/listdb.$(OBJSUFF) - -.SUFFIXES: - -all: $(OBJDIR) $(PROGRAM)$(GUISUFFIX) - -wx: - - -motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' WXLIB=$(WXDIR)/lib/libwx_motif.a OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK= - -xview: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview - $(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' - -hp: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx hp - $(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' WARN='-w' \ - XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' LDLIBS='$(HPLDLIBS)' - -$(OBJDIR): - mkdir $(OBJDIR) - -$(PROGRAM)$(GUISUFFIX): $(DUMMYOBJ) $(DBLIBS) $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o $(PROGRAM)$(GUISUFFIX) $(OBJECTS) $(XVIEW_LINK) $(LDLIBS) - -$(OBJDIR)/$(PROGRAM).$(OBJSUFF): $(PROGRAM).$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ $(PROGRAM).$(SRCSUFF) - -$(OBJDIR)/table.$(OBJSUFF): table.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ table.$(SRCSUFF) - -$(OBJDIR)/db.$(OBJSUFF): db.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ db.$(SRCSUFF) - -$(OBJDIR)/listdb.$(OBJSUFF): listdb.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ listdb.$(SRCSUFF) - -clean_motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany - -clean_ol: - $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany - -clean_hp: - $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany - -cleanany: - rm -f $(OBJECTS) $(PROGRAM)$(GUISUFFIX) core - diff --git a/samples/dialogs/.cvsignore b/samples/dialogs/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/dialogs/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/dialogs/Makefile b/samples/dialogs/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/dialogs/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/dialogs/Makefile.in b/samples/dialogs/Makefile.in deleted file mode 100644 index a4529f0a37..0000000000 --- a/samples/dialogs/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# 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=\ -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 diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp deleted file mode 100644 index 1c624e29bb..0000000000 --- a/samples/dialogs/dialogs.cpp +++ /dev/null @@ -1,301 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dialogs.cpp -// Purpose: Common dialogs demo -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#pragma interface -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include -#include -#include -#include -#include - -#if !defined(__WXMSW__) || USE_GENERIC_DIALOGS_IN_MSW -#include -#include -#endif - -#include "dialogs.h" - -IMPLEMENT_APP(MyApp) - -MyCanvas *myCanvas = (MyCanvas *) NULL; - -// A macro needed for some compilers (AIX) that need 'main' to be defined -// in the application itself. -IMPLEMENT_WXWIN_MAIN - -// `Main program' equivalent, creating windows and returning main app frame -bool MyApp::OnInit(void) -{ - m_canvasTextColour = wxColour("BLACK"); - m_canvasFont = *wxNORMAL_FONT; - - // Create the main frame window - MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "wxWindows dialogs example", wxPoint(50, 50), wxSize(400, 300)); - - // Make a menubar - wxMenu *file_menu = new wxMenu; - - file_menu->Append(DIALOGS_CHOOSE_COLOUR, "&Choose colour"); - -#if !defined(__WXMSW__) || USE_GENERIC_DIALOGS_IN_MSW - file_menu->Append(DIALOGS_CHOOSE_COLOUR_GENERIC, "Choose colour (&generic)"); -#endif - - file_menu->AppendSeparator(); - file_menu->Append(DIALOGS_CHOOSE_FONT, "Choose &font"); - -#if !defined(__WXMSW__) || USE_GENERIC_DIALOGS_IN_MSW - file_menu->Append(DIALOGS_CHOOSE_FONT_GENERIC, "Choose f&ont (generic)"); - -#endif - file_menu->AppendSeparator(); - file_menu->Append(DIALOGS_MESSAGE_BOX, "&Message box"); - file_menu->Append(DIALOGS_TEXT_ENTRY, "Text &entry"); - file_menu->Append(DIALOGS_SINGLE_CHOICE, "&Single choice"); - file_menu->AppendSeparator(); - file_menu->Append(DIALOGS_FILE_OPEN, "&Open file"); - file_menu->Append(DIALOGS_FILE_SAVE, "Sa&ve file"); -#ifndef __WXGTK__ - // don't add a menu entry for something that isn't in wxGTK. It only - // confuses the user - file_menu->Append(DIALOGS_DIR_CHOOSE, "&Choose a directory"); -#endif - file_menu->AppendSeparator(); - file_menu->Append(wxID_EXIT, "E&xit"); - wxMenuBar *menu_bar = new wxMenuBar; - menu_bar->Append(file_menu, "&File"); - frame->SetMenuBar(menu_bar); - - myCanvas = new MyCanvas(frame); - myCanvas->SetBackgroundColour(*wxWHITE); - - frame->Centre(wxBOTH); - - // Show the frame - frame->Show(TRUE); - - SetTopWindow(frame); - - return TRUE; -} - -// My frame constructor -MyFrame::MyFrame(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size): - wxFrame(parent, -1, title, pos, size) -{} - -void MyFrame::ChooseColour(wxCommandEvent& WXUNUSED(event) ) -{ - wxColourData data; - data.SetChooseFull(TRUE); - for (int i = 0; i < 16; i++) - { - wxColour colour(i*16, i*16, i*16); - data.SetCustomColour(i, colour); - } - - wxColourDialog *dialog = new wxColourDialog(this, &data); - if (dialog->ShowModal() == wxID_OK) - { - wxColourData retData = dialog->GetColourData(); - wxColour col = retData.GetColour(); -// wxBrush *brush = wxTheBrushList->FindOrCreateBrush(&col, wxSOLID); - myCanvas->SetBackgroundColour(col); - myCanvas->Clear(); - myCanvas->Refresh(); - } - dialog->Close(); -} - -void MyFrame::ChooseFont(wxCommandEvent& WXUNUSED(event) ) -{ - wxFontData data; - data.SetInitialFont(wxGetApp().m_canvasFont); - data.SetColour(wxGetApp().m_canvasTextColour); - - wxFontDialog *dialog = new wxFontDialog(this, &data); - if (dialog->ShowModal() == wxID_OK) - { - wxFontData retData = dialog->GetFontData(); - wxGetApp().m_canvasFont = retData.GetChosenFont(); - wxGetApp().m_canvasTextColour = retData.GetColour(); - myCanvas->Refresh(); - } - dialog->Close(); -} - -#if !defined(__WXMSW__) || USE_GENERIC_DIALOGS_IN_MSW -void MyFrame::ChooseColourGeneric(wxCommandEvent& WXUNUSED(event)) -{ - wxColourData data; - data.SetChooseFull(TRUE); - for (int i = 0; i < 16; i++) - { - wxColour colour(i*16, i*16, i*16); - data.SetCustomColour(i, colour); - } - - wxGenericColourDialog *dialog = new wxGenericColourDialog(this, &data); - if (dialog->ShowModal() == wxID_OK) - { - wxColourData retData = dialog->GetColourData(); - wxColour col = retData.GetColour(); -// wxBrush *brush = wxTheBrushList->FindOrCreateBrush(&col, wxSOLID); - myCanvas->SetBackgroundColour(col); - myCanvas->Clear(); - myCanvas->Refresh(); - } - dialog->Close(); -} - -void MyFrame::ChooseFontGeneric(wxCommandEvent& WXUNUSED(event) ) -{ - wxFontData data; - data.SetInitialFont(wxGetApp().m_canvasFont); - data.SetColour(wxGetApp().m_canvasTextColour); - - wxGenericFontDialog *dialog = new wxGenericFontDialog(this, &data); - if (dialog->ShowModal() == wxID_OK) - { - wxFontData retData = dialog->GetFontData(); - wxGetApp().m_canvasFont = retData.GetChosenFont(); - wxGetApp().m_canvasTextColour = retData.GetColour(); - myCanvas->Refresh(); - } - dialog->Close(); -} -#endif - -void MyFrame::MessageBox(wxCommandEvent& WXUNUSED(event) ) -{ - wxMessageDialog dialog(this, "This is a message box\nA long, long string to test out the message box properly", - "Message box text", wxYES_NO|wxCANCEL); - - dialog.ShowModal(); -} - -void MyFrame::TextEntry(wxCommandEvent& WXUNUSED(event) ) -{ - wxTextEntryDialog dialog(this, "This is a small sample\nA long, long string to test out the text entrybox", - "Please enter a string", "Default value", wxOK|wxCANCEL); - - if (dialog.ShowModal() == wxID_OK) - { - wxMessageDialog dialog2(this, dialog.GetValue(), "Got string"); - dialog2.ShowModal(); - } -} - -void MyFrame::SingleChoice(wxCommandEvent& WXUNUSED(event) ) -{ - const wxString choices[] = { "One", "Two", "Three", "Four", "Five" } ; - int n = 5; - - wxSingleChoiceDialog dialog(this, "This is a small sample\nA single-choice convenience dialog", - "Please select a value", n, (const wxString *)choices); - - dialog.SetSelection(2); - - if (dialog.ShowModal() == wxID_OK) - { - wxMessageDialog dialog2(this, dialog.GetStringSelection(), "Got string"); - dialog2.ShowModal(); - } -} - -void MyFrame::FileOpen(wxCommandEvent& WXUNUSED(event) ) -{ - wxFileDialog dialog(this, "Testing open file dialog", "", "", "*.txt", 0); - - if (dialog.ShowModal() == wxID_OK) - { - wxMessageDialog dialog2(this, dialog.GetPath(), "Selected path"); - dialog2.ShowModal(); - } -} - -void MyFrame::FileSave(wxCommandEvent& WXUNUSED(event) ) -{ - wxFileDialog dialog(this, "Testing save file dialog", "", "", - "Text files (*.txt)|*.txt|Document files (*.doc)|*.doc", - wxSAVE|wxOVERWRITE_PROMPT); - - if (dialog.ShowModal() == wxID_OK) - { - char buf[400]; - sprintf(buf, "%s, filter %d", (const char *)dialog.GetPath(), dialog.GetFilterIndex()); - wxMessageDialog dialog2(this, wxString(buf), "Selected path"); - dialog2.ShowModal(); - } -} - -void MyFrame::DirChoose(wxCommandEvent& WXUNUSED(event) ) -{ -#ifndef __WXGTK__ - wxDirDialog dialog(this, "Testing directory picker", ""); - - if (dialog.ShowModal() == wxID_OK) - { - wxMessageDialog dialog2(this, dialog.GetPath(), "Selected path"); - dialog2.ShowModal(); - } -#endif -} - -void MyFrame::OnExit(wxCommandEvent& WXUNUSED(event) ) -{ - Close(TRUE); -} - -void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event) ) -{ - wxPaintDC dc(this); - dc.SetFont(wxGetApp().m_canvasFont); - dc.SetTextForeground(wxGetApp().m_canvasTextColour); - dc.SetBackgroundMode(wxTRANSPARENT); - dc.DrawText("wxWindows common dialogs test application", 10, 10); -} - -BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow) - EVT_PAINT(MyCanvas::OnPaint) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(DIALOGS_CHOOSE_COLOUR, MyFrame::ChooseColour) - EVT_MENU(DIALOGS_CHOOSE_FONT, MyFrame::ChooseFont) - EVT_MENU(DIALOGS_MESSAGE_BOX, MyFrame::MessageBox) - EVT_MENU(DIALOGS_TEXT_ENTRY, MyFrame::TextEntry) - EVT_MENU(DIALOGS_SINGLE_CHOICE, MyFrame::SingleChoice) - EVT_MENU(DIALOGS_FILE_OPEN, MyFrame::FileOpen) - EVT_MENU(DIALOGS_FILE_SAVE, MyFrame::FileSave) - EVT_MENU(DIALOGS_DIR_CHOOSE, MyFrame::DirChoose) -#if !defined(__WXMSW__) || USE_GENERIC_DIALOGS_IN_MSW - EVT_MENU(DIALOGS_CHOOSE_COLOUR_GENERIC, MyFrame::ChooseColourGeneric) - EVT_MENU(DIALOGS_CHOOSE_FONT_GENERIC, MyFrame::ChooseFontGeneric) -#endif - EVT_MENU(wxID_EXIT, MyFrame::OnExit) -END_EVENT_TABLE() - diff --git a/samples/dialogs/dialogs.def b/samples/dialogs/dialogs.def deleted file mode 100644 index cb06200c15..0000000000 --- a/samples/dialogs/dialogs.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME Dialogs -DESCRIPTION 'wxWindows Dialogs example' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 8192 diff --git a/samples/dialogs/dialogs.h b/samples/dialogs/dialogs.h deleted file mode 100644 index d3745c423c..0000000000 --- a/samples/dialogs/dialogs.h +++ /dev/null @@ -1,73 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dialogs.h -// Purpose: Common dialogs demo -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef __DIALOGSH__ -#define __DIALOGSH__ - -// Define a new application type -class MyApp: public wxApp -{ public: - bool OnInit(void); - - wxFont m_canvasFont; - wxColour m_canvasTextColour; -}; - -// Define a new frame type -class MyFrame: public wxFrame -{ public: - MyFrame(wxWindow *parent, const wxString& title, const wxPoint& pos, - const wxSize& size); - bool OnClose(void) { return TRUE; } - - void ChooseColour(wxCommandEvent& event); - void ChooseFont(wxCommandEvent& event); - void MessageBox(wxCommandEvent& event); - void SingleChoice(wxCommandEvent& event); - void TextEntry(wxCommandEvent& event); - void FileOpen(wxCommandEvent& event); - void FileSave(wxCommandEvent& event); - void DirChoose(wxCommandEvent& event); - -#if !defined(__WXMSW__) || USE_GENERIC_DIALOGS_IN_MSW - void ChooseColourGeneric(wxCommandEvent& event); - void ChooseFontGeneric(wxCommandEvent& event); -#endif - void OnExit(wxCommandEvent& event); -DECLARE_EVENT_TABLE() -}; - -class MyCanvas: public wxScrolledWindow -{ - public: - MyCanvas(wxWindow *parent): - wxScrolledWindow(parent) - { - } - void OnPaint(wxPaintEvent& event); -DECLARE_EVENT_TABLE() -}; - - -// Menu IDs -#define DIALOGS_CHOOSE_COLOUR 1 -#define DIALOGS_CHOOSE_COLOUR_GENERIC 2 -#define DIALOGS_CHOOSE_FONT 3 -#define DIALOGS_CHOOSE_FONT_GENERIC 4 -#define DIALOGS_MESSAGE_BOX 5 -#define DIALOGS_SINGLE_CHOICE 6 -#define DIALOGS_TEXT_ENTRY 7 -#define DIALOGS_FILE_OPEN 8 -#define DIALOGS_FILE_SAVE 9 -#define DIALOGS_DIR_CHOOSE 10 - -#endif - diff --git a/samples/dialogs/dialogs.rc b/samples/dialogs/dialogs.rc deleted file mode 100644 index 82bdf07561..0000000000 --- a/samples/dialogs/dialogs.rc +++ /dev/null @@ -1,2 +0,0 @@ -#include "wx/msw/wx.rc" - diff --git a/samples/dialogs/makefile.b32 b/samples/dialogs/makefile.b32 deleted file mode 100644 index e314db0425..0000000000 --- a/samples/dialogs/makefile.b32 +++ /dev/null @@ -1,62 +0,0 @@ -# -# File: makefile.bcc -# Author: Adnre Beltman -# Created: 1995 -# Updated: -# Copyright: (c) 1995, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds dialogs example (DOS). - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXLIB=$(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 - -TARGET=dialogs - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = dialogs.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -dialogs.obj: dialogs.$(SRCSUFF) - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - diff --git a/samples/dialogs/makefile.dos b/samples/dialogs/makefile.dos deleted file mode 100644 index dd0e10c4a1..0000000000 --- a/samples/dialogs/makefile.dos +++ /dev/null @@ -1,81 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds dialogs example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\dialogs -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml - -!ifndef FINAL -FINAL=0 -!endif - -INC=/I$(WXDIR)\include\msw /I$(WXDIR)\include\base - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!if "$(FINAL)" == "0" -CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od /YuWX_PREC.H /DDEBUG=$(DEBUG) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC) -LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:512 -!else -CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H /Dwx_msw /DDEBUG=$(DEBUG) /Fp$(WXDIR)\src\msw\wx.pch $(INC) -LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:512 -!endif - -HEADERS = -SOURCES = dialogs.$(SRCSUFF) -OBJECTS = dialogs.obj - -all: dialogs.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -dialogs.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) dialogs.def dialogs.res - link $(LINKFLAGS) @<< -$(OBJECTS) $(WXDIR)\src\msw\dummy.obj, -dialogs, -NUL, -$(LIBS), -dialogs.def -; -<< - rc -30 -K dialogs.res - -dialogs.obj: dialogs.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -dialogs.res : dialogs.rc $(WXDIR)\include\msw\wx.rc - rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw dialogs - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/dialogs/makefile.g95 b/samples/dialogs/makefile.g95 deleted file mode 100644 index c579ce37e1..0000000000 --- a/samples/dialogs/makefile.g95 +++ /dev/null @@ -1,35 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for dialogs example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/dialogs.$(OBJSUFF) $(OBJDIR)/dialogs_resources.$(OBJSUFF) - -all: $(OBJDIR) dialogs$(GUISUFFIX) - -$(OBJDIR): - mkdir $(OBJDIR) - -dialogs$(GUISUFFIX): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o dialogs$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/dialogs.$(OBJSUFF): dialogs.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ dialogs.$(SRCSUFF) - -$(OBJDIR)/dialogs_resources.o: dialogs.rc - $(RESCOMP) -i dialogs.rc -o $(OBJDIR)/dialogs_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) dialogs$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/dialogs/makefile.nt b/samples/dialogs/makefile.nt deleted file mode 100644 index cec864579d..0000000000 --- a/samples/dialogs/makefile.nt +++ /dev/null @@ -1,63 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds dialogs example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\dialogs -PROGRAM=dialogs - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) dialogs.h $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.sbr - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb - diff --git a/samples/dnd/.cvsignore b/samples/dnd/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/dnd/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/dnd/Makefile b/samples/dnd/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/dnd/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/dnd/Makefile.in b/samples/dnd/Makefile.in deleted file mode 100644 index d645ef43c1..0000000000 --- a/samples/dnd/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# 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 diff --git a/samples/dnd/d_and_d.txt b/samples/dnd/d_and_d.txt deleted file mode 100644 index b85b7c1570..0000000000 --- a/samples/dnd/d_and_d.txt +++ /dev/null @@ -1,167 +0,0 @@ - Drag-and-Drop Support in wxWindows - ================================== - -1. Overview - -------- - - a) What is it? - - We're calling drag-and-drop (or d&d for short) the OLE mechanism of data -transfer. Please note that it's not the same thing as the file oriented d&d -of Windows 3.1 "File Manager" which is designed for and limited to the file -names only. - - OLE d&d allows application to transfer data of any type to the same or -another process. - - - b) How is it done? (user's point of view) - - To start a d&d operation the user presses the mouse button 1 (left) and -drags the selected object to another window (which must be at least partially -visible on the screen) or to an icon on the taskbar in which case the -corresponding window will be automatically restored. To finish the operation, -the user releases the button. Default d&d operation is "move", but several key -act as modifiers: keeping down the key at the moment of drop does -"copy", while or force the "move" (makes sense if default isn't -"move"). - - - c) How is it done? (programmer's point of view) - - There are several objects participating in a d&d operation. First of all, -there is the data object itself. Second, there is the drop source which is -responsible for creating the data object (if it doesn't exist yet) and starting -the d&d operation. Finally, the drop target recieves the notification when -the data is dropped onto the associated window (see below) and is responsible -for pasting the data and returning the result code (copy, move or failure). -There is one class for each one of these roles in wxWindows d&d implementation, -plese see their descriptions below for details. - - - -2. Drop Target - ----------- - - a) Being a drop target - - ... is as easy as deriving your window class from wxDropTarget and -associating it with a wxWindow object (or perhaps some wxWindow-derived class, -such as wxFrame). The pure virtual function wxDropTarget::OnDrop() must be -implemented in your application and will be called whenever the mouse button -is released over the window in question. Other virtual functions that will be -called in the process of the d&d operation are OnEnter and OnLeave. - -@@ should OnDragOver() be user overridable also? - - You should associate wxDropTarget and wxWindow calling SetDropTarget: - wxWindow *pWindow = GetTopWindow(); - pWindow->SetDropTarget(new MyDropTarget); - -The object created passed to SetDropTarget becomes the propriety of wxWindow -and will be deleted with the window (or when you call SetDropTarget next -time). You can always break the association by calling SetDropTarget(NULL). - - When some data is dragged over a window, the program must decide if it's -going to accept this data or not. The virtual function IsAcceptedData() is -called to do it. The default implementation takes care of OLE interface -pointer manipulations and only requires you to override GetCountFormats() -and GetFormat(n) functions to let it know what data formats you support. -If it's not flexible enough for your application (i.e. the set of supported -formats changes over time...), you should override IsAcceptedData(). In 99% -of cases the default implementation is ok and you only have to return count -of supported formats (CF_xxx constants or one of your custom formats which -must have been registered) and their values. - - b) OnDrop(long x, long y, const void *pData) - - (x, y) are drop point (client) coordinates, pData is the pointer to data - (whatever it is). - - If 'true' is returned from OnDrop, the operation is considered to be - successful and the corresponding code (MOVE or COPY depending on the - keyboard control keys) is returned. Otherwise, the operation is cancelled. - - Please remember that returning 'true' here may mean 'move' and so the - drop source will delete the corresponding data - which would lead to - data loss if you didn't paste it properly. - - c) OnEnter() - - called when the mouse enters the window: you might use this function to - give some additional visual feedback. - - d) OnLeave() - - called when the mouse leaves the window; might be a good place to clean -up things allocated in OnEnter. - - e) Simple wxDropTarget specializations - - Two (very simple) wxDropTarget-derived classes are provided for two most -common situations: d&d of text and file d&d. To use them you only need to -override one virtual function OnDropText in wxTextDropTarget's case and -OnDropFiles for wxFileDropTarget. - - The (x, y) are the same as for OnDrop() function. OnDropText's last -parameter points to a (always ANSI, not Unicode) text string, while -OnDropFiles() parameter is the array of file names just dropped (and the -count of them is passed in the 3rd parameter). - -3. Data Object - ----------- - - a) Drag and drop and clipboard - - The effect of a d&d operation is the same as using the clipboard to -cut/copy and paste data and it would be nice to use the same code to implement -these two data transfer mechanisms. The wxDataObject allows you to do exactly -this. It encapsulates the data which can be passed either through the clipboard -or d&d. - - - b) Data format - - There are several standard clipboard formats, such as text, bitmap or -metafile picture. All of them are defined in wxDataObject::StdFormats -enumeration. Of course, it's not always enough and you'll often need your -own format for data transfer. The simple helper class wxDataFormat may help -you: when you create an object of this class, it registers a new clipboard -data format identified by the string passed to it's ctor. - - After your new format is registered, you may use it as any other one. - -4. Drop Source - ----------- - - a) Starting the d&d operation - - In order to start the d&d operation you should call the DoDragDrop function -(typically in reply to a "mouse button press" message). NB: DoDragDrop() is a -blocking function which enters into it's own message loop and may return after -an arbitrarily long time interval. During it, the QueryContinueDrag() is called -whenever the mouse or keyboard state changes. The default behaviour is quite -reasonable for 99% of cases: the drag operation is cancelled if the key -is preessed and the drop is initiated if the mouse button is released. - - b) After the end of d&d - - The drop source behaviour depends on DoDragDrop() return code. If it -returns wxDropSource::None or wxDropSource::Copy there is normally nothing to -do, but you shouldn't forget to delete your data if it returns the -wxDropSource::Move code. - - c) DoDragDrop - - d) QueryContinueDrag - - -5. Remarks - ------- - - -@@@@ TODO: support tymed != TYMED_HGLOBAL; - better support of CF_BMP, CF_METAFILE - scrolling support!! (how?) - sample demonstrating use of user-defined formats - sample which really does something useful diff --git a/samples/dnd/dnd.cpp b/samples/dnd/dnd.cpp deleted file mode 100644 index 252a701692..0000000000 --- a/samples/dnd/dnd.cpp +++ /dev/null @@ -1,359 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dnd.cpp -// Purpose: Drag and drop sample -// Author: Vadim Zeitlin -// Modified by: -// Created: 04/01/98 -// RCS-ID: -// Copyright: -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "wx/intl.h" -#include "wx/log.h" - -#include "wx/dnd.h" - -#ifdef __WXGTK__ -#include "mondrian.xpm" -#endif - -// ---------------------------------------------------------------------------- -// Derive 2 simple classes which just put in the listbox the strings (text or -// file names) we drop on them -// ---------------------------------------------------------------------------- -class DnDText : public wxTextDropTarget -{ -public: - DnDText(wxListBox *pOwner) { m_pOwner = pOwner; } - - virtual bool OnDropText(long x, long y, const char *psz); - -private: - wxListBox *m_pOwner; -}; - -class DnDFile : public wxFileDropTarget -{ -public: - DnDFile(wxListBox *pOwner) { m_pOwner = pOwner; } - - virtual bool OnDropFiles(long x, long y, - size_t nFiles, const char * const aszFiles[]); - -private: - wxListBox *m_pOwner; -}; - -// ---------------------------------------------------------------------------- -// Define a new application type -// ---------------------------------------------------------------------------- -class DnDApp : public wxApp -{ -public: - bool OnInit(); -}; - -IMPLEMENT_APP(DnDApp); - -// ---------------------------------------------------------------------------- -// Define a new frame type -// ---------------------------------------------------------------------------- -class DnDFrame : public wxFrame -{ -public: - DnDFrame(wxFrame *frame, char *title, int x, int y, int w, int h); - ~DnDFrame(); - - void OnPaint(wxPaintEvent& event); - void OnQuit (wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); - void OnDrag (wxCommandEvent& event); - void OnHelp (wxCommandEvent& event); - void OnLogClear(wxCommandEvent& event); - - void OnLeftDown(wxMouseEvent& event); - void OnRightDown(wxMouseEvent& event); - - bool OnClose(); - - DECLARE_EVENT_TABLE() - -private: - wxListBox *m_ctrlFile, - *m_ctrlText; - wxTextCtrl *m_ctrlLog; - - wxLog *m_pLog, *m_pLogPrev; - - wxString m_strText; -}; - -// ---------------------------------------------------------------------------- -// IDs for the menu commands -// ---------------------------------------------------------------------------- -enum -{ - Menu_Quit = 1, - Menu_Drag, - Menu_About = 101, - Menu_Help, - Menu_Clear, -}; - -BEGIN_EVENT_TABLE(DnDFrame, wxFrame) - EVT_MENU(Menu_Quit, DnDFrame::OnQuit) - EVT_MENU(Menu_About, DnDFrame::OnAbout) - EVT_MENU(Menu_Drag, DnDFrame::OnDrag) - EVT_MENU(Menu_Help, DnDFrame::OnHelp) - EVT_MENU(Menu_Clear, DnDFrame::OnLogClear) - EVT_LEFT_DOWN(OnLeftDown) - EVT_RIGHT_DOWN(OnRightDown) -END_EVENT_TABLE() - -// `Main program' equivalent, creating windows and returning main app frame -bool DnDApp::OnInit(void) -{ - // create the main frame window - DnDFrame *frame = new DnDFrame((wxFrame *) NULL, "Drag & Drop wxWindows App", - 50, 50, 450, 340); - - // activate it - frame->Show(TRUE); - - SetTopWindow(frame); - - return TRUE; -} - -DnDFrame::DnDFrame(wxFrame *frame, char *title, int x, int y, int w, int h) - : wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)), - m_strText("wxWindows drag & drop works :-)") - -{ - -#ifdef __WXMSW__ - // frame icon and status bar - SetIcon(wxIcon("mondrian")); -#else - SetIcon(wxIcon(mondrian_xpm)); -#endif - - const int widths[] = { -1 }; - CreateStatusBar(); - - // construct menu - wxMenu *file_menu = new wxMenu; - file_menu->Append(Menu_Drag, "&Test drag..."); - file_menu->AppendSeparator(); - file_menu->Append(Menu_Quit, "E&xit"); - - wxMenu *log_menu = new wxMenu; - log_menu->Append(Menu_Clear, "Clear"); - - wxMenu *help_menu = new wxMenu; - help_menu->Append(Menu_Help, "&Help..."); - help_menu->AppendSeparator(); - help_menu->Append(Menu_About, "&About"); - - wxMenuBar *menu_bar = new wxMenuBar; - menu_bar->Append(file_menu, "&File"); - menu_bar->Append(log_menu, "&Log"); - menu_bar->Append(help_menu, "&Help"); - - SetMenuBar(menu_bar); - - // make a panel with 3 subwindows - wxPoint pos(0, 0); - wxSize size(400, 200); - - wxString strFile("Drop files here!"), strText("Drop text on me"); - - m_ctrlFile = new wxListBox(this, -1, pos, size, 1, &strFile, wxLB_HSCROLL); - m_ctrlText = new wxListBox(this, -1, pos, size, 1, &strText, wxLB_HSCROLL); - - m_ctrlLog = new wxTextCtrl(this, -1, "", pos, size, - wxTE_MULTILINE | wxTE_READONLY | - wxSUNKEN_BORDER| wxHSCROLL); - - // redirect log messages to the text window (don't forget to delete it!) - m_pLog = new wxLogTextCtrl(m_ctrlLog); - m_pLogPrev = wxLog::SetActiveTarget(m_pLog); - - // associate drop targets with 2 text controls -#ifdef __WXMSW__ // it's not supported (yet) on other platforms - m_ctrlFile->SetDropTarget(new DnDFile(m_ctrlFile)); -#endif //MSW - m_ctrlText->SetDropTarget(new DnDText(m_ctrlText)); - - wxLayoutConstraints *c; - - // Top-left listbox - c = new wxLayoutConstraints; - c->left.SameAs (this, wxLeft); - c->top.SameAs (this, wxTop); - c->right.PercentOf(this, wxRight, 50); - c->height.PercentOf(this, wxHeight, 40); - m_ctrlFile->SetConstraints(c); - - // Top-right listbox - c = new wxLayoutConstraints; - c->left.SameAs (m_ctrlFile, wxRight); - c->top.SameAs (this, wxTop); - c->right.SameAs (this, wxRight); - c->height.PercentOf(this, wxHeight, 40); - m_ctrlText->SetConstraints(c); - - // Lower text control - c = new wxLayoutConstraints; - c->left.SameAs (this, wxLeft); - c->right.SameAs (this, wxRight); - c->height.PercentOf(this, wxHeight, 40); - c->top.SameAs(m_ctrlText, wxBottom); - - m_ctrlLog->SetConstraints(c); - - SetAutoLayout(TRUE); -} - -void DnDFrame::OnQuit(wxCommandEvent& /* event */) -{ - Close(TRUE); -} - -void DnDFrame::OnDrag(wxCommandEvent& /* event */) -{ - wxString strText = wxGetTextFromUser - ( - "After you enter text in this dialog, press any mouse\n" - "button in the bottom (empty) part of the frame and \n" - "drag it anywhere - you will be in fact dragging the\n" - "text object containing this text", - "Please enter some text", m_strText, this - ); - - m_strText = strText; -} - -void DnDFrame::OnAbout(wxCommandEvent& /* event */) -{ - wxMessageDialog dialog(this, - "Drag-&-Drop Demo\n" - "Please see \"Help|Help...\" for details\n" - "Copyright (c) 1998 Vadim Zeitlin", - "About wxDnD"); - - dialog.ShowModal(); -} - -void DnDFrame::OnHelp(wxCommandEvent& /* event */) -{ - wxMessageDialog dialog(this, -"This small program demonstrates drag & drop support in wxWindows. The program window\n" -"consists of 3 parts: the bottom pane is for debug messages, so that you can see what's\n" -"going on inside. The top part is split into 2 listboxes, the left one accepts files\n" -"and the right one accepts text.\n" -"\n" -"To test wxDropTarget: open wordpad (write.exe), select some text in it and drag it to\n" -"the right listbox (you'll notice the usual visual feedback, i.e. the cursor will change).\n" -"Also, try dragging some files (you can select several at once) from Windows Explorer (or \n" -"File Manager) to the left pane. Hold down Ctrl/Shift keys when you drop text (doesn't \n" -"work with files) and see what changes.\n" -"\n" -"To test wxDropSource: just press any mouse button on the empty zone of the window and drag\n" -"it to wordpad or any other droptarget accepting text (and of course you can just drag it\n" -"to the right pane). Due to a lot of trace messages, the cursor might take some time to \n" -"change, don't release the mouse button until it does. You can change the string being\n" -"dragged in in \"File|Test drag...\" dialog.\n" -"\n" -"\n" -"Please send all questions/bug reports/suggestions &c to \n" -"Vadim Zeitlin ", - "wxDnD Help"); - - dialog.ShowModal(); -} - -void DnDFrame::OnLogClear(wxCommandEvent& /* event */ ) -{ - m_ctrlLog->Clear(); -} - -bool DnDFrame::OnClose() -{ - return TRUE; -} - -void DnDFrame::OnLeftDown(wxMouseEvent &WXUNUSED(event) ) -{ - if ( !m_strText.IsEmpty() ) { - // start drag operation - - wxTextDataObject data(m_strText); - wxDropSource dragSource(data, this); - const char *pc; - - switch ( dragSource.DoDragDrop(TRUE) ) { - case wxDropSource::Error: pc = "Error!"; break; - case wxDropSource::None: pc = "Nothing"; break; - case wxDropSource::Copy: pc = "Copied"; break; - case wxDropSource::Move: pc = "Moved"; break; - case wxDropSource::Cancel: pc = "Cancelled"; break; - default: pc = "Huh?"; break; - } - - SetStatusText(wxString("Drag result: ") + pc); - } -} - -void DnDFrame::OnRightDown(wxMouseEvent &event ) -{ - wxMenu *menu = new wxMenu; - - menu->Append(Menu_Drag, "&Test drag..."); - menu->Append(Menu_About, "&About"); - menu->Append(Menu_Quit, "E&xit"); - - PopupMenu( menu, event.GetX(), event.GetY() ); -} - -DnDFrame::~DnDFrame() -{ - if ( m_pLog != NULL ) { - if ( wxLog::SetActiveTarget(m_pLogPrev) == m_pLog ) - delete m_pLog; - } -} - -// ---------------------------------------------------------------------------- -// Notifications called by the base class -// ---------------------------------------------------------------------------- -bool DnDText::OnDropText(long, long, const char *psz) -{ - m_pOwner->Append(psz); - - return TRUE; -} - -bool DnDFile::OnDropFiles(long, long, size_t nFiles, - const char * const aszFiles[]) -{ - wxString str; - str.Printf("%d files dropped", nFiles); - m_pOwner->Append(str); - for ( size_t n = 0; n < nFiles; n++ ) { - m_pOwner->Append(aszFiles[n]); - } - - return TRUE; -} diff --git a/samples/dnd/dnd.def b/samples/dnd/dnd.def deleted file mode 100644 index 8a76b2d093..0000000000 --- a/samples/dnd/dnd.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME DND -DESCRIPTION 'Drag and drop sample' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 4048 -STACKSIZE 16000 diff --git a/samples/dnd/dnd.rc b/samples/dnd/dnd.rc deleted file mode 100644 index 7655c62a4c..0000000000 --- a/samples/dnd/dnd.rc +++ /dev/null @@ -1,3 +0,0 @@ -mondrian ICON "mondrian.ico" -#include "wx/msw/wx.rc" - diff --git a/samples/dnd/makefile.b32 b/samples/dnd/makefile.b32 deleted file mode 100644 index 7644caa99a..0000000000 --- a/samples/dnd/makefile.b32 +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds dnd example (DOS). - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXINC = $(WXDIR)\include\msw -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 ole2w32 - -TARGET=dnd - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = dnd.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -dnd.obj: dnd.$(SRCSUFF) - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - diff --git a/samples/dnd/makefile.dos b/samples/dnd/makefile.dos deleted file mode 100644 index 46906a90e4..0000000000 --- a/samples/dnd/makefile.dos +++ /dev/null @@ -1,65 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds dnd example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\dnd - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = dnd.$(SRCSUFF) -OBJECTS = dnd.obj - -all: dnd.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -dnd.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) dnd.obj dnd.def dnd.res - link $(LINKFLAGS) @<< -dnd.obj $(WXDIR)\src\msw\dummy.obj, -dnd, -NUL, -$(LIBS), -dnd.def -; -<< - rc -K dnd.res - -dnd.obj: dnd.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -dnd.res : dnd.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include dnd - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/dnd/makefile.g95 b/samples/dnd/makefile.g95 deleted file mode 100644 index d62f860121..0000000000 --- a/samples/dnd/makefile.g95 +++ /dev/null @@ -1,37 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for dnd example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/dnd.$(OBJSUFF) $(OBJDIR)/dnd_resources.$(OBJSUFF) - -all: $(OBJDIR) dnd$(GUISUFFIX)$(EXESUFF) - -wx: - -$(OBJDIR): - mkdir $(OBJDIR) - -dnd$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o dnd$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/dnd.$(OBJSUFF): dnd.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ dnd.$(SRCSUFF) - -$(OBJDIR)/dnd_resources.o: dnd.rc - $(RESCOMP) -i dnd.rc -o $(OBJDIR)/dnd_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) dnd$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/dnd/makefile.nt b/samples/dnd/makefile.nt deleted file mode 100644 index b7c81a7092..0000000000 --- a/samples/dnd/makefile.nt +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds dnd example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\dnd -PROGRAM=dnd - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/dnd/mondrian.ico b/samples/dnd/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/samples/dnd/mondrian.ico and /dev/null differ diff --git a/samples/dnd/mondrian.xpm b/samples/dnd/mondrian.xpm deleted file mode 100644 index 409f27a843..0000000000 --- a/samples/dnd/mondrian.xpm +++ /dev/null @@ -1,44 +0,0 @@ -/* XPM */ -static char *mondrian_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 6 1", -" c Black", -". c Blue", -"X c #00bf00", -"o c Red", -"O c Yellow", -"+ c Gray100", -/* pixels */ -" ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" " -}; diff --git a/samples/docview/.cvsignore b/samples/docview/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/docview/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/docview/Makefile b/samples/docview/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/docview/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/docview/Makefile.in b/samples/docview/Makefile.in deleted file mode 100644 index 7f81acbf0f..0000000000 --- a/samples/docview/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# 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 diff --git a/samples/docview/aiai.ico b/samples/docview/aiai.ico deleted file mode 100644 index a3db6563cc..0000000000 Binary files a/samples/docview/aiai.ico and /dev/null differ diff --git a/samples/docview/chart.ico b/samples/docview/chart.ico deleted file mode 100644 index d2bcfea7f6..0000000000 Binary files a/samples/docview/chart.ico and /dev/null differ diff --git a/samples/docview/doc.cpp b/samples/docview/doc.cpp deleted file mode 100644 index f8a7206faf..0000000000 --- a/samples/docview/doc.cpp +++ /dev/null @@ -1,275 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: doc.cpp -// Purpose: Implements document functionality -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma implementation -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#if !USE_DOC_VIEW_ARCHITECTURE -#error You must set USE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h! -#endif - -#include "doc.h" -#include "view.h" - -IMPLEMENT_DYNAMIC_CLASS(DrawingDocument, wxDocument) - -DrawingDocument::DrawingDocument(void) -{ -} - -DrawingDocument::~DrawingDocument(void) -{ - doodleSegments.DeleteContents(TRUE); -} - -ostream& DrawingDocument::SaveObject(ostream& stream) -{ - wxDocument::SaveObject(stream); - - stream << doodleSegments.Number() << '\n'; - wxNode *node = doodleSegments.First(); - while (node) - { - DoodleSegment *segment = (DoodleSegment *)node->Data(); - segment->SaveObject(stream); - stream << '\n'; - - node = node->Next(); - } - return stream; -} - -istream& DrawingDocument::LoadObject(istream& stream) -{ - wxDocument::LoadObject(stream); - - int n = 0; - stream >> n; - - for (int i = 0; i < n; i++) - { - DoodleSegment *segment = new DoodleSegment; - segment->LoadObject(stream); - doodleSegments.Append(segment); - } - - return stream; -} - -DoodleSegment::DoodleSegment(void) -{ -} - -DoodleSegment::DoodleSegment(DoodleSegment& seg) -{ - wxNode *node = seg.lines.First(); - while (node) - { - DoodleLine *line = (DoodleLine *)node->Data(); - DoodleLine *newLine = new DoodleLine; - newLine->x1 = line->x1; - newLine->y1 = line->y1; - newLine->x2 = line->x2; - newLine->y2 = line->y2; - - lines.Append(newLine); - - node = node->Next(); - } -} - -DoodleSegment::~DoodleSegment(void) -{ - lines.DeleteContents(TRUE); -} - -ostream& DoodleSegment::SaveObject(ostream& stream) -{ - stream << lines.Number() << '\n'; - wxNode *node = lines.First(); - while (node) - { - DoodleLine *line = (DoodleLine *)node->Data(); - stream << line->x1 << " " << line->y1 << " " << line->x2 << " " << line->y2 << "\n"; - node = node->Next(); - } - return stream; -} - -istream& DoodleSegment::LoadObject(istream& stream) -{ - int n = 0; - stream >> n; - - for (int i = 0; i < n; i++) - { - DoodleLine *line = new DoodleLine; - stream >> line->x1 >> line->y1 >> line->x2 >> line->y2; - lines.Append(line); - } - return stream; -} - -void DoodleSegment::Draw(wxDC *dc) -{ - wxNode *node = lines.First(); - while (node) - { - DoodleLine *line = (DoodleLine *)node->Data(); - dc->DrawLine(line->x1, line->y1, line->x2, line->y2); - node = node->Next(); - } -} - -/* - * Implementation of drawing command - */ - -DrawingCommand::DrawingCommand(const wxString& name, int command, DrawingDocument *ddoc, DoodleSegment *seg): - wxCommand(TRUE, name) -{ - doc = ddoc; - segment = seg; - cmd = command; -} - -DrawingCommand::~DrawingCommand(void) -{ - if (segment) - delete segment; -} - -bool DrawingCommand::Do(void) -{ - switch (cmd) - { - case DOODLE_CUT: - { - // Cut the last segment - if (doc->GetDoodleSegments().Number() > 0) - { - wxNode *node = doc->GetDoodleSegments().Last(); - if (segment) - delete segment; - - segment = (DoodleSegment *)node->Data(); - delete node; - - doc->Modify(TRUE); - doc->UpdateAllViews(); - } - break; - } - case DOODLE_ADD: - { - doc->GetDoodleSegments().Append(new DoodleSegment(*segment)); - doc->Modify(TRUE); - doc->UpdateAllViews(); - break; - } - } - return TRUE; -} - -bool DrawingCommand::Undo(void) -{ - switch (cmd) - { - case DOODLE_CUT: - { - // Paste the segment - if (segment) - { - doc->GetDoodleSegments().Append(segment); - doc->Modify(TRUE); - doc->UpdateAllViews(); - segment = (DoodleSegment *) NULL; - } - doc->Modify(TRUE); - doc->UpdateAllViews(); - break; - } - case DOODLE_ADD: - { - // Cut the last segment - if (doc->GetDoodleSegments().Number() > 0) - { - wxNode *node = doc->GetDoodleSegments().Last(); - DoodleSegment *seg = (DoodleSegment *)node->Data(); - delete seg; - delete node; - - doc->Modify(TRUE); - doc->UpdateAllViews(); - } - } - } - return TRUE; -} - -IMPLEMENT_DYNAMIC_CLASS(TextEditDocument, wxDocument) - -// Since text windows have their own method for saving to/loading from files, -// we override OnSave/OpenDocument instead of Save/LoadObject -bool TextEditDocument::OnSaveDocument(const wxString& filename) -{ - TextEditView *view = (TextEditView *)GetFirstView(); - - if (!view->textsw->SaveFile(filename)) - return FALSE; - Modify(FALSE); - return TRUE; -} - -bool TextEditDocument::OnOpenDocument(const wxString& filename) -{ - TextEditView *view = (TextEditView *)GetFirstView(); - if (!view->textsw->LoadFile(filename)) - return FALSE; - - SetFilename(filename, TRUE); - Modify(FALSE); - UpdateAllViews(); - return TRUE; -} - -bool TextEditDocument::IsModified(void) const -{ - TextEditView *view = (TextEditView *)GetFirstView(); - if (view) - { - return (wxDocument::IsModified() || view->textsw->IsModified()); - } - else - return wxDocument::IsModified(); -} - -void TextEditDocument::Modify(bool mod) -{ - TextEditView *view = (TextEditView *)GetFirstView(); - - wxDocument::Modify(mod); - - if (!mod && view && view->textsw) - view->textsw->DiscardEdits(); -} diff --git a/samples/docview/doc.h b/samples/docview/doc.h deleted file mode 100644 index a83b45c877..0000000000 --- a/samples/docview/doc.h +++ /dev/null @@ -1,98 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: doc.h -// Purpose: Document classes -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma interface -#endif - -#ifndef __DOCSAMPLEH__ -#define __DOCSAMPLEH__ - -#include "wx/docview.h" - -// Plots a line from one point to the other -class DoodleLine: public wxObject -{ - public: - long x1; - long y1; - long x2; - long y2; -}; - -// Contains a list of lines: represents a mouse-down doodle -class DoodleSegment: public wxObject -{ - public: - wxList lines; - - DoodleSegment(void); - DoodleSegment(DoodleSegment& seg); - ~DoodleSegment(void); - - void Draw(wxDC *dc); - ostream& SaveObject(ostream& stream); - istream& LoadObject(istream& stream); -}; - -class DrawingDocument: public wxDocument -{ - DECLARE_DYNAMIC_CLASS(DrawingDocument) - private: - public: - wxList doodleSegments; - - DrawingDocument(void); - ~DrawingDocument(void); - - ostream& SaveObject(ostream& stream); - istream& LoadObject(istream& stream); - - inline wxList& GetDoodleSegments(void) const { return (wxList&) doodleSegments; }; -}; - -#define DOODLE_CUT 1 -#define DOODLE_ADD 2 - -class DrawingCommand: public wxCommand -{ - protected: - DoodleSegment *segment; - DrawingDocument *doc; - int cmd; - public: - DrawingCommand(const wxString& name, int cmd, DrawingDocument *ddoc, DoodleSegment *seg); - ~DrawingCommand(void); - - bool Do(void); - bool Undo(void); -}; - -class TextEditDocument: public wxDocument -{ - DECLARE_DYNAMIC_CLASS(TextEditDocument) - private: - public: -/* - ostream& SaveObject(ostream& stream); - istream& LoadObject(istream& stream); -*/ - virtual bool OnSaveDocument(const wxString& filename); - virtual bool OnOpenDocument(const wxString& filename); - virtual bool IsModified(void) const; - virtual void Modify(bool mod); - - TextEditDocument(void) {} - ~TextEditDocument(void) {} -}; - - -#endif diff --git a/samples/docview/doc.ico b/samples/docview/doc.ico deleted file mode 100644 index 34b1d7bc93..0000000000 Binary files a/samples/docview/doc.ico and /dev/null differ diff --git a/samples/docview/docview.cpp b/samples/docview/docview.cpp deleted file mode 100644 index 1d814fd140..0000000000 --- a/samples/docview/docview.cpp +++ /dev/null @@ -1,268 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: docview.cpp -// Purpose: Document/view demo -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma implementation "docview.h" -#endif - -/* - * Purpose: Document/view architecture demo for wxWindows class library - * Run with no arguments for multiple top-level windows, -single - * for a single window. - */ - - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#if !USE_DOC_VIEW_ARCHITECTURE -#error You must set USE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h! -#endif - -#include "wx/docview.h" - -#include "docview.h" -#include "doc.h" -#include "view.h" - -MyFrame *frame = (MyFrame *) NULL; - -// In single window mode, don't have any child windows; use -// main window. -bool singleWindowMode = FALSE; - -IMPLEMENT_APP(MyApp) - -MyApp::MyApp(void) -{ - m_docManager = (wxDocManager *) NULL; -} - -bool MyApp::OnInit(void) -{ - //// Find out if we're: - //// SDI : multiple windows and documents but not MDI - //// MDI : multiple windows and documents with containing frame - MSW only) - /// single window : (one document at a time, only one frame, as in Windows Write) - if (argc > 1) - { - if (strcmp(argv[1], "-single") == 0) - { - singleWindowMode = TRUE; - } - } - - //// Create a document manager - m_docManager = new wxDocManager; - - //// Create a template relating drawing documents to their views - (void) new wxDocTemplate(m_docManager, "Drawing", "*.drw", "", "drw", "Drawing Doc", "Drawing View", - CLASSINFO(DrawingDocument), CLASSINFO(DrawingView)); - - if (singleWindowMode) - { - // If we've only got one window, we only get to edit - // one document at a time. Therefore no text editing, just - // doodling. - m_docManager->SetMaxDocsOpen(1); - } - else - //// Create a template relating text documents to their views - (void) new wxDocTemplate(m_docManager, "Text", "*.txt", "", "txt", "Text Doc", "Text View", - CLASSINFO(TextEditDocument), CLASSINFO(TextEditView)); - - //// Create the main frame window - frame = new MyFrame(m_docManager, (wxFrame *) NULL, -1, "DocView Demo", wxPoint(0, 0), wxSize(500, 400), wxDEFAULT_FRAME_STYLE); - - //// Give it an icon (this is ignored in MDI mode: uses resources) -#ifdef __WXMSW__ - frame->SetIcon(wxIcon("doc_icn")); -#endif - - //// Make a menubar - wxMenu *file_menu = new wxMenu; - wxMenu *edit_menu = (wxMenu *) NULL; - - file_menu->Append(wxID_NEW, "&New..."); - file_menu->Append(wxID_OPEN, "&Open..."); - - if (singleWindowMode) - { - file_menu->Append(wxID_CLOSE, "&Close"); - file_menu->Append(wxID_SAVE, "&Save"); - file_menu->Append(wxID_SAVEAS, "Save &As..."); - file_menu->AppendSeparator(); - file_menu->Append(wxID_PRINT, "&Print..."); - file_menu->Append(wxID_PRINT_SETUP, "Print &Setup..."); - file_menu->Append(wxID_PREVIEW, "Print Pre&view"); - - edit_menu = new wxMenu; - edit_menu->Append(wxID_UNDO, "&Undo"); - edit_menu->Append(wxID_REDO, "&Redo"); - edit_menu->AppendSeparator(); - edit_menu->Append(DOCVIEW_CUT, "&Cut last segment"); - - frame->editMenu = edit_menu; - } - - file_menu->AppendSeparator(); - file_menu->Append(wxID_EXIT, "E&xit"); - - // A nice touch: a history of files visited. Use this menu. - m_docManager->FileHistoryUseMenu(file_menu); - - wxMenu *help_menu = new wxMenu; - help_menu->Append(DOCVIEW_ABOUT, "&About"); - - wxMenuBar *menu_bar = new wxMenuBar; - - menu_bar->Append(file_menu, "&File"); - if (edit_menu) - menu_bar->Append(edit_menu, "&Edit"); - menu_bar->Append(help_menu, "&Help"); - - if (singleWindowMode) - frame->canvas = frame->CreateCanvas((wxView *) NULL, frame); - - //// Associate the menu bar with the frame - frame->SetMenuBar(menu_bar); - - frame->Centre(wxBOTH); - frame->Show(TRUE); - - SetTopWindow(frame); - return TRUE; -} - -int MyApp::OnExit(void) -{ - delete m_docManager; - return 0; -} - -/* - * Centralised code for creating a document frame. - * Called from view.cpp, when a view is created, but not used at all - * in 'single window' mode. - */ - -wxFrame *MyApp::CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas) -{ - //// Make a child frame - wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, GetMainFrame(), -1, "Child Frame", - wxPoint(10, 10), wxSize(300, 300), wxDEFAULT_FRAME_STYLE); - -#ifdef __WXMSW__ - subframe->SetIcon(wxString(isCanvas ? "chrt_icn" : "notepad_icn")); -#endif - - //// Make a menubar - wxMenu *file_menu = new wxMenu; - - file_menu->Append(wxID_NEW, "&New..."); - file_menu->Append(wxID_OPEN, "&Open..."); - file_menu->Append(wxID_CLOSE, "&Close"); - file_menu->Append(wxID_SAVE, "&Save"); - file_menu->Append(wxID_SAVEAS, "Save &As..."); - - if (isCanvas) - { - file_menu->AppendSeparator(); - file_menu->Append(wxID_PRINT, "&Print..."); - file_menu->Append(wxID_PRINT_SETUP, "Print &Setup..."); - file_menu->Append(wxID_PREVIEW, "Print Pre&view"); - } - - wxMenu *edit_menu = (wxMenu *) NULL; - - if (isCanvas) - { - edit_menu = new wxMenu; - edit_menu->Append(wxID_UNDO, "&Undo"); - edit_menu->Append(wxID_REDO, "&Redo"); - edit_menu->AppendSeparator(); - edit_menu->Append(DOCVIEW_CUT, "&Cut last segment"); - - doc->GetCommandProcessor()->SetEditMenu(edit_menu); - } - - wxMenu *help_menu = new wxMenu; - help_menu->Append(DOCVIEW_ABOUT, "&About"); - - wxMenuBar *menu_bar = new wxMenuBar; - - menu_bar->Append(file_menu, "&File"); - if (isCanvas) - menu_bar->Append(edit_menu, "&Edit"); - menu_bar->Append(help_menu, "&Help"); - - //// Associate the menu bar with the frame - subframe->SetMenuBar(menu_bar); - - subframe->Centre(wxBOTH); - - return subframe; -} - -/* - * This is the top-level window of the application. - */ - -IMPLEMENT_CLASS(MyFrame, wxDocParentFrame) -BEGIN_EVENT_TABLE(MyFrame, wxDocParentFrame) - EVT_MENU(DOCVIEW_ABOUT, MyFrame::OnAbout) -END_EVENT_TABLE() - -MyFrame::MyFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, const long type): - wxDocParentFrame(manager, frame, id, title, pos, size, type) -{ - // This pointer only needed if in single window mode - canvas = (MyCanvas *) NULL; - editMenu = (wxMenu *) NULL; -} - -void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) -{ - (void)wxMessageBox("DocView Demo\nAuthor: Julian Smart julian.smart@ukonline.co.uk\nUsage: docview.exe [-single]", "About DocView"); -} - -// Creates a canvas. Called either from view.cc when a new drawing -// view is created, or in OnInit as a child of the main window, -// if in 'single window' mode. -MyCanvas *MyFrame::CreateCanvas(wxView *view, wxFrame *parent) -{ - int width, height; - parent->GetClientSize(&width, &height); - - // Non-retained canvas - MyCanvas *canvas = new MyCanvas(view, parent, wxPoint(0, 0), wxSize(width, height), 0); - canvas->SetCursor(wxCursor(wxCURSOR_PENCIL)); - - // Give it scrollbars - canvas->SetScrollbars(20, 20, 50, 50); - - return canvas; -} - -MyFrame *GetMainFrame(void) -{ - return frame; -} - diff --git a/samples/docview/docview.def b/samples/docview/docview.def deleted file mode 100644 index 78ac0eda3f..0000000000 --- a/samples/docview/docview.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME DocView -DESCRIPTION 'Document architecture test' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 8192 diff --git a/samples/docview/docview.h b/samples/docview/docview.h deleted file mode 100644 index fb9201406f..0000000000 --- a/samples/docview/docview.h +++ /dev/null @@ -1,66 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: docview.h -// Purpose: Document/view demo -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma interface "docview.h" -#endif - -#ifndef __DOCVIEWSAMPLEH__ -#define __DOCVIEWSAMPLEH__ - -#include "wx/docview.h" - -class wxDocManager; - -// Define a new application -class MyApp: public wxApp -{ - public: - MyApp(void); - bool OnInit(void); - int OnExit(void); - - wxFrame *CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas); - - protected: - wxDocManager* m_docManager; -}; - -DECLARE_APP(MyApp) - -// Define a new frame -class MyCanvas; -class MyFrame: public wxDocParentFrame -{ - DECLARE_CLASS(MyFrame) - public: - wxMenu *editMenu; - - // This pointer only needed if in single window mode - MyCanvas *canvas; - - MyFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, - const long type); - - void OnAbout(wxCommandEvent& event); - MyCanvas *CreateCanvas(wxView *view, wxFrame *parent); - -DECLARE_EVENT_TABLE() -}; - -extern MyFrame *GetMainFrame(void); - -#define DOCVIEW_CUT 1 -#define DOCVIEW_ABOUT 2 - -extern bool singleWindowMode; - -#endif diff --git a/samples/docview/docview.rc b/samples/docview/docview.rc deleted file mode 100644 index 19c382a856..0000000000 --- a/samples/docview/docview.rc +++ /dev/null @@ -1,5 +0,0 @@ -doc_icn ICON "doc.ico" -chrt_icn ICON "chart.ico" -notepad_icn ICON "notepad.ico" -#include "wx/msw/wx.rc" - diff --git a/samples/docview/makefile.b32 b/samples/docview/makefile.b32 deleted file mode 100644 index f81b4d3365..0000000000 --- a/samples/docview/makefile.b32 +++ /dev/null @@ -1,67 +0,0 @@ -# -# File: makefile.b32 -# Author: Patrick Halke -# Created: 1995 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds 32bit buttonbar example. - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXLIB=$(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 - -TARGET=docview - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = docview.obj doc.obj view.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -docview.obj: docview.$(SRCSUFF) docview.h - -doc.obj: doc.$(SRCSUFF) doc.h - -view.obj: view.$(SRCSUFF) view.h - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - diff --git a/samples/docview/makefile.bcc b/samples/docview/makefile.bcc deleted file mode 100644 index 186bee0653..0000000000 --- a/samples/docview/makefile.bcc +++ /dev/null @@ -1,77 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds docview example (DOS). - -!if "$(BCCDIR)" == "" -!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 -!endif - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -!ifndef FINAL -FINAL=0 -!endif - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makebcc.env - -THISDIR = $(WXDIR)\samples\docview -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) mathwl cwl import -INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw -CFG=$(WXDIR)\src\wxwin.cfg - -!if "$(FINAL)" == "0" -LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -O2 -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = docview.obj doc.obj view.obj - -docview: docview.exe - -all: docview.exe - -docview.exe: $(WXLIB) $(OBJECTS) docview.def docview.res - tlink $(LINKFLAGS) @&&! -c0wl.obj $(OBJECTS) -docview -nul -$(LIBS) -docview.def -! - rc -30 -K docview.res - -.$(SRCSUFF).obj: - bcc $(CPPFLAGS) -c {$< } - -docview.obj: docview.$(SRCSUFF) - -doc.obj: doc.$(SRCSUFF) - -view.obj: view.$(SRCSUFF) - -docview.res : docview.rc $(WXDIR)\include\msw\wx.rc - rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa docview - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws diff --git a/samples/docview/makefile.dos b/samples/docview/makefile.dos deleted file mode 100644 index 3e32b22dce..0000000000 --- a/samples/docview/makefile.dos +++ /dev/null @@ -1,74 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1995 -# Updated: -# Copyright: (c) 1995, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds docview example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\docview -INC=/I$(WXDIR)\include - -HEADERS = docview.h -SOURCES = docview.$(SRCSUFF) -OBJECTS = docview.obj doc.obj view.obj - -all: docview.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -docview.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) docview.def docview.res - link $(LINKFLAGS) @<< -$(WXDIR)\src\msw\dummy.obj $(OBJECTS), -docview, -NUL, -$(LIBS), -docview.def -; -<< - rc -30 -K docview.res - -docview.obj: docview.h docview.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -view.obj: view.h view.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -doc.obj: doc.h doc.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -docview.res : docview.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /dFAFA_LIB /i$(WXDIR)\include docview - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb - diff --git a/samples/docview/makefile.g95 b/samples/docview/makefile.g95 deleted file mode 100644 index 5fe3bf52db..0000000000 --- a/samples/docview/makefile.g95 +++ /dev/null @@ -1,43 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for docview example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/docview.$(OBJSUFF) $(OBJDIR)/view.$(OBJSUFF) $(OBJDIR)/doc.$(OBJSUFF)\ - $(OBJDIR)/docview_resources.$(OBJSUFF) - - -all: $(OBJDIR) docview$(GUISUFFIX) - -$(OBJDIR): - mkdir $(OBJDIR) - -docview$(GUISUFFIX): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o docview$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(XVIEW_LINK) $(LDLIBS) - -$(OBJDIR)/docview.$(OBJSUFF): docview.$(SRCSUFF) docview.h doc.h view.h - $(CC) -c $(CPPFLAGS) -o $@ docview.$(SRCSUFF) - -$(OBJDIR)/doc.$(OBJSUFF): doc.$(SRCSUFF) doc.h - $(CC) -c $(CPPFLAGS) -o $@ doc.$(SRCSUFF) - -$(OBJDIR)/view.$(OBJSUFF): view.$(SRCSUFF) view.h - $(CC) -c $(CPPFLAGS) -o $@ view.$(SRCSUFF) - -$(OBJDIR)/docview_resources.o: docview.rc - $(RESCOMP) -i docview.rc -o $(OBJDIR)/docview_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) docview$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/docview/makefile.nt b/samples/docview/makefile.nt deleted file mode 100644 index d17489dd3a..0000000000 --- a/samples/docview/makefile.nt +++ /dev/null @@ -1,75 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds docview example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\docview -PROGRAM=docview - -OBJECTS = $(PROGRAM).obj doc.obj view.obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - -$(PROGRAM).obj: $(PROGRAM).h doc.h view.h $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -doc.obj: doc.h doc.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -view.obj: view.h view.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb - -erase *.sbr - - diff --git a/samples/docview/makefile.sc b/samples/docview/makefile.sc deleted file mode 100644 index 250054f91f..0000000000 --- a/samples/docview/makefile.sc +++ /dev/null @@ -1,38 +0,0 @@ -# Symantec C++ makefile for docview example -# NOTE that peripheral libraries are now dealt in main wxWindows makefile. - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makesc.env - -WXLIB = $(WXDIR)\lib\wx.lib -INCDIR = $(WXDIR)\include -MSWINC = $(INCDIR)\msw -BASEINC = $(INCDIR)\base - -CC=sc -RC=rc -CFLAGS = -o -ml -W -Dwx_msw -LDFLAGS = -ml -W - -INCLUDE=$(BASEINC);$(MSWINC) - -LIBS=$(WXLIB) libw.lib commdlg.lib shell.lib - -OBJECTS=docview.obj view.obj doc.obj - -.$(SRCSUFF).obj: - *$(CC) -c $(CFLAGS) -I$(INCLUDE) $< - -.rc.res: - *$(RC) -r -I$(INCLUDE) $< - -docview.exe: $(OBJECTS) docview.def docview.res - *$(CC) $(LDFLAGS) -o$@ $(OBJECTS) docview.def $(LIBS) - *$(RC) -k docview.res - -clean: - -del *.obj - -del *.exe - -del *.res - -del *.map - -del *.rws diff --git a/samples/docview/makefile.unx b/samples/docview/makefile.unx deleted file mode 100644 index bbdccc3fc4..0000000000 --- a/samples/docview/makefile.unx +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for docview example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/make.env - -OBJECTS = $(OBJDIR)/docview.$(OBJSUFF) $(OBJDIR)/view.$(OBJSUFF) $(OBJDIR)/doc.$(OBJSUFF) - -.SUFFIXES: - -all: $(OBJDIR) wx$(GUISUFFIX) docview$(GUISUFFIX) - -wx_motif: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif - -wx_ol: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview -motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK= - -xview: - $(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' - -hp: - $(MAKE) -f makefile,unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' WARN='-w' \ - XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' LDLIBS='$(HPLDLIBS)' - -$(OBJDIR): - mkdir $(OBJDIR) - -docview$(GUISUFFIX): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o docview$(GUISUFFIX) $(OBJECTS) $(XVIEW_LINK) $(LDLIBS) - -$(OBJDIR)/docview.$(OBJSUFF): docview.$(SRCSUFF) docview.h doc.h view.h - $(CC) -c $(CPPFLAGS) -o $@ docview.$(SRCSUFF) - -$(OBJDIR)/doc.$(OBJSUFF): doc.$(SRCSUFF) doc.h - $(CC) -c $(CPPFLAGS) -o $@ doc.$(SRCSUFF) - -$(OBJDIR)/view.$(OBJSUFF): view.$(SRCSUFF) view.h - $(CC) -c $(CPPFLAGS) -o $@ view.$(SRCSUFF) - -clean_motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany - -clean_ol: - $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany - -clean_hp: - $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany - -cleanany: - rm -f $(OBJECTS) docview$(GUISUFFIX) core diff --git a/samples/docview/makefile.vms b/samples/docview/makefile.vms deleted file mode 100644 index 1a64fc7f30..0000000000 --- a/samples/docview/makefile.vms +++ /dev/null @@ -1,44 +0,0 @@ -#************************************************************************ -# Makefile for DOCVIEW under VMS -# by Stefan Hammes -# (incomplete) update history: -# 09.06.95 -#************************************************************************ - -#************************************************************************ -# Definition section -# (cave: definitions and includes must begin with ',') -#************************************************************************ - -APPOPTS = -APPDEFS = -APPINCS = - -#************************************************************************ -# Module section -#************************************************************************ - -# Name of main module -MAIN = docview - -# Object modules of the application. -OBJS = docview.obj view.obj doc.obj -OBJLIST =docview.obj,view.obj,doc.obj - -.include [--.src]makevms.env - -# main dependency -$(MAIN).exe : $(OBJS) - $(LINK) $(LINKFLAGS) /exec=$(MAIN).exe $(OBJLIST),$(WXLIB)/lib,$(OPTSFILE)/option - - purge *.exe - -#************************************************************************ -# Header file depedencies following -#************************************************************************ - -docview.$(OBJSUFF) : docview.$(SRCSUFF) docview.h doc.h view.h - -doc.$(OBJSUFF) : doc.$(SRCSUFF) doc.h - -view.$(OBJSUFF) : view.$(SRCSUFF) view.h - diff --git a/samples/docview/makefile.wat b/samples/docview/makefile.wat deleted file mode 100644 index bafa16f3a5..0000000000 --- a/samples/docview/makefile.wat +++ /dev/null @@ -1,43 +0,0 @@ -# -# Makefile for WATCOM -# -# Created by D.Chubraev, chubraev@iem.ee.ethz.ch -# 8 Nov 1994 -# - -WXDIR = ..\.. - -!include $(WXDIR)\src\makewat.env - -WXLIB = $(WXDIR)\lib -NAME = docview -LNK = $(name).lnk -OBJS = $(name).obj doc.obj view.obj - -all: $(name).exe - -$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib - wlink @$(LNK) - $(BINDCOMMAND) $(name).res - -$(name).res : $(name).rc $(WXDIR)\include\msw\wx.rc - $(RC) $(RESFLAGS1) $(name).rc - -$(LNK) : makefile.wat - %create $(LNK) - @%append $(LNK) debug all - @%append $(LNK) system $(LINKOPTION) - @%append $(LNK) $(MINDATA) - @%append $(LNK) $(MAXDATA) - @%append $(LNK) $(STACK) - @%append $(LNK) name $(name) - @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib - @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i - @for %i in ($(OBJS)) do @%append $(LNK) file %i - -thing: .SYMBOLIC - echo $(WATLIBDIR) - -clean: .SYMBOLIC - -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex - diff --git a/samples/docview/mondrian.ico b/samples/docview/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/samples/docview/mondrian.ico and /dev/null differ diff --git a/samples/docview/mondrian.xpm b/samples/docview/mondrian.xpm deleted file mode 100644 index 409f27a843..0000000000 --- a/samples/docview/mondrian.xpm +++ /dev/null @@ -1,44 +0,0 @@ -/* XPM */ -static char *mondrian_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 6 1", -" c Black", -". c Blue", -"X c #00bf00", -"o c Red", -"O c Yellow", -"+ c Gray100", -/* pixels */ -" ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" " -}; diff --git a/samples/docview/notepad.ico b/samples/docview/notepad.ico deleted file mode 100644 index 5d07bf79a3..0000000000 Binary files a/samples/docview/notepad.ico and /dev/null differ diff --git a/samples/docview/view.cpp b/samples/docview/view.cpp deleted file mode 100644 index b56acd402a..0000000000 --- a/samples/docview/view.cpp +++ /dev/null @@ -1,286 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: view.cpp -// Purpose: View classes -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma implementation -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#if !USE_DOC_VIEW_ARCHITECTURE -#error You must set USE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h! -#endif - -#include "docview.h" -#include "doc.h" -#include "view.h" - -IMPLEMENT_DYNAMIC_CLASS(DrawingView, wxView) - -// For drawing lines in a canvas -float xpos = -1; -float ypos = -1; - -BEGIN_EVENT_TABLE(DrawingView, wxView) - EVT_MENU(DOODLE_CUT, DrawingView::OnCut) -END_EVENT_TABLE() - -// What to do when a view is created. Creates actual -// windows for displaying the view. -bool DrawingView::OnCreate(wxDocument *doc, long WXUNUSED(flags) ) -{ - if (!singleWindowMode) - { - // Multiple windows - frame = wxGetApp().CreateChildFrame(doc, this, TRUE); - frame->SetTitle("DrawingView"); - - canvas = GetMainFrame()->CreateCanvas(this, frame); -#ifdef __X__ - // X seems to require a forced resize - int x, y; - frame->GetSize(&x, &y); - frame->SetSize(x, y); -#endif - frame->Show(TRUE); - } - else - { - // Single-window mode - frame = GetMainFrame(); - canvas = GetMainFrame()->canvas; - canvas->view = this; - - // Associate the appropriate frame with this view. - SetFrame(frame); - - // Make sure the document manager knows that this is the - // current view. - Activate(TRUE); - - // Initialize the edit menu Undo and Redo items - doc->GetCommandProcessor()->SetEditMenu(((MyFrame *)frame)->editMenu); - doc->GetCommandProcessor()->Initialize(); - } - - return TRUE; -} - -// Sneakily gets used for default print/preview -// as well as drawing on the screen. -void DrawingView::OnDraw(wxDC *dc) -{ - dc->SetFont(*wxNORMAL_FONT); - dc->SetPen(*wxBLACK_PEN); - - wxNode *node = ((DrawingDocument *)GetDocument())->GetDoodleSegments().First(); - while (node) - { - DoodleSegment *seg = (DoodleSegment *)node->Data(); - seg->Draw(dc); - node = node->Next(); - } -} - -void DrawingView::OnUpdate(wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint)) -{ - if (canvas) - canvas->Refresh(); - -/* Is the following necessary? -#ifdef __WXMSW__ - if (canvas) - canvas->Refresh(); -#else - if (canvas) - { - wxClientDC dc(canvas); - dc.Clear(); - OnDraw(& dc); - } -#endif -*/ -} - -// Clean up windows used for displaying the view. -bool DrawingView::OnClose(bool deleteWindow) -{ - if (!GetDocument()->Close()) - return FALSE; - - // Clear the canvas in case we're in single-window mode, - // and the canvas stays. - canvas->Clear(); - canvas->view = (wxView *) NULL; - canvas = (MyCanvas *) NULL; - - wxString s(wxTheApp->GetAppName()); - if (frame) - frame->SetTitle(s); - - SetFrame((wxFrame *) NULL); - - Activate(FALSE); - - if (deleteWindow && !singleWindowMode) - { - delete frame; - return TRUE; - } - return TRUE; -} - -void DrawingView::OnCut(wxCommandEvent& WXUNUSED(event) ) -{ - DrawingDocument *doc = (DrawingDocument *)GetDocument(); - doc->GetCommandProcessor()->Submit(new DrawingCommand((char *) "Cut Last Segment", DOODLE_CUT, doc, (DoodleSegment *) NULL)); -} - -IMPLEMENT_DYNAMIC_CLASS(TextEditView, wxView) - -bool TextEditView::OnCreate(wxDocument *doc, long WXUNUSED(flags) ) -{ - frame = wxGetApp().CreateChildFrame(doc, this, FALSE); - - int width, height; - frame->GetClientSize(&width, &height); - textsw = new MyTextWindow(this, frame, wxPoint(0, 0), wxSize(width, height), wxTE_MULTILINE); - frame->SetTitle("TextEditView"); - -#ifdef __X__ - // X seems to require a forced resize - int x, y; - frame->GetSize(&x, &y); - frame->SetSize(x, y); -#endif - - frame->Show(TRUE); - Activate(TRUE); - - return TRUE; -} - -// Handled by wxTextWindow -void TextEditView::OnDraw(wxDC *WXUNUSED(dc) ) -{ -} - -void TextEditView::OnUpdate(wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) ) -{ -} - -bool TextEditView::OnClose(bool deleteWindow) -{ - if (!GetDocument()->Close()) - return FALSE; - - Activate(FALSE); - - if (deleteWindow) - { - delete frame; - return TRUE; - } - return TRUE; -} - -/* - * Window implementations - */ - -BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow) - EVT_MOUSE_EVENTS(MyCanvas::OnMouseEvent) -END_EVENT_TABLE() - -// Define a constructor for my canvas -MyCanvas::MyCanvas(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style): - wxScrolledWindow(frame, -1, pos, size, style) -{ - view = v; -} - -// Define the repainting behaviour -void MyCanvas::OnDraw(wxDC& dc) -{ - if (view) - view->OnDraw(& dc); -} - -// This implements a tiny doodling program. Drag the mouse using -// the left button. -void MyCanvas::OnMouseEvent(wxMouseEvent& event) -{ - if (!view) - return; - - static DoodleSegment *currentSegment = (DoodleSegment *) NULL; - - wxClientDC dc(this); - PrepareDC(dc); - - dc.SetPen(*wxBLACK_PEN); - - wxPoint pt(event.GetLogicalPosition(dc)); - - if (currentSegment && event.LeftUp()) - { - if (currentSegment->lines.Number() == 0) - { - delete currentSegment; - currentSegment = (DoodleSegment *) NULL; - } - else - { - // We've got a valid segment on mouse left up, so store it. - DrawingDocument *doc = (DrawingDocument *)view->GetDocument(); - - doc->GetCommandProcessor()->Submit(new DrawingCommand("Add Segment", DOODLE_ADD, doc, currentSegment)); - - view->GetDocument()->Modify(TRUE); - currentSegment = (DoodleSegment *) NULL; - } - } - - if (xpos > -1 && ypos > -1 && event.Dragging()) - { - if (!currentSegment) - currentSegment = new DoodleSegment; - - DoodleLine *newLine = new DoodleLine; - newLine->x1 = (long)xpos; - newLine->y1 = (long)ypos; - newLine->x2 = pt.x; - newLine->y2 = pt.y; - currentSegment->lines.Append(newLine); - - dc.DrawLine( (long)xpos, (long)ypos, pt.x, pt.y); - } - xpos = pt.x; - ypos = pt.y; -} - -// Define a constructor for my text subwindow -MyTextWindow::MyTextWindow(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style): - wxTextCtrl(frame, -1, "", pos, size, style) -{ - view = v; -} - - diff --git a/samples/docview/view.h b/samples/docview/view.h deleted file mode 100644 index 2f068c7c04..0000000000 --- a/samples/docview/view.h +++ /dev/null @@ -1,79 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: view.h -// Purpose: View classes -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma interface -#endif - -#ifndef __VIEWSAMPLEH__ -#define __VIEWSAMPLEH__ - -#include "wx/docview.h" - -class MyCanvas: public wxScrolledWindow -{ - public: - wxView *view; - - MyCanvas(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style); - virtual void OnDraw(wxDC& dc); - void OnMouseEvent(wxMouseEvent& event); - -DECLARE_EVENT_TABLE() -}; - -class MyTextWindow: public wxTextCtrl -{ - public: - wxView *view; - - MyTextWindow(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style); -}; - -class DrawingView: public wxView -{ - DECLARE_DYNAMIC_CLASS(DrawingView) - private: - public: - wxFrame *frame; - MyCanvas *canvas; - - DrawingView(void) { canvas = (MyCanvas *) NULL; frame = (wxFrame *) NULL; }; - ~DrawingView(void) {}; - - bool OnCreate(wxDocument *doc, long flags); - void OnDraw(wxDC *dc); - void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL); - bool OnClose(bool deleteWindow = TRUE); - - void OnCut(wxCommandEvent& event); - -DECLARE_EVENT_TABLE() -}; - -class TextEditView: public wxView -{ - DECLARE_DYNAMIC_CLASS(TextEditView) - private: - public: - wxFrame *frame; - MyTextWindow *textsw; - - TextEditView(wxDocument *doc = (wxDocument *) NULL): wxView(doc) { frame = (wxFrame *) NULL; textsw = (MyTextWindow *) NULL; } - ~TextEditView(void) {} - - bool OnCreate(wxDocument *doc, long flags); - void OnDraw(wxDC *dc); - void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL); - bool OnClose(bool deleteWindow = TRUE); -}; - -#endif diff --git a/samples/docvwmdi/.cvsignore b/samples/docvwmdi/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/docvwmdi/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/docvwmdi/Makefile b/samples/docvwmdi/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/docvwmdi/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/docvwmdi/Makefile.in b/samples/docvwmdi/Makefile.in deleted file mode 100644 index 7f81acbf0f..0000000000 --- a/samples/docvwmdi/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# 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 diff --git a/samples/docvwmdi/chart.ico b/samples/docvwmdi/chart.ico deleted file mode 100644 index d2bcfea7f6..0000000000 Binary files a/samples/docvwmdi/chart.ico and /dev/null differ diff --git a/samples/docvwmdi/doc.cpp b/samples/docvwmdi/doc.cpp deleted file mode 100644 index f8a7206faf..0000000000 --- a/samples/docvwmdi/doc.cpp +++ /dev/null @@ -1,275 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: doc.cpp -// Purpose: Implements document functionality -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma implementation -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#if !USE_DOC_VIEW_ARCHITECTURE -#error You must set USE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h! -#endif - -#include "doc.h" -#include "view.h" - -IMPLEMENT_DYNAMIC_CLASS(DrawingDocument, wxDocument) - -DrawingDocument::DrawingDocument(void) -{ -} - -DrawingDocument::~DrawingDocument(void) -{ - doodleSegments.DeleteContents(TRUE); -} - -ostream& DrawingDocument::SaveObject(ostream& stream) -{ - wxDocument::SaveObject(stream); - - stream << doodleSegments.Number() << '\n'; - wxNode *node = doodleSegments.First(); - while (node) - { - DoodleSegment *segment = (DoodleSegment *)node->Data(); - segment->SaveObject(stream); - stream << '\n'; - - node = node->Next(); - } - return stream; -} - -istream& DrawingDocument::LoadObject(istream& stream) -{ - wxDocument::LoadObject(stream); - - int n = 0; - stream >> n; - - for (int i = 0; i < n; i++) - { - DoodleSegment *segment = new DoodleSegment; - segment->LoadObject(stream); - doodleSegments.Append(segment); - } - - return stream; -} - -DoodleSegment::DoodleSegment(void) -{ -} - -DoodleSegment::DoodleSegment(DoodleSegment& seg) -{ - wxNode *node = seg.lines.First(); - while (node) - { - DoodleLine *line = (DoodleLine *)node->Data(); - DoodleLine *newLine = new DoodleLine; - newLine->x1 = line->x1; - newLine->y1 = line->y1; - newLine->x2 = line->x2; - newLine->y2 = line->y2; - - lines.Append(newLine); - - node = node->Next(); - } -} - -DoodleSegment::~DoodleSegment(void) -{ - lines.DeleteContents(TRUE); -} - -ostream& DoodleSegment::SaveObject(ostream& stream) -{ - stream << lines.Number() << '\n'; - wxNode *node = lines.First(); - while (node) - { - DoodleLine *line = (DoodleLine *)node->Data(); - stream << line->x1 << " " << line->y1 << " " << line->x2 << " " << line->y2 << "\n"; - node = node->Next(); - } - return stream; -} - -istream& DoodleSegment::LoadObject(istream& stream) -{ - int n = 0; - stream >> n; - - for (int i = 0; i < n; i++) - { - DoodleLine *line = new DoodleLine; - stream >> line->x1 >> line->y1 >> line->x2 >> line->y2; - lines.Append(line); - } - return stream; -} - -void DoodleSegment::Draw(wxDC *dc) -{ - wxNode *node = lines.First(); - while (node) - { - DoodleLine *line = (DoodleLine *)node->Data(); - dc->DrawLine(line->x1, line->y1, line->x2, line->y2); - node = node->Next(); - } -} - -/* - * Implementation of drawing command - */ - -DrawingCommand::DrawingCommand(const wxString& name, int command, DrawingDocument *ddoc, DoodleSegment *seg): - wxCommand(TRUE, name) -{ - doc = ddoc; - segment = seg; - cmd = command; -} - -DrawingCommand::~DrawingCommand(void) -{ - if (segment) - delete segment; -} - -bool DrawingCommand::Do(void) -{ - switch (cmd) - { - case DOODLE_CUT: - { - // Cut the last segment - if (doc->GetDoodleSegments().Number() > 0) - { - wxNode *node = doc->GetDoodleSegments().Last(); - if (segment) - delete segment; - - segment = (DoodleSegment *)node->Data(); - delete node; - - doc->Modify(TRUE); - doc->UpdateAllViews(); - } - break; - } - case DOODLE_ADD: - { - doc->GetDoodleSegments().Append(new DoodleSegment(*segment)); - doc->Modify(TRUE); - doc->UpdateAllViews(); - break; - } - } - return TRUE; -} - -bool DrawingCommand::Undo(void) -{ - switch (cmd) - { - case DOODLE_CUT: - { - // Paste the segment - if (segment) - { - doc->GetDoodleSegments().Append(segment); - doc->Modify(TRUE); - doc->UpdateAllViews(); - segment = (DoodleSegment *) NULL; - } - doc->Modify(TRUE); - doc->UpdateAllViews(); - break; - } - case DOODLE_ADD: - { - // Cut the last segment - if (doc->GetDoodleSegments().Number() > 0) - { - wxNode *node = doc->GetDoodleSegments().Last(); - DoodleSegment *seg = (DoodleSegment *)node->Data(); - delete seg; - delete node; - - doc->Modify(TRUE); - doc->UpdateAllViews(); - } - } - } - return TRUE; -} - -IMPLEMENT_DYNAMIC_CLASS(TextEditDocument, wxDocument) - -// Since text windows have their own method for saving to/loading from files, -// we override OnSave/OpenDocument instead of Save/LoadObject -bool TextEditDocument::OnSaveDocument(const wxString& filename) -{ - TextEditView *view = (TextEditView *)GetFirstView(); - - if (!view->textsw->SaveFile(filename)) - return FALSE; - Modify(FALSE); - return TRUE; -} - -bool TextEditDocument::OnOpenDocument(const wxString& filename) -{ - TextEditView *view = (TextEditView *)GetFirstView(); - if (!view->textsw->LoadFile(filename)) - return FALSE; - - SetFilename(filename, TRUE); - Modify(FALSE); - UpdateAllViews(); - return TRUE; -} - -bool TextEditDocument::IsModified(void) const -{ - TextEditView *view = (TextEditView *)GetFirstView(); - if (view) - { - return (wxDocument::IsModified() || view->textsw->IsModified()); - } - else - return wxDocument::IsModified(); -} - -void TextEditDocument::Modify(bool mod) -{ - TextEditView *view = (TextEditView *)GetFirstView(); - - wxDocument::Modify(mod); - - if (!mod && view && view->textsw) - view->textsw->DiscardEdits(); -} diff --git a/samples/docvwmdi/doc.h b/samples/docvwmdi/doc.h deleted file mode 100644 index a83b45c877..0000000000 --- a/samples/docvwmdi/doc.h +++ /dev/null @@ -1,98 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: doc.h -// Purpose: Document classes -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma interface -#endif - -#ifndef __DOCSAMPLEH__ -#define __DOCSAMPLEH__ - -#include "wx/docview.h" - -// Plots a line from one point to the other -class DoodleLine: public wxObject -{ - public: - long x1; - long y1; - long x2; - long y2; -}; - -// Contains a list of lines: represents a mouse-down doodle -class DoodleSegment: public wxObject -{ - public: - wxList lines; - - DoodleSegment(void); - DoodleSegment(DoodleSegment& seg); - ~DoodleSegment(void); - - void Draw(wxDC *dc); - ostream& SaveObject(ostream& stream); - istream& LoadObject(istream& stream); -}; - -class DrawingDocument: public wxDocument -{ - DECLARE_DYNAMIC_CLASS(DrawingDocument) - private: - public: - wxList doodleSegments; - - DrawingDocument(void); - ~DrawingDocument(void); - - ostream& SaveObject(ostream& stream); - istream& LoadObject(istream& stream); - - inline wxList& GetDoodleSegments(void) const { return (wxList&) doodleSegments; }; -}; - -#define DOODLE_CUT 1 -#define DOODLE_ADD 2 - -class DrawingCommand: public wxCommand -{ - protected: - DoodleSegment *segment; - DrawingDocument *doc; - int cmd; - public: - DrawingCommand(const wxString& name, int cmd, DrawingDocument *ddoc, DoodleSegment *seg); - ~DrawingCommand(void); - - bool Do(void); - bool Undo(void); -}; - -class TextEditDocument: public wxDocument -{ - DECLARE_DYNAMIC_CLASS(TextEditDocument) - private: - public: -/* - ostream& SaveObject(ostream& stream); - istream& LoadObject(istream& stream); -*/ - virtual bool OnSaveDocument(const wxString& filename); - virtual bool OnOpenDocument(const wxString& filename); - virtual bool IsModified(void) const; - virtual void Modify(bool mod); - - TextEditDocument(void) {} - ~TextEditDocument(void) {} -}; - - -#endif diff --git a/samples/docvwmdi/doc.ico b/samples/docvwmdi/doc.ico deleted file mode 100644 index 34b1d7bc93..0000000000 Binary files a/samples/docvwmdi/doc.ico and /dev/null differ diff --git a/samples/docvwmdi/docview.cpp b/samples/docvwmdi/docview.cpp deleted file mode 100644 index ca69f2be7c..0000000000 --- a/samples/docvwmdi/docview.cpp +++ /dev/null @@ -1,221 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: docview.cpp -// Purpose: Document/view demo -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma implementation "docview.h" -#endif - -/* - * Purpose: Document/view architecture demo for wxWindows class library - MDI - */ - - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#if !USE_DOC_VIEW_ARCHITECTURE -#error You must set USE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h! -#endif - -#include "docview.h" -#include "doc.h" -#include "view.h" - -MyFrame *frame = (MyFrame *) NULL; - -IMPLEMENT_APP(MyApp) - -MyApp::MyApp(void) -{ - m_docManager = (wxDocManager *) NULL; -} - -bool MyApp::OnInit(void) -{ - //// Create a document manager - m_docManager = new wxDocManager; - - //// Create a template relating drawing documents to their views - (void) new wxDocTemplate((wxDocManager *) m_docManager, "Drawing", "*.drw", "", "drw", "Drawing Doc", "Drawing View", - CLASSINFO(DrawingDocument), CLASSINFO(DrawingView)); - - //// Create a template relating text documents to their views - (void) new wxDocTemplate(m_docManager, "Text", "*.txt", "", "txt", "Text Doc", "Text View", - CLASSINFO(TextEditDocument), CLASSINFO(TextEditView)); - - //// Create the main frame window - frame = new MyFrame((wxDocManager *) m_docManager, (wxFrame *) NULL, (const wxString) "DocView Demo", wxPoint(0, 0), wxSize(500, 400), wxDEFAULT_FRAME_STYLE); - - //// Give it an icon (this is ignored in MDI mode: uses resources) -#ifdef __WXMSW__ - frame->SetIcon(wxIcon("doc")); -#endif -#ifdef __X__ - frame->SetIcon(wxIcon("doc.xbm")); -#endif - - //// Make a menubar - wxMenu *file_menu = new wxMenu; - wxMenu *edit_menu = (wxMenu *) NULL; - - file_menu->Append(wxID_NEW, "&New..."); - file_menu->Append(wxID_OPEN, "&Open..."); - - file_menu->AppendSeparator(); - file_menu->Append(wxID_EXIT, "E&xit"); - - // A nice touch: a history of files visited. Use this menu. - m_docManager->FileHistoryUseMenu(file_menu); - - wxMenu *help_menu = new wxMenu; - help_menu->Append(DOCVIEW_ABOUT, "&About"); - - wxMenuBar *menu_bar = new wxMenuBar; - - menu_bar->Append(file_menu, "&File"); - if (edit_menu) - menu_bar->Append(edit_menu, "&Edit"); - menu_bar->Append(help_menu, "&Help"); - - //// Associate the menu bar with the frame - frame->SetMenuBar(menu_bar); - - frame->Centre(wxBOTH); - frame->Show(TRUE); - - SetTopWindow(frame); - return TRUE; -} - -int MyApp::OnExit(void) -{ - delete m_docManager; - return 0; -} - -/* - * Centralised code for creating a document frame. - * Called from view.cpp, when a view is created. - */ - -wxMDIChildFrame *MyApp::CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas) -{ - //// Make a child frame - wxDocMDIChildFrame *subframe = new wxDocMDIChildFrame(doc, view, GetMainFrame(), -1, "Child Frame", - wxPoint(10, 10), wxSize(300, 300), wxDEFAULT_FRAME_STYLE); - -#ifdef __WXMSW__ - subframe->SetIcon(wxString(isCanvas ? "chart" : "notepad")); -#endif -#ifdef __X__ - subframe->SetIcon(wxIcon("doc.xbm")); -#endif - - //// Make a menubar - wxMenu *file_menu = new wxMenu; - - file_menu->Append(wxID_NEW, "&New..."); - file_menu->Append(wxID_OPEN, "&Open..."); - file_menu->Append(wxID_CLOSE, "&Close"); - file_menu->Append(wxID_SAVE, "&Save"); - file_menu->Append(wxID_SAVEAS, "Save &As..."); - - if (isCanvas) - { - file_menu->AppendSeparator(); - file_menu->Append(wxID_PRINT, "&Print..."); - file_menu->Append(wxID_PRINT_SETUP, "Print &Setup..."); - file_menu->Append(wxID_PREVIEW, "Print Pre&view"); - } - - file_menu->AppendSeparator(); - file_menu->Append(wxID_EXIT, "E&xit"); - - wxMenu *edit_menu = (wxMenu *) NULL; - - if (isCanvas) - { - edit_menu = new wxMenu; - edit_menu->Append(wxID_UNDO, "&Undo"); - edit_menu->Append(wxID_REDO, "&Redo"); - edit_menu->AppendSeparator(); - edit_menu->Append(DOCVIEW_CUT, "&Cut last segment"); - - doc->GetCommandProcessor()->SetEditMenu(edit_menu); - } - - wxMenu *help_menu = new wxMenu; - help_menu->Append(DOCVIEW_ABOUT, "&About"); - - wxMenuBar *menu_bar = new wxMenuBar; - - menu_bar->Append(file_menu, "&File"); - if (isCanvas) - menu_bar->Append(edit_menu, "&Edit"); - menu_bar->Append(help_menu, "&Help"); - - //// Associate the menu bar with the frame - subframe->SetMenuBar(menu_bar); - - return subframe; -} - -/* - * This is the top-level window of the application. - */ - -IMPLEMENT_CLASS(MyFrame, wxDocMDIParentFrame) -BEGIN_EVENT_TABLE(MyFrame, wxDocMDIParentFrame) - EVT_MENU(DOCVIEW_ABOUT, MyFrame::OnAbout) -END_EVENT_TABLE() - -MyFrame::MyFrame(wxDocManager *manager, wxFrame *frame, const wxString& title, - const wxPoint& pos, const wxSize& size, long type): - wxDocMDIParentFrame(manager, frame, -1, title, pos, size, type, "myFrame") -{ - editMenu = (wxMenu *) NULL; -} - -void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) -{ - (void)wxMessageBox("DocView Demo\nAuthor: Julian Smart julian.smart@ukonline.co.uk\nUsage: docview.exe", "About DocView"); -} - -// Creates a canvas. Called from view.cpp when a new drawing -// view is created. -MyCanvas *MyFrame::CreateCanvas(wxView *view, wxFrame *parent) -{ - int width, height; - parent->GetClientSize(&width, &height); - - // Non-retained canvas - MyCanvas *canvas = new MyCanvas(view, parent, wxPoint(0, 0), wxSize(width, height), 0); - canvas->SetCursor(wxCursor(wxCURSOR_PENCIL)); - - // Give it scrollbars - canvas->SetScrollbars(20, 20, 50, 50); - - return canvas; -} - -MyFrame *GetMainFrame(void) -{ - return frame; -} - diff --git a/samples/docvwmdi/docview.def b/samples/docvwmdi/docview.def deleted file mode 100644 index 78ac0eda3f..0000000000 --- a/samples/docvwmdi/docview.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME DocView -DESCRIPTION 'Document architecture test' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 8192 diff --git a/samples/docvwmdi/docview.h b/samples/docvwmdi/docview.h deleted file mode 100644 index 9f9b695300..0000000000 --- a/samples/docvwmdi/docview.h +++ /dev/null @@ -1,63 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: docview.h -// Purpose: Document/view demo -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma interface "docview.h" -#endif - -#ifndef __DOCVIEWSAMPLEH__ -#define __DOCVIEWSAMPLEH__ - -#include "wx/docmdi.h" - -class wxDocManager; - -// Define a new application -class MyApp: public wxApp -{ - public: - MyApp(void); - bool OnInit(void); - int OnExit(void); - - wxMDIChildFrame *CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas); - - protected: - wxDocManager* m_docManager; -}; - -DECLARE_APP(MyApp) - -// Define a new frame -class MyCanvas; -class MyFrame: public wxDocMDIParentFrame -{ - DECLARE_CLASS(MyFrame) - public: - wxMenu *editMenu; - - MyFrame(wxDocManager *manager, wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, - const long type); - - void OnAbout(wxCommandEvent& event); - MyCanvas *CreateCanvas(wxView *view, wxFrame *parent); - -DECLARE_EVENT_TABLE() -}; - -extern MyFrame *GetMainFrame(void); - -#define DOCVIEW_CUT 1 -#define DOCVIEW_ABOUT 2 - -extern bool singleWindowMode; - -#endif diff --git a/samples/docvwmdi/docview.rc b/samples/docvwmdi/docview.rc deleted file mode 100644 index b9880e453b..0000000000 --- a/samples/docvwmdi/docview.rc +++ /dev/null @@ -1,6 +0,0 @@ -doc ICON "doc.ico" -chart ICON "chart.ico" -notepad ICON "notepad.ico" - -#include "wx/msw/wx.rc" - diff --git a/samples/docvwmdi/makefile.b32 b/samples/docvwmdi/makefile.b32 deleted file mode 100644 index f81b4d3365..0000000000 --- a/samples/docvwmdi/makefile.b32 +++ /dev/null @@ -1,67 +0,0 @@ -# -# File: makefile.b32 -# Author: Patrick Halke -# Created: 1995 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds 32bit buttonbar example. - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXLIB=$(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 - -TARGET=docview - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = docview.obj doc.obj view.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -docview.obj: docview.$(SRCSUFF) docview.h - -doc.obj: doc.$(SRCSUFF) doc.h - -view.obj: view.$(SRCSUFF) view.h - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - diff --git a/samples/docvwmdi/makefile.dos b/samples/docvwmdi/makefile.dos deleted file mode 100644 index f1132c9c7f..0000000000 --- a/samples/docvwmdi/makefile.dos +++ /dev/null @@ -1,74 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1995 -# Updated: -# Copyright: (c) 1995, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds docview example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\docvwmdi -INC=/I$(WXDIR)\include - -HEADERS = docview.h -SOURCES = docview.$(SRCSUFF) -OBJECTS = docview.obj doc.obj view.obj - -all: docview.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -docview.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) docview.def docview.res - link $(LINKFLAGS) @<< -$(WXDIR)\src\msw\dummy.obj $(OBJECTS), -docview, -NUL, -$(LIBS), -docview.def -; -<< - rc -30 -K docview.res - -docview.obj: docview.h docview.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -view.obj: view.h view.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -doc.obj: doc.h doc.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -docview.res : docview.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /dFAFA_LIB /i$(WXDIR)\include docview - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb - diff --git a/samples/docvwmdi/makefile.g95 b/samples/docvwmdi/makefile.g95 deleted file mode 100644 index 5fe3bf52db..0000000000 --- a/samples/docvwmdi/makefile.g95 +++ /dev/null @@ -1,43 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for docview example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/docview.$(OBJSUFF) $(OBJDIR)/view.$(OBJSUFF) $(OBJDIR)/doc.$(OBJSUFF)\ - $(OBJDIR)/docview_resources.$(OBJSUFF) - - -all: $(OBJDIR) docview$(GUISUFFIX) - -$(OBJDIR): - mkdir $(OBJDIR) - -docview$(GUISUFFIX): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o docview$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(XVIEW_LINK) $(LDLIBS) - -$(OBJDIR)/docview.$(OBJSUFF): docview.$(SRCSUFF) docview.h doc.h view.h - $(CC) -c $(CPPFLAGS) -o $@ docview.$(SRCSUFF) - -$(OBJDIR)/doc.$(OBJSUFF): doc.$(SRCSUFF) doc.h - $(CC) -c $(CPPFLAGS) -o $@ doc.$(SRCSUFF) - -$(OBJDIR)/view.$(OBJSUFF): view.$(SRCSUFF) view.h - $(CC) -c $(CPPFLAGS) -o $@ view.$(SRCSUFF) - -$(OBJDIR)/docview_resources.o: docview.rc - $(RESCOMP) -i docview.rc -o $(OBJDIR)/docview_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) docview$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/docvwmdi/makefile.nt b/samples/docvwmdi/makefile.nt deleted file mode 100644 index 850f1ea471..0000000000 --- a/samples/docvwmdi/makefile.nt +++ /dev/null @@ -1,75 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds docview example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\docvwmdi -PROGRAM=docview - -OBJECTS = $(PROGRAM).obj doc.obj view.obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - -$(PROGRAM).obj: $(PROGRAM).h doc.h view.h $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -doc.obj: doc.h doc.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -view.obj: view.h view.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb - -erase *.sbr - - diff --git a/samples/docvwmdi/makefile.unx b/samples/docvwmdi/makefile.unx deleted file mode 100644 index bbdccc3fc4..0000000000 --- a/samples/docvwmdi/makefile.unx +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for docview example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/make.env - -OBJECTS = $(OBJDIR)/docview.$(OBJSUFF) $(OBJDIR)/view.$(OBJSUFF) $(OBJDIR)/doc.$(OBJSUFF) - -.SUFFIXES: - -all: $(OBJDIR) wx$(GUISUFFIX) docview$(GUISUFFIX) - -wx_motif: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif - -wx_ol: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview -motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK= - -xview: - $(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' - -hp: - $(MAKE) -f makefile,unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' WARN='-w' \ - XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' LDLIBS='$(HPLDLIBS)' - -$(OBJDIR): - mkdir $(OBJDIR) - -docview$(GUISUFFIX): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o docview$(GUISUFFIX) $(OBJECTS) $(XVIEW_LINK) $(LDLIBS) - -$(OBJDIR)/docview.$(OBJSUFF): docview.$(SRCSUFF) docview.h doc.h view.h - $(CC) -c $(CPPFLAGS) -o $@ docview.$(SRCSUFF) - -$(OBJDIR)/doc.$(OBJSUFF): doc.$(SRCSUFF) doc.h - $(CC) -c $(CPPFLAGS) -o $@ doc.$(SRCSUFF) - -$(OBJDIR)/view.$(OBJSUFF): view.$(SRCSUFF) view.h - $(CC) -c $(CPPFLAGS) -o $@ view.$(SRCSUFF) - -clean_motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany - -clean_ol: - $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany - -clean_hp: - $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany - -cleanany: - rm -f $(OBJECTS) docview$(GUISUFFIX) core diff --git a/samples/docvwmdi/notepad.ico b/samples/docvwmdi/notepad.ico deleted file mode 100644 index 5d07bf79a3..0000000000 Binary files a/samples/docvwmdi/notepad.ico and /dev/null differ diff --git a/samples/docvwmdi/view.cpp b/samples/docvwmdi/view.cpp deleted file mode 100644 index ab94cf73c7..0000000000 --- a/samples/docvwmdi/view.cpp +++ /dev/null @@ -1,264 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: view.cpp -// Purpose: View classes -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma implementation -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#if !USE_DOC_VIEW_ARCHITECTURE -#error You must set USE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h! -#endif - -#include "docview.h" -#include "doc.h" -#include "view.h" - -IMPLEMENT_DYNAMIC_CLASS(DrawingView, wxView) - -// For drawing lines in a canvas -float xpos = -1; -float ypos = -1; - -BEGIN_EVENT_TABLE(DrawingView, wxView) - EVT_MENU(DOODLE_CUT, DrawingView::OnCut) -END_EVENT_TABLE() - -// What to do when a view is created. Creates actual -// windows for displaying the view. -bool DrawingView::OnCreate(wxDocument *doc, long WXUNUSED(flags) ) -{ - frame = wxGetApp().CreateChildFrame(doc, this, TRUE); - frame->SetTitle("DrawingView"); - - canvas = GetMainFrame()->CreateCanvas(this, frame); -#ifdef __X__ - // X seems to require a forced resize - int x, y; - frame->GetSize(&x, &y); - frame->SetSize(x, y); -#endif - frame->Show(TRUE); - - return TRUE; -} - -// Sneakily gets used for default print/preview -// as well as drawing on the screen. -void DrawingView::OnDraw(wxDC *dc) -{ - dc->SetFont(*wxNORMAL_FONT); - dc->SetPen(*wxBLACK_PEN); - - wxNode *node = ((DrawingDocument *)GetDocument())->GetDoodleSegments().First(); - while (node) - { - DoodleSegment *seg = (DoodleSegment *)node->Data(); - seg->Draw(dc); - node = node->Next(); - } -} - -void DrawingView::OnUpdate(wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint)) -{ - if (canvas) - canvas->Refresh(); - -/* Is the following necessary? -#ifdef __WXMSW__ - if (canvas) - canvas->Refresh(); -#else - if (canvas) - { - wxClientDC dc(canvas); - dc.Clear(); - OnDraw(& dc); - } -#endif -*/ -} - -// Clean up windows used for displaying the view. -bool DrawingView::OnClose(bool deleteWindow) -{ - if (!GetDocument()->Close()) - return FALSE; - - // Clear the canvas in case we're in single-window mode, - // and the canvas stays. - canvas->Clear(); - canvas->view = (wxView *) NULL; - canvas = (MyCanvas *) NULL; - - wxString s(wxTheApp->GetAppName()); - if (frame) - frame->SetTitle(s); - - SetFrame((wxFrame*)NULL); - - Activate(FALSE); - - if (deleteWindow) - { - delete frame; - return TRUE; - } - return TRUE; -} - -void DrawingView::OnCut(wxCommandEvent& WXUNUSED(event) ) -{ - DrawingDocument *doc = (DrawingDocument *)GetDocument(); - doc->GetCommandProcessor()->Submit(new DrawingCommand((const wxString) "Cut Last Segment", DOODLE_CUT, doc, (DoodleSegment *) NULL)); -} - -IMPLEMENT_DYNAMIC_CLASS(TextEditView, wxView) - -bool TextEditView::OnCreate(wxDocument *doc, long WXUNUSED(flags) ) -{ - frame = wxGetApp().CreateChildFrame(doc, this, FALSE); - - int width, height; - frame->GetClientSize(&width, &height); - textsw = new MyTextWindow(this, frame, wxPoint(0, 0), wxSize(width, height), wxTE_MULTILINE); - frame->SetTitle("TextEditView"); - -#ifdef __X__ - // X seems to require a forced resize - int x, y; - frame->GetSize(&x, &y); - frame->SetSize(x, y); -#endif - - frame->Show(TRUE); - Activate(TRUE); - - return TRUE; -} - -// Handled by wxTextWindow -void TextEditView::OnDraw(wxDC *WXUNUSED(dc) ) -{ -} - -void TextEditView::OnUpdate(wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) ) -{ -} - -bool TextEditView::OnClose(bool deleteWindow) -{ - if (!GetDocument()->Close()) - return FALSE; - - Activate(FALSE); - - if (deleteWindow) - { - delete frame; - return TRUE; - } - return TRUE; -} - -/* - * Window implementations - */ - -BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow) - EVT_MOUSE_EVENTS(MyCanvas::OnMouseEvent) -END_EVENT_TABLE() - -// Define a constructor for my canvas -MyCanvas::MyCanvas(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style): - wxScrolledWindow(frame, -1, pos, size, style) -{ - view = v; -} - -// Define the repainting behaviour -void MyCanvas::OnDraw(wxDC& dc) -{ - if (view) - view->OnDraw(& dc); -} - -// This implements a tiny doodling program. Drag the mouse using -// the left button. -void MyCanvas::OnMouseEvent(wxMouseEvent& event) -{ - if (!view) - return; - - static DoodleSegment *currentSegment = (DoodleSegment *) NULL; - - wxClientDC dc(this); - PrepareDC(dc); - - dc.SetPen(*wxBLACK_PEN); - - wxPoint pt(event.GetLogicalPosition(dc)); - - if (currentSegment && event.LeftUp()) - { - if (currentSegment->lines.Number() == 0) - { - delete currentSegment; - currentSegment = (DoodleSegment *) NULL; - } - else - { - // We've got a valid segment on mouse left up, so store it. - DrawingDocument *doc = (DrawingDocument *)view->GetDocument(); - - doc->GetCommandProcessor()->Submit(new DrawingCommand("Add Segment", DOODLE_ADD, doc, currentSegment)); - - view->GetDocument()->Modify(TRUE); - currentSegment = (DoodleSegment *) NULL; - } - } - - if (xpos > -1 && ypos > -1 && event.Dragging()) - { - if (!currentSegment) - currentSegment = new DoodleSegment; - - DoodleLine *newLine = new DoodleLine; - newLine->x1 = (long)xpos; - newLine->y1 = (long)ypos; - newLine->x2 = pt.x; - newLine->y2 = pt.y; - currentSegment->lines.Append(newLine); - - dc.DrawLine( (long)xpos, (long)ypos, pt.x, pt.y); - } - xpos = pt.x; - ypos = pt.y; -} - -// Define a constructor for my text subwindow -MyTextWindow::MyTextWindow(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style): - wxTextCtrl(frame, -1, "", pos, size, style) -{ - view = v; -} - - diff --git a/samples/docvwmdi/view.h b/samples/docvwmdi/view.h deleted file mode 100644 index 2f068c7c04..0000000000 --- a/samples/docvwmdi/view.h +++ /dev/null @@ -1,79 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: view.h -// Purpose: View classes -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma interface -#endif - -#ifndef __VIEWSAMPLEH__ -#define __VIEWSAMPLEH__ - -#include "wx/docview.h" - -class MyCanvas: public wxScrolledWindow -{ - public: - wxView *view; - - MyCanvas(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style); - virtual void OnDraw(wxDC& dc); - void OnMouseEvent(wxMouseEvent& event); - -DECLARE_EVENT_TABLE() -}; - -class MyTextWindow: public wxTextCtrl -{ - public: - wxView *view; - - MyTextWindow(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style); -}; - -class DrawingView: public wxView -{ - DECLARE_DYNAMIC_CLASS(DrawingView) - private: - public: - wxFrame *frame; - MyCanvas *canvas; - - DrawingView(void) { canvas = (MyCanvas *) NULL; frame = (wxFrame *) NULL; }; - ~DrawingView(void) {}; - - bool OnCreate(wxDocument *doc, long flags); - void OnDraw(wxDC *dc); - void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL); - bool OnClose(bool deleteWindow = TRUE); - - void OnCut(wxCommandEvent& event); - -DECLARE_EVENT_TABLE() -}; - -class TextEditView: public wxView -{ - DECLARE_DYNAMIC_CLASS(TextEditView) - private: - public: - wxFrame *frame; - MyTextWindow *textsw; - - TextEditView(wxDocument *doc = (wxDocument *) NULL): wxView(doc) { frame = (wxFrame *) NULL; textsw = (MyTextWindow *) NULL; } - ~TextEditView(void) {} - - bool OnCreate(wxDocument *doc, long flags); - void OnDraw(wxDC *dc); - void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL); - bool OnClose(bool deleteWindow = TRUE); -}; - -#endif diff --git a/samples/dynamic/.cvsignore b/samples/dynamic/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/dynamic/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/dynamic/Makefile b/samples/dynamic/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/dynamic/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/dynamic/Makefile.in b/samples/dynamic/Makefile.in deleted file mode 100644 index bebee4cb44..0000000000 --- a/samples/dynamic/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# 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 diff --git a/samples/dynamic/dynamic.cpp b/samples/dynamic/dynamic.cpp deleted file mode 100644 index e8be267bda..0000000000 --- a/samples/dynamic/dynamic.cpp +++ /dev/null @@ -1,113 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dynamic.cpp -// Purpose: Dynamic events wxWindows sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dynamic.cpp" -#pragma interface "dynamic.cpp" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#ifdef __WXGTK__ -#include "mondrian.xpm" -#endif - -// Define a new application type -class MyApp: public wxApp -{ public: - bool OnInit(void); -}; - -// Define a new frame type -class MyFrame: public wxFrame -{ public: - MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h); - - public: - void OnQuit(wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); - bool OnClose(void) { return TRUE; } -}; - -// ID for the menu commands -#define DYNAMIC_QUIT 1 -#define DYNAMIC_TEXT 101 -#define DYNAMIC_ABOUT 102 - -// Create a new application object -IMPLEMENT_APP (MyApp) - -// `Main program' equivalent, creating windows and returning main app frame -bool MyApp::OnInit(void) -{ - // Create the main frame window - MyFrame *frame = new MyFrame(NULL, "Dynamic wxWindows App", 50, 50, 450, 340); - - frame->Connect( DYNAMIC_QUIT, -1, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction)MyFrame::OnQuit ); - frame->Connect( DYNAMIC_ABOUT, -1, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction)MyFrame::OnAbout ); - - // Give it an icon -#ifdef __WXMSW__ - frame->SetIcon(wxIcon("mondrian")); -#else - frame->SetIcon(wxIcon(mondrian_xpm)); -#endif - - // Make a menubar - wxMenu *file_menu = new wxMenu; - - file_menu->Append(DYNAMIC_ABOUT, "&About"); - file_menu->Append(DYNAMIC_QUIT, "E&xit"); - wxMenuBar *menu_bar = new wxMenuBar; - menu_bar->Append(file_menu, "&File"); - frame->SetMenuBar(menu_bar); - - // Make a panel with a message - wxPanel *panel = new wxPanel(frame, -1, wxPoint(0, 0), wxSize(400, 200), wxTAB_TRAVERSAL); - - (void)new wxStaticText(panel, 311, "Hello!", wxPoint(10, 10), wxSize(-1, -1), 0); - - // Show the frame - frame->Show(TRUE); - - SetTopWindow(frame); - - return TRUE; -} - -// My frame constructor -MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h): - wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) -{} - -void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) ) -{ - Close(TRUE); -} - -void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) -{ - wxMessageDialog dialog(this, "This demonstrates dynamic event handling", - "About Dynamic", wxYES_NO|wxCANCEL); - - dialog.ShowModal(); -} - - diff --git a/samples/dynamic/dynamic.def b/samples/dynamic/dynamic.def deleted file mode 100644 index 6d63d054d5..0000000000 --- a/samples/dynamic/dynamic.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME Dynamic -DESCRIPTION 'Dynamic event handler test' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 4048 -STACKSIZE 16000 diff --git a/samples/dynamic/dynamic.rc b/samples/dynamic/dynamic.rc deleted file mode 100644 index 7655c62a4c..0000000000 --- a/samples/dynamic/dynamic.rc +++ /dev/null @@ -1,3 +0,0 @@ -mondrian ICON "mondrian.ico" -#include "wx/msw/wx.rc" - diff --git a/samples/dynamic/makefile.b32 b/samples/dynamic/makefile.b32 deleted file mode 100644 index 4ade0dedcc..0000000000 --- a/samples/dynamic/makefile.b32 +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds dynamic example (DOS). - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXINC = $(WXDIR)\include\msw -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 ole2w32 - -TARGET=dynamic - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = dynamic.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -dynamic.obj: dynamic.$(SRCSUFF) - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - diff --git a/samples/dynamic/makefile.dos b/samples/dynamic/makefile.dos deleted file mode 100644 index 1305df9589..0000000000 --- a/samples/dynamic/makefile.dos +++ /dev/null @@ -1,65 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds dynamic example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\dynamic - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = dynamic.$(SRCSUFF) -OBJECTS = dynamic.obj - -all: dynamic.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -dynamic.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) dynamic.obj dynamic.def dynamic.res - link $(LINKFLAGS) @<< -dynamic.obj $(WXDIR)\src\msw\dummy.obj, -dynamic, -NUL, -$(LIBS), -dynamic.def -; -<< - rc -K dynamic.res - -dynamic.obj: dynamic.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -dynamic.res : dynamic.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include dynamic - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/dynamic/makefile.g95 b/samples/dynamic/makefile.g95 deleted file mode 100644 index c5f0d229fc..0000000000 --- a/samples/dynamic/makefile.g95 +++ /dev/null @@ -1,37 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for dynamic example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/dynamic.$(OBJSUFF) $(OBJDIR)/dynamic_resources.$(OBJSUFF) - -all: $(OBJDIR) dynamic$(GUISUFFIX)$(EXESUFF) - -wx: - -$(OBJDIR): - mkdir $(OBJDIR) - -dynamic$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o dynamic$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/dynamic.$(OBJSUFF): dynamic.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ dynamic.$(SRCSUFF) - -$(OBJDIR)/dynamic_resources.o: dynamic.rc - $(RESCOMP) -i dynamic.rc -o $(OBJDIR)/dynamic_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) dynamic$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/dynamic/makefile.nt b/samples/dynamic/makefile.nt deleted file mode 100644 index 76464c3e90..0000000000 --- a/samples/dynamic/makefile.nt +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds dynamic example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\dynamic -PROGRAM=dynamic - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/dynamic/minimal.cpp b/samples/dynamic/minimal.cpp deleted file mode 100644 index 354d3aaec4..0000000000 --- a/samples/dynamic/minimal.cpp +++ /dev/null @@ -1,113 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: minimal.cpp -// Purpose: Dynamic events wxWindows sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "minimal.cpp" -#pragma interface "minimal.cpp" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#ifdef __WXGTK__ -#include "mondrian.xpm" -#endif - -// Define a new application type -class MyApp: public wxApp -{ public: - bool OnInit(void); -}; - -// Define a new frame type -class MyFrame: public wxFrame -{ public: - MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h); - - public: - void OnQuit(wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); - bool OnClose(void) { return TRUE; } -}; - -// ID for the menu commands -#define MINIMAL_QUIT 1 -#define MINIMAL_TEXT 101 -#define MINIMAL_ABOUT 102 - -// Create a new application object -IMPLEMENT_APP (MyApp) - -// `Main program' equivalent, creating windows and returning main app frame -bool MyApp::OnInit(void) -{ - // Create the main frame window - MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "Minimal wxWindows App", 50, 50, 450, 340); - - frame->Connect( MINIMAL_QUIT, -1, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction)MyFrame::OnQuit ); - frame->Connect( MINIMAL_ABOUT, -1, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction)MyFrame::OnAbout ); - - // Give it an icon -#ifdef __WXMSW__ - frame->SetIcon(wxIcon("mondrian")); -#else - frame->SetIcon(wxIcon(mondrian_xpm)); -#endif - - // Make a menubar - wxMenu *file_menu = new wxMenu; - - file_menu->Append(MINIMAL_ABOUT, "&About"); - file_menu->Append(MINIMAL_QUIT, "E&xit"); - wxMenuBar *menu_bar = new wxMenuBar; - menu_bar->Append(file_menu, "&File"); - frame->SetMenuBar(menu_bar); - - // Make a panel with a message - wxPanel *panel = new wxPanel(frame, -1, wxPoint(0, 0), wxSize(400, 200), wxTAB_TRAVERSAL); - - (void)new wxStaticText(panel, 311, "Hello!", wxPoint(10, 10), wxSize(-1, -1), 0); - - // Show the frame - frame->Show(TRUE); - - SetTopWindow(frame); - - return TRUE; -} - -// My frame constructor -MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h): - wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) -{} - -void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) ) -{ - Close(TRUE); -} - -void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) -{ - wxMessageDialog dialog(this, "This is a minimal sample\nA second line in the message box", - "About Minimal", wxYES_NO|wxCANCEL); - - dialog.ShowModal(); -} - - diff --git a/samples/dynamic/mondrian.ico b/samples/dynamic/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/samples/dynamic/mondrian.ico and /dev/null differ diff --git a/samples/dynamic/mondrian.xpm b/samples/dynamic/mondrian.xpm deleted file mode 100644 index 409f27a843..0000000000 --- a/samples/dynamic/mondrian.xpm +++ /dev/null @@ -1,44 +0,0 @@ -/* XPM */ -static char *mondrian_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 6 1", -" c Black", -". c Blue", -"X c #00bf00", -"o c Red", -"O c Yellow", -"+ c Gray100", -/* pixels */ -" ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" " -}; diff --git a/samples/forty/.cvsignore b/samples/forty/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/forty/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/forty/Makefile b/samples/forty/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/forty/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/forty/Makefile.in b/samples/forty/Makefile.in deleted file mode 100644 index d56090e51f..0000000000 --- a/samples/forty/Makefile.in +++ /dev/null @@ -1,40 +0,0 @@ -# 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 diff --git a/samples/forty/canvas.cpp b/samples/forty/canvas.cpp deleted file mode 100644 index acaf9a548f..0000000000 --- a/samples/forty/canvas.cpp +++ /dev/null @@ -1,254 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: canvas.cpp -// Purpose: Forty Thieves patience game -// Author: Chris Breeze -// Modified by: -// Created: 21/07/97 -// RCS-ID: $Id$ -// Copyright: (c) 1993-1998 Chris Breeze -// Licence: wxWindows licence -//--------------------------------------------------------------------------- -// Last modified: 22nd July 1998 - ported to wxWindows 2.0 -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#pragma interface -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "forty.h" -#include "card.h" -#include "game.h" -#include "scorefil.h" -#include "playerdg.h" -#include "canvas.h" - -BEGIN_EVENT_TABLE(FortyCanvas, wxScrolledWindow) - EVT_MOUSE_EVENTS(FortyCanvas::OnMouseEvent) -END_EVENT_TABLE() - -FortyCanvas::FortyCanvas(wxWindow* parent, int x, int y, int w, int h) : - wxScrolledWindow(parent, -1, wxPoint(x, y), wxSize(w, h)), - m_helpingHand(TRUE), - m_rightBtnUndo(TRUE), - m_playerDialog(0), - m_leftBtnDown(FALSE) -{ -#ifdef __WXGTK__ - m_font = wxTheFontList->FindOrCreateFont(12, wxROMAN, wxNORMAL, wxNORMAL); -#else - m_font = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL); -#endif - SetBackgroundColour(*FortyApp::BackgroundColour()); - AllowDoubleClick(true); - - m_handCursor = new wxCursor(wxCURSOR_HAND); - m_arrowCursor = new wxCursor(wxCURSOR_ARROW); - - wxString name = wxTheApp->GetAppName(); - if (name.Length() <= 0) name = "forty"; - m_scoreFile = new ScoreFile(name); - m_game = new Game(0, 0, 0); - m_game->Deal(); -} - - -FortyCanvas::~FortyCanvas() -{ - UpdateScores(); - delete m_game; - delete m_scoreFile; -} - - -/* -Write the current player's score back to the score file -*/ -void FortyCanvas::UpdateScores() -{ - if (m_player.Length() > 0 && m_scoreFile && m_game) - { - m_scoreFile->WritePlayersScore( - m_player, - m_game->GetNumWins(), - m_game->GetNumGames(), - m_game->GetScore() - ); - } -} - - -void FortyCanvas::OnDraw(wxDC& dc) -{ - dc.SetFont(m_font); - m_game->Redraw(dc); - - // if player name not set (and selection dialog is not displayed) - // then ask the player for their name - if (m_player.Length() == 0 && !m_playerDialog) - { - m_playerDialog = new PlayerSelectionDialog(this, m_scoreFile); - m_playerDialog->ShowModal(); - m_player = m_playerDialog->GetPlayersName(); - if (m_player.Length() > 0) - { - // user entered a name - lookup their score - int wins, games, score; - m_scoreFile->ReadPlayersScore(m_player, wins, games, score); - m_game->NewPlayer(wins, games, score); - m_game->DisplayScore(dc); - delete m_playerDialog; - m_playerDialog = 0; - Refresh(); - } - else - { - // user cancelled the dialog - exit the app - ((wxFrame*)GetParent())->Close(TRUE); - } - } -} - -/* -Called when the main frame is closed -*/ -bool FortyCanvas::OnClose() -{ - if (m_game->InPlay() && - wxMessageBox("Are you sure you want to\nabandon the current game?", - "Warning", wxYES_NO | wxICON_QUESTION) == wxNO) - { - return FALSE; - } - return TRUE; -} - -void FortyCanvas::OnMouseEvent(wxMouseEvent& event) -{ - int mouseX = (int)event.GetX(); - int mouseY = (int)event.GetY(); - - wxClientDC dc(this); - PrepareDC(dc); - dc.SetFont(m_font); - - if (event.LeftDClick()) - { - if (m_leftBtnDown) - { - m_leftBtnDown = FALSE; - ReleaseMouse(); - m_game->LButtonUp(dc, mouseX, mouseY); - } - m_game->LButtonDblClk(dc, mouseX, mouseY); - } - else if (event.LeftDown()) - { - if (!m_leftBtnDown) - { - m_leftBtnDown = TRUE; - CaptureMouse(); - m_game->LButtonDown(dc, mouseX, mouseY); - } - } - else if (event.LeftUp()) - { - if (m_leftBtnDown) - { - m_leftBtnDown = FALSE; - ReleaseMouse(); - m_game->LButtonUp(dc, mouseX, mouseY); - } - } - else if (event.RightDown() && !event.LeftIsDown()) - { - // only allow right button undo if m_rightBtnUndo is TRUE - if (m_rightBtnUndo) - { - if (event.ControlDown() || event.ShiftDown()) - { - m_game->Redo(dc); - } - else - { - m_game->Undo(dc); - } - } - } - else if (event.Dragging()) - { - m_game->MouseMove(dc, mouseX, mouseY); - } - - if (!event.LeftIsDown()) - { - SetCursorStyle(mouseX, mouseY); - } -} - -void FortyCanvas::SetCursorStyle(int x, int y) -{ - if (m_game->HaveYouWon()) - { - if (wxMessageBox("Do you wish to play again?", - "Well Done, You have won!", wxYES_NO | wxICON_QUESTION) == wxYES) - { - m_game->Deal(); - - wxClientDC dc(this); - PrepareDC(dc); - dc.SetFont(m_font); - m_game->Redraw(dc); - } - else - { - // user cancelled the dialog - exit the app - ((wxFrame*)GetParent())->Close(TRUE); - } - } - - // Only set cursor to a hand if 'helping hand' is enabled and - // the card under the cursor can go somewhere - if (m_game->CanYouGo(x, y) && m_helpingHand) - { - SetCursor(m_handCursor); - } - else - { - SetCursor(m_arrowCursor); - } - -} - -void FortyCanvas::NewGame() -{ - m_game->Deal(); - Refresh(); -} - -void FortyCanvas::Undo() -{ - wxClientDC dc(this); - PrepareDC(dc); - dc.SetFont(m_font); - m_game->Undo(dc); -} - -void FortyCanvas::Redo() -{ - wxClientDC dc(this); - PrepareDC(dc); - dc.SetFont(m_font); - m_game->Redo(dc); -} diff --git a/samples/forty/canvas.h b/samples/forty/canvas.h deleted file mode 100644 index 368d6c6b61..0000000000 --- a/samples/forty/canvas.h +++ /dev/null @@ -1,56 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: canvas.h -// Purpose: Forty Thieves patience game -// Author: Chris Breeze -// Modified by: -// Created: 21/07/97 -// RCS-ID: $Id$ -// Copyright: (c) 1993-1998 Chris Breeze -// Licence: wxWindows licence -//--------------------------------------------------------------------------- -// Last modified: 22nd July 1998 - ported to wxWindows 2.0 -///////////////////////////////////////////////////////////////////////////// -#ifndef _CANVAS_H_ -#define _CANVAS_H_ - -class Card; -class Game; -class ScoreFile; -class PlayerSelectionDialog; - -class FortyCanvas: public wxScrolledWindow -{ -public: - FortyCanvas(wxWindow* parent, int x, int y, int w, int h); - virtual ~FortyCanvas(); - - virtual void OnDraw(wxDC& dc); - bool OnClose(); - void OnMouseEvent(wxMouseEvent& event); - void SetCursorStyle(int x, int y); - - void NewGame(); - void Undo(); - void Redo(); - - ScoreFile* GetScoreFile() const { return m_scoreFile; } - void UpdateScores(); - void EnableHelpingHand(bool enable) { m_helpingHand = enable; } - void EnableRightButtonUndo(bool enable) { m_rightBtnUndo = enable; } - - DECLARE_EVENT_TABLE() - -private: - wxFont* m_font; - Game* m_game; - ScoreFile* m_scoreFile; - wxCursor* m_arrowCursor; - wxCursor* m_handCursor; - bool m_helpingHand; - bool m_rightBtnUndo; - wxString m_player; - PlayerSelectionDialog* m_playerDialog; - bool m_leftBtnDown; -}; - -#endif diff --git a/samples/forty/card.cpp b/samples/forty/card.cpp deleted file mode 100644 index b38056ead0..0000000000 --- a/samples/forty/card.cpp +++ /dev/null @@ -1,358 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: card.cpp -// Purpose: Forty Thieves patience game -// Author: Chris Breeze -// Modified by: -// Created: 21/07/97 -// RCS-ID: $Id$ -// Copyright: (c) 1993-1998 Chris Breeze -// Licence: wxWindows licence -//--------------------------------------------------------------------------- -// Last modified: 22nd July 1998 - ported to wxWindows 2.0 -///////////////////////////////////////////////////////////////////////////// -//+-------------------------------------------------------------+ -//| Description -//| A class for drawing playing cards. -//| Currently assumes that the card symbols have been -//| loaded into hbmap_symbols and the pictures for the -//| Jack, Queen and King have been loaded into -//| hbmap_pictures. -//+-------------------------------------------------------------+ - -#ifdef __GNUG__ -#pragma implementation -#pragma interface -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include -#include -#include -#include "forty.h" -#include "card.h" - -#ifdef __WXGTK__ -#include "pictures.xpm" -#include "symbols.xbm" -#endif - -wxBitmap* Card::m_pictureBmap = 0; -wxBitmap* Card::m_symbolBmap = 0; - - -//+-------------------------------------------------------------+ -//| Card::Card() | -//+-------------------------------------------------------------+ -//| Description: | -//| Constructor for a playing card. | -//| Checks that the value is in the range 1..52 and then | -//| initialises the suit, colour, pipValue and wayUp. | -//+-------------------------------------------------------------+ -Card::Card(int value, WayUp way_up) : - m_wayUp(way_up) -{ - if (!m_symbolBmap) - { -#ifdef __WXMSW__ - m_symbolBmap = new wxBitmap("CardSymbols", wxBITMAP_TYPE_BMP_RESOURCE); -#else - m_symbolBmap = new wxBitmap(Symbols_bits, Symbols_width, Symbols_height); -#endif - if (!m_symbolBmap->Ok()) - { - ::wxMessageBox("Failed to load bitmap CardSymbols", "Error"); - } - } - if (!m_pictureBmap) - { -#ifdef __WXMSW__ - m_pictureBmap = new wxBitmap("CardPictures", wxBITMAP_TYPE_BMP_RESOURCE); -#else - m_pictureBmap = new wxBitmap(Pictures); -#endif - if (!m_pictureBmap->Ok()) - { - ::wxMessageBox("Failed to load bitmap CardPictures", "Error"); - } - } - - if (value >= 1 && value <= PackSize) - { - switch ((value - 1) / 13) - { - case 0: - m_suit = clubs; - m_colour = black; - break; - case 1: - m_suit = diamonds; - m_colour = red; - break; - case 2: - m_suit = hearts; - m_colour = red; - break; - case 3: - m_suit = spades; - m_colour = black; - break; - } - m_pipValue = 1 + (value - 1) % 13; - m_status = TRUE; - } - else - { - m_status = FALSE; - } -} // Card::Card() - - -//+-------------------------------------------------------------+ -//| Card::~Card() | -//+-------------------------------------------------------------+ -//| Description: | -//| Destructor - nothing to do at present. | -//+-------------------------------------------------------------+ -Card::~Card() -{ -} - - -//+-------------------------------------------------------------+ -//| Card::Erase() | -//+-------------------------------------------------------------+ -//| Description: | -//| Erase the card at (x, y) by drawing a rectangle in the | -//| background colour. | -//+-------------------------------------------------------------+ -void Card::Erase(wxDC& dc, int x, int y) -{ - wxPen* pen = wxThePenList->FindOrCreatePen( - *FortyApp::BackgroundColour(), - 1, - wxSOLID - ); - dc.SetPen(pen); - dc.SetBrush(FortyApp::BackgroundBrush()); - dc.DrawRectangle(x, y, CardWidth, CardHeight); -} // Card::Erase() - - -//+-------------------------------------------------------------+ -//| Card::Draw() | -//+-------------------------------------------------------------+ -//| Description: | -//| Draw the card at (x, y). | -//| If the card is facedown draw the back of the card. | -//| If the card is faceup draw the front of the card. | -//| Cards are not held in bitmaps, instead they are drawn | -//| from their constituent parts when required. | -//| hbmap_symbols contains large and small suit symbols and | -//| pip values. These are copied to the appropriate part of | -//| the card. Picture cards use the pictures defined in | -//| hbmap_pictures. Note that only one picture is defined | -//| for the Jack, Queen and King, unlike a real pack where | -//| each suit is different. | -//| | -//| WARNING: | -//| The locations of these symbols is 'hard-wired' into the | -//| code. Editing the bitmaps or the numbers below will | -//| result in the wrong symbols being displayed. | -//+-------------------------------------------------------------+ -void Card::Draw(wxDC& dc, int x, int y) -{ - wxBrush* backgroundBrush = dc.GetBackground(); - dc.SetBrush(wxWHITE_BRUSH); - dc.SetPen(wxBLACK_PEN); - dc.DrawRoundedRectangle(x, y, CardWidth, CardHeight, 4); - if (m_wayUp == facedown) - { - dc.SetBackground(wxRED_BRUSH); - dc.SetBackgroundMode(wxSOLID); - wxBrush* brush = wxTheBrushList->FindOrCreateBrush( - "BLACK", wxCROSSDIAG_HATCH - ); - dc.SetBrush(brush); - - dc.DrawRoundedRectangle( - x + 4, y + 4, - CardWidth - 8, CardHeight - 8, - 2 - ); - } - else - { - wxMemoryDC memoryDC; - memoryDC.SelectObject(m_symbolBmap); - -// dc.SetBackgroundMode(wxTRANSPARENT); - - dc.SetTextBackground(*wxWHITE); - switch (m_suit) - { - case spades: - case clubs: - dc.SetTextForeground(*wxBLACK); - break; - case diamonds: - case hearts: - dc.SetTextForeground(*wxRED); - break; - } - // Draw the value - dc.Blit(x + 3, y + 3, 6, 7, - &memoryDC, 6 * (m_pipValue - 1), 36, wxCOPY); - dc.Blit(x + CardWidth - 9, y + CardHeight - 11, 6, 7, - &memoryDC, 6 * (m_pipValue - 1), 43, wxCOPY); - - // Draw the pips - dc.Blit(x + 11, y + 3, 7, 7, - &memoryDC, 7 * m_suit, 0, wxCOPY); - dc.Blit(x + CardWidth - 17, y + CardHeight - 11, 7, 7, - &memoryDC, 7 * m_suit, 7, wxCOPY); - - switch (m_pipValue) - { - case 1: - dc.Blit(x - 5 + CardWidth / 2, y - 5 + CardHeight / 2, 11, 11, - &memoryDC, 11 * m_suit, 14, wxCOPY); - break; - - case 3: - dc.Blit(x - 5 + CardWidth / 2, y - 5 + CardHeight / 2, 11, 11, - &memoryDC, 11 * m_suit, 14, wxCOPY); - case 2: - dc.Blit(x - 5 + CardWidth / 2, - y - 5 + CardHeight / 4, 11, 11, - &memoryDC, 11 * m_suit, 14, wxCOPY); - dc.Blit(x - 5 + CardWidth / 2, - y - 5 + 3 * CardHeight / 4, 11, 11, - &memoryDC, 11 * m_suit, 25, wxCOPY); - break; - - case 5: - dc.Blit(x - 5 + CardWidth / 2, y - 5 + CardHeight / 2, 11, 11, - &memoryDC, 11 * m_suit, 14, wxCOPY); - case 4: - dc.Blit(x - 5 + CardWidth / 4, - y - 5 + CardHeight / 4, 11, 11, - &memoryDC, 11 * m_suit, 14, wxCOPY); - dc.Blit(x - 5 + CardWidth / 4, - y - 5 + 3 * CardHeight / 4, 11, 11, - &memoryDC, 11 * m_suit, 25, wxCOPY); - dc.Blit(x - 5 + 3 * CardWidth / 4, - y - 5 + CardHeight / 4, 11, 11, - &memoryDC, 11 * m_suit, 14, wxCOPY); - dc.Blit(x - 5 + 3 * CardWidth / 4, - y - 5 + 3 * CardHeight / 4, 11, 11, - &memoryDC, 11 * m_suit, 25, wxCOPY); - break; - - case 8: - dc.Blit(x - 5 + 5 * CardWidth / 10, - y - 5 + 5 * CardHeight / 8, 11, 11, - &memoryDC, 11 * m_suit, 25, wxCOPY); - case 7: - dc.Blit(x - 5 + 5 * CardWidth / 10, - y - 5 + 3 * CardHeight / 8, 11, 11, - &memoryDC, 11 * m_suit, 14, wxCOPY); - case 6: - dc.Blit(x - 5 + CardWidth / 4, - y - 5 + CardHeight / 4, 11, 11, - &memoryDC, 11 * m_suit, 14, wxCOPY); - dc.Blit(x - 5 + CardWidth / 4, - y - 5 + CardHeight / 2, 11, 11, - &memoryDC, 11 * m_suit, 14, wxCOPY); - dc.Blit(x - 5 + CardWidth / 4, - y - 5 + 3 * CardHeight / 4, 11, 11, - &memoryDC, 11 * m_suit, 25, wxCOPY); - dc.Blit(x - 5 + 3 * CardWidth / 4, - y - 5 + CardHeight / 4, 11, 11, - &memoryDC, 11 * m_suit, 14, wxCOPY); - dc.Blit(x - 5 + 3 * CardWidth / 4, - y - 5 + CardHeight / 2, 11, 11, - &memoryDC, 11 * m_suit, 14, wxCOPY); - dc.Blit(x - 5 + 3 * CardWidth / 4, - y - 5 + 3 * CardHeight / 4, 11, 11, - &memoryDC, 11 * m_suit, 25, wxCOPY); - break; - - case 10: - dc.Blit(x - 5 + CardWidth / 2, - y - 5 + 2 * CardHeight / 3, 11, 11, - &memoryDC, 11 * m_suit, 25, wxCOPY); - case 9: - dc.Blit(x - 5 + CardWidth / 4, - y - 6 + CardHeight / 4, 11, 11, - &memoryDC, 11 * m_suit, 14, wxCOPY); - dc.Blit(x - 5 + CardWidth / 4, - y - 6 + 5 * CardHeight / 12, 11, 11, - &memoryDC, 11 * m_suit, 14, wxCOPY); - dc.Blit(x - 5 + CardWidth / 4, - y - 5 + 7 * CardHeight / 12, 11, 11, - &memoryDC, 11 * m_suit, 25, wxCOPY); - dc.Blit(x - 5 + CardWidth / 4, - y - 5 + 3 * CardHeight / 4, 11, 11, - &memoryDC, 11 * m_suit, 25, wxCOPY); - - dc.Blit(x - 5 + 3 * CardWidth / 4, - y - 6 + CardHeight / 4, 11, 11, - &memoryDC, 11 * m_suit, 14, wxCOPY); - dc.Blit(x - 5 + 3 * CardWidth / 4, - y - 6 + 5 * CardHeight / 12, 11, 11, - &memoryDC, 11 * m_suit, 14, wxCOPY); - dc.Blit(x - 5 + 3 * CardWidth / 4, - y - 5 + 7 * CardHeight / 12, 11, 11, - &memoryDC, 11 * m_suit, 25, wxCOPY); - dc.Blit(x - 5 + 3 * CardWidth / 4, - y - 5 + 3 * CardHeight / 4, 11, 11, - &memoryDC, 11 * m_suit, 25, wxCOPY); - dc.Blit(x - 5 + CardWidth / 2, - y - 5 + CardHeight / 3, 11, 11, - &memoryDC, 11 * m_suit, 14, wxCOPY); - break; - case 11: - case 12: - case 13: - memoryDC.SelectObject(m_pictureBmap); - dc.Blit(x + 5, y - 5 + CardHeight / 4, 40, 45, - &memoryDC, 40 * (m_pipValue - 11), 0, wxCOPY); - memoryDC.SelectObject(m_symbolBmap); - dc.Blit(x + 32, y - 3 + CardHeight / 4, 11, 11, - &memoryDC, 11 * m_suit, 14, wxCOPY); - dc.Blit(x + 7, y + 27 + CardHeight / 4, 11, 11, - &memoryDC, 11 * m_suit, 25, wxCOPY); - break; - } - - } - dc.SetBackground(backgroundBrush); -} // Card:Draw() - - -//+-------------------------------------------------------------+ -//| Card::DrawNullCard() | -//+-------------------------------------------------------------+ -//| Description: | -//| Draws the outline of a card at (x, y). | -//| Used to draw place holders for empty piles of cards. | -//+-------------------------------------------------------------+ -void Card::DrawNullCard(wxDC& dc, int x, int y) -{ - wxPen* pen = wxThePenList->FindOrCreatePen(*FortyApp::TextColour(), 1, wxSOLID); - dc.SetBrush(FortyApp::BackgroundBrush()); - dc.SetPen(pen); - dc.DrawRoundedRectangle(x, y, CardWidth, CardHeight, 4); -} // Card::DrawNullCard() - - diff --git a/samples/forty/card.h b/samples/forty/card.h deleted file mode 100644 index b93ac93dd8..0000000000 --- a/samples/forty/card.h +++ /dev/null @@ -1,65 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: card.h -// Purpose: Forty Thieves patience game -// Author: Chris Breeze -// Modified by: -// Created: 21/07/97 -// RCS-ID: $Id$ -// Copyright: (c) 1993-1998 Chris Breeze -// Licence: wxWindows licence -//--------------------------------------------------------------------------- -// Last modified: 22nd July 1998 - ported to wxWindows 2.0 -///////////////////////////////////////////////////////////////////////////// -//+-------------------------------------------------------------+ -//| Description: | -//| A class for drawing playing cards. | -//| InitCards() must be called before using the Card class, | -//| otherwise the card bitmaps will not be loaded. | -//| CloseCards() must be called before terminating the | -//| program so that the bitmaps are deleted and the memory | -//| given back to Windows. | -//+-------------------------------------------------------------+ -#ifndef _CARD_H_ -#define _CARD_H_ - - // Constants -const int PackSize = 52; -const int CardWidth = 50; -const int CardHeight = 70; - - // Data types -enum Suit { clubs = 0, diamonds = 1, hearts = 2, spades = 3 }; -enum SuitColour { red = 0, black = 1 }; -enum WayUp { faceup, facedown }; - - -//--------------------------------// -// A class defining a single card // -//--------------------------------// -class Card { -public: - Card(int value, WayUp way_up = facedown); - virtual ~Card(); - - void Draw(wxDC& pDC, int x, int y); - static void DrawNullCard(wxDC& pDC, int x, int y); // Draw card place-holder - void Erase(wxDC& pDC, int x, int y); - - void TurnCard(WayUp way_up = faceup) { m_wayUp = way_up; } - WayUp GetWayUp() const { return m_wayUp; } - int GetPipValue() const { return m_pipValue; } - Suit GetSuit() const { return m_suit; } - SuitColour GetColour() const { return m_colour; } - -private: - Suit m_suit; - int m_pipValue; // in the range 1 (Ace) to 13 (King) - SuitColour m_colour; // red or black - bool m_status; - WayUp m_wayUp; - - static wxBitmap* m_symbolBmap; - static wxBitmap* m_pictureBmap; -}; - -#endif // _CARD_H_ diff --git a/samples/forty/cards.ico b/samples/forty/cards.ico deleted file mode 100644 index 35c8379526..0000000000 Binary files a/samples/forty/cards.ico and /dev/null differ diff --git a/samples/forty/forty.cpp b/samples/forty/forty.cpp deleted file mode 100644 index 65a9c463d1..0000000000 --- a/samples/forty/forty.cpp +++ /dev/null @@ -1,258 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: forty.cpp -// Purpose: Forty Thieves patience game -// Author: Chris Breeze -// Modified by: -// Created: 21/07/97 -// RCS-ID: $Id$ -// Copyright: (c) 1993-1998 Chris Breeze -// Licence: wxWindows licence -//--------------------------------------------------------------------------- -// Last modified: 22nd July 1998 - ported to wxWindows 2.0 -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#pragma interface -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "canvas.h" -#include "forty.h" -#include "scoredg.h" -#ifdef wx_x -#include "cards.xbm" -#endif - -class FortyFrame: public wxFrame -{ -public: - FortyFrame(wxFrame* frame, char* title, int x, int y, int w, int h); - virtual ~FortyFrame(); - - bool OnClose(); - - // Menu callbacks - void NewGame(wxCommandEvent& event); - void Exit(wxCommandEvent& event); - void About(wxCommandEvent& event); - void Undo(wxCommandEvent& event); - void Redo(wxCommandEvent& event); - void Scores(wxCommandEvent& event); - void ToggleRightButtonUndo(wxCommandEvent& event); - void ToggleHelpingHand(wxCommandEvent& event); - - DECLARE_EVENT_TABLE() - -private: - enum MenuCommands { NEW_GAME = 10, SCORES, EXIT, - UNDO, REDO, - RIGHT_BUTTON_UNDO, HELPING_HAND, - ABOUT }; - - wxMenuBar* m_menuBar; - FortyCanvas* m_canvas; -}; - -BEGIN_EVENT_TABLE(FortyFrame, wxFrame) - EVT_MENU(NEW_GAME, FortyFrame::NewGame) - EVT_MENU(EXIT, FortyFrame::Exit) - EVT_MENU(ABOUT, FortyFrame::About) - EVT_MENU(UNDO, FortyFrame::Undo) - EVT_MENU(REDO, FortyFrame::Redo) - EVT_MENU(SCORES, FortyFrame::Scores) - EVT_MENU(RIGHT_BUTTON_UNDO, FortyFrame::ToggleRightButtonUndo) - EVT_MENU(HELPING_HAND, FortyFrame::ToggleHelpingHand) -END_EVENT_TABLE() - -// Create a new application object -IMPLEMENT_APP (FortyApp) - -wxColour* FortyApp::m_backgroundColour = 0; -wxColour* FortyApp::m_textColour = 0; -wxBrush* FortyApp::m_backgroundBrush = 0; - -bool FortyApp::OnInit() -{ - FortyFrame* frame = new FortyFrame( - 0, - "Forty Thieves", - -1, -1, 668, 510 - ); - - // Show the frame - frame->Show(TRUE); - - return true; -} - -wxColour* FortyApp::BackgroundColour() -{ - if (!m_backgroundColour) - { - m_backgroundColour = new wxColour(0, 128, 0); - } - return m_backgroundColour; -} - -wxBrush* FortyApp::BackgroundBrush() -{ - if (!m_backgroundBrush) - { - m_backgroundBrush = new wxBrush(*BackgroundColour(), wxSOLID); - } - return m_backgroundBrush; -} - -wxColour* FortyApp::TextColour() -{ - if (!m_textColour) - { - m_textColour = new wxColour("BLACK"); - } - return m_textColour; -} - -// My frame constructor -FortyFrame::FortyFrame(wxFrame* frame, char* title, int x, int y, int w, int h): - wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) -{ - // set the icon -#ifdef __WXMSW__ - SetIcon(new wxIcon("CardsIcon")); -#else -#ifdef GTK_TBD - SetIcon(new wxIcon(Cards_bits, Cards_width, Cards_height)); -#endif -#endif - - // Make a menu bar - wxMenu* gameMenu = new wxMenu; - gameMenu->Append(NEW_GAME, "&New", "Start a new game"); - gameMenu->Append(SCORES, "&Scores...", "Displays scores"); - gameMenu->Append(EXIT, "E&xit", "Exits Forty Thieves"); - - wxMenu* editMenu = new wxMenu; - editMenu->Append(UNDO, "&Undo", "Undo the last move"); - editMenu->Append(REDO, "&Redo", "Redo a move that has been undone"); - - wxMenu* optionsMenu = new wxMenu; - optionsMenu->Append(RIGHT_BUTTON_UNDO, - "&Right button undo", - "Enables/disables right mouse button undo and redo", - TRUE - ); - optionsMenu->Append(HELPING_HAND, - "&Helping hand", - "Enables/disables hand cursor when a card can be moved", - TRUE - ); - optionsMenu->Check(HELPING_HAND, TRUE); - optionsMenu->Check(RIGHT_BUTTON_UNDO, TRUE); - - wxMenu* helpMenu = new wxMenu; - helpMenu->Append(ABOUT, "&About", "Displays program version information"); - - m_menuBar = new wxMenuBar; - m_menuBar->Append(gameMenu, "&Game"); - m_menuBar->Append(editMenu, "&Edit"); - m_menuBar->Append(optionsMenu, "&Options"); - m_menuBar->Append(helpMenu, "&Help"); - - SetMenuBar(m_menuBar); - - m_canvas = new FortyCanvas(this, 0, 0, 400, 400); - wxLayoutConstraints* constr = new wxLayoutConstraints; - constr->left.SameAs(this, wxLeft); - constr->top.SameAs(this, wxTop); - constr->right.SameAs(this, wxRight); - constr->height.SameAs(this, wxHeight); - m_canvas->SetConstraints(constr); - - CreateStatusBar(); -} - -FortyFrame::~FortyFrame() -{ -} - -bool FortyFrame::OnClose() -{ - return m_canvas->OnClose(); -} - -void -FortyFrame::NewGame(wxCommandEvent&) -{ - m_canvas->NewGame(); -} - -void -FortyFrame::Exit(wxCommandEvent&) -{ -#ifdef __WXGTK__ - // wxGTK doesn't call OnClose() so we do it here - if (OnClose()) -#endif - Close(TRUE); -} - -void -FortyFrame::About(wxCommandEvent&) -{ - wxMessageBox( - "Forty Thieves\n\n" - "A freeware program using the wxWindows\n" - "portable C++ GUI toolkit.\n" - "http://web.ukonline.co.uk/julian.smart/wxwin\n" - "http://www.freiburg.linux.de/~wxxt\n\n" - "Author: Chris Breeze (c) 1992-1998\n" - "email: chris.breeze@iname.com", - "About Forty Thieves", - wxOK, this - ); -} - -void -FortyFrame::Undo(wxCommandEvent&) -{ - m_canvas->Undo(); -} - -void -FortyFrame::Redo(wxCommandEvent&) -{ - m_canvas->Redo(); -} - -void -FortyFrame::Scores(wxCommandEvent&) -{ - m_canvas->UpdateScores(); - ScoreDialog scores(this, m_canvas->GetScoreFile()); - scores.Display(); -} - -void -FortyFrame::ToggleRightButtonUndo(wxCommandEvent& event) -{ - bool checked = m_menuBar->IsChecked(event.GetId()); - m_canvas->EnableRightButtonUndo(checked); -} - -void -FortyFrame::ToggleHelpingHand(wxCommandEvent& event) -{ - bool checked = m_menuBar->IsChecked(event.GetId()); - m_canvas->EnableHelpingHand(checked); -} diff --git a/samples/forty/forty.h b/samples/forty/forty.h deleted file mode 100644 index bdbb7832fd..0000000000 --- a/samples/forty/forty.h +++ /dev/null @@ -1,31 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: forty.h -// Purpose: Forty Thieves patience game -// Author: Chris Breeze -// Modified by: -// Created: 21/07/97 -// RCS-ID: $Id$ -// Copyright: (c) 1993-1998 Chris Breeze -// Licence: wxWindows licence -//--------------------------------------------------------------------------- -// Last modified: 22nd July 1998 - ported to wxWindows 2.0 -///////////////////////////////////////////////////////////////////////////// -#ifndef _FORTY_H_ -#define _FORTY_H_ - -class FortyApp: public wxApp -{ -public: - bool OnInit(); - - static wxColour* BackgroundColour(); - static wxColour* TextColour(); - static wxBrush* BackgroundBrush(); - -private: - static wxColour* m_backgroundColour; - static wxColour* m_textColour; - static wxBrush* m_backgroundBrush; -}; - -#endif diff --git a/samples/forty/forty.rc b/samples/forty/forty.rc deleted file mode 100644 index 911ea25bb9..0000000000 --- a/samples/forty/forty.rc +++ /dev/null @@ -1,6 +0,0 @@ -#include "wx/msw/wx.rc" - -CardsIcon ICON "cards.ico" -CardPictures BITMAP "pictures.bmp" -CardSymbols BITMAP "symbols.bmp" - diff --git a/samples/forty/game.cpp b/samples/forty/game.cpp deleted file mode 100644 index c121d8dd06..0000000000 --- a/samples/forty/game.cpp +++ /dev/null @@ -1,943 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: game.cpp -// Purpose: Forty Thieves patience game -// Author: Chris Breeze -// Modified by: -// Created: 21/07/97 -// RCS-ID: $Id$ -// Copyright: (c) 1993-1998 Chris Breeze -// Licence: wxWindows licence -//--------------------------------------------------------------------------- -// Last modified: 22nd July 1998 - ported to wxWindows 2.0 -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#pragma interface -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include -#include -#include -#include -#include "forty.h" -#include "game.h" - -Game::Game(int wins, int games, int score) : - m_inPlay(FALSE), - m_moveIndex(0), - m_redoIndex(0), - m_bmap(0), - m_bmapCard(0) -{ - int i; - - m_pack = new Pack(2, 2 + 4 * (CardHeight + 2)); - srand(time(0)); - - for (i = 0; i < 5; i++) m_pack->Shuffle(); - - m_discard = new Discard(2, 2 + 5 * (CardHeight + 2)); - - for (i = 0; i < 8; i++) - { - m_foundations[i] = new Foundation(2 + (i / 4) * (CardWidth + 2), - 2 + (i % 4) * (CardHeight + 2)); - } - - for (i = 0; i < 10; i++) - { - m_bases[i] = new Base(8 + (i + 2) * (CardWidth + 2), 2); - } - Deal(); - m_srcPile = 0; - m_liftedCard = 0; - - // copy the input parameters for future reference - m_numWins = wins; - m_numGames = games; - m_totalScore = score; - m_currentScore = 0; -} - - -// Make sure we delete all objects created by the game object -Game::~Game() -{ - int i; - - delete m_pack; - delete m_discard; - for (i = 0; i < 8; i++) - { - delete m_foundations[i]; - } - for (i = 0; i < 10; i++) - { - delete m_bases[i]; - } - delete m_bmap; - delete m_bmapCard; -} - -/* -Set the score for a new player. -NB: call Deal() first if the new player is to start -a new game -*/ -void Game::NewPlayer(int wins, int games, int score) -{ - m_numWins = wins; - m_numGames = games; - m_totalScore = score; - m_currentScore = 0; -} - -// Undo the last move -void Game::Undo(wxDC& dc) -{ - if (m_moveIndex > 0) - { - m_moveIndex--; - Card* card = m_moves[m_moveIndex].dest->RemoveTopCard(dc); - m_moves[m_moveIndex].src->AddCard(dc, card); - DisplayScore(dc); - } -} - -// Redo the last move -void Game::Redo(wxDC& dc) -{ - if (m_moveIndex < m_redoIndex) - { - Card* card = m_moves[m_moveIndex].src->RemoveTopCard(dc); - if (m_moves[m_moveIndex].src == m_pack) - { - m_pack->Redraw(dc); - card->TurnCard(faceup); - } - m_moves[m_moveIndex].dest->AddCard(dc, card); - DisplayScore(dc); - m_moveIndex++; - } -} - -void Game::DoMove(wxDC& dc, Pile* src, Pile* dest) -{ - if (m_moveIndex < MaxMoves) - { - if (src == dest) - { - wxMessageBox("Game::DoMove() src == dest", "Debug message", - wxOK | wxICON_EXCLAMATION); - } - m_moves[m_moveIndex].src = src; - m_moves[m_moveIndex].dest = dest; - m_moveIndex++; - - // when we do a move any moves in redo buffer are discarded - m_redoIndex = m_moveIndex; - } - else - { - wxMessageBox("Game::DoMove() Undo buffer full", "Debug message", - wxOK | wxICON_EXCLAMATION); - } - - if (!m_inPlay) - { - m_inPlay = TRUE; - m_numGames++; - } - DisplayScore(dc); -} - - -void Game::DisplayScore(wxDC& dc) -{ - wxColour* bgColour = FortyApp::BackgroundColour(); - wxPen* pen = wxThePenList->FindOrCreatePen(*bgColour, 1, wxSOLID); - dc.SetTextBackground(*bgColour); - dc.SetTextForeground(*FortyApp::TextColour()); - dc.SetBrush(FortyApp::BackgroundBrush()); - dc.SetPen(pen); - - // count the number of cards in foundations - m_currentScore = 0; - for (int i = 0; i < 8; i++) - { - m_currentScore += m_foundations[i]->GetNumCards(); - } - - int x, y; - m_pack->GetTopCardPos(x, y); - x += 12 * CardWidth - 105; - - int w, h; - { - long width, height; - dc.GetTextExtent("Average score:m_x", &width, &height); - w = width; - h = height; - } - dc.DrawRectangle(x + w, y, 20, 4 * h); - - char str[80]; - sprintf(str, "%d", m_currentScore); - dc.DrawText("Score:", x, y); - dc.DrawText(str, x + w, y); - y += h; - - sprintf(str, "%d", m_numGames); - dc.DrawText("Games played:", x, y); - dc.DrawText(str, x + w, y); - y += h; - - sprintf(str, "%d", m_numWins); - dc.DrawText("Games won:", x, y); - dc.DrawText(str, x + w, y); - y += h; - - int average = 0; - if (m_numGames > 0) - { - average = (2 * (m_currentScore + m_totalScore) + m_numGames ) / (2 * m_numGames); - } - sprintf(str, "%d", average); - dc.DrawText("Average score:", x, y); - dc.DrawText(str, x + w, y); -} - - -// Shuffle the m_pack and deal the cards -void Game::Deal() -{ - int i, j; - Card* card; - - // Reset all the piles, the undo buffer and shuffle the m_pack - m_moveIndex = 0; - m_pack->ResetPile(); - for (i = 0; i < 5; i++) - { - m_pack->Shuffle(); - } - m_discard->ResetPile(); - for (i = 0; i < 10; i++) - { - m_bases[i]->ResetPile(); - } - for (i = 0; i < 8; i++) - { - m_foundations[i]->ResetPile(); - } - - // Deal the initial 40 cards onto the bases - for (i = 0; i < 10; i++) - { - for (j = 1; j <= 4; j++) - { - card = m_pack->RemoveTopCard(); - card->TurnCard(faceup); - m_bases[i]->AddCard(card); - } - } - - if (m_inPlay) - { - // player has started the game and then redealt - // and so we must add the score for this game to the total score - m_totalScore += m_currentScore; - } - m_currentScore = 0; - m_inPlay = FALSE; -} - - -// Redraw the m_pack, discard pile, the bases and the foundations -void Game::Redraw(wxDC& dc) -{ - int i; - m_pack->Redraw(dc); - m_discard->Redraw(dc); - for (i = 0; i < 8; i++) - { - m_foundations[i]->Redraw(dc); - } - for (i = 0; i < 10; i++) - { - m_bases[i]->Redraw(dc); - } - DisplayScore(dc); - - if (m_bmap == 0) - { - m_bmap = new wxBitmap(CardWidth, CardHeight); - m_bmapCard = new wxBitmap(CardWidth, CardHeight); - - // Initialise the card bitmap to the background colour - wxMemoryDC memoryDC; - memoryDC.SelectObject(m_bmapCard); - memoryDC.SetBrush(FortyApp::BackgroundBrush()); - memoryDC.DrawRectangle(0, 0, CardWidth, CardHeight); - memoryDC.SelectObject(m_bmap); - memoryDC.DrawRectangle(0, 0, CardWidth, CardHeight); - } -} - - -// Test to see if the point (x, y) is over the top card of one of the piles -// Returns pointer to the pile, or 0 if (x, y) is not over a pile -// or the pile is empty -Pile* Game::WhichPile(int x, int y) -{ - if (m_pack->GetCard(x, y) && - m_pack->GetCard(x, y) == m_pack->GetTopCard()) - { - return m_pack; - } - - if (m_discard->GetCard(x, y) && - m_discard->GetCard(x, y) == m_discard->GetTopCard()) - { - return m_discard; - } - - int i; - for (i = 0; i < 8; i++) - { - if (m_foundations[i]->GetCard(x, y) && - m_foundations[i]->GetCard(x, y) == m_foundations[i]->GetTopCard()) - { - return m_foundations[i]; - } - } - - for (i = 0; i < 10; i++) - { - if (m_bases[i]->GetCard(x, y) && - m_bases[i]->GetCard(x, y) == m_bases[i]->GetTopCard()) - { - return m_bases[i]; - } - } - return 0; -} - - -// Left button is pressed - if cursor is over the m_pack then deal a card -// otherwise if it is over a card pick it up ready to be dragged - see MouseMove() -bool Game::LButtonDown(wxDC& dc, int x, int y) -{ - m_srcPile = WhichPile(x, y); - if (m_srcPile == m_pack) - { - Card* card = m_pack->RemoveTopCard(); - if (card) - { - m_pack->Redraw(dc); - card->TurnCard(faceup); - m_discard->AddCard(dc, card); - DoMove(dc, m_pack, m_discard); - } - m_srcPile = 0; - } - else if (m_srcPile) - { - m_srcPile->GetTopCardPos(m_xPos, m_yPos); - m_xOffset = m_xPos - x; - m_yOffset = m_yPos - y; - - // Copy the area under the card - // Initialise the card bitmap to the background colour - { - wxMemoryDC memoryDC; - memoryDC.SelectObject(m_bmap); - m_liftedCard = m_srcPile->RemoveTopCard(memoryDC, m_xPos, m_yPos); - } - - // Draw the card in card bitmap ready for blitting onto - // the screen - { - wxMemoryDC memoryDC; - memoryDC.SelectObject(m_bmapCard); - m_liftedCard->Draw(memoryDC, 0, 0); - } - } - return m_srcPile != 0; -} - -// Called when the left button is double clicked -// If a card is under the pointer and it can move elsewhere then move it. -// Move onto a foundation as first choice, a populated base as second and -// an empty base as third choice. -// NB Cards in the m_pack cannot be moved in this way - they aren't in play -// yet -void Game::LButtonDblClk(wxDC& dc, int x, int y) -{ - Pile* pile = WhichPile(x, y); - if (!pile) return; - - // Double click on m_pack is the same as left button down - if (pile == m_pack) - { - LButtonDown(dc, x, y); - } - else - { - Card* card = pile->GetTopCard(); - - if (card) - { - int i; - - // if the card is an ace then try to place it next - // to an ace of the same suit - if (card->GetPipValue() == 1) - { - for(i = 0; i < 4; i++) - { - Card* m_topCard; - if ((m_topCard = m_foundations[i]->GetTopCard())) - { - if (m_topCard->GetSuit() == card->GetSuit() && - m_foundations[i + 4] != pile && - m_foundations[i + 4]->GetTopCard() == 0) - { - pile->RemoveTopCard(dc); - m_foundations[i + 4]->AddCard(dc, card); - DoMove(dc, pile, m_foundations[i + 4]); - return; - } - } - } - } - - // try to place the card on a foundation - for(i = 0; i < 8; i++) - { - if (m_foundations[i]->AcceptCard(card) && m_foundations[i] != pile) - { - pile->RemoveTopCard(dc); - m_foundations[i]->AddCard(dc, card); - DoMove(dc, pile, m_foundations[i]); - return; - } - } - // try to place the card on a populated base - for(i = 0; i < 10; i++) - { - if (m_bases[i]->AcceptCard(card) && - m_bases[i] != pile && - m_bases[i]->GetTopCard()) - { - pile->RemoveTopCard(dc); - m_bases[i]->AddCard(dc, card); - DoMove(dc, pile, m_bases[i]); - return; - } - } - // try to place the card on any base - for(i = 0; i < 10; i++) - { - if (m_bases[i]->AcceptCard(card) && m_bases[i] != pile) - { - pile->RemoveTopCard(dc); - m_bases[i]->AddCard(dc, card); - DoMove(dc, pile, m_bases[i]); - return; - } - } - } - } -} - - -// Test to see whether the game has been won: -// i.e. m_pack, discard and bases are empty -bool Game::HaveYouWon() -{ - if (m_pack->GetTopCard()) return FALSE; - if (m_discard->GetTopCard()) return FALSE; - for(int i = 0; i < 10; i++) - { - if (m_bases[i]->GetTopCard()) return FALSE; - } - m_numWins++; - m_totalScore += m_currentScore; - m_currentScore = 0; - return TRUE; -} - - -// See whether the card under the cursor can be moved somewhere else -// Returns TRUE if it can be moved, FALSE otherwise -bool Game::CanYouGo(int x, int y) -{ - Pile* pile = WhichPile(x, y); - if (pile && pile != m_pack) - { - Card* card = pile->GetTopCard(); - - if (card) - { - int i; - for(i = 0; i < 8; i++) - { - if (m_foundations[i]->AcceptCard(card) && m_foundations[i] != pile) - { - return TRUE; - } - } - for(i = 0; i < 10; i++) - { - if (m_bases[i]->GetTopCard() && - m_bases[i]->AcceptCard(card) && - m_bases[i] != pile) - { - return TRUE; - } - } - } - } - return FALSE; -} - - -// Called when the left button is released after dragging a card -// Scan the piles to see if this card overlaps a pile and can be added -// to the pile. If the card overlaps more than one pile on which it can be placed -// then put it on the nearest pile. -void Game::LButtonUp(wxDC& dc, int x, int y) -{ - if (m_srcPile) - { - // work out the position of the dragged card - x += m_xOffset; - y += m_yOffset; - - Pile* nearestPile = 0; - int distance = (CardHeight + CardWidth) * (CardHeight + CardWidth); - - // find the nearest pile which will accept the card - int i; - for (i = 0; i < 8; i++) - { - if (DropCard(x, y, m_foundations[i], m_liftedCard)) - { - if (m_foundations[i]->CalcDistance(x, y) < distance) - { - nearestPile = m_foundations[i]; - distance = nearestPile->CalcDistance(x, y); - } - } - } - for (i = 0; i < 10; i++) - { - if (DropCard(x, y, m_bases[i], m_liftedCard)) - { - if (m_bases[i]->CalcDistance(x, y) < distance) - { - nearestPile = m_bases[i]; - distance = nearestPile->CalcDistance(x, y); - } - } - } - - // Restore the area under the card - wxMemoryDC memoryDC; - memoryDC.SelectObject(m_bmap); - dc.Blit(m_xPos, m_yPos, CardWidth, CardHeight, - &memoryDC, 0, 0, wxCOPY); - - // Draw the card in its new position - if (nearestPile) - { - // Add to new pile - nearestPile->AddCard(dc, m_liftedCard); - if (nearestPile != m_srcPile) - { - DoMove(dc, m_srcPile, nearestPile); - } - } - else - { - // Return card to src pile - m_srcPile->AddCard(dc, m_liftedCard); - } - m_srcPile = 0; - m_liftedCard = 0; - } -} - - - - -bool Game::DropCard(int x, int y, Pile* pile, Card* card) -{ - bool retval = FALSE; - if (pile->Overlap(x, y)) - { - if (pile->AcceptCard(card)) - { - retval = TRUE; - } - } - return retval; -} - - -void Game::MouseMove(wxDC& dc, int mx, int my) -{ - if (m_liftedCard) - { - wxMemoryDC memoryDC; - memoryDC.SelectObject(m_bmap); - - int dx = mx + m_xOffset - m_xPos; - int dy = my + m_yOffset - m_yPos; - - if (abs(dx) >= CardWidth || abs(dy) >= CardHeight) - { - // Restore the area under the card - dc.Blit(m_xPos, m_yPos, CardWidth, CardHeight, - &memoryDC, 0, 0, wxCOPY); - - // Copy the area under the card in the new position - memoryDC.Blit(0, 0, CardWidth, CardHeight, - &dc, m_xPos + dx, m_yPos + dy, wxCOPY); - } - else if (dx >= 0) - { - // dx >= 0 - dc.Blit(m_xPos, m_yPos, dx, CardHeight, &memoryDC, 0, 0, wxCOPY); - if (dy >= 0) - { - // dy >= 0 - dc.Blit(m_xPos + dx, m_yPos, CardWidth - dx, dy, &memoryDC, dx, 0, wxCOPY); - memoryDC.Blit(0, 0, CardWidth - dx, CardHeight - dy, - &memoryDC, dx, dy, wxCOPY); - memoryDC.Blit(0, CardHeight - dy, CardWidth - dx, dy, - &dc, m_xPos + dx, m_yPos + CardHeight, wxCOPY); - } - else - { - // dy < 0 - dc.Blit(m_xPos + dx, m_yPos + dy + CardHeight, CardWidth - dx, -dy, - &memoryDC, dx, CardHeight + dy, wxCOPY); - memoryDC.Blit(0, -dy, CardWidth - dx, CardHeight + dy, - &memoryDC, dx, 0, wxCOPY); - memoryDC.Blit(0, 0, CardWidth - dx, -dy, - &dc, m_xPos + dx, m_yPos + dy, wxCOPY); - } - memoryDC.Blit(CardWidth - dx, 0, dx, CardHeight, - &dc, m_xPos + CardWidth, m_yPos + dy, wxCOPY); - } - else - { - // dx < 0 - dc.Blit(m_xPos + CardWidth + dx, m_yPos, -dx, CardHeight, - &memoryDC, CardWidth + dx, 0, wxCOPY); - if (dy >= 0) - { - dc.Blit(m_xPos, m_yPos, CardWidth + dx, dy, &memoryDC, 0, 0, wxCOPY); - memoryDC.Blit(-dx, 0, CardWidth + dx, CardHeight - dy, - &memoryDC, 0, dy, wxCOPY); - memoryDC.Blit(-dx, CardHeight - dy, CardWidth + dx, dy, - &dc, m_xPos, m_yPos + CardHeight, wxCOPY); - } - else - { - // dy < 0 - dc.Blit(m_xPos, m_yPos + CardHeight + dy, CardWidth + dx, -dy, - &memoryDC, 0, CardHeight + dy, wxCOPY); - memoryDC.Blit(-dx, -dy, CardWidth + dx, CardHeight + dy, - &memoryDC, 0, 0, wxCOPY); - memoryDC.Blit(-dx, 0, CardWidth + dx, -dy, - &dc, m_xPos, m_yPos + dy, wxCOPY); - } - memoryDC.Blit(0, 0, -dx, CardHeight, - &dc, m_xPos + dx, m_yPos + dy, wxCOPY); - } - m_xPos += dx; - m_yPos += dy; - - // draw the card in its new position - memoryDC.SelectObject(m_bmapCard); - dc.Blit(m_xPos, m_yPos, CardWidth, CardHeight, - &memoryDC, 0, 0, wxCOPY); - } -} - - - -//----------------------------------------------// -// The Pack class: holds the two decks of cards // -//----------------------------------------------// -Pack::Pack(int x, int y) : Pile(x, y, 0, 0) -{ - for (m_topCard = 0; m_topCard < NumCards; m_topCard++) - { - m_cards[m_topCard] = new Card(1 + m_topCard / 2, facedown); - } - m_topCard = NumCards - 1; -} - - -void Pack::Shuffle() -{ - Card* temp[NumCards]; - int i; - - // Don't try to shuffle an empty m_pack! - if (m_topCard < 0) return; - - // Copy the cards into a temporary array. Start by clearing - // the array and then copy the card into a random position. - // If the position is occupied then find the next lower position. - for (i = 0; i <= m_topCard; i++) - { - temp[i] = 0; - } - for (i = 0; i <= m_topCard; i++) - { - int pos = rand() % (m_topCard + 1); - while (temp[pos]) - { - pos--; - if (pos < 0) pos = m_topCard; - } - m_cards[i]->TurnCard(facedown); - temp[pos] = m_cards[i]; - m_cards[i] = 0; - } - - // Copy each card back into the m_pack in a random - // position. If position is occupied then find nearest - // unoccupied position after the random position. - for (i = 0; i <= m_topCard; i++) - { - int pos = rand() % (m_topCard + 1); - while (m_cards[pos]) - { - pos++; - if (pos > m_topCard) pos = 0; - } - m_cards[pos] = temp[i]; - } -} - -void Pack::Redraw(wxDC& dc) -{ - Pile::Redraw(dc); - - char str[10]; - sprintf(str, "%d ", m_topCard + 1); - - dc.SetTextBackground(*FortyApp::BackgroundColour()); - dc.SetTextForeground(*FortyApp::TextColour()); - dc.DrawText(str, m_x + CardWidth + 5, m_y + CardHeight / 2); - -} - -void Pack::AddCard(Card* card) -{ - if (card == m_cards[m_topCard + 1]) - { - m_topCard++; - } - else - { - wxMessageBox("Pack::AddCard() Undo error", "Forty Thieves: Warning", - wxOK | wxICON_EXCLAMATION); - } - card->TurnCard(facedown); -} - - -Pack::~Pack() -{ - for (m_topCard = 0; m_topCard < NumCards; m_topCard++) - { - delete m_cards[m_topCard]; - } -}; - - -//------------------------------------------------------// -// The Base class: holds the initial pile of four cards // -//------------------------------------------------------// -Base::Base(int x, int y) : Pile(x, y, 0, 12) -{ - m_topCard = -1; -} - - -bool Base::AcceptCard(Card* card) -{ - bool retval = FALSE; - - if (m_topCard >= 0) - { - if (m_cards[m_topCard]->GetSuit() == card->GetSuit() && - m_cards[m_topCard]->GetPipValue() - 1 == card->GetPipValue()) - { - retval = TRUE; - } - } - else - { - // pile is empty - ACCEPT - retval = TRUE; - } - return retval; -} - -Base::~Base() -{ -// nothing special at the moment -}; - - -//----------------------------------------------------------------// -// The Foundation class: holds the cards built up from the ace... // -//----------------------------------------------------------------// -Foundation::Foundation(int x, int y) : Pile(x, y, 0, 0) -{ - m_topCard = -1; -} - -bool Foundation::AcceptCard(Card* card) -{ - bool retval = FALSE; - - if (m_topCard >= 0) - { - if (m_cards[m_topCard]->GetSuit() == card->GetSuit() && - m_cards[m_topCard]->GetPipValue() + 1 == card->GetPipValue()) - { - retval = TRUE; - } - } - else if (card->GetPipValue() == 1) - { - // It's an ace and the pile is empty - ACCEPT - retval = TRUE; - } - return retval; -} - -Foundation::~Foundation() -{ -// nothing special at the moment -}; - - -//----------------------------------------------------// -// The Discard class: holds cards dealt from the m_pack // -//----------------------------------------------------// -Discard::Discard(int x, int y) : Pile(x, y, 19, 0) -{ - m_topCard = -1; -} - -void Discard::Redraw(wxDC& dc) -{ - if (m_topCard >= 0) - { - if (m_dx == 0 && m_dy == 0) - { - m_cards[m_topCard]->Draw(dc, m_x, m_y); - } - else - { - int x = m_x; - int y = m_y; - for (int i = 0; i <= m_topCard; i++) - { - m_cards[i]->Draw(dc, x, y); - x += m_dx; - y += m_dy; - if (i == 31) - { - x = m_x; - y = m_y + CardHeight / 3; - } - } - } - } - else - { - Card::DrawNullCard(dc, m_x, m_y); - } -} - - -void Discard::GetTopCardPos(int& x, int& y) -{ - if (m_topCard < 0) - { - x = m_x; - y = m_y; - } - else if (m_topCard > 31) - { - x = m_x + m_dx * (m_topCard - 32); - y = m_y + CardHeight / 3; - } - else - { - x = m_x + m_dx * m_topCard; - y = m_y; - } -} - - -Card* Discard::RemoveTopCard(wxDC& dc, int m_xOffset, int m_yOffset) -{ - Card* card; - - if (m_topCard <= 31) - { - card = Pile::RemoveTopCard(dc, m_xOffset, m_yOffset); - } - else - { - int topX, topY, x, y; - GetTopCardPos(topX, topY); - card = Pile::RemoveTopCard(); - card->Erase(dc, topX - m_xOffset, topY - m_yOffset); - GetTopCardPos(x, y); - dc.SetClippingRegion(topX - m_xOffset, topY - m_yOffset, - CardWidth, CardHeight); - - for (int i = m_topCard - 31; i <= m_topCard - 31 + CardWidth / m_dx; i++) - { - m_cards[i]->Draw(dc, m_x - m_xOffset + i * m_dx, m_y - m_yOffset); - } - if (m_topCard > 31) - { - m_cards[m_topCard]->Draw(dc, topX - m_xOffset - m_dx, topY - m_yOffset); - } - dc.DestroyClippingRegion(); - } - - return card; -} - - -Discard::~Discard() -{ -// nothing special at the moment -}; diff --git a/samples/forty/game.h b/samples/forty/game.h deleted file mode 100644 index 2360d15f49..0000000000 --- a/samples/forty/game.h +++ /dev/null @@ -1,135 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: game.h -// Purpose: Forty Thieves patience game -// Author: Chris Breeze -// Modified by: -// Created: 21/07/97 -// RCS-ID: $Id$ -// Copyright: (c) 1993-1998 Chris Breeze -// Licence: wxWindows licence -//--------------------------------------------------------------------------- -// Last modified: 22nd July 1998 - ported to wxWindows 2.0 -///////////////////////////////////////////////////////////////////////////// -#ifndef _GAME_H_ -#define _GAME_H_ -#include "card.h" -#include "pile.h" - -const int MaxMoves = 800; - - -//---------------------------------------// -// A class which holds the pack of cards // -//---------------------------------------// -class Pack : public Pile { -public: - Pack(int x, int y); - ~Pack(); - void Redraw(wxDC& dc); - void ResetPile() { m_topCard = NumCards - 1; } - void Shuffle(); - void AddCard(Card* card); // Add card - void AddCard(wxDC& dc, Card* card) { AddCard(card); Redraw(dc); } -}; - - -//----------------------------------------------------------// -// A class which holds a base i.e. the initial 10 x 4 cards // -//----------------------------------------------------------// -class Base : public Pile { -public: - Base(int x, int y); - ~Base(); - bool AcceptCard(Card* card); -}; - - -//----------------------------------------------------// -// A class which holds a foundation i.e. Ace, 2, 3... // -//----------------------------------------------------// -class Foundation : public Pile { -public: - Foundation(int x, int y); - ~Foundation(); - bool AcceptCard(Card* card); -}; - - -//--------------------------------------// -// A class which holds the discard pile // -//--------------------------------------// -class Discard : public Pile { -public: - Discard(int x, int y); - ~Discard(); - void Redraw(wxDC& dc); - void GetTopCardPos(int& x, int& y); - Card* RemoveTopCard(wxDC& dc, int m_xOffset, int m_yOffset); -}; - - -class Game { -public: - Game(int wins, int games, int score); - virtual ~Game(); - - void NewPlayer(int wins, int games, int score); - void Deal(); // Shuffle and deal a new game - bool CanYouGo(int x, int y); // can card under (x,y) go somewhere? - bool HaveYouWon(); // have you won the game? - - void Undo(wxDC& dc); // Undo the last go - void Redo(wxDC& dc); // Redo the last go - - void Redraw(wxDC& dc); - void DisplayScore(wxDC& dc); - bool LButtonDown(wxDC& dc, int mx, int my); // - void LButtonUp(wxDC& dc, int mx, int my); - void LButtonDblClk(wxDC& dc, int mx, int my); - void MouseMove(wxDC& dc, int mx, int my); - - int GetNumWins() const { return m_numWins; } - int GetNumGames() const { return m_numGames; } - int GetScore() const { return m_currentScore + m_totalScore; } - - bool InPlay() const { return m_inPlay; } - -private: - bool DropCard(int x, int y, Pile* pile, Card* card); - // can the card at (x, y) be dropped on the pile? - Pile* WhichPile(int x, int y); // which pile is (x, y) over? - void DoMove(wxDC& dc, Pile* src, Pile* dest); - - bool m_inPlay; // flag indicating that the game has started - - // undo buffer - struct { - Pile* src; - Pile* dest; - } m_moves[MaxMoves]; - int m_moveIndex; // current position in undo/redo buffer - int m_redoIndex; // max move index available for redo - - // the various piles of cards - Pack* m_pack; - Discard* m_discard; - Base* m_bases[10]; - Foundation* m_foundations[8]; - - // variables to do with dragging cards - Pile* m_srcPile; - Card* m_liftedCard; - int m_xPos, m_yPos; // current coords of card being dragged - int m_xOffset, m_yOffset; // card/mouse offset when dragging a card - - wxBitmap* m_bmap; - wxBitmap* m_bmapCard; - - // variables to do with scoring - int m_numGames; - int m_numWins; - int m_totalScore; - int m_currentScore; -}; - -#endif // _GAME_H_ diff --git a/samples/forty/makefile.nt b/samples/forty/makefile.nt deleted file mode 100644 index 0a70e53963..0000000000 --- a/samples/forty/makefile.nt +++ /dev/null @@ -1,98 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1997 -# Updated: -# Copyright: -# -# "%W% %G%" -# -# Makefile : Builds Forty Thieves example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\forty -PROGRAM=forty - -OBJECTS = $(PROGRAM).obj canvas.obj card.obj game.obj pile.obj playerdg.obj scoredg.obj scorefil.obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).h $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -canvas.obj: forty.h canvas.h canvas.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -card.obj: forty.h card.h card.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -pile.obj: forty.h pile.h pile.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -game.obj: forty.h game.h game.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -playerdg.obj: forty.h playerdg.h playerdg.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -scoredg.obj: forty.h scoredg.h scoredg.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -scorefil.obj: forty.h scorefil.h scorefil.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include /i$(WXDIR)\contrib\fafa -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.sbr - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb - diff --git a/samples/forty/pictures.bmp b/samples/forty/pictures.bmp deleted file mode 100644 index d8c3345521..0000000000 Binary files a/samples/forty/pictures.bmp and /dev/null differ diff --git a/samples/forty/pictures.xpm b/samples/forty/pictures.xpm deleted file mode 100644 index 31849577c7..0000000000 --- a/samples/forty/pictures.xpm +++ /dev/null @@ -1,60 +0,0 @@ -/* XPM */ -static char *Pictures[] = { -/* width height num_colors chars_per_pixel */ -" 120 45 8 1", -/* colors */ -". c #000000", -"# c #c0c0c0", -"a c #808080", -"b c #ff0000", -"c c #ffff00", -"d c #0000ff", -"e c #00ffff", -"f c #ffffff", -/* pixels */ -"........................................................................................................................", -".fff.fffffff.bb.bb.bb.b.fffffffffffffff..fffffffffff..f..bbc.cc..ffffffffffffff..fff.ffffff.bbccccbcccccbb.ffffffffffff.", -".ff.c.fffffff.bbbbbbbb.ffffffffffffffff..fff.ffffff..f.ff.bbc..c.ffffffffffffff..ff.a.ffffff.bbccbbbcccbb.fffffffffffff.", -".f.cbc.fffffff........fffffffffffffffff..ff.b.fffff.f.ffff.bb..c..fffffffffffff..f.#af.ffffff.bbbbbbbbbb.ffffffffffffff.", -".f.cbc.ffffff.fff.c.c.fffffffffffffffff..ff.b.fffff..f.ff.f.bbc.c.fffffffffffff..f.#af.ffffff............ffffffffffffff.", -".ff.c.fffffff.f..f.c.c.ffffffffffffffff..fff.ffffff.f..ff..f.bb..ffffffffffffff..f.#af.ffffff.a..f.fff.f.ffffffffffffff.", -".f.cbc.ffffff.f.ff.c.c.ffffffffffffffff..ff.c.fffff.fff.ffff..b.fffffffffffffff..f.#af.ffffff.a.f..fff..f.fffffffffffff.", -".f.cbc.fffff.fffff.c.c.ffffffffffffffff..ff.c.fffff.fff.ffff....fffffffffffffff..f.#af.ffffff.a.ffff.ffff.fffffffffffff.", -".ff.c.fffff.ffffff.c.c.ffffffffffffffff..ff.c.fffff.fff..fff.b..fffffffffffffff..f.#af.ffffff.a.fffff.fff.fffffffffffff.", -".f.cbc.ffff..###ff.c.c.ffffffffffffffff..ff.c.fffff.ffffffff..b.fffffffffffffff..f.#af.ffffff.a.ffff..fff.fffffffffffff.", -".f.cbc.ffffff...ff.c.c.ffffffffffffffff..fff.ffffff.ffbbbbff.f...ffffffffffffff..f.#af.fff..f.a..ffffffff.fffffffffffff.", -".ff....ffffff.ffff.c.c.ffffffffffffffff..ff....fffff.ffffff.f.f...fffffffffffff..f.#af.fff....a...f....f..fffffffffffff.", -".f.ffff.fffff.fffff.c.c.fffffffffffffff..f.ffff.ffff..ffff.f.f.f..fffffffffffff..f.#af.ffff.aaa.a..f.f.f...ffffffffffff.", -".f....ff.f.................ffffffffffff..f....ff.f.................ffffffffffff..f.#af.fff...................ffffffffff.", -".ff.fff....eddddddddddddddd.....fffffff..f.fffff...ffffffffff.cdbb......fffffff..f.#af.....c.cc..bbbbbb..c......fffffff.", -".ff....bbbd.dbcbbbbbbbbbcbdedbbb....fff..f....f.bc.fdddddddf.cdbb.d..f.....ffff..f.#af..cbbcc.cc..bbbb..c......b....fff.", -"...bbbb...deedbbcbbcbbcbbbd.dbb.bbbb.....f.fff.fbbc.fffffff.cdbb.d..f..dd.c..ff..........cbbcc.cc......c.....bbbdfff....", -".bb....c.ccdeedbbbcccbbbbdedbb.bbb..cc...ff...c.fbbc.fdddf.cdbb.d..f..dd.cccd.f...ffff...dcbbcc.cc....cc...ddbbbdfddddf.", -"...cc.c....bd.dbcbbcbbcbbd.db.bb..cbc.b..ff.dccc.bbc.ffff.cdbb.dd..ff...cdcdfd.........f.dcbbacc.cccccc..fdcbdbbdffddff.", -"..c....bbbbbdeddddddddddddedbb..cccc.bb..f..fdcdc.bbc.ff.cdbb.dddd..ff.cccdffdc...ffff.f.dcbbcacc.c...c.fdccccdbdffddff.", -"...bb.bb....bbbbbbbbbbbbbbbb..ccbbc.bb....ffdfdccc.bbc..cdbb..........cccdfdfbc........f.dcbbccacc.ccb.fdddbdbdbddffffd.", -".bbb.b..ccc.d.d.d.d.dd.d.d.d.cccbb.bb.b..cbdfffdccc.fdfdfdfdfdfdfdfd.cccdfffbbc...ffff.f.dcbbacca.bcdcc.caddddcddff..ff.", -".bb.bb.ccbcd.d.d.d.ff.d.d.d.dcbcc.bb.bb..cbbddddcdc.dbdbdbdbdbdbdbdb.cdcddddbbc.........ddcddaacc.cdddc.ccaddcdd........", -".b.bb.bbccc.d.d.d.dd.d.d.d.d.ccc.bb.bbb..cbbfffdccc.fdfdfdfdfdfdfdfd.cccdfffdbc..ff..ffddcddddaac.ccdcb.accbbcd.f.ffff..", -"..bb.cbbcc..bbbbbbbbbbbbbbbb....b..bb....cbfdfdccc..........bbdc..cbb.cccdfdff...dffffddcdbdbddaac.bcc.ccacbbcd.f.......", -".bb.cccc..bbdeddddddddddddedbbbbb....c...cdffdccc.ff..dddd.bbdc.ff.cbb.cdcdff.f..ffddffdbdccccdfa.c...c.ccabbcd.f.ffff..", -".b.cbc..bb.bd.dbbcbbcbbcbd.db....c.cc.....dfdcdc...ff..dd.bbdc.ffff.cbb.cccd.ff..ffddffdbbdbcdff..cccccc.ccbbcd.f.......", -"..cc..bbb.bbdedbbbbcccbbbdeedcc.c....bb..f.dccc.dd..f..d.bbdc.fdddf.cbbf.c...ff..fddddfdbbbddf...cc....cc.cbbcd...ffff..", -"....bbbb.bbd.dbbbcbbcbbcbbdeed...bbbb....ff..c.dd..f..d.bbdc.fffffff.cbbf.fff.f.....fffdbbb......c......cc.cbbc.........", -".fff....bbbdedbcbbbbbbbbbcbd.dbbb....ff..ffff.....f..d.bbdc.fdddddddf.cb.f....f..fff....bb......c..bbbb..cc.cbbc..fa#.f.", -".fffffff.....ddddddddddddddde....fff.ff..fffffff......bbdc.ffffffffff...fffff.f..fffffff.......c..bbbbbb..cc......fa#.f.", -".ffffffffffff.................f.ff....f..ffffffffffff.................f.ff....f..ffffffffff...................fff.fa#.f.", -".fffffffffffffff.c.c.fffff.fffff.ffff.f..fffffffffffff..f.f.f.ffff..ffff.ffff.f..ffffffffffff...f.f.f..a.aaa.ffff.fa#.f.", -".ffffffffffffffff.c.c.ffff.ffffff....ff..fffffffffffff...f.f.ffffff.fffff....ff..fffffffffffff..f....f...a....fff.fa#.f.", -".ffffffffffffffff.c.c.ff...ffffff.cbc.f..ffffffffffffff...f.ffbbbbff.ffffff.fff..fffffffffffff.ffffffff..a.f..fff.fa#.f.", -".ffffffffffffffff.c.c.ff###..ffff.cbc.f..fffffffffffffff.b..ffffffff.fffff.c.ff..fffffffffffff.fff..ffff.a.ffffff.fa#.f.", -".ffffffffffffffff.c.c.ffffff.fffff.c.ff..fffffffffffffff..b.fff..fff.fffff.c.ff..fffffffffffff.fff.fffff.a.ffffff.fa#.f.", -".ffffffffffffffff.c.c.fffff.fffff.cbc.f..fffffffffffffff....ffff.fff.fffff.c.ff..fffffffffffff.ffff.ffff.a.ffffff.fa#.f.", -".ffffffffffffffff.c.c.ff.f.ffffff.cbc.f..fffffffffffffff.b..ffff.fff.fffff.c.ff..fffffffffffff.f..fff..f.a.ffffff.fa#.f.", -".ffffffffffffffff.c.c.f..f.fffffff.c.ff..ffffffffffffff..bb.f..ff..f.ffffff.fff..ffffffffffffff.f.fff.ff.a.ffffff.fa#.f.", -".fffffffffffffffff.c.c.fff.ffffff.cbc.f..fffffffffffff.c.cbb.f.ff.f..fffff.b.ff..ffffffffffffff............ffffff.fa#.f.", -".fffffffffffffffff........fffffff.cbc.f..fffffffffffff..c..bb.ffff.f.fffff.b.ff..ffffffffffffff.bbbbbbbbbb.ffffff.fa#.f.", -".ffffffffffffffff.bbbbbbbb.fffffff.c.ff..ffffffffffffff.c..cbb.ff.f..ffffff.fff..fffffffffffff.bbcccbbbccbb.ffffff.a.ff.", -".fffffffffffffff.b.bb.bb.bb.fffffff.fff..ffffffffffffff..cc.cbb..f..fffffffffff..ffffffffffff.bbcccccbccccbb.ffffff.fff.", -"........................................................................................................................" -}; diff --git a/samples/forty/pile.cpp b/samples/forty/pile.cpp deleted file mode 100644 index 3e1de82146..0000000000 --- a/samples/forty/pile.cpp +++ /dev/null @@ -1,305 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: pile.cpp -// Purpose: Forty Thieves patience game -// Author: Chris Breeze -// Modified by: -// Created: 21/07/97 -// RCS-ID: $Id$ -// Copyright: (c) 1993-1998 Chris Breeze -// Licence: wxWindows licence -//--------------------------------------------------------------------------- -// Last modified: 22nd July 1998 - ported to wxWindows 2.0 -///////////////////////////////////////////////////////////////////////////// -//+-------------------------------------------------------------+ -//| Description: | -//| The base class for holding piles of playing cards. | -//+-------------------------------------------------------------+ - -#ifdef __GNUG__ -#pragma implementation -#pragma interface -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif -#ifdef __GNUG__ -#pragma implementation -#endif - -#include -#include -#include -#include -#include "card.h" -#include "pile.h" - -#include "wx/app.h" - -//+-------------------------------------------------------------+ -//| Pile::Pile() | -//+-------------------------------------------------------------+ -//| Description: | -//| Initialise the pile to be empty of cards. | -//+-------------------------------------------------------------+ -Pile::Pile(int x, int y, int dx, int dy) -{ - m_x = x; - m_y = y; - m_dx = dx; - m_dy = dy; - for (m_topCard = 0; m_topCard < NumCards; m_topCard++) - { - m_cards[m_topCard] = 0; - } - m_topCard = -1; // i.e. empty -} - - -//+-------------------------------------------------------------+ -//| Pile::Redraw() | -//+-------------------------------------------------------------+ -//| Description: | -//| Redraw the pile on the screen. If the pile is empty | -//| just draw a NULL card as a place holder for the pile. | -//| Otherwise draw the pile from the bottom up, starting | -//| at the origin of the pile, shifting each subsequent | -//| card by the pile's x and y offsets. | -//+-------------------------------------------------------------+ -void Pile::Redraw(wxDC& dc ) -{ - wxWindow *frame = wxTheApp->GetTopWindow(); - wxWindow *canvas = (wxWindow *) NULL; - if (frame) - { - wxNode *node = frame->GetChildren()->First(); - if (node) canvas = (wxWindow*)node->Data(); - } - - if (m_topCard >= 0) - { - if (m_dx == 0 && m_dy == 0) - { - if ((canvas) && (canvas->IsExposed(m_x,m_y,60,200))) - m_cards[m_topCard]->Draw(dc, m_x, m_y); - } - else - { - int x = m_x; - int y = m_y; - for (int i = 0; i <= m_topCard; i++) - { - if ((canvas) && (canvas->IsExposed(x,y,60,200))) - m_cards[i]->Draw(dc, x, y); - x += m_dx; - y += m_dy; - } - } - } - else - { - if ((canvas) && (canvas->IsExposed(m_x,m_y,60,200))) - Card::DrawNullCard(dc, m_x, m_y); - } -} - - -//+-------------------------------------------------------------+ -//| Pile::GetTopCard() | -//+-------------------------------------------------------------+ -//| Description: | -//| Return a pointer to the top card in the pile or NULL | -//| if the pile is empty. | -//| NB: Gets a copy of the card without removing it from the | -//| pile. | -//+-------------------------------------------------------------+ -Card* Pile::GetTopCard() -{ - Card* card = 0; - - if (m_topCard >= 0) - { - card = m_cards[m_topCard]; - } - return card; -} - - -//+-------------------------------------------------------------+ -//| Pile::RemoveTopCard() | -//+-------------------------------------------------------------+ -//| Description: | -//| If the pile is not empty, remove the top card from the | -//| pile and return the pointer to the removed card. | -//| If the pile is empty return a NULL pointer. | -//+-------------------------------------------------------------+ -Card* Pile::RemoveTopCard() -{ - Card* card = 0; - - if (m_topCard >= 0) - { - card = m_cards[m_topCard--]; - } - return card; -} - - -//+-------------------------------------------------------------+ -//| Pile::RemoveTopCard() | -//+-------------------------------------------------------------+ -//| Description: | -//| As RemoveTopCard() but also redraw the top of the pile | -//| after the card has been removed. | -//| NB: the offset allows for the redrawn area to be in a | -//| bitmap ready for 'dragging' cards acrosss the screen. | -//+-------------------------------------------------------------+ -Card* Pile::RemoveTopCard(wxDC& dc, int xOffset, int yOffset) -{ - int topX, topY, x, y; - - GetTopCardPos(topX, topY); - Card* card = RemoveTopCard(); - - if (card) - { - card->Erase(dc, topX - xOffset, topY - yOffset); - GetTopCardPos(x, y); - if (m_topCard < 0) - { - Card::DrawNullCard(dc, x - xOffset, y - yOffset); - } - else - { - m_cards[m_topCard]->Draw(dc, x - xOffset, y - yOffset); - } - } - - return card; -} - - -void Pile::GetTopCardPos(int& x, int& y) -{ - if (m_topCard < 0) - { - x = m_x; - y = m_y; - } - else - { - x = m_x + m_dx * m_topCard; - y = m_y + m_dy * m_topCard; - } -} - -void Pile::AddCard(Card* card) -{ - if (m_topCard < -1) m_topCard = -1; - - m_cards[++m_topCard] = card; -} - -void Pile::AddCard(wxDC& dc, Card* card) -{ - AddCard(card); - int x, y; - GetTopCardPos(x, y); - card->Draw(dc, x, y); -} - -// Can the card leave this pile. -// If it is a member of the pile then the answer is yes. -// Derived classes may override this behaviour to incorporate -// the rules of the game -bool Pile::CanCardLeave(Card* card) -{ - for (int i = 0; i <= m_topCard; i++) - { - if (card == m_cards[i]) return TRUE; - } - return FALSE; -} - -// Calculate how far x, y is from top card in the pile -// Returns the square of the distance -int Pile::CalcDistance(int x, int y) -{ - int cx, cy; - GetTopCardPos(cx, cy); - return ((cx - x) * (cx - x) + (cy - y) * (cy - y)); -} - - -// Return the card at x, y. Check the top card first, then -// work down the pile. If a card is found then return a pointer -// to the card, otherwise return NULL -Card* Pile::GetCard(int x, int y) -{ - int cardX; - int cardY; - GetTopCardPos(cardX, cardY); - - for (int i = m_topCard; i >= 0; i--) - { - if (x >= cardX && x <= cardX + CardWidth && - y >= cardY && y <= cardY + CardHeight) - { - return m_cards[i]; - } - cardX -= m_dx; - cardY -= m_dy; - } - return 0; -} - - -// Return the position of the given card. If it is not a member of this pile -// return the origin of the pile. -void Pile::GetCardPos(Card* card, int& x, int& y) -{ - x = m_x; - y = m_y; - - for (int i = 0; i <= m_topCard; i++) - { - if (card == m_cards[i]) - { - return; - } - x += m_dx; - y += m_dy; - } - - // card not found in pile, return origin of pile - x = m_x; - y = m_y; -} - - -bool Pile::Overlap(int x, int y) -{ - int cardX; - int cardY; - GetTopCardPos(cardX, cardY); - - if (x >= cardX - CardWidth && x <= cardX + CardWidth && - y >= cardY - CardHeight && y <= cardY + CardHeight) - { - return TRUE; - } - return FALSE; -} - - -Pile::~Pile() -{ -// nothing special at the moment -} diff --git a/samples/forty/pile.h b/samples/forty/pile.h deleted file mode 100644 index 49eb8c9b54..0000000000 --- a/samples/forty/pile.h +++ /dev/null @@ -1,80 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: pile.h -// Purpose: Forty Thieves patience game -// Author: Chris Breeze -// Modified by: -// Created: 21/07/97 -// RCS-ID: $Id$ -// Copyright: (c) 1993-1998 Chris Breeze -// Licence: wxWindows licence -//--------------------------------------------------------------------------- -// Last modified: 22nd July 1998 - ported to wxWindows 2.0 -///////////////////////////////////////////////////////////////////////////// -//+-------------------------------------------------------------+ -//| Description: | -//| The base class for holding piles of playing cards. | -//| This is the basic building block for card games. A pile | -//| has a position on the screen and an offset for each | -//| card placed on it e.g. a pack has no offset, but the | -//| discard pile may be fanned out across the screen. | -//| | -//| The pile knows how to draw itself, though this may be | -//| overridden if the default layout needs to be changed. | -//| One or more cards can be removed from the top of a pile, | -//| and single cards can be added to the top of a pile. | -//| Functions are provided which redraw the screen when | -//| cards are added or removed. | -//| | -//| Cards know which way up they are and how to draw | -//| themselves. Piles are lists of cards. Piles know which | -//| cards they contain and where they are to be drawn. | -//+-------------------------------------------------------------+ -#ifndef _PILE_H_ -#define _PILE_H_ -#include "card.h" - -const int NumCards = 2 * PackSize; - - -//----------------------------------------------------------------// -// A class defining a pile of cards with a position on the screen // -//----------------------------------------------------------------// -class Pile { -public: - Pile(int x, int y, int dx = 0, int dy = 0); - virtual ~Pile(); - - // General functions - virtual void ResetPile() { m_topCard = -1; } - virtual void Redraw(wxDC& pDC); - - // Card query functions - virtual Card* GetCard(int x, int y); // Get pointer to card at x, y - Card* GetTopCard(); // Get pointer to top card - virtual void GetCardPos(Card* card, int& x, int& y); - // Get position of a card - virtual void GetTopCardPos(int& x, int& y); - // Get position of the top card - int GetNumCards() { return m_topCard + 1; } // Number of cards in pile - bool Overlap(int x, int y); // does card at x,y overlap the pile? - int CalcDistance(int x, int y); // calculates the square of the distance - // of a card at (x,y) from the top of the pile - - // Functions removing one or more cards from the top of a pile - virtual bool CanCardLeave(Card* card); - Card* RemoveTopCard(); - virtual Card* RemoveTopCard(wxDC& pDC, int xOffset = 0, int yOffset = 0); - - // Functions to add a card to the top of a pile - virtual bool AcceptCard(Card*) { return FALSE; } - virtual void AddCard(Card* card); // Add card to top of pile - virtual void AddCard(wxDC& pDC, Card* card); // Add card + redraw it - -protected: - int m_x, m_y; // Position of the pile on the screen - int m_dx, m_dy; // Offset when drawing the pile - Card* m_cards[NumCards]; // Array of cards in this pile - int m_topCard; // Array index of the top card -}; - -#endif // _PILE_H_ diff --git a/samples/forty/playerdg.cpp b/samples/forty/playerdg.cpp deleted file mode 100644 index c85ca72865..0000000000 --- a/samples/forty/playerdg.cpp +++ /dev/null @@ -1,192 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: playerdg.cpp -// Purpose: Forty Thieves patience game -// Author: Chris Breeze -// Modified by: -// Created: 21/07/97 -// RCS-ID: $Id$ -// Copyright: (c) 1993-1998 Chris Breeze -// Licence: wxWindows licence -//--------------------------------------------------------------------------- -// Last modified: 22nd July 1998 - ported to wxWindows 2.0 -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#pragma interface -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "scorefil.h" -#include "playerdg.h" - -const int ID_LISTBOX = 101; - -BEGIN_EVENT_TABLE(PlayerSelectionDialog, wxDialog) - EVT_SIZE(PlayerSelectionDialog::OnSize) - EVT_BUTTON(wxID_OK, PlayerSelectionDialog::ButtonCallback) - EVT_BUTTON(wxID_CANCEL, PlayerSelectionDialog::ButtonCallback) - EVT_LISTBOX(ID_LISTBOX, PlayerSelectionDialog::SelectCallback) -END_EVENT_TABLE() - -PlayerSelectionDialog::PlayerSelectionDialog( - wxWindow* parent, - ScoreFile* file - ) : - wxDialog(parent, -1, "Player Selection", - wxDefaultPosition, wxSize(320, 200), - wxDIALOG_MODAL | wxDEFAULT_DIALOG_STYLE), - m_scoreFile(file) -{ - // enable constraints - SetAutoLayout (TRUE); - - wxStaticText* msg = new wxStaticText(this, -1, "Please select a name from the list"); - - wxListBox* list = new wxListBox( - this, ID_LISTBOX, - wxDefaultPosition, wxDefaultSize, - 0, 0, - wxLB_SINGLE - ); - - wxArrayString players; - m_scoreFile->GetPlayerList(players); - for (int i = 0; i < players.Count(); i++) - { - list->Append(players[i]); - } - - m_textField = new wxTextCtrl(this, -1, "", wxDefaultPosition, wxDefaultSize, 0); - - m_OK = new wxButton(this, wxID_OK, "OK"); - m_cancel = new wxButton(this, wxID_CANCEL, "Cancel"); - - wxLayoutConstraints* layout; - - // Constrain the msg at the top of the window - layout = new wxLayoutConstraints; - layout->left.SameAs (this, wxLeft, 10); - layout->top.SameAs (this, wxTop, 10); - layout->height.AsIs(); - layout->width.AsIs(); - msg->SetConstraints(layout); - - // Constrain the OK button - layout = new wxLayoutConstraints; - layout->left.SameAs (this, wxLeft, 10); - layout->bottom.SameAs (this, wxBottom, 10); - layout->height.AsIs(); - layout->width.AsIs(); - m_OK->SetConstraints(layout); - - // Constrain the OK button - layout = new wxLayoutConstraints; - layout->left.RightOf (m_OK, 10); - layout->bottom.SameAs (this, wxBottom, 10); - layout->height.AsIs(); - layout->width.AsIs(); - m_cancel->SetConstraints(layout); - - // Constrain the Name text entry field - layout = new wxLayoutConstraints; - layout->left.SameAs (this, wxLeft, 10); - layout->right.SameAs (this, wxRight, 10); - layout->bottom.SameAs (m_OK, wxTop, 10); - layout->height.AsIs(); - m_textField->SetConstraints(layout); - - // Constrain the list of players - layout = new wxLayoutConstraints; - layout->left.SameAs (this, wxLeft, 10); - layout->right.SameAs (this, wxRight, 10); - layout->top.Below (msg, 10); - layout->bottom.SameAs (m_textField, wxTop, 10); - list->SetConstraints(layout); - - wxString prevPlayer = m_scoreFile->GetPreviousPlayer(); - if (prevPlayer.Length() > 0) - { - list->SetStringSelection(prevPlayer); - m_textField->SetValue(prevPlayer); - } - - Layout(); -} - -PlayerSelectionDialog::~PlayerSelectionDialog() -{ -} - -void PlayerSelectionDialog::OnSize(wxSizeEvent& event) -{ - Layout(); -} - -const wxString& PlayerSelectionDialog::GetPlayersName() -{ -/* - m_player = ""; - Show(TRUE); -*/ - return m_player; -} - -bool PlayerSelectionDialog::OnClose() -{ - // hide the dialog - // NB don't return TRUE otherwise delete is called - m_player = ""; - Show(FALSE); - return FALSE; -} - -void PlayerSelectionDialog::SelectCallback(wxCommandEvent& event) -{ - if (event.GetEventType() == wxEVT_COMMAND_LISTBOX_SELECTED) - { -#ifdef __WXGTK__ - if (event.IsSelection()) -#endif - m_textField->SetValue(event.GetString()); - } -} - -void PlayerSelectionDialog::ButtonCallback(wxCommandEvent& event) -{ - if (event.GetId() == wxID_OK) - { - wxString name = m_textField->GetValue(); - if (!name.IsNull() && name.Length() > 0) - { - if (name.Contains('@')) - { - wxMessageBox("Names should not contain the '@' character", "Forty Thieves"); - } - else - { - m_player = name; - Show(FALSE); - } - } - else - { - wxMessageBox("Please enter your name", "Forty Thieves"); - } - } - else - { - m_player = ""; - Show(FALSE); - } -} diff --git a/samples/forty/playerdg.h b/samples/forty/playerdg.h deleted file mode 100644 index 995ac57a80..0000000000 --- a/samples/forty/playerdg.h +++ /dev/null @@ -1,41 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: playerdg.h -// Purpose: Forty Thieves patience game -// Author: Chris Breeze -// Modified by: -// Created: 21/07/97 -// RCS-ID: $Id$ -// Copyright: (c) 1993-1998 Chris Breeze -// Licence: wxWindows licence -//--------------------------------------------------------------------------- -// Last modified: 22nd July 1998 - ported to wxWindows 2.0 -///////////////////////////////////////////////////////////////////////////// -#ifndef _PLAYERDG_H_ -#define _PLAYERDG_H_ - -class PlayerSelectionDialog : public wxDialog -{ -public: - PlayerSelectionDialog(wxWindow* parent, ScoreFile* file); - virtual ~PlayerSelectionDialog(); - - const wxString& GetPlayersName(); - void ButtonCallback(wxCommandEvent& event); - void SelectCallback(wxCommandEvent& event); - void OnSize(wxSizeEvent& event); - - DECLARE_EVENT_TABLE() - -protected: - friend void SelectCallback(wxListBox&, wxCommandEvent&); - bool OnClose(); - -private: - ScoreFile* m_scoreFile; - wxString m_player; - wxButton* m_OK; - wxButton* m_cancel; - wxTextCtrl* m_textField; -}; - -#endif diff --git a/samples/forty/scoredg.cpp b/samples/forty/scoredg.cpp deleted file mode 100644 index 765fa47b5d..0000000000 --- a/samples/forty/scoredg.cpp +++ /dev/null @@ -1,187 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: scoredg.cpp -// Purpose: Forty Thieves patience game -// Author: Chris Breeze -// Modified by: -// Created: 21/07/97 -// RCS-ID: $Id$ -// Copyright: (c) 1993-1998 Chris Breeze -// Licence: wxWindows licence -//--------------------------------------------------------------------------- -// Last modified: 22nd July 1998 - ported to wxWindows 2.0 -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#pragma interface -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#if defined(__WXMSW__) && !defined(GNUWIN32) -#include -#else -#include -#endif -#include "scorefil.h" -#include "scoredg.h" - -class ScoreCanvas : public wxScrolledWindow -{ -public: - ScoreCanvas(wxWindow* parent, ScoreFile* scoreFile); - virtual ~ScoreCanvas(); - - void OnDraw(wxDC& dc); - -private: - wxFont* m_font; - wxString m_text; -}; - - -ScoreCanvas::ScoreCanvas(wxWindow* parent, ScoreFile* scoreFile) : - wxScrolledWindow(parent) -{ -#ifdef __WXGTK__ - m_font = wxTheFontList->FindOrCreateFont(12, wxROMAN, wxNORMAL, wxNORMAL); -#else - m_font = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL); -#endif - - wxArrayString players; - scoreFile->GetPlayerList( players); - - ostrstream os; - - os << "Player\tWins\tGames\tScore\n"; - for (int i = 0; i < players.Count(); i++) - { - int wins, games, score; - scoreFile->ReadPlayersScore(players[i], wins, games, score); - int average = 0; - if (games > 0) - { - average = (2 * score + games) / (2 * games); - } - - os << players[i] << '\t' - << wins << '\t' - << games << '\t' - << average << '\n'; - } - os << '\0'; - char* str = os.str(); - m_text = str; - delete str; -} - -ScoreCanvas::~ScoreCanvas() -{ -} - -void ScoreCanvas::OnDraw(wxDC& dc) -{ - dc.SetFont(m_font); - - const char* str = m_text; - unsigned int tab = 0; - unsigned int tabstops[] = { 5, 100, 150, 200 }; - - // get the line spacing for the current font - int lineSpacing; - { - long w, h; - dc.GetTextExtent("Testing", &w, &h); - lineSpacing = (int)h; - } - - int y = 0; - while (*str) - { - char text[256]; - char* dest = text; - - while (*str && *str >= ' ') *dest++ = *str++; - *dest = '\0'; - - dc.DrawText(text, tabstops[tab], y); - - if (*str == '\t') - { - if (tab < sizeof(tabstops) / sizeof(tabstops[0]) - 1) - { - tab++; - } - } - else if (*str == '\n') - { - tab = 0; - y += lineSpacing; - } - if (*str) str++; - } -} - - -ScoreDialog::ScoreDialog( - wxWindow* parent, - ScoreFile* file - ) : - wxDialog(parent, -1, "Scores", - wxDefaultPosition, wxSize(310, 200), - wxDIALOG_MODAL | wxDEFAULT_DIALOG_STYLE), - m_scoreFile(file) -{ - // enable constraints - SetAutoLayout (TRUE); - - ScoreCanvas* list = new ScoreCanvas(this, m_scoreFile); - m_OK = new wxButton(this, wxID_OK, "OK"); - - wxLayoutConstraints* layout; - - // Constrain the OK button - layout = new wxLayoutConstraints; - layout->left.SameAs (this, wxLeft, 10); - layout->bottom.SameAs (this, wxBottom, 10); - layout->height.AsIs(); - layout->width.AsIs(); - m_OK->SetConstraints(layout); - - // Constrain the list of players - layout = new wxLayoutConstraints; - layout->left.SameAs (this, wxLeft, 10); - layout->right.SameAs (this, wxRight, 10); - layout->top.SameAs (this, wxTop, 10); - layout->bottom.SameAs (m_OK, wxTop, 10); - list->SetConstraints(layout); - - Layout(); -} - -ScoreDialog::~ScoreDialog() -{ -} - -void ScoreDialog::Display() -{ - Show(TRUE); -} - -bool ScoreDialog::OnClose() -{ - // hide the dialog - // NB don't return TRUE otherwise delete is called - Show(FALSE); - return FALSE; -} diff --git a/samples/forty/scoredg.h b/samples/forty/scoredg.h deleted file mode 100644 index c63cf03547..0000000000 --- a/samples/forty/scoredg.h +++ /dev/null @@ -1,32 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: scoredg.h -// Purpose: Forty Thieves patience game -// Author: Chris Breeze -// Modified by: -// Created: 21/07/97 -// RCS-ID: $Id$ -// Copyright: (c) 1993-1998 Chris Breeze -// Licence: wxWindows licence -//--------------------------------------------------------------------------- -// Last modified: 22nd July 1998 - ported to wxWindows 2.0 -///////////////////////////////////////////////////////////////////////////// -#ifndef _SCOREDG_H_ -#define _SCOREDG_H_ - -class ScoreDialog : public wxDialog -{ -public: - ScoreDialog(wxWindow* parent, ScoreFile* file); - virtual ~ScoreDialog(); - - void Display(); - -protected: - bool OnClose(); - -private: - ScoreFile* m_scoreFile; - wxButton* m_OK; -}; - -#endif diff --git a/samples/forty/scorefil.cpp b/samples/forty/scorefil.cpp deleted file mode 100644 index d066ec8a90..0000000000 --- a/samples/forty/scorefil.cpp +++ /dev/null @@ -1,183 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: scorefil.cpp -// Purpose: Forty Thieves patience game -// Author: Chris Breeze -// Modified by: -// Created: 21/07/97 -// RCS-ID: $Id$ -// Copyright: (c) 1993-1998 Chris Breeze -// Licence: wxWindows licence -//--------------------------------------------------------------------------- -// Last modified: 14th May 1998 - ported to wxWindows 2.0 -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#pragma interface -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#ifdef __WXGTK__ -#include -#include -#include -#endif -#include "wx/textfile.h" -#include "wx/config.h" -#include "wx/fileconf.h" - -#include "scorefil.h" - - -ScoreFile::ScoreFile(const char* appName) -{ -#if 0 - wxString filename; - m_configFilename << "/usr/local/share/" << appName << ".scores"; - if (access(m_configFilename, F_OK) == 0) - { - if (access(m_configFilename, R_OK | W_OK) != 0) - { - // file is not r/w - use local file instead - m_configFilename = wxFileConfig::GetLocalFileName(appName); - } - } - else - { - int fd = creat(m_configFilename, 0666); - - if (fd < 0) - { - // failed to create file - use local file instead - m_configFilename = wxFileConfig::GetLocalFileName(appName); - } - else - { - // ensure created file has rw-rw-rw permissions - close(fd); - } - } -#endif - - m_config = new wxConfig(appName, "wxWindows", appName, "", wxCONFIG_USE_LOCAL_FILE); // only local -} - -ScoreFile::~ScoreFile() -{ - delete m_config; -#ifdef __WXGTK__ - // ensure score file has rw-rw-rw permissions - // (wxFileConfig sets them to rw-------) - chmod(m_configFilename, 0666); -#endif -} - - -void ScoreFile::GetPlayerList( wxArrayString &list ) -{ - m_config->SetPath("/Players"); - int length = m_config->GetNumberOfGroups(); - - if (length <= 0) return; - - wxString player; - long index, i = 0; - if (m_config->GetFirstGroup(player, index)) - { - list.Add( player ); - i++; - while (m_config->GetNextGroup(player, index)) - { - list.Add( player ); - i++; - } - } -} - - -// Calculate an encrypted check number to prevent tampering with -// score file -long ScoreFile::CalcCheck(const char* name, int p1, int p2, int p3) -{ - long check = 0; - while (*name) - { - check = (check << 1) ^ (long)*name++; - check = ((check >> 23) ^ check) & 0xFFFFFF; - } - check = (check << 1) ^ (long)p1; - check = ((check >> 23) ^ check) & 0xFFFFFF; - check = (check << 1) ^ (long)p2; - check = ((check >> 23) ^ check) & 0xFFFFFF; - check = (check << 1) ^ (long)p3; - check = ((check >> 23) ^ check) & 0xFFFFFF; - return check; -} - -wxString ScoreFile::GetPreviousPlayer() const -{ - wxString result; - m_config->SetPath("/General"); - m_config->Read("LastPlayer", &result); - return result; -} - -void ScoreFile::ReadPlayersScore( - const char* player, - int& wins, - int& games, - int& score) -{ - long check; - long myWins, myGames, myScore; - - games = wins = score = 0; - - m_config->SetPath("/Players"); - m_config->SetPath(player); - if (m_config->Read("Score", &myScore, 0L) && - m_config->Read("Games", &myGames, 0L) && - m_config->Read("Wins", &myWins, 0L) && - m_config->Read("Check", &check, 0L)) - { - if (check != CalcCheck(player, myGames, myWins, myScore)) - { - wxMessageBox("Score file corrupted", "Warning", - wxOK | wxICON_EXCLAMATION); - } - else - { - games = myGames; - wins = myWins; - score = myScore; - } - } - WritePlayersScore(player, wins, games, score); -} - - -void ScoreFile::WritePlayersScore(const char* player, int wins, int games, int score) -{ - if (player) - { - m_config->SetPath("/General"); - m_config->Write("LastPlayer", player); - - m_config->SetPath("/Players"); - m_config->SetPath(player); - m_config->Write("Score", score); - m_config->Write("Games", games); - m_config->Write("Wins", wins); - m_config->Write("Check", CalcCheck(player, games, wins, score)); - } -} diff --git a/samples/forty/scorefil.h b/samples/forty/scorefil.h deleted file mode 100644 index 1e89904eca..0000000000 --- a/samples/forty/scorefil.h +++ /dev/null @@ -1,37 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: scorefil.h -// Purpose: Forty Thieves patience game -// Author: Chris Breeze -// Modified by: -// Created: 21/07/97 -// RCS-ID: $Id$ -// Copyright: (c) 1993-1998 Chris Breeze -// Licence: wxWindows licence -//--------------------------------------------------------------------------- -// Last modified: 22nd July 1998 - ported to wxWindows 2.0 -///////////////////////////////////////////////////////////////////////////// -#ifndef _SCOREFILE_H_ -#define _SCOREFILE_H_ - -#include - -class wxConfig; - -class ScoreFile { -public: - ScoreFile(const char* appName); - virtual ~ScoreFile(); - - void GetPlayerList( wxArrayString &list ); - wxString GetPreviousPlayer() const; - - void ReadPlayersScore(const char* player, int& wins, int& games, int &score); - void WritePlayersScore(const char* player, int wins, int games, int score); - -private: - long CalcCheck(const char* name, int p1, int p2, int p3); - wxString m_configFilename; - wxConfig* m_config; -}; - -#endif diff --git a/samples/forty/symbols.bmp b/samples/forty/symbols.bmp deleted file mode 100644 index 59f466cd18..0000000000 Binary files a/samples/forty/symbols.bmp and /dev/null differ diff --git a/samples/forty/symbols.xbm b/samples/forty/symbols.xbm deleted file mode 100644 index 5dee698c60..0000000000 --- a/samples/forty/symbols.xbm +++ /dev/null @@ -1,37 +0,0 @@ -#define Symbols_width 79 -#define Symbols_height 50 -static char Symbols_bits[] = { - 0x08,0x84,0x0d,0x01,0x00,0x00,0x00,0x00,0x00,0x80,0x1c,0xce,0x9f,0x03,0x00, - 0x00,0x00,0x00,0x00,0x80,0x2a,0xdf,0xdf,0x07,0x00,0x00,0x00,0x00,0x00,0x80, - 0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x80,0x2a,0x9f,0xcf,0x07,0x00, - 0x00,0x00,0x00,0x00,0x80,0x08,0x0e,0x07,0x01,0x00,0x00,0x00,0x00,0x00,0x80, - 0x1c,0x04,0x82,0x03,0x00,0x00,0x00,0x00,0x00,0x80,0x1c,0x04,0x82,0x03,0x00, - 0x00,0x00,0x00,0x00,0x80,0x08,0x0e,0x07,0x01,0x00,0x00,0x00,0x00,0x00,0x80, - 0x2a,0x9f,0xcf,0x07,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0x0f,0x00, - 0x00,0x00,0x00,0x00,0x80,0x2a,0xdf,0xdf,0x07,0x00,0x00,0x00,0x00,0x00,0x80, - 0x1c,0xce,0x9f,0x03,0x00,0x00,0x00,0x00,0x00,0x80,0x08,0x84,0x0d,0x01,0x00, - 0x00,0x00,0x00,0x00,0x80,0x70,0x00,0x01,0x63,0x40,0x00,0x00,0x00,0x00,0x80, - 0xf8,0x80,0x83,0xf7,0xe0,0x00,0x00,0x00,0x00,0x80,0xf8,0x80,0xc3,0xff,0xf1, - 0x01,0x00,0x00,0x00,0x80,0x70,0xc0,0xc7,0xff,0xf9,0x03,0x00,0x00,0x00,0x80, - 0x26,0xe3,0xcf,0xff,0xfd,0x07,0x00,0x00,0x00,0x80,0xaf,0xf7,0xdf,0xff,0xff, - 0x0f,0x00,0x00,0x00,0x80,0xff,0xe7,0x8f,0xff,0xfe,0x0f,0x00,0x00,0x00,0x80, - 0xaf,0xc7,0x07,0x7f,0x5e,0x0f,0x00,0x00,0x00,0x80,0x26,0x83,0x03,0x3e,0x4c, - 0x06,0x00,0x00,0x00,0x80,0x70,0x80,0x03,0x1c,0xe0,0x00,0x00,0x00,0x00,0x80, - 0xfc,0x01,0x01,0x08,0xf8,0x03,0x00,0x00,0x00,0x80,0xfc,0x01,0x01,0x08,0xf8, - 0x03,0x00,0x00,0x00,0x80,0x70,0x80,0x03,0x1c,0xe0,0x00,0x00,0x00,0x00,0x80, - 0x26,0x83,0x03,0x3e,0x4c,0x06,0x00,0x00,0x00,0x80,0xaf,0xc7,0x07,0x7f,0x5e, - 0x0f,0x00,0x00,0x00,0x80,0xff,0xe7,0x8f,0xff,0xfe,0x0f,0x00,0x00,0x00,0x80, - 0xaf,0xf7,0xdf,0xff,0xff,0x0f,0x00,0x00,0x00,0x80,0x26,0xe3,0xcf,0xff,0xfd, - 0x07,0x00,0x00,0x00,0x80,0x70,0xc0,0xc7,0xff,0xf9,0x03,0x00,0x00,0x00,0x80, - 0xf8,0x80,0xc3,0xff,0xf1,0x01,0x00,0x00,0x00,0x80,0xf8,0x80,0x83,0xf7,0xe0, - 0x00,0x00,0x00,0x00,0x80,0x70,0x00,0x01,0x63,0x40,0x00,0x00,0x00,0x00,0x80, - 0x0c,0xe7,0x43,0x3e,0xe7,0x73,0x5c,0xe6,0x73,0xa2,0x92,0x08,0x61,0x82,0x00, - 0x8a,0x62,0x09,0x89,0x92,0x21,0x88,0x50,0x9e,0x00,0x89,0x62,0x09,0x89,0x8a, - 0x21,0xc6,0x49,0xa0,0x87,0x70,0x7c,0x09,0x89,0x86,0x3f,0x01,0xfa,0xa0,0x88, - 0x88,0x60,0x09,0xa9,0x8a,0xa1,0x20,0x42,0xa2,0x88,0x88,0x50,0x29,0x49,0x92, - 0xa1,0xcf,0x41,0x1c,0x87,0x70,0x48,0xc6,0xb0,0xa2,0xa1,0xcf,0x11,0x1c,0x87, - 0x70,0x88,0x89,0x69,0xa2,0x21,0x28,0x12,0xa2,0x88,0x88,0x44,0x4a,0x92,0xa4, - 0x3f,0x24,0xf8,0x82,0x88,0x88,0x42,0x4a,0xa8,0xa8,0x21,0xc3,0x91,0x82,0x8f, - 0x70,0x5e,0x4a,0x88,0xb0,0xa1,0x80,0x50,0x3c,0x48,0x88,0x62,0x4a,0x88,0xa8, - 0x92,0x48,0x30,0x20,0x28,0x88,0x62,0x4a,0x88,0xa4,0x0c,0xe7,0x13,0x3e,0xe7, - 0x73,0x9c,0xe9,0x73,0xa2}; diff --git a/samples/forty/symbols.xpm b/samples/forty/symbols.xpm deleted file mode 100644 index e5a2b2590f..0000000000 --- a/samples/forty/symbols.xpm +++ /dev/null @@ -1,60 +0,0 @@ -/* XPM */ -static char *symbols[] = { -/* width height num_colors chars_per_pixel */ -" 79 50 3 1", -/* colors */ -". c #ffffff", -"* c #ff0000", -"# c #000000", -/* pixels */ -"...#......*....**.**....#......................................................", -"..###....***..*******..###.....................................................", -".#.#.#..*****.*******.#####....................................................", -"#######**************#######...................................................", -".#.#.#..*****..*****..#####....................................................", -"...#.....***....***.....#......................................................", -"..###.....*......*.....###.....................................................", -"..###.....*......*.....###.....................................................", -"...#.....***....***.....#......................................................", -".#.#.#..*****..*****..#####....................................................", -"#######**************#######...................................................", -".#.#.#..*****.*******.#####....................................................", -"..###....***..*******..###.....................................................", -"...#......*....**.**....#......................................................", -"....###.........*.......**...**.......#........................................", -"...#####.......***.....****.****.....###.......................................", -"...#####.......***....***********...#####......................................", -"....###.......*****...***********..#######.....................................", -".##..#..##...*******..***********.#########....................................", -"####.#.####.*********.***********###########...................................", -"###########..*******...*********.###########...................................", -"####.#.####...*****.....*******..####.#.####...................................", -".##..#..##.....***.......*****....##..#..##....................................", -"....###........***........***........###.......................................", -"..#######.......*..........*.......#######.....................................", -"..#######.......*..........*.......#######.....................................", -"....###........***........***........###.......................................", -".##..#..##.....***.......*****....##..#..##....................................", -"####.#.####...*****.....*******..####.#.####...................................", -"###########..*******...*********.###########...................................", -"####.#.####.*********.***********###########...................................", -".##..#..##...*******..***********.#########....................................", -"....###.......*****...***********..#######.....................................", -"...#####.......***....***********...#####......................................", -"...#####.......***.....****.****.....###.......................................", -"....###.........*.......**...**.......#........................................", -"..##....###..#####....#..#####..###..#####..###...###.#..##..#####..###..#...#.", -".#..#..#...#....#....##..#.....#.........#.#...#.#...##.#..#....#..#...#.#..#..", -"#....#.....#...#....#.#..####..#........#..#...#.#...##.#..#....#..#...#.#.#...", -"#....#...##...###..#..#......#.####....#....###...#####.#..#....#..#...#.##....", -"######..#........#.#####.....#.#...#...#...#...#.....##.#..#....#..#.#.#.#.#...", -"#....#.#.....#...#....#..#...#.#...#...#...#...#....#.#.#..#.#..#..#..#..#..#..", -"#....#.#####..###.....#...###...###....#....###....#..#..##...##....##.#.#...#.", -"#....#.#####..###...#.....###...###....#....###....#...##..#...##..#.##..#...#.", -"#....#.....#.#...#..#....#...#.#...#...#...#...#..#...#..#.#..#..#..#..#..#..#.", -"######....#..#.....#####.#.....#...#...#...#...#.#....#..#.#..#....#.#.#...#.#.", -"#....#..##....###...#..#.#.....#####...#....###..####.#..#.#..#....#...#....##.", -"#....#.#.......#....#.#...####.....#..#....#...#.#...##..#.#..#....#...#...#.#.", -".#..#..#...#..#.....##.......#.....#.#.....#...#.#...##..#.#..#....#...#..#..#.", -"..##....###..#####..#....#####..###..#####..###...###..##..#.#####..###..#...#." -}; diff --git a/samples/grid/.cvsignore b/samples/grid/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/grid/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/grid/Makefile b/samples/grid/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/grid/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/grid/Makefile.in b/samples/grid/Makefile.in deleted file mode 100644 index 6b9f1fdd09..0000000000 --- a/samples/grid/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# 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 diff --git a/samples/grid/bitmap1.bmp b/samples/grid/bitmap1.bmp deleted file mode 100644 index a9a5676133..0000000000 Binary files a/samples/grid/bitmap1.bmp and /dev/null differ diff --git a/samples/grid/bitmap2.bmp b/samples/grid/bitmap2.bmp deleted file mode 100644 index ae825f1bed..0000000000 Binary files a/samples/grid/bitmap2.bmp and /dev/null differ diff --git a/samples/grid/makefile.b32 b/samples/grid/makefile.b32 deleted file mode 100644 index d1707b1542..0000000000 --- a/samples/grid/makefile.b32 +++ /dev/null @@ -1,63 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds grid test example (DOS). - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 - -TARGET=test - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = test.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -test.obj: test.$(SRCSUFF) - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - diff --git a/samples/grid/makefile.dos b/samples/grid/makefile.dos deleted file mode 100644 index 23a7e87223..0000000000 --- a/samples/grid/makefile.dos +++ /dev/null @@ -1,66 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds grid test example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\test - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = test.$(SRCSUFF) -OBJECTS = test.obj - -all: test.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -test.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) test.obj test.def test.res - link $(LINKFLAGS) @<< -test.obj $(WXDIR)\src\msw\dummy.obj, -test, -NUL, -$(LIBS), -test.def -; -<< - rc -30 -K test.res - -test.obj: test.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -test.res : test.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /dFAFA_LIB /i$(WXDIR)\include test - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/grid/makefile.g95 b/samples/grid/makefile.g95 deleted file mode 100644 index 32f8af5e2f..0000000000 --- a/samples/grid/makefile.g95 +++ /dev/null @@ -1,37 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for grid example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/test.$(OBJSUFF) $(OBJDIR)/test_resources.$(OBJSUFF) - -all: $(OBJDIR) test$(GUISUFFIX)$(EXESUFF) - -wx: - -$(OBJDIR): - mkdir $(OBJDIR) - -test$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o test$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/test.$(OBJSUFF): test.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ test.$(SRCSUFF) - -$(OBJDIR)/test_resources.o: test.rc - $(RESCOMP) -i test.rc -o $(OBJDIR)/test_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) test$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/grid/makefile.nt b/samples/grid/makefile.nt deleted file mode 100644 index 04d14ef90a..0000000000 --- a/samples/grid/makefile.nt +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds wxGrid example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\grid -PROGRAM=test - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/grid/test.cpp b/samples/grid/test.cpp deleted file mode 100644 index 874ebeeb35..0000000000 --- a/samples/grid/test.cpp +++ /dev/null @@ -1,315 +0,0 @@ -/* - * File: test.cpp - * Purpose: wxGrid test - * Author: Julian Smart - * Created: 1995 - * Updated: - * Copyright: (c) 1995, AIAI, University of Edinburgh - */ - -static const char sccsid[] = "%W% %G%"; - -#ifdef __GNUG__ -#pragma implementation -#pragma interface -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "wx/grid.h" -#include "wx/colordlg.h" - -// Define a new application type -class MyApp: public wxApp -{ public: - bool OnInit(void); -}; - -// Define a new frame type -class MyFrame: public wxFrame -{ public: - wxGrid *grid; - MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size); - - bool OnClose(void) { return TRUE; } - - void ToggleEditable(wxCommandEvent& event); - void ToggleRowLabel(wxCommandEvent& event); - void ToggleColLabel(wxCommandEvent& event); - void ToggleDividers(wxCommandEvent& event); - void LeftCell(wxCommandEvent& event); - void CentreCell(wxCommandEvent& event); - void RightCell(wxCommandEvent& event); - void ColourLabelBackground(wxCommandEvent& event); - void ColourLabelText(wxCommandEvent& event); - void NormalLabelColouring(wxCommandEvent& event); - void ColourCellBackground(wxCommandEvent& event); - void ColourCellText(wxCommandEvent& event); - void NormalCellColouring(wxCommandEvent& event); - void Quit(wxCommandEvent& event); - - void OnActivate(wxActivateEvent& event); - -DECLARE_EVENT_TABLE() -}; - -wxBitmap *cellBitmap1 = (wxBitmap *) NULL; -wxBitmap *cellBitmap2 = (wxBitmap *) NULL; - -// ID for the menu quit command -#define GRID_QUIT 1 -#define GRID_TOGGLE_EDITABLE 2 -#define GRID_LEFT_CELL 3 -#define GRID_CENTRE_CELL 4 -#define GRID_RIGHT_CELL 5 -#define GRID_TOGGLE_ROW_LABEL 6 -#define GRID_TOGGLE_COL_LABEL 7 -#define GRID_COLOUR_LABEL_BACKGROUND 8 -#define GRID_COLOUR_LABEL_TEXT 9 -#define GRID_NORMAL_LABEL_COLOURING 10 -#define GRID_COLOUR_CELL_BACKGROUND 11 -#define GRID_COLOUR_CELL_TEXT 12 -#define GRID_NORMAL_CELL_COLOURING 13 -#define GRID_TOGGLE_DIVIDERS 14 - -// Main proc - -IMPLEMENT_APP(MyApp) - -// `Main program' equivalent, creating windows and returning main app frame -bool MyApp::OnInit(void) -{ -#ifdef __WXMSW__ - cellBitmap1 = new wxBitmap("bitmap1"); - cellBitmap2 = new wxBitmap("bitmap2"); -#endif - - // Create the main frame window - MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "wxGrid Sample", wxPoint(50, 50), wxSize(450, 300)); - - // Give it an icon -#ifdef __WXMSW__ - frame->SetIcon(wxIcon("mondrian")); -#endif - - // Make a menubar - wxMenu *file_menu = new wxMenu; - file_menu->Append(GRID_QUIT, "E&xit"); - - wxMenu *settings_menu = new wxMenu; - settings_menu->Append(GRID_TOGGLE_EDITABLE, "&Toggle editable"); - settings_menu->Append(GRID_TOGGLE_ROW_LABEL, "Toggle ro&w label"); - settings_menu->Append(GRID_TOGGLE_COL_LABEL, "Toggle co&l label"); - settings_menu->Append(GRID_TOGGLE_DIVIDERS, "Toggle ÷rs"); - settings_menu->AppendSeparator(); - settings_menu->Append(GRID_LEFT_CELL, "&Left cell alignment "); - settings_menu->Append(GRID_CENTRE_CELL, "&Centre cell alignment "); - settings_menu->Append(GRID_RIGHT_CELL, "&Right cell alignment "); - settings_menu->AppendSeparator(); - settings_menu->Append(GRID_COLOUR_LABEL_BACKGROUND, "Choose a label &background colour"); - settings_menu->Append(GRID_COLOUR_LABEL_TEXT, "Choose a label fore&ground colour"); - settings_menu->Append(GRID_NORMAL_LABEL_COLOURING, "&Normal label colouring"); - settings_menu->AppendSeparator(); - settings_menu->Append(GRID_COLOUR_CELL_BACKGROUND, "Choo&se a cell &background colour"); - settings_menu->Append(GRID_COLOUR_CELL_TEXT, "Choose &a cell foreground colour"); - settings_menu->Append(GRID_NORMAL_CELL_COLOURING, "N&ormal cell colouring"); - - wxMenuBar *menu_bar = new wxMenuBar; - menu_bar->Append(file_menu, "&File"); - menu_bar->Append(settings_menu, "&Settings"); - frame->SetMenuBar(menu_bar); - - // Make a grid - frame->grid = new wxGrid(frame, 0, 0, 400, 400); - - frame->grid->CreateGrid(10, 8); - frame->grid->SetColumnWidth(3, 200); - frame->grid->SetRowHeight(4, 45); - frame->grid->SetCellValue("First cell", 0, 0); - frame->grid->SetCellValue("Another cell", 1, 1); - frame->grid->SetCellValue("Yet another cell", 2, 2); - frame->grid->SetCellTextFont(wxTheFontList->FindOrCreateFont(10, wxROMAN, wxITALIC, wxNORMAL), 0, 0); - frame->grid->SetCellTextColour(*wxRED, 1, 1); - frame->grid->SetCellBackgroundColour(*wxCYAN, 2, 2); - if (cellBitmap1 && cellBitmap2) - { - frame->grid->SetCellAlignment(wxCENTRE, 5, 0); - frame->grid->SetCellAlignment(wxCENTRE, 6, 0); - frame->grid->SetCellBitmap(cellBitmap1, 5, 0); - frame->grid->SetCellBitmap(cellBitmap2, 6, 0); - } - - frame->grid->UpdateDimensions(); - - // Show the frame - frame->Show(TRUE); - - SetTopWindow(frame); - return TRUE; -} - -// My frame constructor -MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size): - wxFrame(frame, -1, title, pos, size) -{ - grid = (wxGenericGrid *) NULL; -} - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(GRID_TOGGLE_EDITABLE, MyFrame::ToggleEditable) - EVT_MENU(GRID_TOGGLE_ROW_LABEL, MyFrame::ToggleRowLabel) - EVT_MENU(GRID_TOGGLE_COL_LABEL, MyFrame::ToggleColLabel) - EVT_MENU(GRID_TOGGLE_DIVIDERS, MyFrame::ToggleDividers) - EVT_MENU(GRID_LEFT_CELL, MyFrame::LeftCell) - EVT_MENU(GRID_CENTRE_CELL, MyFrame::CentreCell) - EVT_MENU(GRID_RIGHT_CELL, MyFrame::RightCell) - EVT_MENU(GRID_COLOUR_LABEL_BACKGROUND, MyFrame::ColourLabelBackground) - EVT_MENU(GRID_COLOUR_LABEL_TEXT, MyFrame::ColourLabelText) - EVT_MENU(GRID_NORMAL_LABEL_COLOURING, MyFrame::NormalLabelColouring) - EVT_MENU(GRID_COLOUR_CELL_BACKGROUND, MyFrame::ColourCellBackground) - EVT_MENU(GRID_COLOUR_CELL_TEXT, MyFrame::ColourCellText) - EVT_MENU(GRID_NORMAL_CELL_COLOURING, MyFrame::NormalCellColouring) - EVT_MENU(GRID_QUIT, MyFrame::Quit) -END_EVENT_TABLE() - -void MyFrame::ToggleEditable(wxCommandEvent& WXUNUSED(event)) -{ - grid->SetEditable(!grid->GetEditable()); - grid->Refresh(); -} - -void MyFrame::ToggleRowLabel(wxCommandEvent& WXUNUSED(event)) -{ - if (grid->GetLabelSize(wxVERTICAL) > 0) - grid->SetLabelSize(wxVERTICAL, 0); - else - grid->SetLabelSize(wxVERTICAL, 40); - grid->Refresh(); -} - -void MyFrame::ToggleColLabel(wxCommandEvent& WXUNUSED(event)) -{ - if (grid->GetLabelSize(wxHORIZONTAL) > 0) - grid->SetLabelSize(wxHORIZONTAL, 0); - else - grid->SetLabelSize(wxHORIZONTAL, 20); - grid->Refresh(); -} - -void MyFrame::ToggleDividers(wxCommandEvent& WXUNUSED(event)) -{ - if (!grid->GetDividerPen()) - grid->SetDividerPen(wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID)); - else - grid->SetDividerPen((wxPen *) NULL); - grid->Refresh(); -} - -void MyFrame::LeftCell(wxCommandEvent& WXUNUSED(event)) -{ - grid->SetCellAlignment(wxLEFT); - grid->Refresh(); -} - -void MyFrame::CentreCell(wxCommandEvent& WXUNUSED(event)) -{ - grid->SetCellAlignment(wxCENTRE); - grid->Refresh(); -} - -void MyFrame::RightCell(wxCommandEvent& WXUNUSED(event)) -{ - grid->SetCellAlignment(wxRIGHT); - grid->Refresh(); -} - -void MyFrame::ColourLabelBackground(wxCommandEvent& WXUNUSED(event)) -{ - wxColourData data; - data.SetChooseFull(TRUE); - wxColourDialog dialog(this, &data); - if (dialog.ShowModal() != wxID_CANCEL) - { - wxColourData retData = dialog.GetColourData(); - wxColour col = retData.GetColour(); - grid->SetLabelBackgroundColour(col); - grid->Refresh(); - } -} - -void MyFrame::ColourLabelText(wxCommandEvent& WXUNUSED(event)) -{ - wxColourData data; - data.SetChooseFull(TRUE); - wxColourDialog dialog(this, &data); - if (dialog.ShowModal() != wxID_CANCEL) - { - wxColourData retData = dialog.GetColourData(); - wxColour col = retData.GetColour(); - grid->SetLabelTextColour(col); - grid->Refresh(); - } -} - -void MyFrame::NormalLabelColouring(wxCommandEvent& WXUNUSED(event)) -{ - grid->SetLabelBackgroundColour(*wxLIGHT_GREY); - grid->SetLabelTextColour(*wxBLACK); - grid->Refresh(); -} - -void MyFrame::ColourCellBackground(wxCommandEvent& WXUNUSED(event)) -{ - wxColourData data; - data.SetChooseFull(TRUE); - wxColourDialog dialog(this, &data); - if (dialog.ShowModal() != wxID_CANCEL) - { - wxColourData retData = dialog.GetColourData(); - wxColour col = retData.GetColour(); - grid->SetCellBackgroundColour(col); - grid->Refresh(); - } -} - -void MyFrame::ColourCellText(wxCommandEvent& WXUNUSED(event)) -{ - wxColourData data; - data.SetChooseFull(TRUE); - wxColourDialog dialog(this, &data); - if (dialog.ShowModal() != wxID_CANCEL) - { - wxColourData retData = dialog.GetColourData(); - wxColour col = retData.GetColour(); - grid->SetCellTextColour(col); - grid->Refresh(); - } -} - -void MyFrame::NormalCellColouring(wxCommandEvent& WXUNUSED(event)) -{ - grid->SetCellBackgroundColour(*wxWHITE); - grid->SetCellTextColour(*wxBLACK); - grid->Refresh(); -} - -void MyFrame::Quit(wxCommandEvent& WXUNUSED(event)) -{ - this->Close(TRUE); -} - -// Ensure that the grid's edit control always has the focus. -void MyFrame::OnActivate(wxActivateEvent& event) -{ - if (grid) grid->OnActivate(event.GetActive()); -} - diff --git a/samples/grid/test.def b/samples/grid/test.def deleted file mode 100644 index 3dd3b7a033..0000000000 --- a/samples/grid/test.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME Test -DESCRIPTION 'wxTableWindow Test' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 16192 diff --git a/samples/grid/test.rc b/samples/grid/test.rc deleted file mode 100644 index 571ada1f2a..0000000000 --- a/samples/grid/test.rc +++ /dev/null @@ -1,5 +0,0 @@ -#include "wx/msw/wx.rc" - -bitmap1 BITMAP "bitmap1.bmp" -bitmap2 BITMAP "bitmap2.bmp" - diff --git a/samples/internat/.cvsignore b/samples/internat/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/internat/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/internat/Makefile b/samples/internat/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/internat/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/internat/Makefile.in b/samples/internat/Makefile.in deleted file mode 100644 index 551d016327..0000000000 --- a/samples/internat/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# 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 diff --git a/samples/internat/internat.cpp b/samples/internat/internat.cpp deleted file mode 100644 index 1a7d4a0e39..0000000000 --- a/samples/internat/internat.cpp +++ /dev/null @@ -1,174 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: internat.cpp -// Purpose: Demonstrates internationalisation (i18n) support -// Author: Vadim Zeitlin/Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#pragma interface -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "wx/intl.h" -#include "wx/file.h" -#include "wx/log.h" - -#ifdef __WXGTK__ -#include "mondrian.xpm" -#endif - -// Define a new application type -class MyApp: public wxApp -{ -public: - virtual bool OnInit(); - -protected: - wxLocale m_locale; // locale we'll be using -}; - -// Define a new frame type -class MyFrame: public wxFrame -{ -public: - MyFrame(wxFrame *frame, const char *title, int x, int y, int w, int h); - -public: - void OnQuit(wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); - void OnPlay(wxCommandEvent& event); - void OnOpen(wxCommandEvent& event); - bool OnClose(void) { return TRUE; } - - DECLARE_EVENT_TABLE() -}; - -// ID for the menu commands -enum -{ - MINIMAL_QUIT, - MINIMAL_TEXT, - MINIMAL_ABOUT, - MINIMAL_TEST, - MINIMAL_OPEN -}; - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(MINIMAL_QUIT, MyFrame::OnQuit) - EVT_MENU(MINIMAL_ABOUT, MyFrame::OnAbout) - EVT_MENU(MINIMAL_TEST, MyFrame::OnPlay) - EVT_MENU(MINIMAL_OPEN, MyFrame::OnOpen) -END_EVENT_TABLE() - -IMPLEMENT_APP(MyApp) - - -// `Main program' equivalent, creating windows and returning main app frame -bool MyApp::OnInit(void) -{ - // Initialize the catalogs we'll be using - m_locale.Init("french", "fr", "C"); - - /* not needed any more, done in wxLocale ctor - m_locale.AddCatalog("wxstd"); // 1) for library messages - */ - m_locale.AddCatalog("internat"); // 2) our private one - /* this catalog is installed in standard location on Linux systems, - it might not be installed on yours - just ignore the errrors - or comment out this line then */ - m_locale.AddCatalog("fileutils"); // 3) and another just for testing - - // Create the main frame window - MyFrame *frame = new MyFrame((wxFrame *) NULL, _("Minimal wxWindows App"), 50, 50, 150, 40); - - // Give it an icon -#ifdef __WXMSW__ - frame->SetIcon(wxIcon("mondrian")); -#else - frame->SetIcon(wxIcon(mondrian_xpm)); -#endif - - // Make a menubar - wxMenu *file_menu = new wxMenu; - file_menu->Append(MINIMAL_ABOUT, _("&About")); - file_menu->AppendSeparator(); - file_menu->Append(MINIMAL_QUIT, _("E&xit")); - - wxMenu *test_menu = new wxMenu; - test_menu->Append(MINIMAL_OPEN, _("&Open bogus file")); - test_menu->Append(MINIMAL_TEST, _("&Play a game")); - - wxMenuBar *menu_bar = new wxMenuBar; - menu_bar->Append(file_menu, _("&File")); - menu_bar->Append(test_menu, _("&Test")); - frame->SetMenuBar(menu_bar); - - // Show the frame - frame->Show(TRUE); - SetTopWindow(frame); - - return TRUE; -} - -// My frame constructor -MyFrame::MyFrame(wxFrame *frame, const char *title, int x, int y, int w, int h) - : wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) -{ -} - -void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) ) -{ - Close(TRUE); -} - -void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) -{ - wxMessageDialog(this, _("I18n sample\n© Vadim Zeitlin & Julian Smart"), - _("About Internat"), wxOK | wxICON_INFORMATION).ShowModal(); -} - -void MyFrame::OnPlay(wxCommandEvent& WXUNUSED(event)) -{ - wxString str = wxGetTextFromUser(_("Enter your number:"), - _("Try to guess my number!"), - "", this); - int num; - sscanf(str, "%d", &num); - if ( num == 0 ) - str = _("you've probably entered an invalid number."); - else if ( num == 9 ) // this message is not translated (not in catalog) - str = _("you've found a bug in this program!"); - else if ( num != 17 ) // a more implicit way to write _() - str = wxGetTranslation("bad luck! try again..."); - else { - str.Empty(); - // string must be split in two -- otherwise the translation won't be found - str << _("congratulations! you've won. Here is the magic phrase:") - << _("cannot create fifo `%s'"); - } - - wxMessageBox(str, _("Result"), wxOK | wxICON_INFORMATION); -} - -void MyFrame::OnOpen(wxCommandEvent&) -{ - // open a bogus file -- the error message should be also translated if you've - // got wxstd.mo somewhere in the search path - wxFile file("NOTEXIST.ING"); -} diff --git a/samples/internat/internat.def b/samples/internat/internat.def deleted file mode 100644 index 060bfe3fce..0000000000 --- a/samples/internat/internat.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME Minimal -DESCRIPTION 'Minimal wxWindows application' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 4048 -STACKSIZE 16000 diff --git a/samples/internat/internat.po b/samples/internat/internat.po deleted file mode 100644 index cc285481e7..0000000000 --- a/samples/internat/internat.po +++ /dev/null @@ -1,74 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR , YEAR. -# -#: hello.cpp:44 -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1997-12-19 17:46+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: ENCODING\n" - -#: hello.cpp:31 hello.cpp:38 -msgid "bad luck! try again..." -msgstr "pas de chance! essayez encore..." - -#: hello.cpp:23 hello.cpp:24 -#, c-format -msgid "usage: %s " -msgstr "syntaxe: %s " - -#: hello.cpp:29 hello.cpp:34 -msgid "you've probably entered an invalid number." -msgstr "vous avez du entrer un nombre invalide." - -#: hello.cpp:33 hello.cpp:40 -msgid "congratulations! you've won. Here is the magic phrase:" -msgstr "felicitations! vous avez gagne. Voici la phrase magique:" - -#: hello.cpp:17 -msgid "wxstd" -msgstr "" - -#: hello.cpp:18 -msgid "hello" -msgstr "" - -#: hello.cpp:19 -msgid "fileutils" -msgstr "" - -#: hello.cpp:20 -msgid "french" -msgstr "" - -#: hello.cpp:20 -msgid "fr" -msgstr "" - -#: hello.cpp:20 -msgid "C" -msgstr "" - -#: hello.cpp:27 -msgid "nosuchfi.le" -msgstr "" - -#: hello.cpp:36 -msgid "You've found a bug in this program!" -msgstr "" - -#: hello.cpp:43 -#, c-format -msgid "cannot create fifo `%s'" -msgstr "" - -#: hello.cpp:43 -msgid "foo" -msgstr "" diff --git a/samples/internat/internat.rc b/samples/internat/internat.rc deleted file mode 100644 index 7655c62a4c..0000000000 --- a/samples/internat/internat.rc +++ /dev/null @@ -1,3 +0,0 @@ -mondrian ICON "mondrian.ico" -#include "wx/msw/wx.rc" - diff --git a/samples/internat/makefile.b32 b/samples/internat/makefile.b32 deleted file mode 100644 index 3396034cc7..0000000000 --- a/samples/internat/makefile.b32 +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds internat example (DOS). - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXINC = $(WXDIR)\include\msw -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 - -TARGET=internat - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = internat.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -internat.obj: internat.$(SRCSUFF) - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - diff --git a/samples/internat/makefile.bcc b/samples/internat/makefile.bcc deleted file mode 100644 index a8a68ccbe4..0000000000 --- a/samples/internat/makefile.bcc +++ /dev/null @@ -1,73 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds internat example (DOS). - -!if "$(BCCDIR)" == "" -!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 -!endif - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makebcc.env - -THISDIR = $(WXDIR)\samples\internat -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) mathwl cwl import -INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw -CFG=$(WXDIR)\src\wxwin.cfg - -!ifndef FINAL -FINAL=0 -!endif - -!if "$(FINAL)" == "0" -LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -O2 -DEBUG_FLAGS= -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = internat.obj - -internat: internat.exe - -all: internat.exe - -internat.exe: $(WXLIB) internat.obj internat.def internat.res - tlink $(LINKFLAGS) @&&! -c0wl.obj internat.obj -internat -nul -$(LIBS) -internat.def -! - rc -31 -K internat.res - -.$(SRCSUFF).obj: - bcc $(CPPFLAGS) -c {$< } - -internat.obj: internat.$(SRCSUFF) - -internat.res : internat.rc $(WXDIR)\include\msw\wx.rc - rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa internat - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws diff --git a/samples/internat/makefile.dos b/samples/internat/makefile.dos deleted file mode 100644 index 99b18d8075..0000000000 --- a/samples/internat/makefile.dos +++ /dev/null @@ -1,65 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds internat example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\internat - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = internat.$(SRCSUFF) -OBJECTS = internat.obj - -all: internat.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -internat.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) internat.obj internat.def internat.res - link $(LINKFLAGS) @<< -internat.obj $(WXDIR)\src\msw\dummy.obj, -internat, -NUL, -$(LIBS), -internat.def -; -<< - rc -K internat.res - -internat.obj: internat.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -internat.res : internat.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include internat - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/internat/makefile.g95 b/samples/internat/makefile.g95 deleted file mode 100644 index c877d3ca8c..0000000000 --- a/samples/internat/makefile.g95 +++ /dev/null @@ -1,36 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for internat example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/internat.$(OBJSUFF) - -all: $(OBJDIR) internat$(GUISUFFIX)$(EXESUFF) - -wx: - -$(OBJDIR): - mkdir $(OBJDIR) - -internat$(GUISUFFIX)$(EXESUFF): $(OBJDIR)/internat.$(OBJSUFF) internat.res internat.$(RSCSUFF) $(WXLIB) - $(CC) $(LDFLAGS) -o internat$(GUISUFFIX)$(EXESUFF) internat.$(RSCSUFF) $(OBJDIR)/internat.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS) - -$(OBJDIR)/internat.$(OBJSUFF): internat.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ internat.$(SRCSUFF) - -internat.res: internat.rc - -clean: - rm -f $(OBJECTS) internat$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/internat/makefile.nt b/samples/internat/makefile.nt deleted file mode 100644 index 22d7e49d62..0000000000 --- a/samples/internat/makefile.nt +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds internat example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\internat -PROGRAM=internat - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/internat/makefile.sc b/samples/internat/makefile.sc deleted file mode 100644 index 8709d2ca0f..0000000000 --- a/samples/internat/makefile.sc +++ /dev/null @@ -1,35 +0,0 @@ -# Symantec C++ makefile for minimal example -# NOTE that peripheral libraries are now dealt in main wxWindows makefile. - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makesc.env - -WXLIB = $(WXDIR)\lib\wx.lib -INCDIR = $(WXDIR)\include -MSWINC = $(INCDIR)\msw -BASEINC = $(INCDIR)\base - -CC=sc -RC=rc -CFLAGS = -o -ml -W -Dwx_msw -LDFLAGS = -ml -W - -INCLUDE=$(BASEINC);$(MSWINC) - -LIBS=$(WXLIB) libw.lib commdlg.lib shell.lib - -.$(SRCSUFF).obj: - *$(CC) -c $(CFLAGS) -I$(INCLUDE) $< - -.rc.res: - *$(RC) -r -I$(INCLUDE) $< - -minimal.exe: minimal.obj minimal.def minimal.res - *$(CC) $(LDFLAGS) -o$@ $** $(LIBS) - -clean: - -del *.obj - -del *.exe - -del *.res - -del *.map - -del *.rws diff --git a/samples/internat/makefile.unx b/samples/internat/makefile.unx deleted file mode 100644 index 9685d06789..0000000000 --- a/samples/internat/makefile.unx +++ /dev/null @@ -1,58 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for minimal example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/make.env - -OBJECTS = $(OBJDIR)/minimal.$(OBJSUFF) - -.SUFFIXES: - -all: $(OBJDIR) minimal$(GUISUFFIX) - -wx: - - -motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' WXLIB=$(WXDIR)/lib/libwx_motif.a OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK= - -xview: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview - $(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' - -hp: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx hp - $(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' WARN='-w' \ - XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' LDLIBS='$(HPLDLIBS)' - -$(OBJDIR): - mkdir $(OBJDIR) - -minimal$(GUISUFFIX): $(OBJDIR)/minimal.$(OBJSUFF) $(WXLIB) - $(CC) $(LDFLAGS) -o minimal$(GUISUFFIX) $(OBJDIR)/minimal.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS) - -$(OBJDIR)/minimal.$(OBJSUFF): minimal.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ minimal.$(SRCSUFF) - -clean_motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany - -clean_ol: - $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany - -clean_hp: - $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany - -cleanany: - rm -f $(OBJECTS) minimal$(GUISUFFIX) core diff --git a/samples/internat/makefile.vms b/samples/internat/makefile.vms deleted file mode 100644 index 9b76b144f3..0000000000 --- a/samples/internat/makefile.vms +++ /dev/null @@ -1,38 +0,0 @@ -#************************************************************************ -# Makefile for MINIMAL under VMS -# by Stefan Hammes -# (incomplete) update history: -# 11.04.95 -#************************************************************************ - -#************************************************************************ -# Definition section -# (cave: definitions and includes must begin with ',') -#************************************************************************ - -APPOPTS = -APPDEFS = -APPINCS = - -#************************************************************************ -# Module section -#************************************************************************ - -# Name of main module -MAIN = minimal - -# Object modules of the application. -OBJS = minimal.obj -OBJLIST =minimal.obj - -.include [--.src]makevms.env - -# main dependency -$(MAIN).exe : $(OBJS) - $(LINK) $(LINKFLAGS) /exec=$(MAIN).exe $(OBJLIST),$(WXLIB)/lib,$(OPTSFILE)/option - - purge *.exe - -#************************************************************************ -# Header file depedencies following -#************************************************************************ - diff --git a/samples/internat/makefile.wat b/samples/internat/makefile.wat deleted file mode 100644 index 21219d7a0e..0000000000 --- a/samples/internat/makefile.wat +++ /dev/null @@ -1,43 +0,0 @@ -# -# Makefile for WATCOM -# -# Created by D.Chubraev, chubraev@iem.ee.ethz.ch -# 8 Nov 1994 -# - -WXDIR = ..\.. - -!include $(WXDIR)\src\makewat.env - -WXLIB = $(WXDIR)\lib -NAME = minimal -LNK = $(name).lnk -OBJS = $(name).obj - -all: $(name).exe - -$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib - wlink @$(LNK) - $(BINDCOMMAND) $(name).res - -$(name).res : $(name).rc $(WXDIR)\include\msw\wx.rc - $(RC) $(RESFLAGS1) $(name).rc - -$(LNK) : makefile.wat - %create $(LNK) - @%append $(LNK) debug all - @%append $(LNK) system $(LINKOPTION) - @%append $(LNK) $(MINDATA) - @%append $(LNK) $(MAXDATA) - @%append $(LNK) $(STACK) - @%append $(LNK) name $(name) - @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib - @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i - @for %i in ($(OBJS)) do @%append $(LNK) file %i - -thing: .SYMBOLIC - echo $(WATLIBDIR) - -clean: .SYMBOLIC - -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe - diff --git a/samples/internat/mondrian.ico b/samples/internat/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/samples/internat/mondrian.ico and /dev/null differ diff --git a/samples/internat/mondrian.xpm b/samples/internat/mondrian.xpm deleted file mode 100644 index 409f27a843..0000000000 --- a/samples/internat/mondrian.xpm +++ /dev/null @@ -1,44 +0,0 @@ -/* XPM */ -static char *mondrian_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 6 1", -" c Black", -". c Blue", -"X c #00bf00", -"o c Red", -"O c Yellow", -"+ c Gray100", -/* pixels */ -" ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" " -}; diff --git a/samples/internat/wxstd.po b/samples/internat/wxstd.po deleted file mode 100644 index 100109b3b7..0000000000 --- a/samples/internat/wxstd.po +++ /dev/null @@ -1,131 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1997-12-19 17:46+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: ENCODING\n" - -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR , YEAR. -# -#: file.cpp:182 hello.cpp:38 -#, fuzzy, c-format -msgid "can't create file '%s'" -msgstr "impossible de créer le fichier '%s'" - -#: file.cpp:213 -#, c-format -msgid "can't open file '%s'" -msgstr "impossible d'ouvrir le fichier '%s'" - -#: file.cpp:227 -#, c-format -msgid "can't close file descriptor %d" -msgstr "impossible de fermer le descripteur %d" - -#: file.cpp:244 -#, c-format -msgid "can't read from file descriptor %d" -msgstr "impossible de lire à partir de descripteur %d" - -#: file.cpp:258 -#, c-format -msgid "can't write to file descriptor %d" -msgstr "impossible d'écrire sur le descripteur %d" - -#: file.cpp:271 -#, c-format -msgid "can't flush file descriptor %d" -msgstr "impossible de mettre à jour le descripteur %d" - -#: file.cpp:308 -#, c-format -msgid "can't seek on file descriptor %d" -msgstr "impossible de changer la position sur le descripteur %d" - -#: file.cpp:322 -#, c-format -msgid "can't get seek position on file descriptor %d" -msgstr "impossible d'obtenir la position courante sur le descripteur %d" - -#: file.cpp:355 -#, c-format -msgid "can't find length of file on file descriptor %d" -msgstr "" -"impossible de trouver la taille du fichier ouvert sur le descripteur %d" - -#: intl.cpp:139 -#, c-format -msgid "catalog file for domain '%s' not found." -msgstr "impossible de trouver le catalogue de messages pour le domaine '%s'." - -#: intl.cpp:177 -#, c-format -msgid "'%s' is not a valid message catalog." -msgstr "'%s' n'est pas un catalogue de messages valid." - -#: intl.cpp:330 intl.cpp:334 -#, c-format -msgid "locale '%s' can not be set." -msgstr "impossible de passer à locale '%s'." - -#: intl.cpp:431 intl.cpp:435 -#, c-format -msgid "string '%s' not found in domain '%s' for locale '%s'." -msgstr "chaîne '%s' n'a pas été trouvé dans le domaine '%s' pour le locale '%s'." - -#: intl.cpp:434 intl.cpp:438 -#, c-format -msgid "string '%s' not found in locale '%s'." -msgstr "chaîne '%s' n'a pas été trouvé dans le locale '%s'." - -#: log.cpp:104 -#, c-format -msgid " (error %ld: %s)" -msgstr " (erreur %ld: %s)" - -#: log.cpp:165 -msgid "Debug: " -msgstr "Debug: " - -#: log.cpp:171 -msgid "Fatal error: " -msgstr "Erreur fatale: " - -#: log.cpp:172 -msgid "Program aborted.\n" -msgstr "Programme abandonné.\n" - -#: log.cpp:177 -msgid "Error: " -msgstr "Erreur: " - -#: log.cpp:181 -msgid "Warning: " -msgstr "Attention: " - -#: log.cpp:268 -#, c-format -msgid "Assert failed in file %s at line %d" -msgstr "Assertion est fausse dans le fichier %s à la ligne %d" - -#: file.cpp:303 -msgid "unknown seek origin" -msgstr "" - -msgid "looking for catalog '%s' in path '%s'." -msgstr "" - -#: intl.cpp:378 -msgid "no message catalog list" -msgstr "" diff --git a/samples/joytest/chart.ico b/samples/joytest/chart.ico deleted file mode 100644 index 16d4a585fd..0000000000 Binary files a/samples/joytest/chart.ico and /dev/null differ diff --git a/samples/joytest/gun.wav b/samples/joytest/gun.wav deleted file mode 100644 index 8cb037d78d..0000000000 Binary files a/samples/joytest/gun.wav and /dev/null differ diff --git a/samples/joytest/joytest.cpp b/samples/joytest/joytest.cpp deleted file mode 100644 index 862663ff30..0000000000 --- a/samples/joytest/joytest.cpp +++ /dev/null @@ -1,171 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: joytest.cpp -// Purpose: Joystick sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include -#include - -#include "joytest.h" - -MyFrame *frame = NULL; - -IMPLEMENT_APP(MyApp) - -// For drawing lines in a canvas -long xpos = -1; -long ypos = -1; - -int winNumber = 1; - -// Initialise this in OnInit, not statically -bool MyApp::OnInit(void) -{ - wxJoystick stick(wxJOYSTICK1); - if (!stick.IsOk()) - { - wxMessageBox("No joystick detected!"); - return FALSE; - } - m_fire.Create("gun.wav"); - - m_maxX = stick.GetXMax(); - m_maxY = stick.GetYMax(); - - // Create the main frame window - - frame = new MyFrame(NULL, "Joystick Demo", wxPoint(0, 0), wxSize(500, 400), - wxDEFAULT_FRAME | wxHSCROLL | wxVSCROLL); - - // Give it an icon (this is ignored in MDI mode: uses resources) -#ifdef __WXMSW__ - frame->SetIcon(wxIcon("joyicon")); -#endif -#ifdef __X__ - frame->SetIcon(wxIcon("joyicon.xbm")); -#endif - - // Make a menubar - wxMenu *file_menu = new wxMenu; - - file_menu->Append(JOYTEST_QUIT, "&Exit"); - - wxMenu *help_menu = new wxMenu; - help_menu->Append(JOYTEST_ABOUT, "&About"); - - wxMenuBar *menu_bar = new wxMenuBar; - - menu_bar->Append(file_menu, "&File"); - menu_bar->Append(help_menu, "&Help"); - - // Associate the menu bar with the frame - frame->SetMenuBar(menu_bar); - - frame->CreateStatusBar(); - - frame->Show(TRUE); - - SetTopWindow(frame); - - return TRUE; -} - -BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow) - EVT_JOYSTICK_EVENTS(MyCanvas::OnJoystickEvent) -END_EVENT_TABLE() - -// Define a constructor for my canvas -MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size): - wxScrolledWindow(parent, -1, pos, size, wxSUNKEN_BORDER) -{ - wxJoystick joystick(wxJOYSTICK1); - joystick.SetCapture(this); -} - -MyCanvas::~MyCanvas(void) -{ - wxJoystick joystick(wxJOYSTICK1); - joystick.ReleaseCapture(); -} - -void MyCanvas::OnJoystickEvent(wxJoystickEvent& event) -{ - wxClientDC dc(this); - - wxPoint pt(event.GetPosition()); - - // Scale to canvas size - int cw, ch; - GetSize(&cw, &ch); - - pt.x = (long) (((double)pt.x/(double)wxGetApp().m_maxX) * cw); - pt.y = (long) (((double)pt.y/(double)wxGetApp().m_maxY) * ch); - - if (xpos > -1 && ypos > -1 && event.IsMove() && event.ButtonIsDown()) - { - dc.SetPen(*wxBLACK_PEN); - dc.DrawLine(xpos, ypos, pt.x, pt.y); - } - xpos = pt.x; - ypos = pt.y; - - char buf[100]; - if (event.ButtonDown()) - sprintf(buf, "Joystick (%ld, %ld) Fire!", pt.x, pt.y); - else - sprintf(buf, "Joystick (%ld, %ld)", pt.x, pt.y); - frame->SetStatusText(buf); - - if (event.ButtonDown() && wxGetApp().m_fire.IsOk()) - { - wxGetApp().m_fire.Play(); - } -} - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(JOYTEST_QUIT, MyFrame::OnQuit) -END_EVENT_TABLE() - -MyFrame::MyFrame(wxFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, -const long style): - wxFrame(parent, -1, title, pos, size, style) -{ - canvas = new MyCanvas(this); -} - -MyFrame::~MyFrame(void) -{ -} - -void MyFrame::OnQuit(wxCommandEvent& event) -{ - Close(TRUE); -} - -void MyFrame::OnActivate(wxActivateEvent& event) -{ - if (event.GetActive() && canvas) - canvas->SetFocus(); -} - -bool MyFrame::OnClose(void) -{ - return TRUE; -} \ No newline at end of file diff --git a/samples/joytest/joytest.def b/samples/joytest/joytest.def deleted file mode 100644 index 501f2b229a..0000000000 --- a/samples/joytest/joytest.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME Joytest -DESCRIPTION 'Joystick Test Program' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 6000 -STACKSIZE 48000 diff --git a/samples/joytest/joytest.h b/samples/joytest/joytest.h deleted file mode 100644 index 68c4f68075..0000000000 --- a/samples/joytest/joytest.h +++ /dev/null @@ -1,51 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: joytest.cpp -// Purpose: Joystick sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -// Define a new application -class MyApp: public wxApp -{ - public: - bool OnInit(void); - - // Joystick max values - int m_maxX; - int m_maxY; - - wxWave m_fire; -}; - -DECLARE_APP(MyApp) - -class MyCanvas: public wxScrolledWindow -{ - public: - MyCanvas(wxWindow *parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize); - ~MyCanvas(void); - void OnJoystickEvent(wxJoystickEvent& event); - - DECLARE_EVENT_TABLE() -}; - -class MyFrame: public wxFrame -{ - public: - MyCanvas *canvas; - MyFrame(wxFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style); - ~MyFrame(void); - bool OnClose(void); - void OnActivate(wxActivateEvent& event); - void OnQuit(wxCommandEvent& event); - -DECLARE_EVENT_TABLE() -}; - -#define JOYTEST_QUIT 1 -#define JOYTEST_ABOUT 2 diff --git a/samples/joytest/joytest.ico b/samples/joytest/joytest.ico deleted file mode 100644 index 2dc1bde40c..0000000000 Binary files a/samples/joytest/joytest.ico and /dev/null differ diff --git a/samples/joytest/joytest.rc b/samples/joytest/joytest.rc deleted file mode 100644 index 8138605789..0000000000 --- a/samples/joytest/joytest.rc +++ /dev/null @@ -1,5 +0,0 @@ -aaaa ICON "mondrian.ico" -joyicon ICON "mondrian.ico" - -#include "wx/msw/wx.rc" - diff --git a/samples/joytest/makefile.b32 b/samples/joytest/makefile.b32 deleted file mode 100644 index d889d44cee..0000000000 --- a/samples/joytest/makefile.b32 +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.b32 -# Author: Patrick Halke -# Created: 1995 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds 32bit MDI example. - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 - -TARGET=joytest - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = joytest.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -joytest.obj: joytest.$(SRCSUFF) joytest.h - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - - diff --git a/samples/joytest/makefile.bcc b/samples/joytest/makefile.bcc deleted file mode 100644 index 230ea4abbe..0000000000 --- a/samples/joytest/makefile.bcc +++ /dev/null @@ -1,75 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds joytest example (DOS). - -!if "$(BCCDIR)" == "" -!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 -!endif - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -!ifndef FINAL -FINAL=0 -!endif - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makebcc.env - -THISDIR = $(WXDIR)\samples\joytest -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) mathwl cwl import -INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw -CFG=$(WXDIR)\src\wxwin.cfg - -!if "$(FINAL)" == "0" -LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -O2 -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -HEADERS = joytest.h -SOURCES = joytest.$(SRCSUFF) -OBJECTS = joytest.obj - -joytest: joytest.exe - -all: joytest.exe - -joytest.exe: $(WXLIB) joytest.obj joytest.def joytest.res - tlink $(LINKFLAGS) @&&! -c0wl.obj joytest.obj -joytest -nul -$(LIBS) -joytest.def -! - rc -30 -K joytest.res - -.$(SRCSUFF).obj: - bcc $(CPPFLAGS) -c {$< } - -joytest.obj: joytest.$(SRCSUFF) - -joytest.res : joytest.rc $(WXDIR)\include\msw\wx.rc - rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa joytest - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws diff --git a/samples/joytest/makefile.dos b/samples/joytest/makefile.dos deleted file mode 100644 index b2ddbcf9f5..0000000000 --- a/samples/joytest/makefile.dos +++ /dev/null @@ -1,63 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds joytest example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\joytest -INC=/I$(WXDIR)\include - -HEADERS = joytest.h -SOURCES = joytest.$(SRCSUFF) -OBJECTS = joytest.obj - -all: joytest.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -joytest.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) joytest.obj joytest.def joytest.res - link $(LINKFLAGS) @<< -$(WXDIR)\src\msw\dummy.obj joytest.obj, -joytest, -NUL, -$(LIBS), -joytest.def -; -<< - rc -K joytest.res - -joytest.obj: joytest.h joytest.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -joytest.res : joytest.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include joytest - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/joytest/makefile.g95 b/samples/joytest/makefile.g95 deleted file mode 100644 index 8eef77f7cf..0000000000 --- a/samples/joytest/makefile.g95 +++ /dev/null @@ -1,35 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for joytest example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/joytest.$(OBJSUFF) $(OBJDIR)/joytest_resources.$(OBJSUFF) - -all: $(OBJDIR) joytest$(GUISUFFIX) - -$(OBJDIR): - mkdir $(OBJDIR) - -joytest$(GUISUFFIX): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o joytest$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/joytest.$(OBJSUFF): joytest.$(SRCSUFF) joytest.h - $(CC) -c $(CPPFLAGS) -o $@ joytest.$(SRCSUFF) - -$(OBJDIR)/joytest_resources.o: joytest.rc - $(RESCOMP) -i joytest.rc -o $(OBJDIR)/joytest_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) joytest$(GUISUFFIX).exe core *.res *.rsc diff --git a/samples/joytest/makefile.nt b/samples/joytest/makefile.nt deleted file mode 100644 index ca7ec0c46a..0000000000 --- a/samples/joytest/makefile.nt +++ /dev/null @@ -1,63 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds joytest example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) -WXUSINGDLL=0 - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\joytest -PROGRAM=joytest - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/joytest/makefile.sc b/samples/joytest/makefile.sc deleted file mode 100644 index bcdcb11d54..0000000000 --- a/samples/joytest/makefile.sc +++ /dev/null @@ -1,37 +0,0 @@ -; Last change: JS 12 Apr 98 10:45 am -# Symantec C++ makefile for joytest example -# NOTE that peripheral libraries are now dealt in main wxWindows makefile. - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makesc.env - -WXLIB = $(WXDIR)\lib\wx.lib -INCDIR = $(WXDIR)\include -MSWINC = $(INCDIR)\msw -BASEINC = $(INCDIR)\base - -CC=sc -RC=rc -CFLAGS = -o -ml -W -Dwx_msw -LDFLAGS = -ml -W - -INCLUDE=$(BASEINC);$(MSWINC) - -LIBS=$(WXLIB) libw.lib commdlg.lib shell.lib - -.$(SRCSUFF).obj: - *$(CC) -c $(CFLAGS) -I$(INCLUDE) $< - -.rc.res: - *$(RC) -r -I$(INCLUDE) $< - -joytest.exe: joytest.obj joytest.def joytest.res - *$(CC) $(LDFLAGS) -o$@ joytest.obj joytest.def $(LIBS) - *$(RC) -k joytest.res - -clean: - -del *.obj - -del *.exe - -del *.res - -del *.map - -del *.rws diff --git a/samples/joytest/makefile.unx b/samples/joytest/makefile.unx deleted file mode 100644 index c4156423ac..0000000000 --- a/samples/joytest/makefile.unx +++ /dev/null @@ -1,55 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for joytest example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/make.env - -OBJECTS = $(OBJDIR)/joytest.$(OBJSUFF) - -.SUFFIXES: - -all: $(OBJDIR) joytest$(GUISUFFIX) - -wx: -# cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx -motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK= - -xview: - $(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' - -hp: - $(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' WARN='-w' \ - XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' LDLIBS='$(HPLDLIBS)' - -$(OBJDIR): - mkdir $(OBJDIR) - -joytest$(GUISUFFIX): $(OBJDIR)/joytest.$(OBJSUFF) $(WXLIB) - $(CC) $(LDFLAGS) -o joytest$(GUISUFFIX) $(OBJDIR)/joytest.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS) - -$(OBJDIR)/joytest.$(OBJSUFF): joytest.$(SRCSUFF) joytest.h - $(CC) -c $(CPPFLAGS) -o $@ joytest.$(SRCSUFF) - -clean_motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany - -clean_ol: - $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany - -clean_hp: - $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany - -cleanany: - rm -f $(OBJECTS) joytest$(GUISUFFIX) core diff --git a/samples/joytest/makefile.wat b/samples/joytest/makefile.wat deleted file mode 100644 index d009dcb6a8..0000000000 --- a/samples/joytest/makefile.wat +++ /dev/null @@ -1,43 +0,0 @@ -# -# Makefile for WATCOM -# -# Created by D.Chubraev, chubraev@iem.ee.ethz.ch -# 8 Nov 1994 -# - -WXDIR = ..\.. - -!include $(WXDIR)\src\makewat.env - -WXLIB = $(WXDIR)\lib -NAME = joytest -LNK = $(name).lnk -OBJS = $(name).obj - -all: $(name).exe - -$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib - wlink @$(LNK) - $(BINDCOMMAND) $(name).res - -$(name).res : $(name).rc $(WXDIR)\include\msw\wx.rc - $(RC) $(RESFLAGS1) $(name).rc - -$(LNK) : makefile.wat - %create $(LNK) - @%append $(LNK) debug all - @%append $(LNK) system $(LINKOPTION) - @%append $(LNK) $(MINDATA) - @%append $(LNK) $(MAXDATA) - @%append $(LNK) $(STACK) - @%append $(LNK) name $(name) - @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib - @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i - @for %i in ($(OBJS)) do @%append $(LNK) file %i - -thing: .SYMBOLIC - echo $(WATLIBDIR) - -clean: .SYMBOLIC - -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex - diff --git a/samples/joytest/mondrian.ico b/samples/joytest/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/samples/joytest/mondrian.ico and /dev/null differ diff --git a/samples/layout/.cvsignore b/samples/layout/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/layout/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/layout/Makefile b/samples/layout/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/layout/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/layout/Makefile.in b/samples/layout/Makefile.in deleted file mode 100644 index fff7673056..0000000000 --- a/samples/layout/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# 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 diff --git a/samples/layout/expt.cpp b/samples/layout/expt.cpp deleted file mode 100644 index af2c089b84..0000000000 --- a/samples/layout/expt.cpp +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Experimental code to use operators for constraint specification. - * In the end, the syntax didn't look much clearer than - * the original, so abandoned. - - Example: - - wxConstrain(frame->panel, - - ( leftOf (frame->panel) = leftOf (frame), - topOf (frame->panel) = topOf (frame), - rightOf (frame->panel) = rightOf (frame), - heightOf (frame->panel) = 50 % heightOf (frame) - ) - ); - */ - -// Operator experiments -#define wxCONSTRAINT_OP_REL 1 -#define wxCONSTRAINT_OP_PERCENT 2 -#define wxCONSTRAINT_OP_EDGE 3 -#define wxCONSTRAINT_OP_ABS 4 -#define wxCONSTRAINT_OP_AND 5 - -class wxConstraintOp: public wxObject -{ - public: - int opType; - wxEdge edge; - wxRelationship relationship; - wxWindow *win; - int value; - int margin; - wxConstraintOp *lhs; - wxConstraintOp *rhs; - wxConstraintOp(int typ) - { - opType = typ; - edge = wxLeft; - win = NULL; - value = 0; - margin = 0; - relationship = wxSameAs; - lhs = 0; rhs = 0; - } - wxConstraintOp(const wxConstraintOp& op) - { - opType = op.opType; - edge = op.edge; - relationship = op.relationship; - win = op.win; - value = op.value; - margin = op.margin; - if (op.lhs) - lhs = new wxConstraintOp(*op.lhs); - else - lhs = NULL; - if (op.rhs) - rhs = new wxConstraintOp(*op.rhs); - else - rhs = NULL; - } - ~wxConstraintOp(void) - { - if (lhs) - delete lhs; - if (rhs) - delete rhs; - } - - wxConstraintOp operator = (const wxConstraintOp& arg2); - wxConstraintOp operator = (const int value); - - friend wxConstraintOp operator % (const int perCent, const wxConstraintOp& arg2); - friend wxConstraintOp operator + (wxConstraintOp& arg1, int margin); - friend wxConstraintOp operator - (wxConstraintOp& arg1, int margin); - friend wxConstraintOp operator , (const wxConstraintOp& arg1, const wxConstraintOp& arg2); -}; - -wxConstraintOp leftOf(wxWindow *win) -{ - wxConstraintOp thing(wxCONSTRAINT_OP_EDGE); - thing.win = win; - thing.edge = wxLeft; - return thing; -} - -wxConstraintOp topOf(wxWindow *win) -{ - wxConstraintOp thing(wxCONSTRAINT_OP_EDGE); - thing.win = win; - thing.edge = wxTop; - return thing; -} - -wxConstraintOp widthOf(wxWindow *win) -{ - wxConstraintOp thing(wxCONSTRAINT_OP_EDGE); - thing.win = win; - thing.edge = wxWidth; - return thing; -} - -wxConstraintOp wxConstraintOp::operator = (const wxConstraintOp& arg2) -{ - wxConstraintOp op3(wxCONSTRAINT_OP_REL); - op3.relationship = wxPercentOf; - op3.value = 100; - if ((op3.relationship == wxPercentOf) && (op3.value > 0)) - op3.value = this->value; - op3.lhs = new wxConstraintOp(*this); - op3.rhs = new wxConstraintOp(arg2); - - return op3; -} - -wxConstraintOp wxConstraintOp::operator = (const int value) -{ - wxConstraintOp op3(wxCONSTRAINT_OP_REL); - op3.relationship = wxAbsolute; - - op3.lhs = new wxConstraintOp(*this); - op3.rhs = new wxConstraintOp(wxCONSTRAINT_OP_ABS); - op3.value = value; - - return op3; -} - -wxConstraintOp operator % (const int perCent, const wxConstraintOp& arg2) -{ - wxConstraintOp op3(arg2); - op3.opType = wxCONSTRAINT_OP_EDGE; - op3.value = perCent; - if (op3.value > 0) - op3.value = arg2.value; - - return op3; -} - -wxConstraintOp operator + (wxConstraintOp& arg1, int margin) -{ - wxConstraintOp op3(arg1); - op3.margin = margin; - return op3; -} - -wxConstraintOp operator - (wxConstraintOp& arg1, int margin) -{ - wxConstraintOp op3(arg1); - op3.margin = - margin; - return op3; -} - -wxConstraintOp operator , (const wxConstraintOp& arg1, const wxConstraintOp& arg2) -{ - wxConstraintOp op3(wxCONSTRAINT_OP_AND); - op3.lhs = new wxConstraintOp(arg1); - op3.rhs = new wxConstraintOp(arg2); - - return op3; -} diff --git a/samples/layout/fload.xbm b/samples/layout/fload.xbm deleted file mode 100644 index 27af1f939b..0000000000 --- a/samples/layout/fload.xbm +++ /dev/null @@ -1,11 +0,0 @@ -#define fload_width 30 -#define fload_height 30 -static char fload_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x0f,0xf8,0xff,0xfb,0x0f,0x08,0x00,0xf0, - 0x0f,0xc8,0xff,0xef,0x0f,0x48,0x00,0xf0,0x0f,0x48,0x00,0xf8,0x0f,0x48,0x00, - 0xfc,0x0e,0x48,0x00,0x7f,0x0c,0x48,0xc0,0xbf,0x00,0x48,0xf0,0x9f,0x04,0x48, - 0xfe,0x8f,0x04,0x48,0xff,0x87,0x04,0x48,0x00,0x80,0x04,0x48,0x00,0x80,0x04, - 0x48,0x00,0x80,0x04,0x48,0x00,0x80,0x04,0xc8,0xff,0xff,0x04,0x08,0x00,0x00, - 0x04,0x08,0x00,0x00,0x04,0x08,0xff,0x1f,0x04,0x08,0x01,0x10,0x04,0x08,0x1d, - 0x10,0x04,0x08,0x15,0x10,0x04,0x08,0x15,0x10,0x04,0x08,0x15,0x10,0x04,0x08, - 0x15,0x10,0x04,0x10,0x1d,0x10,0x04,0xe0,0xff,0xff,0x07,0x00,0x00,0x00,0x00}; diff --git a/samples/layout/layout.cpp b/samples/layout/layout.cpp deleted file mode 100644 index 31229f5a88..0000000000 --- a/samples/layout/layout.cpp +++ /dev/null @@ -1,355 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: layout.cpp -// Purpose: Layout sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#if !USE_CONSTRAINTS -#error You must set USE_CONSTRAINTS to 1 in wx_setup.h! -#endif - -#include -#include "layout.h" - -// Declare two frames -MyFrame *frame = (MyFrame *) NULL; -wxMenuBar *menu_bar = (wxMenuBar *) NULL; - -IMPLEMENT_APP(MyApp) - -MyApp::MyApp() -{ -} - -bool MyApp::OnInit(void) -{ - // Create the main frame window - frame = new MyFrame((MyFrame *) NULL, (char *) "wxWindows Layout Demo", 0, 0, 550, 500); - - frame->SetAutoLayout(TRUE); - - // Give it a status line - frame->CreateStatusBar(2); - - // Make a menubar - wxMenu *file_menu = new wxMenu; - - file_menu->Append(LAYOUT_LOAD_FILE, "&Load file", "Load a text file"); - file_menu->Append(LAYOUT_TEST, "&Test sizers", "Test sizer code"); - - file_menu->AppendSeparator(); - file_menu->Append(LAYOUT_QUIT, "E&xit", "Quit program"); - - wxMenu *help_menu = new wxMenu; - help_menu->Append(LAYOUT_ABOUT, "&About", "About layout demo"); - - menu_bar = new wxMenuBar; - - menu_bar->Append(file_menu, "&File"); - menu_bar->Append(help_menu, "&Help"); - - // Associate the menu bar with the frame - frame->SetMenuBar(menu_bar); - - // Make a panel - frame->panel = new wxPanel(frame, 0, 0, 1000, 500, wxTAB_TRAVERSAL); - frame->panel->SetBackgroundColour(wxColour(192, 192, 192)); -// frame->panel->SetAutoLayout(TRUE); - - // Create some panel items - wxButton *btn1 = new wxButton(frame->panel, -1, "A button (1)") ; - - wxLayoutConstraints *b1 = new wxLayoutConstraints; - b1->centreX.SameAs (frame->panel, wxCentreX); - b1->top.SameAs (frame->panel, wxTop, 5); - b1->width.PercentOf (frame->panel, wxWidth, 80); - b1->height.PercentOf (frame->panel, wxHeight, 10); - btn1->SetConstraints(b1); - - wxListBox *list = new wxListBox(frame->panel, -1, - wxPoint(-1, -1), wxSize(200, 100)); - list->Append("Apple"); - list->Append("Pear"); - list->Append("Orange"); - list->Append("Banana"); - list->Append("Fruit"); - - wxLayoutConstraints *b2 = new wxLayoutConstraints; - b2->top.Below (btn1, 5); - b2->left.SameAs (frame->panel, wxLeft, 5); - b2->width.PercentOf (frame->panel, wxWidth, 40); - b2->bottom.SameAs (frame->panel, wxBottom, 5); - list->SetConstraints(b2); - - wxTextCtrl *mtext = new wxTextCtrl(frame->panel, -1, "Some text", - wxPoint(-1, -1), wxSize(150, 100)); - - wxLayoutConstraints *b3 = new wxLayoutConstraints; - b3->top.Below (btn1, 5); - b3->left.RightOf (list, 5); - b3->right.SameAs (frame->panel, wxRight, 5); - b3->bottom.SameAs (frame->panel, wxBottom, 5); - mtext->SetConstraints(b3); - - frame->canvas = new MyWindow(frame, 0, 0, 400, 400, wxRETAINED); - - // Give it scrollbars: the virtual canvas is 20 * 50 = 1000 pixels in each direction -// canvas->SetScrollbars(20, 20, 50, 50, 4, 4); - - // Make a text window - frame->text_window = new MyTextWindow(frame, 0, 250, 400, 250); - - // Set constraints for panel subwindow - wxLayoutConstraints *c1 = new wxLayoutConstraints; - - c1->left.SameAs (frame, wxLeft); - c1->top.SameAs (frame, wxTop); - c1->right.PercentOf (frame, wxWidth, 50); - c1->height.PercentOf (frame, wxHeight, 50); - - frame->panel->SetConstraints(c1); - - // Set constraints for canvas subwindow - wxLayoutConstraints *c2 = new wxLayoutConstraints; - - c2->left.SameAs (frame->panel, wxRight); - c2->top.SameAs (frame, wxTop); - c2->right.SameAs (frame, wxRight); - c2->height.PercentOf (frame, wxHeight, 50); - - frame->canvas->SetConstraints(c2); - - // Set constraints for text subwindow - wxLayoutConstraints *c3 = new wxLayoutConstraints; - c3->left.SameAs (frame, wxLeft); - c3->top.Below (frame->panel); - c3->right.SameAs (frame, wxRight); - c3->bottom.SameAs (frame, wxBottom); - - frame->text_window->SetConstraints(c3); - - frame->Show(TRUE); - - frame->SetStatusText("wxWindows layout demo"); - - SetTopWindow(frame); - return TRUE; -} - -// Define my frame constructor -MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h): - wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) -{ - panel = (wxPanel *) NULL; - text_window = (MyTextWindow *) NULL; - canvas = (MyWindow *) NULL; -} - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(LAYOUT_LOAD_FILE, MyFrame::LoadFile) - EVT_MENU(LAYOUT_QUIT, MyFrame::Quit) - EVT_MENU(LAYOUT_TEST, MyFrame::TestSizers) - EVT_MENU(LAYOUT_ABOUT, MyFrame::About) - EVT_SIZE(MyFrame::OnSize) -END_EVENT_TABLE() - -void MyFrame::LoadFile(wxCommandEvent& WXUNUSED(event) ) -{ - char *s = wxFileSelector("Load text file", (const char *) NULL, (const char *) NULL, (const char *) NULL, "*.txt"); - if (s) - { -#ifdef __WXMSW__ - frame->text_window->LoadFile(s); -#endif - } -} - -void MyFrame::Quit(wxCommandEvent& WXUNUSED(event) ) -{ - this->Close(TRUE); -} - -void MyFrame::TestSizers(wxCommandEvent& WXUNUSED(event) ) -{ - SizerFrame *newFrame = new SizerFrame((MyFrame *) NULL, (char *) "Sizer Test Frame", 50, 50, 500, 500); - newFrame->Show(TRUE); -} - -void MyFrame::About(wxCommandEvent& WXUNUSED(event) ) -{ - (void)wxMessageBox("wxWindows GUI library layout demo\n", - "About Layout Demo", wxOK|wxCENTRE); -} - -// Size the subwindows when the frame is resized -void MyFrame::OnSize(wxSizeEvent& WXUNUSED(event) ) -{ - Layout(); -} - -void MyFrame::Draw(wxDC& dc, bool WXUNUSED(draw_bitmaps) ) -{ - dc.SetPen(wxGREEN_PEN); - dc.DrawLine(0, 0, 200, 200); - dc.DrawLine(200, 0, 0, 200); - - dc.SetBrush(wxCYAN_BRUSH); - dc.SetPen(wxRED_PEN); - - dc.DrawRectangle(100, 100, 100, 50); - dc.DrawRoundedRectangle(150, 150, 100, 50, 20); - - dc.DrawEllipse(250, 250, 100, 50); - dc.DrawSpline(50, 200, 50, 100, 200, 10); - dc.DrawLine(50, 230, 200, 230); - - dc.SetPen(wxBLACK_PEN); - dc.DrawArc(50, 300, 100, 250, 100, 300 ); -} - -BEGIN_EVENT_TABLE(MyWindow, wxWindow) - EVT_PAINT(MyWindow::OnPaint) -END_EVENT_TABLE() - -// Define a constructor for my canvas -MyWindow::MyWindow(wxFrame *frame, int x, int y, int w, int h, long style): - wxWindow(frame, -1, wxPoint(x, y), wxSize(w, h), style) -{ -} - -MyWindow::~MyWindow(void) -{ -} - -// Define the repainting behaviour -void MyWindow::OnPaint(wxPaintEvent& WXUNUSED(event) ) -{ - wxPaintDC dc(this); - frame->Draw(dc,TRUE); -} - -// Define the behaviour for the frame closing -// - must delete all frames except for the main one. -bool MyFrame::OnClose(void) -{ - Show(FALSE); - - return TRUE; -} - -SizerFrame::SizerFrame(wxFrame *frame, char *title, int x, int y, int w, int h): - wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) -{ - panel = new wxPanel(this, -1, wxPoint(0, 0), wxSize(-1, -1), wxTAB_TRAVERSAL); - panel->SetBackgroundColour(wxColour(192, 192, 192)); - - // A sizer to fit the whole panel, plus two sizers, one - // above the other. A button is centred on the lower - // sizer; a rowcol containing 3 buttons is centred on the upper - // sizer. - wxSizer *expandSizer = new wxSizer(panel, wxSizerExpand); - expandSizer->SetName("expandSizer"); - - wxLayoutConstraints *c; - - /////// TOP OF PANEL - /////// - wxSizer *topSizer = new wxSizer(expandSizer); - topSizer->SetName("topSizer"); - - // Specify constraints for the top sizer - c = new wxLayoutConstraints; - c->left.SameAs (expandSizer, wxLeft); - c->top.SameAs (expandSizer, wxTop); - c->right.SameAs (expandSizer, wxRight); - c->height.PercentOf (expandSizer, wxHeight, 50); - - topSizer->SetConstraints(c); - - /* - * Add a row-col sizer and some buttons - */ - - // Default is layout by rows, 20 columns per row, shrink to fit. - wxRowColSizer *rowCol = new wxRowColSizer(topSizer); - rowCol->SetName("rowCol"); - - wxButton *button = new wxButton(panel, -1, "Button 1"); - rowCol->AddSizerChild(button); - - button = new wxButton(panel, -1, "Button 2"); - rowCol->AddSizerChild(button); - - button = new wxButton(panel, -1, "Button 3"); - rowCol->AddSizerChild(button); - - // Centre the rowcol in the middle of the upper sizer - c = new wxLayoutConstraints; - c->centreX.SameAs (topSizer, wxCentreX); - c->centreY.SameAs (topSizer, wxCentreY); - c->width.AsIs(); - c->height.AsIs(); - rowCol->SetConstraints(c); - - /////// BOTTOM OF PANEL - /////// - wxSizer *bottomSizer = new wxSizer(expandSizer); - - // Specify constraints for the bottom sizer - c = new wxLayoutConstraints; - c->left.SameAs (expandSizer, wxLeft); - c->top.PercentOf (expandSizer, wxHeight, 50); - c->right.SameAs (expandSizer, wxRight); - c->height.PercentOf (expandSizer, wxHeight, 50); - - bottomSizer->SetConstraints(c); - - wxButton *button2 = new wxButton(panel, -1, "Test button"); - - // The button should be a child of the bottom sizer - bottomSizer->AddSizerChild(button2); - - // Centre the button on the sizer - c = new wxLayoutConstraints; - c->centreX.SameAs (bottomSizer, wxCentreX); - c->centreY.SameAs (bottomSizer, wxCentreY); - c->width.PercentOf (bottomSizer, wxWidth, 20); - c->height.PercentOf (bottomSizer, wxHeight, 20); - button2->SetConstraints(c); -} - -BEGIN_EVENT_TABLE(SizerFrame, wxFrame) - EVT_SIZE(SizerFrame::OnSize) -END_EVENT_TABLE() - - -// Size the subwindows when the frame is resized -void SizerFrame::OnSize(wxSizeEvent& event) -{ - wxFrame::OnSize(event); - panel->Layout(); -} - -bool SizerFrame::OnClose(void) -{ - Show(FALSE); - - return TRUE; -} - diff --git a/samples/layout/layout.def b/samples/layout/layout.def deleted file mode 100644 index 0a7e3cb840..0000000000 --- a/samples/layout/layout.def +++ /dev/null @@ -1,9 +0,0 @@ -NAME Layout -DESCRIPTION 'Layout' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 16192 - diff --git a/samples/layout/layout.h b/samples/layout/layout.h deleted file mode 100644 index 83aca0d956..0000000000 --- a/samples/layout/layout.h +++ /dev/null @@ -1,79 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: layout.h -// Purpose: Layout sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -// Define a new application -class MyApp: public wxApp -{ - public: - MyApp(void) ; - bool OnInit(void); -}; - -// Define a new frame -class MyTextWindow; -class MyWindow; - -class MyFrame: public wxFrame -{ - public: - wxPanel *panel; - MyTextWindow *text_window; - MyWindow *canvas; - MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h); - void OnSize(wxSizeEvent& event); - bool OnClose(void); - void Draw(wxDC& dc, bool draw_bitmaps = TRUE); - - void LoadFile(wxCommandEvent& event); - void Quit(wxCommandEvent& event); - void TestSizers(wxCommandEvent& event); - void About(wxCommandEvent& event); - - DECLARE_EVENT_TABLE() -}; - -// Define a new text subwindow that can respond to drag-and-drop -class MyTextWindow: public wxTextCtrl -{ - public: - MyTextWindow(wxFrame *frame, int x=-1, int y=-1, int width=-1, int height=-1, - long style=wxTE_MULTILINE): - wxTextCtrl(frame, -1, "", wxPoint(x, y), wxSize(width, height), style) - { - } -}; - -// Define a new canvas which can receive some events -class MyWindow: public wxWindow -{ - public: - MyWindow(wxFrame *frame, int x, int y, int w, int h, long style = wxRETAINED); - ~MyWindow(void) ; - void OnPaint(wxPaintEvent& event); - - DECLARE_EVENT_TABLE() -}; - -class SizerFrame: public wxFrame -{ - public: - wxPanel *panel; - SizerFrame(wxFrame *frame, char *title, int x, int y, int w, int h); - void OnSize(wxSizeEvent& event); - bool OnClose(void); - - DECLARE_EVENT_TABLE() -}; - -#define LAYOUT_QUIT 100 -#define LAYOUT_TEST 101 -#define LAYOUT_ABOUT 102 -#define LAYOUT_LOAD_FILE 103 diff --git a/samples/layout/layout.rc b/samples/layout/layout.rc deleted file mode 100644 index b86c4e2265..0000000000 --- a/samples/layout/layout.rc +++ /dev/null @@ -1 +0,0 @@ -#include "wx/msw/wx.rc" diff --git a/samples/layout/makefile.b32 b/samples/layout/makefile.b32 deleted file mode 100644 index 765fe58400..0000000000 --- a/samples/layout/makefile.b32 +++ /dev/null @@ -1,63 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds layout example (DOS). - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 - -TARGET=layout - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = layout.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -layout.obj: layout.$(SRCSUFF) layout.h - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - diff --git a/samples/layout/makefile.bcc b/samples/layout/makefile.bcc deleted file mode 100644 index 1538f447dd..0000000000 --- a/samples/layout/makefile.bcc +++ /dev/null @@ -1,76 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds layout example (DOS). - -!if "$(BCCDIR)" == "" -!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 -!endif - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makebcc.env - -THISDIR = $(WXDIR)\samples\layout -WXLIB = $(WXDIR)\lib\wx.lib - -LIBS=$(WXLIB) mathwl cwl import -INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw -CFG=$(WXDIR)\src\wxwin.cfg - -!ifndef FINAL -FINAL=0 -!endif - -!if "$(FINAL)" == "0" -LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -O2 -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -HEADERS = layout.h -SOURCES = layout.$(SRCSUFF) -OBJECTS = layout.obj - -layout: layout.exe - -all: layout.exe - -layout.exe: $(WXLIB) layout.obj layout.def layout.res - tlink $(LINKFLAGS) @&&! -c0wl.obj layout.obj -layout -nul -$(LIBS) -layout.def -! - rc -30 -K layout.res - -.$(SRCSUFF).obj: - bcc $(CPPFLAGS) -c {$< } - -layout.obj: layout.$(SRCSUFF) - -layout.res : layout.rc $(WXDIR)\include\msw\wx.rc - rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa layout - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws diff --git a/samples/layout/makefile.dos b/samples/layout/makefile.dos deleted file mode 100644 index 8ecd7c5608..0000000000 --- a/samples/layout/makefile.dos +++ /dev/null @@ -1,85 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds layout example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info. - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\layout -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) oldnames libw llibcew commdlg ddeml shell mmsystem -INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw -DUMMY=$(WXDIR)\src\msw\dummy.obj - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!ifndef FINAL -FINAL=0 -!endif - -!if "$(FINAL)" == "0" -CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch -LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:512 -!else -CPPFLAGS=/AL /W3 /G2sw $(INC) /Ox /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch -LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:512 -!endif - -HEADERS = layout.h -SOURCES = layout.$(SRCSUFF) -OBJECTS = layout.obj - -layout: layout.exe - -all: wx layout.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -layout.exe: $(DUMMY) $(WXLIB) layout.obj layout.def layout.res - link $(LINKFLAGS) @<< -$(DUMMY) layout.obj, -layout, -NUL, -$(LIBS), -layout.def -; -<< - rc -31 -K layout.res - -layout.obj: layout.h layout.$(SRCSUFF) $(DUMMY) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -layout.res : layout.rc $(WXDIR)\include\msw\wx.rc - rc -r /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa layout - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb - diff --git a/samples/layout/makefile.g95 b/samples/layout/makefile.g95 deleted file mode 100644 index df9f97e246..0000000000 --- a/samples/layout/makefile.g95 +++ /dev/null @@ -1,35 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for layout example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS=$(OBJDIR)/layout.$(OBJSUFF) $(OBJDIR)/layout_resources.o - -all: $(OBJDIR) layout.exe - -$(OBJDIR): - mkdir $(OBJDIR) - -layout.exe: $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o layout$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/layout.$(OBJSUFF): layout.$(SRCSUFF) layout.h - $(CC) -c $(CPPFLAGS) -o $@ layout.$(SRCSUFF) - -$(OBJDIR)/layout_resources.o: layout.rc - $(RESCOMP) -i layout.rc -o $(OBJDIR)/layout_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) layout$(GUISUFFIX).exe core *.res *.rsc diff --git a/samples/layout/makefile.nt b/samples/layout/makefile.nt deleted file mode 100644 index 03d63b800b..0000000000 --- a/samples/layout/makefile.nt +++ /dev/null @@ -1,63 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds layout example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\layout -PROGRAM=layout - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).h $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.sbr - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb - diff --git a/samples/layout/makefile.sc b/samples/layout/makefile.sc deleted file mode 100644 index 0b28430453..0000000000 --- a/samples/layout/makefile.sc +++ /dev/null @@ -1,37 +0,0 @@ -# Symantec C++ makefile for layout example -# NOTE that peripheral libraries are now dealt in main wxWindows makefile. - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makesc.env - -WXLIB = $(WXDIR)\lib\wx.lib -INCDIR = $(WXDIR)\include -MSWINC = $(INCDIR)\msw -BASEINC = $(INCDIR)\base - -CC=sc -RC=rc -CFLAGS = -o -ml -W -Dwx_msw -LDFLAGS = -ml -W - -INCLUDE=$(BASEINC);$(MSWINC) - -LIBS=$(WXLIB) libw.lib commdlg.lib shell.lib - -.$(SRCSUFF).obj: - *$(CC) -c $(CFLAGS) -I$(INCLUDE) $< - -.rc.res: - *$(RC) -r -I$(INCLUDE) $< - -layout.exe: layout.obj layout.def layout.res - *$(CC) $(LDFLAGS) -o$@ layout.obj layout.def $(LIBS) - *$(RC) -k layout.res - -clean: - -del *.obj - -del *.exe - -del *.res - -del *.map - -del *.rws - diff --git a/samples/layout/makefile.unx b/samples/layout/makefile.unx deleted file mode 100644 index 3f9aad0ac2..0000000000 --- a/samples/layout/makefile.unx +++ /dev/null @@ -1,76 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for layout example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/make.env - -OBJECTS=$(OBJDIR)/layout.$(OBJSUFF) - -.SUFFIXES: - -all: $(OBJDIR) layout$(GUISUFFIX) - -wxmotif: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif - -wxxview: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview - -wxhp: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx hp - -# For SGI, include -lPW on your LDLIBS -motif: wxmotif - $(MAKE) -f makefile.unx all GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' WXLIB=$(WXDIR)/lib/libwx_motif.a OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK= - -xview: wxxview - $(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' LDLIBS='$(XVIEWLDLIBS)' - -hp: wxhp - $(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC OPT='' DEBUG='$(DEBUG)' WARN='-w' \ - XINCLUDE='$(HPXINCLUDE)' \ - XLIB='$(HPXLIB)' \ - XVIEW_LINK='' \ - LDLIBS='$(HPLDLIBS)' - -$(OBJDIR): - mkdir $(OBJDIR) - -layout$(GUISUFFIX): $(OBJDIR)/layout.$(OBJSUFF) $(WXLIB) - $(CC) $(LDFLAGS) -o layout$(GUISUFFIX) $(OBJDIR)/layout.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS) - -$(OBJDIR)/layout.$(OBJSUFF): layout.$(SRCSUFF) layout.h - $(CC) -c $(CPPFLAGS) -o $@ layout.$(SRCSUFF) - -clean_motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany - -clean_ol: - $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany - -clean_hp: - $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany - -cleanany: - rm -f $(OBJECTS) layout$(GUISUFFIX) core - -wxclean_ol: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_ol - -wxclean_motif: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_motif - -wxclean_hp: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_hp - diff --git a/samples/layout/makefile.vms b/samples/layout/makefile.vms deleted file mode 100644 index f47d52031b..0000000000 --- a/samples/layout/makefile.vms +++ /dev/null @@ -1,41 +0,0 @@ -#************************************************************************ -# Makefile for LAYOUT under VMS -# by Stefan Hammes -# (incomplete) update history: -# 14.05.95 -#************************************************************************ - -#************************************************************************ -# Definition section -# (cave: definitions and includes must begin with ',') -#************************************************************************ - -APPOPTS = -APPDEFS = -APPINCS = - -#************************************************************************ -# Module section -#************************************************************************ - -# Name of main module -MAIN = layout - -# Object modules of the application. -OBJS = layout.obj -OBJLIST =layout.obj - -.include [--.src]makevms.env - -# main dependency -$(MAIN).exe : $(OBJS) - $(LINK) $(LINKFLAGS) /exec=$(MAIN).exe $(OBJLIST),$(WXLIB)/lib,$(OPTSFILE)/option - - purge *.exe - -#************************************************************************ -# Header file depedencies following -#************************************************************************ - -layout.obj : layout.cc layout.h - - diff --git a/samples/layout/makefile.wat b/samples/layout/makefile.wat deleted file mode 100644 index 5c55c4d9c0..0000000000 --- a/samples/layout/makefile.wat +++ /dev/null @@ -1,44 +0,0 @@ -# -# Makefile for WATCOM -# -# Created by D.Chubraev, chubraev@iem.ee.ethz.ch -# 8 Nov 1994 -# - -WXDIR = ..\.. - -!include $(WXDIR)\src\makewat.env - -WXLIB = $(WXDIR)\lib -NAME = layout -LNK = $(name).lnk -OBJS = $(name).obj - -all: $(name).exe - -$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib - wlink @$(LNK) - $(BINDCOMMAND) $(name).res - -$(name).res : $(name).rc $(WXDIR)\include\msw\wx.rc - $(RC) $(RESFLAGS1) $(name).rc - -$(LNK) : makefile.wat - %create $(LNK) - @%append $(LNK) debug all - @%append $(LNK) system $(LINKOPTION) - @%append $(LNK) $(MINDATA) - @%append $(LNK) $(MAXDATA) - @%append $(LNK) $(STACK) - @%append $(LNK) name $(name) - @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib - @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i - @for %i in ($(OBJS)) do @%append $(LNK) file %i - -thing: .SYMBOLIC - echo $(WATLIBDIR) - -clean: .SYMBOLIC - -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex - - diff --git a/samples/listctrl/.cvsignore b/samples/listctrl/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/listctrl/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/listctrl/Makefile b/samples/listctrl/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/listctrl/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/listctrl/Makefile.in b/samples/listctrl/Makefile.in deleted file mode 100644 index dc00e01888..0000000000 --- a/samples/listctrl/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# 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 diff --git a/samples/listctrl/bitmaps/small1.ico b/samples/listctrl/bitmaps/small1.ico deleted file mode 100644 index 2d650d58c9..0000000000 Binary files a/samples/listctrl/bitmaps/small1.ico and /dev/null differ diff --git a/samples/listctrl/bitmaps/small1.xpm b/samples/listctrl/bitmaps/small1.xpm deleted file mode 100644 index 98b4bb20f6..0000000000 --- a/samples/listctrl/bitmaps/small1.xpm +++ /dev/null @@ -1,27 +0,0 @@ -/* XPM */ -static char * small1_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 5 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #ff0000", -"@ c #0000ff", -"# c #ffffff", -/* pixels */ -" ", -" ", -" ########## ", -" #........# ", -" #........# ", -" #........# ", -" #..########### ", -" #..#+++++++++# ", -" ####++#####++# ", -" #+#@@@@@#+# ", -" #+#@@@@@#+# ", -" #+#@@@@@#+# ", -" #++#####++# ", -" #+++++++++# ", -" ########### ", -" "}; diff --git a/samples/listctrl/bitmaps/toolbrai.ico b/samples/listctrl/bitmaps/toolbrai.ico deleted file mode 100644 index 99069f7c67..0000000000 Binary files a/samples/listctrl/bitmaps/toolbrai.ico and /dev/null differ diff --git a/samples/listctrl/bitmaps/toolbrai.xpm b/samples/listctrl/bitmaps/toolbrai.xpm deleted file mode 100644 index 3c1a4db104..0000000000 --- a/samples/listctrl/bitmaps/toolbrai.xpm +++ /dev/null @@ -1,42 +0,0 @@ -/* XPM */ -static char * toolbrai_xpm[] = { -/* width height ncolors chars_per_pixel */ -"32 32 4 1", -/* colors */ -" s None c None", -". c #000080", -"+ c #ff0000", -"@ c #00ffff", -/* pixels */ -" ", -" ", -" ..... ", -" ..... .+++++. ", -" .+++++. .+++++. ", -" .+++++++. .+++++. ", -" .+++++. ..... ", -" ..... @ ", -" @ @ ", -" @ @ ", -" @ @ ", -" @ ..... ", -" ..+++++.. ", -" .+++++++++. ", -" .+++++++++. ", -" .+++++++++. ", -" @..+++++.. ", -" @ .....@ ", -" @ @ @ ", -" @ @ @ ...... ", -" @ @ @.++++++. ", -" @ @ .++++++. ", -" @ @ .++++++. ", -" ...... @ .++++++. ", -" .++++++. @ ...... ", -" .++++++. .... ", -" .++++++. .++++. ", -" .++++++. .++++. ", -" ...... .++++. ", -" .++++. ", -" .... ", -" "}; diff --git a/samples/listctrl/bitmaps/toolchar.ico b/samples/listctrl/bitmaps/toolchar.ico deleted file mode 100644 index bb29c8edd7..0000000000 Binary files a/samples/listctrl/bitmaps/toolchar.ico and /dev/null differ diff --git a/samples/listctrl/bitmaps/toolchar.xpm b/samples/listctrl/bitmaps/toolchar.xpm deleted file mode 100644 index 7943907597..0000000000 --- a/samples/listctrl/bitmaps/toolchar.xpm +++ /dev/null @@ -1,42 +0,0 @@ -/* XPM */ -static char * toolchar_xpm[] = { -/* width height ncolors chars_per_pixel */ -"32 32 4 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #ff0000", -"@ c #ffff00", -/* pixels */ -" ........ ", -" ...@@@@@@@@... ", -" ..@@@@@@@@@@@@@@.. ", -" ..@@@@@@@@@@@@@@@@.. ", -" .@@@@@@@@@@@@@@@@@@@@. ", -" .@@@@@@@@@@@@@@@@@@@@@@. ", -" .@@@@@@@@@@@@@@@@@@@@@@@@. ", -" ..@@@@@@@@@@@@@@@@@@@@@@@@.. ", -" .@@@@@@@@..@@@@@@..@@@@@@@@. ", -" .@@@@@@@@....@@@@....@@@@@@@@. ", -" .@@@@@@@@....@@@@....@@@@@@@@. ", -" .@@@@@@@@....@@@@....@@@@@@@@. ", -".@@@@@@@@@....@@@@....@@@@@@@@@.", -".@@@@@@@@@....@@@@....@@@@@@@@@.", -".@@@@@@@@@@..@@@@@@..@@@@@@@@@@.", -".@@@@@@@.@@@@@@@@@@@@@@.@@@@@@@.", -".@@@@@@@.@@@@@@@@@@@@@@.@@@@@@@.", -".@@@@@@.@@@@@@@@@@@@@@@@.@@@@@@.", -".@@@....@@@@@@@@@@@@@@@@....@@@.", -".@@@@@@@.@@@@@@@@@@@@@@.@@@@@@@.", -" .@@@@@@@.@@@@@@@@@@@@.@@@@@@@. ", -" .@@@@@@@..@@@@@@@@@@..@@@@@@@. ", -" .@@@@@@@@...@@@@@@...@@@@@@@@. ", -" .@@@@@@@@.+......+.@@@@@@@@. ", -" ..@@@@@@@@.++++++.@@@@@@@@.. ", -" .@@@@@@@@@.++++.@@@@@@@@@. ", -" .@@@@@@@@@....@@@@@@@@@. ", -" .@@@@@@@@@@@@@@@@@@@@. ", -" ..@@@@@@@@@@@@@@@@.. ", -" ..@@@@@@@@@@@@@@.. ", -" ...@@@@@@@@... ", -" ........ "}; diff --git a/samples/listctrl/bitmaps/toolchec.ico b/samples/listctrl/bitmaps/toolchec.ico deleted file mode 100644 index d64e0105a2..0000000000 Binary files a/samples/listctrl/bitmaps/toolchec.ico and /dev/null differ diff --git a/samples/listctrl/bitmaps/toolchec.xpm b/samples/listctrl/bitmaps/toolchec.xpm deleted file mode 100644 index 9f4a45d753..0000000000 --- a/samples/listctrl/bitmaps/toolchec.xpm +++ /dev/null @@ -1,40 +0,0 @@ -/* XPM */ -static char * toolchec_xpm[] = { -/* width height ncolors chars_per_pixel */ -"32 32 2 1", -/* colors */ -" s None c None", -". c #000000", -/* pixels */ -" ", -" ", -" ", -" . ", -" . ", -" . ", -" . ", -" . ", -" . ", -" .. ", -" .. ", -" .. ", -" ... ", -" .. ", -" ... ", -" ... ", -" ... ", -" ... ", -" ... ... ", -" .... .... ", -" .... ... ", -" .... .... ", -" .... ... ", -" ........ ", -" ...... ", -" ..... ", -" .... ", -" .. ", -" . ", -" ", -" ", -" "}; diff --git a/samples/listctrl/bitmaps/tooldata.ico b/samples/listctrl/bitmaps/tooldata.ico deleted file mode 100644 index 4cdd40a5d0..0000000000 Binary files a/samples/listctrl/bitmaps/tooldata.ico and /dev/null differ diff --git a/samples/listctrl/bitmaps/tooldata.xpm b/samples/listctrl/bitmaps/tooldata.xpm deleted file mode 100644 index f24d5042d5..0000000000 --- a/samples/listctrl/bitmaps/tooldata.xpm +++ /dev/null @@ -1,45 +0,0 @@ -/* XPM */ -static char * tooldata_xpm[] = { -/* width height ncolors chars_per_pixel */ -"32 32 7 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -"# c #ff0000", -"$ c #ff00ff", -"% c #ffffff", -/* pixels */ -" .. ", -" ............. ", -" %%..%%%%%%%%%. ", -" %%..%%%%%%%%%%. ", -" %%..%%%%%%%..%%. ", -" ......%%%%%. .%. ", -" .. .%%%%. .%. ", -" ...%%..%. ", -" .....%%........ ", -" .%%%%%...%%%%%%%. ", -" .%%%%%%%%%%%%%%%. ", -" .%+++++++++%%%%%.... ", -" .%%%%%%%%%%%%%%%.%%%. ", -" .%+++++%%%%%%%%%..%%. ", -" .%%%%%%%%%%%%%%%.%.%. ", -" .%+++++++%+%%%%%.%.%. ", -" .%%%%%%%%%%%%%%%.%.%. ", -" ...............%%.%.%..... ", -" .%%%%%%%%%%%%%%%.%.%.%.#$#. ", -" .%%%%%%%+%%%%%%%...%.%.$#. ", -" .%%@+@+@+@+%%%%%.%%%.%.... ", -" .%%%%%+%%%%%%%%%.%%%.%.+.. ", -" .%%@+@+@+%%%%%%%.%%%....#. ", -" .%%%+%+%%%%%%%+%.%%%.+.#. ", -" .%%@+@+@+@+%%+%%......#. ", -" .%+%+%%%%%%%+%+%.$$+.#. ", -" .+%+@.%%%@.+%+%%.$+.#. ", -" .%%%.+%%%.+%%%%%.+.#. ", -" .....................#. ", -" .################.+.#. ", -" .#$#$#$#$#$#$#$#$.#. ", -" ................... "}; diff --git a/samples/listctrl/bitmaps/toolgame.ico b/samples/listctrl/bitmaps/toolgame.ico deleted file mode 100644 index 3174273bee..0000000000 Binary files a/samples/listctrl/bitmaps/toolgame.ico and /dev/null differ diff --git a/samples/listctrl/bitmaps/toolgame.xpm b/samples/listctrl/bitmaps/toolgame.xpm deleted file mode 100644 index d0cc8aed5f..0000000000 --- a/samples/listctrl/bitmaps/toolgame.xpm +++ /dev/null @@ -1,41 +0,0 @@ -/* XPM */ -static char * toolgame_xpm[] = { -/* width height ncolors chars_per_pixel */ -"32 32 3 1", -/* colors */ -" s None c None", -". c #808080", -"+ c #ff0000", -/* pixels */ -" ", -" +++++ +++++ ", -" +++++++++ +++++++++ ", -" +++++++++++ +++++++++++ ", -" +++++++++++++ +++++++++++++ ", -" +++++++++++++.+++++++++++++. ", -" +++++++++++++++++++++++++++++ ", -" +++++++++++++++++++++++++++++. ", -" +++++++++++++++++++++++++++++. ", -" +++++++++++++++++++++++++++++. ", -" +++++++++++++++++++++++++++++. ", -" +++++++++++++++++++++++++++.. ", -" +++++++++++++++++++++++++++. ", -" +++++++++++++++++++++++++.. ", -" +++++++++++++++++++++++.. ", -" +++++++++++++++++++++.. ", -" +++++++++++++++++++.. ", -" +++++++++++++++++.. ", -" +++++++++++++++++. ", -" +++++++++++++++.. ", -" +++++++++++++.. ", -" +++++++++++++. ", -" +++++++++++.. ", -" +++++++++.. ", -" +++++++.. ", -" +++++++. ", -" +++++.. ", -" +++.. ", -" +.. ", -" +. ", -" . ", -" "}; diff --git a/samples/listctrl/bitmaps/toolnote.ico b/samples/listctrl/bitmaps/toolnote.ico deleted file mode 100644 index 8a964c0ff3..0000000000 Binary files a/samples/listctrl/bitmaps/toolnote.ico and /dev/null differ diff --git a/samples/listctrl/bitmaps/toolnote.xpm b/samples/listctrl/bitmaps/toolnote.xpm deleted file mode 100644 index 16835eccbc..0000000000 --- a/samples/listctrl/bitmaps/toolnote.xpm +++ /dev/null @@ -1,46 +0,0 @@ -/* XPM */ -static char * toolnote_xpm[] = { -/* width height ncolors chars_per_pixel */ -"32 32 8 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #800000", -"@ c #c0c0c0", -"# c #808080", -"$ c #ffff00", -"% c #0000ff", -"& c #ffffff", -/* pixels */ -" ", -" .. ", -" .$. ", -" .$. ", -" .$. ", -" .$. ", -" .$. ", -" .$.... ", -" ...$.&&. #.. ", -" .&&&.$.&&. ...&&# ", -" ..&&&&&.$.@&..$&..&. ", -" ....&&&&&&&@.$.@&.&&.&.. #.. ", -".%%.&&&&&&&&@..$.@.&#.##&...&&# ", -".%+.&&&&&&&&@. .$..&&&&&&&&..&. ", -".%%.&&&&&&&&&......##&&&&&&.&.. ", -".%%.@&&&&&&&&&&@@@..&##&&&#.##&.", -".%%..@@..&&&&&&....+.&&##&&&&&..", -".%.%... ......&&&#..&&&&##&&.&.", -" .%.%.. .$&@&&&&&$#.&&&&&$.&.%", -" .... .&&&&@@&&&&&&##&&&.&.% ", -" .&&&&&&$@@&&&&&$&&.&.% ", -" .&&&@@&&&&&@@&&&&&.&.% ", -" .&&&&$&@@&&&&$@@&&.&.% ", -" ...&&&&&&@@&&&&&&.&.% ", -" .&&..&&&&$&@@&&&.&.% ", -" %..&&..&&&&&&&&.&.% ", -" %..&&..&&&&$.&.% ", -" %..&&..&&.&.% ", -" %..&&..&.% ", -" %..&&.% ", -" %..% ", -" "}; diff --git a/samples/listctrl/bitmaps/tooltime.ico b/samples/listctrl/bitmaps/tooltime.ico deleted file mode 100644 index b769904f4d..0000000000 Binary files a/samples/listctrl/bitmaps/tooltime.ico and /dev/null differ diff --git a/samples/listctrl/bitmaps/tooltime.xpm b/samples/listctrl/bitmaps/tooltime.xpm deleted file mode 100644 index 629f273955..0000000000 --- a/samples/listctrl/bitmaps/tooltime.xpm +++ /dev/null @@ -1,43 +0,0 @@ -/* XPM */ -static char * tooltime_xpm[] = { -/* width height ncolors chars_per_pixel */ -"32 32 5 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -"# c #ffffff", -/* pixels */ -" ", -" ....... ", -" .#+++++@. ", -" ......... ", -" .#+++++@. ", -" ......... ", -" .#++++++++. ", -" ........... ", -" ...+++++++... ", -" .+++#####+++. ", -" .++####.####++. ", -" .++#####.+####++. ", -" .+######.+#####+. ", -" .++######.+######@. ", -" .+#######.+######@.. ", -" .+###....@+######@.+ ", -" .+####++++@######@.. ", -" .++########@####@@. ", -" .+#########@###@. ", -" .++###########@@. ", -" .++#########@@. ", -" .++######@@@. ", -" ...@@@@@@@... ", -" ........... ", -" .#++++++++. ", -" ......... ", -" .+@@@@@@. ", -" ......... ", -" .@@@@@@@. ", -" ....... ", -" ", -" "}; diff --git a/samples/listctrl/bitmaps/tooltodo.ico b/samples/listctrl/bitmaps/tooltodo.ico deleted file mode 100644 index c6314c6baf..0000000000 Binary files a/samples/listctrl/bitmaps/tooltodo.ico and /dev/null differ diff --git a/samples/listctrl/bitmaps/tooltodo.xpm b/samples/listctrl/bitmaps/tooltodo.xpm deleted file mode 100644 index 0bc6cc482a..0000000000 --- a/samples/listctrl/bitmaps/tooltodo.xpm +++ /dev/null @@ -1,44 +0,0 @@ -/* XPM */ -static char * tooltodo_xpm[] = { -/* width height ncolors chars_per_pixel */ -"32 32 6 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -"# c #ffff00", -"$ c #ffffff", -/* pixels */ -" @@@@ ", -" @+...@ ", -" @+. @ ", -" @. @. ", -" @. @. ", -".....@......................... ", -".#$#$@.#$#$#$#$#$#$#$#$#$#$#$#.@", -".$#$#@.$#$#$#$@$#$#$#$#$#$#$#$.@", -".#$#$@.#$#$#$#@.$#$#$#$#$#$#$#.@", -".$#$#@.$#$#$#$@.#$#$#$#$#$#$#$.@", -".#$#$@.#$#$#$#@.$#$#$#$#$#$#$#.@", -".$#$#@.$#$#$#$@.#$#$#$#$#$#$#$.@", -".#$#$@.#$#$#$#@.$#$#$#$#$#$#$#.@", -".$#$#@.$#$#$#$@.#$#$#$#$#$#$#$.@", -".#$#$@.#@@@@@@@.@@@@@@@@@@@@@@.@", -".$#$#@.$#$#$#$@.#$#$#$#$#$#$#$.@", -".#$#$@.#$#$#$#@.$#$#$#$#$#$#$#.@", -".$#$#@.$#$#$#$@.#$#$#$#$#$#$#..@", -".#$#$@.#$#$#$#@.$#$#$#$#$#$#$.@@", -".$#$#@.$#$#$#$@.#$#$#$#$#$#$#.@ ", -".#$#$@.#$#$#$#@.$#$#$#$#$#$#..@ ", -".$#$#@.$#$#$#$@.#$#$#$#$#$#..@@ ", -".#$#$@.#@@@@@@@.@@@@@@......@@ ", -".$#$#@.$#$#$#$@.#$#$#..@@@@@@ ", -".#$#$#@#$#$#$@+.$#$#$.@@ ", -".$#$#$#@#$#$@+.$#$#$..@ ", -".#$#$#$#@@@@+.$#$#$..@@ ", -".$#$#$#$#....$#$#$..@@ ", -".#$#$#$#$#$#$#$...@@@ ", -".$#$#$#...#$#$..@@@ ", -".......@@@....@@@ ", -" @@@@@@@ @@@@ "}; diff --git a/samples/listctrl/bitmaps/toolword.ico b/samples/listctrl/bitmaps/toolword.ico deleted file mode 100644 index a1a8838c27..0000000000 Binary files a/samples/listctrl/bitmaps/toolword.ico and /dev/null differ diff --git a/samples/listctrl/bitmaps/toolword.xpm b/samples/listctrl/bitmaps/toolword.xpm deleted file mode 100644 index 7c615cdde0..0000000000 --- a/samples/listctrl/bitmaps/toolword.xpm +++ /dev/null @@ -1,41 +0,0 @@ -/* XPM */ -static char * toolword_xpm[] = { -/* width height ncolors chars_per_pixel */ -"32 32 3 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #ffffff", -/* pixels */ -" ", -" ", -" ........ ........ ", -" .++++++. ...........++++++. ", -" .++++++. .++++++++..++++++. ", -" ........ .++++++++......... ", -" .++++++++. ", -" .......... ", -" ", -" ", -" ", -" ..... ", -"...... ......... .+++. .........", -".++++. .+++++++. .+++. .+++++++.", -".++++. .+++++++. .+++. .+++++++.", -".++++. .+++++++. ..... .+++++++.", -"...... ......... .........", -" ", -" ", -" ", -" ", -" .......... ", -" .. .++++++++. ", -" .++. .++++++++. ", -" .++++. .++++++++. ", -" .++++. .......... ", -" ...........+++. ", -" .++++++++. .+. ", -" .++++++++. . ", -" .......... ", -" ", -" "}; diff --git a/samples/listctrl/listtest.cpp b/samples/listctrl/listtest.cpp deleted file mode 100644 index 6e4b55f5ee..0000000000 --- a/samples/listctrl/listtest.cpp +++ /dev/null @@ -1,507 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: listctrl.cpp -// Purpose: wxListCtrl sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#pragma interface -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "wx/listctrl.h" -#include "listtest.h" - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(LIST_QUIT, MyFrame::OnQuit) - EVT_MENU(LIST_ABOUT, MyFrame::OnAbout) - EVT_MENU(LIST_LIST_VIEW, MyFrame::OnListView) - EVT_MENU(LIST_REPORT_VIEW, MyFrame::OnReportView) - EVT_MENU(LIST_ICON_VIEW, MyFrame::OnIconView) - EVT_MENU(LIST_ICON_TEXT_VIEW, MyFrame::OnIconTextView) - EVT_MENU(LIST_SMALL_ICON_VIEW, MyFrame::OnSmallIconView) - EVT_MENU(LIST_SMALL_ICON_TEXT_VIEW, MyFrame::OnSmallIconTextView) - EVT_MENU(LIST_DESELECT_ALL, MyFrame::OnDeselectAll) - EVT_MENU(LIST_SELECT_ALL, MyFrame::OnSelectAll) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(MyListCtrl, wxListCtrl) - EVT_LIST_BEGIN_DRAG(LIST_CTRL, MyListCtrl::OnBeginDrag) - EVT_LIST_BEGIN_RDRAG(LIST_CTRL, MyListCtrl::OnBeginRDrag) - EVT_LIST_BEGIN_LABEL_EDIT(LIST_CTRL, MyListCtrl::OnBeginLabelEdit) - EVT_LIST_END_LABEL_EDIT(LIST_CTRL, MyListCtrl::OnEndLabelEdit) - EVT_LIST_DELETE_ITEM(LIST_CTRL, MyListCtrl::OnDeleteItem) - EVT_LIST_GET_INFO(LIST_CTRL, MyListCtrl::OnGetInfo) - EVT_LIST_SET_INFO(LIST_CTRL, MyListCtrl::OnSetInfo) - EVT_LIST_ITEM_SELECTED(LIST_CTRL, MyListCtrl::OnSelected) - EVT_LIST_ITEM_DESELECTED(LIST_CTRL, MyListCtrl::OnDeselected) - EVT_LIST_KEY_DOWN(LIST_CTRL, MyListCtrl::OnKeyDown) -END_EVENT_TABLE() - -IMPLEMENT_APP(MyApp) - -// `Main program' equivalent, creating windows and returning main app frame -bool MyApp::OnInit(void) -{ - // Create the main frame window - MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "wxListCtrl Test", 50, 50, 450, 340); - - // This reduces flicker effects - even better would be to define OnEraseBackground - // to do nothing. When the list control's scrollbars are show or hidden, the - // frame is sent a background erase event. - frame->SetBackgroundColour(wxColour(255, 255, 255)); - - // Give it an icon -#ifdef __WXMSW__ - frame->SetIcon(wxIcon("mondrian")); -#else -#include "mondrian.xpm" - frame->SetIcon(wxIcon(mondrian_xpm)); -#endif - - // Make an image list containing large icons - m_imageListNormal = new wxImageList(32, 32, TRUE); - m_imageListSmall = new wxImageList(16, 16, TRUE); - -#ifdef __WXMSW__ - m_imageListNormal->Add( wxIcon("icon1", wxBITMAP_TYPE_ICO_RESOURCE) ); - m_imageListNormal->Add( wxIcon("icon2", wxBITMAP_TYPE_ICO_RESOURCE) ); - m_imageListNormal->Add( wxIcon("icon3", wxBITMAP_TYPE_ICO_RESOURCE) ); - m_imageListNormal->Add( wxIcon("icon4", wxBITMAP_TYPE_ICO_RESOURCE) ); - m_imageListNormal->Add( wxIcon("icon5", wxBITMAP_TYPE_ICO_RESOURCE) ); - m_imageListNormal->Add( wxIcon("icon6", wxBITMAP_TYPE_ICO_RESOURCE) ); - m_imageListNormal->Add( wxIcon("icon7", wxBITMAP_TYPE_ICO_RESOURCE) ); - m_imageListNormal->Add( wxIcon("icon8", wxBITMAP_TYPE_ICO_RESOURCE) ); - m_imageListNormal->Add( wxIcon("icon9", wxBITMAP_TYPE_ICO_RESOURCE) ); - - m_imageListSmall->Add( wxIcon("iconsmall", wxBITMAP_TYPE_ICO_RESOURCE) ); - -#else - - #include "bitmaps/toolbrai.xpm" - m_imageListNormal->Add( wxIcon( toolbrai_xpm ) ); - #include "bitmaps/toolchar.xpm" - m_imageListNormal->Add( wxIcon( toolchar_xpm ) ); - #include "bitmaps/tooldata.xpm" - m_imageListNormal->Add( wxIcon( tooldata_xpm ) ); - #include "bitmaps/toolnote.xpm" - m_imageListNormal->Add( wxIcon( toolnote_xpm ) ); - #include "bitmaps/tooltodo.xpm" - m_imageListNormal->Add( wxIcon( tooltodo_xpm ) ); - #include "bitmaps/toolchec.xpm" - m_imageListNormal->Add( wxIcon( toolchec_xpm ) ); - #include "bitmaps/toolgame.xpm" - m_imageListNormal->Add( wxIcon( toolgame_xpm ) ); - #include "bitmaps/tooltime.xpm" - m_imageListNormal->Add( wxIcon( tooltime_xpm ) ); - #include "bitmaps/toolword.xpm" - m_imageListNormal->Add( wxIcon( toolword_xpm ) ); - - #include "bitmaps/small1.xpm" - m_imageListSmall->Add( wxIcon( small1_xpm) ); - -#endif - - // Make a menubar - wxMenu *file_menu = new wxMenu; - - file_menu->Append(LIST_LIST_VIEW, "&List view"); - file_menu->Append(LIST_REPORT_VIEW, "&Report view"); - file_menu->Append(LIST_ICON_VIEW, "&Icon view"); - file_menu->Append(LIST_ICON_TEXT_VIEW, "Icon view with &text"); - file_menu->Append(LIST_SMALL_ICON_VIEW, "&Small icon view"); - file_menu->Append(LIST_SMALL_ICON_TEXT_VIEW, "Small icon &view with text"); - file_menu->Append(LIST_DESELECT_ALL, "&Deselect All"); - file_menu->Append(LIST_SELECT_ALL, "S&elect All"); - file_menu->AppendSeparator(); - file_menu->Append(LIST_ABOUT, "&About"); - file_menu->Append(LIST_QUIT, "E&xit"); - wxMenuBar *menu_bar = new wxMenuBar; - menu_bar->Append(file_menu, "&File"); - frame->SetMenuBar(menu_bar); - - // Make a panel with a message - frame->m_listCtrl = new MyListCtrl(frame, LIST_CTRL, wxPoint(0, 0), wxSize(400, 200), - wxLC_LIST|wxSUNKEN_BORDER); -// wxLC_LIST|wxLC_USER_TEXT|wxSUNKEN_BORDER); // wxLC_USER_TEXT requires app to supply all text on demand - frame->m_logWindow = new wxTextCtrl(frame, -1, "", wxPoint(0, 0), wxSize(400, 200), wxTE_MULTILINE|wxSUNKEN_BORDER); - - wxLayoutConstraints *c = new wxLayoutConstraints; - c->top.SameAs (frame, wxTop); - c->left.SameAs (frame, wxLeft); - c->right.SameAs (frame, wxRight); - c->height.PercentOf (frame, wxHeight, 66); - frame->m_listCtrl->SetConstraints(c); - - c = new wxLayoutConstraints; - c->top.Below (frame->m_listCtrl); - c->left.SameAs (frame, wxLeft); - c->right.SameAs (frame, wxRight); - c->bottom.SameAs (frame, wxBottom); - frame->m_logWindow->SetConstraints(c); - frame->SetAutoLayout(TRUE); - - for ( int i=0; i < 30; i++) - { - char buf[20]; - sprintf(buf, "Item %d", i); - long tmp = frame->m_listCtrl->InsertItem(i, buf); - } - - frame->CreateStatusBar(3); - frame->SetStatusText("", 0); - - // Show the frame - frame->Show(TRUE); - - SetTopWindow(frame); - - return TRUE; -} - -// My frame constructor -MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h): - wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) -{ - m_listCtrl = (MyListCtrl *) NULL; - m_logWindow = (wxTextCtrl *) NULL; -} - -MyFrame::~MyFrame(void) -{ - delete wxGetApp().m_imageListNormal; - delete wxGetApp().m_imageListSmall; -} - -void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) -{ - Close(TRUE); -} - -void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) -{ - wxMessageDialog dialog(this, "List test sample\nJulian Smart (c) 1997", - "About list test", wxOK|wxCANCEL); - - dialog.ShowModal(); -} - -void MyFrame::OnDeselectAll(wxCommandEvent& WXUNUSED(event)) -{ - int n = m_listCtrl->GetItemCount(); - int i; - for(i = 0; i < n; i++) - m_listCtrl->SetItemState(i,0,wxLIST_STATE_SELECTED); -} - -void MyFrame::OnSelectAll(wxCommandEvent& WXUNUSED(event)) -{ - int n = m_listCtrl->GetItemCount(); - int i; - for(i = 0; i < n; i++) - m_listCtrl->SetItemState(i,wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); -} - -void MyFrame::OnListView(wxCommandEvent& WXUNUSED(event)) -{ - m_logWindow->Clear(); - m_listCtrl->DeleteAllItems(); - m_listCtrl->SetSingleStyle(wxLC_LIST); - m_listCtrl->SetImageList((wxImageList *) NULL, wxIMAGE_LIST_NORMAL); - m_listCtrl->SetImageList((wxImageList *) NULL, wxIMAGE_LIST_SMALL); - - for ( int i=0; i < 30; i++) - { - char buf[20]; - sprintf(buf, "Item %d", i); - long tmp = m_listCtrl->InsertItem(i, buf); - } -} - -void MyFrame::OnReportView(wxCommandEvent& WXUNUSED(event)) -{ - m_logWindow->Clear(); - m_listCtrl->DeleteAllItems(); - m_listCtrl->SetSingleStyle(wxLC_REPORT); - m_listCtrl->SetImageList((wxImageList *) NULL, wxIMAGE_LIST_NORMAL); - m_listCtrl->SetImageList(wxGetApp().m_imageListSmall, wxIMAGE_LIST_SMALL); - - m_listCtrl->InsertColumn(0, "Column 1", wxLIST_FORMAT_LEFT, 140); - m_listCtrl->InsertColumn(1, "Column 2", wxLIST_FORMAT_LEFT, 140); - - for ( int i=0; i < 30; i++) - { - char buf[20]; - sprintf(buf, "Item %d, col 1", i); - long tmp = m_listCtrl->InsertItem(i, buf, 0); - - sprintf(buf, "Item %d, col 2", i); - tmp = m_listCtrl->SetItem(i, 1, buf); - } -} - -void MyFrame::OnIconView(wxCommandEvent& WXUNUSED(event)) -{ - m_logWindow->Clear(); - m_listCtrl->DeleteAllItems(); - m_listCtrl->SetSingleStyle(wxLC_ICON); - m_listCtrl->SetImageList(wxGetApp().m_imageListNormal, wxIMAGE_LIST_NORMAL); - m_listCtrl->SetImageList(wxGetApp().m_imageListSmall, wxIMAGE_LIST_SMALL); - - for ( int i=0; i < 9; i++) - { - long tmp = m_listCtrl->InsertItem(i, i); - } -} - -void MyFrame::OnIconTextView(wxCommandEvent& WXUNUSED(event)) -{ - m_logWindow->Clear(); - m_listCtrl->DeleteAllItems(); - m_listCtrl->SetSingleStyle(wxLC_ICON); - m_listCtrl->SetImageList(wxGetApp().m_imageListNormal, wxIMAGE_LIST_NORMAL); - m_listCtrl->SetImageList(wxGetApp().m_imageListSmall, wxIMAGE_LIST_SMALL); - - for ( int i=0; i < 9; i++) - { - char buf[20]; - sprintf(buf, "Label %d", i); - long tmp = m_listCtrl->InsertItem(i, buf, i); - } -} - -void MyFrame::OnSmallIconView(wxCommandEvent& WXUNUSED(event)) -{ - m_logWindow->Clear(); - m_listCtrl->DeleteAllItems(); - m_listCtrl->SetSingleStyle(wxLC_SMALL_ICON); - m_listCtrl->SetImageList(wxGetApp().m_imageListNormal, wxIMAGE_LIST_NORMAL); - m_listCtrl->SetImageList(wxGetApp().m_imageListSmall, wxIMAGE_LIST_SMALL); - - for ( int i=0; i < 9; i++) - { - long tmp = m_listCtrl->InsertItem(i, 0); - } -} - -void MyFrame::OnSmallIconTextView(wxCommandEvent& WXUNUSED(event)) -{ - m_logWindow->Clear(); - m_listCtrl->DeleteAllItems(); - m_listCtrl->SetSingleStyle(wxLC_SMALL_ICON); - m_listCtrl->SetImageList(wxGetApp().m_imageListNormal, wxIMAGE_LIST_NORMAL); - m_listCtrl->SetImageList(wxGetApp().m_imageListSmall, wxIMAGE_LIST_SMALL); - - for ( int i=0; i < 9; i++) - { - long tmp = m_listCtrl->InsertItem(i, "Label", 0); - } -} - -// MyListCtrl - -void MyListCtrl::OnBeginDrag(wxListEvent& event) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnBeginDrag\n"; - str.flush(); -#endif -} - -void MyListCtrl::OnBeginRDrag(wxListEvent& event) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnBeginRDrag\n"; - str.flush(); -#endif -} - -void MyListCtrl::OnBeginLabelEdit(wxListEvent& event) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnBeginLabelEdit\n"; - str.flush(); -#endif -} - -void MyListCtrl::OnEndLabelEdit(wxListEvent& event) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnEndLabelEdit\n"; - str.flush(); -#endif -} - -void MyListCtrl::OnDeleteItem(wxListEvent& event) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnDeleteItem\n"; - str.flush(); -#endif -} - -void MyListCtrl::OnGetInfo(wxListEvent& event) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnGetInfo (" << event.m_item.m_itemId << ", " << event.m_item.m_col << ")"; - if ( event.m_item.m_mask & wxLIST_MASK_STATE ) - str << " wxLIST_MASK_STATE"; - if ( event.m_item.m_mask & wxLIST_MASK_TEXT ) - str << " wxLIST_MASK_TEXT"; - if ( event.m_item.m_mask & wxLIST_MASK_IMAGE ) - str << " wxLIST_MASK_IMAGE"; - if ( event.m_item.m_mask & wxLIST_MASK_DATA ) - str << " wxLIST_MASK_DATA"; - if ( event.m_item.m_mask & wxLIST_SET_ITEM ) - str << " wxLIST_SET_ITEM"; - if ( event.m_item.m_mask & wxLIST_MASK_WIDTH ) - str << " wxLIST_MASK_WIDTH"; - if ( event.m_item.m_mask & wxLIST_MASK_FORMAT ) - str << " wxLIST_MASK_WIDTH"; - - if ( event.m_item.m_mask & wxLIST_MASK_TEXT ) - { - event.m_item.m_text = "My callback text"; - } - str << "\n"; - str.flush(); -#endif -} - -void MyListCtrl::OnSetInfo(wxListEvent& event) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnSetInfo\n"; - str.flush(); -#endif -} - -void MyListCtrl::OnSelected(wxListEvent& event) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnSelected\n"; - str.flush(); -#endif -} - -void MyListCtrl::OnDeselected(wxListEvent& event) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnDeselected\n"; - str.flush(); -#endif -} - -void MyListCtrl::OnKeyDown(wxListEvent& event) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnKeyDown\n"; - str.flush(); -#endif -} - diff --git a/samples/listctrl/listtest.def b/samples/listctrl/listtest.def deleted file mode 100644 index 2559d6f1bc..0000000000 --- a/samples/listctrl/listtest.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME ListCtrl -DESCRIPTION 'ListCtrl wxWindows application' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 8192 diff --git a/samples/listctrl/listtest.h b/samples/listctrl/listtest.h deleted file mode 100644 index b303d90559..0000000000 --- a/samples/listctrl/listtest.h +++ /dev/null @@ -1,84 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: listctrl.h -// Purpose: wxListCtrl sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -// Define a new application type -class MyApp: public wxApp -{ public: - bool OnInit(void); - - wxImageList *m_imageListNormal; - wxImageList *m_imageListSmall; -}; - -class MyListCtrl: public wxListCtrl -{ -public: - MyListCtrl(wxWindow *parent, const wxWindowID id, const wxPoint& pos, - const wxSize& size, long style): - wxListCtrl(parent, id, pos, size, style) - { - } - - void OnBeginDrag(wxListEvent& event); - void OnBeginRDrag(wxListEvent& event); - void OnBeginLabelEdit(wxListEvent& event); - void OnEndLabelEdit(wxListEvent& event); - void OnDeleteItem(wxListEvent& event); - void OnGetInfo(wxListEvent& event); - void OnSetInfo(wxListEvent& event); - void OnSelected(wxListEvent& event); - void OnDeselected(wxListEvent& event); - void OnKeyDown(wxListEvent& event); - - DECLARE_EVENT_TABLE() -}; - -// Define a new frame type -class MyFrame: public wxFrame -{ public: - MyListCtrl *m_listCtrl; - wxTextCtrl *m_logWindow; - - MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h); - ~MyFrame(void); - - public: - void OnQuit(wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); - void OnListView(wxCommandEvent& event); - void OnReportView(wxCommandEvent& event); - void OnIconView(wxCommandEvent& event); - void OnIconTextView(wxCommandEvent& event); - void OnSmallIconView(wxCommandEvent& event); - void OnSmallIconTextView(wxCommandEvent& event); - bool OnClose(void) { return TRUE; } - void OnDeselectAll(wxCommandEvent& event); - void OnSelectAll(wxCommandEvent& event); - - DECLARE_EVENT_TABLE() -}; - - -// ID for the menu quit command -#define LIST_QUIT 1 -#define LIST_LIST_VIEW 2 -#define LIST_ICON_VIEW 3 -#define LIST_ICON_TEXT_VIEW 4 -#define LIST_SMALL_ICON_VIEW 5 -#define LIST_SMALL_ICON_TEXT_VIEW 6 -#define LIST_REPORT_VIEW 7 -#define LIST_DESELECT_ALL 8 -#define LIST_SELECT_ALL 9 -#define LIST_ABOUT 102 - -#define LIST_CTRL 1000 - - diff --git a/samples/listctrl/listtest.rc b/samples/listctrl/listtest.rc deleted file mode 100644 index d40633cba9..0000000000 --- a/samples/listctrl/listtest.rc +++ /dev/null @@ -1,16 +0,0 @@ -aaaa ICON "mondrian.ico" -mondrian ICON "mondrian.ico" -#include "wx/msw/wx.rc" - -icon1 ICON "bitmaps\\toolbrai.ico" -icon2 ICON "bitmaps\\toolchar.ico" -icon3 ICON "bitmaps\\toolchec.ico" -icon4 ICON "bitmaps\\tooldata.ico" -icon5 ICON "bitmaps\\toolgame.ico" -icon6 ICON "bitmaps\\toolnote.ico" -icon7 ICON "bitmaps\\tooltime.ico" -icon8 ICON "bitmaps\\tooltodo.ico" -icon9 ICON "bitmaps\\toolword.ico" - -iconsmall ICON "bitmaps\\small1.ico" - diff --git a/samples/listctrl/makefile.b32 b/samples/listctrl/makefile.b32 deleted file mode 100644 index 2218343eb0..0000000000 --- a/samples/listctrl/makefile.b32 +++ /dev/null @@ -1,63 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds listtest example (DOS). - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 - -TARGET=listtest - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = listtest.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -listtest.obj: listtest.$(SRCSUFF) - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - diff --git a/samples/listctrl/makefile.dos b/samples/listctrl/makefile.dos deleted file mode 100644 index 5b65a93c36..0000000000 --- a/samples/listctrl/makefile.dos +++ /dev/null @@ -1,81 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds minimal example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\minimal -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml - -!ifndef FINAL -FINAL=0 -!endif - -INC=/I$(WXDIR)\include\msw /I$(WXDIR)\include\base - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!if "$(FINAL)" == "0" -CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC) -LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:512 -!else -CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC) -LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:512 -!endif - -HEADERS = -SOURCES = minimal.$(SRCSUFF) -OBJECTS = minimal.obj - -all: minimal.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -minimal.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) minimal.obj minimal.def minimal.res - link $(LINKFLAGS) @<< -minimal.obj $(WXDIR)\src\msw\dummy.obj, -minimal, -NUL, -$(LIBS), -minimal.def -; -<< - rc -30 -K minimal.res - -minimal.obj: minimal.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -minimal.res : minimal.rc $(WXDIR)\include\msw\wx.rc - rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw minimal - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/listctrl/makefile.g95 b/samples/listctrl/makefile.g95 deleted file mode 100644 index 92ff4c4c09..0000000000 --- a/samples/listctrl/makefile.g95 +++ /dev/null @@ -1,37 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for listtest example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/listtest.$(OBJSUFF) $(OBJDIR)/listtest_resources.$(OBJSUFF) - -all: $(OBJDIR) listtest$(GUISUFFIX)$(EXESUFF) - -wx: - -$(OBJDIR): - mkdir $(OBJDIR) - -listtest$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o listtest$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/listtest.$(OBJSUFF): listtest.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ listtest.$(SRCSUFF) - -$(OBJDIR)/listtest_resources.o: listtest.rc - $(RESCOMP) -i listtest.rc -o $(OBJDIR)/listtest_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) listtest$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/listctrl/makefile.nt b/samples/listctrl/makefile.nt deleted file mode 100644 index 20f661061c..0000000000 --- a/samples/listctrl/makefile.nt +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds wxListCtrl example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\listctrl -PROGRAM=listtest - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(PROGRAM).h $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/listctrl/mondrian.ico b/samples/listctrl/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/samples/listctrl/mondrian.ico and /dev/null differ diff --git a/samples/listctrl/mondrian.xpm b/samples/listctrl/mondrian.xpm deleted file mode 100644 index 409f27a843..0000000000 --- a/samples/listctrl/mondrian.xpm +++ /dev/null @@ -1,44 +0,0 @@ -/* XPM */ -static char *mondrian_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 6 1", -" c Black", -". c Blue", -"X c #00bf00", -"o c Red", -"O c Yellow", -"+ c Gray100", -/* pixels */ -" ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" " -}; diff --git a/samples/makefile.g95 b/samples/makefile.g95 deleted file mode 100644 index 0bd2895579..0000000000 --- a/samples/makefile.g95 +++ /dev/null @@ -1,66 +0,0 @@ -# -# File: makefile.g95 -# Author: Julian Smart -# Created: 1997 -# Updated: -# Copyright: -# -# "%W% %G%" -# -# Makefile : Builds samples for Win95, GnuWin32 -# info - -# Set WXDIR for your system -WXDIR = .. - -THISDIR=$(WXDIR)/samples - -all: - cd $(WXDIR)/samples/splitter; make -f makefile.g95 - cd $(WXDIR)/samples/resource; make -f makefile.g95 - cd $(WXDIR)/samples/controls; make -f makefile.g95 - cd $(WXDIR)/samples/listctrl; make -f makefile.g95 - cd $(WXDIR)/samples/treectrl; make -f makefile.g95 - cd $(WXDIR)/samples/validate; make -f makefile.g95 - cd $(WXDIR)/samples/mdi; make -f makefile.g95 - cd $(WXDIR)/samples/minimal; make -f makefile.g95 - cd $(WXDIR)/samples/layout; make -f makefile.g95 - cd $(WXDIR)/samples/printing; make -f makefile.g95 - cd $(WXDIR)/samples/toolbar; make -f makefile.g95 - cd $(WXDIR)/samples/dialogs; make -f makefile.g95 - cd $(WXDIR)/samples/docview; make -f makefile.g95 - cd $(WXDIR)/samples/controls; make -f makefile.g95 - cd $(WXDIR)/samples/nativdlg; make -f makefile.g95 - cd $(WXDIR)/samples/grid; make -f makefile.g95 - cd $(WXDIR)/samples/internat; make -f makefile.g95 - cd $(WXDIR)/samples/checklst; make -f makefile.g95 - cd $(WXDIR)/samples/dnd; make -f makefile.g95 - cd $(WXDIR)/samples/ownerdrw; make -f makefile.g95 - cd $(WXDIR)/samples/joytest; make -f makefile.g95 - cd $(WXDIR)/samples/regtest; make -f makefile.g95 - cd $(WXDIR)/samples/memcheck; make -f makefile.g95 - -clean: - cd $(WXDIR)/samples/splitter; make -f makefile.g95 clean - cd $(WXDIR)/samples/mdi; make -f makefile.g95 clean - cd $(WXDIR)/samples/minimal; make -f makefile.g95 clean - cd $(WXDIR)/samples/layout; make -f makefile.g95 clean - cd $(WXDIR)/samples/printing; make -f makefile.g95 clean - cd $(WXDIR)/samples/toolbar; make -f makefile.g95 clean - cd $(WXDIR)/samples/dialogs; make -f makefile.g95 clean - cd $(WXDIR)/samples/resource; make -f makefile.g95 clean - cd $(WXDIR)/samples/listctrl; make -f makefile.g95 clean - cd $(WXDIR)/samples/treectrl; make -f makefile.g95 clean - cd $(WXDIR)/samples/validate; make -f makefile.g95 clean - cd $(WXDIR)/samples/docview; make -f makefile.g95 clean - cd $(WXDIR)/samples/controls; make -f makefile.g95 clean - cd $(WXDIR)/samples/nativdlg; make -f makefile.g95 clean - cd $(WXDIR)/samples/grid; make -f makefile.g95 clean - cd $(WXDIR)/samples/internat; make -f makefile.g95 clean - cd $(WXDIR)/samples/checklst; make -f makefile.g95 clean - cd $(WXDIR)/samples/dnd; make -f makefile.g95 clean - cd $(WXDIR)/samples/ownerdrw; make -f makefile.g95 clean - cd $(WXDIR)/samples/regtest; make -f makefile.g95 clean - cd $(WXDIR)/samples/joytest; make -f makefile.g95 clean - cd $(WXDIR)/samples/memcheck; make -f makefile.g95 clean - diff --git a/samples/makefile.nt b/samples/makefile.nt deleted file mode 100644 index 53a9de13f9..0000000000 --- a/samples/makefile.nt +++ /dev/null @@ -1,161 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds samples for Win95, MSVC++ 4.0 -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -THISDIR=$(WXDIR)\samples - -!include $(WXDIR)\src\ntwxwin.mak - -DEBUG_FLAGS="/Zi /FR" -LINK_DEBUG_FLAGS="/RELEASE" - -all: - cd $(WXDIR)\samples\splitter - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\resource - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\controls - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\listctrl - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\treectrl - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\validate - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\mdi - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\minimal - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\layout - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\printing - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\toolbar - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\dialogs - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\docview - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\controls - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\nativdlg - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\grid - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\internat - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\dnd - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\joytest - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\taskbar - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\memcheck - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\regtest - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\ownerdrw - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\samples\checklst - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\samples\hello -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\samples\fractal -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\samples\ipc -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\samples\wxpoem -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\samples\types -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\samples\pressup -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\samples\bombs -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\samples\animate -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\samples\panel -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\samples\odbc -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - -clean: - cd $(WXDIR)\samples\splitter - nmake -f makefile.nt clean - cd $(WXDIR)\samples\mdi - nmake -f makefile.nt clean - cd $(WXDIR)\samples\minimal - nmake -f makefile.nt clean - cd $(WXDIR)\samples\layout - nmake -f makefile.nt clean - cd $(WXDIR)\samples\printing - nmake -f makefile.nt clean - cd $(WXDIR)\samples\toolbar - nmake -f makefile.nt clean - cd $(WXDIR)\samples\dialogs - nmake -f makefile.nt clean - cd $(WXDIR)\samples\resource - nmake -f makefile.nt clean - cd $(WXDIR)\samples\listctrl - nmake -f makefile.nt clean - cd $(WXDIR)\samples\treectrl - nmake -f makefile.nt clean - cd $(WXDIR)\samples\validate - nmake -f makefile.nt clean - cd $(WXDIR)\samples\docview - nmake -f makefile.nt clean - cd $(WXDIR)\samples\controls - nmake -f makefile.nt clean - cd $(WXDIR)\samples\nativdlg - nmake -f makefile.nt clean - cd $(WXDIR)\samples\grid - nmake -f makefile.nt clean - cd $(WXDIR)\samples\internat - nmake -f makefile.nt clean - cd $(WXDIR)\samples\checklst - nmake -f makefile.nt clean - cd $(WXDIR)\samples\ownerdrw - nmake -f makefile.nt clean - cd $(WXDIR)\samples\dnd - nmake -f makefile.nt clean - cd $(WXDIR)\samples\joytest - nmake -f makefile.nt clean - cd $(WXDIR)\samples\regtest - nmake -f makefile.nt clean - cd $(WXDIR)\samples\taskbar - nmake -f makefile.nt clean - cd $(WXDIR)\samples\memcheck - nmake -f makefile.nt clean -# cd $(WXDIR)\samples\hello -# nmake -f makefile.nt clean -# cd $(WXDIR)\samples\fractal -# nmake -f makefile.nt clean -# cd $(WXDIR)\samples\ipc -# nmake -f makefile.nt clean -# cd $(WXDIR)\samples\types -# nmake -f makefile.nt clean -# cd $(WXDIR)\samples\pressup -# nmake -f makefile.nt clean -# cd $(WXDIR)\samples\bombs -# nmake -f makefile.nt clean -# cd $(WXDIR)\samples\odbc -# nmake -f makefile.nt clean -# cd $(WXDIR)\samples\animate -# nmake -f makefile.nt clean -# cd $(WXDIR)\samples\panel -# nmake -f makefile.nt clean -# cd $(WXDIR)\samples\wxpoem -# nmake -f makefile.nt clean - diff --git a/samples/mdi/.cvsignore b/samples/mdi/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/mdi/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/mdi/Makefile b/samples/mdi/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/mdi/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/mdi/Makefile.in b/samples/mdi/Makefile.in deleted file mode 100644 index c5b3853e3b..0000000000 --- a/samples/mdi/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# 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 diff --git a/samples/mdi/bitmaps/abacus.bmp b/samples/mdi/bitmaps/abacus.bmp deleted file mode 100644 index 49bfa2a84e..0000000000 Binary files a/samples/mdi/bitmaps/abacus.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/bitmap1.bmp b/samples/mdi/bitmaps/bitmap1.bmp deleted file mode 100644 index 13e2170b73..0000000000 Binary files a/samples/mdi/bitmaps/bitmap1.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/bitmap2.bmp b/samples/mdi/bitmaps/bitmap2.bmp deleted file mode 100644 index 3d523b2de9..0000000000 Binary files a/samples/mdi/bitmaps/bitmap2.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/brush.bmp b/samples/mdi/bitmaps/brush.bmp deleted file mode 100644 index 0bf4ac5527..0000000000 Binary files a/samples/mdi/bitmaps/brush.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/calc.bmp b/samples/mdi/bitmaps/calc.bmp deleted file mode 100644 index 6eee9cce8c..0000000000 Binary files a/samples/mdi/bitmaps/calc.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/chart.bmp b/samples/mdi/bitmaps/chart.bmp deleted file mode 100644 index 54218089a9..0000000000 Binary files a/samples/mdi/bitmaps/chart.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/colour.bmp b/samples/mdi/bitmaps/colour.bmp deleted file mode 100644 index b4ffd72550..0000000000 Binary files a/samples/mdi/bitmaps/colour.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/copy.bmp b/samples/mdi/bitmaps/copy.bmp deleted file mode 100644 index 4551a06bfa..0000000000 Binary files a/samples/mdi/bitmaps/copy.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/copy.xpm b/samples/mdi/bitmaps/copy.xpm deleted file mode 100644 index 47565c1cae..0000000000 --- a/samples/mdi/bitmaps/copy.xpm +++ /dev/null @@ -1,25 +0,0 @@ -/* XPM */ -static char *copy_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 4 1", -" c None", -". c Black", -"X c Gray100", -"o c #000080", -/* pixels */ -" ", -" ...... ", -" .XXXX.. ", -" .XXXX.X. ", -" .X..X.oooooo ", -" .XXXXXoXXXXoo ", -" .X....oXXXXoXo ", -" .XXXXXoX..Xoooo", -" .X....oXXXXXXXo", -" .XXXXXoX.....Xo", -" ......oXXXXXXXo", -" oX.....Xo", -" oXXXXXXXo", -" ooooooooo", -" " -}; diff --git a/samples/mdi/bitmaps/cut.bmp b/samples/mdi/bitmaps/cut.bmp deleted file mode 100644 index 15554338a0..0000000000 Binary files a/samples/mdi/bitmaps/cut.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/cut.xpm b/samples/mdi/bitmaps/cut.xpm deleted file mode 100644 index bfe7e95cea..0000000000 --- a/samples/mdi/bitmaps/cut.xpm +++ /dev/null @@ -1,24 +0,0 @@ -/* XPM */ -static char *cut_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 3 1", -" c None", -". c Black", -"X c #000080", -/* pixels */ -" ", -" . . ", -" . . ", -" . . ", -" .. .. ", -" . . ", -" ... ", -" . ", -" X.X ", -" X XXX ", -" XXX X X ", -" X X X X ", -" X X X X ", -" X X XX ", -" XX " -}; diff --git a/samples/mdi/bitmaps/dirplain.xbm b/samples/mdi/bitmaps/dirplain.xbm deleted file mode 100644 index e2c2f08af1..0000000000 --- a/samples/mdi/bitmaps/dirplain.xbm +++ /dev/null @@ -1,14 +0,0 @@ -#define dirplain_width 32 -#define dirplain_height 32 -static char dirplain_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x04, - 0xfc, 0xff, 0xff, 0x1f, 0x02, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x60, - 0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60, - 0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60, - 0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60, - 0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60, - 0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60, - 0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60, - 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f}; diff --git a/samples/mdi/bitmaps/draft.xbm b/samples/mdi/bitmaps/draft.xbm deleted file mode 100644 index 34d8f79dd6..0000000000 --- a/samples/mdi/bitmaps/draft.xbm +++ /dev/null @@ -1,14 +0,0 @@ -#define draft_width 32 -#define draft_height 32 -static char draft_bits[] = { - 0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x20, 0x02, 0x00, - 0x00, 0x10, 0x04, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x04, 0x10, 0x00, - 0x00, 0x02, 0x20, 0x00, 0x00, 0x01, 0x40, 0x00, 0x80, 0x00, 0x80, 0x18, - 0x40, 0x00, 0x00, 0x3d, 0x20, 0x00, 0x00, 0x76, 0x10, 0x00, 0x00, 0xeb, - 0xe8, 0xff, 0xff, 0xd5, 0x44, 0x00, 0xc0, 0x6a, 0x82, 0x00, 0x60, 0x35, - 0x01, 0xf1, 0xb1, 0x5a, 0x02, 0x22, 0xfc, 0x8d, 0x04, 0x44, 0x02, 0x47, - 0x08, 0x08, 0x01, 0x22, 0x10, 0x90, 0x0c, 0x14, 0x20, 0x80, 0x13, 0x08, - 0x40, 0x70, 0xfe, 0xf1, 0x80, 0x40, 0x0c, 0xe0, 0x00, 0xb1, 0x00, 0xe0, - 0x00, 0x5b, 0x01, 0xe0, 0x00, 0xaf, 0x06, 0xe0, 0x00, 0x57, 0xfb, 0xe7, - 0x00, 0xaf, 0x11, 0xf8, 0x00, 0xde, 0x08, 0xe0, 0x00, 0x7c, 0x04, 0x00, - 0x00, 0xf8, 0x02, 0x00, 0x00, 0xf0, 0x01, 0x00}; diff --git a/samples/mdi/bitmaps/drawing.xbm b/samples/mdi/bitmaps/drawing.xbm deleted file mode 100644 index e5393d41f4..0000000000 --- a/samples/mdi/bitmaps/drawing.xbm +++ /dev/null @@ -1,14 +0,0 @@ -#define drawing_width 32 -#define drawing_height 32 -static char drawing_bits[] = { - 0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x20, 0x02, 0x00, - 0x00, 0x10, 0x04, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x04, 0x10, 0x00, - 0x00, 0x82, 0x20, 0x00, 0x00, 0xc1, 0x41, 0x00, 0x80, 0xa0, 0x82, 0x00, - 0x40, 0x90, 0x04, 0x01, 0x20, 0x88, 0x08, 0x02, 0x10, 0x84, 0x10, 0x04, - 0x08, 0x42, 0x21, 0x08, 0x04, 0x21, 0x22, 0x10, 0x02, 0x11, 0xfc, 0x20, - 0x11, 0x09, 0x02, 0x41, 0x0a, 0x05, 0x01, 0x82, 0x04, 0x83, 0x0c, 0x44, - 0x08, 0x81, 0x13, 0x28, 0x10, 0x72, 0xfe, 0xf1, 0x20, 0x44, 0x0c, 0xe0, - 0x40, 0x88, 0x00, 0xe0, 0x80, 0x10, 0x01, 0xe0, 0x00, 0xa1, 0x06, 0xe0, - 0x00, 0x42, 0xf8, 0xe7, 0x00, 0x04, 0x40, 0xf8, 0x00, 0x08, 0x20, 0xe0, - 0x00, 0x10, 0x10, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x40, 0x04, 0x00, - 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00}; diff --git a/samples/mdi/bitmaps/files.bmp b/samples/mdi/bitmaps/files.bmp deleted file mode 100644 index 877e24afc7..0000000000 Binary files a/samples/mdi/bitmaps/files.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/flowchar.xbm b/samples/mdi/bitmaps/flowchar.xbm deleted file mode 100644 index d75217af18..0000000000 --- a/samples/mdi/bitmaps/flowchar.xbm +++ /dev/null @@ -1,14 +0,0 @@ -#define flowchart_width 32 -#define flowchart_height 32 -static char flowchart_bits[] = { - 0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x20, 0x02, 0x00, - 0x00, 0x10, 0x04, 0x00, 0x00, 0x88, 0x08, 0x00, 0x00, 0x44, 0x11, 0x00, - 0x00, 0x22, 0x22, 0x00, 0x00, 0x11, 0x44, 0x00, 0x80, 0x08, 0x82, 0x00, - 0x40, 0x10, 0x01, 0x01, 0x20, 0xaa, 0x00, 0x02, 0x10, 0x45, 0x00, 0x04, - 0x88, 0x08, 0x00, 0x08, 0x44, 0x10, 0x00, 0x10, 0x22, 0x08, 0xfc, 0x20, - 0x41, 0x04, 0x02, 0x41, 0x82, 0x02, 0x01, 0x82, 0x04, 0x81, 0x0c, 0x44, - 0x08, 0x81, 0x13, 0x28, 0x10, 0x71, 0xfe, 0xf1, 0xa0, 0x4a, 0x0c, 0xe0, - 0x40, 0x9c, 0x00, 0xe0, 0x80, 0x20, 0x01, 0xe0, 0x00, 0x41, 0x06, 0xe0, - 0x00, 0x82, 0xf8, 0xe7, 0x00, 0x04, 0x41, 0xf8, 0x00, 0x08, 0x22, 0xe0, - 0x00, 0x10, 0x14, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x40, 0x04, 0x00, - 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00}; diff --git a/samples/mdi/bitmaps/help.bmp b/samples/mdi/bitmaps/help.bmp deleted file mode 100644 index 2d9e6922ca..0000000000 Binary files a/samples/mdi/bitmaps/help.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/help.xpm b/samples/mdi/bitmaps/help.xpm deleted file mode 100644 index 50fdb4157e..0000000000 --- a/samples/mdi/bitmaps/help.xpm +++ /dev/null @@ -1,25 +0,0 @@ -/* XPM */ -static char *help_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 4 1", -" c None", -". c Black", -"X c Blue", -"o c #000080", -/* pixels */ -" ", -" ...... ", -" .XXXXX.. ", -" .XX...oX.. ", -" .X.. .X.. ", -" .X.. .XX.. ", -" .. .XX.. ", -" .XX.. ", -" .X.. ", -" .X.. ", -" .o.. ", -" .. ", -" .XX.. ", -" .XX.. ", -" ... " -}; diff --git a/samples/mdi/bitmaps/helpcs.bmp b/samples/mdi/bitmaps/helpcs.bmp deleted file mode 100644 index 8837381681..0000000000 Binary files a/samples/mdi/bitmaps/helpcs.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/magnify.bmp b/samples/mdi/bitmaps/magnify.bmp deleted file mode 100644 index b237b31f8c..0000000000 Binary files a/samples/mdi/bitmaps/magnify.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/mike.bmp b/samples/mdi/bitmaps/mike.bmp deleted file mode 100644 index 0d736190e4..0000000000 Binary files a/samples/mdi/bitmaps/mike.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/new.bmp b/samples/mdi/bitmaps/new.bmp deleted file mode 100644 index d66feb2384..0000000000 Binary files a/samples/mdi/bitmaps/new.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/new.xpm b/samples/mdi/bitmaps/new.xpm deleted file mode 100644 index 754d2d20a2..0000000000 --- a/samples/mdi/bitmaps/new.xpm +++ /dev/null @@ -1,24 +0,0 @@ -/* XPM */ -static char *new_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 3 1", -" c None", -". c Black", -"X c Gray100", -/* pixels */ -" ", -" ........ ", -" .XXXXXX.. ", -" .XXXXXX.X. ", -" .XXXXXX.... ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" ........... ", -" " -}; diff --git a/samples/mdi/bitmaps/open.bmp b/samples/mdi/bitmaps/open.bmp deleted file mode 100644 index bbf93fe033..0000000000 Binary files a/samples/mdi/bitmaps/open.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/open.xpm b/samples/mdi/bitmaps/open.xpm deleted file mode 100644 index 54748e910d..0000000000 --- a/samples/mdi/bitmaps/open.xpm +++ /dev/null @@ -1,26 +0,0 @@ -/* XPM */ -static char *open_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 5 1", -" c None", -". c Black", -"X c Yellow", -"o c Gray100", -"O c #bfbf00", -/* pixels */ -" ", -" ... ", -" . . .", -" ..", -" ... ...", -" .XoX....... ", -" .oXoXoXoXo. ", -" .XoXoXoXoX. ", -" .oXoX..........", -" .XoX.OOOOOOOOO.", -" .oo.OOOOOOOOO. ", -" .X.OOOOOOOOO. ", -" ..OOOOOOOOO. ", -" ........... ", -" " -}; diff --git a/samples/mdi/bitmaps/page.bmp b/samples/mdi/bitmaps/page.bmp deleted file mode 100644 index 3dbd4b05b4..0000000000 Binary files a/samples/mdi/bitmaps/page.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/paste.bmp b/samples/mdi/bitmaps/paste.bmp deleted file mode 100644 index 564f514e0d..0000000000 Binary files a/samples/mdi/bitmaps/paste.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/paste.xpm b/samples/mdi/bitmaps/paste.xpm deleted file mode 100644 index 69177e9b19..0000000000 --- a/samples/mdi/bitmaps/paste.xpm +++ /dev/null @@ -1,27 +0,0 @@ -/* XPM */ -static char *paste_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 6 1", -" c None", -". c Black", -"X c Yellow", -"o c #808080", -"O c #000080", -"+ c Gray100", -/* pixels */ -" ", -" .... ", -" .....XX..... ", -".ooo.X..X.ooo. ", -".oo. .oo. ", -".oo........oo. ", -".oooooooooooo. ", -".oooooOOOOOOO. ", -".oooooO+++++OO ", -".oooooO+++++O+O ", -".oooooO+OOO+OOO ", -".oooooO+++++++O ", -".oooooO+OOOOO+O ", -" .....O+++++++O ", -" OOOOOOOOO " -}; diff --git a/samples/mdi/bitmaps/preview.bmp b/samples/mdi/bitmaps/preview.bmp deleted file mode 100644 index da1f4dbc4b..0000000000 Binary files a/samples/mdi/bitmaps/preview.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/preview.xpm b/samples/mdi/bitmaps/preview.xpm deleted file mode 100644 index 0dfdca46e1..0000000000 --- a/samples/mdi/bitmaps/preview.xpm +++ /dev/null @@ -1,26 +0,0 @@ -/* XPM */ -static char *preview_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 5 1", -" c Black", -". c None", -"X c Gray100", -"o c #808080", -"O c Cyan", -/* pixels */ -" .......", -" XXXXXXX ......", -" XXXXXXX . .....", -" XXXXXXX ....", -" XXXXXXXXXX ....", -" XXXXXXX ....", -" XXXXXX o..o ...", -" XXXXX oOO.oo ..", -" XXXXX .O..o. ..", -" XXXXX ....o. ..", -" XXXXX o..Ooo ..", -" XXXXXX o..o o..", -" XXXXXXX o .", -" XXXXXXXXXX . ", -" .. " -}; diff --git a/samples/mdi/bitmaps/print.bmp b/samples/mdi/bitmaps/print.bmp deleted file mode 100644 index 00319b55bb..0000000000 Binary files a/samples/mdi/bitmaps/print.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/print.xpm b/samples/mdi/bitmaps/print.xpm deleted file mode 100644 index 3c2e2be781..0000000000 --- a/samples/mdi/bitmaps/print.xpm +++ /dev/null @@ -1,26 +0,0 @@ -/* XPM */ -static char *print_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 5 1", -" c None", -". c Black", -"X c Gray100", -"o c #808000", -"O c Yellow", -/* pixels */ -" ", -" ......... ", -" .XXXXXXXX. ", -" .X.....X. ", -" .XXXXXXXX. ", -" .X.....X.... ", -" .XXXXXXXX. . .", -" .......... . ..", -". . . .", -"............. .", -". ooo . . ", -". OOO ... ", -"............. . ", -" . . . ", -" ........... " -}; diff --git a/samples/mdi/bitmaps/save.bmp b/samples/mdi/bitmaps/save.bmp deleted file mode 100644 index 56dd10b6e3..0000000000 Binary files a/samples/mdi/bitmaps/save.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/save.xpm b/samples/mdi/bitmaps/save.xpm deleted file mode 100644 index 01b18f9340..0000000000 --- a/samples/mdi/bitmaps/save.xpm +++ /dev/null @@ -1,25 +0,0 @@ -/* XPM */ -static char *save_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 4 1", -" c None", -". c Black", -"X c #808000", -"o c #808080", -/* pixels */ -" ", -" .............. ", -" .X. . . ", -" .X. ... ", -" .X. .X. ", -" .X. .X. ", -" .X. .X. ", -" .X. .X. ", -" .XX........oX. ", -" .XXXXXXXXXXXX. ", -" .XX.........X. ", -" .XX...... .X. ", -" .XX...... .X. ", -" .XX...... .X. ", -" ............. " -}; diff --git a/samples/mdi/bitmaps/screw.bmp b/samples/mdi/bitmaps/screw.bmp deleted file mode 100644 index 7625c4e6b6..0000000000 Binary files a/samples/mdi/bitmaps/screw.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/shapes.bmp b/samples/mdi/bitmaps/shapes.bmp deleted file mode 100644 index 0e2e2ba043..0000000000 Binary files a/samples/mdi/bitmaps/shapes.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/speaker.bmp b/samples/mdi/bitmaps/speaker.bmp deleted file mode 100644 index a32ec48bba..0000000000 Binary files a/samples/mdi/bitmaps/speaker.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/telephon.bmp b/samples/mdi/bitmaps/telephon.bmp deleted file mode 100644 index 1788be8a72..0000000000 Binary files a/samples/mdi/bitmaps/telephon.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/therm.bmp b/samples/mdi/bitmaps/therm.bmp deleted file mode 100644 index 00971562ed..0000000000 Binary files a/samples/mdi/bitmaps/therm.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/tick.bmp b/samples/mdi/bitmaps/tick.bmp deleted file mode 100644 index c0d66c9460..0000000000 Binary files a/samples/mdi/bitmaps/tick.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/torch.bmp b/samples/mdi/bitmaps/torch.bmp deleted file mode 100644 index f7f235c171..0000000000 Binary files a/samples/mdi/bitmaps/torch.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/wrench.bmp b/samples/mdi/bitmaps/wrench.bmp deleted file mode 100644 index 8062f7d0c3..0000000000 Binary files a/samples/mdi/bitmaps/wrench.bmp and /dev/null differ diff --git a/samples/mdi/bitmaps/write.xbm b/samples/mdi/bitmaps/write.xbm deleted file mode 100644 index 1409e98f1b..0000000000 --- a/samples/mdi/bitmaps/write.xbm +++ /dev/null @@ -1,14 +0,0 @@ -#define write_width 32 -#define write_height 32 -static char write_bits[] = { - 0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x20, 0x02, 0x00, - 0x00, 0x10, 0x04, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x04, 0x10, 0x00, - 0x00, 0x92, 0x20, 0x00, 0x00, 0x49, 0x40, 0x00, 0x80, 0x04, 0x81, 0x00, - 0x40, 0x90, 0x04, 0x01, 0x20, 0x09, 0x02, 0x02, 0x90, 0x20, 0x01, 0x04, - 0x08, 0x92, 0x00, 0x08, 0x24, 0x49, 0x00, 0x10, 0x92, 0x00, 0xfc, 0x20, - 0x49, 0x12, 0x02, 0x41, 0x22, 0x09, 0x01, 0x82, 0x84, 0x84, 0x0c, 0x44, - 0x48, 0x82, 0x13, 0x28, 0x10, 0x79, 0xfe, 0xf1, 0x20, 0x44, 0x0c, 0xe0, - 0x40, 0x82, 0x00, 0xe0, 0x80, 0x00, 0x01, 0xe0, 0x00, 0x01, 0x06, 0xe0, - 0x00, 0x02, 0xf8, 0xe7, 0x00, 0x04, 0x40, 0xf8, 0x00, 0x08, 0x20, 0xe0, - 0x00, 0x10, 0x10, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x40, 0x04, 0x00, - 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00}; diff --git a/samples/mdi/chart.ico b/samples/mdi/chart.ico deleted file mode 100644 index 16d4a585fd..0000000000 Binary files a/samples/mdi/chart.ico and /dev/null differ diff --git a/samples/mdi/makefile.b32 b/samples/mdi/makefile.b32 deleted file mode 100644 index 85fad37374..0000000000 --- a/samples/mdi/makefile.b32 +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.b32 -# Author: Patrick Halke -# Created: 1995 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds 32bit MDI example. - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 - -TARGET=mdi - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = mdi.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -mdi.obj: mdi.$(SRCSUFF) mdi.h - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - - diff --git a/samples/mdi/makefile.bcc b/samples/mdi/makefile.bcc deleted file mode 100644 index 47a053f24b..0000000000 --- a/samples/mdi/makefile.bcc +++ /dev/null @@ -1,75 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds mdi example (DOS). - -!if "$(BCCDIR)" == "" -!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 -!endif - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -!ifndef FINAL -FINAL=0 -!endif - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makebcc.env - -THISDIR = $(WXDIR)\samples\mdi -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) mathwl cwl import -INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw -CFG=$(WXDIR)\src\wxwin.cfg - -!if "$(FINAL)" == "0" -LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -O2 -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -HEADERS = mdi.h -SOURCES = mdi.$(SRCSUFF) -OBJECTS = mdi.obj - -mdi: mdi.exe - -all: mdi.exe - -mdi.exe: $(WXLIB) mdi.obj mdi.def mdi.res - tlink $(LINKFLAGS) @&&! -c0wl.obj mdi.obj -mdi -nul -$(LIBS) -mdi.def -! - rc -30 -K mdi.res - -.$(SRCSUFF).obj: - bcc $(CPPFLAGS) -c {$< } - -mdi.obj: mdi.$(SRCSUFF) - -mdi.res : mdi.rc $(WXDIR)\include\msw\wx.rc - rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa mdi - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws diff --git a/samples/mdi/makefile.dos b/samples/mdi/makefile.dos deleted file mode 100644 index 1bd3983dc8..0000000000 --- a/samples/mdi/makefile.dos +++ /dev/null @@ -1,63 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds mdi example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\mdi -INC=/I$(WXDIR)\include - -HEADERS = mdi.h -SOURCES = mdi.$(SRCSUFF) -OBJECTS = mdi.obj - -all: mdi.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -mdi.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) mdi.obj mdi.def mdi.res - link $(LINKFLAGS) @<< -$(WXDIR)\src\msw\dummy.obj mdi.obj, -mdi, -NUL, -$(LIBS), -mdi.def -; -<< - rc -K mdi.res - -mdi.obj: mdi.h mdi.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -mdi.res : mdi.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include mdi - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/mdi/makefile.g95 b/samples/mdi/makefile.g95 deleted file mode 100644 index 045751ea89..0000000000 --- a/samples/mdi/makefile.g95 +++ /dev/null @@ -1,35 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for mdi example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/mdi.$(OBJSUFF) $(OBJDIR)/mdi_resources.$(OBJSUFF) - -all: $(OBJDIR) mdi.exe - -$(OBJDIR): - mkdir $(OBJDIR) - -mdi.exe: $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o mdi.exe $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/mdi.$(OBJSUFF): mdi.$(SRCSUFF) mdi.h - $(CC) -c $(CPPFLAGS) -o $@ mdi.$(SRCSUFF) - -$(OBJDIR)/mdi_resources.o: mdi.rc - $(RESCOMP) -i mdi.rc -o $(OBJDIR)/mdi_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) mdi$(GUISUFFIX).exe core *.res *.rsc diff --git a/samples/mdi/makefile.nt b/samples/mdi/makefile.nt deleted file mode 100644 index c79a4f8d78..0000000000 --- a/samples/mdi/makefile.nt +++ /dev/null @@ -1,63 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds mdi example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) -WXUSINGDLL=0 - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\mdi -PROGRAM=mdi - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/mdi/makefile.sc b/samples/mdi/makefile.sc deleted file mode 100644 index a90487946a..0000000000 --- a/samples/mdi/makefile.sc +++ /dev/null @@ -1,36 +0,0 @@ -# Symantec C++ makefile for mdi example -# NOTE that peripheral libraries are now dealt in main wxWindows makefile. - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makesc.env - -WXLIB = $(WXDIR)\lib\wx.lib -INCDIR = $(WXDIR)\include -MSWINC = $(INCDIR)\msw -BASEINC = $(INCDIR)\base - -CC=sc -RC=rc -CFLAGS = -o -ml -W -Dwx_msw -LDFLAGS = -ml -W - -INCLUDE=$(BASEINC);$(MSWINC) - -LIBS=$(WXLIB) libw.lib commdlg.lib shell.lib - -.$(SRCSUFF).obj: - *$(CC) -c $(CFLAGS) -I$(INCLUDE) $< - -.rc.res: - *$(RC) -r -I$(INCLUDE) $< - -mdi.exe: mdi.obj mdi.def mdi.res - *$(CC) $(LDFLAGS) -o$@ mdi.obj mdi.def $(LIBS) - *$(RC) -k mdi.res - -clean: - -del *.obj - -del *.exe - -del *.res - -del *.map - -del *.rws diff --git a/samples/mdi/makefile.unx b/samples/mdi/makefile.unx deleted file mode 100644 index 24b30ac061..0000000000 --- a/samples/mdi/makefile.unx +++ /dev/null @@ -1,55 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for mdi example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/make.env - -OBJECTS = $(OBJDIR)/mdi.$(OBJSUFF) - -.SUFFIXES: - -all: $(OBJDIR) mdi$(GUISUFFIX) - -wx: -# cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx -motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK= - -xview: - $(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' - -hp: - $(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' WARN='-w' \ - XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' LDLIBS='$(HPLDLIBS)' - -$(OBJDIR): - mkdir $(OBJDIR) - -mdi$(GUISUFFIX): $(OBJDIR)/mdi.$(OBJSUFF) $(WXLIB) - $(CC) $(LDFLAGS) -o mdi$(GUISUFFIX) $(OBJDIR)/mdi.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS) - -$(OBJDIR)/mdi.$(OBJSUFF): mdi.$(SRCSUFF) mdi.h - $(CC) -c $(CPPFLAGS) -o $@ mdi.$(SRCSUFF) - -clean_motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany - -clean_ol: - $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany - -clean_hp: - $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany - -cleanany: - rm -f $(OBJECTS) mdi$(GUISUFFIX) core diff --git a/samples/mdi/makefile.vms b/samples/mdi/makefile.vms deleted file mode 100644 index 41d193c077..0000000000 --- a/samples/mdi/makefile.vms +++ /dev/null @@ -1,38 +0,0 @@ -#************************************************************************ -# Makefile for MDI under VMS -# by Stefan Hammes -# (incomplete) update history: -# 11.04.95 -#************************************************************************ - -#************************************************************************ -# Definition section -# (cave: definitions and includes must begin with ',') -#************************************************************************ - -APPOPTS = -APPDEFS = -APPINCS = - -#************************************************************************ -# Module section -#************************************************************************ - -# Name of main module -MAIN = mdi - -# Object modules of the application. -OBJS = mdi.obj -OBJLIST =mdi.obj - -.include [--.src]makevms.env - -# main dependency -$(MAIN).exe : $(OBJS) - $(LINK) $(LINKFLAGS) /exec=$(MAIN).exe $(OBJLIST),$(WXLIB)/lib,$(OPTSFILE)/option - - purge *.exe - -#************************************************************************ -# Header file depedencies following -#************************************************************************ - diff --git a/samples/mdi/makefile.wat b/samples/mdi/makefile.wat deleted file mode 100644 index f959acdb52..0000000000 --- a/samples/mdi/makefile.wat +++ /dev/null @@ -1,43 +0,0 @@ -# -# Makefile for WATCOM -# -# Created by D.Chubraev, chubraev@iem.ee.ethz.ch -# 8 Nov 1994 -# - -WXDIR = ..\.. - -!include $(WXDIR)\src\makewat.env - -WXLIB = $(WXDIR)\lib -NAME = mdi -LNK = $(name).lnk -OBJS = $(name).obj - -all: $(name).exe - -$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib - wlink @$(LNK) - $(BINDCOMMAND) $(name).res - -$(name).res : $(name).rc $(WXDIR)\include\msw\wx.rc - $(RC) $(RESFLAGS1) $(name).rc - -$(LNK) : makefile.wat - %create $(LNK) - @%append $(LNK) debug all - @%append $(LNK) system $(LINKOPTION) - @%append $(LNK) $(MINDATA) - @%append $(LNK) $(MAXDATA) - @%append $(LNK) $(STACK) - @%append $(LNK) name $(name) - @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib - @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i - @for %i in ($(OBJS)) do @%append $(LNK) file %i - -thing: .SYMBOLIC - echo $(WATLIBDIR) - -clean: .SYMBOLIC - -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex - diff --git a/samples/mdi/mdi.cpp b/samples/mdi/mdi.cpp deleted file mode 100644 index 94b4fc302b..0000000000 --- a/samples/mdi/mdi.cpp +++ /dev/null @@ -1,358 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: mdi.cpp -// Purpose: MDI sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#include "wx/mdi.h" -#endif - -#include - -#ifdef __WXGTK__ -#include "mondrian.xpm" -#include "bitmaps/new.xpm" -#include "bitmaps/open.xpm" -#include "bitmaps/save.xpm" -#include "bitmaps/copy.xpm" -#include "bitmaps/cut.xpm" -#include "bitmaps/paste.xpm" -#include "bitmaps/print.xpm" -#include "bitmaps/help.xpm" -#endif - - -#include "mdi.h" - -MyFrame *frame = (MyFrame *) NULL; -wxList my_children; - -IMPLEMENT_APP(MyApp) - -// For drawing lines in a canvas -long xpos = -1; -long ypos = -1; - -int winNumber = 1; - -// Initialise this in OnInit, not statically -bool MyApp::OnInit(void) -{ - // Create the main frame window - - frame = new MyFrame((wxFrame *) NULL, -1, (char *) "MDI Demo", wxPoint(0, 0), wxSize(500, 400), - wxDEFAULT_FRAME | wxHSCROLL | wxVSCROLL); - - // Give it an icon (this is ignored in MDI mode: uses resources) -#ifdef __WXMSW__ - frame->SetIcon(wxIcon("mdi_icn")); -#else - frame->SetIcon(wxIcon( mondrian_xpm )); -#endif - - // Make a menubar - wxMenu *file_menu = new wxMenu; - - file_menu->Append(MDI_NEW_WINDOW, "&New window"); - file_menu->Append(MDI_QUIT, "&Exit"); - - wxMenu *help_menu = new wxMenu; - help_menu->Append(MDI_ABOUT, "&About"); - - wxMenuBar *menu_bar = new wxMenuBar; - - menu_bar->Append(file_menu, "&File"); - menu_bar->Append(help_menu, "&Help"); - - // Associate the menu bar with the frame - frame->SetMenuBar(menu_bar); - - frame->CreateStatusBar(); - - frame->Show(TRUE); - - SetTopWindow(frame); - - return TRUE; -} - -BEGIN_EVENT_TABLE(MyFrame, wxMDIParentFrame) - EVT_MENU(MDI_ABOUT, MyFrame::OnAbout) - EVT_MENU(MDI_NEW_WINDOW, MyFrame::OnNewWindow) - EVT_SIZE(MyFrame::OnSize) - EVT_MENU(MDI_QUIT, MyFrame::OnQuit) -END_EVENT_TABLE() - -// Define my frame constructor -MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, - const long style): - wxMDIParentFrame(parent, id, title, pos, size, style) -{ - textWindow = new wxTextCtrl(this, -1, "", wxDefaultPosition, wxDefaultSize, - wxTE_MULTILINE|wxSUNKEN_BORDER); - textWindow->SetValue("A help window"); - - CreateToolBar(wxNO_BORDER|wxTB_FLAT|wxTB_HORIZONTAL); - InitToolBar(GetToolBar()); - -#ifdef __WXMSW__ - // Accelerators - wxAcceleratorEntry entries[3]; - entries[0].Set(wxACCEL_CTRL, (int) 'N', MDI_NEW_WINDOW); - entries[1].Set(wxACCEL_CTRL, (int) 'X', MDI_QUIT); - entries[2].Set(wxACCEL_CTRL, (int) 'A', MDI_ABOUT); - wxAcceleratorTable accel(3, entries); - SetAcceleratorTable(accel); -#endif -} - -void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) ) -{ - Close(TRUE); -} - -void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) -{ - (void)wxMessageBox("wxWindows 2.0 MDI Demo\nAuthor: Julian Smart (c) 1997\nUsage: mdi.exe", "About MDI Demo"); -} - -void MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event) ) -{ - // Make another frame, containing a canvas - MyChild *subframe = new MyChild(frame, "Canvas Frame", wxPoint(-1, -1), wxSize(-1, -1), - wxDEFAULT_FRAME); - - wxString title; - title.Printf("Canvas Frame %d", winNumber); - subframe->SetTitle(title); - winNumber ++; - - // Give it an icon -#ifdef __WXMSW__ - subframe->SetIcon(wxIcon("chrt_icn")); -#endif - - // Make a menubar - wxMenu *file_menu = new wxMenu; - - file_menu->Append(MDI_NEW_WINDOW, "&New window"); - file_menu->Append(MDI_CHILD_QUIT, "&Close child"); - file_menu->Append(MDI_QUIT, "&Exit"); - - wxMenu *option_menu = new wxMenu; - - // Dummy option - option_menu->Append(MDI_REFRESH, "&Refresh picture"); - - wxMenu *help_menu = new wxMenu; - help_menu->Append(MDI_ABOUT, "&About"); - - wxMenuBar *menu_bar = new wxMenuBar; - - menu_bar->Append(file_menu, "&File"); - menu_bar->Append(option_menu, "&Options"); - menu_bar->Append(help_menu, "&Help"); - - // Associate the menu bar with the frame - subframe->SetMenuBar(menu_bar); - - int width, height; - subframe->GetClientSize(&width, &height); - MyCanvas *canvas = new MyCanvas(subframe, wxPoint(0, 0), wxSize(width, height)); - canvas->SetCursor(wxCursor(wxCURSOR_PENCIL)); - subframe->canvas = canvas; - - // Give it scrollbars - canvas->SetScrollbars(20, 20, 50, 50); - - subframe->Show(TRUE); -} - -BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow) - EVT_MOUSE_EVENTS(MyCanvas::OnEvent) -END_EVENT_TABLE() - -// Define a constructor for my canvas -MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size): - wxScrolledWindow(parent, -1, pos, size, wxSUNKEN_BORDER) -{ -} - -// Define the repainting behaviour -void MyCanvas::OnDraw(wxDC& dc) -{ - dc.SetFont(*wxSWISS_FONT); - dc.SetPen(*wxGREEN_PEN); - dc.DrawLine(0, 0, 200, 200); - dc.DrawLine(200, 0, 0, 200); - - dc.SetBrush(*wxCYAN_BRUSH); - dc.SetPen(*wxRED_PEN); - dc.DrawRectangle(100, 100, 100, 50); - dc.DrawRoundedRectangle(150, 150, 100, 50, 20); - - dc.DrawEllipse(250, 250, 100, 50); - dc.DrawSpline(50, 200, 50, 100, 200, 10); - dc.DrawLine(50, 230, 200, 230); - dc.DrawText("This is a test string", 50, 230); - - wxPoint points[3]; - points[0].x = 200; points[0].y = 300; - points[1].x = 100; points[1].y = 400; - points[2].x = 300; points[2].y = 400; - - dc.DrawPolygon(3, points); -} - -// This implements a tiny doodling program! Drag the mouse using -// the left button. -void MyCanvas::OnEvent(wxMouseEvent& event) -{ - wxClientDC dc(this); - PrepareDC(dc); - - wxPoint pt(event.GetLogicalPosition(dc)); - - if (xpos > -1 && ypos > -1 && event.Dragging()) - { - dc.SetPen(*wxBLACK_PEN); - dc.DrawLine(xpos, ypos, pt.x, pt.y); - } - xpos = pt.x; - ypos = pt.y; -} - -// Define the behaviour for the frame closing -// - must delete all frames except for the main one. -bool MyFrame::OnClose(void) -{ - // Must delete children - wxNode *node = my_children.First(); - while (node) - { - MyChild *child = (MyChild *)node->Data(); - wxNode *next = node->Next(); - child->OnClose(); - delete child; - node = next; - } - return TRUE; -} - -void MyFrame::OnSize(wxSizeEvent& WXUNUSED(event) ) -{ - int w, h; - GetClientSize(&w, &h); - - textWindow->SetSize(0, 0, 200, h); - GetClientWindow()->SetSize(200, 0, w - 200, h); -} - -// Note that MDI_NEW_WINDOW and MDI_ABOUT commands get passed -// to the parent window for processing, so no need to -// duplicate event handlers here. - -BEGIN_EVENT_TABLE(MyChild, wxMDIChildFrame) - EVT_MENU(MDI_CHILD_QUIT, MyChild::OnQuit) -END_EVENT_TABLE() - -MyChild::MyChild(wxMDIParentFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, -const long style): - wxMDIChildFrame(parent, -1, title, pos, size, style) -{ - canvas = (MyCanvas *) NULL; - my_children.Append(this); -} - -MyChild::~MyChild(void) -{ - my_children.DeleteObject(this); -} - -void MyChild::OnQuit(wxCommandEvent& WXUNUSED(event)) -{ - Close(TRUE); -} - -void MyChild::OnActivate(wxActivateEvent& event) -{ - if (event.GetActive() && canvas) - canvas->SetFocus(); -} - -bool MyChild::OnClose(void) -{ - return TRUE; -} - -void MyFrame::InitToolBar(wxToolBar* toolBar) -{ - wxBitmap* bitmaps[8]; - -#ifdef __WXMSW__ - bitmaps[0] = new wxBitmap("icon1", wxBITMAP_TYPE_RESOURCE); - bitmaps[1] = new wxBitmap("icon2", wxBITMAP_TYPE_RESOURCE); - bitmaps[2] = new wxBitmap("icon3", wxBITMAP_TYPE_RESOURCE); - bitmaps[3] = new wxBitmap("icon4", wxBITMAP_TYPE_RESOURCE); - bitmaps[4] = new wxBitmap("icon5", wxBITMAP_TYPE_RESOURCE); - bitmaps[5] = new wxBitmap("icon6", wxBITMAP_TYPE_RESOURCE); - bitmaps[6] = new wxBitmap("icon7", wxBITMAP_TYPE_RESOURCE); - bitmaps[7] = new wxBitmap("icon8", wxBITMAP_TYPE_RESOURCE); -#else - bitmaps[0] = new wxBitmap( new_xpm ); - bitmaps[1] = new wxBitmap( open_xpm ); - bitmaps[2] = new wxBitmap( save_xpm ); - bitmaps[3] = new wxBitmap( copy_xpm ); - bitmaps[4] = new wxBitmap( cut_xpm ); - bitmaps[5] = new wxBitmap( paste_xpm ); - bitmaps[6] = new wxBitmap( print_xpm ); - bitmaps[7] = new wxBitmap( help_xpm ); -#endif - -#ifdef __WXMSW__ - int width = 24; -#else - int width = 16; -#endif - int currentX = 5; - - toolBar->AddTool(0, *(bitmaps[0]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "New file"); - currentX += width + 5; - toolBar->AddTool(1, *bitmaps[1], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Open file"); - currentX += width + 5; - toolBar->AddTool(2, *bitmaps[2], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Save file"); - currentX += width + 5; - toolBar->AddSeparator(); - toolBar->AddTool(3, *bitmaps[3], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Copy"); - currentX += width + 5; - toolBar->AddTool(4, *bitmaps[4], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Cut"); - currentX += width + 5; - toolBar->AddTool(5, *bitmaps[5], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Paste"); - currentX += width + 5; - toolBar->AddSeparator(); - toolBar->AddTool(6, *bitmaps[6], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Print"); - currentX += width + 5; - toolBar->AddSeparator(); - toolBar->AddTool(7, *bitmaps[7], wxNullBitmap, TRUE, currentX, -1, (wxObject *) NULL, "Help"); - - toolBar->Realize(); - - int i; - for (i = 0; i < 8; i++) - delete bitmaps[i]; -} - diff --git a/samples/mdi/mdi.def b/samples/mdi/mdi.def deleted file mode 100644 index 1d2353702e..0000000000 --- a/samples/mdi/mdi.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME Mdi -DESCRIPTION 'MDI/SDI Test Program' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 6000 -STACKSIZE 48000 diff --git a/samples/mdi/mdi.h b/samples/mdi/mdi.h deleted file mode 100644 index 7415c60585..0000000000 --- a/samples/mdi/mdi.h +++ /dev/null @@ -1,67 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: mdi.cpp -// Purpose: MDI sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#include - -// Define a new application -class MyApp: public wxApp -{ - public: - bool OnInit(void); -}; - -class MyCanvas: public wxScrolledWindow -{ - public: - MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size); - virtual void OnDraw(wxDC& dc); - void OnEvent(wxMouseEvent& event); - - DECLARE_EVENT_TABLE() -}; - -// Define a new frame -class MyFrame: public wxMDIParentFrame -{ - public: - wxTextCtrl *textWindow; - - MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, const long style); - - void InitToolBar(wxToolBar* toolBar); - - bool OnClose(void); - void OnSize(wxSizeEvent& event); - void OnAbout(wxCommandEvent& event); - void OnNewWindow(wxCommandEvent& event); - void OnQuit(wxCommandEvent& event); - -DECLARE_EVENT_TABLE() -}; - -class MyChild: public wxMDIChildFrame -{ - public: - MyCanvas *canvas; - MyChild(wxMDIParentFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style); - ~MyChild(void); - bool OnClose(void); - void OnActivate(wxActivateEvent& event); - void OnQuit(wxCommandEvent& event); - -DECLARE_EVENT_TABLE() -}; - -#define MDI_QUIT 1 -#define MDI_NEW_WINDOW 2 -#define MDI_REFRESH 3 -#define MDI_CHILD_QUIT 4 -#define MDI_ABOUT 5 diff --git a/samples/mdi/mdi.ico b/samples/mdi/mdi.ico deleted file mode 100644 index 2dc1bde40c..0000000000 Binary files a/samples/mdi/mdi.ico and /dev/null differ diff --git a/samples/mdi/mdi.rc b/samples/mdi/mdi.rc deleted file mode 100644 index 173542b99b..0000000000 --- a/samples/mdi/mdi.rc +++ /dev/null @@ -1,24 +0,0 @@ -aaaa ICON "mondrian.ico" - -/* Useful if PROVIDE_DEFAULT_ICONS is set in wx_setup.h */ -#define IHaveMDIParentIcon -#define IHaveMDIChildIcon - -wxSTD_MDIPARENTFRAME ICON "mondrian.ico" -wxSTD_MDICHILDFRAME ICON "chart.ico" - -mdi_icn ICON "mondrian.ico" -chrt_icn ICON "chart.ico" - -icon1 BITMAP "bitmaps/new.bmp" -icon2 BITMAP "bitmaps/open.bmp" -icon3 BITMAP "bitmaps/save.bmp" -icon4 BITMAP "bitmaps/copy.bmp" -icon5 BITMAP "bitmaps/cut.bmp" -icon6 BITMAP "bitmaps/paste.bmp" -icon7 BITMAP "bitmaps/print.bmp" - -icon8 BITMAP "bitmaps/help.bmp" - -#include "wx/msw/wx.rc" - diff --git a/samples/mdi/mondrian.ico b/samples/mdi/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/samples/mdi/mondrian.ico and /dev/null differ diff --git a/samples/mdi/mondrian.xpm b/samples/mdi/mondrian.xpm deleted file mode 100644 index 409f27a843..0000000000 --- a/samples/mdi/mondrian.xpm +++ /dev/null @@ -1,44 +0,0 @@ -/* XPM */ -static char *mondrian_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 6 1", -" c Black", -". c Blue", -"X c #00bf00", -"o c Red", -"O c Yellow", -"+ c Gray100", -/* pixels */ -" ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" " -}; diff --git a/samples/memcheck/.cvsignore b/samples/memcheck/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/memcheck/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/memcheck/Makefile b/samples/memcheck/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/memcheck/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/memcheck/Makefile.in b/samples/memcheck/Makefile.in deleted file mode 100644 index 35bce0cea8..0000000000 --- a/samples/memcheck/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# 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 diff --git a/samples/memcheck/makefile.b32 b/samples/memcheck/makefile.b32 deleted file mode 100644 index 9c079154ca..0000000000 --- a/samples/memcheck/makefile.b32 +++ /dev/null @@ -1,65 +0,0 @@ -# -# File: makefile.b32 -# Author: Patrick Halke -# Created: 1995 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds 32bit buttonbar example. - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXINC = $(WXDIR)\include\wx -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 - -TARGET=memcheck - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = memcheck.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -memcheck.obj: memcheck.$(SRCSUFF) - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - - diff --git a/samples/memcheck/makefile.bcc b/samples/memcheck/makefile.bcc deleted file mode 100644 index bd2517826c..0000000000 --- a/samples/memcheck/makefile.bcc +++ /dev/null @@ -1,77 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds memcheck example (DOS). - -!if "$(BCCDIR)" == "" -!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 -!endif - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makebcc.env - -THISDIR = $(WXDIR)\samples\memcheck -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) mathwl cwl import -INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw -CFG=$(WXDIR)\src\wxwin.cfg - -!ifndef FINAL -FINAL=0 -!endif - -!ifndef DEBUG -DEBUG=0 -!endif - -!if "$(FINAL)" == "0" -LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -DDEBUG=$(DEBUG) -!else -LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -O2 -DEBUG_FLAGS= -DDEBUG=$(DEBUG) -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = memcheck.obj - -memcheck: memcheck.exe - -all: memcheck.exe - -memcheck.exe: $(WXLIB) memcheck.obj memcheck.def memcheck.res - tlink $(LINKFLAGS) @&&! -c0wl.obj memcheck.obj -memcheck -nul -$(LIBS) -memcheck.def -! - rc -31 -K memcheck.res - -.$(SRCSUFF).obj: - bcc $(CPPFLAGS) -c {$< } - -memcheck.obj: memcheck.$(SRCSUFF) - -memcheck.res : memcheck.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\wx memcheck - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws diff --git a/samples/memcheck/makefile.dos b/samples/memcheck/makefile.dos deleted file mode 100644 index e3f1acfaf4..0000000000 --- a/samples/memcheck/makefile.dos +++ /dev/null @@ -1,87 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds memcheck example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\memcheck -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml - -!ifndef FINAL -FINAL=0 -!endif - -!ifndef DEBUG -DEBUG=0 -!endif - -INC=/I$(WXDIR)\include\msw /I$(WXDIR)\include\base - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!if "$(FINAL)" == "0" -CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /DDEBUG=$(DEBUG) /G2sw /Od /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC) -CPPFLAGS2=/AL /W3 /Zi $(ZOPTION) /DDEBUG /G2sw /Od /Dwx_msw $(INC) -LINKFLAGS=/NOD /CO /ONERROR:NOEXE /NOE /SEG:512 -!else -CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H /DDEBUG=$(DEBUG) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC) -CPPFLAGS2=/AL /W3 /G2sw /Ox /DDEBUG /Dwx_msw $(INC) -LINKFLAGS=/NOD /ONERROR:NOEXE /NOE /SEG:512 -!endif - -HEADERS = -SOURCES = memcheck.$(SRCSUFF) -OBJECTS = memcheck.obj - -all: memcheck.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -memcheck.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) memcheck.def memcheck.res - link $(LINKFLAGS) @<< -$(OBJECTS) $(WXDIR)\src\msw\dummy.obj, -memcheck, -NUL, -$(LIBS), -memcheck.def -; -<< - rc -30 -K memcheck.res - -memcheck.obj: memcheck.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -memcheck.res : memcheck.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include\wx memcheck - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/memcheck/makefile.g95 b/samples/memcheck/makefile.g95 deleted file mode 100644 index 08f1d7f262..0000000000 --- a/samples/memcheck/makefile.g95 +++ /dev/null @@ -1,38 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for minimal example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/memcheck.$(OBJSUFF) $(OBJDIR)/memcheck_resources.$(OBJSUFF) - -all: $(OBJDIR) memcheck$(GUISUFFIX)$(EXESUFF) - -wx: - -$(OBJDIR): - mkdir $(OBJDIR) - -memcheck$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o memcheck$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - $(RSRC) memcheck.$(RESSUFF) memcheck.exe - -$(OBJDIR)/memcheck.$(OBJSUFF): memcheck.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ memcheck.$(SRCSUFF) - -$(OBJDIR)/memcheck_resources.o: memcheck.rc - $(RESCOMP) -i memcheck.rc -o $(OBJDIR)/memcheck_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) memcheck$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/memcheck/makefile.nt b/samples/memcheck/makefile.nt deleted file mode 100644 index b7e8851d20..0000000000 --- a/samples/memcheck/makefile.nt +++ /dev/null @@ -1,62 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds memcheck example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\memcheck -PROGRAM=memcheck - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.sbr - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb diff --git a/samples/memcheck/makefile.unx b/samples/memcheck/makefile.unx deleted file mode 100644 index 8dd50b9c44..0000000000 --- a/samples/memcheck/makefile.unx +++ /dev/null @@ -1,62 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for memcheck example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/make.env - -OBJECTS = $(OBJDIR)/memcheck.$(OBJSUFF) - -.SUFFIXES: - -all: $(OBJDIR) memcheck$(GUISUFFIX) - -wxmotif: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' WXLIB=$(WXDIR)/lib/libwx_motif.a OPTIONS='$(OPTIONS)'\ - DEBUG='$(DEBUG)' DEBUGFLAGS='$(DEBUGFLAGS)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK= - - -motif: wxmotif - $(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' WXLIB=$(WXDIR)/lib/libwx_motif.a OPTIONS='$(OPTIONS)'\ - DEBUG='$(DEBUG)' DEBUGFLAGS='$(DEBUGFLAGS)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK= - -xview: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview - $(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)'\ - DEBUG='$(DEBUG)' DEBUGFLAGS='$(DEBUGFLAGS)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' - -hp: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx hp - $(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' DEBUGFLAGS='' WARN='-w' \ - XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' LDLIBS='$(HPLDLIBS)' - -$(OBJDIR): - mkdir $(OBJDIR) - -memcheck$(GUISUFFIX): $(OBJDIR)/memcheck.$(OBJSUFF) $(WXLIB) - $(CC) $(LDFLAGS) -o memcheck$(GUISUFFIX) $(OBJDIR)/memcheck.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS) - -$(OBJDIR)/memcheck.$(OBJSUFF): memcheck.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ memcheck.$(SRCSUFF) - -clean_motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany - -clean_ol: - $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany - -clean_hp: - $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany - -cleanany: - rm -f $(OBJECTS) memcheck$(GUISUFFIX) core diff --git a/samples/memcheck/makefile.wat b/samples/memcheck/makefile.wat deleted file mode 100644 index f8048794b5..0000000000 --- a/samples/memcheck/makefile.wat +++ /dev/null @@ -1,43 +0,0 @@ -# -# Makefile for WATCOM -# -# Created by D.Chubraev, chubraev@iem.ee.ethz.ch -# 8 Nov 1994 -# - -WXDIR = ..\.. - -!include $(WXDIR)\src\makewat.env - -WXLIB = $(WXDIR)\lib -NAME = memcheck -LNK = $(name).lnk -OBJS = $(name).obj - -all: $(name).exe - -$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib - wlink @$(LNK) - $(BINDCOMMAND) $(name).res - -$(name).res : $(name).rc $(WXDIR)\include\wx\msw\wx.rc - $(RC) $(RESFLAGS1) $(name).rc - -$(LNK) : makefile.wat - %create $(LNK) - @%append $(LNK) debug all - @%append $(LNK) system $(LINKOPTION) - @%append $(LNK) $(MINDATA) - @%append $(LNK) $(MAXDATA) - @%append $(LNK) $(STACK) - @%append $(LNK) name $(name) - @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib - @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i - @for %i in ($(OBJS)) do @%append $(LNK) file %i - -thing: .SYMBOLIC - echo $(WATLIBDIR) - -clean: .SYMBOLIC - -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex - diff --git a/samples/memcheck/memcheck.cpp b/samples/memcheck/memcheck.cpp deleted file mode 100644 index 713fd131d1..0000000000 --- a/samples/memcheck/memcheck.cpp +++ /dev/null @@ -1,123 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: memcheck.cpp -// Purpose: Memory-checking sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#pragma interface -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "wx/date.h" - -#ifdef __WXGTK__ -#include "mondrian.xpm" -#endif - -#if !WXDEBUG -#error You must set WXDEBUG to 1 on the 'make' command line (MSW) or with configure (GTK) -#endif - -// #define new WXDEBUG_NEW - -// Define a new application type -class MyApp: public wxApp -{ public: - bool OnInit(void); -}; - -// Define a new frame type -class MyFrame: public wxFrame -{ public: - MyFrame(wxFrame *parent); - void OnQuit(wxCommandEvent& event); - -DECLARE_EVENT_TABLE() -}; - -IMPLEMENT_APP(MyApp) - -// `Main program' equivalent, creating windows and returning main app frame -bool MyApp::OnInit(void) -{ - // Create the main frame window - MyFrame *frame = new MyFrame((wxFrame *) NULL); - - // Give it an icon -#ifdef wx_msw - frame->SetIcon(wxIcon("mondrian")); - frame->SetIcon(wxIcon(mondrian_xpm)); -#endif - - // Make a menubar - wxMenu *file_menu = new wxMenu; - - file_menu->Append(wxID_EXIT, "E&xit"); - wxMenuBar *menu_bar = new wxMenuBar; - menu_bar->Append(file_menu, "File"); - frame->SetMenuBar(menu_bar); - - // Make a panel with a message - wxPanel *panel = new wxPanel(frame); - - (void)new wxStaticText(panel, -1, "Hello, this is a minimal debugging wxWindows program!", wxPoint(10, 10)); - - // Show the frame - frame->Show(TRUE); - - wxDebugContext::SetCheckpoint(); - wxDebugContext::SetFile("debug.log"); - - wxString *thing = new wxString; // WXDEBUG_NEW wxString; - wxDate* date = new wxDate; - - // Proves that defining 'new' to be 'WXDEBUG_NEW' doesn't mess up - // non-object allocation - char *ordinaryNonObject = new char[1000]; - - const char *data = (const char*) thing ; - - wxDebugContext::PrintClasses(); - wxDebugContext::Dump(); - wxDebugContext::PrintStatistics(); - - // Don't delete these two objects, to force wxApp to flag a memory leak. -// delete thing; -// delete date; -// delete[] ordinaryNonObject; - - return TRUE; -} - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(wxID_EXIT, MyFrame::OnQuit) -END_EVENT_TABLE() - -// My frame constructor -MyFrame::MyFrame(wxFrame *parent): - wxFrame(parent, -1, "MemCheck wxWindows Sample", wxPoint(-1, -1), wxSize(400, 200)) -{} - -// Intercept menu commands -void MyFrame::OnQuit(wxCommandEvent& event) -{ - Close(TRUE); -} - diff --git a/samples/memcheck/memcheck.def b/samples/memcheck/memcheck.def deleted file mode 100644 index 4986704cdd..0000000000 --- a/samples/memcheck/memcheck.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME Memcheck -DESCRIPTION 'Memcheck wxWindows application' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 8192 diff --git a/samples/memcheck/memcheck.rc b/samples/memcheck/memcheck.rc deleted file mode 100644 index 7655c62a4c..0000000000 --- a/samples/memcheck/memcheck.rc +++ /dev/null @@ -1,3 +0,0 @@ -mondrian ICON "mondrian.ico" -#include "wx/msw/wx.rc" - diff --git a/samples/memcheck/mondrian.ico b/samples/memcheck/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/samples/memcheck/mondrian.ico and /dev/null differ diff --git a/samples/memcheck/mondrian.xpm b/samples/memcheck/mondrian.xpm deleted file mode 100644 index 409f27a843..0000000000 --- a/samples/memcheck/mondrian.xpm +++ /dev/null @@ -1,44 +0,0 @@ -/* XPM */ -static char *mondrian_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 6 1", -" c Black", -". c Blue", -"X c #00bf00", -"o c Red", -"O c Yellow", -"+ c Gray100", -/* pixels */ -" ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" " -}; diff --git a/samples/mfc/makefile.b32 b/samples/mfc/makefile.b32 deleted file mode 100644 index 9f0993827d..0000000000 --- a/samples/mfc/makefile.b32 +++ /dev/null @@ -1,71 +0,0 @@ -# -# File: makefile.bcc -# Author: Andre Beltman -# Created: 1995 -# Updated: -# Copyright: (c) 1995, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds mfc example (DOS). - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXINC = $(WXDIR)\include\msw -WXBASESRC = $(WXDIR)\src\base -WXBASEINC = $(WXDIR)\include\base -WXLIB = $(WXLIBDIR)\wx32.lib -FAFALIB = $(WXLIBDIR)\fafa.lib -ITSYLIB = $(WXLIBDIR)\itsy.lib -XPMLIB = $(WXLIBDIR)\xpm.lib -DIBLIB = $(WXLIBDIR)\dib.lib -GAUGELIB = $(WXLIBDIR)\gauge.lib -WXTREELIB = $(WXLIBDIR)\wxtree.lib -RCPARSERLIB = $(WXLIBDIR)\rcparser.lib -PROLOGLIB = $(WXLIBDIR)\prologio.lib -LIBS=$(WXLIB) cw32 import32 ctl3d32 $(FAFALIB) $(ITSYLIB) $(DIBLIB)\ - $(XPMLIB) $(PROLOGLIB) $(RCPARSERLIB) $(GAUGELIB) $(WXTREELIB) - -TARGET=hello - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = hello.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -hello.obj: hello.$(SRCSUFF) - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa $(TARGET) - -clean: - -erase *.obj *.exe *.res *.map *.rws - diff --git a/samples/mfc/makefile.bcc b/samples/mfc/makefile.bcc deleted file mode 100644 index 6e2059d571..0000000000 --- a/samples/mfc/makefile.bcc +++ /dev/null @@ -1,76 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds mfc example (DOS). - -!if "$(BCCDIR)" == "" -!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 -!endif - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makebcc.env - -THISDIR = $(WXDIR)\samples\mfc -WXLIB = $(WXDIR)\lib\wx.lib - -LIBS=$(WXLIB) mathwl cwl import -INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw -CFG=$(WXDIR)\src\wxwin.cfg - -!ifndef FINAL -FINAL=0 -!endif - -!if "$(FINAL)" == "0" -LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -O2 -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -HEADERS = hello.h -SOURCES = hello.$(SRCSUFF) -OBJECTS = hello.obj - -hello: hello.exe - -all: hello.exe - -hello.exe: $(WXLIB) hello.obj hello.def hello.res - tlink $(LINKFLAGS) @&&! -c0wl.obj hello.obj -hello -nul -$(LIBS) -hello.def -! - rc -30 -K hello.res - -.$(SRCSUFF).obj: - bcc $(CPPFLAGS) -c {$< } - -hello.obj: hello.$(SRCSUFF) - -hello.res : hello.rc $(WXDIR)\include\msw\wx.rc - rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa hello - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws diff --git a/samples/mfc/makefile.dos b/samples/mfc/makefile.dos deleted file mode 100644 index 93934fd12a..0000000000 --- a/samples/mfc/makefile.dos +++ /dev/null @@ -1,89 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds MFC compatibility example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info. - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\mfc -WXLIB = $(WXDIR)\lib\wx.lib -MFCINC = c:\msvc\mfc\include -LIBS=lafxcwD $(WXLIB) oldnames libw llibcew commdlg ddeml shell mmsystem # mfcoleui compobj storage ole2 ole2disp -#LIBS=lafxcwD llibcew libw commdlg shell -INC=-I$(MFCINC) -I$(WXDIR)\include\base -I$(WXDIR)\include\msw -DUMMY=$(WXDIR)\src\msw\dummy.obj - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!ifndef FINAL -FINAL=0 -!endif - -PRECOMP = # /YuWX_PREC.H /Fp$(WXDIR)\src\msw\wx.pch - -!if "$(FINAL)" == "0" -CPPFLAGS=/D_DEBUG /AL /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) $(PRECOMP) /Dwx_msw -#CPPFLAGS=/AL /Zp /GA /G2 /Gyf /Od /W3 $(INC) /D_DEBUG -LINKFLAGS=/NOD /CO /NOE /ONERROR:NOEXE /SEG:256 /STACK:12000 -!else -CPPFLAGS=/AL /W3 /G2sw $(INC) /Ox $(PRECOMP) /Dwx_msw -LINKFLAGS=/NOD /NOE /ONERROR:NOEXE /SEG:256 -!endif - -HEADERS = hello.h -SOURCES = hello.$(SRCSUFF) -OBJECTS = hello.obj - -hello: hello.exe - -all: wx hello.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -hello.exe: $(DUMMY) $(WXLIB) hello.obj hello.def hello.res - link $(LINKFLAGS) @<< -$(DUMMY) hello.obj, -hello, -NUL, -$(LIBS), -hello.def -; -<< - rc -31 -K hello.res - -hello.obj: hello.h hello.$(SRCSUFF) $(DUMMY) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -hello.res : hello.rc $(WXDIR)\include\msw\wx.rc - rc -r /i$(MFCINC) /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa hello - -clean: - -erase *.obj - -erase *.sbr - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb diff --git a/samples/mfc/makefile.nt b/samples/mfc/makefile.nt deleted file mode 100644 index 3564096b50..0000000000 --- a/samples/mfc/makefile.nt +++ /dev/null @@ -1,66 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds MFC/wxWin example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -EXTRALIBS=# mfc42.lib -EXTRAINC=-Ig:\DevStudio\mfc\include -EXTRAFLAGS=/D_AFXDLL - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\mfc -PROGRAM=mfctest - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).h $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - -clean: - -erase *.obj - -erase *.sbr - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb - diff --git a/samples/mfc/makefile.wat b/samples/mfc/makefile.wat deleted file mode 100644 index 0958ed9530..0000000000 --- a/samples/mfc/makefile.wat +++ /dev/null @@ -1,47 +0,0 @@ -# -# Makefile for WATCOM -# -# Created by D.Chubraev, chubraev@iem.ee.ethz.ch -# 8 Nov 1994 -# - -WXDIR = ..\.. - -!include $(WXDIR)\src\makewat.env - -WXLIB = $(WXDIR)\lib -NAME = hello -LNK = $(name).lnk -OBJS = $(name).obj - -# Required for multi-threaded MFC apps -EXTRACPPFLAGS = -bm -oaxt-zp4-ei-xs-zo-w3-bm-bt=nt -d_WINDOWS -d_MBCS -refmain = _wstart2_ - - -PRECOMP= - -all: $(name).exe - -$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib - wlink @$(LNK) - $(BINDCOMMAND) -d_MBCS $(name).res - -$(name).res : $(name).rc $(WXDIR)\include\msw\wx.rc - $(RC) $(RESFLAGS1) $(name).rc - -$(LNK) : makefile.wat - %create $(LNK) - @%append $(LNK) debug all - @%append $(LNK) system $(LINKOPTION) - @%append $(LNK) $(MINDATA) - @%append $(LNK) $(MAXDATA) - @%append $(LNK) $(STACK) - @%append $(LNK) name $(name) - @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib - @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i - @for %i in ($(OBJS)) do @%append $(LNK) file %i - -clean: .SYMBOLIC - -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex - diff --git a/samples/mfc/mfctest.cpp b/samples/mfc/mfctest.cpp deleted file mode 100644 index cbbcd343c2..0000000000 --- a/samples/mfc/mfctest.cpp +++ /dev/null @@ -1,408 +0,0 @@ -// hello.cpp : Defines the class behaviors for the application. -// Hello is a simple program which consists of a main window -// and an "About" dialog which can be invoked by a menu choice. -// It is intended to serve as a starting-point for new -// applications. -// -// This is a part of the Microsoft Foundation Classes C++ library. -// Copyright (C) 1992 Microsoft Corporation -// All rights reserved. -// -// This source code is only intended as a supplement to the -// Microsoft Foundation Classes Reference and Microsoft -// WinHelp documentation provided with the library. -// See these sources for detailed information regarding the -// Microsoft Foundation Classes product. - -// *** MODIFIED BY JULIAN SMART TO DEMONSTRATE CO-EXISTANCE WITH wxWINDOWS *** -// -// This sample pops up an initial wxWindows frame, with a menu item -// that allows a new MFC window to be created. Note that CDummyWindow -// is a class that allows a wxWindows window to be seen as a CWnd -// for the purposes of specifying a valid main window to the -// MFC initialisation. -// -// You can easily modify this code so that an MFC window pops up -// initially as the main frame, and allows wxWindows frames to be -// created subsequently: -// -// (1) Make MyApp::OnInit return NULL, not create a window. -// (2) Restore the MFC code to create a window in InitInstance, and remove -// creation of CDummyWindow. -// -// IMPORTANT NOTE: to compile this sample, you must first edit -// wx/src/msw/wx_main.cc, set NOWINMAIN to 1, and remake wxWindows -// (it only needs to recompile wx_main.cc). -// This eliminates the duplicate WinMain function which MFC implements. - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#ifdef new -#undef new -#endif - -#include "stdafx.h" - -#ifdef DrawText -#undef DrawText -#endif - -#include "resource.h" - -#include "mfctest.h" - -#include "wx/wx.h" - -///////////////////////////////////////////////////////////////////////////// - -// theApp: -// Just creating this application object runs the whole application. -// -CTheApp theApp; - -// wxWindows elements - -// Define a new application type -class MyApp: public wxApp -{ public: - bool OnInit(void); - wxFrame *CreateFrame(void); - }; - -DECLARE_APP(MyApp) - -class MyCanvas: public wxScrolledWindow -{ - public: - MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size); - void OnPaint(wxPaintEvent& event); - void OnMouseEvent(wxMouseEvent& event); -DECLARE_EVENT_TABLE() -}; - -class MyChild: public wxFrame -{ - public: - MyCanvas *canvas; - MyChild(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, const long style); - ~MyChild(void); - Bool OnClose(void); - - void OnQuit(wxCommandEvent& event); - void OnNew(wxCommandEvent& event); - void OnActivate(wxActivateEvent& event); - -DECLARE_EVENT_TABLE() -}; - -// For drawing lines in a canvas -long xpos = -1; -long ypos = -1; - -// Initialise this in OnInit, not statically -wxPen *red_pen; -wxFont *small_font; - -// ID for the menu quit command -#define HELLO_QUIT 1 -#define HELLO_NEW 2 - -DECLARE_APP(MyApp) -IMPLEMENT_APP(MyApp) - -///////////////////////////////////////////////////////////////////////////// - -// CMainWindow constructor: -// Create the window with the appropriate style, size, menu, etc. -// -CMainWindow::CMainWindow() -{ - LoadAccelTable( "MainAccelTable" ); - Create( NULL, "Hello Foundation Application", - WS_OVERLAPPEDWINDOW, rectDefault, NULL, "MainMenu" ); -} - -// OnPaint: -// This routine draws the string "Hello, Windows!" in the center of the -// client area. It is called whenever Windows sends a WM_PAINT message. -// Note that creating a CPaintDC automatically does a BeginPaint and -// an EndPaint call is done when it is destroyed at the end of this -// function. CPaintDC's constructor needs the window (this). -// -void CMainWindow::OnPaint() -{ - CString s = "Hello, Windows!"; - CPaintDC dc( this ); - CRect rect; - - GetClientRect( rect ); - dc.SetTextAlign( TA_BASELINE | TA_CENTER ); - dc.SetTextColor( ::GetSysColor( COLOR_WINDOWTEXT ) ); - dc.SetBkMode(TRANSPARENT); - dc.TextOut( ( rect.right / 2 ), ( rect.bottom / 2 ), - s, s.GetLength() ); -} - -// OnAbout: -// This member function is called when a WM_COMMAND message with an -// IDM_ABOUT code is received by the CMainWindow class object. The -// message map below is responsible for this routing. -// -// We create a ClDialog object using the "AboutBox" resource (see -// hello.rc), and invoke it. -// -void CMainWindow::OnAbout() -{ - CDialog about( "AboutBox", this ); - about.DoModal(); -} - -void CMainWindow::OnTest() -{ - wxMessageBox("This is a wxWindows message box.\nWe're about to create a new wxWindows frame.", "wxWindows", wxOK); - wxGetApp().CreateFrame(); -} - -// CMainWindow message map: -// Associate messages with member functions. -// -// It is implied that the ON_WM_PAINT macro expects a member function -// "void OnPaint()". -// -// It is implied that members connected with the ON_COMMAND macro -// receive no arguments and are void of return type, e.g., "void OnAbout()". -// -BEGIN_MESSAGE_MAP( CMainWindow, CFrameWnd ) - //{{AFX_MSG_MAP( CMainWindow ) - ON_WM_PAINT() - ON_COMMAND( IDM_ABOUT, OnAbout ) - ON_COMMAND( IDM_TEST, OnTest ) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CTheApp - -// InitInstance: -// When any CTheApp object is created, this member function is automatically -// called. Any data may be set up at this point. -// -// Also, the main window of the application should be created and shown here. -// Return TRUE if the initialization is successful. -// -BOOL CTheApp::InitInstance() -{ - TRACE( "HELLO WORLD\n" ); - - SetDialogBkColor(); // hook gray dialogs (was default in MFC V1) - - wxEntry((WXHINSTANCE) m_hInstance, (WXHINSTANCE) m_hPrevInstance, m_lpCmdLine, m_nCmdShow, FALSE); - -/* - m_pMainWnd = new CMainWindow(); - m_pMainWnd->ShowWindow( m_nCmdShow ); - m_pMainWnd->UpdateWindow(); -*/ - - if (wxTheApp && wxTheApp->GetTopWindow()) - { - m_pMainWnd = new CDummyWindow((HWND) wxTheApp->GetTopWindow()->GetHWND()); - } - - return TRUE; -} - -int CTheApp::ExitInstance() -{ - wxApp::CleanUp(); - - return CWinApp::ExitInstance(); -} - -// Override this to provide wxWindows message loop -// compatibility - -BOOL CTheApp::PreTranslateMessage(MSG *msg) -{ - if (wxTheApp && wxTheApp->ProcessMessage((WXMSG*) msg)) - return TRUE; - else - return CWinApp::PreTranslateMessage(msg); -} - -BOOL CTheApp::OnIdle(LONG lCount) -{ - if (wxTheApp) - return wxTheApp->ProcessIdle(); - else - return FALSE; -} - -/********************************************************************* - * wxWindows elements - ********************************************************************/ - -bool MyApp::OnInit(void) -{ - // Don't exit app when the top level frame is deleted -// SetExitOnFrameDelete(FALSE); - - // Create a red pen - red_pen = new wxPen("RED", 3, wxSOLID); - - // Create a small font - small_font = new wxFont(10, wxSWISS, wxNORMAL, wxNORMAL); - - wxFrame* frame = CreateFrame(); - return TRUE; -} - -wxFrame *MyApp::CreateFrame(void) -{ - MyChild *subframe = new MyChild(NULL, "Canvas Frame", wxPoint(10, 10), wxSize(300, 300), - wxDEFAULT_FRAME); - - subframe->SetTitle("wxWindows canvas frame"); - - // Give it a status line - subframe->CreateStatusBar(); - - // Make a menubar - wxMenu *file_menu = new wxMenu; - - file_menu->Append(HELLO_NEW, "&New MFC Window"); - file_menu->Append(HELLO_QUIT, "&Close"); - - wxMenuBar *menu_bar = new wxMenuBar; - - menu_bar->Append(file_menu, "&File"); - - // Associate the menu bar with the frame - subframe->SetMenuBar(menu_bar); - - int width, height; - subframe->GetClientSize(&width, &height); - - MyCanvas *canvas = new MyCanvas(subframe, wxPoint(0, 0), wxSize(width, height)); - wxCursor *cursor = new wxCursor(wxCURSOR_PENCIL); - canvas->SetCursor(cursor); - subframe->canvas = canvas; - - // Give it scrollbars -// canvas->SetScrollbars(20, 20, 50, 50, 4, 4); - - subframe->Show(TRUE); - // Return the main frame window - return subframe; -} - -BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow) - EVT_PAINT(MyCanvas::OnPaint) - EVT_MOUSE_EVENTS(MyCanvas::OnMouseEvent) -END_EVENT_TABLE() - -// Define a constructor for my canvas -MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size): - wxScrolledWindow(parent, -1, pos, size) -{ -} - -// Define the repainting behaviour -void MyCanvas::OnPaint(wxPaintEvent& event) -{ - wxPaintDC dc(this); - - dc.SetFont(small_font); - dc.SetPen(wxGREEN_PEN); - dc.DrawLine(0, 0, 200, 200); - dc.DrawLine(200, 0, 0, 200); - - dc.SetBrush(wxCYAN_BRUSH); - dc.SetPen(wxRED_PEN); - dc.DrawRectangle(100, 100, 100, 50); - dc.DrawRoundedRectangle(150, 150, 100, 50, 20); - - dc.DrawEllipse(250, 250, 100, 50); - dc.DrawSpline(50, 200, 50, 100, 200, 10); - dc.DrawLine(50, 230, 200, 230); - dc.DrawText("This is a test string", 50, 230); -} - -// This implements a tiny doodling program! Drag the mouse using -// the left button. -void MyCanvas::OnMouseEvent(wxMouseEvent& event) -{ - wxClientDC dc(this); - dc.SetPen(wxBLACK_PEN); - long x, y; - event.Position(&x, &y); - if (xpos > -1 && ypos > -1 && event.Dragging()) - { - dc.DrawLine(xpos, ypos, x, y); - } - xpos = x; - ypos = y; -} - -BEGIN_EVENT_TABLE(MyChild, wxFrame) - EVT_MENU(HELLO_QUIT, MyChild::OnQuit) - EVT_MENU(HELLO_NEW, MyChild::OnNew) - EVT_ACTIVATE(MyChild::OnActivate) -END_EVENT_TABLE() - -MyChild::MyChild(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, const long style): - wxFrame(frame, -1, title, pos, size, style) -{ - canvas = NULL; -} - -MyChild::~MyChild(void) -{ -} - -void MyChild::OnQuit(wxCommandEvent& event) -{ - Close(TRUE); -} - -void MyChild::OnNew(wxCommandEvent& event) -{ - CMainWindow *mainWin = new CMainWindow(); - mainWin->ShowWindow( TRUE ); - mainWin->UpdateWindow(); -} - -void MyChild::OnActivate(wxActivateEvent& event) -{ - if (event.GetActive() && canvas) - canvas->SetFocus(); -} - -Bool MyChild::OnClose(void) -{ - return TRUE; -} - - -// Dummy MFC window for specifying a valid main window to MFC, using -// a wxWindows HWND. -CDummyWindow::CDummyWindow(HWND hWnd):CWnd() -{ - Attach(hWnd); -} - -// Don't let the CWnd destructor delete the HWND -CDummyWindow::~CDummyWindow(void) -{ - Detach(); -} - diff --git a/samples/mfc/mfctest.def b/samples/mfc/mfctest.def deleted file mode 100644 index 7c741d1059..0000000000 --- a/samples/mfc/mfctest.def +++ /dev/null @@ -1,21 +0,0 @@ -; hello.def : Declares the module parameters for the application. -; -; This is a part of the Microsoft Foundation Classes C++ library. -; Copyright (C) 1992 Microsoft Corporation -; All rights reserved. -; -; This source code is only intended as a supplement to the -; Microsoft Foundation Classes Reference and Microsoft -; WinHelp documentation provided with the library. -; See these sources for detailed information regarding the -; Microsoft Foundation Classes product. - -NAME Hello -DESCRIPTION 'Hello Microsoft Foundation Classes Windows Application' - -EXETYPE WINDOWS - -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE - -HEAPSIZE 1024 diff --git a/samples/mfc/mfctest.h b/samples/mfc/mfctest.h deleted file mode 100644 index 038a08cad2..0000000000 --- a/samples/mfc/mfctest.h +++ /dev/null @@ -1,66 +0,0 @@ -// hello.h : Declares the class interfaces for the application. -// Hello is a simple program which consists of a main window -// and an "About" dialog which can be invoked by a menu choice. -// It is intended to serve as a starting-point for new -// applications. -// -// This is a part of the Microsoft Foundation Classes C++ library. -// Copyright (C) 1992 Microsoft Corporation -// All rights reserved. -// -// This source code is only intended as a supplement to the -// Microsoft Foundation Classes Reference and Microsoft -// WinHelp documentation provided with the library. -// See these sources for detailed information regarding the -// Microsoft Foundation Classes product. - -#ifndef __MFCTEST_H__ -#define __MFCTEST_H__ - -///////////////////////////////////////////////////////////////////////////// - -// CMainWindow: -// See hello.cpp for the code to the member functions and the message map. -// -class CMainWindow : public CFrameWnd -{ -public: - CMainWindow(); - - //{{AFX_MSG( CMainWindow ) - afx_msg void OnPaint(); - afx_msg void OnAbout(); - afx_msg void OnTest(); - //}}AFX_MSG - - DECLARE_MESSAGE_MAP() -}; - -// A dummy CWnd pointing to a wxWindow's HWND -class CDummyWindow: public CWnd -{ - public: - CDummyWindow(HWND hWnd); - ~CDummyWindow(void); -}; - -///////////////////////////////////////////////////////////////////////////// - -// CTheApp: -// See hello.cpp for the code to the InitInstance member function. -// -class CTheApp : public CWinApp -{ -public: - BOOL InitInstance(); - int ExitInstance(); - - // Override this to provide wxWindows message loop - // compatibility - BOOL PreTranslateMessage(MSG *msg); - BOOL OnIdle(LONG lCount); -}; - -///////////////////////////////////////////////////////////////////////////// - -#endif // __MFCTEST_H__ diff --git a/samples/mfc/mfctest.ico b/samples/mfc/mfctest.ico deleted file mode 100644 index 331b675b63..0000000000 Binary files a/samples/mfc/mfctest.ico and /dev/null differ diff --git a/samples/mfc/mfctest.rc b/samples/mfc/mfctest.rc deleted file mode 100644 index 7c5da8b070..0000000000 --- a/samples/mfc/mfctest.rc +++ /dev/null @@ -1,108 +0,0 @@ -//Microsoft App Studio generated resource script. -// -#include "wx/msw/wx.rc" -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - - -///////////////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - - -////////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -AFX_IDI_STD_FRAME ICON DISCARDABLE "MFCTEST.ICO" - -////////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -MAINMENU MENU DISCARDABLE -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&Test wxWindows", IDM_TEST - END - POPUP "&Help" - BEGIN - MENUITEM "&About Hello...\tF1", IDM_ABOUT - END -END - - -////////////////////////////////////////////////////////////////////////////// -// -// Accelerator -// - -MAINACCELTABLE ACCELERATORS MOVEABLE PURE -BEGIN - VK_F1, IDM_ABOUT, VIRTKEY -END - - -////////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -ABOUTBOX DIALOG DISCARDABLE 34, 22, 144, 75 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About Hello" -FONT 8, "Helv" -BEGIN - CTEXT "Microsoft Windows",IDC_STATIC,0,5,144,8 - CTEXT "Microsoft Foundation Classes",IDC_STATIC,0,14,144,8 - CTEXT "Hello, Windows!",IDC_STATIC,0,23,144,8 - CTEXT "Version 2.0",IDC_STATIC,0,36,144,8 - DEFPUSHBUTTON "OK",IDOK,56,53,32,14,WS_GROUP -END - -#ifdef APSTUDIO_INVOKED -////////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -///////////////////////////////////////////////////////////////////////////////////// -#endif // APSTUDIO_INVOKED - - -#ifndef APSTUDIO_INVOKED -//////////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/samples/mfc/resource.h b/samples/mfc/resource.h deleted file mode 100644 index e20ad76cbb..0000000000 --- a/samples/mfc/resource.h +++ /dev/null @@ -1,18 +0,0 @@ -//{{NO_DEPENDENCIES}} -// App Studio generated include file. -// Used by HELLO.RC -// -#define IDM_ABOUT 100 -#define IDM_TEST 101 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS - -#define _APS_NEXT_RESOURCE_VALUE 110 -#define _APS_NEXT_COMMAND_VALUE 32768 -#define _APS_NEXT_CONTROL_VALUE 1000 -#define _APS_NEXT_SYMED_VALUE 112 -#endif -#endif diff --git a/samples/mfc/stdafx.h b/samples/mfc/stdafx.h deleted file mode 100644 index 5b9f153634..0000000000 --- a/samples/mfc/stdafx.h +++ /dev/null @@ -1,12 +0,0 @@ -// This is a part of the Microsoft Foundation Classes C++ library. -// Copyright (C) 1992 Microsoft Corporation -// All rights reserved. -// -// This source code is only intended as a supplement to the -// Microsoft Foundation Classes Reference and Microsoft -// WinHelp documentation provided with the library. -// See these sources for detailed information regarding the -// Microsoft Foundation Classes product. - - -#include diff --git a/samples/minimal/.cvsignore b/samples/minimal/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/minimal/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/minimal/Makefile b/samples/minimal/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/minimal/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/minimal/Makefile.in b/samples/minimal/Makefile.in deleted file mode 100644 index b2ab5ad739..0000000000 --- a/samples/minimal/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# WXXT base directory -WXBASEDIR=@WXBASEDIR@ - -# set the OS type for compilation -OS=@OS@ -# compile a library only -RULE=bin - -# define library name -BIN_TARGET=minimal -# define library sources -BIN_SRC=\ -minimal.cpp - -#define library objects -BIN_OBJ=\ -minimal.o - -# additional things needed to link -BIN_LINK= - -# additional things needed to compile -ADD_COMPILE= - -# include the definitions now -include ../../../template.mak diff --git a/samples/minimal/makefile.b32 b/samples/minimal/makefile.b32 deleted file mode 100644 index 06d7deff50..0000000000 --- a/samples/minimal/makefile.b32 +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds minimal example (DOS). - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXINC = $(WXDIR)\include\msw -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 ole2w32 - -TARGET=minimal - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = minimal.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -minimal.obj: minimal.$(SRCSUFF) - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - diff --git a/samples/minimal/makefile.dos b/samples/minimal/makefile.dos deleted file mode 100644 index aa7e6ddf53..0000000000 --- a/samples/minimal/makefile.dos +++ /dev/null @@ -1,65 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds minimal example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\minimal - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = minimal.$(SRCSUFF) -OBJECTS = minimal.obj - -all: minimal.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -minimal.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) minimal.obj minimal.def minimal.res - link $(LINKFLAGS) @<< -minimal.obj $(WXDIR)\src\msw\dummy.obj, -minimal, -NUL, -$(LIBS), -minimal.def -; -<< - rc -K minimal.res - -minimal.obj: minimal.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -minimal.res : minimal.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include minimal - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/minimal/makefile.g95 b/samples/minimal/makefile.g95 deleted file mode 100644 index 6ad1b1b2ad..0000000000 --- a/samples/minimal/makefile.g95 +++ /dev/null @@ -1,37 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for minimal example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/minimal.$(OBJSUFF) $(OBJDIR)/minimal_resources.$(OBJSUFF) - -all: $(OBJDIR) minimal$(GUISUFFIX)$(EXESUFF) - -wx: - -$(OBJDIR): - mkdir $(OBJDIR) - -minimal$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o minimal$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/minimal.$(OBJSUFF): minimal.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ minimal.$(SRCSUFF) - -$(OBJDIR)/minimal_resources.o: minimal.rc - $(RESCOMP) -i minimal.rc -o $(OBJDIR)/minimal_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) minimal$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/minimal/makefile.nt b/samples/minimal/makefile.nt deleted file mode 100644 index 276311e09c..0000000000 --- a/samples/minimal/makefile.nt +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds minimal example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\minimal -PROGRAM=minimal - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/minimal/minimal.cpp b/samples/minimal/minimal.cpp deleted file mode 100644 index d0eca73819..0000000000 --- a/samples/minimal/minimal.cpp +++ /dev/null @@ -1,119 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: minimal.cpp -// Purpose: Minimal wxWindows sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "minimal.cpp" -#pragma interface "minimal.cpp" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#ifdef __WXGTK__ -#include "mondrian.xpm" -#endif - -// Define a new application type -class MyApp: public wxApp -{ public: - bool OnInit(void); -}; - -// Define a new frame type -class MyFrame: public wxFrame -{ public: - MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h); - - public: - void OnQuit(wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); - bool OnClose(void) { return TRUE; } - - DECLARE_EVENT_TABLE() - -}; - -// ID for the menu commands -#define MINIMAL_QUIT 1 -#define MINIMAL_TEXT 101 -#define MINIMAL_ABOUT 102 - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(MINIMAL_QUIT, MyFrame::OnQuit) - EVT_MENU(MINIMAL_ABOUT, MyFrame::OnAbout) -END_EVENT_TABLE() - -// Create a new application object -IMPLEMENT_APP (MyApp) - -// `Main program' equivalent, creating windows and returning main app frame -bool MyApp::OnInit(void) -{ - // Create the main frame window - MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "Minimal wxWindows App", 50, 50, 450, 340); - - // Give it an icon -#ifdef __WXMSW__ - frame->SetIcon(wxIcon("mondrian")); -#endif -#ifdef __WXGTK__ - frame->SetIcon(wxIcon( mondrian_xpm )); -#endif - - // Make a menubar - wxMenu *file_menu = new wxMenu; - - file_menu->Append(MINIMAL_ABOUT, "&About"); - file_menu->Append(MINIMAL_QUIT, "E&xit"); - wxMenuBar *menu_bar = new wxMenuBar; - menu_bar->Append(file_menu, "&File"); - frame->SetMenuBar(menu_bar); - - // Make a panel with a message - wxPanel *panel = new wxPanel(frame, -1, wxPoint(0, 0), wxSize(400, 200), wxTAB_TRAVERSAL); - - (void)new wxStaticText(panel, 311, "Hello!", wxPoint(10, 10), wxSize(-1, -1), 0); - - // Show the frame - frame->Show(TRUE); - - SetTopWindow(frame); - - return TRUE; -} - -// My frame constructor -MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h): - wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) -{} - -void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) ) -{ - Close(TRUE); -} - -void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) -{ - wxMessageDialog dialog(this, "This is a minimal sample\nA second line in the message box", - "About Minimal", wxYES_NO|wxCANCEL); - - dialog.ShowModal(); -} - - diff --git a/samples/minimal/minimal.def b/samples/minimal/minimal.def deleted file mode 100644 index 060bfe3fce..0000000000 --- a/samples/minimal/minimal.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME Minimal -DESCRIPTION 'Minimal wxWindows application' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 4048 -STACKSIZE 16000 diff --git a/samples/minimal/minimal.rc b/samples/minimal/minimal.rc deleted file mode 100644 index 3bf71d6da0..0000000000 --- a/samples/minimal/minimal.rc +++ /dev/null @@ -1,6 +0,0 @@ -mondrian ICON "mondrian.ico" -#include "wx/msw/wx.rc" - -#define MINIMAL_QUIT 1 -#define MINIMAL_ABOUT 102 - diff --git a/samples/minimal/mondrian.ico b/samples/minimal/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/samples/minimal/mondrian.ico and /dev/null differ diff --git a/samples/minimal/mondrian.xpm b/samples/minimal/mondrian.xpm deleted file mode 100644 index 409f27a843..0000000000 --- a/samples/minimal/mondrian.xpm +++ /dev/null @@ -1,44 +0,0 @@ -/* XPM */ -static char *mondrian_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 6 1", -" c Black", -". c Blue", -"X c #00bf00", -"o c Red", -"O c Yellow", -"+ c Gray100", -/* pixels */ -" ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" " -}; diff --git a/samples/nativdlg/dialog1.rc b/samples/nativdlg/dialog1.rc deleted file mode 100644 index 11c75fe589..0000000000 --- a/samples/nativdlg/dialog1.rc +++ /dev/null @@ -1,142 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// - -#ifndef __WXMSW__ -#define __WXMSW__ -#endif - -#ifndef __WIN32__ -#define __WIN32__ -#endif - -#ifndef __WIN95__ -#define __WIN95__ -#endif - -#ifdef __MINGW32__ -#define wxID_OK 5100 -#define wxID_CANCEL 5101 -#define wxID_APPLY 5102 -#define wxID_YES 5103 -#define wxID_NO 5104 -/* #include */ -#else -#include -/* #include */ -#endif - -#include "resource.h" - -#ifndef __MINGW32__ -#include -#endif - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -// #include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.K.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -dialog1 DIALOG DISCARDABLE 0, 0, 271, 172 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Test Dialog" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",wxID_OK,214,7,50,14 - PUSHBUTTON "Cancel",wxID_CANCEL,214,24,50,14 - GROUPBOX "wxStaticBox",IDC_STATIC,7,7,198,158 - EDITTEXT IDC_EDIT1,64,23,125,14,ES_AUTOHSCROLL - LTEXT "wxStaticText",IDC_STATIC,13,25,42,8 - CONTROL "wxCheckBox",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,14,47,57,10 - COMBOBOX IDC_COMBO1,83,46,48,30,CBS_DROPDOWN | CBS_SORT | - WS_VSCROLL | WS_TABSTOP - CONTROL "wxRadioButton",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON, - 141,47,64,10 - LISTBOX IDC_LIST1,14,69,86,40,LBS_SORT | LBS_NOINTEGRALHEIGHT | - WS_VSCROLL | WS_TABSTOP - SCROLLBAR IDC_SCROLLBAR1,111,71,76,11 - CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH | - TBS_NOTICKS | WS_TABSTOP,10,116,100,15 - CONTROL "Spin1",IDC_SPIN1,"msctls_updown32",UDS_ARROWKEYS,111,90, - 10,14 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - dialog1, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 264 - TOPMARGIN, 7 - BOTTOMMARGIN, 165 - END -END -#endif // APSTUDIO_INVOKED - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // English (U.K.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/samples/nativdlg/makefile.b32 b/samples/nativdlg/makefile.b32 deleted file mode 100644 index 0d75d38135..0000000000 --- a/samples/nativdlg/makefile.b32 +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.b32 -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds 32bit nativdlg example. - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 - -TARGET=nativdlg - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = nativdlg.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -nativdlg.obj: nativdlg.$(SRCSUFF) nativdlg.h # dialog1.wxr - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /D__WXMSW__ /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - - diff --git a/samples/nativdlg/makefile.bcc b/samples/nativdlg/makefile.bcc deleted file mode 100644 index 19ad9c2a44..0000000000 --- a/samples/nativdlg/makefile.bcc +++ /dev/null @@ -1,74 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds resource example (DOS). - -!if "$(BCCDIR)" == "" -!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 -!endif - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -WXDIR = $(WXWIN) -THISDIR = $(WXDIR)\samples\resource -WXLIB = $(WXDIR)\lib\wx.lib - -LIBS=$(WXLIB) mathwl cwl import -INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw -CFG=$(WXDIR)\src\wxwin.cfg - -!ifndef FINAL -FINAL=0 -!endif - -!if "$(FINAL)" == "0" -LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -O2 -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -HEADERS = resource.h -SOURCES = resource.cc -OBJECTS = resource.obj - -resource: resource.exe - -all: resource.exe - -resource.exe: $(WXLIB) resource.obj resource.def resource.res - tlink $(LINKFLAGS) @&&! -c0wl.obj resource.obj -resource -nul -$(LIBS) -resource.def -! - rc -30 -K resource.res - -.cc.obj: - bcc $(CPPFLAGS) -c {$< } - -resource.obj: resource.cc - -resource.res : resource.rc $(WXDIR)\include\msw\wx.rc - rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa resource - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws diff --git a/samples/nativdlg/makefile.dos b/samples/nativdlg/makefile.dos deleted file mode 100644 index 6096ca810c..0000000000 --- a/samples/nativdlg/makefile.dos +++ /dev/null @@ -1,86 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds resource example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info. - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\resource -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) oldnames libw llibcew commdlg ddeml shell mmsystem -INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw -DUMMY=$(WXDIR)\src\msw\dummy.obj - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!ifndef FINAL -FINAL=0 -!endif - -PRECOMP = /YuWX_PREC.H /Fp$(WXDIR)\src\msw\wx.pch - -!if "$(FINAL)" == "0" -CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) $(PRECOMP) /Dwx_msw -LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:256 -!else -CPPFLAGS=/AL /W3 /G2sw $(INC) /Ox $(PRECOMP) /Dwx_msw -LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:256 -!endif - -HEADERS = resource.h -SOURCES = resource.$(SRCSUFF) -OBJECTS = resource.obj - -resource: resource.exe - -all: wx resource.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -resource.exe: $(DUMMY) $(WXLIB) resource.obj resource.def resource.res - link $(LINKFLAGS) @<< -$(DUMMY) resource.obj, -resource, -NUL, -$(LIBS), -resource.def -; -<< - rc -31 -K resource.res - -resource.obj: resource.h resource.$(SRCSUFF) dialog1.wxr $(DUMMY) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -resource.res : resource.rc $(WXDIR)\include\msw\wx.rc - rc -r /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa resource - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/nativdlg/makefile.g95 b/samples/nativdlg/makefile.g95 deleted file mode 100644 index 018f915f18..0000000000 --- a/samples/nativdlg/makefile.g95 +++ /dev/null @@ -1,36 +0,0 @@ -# -# File: makefile.g95 -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for nativdlg example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS=$(OBJDIR)/nativdlg.$(OBJSUFF) $(OBJDIR)/nativdlg_resources.$(OBJSUFF) - -all: $(OBJDIR) nativdlg$(GUISUFFIX) - -$(OBJDIR): - mkdir $(OBJDIR) - -$(OBJDIR)/nativdlg.$(OBJSUFF): nativdlg.$(SRCSUFF) nativdlg.h - $(CC) -c $(CPPFLAGS) -o $@ nativdlg.$(SRCSUFF) - -nativdlg$(GUISUFFIX): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o nativdlg$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/nativdlg_resources.o: nativdlg.rc - $(RESCOMP) -i nativdlg.rc -o $(OBJDIR)/nativdlg_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) nativdlg$(GUISUFFIX).exe core *.rsc *.res - diff --git a/samples/nativdlg/makefile.nt b/samples/nativdlg/makefile.nt deleted file mode 100644 index b143f84a28..0000000000 --- a/samples/nativdlg/makefile.nt +++ /dev/null @@ -1,63 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds nativdlg example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\nativdlg -PROGRAM=nativdlg - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).h $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc dialog1.rc - $(rc) -r /i$(WXDIR)\include /D__WXMSW__ -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.sbr - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb - diff --git a/samples/nativdlg/makefile.sc b/samples/nativdlg/makefile.sc deleted file mode 100644 index 235c8f8bc1..0000000000 --- a/samples/nativdlg/makefile.sc +++ /dev/null @@ -1,35 +0,0 @@ -# Symantec C++ makefile for hello example -# NOTE that peripheral libraries are now dealt in main wxWindows makefile. - -WXDIR = $(WXWIN) -WXLIB = $(WXDIR)\lib\wx.lib -INCDIR = $(WXDIR)\include -MSWINC = $(INCDIR)\msw -BASEINC = $(INCDIR)\base - -CC=sc -RC=rc -CFLAGS = -o -ml -W -Dwx_msw -LDFLAGS = -ml -W - -INCLUDE=$(BASEINC);$(MSWINC) - -LIBS=$(WXLIB) libw.lib commdlg.lib shell.lib - -.cc.obj: - *$(CC) -c $(CFLAGS) -I$(INCLUDE) $< - -.rc.res: - *$(RC) -r -I$(INCLUDE) $< - -hello.exe: hello.obj hello.def hello.res - *$(CC) $(LDFLAGS) -o$@ hello.obj hello.def $(LIBS) - *$(RC) -k hello.res - -clean: - -del *.obj - -del *.exe - -del *.res - -del *.map - -del *.rws - diff --git a/samples/nativdlg/makefile.unx b/samples/nativdlg/makefile.unx deleted file mode 100644 index 1967b5e242..0000000000 --- a/samples/nativdlg/makefile.unx +++ /dev/null @@ -1,76 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for resource example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/make.env - -OBJECTS=$(OBJDIR)/resource.$(OBJSUFF) - -.SUFFIXES: - -all: $(OBJDIR) resource$(GUISUFFIX) - -wxmotif: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif - -wxxview: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview - -wxhp: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx hp - -# For SGI, include -lPW on your LDLIBS -motif: wxmotif - $(MAKE) -f makefile.unx all GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' WXLIB=$(WXDIR)/lib/libwx_motif.a OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK= - -xview: wxxview - $(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' LDLIBS='$(XVIEWLDLIBS)' - -hp: wxhp - $(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC OPT='' DEBUG='$(DEBUG)' WARN='-w' \ - XINCLUDE='$(HPXINCLUDE)' \ - XLIB='$(HPXLIB)' \ - XVIEW_LINK='' \ - LDLIBS='$(HPLDLIBS)' - -$(OBJDIR): - mkdir $(OBJDIR) - -resource$(GUISUFFIX): $(OBJDIR)/resource.$(OBJSUFF) $(WXLIB) - $(CC) $(LDFLAGS) -o resource$(GUISUFFIX) $(OBJDIR)/resource.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS) - -$(OBJDIR)/resource.$(OBJSUFF): resource.$(SRCSUFF) resource.h - $(CC) -c $(CPPFLAGS) -o $@ resource.$(SRCSUFF) - -clean_motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany - -clean_ol: - $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany - -clean_hp: - $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany - -cleanany: - rm -f $(OBJECTS) resource$(GUISUFFIX) core - -wxclean_ol: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_ol - -wxclean_motif: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_motif - -wxclean_hp: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_hp - diff --git a/samples/nativdlg/makefile.vms b/samples/nativdlg/makefile.vms deleted file mode 100644 index 1ef109fbeb..0000000000 --- a/samples/nativdlg/makefile.vms +++ /dev/null @@ -1,38 +0,0 @@ -#************************************************************************ -# Makefile for HELLO under VMS -# by Stefan Hammes -# (incomplete) update history: -# 11.04.95 -#************************************************************************ - -#************************************************************************ -# Definition section -# (cave: definitions and includes must begin with ',') -#************************************************************************ - -APPOPTS = -APPDEFS = -APPINCS = - -#************************************************************************ -# Module section -#************************************************************************ - -# Name of main module -MAIN = hello - -# Object modules of the application. -OBJS = hello.obj - -.include [--.src]makevms.env - -# main dependency -$(MAIN).exe : $(MAIN).$(OBJ) - $(LINK) $(LINKFLAGS) /exec=$(MAIN).exe $(MAIN).$(OBJ),$(WXLIB)/lib,$(OPTSFILE)/option - - purge *.exe - -#************************************************************************ -# Header file depedencies following -#************************************************************************ -hello.obj : hello.cc hello.h - diff --git a/samples/nativdlg/makefile.wat b/samples/nativdlg/makefile.wat deleted file mode 100644 index 0ad7f98a89..0000000000 --- a/samples/nativdlg/makefile.wat +++ /dev/null @@ -1,42 +0,0 @@ -# -# Makefile for WATCOM -# -# Created by D.Chubraev, chubraev@iem.ee.ethz.ch -# 8 Nov 1994 -# - -WXDIR = ..\.. - -!include $(WXDIR)\src\makewat.env - -WXLIB = $(WXDIR)\lib -NAME = hello -LNK = $(name).lnk -OBJS = $(name).obj - -PRECOMP= - -all: $(name).exe - -$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib - wlink @$(LNK) - $(BINDCOMMAND) $(name).res - -$(name).res : $(name).rc $(WXDIR)\include\msw\wx.rc - $(RC) $(RESFLAGS1) $(name).rc - -$(LNK) : makefile.wat - %create $(LNK) - @%append $(LNK) debug all - @%append $(LNK) system $(LINKOPTION) - @%append $(LNK) $(MINDATA) - @%append $(LNK) $(MAXDATA) - @%append $(LNK) $(STACK) - @%append $(LNK) name $(name) - @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib - @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i - @for %i in ($(OBJS)) do @%append $(LNK) file %i - -clean: .SYMBOLIC - -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex - diff --git a/samples/nativdlg/nativdlg.cpp b/samples/nativdlg/nativdlg.cpp deleted file mode 100644 index 32d24f893c..0000000000 --- a/samples/nativdlg/nativdlg.cpp +++ /dev/null @@ -1,130 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: nativdlg.cpp -// Purpose: Native Windows dialog sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "wx/resource.h" - -#include -#include "nativdlg.h" -#include "resource.h" - -// Declare two frames -MyFrame *frame = NULL; - -IMPLEMENT_APP(MyApp) - -// Testing of ressources -MyApp::MyApp() -{ -} - -bool MyApp::OnInit(void) -{ - // Create the main frame window - frame = new MyFrame(NULL, -1, "wxWindows Native Dialog Sample", wxPoint(0, 0), wxSize(300, 250)); - - // Give it a status line - frame->CreateStatusBar(2); - - // Make a menubar - wxMenu *file_menu = new wxMenu; - - file_menu->Append(RESOURCE_TEST1, "&Dialog box test", "Test dialog box resource"); - file_menu->Append(RESOURCE_QUIT, "E&xit", "Quit program"); - - wxMenuBar *menu_bar = new wxMenuBar; - - menu_bar->Append(file_menu, "&File"); - - // Associate the menu bar with the frame - frame->SetMenuBar(menu_bar); - - // Make a panel - frame->panel = new wxWindow(frame, -1, wxPoint(0, 0), wxSize(400, 400), 0, "MyMainFrame"); - frame->Show(TRUE); - - // Return the main frame window - SetTopWindow(frame); - - return TRUE; -} - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit) - EVT_MENU(RESOURCE_TEST1, MyFrame::OnTest1) -END_EVENT_TABLE() - -// Define my frame constructor -MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size): - wxFrame(parent, id, title, pos, size) -{ - panel = NULL; -} - -void MyFrame::OnQuit(wxCommandEvent& event) -{ - Close(TRUE); -} - -void MyFrame::OnTest1(wxCommandEvent& event) -{ - MyDialog *dialog = new MyDialog; - if (dialog->LoadNativeDialog(this, dialog1)) - { -/* - wxTextCtrl *text = (wxTextCtrl *)wxFindWindowByName("multitext3", dialog); - if (text) - text->SetValue("wxWindows resource demo"); -*/ - dialog->SetModal(TRUE); - dialog->ShowModal(); - } - dialog->Close(TRUE); -} - -bool MyFrame::OnClose(void) -{ - Show(FALSE); - - return TRUE; -} - -BEGIN_EVENT_TABLE(MyDialog, wxDialog) - EVT_BUTTON(wxID_OK, MyDialog::OnOk) - EVT_BUTTON(wxID_CANCEL, MyDialog::OnCancel) -END_EVENT_TABLE() - - -void MyDialog::OnOk(wxCommandEvent& event) -{ - EndModal(wxID_OK); -} - -void MyDialog::OnCancel(wxCommandEvent& event) -{ - EndModal(wxID_CANCEL); -} - - diff --git a/samples/nativdlg/nativdlg.def b/samples/nativdlg/nativdlg.def deleted file mode 100644 index 49791b5e6c..0000000000 --- a/samples/nativdlg/nativdlg.def +++ /dev/null @@ -1,9 +0,0 @@ -NAME Resource -DESCRIPTION 'Resource' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 16192 - diff --git a/samples/nativdlg/nativdlg.h b/samples/nativdlg/nativdlg.h deleted file mode 100644 index 25688ea5fc..0000000000 --- a/samples/nativdlg/nativdlg.h +++ /dev/null @@ -1,47 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: nativdlg.h -// Purpose: Native Windows dialog sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma interface -#endif - -// Define a new application -class MyApp: public wxApp -{ - public: - MyApp(void) ; - bool OnInit(void); -}; - -class MyFrame: public wxFrame -{ - public: - wxWindow *panel; - MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size); - bool OnClose(void); - void OnQuit(wxCommandEvent& event); - void OnTest1(wxCommandEvent& event); - - DECLARE_EVENT_TABLE() -}; - -class MyDialog : public wxDialog -{ - public: - void OnOk(wxCommandEvent& event); - void OnCancel(wxCommandEvent& event); - - DECLARE_EVENT_TABLE() -}; - -#define RESOURCE_QUIT 4 -#define RESOURCE_TEST1 2 - diff --git a/samples/nativdlg/nativdlg.rc b/samples/nativdlg/nativdlg.rc deleted file mode 100644 index db18d163f2..0000000000 --- a/samples/nativdlg/nativdlg.rc +++ /dev/null @@ -1,4 +0,0 @@ -#include "wx/msw/wx.rc" - -#include "dialog1.rc" - diff --git a/samples/nativdlg/resource.h b/samples/nativdlg/resource.h deleted file mode 100644 index a71bf8475c..0000000000 --- a/samples/nativdlg/resource.h +++ /dev/null @@ -1,25 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by dialog1.rc -// -#define dialog1 101 -#define IDC_EDIT1 1000 -#define IDC_CHECK1 1001 -#define IDC_COMBO1 1003 -#define IDC_RADIO1 1005 -#define IDC_LIST1 1006 -#define IDC_SCROLLBAR1 1007 -#define IDC_SLIDER1 1008 -#define IDC_SPIN1 1009 -#define IDC_STATIC -1 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 102 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1010 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/samples/ownerdrw/bell.bmp b/samples/ownerdrw/bell.bmp deleted file mode 100644 index 279b827162..0000000000 Binary files a/samples/ownerdrw/bell.bmp and /dev/null differ diff --git a/samples/ownerdrw/makefile.b32 b/samples/ownerdrw/makefile.b32 deleted file mode 100644 index 771353702f..0000000000 --- a/samples/ownerdrw/makefile.b32 +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds ownerdrw example (DOS). - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXINC = $(WXDIR)\include\msw -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 - -TARGET=ownerdrw - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = ownerdrw.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -ownerdrw.obj: ownerdrw.$(SRCSUFF) - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - diff --git a/samples/ownerdrw/makefile.dos b/samples/ownerdrw/makefile.dos deleted file mode 100644 index 71c72681ac..0000000000 --- a/samples/ownerdrw/makefile.dos +++ /dev/null @@ -1,65 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds ownerdrw example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\ownerdrw - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = ownerdrw.$(SRCSUFF) -OBJECTS = ownerdrw.obj - -all: ownerdrw.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -ownerdrw.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) ownerdrw.obj ownerdrw.def ownerdrw.res - link $(LINKFLAGS) @<< -ownerdrw.obj $(WXDIR)\src\msw\dummy.obj, -ownerdrw, -NUL, -$(LIBS), -ownerdrw.def -; -<< - rc -K ownerdrw.res - -ownerdrw.obj: ownerdrw.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -ownerdrw.res : ownerdrw.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include ownerdrw - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/ownerdrw/makefile.g95 b/samples/ownerdrw/makefile.g95 deleted file mode 100644 index c821885cc3..0000000000 --- a/samples/ownerdrw/makefile.g95 +++ /dev/null @@ -1,37 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for ownerdrw example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/ownerdrw.$(OBJSUFF) $(OBJDIR)/ownerdrw_resources.$(OBJSUFF) - -all: $(OBJDIR) ownerdrw$(GUISUFFIX)$(EXESUFF) - -wx: - -$(OBJDIR): - mkdir $(OBJDIR) - -ownerdrw$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o ownerdrw$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/ownerdrw.$(OBJSUFF): ownerdrw.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ ownerdrw.$(SRCSUFF) - -$(OBJDIR)/ownerdrw_resources.o: ownerdrw.rc - $(RESCOMP) -i ownerdrw.rc -o $(OBJDIR)/ownerdrw_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) ownerdrw$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/ownerdrw/makefile.nt b/samples/ownerdrw/makefile.nt deleted file mode 100644 index 5976dadeb2..0000000000 --- a/samples/ownerdrw/makefile.nt +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds ownerdrw example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\ownerdrw -PROGRAM=ownerdrw - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/ownerdrw/mondrian.ico b/samples/ownerdrw/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/samples/ownerdrw/mondrian.ico and /dev/null differ diff --git a/samples/ownerdrw/nosound.bmp b/samples/ownerdrw/nosound.bmp deleted file mode 100644 index 722e2e4ced..0000000000 Binary files a/samples/ownerdrw/nosound.bmp and /dev/null differ diff --git a/samples/ownerdrw/ownerdrw.cpp b/samples/ownerdrw/ownerdrw.cpp deleted file mode 100644 index 2e039f2926..0000000000 --- a/samples/ownerdrw/ownerdrw.cpp +++ /dev/null @@ -1,293 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: ownerdrw.cpp -// Purpose: Owner-draw sample, for Windows -// Author: Vadim Zeitlin -// Modified by: -// Created: 13.11.97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// headers & declarations -// ============================================================================ - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif - -#ifndef WX_PRECOMP - #include "wx/wx.h" -#endif - -#include "wx/ownerdrw.h" -#include "wx/menuitem.h" -#include "wx/msw/checklst.h" - -// Define a new application type -class OwnerDrawnApp: public wxApp -{ -public: - bool OnInit(); -}; - -// Define a new frame type -class OwnerDrawnFrame : public wxFrame -{ -public: - // ctor & dtor - OwnerDrawnFrame(wxFrame *frame, char *title, int x, int y, int w, int h); - ~OwnerDrawnFrame(); - - // notifications - void OnQuit (wxCommandEvent& event); - void OnAbout (wxCommandEvent& event); - void OnListboxSelect (wxCommandEvent& event); - void OnCheckboxToggle (wxCommandEvent& event); - void OnListboxDblClick (wxCommandEvent& event); - bool OnClose () { return TRUE; } - - DECLARE_EVENT_TABLE() - -private: - void InitMenu(); - - wxCheckListBox *m_pListBox; -}; - -enum -{ - Menu_Quit = 1, - Menu_First = 100, - Menu_Test1, Menu_Test2, Menu_Test3, - Menu_Bitmap, Menu_Bitmap2, - Menu_Submenu, Menu_Sub1, Menu_Sub2, Menu_Sub3, - Control_First = 1000, - Control_Listbox, Control_Listbox2, -}; - -BEGIN_EVENT_TABLE(OwnerDrawnFrame, wxFrame) - EVT_MENU(Menu_Quit, OwnerDrawnFrame::OnQuit) - EVT_LISTBOX(Control_Listbox, OwnerDrawnFrame::OnListboxSelect) - EVT_CHECKLISTBOX(Control_Listbox, OwnerDrawnFrame::OnCheckboxToggle) - EVT_COMMAND(Control_Listbox, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, - OwnerDrawnFrame::OnListboxDblClick) -END_EVENT_TABLE() - -IMPLEMENT_APP(OwnerDrawnApp); - -// init our app: create windows -bool OwnerDrawnApp::OnInit(void) -{ - OwnerDrawnFrame *pFrame = new OwnerDrawnFrame(NULL, "wxWindows Ownerdraw Sample", - 50, 50, 450, 340); - SetTopWindow(pFrame); - - return TRUE; -} - -// create the menu bar for the main frame -void OwnerDrawnFrame::InitMenu() -{ - // Make a menubar - wxMenu *file_menu = new wxMenu, - *sub_menu = new wxMenu; - - // vars used for menu construction - wxMenuItem *pItem; - wxFont fontLarge(18, wxROMAN, wxNORMAL, wxBOLD, FALSE), - fontUlined(12, wxDEFAULT, wxNORMAL, wxNORMAL, TRUE), - fontItalic(12, wxMODERN, wxITALIC, wxBOLD, FALSE), - // should be at least of the size of bitmaps - fontBmp(14, wxDEFAULT, wxNORMAL, wxNORMAL, FALSE); - - // sorry for my artistic skills... - wxBitmap bmpBell("bell"), bmpSound("sound"), bmpNoSound("nosound"); - - // construct submenu - pItem = new wxMenuItem(sub_menu, Menu_Sub1, "Submenu &first", "large", TRUE); - pItem->SetFont(fontLarge); - sub_menu->Append(pItem); - - pItem = new wxMenuItem(sub_menu, Menu_Sub2, "Submenu &second", "italic", TRUE); - pItem->SetFont(fontItalic); - sub_menu->Append(pItem); - - pItem = new wxMenuItem(sub_menu, Menu_Sub3, "Submenu &third", "underlined", TRUE); - pItem->SetFont(fontUlined); - sub_menu->Append(pItem); - - // construct menu - pItem = new wxMenuItem(file_menu, Menu_Test1, "&Uncheckable", "red item"); - pItem->SetFont(*wxITALIC_FONT); - pItem->SetTextColour(wxColor(255, 0, 0)); - pItem->SetMarginWidth(23); - file_menu->Append(pItem); - - pItem = new wxMenuItem(file_menu, Menu_Test2, "&Checkable", "checkable item", TRUE); - pItem->SetFont(*wxSMALL_FONT); - file_menu->Append(pItem); - file_menu->Check(Menu_Test2, TRUE); - - pItem = new wxMenuItem(file_menu, Menu_Test3, "&Disabled", "disabled item"); - pItem->SetFont(*wxNORMAL_FONT); - file_menu->Append(pItem); - file_menu->Enable(Menu_Test3, FALSE); - - file_menu->AppendSeparator(); - - pItem = new wxMenuItem(file_menu, Menu_Bitmap, "&Bell", "check/uncheck me!", TRUE); - pItem->SetFont(fontBmp); - pItem->SetBitmaps(bmpBell); - file_menu->Append(pItem); - - pItem = new wxMenuItem(file_menu, Menu_Bitmap2, "So&und", "icon changes!", TRUE); - pItem->SetFont(fontBmp); - pItem->SetBitmaps(bmpSound, bmpNoSound); - file_menu->Append(pItem); - - file_menu->AppendSeparator(); - - pItem = new wxMenuItem(file_menu, Menu_Submenu, "&Sub menu", "", TRUE, sub_menu); - pItem->SetFont(*wxSWISS_FONT); - file_menu->Append(pItem); - - file_menu->AppendSeparator(); - file_menu->Append(Menu_Quit, "&Quit", "Normal item"); - - wxMenuBar *menu_bar = new wxMenuBar; - - menu_bar->Append(file_menu, "&File"); - SetMenuBar(menu_bar); -} - -// main frame constructor -OwnerDrawnFrame::OwnerDrawnFrame(wxFrame *frame, char *title, int x, int y, int w, int h) - : wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) -{ - // set the icon - SetIcon(wxIcon("mondrian")); - - // create the menu - InitMenu(); - - // make a panel with some controls - wxPanel *pPanel = new wxPanel(this, -1, wxPoint(0, 0), - wxSize(400, 200), wxTAB_TRAVERSAL); - - // check list box - static const char* aszChoices[] = { "Hello", "world", "and", - "goodbye", "cruel", "world", - "-------", "owner-drawn", "listbox" }; - - wxString *astrChoices = new wxString[WXSIZEOF(aszChoices)]; - uint ui; - for ( ui = 0; ui < WXSIZEOF(aszChoices); ui++ ) - astrChoices[ui] = aszChoices[ui]; - - m_pListBox = new wxCheckListBox - ( - pPanel, // parent - Control_Listbox, // control id - wxPoint(10, 10), // listbox poistion - wxSize(200, 200), // listbox size - WXSIZEOF(aszChoices), // number of strings - astrChoices // array of strings - ); - - delete [] astrChoices; - - for ( ui = 0; ui < WXSIZEOF(aszChoices); ui += 2 ) { - m_pListBox->GetItem(ui)->SetBackgroundColour(wxColor(200, 200, 200)); - } - - m_pListBox->Check(2); - - // normal (but owner-drawn) listbox - static const char* aszColors[] = { "Red", "Blue", "Pink", - "Green", "Yellow", - "Black", "Violet" }; - struct { uint r, g, b; } aColors[] = { {255,0,0}, {0,0,255}, {255,128,192}, - {0,255,0}, {255,255,128}, - {0,0,0}, {128,0,255} }; - astrChoices = new wxString[WXSIZEOF(aszColors)]; - for ( ui = 0; ui < WXSIZEOF(aszColors); ui++ ) - astrChoices[ui] = aszColors[ui]; - - wxListBox *pListBox = new wxListBox - ( - pPanel, // parent - Control_Listbox2, // control id - wxPoint(220, 10), // listbox poistion - wxDefaultSize, // listbox size - WXSIZEOF(aszColors), // number of strings - astrChoices, // array of strings - wxLB_OWNERDRAW, // owner-drawn - wxDefaultValidator, // - wxListBoxNameStr - ); - - for ( ui = 0; ui < WXSIZEOF(aszColors); ui++ ) { - pListBox->GetItem(ui)->SetTextColour(wxColor(aColors[ui].r, - aColors[ui].g, - aColors[ui].b)); - // yellow on white is horrible... - if ( ui == 4 ) - pListBox->GetItem(ui)->SetBackgroundColour(wxColor(0, 0, 0)); - - } - - // create the status line - const int widths[] = { -1, 60 }; - CreateStatusBar(2); - SetStatusWidths(2, widths); - SetStatusText("no selection", 0); - - Show(TRUE); -} - -OwnerDrawnFrame::~OwnerDrawnFrame() -{ -} - -void OwnerDrawnFrame::OnQuit(wxCommandEvent& event) -{ - Close(TRUE); -} - -void OwnerDrawnFrame::OnAbout(wxCommandEvent& event) -{ - wxMessageDialog dialog(this, "Demo of owner-drawn controls\n" - "About wxOwnerDrawn", wxYES_NO | wxCANCEL); - dialog.ShowModal(); -} - -void OwnerDrawnFrame::OnListboxSelect(wxCommandEvent& event) -{ - wxString strSelection; - uint nSel = event.GetSelection(); - strSelection.sprintf("item %d selected (%schecked)", nSel, - m_pListBox->IsChecked(nSel) ? "" : "not "); - SetStatusText(strSelection); -} - -void OwnerDrawnFrame::OnListboxDblClick(wxCommandEvent& event) -{ - wxString strSelection; - strSelection.sprintf("item %d double clicked", m_pListBox->GetSelection()); - wxMessageDialog dialog(this, strSelection); - dialog.ShowModal(); -} - -void OwnerDrawnFrame::OnCheckboxToggle(wxCommandEvent& event) -{ - wxString strSelection; - uint nItem = event.GetInt(); - strSelection.sprintf("item %d was %schecked", nItem, - m_pListBox->IsChecked(nItem) ? "" : "un"); - SetStatusText(strSelection); -} \ No newline at end of file diff --git a/samples/ownerdrw/ownerdrw.def b/samples/ownerdrw/ownerdrw.def deleted file mode 100644 index 6f2236cfe5..0000000000 --- a/samples/ownerdrw/ownerdrw.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME OWNERDRW -DESCRIPTION 'Owner-draw sample' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 4048 -STACKSIZE 16000 diff --git a/samples/ownerdrw/ownerdrw.rc b/samples/ownerdrw/ownerdrw.rc deleted file mode 100644 index bbc00bdf4b..0000000000 --- a/samples/ownerdrw/ownerdrw.rc +++ /dev/null @@ -1,6 +0,0 @@ -mondrian ICON "mondrian.ico" -bell BITMAP "bell.bmp" -sound BITMAP "sound.bmp" -nosound BITMAP "nosound.bmp" -#include "wx/msw/wx.rc" - diff --git a/samples/ownerdrw/sound.bmp b/samples/ownerdrw/sound.bmp deleted file mode 100644 index 26f5f1883e..0000000000 Binary files a/samples/ownerdrw/sound.bmp and /dev/null differ diff --git a/samples/png/.cvsignore b/samples/png/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/png/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/png/Makefile b/samples/png/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/png/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/png/Makefile.in b/samples/png/Makefile.in deleted file mode 100644 index c05f687869..0000000000 --- a/samples/png/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# WXXT base directory -WXBASEDIR=@WXBASEDIR@ - -# set the OS type for compilation -OS=@OS@ -# compile a library only -RULE=bin - -# define library name -BIN_TARGET=pngdemo -# define library sources -BIN_SRC=\ -pngdemo.cpp - -#define library objects -BIN_OBJ=\ -pngdemo.o - -# additional things needed to link -BIN_LINK= - -# additional things needed to compile -ADD_COMPILE= - -# include the definitions now -include ../../../template.mak diff --git a/samples/png/makefile.nt b/samples/png/makefile.nt deleted file mode 100644 index 81a3e4df06..0000000000 --- a/samples/png/makefile.nt +++ /dev/null @@ -1,66 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds pngdemo example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -EXTRALIBS=$(WXDIR)\lib\winpng.lib $(WXDIR)\lib\zlib.lib - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\png -PROGRAM=pngdemo - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/png/pngdemo.cpp b/samples/png/pngdemo.cpp deleted file mode 100644 index edbaea70a2..0000000000 --- a/samples/png/pngdemo.cpp +++ /dev/null @@ -1,186 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: pngdemo.cpp -// Purpose: Demos PNG reading -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "pngdemo.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifdef __WXMSW__ -#include -#endif - -#include "pngdemo.h" - -MyFrame *frame = (MyFrame *) NULL; -wxBitmap *g_TestBitmap = (wxBitmap *) NULL; - -IMPLEMENT_APP(MyApp) - -MyApp::MyApp() -{ -} - -bool MyApp::OnInit(void) -{ -#ifdef __WXMSW__ - wxBitmap::AddHandler(new wxPNGFileHandler); -#endif - - // Create the main frame window - frame = new MyFrame((wxFrame *) NULL, "wxPNGBitmap Demo", wxPoint(0, 0), wxSize(300, 300)); - - // Give it a status line - frame->CreateStatusBar(2); - - // Make a menubar - wxMenu *file_menu = new wxMenu; - wxMenu *help_menu = new wxMenu; - - file_menu->Append(PNGDEMO_LOAD_FILE, "&Load file", "Load file"); - file_menu->Append(PNGDEMO_QUIT, "E&xit", "Quit program"); - help_menu->Append(PNGDEMO_ABOUT, "&About", "About PNG demo"); - - wxMenuBar *menu_bar = new wxMenuBar; - - menu_bar->Append(file_menu, "&File"); - menu_bar->Append(help_menu, "&Help"); - - // Associate the menu bar with the frame - frame->SetMenuBar(menu_bar); - - MyCanvas *canvas = new MyCanvas(frame, wxPoint(0, 0), wxSize(100, 100)); - - // Give it scrollbars: the virtual canvas is 20 * 50 = 1000 pixels in each direction -// canvas->SetScrollbars(20, 20, 50, 50, 4, 4); - frame->canvas = canvas; - - frame->Show(TRUE); - - frame->SetStatusText("Hello, wxWindows"); - - return TRUE; -} - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(PNGDEMO_QUIT, MyFrame::OnQuit) - EVT_MENU(PNGDEMO_ABOUT, MyFrame::OnAbout) - EVT_MENU(PNGDEMO_LOAD_FILE, MyFrame::OnLoadFile) -END_EVENT_TABLE() - -// Define my frame constructor -MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size): - wxFrame(frame, -1, title, pos, size) -{ - canvas = (MyCanvas *) NULL; -} - -void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) -{ - Close(TRUE); -} - -void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) -{ - (void)wxMessageBox("PNG demo\nJulian Smart (c) 1998", - "About PNG Demo", wxOK); -} - -void MyFrame::OnLoadFile(wxCommandEvent& WXUNUSED(event)) -{ - // Show file selector. - char *f = wxFileSelector("Open Image", (const char *) NULL, (const char *) NULL,"png", - "PNG files (*.png)|*.png"); - - if (!f) - return; - - if ( g_TestBitmap ) - delete g_TestBitmap; - g_TestBitmap = new wxBitmap(f, wxBITMAP_TYPE_PNG); - if (!g_TestBitmap->Ok()) - { - delete g_TestBitmap; - g_TestBitmap = (wxBitmap *) NULL; - } - - canvas->Refresh(); -} - -BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow) - EVT_PAINT(MyCanvas::OnPaint) -END_EVENT_TABLE() - -// Define a constructor for my canvas -MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size): - wxScrolledWindow(parent, -1, pos, size) -{ -} - -MyCanvas::~MyCanvas(void) -{ -} - -// Define the repainting behaviour -void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) -{ - wxPaintDC dc(this); - dc.SetPen(wxRED_PEN); - - int i; - for ( i = 0; i < 500; i += 10) - { - dc.DrawLine(0, i, 800, i); - } - if ( g_TestBitmap && g_TestBitmap->Ok() ) - { - wxMemoryDC memDC; - if ( g_TestBitmap->GetColourMap() ) - { - memDC.SetColourMap(g_TestBitmap->GetColourMap()); - dc.SetColourMap(g_TestBitmap->GetColourMap()); - } - memDC.SelectObject(g_TestBitmap); - - // Normal, non-transparent blitting - dc.Blit(20, 20, g_TestBitmap->GetWidth(), g_TestBitmap->GetHeight(), & memDC, 0, 0, wxCOPY, FALSE); - - memDC.SelectObject(wxNullBitmap); - } - - if ( g_TestBitmap && g_TestBitmap->Ok() ) - { - wxMemoryDC memDC; - memDC.SelectObject(g_TestBitmap); - - // Transparent blitting if there's a mask in the bitmap - dc.Blit(20 + g_TestBitmap->GetWidth() + 20, 20, g_TestBitmap->GetWidth(), g_TestBitmap->GetHeight(), & memDC, - 0, 0, wxCOPY, TRUE); - - memDC.SelectObject(wxNullBitmap); - } -} - -// Define the behaviour for the frame closing -// - must delete all frames except for the main one. -bool MyFrame::OnClose(void) -{ - Show(FALSE); - - return TRUE; -} - diff --git a/samples/png/pngdemo.h b/samples/png/pngdemo.h deleted file mode 100644 index e4be03ed4b..0000000000 --- a/samples/png/pngdemo.h +++ /dev/null @@ -1,57 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bitmap.h -// Purpose: wxBitmap class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/wx.h" - -// Define a new application -class MyApp: public wxApp -{ - public: - MyApp(void) ; - bool OnInit(void); -}; - -// Define a new frame -class MyCanvas; - -class MyFrame: public wxFrame -{ - public: - MyCanvas *canvas; - MyFrame(wxFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size); - - bool OnClose(void); - void OnActivate(bool) {} - void OnLoadFile(wxCommandEvent& event); - void OnQuit(wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); -DECLARE_EVENT_TABLE() -}; - -// Define a new canvas which can receive some events -class MyCanvas: public wxScrolledWindow -{ - public: - MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size); - ~MyCanvas(void) ; - - void OnPaint(wxPaintEvent& event); -DECLARE_EVENT_TABLE() -}; - -#define PNGDEMO_QUIT 100 -#define PNGDEMO_ABOUT 101 -#define PNGDEMO_LOAD_FILE 102 - diff --git a/samples/png/pngdemo.rc b/samples/png/pngdemo.rc deleted file mode 100644 index 82bdf07561..0000000000 --- a/samples/png/pngdemo.rc +++ /dev/null @@ -1,2 +0,0 @@ -#include "wx/msw/wx.rc" - diff --git a/samples/printing/.cvsignore b/samples/printing/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/printing/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/printing/Cour.afm b/samples/printing/Cour.afm deleted file mode 100644 index f54e284ba7..0000000000 --- a/samples/printing/Cour.afm +++ /dev/null @@ -1,341 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Wed Feb 25 16:01:10 PST 1987 -FontName Courier -EncodingScheme AdobeStandardEncoding -FullName Courier -FamilyName Courier -Weight Medium -ItalicAngle 0.0 -IsFixedPitch true -UnderlinePosition -82 -UnderlineThickness 40 -Version 001.003 -FontBBox -40 -290 640 795 -CapHeight 583 -XHeight 437 -Descender -207 -Ascender 624 -StartCharMetrics 260 -C 32 ; WX 600 ; N space ; B 560 -40 640 40 ; -C 33 ; WX 600 ; N exclam ; B 240 -5 360 639 ; -C 34 ; WX 600 ; N quotedbl ; B 126 314 474 603 ; -C 35 ; WX 600 ; N numbersign ; B 72 -82 528 665 ; -C 36 ; WX 600 ; N dollar ; B 93 -113 507 675 ; -C 37 ; WX 600 ; N percent ; B 67 -35 533 639 ; -C 38 ; WX 600 ; N ampersand ; B 85 -35 498 540 ; -C 39 ; WX 600 ; N quoteright ; B 135 304 340 613 ; -C 40 ; WX 600 ; N parenleft ; B 274 -144 478 623 ; -C 41 ; WX 600 ; N parenright ; B 127 -144 331 623 ; -C 42 ; WX 600 ; N asterisk ; B 93 210 507 624 ; -C 43 ; WX 600 ; N plus ; B 52 12 548 550 ; -C 44 ; WX 600 ; N comma ; B 135 -155 340 155 ; -C 45 ; WX 600 ; N hyphen ; B 52 241 548 321 ; -C 46 ; WX 600 ; N period ; B 250 10 350 90 ; -C 47 ; WX 600 ; N slash ; B 93 -103 507 686 ; -C 48 ; WX 600 ; N zero ; B 93 -35 507 639 ; -C 49 ; WX 600 ; N one ; B 93 -20 507 624 ; -C 50 ; WX 600 ; N two ; B 64 -20 498 639 ; -C 51 ; WX 600 ; N three ; B 76 -35 519 639 ; -C 52 ; WX 600 ; N four ; B 85 -20 498 624 ; -C 53 ; WX 600 ; N five ; B 76 -35 519 624 ; -C 54 ; WX 600 ; N six ; B 116 -35 530 639 ; -C 55 ; WX 600 ; N seven ; B 85 -20 498 624 ; -C 56 ; WX 600 ; N eight ; B 93 -35 507 639 ; -C 57 ; WX 600 ; N nine ; B 116 -35 530 639 ; -C 58 ; WX 600 ; N colon ; B 250 10 350 392 ; -C 59 ; WX 600 ; N semicolon ; B 139 -116 350 392 ; -C 60 ; WX 600 ; N less ; B 52 12 548 550 ; -C 61 ; WX 600 ; N equal ; B 31 168 569 394 ; -C 62 ; WX 600 ; N greater ; B 52 12 548 550 ; -C 63 ; WX 600 ; N question ; B 114 -5 507 598 ; -C 64 ; WX 600 ; N at ; B 85 -82 498 644 ; -C 65 ; WX 600 ; N A ; B -11 -20 611 583 ; -C 66 ; WX 600 ; N B ; B 23 -20 561 583 ; -C 67 ; WX 600 ; N C ; B 43 -35 554 598 ; -C 68 ; WX 600 ; N D ; B 23 -20 540 583 ; -C 69 ; WX 600 ; N E ; B 23 -20 540 583 ; -C 70 ; WX 600 ; N F ; B 23 -20 540 583 ; -C 71 ; WX 600 ; N G ; B 43 -35 582 598 ; -C 72 ; WX 600 ; N H ; B 33 -20 571 583 ; -C 73 ; WX 600 ; N I ; B 93 -20 507 583 ; -C 74 ; WX 600 ; N J ; B 64 -35 603 583 ; -C 75 ; WX 600 ; N K ; B 23 -20 592 583 ; -C 76 ; WX 600 ; N L ; B 43 -20 561 583 ; -C 77 ; WX 600 ; N M ; B -9 -20 613 583 ; -C 78 ; WX 600 ; N N ; B 2 -20 582 583 ; -C 79 ; WX 600 ; N O ; B 31 -35 569 598 ; -C 80 ; WX 600 ; N P ; B 23 -20 519 583 ; -C 81 ; WX 600 ; N Q ; B 31 -136 569 598 ; -C 82 ; WX 600 ; N R ; B 23 -20 609 583 ; -C 83 ; WX 600 ; N S ; B 72 -35 528 598 ; -C 84 ; WX 600 ; N T ; B 52 -20 548 583 ; -C 85 ; WX 600 ; N U ; B 20 -35 580 583 ; -C 86 ; WX 600 ; N V ; B -11 -20 611 583 ; -C 87 ; WX 600 ; N W ; B 0 -20 600 583 ; -C 88 ; WX 600 ; N X ; B 20 -20 580 583 ; -C 89 ; WX 600 ; N Y ; B 31 -20 569 583 ; -C 90 ; WX 600 ; N Z ; B 83 -20 517 583 ; -C 91 ; WX 600 ; N bracketleft ; B 260 -144 465 624 ; -C 92 ; WX 600 ; N backslash ; B 93 -103 507 686 ; -C 93 ; WX 600 ; N bracketright ; B 135 -144 340 624 ; -C 94 ; WX 600 ; N asciicircum ; B 93 335 507 624 ; -C 95 ; WX 600 ; N underscore ; B -32 -290 632 -210 ; -C 96 ; WX 600 ; N quoteleft ; B 260 304 465 613 ; -C 97 ; WX 600 ; N a ; B 52 -35 561 452 ; -C 98 ; WX 600 ; N b ; B 2 -35 561 624 ; -C 99 ; WX 600 ; N c ; B 64 -35 555 452 ; -C 100 ; WX 600 ; N d ; B 43 -35 603 624 ; -C 101 ; WX 600 ; N e ; B 43 -35 540 452 ; -C 102 ; WX 600 ; N f ; B 85 -20 561 624 ; L i fi ; L l fl ; -C 103 ; WX 600 ; N g ; B 43 -207 582 452 ; -C 104 ; WX 600 ; N h ; B 23 -20 571 624 ; -C 105 ; WX 600 ; N i ; B 72 -20 528 665 ; -C 106 ; WX 600 ; N j ; B 127 -207 478 665 ; -C 107 ; WX 600 ; N k ; B 43 -20 561 624 ; -C 108 ; WX 600 ; N l ; B 72 -20 528 624 ; -C 109 ; WX 600 ; N m ; B -9 -20 613 452 ; -C 110 ; WX 600 ; N n ; B 33 -20 561 452 ; -C 111 ; WX 600 ; N o ; B 52 -35 548 452 ; -C 112 ; WX 600 ; N p ; B 2 -207 561 452 ; -C 113 ; WX 600 ; N q ; B 43 -207 603 452 ; -C 114 ; WX 600 ; N r ; B 64 -20 561 448 ; -C 115 ; WX 600 ; N s ; B 83 -35 517 452 ; -C 116 ; WX 600 ; N t ; B 23 -35 519 582 ; -C 117 ; WX 600 ; N u ; B 23 -35 561 437 ; -C 118 ; WX 600 ; N v ; B 10 -20 590 437 ; -C 119 ; WX 600 ; N w ; B 10 -20 590 437 ; -C 120 ; WX 600 ; N x ; B 31 -20 569 437 ; -C 121 ; WX 600 ; N y ; B 31 -207 569 437 ; -C 122 ; WX 600 ; N z ; B 95 -20 509 437 ; -C 123 ; WX 600 ; N braceleft ; B 177 -144 423 624 ; -C 124 ; WX 600 ; N bar ; B 260 -144 340 624 ; -C 125 ; WX 600 ; N braceright ; B 177 -144 423 624 ; -C 126 ; WX 600 ; N asciitilde ; B 72 189 528 373 ; -C 161 ; WX 600 ; N exclamdown ; B 240 -207 360 415 ; -C 162 ; WX 600 ; N cent ; B 93 -19 489 665 ; -C 163 ; WX 600 ; N sterling ; B 43 -20 540 598 ; -C 164 ; WX 600 ; N fraction ; B 31 120 569 492 ; -C 165 ; WX 600 ; N yen ; B 31 -20 569 583 ; -C 166 ; WX 600 ; N florin ; B 67 -113 538 639 ; -C 167 ; WX 600 ; N section ; B 46 -87 554 629 ; -C 168 ; WX 600 ; N currency ; B 83 75 517 509 ; -C 169 ; WX 600 ; N quotesingle ; B 230 304 370 613 ; -C 170 ; WX 600 ; N quotedblleft ; B 93 340 507 619 ; -C 171 ; WX 600 ; N guillemotleft ; B 43 -20 561 437 ; -C 172 ; WX 600 ; N guilsinglleft ; B 43 -20 332 437 ; -C 173 ; WX 600 ; N guilsinglright ; B 273 -20 561 437 ; -C 174 ; WX 600 ; N fi ; B -10 -20 610 665 ; -C 175 ; WX 600 ; N fl ; B -10 -20 610 624 ; -C 177 ; WX 600 ; N endash ; B 52 241 548 321 ; -C 178 ; WX 600 ; N dagger ; B 104 -82 496 624 ; -C 179 ; WX 600 ; N daggerdbl ; B 104 -82 496 624 ; -C 180 ; WX 600 ; N periodcentered ; B 250 266 350 346 ; -C 182 ; WX 600 ; N paragraph ; B 59 -87 545 629 ; -C 183 ; WX 600 ; N bullet ; B 260 266 340 346 ; -C 184 ; WX 600 ; N quotesinglbase ; B 135 -165 340 144 ; -C 185 ; WX 600 ; N quotedblbase ; B 93 -139 507 139 ; -C 186 ; WX 600 ; N quotedblright ; B 93 340 507 619 ; -C 187 ; WX 600 ; N guillemotright ; B 43 -20 561 437 ; -C 188 ; WX 600 ; N ellipsis ; B 60 -5 540 75 ; -C 189 ; WX 600 ; N perthousand ; B 10 -35 590 639 ; -C 191 ; WX 600 ; N questiondown ; B 93 -207 486 415 ; -C 193 ; WX 600 ; N grave ; B 135 450 340 639 ; -C 194 ; WX 600 ; N acute ; B 260 450 465 639 ; -C 195 ; WX 600 ; N circumflex ; B 135 450 465 624 ; -C 196 ; WX 600 ; N tilde ; B 125 441 475 580 ; -C 197 ; WX 600 ; N macron ; B 135 476 465 556 ; -C 198 ; WX 600 ; N breve ; B 135 450 465 624 ; -C 199 ; WX 600 ; N dotaccent ; B 260 491 340 571 ; -C 200 ; WX 600 ; N dieresis ; B 156 491 444 571 ; -C 202 ; WX 600 ; N ring ; B 187 413 413 634 ; -C 203 ; WX 600 ; N cedilla ; B 190 -186 397 40 ; -C 205 ; WX 600 ; N hungarumlaut ; B 135 450 465 639 ; -C 206 ; WX 600 ; N ogonek ; B 260 -165 453 40 ; -C 207 ; WX 600 ; N caron ; B 135 450 465 624 ; -C 208 ; WX 600 ; N emdash ; B -19 241 619 321 ; -C 225 ; WX 600 ; N AE ; B -10 -20 610 583 ; -C 227 ; WX 600 ; N ordfeminine ; B 127 179 478 598 ; -C 232 ; WX 600 ; N Lslash ; B 23 -20 561 583 ; -C 233 ; WX 600 ; N Oslash ; B 20 -61 580 623 ; -C 234 ; WX 600 ; N OE ; B -10 -20 610 583 ; -C 235 ; WX 600 ; N ordmasculine ; B 131 179 469 598 ; -C 241 ; WX 600 ; N ae ; B -10 -35 600 452 ; -C 245 ; WX 600 ; N dotlessi ; B 72 -20 528 437 ; -C 248 ; WX 600 ; N lslash ; B 72 -20 528 624 ; -C 249 ; WX 600 ; N oslash ; B 33 -61 563 478 ; -C 250 ; WX 600 ; N oe ; B -10 -35 600 452 ; -C 251 ; WX 600 ; N germandbls ; B 23 -35 519 624 ; -C -1 ; WX 600 ; N Aacute ; B -11 -20 611 789 ; -C -1 ; WX 600 ; N Acircumflex ; B -11 -20 611 774 ; -C -1 ; WX 600 ; N Adieresis ; B -11 -20 611 721 ; -C -1 ; WX 600 ; N Agrave ; B -11 -20 611 789 ; -C -1 ; WX 600 ; N Aring ; B -11 -20 611 795 ; -C -1 ; WX 600 ; N Atilde ; B -11 -20 611 730 ; -C -1 ; WX 600 ; N Ccedilla ; B 43 -186 554 598 ; -C -1 ; WX 600 ; N Eacute ; B 23 -20 540 789 ; -C -1 ; WX 600 ; N Ecircumflex ; B 23 -20 540 774 ; -C -1 ; WX 600 ; N Edieresis ; B 23 -20 540 721 ; -C -1 ; WX 600 ; N Egrave ; B 23 -20 540 789 ; -C -1 ; WX 600 ; N Eth ; B 23 -20 540 583 ; -C -1 ; WX 600 ; N Gcaron ; B 43 -35 582 774 ; -C -1 ; WX 600 ; N IJ ; B -10 -35 610 583 ; -C -1 ; WX 600 ; N Iacute ; B 93 -20 507 789 ; -C -1 ; WX 600 ; N Icircumflex ; B 93 -20 507 774 ; -C -1 ; WX 600 ; N Idieresis ; B 93 -20 507 721 ; -C -1 ; WX 600 ; N Idot ; B 93 -20 507 721 ; -C -1 ; WX 600 ; N Igrave ; B 93 -20 507 789 ; -C -1 ; WX 600 ; N LL ; B -20 -20 620 583 ; -C -1 ; WX 600 ; N Ntilde ; B 2 -20 582 730 ; -C -1 ; WX 600 ; N Oacute ; B 31 -35 569 789 ; -C -1 ; WX 600 ; N Ocircumflex ; B 31 -35 569 774 ; -C -1 ; WX 600 ; N Odieresis ; B 31 -35 569 721 ; -C -1 ; WX 600 ; N Ograve ; B 31 -35 569 789 ; -C -1 ; WX 600 ; N Otilde ; B 31 -35 569 730 ; -C -1 ; WX 600 ; N Scaron ; B 72 -35 528 774 ; -C -1 ; WX 600 ; N Scedilla ; B 72 -186 528 598 ; -C -1 ; WX 600 ; N Thorn ; B 23 -20 539 583 ; -C -1 ; WX 600 ; N Uacute ; B 20 -35 580 789 ; -C -1 ; WX 600 ; N Ucircumflex ; B 20 -35 580 774 ; -C -1 ; WX 600 ; N Udieresis ; B 20 -35 580 721 ; -C -1 ; WX 600 ; N Ugrave ; B 20 -35 580 789 ; -C -1 ; WX 600 ; N Yacute ; B 31 -20 569 789 ; -C -1 ; WX 600 ; N Ydieresis ; B 31 -20 569 721 ; -C -1 ; WX 600 ; N Zcaron ; B 83 -20 517 774 ; -C -1 ; WX 600 ; N aacute ; B 52 -35 561 660 ; -C -1 ; WX 600 ; N acircumflex ; B 52 -35 561 653 ; -C -1 ; WX 600 ; N adieresis ; B 52 -35 561 592 ; -C -1 ; WX 600 ; N agrave ; B 52 -35 561 660 ; -C -1 ; WX 600 ; N aring ; B 52 -35 561 686 ; -C -1 ; WX 600 ; N arrowboth ; B -40 110 640 490 ; -C -1 ; WX 600 ; N arrowdown ; B 110 -20 490 639 ; -C -1 ; WX 600 ; N arrowleft ; B -40 110 640 490 ; -C -1 ; WX 600 ; N arrowright ; B -40 110 640 490 ; -C -1 ; WX 600 ; N arrowup ; B 110 -20 490 639 ; -C -1 ; WX 600 ; N atilde ; B 52 -35 561 618 ; -C -1 ; WX 600 ; N brokenbar ; B 260 -144 340 624 ; -C -1 ; WX 600 ; N ccedilla ; B 64 -186 555 452 ; -C -1 ; WX 600 ; N center ; B 0 -20 600 624 ; -C -1 ; WX 600 ; N copyright ; B -20 -35 620 598 ; -C -1 ; WX 600 ; N dectab ; B -5 -20 605 248 ; -C -1 ; WX 600 ; N degree ; B 135 294 465 624 ; -C -1 ; WX 600 ; N divide ; B 52 51 548 531 ; -C -1 ; WX 600 ; N down ; B 154 -20 446 452 ; -C -1 ; WX 600 ; N eacute ; B 43 -35 540 664 ; -C -1 ; WX 600 ; N ecircumflex ; B 43 -35 540 653 ; -C -1 ; WX 600 ; N edieresis ; B 43 -35 540 592 ; -C -1 ; WX 600 ; N egrave ; B 43 -35 540 664 ; -C -1 ; WX 600 ; N eth ; B 52 -35 548 639 ; -C -1 ; WX 600 ; N format ; B -15 -207 65 624 ; -C -1 ; WX 600 ; N gcaron ; B 43 -207 582 645 ; -C -1 ; WX 600 ; N graybox ; B 35 -40 565 640 ; -C -1 ; WX 600 ; N iacute ; B 72 -20 528 660 ; -C -1 ; WX 600 ; N icircumflex ; B 72 -20 528 634 ; -C -1 ; WX 600 ; N idieresis ; B 72 -20 528 592 ; -C -1 ; WX 600 ; N igrave ; B 72 -20 528 656 ; -C -1 ; WX 600 ; N ij ; B 10 -207 550 665 ; -C -1 ; WX 600 ; N indent ; B 54 60 546 352 ; -C -1 ; WX 600 ; N largebullet ; B 260 266 340 346 ; -C -1 ; WX 600 ; N left ; B 54 60 546 352 ; -C -1 ; WX 600 ; N lira ; B 43 -20 540 598 ; -C -1 ; WX 600 ; N ll ; B 0 -20 600 624 ; -C -1 ; WX 600 ; N logicalnot ; B 52 154 548 394 ; -C -1 ; WX 600 ; N merge ; B 154 -20 446 452 ; -C -1 ; WX 600 ; N minus ; B 52 241 548 321 ; -C -1 ; WX 600 ; N mu ; B 23 -207 561 437 ; -C -1 ; WX 600 ; N multiply ; B 82 12 518 470 ; -C -1 ; WX 600 ; N notegraphic ; B 150 -5 450 639 ; -C -1 ; WX 600 ; N ntilde ; B 33 -20 561 618 ; -C -1 ; WX 600 ; N oacute ; B 52 -35 548 649 ; -C -1 ; WX 600 ; N ocircumflex ; B 52 -35 548 653 ; -C -1 ; WX 600 ; N odieresis ; B 52 -35 548 592 ; -C -1 ; WX 600 ; N ograve ; B 52 -35 548 649 ; -C -1 ; WX 600 ; N onehalf ; B -10 -20 610 624 ; -C -1 ; WX 600 ; N onequarter ; B -10 -20 610 624 ; -C -1 ; WX 600 ; N onesuperior ; B 160 200 440 624 ; -C -1 ; WX 600 ; N otilde ; B 52 -35 548 597 ; -C -1 ; WX 600 ; N overscore ; B -32 559 632 639 ; -C -1 ; WX 600 ; N plusminus ; B 52 -20 548 550 ; -C -1 ; WX 600 ; N prescription ; B 23 -20 609 583 ; -C -1 ; WX 600 ; N registered ; B -20 -35 620 598 ; -C -1 ; WX 600 ; N return ; B -24 -20 624 608 ; -C -1 ; WX 600 ; N scaron ; B 83 -35 517 645 ; -C -1 ; WX 600 ; N scedilla ; B 83 -186 517 452 ; -C -1 ; WX 600 ; N square ; B -24 -20 624 608 ; -C -1 ; WX 600 ; N stop ; B -24 -20 624 608 ; -C -1 ; WX 600 ; N tab ; B -24 -20 624 608 ; -C -1 ; WX 600 ; N thorn ; B 2 -207 561 624 ; -C -1 ; WX 600 ; N threequarters ; B -10 -20 610 639 ; -C -1 ; WX 600 ; N threesuperior ; B 155 191 452 639 ; -C -1 ; WX 600 ; N trademark ; B -20 230 620 583 ; -C -1 ; WX 600 ; N twosuperior ; B 140 200 431 639 ; -C -1 ; WX 600 ; N uacute ; B 23 -35 561 656 ; -C -1 ; WX 600 ; N ucircumflex ; B 23 -35 561 634 ; -C -1 ; WX 600 ; N udieresis ; B 23 -35 561 592 ; -C -1 ; WX 600 ; N ugrave ; B 23 -35 561 656 ; -C -1 ; WX 600 ; N up ; B 154 -20 446 452 ; -C -1 ; WX 600 ; N yacute ; B 31 -207 569 656 ; -C -1 ; WX 600 ; N ydieresis ; B 31 -207 569 571 ; -C -1 ; WX 600 ; N zcaron ; B 95 -20 509 645 ; -EndCharMetrics -StartComposites 58 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 0 146 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 0 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 0 146 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 0 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 0 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 0 0 ; -CC Yacute 2 ; PCC Y 0 0 ; PCC acute 0 146 ; -CC yacute 2 ; PCC y 0 0 ; PCC acute 0 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 0 146 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 0 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 0 146 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 0 146 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 0 146 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 0 146 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 0 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 0 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 0 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 0 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 146 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 0 146 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 0 146 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 146 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex 0 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis 0 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 0 146 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 0 146 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 0 146 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 0 146 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 0 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 0 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 0 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 0 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 0 146 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 0 146 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 0 146 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 0 146 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 0 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 0 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 0 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 0 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 0 146 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 0 146 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 0 146 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 0 146 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 0 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 0 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 0 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 0 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 0 146 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 0 146 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 0 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 0 146 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 0 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 0 146 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ; -EndComposites -EndFontMetrics diff --git a/samples/printing/CourBo.afm b/samples/printing/CourBo.afm deleted file mode 100644 index 5a2fbdc071..0000000000 --- a/samples/printing/CourBo.afm +++ /dev/null @@ -1,341 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Wed Feb 25 16:06:47 PST 1987 -FontName Courier-Bold -EncodingScheme AdobeStandardEncoding -FullName Courier Bold -FamilyName Courier -Weight Bold -ItalicAngle 0.0 -IsFixedPitch true -UnderlinePosition -85 -UnderlineThickness 100 -Version 001.003 -FontBBox -100 -350 700 855 -CapHeight 633 -XHeight 487 -Descender -257 -Ascender 674 -StartCharMetrics 260 -C 32 ; WX 600 ; N space ; B 500 -100 700 100 ; -C 33 ; WX 600 ; N exclam ; B 170 -65 430 689 ; -C 34 ; WX 600 ; N quotedbl ; B 66 254 534 663 ; -C 35 ; WX 600 ; N numbersign ; B 12 -142 588 725 ; -C 36 ; WX 600 ; N dollar ; B 33 -173 567 735 ; -C 37 ; WX 600 ; N percent ; B 7 -65 593 689 ; -C 38 ; WX 600 ; N ampersand ; B 25 -65 558 600 ; -C 39 ; WX 600 ; N quoteright ; B 75 244 400 674 ; -C 40 ; WX 600 ; N parenleft ; B 214 -204 538 683 ; -C 41 ; WX 600 ; N parenright ; B 67 -204 391 683 ; -C 42 ; WX 600 ; N asterisk ; B 33 150 567 674 ; -C 43 ; WX 600 ; N plus ; B -8 -48 608 610 ; -C 44 ; WX 600 ; N comma ; B 75 -215 400 215 ; -C 45 ; WX 600 ; N hyphen ; B -8 181 608 381 ; -C 46 ; WX 600 ; N period ; B 190 -50 410 150 ; -C 47 ; WX 600 ; N slash ; B 33 -163 567 746 ; -C 48 ; WX 600 ; N zero ; B 33 -65 567 689 ; -C 49 ; WX 600 ; N one ; B 33 -50 567 674 ; -C 50 ; WX 600 ; N two ; B 4 -50 558 689 ; -C 51 ; WX 600 ; N three ; B 16 -65 579 689 ; -C 52 ; WX 600 ; N four ; B 25 -50 558 674 ; -C 53 ; WX 600 ; N five ; B 16 -65 579 674 ; -C 54 ; WX 600 ; N six ; B 56 -65 590 689 ; -C 55 ; WX 600 ; N seven ; B 25 -50 558 674 ; -C 56 ; WX 600 ; N eight ; B 33 -65 567 689 ; -C 57 ; WX 600 ; N nine ; B 56 -65 590 689 ; -C 58 ; WX 600 ; N colon ; B 190 -50 410 472 ; -C 59 ; WX 600 ; N semicolon ; B 79 -176 410 472 ; -C 60 ; WX 600 ; N less ; B -8 -48 608 610 ; -C 61 ; WX 600 ; N equal ; B -29 88 629 474 ; -C 62 ; WX 600 ; N greater ; B -8 -48 608 610 ; -C 63 ; WX 600 ; N question ; B 54 -65 567 648 ; -C 64 ; WX 600 ; N at ; B 26 -142 559 705 ; -C 65 ; WX 600 ; N A ; B -71 -50 671 633 ; -C 66 ; WX 600 ; N B ; B -37 -50 621 633 ; -C 67 ; WX 600 ; N C ; B -17 -65 614 648 ; -C 68 ; WX 600 ; N D ; B -37 -50 600 633 ; -C 69 ; WX 600 ; N E ; B -37 -50 600 633 ; -C 70 ; WX 600 ; N F ; B -37 -50 600 633 ; -C 71 ; WX 600 ; N G ; B -17 -65 642 648 ; -C 72 ; WX 600 ; N H ; B -27 -50 631 633 ; -C 73 ; WX 600 ; N I ; B 33 -50 567 633 ; -C 74 ; WX 600 ; N J ; B 4 -65 663 633 ; -C 75 ; WX 600 ; N K ; B -37 -50 652 633 ; -C 76 ; WX 600 ; N L ; B -17 -50 621 633 ; -C 77 ; WX 600 ; N M ; B -69 -50 673 633 ; -C 78 ; WX 600 ; N N ; B -58 -50 642 633 ; -C 79 ; WX 600 ; N O ; B -29 -65 629 648 ; -C 80 ; WX 600 ; N P ; B -37 -50 579 633 ; -C 81 ; WX 600 ; N Q ; B -29 -196 629 648 ; -C 82 ; WX 600 ; N R ; B -37 -50 669 633 ; -C 83 ; WX 600 ; N S ; B 12 -65 588 648 ; -C 84 ; WX 600 ; N T ; B -8 -50 608 633 ; -C 85 ; WX 600 ; N U ; B -40 -65 640 633 ; -C 86 ; WX 600 ; N V ; B -71 -50 671 633 ; -C 87 ; WX 600 ; N W ; B -60 -50 660 633 ; -C 88 ; WX 600 ; N X ; B -40 -50 640 633 ; -C 89 ; WX 600 ; N Y ; B -29 -50 629 633 ; -C 90 ; WX 600 ; N Z ; B 23 -50 577 633 ; -C 91 ; WX 600 ; N bracketleft ; B 200 -204 525 674 ; -C 92 ; WX 600 ; N backslash ; B 33 -163 567 746 ; -C 93 ; WX 600 ; N bracketright ; B 75 -204 400 674 ; -C 94 ; WX 600 ; N asciicircum ; B 33 275 567 674 ; -C 95 ; WX 600 ; N underscore ; B -92 -350 692 -150 ; -C 96 ; WX 600 ; N quoteleft ; B 200 244 525 674 ; -C 97 ; WX 600 ; N a ; B -8 -65 621 502 ; -C 98 ; WX 600 ; N b ; B -58 -65 621 674 ; -C 99 ; WX 600 ; N c ; B 4 -65 615 502 ; -C 100 ; WX 600 ; N d ; B -17 -65 663 674 ; -C 101 ; WX 600 ; N e ; B -17 -65 600 502 ; -C 102 ; WX 600 ; N f ; B 25 -50 621 674 ; L i fi ; L l fl ; -C 103 ; WX 600 ; N g ; B -17 -257 642 502 ; -C 104 ; WX 600 ; N h ; B -37 -50 631 674 ; -C 105 ; WX 600 ; N i ; B 12 -50 588 725 ; -C 106 ; WX 600 ; N j ; B 67 -257 538 725 ; -C 107 ; WX 600 ; N k ; B -17 -50 621 674 ; -C 108 ; WX 600 ; N l ; B 12 -50 588 674 ; -C 109 ; WX 600 ; N m ; B -69 -50 673 502 ; -C 110 ; WX 600 ; N n ; B -27 -50 621 502 ; -C 111 ; WX 600 ; N o ; B -8 -65 608 502 ; -C 112 ; WX 600 ; N p ; B -58 -257 621 502 ; -C 113 ; WX 600 ; N q ; B -17 -257 663 502 ; -C 114 ; WX 600 ; N r ; B 4 -50 621 501 ; -C 115 ; WX 600 ; N s ; B 23 -65 577 502 ; -C 116 ; WX 600 ; N t ; B -37 -65 579 642 ; -C 117 ; WX 600 ; N u ; B -37 -65 621 487 ; -C 118 ; WX 600 ; N v ; B -50 -50 650 487 ; -C 119 ; WX 600 ; N w ; B -50 -50 650 487 ; -C 120 ; WX 600 ; N x ; B -29 -50 629 487 ; -C 121 ; WX 600 ; N y ; B -29 -257 629 487 ; -C 122 ; WX 600 ; N z ; B 35 -50 569 487 ; -C 123 ; WX 600 ; N braceleft ; B 117 -204 483 674 ; -C 124 ; WX 600 ; N bar ; B 200 -204 400 674 ; -C 125 ; WX 600 ; N braceright ; B 117 -204 483 674 ; -C 126 ; WX 600 ; N asciitilde ; B 12 129 588 433 ; -C 161 ; WX 600 ; N exclamdown ; B 170 -257 430 475 ; -C 162 ; WX 600 ; N cent ; B 33 -79 549 725 ; -C 163 ; WX 600 ; N sterling ; B -17 -50 600 648 ; -C 164 ; WX 600 ; N fraction ; B -29 60 629 552 ; -C 165 ; WX 600 ; N yen ; B -29 -50 629 633 ; -C 166 ; WX 600 ; N florin ; B 7 -173 598 689 ; -C 167 ; WX 600 ; N section ; B -14 -147 614 689 ; -C 168 ; WX 600 ; N currency ; B 23 15 577 569 ; -C 169 ; WX 600 ; N quotesingle ; B 170 244 430 674 ; -C 170 ; WX 600 ; N quotedblleft ; B 33 280 567 678 ; -C 171 ; WX 600 ; N guillemotleft ; B -17 -50 621 487 ; -C 172 ; WX 600 ; N guilsinglleft ; B -17 -50 392 487 ; -C 173 ; WX 600 ; N guilsinglright ; B 213 -50 621 487 ; -C 174 ; WX 600 ; N fi ; B -70 -50 670 725 ; -C 175 ; WX 600 ; N fl ; B -70 -50 670 674 ; -C 177 ; WX 600 ; N endash ; B -8 181 608 381 ; -C 178 ; WX 600 ; N dagger ; B 44 -142 556 674 ; -C 179 ; WX 600 ; N daggerdbl ; B 44 -142 556 674 ; -C 180 ; WX 600 ; N periodcentered ; B 190 206 410 406 ; -C 182 ; WX 600 ; N paragraph ; B -1 -147 605 689 ; -C 183 ; WX 600 ; N bullet ; B 200 206 400 406 ; -C 184 ; WX 600 ; N quotesinglbase ; B 75 -225 400 204 ; -C 185 ; WX 600 ; N quotedblbase ; B 33 -199 567 199 ; -C 186 ; WX 600 ; N quotedblright ; B 33 280 567 678 ; -C 187 ; WX 600 ; N guillemotright ; B -17 -50 621 487 ; -C 188 ; WX 600 ; N ellipsis ; B 0 -65 600 135 ; -C 189 ; WX 600 ; N perthousand ; B -50 -65 650 689 ; -C 191 ; WX 600 ; N questiondown ; B 33 -257 546 475 ; -C 193 ; WX 600 ; N grave ; B 75 390 400 689 ; -C 194 ; WX 600 ; N acute ; B 200 390 525 689 ; -C 195 ; WX 600 ; N circumflex ; B 75 390 525 674 ; -C 196 ; WX 600 ; N tilde ; B 65 381 535 640 ; -C 197 ; WX 600 ; N macron ; B 75 416 525 616 ; -C 198 ; WX 600 ; N breve ; B 75 390 525 674 ; -C 199 ; WX 600 ; N dotaccent ; B 200 431 400 631 ; -C 200 ; WX 600 ; N dieresis ; B 96 431 504 631 ; -C 202 ; WX 600 ; N ring ; B 127 353 473 694 ; -C 203 ; WX 600 ; N cedilla ; B 130 -246 457 100 ; -C 205 ; WX 600 ; N hungarumlaut ; B 75 390 525 689 ; -C 206 ; WX 600 ; N ogonek ; B 200 -225 513 100 ; -C 207 ; WX 600 ; N caron ; B 75 390 525 674 ; -C 208 ; WX 600 ; N emdash ; B -79 181 679 381 ; -C 225 ; WX 600 ; N AE ; B -70 -50 670 633 ; -C 227 ; WX 600 ; N ordfeminine ; B 68 120 539 649 ; -C 232 ; WX 600 ; N Lslash ; B -37 -50 621 633 ; -C 233 ; WX 600 ; N Oslash ; B -40 -121 640 683 ; -C 234 ; WX 600 ; N OE ; B -70 -50 670 633 ; -C 235 ; WX 600 ; N ordmasculine ; B 72 120 530 649 ; -C 241 ; WX 600 ; N ae ; B -70 -65 660 502 ; -C 245 ; WX 600 ; N dotlessi ; B 12 -50 588 487 ; -C 248 ; WX 600 ; N lslash ; B 12 -50 588 674 ; -C 249 ; WX 600 ; N oslash ; B -27 -121 623 538 ; -C 250 ; WX 600 ; N oe ; B -70 -65 660 502 ; -C 251 ; WX 600 ; N germandbls ; B -37 -65 579 674 ; -C -1 ; WX 600 ; N Aacute ; B -71 -50 671 839 ; -C -1 ; WX 600 ; N Acircumflex ; B -71 -50 671 824 ; -C -1 ; WX 600 ; N Adieresis ; B -71 -50 671 781 ; -C -1 ; WX 600 ; N Agrave ; B -71 -50 671 839 ; -C -1 ; WX 600 ; N Aring ; B -71 -50 671 855 ; -C -1 ; WX 600 ; N Atilde ; B -71 -50 671 790 ; -C -1 ; WX 600 ; N Ccedilla ; B -17 -246 614 648 ; -C -1 ; WX 600 ; N Eacute ; B -37 -50 600 839 ; -C -1 ; WX 600 ; N Ecircumflex ; B -37 -50 600 824 ; -C -1 ; WX 600 ; N Edieresis ; B -37 -50 600 781 ; -C -1 ; WX 600 ; N Egrave ; B -37 -50 600 839 ; -C -1 ; WX 600 ; N Eth ; B -37 -50 600 633 ; -C -1 ; WX 600 ; N Gcaron ; B -17 -65 642 824 ; -C -1 ; WX 600 ; N IJ ; B -70 -65 670 633 ; -C -1 ; WX 600 ; N Iacute ; B 33 -50 567 839 ; -C -1 ; WX 600 ; N Icircumflex ; B 33 -50 567 824 ; -C -1 ; WX 600 ; N Idieresis ; B 33 -50 567 781 ; -C -1 ; WX 600 ; N Idot ; B 33 -50 567 781 ; -C -1 ; WX 600 ; N Igrave ; B 33 -50 567 839 ; -C -1 ; WX 600 ; N LL ; B -80 -50 680 633 ; -C -1 ; WX 600 ; N Ntilde ; B -58 -50 642 790 ; -C -1 ; WX 600 ; N Oacute ; B -29 -65 629 839 ; -C -1 ; WX 600 ; N Ocircumflex ; B -29 -65 629 824 ; -C -1 ; WX 600 ; N Odieresis ; B -29 -65 629 781 ; -C -1 ; WX 600 ; N Ograve ; B -29 -65 629 839 ; -C -1 ; WX 600 ; N Otilde ; B -29 -65 629 790 ; -C -1 ; WX 600 ; N Scaron ; B 12 -65 588 824 ; -C -1 ; WX 600 ; N Scedilla ; B 12 -246 588 648 ; -C -1 ; WX 600 ; N Thorn ; B -37 -50 599 633 ; -C -1 ; WX 600 ; N Uacute ; B -40 -65 640 839 ; -C -1 ; WX 600 ; N Ucircumflex ; B -40 -65 640 824 ; -C -1 ; WX 600 ; N Udieresis ; B -40 -65 640 781 ; -C -1 ; WX 600 ; N Ugrave ; B -40 -65 640 839 ; -C -1 ; WX 600 ; N Yacute ; B -29 -50 629 839 ; -C -1 ; WX 600 ; N Ydieresis ; B -29 -50 629 781 ; -C -1 ; WX 600 ; N Zcaron ; B 23 -50 577 824 ; -C -1 ; WX 600 ; N aacute ; B -8 -65 621 710 ; -C -1 ; WX 600 ; N acircumflex ; B -8 -65 621 703 ; -C -1 ; WX 600 ; N adieresis ; B -8 -65 621 652 ; -C -1 ; WX 600 ; N agrave ; B -8 -65 621 710 ; -C -1 ; WX 600 ; N aring ; B -8 -65 621 746 ; -C -1 ; WX 600 ; N arrowboth ; B -100 50 700 550 ; -C -1 ; WX 600 ; N arrowdown ; B 50 -50 550 689 ; -C -1 ; WX 600 ; N arrowleft ; B -100 50 700 550 ; -C -1 ; WX 600 ; N arrowright ; B -100 50 700 550 ; -C -1 ; WX 600 ; N arrowup ; B 50 -50 550 689 ; -C -1 ; WX 600 ; N atilde ; B -8 -65 621 678 ; -C -1 ; WX 600 ; N brokenbar ; B 200 -204 400 674 ; -C -1 ; WX 600 ; N ccedilla ; B 4 -246 615 502 ; -C -1 ; WX 600 ; N center ; B -60 -50 660 684 ; -C -1 ; WX 600 ; N copyright ; B -80 -65 680 648 ; -C -1 ; WX 600 ; N dectab ; B -65 -50 665 308 ; -C -1 ; WX 600 ; N degree ; B 75 234 525 674 ; -C -1 ; WX 600 ; N divide ; B -8 -9 608 591 ; -C -1 ; WX 600 ; N down ; B 94 -50 506 502 ; -C -1 ; WX 600 ; N eacute ; B -17 -65 600 714 ; -C -1 ; WX 600 ; N ecircumflex ; B -17 -65 600 703 ; -C -1 ; WX 600 ; N edieresis ; B -17 -65 600 652 ; -C -1 ; WX 600 ; N egrave ; B -17 -65 600 714 ; -C -1 ; WX 600 ; N eth ; B -8 -65 608 689 ; -C -1 ; WX 600 ; N format ; B -75 -257 125 674 ; -C -1 ; WX 600 ; N gcaron ; B -17 -257 642 695 ; -C -1 ; WX 600 ; N graybox ; B -25 -100 625 700 ; -C -1 ; WX 600 ; N iacute ; B 12 -50 588 710 ; -C -1 ; WX 600 ; N icircumflex ; B 12 -50 588 684 ; -C -1 ; WX 600 ; N idieresis ; B 12 -50 588 652 ; -C -1 ; WX 600 ; N igrave ; B 12 -50 588 706 ; -C -1 ; WX 600 ; N ij ; B -50 -257 610 725 ; -C -1 ; WX 600 ; N indent ; B -6 0 606 412 ; -C -1 ; WX 600 ; N largebullet ; B 200 206 400 406 ; -C -1 ; WX 600 ; N left ; B -6 0 606 412 ; -C -1 ; WX 600 ; N lira ; B -17 -50 600 648 ; -C -1 ; WX 600 ; N ll ; B -60 -50 660 674 ; -C -1 ; WX 600 ; N logicalnot ; B -8 94 608 454 ; -C -1 ; WX 600 ; N merge ; B 94 -50 506 502 ; -C -1 ; WX 600 ; N minus ; B -8 181 608 381 ; -C -1 ; WX 600 ; N mu ; B -37 -257 621 487 ; -C -1 ; WX 600 ; N multiply ; B 22 -48 578 530 ; -C -1 ; WX 600 ; N notegraphic ; B 80 -65 520 689 ; -C -1 ; WX 600 ; N ntilde ; B -27 -50 621 678 ; -C -1 ; WX 600 ; N oacute ; B -8 -65 608 699 ; -C -1 ; WX 600 ; N ocircumflex ; B -8 -65 608 703 ; -C -1 ; WX 600 ; N odieresis ; B -8 -65 608 652 ; -C -1 ; WX 600 ; N ograve ; B -8 -65 608 699 ; -C -1 ; WX 600 ; N onehalf ; B -70 -65 670 674 ; -C -1 ; WX 600 ; N onequarter ; B -70 -50 670 674 ; -C -1 ; WX 600 ; N onesuperior ; B 100 140 500 674 ; -C -1 ; WX 600 ; N otilde ; B -8 -65 608 657 ; -C -1 ; WX 600 ; N overscore ; B -92 489 692 689 ; -C -1 ; WX 600 ; N plusminus ; B -8 -50 608 610 ; -C -1 ; WX 600 ; N prescription ; B -37 -50 669 633 ; -C -1 ; WX 600 ; N registered ; B -80 -65 680 648 ; -C -1 ; WX 600 ; N return ; B -84 -50 684 668 ; -C -1 ; WX 600 ; N scaron ; B 23 -65 577 695 ; -C -1 ; WX 600 ; N scedilla ; B 23 -246 577 502 ; -C -1 ; WX 600 ; N square ; B -84 -50 684 668 ; -C -1 ; WX 600 ; N stop ; B -84 -50 684 668 ; -C -1 ; WX 600 ; N tab ; B -84 -50 684 668 ; -C -1 ; WX 600 ; N thorn ; B -58 -257 621 674 ; -C -1 ; WX 600 ; N threequarters ; B -70 -50 670 689 ; -C -1 ; WX 600 ; N threesuperior ; B 95 131 512 689 ; -C -1 ; WX 600 ; N trademark ; B -80 170 680 633 ; -C -1 ; WX 600 ; N twosuperior ; B 80 140 491 689 ; -C -1 ; WX 600 ; N uacute ; B -37 -65 621 706 ; -C -1 ; WX 600 ; N ucircumflex ; B -37 -65 621 684 ; -C -1 ; WX 600 ; N udieresis ; B -37 -65 621 652 ; -C -1 ; WX 600 ; N ugrave ; B -37 -65 621 706 ; -C -1 ; WX 600 ; N up ; B 94 -50 506 502 ; -C -1 ; WX 600 ; N yacute ; B -29 -257 629 706 ; -C -1 ; WX 600 ; N ydieresis ; B -29 -257 629 631 ; -C -1 ; WX 600 ; N zcaron ; B 35 -50 569 695 ; -EndCharMetrics -StartComposites 58 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 0 146 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 0 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 0 146 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 0 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 0 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 0 0 ; -CC Yacute 2 ; PCC Y 0 0 ; PCC acute 0 146 ; -CC yacute 2 ; PCC y 0 0 ; PCC acute 0 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 0 146 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 0 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 0 146 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 0 146 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 0 146 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 0 146 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 0 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 0 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 0 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 0 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 146 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 0 146 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 0 146 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 146 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex 0 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis 0 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 0 146 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 0 146 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 0 146 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 0 146 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 0 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 0 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 0 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 0 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 0 146 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 0 146 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 0 146 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 0 146 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 0 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 0 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 0 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 0 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 0 146 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 0 146 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 0 146 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 0 146 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 0 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 0 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 0 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 0 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 0 146 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 0 146 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 0 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 0 146 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 0 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 0 146 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ; -EndComposites -EndFontMetrics diff --git a/samples/printing/CourBoO.afm b/samples/printing/CourBoO.afm deleted file mode 100644 index 603eab5278..0000000000 --- a/samples/printing/CourBoO.afm +++ /dev/null @@ -1,341 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Wed Feb 25 16:19:52 PST 1987 -FontName Courier-BoldOblique -EncodingScheme AdobeStandardEncoding -FullName Courier Bold Oblique -FamilyName Courier -Weight Bold -ItalicAngle -12.0 -IsFixedPitch true -UnderlinePosition -85 -UnderlineThickness 100 -Version 001.003 -FontBBox -145 -350 817 855 -CapHeight 633 -XHeight 487 -Descender -257 -Ascender 674 -StartCharMetrics 260 -C 32 ; WX 600 ; N space ; B 500 -100 700 100 ; -C 33 ; WX 600 ; N exclam ; B 197 -65 549 689 ; -C 34 ; WX 600 ; N quotedbl ; B 171 254 654 663 ; -C 35 ; WX 600 ; N numbersign ; B 52 -142 672 725 ; -C 36 ; WX 600 ; N dollar ; B 51 -173 659 735 ; -C 37 ; WX 600 ; N percent ; B 58 -65 671 689 ; -C 38 ; WX 600 ; N ampersand ; B 52 -65 607 600 ; -C 39 ; WX 600 ; N quoteright ; B 148 244 522 674 ; -C 40 ; WX 600 ; N parenleft ; B 255 -204 662 683 ; -C 41 ; WX 600 ; N parenright ; B 45 -204 452 683 ; -C 42 ; WX 600 ; N asterisk ; B 131 150 665 674 ; -C 43 ; WX 600 ; N plus ; B 52 -48 668 610 ; -C 44 ; WX 600 ; N comma ; B 51 -215 424 215 ; -C 45 ; WX 600 ; N hyphen ; B 52 181 668 381 ; -C 46 ; WX 600 ; N period ; B 201 -50 421 150 ; -C 47 ; WX 600 ; N slash ; B 20 -163 704 746 ; -C 48 ; WX 600 ; N zero ; B 82 -65 649 689 ; -C 49 ; WX 600 ; N one ; B 44 -50 578 674 ; -C 50 ; WX 600 ; N two ; B 15 -50 656 689 ; -C 51 ; WX 600 ; N three ; B 30 -65 659 689 ; -C 52 ; WX 600 ; N four ; B 65 -50 618 674 ; -C 53 ; WX 600 ; N five ; B 33 -65 660 674 ; -C 54 ; WX 600 ; N six ; B 108 -65 712 689 ; -C 55 ; WX 600 ; N seven ; B 136 -50 680 674 ; -C 56 ; WX 600 ; N eight ; B 64 -65 655 689 ; -C 57 ; WX 600 ; N nine ; B 67 -65 665 689 ; -C 58 ; WX 600 ; N colon ; B 201 -50 489 472 ; -C 59 ; WX 600 ; N semicolon ; B 63 -176 489 472 ; -C 60 ; WX 600 ; N less ; B 52 -48 716 610 ; -C 61 ; WX 600 ; N equal ; B 11 88 708 474 ; -C 62 ; WX 600 ; N greater ; B 3 -48 668 610 ; -C 63 ; WX 600 ; N question ; B 148 -65 657 648 ; -C 64 ; WX 600 ; N at ; B 61 -142 640 705 ; -C 65 ; WX 600 ; N A ; B -60 -50 682 633 ; -C 66 ; WX 600 ; N B ; B -26 -50 670 633 ; -C 67 ; WX 600 ; N C ; B 31 -65 713 648 ; -C 68 ; WX 600 ; N D ; B -26 -50 670 633 ; -C 69 ; WX 600 ; N E ; B -26 -50 692 633 ; -C 70 ; WX 600 ; N F ; B -26 -50 713 633 ; -C 71 ; WX 600 ; N G ; B 29 -65 713 648 ; -C 72 ; WX 600 ; N H ; B -16 -50 723 633 ; -C 73 ; WX 600 ; N I ; B 44 -50 680 633 ; -C 74 ; WX 600 ; N J ; B 22 -65 776 633 ; -C 75 ; WX 600 ; N K ; B -26 -50 744 633 ; -C 76 ; WX 600 ; N L ; B -6 -50 665 633 ; -C 77 ; WX 600 ; N M ; B -58 -50 776 633 ; -C 78 ; WX 600 ; N N ; B -26 -50 755 633 ; -C 79 ; WX 600 ; N O ; B 26 -65 696 648 ; -C 80 ; WX 600 ; N P ; B -26 -50 666 633 ; -C 81 ; WX 600 ; N Q ; B 26 -196 696 648 ; -C 82 ; WX 600 ; N R ; B -26 -50 680 633 ; -C 83 ; WX 600 ; N S ; B 23 -65 680 648 ; -C 84 ; WX 600 ; N T ; B 72 -50 721 633 ; -C 85 ; WX 600 ; N U ; B 61 -65 753 633 ; -C 86 ; WX 600 ; N V ; B 42 -50 784 633 ; -C 87 ; WX 600 ; N W ; B 50 -50 773 633 ; -C 88 ; WX 600 ; N X ; B -29 -50 742 633 ; -C 89 ; WX 600 ; N Y ; B 76 -50 742 633 ; -C 90 ; WX 600 ; N Z ; B 34 -50 669 633 ; -C 91 ; WX 600 ; N bracketleft ; B 178 -204 647 674 ; -C 92 ; WX 600 ; N backslash ; B 170 -163 554 746 ; -C 93 ; WX 600 ; N bracketright ; B 53 -204 522 674 ; -C 94 ; WX 600 ; N asciicircum ; B 113 275 647 674 ; -C 95 ; WX 600 ; N underscore ; B -145 -350 639 -150 ; -C 96 ; WX 600 ; N quoteleft ; B 322 244 598 674 ; -C 97 ; WX 600 ; N a ; B 16 -65 632 502 ; -C 98 ; WX 600 ; N b ; B -47 -65 670 674 ; -C 99 ; WX 600 ; N c ; B 44 -65 672 502 ; -C 100 ; WX 600 ; N d ; B 23 -65 701 674 ; -C 101 ; WX 600 ; N e ; B 25 -65 650 502 ; -C 102 ; WX 600 ; N f ; B 36 -50 740 674 ; L i fi ; L l fl ; -C 103 ; WX 600 ; N g ; B 25 -257 724 502 ; -C 104 ; WX 600 ; N h ; B -16 -50 642 674 ; -C 105 ; WX 600 ; N i ; B 23 -50 599 725 ; -C 106 ; WX 600 ; N j ; B 34 -257 620 725 ; -C 107 ; WX 600 ; N k ; B -6 -50 661 674 ; -C 108 ; WX 600 ; N l ; B 23 -50 599 674 ; -C 109 ; WX 600 ; N m ; B -58 -50 684 502 ; -C 110 ; WX 600 ; N n ; B -16 -50 632 502 ; -C 111 ; WX 600 ; N o ; B 34 -65 656 502 ; -C 112 ; WX 600 ; N p ; B -91 -257 671 502 ; -C 113 ; WX 600 ; N q ; B 27 -257 745 502 ; -C 114 ; WX 600 ; N r ; B 15 -50 699 501 ; -C 115 ; WX 600 ; N s ; B 34 -65 638 502 ; -C 116 ; WX 600 ; N t ; B 45 -65 599 642 ; -C 117 ; WX 600 ; N u ; B 45 -65 640 487 ; -C 118 ; WX 600 ; N v ; B 32 -50 732 487 ; -C 119 ; WX 600 ; N w ; B 32 -50 732 487 ; -C 120 ; WX 600 ; N x ; B -18 -50 690 487 ; -C 121 ; WX 600 ; N y ; B -62 -257 711 487 ; -C 122 ; WX 600 ; N z ; B 46 -50 640 487 ; -C 123 ; WX 600 ; N braceleft ; B 168 -204 605 674 ; -C 124 ; WX 600 ; N bar ; B 178 -204 522 674 ; -C 125 ; WX 600 ; N braceright ; B 95 -204 534 674 ; -C 126 ; WX 600 ; N asciitilde ; B 67 129 652 433 ; -C 161 ; WX 600 ; N exclamdown ; B 143 -257 490 475 ; -C 162 ; WX 600 ; N cent ; B 96 -79 643 725 ; -C 163 ; WX 600 ; N sterling ; B 15 -50 620 648 ; -C 164 ; WX 600 ; N fraction ; B 5 60 725 552 ; -C 165 ; WX 600 ; N yen ; B 77 -50 742 633 ; -C 166 ; WX 600 ; N florin ; B -6 -173 720 689 ; -C 167 ; WX 600 ; N section ; B 18 -147 697 689 ; -C 168 ; WX 600 ; N currency ; B 47 15 677 569 ; -C 169 ; WX 600 ; N quotesingle ; B 273 244 552 674 ; -C 170 ; WX 600 ; N quotedblleft ; B 156 280 648 678 ; -C 171 ; WX 600 ; N guillemotleft ; B 27 -50 703 487 ; -C 172 ; WX 600 ; N guilsinglleft ; B 27 -50 474 487 ; -C 173 ; WX 600 ; N guilsinglright ; B 224 -50 665 487 ; -C 174 ; WX 600 ; N fi ; B -59 -50 681 725 ; -C 175 ; WX 600 ; N fl ; B -59 -50 687 674 ; -C 177 ; WX 600 ; N endash ; B 52 181 668 381 ; -C 178 ; WX 600 ; N dagger ; B 126 -142 638 674 ; -C 179 ; WX 600 ; N daggerdbl ; B 75 -142 638 674 ; -C 180 ; WX 600 ; N periodcentered ; B 255 206 475 406 ; -C 182 ; WX 600 ; N paragraph ; B 72 -147 730 689 ; -C 183 ; WX 600 ; N bullet ; B 265 206 465 406 ; -C 184 ; WX 600 ; N quotesinglbase ; B 48 -225 422 204 ; -C 185 ; WX 600 ; N quotedblbase ; B 12 -199 588 199 ; -C 186 ; WX 600 ; N quotedblright ; B 114 280 690 678 ; -C 187 ; WX 600 ; N guillemotright ; B -6 -50 665 487 ; -C 188 ; WX 600 ; N ellipsis ; B 7 -65 607 135 ; -C 189 ; WX 600 ; N perthousand ; B 55 -65 679 689 ; -C 191 ; WX 600 ; N questiondown ; B 26 -257 533 475 ; -C 193 ; WX 600 ; N grave ; B 200 390 504 689 ; -C 194 ; WX 600 ; N acute ; B 304 390 650 689 ; -C 195 ; WX 600 ; N circumflex ; B 179 390 629 674 ; -C 196 ; WX 600 ; N tilde ; B 171 381 646 640 ; -C 197 ; WX 600 ; N macron ; B 185 416 635 616 ; -C 198 ; WX 600 ; N breve ; B 196 390 647 674 ; -C 199 ; WX 600 ; N dotaccent ; B 313 431 513 631 ; -C 200 ; WX 600 ; N dieresis ; B 209 431 617 631 ; -C 202 ; WX 600 ; N ring ; B 237 353 586 694 ; -C 203 ; WX 600 ; N cedilla ; B 103 -246 436 100 ; -C 205 ; WX 600 ; N hungarumlaut ; B 179 390 650 689 ; -C 206 ; WX 600 ; N ogonek ; B 184 -225 490 100 ; -C 207 ; WX 600 ; N caron ; B 197 390 647 674 ; -C 208 ; WX 600 ; N emdash ; B -19 181 739 381 ; -C 225 ; WX 600 ; N AE ; B -59 -50 763 633 ; -C 227 ; WX 600 ; N ordfeminine ; B 114 120 590 649 ; -C 232 ; WX 600 ; N Lslash ; B -6 -50 665 633 ; -C 233 ; WX 600 ; N Oslash ; B -44 -121 764 683 ; -C 234 ; WX 600 ; N OE ; B -16 -50 763 633 ; -C 235 ; WX 600 ; N ordmasculine ; B 118 120 623 649 ; -C 241 ; WX 600 ; N ae ; B -39 -65 711 502 ; -C 245 ; WX 600 ; N dotlessi ; B 23 -50 599 487 ; -C 248 ; WX 600 ; N lslash ; B 23 -50 604 674 ; -C 249 ; WX 600 ; N oslash ; B -31 -121 716 538 ; -C 250 ; WX 600 ; N oe ; B -30 -65 711 502 ; -C 251 ; WX 600 ; N germandbls ; B -26 -65 618 674 ; -C -1 ; WX 600 ; N Aacute ; B -60 -50 682 839 ; -C -1 ; WX 600 ; N Acircumflex ; B -60 -50 682 824 ; -C -1 ; WX 600 ; N Adieresis ; B -60 -50 682 781 ; -C -1 ; WX 600 ; N Agrave ; B -60 -50 682 839 ; -C -1 ; WX 600 ; N Aring ; B -60 -50 682 855 ; -C -1 ; WX 600 ; N Atilde ; B -60 -50 682 790 ; -C -1 ; WX 600 ; N Ccedilla ; B 31 -246 713 648 ; -C -1 ; WX 600 ; N Eacute ; B -26 -50 692 839 ; -C -1 ; WX 600 ; N Ecircumflex ; B -26 -50 692 824 ; -C -1 ; WX 600 ; N Edieresis ; B -26 -50 692 781 ; -C -1 ; WX 600 ; N Egrave ; B -26 -50 692 839 ; -C -1 ; WX 600 ; N Eth ; B -26 -50 670 633 ; -C -1 ; WX 600 ; N Gcaron ; B 29 -65 713 824 ; -C -1 ; WX 600 ; N IJ ; B -59 -65 783 633 ; -C -1 ; WX 600 ; N Iacute ; B 44 -50 680 839 ; -C -1 ; WX 600 ; N Icircumflex ; B 44 -50 680 824 ; -C -1 ; WX 600 ; N Idieresis ; B 44 -50 680 781 ; -C -1 ; WX 600 ; N Idot ; B 44 -50 680 781 ; -C -1 ; WX 600 ; N Igrave ; B 44 -50 680 839 ; -C -1 ; WX 600 ; N LL ; B -69 -50 712 633 ; -C -1 ; WX 600 ; N Ntilde ; B -26 -50 755 790 ; -C -1 ; WX 600 ; N Oacute ; B 26 -65 696 839 ; -C -1 ; WX 600 ; N Ocircumflex ; B 26 -65 696 824 ; -C -1 ; WX 600 ; N Odieresis ; B 26 -65 696 781 ; -C -1 ; WX 600 ; N Ograve ; B 26 -65 696 839 ; -C -1 ; WX 600 ; N Otilde ; B 26 -65 696 790 ; -C -1 ; WX 600 ; N Scaron ; B 23 -65 680 824 ; -C -1 ; WX 600 ; N Scedilla ; B 23 -246 680 648 ; -C -1 ; WX 600 ; N Thorn ; B -26 -50 663 633 ; -C -1 ; WX 600 ; N Uacute ; B 61 -65 753 839 ; -C -1 ; WX 600 ; N Ucircumflex ; B 61 -65 753 824 ; -C -1 ; WX 600 ; N Udieresis ; B 61 -65 753 781 ; -C -1 ; WX 600 ; N Ugrave ; B 61 -65 753 839 ; -C -1 ; WX 600 ; N Yacute ; B 76 -50 742 839 ; -C -1 ; WX 600 ; N Ydieresis ; B 76 -50 742 781 ; -C -1 ; WX 600 ; N Zcaron ; B 34 -50 679 824 ; -C -1 ; WX 600 ; N aacute ; B 16 -65 632 710 ; -C -1 ; WX 600 ; N acircumflex ; B 16 -65 635 703 ; -C -1 ; WX 600 ; N adieresis ; B 16 -65 632 652 ; -C -1 ; WX 600 ; N agrave ; B 16 -65 632 710 ; -C -1 ; WX 600 ; N aring ; B 16 -65 632 746 ; -C -1 ; WX 600 ; N arrowboth ; B -36 50 764 550 ; -C -1 ; WX 600 ; N arrowdown ; B 93 -50 593 689 ; -C -1 ; WX 600 ; N arrowleft ; B -36 50 764 550 ; -C -1 ; WX 600 ; N arrowright ; B -36 50 764 550 ; -C -1 ; WX 600 ; N arrowup ; B 143 -50 643 689 ; -C -1 ; WX 600 ; N atilde ; B 16 -65 654 678 ; -C -1 ; WX 600 ; N brokenbar ; B 178 -204 522 674 ; -C -1 ; WX 600 ; N ccedilla ; B 44 -246 672 502 ; -C -1 ; WX 600 ; N center ; B 2 -50 722 684 ; -C -1 ; WX 600 ; N copyright ; B -27 -65 743 648 ; -C -1 ; WX 600 ; N dectab ; B -54 -50 676 308 ; -C -1 ; WX 600 ; N degree ; B 171 234 624 674 ; -C -1 ; WX 600 ; N divide ; B 52 -9 668 591 ; -C -1 ; WX 600 ; N down ; B 127 -50 539 502 ; -C -1 ; WX 600 ; N eacute ; B 25 -65 650 714 ; -C -1 ; WX 600 ; N ecircumflex ; B 25 -65 650 703 ; -C -1 ; WX 600 ; N edieresis ; B 25 -65 650 652 ; -C -1 ; WX 600 ; N egrave ; B 25 -65 650 714 ; -C -1 ; WX 600 ; N eth ; B 28 -65 695 689 ; -C -1 ; WX 600 ; N format ; B -108 -257 247 674 ; -C -1 ; WX 600 ; N gcaron ; B 25 -257 724 695 ; -C -1 ; WX 600 ; N graybox ; B -25 -100 753 700 ; -C -1 ; WX 600 ; N iacute ; B 23 -50 599 710 ; -C -1 ; WX 600 ; N icircumflex ; B 23 -50 599 684 ; -C -1 ; WX 600 ; N idieresis ; B 23 -50 599 652 ; -C -1 ; WX 600 ; N igrave ; B 23 -50 599 706 ; -C -1 ; WX 600 ; N ij ; B -39 -257 692 725 ; -C -1 ; WX 600 ; N indent ; B 38 0 650 412 ; -C -1 ; WX 600 ; N largebullet ; B 265 206 465 406 ; -C -1 ; WX 600 ; N left ; B 38 0 650 412 ; -C -1 ; WX 600 ; N lira ; B 15 -50 620 648 ; -C -1 ; WX 600 ; N ll ; B -49 -50 682 674 ; -C -1 ; WX 600 ; N logicalnot ; B 67 94 683 454 ; -C -1 ; WX 600 ; N merge ; B 127 -50 569 502 ; -C -1 ; WX 600 ; N minus ; B 52 181 668 381 ; -C -1 ; WX 600 ; N mu ; B 13 -257 640 487 ; -C -1 ; WX 600 ; N multiply ; B 33 -48 669 530 ; -C -1 ; WX 600 ; N notegraphic ; B 107 -65 639 689 ; -C -1 ; WX 600 ; N ntilde ; B -16 -50 632 678 ; -C -1 ; WX 600 ; N oacute ; B 34 -65 656 699 ; -C -1 ; WX 600 ; N ocircumflex ; B 34 -65 656 703 ; -C -1 ; WX 600 ; N odieresis ; B 34 -65 656 652 ; -C -1 ; WX 600 ; N ograve ; B 34 -65 656 699 ; -C -1 ; WX 600 ; N onehalf ; B -14 -65 725 674 ; -C -1 ; WX 600 ; N onequarter ; B -14 -50 741 674 ; -C -1 ; WX 600 ; N onesuperior ; B 151 140 551 674 ; -C -1 ; WX 600 ; N otilde ; B 34 -65 656 657 ; -C -1 ; WX 600 ; N overscore ; B 33 489 817 689 ; -C -1 ; WX 600 ; N plusminus ; B 3 -50 677 610 ; -C -1 ; WX 600 ; N prescription ; B -26 -50 680 633 ; -C -1 ; WX 600 ; N registered ; B -27 -65 743 648 ; -C -1 ; WX 600 ; N return ; B -24 -50 805 668 ; -C -1 ; WX 600 ; N scaron ; B 34 -65 651 695 ; -C -1 ; WX 600 ; N scedilla ; B 34 -246 638 502 ; -C -1 ; WX 600 ; N square ; B -73 -50 805 668 ; -C -1 ; WX 600 ; N stop ; B -73 -50 805 668 ; -C -1 ; WX 600 ; N tab ; B -73 -50 744 668 ; -C -1 ; WX 600 ; N thorn ; B -91 -257 671 674 ; -C -1 ; WX 600 ; N threequarters ; B -3 -50 711 689 ; -C -1 ; WX 600 ; N threesuperior ; B 155 131 612 689 ; -C -1 ; WX 600 ; N trademark ; B 18 170 793 633 ; -C -1 ; WX 600 ; N twosuperior ; B 131 140 601 689 ; -C -1 ; WX 600 ; N uacute ; B 45 -65 640 706 ; -C -1 ; WX 600 ; N ucircumflex ; B 45 -65 640 684 ; -C -1 ; WX 600 ; N udieresis ; B 45 -65 640 652 ; -C -1 ; WX 600 ; N ugrave ; B 45 -65 640 706 ; -C -1 ; WX 600 ; N up ; B 157 -50 569 502 ; -C -1 ; WX 600 ; N yacute ; B -62 -257 711 706 ; -C -1 ; WX 600 ; N ydieresis ; B -62 -257 711 631 ; -C -1 ; WX 600 ; N zcaron ; B 46 -50 651 695 ; -EndCharMetrics -StartComposites 58 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 0 146 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 0 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 0 146 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 0 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 0 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 0 0 ; -CC Yacute 2 ; PCC Y 0 0 ; PCC acute 0 146 ; -CC yacute 2 ; PCC y 0 0 ; PCC acute 0 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 0 146 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 0 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 0 146 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 0 146 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 0 146 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 0 146 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 0 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 0 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 0 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 0 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 146 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 0 146 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 0 146 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 146 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex 0 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis 0 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 0 146 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 0 146 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 0 146 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 0 146 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 0 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 0 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 0 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 0 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 0 146 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 0 146 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 0 146 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 0 146 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 0 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 0 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 0 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 0 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 0 146 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 0 146 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 0 146 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 0 146 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 0 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 0 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 0 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 0 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 0 146 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 0 146 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 0 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 0 146 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 0 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 0 146 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ; -EndComposites -EndFontMetrics diff --git a/samples/printing/CourO.afm b/samples/printing/CourO.afm deleted file mode 100644 index 0911df46f9..0000000000 --- a/samples/printing/CourO.afm +++ /dev/null @@ -1,341 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Wed Feb 25 16:13:37 PST 1987 -FontName Courier-Oblique -EncodingScheme AdobeStandardEncoding -FullName Courier Oblique -FamilyName Courier -Weight Medium -ItalicAngle -12.0 -IsFixedPitch true -UnderlinePosition -82 -UnderlineThickness 40 -Version 001.003 -FontBBox -85 -290 759 795 -CapHeight 583 -XHeight 437 -Descender -207 -Ascender 624 -StartCharMetrics 260 -C 32 ; WX 600 ; N space ; B 560 -40 640 40 ; -C 33 ; WX 600 ; N exclam ; B 257 -5 483 639 ; -C 34 ; WX 600 ; N quotedbl ; B 231 314 594 603 ; -C 35 ; WX 600 ; N numbersign ; B 116 -82 608 665 ; -C 36 ; WX 600 ; N dollar ; B 111 -113 601 675 ; -C 37 ; WX 600 ; N percent ; B 118 -35 611 639 ; -C 38 ; WX 600 ; N ampersand ; B 112 -35 547 540 ; -C 39 ; WX 600 ; N quoteright ; B 208 304 462 613 ; -C 40 ; WX 600 ; N parenleft ; B 315 -144 602 623 ; -C 41 ; WX 600 ; N parenright ; B 105 -144 392 623 ; -C 42 ; WX 600 ; N asterisk ; B 191 210 605 624 ; -C 43 ; WX 600 ; N plus ; B 112 12 608 550 ; -C 44 ; WX 600 ; N comma ; B 111 -155 364 155 ; -C 45 ; WX 600 ; N hyphen ; B 112 241 608 321 ; -C 46 ; WX 600 ; N period ; B 261 10 361 90 ; -C 47 ; WX 600 ; N slash ; B 80 -103 644 686 ; -C 48 ; WX 600 ; N zero ; B 139 -35 590 639 ; -C 49 ; WX 600 ; N one ; B 97 -20 511 624 ; -C 50 ; WX 600 ; N two ; B 68 -20 596 639 ; -C 51 ; WX 600 ; N three ; B 90 -35 599 639 ; -C 52 ; WX 600 ; N four ; B 125 -20 560 624 ; -C 53 ; WX 600 ; N five ; B 93 -35 602 624 ; -C 54 ; WX 600 ; N six ; B 167 -35 654 639 ; -C 55 ; WX 600 ; N seven ; B 196 -20 622 624 ; -C 56 ; WX 600 ; N eight ; B 124 -35 595 639 ; -C 57 ; WX 600 ; N nine ; B 120 -35 606 639 ; -C 58 ; WX 600 ; N colon ; B 261 10 425 392 ; -C 59 ; WX 600 ; N semicolon ; B 123 -116 425 392 ; -C 60 ; WX 600 ; N less ; B 112 12 656 550 ; -C 61 ; WX 600 ; N equal ; B 75 168 644 394 ; -C 62 ; WX 600 ; N greater ; B 63 12 608 550 ; -C 63 ; WX 600 ; N question ; B 211 -5 597 598 ; -C 64 ; WX 600 ; N at ; B 120 -82 580 644 ; -C 65 ; WX 600 ; N A ; B -7 -20 615 583 ; -C 66 ; WX 600 ; N B ; B 27 -20 610 583 ; -C 67 ; WX 600 ; N C ; B 91 -35 655 598 ; -C 68 ; WX 600 ; N D ; B 27 -20 610 583 ; -C 69 ; WX 600 ; N E ; B 27 -20 634 583 ; -C 70 ; WX 600 ; N F ; B 27 -20 655 583 ; -C 71 ; WX 600 ; N G ; B 89 -35 655 598 ; -C 72 ; WX 600 ; N H ; B 37 -20 665 583 ; -C 73 ; WX 600 ; N I ; B 97 -20 622 583 ; -C 74 ; WX 600 ; N J ; B 82 -35 718 583 ; -C 75 ; WX 600 ; N K ; B 27 -20 686 583 ; -C 76 ; WX 600 ; N L ; B 47 -20 605 583 ; -C 77 ; WX 600 ; N M ; B -5 -20 718 583 ; -C 78 ; WX 600 ; N N ; B 27 -20 697 583 ; -C 79 ; WX 600 ; N O ; B 83 -35 636 598 ; -C 80 ; WX 600 ; N P ; B 27 -20 606 583 ; -C 81 ; WX 600 ; N Q ; B 84 -136 636 598 ; -C 82 ; WX 600 ; N R ; B 27 -20 613 583 ; -C 83 ; WX 600 ; N S ; B 76 -35 622 598 ; -C 84 ; WX 600 ; N T ; B 129 -20 663 583 ; -C 85 ; WX 600 ; N U ; B 119 -35 695 583 ; -C 86 ; WX 600 ; N V ; B 104 -20 726 583 ; -C 87 ; WX 600 ; N W ; B 103 -20 715 583 ; -C 88 ; WX 600 ; N X ; B 24 -20 684 583 ; -C 89 ; WX 600 ; N Y ; B 129 -20 684 583 ; -C 90 ; WX 600 ; N Z ; B 87 -20 611 583 ; -C 91 ; WX 600 ; N bracketleft ; B 238 -144 589 624 ; -C 92 ; WX 600 ; N backslash ; B 230 -103 494 686 ; -C 93 ; WX 600 ; N bracketright ; B 113 -144 464 624 ; -C 94 ; WX 600 ; N asciicircum ; B 173 335 587 624 ; -C 95 ; WX 600 ; N underscore ; B -85 -290 579 -210 ; -C 96 ; WX 600 ; N quoteleft ; B 382 304 538 613 ; -C 97 ; WX 600 ; N a ; B 74 -35 565 452 ; -C 98 ; WX 600 ; N b ; B 6 -35 610 624 ; -C 99 ; WX 600 ; N c ; B 104 -35 614 452 ; -C 100 ; WX 600 ; N d ; B 83 -35 643 624 ; -C 101 ; WX 600 ; N e ; B 85 -35 590 452 ; -C 102 ; WX 600 ; N f ; B 89 -20 682 624 ; L i fi ; L l fl ; -C 103 ; WX 600 ; N g ; B 85 -207 666 452 ; -C 104 ; WX 600 ; N h ; B 37 -20 575 624 ; -C 105 ; WX 600 ; N i ; B 76 -20 532 665 ; -C 106 ; WX 600 ; N j ; B 92 -207 562 665 ; -C 107 ; WX 600 ; N k ; B 47 -20 603 624 ; -C 108 ; WX 600 ; N l ; B 76 -20 532 624 ; -C 109 ; WX 600 ; N m ; B -5 -20 621 452 ; -C 110 ; WX 600 ; N n ; B 37 -20 565 452 ; -C 111 ; WX 600 ; N o ; B 91 -35 597 452 ; -C 112 ; WX 600 ; N p ; B -33 -207 612 452 ; -C 113 ; WX 600 ; N q ; B 85 -207 687 452 ; -C 114 ; WX 600 ; N r ; B 68 -20 639 448 ; -C 115 ; WX 600 ; N s ; B 87 -35 580 452 ; -C 116 ; WX 600 ; N t ; B 107 -35 541 582 ; -C 117 ; WX 600 ; N u ; B 107 -35 582 437 ; -C 118 ; WX 600 ; N v ; B 94 -20 674 437 ; -C 119 ; WX 600 ; N w ; B 94 -20 674 437 ; -C 120 ; WX 600 ; N x ; B 35 -20 632 437 ; -C 121 ; WX 600 ; N y ; B -4 -207 653 437 ; -C 122 ; WX 600 ; N z ; B 99 -20 582 437 ; -C 123 ; WX 600 ; N braceleft ; B 228 -144 547 624 ; -C 124 ; WX 600 ; N bar ; B 238 -144 464 624 ; -C 125 ; WX 600 ; N braceright ; B 155 -144 474 624 ; -C 126 ; WX 600 ; N asciitilde ; B 127 189 592 373 ; -C 161 ; WX 600 ; N exclamdown ; B 209 -207 430 415 ; -C 162 ; WX 600 ; N cent ; B 156 -19 583 665 ; -C 163 ; WX 600 ; N sterling ; B 68 -20 560 598 ; -C 164 ; WX 600 ; N fraction ; B 65 120 665 492 ; -C 165 ; WX 600 ; N yen ; B 137 -20 684 583 ; -C 166 ; WX 600 ; N florin ; B 54 -113 663 639 ; -C 167 ; WX 600 ; N section ; B 78 -87 637 629 ; -C 168 ; WX 600 ; N currency ; B 107 75 617 509 ; -C 169 ; WX 600 ; N quotesingle ; B 333 304 492 613 ; -C 170 ; WX 600 ; N quotedblleft ; B 216 340 588 619 ; -C 171 ; WX 600 ; N guillemotleft ; B 87 -20 645 437 ; -C 172 ; WX 600 ; N guilsinglleft ; B 87 -20 416 437 ; -C 173 ; WX 600 ; N guilsinglright ; B 277 -20 605 437 ; -C 174 ; WX 600 ; N fi ; B -6 -20 628 665 ; -C 175 ; WX 600 ; N fl ; B -6 -20 629 624 ; -C 177 ; WX 600 ; N endash ; B 112 241 608 321 ; -C 178 ; WX 600 ; N dagger ; B 188 -82 580 624 ; -C 179 ; WX 600 ; N daggerdbl ; B 135 -82 580 624 ; -C 180 ; WX 600 ; N periodcentered ; B 315 266 415 346 ; -C 182 ; WX 600 ; N paragraph ; B 132 -87 670 629 ; -C 183 ; WX 600 ; N bullet ; B 325 266 405 346 ; -C 184 ; WX 600 ; N quotesinglbase ; B 108 -165 362 144 ; -C 185 ; WX 600 ; N quotedblbase ; B 72 -139 528 139 ; -C 186 ; WX 600 ; N quotedblright ; B 174 340 630 619 ; -C 187 ; WX 600 ; N guillemotright ; B 47 -20 605 437 ; -C 188 ; WX 600 ; N ellipsis ; B 67 -5 547 75 ; -C 189 ; WX 600 ; N perthousand ; B 117 -35 619 639 ; -C 191 ; WX 600 ; N questiondown ; B 85 -207 470 415 ; -C 193 ; WX 600 ; N grave ; B 262 450 444 639 ; -C 194 ; WX 600 ; N acute ; B 364 450 592 639 ; -C 195 ; WX 600 ; N circumflex ; B 239 450 569 624 ; -C 196 ; WX 600 ; N tilde ; B 231 441 586 580 ; -C 197 ; WX 600 ; N macron ; B 245 476 575 556 ; -C 198 ; WX 600 ; N breve ; B 258 450 589 624 ; -C 199 ; WX 600 ; N dotaccent ; B 373 491 453 571 ; -C 200 ; WX 600 ; N dieresis ; B 269 491 557 571 ; -C 202 ; WX 600 ; N ring ; B 297 413 526 634 ; -C 203 ; WX 600 ; N cedilla ; B 163 -186 376 40 ; -C 205 ; WX 600 ; N hungarumlaut ; B 239 450 592 639 ; -C 206 ; WX 600 ; N ogonek ; B 244 -165 430 40 ; -C 207 ; WX 600 ; N caron ; B 259 450 589 624 ; -C 208 ; WX 600 ; N emdash ; B 41 241 679 321 ; -C 225 ; WX 600 ; N AE ; B -6 -20 705 583 ; -C 227 ; WX 600 ; N ordfeminine ; B 174 179 529 598 ; -C 232 ; WX 600 ; N Lslash ; B 47 -20 605 583 ; -C 233 ; WX 600 ; N Oslash ; B 16 -61 704 623 ; -C 234 ; WX 600 ; N OE ; B 42 -20 705 583 ; -C 235 ; WX 600 ; N ordmasculine ; B 178 179 563 598 ; -C 241 ; WX 600 ; N ae ; B 19 -35 651 452 ; -C 245 ; WX 600 ; N dotlessi ; B 76 -20 532 437 ; -C 248 ; WX 600 ; N lslash ; B 76 -20 544 624 ; -C 249 ; WX 600 ; N oslash ; B 29 -61 656 478 ; -C 250 ; WX 600 ; N oe ; B 28 -35 651 452 ; -C 251 ; WX 600 ; N germandbls ; B 27 -35 558 624 ; -C -1 ; WX 600 ; N Aacute ; B -7 -20 615 789 ; -C -1 ; WX 600 ; N Acircumflex ; B -7 -20 615 774 ; -C -1 ; WX 600 ; N Adieresis ; B -7 -20 615 721 ; -C -1 ; WX 600 ; N Agrave ; B -7 -20 615 789 ; -C -1 ; WX 600 ; N Aring ; B -7 -20 615 795 ; -C -1 ; WX 600 ; N Atilde ; B -7 -20 615 730 ; -C -1 ; WX 600 ; N Ccedilla ; B 91 -186 655 598 ; -C -1 ; WX 600 ; N Eacute ; B 27 -20 634 789 ; -C -1 ; WX 600 ; N Ecircumflex ; B 27 -20 634 774 ; -C -1 ; WX 600 ; N Edieresis ; B 27 -20 634 721 ; -C -1 ; WX 600 ; N Egrave ; B 27 -20 634 789 ; -C -1 ; WX 600 ; N Eth ; B 27 -20 610 583 ; -C -1 ; WX 600 ; N Gcaron ; B 89 -35 655 774 ; -C -1 ; WX 600 ; N IJ ; B -6 -35 725 583 ; -C -1 ; WX 600 ; N Iacute ; B 97 -20 622 789 ; -C -1 ; WX 600 ; N Icircumflex ; B 97 -20 622 774 ; -C -1 ; WX 600 ; N Idieresis ; B 97 -20 622 721 ; -C -1 ; WX 600 ; N Idot ; B 97 -20 622 721 ; -C -1 ; WX 600 ; N Igrave ; B 97 -20 622 789 ; -C -1 ; WX 600 ; N LL ; B -16 -20 652 583 ; -C -1 ; WX 600 ; N Ntilde ; B 27 -20 697 730 ; -C -1 ; WX 600 ; N Oacute ; B 83 -35 636 789 ; -C -1 ; WX 600 ; N Ocircumflex ; B 83 -35 636 774 ; -C -1 ; WX 600 ; N Odieresis ; B 83 -35 636 721 ; -C -1 ; WX 600 ; N Ograve ; B 83 -35 636 789 ; -C -1 ; WX 600 ; N Otilde ; B 83 -35 636 730 ; -C -1 ; WX 600 ; N Scaron ; B 76 -35 622 774 ; -C -1 ; WX 600 ; N Scedilla ; B 76 -186 622 598 ; -C -1 ; WX 600 ; N Thorn ; B 27 -20 603 583 ; -C -1 ; WX 600 ; N Uacute ; B 119 -35 695 789 ; -C -1 ; WX 600 ; N Ucircumflex ; B 119 -35 695 774 ; -C -1 ; WX 600 ; N Udieresis ; B 119 -35 695 721 ; -C -1 ; WX 600 ; N Ugrave ; B 119 -35 695 789 ; -C -1 ; WX 600 ; N Yacute ; B 129 -20 684 789 ; -C -1 ; WX 600 ; N Ydieresis ; B 129 -20 684 721 ; -C -1 ; WX 600 ; N Zcaron ; B 87 -20 621 774 ; -C -1 ; WX 600 ; N aacute ; B 74 -35 565 660 ; -C -1 ; WX 600 ; N acircumflex ; B 74 -35 575 653 ; -C -1 ; WX 600 ; N adieresis ; B 74 -35 565 592 ; -C -1 ; WX 600 ; N agrave ; B 74 -35 565 660 ; -C -1 ; WX 600 ; N aring ; B 74 -35 565 686 ; -C -1 ; WX 600 ; N arrowboth ; B 24 110 704 490 ; -C -1 ; WX 600 ; N arrowdown ; B 146 -20 526 639 ; -C -1 ; WX 600 ; N arrowleft ; B 24 110 704 490 ; -C -1 ; WX 600 ; N arrowright ; B 24 110 704 490 ; -C -1 ; WX 600 ; N arrowup ; B 205 -20 585 639 ; -C -1 ; WX 600 ; N atilde ; B 74 -35 594 618 ; -C -1 ; WX 600 ; N brokenbar ; B 238 -144 464 624 ; -C -1 ; WX 600 ; N ccedilla ; B 104 -186 614 452 ; -C -1 ; WX 600 ; N center ; B 62 -20 662 624 ; -C -1 ; WX 600 ; N copyright ; B 33 -35 683 598 ; -C -1 ; WX 600 ; N dectab ; B -1 -20 609 248 ; -C -1 ; WX 600 ; N degree ; B 231 294 564 624 ; -C -1 ; WX 600 ; N divide ; B 112 51 608 531 ; -C -1 ; WX 600 ; N down ; B 181 -20 473 452 ; -C -1 ; WX 600 ; N eacute ; B 85 -35 590 664 ; -C -1 ; WX 600 ; N ecircumflex ; B 85 -35 590 653 ; -C -1 ; WX 600 ; N edieresis ; B 85 -35 590 592 ; -C -1 ; WX 600 ; N egrave ; B 85 -35 590 664 ; -C -1 ; WX 600 ; N eth ; B 87 -35 637 639 ; -C -1 ; WX 600 ; N format ; B -50 -207 189 624 ; -C -1 ; WX 600 ; N gcaron ; B 85 -207 666 645 ; -C -1 ; WX 600 ; N graybox ; B 35 -40 693 640 ; -C -1 ; WX 600 ; N iacute ; B 76 -20 532 660 ; -C -1 ; WX 600 ; N icircumflex ; B 76 -20 532 634 ; -C -1 ; WX 600 ; N idieresis ; B 76 -20 532 592 ; -C -1 ; WX 600 ; N igrave ; B 76 -20 532 656 ; -C -1 ; WX 600 ; N ij ; B 14 -207 634 665 ; -C -1 ; WX 600 ; N indent ; B 98 60 590 352 ; -C -1 ; WX 600 ; N largebullet ; B 325 266 405 346 ; -C -1 ; WX 600 ; N left ; B 98 60 590 352 ; -C -1 ; WX 600 ; N lira ; B 68 -20 560 598 ; -C -1 ; WX 600 ; N ll ; B 4 -20 624 624 ; -C -1 ; WX 600 ; N logicalnot ; B 127 154 623 394 ; -C -1 ; WX 600 ; N merge ; B 181 -20 511 452 ; -C -1 ; WX 600 ; N minus ; B 112 241 608 321 ; -C -1 ; WX 600 ; N mu ; B 71 -207 582 437 ; -C -1 ; WX 600 ; N multiply ; B 93 12 609 470 ; -C -1 ; WX 600 ; N notegraphic ; B 167 -5 573 639 ; -C -1 ; WX 600 ; N ntilde ; B 37 -20 569 618 ; -C -1 ; WX 600 ; N oacute ; B 91 -35 597 649 ; -C -1 ; WX 600 ; N ocircumflex ; B 91 -35 597 653 ; -C -1 ; WX 600 ; N odieresis ; B 91 -35 597 592 ; -C -1 ; WX 600 ; N ograve ; B 91 -35 597 649 ; -C -1 ; WX 600 ; N onehalf ; B 46 -20 665 624 ; -C -1 ; WX 600 ; N onequarter ; B 46 -20 681 624 ; -C -1 ; WX 600 ; N onesuperior ; B 211 200 491 624 ; -C -1 ; WX 600 ; N otilde ; B 91 -35 597 597 ; -C -1 ; WX 600 ; N overscore ; B 95 559 759 639 ; -C -1 ; WX 600 ; N plusminus ; B 56 -20 617 550 ; -C -1 ; WX 600 ; N prescription ; B 27 -20 613 583 ; -C -1 ; WX 600 ; N registered ; B 33 -35 683 598 ; -C -1 ; WX 600 ; N return ; B 36 -20 745 608 ; -C -1 ; WX 600 ; N scaron ; B 87 -35 593 645 ; -C -1 ; WX 600 ; N scedilla ; B 87 -186 580 452 ; -C -1 ; WX 600 ; N square ; B -20 -20 745 608 ; -C -1 ; WX 600 ; N stop ; B -20 -20 745 608 ; -C -1 ; WX 600 ; N tab ; B -20 -20 684 608 ; -C -1 ; WX 600 ; N thorn ; B -33 -207 612 624 ; -C -1 ; WX 600 ; N threequarters ; B 57 -20 651 639 ; -C -1 ; WX 600 ; N threesuperior ; B 215 191 552 639 ; -C -1 ; WX 600 ; N trademark ; B 78 230 735 583 ; -C -1 ; WX 600 ; N twosuperior ; B 191 200 541 639 ; -C -1 ; WX 600 ; N uacute ; B 107 -35 582 656 ; -C -1 ; WX 600 ; N ucircumflex ; B 107 -35 582 634 ; -C -1 ; WX 600 ; N udieresis ; B 107 -35 582 592 ; -C -1 ; WX 600 ; N ugrave ; B 107 -35 582 656 ; -C -1 ; WX 600 ; N up ; B 219 -20 511 452 ; -C -1 ; WX 600 ; N yacute ; B -4 -207 653 656 ; -C -1 ; WX 600 ; N ydieresis ; B -4 -207 653 571 ; -C -1 ; WX 600 ; N zcaron ; B 99 -20 593 645 ; -EndCharMetrics -StartComposites 58 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 0 146 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 0 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 0 146 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 0 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 0 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 0 0 ; -CC Yacute 2 ; PCC Y 0 0 ; PCC acute 0 146 ; -CC yacute 2 ; PCC y 0 0 ; PCC acute 0 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 0 146 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 0 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 0 146 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 0 146 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 0 146 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 0 146 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 0 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 0 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 0 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 0 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 146 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 0 146 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 0 146 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 146 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex 0 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis 0 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 0 146 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 0 146 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 0 146 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 0 146 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 0 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 0 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 0 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 0 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 0 146 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 0 146 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 0 146 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 0 146 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 0 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 0 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 0 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 0 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 0 146 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 0 146 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 0 146 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 0 146 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 0 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 0 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 0 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 0 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 0 146 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 0 146 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 0 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 0 146 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 0 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 0 146 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ; -EndComposites -EndFontMetrics diff --git a/samples/printing/Helv.afm b/samples/printing/Helv.afm deleted file mode 100644 index b17a3909d4..0000000000 --- a/samples/printing/Helv.afm +++ /dev/null @@ -1,435 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Tue Aug 5 11:33:55 PDT 1986 -FontName Helvetica -EncodingScheme AdobeStandardEncoding -FullName Helvetica -FamilyName Helvetica -Weight Medium -ItalicAngle 0.0 -IsFixedPitch false -UnderlinePosition -97 -UnderlineThickness 73 -Version 001.001 -Notice Helvetica is a registered trademark of Allied Corporation. -FontBBox -174 -220 1001 944 -CapHeight 729 -XHeight 525 -Descender -219 -Ascender 729 -StartCharMetrics 228 -C 32 ; WX 278 ; N space ; B 0 0 0 0 ; -C 33 ; WX 278 ; N exclam ; B 124 0 208 729 ; -C 34 ; WX 355 ; N quotedbl ; B 52 462 305 708 ; -C 35 ; WX 556 ; N numbersign ; B 14 -20 542 698 ; -C 36 ; WX 556 ; N dollar ; B 33 -125 518 770 ; -C 37 ; WX 889 ; N percent ; B 29 -20 859 708 ; -C 38 ; WX 667 ; N ampersand ; B 52 -23 637 710 ; -C 39 ; WX 222 ; N quoteright ; B 64 476 158 708 ; -C 40 ; WX 333 ; N parenleft ; B 73 -213 291 729 ; -C 41 ; WX 333 ; N parenright ; B 38 -213 256 729 ; -C 42 ; WX 389 ; N asterisk ; B 40 452 343 740 ; -C 43 ; WX 584 ; N plus ; B 50 -10 534 474 ; -C 44 ; WX 278 ; N comma ; B 87 -150 192 104 ; -C 45 ; WX 333 ; N hyphen ; B 46 240 284 313 ; -C 46 ; WX 278 ; N period ; B 87 0 191 104 ; -C 47 ; WX 278 ; N slash ; B -8 -21 284 708 ; -C 48 ; WX 556 ; N zero ; B 43 -23 507 709 ; -C 49 ; WX 556 ; N one ; B 102 0 347 709 ; -C 50 ; WX 556 ; N two ; B 34 0 511 710 ; -C 51 ; WX 556 ; N three ; B 32 -23 506 709 ; -C 52 ; WX 556 ; N four ; B 28 0 520 709 ; -C 53 ; WX 556 ; N five ; B 35 -23 513 709 ; -C 54 ; WX 556 ; N six ; B 43 -23 513 709 ; -C 55 ; WX 556 ; N seven ; B 46 0 520 709 ; -C 56 ; WX 556 ; N eight ; B 37 -23 513 709 ; -C 57 ; WX 556 ; N nine ; B 38 -23 509 709 ; -C 58 ; WX 278 ; N colon ; B 110 0 214 525 ; -C 59 ; WX 278 ; N semicolon ; B 110 -150 215 516 ; -C 60 ; WX 584 ; N less ; B 45 -10 534 474 ; -C 61 ; WX 584 ; N equal ; B 50 112 534 352 ; -C 62 ; WX 584 ; N greater ; B 50 -10 539 474 ; -C 63 ; WX 556 ; N question ; B 77 0 509 738 ; -C 64 ; WX 1015 ; N at ; B 34 -146 951 737 ; -C 65 ; WX 667 ; N A ; B 17 0 653 729 ; -C 66 ; WX 667 ; N B ; B 79 0 623 729 ; -C 67 ; WX 722 ; N C ; B 48 -23 677 741 ; -C 68 ; WX 722 ; N D ; B 89 0 667 729 ; -C 69 ; WX 667 ; N E ; B 90 0 613 729 ; -C 70 ; WX 611 ; N F ; B 90 0 579 729 ; -C 71 ; WX 778 ; N G ; B 44 -23 709 741 ; -C 72 ; WX 722 ; N H ; B 83 0 644 729 ; -C 73 ; WX 278 ; N I ; B 100 0 194 729 ; -C 74 ; WX 500 ; N J ; B 17 -26 426 729 ; -C 75 ; WX 667 ; N K ; B 79 0 658 729 ; -C 76 ; WX 556 ; N L ; B 80 0 533 729 ; -C 77 ; WX 833 ; N M ; B 75 0 761 729 ; -C 78 ; WX 722 ; N N ; B 76 0 646 729 ; -C 79 ; WX 778 ; N O ; B 38 -23 742 741 ; -C 80 ; WX 667 ; N P ; B 91 0 617 730 ; -C 81 ; WX 778 ; N Q ; B 38 -59 742 741 ; -C 82 ; WX 722 ; N R ; B 93 0 679 729 ; -C 83 ; WX 667 ; N S ; B 48 -23 621 741 ; -C 84 ; WX 611 ; N T ; B 21 0 593 729 ; -C 85 ; WX 722 ; N U ; B 85 -23 645 729 ; -C 86 ; WX 667 ; N V ; B 30 0 645 729 ; -C 87 ; WX 944 ; N W ; B 22 0 929 729 ; -C 88 ; WX 667 ; N X ; B 22 0 649 729 ; -C 89 ; WX 667 ; N Y ; B 13 0 661 729 ; -C 90 ; WX 611 ; N Z ; B 28 0 583 729 ; -C 91 ; WX 278 ; N bracketleft ; B 64 -214 250 729 ; -C 92 ; WX 278 ; N backslash ; B -8 -20 284 729 ; -C 93 ; WX 278 ; N bracketright ; B 23 -215 209 729 ; -C 94 ; WX 469 ; N asciicircum ; B 44 333 425 713 ; -C 95 ; WX 556 ; N underscore ; B -22 -175 578 -125 ; -C 96 ; WX 222 ; N quoteleft ; B 65 459 158 708 ; -C 97 ; WX 556 ; N a ; B 42 -23 535 540 ; -C 98 ; WX 556 ; N b ; B 54 -23 523 729 ; -C 99 ; WX 500 ; N c ; B 31 -23 477 540 ; -C 100 ; WX 556 ; N d ; B 26 -23 495 729 ; -C 101 ; WX 556 ; N e ; B 40 -23 513 541 ; -C 102 ; WX 278 ; N f ; B 18 0 258 733 ; L i fi ; L l fl ; -C 103 ; WX 556 ; N g ; B 29 -220 489 540 ; -C 104 ; WX 556 ; N h ; B 70 0 486 729 ; -C 105 ; WX 222 ; N i ; B 66 0 150 729 ; -C 106 ; WX 222 ; N j ; B -18 -220 153 729 ; -C 107 ; WX 500 ; N k ; B 58 0 502 729 ; -C 108 ; WX 222 ; N l ; B 68 0 152 729 ; -C 109 ; WX 833 ; N m ; B 71 0 763 540 ; -C 110 ; WX 556 ; N n ; B 70 0 487 540 ; -C 111 ; WX 556 ; N o ; B 36 -23 510 540 ; -C 112 ; WX 556 ; N p ; B 54 -219 523 540 ; -C 113 ; WX 556 ; N q ; B 26 -219 495 540 ; -C 114 ; WX 333 ; N r ; B 69 0 321 540 ; -C 115 ; WX 500 ; N s ; B 34 -24 459 540 ; -C 116 ; WX 278 ; N t ; B 14 -24 254 667 ; -C 117 ; WX 556 ; N u ; B 65 -23 482 525 ; -C 118 ; WX 500 ; N v ; B 10 0 486 525 ; -C 119 ; WX 722 ; N w ; B 6 0 708 525 ; -C 120 ; WX 500 ; N x ; B 17 0 473 525 ; -C 121 ; WX 500 ; N y ; B 20 -219 478 525 ; -C 122 ; WX 500 ; N z ; B 31 0 457 525 ; -C 123 ; WX 334 ; N braceleft ; B 43 -214 276 731 ; -C 124 ; WX 260 ; N bar ; B 100 -215 160 729 ; -C 125 ; WX 334 ; N braceright ; B 29 -214 262 731 ; -C 126 ; WX 584 ; N asciitilde ; B 75 267 508 438 ; -C 161 ; WX 333 ; N exclamdown ; B 121 -214 205 525 ; -C 162 ; WX 556 ; N cent ; B 52 -120 510 628 ; -C 163 ; WX 556 ; N sterling ; B 26 -21 535 726 ; -C 164 ; WX 167 ; N fraction ; B -174 -21 336 708 ; -C 165 ; WX 556 ; N yen ; B 11 0 545 710 ; -C 166 ; WX 556 ; N florin ; B 11 -214 542 742 ; -C 167 ; WX 556 ; N section ; B 44 -215 506 729 ; -C 168 ; WX 556 ; N currency ; B 67 126 489 554 ; -C 169 ; WX 191 ; N quotesingle ; B 48 462 142 708 ; -C 170 ; WX 333 ; N quotedblleft ; B 48 459 299 708 ; -C 171 ; WX 556 ; N guillemotleft ; B 98 106 455 438 ; -C 172 ; WX 333 ; N guilsinglleft ; B 91 112 243 436 ; -C 173 ; WX 333 ; N guilsinglright ; B 85 112 239 436 ; -C 174 ; WX 500 ; N fi ; B 12 0 436 733 ; -C 175 ; WX 500 ; N fl ; B 17 0 430 733 ; -C 177 ; WX 556 ; N endash ; B -5 240 561 313 ; -C 178 ; WX 556 ; N dagger ; B 38 -178 513 710 ; -C 179 ; WX 556 ; N daggerdbl ; B 38 -178 513 710 ; -C 180 ; WX 278 ; N periodcentered ; B 87 318 211 442 ; -C 182 ; WX 537 ; N paragraph ; B 48 -178 522 729 ; -C 183 ; WX 350 ; N bullet ; B 50 220 300 470 ; -C 184 ; WX 222 ; N quotesinglbase ; B 64 -129 158 103 ; -C 185 ; WX 333 ; N quotedblbase ; B 47 -129 300 103 ; -C 186 ; WX 333 ; N quotedblright ; B 49 476 302 708 ; -C 187 ; WX 556 ; N guillemotright ; B 98 106 451 438 ; -C 188 ; WX 1000 ; N ellipsis ; B 115 0 885 104 ; -C 189 ; WX 1000 ; N perthousand ; B 9 -20 993 740 ; -C 191 ; WX 611 ; N questiondown ; B 95 -213 528 525 ; -C 193 ; WX 333 ; N grave ; B 22 592 231 740 ; -C 194 ; WX 333 ; N acute ; B 92 592 301 740 ; -C 195 ; WX 333 ; N circumflex ; B 20 591 307 741 ; -C 196 ; WX 333 ; N tilde ; B 5 589 319 716 ; -C 197 ; WX 333 ; N macron ; B 28 621 302 694 ; -C 198 ; WX 333 ; N breve ; B 15 594 316 729 ; -C 199 ; WX 333 ; N dotaccent ; B 115 605 219 709 ; -C 200 ; WX 333 ; N dieresis ; B 30 605 296 708 ; -C 202 ; WX 333 ; N ring ; B 79 566 255 741 ; -C 203 ; WX 333 ; N cedilla ; B 39 -214 287 0 ; -C 205 ; WX 333 ; N hungarumlaut ; B -35 592 348 740 ; -C 206 ; WX 333 ; N ogonek ; B 57 -189 265 15 ; -C 207 ; WX 333 ; N caron ; B 19 590 306 740 ; -C 208 ; WX 1000 ; N emdash ; B -9 240 1001 313 ; -C 225 ; WX 1000 ; N AE ; B 11 0 950 729 ; -C 227 ; WX 370 ; N ordfeminine ; B 37 301 333 740 ; -C 232 ; WX 556 ; N Lslash ; B 0 0 552 729 ; -C 233 ; WX 778 ; N Oslash ; B 30 -23 744 742 ; -C 234 ; WX 1000 ; N OE ; B 43 -20 959 739 ; -C 235 ; WX 365 ; N ordmasculine ; B 40 301 324 741 ; -C 241 ; WX 889 ; N ae ; B 34 -20 845 546 ; -C 245 ; WX 278 ; N dotlessi ; B 94 0 178 525 ; -C 248 ; WX 222 ; N lslash ; B 0 0 212 729 ; -C 249 ; WX 611 ; N oslash ; B 18 -27 529 548 ; -C 250 ; WX 944 ; N oe ; B 40 -22 899 540 ; -C 251 ; WX 611 ; N germandbls ; B 126 -20 566 729 ; -C -1 ; WX 667 ; N Aacute ; B 17 0 653 939 ; -C -1 ; WX 667 ; N Acircumflex ; B 17 0 653 940 ; -C -1 ; WX 667 ; N Adieresis ; B 17 0 653 907 ; -C -1 ; WX 667 ; N Agrave ; B 17 0 653 939 ; -C -1 ; WX 667 ; N Aring ; B 17 0 653 940 ; -C -1 ; WX 667 ; N Atilde ; B 17 0 653 915 ; -C -1 ; WX 722 ; N Ccedilla ; B 48 -214 677 741 ; -C -1 ; WX 667 ; N Eacute ; B 90 0 613 939 ; -C -1 ; WX 667 ; N Ecircumflex ; B 90 0 613 940 ; -C -1 ; WX 667 ; N Edieresis ; B 90 0 613 907 ; -C -1 ; WX 667 ; N Egrave ; B 90 0 613 939 ; -C -1 ; WX 722 ; N Eth ; B 0 0 667 729 ; -C -1 ; WX 278 ; N Iacute ; B 71 0 280 939 ; -C -1 ; WX 278 ; N Icircumflex ; B -1 0 286 940 ; -C -1 ; WX 278 ; N Idieresis ; B 9 0 275 907 ; -C -1 ; WX 278 ; N Igrave ; B 1 0 210 939 ; -C -1 ; WX 722 ; N Ntilde ; B 76 0 646 915 ; -C -1 ; WX 778 ; N Oacute ; B 38 -23 742 939 ; -C -1 ; WX 778 ; N Ocircumflex ; B 38 -23 742 940 ; -C -1 ; WX 778 ; N Odieresis ; B 38 -23 742 907 ; -C -1 ; WX 778 ; N Ograve ; B 38 -23 742 939 ; -C -1 ; WX 778 ; N Otilde ; B 38 -23 742 915 ; -C -1 ; WX 667 ; N Scaron ; B 48 -23 621 939 ; -C -1 ; WX 667 ; N Thorn ; B 91 0 617 729 ; -C -1 ; WX 722 ; N Uacute ; B 85 -23 645 939 ; -C -1 ; WX 722 ; N Ucircumflex ; B 85 -23 645 940 ; -C -1 ; WX 722 ; N Udieresis ; B 85 -23 645 907 ; -C -1 ; WX 722 ; N Ugrave ; B 85 -23 645 939 ; -C -1 ; WX 667 ; N Yacute ; B 13 0 661 944 ; -C -1 ; WX 667 ; N Ydieresis ; B 13 0 661 907 ; -C -1 ; WX 611 ; N Zcaron ; B 28 0 583 939 ; -C -1 ; WX 556 ; N aacute ; B 42 -23 535 740 ; -C -1 ; WX 556 ; N acircumflex ; B 42 -23 535 741 ; -C -1 ; WX 556 ; N adieresis ; B 42 -23 535 708 ; -C -1 ; WX 556 ; N agrave ; B 42 -23 535 740 ; -C -1 ; WX 556 ; N aring ; B 42 -23 535 741 ; -C -1 ; WX 556 ; N atilde ; B 42 -23 535 716 ; -C -1 ; WX 260 ; N brokenbar ; B 100 -215 160 729 ; -C -1 ; WX 500 ; N ccedilla ; B 31 -214 477 540 ; -C -1 ; WX 737 ; N copyright ; B -13 -23 751 741 ; -C -1 ; WX 400 ; N degree ; B 50 409 350 709 ; -C -1 ; WX 584 ; N divide ; B 50 -10 534 474 ; -C -1 ; WX 556 ; N eacute ; B 40 -23 513 740 ; -C -1 ; WX 556 ; N ecircumflex ; B 40 -23 513 741 ; -C -1 ; WX 556 ; N edieresis ; B 40 -23 513 708 ; -C -1 ; WX 556 ; N egrave ; B 40 -23 513 740 ; -C -1 ; WX 556 ; N eth ; B 36 -23 510 729 ; -C -1 ; WX 278 ; N iacute ; B 65 0 274 740 ; -C -1 ; WX 278 ; N icircumflex ; B -7 0 280 741 ; -C -1 ; WX 278 ; N idieresis ; B 3 0 269 708 ; -C -1 ; WX 278 ; N igrave ; B -5 0 204 740 ; -C -1 ; WX 584 ; N logicalnot ; B 40 82 544 352 ; -C -1 ; WX 584 ; N minus ; B 40 194 544 270 ; -C -1 ; WX 556 ; N mu ; B 65 -219 482 525 ; -C -1 ; WX 584 ; N multiply ; B 50 -10 534 476 ; -C -1 ; WX 556 ; N ntilde ; B 70 0 487 716 ; -C -1 ; WX 556 ; N oacute ; B 36 -23 510 740 ; -C -1 ; WX 556 ; N ocircumflex ; B 36 -23 510 741 ; -C -1 ; WX 556 ; N odieresis ; B 36 -23 510 708 ; -C -1 ; WX 556 ; N ograve ; B 36 -23 510 740 ; -C -1 ; WX 834 ; N onehalf ; B 30 -21 804 709 ; -C -1 ; WX 834 ; N onequarter ; B 30 -21 804 709 ; -C -1 ; WX 333 ; N onesuperior ; B 60 284 219 709 ; -C -1 ; WX 556 ; N otilde ; B 36 -23 510 716 ; -C -1 ; WX 584 ; N plusminus ; B 40 0 544 618 ; -C -1 ; WX 737 ; N registered ; B -13 -23 751 741 ; -C -1 ; WX 500 ; N scaron ; B 34 -24 459 740 ; -C -1 ; WX 556 ; N thorn ; B 54 -219 523 729 ; -C -1 ; WX 834 ; N threequarters ; B 30 -21 804 709 ; -C -1 ; WX 333 ; N threesuperior ; B 12 270 320 709 ; -C -1 ; WX 1000 ; N trademark ; B 63 320 938 741 ; -C -1 ; WX 333 ; N twosuperior ; B 11 284 321 710 ; -C -1 ; WX 556 ; N uacute ; B 65 -23 482 740 ; -C -1 ; WX 556 ; N ucircumflex ; B 65 -23 482 741 ; -C -1 ; WX 556 ; N udieresis ; B 65 -23 482 708 ; -C -1 ; WX 556 ; N ugrave ; B 65 -23 482 740 ; -C -1 ; WX 500 ; N yacute ; B 20 -219 478 740 ; -C -1 ; WX 500 ; N ydieresis ; B 20 -219 478 708 ; -C -1 ; WX 500 ; N zcaron ; B 31 0 457 740 ; -EndCharMetrics -StartKernData -StartKernPairs 105 - -KPX A y -18 -KPX A w -18 -KPX A v -18 -KPX A space -55 -KPX A quoteright -74 -KPX A Y -74 -KPX A W -37 -KPX A V -74 -KPX A T -74 - -KPX F period -111 -KPX F comma -111 -KPX F A -55 - -KPX L y -37 -KPX L space -37 -KPX L quoteright -55 -KPX L Y -74 -KPX L W -74 -KPX L V -74 -KPX L T -74 - -KPX P space -18 -KPX P period -129 -KPX P comma -129 -KPX P A -74 - -KPX R Y -18 -KPX R W -18 -KPX R V -18 -KPX R T -18 - -KPX T y -55 -KPX T w -55 -KPX T u -37 -KPX T space -18 -KPX T semicolon -111 -KPX T s -111 -KPX T r -37 -KPX T period -111 -KPX T o -111 -KPX T i -37 -KPX T hyphen -55 -KPX T e -111 -KPX T comma -111 -KPX T colon -111 -KPX T c -111 -KPX T a -111 -KPX T O -18 -KPX T A -74 - -KPX V y -37 -KPX V u -37 -KPX V semicolon -37 -KPX V r -37 -KPX V period -92 -KPX V o -55 -KPX V i -18 -KPX V hyphen -55 -KPX V e -55 -KPX V comma -92 -KPX V colon -37 -KPX V a -74 -KPX V A -74 - -KPX W y -9 -KPX W u -18 -KPX W semicolon -18 -KPX W r -18 -KPX W period -55 -KPX W o -18 -KPX W i 0 -KPX W hyphen -18 -KPX W e -18 -KPX W comma -55 -KPX W colon -18 -KPX W a -37 -KPX W A -37 - -KPX Y v -55 -KPX Y u -55 -KPX Y space -18 -KPX Y semicolon -65 -KPX Y q -92 -KPX Y period -129 -KPX Y p -74 -KPX Y o -92 -KPX Y i -37 -KPX Y hyphen -92 -KPX Y e -92 -KPX Y comma -129 -KPX Y colon -55 -KPX Y a -74 -KPX Y A -74 - -KPX f quoteright 18 -KPX f f -18 - -KPX one one -74 - -KPX quoteleft quoteleft -18 - -KPX quoteright space -37 -KPX quoteright s -18 -KPX quoteright quoteright -18 - -KPX r quoteright 37 -KPX r period -55 -KPX r comma -55 - -KPX space Y -18 -KPX space T -18 -KPX space A -55 - -KPX v period -74 -KPX v comma -74 - -KPX w period -55 -KPX w comma -55 - -KPX y period -74 -KPX y comma -74 -EndKernPairs -EndKernData -StartComposites 56 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 199 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 83 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 167 199 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 83 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 207 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 96 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 167 199 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 83 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 194 199 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 194 199 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 194 199 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 194 199 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 111 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 111 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 111 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 111 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute -21 199 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -21 199 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -21 199 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave -21 199 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 188 199 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 188 199 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 188 199 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 188 199 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 117 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 117 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 117 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 117 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 167 199 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 167 199 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 167 199 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 167 199 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 111 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 111 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 111 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 111 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 222 199 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 222 199 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 222 199 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 222 199 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 111 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 111 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 111 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 111 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 167 199 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 111 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 200 199 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 117 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 222 199 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 111 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 167 199 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 111 0 ; -EndComposites -EndFontMetrics diff --git a/samples/printing/HelvBo.afm b/samples/printing/HelvBo.afm deleted file mode 100644 index 5f14f52069..0000000000 --- a/samples/printing/HelvBo.afm +++ /dev/null @@ -1,431 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Tue Aug 5 11:40:08 PDT 1986 -FontName Helvetica-Bold -EncodingScheme AdobeStandardEncoding -FullName Helvetica Bold -FamilyName Helvetica -Weight Bold -ItalicAngle 0.0 -IsFixedPitch false -UnderlinePosition -106 -UnderlineThickness 73 -Version 001.001 -Notice Helvetica is a registered trademark of Allied Corporation. -FontBBox -173 -221 1003 936 -CapHeight 729 -XHeight 542 -Descender -219 -Ascender 729 -StartCharMetrics 228 -C 32 ; WX 278 ; N space ; B 0 0 0 0 ; -C 33 ; WX 333 ; N exclam ; B 112 0 262 729 ; -C 34 ; WX 474 ; N quotedbl ; B 50 470 424 729 ; -C 35 ; WX 556 ; N numbersign ; B 3 -30 553 696 ; -C 36 ; WX 556 ; N dollar ; B 22 -125 526 765 ; -C 37 ; WX 889 ; N percent ; B 22 -18 863 708 ; -C 38 ; WX 722 ; N ampersand ; B 55 -20 694 729 ; -C 39 ; WX 278 ; N quoteright ; B 66 469 201 729 ; -C 40 ; WX 333 ; N parenleft ; B 40 -202 303 729 ; -C 41 ; WX 333 ; N parenright ; B 22 -202 285 729 ; -C 42 ; WX 389 ; N asterisk ; B 23 385 356 730 ; -C 43 ; WX 584 ; N plus ; B 50 -10 534 474 ; -C 44 ; WX 278 ; N comma ; B 64 -174 214 146 ; -C 45 ; WX 333 ; N hyphen ; B 26 208 298 344 ; -C 46 ; WX 278 ; N period ; B 64 0 214 146 ; -C 47 ; WX 278 ; N slash ; B 2 -14 275 715 ; -C 48 ; WX 556 ; N zero ; B 29 -23 517 725 ; -C 49 ; WX 556 ; N one ; B 68 0 378 709 ; -C 50 ; WX 556 ; N two ; B 30 0 515 726 ; -C 51 ; WX 556 ; N three ; B 29 -23 516 726 ; -C 52 ; WX 556 ; N four ; B 24 0 522 709 ; -C 53 ; WX 556 ; N five ; B 27 -24 517 709 ; -C 54 ; WX 556 ; N six ; B 32 -23 519 727 ; -C 55 ; WX 556 ; N seven ; B 29 0 528 709 ; -C 56 ; WX 556 ; N eight ; B 22 -23 525 726 ; -C 57 ; WX 556 ; N nine ; B 28 -23 516 728 ; -C 58 ; WX 333 ; N colon ; B 113 0 263 521 ; -C 59 ; WX 333 ; N semicolon ; B 113 -174 263 521 ; -C 60 ; WX 584 ; N less ; B 40 -10 529 474 ; -C 61 ; WX 584 ; N equal ; B 50 52 534 412 ; -C 62 ; WX 584 ; N greater ; B 40 -10 529 474 ; -C 63 ; WX 611 ; N question ; B 64 0 556 744 ; -C 64 ; WX 975 ; N at ; B 27 -136 947 746 ; -C 65 ; WX 722 ; N A ; B 26 0 703 729 ; -C 66 ; WX 722 ; N B ; B 82 0 666 729 ; -C 67 ; WX 722 ; N C ; B 44 -23 685 741 ; -C 68 ; WX 722 ; N D ; B 77 0 681 729 ; -C 69 ; WX 667 ; N E ; B 79 0 624 729 ; -C 70 ; WX 611 ; N F ; B 74 0 586 729 ; -C 71 ; WX 778 ; N G ; B 42 -24 711 741 ; -C 72 ; WX 722 ; N H ; B 68 0 657 729 ; -C 73 ; WX 278 ; N I ; B 63 0 213 729 ; -C 74 ; WX 556 ; N J ; B 24 -23 486 729 ; -C 75 ; WX 722 ; N K ; B 74 0 717 729 ; -C 76 ; WX 611 ; N L ; B 80 0 579 729 ; -C 77 ; WX 833 ; N M ; B 66 0 776 729 ; -C 78 ; WX 722 ; N N ; B 68 0 661 729 ; -C 79 ; WX 778 ; N O ; B 40 -23 742 741 ; -C 80 ; WX 667 ; N P ; B 76 0 633 729 ; -C 81 ; WX 778 ; N Q ; B 43 -54 745 741 ; -C 82 ; WX 722 ; N R ; B 80 0 677 729 ; -C 83 ; WX 667 ; N S ; B 32 -23 633 741 ; -C 84 ; WX 611 ; N T ; B 14 0 598 729 ; -C 85 ; WX 722 ; N U ; B 76 -23 654 729 ; -C 86 ; WX 667 ; N V ; B 24 0 647 729 ; -C 87 ; WX 944 ; N W ; B 13 0 932 729 ; -C 88 ; WX 667 ; N X ; B 22 0 653 729 ; -C 89 ; WX 667 ; N Y ; B 27 0 650 729 ; -C 90 ; WX 611 ; N Z ; B 30 0 578 729 ; -C 91 ; WX 333 ; N bracketleft ; B 66 -202 308 729 ; -C 92 ; WX 278 ; N backslash ; B -12 -21 289 708 ; -C 93 ; WX 333 ; N bracketright ; B 18 -202 260 729 ; -C 94 ; WX 584 ; N asciicircum ; B 61 271 522 696 ; -C 95 ; WX 556 ; N underscore ; B -22 -200 578 -130 ; -C 96 ; WX 278 ; N quoteleft ; B 67 469 202 729 ; -C 97 ; WX 556 ; N a ; B 27 -24 524 551 ; -C 98 ; WX 611 ; N b ; B 59 -23 575 729 ; -C 99 ; WX 556 ; N c ; B 34 -23 522 551 ; -C 100 ; WX 611 ; N d ; B 29 -23 545 729 ; -C 101 ; WX 556 ; N e ; B 22 -23 525 551 ; -C 102 ; WX 333 ; N f ; B 14 0 313 729 ; L i fi ; L l fl ; -C 103 ; WX 611 ; N g ; B 34 -220 541 551 ; -C 104 ; WX 611 ; N h ; B 67 0 541 729 ; -C 105 ; WX 278 ; N i ; B 67 0 207 729 ; -C 106 ; WX 278 ; N j ; B 4 -219 210 729 ; -C 107 ; WX 556 ; N k ; B 59 0 548 729 ; -C 108 ; WX 278 ; N l ; B 67 0 207 729 ; -C 109 ; WX 889 ; N m ; B 60 0 824 553 ; -C 110 ; WX 611 ; N n ; B 63 0 546 551 ; -C 111 ; WX 611 ; N o ; B 35 -23 569 551 ; -C 112 ; WX 611 ; N p ; B 58 -219 574 551 ; -C 113 ; WX 611 ; N q ; B 28 -219 544 551 ; -C 114 ; WX 389 ; N r ; B 63 0 370 553 ; -C 115 ; WX 556 ; N s ; B 29 -23 520 551 ; -C 116 ; WX 333 ; N t ; B 14 -23 301 678 ; -C 117 ; WX 611 ; N u ; B 58 -23 541 542 ; -C 118 ; WX 556 ; N v ; B 14 0 536 542 ; -C 119 ; WX 778 ; N w ; B 5 0 766 542 ; -C 120 ; WX 556 ; N x ; B 16 0 535 542 ; -C 121 ; WX 556 ; N y ; B 9 -219 538 542 ; -C 122 ; WX 500 ; N z ; B 21 0 468 542 ; -C 123 ; WX 389 ; N braceleft ; B 37 -202 317 729 ; -C 124 ; WX 280 ; N bar ; B 100 -202 180 729 ; -C 125 ; WX 389 ; N braceright ; B 72 -202 352 729 ; -C 126 ; WX 584 ; N asciitilde ; B 60 144 519 322 ; -C 161 ; WX 333 ; N exclamdown ; B 66 -187 216 542 ; -C 162 ; WX 556 ; N cent ; B 37 -122 522 637 ; -C 163 ; WX 556 ; N sterling ; B 31 -20 537 717 ; -C 164 ; WX 167 ; N fraction ; B -173 -20 337 715 ; -C 165 ; WX 556 ; N yen ; B 5 0 552 705 ; -C 166 ; WX 556 ; N florin ; B 21 -221 535 745 ; -C 167 ; WX 556 ; N section ; B 33 -201 518 728 ; -C 168 ; WX 556 ; N currency ; B 26 105 530 604 ; -C 169 ; WX 238 ; N quotesingle ; B 50 469 188 729 ; -C 170 ; WX 500 ; N quotedblleft ; B 71 469 433 729 ; -C 171 ; WX 556 ; N guillemotleft ; B 88 71 468 484 ; -C 172 ; WX 333 ; N guilsinglleft ; B 83 73 250 476 ; -C 173 ; WX 333 ; N guilsinglright ; B 80 73 247 476 ; -C 174 ; WX 611 ; N fi ; B 9 0 548 729 ; -C 175 ; WX 611 ; N fl ; B 12 0 546 729 ; -C 177 ; WX 556 ; N endash ; B -9 208 557 313 ; -C 178 ; WX 556 ; N dagger ; B 31 -195 523 708 ; -C 179 ; WX 556 ; N daggerdbl ; B 28 -195 520 708 ; -C 180 ; WX 278 ; N periodcentered ; B 64 318 188 442 ; -C 182 ; WX 556 ; N paragraph ; B 20 -195 529 729 ; -C 183 ; WX 350 ; N bullet ; B 50 175 300 425 ; -C 184 ; WX 278 ; N quotesinglbase ; B 66 -135 201 125 ; -C 185 ; WX 500 ; N quotedblbase ; B 72 -164 432 141 ; -C 186 ; WX 500 ; N quotedblright ; B 73 469 440 729 ; -C 187 ; WX 556 ; N guillemotright ; B 88 71 462 482 ; -C 188 ; WX 1000 ; N ellipsis ; B 92 0 908 146 ; -C 189 ; WX 1000 ; N perthousand ; B 11 -20 990 745 ; -C 191 ; WX 611 ; N questiondown ; B 51 -192 544 542 ; -C 193 ; WX 333 ; N grave ; B 17 595 213 745 ; -C 194 ; WX 333 ; N acute ; B 121 595 317 745 ; -C 195 ; WX 333 ; N circumflex ; B 8 598 326 745 ; -C 196 ; WX 333 ; N tilde ; B -9 595 345 729 ; -C 197 ; WX 333 ; N macron ; B 16 629 315 717 ; -C 198 ; WX 333 ; N breve ; B 35 593 299 736 ; -C 199 ; WX 333 ; N dotaccent ; B 112 607 222 729 ; -C 200 ; WX 333 ; N dieresis ; B 18 609 314 731 ; -C 202 ; WX 333 ; N ring ; B 77 565 257 745 ; -C 203 ; WX 333 ; N cedilla ; B 27 -220 294 -9 ; -C 205 ; WX 333 ; N hungarumlaut ; B -44 595 340 745 ; -C 206 ; WX 333 ; N ogonek ; B 45 -195 268 38 ; -C 207 ; WX 333 ; N caron ; B 9 598 327 745 ; -C 208 ; WX 1000 ; N emdash ; B -7 208 1003 313 ; -C 225 ; WX 1000 ; N AE ; B 1 0 966 729 ; -C 227 ; WX 370 ; N ordfeminine ; B 31 277 329 746 ; -C 232 ; WX 611 ; N Lslash ; B 0 0 597 729 ; -C 233 ; WX 778 ; N Oslash ; B 31 -34 755 754 ; -C 234 ; WX 1000 ; N OE ; B 28 -20 970 741 ; -C 235 ; WX 365 ; N ordmasculine ; B 23 276 343 745 ; -C 241 ; WX 889 ; N ae ; B 27 -20 857 555 ; -C 245 ; WX 278 ; N dotlessi ; B 67 0 207 542 ; -C 248 ; WX 278 ; N lslash ; B 0 0 252 729 ; -C 249 ; WX 611 ; N oslash ; B 11 -34 598 561 ; -C 250 ; WX 944 ; N oe ; B 23 -21 920 554 ; -C 251 ; WX 611 ; N germandbls ; B 67 -16 575 730 ; -C -1 ; WX 722 ; N Aacute ; B 26 0 703 936 ; -C -1 ; WX 722 ; N Acircumflex ; B 26 0 703 936 ; -C -1 ; WX 722 ; N Adieresis ; B 26 0 703 922 ; -C -1 ; WX 722 ; N Agrave ; B 26 0 703 936 ; -C -1 ; WX 722 ; N Aring ; B 26 0 703 936 ; -C -1 ; WX 722 ; N Atilde ; B 26 0 703 920 ; -C -1 ; WX 722 ; N Ccedilla ; B 44 -220 685 741 ; -C -1 ; WX 667 ; N Eacute ; B 79 0 624 936 ; -C -1 ; WX 667 ; N Ecircumflex ; B 79 0 624 936 ; -C -1 ; WX 667 ; N Edieresis ; B 79 0 624 922 ; -C -1 ; WX 667 ; N Egrave ; B 79 0 624 936 ; -C -1 ; WX 722 ; N Eth ; B -18 0 681 729 ; -C -1 ; WX 278 ; N Iacute ; B 63 0 290 936 ; -C -1 ; WX 278 ; N Icircumflex ; B -19 0 299 936 ; -C -1 ; WX 278 ; N Idieresis ; B -9 0 287 922 ; -C -1 ; WX 278 ; N Igrave ; B -10 0 213 936 ; -C -1 ; WX 722 ; N Ntilde ; B 68 0 661 920 ; -C -1 ; WX 778 ; N Oacute ; B 40 -23 742 936 ; -C -1 ; WX 778 ; N Ocircumflex ; B 40 -23 742 936 ; -C -1 ; WX 778 ; N Odieresis ; B 40 -23 742 922 ; -C -1 ; WX 778 ; N Ograve ; B 40 -23 742 936 ; -C -1 ; WX 778 ; N Otilde ; B 40 -23 742 920 ; -C -1 ; WX 667 ; N Scaron ; B 32 -23 633 936 ; -C -1 ; WX 667 ; N Thorn ; B 76 0 633 729 ; -C -1 ; WX 722 ; N Uacute ; B 76 -23 654 936 ; -C -1 ; WX 722 ; N Ucircumflex ; B 76 -23 654 936 ; -C -1 ; WX 722 ; N Udieresis ; B 76 -23 654 922 ; -C -1 ; WX 722 ; N Ugrave ; B 76 -23 654 936 ; -C -1 ; WX 667 ; N Yacute ; B 27 0 650 932 ; -C -1 ; WX 667 ; N Ydieresis ; B 27 0 650 922 ; -C -1 ; WX 611 ; N Zcaron ; B 30 0 578 936 ; -C -1 ; WX 556 ; N aacute ; B 27 -24 524 745 ; -C -1 ; WX 556 ; N acircumflex ; B 27 -24 524 745 ; -C -1 ; WX 556 ; N adieresis ; B 27 -24 524 731 ; -C -1 ; WX 556 ; N agrave ; B 27 -24 524 745 ; -C -1 ; WX 556 ; N aring ; B 27 -24 524 745 ; -C -1 ; WX 556 ; N atilde ; B 27 -24 524 729 ; -C -1 ; WX 280 ; N brokenbar ; B 100 -202 180 729 ; -C -1 ; WX 556 ; N ccedilla ; B 34 -220 522 551 ; -C -1 ; WX 737 ; N copyright ; B -14 -20 751 745 ; -C -1 ; WX 400 ; N degree ; B 50 425 350 725 ; -C -1 ; WX 584 ; N divide ; B 50 -10 534 474 ; -C -1 ; WX 556 ; N eacute ; B 22 -23 525 745 ; -C -1 ; WX 556 ; N ecircumflex ; B 22 -23 525 745 ; -C -1 ; WX 556 ; N edieresis ; B 22 -23 525 731 ; -C -1 ; WX 556 ; N egrave ; B 22 -23 525 745 ; -C -1 ; WX 611 ; N eth ; B 35 -23 569 730 ; -C -1 ; WX 278 ; N iacute ; B 67 0 290 745 ; -C -1 ; WX 278 ; N icircumflex ; B -19 0 299 745 ; -C -1 ; WX 278 ; N idieresis ; B -9 0 287 731 ; -C -1 ; WX 278 ; N igrave ; B -10 0 207 745 ; -C -1 ; WX 584 ; N logicalnot ; B 40 121 544 412 ; -C -1 ; WX 584 ; N minus ; B 40 174 544 290 ; -C -1 ; WX 611 ; N mu ; B 58 -219 541 542 ; -C -1 ; WX 584 ; N multiply ; B 50 -10 534 474 ; -C -1 ; WX 611 ; N ntilde ; B 63 0 546 729 ; -C -1 ; WX 611 ; N oacute ; B 35 -23 569 745 ; -C -1 ; WX 611 ; N ocircumflex ; B 35 -23 569 745 ; -C -1 ; WX 611 ; N odieresis ; B 35 -23 569 731 ; -C -1 ; WX 611 ; N ograve ; B 35 -23 569 745 ; -C -1 ; WX 834 ; N onehalf ; B 30 -20 803 715 ; -C -1 ; WX 834 ; N onequarter ; B 30 -20 804 715 ; -C -1 ; WX 333 ; N onesuperior ; B 46 284 247 709 ; -C -1 ; WX 611 ; N otilde ; B 35 -23 569 729 ; -C -1 ; WX 584 ; N plusminus ; B 40 0 544 674 ; -C -1 ; WX 737 ; N registered ; B -14 -20 751 745 ; -C -1 ; WX 556 ; N scaron ; B 29 -23 520 745 ; -C -1 ; WX 611 ; N thorn ; B 58 -219 574 729 ; -C -1 ; WX 834 ; N threequarters ; B 30 -20 804 725 ; -C -1 ; WX 333 ; N threesuperior ; B 8 271 325 720 ; -C -1 ; WX 1000 ; N trademark ; B 71 341 929 745 ; -C -1 ; WX 333 ; N twosuperior ; B 9 284 324 719 ; -C -1 ; WX 611 ; N uacute ; B 58 -23 541 745 ; -C -1 ; WX 611 ; N ucircumflex ; B 58 -23 541 745 ; -C -1 ; WX 611 ; N udieresis ; B 58 -23 541 731 ; -C -1 ; WX 611 ; N ugrave ; B 58 -23 541 745 ; -C -1 ; WX 556 ; N yacute ; B 9 -219 538 745 ; -C -1 ; WX 556 ; N ydieresis ; B 9 -219 538 731 ; -C -1 ; WX 500 ; N zcaron ; B 21 0 468 745 ; -EndCharMetrics -StartKernData -StartKernPairs 101 - -KPX A y -37 -KPX A w -18 -KPX A v -37 -KPX A space -37 -KPX A quoteright -55 -KPX A Y -92 -KPX A W -55 -KPX A V -74 -KPX A T -74 - -KPX F period -111 -KPX F comma -111 -KPX F A -55 - -KPX L y -37 -KPX L space -18 -KPX L quoteright -55 -KPX L Y -92 -KPX L W -55 -KPX L V -74 -KPX L T -74 - -KPX P space -18 -KPX P period -129 -KPX P comma -129 -KPX P A -74 - -KPX R Y -37 -KPX R W -18 -KPX R V -18 - -KPX T y -74 -KPX T w -74 -KPX T u -74 -KPX T semicolon -111 -KPX T s -74 -KPX T r -55 -KPX T period -111 -KPX T o -74 -KPX T i -18 -KPX T hyphen -55 -KPX T e -74 -KPX T comma -111 -KPX T colon -111 -KPX T c -74 -KPX T a -74 -KPX T O -18 -KPX T A -74 - -KPX V y -37 -KPX V u -37 -KPX V semicolon -55 -KPX V r -55 -KPX V period -92 -KPX V o -74 -KPX V i -18 -KPX V hyphen -55 -KPX V e -55 -KPX V comma -92 -KPX V colon -55 -KPX V a -55 -KPX V A -74 - -KPX W y -18 -KPX W u -18 -KPX W semicolon -18 -KPX W r -18 -KPX W period -55 -KPX W o -18 -KPX W i -9 -KPX W hyphen -20 -KPX W e -18 -KPX W comma -55 -KPX W colon -18 -KPX W a -37 -KPX W A -55 - -KPX Y v -55 -KPX Y u -55 -KPX Y space -18 -KPX Y semicolon -74 -KPX Y q -74 -KPX Y period -111 -KPX Y p -55 -KPX Y o -74 -KPX Y i -37 -KPX Y hyphen -55 -KPX Y e -55 -KPX Y comma -111 -KPX Y colon -74 -KPX Y a -55 -KPX Y A -92 - -KPX f quoteright 18 - -KPX one one -55 - -KPX quoteleft quoteleft -37 - -KPX quoteright space -55 -KPX quoteright s -37 -KPX quoteright quoteright -37 - -KPX r quoteright 37 -KPX r period -55 -KPX r comma -55 - -KPX space Y -18 -KPX space A -37 - -KPX v period -74 -KPX v comma -74 - -KPX w period -37 -KPX w comma -37 - -KPX y period -74 -KPX y comma -74 -EndKernPairs -EndKernData -StartComposites 56 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 191 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 83 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 167 191 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 111 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 207 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 117 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 167 191 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 111 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 197 191 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 197 191 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 197 191 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 197 191 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 139 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 139 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 139 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 139 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute -27 191 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -27 191 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -27 191 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave -27 191 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 188 191 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 188 191 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 188 191 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 188 191 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 111 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 111 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 111 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 111 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 197 191 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 197 191 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 197 191 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 197 191 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 111 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 111 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 111 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 111 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 222 191 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 222 191 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 222 191 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 222 191 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 139 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 139 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 139 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 139 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 197 191 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 111 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 200 191 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 146 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 222 191 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 139 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 197 191 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 111 0 ; -EndComposites -EndFontMetrics diff --git a/samples/printing/HelvBoO.afm b/samples/printing/HelvBoO.afm deleted file mode 100644 index dfe3bef5cc..0000000000 --- a/samples/printing/HelvBoO.afm +++ /dev/null @@ -1,429 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Tue Aug 5 11:51:40 PDT 1986 -FontName Helvetica-BoldOblique -EncodingScheme AdobeStandardEncoding -FullName Helvetica Bold Oblique -FamilyName Helvetica -Weight Bold -ItalicAngle -12.0 -IsFixedPitch false -UnderlinePosition -106 -UnderlineThickness 105 -Version 001.001 -Notice Helvetica is a registered trademark of Allied Corporation -FontBBox -177 -221 1107 936 -CapHeight 729 -XHeight 542 -Descender -219 -Ascender 729 -StartCharMetrics 228 -C 32 ; WX 278 ; N space ; B 0 0 0 0 ; -C 33 ; WX 333 ; N exclam ; B 112 0 417 729 ; -C 34 ; WX 474 ; N quotedbl ; B 177 470 579 729 ; -C 35 ; WX 556 ; N numbersign ; B 33 -30 660 696 ; -C 36 ; WX 556 ; N dollar ; B 59 -125 628 765 ; -C 37 ; WX 889 ; N percent ; B 129 -18 903 708 ; -C 38 ; WX 722 ; N ampersand ; B 89 -20 720 729 ; -C 39 ; WX 278 ; N quoteright ; B 166 469 356 729 ; -C 40 ; WX 333 ; N parenleft ; B 84 -202 458 729 ; -C 41 ; WX 333 ; N parenright ; B -21 -202 356 729 ; -C 42 ; WX 389 ; N asterisk ; B 145 385 478 730 ; -C 43 ; WX 584 ; N plus ; B 87 -10 596 474 ; -C 44 ; WX 278 ; N comma ; B 27 -174 245 146 ; -C 45 ; WX 333 ; N hyphen ; B 70 208 371 344 ; -C 46 ; WX 278 ; N period ; B 64 0 245 146 ; -C 47 ; WX 278 ; N slash ; B -1 -14 427 715 ; -C 48 ; WX 556 ; N zero ; B 81 -23 614 725 ; -C 49 ; WX 556 ; N one ; B 172 0 529 709 ; -C 50 ; WX 556 ; N two ; B 30 0 628 726 ; -C 51 ; WX 556 ; N three ; B 67 -23 613 726 ; -C 52 ; WX 556 ; N four ; B 57 0 599 709 ; -C 53 ; WX 556 ; N five ; B 59 -24 641 709 ; -C 54 ; WX 556 ; N six ; B 85 -23 625 727 ; -C 55 ; WX 556 ; N seven ; B 131 0 679 709 ; -C 56 ; WX 556 ; N eight ; B 60 -23 620 726 ; -C 57 ; WX 556 ; N nine ; B 68 -23 611 728 ; -C 58 ; WX 333 ; N colon ; B 113 0 374 521 ; -C 59 ; WX 333 ; N semicolon ; B 76 -174 374 521 ; -C 60 ; WX 584 ; N less ; B 77 -10 630 474 ; -C 61 ; WX 584 ; N equal ; B 61 52 622 412 ; -C 62 ; WX 584 ; N greater ; B 38 -10 591 474 ; -C 63 ; WX 611 ; N question ; B 168 0 672 744 ; -C 64 ; WX 975 ; N at ; B 73 -136 1032 746 ; -C 65 ; WX 722 ; N A ; B 26 0 703 729 ; -C 66 ; WX 722 ; N B ; B 82 0 762 729 ; -C 67 ; WX 722 ; N C ; B 107 -23 793 741 ; -C 68 ; WX 722 ; N D ; B 77 0 776 729 ; -C 69 ; WX 667 ; N E ; B 79 0 762 729 ; -C 70 ; WX 611 ; N F ; B 74 0 741 729 ; -C 71 ; WX 778 ; N G ; B 107 -24 819 741 ; -C 72 ; WX 722 ; N H ; B 68 0 812 729 ; -C 73 ; WX 278 ; N I ; B 63 0 368 729 ; -C 74 ; WX 556 ; N J ; B 59 -23 641 729 ; -C 75 ; WX 722 ; N K ; B 74 0 843 729 ; -C 76 ; WX 611 ; N L ; B 80 0 606 729 ; -C 77 ; WX 833 ; N M ; B 66 0 931 729 ; -C 78 ; WX 722 ; N N ; B 68 0 816 729 ; -C 79 ; WX 778 ; N O ; B 106 -23 828 741 ; -C 80 ; WX 667 ; N P ; B 76 0 747 729 ; -C 81 ; WX 778 ; N Q ; B 109 -54 831 741 ; -C 82 ; WX 722 ; N R ; B 80 0 785 729 ; -C 83 ; WX 667 ; N S ; B 76 -23 725 741 ; -C 84 ; WX 611 ; N T ; B 142 0 753 729 ; -C 85 ; WX 722 ; N U ; B 119 -23 809 729 ; -C 86 ; WX 667 ; N V ; B 179 0 802 729 ; -C 87 ; WX 944 ; N W ; B 168 0 1087 729 ; -C 88 ; WX 667 ; N X ; B 22 0 802 729 ; -C 89 ; WX 667 ; N Y ; B 182 0 805 729 ; -C 90 ; WX 611 ; N Z ; B 30 0 733 729 ; -C 91 ; WX 333 ; N bracketleft ; B 23 -202 463 729 ; -C 92 ; WX 278 ; N backslash ; B 138 -21 285 708 ; -C 93 ; WX 333 ; N bracketright ; B -25 -202 415 729 ; -C 94 ; WX 584 ; N asciicircum ; B 119 271 580 696 ; -C 95 ; WX 556 ; N underscore ; B -65 -200 550 -130 ; -C 96 ; WX 278 ; N quoteleft ; B 167 469 357 729 ; -C 97 ; WX 556 ; N a ; B 50 -24 578 551 ; -C 98 ; WX 611 ; N b ; B 59 -23 640 729 ; -C 99 ; WX 556 ; N c ; B 77 -23 597 551 ; -C 100 ; WX 611 ; N d ; B 79 -23 700 729 ; -C 101 ; WX 556 ; N e ; B 64 -23 591 551 ; -C 102 ; WX 333 ; N f ; B 90 0 464 729 ; L i fi ; L l fl ; -C 103 ; WX 611 ; N g ; B 26 -220 656 551 ; -C 104 ; WX 611 ; N h ; B 67 0 629 729 ; -C 105 ; WX 278 ; N i ; B 67 0 362 729 ; -C 106 ; WX 278 ; N j ; B -43 -219 365 729 ; -C 107 ; WX 556 ; N k ; B 59 0 651 729 ; -C 108 ; WX 278 ; N l ; B 67 0 362 729 ; -C 109 ; WX 889 ; N m ; B 60 0 911 553 ; -C 110 ; WX 611 ; N n ; B 63 0 629 551 ; -C 111 ; WX 611 ; N o ; B 82 -23 634 551 ; -C 112 ; WX 611 ; N p ; B 11 -219 637 551 ; -C 113 ; WX 611 ; N q ; B 72 -219 659 551 ; -C 114 ; WX 389 ; N r ; B 63 0 487 553 ; -C 115 ; WX 556 ; N s ; B 60 -23 589 551 ; -C 116 ; WX 333 ; N t ; B 101 -23 414 678 ; -C 117 ; WX 611 ; N u ; B 88 -23 656 542 ; -C 118 ; WX 556 ; N v ; B 129 0 651 542 ; -C 119 ; WX 778 ; N w ; B 120 0 881 542 ; -C 120 ; WX 556 ; N x ; B 16 0 648 542 ; -C 121 ; WX 556 ; N y ; B 37 -219 653 542 ; -C 122 ; WX 500 ; N z ; B 21 0 575 542 ; -C 123 ; WX 389 ; N braceleft ; B 84 -202 472 729 ; -C 124 ; WX 280 ; N bar ; B 57 -202 335 729 ; -C 125 ; WX 389 ; N braceright ; B 29 -202 419 729 ; -C 126 ; WX 584 ; N asciitilde ; B 97 144 581 322 ; -C 161 ; WX 333 ; N exclamdown ; B 26 -187 331 542 ; -C 162 ; WX 556 ; N cent ; B 79 -122 598 637 ; -C 163 ; WX 556 ; N sterling ; B 49 -20 629 717 ; -C 164 ; WX 167 ; N fraction ; B -177 -20 489 715 ; -C 165 ; WX 556 ; N yen ; B 107 0 702 705 ; -C 166 ; WX 556 ; N florin ; B -21 -221 690 745 ; -C 167 ; WX 556 ; N section ; B 56 -201 596 728 ; -C 168 ; WX 556 ; N currency ; B 66 105 644 604 ; -C 169 ; WX 238 ; N quotesingle ; B 177 469 343 729 ; -C 170 ; WX 500 ; N quotedblleft ; B 171 469 588 729 ; -C 171 ; WX 556 ; N guillemotleft ; B 135 71 571 484 ; -C 172 ; WX 333 ; N guilsinglleft ; B 128 73 351 476 ; -C 173 ; WX 333 ; N guilsinglright ; B 96 73 319 476 ; -C 174 ; WX 611 ; N fi ; B 85 0 703 729 ; -C 175 ; WX 611 ; N fl ; B 88 0 701 729 ; -C 177 ; WX 556 ; N endash ; B 35 208 624 313 ; -C 178 ; WX 556 ; N dagger ; B 109 -195 626 708 ; -C 179 ; WX 556 ; N daggerdbl ; B 35 -195 623 708 ; -C 180 ; WX 278 ; N periodcentered ; B 143 318 270 442 ; -C 182 ; WX 556 ; N paragraph ; B 121 -195 684 729 ; -C 183 ; WX 350 ; N bullet ; B 111 175 367 425 ; -C 184 ; WX 278 ; N quotesinglbase ; B 37 -135 228 125 ; -C 185 ; WX 500 ; N quotedblbase ; B 37 -164 462 141 ; -C 186 ; WX 500 ; N quotedblright ; B 173 469 595 729 ; -C 187 ; WX 556 ; N guillemotright ; B 103 71 533 482 ; -C 188 ; WX 1000 ; N ellipsis ; B 92 0 939 146 ; -C 189 ; WX 1000 ; N perthousand ; B 72 -20 1021 745 ; -C 191 ; WX 611 ; N questiondown ; B 52 -192 556 542 ; -C 193 ; WX 333 ; N grave ; B 175 595 339 745 ; -C 194 ; WX 333 ; N acute ; B 247 595 475 745 ; -C 195 ; WX 333 ; N circumflex ; B 135 598 453 745 ; -C 196 ; WX 333 ; N tilde ; B 117 595 500 729 ; -C 197 ; WX 333 ; N macron ; B 150 629 467 717 ; -C 198 ; WX 333 ; N breve ; B 188 593 455 736 ; -C 199 ; WX 333 ; N dotaccent ; B 241 607 377 729 ; -C 200 ; WX 333 ; N dieresis ; B 147 609 469 731 ; -C 202 ; WX 333 ; N ring ; B 214 565 398 745 ; -C 203 ; WX 333 ; N cedilla ; B -13 -220 270 -9 ; -C 205 ; WX 333 ; N hungarumlaut ; B 82 595 498 745 ; -C 206 ; WX 333 ; N ogonek ; B 23 -195 248 38 ; -C 207 ; WX 333 ; N caron ; B 167 598 485 745 ; -C 208 ; WX 1000 ; N emdash ; B 37 208 1070 313 ; -C 225 ; WX 1000 ; N AE ; B 1 0 1104 729 ; -C 227 ; WX 370 ; N ordfeminine ; B 96 277 451 746 ; -C 232 ; WX 611 ; N Lslash ; B 54 0 624 729 ; -C 233 ; WX 778 ; N Oslash ; B 34 -34 906 754 ; -C 234 ; WX 1000 ; N OE ; B 90 -20 1107 741 ; -C 235 ; WX 365 ; N ordmasculine ; B 92 276 471 745 ; -C 241 ; WX 889 ; N ae ; B 54 -20 927 555 ; -C 245 ; WX 278 ; N dotlessi ; B 67 0 322 542 ; -C 248 ; WX 278 ; N lslash ; B 50 0 372 729 ; -C 249 ; WX 611 ; N oslash ; B 12 -34 709 561 ; -C 250 ; WX 944 ; N oe ; B 71 -21 986 554 ; -C 251 ; WX 611 ; N germandbls ; B 67 -16 654 730 ; -C -1 ; WX 722 ; N Aacute ; B 26 0 714 936 ; -C -1 ; WX 722 ; N Acircumflex ; B 26 0 703 936 ; -C -1 ; WX 722 ; N Adieresis ; B 26 0 708 922 ; -C -1 ; WX 722 ; N Agrave ; B 26 0 703 936 ; -C -1 ; WX 722 ; N Aring ; B 26 0 703 936 ; -C -1 ; WX 722 ; N Atilde ; B 26 0 739 920 ; -C -1 ; WX 722 ; N Ccedilla ; B 107 -220 793 741 ; -C -1 ; WX 667 ; N Eacute ; B 79 0 762 936 ; -C -1 ; WX 667 ; N Ecircumflex ; B 79 0 762 936 ; -C -1 ; WX 667 ; N Edieresis ; B 79 0 762 922 ; -C -1 ; WX 667 ; N Egrave ; B 79 0 762 936 ; -C -1 ; WX 722 ; N Eth ; B 53 0 776 729 ; -C -1 ; WX 278 ; N Iacute ; B 63 0 489 936 ; -C -1 ; WX 278 ; N Icircumflex ; B 63 0 467 936 ; -C -1 ; WX 278 ; N Idieresis ; B 63 0 483 922 ; -C -1 ; WX 278 ; N Igrave ; B 63 0 368 936 ; -C -1 ; WX 722 ; N Ntilde ; B 68 0 816 920 ; -C -1 ; WX 778 ; N Oacute ; B 106 -23 828 936 ; -C -1 ; WX 778 ; N Ocircumflex ; B 106 -23 828 936 ; -C -1 ; WX 778 ; N Odieresis ; B 106 -23 828 922 ; -C -1 ; WX 778 ; N Ograve ; B 106 -23 828 936 ; -C -1 ; WX 778 ; N Otilde ; B 106 -23 828 920 ; -C -1 ; WX 667 ; N Scaron ; B 76 -23 725 936 ; -C -1 ; WX 667 ; N Thorn ; B 76 0 730 729 ; -C -1 ; WX 722 ; N Uacute ; B 119 -23 809 936 ; -C -1 ; WX 722 ; N Ucircumflex ; B 119 -23 809 936 ; -C -1 ; WX 722 ; N Udieresis ; B 119 -23 809 922 ; -C -1 ; WX 722 ; N Ugrave ; B 119 -23 809 936 ; -C -1 ; WX 667 ; N Yacute ; B 182 0 805 932 ; -C -1 ; WX 667 ; N Ydieresis ; B 182 0 805 922 ; -C -1 ; WX 611 ; N Zcaron ; B 30 0 733 936 ; -C -1 ; WX 556 ; N aacute ; B 50 -24 587 745 ; -C -1 ; WX 556 ; N acircumflex ; B 50 -24 578 745 ; -C -1 ; WX 556 ; N adieresis ; B 50 -24 581 731 ; -C -1 ; WX 556 ; N agrave ; B 50 -24 578 745 ; -C -1 ; WX 556 ; N aring ; B 50 -24 578 745 ; -C -1 ; WX 556 ; N atilde ; B 50 -24 612 729 ; -C -1 ; WX 280 ; N brokenbar ; B 57 -202 335 729 ; -C -1 ; WX 556 ; N ccedilla ; B 77 -220 597 551 ; -C -1 ; WX 737 ; N copyright ; B 54 -20 837 745 ; -C -1 ; WX 400 ; N degree ; B 169 425 476 725 ; -C -1 ; WX 584 ; N divide ; B 87 -10 596 474 ; -C -1 ; WX 556 ; N eacute ; B 64 -23 591 745 ; -C -1 ; WX 556 ; N ecircumflex ; B 64 -23 591 745 ; -C -1 ; WX 556 ; N edieresis ; B 64 -23 591 731 ; -C -1 ; WX 556 ; N egrave ; B 64 -23 591 745 ; -C -1 ; WX 611 ; N eth ; B 82 -23 633 730 ; -C -1 ; WX 278 ; N iacute ; B 67 0 448 745 ; -C -1 ; WX 278 ; N icircumflex ; B 67 0 426 745 ; -C -1 ; WX 278 ; N idieresis ; B 67 0 442 731 ; -C -1 ; WX 278 ; N igrave ; B 67 0 322 745 ; -C -1 ; WX 584 ; N logicalnot ; B 103 121 632 412 ; -C -1 ; WX 584 ; N minus ; B 77 174 606 290 ; -C -1 ; WX 611 ; N mu ; B 11 -219 656 542 ; -C -1 ; WX 584 ; N multiply ; B 66 -10 617 474 ; -C -1 ; WX 611 ; N ntilde ; B 63 0 646 729 ; -C -1 ; WX 611 ; N oacute ; B 82 -23 634 745 ; -C -1 ; WX 611 ; N ocircumflex ; B 82 -23 634 745 ; -C -1 ; WX 611 ; N odieresis ; B 82 -23 634 731 ; -C -1 ; WX 611 ; N ograve ; B 82 -23 634 745 ; -C -1 ; WX 834 ; N onehalf ; B 120 -20 871 715 ; -C -1 ; WX 834 ; N onequarter ; B 151 -20 846 715 ; -C -1 ; WX 333 ; N onesuperior ; B 169 284 398 709 ; -C -1 ; WX 611 ; N otilde ; B 82 -23 639 729 ; -C -1 ; WX 584 ; N plusminus ; B 40 0 639 674 ; -C -1 ; WX 737 ; N registered ; B 55 -20 837 745 ; -C -1 ; WX 556 ; N scaron ; B 60 -23 597 745 ; -C -1 ; WX 611 ; N thorn ; B 11 -219 641 729 ; -C -1 ; WX 834 ; N threequarters ; B 116 -20 863 725 ; -C -1 ; WX 333 ; N threesuperior ; B 92 271 442 720 ; -C -1 ; WX 1000 ; N trademark ; B 213 341 1087 745 ; -C -1 ; WX 333 ; N twosuperior ; B 69 284 452 719 ; -C -1 ; WX 611 ; N uacute ; B 88 -23 656 745 ; -C -1 ; WX 611 ; N ucircumflex ; B 88 -23 656 745 ; -C -1 ; WX 611 ; N udieresis ; B 88 -23 656 731 ; -C -1 ; WX 611 ; N ugrave ; B 88 -23 656 745 ; -C -1 ; WX 556 ; N yacute ; B 37 -219 653 745 ; -C -1 ; WX 556 ; N ydieresis ; B 37 -219 653 731 ; -C -1 ; WX 500 ; N zcaron ; B 21 0 575 745 ; -EndCharMetrics -StartKernData -StartKernPairs 99 - -KPX A space -37 -KPX A quoteright -55 -KPX A Y -74 -KPX A W -55 -KPX A V -74 -KPX A T -74 - -KPX F period -111 -KPX F comma -111 -KPX F A -55 - -KPX L space -18 -KPX L quoteright -74 -KPX L Y -74 -KPX L W -55 -KPX L V -55 -KPX L T -74 - -KPX P space -37 -KPX P period -129 -KPX P comma -129 -KPX P A -74 - -KPX R Y -18 -KPX R W -18 -KPX R T -18 - -KPX T y -37 -KPX T w -37 -KPX T u -18 -KPX T semicolon -74 -KPX T s -37 -KPX T r -18 -KPX T period -74 -KPX T o -37 -KPX T i -18 -KPX T hyphen -55 -KPX T e -37 -KPX T comma -74 -KPX T colon -74 -KPX T c -37 -KPX T a -37 -KPX T O -18 -KPX T A -74 - -KPX V y -18 -KPX V u -18 -KPX V semicolon -37 -KPX V r -18 -KPX V period -92 -KPX V o -37 -KPX V i -37 -KPX V hyphen -37 -KPX V e -37 -KPX V comma -92 -KPX V colon -37 -KPX V a -37 -KPX V A -74 - -KPX W y -18 -KPX W u -18 -KPX W semicolon -37 -KPX W r -18 -KPX W period -74 -KPX W o -18 -KPX W i -9 -KPX W hyphen -37 -KPX W e -18 -KPX W comma -74 -KPX W colon -37 -KPX W a -18 -KPX W A -55 - -KPX Y v -37 -KPX Y u -37 -KPX Y space -18 -KPX Y semicolon -55 -KPX Y q -37 -KPX Y period -92 -KPX Y p -37 -KPX Y i -37 -KPX Y o -37 -KPX Y hyphen -74 -KPX Y e -37 -KPX Y comma -92 -KPX Y colon -55 -KPX Y a -37 -KPX Y A -74 - -KPX f quoteright 18 -KPX f f -18 - -KPX one one -74 - -KPX quoteleft quoteleft -37 - -KPX quoteright t 18 -KPX quoteright space -37 -KPX quoteright s -18 -KPX quoteright quoteright -37 - -KPX r quoteright 37 -KPX r period -55 -KPX r comma -55 - -KPX space Y -18 -KPX space A -37 - -KPX v period -55 -KPX v comma -55 - -KPX w period -37 -KPX w comma -37 - -KPX y period -37 -KPX y comma -37 -EndKernPairs -EndKernData -StartComposites 56 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 187 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 83 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 167 187 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 111 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 194 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 111 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 167 187 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 111 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 194 187 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 194 187 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 194 187 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 194 187 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 139 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 139 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 139 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 139 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute -27 187 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -27 187 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -27 187 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave -27 187 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 167 187 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 167 187 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 167 187 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 167 187 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 111 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 111 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 111 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 111 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 194 187 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 194 187 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 194 187 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 194 187 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 111 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 111 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 111 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 111 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 222 187 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 222 187 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 222 187 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 222 187 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 139 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 139 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 139 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 139 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 194 187 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 111 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 194 187 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 139 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 222 187 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 139 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 194 187 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 111 0 ; -EndComposites -EndFontMetrics diff --git a/samples/printing/HelvO.afm b/samples/printing/HelvO.afm deleted file mode 100644 index c24bdc1c20..0000000000 --- a/samples/printing/HelvO.afm +++ /dev/null @@ -1,428 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Tue Aug 5 11:45:36 PDT 1986 -FontName Helvetica-Oblique -EncodingScheme AdobeStandardEncoding -FullName Helvetica Oblique -FamilyName Helvetica -Weight Medium -ItalicAngle -12.0 -IsFixedPitch false -UnderlinePosition -106 -UnderlineThickness 73 -Version 001.001 -Notice Helvetica is a registered trademark of Allied Corporation. -FontBBox -178 -220 1108 944 -CapHeight 729 -XHeight 525 -Descender -219 -Ascender 729 -StartCharMetrics 228 -C 32 ; WX 278 ; N space ; B 0 0 0 0 ; -C 33 ; WX 278 ; N exclam ; B 124 0 363 729 ; -C 34 ; WX 355 ; N quotedbl ; B 177 462 455 708 ; -C 35 ; WX 556 ; N numbersign ; B 54 -20 649 698 ; -C 36 ; WX 556 ; N dollar ; B 69 -125 613 770 ; -C 37 ; WX 889 ; N percent ; B 134 -20 895 708 ; -C 38 ; WX 667 ; N ampersand ; B 83 -23 644 710 ; -C 39 ; WX 222 ; N quoteright ; B 165 476 308 708 ; -C 40 ; WX 333 ; N parenleft ; B 113 -213 446 729 ; -C 41 ; WX 333 ; N parenright ; B -7 -213 325 729 ; -C 42 ; WX 389 ; N asterisk ; B 169 452 471 740 ; -C 43 ; WX 584 ; N plus ; B 92 -10 591 474 ; -C 44 ; WX 278 ; N comma ; B 55 -150 214 104 ; -C 45 ; WX 333 ; N hyphen ; B 97 240 351 313 ; -C 46 ; WX 278 ; N period ; B 87 0 213 104 ; -C 47 ; WX 278 ; N slash ; B -12 -21 434 708 ; -C 48 ; WX 556 ; N zero ; B 98 -23 598 709 ; -C 49 ; WX 556 ; N one ; B 208 0 498 709 ; -C 50 ; WX 556 ; N two ; B 34 0 620 710 ; -C 51 ; WX 556 ; N three ; B 71 -23 599 709 ; -C 52 ; WX 556 ; N four ; B 63 0 573 709 ; -C 53 ; WX 556 ; N five ; B 70 -23 629 709 ; -C 54 ; WX 556 ; N six ; B 93 -23 611 709 ; -C 55 ; WX 556 ; N seven ; B 137 0 671 709 ; -C 56 ; WX 556 ; N eight ; B 74 -23 604 709 ; -C 57 ; WX 556 ; N nine ; B 83 -23 599 709 ; -C 58 ; WX 278 ; N colon ; B 110 0 326 525 ; -C 59 ; WX 278 ; N semicolon ; B 78 -150 325 516 ; -C 60 ; WX 584 ; N less ; B 87 -10 635 474 ; -C 61 ; WX 584 ; N equal ; B 74 112 609 352 ; -C 62 ; WX 584 ; N greater ; B 48 -10 596 474 ; -C 63 ; WX 556 ; N question ; B 184 0 630 738 ; -C 64 ; WX 1015 ; N at ; B 80 -146 1036 737 ; -C 65 ; WX 667 ; N A ; B 17 0 653 729 ; -C 66 ; WX 667 ; N B ; B 79 0 711 729 ; -C 67 ; WX 722 ; N C ; B 112 -23 770 741 ; -C 68 ; WX 722 ; N D ; B 89 0 759 729 ; -C 69 ; WX 667 ; N E ; B 90 0 751 729 ; -C 70 ; WX 611 ; N F ; B 90 0 734 729 ; -C 71 ; WX 778 ; N G ; B 109 -23 809 741 ; -C 72 ; WX 722 ; N H ; B 83 0 799 729 ; -C 73 ; WX 278 ; N I ; B 100 0 349 729 ; -C 74 ; WX 500 ; N J ; B 47 -26 581 729 ; -C 75 ; WX 667 ; N K ; B 79 0 813 729 ; -C 76 ; WX 556 ; N L ; B 80 0 551 729 ; -C 77 ; WX 833 ; N M ; B 75 0 916 729 ; -C 78 ; WX 722 ; N N ; B 76 0 801 729 ; -C 79 ; WX 778 ; N O ; B 104 -23 828 741 ; -C 80 ; WX 667 ; N P ; B 91 0 733 730 ; -C 81 ; WX 778 ; N Q ; B 104 -59 828 741 ; -C 82 ; WX 722 ; N R ; B 93 0 770 729 ; -C 83 ; WX 667 ; N S ; B 89 -23 714 741 ; -C 84 ; WX 611 ; N T ; B 158 0 748 729 ; -C 85 ; WX 722 ; N U ; B 124 -23 800 729 ; -C 86 ; WX 667 ; N V ; B 185 0 800 729 ; -C 87 ; WX 944 ; N W ; B 177 0 1084 729 ; -C 88 ; WX 667 ; N X ; B 22 0 794 729 ; -C 89 ; WX 667 ; N Y ; B 168 0 816 729 ; -C 90 ; WX 611 ; N Z ; B 28 0 737 729 ; -C 91 ; WX 278 ; N bracketleft ; B 19 -214 405 729 ; -C 92 ; WX 278 ; N backslash ; B 147 -20 280 729 ; -C 93 ; WX 278 ; N bracketright ; B -23 -215 364 729 ; -C 94 ; WX 469 ; N asciicircum ; B 115 333 496 713 ; -C 95 ; WX 556 ; N underscore ; B -59 -175 551 -125 ; -C 96 ; WX 222 ; N quoteleft ; B 163 459 308 708 ; -C 97 ; WX 556 ; N a ; B 65 -23 568 540 ; -C 98 ; WX 556 ; N b ; B 54 -23 588 729 ; -C 99 ; WX 500 ; N c ; B 76 -23 554 540 ; -C 100 ; WX 556 ; N d ; B 73 -23 650 729 ; -C 101 ; WX 556 ; N e ; B 84 -23 580 541 ; -C 102 ; WX 278 ; N f ; B 89 0 413 733 ; L i fi ; L l fl ; -C 103 ; WX 556 ; N g ; B 32 -220 601 540 ; -C 104 ; WX 556 ; N h ; B 70 0 574 729 ; -C 105 ; WX 222 ; N i ; B 66 0 305 729 ; -C 106 ; WX 222 ; N j ; B -65 -220 308 729 ; -C 107 ; WX 500 ; N k ; B 58 0 584 729 ; -C 108 ; WX 222 ; N l ; B 68 0 307 729 ; -C 109 ; WX 833 ; N m ; B 71 0 852 540 ; -C 110 ; WX 556 ; N n ; B 70 0 574 540 ; -C 111 ; WX 556 ; N o ; B 80 -23 576 540 ; -C 112 ; WX 556 ; N p ; B 7 -219 586 540 ; -C 113 ; WX 556 ; N q ; B 71 -219 607 540 ; -C 114 ; WX 333 ; N r ; B 69 0 436 540 ; -C 115 ; WX 500 ; N s ; B 61 -24 520 540 ; -C 116 ; WX 278 ; N t ; B 97 -24 366 667 ; -C 117 ; WX 556 ; N u ; B 88 -23 594 525 ; -C 118 ; WX 500 ; N v ; B 122 0 598 525 ; -C 119 ; WX 722 ; N w ; B 118 0 820 525 ; -C 120 ; WX 500 ; N x ; B 17 0 583 525 ; -C 121 ; WX 500 ; N y ; B 8 -219 590 525 ; -C 122 ; WX 500 ; N z ; B 31 0 557 525 ; -C 123 ; WX 334 ; N braceleft ; B 91 -214 431 731 ; -C 124 ; WX 260 ; N bar ; B 54 -215 315 729 ; -C 125 ; WX 334 ; N braceright ; B -16 -214 324 731 ; -C 126 ; WX 584 ; N asciitilde ; B 137 267 594 438 ; -C 161 ; WX 333 ; N exclamdown ; B 76 -214 317 525 ; -C 162 ; WX 556 ; N cent ; B 96 -120 585 628 ; -C 163 ; WX 556 ; N sterling ; B 44 -21 628 726 ; -C 164 ; WX 167 ; N fraction ; B -178 -21 486 708 ; -C 165 ; WX 556 ; N yen ; B 100 0 696 710 ; -C 166 ; WX 556 ; N florin ; B -32 -214 696 742 ; -C 167 ; WX 556 ; N section ; B 63 -215 589 729 ; -C 168 ; WX 556 ; N currency ; B 110 126 593 554 ; -C 169 ; WX 191 ; N quotesingle ; B 173 462 292 708 ; -C 170 ; WX 333 ; N quotedblleft ; B 146 459 449 708 ; -C 171 ; WX 556 ; N guillemotleft ; B 147 106 548 438 ; -C 172 ; WX 333 ; N guilsinglleft ; B 140 112 336 436 ; -C 173 ; WX 333 ; N guilsinglright ; B 109 112 307 436 ; -C 174 ; WX 500 ; N fi ; B 83 0 591 733 ; -C 175 ; WX 500 ; N fl ; B 88 0 585 733 ; -C 177 ; WX 556 ; N endash ; B 46 240 628 313 ; -C 178 ; WX 556 ; N dagger ; B 127 -178 620 710 ; -C 179 ; WX 556 ; N daggerdbl ; B 51 -178 620 710 ; -C 180 ; WX 278 ; N periodcentered ; B 166 318 293 442 ; -C 182 ; WX 537 ; N paragraph ; B 145 -178 677 729 ; -C 183 ; WX 350 ; N bullet ; B 120 220 376 470 ; -C 184 ; WX 222 ; N quotesinglbase ; B 37 -129 180 103 ; -C 185 ; WX 333 ; N quotedblbase ; B 20 -129 322 103 ; -C 186 ; WX 333 ; N quotedblright ; B 150 476 452 708 ; -C 187 ; WX 556 ; N guillemotright ; B 121 106 518 438 ; -C 188 ; WX 1000 ; N ellipsis ; B 115 0 907 104 ; -C 189 ; WX 1000 ; N perthousand ; B 93 -20 1024 740 ; -C 191 ; WX 611 ; N questiondown ; B 86 -213 531 525 ; -C 193 ; WX 333 ; N grave ; B 179 592 357 740 ; -C 194 ; WX 333 ; N acute ; B 218 592 458 740 ; -C 195 ; WX 333 ; N circumflex ; B 146 591 433 741 ; -C 196 ; WX 333 ; N tilde ; B 130 589 471 716 ; -C 197 ; WX 333 ; N macron ; B 160 621 450 694 ; -C 198 ; WX 333 ; N breve ; B 165 594 471 729 ; -C 199 ; WX 333 ; N dotaccent ; B 244 605 370 709 ; -C 200 ; WX 333 ; N dieresis ; B 159 605 446 708 ; -C 202 ; WX 333 ; N ring ; B 216 566 396 741 ; -C 203 ; WX 333 ; N cedilla ; B 1 -214 264 0 ; -C 205 ; WX 333 ; N hungarumlaut ; B 91 592 505 740 ; -C 206 ; WX 333 ; N ogonek ; B 35 -189 246 15 ; -C 207 ; WX 333 ; N caron ; B 176 590 463 740 ; -C 208 ; WX 1000 ; N emdash ; B 42 240 1068 313 ; -C 225 ; WX 1000 ; N AE ; B 11 0 1087 729 ; -C 227 ; WX 370 ; N ordfeminine ; B 107 301 441 740 ; -C 232 ; WX 556 ; N Lslash ; B 61 0 570 729 ; -C 233 ; WX 778 ; N Oslash ; B 32 -23 867 742 ; -C 234 ; WX 1000 ; N OE ; B 101 -20 1108 739 ; -C 235 ; WX 365 ; N ordmasculine ; B 114 301 452 741 ; -C 241 ; WX 889 ; N ae ; B 59 -20 915 546 ; -C 245 ; WX 278 ; N dotlessi ; B 94 0 290 525 ; -C 248 ; WX 222 ; N lslash ; B 62 0 312 729 ; -C 249 ; WX 611 ; N oslash ; B 19 -27 639 548 ; -C 250 ; WX 944 ; N oe ; B 85 -22 966 540 ; -C 251 ; WX 611 ; N germandbls ; B 126 -20 655 729 ; -C -1 ; WX 667 ; N Aacute ; B 17 0 667 939 ; -C -1 ; WX 667 ; N Acircumflex ; B 17 0 653 940 ; -C -1 ; WX 667 ; N Adieresis ; B 17 0 655 907 ; -C -1 ; WX 667 ; N Agrave ; B 17 0 653 939 ; -C -1 ; WX 667 ; N Aring ; B 17 0 653 940 ; -C -1 ; WX 667 ; N Atilde ; B 17 0 680 915 ; -C -1 ; WX 722 ; N Ccedilla ; B 112 -214 770 741 ; -C -1 ; WX 667 ; N Eacute ; B 90 0 751 939 ; -C -1 ; WX 667 ; N Ecircumflex ; B 90 0 751 940 ; -C -1 ; WX 667 ; N Edieresis ; B 90 0 751 907 ; -C -1 ; WX 667 ; N Egrave ; B 90 0 751 939 ; -C -1 ; WX 722 ; N Eth ; B 73 0 759 729 ; -C -1 ; WX 278 ; N Iacute ; B 100 0 479 939 ; -C -1 ; WX 278 ; N Icircumflex ; B 100 0 454 940 ; -C -1 ; WX 278 ; N Idieresis ; B 100 0 467 907 ; -C -1 ; WX 278 ; N Igrave ; B 100 0 378 939 ; -C -1 ; WX 722 ; N Ntilde ; B 76 0 801 915 ; -C -1 ; WX 778 ; N Oacute ; B 104 -23 828 939 ; -C -1 ; WX 778 ; N Ocircumflex ; B 104 -23 828 940 ; -C -1 ; WX 778 ; N Odieresis ; B 104 -23 828 907 ; -C -1 ; WX 778 ; N Ograve ; B 104 -23 828 939 ; -C -1 ; WX 778 ; N Otilde ; B 104 -23 828 915 ; -C -1 ; WX 667 ; N Scaron ; B 89 -23 714 939 ; -C -1 ; WX 667 ; N Thorn ; B 91 0 707 729 ; -C -1 ; WX 722 ; N Uacute ; B 124 -23 800 939 ; -C -1 ; WX 722 ; N Ucircumflex ; B 124 -23 800 940 ; -C -1 ; WX 722 ; N Udieresis ; B 124 -23 800 907 ; -C -1 ; WX 722 ; N Ugrave ; B 124 -23 800 939 ; -C -1 ; WX 667 ; N Yacute ; B 168 0 816 944 ; -C -1 ; WX 667 ; N Ydieresis ; B 168 0 816 907 ; -C -1 ; WX 611 ; N Zcaron ; B 28 0 737 939 ; -C -1 ; WX 556 ; N aacute ; B 65 -23 570 740 ; -C -1 ; WX 556 ; N acircumflex ; B 65 -23 568 741 ; -C -1 ; WX 556 ; N adieresis ; B 65 -23 568 708 ; -C -1 ; WX 556 ; N agrave ; B 65 -23 568 740 ; -C -1 ; WX 556 ; N aring ; B 65 -23 568 741 ; -C -1 ; WX 556 ; N atilde ; B 65 -23 583 716 ; -C -1 ; WX 260 ; N brokenbar ; B 54 -215 315 729 ; -C -1 ; WX 500 ; N ccedilla ; B 76 -214 554 540 ; -C -1 ; WX 737 ; N copyright ; B 55 -23 836 741 ; -C -1 ; WX 400 ; N degree ; B 165 409 472 709 ; -C -1 ; WX 584 ; N divide ; B 92 -10 591 474 ; -C -1 ; WX 556 ; N eacute ; B 84 -23 580 740 ; -C -1 ; WX 556 ; N ecircumflex ; B 84 -23 580 741 ; -C -1 ; WX 556 ; N edieresis ; B 84 -23 580 708 ; -C -1 ; WX 556 ; N egrave ; B 84 -23 580 740 ; -C -1 ; WX 556 ; N eth ; B 80 -23 572 729 ; -C -1 ; WX 278 ; N iacute ; B 94 0 431 740 ; -C -1 ; WX 278 ; N icircumflex ; B 94 0 406 741 ; -C -1 ; WX 278 ; N idieresis ; B 94 0 419 708 ; -C -1 ; WX 278 ; N igrave ; B 94 0 330 740 ; -C -1 ; WX 584 ; N logicalnot ; B 99 82 619 352 ; -C -1 ; WX 584 ; N minus ; B 81 194 601 270 ; -C -1 ; WX 556 ; N mu ; B 18 -219 594 525 ; -C -1 ; WX 584 ; N multiply ; B 59 -10 625 476 ; -C -1 ; WX 556 ; N ntilde ; B 70 0 589 716 ; -C -1 ; WX 556 ; N oacute ; B 80 -23 576 740 ; -C -1 ; WX 556 ; N ocircumflex ; B 80 -23 576 741 ; -C -1 ; WX 556 ; N odieresis ; B 80 -23 576 708 ; -C -1 ; WX 556 ; N ograve ; B 80 -23 576 740 ; -C -1 ; WX 834 ; N onehalf ; B 116 -21 869 709 ; -C -1 ; WX 834 ; N onequarter ; B 147 -21 836 709 ; -C -1 ; WX 333 ; N onesuperior ; B 184 284 370 709 ; -C -1 ; WX 556 ; N otilde ; B 80 -23 583 716 ; -C -1 ; WX 584 ; N plusminus ; B 40 0 621 618 ; -C -1 ; WX 737 ; N registered ; B 55 -23 836 741 ; -C -1 ; WX 500 ; N scaron ; B 61 -24 547 740 ; -C -1 ; WX 556 ; N thorn ; B 7 -219 588 729 ; -C -1 ; WX 834 ; N threequarters ; B 114 -21 868 709 ; -C -1 ; WX 333 ; N threesuperior ; B 96 270 435 709 ; -C -1 ; WX 1000 ; N trademark ; B 208 320 1096 741 ; -C -1 ; WX 333 ; N twosuperior ; B 71 284 447 710 ; -C -1 ; WX 556 ; N uacute ; B 88 -23 594 740 ; -C -1 ; WX 556 ; N ucircumflex ; B 88 -23 594 741 ; -C -1 ; WX 556 ; N udieresis ; B 88 -23 594 708 ; -C -1 ; WX 556 ; N ugrave ; B 88 -23 594 740 ; -C -1 ; WX 500 ; N yacute ; B 8 -219 590 740 ; -C -1 ; WX 500 ; N ydieresis ; B 8 -219 590 708 ; -C -1 ; WX 500 ; N zcaron ; B 31 0 557 740 ; -EndCharMetrics -StartKernData -StartKernPairs 98 - -KPX A y -9 -KPX A w -18 -KPX A v -18 -KPX A space -37 -KPX A quoteright -37 -KPX A Y -74 -KPX A W -18 -KPX A V -55 -KPX A T -74 - -KPX F space -18 -KPX F period -129 -KPX F comma -129 -KPX F A -74 - -KPX L y -18 -KPX L space -18 -KPX L quoteright -55 -KPX L Y -92 -KPX L W -37 -KPX L V -55 -KPX L T -74 - -KPX P space -37 -KPX P period -129 -KPX P comma -129 -KPX P A -74 - -KPX R Y -37 -KPX R W -18 -KPX R V -18 -KPX R T -18 - -KPX T y -74 -KPX T w -74 -KPX T u -74 -KPX T semicolon -74 -KPX T s -92 -KPX T r -74 -KPX T period -92 -KPX T o -92 -KPX T i -9 -KPX T hyphen -92 -KPX T e -92 -KPX T comma -92 -KPX T colon -74 -KPX T c -92 -KPX T a -92 -KPX T O -18 -KPX T A -74 - -KPX V y -18 -KPX V u -18 -KPX V semicolon -18 -KPX V r -18 -KPX V period -74 -KPX V o -37 -KPX V i -18 -KPX V hyphen -37 -KPX V e -37 -KPX V comma -74 -KPX V colon -18 -KPX V a -37 -KPX V A -55 - -KPX W period -37 -KPX W i -9 -KPX W hyphen -18 -KPX W e -18 -KPX W comma -37 -KPX W a -18 -KPX W A -18 - -KPX Y v -37 -KPX Y u -37 -KPX Y space -18 -KPX Y semicolon -37 -KPX Y q -55 -KPX Y period -92 -KPX Y p -55 -KPX Y o -55 -KPX Y i -18 -KPX Y hyphen -74 -KPX Y e -55 -KPX Y comma -92 -KPX Y colon -37 -KPX Y a -74 -KPX Y A -55 - -KPX f quoteright 37 - -KPX one one -74 - -KPX quoteleft quoteleft -37 - -KPX quoteright space -55 -KPX quoteright s -18 -KPX quoteright quoteright -37 - -KPX r quoteright 37 -KPX r period -37 -KPX r hyphen -18 -KPX r comma -55 - -KPX space Y -18 -KPX space A -37 - -KPX v period -74 -KPX v comma -74 - -KPX w period -55 -KPX w comma -55 - -KPX y period -74 -KPX y comma -74 -EndKernPairs -EndKernData -StartComposites 56 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 204 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 83 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 167 204 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 83 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 194 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 83 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 167 204 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 83 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 194 204 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 194 204 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 194 204 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 194 204 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 111 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 111 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 111 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 111 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute -27 204 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -27 204 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -27 204 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave -27 204 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 167 204 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 167 204 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 167 204 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 167 204 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 111 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 111 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 111 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 111 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 167 204 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 167 204 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 167 204 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 167 204 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 111 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 111 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 111 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 111 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 222 204 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 222 204 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 222 204 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 222 204 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 111 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 111 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 111 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 111 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 167 204 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 111 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 194 204 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 111 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 222 204 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 111 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 167 204 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 111 0 ; -EndComposites -EndFontMetrics diff --git a/samples/printing/Makefile b/samples/printing/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/printing/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/printing/Makefile.in b/samples/printing/Makefile.in deleted file mode 100644 index 253013ac47..0000000000 --- a/samples/printing/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# WXXT base directory -WXBASEDIR=@WXBASEDIR@ - -# set the OS type for compilation -OS=@OS@ -# compile a library only -RULE=bin - -# define library name -BIN_TARGET=printing -# define library sources -BIN_SRC=\ -printing.cpp - -#define library objects -BIN_OBJ=\ -printing.o - -# additional things needed to link -BIN_LINK= - -# additional things needed to compile -ADD_COMPILE= - -# include the definitions now -include ../../../template.mak diff --git a/samples/printing/TimesBo.afm b/samples/printing/TimesBo.afm deleted file mode 100644 index a821d74c50..0000000000 --- a/samples/printing/TimesBo.afm +++ /dev/null @@ -1,454 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Tue Aug 5 11:02:18 PDT 1986 -FontName Times-Bold -EncodingScheme AdobeStandardEncoding -FullName Times Bold -FamilyName Times -Weight Bold -ItalicAngle 0.0 -IsFixedPitch false -UnderlinePosition -99 -UnderlineThickness 95 -Version 001.001 -Notice Times is a trademark of Allied Corporation. -FontBBox -172 -256 1008 965 -CapHeight 681 -XHeight 460 -Descender -210 -Ascender 670 -StartCharMetrics 228 -C 32 ; WX 250 ; N space ; B 0 0 0 0 ; -C 33 ; WX 333 ; N exclam ; B 84 -18 248 690 ; -C 34 ; WX 555 ; N quotedbl ; B 67 371 425 690 ; -C 35 ; WX 500 ; N numbersign ; B -13 -17 514 684 ; -C 36 ; WX 500 ; N dollar ; B 28 -116 474 732 ; -C 37 ; WX 1000 ; N percent ; B 122 -11 881 692 ; -C 38 ; WX 833 ; N ampersand ; B 54 -17 773 690 ; -C 39 ; WX 333 ; N quoteright ; B 77 347 257 680 ; -C 40 ; WX 333 ; N parenleft ; B 49 -169 301 699 ; -C 41 ; WX 333 ; N parenright ; B 26 -169 278 699 ; -C 42 ; WX 500 ; N asterisk ; B 57 262 445 690 ; -C 43 ; WX 570 ; N plus ; B 50 -10 520 460 ; -C 44 ; WX 250 ; N comma ; B 37 -181 214 157 ; -C 45 ; WX 333 ; N hyphen ; B 48 170 283 285 ; -C 46 ; WX 250 ; N period ; B 43 -19 207 145 ; -C 47 ; WX 278 ; N slash ; B 1 -17 279 750 ; -C 48 ; WX 500 ; N zero ; B 26 -18 472 690 ; -C 49 ; WX 500 ; N one ; B 61 0 448 690 ; -C 50 ; WX 500 ; N two ; B 18 0 473 683 ; -C 51 ; WX 500 ; N three ; B 17 -19 463 683 ; -C 52 ; WX 500 ; N four ; B 23 0 472 681 ; -C 53 ; WX 500 ; N five ; B 23 -17 465 681 ; -C 54 ; WX 500 ; N six ; B 30 -18 470 684 ; -C 55 ; WX 500 ; N seven ; B 23 0 468 679 ; -C 56 ; WX 500 ; N eight ; B 22 -17 470 685 ; -C 57 ; WX 500 ; N nine ; B 26 -18 468 684 ; -C 58 ; WX 333 ; N colon ; B 83 -18 247 473 ; -C 59 ; WX 333 ; N semicolon ; B 85 -181 262 472 ; -C 60 ; WX 570 ; N less ; B 45 -10 520 460 ; -C 61 ; WX 570 ; N equal ; B 50 91 520 375 ; -C 62 ; WX 570 ; N greater ; B 50 -10 525 460 ; -C 63 ; WX 500 ; N question ; B 57 -17 438 681 ; -C 64 ; WX 930 ; N at ; B 50 -147 889 677 ; -C 65 ; WX 722 ; N A ; B 22 0 696 681 ; -C 66 ; WX 667 ; N B ; B 24 0 609 681 ; -C 67 ; WX 722 ; N C ; B 42 -17 669 690 ; -C 68 ; WX 722 ; N D ; B 22 0 684 681 ; -C 69 ; WX 667 ; N E ; B 21 0 637 681 ; -C 70 ; WX 611 ; N F ; B 17 0 582 681 ; -C 71 ; WX 778 ; N G ; B 41 -17 748 690 ; -C 72 ; WX 778 ; N H ; B 26 0 748 681 ; -C 73 ; WX 389 ; N I ; B 17 0 366 680 ; -C 74 ; WX 500 ; N J ; B 9 -89 475 681 ; -C 75 ; WX 778 ; N K ; B 29 0 761 681 ; -C 76 ; WX 667 ; N L ; B 21 0 633 681 ; -C 77 ; WX 944 ; N M ; B 21 0 914 681 ; -C 78 ; WX 722 ; N N ; B 20 -10 697 681 ; -C 79 ; WX 778 ; N O ; B 43 -18 733 690 ; -C 80 ; WX 611 ; N P ; B 24 0 593 681 ; -C 81 ; WX 778 ; N Q ; B 24 -182 751 690 ; -C 82 ; WX 722 ; N R ; B 26 0 695 681 ; -C 83 ; WX 556 ; N S ; B 43 -19 506 690 ; -C 84 ; WX 667 ; N T ; B 30 0 629 681 ; -C 85 ; WX 722 ; N U ; B 20 -19 700 681 ; -C 86 ; WX 722 ; N V ; B 22 -18 696 681 ; -C 87 ; WX 1000 ; N W ; B 19 -18 979 680 ; -C 88 ; WX 722 ; N X ; B 23 0 695 681 ; -C 89 ; WX 722 ; N Y ; B 19 0 697 680 ; -C 90 ; WX 667 ; N Z ; B 37 0 624 681 ; -C 91 ; WX 333 ; N bracketleft ; B 73 -142 296 674 ; -C 92 ; WX 278 ; N backslash ; B 1 -17 279 750 ; -C 93 ; WX 333 ; N bracketright ; B 38 -142 261 674 ; -C 94 ; WX 581 ; N asciicircum ; B 102 290 486 690 ; -C 95 ; WX 500 ; N underscore ; B -2 -256 502 -182 ; -C 96 ; WX 333 ; N quoteleft ; B 72 357 252 691 ; -C 97 ; WX 500 ; N a ; B 25 -19 484 472 ; -C 98 ; WX 556 ; N b ; B 29 -18 512 670 ; -C 99 ; WX 444 ; N c ; B 24 -17 423 472 ; -C 100 ; WX 556 ; N d ; B 31 -17 523 670 ; -C 101 ; WX 444 ; N e ; B 25 -18 415 474 ; -C 102 ; WX 333 ; N f ; B 20 0 386 690 ; L i fi ; L l fl ; -C 103 ; WX 500 ; N g ; B 25 -210 474 472 ; -C 104 ; WX 556 ; N h ; B 29 0 523 670 ; -C 105 ; WX 278 ; N i ; B 27 0 249 690 ; -C 106 ; WX 333 ; N j ; B -57 -212 256 690 ; -C 107 ; WX 556 ; N k ; B 24 0 528 670 ; -C 108 ; WX 278 ; N l ; B 25 0 247 670 ; -C 109 ; WX 833 ; N m ; B 28 0 804 471 ; -C 110 ; WX 556 ; N n ; B 28 0 523 473 ; -C 111 ; WX 500 ; N o ; B 25 -18 473 472 ; -C 112 ; WX 556 ; N p ; B 30 -210 513 473 ; -C 113 ; WX 556 ; N q ; B 32 -210 535 472 ; -C 114 ; WX 444 ; N r ; B 29 0 417 473 ; -C 115 ; WX 389 ; N s ; B 29 -17 359 472 ; -C 116 ; WX 333 ; N t ; B 22 -19 320 627 ; -C 117 ; WX 556 ; N u ; B 23 -17 524 460 ; -C 118 ; WX 500 ; N v ; B 20 -14 479 460 ; -C 119 ; WX 722 ; N w ; B 10 -14 709 460 ; -C 120 ; WX 500 ; N x ; B 11 0 488 460 ; -C 121 ; WX 500 ; N y ; B 19 -212 475 460 ; -C 122 ; WX 444 ; N z ; B 25 0 414 460 ; -C 123 ; WX 394 ; N braceleft ; B 44 -142 342 674 ; -C 124 ; WX 220 ; N bar ; B 77 -195 151 720 ; -C 125 ; WX 394 ; N braceright ; B 38 -142 336 674 ; -C 126 ; WX 520 ; N asciitilde ; B 19 237 493 461 ; -C 161 ; WX 333 ; N exclamdown ; B 85 -210 249 498 ; -C 162 ; WX 500 ; N cent ; B 44 -148 460 586 ; -C 163 ; WX 500 ; N sterling ; B 25 -17 471 682 ; -C 164 ; WX 167 ; N fraction ; B -172 -17 335 690 ; -C 165 ; WX 500 ; N yen ; B -20 0 521 681 ; -C 166 ; WX 500 ; N florin ; B 2 -157 496 713 ; -C 167 ; WX 500 ; N section ; B 63 -148 438 677 ; -C 168 ; WX 500 ; N currency ; B 3 105 498 604 ; -C 169 ; WX 278 ; N quotesingle ; B 69 371 205 690 ; -C 170 ; WX 500 ; N quotedblleft ; B 33 346 479 679 ; -C 171 ; WX 500 ; N guillemotleft ; B 25 44 471 436 ; -C 172 ; WX 333 ; N guilsinglleft ; B 51 44 302 436 ; -C 173 ; WX 333 ; N guilsinglright ; B 26 44 277 436 ; -C 174 ; WX 556 ; N fi ; B 24 0 532 690 ; -C 175 ; WX 556 ; N fl ; B 25 0 529 691 ; -C 177 ; WX 500 ; N endash ; B -4 179 500 270 ; -C 178 ; WX 500 ; N dagger ; B 52 -141 446 690 ; -C 179 ; WX 500 ; N daggerdbl ; B 57 -138 451 681 ; -C 180 ; WX 250 ; N periodcentered ; B 43 270 167 394 ; -C 182 ; WX 540 ; N paragraph ; B 30 -190 533 681 ; -C 183 ; WX 350 ; N bullet ; B 50 175 300 425 ; -C 184 ; WX 333 ; N quotesinglbase ; B 77 -179 257 154 ; -C 185 ; WX 500 ; N quotedblbase ; B 31 -179 477 154 ; -C 186 ; WX 500 ; N quotedblright ; B 31 347 477 680 ; -C 187 ; WX 500 ; N guillemotright ; B 24 44 470 436 ; -C 188 ; WX 1000 ; N ellipsis ; B 85 -18 915 146 ; -C 189 ; WX 1000 ; N perthousand ; B 1 -55 993 718 ; -C 191 ; WX 500 ; N questiondown ; B 56 -210 437 488 ; -C 193 ; WX 333 ; N grave ; B 26 523 242 695 ; -C 194 ; WX 333 ; N acute ; B 83 523 299 695 ; -C 195 ; WX 333 ; N circumflex ; B 28 520 304 690 ; -C 196 ; WX 333 ; N tilde ; B 34 559 298 671 ; -C 197 ; WX 333 ; N macron ; B 34 543 297 600 ; -C 198 ; WX 333 ; N breve ; B 32 529 300 667 ; -C 199 ; WX 333 ; N dotaccent ; B 112 515 222 625 ; -C 200 ; WX 333 ; N dieresis ; B 33 556 297 652 ; -C 202 ; WX 333 ; N ring ; B 55 522 279 746 ; -C 203 ; WX 333 ; N cedilla ; B 42 -211 293 -10 ; -C 205 ; WX 333 ; N hungarumlaut ; B 32 539 320 753 ; -C 206 ; WX 333 ; N ogonek ; B 60 -179 277 70 ; -C 207 ; WX 333 ; N caron ; B 32 520 298 690 ; -C 208 ; WX 1000 ; N emdash ; B -2 185 1008 280 ; -C 225 ; WX 1000 ; N AE ; B 19 0 954 681 ; -C 227 ; WX 300 ; N ordfeminine ; B 12 286 288 685 ; -C 232 ; WX 667 ; N Lslash ; B 0 0 612 681 ; -C 233 ; WX 778 ; N Oslash ; B 45 -75 735 740 ; -C 234 ; WX 1000 ; N OE ; B 24 -7 979 683 ; -C 235 ; WX 330 ; N ordmasculine ; B 31 286 299 685 ; -C 241 ; WX 722 ; N ae ; B 30 -17 691 474 ; -C 245 ; WX 278 ; N dotlessi ; B 28 0 250 460 ; -C 248 ; WX 278 ; N lslash ; B 0 0 326 670 ; -C 249 ; WX 500 ; N oslash ; B 27 -95 474 550 ; -C 250 ; WX 722 ; N oe ; B 26 -17 689 473 ; -C 251 ; WX 556 ; N germandbls ; B 22 -18 513 689 ; -C -1 ; WX 722 ; N Aacute ; B 22 0 696 914 ; -C -1 ; WX 722 ; N Acircumflex ; B 22 0 696 909 ; -C -1 ; WX 722 ; N Adieresis ; B 22 0 696 871 ; -C -1 ; WX 722 ; N Agrave ; B 22 0 696 914 ; -C -1 ; WX 722 ; N Aring ; B 22 0 696 965 ; -C -1 ; WX 722 ; N Atilde ; B 22 0 696 890 ; -C -1 ; WX 722 ; N Ccedilla ; B 42 -211 669 690 ; -C -1 ; WX 667 ; N Eacute ; B 21 0 637 914 ; -C -1 ; WX 667 ; N Ecircumflex ; B 21 0 637 909 ; -C -1 ; WX 667 ; N Edieresis ; B 21 0 637 871 ; -C -1 ; WX 667 ; N Egrave ; B 21 0 637 914 ; -C -1 ; WX 722 ; N Eth ; B 22 0 685 681 ; -C -1 ; WX 389 ; N Iacute ; B 17 0 366 914 ; -C -1 ; WX 389 ; N Icircumflex ; B 17 0 366 909 ; -C -1 ; WX 389 ; N Idieresis ; B 17 0 366 871 ; -C -1 ; WX 389 ; N Igrave ; B 17 0 366 914 ; -C -1 ; WX 722 ; N Ntilde ; B 20 -10 697 890 ; -C -1 ; WX 778 ; N Oacute ; B 43 -18 733 914 ; -C -1 ; WX 778 ; N Ocircumflex ; B 43 -18 733 909 ; -C -1 ; WX 778 ; N Odieresis ; B 43 -18 733 871 ; -C -1 ; WX 778 ; N Ograve ; B 43 -18 733 914 ; -C -1 ; WX 778 ; N Otilde ; B 43 -18 733 890 ; -C -1 ; WX 556 ; N Scaron ; B 43 -19 506 909 ; -C -1 ; WX 611 ; N Thorn ; B 24 0 594 681 ; -C -1 ; WX 722 ; N Uacute ; B 20 -19 700 914 ; -C -1 ; WX 722 ; N Ucircumflex ; B 20 -19 700 909 ; -C -1 ; WX 722 ; N Udieresis ; B 20 -19 700 871 ; -C -1 ; WX 722 ; N Ugrave ; B 20 -19 700 914 ; -C -1 ; WX 722 ; N Yacute ; B 19 0 697 916 ; -C -1 ; WX 722 ; N Ydieresis ; B 19 0 697 871 ; -C -1 ; WX 667 ; N Zcaron ; B 37 0 624 909 ; -C -1 ; WX 500 ; N aacute ; B 25 -19 484 695 ; -C -1 ; WX 500 ; N acircumflex ; B 25 -19 484 690 ; -C -1 ; WX 500 ; N adieresis ; B 25 -19 484 652 ; -C -1 ; WX 500 ; N agrave ; B 25 -19 484 695 ; -C -1 ; WX 500 ; N aring ; B 25 -19 484 746 ; -C -1 ; WX 500 ; N atilde ; B 25 -19 484 671 ; -C -1 ; WX 220 ; N brokenbar ; B 77 -195 151 720 ; -C -1 ; WX 444 ; N ccedilla ; B 24 -211 423 472 ; -C -1 ; WX 747 ; N copyright ; B 16 -17 730 690 ; -C -1 ; WX 400 ; N degree ; B 50 390 350 690 ; -C -1 ; WX 570 ; N divide ; B 50 -10 520 460 ; -C -1 ; WX 444 ; N eacute ; B 25 -18 415 695 ; -C -1 ; WX 444 ; N ecircumflex ; B 25 -18 415 690 ; -C -1 ; WX 444 ; N edieresis ; B 25 -18 415 652 ; -C -1 ; WX 444 ; N egrave ; B 25 -18 415 695 ; -C -1 ; WX 500 ; N eth ; B 26 -17 474 670 ; -C -1 ; WX 278 ; N iacute ; B 28 0 265 695 ; -C -1 ; WX 278 ; N icircumflex ; B -6 0 270 690 ; -C -1 ; WX 278 ; N idieresis ; B -1 0 263 652 ; -C -1 ; WX 278 ; N igrave ; B -8 0 250 695 ; -C -1 ; WX 570 ; N logicalnot ; B 50 94 520 375 ; -C -1 ; WX 570 ; N minus ; B 50 188 520 262 ; -C -1 ; WX 556 ; N mu ; B 23 -210 524 460 ; -C -1 ; WX 570 ; N multiply ; B 50 -10 520 460 ; -C -1 ; WX 556 ; N ntilde ; B 28 0 523 671 ; -C -1 ; WX 500 ; N oacute ; B 25 -18 473 695 ; -C -1 ; WX 500 ; N ocircumflex ; B 25 -18 473 690 ; -C -1 ; WX 500 ; N odieresis ; B 25 -18 473 652 ; -C -1 ; WX 500 ; N ograve ; B 25 -18 473 695 ; -C -1 ; WX 750 ; N onehalf ; B 30 -18 720 690 ; -C -1 ; WX 750 ; N onequarter ; B 30 -18 720 690 ; -C -1 ; WX 300 ; N onesuperior ; B 24 276 275 690 ; -C -1 ; WX 500 ; N otilde ; B 25 -18 473 671 ; -C -1 ; WX 570 ; N plusminus ; B 50 0 520 600 ; -C -1 ; WX 747 ; N registered ; B 16 -17 730 690 ; -C -1 ; WX 389 ; N scaron ; B 29 -17 359 690 ; -C -1 ; WX 556 ; N thorn ; B 30 -210 513 670 ; -C -1 ; WX 750 ; N threequarters ; B 30 -18 720 690 ; -C -1 ; WX 300 ; N threesuperior ; B 5 269 294 690 ; -C -1 ; WX 1000 ; N trademark ; B 30 277 970 681 ; -C -1 ; WX 300 ; N twosuperior ; B 2 276 298 686 ; -C -1 ; WX 556 ; N uacute ; B 23 -17 524 695 ; -C -1 ; WX 556 ; N ucircumflex ; B 23 -17 524 690 ; -C -1 ; WX 556 ; N udieresis ; B 23 -17 524 652 ; -C -1 ; WX 556 ; N ugrave ; B 23 -17 524 695 ; -C -1 ; WX 500 ; N yacute ; B 19 -212 475 695 ; -C -1 ; WX 500 ; N ydieresis ; B 19 -212 475 652 ; -C -1 ; WX 444 ; N zcaron ; B 25 0 414 690 ; -EndCharMetrics -StartKernData -StartKernPairs 124 - -KPX A y -74 -KPX A w -74 -KPX A v -74 -KPX A space -55 -KPX A quoteright -74 -KPX A Y -92 -KPX A W -111 -KPX A V -129 -KPX A T -74 - -KPX F space -37 -KPX F period -92 -KPX F comma -92 -KPX F A -74 - -KPX L y -55 -KPX L space -55 -KPX L quoteright -92 -KPX L Y -92 -KPX L W -92 -KPX L V -92 -KPX L T -92 - -KPX P space -55 -KPX P period -92 -KPX P comma -92 -KPX P A -74 - -KPX R y -35 -KPX R Y -35 -KPX R W -35 -KPX R V -35 -KPX R T -35 - -KPX T y -74 -KPX T w -74 -KPX T u -92 -KPX T space -18 -KPX T semicolon -74 -KPX T s -92 -KPX T r -74 -KPX T period -74 -KPX T o -92 -KPX T i -18 -KPX T hyphen -92 -KPX T e -92 -KPX T comma -74 -KPX T colon -74 -KPX T c -92 -KPX T a -92 -KPX T O -18 -KPX T A -74 - -KPX V y -92 -KPX V u -92 -KPX V space -18 -KPX V semicolon -92 -KPX V r -74 -KPX V period -129 -KPX V o -92 -KPX V i -37 -KPX V hyphen -74 -KPX V e -92 -KPX V comma -129 -KPX V colon -92 -KPX V a -92 -KPX V O -20 -KPX V A -129 - -KPX W y -37 -KPX W u -18 -KPX W space -18 -KPX W semicolon -55 -KPX W r -18 -KPX W period -92 -KPX W o -55 -KPX W i -18 -KPX W hyphen -37 -KPX W e -55 -KPX W comma -92 -KPX W colon -55 -KPX W a -55 -KPX W A -111 - -KPX Y v -111 -KPX Y u -92 -KPX Y space -37 -KPX Y semicolon -92 -KPX Y q -111 -KPX Y period -92 -KPX Y p -92 -KPX Y o -111 -KPX Y i -37 -KPX Y hyphen -92 -KPX Y e -111 -KPX Y comma -92 -KPX Y colon -92 -KPX Y a -111 -KPX Y A -92 - -KPX f quoteright 55 -KPX f f 0 - -KPX one one -55 - -KPX quoteleft quoteleft -74 - -KPX quoteright space -74 -KPX quoteright s -37 -KPX quoteright quoteright -74 - -KPX r z 0 -KPX r y 0 -KPX r x 0 -KPX r w 0 -KPX r t 0 -KPX r space -18 -KPX r quoteright 18 -KPX r q -18 -KPX r period -92 -KPX r o -18 -KPX r hyphen -37 -KPX r h 0 -KPX r e -18 -KPX r comma -92 -KPX r c -18 - -KPX space Y -37 -KPX space W -18 -KPX space V -18 -KPX space T -18 -KPX space A -55 - -KPX v period -55 -KPX v comma -55 - -KPX w period -55 -KPX w comma -55 - -KPX y period -55 -KPX y comma -55 -EndKernPairs -EndKernData -StartComposites 56 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 167 219 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 55 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 111 219 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 28 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 207 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 68 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 194 219 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 83 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 221 219 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 221 219 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 221 219 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 221 219 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 104 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 104 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 104 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 104 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute 28 219 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 28 219 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 28 219 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave 28 219 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -34 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -34 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -34 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -34 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 174 219 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 174 219 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 174 219 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 174 219 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 61 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 61 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 61 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 61 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 187 219 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 187 219 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 187 219 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 187 219 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 76 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 76 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 76 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 76 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 222 219 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 222 219 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 222 219 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 222 219 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 83 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 83 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 83 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 83 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 187 219 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 76 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 194 219 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 111 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 222 219 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 83 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 187 219 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 76 0 ; -EndComposites -EndFontMetrics diff --git a/samples/printing/TimesBoO.afm b/samples/printing/TimesBoO.afm deleted file mode 100644 index cf4ca76a17..0000000000 --- a/samples/printing/TimesBoO.afm +++ /dev/null @@ -1,438 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Tue Aug 5 11:23:15 PDT 1986 -FontName Times-BoldItalic -EncodingScheme AdobeStandardEncoding -FullName Times Bold Italic -FamilyName Times -Weight Bold -ItalicAngle -15.0 -IsFixedPitch false -UnderlinePosition -98 -UnderlineThickness 54 -Version 001.001 -Notice Times is a trademark of Allied Corporation. -FontBBox -168 -232 1014 894 -CapHeight 662 -XHeight 458 -Descender -203 -Ascender 682 -StartCharMetrics 228 -C 32 ; WX 250 ; N space ; B 0 0 0 0 ; -C 33 ; WX 389 ; N exclam ; B 66 -13 367 676 ; -C 34 ; WX 555 ; N quotedbl ; B 142 367 549 693 ; -C 35 ; WX 500 ; N numbersign ; B 4 0 496 662 ; -C 36 ; WX 500 ; N dollar ; B -20 -101 492 723 ; -C 37 ; WX 833 ; N percent ; B 39 -8 784 685 ; -C 38 ; WX 778 ; N ampersand ; B 41 -19 727 676 ; -C 39 ; WX 333 ; N quoteright ; B 80 362 282 675 ; -C 40 ; WX 333 ; N parenleft ; B 28 -179 340 676 ; -C 41 ; WX 333 ; N parenright ; B -44 -179 268 676 ; -C 42 ; WX 500 ; N asterisk ; B 56 244 445 676 ; -C 43 ; WX 570 ; N plus ; B 33 0 537 505 ; -C 44 ; WX 250 ; N comma ; B -10 -181 192 132 ; -C 45 ; WX 333 ; N hyphen ; B 33 167 299 282 ; -C 46 ; WX 250 ; N period ; B 23 -13 170 133 ; -C 47 ; WX 278 ; N slash ; B -11 -18 289 682 ; -C 48 ; WX 500 ; N zero ; B 17 -13 472 676 ; -C 49 ; WX 500 ; N one ; B 5 0 415 676 ; -C 50 ; WX 500 ; N two ; B -27 0 441 676 ; -C 51 ; WX 500 ; N three ; B -15 -13 445 676 ; -C 52 ; WX 500 ; N four ; B -15 0 498 676 ; -C 53 ; WX 500 ; N five ; B -11 -13 482 662 ; -C 54 ; WX 500 ; N six ; B 23 -13 504 676 ; -C 55 ; WX 500 ; N seven ; B 51 0 519 662 ; -C 56 ; WX 500 ; N eight ; B 3 -13 471 676 ; -C 57 ; WX 500 ; N nine ; B -12 -13 470 676 ; -C 58 ; WX 333 ; N colon ; B 52 -13 291 458 ; -C 59 ; WX 333 ; N semicolon ; B 13 -181 291 458 ; -C 60 ; WX 570 ; N less ; B 31 -14 540 524 ; -C 61 ; WX 570 ; N equal ; B 33 116 537 401 ; -C 62 ; WX 570 ; N greater ; B 31 -14 540 524 ; -C 63 ; WX 500 ; N question ; B 78 -13 465 676 ; -C 64 ; WX 832 ; N at ; B -9 -150 838 691 ; -C 65 ; WX 667 ; N A ; B -51 0 602 676 ; -C 66 ; WX 667 ; N B ; B -24 0 618 662 ; -C 67 ; WX 667 ; N C ; B 22 -18 660 677 ; -C 68 ; WX 722 ; N D ; B -31 0 693 662 ; -C 69 ; WX 667 ; N E ; B -27 0 646 662 ; -C 70 ; WX 667 ; N F ; B -20 0 646 662 ; -C 71 ; WX 722 ; N G ; B 21 -18 699 676 ; -C 72 ; WX 778 ; N H ; B -24 0 791 662 ; -C 73 ; WX 389 ; N I ; B -22 0 412 662 ; -C 74 ; WX 500 ; N J ; B -45 -98 519 662 ; -C 75 ; WX 667 ; N K ; B -31 0 685 662 ; -C 76 ; WX 611 ; N L ; B -22 0 584 662 ; -C 77 ; WX 889 ; N M ; B -29 -12 907 662 ; -C 78 ; WX 722 ; N N ; B -27 -18 740 662 ; -C 79 ; WX 722 ; N O ; B 27 -18 684 676 ; -C 80 ; WX 611 ; N P ; B -27 0 608 662 ; -C 81 ; WX 722 ; N Q ; B 27 -203 684 676 ; -C 82 ; WX 667 ; N R ; B -29 0 616 662 ; -C 83 ; WX 556 ; N S ; B 6 -18 524 676 ; -C 84 ; WX 611 ; N T ; B 39 0 632 662 ; -C 85 ; WX 722 ; N U ; B 66 -18 736 662 ; -C 86 ; WX 667 ; N V ; B 48 -18 692 662 ; -C 87 ; WX 889 ; N W ; B 48 -18 914 662 ; -C 88 ; WX 667 ; N X ; B -24 0 687 662 ; -C 89 ; WX 611 ; N Y ; B 46 0 625 662 ; -C 90 ; WX 611 ; N Z ; B -1 0 594 662 ; -C 91 ; WX 333 ; N bracketleft ; B -7 -157 388 682 ; -C 92 ; WX 278 ; N backslash ; B 1 0 465 682 ; -C 93 ; WX 333 ; N bracketright ; B -65 -157 330 682 ; -C 94 ; WX 570 ; N asciicircum ; B 34 259 536 662 ; -C 95 ; WX 500 ; N underscore ; B 0 -127 500 -89 ; -C 96 ; WX 333 ; N quoteleft ; B 117 363 319 676 ; -C 97 ; WX 500 ; N a ; B 9 -14 480 458 ; -C 98 ; WX 500 ; N b ; B 21 -13 474 682 ; -C 99 ; WX 444 ; N c ; B 25 -13 418 458 ; -C 100 ; WX 500 ; N d ; B 9 -13 541 682 ; -C 101 ; WX 444 ; N e ; B 25 -13 413 458 ; -C 102 ; WX 333 ; N f ; B -146 -203 460 682 ; L i fi ; L l fl ; -C 103 ; WX 500 ; N g ; B -27 -203 498 458 ; -C 104 ; WX 556 ; N h ; B 12 -13 518 682 ; -C 105 ; WX 278 ; N i ; B 25 -13 284 676 ; -C 106 ; WX 278 ; N j ; B -152 -203 311 676 ; -C 107 ; WX 500 ; N k ; B 10 -13 511 682 ; -C 108 ; WX 278 ; N l ; B 31 -13 312 682 ; -C 109 ; WX 778 ; N m ; B 16 -13 744 458 ; -C 110 ; WX 556 ; N n ; B 24 -13 518 458 ; -C 111 ; WX 500 ; N o ; B 27 -13 467 458 ; -C 112 ; WX 500 ; N p ; B -79 -203 481 458 ; -C 113 ; WX 500 ; N q ; B 21 -203 486 459 ; -C 114 ; WX 389 ; N r ; B 9 0 415 458 ; -C 115 ; WX 389 ; N s ; B 16 -13 364 459 ; -C 116 ; WX 278 ; N t ; B 16 -14 305 592 ; -C 117 ; WX 556 ; N u ; B 48 -13 521 458 ; -C 118 ; WX 444 ; N v ; B 50 -13 432 458 ; -C 119 ; WX 667 ; N w ; B 50 -13 642 458 ; -C 120 ; WX 500 ; N x ; B -5 -13 498 458 ; -C 121 ; WX 444 ; N y ; B -60 -203 423 458 ; -C 122 ; WX 389 ; N z ; B -24 -58 394 448 ; -C 123 ; WX 348 ; N braceleft ; B 31 -154 381 686 ; -C 124 ; WX 220 ; N bar ; B 70 0 151 682 ; -C 125 ; WX 348 ; N braceright ; B -31 -161 319 679 ; -C 126 ; WX 570 ; N asciitilde ; B 33 158 537 353 ; -C 161 ; WX 389 ; N exclamdown ; B 21 -232 321 458 ; -C 162 ; WX 500 ; N cent ; B 50 -142 443 570 ; -C 163 ; WX 500 ; N sterling ; B -32 -13 505 676 ; -C 164 ; WX 167 ; N fraction ; B -161 0 327 662 ; -C 165 ; WX 500 ; N yen ; B -15 0 565 662 ; -C 166 ; WX 500 ; N florin ; B -86 -154 530 682 ; -C 167 ; WX 500 ; N section ; B 36 -143 454 676 ; -C 168 ; WX 500 ; N currency ; B -3 110 503 612 ; -C 169 ; WX 278 ; N quotesingle ; B 126 367 295 693 ; -C 170 ; WX 500 ; N quotedblleft ; B 57 363 513 676 ; -C 171 ; WX 500 ; N guillemotleft ; B 21 33 474 416 ; -C 172 ; WX 333 ; N guilsinglleft ; B 42 33 310 416 ; -C 173 ; WX 333 ; N guilsinglright ; B 23 38 291 421 ; -C 174 ; WX 556 ; N fi ; B -157 -203 538 682 ; -C 175 ; WX 556 ; N fl ; B -149 -203 577 682 ; -C 177 ; WX 500 ; N endash ; B -11 176 511 266 ; -C 178 ; WX 500 ; N dagger ; B 90 -146 489 676 ; -C 179 ; WX 500 ; N daggerdbl ; B 11 -143 487 675 ; -C 180 ; WX 250 ; N periodcentered ; B 51 179 200 328 ; -C 182 ; WX 500 ; N paragraph ; B 61 -189 592 682 ; -C 183 ; WX 350 ; N bullet ; B 50 175 300 425 ; -C 184 ; WX 333 ; N quotesinglbase ; B 66 -181 268 132 ; -C 185 ; WX 500 ; N quotedblbase ; B -57 -181 398 132 ; -C 186 ; WX 500 ; N quotedblright ; B 56 362 509 675 ; -C 187 ; WX 500 ; N guillemotright ; B 21 38 474 421 ; -C 188 ; WX 1000 ; N ellipsis ; B 93 -13 906 133 ; -C 189 ; WX 1000 ; N perthousand ; B 7 -49 985 699 ; -C 191 ; WX 500 ; N questiondown ; B 30 -203 417 487 ; -C 193 ; WX 333 ; N grave ; B 115 511 325 690 ; -C 194 ; WX 333 ; N acute ; B 168 511 405 690 ; -C 195 ; WX 333 ; N circumflex ; B 70 510 394 682 ; -C 196 ; WX 333 ; N tilde ; B 69 530 424 648 ; -C 197 ; WX 333 ; N macron ; B 81 547 420 616 ; -C 198 ; WX 333 ; N breve ; B 99 511 414 671 ; -C 199 ; WX 333 ; N dotaccent ; B 180 519 308 648 ; -C 200 ; WX 333 ; N dieresis ; B 85 519 424 648 ; -C 202 ; WX 333 ; N ring ; B 141 466 352 676 ; -C 203 ; WX 333 ; N cedilla ; B 32 -216 264 5 ; -C 205 ; WX 333 ; N hungarumlaut ; B 28 538 339 750 ; -C 206 ; WX 333 ; N ogonek ; B -37 -173 192 44 ; -C 207 ; WX 333 ; N caron ; B 109 511 437 683 ; -C 208 ; WX 1000 ; N emdash ; B -14 176 1014 266 ; -C 225 ; WX 944 ; N AE ; B -41 0 931 662 ; -C 227 ; WX 266 ; N ordfeminine ; B -24 286 291 676 ; -C 232 ; WX 611 ; N Lslash ; B -22 0 584 662 ; -C 233 ; WX 722 ; N Oslash ; B 27 -124 684 754 ; -C 234 ; WX 944 ; N OE ; B 23 -8 936 670 ; -C 235 ; WX 300 ; N ordmasculine ; B 1 286 300 676 ; -C 241 ; WX 722 ; N ae ; B 15 -13 685 458 ; -C 245 ; WX 278 ; N dotlessi ; B 27 -13 260 458 ; -C 248 ; WX 278 ; N lslash ; B 12 -13 326 682 ; -C 249 ; WX 500 ; N oslash ; B 27 -118 467 556 ; -C 250 ; WX 722 ; N oe ; B 26 -13 687 458 ; -C 251 ; WX 500 ; N germandbls ; B -168 -203 497 682 ; -C -1 ; WX 667 ; N Aacute ; B -51 0 602 894 ; -C -1 ; WX 667 ; N Acircumflex ; B -51 0 602 886 ; -C -1 ; WX 667 ; N Adieresis ; B -51 0 602 852 ; -C -1 ; WX 667 ; N Agrave ; B -51 0 602 894 ; -C -1 ; WX 667 ; N Aring ; B -51 0 602 880 ; -C -1 ; WX 667 ; N Atilde ; B -51 0 602 852 ; -C -1 ; WX 667 ; N Ccedilla ; B 22 -216 660 677 ; -C -1 ; WX 667 ; N Eacute ; B -27 0 646 894 ; -C -1 ; WX 667 ; N Ecircumflex ; B -27 0 646 886 ; -C -1 ; WX 667 ; N Edieresis ; B -27 0 646 852 ; -C -1 ; WX 667 ; N Egrave ; B -27 0 646 894 ; -C -1 ; WX 722 ; N Eth ; B -31 0 693 662 ; -C -1 ; WX 389 ; N Iacute ; B -22 0 433 894 ; -C -1 ; WX 389 ; N Icircumflex ; B -22 0 422 886 ; -C -1 ; WX 389 ; N Idieresis ; B -22 0 452 852 ; -C -1 ; WX 389 ; N Igrave ; B -22 0 412 894 ; -C -1 ; WX 722 ; N Ntilde ; B -27 -18 740 852 ; -C -1 ; WX 722 ; N Oacute ; B 27 -18 684 894 ; -C -1 ; WX 722 ; N Ocircumflex ; B 27 -18 684 886 ; -C -1 ; WX 722 ; N Odieresis ; B 27 -18 684 852 ; -C -1 ; WX 722 ; N Ograve ; B 27 -18 684 894 ; -C -1 ; WX 722 ; N Otilde ; B 27 -18 684 852 ; -C -1 ; WX 556 ; N Scaron ; B 6 -18 549 887 ; -C -1 ; WX 611 ; N Thorn ; B -27 0 572 662 ; -C -1 ; WX 722 ; N Uacute ; B 66 -18 736 894 ; -C -1 ; WX 722 ; N Ucircumflex ; B 66 -18 736 886 ; -C -1 ; WX 722 ; N Udieresis ; B 66 -18 736 852 ; -C -1 ; WX 722 ; N Ugrave ; B 66 -18 736 894 ; -C -1 ; WX 611 ; N Yacute ; B 46 0 625 894 ; -C -1 ; WX 611 ; N Ydieresis ; B 46 0 625 852 ; -C -1 ; WX 611 ; N Zcaron ; B -1 0 594 887 ; -C -1 ; WX 500 ; N aacute ; B 9 -14 489 690 ; -C -1 ; WX 500 ; N acircumflex ; B 9 -14 480 682 ; -C -1 ; WX 500 ; N adieresis ; B 9 -14 508 648 ; -C -1 ; WX 500 ; N agrave ; B 9 -14 480 690 ; -C -1 ; WX 500 ; N aring ; B 9 -14 480 676 ; -C -1 ; WX 500 ; N atilde ; B 9 -14 508 648 ; -C -1 ; WX 220 ; N brokenbar ; B 70 0 151 682 ; -C -1 ; WX 444 ; N ccedilla ; B 25 -216 418 458 ; -C -1 ; WX 747 ; N copyright ; B 23 -18 723 676 ; -C -1 ; WX 400 ; N degree ; B 70 376 370 676 ; -C -1 ; WX 570 ; N divide ; B 33 0 537 505 ; -C -1 ; WX 444 ; N eacute ; B 25 -13 461 690 ; -C -1 ; WX 444 ; N ecircumflex ; B 25 -13 450 682 ; -C -1 ; WX 444 ; N edieresis ; B 25 -13 480 648 ; -C -1 ; WX 444 ; N egrave ; B 25 -13 413 690 ; -C -1 ; WX 500 ; N eth ; B 27 -13 498 682 ; -C -1 ; WX 278 ; N iacute ; B 27 -13 378 690 ; -C -1 ; WX 278 ; N icircumflex ; B 27 -13 367 682 ; -C -1 ; WX 278 ; N idieresis ; B 27 -13 397 648 ; -C -1 ; WX 278 ; N igrave ; B 27 -13 298 690 ; -C -1 ; WX 606 ; N logicalnot ; B 51 120 555 401 ; -C -1 ; WX 606 ; N minus ; B 51 210 555 300 ; -C -1 ; WX 576 ; N mu ; B -63 -210 521 458 ; -C -1 ; WX 570 ; N multiply ; B 33 0 537 504 ; -C -1 ; WX 556 ; N ntilde ; B 24 -13 536 648 ; -C -1 ; WX 500 ; N oacute ; B 27 -13 489 690 ; -C -1 ; WX 500 ; N ocircumflex ; B 27 -13 478 682 ; -C -1 ; WX 500 ; N odieresis ; B 27 -13 508 648 ; -C -1 ; WX 500 ; N ograve ; B 27 -13 467 690 ; -C -1 ; WX 750 ; N onehalf ; B 30 0 720 676 ; -C -1 ; WX 750 ; N onequarter ; B 30 0 720 676 ; -C -1 ; WX 300 ; N onesuperior ; B 17 270 283 676 ; -C -1 ; WX 500 ; N otilde ; B 27 -13 508 648 ; -C -1 ; WX 570 ; N plusminus ; B 33 0 537 665 ; -C -1 ; WX 747 ; N registered ; B 23 -18 723 676 ; -C -1 ; WX 389 ; N scaron ; B 16 -13 465 683 ; -C -1 ; WX 500 ; N thorn ; B -79 -203 474 682 ; -C -1 ; WX 750 ; N threequarters ; B 30 0 720 676 ; -C -1 ; WX 300 ; N threesuperior ; B 0 263 299 676 ; -C -1 ; WX 1000 ; N trademark ; B 40 272 980 676 ; -C -1 ; WX 300 ; N twosuperior ; B -2 270 302 676 ; -C -1 ; WX 556 ; N uacute ; B 48 -13 521 690 ; -C -1 ; WX 556 ; N ucircumflex ; B 48 -13 521 682 ; -C -1 ; WX 556 ; N udieresis ; B 48 -13 536 648 ; -C -1 ; WX 556 ; N ugrave ; B 48 -13 521 690 ; -C -1 ; WX 444 ; N yacute ; B -60 -203 461 690 ; -C -1 ; WX 444 ; N ydieresis ; B -60 -203 480 648 ; -C -1 ; WX 389 ; N zcaron ; B -24 -58 465 683 ; -EndCharMetrics -StartKernData -StartKernPairs 108 - -KPX A y -74 -KPX A w -74 -KPX A v -74 -KPX A space -55 -KPX A quoteright -74 -KPX A Y -55 -KPX A W -92 -KPX A V -74 -KPX A T -55 - -KPX F space -18 -KPX F period -129 -KPX F comma -129 -KPX F A -92 - -KPX L y -37 -KPX L space -37 -KPX L quoteright -55 -KPX L Y -37 -KPX L W -37 -KPX L V -37 -KPX L T -18 - -KPX P space -37 -KPX P period -129 -KPX P comma -129 -KPX P A -74 - -KPX R y -18 -KPX R Y -18 -KPX R W -18 -KPX R V -18 - -KPX T y -37 -KPX T w -37 -KPX T u -37 -KPX T semicolon -74 -KPX T s -92 -KPX T r -37 -KPX T period -92 -KPX T o -92 -KPX T i -37 -KPX T hyphen -92 -KPX T e -92 -KPX T comma -92 -KPX T colon -74 -KPX T c -92 -KPX T a -92 -KPX T O -18 -KPX T A -55 - -KPX V y -74 -KPX V u -55 -KPX V space -18 -KPX V semicolon -74 -KPX V r -55 -KPX V period -129 -KPX V o -111 -KPX V i -55 -KPX V hyphen -55 -KPX V e -111 -KPX V comma -129 -KPX V colon -74 -KPX V a -111 -KPX V A -74 - -KPX W y -55 -KPX W u -55 -KPX W space -18 -KPX W semicolon -55 -KPX W r -74 -KPX W period -74 -KPX W o -74 -KPX W i -37 -KPX W hyphen -37 -KPX W e -74 -KPX W comma -74 -KPX W colon -55 -KPX W a -74 -KPX W A -74 - -KPX Y v -92 -KPX Y u -92 -KPX Y space -37 -KPX Y semicolon -92 -KPX Y q -111 -KPX Y period -74 -KPX Y p -74 -KPX Y o -111 -KPX Y i -55 -KPX Y hyphen -92 -KPX Y e -111 -KPX Y comma -92 -KPX Y colon -92 -KPX Y a -92 -KPX Y A -74 - -KPX f quoteright 55 -KPX f f -18 - -KPX one one -55 - -KPX quoteleft quoteleft -74 - -KPX quoteright t -37 -KPX quoteright space -74 -KPX quoteright s -74 -KPX quoteright quoteright -74 - -KPX r quoteright 37 -KPX r period -55 -KPX r comma -55 - -KPX space Y -18 -KPX space W -18 -KPX space A -37 - -KPX v period -37 -KPX v comma -37 - -KPX w period -37 -KPX w comma -37 - -KPX y period -37 -KPX y comma -37 -EndKernPairs -EndKernData -StartComposites 56 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 204 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 28 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 111 204 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 28 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 167 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 55 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 139 204 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 55 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 194 204 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 194 204 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 194 204 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 194 204 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 111 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 111 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 111 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 111 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute 28 204 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 28 204 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 28 204 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave 28 204 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 167 204 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 167 204 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 167 204 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 167 204 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 55 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 55 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 55 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 55 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 167 204 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 167 204 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 167 204 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 167 204 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 83 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 83 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 83 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 83 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 194 204 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 194 204 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 194 204 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 194 204 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 83 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 83 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 83 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 83 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 167 204 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 83 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 194 204 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 111 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 194 204 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 83 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 167 204 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 83 0 ; -EndComposites -EndFontMetrics diff --git a/samples/printing/TimesO.afm b/samples/printing/TimesO.afm deleted file mode 100644 index b8ffc6a0f3..0000000000 --- a/samples/printing/TimesO.afm +++ /dev/null @@ -1,450 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Tue Aug 5 11:12:17 PDT 1986 -FontName Times-Italic -EncodingScheme AdobeStandardEncoding -FullName Times Italic -FamilyName Times -Weight Medium -ItalicAngle -15.5 -IsFixedPitch false -UnderlinePosition -96 -UnderlineThickness 48 -Version 001.001 -Notice Times is a trademark of Allied Corporation. -FontBBox -176 -252 990 930 -CapHeight 660 -XHeight 446 -Descender -206 -Ascender 684 -StartCharMetrics 228 -C 32 ; WX 250 ; N space ; B 0 0 0 0 ; -C 33 ; WX 333 ; N exclam ; B 46 -10 296 670 ; -C 34 ; WX 420 ; N quotedbl ; B 107 442 402 673 ; -C 35 ; WX 500 ; N numbersign ; B -7 -6 508 683 ; -C 36 ; WX 500 ; N dollar ; B 13 -102 481 735 ; -C 37 ; WX 833 ; N percent ; B 63 -14 770 682 ; -C 38 ; WX 778 ; N ampersand ; B 60 -22 698 673 ; -C 39 ; WX 333 ; N quoteright ; B 69 458 206 678 ; -C 40 ; WX 333 ; N parenleft ; B 41 -180 312 662 ; -C 41 ; WX 333 ; N parenright ; B 19 -178 286 664 ; -C 42 ; WX 500 ; N asterisk ; B 60 268 434 684 ; -C 43 ; WX 675 ; N plus ; B 85 0 589 505 ; -C 44 ; WX 250 ; N comma ; B 57 -126 194 94 ; -C 45 ; WX 333 ; N hyphen ; B 55 192 276 254 ; -C 46 ; WX 250 ; N period ; B 75 -10 175 90 ; -C 47 ; WX 278 ; N slash ; B 2 -14 252 641 ; -C 48 ; WX 500 ; N zero ; B 19 -9 470 683 ; -C 49 ; WX 500 ; N one ; B 31 0 390 684 ; -C 50 ; WX 500 ; N two ; B -7 0 429 682 ; -C 51 ; WX 500 ; N three ; B -7 -12 443 682 ; -C 52 ; WX 500 ; N four ; B -8 0 454 681 ; -C 53 ; WX 500 ; N five ; B -12 -15 462 666 ; -C 54 ; WX 500 ; N six ; B 24 -8 497 685 ; -C 55 ; WX 500 ; N seven ; B 56 -12 512 666 ; -C 56 ; WX 500 ; N eight ; B 12 -7 475 681 ; -C 57 ; WX 500 ; N nine ; B 10 -18 470 684 ; -C 58 ; WX 333 ; N colon ; B 86 -10 284 444 ; -C 59 ; WX 333 ; N semicolon ; B 63 -124 292 441 ; -C 60 ; WX 675 ; N less ; B 83 -7 592 515 ; -C 61 ; WX 675 ; N equal ; B 85 125 589 383 ; -C 62 ; WX 675 ; N greater ; B 82 -7 591 515 ; -C 63 ; WX 500 ; N question ; B 105 -10 439 670 ; -C 64 ; WX 920 ; N at ; B 39 -191 866 648 ; -C 65 ; WX 611 ; N A ; B -45 0 564 672 ; -C 66 ; WX 611 ; N B ; B -28 0 562 660 ; -C 67 ; WX 667 ; N C ; B 33 -23 653 672 ; -C 68 ; WX 722 ; N D ; B -27 0 671 660 ; -C 69 ; WX 611 ; N E ; B -17 0 609 660 ; -C 70 ; WX 611 ; N F ; B -17 0 609 660 ; -C 71 ; WX 722 ; N G ; B 31 -23 701 672 ; -C 72 ; WX 722 ; N H ; B -26 0 742 660 ; -C 73 ; WX 333 ; N I ; B -26 0 357 660 ; -C 74 ; WX 444 ; N J ; B -36 -22 479 660 ; -C 75 ; WX 667 ; N K ; B -15 0 702 660 ; -C 76 ; WX 556 ; N L ; B -32 0 535 660 ; -C 77 ; WX 833 ; N M ; B -24 0 850 660 ; -C 78 ; WX 667 ; N N ; B -36 -12 698 660 ; -C 79 ; WX 722 ; N O ; B 42 -23 676 671 ; -C 80 ; WX 611 ; N P ; B -16 0 582 660 ; -C 81 ; WX 722 ; N Q ; B 41 -186 681 671 ; -C 82 ; WX 611 ; N R ; B -32 0 566 660 ; -C 83 ; WX 500 ; N S ; B 9 -22 483 674 ; -C 84 ; WX 556 ; N T ; B 32 0 602 660 ; -C 85 ; WX 722 ; N U ; B 77 -21 747 660 ; -C 86 ; WX 611 ; N V ; B 44 -20 659 660 ; -C 87 ; WX 833 ; N W ; B 35 -20 875 660 ; -C 88 ; WX 611 ; N X ; B -45 0 633 660 ; -C 89 ; WX 556 ; N Y ; B 44 0 600 660 ; -C 90 ; WX 556 ; N Z ; B -19 0 581 660 ; -C 91 ; WX 389 ; N bracketleft ; B 22 -170 391 654 ; -C 92 ; WX 278 ; N backslash ; B 2 -12 252 651 ; -C 93 ; WX 389 ; N bracketright ; B -31 -170 341 654 ; -C 94 ; WX 422 ; N asciicircum ; B 0 254 503 660 ; -C 95 ; WX 500 ; N underscore ; B -9 -252 510 -206 ; -C 96 ; WX 333 ; N quoteleft ; B 149 457 286 677 ; -C 97 ; WX 500 ; N a ; B 15 -11 474 446 ; -C 98 ; WX 500 ; N b ; B 24 -12 475 682 ; -C 99 ; WX 444 ; N c ; B 32 -11 420 446 ; -C 100 ; WX 500 ; N d ; B 15 -11 521 684 ; -C 101 ; WX 444 ; N e ; B 34 -13 412 446 ; -C 102 ; WX 278 ; N f ; B -148 -207 415 684 ; L i fi ; L l fl ; -C 103 ; WX 500 ; N g ; B 10 -209 471 445 ; -C 104 ; WX 500 ; N h ; B 23 -10 473 684 ; -C 105 ; WX 278 ; N i ; B 43 -10 263 660 ; -C 106 ; WX 278 ; N j ; B -109 -207 287 660 ; -C 107 ; WX 444 ; N k ; B 16 -12 460 685 ; -C 108 ; WX 278 ; N l ; B 41 -10 276 685 ; -C 109 ; WX 722 ; N m ; B 11 -10 698 447 ; -C 110 ; WX 500 ; N n ; B 23 -10 471 447 ; -C 111 ; WX 500 ; N o ; B 27 -13 467 448 ; -C 112 ; WX 500 ; N p ; B -75 -206 465 446 ; -C 113 ; WX 500 ; N q ; B 20 -206 483 445 ; -C 114 ; WX 389 ; N r ; B 24 0 392 446 ; -C 115 ; WX 389 ; N s ; B 16 -14 367 446 ; -C 116 ; WX 278 ; N t ; B 38 -10 288 548 ; -C 117 ; WX 500 ; N u ; B 42 -11 472 447 ; -C 118 ; WX 444 ; N v ; B 24 -11 423 444 ; -C 119 ; WX 667 ; N w ; B 14 -10 650 447 ; -C 120 ; WX 444 ; N x ; B -31 -10 450 446 ; -C 121 ; WX 444 ; N y ; B -27 -209 420 445 ; -C 122 ; WX 389 ; N z ; B 2 0 380 434 ; -C 123 ; WX 400 ; N braceleft ; B 65 -179 411 675 ; -C 124 ; WX 275 ; N bar ; B -22 -188 251 670 ; -C 125 ; WX 400 ; N braceright ; B -66 -179 300 675 ; -C 126 ; WX 541 ; N asciitilde ; B 18 169 522 340 ; -C 161 ; WX 389 ; N exclamdown ; B 59 -213 317 468 ; -C 162 ; WX 500 ; N cent ; B 62 -146 449 564 ; -C 163 ; WX 500 ; N sterling ; B -5 -9 498 672 ; -C 164 ; WX 167 ; N fraction ; B -176 -15 338 672 ; -C 165 ; WX 500 ; N yen ; B 13 0 609 684 ; -C 166 ; WX 500 ; N florin ; B 3 -189 492 688 ; -C 167 ; WX 500 ; N section ; B 42 -96 455 743 ; -C 168 ; WX 500 ; N currency ; B 3 105 498 604 ; -C 169 ; WX 214 ; N quotesingle ; B 99 453 247 678 ; -C 170 ; WX 556 ; N quotedblleft ; B 166 457 510 677 ; -C 171 ; WX 500 ; N guillemotleft ; B 54 39 444 400 ; -C 172 ; WX 333 ; N guilsinglleft ; B 60 39 285 400 ; -C 173 ; WX 333 ; N guilsinglright ; B 49 34 269 406 ; -C 174 ; WX 500 ; N fi ; B -136 -207 468 684 ; -C 175 ; WX 500 ; N fl ; B -140 -207 509 684 ; -C 177 ; WX 500 ; N endash ; B -3 194 501 242 ; -C 178 ; WX 500 ; N dagger ; B 92 -93 480 734 ; -C 179 ; WX 500 ; N daggerdbl ; B 20 -93 482 743 ; -C 180 ; WX 250 ; N periodcentered ; B 75 192 199 316 ; -C 182 ; WX 523 ; N paragraph ; B 87 -196 533 675 ; -C 183 ; WX 350 ; N bullet ; B 50 175 300 425 ; -C 184 ; WX 333 ; N quotesinglbase ; B 83 -126 220 94 ; -C 185 ; WX 556 ; N quotedblbase ; B 63 -126 407 94 ; -C 186 ; WX 556 ; N quotedblright ; B 68 458 412 678 ; -C 187 ; WX 500 ; N guillemotright ; B 59 34 442 406 ; -C 188 ; WX 889 ; N ellipsis ; B 62 -10 828 90 ; -C 189 ; WX 1000 ; N perthousand ; B 9 -65 990 690 ; -C 191 ; WX 500 ; N questiondown ; B 55 -215 395 462 ; -C 193 ; WX 333 ; N grave ; B 160 491 333 659 ; -C 194 ; WX 333 ; N acute ; B 154 501 375 680 ; -C 195 ; WX 333 ; N circumflex ; B 96 495 374 669 ; -C 196 ; WX 333 ; N tilde ; B 114 518 386 639 ; -C 197 ; WX 333 ; N macron ; B 120 543 380 603 ; -C 198 ; WX 333 ; N breve ; B 140 512 401 645 ; -C 199 ; WX 333 ; N dotaccent ; B 112 515 222 625 ; -C 200 ; WX 333 ; N dieresis ; B 117 534 389 634 ; -C 202 ; WX 333 ; N ring ; B 239 509 433 703 ; -C 203 ; WX 333 ; N cedilla ; B -30 -206 214 0 ; -C 205 ; WX 333 ; N hungarumlaut ; B 62 532 348 749 ; -C 206 ; WX 333 ; N ogonek ; B -44 -159 169 40 ; -C 207 ; WX 333 ; N caron ; B 138 495 422 669 ; -C 208 ; WX 889 ; N emdash ; B -65 194 945 242 ; -C 225 ; WX 889 ; N AE ; B -46 0 889 660 ; -C 227 ; WX 276 ; N ordfeminine ; B 32 300 310 677 ; -C 232 ; WX 556 ; N Lslash ; B 0 0 567 660 ; -C 233 ; WX 722 ; N Oslash ; B 40 -110 683 738 ; -C 234 ; WX 944 ; N OE ; B 30 -10 943 668 ; -C 235 ; WX 310 ; N ordmasculine ; B 45 301 310 679 ; -C 241 ; WX 667 ; N ae ; B 24 -12 638 448 ; -C 245 ; WX 278 ; N dotlessi ; B 47 -10 226 447 ; -C 248 ; WX 278 ; N lslash ; B 0 -10 264 685 ; -C 249 ; WX 500 ; N oslash ; B 28 -132 468 560 ; -C 250 ; WX 667 ; N oe ; B 26 -15 643 445 ; -C 251 ; WX 500 ; N germandbls ; B -167 -209 492 684 ; -C -1 ; WX 611 ; N Aacute ; B -45 0 564 907 ; -C -1 ; WX 611 ; N Acircumflex ; B -45 0 564 896 ; -C -1 ; WX 611 ; N Adieresis ; B -45 0 564 861 ; -C -1 ; WX 611 ; N Agrave ; B -45 0 564 886 ; -C -1 ; WX 611 ; N Aring ; B -45 0 564 930 ; -C -1 ; WX 611 ; N Atilde ; B -45 0 564 866 ; -C -1 ; WX 667 ; N Ccedilla ; B 33 -206 653 672 ; -C -1 ; WX 611 ; N Eacute ; B -17 0 609 907 ; -C -1 ; WX 611 ; N Ecircumflex ; B -17 0 609 896 ; -C -1 ; WX 611 ; N Edieresis ; B -17 0 609 861 ; -C -1 ; WX 611 ; N Egrave ; B -17 0 609 886 ; -C -1 ; WX 722 ; N Eth ; B -27 0 671 660 ; -C -1 ; WX 333 ; N Iacute ; B -26 0 389 907 ; -C -1 ; WX 333 ; N Icircumflex ; B -26 0 388 896 ; -C -1 ; WX 333 ; N Idieresis ; B -26 0 403 861 ; -C -1 ; WX 333 ; N Igrave ; B -26 0 357 886 ; -C -1 ; WX 667 ; N Ntilde ; B -36 -12 698 866 ; -C -1 ; WX 722 ; N Oacute ; B 42 -23 676 907 ; -C -1 ; WX 722 ; N Ocircumflex ; B 42 -23 676 896 ; -C -1 ; WX 722 ; N Odieresis ; B 42 -23 676 861 ; -C -1 ; WX 722 ; N Ograve ; B 42 -23 676 886 ; -C -1 ; WX 722 ; N Otilde ; B 42 -23 676 866 ; -C -1 ; WX 500 ; N Scaron ; B 9 -22 506 896 ; -C -1 ; WX 611 ; N Thorn ; B -16 0 547 660 ; -C -1 ; WX 722 ; N Uacute ; B 77 -21 747 907 ; -C -1 ; WX 722 ; N Ucircumflex ; B 77 -21 747 896 ; -C -1 ; WX 722 ; N Udieresis ; B 77 -21 747 861 ; -C -1 ; WX 722 ; N Ugrave ; B 77 -21 747 886 ; -C -1 ; WX 556 ; N Yacute ; B 44 0 600 894 ; -C -1 ; WX 556 ; N Ydieresis ; B 44 0 600 861 ; -C -1 ; WX 556 ; N Zcaron ; B -19 0 581 896 ; -C -1 ; WX 500 ; N aacute ; B 15 -11 474 680 ; -C -1 ; WX 500 ; N acircumflex ; B 15 -11 474 669 ; -C -1 ; WX 500 ; N adieresis ; B 15 -11 479 634 ; -C -1 ; WX 500 ; N agrave ; B 15 -11 474 659 ; -C -1 ; WX 500 ; N aring ; B 15 -11 474 703 ; -C -1 ; WX 500 ; N atilde ; B 15 -11 476 639 ; -C -1 ; WX 275 ; N brokenbar ; B -22 -188 251 670 ; -C -1 ; WX 444 ; N ccedilla ; B 32 -206 420 446 ; -C -1 ; WX 760 ; N copyright ; B 40 -22 719 672 ; -C -1 ; WX 400 ; N degree ; B 70 384 370 684 ; -C -1 ; WX 675 ; N divide ; B 85 0 589 505 ; -C -1 ; WX 444 ; N eacute ; B 34 -13 444 680 ; -C -1 ; WX 444 ; N ecircumflex ; B 34 -13 443 669 ; -C -1 ; WX 444 ; N edieresis ; B 34 -13 458 634 ; -C -1 ; WX 444 ; N egrave ; B 34 -13 412 659 ; -C -1 ; WX 500 ; N eth ; B 27 -13 487 682 ; -C -1 ; WX 278 ; N iacute ; B 47 -10 341 680 ; -C -1 ; WX 278 ; N icircumflex ; B 47 -10 340 669 ; -C -1 ; WX 278 ; N idieresis ; B 47 -10 355 634 ; -C -1 ; WX 278 ; N igrave ; B 47 -10 299 659 ; -C -1 ; WX 675 ; N logicalnot ; B 85 113 589 383 ; -C -1 ; WX 675 ; N minus ; B 85 222 589 286 ; -C -1 ; WX 500 ; N mu ; B -60 -206 472 446 ; -C -1 ; WX 675 ; N multiply ; B 85 0 589 504 ; -C -1 ; WX 500 ; N ntilde ; B 23 -10 471 639 ; -C -1 ; WX 500 ; N oacute ; B 27 -13 467 680 ; -C -1 ; WX 500 ; N ocircumflex ; B 27 -13 467 669 ; -C -1 ; WX 500 ; N odieresis ; B 27 -13 479 634 ; -C -1 ; WX 500 ; N ograve ; B 27 -13 467 659 ; -C -1 ; WX 750 ; N onehalf ; B 30 -15 720 684 ; -C -1 ; WX 750 ; N onequarter ; B 30 -15 720 684 ; -C -1 ; WX 300 ; N onesuperior ; B 43 274 277 683 ; -C -1 ; WX 500 ; N otilde ; B 27 -13 476 639 ; -C -1 ; WX 675 ; N plusminus ; B 85 0 589 645 ; -C -1 ; WX 760 ; N registered ; B 40 -22 719 672 ; -C -1 ; WX 389 ; N scaron ; B 16 -14 450 669 ; -C -1 ; WX 500 ; N thorn ; B -75 -206 465 682 ; -C -1 ; WX 750 ; N threequarters ; B 30 -15 720 684 ; -C -1 ; WX 300 ; N threesuperior ; B 13 267 306 684 ; -C -1 ; WX 980 ; N trademark ; B 35 268 945 672 ; -C -1 ; WX 300 ; N twosuperior ; B 8 274 292 684 ; -C -1 ; WX 500 ; N uacute ; B 42 -11 472 680 ; -C -1 ; WX 500 ; N ucircumflex ; B 42 -11 472 669 ; -C -1 ; WX 500 ; N udieresis ; B 42 -11 473 634 ; -C -1 ; WX 500 ; N ugrave ; B 42 -11 472 659 ; -C -1 ; WX 444 ; N yacute ; B -27 -209 431 680 ; -C -1 ; WX 444 ; N ydieresis ; B -27 -209 445 634 ; -C -1 ; WX 389 ; N zcaron ; B 2 0 450 669 ; -EndCharMetrics -StartKernData -StartKernPairs 120 - -KPX A y -55 -KPX A w -55 -KPX A v -55 -KPX A space -18 -KPX A quoteright -37 -KPX A Y -55 -KPX A W -37 -KPX A V -50 -KPX A T -37 - -KPX F period -129 -KPX F comma -129 -KPX F A -129 - -KPX L y -30 -KPX L space -18 -KPX L quoteright -37 -KPX L Y -20 -KPX L W -37 -KPX L V -37 -KPX L T -20 - -KPX P space -18 -KPX P period -129 -KPX P comma -129 -KPX P A -129 - -KPX R y -18 -KPX R Y -18 -KPX R W -18 -KPX R V -18 -KPX R T 0 - -KPX T y -74 -KPX T w -74 -KPX T u -55 -KPX T space -18 -KPX T semicolon -65 -KPX T s -92 -KPX T r -55 -KPX T period -74 -KPX T o -92 -KPX T i -55 -KPX T hyphen -74 -KPX T e -92 -KPX T comma -74 -KPX T colon -55 -KPX T c -92 -KPX T a -92 -KPX T O -18 -KPX T A -74 - -KPX V y -92 -KPX V u -74 -KPX V space -18 -KPX V semicolon -74 -KPX V r -74 -KPX V period -129 -KPX V o -111 -KPX V i -74 -KPX V hyphen -55 -KPX V e -111 -KPX V comma -129 -KPX V colon -65 -KPX V a -111 -KPX V O -30 -KPX V A -74 - -KPX W y -92 -KPX W u -55 -KPX W semicolon -65 -KPX W r -55 -KPX W period -92 -KPX W o -92 -KPX W i -55 -KPX W hyphen -37 -KPX W e -92 -KPX W comma -92 -KPX W colon -65 -KPX W a -92 -KPX W A -70 - -KPX Y v -92 -KPX Y u -92 -KPX Y semicolon -65 -KPX Y q -111 -KPX Y period -92 -KPX Y p -92 -KPX Y o -92 -KPX Y i -74 -KPX Y hyphen -74 -KPX Y e -92 -KPX Y comma -92 -KPX Y colon -65 -KPX Y a -92 -KPX Y A -70 - -KPX f quoteright 92 - -KPX one one -74 - -KPX quoteleft quoteleft -111 - -KPX quoteright t -111 -KPX quoteright space -111 -KPX quoteright s -129 -KPX quoteright quoteright -111 - -KPX r y 0 -KPX r x 0 -KPX r w 0 -KPX r v 0 -KPX r u 0 -KPX r t 0 -KPX r r 0 -KPX r quoteright 37 -KPX r q -37 -KPX r period -111 -KPX r o -37 -KPX r hyphen -20 -KPX r h -18 -KPX r g -37 -KPX r e -37 -KPX r d -37 -KPX r comma -111 -KPX r c -37 - -KPX space A -18 - -KPX v period -74 -KPX v comma -74 - -KPX w period -74 -KPX w comma -74 - -KPX y period -55 -KPX y comma -55 -EndKernPairs -EndKernData -StartComposites 56 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 111 227 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 28 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 83 227 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 28 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 188 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 61 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 111 227 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 55 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 228 227 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 228 227 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 228 227 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 228 227 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 83 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 83 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 83 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 83 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute 14 227 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 14 227 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 14 227 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave 14 227 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -34 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -34 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -34 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -34 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 160 227 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 160 227 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 160 227 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 160 227 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 68 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 68 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 68 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 68 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 146 227 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 146 227 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 146 227 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 146 227 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 89 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 89 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 89 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 89 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 221 227 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 221 227 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 221 227 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 221 227 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 89 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 89 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 89 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 89 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 146 227 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 89 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 181 227 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 76 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 221 227 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 89 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 80 227 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 29 0 ; -EndComposites -EndFontMetrics diff --git a/samples/printing/TimesRo.afm b/samples/printing/TimesRo.afm deleted file mode 100644 index 3f8ce6b22a..0000000000 --- a/samples/printing/TimesRo.afm +++ /dev/null @@ -1,443 +0,0 @@ -StartFontMetrics 2.0 -Comment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date:Tue Aug 5 10:51:57 PDT 1986 -FontName Times-Roman -EncodingScheme AdobeStandardEncoding -FullName Times Roman -FamilyName Times -Weight Roman -ItalicAngle 0.0 -IsFixedPitch false -UnderlinePosition -109 -UnderlineThickness 49 -Version 001.001 -Notice Times Roman is a trademark of Allied Corporation. -FontBBox -170 -223 1024 896 -CapHeight 662 -XHeight 448 -Descender -217 -Ascender 682 -StartCharMetrics 228 -C 32 ; WX 250 ; N space ; B 0 0 0 0 ; -C 33 ; WX 333 ; N exclam ; B 109 -14 224 676 ; -C 34 ; WX 408 ; N quotedbl ; B 70 445 337 685 ; -C 35 ; WX 500 ; N numbersign ; B 4 0 495 662 ; -C 36 ; WX 500 ; N dollar ; B 44 -87 456 727 ; -C 37 ; WX 833 ; N percent ; B 61 -14 772 676 ; -C 38 ; WX 778 ; N ampersand ; B 42 -14 750 676 ; -C 39 ; WX 333 ; N quoteright ; B 103 432 242 676 ; -C 40 ; WX 333 ; N parenleft ; B 49 -177 304 676 ; -C 41 ; WX 333 ; N parenright ; B 29 -177 284 676 ; -C 42 ; WX 500 ; N asterisk ; B 64 265 437 683 ; -C 43 ; WX 564 ; N plus ; B 30 7 534 512 ; -C 44 ; WX 250 ; N comma ; B 63 -143 202 101 ; -C 45 ; WX 333 ; N hyphen ; B 43 194 289 257 ; -C 46 ; WX 250 ; N period ; B 68 -14 183 101 ; -C 47 ; WX 278 ; N slash ; B -12 -108 302 682 ; -C 48 ; WX 500 ; N zero ; B 24 -14 476 676 ; -C 49 ; WX 500 ; N one ; B 111 0 394 676 ; -C 50 ; WX 500 ; N two ; B 30 0 475 676 ; -C 51 ; WX 500 ; N three ; B 44 -14 431 676 ; -C 52 ; WX 500 ; N four ; B 12 0 472 676 ; -C 53 ; WX 500 ; N five ; B 32 -14 438 688 ; -C 54 ; WX 500 ; N six ; B 35 -14 468 682 ; -C 55 ; WX 500 ; N seven ; B 20 -14 449 662 ; -C 56 ; WX 500 ; N eight ; B 53 -14 442 676 ; -C 57 ; WX 500 ; N nine ; B 30 -22 460 676 ; -C 58 ; WX 278 ; N colon ; B 81 -14 196 458 ; -C 59 ; WX 278 ; N semicolon ; B 63 -143 202 458 ; -C 60 ; WX 564 ; N less ; B 27 0 536 522 ; -C 61 ; WX 564 ; N equal ; B 30 132 534 390 ; -C 62 ; WX 564 ; N greater ; B 27 0 536 522 ; -C 63 ; WX 444 ; N question ; B 49 -14 395 676 ; -C 64 ; WX 921 ; N at ; B 0 -155 819 675 ; -C 65 ; WX 722 ; N A ; B 15 0 706 676 ; -C 66 ; WX 667 ; N B ; B 20 0 596 662 ; -C 67 ; WX 667 ; N C ; B 33 -14 637 676 ; -C 68 ; WX 722 ; N D ; B 20 0 689 662 ; -C 69 ; WX 611 ; N E ; B 12 0 597 662 ; -C 70 ; WX 556 ; N F ; B 12 0 544 662 ; -C 71 ; WX 722 ; N G ; B 27 -14 704 676 ; -C 72 ; WX 722 ; N H ; B 20 0 703 662 ; -C 73 ; WX 333 ; N I ; B 18 0 316 662 ; -C 74 ; WX 389 ; N J ; B 10 -14 376 662 ; -C 75 ; WX 722 ; N K ; B 20 0 709 662 ; -C 76 ; WX 611 ; N L ; B 12 0 598 662 ; -C 77 ; WX 889 ; N M ; B 19 0 871 662 ; -C 78 ; WX 722 ; N N ; B 12 -14 709 662 ; -C 79 ; WX 722 ; N O ; B 33 -14 688 676 ; -C 80 ; WX 556 ; N P ; B 11 0 542 662 ; -C 81 ; WX 722 ; N Q ; B 33 -177 701 676 ; -C 82 ; WX 667 ; N R ; B 12 0 654 662 ; -C 83 ; WX 556 ; N S ; B 42 -14 491 676 ; -C 84 ; WX 611 ; N T ; B 18 0 594 662 ; -C 85 ; WX 722 ; N U ; B 16 -14 705 662 ; -C 86 ; WX 722 ; N V ; B 20 -14 701 662 ; -C 87 ; WX 944 ; N W ; B 9 -14 936 662 ; -C 88 ; WX 722 ; N X ; B 12 0 706 662 ; -C 89 ; WX 722 ; N Y ; B 22 0 703 662 ; -C 90 ; WX 611 ; N Z ; B 7 0 597 662 ; -C 91 ; WX 333 ; N bracketleft ; B 88 -156 299 662 ; -C 92 ; WX 278 ; N backslash ; B -83 0 361 682 ; -C 93 ; WX 333 ; N bracketright ; B 34 -156 245 662 ; -C 94 ; WX 469 ; N asciicircum ; B 13 256 456 662 ; -C 95 ; WX 500 ; N underscore ; B 0 -133 500 -84 ; -C 96 ; WX 333 ; N quoteleft ; B 91 432 230 676 ; -C 97 ; WX 444 ; N a ; B 37 -10 442 458 ; -C 98 ; WX 500 ; N b ; B 9 -10 474 682 ; -C 99 ; WX 444 ; N c ; B 25 -10 412 458 ; -C 100 ; WX 500 ; N d ; B 26 -13 491 682 ; -C 101 ; WX 444 ; N e ; B 22 -10 421 458 ; -C 102 ; WX 333 ; N f ; B 20 0 383 682 ; L i fi ; L l fl ; -C 103 ; WX 500 ; N g ; B 27 -217 470 458 ; -C 104 ; WX 500 ; N h ; B 9 0 490 682 ; -C 105 ; WX 278 ; N i ; B 22 0 259 682 ; -C 106 ; WX 278 ; N j ; B -54 -217 212 682 ; -C 107 ; WX 500 ; N k ; B 1 0 500 682 ; -C 108 ; WX 278 ; N l ; B 20 0 259 682 ; -C 109 ; WX 778 ; N m ; B 13 0 764 458 ; -C 110 ; WX 500 ; N n ; B 9 0 490 458 ; -C 111 ; WX 500 ; N o ; B 30 -10 470 458 ; -C 112 ; WX 500 ; N p ; B 2 -217 470 458 ; -C 113 ; WX 500 ; N q ; B 24 -217 498 459 ; -C 114 ; WX 333 ; N r ; B 4 0 335 458 ; -C 115 ; WX 389 ; N s ; B 51 -10 348 458 ; -C 116 ; WX 278 ; N t ; B 13 -10 279 580 ; -C 117 ; WX 500 ; N u ; B 9 -10 479 448 ; -C 118 ; WX 500 ; N v ; B 10 -10 468 448 ; -C 119 ; WX 722 ; N w ; B 21 -10 694 448 ; -C 120 ; WX 500 ; N x ; B 17 0 479 448 ; -C 121 ; WX 500 ; N y ; B 15 -217 476 448 ; -C 122 ; WX 444 ; N z ; B 25 0 418 448 ; -C 123 ; WX 480 ; N braceleft ; B 110 -165 341 682 ; -C 124 ; WX 200 ; N bar ; B 68 0 132 682 ; -C 125 ; WX 480 ; N braceright ; B 139 -165 370 682 ; -C 126 ; WX 541 ; N asciitilde ; B 18 176 522 347 ; -C 161 ; WX 333 ; N exclamdown ; B 109 -217 224 458 ; -C 162 ; WX 500 ; N cent ; B 53 -138 448 579 ; -C 163 ; WX 500 ; N sterling ; B 11 -14 491 676 ; -C 164 ; WX 167 ; N fraction ; B -170 -14 346 676 ; -C 165 ; WX 500 ; N yen ; B -43 0 502 662 ; -C 166 ; WX 500 ; N florin ; B 6 -185 490 676 ; -C 167 ; WX 500 ; N section ; B 72 -148 426 676 ; -C 168 ; WX 500 ; N currency ; B -2 99 503 600 ; -C 169 ; WX 180 ; N quotesingle ; B 47 445 133 685 ; -C 170 ; WX 444 ; N quotedblleft ; B 27 432 399 676 ; -C 171 ; WX 500 ; N guillemotleft ; B 32 35 449 422 ; -C 172 ; WX 333 ; N guilsinglleft ; B 45 35 271 422 ; -C 173 ; WX 333 ; N guilsinglright ; B 62 36 288 423 ; -C 174 ; WX 556 ; N fi ; B 33 0 521 678 ; -C 175 ; WX 556 ; N fl ; B 29 0 521 682 ; -C 177 ; WX 500 ; N endash ; B -7 201 507 250 ; -C 178 ; WX 500 ; N dagger ; B 54 -149 440 676 ; -C 179 ; WX 500 ; N daggerdbl ; B 54 -153 439 676 ; -C 180 ; WX 250 ; N periodcentered ; B 68 204 183 319 ; -C 182 ; WX 453 ; N paragraph ; B 0 -207 373 662 ; -C 183 ; WX 350 ; N bullet ; B 50 175 300 425 ; -C 184 ; WX 333 ; N quotesinglbase ; B 103 -143 242 101 ; -C 185 ; WX 444 ; N quotedblbase ; B 45 -143 417 101 ; -C 186 ; WX 444 ; N quotedblright ; B 45 432 417 676 ; -C 187 ; WX 500 ; N guillemotright ; B 51 35 468 422 ; -C 188 ; WX 1000 ; N ellipsis ; B 110 -14 891 101 ; -C 189 ; WX 1000 ; N perthousand ; B 3 -14 1024 676 ; -C 191 ; WX 444 ; N questiondown ; B 49 -217 395 458 ; -C 193 ; WX 333 ; N grave ; B 16 507 243 678 ; -C 194 ; WX 333 ; N acute ; B 93 507 317 678 ; -C 195 ; WX 333 ; N circumflex ; B 11 507 323 674 ; -C 196 ; WX 333 ; N tilde ; B 1 532 332 638 ; -C 197 ; WX 333 ; N macron ; B 11 547 323 601 ; -C 198 ; WX 333 ; N breve ; B 26 507 308 664 ; -C 199 ; WX 333 ; N dotaccent ; B 116 523 216 623 ; -C 200 ; WX 333 ; N dieresis ; B 18 523 316 623 ; -C 202 ; WX 333 ; N ring ; B 67 483 266 682 ; -C 203 ; WX 333 ; N cedilla ; B 53 -215 262 0 ; -C 205 ; WX 333 ; N hungarumlaut ; B 8 528 372 700 ; -C 206 ; WX 333 ; N ogonek ; B 68 -155 245 -10 ; -C 207 ; WX 333 ; N caron ; B 11 507 323 674 ; -C 208 ; WX 1000 ; N emdash ; B -8 201 1007 250 ; -C 225 ; WX 889 ; N AE ; B 5 0 869 662 ; -C 227 ; WX 276 ; N ordfeminine ; B 15 307 278 676 ; -C 232 ; WX 611 ; N Lslash ; B 12 0 598 662 ; -C 233 ; WX 722 ; N Oslash ; B 33 -80 688 734 ; -C 234 ; WX 889 ; N OE ; B 21 -7 877 669 ; -C 235 ; WX 310 ; N ordmasculine ; B 15 307 301 676 ; -C 241 ; WX 667 ; N ae ; B 38 -10 634 458 ; -C 245 ; WX 278 ; N dotlessi ; B 22 0 259 458 ; -C 248 ; WX 278 ; N lslash ; B 20 0 259 682 ; -C 249 ; WX 500 ; N oslash ; B 30 -108 470 549 ; -C 250 ; WX 722 ; N oe ; B 30 -10 690 458 ; -C 251 ; WX 500 ; N germandbls ; B 12 -10 468 682 ; -C -1 ; WX 722 ; N Aacute ; B 15 0 706 892 ; -C -1 ; WX 722 ; N Acircumflex ; B 15 0 706 888 ; -C -1 ; WX 722 ; N Adieresis ; B 15 0 706 837 ; -C -1 ; WX 722 ; N Agrave ; B 15 0 706 892 ; -C -1 ; WX 722 ; N Aring ; B 15 0 706 896 ; -C -1 ; WX 722 ; N Atilde ; B 15 0 706 852 ; -C -1 ; WX 667 ; N Ccedilla ; B 33 -215 637 676 ; -C -1 ; WX 611 ; N Eacute ; B 12 0 597 892 ; -C -1 ; WX 611 ; N Ecircumflex ; B 12 0 597 888 ; -C -1 ; WX 611 ; N Edieresis ; B 12 0 597 837 ; -C -1 ; WX 611 ; N Egrave ; B 12 0 597 892 ; -C -1 ; WX 722 ; N Eth ; B 20 0 689 662 ; -C -1 ; WX 333 ; N Iacute ; B 18 0 317 892 ; -C -1 ; WX 333 ; N Icircumflex ; B 11 0 323 888 ; -C -1 ; WX 333 ; N Idieresis ; B 18 0 316 837 ; -C -1 ; WX 333 ; N Igrave ; B 16 0 316 892 ; -C -1 ; WX 722 ; N Ntilde ; B 12 -14 709 852 ; -C -1 ; WX 722 ; N Oacute ; B 33 -14 688 892 ; -C -1 ; WX 722 ; N Ocircumflex ; B 33 -14 688 888 ; -C -1 ; WX 722 ; N Odieresis ; B 33 -14 688 837 ; -C -1 ; WX 722 ; N Ograve ; B 33 -14 688 892 ; -C -1 ; WX 722 ; N Otilde ; B 33 -14 688 852 ; -C -1 ; WX 556 ; N Scaron ; B 42 -14 491 888 ; -C -1 ; WX 556 ; N Thorn ; B 11 0 542 662 ; -C -1 ; WX 722 ; N Uacute ; B 16 -14 705 892 ; -C -1 ; WX 722 ; N Ucircumflex ; B 16 -14 705 888 ; -C -1 ; WX 722 ; N Udieresis ; B 16 -14 705 837 ; -C -1 ; WX 722 ; N Ugrave ; B 16 -14 705 892 ; -C -1 ; WX 722 ; N Yacute ; B 22 0 703 892 ; -C -1 ; WX 722 ; N Ydieresis ; B 22 0 703 837 ; -C -1 ; WX 611 ; N Zcaron ; B 7 0 597 888 ; -C -1 ; WX 444 ; N aacute ; B 37 -10 442 678 ; -C -1 ; WX 444 ; N acircumflex ; B 37 -10 442 674 ; -C -1 ; WX 444 ; N adieresis ; B 37 -10 442 623 ; -C -1 ; WX 444 ; N agrave ; B 37 -10 442 678 ; -C -1 ; WX 444 ; N aring ; B 37 -10 442 682 ; -C -1 ; WX 444 ; N atilde ; B 37 -10 442 638 ; -C -1 ; WX 200 ; N brokenbar ; B 68 0 132 682 ; -C -1 ; WX 444 ; N ccedilla ; B 25 -215 412 458 ; -C -1 ; WX 760 ; N copyright ; B 42 -14 717 676 ; -C -1 ; WX 400 ; N degree ; B 50 376 350 676 ; -C -1 ; WX 564 ; N divide ; B 30 10 534 512 ; -C -1 ; WX 444 ; N eacute ; B 22 -10 421 678 ; -C -1 ; WX 444 ; N ecircumflex ; B 22 -10 421 674 ; -C -1 ; WX 444 ; N edieresis ; B 22 -10 421 623 ; -C -1 ; WX 444 ; N egrave ; B 22 -10 421 678 ; -C -1 ; WX 500 ; N eth ; B 30 -10 470 682 ; -C -1 ; WX 278 ; N iacute ; B 22 0 290 678 ; -C -1 ; WX 278 ; N icircumflex ; B -16 0 296 674 ; -C -1 ; WX 278 ; N idieresis ; B -9 0 289 623 ; -C -1 ; WX 278 ; N igrave ; B -11 0 259 678 ; -C -1 ; WX 564 ; N logicalnot ; B 30 120 534 390 ; -C -1 ; WX 564 ; N minus ; B 30 229 534 293 ; -C -1 ; WX 500 ; N mu ; B 9 -223 479 448 ; -C -1 ; WX 564 ; N multiply ; B 30 8 534 512 ; -C -1 ; WX 500 ; N ntilde ; B 9 0 490 638 ; -C -1 ; WX 500 ; N oacute ; B 30 -10 470 678 ; -C -1 ; WX 500 ; N ocircumflex ; B 30 -10 470 674 ; -C -1 ; WX 500 ; N odieresis ; B 30 -10 470 623 ; -C -1 ; WX 500 ; N ograve ; B 30 -10 470 678 ; -C -1 ; WX 750 ; N onehalf ; B 30 -14 720 676 ; -C -1 ; WX 750 ; N onequarter ; B 30 -14 720 676 ; -C -1 ; WX 300 ; N onesuperior ; B 58 270 242 676 ; -C -1 ; WX 500 ; N otilde ; B 30 -10 470 638 ; -C -1 ; WX 564 ; N plusminus ; B 30 0 534 612 ; -C -1 ; WX 760 ; N registered ; B 43 -14 718 676 ; -C -1 ; WX 389 ; N scaron ; B 39 -10 351 674 ; -C -1 ; WX 500 ; N thorn ; B 2 -217 470 682 ; -C -1 ; WX 750 ; N threequarters ; B 30 -14 720 676 ; -C -1 ; WX 300 ; N threesuperior ; B 24 262 275 676 ; -C -1 ; WX 980 ; N trademark ; B 35 258 945 662 ; -C -1 ; WX 300 ; N twosuperior ; B 5 270 294 676 ; -C -1 ; WX 500 ; N uacute ; B 9 -10 479 678 ; -C -1 ; WX 500 ; N ucircumflex ; B 9 -10 479 674 ; -C -1 ; WX 500 ; N udieresis ; B 9 -10 479 623 ; -C -1 ; WX 500 ; N ugrave ; B 9 -10 479 678 ; -C -1 ; WX 500 ; N yacute ; B 15 -217 476 678 ; -C -1 ; WX 500 ; N ydieresis ; B 15 -217 476 623 ; -C -1 ; WX 444 ; N zcaron ; B 25 0 418 674 ; -EndCharMetrics -StartKernData -StartKernPairs 113 - -KPX A y -92 -KPX A w -92 -KPX A v -74 -KPX A space -55 -KPX A quoteright -111 -KPX A Y -92 -KPX A W -80 -KPX A V -129 -KPX A T -111 - -KPX F period -80 -KPX F comma -80 -KPX F A -74 - -KPX L y -55 -KPX L space -37 -KPX L quoteright -92 -KPX L Y -100 -KPX L W -74 -KPX L V -92 -KPX L T -92 - -KPX P space -37 -KPX P period -111 -KPX P comma -111 -KPX P A -92 - -KPX R y -40 -KPX R Y -55 -KPX R W -55 -KPX R V -80 -KPX R T -60 - -KPX T y -70 -KPX T w -70 -KPX T u -35 -KPX T space -18 -KPX T semicolon -55 -KPX T s -70 -KPX T r -35 -KPX T period -74 -KPX T o -70 -KPX T i -35 -KPX T hyphen -92 -KPX T e -70 -KPX T comma -74 -KPX T colon -50 -KPX T c -70 -KPX T a -70 -KPX T O -18 -KPX T A -80 - -KPX V y -111 -KPX V u -60 -KPX V space -18 -KPX V semicolon -74 -KPX V r -60 -KPX V period -129 -KPX V o -129 -KPX V i -60 -KPX V hyphen -92 -KPX V e -111 -KPX V comma -129 -KPX V colon -74 -KPX V a -111 -KPX V A -129 - -KPX W y -60 -KPX W u -40 -KPX W space -18 -KPX W semicolon -37 -KPX W r -40 -KPX W period -92 -KPX W o -80 -KPX W i -40 -KPX W hyphen -55 -KPX W e -80 -KPX W comma -92 -KPX W colon -37 -KPX W a -80 -KPX W A -111 - -KPX Y v -100 -KPX Y u -111 -KPX Y space -37 -KPX Y semicolon -92 -KPX Y q -111 -KPX Y period -129 -KPX Y p -92 -KPX Y o -100 -KPX Y i -55 -KPX Y hyphen -111 -KPX Y e -100 -KPX Y comma -129 -KPX Y colon -92 -KPX Y a -100 -KPX Y A -111 - -KPX f quoteright 55 -KPX f f -18 - -KPX one one -37 - -KPX quoteleft quoteleft -74 - -KPX quoteright t -18 -KPX quoteright space -74 -KPX quoteright s -55 -KPX quoteright quoteright -74 - -KPX r quoteright 37 -KPX r period -55 -KPX r hyphen -20 -KPX r g -18 -KPX r comma -40 - -KPX space Y -37 -KPX space W -18 -KPX space V -18 -KPX space T -18 -KPX space A -55 - -KPX v period -65 -KPX v comma -65 - -KPX w period -65 -KPX w comma -65 - -KPX y period -65 -KPX y comma -65 -EndKernPairs -EndKernData -StartComposites 56 -CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 214 ; -CC zcaron 2 ; PCC z 0 0 ; PCC caron 55 0 ; -CC Scaron 2 ; PCC S 0 0 ; PCC caron 111 214 ; -CC scaron 2 ; PCC s 0 0 ; PCC caron 28 0 ; -CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 167 0 ; -CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 55 0 ; -CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 194 214 ; -CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 83 0 ; -CC Uacute 2 ; PCC U 0 0 ; PCC acute 194 214 ; -CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 194 214 ; -CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 194 214 ; -CC Ugrave 2 ; PCC U 0 0 ; PCC grave 194 214 ; -CC uacute 2 ; PCC u 0 0 ; PCC acute 83 0 ; -CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 83 0 ; -CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 83 0 ; -CC ugrave 2 ; PCC u 0 0 ; PCC grave 83 0 ; -CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 214 ; -CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 0 214 ; -CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 0 214 ; -CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 214 ; -CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ; -CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ; -CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ; -CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ; -CC Eacute 2 ; PCC E 0 0 ; PCC acute 139 214 ; -CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 139 214 ; -CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 139 214 ; -CC Egrave 2 ; PCC E 0 0 ; PCC grave 139 214 ; -CC eacute 2 ; PCC e 0 0 ; PCC acute 55 0 ; -CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 55 0 ; -CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 55 0 ; -CC egrave 2 ; PCC e 0 0 ; PCC grave 55 0 ; -CC Aacute 2 ; PCC A 0 0 ; PCC acute 194 214 ; -CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 194 214 ; -CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 194 214 ; -CC Agrave 2 ; PCC A 0 0 ; PCC grave 194 214 ; -CC aacute 2 ; PCC a 0 0 ; PCC acute 55 0 ; -CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 55 0 ; -CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 55 0 ; -CC agrave 2 ; PCC a 0 0 ; PCC grave 55 0 ; -CC Oacute 2 ; PCC O 0 0 ; PCC acute 194 214 ; -CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 194 214 ; -CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 194 214 ; -CC Ograve 2 ; PCC O 0 0 ; PCC grave 194 214 ; -CC oacute 2 ; PCC o 0 0 ; PCC acute 83 0 ; -CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 83 0 ; -CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 83 0 ; -CC ograve 2 ; PCC o 0 0 ; PCC grave 83 0 ; -CC Atilde 2 ; PCC A 0 0 ; PCC tilde 194 214 ; -CC atilde 2 ; PCC a 0 0 ; PCC tilde 55 0 ; -CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 194 214 ; -CC ntilde 2 ; PCC n 0 0 ; PCC tilde 83 0 ; -CC Otilde 2 ; PCC O 0 0 ; PCC tilde 194 214 ; -CC otilde 2 ; PCC o 0 0 ; PCC tilde 83 0 ; -CC Aring 2 ; PCC A 0 0 ; PCC ring 194 214 ; -CC aring 2 ; PCC a 0 0 ; PCC ring 55 0 ; -EndComposites -EndFontMetrics diff --git a/samples/printing/fload.xbm b/samples/printing/fload.xbm deleted file mode 100644 index 27af1f939b..0000000000 --- a/samples/printing/fload.xbm +++ /dev/null @@ -1,11 +0,0 @@ -#define fload_width 30 -#define fload_height 30 -static char fload_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x0f,0xf8,0xff,0xfb,0x0f,0x08,0x00,0xf0, - 0x0f,0xc8,0xff,0xef,0x0f,0x48,0x00,0xf0,0x0f,0x48,0x00,0xf8,0x0f,0x48,0x00, - 0xfc,0x0e,0x48,0x00,0x7f,0x0c,0x48,0xc0,0xbf,0x00,0x48,0xf0,0x9f,0x04,0x48, - 0xfe,0x8f,0x04,0x48,0xff,0x87,0x04,0x48,0x00,0x80,0x04,0x48,0x00,0x80,0x04, - 0x48,0x00,0x80,0x04,0x48,0x00,0x80,0x04,0xc8,0xff,0xff,0x04,0x08,0x00,0x00, - 0x04,0x08,0x00,0x00,0x04,0x08,0xff,0x1f,0x04,0x08,0x01,0x10,0x04,0x08,0x1d, - 0x10,0x04,0x08,0x15,0x10,0x04,0x08,0x15,0x10,0x04,0x08,0x15,0x10,0x04,0x08, - 0x15,0x10,0x04,0x10,0x1d,0x10,0x04,0xe0,0xff,0xff,0x07,0x00,0x00,0x00,0x00}; diff --git a/samples/printing/folder.xpm b/samples/printing/folder.xpm deleted file mode 100644 index 7a36fa27f1..0000000000 --- a/samples/printing/folder.xpm +++ /dev/null @@ -1,48 +0,0 @@ -/* XPM */ -static char * folder_xpm[] = { -"33 33 12 1", -" c None", -". c #D75CA69979E7", -"X c #208120812081", -"o c #FFFFFFFFFFFF", -"O c #B6DA79E74924", -"+ c #596559655965", -"@ c #410341034103", -"# c #514451445144", -"$ c #000000000820", -"% c #8E38596530C2", -"& c #8E3886178617", -"* c #492479E769A6", -" ", -" .. XXX ", -" .o.. X.XXX ", -" .ooo..OOOXXX ", -" .ooooo..OOOXXX ++ ", -"XXX .ooooooo..OOOXXX @#++@ ", -"XOX@X.ooooooooo...OOO@XX+X#+++ ", -"X...@@$.oooooooooo...OOXXX@X@+ ", -"O.....@XXOooooooooooo..OOOX@@X ", -"XO......@%X.ooooooooooo..%%OX@ ", -".O........@XX.oooooooooo.X%XX ", -" %O.........@@$.oooooooo.XX%X ", -" %O...........@@$.oooooo.X%X# ", -" %O.............@@X.oooo.XX%& ", -" .@...............@XX.oo.@XX ", -" %.................@X.o.XXX ", -" OO................O%X..XX@ ", -" +OO.......O..OOOOOOO@..@X& ", -" .%O....OOOOOOOOOOOOOX.+XX ", -" XOOOOOOOOOOOOOOOOOOX+*XX ", -" @OOOOO.OOOOOOOOOOOOX*+XX ", -" .%OOOOOOOOOOOOOOO%OXX#XX ", -" XOOOOOOOOOOO%O%O%%OX++& ", -" @O%O%OO%O%%O%%%%%%%XXX ", -" XXXO%%%%%%%%%%%%%%XXX ", -" OXXX%%%%%%%%%%%%@XX# ", -" OX@X%%%%%%%%%%%XXX ", -" OXXX%%%O%%%%%XXX ", -" OXXX%%%%%%%XX* ", -" OX@X%%%%X%X& ", -" OXXX%%%XX ", -" OXXX%%@ ", -" OXXX "}; diff --git a/samples/printing/makefile.b32 b/samples/printing/makefile.b32 deleted file mode 100644 index df6457fae4..0000000000 --- a/samples/printing/makefile.b32 +++ /dev/null @@ -1,63 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds printing example (DOS). - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 - -TARGET=printing - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = printing.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -printing.obj: printing.$(SRCSUFF) printing.h - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - diff --git a/samples/printing/makefile.dos b/samples/printing/makefile.dos deleted file mode 100644 index 7269a32242..0000000000 --- a/samples/printing/makefile.dos +++ /dev/null @@ -1,88 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds printing example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info. - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\printing -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) oldnames libw llibcew commdlg ddeml shell mmsystem -INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw -DUMMY=$(WXDIR)\src\msw\dummy.obj - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!ifndef FINAL -FINAL=0 -!endif - -DEBUGFLAG=#/DDEBUG=1 - -!if "$(FINAL)" == "0" -CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) $(DEBUGFLAG) /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch -LINKFLAGS=/NOD /NOE /CO /ONERROR:NOEXE /SEG:256 -!else -CPPFLAGS=/AL /W3 /G2sw $(INC) /Ox /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch -LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:256 -!endif - -HEADERS = printing.h -SOURCES = printing.$(SRCSUFF) -OBJECTS = printing.obj - -printing: printing.exe - -all: wx printing.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -printing.exe: $(DUMMY) $(WXLIB) printing.obj printing.def printing.res - link $(LINKFLAGS) @<< -$(DUMMY) printing.obj, -printing, -NUL, -$(LIBS), -printing.def -; -<< - rc -31 -K printing.res - -printing.obj: printing.h printing.$(SRCSUFF) $(DUMMY) $(WXDIR)\include\base\wx_print.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -printing.res : printing.rc $(WXDIR)\include\msw\wx.rc - rc -r /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa printing - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb - - diff --git a/samples/printing/makefile.g95 b/samples/printing/makefile.g95 deleted file mode 100644 index 4746b7aabe..0000000000 --- a/samples/printing/makefile.g95 +++ /dev/null @@ -1,37 +0,0 @@ -# -# File: makefile.g95 -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for printing example (UNIX). PRINTING NOT SUPPORTED -# UNDER UNIX YET: THIS IS A PLACEHOLDER. - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS=$(OBJDIR)/printing.$(OBJSUFF) $(OBJDIR)/printing_resources.$(OBJSUFF) - -all: $(OBJDIR) printing$(GUISUFFIX) - -$(OBJDIR): - mkdir $(OBJDIR) - -printing.exe: $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o printing$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/printing.$(OBJSUFF): printing.$(SRCSUFF) printing.h - $(CC) -c $(CPPFLAGS) -o $@ printing.$(SRCSUFF) - -$(OBJDIR)/printing_resources.o: printing.rc - $(RESCOMP) -i printing.rc -o $(OBJDIR)/printing_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) printing$(GUISUFFIX).exe core *.res *.rsc - diff --git a/samples/printing/makefile.nt b/samples/printing/makefile.nt deleted file mode 100644 index 92a5d171f0..0000000000 --- a/samples/printing/makefile.nt +++ /dev/null @@ -1,62 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds printing example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\printing -PROGRAM=printing - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).h $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.sbr - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb diff --git a/samples/printing/mondrian.ico b/samples/printing/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/samples/printing/mondrian.ico and /dev/null differ diff --git a/samples/printing/mondrian.xpm b/samples/printing/mondrian.xpm deleted file mode 100644 index 409f27a843..0000000000 --- a/samples/printing/mondrian.xpm +++ /dev/null @@ -1,44 +0,0 @@ -/* XPM */ -static char *mondrian_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 6 1", -" c Black", -". c Blue", -"X c #00bf00", -"o c Red", -"O c Yellow", -"+ c Gray100", -/* pixels */ -" ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" " -}; diff --git a/samples/printing/printing.cpp b/samples/printing/printing.cpp deleted file mode 100644 index 02f5594865..0000000000 --- a/samples/printing/printing.cpp +++ /dev/null @@ -1,546 +0,0 @@ -/* - * File: printing.cc - * Purpose: Printing demo for wxWindows class library - * Author: Julian Smart - * Created: 1995 - * Updated: - * Copyright: (c) 1995, AIAI, University of Edinburgh - */ - -/* static const char sccsid[] = "%W% %G%"; */ - -#ifdef __GNUG__ -#pragma implementation -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#include "wx/postscrp.h" -#endif - -#if !USE_PRINTING_ARCHITECTURE -#error You must set USE_PRINTING_ARCHITECTURE to 1 in wx_setup.h to compile this demo. -#endif - -#include -#include "wx/metafile.h" -#include "wx/print.h" -#include "wx/printdlg.h" -#include "wx/generic/printps.h" -#include "wx/generic/prntdlgg.h" - -#include "printing.h" - -// Declare a frame -MyFrame *frame = (MyFrame *) NULL; -int orientation = wxPORTRAIT; - -// Main proc -IMPLEMENT_APP(MyApp) - -#ifdef __WXGTK__ -#include "folder.xpm" -#endif - -// Writes a header on a page. Margin units are in millimetres. -bool WritePageHeader(wxPrintout *printout, wxDC *dc, char *text, float mmToLogical); - -MyApp::MyApp() -{ -} - -// The `main program' equivalent, creating the windows and returning the -// main frame -bool MyApp::OnInit(void) -{ - m_testFont = new wxFont(10, wxSWISS, wxNORMAL, wxNORMAL); - - // Create the main frame window - frame = new MyFrame((wxFrame *) NULL, (char *) "wxWindows Printing Demo", wxPoint(0, 0), wxSize(400, 400)); - - // Give it a status line - frame->CreateStatusBar(2); - - // Load icon and bitmap -#ifdef __WXMSW__ - frame->SetIcon(wxIcon("mondrian")); -#endif -#ifdef __X__ -// frame->SetIcon(wxIcon(mondrian_bits, mondrian_width, mondrian_height)); -#endif - - // Make a menubar - wxMenu *file_menu = new wxMenu; - - file_menu->Append(WXPRINT_PRINT, "&Print...", "Print"); - file_menu->Append(WXPRINT_PRINT_SETUP, "Print &Setup...", "Setup printer properties"); - file_menu->Append(WXPRINT_PAGE_SETUP, "Page Set&up...", "Page setup"); - file_menu->Append(WXPRINT_PREVIEW, "Print Pre&view", "Preview"); - -#ifdef __WXMSW__ - file_menu->AppendSeparator(); - file_menu->Append(WXPRINT_PRINT_PS, "Print PostScript...", "Print (PostScript)"); - file_menu->Append(WXPRINT_PRINT_SETUP_PS, "Print Setup PostScript...", "Setup printer properties (PostScript)"); - file_menu->Append(WXPRINT_PAGE_SETUP_PS, "Page Setup PostScript...", "Page setup (PostScript)"); - file_menu->Append(WXPRINT_PREVIEW_PS, "Print Preview PostScript", "Preview (PostScript)"); -#endif - file_menu->AppendSeparator(); - file_menu->Append(WXPRINT_QUIT, "E&xit", "Exit program"); - - wxMenu *help_menu = new wxMenu; - help_menu->Append(WXPRINT_ABOUT, "&About", "About this demo"); - - wxMenuBar *menu_bar = new wxMenuBar; - - menu_bar->Append(file_menu, "&File"); - menu_bar->Append(help_menu, "&Help"); - - // Associate the menu bar with the frame - frame->SetMenuBar(menu_bar); - - MyCanvas *canvas = new MyCanvas(frame, wxPoint(0, 0), wxSize(100, 100), wxRETAINED|wxHSCROLL|wxVSCROLL); - - // Give it scrollbars: the virtual canvas is 20 * 50 = 1000 pixels in each direction - canvas->SetScrollbars(20, 20, 50, 50); - - frame->canvas = canvas; - - frame->Centre(wxBOTH); - frame->Show(TRUE); - - frame->SetStatusText("Printing demo"); - - SetTopWindow(frame); - - return TRUE; -} - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(WXPRINT_QUIT, MyFrame::OnExit) - EVT_MENU(WXPRINT_PRINT, MyFrame::OnPrint) - EVT_MENU(WXPRINT_PREVIEW, MyFrame::OnPrintPreview) - EVT_MENU(WXPRINT_PRINT_SETUP, MyFrame::OnPrintSetup) - EVT_MENU(WXPRINT_PAGE_SETUP, MyFrame::OnPageSetup) - EVT_MENU(WXPRINT_PRINT_PS, MyFrame::OnPrintPS) - EVT_MENU(WXPRINT_PREVIEW_PS, MyFrame::OnPrintPreviewPS) - EVT_MENU(WXPRINT_PRINT_SETUP_PS, MyFrame::OnPrintSetupPS) - EVT_MENU(WXPRINT_PAGE_SETUP_PS, MyFrame::OnPageSetupPS) - EVT_MENU(WXPRINT_ABOUT, MyFrame::OnPrintAbout) -END_EVENT_TABLE() - -// Define my frame constructor -MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size): - wxFrame(frame, -1, title, pos, size) -{ - canvas = (MyCanvas *) NULL; -} - -void MyFrame::OnExit(wxCommandEvent& WXUNUSED(event)) -{ - Close(TRUE); -} - -void MyFrame::OnPrint(wxCommandEvent& WXUNUSED(event)) -{ -#ifdef __WXMSW__ - wxGetApp().SetPrintMode(wxPRINT_WINDOWS); -#else - wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT); -#endif - wxPrinter printer; - MyPrintout printout("My printout"); - if (!printer.Print(this, &printout, TRUE)) - wxMessageBox("There was a problem printing.\nPerhaps your current printer is not set correctly?", "Printing", wxOK); -} - -void MyFrame::OnPrintPS(wxCommandEvent& WXUNUSED(event)) -{ - wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT); - - wxPostScriptPrinter printer; - MyPrintout printout("My printout"); - printer.Print(this, &printout, TRUE); -} - -void MyFrame::OnPrintPreview(wxCommandEvent& WXUNUSED(event)) -{ -#ifdef __WXMSW__ - wxGetApp().SetPrintMode(wxPRINT_WINDOWS); -#else - wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT); -#endif - wxPrintData printData; - printData.SetOrientation(orientation); - - // Pass two printout objects: for preview, and possible printing. - wxPrintPreview *preview = new wxPrintPreview(new MyPrintout, new MyPrintout, & printData); - if (!preview->Ok()) - { - delete preview; - wxMessageBox("There was a problem previewing.\nPerhaps your current printer is not set correctly?", "Previewing", wxOK); - return; - } - - wxPreviewFrame *frame = new wxPreviewFrame(preview, this, "Demo Print Preview", wxPoint(100, 100), wxSize(600, 650)); - frame->Centre(wxBOTH); - frame->Initialize(); - frame->Show(TRUE); -} - -void MyFrame::OnPrintPreviewPS(wxCommandEvent& WXUNUSED(event)) -{ - wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT); - - wxPrintData printData; - printData.SetOrientation(orientation); - - // Pass two printout objects: for preview, and possible printing. - wxPrintPreview *preview = new wxPrintPreview(new MyPrintout, new MyPrintout, & printData); - wxPreviewFrame *frame = new wxPreviewFrame(preview, this, "Demo Print Preview", wxPoint(100, 100), wxSize(600, 650)); - frame->Centre(wxBOTH); - frame->Initialize(); - frame->Show(TRUE); -} - -void MyFrame::OnPrintSetup(wxCommandEvent& WXUNUSED(event)) -{ -#ifdef __WXMSW__ - wxGetApp().SetPrintMode(wxPRINT_WINDOWS); -#else - wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT); -#endif - wxPrintData data; - data.SetOrientation(orientation); - -#ifdef __WXMSW__ - wxPrintDialog printerDialog(this, & data); -#else - wxGenericPrintDialog printerDialog(this, & data); -#endif - printerDialog.GetPrintData().SetSetupDialog(TRUE); - printerDialog.ShowModal(); - - orientation = printerDialog.GetPrintData().GetOrientation(); -} - -void MyFrame::OnPageSetup(wxCommandEvent& WXUNUSED(event)) -{ -#ifdef __WXMSW__ - wxGetApp().SetPrintMode(wxPRINT_WINDOWS); -#else - wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT); -#endif - wxPageSetupData data; - data.SetOrientation(orientation); - -#ifdef __WXMSW__ - wxPageSetupDialog pageSetupDialog(this, & data); -#else - wxGenericPageSetupDialog pageSetupDialog(this, & data); -#endif - pageSetupDialog.ShowModal(); - - data = pageSetupDialog.GetPageSetupData(); - orientation = data.GetOrientation(); -} - -void MyFrame::OnPrintSetupPS(wxCommandEvent& WXUNUSED(event)) -{ - wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT); - - wxPrintData data; - data.SetOrientation(orientation); - - wxGenericPrintDialog printerDialog(this, & data); - printerDialog.GetPrintData().SetSetupDialog(TRUE); - printerDialog.ShowModal(); - - orientation = printerDialog.GetPrintData().GetOrientation(); -} - -void MyFrame::OnPageSetupPS(wxCommandEvent& WXUNUSED(event)) -{ - wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT); - - wxPageSetupData data; - data.SetOrientation(orientation); - - wxGenericPageSetupDialog pageSetupDialog(this, & data); - pageSetupDialog.ShowModal(); - - orientation = pageSetupDialog.GetPageSetupData().GetOrientation(); -} - -void MyFrame::OnPrintAbout(wxCommandEvent& WXUNUSED(event)) -{ - (void)wxMessageBox("wxWindows printing demo\nAuthor: Julian Smart julian.smart@ukonline.co.uk", - "About wxWindows printing demo", wxOK|wxCENTRE); -} - -void MyFrame::Draw(wxDC& dc) -{ - dc.SetFont(* wxGetApp().m_testFont); - - dc.SetBackgroundMode(wxTRANSPARENT); - - dc.SetBrush(* wxCYAN_BRUSH); - dc.SetPen(* wxRED_PEN); - - dc.DrawRectangle(0, 30, 200, 100); - dc.DrawText("Rectangle 200 by 100", 40, 40); - - dc.DrawEllipse(50, 140, 100, 50); - - dc.DrawText("Test message: this is in 10 point text", 10, 180); - - dc.SetPen(* wxBLACK_PEN); - dc.DrawLine(0, 0, 200, 200); - dc.DrawLine(200, 0, 0, 200); - -#if defined(__WXGTK__) - wxIcon my_icon( folder_xpm ); -#elif defined(__WXMSW__) - wxIcon my_icon( "mondrian" ); -#elif -#error "Platform not supported." -#endif - - dc.DrawIcon( my_icon, 100, 100); -} - -void MyFrame::OnSize(wxSizeEvent& event ) -{ - wxFrame::OnSize(event); -} - -BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow) - EVT_MOUSE_EVENTS(MyCanvas::OnEvent) -END_EVENT_TABLE() - -// Define a constructor for my canvas -MyCanvas::MyCanvas(wxFrame *frame, const wxPoint& pos, const wxSize& size, long style): - wxScrolledWindow(frame, -1, pos, size, style) -{ -} - -MyCanvas::~MyCanvas(void) -{ -} - -// Define the repainting behaviour -void MyCanvas::OnDraw(wxDC& dc) -{ - frame->Draw(dc); -} - -void MyCanvas::OnEvent(wxMouseEvent& WXUNUSED(event)) -{ -} - -bool MyFrame::OnClose(void) -{ - Show(FALSE); - delete wxGetApp().m_testFont; - - return TRUE; -} - -bool MyPrintout::OnPrintPage(int page) -{ - wxDC *dc = GetDC(); - if (dc) - { - if (page == 1) - DrawPageOne(dc); - else if (page == 2) - DrawPageTwo(dc); - - dc->SetDeviceOrigin(0, 0); - - char buf[200]; - sprintf(buf, "PAGE %d", page); - dc->DrawText(buf, 10, 10); - - return TRUE; - } - else - return FALSE; -} - -bool MyPrintout::OnBeginDocument(int startPage, int endPage) -{ - if (!wxPrintout::OnBeginDocument(startPage, endPage)) - return FALSE; - - return TRUE; -} - -void MyPrintout::GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo) -{ - *minPage = 1; - *maxPage = 2; - *selPageFrom = 1; - *selPageTo = 2; -} - -bool MyPrintout::HasPage(int pageNum) -{ - return (pageNum == 1 || pageNum == 2); -} - -void MyPrintout::DrawPageOne(wxDC *dc) -{ -/* You might use THIS code if you were scaling - * graphics of known size to fit on the page. - */ - int w, h; - - // We know the graphic is 200x200. If we didn't know this, - // we'd need to calculate it. - float maxX = 200; - float maxY = 200; - - // Let's have at least 50 device units margin - float marginX = 50; - float marginY = 50; - - // Add the margin to the graphic size - maxX += (2*marginX); - maxY += (2*marginY); - - // Get the size of the DC in pixels - dc->GetSize(&w, &h); - - // Calculate a suitable scaling factor - float scaleX=(float)(w/maxX); - float scaleY=(float)(h/maxY); - - // Use x or y scaling factor, whichever fits on the DC - float actualScale = wxMin(scaleX,scaleY); - - // Calculate the position on the DC for centring the graphic - float posX = (float)((w - (200*actualScale))/2.0); - float posY = (float)((h - (200*actualScale))/2.0); - - // Set the scale and origin - dc->SetUserScale(actualScale, actualScale); - dc->SetDeviceOrigin( (long)posX, (long)posY ); - - frame->Draw(*dc); -} - -void MyPrintout::DrawPageTwo(wxDC *dc) -{ -/* You might use THIS code to set the printer DC to ROUGHLY reflect - * the screen text size. This page also draws lines of actual length 5cm - * on the page. - */ - // Get the logical pixels per inch of screen and printer - int ppiScreenX, ppiScreenY; - GetPPIScreen(&ppiScreenX, &ppiScreenY); - int ppiPrinterX, ppiPrinterY; - GetPPIPrinter(&ppiPrinterX, &ppiPrinterY); - - // This scales the DC so that the printout roughly represents the - // the screen scaling. The text point size _should_ be the right size - // but in fact is too small for some reason. This is a detail that will - // need to be addressed at some point but can be fudged for the - // moment. - float scale = (float)((float)ppiPrinterX/(float)ppiScreenX); - - // Now we have to check in case our real page size is reduced - // (e.g. because we're drawing to a print preview memory DC) - int pageWidth, pageHeight; - int w, h; - dc->GetSize(&w, &h); - GetPageSizePixels(&pageWidth, &pageHeight); - - // If printer pageWidth == current DC width, then this doesn't - // change. But w might be the preview bitmap width, so scale down. - float overallScale = scale * (float)(w/(float)pageWidth); - dc->SetUserScale(overallScale, overallScale); - - // Calculate conversion factor for converting millimetres into - // logical units. - // There are approx. 25.1 mm to the inch. There are ppi - // device units to the inch. Therefore 1 mm corresponds to - // ppi/25.1 device units. We also divide by the - // screen-to-printer scaling factor, because we need to - // unscale to pass logical units to DrawLine. - - // Draw 50 mm by 50 mm L shape - float logUnitsFactor = (float)(ppiPrinterX/(scale*25.1)); - float logUnits = (float)(50*logUnitsFactor); - dc->SetPen(* wxBLACK_PEN); - dc->DrawLine(50, 50, (long)(50.0 + logUnits), 50); - dc->DrawLine(50, 50, 50, (long)(50.0 + logUnits)); - - dc->SetFont(* wxGetApp().m_testFont); - dc->SetBackgroundMode(wxTRANSPARENT); - - dc->DrawText("Some test text", 200, 200 ); - - // TESTING - - int leftMargin = 20; - int rightMargin = 20; - int topMargin = 20; - int bottomMargin = 20; - - int pageWidthMM, pageHeightMM; - GetPageSizeMM(&pageWidthMM, &pageHeightMM); - - float leftMarginLogical = (float)(logUnitsFactor*leftMargin); - float topMarginLogical = (float)(logUnitsFactor*topMargin); - float bottomMarginLogical = (float)(logUnitsFactor*(pageHeightMM - bottomMargin)); - float rightMarginLogical = (float)(logUnitsFactor*(pageWidthMM - rightMargin)); - - dc->SetPen(wxBLACK_PEN); - dc->DrawLine( (long)leftMarginLogical, (long)topMarginLogical, - (long)rightMarginLogical, (long)topMarginLogical); - dc->DrawLine( (long)leftMarginLogical, (long)bottomMarginLogical, - (long)rightMarginLogical, (long)bottomMarginLogical); - - WritePageHeader(this, dc, "A header", logUnitsFactor); -} - -// Writes a header on a page. Margin units are in millimetres. -bool WritePageHeader(wxPrintout *printout, wxDC *dc, char *text, float mmToLogical) -{ - static wxFont *headerFont = (wxFont *) NULL; - if (!headerFont) - { - headerFont = wxTheFontList->FindOrCreateFont(16, wxSWISS, wxNORMAL, wxBOLD); - } - dc->SetFont(headerFont); - - int pageWidthMM, pageHeightMM; - - printout->GetPageSizeMM(&pageWidthMM, &pageHeightMM); - - int leftMargin = 10; - int topMargin = 10; - int rightMargin = 10; - - float leftMarginLogical = (float)(mmToLogical*leftMargin); - float topMarginLogical = (float)(mmToLogical*topMargin); - float rightMarginLogical = (float)(mmToLogical*(pageWidthMM - rightMargin)); - - long xExtent, yExtent; - dc->GetTextExtent(text, &xExtent, &yExtent); - float xPos = (float)(((((pageWidthMM - leftMargin - rightMargin)/2.0)+leftMargin)*mmToLogical) - (xExtent/2.0)); - dc->DrawText(text, (long)xPos, (long)topMarginLogical); - - dc->SetPen(* wxBLACK_PEN); - dc->DrawLine( (long)leftMarginLogical, (long)(topMarginLogical+yExtent), - (long)rightMarginLogical, (long)topMarginLogical+yExtent ); - - return TRUE; -} diff --git a/samples/printing/printing.def b/samples/printing/printing.def deleted file mode 100644 index e880656894..0000000000 --- a/samples/printing/printing.def +++ /dev/null @@ -1,9 +0,0 @@ -NAME Printing -DESCRIPTION 'Printing' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 16192 - diff --git a/samples/printing/printing.h b/samples/printing/printing.h deleted file mode 100644 index b30050c231..0000000000 --- a/samples/printing/printing.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * File: printing.h - * Purpose: Printing demo for wxWindows class library - * Author: Julian Smart - * Created: 1995 - * Updated: - * Copyright: (c) 1995, AIAI, University of Edinburgh - */ - -/* sccsid[] = "%W% %G%" */ - -#ifdef __GNUG__ -#pragma interface -#endif - -// Define a new application -class MyApp: public wxApp -{ - public: - MyApp(void) ; - bool OnInit(void); - - wxFont* m_testFont; -}; - -DECLARE_APP(MyApp) - -class MyCanvas; - -// Define a new canvas and frame -class MyFrame: public wxFrame -{ - public: - MyCanvas *canvas; - MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size); - - bool OnClose(void); - - void Draw(wxDC& dc); - - void OnSize(wxSizeEvent& event); - void OnPrint(wxCommandEvent& event); - void OnPrintPreview(wxCommandEvent& event); - void OnPrintSetup(wxCommandEvent& event); - void OnPageSetup(wxCommandEvent& event); - void OnPrintPS(wxCommandEvent& event); - void OnPrintPreviewPS(wxCommandEvent& event); - void OnPrintSetupPS(wxCommandEvent& event); - void OnPageSetupPS(wxCommandEvent& event); - void OnExit(wxCommandEvent& event); - void OnPrintAbout(wxCommandEvent& event); -DECLARE_EVENT_TABLE() -}; - -// Define a new canvas which can receive some events -class MyCanvas: public wxScrolledWindow -{ - public: - MyCanvas(wxFrame *frame, const wxPoint& pos, const wxSize& size, long style = wxRETAINED); - ~MyCanvas(void) ; - - virtual void OnDraw(wxDC& dc); - void OnEvent(wxMouseEvent& event); - -DECLARE_EVENT_TABLE() -}; - -class MyPrintout: public wxPrintout -{ - public: - MyPrintout(char *title = "My printout"):wxPrintout(title) {} - bool OnPrintPage(int page); - bool HasPage(int page); - bool OnBeginDocument(int startPage, int endPage); - void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo); - - void DrawPageOne(wxDC *dc); - void DrawPageTwo(wxDC *dc); -}; - -#define WXPRINT_QUIT 100 -#define WXPRINT_PRINT 101 -#define WXPRINT_PRINT_SETUP 102 -#define WXPRINT_PAGE_SETUP 103 -#define WXPRINT_PREVIEW 104 - -#define WXPRINT_PRINT_PS 105 -#define WXPRINT_PRINT_SETUP_PS 106 -#define WXPRINT_PAGE_SETUP_PS 107 -#define WXPRINT_PREVIEW_PS 108 - -#define WXPRINT_ABOUT 109 - diff --git a/samples/printing/printing.rc b/samples/printing/printing.rc deleted file mode 100644 index 7655c62a4c..0000000000 --- a/samples/printing/printing.rc +++ /dev/null @@ -1,3 +0,0 @@ -mondrian ICON "mondrian.ico" -#include "wx/msw/wx.rc" - diff --git a/samples/regtest/key1.ico b/samples/regtest/key1.ico deleted file mode 100644 index 57a5209acb..0000000000 Binary files a/samples/regtest/key1.ico and /dev/null differ diff --git a/samples/regtest/key2.ico b/samples/regtest/key2.ico deleted file mode 100644 index 082ff47291..0000000000 Binary files a/samples/regtest/key2.ico and /dev/null differ diff --git a/samples/regtest/key3.ico b/samples/regtest/key3.ico deleted file mode 100644 index 0cbb4c3360..0000000000 Binary files a/samples/regtest/key3.ico and /dev/null differ diff --git a/samples/regtest/makefile.g95 b/samples/regtest/makefile.g95 deleted file mode 100644 index 5dc5b47810..0000000000 --- a/samples/regtest/makefile.g95 +++ /dev/null @@ -1,37 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for regtest example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/regtest.$(OBJSUFF) $(OBJDIR)/regtest_resources.$(OBJSUFF) - -all: $(OBJDIR) regtest$(GUISUFFIX)$(EXESUFF) - -wx: - -$(OBJDIR): - mkdir $(OBJDIR) - -regtest$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o regtest$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/regtest.$(OBJSUFF): regtest.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ regtest.$(SRCSUFF) - -$(OBJDIR)/regtest_resources.o: regtest.rc - $(RESCOMP) -i regtest.rc -o $(OBJDIR)/regtest_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) regtest$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/regtest/makefile.nt b/samples/regtest/makefile.nt deleted file mode 100644 index df589af4ee..0000000000 --- a/samples/regtest/makefile.nt +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds regtest example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\regtest -PROGRAM=regtest - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/regtest/registry.ico b/samples/regtest/registry.ico deleted file mode 100644 index 3ebfa3ace3..0000000000 Binary files a/samples/regtest/registry.ico and /dev/null differ diff --git a/samples/regtest/regtest.cpp b/samples/regtest/regtest.cpp deleted file mode 100644 index 4f3eb6ee1f..0000000000 --- a/samples/regtest/regtest.cpp +++ /dev/null @@ -1,840 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: registry.cpp -// Purpose: wxRegKey class demo -// Author: Vadim Zeitlin -// Modified by: -// Created: 03.04.98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif - -#ifndef WX_PRECOMP - #include "wx/wx.h" -#endif - -#include "wx/log.h" -#include "wx/treectrl.h" -#include "wx/msw/registry.h" - -// ---------------------------------------------------------------------------- -// application type -// ---------------------------------------------------------------------------- -class RegApp : public wxApp -{ -public: - bool OnInit(void); -}; - -// ---------------------------------------------------------------------------- -// image list with registry icons -// ---------------------------------------------------------------------------- -class RegImageList : public wxImageList -{ -public: - enum Icon - { - Root, - ClosedKey, - OpenedKey, - TextValue, - BinaryValue, - }; - - RegImageList(); -}; - -// array of children of the node -struct TreeNode; -WX_DEFINE_ARRAY(TreeNode *, TreeChildren); - -// ---------------------------------------------------------------------------- -// our control -// ---------------------------------------------------------------------------- -class RegTreeCtrl : public wxTreeCtrl -{ -public: - // ctor & dtor - RegTreeCtrl(wxWindow *parent, wxWindowID id); - virtual ~RegTreeCtrl(); - - // notifications - void OnDeleteItem (wxTreeEvent& event); - void OnItemExpanding(wxTreeEvent& event); - void OnSelChanged (wxTreeEvent& event); - - void OnRightClick (wxMouseEvent& event); - void OnChar (wxKeyEvent& event); - - // forwarded notifications (by the frame) - void OnMenuTest(); - - // operations - void DeleteSelected(); - void CreateNewKey(const wxString& strName); - void CreateNewTextValue(const wxString& strName); - void CreateNewBinaryValue(const wxString& strName); - - // information - bool IsKeySelected() const; - - DECLARE_EVENT_TABLE(); - -private: - - // structure describing a registry key/value - struct TreeNode - { - RegTreeCtrl *m_pTree; // must be !NULL - TreeNode *m_pParent; // NULL only for the root node - long m_id; // the id of the tree control item - wxString m_strName; // name of the key/value - TreeChildren m_aChildren; // array of subkeys/values - bool m_bKey; // key or value? - wxRegKey *m_pKey; // only may be !NULL if m_bKey == true - long m_lDummy; // dummy subkey (to make expansion possible) - - // ctor - TreeNode() { m_lDummy = 0; } - - // trivial accessors - long Id() const { return m_id; } - bool IsRoot() const { return m_pParent == NULL; } - bool IsKey() const { return m_bKey; } - TreeNode *Parent() const { return m_pParent; } - - // notifications - bool OnExpand(); - void OnCollapse(); - - // operations - void Refresh() { OnCollapse(); OnExpand(); } - void AddDummy(); - void DestroyChildren(); - const char *FullName() const; - - // get the associated key: make sure the pointer is !NULL - wxRegKey& Key() { if ( !m_pKey ) OnExpand(); return *m_pKey; } - - // dtor deletes all children - ~TreeNode(); - }; - - wxMenu *m_pMenuPopup; - TreeNode *m_pRoot; - wxImageList *m_imageList; - - TreeNode *GetNode(const wxTreeEvent& event) - { return (TreeNode *)GetItemData(event.m_item.m_itemId); } - -public: - // create a new node and insert it to the tree - TreeNode *InsertNewTreeNode(TreeNode *pParent, - const wxString& strName, - int idImage = RegImageList::ClosedKey, - const wxString *pstrValue = NULL); - // add standard registry keys - void AddStdKeys(); -}; - -// ---------------------------------------------------------------------------- -// the main window of our application -// ---------------------------------------------------------------------------- -class RegFrame : public wxFrame -{ -public: - // ctor & dtor - RegFrame(wxFrame *parent, char *title, int x, int y, int w, int h); - virtual ~RegFrame(void); - - // callbacks - void OnQuit (wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); - void OnTest (wxCommandEvent& event); - - void OnExpand (wxCommandEvent& event); - void OnCollapse(wxCommandEvent& event); - void OnToggle (wxCommandEvent& event); - - void OnDelete (wxCommandEvent& event); - void OnNewKey (wxCommandEvent& event); - void OnNewText (wxCommandEvent& event); - void OnNewBinary(wxCommandEvent& event); - - bool OnClose () { return TRUE; } - - DECLARE_EVENT_TABLE(); - -private: - RegTreeCtrl *m_treeCtrl; -}; - -// ---------------------------------------------------------------------------- -// various ids -// ---------------------------------------------------------------------------- - -enum -{ - Menu_Quit = 100, - Menu_About, - Menu_Test, - Menu_Expand, - Menu_Collapse, - Menu_Toggle, - Menu_New, - Menu_NewKey, - Menu_NewText, - Menu_NewBinary, - Menu_Delete, - - Ctrl_RegTree = 200, -}; - -// ---------------------------------------------------------------------------- -// event tables -// ---------------------------------------------------------------------------- - -BEGIN_EVENT_TABLE(RegFrame, wxFrame) - EVT_MENU(Menu_Test, RegFrame::OnTest) - EVT_MENU(Menu_About, RegFrame::OnAbout) - EVT_MENU(Menu_Quit, RegFrame::OnQuit) - EVT_MENU(Menu_Expand, RegFrame::OnExpand) - EVT_MENU(Menu_Collapse, RegFrame::OnCollapse) - EVT_MENU(Menu_Toggle, RegFrame::OnToggle) - EVT_MENU(Menu_Delete, RegFrame::OnDelete) - EVT_MENU(Menu_NewKey, RegFrame::OnNewKey) - EVT_MENU(Menu_NewText, RegFrame::OnNewText) - EVT_MENU(Menu_NewBinary,RegFrame::OnNewBinary) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(RegTreeCtrl, wxTreeCtrl) - EVT_TREE_DELETE_ITEM (Ctrl_RegTree, RegTreeCtrl::OnDeleteItem) - EVT_TREE_ITEM_EXPANDING(Ctrl_RegTree, RegTreeCtrl::OnItemExpanding) - EVT_TREE_SEL_CHANGED (Ctrl_RegTree, RegTreeCtrl::OnSelChanged) - - EVT_CHAR (RegTreeCtrl::OnChar) - EVT_RIGHT_DOWN(RegTreeCtrl::OnRightClick) -END_EVENT_TABLE() - -// ============================================================================ -// implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// global functions -// ---------------------------------------------------------------------------- - -// create the "registry operations" menu -wxMenu *CreateRegistryMenu() -{ - wxMenu *pMenuNew = new wxMenu; - pMenuNew->Append(Menu_NewKey, "&Key", "Create a new key"); - pMenuNew->AppendSeparator(); - pMenuNew->Append(Menu_NewText, "&Text value", "Create a new text value"); - pMenuNew->Append(Menu_NewBinary, "&Binary value", "Create a new binary value"); - - wxMenu *pMenuReg = new wxMenu; - pMenuReg->Append(Menu_New, "&New", pMenuNew); - pMenuReg->Append(Menu_Delete, "&Delete...", "Delete selected key/value"); - pMenuReg->AppendSeparator(); - pMenuReg->Append(Menu_Expand, "&Expand", "Expand current key"); - pMenuReg->Append(Menu_Collapse, "&Collapse", "Collapse current key"); - pMenuReg->Append(Menu_Toggle, "&Toggle", "Toggle current key"); - - return pMenuReg; -} - -// ---------------------------------------------------------------------------- -// application class -// ---------------------------------------------------------------------------- -IMPLEMENT_APP(RegApp) - -// `Main program' equivalent, creating windows and returning main app frame -bool RegApp::OnInit() -{ - // create the main frame window and show it - RegFrame *frame = new RegFrame(NULL, "wxRegKey Test", 50, 50, 600, 350); - frame->Show(true); - - SetTopWindow(frame); - - return true; -} - -// ---------------------------------------------------------------------------- -// RegFrame -// ---------------------------------------------------------------------------- - -RegFrame::RegFrame(wxFrame *parent, char *title, int x, int y, int w, int h) - : wxFrame(parent, -1, title, wxPoint(x, y), wxSize(w, h)) -{ - // this reduces flicker effects - SetBackgroundColour(wxColour(255, 255, 255)); - - // set the icon - // ------------ - SetIcon(wxIcon("app_icon")); - - // create menu - // ----------- - wxMenu *pMenuFile = new wxMenu; - pMenuFile->Append(Menu_Test, "Te&st", "Test key creation"); - pMenuFile->AppendSeparator(); - pMenuFile->Append(Menu_About, "&About...", "Show an extraordinarly beautiful dialog"); - pMenuFile->AppendSeparator(); - pMenuFile->Append(Menu_Quit, "E&xit", "Quit this program"); - - wxMenuBar *pMenu = new wxMenuBar; - pMenu->Append(pMenuFile, "&File"); - pMenu->Append(CreateRegistryMenu(), "&Registry"); - SetMenuBar(pMenu); - - // create child controls - // --------------------- - m_treeCtrl = new RegTreeCtrl(this, Ctrl_RegTree); - - // create the status line - // ---------------------- - int aWidths[2]; - aWidths[0] = 200; - aWidths[1] = -1; - CreateStatusBar(2); - SetStatusWidths(2, aWidths); -} - -RegFrame::~RegFrame(void) -{ -} - -void RegFrame::OnQuit(wxCommandEvent& event) -{ - Close(TRUE); -} - -void RegFrame::OnAbout(wxCommandEvent& event) -{ - wxMessageDialog dialog(this, "wxRegistry sample\n(c) 1998 Vadim Zeitlin", - "About wxRegistry", wxOK); - - dialog.ShowModal(); -} - -void RegFrame::OnTest(wxCommandEvent& event) -{ - m_treeCtrl->OnMenuTest(); -} - -void RegFrame::OnExpand(wxCommandEvent& event) -{ - m_treeCtrl->ExpandItem(m_treeCtrl->GetSelection(), wxTREE_EXPAND_EXPAND); -} - -void RegFrame::OnCollapse(wxCommandEvent& event) -{ - m_treeCtrl->ExpandItem(m_treeCtrl->GetSelection(), wxTREE_EXPAND_COLLAPSE); -} - -void RegFrame::OnToggle(wxCommandEvent& event) -{ - m_treeCtrl->ExpandItem(m_treeCtrl->GetSelection(), wxTREE_EXPAND_TOGGLE); -} - -void RegFrame::OnDelete(wxCommandEvent& event) -{ - m_treeCtrl->DeleteSelected(); -} - -void RegFrame::OnNewKey(wxCommandEvent& event) -{ - if ( m_treeCtrl->IsKeySelected() ) { - m_treeCtrl->CreateNewKey( - wxGetTextFromUser("Enter the name of the new key")); - } -} - -void RegFrame::OnNewText(wxCommandEvent& event) -{ - if ( m_treeCtrl->IsKeySelected() ) { - m_treeCtrl->CreateNewTextValue( - wxGetTextFromUser("Enter the name for the new text value")); - } -} - -void RegFrame::OnNewBinary(wxCommandEvent& event) -{ - if ( m_treeCtrl->IsKeySelected() ) { - m_treeCtrl->CreateNewBinaryValue( - wxGetTextFromUser("Enter the name for the new binary value")); - } -} - -// ---------------------------------------------------------------------------- -// RegImageList -// ---------------------------------------------------------------------------- -RegImageList::RegImageList() : wxImageList(16, 16, TRUE) -{ - // should be in sync with enum RegImageList::RegIcon - static const char *aszIcons[] = { "key1","key2","key3","value1","value2" }; - wxString str = "icon_"; - for ( uint n = 0; n < WXSIZEOF(aszIcons); n++ ) { - Add(wxIcon(str + aszIcons[n], wxBITMAP_TYPE_ICO_RESOURCE)); - } -} - -// ---------------------------------------------------------------------------- -// RegTreeCtrl -// ---------------------------------------------------------------------------- - -// create a new tree item and insert it into the tree -RegTreeCtrl::TreeNode *RegTreeCtrl::InsertNewTreeNode(TreeNode *pParent, - const wxString& strName, - int idImage, - const wxString *pstrValue) -{ - // create new item & insert it - TreeNode *pNewNode = new TreeNode; - pNewNode->m_pTree = this; - pNewNode->m_pParent = pParent; - pNewNode->m_strName = strName; - pNewNode->m_bKey = pstrValue == NULL; - pNewNode->m_pKey = NULL; - pNewNode->m_id = InsertItem(pParent ? pParent->m_id : 0, - pNewNode->IsKey() ? strName : *pstrValue, - idImage); - - wxASSERT_MSG( pNewNode->m_id, "can't create tree control item!"); - - // save the pointer in the item - if ( !SetItemData(pNewNode->m_id, (long)pNewNode) ) { - wxFAIL_MSG("can't store item's data in tree control!"); - } - - // add it to the list of parent's children - if ( pParent != NULL ) { - pParent->m_aChildren.Add(pNewNode); - } - - // force the [+] button (@@@ not very elegant...) - if ( pNewNode->IsKey() ) - pNewNode->AddDummy(); - - return pNewNode; -} - -RegTreeCtrl::RegTreeCtrl(wxWindow *parent, wxWindowID id) - : wxTreeCtrl(parent, id, wxDefaultPosition, wxDefaultSize, - wxTR_HAS_BUTTONS | wxSUNKEN_BORDER) -{ - // create the image list - // --------------------- - m_imageList = new RegImageList; - SetImageList(m_imageList, wxIMAGE_LIST_NORMAL); - - // create root keys - // ---------------- - m_pRoot = InsertNewTreeNode(NULL, "Registry Root", RegImageList::Root); - - // create popup menu - // ----------------- - m_pMenuPopup = CreateRegistryMenu(); -} - -RegTreeCtrl::~RegTreeCtrl() -{ - delete m_pMenuPopup; - delete m_pRoot; - delete m_imageList; -} - -void RegTreeCtrl::AddStdKeys() -{ - for ( uint ui = 0; ui < wxRegKey::nStdKeys; ui++ ) { - InsertNewTreeNode(m_pRoot, wxRegKey::GetStdKeyName(ui)); - } -} - -// ---------------------------------------------------------------------------- -// notifications -// ---------------------------------------------------------------------------- - -void RegTreeCtrl::OnRightClick(wxMouseEvent& event) -{ - int iFlags; - long lId = HitTest(wxPoint(event.GetX(), event.GetY()), iFlags); - if ( iFlags & wxTREE_HITTEST_ONITEMLABEL ) { - // popup menu only if an item was clicked - wxASSERT( lId != 0 ); - SelectItem(lId); - PopupMenu(m_pMenuPopup, event.GetX(), event.GetY()); - } -} - - -void RegTreeCtrl::OnDeleteItem(wxTreeEvent& event) -{ -} - -// test the key creation functions -void RegTreeCtrl::OnMenuTest() -{ - long lId = GetSelection(); - TreeNode *pNode = (TreeNode *)GetItemData(lId); - - wxCHECK_RET( pNode != NULL, "tree item without data?" ); - - if ( pNode->IsRoot() ) { - wxLogError("Can't create a subkey under the root key."); - return; - } - if ( !pNode->IsKey() ) { - wxLogError("Can't create a subkey under a value!"); - return; - } - - wxRegKey key1(pNode->Key(), "key1"); - if ( key1.Create() ) { - wxRegKey key2a(key1, "key2a"), key2b(key1, "key2b"); - if ( key2a.Create() && key2b.Create() ) { - // put some values under the newly created keys - key1.SetValue("first_term", "10"); - key1.SetValue("second_term", "7"); - key2a = "this is the unnamed value"; - key2b.SetValue("sum", 17); - - // refresh tree - pNode->Refresh(); - wxLogStatus("Test keys successfully added."); - return; - } - } - - wxLogError("Creation of test keys failed."); -} - -void RegTreeCtrl::OnChar(wxKeyEvent& event) -{ - if ( event.KeyCode() == WXK_DELETE ) - DeleteSelected(); - else - wxTreeCtrl::OnChar(event); -} - -void RegTreeCtrl::OnSelChanged(wxTreeEvent& event) -{ - wxFrame *pFrame = (wxFrame *)(wxWindow::GetParent()); - pFrame->SetStatusText(GetNode(event)->FullName(), 1); -} - -void RegTreeCtrl::OnItemExpanding(wxTreeEvent& event) -{ - TreeNode *pNode = GetNode(event); - bool bExpanding = event.m_code == wxTREE_EXPAND_EXPAND; - - // expansion might take some time - wxSetCursor(*wxHOURGLASS_CURSOR); - wxLogStatus("Working..."); - wxYield(); // to give the status line a chance to refresh itself - - if ( pNode->IsKey() ) { - if ( bExpanding ) { - // expanding: add subkeys/values - if ( !pNode->OnExpand() ) - return; - } - else { - // collapsing: clean up - pNode->OnCollapse(); - } - - // change icon for non root key - if ( !pNode->IsRoot() ) { - int idIcon = bExpanding ? RegImageList::OpenedKey - : RegImageList::ClosedKey; - SetItemImage(pNode->Id(), idIcon, idIcon); - } - } - - wxLogStatus("Ok"); - wxSetCursor(*wxSTANDARD_CURSOR); -} - -// ---------------------------------------------------------------------------- -// TreeNode implementation -// ---------------------------------------------------------------------------- -bool RegTreeCtrl::TreeNode::OnExpand() -{ - // remove dummy item - if ( m_lDummy != 0 ) { - m_pTree->DeleteItem(m_lDummy); - m_lDummy = 0; - } - else { - // we've been already expanded - return TRUE; - } - - if ( IsRoot() ) { - // we're the root key - m_pTree->AddStdKeys(); - return true; - } - - if ( Parent()->IsRoot() ) { - // we're a standard key - m_pKey = new wxRegKey(m_strName); - } - else { - // we're a normal key - m_pKey = new wxRegKey(*(Parent()->m_pKey), m_strName); - } - - if ( !m_pKey->Open() ) { - wxLogError("The key '%s' can't be opened.", FullName()); - return false; - } - - // enumeration variables - long l; - wxString str; - bool bCont; - - // enumerate all subkeys - bCont = m_pKey->GetFirstKey(str, l); - while ( bCont ) { - m_pTree->InsertNewTreeNode(this, str, RegImageList::ClosedKey); - bCont = m_pKey->GetNextKey(str, l); - } - - // enumerate all values - bCont = m_pKey->GetFirstValue(str, l); - while ( bCont ) { - wxString strItem; - if (str.IsEmpty()) - strItem = ""; - else - strItem = str; - strItem += " = "; - - // determine the appropriate icon - RegImageList::Icon icon; - switch ( m_pKey->GetValueType(str) ) { - case wxRegKey::Type_String: - case wxRegKey::Type_Expand_String: - case wxRegKey::Type_Multi_String: - { - wxString strValue; - icon = RegImageList::TextValue; - m_pKey->QueryValue(str, strValue); - strItem += strValue; - } - break; - - case wxRegKey::Type_None: - // @@ handle the error... - icon = RegImageList::BinaryValue; - break; - - case wxRegKey::Type_Dword: - { - char szBuf[128]; - long l; - m_pKey->QueryValue(str, &l); - sprintf(szBuf, "%lx", l); - strItem += szBuf; - } - - // fall through - - default: - icon = RegImageList::BinaryValue; - } - - m_pTree->InsertNewTreeNode(this, str, icon, &strItem); - bCont = m_pKey->GetNextValue(str, l); - } - - return true; -} - -void RegTreeCtrl::TreeNode::OnCollapse() -{ - bool bHasChildren = !m_aChildren.IsEmpty(); - DestroyChildren(); - if ( bHasChildren ) - AddDummy(); - else - m_lDummy = 0; - - delete m_pKey; - m_pKey = NULL; -} - -void RegTreeCtrl::TreeNode::AddDummy() -{ - // insert dummy item forcing appearance of [+] button - m_lDummy = m_pTree->InsertItem(Id(), ""); -} - -void RegTreeCtrl::TreeNode::DestroyChildren() -{ - // destroy all children - uint nCount = m_aChildren.Count(); - for ( uint n = 0; n < nCount; n++ ) { - long lId = m_aChildren[n]->Id(); - delete m_aChildren[n]; - m_pTree->DeleteItem(lId); - } - - m_aChildren.Empty(); -} - -RegTreeCtrl::TreeNode::~TreeNode() -{ - DestroyChildren(); - - delete m_pKey; -} - -const char *RegTreeCtrl::TreeNode::FullName() const -{ - static wxString s_strName; - - if ( IsRoot() ) { - return "Registry Root"; - } - else { - // our own registry key might not (yet) exist or we might be a value, - // so just use the parent's and concatenate - s_strName = Parent()->FullName(); - s_strName << '\\' << m_strName; - - return s_strName; - } -} - -// ---------------------------------------------------------------------------- -// operations on RegTreeCtrl -// ---------------------------------------------------------------------------- - -void RegTreeCtrl::DeleteSelected() -{ - long lCurrent = GetSelection(), - lParent = GetParent(lCurrent); - - if ( lParent == 0 ) { - wxLogError("Can't delete root key."); - return; - } - - TreeNode *pCurrent = (TreeNode *)GetItemData(lCurrent), - *pParent = (TreeNode *)GetItemData(lParent); - - wxCHECK_RET( pCurrent && pParent, "either node or parent without data?" ); - - if ( pParent->IsRoot() ) { - wxLogError("Can't delete standard key."); - return; - } - - if ( pCurrent->IsKey() ) { - if ( wxMessageBox("Do you really want to delete this key?", - "Confirmation", - wxICON_QUESTION | wxYES_NO | wxCANCEL, this) != wxYES ) { - return; - } - - // must close key before deleting it - pCurrent->OnCollapse(); - - if ( pParent->Key().DeleteKey(pCurrent->m_strName) ) - pParent->Refresh(); - } - else { - if ( wxMessageBox("Do you really want to delete this value?", - "Confirmation", - wxICON_QUESTION | wxYES_NO | wxCANCEL, this) != wxYES ) { - return; - } - - if ( pParent->Key().DeleteValue(pCurrent->m_strName) ) - pParent->Refresh(); - } -} - -void RegTreeCtrl::CreateNewKey(const wxString& strName) -{ - long lCurrent = GetSelection(); - TreeNode *pCurrent = (TreeNode *)GetItemData(lCurrent); - - wxCHECK_RET( pCurrent != NULL, "node without data?" ); - - wxASSERT( pCurrent->IsKey() ); // check must have been done before - - if ( pCurrent->IsRoot() ) { - wxLogError("Can't create a new key under the root key."); - return; - } - - wxRegKey key(pCurrent->Key(), strName); - if ( key.Create() ) - pCurrent->Refresh(); -} - -void RegTreeCtrl::CreateNewTextValue(const wxString& strName) -{ - long lCurrent = GetSelection(); - TreeNode *pCurrent = (TreeNode *)GetItemData(lCurrent); - - wxCHECK_RET( pCurrent != NULL, "node without data?" ); - - wxASSERT( pCurrent->IsKey() ); // check must have been done before - - if ( pCurrent->IsRoot() ) { - wxLogError("Can't create a new value under the root key."); - return; - } - - if ( pCurrent->Key().SetValue(strName, "") ) - pCurrent->Refresh(); -} - -void RegTreeCtrl::CreateNewBinaryValue(const wxString& strName) -{ - long lCurrent = GetSelection(); - TreeNode *pCurrent = (TreeNode *)GetItemData(lCurrent); - - wxCHECK_RET( pCurrent != NULL, "node without data?" ); - - wxASSERT( pCurrent->IsKey() ); // check must have been done before - - if ( pCurrent->IsRoot() ) { - wxLogError("Can't create a new value under the root key."); - return; - } - - if ( pCurrent->Key().SetValue(strName, 0) ) - pCurrent->Refresh(); -} - -bool RegTreeCtrl::IsKeySelected() const -{ - long lCurrent = GetSelection(); - TreeNode *pCurrent = (TreeNode *)GetItemData(lCurrent); - - wxCHECK( pCurrent != NULL, false ); - - return pCurrent->IsKey(); -} \ No newline at end of file diff --git a/samples/regtest/regtest.rc b/samples/regtest/regtest.rc deleted file mode 100644 index 8d688bba6f..0000000000 --- a/samples/regtest/regtest.rc +++ /dev/null @@ -1,9 +0,0 @@ -#include "wx/msw/wx.rc" - -app_icon ICON "registry.ico" -icon_key1 ICON "key1.ico" -icon_key2 ICON "key2.ico" -icon_key3 ICON "key3.ico" -icon_value1 ICON "value1.ico" -icon_value2 ICON "value2.ico" - diff --git a/samples/regtest/value1.ico b/samples/regtest/value1.ico deleted file mode 100644 index d03a5d0762..0000000000 Binary files a/samples/regtest/value1.ico and /dev/null differ diff --git a/samples/regtest/value2.ico b/samples/regtest/value2.ico deleted file mode 100644 index 343fd1aaf0..0000000000 Binary files a/samples/regtest/value2.ico and /dev/null differ diff --git a/samples/resource/.cvsignore b/samples/resource/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/resource/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/resource/Makefile b/samples/resource/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/resource/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/resource/Makefile.in b/samples/resource/Makefile.in deleted file mode 100644 index c0251fd193..0000000000 --- a/samples/resource/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# WXXT base directory -WXBASEDIR=@WXBASEDIR@ - -# set the OS type for compilation -OS=@OS@ -# compile a library only -RULE=bin - -# define library name -BIN_TARGET=resource -# define library sources -BIN_SRC=\ -resource.cpp - -#define library objects -BIN_OBJ=\ -resource.o - -# additional things needed to link -BIN_LINK= - -# additional things needed to compile -ADD_COMPILE= - -# include the definitions now -include ../../../template.mak diff --git a/samples/resource/dialog1.wxr b/samples/resource/dialog1.wxr deleted file mode 100644 index afc4a46524..0000000000 --- a/samples/resource/dialog1.wxr +++ /dev/null @@ -1,27 +0,0 @@ -static char *dialog1 = "dialog(name = 'dialog1',\ - style = 'wxCAPTION | wxDEFAULT_DIALOG_STYLE',\ - title = 'Test dialog box',\ - x = 312, y = 234, width = 400, height = 300,\ - modal = 0,\ - label_font = [10, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0],\ - button_font = [10, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0],\ - control = [wxGroupBox, 'Groupbox', '0', 'group6', 5, 4, 380, 262,\ - [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\ - control = [wxRadioBox, 'Radiobox', 'wxHSCROLL | wxVERTICAL | wxVERTICAL_LABEL', 'radiobox2', 24, 23, 111, 63, ['One', 'Two', 'Three', 'Four'], 2,\ - [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0],\ - [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\ - control = [wxMultiText, 'Multitext', 'wxTE_MULTILINE', 'multitext3', 156, 126, 200, 70, 'wxWindows is a multi-platform, GUI toolkit.',\ - [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0],\ - [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\ - control = [wxListBox, 'Listbox', 'wxVERTICAL_LABEL', 'listbox4', 156, 26, 200, 80, ['Apples', 'Pears', 'Bananas'], 'wxSINGLE',\ - [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0],\ - [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\ - control = [1, wxButton, 'Press me', '0', 'button7', 33, 130, 84, 34,\ - [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\ - control = [2, wxButton, 'Cancel', '0', 'button8', 34, 181, 84, 34,\ - [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\ - control = [wxCheckBox, 'Checkbox', '0', 'checkbox9', 154, 220, 68, 14, 0,\ - [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\ - control = [wxMessage, 'My message', '0', 'message10', 257, 218, 76, 13,\ - [11, 'wxSWISS', 'wxITALIC', 'wxBOLD', 0]])."; - diff --git a/samples/resource/makefile.b32 b/samples/resource/makefile.b32 deleted file mode 100644 index 3807df095d..0000000000 --- a/samples/resource/makefile.b32 +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.b32 -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds 32bit resource example. - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 - -TARGET=resource - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = resource.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -resource.obj: resource.$(SRCSUFF) resource.h dialog1.wxr - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - - diff --git a/samples/resource/makefile.bcc b/samples/resource/makefile.bcc deleted file mode 100644 index 19ad9c2a44..0000000000 --- a/samples/resource/makefile.bcc +++ /dev/null @@ -1,74 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds resource example (DOS). - -!if "$(BCCDIR)" == "" -!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 -!endif - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -WXDIR = $(WXWIN) -THISDIR = $(WXDIR)\samples\resource -WXLIB = $(WXDIR)\lib\wx.lib - -LIBS=$(WXLIB) mathwl cwl import -INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw -CFG=$(WXDIR)\src\wxwin.cfg - -!ifndef FINAL -FINAL=0 -!endif - -!if "$(FINAL)" == "0" -LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -O2 -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -HEADERS = resource.h -SOURCES = resource.cc -OBJECTS = resource.obj - -resource: resource.exe - -all: resource.exe - -resource.exe: $(WXLIB) resource.obj resource.def resource.res - tlink $(LINKFLAGS) @&&! -c0wl.obj resource.obj -resource -nul -$(LIBS) -resource.def -! - rc -30 -K resource.res - -.cc.obj: - bcc $(CPPFLAGS) -c {$< } - -resource.obj: resource.cc - -resource.res : resource.rc $(WXDIR)\include\msw\wx.rc - rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa resource - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws diff --git a/samples/resource/makefile.dos b/samples/resource/makefile.dos deleted file mode 100644 index 6096ca810c..0000000000 --- a/samples/resource/makefile.dos +++ /dev/null @@ -1,86 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds resource example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info. - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\resource -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) oldnames libw llibcew commdlg ddeml shell mmsystem -INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw -DUMMY=$(WXDIR)\src\msw\dummy.obj - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!ifndef FINAL -FINAL=0 -!endif - -PRECOMP = /YuWX_PREC.H /Fp$(WXDIR)\src\msw\wx.pch - -!if "$(FINAL)" == "0" -CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) $(PRECOMP) /Dwx_msw -LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:256 -!else -CPPFLAGS=/AL /W3 /G2sw $(INC) /Ox $(PRECOMP) /Dwx_msw -LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:256 -!endif - -HEADERS = resource.h -SOURCES = resource.$(SRCSUFF) -OBJECTS = resource.obj - -resource: resource.exe - -all: wx resource.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -resource.exe: $(DUMMY) $(WXLIB) resource.obj resource.def resource.res - link $(LINKFLAGS) @<< -$(DUMMY) resource.obj, -resource, -NUL, -$(LIBS), -resource.def -; -<< - rc -31 -K resource.res - -resource.obj: resource.h resource.$(SRCSUFF) dialog1.wxr $(DUMMY) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -resource.res : resource.rc $(WXDIR)\include\msw\wx.rc - rc -r /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa resource - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/resource/makefile.g95 b/samples/resource/makefile.g95 deleted file mode 100644 index d9ad8d610a..0000000000 --- a/samples/resource/makefile.g95 +++ /dev/null @@ -1,36 +0,0 @@ -# -# File: makefile.g95 -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for resource example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS=$(OBJDIR)/resource.$(OBJSUFF) $(OBJDIR)/resource_resources.$(OBJSUFF) - -all: $(OBJDIR) resource.exe - -$(OBJDIR): - mkdir $(OBJDIR) - -$(OBJDIR)/resource.$(OBJSUFF): resource.$(SRCSUFF) resource.h - $(CC) -c $(CPPFLAGS) -o $@ resource.$(SRCSUFF) - -resource.exe: $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o resource$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/resource_resources.o: resource.rc - $(RESCOMP) -i resource.rc -o $(OBJDIR)/resource_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) resource$(GUISUFFIX).exe core *.rsc *.res - diff --git a/samples/resource/makefile.nt b/samples/resource/makefile.nt deleted file mode 100644 index 8d10573010..0000000000 --- a/samples/resource/makefile.nt +++ /dev/null @@ -1,63 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds resource example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\resource -PROGRAM=resource - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).h $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc dialog1.wxr menu1.wxr - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.sbr - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb - diff --git a/samples/resource/makefile.sc b/samples/resource/makefile.sc deleted file mode 100644 index 235c8f8bc1..0000000000 --- a/samples/resource/makefile.sc +++ /dev/null @@ -1,35 +0,0 @@ -# Symantec C++ makefile for hello example -# NOTE that peripheral libraries are now dealt in main wxWindows makefile. - -WXDIR = $(WXWIN) -WXLIB = $(WXDIR)\lib\wx.lib -INCDIR = $(WXDIR)\include -MSWINC = $(INCDIR)\msw -BASEINC = $(INCDIR)\base - -CC=sc -RC=rc -CFLAGS = -o -ml -W -Dwx_msw -LDFLAGS = -ml -W - -INCLUDE=$(BASEINC);$(MSWINC) - -LIBS=$(WXLIB) libw.lib commdlg.lib shell.lib - -.cc.obj: - *$(CC) -c $(CFLAGS) -I$(INCLUDE) $< - -.rc.res: - *$(RC) -r -I$(INCLUDE) $< - -hello.exe: hello.obj hello.def hello.res - *$(CC) $(LDFLAGS) -o$@ hello.obj hello.def $(LIBS) - *$(RC) -k hello.res - -clean: - -del *.obj - -del *.exe - -del *.res - -del *.map - -del *.rws - diff --git a/samples/resource/makefile.unx b/samples/resource/makefile.unx deleted file mode 100644 index 1967b5e242..0000000000 --- a/samples/resource/makefile.unx +++ /dev/null @@ -1,76 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for resource example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/make.env - -OBJECTS=$(OBJDIR)/resource.$(OBJSUFF) - -.SUFFIXES: - -all: $(OBJDIR) resource$(GUISUFFIX) - -wxmotif: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif - -wxxview: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview - -wxhp: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx hp - -# For SGI, include -lPW on your LDLIBS -motif: wxmotif - $(MAKE) -f makefile.unx all GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' WXLIB=$(WXDIR)/lib/libwx_motif.a OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK= - -xview: wxxview - $(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' LDLIBS='$(XVIEWLDLIBS)' - -hp: wxhp - $(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC OPT='' DEBUG='$(DEBUG)' WARN='-w' \ - XINCLUDE='$(HPXINCLUDE)' \ - XLIB='$(HPXLIB)' \ - XVIEW_LINK='' \ - LDLIBS='$(HPLDLIBS)' - -$(OBJDIR): - mkdir $(OBJDIR) - -resource$(GUISUFFIX): $(OBJDIR)/resource.$(OBJSUFF) $(WXLIB) - $(CC) $(LDFLAGS) -o resource$(GUISUFFIX) $(OBJDIR)/resource.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS) - -$(OBJDIR)/resource.$(OBJSUFF): resource.$(SRCSUFF) resource.h - $(CC) -c $(CPPFLAGS) -o $@ resource.$(SRCSUFF) - -clean_motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany - -clean_ol: - $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany - -clean_hp: - $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany - -cleanany: - rm -f $(OBJECTS) resource$(GUISUFFIX) core - -wxclean_ol: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_ol - -wxclean_motif: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_motif - -wxclean_hp: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_hp - diff --git a/samples/resource/makefile.vms b/samples/resource/makefile.vms deleted file mode 100644 index 1ef109fbeb..0000000000 --- a/samples/resource/makefile.vms +++ /dev/null @@ -1,38 +0,0 @@ -#************************************************************************ -# Makefile for HELLO under VMS -# by Stefan Hammes -# (incomplete) update history: -# 11.04.95 -#************************************************************************ - -#************************************************************************ -# Definition section -# (cave: definitions and includes must begin with ',') -#************************************************************************ - -APPOPTS = -APPDEFS = -APPINCS = - -#************************************************************************ -# Module section -#************************************************************************ - -# Name of main module -MAIN = hello - -# Object modules of the application. -OBJS = hello.obj - -.include [--.src]makevms.env - -# main dependency -$(MAIN).exe : $(MAIN).$(OBJ) - $(LINK) $(LINKFLAGS) /exec=$(MAIN).exe $(MAIN).$(OBJ),$(WXLIB)/lib,$(OPTSFILE)/option - - purge *.exe - -#************************************************************************ -# Header file depedencies following -#************************************************************************ -hello.obj : hello.cc hello.h - diff --git a/samples/resource/makefile.wat b/samples/resource/makefile.wat deleted file mode 100644 index 0ad7f98a89..0000000000 --- a/samples/resource/makefile.wat +++ /dev/null @@ -1,42 +0,0 @@ -# -# Makefile for WATCOM -# -# Created by D.Chubraev, chubraev@iem.ee.ethz.ch -# 8 Nov 1994 -# - -WXDIR = ..\.. - -!include $(WXDIR)\src\makewat.env - -WXLIB = $(WXDIR)\lib -NAME = hello -LNK = $(name).lnk -OBJS = $(name).obj - -PRECOMP= - -all: $(name).exe - -$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib - wlink @$(LNK) - $(BINDCOMMAND) $(name).res - -$(name).res : $(name).rc $(WXDIR)\include\msw\wx.rc - $(RC) $(RESFLAGS1) $(name).rc - -$(LNK) : makefile.wat - %create $(LNK) - @%append $(LNK) debug all - @%append $(LNK) system $(LINKOPTION) - @%append $(LNK) $(MINDATA) - @%append $(LNK) $(MAXDATA) - @%append $(LNK) $(STACK) - @%append $(LNK) name $(name) - @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib - @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i - @for %i in ($(OBJS)) do @%append $(LNK) file %i - -clean: .SYMBOLIC - -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex - diff --git a/samples/resource/menu1.wxr b/samples/resource/menu1.wxr deleted file mode 100644 index 3536bb5a6c..0000000000 --- a/samples/resource/menu1.wxr +++ /dev/null @@ -1,13 +0,0 @@ - -static char *menu1 = "menu(name = 'menu1',\ - menu = \ - [\ - ['&File', 1, '', \ - ['&Dialog box test', 2, ''],\ - [],\ - ['&Exit', 4, '']\ - ],\ - ['&Help', 5, '', \ - ['&About', 6, '']\ - ]\ - ])."; diff --git a/samples/resource/resource.cpp b/samples/resource/resource.cpp deleted file mode 100644 index 4a981f9ba4..0000000000 --- a/samples/resource/resource.cpp +++ /dev/null @@ -1,192 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: resource.cpp -// Purpose: Dialog resource sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma implementation -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "wx/resource.h" - -#include -#include "resource.h" - -// If we wanted to demonstrate total platform independence, -// then we'd use the dynamic file loading form for all platforms. -// But this shows how to embed the wxWindows resources -// in the program code/executable for UNIX and Windows -// platforms. - -// If you have a Windows compiler that can cope with long strings, -// then you can always use the #include form for simplicity. - -// NOTE: Borland's brc32.exe resource compiler doesn't recognize -// the TEXT resource, for some reason, so either run-time file loading -// or file inclusion should be used. - -#if defined(__WXMSW__) && !defined(__BORLANDC__) && !defined(__GNUWIN32__) -// Under Windows, some compilers can't include -// a whole .wxr file. So we use a .rc user-defined resource -// instead. dialog1 will point to the whole .wxr 'file'. -static char *dialog1 = NULL; -static char *menu1 = NULL; -#else -// Other platforms should have sensible compilers that -// cope with long strings. -#include "dialog1.wxr" -#include "menu1.wxr" -#endif - -// Declare two frames -MyFrame *frame = (MyFrame *) NULL; - -IMPLEMENT_APP(MyApp) - -// Testing of ressources -MyApp::MyApp() -{ -} - -// The `main program' equivalent, creating the windows and returning the -// main frame -bool MyApp::OnInit(void) -{ -#if defined(__WXMSW__) && !defined(__BORLANDC__) - // Load the .wxr 'file' from a .rc resource, under Windows. - dialog1 = wxLoadUserResource("dialog1"); - menu1 = wxLoadUserResource("menu1"); - // All resources in the file (only one in this case) get parsed - // by this call. - wxResourceParseString(dialog1); - wxResourceParseString(menu1); -#else - // Simply parse the data pointed to by the variable dialog1. - // If there were several resources, there would be several - // variables, and this would need to be called several times. - wxResourceParseData(dialog1); - wxResourceParseData(menu1); -#endif - - // Create the main frame window - frame = new MyFrame((wxFrame *) NULL, -1, (char *) "wxWindows Resource Sample", wxPoint(0, 0), wxSize(300, 250)); - - // Give it a status line - frame->CreateStatusBar(2); - -/* - // Make a menubar - wxMenu *file_menu = new wxMenu; - - file_menu->Append(RESOURCE_TEST1, "&Dialog box test", "Test dialog box resource"); - file_menu->Append(RESOURCE_QUIT, "E&xit", "Quit program"); - - wxMenuBar *menu_bar = new wxMenuBar; - - menu_bar->Append(file_menu, "&File"); -*/ - - wxMenuBar *menu_bar = wxResourceCreateMenuBar("menu1"); - - // Associate the menu bar with the frame - frame->SetMenuBar(menu_bar); - - // Make a panel - frame->panel = new MyPanel(frame, -1, wxPoint(0, 0), wxSize(400, 400), 0, "MyMainFrame"); - frame->Show(TRUE); - - SetTopWindow(frame); - - return TRUE; -} - -BEGIN_EVENT_TABLE(MyPanel, wxPanel) - EVT_LEFT_DOWN( MyPanel::OnClick) -END_EVENT_TABLE() - -MyPanel::MyPanel( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - int style, const wxString &name ) : - wxPanel( parent, id, pos, size, style, name ) -{ -} - -void MyPanel::OnClick( wxMouseEvent &WXUNUSED(event) ) -{ - MyFrame *frame = (MyFrame*)(wxTheApp->GetTopWindow()); - wxCommandEvent event; - frame->OnTest1( event ); -} - - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit) - EVT_MENU(RESOURCE_TEST1, MyFrame::OnTest1) -END_EVENT_TABLE() - -// Define my frame constructor -MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size): - wxFrame(parent, id, title, pos, size) -{ - panel = (wxWindow *) NULL; -} - -void MyFrame::OnQuit( wxCommandEvent& WXUNUSED(event) ) -{ - Close(TRUE); -} - -void MyFrame::OnTest1(wxCommandEvent& WXUNUSED(event) ) -{ - MyDialog *dialog = new MyDialog; - if (dialog->LoadFromResource(this, "dialog1")) - { - wxTextCtrl *text = (wxTextCtrl *)wxFindWindowByName("multitext3", dialog); - if (text) - text->SetValue("wxWindows resource demo"); - dialog->SetModal(TRUE); - dialog->ShowModal(); - } - dialog->Close(TRUE); -} - -bool MyFrame::OnClose(void) -{ - Show(FALSE); - - return TRUE; -} - -BEGIN_EVENT_TABLE(MyDialog, wxDialog) - EVT_BUTTON(RESOURCE_OK, MyDialog::OnOk) - EVT_BUTTON(RESOURCE_CANCEL, MyDialog::OnCancel) -END_EVENT_TABLE() - - -void MyDialog::OnOk(wxCommandEvent& WXUNUSED(event) ) -{ - EndModal(RESOURCE_OK); -} - -void MyDialog::OnCancel(wxCommandEvent& WXUNUSED(event) ) -{ - EndModal(RESOURCE_CANCEL); -} - - diff --git a/samples/resource/resource.def b/samples/resource/resource.def deleted file mode 100644 index 49791b5e6c..0000000000 --- a/samples/resource/resource.def +++ /dev/null @@ -1,9 +0,0 @@ -NAME Resource -DESCRIPTION 'Resource' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 16192 - diff --git a/samples/resource/resource.h b/samples/resource/resource.h deleted file mode 100644 index 39c46068c9..0000000000 --- a/samples/resource/resource.h +++ /dev/null @@ -1,59 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: resource.h -// Purpose: Dialog resource sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma interface -#endif - -// Define a new application -class MyApp: public wxApp -{ - public: - MyApp(void) ; - bool OnInit(void); -}; - -class MyPanel: public wxPanel -{ - public: - MyPanel( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - int style, const wxString &name ); - void OnClick(wxMouseEvent &event); - - DECLARE_EVENT_TABLE() -}; - -class MyFrame: public wxFrame -{ - public: - wxWindow *panel; - MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size); - bool OnClose(void); - void OnQuit(wxCommandEvent& event); - void OnTest1(wxCommandEvent& event); - - DECLARE_EVENT_TABLE() -}; - -class MyDialog : public wxDialog -{ - public: - void OnOk(wxCommandEvent& event); - void OnCancel(wxCommandEvent& event); - - DECLARE_EVENT_TABLE() -}; - -#define RESOURCE_QUIT 4 -#define RESOURCE_TEST1 2 - -#define RESOURCE_OK 1 -#define RESOURCE_CANCEL 2 diff --git a/samples/resource/resource.rc b/samples/resource/resource.rc deleted file mode 100644 index 129260fd47..0000000000 --- a/samples/resource/resource.rc +++ /dev/null @@ -1,7 +0,0 @@ -#include "wx/msw/wx.rc" - -/* Comment out these lines for Borland C++ or GNU-WIN32 */ -dialog1 TEXT "dialog1.wxr" -menu1 TEXT "menu1.wxr" - - diff --git a/samples/splitter/.cvsignore b/samples/splitter/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/splitter/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/splitter/Makefile b/samples/splitter/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/splitter/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/splitter/Makefile.in b/samples/splitter/Makefile.in deleted file mode 100644 index 522773e6cb..0000000000 --- a/samples/splitter/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# WXXT base directory -WXBASEDIR=@WXBASEDIR@ - -# set the OS type for compilation -OS=@OS@ -# compile a library only -RULE=bin - -# define library name -BIN_TARGET=splitter -# 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 diff --git a/samples/splitter/makefile.b32 b/samples/splitter/makefile.b32 deleted file mode 100644 index 9fd8e32307..0000000000 --- a/samples/splitter/makefile.b32 +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds splitter example (DOS). - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXINC = $(WXDIR)\include\msw -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 - -TARGET=test - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = test.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -test.obj: test.$(SRCSUFF) - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - diff --git a/samples/splitter/makefile.g95 b/samples/splitter/makefile.g95 deleted file mode 100644 index 2ae60d6fc2..0000000000 --- a/samples/splitter/makefile.g95 +++ /dev/null @@ -1,37 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for splitter example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/test.$(OBJSUFF) - -all: $(OBJDIR) test$(GUISUFFIX)$(EXESUFF) - -wx: - -$(OBJDIR): - mkdir $(OBJDIR) - -test$(GUISUFFIX)$(EXESUFF): $(OBJDIR)/test.$(OBJSUFF) test.res $(WXLIB) - $(CC) $(LDFLAGS) -o test$(GUISUFFIX)$(EXESUFF) $(OBJDIR)/test.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS) - $(RSRC) test.$(RESSUFF) test.exe - -$(OBJDIR)/test.$(OBJSUFF): test.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ test.$(SRCSUFF) - -test.res: test.rc - -clean: - rm -f $(OBJECTS) test$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/splitter/makefile.nt b/samples/splitter/makefile.nt deleted file mode 100644 index 2f0685d4c8..0000000000 --- a/samples/splitter/makefile.nt +++ /dev/null @@ -1,63 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1997 -# Updated: -# Copyright: (c) 1997, Julian Smart -# -# "%W% %G%" -# -# Makefile : Builds wxSplitterWindow sample MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) -WXSPLITDIR = $(WXDIR)\samples\splitter -THISDIR = $(WXDIR)\samples\splitter - -!include $(WXDIR)\src\ntwxwin.mak - -PROGRAM=test - -PROGOBJECTS = $(PROGRAM).obj - -all: $(PROGRAM) - -$(PROGRAM): $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(PROGOBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(PROGOBJECTS) $(PROGRAM).res -$(LIBS) -<< - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.sbr - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb - diff --git a/samples/splitter/mondrian.ico b/samples/splitter/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/samples/splitter/mondrian.ico and /dev/null differ diff --git a/samples/splitter/test.cpp b/samples/splitter/test.cpp deleted file mode 100644 index a32d2f0a12..0000000000 --- a/samples/splitter/test.cpp +++ /dev/null @@ -1,235 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: splitter.cpp -// Purpose: wxSplitterWindow sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "wx/splitter.h" - -class MyApp; -class MyFrame; -class MyCanvas; - -class MyApp: public wxApp -{ -public: - bool OnInit(); -}; - -class MyFrame: public wxFrame -{ -public: - MyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, const wxSize& size); - virtual ~MyFrame(); - - bool OnClose(); - - // Menu commands - void SplitHorizontal(wxCommandEvent& event); - void SplitVertical(wxCommandEvent& event); - void Unsplit(wxCommandEvent& event); - void Quit(wxCommandEvent& event); - - // Menu command update functions - void UpdateUIHorizontal(wxUpdateUIEvent& event); - void UpdateUIVertical(wxUpdateUIEvent& event); - void UpdateUIUnsplit(wxUpdateUIEvent& event); - - void OnIdle(wxIdleEvent& event); - -private: - wxMenu* fileMenu; - wxMenuBar* menuBar; - MyCanvas* leftCanvas; - MyCanvas* rightCanvas; - wxSplitterWindow* splitter; - -DECLARE_EVENT_TABLE() -}; - -class MyCanvas: public wxScrolledWindow -{ -public: - MyCanvas(wxWindow* parent, int x, int y, int w, int h); - virtual ~MyCanvas(); - - virtual void OnDraw(wxDC& dc); - -DECLARE_EVENT_TABLE() -}; - -BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow) -END_EVENT_TABLE() - -// ID for the menu quit command -#define SPLIT_QUIT 1 -#define SPLIT_HORIZONTAL 2 -#define SPLIT_VERTICAL 3 -#define SPLIT_UNSPLIT 4 - -IMPLEMENT_APP(MyApp) - -bool MyApp::OnInit(void) -{ - MyFrame* frame = new MyFrame((wxFrame *) NULL, (char *) "wxSplitterWindow Example", wxPoint(50, 50), wxSize(400, 300)); - - // Show the frame - frame->Show(TRUE); - - SetTopWindow(frame); - - return TRUE; -} - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(SPLIT_VERTICAL, MyFrame::SplitVertical) - EVT_MENU(SPLIT_HORIZONTAL, MyFrame::SplitHorizontal) - EVT_MENU(SPLIT_UNSPLIT, MyFrame::Unsplit) - EVT_MENU(SPLIT_QUIT, MyFrame::Quit) - EVT_UPDATE_UI(SPLIT_VERTICAL, MyFrame::UpdateUIVertical) - EVT_UPDATE_UI(SPLIT_HORIZONTAL, MyFrame::UpdateUIHorizontal) - EVT_UPDATE_UI(SPLIT_UNSPLIT, MyFrame::UpdateUIUnsplit) - EVT_IDLE(MyFrame::OnIdle) -END_EVENT_TABLE() - -// My frame constructor -MyFrame::MyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, const wxSize& size): - wxFrame(frame, -1, title, pos, size) -{ - // set the icon -#ifdef __WXMSW__ - SetIcon(wxIcon("mondrian")); -#endif - - CreateStatusBar(1); - - // Make a menubar - fileMenu = new wxMenu; - fileMenu->Append(SPLIT_VERTICAL, "Split &Vertically", "Split vertically"); - fileMenu->Append(SPLIT_HORIZONTAL, "Split &Horizontally", "Split horizontally"); - fileMenu->Append(SPLIT_UNSPLIT, "&Unsplit", "Unsplit"); - fileMenu->Append(SPLIT_QUIT, "E&xit", "Exit"); - - menuBar = new wxMenuBar; - menuBar->Append(fileMenu, "&File"); - - SetMenuBar(menuBar); - - splitter = new wxSplitterWindow(this, -1, wxPoint(0, 0), wxSize(400, 400), -// wxSP_BORDER); - wxSP_3D); -// wxSP_NOBORDER); - - leftCanvas = new MyCanvas(splitter, 0, 0, 400, 400); - leftCanvas->SetBackgroundColour(*wxRED); - leftCanvas->SetScrollbars(20, 20, 50, 50); - - rightCanvas = new MyCanvas(splitter, 0, 0, 400, 400); - rightCanvas->SetBackgroundColour(*wxCYAN); - rightCanvas->SetScrollbars(20, 20, 50, 50); - rightCanvas->Show(FALSE); - - splitter->Initialize(leftCanvas); - - // Set this to prevent unsplitting -// splitter->SetMinimumPaneSize(20); -} - -MyFrame::~MyFrame() -{ -} - -bool MyFrame::OnClose() -{ - return TRUE; -} - -void MyFrame::Quit(wxCommandEvent& WXUNUSED(event) ) -{ - Close(TRUE); -} - -void MyFrame::SplitHorizontal(wxCommandEvent& WXUNUSED(event) ) -{ - if ( splitter->IsSplit() ) - splitter->Unsplit(); - leftCanvas->Show(TRUE); - rightCanvas->Show(TRUE); - splitter->SplitHorizontally( leftCanvas, rightCanvas ); -} - -void MyFrame::SplitVertical(wxCommandEvent& WXUNUSED(event) ) -{ - if ( splitter->IsSplit() ) - splitter->Unsplit(); - leftCanvas->Show(TRUE); - rightCanvas->Show(TRUE); - splitter->SplitVertically( leftCanvas, rightCanvas ); -} - -void MyFrame::Unsplit(wxCommandEvent& WXUNUSED(event) ) -{ - if ( splitter->IsSplit() ) - splitter->Unsplit(); -} - -void MyFrame::UpdateUIHorizontal(wxUpdateUIEvent& event) -{ - event.Enable( ( (!splitter->IsSplit()) || (splitter->GetSplitMode() != wxSPLIT_HORIZONTAL) ) ); -} - -void MyFrame::UpdateUIVertical(wxUpdateUIEvent& event) -{ - event.Enable( ( (!splitter->IsSplit()) || (splitter->GetSplitMode() != wxSPLIT_VERTICAL) ) ); -} - -void MyFrame::UpdateUIUnsplit(wxUpdateUIEvent& event) -{ - event.Enable( splitter->IsSplit() ); -} - -void MyFrame::OnIdle(wxIdleEvent& event) -{ - if ( GetStatusBar()->GetStatusText(0) != "Ready" ) - SetStatusText("Ready"); - - wxFrame::OnIdle(event); -} - -MyCanvas::MyCanvas(wxWindow* parent, int x, int y, int w, int h) : - wxScrolledWindow(parent, -1, wxPoint(x, y), wxSize(w, h)) -{ -} - -MyCanvas::~MyCanvas() -{ -} - -void MyCanvas::OnDraw(wxDC& dc) -{ - dc.SetPen(*wxBLACK_PEN); - dc.DrawLine(0, 0, 100, 100); - - dc.SetBackgroundMode(wxTRANSPARENT); - dc.DrawText("Testing", 50, 50); - - dc.SetPen(*wxRED_PEN); - dc.SetBrush(*wxGREEN_BRUSH); - dc.DrawRectangle(120, 120, 100, 80); -} diff --git a/samples/splitter/test.def b/samples/splitter/test.def deleted file mode 100644 index 3dd3b7a033..0000000000 --- a/samples/splitter/test.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME Test -DESCRIPTION 'wxTableWindow Test' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 16192 diff --git a/samples/splitter/test.rc b/samples/splitter/test.rc deleted file mode 100644 index dde0d5ae7f..0000000000 --- a/samples/splitter/test.rc +++ /dev/null @@ -1,4 +0,0 @@ -mondrian ICON "mondrian.ico" - -#include "wx/msw/wx.rc" - diff --git a/samples/tab/.cvsignore b/samples/tab/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/tab/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/tab/Makefile b/samples/tab/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/tab/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/tab/Makefile.in b/samples/tab/Makefile.in deleted file mode 100644 index 3684cd27fa..0000000000 --- a/samples/tab/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# WXXT base directory -WXBASEDIR=@WXBASEDIR@ - -# set the OS type for compilation -OS=@OS@ -# compile a library only -RULE=bin - -# define library name -BIN_TARGET=tab -# 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 diff --git a/samples/tab/makefile.b32 b/samples/tab/makefile.b32 deleted file mode 100644 index ea1478ac72..0000000000 --- a/samples/tab/makefile.b32 +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds tab example - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXINC = $(WXDIR)\include\msw -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 ole2w32 - -TARGET=test - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = test.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -test.obj: test.$(SRCSUFF) - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - diff --git a/samples/tab/makefile.dos b/samples/tab/makefile.dos deleted file mode 100644 index 032e661e15..0000000000 --- a/samples/tab/makefile.dos +++ /dev/null @@ -1,65 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds tab example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\tab - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = test.$(SRCSUFF) -OBJECTS = test.obj - -all: test.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -test.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) test.obj test.def test.res - link $(LINKFLAGS) @<< -test.obj $(WXDIR)\src\msw\dummy.obj, -test, -NUL, -$(LIBS), -test.def -; -<< - rc -K test.res - -test.obj: test.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -test.res : test.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include test - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/tab/makefile.g95 b/samples/tab/makefile.g95 deleted file mode 100644 index 75576c053a..0000000000 --- a/samples/tab/makefile.g95 +++ /dev/null @@ -1,37 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for tab example - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/test.$(OBJSUFF) $(OBJDIR)/test_resources.$(OBJSUFF) - -all: $(OBJDIR) test$(GUISUFFIX)$(EXESUFF) - -wx: - -$(OBJDIR): - mkdir $(OBJDIR) - -test$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o test$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/test.$(OBJSUFF): test.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ test.$(SRCSUFF) - -$(OBJDIR)/test_resources.o: test.rc - $(RESCOMP) -i test.rc -o $(OBJDIR)/test_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) test$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/tab/makefile.nt b/samples/tab/makefile.nt deleted file mode 100644 index fa9f825902..0000000000 --- a/samples/tab/makefile.nt +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds tab example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\tab -PROGRAM=test - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/tab/mondrian.ico b/samples/tab/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/samples/tab/mondrian.ico and /dev/null differ diff --git a/samples/tab/test.cpp b/samples/tab/test.cpp deleted file mode 100644 index 93b5807759..0000000000 --- a/samples/tab/test.cpp +++ /dev/null @@ -1,147 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: test.cpp -// Purpose: Tab demo -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "wx/tab.h" -#include "test.h" - -// Declare two frames -MyDialog *dialog = (MyDialog *) NULL; - -IMPLEMENT_APP(MyApp) - -bool MyApp::OnInit(void) -{ - // Create the main frame window - dialog = new MyDialog((wxFrame *) NULL, -1, (char *) "Tabbed Dialog", wxPoint(-1, -1), wxSize(365, 390), wxDIALOG_MODAL|wxDEFAULT_DIALOG_STYLE); - - dialog->ShowModal(); - - // Quit immediately the dialog has been dismissed - return FALSE; -} - -BEGIN_EVENT_TABLE(MyDialog, wxTabbedDialog) - EVT_BUTTON(wxID_OK, MyDialog::OnOK) - EVT_BUTTON(wxID_CANCEL, MyDialog::OnOK) -// EVT_MENU(TEST_ABOUT, MyDialog::OnAbout) -END_EVENT_TABLE() - -MyDialog::MyDialog(wxWindow* parent, const wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, const long windowStyle): - wxTabbedDialog(parent, id, title, pos, size, windowStyle) -{ - Init(); -} - -void MyDialog::OnOK(wxCommandEvent& WXUNUSED(event) ) -{ - EndModal(wxID_OK); -} - -void MyDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event) ) -{ - EndModal(wxID_CANCEL); -} - -void MyDialog::Init(void) -{ - int dialogWidth = 365; - int dialogHeight = 390; - - wxButton *okButton = new wxButton(this, wxID_OK, "Close", wxPoint(100, 330), wxSize(80, 25)); - (void)new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(185, 330), wxSize(80, 25)); - (void)new wxButton(this, wxID_HELP, "Help", wxPoint(270, 330), wxSize(80, 25)); - okButton->SetDefault(); - - // Note, omit the wxTAB_STYLE_COLOUR_INTERIOR, so we will guarantee a match - // with the panel background, and save a bit of time. - wxPanelTabView *view = new wxPanelTabView((wxPanel*)this, wxTAB_STYLE_DRAW_BOX); - - wxRectangle rect; - rect.x = 5; - rect.y = 70; - // Could calculate the view width from the tab width and spacing, - // as below, but let's assume we have a fixed view width. -// rect.width = view->GetTabWidth()*4 + 3*view->GetHorizontalTabSpacing(); - rect.width = 326; - rect.height = 250; - - view->SetViewRect(rect); - - // Calculate the tab width for 4 tabs, based on a view width of 326 and - // the current horizontal spacing. Adjust the view width to exactly fit - // the tabs. - view->CalculateTabWidth(4, TRUE); - - if (!view->AddTab(TEST_TAB_CAT, wxString("Cat"))) - return; - - if (!view->AddTab(TEST_TAB_DOG, wxString("Dog"))) - return; - if (!view->AddTab(TEST_TAB_GUINEAPIG, wxString("Guinea Pig"))) - return; - if (!view->AddTab(TEST_TAB_GOAT, wxString("Goat"))) - return; - if (!view->AddTab(TEST_TAB_ANTEATER, wxString("Ant-eater"))) - return; - if (!view->AddTab(TEST_TAB_SHEEP, wxString("Sheep"))) - return; - if (!view->AddTab(TEST_TAB_COW, wxString("Cow"))) - return; - if (!view->AddTab(TEST_TAB_HORSE, wxString("Horse"))) - return; - if (!view->AddTab(TEST_TAB_PIG, wxString("Pig"))) - return; - if (!view->AddTab(TEST_TAB_OSTRICH, wxString("Ostrich"))) - return; - if (!view->AddTab(TEST_TAB_AARDVARK, wxString("Aardvark"))) - return; - if (!view->AddTab(TEST_TAB_HUMMINGBIRD,wxString("Hummingbird"))) - return; - - // Add some panels - wxPanel *panel1 = new wxPanel(this, -1, wxPoint(rect.x + 20, rect.y + 10), wxSize(290, 220), wxTAB_TRAVERSAL); - (void)new wxButton(panel1, -1, "Press me", wxPoint(10, 10)); - (void)new wxTextCtrl(panel1, -1, "1234", wxPoint(10, 40), wxSize(120, 150)); - - view->AddTabWindow(TEST_TAB_CAT, panel1); - - wxPanel *panel2 = new wxPanel(this, -1, wxPoint(rect.x + 20, rect.y + 10), wxSize(290, 220)); - - wxString animals[] = { "Fox", "Hare", "Rabbit", "Sabre-toothed tiger", "T Rex" }; - (void)new wxListBox(panel2, -1, wxPoint(5, 5), wxSize(170, 80), 5, animals); - - (void)new wxTextCtrl(panel2, -1, "Some notes about the animals in this house", wxPoint(5, 100), wxSize(170, 100)), - wxTE_MULTILINE; - - view->AddTabWindow(TEST_TAB_DOG, panel2); - - // Don't know why this is necessary under Motif... -#ifndef __WXMSW__ - this->SetSize(dialogWidth, dialogHeight-20); -#endif - - view->SetTabSelection(TEST_TAB_CAT); - - this->Centre(wxBOTH); -} - diff --git a/samples/tab/test.def b/samples/tab/test.def deleted file mode 100644 index bacb3d4dda..0000000000 --- a/samples/tab/test.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME Test -DESCRIPTION 'Tab test' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 16192 diff --git a/samples/tab/test.h b/samples/tab/test.h deleted file mode 100644 index 2cbdeb60a1..0000000000 --- a/samples/tab/test.h +++ /dev/null @@ -1,49 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: test.h -// Purpose: Tab demo -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -// Define a new application -class MyApp: public wxApp -{ -public: - bool OnInit(void); -}; - -class MyDialog: public wxTabbedDialog -{ -public: - MyDialog(wxWindow* parent, const wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, const long windowStyle = wxDEFAULT_DIALOG_STYLE); - - void OnOK(wxCommandEvent& event); - void OnCloseWindow(wxCloseEvent& event); -// void OnAbout(wxCommandEvent& event); - void Init(void); - -DECLARE_EVENT_TABLE() -}; - -// File ids -#define TEST_ABOUT 2 - -// Tab ids -#define TEST_TAB_DOG 1 -#define TEST_TAB_CAT 2 -#define TEST_TAB_GOAT 3 -#define TEST_TAB_GUINEAPIG 4 -#define TEST_TAB_ANTEATER 5 -#define TEST_TAB_HUMMINGBIRD 6 -#define TEST_TAB_SHEEP 7 -#define TEST_TAB_COW 8 -#define TEST_TAB_HORSE 9 -#define TEST_TAB_PIG 10 -#define TEST_TAB_OSTRICH 11 -#define TEST_TAB_AARDVARK 12 - diff --git a/samples/tab/test.rc b/samples/tab/test.rc deleted file mode 100644 index a05f21065a..0000000000 --- a/samples/tab/test.rc +++ /dev/null @@ -1,3 +0,0 @@ -mondrian_icon ICON "mondrian.ico" -#include "wx/msw/wx.rc" - diff --git a/samples/taskbar/makefile.b32 b/samples/taskbar/makefile.b32 deleted file mode 100644 index 497d91192b..0000000000 --- a/samples/taskbar/makefile.b32 +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds tab example - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXINC = $(WXDIR)\include\msw -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 ole2w32 - -TARGET=tbtest - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = tbtest.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -tbtest.obj: tbtest.$(SRCSUFF) - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - diff --git a/samples/taskbar/makefile.dos b/samples/taskbar/makefile.dos deleted file mode 100644 index 1872f14856..0000000000 --- a/samples/taskbar/makefile.dos +++ /dev/null @@ -1,65 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds taskbar example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\taskbar - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = tbtest.$(SRCSUFF) -OBJECTS = tbtest.obj - -all: tbtest.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -tbtest.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) tbtest.obj tbtest.def tbtest.res - link $(LINKFLAGS) @<< -tbtest.obj $(WXDIR)\src\msw\dummy.obj, -tbtest, -NUL, -$(LIBS), -tbtest.def -; -<< - rc -K tbtest.res - -tbtest.obj: tbtest.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -tbtest.res : tbtest.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include tbtest - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/taskbar/makefile.g95 b/samples/taskbar/makefile.g95 deleted file mode 100644 index a26fef6cd7..0000000000 --- a/samples/taskbar/makefile.g95 +++ /dev/null @@ -1,37 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for taskbar example - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/tbtest.$(OBJSUFF) $(OBJDIR)/tbtest_resources.$(OBJSUFF) - -all: $(OBJDIR) tbtest$(GUISUFFIX)$(EXESUFF) - -wx: - -$(OBJDIR): - mkdir $(OBJDIR) - -tbtest$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o tbtest$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/tbtest.$(OBJSUFF): tbtest.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ tbtest.$(SRCSUFF) - -$(OBJDIR)/tbtest_resources.o: tbtest.rc - $(RESCOMP) -i tbtest.rc -o $(OBJDIR)/tbtest_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) tbtest$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/taskbar/makefile.nt b/samples/taskbar/makefile.nt deleted file mode 100644 index 459749a077..0000000000 --- a/samples/taskbar/makefile.nt +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds tab example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\taskbar -PROGRAM=tbtest - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/taskbar/mondrian.ico b/samples/taskbar/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/samples/taskbar/mondrian.ico and /dev/null differ diff --git a/samples/taskbar/tbtest.cpp b/samples/taskbar/tbtest.cpp deleted file mode 100644 index 7618108bc6..0000000000 --- a/samples/taskbar/tbtest.cpp +++ /dev/null @@ -1,120 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tbtest.cpp -// Purpose: wxTaskBarIcon demo -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx.h" -#endif - -#include "wx/msw/taskbar.h" -#include "tbtest.h" - -// Declare two frames -MyDialog *dialog = NULL; - -IMPLEMENT_APP(MyApp) - -bool MyApp::OnInit(void) -{ - wxIcon icon("mondrian_icon"); - - if (!m_taskBarIcon.SetIcon(icon, "wxTaskBarIcon Sample")) - wxMessageBox("Could not set icon."); - - // Create the main frame window - dialog = new MyDialog(NULL, -1, "wxTaskBarIcon Test Dialog", wxPoint(-1, -1), wxSize(365, 290), wxDIALOG_MODELESS|wxDEFAULT_DIALOG_STYLE); - - dialog->Show(TRUE); - - return TRUE; -} - -BEGIN_EVENT_TABLE(MyDialog, wxDialog) - EVT_BUTTON(wxID_OK, MyDialog::OnOK) - EVT_BUTTON(wxID_EXIT, MyDialog::OnExit) -END_EVENT_TABLE() - -MyDialog::MyDialog(wxWindow* parent, const wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, const long windowStyle): - wxDialog(parent, id, title, pos, size, windowStyle) -{ - Init(); -} - -void MyDialog::OnOK(wxCommandEvent& event) -{ - Show(FALSE); -} - -void MyDialog::OnExit(wxCommandEvent& event) -{ - Close(TRUE); -} - -void MyDialog::OnCloseWindow(wxCloseEvent& event) -{ - Destroy(); -} - -void MyDialog::Init(void) -{ - int dialogWidth = 365; - int dialogHeight = 290; - - wxStaticText* stat = new wxStaticText(this, -1, "Press OK to hide me, Exit to quit.", - wxPoint(10, 20)); - - wxStaticText* stat2 = new wxStaticText(this, -1, "Double-click on the taskbar icon to show me again.", - wxPoint(10, 40)); - - wxButton *okButton = new wxButton(this, wxID_OK, "OK", wxPoint(100, 230), wxSize(80, 25)); - wxButton *exitButton = new wxButton(this, wxID_EXIT, "Exit", wxPoint(185, 230), wxSize(80, 25)); - okButton->SetDefault(); - this->Centre(wxBOTH); -} - -// Overridables -void MyTaskBarIcon::OnMouseMove(void) -{ -} - -void MyTaskBarIcon::OnLButtonDown(void) -{ -} - -void MyTaskBarIcon::OnLButtonUp(void) -{ -} - -void MyTaskBarIcon::OnRButtonDown(void) -{ -} - -void MyTaskBarIcon::OnRButtonUp(void) -{ -} - -void MyTaskBarIcon::OnLButtonDClick(void) -{ - dialog->Show(TRUE); -} - -void MyTaskBarIcon::OnRButtonDClick(void) -{ -} - - diff --git a/samples/taskbar/tbtest.def b/samples/taskbar/tbtest.def deleted file mode 100644 index db80cc854b..0000000000 --- a/samples/taskbar/tbtest.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME TBTest -DESCRIPTION 'wxTaskBarIcon test' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 16192 diff --git a/samples/taskbar/tbtest.h b/samples/taskbar/tbtest.h deleted file mode 100644 index a1a01e3a56..0000000000 --- a/samples/taskbar/tbtest.h +++ /dev/null @@ -1,50 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tbtest.h -// Purpose: wxTaskBarIcon sample -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -class MyTaskBarIcon: public wxTaskBarIcon -{ -public: - MyTaskBarIcon() {}; - - virtual void OnMouseMove(void); - virtual void OnLButtonDown(void); - virtual void OnLButtonUp(void); - virtual void OnRButtonDown(void); - virtual void OnRButtonUp(void); - virtual void OnLButtonDClick(void); - virtual void OnRButtonDClick(void); -}; - - -// Define a new application -class MyApp: public wxApp -{ -public: - bool OnInit(void); -protected: - MyTaskBarIcon m_taskBarIcon; -}; - -class MyDialog: public wxDialog -{ -public: - MyDialog(wxWindow* parent, const wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, const long windowStyle = wxDEFAULT_DIALOG_STYLE); - - void OnOK(wxCommandEvent& event); - void OnExit(wxCommandEvent& event); - void OnCloseWindow(wxCloseEvent& event); - void Init(void); - -DECLARE_EVENT_TABLE() -}; - - diff --git a/samples/taskbar/tbtest.rc b/samples/taskbar/tbtest.rc deleted file mode 100644 index a05f21065a..0000000000 --- a/samples/taskbar/tbtest.rc +++ /dev/null @@ -1,3 +0,0 @@ -mondrian_icon ICON "mondrian.ico" -#include "wx/msw/wx.rc" - diff --git a/samples/thread/.cvsignore b/samples/thread/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/thread/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/thread/Makefile b/samples/thread/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/thread/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/thread/Makefile.in b/samples/thread/Makefile.in deleted file mode 100644 index 127fbc82ed..0000000000 --- a/samples/thread/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# WXXT base directory -WXBASEDIR=@WXBASEDIR@ - -# set the OS type for compilation -OS=@OS@ -# compile a library only -RULE=bin - -# define library name -BIN_TARGET=thread -# define library sources -BIN_SRC=\ -test.cpp - -#define library objects -BIN_OBJ=\ -test.o - -# additional things needed to link -BIN_LINK= $(THREADS_LINK) - -# additional things needed to compile -ADD_COMPILE= - -# include the definitions now -include ../../../template.mak diff --git a/samples/thread/makefile.b32 b/samples/thread/makefile.b32 deleted file mode 100644 index 85a669d762..0000000000 --- a/samples/thread/makefile.b32 +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds thread example (DOS). - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXINC = $(WXDIR)\include\msw -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 ole2w32 - -TARGET=test - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = test.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -test.obj: test.$(SRCSUFF) - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - diff --git a/samples/thread/makefile.dos b/samples/thread/makefile.dos deleted file mode 100644 index 86a90c91f7..0000000000 --- a/samples/thread/makefile.dos +++ /dev/null @@ -1,65 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds thread example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\test - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = test.$(SRCSUFF) -OBJECTS = test.obj - -all: test.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -test.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) test.obj test.def test.res - link $(LINKFLAGS) @<< -test.obj $(WXDIR)\src\msw\dummy.obj, -test, -NUL, -$(LIBS), -test.def -; -<< - rc -K test.res - -test.obj: test.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -test.res : test.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include test - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/thread/makefile.g95 b/samples/thread/makefile.g95 deleted file mode 100644 index 859b723d26..0000000000 --- a/samples/thread/makefile.g95 +++ /dev/null @@ -1,37 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for thread example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/test.$(OBJSUFF) $(OBJDIR)/test_resources.$(OBJSUFF) - -all: $(OBJDIR) test$(GUISUFFIX)$(EXESUFF) - -wx: - -$(OBJDIR): - mkdir $(OBJDIR) - -test$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o test$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/test.$(OBJSUFF): test.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ test.$(SRCSUFF) - -$(OBJDIR)/test_resources.o: test.rc - $(RESCOMP) -i test.rc -o $(OBJDIR)/test_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) test$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/thread/makefile.nt b/samples/thread/makefile.nt deleted file mode 100644 index 8053ec781a..0000000000 --- a/samples/thread/makefile.nt +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds thread example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\test -PROGRAM=test - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/thread/test.cpp b/samples/thread/test.cpp deleted file mode 100644 index 2540e996cd..0000000000 --- a/samples/thread/test.cpp +++ /dev/null @@ -1,195 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: test.cpp -// Purpose: wxWindows thread sample -// Author: Julian Smart(minimal)/Guilhem Lavaux(thread test) -// Modified by: -// Created: 06/16/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart, Markus Holzem, Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "test.cpp" -#pragma interface "test.cpp" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "wx/thread.h" -#include "wx/dynarray.h" - -// Define a new application type -class MyApp: public wxApp -{ - public: - bool OnInit(void); -}; - -wxMutex text_mutex; - -WX_DEFINE_ARRAY(wxThread *,wxArrayThread); - -// Define a new frame type -class MyFrame: public wxFrame -{ - public: - MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h); - - public: - void OnQuit(wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); - void OnStartThread(wxCommandEvent& event); - void OnStopThread(wxCommandEvent& event); - void OnPauseThread(wxCommandEvent& event); - bool OnClose(void) { return TRUE; } - - public: - wxArrayThread m_threads; - wxTextCtrl *m_txtctrl; - - DECLARE_EVENT_TABLE() -}; - -class MyThread: public wxThread -{ - public: - MyThread(MyFrame *frame); - - void *Entry(); - public: - MyFrame *m_frame; -}; - -MyThread::MyThread(MyFrame *frame) - : wxThread() -{ - m_frame = frame; -} - -void *MyThread::Entry() -{ - wxString text; - - text.Printf("Thread 0x%x: Hello !\n", GetID()); - DeferDestroy(TRUE); - - while (1) { - TestDestroy(); - text_mutex.Lock(); - m_frame->m_txtctrl->WriteText(text); - text_mutex.Unlock(); - wxSleep(1); - } - - return NULL; -} - -// ID for the menu commands -#define TEST_QUIT 1 -#define TEST_TEXT 101 -#define TEST_ABOUT 102 -#define TEST_START_THREAD 103 -#define TEST_STOP_THREAD 104 -#define TEST_PAUSE_THREAD 105 - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(TEST_QUIT, MyFrame::OnQuit) - EVT_MENU(TEST_ABOUT, MyFrame::OnAbout) - EVT_MENU(TEST_START_THREAD, MyFrame::OnStartThread) - EVT_MENU(TEST_STOP_THREAD, MyFrame::OnStopThread) - EVT_MENU(TEST_PAUSE_THREAD, MyFrame::OnPauseThread) -END_EVENT_TABLE() - -// Create a new application object -IMPLEMENT_APP (MyApp) - -// `Main program' equivalent, creating windows and returning main app frame -bool MyApp::OnInit(void) -{ - // Create the main frame window - MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "Minimal wxWindows App", 50, 50, 450, 340); - - // Make a menubar - wxMenu *file_menu = new wxMenu; - - file_menu->Append(TEST_ABOUT, "&About"); - file_menu->Append(TEST_QUIT, "E&xit"); - wxMenuBar *menu_bar = new wxMenuBar; - menu_bar->Append(file_menu, "&File"); - - wxMenu *thread_menu = new wxMenu; - thread_menu->Append(TEST_START_THREAD, "Start a new thread"); - thread_menu->Append(TEST_STOP_THREAD, "Stop a running thread"); - thread_menu->Append(TEST_PAUSE_THREAD, "Pause a running thread"); - menu_bar->Append(thread_menu, "Thread"); - frame->SetMenuBar(menu_bar); - - // Make a panel with a message - wxPanel *panel = new wxPanel(frame, -1, wxPoint(0, 0), wxSize(400, 200), wxTAB_TRAVERSAL); - - frame->m_txtctrl = new wxTextCtrl(panel, -1, "", wxPoint(10, 10), wxSize(390, 190), - wxTE_MULTILINE); - - // Show the frame - frame->Show(TRUE); - - SetTopWindow(frame); - - return TRUE; -} - -// My frame constructor -MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h): - wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) -{} - -void MyFrame::OnStartThread(wxCommandEvent& WXUNUSED(event) ) -{ - MyThread *thread = new MyThread(this); - - thread->Create(); - - m_threads.Add(thread); -} - -void MyFrame::OnStopThread(wxCommandEvent& WXUNUSED(event) ) -{ - int no_thrd = m_threads.Count()-1; - - if (no_thrd < 0) - return; - - delete (m_threads[no_thrd]); - m_threads.Remove(no_thrd); -} - -void MyFrame::OnPauseThread(wxCommandEvent& WXUNUSED(event) ) -{} - -void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) ) -{ - uint i; - for (i=0;iCreateStatusBar(); - - // Give it an icon -#ifdef __WXMSW__ - frame->SetIcon(wxIcon("mondrian")); -#else - frame->SetIcon( wxIcon(mondrian_xpm) ); -#endif - - // Make a menubar - wxMenu *fileMenu = new wxMenu; - fileMenu->Append(wxID_EXIT, "E&xit"); - - wxMenu *helpMenu = new wxMenu; - helpMenu->Append(wxID_HELP, "&About"); - - wxMenuBar* menuBar = new wxMenuBar; - - menuBar->Append(fileMenu, "&File"); - menuBar->Append(helpMenu, "&Help"); - - // Associate the menu bar with the frame - frame->SetMenuBar(menuBar); - - // Create the toolbar - frame->CreateToolBar(wxNO_BORDER|wxHORIZONTAL|wxTB_FLAT, ID_TOOLBAR); - - InitToolbar(frame->GetToolBar()); - - // Force a resize. This should probably be replaced by a call to a wxFrame - // function that lays out default decorations and the remaining content window. - frame->OnSize(wxSizeEvent(wxSize(-1, -1), frame->GetId())); - frame->Show(TRUE); - - frame->SetStatusText("Hello, wxWindows"); - - SetTopWindow(frame); - - return TRUE; -} - -bool MyApp::InitToolbar(wxToolBar* toolBar) -{ - toolBar->SetMargins(5, 5); - - // Set up toolbar - wxBitmap* toolBarBitmaps[8]; - -#ifdef __WXMSW__ - toolBarBitmaps[0] = new wxBitmap("icon1"); - toolBarBitmaps[1] = new wxBitmap("icon2"); - toolBarBitmaps[2] = new wxBitmap("icon3"); - toolBarBitmaps[3] = new wxBitmap("icon4"); - toolBarBitmaps[4] = new wxBitmap("icon5"); - toolBarBitmaps[5] = new wxBitmap("icon6"); - toolBarBitmaps[6] = new wxBitmap("icon7"); - toolBarBitmaps[7] = new wxBitmap("icon8"); -#else - toolBarBitmaps[0] = new wxBitmap( new_xpm ); - toolBarBitmaps[1] = new wxBitmap( open_xpm ); - toolBarBitmaps[2] = new wxBitmap( save_xpm ); - toolBarBitmaps[3] = new wxBitmap( copy_xpm ); - toolBarBitmaps[4] = new wxBitmap( cut_xpm ); -// toolBarBitmaps[5] = new wxBitmap( paste_xpm ); - toolBarBitmaps[5] = new wxBitmap( preview_xpm ); - toolBarBitmaps[6] = new wxBitmap( print_xpm ); - toolBarBitmaps[7] = new wxBitmap( help_xpm ); -#endif - -#ifdef __WXMSW__ - int width = 24; -#else - int width = 16; -#endif - int currentX = 5; - - toolBar->AddTool(wxID_NEW, *(toolBarBitmaps[0]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "New file"); - currentX += width + 5; - toolBar->AddTool(wxID_OPEN, *(toolBarBitmaps[1]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "Open file"); - currentX += width + 5; - toolBar->AddTool(wxID_SAVE, *(toolBarBitmaps[2]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "Save file"); - currentX += width + 5; - toolBar->AddSeparator(); - toolBar->AddTool(wxID_COPY, *(toolBarBitmaps[3]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "Copy"); - currentX += width + 5; - toolBar->AddTool(wxID_CUT, *(toolBarBitmaps[4]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "Cut"); - currentX += width + 5; - toolBar->AddTool(wxID_PASTE, *(toolBarBitmaps[5]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "Paste"); - currentX += width + 5; - toolBar->AddSeparator(); - toolBar->AddTool(wxID_PRINT, *(toolBarBitmaps[6]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "Print"); - currentX += width + 5; - toolBar->AddSeparator(); - toolBar->AddTool(wxID_HELP, *(toolBarBitmaps[7]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Help"); - - toolBar->Realize(); - - // Can delete the bitmaps since they're reference counted - int i; - for (i = 0; i < 8; i++) - delete toolBarBitmaps[i]; - - return TRUE; -} - -// wxID_HELP will be processed for the 'About' menu and the toolbar help button. - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(wxID_EXIT, MyFrame::OnQuit) - EVT_MENU(wxID_HELP, MyFrame::OnAbout) - EVT_CLOSE(MyFrame::OnCloseWindow) - EVT_TOOL_RANGE(wxID_OPEN, wxID_PASTE, MyFrame::OnToolLeftClick) - EVT_TOOL_ENTER(ID_TOOLBAR, MyFrame::OnToolEnter) -END_EVENT_TABLE() - -// Define my frame constructor -MyFrame::MyFrame(wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos, - const wxSize& size, long style): - wxFrame(parent, id, title, pos, size, style) -{ - m_textWindow = new wxTextCtrl(this, -1, "", wxPoint(0, 0), wxSize(-1, -1), wxTE_MULTILINE); -} - -void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) -{ - Close(TRUE); -} - -void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) -{ - (void)wxMessageBox("wxWindows wxToolBar demo\n", "About wxToolBar"); -} - -// Define the behaviour for the frame closing -// - must delete all frames except for the main one. -void MyFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) -{ - Destroy(); -} - -void MyFrame::OnToolLeftClick(wxCommandEvent& event) -{ - wxString str; - str.Printf("Clicked on tool %d", event.GetId()); - SetStatusText(str); -} - -void MyFrame::OnToolEnter(wxCommandEvent& event) -{ - if (event.GetSelection() > -1) - { - wxString str; - str.Printf("This is tool number %d", event.GetSelection()); - SetStatusText(str); - } - else - SetStatusText(""); -} - diff --git a/samples/toolbar/test.def b/samples/toolbar/test.def deleted file mode 100644 index 897b9dacbb..0000000000 --- a/samples/toolbar/test.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME ToolTest -DESCRIPTION 'wxToolBar Sample' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 8192 diff --git a/samples/toolbar/test.h b/samples/toolbar/test.h deleted file mode 100644 index 4f2a12bb79..0000000000 --- a/samples/toolbar/test.h +++ /dev/null @@ -1,41 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: test.h -// Purpose: wxToolBar sample -// Author: Julian Smart -// Modified by: -// Created: 23/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -// Define a new application -class MyApp: public wxApp -{ - public: - bool OnInit(void); - bool InitToolbar(wxToolBar* toolBar); -}; - -// Define a new frame -class MyFrame: public wxFrame -{ -public: - MyFrame(wxFrame *parent, wxWindowID id = -1, const wxString& title = "wxToolBar Sample", - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE); - - void OnCloseWindow(wxCloseEvent& event); - void OnQuit(wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); - void OnToolLeftClick(wxCommandEvent& event); - void OnToolEnter(wxCommandEvent& event); - -private: - wxTextCtrl* m_textWindow; - -DECLARE_EVENT_TABLE() -}; - -#define ID_TOOLBAR 500 - diff --git a/samples/toolbar/test.rc b/samples/toolbar/test.rc deleted file mode 100644 index 6c9086d0c6..0000000000 --- a/samples/toolbar/test.rc +++ /dev/null @@ -1,13 +0,0 @@ -mondrian ICON "mondrian.ico" -#include "wx/msw/wx.rc" - -icon1 BITMAP "bitmaps/new.bmp" -icon2 BITMAP "bitmaps/open.bmp" -icon3 BITMAP "bitmaps/save.bmp" -icon4 BITMAP "bitmaps/copy.bmp" -icon5 BITMAP "bitmaps/cut.bmp" -icon6 BITMAP "bitmaps/paste.bmp" -icon7 BITMAP "bitmaps/print.bmp" - -icon8 BITMAP "bitmaps/help.bmp" - diff --git a/samples/treectrl/.cvsignore b/samples/treectrl/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/treectrl/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/treectrl/Makefile b/samples/treectrl/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/treectrl/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/treectrl/Makefile.in b/samples/treectrl/Makefile.in deleted file mode 100644 index 8f091052bc..0000000000 --- a/samples/treectrl/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# WXXT base directory -WXBASEDIR=@WXBASEDIR@ - -# set the OS type for compilation -OS=@OS@ -# compile a library only -RULE=bin - -# define library name -BIN_TARGET=treetest -# define library sources -BIN_SRC=\ -treetest.cpp - -#define library objects -BIN_OBJ=\ -treetest.o - -# additional things needed to link -BIN_LINK= - -# additional things needed to compile -ADD_COMPILE= - -# include the definitions now -include ../../../template.mak diff --git a/samples/treectrl/bitmaps/file1.ico b/samples/treectrl/bitmaps/file1.ico deleted file mode 100644 index cc828ab4f2..0000000000 Binary files a/samples/treectrl/bitmaps/file1.ico and /dev/null differ diff --git a/samples/treectrl/bitmaps/folder1.ico b/samples/treectrl/bitmaps/folder1.ico deleted file mode 100644 index c43de1c07c..0000000000 Binary files a/samples/treectrl/bitmaps/folder1.ico and /dev/null differ diff --git a/samples/treectrl/makefile.b32 b/samples/treectrl/makefile.b32 deleted file mode 100644 index 44aa809a54..0000000000 --- a/samples/treectrl/makefile.b32 +++ /dev/null @@ -1,62 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds treetest example (DOS). - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 - -TARGET=treetest - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = treetest.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -treetest.obj: treetest.$(SRCSUFF) - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - diff --git a/samples/treectrl/makefile.dos b/samples/treectrl/makefile.dos deleted file mode 100644 index 5b65a93c36..0000000000 --- a/samples/treectrl/makefile.dos +++ /dev/null @@ -1,81 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds minimal example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\minimal -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml - -!ifndef FINAL -FINAL=0 -!endif - -INC=/I$(WXDIR)\include\msw /I$(WXDIR)\include\base - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!if "$(FINAL)" == "0" -CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC) -LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:512 -!else -CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC) -LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:512 -!endif - -HEADERS = -SOURCES = minimal.$(SRCSUFF) -OBJECTS = minimal.obj - -all: minimal.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -minimal.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) minimal.obj minimal.def minimal.res - link $(LINKFLAGS) @<< -minimal.obj $(WXDIR)\src\msw\dummy.obj, -minimal, -NUL, -$(LIBS), -minimal.def -; -<< - rc -30 -K minimal.res - -minimal.obj: minimal.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -minimal.res : minimal.rc $(WXDIR)\include\msw\wx.rc - rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw minimal - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/treectrl/makefile.g95 b/samples/treectrl/makefile.g95 deleted file mode 100644 index a4123a8ad4..0000000000 --- a/samples/treectrl/makefile.g95 +++ /dev/null @@ -1,38 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for treetest example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/treetest.$(OBJSUFF) $(OBJDIR)/treetest_resources.$(OBJSUFF) - -all: $(OBJDIR) treetest$(GUISUFFIX)$(EXESUFF) - -wx: - -$(OBJDIR): - mkdir $(OBJDIR) - -treetest$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o treetest$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/treetest.$(OBJSUFF): treetest.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ treetest.$(SRCSUFF) - -$(OBJDIR)/treetest_resources.o: treetest.rc - $(RESCOMP) -i treetest.rc -o $(OBJDIR)/treetest_resources.o $(RESFLAGS) - - -clean: - rm -f $(OBJECTS) treetest$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/treectrl/makefile.nt b/samples/treectrl/makefile.nt deleted file mode 100644 index 59cf33ab3b..0000000000 --- a/samples/treectrl/makefile.nt +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1997 -# Updated: -# Copyright: -# -# "%W% %G%" -# -# Makefile : Builds wxTreeCtrl example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\treectrl -PROGRAM=treetest - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/treectrl/mondrian.ico b/samples/treectrl/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/samples/treectrl/mondrian.ico and /dev/null differ diff --git a/samples/treectrl/mondrian.xpm b/samples/treectrl/mondrian.xpm deleted file mode 100644 index 409f27a843..0000000000 --- a/samples/treectrl/mondrian.xpm +++ /dev/null @@ -1,44 +0,0 @@ -/* XPM */ -static char *mondrian_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 6 1", -" c Black", -". c Blue", -"X c #00bf00", -"o c Red", -"O c Yellow", -"+ c Gray100", -/* pixels */ -" ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" " -}; diff --git a/samples/treectrl/treetest.cpp b/samples/treectrl/treetest.cpp deleted file mode 100644 index 8f3fee1970..0000000000 --- a/samples/treectrl/treetest.cpp +++ /dev/null @@ -1,387 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: treetest.cpp -// Purpose: wxTreeCtrl sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#pragma interface -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#ifdef __WXGTK__ -#include "mondrian.xpm" -#endif - -#include "wx/treectrl.h" - -#include "treetest.h" - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(TREE_QUIT, MyFrame::OnQuit) - EVT_MENU(TREE_ABOUT, MyFrame::OnAbout) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(MyTreeCtrl, wxTreeCtrl) - EVT_TREE_BEGIN_DRAG(TREE_CTRL, MyTreeCtrl::OnBeginDrag) - EVT_TREE_BEGIN_RDRAG(TREE_CTRL, MyTreeCtrl::OnBeginRDrag) - EVT_TREE_BEGIN_LABEL_EDIT(TREE_CTRL, MyTreeCtrl::OnBeginLabelEdit) - EVT_TREE_END_LABEL_EDIT(TREE_CTRL, MyTreeCtrl::OnEndLabelEdit) - EVT_TREE_DELETE_ITEM(TREE_CTRL, MyTreeCtrl::OnDeleteItem) - EVT_TREE_GET_INFO(TREE_CTRL, MyTreeCtrl::OnGetInfo) - EVT_TREE_SET_INFO(TREE_CTRL, MyTreeCtrl::OnSetInfo) - EVT_TREE_ITEM_EXPANDED(TREE_CTRL, MyTreeCtrl::OnItemExpanded) - EVT_TREE_ITEM_EXPANDING(TREE_CTRL, MyTreeCtrl::OnItemExpanding) - EVT_TREE_SEL_CHANGED(TREE_CTRL, MyTreeCtrl::OnSelChanged) - EVT_TREE_SEL_CHANGING(TREE_CTRL, MyTreeCtrl::OnSelChanging) - EVT_TREE_KEY_DOWN(TREE_CTRL, MyTreeCtrl::OnKeyDown) -END_EVENT_TABLE() - -IMPLEMENT_APP(MyApp) - -// `Main program' equivalent, creating windows and returning main app frame -bool MyApp::OnInit(void) -{ - // Create the main frame window - MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "wxTreeCtrl Test", 50, 50, 450, 340); - - // This reduces flicker effects - even better would be to define OnEraseBackground - // to do nothing. When the tree control's scrollbars are show or hidden, the - // frame is sent a background erase event. - frame->SetBackgroundColour(wxColour(255, 255, 255)); - - // Give it an icon -#ifdef __WXMSW__ - frame->SetIcon(wxIcon("mondrian")); -#else - frame->SetIcon(wxIcon(mondrian_xpm)); -#endif - - // Make an image list containing small icons - m_imageListNormal = new wxImageList(16, 16, TRUE); - -#ifdef __WXMSW__ - wxIcon icon1("icon1", wxBITMAP_TYPE_ICO_RESOURCE); - m_imageListNormal->Add(icon1); - wxIcon icon2("icon2", wxBITMAP_TYPE_ICO_RESOURCE); - m_imageListNormal->Add(icon2); -#else -#endif - - // Make a menubar - wxMenu *file_menu = new wxMenu; - - file_menu->Append(TREE_ABOUT, "&About"); - file_menu->Append(TREE_QUIT, "E&xit"); - wxMenuBar *menu_bar = new wxMenuBar; - menu_bar->Append(file_menu, "&File"); - frame->SetMenuBar(menu_bar); - - // Make a panel with a message - frame->m_treeCtrl = new MyTreeCtrl(frame, TREE_CTRL, wxPoint(0, 0), wxSize(400, 200), - wxTR_HAS_BUTTONS|wxSUNKEN_BORDER); - frame->m_logWindow = new wxTextCtrl(frame, -1, "", wxPoint(0, 0), wxSize(400, 200), - wxTE_MULTILINE|wxSUNKEN_BORDER); - - wxLayoutConstraints *c = new wxLayoutConstraints; - c->top.SameAs (frame, wxTop); - c->left.SameAs (frame, wxLeft); - c->right.SameAs (frame, wxRight); - c->height.PercentOf (frame, wxHeight, 66); - frame->m_treeCtrl->SetConstraints(c); - - c = new wxLayoutConstraints; - c->top.Below (frame->m_treeCtrl); - c->left.SameAs (frame, wxLeft); - c->right.SameAs (frame, wxRight); - c->bottom.SameAs (frame, wxBottom); - frame->m_logWindow->SetConstraints(c); - frame->SetAutoLayout(TRUE); - - frame->m_treeCtrl->SetImageList(wxGetApp().m_imageListNormal, wxIMAGE_LIST_NORMAL); - - long rootId = frame->m_treeCtrl->InsertItem(0, "Root", 0); - - char buf[20]; - int i; - wxString str; - - for ( i = 0; i < 10; i++) - { - sprintf(buf, "Folder child %d", i); - str = buf; - long id = frame->m_treeCtrl->InsertItem(rootId, str, 0); - int j; - for ( j = 0; j < 5; j++) - { - sprintf(buf, "File child %d", j); - str = buf; - frame->m_treeCtrl->InsertItem(id, str, 1); - } - } - for ( i = 0; i < 10; i++) - { - sprintf(buf, "File child %d", i); - str = buf; - frame->m_treeCtrl->InsertItem(rootId, str, 1); - } - - frame->CreateStatusBar(3); - frame->SetStatusText("", 0); - - // Show the frame - frame->Show(TRUE); - - SetTopWindow(frame); - - return TRUE; -} - -// My frame constructor -MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h): - wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) -{ - m_treeCtrl = (MyTreeCtrl *) NULL; - m_logWindow = (wxTextCtrl *) NULL; -} - -MyFrame::~MyFrame(void) -{ - delete wxGetApp().m_imageListNormal; -} - -void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) ) -{ - Close(TRUE); -} - -void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) -{ - wxMessageDialog dialog(this, "Tree test sample\nJulian Smart (c) 1997", - "About tree test", wxOK|wxCANCEL); - - dialog.ShowModal(); -} - -// MyTreeCtrl - -void MyTreeCtrl::OnBeginDrag(wxTreeEvent& WXUNUSED(event) ) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnBeginDrag\n"; - str.flush(); -#endif -} - -void MyTreeCtrl::OnBeginRDrag(wxTreeEvent& WXUNUSED(event) ) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnBeginRDrag\n"; - str.flush(); -#endif -} - -void MyTreeCtrl::OnBeginLabelEdit(wxTreeEvent& WXUNUSED(event) ) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnBeginLabelEdit\n"; - str.flush(); -#endif -} - -void MyTreeCtrl::OnEndLabelEdit(wxTreeEvent& WXUNUSED(event) ) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnEndLabelEdit\n"; - str.flush(); -#endif -} - -void MyTreeCtrl::OnDeleteItem(wxTreeEvent& WXUNUSED(event) ) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnDeleteItem\n"; - str.flush(); -#endif -} - -void MyTreeCtrl::OnGetInfo(wxTreeEvent& WXUNUSED(event) ) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnGetInfo\n"; - str.flush(); -#endif -} - -void MyTreeCtrl::OnSetInfo(wxTreeEvent& WXUNUSED(event) ) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnSetInfo\n"; - str.flush(); -#endif -} - -void MyTreeCtrl::OnItemExpanded(wxTreeEvent& WXUNUSED(event) ) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnItemExpanded\n"; - str.flush(); -#endif -} - -void MyTreeCtrl::OnItemExpanding(wxTreeEvent& WXUNUSED(event) ) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnItemExpanding\n"; - str.flush(); -#endif -} - -void MyTreeCtrl::OnSelChanged(wxTreeEvent& WXUNUSED(event) ) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnSelChanged\n"; - str.flush(); -#endif -} - -void MyTreeCtrl::OnSelChanging(wxTreeEvent& WXUNUSED(event) ) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnSelChanging\n"; - str.flush(); -#endif -} - -void MyTreeCtrl::OnKeyDown(wxTreeEvent& WXUNUSED(event) ) -{ - if ( !wxGetApp().GetTopWindow() ) - return; - - wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow; - if ( !text ) - return; - -#ifndef __GNUWIN32__ - ostream str(text); - - str << "OnKeyDown\n"; - str.flush(); -#endif -} - diff --git a/samples/treectrl/treetest.def b/samples/treectrl/treetest.def deleted file mode 100644 index 8c952e6f00..0000000000 --- a/samples/treectrl/treetest.def +++ /dev/null @@ -1,9 +0,0 @@ - * Last change: JS 28 Apr 97 1:45 pm -NAME TreeCtrl -DESCRIPTION 'TreeCtrl wxWindows application' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 8192 diff --git a/samples/treectrl/treetest.h b/samples/treectrl/treetest.h deleted file mode 100644 index 515506b91e..0000000000 --- a/samples/treectrl/treetest.h +++ /dev/null @@ -1,69 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: treetest.h -// Purpose: wxTreeCtrl sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -// Define a new application type -class MyApp: public wxApp -{ public: - bool OnInit(void); - - wxImageList *m_imageListNormal; -}; - -class MyTreeCtrl: public wxTreeCtrl -{ -public: - MyTreeCtrl(wxWindow *parent, const wxWindowID id, const wxPoint& pos, - const wxSize& size, long style): - wxTreeCtrl(parent, id, pos, size, style) - { - } - - void OnBeginDrag(wxTreeEvent& event); - void OnBeginRDrag(wxTreeEvent& event); - void OnBeginLabelEdit(wxTreeEvent& event); - void OnEndLabelEdit(wxTreeEvent& event); - void OnDeleteItem(wxTreeEvent& event); - void OnGetInfo(wxTreeEvent& event); - void OnSetInfo(wxTreeEvent& event); - void OnItemExpanded(wxTreeEvent& event); - void OnItemExpanding(wxTreeEvent& event); - void OnSelChanged(wxTreeEvent& event); - void OnSelChanging(wxTreeEvent& event); - void OnKeyDown(wxTreeEvent& event); - - DECLARE_EVENT_TABLE() -}; - -// Define a new frame type -class MyFrame: public wxFrame -{ public: - MyTreeCtrl *m_treeCtrl; - wxTextCtrl *m_logWindow; - - MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h); - ~MyFrame(void); - - public: - void OnQuit(wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); - bool OnClose(void) { return TRUE; } - - DECLARE_EVENT_TABLE() -}; - - -// ID for the menu quit command -#define TREE_QUIT 1 -#define TREE_ABOUT 102 - -#define TREE_CTRL 1000 - - diff --git a/samples/treectrl/treetest.rc b/samples/treectrl/treetest.rc deleted file mode 100644 index 9a8ec91188..0000000000 --- a/samples/treectrl/treetest.rc +++ /dev/null @@ -1,7 +0,0 @@ -mondrian ICON "mondrian.ico" -aaaa ICON "mondrian.ico" -#include "wx/msw/wx.rc" - -icon1 ICON "bitmaps\\folder1.ico" -icon2 ICON "bitmaps\\file1.ico" - diff --git a/samples/validate/.cvsignore b/samples/validate/.cvsignore deleted file mode 100644 index 7957c41216..0000000000 --- a/samples/validate/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux \ No newline at end of file diff --git a/samples/validate/Makefile b/samples/validate/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/samples/validate/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/samples/validate/Makefile.in b/samples/validate/Makefile.in deleted file mode 100644 index 7db2e4e583..0000000000 --- a/samples/validate/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# WXXT base directory -WXBASEDIR=@WXBASEDIR@ - -# set the OS type for compilation -OS=@OS@ -# compile a library only -RULE=bin - -# define library name -BIN_TARGET=validate -# define library sources -BIN_SRC=\ -validate.cpp - -#define library objects -BIN_OBJ=\ -validate.o - -# additional things needed to link -BIN_LINK= - -# additional things needed to compile -ADD_COMPILE= - -# include the definitions now -include ../../../template.mak diff --git a/samples/validate/makefile.b32 b/samples/validate/makefile.b32 deleted file mode 100644 index 3f50a7d4a9..0000000000 --- a/samples/validate/makefile.b32 +++ /dev/null @@ -1,65 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds validate example (DOS). - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXINC = $(WXDIR)\include\msw -WXBASESRC = $(WXDIR)\src\base -WXBASEINC = $(WXDIR)\include\base -WXLIB = $(WXLIBDIR)\wx32.lib -LIBS=$(WXLIB) cw32 import32 - -TARGET=validate - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = validate.obj - -$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -! - brc32 -K $(TARGET).res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -validate.obj: validate.$(SRCSUFF) - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws - diff --git a/samples/validate/makefile.dos b/samples/validate/makefile.dos deleted file mode 100644 index 5b65a93c36..0000000000 --- a/samples/validate/makefile.dos +++ /dev/null @@ -1,81 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds minimal example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\minimal -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml - -!ifndef FINAL -FINAL=0 -!endif - -INC=/I$(WXDIR)\include\msw /I$(WXDIR)\include\base - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!if "$(FINAL)" == "0" -CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC) -LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:512 -!else -CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC) -LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:512 -!endif - -HEADERS = -SOURCES = minimal.$(SRCSUFF) -OBJECTS = minimal.obj - -all: minimal.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -minimal.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) minimal.obj minimal.def minimal.res - link $(LINKFLAGS) @<< -minimal.obj $(WXDIR)\src\msw\dummy.obj, -minimal, -NUL, -$(LIBS), -minimal.def -; -<< - rc -30 -K minimal.res - -minimal.obj: minimal.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -minimal.res : minimal.rc $(WXDIR)\include\msw\wx.rc - rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw minimal - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/validate/makefile.g95 b/samples/validate/makefile.g95 deleted file mode 100644 index eba871379b..0000000000 --- a/samples/validate/makefile.g95 +++ /dev/null @@ -1,37 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for validate example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/validate.$(OBJSUFF) $(OBJDIR)/validate_resources.$(OBJSUFF) - -all: $(OBJDIR) validate$(GUISUFFIX)$(EXESUFF) - -wx: - -$(OBJDIR): - mkdir $(OBJDIR) - -validate$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o validate$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) - -$(OBJDIR)/validate.$(OBJSUFF): validate.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ validate.$(SRCSUFF) - -$(OBJDIR)/validate_resources.o: validate.rc - $(RESCOMP) -i validate.rc -o $(OBJDIR)/validate_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) validate$(GUISUFFIX).exe core *.rsc *.res diff --git a/samples/validate/makefile.nt b/samples/validate/makefile.nt deleted file mode 100644 index 2e900f4447..0000000000 --- a/samples/validate/makefile.nt +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds validate example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\samples\validate -PROGRAM=validate - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) validate.h $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include /i$(WXDIR)\src\msw\fafa -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/validate/mondrian.ico b/samples/validate/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/samples/validate/mondrian.ico and /dev/null differ diff --git a/samples/validate/mondrian.xpm b/samples/validate/mondrian.xpm deleted file mode 100644 index 409f27a843..0000000000 --- a/samples/validate/mondrian.xpm +++ /dev/null @@ -1,44 +0,0 @@ -/* XPM */ -static char *mondrian_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 6 1", -" c Black", -". c Blue", -"X c #00bf00", -"o c Red", -"O c Yellow", -"+ c Gray100", -/* pixels */ -" ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" oooooo +++++++++++++++++++++++ ", -" ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ .... ", -" ++++++ ++++++++++++++++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++++++++++++++++ ++++ ", -" ++++++ ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" ++++++ OOOOOOOOOOOO XXXXX ++++ ", -" " -}; diff --git a/samples/validate/validate.cpp b/samples/validate/validate.cpp deleted file mode 100644 index 688a457b6c..0000000000 --- a/samples/validate/validate.cpp +++ /dev/null @@ -1,105 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: validate.cpp -// Purpose: wxWindows validation sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma implementation -// #pragma interface -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "wx/valtext.h" - -#include "validate.h" - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(wxID_EXIT, MyFrame::OnQuit) - EVT_MENU(VALIDATE_TEST_DIALOG, MyFrame::OnTestDialog) -END_EVENT_TABLE() - -IMPLEMENT_APP(MyApp) - -MyData g_data; - -bool MyApp::OnInit(void) -{ - // Create the main frame window - MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "Validation Test", 50, 50, 300, 250); - - // Give it an icon -#ifdef __WXMSW__ - frame->SetIcon(wxIcon("mondrian")); -#endif -#ifdef __X__ - frame->SetIcon(wxIcon("aiai.xbm")); -#endif - - // Make a menubar - wxMenu *file_menu = new wxMenu; - - file_menu->Append(VALIDATE_TEST_DIALOG, "&Test dialog"); - file_menu->Append(wxID_EXIT, "E&xit"); - wxMenuBar *menu_bar = new wxMenuBar; - menu_bar->Append(file_menu, "File"); - frame->SetMenuBar(menu_bar); - - frame->CreateStatusBar(1); - - // Show the frame - frame->Show(TRUE); - - SetTopWindow(frame); - - return TRUE; -} - -// My frame constructor -MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h): - wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) -{} - -void MyFrame::OnQuit(wxCommandEvent& event) -{ - Close(TRUE); -} - -void MyFrame::OnTestDialog(wxCommandEvent& event) -{ - MyDialog dialog(this, "Validation test dialog", wxPoint(100, 100), wxSize(340, 170)); - - dialog.ShowModal(); -} - -MyDialog::MyDialog(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size, - const long style): - wxDialog(parent, VALIDATE_DIALOG_ID, title, pos, size, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL) -{ - wxButton *but1 = new wxButton(this, wxID_OK, "OK", wxPoint(250, 10), wxSize(80, 30)); - wxButton *but2 = new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(250, 60), wxSize(80, 30)); - - wxTextCtrl *txt1 = new wxTextCtrl(this, VALIDATE_TEXT, "", - wxPoint(10, 10), wxSize(120, -1), 0, wxTextValidator(wxFILTER_ALPHA, &g_data.m_string)); - -// SetBackgroundColour(wxColour(0,0,255)); - - but1->SetFocus(); - but1->SetDefault(); -} - diff --git a/samples/validate/validate.def b/samples/validate/validate.def deleted file mode 100644 index f49fa9473e..0000000000 --- a/samples/validate/validate.def +++ /dev/null @@ -1,9 +0,0 @@ - * Last change: JS 13 Mar 97 5:02 pm -NAME Events -DESCRIPTION 'Event tester' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 8192 diff --git a/samples/validate/validate.h b/samples/validate/validate.h deleted file mode 100644 index b4b9046561..0000000000 --- a/samples/validate/validate.h +++ /dev/null @@ -1,55 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: validate.h -// Purpose: wxWindows validation sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma interface -#endif - -// Define a new application type -class MyApp: public wxApp -{ public: - bool OnInit(void); -}; - -// Define a new frame type -class MyFrame: public wxFrame -{ public: - MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h); - - public: - void OnQuit(wxCommandEvent& event); - void OnTestDialog(wxCommandEvent& event); - bool OnClose(void) { return TRUE; } - - DECLARE_EVENT_TABLE() - -}; - -class MyDialog: public wxDialog -{ -public: - MyDialog(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size, - const long style = wxDEFAULT_DIALOG_STYLE); -}; - -class MyData -{ - public: - wxString m_string; - - MyData() { m_string = "My string"; } -}; - -#define VALIDATE_DIALOG_ID 200 - -#define VALIDATE_TEST_DIALOG 2 -#define VALIDATE_TEXT 101 - diff --git a/samples/validate/validate.rc b/samples/validate/validate.rc deleted file mode 100644 index 7655c62a4c..0000000000 --- a/samples/validate/validate.rc +++ /dev/null @@ -1,3 +0,0 @@ -mondrian ICON "mondrian.ico" -#include "wx/msw/wx.rc" - diff --git a/setup/.cvsignore b/setup/.cvsignore deleted file mode 100644 index f4de992df6..0000000000 --- a/setup/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -Makefile -Linux -linux-gnu -setup.h diff --git a/setup/general/createall b/setup/general/createall deleted file mode 100755 index 121010d020..0000000000 --- a/setup/general/createall +++ /dev/null @@ -1,106 +0,0 @@ -#! /bin/sh - -# Just grab dirbase/dir(s) -readbase () -{ - DIRBASE=$1 - DIRCONTENTS=$2 - for each in $DIRBASE/* - do - if test -d $each - then - DIRCONTENTS="$DIRCONTENTS $each" - fi - done - echo $DIRCONTENTS -} - -# Prefer subdir/src over subdir, use whichever available -readbase2 () -{ - DIRBASE=$1 - DIRCONTENTS=$2 - for each in $DIRBASE/* - do - if test -d $each - then - if test -d $each/src - then - DIRCONTENTS="$DIRCONTENTS $each/src" - else - DIRCONTENTS="$DIRCONTENTS $each" - fi - fi - done - echo $DIRCONTENTS -} - -OS=$OSTYPE - -if test "x$OS" = x; then - echo "please set the environment variable OSTYPE " - echo "to a value appropriate for your system." - echo "to do so type: setenv OSTYPE `uname` for the csh, tcsh" - echo " export OSTYPE=`uname` for other shells" - exit 1 -fi - -SRC_DIR=`readbase src src` -SAMPLES_DIR=`readbase2 samples` -UTILS_DIR=`readbase2 utils` -USER_DIR=`readbase2 user` - -ALL_DIR="$SRC_DIR $SAMPLES_DIR $UTILS_DIR $USER_DIR" - -echo Creating for: $OS - -# create defaults -if test ! -d setup/$OS; then - mkdir setup/$OS -fi - -SUBSTFILE=setup/$OS/substit - -# the substit file first -if test -f setup/substit ; then - cat setup/substit | sed "s/*/@/g" > $SUBSTFILE; - rm -f setup/substit -fi -# now the template file -cat setup/maketmpl.in | sed -f $SUBSTFILE > setup/$OS/maketmpl - -# now the config header file -#if test -f setup/wx_setup.h ; then -# cat setup/wx_setup.h > setup/$OS/wx_setup.h; -# rm -f setup/wx_setup.h -#fi - -# create lib and bin directory -if test ! -d lib; then - mkdir lib -fi -if test ! -d lib/$OS; then - mkdir lib/$OS -fi -if test ! -d bin; then - mkdir bin -fi -if test ! -d bin/$OS; then - mkdir bin/$OS -fi - -# create makefiles -for each in $ALL_DIR; do - DIR=$each/$OS - # create Makefile in directory - if test -r $each/Makefile.in ; then - # create directory - if test ! -d $DIR; then - echo "Creating Directory: $DIR..." - mkdir $DIR - fi - echo "Creating: $DIR/Makefile..." - cat $each/Makefile.in | sed -f $SUBSTFILE > $DIR/Makefile - (cd $DIR; make subdirs > /dev/null;) - fi -done diff --git a/setup/general/jointar b/setup/general/jointar deleted file mode 100755 index 29949e1cf3..0000000000 --- a/setup/general/jointar +++ /dev/null @@ -1,67 +0,0 @@ -#! /bin/sh -# -# Written by Martin Sperl -# (sperl@dsn.ast.univie.ac.at) -# - - -if test $# -lt 3 ; then - cat < - copies all files from the source-tar-files to the common - destination-tar-file with basedir as a common base directory. -EOF - exit 0 -fi - -BaseDir="$1" -shift - -Sourcefiles="$1" - -while test "$#" != 2 ; do - shift - Sourcefiles="$Sourcefiles $1" -done - -shift -Final=$1 - -Destination=/tmp/join$$.tar - -touch $Destination - -curdir=`pwd` - -mkdir tmp$$ -mkdir tmp$$/$BaseDir - -#uncompress all files -cd tmp$$/$BaseDir -for each in $Sourcefiles ; do - ( \ - if test `basename $each gz` != `basename $each` ; then \ - gzip -dc ../../$each;\ - else \ - cat ../../$each;\ - fi; \ - ) | tar xf - -done -cd .. -#now tar everything -tar -cf $Destination * - -cd .. - -rm -fr tmp$$ - -# goto old directory -cd $curdir - -if test `basename $Final gz` != `basename $Final` ; then - gzip -c $Destination > $Final -else - cat $Destination > $Final -fi - -rm -f $Destination diff --git a/setup/general/makeapp b/setup/general/makeapp deleted file mode 100644 index a413749e5f..0000000000 --- a/setup/general/makeapp +++ /dev/null @@ -1,73 +0,0 @@ -SHELL=/bin/sh - -OS=$(OSTYPE) - -all:: - -@if test "x$(OS)" = x; then \ - echo "please set the environment variable OSTYPE ";\ - echo "to a value appropriate for your system.";\ - echo "to do so type: setenv OSTYPE `uname` for the csh, tcsh";\ - echo " export OSTYPE=`uname` for other shells";\ - else \ - if test -f Makefile.in ; then \ - if test -f $(OS)/Makefile ; then \ - NEEDED=`(cd $(OS); ${MAKE} checkneeds;) | grep "needed to compile" `;\ - if test "x$$NEEDED" = x; then \ - (cd $(OS); ${MAKE} $@); \ - else \ - (cd $(OS); ${MAKE} checkneeds); \ - fi ; \ - else \ - echo "Did you configure your system?";\ - fi; \ - fi; \ - fi; - -distrib:: - @if test ! -d ../../distrib ; then mkdir ../../distrib; fi; - @if test ! -f ../../system.list ; then \ - echo "dummy" > ../../system.list;\ - fi - @(curr=`pwd`; direc=`basename $$curr`;\ - basedir=`dirname $$curr`;\ - basedirname=`basename $$basedir`;\ - if test ! -d ../../distrib/$$basedirname ; then \ - mkdir ../../distrib/$$basedirname;\ - fi;\ - if test -d doc; then (cd doc; make clean;); fi;\ - (cd ..; \ - echo creating $$direc.tar from the current directory;\ - files="`\ - find $$direc -type f \ - | fgrep -vf ../system.list \ - | grep -v "~" \ - | grep -v "#" \ - ` $(DISTRIBUTE_ADDITIONAL)";\ - tar -cf /tmp/$$direc.tar $$files;\ - echo compressing $$direc.tar to $$direc.tgz;\ - gzip -c /tmp/$$direc.tar > ../distrib/$$basedirname/$$direc.tgz;\ - rm /tmp/$$direc.tar;\ - )\ - ) - -.DEFAULT: - -@if test "x$(OS)" = x; then \ - echo "please set the environment variable OSTYPE ";\ - echo "to a value appropriate for your system.";\ - echo "to do so type: setenv OSTYPE `uname` for the csh, tcsh";\ - echo " export OSTYPE=`uname` for other shells";\ - else \ - if test -f Makefile.in ; then \ - if test -f $(OS)/Makefile ; then \ - NEEDED=`(cd $(OS); ${MAKE} checkneeds) | grep "needed to compile" `;\ - if test "x$$NEEDED" = x; then \ - (cd $(OS); ${MAKE} $@); \ - else \ - (cd $(OS); ${MAKE} checkneeds); \ - fi ; \ - else \ - echo "Did you configure your system?";\ - fi \ - fi \ - fi - diff --git a/setup/general/makedirs b/setup/general/makedirs deleted file mode 100644 index 0e770242f1..0000000000 --- a/setup/general/makedirs +++ /dev/null @@ -1,19 +0,0 @@ -SHELL=/bin/sh - -DIRS=`find . -print | sed "s|\./||g" | grep -v "/" | grep -v "\." ` - -all: - @for i in $(DIRS) xxx; do \ - if test -r $$i/Makefile ; then \ - echo "entering directory $$i building $@";\ - (cd $$i ; ${MAKE} $@); \ - fi; \ - done - -.DEFAULT: - @for i in $(DIRS) xxx; do \ - if test -r $$i/Makefile ; then \ - echo "entering directory $$i building $@";\ - (cd $$i ; ${MAKE} $@); \ - fi; \ - done diff --git a/setup/general/makedoc b/setup/general/makedoc deleted file mode 100644 index ca0ef855e5..0000000000 --- a/setup/general/makedoc +++ /dev/null @@ -1,102 +0,0 @@ -SHELL=/bin/sh - -FILE_BASE=$(TEX_BASE:.tex=) - -BMP_FILES=$(XPM_FILES:.xpm=.bmp) -EPS_FILES=$(XPM_FILES:.xpm=.eps) -GIF_FILES=$(XPM_FILES:.xpm=.gif) - -HTML_BUTTONS=back.gif forward.gif contents.gif up.gif - -all:: doc - -clean:: - @ for each in $(DIRS) . ; do \ - ( cd $$each; \ - rm -f *.bmp *.eps *.gif *.aux *.dvi *.log \ - *.ps *.toc *~ *.idx *.hlp *.html \ - *.rtf *.ref *.xlp *.con *.win *.fts \ - *.hpj *.HLP; \ - ); done - -doc:: doc_ps doc_html doc_xlp doc_winhelp doc_rtf - -############################################# - -doc_ps:: $(FILE_BASE).ps - -$(FILE_BASE).ps: $(FILE_BASE).dvi - dvips $(FILE_BASE).dvi -o$@ - -############################################# - -doc_dvi:: $(FILE_BASE).dvi - -$(FILE_BASE).dvi: $(FILE_BASE).tex $(TEX_ADDITIONAL) $(EPS_FILES) - latex $(FILE_BASE).tex - latex $(FILE_BASE).tex - -############################################# - -doc_xlp:: $(FILE_BASE).xlp - -$(FILE_BASE).xlp: $(FILE_BASE).tex $(TEX_ADDITIONAL) - ../../../bin/$(OSTYPE)/tex2rtf $(FILE_BASE).tex $(FILE_BASE).xlp -twice -xlp - -############################################# - -doc_html:: $(FILE_BASE)_contents.html $(FILE_BASE).html - -$(FILE_BASE).html: - @ln -s $(FILE_BASE)_contents.html $@ - -$(FILE_BASE)_contents.html: $(FILE_BASE).tex $(TEX_ADDITIONAL) $(GIF_FILES) $(HTML_BUTTONS) - ../../../bin/$(OSTYPE)/tex2rtf $(FILE_BASE).tex $(FILE_BASE) -twice -html - -############################################# - -doc_rtf:: $(FILE_BASE).rtf - -$(FILE_BASE).rtf: $(FILE_BASE).tex $(TEX_ADDITIONAL) $(BMP_FILES) - ../../../bin/$(OSTYPE)/tex2rtf $(FILE_BASE).tex $(FILE_BASE).rtf -twice -rtf - -############################################# - -doc_winhelp:: $(FILE_BASE).win - -$(FILE_BASE).win: $(FILE_BASE).tex $(TEX_ADDITIONAL) $(BMP_FILES) - ../../../bin/$(OSTYPE)/tex2rtf $(FILE_BASE).tex $(FILE_BASE).win -twice -winhelp - @echo final conversion still needs to be done by MSWin - -############################################# - -subst:: - @if test "x$(OLD)" = x; then \ - echo "OLD not defined!"; exit -1; \ - fi - @if test "x$(NEW)" = x; then \ - echo "NEW not defined!"; exit -1; \ - fi - @for each in $(TEX_BASE) $(TEX_ADITIONAL) ; do \ - cat $$each | sed "s/$(OLD)/$(NEW)/g" > /tmp/subst; \ - rm $$each; cp /tmp/subst $$each; rm /tmp/subst; \ - done - -############################################# - -.SUFFIXES: -.SUFFIXES: .eps .xpm -.SUFFIXES: .bmp .xpm -.SUFFIXES: .gif .xpm - -.xpm.eps : - @$(RM) -f $@ - xpmtoppm $< | ppmtogif | giftopnm | pnmtops -rle -center -noturn -scale 0.5 - > $@ - -.xpm.bmp : - @$(RM) -f $@ - xpmtoppm $< | ppmtobmp -windows - > $@ - -.xpm.gif : - @$(RM) -f $@ - xpmtoppm $< | ppmtogif -interlace - > $@ diff --git a/setup/general/mygrep b/setup/general/mygrep deleted file mode 100755 index fcf54dcad9..0000000000 --- a/setup/general/mygrep +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh -grep $@ -exit 0 diff --git a/setup/general/needed b/setup/general/needed deleted file mode 100755 index 286931a793..0000000000 --- a/setup/general/needed +++ /dev/null @@ -1,10 +0,0 @@ -#! /bin/sh - -for each in $@ ; do - LINE=`grep " $each " ../$OSTYPE/wx_setup.h | grep "#define" | grep 1` - if test "x$LINE" = x ; then - echo "$each needed to compile"; - exit 1; - fi -done - diff --git a/setup/maketmpl.in b/setup/maketmpl.in deleted file mode 100644 index 25051c1aff..0000000000 --- a/setup/maketmpl.in +++ /dev/null @@ -1,126 +0,0 @@ -# Makefile for Autoconf. -# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. - -# This program 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, 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. - -#### Start of system configuration section. #### - -GLOBAL_LIB_DIR = $(WXBASEDIR)/lib/$(OS) -GLOBAL_BIN_DIR = $(WXBASEDIR)/bin/$(OS) - -# define toolkit to use -TOOLKIT_DEF = -D@TOOLKIT_DEF@ - -# general compiler stuff -OPTIMISE = @OPTIMISE@ -PROFILE = @PROFILE@ -DEBUG = @WXDEBUG@ @WXDEBUG_DEFINE@ - -# c-compiler stuff -CC = @CC@ -CFLAGS = @CFLAGS@ $(OPTIMISE) $(PROFILE) $(DEBUG) -CPP = @CPP@ - -# c++-compiler stuff -CXX = @CXX@ -CXXFLAGS = @CXXFLAGS@ $(OPTIMISE) $(PROFILE) $(DEBUG) -CXXCPP = @CXXCPP@ - -# shared compile stuff -PICFLAGS = @PICFLAGS@ -CREATE_SHARED = @CREATE_SHARED@ - -# other stuff -RM = rm -f -LEX = @LEX@ -LEXLIB = @LEXLIB@ -YACC = @YACC@ -RANLIB = @RANLIB@ -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -AWK = @AWK@ -LN_S = @LN_S@ -CJPEG_PROG = -CONVERT_PATH = /usr/bin/X11 -CONVERT_PROG = /usr/bin/X11/convert -DJPEG_PROG = -GIFTOPNM_PROG = -NETPBM_PATH = - -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -# Directory in which to install scripts. -#bindir = @bindir@ - -# Directory in which to install library files. -datadir = @datadir@ -acdatadir = $(datadir)/autoconf - -# Directory in which to install documentation info files. -infodir = @infodir@ - -X_CFLAGS = @X_CFLAGS@ -X_LIBS = @X_LIBS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ - -GUI_TK_INCLUDE = @GUI_TK_INCLUDE@ -GUI_TK_LIBRARY = @GUI_TK_LIBRARY@ -GUI_TK_LINK = @GUI_TK_LINK@ - -OPENGL_INCLUDE = @OPENGL_INCLUDE@ -OPENGL_LIBRARY = @OPENGL_LIBRARY@ -OPENGL_LINK = @OPENGL_LINK@ - -THREADS_LINK = @THREADS_LINK@ -EXTRA_LINK = @EXTRA_LINK@ - -# INCLUDES -WX_INCLUDES = \ -$(TOOLKIT_DEF) \ --I. \ --I.. \ --I$(WXBASEDIR)/include \ --I$(WXBASEDIR)/src/zlib \ -$(GUI_TK_INCLUDE) \ -$(OPENGL_INCLUDE) \ -$(X_CFLAGS) - -# -I$(WXBASEDIR)/src/png \ -# -I$(WXBASEDIR)/src/zlib \ -# -I$(WXBASEDIR)/src/gdk_imlib \ - -WX_LIBS = -L$(GLOBAL_LIB_DIR) -lwx_gtk - -OPENGL_LIBS = $(OPENGL_LIBRARY) $(OPENGL_LINK) - -GUI_TK_LIBS = $(GUI_TK_LIBRARY) $(GUI_TK_LINK) -ldl - -LINK = $(CXX) -o $@ -LINK_LIBS= \ - $(WX_LIBS) \ - $(GUI_TK_LIBS) \ - $(X_EXTRA_LIBS) \ - $(X_PRE_LIBS) \ - $(THREADS_LINK) \ - $(EXTRA_LINK) - -# Don't include $(OPENGL_LIBS) in LINK_LIBS; they -# can be conveniently added to BIN_LINK in Makefile.in. - -#### End of system configuration section. #### diff --git a/setup/rules/bin b/setup/rules/bin deleted file mode 100644 index c179a1bbc3..0000000000 --- a/setup/rules/bin +++ /dev/null @@ -1,13 +0,0 @@ -# all that is to do -all:: checkneeds binary -clean:: clean_binary clean_obj - -# now include definite rules -BIN_BASE_DIR=. - -# include rules to create library -include $(RULES_GENERIC)/bin1 -# include rules to create objects -include $(RULES_GENERIC)/obj -# include rule to check for defines needed -include $(RULES_GENERIC)/needed diff --git a/setup/rules/bin2 b/setup/rules/bin2 deleted file mode 100644 index 87c0ad8691..0000000000 --- a/setup/rules/bin2 +++ /dev/null @@ -1,14 +0,0 @@ -# all that is to do -all:: checkneeds binary -clean:: clean_binary clean_obj - -# now include definite rules -BIN_BASE_DIR=. - -# include rules to create library -include $(RULES_GENERIC)/bin2 -# include rules to create objects -include $(RULES_GENERIC)/obj -# include rule to check for defines needed -include $(RULES_GENERIC)/needed - diff --git a/setup/rules/doc b/setup/rules/doc deleted file mode 100644 index 78f0f204f9..0000000000 --- a/setup/rules/doc +++ /dev/null @@ -1,90 +0,0 @@ -SHELL=/bin/sh - -FILE_BASE=$(TEX_BASE:.tex=) - -BMP_FILES=$(XPM_FILES:.xpm=.bmp) -EPS_FILES=$(XPM_FILES:.xpm=.eps) -GIF_FILES=$(XPM_FILES:.xpm=.gif) - -TEX2RTF=$(WXBASEDIR)/bin/$(OSTYPE)/tex2rtf - -HTML_BUTTONS=back.gif forward.gif contents.gif up.gif - -all:: doc - -clean:: - @ for each in $(DIRS) . ; do \ - ( cd $$each; \ - rm -f *.bmp *.eps *.gif *.aux *.dvi *.log \ - *.ps *.toc *~ *.idx *.hlp *.html \ - *.rtf *.ref *.xlp *.con *.win *.fts \ - *.hpj *.HLP; \ - ); done - -doc:: doc_ps doc_html doc_xlp doc_winhelp doc_rtf - -############################################# - -doc_ps:: $(FILE_BASE).ps - -$(FILE_BASE).ps: $(FILE_BASE).dvi - dvips $(FILE_BASE).dvi -o$@ - -############################################# - -doc_dvi:: $(FILE_BASE).dvi - -$(FILE_BASE).dvi: $(FILE_BASE).tex $(TEX_ADDITIONAL) $(EPS_FILES) - latex $(FILE_BASE).tex - latex $(FILE_BASE).tex - -############################################# - -doc_xlp:: $(FILE_BASE).xlp - -$(FILE_BASE).xlp: $(FILE_BASE).tex $(TEX_ADDITIONAL) - $(TEX2RTF) $(FILE_BASE).tex $(FILE_BASE).xlp -twice -xlp - -############################################# - -doc_html:: $(FILE_BASE)_contents.html $(FILE_BASE).html - -$(FILE_BASE).html: - @ln -s $(FILE_BASE)_contents.html $@ - -$(FILE_BASE)_contents.html: $(FILE_BASE).tex $(TEX_ADDITIONAL) $(GIF_FILES) $(HTML_BUTTONS) - $(TEX2RTF) $(FILE_BASE).tex $(FILE_BASE) -twice -html - -############################################# - -doc_rtf:: $(FILE_BASE).rtf - -$(FILE_BASE).rtf: $(FILE_BASE).tex $(TEX_ADDITIONAL) $(BMP_FILES) - $(TEX2RTF) $(FILE_BASE).tex $(FILE_BASE).rtf -twice -rtf - -############################################# - -doc_winhelp:: $(FILE_BASE).win - -$(FILE_BASE).win: $(FILE_BASE).tex $(TEX_ADDITIONAL) $(BMP_FILES) - ../../../bin/$(OSTYPE)/tex2rtf $(FILE_BASE).tex $(FILE_BASE).win -twice -winhelp - @echo final conversion still needs to be done by MSWin - -############################################# - -.SUFFIXES: -.SUFFIXES: .eps .xpm -.SUFFIXES: .bmp .xpm -.SUFFIXES: .gif .xpm - -.xpm.eps : - @$(RM) -f $@ - xpmtoppm $< | ppmtogif | giftopnm | pnmtops -rle -center -noturn -scale 0.5 - > $@ - -.xpm.bmp : - @$(RM) -f $@ - xpmtoppm $< | ppmtobmp -windows - > $@ - -.xpm.gif : - @$(RM) -f $@ - xpmtoppm $< | ppmtogif -interlace - > $@ diff --git a/setup/rules/gbin b/setup/rules/gbin deleted file mode 100644 index 1caea844d5..0000000000 --- a/setup/rules/gbin +++ /dev/null @@ -1,14 +0,0 @@ -# all that is to do -all:: checkneeds binary -clean:: clean_binary clean_obj - -# now include definite rules -BIN_BASE_DIR=$(GLOBAL_BIN_DIR) - -# include rules to create library -include $(RULES_GENERIC)/bin1 -# include rules to create objects -include $(RULES_GENERIC)/obj -# include rule to check for defines needed -include $(RULES_GENERIC)/needed - diff --git a/setup/rules/gbin2 b/setup/rules/gbin2 deleted file mode 100644 index 2d12986436..0000000000 --- a/setup/rules/gbin2 +++ /dev/null @@ -1,14 +0,0 @@ -# all that is to do -all:: checkneeds binary -clean:: clean_binary clean_obj - -# now include definite rules -BIN_BASE_DIR=$(GLOBAL_BIN_DIR) - -# include rules to create library -include $(RULES_GENERIC)/bin2 -# include rules to create objects -include $(RULES_GENERIC)/mkobj -# include rule to check for defines needed -include $(RULES_GENERIC)/needed - diff --git a/setup/rules/generic/bin1 b/setup/rules/generic/bin1 deleted file mode 100644 index d4c0bcdc64..0000000000 --- a/setup/rules/generic/bin1 +++ /dev/null @@ -1,8 +0,0 @@ -binary:: binary1 - -depend_binary:: depend_binary1 - -clean_binary:: clean_binary1 - -include $(RULES_GENERIC)/bin1gen - diff --git a/setup/rules/generic/bin1gen b/setup/rules/generic/bin1gen deleted file mode 100644 index c11c5a3634..0000000000 --- a/setup/rules/generic/bin1gen +++ /dev/null @@ -1,16 +0,0 @@ -# create binary - -binary1:: $(BIN_BASE_DIR)/$(BIN_TARGET) - -$(BIN_BASE_DIR)/$(BIN_TARGET): $(BIN_OBJ) - @$(RM) -f $@ - $(LINK) $(BIN_OBJ) -L. $(BIN_LINK) $(LINK_LIBS) - -# defining dependencies - -depend_binary1:: - -# cleaning all files - -clean_binary1:: - @$(RM) -f $(BIN_BASE_DIR)/$(BIN_TARGET) diff --git a/setup/rules/generic/bin2 b/setup/rules/generic/bin2 deleted file mode 100644 index 1394b8d050..0000000000 --- a/setup/rules/generic/bin2 +++ /dev/null @@ -1,9 +0,0 @@ -binary:: binary1 binary2 - -depend_binary:: depend_binary1 depend_binary2 - -clean_binary:: clean_binary1 clean_binary2 - -include $(RULES_GENERIC)/bin1gen -include $(RULES_GENERIC)/bin2gen - diff --git a/setup/rules/generic/bin2gen b/setup/rules/generic/bin2gen deleted file mode 100644 index b1ab3c4260..0000000000 --- a/setup/rules/generic/bin2gen +++ /dev/null @@ -1,16 +0,0 @@ -# create binary - -binary2:: $(BIN_BASE_DIR)/$(BIN2_TARGET) - -$(BIN_BASE_DIR)/$(BIN2_TARGET): $(BIN2_OBJ) - @$(RM) -f $@ - $(LINK) $(BIN2_OBJ) -L. $(BIN2_LINK) $(LINK_LIBS) - -# defining dependencies - -depend_binary2:: - -# cleaning all files - -clean_binary2:: - @$(RM) -f $(BIN_BASE_DIR)/$(BIN2_TARGET) diff --git a/setup/rules/generic/depend b/setup/rules/generic/depend deleted file mode 100644 index 0640db13c3..0000000000 --- a/setup/rules/generic/depend +++ /dev/null @@ -1,18 +0,0 @@ -depend:: - @echo "$(CXX) -MM \ - $(WX_INCLUDES) \ - $(ADD_COMPILE) \ - $(LIB_SRC) $(BIN_SRC) $(BIN2_SRC)" - @(cd .. ;\ - $(CXX) -MM \ - $(WX_INCLUDES) \ - $(ADD_COMPILE) \ - $(LIB_SRC) $(BIN_SRC) $(BIN2_SRC)\ - ) > .depend - @cp Makefile Makefile.bak - @cat Makefile.bak | awk 'BEGIN { found=0;} { if ( $$0 == "# DO NOT DELETE") {found=1} ; { if ( found==0 ) { print $$0; } } }' > Makefile1 - @echo "# DO NOT DELETE" >> Makefile1 - @cat .depend >> Makefile1 - @mv Makefile1 Makefile - @rm .depend - diff --git a/setup/rules/generic/globals b/setup/rules/generic/globals deleted file mode 100644 index 3b6413a923..0000000000 --- a/setup/rules/generic/globals +++ /dev/null @@ -1,15 +0,0 @@ -# creates subdirectories for object-files in case they are needed... - -subdirs:: - @if test "x$(SRC_DIR)" != x ; then \ - echo -n "Creating necessary subdirs: "; \ - for each in $(SRC_DIR) xxx; do \ - if test "x$$each" != xxxx; then \ - echo -n "$$each "; \ - if test ! -d $$each ; then \ - mkdir $$each ; \ - fi; \ - fi; \ - done; \ - echo "";\ - fi diff --git a/setup/rules/generic/lib b/setup/rules/generic/lib deleted file mode 100644 index 589acc5822..0000000000 --- a/setup/rules/generic/lib +++ /dev/null @@ -1,17 +0,0 @@ -# create library - -library:: $(LIB_BASE_DIR)/lib$(LIB_TARGET).a - -$(LIB_BASE_DIR)/lib$(LIB_TARGET).a: $(LIB_OBJ) - @$(RM) -f $@ - $(AR) rv $@ $(LIB_OBJ) - -# defining dependencies - -depend_library:: - -# cleaning all files - -clean_library:: - @$(RM) -f $(LIB_BASE_DIR)/lib$(LIB_TARGET).a - diff --git a/setup/rules/generic/needed b/setup/rules/generic/needed deleted file mode 100644 index 5cd5975729..0000000000 --- a/setup/rules/generic/needed +++ /dev/null @@ -1,24 +0,0 @@ -#SHELL=/bin/sh -MYGREP=$(WXBASEDIR)/setup/general/mygrep -checkneeds:: - @if test "x$(NEEDED_DEFINES)" != x ; then \ - RESULT=0 ; \ - for each in $(NEEDED_DEFINES) xxx; do \ - if test "$$each" != xxx ; then \ - LINE=`cat $(SETUP_DIR)/wx_setup.h \ - | sed "s/ /,/g" \ - | $(MYGREP) ",$$each," \ - | $(MYGREP) "#define" \ - | $(MYGREP) "1" ` ; \ - if test "x$$LINE" = x ; then \ - (TMPVAR=`pwd`;\ - TMPVAR=`dirname $$TMPVAR`;\ - echo "$$each needed to compile "`basename $$TMPVAR`"...";\ - );\ - RESULT=1 ; \ - fi; \ - fi; \ - done ;\ - exit $$RESULT; \ - fi - diff --git a/setup/rules/generic/obj b/setup/rules/generic/obj deleted file mode 100644 index 92beab8180..0000000000 --- a/setup/rules/generic/obj +++ /dev/null @@ -1,30 +0,0 @@ -.SUFFIXES: -.SUFFIXES: .o .c -.SUFFIXES: .o .cc -.SUFFIXES: .o .cpp - -VPATH= .. - -.c.o : - @$(RM) -f $@ - $(CC) -c -o $@ $(CFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $< - -.cc.o : - @$(RM) -f $@ - $(CXX) -c -o $@ $(CXXFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $< - -.cpp.o : - @$(RM) -f $@ - $(CXX) -c -o $@ $(CXXFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $< - -clean_obj:: - @$(RM) *.o *.osh - @if test "x$(SRC_DIR)" != x ; then \ - for each in $(SRC_DIR) xxx; do \ - if test -d $$each ; then \ - $(RM) $$each/*.o $$each/*.osh ; \ - fi; \ - done; \ - fi; - -include $(RULES_GENERIC)/depend diff --git a/setup/rules/generic/slib b/setup/rules/generic/slib deleted file mode 100644 index 87b331d322..0000000000 --- a/setup/rules/generic/slib +++ /dev/null @@ -1,21 +0,0 @@ -# create library - -library:: $(LIB_BASE_DIR)/lib$(LIB_TARGET).a - -$(LIB_BASE_DIR)/lib$(LIB_TARGET).a: $(LIB_OBJ) - @$(RM) -f $@ $(LIB_BASE_DIR)/lib$(LIB_TARGET).so $(LIB_BASE_DIR)/lib$(LIB_TARGET).so.* - @if test "x$(CREATE_SHARED)" != x; then\ - echo "$(SHARE_DIR)/$(CREATE_SHARED) $(CC) $(LIB_BASE_DIR)/lib$(LIB_TARGET).so $(LIB_MAJOR) $(LIB_MINOR) $(LIB_OBJ)"; \ - $(SHARE_DIR)/$(CREATE_SHARED) $(CC) $(LIB_BASE_DIR)/lib$(LIB_TARGET).so $(LIB_MAJOR) $(LIB_MINOR) $(LIB_OBJ); \ - fi - $(AR) rv $@ $(LIB_OBJ) - -# defining dependencies - -depend_library:: - -# cleaning all files - -clean_library:: - @$(RM) -f $(LIB_BASE_DIR)/lib$(LIB_TARGET).a $(LIB_BASE_DIR)/lib$(LIB_TARGET).so.* $(LIB_BASE_DIR)/lib$(LIB_TARGET).so - diff --git a/setup/rules/generic/sobj b/setup/rules/generic/sobj deleted file mode 100644 index b2d7c6aaba..0000000000 --- a/setup/rules/generic/sobj +++ /dev/null @@ -1,42 +0,0 @@ -.SUFFIXES: -.SUFFIXES: .o .c -.SUFFIXES: .o .cc -.SUFFIXES: .o .cpp - -VPATH= .. - -.c.o : - @$(RM) -f $@ $@sh - @if test "x$(PICFLAGS)" != x; then \ - echo "$(CC) -c -o $@sh $(PICFLAGS) $(CFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $<";\ - $(CC) -c -o $@sh $(PICFLAGS) $(CFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $<;\ - fi - $(CC) -c -o $@ $(CFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $< - -.cc.o : - @$(RM) -f $@ $@sh - @if test "x$(PICFLAGS)" != x; then \ - echo "$(CXX) -c -o $@sh $(PICFLAGS) $(CXXFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $<";\ - $(CXX) -c -o $@sh $(PICFLAGS) $(CXXFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $<;\ - fi - $(CXX) -c -o $@ $(CXXFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $< - -.cpp.o : - @$(RM) -f $@ $@sh - @if test "x$(PICFLAGS)" != x; then \ - echo "$(CXX) -c -o $@sh $(PICFLAGS) $(CXXFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $<";\ - $(CXX) -c -o $@sh $(PICFLAGS) $(CXXFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $<;\ - fi - $(CXX) -c -o $@ $(CXXFLAGS) -I.. $(WX_INCLUDES) $(ADD_COMPILE) $(WX_DEFINES) $< - -clean_obj:: - @$(RM) *.o *.osh - @if test "x$(SRC_DIR)" != x ; then \ - for each in $(SRC_DIR) xxx; do \ - if test -d $$each ; then \ - $(RM) $$each/*.o $$each/*.osh ; \ - fi; \ - done; \ - fi; - -include $(RULES_GENERIC)/depend diff --git a/setup/rules/glib b/setup/rules/glib deleted file mode 100644 index b0e244789c..0000000000 --- a/setup/rules/glib +++ /dev/null @@ -1,15 +0,0 @@ -# all that is to do -all:: checkneeds library -clean:: clean_library clean_obj - -# now include definite rules -LIB_BASE_DIR=$(GLOBAL_LIB_DIR) - -# include rules to create library -include $(RULES_GENERIC)/lib -# include rules to create objects -include $(RULES_GENERIC)/obj -# include rule to check for defines needed -include $(RULES_GENERIC)/needed - - diff --git a/setup/rules/glibbin b/setup/rules/glibbin deleted file mode 100644 index edb0510517..0000000000 --- a/setup/rules/glibbin +++ /dev/null @@ -1,17 +0,0 @@ -# all that is to do -all:: checkneeds library binary -clean:: clean_library clean_obj clean_binary - -# now include definite rules -LIB_BASE_DIR=$(GLOBAL_LIB_DIR) -BIN_BASE_DIR=. - -# include rules to create library -include $(RULES_GENERIC)/lib -# include rules to create binary -include $(RULES_GENERIC)/bin1 -# include rules to create objects -include $(RULES_GENERIC)/obj -# include rule to check for defines needed -include $(RULES_GENERIC)/needed - diff --git a/setup/rules/glibgbin b/setup/rules/glibgbin deleted file mode 100644 index ee7a4023e3..0000000000 --- a/setup/rules/glibgbin +++ /dev/null @@ -1,18 +0,0 @@ -# all that is to do -all:: checkneeds library binary -depend:: depend_library depend_binary -clean:: clean_library clean_obj clean_binary - -# now include definite rules -LIB_BASE_DIR=$(GLOBAL_LIB_DIR) -BIN_BASE_DIR=$(GLOBAL_BIN_DIR) - -# include rules to create library -include $(RULES_GENERIC)/lib -# include rules to create binary -include $(RULES_GENERIC)/mkbin1 -# include rules to create objects -include $(RULES_GENERIC)/obj -# include rule to check for defines needed -include $(RULES_GENERIC)/needed - diff --git a/setup/rules/gslib b/setup/rules/gslib deleted file mode 100644 index 794a2b0d23..0000000000 --- a/setup/rules/gslib +++ /dev/null @@ -1,15 +0,0 @@ -# all that is to do -all:: checkneeds library -clean:: clean_library clean_obj - -# now include definite rules -LIB_BASE_DIR=$(GLOBAL_LIB_DIR) - -# include rules to create shared library -include $(RULES_GENERIC)/slib -# include rules to create shared objects -include $(RULES_GENERIC)/sobj -# include rule to check for defines needed -include $(RULES_GENERIC)/needed - - diff --git a/setup/rules/lib b/setup/rules/lib deleted file mode 100644 index 7831e41a4a..0000000000 --- a/setup/rules/lib +++ /dev/null @@ -1,14 +0,0 @@ -# all that is to do -all:: checkneeds library -clean:: clean_library clean_obj - -# now include definite rules -LIB_BASE_DIR=. - -# include rules to create library -include $(RULES_GENERIC)/lib -# include rules to create objects -include $(RULES_GENERIC)/obj -# include rule to check for defines needed -include $(RULES_GENERIC)/needed - diff --git a/setup/rules/libbin b/setup/rules/libbin deleted file mode 100644 index 97456c45f2..0000000000 --- a/setup/rules/libbin +++ /dev/null @@ -1,17 +0,0 @@ -# all that is to do -all:: checkneeds library binary -clean:: clean_library clean_obj clean_binary - -# now include definite rules -LIB_BASE_DIR=. -BIN_BASE_DIR=. - -# include rules to create library -include $(RULES_GENERIC)/lib -# include rules to create binary -include $(RULES_GENERIC)/bin1 -# include rules to create objects -include $(RULES_GENERIC)/obj -# include rule to check for defines needed -include $(RULES_GENERIC)/needed - diff --git a/setup/rules/libgbin b/setup/rules/libgbin deleted file mode 100644 index dc2ab616a9..0000000000 --- a/setup/rules/libgbin +++ /dev/null @@ -1,17 +0,0 @@ -# all that is to do -all:: checkneeds library binary -clean:: clean_library clean_obj clean_binary - -# now include definite rules -LIB_BASE_DIR=. -BIN_BASE_DIR=$(GLOBAL_BIN_DIR) - -# include rules to create library -include $(RULES_GENERIC)/lib -# include rules to create binary -include $(RULES_GENERIC)/mkbin1 -# include rules to create objects -include $(RULES_GENERIC)/obj -# include rule to check for defines needed -include $(RULES_GENERIC)/needed - diff --git a/setup/setup.hin b/setup/setup.hin deleted file mode 100644 index fd49049ab4..0000000000 --- a/setup/setup.hin +++ /dev/null @@ -1,562 +0,0 @@ -/* setup.h - - Do not edit this file. It is autogenerated by configure. - - Leave the following blank line there!! Autoheader needs it. */ - - -// ------------------------------------------------------------------------ -// Features as requested by configure -// ------------------------------------------------------------------------ - -#ifndef __GTKSETUPH__ -#define __GTKSETUPH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -/* define the system to compile */ -#undef __WXGTK__ -#undef __WXMOTIF__ -#undef __WXQT__ -#undef __UNIX__ -#undef __LINUX__ -#undef __SGI__ -#undef __HPUX__ -#undef __SYSV__ -#undef __SVR4__ -#undef __AIX__ -#undef __SUN__ -#undef __SOLARIS__ -#undef __SUNOS__ -#undef __ALPHA__ -#undef __OSF__ -#undef __BSD__ -#undef __FREEBSD__ -#undef __VMS__ -#undef __ULTRIX__ -#undef __DATA_GENERAL__ - -//------------------------------------------------------------------------ -// library options -//------------------------------------------------------------------------ - -/* - * Use zlib - */ -#undef USE_ZLIB -/* - * Use gdk_imlib - */ -#undef USE_GDK_IMLIB -/* - * Use libpng - */ -#undef USE_LIBPNG -/* - * Use iODBC - */ -#undef USE_ODBC -/* - * Use Threads - */ -#undef USE_THREADS - -//------------------------------------------------------------------------ -// GUI control options -//------------------------------------------------------------------------ - -/* - * Use gauge item - */ -#undef USE_GAUGE -/* - * Use scrollbar item - */ -#undef USE_SCROLLBAR -/* - * Use notebook item - */ -#undef USE_NOTEBOOK -/* - * Use listctrl item - */ -#undef USE_LISTCTRL -/* - * Use treectrl item - */ -#undef USE_TREECTRL -/* - * Use grid item - */ -#undef USE_GRID -/* - * Use tab dialog item - */ -#undef USE_TAB_DIALOG - -//------------------------------------------------------------------------ -// non-GUI options -//------------------------------------------------------------------------ - -/* - * Use fraction class - */ -#undef USE_FRACTION -/* - * Use time and date classes - */ -#undef USE_TIMEDATE -/* - * Use config system - */ -#undef USE_CONFIG -/* - * Use intl system - */ -#undef USE_INTL -/* - * Use streams - */ -#undef USE_STREAMS -/* - * Use wxFile - */ -#undef USE_FILE -/* - * Use wxTextFile - */ -#undef USE_TEXTFILE -/* - * Use class serialization - */ -#undef USE_SERIAL - -//------------------------------------------------------------------------ -// PS options -//------------------------------------------------------------------------ - -/* - * Use font metric files in GetTextExtent for wxPostScriptDC - * Use consistent PostScript fonts for AFM and printing (!) - */ -#undef USE_AFM_FOR_POSTSCRIPT -#undef WX_NORMALIZED_PS_FONTS -/* - * Use PostScript device context - */ -#undef USE_POSTSCRIPT - -//------------------------------------------------------------------------ -// misc options -//------------------------------------------------------------------------ - -/* - * Use Interprocess communication - */ -#undef USE_IPC -/* - * Use wxGetResource & wxWriteResource (change .Xdefaults) - */ -#undef USE_RESOURCES -/* - * Use clipboard - */ -#undef USE_CLIPBOARD -/* - * Use dnd - */ -#undef USE_DND -/* - * Use wxWindows layout constraint system - */ -#undef USE_CONSTRAINTS - -//------------------------------------------------------------------------ -// architecture options -//------------------------------------------------------------------------ - -/* - * Use the mdi architecture - */ -#undef USE_MDI_ARCHITECTURE -/* - * Use the document/view architecture - */ -#undef USE_DOC_VIEW_ARCHITECTURE -/* - * Use the print/preview architecture - */ -#undef USE_PRINTING_ARCHITECTURE - -//------------------------------------------------------------------------ -// Prolog and wxWindows' resource system options -//------------------------------------------------------------------------ - -/* - * Use Prolog IO - */ -#undef USE_PROLOGIO -/* - * Use Remote Procedure Call (Needs USE_IPC and USE_PROLOGIO) - */ -#undef USE_RPC -/* - * Use wxWindows resource loading (.wxr-files) (Needs USE_PROLOGIO 1) - */ -#undef USE_WX_RESOURCES - -//------------------------------------------------------------------------ -// the rest -//------------------------------------------------------------------------ - -/* - * Implement a GLCanvas class as an interface to OpenGL, using the GLX - * extension to the X11 protocol. You can use the (free) Mesa library - * if you don't have a 'real' OpenGL. - */ -#undef USE_GLX -/* - * Use wxWindows help facility (needs USE_IPC 1) - */ -#undef USE_HELP -/* - * Use iostream.h rather than iostream - */ -#undef USE_IOSTREAMH -/* - * Use Metafile and Metafile device context - */ -#undef USE_METAFILE -/* - * Use wxGraph - */ -#undef USE_WXGRAPH -/* - * Use wxTree - */ -#undef USE_WXTREE -/* - * Use Apple Ieee-double converter - */ -#undef USE_APPLE_IEEE -/* Compatibility with 1.66 API. - Level 0: no backward compatibility, all new features - Level 1: wxDC, OnSize (etc.) compatibility, but - some new features such as event tables */ -#define WXWIN_COMPATIBILITY 1 -/* - * Enables debugging: memory tracing, assert, etc., contains debug level - */ -#undef WXDEBUG -/* - * Enables debugging version of wxObject::new and wxObject::delete (IF WXDEBUG) - * WARNING: this code may not work with all architectures, especially - * if alignment is an issue. - */ -#undef USE_MEMORY_TRACING -/* - * Enable debugging version of global memory operators new and delete - * Disable it, If this causes problems (e.g. link errors) - */ -#undef USE_GLOBAL_MEMORY_OPERATORS -/* - * If WXDEBUG && USE_MEMORY_TRACING && USE_GLOBAL_MEMORY_OPERATORS - * used to debug the memory allocation of wxWindows Xt port code - */ -#define USE_INTERNAL_MEMORY_TRACING 0 -/* - * Matthews garbage collection (used for MrEd?) - */ -#define WXGARBAGE_COLLECTION_ON 0 -/* - * Use splines - */ -#define USE_SPLINES 1 -/* - * USE_DYNAMIC_CLASSES is TRUE for the Xt port - */ -#define USE_DYNAMIC_CLASSES 1 -/* - * Disable this if your compiler can't cope - * with omission of prototype parameters. - */ -#define REMOVE_UNUSED_ARG 1 -/* - * The const keyword is being introduced more in wxWindows. - * You can use this setting to maintain backward compatibility. - * If 0: will use const wherever possible. - * If 1: will use const only where necessary - * for precompiled headers to work. - * If 2: will be totally backward compatible, but precompiled - * headers may not work and program size will be larger. - */ -#define CONST_COMPATIBILITY 0 - -// ------------------------------------------------------------------------ -// System-specific stuff -// ------------------------------------------------------------------------ - -/* acconfig.h - This file is in the public domain. - - Descriptive text for the C preprocessor macros that - the distributed Autoconf macros can define. - No software package will use all of them; autoheader copies the ones - your configure.in uses into your configuration header file templates. - - The entries are in sort -df order: alphabetical, case insensitive, - ignoring punctuation (such as underscores). Although this order - can split up related entries, it makes it easier to check whether - a given entry is in the file. */ - -/* Define if on AIX 3. - System headers sometimes define this. - We just want to avoid a redefinition error message. */ -#ifndef _ALL_SOURCE -#undef _ALL_SOURCE -#endif - -/* Define if using alloca.c. */ -#undef C_ALLOCA - -/* Define if type char is unsigned and you are not using gcc. */ -#ifndef __CHAR_UNSIGNED__ -#undef __CHAR_UNSIGNED__ -#endif - -/* Define if the closedir function returns void instead of int. */ -#undef CLOSEDIR_VOID - -/* Define to empty if the keyword does not work. */ -#undef const - -/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. - This function is required for alloca.c support on those systems. */ -#undef CRAY_STACKSEG_END - -/* Define for DGUX with . */ -#undef DGUX - -/* Define if you have . */ -#undef DIRENT - -/* Define to the type of elements in the array set by `getgroups'. - Usually this is either `int' or `gid_t'. */ -#undef GETGROUPS_T - -/* Define if the `getloadavg' function needs to be run setuid or setgid. */ -#undef GETLOADAVG_PRIVILEGED - -/* Define if the `getpgrp' function takes no argument. */ -#undef GETPGRP_VOID - -/* Define to `int' if doesn't define. */ -#undef gid_t - -/* Define if you have alloca, as a function or macro. */ -#undef HAVE_ALLOCA - -/* Define if you have and it should be used (not on Ultrix). */ -#undef HAVE_ALLOCA_H - -/* Define if you don't have vprintf but do have _doprnt. */ -#undef HAVE_DOPRNT - -/* Define if your system has its own `getloadavg' function. */ -#undef HAVE_GETLOADAVG - -/* Define if you have the getmntent function. */ -#undef HAVE_GETMNTENT - -/* Define if the `long double' type works. */ -#undef HAVE_LONG_DOUBLE - -/* Define if you support file names longer than 14 characters. */ -#undef HAVE_LONG_FILE_NAMES - -/* Define if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define if system calls automatically restart after interruption - by a signal. */ -#undef HAVE_RESTARTABLE_SYSCALLS - -/* Define if your struct stat has st_blksize. */ -#undef HAVE_ST_BLKSIZE - -/* Define if your struct stat has st_blocks. */ -#undef HAVE_ST_BLOCKS - -/* Define if you have the strcoll function and it is properly defined. */ -#undef HAVE_STRCOLL - -/* Define if your struct stat has st_rdev. */ -#undef HAVE_ST_RDEV - -/* Define if you have the strftime function. */ -#undef HAVE_STRFTIME - -/* Define if you have that is POSIX.1 compatible. */ -#undef HAVE_SYS_WAIT_H - -/* Define if your struct tm has tm_zone. */ -#undef HAVE_TM_ZONE - -/* Define if you don't have tm_zone but do have the external array - tzname. */ -#undef HAVE_TZNAME - -/* Define if you have . */ -#undef HAVE_UNISTD_H - -/* Define if utime(file, NULL) sets file's timestamp to the present. */ -#undef HAVE_UTIME_NULL - -/* Define if you have . */ -#undef HAVE_VFORK_H - -/* Define if you have the vprintf function. */ -#undef HAVE_VPRINTF - -/* Define if you have the wait3 system call. */ -#undef HAVE_WAIT3 - -/* Define as __inline if that's what the C compiler calls it. */ -#ifndef __cplusplus -#undef inline -#endif - -/* Define if major, minor, and makedev are declared in . */ -#undef MAJOR_IN_MKDEV - -/* Define if major, minor, and makedev are declared in . */ -#undef MAJOR_IN_SYSMACROS - -/* Define if on MINIX. */ -#undef _MINIX - -/* Define to `int' if doesn't define. */ -#undef mode_t - -/* Define if you don't have , but have . */ -#undef NDIR - -/* Define if you have , and doesn't declare the - mem* functions. */ -#undef NEED_MEMORY_H - -/* Define if your struct nlist has an n_un member. */ -#undef NLIST_NAME_UNION - -/* Define if you have . */ -#undef NLIST_STRUCT - -/* Define if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - -/* Define to `long' if doesn't define. */ -#undef off_t - -/* Define to `int' if doesn't define. */ -#undef pid_t - -/* Define if the system does not provide POSIX.1 features except - with this defined. */ -#undef _POSIX_1_SOURCE - -/* Define if you need to in order for stat and other things to work. */ -#undef _POSIX_SOURCE - -/* Define as the return type of signal handlers (int or void). */ -#undef RETSIGTYPE - -/* Define if the setvbuf function takes the buffering type as its second - argument and the buffer pointer as the third, as on System V - before release 3. */ -#undef SETVBUF_REVERSED - -/* Define SIZESOF for some Objects */ -#undef SIZEOF_INT -#undef SIZEOF_INT_P -#undef SIZEOF_LONG - -/* Define to `unsigned' if doesn't define. */ -#undef size_t - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown - */ -#undef STACK_DIRECTION - -/* Define if the `S_IS*' macros in do not work properly. */ -#undef STAT_MACROS_BROKEN - -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define on System V Release 4. */ -#undef SVR4 - -/* Define on BSD */ -#undef BSD - -/* Define on System V */ -#undef SYSV - -/* Define if you don't have , but have . */ -#undef SYSDIR - -/* Define if you don't have , but have . */ -#undef SYSNDIR - -/* Define if `sys_siglist' is declared by . */ -#undef SYS_SIGLIST_DECLARED - -/* Define if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - -/* Define if your declares struct tm. */ -#undef TM_IN_SYS_TIME - -/* Define to `int' if doesn't define. */ -#undef uid_t - -/* Define for Encore UMAX. */ -#undef UMAX - -/* Define for Encore UMAX 4.3 that has - instead of . */ -#undef UMAX4_3 - -/* Define if you do not have , index, bzero, etc.. */ -#undef USG - -/* Define if the system is System V Release 4 */ -#undef SVR4 - -/* Define vfork as fork if vfork does not work. */ -#undef vfork - -/* Define if the closedir function returns void instead of int. */ -#undef VOID_CLOSEDIR - -/* Define if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX). */ -#undef WORDS_BIGENDIAN - -/* Define if lex declares yytext as a char * by default, not a char[]. */ -#undef YYTEXT_POINTER - -#endif /* __GTKSETUPH__ */ - - -/* Leave that blank line there!! Autoheader needs it. - If you're adding to this file, keep in mind: - The entries are in sort -df order: alphabetical, case insensitive, - ignoring punctuation (such as underscores). */ diff --git a/setup/shared/sharedAIX b/setup/shared/sharedAIX deleted file mode 100755 index cc9b6e164e..0000000000 --- a/setup/shared/sharedAIX +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/sh - -COMPILER=$1 -LIBRARY_BASE=$2 -LIBRARY_MAJOR=$3 -LIBRARY_MINOR=$4 -shift 3 -LIBRARY_OBJS= -while (test $# -ne 1) do - shift; - LIBRARY_OBJS="$LIBRARY_OBJS $1sh"; -done - -LIBRARY_BASE=`echo $LIBRARY_BASE | sed 's/.so/.sa/'` -LIBRARY_NAME=`basename $LIBRARY_BASE` -LIBRARY_FILE=$LIBRARY_BASE - -echo "Creating shared library: $LIBRARY_FILE" - -ar cr $LIBRARY_FILE~ $LIBRARY_OBJS -nm $LIBRARY_OBJS | awk '/ [BD] /{print $$3}' | sort | uniq > ${LIBRARY_FILE}.syms -ld -o shr.o $LIBRARY_FILE~ -lX11 -lXt -lc -lm -H512 -T512 -bE:${LIBRARY_FILE}.syms -bM:SRE -rm -f $LIBRARY_FILE~ -ar ruv $LIBRARY_FILE shr.o -chmod a+x $LIBRARY_FILE - diff --git a/setup/shared/sharedBsd b/setup/shared/sharedBsd deleted file mode 100755 index 4e6db1ccc7..0000000000 --- a/setup/shared/sharedBsd +++ /dev/null @@ -1,33 +0,0 @@ -#! /bin/sh - -#LIBRARY_BASE=`echo $1 | sed 's/.a/.so/'` -COMPILER=$1 -LIBRARY_BASE=$2 -LIBRARY_MAJOR=$3 -LIBRARY_MINOR=$4 -shift 3 -LIBRARY_OBJS= -while (test $# -ne 1) do - shift; - LIBRARY_OBJS="$LIBRARY_OBJS $1sh"; -done - -LIBRARY_NAME=`basename $LIBRARY_BASE` -LIBRARY_FILE=$LIBRARY_BASE.$LIBRARY_MAJOR.$LIBRARY_MINOR - -echo "Creating shared library: $LIBRARY_FILE" - -if test "x$COMPILER" = xgcc ; then - gcc -shared -o $LIBRARY_FILE $LIBRARY_OBJS -else - CC -Bshareable -Bforcearchive -o $LIBRARY_FILE $LIBRARY_OBJS -fi -chmod a+x $LIBRARY_FILE -rm -f $LIBRARY_BASE.$LIBRARY_MAJOR -ln -s $LIBRARY_NAME.$LIBRARY_MAJOR.$LIBRARY_MINOR $LIBRARY_BASE.$LIBRARY_MAJOR -rm -f $LIBRARY_BASE -ln -s $LIBRARY_NAME.$LIBRARY_MAJOR $LIBRARY_BASE - - - - diff --git a/setup/shared/sharedDgux b/setup/shared/sharedDgux deleted file mode 100755 index d2bfc2a1a2..0000000000 --- a/setup/shared/sharedDgux +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/sh - -COMPILER=$1 -LIBRARY_BASE=$2 -LIBRARY_MAJOR=$3 -LIBRARY_MINOR=$4 -shift 3 -LIBRARY_OBJS= -while (test $# -ne 1) do - shift; - LIBRARY_OBJS="$LIBRARY_OBJS $1sh"; -done - -LIBRARY_BASE=`echo $LIBRARY_BASE | sed 's/.so/.sl/'` -LIBRARY_NAME=`basename $LIBRARY_BASE` -LIBRARY_FILE=$LIBRARY_BASE - -echo "Creating shared library: $LIBRARY_FILE" - -if test "x$COMPILER" = xgcc ; then - gcc -shared -h $LIBRARY_NAME -o $LIBRARY_FILE $LIBRARY_OBJS -else - CC -G -h $LIBRARY_NAME -o $LIBRARY_FILE $LIBRARY_OBJS -fi -chmod a+x $LIBRARY_FILE - - - - diff --git a/setup/shared/sharedHpux b/setup/shared/sharedHpux deleted file mode 100755 index 60c198d862..0000000000 --- a/setup/shared/sharedHpux +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/sh - -COMPILER=$1 -LIBRARY_BASE=$2 -LIBRARY_MAJOR=$3 -LIBRARY_MINOR=$4 -shift 3 -LIBRARY_OBJS= -while (test $# -ne 1) do - shift; - LIBRARY_OBJS="$LIBRARY_OBJS $1sh"; -done - -LIBRARY_BASE=`echo $LIBRARY_BASE | sed 's/.so/.sl/'` -LIBRARY_NAME=`basename $LIBRARY_BASE` -LIBRARY_FILE=$LIBRARY_BASE - -echo "Creating shared library: $LIBRARY_FILE" - -if test "x$COMPILER" = xgcc ; then - gcc -shared -o $LIBRARY_FILE $LIBRARY_OBJS -else - CC -Wl,+s -o $LIBRARY_FILE $LIBRARY_OBJS -fi -chmod a+x $LIBRARY_FILE - - - - diff --git a/setup/shared/sharedIrix b/setup/shared/sharedIrix deleted file mode 100755 index d2b5393c3d..0000000000 --- a/setup/shared/sharedIrix +++ /dev/null @@ -1,45 +0,0 @@ -#! /bin/sh -# on Irix, position independent code is the default - -#LIBRARY_BASE=`echo $1 | sed 's/.a/.so/'` -COMPILER=$1 -LIBRARY_BASE=$2 -LIBRARY_MAJOR=$3 -LIBRARY_MINOR=$4 -shift 3 -LIBRARY_OBJS= -while (test $# -ne 1) do - shift; - LIBRARY_OBJS="$LIBRARY_OBJS $1"; -done - -LIBRARY_NAME=`basename $LIBRARY_BASE` -LIBRARY_FILE=$LIBRARY_BASE.$LIBRARY_MAJOR.$LIBRARY_MINOR - -echo "Creating shared library: $LIBRARY_FILE" - -if test ! -f /tmp/so_locations; then - if test -f /usr/lib/so_locations; then - cp /usr/lib/so_locations /tmp - else - touch /tmp/so_locations - fi -fi -chmod u+w /tmp/so_locations - -if test "x$COMPILER" = xgcc ; then - gcc -shared -Wl,-update_registry,/tmp/so_locations \ - -Wl,-soname,$LIBRARY_NAME.$LIBRARY_MAJOR -o $LIBRARY_FILE $LIBRARY_OBJS -else - CC -shared -update_registry /tmp/so_locations \ - -soname $LIBRARY_NAME.$LIBRARY_MAJOR -o $LIBRARY_FILE $LIBRARY_OBJS -fi -chmod a+x $LIBRARY_FILE -rm -f $LIBRARY_BASE.$LIBRARY_MAJOR -ln -s $LIBRARY_NAME.$LIBRARY_MAJOR.$LIBRARY_MINOR $LIBRARY_BASE.$LIBRARY_MAJOR -rm -f $LIBRARY_BASE -ln -s $LIBRARY_NAME.$LIBRARY_MAJOR $LIBRARY_BASE - - - - diff --git a/setup/shared/sharedLinux b/setup/shared/sharedLinux deleted file mode 100755 index c274903db1..0000000000 --- a/setup/shared/sharedLinux +++ /dev/null @@ -1,34 +0,0 @@ -#! /bin/sh - -#LIBRARY_BASE=`echo $1 | sed 's/.a/.so/'` -COMPILER=$1 -LIBRARY_BASE=$2 -LIBRARY_MAJOR=$3 -LIBRARY_MINOR=$4 -shift 3 -LIBRARY_OBJS= -while (test $# -ne 1) do - shift; - LIBRARY_OBJS="$LIBRARY_OBJS $1sh"; -done - -LIBRARY_NAME=`basename $LIBRARY_BASE` -LIBRARY_FILE=$LIBRARY_BASE.$LIBRARY_MAJOR.$LIBRARY_MINOR - -echo "Creating shared library: $LIBRARY_FILE" - -case $COMPILER in gcc*|*gcc) - $COMPILER -shared -Wl,-soname,$LIBRARY_NAME.$LIBRARY_MAJOR -o $LIBRARY_FILE $LIBRARY_OBJS - ;; -*) - $COMPILER -shared -soname $LIBRARY_NAME.$LIBRARY_MAJOR -o $LIBRARY_FILE $LIBRARY_OBJS -esac -chmod a+x $LIBRARY_FILE -rm -f $LIBRARY_BASE.$LIBRARY_MAJOR -ln -s $LIBRARY_NAME.$LIBRARY_MAJOR.$LIBRARY_MINOR $LIBRARY_BASE.$LIBRARY_MAJOR -rm -f $LIBRARY_BASE -ln -s $LIBRARY_NAME.$LIBRARY_MAJOR $LIBRARY_BASE - - - - diff --git a/setup/shared/sharedOSF b/setup/shared/sharedOSF deleted file mode 100755 index 03ba07eca1..0000000000 --- a/setup/shared/sharedOSF +++ /dev/null @@ -1,33 +0,0 @@ -#! /bin/sh - -#LIBRARY_BASE=`echo $1 | sed 's/.a/.so/'` -COMPILER=$1 -LIBRARY_BASE=$2 -LIBRARY_MAJOR=$3 -LIBRARY_MINOR=$4 -shift 3 -LIBRARY_OBJS= -while (test $# -ne 1) do - shift; - LIBRARY_OBJS="$LIBRARY_OBJS $1sh"; -done - -LIBRARY_NAME=`basename $LIBRARY_BASE` -LIBRARY_FILE=$LIBRARY_BASE.$LIBRARY_MAJOR.$LIBRARY_MINOR - -echo "Creating shared library: $LIBRARY_FILE" - -if test "x$COMPILER" = xgcc ; then - gcc -shared -Wl,-soname,$LIBRARY_NAME -o $LIBRARY_FILE $LIBRARY_OBJS -else - $COMPILER -shared -soname $LIBRARY_NAME -o $LIBRARY_FILE $LIBRARY_OBJS -fi -chmod a+x $LIBRARY_FILE -rm -f $LIBRARY_BASE.$LIBRARY_MAJOR -ln -s $LIBRARY_NAME.$LIBRARY_MAJOR.$LIBRARY_MINOR $LIBRARY_BASE.$LIBRARY_MAJOR -rm -f $LIBRARY_BASE -ln -s $LIBRARY_NAME.$LIBRARY_MAJOR $LIBRARY_BASE - - - - diff --git a/setup/shared/sharedSolaris2 b/setup/shared/sharedSolaris2 deleted file mode 100755 index 52c9086ee2..0000000000 --- a/setup/shared/sharedSolaris2 +++ /dev/null @@ -1,33 +0,0 @@ -#! /bin/sh - -#LIBRARY_BASE=`echo $1 | sed 's/.a/.so/'` -COMPILER=$1 -LIBRARY_BASE=$2 -LIBRARY_MAJOR=$3 -LIBRARY_MINOR=$4 -shift 3 -LIBRARY_OBJS= -while (test $# -ne 1) do - shift; - LIBRARY_OBJS="$LIBRARY_OBJS $1sh"; -done - -LIBRARY_NAME=`basename $LIBRARY_BASE` -LIBRARY_FILE=$LIBRARY_BASE.$LIBRARY_MAJOR.$LIBRARY_MINOR - -echo "Creating shared library: $LIBRARY_FILE" - -if test "x$COMPILER" = xgcc ; then - gcc -shared -h $LIBRARY_NAME -o $LIBRARY_FILE $LIBRARY_OBJS -else - CC -G -h $LIBRARY_NAME -o $LIBRARY_FILE $LIBRARY_OBJS -fi -chmod a+x $LIBRARY_FILE -rm -f $LIBRARY_BASE.$LIBRARY_MAJOR -ln -s $LIBRARY_NAME.$LIBRARY_MAJOR.$LIBRARY_MINOR $LIBRARY_BASE.$LIBRARY_MAJOR -rm -f $LIBRARY_BASE -ln -s $LIBRARY_NAME.$LIBRARY_MAJOR $LIBRARY_BASE - - - - diff --git a/setup/shared/sharedSunos4 b/setup/shared/sharedSunos4 deleted file mode 100755 index 7544a00584..0000000000 --- a/setup/shared/sharedSunos4 +++ /dev/null @@ -1,33 +0,0 @@ -#! /bin/sh - -#LIBRARY_BASE=`echo $1 | sed 's/.a/.so/'` -COMPILER=$1 -LIBRARY_BASE=$2 -LIBRARY_MAJOR=$3 -LIBRARY_MINOR=$4 -shift 3 -LIBRARY_OBJS= -while (test $# -ne 1) do - shift; - LIBRARY_OBJS="$LIBRARY_OBJS $1sh"; -done - -LIBRARY_NAME=`basename $LIBRARY_BASE` -LIBRARY_FILE=$LIBRARY_BASE.$LIBRARY_MAJOR.$LIBRARY_MINOR - -echo "Creating shared library: $LIBRARY_FILE" - -if test "x$COMPILER" = xgcc ; then - gcc -shared -o $LIBRARY_FILE $LIBRARY_OBJS -else - CC -assert pure-text -o $LIBRARY_FILE $LIBRARY_OBJS -fi -chmod a+x $LIBRARY_FILE -rm -f $LIBRARY_BASE.$LIBRARY_MAJOR -ln -s $LIBRARY_NAME.$LIBRARY_MAJOR.$LIBRARY_MINOR $LIBRARY_BASE.$LIBRARY_MAJOR -rm -f $LIBRARY_BASE -ln -s $LIBRARY_NAME.$LIBRARY_MAJOR $LIBRARY_BASE - - - - diff --git a/setup/shared/sharedSysV b/setup/shared/sharedSysV deleted file mode 100755 index d2bfc2a1a2..0000000000 --- a/setup/shared/sharedSysV +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/sh - -COMPILER=$1 -LIBRARY_BASE=$2 -LIBRARY_MAJOR=$3 -LIBRARY_MINOR=$4 -shift 3 -LIBRARY_OBJS= -while (test $# -ne 1) do - shift; - LIBRARY_OBJS="$LIBRARY_OBJS $1sh"; -done - -LIBRARY_BASE=`echo $LIBRARY_BASE | sed 's/.so/.sl/'` -LIBRARY_NAME=`basename $LIBRARY_BASE` -LIBRARY_FILE=$LIBRARY_BASE - -echo "Creating shared library: $LIBRARY_FILE" - -if test "x$COMPILER" = xgcc ; then - gcc -shared -h $LIBRARY_NAME -o $LIBRARY_FILE $LIBRARY_OBJS -else - CC -G -h $LIBRARY_NAME -o $LIBRARY_FILE $LIBRARY_OBJS -fi -chmod a+x $LIBRARY_FILE - - - - diff --git a/setup/substit.in b/setup/substit.in deleted file mode 100644 index cce03fde09..0000000000 --- a/setup/substit.in +++ /dev/null @@ -1,48 +0,0 @@ -s|*OS*|@OS@|g -s|*MAKEINCLUDE*|@MAKEINCLUDE@|g -s|*WXBASEDIR*|@WXBASEDIR@|g -s|*PROFILE*|@PROFILE@|g -s|*WXDEBUG*|@WXDEBUG@|g -s|*WXDEBUG_DEFINE*|@WXDEBUG_DEFINE@|g -s|*__WXDEBUG__*|@WXDEBUG@|g -s|*OPTIMISE*|@OPTIMISE@|g -s|*CC*|@CC@|g -s|*CFLAGS*|@CFLAGS@|g -s|*CPP*|@CPP@|g -s|*CXX*|@CXX@|g -s|*CXXFLAGS*|@CXXFLAGS@|g -s|*CXXCPP*|@CXXCPP@|g -s|*PICFLAGS*|@PICFLAGS@|g -s|*CREATE_SHARED*|@CREATE_SHARED@|g -s|*LEX*|@LEX@|g -s|*LEXLIB*|@LEXLIB@|g -s|*YACC*|@YACC@|g -s|*RANLIB*|@RANLIB@|g -s|*INSTALL*|@INSTALL@|g -s|*INSTALL_PROGRAM*|@INSTALL_PROGRAM@|g -s|*INSTALL_DATA*|@INSTALL_DATA@|g -s|*AWK*|@AWK@|g -s|*LN_S*|@LN_S@|g -s|*prefix*|@prefix@|g -s|*exec_prefix*|@exec_prefix@|g -s|*bindir*|@bindir@|g -s|*datadir*|@datadir@|g -s|*infodir*|@infodir@|g -s|*X_CFLAGS*|@X_CFLAGS@|g -s|*X_LIBS*|@X_LIBS@|g -s|*X_EXTRA_LIBS*|@X_EXTRA_LIBS@|g -s|*X_PRE_LIBS*|@X_PRE_LIBS@|g -s|*GUI_TK_INCLUDE*|@GUI_TK_INCLUDE@|g -s|*GUI_TK_LIBRARY*|@GUI_TK_LIBRARY@|g -s|*GUI_TK_LINK*|@GUI_TK_LINK@|g -s|*DL_LIBRARY*|@DL_LIBRARY@|g -s|*OPENGL_INCLUDE*|@OPENGL_INCLUDE@|g -s|*OPENGL_LIBRARY*|@OPENGL_LIBRARY@|g -s|*OPENGL_LINK*|@OPENGL_LINK@|g -s|*TOOLKIT*|@TOOLKIT@|g -s|*TOOLKIT_DEF*|@TOOLKIT_DEF@|g -s|*THREADS*|@THREADS@|g -s|*THREADS_LINK*|@THREADS_LINK@|g -s|*EXTRA_LINK*|@EXTRA_LINK@|g -s|*GTK_JOYSTICK*|@GTK_JOYSTICK@|g -s|*UNIX_THREAD*|@UNIX_THREAD@|g diff --git a/src/.cvsignore b/src/.cvsignore deleted file mode 100644 index 3140ad1cec..0000000000 --- a/src/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux -linux-gnu diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index 93407a0b44..0000000000 --- a/src/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../setup/general/makeapp diff --git a/src/Makefile.in b/src/Makefile.in deleted file mode 100644 index c9dac31733..0000000000 --- a/src/Makefile.in +++ /dev/null @@ -1,128 +0,0 @@ -# -# wxWindows/Unix main source makefile -# -# Copyright 1998, Markus Holzhem and Robert Roebling -# - -# wxWindows base directory -WXBASEDIR=@WXBASEDIR@ - -# set the OS type for compilation -OS=@OS@ - -# compile a library only -RULE=gslib - -# define common stuff - -# include gtk.inc, qt.inc or motif.inc here -include @MAKEINCLUDE@ - -LIB_CPP_ALL_SRC=$(LIB_CPP_SRC) @GTK_JOYSTICK@ @UNIX_THREAD@ - -LIB_C_ALL_SRC=$(LIB_C_SRC) parser.c - -#define library objects -LIB_OBJ=\ - $(LIB_CPP_ALL_SRC:.cpp=.o) \ - $(LIB_C_ALL_SRC:.c=.o) - -all:: - @if test ! -d gtk; then mkdir gtk; fi - @if test ! -d qt; then mkdir qt; fi - @if test ! -d motif; then mkdir motif; fi - @if test ! -d common; then mkdir common; fi - @if test ! -d generic; then mkdir generic; fi - @if test ! -d png; then mkdir png; fi - @if test ! -d zlib; then mkdir zlib; fi - @if test ! -d gdk_imlib; then mkdir gdk_imlib; fi - @if test ! -d iodbc; then mkdir iodbc; fi - -install:: - @echo "Installing library files and headers.." - @echo " Creating directories.." - @$(WXBASEDIR)/mkinstalldirs \ - /usr/local/include/wx \ - /usr/local/include/wx/gtk \ - /usr/local/include/wx/common \ - /usr/local/include/wx/generic - @echo " Copying headers from /include/wx" - @cd $(WXBASEDIR)/include/wx ; \ - for f in *.h ; do \ - rm -f /usr/local/include/wx/$$f ; \ - $(INSTALL_DATA) $$f /usr/local/include/wx/$$f ; \ - done - @echo " Copying headers from /include/wx/gtk" - @cd $(WXBASEDIR)/include/wx/gtk ; \ - for f in *.h ; do \ - rm -f /usr/local/include/wx/gtk/$$f ; \ - $(INSTALL_DATA) $$f /usr/local/include/wx/gtk/$$f ; \ - done - @echo " Copying headers from /include/wx/generic" - @cd $(WXBASEDIR)/include/wx/generic ; \ - for f in *.h ; do \ - rm -f /usr/local/include/wx/generic/$$f ; \ - $(INSTALL_DATA) $$f /usr/local/include/wx/generic/$$f ; \ - done - @echo " Copying static libraries files to /usr/local/lib" - @cd $(WXBASEDIR)/lib/$(OS) ; \ - for f in libwx_gtk.a ; do \ - rm -f /usr/local/lib/$$f ; \ - $(INSTALL_DATA) $$f /usr/local/lib/$$f ; \ - done - @echo " Copying shared libraries to /usr/local/lib" - @cd $(WXBASEDIR)/lib/$(OS) ; \ - for f in libwx_gtk.so* ; do \ - rm -f /usr/local/lib/$$f ; \ - $(INSTALL_PROGRAM) $$f /usr/local/lib/$$f ; \ - done - -clean:: - $(RM) -rf gtk - $(RM) -rf qt - $(RM) -rf motif - $(RM) -rf common - $(RM) -rf generic - $(RM) -rf png - $(RM) -rf zlib - $(RM) -rf gdk_imlib - $(RM) -rf iodbc - @$(RM) lexer.c parser.c - -#additional things needed for compile -ADD_COMPILE= \ - -DHAVE_LIBPNG -DDJPEG_PROG=\"\" -DCJPEG_PROG=\"\" - -# include the definitions now -include ../../template.mak - -# things for the prolog stuff - -parser.c: ../common/parser.y lexer.c - @if test ! -f parser.y; then \ - cp -f ../common/parser.y . ; \ - fi - @$(YACC) parser.y - @sed -e "s/y.tab.c/parser.y/g" < y.tab.c | \ - sed -e "s/BUFSIZ/5000/g" | \ - sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \ - sed -e "s/yy/PROIO_yy/g" | \ - sed -e "s/input/PROIO_input/g" | \ - sed -e "s/unput/PROIO_unput/g" > parser.c - @$(RM) y.tab.c - @$(RM) parser.y - -lexer.c: ../common/lexer.l - @if test ! -f lexer.l; then \ - cp -f ../common/lexer.l . ;\ - fi - @$(LEX) lexer.l - @sed -e "s/lex.yy.c/lexer.l/g" < lex.yy.c | \ - sed -e "s/yy/PROIO_yy/g" | \ - sed -e "s/input/PROIO_input/g" | \ - sed -e "s/unput/PROIO_unput/g" > lexer.c - @$(RM) lex.yy.c - @$(RM) lexer.l - -clean:: - \ No newline at end of file diff --git a/src/common/cmndata.cpp b/src/common/cmndata.cpp deleted file mode 100644 index e32e8a0b31..0000000000 --- a/src/common/cmndata.cpp +++ /dev/null @@ -1,474 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: cmndata.cpp -// Purpose: Common GDI data -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "cmndata.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/string.h" -#include "wx/utils.h" -#include "wx/app.h" -#endif - -#include "wx/gdicmn.h" -#include "wx/cmndata.h" - -#ifdef __WXMSW__ -#include - -#ifndef __WIN32__ -#include -#include -#endif -#endif - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxPrintData, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxPageSetupData, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxFontData, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxColourData, wxObject) -#endif - -/* - * wxColourData - */ - -wxColourData::wxColourData(void) -{ - int i; - for (i = 0; i < 16; i++) - custColours[i].Set(255, 255, 255); - - chooseFull = FALSE; - dataColour.Set(0,0,0); -} - -wxColourData::~wxColourData(void) -{ -} - -void wxColourData::SetCustomColour(int i, wxColour& colour) -{ - if (i > 15 || i < 0) - return; - - custColours[i] = colour; -} - -wxColour wxColourData::GetCustomColour(int i) -{ - if (i > 15 || i < 0) - return wxColour(0,0,0); - - return custColours[i]; -} - -void wxColourData::operator=(const wxColourData& data) -{ - int i; - for (i = 0; i < 16; i++) - custColours[i] = data.custColours[i]; - - dataColour = (wxColour&)data.dataColour; - chooseFull = data.chooseFull; -} - -/* - * Font data - */ - -wxFontData::wxFontData(void) -{ - // Intialize colour to black. - fontColour.Set(0, 0, 0); - - showHelp = FALSE; - allowSymbols = TRUE; - enableEffects = TRUE; - minSize = 0; - maxSize = 0; -} - -wxFontData::~wxFontData(void) -{ -} - -void wxFontData::operator=(const wxFontData& data) -{ - fontColour = data.fontColour; - showHelp = data.showHelp; - allowSymbols = data.allowSymbols; - enableEffects = data.enableEffects; - initialFont = data.initialFont; - chosenFont = data.chosenFont; - minSize = data.minSize; - maxSize = data.maxSize; -} - -/* - * Print data - */ - -wxPrintData::wxPrintData(void) -{ -#ifdef __WXMSW__ - printData = NULL; -#endif - printOrientation = wxPORTRAIT; - printFromPage = 0; - printToPage = 0; - printMinPage = 0; - printMaxPage = 0; - printNoCopies = 1; - printAllPages = FALSE; - printCollate = FALSE; - printToFile = FALSE; - printEnableSelection = FALSE; - printEnablePageNumbers = TRUE; - printEnablePrintToFile = TRUE; - printEnableHelp = FALSE; - printSetupDialog = FALSE; -} - -wxPrintData::~wxPrintData(void) -{ -#ifdef __WXMSW__ - PRINTDLG *pd = (PRINTDLG *)printData; - if ( pd && pd->hDevMode ) - GlobalFree(pd->hDevMode); - if ( pd ) - delete pd; -#endif -} - -#ifdef __WXMSW__ -void wxPrintData::ConvertToNative(void) -{ - PRINTDLG *pd = (PRINTDLG*) printData; - if ( pd == NULL ) - { - pd = new PRINTDLG; - printData = (void*) pd; - - // GNU-WIN32 has the wrong size PRINTDLG - can't work out why. -// pd->lStructSize = sizeof(PRINTDLG); - pd->lStructSize = 66 ; - pd->hwndOwner = (HWND)NULL; - pd->hDevMode = NULL; // Will be created by PrintDlg - pd->hDevNames = NULL; // Ditto - - // Why had I put this #ifdef in?? Seems fine to me. -#if 1 - pd->Flags = PD_RETURNDEFAULT; - pd->nCopies = 1; - - // Fill out the DEVMODE structure - // so we can use it as input in the 'real' PrintDlg - if (!PrintDlg(pd)) - { - if ( pd->hDevMode ) - GlobalFree(pd->hDevMode); - if ( pd->hDevNames ) - GlobalFree(pd->hDevNames); - pd->hDevMode = NULL; - pd->hDevNames = NULL; - } - else - { - if ( pd->hDevNames ) - GlobalFree(pd->hDevNames); - pd->hDevNames = NULL; - } -#endif - } - - if ( pd->hDevMode ) - { - DEVMODE *devMode = (DEVMODE*) GlobalLock(pd->hDevMode); - devMode->dmOrientation = printOrientation; - devMode->dmFields = DM_ORIENTATION; - GlobalUnlock(pd->hDevMode); - } - pd->hDC = (HDC) NULL; - pd->nFromPage = (UINT)printFromPage; - pd->nToPage = (UINT)printToPage; - pd->nMinPage = (UINT)printMinPage; - pd->nMaxPage = (UINT)printMaxPage; - pd->nCopies = (UINT)printNoCopies; - - pd->Flags = PD_RETURNDC ; -// pd->lStructSize = sizeof( PRINTDLG ); - pd->lStructSize = 66 ; - pd->hwndOwner=(HWND)NULL; - pd->hDevNames=(HANDLE)NULL; - pd->hInstance=(HINSTANCE)NULL; - pd->lCustData = (LPARAM) NULL; - pd->lpfnPrintHook = NULL; - pd->lpfnSetupHook = NULL; - pd->lpPrintTemplateName = NULL; - pd->lpSetupTemplateName = NULL; - pd->hPrintTemplate = (HGLOBAL) NULL; - pd->hSetupTemplate = (HGLOBAL) NULL; - - if ( printAllPages ) - pd->Flags |= PD_ALLPAGES; - if ( printCollate ) - pd->Flags |= PD_COLLATE; - if ( printToFile ) - pd->Flags |= PD_PRINTTOFILE; - if ( !printEnablePrintToFile ) - pd->Flags |= PD_DISABLEPRINTTOFILE; - if ( !printEnableSelection ) - pd->Flags |= PD_NOSELECTION; - if ( !printEnablePageNumbers ) - pd->Flags |= PD_NOPAGENUMS; - if ( printEnableHelp ) - pd->Flags |= PD_SHOWHELP; - if ( printSetupDialog ) - pd->Flags |= PD_PRINTSETUP; -} - -void wxPrintData::ConvertFromNative(void) -{ - PRINTDLG *pd = (PRINTDLG*) printData; - if ( pd == NULL ) - return; - - if ( pd->hDevMode ) - { - DEVMODE *devMode = (DEVMODE*) GlobalLock(pd->hDevMode); - printOrientation = devMode->dmOrientation; - GlobalUnlock(pd->hDevMode); - } - printFromPage = pd->nFromPage ; - printToPage = pd->nToPage ; - printMinPage = pd->nMinPage ; - printMaxPage = pd->nMaxPage ; - printNoCopies = pd->nCopies ; - - printAllPages = ((pd->Flags & PD_ALLPAGES) == PD_ALLPAGES); - printCollate = ((pd->Flags & PD_COLLATE) == PD_COLLATE); - printToFile = ((pd->Flags & PD_PRINTTOFILE) == PD_PRINTTOFILE); - printEnablePrintToFile = ((pd->Flags & PD_DISABLEPRINTTOFILE) != PD_DISABLEPRINTTOFILE); - printEnableSelection = ((pd->Flags & PD_NOSELECTION) != PD_NOSELECTION); - printEnablePageNumbers = ((pd->Flags & PD_NOPAGENUMS) != PD_NOPAGENUMS); - printEnableHelp = ((pd->Flags & PD_SHOWHELP) == PD_SHOWHELP); - printSetupDialog = ((pd->Flags & PD_PRINTSETUP) == PD_PRINTSETUP); -} - -void wxPrintData::SetOwnerWindow(wxWindow* win) -{ - if ( printData == NULL ) - ConvertToNative(); - - if ( printData != NULL && win != NULL) - { - PRINTDLG *pd = (PRINTDLG *) printData ; - pd->hwndOwner=(HWND) win->GetHWND(); - } -} -#endif - -void wxPrintData::operator=(const wxPrintData& data) -{ - printFromPage = data.printFromPage; - printToPage = data.printToPage; - printMinPage = data.printMinPage; - printMaxPage = data.printMaxPage; - printNoCopies = data.printNoCopies; - printAllPages = data.printAllPages; - printCollate = data.printCollate; - printToFile = data.printToFile; - printEnableSelection = data.printEnableSelection; - printEnablePageNumbers = data.printEnablePageNumbers; - printEnableHelp = data.printEnableHelp; - printEnablePrintToFile = data.printEnablePrintToFile; - printSetupDialog = data.printSetupDialog; - printOrientation = data.printOrientation; -} - -/* - * wxPageSetupData - */ - -wxPageSetupData::wxPageSetupData(void) -{ -#if defined(__WIN95__) - m_pageSetupData = NULL; -#endif - m_paperSize = wxPoint(0, 0); - m_minMarginTopLeft = wxPoint(0, 0); - m_minMarginBottomRight = wxPoint(0, 0); - m_marginTopLeft = wxPoint(0, 0); - m_marginBottomRight = wxPoint(0, 0); - m_orientation = wxPORTRAIT; - - // Flags - m_defaultMinMargins = FALSE; - m_enableMargins = TRUE; - m_enableOrientation = TRUE; - m_enablePaper = TRUE; - m_enablePrinter = TRUE; - m_enableHelp = FALSE; - m_getDefaultInfo = FALSE; -} - -wxPageSetupData::~wxPageSetupData(void) -{ -#if defined(__WIN95__) && defined(__WXMSW__) - PAGESETUPDLG *pd = (PAGESETUPDLG *)m_pageSetupData; - if ( pd && pd->hDevMode ) - GlobalFree(pd->hDevMode); - if ( pd ) - delete pd; -#endif -} - -void wxPageSetupData::operator=(const wxPageSetupData& data) -{ - m_paperSize = data.m_paperSize; - m_minMarginTopLeft = data.m_minMarginTopLeft; - m_minMarginBottomRight = data.m_minMarginBottomRight; - m_marginTopLeft = data.m_marginTopLeft; - m_marginBottomRight = data.m_marginBottomRight; - m_orientation = data.m_orientation; - - m_defaultMinMargins = data.m_defaultMinMargins; - m_enableMargins = data.m_enableMargins; - m_enableOrientation = data.m_enableOrientation; - m_enablePaper = data.m_enablePaper; - m_enablePrinter = data.m_enablePrinter; - m_getDefaultInfo = data.m_getDefaultInfo;; - m_enableHelp = data.m_enableHelp; -} - -#if defined(__WXMSW__) && defined(__WIN95__) -void wxPageSetupData::ConvertToNative(void) -{ - PAGESETUPDLG *pd = (PAGESETUPDLG*) m_pageSetupData; - if ( m_pageSetupData == NULL ) - { - pd = new PAGESETUPDLG; - pd->hDevMode = GlobalAlloc(GMEM_MOVEABLE, sizeof(DEVMODE)); - m_pageSetupData = (void *)pd; - } - - pd->Flags = PSD_MARGINS|PSD_MINMARGINS; - - if ( m_defaultMinMargins ) - pd->Flags |= PSD_DEFAULTMINMARGINS; - if ( !m_enableMargins ) - pd->Flags |= PSD_DISABLEMARGINS; - if ( !m_enableOrientation ) - pd->Flags |= PSD_DISABLEORIENTATION; - if ( !m_enablePaper ) - pd->Flags |= PSD_DISABLEPAPER; - if ( !m_enablePrinter ) - pd->Flags |= PSD_DISABLEPRINTER; - if ( m_getDefaultInfo ) - pd->Flags |= PSD_RETURNDEFAULT; - if ( m_enableHelp ) - pd->Flags |= PSD_SHOWHELP; - - pd->lStructSize = sizeof( PAGESETUPDLG ); - pd->hwndOwner=(HWND)NULL; - pd->hDevNames=(HWND)NULL; - pd->hInstance=(HINSTANCE)NULL; - - pd->ptPaperSize.x = m_paperSize.x; - pd->ptPaperSize.y = m_paperSize.y; - - pd->rtMinMargin.left = m_minMarginTopLeft.x; - pd->rtMinMargin.top = m_minMarginTopLeft.y; - pd->rtMinMargin.right = m_minMarginBottomRight.x; - pd->rtMinMargin.bottom = m_minMarginBottomRight.y; - - pd->rtMargin.left = m_marginTopLeft.x; - pd->rtMargin.top = m_marginTopLeft.y; - pd->rtMargin.right = m_marginBottomRight.x; - pd->rtMargin.bottom = m_marginBottomRight.y; - - pd->lCustData = 0; - pd->lpfnPageSetupHook = NULL; - pd->lpfnPagePaintHook = NULL; - pd->hPageSetupTemplate = NULL; - pd->lpPageSetupTemplateName = NULL; - - if ( pd->hDevMode ) - { - DEVMODE *devMode = (DEVMODE*) GlobalLock(pd->hDevMode); - memset(devMode, 0, sizeof(DEVMODE)); - devMode->dmSize = sizeof(DEVMODE); - devMode->dmOrientation = m_orientation; - devMode->dmFields = DM_ORIENTATION; - GlobalUnlock(pd->hDevMode); - } -} - -void wxPageSetupData::ConvertFromNative(void) -{ - PAGESETUPDLG *pd = (PAGESETUPDLG *) m_pageSetupData ; - if ( !pd ) - return; - - pd->Flags = PSD_MARGINS|PSD_MINMARGINS; - - m_defaultMinMargins = ((pd->Flags & PSD_DEFAULTMINMARGINS) == PSD_DEFAULTMINMARGINS); - m_enableMargins = ((pd->Flags & PSD_DISABLEMARGINS) != PSD_DISABLEMARGINS); - m_enableOrientation = ((pd->Flags & PSD_DISABLEORIENTATION) != PSD_DISABLEORIENTATION); - m_enablePaper = ((pd->Flags & PSD_DISABLEPAPER) != PSD_DISABLEPAPER); - m_enablePrinter = ((pd->Flags & PSD_DISABLEPRINTER) != PSD_DISABLEPRINTER); - m_getDefaultInfo = ((pd->Flags & PSD_RETURNDEFAULT) == PSD_RETURNDEFAULT); - m_enableHelp = ((pd->Flags & PSD_SHOWHELP) == PSD_SHOWHELP); - - m_paperSize.x = pd->ptPaperSize.x ; - m_paperSize.y = pd->ptPaperSize.y ; - - m_minMarginTopLeft.x = pd->rtMinMargin.left ; - m_minMarginTopLeft.y = pd->rtMinMargin.top ; - m_minMarginBottomRight.x = pd->rtMinMargin.right ; - m_minMarginBottomRight.y = pd->rtMinMargin.bottom ; - - m_marginTopLeft.x = pd->rtMargin.left ; - m_marginTopLeft.y = pd->rtMargin.top ; - m_marginBottomRight.x = pd->rtMargin.right ; - m_marginBottomRight.y = pd->rtMargin.bottom ; - - if ( pd->hDevMode ) - { - DEVMODE *devMode = (DEVMODE*) GlobalLock(pd->hDevMode); - m_orientation = devMode->dmOrientation ; - GlobalUnlock(pd->hDevMode); - } -} - -void wxPageSetupData::SetOwnerWindow(wxWindow* win) -{ - if ( m_pageSetupData == NULL ) - ConvertToNative(); - - if ( m_pageSetupData != NULL && win != NULL) - { - PAGESETUPDLG *pd = (PAGESETUPDLG *) m_pageSetupData ; - pd->hwndOwner=(HWND) win->GetHWND(); - } -} -#endif - diff --git a/src/common/config.cpp b/src/common/config.cpp deleted file mode 100644 index ec03c728f6..0000000000 --- a/src/common/config.cpp +++ /dev/null @@ -1,385 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: config.cpp -// Purpose: implementation of wxConfigBase class -// Author: Vadim Zeitlin -// Modified by: -// Created: 07.04.98 -// RCS-ID: $Id$ -// Copyright: (c) 1997 Karsten Ballüder Ballueder@usa.net -// Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- -#ifdef __GNUG__ - #pragma implementation "confbase.h" -#endif - -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif //__BORLANDC__ - -#ifndef WX_PRECOMP - #include - #include -#endif //WX_PRECOMP - -#include -#include -#include -#include -#include - -// we must include (one of) these files for wxConfigBase::Create -#if defined(__WXMSW__) && defined(wxCONFIG_WIN32_NATIVE) - #ifdef __WIN32__ - #include - #else //WIN16 - #include - #endif -#else // either we're under Unix or wish to use files even under Windows - #include -#endif - -#include -#include -#include // for isalnum() - -// ---------------------------------------------------------------------------- -// global and class static variables -// ---------------------------------------------------------------------------- - -wxConfigBase *wxConfigBase::ms_pConfig = NULL; -bool wxConfigBase::ms_bAutoCreate = TRUE; - -// ============================================================================ -// implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// wxConfigBase -// ---------------------------------------------------------------------------- - -// Not all args will always be used by derived classes, but -// including them all in each class ensures compatibility. -wxConfigBase::wxConfigBase(const wxString& appName, const wxString& vendorName, - const wxString& localFilename, const wxString& globalFilename, long style): - m_appName(appName), m_vendorName(vendorName), m_style(style) -{ - m_bExpandEnvVars = TRUE; m_bRecordDefaults = FALSE; -} - -wxConfigBase *wxConfigBase::Set(wxConfigBase *pConfig) -{ - wxConfigBase *pOld = ms_pConfig; - ms_pConfig = pConfig; - return pOld; -} - -wxConfigBase *wxConfigBase::Create() -{ - if ( ms_bAutoCreate && ms_pConfig == NULL ) { - ms_pConfig = - #if defined(__WXMSW__) && defined(wxCONFIG_WIN32_NATIVE) - #ifdef __WIN32__ - new wxRegConfig(wxTheApp->GetAppName(), wxTheApp->GetVendorName()); - #else //WIN16 - new wxIniConfig(wxTheApp->GetAppName(), wxTheApp->GetVendorName()); - #endif - #else // either we're under Unix or wish to use files even under Windows - new wxFileConfig(wxTheApp->GetAppName()); - #endif - } - - return ms_pConfig; -} - -wxString wxConfigBase::Read(const wxString& key, const wxString& defVal) const -{ - wxString s; - Read(key, &s, defVal); - return s; -} - -bool wxConfigBase::Read(const wxString& key, wxString *str, const wxString& defVal) const -{ - if (!Read(key, str)) - { - *str = ExpandEnvVars(defVal); - return FALSE; - } - else - return TRUE; -} - -bool wxConfigBase::Read(const wxString& key, long *pl, long defVal) const -{ - if (!Read(key, pl)) - { - *pl = defVal; - return FALSE; - } - else - return TRUE; -} - -bool wxConfigBase::Read(const wxString& key, double* val) const -{ - wxString str; - if (Read(key, str)) - { - *val = atof(str); - return TRUE; - } - else - return FALSE; -} - -bool wxConfigBase::Read(const wxString& key, double* val, double defVal) const -{ - if (!Read(key, val)) - { - *val = defVal; - return FALSE; - } - else - return TRUE; -} - -bool wxConfigBase::Read(const wxString& key, bool* val) const -{ - long l; - if (Read(key, & l)) - { - *val = (l != 0); - return TRUE; - } - else - return FALSE; -} - -bool wxConfigBase::Read(const wxString& key, bool* val, bool defVal) const -{ - if (!Read(key, val)) - { - *val = defVal; - return FALSE; - } - else - return TRUE; -} - -// Convenience functions -bool wxConfigBase::Write(const wxString& key, double val) -{ - wxString str; - str.Printf("%f", val); - return Write(key, str); -} - -bool wxConfigBase::Write(const wxString& key, bool value) -{ - long l = (value ? 1 : 0); - return Write(key, l); -} - - -// ---------------------------------------------------------------------------- -// wxConfigPathChanger -// ---------------------------------------------------------------------------- - -wxConfigPathChanger::wxConfigPathChanger(const wxConfigBase *pContainer, - const wxString& strEntry) -{ - m_pContainer = (wxConfigBase *)pContainer; - wxString strPath = strEntry.Before(wxCONFIG_PATH_SEPARATOR); - - // special case of "/keyname" when there is nothing before "/" - if ( strPath.IsEmpty() && ((!strEntry.IsEmpty()) && strEntry[0] == wxCONFIG_PATH_SEPARATOR )) - strPath = wxCONFIG_PATH_SEPARATOR; - - if ( !strPath.IsEmpty() ) { - // do change the path - m_bChanged = TRUE; - m_strName = strEntry.Right(wxCONFIG_PATH_SEPARATOR); - m_strOldPath = m_pContainer->GetPath(); - m_strOldPath += wxCONFIG_PATH_SEPARATOR; - m_pContainer->SetPath(strPath); - } - else { - // it's a name only, without path - nothing to do - m_bChanged = FALSE; - m_strName = strEntry; - } -} - -wxConfigPathChanger::~wxConfigPathChanger() -{ - // only restore path if it was changed - if ( m_bChanged ) { - m_pContainer->SetPath(m_strOldPath); - } -} - -// ---------------------------------------------------------------------------- -// static & global functions -// ---------------------------------------------------------------------------- - -// understands both Unix and Windows (but only under Windows) environment -// variables expansion: i.e. $var, $(var) and ${var} are always understood -// and in addition under Windows %var% is also. -wxString wxExpandEnvVars(const wxString& str) -{ - wxString strResult; - strResult.Alloc(str.Len()); - - // don't change the values the enum elements: they must be equal - // to the matching [closing] delimiter. - enum Bracket - { - Bracket_None, - Bracket_Normal = ')', - Bracket_Curly = '}', -#ifdef __WXMSW__ - Bracket_Windows = '%' // yeah, Windows people are a bit strange ;-) -#endif - }; - - size_t m; - for ( size_t n = 0; n < str.Len(); n++ ) { - switch ( str[n] ) { -#ifdef __WXMSW__ - case '%': -#endif //WINDOWS - case '$': - { - Bracket bracket; - #ifdef __WXMSW__ - if ( str[n] == '%' ) - bracket = Bracket_Windows; - else - #endif //WINDOWS - if ( n == str.Len() - 1 ) { - bracket = Bracket_None; - } - else { - switch ( str[n + 1] ) { - case '(': - bracket = Bracket_Normal; - n++; // skip the bracket - break; - - case '{': - bracket = Bracket_Curly; - n++; // skip the bracket - break; - - default: - bracket = Bracket_None; - } - } - - m = n + 1; - - while ( m < str.Len() && (isalnum(str[m]) || str[m] == '_') ) - m++; - - wxString strVarName(str.c_str() + n + 1, m - n - 1); - - const char *pszValue = getenv(strVarName); - if ( pszValue != NULL ) { - strResult += pszValue; - } - else { - // variable doesn't exist => don't change anything - #ifdef __WXMSW__ - if ( bracket != Bracket_Windows ) - #endif - if ( bracket != Bracket_None ) - strResult << str[n - 1]; - strResult << str[n] << strVarName; - } - - // check the closing bracket - if ( bracket != Bracket_None ) { - if ( m == str.Len() || str[m] != (char)bracket ) { - wxLogWarning(_("Environment variables expansion failed: " - "missing '%c' at position %d in '%s'."), - (char)bracket, m + 1, str.c_str()); - } - else { - // skip closing bracket unless the variables wasn't expanded - if ( pszValue == NULL ) - strResult << (char)bracket; - m++; - } - } - - n = m - 1; // skip variable name - } - break; - - case '\\': - // backslash can be used to suppress special meaning of % and $ - if ( n != str.Len() && (str[n + 1] == '%' || str[n + 1] == '$') ) { - strResult += str[++n]; - - break; - } - //else: fall through - - default: - strResult += str[n]; - } - } - - return strResult; -} - -// this function is used to properly interpret '..' in path -void wxSplitPath(wxArrayString& aParts, const char *sz) -{ - aParts.Empty(); - - wxString strCurrent; - const char *pc = sz; - for ( ;; ) { - if ( *pc == '\0' || *pc == wxCONFIG_PATH_SEPARATOR ) { - if ( strCurrent == "." ) { - // ignore - } - else if ( strCurrent == ".." ) { - // go up one level - if ( aParts.IsEmpty() ) - wxLogWarning(_("'%s' has extra '..', ignored."), sz); - else - aParts.Remove(aParts.Count() - 1); - - strCurrent.Empty(); - } - else if ( !strCurrent.IsEmpty() ) { - aParts.Add(strCurrent); - strCurrent.Empty(); - } - //else: - // could log an error here, but we prefer to ignore extra '/' - - if ( *pc == '\0' ) - return; - } - else - strCurrent += *pc; - - pc++; - } -} - - diff --git a/src/common/date.cpp b/src/common/date.cpp deleted file mode 100644 index bda79ab3a2..0000000000 --- a/src/common/date.cpp +++ /dev/null @@ -1,654 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: date.cpp -// Purpose: wxDate class -// Author: -// Originally inspired by Steve Marcus (CIS 72007,1233) 6/16/91 -// Enhanced by Eric Simon (CIS 70540,1522) 6/29/91 -// Further Enhanced by Chris Hill (CIS 72030,2606) 7/11/91 -// Still Further Enhanced by Hill & Simon v3.10 8/05/91 -// Version 4 by Charles D. Price 6/27/92 -// Integrated into wxWindows by Julian Smart 9th July 1995 -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "date.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include "wx/setup.h" - -#if USE_TIMEDATE - -#include "wx/date.h" -#include - -#include -#include -#include - -#if USE_IOSTREAMH -#include -#else -#include -#endif - -#include -#include - -#define ABBR_LENGTH 3 - -static const char *dayname[] = { - "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" -}; - -static const char *mname[] = { - "January", "February", "March", "April", "May", "June", "July", "August", - "September", "October", "November", "December" -}; - -static int GauDays[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxDate, wxObject) -#endif - -//////////////////////////////////////////////////////////// -// Constructors -//////////////////////////////////////////////////////////// - -wxDate::wxDate() -{ - DisplayFormat=wxMDY; - DisplayOptions='\0'; - month = day = year = day_of_week = 0; - julian = 0; -} - -wxDate::wxDate (long j) : julian(j) -{ - DisplayFormat=wxMDY; - DisplayOptions='\0'; - julian_to_mdy (); -} - -wxDate::wxDate (int m, int d, int y) : month(m), day(d), year(y) -{ - DisplayFormat=wxMDY; - DisplayOptions='\0'; - mdy_to_julian (); -} - -wxDate::wxDate (const wxString& dat) -{ - DisplayFormat=wxMDY; - DisplayOptions='\0'; - if (strcmp(dat, "TODAY") == 0 || strcmp(dat, "today") == 0) - { - // Sets the current date - Set(); - } - else - { - char buf[100]; - strcpy(buf, (char *) (const char *)dat); - - char *token = strtok(buf,"/-"); - month = atoi(token); - day = atoi(strtok((char *) NULL,"/-")); - year = atoi(strtok((char *) NULL," ")); - } - - mdy_to_julian (); -} - -wxDate::wxDate (const wxDate &dt) -{ - DisplayFormat=dt.DisplayFormat; - DisplayOptions=dt.DisplayOptions; - month = dt.month; - day = dt.day; - year = dt.year; - mdy_to_julian (); -} - -void wxDate::operator = (const wxDate &dt) -{ - DisplayFormat=dt.DisplayFormat; - DisplayOptions=dt.DisplayOptions; - month = dt.month; - day = dt.day; - year = dt.year; - mdy_to_julian (); -} - -void wxDate::operator = (const wxString& dat) -{ - DisplayFormat=wxMDY; - DisplayOptions='\0'; - if (strcmp(dat, "TODAY") == 0 || strcmp(dat, "today") == 0) - { - // Sets the current date - Set(); - } - else - { - char buf[100]; - strcpy(buf, (char *)(const char *)dat); - - char *token = strtok(buf,"/-"); - month = atoi(token); - day = atoi(strtok((char *) NULL,"/-")); - year = atoi(strtok((char *) NULL," ")); - } - - mdy_to_julian (); -} - -////////////////////////////////////////////////////////////// -// Conversion operations -////////////////////////////////////////////////////////////// - -wxDate::operator wxString( void ) -{ - return FormatDate(); -} - -////////////////////////////////////////////////////////////// -// Date Arithmetic -////////////////////////////////////////////////////////////// - -wxDate wxDate::operator + (long i) -{ - wxDate dp(julian + i); - return dp; -} - -wxDate wxDate::operator + (int i) -{ - wxDate dp(julian + (long)i); - return dp; -} - -wxDate wxDate::operator - (long i) -{ - wxDate dp(julian - i); - return dp; -} - -wxDate wxDate::operator - (int i) -{ - wxDate dp(julian - (long)i); - return dp; -} - -long wxDate::operator - (const wxDate &dt) -{ - return ( julian - dt.julian ); -} - -wxDate &wxDate::operator += (long i) -{ - julian += i; - julian_to_mdy(); - return *this; -} - -wxDate &wxDate::operator -= (long i) -{ - julian -= i; - julian_to_mdy(); - return *this; -} - -wxDate &wxDate::operator ++() -{ - julian++; - julian_to_mdy(); - return *this; -} - -wxDate &wxDate::operator ++(int) -{ - julian++; - julian_to_mdy(); - return *this; -} - -wxDate &wxDate::operator --() -{ - julian--; - julian_to_mdy(); - return *this; -} - -wxDate &wxDate::operator --(int) -{ - julian--; - julian_to_mdy(); - return *this; -} - -////////////////////////////////////////////////////////////// -// Date comparison -////////////////////////////////////////////////////////////// - -bool operator < (const wxDate &dt1, const wxDate &dt2) -{ - return ( dt1.julian < dt2.julian ); -} - -bool operator <= (const wxDate &dt1, const wxDate &dt2) -{ - return ( (dt1.julian == dt2.julian) || (dt1.julian < dt2.julian) ); -} - -bool operator > (const wxDate &dt1, const wxDate &dt2) -{ - return ( dt1.julian > dt2.julian ); -} - -bool operator >= (const wxDate &dt1, const wxDate &dt2) -{ - return ( (dt1.julian == dt2.julian) || (dt1.julian > dt2.julian) ); -} - -bool operator == (const wxDate &dt1, const wxDate &dt2) -{ - return ( dt1.julian == dt2.julian ); -} - -bool operator != (const wxDate &dt1, const wxDate &dt2) -{ - return ( dt1.julian != dt2.julian ); -} - -//////////////////////////////////////////////////////////////// -// Ostream operations -//////////////////////////////////////////////////////////////// - -ostream &operator << (ostream &os, const wxDate &dt) -{ - return os << (const char *) dt.FormatDate(); -} - -////////////////////////////////////////////////////////////// -// Conversion routines -////////////////////////////////////////////////////////////// - -void wxDate::julian_to_wday (void) -{ - day_of_week = (int) ((julian + 2) % 7 + 1); -} - -void wxDate::julian_to_mdy () -{ - long a,b,c,d,e,z,alpha; - z = julian+1; - // dealing with Gregorian calendar reform - if (z < 2299161L) - a = z; - else { - alpha = (long) ((z-1867216.25) / 36524.25); - a = z + 1 + alpha - alpha/4; - } - b = ( a > 1721423 ? a + 1524 : a + 1158 ); - c = (long) ((b - 122.1) / 365.25); - d = (long) (365.25 * c); - e = (long) ((b - d) / 30.6001); - day = (int)(b - d - (long)(30.6001 * e)); - month = (int)((e < 13.5) ? e - 1 : e - 13); - year = (int)((month > 2.5 ) ? (c - 4716) : c - 4715); - julian_to_wday (); -} - -void wxDate::mdy_to_julian (void) -{ - int a,b=0; - int work_month=month, work_day=day, work_year=year; - // correct for negative year - if (work_year < 0) - work_year++; - if (work_month <= 2) - { work_year--; work_month +=12; } - - // deal with Gregorian calendar - if (work_year*10000. + work_month*100. + work_day >= 15821015.) - { - a = (int)(work_year/100.); - b = 2 - a + a/4; - } - julian = (long) (365.25*work_year) + - (long) (30.6001 * (work_month+1)) + work_day + 1720994L + b; - julian_to_wday (); -} - -//////////////////////////////////////////////////////////////// -// Format routine -//////////////////////////////////////////////////////////////// - -wxString wxDate::FormatDate (int type) const -{ - int actualType = type; - if (actualType == -1) - actualType = DisplayFormat; - - char buf[40]; - - memset( buf, '\0', sizeof(buf) ); - switch ( actualType ) - { - case wxDAY: - if ( (day_of_week < 1) || (day_of_week > 7) ) - strcpy(buf, _("invalid day")); - else - strncpy( buf, _(dayname[day_of_week-1]), - (DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9); - return wxString(buf); - - case wxMONTH: - if ( (month < 1) || (month > 12) ) - strcpy(buf, _("invalid month")); - else - strncpy( buf, _(mname[month-1]), - (DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9); - return wxString(buf); - - case wxFULL: - if ( (month < 1) || (month > 12) || (day_of_week < 0) || - (day_of_week > 7) ) - { - strcpy(buf, _("invalid date")); - return wxString(buf); - } - strncpy( buf, _(dayname[day_of_week-1]), - (DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9); - strcat( buf, ", "); - strncat( buf, _(mname[month-1]), - (DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9); - strcat( buf, " "); - sprintf( buf+strlen(buf), "%d, %d", day, abs(year) ); - if (year < 0) - strcat(buf,_(" B.C.")); - return wxString(buf); - - case wxEUROPEAN: - if ( (month < 1) || (month > 12) || (day_of_week < 0) || - (day_of_week > 7) ) - { - strcpy(buf, _("invalid date")); - return wxString(buf); - } - sprintf(buf,"%d ", day); - strncat(buf, _(mname[month-1]), - (DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9); - sprintf( buf+strlen(buf), " %d", abs(year) ); - if (year < 0) - strcat(buf, _(" B.C.")); - return wxString(buf); - - case wxMDY: - default: - if (day==0 || month==0 || year==0) - strcpy(buf, _("invalid date")); - else - sprintf( buf+strlen(buf), "%1d/%1d/%02d", month, day, - (DisplayOptions & wxNO_CENTURY) && (abs(year) > 1899) - ? (abs(year) - (abs(year) / 100 * 100)) - : (abs(year)) ); - return wxString(buf); - } - return wxString(""); -} - -void wxDate::SetFormat( int format ) -{ - DisplayFormat = format; -} - -int wxDate::SetOption( int option, bool action ) -{ - switch ( option ) - { - case wxNO_CENTURY: - if ( action ) - DisplayOptions |= wxNO_CENTURY; - else - { - DisplayOptions &= (~wxNO_CENTURY); - } - return 1; - case wxDATE_ABBR: - if ( action ) - DisplayOptions |= wxDATE_ABBR; - else - { - DisplayOptions &= (~wxDATE_ABBR); - } - return 1; - default: - return 0; - } - return 0; -} - -/////////////////////////////////////////////////////////////// -// Miscellaneous Routines -/////////////////////////////////////////////////////////////// - -long wxDate::GetJulianDate( void ) const -{ - return julian; -} - -int wxDate::GetDayOfYear( void ) const -{ - wxDate temp( 1, 1, year ); - - return (int) (julian - temp.julian + 1); -} - - -bool wxDate::IsLeapYear( void ) const -{ - return ( (year >= 1582) ? - (year % 4 == 0 && year % 100 != 0 || year % 400 == 0 ): - (year % 4 == 0) ); -} - -// Version 4.0 Extension to Public Interface - CDP - -wxDate& wxDate::Set() -{ -//#ifdef __WXMSW__ -#if 0 - struct _dosdate_t sDate; - _dos_getdate(&sDate); - - month = sDate.month; - day = sDate.day; - year = sDate.year; - - mdy_to_julian(); -#else - time_t now = time((time_t *) NULL); - struct tm *localTime = localtime(&now); - - month = localTime->tm_mon + 1; - day = localTime->tm_mday; - year = localTime->tm_year + 1900; - - mdy_to_julian (); -#endif - return *this; -} - -wxDate& wxDate::Set( - int nMonth, - int nDay, - int nYear) -{ - month = nMonth; - year = nYear < 0 ? 9999 : nYear; - year = nYear > 9999 ? 0 : nYear; - day = nDay < GetDaysInMonth() ? nDay : GetDaysInMonth(); - - mdy_to_julian(); - return *this; -} - -wxDate & -wxDate::Set(long j) -{ - julian = j; - - julian_to_mdy(); - return *this; -} - - -int wxDate::GetDaysInMonth() -{ - return GauDays[month-1] + (month==2 && IsLeapYear()); -} - -int wxDate::GetFirstDayOfMonth() const -{ - return wxDate(month, 1, year).GetDayOfWeek(); -} - -int wxDate::GetDay() const -{ - return day; -} - -int wxDate::GetDayOfWeek() const -{ - return day_of_week; -} - -int wxDate::GetYear() const -{ - return year; -} - -int wxDate::GetMonth() const -{ - return month; -} - -wxDate& wxDate::AddWeeks(int nCount) -{ - Set(julian + (long)nCount*7); - return *this; -} - -wxDate& wxDate::AddMonths(int nCount) -{ - month += nCount; - - if (month < 1) { - month = 12; - year--; - } - - if (month > 12) { - month = 1; - year++; - } - mdy_to_julian(); - return *this; -} - -wxDate& wxDate::AddYears(int nCount) -{ - year += nCount; - mdy_to_julian(); - return *this; -} - -int wxDate::GetWeekOfMonth() -{ - // Abs day includes the days from previous month that fills up - // the begin. of the week. - int nAbsDay = day + GetFirstDayOfMonth()-1; - return (nAbsDay-GetDayOfWeek())/7 + 1; -} - -int wxDate::GetWeekOfYear() -{ - wxDate doTemp(1, 1, year); - return (int)(((julian - doTemp.julian+1)/7) + 1); -} - -wxDate wxDate::GetMonthStart() -{ - return(wxDate(month, 1, year)); -} - -wxDate wxDate::GetMonthEnd() -{ - return(wxDate(month+1, 1, year)-1); -} - -wxDate wxDate::GetYearStart() -{ - return(wxDate(1, 1, year)); -} - -wxDate wxDate::GetYearEnd() -{ - return(wxDate(1, 1, year+1)-1); -} - -wxString wxDate::GetMonthName() -{ - return(FormatDate(wxMONTH)); -} - -wxString wxDate::GetDayOfWeekName() -{ - return(FormatDate(wxDAY)); -} - -bool wxDate::IsBetween(const wxDate& first, const wxDate& second) const -{ - return (julian >= first.julian && julian <= second.julian); -} - -// This function is from NIHCL -wxDate wxDate::Previous(int dayOfWeek) const -{ - int this_day_Of_Week, desired_day_Of_Week; - long j; - -// Set the desired and current day of week to start at 0 (Monday) -// and end at 6 (Sunday). - - desired_day_Of_Week = dayOfWeek - 1; // These functions return a value - this_day_Of_Week = GetDayOfWeek() - 1; // from 1-7. Subtract 1 for 0-6. - j = julian; - -// Have to determine how many days difference from current day back to -// desired, if any. Special calculation under the 'if' statement to -// effect the wraparound counting from Monday (0) back to Sunday (6). - - if (desired_day_Of_Week > this_day_Of_Week) - this_day_Of_Week += 7 - desired_day_Of_Week; - else - this_day_Of_Week -= desired_day_Of_Week; - j -= this_day_Of_Week; // Adjust j to set it at the desired day of week. - return wxDate(j); -} - -#endif diff --git a/src/common/datstrm.cpp b/src/common/datstrm.cpp deleted file mode 100644 index 93850acd65..0000000000 --- a/src/common/datstrm.cpp +++ /dev/null @@ -1,194 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: datstrm.cpp -// Purpose: Data stream classes -// Author: Guilhem Lavaux -// Modified by: -// Created: 28/06/98 -// RCS-ID: $Id$ -// Copyright: (c) Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "datstrm.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#endif - -#include "wx/datstrm.h" - -wxDataInputStream::wxDataInputStream(wxInputStream& s) - : wxFilterInputStream(s) -{ -} - -wxDataInputStream::~wxDataInputStream() -{ -} - -unsigned long wxDataInputStream::Read32() -{ - char buf[4]; - - Read(buf, 4); - - return (unsigned long)buf[0] | - ((unsigned long)buf[1] << 8) | - ((unsigned long)buf[2] << 16) | - ((unsigned long)buf[3] << 24); -} - -unsigned short wxDataInputStream::Read16() -{ - char buf[2]; - - Read(buf, 2); - - return (unsigned short)buf[0] | - ((unsigned short)buf[1] << 8); -} - -unsigned char wxDataInputStream::Read8() -{ - char buf; - - Read(&buf, 1); - return (unsigned char)buf; -} - -// Must be at global scope for VC++ 5 -extern "C" double ConvertFromIeeeExtended(const unsigned char *bytes); - -double wxDataInputStream::ReadDouble() -{ -#if USE_APPLE_IEEE - char buf[10]; - - Read(buf, 10); - return ConvertFromIeeeExtended((unsigned char *)buf); -#else - return 0.0; -#endif -} - -wxString wxDataInputStream::ReadLine() -{ - char c, last_endl = 0; - bool end_line = FALSE; - wxString line; - - while (!end_line) { - c = GetC(); - switch (c) { - case '\n': - end_line = TRUE; - break; - case '\r': - last_endl = '\r'; - break; - default: - if (last_endl == '\r') { - end_line = TRUE; - InputStreamBuffer()->WriteBack(c); - break; - } - line += c; - break; - } - } - return line; -} - -wxString wxDataInputStream::ReadString() -{ - wxString wx_string; - char *string; - unsigned long len; - - len = Read32(); - string = new char[len+1]; - - Read(string, len); - - string[len] = 0; - wx_string = string; - delete string; - - return wx_string; -} - -wxDataOutputStream::wxDataOutputStream(wxOutputStream& s) - : wxFilterOutputStream(s) -{ -} - -wxDataOutputStream::~wxDataOutputStream() -{ -} - -void wxDataOutputStream::Write32(unsigned long i) -{ - char buf[4]; - - buf[0] = i & 0xff; - buf[1] = (i >> 8) & 0xff; - buf[2] = (i >> 16) & 0xff; - buf[3] = (i >> 24) & 0xff; - Write(buf, 4); -} - -void wxDataOutputStream::Write16(unsigned short i) -{ - char buf[2]; - - buf[0] = i & 0xff; - buf[1] = (i >> 8) & 0xff; - Write(buf, 2); -} - -void wxDataOutputStream::Write8(unsigned char i) -{ - Write(&i, 1); -} - -void wxDataOutputStream::WriteLine(const wxString& line) -{ -#ifdef __WXMSW__ - wxString tmp_string = line + "\r\n"; -#else - wxString tmp_string = line + '\n'; -#endif - - Write((const char *) tmp_string, tmp_string.Length()); -} - -void wxDataOutputStream::WriteString(const wxString& string) -{ - Write32(string.Length()); - Write((const char *) string, string.Length()); -} - -// Must be at global scope for VC++ 5 -extern "C" void ConvertToIeeeExtended(double num, unsigned char *bytes); - -void wxDataOutputStream::WriteDouble(double d) -{ - char buf[10]; - -#if USE_APPLE_IEEE - ConvertToIeeeExtended(d, (unsigned char *)buf); -#else -# pragma warning "wxDataStream::WriteDouble() not using IeeeExtended - will not work!" - buf[0] = '\0'; -#endif - Write(buf, 10); -} diff --git a/src/common/db.cpp b/src/common/db.cpp deleted file mode 100644 index 7d04ee2f3e..0000000000 --- a/src/common/db.cpp +++ /dev/null @@ -1,1320 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: db.cpp -// Purpose: Implementation of the wxDB class. The wxDB class represents a connection -// to an ODBC data source. The wxDB class allows operations on the data -// source such as opening and closing the data source. -// Author: Doug Card -// Modified by: -// Created: 9.96 -// RCS-ID: $Id$ -// Copyright: (c) 1996 Remstar International, Inc. -// Licence: wxWindows licence, plus: -// Notice: This class library and its intellectual design are free of charge for use, -// modification, enhancement, debugging under the following conditions: -// 1) These classes may only be used as part of the implementation of a -// wxWindows-based application -// 2) All enhancements and bug fixes are to be submitted back to the wxWindows -// user groups free of all charges for use with the wxWindows library. -// 3) These classes may not be distributed as part of any other class library, -// DLL, text (written or electronic), other than a complete distribution of -// the wxWindows GUI development toolkit. -/////////////////////////////////////////////////////////////////////////////// - -/* -// SYNOPSIS START -// SYNOPSIS STOP -*/ - -#pragma implementation "db.h" - -/* -#ifdef _CONSOLE - #include -#endif -*/ - -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif //__BORLANDC__ - -#ifndef WX_PRECOMP - #include -#endif //WX_PRECOMP - -#if USE_ODBC - -#include - -#include -#include -#include - -DbList *PtrBegDbList = 0; - -/********** wxDB Constructor **********/ -wxDB::wxDB(HENV &aHenv) -{ - int i; - - strcpy(sqlState,""); - strcpy(errorMsg,""); - nativeError = cbErrorMsg = 0; - for (i = 0; i < DB_MAX_ERROR_HISTORY; i++) - strcpy(errorList[i], ""); - - // Init typeInf structures - strcpy(typeInfVarchar.TypeName,""); - typeInfVarchar.FsqlType = 0; - typeInfVarchar.Precision = 0; - typeInfVarchar.CaseSensitive = 0; - typeInfVarchar.MaximumScale = 0; - - strcpy(typeInfInteger.TypeName,""); - typeInfInteger.FsqlType = 0; - typeInfInteger.Precision = 0; - typeInfInteger.CaseSensitive = 0; - typeInfInteger.MaximumScale = 0; - - strcpy(typeInfFloat.TypeName,""); - typeInfFloat.FsqlType = 0; - typeInfFloat.Precision = 0; - typeInfFloat.CaseSensitive = 0; - typeInfFloat.MaximumScale = 0; - - strcpy(typeInfDate.TypeName,""); - typeInfDate.FsqlType = 0; - typeInfDate.Precision = 0; - typeInfDate.CaseSensitive = 0; - typeInfDate.MaximumScale = 0; - - // Error reporting is turned OFF by default - silent = TRUE; - - // Copy the HENV into the db class - henv = aHenv; - - // Allocate a data source connection handle - if (SQLAllocConnect(henv, &hdbc) != SQL_SUCCESS) - DispAllErrors(henv); - - // Initialize the db status flag - DB_STATUS = 0; - - // Mark database as not open as of yet - dbIsOpen = FALSE; - -} // wxDB::wxDB() - -/********** wxDB::Open() **********/ -bool wxDB::Open(char *Dsn, char *Uid, char *AuthStr) -{ - assert(Dsn); - dsn = Dsn; - uid = Uid; - authStr = AuthStr; - -#ifndef FWD_ONLY_CURSORS - - RETCODE retcode; - - // Specify that the ODBC cursor library be used, if needed. This must be - // specified before the connection is made. - retcode = SQLSetConnectOption(hdbc, SQL_ODBC_CURSORS, SQL_CUR_USE_IF_NEEDED); - - #ifdef _CONSOLE - if (retcode == SQL_SUCCESS) - cout << "SQLSetConnectOption(CURSOR_LIB) successful" << endl; - else - cout << "SQLSetConnectOption(CURSOR_LIB) failed" << endl; - #endif - -#endif - - // Connect to the data source - if (SQLConnect(hdbc, (UCHAR FAR *) Dsn, SQL_NTS, - (UCHAR FAR *) Uid, SQL_NTS, - (UCHAR FAR *) AuthStr, SQL_NTS) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - // Mark database as open - dbIsOpen = TRUE; - - // Allocate a statement handle for the database connection - if (SQLAllocStmt(hdbc, &hstmt) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - // Set Connection Options - if (! setConnectionOptions()) - return(FALSE); - - // Query the data source for inf. about itself - if (! getDbInfo()) - return(FALSE); - - // Query the data source regarding data type information - - // - // The way I determined which SQL data types to use was by calling SQLGetInfo - // for all of the possible SQL data types to see which ones were supported. If - // a type is not supported, the SQLFetch() that's called from getDataTypeInfo() - // fails with SQL_NO_DATA_FOUND. This is ugly because I'm sure the three SQL data - // types I've selected below will not alway's be what we want. These are just - // what happened to work against an Oracle 7/Intersolv combination. The following is - // a complete list of the results I got back against the Oracle 7 database: - // - // SQL_BIGINT SQL_NO_DATA_FOUND - // SQL_BINARY SQL_NO_DATA_FOUND - // SQL_BIT SQL_NO_DATA_FOUND - // SQL_CHAR type name = 'CHAR', Precision = 255 - // SQL_DATE SQL_NO_DATA_FOUND - // SQL_DECIMAL type name = 'NUMBER', Precision = 38 - // SQL_DOUBLE type name = 'NUMBER', Precision = 15 - // SQL_FLOAT SQL_NO_DATA_FOUND - // SQL_INTEGER SQL_NO_DATA_FOUND - // SQL_LONGVARBINARY type name = 'LONG RAW', Precision = 2 billion - // SQL_LONGVARCHAR type name = 'LONG', Precision = 2 billion - // SQL_NUMERIC SQL_NO_DATA_FOUND - // SQL_REAL SQL_NO_DATA_FOUND - // SQL_SMALLINT SQL_NO_DATA_FOUND - // SQL_TIME SQL_NO_DATA_FOUND - // SQL_TIMESTAMP type name = 'DATE', Precision = 19 - // SQL_VARBINARY type name = 'RAW', Precision = 255 - // SQL_VARCHAR type name = 'VARCHAR2', Precision = 2000 - // ===================================================================== - // Results from a Microsoft Access 7.0 db, using a driver from Microsoft - // - // SQL_VARCHAR type name = 'TEXT', Precision = 255 - // SQL_TIMESTAMP type name = 'DATETIME' - // SQL_DECIMAL SQL_NO_DATA_FOUND - // SQL_NUMERIC type name = 'CURRENCY', Precision = 19 - // SQL_FLOAT SQL_NO_DATA_FOUND - // SQL_REAL type name = 'SINGLE', Precision = 7 - // SQL_DOUBLE type name = 'DOUBLE', Precision = 15 - // SQL_INTEGER type name = 'LONG', Precision = 10 - - // VARCHAR = Variable length character string - if (! getDataTypeInfo(SQL_VARCHAR, typeInfVarchar)) - if (! getDataTypeInfo(SQL_CHAR, typeInfVarchar)) - return(FALSE); - else - typeInfVarchar.FsqlType = SQL_CHAR; - else - typeInfVarchar.FsqlType = SQL_VARCHAR; - - // Float - if (! getDataTypeInfo(SQL_DOUBLE, typeInfFloat)) - if (! getDataTypeInfo(SQL_REAL, typeInfFloat)) - if (! getDataTypeInfo(SQL_FLOAT, typeInfFloat)) - if (! getDataTypeInfo(SQL_DECIMAL, typeInfFloat)) - if (! getDataTypeInfo(SQL_NUMERIC, typeInfFloat)) - return(FALSE); - else - typeInfFloat.FsqlType = SQL_NUMERIC; - else - typeInfFloat.FsqlType = SQL_DECIMAL; - else - typeInfFloat.FsqlType = SQL_FLOAT; - else - typeInfFloat.FsqlType = SQL_REAL; - else - typeInfFloat.FsqlType = SQL_DOUBLE; - - // Integer - if (! getDataTypeInfo(SQL_INTEGER, typeInfInteger)) - // If SQL_INTEGER is not supported, use the floating point - // data type to store integers as well as floats - if (! getDataTypeInfo(typeInfFloat.FsqlType, typeInfInteger)) - return(FALSE); - else - typeInfInteger.FsqlType = typeInfFloat.FsqlType; - else - typeInfInteger.FsqlType = SQL_INTEGER; - - // Date/Time - if (! getDataTypeInfo(SQL_TIMESTAMP, typeInfDate)) - return(FALSE); - else - typeInfDate.FsqlType = SQL_TIMESTAMP; - -#ifdef _CONSOLE - cout << "VARCHAR DATA TYPE: " << typeInfVarchar.TypeName << endl; - cout << "INTEGER DATA TYPE: " << typeInfInteger.TypeName << endl; - cout << "FLOAT DATA TYPE: " << typeInfFloat.TypeName << endl; - cout << "DATE DATA TYPE: " << typeInfDate.TypeName << endl; - cout << endl; -#endif - - // Completed Successfully - return(TRUE); - -} // wxDB::Open() - -// The Intersolv/Oracle 7 driver was "Not Capable" of setting the login timeout. - -/********** wxDB::setConnectionOptions() **********/ -bool wxDB::setConnectionOptions(void) -{ - SQLSetConnectOption(hdbc, SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF); - SQLSetConnectOption(hdbc, SQL_OPT_TRACE, SQL_OPT_TRACE_OFF); - - // Display the connection options to verify them -#ifdef _CONSOLE - long l; - cout << ">>>>> CONNECTION OPTIONS <<<<<<" << endl; - - if (SQLGetConnectOption(hdbc, SQL_AUTOCOMMIT, &l) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - cout << "AUTOCOMMIT: " << (l == SQL_AUTOCOMMIT_OFF ? "OFF" : "ON") << endl; - - if (SQLGetConnectOption(hdbc, SQL_ODBC_CURSORS, &l) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - cout << "ODBC CURSORS: "; - switch(l) - { - case(SQL_CUR_USE_IF_NEEDED): - cout << "SQL_CUR_USE_IF_NEEDED"; - break; - case(SQL_CUR_USE_ODBC): - cout << "SQL_CUR_USE_ODBC"; - break; - case(SQL_CUR_USE_DRIVER): - cout << "SQL_CUR_USE_DRIVER"; - break; - } - cout << endl; - - if (SQLGetConnectOption(hdbc, SQL_OPT_TRACE, &l) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - cout << "TRACING: " << (l == SQL_OPT_TRACE_OFF ? "OFF" : "ON") << endl; - - cout << endl; -#endif - - // Completed Successfully - return(TRUE); - -} // wxDB::setConnectionOptions() - -/********** wxDB::getDbInfo() **********/ -bool wxDB::getDbInfo(void) -{ - SWORD cb; - - if (SQLGetInfo(hdbc, SQL_SERVER_NAME, dbInf.serverName, 40, &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_DATABASE_NAME, dbInf.databaseName, 128, &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_DBMS_NAME, dbInf.dbmsName, 40, &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_DBMS_VER, dbInf.dbmsVer, 20, &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_ACTIVE_CONNECTIONS, &dbInf.maxConnections, sizeof(dbInf.maxConnections), &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_ACTIVE_STATEMENTS, &dbInf.maxStmts, sizeof(dbInf.maxStmts), &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_DRIVER_NAME, dbInf.driverName, 40, &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_DRIVER_ODBC_VER, dbInf.odbcVer, 20, &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_ODBC_VER, dbInf.drvMgrOdbcVer, 20, &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_DRIVER_VER, dbInf.driverVer, 40, &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_ODBC_API_CONFORMANCE, &dbInf.apiConfLvl, sizeof(dbInf.apiConfLvl), &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_ODBC_SAG_CLI_CONFORMANCE, &dbInf.cliConfLvl, sizeof(dbInf.cliConfLvl), &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_ODBC_SQL_CONFORMANCE, &dbInf.sqlConfLvl, sizeof(dbInf.sqlConfLvl), &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_OUTER_JOINS, dbInf.outerJoins, 2, &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_PROCEDURES, dbInf.procedureSupport, 2, &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_CURSOR_COMMIT_BEHAVIOR, &dbInf.cursorCommitBehavior, sizeof(dbInf.cursorCommitBehavior), &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_CURSOR_ROLLBACK_BEHAVIOR, &dbInf.cursorRollbackBehavior, sizeof(dbInf.cursorRollbackBehavior), &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_NON_NULLABLE_COLUMNS, &dbInf.supportNotNullClause, sizeof(dbInf.supportNotNullClause), &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_ODBC_SQL_OPT_IEF, dbInf.supportIEF, 2, &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_DEFAULT_TXN_ISOLATION, &dbInf.txnIsolation, sizeof(dbInf.txnIsolation), &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_TXN_ISOLATION_OPTION, &dbInf.txnIsolationOptions, sizeof(dbInf.txnIsolationOptions), &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_FETCH_DIRECTION, &dbInf.fetchDirections, sizeof(dbInf.fetchDirections), &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_LOCK_TYPES, &dbInf.lockTypes, sizeof(dbInf.lockTypes), &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_POS_OPERATIONS, &dbInf.posOperations, sizeof(dbInf.posOperations), &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_POSITIONED_STATEMENTS, &dbInf.posStmts, sizeof(dbInf.posStmts), &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_SCROLL_CONCURRENCY, &dbInf.scrollConcurrency, sizeof(dbInf.scrollConcurrency), &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_SCROLL_OPTIONS, &dbInf.scrollOptions, sizeof(dbInf.scrollOptions), &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_STATIC_SENSITIVITY, &dbInf.staticSensitivity, sizeof(dbInf.staticSensitivity), &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_TXN_CAPABLE, &dbInf.txnCapable, sizeof(dbInf.txnCapable), &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - if (SQLGetInfo(hdbc, SQL_LOGIN_TIMEOUT, &dbInf.loginTimeout, sizeof(dbInf.loginTimeout), &cb) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - -#ifdef _CONSOLE - cout << ">>>>> DATA SOURCE INFORMATION <<<<<" << endl; - cout << "SERVER Name: " << dbInf.serverName << endl; - cout << "DBMS Name: " << dbInf.dbmsName << "; DBMS Version: " << dbInf.dbmsVer << endl; - cout << "ODBC Version: " << dbInf.odbcVer << "; Driver Version: " << dbInf.driverVer << endl; - - cout << "API Conf. Level: "; - switch(dbInf.apiConfLvl) - { - case SQL_OAC_NONE: cout << "None"; break; - case SQL_OAC_LEVEL1: cout << "Level 1"; break; - case SQL_OAC_LEVEL2: cout << "Level 2"; break; - } - cout << endl; - - cout << "SAG CLI Conf. Level: "; - switch(dbInf.cliConfLvl) - { - case SQL_OSCC_NOT_COMPLIANT: cout << "Not Compliant"; break; - case SQL_OSCC_COMPLIANT: cout << "Compliant"; break; - } - cout << endl; - - cout << "SQL Conf. Level: "; - switch(dbInf.sqlConfLvl) - { - case SQL_OSC_MINIMUM: cout << "Minimum Grammer"; break; - case SQL_OSC_CORE: cout << "Core Grammer"; break; - case SQL_OSC_EXTENDED: cout << "Extended Grammer"; break; - } - cout << endl; - - cout << "Max. Connections: " << dbInf.maxConnections << endl; - cout << "Outer Joins: " << dbInf.outerJoins << endl; - cout << "Support for Procedures: " << dbInf.procedureSupport << endl; - - cout << "Cursor COMMIT Behavior: "; - switch(dbInf.cursorCommitBehavior) - { - case SQL_CB_DELETE: cout << "Delete cursors"; break; - case SQL_CB_CLOSE: cout << "Close cursors"; break; - case SQL_CB_PRESERVE: cout << "Preserve cursors"; break; - } - cout << endl; - - cout << "Cursor ROLLBACK Behavior: "; - switch(dbInf.cursorRollbackBehavior) - { - case SQL_CB_DELETE: cout << "Delete cursors"; break; - case SQL_CB_CLOSE: cout << "Close cursors"; break; - case SQL_CB_PRESERVE: cout << "Preserve cursors"; break; - } - cout << endl; - - cout << "Support NOT NULL clause: "; - switch(dbInf.supportNotNullClause) - { - case SQL_NNC_NULL: cout << "No"; break; - case SQL_NNC_NON_NULL: cout << "Yes"; break; - } - cout << endl; - - cout << "Support IEF (Ref. Integrity): " << dbInf.supportIEF << endl; - cout << "Login Timeout: " << dbInf.loginTimeout << endl; - - cout << endl << endl << "more ..." << endl; - getchar(); - - cout << "Default Transaction Isolation: "; - switch(dbInf.txnIsolation) - { - case SQL_TXN_READ_UNCOMMITTED: cout << "Read Uncommitted"; break; - case SQL_TXN_READ_COMMITTED: cout << "Read Committed"; break; - case SQL_TXN_REPEATABLE_READ: cout << "Repeatable Read"; break; - case SQL_TXN_SERIALIZABLE: cout << "Serializable"; break; -#ifdef ODBC_V20 - case SQL_TXN_VERSIONING: cout << "Versioning"; break; -#endif - } - cout << endl; - - cout << "Transaction Isolation Options: "; - if (dbInf.txnIsolationOptions & SQL_TXN_READ_UNCOMMITTED) - cout << "Read Uncommitted, "; - if (dbInf.txnIsolationOptions & SQL_TXN_READ_COMMITTED) - cout << "Read Committed, "; - if (dbInf.txnIsolationOptions & SQL_TXN_REPEATABLE_READ) - cout << "Repeatable Read, "; - if (dbInf.txnIsolationOptions & SQL_TXN_SERIALIZABLE) - cout << "Serializable, "; -#ifdef ODBC_V20 - if (dbInf.txnIsolationOptions & SQL_TXN_VERSIONING) - cout << "Versioning"; -#endif - cout << endl; - - cout << "Fetch Directions Supported:" << endl << " "; - if (dbInf.fetchDirections & SQL_FD_FETCH_NEXT) - cout << "Next, "; - if (dbInf.fetchDirections & SQL_FD_FETCH_PRIOR) - cout << "Prev, "; - if (dbInf.fetchDirections & SQL_FD_FETCH_FIRST) - cout << "First, "; - if (dbInf.fetchDirections & SQL_FD_FETCH_LAST) - cout << "Last, "; - if (dbInf.fetchDirections & SQL_FD_FETCH_ABSOLUTE) - cout << "Absolute, "; - if (dbInf.fetchDirections & SQL_FD_FETCH_RELATIVE) - cout << "Relative, "; -#ifdef ODBC_V20 - if (dbInf.fetchDirections & SQL_FD_FETCH_RESUME) - cout << "Resume, "; -#endif - if (dbInf.fetchDirections & SQL_FD_FETCH_BOOKMARK) - cout << "Bookmark"; - cout << endl; - - cout << "Lock Types Supported (SQLSetPos): "; - if (dbInf.lockTypes & SQL_LCK_NO_CHANGE) - cout << "No Change, "; - if (dbInf.lockTypes & SQL_LCK_EXCLUSIVE) - cout << "Exclusive, "; - if (dbInf.lockTypes & SQL_LCK_UNLOCK) - cout << "UnLock"; - cout << endl; - - cout << "Position Operations Supported (SQLSetPos): "; - if (dbInf.posOperations & SQL_POS_POSITION) - cout << "Position, "; - if (dbInf.posOperations & SQL_POS_REFRESH) - cout << "Refresh, "; - if (dbInf.posOperations & SQL_POS_UPDATE) - cout << "Upd, "; - if (dbInf.posOperations & SQL_POS_DELETE) - cout << "Del, "; - if (dbInf.posOperations & SQL_POS_ADD) - cout << "Add"; - cout << endl; - - cout << "Positioned Statements Supported: "; - if (dbInf.posStmts & SQL_PS_POSITIONED_DELETE) - cout << "Pos delete, "; - if (dbInf.posStmts & SQL_PS_POSITIONED_UPDATE) - cout << "Pos update, "; - if (dbInf.posStmts & SQL_PS_SELECT_FOR_UPDATE) - cout << "Select for update"; - cout << endl; - - cout << "Scroll Concurrency: "; - if (dbInf.scrollConcurrency & SQL_SCCO_READ_ONLY) - cout << "Read Only, "; - if (dbInf.scrollConcurrency & SQL_SCCO_LOCK) - cout << "Lock, "; - if (dbInf.scrollConcurrency & SQL_SCCO_OPT_ROWVER) - cout << "Opt. Rowver, "; - if (dbInf.scrollConcurrency & SQL_SCCO_OPT_VALUES) - cout << "Opt. Values"; - cout << endl; - - cout << "Scroll Options: "; - if (dbInf.scrollOptions & SQL_SO_FORWARD_ONLY) - cout << "Fwd Only, "; - if (dbInf.scrollOptions & SQL_SO_STATIC) - cout << "Static, "; - if (dbInf.scrollOptions & SQL_SO_KEYSET_DRIVEN) - cout << "Keyset Driven, "; - if (dbInf.scrollOptions & SQL_SO_DYNAMIC) - cout << "Dynamic, "; - if (dbInf.scrollOptions & SQL_SO_MIXED) - cout << "Mixed"; - cout << endl; - - cout << "Static Sensitivity: "; - if (dbInf.staticSensitivity & SQL_SS_ADDITIONS) - cout << "Additions, "; - if (dbInf.staticSensitivity & SQL_SS_DELETIONS) - cout << "Deletions, "; - if (dbInf.staticSensitivity & SQL_SS_UPDATES) - cout << "Updates"; - cout << endl; - - cout << "Transaction Capable?: "; - switch(dbInf.txnCapable) - { - case SQL_TC_NONE: cout << "No"; break; - case SQL_TC_DML: cout << "DML Only"; break; - case SQL_TC_DDL_COMMIT: cout << "DDL Commit"; break; - case SQL_TC_DDL_IGNORE: cout << "DDL Ignore"; break; - case SQL_TC_ALL: cout << "DDL & DML"; break; - } - cout << endl; - - cout << endl; - -#endif - - // Completed Successfully - return(TRUE); - -} // wxDB::getDbInfo() - -/********** wxDB::getDataTypeInfo() **********/ -bool wxDB::getDataTypeInfo(SWORD fSqlType, SqlTypeInfo &structSQLTypeInfo) -{ - // fSqlType will be something like SQL_VARCHAR. This parameter determines - // the data type inf. is gathered for. - // - // SqlTypeInfo is a structure that is filled in with data type information, - - RETCODE retcode; - SDWORD cbRet; - - // Get information about the data type specified - if (SQLGetTypeInfo(hstmt, fSqlType) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc, hstmt)); - // Fetch the record - if ((retcode = SQLFetch(hstmt)) != SQL_SUCCESS) - { -#ifdef _CONSOLE - if (retcode == SQL_NO_DATA_FOUND) - cout << "SQL_NO_DATA_FOUND fetching inf. about data type." << endl; -#endif - DispAllErrors(henv, hdbc, hstmt); - SQLFreeStmt(hstmt, SQL_CLOSE); - return(FALSE); - } - // Obtain columns from the record - if (SQLGetData(hstmt, 1, SQL_C_CHAR, structSQLTypeInfo.TypeName, DB_TYPE_NAME_LEN, &cbRet) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc, hstmt)); - if (SQLGetData(hstmt, 3, SQL_C_LONG, &structSQLTypeInfo.Precision, 0, &cbRet) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc, hstmt)); - if (SQLGetData(hstmt, 8, SQL_C_SHORT, &structSQLTypeInfo.CaseSensitive, 0, &cbRet) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc, hstmt)); -// if (SQLGetData(hstmt, 14, SQL_C_SHORT, &structSQLTypeInfo.MinimumScale, 0, &cbRet) != SQL_SUCCESS) -// return(DispAllErrors(henv, hdbc, hstmt)); - if (SQLGetData(hstmt, 15, SQL_C_SHORT, &structSQLTypeInfo.MaximumScale, 0, &cbRet) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc, hstmt)); - - if (structSQLTypeInfo.MaximumScale < 0) - structSQLTypeInfo.MaximumScale = 0; - - // Close the statement handle which closes open cursors - if (SQLFreeStmt(hstmt, SQL_CLOSE) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc, hstmt)); - - // Completed Successfully - return(TRUE); - -} // wxDB::getDataTypeInfo() - -/********** wxDB::Close() **********/ -void wxDB::Close(void) -{ - // Free statement handle - if (dbIsOpen) - { - if (SQLFreeStmt(hstmt, SQL_DROP) != SQL_SUCCESS) - DispAllErrors(henv, hdbc); - } - - // Disconnect from the datasource - if (SQLDisconnect(hdbc) != SQL_SUCCESS) - DispAllErrors(henv, hdbc); - - // Free the connection to the datasource - if (SQLFreeConnect(hdbc) != SQL_SUCCESS) - DispAllErrors(henv, hdbc); - -} // wxDB::Close() - -/********** wxDB::CommitTrans() **********/ -bool wxDB::CommitTrans(void) -{ - // Commit the transaction - if (SQLTransact(henv, hdbc, SQL_COMMIT) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - // Completed successfully - return(TRUE); - -} // wxDB::CommitTrans() - -/********** wxDB::RollbackTrans() **********/ -bool wxDB::RollbackTrans(void) -{ - // Rollback the transaction - if (SQLTransact(henv, hdbc, SQL_ROLLBACK) != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc)); - - // Completed successfully - return(TRUE); - -} // wxDB::RollbackTrans() - -/********** wxDB::DispAllErrors() **********/ -bool wxDB::DispAllErrors(HENV aHenv, HDBC aHdbc, HSTMT aHstmt) -{ - char odbcErrMsg[DB_MAX_ERROR_MSG_LEN]; - - while (SQLError(aHenv, aHdbc, aHstmt, (UCHAR FAR *) sqlState, &nativeError, (UCHAR FAR *) errorMsg, SQL_MAX_MESSAGE_LENGTH - 1, &cbErrorMsg) == SQL_SUCCESS) - { - sprintf(odbcErrMsg, "SQL State = %s\nNative Error Code = %li\nError Message = %s\n", sqlState, nativeError, errorMsg); - logError(odbcErrMsg, sqlState); - if (!silent) - { -#ifdef _CONSOLE - // When run in console mode, use standard out to display errors. - cout << odbcErrMsg << endl; - cout << "Press any key to continue..." << endl; - getchar(); -#endif - } - } - - return(FALSE); // This function alway's returns false. - -} // wxDB::DispAllErrors() - -/********** wxDB::GetNextError() **********/ -bool wxDB::GetNextError(HENV aHenv, HDBC aHdbc, HSTMT aHstmt) -{ - if (SQLError(aHenv, aHdbc, aHstmt, (UCHAR FAR *) sqlState, &nativeError, (UCHAR FAR *) errorMsg, SQL_MAX_MESSAGE_LENGTH - 1, &cbErrorMsg) == SQL_SUCCESS) - return(TRUE); - else - return(FALSE); - -} // wxDB::GetNextError() - -/********** wxDB::DispNextError() **********/ -void wxDB::DispNextError(void) -{ - char odbcErrMsg[DB_MAX_ERROR_MSG_LEN]; - - sprintf(odbcErrMsg, "SQL State = %s\nNative Error Code = %li\nError Message = %s\n", sqlState, nativeError, errorMsg); - logError(odbcErrMsg, sqlState); - - if (silent) - return; - -#ifdef _CONSOLE - // When run in console mode, use standard out to display errors. - cout << odbcErrMsg << endl; - cout << "Press any key to continue..." << endl; - getchar(); -#endif - -} // wxDB::DispNextError() - -/********** wxDB::logError() **********/ -void wxDB::logError(char *errMsg, char *SQLState) -{ - assert(errMsg && strlen(errMsg)); - - static int pLast = -1; - int dbStatus; - - if (++pLast == DB_MAX_ERROR_HISTORY) - { - for (int i = 0; i < DB_MAX_ERROR_HISTORY; i++) - strcpy(errorList[i], errorList[i+1]); - pLast--; - } - - strcpy(errorList[pLast], errMsg); - - if (SQLState && strlen(SQLState)) - if ((dbStatus = TranslateSqlState(SQLState)) != DB_ERR_FUNCTION_SEQUENCE_ERROR) - DB_STATUS = dbStatus; - -} // wxDB::logError() - -/**********wxDB::TranslateSqlState() **********/ -int wxDB::TranslateSqlState(char *SQLState) -{ - if (!strcmp(SQLState, "01000")) - return(DB_ERR_GENERAL_WARNING); - if (!strcmp(SQLState, "01002")) - return(DB_ERR_DISCONNECT_ERROR); - if (!strcmp(SQLState, "01004")) - return(DB_ERR_DATA_TRUNCATED); - if (!strcmp(SQLState, "01006")) - return(DB_ERR_PRIV_NOT_REVOKED); - if (!strcmp(SQLState, "01S00")) - return(DB_ERR_INVALID_CONN_STR_ATTR); - if (!strcmp(SQLState, "01S01")) - return(DB_ERR_ERROR_IN_ROW); - if (!strcmp(SQLState, "01S02")) - return(DB_ERR_OPTION_VALUE_CHANGED); - if (!strcmp(SQLState, "01S03")) - return(DB_ERR_NO_ROWS_UPD_OR_DEL); - if (!strcmp(SQLState, "01S04")) - return(DB_ERR_MULTI_ROWS_UPD_OR_DEL); - if (!strcmp(SQLState, "07001")) - return(DB_ERR_WRONG_NO_OF_PARAMS); - if (!strcmp(SQLState, "07006")) - return(DB_ERR_DATA_TYPE_ATTR_VIOL); - if (!strcmp(SQLState, "08001")) - return(DB_ERR_UNABLE_TO_CONNECT); - if (!strcmp(SQLState, "08002")) - return(DB_ERR_CONNECTION_IN_USE); - if (!strcmp(SQLState, "08003")) - return(DB_ERR_CONNECTION_NOT_OPEN); - if (!strcmp(SQLState, "08004")) - return(DB_ERR_REJECTED_CONNECTION); - if (!strcmp(SQLState, "08007")) - return(DB_ERR_CONN_FAIL_IN_TRANS); - if (!strcmp(SQLState, "08S01")) - return(DB_ERR_COMM_LINK_FAILURE); - if (!strcmp(SQLState, "21S01")) - return(DB_ERR_INSERT_VALUE_LIST_MISMATCH); - if (!strcmp(SQLState, "21S02")) - return(DB_ERR_DERIVED_TABLE_MISMATCH); - if (!strcmp(SQLState, "22001")) - return(DB_ERR_STRING_RIGHT_TRUNC); - if (!strcmp(SQLState, "22003")) - return(DB_ERR_NUMERIC_VALUE_OUT_OF_RNG); - if (!strcmp(SQLState, "22005")) - return(DB_ERR_ERROR_IN_ASSIGNMENT); - if (!strcmp(SQLState, "22008")) - return(DB_ERR_DATETIME_FLD_OVERFLOW); - if (!strcmp(SQLState, "22012")) - return(DB_ERR_DIVIDE_BY_ZERO); - if (!strcmp(SQLState, "22026")) - return(DB_ERR_STR_DATA_LENGTH_MISMATCH); - if (!strcmp(SQLState, "23000")) - return(DB_ERR_INTEGRITY_CONSTRAINT_VIOL); - if (!strcmp(SQLState, "24000")) - return(DB_ERR_INVALID_CURSOR_STATE); - if (!strcmp(SQLState, "25000")) - return(DB_ERR_INVALID_TRANS_STATE); - if (!strcmp(SQLState, "28000")) - return(DB_ERR_INVALID_AUTH_SPEC); - if (!strcmp(SQLState, "34000")) - return(DB_ERR_INVALID_CURSOR_NAME); - if (!strcmp(SQLState, "37000")) - return(DB_ERR_SYNTAX_ERROR_OR_ACCESS_VIOL); - if (!strcmp(SQLState, "3C000")) - return(DB_ERR_DUPLICATE_CURSOR_NAME); - if (!strcmp(SQLState, "40001")) - return(DB_ERR_SERIALIZATION_FAILURE); - if (!strcmp(SQLState, "42000")) - return(DB_ERR_SYNTAX_ERROR_OR_ACCESS_VIOL2); - if (!strcmp(SQLState, "70100")) - return(DB_ERR_OPERATION_ABORTED); - if (!strcmp(SQLState, "IM001")) - return(DB_ERR_UNSUPPORTED_FUNCTION); - if (!strcmp(SQLState, "IM002")) - return(DB_ERR_NO_DATA_SOURCE); - if (!strcmp(SQLState, "IM003")) - return(DB_ERR_DRIVER_LOAD_ERROR); - if (!strcmp(SQLState, "IM004")) - return(DB_ERR_SQLALLOCENV_FAILED); - if (!strcmp(SQLState, "IM005")) - return(DB_ERR_SQLALLOCCONNECT_FAILED); - if (!strcmp(SQLState, "IM006")) - return(DB_ERR_SQLSETCONNECTOPTION_FAILED); - if (!strcmp(SQLState, "IM007")) - return(DB_ERR_NO_DATA_SOURCE_DLG_PROHIB); - if (!strcmp(SQLState, "IM008")) - return(DB_ERR_DIALOG_FAILED); - if (!strcmp(SQLState, "IM009")) - return(DB_ERR_UNABLE_TO_LOAD_TRANSLATION_DLL); - if (!strcmp(SQLState, "IM010")) - return(DB_ERR_DATA_SOURCE_NAME_TOO_LONG); - if (!strcmp(SQLState, "IM011")) - return(DB_ERR_DRIVER_NAME_TOO_LONG); - if (!strcmp(SQLState, "IM012")) - return(DB_ERR_DRIVER_KEYWORD_SYNTAX_ERROR); - if (!strcmp(SQLState, "IM013")) - return(DB_ERR_TRACE_FILE_ERROR); - if (!strcmp(SQLState, "S0001")) - return(DB_ERR_TABLE_OR_VIEW_ALREADY_EXISTS); - if (!strcmp(SQLState, "S0002")) - return(DB_ERR_TABLE_NOT_FOUND); - if (!strcmp(SQLState, "S0011")) - return(DB_ERR_INDEX_ALREADY_EXISTS); - if (!strcmp(SQLState, "S0012")) - return(DB_ERR_INDEX_NOT_FOUND); - if (!strcmp(SQLState, "S0021")) - return(DB_ERR_COLUMN_ALREADY_EXISTS); - if (!strcmp(SQLState, "S0022")) - return(DB_ERR_COLUMN_NOT_FOUND); - if (!strcmp(SQLState, "S0023")) - return(DB_ERR_NO_DEFAULT_FOR_COLUMN); - if (!strcmp(SQLState, "S1000")) - return(DB_ERR_GENERAL_ERROR); - if (!strcmp(SQLState, "S1001")) - return(DB_ERR_MEMORY_ALLOCATION_FAILURE); - if (!strcmp(SQLState, "S1002")) - return(DB_ERR_INVALID_COLUMN_NUMBER); - if (!strcmp(SQLState, "S1003")) - return(DB_ERR_PROGRAM_TYPE_OUT_OF_RANGE); - if (!strcmp(SQLState, "S1004")) - return(DB_ERR_SQL_DATA_TYPE_OUT_OF_RANGE); - if (!strcmp(SQLState, "S1008")) - return(DB_ERR_OPERATION_CANCELLED); - if (!strcmp(SQLState, "S1009")) - return(DB_ERR_INVALID_ARGUMENT_VALUE); - if (!strcmp(SQLState, "S1010")) - return(DB_ERR_FUNCTION_SEQUENCE_ERROR); - if (!strcmp(SQLState, "S1011")) - return(DB_ERR_OPERATION_INVALID_AT_THIS_TIME); - if (!strcmp(SQLState, "S1012")) - return(DB_ERR_INVALID_TRANS_OPERATION_CODE); - if (!strcmp(SQLState, "S1015")) - return(DB_ERR_NO_CURSOR_NAME_AVAIL); - if (!strcmp(SQLState, "S1090")) - return(DB_ERR_INVALID_STR_OR_BUF_LEN); - if (!strcmp(SQLState, "S1091")) - return(DB_ERR_DESCRIPTOR_TYPE_OUT_OF_RANGE); - if (!strcmp(SQLState, "S1092")) - return(DB_ERR_OPTION_TYPE_OUT_OF_RANGE); - if (!strcmp(SQLState, "S1093")) - return(DB_ERR_INVALID_PARAM_NO); - if (!strcmp(SQLState, "S1094")) - return(DB_ERR_INVALID_SCALE_VALUE); - if (!strcmp(SQLState, "S1095")) - return(DB_ERR_FUNCTION_TYPE_OUT_OF_RANGE); - if (!strcmp(SQLState, "S1096")) - return(DB_ERR_INF_TYPE_OUT_OF_RANGE); - if (!strcmp(SQLState, "S1097")) - return(DB_ERR_COLUMN_TYPE_OUT_OF_RANGE); - if (!strcmp(SQLState, "S1098")) - return(DB_ERR_SCOPE_TYPE_OUT_OF_RANGE); - if (!strcmp(SQLState, "S1099")) - return(DB_ERR_NULLABLE_TYPE_OUT_OF_RANGE); - if (!strcmp(SQLState, "S1100")) - return(DB_ERR_UNIQUENESS_OPTION_TYPE_OUT_OF_RANGE); - if (!strcmp(SQLState, "S1101")) - return(DB_ERR_ACCURACY_OPTION_TYPE_OUT_OF_RANGE); - if (!strcmp(SQLState, "S1103")) - return(DB_ERR_DIRECTION_OPTION_OUT_OF_RANGE); - if (!strcmp(SQLState, "S1104")) - return(DB_ERR_INVALID_PRECISION_VALUE); - if (!strcmp(SQLState, "S1105")) - return(DB_ERR_INVALID_PARAM_TYPE); - if (!strcmp(SQLState, "S1106")) - return(DB_ERR_FETCH_TYPE_OUT_OF_RANGE); - if (!strcmp(SQLState, "S1107")) - return(DB_ERR_ROW_VALUE_OUT_OF_RANGE); - if (!strcmp(SQLState, "S1108")) - return(DB_ERR_CONCURRENCY_OPTION_OUT_OF_RANGE); - if (!strcmp(SQLState, "S1109")) - return(DB_ERR_INVALID_CURSOR_POSITION); - if (!strcmp(SQLState, "S1110")) - return(DB_ERR_INVALID_DRIVER_COMPLETION); - if (!strcmp(SQLState, "S1111")) - return(DB_ERR_INVALID_BOOKMARK_VALUE); - if (!strcmp(SQLState, "S1C00")) - return(DB_ERR_DRIVER_NOT_CAPABLE); - if (!strcmp(SQLState, "S1T00")) - return(DB_ERR_TIMEOUT_EXPIRED); - - // No match - return(0); - -} // wxDB::TranslateSqlState() - -/********** wxDB::Grant() **********/ -bool wxDB::Grant(int privileges, char *tableName, char *userList) -{ - char sqlStmt[DB_MAX_STATEMENT_LEN]; - - // Build the grant statement - strcpy(sqlStmt, "GRANT "); - if (privileges == DB_GRANT_ALL) - strcat(sqlStmt, "ALL"); - else - { - int c = 0; - if (privileges & DB_GRANT_SELECT) - { - strcat(sqlStmt, "SELECT"); - c++; - } - if (privileges & DB_GRANT_INSERT) - { - if (c++) - strcat(sqlStmt, ", "); - strcat(sqlStmt, "INSERT"); - } - if (privileges & DB_GRANT_UPDATE) - { - if (c++) - strcat(sqlStmt, ", "); - strcat(sqlStmt, "UPDATE"); - } - if (privileges & DB_GRANT_DELETE) - { - if (c++) - strcat(sqlStmt, ", "); - strcat(sqlStmt, "DELETE"); - } - } - - strcat(sqlStmt, " ON "); - strcat(sqlStmt, tableName); - strcat(sqlStmt, " TO "); - strcat(sqlStmt, userList); - -#ifdef _CONSOLE - cout << endl << sqlStmt << endl; -#endif - - return(ExecSql(sqlStmt)); - -} // wxDB::Grant() - -/********** wxDB::CreateView() **********/ -bool wxDB::CreateView(char *viewName, char *colList, char *pSqlStmt) -{ - char sqlStmt[DB_MAX_STATEMENT_LEN]; - - // Drop the view first - sprintf(sqlStmt, "DROP VIEW %s", viewName); - if (SQLExecDirect(hstmt, (UCHAR FAR *) sqlStmt, SQL_NTS) != SQL_SUCCESS) - { - // Check for sqlState = S0002, "Table or view not found". - // Ignore this error, bomb out on any other error. - // SQL Sybase Anwhere v5.5 returns an access violation error here - // (sqlstate = 42000) rather than an S0002. - GetNextError(henv, hdbc, hstmt); - if (strcmp(sqlState, "S0002") && strcmp(sqlState, "42000")) - { - DispNextError(); - DispAllErrors(henv, hdbc, hstmt); - RollbackTrans(); - return(FALSE); - } - } - -#ifdef _CONSOLE - cout << endl << sqlStmt << endl; -#endif - - // Build the create view statement - strcpy(sqlStmt, "CREATE VIEW "); - strcat(sqlStmt, viewName); - - if (strlen(colList)) - { - strcat(sqlStmt, " ("); - strcat(sqlStmt, colList); - strcat(sqlStmt, ")"); - } - - strcat(sqlStmt, " AS "); - strcat(sqlStmt, pSqlStmt); - -#ifdef _CONSOLE - cout << sqlStmt << endl; -#endif - - return(ExecSql(sqlStmt)); - -} // wxDB::CreateView() - -/********** wxDB::ExecSql() **********/ -bool wxDB::ExecSql(char *pSqlStmt) -{ - if (SQLExecDirect(hstmt, (UCHAR FAR *) pSqlStmt, SQL_NTS) == SQL_SUCCESS) - return(TRUE); - else - { - DispAllErrors(henv, hdbc, hstmt); - return(FALSE); - } - -} // wxDB::ExecSql() - -/********** wxDB::GetColumns() **********/ -/* - * 1) The last array element of the tableName[] argument must be zero (null). - * This is how the end of the array is detected. - * 2) This function returns an array of CcolInf structures. If no columns - * were found, or an error occured, this pointer will be zero (null). THE - * CALLING FUNCTION IS RESPONSIBLE FOR DELETING THE MEMORY RETURNED WHEN IT - * IS FINISHED WITH IT. i.e. - * - * CcolInf *colInf = pDb->GetColumns(tableList); - * if (colInf) - * { - * // Use the column inf - * ....... - * // Destroy the memory - * delete [] colInf; - * } - */ -CcolInf *wxDB::GetColumns(char *tableName[]) -{ - UINT noCols = 0; - UINT colNo = 0; - CcolInf *colInf = 0; - RETCODE retcode; - SDWORD cb; - char tblName[DB_MAX_TABLE_NAME_LEN+1]; - char colName[DB_MAX_COLUMN_NAME_LEN+1]; - SWORD sqlDataType; - - // Pass 1 - Determine how many columns there are. - // Pass 2 - Allocate the CcolInf array and fill in - // the array with the column information. - for (int pass = 1; pass <= 2; pass++) - { - if (pass == 2) - { - if (noCols == 0) // Probably a bogus table name(s) - break; - // Allocate n CcolInf objects to hold the column information - colInf = new CcolInf[noCols+1]; - if (!colInf) - break; - // Mark the end of the array - strcpy(colInf[noCols].tableName, ""); - strcpy(colInf[noCols].colName, ""); - colInf[noCols].sqlDataType = 0; - } - // Loop through each table name - for (int tbl = 0; tableName[tbl]; tbl++) - { - SQLFreeStmt(hstmt, SQL_CLOSE); - retcode = SQLColumns(hstmt, - NULL, 0, // All qualifiers - NULL, 0, // All owners - (UCHAR *) tableName[tbl], SQL_NTS, - NULL, 0); // All columns - if (retcode != SQL_SUCCESS) - { // Error occured, abort - DispAllErrors(henv, hdbc, hstmt); - if (colInf) - delete [] colInf; - return(0); - } - SQLBindCol(hstmt, 3, SQL_C_CHAR, tblName, DB_MAX_TABLE_NAME_LEN+1, &cb); - SQLBindCol(hstmt, 4, SQL_C_CHAR, colName, DB_MAX_COLUMN_NAME_LEN+1, &cb); - SQLBindCol(hstmt, 5, SQL_C_SSHORT, &sqlDataType, 0, &cb); - while ((retcode = SQLFetch(hstmt)) == SQL_SUCCESS) - { - if (pass == 1) // First pass, just add up the number of columns - noCols++; - else // Pass 2; Fill in the array of structures - { - if (colNo < noCols) // Some extra error checking to prevent memory overwrites - { - strcpy(colInf[colNo].tableName, tblName); - strcpy(colInf[colNo].colName, colName); - colInf[colNo].sqlDataType = sqlDataType; - colNo++; - } - } - } - if (retcode != SQL_NO_DATA_FOUND) - { // Error occured, abort - DispAllErrors(henv, hdbc, hstmt); - if (colInf) - delete [] colInf; - return(0); - } - } - } - - SQLFreeStmt(hstmt, SQL_CLOSE); - return colInf; - -} // wxDB::GetColumns() - - -// Table name can refer to a table, view, alias or synonym. Returns true -// if the object exists in the database. This function does not indicate -// whether or not the user has privleges to query or perform other functions -// on the table. -bool wxDB::TableExists(char *tableName) -{ - assert(tableName && strlen(tableName)); - - SQLFreeStmt(hstmt, SQL_CLOSE); - RETCODE retcode = SQLTables(hstmt, - NULL, 0, // All qualifiers - NULL, 0, // All owners - (UCHAR FAR *)tableName, SQL_NTS, - NULL, 0); // All table types - if (retcode != SQL_SUCCESS) - return(DispAllErrors(henv, hdbc, hstmt)); - - if (SQLFetch(hstmt) != SQL_SUCCESS) - { - SQLFreeStmt(hstmt, SQL_CLOSE); - return(DispAllErrors(henv, hdbc, hstmt)); - } - - SQLFreeStmt(hstmt, SQL_CLOSE); - return(TRUE); - -} // wxDB::TableExists() - - -/********** GetDbConnection() **********/ -wxDB *GetDbConnection(DbStuff *pDbStuff) -{ - DbList *pList; - - // Scan the linked list searching for an available database connection - // that's already been opened but is currently not in use. - for (pList = PtrBegDbList; pList; pList = pList->PtrNext) - { - // The database connection must be for the same datasource - // name and must currently not be in use. - if (pList->Free && (! strcmp(pDbStuff->Dsn, pList->Dsn))) // Found a free connection - { - pList->Free = FALSE; - return(pList->PtrDb); - } - } - - // No available connections. A new connection must be made and - // appended to the end of the linked list. - if (PtrBegDbList) - { - // Find the end of the list - for (pList = PtrBegDbList; pList->PtrNext; pList = pList->PtrNext); - // Append a new list item - pList->PtrNext = new DbList; - pList->PtrNext->PtrPrev = pList; - pList = pList->PtrNext; - } - else // Empty list - { - // Create the first node on the list - pList = PtrBegDbList = new DbList; - pList->PtrPrev = 0; - } - - // Initialize new node in the linked list - pList->PtrNext = 0; - pList->Free = FALSE; - strcpy(pList->Dsn, pDbStuff->Dsn); - pList->PtrDb = new wxDB(pDbStuff->Henv); - - // Connect to the datasource - if (pList->PtrDb->Open(pDbStuff->Dsn, pDbStuff->Uid, pDbStuff->AuthStr)) - return(pList->PtrDb); - else // Unable to connect, destroy list item - { - if (pList->PtrPrev) - pList->PtrPrev->PtrNext = 0; - else - PtrBegDbList = 0; // Empty list again - pList->PtrDb->CommitTrans(); // Commit any open transactions on wxDB object - pList->PtrDb->Close(); // Close the wxDB object - delete pList->PtrDb; // Deletes the wxDB object - delete pList; // Deletes the linked list object - return(0); - } - -} // GetDbConnection() - -/********** FreeDbConnection() **********/ -bool FreeDbConnection(wxDB *pDb) -{ - DbList *pList; - - // Scan the linked list searching for the database connection - for (pList = PtrBegDbList; pList; pList = pList->PtrNext) - { - if (pList->PtrDb == pDb) // Found it!!! - return(pList->Free = TRUE); - } - - // Never found the database object, return failure - return(FALSE); - -} // FreeDbConnection() - -/********** CloseDbConnections() **********/ -void CloseDbConnections(void) -{ - DbList *pList, *pNext; - - // Traverse the linked list closing database connections and freeing memory as I go. - for (pList = PtrBegDbList; pList; pList = pNext) - { - pNext = pList->PtrNext; // Save the pointer to next - pList->PtrDb->CommitTrans(); // Commit any open transactions on wxDB object - pList->PtrDb->Close(); // Close the wxDB object - delete pList->PtrDb; // Deletes the wxDB object - delete pList; // Deletes the linked list object - } - - // Mark the list as empty - PtrBegDbList = 0; - -} // CloseDbConnections() - -/********** NumberDbConnectionsInUse() **********/ -int NumberDbConnectionsInUse(void) -{ - DbList *pList; - int cnt = 0; - - // Scan the linked list counting db connections that are currently in use - for (pList = PtrBegDbList; pList; pList = pList->PtrNext) - { - if (pList->Free == FALSE) - cnt++; - } - - return(cnt); - -} // NumberDbConnectionsInUse() - -/********** GetDataSource() **********/ -bool GetDataSource(HENV henv, char *Dsn, SWORD DsnMax, char *DsDesc, SWORD DsDescMax, - UWORD direction) -{ - SWORD cb; - - if (SQLDataSources(henv, direction, (UCHAR FAR *) Dsn, DsnMax, &cb, - (UCHAR FAR *) DsDesc, DsDescMax, &cb) == SQL_SUCCESS) - return(TRUE); - else - return(FALSE); - -} // GetDataSource() - -#endif - // USE_ODBC diff --git a/src/common/dbtable.cpp b/src/common/dbtable.cpp deleted file mode 100644 index 32c7895396..0000000000 --- a/src/common/dbtable.cpp +++ /dev/null @@ -1,1445 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: table.cpp -// Purpose: Implementation of the wxTable class. -// Author: Doug Card -// Modified by: -// Created: 9.96 -// RCS-ID: $Id$ -// Copyright: (c) 1996 Remstar International, Inc. -// Licence: wxWindows licence, plus: -// Notice: This class library and its intellectual design are free of charge for use, -// modification, enhancement, debugging under the following conditions: -// 1) These classes may only be used as part of the implementation of a -// wxWindows-based application -// 2) All enhancements and bug fixes are to be submitted back to the wxWindows -// user groups free of all charges for use with the wxWindows library. -// 3) These classes may not be distributed as part of any other class library, -// DLL, text (written or electronic), other than a complete distribution of -// the wxWindows GUI development toolkit. -/////////////////////////////////////////////////////////////////////////////// - -/* -// SYNOPSIS START -// SYNOPSIS STOP -*/ - -/* -#ifdef _CONSOLE - #include -#endif -*/ - -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif //__BORLANDC__ - -#ifndef WX_PRECOMP - #include -#endif //WX_PRECOMP - -#if USE_ODBC - -#include - -#include -#include -#include - -#ifdef __WXUNIX__ -// The HPUX preprocessor lines below were commented out on 8/20/97 -// because macros.h currently redefines DEBUG and is unneeded. -// # ifdef HPUX -// # include -// # endif -# ifdef __WXLINUX__ -# include -# endif -#endif - -/********** wxTable::wxTable() **********/ -wxTable::wxTable(wxDB *pwxDB, const char *tblName, const int nCols, const char *qryTblName) -{ - // Assign member variables - pDb = pwxDB; // Pointer to the wxDB object - strcpy(tableName, tblName); // Table Name - if (qryTblName) // Name of the table/view to query - strcpy(queryTableName, qryTblName); - else - strcpy(queryTableName, tblName); - - noCols = nCols; // No. of cols in the table - where = 0; // Where clause - orderBy = 0; // Order By clause - selectForUpdate = FALSE; // SELECT ... FOR UPDATE; Indicates whether to include the FOR UPDATE phrase - - // Grab the HENV and HDBC from the wxDB object - henv = pDb->henv; - hdbc = pDb->hdbc; - - // Allocate space for column definitions - if (noCols) - colDefs = new CcolDef[noCols]; // Points to the first column defintion - else - colDefs = 0; - - // Allocate statement handles for the table - if (SQLAllocStmt(hdbc, &c0) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc); - if (SQLAllocStmt(hdbc, &c1) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc); - if (SQLAllocStmt(hdbc, &c2) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc); -// if (SQLAllocStmt(hdbc, &c3) != SQL_SUCCESS) -// pDb->DispAllErrors(henv, hdbc); -// if (SQLAllocStmt(hdbc, &c4) != SQL_SUCCESS) -// pDb->DispAllErrors(henv, hdbc); -// if (SQLAllocStmt(hdbc, &c5) != SQL_SUCCESS) -// pDb->DispAllErrors(henv, hdbc); - // Allocate a separate statement handle for performing inserts - if (SQLAllocStmt(hdbc, &hstmtInsert) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc); - // Allocate a separate statement handle for performing deletes - if (SQLAllocStmt(hdbc, &hstmtDelete) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc); - // Allocate a separate statement handle for performing updates - if (SQLAllocStmt(hdbc, &hstmtUpdate) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc); - // Allocate a separate statement handle for performing count(*) function - if (SQLAllocStmt(hdbc, &hstmtCount) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc); - - // Set the cursor type for the statement handles - UDWORD cursorType = SQL_CURSOR_STATIC; - if (SQLSetStmtOption(c1, SQL_CURSOR_TYPE, cursorType) != SQL_SUCCESS) - { - // Check to see if cursor type is supported - pDb->GetNextError(henv, hdbc, c1); - if (! strcmp(pDb->sqlState, "01S02")) // Option Value Changed - { - // Datasource does not support static cursors. Driver - // will substitute a cursor type. Call SQLGetStmtOption() - // to determine which cursor type was selected. - if (SQLGetStmtOption(c1, SQL_CURSOR_TYPE, &cursorType) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc, c1); -#ifdef _CONSOLE - cout << "Static cursor changed to: "; - switch(cursorType) - { - case SQL_CURSOR_FORWARD_ONLY: - cout << "Forward Only"; break; - case SQL_CURSOR_STATIC: - cout << "Static"; break; - case SQL_CURSOR_KEYSET_DRIVEN: - cout << "Keyset Driven"; break; - case SQL_CURSOR_DYNAMIC: - cout << "Dynamic"; break; - } - cout << endl << endl; -#endif - } - else - { - pDb->DispNextError(); - pDb->DispAllErrors(henv, hdbc, c1); - } - } -#ifdef _CONSOLE - else - cout << "Cursor Type set to STATIC" << endl << endl; -#endif - - if (SQLSetStmtOption(c0, SQL_CURSOR_TYPE, cursorType) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc, c0); - if (SQLSetStmtOption(c2, SQL_CURSOR_TYPE, cursorType) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc, c2); -// if (SQLSetStmtOption(c3, SQL_CURSOR_TYPE, cursorType) != SQL_SUCCESS) -// pDb->DispAllErrors(henv, hdbc, c3); -// if (SQLSetStmtOption(c4, SQL_CURSOR_TYPE, cursorType) != SQL_SUCCESS) -// pDb->DispAllErrors(henv, hdbc, c4); -// if (SQLSetStmtOption(c5, SQL_CURSOR_TYPE, cursorType) != SQL_SUCCESS) -// pDb->DispAllErrors(henv, hdbc, c5); - - // Set the cursor type for the INSERT statement handle - if (SQLSetStmtOption(hstmtInsert, SQL_CURSOR_TYPE, SQL_CURSOR_FORWARD_ONLY) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc, hstmtInsert); - // Set the cursor type for the DELETE statement handle - if (SQLSetStmtOption(hstmtDelete, SQL_CURSOR_TYPE, SQL_CURSOR_FORWARD_ONLY) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc, hstmtDelete); - // Set the cursor type for the UPDATE statement handle - if (SQLSetStmtOption(hstmtUpdate, SQL_CURSOR_TYPE, SQL_CURSOR_FORWARD_ONLY) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc, hstmtUpdate); - // Set the cursor type for the COUNT(*) statement handle - if (SQLSetStmtOption(hstmtCount, SQL_CURSOR_TYPE, SQL_CURSOR_FORWARD_ONLY) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc, hstmtCount); - - // Copy cursor 1 to the default cursor - hstmt = c1; - currCursorNo = DB_CURSOR1; - -} // wxTable::wxTable() - -/********** wxTable::~wxTable() **********/ -wxTable::~wxTable() -{ - // Delete memory allocated for column definitions - if (colDefs) - delete [] colDefs; - - // Free statement handles - if (SQLFreeStmt(c0, SQL_DROP) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc); - if (SQLFreeStmt(c1, SQL_DROP) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc); - if (SQLFreeStmt(c2, SQL_DROP) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc); -// if (SQLFreeStmt(c3, SQL_DROP) != SQL_SUCCESS) -// pDb->DispAllErrors(henv, hdbc); -// if (SQLFreeStmt(c4, SQL_DROP) != SQL_SUCCESS) -// pDb->DispAllErrors(henv, hdbc); -// if (SQLFreeStmt(c5, SQL_DROP) != SQL_SUCCESS) -// pDb->DispAllErrors(henv, hdbc); - if (SQLFreeStmt(hstmtInsert, SQL_DROP) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc); - if (SQLFreeStmt(hstmtDelete, SQL_DROP) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc); - if (SQLFreeStmt(hstmtUpdate, SQL_DROP) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc); - if (SQLFreeStmt(hstmtCount, SQL_DROP) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc); - -} // wxTable::~wxTable() - -/********** wxTable::Open() **********/ -bool wxTable::Open(void) -{ - int i; - char sqlStmt[DB_MAX_STATEMENT_LEN]; - - // Verify that the table exists in the database - if (!pDb->TableExists(tableName)) - { - char s[128]; - sprintf(s, "Error opening '%s', table/view does not exist in the database.", tableName); - pDb->LogError(s); - return(FALSE); - } - - // Bind the member variables for field exchange between - // the wxTable object and the ODBC record. - if(! bindInsertParams()) // Inserts - return(FALSE); - if(! bindUpdateParams()) // Updates - return(FALSE); - if(! bindCols(c0)) // Selects - return(FALSE); - if(! bindCols(c1)) - return(FALSE); - if(! bindCols(c2)) - return(FALSE); -// if(! bindCols(c3)) -// return(FALSE); -// if(! bindCols(c4)) -// return(FALSE); -// if(! bindCols(c5)) -// return(FALSE); - - // Build an insert statement using parameter markers - if (noCols > 0) - { - bool needComma = FALSE; - sprintf(sqlStmt, "INSERT INTO %s (", tableName); - for (i = 0; i < noCols; i++) - { - if (! colDefs[i].InsertAllowed) - continue; - if (needComma) - strcat(sqlStmt, ","); - strcat(sqlStmt, colDefs[i].ColName); - needComma = TRUE; - } - needComma = FALSE; - strcat(sqlStmt, ") VALUES ("); - for (i = 0; i < noCols; i++) - { - if (! colDefs[i].InsertAllowed) - continue; - if (needComma) - strcat(sqlStmt, ","); - strcat(sqlStmt, "?"); - needComma = TRUE; - } - strcat(sqlStmt, ")"); - - // Prepare the insert statement for execution - if (SQLPrepare(hstmtInsert, (UCHAR FAR *) sqlStmt, SQL_NTS) != SQL_SUCCESS) - return(pDb->DispAllErrors(henv, hdbc, hstmtInsert)); - } - - // Completed successfully - return(TRUE); - -} // wxTable::Open() - -/********** wxTable::Query() **********/ -bool wxTable::Query(bool forUpdate, bool distinct) -{ - - return(query(DB_SELECT_WHERE, forUpdate, distinct)); - -} // wxTable::Query() - -/********** wxTable::QueryBySqlStmt() **********/ -bool wxTable::QueryBySqlStmt(char *pSqlStmt) -{ - - return(query(DB_SELECT_STATEMENT, FALSE, FALSE, pSqlStmt)); - -} // wxTable::QueryBySqlStmt() - -/********** wxTable::QueryMatching() **********/ -bool wxTable::QueryMatching(bool forUpdate, bool distinct) -{ - - return(query(DB_SELECT_MATCHING, forUpdate, distinct)); - -} // wxTable::QueryMatching() - -/********** wxTable::QueryOnKeyFields() **********/ -bool wxTable::QueryOnKeyFields(bool forUpdate, bool distinct) -{ - - return(query(DB_SELECT_KEYFIELDS, forUpdate, distinct)); - -} // wxTable::QueryOnKeyFields() - -/********** wxTable::query() **********/ -bool wxTable::query(int queryType, bool forUpdate, bool distinct, char *pSqlStmt) -{ - char sqlStmt[DB_MAX_STATEMENT_LEN]; - - // Set the selectForUpdate member variable - if (forUpdate) - // The user may wish to select for update, but the DBMS may not be capable - selectForUpdate = CanSelectForUpdate(); - else - selectForUpdate = FALSE; - - // Set the SQL SELECT string - if (queryType != DB_SELECT_STATEMENT) // A select statement was not passed in, - GetSelectStmt(sqlStmt, queryType, distinct); // so generate a select statement. - - // Make sure the cursor is closed first - if (! CloseCursor(hstmt)) - return(FALSE); - - // Execute the SQL SELECT statement - if (SQLExecDirect(hstmt, (UCHAR FAR *) (queryType == DB_SELECT_STATEMENT ? pSqlStmt : sqlStmt), - SQL_NTS) != SQL_SUCCESS) - return(pDb->DispAllErrors(henv, hdbc, hstmt)); - - // Completed successfully - return(TRUE); - -} // wxTable::query() - -/********** wxTable::GetSelectStmt() **********/ -void wxTable::GetSelectStmt(char *pSqlStmt, int typeOfSelect, bool distinct) -{ - char whereClause[DB_MAX_WHERE_CLAUSE_LEN]; - - whereClause[0] = 0; - - // Build a select statement to query the database - strcpy(pSqlStmt, "SELECT "); - - // SELECT DISTINCT values only? - if (distinct) - strcat(pSqlStmt, "DISTINCT "); - - // Add the column list - for (int i = 0; i < noCols; i++) - { - strcat(pSqlStmt, colDefs[i].ColName); - if (i + 1 < noCols) - strcat(pSqlStmt, ","); - } - - // If the datasource supports ROWID, get this column as well. Exception: Don't retrieve - // the ROWID if querying distinct records. The rowid will always be unique. - if (!distinct && CanUpdByROWID()) - strcat(pSqlStmt, ",ROWID"); - - // Append the FROM tablename portion - strcat(pSqlStmt, " FROM "); - strcat(pSqlStmt, queryTableName); - - // Append the WHERE clause. Either append the where clause for the class - // or build a where clause. The typeOfSelect determines this. - switch(typeOfSelect) - { - case DB_SELECT_WHERE: - if (where && strlen(where)) // May not want a where clause!!! - { - strcat(pSqlStmt, " WHERE "); - strcat(pSqlStmt, where); - } - break; - case DB_SELECT_KEYFIELDS: - GetWhereClause(whereClause, DB_WHERE_KEYFIELDS); - if (strlen(whereClause)) - { - strcat(pSqlStmt, " WHERE "); - strcat(pSqlStmt, whereClause); - } - break; - case DB_SELECT_MATCHING: - GetWhereClause(whereClause, DB_WHERE_MATCHING); - if (strlen(whereClause)) - { - strcat(pSqlStmt, " WHERE "); - strcat(pSqlStmt, whereClause); - } - break; - } - - // Append the ORDER BY clause - if (orderBy && strlen(orderBy)) - { - strcat(pSqlStmt, " ORDER BY "); - strcat(pSqlStmt, orderBy); - } - - // SELECT FOR UPDATE if told to do so and the datasource is capable - if (selectForUpdate && CanSelectForUpdate()) - strcat(pSqlStmt, " FOR UPDATE"); - -} // wxTable::GetSelectStmt() - -/********** wxTable::getRec() **********/ -bool wxTable::getRec(UWORD fetchType) -{ - RETCODE retcode; - -#ifndef FWD_ONLY_CURSORS - // Fetch the NEXT, PREV, FIRST or LAST record, depending on fetchType - UDWORD cRowsFetched; - UWORD rowStatus; - if ((retcode = SQLExtendedFetch(hstmt, fetchType, 0, &cRowsFetched, &rowStatus)) != SQL_SUCCESS) - if (retcode == SQL_NO_DATA_FOUND) - return(FALSE); - else - return(pDb->DispAllErrors(henv, hdbc, hstmt)); -#else - // Fetch the next record from the record set - if ((retcode = SQLFetch(hstmt)) != SQL_SUCCESS) - if (retcode == SQL_NO_DATA_FOUND) - return(FALSE); - else - return(pDb->DispAllErrors(henv, hdbc, hstmt)); -#endif - - // Completed successfully - return(TRUE); - -} // wxTable::getRec() - -/********** wxTable::GetRowNum() **********/ -UWORD wxTable::GetRowNum(void) -{ - UDWORD rowNum; - - if (SQLGetStmtOption(hstmt, SQL_ROW_NUMBER, &rowNum) != SQL_SUCCESS) - { - pDb->DispAllErrors(henv, hdbc, hstmt); - return(0); - } - - // Completed successfully - return((UWORD) rowNum); - -} // wxTable::GetRowNum() - -/********** wxTable::bindInsertParams() **********/ -bool wxTable::bindInsertParams(void) -{ - SWORD fSqlType; - UDWORD precision; - SWORD scale; - -//glt CcolDef *tColDef; - - // Bind each column (that can be inserted) of the table to a parameter marker - for (int i = 0; i < noCols; i++) - { -//glt tColDef = &colDefs[i]; - if (! colDefs[i].InsertAllowed) - continue; - switch(colDefs[i].DbDataType) - { - case DB_DATA_TYPE_VARCHAR: - fSqlType = pDb->typeInfVarchar.FsqlType; - precision = colDefs[i].SzDataObj; - scale = 0; - colDefs[i].CbValue = SQL_NTS; - break; - case DB_DATA_TYPE_INTEGER: - fSqlType = pDb->typeInfInteger.FsqlType; - precision = pDb->typeInfInteger.Precision; - scale = 0; - colDefs[i].CbValue = 0; - break; - case DB_DATA_TYPE_FLOAT: - fSqlType = pDb->typeInfFloat.FsqlType; - precision = pDb->typeInfFloat.Precision; - scale = pDb->typeInfFloat.MaximumScale; - // SQL Sybase Anywhere v5.5 returned a negative number for the - // MaxScale. This caused ODBC to kick out an error on ibscale. - // I check for this here and set the scale = precision. - //if (scale < 0) - // scale = (short) precision; - colDefs[i].CbValue = 0; - break; - case DB_DATA_TYPE_DATE: - fSqlType = pDb->typeInfDate.FsqlType; - precision = pDb->typeInfDate.Precision; - scale = 0; - colDefs[i].CbValue = 0; - break; - } - if (SQLBindParameter(hstmtInsert, i+1, SQL_PARAM_INPUT, colDefs[i].SqlCtype, - fSqlType, precision, scale, colDefs[i].PtrDataObj, - precision+1,&colDefs[i].CbValue) != SQL_SUCCESS) - return(pDb->DispAllErrors(henv, hdbc, hstmtInsert)); - } - - // Completed successfully - return(TRUE); - -} // wxTable::bindInsertParams() - -/********** wxTable::bindUpdateParams() **********/ -bool wxTable::bindUpdateParams(void) -{ - SWORD fSqlType; - UDWORD precision; - SWORD scale; - - // Bind each UPDATEABLE column of the table to a parameter marker - for (int i = 0, colNo = 1; i < noCols; i++) - { - if (! colDefs[i].Updateable) - continue; - switch(colDefs[i].DbDataType) - { - case DB_DATA_TYPE_VARCHAR: - fSqlType = pDb->typeInfVarchar.FsqlType; - precision = colDefs[i].SzDataObj; - scale = 0; - colDefs[i].CbValue = SQL_NTS; - break; - case DB_DATA_TYPE_INTEGER: - fSqlType = pDb->typeInfInteger.FsqlType; - precision = pDb->typeInfInteger.Precision; - scale = 0; - colDefs[i].CbValue = 0; - break; - case DB_DATA_TYPE_FLOAT: - fSqlType = pDb->typeInfFloat.FsqlType; - precision = pDb->typeInfFloat.Precision; - scale = pDb->typeInfFloat.MaximumScale; - // SQL Sybase Anywhere v5.5 returned a negative number for the - // MaxScale. This caused ODBC to kick out an error on ibscale. - // I check for this here and set the scale = precision. - //if (scale < 0) - // scale = (short) precision; - colDefs[i].CbValue = 0; - break; - case DB_DATA_TYPE_DATE: - fSqlType = pDb->typeInfDate.FsqlType; - precision = pDb->typeInfDate.Precision; - scale = 0; - colDefs[i].CbValue = 0; - break; - } - if (SQLBindParameter(hstmtUpdate, colNo++, SQL_PARAM_INPUT, colDefs[i].SqlCtype, - fSqlType, precision, scale, colDefs[i].PtrDataObj, - precision+1, &colDefs[i].CbValue) != SQL_SUCCESS) - return(pDb->DispAllErrors(henv, hdbc, hstmtUpdate)); - } - - // Completed successfully - return(TRUE); - -} // wxTable::bindUpdateParams() - -/********** wxTable::bindCols() **********/ -bool wxTable::bindCols(HSTMT cursor) -{ - static SDWORD cb; - - // Bind each column of the table to a memory address for fetching data - for (int i = 0; i < noCols; i++) - { - if (SQLBindCol(cursor, i+1, colDefs[i].SqlCtype, colDefs[i].PtrDataObj, - colDefs[i].SzDataObj, &cb) != SQL_SUCCESS) - return(pDb->DispAllErrors(henv, hdbc, cursor)); - } - - // Completed successfully - return(TRUE); - -} // wxTable::bindCols() - -/********** wxTable::CloseCursor() **********/ -bool wxTable::CloseCursor(HSTMT cursor) -{ - if (SQLFreeStmt(cursor, SQL_CLOSE) != SQL_SUCCESS) - return(pDb->DispAllErrors(henv, hdbc, cursor)); - - // Completed successfully - return(TRUE); - -} // wxTable::CloseCursor() - -/********** wxTable::CreateTable() **********/ -bool wxTable::CreateTable(void) -{ - int i, j; - char sqlStmt[DB_MAX_STATEMENT_LEN]; - -#ifdef _CONSOLE - cout << "Creating Table " << tableName << "..." << endl; -#endif - - // Drop the table first - sprintf(sqlStmt, "DROP TABLE %s", tableName); - if (SQLExecDirect(hstmt, (UCHAR FAR *) sqlStmt, SQL_NTS) != SQL_SUCCESS) - { - // Check for sqlState = S0002, "Table or view not found". - // Ignore this error, bomb out on any other error. - // SQL Sybase Anwhere v5.5 returns an access violation error here - // (sqlstate = 42000) rather than an S0002. - pDb->GetNextError(henv, hdbc, hstmt); - if (strcmp(pDb->sqlState, "S0002") && strcmp(pDb->sqlState, "42000")) - { - pDb->DispNextError(); - pDb->DispAllErrors(henv, hdbc, hstmt); - pDb->RollbackTrans(); - CloseCursor(hstmt); - return(FALSE); - } - } - - // Commit the transaction and close the cursor - if (! pDb->CommitTrans()) - return(FALSE); - if (! CloseCursor(hstmt)) - return(FALSE); - - // Create the table -#ifdef _CONSOLE - for (i = 0; i < noCols; i++) - { - // Exclude derived columns since they are NOT part of the base table - if (colDefs[i].DerivedCol) - continue; - cout << i + 1 << ": " << colDefs[i].ColName << "; "; - switch(colDefs[i].DbDataType) - { - case DB_DATA_TYPE_VARCHAR: - cout << pDb->typeInfVarchar.TypeName << "(" << colDefs[i].SzDataObj << ")"; - break; - case DB_DATA_TYPE_INTEGER: - cout << pDb->typeInfInteger.TypeName; - break; - case DB_DATA_TYPE_FLOAT: - cout << pDb->typeInfFloat.TypeName; - break; - case DB_DATA_TYPE_DATE: - cout << pDb->typeInfDate.TypeName; - break; - } - cout << endl; - } -#endif - - // Build a CREATE TABLE string from the colDefs structure. - bool needComma = FALSE; - sprintf(sqlStmt, "CREATE TABLE %s (", tableName); - for (i = 0; i < noCols; i++) - { - // Exclude derived columns since they are NOT part of the base table - if (colDefs[i].DerivedCol) - continue; - // Comma Delimiter - if (needComma) - strcat(sqlStmt, ","); - // Column Name - strcat(sqlStmt, colDefs[i].ColName); - strcat(sqlStmt, " "); - // Column Type - switch(colDefs[i].DbDataType) - { - case DB_DATA_TYPE_VARCHAR: - strcat(sqlStmt, pDb->typeInfVarchar.TypeName); break; - case DB_DATA_TYPE_INTEGER: - strcat(sqlStmt, pDb->typeInfInteger.TypeName); break; - case DB_DATA_TYPE_FLOAT: - strcat(sqlStmt, pDb->typeInfFloat.TypeName); break; - case DB_DATA_TYPE_DATE: - strcat(sqlStmt, pDb->typeInfDate.TypeName); break; - } - // For varchars, append the size of the string - if (colDefs[i].DbDataType == DB_DATA_TYPE_VARCHAR) - { - char s[10]; - // strcat(sqlStmt, "("); - // strcat(sqlStmt, itoa(colDefs[i].SzDataObj, s, 10)); - // strcat(sqlStmt, ")"); - sprintf(s, "(%d)", colDefs[i].SzDataObj); - strcat(sqlStmt, s); - } - needComma = TRUE; - } - // If there is a primary key defined, include it in the create statement - for (i = j = 0; i < noCols; i++) - { - if (colDefs[i].KeyField) - { - j++; - break; - } - } - if (j) // Found a keyfield - { - strcat(sqlStmt, ",CONSTRAINT "); - strcat(sqlStmt, tableName); - strcat(sqlStmt, "_PIDX PRIMARY KEY ("); - // List column name(s) of column(s) comprising the primary key - for (i = j = 0; i < noCols; i++) - { - if (colDefs[i].KeyField) - { - if (j++) // Multi part key, comma separate names - strcat(sqlStmt, ","); - strcat(sqlStmt, colDefs[i].ColName); - } - } - strcat(sqlStmt, ")"); - } - // Append the closing parentheses for the create table statement - strcat(sqlStmt, ")"); - -#ifdef _CONSOLE - cout << endl << sqlStmt << endl; -#endif - - // Execute the CREATE TABLE statement - if (SQLExecDirect(hstmt, (UCHAR FAR *) sqlStmt, SQL_NTS) != SQL_SUCCESS) - { - pDb->DispAllErrors(henv, hdbc, hstmt); - pDb->RollbackTrans(); - CloseCursor(hstmt); - return(FALSE); - } - - // Commit the transaction and close the cursor - if (! pDb->CommitTrans()) - return(FALSE); - if (! CloseCursor(hstmt)) - return(FALSE); - - // Database table created successfully - return(TRUE); - -} // wxTable::CreateTable() - -/********** wxTable::CreateIndex() **********/ -bool wxTable::CreateIndex(char * idxName, bool unique, int noIdxCols, CidxDef *pIdxDefs) -{ - char sqlStmt[DB_MAX_STATEMENT_LEN]; - - // Build a CREATE INDEX statement - strcpy(sqlStmt, "CREATE "); - if (unique) - strcat(sqlStmt, "UNIQUE "); - - strcat(sqlStmt, "INDEX "); - strcat(sqlStmt, idxName); - strcat(sqlStmt, " ON "); - strcat(sqlStmt, tableName); - strcat(sqlStmt, " ("); - - // Append list of columns making up index - for (int i = 0; i < noIdxCols; i++) - { - strcat(sqlStmt, pIdxDefs[i].ColName); - if (pIdxDefs[i].Ascending) - strcat(sqlStmt, " ASC"); - else - strcat(sqlStmt, " DESC"); - if ((i + 1) < noIdxCols) - strcat(sqlStmt, ","); - } - - // Append closing parentheses - strcat(sqlStmt, ")"); - -#ifdef _CONSOLE - cout << endl << sqlStmt << endl << endl; -#endif - - // Execute the CREATE INDEX statement - if (SQLExecDirect(hstmt, (UCHAR FAR *) sqlStmt, SQL_NTS) != SQL_SUCCESS) - { - pDb->DispAllErrors(henv, hdbc, hstmt); - pDb->RollbackTrans(); - CloseCursor(hstmt); - return(FALSE); - } - - // Commit the transaction and close the cursor - if (! pDb->CommitTrans()) - return(FALSE); - if (! CloseCursor(hstmt)) - return(FALSE); - - // Index Created Successfully - return(TRUE); - -} // wxTable::CreateIndex() - -/********** wxTable::Insert() **********/ -int wxTable::Insert(void) -{ - // Insert the record by executing the already prepared insert statement - if (SQLExecute(hstmtInsert) != SQL_SUCCESS) - { - // Check to see if integrity constraint was violated - pDb->GetNextError(henv, hdbc, hstmtInsert); - if (! strcmp(pDb->sqlState, "23000")) // Integrity constraint violated - return(DB_ERR_INTEGRITY_CONSTRAINT_VIOL); - else - { - pDb->DispNextError(); - pDb->DispAllErrors(henv, hdbc, hstmtInsert); - return(DB_FAILURE); - } - } - - // Record inserted into the datasource successfully - return(DB_SUCCESS); - -} // wxTable::Insert() - -/********** wxTable::Update(pSqlStmt) **********/ -bool wxTable::Update(char *pSqlStmt) -{ - - return(execUpdate(pSqlStmt)); - -} // wxTable::Update(pSqlStmt) - -/********** wxTable::Update() **********/ -bool wxTable::Update(void) -{ - char sqlStmt[DB_MAX_STATEMENT_LEN]; - - // Build the SQL UPDATE statement - GetUpdateStmt(sqlStmt, DB_UPD_KEYFIELDS); - -#ifdef _CONSOLE - cout << endl << sqlStmt << endl << endl; -#endif - - // Execute the SQL UPDATE statement - return(execUpdate(sqlStmt)); - -} // wxTable::Update() - -/********** wxTable::UpdateWhere() **********/ -bool wxTable::UpdateWhere(char *pWhereClause) -{ - char sqlStmt[DB_MAX_STATEMENT_LEN]; - - // Build the SQL UPDATE statement - GetUpdateStmt(sqlStmt, DB_UPD_WHERE, pWhereClause); - -#ifdef _CONSOLE - cout << endl << sqlStmt << endl << endl; -#endif - - // Execute the SQL UPDATE statement - return(execUpdate(sqlStmt)); - -} // wxTable::UpdateWhere() - -/********** wxTable::Delete() **********/ -bool wxTable::Delete(void) -{ - char sqlStmt[DB_MAX_STATEMENT_LEN]; - - // Build the SQL DELETE statement - GetDeleteStmt(sqlStmt, DB_DEL_KEYFIELDS); - - // Execute the SQL DELETE statement - return(execDelete(sqlStmt)); - -} // wxTable::Delete() - -/********** wxTable::DeleteWhere() **********/ -bool wxTable::DeleteWhere(char *pWhereClause) -{ - char sqlStmt[DB_MAX_STATEMENT_LEN]; - - // Build the SQL DELETE statement - GetDeleteStmt(sqlStmt, DB_DEL_WHERE, pWhereClause); - - // Execute the SQL DELETE statement - return(execDelete(sqlStmt)); - -} // wxTable::DeleteWhere() - -/********** wxTable::DeleteMatching() **********/ -bool wxTable::DeleteMatching(void) -{ - char sqlStmt[DB_MAX_STATEMENT_LEN]; - - // Build the SQL DELETE statement - GetDeleteStmt(sqlStmt, DB_DEL_MATCHING); - - // Execute the SQL DELETE statement - return(execDelete(sqlStmt)); - -} // wxTable::DeleteMatching() - -/********** wxTable::execDelete() **********/ -bool wxTable::execDelete(char *pSqlStmt) -{ - // Execute the DELETE statement - if (SQLExecDirect(hstmtDelete, (UCHAR FAR *) pSqlStmt, SQL_NTS) != SQL_SUCCESS) - return(pDb->DispAllErrors(henv, hdbc, hstmtDelete)); - - // Record deleted successfully - return(TRUE); - -} // wxTable::execDelete() - -/********** wxTable::execUpdate() **********/ -bool wxTable::execUpdate(char *pSqlStmt) -{ - // Execute the UPDATE statement - if (SQLExecDirect(hstmtUpdate, (UCHAR FAR *) pSqlStmt, SQL_NTS) != SQL_SUCCESS) - return(pDb->DispAllErrors(henv, hdbc, hstmtUpdate)); - - // Record deleted successfully - return(TRUE); - -} // wxTable::execUpdate() - -/********** wxTable::GetUpdateStmt() **********/ -void wxTable::GetUpdateStmt(char *pSqlStmt, int typeOfUpd, char *pWhereClause) -{ - char whereClause[DB_MAX_WHERE_CLAUSE_LEN]; - bool firstColumn = TRUE; - - whereClause[0] = 0; - sprintf(pSqlStmt, "UPDATE %s SET ", tableName); - - // Append a list of columns to be updated - for (int i = 0; i < noCols; i++) - { - // Only append Updateable columns - if (colDefs[i].Updateable) - { - if (! firstColumn) - strcat(pSqlStmt, ","); - else - firstColumn = FALSE; - strcat(pSqlStmt, colDefs[i].ColName); - strcat(pSqlStmt, " = ?"); - } - } - - // Append the WHERE clause to the SQL UPDATE statement - strcat(pSqlStmt, " WHERE "); - switch(typeOfUpd) - { - case DB_UPD_KEYFIELDS: - // If the datasource supports the ROWID column, build - // the where on ROWID for efficiency purposes. - // e.g. UPDATE PARTS SET C1 = ?, C2 = ? WHERE ROWID = '111.222.333' - if (CanUpdByROWID()) - { - SDWORD cb; - char rowid[ROWID_LEN]; - - // Get the ROWID value. If not successful retreiving the ROWID, - // simply fall down through the code and build the WHERE clause - // based on the key fields. - if (SQLGetData(hstmt, noCols+1, SQL_C_CHAR, rowid, ROWID_LEN, &cb) == SQL_SUCCESS) - { - strcat(pSqlStmt, "ROWID = '"); - strcat(pSqlStmt, rowid); - strcat(pSqlStmt, "'"); - break; - } - } - // Unable to delete by ROWID, so build a WHERE - // clause based on the keyfields. - GetWhereClause(whereClause, DB_WHERE_KEYFIELDS); - strcat(pSqlStmt, whereClause); - break; - case DB_UPD_WHERE: - strcat(pSqlStmt, pWhereClause); - break; - } - -} // GetUpdateStmt() - -/********** wxTable::GetDeleteStmt() **********/ -void wxTable::GetDeleteStmt(char *pSqlStmt, int typeOfDel, char *pWhereClause) -{ - char whereClause[DB_MAX_WHERE_CLAUSE_LEN]; - - whereClause[0] = 0; - - // Handle the case of DeleteWhere() and the where clause is blank. It should - // delete all records from the database in this case. - if (typeOfDel == DB_DEL_WHERE && (pWhereClause == 0 || strlen(pWhereClause) == 0)) - { - sprintf(pSqlStmt, "DELETE FROM %s", tableName); - return; - } - - sprintf(pSqlStmt, "DELETE FROM %s WHERE ", tableName); - - // Append the WHERE clause to the SQL DELETE statement - switch(typeOfDel) - { - case DB_DEL_KEYFIELDS: - // If the datasource supports the ROWID column, build - // the where on ROWID for efficiency purposes. - // e.g. DELETE FROM PARTS WHERE ROWID = '111.222.333' - if (CanUpdByROWID()) - { - SDWORD cb; - char rowid[ROWID_LEN]; - - // Get the ROWID value. If not successful retreiving the ROWID, - // simply fall down through the code and build the WHERE clause - // based on the key fields. - if (SQLGetData(hstmt, noCols+1, SQL_C_CHAR, rowid, ROWID_LEN, &cb) == SQL_SUCCESS) - { - strcat(pSqlStmt, "ROWID = '"); - strcat(pSqlStmt, rowid); - strcat(pSqlStmt, "'"); - break; - } - } - // Unable to delete by ROWID, so build a WHERE - // clause based on the keyfields. - GetWhereClause(whereClause, DB_WHERE_KEYFIELDS); - strcat(pSqlStmt, whereClause); - break; - case DB_DEL_WHERE: - strcat(pSqlStmt, pWhereClause); - break; - case DB_DEL_MATCHING: - GetWhereClause(whereClause, DB_WHERE_MATCHING); - strcat(pSqlStmt, whereClause); - break; - } - -} // GetDeleteStmt() - -/********** wxTable::GetWhereClause() **********/ -/* - * Note: GetWhereClause() currently ignores timestamp columns. - * They are not included as part of the where clause. - */ - -void wxTable::GetWhereClause(char *pWhereClause, int typeOfWhere) -{ - bool moreThanOneColumn = FALSE; - char colValue[255]; - - // Loop through the columns building a where clause as you go - for (int i = 0; i < noCols; i++) - { - // Determine if this column should be included in the WHERE clause - if ((typeOfWhere == DB_WHERE_KEYFIELDS && colDefs[i].KeyField) || - (typeOfWhere == DB_WHERE_MATCHING && (! IsColNull(i)))) - { - // Skip over timestamp columns - if (colDefs[i].SqlCtype == SQL_C_TIMESTAMP) - continue; - // If there is more than 1 column, join them with the keyword "AND" - if (moreThanOneColumn) - strcat(pWhereClause, " AND "); - else - moreThanOneColumn = TRUE; - // Concatenate where phrase for the column - strcat(pWhereClause, colDefs[i].ColName); - strcat(pWhereClause, " = "); - switch(colDefs[i].SqlCtype) - { - case SQL_C_CHAR: - sprintf(colValue, "'%s'", (UCHAR FAR *) colDefs[i].PtrDataObj); - break; - case SQL_C_SSHORT: - sprintf(colValue, "%hi", *((SWORD *) colDefs[i].PtrDataObj)); - break; - case SQL_C_USHORT: - sprintf(colValue, "%hu", *((UWORD *) colDefs[i].PtrDataObj)); - break; - case SQL_C_SLONG: - sprintf(colValue, "%li", *((SDWORD *) colDefs[i].PtrDataObj)); - break; - case SQL_C_ULONG: - sprintf(colValue, "%lu", *((UDWORD *) colDefs[i].PtrDataObj)); - break; - case SQL_C_FLOAT: - sprintf(colValue, "%.6f", *((SFLOAT *) colDefs[i].PtrDataObj)); - break; - case SQL_C_DOUBLE: - sprintf(colValue, "%.6f", *((SDOUBLE *) colDefs[i].PtrDataObj)); - break; - } - strcat(pWhereClause, colValue); - } - } - -} // wxTable::GetWhereClause() - -/********** wxTable::IsColNull() **********/ -bool wxTable::IsColNull(int colNo) -{ - switch(colDefs[colNo].SqlCtype) - { - case SQL_C_CHAR: - return(((UCHAR FAR *) colDefs[colNo].PtrDataObj)[0] == 0); - case SQL_C_SSHORT: - return(( *((SWORD *) colDefs[colNo].PtrDataObj)) == 0); - case SQL_C_USHORT: - return(( *((UWORD*) colDefs[colNo].PtrDataObj)) == 0); - case SQL_C_SLONG: - return(( *((SDWORD *) colDefs[colNo].PtrDataObj)) == 0); - case SQL_C_ULONG: - return(( *((UDWORD *) colDefs[colNo].PtrDataObj)) == 0); - case SQL_C_FLOAT: - return(( *((SFLOAT *) colDefs[colNo].PtrDataObj)) == 0); - case SQL_C_DOUBLE: - return((*((SDOUBLE *) colDefs[colNo].PtrDataObj)) == 0); - case SQL_C_TIMESTAMP: - TIMESTAMP_STRUCT *pDt; - pDt = (TIMESTAMP_STRUCT *) colDefs[colNo].PtrDataObj; - if (pDt->year == 0 && pDt->month == 0 && pDt->day == 0) - return(TRUE); - else - return(FALSE); - default: - return(TRUE); - } - -} // wxTable::IsColNull() - -/********** wxTable::CanSelectForUpdate() **********/ - -bool wxTable::CanSelectForUpdate(void) -{ - if (pDb->dbInf.posStmts & SQL_PS_SELECT_FOR_UPDATE) - return(TRUE); - else - return(FALSE); - -} // wxTable::CanSelectForUpdate() - -/********** wxTable::CanUpdByROWID() **********/ -bool wxTable::CanUpdByROWID(void) -{ - -//@@@@@@glt - returning FALSE for testing purposes, as the ROWID is not getting updated correctly - return FALSE; - - if ((! strcmp(pDb->dbInf.dbmsName, "Oracle")) || (! strcmp(pDb->dbInf.dbmsName, "ORACLE"))) - return(TRUE); - else - return(FALSE); - -} // wxTable::CanUpdByROWID() - -/********** wxTable::IsCursorClosedOnCommit() **********/ -bool wxTable::IsCursorClosedOnCommit(void) -{ - if (pDb->dbInf.cursorCommitBehavior == SQL_CB_PRESERVE) - return(FALSE); - else - return(TRUE); - -} // wxTable::IsCursorClosedOnCommit() - -/********** wxTable::ClearMemberVars() **********/ -void wxTable::ClearMemberVars(void) -{ - // Loop through the columns setting each member variable to zero - for (int i = 0; i < noCols; i++) - { - switch(colDefs[i].SqlCtype) - { - case SQL_C_CHAR: - ((UCHAR FAR *) colDefs[i].PtrDataObj)[0] = 0; - break; - case SQL_C_SSHORT: - *((SWORD *) colDefs[i].PtrDataObj) = 0; - break; - case SQL_C_USHORT: - *((UWORD*) colDefs[i].PtrDataObj) = 0; - break; - case SQL_C_SLONG: - *((SDWORD *) colDefs[i].PtrDataObj) = 0; - break; - case SQL_C_ULONG: - *((UDWORD *) colDefs[i].PtrDataObj) = 0; - break; - case SQL_C_FLOAT: - *((SFLOAT *) colDefs[i].PtrDataObj) = 0.0f; - break; - case SQL_C_DOUBLE: - *((SDOUBLE *) colDefs[i].PtrDataObj) = 0.0f; - break; - case SQL_C_TIMESTAMP: - TIMESTAMP_STRUCT *pDt; - pDt = (TIMESTAMP_STRUCT *) colDefs[i].PtrDataObj; - pDt->year = 0; - pDt->month = 0; - pDt->day = 0; - pDt->hour = 0; - pDt->minute = 0; - pDt->second = 0; - pDt->fraction = 0; - break; - } - } - -} // wxTable::ClearMemberVars() - -/********** wxTable::SetQueryTimeout() **********/ -bool wxTable::SetQueryTimeout(UDWORD nSeconds) -{ - if (SQLSetStmtOption(c0, SQL_QUERY_TIMEOUT, nSeconds) != SQL_SUCCESS) - return(pDb->DispAllErrors(henv, hdbc, c0)); - if (SQLSetStmtOption(c1, SQL_QUERY_TIMEOUT, nSeconds) != SQL_SUCCESS) - return(pDb->DispAllErrors(henv, hdbc, c1)); - if (SQLSetStmtOption(c2, SQL_QUERY_TIMEOUT, nSeconds) != SQL_SUCCESS) - return(pDb->DispAllErrors(henv, hdbc, c2)); -// if (SQLSetStmtOption(c3, SQL_QUERY_TIMEOUT, nSeconds) != SQL_SUCCESS) -// return(pDb->DispAllErrors(henv, hdbc, c3)); -// if (SQLSetStmtOption(c4, SQL_QUERY_TIMEOUT, nSeconds) != SQL_SUCCESS) -// return(pDb->DispAllErrors(henv, hdbc, c4)); -// if (SQLSetStmtOption(c5, SQL_QUERY_TIMEOUT, nSeconds) != SQL_SUCCESS) -// return(pDb->DispAllErrors(henv, hdbc, c5)); - if (SQLSetStmtOption(hstmtInsert, SQL_QUERY_TIMEOUT, nSeconds) != SQL_SUCCESS) - return(pDb->DispAllErrors(henv, hdbc, hstmtInsert)); - if (SQLSetStmtOption(hstmtUpdate, SQL_QUERY_TIMEOUT, nSeconds) != SQL_SUCCESS) - return(pDb->DispAllErrors(henv, hdbc, hstmtUpdate)); - if (SQLSetStmtOption(hstmtDelete, SQL_QUERY_TIMEOUT, nSeconds) != SQL_SUCCESS) - return(pDb->DispAllErrors(henv, hdbc, hstmtDelete)); - if (SQLSetStmtOption(hstmtCount, SQL_QUERY_TIMEOUT, nSeconds) != SQL_SUCCESS) - return(pDb->DispAllErrors(henv, hdbc, hstmtCount)); - - // Completed Successfully - return(TRUE); - -} // wxTable::SetQueryTimeout() - -/********** wxTable::SetColDefs() **********/ -void wxTable::SetColDefs (int index, char *fieldName, int dataType, void *pData, - int cType, int size, bool keyField, bool upd, - bool insAllow, bool derivedCol) -{ - if (strlen(fieldName) > DB_MAX_COLUMN_NAME_LEN) // glt 4/21/97 - { - strncpy (colDefs[index].ColName, fieldName, DB_MAX_COLUMN_NAME_LEN); - colDefs[index].ColName[DB_MAX_COLUMN_NAME_LEN] = 0; // glt 10/23/97 - } - else - strcpy(colDefs[index].ColName, fieldName); - - colDefs[index].DbDataType = dataType; - colDefs[index].PtrDataObj = pData; - colDefs[index].SqlCtype = cType; - colDefs[index].SzDataObj = size; - colDefs[index].KeyField = keyField; - colDefs[index].DerivedCol = derivedCol; - // Derived columns by definition would NOT be "Insertable" or "Updateable" - if (derivedCol) - { - colDefs[index].Updateable = FALSE; - colDefs[index].InsertAllowed = FALSE; - } - else - { - colDefs[index].Updateable = upd; - colDefs[index].InsertAllowed = insAllow; - } - -} // wxTable::SetColDefs() - -/********** wxTable::SetCursor() **********/ -bool wxTable::SetCursor(int cursorNo) -{ - switch(cursorNo) - { - case DB_CURSOR0: - hstmt = c0; - // currCursorNo doesn't change since Cursor0 is a temp cursor - break; - case DB_CURSOR1: - hstmt = c1; - currCursorNo = DB_CURSOR1; - break; - case DB_CURSOR2: - hstmt = c2; - currCursorNo = DB_CURSOR2; - break; -// case DB_CURSOR3: -// hstmt = c3; -// currCursorNo = DB_CURSOR3; -// break; -// case DB_CURSOR4: -// hstmt = c4; -// currCursorNo = DB_CURSOR4; -// break; -// case DB_CURSOR5: -// hstmt = c5; -// currCursorNo = DB_CURSOR5; -// break; - default: - return(FALSE); - } - - // Refresh the current record -#ifndef FWD_ONLY_CURSORS - UDWORD cRowsFetched; - UWORD rowStatus; - SQLExtendedFetch(hstmt, SQL_FETCH_NEXT, 0, &cRowsFetched, &rowStatus); - SQLExtendedFetch(hstmt, SQL_FETCH_PRIOR, 0, &cRowsFetched, &rowStatus); -#endif - - // Completed successfully - return(TRUE); - -} // wxTable::SetCursor() - -/********** wxTable::Count() **********/ -ULONG wxTable::Count(void) -{ - ULONG l; - char sqlStmt[DB_MAX_STATEMENT_LEN]; - SDWORD cb; - - // Build a "SELECT COUNT(*) FROM queryTableName [WHERE whereClause]" SQL Statement - strcpy(sqlStmt, "SELECT COUNT(*) FROM "); - strcat(sqlStmt, queryTableName); - - // Add the where clause if one is provided - if (where && strlen(where)) - { - strcat(sqlStmt, " WHERE "); - strcat(sqlStmt, where); - } - - // Execute the SQL statement - if (SQLExecDirect(hstmtCount, (UCHAR FAR *) sqlStmt, SQL_NTS) != SQL_SUCCESS) - { - pDb->DispAllErrors(henv, hdbc, hstmtCount); - return(0); - } - - // Fetch the record - if (SQLFetch(hstmtCount) != SQL_SUCCESS) - { - pDb->DispAllErrors(henv, hdbc, hstmtCount); - return(0); - } - - // Obtain the result - if (SQLGetData(hstmtCount, 1, SQL_C_ULONG, &l, sizeof(l), &cb) != SQL_SUCCESS) - { - pDb->DispAllErrors(henv, hdbc, hstmtCount); - return(0); - } - - // Free the cursor - if (SQLFreeStmt(hstmtCount, SQL_CLOSE) != SQL_SUCCESS) - pDb->DispAllErrors(henv, hdbc, hstmtCount); - - // Return the record count - return(l); - -} // wxTable::Count() - -/********** wxTable::Refresh() **********/ -bool wxTable::Refresh(void) -{ - bool result = TRUE; - - // Switch to cursor 0 - int cursorNo = GetCursor(); - if (!SetCursor()) - return(FALSE); - - // Save the where and order by clauses - char *saveWhere = where; - char *saveOrderBy = orderBy; - - // Build a where clause to refetch the record with. Try and use the - // ROWID if it's available, ow use the key fields. - char whereClause[DB_MAX_WHERE_CLAUSE_LEN+1]; - strcpy(whereClause, ""); - if (CanUpdByROWID()) - { - SDWORD cb; - char rowid[ROWID_LEN+1]; - - // Get the ROWID value. If not successful retreiving the ROWID, - // simply fall down through the code and build the WHERE clause - // based on the key fields. - if (SQLGetData(hstmt, noCols+1, SQL_C_CHAR, rowid, ROWID_LEN, &cb) == SQL_SUCCESS) - { - strcat(whereClause, "ROWID = '"); - strcat(whereClause, rowid); - strcat(whereClause, "'"); - } - } - - // If unable to use the ROWID, build a where clause from the keyfields - if (strlen(whereClause) == 0) - GetWhereClause(whereClause, DB_WHERE_KEYFIELDS); - - // Requery the record - where = whereClause; - orderBy = 0; - if (!Query()) - result = FALSE; - - if (result && !GetNext()) - result = FALSE; - - // Switch back to original cursor - if (!SetCursor(cursorNo)) - result = FALSE; - - // Restore the original where and order by clauses - where = saveWhere; - orderBy = saveOrderBy; - - return(result); - -} // wxTable::Refresh() - -#endif - // USE_ODBC diff --git a/src/common/docmdi.cpp b/src/common/docmdi.cpp deleted file mode 100644 index ecb7b1504c..0000000000 --- a/src/common/docmdi.cpp +++ /dev/null @@ -1,156 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: docmdi.cpp -// Purpose: Frame classes for MDI document/view applications -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "docmdi.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#endif - -#if USE_DOC_VIEW_ARCHITECTURE - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "wx/docmdi.h" - -/* - * Docview MDI parent frame - */ - -IMPLEMENT_CLASS(wxDocMDIParentFrame, wxMDIParentFrame) - -BEGIN_EVENT_TABLE(wxDocMDIParentFrame, wxMDIParentFrame) - EVT_MENU(wxID_EXIT, wxDocMDIParentFrame::OnExit) - EVT_MENU_RANGE(wxID_FILE1, wxID_FILE9, wxDocMDIParentFrame::OnMRUFile) -END_EVENT_TABLE() - -wxDocMDIParentFrame::wxDocMDIParentFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, long style, const wxString& name): - wxMDIParentFrame(frame, id, title, pos, size, style, name) -{ - m_docManager = manager; -} - -void wxDocMDIParentFrame::OnExit(wxCommandEvent& WXUNUSED(event)) -{ - Close(); -} - -void wxDocMDIParentFrame::OnMRUFile(wxCommandEvent& event) -{ - wxString f(m_docManager->GetHistoryFile(event.GetSelection() - wxID_FILE1)); - if (f != "") - (void)m_docManager->CreateDocument(f, wxDOC_SILENT); -} - -// Extend event processing to search the view's event table -bool wxDocMDIParentFrame::ProcessEvent(wxEvent& event) -{ - // Try the document manager, then do default processing - if (!m_docManager || !m_docManager->ProcessEvent(event)) - return wxEvtHandler::ProcessEvent(event); - else - return TRUE; -} - -// Define the behaviour for the frame closing -// - must delete all frames except for the main one. -bool wxDocMDIParentFrame::OnClose(void) -{ - return m_docManager->Clear(FALSE); -} - - -/* - * Default document child frame for MDI children - */ - -IMPLEMENT_CLASS(wxDocMDIChildFrame, wxMDIChildFrame) - -BEGIN_EVENT_TABLE(wxDocMDIChildFrame, wxMDIChildFrame) - EVT_ACTIVATE(wxDocMDIChildFrame::OnActivate) -END_EVENT_TABLE() - -wxDocMDIChildFrame::wxDocMDIChildFrame(wxDocument *doc, wxView *view, wxMDIParentFrame *frame, wxWindowID id, - const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name): - wxMDIChildFrame(frame, id, title, pos, size, style, name) -{ - m_childDocument = doc; - m_childView = view; - if (view) - view->SetFrame(this); -} - -wxDocMDIChildFrame::~wxDocMDIChildFrame(void) -{ - m_childView = (wxView *) NULL; -} - -// Extend event processing to search the view's event table -bool wxDocMDIChildFrame::ProcessEvent(wxEvent& event) -{ - if (m_childView) - m_childView->Activate(TRUE); - - if ( !m_childView || ! m_childView->ProcessEvent(event) ) - { - // Only hand up to the parent if it's a menu command - if (!event.IsKindOf(CLASSINFO(wxCommandEvent)) || !GetParent() || !GetParent()->ProcessEvent(event)) - return wxEvtHandler::ProcessEvent(event); - else - return TRUE; - } - else - return TRUE; -} - -void wxDocMDIChildFrame::OnActivate(wxActivateEvent& event) -{ - wxMDIChildFrame::OnActivate(event); - - if (m_childView) - m_childView->Activate(event.GetActive()); -} - -bool wxDocMDIChildFrame::OnClose(void) -{ - // Close view but don't delete the frame while doing so! - // ...since it will be deleted by wxWindows if we return TRUE. - if (m_childView) - { - bool ans = m_childView->Close(FALSE); // FALSE means don't delete associated window - if (ans) - { - m_childView->Activate(FALSE); - delete m_childView; - m_childView = (wxView *) NULL; - m_childDocument = (wxDocument *) NULL; - } - - return ans; - } - else return TRUE; -} - -#endif - // USE_DOC_VIEW_ARCHITECTURE - diff --git a/src/common/docview.cpp b/src/common/docview.cpp deleted file mode 100644 index cec8525fab..0000000000 --- a/src/common/docview.cpp +++ /dev/null @@ -1,1867 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: docview.cpp -// Purpose: Document/view classes -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "docview.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#endif - -#if USE_DOC_VIEW_ARCHITECTURE - -#ifndef WX_PRECOMP -#include "wx/string.h" -#include "wx/utils.h" -#include "wx/app.h" -#include "wx/dc.h" -#include "wx/dialog.h" -#include "wx/menu.h" -#include "wx/list.h" -#include "wx/filedlg.h" -#include -#endif - -#ifdef __WXGTK__ -#include "wx/mdi.h" -#endif - -#include "wx/msgdlg.h" -#include "wx/choicdlg.h" -#include "wx/docview.h" -#include "wx/printdlg.h" -#include "wx/generic/prntdlgg.h" -#include "wx/generic/printps.h" - -#include -#include - -#if USE_IOSTREAMH -#include -#else -#include -#endif - -#include "fstream.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_ABSTRACT_CLASS(wxDocument, wxEvtHandler) -IMPLEMENT_ABSTRACT_CLASS(wxView, wxEvtHandler) -IMPLEMENT_ABSTRACT_CLASS(wxDocTemplate, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxDocManager, wxEvtHandler) -IMPLEMENT_CLASS(wxDocChildFrame, wxFrame) -IMPLEMENT_CLASS(wxDocParentFrame, wxFrame) -#if USE_PRINTING_ARCHITECTURE -IMPLEMENT_DYNAMIC_CLASS(wxDocPrintout, wxPrintout) -#endif -IMPLEMENT_CLASS(wxCommand, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxFileHistory, wxObject) -// IMPLEMENT_DYNAMIC_CLASS(wxPrintInfo, wxObject) -#endif - -/* - * Definition of wxDocument - */ - -wxDocument::wxDocument(wxDocument *parent) -{ - m_documentModified=FALSE; - m_documentFile=""; - m_documentTitle=""; - m_documentParent=parent; - m_documentTemplate = (wxDocTemplate *) NULL; - m_documentTypeName = ""; - m_savedYet = FALSE; -} - -bool wxDocument::DeleteContents(void) -{ - return TRUE; -} - -wxDocument::~wxDocument(void) -{ - DeleteContents(); - - if (m_commandProcessor) - delete m_commandProcessor; - - GetDocumentManager()->RemoveDocument(this); - - // Not safe to do here, since it'll - // invoke virtual view functions expecting to see - // valid derived objects: and by the time we get - // here, we've called destructors higher up. -// DeleteAllViews(); -} - -bool wxDocument::Close(void) -{ - if (OnSaveModified()) - return OnCloseDocument(); - else - return FALSE; -} - -bool wxDocument::OnCloseDocument(void) -{ - DeleteContents(); - Modify(FALSE); - return TRUE; -} - -// Note that this implicitly deletes the document when -// the last view is deleted. -bool wxDocument::DeleteAllViews(void) -{ - wxNode *node = m_documentViews.First(); - while (node) - { - wxView *view = (wxView *)node->Data(); - if (!view->Close()) - return FALSE; - - wxNode *next = node->Next(); - - delete view; // Deletes node implicitly - node = next; - } - return TRUE; -} - -wxView *wxDocument::GetFirstView(void) const -{ - if (m_documentViews.Number() == 0) - return (wxView *) NULL; - return (wxView *)m_documentViews.First()->Data(); -} - -wxDocManager *wxDocument::GetDocumentManager(void) const -{ - return m_documentTemplate->GetDocumentManager(); -} - -bool wxDocument::OnNewDocument(void) -{ - if (!OnSaveModified()) - return FALSE; - - if (OnCloseDocument()==FALSE) return FALSE; - DeleteContents(); - Modify(FALSE); - SetDocumentSaved(FALSE); - - wxString name; - GetDocumentManager()->MakeDefaultName(name); - SetTitle(name); - SetFilename(name, TRUE); - - return TRUE; -} - -bool wxDocument::Save(void) -{ - bool ret = FALSE; - - if (!IsModified()) return TRUE; - if (m_documentFile == "" || !m_savedYet) - ret = SaveAs(); - else - ret = OnSaveDocument(m_documentFile); - if ( ret ) - SetDocumentSaved(TRUE); - return ret; -} - -bool wxDocument::SaveAs(void) -{ - wxDocTemplate *docTemplate = GetDocumentTemplate(); - if (!docTemplate) - return FALSE; - - char *tmp = wxFileSelector(_("Save as"), docTemplate->GetDirectory(), GetFilename(), - docTemplate->GetDefaultExtension(), docTemplate->GetFileFilter(), - wxSAVE|wxOVERWRITE_PROMPT, GetDocumentWindow()); - - if (!tmp) - return FALSE; - else - { - wxString fileName(tmp); - wxString path(""); - wxString name(""); - wxString ext(""); - wxSplitPath(fileName, & path, & name, & ext); - - if (ext.IsEmpty() || ext == "") - { - fileName += "."; - fileName += docTemplate->GetDefaultExtension(); - } - - SetFilename(fileName); - SetTitle(wxFileNameFromPath(fileName)); - - GetDocumentManager()->AddFileToHistory(fileName); - - // Notify the views that the filename has changed - wxNode *node = m_documentViews.First(); - while (node) - { - wxView *view = (wxView *)node->Data(); - view->OnChangeFilename(); - node = node->Next(); - } - } - return OnSaveDocument(m_documentFile); -} - -bool wxDocument::OnSaveDocument(const wxString& file) -{ - if (file == "") - return FALSE; - - wxString msgTitle; - if (wxTheApp->GetAppName() != "") - msgTitle = wxTheApp->GetAppName(); - else - msgTitle = wxString(_("File error")); - - ofstream store(file); - if (store.fail() || store.bad()) - { - (void)wxMessageBox(_("Sorry, could not open this file for saving."), msgTitle, wxOK | wxICON_EXCLAMATION, - GetDocumentWindow()); - // Saving error - return FALSE; - } - if (SaveObject(store)==FALSE) - { - (void)wxMessageBox(_("Sorry, could not save this file."), msgTitle, wxOK | wxICON_EXCLAMATION, - GetDocumentWindow()); - // Saving error - return FALSE; - } - Modify(FALSE); - SetFilename(file); - return TRUE; -} - -bool wxDocument::OnOpenDocument(const wxString& file) -{ - if (!OnSaveModified()) - return FALSE; - - wxString msgTitle; - if (wxTheApp->GetAppName() != "") - msgTitle = wxTheApp->GetAppName(); - else - msgTitle = wxString(_("File error")); - - ifstream store(file); - if (store.fail() || store.bad()) - { - (void)wxMessageBox(_("Sorry, could not open this file."), msgTitle, wxOK|wxICON_EXCLAMATION, - GetDocumentWindow()); - return FALSE; - } - if (LoadObject(store)==FALSE) - { - (void)wxMessageBox(_("Sorry, could not open this file."), msgTitle, wxOK|wxICON_EXCLAMATION, - GetDocumentWindow()); - return FALSE; - } - SetFilename(file, TRUE); - Modify(FALSE); - - UpdateAllViews(); - - return TRUE; -} - -istream& wxDocument::LoadObject(istream& stream) -{ -// wxObject::LoadObject(stream); - - return stream; -} - -ostream& wxDocument::SaveObject(ostream& stream) -{ -// wxObject::SaveObject(stream); - - return stream; -} - -bool wxDocument::Revert(void) -{ - return FALSE; -} - - -// Get title, or filename if no title, else unnamed -bool wxDocument::GetPrintableName(wxString& buf) const -{ - if (m_documentTitle != "") - { - buf = m_documentTitle; - return TRUE; - } - else if (m_documentFile != "") - { - buf = wxFileNameFromPath(m_documentFile); - return TRUE; - } - else - { - buf = _("unnamed"); - return TRUE; - } -} - -wxWindow *wxDocument::GetDocumentWindow(void) const -{ - wxView *view = GetFirstView(); - if (view) - return view->GetFrame(); - else - return wxTheApp->GetTopWindow(); -} - -wxCommandProcessor *wxDocument::OnCreateCommandProcessor(void) -{ - return new wxCommandProcessor; -} - -// TRUE if safe to close -bool wxDocument::OnSaveModified(void) -{ - if (IsModified()) - { - char buf[400]; - wxString title; - GetPrintableName(title); - - wxString msgTitle; - if (wxTheApp->GetAppName() != "") - msgTitle = wxTheApp->GetAppName(); - else - msgTitle = wxString(_("Warning")); - - sprintf(buf, _("Do you want to save changes to document %s?"), (const char *)title); - int res = wxMessageBox(buf, msgTitle, wxYES_NO|wxCANCEL|wxICON_QUESTION, - GetDocumentWindow()); - if (res == wxNO) - { - Modify(FALSE); - return TRUE; - } - else if (res == wxYES) - return Save(); - else if (res == wxCANCEL) - return FALSE; - } - return TRUE; -} - -bool wxDocument::Draw(wxDC& WXUNUSED(context)) -{ - return TRUE; -} - -bool wxDocument::AddView(wxView *view) -{ - if (!m_documentViews.Member(view)) - { - m_documentViews.Append(view); - OnChangedViewList(); - } - return TRUE; -} - -bool wxDocument::RemoveView(wxView *view) -{ - (void)m_documentViews.DeleteObject(view); - OnChangedViewList(); - return TRUE; -} - -bool wxDocument::OnCreate(const wxString& WXUNUSED(path), long flags) -{ - if (GetDocumentTemplate()->CreateView(this, flags)) - return TRUE; - else - return FALSE; -} - -// Called after a view is added or removed. -// The default implementation deletes the document if -// there are no more views. -void wxDocument::OnChangedViewList(void) -{ - if (m_documentViews.Number() == 0) - { - if (OnSaveModified()) - { - delete this; - } - } -} - -void wxDocument::UpdateAllViews(wxView *sender, wxObject *hint) -{ - wxNode *node = m_documentViews.First(); - while (node) - { - wxView *view = (wxView *)node->Data(); - view->OnUpdate(sender, hint); - node = node->Next(); - } -} - -void wxDocument::SetFilename(const wxString& filename, bool notifyViews) -{ - m_documentFile = filename; - if ( notifyViews ) - { - // Notify the views that the filename has changed - wxNode *node = m_documentViews.First(); - while (node) - { - wxView *view = (wxView *)node->Data(); - view->OnChangeFilename(); - node = node->Next(); - } - } -} - - -/* - * Document view - */ - -wxView::wxView(wxDocument *doc) -{ - SetDocument(doc); - - m_viewTypeName = ""; - m_viewFrame = (wxFrame *) NULL; -} - -wxView::~wxView(void) -{ - GetDocumentManager()->ActivateView(this, FALSE, TRUE); - m_viewDocument->RemoveView(this); -} - -// Extend event processing to search the document's event table -bool wxView::ProcessEvent(wxEvent& event) -{ - if ( !GetDocument() || !GetDocument()->ProcessEvent(event) ) - return wxEvtHandler::ProcessEvent(event); - else - return TRUE; -} - -void wxView::OnActivateView(bool WXUNUSED(activate), wxView *WXUNUSED(activeView), wxView *WXUNUSED(deactiveView)) -{ -} - -void wxView::OnPrint(wxDC *dc, wxObject *WXUNUSED(info)) -{ - OnDraw(dc); -} - -void wxView::OnUpdate(wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint)) -{ -} - -void wxView::OnChangeFilename(void) -{ - if (GetFrame() && GetDocument()) - { - wxString name; - GetDocument()->GetPrintableName(name); - - GetFrame()->SetTitle(name); - } -} - -void wxView::SetDocument(wxDocument *doc) -{ - m_viewDocument = doc; - if (doc) - doc->AddView(this); -} - -bool wxView::Close(bool deleteWindow) -{ - if (OnClose(deleteWindow)) - return TRUE; - else - return FALSE; -} - -void wxView::Activate(bool activate) -{ - if (GetDocumentManager()) - { - OnActivateView(activate, this, GetDocumentManager()->GetCurrentView()); - GetDocumentManager()->ActivateView(this, activate); - } -} - -bool wxView::OnClose(bool WXUNUSED(deleteWindow)) -{ - return GetDocument() ? GetDocument()->Close() : TRUE; -} - -#if USE_PRINTING_ARCHITECTURE -wxPrintout *wxView::OnCreatePrintout(void) -{ - return new wxDocPrintout(this); -} -#endif - - -/* - * wxDocTemplate - */ - -wxDocTemplate::wxDocTemplate(wxDocManager *manager, const wxString& descr, - const wxString& filter, const wxString& dir, const wxString& ext, - const wxString& docTypeName, const wxString& viewTypeName, - wxClassInfo *docClassInfo, wxClassInfo *viewClassInfo, long flags) -{ - m_documentManager = manager; - m_flags = flags; - m_description = descr; - m_directory = dir; - m_defaultExt = ext; - m_fileFilter = filter; - m_flags = flags; - m_docTypeName = docTypeName; - m_viewTypeName = viewTypeName; - m_documentManager->AssociateTemplate(this); - - m_docClassInfo = docClassInfo; - m_viewClassInfo = viewClassInfo; -} - -wxDocTemplate::~wxDocTemplate(void) -{ - m_documentManager->DisassociateTemplate(this); -} - -// Tries to dynamically construct an object of the right -// class. -wxDocument *wxDocTemplate::CreateDocument(const wxString& path, long flags) -{ - if (!m_docClassInfo) - return (wxDocument *) NULL; - wxDocument *doc = (wxDocument *)m_docClassInfo->CreateObject(); - doc->SetFilename(path); - doc->SetDocumentTemplate(this); - GetDocumentManager()->AddDocument(doc); - doc->SetCommandProcessor(doc->OnCreateCommandProcessor()); - - if (doc->OnCreate(path, flags)) - return doc; - else - { - delete doc; - return (wxDocument *) NULL; - } -} - -wxView *wxDocTemplate::CreateView(wxDocument *doc, long flags) -{ - if (!m_viewClassInfo) - return (wxView *) NULL; - wxView *view = (wxView *)m_viewClassInfo->CreateObject(); - view->SetDocument(doc); - if (view->OnCreate(doc, flags)) - { - return view; - } - else - { - delete view; - return (wxView *) NULL; - } -} - -BEGIN_EVENT_TABLE(wxDocManager, wxEvtHandler) - EVT_MENU(wxID_OPEN, wxDocManager::OnFileOpen) - EVT_MENU(wxID_CLOSE, wxDocManager::OnFileClose) - EVT_MENU(wxID_REVERT, wxDocManager::OnFileRevert) - EVT_MENU(wxID_NEW, wxDocManager::OnFileNew) - EVT_MENU(wxID_SAVE, wxDocManager::OnFileSave) - EVT_MENU(wxID_SAVEAS, wxDocManager::OnFileSaveAs) - EVT_MENU(wxID_UNDO, wxDocManager::OnUndo) - EVT_MENU(wxID_REDO, wxDocManager::OnRedo) - EVT_MENU(wxID_PRINT, wxDocManager::OnPrint) - EVT_MENU(wxID_PRINT_SETUP, wxDocManager::OnPrintSetup) - EVT_MENU(wxID_PREVIEW, wxDocManager::OnPreview) -END_EVENT_TABLE() - -wxDocManager::wxDocManager(long flags, bool initialize) -{ - m_defaultDocumentNameCounter = 1; - m_flags = flags; - m_currentView = (wxView *) NULL; - m_maxDocsOpen = 10000; - m_fileHistory = (wxFileHistory *) NULL; - if (initialize) - Initialize(); -} - -wxDocManager::~wxDocManager(void) -{ - Clear(); - if (m_fileHistory) - delete m_fileHistory; -} - -bool wxDocManager::Clear(bool force) -{ - wxNode *node = m_docs.First(); - while (node) - { - wxDocument *doc = (wxDocument *)node->Data(); - wxNode *next = node->Next(); - - if (!doc->Close() && !force) - return FALSE; - - // Implicitly deletes the document when the last - // view is removed (deleted) - doc->DeleteAllViews(); - - // Check document is deleted - if (m_docs.Member(doc)) - delete doc; - - // This assumes that documents are not connected in - // any way, i.e. deleting one document does NOT - // delete another. - node = next; - } - node = m_templates.First(); - while (node) - { - wxDocTemplate *templ = (wxDocTemplate*) node->Data(); - wxNode* next = node->Next(); - delete templ; - node = next; - } - return TRUE; -} - -bool wxDocManager::Initialize(void) -{ - m_fileHistory = OnCreateFileHistory(); - return TRUE; -} - -wxFileHistory *wxDocManager::OnCreateFileHistory(void) -{ - return new wxFileHistory; -} - -void wxDocManager::OnFileClose(wxCommandEvent& WXUNUSED(event)) -{ - wxDocument *doc = GetCurrentDocument(); - if (!doc) - return; - if (doc->Close()) - { - doc->DeleteAllViews(); - if (m_docs.Member(doc)) - delete doc; - } -} - -void wxDocManager::OnFileNew(wxCommandEvent& WXUNUSED(event)) -{ - CreateDocument(wxString(""), wxDOC_NEW); -} - -void wxDocManager::OnFileOpen(wxCommandEvent& WXUNUSED(event)) -{ - CreateDocument(wxString(""), 0); -} - -void wxDocManager::OnFileRevert(wxCommandEvent& WXUNUSED(event)) -{ - wxDocument *doc = GetCurrentDocument(); - if (!doc) - return; - doc->Revert(); -} - -void wxDocManager::OnFileSave(wxCommandEvent& WXUNUSED(event)) -{ - wxDocument *doc = GetCurrentDocument(); - if (!doc) - return; - doc->Save(); -} - -void wxDocManager::OnFileSaveAs(wxCommandEvent& WXUNUSED(event)) -{ - wxDocument *doc = GetCurrentDocument(); - if (!doc) - return; - doc->SaveAs(); -} - -void wxDocManager::OnPrint(wxCommandEvent& WXUNUSED(event)) -{ - wxView *view = GetCurrentView(); - if (!view) - return; - - wxPrintout *printout = view->OnCreatePrintout(); - if (printout) - { - // TODO: trouble about this is that it pulls in the postscript - // code unecessarily -#ifdef __WXMSW__ - if ( wxTheApp->GetPrintMode() == wxPRINT_WINDOWS ) - { - wxWindowsPrinter printer; - printer.Print(view->GetFrame(), printout, TRUE); - } - else -#endif - { - wxPostScriptPrinter printer; - printer.Print(view->GetFrame(), printout, TRUE); - } - - delete printout; - } -} - -void wxDocManager::OnPrintSetup(wxCommandEvent& WXUNUSED(event)) -{ - wxWindow *parentWin = wxTheApp->GetTopWindow(); - wxView *view = GetCurrentView(); - if (view) - parentWin = view->GetFrame(); - - wxPrintData data; - -#ifdef __WXMSW__ - if ( wxTheApp->GetPrintMode() == wxPRINT_WINDOWS ) - { - wxPrintDialog printerDialog(parentWin, & data); - printerDialog.GetPrintData().SetSetupDialog(TRUE); - printerDialog.ShowModal(); - } - else -#endif - { - wxGenericPrintDialog printerDialog(parentWin, & data); - printerDialog.GetPrintData().SetSetupDialog(TRUE); - printerDialog.ShowModal(); - } -} - -void wxDocManager::OnPreview(wxCommandEvent& WXUNUSED(event)) -{ - wxView *view = GetCurrentView(); - if (!view) - return; - - wxPrintout *printout = view->OnCreatePrintout(); - if (printout) - { - // Pass two printout objects: for preview, and possible printing. - wxPrintPreviewBase *preview = (wxPrintPreviewBase *) NULL; -#ifdef __WXMSW__ - if ( wxTheApp->GetPrintMode() == wxPRINT_WINDOWS ) - preview = new wxWindowsPrintPreview(printout, view->OnCreatePrintout()); - else -#endif - preview = new wxPostScriptPrintPreview(printout, view->OnCreatePrintout()); - - wxPreviewFrame *frame = new wxPreviewFrame(preview, (wxFrame *)wxTheApp->GetTopWindow(), _("Print Preview"), - wxPoint(100, 100), wxSize(600, 650)); - frame->Centre(wxBOTH); - frame->Initialize(); - frame->Show(TRUE); - } -} - -void wxDocManager::OnUndo(wxCommandEvent& WXUNUSED(event)) -{ - wxDocument *doc = GetCurrentDocument(); - if (!doc) - return; - if (doc->GetCommandProcessor()) - doc->GetCommandProcessor()->Undo(); -} - -void wxDocManager::OnRedo(wxCommandEvent& WXUNUSED(event)) -{ - wxDocument *doc = GetCurrentDocument(); - if (!doc) - return; - if (doc->GetCommandProcessor()) - doc->GetCommandProcessor()->Redo(); -} - -wxView *wxDocManager::GetCurrentView(void) const -{ - if (m_currentView) - return m_currentView; - if (m_docs.Number() == 1) - { - wxDocument* doc = (wxDocument*) m_docs.First()->Data(); - return doc->GetFirstView(); - } - return (wxView *) NULL; -} - -// Extend event processing to search the view's event table -bool wxDocManager::ProcessEvent(wxEvent& event) -{ - wxView* view = GetCurrentView(); - if (view) - { - if (view->ProcessEvent(event)) - return TRUE; - } - return wxEvtHandler::ProcessEvent(event); -} - -wxDocument *wxDocManager::CreateDocument(const wxString& path, long flags) -{ - wxDocTemplate **templates = new wxDocTemplate *[m_templates.Number()]; - int i; - int n = 0; - for (i = 0; i < m_templates.Number(); i++) - { - wxDocTemplate *temp = (wxDocTemplate *)(m_templates.Nth(i)->Data()); - if (temp->IsVisible()) - { - templates[n] = temp; - n ++; - } - } - if (n == 0) - { - delete[] templates; - return (wxDocument *) NULL; - } - - // If we've reached the max number of docs, close the - // first one. - if (GetDocuments().Number() >= m_maxDocsOpen) - { - wxDocument *doc = (wxDocument *)GetDocuments().First()->Data(); - if (doc->Close()) - { - // Implicitly deletes the document when - // the last view is deleted - doc->DeleteAllViews(); - - // Check we're really deleted - if (m_docs.Member(doc)) - delete doc; - } - else - return (wxDocument *) NULL; - } - - // New document: user chooses a template, unless there's only one. - if (flags & wxDOC_NEW) - { - if (n == 1) - { - wxDocTemplate *temp = templates[0]; - delete[] templates; - wxDocument *newDoc = temp->CreateDocument(path, flags); - if (newDoc) - { - newDoc->SetDocumentName(temp->GetDocumentName()); - newDoc->SetDocumentTemplate(temp); - newDoc->OnNewDocument(); - } - return newDoc; - } - - wxDocTemplate *temp = SelectDocumentType(templates, n); - delete[] templates; - if (temp) - { - wxDocument *newDoc = temp->CreateDocument(path, flags); - if (newDoc) - { - newDoc->SetDocumentName(temp->GetDocumentName()); - newDoc->SetDocumentTemplate(temp); - newDoc->OnNewDocument(); - } - return newDoc; - } - else - return (wxDocument *) NULL; - } - - // Existing document - wxDocTemplate *temp = (wxDocTemplate *) NULL; - - wxString path2(""); - if (path != "") - path2 = path; - - if (flags & wxDOC_SILENT) - temp = FindTemplateForPath(path2); - else - temp = SelectDocumentPath(templates, n, path2, flags); - - delete[] templates; - - if (temp) - { - wxDocument *newDoc = temp->CreateDocument(path2, flags); - if (newDoc) - { - newDoc->SetDocumentName(temp->GetDocumentName()); - newDoc->SetDocumentTemplate(temp); - if (!newDoc->OnOpenDocument(path2)) - { - delete newDoc; - return (wxDocument *) NULL; - } - AddFileToHistory(path2); - } - return newDoc; - } - else - return (wxDocument *) NULL; -} - -wxView *wxDocManager::CreateView(wxDocument *doc, long flags) -{ - wxDocTemplate **templates = new wxDocTemplate *[m_templates.Number()]; - int n =0; - int i; - for (i = 0; i < m_templates.Number(); i++) - { - wxDocTemplate *temp = (wxDocTemplate *)(m_templates.Nth(i)->Data()); - if (temp->IsVisible()) - { - if (temp->GetDocumentName() == doc->GetDocumentName()) - { - templates[n] = temp; - n ++; - } - } - } - if (n == 0) - { - delete[] templates; - return (wxView *) NULL; - } - if (n == 1) - { - wxDocTemplate *temp = templates[0]; - delete[] templates; - wxView *view = temp->CreateView(doc, flags); - if (view) - view->SetViewName(temp->GetViewName()); - return view; - } - - wxDocTemplate *temp = SelectViewType(templates, n); - delete[] templates; - if (temp) - { - wxView *view = temp->CreateView(doc, flags); - if (view) - view->SetViewName(temp->GetViewName()); - return view; - } - else - return (wxView *) NULL; -} - -// Not yet implemented -void wxDocManager::DeleteTemplate(wxDocTemplate *WXUNUSED(temp), long WXUNUSED(flags)) -{ -} - -// Not yet implemented -bool wxDocManager::FlushDoc(wxDocument *WXUNUSED(doc)) -{ - return FALSE; -} - -wxDocument *wxDocManager::GetCurrentDocument(void) const -{ - if (m_currentView) - return m_currentView->GetDocument(); - else - return (wxDocument *) NULL; -} - -// Make a default document name -bool wxDocManager::MakeDefaultName(wxString& name) -{ - char buf[256]; - sprintf(buf, _("unnamed%d"), m_defaultDocumentNameCounter); - m_defaultDocumentNameCounter ++; - name = buf; - return TRUE; -} - -// Not yet implemented -wxDocTemplate *wxDocManager::MatchTemplate(const wxString& WXUNUSED(path)) -{ - return (wxDocTemplate *) NULL; -} - -// File history management -void wxDocManager::AddFileToHistory(const wxString& file) -{ - if (m_fileHistory) - m_fileHistory->AddFileToHistory(file); -} - -wxString wxDocManager::GetHistoryFile(int i) const -{ - if (m_fileHistory) - return wxString(m_fileHistory->GetHistoryFile(i)); - else - return wxString(""); -} - -void wxDocManager::FileHistoryUseMenu(wxMenu *menu) -{ - if (m_fileHistory) - m_fileHistory->FileHistoryUseMenu(menu); -} - -void wxDocManager::FileHistoryLoad(const wxString& resourceFile, const wxString& section) -{ - if (m_fileHistory) - m_fileHistory->FileHistoryLoad(resourceFile, section); -} - -void wxDocManager::FileHistorySave(const wxString& resourceFile, const wxString& section) -{ - if (m_fileHistory) - m_fileHistory->FileHistorySave(resourceFile, section); -} - -int wxDocManager::GetNoHistoryFiles(void) const -{ - if (m_fileHistory) - return m_fileHistory->GetNoHistoryFiles(); - else - return 0; -} - -static char *FindExtension(char *path) -{ - static char ext[10]; - int len = strlen(path); - if (path) - { - int i = 0; - for (i = (len-1); i > 0; i --) - if (path[i] == '.') - break; - if (path[i] == '.') - { - int j; - for (j = i+1; j < len; j++) - ext[(int)(j-(i+1))] = (char)wxToLower(path[j]); // NOTE Should not use tolower under UNIX - ext[j-(i+1)] = 0; - return ext; - } - else - return (char *) NULL; - } - else return (char *) NULL; -} - - -// Given a path, try to find a matching template. Won't -// always work, of course. -wxDocTemplate *wxDocManager::FindTemplateForPath(const wxString& path) -{ - char *theExt = FindExtension((char *)(const char *)path); - if (!theExt) - return (wxDocTemplate *) NULL; - wxDocTemplate *theTemplate = (wxDocTemplate *) NULL; - - if (m_templates.Number() == 1) - return (wxDocTemplate *)m_templates.First()->Data(); - - // Find the template which this extension corresponds to - int i; - for (i = 0; i < m_templates.Number(); i++) - { - wxDocTemplate *temp = (wxDocTemplate *)m_templates.Nth(i)->Data(); - if (strcmp(temp->GetDefaultExtension(), theExt) == 0) - { - theTemplate = temp; - break; - } - } - return theTemplate; -} - -// Prompts user to open a file, using file specs in templates. -// How to implement in wxWindows? Must extend the file selector -// dialog or implement own; OR match the extension to the -// template extension. -wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates, - int noTemplates, wxString& path, long WXUNUSED(flags), bool WXUNUSED(save)) -{ - // We can only have multiple filters in Windows -#ifdef __WXMSW__ - char *descrBuf = new char[1000]; - descrBuf[0] = 0; - int i; - for (i = 0; i < noTemplates; i++) - { - if (templates[i]->IsVisible()) - { - strcat(descrBuf, templates[i]->GetDescription()); - strcat(descrBuf, " ("); - strcat(descrBuf, templates[i]->GetFileFilter()); - strcat(descrBuf, ") "); - strcat(descrBuf, "|"); - strcat(descrBuf, templates[i]->GetFileFilter()); - strcat(descrBuf, "|"); - } - } - int len = strlen(descrBuf); - if (len > 0) - // Omit final "|" - descrBuf[len-1] = 0; - - char *pathTmp = wxFileSelector(_("Select a file"), "", "", "", descrBuf, 0, wxTheApp->GetTopWindow()); - delete[] descrBuf; - if (pathTmp) - { - path = pathTmp; - char *theExt = FindExtension((char *)(const char *)path); - if (!theExt) - return (wxDocTemplate *) NULL; - - // This is dodgy in that we're selecting the template on the - // basis of the file extension, which may not be a standard - // one. We really want to know exactly which template was - // chosen by using a more advanced file selector. - wxDocTemplate *theTemplate = FindTemplateForPath(path); - return theTemplate; - } - else - { - path = ""; - return (wxDocTemplate *) NULL; - } -#else - // In all other windowing systems, until we have more advanced - // file selectors, we must select the document type (template) first, and - // _then_ pop up the file selector. - wxDocTemplate *temp = SelectDocumentType(templates, noTemplates); - if (!temp) - return (wxDocTemplate *) NULL; - - char *pathTmp = wxFileSelector(_("Select a file"), "", "", - temp->GetDefaultExtension(), - temp->GetFileFilter(), - 0, wxTheApp->GetTopWindow()); - - if (pathTmp) - { - path = pathTmp; - return temp; - } - else - return (wxDocTemplate *) NULL; -#endif -} - -wxDocTemplate *wxDocManager::SelectDocumentType(wxDocTemplate **templates, - int noTemplates) -{ - char **strings = new char *[noTemplates]; - char **data = new char *[noTemplates]; - int i; - int n = 0; - for (i = 0; i < noTemplates; i++) - { - if (templates[i]->IsVisible()) - { - strings[n] = WXSTRINGCAST templates[i]->m_description; - data[n] = (char *)templates[i]; - n ++; - } - } - if (n == 0) - { - delete[] strings; - delete[] data; - return (wxDocTemplate *) NULL; - } - else if (n == 1) - { - wxDocTemplate *temp = (wxDocTemplate *)data[0]; - delete[] strings; - delete[] data; - return temp; - } - - wxDocTemplate *theTemplate = (wxDocTemplate *)wxGetSingleChoiceData(_("Select a document template"), _("Templates"), n, - strings, data); - delete[] strings; - delete[] data; - return theTemplate; -} - -wxDocTemplate *wxDocManager::SelectViewType(wxDocTemplate **templates, - int noTemplates) -{ - char **strings = new char *[noTemplates]; - char **data = new char *[noTemplates]; - int i; - int n = 0; - for (i = 0; i < noTemplates; i++) - { - if (templates[i]->IsVisible() && templates[i]->GetViewName()) - { - strings[n] = WXSTRINGCAST templates[i]->m_viewTypeName; - data[n] = (char *)templates[i]; - n ++; - } - } - wxDocTemplate *theTemplate = (wxDocTemplate *)wxGetSingleChoiceData(_("Select a document view"), _("Views"), n, - strings, data); - delete[] strings; - delete[] data; - return theTemplate; -} - -void wxDocManager::AssociateTemplate(wxDocTemplate *temp) -{ - if (!m_templates.Member(temp)) - m_templates.Append(temp); -} - -void wxDocManager::DisassociateTemplate(wxDocTemplate *temp) -{ - m_templates.DeleteObject(temp); -} - -// Add and remove a document from the manager's list -void wxDocManager::AddDocument(wxDocument *doc) -{ - if (!m_docs.Member(doc)) - m_docs.Append(doc); -} - -void wxDocManager::RemoveDocument(wxDocument *doc) -{ - m_docs.DeleteObject(doc); -} - -// Views or windows should inform the document manager -// when a view is going in or out of focus -void wxDocManager::ActivateView(wxView *view, bool activate, bool WXUNUSED(deleting)) -{ - // If we're deactiving, and if we're not actually deleting the view, then - // don't reset the current view because we may be going to - // a window without a view. - // WHAT DID I MEAN BY THAT EXACTLY? -/* - if (deleting) - { - if (m_currentView == view) - m_currentView = NULL; - } - else -*/ - { - if (activate) - m_currentView = view; - else - m_currentView = (wxView *) NULL; - } -} - -/* - * Default document child frame - */ - -BEGIN_EVENT_TABLE(wxDocChildFrame, wxFrame) - EVT_ACTIVATE(wxDocChildFrame::OnActivate) -END_EVENT_TABLE() - -wxDocChildFrame::wxDocChildFrame(wxDocument *doc, wxView *view, wxFrame *frame, wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, long style, const wxString& name): - wxFrame(frame, id, title, pos, size, style, name) -{ - m_childDocument = doc; - m_childView = view; - if (view) - view->SetFrame(this); -} - -wxDocChildFrame::~wxDocChildFrame(void) -{ -} - -// Extend event processing to search the view's event table -bool wxDocChildFrame::ProcessEvent(wxEvent& event) -{ - if (m_childView) - m_childView->Activate(TRUE); - - if ( !m_childView || ! m_childView->ProcessEvent(event) ) - { - // Only hand up to the parent if it's a menu command - if (!event.IsKindOf(CLASSINFO(wxCommandEvent)) || !GetParent() || !GetParent()->ProcessEvent(event)) - return wxEvtHandler::ProcessEvent(event); - else - return TRUE; - } - else - return TRUE; -} - -void wxDocChildFrame::OnActivate(wxActivateEvent& event) -{ - wxFrame::OnActivate(event); - - if (m_childView) - m_childView->Activate(event.GetActive()); -} - -bool wxDocChildFrame::OnClose(void) -{ - // Close view but don't delete the frame while doing so! - // ...since it will be deleted by wxWindows if we return TRUE. - if (m_childView) - { - bool ans = m_childView->Close(FALSE); // FALSE means don't delete associated window - if (ans) - { - m_childView->Activate(FALSE); - delete m_childView; - m_childView = (wxView *) NULL; - m_childDocument = (wxDocument *) NULL; - } - - return ans; - } - else return TRUE; -} - -/* - * Default parent frame - */ - -BEGIN_EVENT_TABLE(wxDocParentFrame, wxFrame) - EVT_MENU(wxID_EXIT, wxDocParentFrame::OnExit) - EVT_MENU_RANGE(wxID_FILE1, wxID_FILE9, wxDocParentFrame::OnMRUFile) -END_EVENT_TABLE() - -wxDocParentFrame::wxDocParentFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, long style, const wxString& name): - wxFrame(frame, id, title, pos, size, style, name) -{ - m_docManager = manager; -} - -void wxDocParentFrame::OnExit(wxCommandEvent& WXUNUSED(event)) -{ - Close(); -} - -void wxDocParentFrame::OnMRUFile(wxCommandEvent& event) -{ - wxString f(m_docManager->GetHistoryFile(event.GetSelection() - wxID_FILE1)); - if (f != "") - (void)m_docManager->CreateDocument(f, wxDOC_SILENT); -} - -// Extend event processing to search the view's event table -bool wxDocParentFrame::ProcessEvent(wxEvent& event) -{ - // Try the document manager, then do default processing - if (!m_docManager || !m_docManager->ProcessEvent(event)) - return wxEvtHandler::ProcessEvent(event); - else - return TRUE; -} - -// Define the behaviour for the frame closing -// - must delete all frames except for the main one. -bool wxDocParentFrame::OnClose(void) -{ - return m_docManager->Clear(FALSE); -} - -#if USE_PRINTING_ARCHITECTURE - -wxDocPrintout::wxDocPrintout(wxView *view, const wxString& title): - wxPrintout(WXSTRINGCAST title) -{ - m_printoutView = view; -} - -bool wxDocPrintout::OnPrintPage(int WXUNUSED(page)) -{ - wxDC *dc = GetDC(); - - // Get the logical pixels per inch of screen and printer - int ppiScreenX, ppiScreenY; - GetPPIScreen(&ppiScreenX, &ppiScreenY); - int ppiPrinterX, ppiPrinterY; - GetPPIPrinter(&ppiPrinterX, &ppiPrinterY); - - // This scales the DC so that the printout roughly represents the - // the screen scaling. The text point size _should_ be the right size - // but in fact is too small for some reason. This is a detail that will - // need to be addressed at some point but can be fudged for the - // moment. - float scale = (float)((float)ppiPrinterX/(float)ppiScreenX); - - // Now we have to check in case our real page size is reduced - // (e.g. because we're drawing to a print preview memory DC) - int pageWidth, pageHeight; - int w, h; - dc->GetSize(&w, &h); - GetPageSizePixels(&pageWidth, &pageHeight); - - // If printer pageWidth == current DC width, then this doesn't - // change. But w might be the preview bitmap width, so scale down. - float overallScale = scale * (float)(w/(float)pageWidth); - dc->SetUserScale(overallScale, overallScale); - - if (m_printoutView) - { - m_printoutView->OnDraw(dc); - } - return TRUE; -} - -bool wxDocPrintout::HasPage(int pageNum) -{ - return (pageNum == 1); -} - -bool wxDocPrintout::OnBeginDocument(int startPage, int endPage) -{ - if (!wxPrintout::OnBeginDocument(startPage, endPage)) - return FALSE; - - return TRUE; -} - -void wxDocPrintout::GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo) -{ - *minPage = 1; - *maxPage = 1; - *selPageFrom = 1; - *selPageTo = 1; -} - -#endif - -/* - * Command processing framework - */ - -wxCommand::wxCommand(bool canUndoIt, const wxString& name) -{ - m_canUndo = canUndoIt; - m_commandName = name; -} - -wxCommand::~wxCommand(void) -{ -} - -// Command processor -wxCommandProcessor::wxCommandProcessor(int maxCommands) -{ - m_maxNoCommands = maxCommands; - m_currentCommand = (wxNode *) NULL; - m_commandEditMenu = (wxMenu *) NULL; -} - -wxCommandProcessor::~wxCommandProcessor(void) -{ - ClearCommands(); -} - -// Pass a command to the processor. The processor calls Do(); -// if successful, is appended to the command history unless -// storeIt is FALSE. -bool wxCommandProcessor::Submit(wxCommand *command, bool storeIt) -{ - bool success = command->Do(); - if (success && storeIt) - { - if (m_commands.Number() == m_maxNoCommands) - { - wxNode *firstNode = m_commands.First(); - wxCommand *firstCommand = (wxCommand *)firstNode->Data(); - delete firstCommand; - delete firstNode; - } - - // Correct a bug: we must chop off the current 'branch' - // so that we're at the end of the command list. - if (!m_currentCommand) - ClearCommands(); - else - { - wxNode *node = m_currentCommand->Next(); - while (node) - { - wxNode *next = node->Next(); - delete (wxCommand *)node->Data(); - delete node; - node = next; - } - } - - m_commands.Append(command); - m_currentCommand = m_commands.Last(); - SetMenuStrings(); - } - return success; -} - -bool wxCommandProcessor::Undo(void) -{ - if (m_currentCommand) - { - wxCommand *command = (wxCommand *)m_currentCommand->Data(); - if (command->CanUndo()) - { - bool success = command->Undo(); - if (success) - { - m_currentCommand = m_currentCommand->Previous(); - SetMenuStrings(); - return TRUE; - } - } - } - return FALSE; -} - -bool wxCommandProcessor::Redo(void) -{ - wxCommand *redoCommand = (wxCommand *) NULL; - wxNode *redoNode = (wxNode *) NULL; - if (m_currentCommand && m_currentCommand->Next()) - { - redoCommand = (wxCommand *)m_currentCommand->Next()->Data(); - redoNode = m_currentCommand->Next(); - } - else - { - if (m_commands.Number() > 0) - { - redoCommand = (wxCommand *)m_commands.First()->Data(); - redoNode = m_commands.First(); - } - } - - if (redoCommand) - { - bool success = redoCommand->Do(); - if (success) - { - m_currentCommand = redoNode; - SetMenuStrings(); - return TRUE; - } - } - return FALSE; -} - -bool wxCommandProcessor::CanUndo(void) -{ - if (m_currentCommand) - return ((wxCommand *)m_currentCommand->Data())->CanUndo(); - return FALSE; -} - -void wxCommandProcessor::Initialize(void) -{ - m_currentCommand = m_commands.Last(); - SetMenuStrings(); -} - -void wxCommandProcessor::SetMenuStrings(void) -{ - if (m_commandEditMenu) - { - wxString buf; - if (m_currentCommand) - { - wxCommand *command = (wxCommand *)m_currentCommand->Data(); - wxString commandName(command->GetName()); - if (commandName == "") commandName = _("Unnamed command"); - bool canUndo = command->CanUndo(); - if (canUndo) - buf = wxString(_("&Undo ")) + commandName; - else - buf = wxString(_("Can't &Undo ")) + commandName; - - m_commandEditMenu->SetLabel(wxID_UNDO, buf); - m_commandEditMenu->Enable(wxID_UNDO, canUndo); - - // We can redo, if we're not at the end of the history. - if (m_currentCommand->Next()) - { - wxCommand *redoCommand = (wxCommand *)m_currentCommand->Next()->Data(); - wxString redoCommandName(redoCommand->GetName()); - if (redoCommandName == "") redoCommandName = _("Unnamed command"); - buf = wxString(_("&Redo ")) + redoCommandName; - m_commandEditMenu->SetLabel(wxID_REDO, buf); - m_commandEditMenu->Enable(wxID_REDO, TRUE); - } - else - { - m_commandEditMenu->SetLabel(wxID_REDO, _("&Redo")); - m_commandEditMenu->Enable(wxID_REDO, FALSE); - } - } - else - { - m_commandEditMenu->SetLabel(wxID_UNDO, _("&Undo")); - m_commandEditMenu->Enable(wxID_UNDO, FALSE); - - if (m_commands.Number() == 0) - { - m_commandEditMenu->SetLabel(wxID_REDO, _("&Redo")); - m_commandEditMenu->Enable(wxID_REDO, FALSE); - } - else - { - // currentCommand is NULL but there are commands: this means that - // we've undone to the start of the list, but can redo the first. - wxCommand *redoCommand = (wxCommand *)m_commands.First()->Data(); - wxString redoCommandName(redoCommand->GetName()); - if (!redoCommandName) redoCommandName = _("Unnamed command"); - buf = wxString(_("&Redo ")) + redoCommandName; - m_commandEditMenu->SetLabel(wxID_REDO, buf); - m_commandEditMenu->Enable(wxID_REDO, TRUE); - } - } - } -} - -void wxCommandProcessor::ClearCommands(void) -{ - wxNode *node = m_commands.First(); - while (node) - { - wxCommand *command = (wxCommand *)node->Data(); - delete command; - delete node; - node = m_commands.First(); - } - m_currentCommand = (wxNode *) NULL; -} - - -/* - * File history processor - */ - -wxFileHistory::wxFileHistory(int maxFiles) -{ - m_fileMaxFiles = maxFiles; - m_fileMenu = (wxMenu *) NULL; - m_fileHistoryN = 0; - m_fileHistory = new char *[m_fileMaxFiles]; -} - -wxFileHistory::~wxFileHistory(void) -{ - int i; - for (i = 0; i < m_fileHistoryN; i++) - delete[] m_fileHistory[i]; - delete[] m_fileHistory; -} - -// File history management -void wxFileHistory::AddFileToHistory(const wxString& file) -{ - if (!m_fileMenu) - return; - - int i; - - // Check we don't already have this file - for (i = 0; i < m_fileHistoryN; i++) - { - if (m_fileHistory[i] && wxString(m_fileHistory[i]) == file) - return; - } - - // Add to the project file history: - // Move existing files (if any) down so we can insert file at beginning. - - // First delete filename that has popped off the end of the array (if any) - if (m_fileHistoryN == m_fileMaxFiles) - { - delete[] m_fileHistory[m_fileMaxFiles-1]; - m_fileHistory[m_fileMaxFiles-1] = (char *) NULL; - } - if (m_fileHistoryN < m_fileMaxFiles) - { - if (m_fileHistoryN == 0) - m_fileMenu->AppendSeparator(); - m_fileMenu->Append(wxID_FILE1+m_fileHistoryN, _("[EMPTY]")); - m_fileHistoryN ++; - } - // Shuffle filenames down - for (i = (m_fileHistoryN-1); i > 0; i--) - { - m_fileHistory[i] = m_fileHistory[i-1]; - } - m_fileHistory[0] = copystring(file); - - for (i = 0; i < m_fileHistoryN; i++) - if (m_fileHistory[i]) - { - char buf[400]; - sprintf(buf, "&%d %s", i+1, m_fileHistory[i]); - m_fileMenu->SetLabel(wxID_FILE1+i, buf); - } -} - -wxString wxFileHistory::GetHistoryFile(int i) const -{ - if (i < m_fileHistoryN) - return wxString(m_fileHistory[i]); - else - return wxString(""); -} - -void wxFileHistory::FileHistoryUseMenu(wxMenu *menu) -{ - m_fileMenu = menu; -} - -void wxFileHistory::FileHistoryLoad(const wxString& resourceFile, const wxString& section) -{ -#if USE_RESOURCES - m_fileHistoryN = 0; - char buf[400]; - sprintf(buf, "file%d", m_fileHistoryN+1); - char *historyFile = (char *) NULL; - while ((m_fileHistoryN <= m_fileMaxFiles) && wxGetResource(section, buf, &historyFile, resourceFile) && historyFile) - { - // wxGetResource allocates memory so this is o.k. - m_fileHistory[m_fileHistoryN] = historyFile; - m_fileHistoryN ++; - sprintf(buf, "file%d", m_fileHistoryN+1); - historyFile = (char *) NULL; - } -#endif -} - -void wxFileHistory::FileHistorySave(const wxString& resourceFile, const wxString& section) -{ -#if USE_RESOURCES - char buf[400]; - int i; - for (i = 0; i < m_fileHistoryN; i++) - { - sprintf(buf, "file%d", i+1); - wxWriteResource(section, buf, m_fileHistory[i], resourceFile); - } -#endif -} - -#if 0 -/* - * wxPrintInfo - */ - -wxPrintInfo::wxPrintInfo(void) -{ - pageNumber = 1; -} - -wxPrintInfo::~wxPrintInfo(void) -{ -} -#endif - -/* - * Permits compatibility with existing file formats and functions - * that manipulate files directly - */ - -bool wxTransferFileToStream(const wxString& filename, ostream& stream) -{ - FILE *fd1; - int ch; - - if ((fd1 = fopen (WXSTRINGCAST filename, "rb")) == NULL) - return FALSE; - - while ((ch = getc (fd1)) != EOF) - stream << (unsigned char)ch; - - fclose (fd1); - return TRUE; -} - -bool wxTransferStreamToFile(istream& stream, const wxString& filename) -{ - FILE *fd1; - int ch; - - if ((fd1 = fopen (WXSTRINGCAST filename, "wb")) == NULL) - { - return FALSE; - } - - while (!stream.eof()) - { - ch = stream.get(); - if (!stream.eof()) - putc (ch, fd1); - } - fclose (fd1); - return TRUE; -} - -#endif - // End USE_DOC_VIEW_ARCHITECTURE diff --git a/src/common/doslex.c b/src/common/doslex.c deleted file mode 100644 index 67e789afba..0000000000 --- a/src/common/doslex.c +++ /dev/null @@ -1,1214 +0,0 @@ -/* A lexical scanner generated by flex */ - -/* scanner skeleton version: - * $Header$ - Last change: JS 13 Jul 97 6:17 pm - */ - -#define FLEX_SCANNER - -#include - - -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -#ifdef c_plusplus -#ifndef __cplusplus -#define __cplusplus -#endif -#endif - - -#ifdef __cplusplus - -#include -#include - -/* use prototypes in function declarations */ -#define YY_USE_PROTOS - -/* the "const" storage-class-modifier is valid */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -#ifdef __STDC__ - -#ifdef __GNUC__ -#include -#else -#include -#endif /* __GNUC__ */ - -#define YY_USE_PROTOS -#define YY_USE_CONST - -#endif /* __STDC__ */ -#endif /* ! __cplusplus */ - - -#ifdef __TURBOC__ -#define YY_USE_CONST -#endif - - -#ifndef YY_USE_CONST -#define const -#endif - - -#ifdef YY_USE_PROTOS -#define YY_PROTO(proto) proto -#else -#define YY_PROTO(proto) () -/* we can't get here if it's an ANSI C compiler, or a C++ compiler, - * so it's got to be a K&R compiler, and therefore there's no standard - * place from which to include these definitions - */ -/* -char *malloc(); -int free(); -*/ - -int read(); -#endif - - -/* amount of stuff to slurp up with each read */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* returned upon end-of-file */ -#define YY_END_TOK 0 - -/* copy whatever the last rule matched to the standard output */ - -/* cast to (char *) is because for 8-bit chars, yytext is (unsigned char *) */ -/* this used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite() - */ -#define ECHO (void) fwrite( (char *) yytext, yyleng, 1, yyout ) - -/* gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#define YY_INPUT(buf,result,max_size) \ - if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \ - YY_FATAL_ERROR( "read() in flex scanner failed" ); -#define YY_NULL 0 - -/* no semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#define yyterminate() return ( YY_NULL ) - -/* report a fatal error */ - -/* The funky do-while is used to turn this macro definition into - * a single C statement (which needs a semi-colon terminator). - * This avoids problems with code like: - * - * if ( something_happens ) - * YY_FATAL_ERROR( "oops, the something happened" ); - * else - * everything_okay(); - * - * Prior to using the do-while the compiler would get upset at the - * "else" because it interpreted the "if" statement as being all - * done when it reached the ';' after the YY_FATAL_ERROR() call. - */ - -#define YY_FATAL_ERROR(msg) \ - do \ - { \ - (void) fputs( msg, stderr ); \ - (void) putc( '\n', stderr ); \ - exit( 1 ); \ - } \ - while ( 0 ) - -/* default yywrap function - always treat EOF as an EOF */ -int yywrap(void) { return 1; } - - -/* enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN - */ -#define BEGIN yy_start = 1 + 2 * - -/* action number for EOF rule of a given start state */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* special action meaning "start processing a new file" */ -#define YY_NEW_FILE \ - do \ - { \ - yy_init_buffer( yy_current_buffer, yyin ); \ - yy_load_buffer_state(); \ - } \ - while ( 0 ) - -/* default declaration of generated scanner - a define so the user can - * easily add parameters - */ -#define YY_DECL int yylex YY_PROTO(( void )) - -/* code executed at the end of each rule */ -#define YY_BREAK break; - -#define YY_END_OF_BUFFER_CHAR 0 - -#ifndef YY_BUF_SIZE -#define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) /* size of default input buffer */ -#endif - -typedef struct yy_buffer_state *YY_BUFFER_STATE; - -#define YY_CHAR unsigned char -# line 1 "lexer.l" -#define INITIAL 0 -# line 9 "lexer.l" -/* - * File: lexer.l - * Description: Lexical analyser for PROLOGIO; can be used with - * either lex and flex. - */ -#include - -/* +++steve162e: added, otherwise, PROIO_input will be undefined (at least under LINUX) - please check, if this is also TRUE under other UNIXes. - */ - -#if defined(FLEX_SCANNER) && defined(_LINUX) -#define PROIO_input my_input -#endif -/* ---steve162e */ - -#include "wx/expr.h" -#ifdef wx_x -extern char *malloc(); -#endif -#define Return(x) return x; - -#if defined(VMS) && !defined(strdup) -#define strdup(s) (strcpy((char *)malloc(strlen(s)+1), s)); -#endif - -static size_t lex_buffer_length = 0; -static const char *lex_buffer = NULL; -static size_t lex_string_ptr = 0; -static int lex_read_from_string = 0; - -static int my_input(void); -static int my_unput(char); - -#ifdef FLEX_SCANNER -#undef YY_INPUT -# define YY_INPUT(buf,result,max_size) \ - if (lex_read_from_string) \ - { int c = my_input(); result = (c == 0) ? YY_NULL : ((buf)[0]=(c), 1); } \ - else \ - if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \ - YY_FATAL_ERROR( "read() in flex scanner failed" ); -#else -# undef unput -# define unput(_c) my_unput(_c) -#endif - -# line 58 "lexer.l" - -/* done after the current pattern has been matched and before the - * corresponding action - sets up yytext - */ -#define YY_DO_BEFORE_ACTION \ - yytext = yy_bp; \ - yyleng = yy_cp - yy_bp; \ - yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yy_c_buf_p = yy_cp; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - -/* return all but the first 'n' matched characters back to the input stream */ -#define yyless(n) \ - do \ - { \ - /* undo effects of setting up yytext */ \ - *yy_cp = yy_hold_char; \ - yy_c_buf_p = yy_cp = yy_bp + n; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#undef unput -#define unput(c) yyunput( c, yytext ) - - -struct yy_buffer_state - { - FILE *yy_input_file; - - YY_CHAR *yy_ch_buf; /* input buffer */ - YY_CHAR *yy_buf_pos; /* current position in input buffer */ - - /* size of input buffer in bytes, not including room for EOB characters*/ - int yy_buf_size; - - /* number of characters read into yy_ch_buf, not including EOB characters */ - int yy_n_chars; - - int yy_eof_status; /* whether we've seen an EOF on this buffer */ -#define EOF_NOT_SEEN 0 - /* "pending" happens when the EOF has been seen but there's still - * some text process - */ -#define EOF_PENDING 1 -#define EOF_DONE 2 - }; - -static YY_BUFFER_STATE yy_current_buffer; - -/* we provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state" - */ -#define YY_CURRENT_BUFFER yy_current_buffer - - -/* yy_hold_char holds the character lost when yytext is formed */ -static YY_CHAR yy_hold_char; - -static int yy_n_chars; /* number of characters read into yy_ch_buf */ - - - -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -#ifndef YY_USER_INIT -#define YY_USER_INIT -#endif - -extern YY_CHAR *yytext; -extern int yyleng; -extern FILE *yyin, *yyout; - -YY_CHAR *yytext; -int yyleng; - -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; - -#define YY_END_OF_BUFFER 18 -typedef int yy_state_type; -static const short int yy_accept[34] = - { 0, - 0, 0, 18, 16, 13, 14, 16, 16, 6, 7, - 16, 8, 12, 16, 1, 11, 3, 9, 10, 2, - 0, 5, 0, 0, 0, 4, 1, 15, 3, 5, - 0, 0, 0 - } ; - -static const YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 4, 1, 1, 1, 1, 5, 6, - 7, 8, 9, 10, 9, 11, 12, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 1, 1, 1, - 14, 1, 1, 1, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 16, 17, 18, 1, 15, 1, 15, 15, 15, 15, - - 19, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 1, 20, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static const YY_CHAR yy_meta[21] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 2, 1, 2, 1, 3, 1, 2, 1 - } ; - -static const short int yy_base[37] = - { 0, - 0, 0, 48, 55, 55, 55, 17, 42, 55, 55, - 19, 55, 55, 23, 17, 55, 0, 55, 55, 0, - 18, 55, 19, 23, 21, 55, 12, 55, 0, 24, - 25, 29, 55, 49, 52, 22 - } ; - -static const short int yy_def[37] = - { 0, - 33, 1, 33, 33, 33, 33, 34, 35, 33, 33, - 33, 33, 33, 33, 33, 33, 36, 33, 33, 36, - 34, 33, 34, 34, 35, 33, 33, 33, 36, 34, - 34, 34, 0, 33, 33, 33 - } ; - -static const short int yy_nxt[76] = - { 0, - 4, 5, 6, 7, 8, 9, 10, 4, 11, 12, - 13, 14, 15, 16, 17, 18, 4, 19, 20, 4, - 22, 22, 30, 29, 27, 26, 22, 22, 30, 27, - 28, 27, 30, 23, 23, 23, 24, 24, 24, 31, - 23, 32, 24, 24, 24, 23, 26, 33, 24, 21, - 21, 21, 25, 25, 3, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33 - } ; - -static const short int yy_chk[76] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 7, 21, 23, 36, 27, 25, 24, 30, 31, 15, - 14, 11, 32, 7, 21, 23, 7, 21, 23, 24, - 30, 31, 24, 30, 31, 32, 8, 3, 32, 34, - 34, 34, 35, 35, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33 - } ; - -static yy_state_type yy_last_accepting_state; -static YY_CHAR *yy_last_accepting_cpos; - -/* the intent behind this definition is that it'll catch - * any uses of REJECT which flex missed - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 - -/* these variables are all declared out here so that section 3 code can - * manipulate them - */ -/* points to current character in buffer */ -static YY_CHAR *yy_c_buf_p = (YY_CHAR *) 0; -static int yy_init = 1; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* flag which is used to allow yywrap()'s to do buffer switches - * instead of setting up a fresh yyin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -static yy_state_type yy_get_previous_state YY_PROTO(( void )); -static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); -static int yy_get_next_buffer YY_PROTO(( void )); -static void yyunput YY_PROTO(( YY_CHAR c, YY_CHAR *buf_ptr )); -void yyrestart YY_PROTO(( FILE *input_file )); -void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); -void yy_load_buffer_state YY_PROTO(( void )); -YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); -void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); -void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); - -#define yy_new_buffer yy_create_buffer - -#ifdef __cplusplus -static int yyinput YY_PROTO(( void )); -#else -static int input YY_PROTO(( void )); -#endif - -YY_DECL - { - register yy_state_type yy_current_state; - register YY_CHAR *yy_cp, *yy_bp; - register int yy_act; - - - - - if ( yy_init ) - { - YY_USER_INIT; - - if ( ! yy_start ) - yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( yy_current_buffer ) - yy_init_buffer( yy_current_buffer, yyin ); - else - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_load_buffer_state(); - - yy_init = 0; - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = yy_c_buf_p; - - /* support of yytext */ - *yy_cp = yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of the - * current run. - */ - yy_bp = yy_cp; - - yy_current_state = yy_start; -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[*yy_cp]; - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = yy_def[yy_current_state]; - if ( yy_current_state >= 34 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } - while ( yy_current_state != 33 ); - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - YY_USER_ACTION; - -do_action: /* this label is used only to access EOF actions */ - - - switch ( yy_act ) - { - case 0: /* must backtrack */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yy_hold_char; - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; - goto yy_find_action; - -case 1: -# line 60 "lexer.l" -{yylval.s = strdup(yytext); Return(INTEGER);} - YY_BREAK -case 2: -# line 62 "lexer.l" -Return(EXP); - YY_BREAK -case 3: -# line 64 "lexer.l" -{yylval.s = strdup(yytext); Return(WORD);} - YY_BREAK -case 4: -# line 66 "lexer.l" -{int len = strlen(yytext); - yytext[len-1] = 0; - yylval.s = strdup(yytext+1); - Return(WORD);} - YY_BREAK -case 5: -# line 71 "lexer.l" -{yylval.s = strdup(yytext); Return(STRING);} - YY_BREAK -case 6: -# line 73 "lexer.l" -Return(OPEN); - YY_BREAK -case 7: -# line 75 "lexer.l" -Return(CLOSE); - YY_BREAK -case 8: -# line 77 "lexer.l" -Return(COMMA); - YY_BREAK -case 9: -# line 79 "lexer.l" -Return(OPEN_SQUARE); - YY_BREAK -case 10: -# line 81 "lexer.l" -Return(CLOSE_SQUARE); - YY_BREAK -case 11: -# line 83 "lexer.l" -Return(EQUALS); - YY_BREAK -case 12: -# line 85 "lexer.l" -Return(PERIOD); - YY_BREAK -case 13: -# line 87 "lexer.l" -; - YY_BREAK -case 14: -# line 89 "lexer.l" -; - YY_BREAK -case 15: -# line 91 "lexer.l" -{ loop: -#ifdef __cplusplus - while (yyinput() != '*'); - switch (yyinput()) -#else - while (input() != '*'); - switch (input()) -#endif - { - case '/': break; - case '*': unput('*'); - default: goto loop; - } - } - YY_BREAK -case 16: -# line 106 "lexer.l" -Return(ERROR); - YY_BREAK -case 17: -# line 108 "lexer.l" -ECHO; - YY_BREAK -case YY_STATE_EOF(INITIAL): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* amount of text matched not including the EOB char */ - int yy_amount_of_matched_text = yy_cp - yytext - 1; - - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yy_hold_char; - - /* note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the end- - * of-buffer state). Contrast this with the test in yyinput(). - */ - if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - /* this was really a NUL */ - { - yy_state_type yy_next_state; - - yy_c_buf_p = yytext + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - /* okay, we're now positioned to make the - * NUL transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we - * don't want to build jamming into it because - * then it will run more slowly) - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = yytext + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* consume the NUL */ - yy_cp = ++yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer() ) - { - case EOB_ACT_END_OF_FILE: - { - yy_did_buffer_switch_on_eof = 0; - - if ( yywrap() ) - { - /* note: because we've taken care in - * yy_get_next_buffer() to have set up yytext, - * we can now set up yy_c_buf_p so that if some - * total hoser (like flex itself) wants - * to call the scanner after we return the - * YY_NULL, it'll still work - another YY_NULL - * will get returned. - */ - yy_c_buf_p = yytext + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF((yy_start - 1) / 2); - goto do_action; - } - - else - { - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - } - break; - - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = yytext + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yy_c_buf_p = - &yy_current_buffer->yy_ch_buf[yy_n_chars]; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: -#ifdef FLEX_DEBUG - printf( "action # %d\n", yy_act ); -#endif - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } - } - } - - -/* yy_get_next_buffer - try to read in a new buffer - * - * synopsis - * int yy_get_next_buffer(); - * - * returns a code representing an action - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ - -static int yy_get_next_buffer() - - { - register YY_CHAR *dest = yy_current_buffer->yy_ch_buf; - register YY_CHAR *source = yytext - 1; /* copy prev. char, too */ - register int number_to_move, i; - int ret_val; - - if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - /* try to read more data */ - - /* first move last chars to start of buffer */ - number_to_move = yy_c_buf_p - yytext; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - yy_n_chars = 0; - - else - { - int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - else if ( num_to_read <= 0 ) - YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); - - /* read in more data */ - YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), - yy_n_chars, num_to_read ); - } - - if ( yy_n_chars == 0 ) - { - if ( number_to_move == 1 ) - { - ret_val = EOB_ACT_END_OF_FILE; - yy_current_buffer->yy_eof_status = EOF_DONE; - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_eof_status = EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - yy_n_chars += number_to_move; - yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; - yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - /* yytext begins at the second character in yy_ch_buf; the first - * character is the one which preceded it before reading in the latest - * buffer; it needs to be kept around in case it's a newline, so - * yy_get_previous_state() will have with '^' rules active - */ - - yytext = &yy_current_buffer->yy_ch_buf[1]; - - return ( ret_val ); - } - - -/* yy_get_previous_state - get the state just before the EOB char was reached - * - * synopsis - * yy_state_type yy_get_previous_state(); - */ - -static yy_state_type yy_get_previous_state() - - { - register yy_state_type yy_current_state; - register YY_CHAR *yy_cp; - - yy_current_state = yy_start; - - for ( yy_cp = yytext + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[*yy_cp] : 1); - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = yy_def[yy_current_state]; - if ( yy_current_state >= 34 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return ( yy_current_state ); - } - - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - -#ifdef YY_USE_PROTOS -static yy_state_type yy_try_NUL_trans( register yy_state_type yy_current_state ) -#else -static yy_state_type yy_try_NUL_trans( yy_current_state ) -register yy_state_type yy_current_state; -#endif - - { - register int yy_is_jam; - register YY_CHAR *yy_cp = yy_c_buf_p; - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = yy_def[yy_current_state]; - if ( yy_current_state >= 34 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 33); - - return ( yy_is_jam ? 0 : yy_current_state ); - } - - -#ifdef YY_USE_PROTOS -static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp ) -#else -static void yyunput( c, yy_bp ) -YY_CHAR c; -register YY_CHAR *yy_bp; -#endif - - { - register YY_CHAR *yy_cp = yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yy_hold_char; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */ - register YY_CHAR *dest = - &yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2]; - register YY_CHAR *source = - &yy_current_buffer->yy_ch_buf[number_to_move]; - - while ( source > yy_current_buffer->yy_ch_buf ) - *--dest = *--source; - - yy_cp += dest - source; - yy_bp += dest - source; - yy_n_chars = yy_current_buffer->yy_buf_size; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - if ( yy_cp > yy_bp && yy_cp[-1] == '\n' ) - yy_cp[-2] = '\n'; - - *--yy_cp = c; - - /* note: the formal parameter *must* be called "yy_bp" for this - * macro to now work correctly - */ - YY_DO_BEFORE_ACTION; /* set up yytext again */ - } - - -#ifdef __cplusplus -static int yyinput() -#else -static int input() -#endif - - { - int c; - YY_CHAR *yy_cp = yy_c_buf_p; - - *yy_cp = yy_hold_char; - - if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - /* this was really a NUL */ - *yy_c_buf_p = '\0'; - - else - { /* need more input */ - yytext = yy_c_buf_p; - ++yy_c_buf_p; - - switch ( yy_get_next_buffer() ) - { - case EOB_ACT_END_OF_FILE: - { - if ( yywrap() ) - { - yy_c_buf_p = yytext + YY_MORE_ADJ; - return ( EOF ); - } - - YY_NEW_FILE; - -#ifdef __cplusplus - return ( yyinput() ); -#else - return ( input() ); -#endif - } - break; - - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = yytext + YY_MORE_ADJ; - break; - - case EOB_ACT_LAST_MATCH: -#ifdef __cplusplus - YY_FATAL_ERROR( "unexpected last match in yyinput()" ); -#else - YY_FATAL_ERROR( "unexpected last match in input()" ); -#endif - } - } - } - - c = *yy_c_buf_p; - yy_hold_char = *++yy_c_buf_p; - - return ( c ); - } - - -#ifdef YY_USE_PROTOS -void yyrestart( FILE *input_file ) -#else -void yyrestart( input_file ) -FILE *input_file; -#endif - - { - yy_init_buffer( yy_current_buffer, input_file ); - yy_load_buffer_state(); - } - - -#ifdef YY_USE_PROTOS -void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) -#else -void yy_switch_to_buffer( new_buffer ) -YY_BUFFER_STATE new_buffer; -#endif - - { - if ( yy_current_buffer == new_buffer ) - return; - - if ( yy_current_buffer ) - { - /* flush out information for old buffer */ - *yy_c_buf_p = yy_hold_char; - yy_current_buffer->yy_buf_pos = yy_c_buf_p; - yy_current_buffer->yy_n_chars = yy_n_chars; - } - - yy_current_buffer = new_buffer; - yy_load_buffer_state(); - - /* we don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yy_did_buffer_switch_on_eof = 1; - } - - -#ifdef YY_USE_PROTOS -void yy_load_buffer_state( void ) -#else -void yy_load_buffer_state() -#endif - - { - yy_n_chars = yy_current_buffer->yy_n_chars; - yytext = yy_c_buf_p = yy_current_buffer->yy_buf_pos; - yyin = yy_current_buffer->yy_input_file; - yy_hold_char = *yy_c_buf_p; - } - - -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) -#else -YY_BUFFER_STATE yy_create_buffer( file, size ) -FILE *file; -int size; -#endif - - { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) malloc( sizeof( struct yy_buffer_state ) ); - - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (YY_CHAR *) malloc( (unsigned) (b->yy_buf_size + 2) ); - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - yy_init_buffer( b, file ); - - return ( b ); - } - - -#ifdef YY_USE_PROTOS -void yy_delete_buffer( YY_BUFFER_STATE b ) -#else -void yy_delete_buffer( b ) -YY_BUFFER_STATE b; -#endif - - { - if ( b == yy_current_buffer ) - yy_current_buffer = (YY_BUFFER_STATE) 0; - - free( (char *) b->yy_ch_buf ); - free( (char *) b ); - } - - -#ifdef YY_USE_PROTOS -void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) -#else -void yy_init_buffer( b, file ) -YY_BUFFER_STATE b; -FILE *file; -#endif - - { - b->yy_input_file = file; - - /* we put in the '\n' and start reading from [1] so that an - * initial match-at-newline will be true. - */ - - b->yy_ch_buf[0] = '\n'; - b->yy_n_chars = 1; - - /* we always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[1]; - - b->yy_eof_status = EOF_NOT_SEEN; - } -# line 108 "lexer.l" - - - -#ifdef FLEX_SCANNER -static int lex_input() { - return input(); -} -#else /* BSD/AT&T lex */ -#ifndef input -# error "Sorry, but need either flex or AT&T lex" -#endif -static int lex_input() { - return input(); -} -/* # undef unput -# define unput(_c) my_unput(_c) -*/ - -# undef input -# define input() my_input() -static int my_unput(char c) -{ - if (lex_read_from_string) { - /* Make sure we have something */ - if (lex_string_ptr) { - if (c == '\n') yylineno--; - lex_string_ptr--; - } - } else { - yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar; -/* unput(c); Causes infinite recursion! */ - } - return c; -} - -#endif - -/* Public */ -void LexFromFile(FILE *fd) -{ - lex_read_from_string = 0; - yyin = fd; - /* Don't know why this is necessary, but otherwise - * lex only works _once_! - */ -#ifdef FLEX_SCANNER - yy_init = 1; -#endif -} - -void LexFromString(char *buffer) -{ - lex_read_from_string = 1; - lex_buffer = buffer; - lex_buffer_length = strlen(buffer); - lex_string_ptr = 0; - /* Don't know why this is necessary, but otherwise - * lex only works _once_! - */ -#ifdef FLEX_SCANNER - yy_init = 1; -#endif -} - -static int my_input( void ) -{ - if (lex_read_from_string) { - if (lex_string_ptr == lex_buffer_length) - return 0; - else { - char c = lex_buffer[lex_string_ptr++]; -#ifndef FLEX_SCANNER - if (c == '\n') yylineno++; -#endif - return c; - } - } else { - return lex_input(); - } -} - -void wxExprCleanUp() -{ - if (yy_current_buffer) - yy_delete_buffer(yy_current_buffer); -} diff --git a/src/common/dosyacc.c b/src/common/dosyacc.c deleted file mode 100644 index e2bdecb862..0000000000 --- a/src/common/dosyacc.c +++ /dev/null @@ -1,517 +0,0 @@ -#ifndef lint -static char yysccsid[] = "@(#)yaccpar 1.7 (Berkeley) 09/09/90"; -#endif -#define YYBYACC 1 -#line 2 "parser.y" -#include "string.h" -#include "wx/expr.h" - -#ifndef __EXTERN_C__ -#define __EXTERN_C__ 1 -#endif - -#if defined(__cplusplus) || defined(__STDC__) -#if defined(__cplusplus) && defined(__EXTERN_C__) -extern "C" { -#endif -#endif -int yylex(void); -int yylook(void); -int yywrap(void); -int yyback(int *, int); - -/* You may need to put /DLEX_SCANNER in your makefile - * if you're using LEX! - Last change: JS 13 Jul 97 6:12 pm - */ -#ifdef LEX_SCANNER -/* int yyoutput(int); */ -void yyoutput(int); -#else -void yyoutput(int); -#endif - -#if defined(__cplusplus) || defined(__STDC__) -#if defined(__cplusplus) && defined(__EXTERN_C__) -} -#endif -#endif -#line 36 "parser.y" -typedef union { - char *s; -/* struct pexpr *expr; */ -} YYSTYPE; -#line 44 "y_tab.c" -#define INTEGER 1 -#define WORD 2 -#define STRING 3 -#define PERIOD 13 -#define OPEN 4 -#define CLOSE 5 -#define COMMA 6 -#define NEWLINE 7 -#define ERROR 8 -#define OPEN_SQUARE 9 -#define CLOSE_SQUARE 10 -#define EQUALS 11 -#define EXP 14 -#define YYERRCODE 256 -short yylhs[] = { -1, - 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, - 3, 4, 4, 5, 5, 5, 5, 5, 5, 5, -}; -short yylen[] = { 2, - 0, 2, 2, 2, 2, 4, 2, 3, 0, 1, - 3, 3, 1, 1, 1, 1, 3, 3, 5, 1, -}; -short yydefred[] = { 1, - 0, 0, 0, 0, 2, 0, 5, 3, 0, 0, - 0, 15, 7, 20, 0, 0, 13, 4, 0, 0, - 0, 0, 8, 0, 6, 0, 18, 0, 12, 11, - 0, 19, -}; -short yydgoto[] = { 1, - 5, 14, 15, 16, 17, -}; -short yysindex[] = { 0, - -2, 9, 2, 1, 0, 10, 0, 0, 11, -5, - 17, 0, 0, 0, 14, -1, 0, 0, 33, 38, - 41, 16, 0, 11, 0, 29, 0, 40, 0, 0, - 44, 0, -}; -short yyrindex[] = { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 42, 21, - 24, 0, 0, 0, 0, 30, 0, 0, 0, 0, - 0, 0, 0, 31, 0, 27, 0, 24, 0, 0, - 0, 0, -}; -short yygindex[] = { 0, - 0, 45, -8, 0, 26, -}; -#define YYTABLESIZE 254 -short yytable[] = { 3, - 19, 10, 11, 12, 24, 9, 4, 20, 21, 4, - 13, 10, 11, 12, 8, 30, 10, 28, 12, 4, - 9, 7, 18, 23, 4, 16, 16, 22, 14, 14, - 16, 17, 17, 14, 10, 9, 17, 25, 26, 10, - 9, 27, 31, 9, 32, 6, 9, 29, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, -}; -short yycheck[] = { 2, - 9, 1, 2, 3, 6, 4, 9, 13, 14, 9, - 10, 1, 2, 3, 13, 24, 1, 2, 3, 9, - 4, 13, 13, 10, 9, 5, 6, 11, 5, 6, - 10, 5, 6, 10, 5, 5, 10, 5, 1, 10, - 10, 1, 14, 4, 1, 1, 5, 22, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 256, -}; -#define YYFINAL 1 -#ifndef YYDEBUG -#define YYDEBUG 0 -#endif -#define YYMAXTOKEN 14 -#if YYDEBUG -char *yyname[] = { -"end-of-file","INTEGER","WORD","STRING","OPEN","CLOSE","COMMA","NEWLINE", -"ERROR","OPEN_SQUARE","CLOSE_SQUARE","EQUALS",0,"PERIOD","EXP", -}; -char *yyrule[] = { -"$accept : commands", -"commands :", -"commands : commands command", -"command : WORD PERIOD", -"command : expr PERIOD", -"command : error PERIOD", -"expr : WORD OPEN arglist CLOSE", -"expr : OPEN_SQUARE CLOSE_SQUARE", -"expr : OPEN_SQUARE arglist CLOSE_SQUARE", -"arglist :", -"arglist : arg", -"arglist : arg COMMA arglist", -"arg : WORD EQUALS arg1", -"arg : arg1", -"arg1 : WORD", -"arg1 : STRING", -"arg1 : INTEGER", -"arg1 : INTEGER PERIOD INTEGER", -"arg1 : INTEGER EXP INTEGER", -"arg1 : INTEGER PERIOD INTEGER EXP INTEGER", -"arg1 : expr", -}; -#endif -#define yyclearin (yychar=(-1)) -#define yyerrok (yyerrflag=0) -#ifdef YYSTACKSIZE -#ifndef YYMAXDEPTH -#define YYMAXDEPTH YYSTACKSIZE -#endif -#else -#ifdef YYMAXDEPTH -#define YYSTACKSIZE YYMAXDEPTH -#else -#define YYSTACKSIZE 600 -#define YYMAXDEPTH 600 -#endif -#endif -int yydebug; -int yynerrs; -int yyerrflag; -int yychar; -short *yyssp; -YYSTYPE *yyvsp; -YYSTYPE yyval; -YYSTYPE yylval; -short yyss[YYSTACKSIZE]; -YYSTYPE yyvs[YYSTACKSIZE]; -#define yystacksize YYSTACKSIZE -#line 118 "parser.y" - -#include "../common/lex_yy.c" - -/* -void yyerror(s) -char *s; -{ - syntax_error(s); -} -*/ - -/* Ansi prototype. If this doesn't work for you... uncomment - the above instead. - */ - -void yyerror(char *s) -{ - syntax_error(s); -} - -/* - * Unfortunately, my DOS version of FLEX - * requires yywrap to be #def'ed, whereas - * the UNIX flex expects a proper function. - */ - -/* Not sure if __SC__ is the appropriate thing - * to test - */ - -#ifndef __SC__ -#ifdef USE_DEFINE -#ifndef yywrap -#define yywrap() 1 -#endif -#else -int yywrap() { return 1; } -#endif -#endif -#line 247 "y_tab.c" -#define YYABORT goto yyabort -#define YYACCEPT goto yyaccept -#define YYERROR goto yyerrlab -int -yyparse() -{ - register int yym, yyn, yystate; -#if YYDEBUG - register char *yys; - extern char *getenv(); - - if (yys = getenv("YYDEBUG")) - { - yyn = *yys; - if (yyn >= '0' && yyn <= '9') - yydebug = yyn - '0'; - } -#endif - - yynerrs = 0; - yyerrflag = 0; - yychar = (-1); - - yyssp = yyss; - yyvsp = yyvs; - *yyssp = yystate = 0; - -yyloop: - if (yyn = yydefred[yystate]) goto yyreduce; - if (yychar < 0) - { - if ((yychar = yylex()) < 0) yychar = 0; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - printf("yydebug: state %d, reading %d (%s)\n", yystate, - yychar, yys); - } -#endif - } - if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yychar) - { -#if YYDEBUG - if (yydebug) - printf("yydebug: state %d, shifting to state %d\n", - yystate, yytable[yyn]); -#endif - if (yyssp >= yyss + yystacksize - 1) - { - goto yyoverflow; - } - *++yyssp = yystate = yytable[yyn]; - *++yyvsp = yylval; - yychar = (-1); - if (yyerrflag > 0) --yyerrflag; - goto yyloop; - } - if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yychar) - { - yyn = yytable[yyn]; - goto yyreduce; - } - if (yyerrflag) goto yyinrecovery; -#ifdef lint - goto yynewerror; -#endif -yynewerror: - yyerror("syntax error"); -#ifdef lint - goto yyerrlab; -#endif -yyerrlab: - ++yynerrs; -yyinrecovery: - if (yyerrflag < 3) - { - yyerrflag = 3; - for (;;) - { - if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) - { -#if YYDEBUG - if (yydebug) - printf("yydebug: state %d, error recovery shifting\ - to state %d\n", *yyssp, yytable[yyn]); -#endif - if (yyssp >= yyss + yystacksize - 1) - { - goto yyoverflow; - } - *++yyssp = yystate = yytable[yyn]; - *++yyvsp = yylval; - goto yyloop; - } - else - { -#if YYDEBUG - if (yydebug) - printf("yydebug: error recovery discarding state %d\n", - *yyssp); -#endif - if (yyssp <= yyss) goto yyabort; - --yyssp; - --yyvsp; - } - } - } - else - { - if (yychar == 0) goto yyabort; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - printf("yydebug: state %d, error recovery discards token %d (%s)\n", - yystate, yychar, yys); - } -#endif - yychar = (-1); - goto yyloop; - } -yyreduce: -#if YYDEBUG - if (yydebug) - printf("yydebug: state %d, reducing by rule %d (%s)\n", - yystate, yyn, yyrule[yyn]); -#endif - yym = yylen[yyn]; - yyval = yyvsp[1-yym]; - switch (yyn) - { -case 3: -#line 68 "parser.y" -{process_command(proio_cons(make_word(yyvsp[-1].s), NULL)); free(yyvsp[-1].s);} -break; -case 4: -#line 70 "parser.y" -{process_command(yyvsp[-1].s);} -break; -case 5: -#line 72 "parser.y" -{syntax_error("Unrecognized command.");} -break; -case 6: -#line 76 "parser.y" -{yyval.s = proio_cons(make_word(yyvsp[-3].s), yyvsp[-1].s); free(yyvsp[-3].s);} -break; -case 7: -#line 78 "parser.y" -{yyval.s = proio_cons(NULL, NULL);} -break; -case 8: -#line 80 "parser.y" -{yyval.s = yyvsp[-1].s; } -break; -case 9: -#line 84 "parser.y" -{yyval.s = NULL;} -break; -case 10: -#line 86 "parser.y" -{yyval.s = proio_cons(yyvsp[0].s, NULL);} -break; -case 11: -#line 89 "parser.y" -{yyval.s = proio_cons(yyvsp[-2].s, yyvsp[0].s);} -break; -case 12: -#line 93 "parser.y" -{yyval.s = proio_cons(make_word("="), proio_cons(make_word(yyvsp[-2].s), proio_cons(yyvsp[0].s, NULL))); - free(yyvsp[-2].s); } -break; -case 13: -#line 96 "parser.y" -{yyval.s = yyvsp[0].s; } -break; -case 14: -#line 99 "parser.y" -{yyval.s = make_word(yyvsp[0].s); free(yyvsp[0].s);} -break; -case 15: -#line 101 "parser.y" -{yyval.s = make_string(yyvsp[0].s); free(yyvsp[0].s);} -break; -case 16: -#line 103 "parser.y" -{yyval.s = make_integer(yyvsp[0].s); free(yyvsp[0].s);} -break; -case 17: -#line 105 "parser.y" -{yyval.s = make_real(yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-2].s); free(yyvsp[0].s); } -break; -case 18: -#line 107 "parser.y" -{yyval.s = make_exp(yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-2].s); free(yyvsp[0].s); } -break; -case 19: -#line 110 "parser.y" -{yyval.s = make_exp2(yyvsp[-4].s, yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-4].s); free(yyvsp[-2].s); - free(yyvsp[0].s); } -break; -case 20: -#line 114 "parser.y" -{yyval.s = yyvsp[0].s;} -break; -#line 461 "y_tab.c" - } - yyssp -= yym; - yystate = *yyssp; - yyvsp -= yym; - yym = yylhs[yyn]; - if (yystate == 0 && yym == 0) - { -#if YYDEBUG - if (yydebug) - printf("yydebug: after reduction, shifting from state 0 to\ - state %d\n", YYFINAL); -#endif - yystate = YYFINAL; - *++yyssp = YYFINAL; - *++yyvsp = yyval; - if (yychar < 0) - { - if ((yychar = yylex()) < 0) yychar = 0; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - printf("yydebug: state %d, reading %d (%s)\n", - YYFINAL, yychar, yys); - } -#endif - } - if (yychar == 0) goto yyaccept; - goto yyloop; - } - if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yystate) - yystate = yytable[yyn]; - else - yystate = yydgoto[yym]; -#if YYDEBUG - if (yydebug) - printf("yydebug: after reduction, shifting from state %d \ -to state %d\n", *yyssp, yystate); -#endif - if (yyssp >= yyss + yystacksize - 1) - { - goto yyoverflow; - } - *++yyssp = yystate; - *++yyvsp = yyval; - goto yyloop; -yyoverflow: - yyerror("yacc stack overflow"); -yyabort: - return (1); -yyaccept: - return (0); -} diff --git a/src/common/dynarray.cpp b/src/common/dynarray.cpp deleted file mode 100644 index 305a1f07d4..0000000000 --- a/src/common/dynarray.cpp +++ /dev/null @@ -1,273 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: dynarray.cpp -// Purpose: implementation of wxBaseArray class -// Author: Vadim Zeitlin -// Modified by: -// Created: 12.09.97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// headers -// ============================================================================ - -#ifdef __GNUG__ -#pragma implementation "dynarray.h" -#endif - -#include - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif - -#include "wx/dynarray.h" -#include - -#include -#include // for memmove - -#ifndef max - #define max(a, b) (((a) > (b)) ? (a) : (b)) -#endif - -// ============================================================================ -// constants -// ============================================================================ - -// size increment = max(50% of current size, ARRAY_MAXSIZE_INCREMENT) -#define ARRAY_MAXSIZE_INCREMENT 4096 - -// ============================================================================ -// implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// wxBaseArray - dynamice array of 'long's -// ---------------------------------------------------------------------------- - -// ctor -wxBaseArray::wxBaseArray() -{ - m_uiSize = - m_uiCount = 0; - m_pItems = (long *) NULL; -} - -// copy ctor -wxBaseArray::wxBaseArray(const wxBaseArray& src) -{ - m_uiSize = // not src.m_uiSize to save memory - m_uiCount = src.m_uiCount; - - if ( m_uiSize != 0 ) { - m_pItems = new long[m_uiSize]; - memcpy(m_pItems, src.m_pItems, m_uiCount*sizeof(long)); - } - else - m_pItems = (long *) NULL; -} - -// assignment operator -wxBaseArray& wxBaseArray::operator=(const wxBaseArray& src) -{ -#if 0 - wxDELETEA(m_pItems); -#else - if ( (m_pItems)) { - delete (m_pItems); - (m_pItems) = 0; - } -#endif - - m_uiSize = // not src.m_uiSize to save memory - m_uiCount = src.m_uiCount; - - if ( m_uiSize != 0 ) { - m_pItems = new long[m_uiSize]; - memcpy(m_pItems, src.m_pItems, m_uiCount*sizeof(long)); - } - else - m_pItems = (long *) NULL; - - return *this; -} - -// grow the array -void wxBaseArray::Grow() -{ - // only do it if no more place - if( m_uiCount == m_uiSize ) { - if( m_uiSize == 0 ) { - // was empty, alloc some memory - m_uiSize = WX_ARRAY_DEFAULT_INITIAL_SIZE; - m_pItems = new long[m_uiSize]; - } - else - { - // add 50% but not too much - size_t uiIncrement = m_uiSize < WX_ARRAY_DEFAULT_INITIAL_SIZE - ? WX_ARRAY_DEFAULT_INITIAL_SIZE : m_uiSize >> 1; - if ( uiIncrement > ARRAY_MAXSIZE_INCREMENT ) - uiIncrement = ARRAY_MAXSIZE_INCREMENT; - m_uiSize += uiIncrement; - long *pNew = new long[m_uiSize]; - - // copy data to new location - memcpy(pNew, m_pItems, m_uiCount*sizeof(long)); - delete [] m_pItems; - m_pItems = pNew; - } - } -} - -// dtor -wxBaseArray::~wxBaseArray() -{ - wxDELETEA(m_pItems); -} - -// clears the list -void wxBaseArray::Clear() -{ - m_uiSize = - m_uiCount = 0; - - wxDELETEA(m_pItems); -} - -// pre-allocates memory (frees the previous data!) -void wxBaseArray::Alloc(size_t uiSize) -{ - wxASSERT( uiSize > 0 ); - - // only if old buffer was not big enough - if ( uiSize > m_uiSize ) { - wxDELETEA(m_pItems); - m_pItems = new long[uiSize]; - m_uiSize = uiSize; - } - - m_uiCount = 0; -} - -// searches the array for an item (forward or backwards) -int wxBaseArray::Index(long lItem, bool bFromEnd) const -{ - if ( bFromEnd ) { - if ( m_uiCount > 0 ) { - size_t ui = m_uiCount; - do { - if ( m_pItems[--ui] == lItem ) - return ui; - } - while ( ui != 0 ); - } - } - else { - for( size_t ui = 0; ui < m_uiCount; ui++ ) { - if( m_pItems[ui] == lItem ) - return ui; - } - } - - return NOT_FOUND; -} - -// search for an item in a sorted array (binary search) -int wxBaseArray::Index(long lItem, CMPFUNC fnCompare) const -{ - size_t i, - lo = 0, - hi = m_uiCount; - int res; - - while ( lo < hi ) { - i = (lo + hi)/2; - - res = (*fnCompare)((const void *)lItem, (const void *)m_pItems[i]); - if ( res < 0 ) - hi = i; - else if ( res > 0 ) - lo = i + 1; - else - return i; - } - - return NOT_FOUND; -} -// add item at the end -void wxBaseArray::Add(long lItem) -{ - Grow(); - m_pItems[m_uiCount++] = lItem; -} - -// add item assuming the array is sorted with fnCompare function -void wxBaseArray::Add(long lItem, CMPFUNC fnCompare) -{ - size_t i, - lo = 0, - hi = m_uiCount; - int res; - - while ( lo < hi ) { - i = (lo + hi)/2; - - res = (*fnCompare)((const void *)lItem, (const void *)m_pItems[i]); - if ( res < 0 ) - hi = i; - else if ( res > 0 ) - lo = i + 1; - else { - lo = hi = i; - break; - } - } - - wxASSERT( lo == hi ); // I hope I got binary search right :-) - - Insert(lItem, lo); -} - -// add item at the given position -void wxBaseArray::Insert(long lItem, size_t uiIndex) -{ - wxCHECK_RET( uiIndex <= m_uiCount, _("bad index in wxArray::Insert") ); - - Grow(); - - memmove(&m_pItems[uiIndex + 1], &m_pItems[uiIndex], - (m_uiCount - uiIndex)*sizeof(long)); - m_pItems[uiIndex] = lItem; - m_uiCount++; -} - -// removes item from array (by index) -void wxBaseArray::Remove(size_t uiIndex) -{ - wxCHECK_RET( uiIndex <= m_uiCount, _("bad index in wxArray::Remove") ); - - memmove(&m_pItems[uiIndex], &m_pItems[uiIndex + 1], - (m_uiCount - uiIndex - 1)*sizeof(long)); - m_uiCount--; -} - -// removes item from array (by value) -void wxBaseArray::Remove(long lItem) -{ - int iIndex = Index(lItem); - - wxCHECK_RET( iIndex != NOT_FOUND, - _("removing inexistent item in wxArray::Remove") ); - - Remove((size_t)iIndex); -} - -// sort array elements using passed comparaison function -void wxBaseArray::Sort(CMPFUNC fCmp) -{ - qsort(m_pItems, m_uiCount, sizeof(long), fCmp); -} diff --git a/src/common/dynlib.cpp b/src/common/dynlib.cpp deleted file mode 100644 index 6384eb3a8b..0000000000 --- a/src/common/dynlib.cpp +++ /dev/null @@ -1,183 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dynlib.cpp -// Purpose: Dynamic library management -// Author: Guilhem Lavaux -// Modified by: -// Created: 20/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dynlib.h" -#endif - -#include -#include -#include -#include - -// --------------------------------------------------------------------------- -// System dependent include -// --------------------------------------------------------------------------- - -#ifdef __UNIX__ -#include -#endif - -#ifdef __WINDOWS__ -#include -#endif - -// --------------------------------------------------------------------------- -// Global variables -// --------------------------------------------------------------------------- - -wxLibraries wxTheLibraries; - -// --------------------------------------------------------------------------- -// wxLibrary (one instance per dynamic library -// --------------------------------------------------------------------------- - -wxLibrary::wxLibrary(void *handle) -{ - typedef wxClassInfo **(*t_get_first)(void); - t_get_first get_first; - - m_handle = handle; - m_destroy = TRUE; - - // Some system may use a local heap for library. - get_first = (t_get_first)GetSymbol("wxGetClassFirst"); - // It is a wxWindows DLL. - if (get_first) - PrepareClasses(get_first()); -} - -wxLibrary::~wxLibrary() -{ - if (m_handle && m_destroy) { -#ifdef __UNIX__ - dlclose(m_handle); -#endif -#ifdef __WINDOWS__ - FreeLibrary((HMODULE)m_handle); -#endif - } -} - -wxObject *wxLibrary::CreateObject(const wxString& name) -{ - wxClassInfo *info = (wxClassInfo *)classTable.Get(name); - - if (!info) - return NULL; - - return info->CreateObject(); -} - -void wxLibrary::PrepareClasses(wxClassInfo **first) -{ - // Index all class infos by their class name - wxClassInfo *info = *first; - while (info) - { - if (info->className) - classTable.Put(info->className, (wxObject *)info); - info = info->next; - } - - // Set base pointers for each wxClassInfo - info = *first; - while (info) - { - if (info->GetBaseClassName1()) - info->baseInfo1 = (wxClassInfo *)classTable.Get(info->GetBaseClassName1()); - if (info->GetBaseClassName2()) - info->baseInfo2 = (wxClassInfo *)classTable.Get(info->GetBaseClassName2()); - info = info->next; - } - *first = NULL; -} - -void *wxLibrary::GetSymbol(const wxString& symbname) -{ -#ifdef __UNIX__ - return dlsym(m_handle, WXSTRINGCAST symbname); -#endif -#ifdef __WINDOWS__ - return GetProcAddress(m_handle, WXSTRINGCAST symbname); -#endif - return NULL; -} - -// --------------------------------------------------------------------------- -// wxLibraries (only one instance should normally exist) -// --------------------------------------------------------------------------- - -wxLibraries::wxLibraries() -{ -} - -wxLibraries::~wxLibraries() -{ - wxNode *node = m_loaded.First(); - - while (node) { - wxLibrary *lib = (wxLibrary *)node->Data(); - delete lib; - - node = node->Next(); - } -} - -wxLibrary *wxLibraries::LoadLibrary(const wxString& name) -{ - wxString lib_name = name; - wxNode *node; - wxLibrary *lib; - - if ( (node = m_loaded.Find(name.GetData())) ) - return ((wxLibrary *)node->Data()); - -#if defined(__UNIX__) - lib_name.Prepend("./lib"); - lib_name += ".so"; - - printf("lib_name = %s\n", WXSTRINGCAST lib_name); - - void *handle = dlopen(WXSTRINGCAST lib_name, RTLD_LAZY); - - if (!handle) - return NULL; -#elif defined(__WINDOWS__) - lib_name += ".dll"; - - HMODULE handle = LoadLibrary(lib_name); - if (!handle) - return NULL; -#else - return NULL; -#endif - - lib = new wxLibrary((void *)handle); - - m_loaded.Append(name.GetData(), lib); - return lib; -} - -wxObject *wxLibraries::CreateObject(const wxString& path) -{ - wxNode *node = m_loaded.First(); - wxObject *obj; - - while (node) { - obj = ((wxLibrary *)node->Data())->CreateObject(path); - if (obj) - return obj; - - node = node->Next(); - } - return NULL; -} diff --git a/src/common/event.cpp b/src/common/event.cpp deleted file mode 100644 index 14278f5373..0000000000 --- a/src/common/event.cpp +++ /dev/null @@ -1,461 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: event.cpp -// Purpose: Event classes -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "event.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#include "wx/control.h" -#include "wx/utils.h" -#include "wx/app.h" -#include "wx/dc.h" -#endif - -#include "wx/event.h" -#include "wx/validate.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxEvtHandler, wxObject) -IMPLEMENT_ABSTRACT_CLASS(wxEvent, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxCommandEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxScrollEvent, wxCommandEvent) -IMPLEMENT_DYNAMIC_CLASS(wxMouseEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxKeyEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxSizeEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxPaintEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxEraseEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxMoveEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxFocusEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxCloseEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxShowEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxMaximizeEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxIconizeEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxMenuEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxJoystickEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxDropFilesEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxActivateEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxInitDialogEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxSysColourChangedEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxIdleEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxUpdateUIEvent, wxCommandEvent) -IMPLEMENT_DYNAMIC_CLASS(wxNavigationKeyEvent, wxCommandEvent) -IMPLEMENT_DYNAMIC_CLASS(wxPaletteChangedEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxQueryNewPaletteEvent, wxEvent) - -const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable; } - -const wxEventTable wxEvtHandler::sm_eventTable = - { (const wxEventTable *) NULL, &wxEvtHandler::sm_eventTableEntries[0] }; - -const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, -#ifdef __SGI_CC__ -// stupid SGI compiler --- offer aug 98 - 0L } -#else - NULL } -#endif -}; - -#endif - -/* - * General wxWindows events, covering - * all interesting things that might happen (button clicking, resizing, - * setting text in widgets, etc.). - * - * For each completely new event type, derive a new event class. - * - */ - -wxEvent::wxEvent(int theId) -{ - m_eventType = wxEVT_NULL; - m_eventObject = (wxObject *) NULL; - m_eventHandle = (char *) NULL; - m_timeStamp = 0; - m_id = theId; - m_skipped = FALSE; - m_callbackUserData = (wxObject *) NULL; -} - -/* - * Command events - * - */ - -wxCommandEvent::wxCommandEvent(wxEventType commandType, int theId) -{ - m_eventType = commandType; - m_clientData = (char *) NULL; - m_extraLong = 0; - m_commandInt = 0; - m_id = theId; - m_commandString = (char *) NULL; -} - -/* - * Scroll events - */ - -wxScrollEvent::wxScrollEvent(wxEventType commandType, int id, int pos, int orient): - wxCommandEvent(commandType, id) -{ - m_extraLong = orient; - m_commandInt = pos; -} - - -/* - * Mouse events - * - */ - -wxMouseEvent::wxMouseEvent(wxEventType commandType) -{ - m_eventType = commandType; - m_metaDown = FALSE; - m_altDown = FALSE; - m_controlDown = FALSE; - m_shiftDown = FALSE; -} - -// True if was a button dclick event (1 = left, 2 = middle, 3 = right) -// or any button dclick event (but = -1) -bool wxMouseEvent::ButtonDClick(int but) const -{ - switch (but) { - case -1: - return (LeftDClick() || MiddleDClick() || RightDClick()); - case 1: - return LeftDClick(); - case 2: - return MiddleDClick(); - case 3: - return RightDClick(); - default: - return FALSE; - } - // NOTREACHED -} - -// True if was a button down event (1 = left, 2 = middle, 3 = right) -// or any button down event (but = -1) -bool wxMouseEvent::ButtonDown(int but) const -{ - switch (but) { - case -1: - return (LeftDown() || MiddleDown() || RightDown()); - case 1: - return LeftDown(); - case 2: - return MiddleDown(); - case 3: - return RightDown(); - default: - return FALSE; - } - // NOTREACHED -} - -// True if was a button up event (1 = left, 2 = middle, 3 = right) -// or any button up event (but = -1) -bool wxMouseEvent::ButtonUp(int but) const -{ - switch (but) { - case -1: - return (LeftUp() || MiddleUp() || RightUp()); - case 1: - return LeftUp(); - case 2: - return MiddleUp(); - case 3: - return RightUp(); - default: - return FALSE; - } - // NOTREACHED -} - -// True if the given button is currently changing state -bool wxMouseEvent::Button(int but) const -{ - switch (but) { - case -1: - return (ButtonUp(-1) || ButtonDown(-1) || ButtonDClick(-1)) ; - case 1: - return (LeftDown() || LeftUp() || LeftDClick()); - case 2: - return (MiddleDown() || MiddleUp() || MiddleDClick()); - case 3: - return (RightDown() || RightUp() || RightDClick()); - default: - return FALSE; - } - // NOTREACHED -} - -bool wxMouseEvent::ButtonIsDown(int but) const -{ - switch (but) { - case -1: - return (LeftIsDown() || MiddleIsDown() || RightIsDown()); - case 1: - return LeftIsDown(); - case 2: - return MiddleIsDown(); - case 3: - return RightIsDown(); - default: - return FALSE; - } - // NOTREACHED -} - -// Find the logical position of the event given the DC -wxPoint wxMouseEvent::GetLogicalPosition(const wxDC& dc) const -{ - wxPoint pt(dc.DeviceToLogicalX(m_x), dc.DeviceToLogicalY(m_y)); - return pt; -} - - -/* - * Keyboard events - * - */ - -wxKeyEvent::wxKeyEvent(wxEventType type) -{ - m_eventType = type; - m_shiftDown = FALSE; - m_controlDown = FALSE; - m_metaDown = FALSE; - m_altDown = FALSE; - m_keyCode = 0; -} - -/* - * Event handler - */ - -wxEvtHandler::wxEvtHandler(void) -{ - m_clientData = (char *) NULL; - m_nextHandler = (wxEvtHandler *) NULL; - m_previousHandler = (wxEvtHandler *) NULL; - m_enabled = TRUE; - m_dynamicEvents = (wxList *) NULL; -} - -wxEvtHandler::~wxEvtHandler(void) -{ - // Takes itself out of the list of handlers - if (m_previousHandler) - m_previousHandler->m_nextHandler = m_nextHandler; - - if (m_nextHandler) - m_nextHandler->m_previousHandler = m_previousHandler; - - if (m_dynamicEvents) - { - wxNode *node = m_dynamicEvents->First(); - while (node) - { - wxEventTableEntry *entry = (wxEventTableEntry*)node->Data(); - if (entry->m_callbackUserData) delete entry->m_callbackUserData; - delete entry; - node = node->Next(); - } - delete m_dynamicEvents; - }; -} - -/* - * Event table stuff - */ - -bool wxEvtHandler::ProcessEvent(wxEvent& event) -{ - // An event handler can be enabled or disabled - if ( GetEvtHandlerEnabled() ) - { - // Handle per-instance dynamic event tables first - - if (SearchDynamicEventTable( event )) return TRUE; - - // Then static per-class event tables - - const wxEventTable *table = GetEventTable(); - - // Try the associated validator first, if this is a window. - // Problem: if the event handler of the window has been replaced, - // this wxEvtHandler may no longer be a window. - // Therefore validators won't be processed if the handler - // has been replaced with SetEventHandler. - // THIS CAN BE CURED if PushEventHandler is used instead of - // SetEventHandler, and then processing will be passed down the - // chain of event handlers. - if (IsKindOf(CLASSINFO(wxWindow))) - { - wxWindow *win = (wxWindow *)this; - - // Can only use the validator of the window which - // is receiving the event - if ( (win == event.GetEventObject()) && - win->GetValidator() && - win->GetValidator()->ProcessEvent(event)) - return TRUE; - } - - // Search upwards through the inheritance hierarchy - while (table) - { - if (SearchEventTable((wxEventTable&)*table, event)) - return TRUE; - table = table->baseTable; - } - } - - // Try going down the event handler chain - if ( GetNextHandler() ) - { - if ( GetNextHandler()->ProcessEvent(event) ) - return TRUE; - } - - // Carry on up the parent-child hierarchy, - // but only if event is a command event: it wouldn't - // make sense for a parent to receive a child's size event, for example - if (IsKindOf(CLASSINFO(wxWindow)) && event.IsKindOf(CLASSINFO(wxCommandEvent))) - { - wxWindow *win = (wxWindow *)this; - wxWindow *parent = win->GetParent(); - if (parent && !parent->IsBeingDeleted()) - return win->GetParent()->GetEventHandler()->ProcessEvent(event); - } - - // Last try - application object. - // Special case: don't pass wxEVT_IDLE to wxApp, since it'll always swallow it. - // wxEVT_IDLE is sent explicitly to wxApp so it will be processed appropriately - // via SearchEventTable. - if (wxTheApp && this != wxTheApp && (event.GetEventType() != wxEVT_IDLE) && wxTheApp->ProcessEvent(event)) - return TRUE; - else - return FALSE; -} - -bool wxEvtHandler::SearchEventTable(wxEventTable& table, wxEvent& event) -{ - int i = 0; - int commandId = event.GetId(); - - while (table.entries[i].m_fn != -#ifdef __SGI_CC__ - 0L -#else - NULL -#endif - ) - { -// wxEventType eventType = (wxEventType) table.entries[i].m_eventType; - - if ((event.GetEventType() == table.entries[i].m_eventType) && - (table.entries[i].m_id == -1 || // Match, if event spec says any id will do (id == -1) - (table.entries[i].m_lastId == -1 && commandId == table.entries[i].m_id) || - (table.entries[i].m_lastId != -1 && - (commandId >= table.entries[i].m_id && commandId <= table.entries[i].m_lastId)))) - { - event.Skip(FALSE); - event.m_callbackUserData = table.entries[i].m_callbackUserData; - - (this->*((wxEventFunction) (table.entries[i].m_fn)))(event); - - if ( event.GetSkipped() ) - return FALSE; - else - return TRUE; - } - i ++; - } - return FALSE; -} - -void wxEvtHandler::Connect( int id, int lastId, - int eventType, - wxObjectEventFunction func, - wxObject *userData ) -{ - wxEventTableEntry *entry = new wxEventTableEntry; - entry->m_id = id; - entry->m_lastId = lastId; - entry->m_eventType = eventType; - entry->m_fn = func; - entry->m_callbackUserData = userData; - - if (!m_dynamicEvents) - m_dynamicEvents = new wxList; - - m_dynamicEvents->Append( (wxObject*) entry ); -} - -bool wxEvtHandler::SearchDynamicEventTable( wxEvent& event ) -{ - if (!m_dynamicEvents) return FALSE; - - int commandId = event.GetId(); - - wxNode *node = m_dynamicEvents->First(); - while (node) - { - wxEventTableEntry *entry = (wxEventTableEntry*)node->Data(); - -// wxEventType eventType = (wxEventType) entry->m_eventType; - - if (entry->m_fn) - { - if ((event.GetEventType() == entry->m_eventType) && - (entry->m_id == -1 || // Match, if event spec says any id will do (id == -1) - (entry->m_lastId == -1 && commandId == entry->m_id) || - (entry->m_lastId != -1 && - (commandId >= entry->m_id && commandId <= entry->m_lastId)))) - { - event.Skip(FALSE); - event.m_callbackUserData = entry->m_callbackUserData; - - (this->*((wxEventFunction) (entry->m_fn)))(event); - - if (event.GetSkipped()) - return FALSE; - else - return TRUE; - } - }; - node = node->Next(); - } - return FALSE; -}; - -bool wxEvtHandler::OnClose(void) -{ - if (GetNextHandler()) return GetNextHandler()->OnClose(); - else return FALSE; -} - - diff --git a/src/common/extended.c b/src/common/extended.c deleted file mode 100644 index d77950456d..0000000000 --- a/src/common/extended.c +++ /dev/null @@ -1,179 +0,0 @@ -#include "wx/setup.h" -#include - -#if USE_APPLE_IEEE - -/* - * C O N V E R T T O I E E E E X T E N D E D - */ - -/* Copyright (C) 1988-1991 Apple Computer, Inc. - * All rights reserved. - * - * Machine-independent I/O routines for IEEE floating-point numbers. - * - * NaN's and infinities are converted to HUGE_VAL or HUGE, which - * happens to be infinity on IEEE machines. Unfortunately, it is - * impossible to preserve NaN's in a machine-independent way. - * Infinities are, however, preserved on IEEE machines. - * - * These routines have been tested on the following machines: - * Apple Macintosh, MPW 3.1 C compiler - * Apple Macintosh, THINK C compiler - * Silicon Graphics IRIS, MIPS compiler - * Cray X/MP and Y/MP - * Digital Equipment VAX - * - * - * Implemented by Malcolm Slaney and Ken Turkowski. - * - * Malcolm Slaney contributions during 1988-1990 include big- and little- - * endian file I/O, conversion to and from Motorola's extended 80-bit - * floating-point format, and conversions to and from IEEE single- - * precision floating-point format. - * - * In 1991, Ken Turkowski implemented the conversions to and from - * IEEE double-precision format, added more precision to the extended - * conversions, and accommodated conversions involving +/- infinity, - * NaN's, and denormalized numbers. - */ - -#ifndef HUGE_VAL -#define HUGE_VAL HUGE -#endif /*HUGE_VAL*/ - -#define FloatToUnsigned(f) ((unsigned long) (((long) (f - 2147483648.0)) + 2147483647L) + 1) - -void ConvertToIeeeExtended(double num, unsigned char *bytes) -{ - int sign; - int expon; - double fMant, fsMant; - unsigned long hiMant, loMant; - - if (num < 0) { - sign = 0x8000; - num *= -1; - } else { - sign = 0; - } - - if (num == 0) { - expon = 0; hiMant = 0; loMant = 0; - } - else { - fMant = frexp(num, &expon); - if ((expon > 16384) || !(fMant < 1)) { /* Infinity or NaN */ - expon = sign|0x7FFF; hiMant = 0; loMant = 0; /* infinity */ - } - else { /* Finite */ - expon += 16382; - if (expon < 0) { /* denormalized */ - fMant = ldexp(fMant, expon); - expon = 0; - } - expon |= sign; - fMant = ldexp(fMant, 32); - fsMant = floor(fMant); - hiMant = FloatToUnsigned(fsMant); - fMant = ldexp(fMant - fsMant, 32); - fsMant = floor(fMant); - loMant = FloatToUnsigned(fsMant); - } - } - - bytes[0] = expon >> 8; - bytes[1] = expon; - bytes[2] = hiMant >> 24; - bytes[3] = hiMant >> 16; - bytes[4] = hiMant >> 8; - bytes[5] = hiMant; - bytes[6] = loMant >> 24; - bytes[7] = loMant >> 16; - bytes[8] = loMant >> 8; - bytes[9] = loMant; -} - -/* - * C O N V E R T F R O M I E E E E X T E N D E D - */ - -/* - * Copyright (C) 1988-1991 Apple Computer, Inc. - * All rights reserved. - * - * Machine-independent I/O routines for IEEE floating-point numbers. - * - * NaN's and infinities are converted to HUGE_VAL or HUGE, which - * happens to be infinity on IEEE machines. Unfortunately, it is - * impossible to preserve NaN's in a machine-independent way. - * Infinities are, however, preserved on IEEE machines. - * - * These routines have been tested on the following machines: - * Apple Macintosh, MPW 3.1 C compiler - * Apple Macintosh, THINK C compiler - * Silicon Graphics IRIS, MIPS compiler - * Cray X/MP and Y/MP - * Digital Equipment VAX - * - * - * Implemented by Malcolm Slaney and Ken Turkowski. - * - * Malcolm Slaney contributions during 1988-1990 include big- and little- - * endian file I/O, conversion to and from Motorola's extended 80-bit - * floating-point format, and conversions to and from IEEE single- - * precision floating-point format. - * - * In 1991, Ken Turkowski implemented the conversions to and from - * IEEE double-precision format, added more precision to the extended - * conversions, and accommodated conversions involving +/- infinity, - * NaN's, and denormalized numbers. - */ - -#ifndef HUGE_VAL -# define HUGE_VAL HUGE -#endif /*HUGE_VAL*/ - -# define UnsignedToFloat(u) (((double) ((long) (u - 2147483647L - 1))) + 2147483648.0) - -/**************************************************************** - * Extended precision IEEE floating-point conversion routine. - ****************************************************************/ - -double ConvertFromIeeeExtended(const unsigned char *bytes) -{ - double f; - int expon; - unsigned long hiMant, loMant; - - expon = ((bytes[0] & 0x7F) << 8) | (bytes[1] & 0xFF); - hiMant = ((unsigned long)(bytes[2] & 0xFF) << 24) - | ((unsigned long) (bytes[3] & 0xFF) << 16) - | ((unsigned long) (bytes[4] & 0xFF) << 8) - | ((unsigned long) (bytes[5] & 0xFF)); - loMant = ((unsigned long) (bytes[6] & 0xFF) << 24) - | ((unsigned long) (bytes[7] & 0xFF) << 16) - | ((unsigned long) (bytes[8] & 0xFF) << 8) - | ((unsigned long) (bytes[9] & 0xFF)); - - if (expon == 0 && hiMant == 0 && loMant == 0) { - f = 0; - } - else { - if (expon == 0x7FFF) { /* Infinity or NaN */ - f = HUGE_VAL; - } - else { - expon -= 16383; - f = ldexp(UnsignedToFloat(hiMant), expon-=31); - f += ldexp(UnsignedToFloat(loMant), expon-=32); - } - } - - if (bytes[0] & 0x80) - return -f; - else - return f; -} - -#endif diff --git a/src/common/file.cpp b/src/common/file.cpp deleted file mode 100644 index 44c4b7b77f..0000000000 --- a/src/common/file.cpp +++ /dev/null @@ -1,483 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: file.cpp -// Purpose: wxFile - encapsulates low-level "file descriptor" -// wxTempFile -// Author: Vadim Zeitlin -// Modified by: -// Created: 29/01/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- - -#ifdef __GNUG__ -#pragma implementation "file.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" -#include "wx/defs.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -// standard -#if defined(__WXMSW__) && !defined(__GNUWIN32__) - #include - - #define WIN32_LEAN_AND_MEAN - #define NOSERVICE - #define NOIME - #define NOATOM - #define NOGDI - #define NOGDICAPMASKS - #define NOMETAFILE - #define NOMINMAX - #define NOMSG - #define NOOPENFILE - #define NORASTEROPS - #define NOSCROLL - #define NOSOUND - #define NOSYSMETRICS - #define NOTEXTMETRIC - #define NOWH - #define NOCOMM - #define NOKANJI - #define NOCRYPT - #define NOMCX - #include // for GetTempFileName -#elif (defined(__UNIX__) || defined(__GNUWIN32__)) - #include -#elif (defined(__WXSTUBS__)) - // Have to ifdef this for different environments - #include -#else - #error "Please specify the header with file functions declarations." -#endif //Win/UNIX - -#include // SEEK_xxx constants -#include // O_RDONLY &c -#include // needed for stat -#include // stat - -// Microsoft compiler loves underscores, feed them to it -#ifdef _MSC_VER - // functions - #define open _open - #define close _close - #define read _read - #define write _write - #define lseek _lseek - #define fsync _commit - #define access _access - #define eof _eof - - // types - #define stat _stat - - // constants - #define O_RDONLY _O_RDONLY - #define O_WRONLY _O_WRONLY - #define O_RDWR _O_RDWR - #define O_EXCL _O_EXCL - #define O_CREAT _O_CREAT - #define O_BINARY _O_BINARY - - #define S_IFDIR _S_IFDIR - #define S_IFREG _S_IFREG - - #define W_OK 2 - #define R_OK 4 -#else - #define tell(fd) lseek(fd, 0, SEEK_CUR) -#endif //_MSC_VER - -#ifdef __BORLANDC__ - #define W_OK 2 - #define R_OK 4 -#endif - -// there is no distinction between text and binary files under Unix -#ifdef __UNIX__ - #define O_BINARY (0) -#endif //__UNIX__ - -// wxWindows -#include -#include -#include -#include - -#ifndef MAX_PATH -#define MAX_PATH 512 -#endif - -// ============================================================================ -// implementation of wxFile -// ============================================================================ - -// ---------------------------------------------------------------------------- -// static functions -// ---------------------------------------------------------------------------- -bool wxFile::Exists(const char *name) -{ - struct stat st; - return !access(name, 0) && !stat(name, &st) && (st.st_mode & S_IFREG); -} - -bool wxFile::Access(const char *name, OpenMode mode) -{ - int how; - - switch ( mode ) { - case read: - how = R_OK; - break; - - case write: - how = W_OK; - break; - - default: - wxFAIL_MSG("bad wxFile::Access mode parameter."); - } - - return access(name, how) == 0; -} - -// ---------------------------------------------------------------------------- -// opening/closing -// ---------------------------------------------------------------------------- - -// ctors -wxFile::wxFile(const char *szFileName, OpenMode mode) -{ - m_fd = fd_invalid; - m_error = FALSE; - - Open(szFileName, mode); -} - -// dtor -wxFile::~wxFile() -{ - Close(); -} - -// create the file, fail if it already exists and bOverwrite -bool wxFile::Create(const char *szFileName, bool bOverwrite, int access) -{ - // if bOverwrite we create a new file or truncate the existing one, - // otherwise we only create the new file and fail if it already exists - int fd = open(szFileName, O_CREAT | (bOverwrite ? O_TRUNC : O_EXCL), access); - - if ( fd == -1 ) { - wxLogSysError(_("can't create file '%s'"), szFileName); - return FALSE; - } - else { - Attach(fd); - return TRUE; - } -} - -// open the file -bool wxFile::Open(const char *szFileName, OpenMode mode, int access) -{ - int flags = O_BINARY; - - switch ( mode ) { - case read: - flags |= O_RDONLY; - break; - - case write: - flags |= O_WRONLY | O_CREAT | O_TRUNC; - break; - - case write_append: - flags |= O_WRONLY | O_APPEND; - break; - - case read_write: - flags |= O_RDWR; - break; - } - - int fd = open(szFileName, flags, access); - - if ( fd == -1 ) { - wxLogSysError(_("can't open file '%s'"), szFileName); - return FALSE; - } - else { - Attach(fd); - return TRUE; - } -} - -// close -bool wxFile::Close() -{ - if ( IsOpened() ) { - if ( close(m_fd) == -1 ) { - wxLogSysError(_("can't close file descriptor %d"), m_fd); - m_fd = fd_invalid; - return FALSE; - } - else - m_fd = fd_invalid; - } - - return TRUE; -} - -// ---------------------------------------------------------------------------- -// read/write -// ---------------------------------------------------------------------------- - -// read -off_t wxFile::Read(void *pBuf, off_t nCount) -{ - wxCHECK( (pBuf != NULL) && IsOpened(), 0 ); - - int iRc = ::read(m_fd, pBuf, nCount); - if ( iRc == -1 ) { - wxLogSysError(_("can't read from file descriptor %d"), m_fd); - return wxInvalidOffset; - } - else - return (size_t)iRc; -} - -// write -size_t wxFile::Write(const void *pBuf, size_t nCount) -{ - wxCHECK( (pBuf != NULL) && IsOpened(), 0 ); - - int iRc = ::write(m_fd, pBuf, nCount); - if ( iRc == -1 ) { - wxLogSysError(_("can't write to file descriptor %d"), m_fd); - m_error = TRUE; - return 0; - } - else - return iRc; -} - -// flush -bool wxFile::Flush() -{ - if ( IsOpened() ) { - // @@@ fsync() is not ANSI (BSDish) -// if ( fsync(m_fd) == -1 ) { // TODO - if (TRUE) { - wxLogSysError(_("can't flush file descriptor %d"), m_fd); - return FALSE; - } - } - - return TRUE; -} - -// ---------------------------------------------------------------------------- -// seek -// ---------------------------------------------------------------------------- - -// seek -off_t wxFile::Seek(off_t ofs, wxSeekMode mode) -{ - wxASSERT( IsOpened() ); - - int flag = -1; - switch ( mode ) { - case wxFromStart: - flag = SEEK_SET; - break; - - case wxFromCurrent: - flag = SEEK_CUR; - break; - - case wxFromEnd: - flag = SEEK_END; - break; - - default: - wxFAIL_MSG(_("unknown seek origin")); - } - - int iRc = lseek(m_fd, ofs, flag); - if ( iRc == -1 ) { - wxLogSysError(_("can't seek on file descriptor %d"), m_fd); - return wxInvalidOffset; - } - else - return (off_t)iRc; -} - -// get current off_t -off_t wxFile::Tell() const -{ - wxASSERT( IsOpened() ); - - int iRc = tell(m_fd); - if ( iRc == -1 ) { - wxLogSysError(_("can't get seek position on file descriptor %d"), m_fd); - return wxInvalidOffset; - } - else - return (off_t)iRc; -} - -// get current file length -off_t wxFile::Length() const -{ - wxASSERT( IsOpened() ); - - #ifdef _MSC_VER - int iRc = _filelength(m_fd); - #else - int iRc = tell(m_fd); - if ( iRc != -1 ) { - // @ have to use const_cast :-( - int iLen = ((wxFile *)this)->SeekEnd(); - if ( iLen != -1 ) { - // restore old position - if ( ((wxFile *)this)->Seek(iRc) == -1 ) { - // error - iLen = -1; - } - } - - iRc = iLen; - } - - #endif //_MSC_VER - - if ( iRc == -1 ) { - wxLogSysError(_("can't find length of file on file descriptor %d"), m_fd); - return wxInvalidOffset; - } - else - return (off_t)iRc; -} - -// is end of file reached? -bool wxFile::Eof() const -{ - wxASSERT( IsOpened() ); - - int iRc; - - #if defined(__UNIX__) || defined(__GNUWIN32__) - // @@ this doesn't work, of course, on unseekable file descriptors - off_t ofsCur = Tell(), - ofsMax = Length(); - if ( ofsCur == wxInvalidOffset || ofsMax == wxInvalidOffset ) - iRc = -1; - else - iRc = ofsCur == ofsMax; - #else // Windows and "native" compiler - iRc = eof(m_fd); - #endif // Windows/Unix - - switch ( iRc ) { - case 1: - break; - - case 0: - return FALSE; - - case -1: - wxLogSysError(_("can't determine if the end of file is reached on \ -descriptor %d"), m_fd); - break; - - default: - wxFAIL_MSG(_("invalid eof() return value.")); - } - - return TRUE; -} - -// ============================================================================ -// implementation of wxTempFile -// ============================================================================ - -// ---------------------------------------------------------------------------- -// construction -// ---------------------------------------------------------------------------- -wxTempFile::wxTempFile(const wxString& strName) -{ - Open(strName); -} - -bool wxTempFile::Open(const wxString& strName) -{ - m_strName = strName; - - // we want to create the file in the same directory as strName because - // otherwise rename() in Commit() might not work (if the files are on - // different partitions for example). Unfortunately, the only standard - // (POSIX) temp file creation function tmpnam() can't do it. - #if defined(__UNIX__) || defined(__WXSTUBS__) - static const char *szMktempSuffix = "XXXXXX"; - m_strTemp << strName << szMktempSuffix; - mktemp((char *)m_strTemp.c_str()); // will do because length doesn't change - #else // Windows - wxString strPath; - wxSplitPath(strName, &strPath, NULL, NULL); - if ( strPath.IsEmpty() ) - strPath = '.'; // GetTempFileName will fail if we give it empty string -#ifdef __WIN32__ - if ( !GetTempFileName(strPath, "wx_",0, m_strTemp.GetWriteBuf(MAX_PATH)) ) -#else - // Not sure why MSVC++ 1.5 header defines first param as BYTE - bug? - if ( !GetTempFileName((BYTE) (const char*) strPath, "wx_",0, m_strTemp.GetWriteBuf(MAX_PATH)) ) -#endif - wxLogLastError("GetTempFileName"); - m_strTemp.UngetWriteBuf(); - #endif // Windows/Unix - - return m_file.Open(m_strTemp, wxFile::write); -} - -// ---------------------------------------------------------------------------- -// destruction -// ---------------------------------------------------------------------------- - -wxTempFile::~wxTempFile() -{ - if ( IsOpened() ) - Discard(); -} - -bool wxTempFile::Commit() -{ - m_file.Close(); - - if ( wxFile::Exists(m_strName) && remove(m_strName) != 0 ) { - wxLogSysError(_("can't remove file '%s'"), m_strName.c_str()); - return FALSE; - } - - if ( rename(m_strTemp, m_strName) != 0 ) { - wxLogSysError(_("can't commit changes to file '%s'"), m_strName.c_str()); - return FALSE; - } - - return TRUE; -} - -void wxTempFile::Discard() -{ - m_file.Close(); - if ( remove(m_strTemp) != 0 ) - wxLogSysError(_("can't remove temporary file '%s'"), m_strTemp.c_str()); -} diff --git a/src/common/fileconf.cpp b/src/common/fileconf.cpp deleted file mode 100644 index 6a9568e3b5..0000000000 --- a/src/common/fileconf.cpp +++ /dev/null @@ -1,1392 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: fileconf.cpp -// Purpose: implementation of wxFileConfig derivation of wxConfig -// Author: Vadim Zeitlin -// Modified by: -// Created: 07.04.98 (adapted from appconf.cpp) -// RCS-ID: $Id$ -// Copyright: (c) 1997 Karsten Ballüder & Vadim Zeitlin -// Ballueder@usa.net -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "fileconf.h" -#endif - -// ============================================================================ -// declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif //__BORLANDC__ - -#ifndef WX_PRECOMP - #include - #include -#endif //WX_PRECOMP - -#include -#include -#include -#include -#include -#include -#include - -// _WINDOWS_ is defined when windows.h is included, -// __WXMSW__ is defined for MS Windows compilation -#if defined(__WXMSW__) && !defined(_WINDOWS_) - #include -#endif //windows.h - -#include -#include - -// ---------------------------------------------------------------------------- -// macros -// ---------------------------------------------------------------------------- -#define CONST_CAST ((wxFileConfig *)this)-> - -// ---------------------------------------------------------------------------- -// global functions declarations -// ---------------------------------------------------------------------------- - -// is 'c' a valid character in group name? -// NB: wxCONFIG_IMMUTABLE_PREFIX and wxCONFIG_PATH_SEPARATOR must be valid chars, -// but _not_ ']' (group name delimiter) -inline bool IsValid(char c) { return isalnum(c) || strchr("@_/-!.*%", c); } - -// compare functions for sorting the arrays -static int CompareEntries(wxFileConfig::ConfigEntry *p1, - wxFileConfig::ConfigEntry *p2); -static int CompareGroups(wxFileConfig::ConfigGroup *p1, - wxFileConfig::ConfigGroup *p2); - -// filter strings -static wxString FilterIn(const wxString& str); -static wxString FilterOut(const wxString& str); - -// ============================================================================ -// implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// static functions -// ---------------------------------------------------------------------------- -wxString wxFileConfig::GetGlobalDir() -{ - wxString strDir; - - #ifdef __UNIX__ - strDir = "/etc/"; - #elif defined(__WXSTUBS__) - // TODO - wxASSERT( TRUE ) ; - #else // Windows - #ifndef _MAX_PATH - #define _MAX_PATH 512 - #endif - - char szWinDir[_MAX_PATH]; - ::GetWindowsDirectory(szWinDir, _MAX_PATH); - - strDir = szWinDir; - strDir << '\\'; - #endif // Unix/Windows - - return strDir; -} - -wxString wxFileConfig::GetLocalDir() -{ - wxString strDir; - - #ifdef __UNIX__ - const char *szHome = getenv("HOME"); - if ( szHome == NULL ) { - // we're homeless... - wxLogWarning(_("can't find user's HOME, using current directory.")); - strDir = "."; - } - else - strDir = szHome; - strDir << '/'; // a double slash is no problem, a missin one yes - #else // Windows - #ifdef __WIN32__ - const char *szHome = getenv("HOMEDRIVE"); - if ( szHome != NULL ) - strDir << szHome; - szHome = getenv("HOMEPATH"); - if ( szHome != NULL ) - strDir << szHome; - #else // Win16 - // Win16 has no idea about home, so use the current directory instead - strDir = ".\\"; - #endif // WIN16/32 - #endif // UNIX/Win - - return strDir; -} - -wxString wxFileConfig::GetGlobalFileName(const char *szFile) -{ - wxString str = GetGlobalDir(); - str << szFile; - - if ( strchr(szFile, '.') == NULL ) - #ifdef __UNIX__ - str << ".conf"; - #else // Windows - str << ".ini"; - #endif // UNIX/Win - - return str; -} - -wxString wxFileConfig::GetLocalFileName(const char *szFile) -{ - wxString str = GetLocalDir(); - - #ifdef __UNIX__ - str << '.'; - #endif - - str << szFile; - - #ifdef __WXMSW__ - if ( strchr(szFile, '.') == NULL ) - str << ".ini"; - #endif - - return str; -} - -// ---------------------------------------------------------------------------- -// ctor -// ---------------------------------------------------------------------------- - -void wxFileConfig::Init() -{ - m_pCurrentGroup = - m_pRootGroup = new ConfigGroup(NULL, "", this); - - m_linesHead = - m_linesTail = NULL; - - // it's not an error if (one of the) file(s) doesn't exist - - // parse the global file - if ( !m_strGlobalFile.IsEmpty() && wxFile::Exists(m_strGlobalFile) ) { - wxTextFile fileGlobal(m_strGlobalFile); - - if ( fileGlobal.Open() ) { - Parse(fileGlobal, FALSE /* global */); - SetRootPath(); - } - else - wxLogWarning(_("can't open global configuration file '%s'."), - m_strGlobalFile.c_str()); - } - - // parse the local file - if ( !m_strLocalFile.IsEmpty() && wxFile::Exists(m_strLocalFile) ) { - wxTextFile fileLocal(m_strLocalFile); - if ( fileLocal.Open() ) { - Parse(fileLocal, TRUE /* local */); - SetRootPath(); - } - else - wxLogWarning(_("can't open user configuration file '%s'."), - m_strLocalFile.c_str()); - } -} - -// constructor supports creation of wxFileConfig objects of any type -wxFileConfig::wxFileConfig(const wxString& appName, const wxString& vendorName, - const wxString& strLocal, const wxString& strGlobal, - long style) - : wxConfigBase(appName, vendorName, strLocal, strGlobal, style), - m_strLocalFile(strLocal), m_strGlobalFile(strGlobal) -{ - // Make up an application name if not supplied - if (appName.IsEmpty() && wxTheApp) - { - SetAppName(wxTheApp->GetAppName()); - } - - // Make up names for files if empty - if ( m_strLocalFile.IsEmpty() && (style & wxCONFIG_USE_LOCAL_FILE) ) - { - m_strLocalFile = GetLocalFileName(GetAppName()); - } - - if ( m_strGlobalFile.IsEmpty() && (style & wxCONFIG_USE_GLOBAL_FILE) ) - { - m_strGlobalFile = GetGlobalFileName(GetAppName()); - } - - // Check if styles are not supplied, but filenames are, in which case - // add the correct styles. - if ( !m_strLocalFile.IsEmpty() ) - SetStyle(GetStyle() | wxCONFIG_USE_LOCAL_FILE); - - if ( !m_strGlobalFile.IsEmpty() ) - SetStyle(GetStyle() | wxCONFIG_USE_GLOBAL_FILE); - - // if the path is not absolute, prepend the standard directory to it - if ( !m_strLocalFile.IsEmpty() && !wxIsAbsolutePath(m_strLocalFile) ) - { - wxString strLocal = m_strLocalFile; - m_strLocalFile = GetLocalDir(); - m_strLocalFile << strLocal; - } - - if ( !m_strGlobalFile.IsEmpty() && !wxIsAbsolutePath(m_strGlobalFile) ) - { - wxString strGlobal = m_strGlobalFile; - m_strGlobalFile = GetGlobalDir(); - m_strGlobalFile << strGlobal; - } - - Init(); -} - -void wxFileConfig::CleanUp() -{ - delete m_pRootGroup; - - LineList *pCur = m_linesHead; - while ( pCur != NULL ) { - LineList *pNext = pCur->Next(); - delete pCur; - pCur = pNext; - } -} - -wxFileConfig::~wxFileConfig() -{ - Flush(); - - CleanUp(); -} - -// ---------------------------------------------------------------------------- -// parse a config file -// ---------------------------------------------------------------------------- - -void wxFileConfig::Parse(wxTextFile& file, bool bLocal) -{ - const char *pStart; - const char *pEnd; - wxString strLine; - - size_t nLineCount = file.GetLineCount(); - for ( size_t n = 0; n < nLineCount; n++ ) { - strLine = file[n]; - - // add the line to linked list - if ( bLocal ) - LineListAppend(strLine); - - // skip leading spaces - for ( pStart = strLine; isspace(*pStart); pStart++ ) - ; - - // skip blank/comment lines - if ( *pStart == '\0'|| *pStart == ';' || *pStart == '#' ) - continue; - - if ( *pStart == '[' ) { // a new group - pEnd = pStart; - - while ( *++pEnd != ']' ) { - if ( !IsValid(*pEnd) && *pEnd != ' ' ) // allow spaces in group names - break; - } - - if ( *pEnd != ']' ) { - wxLogError(_("file '%s': unexpected character %c at line %d."), - file.GetName(), *pEnd, n + 1); - continue; // skip this line - } - - // group name here is always considered as abs path - wxString strGroup; - pStart++; - strGroup << wxCONFIG_PATH_SEPARATOR << wxString(pStart, pEnd - pStart); - - // will create it if doesn't yet exist - SetPath(strGroup); - - if ( bLocal ) - m_pCurrentGroup->SetLine(m_linesTail); - - // check that there is nothing except comments left on this line - bool bCont = TRUE; - while ( *++pEnd != '\0' && bCont ) { - switch ( *pEnd ) { - case '#': - case ';': - bCont = FALSE; - break; - - case ' ': - case '\t': - // ignore whitespace ('\n' impossible here) - break; - - default: - wxLogWarning(_("file '%s', line %d: '%s' " - "ignored after group header."), - file.GetName(), n + 1, pEnd); - bCont = FALSE; - } - } - } - else { // a key - const char *pEnd = pStart; - while ( IsValid(*pEnd) ) - pEnd++; - - wxString strKey(pStart, pEnd); - - // skip whitespace - while ( isspace(*pEnd) ) - pEnd++; - - if ( *pEnd++ != '=' ) { - wxLogError(_("file '%s', line %d: '=' expected."), - file.GetName(), n + 1); - } - else { - ConfigEntry *pEntry = m_pCurrentGroup->FindEntry(strKey); - - if ( pEntry == NULL ) { - // new entry - pEntry = m_pCurrentGroup->AddEntry(strKey, n); - - if ( bLocal ) - pEntry->SetLine(m_linesTail); - } - else { - if ( bLocal && pEntry->IsImmutable() ) { - // immutable keys can't be changed by user - wxLogWarning(_("file '%s', line %d: value for " - "immutable key '%s' ignored."), - file.GetName(), n + 1, strKey.c_str()); - continue; - } - // the condition below catches the cases (a) and (b) but not (c): - // (a) global key found second time in global file - // (b) key found second (or more) time in local file - // (c) key from global file now found in local one - // which is exactly what we want. - else if ( !bLocal || pEntry->IsLocal() ) { - wxLogWarning(_("file '%s', line %d: key '%s' was first " - "found at line %d."), - file.GetName(), n + 1, strKey.c_str(), pEntry->Line()); - - if ( bLocal ) - pEntry->SetLine(m_linesTail); - } - } - - // skip whitespace - while ( isspace(*pEnd) ) - pEnd++; - - pEntry->SetValue(FilterIn(pEnd), FALSE /* read from file */); - } - } - } -} - -// ---------------------------------------------------------------------------- -// set/retrieve path -// ---------------------------------------------------------------------------- - -void wxFileConfig::SetRootPath() -{ - m_strPath.Empty(); - m_pCurrentGroup = m_pRootGroup; -} - -void wxFileConfig::SetPath(const wxString& strPath) -{ - wxArrayString aParts; - - if ( strPath.IsEmpty() ) { - SetRootPath(); - return; - } - - if ( strPath[0] == wxCONFIG_PATH_SEPARATOR ) { - // absolute path - wxSplitPath(aParts, strPath); - } - else { - // relative path, combine with current one - wxString strFullPath = m_strPath; - strFullPath << wxCONFIG_PATH_SEPARATOR << strPath; - wxSplitPath(aParts, strFullPath); - } - - // change current group - size_t n; - m_pCurrentGroup = m_pRootGroup; - for ( n = 0; n < aParts.Count(); n++ ) { - ConfigGroup *pNextGroup = m_pCurrentGroup->FindSubgroup(aParts[n]); - if ( pNextGroup == NULL ) - pNextGroup = m_pCurrentGroup->AddSubgroup(aParts[n]); - m_pCurrentGroup = pNextGroup; - } - - // recombine path parts in one variable - m_strPath.Empty(); - for ( n = 0; n < aParts.Count(); n++ ) { - m_strPath << wxCONFIG_PATH_SEPARATOR << aParts[n]; - } -} - -// ---------------------------------------------------------------------------- -// enumeration -// ---------------------------------------------------------------------------- - -bool wxFileConfig::GetFirstGroup(wxString& str, long& lIndex) const -{ - lIndex = 0; - return GetNextGroup(str, lIndex); -} - -bool wxFileConfig::GetNextGroup (wxString& str, long& lIndex) const -{ - if ( size_t(lIndex) < m_pCurrentGroup->Groups().Count() ) { - str = m_pCurrentGroup->Groups()[lIndex++]->Name(); - return TRUE; - } - else - return FALSE; -} - -bool wxFileConfig::GetFirstEntry(wxString& str, long& lIndex) const -{ - lIndex = 0; - return GetNextEntry(str, lIndex); -} - -bool wxFileConfig::GetNextEntry (wxString& str, long& lIndex) const -{ - if ( size_t(lIndex) < m_pCurrentGroup->Entries().Count() ) { - str = m_pCurrentGroup->Entries()[lIndex++]->Name(); - return TRUE; - } - else - return FALSE; -} - -size_t wxFileConfig::GetNumberOfEntries(bool bRecursive) const -{ - size_t n = m_pCurrentGroup->Entries().Count(); - if ( bRecursive ) { - ConfigGroup *pOldCurrentGroup = m_pCurrentGroup; - size_t nSubgroups = m_pCurrentGroup->Groups().Count(); - for ( size_t nGroup = 0; nGroup < nSubgroups; nGroup++ ) { - CONST_CAST m_pCurrentGroup = m_pCurrentGroup->Groups()[nGroup]; - n += GetNumberOfEntries(TRUE); - CONST_CAST m_pCurrentGroup = pOldCurrentGroup; - } - } - - return n; -} - -size_t wxFileConfig::GetNumberOfGroups(bool bRecursive) const -{ - size_t n = m_pCurrentGroup->Groups().Count(); - if ( bRecursive ) { - ConfigGroup *pOldCurrentGroup = m_pCurrentGroup; - size_t nSubgroups = m_pCurrentGroup->Groups().Count(); - for ( size_t nGroup = 0; nGroup < nSubgroups; nGroup++ ) { - CONST_CAST m_pCurrentGroup = m_pCurrentGroup->Groups()[nGroup]; - n += GetNumberOfGroups(TRUE); - CONST_CAST m_pCurrentGroup = pOldCurrentGroup; - } - } - - return n; -} - -// ---------------------------------------------------------------------------- -// tests for existence -// ---------------------------------------------------------------------------- - -bool wxFileConfig::HasGroup(const wxString& strName) const -{ - wxConfigPathChanger path(this, strName); - - ConfigGroup *pGroup = m_pCurrentGroup->FindSubgroup(path.Name()); - return pGroup != NULL; -} - -bool wxFileConfig::HasEntry(const wxString& strName) const -{ - wxConfigPathChanger path(this, strName); - - ConfigEntry *pEntry = m_pCurrentGroup->FindEntry(path.Name()); - return pEntry != NULL; -} - -// ---------------------------------------------------------------------------- -// read/write values -// ---------------------------------------------------------------------------- - -bool wxFileConfig::Read(const wxString& key, - wxString* pStr) const -{ - wxConfigPathChanger path(this, key); - - ConfigEntry *pEntry = m_pCurrentGroup->FindEntry(path.Name()); - if (pEntry == NULL) { - return FALSE; - } - else { - *pStr = ExpandEnvVars(pEntry->Value()); - return TRUE; - } -} - -bool wxFileConfig::Read(const wxString& key, - wxString* pStr, const wxString& defVal) const -{ - wxConfigPathChanger path(this, key); - - ConfigEntry *pEntry = m_pCurrentGroup->FindEntry(path.Name()); - if (pEntry == NULL) { - if( IsRecordingDefaults() ) - ((wxFileConfig *)this)->Write(key,defVal); - *pStr = ExpandEnvVars(defVal); - return FALSE; - } - else { - *pStr = ExpandEnvVars(pEntry->Value()); - return TRUE; - } -} - -bool wxFileConfig::Read(const wxString& key, long *pl) const -{ - wxString str; - if ( Read(key, & str) ) { - *pl = atol(str); - return TRUE; - } - else { - return FALSE; - } -} - -bool wxFileConfig::Write(const wxString& key, const wxString& szValue) -{ - wxConfigPathChanger path(this, key); - - wxString strName = path.Name(); - if ( strName.IsEmpty() ) { - // setting the value of a group is an error - wxASSERT_MSG( IsEmpty(szValue), _("can't set value of a group!") ); - - // ... except if it's empty in which case it's a way to force it's creation - m_pCurrentGroup->SetDirty(); - - // this will add a line for this group if it didn't have it before - (void)m_pCurrentGroup->GetGroupLine(); - } - else { - // writing an entry - - // check that the name is reasonable - if ( strName[0u] == wxCONFIG_IMMUTABLE_PREFIX ) { - wxLogError(_("Entry name can't start with '%c'."), - wxCONFIG_IMMUTABLE_PREFIX); - return FALSE; - } - - for ( const char *pc = strName; *pc != '\0'; pc++ ) { - if ( !IsValid(*pc) ) { - wxLogError(_("Character '%c' is invalid in a config entry name."), - *pc); - return FALSE; - } - } - - ConfigEntry *pEntry = m_pCurrentGroup->FindEntry(strName); - if ( pEntry == NULL ) - pEntry = m_pCurrentGroup->AddEntry(strName); - - pEntry->SetValue(szValue); - } - - return TRUE; -} - -bool wxFileConfig::Write(const wxString& key, long lValue) -{ - // ltoa() is not ANSI :-( - char szBuf[40]; // should be good for sizeof(long) <= 16 (128 bits) - sprintf(szBuf, "%ld", lValue); - return Write(key, szBuf); -} - -bool wxFileConfig::Flush(bool /* bCurrentOnly */) -{ - if ( LineListIsEmpty() || !m_pRootGroup->IsDirty() ) - return TRUE; - - wxTempFile file(m_strLocalFile); - - if ( !file.IsOpened() ) { - wxLogError(_("can't open user configuration file.")); - return FALSE; - } - - // write all strings to file - for ( LineList *p = m_linesHead; p != NULL; p = p->Next() ) { - if ( !file.Write(p->Text() + wxTextFile::GetEOL()) ) { - wxLogError(_("can't write user configuration file.")); - return FALSE; - } - } - - return file.Commit(); -} - -// ---------------------------------------------------------------------------- -// delete groups/entries -// ---------------------------------------------------------------------------- - -bool wxFileConfig::DeleteEntry(const wxString& key, bool bGroupIfEmptyAlso) -{ - wxConfigPathChanger path(this, key); - - if ( !m_pCurrentGroup->DeleteEntry(path.Name()) ) - return FALSE; - - if ( bGroupIfEmptyAlso && m_pCurrentGroup->IsEmpty() ) { - if ( m_pCurrentGroup != m_pRootGroup ) { - ConfigGroup *pGroup = m_pCurrentGroup; - SetPath(".."); // changes m_pCurrentGroup! - m_pCurrentGroup->DeleteSubgroupByName(pGroup->Name()); - } - //else: never delete the root group - } - - return TRUE; -} - -bool wxFileConfig::DeleteGroup(const wxString& key) -{ - wxConfigPathChanger path(this, key); - - return m_pCurrentGroup->DeleteSubgroupByName(path.Name()); -} - -bool wxFileConfig::DeleteAll() -{ - CleanUp(); - - const char *szFile = m_strLocalFile; - - if ( remove(szFile) == -1 ) - wxLogSysError(_("can't delete user configuration file '%s'"), szFile); - - m_strLocalFile = m_strGlobalFile = ""; - Init(); - - return TRUE; -} - -// ---------------------------------------------------------------------------- -// linked list functions -// ---------------------------------------------------------------------------- - -// append a new line to the end of the list -wxFileConfig::LineList *wxFileConfig::LineListAppend(const wxString& str) -{ - LineList *pLine = new LineList(str); - - if ( m_linesTail == NULL ) { - // list is empty - m_linesHead = pLine; - } - else { - // adjust pointers - m_linesTail->SetNext(pLine); - pLine->SetPrev(m_linesTail); - } - - m_linesTail = pLine; - return m_linesTail; -} - -// insert a new line after the given one or in the very beginning if !pLine -wxFileConfig::LineList *wxFileConfig::LineListInsert(const wxString& str, - LineList *pLine) -{ - if ( pLine == m_linesTail ) - return LineListAppend(str); - - LineList *pNewLine = new LineList(str); - if ( pLine == NULL ) { - // prepend to the list - pNewLine->SetNext(m_linesHead); - m_linesHead->SetPrev(pNewLine); - m_linesHead = pNewLine; - } - else { - // insert before pLine - LineList *pNext = pLine->Next(); - pNewLine->SetNext(pNext); - pNewLine->SetPrev(pLine); - pNext->SetPrev(pNewLine); - pLine->SetNext(pNewLine); - } - - return pNewLine; -} - -void wxFileConfig::LineListRemove(LineList *pLine) -{ - LineList *pPrev = pLine->Prev(), - *pNext = pLine->Next(); - - // first entry? - if ( pPrev == NULL ) - m_linesHead = pNext; - else - pPrev->SetNext(pNext); - - // last entry? - if ( pNext == NULL ) - m_linesTail = pPrev; - else - pNext->SetPrev(pPrev); - - delete pLine; -} - -bool wxFileConfig::LineListIsEmpty() -{ - return m_linesHead == NULL; -} - -// ============================================================================ -// wxFileConfig::ConfigGroup -// ============================================================================ - -// ---------------------------------------------------------------------------- -// ctor/dtor -// ---------------------------------------------------------------------------- - -// ctor -wxFileConfig::ConfigGroup::ConfigGroup(wxFileConfig::ConfigGroup *pParent, - const wxString& strName, - wxFileConfig *pConfig) - : m_aEntries(CompareEntries), - m_aSubgroups(CompareGroups), - m_strName(strName) -{ - m_pConfig = pConfig; - m_pParent = pParent; - m_bDirty = FALSE; - m_pLine = NULL; - - m_pLastEntry = NULL; - m_pLastGroup = NULL; -} - -// dtor deletes all children -wxFileConfig::ConfigGroup::~ConfigGroup() -{ - // entries - size_t n, nCount = m_aEntries.Count(); - for ( n = 0; n < nCount; n++ ) - delete m_aEntries[n]; - - // subgroups - nCount = m_aSubgroups.Count(); - for ( n = 0; n < nCount; n++ ) - delete m_aSubgroups[n]; -} - -// ---------------------------------------------------------------------------- -// line -// ---------------------------------------------------------------------------- - -void wxFileConfig::ConfigGroup::SetLine(LineList *pLine) -{ - wxASSERT( m_pLine == NULL ); // shouldn't be called twice - - m_pLine = pLine; -} - -/* - This is a bit complicated, so let me explain it in details. All lines that - were read from the local file (the only one we will ever modify) are stored - in a (doubly) linked list. Our problem is to know at which position in this - list should we insert the new entries/subgroups. To solve it we keep three - variables for each group: m_pLine, m_pLastEntry and m_pLastGroup. - - m_pLine points to the line containing "[group_name]" - m_pLastEntry points to the last entry of this group in the local file. - m_pLastGroup subgroup - - Initially, they're NULL all three. When the group (an entry/subgroup) is read - from the local file, the corresponding variable is set. However, if the group - was read from the global file and then modified or created by the application - these variables are still NULL and we need to create the corresponding lines. - See the following functions (and comments preceding them) for the details of - how we do it. - - Also, when our last entry/group are deleted we need to find the new last - element - the code in DeleteEntry/Subgroup does this by backtracking the list - of lines until it either founds an entry/subgroup (and this is the new last - element) or the m_pLine of the group, in which case there are no more entries - (or subgroups) left and m_pLast becomes NULL. - - NB: This last problem could be avoided for entries if we added new entries - immediately after m_pLine, but in this case the entries would appear - backwards in the config file (OTOH, it's not that important) and as we - would still need to do it for the subgroups the code wouldn't have been - significantly less complicated. - */ - -// Return the line which contains "[our name]". If we're still not in the list, -// add our line to it immediately after the last line of our parent group if we -// have it or in the very beginning if we're the root group. -wxFileConfig::LineList *wxFileConfig::ConfigGroup::GetGroupLine() -{ - if ( m_pLine == NULL ) { - ConfigGroup *pParent = Parent(); - - // this group wasn't present in local config file, add it now - if ( pParent != NULL ) { - wxString strFullName; - strFullName << "[" << GetFullName().c_str() + 1 << "]"; // +1: no '/' - m_pLine = m_pConfig->LineListInsert(strFullName, - pParent->GetLastGroupLine()); - pParent->SetLastGroup(this); // we're surely after all the others - } - else { - // we return NULL, so that LineListInsert() will insert us in the - // very beginning - } - } - - return m_pLine; -} - -// Return the last line belonging to the subgroups of this group (after which -// we can add a new subgroup), if we don't have any subgroups or entries our -// last line is the group line (m_pLine) itself. -wxFileConfig::LineList *wxFileConfig::ConfigGroup::GetLastGroupLine() -{ - // if we have any subgroups, our last line is the last line of the last - // subgroup - if ( m_pLastGroup != NULL ) { - wxFileConfig::LineList *pLine = m_pLastGroup->GetLastGroupLine(); - - wxASSERT( pLine != NULL ); // last group must have !NULL associated line - return pLine; - } - - // no subgroups, so the last line is the line of thelast entry (if any) - return GetLastEntryLine(); -} - -// return the last line belonging to the entries of this group (after which -// we can add a new entry), if we don't have any entries we will add the new -// one immediately after the group line itself. -wxFileConfig::LineList *wxFileConfig::ConfigGroup::GetLastEntryLine() -{ - if ( m_pLastEntry != NULL ) { - wxFileConfig::LineList *pLine = m_pLastEntry->GetLine(); - - wxASSERT( pLine != NULL ); // last entry must have !NULL associated line - return pLine; - } - - // no entries: insert after the group header - return GetGroupLine(); -} - -// ---------------------------------------------------------------------------- -// group name -// ---------------------------------------------------------------------------- - -wxString wxFileConfig::ConfigGroup::GetFullName() const -{ - if ( Parent() ) - return Parent()->GetFullName() + wxCONFIG_PATH_SEPARATOR + Name(); - else - return ""; -} - -// ---------------------------------------------------------------------------- -// find an item -// ---------------------------------------------------------------------------- - -// use binary search because the array is sorted -wxFileConfig::ConfigEntry * -wxFileConfig::ConfigGroup::FindEntry(const char *szName) const -{ - size_t i, - lo = 0, - hi = m_aEntries.Count(); - int res; - wxFileConfig::ConfigEntry *pEntry; - - while ( lo < hi ) { - i = (lo + hi)/2; - pEntry = m_aEntries[i]; - - #if wxCONFIG_CASE_SENSITIVE - res = strcmp(pEntry->Name(), szName); - #else - res = Stricmp(pEntry->Name(), szName); - #endif - - if ( res > 0 ) - hi = i; - else if ( res < 0 ) - lo = i + 1; - else - return pEntry; - } - - return NULL; -} - -wxFileConfig::ConfigGroup * -wxFileConfig::ConfigGroup::FindSubgroup(const char *szName) const -{ - size_t i, - lo = 0, - hi = m_aSubgroups.Count(); - int res; - wxFileConfig::ConfigGroup *pGroup; - - while ( lo < hi ) { - i = (lo + hi)/2; - pGroup = m_aSubgroups[i]; - - #if wxCONFIG_CASE_SENSITIVE - res = strcmp(pGroup->Name(), szName); - #else - res = Stricmp(pGroup->Name(), szName); - #endif - - if ( res > 0 ) - hi = i; - else if ( res < 0 ) - lo = i + 1; - else - return pGroup; - } - - return NULL; -} - -// ---------------------------------------------------------------------------- -// create a new item -// ---------------------------------------------------------------------------- - -// create a new entry and add it to the current group -wxFileConfig::ConfigEntry * -wxFileConfig::ConfigGroup::AddEntry(const wxString& strName, int nLine) -{ - wxASSERT( FindEntry(strName) == NULL ); - - ConfigEntry *pEntry = new ConfigEntry(this, strName, nLine); - m_aEntries.Add(pEntry); - - return pEntry; -} - -// create a new group and add it to the current group -wxFileConfig::ConfigGroup * -wxFileConfig::ConfigGroup::AddSubgroup(const wxString& strName) -{ - wxASSERT( FindSubgroup(strName) == NULL ); - - ConfigGroup *pGroup = new ConfigGroup(this, strName, m_pConfig); - m_aSubgroups.Add(pGroup); - - return pGroup; -} - -// ---------------------------------------------------------------------------- -// delete an item -// ---------------------------------------------------------------------------- - -/* - The delete operations are _very_ slow if we delete the last item of this - group (see comments before GetXXXLineXXX functions for more details), - so it's much better to start with the first entry/group if we want to - delete several of them. - */ - -bool wxFileConfig::ConfigGroup::DeleteSubgroupByName(const char *szName) -{ - return DeleteSubgroup(FindSubgroup(szName)); -} - -// doesn't delete the subgroup itself, but does remove references to it from -// all other data structures (and normally the returned pointer should be -// deleted a.s.a.p. because there is nothing much to be done with it anyhow) -bool wxFileConfig::ConfigGroup::DeleteSubgroup(ConfigGroup *pGroup) -{ - wxCHECK( pGroup != NULL, FALSE ); // deleting non existing group? - - // delete all entries - size_t nCount = pGroup->m_aEntries.Count(); - for ( size_t nEntry = 0; nEntry < nCount; nEntry++ ) { - LineList *pLine = pGroup->m_aEntries[nEntry]->GetLine(); - if ( pLine != NULL ) - m_pConfig->LineListRemove(pLine); - } - - // and subgroups of this sungroup - nCount = pGroup->m_aSubgroups.Count(); - for ( size_t nGroup = 0; nGroup < nCount; nGroup++ ) { - pGroup->DeleteSubgroup(pGroup->m_aSubgroups[nGroup]); - } - - LineList *pLine = pGroup->m_pLine; - if ( pLine != NULL ) { - // notice that we may do this test inside the previous "if" because the - // last entry's line is surely !NULL - if ( pGroup == m_pLastGroup ) { - // our last entry is being deleted - find the last one which stays - wxASSERT( m_pLine != NULL ); // we have a subgroup with !NULL pLine... - - // go back until we find a subgroup or reach the group's line - ConfigGroup *pNewLast = NULL; - size_t n, nSubgroups = m_aSubgroups.Count(); - LineList *pl; - for ( pl = pLine->Prev(); pl != m_pLine; pl = pl->Prev() ) { - // is it our subgroup? - for ( n = 0; (pNewLast == NULL) && (n < nSubgroups); n++ ) { - // do _not_ call GetGroupLine! we don't want to add it to the local - // file if it's not already there - if ( m_aSubgroups[n]->m_pLine == m_pLine ) - pNewLast = m_aSubgroups[n]; - } - - if ( pNewLast != NULL ) // found? - break; - } - - if ( pl == m_pLine ) { - wxASSERT( !pNewLast ); // how comes it has the same line as we? - - // we've reached the group line without finding any subgroups - m_pLastGroup = NULL; - } - else - m_pLastGroup = pNewLast; - } - - m_pConfig->LineListRemove(pLine); - } - - SetDirty(); - - m_aSubgroups.Remove(pGroup); - delete pGroup; - - return TRUE; -} - -bool wxFileConfig::ConfigGroup::DeleteEntry(const char *szName) -{ - ConfigEntry *pEntry = FindEntry(szName); - wxCHECK( pEntry != NULL, FALSE ); // deleting non existing item? - - LineList *pLine = pEntry->GetLine(); - if ( pLine != NULL ) { - // notice that we may do this test inside the previous "if" because the - // last entry's line is surely !NULL - if ( pEntry == m_pLastEntry ) { - // our last entry is being deleted - find the last one which stays - wxASSERT( m_pLine != NULL ); // if we have an entry with !NULL pLine... - - // go back until we find another entry or reach the group's line - ConfigEntry *pNewLast = NULL; - size_t n, nEntries = m_aEntries.Count(); - LineList *pl; - for ( pl = pLine->Prev(); pl != m_pLine; pl = pl->Prev() ) { - // is it our subgroup? - for ( n = 0; (pNewLast == NULL) && (n < nEntries); n++ ) { - if ( m_aEntries[n]->GetLine() == m_pLine ) - pNewLast = m_aEntries[n]; - } - - if ( pNewLast != NULL ) // found? - break; - } - - if ( pl == m_pLine ) { - wxASSERT( !pNewLast ); // how comes it has the same line as we? - - // we've reached the group line without finding any subgroups - m_pLastEntry = NULL; - } - else - m_pLastEntry = pNewLast; - } - - m_pConfig->LineListRemove(pLine); - } - - // we must be written back for the changes to be saved - SetDirty(); - - m_aEntries.Remove(pEntry); - delete pEntry; - - return TRUE; -} - -// ---------------------------------------------------------------------------- -// -// ---------------------------------------------------------------------------- -void wxFileConfig::ConfigGroup::SetDirty() -{ - m_bDirty = TRUE; - if ( Parent() != NULL ) // propagate upwards - Parent()->SetDirty(); -} - -// ============================================================================ -// wxFileConfig::ConfigEntry -// ============================================================================ - -// ---------------------------------------------------------------------------- -// ctor -// ---------------------------------------------------------------------------- -wxFileConfig::ConfigEntry::ConfigEntry(wxFileConfig::ConfigGroup *pParent, - const wxString& strName, - int nLine) - : m_strName(strName) -{ - wxASSERT( !strName.IsEmpty() ); - - m_pParent = pParent; - m_nLine = nLine; - m_pLine = NULL; - - m_bDirty = FALSE; - - m_bImmutable = strName[0] == wxCONFIG_IMMUTABLE_PREFIX; - if ( m_bImmutable ) - m_strName.erase(0, 1); // remove first character -} - -// ---------------------------------------------------------------------------- -// set value -// ---------------------------------------------------------------------------- - -void wxFileConfig::ConfigEntry::SetLine(LineList *pLine) -{ - if ( m_pLine != NULL ) { - wxLogWarning(_("entry '%s' appears more than once in group '%s'"), - Name().c_str(), m_pParent->GetFullName().c_str()); - } - - m_pLine = pLine; - Group()->SetLastEntry(this); -} - -// second parameter is FALSE if we read the value from file and prevents the -// entry from being marked as 'dirty' -void wxFileConfig::ConfigEntry::SetValue(const wxString& strValue, bool bUser) -{ - if ( bUser && IsImmutable() ) { - wxLogWarning(_("attempt to change immutable key '%s' ignored."), - Name().c_str()); - return; - } - - // do nothing if it's the same value - if ( strValue == m_strValue ) - return; - - m_strValue = strValue; - - if ( bUser ) { - wxString strVal = FilterOut(strValue); - wxString strLine; - strLine << m_strName << " = " << strVal; - - if ( m_pLine != NULL ) { - // entry was read from the local config file, just modify the line - m_pLine->SetText(strLine); - } - else { - // add a new line to the file - wxASSERT( m_nLine == NOT_FOUND ); // consistency check - - m_pLine = Group()->Config()->LineListInsert(strLine, - Group()->GetLastEntryLine()); - Group()->SetLastEntry(this); - } - - SetDirty(); - } -} - -void wxFileConfig::ConfigEntry::SetDirty() -{ - m_bDirty = TRUE; - Group()->SetDirty(); -} - -// ============================================================================ -// global functions -// ============================================================================ - -// ---------------------------------------------------------------------------- -// compare functions for array sorting -// ---------------------------------------------------------------------------- - -int CompareEntries(wxFileConfig::ConfigEntry *p1, - wxFileConfig::ConfigEntry *p2) -{ - #if wxCONFIG_CASE_SENSITIVE - return strcmp(p1->Name(), p2->Name()); - #else - return Stricmp(p1->Name(), p2->Name()); - #endif -} - -int CompareGroups(wxFileConfig::ConfigGroup *p1, - wxFileConfig::ConfigGroup *p2) -{ - #if wxCONFIG_CASE_SENSITIVE - return strcmp(p1->Name(), p2->Name()); - #else - return Stricmp(p1->Name(), p2->Name()); - #endif -} - -// ---------------------------------------------------------------------------- -// filter functions -// ---------------------------------------------------------------------------- - -// undo FilterOut -wxString FilterIn(const wxString& str) -{ - wxString strResult; - strResult.Alloc(str.Len()); - - bool bQuoted = !str.IsEmpty() && str[0] == '"'; - - for ( size_t n = bQuoted ? 1 : 0; n < str.Len(); n++ ) { - if ( str[n] == '\\' ) { - switch ( str[++n] ) { - case 'n': - strResult += '\n'; - break; - - case 'r': - strResult += '\r'; - break; - - case 't': - strResult += '\t'; - break; - - case '\\': - strResult += '\\'; - break; - - case '"': - strResult += '"'; - break; - } - } - else { - if ( str[n] != '"' || !bQuoted ) - strResult += str[n]; - else if ( n != str.Len() - 1 ) { - wxLogWarning(_("unexpected \" at position %d in '%s'."), - n, str.c_str()); - } - //else: it's the last quote of a quoted string, ok - } - } - - return strResult; -} - -// quote the string before writing it to file -wxString FilterOut(const wxString& str) -{ - if(str.IsEmpty()) - return str; - - wxString strResult; - strResult.Alloc(str.Len()); - - // quoting is necessary to preserve spaces in the beginning of the string - bool bQuote = isspace(str[0]) || str[0] == '"'; - - if ( bQuote ) - strResult += '"'; - - char c; - for ( size_t n = 0; n < str.Len(); n++ ) { - switch ( str[n] ) { - case '\n': - c = 'n'; - break; - - case '\r': - c = 'r'; - break; - - case '\t': - c = 't'; - break; - - case '\\': - c = '\\'; - break; - - case '"': - if ( bQuote ) { - c = '"'; - break; - } - //else: fall through - - default: - strResult += str[n]; - continue; // nothing special to do - } - - // we get here only for special characters - strResult << '\\' << c; - } - - if ( bQuote ) - strResult += '"'; - - return strResult; -} diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp deleted file mode 100644 index d0a65e01ec..0000000000 --- a/src/common/filefn.cpp +++ /dev/null @@ -1,1373 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: filefn.cpp -// Purpose: File- and directory-related functions -// Author: Julian Smart -// Modified by: -// Created: 29/01/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "filefn.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" -#include "wx/defs.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#endif - -#include "wx/utils.h" -#include - -#include -#include -#include -#include -#if !defined(__WATCOMC__) -#if !(defined(_MSC_VER) && (_MSC_VER > 800)) -#include -#endif -#endif -#include -#include -#include - -#ifdef __UNIX__ -#include -#include -#endif - -#ifdef __WINDOWS__ -#ifndef __GNUWIN32__ -#include -#include -#endif -#endif - -#ifdef __GNUWIN32__ -#include -// #include - -#ifndef __MINGW32__ -#include -#endif - -#define stricmp strcasecmp -#endif - -#ifdef __BORLANDC__ // Please someone tell me which version of Borland needs - // this (3.1 I believe) and how to test for it. - // If this works for Borland 4.0 as well, then no worries. -#include -#endif - -#ifdef __WINDOWS__ -#include "windows.h" -#endif - -#define _MAXPATHLEN 500 - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxPathList, wxStringList) -#endif - -extern char *wxBuffer; - -void wxPathList::Add (const wxString& path) -{ - wxStringList::Add ((char *)(const char *)path); -} - -// Add paths e.g. from the PATH environment variable -void wxPathList::AddEnvList (const wxString& envVariable) -{ - static const char PATH_TOKS[] = -#ifdef __WINDOWS__ - " ;"; // Don't seperate with colon in DOS (used for drive) -#else - " :;"; -#endif - - char *val = getenv (WXSTRINGCAST envVariable); - if (val && *val) - { - char *s = copystring (val); - char *token = strtok (s, PATH_TOKS); - - if (token) - { - Add (copystring (token)); - while (token) - { - if ((token = strtok ((char *) NULL, PATH_TOKS)) != NULL) - Add (wxString(token)); - } - } - delete[]s; - } -} - -// Given a full filename (with path), ensure that that file can -// be accessed again USING FILENAME ONLY by adding the path -// to the list if not already there. -void wxPathList::EnsureFileAccessible (const wxString& path) -{ - wxString path1(path); - char *path_only = wxPathOnly (WXSTRINGCAST path1); - if (path_only) - { - if (!Member (wxString(path_only))) - Add (wxString(path_only)); - } -} - -bool wxPathList::Member (const wxString& path) -{ - for (wxNode * node = First (); node != NULL; node = node->Next ()) - { - wxString path2((char *) node->Data ()); - if ( -#if defined(__WINDOWS__) || defined(__VMS__) - // Case INDEPENDENT - path.CompareTo (path2, wxString::ignoreCase) == 0 -#else - // Case sensitive File System - path.CompareTo (path2) == 0 -#endif - ) - return TRUE; - } - return FALSE; -} - -wxString wxPathList::FindValidPath (const wxString& file) -{ - if (wxFileExists (wxExpandPath(wxBuffer, file))) - return wxString(wxBuffer); - - char buf[_MAXPATHLEN]; - strcpy(buf, wxBuffer); - - char *filename = IsAbsolutePath (buf) ? wxFileNameFromPath (buf) : (char *)buf; - - for (wxNode * node = First (); node; node = node->Next ()) - { - char *path = (char *) node->Data (); - strcpy (wxBuffer, path); - char ch = wxBuffer[strlen(wxBuffer)-1]; - if (ch != '\\' && ch != '/') - strcat (wxBuffer, "/"); - strcat (wxBuffer, filename); -#ifdef __WINDOWS__ - Unix2DosFilename (wxBuffer); -#endif - if (wxFileExists (wxBuffer)) - { - return wxString(wxBuffer); // Found! - } - } // for() - - return wxString(""); // Not found -} - -wxString wxPathList::FindAbsoluteValidPath (const wxString& file) -{ - wxString f = FindValidPath(file); - if (wxIsAbsolutePath(f)) - return f; - else - { - char buf[500]; - wxGetWorkingDirectory(buf, 499); - int len = (int)strlen(buf); - char lastCh = 0; - if (len > 0) - lastCh = buf[len-1]; - if (lastCh != '/' && lastCh != '\\') - { -#ifdef __WINDOWS__ - strcat(buf, "\\"); -#else - strcat(buf, "/"); -#endif - } - strcat(buf, (const char *)f); - strcpy(wxBuffer, buf); - return wxString(wxBuffer); - } -} - -bool -wxFileExists (const wxString& filename) -{ - struct stat stbuf; - - if (filename && stat ((char *)(const char *)filename, &stbuf) == 0) - return TRUE; - return FALSE; -} - -/* Vadim's alternative implementation - -// does the file exist? -bool wxFileExists(const char *pszFileName) -{ - struct stat st; - return !access(pszFileName, 0) && - !stat(pszFileName, &st) && - (st.st_mode & S_IFREG); -} -*/ - -bool -wxIsAbsolutePath (const wxString& filename) -{ - if (filename != "") - { - if (filename[0] == '/' -#ifdef __VMS__ - || (filename[0] == '[' && filename[1] != '.') -#endif -#ifdef __WINDOWS__ - /* MSDOS */ - || filename[0] == '\\' || (isalpha (filename[0]) && filename[1] == ':') -#endif - ) - return TRUE; - } - return FALSE; -} - -/* - * Strip off any extension (dot something) from end of file, - * IF one exists. Inserts zero into buffer. - * - */ - -void wxStripExtension(char *buffer) -{ - int len = strlen(buffer); - int i = len-1; - while (i > 0) - { - if (buffer[i] == '.') - { - buffer[i] = 0; - break; - } - i --; - } -} - -void wxStripExtension(wxString& buffer) -{ - size_t len = buffer.Length(); - size_t i = len-1; - while (i > 0) - { - if (buffer.GetChar(i) == '.') - { - buffer = buffer.Left(i); - break; - } - i --; - } -} - -// Destructive removal of /./ and /../ stuff -char *wxRealPath (char *path) -{ -#ifdef __WXMSW__ - static const char SEP = '\\'; - Unix2DosFilename(path); -#else - static const char SEP = '/'; -#endif - if (path[0] && path[1]) { - /* MATTHEW: special case "/./x" */ - char *p; - if (path[2] == SEP && path[1] == '.') - p = &path[0]; - else - p = &path[2]; - for (; *p; p++) - { - if (*p == SEP) - { - if (p[1] == '.' && p[2] == '.' && (p[3] == SEP || p[3] == '\0')) - { - char *q; - for (q = p - 1; q >= path && *q != SEP; q--); - if (q[0] == SEP && (q[1] != '.' || q[2] != '.' || q[3] != SEP) - && (q - 1 <= path || q[-1] != SEP)) - { - strcpy (q, p + 3); - if (path[0] == '\0') - { - path[0] = SEP; - path[1] = '\0'; - } -#ifdef __WXMSW__ - /* Check that path[2] is NULL! */ - else if (path[1] == ':' && !path[2]) - { - path[2] = SEP; - path[3] = '\0'; - } -#endif - p = q - 1; - } - } - else if (p[1] == '.' && (p[2] == SEP || p[2] == '\0')) - strcpy (p, p + 2); - } - } - } - return path; -} - -// Must be destroyed -char *wxCopyAbsolutePath(const wxString& filename) -{ - if (filename == "") - return (char *) NULL; - - if (! IsAbsolutePath(wxExpandPath(wxBuffer, filename))) { - char buf[_MAXPATHLEN]; - buf[0] = '\0'; - wxGetWorkingDirectory(buf, sizeof(buf)/sizeof(char)); - char ch = buf[strlen(buf) - 1]; -#ifdef __WXMSW__ - if (ch != '\\' && ch != '/') - strcat(buf, "\\"); -#else - if (ch != '/') - strcat(buf, "/"); -#endif - strcat(buf, wxBuffer); - return copystring( wxRealPath(buf) ); - } - return copystring( wxBuffer ); -} - -/*- - Handles: - ~/ => home dir - ~user/ => user's home dir - If the environment variable a = "foo" and b = "bar" then: - Unix: - $a => foo - $a$b => foobar - $a.c => foo.c - xxx$a => xxxfoo - ${a}! => foo! - $(b)! => bar! - \$a => \$a - MSDOS: - $a ==> $a - $(a) ==> foo - $(a)$b ==> foo$b - $(a)$(b)==> foobar - test.$$ ==> test.$$ - */ - -/* input name in name, pathname output to buf. */ - -char *wxExpandPath(char *buf, const char *name) -{ - register char *d, *s, *nm; - char lnm[_MAXPATHLEN]; - int q; - - // Some compilers don't like this line. -// const char trimchars[] = "\n \t"; - - char trimchars[4]; - trimchars[0] = '\n'; - trimchars[1] = ' '; - trimchars[2] = '\t'; - trimchars[3] = 0; - -#ifdef __WXMSW__ - const char SEP = '\\'; -#else - const char SEP = '/'; -#endif - buf[0] = '\0'; - if (name == NULL || *name == '\0') - return buf; - nm = copystring(name); // Make a scratch copy - char *nm_tmp = nm; - - /* Skip leading whitespace and cr */ - while (strchr((char *)trimchars, *nm) != NULL) - nm++; - /* And strip off trailing whitespace and cr */ - s = nm + (q = strlen(nm)) - 1; - while (q-- && strchr((char *)trimchars, *s) != NULL) - *s = '\0'; - - s = nm; - d = lnm; -#ifdef __WXMSW__ - q = FALSE; -#else - q = nm[0] == '\\' && nm[1] == '~'; -#endif - - /* Expand inline environment variables */ - while ((*d++ = *s)) { -#ifndef __WXMSW__ - if (*s == '\\') { - if ((*(d - 1) = *++s)) { - s++; - continue; - } else - break; - } else -#endif -#ifdef __WXMSW__ - if (*s++ == '$' && (*s == '{' || *s == ')')) -#else - if (*s++ == '$') -#endif - { - register char *start = d; - register int braces = (*s == '{' || *s == '('); - register char *value; - while ((*d++ = *s)) - if (braces ? (*s == '}' || *s == ')') : !(isalnum(*s) || *s == '_') ) - break; - else - s++; - *--d = 0; - value = getenv(braces ? start + 1 : start); - if (value) { - for ((d = start - 1); (*d++ = *value++);); - d--; - if (braces && *s) - s++; - } - } - } - - /* Expand ~ and ~user */ - nm = lnm; - s = ""; - if (nm[0] == '~' && !q) - { - /* prefix ~ */ - if (nm[1] == SEP || nm[1] == 0) - { /* ~/filename */ - if ((s = wxGetUserHome("")) != NULL) { - if (*++nm) - nm++; - } - } else - { /* ~user/filename */ - register char *nnm; - register char *home; - for (s = nm; *s && *s != SEP; s++); - int was_sep; /* MATTHEW: Was there a separator, or NULL? */ - was_sep = (*s == SEP); - nnm = *s ? s + 1 : s; - *s = 0; - if ((home = wxGetUserHome(wxString(nm + 1))) == NULL) { - if (was_sep) /* replace only if it was there: */ - *s = SEP; - s = ""; - } else { - nm = nnm; - s = home; - } - } - } - - d = buf; - if (s && *s) { /* MATTHEW: s could be NULL if user '~' didn't exist */ - /* Copy home dir */ - while ('\0' != (*d++ = *s++)) - /* loop */; - // Handle root home - if (d - 1 > buf && *(d - 2) != SEP) - *(d - 1) = SEP; - } - s = nm; - while ((*d++ = *s++)); - - delete[] nm_tmp; // clean up alloc - /* Now clean up the buffer */ - return wxRealPath(buf); -} - - -/* Contract Paths to be build upon an environment variable - component: - - example: "/usr/openwin/lib", OPENWINHOME --> ${OPENWINHOME}/lib - - The call wxExpandPath can convert these back! - */ -char * -wxContractPath (const wxString& filename, const wxString& envname, const wxString& user) -{ - static char dest[_MAXPATHLEN]; - - if (filename == "") - return (char *) NULL; - - strcpy (dest, WXSTRINGCAST filename); -#ifdef __WXMSW__ - Unix2DosFilename(dest); -#endif - - // Handle environment - char *val = (char *) NULL; - char *tcp = (char *) NULL; - if (envname != WXSTRINGCAST NULL && (val = getenv (WXSTRINGCAST envname)) != NULL && - (tcp = strstr (dest, val)) != NULL) - { - strcpy (wxBuffer, tcp + strlen (val)); - *tcp++ = '$'; - *tcp++ = '{'; - strcpy (tcp, WXSTRINGCAST envname); - strcat (tcp, "}"); - strcat (tcp, wxBuffer); - } - - // Handle User's home (ignore root homes!) - size_t len = 0; - if ((val = wxGetUserHome (user)) != NULL && - (len = strlen(val)) > 2 && - strncmp(dest, val, len) == 0) - { - strcpy(wxBuffer, "~"); - if (user && *user) - strcat(wxBuffer, user); -#ifdef __WXMSW__ -// strcat(wxBuffer, "\\"); -#else -// strcat(wxBuffer, "/"); -#endif - strcat(wxBuffer, dest + len); - strcpy (dest, wxBuffer); - } - - return dest; -} - -// Return just the filename, not the path -// (basename) -char *wxFileNameFromPath (char *path) -{ - if (path) - { - register char *tcp; - - tcp = path + strlen (path); - while (--tcp >= path) - { - if (*tcp == '/' || *tcp == '\\' -#ifdef __VMS__ - || *tcp == ':' || *tcp == ']') -#else - ) -#endif - return tcp + 1; - } /* while */ -#ifdef __WXMSW__ - if (isalpha (*path) && *(path + 1) == ':') - return path + 2; -#endif - } - return path; -} - -wxString wxFileNameFromPath (const wxString& path1) -{ - if (path1 != "") - { - - char *path = WXSTRINGCAST path1 ; - register char *tcp; - - tcp = path + strlen (path); - while (--tcp >= path) - { - if (*tcp == '/' || *tcp == '\\' -#ifdef __VMS__ - || *tcp == ':' || *tcp == ']') -#else - ) -#endif - return wxString(tcp + 1); - } /* while */ -#ifdef __WXMSW__ - if (isalpha (*path) && *(path + 1) == ':') - return wxString(path + 2); -#endif - } - return wxString(""); -} - -// Return just the directory, or NULL if no directory -char * -wxPathOnly (char *path) -{ - if (path && *path) - { - static char buf[_MAXPATHLEN]; - - // Local copy - strcpy (buf, path); - - int l = strlen(path); - bool done = FALSE; - - int i = l - 1; - - // Search backward for a backward or forward slash - while (!done && i > -1) - { - // ] is for VMS - if (path[i] == '/' || path[i] == '\\' || path[i] == ']') - { - done = TRUE; -#ifdef __VMS__ - buf[i+1] = 0; -#else - buf[i] = 0; -#endif - - return buf; - } - else i --; - } - -#ifdef __WXMSW__ - // Try Drive specifier - if (isalpha (buf[0]) && buf[1] == ':') - { - // A:junk --> A:. (since A:.\junk Not A:\junk) - buf[2] = '.'; - buf[3] = '\0'; - return buf; - } -#endif - } - - return (char *) NULL; -} - -// Return just the directory, or NULL if no directory -wxString wxPathOnly (const wxString& path) -{ - if (path != "") - { - char buf[_MAXPATHLEN]; - - // Local copy - strcpy (buf, WXSTRINGCAST path); - - int l = path.Length(); - bool done = FALSE; - - int i = l - 1; - - // Search backward for a backward or forward slash - while (!done && i > -1) - { - // ] is for VMS - if (path[i] == '/' || path[i] == '\\' || path[i] == ']') - { - done = TRUE; -#ifdef __VMS__ - buf[i+1] = 0; -#else - buf[i] = 0; -#endif - - return wxString(buf); - } - else i --; - } - -#ifdef __WXMSW__ - // Try Drive specifier - if (isalpha (buf[0]) && buf[1] == ':') - { - // A:junk --> A:. (since A:.\junk Not A:\junk) - buf[2] = '.'; - buf[3] = '\0'; - return wxString(buf); - } -#endif - } - - return wxString(""); -} - -// Utility for converting delimiters in DOS filenames to UNIX style -// and back again - or we get nasty problems with delimiters. -// Also, convert to lower case, since case is significant in UNIX. - -void -wxDos2UnixFilename (char *s) -{ - if (s) - while (*s) - { - if (*s == '\\') - *s = '/'; -#ifdef __WXMSW__ - else - *s = wxToLower (*s); // Case INDEPENDENT -#endif - s++; - } -} - -void -#ifdef __WXMSW__ -wxUnix2DosFilename (char *s) -#else -wxUnix2DosFilename (char *WXUNUSED(s)) -#endif -{ -// Yes, I really mean this to happen under DOS only! JACS -#ifdef __WXMSW__ - if (s) - while (*s) - { - if (*s == '/') - *s = '\\'; - s++; - } -#endif -} - -// Concatenate two files to form third -bool -wxConcatFiles (const wxString& file1, const wxString& file2, const wxString& file3) -{ - char *outfile = wxGetTempFileName("cat"); - - FILE *fp1 = (FILE *) NULL; - FILE *fp2 = (FILE *) NULL; - FILE *fp3 = (FILE *) NULL; - // Open the inputs and outputs - if ((fp1 = fopen (WXSTRINGCAST file1, "rb")) == NULL || - (fp2 = fopen (WXSTRINGCAST file2, "rb")) == NULL || - (fp3 = fopen (outfile, "wb")) == NULL) - { - if (fp1) - fclose (fp1); - if (fp2) - fclose (fp2); - if (fp3) - fclose (fp3); - return FALSE; - } - - int ch; - while ((ch = getc (fp1)) != EOF) - (void) putc (ch, fp3); - fclose (fp1); - - while ((ch = getc (fp2)) != EOF) - (void) putc (ch, fp3); - fclose (fp2); - - fclose (fp3); - bool result = wxRenameFile(outfile, file3); - delete[] outfile; - return result; -} - -// Copy files -bool -wxCopyFile (const wxString& file1, const wxString& file2) -{ - FILE *fd1; - FILE *fd2; - int ch; - - if ((fd1 = fopen (WXSTRINGCAST file1, "rb")) == NULL) - return FALSE; - if ((fd2 = fopen (WXSTRINGCAST file2, "wb")) == NULL) - { - fclose (fd1); - return FALSE; - } - - while ((ch = getc (fd1)) != EOF) - (void) putc (ch, fd2); - - fclose (fd1); - fclose (fd2); - return TRUE; -} - -bool -wxRenameFile (const wxString& file1, const wxString& file2) -{ - // Normal system call - if (0 == rename (WXSTRINGCAST file1, WXSTRINGCAST file2)) - return TRUE; - // Try to copy - if (wxCopyFile(file1, file2)) { - wxRemoveFile(file1); - return TRUE; - } - // Give up - return FALSE; -} - -bool wxRemoveFile(const wxString& file) -{ -#if defined(_MSC_VER) || defined(__BORLANDC__) - int flag = remove(WXSTRINGCAST file); -#else - int flag = unlink(WXSTRINGCAST file); -#endif - return (flag == 0) ; -} - -bool wxMkdir(const wxString& dir) -{ -#if defined(__WXSTUBS__) - return FALSE; -#elif defined(__VMS__) - return FALSE; -#elif (defined(__GNUWIN32__) && !defined(__MINGW32__)) || !defined(__WXMSW__) - return (mkdir (WXSTRINGCAST dir, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) == 0); -#else - return (mkdir(WXSTRINGCAST dir) == 0); -#endif -} - -bool wxRmdir(const wxString& dir, int WXUNUSED(flags)) -{ -#ifdef __VMS__ - return FALSE; -#else - return (rmdir(WXSTRINGCAST dir) == 0); -#endif -} - -#if 0 -bool wxDirExists(const wxString& dir) -{ -#ifdef __VMS__ - return FALSE; -#elif !defined(__WXMSW__) - struct stat sbuf; - return (stat(dir, &sbuf) != -1) && S_ISDIR(sbuf.st_mode) ? TRUE : FALSE; -#else - - /* MATTHEW: [6] Always use same code for Win32, call FindClose */ -#if defined(__WIN32__) - WIN32_FIND_DATA fileInfo; -#else -#ifdef __BORLANDC__ - struct ffblk fileInfo; -#else - struct find_t fileInfo; -#endif -#endif - -#if defined(__WIN32__) - HANDLE h = FindFirstFile((LPTSTR) WXSTRINGCAST dir,(LPWIN32_FIND_DATA)&fileInfo); - - if (h==INVALID_HANDLE_VALUE) - return FALSE; - else { - FindClose(h); - return ((fileInfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY); - } -#else - // In Borland findfirst has a different argument - // ordering from _dos_findfirst. But _dos_findfirst - // _should_ be ok in both MS and Borland... why not? -#ifdef __BORLANDC__ - return ((findfirst(WXSTRINGCAST dir, &fileInfo, _A_SUBDIR) == 0 && (fileInfo.ff_attrib & _A_SUBDIR) != 0)); -#else - return (((_dos_findfirst(WXSTRINGCAST dir, _A_SUBDIR, &fileInfo) == 0) && (fileInfo.attrib & _A_SUBDIR)) != 0); -#endif -#endif - -#endif -} - -#endif - -// does the path exists? (may have or not '/' or '\\' at the end) -bool wxPathExists(const char *pszPathName) -{ - // Windows API returns -1 from stat for "c:\dir\" if "c:\dir" exists - // OTOH, we should change "d:" to "d:\" and leave "\" as is. - wxString strPath(pszPathName); - if ( wxEndsWithPathSeparator(pszPathName) && pszPathName[1] != '\0' ) - strPath.Last() = '\0'; - - struct stat st; - return stat(strPath, &st) == 0 && (st.st_mode & S_IFDIR); -} - -// Get a temporary filename, opening and closing the file. -char *wxGetTempFileName(const wxString& prefix, char *buf) -{ -#ifdef __WINDOWS__ - -#ifndef __WIN32__ - char tmp[144]; - ::GetTempFileName(0, WXSTRINGCAST prefix, 0, tmp); -#else - char tmp[MAX_PATH]; - char tmpPath[MAX_PATH]; - ::GetTempPath(MAX_PATH, tmpPath); - ::GetTempFileName(tmpPath, WXSTRINGCAST prefix, 0, tmp); -#endif - if (buf) strcpy(buf, tmp); - else buf = copystring(tmp); - return buf; - -#else - static short last_temp = 0; // cache last to speed things a bit - // At most 1000 temp files to a process! We use a ring count. - char tmp[100]; - - for (short suffix = last_temp + 1; suffix != last_temp; ++suffix %= 1000) - { - sprintf (tmp, "/tmp/%s%d.%03x", WXSTRINGCAST prefix, (int) getpid (), (int) suffix); - if (!wxFileExists( tmp )) - { - // Touch the file to create it (reserve name) - FILE *fd = fopen (tmp, "w"); - if (fd) - fclose (fd); - last_temp = suffix; - if (buf) - strcpy( buf, tmp); - else - buf = copystring( tmp ); - return buf; - } - } - cerr << _("wxWindows: error finding temporary file name.\n"); - if (buf) buf[0] = 0; - return (char *) NULL; -#endif -} - -// Get first file name matching given wild card. - -#ifdef __UNIX__ - -// Get first file name matching given wild card. -// Flags are reserved for future use. - -#ifndef __VMS__ -static DIR *wxDirStream = (DIR *) NULL; -static char *wxFileSpec = (char *) NULL; -static int wxFindFileFlags = 0; -#endif - -char *wxFindFirstFile(const char *spec, int flags) -{ -#ifndef __VMS__ - if (wxDirStream) - closedir(wxDirStream); // edz 941103: better housekeping - - wxFindFileFlags = flags; - - if (wxFileSpec) - delete[] wxFileSpec; - wxFileSpec = copystring(spec); - - // Find path only so we can concatenate - // found file onto path - char *p = wxPathOnly(wxFileSpec); - - /* MATTHEW: special case: path is really "/" */ - if (p && !*p && *wxFileSpec == '/') - p = "/"; - /* MATTHEW: p is NULL => Local directory */ - if (!p) - p = "."; - - if ((wxDirStream=opendir(p))==NULL) - return (char *) NULL; - - /* MATTHEW: [5] wxFindNextFile can do the rest of the work */ - return wxFindNextFile(); -#endif - // ifndef __VMS__ - return (char *) NULL; -} - -char *wxFindNextFile(void) -{ -#ifndef __VMS__ - static char buf[400]; - - /* MATTHEW: [2] Don't crash if we read too many times */ - if (!wxDirStream) - return (char *) NULL; - - // Find path only so we can concatenate - // found file onto path - char *p = wxPathOnly(wxFileSpec); - char *n = wxFileNameFromPath(wxFileSpec); - - /* MATTHEW: special case: path is really "/" */ - if (p && !*p && *wxFileSpec == '/') - p = "/"; - - // Do the reading - struct dirent *nextDir; - for (nextDir = readdir(wxDirStream); nextDir != NULL; nextDir = readdir(wxDirStream)) - { - - /* MATTHEW: [5] Only return "." and ".." when they match, and only return - directories when flags & wxDIR */ - if (wxMatchWild(n, nextDir->d_name)) { - bool isdir; - - buf[0] = 0; - if (p && *p) { - strcpy(buf, p); - if (strcmp(p, "/") != 0) - strcat(buf, "/"); - } - strcat(buf, nextDir->d_name); - - if ((strcmp(nextDir->d_name, ".") == 0) || - (strcmp(nextDir->d_name, "..") == 0)) { - if (wxFindFileFlags && !(wxFindFileFlags & wxDIR)) - continue; - isdir = TRUE; - } else - isdir = wxDirExists(buf); - - if (!wxFindFileFlags - || ((wxFindFileFlags & wxDIR) && isdir) - || ((wxFindFileFlags & wxFILE) && !isdir)) - return buf; - } - } - closedir(wxDirStream); - wxDirStream = (DIR *) NULL; -#endif - // ifndef __VMS__ - - return (char *) NULL; -} - -#elif defined(__WXMSW__) - -#ifdef __WIN32__ -HANDLE wxFileStrucHandle = INVALID_HANDLE_VALUE; -WIN32_FIND_DATA wxFileStruc; -#else -#ifdef __BORLANDC__ -static struct ffblk wxFileStruc; -#else -static struct _find_t wxFileStruc; -#endif -#endif -static wxString wxFileSpec = ""; -static int wxFindFileFlags; - -char *wxFindFirstFile(const char *spec, int flags) -{ - wxFileSpec = spec; - wxFindFileFlags = flags; /* MATTHEW: [5] Remember flags */ - - // Find path only so we can concatenate - // found file onto path - wxString path1(wxFileSpec); - char *p = wxPathOnly(WXSTRINGCAST path1); - if (p && (strlen(p) > 0)) - strcpy(wxBuffer, p); - else - wxBuffer[0] = 0; - -#ifdef __WIN32__ - if (wxFileStrucHandle != INVALID_HANDLE_VALUE) - FindClose(wxFileStrucHandle); - - wxFileStrucHandle = ::FindFirstFile(WXSTRINGCAST spec, &wxFileStruc); - - if (wxFileStrucHandle == INVALID_HANDLE_VALUE) - return NULL; - - bool isdir = !!(wxFileStruc.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); - - if (isdir && !(flags & wxDIR)) - return wxFindNextFile(); - else if (!isdir && flags && !(flags & wxFILE)) - return wxFindNextFile(); - - if (wxBuffer[0] != 0) - strcat(wxBuffer, "\\"); - strcat(wxBuffer, wxFileStruc.cFileName); - return wxBuffer; -#else - - int flag = _A_NORMAL; - if (flags & wxDIR) /* MATTHEW: [5] Use & */ - flag = _A_SUBDIR; - -#ifdef __BORLANDC__ - if (findfirst(WXSTRINGCAST spec, &wxFileStruc, flag) == 0) -#else - if (_dos_findfirst(WXSTRINGCAST spec, flag, &wxFileStruc) == 0) -#endif - { - /* MATTHEW: [5] Check directory flag */ - char attrib; - -#ifdef __BORLANDC__ - attrib = wxFileStruc.ff_attrib; -#else - attrib = wxFileStruc.attrib; -#endif - - if (attrib & _A_SUBDIR) { - if (!(wxFindFileFlags & wxDIR)) - return wxFindNextFile(); - } else if (wxFindFileFlags && !(wxFindFileFlags & wxFILE)) - return wxFindNextFile(); - - if (wxBuffer[0] != 0) - strcat(wxBuffer, "\\"); - -#ifdef __BORLANDC__ - strcat(wxBuffer, wxFileStruc.ff_name); -#else - strcat(wxBuffer, wxFileStruc.name); -#endif - return wxBuffer; - } - else - return NULL; -#endif // __WIN32__ -} - -char *wxFindNextFile(void) -{ - // Find path only so we can concatenate - // found file onto path - wxString p2(wxFileSpec); - char *p = wxPathOnly(WXSTRINGCAST p2); - if (p && (strlen(p) > 0)) - strcpy(wxBuffer, p); - else - wxBuffer[0] = 0; - - try_again: - -#ifdef __WIN32__ - if (wxFileStrucHandle == INVALID_HANDLE_VALUE) - return NULL; - - bool success = (FindNextFile(wxFileStrucHandle, &wxFileStruc) != 0); - if (!success) { - FindClose(wxFileStrucHandle); - wxFileStrucHandle = INVALID_HANDLE_VALUE; - return NULL; - } - - bool isdir = !!(wxFileStruc.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); - - if (isdir && !(wxFindFileFlags & wxDIR)) - goto try_again; - else if (!isdir && wxFindFileFlags && !(wxFindFileFlags & wxFILE)) - goto try_again; - - if (wxBuffer[0] != 0) - strcat(wxBuffer, "\\"); - strcat(wxBuffer, wxFileStruc.cFileName); - return wxBuffer; -#else - -#ifdef __BORLANDC__ - if (findnext(&wxFileStruc) == 0) -#else - if (_dos_findnext(&wxFileStruc) == 0) -#endif - { - /* MATTHEW: [5] Check directory flag */ - char attrib; - -#ifdef __BORLANDC__ - attrib = wxFileStruc.ff_attrib; -#else - attrib = wxFileStruc.attrib; -#endif - - if (attrib & _A_SUBDIR) { - if (!(wxFindFileFlags & wxDIR)) - goto try_again; - } else if (wxFindFileFlags && !(wxFindFileFlags & wxFILE)) - goto try_again; - - - if (wxBuffer[0] != 0) - strcat(wxBuffer, "\\"); -#ifdef __BORLANDC__ - strcat(wxBuffer, wxFileStruc.ff_name); -#else - strcat(wxBuffer, wxFileStruc.name); -#endif - return wxBuffer; - } - else - return NULL; -#endif -} - -#endif - // __WXMSW__ - -// Get current working directory. -// If buf is NULL, allocates space using new, else -// copies into buf. -char *wxGetWorkingDirectory(char *buf, int sz) -{ - if (!buf) - buf = new char[sz+1]; -#ifdef _MSC_VER - if (_getcwd(buf, sz) == NULL) { -#else - if (getcwd(buf, sz) == NULL) { -#endif - buf[0] = '.'; - buf[1] = '\0'; - } - return buf; -} - -bool wxSetWorkingDirectory(const wxString& d) -{ -#ifdef __UNIX__ - return (chdir(d) == 0); -#elif defined(__WINDOWS__) - -#ifdef __WIN32__ - return (bool)(SetCurrentDirectory(d) != 0); -#else - // Must change drive, too. - bool isDriveSpec = ((strlen(d) > 1) && (d[1] == ':')); - if (isDriveSpec) - { - char firstChar = d[0]; - - // To upper case - if (firstChar > 90) - firstChar = firstChar - 32; - - // To a drive number - unsigned int driveNo = firstChar - 64; - if (driveNo > 0) - { - unsigned int noDrives; - _dos_setdrive(driveNo, &noDrives); - } - } - bool success = (chdir(WXSTRINGCAST d) == 0); - - return success; -#endif - -#endif -} - -bool wxEndsWithPathSeparator(const char *pszFileName) -{ - size_t len = Strlen(pszFileName); - if ( len == 0 ) - return FALSE; - else - return wxIsPathSeparator(pszFileName[len - 1]); -} - -// find a file in a list of directories, returns false if not found -bool wxFindFileInPath(wxString *pStr, const char *pszPath, const char *pszFile) -{ - // we assume that it's not empty - wxCHECK_MSG( !IsEmpty(pszFile), FALSE, - _("empty file name in wxFindFileInPath")); - - // skip path separator in the beginning of the file name if present - if ( wxIsPathSeparator(*pszFile) ) - pszFile++; - - // copy the path (strtok will modify it) - char *szPath = new char[strlen(pszPath) + 1]; - strcpy(szPath, pszPath); - - wxString strFile; - char *pc; - for ( pc = strtok(szPath, PATH_SEP); pc; pc = strtok((char *) NULL, PATH_SEP) ) { - // search for the file in this directory - strFile = pc; - if ( !wxEndsWithPathSeparator(pc) ) - strFile += FILE_SEP_PATH; - strFile += pszFile; - - if ( FileExists(strFile) ) { - *pStr = strFile; - break; - } - } - - delete [] szPath; - - return pc != NULL; // if true => we breaked from the loop -} - -void WXDLLEXPORT wxSplitPath(const char *pszFileName, - wxString *pstrPath, - wxString *pstrName, - wxString *pstrExt) -{ - wxCHECK_RET( pszFileName, _("NULL file name in wxSplitPath") ); - - const char *pDot = strrchr(pszFileName, FILE_SEP_EXT); - const char *pSepUnix = strrchr(pszFileName, FILE_SEP_PATH_UNIX); - const char *pSepDos = strrchr(pszFileName, FILE_SEP_PATH_DOS); - - // take the last of the two - size_t nPosUnix = pSepUnix ? pSepUnix - pszFileName : 0; - size_t nPosDos = pSepDos ? pSepDos - pszFileName : 0; - if ( nPosDos > nPosUnix ) - nPosUnix = nPosDos; -// size_t nLen = Strlen(pszFileName); - - if ( pstrPath ) - *pstrPath = wxString(pszFileName, nPosUnix); - if ( pDot ) { - size_t nPosDot = pDot - pszFileName; - if ( pstrName ) - *pstrName = wxString(pszFileName + nPosUnix + 1, nPosDot - nPosUnix); - if ( pstrExt ) - *pstrExt = wxString(pszFileName + nPosDot + 1); - } - else { - if ( pstrName ) - *pstrName = wxString(pszFileName + nPosUnix + 1); - if ( pstrExt ) - pstrExt->Empty(); - } -} diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp deleted file mode 100644 index e76404c9c9..0000000000 --- a/src/common/framecmn.cpp +++ /dev/null @@ -1,71 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: framecmn.cpp -// Purpose: common (for all platforms) wxFrame functions -// Author: Julian Smart, Vadim Zeitlin -// Created: 01/02/97 -// Id: $Id$ -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include "wx/frame.h" -#include "wx/menu.h" - -// wxGTK is a special case because it doesn't use the generic wxMenuItem -// class, but it's own (already defined in wx/menu.h) one -#ifndef __WXGTK__ - #include "wx/menuitem.h" -#endif //WXGTK - -void wxFrame::OnIdle(wxIdleEvent& WXUNUSED(event) ) -{ - DoMenuUpdates(); -} - -// update all menus -void wxFrame::DoMenuUpdates() -{ - wxMenuBar* bar = GetMenuBar(); - if ( bar != NULL ) { - int nCount = bar->GetMenuCount(); - for (int n = 0; n < nCount; n++) - DoMenuUpdates(bar->GetMenu(n)); - } -} - -// update a menu and all submenus recursively -void wxFrame::DoMenuUpdates(wxMenu* menu) -{ - wxNode* node = menu->GetItems().First(); - while (node) - { - wxMenuItem* item = (wxMenuItem*) node->Data(); - if ( !item->IsSeparator() ) - { - wxWindowID id = item->GetId(); - wxUpdateUIEvent event(id); - event.SetEventObject( this ); - - if (GetEventHandler()->ProcessEvent(event)) - { - if (event.GetSetText()) - menu->SetLabel(id, event.GetText()); - if (event.GetSetChecked()) - menu->Check(id, event.GetChecked()); - if (event.GetSetEnabled()) - menu->Enable(id, event.GetEnabled()); - } - - if (item->GetSubMenu()) - DoMenuUpdates(item->GetSubMenu()); - } - node = node->Next(); - } -} diff --git a/src/common/fstream.cpp b/src/common/fstream.cpp deleted file mode 100644 index 69bb1ea670..0000000000 --- a/src/common/fstream.cpp +++ /dev/null @@ -1,109 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: fstream.cpp -// Purpose: "File stream" classes -// Author: Julian Smart -// Modified by: -// Created: 11/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "fstream.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" -#include -#include -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -// ---------------------------------------------------------------------------- -// wxFileInputStream -// ---------------------------------------------------------------------------- - -wxFileInputStream::wxFileInputStream(const wxString& fileName) - : wxFile(fileName, read) -{ - m_i_streambuf->SetBufferIO(1024); -} - -wxFileInputStream::~wxFileInputStream() -{ -} - -char wxFileInputStream::Peek() -{ - return 0; -} - -size_t wxFileInputStream::DoRead(void *buffer, size_t size) -{ - return wxFile::Read(buffer, size); -} - -off_t wxFileInputStream::DoSeekInput(off_t pos, wxSeekMode mode) -{ - return wxFile::Seek(pos, mode); -} - -off_t wxFileInputStream::DoTellInput() const -{ - return wxFile::Tell(); -} - -// ---------------------------------------------------------------------------- -// wxFileOutputStream -// ---------------------------------------------------------------------------- - -wxFileOutputStream::wxFileOutputStream(const wxString& fileName) - : wxFile(fileName, write) -{ - m_o_streambuf->SetBufferIO(1024); -} - -wxFileOutputStream::~wxFileOutputStream() -{ - Sync(); -} - -size_t wxFileOutputStream::DoWrite(const void *buffer, size_t size) -{ - size_t ret = wxFile::Write(buffer, size); - m_bad = wxFile::Error(); - return ret; -} - -off_t wxFileOutputStream::DoTellOutput() const -{ - return wxFile::Tell(); -} - -off_t wxFileOutputStream::DoSeekOutput(off_t pos, wxSeekMode mode) -{ - return wxFile::Seek(pos, mode); -} - -void wxFileOutputStream::Sync() -{ - wxOutputStream::Sync(); - wxFile::Flush(); -} - -// ---------------------------------------------------------------------------- -// wxFileStream -// ---------------------------------------------------------------------------- - -wxFileStream::wxFileStream(const wxString& fileName) - : wxFile(fileName, read_write) -{ -} - -wxFileStream::~wxFileStream() -{ -} diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp deleted file mode 100644 index 81b17c2b13..0000000000 --- a/src/common/gdicmn.cpp +++ /dev/null @@ -1,668 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gdicmn.cpp -// Purpose: Common GDI classes -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "gdicmn.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - - -#include "wx/gdicmn.h" -#include "wx/brush.h" -#include "wx/pen.h" -#include "wx/bitmap.h" -#include "wx/icon.h" -#include "wx/cursor.h" -#include "wx/font.h" -#include "wx/palette.h" - -#include "wx/log.h" -#include - -#ifdef __WXMSW__ -#include -#endif - -#if !USE_SHARED_LIBRARY -IMPLEMENT_CLASS(wxColourDatabase, wxList) -IMPLEMENT_DYNAMIC_CLASS(wxFontList, wxList) -IMPLEMENT_DYNAMIC_CLASS(wxPenList, wxList) -IMPLEMENT_DYNAMIC_CLASS(wxBrushList, wxList) -IMPLEMENT_DYNAMIC_CLASS(wxBitmapList, wxList) -IMPLEMENT_DYNAMIC_CLASS(wxResourceCache, wxList) -/* -IMPLEMENT_DYNAMIC_CLASS(wxRect, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxPoint, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxRealPoint, wxObject) -*/ -#endif - -wxRect::wxRect() -{ - x = 0; y = 0; width = 0; height = 0; -} - -wxRect::wxRect(long xx, long yy, long w, long h) -{ - x = xx; y = yy; width = w; height = h; -} - -wxRect::wxRect(const wxPoint& topLeft, const wxPoint& bottomRight) -{ - x = topLeft.x; - y = topLeft.y; - width = bottomRight.x - topLeft.x; - height = bottomRight.y - topLeft.y; - - if (width < 0) - { - width = -width; - x -= width; - } - - if (height < 0) - { - height = -height; - x -= height; - } -} - -wxRect::wxRect(const wxPoint& point, const wxSize& size) -{ - x = point.x; y = point.y; - width = size.x; height = size.y; -} - -wxRect::wxRect(const wxRect& rect) -{ - x = rect.x; - y = rect.y; - width = rect.width; - height = rect.height; -} - -wxRect& wxRect::operator = (const wxRect& rect) -{ - x = rect.x; y = rect.y; width = rect.width; height = rect.height; - return *this; -} - -bool wxRect::operator == (const wxRect& rect) -{ - return ((x == rect.x) && - (y == rect.y) && - (width == rect.width) && - (height == rect.height)); -} - -bool wxRect::operator != (const wxRect& rect) -{ - return ((x != rect.x) || - (y != rect.y) || - (width != rect.width) || - (height != rect.height)); -} - -wxColourDatabase::wxColourDatabase (int type): -wxList (type) -{ -} - -wxColourDatabase::~wxColourDatabase () -{ - // Cleanup Colour allocated in Initialize() - wxNode *node = First (); - while (node) - { - wxColour *col = (wxColour *) node->Data (); - wxNode *next = node->Next (); - delete col; - node = next; - } -} - -// Colour database stuff -void wxColourDatabase::Initialize () -{ - // Don't initialize for X: colours are found - // in FindColour below. - // Added: Not all - - struct cdef { - char *name; - int r,g,b; - }; - cdef cc; - static cdef table[]={ - -// #ifdef __WXMSW__ - {"AQUAMARINE",112, 219, 147}, - {"BLACK",0, 0, 0}, - {"BLUE", 0, 0, 255}, - {"BLUE VIOLET", 159, 95, 159}, - {"BROWN", 165, 42, 42}, - {"CADET BLUE", 95, 159, 159}, - {"CORAL", 255, 127, 0}, - {"CORNFLOWER BLUE", 66, 66, 111}, - {"CYAN", 0, 255, 255}, - {"DARK GREY", 47, 47, 47}, // ? - - {"DARK GREEN", 47, 79, 47}, - {"DARK OLIVE GREEN", 79, 79, 47}, - {"DARK ORCHID", 153, 50, 204}, - {"DARK SLATE BLUE", 107, 35, 142}, - {"DARK SLATE GREY", 47, 79, 79}, - {"DARK TURQUOISE", 112, 147, 219}, - {"DIM GREY", 84, 84, 84}, - {"FIREBRICK", 142, 35, 35}, - {"FOREST GREEN", 35, 142, 35}, - {"GOLD", 204, 127, 50}, - {"GOLDENROD", 219, 219, 112}, - {"GREY", 128, 128, 128}, - {"GREEN", 0, 255, 0}, - {"GREEN YELLOW", 147, 219, 112}, - {"INDIAN RED", 79, 47, 47}, - {"KHAKI", 159, 159, 95}, - {"LIGHT BLUE", 191, 216, 216}, - {"LIGHT GREY", 192, 192, 192}, - {"LIGHT STEEL BLUE", 143, 143, 188}, - {"LIME GREEN", 50, 204, 50}, - {"LIGHT MAGENTA", 255, 0, 255}, - {"MAGENTA", 255, 0, 255}, - {"MAROON", 142, 35, 107}, - {"MEDIUM AQUAMARINE", 50, 204, 153}, - {"MEDIUM GREY", 100, 100, 100}, - {"MEDIUM BLUE", 50, 50, 204}, - {"MEDIUM FOREST GREEN", 107, 142, 35}, - {"MEDIUM GOLDENROD", 234, 234, 173}, - {"MEDIUM ORCHID", 147, 112, 219}, - {"MEDIUM SEA GREEN", 66, 111, 66}, - {"MEDIUM SLATE BLUE", 127, 0, 255}, - {"MEDIUM SPRING GREEN", 127, 255, 0}, - {"MEDIUM TURQUOISE", 112, 219, 219}, - {"MEDIUM VIOLET RED", 219, 112, 147}, - {"MIDNIGHT BLUE", 47, 47, 79}, - {"NAVY", 35, 35, 142}, - {"ORANGE", 204, 50, 50}, - {"ORANGE RED", 255, 0, 127}, - {"ORCHID", 219, 112, 219}, - {"PALE GREEN", 143, 188, 143}, - {"PINK", 188, 143, 234}, - {"PLUM", 234, 173, 234}, - {"PURPLE", 176, 0, 255}, - {"RED", 255, 0, 0}, - {"SALMON", 111, 66, 66}, - {"SEA GREEN", 35, 142, 107}, - {"SIENNA", 142, 107, 35}, - {"SKY BLUE", 50, 153, 204}, - {"SLATE BLUE", 0, 127, 255}, - {"SPRING GREEN", 0, 255, 127}, - {"STEEL BLUE", 35, 107, 142}, - {"TAN", 219, 147, 112}, - {"THISTLE", 216, 191, 216}, - {"TURQUOISE", 173, 234, 234}, - {"VIOLET", 79, 47, 79}, - {"VIOLET RED", 204, 50, 153}, - {"WHEAT", 216, 216, 191}, - {"WHITE", 255, 255, 255}, - {"YELLOW", 255, 255, 0}, - {"YELLOW GREEN", 153, 204, 50}, -// #endif - -#if defined(__WXGTK__) || defined(__X__) - {"MEDIUM GOLDENROD", 234, 234, 173}, - {"MEDIUM FOREST GREEN", 107, 142, 35}, - {"LIGHT MAGENTA", 255, 0, 255}, - {"MEDIUM GREY", 100, 100, 100}, -#endif - - {0,0,0,0} - }; - int i; - for (i=0;cc=table[i],cc.name!=0;i++) - { - Append(cc.name,new wxColour(cc.r,cc.g,cc.b)); - } - -} - -/* - * Changed by Ian Brown, July 1994. - * - * When running under X, the Colour Database starts off empty. The X server - * is queried for the colour first time after which it is entered into the - * database. This allows our client to use the server colour database which - * is hopefully gamma corrected for the display being used. - */ - -wxColour *wxColourDatabase::FindColour(const wxString& colour) -{ - wxNode *node = Find((char *) (const char *)colour); - if (node) - return (wxColour *)node->Data(); - -#ifdef __WXMSW__ - else return NULL; -#endif - -// TODO for other implementations. This should really go into -// platform-specific directories. -#ifdef __WXSTUBS__ - else return NULL; -#endif - -#ifdef __WXGTK__ - else { - wxColour *col = new wxColour( colour ); - - if (!(col->Ok())) { - delete col; - return (wxColour *) NULL; - } - Append( colour, col ); - return col; - } -#endif - -#ifdef __X__ - else { - XColor xcolour; - -#ifdef __WXMOTIF__ - Display *display = XtDisplay(wxTheApp->topLevel) ; -#endif -#ifdef __XVIEW__ - Xv_Screen screen = xv_get(xview_server, SERVER_NTH_SCREEN, 0); - Xv_opaque root_window = xv_get(screen, XV_ROOT); - Display *display = (Display *)xv_get(root_window, XV_DISPLAY); -#endif - - /* MATTHEW: [4] Use wxGetMainColormap */ - if (!XParseColor(display, wxGetMainColormap(display), colour,&xcolour)) - return NULL; - - unsigned char r = (unsigned char)(xcolour.red >> 8); - unsigned char g = (unsigned char)(xcolour.green >> 8); - unsigned char b = (unsigned char)(xcolour.blue >> 8); - - wxColour *col = new wxColour(r, g, b); - Append(colour, col); - - return col; - } -#endif -} - -wxString wxColourDatabase::FindName (const wxColour& colour) const -{ - unsigned char red = colour.Red (); - unsigned char green = colour.Green (); - unsigned char blue = colour.Blue (); - - for (wxNode * node = First (); node; node = node->Next ()) - { - wxColour *col = (wxColour *) node->Data (); - - if (col->Red () == red && col->Green () == green && col->Blue () == blue) - { - char *found = node->key.string; - if (found) - return wxString(found); - } - } - return wxString(""); // Not Found - -} - -void wxInitializeStockLists () { - wxTheBrushList = new wxBrushList; - wxThePenList = new wxPenList; - wxTheFontList = new wxFontList; - wxTheBitmapList = new wxBitmapList; -} - -void wxInitializeStockObjects () -{ -#ifdef __WXMOTIF__ -#endif -#ifdef __X__ - wxFontPool = new XFontPool; -#endif - - wxNORMAL_FONT = new wxFont (12, wxMODERN, wxNORMAL, wxNORMAL); - wxSMALL_FONT = new wxFont (10, wxSWISS, wxNORMAL, wxNORMAL); - wxITALIC_FONT = new wxFont (12, wxROMAN, wxITALIC, wxNORMAL); - wxSWISS_FONT = new wxFont (12, wxSWISS, wxNORMAL, wxNORMAL); - - wxRED_PEN = new wxPen ("RED", 1, wxSOLID); - wxCYAN_PEN = new wxPen ("CYAN", 1, wxSOLID); - wxGREEN_PEN = new wxPen ("GREEN", 1, wxSOLID); - wxBLACK_PEN = new wxPen ("BLACK", 1, wxSOLID); - wxWHITE_PEN = new wxPen ("WHITE", 1, wxSOLID); - wxTRANSPARENT_PEN = new wxPen ("BLACK", 1, wxTRANSPARENT); - wxBLACK_DASHED_PEN = new wxPen ("BLACK", 1, wxSHORT_DASH); - wxGREY_PEN = new wxPen ("GREY", 1, wxSOLID); - wxMEDIUM_GREY_PEN = new wxPen ("MEDIUM GREY", 1, wxSOLID); - wxLIGHT_GREY_PEN = new wxPen ("LIGHT GREY", 1, wxSOLID); - - wxBLUE_BRUSH = new wxBrush ("BLUE", wxSOLID); - wxGREEN_BRUSH = new wxBrush ("GREEN", wxSOLID); - wxWHITE_BRUSH = new wxBrush ("WHITE", wxSOLID); - wxBLACK_BRUSH = new wxBrush ("BLACK", wxSOLID); - wxTRANSPARENT_BRUSH = new wxBrush ("BLACK", wxTRANSPARENT); - wxCYAN_BRUSH = new wxBrush ("CYAN", wxSOLID); - wxRED_BRUSH = new wxBrush ("RED", wxSOLID); - wxGREY_BRUSH = new wxBrush ("GREY", wxSOLID); - wxMEDIUM_GREY_BRUSH = new wxBrush ("MEDIUM GREY", wxSOLID); - wxLIGHT_GREY_BRUSH = new wxBrush ("LIGHT GREY", wxSOLID); - - wxBLACK = new wxColour ("BLACK"); - wxWHITE = new wxColour ("WHITE"); - wxRED = new wxColour ("RED"); - wxBLUE = new wxColour ("BLUE"); - wxGREEN = new wxColour ("GREEN"); - wxCYAN = new wxColour ("CYAN"); - wxLIGHT_GREY = new wxColour ("LIGHT GREY"); - - wxSTANDARD_CURSOR = new wxCursor (wxCURSOR_ARROW); - wxHOURGLASS_CURSOR = new wxCursor (wxCURSOR_WAIT); - wxCROSS_CURSOR = new wxCursor (wxCURSOR_CROSS); -} - -void -wxDeleteStockObjects () -{ - wxDELETE(wxNORMAL_FONT); - wxDELETE(wxSMALL_FONT); - wxDELETE(wxITALIC_FONT); - wxDELETE(wxSWISS_FONT); - - wxDELETE(wxRED_PEN); - wxDELETE(wxCYAN_PEN); - wxDELETE(wxGREEN_PEN); - wxDELETE(wxBLACK_PEN); - wxDELETE(wxWHITE_PEN); - wxDELETE(wxTRANSPARENT_PEN); - wxDELETE(wxBLACK_DASHED_PEN); - wxDELETE(wxGREY_PEN); - wxDELETE(wxMEDIUM_GREY_PEN); - wxDELETE(wxLIGHT_GREY_PEN); - - wxDELETE(wxBLUE_BRUSH); - wxDELETE(wxGREEN_BRUSH); - wxDELETE(wxWHITE_BRUSH); - wxDELETE(wxBLACK_BRUSH); - wxDELETE(wxTRANSPARENT_BRUSH); - wxDELETE(wxCYAN_BRUSH); - wxDELETE(wxRED_BRUSH); - wxDELETE(wxGREY_BRUSH); - wxDELETE(wxMEDIUM_GREY_BRUSH); - wxDELETE(wxLIGHT_GREY_BRUSH); - - wxDELETE(wxBLACK); - wxDELETE(wxWHITE); - wxDELETE(wxRED); - wxDELETE(wxBLUE); - wxDELETE(wxGREEN); - wxDELETE(wxCYAN); - wxDELETE(wxLIGHT_GREY); - - wxDELETE(wxSTANDARD_CURSOR); - wxDELETE(wxHOURGLASS_CURSOR); - wxDELETE(wxCROSS_CURSOR); -} - -void wxDeleteStockLists() { - wxDELETE(wxTheBrushList); - wxDELETE(wxThePenList); - wxDELETE(wxTheFontList); - wxDELETE(wxTheBitmapList); -} - -wxBitmapList::wxBitmapList () -{ -} - -wxBitmapList::~wxBitmapList () -{ -#ifdef __WXMSW__ - - wxNode *node = First (); - while (node) - { - wxBitmap *bitmap = (wxBitmap *) node->Data (); - wxNode *next = node->Next (); - if (bitmap->GetVisible()) - delete bitmap; - node = next; - } -#endif -} - -// Pen and Brush lists -wxPenList::~wxPenList () -{ -#ifdef __WXMSW__ - wxNode *node = First (); - while (node) - { - wxPen *pen = (wxPen *) node->Data (); - wxNode *next = node->Next (); - if (pen->GetVisible()) - delete pen; - node = next; - } -#endif -} - -void wxPenList::AddPen (wxPen * pen) -{ - Append (pen); -} - -void wxPenList::RemovePen (wxPen * pen) -{ - DeleteObject (pen); -} - -wxPen *wxPenList::FindOrCreatePen (const wxColour& colour, int width, int style) -{ - for (wxNode * node = First (); node; node = node->Next ()) - { - wxPen *each_pen = (wxPen *) node->Data (); - if (each_pen && each_pen->GetVisible() && - each_pen->GetWidth () == width && - each_pen->GetStyle () == style && - each_pen->GetColour ().Red () == colour.Red () && - each_pen->GetColour ().Green () == colour.Green () && - each_pen->GetColour ().Blue () == colour.Blue ()) - return each_pen; - } - wxPen *pen = new wxPen (colour, width, style); - - // Yes, we can return a pointer to this in a later FindOrCreatePen call, - // because we created it within FindOrCreatePen. Safeguards against - // returning a pointer to an automatic variable and hanging on to it - // (dangling pointer). - pen->SetVisible(TRUE); - return pen; -} - -wxPen *wxPenList::FindOrCreatePen (const wxString& colour, int width, int style) -{ - wxColour *the_colour = wxTheColourDatabase->FindColour (colour); - if (the_colour) - return FindOrCreatePen (*the_colour, width, style); - else - return (wxPen *) NULL; -} - -wxBrushList::~wxBrushList () -{ -#ifdef __WXMSW__ - wxNode *node = First (); - while (node) - { - wxBrush *brush = (wxBrush *) node->Data (); - wxNode *next = node->Next (); - if (brush->GetVisible()) - delete brush; - node = next; - } -#endif -} - -void wxBrushList::AddBrush (wxBrush * brush) -{ - Append (brush); -} - -wxBrush *wxBrushList::FindOrCreateBrush (const wxColour& colour, int style) -{ - for (wxNode * node = First (); node; node = node->Next ()) - { - wxBrush *each_brush = (wxBrush *) node->Data (); - if (each_brush && each_brush->GetVisible() && - each_brush->GetStyle () == style && - each_brush->GetColour ().Red () == colour.Red () && - each_brush->GetColour ().Green () == colour.Green () && - each_brush->GetColour ().Blue () == colour.Blue ()) - return each_brush; - } - // Yes, we can return a pointer to this in a later FindOrCreateBrush call, - // because we created it within FindOrCreateBrush. Safeguards against - // returning a pointer to an automatic variable and hanging on to it - // (dangling pointer). - wxBrush *brush = new wxBrush (colour, style); - brush->SetVisible(TRUE); - return brush; -} - -wxBrush *wxBrushList::FindOrCreateBrush (const wxString& colour, int style) -{ - wxColour *the_colour = wxTheColourDatabase->FindColour (colour); - if (the_colour) - return FindOrCreateBrush (*the_colour, style); - else - return (wxBrush *) NULL; -} - -void wxBrushList::RemoveBrush (wxBrush * brush) -{ - DeleteObject (brush); -} - -wxFontList::~wxFontList () -{ -#ifdef __WXMSW__ - wxNode *node = First (); - while (node) - { - // Only delete objects that are 'visible', i.e. - // that have been created using FindOrCreate..., - // where the pointers are expected to be shared - // (and therefore not deleted by any one part of an app). - wxFont *font = (wxFont *) node->Data (); - wxNode *next = node->Next (); - if (font->GetVisible()) - delete font; - node = next; -} -#endif -} - -void wxFontList::AddFont (wxFont * font) -{ - Append (font); -} - -void wxFontList::RemoveFont (wxFont * font) -{ - DeleteObject (font); -} - -wxFont *wxFontList:: - FindOrCreateFont (int PointSize, int FamilyOrFontId, int Style, int Weight, bool underline, const wxString& Face) -{ - for (wxNode * node = First (); node; node = node->Next ()) - { - wxFont *each_font = (wxFont *) node->Data (); - if (each_font && each_font->GetVisible() && each_font->Ok() && - each_font->GetPointSize () == PointSize && - each_font->GetStyle () == Style && - each_font->GetWeight () == Weight && - each_font->GetUnderlined () == underline && -#if defined(__X__) || (defined(__WXMSW__) && USE_PORTABLE_FONTS_IN_MSW) - each_font->GetFontId () == FamilyOrFontId) /* New font system */ -#else - each_font->GetFamily () == FamilyOrFontId && - (!each_font->GetFaceName() || each_font->GetFaceName() == Face)) -#endif - return each_font; - } - wxFont *font = new wxFont (PointSize, FamilyOrFontId, Style, Weight, underline, Face); - font->SetVisible(TRUE); - return font; -} - -void wxBitmapList::AddBitmap(wxBitmap *bitmap) -{ Append(bitmap); } -void wxBitmapList::RemoveBitmap(wxBitmap *bitmap) -{ DeleteObject(bitmap); } - -wxSize wxGetDisplaySize() -{ - int x, y; - wxDisplaySize(& x, & y); - return wxSize(x, y); -} - -wxResourceCache::wxResourceCache () : wxList() { -} - -wxResourceCache::wxResourceCache (const unsigned int the_key_type) : wxList(the_key_type) { -} - -wxResourceCache::~wxResourceCache () { - wxNode *node = First (); - while (node) { - wxGDIObject *item = (wxGDIObject *)node->Data(); - if (item->IsKindOf(CLASSINFO(wxBrush))) { - wxBrush *brush = (wxBrush *)item; - delete brush; - } - - if (item->IsKindOf(CLASSINFO(wxFont))) { - wxFont *font = (wxFont *)item; - delete font; - } - - if (item->IsKindOf(CLASSINFO(wxBitmap))) { - wxBitmap *bitmap = (wxBitmap *)item; - delete bitmap; - } - - if (item->IsKindOf(CLASSINFO(wxColour))) { - wxColour *colour = (wxColour *)item; - delete colour; - } - - wxNode *next = node->Next (); - node = next; - } -} - diff --git a/src/common/glob.inc b/src/common/glob.inc deleted file mode 100644 index c8a821d32e..0000000000 --- a/src/common/glob.inc +++ /dev/null @@ -1,361 +0,0 @@ -/* - * File and other globbing (included by wb_utils.cc) - */ - -// This file includes: -// wxIsWild(const char *pattern) -// wxMatchWild(const char *pattern, const char *str, bool dot_special) -// - - -//--------------------------------------------------------------------------------- -#ifndef UNIX_GLOB -# ifdef wx_x -# define UNIX_GLOB 1 -# else -# define UNIX_GLOB 0 -# endif -#endif - -#if UNIX_GLOB -# ifdef wx_msw -# error "Can't use Unix file globbing under Windows!" -# endif -#endif - -/************************************************************************* - * - * wxIsWild checks whether the pattern contains wildcards, and - * returns TRUE if it does, and FALSE if it does not (or if the - * pattern is NULL -- i.e. no string). - * - * The argument is: - * - * 1) pattern - a character string - */ -bool -wxIsWild (const char *pattern) -{ - while (*pattern) - { - switch (*pattern++) - { - case '?': - case '*': -#if UNIX_GLOB - case '[': - case '{': /* } */ -#endif - return TRUE; -#if UNIX_GLOB - case '\\': - if (!*pattern++) - return FALSE; -#endif - } /* switch() */ - } /* while() */ - return FALSE; -} - - - -#if UNIX_GLOB - -// Unix Glob() -// -// Pattern Function -// ----------------------------------------------------- -// '*' = match 0 or more occurances of anything -// "[abc]" = match anyof "abc" (ranges supported) -// "{xx,yy,zz}" = match anyof "xx", "yy", or "zz" -// '?' = match any character -// -// '\' is used to "escape" special characters -// Recursive - -bool -wxMatchWild (const char *pattern, const char *str, bool dot_special) -{ - char c; - const char *cp; - bool done = FALSE, ret_code, ok; - // Below is for vi fans - const char OB = '{', CB = '}'; - -#if 0 - if (strcmp(pattern, "*.*") == 0) - pattern = "*"; // Hack for MS-DOS compat. -#endif - - // dot_special means '.' only matches '.' - if (dot_special && *str == '.' && *pattern != *str) - return FALSE; - - while ((*pattern != '\0') && (!done) && (((*str == '\0') && - ((*pattern == OB) || (*pattern == '*'))) || (*str != '\0'))) - { - switch (*pattern) - { - case '\\': - pattern++; - if (*pattern != '\0') - pattern++; - break; - case '*': - pattern++; - ret_code = FALSE; - while ((*str != '\0') && (!(ret_code = wxMatchWild (pattern, str++, FALSE)))); - if (ret_code) - { - while (*str != '\0') - str++; - while (*pattern != '\0') - pattern++; - } - break; - case '[': - pattern++; - repeat: - if ((*pattern == '\0') || (*pattern == ']')) - { - done = TRUE; - break; - } - if (*pattern == '\\') - { - pattern++; - if (*pattern == '\0') - { - done = TRUE; - break; - } - } - if (*(pattern + 1) == '-') - { - c = *pattern; - pattern += 2; - if (*pattern == ']') - { - done = TRUE; - break; - } - if (*pattern == '\\') - { - pattern++; - if (*pattern == '\0') - { - done = TRUE; - break; - } - } - if ((*str < c) || (*str > *pattern)) - { - pattern++; - goto repeat; - } - } - else if (*pattern != *str) - { - pattern++; - goto repeat; - } - pattern++; - while ((*pattern != ']') && (*pattern != '\0')) - { - if ((*pattern == '\\') && (*(pattern + 1) != '\0')) - pattern++; - pattern++; - } // while() - if (*pattern != '\0') - { - pattern++, str++; - } - break; - case '?': - pattern++; - str++; - break; - case OB: - pattern++; - while ((*pattern != CB) && (*pattern != '\0')) - { - cp = str; - ok = TRUE; - while (ok && (*cp != '\0') && (*pattern != '\0') && - (*pattern != ',') && (*pattern != CB)) - { - if (*pattern == '\\') - pattern++; - ok = (*pattern++ == *cp++); - } // while() - if (*pattern == '\0') - { - ok = FALSE; - done = TRUE; - break; - } - else if (ok) - { - str = cp; - while ((*pattern != CB) && (*pattern != '\0')) - { - if (*++pattern == '\\') - { - if (*++pattern == CB) - pattern++; - } - } // while() - } - else - { - while (*pattern != CB && *pattern != ',' && *pattern != '\0') - { - if (*++pattern == '\\') - { - if (*++pattern == CB || *pattern == ',') - pattern++; - } - } // while() - } - if (*pattern != '\0') - pattern++; - } // while() - break; - default: - if (*str == *pattern) - { - str++, pattern++; - } - else - { - done = TRUE; - } - } // switch() - } // while() - while (*pattern == '*') - pattern++; - return ((*str == '\0') && (*pattern == '\0')); -} - -#else /* MS-DOS/Windows glob() */ -/************************************************************************* - * - * wxMatchWild matches the given pattern string against - * a text string, and returns TRUE if it matches, FALSE otherwise. - * - * A match means that the entire text string is used up in the matching. - * The pattern can contain the following wildcards. - * - * * -- matches any sequence of characters - * ? -- matches one character - * - * If one or other or both of the string arguments to wxMatchWild function is - * NULL (i.e. there isn't a string), then the function returns FALSE. - * - */ -static bool wxPatternMatch (const char *pattern, const char *text, size_t i, size_t j); - -// @@@@ dotSpecial is ignored by MS-DOS -bool -wxMatchWild (const char *pattern, const char *text, bool /* dotSpecial */ ) -{ - if (pattern == NULL || text == NULL || *pattern == '\0' || *text == '\0') - return FALSE; - return wxPatternMatch (pattern, text, 0, 0); -} - -/************************************************************************* - * - * wxPatternMatch does the work for wxMatchWild. wxPatternMatch matches - * the given pattern string against a text string, and returns TRUE if - * it matches, FALSE otherwise. It is assumed that the string arguments - * to wxPatternMatch exist. - * - * A match means that the entire text string is used up in the matching. - * The pattern can contain the following wildcards. - * - * * -- matches any sequence of characters - * ? -- matches one character - * - * wxPatternMatch works by going down the pattern trying to match the - * the same index character in the pattern and string arrays, and stops - * when the end of the pattern or text string is reached. However, if a - * '*' wildcard is met, the algorithm checks to see whether the remaining - * pattern (after the wildcard) matches the rest of the text (i.e. the - * wxPatternMatch function is called recursively). - */ -// Recursive -static bool -wxPatternMatch (const char *pattern, const char *text, size_t i, size_t j) -{ - size_t pattern_length = strlen (pattern); - size_t text_length = strlen (text); - bool match = FALSE; - -#ifdef wx_msw -// MS-DOS file system is case INDEPENDENT -# define EQU(x,y) (wxToLower(x) == wxToLower(y)) -#else -# define EQU(x,y) ((x) == (y)) -#endif - - while (j < pattern_length && i < text_length) - { - if (EQU(text[i], pattern[j]) || pattern[j] == '?') - { - match = TRUE; - i++, j++; - } - else if (pattern[j] == '*') - { - // If pattern ends in '*' - if (++j == pattern_length) - { - match = TRUE; - i = text_length; - } - else - { - match = FALSE; -// after wildcard check to see whether rest of pattern matches - // up with rest of text - while (i < text_length && match != TRUE) - { - match = wxPatternMatch (pattern, text, i, j); - i++; - } -// text index is decremented so that it points to where - // the text string starts to match the rest of the pattern - i--; - } - } - else if (! EQU(text[i], pattern[j])) - { - j = pattern_length; - match = FALSE; - } - } - if (j == pattern_length && i == text_length && match == TRUE) - { - return TRUE; - } - else -// special case where pattern and text are the same except that pattern - // also only has '*' wildcards on the end - if (i == text_length && pattern[j] == '*' && match == TRUE) - { - for (; j < pattern_length; j++) - { - if (pattern[j] != '*') - return FALSE; - } - return TRUE; - } - else - { - return FALSE; - } -} - -#endif /* UNIX_GLOB */ -//----------------------------------------------------------------------------- diff --git a/src/common/hash.cpp b/src/common/hash.cpp deleted file mode 100644 index f4139dd5f9..0000000000 --- a/src/common/hash.cpp +++ /dev/null @@ -1,350 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: hash.cpp -// Purpose: wxHashTable implementation -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "hash.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/list.h" -#endif - -#include "wx/hash.h" - -#include -#include - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxHashTable, wxObject) -#endif - -wxHashTable::wxHashTable (int the_key_type, int size) -{ - n = size; - current_position = -1; - current_node = (wxNode *) NULL; - - key_type = the_key_type; - hash_table = new wxList *[size]; - int i; - for (i = 0; i < size; i++) - hash_table[i] = (wxList *) NULL; -} - -wxHashTable::~wxHashTable (void) -{ - int i; - for (i = 0; i < n; i++) - if (hash_table[i]) - delete hash_table[i]; - delete[] hash_table; -} - -bool wxHashTable::Create(int the_key_type, int size) -{ - n = size; - current_position = -1; - current_node = (wxNode *) NULL; - - key_type = the_key_type; - if (hash_table) - delete[] hash_table; - hash_table = new wxList *[size]; - int i; - for (i = 0; i < size; i++) - hash_table[i] = (wxList *) NULL; - return TRUE; -} - -void wxHashTable::Put (long key, long value, wxObject * object) -{ - // Should NEVER be - long k = (long) key; - if (k < 0) - k = -k; - - int position = (int) (k % n); - if (!hash_table[position]) - hash_table[position] = new wxList (wxKEY_INTEGER); - - hash_table[position]->Append (value, object); -} - -void wxHashTable::Put (long key, const char *value, wxObject * object) -{ - // Should NEVER be - long k = (long) key; - if (k < 0) - k = -k; - - int position = (int) (k % n); - if (!hash_table[position]) - hash_table[position] = new wxList (wxKEY_INTEGER); - - hash_table[position]->Append (value, object); -} - -void wxHashTable::Put (long key, wxObject * object) -{ - // Should NEVER be - long k = (long) key; - if (k < 0) - k = -k; - - int position = (int) (k % n); - if (!hash_table[position]) - hash_table[position] = new wxList (wxKEY_INTEGER); - - hash_table[position]->Append (k, object); -} - -void wxHashTable::Put (const char *key, wxObject * object) -{ - int position = (int) (MakeKey (key) % n); - - if (!hash_table[position]) - hash_table[position] = new wxList (wxKEY_STRING); - - hash_table[position]->Append (key, object); -} - -wxObject *wxHashTable::Get (long key, long value) const -{ - // Should NEVER be - long k = (long) key; - if (k < 0) - k = -k; - - int position = (int) (k % n); - if (!hash_table[position]) - return (wxObject *) NULL; - else - { - wxNode *node = hash_table[position]->Find (value); - if (node) - return node->Data (); - else - return (wxObject *) NULL; - } -} - -wxObject *wxHashTable::Get (long key, const char *value) const -{ - // Should NEVER be - long k = (long) key; - if (k < 0) - k = -k; - - int position = (int) (k % n); - if (!hash_table[position]) - return (wxObject *) NULL; - else - { - wxNode *node = hash_table[position]->Find (value); - if (node) - return node->Data (); - else - return (wxObject *) NULL; - } -} - -wxObject *wxHashTable::Get (long key) const -{ - // Should NEVER be - long k = (long) key; - if (k < 0) - k = -k; - - int position = (int) (k % n); - if (!hash_table[position]) - return (wxObject *) NULL; - else - { - wxNode *node = hash_table[position]->Find (k); - return node ? node->Data () : (wxObject*)NULL; - } -} - -wxObject *wxHashTable::Get (const char *key) const -{ - int position = (int) (MakeKey (key) % n); - - if (!hash_table[position]) - return (wxObject *) NULL; - else - { - wxNode *node = hash_table[position]->Find (key); - return node ? node->Data () : (wxObject*)NULL; - } -} - -wxObject *wxHashTable::Delete (long key) -{ - // Should NEVER be - long k = (long) key; - if (k < 0) - k = -k; - - int position = (int) (k % n); - if (!hash_table[position]) - return (wxObject *) NULL; - else - { - wxNode *node = hash_table[position]->Find (k); - if (node) - { - wxObject *data = node->Data (); - delete node; - return data; - } - else - return (wxObject *) NULL; - } -} - -wxObject *wxHashTable::Delete (const char *key) -{ - int position = (int) (MakeKey (key) % n); - if (!hash_table[position]) - return (wxObject *) NULL; - else - { - wxNode *node = hash_table[position]->Find (key); - if (node) - { - wxObject *data = node->Data (); - delete node; - return data; - } - else - return (wxObject *) NULL; - } -} - -wxObject *wxHashTable::Delete (long key, int value) -{ - // Should NEVER be - long k = (long) key; - if (k < 0) - k = -k; - - int position = (int) (k % n); - if (!hash_table[position]) - return (wxObject *) NULL; - else - { - wxNode *node = hash_table[position]->Find (value); - if (node) - { - wxObject *data = node->Data (); - delete node; - return data; - } - else - return (wxObject *) NULL; - } -} - -wxObject *wxHashTable::Delete (long key, const char *value) -{ - int position = (int) (key % n); - if (!hash_table[position]) - return (wxObject *) NULL; - else - { - wxNode *node = hash_table[position]->Find (value); - if (node) - { - wxObject *data = node->Data (); - delete node; - return data; - } - else - return (wxObject *) NULL; - } -} - -long wxHashTable::MakeKey (const char *string) const -{ - long int_key = 0; - - while (*string) - int_key += (unsigned char) *string++; - - return int_key; -} - -void wxHashTable::BeginFind (void) -{ - current_position = -1; - current_node = (wxNode *) NULL; -} - -wxNode *wxHashTable::Next (void) -{ - wxNode *found = (wxNode *) NULL; - bool end = FALSE; - while (!end && !found) - { - if (!current_node) - { - current_position++; - if (current_position >= n) - { - current_position = -1; - current_node = (wxNode *) NULL; - end = TRUE; - } - else - { - if (hash_table[current_position]) - { - current_node = hash_table[current_position]->First (); - found = current_node; - } - } - } - else - { - current_node = current_node->Next (); - found = current_node; - } - } - return found; -} - -void wxHashTable::DeleteContents (bool flag) -{ - int i; - for (i = 0; i < n; i++) - { - if (hash_table[i]) - hash_table[i]->DeleteContents (flag); - } -} - -void wxHashTable::Clear (void) -{ - int i; - for (i = 0; i < n; i++) - { - if (hash_table[i]) - hash_table[i]->Clear (); - } -} - diff --git a/src/common/helpbase.cpp b/src/common/helpbase.cpp deleted file mode 100644 index b10db8b4c1..0000000000 --- a/src/common/helpbase.cpp +++ /dev/null @@ -1,35 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: helpbase.cpp -// Purpose: Help system base classes -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "helpbase.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#endif - -#include "wx/helpbase.h" - -#if USE_HELP - -#if !USE_SHARED_LIBRARY -IMPLEMENT_CLASS(wxHelpControllerBase, wxObject) -#endif - -#endif // USE_HELP diff --git a/src/common/intl.cpp b/src/common/intl.cpp deleted file mode 100644 index 6cb46f1be0..0000000000 --- a/src/common/intl.cpp +++ /dev/null @@ -1,547 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: intl.cpp -// Purpose: Internationalization and localisation for wxWindows -// Author: Vadim Zeitlin -// Modified by: -// Created: 29/01/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// declaration -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- - -#ifdef __GNUG__ -#pragma implementation "intl.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -// standard headers -#include - -// wxWindows -#include "wx/defs.h" -#include "wx/string.h" -#include "wx/intl.h" -#include "wx/file.h" -#include "wx/log.h" -#include "wx/utils.h" - -#include - -// ---------------------------------------------------------------------------- -// constants -// ---------------------------------------------------------------------------- - -// magic number identifying the .mo format file -const size_t32 MSGCATALOG_MAGIC = 0x950412de; -const size_t32 MSGCATALOG_MAGIC_SW = 0xde120495; - -// extension of ".mo" files -#define MSGCATALOG_EXTENSION ".mo" - -// ---------------------------------------------------------------------------- -// global functions -// ---------------------------------------------------------------------------- - -// suppress further error messages about missing translations -// (if you don't have one catalog file, you wouldn't like to see the -// error message for each string in it, so normally it's given only -// once) -void wxSuppressTransErrors(); - -// restore the logging -void wxRestoreTransErrors(); - -// get the current state -bool wxIsLoggingTransErrors(); - -// get the current locale object (## may be NULL!) -extern wxLocale *wxSetLocale(wxLocale *pLocale); - -// ---------------------------------------------------------------------------- -// wxMsgCatalog corresponds to one disk-file message catalog. -// -// This is a "low-level" class and is used only by wxLocale (that's why -// it's designed to be stored in a linked list) -// ---------------------------------------------------------------------------- - -class wxMsgCatalog -{ -public: - // ctor & dtor - wxMsgCatalog(); - ~wxMsgCatalog(); - - // load the catalog from disk (szDirPrefix corresponds to language) - bool Load(const char *szDirPrefix, const char *szName); - bool IsLoaded() const { return m_pData != NULL; } - - // get name of the catalog - const char *GetName() const { return m_pszName; } - - // get the translated string: returns NULL if not found - const char *GetString(const char *sz) const; - - // public variable pointing to the next element in a linked list (or NULL) - wxMsgCatalog *m_pNext; - -private: - // this implementation is binary compatible with GNU gettext() version 0.10 - - // an entry in the string table - struct wxMsgTableEntry - { - size_t32 nLen; // length of the string - size_t32 ofsString; // pointer to the string - }; - - // header of a .mo file - struct wxMsgCatalogHeader - { - size_t32 magic, // offset +00: magic id - revision, // +04: revision - numStrings; // +08: number of strings in the file - size_t32 ofsOrigTable, // +0C: start of original string table - ofsTransTable; // +10: start of translated string table - size_t32 nHashSize, // +14: hash table size - ofsHashTable; // +18: offset of hash table start - }; - - // all data is stored here, NULL if no data loaded - size_t8 *m_pData; - - // data description - size_t32 m_numStrings, // number of strings in this domain - m_nHashSize; // number of entries in hash table - size_t32 *m_pHashTable; // pointer to hash table - wxMsgTableEntry *m_pOrigTable, // pointer to original strings - *m_pTransTable; // translated - - const char *StringAtOfs(wxMsgTableEntry *pTable, size_t32 index) const - { return (const char *)(m_pData + Swap(pTable[index].ofsString)); } - - // utility functions - // calculate the hash value of given string - static inline size_t32 GetHash(const char *sz); - // big<->little endian - inline size_t32 Swap(size_t32 ui) const; - - // internal state - bool HasHashTable() const // true if hash table is present - { return m_nHashSize > 2 && m_pHashTable != NULL; } - - bool m_bSwapped; // wrong endianness? - - char *m_pszName; // name of the domain -}; - -// ============================================================================ -// implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// wxMsgCatalog class -// ---------------------------------------------------------------------------- - -// calculate hash value using the so called hashpjw function by P.J. Weinberger -// [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools] -size_t32 wxMsgCatalog::GetHash(const char *sz) -{ - #define HASHWORDBITS 32 // the length of size_t32 - - size_t32 hval = 0; - size_t32 g; - while ( *sz != '\0' ) { - hval <<= 4; - hval += (size_t32)*sz++; - g = hval & ((size_t32)0xf << (HASHWORDBITS - 4)); - if ( g != 0 ) { - hval ^= g >> (HASHWORDBITS - 8); - hval ^= g; - } - } - - return hval; -} - -// swap the 2 halves of 32 bit integer if needed -size_t32 wxMsgCatalog::Swap(size_t32 ui) const -{ - return m_bSwapped ? (ui << 24) | ((ui & 0xff00) << 8) | - ((ui >> 8) & 0xff00) | (ui >> 24) - : ui; -} - -wxMsgCatalog::wxMsgCatalog() -{ - m_pData = NULL; - m_pszName = NULL; -} - -wxMsgCatalog::~wxMsgCatalog() -{ - wxDELETEA(m_pData); - wxDELETEA(m_pszName); -} - -class NoTransErr -{ - public: - NoTransErr() { wxSuppressTransErrors(); } - ~NoTransErr() { wxRestoreTransErrors(); } -}; - -// open disk file and read in it's contents -bool wxMsgCatalog::Load(const char *szDirPrefix, const char *szName) -{ - // search order (assume language 'foo') is - // 1) $LC_PATH/foo/LC_MESSAGES (if LC_PATH set) - // 2) ./foo/LC_MESSAGES - // 3) ./foo - // 4) . (Added by JACS) - // - // under UNIX we search also in: - // 5) /usr/share/locale/foo/LC_MESSAGES (Linux) - // 6) /usr/lib/locale/foo/LC_MESSAGES (Solaris) - #define MSG_PATH FILE_SEP_PATH + "LC_MESSAGES" PATH_SEP - - wxString strPath(""); - const char *pszLcPath = getenv("LC_PATH"); - if ( pszLcPath != NULL ) - strPath += pszLcPath + wxString(szDirPrefix) + MSG_PATH; // (1) - - // NB: '<<' is unneeded between too literal strings: - // they are concatenated at compile time - strPath += "./" + wxString(szDirPrefix) + MSG_PATH // (2) - + "./" + szDirPrefix + FILE_SEP_PATH + PATH_SEP // (3) - + "." + PATH_SEP - #ifdef __UNIX__ - "/usr/share/locale/" + szDirPrefix + MSG_PATH // (5) - "/usr/lib/locale/" + szDirPrefix + MSG_PATH // (6) - #endif //UNIX - ; - - wxString strFile = szName; - strFile += MSGCATALOG_EXTENSION; - - // don't give translation errors here because the wxstd catalog might - // not yet be loaded (and it's normal) - // - // (we're using an object because we have several return paths) - NoTransErr noTransErr; - - wxLogVerbose(_("looking for catalog '%s' in path '%s'."), - szName, strPath.c_str()); - - wxString strFullName; - if ( !wxFindFileInPath(&strFullName, strPath, strFile) ) { - wxLogWarning(_("catalog file for domain '%s' not found."), szName); - return FALSE; - } - - // open file - wxLogVerbose(_("using catalog '%s' from '%s'."), - szName, strFullName.c_str()); - - wxFile fileMsg(strFullName); - if ( !fileMsg.IsOpened() ) - return FALSE; - - // get the file size - off_t nSize = fileMsg.Length(); - if ( nSize == wxInvalidOffset ) - return FALSE; - - // read the whole file in memory - m_pData = new size_t8[nSize]; - if ( fileMsg.Read(m_pData, nSize) != nSize ) { - wxDELETEA(m_pData); - return FALSE; - } - - // examine header - bool bValid = (size_t)nSize > sizeof(wxMsgCatalogHeader); - - wxMsgCatalogHeader *pHeader; - if ( bValid ) { - pHeader = (wxMsgCatalogHeader *)m_pData; - - // we'll have to swap all the integers if it's true - m_bSwapped = pHeader->magic == MSGCATALOG_MAGIC_SW; - - // check the magic number - bValid = m_bSwapped || pHeader->magic == MSGCATALOG_MAGIC; - } - - if ( !bValid ) { - // it's either too short or has incorrect magic number - wxLogWarning(_("'%s' is not a valid message catalog."), strFullName.c_str()); - - wxDELETEA(m_pData); - return FALSE; - } - - // initialize - m_numStrings = Swap(pHeader->numStrings); - m_pOrigTable = (wxMsgTableEntry *)(m_pData + - Swap(pHeader->ofsOrigTable)); - m_pTransTable = (wxMsgTableEntry *)(m_pData + - Swap(pHeader->ofsTransTable)); - - m_nHashSize = Swap(pHeader->nHashSize); - m_pHashTable = (size_t32 *)(m_pData + Swap(pHeader->ofsHashTable)); - - m_pszName = new char[strlen(szName) + 1]; - strcpy(m_pszName, szName); - - // everything is fine - return TRUE; -} - -// search for a string -const char *wxMsgCatalog::GetString(const char *szOrig) const -{ - if ( szOrig == NULL ) - return NULL; - - if ( HasHashTable() ) { // use hash table for lookup if possible - size_t32 nHashVal = GetHash(szOrig); - size_t32 nIndex = nHashVal % m_nHashSize; - - size_t32 nIncr = 1 + (nHashVal % (m_nHashSize - 2)); - - while ( TRUE ) { - size_t32 nStr = Swap(m_pHashTable[nIndex]); - if ( nStr == 0 ) - return NULL; - - if ( strcmp(szOrig, StringAtOfs(m_pOrigTable, nStr - 1)) == 0 ) - return StringAtOfs(m_pTransTable, nStr - 1); - - if ( nIndex >= m_nHashSize - nIncr) - nIndex -= m_nHashSize - nIncr; - else - nIndex += nIncr; - } - } - else { // no hash table: use default binary search - size_t32 bottom = 0, - top = m_numStrings, - current; - while ( bottom < top ) { - current = (bottom + top) / 2; - int res = strcmp(szOrig, StringAtOfs(m_pOrigTable, current)); - if ( res < 0 ) - top = current; - else if ( res > 0 ) - bottom = current + 1; - else // found! - return StringAtOfs(m_pTransTable, current); - } - } - - // not found - return NULL; -} - -// ---------------------------------------------------------------------------- -// wxLocale -// ---------------------------------------------------------------------------- - -wxLocale::wxLocale() -{ - m_pszOldLocale = NULL; - m_pMsgCat = NULL; -} - -// NB: this function has (desired) side effect of changing current locale -bool wxLocale::Init(const char *szName, - const char *szShort, - const char *szLocale, - bool bLoadDefault) -{ - m_strLocale = szName; - m_strShort = szShort; - - // change current locale (default: same as long name) - if ( szLocale == NULL ) - szLocale = szName; - m_pszOldLocale = setlocale(LC_ALL, szLocale); - if ( m_pszOldLocale == NULL ) - wxLogError(_("locale '%s' can not be set."), szLocale); - - // the short name will be used to look for catalog files as well, - // so we need something here - if ( m_strShort.IsEmpty() ) { - // #### I don't know how these 2 letter abbreviations are formed, - // this wild guess is almost surely wrong - m_strShort = wxToLower(szLocale[0]) + wxToLower(szLocale[1]); - } - - // save the old locale to be able to restore it later - m_pOldLocale = wxSetLocale(this); - - // load the default catalog with wxWindows standard messages - m_pMsgCat = NULL; - bool bOk = TRUE; - if ( bLoadDefault ) - bOk = AddCatalog("wxstd"); - - return bOk; -} - -// clean up -wxLocale::~wxLocale() -{ - // free memory - wxMsgCatalog *pTmpCat; - while ( m_pMsgCat != NULL ) { - pTmpCat = m_pMsgCat; - m_pMsgCat = m_pMsgCat->m_pNext; - delete pTmpCat; - } - - // restore old locale - wxSetLocale(m_pOldLocale); - setlocale(LC_ALL, m_pszOldLocale); -} - -// get the translation of given string in current locale -const char *wxLocale::GetString(const char *szOrigString, - const char *szDomain) const -{ - wxASSERT( szOrigString != NULL ); // would be pretty silly - - const char *pszTrans = NULL; - - wxMsgCatalog *pMsgCat; - if ( szDomain != NULL ) { - pMsgCat = FindCatalog(szDomain); - - // does the catalog exist? - if ( pMsgCat != NULL ) - pszTrans = pMsgCat->GetString(szOrigString); - } - else { - // search in all domains - for ( pMsgCat = m_pMsgCat; pMsgCat != NULL; pMsgCat = pMsgCat->m_pNext ) { - pszTrans = pMsgCat->GetString(szOrigString); - if ( pszTrans != NULL ) // take the first found - break; - } - } - - if ( pszTrans == NULL ) { - if ( wxIsLoggingTransErrors() ) { - // suppress further error messages - // (do it before LogWarning to prevent infinite recursion!) - wxSuppressTransErrors(); - - if ( szDomain != NULL ) - wxLogWarning(_("string '%s' not found in domain '%s' for locale '%s'."), - szOrigString, szDomain, m_strLocale.c_str()); - else - wxLogWarning(_("string '%s' not found in locale '%s'."), - szOrigString, m_strLocale.c_str()); - } - - return szOrigString; - } - else - return pszTrans; -} - -// find catalog by name in a linked list, return NULL if !found -wxMsgCatalog *wxLocale::FindCatalog(const char *szDomain) const -{ -// linear search in the linked list - wxMsgCatalog *pMsgCat; - for ( pMsgCat = m_pMsgCat; pMsgCat != NULL; pMsgCat = pMsgCat->m_pNext ) { - if ( Stricmp(pMsgCat->GetName(), szDomain) == 0 ) - return pMsgCat; - } - - return NULL; -} - -// check if the given catalog is loaded -bool wxLocale::IsLoaded(const char *szDomain) const -{ - return FindCatalog(szDomain) != NULL; -} - -// add a catalog to our linked list -bool wxLocale::AddCatalog(const char *szDomain) -{ - wxMsgCatalog *pMsgCat = new wxMsgCatalog; - - if ( pMsgCat->Load(m_strShort, szDomain) ) { - // add it to the head of the list so that in GetString it will - // be searched before the catalogs added earlier - pMsgCat->m_pNext = m_pMsgCat; - m_pMsgCat = pMsgCat; - - return TRUE; - } - else { - // don't add it because it couldn't be loaded anyway - delete pMsgCat; - - return FALSE; - } -} - -// ---------------------------------------------------------------------------- -// global functions and variables -// ---------------------------------------------------------------------------- - -// translation errors logging -// -------------------------- - -static bool gs_bGiveTransErrors = TRUE; - -void wxSuppressTransErrors() -{ - gs_bGiveTransErrors = FALSE; -} - -void wxRestoreTransErrors() -{ - gs_bGiveTransErrors = TRUE; -} - -bool wxIsLoggingTransErrors() -{ - return gs_bGiveTransErrors; -} - -// retrieve/change current locale -// ------------------------------ - -// the current locale object -wxLocale *g_pLocale = NULL; - -wxLocale *wxGetLocale() -{ - return g_pLocale; -} - -wxLocale *wxSetLocale(wxLocale *pLocale) -{ - wxLocale *pOld = g_pLocale; - g_pLocale = pLocale; - return pOld; -} diff --git a/src/common/ipcbase.cpp b/src/common/ipcbase.cpp deleted file mode 100644 index 717eb20c60..0000000000 --- a/src/common/ipcbase.cpp +++ /dev/null @@ -1,35 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: ipcbase.cpp -// Purpose: IPC base classes -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "ipcbase.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#endif - -#include "wx/ipcbase.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_CLASS(wxServerBase, wxObject) -IMPLEMENT_CLASS(wxClientBase, wxObject) -IMPLEMENT_CLASS(wxConnectionBase, wxObject) -#endif - - diff --git a/src/common/layout.cpp b/src/common/layout.cpp deleted file mode 100644 index 81effab44a..0000000000 --- a/src/common/layout.cpp +++ /dev/null @@ -1,1749 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: layout.cpp -// Purpose: Constraint layout system classes -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "layout.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include "wx/defs.h" - -#if USE_CONSTRAINTS - -#ifndef WX_PRECOMP -#include "wx/window.h" -#include "wx/utils.h" -#include "wx/dialog.h" -#include "wx/msgdlg.h" -#include -#endif - -#include "wx/layout.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxIndividualLayoutConstraint, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxLayoutConstraints, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxSizer, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxRowColSizer, wxSizer) -IMPLEMENT_DYNAMIC_CLASS(wxSpacingSizer, wxSizer) -#endif - -/* -TODO: - - Non shrink-to-fit row-col behaviour. - - Give justification styles, so can e.g. centre - the rows & cols, distribute the available space... - - Shrink-to-fit: should resize outer window (e.g. dialog box) - if directly associated with this kind of window. - - How to deal with a rowcol that stretches in one direction - but shrinks-to-fit in other. E.g. a horizontal toolbar: the width - stretches to fit the frame, but the height is constant - or wraps around contents. The algorithm currently assumes - both dimensions have the same behaviour. Could assume a constant - height (absolute value). - - rowcol where each row or column is aligned (length of - largest element determines spacing) - - Groupbox sizer - - Analyze aesthetic dialog boxes and implement using sizers. - - What reuseable components can we provide? E.g. Ok/Cancel/Help - group of buttons. - - use wxStaticItems for aesthetic dialogs. - -*/ - -// Find margin sizes if a sizer, or zero otherwise -int wxSizerMarginX(wxWindow *win) -{ - if ( win->IsKindOf(CLASSINFO(wxSizer)) ) - { - wxSizer *sizer = (wxSizer *)win; - return sizer->GetBorderX(); - } - else - return 0; -} - -int wxSizerMarginY(wxWindow *win) -{ - if ( win->IsKindOf(CLASSINFO(wxSizer)) ) - { - wxSizer *sizer = (wxSizer *)win; - return sizer->GetBorderY(); - } - else - return 0; -} - - -wxIndividualLayoutConstraint::wxIndividualLayoutConstraint() -{ - myEdge = wxTop; relationship = wxUnconstrained; margin = 0; value = 0; percent = 0; otherEdge = wxTop; - done = FALSE; otherWin = (wxWindow *) NULL; -} - -wxIndividualLayoutConstraint::~wxIndividualLayoutConstraint() -{ -} - -void wxIndividualLayoutConstraint::Set(wxRelationship rel, wxWindow *otherW, wxEdge otherE, int val, int marg) -{ - relationship = rel; otherWin = otherW; otherEdge = otherE; value = val; margin = marg; -} - -void wxIndividualLayoutConstraint::LeftOf(wxWindow *sibling, int marg) -{ Set(wxLeftOf, sibling, wxLeft, 0, marg); } - -void wxIndividualLayoutConstraint::RightOf(wxWindow *sibling, int marg) -{ Set(wxRightOf, sibling, wxRight, 0, marg); } - -void wxIndividualLayoutConstraint::Above(wxWindow *sibling, int marg) -{ Set(wxAbove, sibling, wxTop, 0, marg); } - -void wxIndividualLayoutConstraint::Below(wxWindow *sibling, int marg) -{ Set(wxBelow, sibling, wxBottom, 0, marg); } - -// -// 'Same edge' alignment -// -void wxIndividualLayoutConstraint::SameAs(wxWindow *otherW, wxEdge edge, int marg) -{ Set(wxPercentOf, otherW, edge, 0, marg); percent = 100; } - -// The edge is a percentage of the other window's edge -void wxIndividualLayoutConstraint::PercentOf(wxWindow *otherW, wxEdge wh, int per) -{ otherWin = otherW; relationship = wxPercentOf; percent = per; - otherEdge = wh; -} - -// -// Edge has absolute value -// -void wxIndividualLayoutConstraint::Absolute(int val) -{ value = val; relationship = wxAbsolute; } - -// Reset constraint if it mentions otherWin -bool wxIndividualLayoutConstraint::ResetIfWin(wxWindow *otherW) -{ - if (otherW == otherWin) - { - myEdge = wxTop; relationship = wxAsIs; margin = 0; value = 0; percent = 0; otherEdge = wxTop; - otherWin = (wxWindow *) NULL; - return TRUE; - } - else - return FALSE; -} - -// Try to satisfy constraint -bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constraints, wxWindow *win) -{ - if (relationship == wxAbsolute) - { - done = TRUE; - return TRUE; - } - - switch (myEdge) - { - case wxLeft: - { - switch (relationship) - { - case wxLeftOf: - { - // We can know this edge if: otherWin is win's parent, - // or otherWin has a satisfied constraint, or - // otherWin has no constraint. - int edgePos = GetEdge(otherEdge, win, otherWin); - if (edgePos != -1) - { - value = edgePos - margin; - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxRightOf: - { - int edgePos = GetEdge(otherEdge, win, otherWin); - if (edgePos != -1) - { - value = edgePos + margin; - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxPercentOf: - { - int edgePos = GetEdge(otherEdge, win, otherWin); - if (edgePos != -1) - { - value = (int)(edgePos*(((float)percent)*0.01) + margin); - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxUnconstrained: - { - // We know the left-hand edge position if we know - // the right-hand edge and we know the width; OR if we know the centre and the width. - if (constraints->right.GetDone() && constraints->width.GetDone()) - { - value = (constraints->right.GetValue() - constraints->width.GetValue() + margin); - done = TRUE; - return TRUE; - } - else if (constraints->centreX.GetDone() && constraints->width.GetDone()) - { - value = (int)(constraints->centreX.GetValue() - (constraints->width.GetValue()/2) + margin); - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxAsIs: - { - int y; - win->GetPosition(&value, &y); - done = TRUE; - return TRUE; - } - default: - break; - } - break; - } - case wxRight: - { - switch (relationship) - { - case wxLeftOf: - { - // We can know this edge if: otherWin is win's parent, - // or otherWin has a satisfied constraint, or - // otherWin has no constraint. - int edgePos = GetEdge(otherEdge, win, otherWin); - if (edgePos != -1) - { - value = edgePos - margin; - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxRightOf: - { - int edgePos = GetEdge(otherEdge, win, otherWin); - if (edgePos != -1) - { - value = edgePos + margin; - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxPercentOf: - { - int edgePos = GetEdge(otherEdge, win, otherWin); - if (edgePos != -1) - { - value = (int)(edgePos*(((float)percent)*0.01) - margin); - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxUnconstrained: - { - // We know the right-hand edge position if we know - // the left-hand edge and we know the width, OR if we know the - // centre edge and the width. - if (constraints->left.GetDone() && constraints->width.GetDone()) - { - value = (constraints->left.GetValue() + constraints->width.GetValue() - margin); - done = TRUE; - return TRUE; - } - else if (constraints->centreX.GetDone() && constraints->width.GetDone()) - { - value = (int)(constraints->centreX.GetValue() + (constraints->width.GetValue()/2) - margin); - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxAsIs: - { - int x, y; - int w, h; - win->GetSize(&w, &h); - win->GetPosition(&x, &y); - value = x + w; - done = TRUE; - return TRUE; - } - default: - break; - } - break; - } - case wxTop: - { - switch (relationship) - { - case wxAbove: - { - // We can know this edge if: otherWin is win's parent, - // or otherWin has a satisfied constraint, or - // otherWin has no constraint. - int edgePos = GetEdge(otherEdge, win, otherWin); - if (edgePos != -1) - { - value = edgePos - margin; - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxBelow: - { - int edgePos = GetEdge(otherEdge, win, otherWin); - if (edgePos != -1) - { - value = edgePos + margin; - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxPercentOf: - { - int edgePos = GetEdge(otherEdge, win, otherWin); - if (edgePos != -1) - { - value = (int)(edgePos*(((float)percent)*0.01) + margin); - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxUnconstrained: - { - // We know the top edge position if we know - // the bottom edge and we know the height; OR if we know the centre - // edge and the height. - if (constraints->bottom.GetDone() && constraints->height.GetDone()) - { - value = (constraints->bottom.GetValue() - constraints->height.GetValue() + margin); - done = TRUE; - return TRUE; - } - else if (constraints->centreY.GetDone() && constraints->height.GetDone()) - { - value = (constraints->centreY.GetValue() - (constraints->height.GetValue()/2) + margin); - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxAsIs: - { - int x; - win->GetPosition(&x, &value); - done = TRUE; - return TRUE; - } - default: - break; - } - break; - } - case wxBottom: - { - switch (relationship) - { - case wxAbove: - { - // We can know this edge if: otherWin is win's parent, - // or otherWin has a satisfied constraint, or - // otherWin has no constraint. - int edgePos = GetEdge(otherEdge, win, otherWin); - if (edgePos != -1) - { - value = edgePos + margin; - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxBelow: - { - int edgePos = GetEdge(otherEdge, win, otherWin); - if (edgePos != -1) - { - value = edgePos - margin; - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxPercentOf: - { - int edgePos = GetEdge(otherEdge, win, otherWin); - if (edgePos != -1) - { - value = (int)(edgePos*(((float)percent)*0.01) - margin); - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxUnconstrained: - { - // We know the bottom edge position if we know - // the top edge and we know the height; OR if we know the - // centre edge and the height. - if (constraints->top.GetDone() && constraints->height.GetDone()) - { - value = (constraints->top.GetValue() + constraints->height.GetValue() - margin); - done = TRUE; - return TRUE; - } - else if (constraints->centreY.GetDone() && constraints->height.GetDone()) - { - value = (constraints->centreY.GetValue() + (constraints->height.GetValue()/2) - margin); - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxAsIs: - { - int x, y; - int w, h; - win->GetSize(&w, &h); - win->GetPosition(&x, &y); - value = h + y; - done = TRUE; - return TRUE; - } - default: - break; - } - break; - } - case wxCentreX: - { - switch (relationship) - { - case wxLeftOf: - { - // We can know this edge if: otherWin is win's parent, - // or otherWin has a satisfied constraint, or - // otherWin has no constraint. - int edgePos = GetEdge(otherEdge, win, otherWin); - if (edgePos != -1) - { - value = edgePos - margin; - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxRightOf: - { - int edgePos = GetEdge(otherEdge, win, otherWin); - if (edgePos != -1) - { - value = edgePos + margin; - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxPercentOf: - { - int edgePos = GetEdge(otherEdge, win, otherWin); - if (edgePos != -1) - { - value = (int)(edgePos*(((float)percent)*0.01) + margin); - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxUnconstrained: - { - // We know the centre position if we know - // the left-hand edge and we know the width, OR - // the right-hand edge and the width - if (constraints->left.GetDone() && constraints->width.GetDone()) - { - value = (int)(constraints->left.GetValue() + (constraints->width.GetValue()/2) + margin); - done = TRUE; - return TRUE; - } - else if (constraints->right.GetDone() && constraints->width.GetDone()) - { - value = (int)(constraints->left.GetValue() - (constraints->width.GetValue()/2) + margin); - done = TRUE; - return TRUE; - } - else - return FALSE; - } - default: - break; - } - break; - } - case wxCentreY: - { - switch (relationship) - { - case wxAbove: - { - // We can know this edge if: otherWin is win's parent, - // or otherWin has a satisfied constraint, or - // otherWin has no constraint. - int edgePos = GetEdge(otherEdge, win, otherWin); - if (edgePos != -1) - { - value = edgePos - margin; - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxBelow: - { - int edgePos = GetEdge(otherEdge, win, otherWin); - if (edgePos != -1) - { - value = edgePos + margin; - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxPercentOf: - { - int edgePos = GetEdge(otherEdge, win, otherWin); - if (edgePos != -1) - { - value = (int)(edgePos*(((float)percent)*0.01) + margin); - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxUnconstrained: - { - // We know the centre position if we know - // the top edge and we know the height, OR - // the bottom edge and the height. - if (constraints->bottom.GetDone() && constraints->height.GetDone()) - { - value = (int)(constraints->bottom.GetValue() - (constraints->height.GetValue()/2) + margin); - done = TRUE; - return TRUE; - } - else if (constraints->top.GetDone() && constraints->height.GetDone()) - { - value = (int)(constraints->top.GetValue() + (constraints->height.GetValue()/2) + margin); - done = TRUE; - return TRUE; - } - else - return FALSE; - } - default: - break; - } - break; - } - case wxWidth: - { - switch (relationship) - { - case wxPercentOf: - { - int edgePos = GetEdge(otherEdge, win, otherWin); - if (edgePos != -1) - { - value = (int)(edgePos*(((float)percent)*0.01)); - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxAsIs: - { - if (win) - { - int h; - win->GetSize(&value, &h); - done = TRUE; - return TRUE; - } - else return FALSE; - } - case wxUnconstrained: - { - // We know the width if we know the left edge and the right edge, OR - // if we know the left edge and the centre, OR - // if we know the right edge and the centre - if (constraints->left.GetDone() && constraints->right.GetDone()) - { - value = constraints->right.GetValue() - constraints->left.GetValue(); - done = TRUE; - return TRUE; - } - else if (constraints->centreX.GetDone() && constraints->left.GetDone()) - { - value = (int)(2*(constraints->centreX.GetValue() - constraints->left.GetValue())); - done = TRUE; - return TRUE; - } - else if (constraints->centreX.GetDone() && constraints->right.GetDone()) - { - value = (int)(2*(constraints->right.GetValue() - constraints->centreX.GetValue())); - done = TRUE; - return TRUE; - } - else - return FALSE; - } - default: - break; - } - break; - } - case wxHeight: - { - switch (relationship) - { - case wxPercentOf: - { - int edgePos = GetEdge(otherEdge, win, otherWin); - if (edgePos != -1) - { - value = (int)(edgePos*(((float)percent)*0.01)); - done = TRUE; - return TRUE; - } - else - return FALSE; - } - case wxAsIs: - { - if (win) - { - int w; - win->GetSize(&w, &value); - done = TRUE; - return TRUE; - } - else return FALSE; - } - case wxUnconstrained: - { - // We know the height if we know the top edge and the bottom edge, OR - // if we know the top edge and the centre, OR - // if we know the bottom edge and the centre - if (constraints->top.GetDone() && constraints->bottom.GetDone()) - { - value = constraints->bottom.GetValue() - constraints->top.GetValue(); - done = TRUE; - return TRUE; - } - else if (constraints->top.GetDone() && constraints->centreY.GetDone()) - { - value = (int)(2*(constraints->centreY.GetValue() - constraints->top.GetValue())); - done = TRUE; - return TRUE; - } - else if (constraints->bottom.GetDone() && constraints->centreY.GetDone()) - { - value = (int)(2*(constraints->bottom.GetValue() - constraints->centreY.GetValue())); - done = TRUE; - return TRUE; - } - else - return FALSE; - } - default: - break; - } - break; - } - default: - break; - } - return FALSE; -} - -// Get the value of this edge or dimension, or if this -// is not determinable, -1. -int wxIndividualLayoutConstraint::GetEdge(wxEdge which, - wxWindow *thisWin, - wxWindow *other) const -{ - // If the edge or dimension belongs to the parent, then we - // know the dimension is obtainable immediately. - // E.g. a wxExpandSizer may contain a button (but the button's - // true parent is a panel, not the sizer) - if (other->GetChildren()->Member(thisWin)) - { - switch (which) - { - case wxLeft: - { - return wxSizerMarginX(other); - } - case wxTop: - { - return wxSizerMarginY(other); - } - case wxRight: - { - int w, h; - other->GetClientSizeConstraint(&w, &h); - return w - wxSizerMarginX(other); - } - case wxBottom: - { - int w, h; - other->GetClientSizeConstraint(&w, &h); - return h - wxSizerMarginY(other); - } - case wxWidth: - { - int w, h; - other->GetClientSizeConstraint(&w, &h); - return w - 2*wxSizerMarginX(other); - } - case wxHeight: - { - int w, h; - other->GetClientSizeConstraint(&w, &h); - return h - 2*wxSizerMarginY(other); - } - case wxCentreX: - case wxCentreY: - { - int w, h; - other->GetClientSizeConstraint(&w, &h); - if (which == wxCentreX) - return (int)(w/2); - else - return (int)(h/2); - } - default: - return -1; - } - } - switch (which) - { - case wxLeft: - { - wxLayoutConstraints *constr = other->GetConstraints(); - // If no constraints, it means the window is not dependent - // on anything, and therefore we know its value immediately - if (constr) - { - if (constr->left.GetDone()) - return constr->left.GetValue(); - else - return -1; - } - else - { - int x, y; - other->GetPosition(&x, &y); - return x; - } - } - case wxTop: - { - wxLayoutConstraints *constr = other->GetConstraints(); - // If no constraints, it means the window is not dependent - // on anything, and therefore we know its value immediately - if (constr) - { - if (constr->top.GetDone()) - return constr->top.GetValue(); - else - return -1; - } - else - { - int x, y; - other->GetPosition(&x, &y); - return y; - } - } - case wxRight: - { - wxLayoutConstraints *constr = other->GetConstraints(); - // If no constraints, it means the window is not dependent - // on anything, and therefore we know its value immediately - if (constr) - { - if (constr->right.GetDone()) - return constr->right.GetValue(); - else - return -1; - } - else - { - int x, y, w, h; - other->GetPosition(&x, &y); - other->GetSize(&w, &h); - return (int)(x + w); - } - } - case wxBottom: - { - wxLayoutConstraints *constr = other->GetConstraints(); - // If no constraints, it means the window is not dependent - // on anything, and therefore we know its value immediately - if (constr) - { - if (constr->bottom.GetDone()) - return constr->bottom.GetValue(); - else - return -1; - } - else - { - int x, y, w, h; - other->GetPosition(&x, &y); - other->GetSize(&w, &h); - return (int)(y + h); - } - } - case wxWidth: - { - wxLayoutConstraints *constr = other->GetConstraints(); - // If no constraints, it means the window is not dependent - // on anything, and therefore we know its value immediately - if (constr) - { - if (constr->width.GetDone()) - return constr->width.GetValue(); - else - return -1; - } - else - { - int w, h; - other->GetSize(&w, &h); - return w; - } - } - case wxHeight: - { - wxLayoutConstraints *constr = other->GetConstraints(); - // If no constraints, it means the window is not dependent - // on anything, and therefore we know its value immediately - if (constr) - { - if (constr->height.GetDone()) - return constr->height.GetValue(); - else - return -1; - } - else - { - int w, h; - other->GetSize(&w, &h); - return h; - } - } - case wxCentreX: - { - wxLayoutConstraints *constr = other->GetConstraints(); - // If no constraints, it means the window is not dependent - // on anything, and therefore we know its value immediately - if (constr) - { - if (constr->centreX.GetDone()) - return constr->centreX.GetValue(); - else - return -1; - } - else - { - int x, y, w, h; - other->GetPosition(&x, &y); - other->GetSize(&w, &h); - return (int)(x + (w/2)); - } - } - case wxCentreY: - { - wxLayoutConstraints *constr = other->GetConstraints(); - // If no constraints, it means the window is not dependent - // on anything, and therefore we know its value immediately - if (constr) - { - if (constr->centreY.GetDone()) - return constr->centreY.GetValue(); - else - return -1; - } - else - { - int x, y, w, h; - other->GetPosition(&x, &y); - other->GetSize(&w, &h); - return (int)(y + (h/2)); - } - } - default: - break; - } - return -1; -} - -wxLayoutConstraints::wxLayoutConstraints() -{ - left.SetEdge(wxLeft); - top.SetEdge(wxTop); - right.SetEdge(wxRight); - bottom.SetEdge(wxBottom); - centreX.SetEdge(wxCentreX); - centreY.SetEdge(wxCentreY); - width.SetEdge(wxWidth); - height.SetEdge(wxHeight); -} - -wxLayoutConstraints::~wxLayoutConstraints() -{ -} - -bool wxLayoutConstraints::SatisfyConstraints(wxWindow *win, int *nChanges) -{ - int noChanges = 0; - - bool done = width.GetDone(); - bool newDone = (done ? TRUE : width.SatisfyConstraint(this, win)); - if (newDone != done) - noChanges ++; - - done = height.GetDone(); - newDone = (done ? TRUE : height.SatisfyConstraint(this, win)); - if (newDone != done) - noChanges ++; - - done = left.GetDone(); - newDone = (done ? TRUE : left.SatisfyConstraint(this, win)); - if (newDone != done) - noChanges ++; - - done = top.GetDone(); - newDone = (done ? TRUE : top.SatisfyConstraint(this, win)); - if (newDone != done) - noChanges ++; - - done = right.GetDone(); - newDone = (done ? TRUE : right.SatisfyConstraint(this, win)); - if (newDone != done) - noChanges ++; - - done = bottom.GetDone(); - newDone = (done ? TRUE : bottom.SatisfyConstraint(this, win)); - if (newDone != done) - noChanges ++; - - done = centreX.GetDone(); - newDone = (done ? TRUE : centreX.SatisfyConstraint(this, win)); - if (newDone != done) - noChanges ++; - - done = centreY.GetDone(); - newDone = (done ? TRUE : centreY.SatisfyConstraint(this, win)); - if (newDone != done) - noChanges ++; - - *nChanges = noChanges; - - return AreSatisfied(); -} - -/* - * Main constrained layout algorithm. Look at all the child - * windows, and their constraints (if any). - * The idea is to keep iterating through the constraints - * until all left, right, bottom and top edges, and widths and heights, - * are known (or no change occurs and we've failed to resolve all - * constraints). - * - * If the user has not specified a dimension or edge, it will be - * be calculated from the other known values. E.g. If we know - * the right hand edge and the left hand edge, we now know the width. - * The snag here is that this means we must specify absolute dimensions - * twice (in constructor and in constraint), if we wish to use the - * constraint notation to just set the position, for example. - * Otherwise, if we only set ONE edge and no dimension, it would never - * find the other edge. - * - * Algorithm: - - Mark all constraints as not done. - - iterations = 0; - until no change or iterations >= max iterations - For each child: - { - Calculate all constraints - } - iterations ++; - - For each child - Set each calculated position and size - - */ - -bool wxOldDoLayout(wxWindow *win) -{ - // Make sure this isn't called recursively from below - static wxList doneSoFar; - - if (doneSoFar.Member(win)) - return TRUE; - - doneSoFar.Append(win); - - wxNode *node = win->GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow *)node->Data(); - wxLayoutConstraints *constr = child->GetConstraints(); - if (constr) - { - constr->left.SetDone(FALSE); - constr->top.SetDone(FALSE); - constr->right.SetDone(FALSE); - constr->bottom.SetDone(FALSE); - constr->width.SetDone(FALSE); - constr->height.SetDone(FALSE); - constr->centreX.SetDone(FALSE); - constr->centreY.SetDone(FALSE); - } - node = node->Next(); - } - int noIterations = 0; - int maxIterations = 500; - int noChanges = 1; - - while ((noChanges > 0) && (noIterations < maxIterations)) - { - noChanges = 0; - wxNode *node = win->GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow *)node->Data(); - wxLayoutConstraints *constr = child->GetConstraints(); - if (constr) - { - int tempNoChanges = 0; - (void)constr->SatisfyConstraints(child, &tempNoChanges); - noChanges += tempNoChanges; - } - node = node->Next(); - } - noIterations ++; - } -/* - // Would be nice to have a test here to see _which_ constraint(s) - // failed, so we can print a specific diagnostic message. - if (noFailures > 0) - { - wxDebugMsg(_("wxWindow::Layout() failed.\n")); - } -*/ - // Now set the sizes and positions of the children, and - // recursively call Layout(). - node = win->GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow *)node->Data(); - wxLayoutConstraints *constr = child->GetConstraints(); - if (constr && constr->left.GetDone() && constr->right.GetDone() && - constr->width.GetDone() && constr->height.GetDone()) - { - int x = constr->left.GetValue(); - int y = constr->top.GetValue(); - int w = constr->width.GetValue(); - int h = constr->height.GetValue(); - - // If we don't want to resize this window, just move it... - if ((constr->width.GetRelationship() != wxAsIs) || - (constr->height.GetRelationship() != wxAsIs)) - { - // _Should_ call Layout() recursively. - child->SetSize(x, y, w, h); - } - else - { - child->Move(x, y); - } - } - else - child->Layout(); - node = node->Next(); - } - doneSoFar.DeleteObject(win); - - return TRUE; -} - -wxSizer::wxSizer() -{ - sizerBehaviour = wxSizerNone; - borderX = 2; - borderY = 2; - sizerX = 0; - sizerY = 0; - sizerWidth = 0; - sizerHeight = 0; -} - -wxSizer::wxSizer(wxWindow *parent, wxSizerBehaviour behav) -{ - Create(parent, behav); -} - -bool wxSizer::Create(wxWindow *parent, wxSizerBehaviour behav) -{ - sizerBehaviour = behav; - borderX = 2; - borderY = 2; - m_sizerParent = parent; - sizerX = 0; - sizerY = 0; - sizerWidth = 0; - sizerHeight = 0; - - // A normal window can have just one top-level sizer - // associated with it. - if (!parent->IsKindOf(CLASSINFO(wxSizer))) - { - parent->SetSizer(this); - } - else - ((wxSizer *)parent)->AddSizerChild(this); - - switch (sizerBehaviour) - { - case wxSizerExpand: - { - // Defines a set of constraints - // to expand the sizer to fit the parent window - wxLayoutConstraints *c = new wxLayoutConstraints; - - c->left.SameAs(parent, wxLeft, 0); - c->top.SameAs(parent, wxTop, 0); - c->right.SameAs(parent, wxRight, 0); - c->bottom.SameAs(parent, wxBottom, 0); - - SetConstraints(c); - break; - } - case wxSizerShrink: - case wxSizerNone: - default: - { - } - } - return TRUE; -} - -wxSizer::~wxSizer() -{ - // Remove all children without deleting them, - // or ~wxbWindow will delete proper windows _twice_ - wxNode *node = GetChildren()->First(); - while (node) - { - wxNode *next = node->Next(); - wxWindow *win = (wxWindow *)node->Data(); - if (!win->IsKindOf(CLASSINFO(wxSizer))) - { - delete node; - win->SetSizerParent((wxWindow *) NULL); - } - else - { - RemoveSizerChild(win); - delete win; - } - node = next; - } - - if (m_sizerParent) // && !m_sizerParent->IsKindOf(CLASSINFO(wxSizer))) - { - m_sizerParent->SetSizer((wxSizer *) NULL); - m_sizerParent = (wxWindow *) NULL; - } - -} - -void wxSizer::SetBorder(int x, int y) -{ - borderX = x; - borderY = y; -/* No: the margin is for inside, not outside (expansion) - - if ( GetConstraints() ) - { - GetConstraints()->left.SetMargin(x); - GetConstraints()->right.SetMargin(x); - GetConstraints()->top.SetMargin(y); - GetConstraints()->bottom.SetMargin(y); - } -*/ - -} - -void wxSizer::AddSizerChild(wxWindow *child) -{ - child->SetSizerParent(this); - GetChildren()->Append(child); - - // Add some constraints for the purpose of storing - // the relative position of the window/sizer - // during layout calculations. - if (!child->GetConstraints()) - { - wxLayoutConstraints *c = new wxLayoutConstraints; - c->left.AsIs(); - c->top.AsIs(); - c->width.AsIs(); - c->height.AsIs(); - int w, h; - child->GetSize(&w, &h); - c->width.SetValue(w); - c->height.SetValue(h); - - child->SetConstraints(c); - } -} - -void wxSizer::RemoveSizerChild(wxWindow *child) -{ - GetChildren()->DeleteObject(child); -} - -void wxSizer::SetSize(int x, int y, int w, int h, int WXUNUSED(flags)) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (x != -1) - { - sizerX = x; - if (constr) - constr->left.SetValue(x); - } - if (y != -1) - { - sizerY = y; - if (constr) - constr->top.SetValue(y); - } - if (w != -1) - { - sizerWidth = w; - if (constr) - constr->width.SetValue(w); - } - if (h != -1) - { - sizerHeight = h; - if (constr) - constr->height.SetValue(h); - } -} - -void wxSizer::Move(int x, int y) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (x != -1) - { - sizerX = x; - if (constr) - constr->left.SetValue(x); - } - if (y != -1) - { - sizerY = y; - if (constr) - constr->top.SetValue(y); - } -} - -void wxSizer::GetSize(int *w, int *h) const -{ - *w = sizerWidth; - *h = sizerHeight; -} - -void wxSizer::GetPosition(int *x, int *y) const -{ - *x = sizerX; - *y = sizerY; -} - -bool wxSizer::LayoutPhase1(int *noChanges) -{ - *noChanges = 0; - switch (sizerBehaviour) - { - case wxSizerExpand: - { - if (!m_sizerParent) - { - wxMessageBox(_("wxExpandSizer has no parent!"), _("Sizer error"), wxOK); - return TRUE; - } - - // Set the size to fill the parent client area - int pw, ph; - m_sizerParent->GetClientSize(&pw, &ph); - SetSize(GetBorderX(), GetBorderY(), pw - 2*GetBorderX(), ph - 2*GetBorderY()); - wxLayoutConstraints *constr = GetConstraints(); - - // Fill in the constraints - if (constr) - { - constr->left.SetValue(0); constr->left.SetDone(TRUE); - constr->top.SetValue(0); constr->right.SetDone(TRUE); - constr->width.SetValue(pw); constr->width.SetDone(TRUE); - constr->height.SetValue(ph); constr->height.SetDone(TRUE); - } - - return TRUE; - break; - } - case wxSizerShrink: - { - wxLayoutConstraints *constr = GetConstraints(); - - if (constr) - { - // Force the constraint to have as-is width and height - // if we're in shrink-to-fit mode, because if left unconstrained, - // SatisfyConstraints will fail. The shrink-to-fit option - // essentially specifies the width and height as 'whatever I calculate'. - constr->width.AsIs(); - constr->height.AsIs(); - } - DoPhase(1); - DoPhase(2); - // Find the bounding box and set own size - int maxX = 0; - int maxY = 0; - wxNode *node = GetChildren()->First(); - while (node) - { - int x, y, width, height; - wxWindow *win = (wxWindow *)node->Data(); - win->GetSizeConstraint(&width, &height); - win->GetPositionConstraint(&x, &y); - if ((x+width) > maxX) - maxX = (x + width); - if ((y+height) > maxY) - maxY = (y + height); - node = node->Next(); - } - SetSize(GetBorderX(), GetBorderY(), maxX, maxY); - - // If this is the only sizer for the parent, size the parent to this sizer. - if ( m_sizerParent && (m_sizerParent->GetSizer() == this) ) - m_sizerParent->SetClientSize(maxX + 2*GetBorderX(), maxY + 2*GetBorderY()); - - return TRUE; - break; - } - case wxSizerNone: - { - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - bool success = constr->SatisfyConstraints(this, noChanges); - if (success) - { - int x = constr->left.GetValue(); - int y = constr->top.GetValue(); - int w = constr->width.GetValue(); - int h = constr->height.GetValue(); - SetSize(x, y, w, h); - } - return success; - } - else - return TRUE; - break; - } - } - return TRUE; - -} - -bool wxSizer::LayoutPhase2(int *noChanges) -{ - *noChanges = 0; - - switch (sizerBehaviour) - { - case wxSizerExpand: - { - // Layout children - DoPhase(1); - DoPhase(2); - return TRUE; - } - case wxSizerShrink: - { - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - bool success = constr->SatisfyConstraints(this, noChanges); - if (success) - { - int x = constr->left.GetValue(); - int y = constr->top.GetValue(); - Move(x, y); - } - return success; - } - break; - } - case wxSizerNone: - { - // Layout children - DoPhase(1); - DoPhase(2); - - // Is this a dumb fix for lack of constraint evaluation? - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - bool success = constr->SatisfyConstraints(this, noChanges); - if (success) - { - int x = constr->left.GetValue(); - int y = constr->top.GetValue(); - int w = constr->width.GetValue(); - int h = constr->height.GetValue(); - SetSize(x, y, w, h); - } - return success; - } - else - return TRUE; - } - } - return TRUE; -} - -/* - * wxRowColSizer - */ - -wxRowColSizer::wxRowColSizer() -{ - rowOrCol = TRUE; - rowOrColSize = 20; - xSpacing = 2; - ySpacing = 2; -} - -wxRowColSizer::wxRowColSizer(wxWindow *parent, bool rc, int n, wxSizerBehaviour behav) -{ - Create(parent, rc, n, behav); -} - -bool wxRowColSizer::Create(wxWindow *parent, bool rc, int n, wxSizerBehaviour behav) -{ - wxSizer::Create(parent, behav); - - rowOrCol = rc; - rowOrColSize = n; - xSpacing = 2; - ySpacing = 2; - - return TRUE; -} - -wxRowColSizer::~wxRowColSizer() -{ -} - -void wxRowColSizer::SetSize(int x, int y, int w, int h, int flags) -{ - wxSizer::SetSize(x, y, w, h, flags); -} - -bool wxRowColSizer::LayoutPhase1(int *noChanges) -{ - *noChanges = 0; - wxLayoutConstraints *constr = GetConstraints(); - - if (constr) - { - // Force the constraint to have as-is width and height - // if we're in shrink-to-fit mode, because if left unconstrained, - // SatisfyConstraints will fail. The shrink-to-fit option - // essentially specifies the width and height as 'whatever I calculate'. - if (sizerBehaviour == wxSizerShrink) - { - constr->width.AsIs(); - constr->height.AsIs(); - } - - // Only evaluate the constraints FIRST if we're NOT - // in shrink-to-fit mode, i.e. we want to size the rowcol - // first, then lay the children out in the space we've calculated. - if (sizerBehaviour != wxSizerShrink) - { - bool success = constr->SatisfyConstraints(this, noChanges); - if (success) - { - int x = constr->left.GetValue(); - int y = constr->top.GetValue(); - int w = constr->width.GetValue(); - int h = constr->height.GetValue(); - SetSize(x, y, w, h); - } - else - return FALSE; - - // Continue to do the rest of the phase when the constraints have been - // satisfied, i.e. we're on the last iteration of phase 1 and - // can now do the actual rowcol laying out. - } - } - - // If we ARE in shrink-to-fit mode, we must now - // calculate the child sizes BEFORE laying out in rows or columns. - if (sizerBehaviour == wxSizerShrink) - { - DoPhase(1); - DoPhase(2); - - // WILL THE WINDOW BE SIZED CORRECTLY AT THIS POINT? - // CHECK CONSTRAINTS IF ANY... - int noRows = 0; - int noCols = 0; - int currentX = borderX; - int currentY = borderY; - int maxX = currentX; - int maxY = currentY; - - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - int childWidth, childHeight; - if (win->GetConstraints() && - win->GetConstraints()->width.GetDone() && - win->GetConstraints()->height.GetDone()) - { - childWidth = win->GetConstraints()->width.GetValue(); - childHeight = win->GetConstraints()->height.GetValue(); - } - else - win->GetSize(&childWidth, &childHeight); - - win->MoveConstraint(currentX, currentY); - - if ((currentX + childWidth) > maxX) - maxX = (currentX + childWidth); - if ((currentY + childHeight) > maxY) - maxY = (currentY + childHeight); - - if (rowOrCol) - { - currentX += childWidth + xSpacing; - noCols ++; - - // Reset to start of row - if (noCols == rowOrColSize) - { - currentX = borderX; - currentY += childHeight + ySpacing; - noCols = 0; - } - } - else - { - currentY += childHeight + ySpacing; - noRows ++; - - // Reset to start of col - if (noRows == rowOrColSize) - { - currentY = borderY; - currentX += childWidth + xSpacing; - noRows = 0; - } - } - - node = node->Next(); - } - maxX += borderX; - maxY += borderY; - - SetSize(-1, -1, maxX, maxY); - } - return TRUE; -} - -bool wxRowColSizer::LayoutPhase2(int *noChanges) -{ - *noChanges = 0; - - // If shrink-to-fit, it's only at Phase 2 that we know the size of - // the wxRowColSizer, and now we can evaluate the - // constraints and pass result back up to parent. - // This implements a depth-first strategy - if (sizerBehaviour == wxSizerShrink) - { - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - bool success = constr->SatisfyConstraints(this, noChanges); - if (success) - { - int x = constr->left.GetValue(); - int y = constr->top.GetValue(); - Move(x, y); - } - return success; - } - else return TRUE; - } - else - { - // Lay out the children: breadth-first strategy. - DoPhase(1); - DoPhase(2); - - // Space them - } - return TRUE; -} - - -/* - * wxSpacingSizer - */ - -wxSpacingSizer::wxSpacingSizer() -{ -} - -wxSpacingSizer::wxSpacingSizer(wxWindow *parent) -{ - Create(parent); -} - -wxSpacingSizer::wxSpacingSizer(wxWindow *parent, wxRelationship rel, wxWindow *other, int spacing) -{ - Create(parent, rel, other, spacing); -} - -bool wxSpacingSizer::Create(wxWindow *parent) -{ - wxSizer::Create(parent); - return TRUE; -} - -bool wxSpacingSizer::Create(wxWindow *parent, wxRelationship rel, wxWindow *other, int spacing) -{ - wxLayoutConstraints *c = new wxLayoutConstraints; - - wxSizer::Create(parent); - - switch ( rel ) - { - case wxLeftOf : - c->width.Absolute (spacing); - c->top.SameAs (other, wxTop); - c->bottom.SameAs (other, wxBottom); - c->right.LeftOf (other); - break; - case wxRightOf : - c->width.Absolute (spacing); - c->top.SameAs (other, wxTop); - c->bottom.SameAs (other, wxBottom); - c->left.RightOf (other); - break; - case wxBelow : - c->height.Absolute (spacing); - c->left.SameAs (other, wxLeft); - c->right.SameAs (other, wxRight); - c->top.Below (other); - break; - case wxAbove : - c->height.Absolute (spacing); - c->left.SameAs (other, wxLeft); - c->right.SameAs (other, wxRight); - c->bottom.Above (other); - break; - - default : - break; - } - SetConstraints(c); - - return TRUE; -} - -wxSpacingSizer::~wxSpacingSizer() -{ -} - - - -#endif diff --git a/src/common/lexer.l b/src/common/lexer.l deleted file mode 100644 index 02e95f54a9..0000000000 --- a/src/common/lexer.l +++ /dev/null @@ -1,195 +0,0 @@ -SIGN [+-] -DIGIT [0-9] -ALPHA [a-zA-Z_] -ALPHADIGIT [a-zA-Z_0-9] -STRINGCHAR [^"\\] -WORDCHAR [^'\\] - -%{ -/* - * File: lexer.l - * Description: Lexical analyser for PROLOGIO; can be used with - * either lex and flex. - */ -#include - -/* +++steve162e: added, otherwise, PROIO_input will be undefined (at least under LINUX) - please check, if this is also TRUE under other UNIXes. - */ - -#if defined(FLEX_SCANNER) && defined(_LINUX) -#define PROIO_input my_input -#endif -/* ---steve162e */ - -#include "wx/expr.h" - -#ifdef wx_x -extern char *malloc(); -#endif -#define Return(x) return x; - -#if defined(VMS) && !defined(strdup) -#define strdup(s) (strcpy((char *)malloc(strlen(s)+1), s)); -#endif - -static size_t lex_buffer_length = 0; -static const char *lex_buffer = NULL; -static size_t lex_string_ptr = 0; -static int lex_read_from_string = 0; - -static int my_input(void); -static int my_unput(char); - -#ifdef FLEX_SCANNER -#undef YY_INPUT -# define YY_INPUT(buf,result,max_size) \ - if (lex_read_from_string) \ - { int c = my_input(); result = (c == 0) ? YY_NULL : ((buf)[0]=(c), 1); } \ - else \ - if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \ - YY_FATAL_ERROR( "read() in flex scanner failed" ); -#else -# undef unput -# define unput(_c) my_unput(_c) -#endif - -%} - -%% - -{SIGN}?{DIGIT}+ {yylval.s = strdup(yytext); Return(INTEGER);} - -"e" Return(EXP); - -{ALPHA}{ALPHADIGIT}* {yylval.s = strdup(yytext); Return(WORD);} - -"'"{WORDCHAR}*"'" {int len = strlen(yytext); - yytext[len-1] = 0; - yylval.s = strdup(yytext+1); - Return(WORD);} - -\"({STRINGCHAR}|\\\"|\|\\\\|\\)*\" {yylval.s = strdup(yytext); Return(STRING);} - -"(" Return(OPEN); - -")" Return(CLOSE); - -"," Return(COMMA); - -"[" Return(OPEN_SQUARE); - -"]" Return(CLOSE_SQUARE); - -"=" Return(EQUALS); - -"." Return(PERIOD); - -[ \t] ; - -\n ; - -"/*" { loop: -#ifdef __cplusplus - while (yyinput() != '*'); - switch (yyinput()) -#else - while (input() != '*'); - switch (input()) -#endif - { - case '/': break; - case '*': unput('*'); - default: goto loop; - } - } - -. Return(ERROR); - -%% - - -#ifdef FLEX_SCANNER -static int lex_input() { - return input(); -} -#else /* BSD/AT&T lex */ -#ifndef input -# error "Sorry, but need either flex or AT&T lex" -#endif -static int lex_input() { - return input(); -} -/* # undef unput -# define unput(_c) my_unput(_c) -*/ - -# undef input -# define input() my_input() -static int my_unput(char c) -{ - if (lex_read_from_string) { - /* Make sure we have something */ - if (lex_string_ptr) { - if (c == '\n') yylineno--; - lex_string_ptr--; - } - } else { - yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar; -/* unput(c); Causes infinite recursion! */ - } - return c; -} - -#endif - -/* Public */ -void LexFromFile(FILE *fd) -{ - lex_read_from_string = 0; - yyin = fd; - /* Don't know why this is necessary, but otherwise - * lex only works _once_! - */ -#ifdef FLEX_SCANNER - yyrestart(fd); - yy_init = 1; -#endif -} - -void LexFromString(char *buffer) -{ - lex_read_from_string = 1; - lex_buffer = buffer; - lex_buffer_length = strlen(buffer); - lex_string_ptr = 0; - /* Don't know why this is necessary, but otherwise - * lex only works _once_! - */ -#ifdef FLEX_SCANNER - yy_init = 1; -#endif -} - -static int my_input( void ) -{ - if (lex_read_from_string) { - if (lex_string_ptr == lex_buffer_length) - return 0; - else { - char c = lex_buffer[lex_string_ptr++]; -#ifndef FLEX_SCANNER - if (c == '\n') yylineno++; -#endif - return c; - } - } else { - return lex_input(); - } -} - -void wxExprCleanUp() -{ - if (yy_current_buffer) - yy_delete_buffer(yy_current_buffer); -} diff --git a/src/common/list.cpp b/src/common/list.cpp deleted file mode 100644 index 0db540b157..0000000000 --- a/src/common/list.cpp +++ /dev/null @@ -1,607 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: list.cpp -// Purpose: wxList implementation -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "list.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#include "wx/list.h" -#include "wx/utils.h" -#include -#endif - -// Sun CC compatibility (interference with xview/pkg.h, apparently...) -#if defined(SUN_CC) && defined(__XVIEW__) -#undef va_start -#undef va_end -#undef va_arg -#undef va_list -#endif - -#include -#include -#include - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxNode, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxList, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxStringList, wxList) -#endif - -wxNode::wxNode (wxList * the_list, wxNode * last_one, wxNode * next_one, - wxObject * object) -{ - data = object; - previous = last_one; - next = next_one; - list = the_list; - key.string = (char *) NULL; - - if (previous) - previous->next = this; - - if (next) - next->previous = this; -} - -// Keyed constructor -wxNode::wxNode (wxList * the_list, wxNode * last_one, wxNode * next_one, - wxObject * object, long the_key) -{ - data = object; - previous = last_one; - next = next_one; - list = the_list; - key.integer = the_key; - - if (previous) - previous->next = this; - - if (next) - next->previous = this; -} - -wxNode::wxNode (wxList * the_list, wxNode * last_one, wxNode * next_one, - wxObject * object, const char *the_key) -{ - data = object; - previous = last_one; - next = next_one; - list = the_list; - key.string = copystring (the_key); - - if (previous) - previous->next = this; - - if (next) - next->previous = this; -} - - -wxNode::~wxNode (void) -{ - if (list) - list->n--; - - if (list && list->destroy_data) - delete data; - - if (list && list->key_type == wxKEY_STRING && key.string) - delete[]key.string; - - // Make next node point back to the previous node from here - if (next) - next->previous = previous; - else if (list) - // If there's a new end of list (deleting the last one) - // make sure the list knows about it. - list->last_node = previous; - - // Make the previous node point to the next node from here - if (previous) - previous->next = next; - - // Or if no previous node (start of list), make sure list points at - // the next node which becomes the first!. - else if (list) - list->first_node = next; -} - -wxList::wxList (void) -{ - first_node = (wxNode *) NULL; - last_node = (wxNode *) NULL; - n = 0; - destroy_data = 0; - key_type = wxKEY_NONE; -} - -wxList::wxList (int N, wxObject * Objects[]) -{ - wxNode *last = (wxNode *) NULL; - - int i; - for (i = 0; i < N; i++) - { - wxNode *next = new wxNode (this, last, (wxNode *) NULL, Objects[i]); - last = next; - if (i == 0) - first_node = next; - } - last_node = last; - n = N; - key_type = wxKEY_NONE; -} - -wxList::wxList (const unsigned int the_key_type) -{ - n = 0; - destroy_data = 0; - first_node = (wxNode *) NULL; - last_node = (wxNode *) NULL; - key_type = the_key_type; -} - -// Variable argument list, terminated by a zero -wxList::wxList (wxObject * first_one...) -{ -// #ifndef __SGI__ - va_list ap; - - va_start (ap, first_one); - - wxNode *last = new wxNode (this, (wxNode *) NULL, (wxNode *) NULL, first_one); - first_node = last; - n = 1; - - for (;;) - { - wxObject *object = va_arg (ap, wxObject *); -// if (object == NULL) // Doesn't work in Windows -- segment is non-zero for NULL! -#ifdef __WXMSW__ - if ((int) object == 0) -#else - if ((long) object == 0) -#endif - break; - else - { - wxNode *node = new wxNode (this, last, (wxNode *) NULL, object); - last = node; - n++; - } - } - last_node = last; - va_end (ap); - - destroy_data = 0; - key_type = wxKEY_NONE; -/* -#else - fprintf (stderr, "Error: cannot use variable-argument functions on SGI!\n"); -#endif -*/ -} - -wxList::~wxList (void) -{ - wxNode *each = first_node; - while (each) - { - wxNode *next = each->Next (); - delete each; - each = next; - } -} - -wxNode *wxList::Append(wxObject *object) -{ - wxNode *node = new wxNode(this, last_node, (wxNode *) NULL, object); - if (!first_node) - first_node = node; - last_node = node; - n ++; - return node; -} - -wxNode *wxList::Nth (int i) const -{ - int j = 0; - for (wxNode * current = First (); current; current = current->Next ()) - { - if (j++ == i) - return current; - } - return (wxNode *) NULL; // No such element - -} - -wxNode *wxList::Find (long key) const -{ - wxNode *current = First(); - while (current) - { - if (current->key.integer == key) - return current; - current = current->Next(); - } - - return (wxNode *) NULL; // Not found! -} - -wxNode *wxList::Find (const char *key) const -{ - wxNode *current = First(); - while (current) - { - if (!current->key.string) - { - wxFatalError (_("wxList: string key not present, probably did not Append correctly!")); - break; - } - if (strcmp (current->key.string, key) == 0) - return current; - current = current->Next(); - } - - return (wxNode *) NULL; // Not found! - -} - -wxNode *wxList::Member (wxObject * object) const -{ - for (wxNode * current = First (); current; current = current->Next ()) - { - wxObject *each = current->Data (); - if (each == object) - return current; - } - return (wxNode *) NULL; -} - -bool wxList::DeleteNode (wxNode * node) -{ - if (node) - { - delete node; - return TRUE; - } - return FALSE; -} - -bool wxList::DeleteObject (wxObject * object) -{ - // Search list for object - for (wxNode * current = first_node; current; current = current->Next ()) - { - if (current->Data () == object) - { - delete current; - return TRUE; - } - } - return FALSE; // Did not find the object - -} - - -// Insert new node at front of list -wxNode *wxList::Insert (wxObject * object) -{ - wxNode *node = new wxNode (this, (wxNode *) NULL, First (), object); - first_node = node; - - if (!(node->Next ())) - last_node = node; - - n++; - return node; -} - - -// Insert new node before given node. -wxNode *wxList::Insert (wxNode * position, wxObject * object) -{ - wxNode *prev = (wxNode *) NULL; - if (position) - prev = position->Previous (); - - wxNode *node = new wxNode (this, prev, position, object); - if (!first_node) - { - first_node = node; - last_node = node; - } - if (!prev) - first_node = node; - - n++; - return node; -} - -// Keyed append -wxNode *wxList::Append (long key, wxObject * object) -{ - wxNode *node = new wxNode (this, last_node, (wxNode *) NULL, object, key); - if (!first_node) - first_node = node; - last_node = node; - n++; - return node; -} - -wxNode *wxList::Append (const char *key, wxObject * object) -{ - wxNode *node = new wxNode (this, last_node, (wxNode *) NULL, object, key); - if (!first_node) - first_node = node; - last_node = node; - n++; - return node; -} - -void wxList::Clear (void) -{ - wxNode *current = first_node; - while (current) - { - wxNode *next = current->Next (); - delete current; - current = next; - } - first_node = (wxNode *) NULL; - last_node = (wxNode *) NULL; - n = 0; -} - -//Executes function F with all items present in the list -void wxList::ForEach(wxListIterateFunction F) -{ - wxNode *each = first_node; - while (each) - { (*F)( each->Data ()); - each = each->Next(); - } -} -// Returns a pointer to the item which returns TRUE with function F -// or NULL if no such item found -wxObject *wxList::FirstThat(wxListIterateFunction F) -{ - wxNode *each = first_node; - while (each) - { if ((*F)( each->Data ())) return each->Data(); - each = each->Next(); - } - return (wxNode *) NULL; -} -// Like FirstThat, but proceeds from the end backward -wxObject *wxList::LastThat(wxListIterateFunction F) -{ - wxNode *each = last_node; - while (each) - { if ((*F)( each->Data ())) return each->Data(); - each = each->Previous(); - } - return (wxNode *) NULL; -} - -// (stefan.hammes@urz.uni-heidelberg.de) -// -// function for sorting lists. the concept is borrowed from 'qsort'. -// by giving a sort function, arbitrary lists can be sorted. -// method: -// - put wxObject pointers into an array -// - sort the array with qsort -// - put back the sorted wxObject pointers into the list -// -// CAVE: the sort function receives pointers to wxObject pointers (wxObject **), -// so dereference right! -// EXAMPLE: -// int listcompare(const void *arg1, const void *arg2) -// { -// return(compare(**(wxString **)arg1, -// **(wxString **)arg2)); -// } -// -// void main() -// { -// wxList list; -// -// list.Append(new wxString("DEF")); -// list.Append(new wxString("GHI")); -// list.Append(new wxString("ABC")); -// list.Sort(listcompare); -// } - -void wxList::Sort(const wxSortCompareFunction compfunc) -{ - // allocate an array for the wxObject pointers of the list - const size_t num = Number(); - wxObject **objArray = new wxObject *[num]; - wxObject **objPtr = objArray; - - // go through the list and put the pointers into the array - wxNode *node = First(); - while(node!=NULL){ - *objPtr++ = node->Data(); - node = node->Next(); - } - // sort the array - qsort((void *)objArray,num,sizeof(wxObject *),compfunc); - // put the sorted pointers back into the list - objPtr = objArray; - node = First(); - while(node!=NULL){ - node->SetData(*objPtr++); - node = node->Next(); - } - // free the array - delete[] objArray; -} - -/* - * String list - * - */ - -wxStringList::wxStringList (void): -wxList () -{ -} - -// Variable argument list, terminated by a zero -// Makes new storage for the strings -wxStringList::wxStringList (const char *first...) -{ -// #ifndef __SGI__ - n = 0; - destroy_data = 0; - key_type = wxKEY_NONE; - first_node = (wxNode *) NULL; - last_node = (wxNode *) NULL; - - if (!first) - return; - - va_list ap; - - va_start (ap, first); - - wxNode *last = new wxNode (this, (wxNode *) NULL, (wxNode *) NULL, (wxObject *) copystring (first)); - first_node = last; - n = 1; - - for (;;) - { - char *s = va_arg (ap, char *); -// if (s == NULL) -#ifdef __WXMSW__ - if ((int) s == 0) -#else - if ((long) s == 0) -#endif - break; - else - { - wxNode *node = new wxNode (this, last, (wxNode *) NULL, (wxObject *) copystring (s)); - last = node; - n++; - } - } - last_node = last; - va_end (ap); -/* -#else - fprintf (stderr, "Error: cannot use variable-argument functions on SGI!\n"); -#endif -*/ -} - -wxStringList::~wxStringList (void) -{ - wxNode *each = first_node; - while (each) - { - char *s = (char *) each->Data (); - delete[]s; - wxNode *next = each->Next (); - delete each; - each = next; - } -} - -wxNode *wxStringList::Add (const char *s) -{ - return Append ((wxObject *) (copystring (s))); -} - -void wxStringList::Delete (const char *s) -{ - for (wxNode * node = First (); node; node = node->Next ()) - { - char *string = (char *) node->Data (); - if (string == s || strcmp (string, s) == 0) - { - delete[]string; - delete node; - break; // Done! - - } - } // for - -} - -// Only makes new strings if arg is TRUE -char **wxStringList::ListToArray (bool new_copies) const -{ - char **string_array = new char *[Number ()]; - wxNode *node = First (); - int i; - for (i = 0; i < n; i++) - { - char *s = (char *) node->Data (); - if (new_copies) - string_array[i] = copystring (s); - else - string_array[i] = s; - node = node->Next (); - } - return string_array; -} - -static int -wx_comparestrings (const void *arg1, const void *arg2) -{ - char **s1 = (char **) arg1; - char **s2 = (char **) arg2; - - return strcmp (*s1, *s2); -} - -// Sort a list of strings - deallocates old nodes, allocates new -void wxStringList::Sort (void) -{ - size_t N = n; - char **array = new char *[N]; - - size_t i = 0; - for (wxNode * node = First (); node; node = node->Next ()) - array[i++] = (char *) node->Data (); - - qsort (array, N, sizeof (char *), wx_comparestrings); - Clear (); - - for (i = 0; i < N; i++) - Append ((wxObject *) (array[i])); - - delete[]array; -} - -// Checks whether s is a member of the list -bool wxStringList::Member (const char *s) const -{ - for (wxNode * node = First (); node; node = node->Next ()) - { - const char *s1 = (const char *) node->Data (); - if (s == s1 || strcmp (s, s1) == 0) - return TRUE; - } - return FALSE; -} diff --git a/src/common/log.cpp b/src/common/log.cpp deleted file mode 100644 index bf1994214f..0000000000 --- a/src/common/log.cpp +++ /dev/null @@ -1,968 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: log.cpp -// Purpose: Assorted wxLogXXX functions, and wxLog (sink for logs) -// Author: Vadim Zeitlin -// Modified by: -// Created: 29/01/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- -#ifdef __GNUG__ - #pragma implementation "log.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif - -// wxWindows -#ifndef WX_PRECOMP - #include - #include - #include - #include - #include - - #include - #include - #include -#endif //WX_PRECOMP - -#include -#include -#include -#include - -// other standard headers -#include -#include -#include - -#ifdef __WXMSW__ - #include -#else //Unix - #include -#endif //Win/Unix - -// ---------------------------------------------------------------------------- -// non member functions -// ---------------------------------------------------------------------------- - -// define this to enable wrapping of log messages -//#define LOG_PRETTY_WRAP - -#ifdef LOG_PRETTY_WRAP - static void wxLogWrap(FILE *f, const char *pszPrefix, const char *psz); -#endif - -// ---------------------------------------------------------------------------- -// global variables -// ---------------------------------------------------------------------------- - -// we use a global variable to store the frame pointer for wxLogStatus - bad, -// but it's he easiest way -static wxFrame *gs_pFrame; - -// ============================================================================ -// implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// implementation of Log functions -// -// NB: unfortunately we need all these distinct functions, we can't make them -// macros and not all compilers inline vararg functions. -// ---------------------------------------------------------------------------- - -// log functions can't allocate memory (LogError("out of memory...") should -// work!), so we use a static buffer for all log messages -#define LOG_BUFFER_SIZE (4096) - -// static buffer for error messages (@@@ MT-unsafe) -static char s_szBuf[LOG_BUFFER_SIZE]; - -// generic log function -void wxLogGeneric(wxLogLevel level, const char *szFormat, ...) -{ - if ( wxLog::GetActiveTarget() != NULL ) { - va_list argptr; - va_start(argptr, szFormat); - vsprintf(s_szBuf, szFormat, argptr); - va_end(argptr); - - wxLog::OnLog(level, s_szBuf); - } -} - -#define IMPLEMENT_LOG_FUNCTION(level) \ - void wxLog##level(const char *szFormat, ...) \ - { \ - if ( wxLog::GetActiveTarget() != NULL ) { \ - va_list argptr; \ - va_start(argptr, szFormat); \ - vsprintf(s_szBuf, szFormat, argptr); \ - va_end(argptr); \ - \ - wxLog::OnLog(wxLOG_##level, s_szBuf); \ - } \ - } - -IMPLEMENT_LOG_FUNCTION(FatalError) -IMPLEMENT_LOG_FUNCTION(Error) -IMPLEMENT_LOG_FUNCTION(Warning) -IMPLEMENT_LOG_FUNCTION(Message) -IMPLEMENT_LOG_FUNCTION(Info) -IMPLEMENT_LOG_FUNCTION(Status) - -// accepts an additional argument which tells to which frame the output should -// be directed -void wxLogStatus(wxFrame *pFrame, const char *szFormat, ...) -{ - wxLog *pLog = wxLog::GetActiveTarget(); - if ( pLog != NULL ) { - va_list argptr; - va_start(argptr, szFormat); - vsprintf(s_szBuf, szFormat, argptr); - va_end(argptr); - - wxASSERT( gs_pFrame == NULL ); // should be reset! - gs_pFrame = pFrame; - wxLog::OnLog(wxLOG_Status, s_szBuf); - gs_pFrame = (wxFrame *) NULL; - } -} - -// same as info, but only if 'verbose' mode is on -void wxLogVerbose(const char *szFormat, ...) -{ - wxLog *pLog = wxLog::GetActiveTarget(); - if ( pLog != NULL && pLog->GetVerbose() ) { - va_list argptr; - va_start(argptr, szFormat); - vsprintf(s_szBuf, szFormat, argptr); - va_end(argptr); - - wxLog::OnLog(wxLOG_Info, s_szBuf); - } -} - -// debug functions -#ifdef __WXDEBUG__ -#define IMPLEMENT_LOG_DEBUG_FUNCTION(level) \ - void wxLog##level(const char *szFormat, ...) \ - { \ - if ( wxLog::GetActiveTarget() != NULL ) { \ - va_list argptr; \ - va_start(argptr, szFormat); \ - vsprintf(s_szBuf, szFormat, argptr); \ - va_end(argptr); \ - \ - wxLog::OnLog(wxLOG_##level, s_szBuf); \ - } \ - } - - void wxLogTrace(wxTraceMask mask, const char *szFormat, ...) - { - wxLog *pLog = wxLog::GetActiveTarget(); - - // we check that all of mask bits are set in the current mask, so - // that wxLogTrace(wxTraceRefCount | wxTraceOle) will only do something - // if both bits are set. - if ( pLog != NULL && ((pLog->GetTraceMask() & mask) == mask) ) { - va_list argptr; - va_start(argptr, szFormat); - vsprintf(s_szBuf, szFormat, argptr); - va_end(argptr); - - wxLog::OnLog(wxLOG_Trace, s_szBuf); - } - } - -#else // release - #define IMPLEMENT_LOG_DEBUG_FUNCTION(level) -#endif - -IMPLEMENT_LOG_DEBUG_FUNCTION(Debug) -IMPLEMENT_LOG_DEBUG_FUNCTION(Trace) - -// wxLogSysError: one uses the last error code, for other you must give it -// explicitly - -// common part of both wxLogSysError -void wxLogSysErrorHelper(long lErrCode) -{ - char szErrMsg[LOG_BUFFER_SIZE / 2]; - sprintf(szErrMsg, _(" (error %ld: %s)"), lErrCode, wxSysErrorMsg(lErrCode)); - strncat(s_szBuf, szErrMsg, WXSIZEOF(s_szBuf) - strlen(s_szBuf)); - - wxLog::OnLog(wxLOG_Error, s_szBuf); -} - -void WXDLLEXPORT wxLogSysError(const char *szFormat, ...) -{ - va_list argptr; - va_start(argptr, szFormat); - vsprintf(s_szBuf, szFormat, argptr); - va_end(argptr); - - wxLogSysErrorHelper(wxSysErrorCode()); -} - -void WXDLLEXPORT wxLogSysError(long lErrCode, const char *szFormat, ...) -{ - va_list argptr; - va_start(argptr, szFormat); - vsprintf(s_szBuf, szFormat, argptr); - va_end(argptr); - - wxLogSysErrorHelper(lErrCode); -} - -// ---------------------------------------------------------------------------- -// wxLog class implementation -// ---------------------------------------------------------------------------- - -wxLog::wxLog() -{ - m_bHasMessages = FALSE; - m_bVerbose = FALSE; - m_szTimeFormat = "[%d/%b/%y %H:%M:%S] "; -} - -wxLog *wxLog::GetActiveTarget() -{ - if ( ms_bAutoCreate && ms_pLogger == NULL ) { - // prevent infinite recursion if someone calls wxLogXXX() from - // wxApp::CreateLogTarget() - static bool s_bInGetActiveTarget = FALSE; - if ( !s_bInGetActiveTarget ) { - s_bInGetActiveTarget = TRUE; - - #ifdef WX_TEST_MINIMAL - ms_pLogger = new wxLogStderr; - #else - // ask the application to create a log target for us - if ( wxTheApp != NULL ) - ms_pLogger = wxTheApp->CreateLogTarget(); - #endif - - // do nothing if it fails - what can we do? - } - } - - return ms_pLogger; -} - -wxLog *wxLog::SetActiveTarget(wxLog *pLogger) -{ - // flush the old messages before changing - if ( ms_pLogger != NULL ) - ms_pLogger->Flush(); - - wxLog *pOldLogger = ms_pLogger; - ms_pLogger = pLogger; - return pOldLogger; -} - -wxString wxLog::TimeStamp() const -{ - wxString str; - - if ( !IsEmpty(m_szTimeFormat) ) { - char szBuf[128]; - time_t timeNow; - struct tm *ptmNow; - - time(&timeNow); - ptmNow = localtime(&timeNow); - - strftime(szBuf, WXSIZEOF(szBuf), m_szTimeFormat, ptmNow); - str = szBuf; - } - - return str; -} - -void wxLog::DoLog(wxLogLevel level, const char *szString) -{ - // prepend a timestamp if not disabled - wxString str = TimeStamp(); - - switch ( level ) { - case wxLOG_FatalError: - DoLogString(str << _("Fatal error: ") << szString); - DoLogString(_("Program aborted.")); - Flush(); - abort(); - break; - - case wxLOG_Error: - DoLogString(str << _("Error: ") << szString); - break; - - case wxLOG_Warning: - DoLogString(str << _("Warning: ") << szString); - break; - - case wxLOG_Info: - if ( GetVerbose() ) - case wxLOG_Message: - DoLogString(str + szString); - // fall through - - case wxLOG_Status: - // nothing to do - break; - - case wxLOG_Trace: - case wxLOG_Debug: - #ifdef __WXDEBUG__ - DoLogString(str << (level == wxLOG_Trace ? _("Trace") : _("Debug")) - << ": " << szString); - #endif - - break; - - default: - wxFAIL_MSG(_("unknown log level in wxLog::DoLog")); - } -} - -void wxLog::DoLogString(const char *WXUNUSED(szString)) -{ - wxFAIL_MSG(_("DoLogString must be overrided if it's called.")); -} - -void wxLog::Flush() -{ - // do nothing -} - -// ---------------------------------------------------------------------------- -// wxLogStderr class implementation -// ---------------------------------------------------------------------------- - -wxLogStderr::wxLogStderr(FILE *fp) -{ - if ( fp == NULL ) - m_fp = stderr; - else - m_fp = fp; -} - -void wxLogStderr::DoLogString(const char *szString) -{ - fputs(szString, m_fp); - fputc('\n', m_fp); - fflush(m_fp); -} - -// ---------------------------------------------------------------------------- -// wxLogStream implementation -// ---------------------------------------------------------------------------- - -wxLogStream::wxLogStream(ostream *ostr) -{ - if ( ostr == NULL ) - m_ostr = &cerr; - else - m_ostr = ostr; -} - -void wxLogStream::DoLogString(const char *szString) -{ - (*m_ostr) << szString << endl << flush; -} - -// ---------------------------------------------------------------------------- -// wxLogTextCtrl implementation -// ---------------------------------------------------------------------------- -wxLogTextCtrl::wxLogTextCtrl(wxTextCtrl *pTextCtrl) -// @@@ TODO: in wxGTK wxTextCtrl doesn't derive from streambuf - -// Also, in DLL mode in wxMSW, can't use it. -#if defined(NO_TEXT_WINDOW_STREAM) -#else - : wxLogStream(new ostream(pTextCtrl)) -#endif -{ -} - -wxLogTextCtrl::~wxLogTextCtrl() -{ - delete m_ostr; -} - -// ---------------------------------------------------------------------------- -// wxLogGui implementation -// ---------------------------------------------------------------------------- - -#ifndef WX_TEST_MINIMAL - -wxLogGui::wxLogGui() -{ - m_bErrors = FALSE; -} - -void wxLogGui::Flush() -{ - if ( !m_bHasMessages ) - return; - - // do it right now to block any new calls to Flush() while we're here - m_bHasMessages = FALSE; - - // @@@ ugly... - - // concatenate all strings (but not too many to not overfill the msg box) - wxString str; - size_t nLines = 0, - nMsgCount = m_aMessages.Count(); - - // start from the most recent message - for ( size_t n = nMsgCount; n > 0; n-- ) { - // for Windows strings longer than this value are wrapped (NT 4.0) - const size_t nMsgLineWidth = 156; - - nLines += (m_aMessages[n - 1].Len() + nMsgLineWidth - 1) / nMsgLineWidth; - - if ( nLines > 25 ) // don't put too many lines in message box - break; - - str << m_aMessages[n - 1] << "\n"; - } - - if ( m_bErrors ) { - wxMessageBox(str, _("Error"), wxOK | wxICON_EXCLAMATION); - } - else { - wxMessageBox(str, _("Information"), wxOK | wxICON_INFORMATION); - } - - // no undisplayed messages whatsoever - m_bErrors = FALSE; - m_aMessages.Empty(); -} - -// the default behaviour is to discard all informational messages if there -// are any errors/warnings. -void wxLogGui::DoLog(wxLogLevel level, const char *szString) -{ - switch ( level ) { - case wxLOG_Info: - if ( GetVerbose() ) - case wxLOG_Message: - if ( !m_bErrors ) { - m_aMessages.Add(szString); - m_bHasMessages = TRUE; - } - break; - - case wxLOG_Status: - { - // find the top window and set it's status text if it has any - wxFrame *pFrame = gs_pFrame; - if ( pFrame == NULL ) { - wxWindow *pWin = wxTheApp->GetTopWindow(); - if ( pWin != NULL && pWin->IsKindOf(CLASSINFO(wxFrame)) ) { - pFrame = (wxFrame *)pWin; - } - } - - if ( pFrame != NULL ) - pFrame->SetStatusText(szString); - } - break; - - case wxLOG_Trace: - case wxLOG_Debug: - #ifdef __WXDEBUG__ - { - wxString strTime = TimeStamp(); - - #if defined(__WIN32__) && !defined(__WXSTUBS__) - // don't prepend debug/trace here: it goes to the debug window - // anyhow, but do put a timestamp - OutputDebugString(strTime + szString + "\n\r"); - #else //!WIN32 - // send them to stderr - fprintf(stderr, "%s %s: %s\n", - strTime.c_str(), - level == wxLOG_Trace ? _("Trace") : _("Debug"), - szString); - fflush(stderr); - #endif // WIN32 - } - #endif - break; - - case wxLOG_FatalError: - // show this one immediately - wxMessageBox(szString, _("Fatal error"), wxICON_HAND); - break; - - case wxLOG_Error: - case wxLOG_Warning: - // discard earlier informational messages if this is the 1st error - if ( !m_bErrors ) { - m_aMessages.Empty(); - m_bHasMessages = TRUE; - m_bErrors = TRUE; - } - - m_aMessages.Add(szString); - break; - - default: - wxFAIL_MSG(_("unknown log level in wxLogGui::DoLog")); - } -} - -// ---------------------------------------------------------------------------- -// wxLogWindow and wxLogFrame implementation -// ---------------------------------------------------------------------------- - -// log frame class -// --------------- -class wxLogFrame : public wxFrame -{ -public: - // ctor & dtor - wxLogFrame(wxFrame *pParent, wxLogWindow *log, const char *szTitle); - virtual ~wxLogFrame(); - - // menu callbacks - void OnClose(wxCommandEvent& event); - void OnCloseWindow(wxCloseEvent& event); - void OnSave (wxCommandEvent& event); - void OnClear(wxCommandEvent& event); - - void OnIdle(wxIdleEvent&); - - // accessors - wxTextCtrl *TextCtrl() const { return m_pTextCtrl; } - -private: - enum - { - Menu_Close = 100, - Menu_Save, - Menu_Clear - }; - - // instead of closing just hide the window to be able to Show() it later - void DoClose() { Show(FALSE); } - - wxTextCtrl *m_pTextCtrl; - wxLogWindow *m_log; - - DECLARE_EVENT_TABLE() -}; - -BEGIN_EVENT_TABLE(wxLogFrame, wxFrame) - // wxLogWindow menu events - EVT_MENU(Menu_Close, wxLogFrame::OnClose) - EVT_MENU(Menu_Save, wxLogFrame::OnSave) - EVT_MENU(Menu_Clear, wxLogFrame::OnClear) - - EVT_CLOSE(wxLogFrame::OnCloseWindow) -END_EVENT_TABLE() - -wxLogFrame::wxLogFrame(wxFrame *pParent, wxLogWindow *log, const char *szTitle) - : wxFrame(pParent, -1, szTitle) -{ - m_log = log; - - // @@ kludge: wxSIMPLE_BORDER is simply to prevent wxWindows from creating - // a rich edit control instead of a normal one we want in wxMSW - m_pTextCtrl = new wxTextCtrl(this, -1, wxEmptyString, wxDefaultPosition, - wxDefaultSize, - //wxSIMPLE_BORDER | - wxTE_MULTILINE | - wxHSCROLL | - wxTE_READONLY); - - // create menu - wxMenuBar *pMenuBar = new wxMenuBar; - wxMenu *pMenu = new wxMenu; - pMenu->Append(Menu_Save, _("&Save..."), _("Save log contents to file")); - pMenu->Append(Menu_Clear, _("C&lear"), _("Clear the log contents")); - pMenu->AppendSeparator(); - pMenu->Append(Menu_Close, _("&Close"), _("Close this window")); - pMenuBar->Append(pMenu, _("&Log")); - SetMenuBar(pMenuBar); - - // status bar for menu prompts - CreateStatusBar(); - - m_log->OnFrameCreate(this); -} - -void wxLogFrame::OnClose(wxCommandEvent& WXUNUSED(event)) -{ - DoClose(); -} - -void wxLogFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) -{ - DoClose(); -} - -void wxLogFrame::OnSave(wxCommandEvent& WXUNUSED(event)) -{ - // get the file name - // ----------------- - const char *szFileName = wxSaveFileSelector("log", "txt", "log.txt"); - if ( szFileName == NULL ) { - // cancelled - return; - } - - // open file - // --------- - wxFile file; - bool bOk = FALSE; - if ( wxFile::Exists(szFileName) ) { - bool bAppend = FALSE; - wxString strMsg; - strMsg.Printf(_("Append log to file '%s' " - "(choosing [No] will overwrite it)?"), szFileName); - switch ( wxMessageBox(strMsg, _("Question"), wxYES_NO | wxCANCEL) ) { - case wxYES: - bAppend = TRUE; - break; - - case wxNO: - bAppend = FALSE; - break; - - case wxCANCEL: - return; - - default: - wxFAIL_MSG(_("invalid message box return value")); - } - - if ( bAppend ) { - bOk = file.Open(szFileName, wxFile::write_append); - } - else { - bOk = file.Create(szFileName, TRUE /* overwrite */); - } - } - else { - bOk = file.Create(szFileName); - } - - // retrieve text and save it - // ------------------------- -#ifdef __WXGTK__ - // @@@@ TODO: no GetNumberOfLines and GetLineText in wxGTK yet - wxLogError(_("Sorry, this function is not implemented under GTK")); -#else - int nLines = m_pTextCtrl->GetNumberOfLines(); - for ( int nLine = 0; bOk && nLine < nLines; nLine++ ) { - bOk = file.Write(m_pTextCtrl->GetLineText(nLine) + wxTextFile::GetEOL()); - } -#endif //GTK - - if ( bOk ) - bOk = file.Close(); - - if ( !bOk ) { - wxLogError(_("Can't save log contents to file.")); - return; - } -} - -void wxLogFrame::OnClear(wxCommandEvent& WXUNUSED(event)) -{ - m_pTextCtrl->Clear(); -} - -wxLogFrame::~wxLogFrame() -{ - m_log->OnFrameDelete(this); -} - -// wxLogWindow -// ----------- -wxLogWindow::wxLogWindow(wxFrame *pParent, - const char *szTitle, - bool bShow, - bool bDoPass) -{ - m_bPassMessages = bDoPass; - - m_pLogFrame = new wxLogFrame(pParent, this, szTitle); - m_pOldLog = wxLog::SetActiveTarget(this); - - if ( bShow ) - m_pLogFrame->Show(TRUE); -} - -void wxLogWindow::Show(bool bShow) -{ - m_pLogFrame->Show(bShow); -} - -void wxLogWindow::Flush() -{ - if ( m_pOldLog != NULL ) - m_pOldLog->Flush(); - - m_bHasMessages = FALSE; -} - -void wxLogWindow::DoLog(wxLogLevel level, const char *szString) -{ - // first let the previous logger show it - if ( m_pOldLog != NULL && m_bPassMessages ) { - // @@@ why can't we access protected wxLog method from here (we derive - // from wxLog)? gcc gives "DoLog is protected in this context", what - // does this mean? Anyhow, the cast is harmless and let's us do what - // we want. - ((wxLogWindow *)m_pOldLog)->DoLog(level, szString); - } - - // don't put trace messages in the text window for 2 reasons: - // 1) there are too many of them - // 2) they may provoke other trace messages thus sending a program into an - // infinite loop - if ( m_pLogFrame && level != wxLOG_Trace ) { - // and this will format it nicely and call our DoLogString() - wxLog::DoLog(level, szString); - } - - m_bHasMessages = TRUE; -} - -void wxLogWindow::DoLogString(const char *szString) -{ - // put the text into our window - wxTextCtrl *pText = m_pLogFrame->TextCtrl(); - - // remove selection (WriteText is in fact ReplaceSelection) - #ifdef __WXMSW__ - long nLen = pText->GetLastPosition(); - pText->SetSelection(nLen, nLen); - #endif // Windows - - pText->WriteText(szString); - pText->WriteText("\n"); // "\n" ok here (_not_ "\r\n") - - // ensure that the line can be seen - // @@@ TODO -} - -wxFrame *wxLogWindow::GetFrame() const -{ - return m_pLogFrame; -} - -void wxLogWindow::OnFrameCreate(wxFrame *frame) -{ -} - -void wxLogWindow::OnFrameDelete(wxFrame *frame) -{ - m_pLogFrame = (wxLogFrame *) NULL; -} - -wxLogWindow::~wxLogWindow() -{ - // may be NULL if log frame already auto destroyed itself - delete m_pLogFrame; -} - -#endif //WX_TEST_MINIMAL - -// ============================================================================ -// Global functions/variables -// ============================================================================ - -// ---------------------------------------------------------------------------- -// static variables -// ---------------------------------------------------------------------------- -wxLog *wxLog::ms_pLogger = (wxLog *) NULL; -bool wxLog::ms_bAutoCreate = TRUE; -wxTraceMask wxLog::ms_ulTraceMask = (wxTraceMask)0; - -// ---------------------------------------------------------------------------- -// stdout error logging helper -// ---------------------------------------------------------------------------- - -// helper function: wraps the message and justifies it under given position -// (looks more pretty on the terminal). Also adds newline at the end. -// -// @@ this is now disabled until I find a portable way of determining the -// terminal window size (ok, I found it but does anybody really cares?) -#ifdef LOG_PRETTY_WRAP -static void wxLogWrap(FILE *f, const char *pszPrefix, const char *psz) -{ - size_t nMax = 80; // @@@@ - size_t nStart = strlen(pszPrefix); - fputs(pszPrefix, f); - - size_t n; - while ( *psz != '\0' ) { - for ( n = nStart; (n < nMax) && (*psz != '\0'); n++ ) - putc(*psz++, f); - - // wrapped? - if ( *psz != '\0' ) { - /*putc('\n', f);*/ - for ( n = 0; n < nStart; n++ ) - putc(' ', f); - - // as we wrapped, squeeze all white space - while ( isspace(*psz) ) - psz++; - } - } - - putc('\n', f); -} -#endif //LOG_PRETTY_WRAP - -// ---------------------------------------------------------------------------- -// error code/error message retrieval functions -// ---------------------------------------------------------------------------- - -// get error code from syste -unsigned long wxSysErrorCode() -{ - #ifdef __WXMSW__ - #ifdef __WIN32__ - return ::GetLastError(); - #else //WIN16 - // @@@@ what to do on Windows 3.1? - return 0; - #endif //WIN16/32 - #else //Unix - return errno; - #endif //Win/Unix -} - -// get error message from system -const char *wxSysErrorMsg(unsigned long nErrCode) -{ - if ( nErrCode == 0 ) - nErrCode = wxSysErrorCode(); - - #ifdef __WXMSW__ - #ifdef __WIN32__ - static char s_szBuf[LOG_BUFFER_SIZE / 2]; - - // get error message from system - LPVOID lpMsgBuf; - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, - NULL, nErrCode, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR)&lpMsgBuf, - 0, NULL); - - // copy it to our buffer and free memory - strncpy(s_szBuf, (const char *)lpMsgBuf, WXSIZEOF(s_szBuf) - 1); - s_szBuf[WXSIZEOF(s_szBuf) - 1] = '\0'; - LocalFree(lpMsgBuf); - - // returned string is capitalized and ended with '\r\n' - bad - s_szBuf[0] = (char)wxToLower(s_szBuf[0]); - size_t len = strlen(s_szBuf); - if ( len > 0 ) { - // truncate string - if ( s_szBuf[len - 2] == '\r' ) - s_szBuf[len - 2] = '\0'; - } - - return s_szBuf; - #else //Win16 - // TODO @@@@ - return NULL; - #endif // Win16/32 - #else // Unix - return strerror(nErrCode); - #endif // Win/Unix -} - -// ---------------------------------------------------------------------------- -// debug helper -// ---------------------------------------------------------------------------- - -#ifdef __WXDEBUG__ - -void Trap() -{ - #ifdef __WXMSW__ - DebugBreak(); - #elif defined(__WXSTUBS__) - // TODO - #else // Unix - raise(SIGTRAP); - #endif // Win/Unix -} - -// this function is called when an assert fails -void wxOnAssert(const char *szFile, int nLine, const char *szMsg) -{ - // this variable can be set to true to suppress "assert failure" messages - static bool s_bNoAsserts = FALSE; - static bool s_bInAssert = FALSE; - - if ( s_bInAssert ) { - // He-e-e-e-elp!! we're trapped in endless loop - Trap(); - } - - s_bInAssert = TRUE; - - char szBuf[LOG_BUFFER_SIZE]; - sprintf(szBuf, _("Assert failed in file %s at line %d"), szFile, nLine); - if ( szMsg != NULL ) { - strcat(szBuf, ": "); - strcat(szBuf, szMsg); - } - else { - strcat(szBuf, "."); - } - - if ( !s_bNoAsserts ) { - // send it to the normal log destination - wxLogDebug(szBuf); - - strcat(szBuf, _("\nDo you want to stop the program?" - "\nYou can also choose [Cancel] to suppress " - "further warnings.")); - - switch ( wxMessageBox(szBuf, _("Debug"), - wxYES_NO | wxCANCEL | wxICON_STOP ) ) { - case wxYES: - Trap(); - break; - - case wxCANCEL: - s_bNoAsserts = TRUE; - break; - - //case wxNO: nothing to do - } - } - - s_bInAssert = FALSE; -} - -#endif //WXDEBUG - diff --git a/src/common/matrix.cpp b/src/common/matrix.cpp deleted file mode 100644 index 84beee3b61..0000000000 --- a/src/common/matrix.cpp +++ /dev/null @@ -1,267 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: matrix.cpp -// Purpose: wxTransformMatrix class -// Author: Chris Breeze, Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "matrix.h" -#endif - -// Note: this is intended to be used in wxDC at some point to replace -// the current system of scaling/translation. It is not yet used. - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#endif - -#include "wx/matrix.h" -#include - -const double pi = 3.1415926535; - -wxTransformMatrix::wxTransformMatrix(void) -{ - m_isIdentity = FALSE; - - Identity(); -} - -wxTransformMatrix::wxTransformMatrix(const wxTransformMatrix& mat) -{ - (*this) = mat; -} - -double wxTransformMatrix::GetValue(int row, int col) const -{ - if (row < 0 || row > 2 || col < 0 || col > 2) - return 0.0; - - return m_matrix[row][col]; -} - -void wxTransformMatrix::SetValue(int row, int col, double value) -{ - if (row < 0 || row > 2 || col < 0 || col > 2) - return; - - m_matrix[row][col] = value; -} - -void wxTransformMatrix::operator = (const wxTransformMatrix& mat) -{ - int i, j; - for (i = 0; i < 3; i++) - { - for (j = 0; j < 3; j++) - { - m_matrix[i][j] = mat.m_matrix[i][j]; - } - } - m_isIdentity = mat.m_isIdentity; -} - -bool wxTransformMatrix::operator == (const wxTransformMatrix& mat) -{ - int i, j; - for (i = 0; i < 3; i++) - { - for (j = 0; j < 3; j++) - { - if (m_matrix[i][j] != mat.m_matrix[i][j]) - return FALSE; - } - } - return TRUE; -} - -bool wxTransformMatrix::operator != (const wxTransformMatrix& mat) -{ - return (! ((*this) == mat)); -} - -double& wxTransformMatrix::operator()(int row, int col) -{ - if (row < 0 || row > 2 || col < 0 || col > 2) - return m_matrix[0][0]; - - return m_matrix[row][col]; -} - -double wxTransformMatrix::operator()(int row, int col) const -{ - if (row < 0 || row > 2 || col < 0 || col > 2) - return 0.0; - - return m_matrix[row][col]; -} - -// Invert matrix -bool wxTransformMatrix::Invert(void) -{ - double inverseMatrix[3][3]; - - // calculate the adjoint - inverseMatrix[0][0] = wxCalculateDet(m_matrix[1][1],m_matrix[2][1],m_matrix[1][2],m_matrix[2][2]); - inverseMatrix[0][1] = -wxCalculateDet(m_matrix[0][1],m_matrix[2][1],m_matrix[0][2],m_matrix[2][2]); - inverseMatrix[0][2] = wxCalculateDet(m_matrix[0][1],m_matrix[1][1],m_matrix[0][2],m_matrix[1][2]); - - inverseMatrix[1][0] = -wxCalculateDet(m_matrix[1][0],m_matrix[2][0],m_matrix[1][2],m_matrix[2][2]); - inverseMatrix[1][1] = wxCalculateDet(m_matrix[0][0],m_matrix[2][0],m_matrix[0][2],m_matrix[2][2]); - inverseMatrix[1][2] = -wxCalculateDet(m_matrix[0][0],m_matrix[1][0],m_matrix[0][2],m_matrix[1][2]); - - inverseMatrix[2][0] = wxCalculateDet(m_matrix[1][0],m_matrix[2][0],m_matrix[1][1],m_matrix[2][1]); - inverseMatrix[2][1] = -wxCalculateDet(m_matrix[0][0],m_matrix[2][0],m_matrix[0][1],m_matrix[2][1]); - inverseMatrix[2][2] = wxCalculateDet(m_matrix[0][0],m_matrix[1][0],m_matrix[0][1],m_matrix[1][1]); - - // now divide by the determinant - double det = m_matrix[0][0] * inverseMatrix[0][0] + m_matrix[0][1] * inverseMatrix[1][0] + m_matrix[0][2] * inverseMatrix[2][0]; - if (det != 0.0) - { - inverseMatrix[0][0] /= det; inverseMatrix[1][0] /= det; inverseMatrix[2][0] /= det; - inverseMatrix[0][1] /= det; inverseMatrix[1][1] /= det; inverseMatrix[2][1] /= det; - inverseMatrix[0][2] /= det; inverseMatrix[1][2] /= det; inverseMatrix[2][2] /= det; - - int i, j; - for (i = 0; i < 3; i++) - { - for (j = 0; j < 3; j++) - { - m_matrix[i][j] = inverseMatrix[i][j]; - } - } - m_isIdentity = IsIdentity1(); - return TRUE; - } - else - { - return FALSE; - } -} - -// Make into identity matrix -bool wxTransformMatrix::Identity(void) -{ - m_matrix[0][0] = m_matrix[1][1] = m_matrix[2][2] = 1.0; - m_matrix[1][0] = m_matrix[2][0] = m_matrix[0][1] = m_matrix[2][1] = m_matrix[0][2] = m_matrix[1][2] = 0.0; - m_isIdentity = TRUE; - - return TRUE; -} - -// Scale by scale (isotropic scaling i.e. the same in x and y): -// | scale 0 0 | -// matrix' = | 0 scale 0 | x matrix -// | 0 0 scale | -// -bool wxTransformMatrix::Scale(double scale) -{ - int i, j; - for (i = 0; i < 3; i++) - { - for (j = 0; j < 3; j++) - { - m_matrix[i][j] *= scale; - } - } - m_isIdentity = IsIdentity1(); - - return TRUE; -} - -// Translate by dx, dy: -// | 1 0 dx | -// matrix' = | 0 1 dy | x matrix -// | 0 0 1 | -// -bool wxTransformMatrix::Translate(double dx, double dy) -{ - int i; - for (i = 0; i < 3; i++) - m_matrix[i][0] += dx * m_matrix[i][2]; - for (i = 0; i < 3; i++) - m_matrix[i][1] += dy * m_matrix[i][2]; - - m_isIdentity = IsIdentity1(); - - return TRUE; -} - -// Rotate by the given number of degrees: -// | cos sin 0 | -// matrix' = | -sin cos 0 | x matrix -// | 0 0 1 | -// -bool wxTransformMatrix::Rotate(double degrees) -{ - double angle = degrees * pi / 180.0; - double s = sin(angle); - double c = cos(angle); - - m_matrix[0][0] = c * m_matrix[0][0] + s * m_matrix[0][1]; - m_matrix[1][0] = c * m_matrix[1][0] + s * m_matrix[1][1]; - m_matrix[2][0] = c * m_matrix[2][0] + s * m_matrix[2][1]; - m_matrix[0][2] = c * m_matrix[0][1] - s * m_matrix[0][0]; - m_matrix[1][2] = c * m_matrix[1][1] - s * m_matrix[1][0]; - m_matrix[2][2] = c * m_matrix[2][1] - s * m_matrix[2][0]; - - m_isIdentity = IsIdentity1(); - - return TRUE; -} - -// Transform a point from logical to device coordinates -bool wxTransformMatrix::TransformPoint(double x, double y, double& tx, double& ty) const -{ - if (IsIdentity()) - { - tx = x; ty = y; return TRUE; - } - - tx = x * m_matrix[0][0] + y * m_matrix[1][0] + m_matrix[2][0]; - ty = x * m_matrix[0][1] + y * m_matrix[1][1] + m_matrix[2][1]; - - return TRUE; -} - -// Transform a point from device to logical coordinates. - -// Example of use: -// wxTransformMatrix mat = dc.GetTransformation(); -// mat.Invert(); -// mat.InverseTransformPoint(x, y, x1, y1); -// OR (shorthand:) -// dc.LogicalToDevice(x, y, x1, y1); -// The latter is slightly less efficient if we're doing several -// conversions, since the matrix is inverted several times. - -bool wxTransformMatrix::InverseTransformPoint(double x, double y, double& tx, double& ty) const -{ - if (IsIdentity()) - { - tx = x; ty = y; return TRUE; - } - - double z = (1.0 - m_matrix[0][2] * x - m_matrix[1][2] * y) / m_matrix[2][2]; - if (z == 0.0) - { -// z = 0.0000001; - return FALSE; - } - tx = x * m_matrix[0][0] + y * m_matrix[1][0] + z * m_matrix[2][0]; - ty = x * m_matrix[0][1] + y * m_matrix[1][1] + z * m_matrix[2][1]; - return TRUE; -} - diff --git a/src/common/memory.cpp b/src/common/memory.cpp deleted file mode 100644 index a3dbce7516..0000000000 --- a/src/common/memory.cpp +++ /dev/null @@ -1,1093 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: memory.cpp -// Purpose: Memory checking implementation -// Author: Arthur Seaton, Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "memory.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#endif - -#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT - -#ifdef __GNUG__ -// #pragma implementation -#endif - -#ifndef WX_PRECOMP -#include "wx/utils.h" -#include "wx/app.h" -#endif - -#include - -#if USE_IOSTREAMH -#include -#else -#include -#endif -#include - -#if !defined(__WATCOMC__) && !defined(__VMS__) -#include -#endif - -#include -#include - -#ifdef __WXMSW__ -#include - -#ifdef GetClassInfo -#undef GetClassInfo -#endif - -#ifdef GetClassName -#undef GetClassName -#endif - -#endif - -#include "wx/memory.h" - -/* -#ifdef new -#undef new -#endif -*/ - -// wxDebugContext wxTheDebugContext; -/* - Redefine new and delete so that we can pick up situations where: - - we overwrite or underwrite areas of malloc'd memory. - - we use uninitialise variables - Only do this in debug mode. - - We change new to get enough memory to allocate a struct, followed - by the caller's requested memory, followed by a tag. The struct - is used to create a doubly linked list of these areas and also - contains another tag. The tags are used to determine when the area - has been over/under written. -*/ - - -/* - Values which are used to set the markers which will be tested for - under/over write. There are 3 of these, one in the struct, one - immediately after the struct but before the caller requested memory and - one immediately after the requested memory. -*/ -#define MemStartCheck 0x23A8 -#define MemMidCheck 0xA328 -#define MemEndCheck 0x8A32 -#define MemFillChar 0xAF -#define MemStructId 0x666D - -/* - External interface for the wxMemStruct class. Others are - defined inline within the class def. Here we only need to be able - to add and delete nodes from the list and handle errors in some way. -*/ - -/* - Used for internal "this shouldn't happen" type of errors. -*/ -void wxMemStruct::ErrorMsg (const char * mesg) -{ - wxTrace("wxWindows memory checking error: %s\n", mesg); - PrintNode (); - -// << m_fileName << ' ' << m_lineNum << endl; -} - -/* - Used when we find an overwrite or an underwrite error. -*/ -void wxMemStruct::ErrorMsg () -{ - wxTrace("wxWindows over/underwrite memory error: \n"); - PrintNode (); - -// cerr << m_fileName << ' ' << m_lineNum << endl; -} - - -/* - We want to find out if pointers have been overwritten as soon as is - possible, so test everything before we dereference it. Of course it's still - quite possible that, if things have been overwritten, this function will - fall over, but the only way of dealing with that would cost too much in terms - of time. -*/ -int wxMemStruct::AssertList () -{ - if (wxDebugContext::GetHead () != 0 && ! (wxDebugContext::GetHead ())->AssertIt () || - wxDebugContext::GetTail () != 0 && ! wxDebugContext::GetTail ()->AssertIt ()) { - ErrorMsg ("Head or tail pointers trashed"); - return 0; - } - return 1; -} - - -/* - Check that the thing we're pointing to has the correct id for a wxMemStruct - object and also that it's previous and next pointers are pointing at objects - which have valid ids. - This is definitely not perfect since we could fall over just trying to access - any of the slots which we use here, but I think it's about the best that I - can do without doing something like taking all new wxMemStruct pointers and - comparing them against all known pointer within the list and then only - doing this sort of check _after_ you've found the pointer in the list. That - would be safer, but also much more time consuming. -*/ -int wxMemStruct::AssertIt () -{ - return (m_id == MemStructId && - (m_prev == 0 || m_prev->m_id == MemStructId) && - (m_next == 0 || m_next->m_id == MemStructId)); -} - - -/* - Additions are always at the tail of the list. - Returns 0 on error, non-zero on success. -*/ -int wxMemStruct::Append () -{ - if (! AssertList ()) - return 0; - - if (wxDebugContext::GetHead () == 0) { - if (wxDebugContext::GetTail () != 0) { - ErrorMsg ("Null list should have a null tail pointer"); - return 0; - } - (void) wxDebugContext::SetHead (this); - (void) wxDebugContext::SetTail (this); - } else { - wxDebugContext::GetTail ()->m_next = this; - this->m_prev = wxDebugContext::GetTail (); - (void) wxDebugContext::SetTail (this); - } - return 1; -} - - -/* - Don't actually free up anything here as the space which is used - by the node will be free'd up when the whole block is free'd. - Returns 0 on error, non-zero on success. -*/ -int wxMemStruct::Unlink () -{ - if (! AssertList ()) - return 0; - - if (wxDebugContext::GetHead () == 0 || wxDebugContext::GetTail () == 0) { - ErrorMsg ("Trying to remove node from empty list"); - return 0; - } - - // Handle the part of the list before this node. - if (m_prev == 0) { - if (this != wxDebugContext::GetHead ()) { - ErrorMsg ("No previous node for non-head node"); - return 0; - } - (void) wxDebugContext::SetHead (m_next); - } else { - if (! m_prev->AssertIt ()) { - ErrorMsg ("Trashed previous pointer"); - return 0; - } - - if (m_prev->m_next != this) { - ErrorMsg ("List is inconsistent"); - return 0; - } - m_prev->m_next = m_next; - } - - // Handle the part of the list after this node. - if (m_next == 0) { - if (this != wxDebugContext::GetTail ()) { - ErrorMsg ("No next node for non-tail node"); - return 0; - } - (void) wxDebugContext::SetTail (m_prev); - } else { - if (! m_next->AssertIt ()) { - ErrorMsg ("Trashed next pointer"); - return 0; - } - - if (m_next->m_prev != this) { - ErrorMsg ("List is inconsistent"); - return 0; - } - m_next->m_prev = m_prev; - } - - return 1; -} - - - -/* - Checks a node and block of memory to see that the markers are still - intact. -*/ -int wxMemStruct::CheckBlock () -{ - int nFailures = 0; - - if (m_firstMarker != MemStartCheck) { - nFailures++; - ErrorMsg (); - } - - char * pointer = wxDebugContext::MidMarkerPos ((char *) this); - if (* (wxMarkerType *) pointer != MemMidCheck) { - nFailures++; - ErrorMsg (); - } - - pointer = wxDebugContext::EndMarkerPos ((char *) this, RequestSize ()); - if (* (wxMarkerType *) pointer != MemEndCheck) { - nFailures++; - ErrorMsg (); - } - - return nFailures; -} - - -/* - Check the list of nodes to see if they are all ok. -*/ -int wxMemStruct::CheckAllPrevious () -{ - int nFailures = 0; - - for (wxMemStruct * st = this->m_prev; st != 0; st = st->m_prev) { - if (st->AssertIt ()) - nFailures += st->CheckBlock (); - else - return -1; - } - - return nFailures; -} - - -/* - When we delete a node we set the id slot to a specific value and then test - against this to see if a nodes have been deleted previously. I don't - just set the entire memory to the fillChar because then I'd be overwriting - useful stuff like the vtbl which may be needed to output the error message - including the file name and line numbers. Without this info the whole point - of this class is lost! -*/ -void wxMemStruct::SetDeleted () -{ - m_id = MemFillChar; -} - -int wxMemStruct::IsDeleted () -{ - return (m_id == MemFillChar); -} - - -/* - Print out a single node. There are many far better ways of doing this - but this will suffice for now. -*/ -void wxMemStruct::PrintNode () -{ - if (m_isObject) - { - wxObject *obj = (wxObject *)m_actualData; - wxClassInfo *info = obj->GetClassInfo(); - - if (info && info->GetClassName()) - wxTrace("%s", info->GetClassName()); - else - wxTrace("Object"); - - if (m_fileName) - wxTrace(" (%s %d)", m_fileName, (int)m_lineNum); - - wxTrace(" at $%lX, size %d\n", (long)GetActualData(), (int)RequestSize()); - } - else - { - wxTrace("Non-object data"); - if (m_fileName) - wxTrace(" (%s %d)", m_fileName, (int)m_lineNum); - wxTrace(" at $%lX, size %d\n", (long)GetActualData(), (int)RequestSize()); - } -} - -void wxMemStruct::Dump () -{ - if (!ValidateNode()) return; - - if (m_isObject) - { - wxObject *obj = (wxObject *)m_actualData; -// wxClassInfo *info = obj->GetClassInfo(); - - if (m_fileName) - wxTrace("Item (%s %d)", m_fileName, (int)m_lineNum); - else - wxTrace("Item"); - - wxTrace(" at $%lX, size %d: ", (long)GetActualData(), (int)RequestSize()); -// wxTrace(info->GetClassName()); - obj->Dump(wxDebugContext::GetStream()); - wxTrace("\n"); - } - else - { - wxTrace("Non-object data"); - if (m_fileName) - wxTrace(" (%s %d)", m_fileName, (int)m_lineNum); - wxTrace(" at $%lX, size %d\n", (long)GetActualData(), (int)RequestSize()); - } -} - - -/* - Validate a node. Check to see that the node is "clean" in the sense - that nothing has over/underwritten it etc. -*/ -int wxMemStruct::ValidateNode () -{ - char * startPointer = (char *) this; - if (!AssertIt ()) { - if (IsDeleted ()) - ErrorMsg ("Object already deleted"); - else { - // Can't use the error routines as we have no recognisable object. -#ifndef __WXGTK__ - wxTrace("Can't verify memory struct - all bets are off!\n"); -#endif - } - return 0; - } - -/* - int i; - for (i = 0; i < wxDebugContext::TotSize (requestSize ()); i++) - cout << startPointer [i]; - cout << endl; -*/ - if (Marker () != MemStartCheck) - ErrorMsg (); - if (* (wxMarkerType *) wxDebugContext::MidMarkerPos (startPointer) != MemMidCheck) - ErrorMsg (); - if (* (wxMarkerType *) wxDebugContext::EndMarkerPos (startPointer, - RequestSize ()) != - MemEndCheck) - ErrorMsg (); - - // Back to before the extra buffer and check that - // we can still read what we originally wrote. - if (Marker () != MemStartCheck || - * (wxMarkerType *) wxDebugContext::MidMarkerPos (startPointer) - != MemMidCheck || - * (wxMarkerType *) wxDebugContext::EndMarkerPos (startPointer, - RequestSize ()) != MemEndCheck) - { - ErrorMsg (); - return 0; - } - - return 1; -} - -/* - The wxDebugContext class. -*/ - -wxMemStruct *wxDebugContext::m_head = NULL; -wxMemStruct *wxDebugContext::m_tail = NULL; -// ostream *wxDebugContext::m_debugStream = NULL; -// streambuf *wxDebugContext::m_streamBuf = NULL; - -// Must initialise these in wxEntry, and then delete them just before wxEntry exits -streambuf *wxDebugContext::m_streamBuf = NULL; -ostream *wxDebugContext::m_debugStream = NULL; - -bool wxDebugContext::m_checkPrevious = FALSE; -int wxDebugContext::debugLevel = 1; -bool wxDebugContext::debugOn = TRUE; -wxMemStruct *wxDebugContext::checkPoint = NULL; - -wxDebugContext::wxDebugContext(void) -{ -// m_streamBuf = new wxDebugStreamBuf; -// m_debugStream = new ostream(m_streamBuf); -} - -wxDebugContext::~wxDebugContext(void) -{ - SetStream(NULL, NULL); -} - -/* - * It's bizarre, but with BC++ 4.5, the value of str changes - * between SetFile and SetStream. - */ - -void wxDebugContext::SetStream(ostream *str, streambuf *buf) -{ -/* - if (str) - { - char buff[128]; - sprintf(buff, "SetStream (1): str is %ld", (long) str); - MessageBox(NULL, buff, "Memory", MB_OK); - } -*/ - - if (m_debugStream) - { - m_debugStream->flush(); - delete m_debugStream; - } - m_debugStream = NULL; - - // Not allowed in Watcom (~streambuf is protected). - // Is this trying to say something significant to us?? -#ifndef __WATCOMC__ - if (m_streamBuf) - { - streambuf* oldBuf = m_streamBuf; - m_streamBuf = NULL; - delete oldBuf; - } -#endif - m_streamBuf = buf; - m_debugStream = str; -} - -bool wxDebugContext::SetFile(const wxString& file) -{ - ofstream *str = new ofstream((char *) (const char *)file); - - if (str->bad()) - { - delete str; - return FALSE; - } - else - { -/* - char buf[40]; - sprintf(buf, "SetFile: str is %ld", (long) str); - MessageBox(NULL, buf, "Memory", MB_OK); -*/ - SetStream(str); - return TRUE; - } -} - -bool wxDebugContext::SetStandardError(void) -{ -#if !defined(_WINDLL) - wxDebugStreamBuf *buf = new wxDebugStreamBuf; - ostream *stream = new ostream(m_streamBuf); - SetStream(stream, buf); - return TRUE; -#else - return FALSE; -#endif -} - - -/* - Work out the positions of the markers by creating an array of 2 markers - and comparing the addresses of the 2 elements. Use this number as the - alignment for markers. -*/ -size_t wxDebugContext::CalcAlignment () -{ - wxMarkerType ar[2]; - return (char *) &ar[1] - (char *) &ar[0]; -} - - -char * wxDebugContext::StructPos (const char * buf) -{ - return (char *) buf; -} - -char * wxDebugContext::MidMarkerPos (const char * buf) -{ - return StructPos (buf) + PaddedSize (sizeof (wxMemStruct)); -} - -char * wxDebugContext::CallerMemPos (const char * buf) -{ - return MidMarkerPos (buf) + PaddedSize (sizeof(wxMarkerType)); -} - - -char * wxDebugContext::EndMarkerPos (const char * buf, const size_t size) -{ - return CallerMemPos (buf) + PaddedSize (size); -} - - -/* - Slightly different as this takes a pointer to the start of the caller - requested region and returns a pointer to the start of the buffer. - */ -char * wxDebugContext::StartPos (const char * caller) -{ - return ((char *) (caller - wxDebugContext::PaddedSize (sizeof(wxMarkerType)) - - wxDebugContext::PaddedSize (sizeof (wxMemStruct)))); -} - -/* - We may need padding between various parts of the allocated memory. - Given a size of memory, this returns the amount of memory which should - be allocated in order to allow for alignment of the following object. - - I don't know how portable this stuff is, but it seems to work for me at - the moment. It would be real nice if I knew more about this! -*/ -size_t wxDebugContext::GetPadding (const size_t size) -{ - size_t pad = size % CalcAlignment (); - return (pad) ? sizeof(wxMarkerType) - pad : 0; -} - - - -size_t wxDebugContext::PaddedSize (const size_t size) -{ - return size + GetPadding (size); -} - -/* - Returns the total amount of memory which we need to get from the system - in order to satisfy a caller request. This includes space for the struct - plus markers and the caller's memory as well. -*/ -size_t wxDebugContext::TotSize (const size_t reqSize) -{ - return (PaddedSize (sizeof (wxMemStruct)) + PaddedSize (reqSize) + - 2 * sizeof(wxMarkerType)); -} - - -/* - Traverse the list of nodes executing the given function on each node. -*/ -void wxDebugContext::TraverseList (PmSFV func, wxMemStruct *from) -{ - if (!from) - from = wxDebugContext::GetHead (); - - for (wxMemStruct * st = from; st != 0; st = st->m_next) - { - void* data = st->GetActualData(); - if ((data != (void*)m_debugStream) && (data != (void*) m_streamBuf)) - { - (st->*func) (); - } - } -} - - -/* - Print out the list. - */ -bool wxDebugContext::PrintList (void) -{ -#if WXDEBUG - if (!HasStream()) - return FALSE; - - TraverseList ((PmSFV)&wxMemStruct::PrintNode, (checkPoint ? checkPoint->m_next : (wxMemStruct*)NULL)); - - return TRUE; -#else - return FALSE; -#endif -} - -bool wxDebugContext::Dump(void) -{ -#if WXDEBUG - if (!HasStream()) - return FALSE; - - if (TRUE) - { - char* appName = "application"; - wxString appNameStr(""); - if (wxTheApp) - { - appNameStr = wxTheApp->GetAppName(); - appName = (char*) (const char*) appNameStr; - wxTrace("Memory dump of %s at %s:\n", appName, WXSTRINGCAST wxNow() ); - } - } - TraverseList ((PmSFV)&wxMemStruct::Dump, (checkPoint ? checkPoint->m_next : (wxMemStruct*)NULL)); - - return TRUE; -#else - return FALSE; -#endif -} - -struct wxDebugStatsStruct -{ - long instanceCount; - long totalSize; - char *instanceClass; - wxDebugStatsStruct *next; -}; - -static wxDebugStatsStruct *FindStatsStruct(wxDebugStatsStruct *st, char *name) -{ - while (st) - { - if (strcmp(st->instanceClass, name) == 0) - return st; - st = st->next; - } - return NULL; -} - -static wxDebugStatsStruct *InsertStatsStruct(wxDebugStatsStruct *head, wxDebugStatsStruct *st) -{ - st->next = head; - return st; -} - -bool wxDebugContext::PrintStatistics(bool detailed) -{ -#if WXDEBUG - if (!HasStream()) - return FALSE; - - bool currentMode = GetDebugMode(); - SetDebugMode(FALSE); - - long noNonObjectNodes = 0; - long noObjectNodes = 0; - long totalSize = 0; - - wxDebugStatsStruct *list = NULL; - - wxMemStruct *from = (checkPoint ? checkPoint->m_next : (wxMemStruct*)NULL ); - if (!from) - from = wxDebugContext::GetHead (); - - wxMemStruct *st; - for (st = from; st != 0; st = st->m_next) - { - void* data = st->GetActualData(); - if (detailed && (data != (void*)m_debugStream) && (data != (void*) m_streamBuf)) - { - char *className = "nonobject"; - if (st->m_isObject && st->GetActualData()) - { - wxObject *obj = (wxObject *)st->GetActualData(); - if (obj->GetClassInfo()->GetClassName()) - className = obj->GetClassInfo()->GetClassName(); - } - wxDebugStatsStruct *stats = FindStatsStruct(list, className); - if (!stats) - { - stats = (wxDebugStatsStruct *)malloc(sizeof(wxDebugStatsStruct)); - stats->instanceClass = className; - stats->instanceCount = 0; - stats->totalSize = 0; - list = InsertStatsStruct(list, stats); - } - stats->instanceCount ++; - stats->totalSize += st->RequestSize(); - } - - if ((data != (void*)m_debugStream) && (data != (void*) m_streamBuf)) - { - totalSize += st->RequestSize(); - if (st->m_isObject) - noObjectNodes ++; - else - noNonObjectNodes ++; - } - } - - if (detailed) - { - while (list) - { - wxTrace("%ld objects of class %s, total size %ld\n", - list->instanceCount, list->instanceClass, list->totalSize); - wxDebugStatsStruct *old = list; - list = old->next; - free((char *)old); - } - wxTrace("\n"); - } - - SetDebugMode(currentMode); - - wxTrace("Number of object items: %ld\n", noObjectNodes); - wxTrace("Number of non-object items: %ld\n", noNonObjectNodes); - wxTrace("Total allocated size: %ld\n", totalSize); - - return TRUE; -#else - return FALSE; -#endif -} - -bool wxDebugContext::PrintClasses(void) -{ - if (!HasStream()) - return FALSE; - - if (TRUE) - { - char* appName = "application"; - wxString appNameStr(""); - if (wxTheApp) - { - appNameStr = wxTheApp->GetAppName(); - appName = (char*) (const char*) appNameStr; - wxTrace("Classes in %s:\n\n", appName); - } - } - - int n = 0; - wxNode *node; - wxClassInfo *info; - - wxClassInfo::classTable.BeginFind(); - node = wxClassInfo::classTable.Next(); - while (node) - { - info = (wxClassInfo *)node->Data(); - if (info->GetClassName()) - { - wxTrace("%s ", info->GetClassName()); - - if (info->GetBaseClassName1() && !info->GetBaseClassName2()) - wxTrace("is a %s", info->GetBaseClassName1()); - else if (info->GetBaseClassName1() && info->GetBaseClassName2()) - wxTrace("is a %s, %s", info->GetBaseClassName1(), info->GetBaseClassName2()); - if (info->objectConstructor) - wxTrace(": dynamic\n"); - else - wxTrace("\n"); - } - node = node->Next(); - n ++; - } - wxTrace("\nThere are %d classes derived from wxObject.\n", n); - return TRUE; -} - -void wxDebugContext::SetCheckpoint(bool all) -{ - if (all) - checkPoint = NULL; - else - checkPoint = m_tail; -} - -// Checks all nodes since checkpoint, or since start. -int wxDebugContext::Check(bool checkAll) -{ - int nFailures = 0; - - wxMemStruct *from = (checkPoint ? checkPoint->m_next : (wxMemStruct*)NULL ); - if (!from || checkAll) - from = wxDebugContext::GetHead (); - - for (wxMemStruct * st = from; st != 0; st = st->m_next) - { - if (st->AssertIt ()) - nFailures += st->CheckBlock (); - else - return -1; - } - - return nFailures; -} - -// Count the number of non-wxDebugContext-related objects -// that are outstanding -int wxDebugContext::CountObjectsLeft(void) -{ - int n = 0; - - wxMemStruct *from = wxDebugContext::GetHead (); - - for (wxMemStruct * st = from; st != 0; st = st->m_next) - { - void* data = st->GetActualData(); - if ((data != (void*)m_debugStream) && (data != (void*) m_streamBuf)) - n ++; - } - - return n ; -} - -/* - The global operator new used for everything apart from getting - dynamic storage within this function itself. -*/ - -// We'll only do malloc and free for the moment: leave the interesting -// stuff for the wxObject versions. - -#if WXDEBUG && USE_GLOBAL_MEMORY_OPERATORS - -#ifdef new -#undef new -#endif - -// Seems OK all of a sudden. Maybe to do with linking with multithreaded library? -#if 0 // def _MSC_VER -#define NO_DEBUG_ALLOCATION -#endif - -// Unfortunately ~wxDebugStreamBuf doesn't work (VC++ 5) when we enable the debugging -// code. I have no idea why. In BC++ 4.5, we have a similar problem the debug -// stream myseriously changing pointer address between being passed from SetFile to SetStream. -// See docs/msw/issues.txt. -void * operator new (size_t size, char * fileName, int lineNum) -{ -#ifdef NO_DEBUG_ALLOCATION - return malloc(size); -#else - return wxDebugAlloc(size, fileName, lineNum, FALSE, FALSE); -#endif -} - -#if !( defined (_MSC_VER) && (_MSC_VER <= 1000) ) -void * operator new[] (size_t size, char * fileName, int lineNum) -{ -#ifdef NO_DEBUG_ALLOCATION - return malloc(size); -#else - return wxDebugAlloc(size, fileName, lineNum, FALSE, TRUE); -#endif -} -#endif - -void operator delete (void * buf) -{ -#ifdef NO_DEBUG_ALLOCATION - free((char*) buf); -#else - wxDebugFree(buf); -#endif -} - -#if !( defined (_MSC_VER) && (_MSC_VER <= 1000) ) -void operator delete[] (void * buf) -{ -#ifdef NO_DEBUG_ALLOCATION - free((char*) buf); -#else - wxDebugFree(buf, TRUE); -#endif -} -#endif - -#endif - -// TODO: store whether this is a vector or not. -void * wxDebugAlloc(size_t size, char * fileName, int lineNum, bool isObject, bool WXUNUSED(isVect) ) -{ - // If not in debugging allocation mode, do the normal thing - // so we don't leave any trace of ourselves in the node list. - - if (!wxDebugContext::GetDebugMode()) - { - return (void *)malloc(size); - } - - char * buf = (char *) malloc(wxDebugContext::TotSize (size)); - if (!buf) { - wxTrace("Call to malloc (%ld) failed.\n", (long)size); - return 0; - } - wxMemStruct * st = (wxMemStruct *)buf; - st->m_firstMarker = MemStartCheck; - st->m_reqSize = size; - st->m_fileName = fileName; - st->m_lineNum = lineNum; - st->m_id = MemStructId; - st->m_prev = 0; - st->m_next = 0; - st->m_isObject = isObject; - - // Errors from Append() shouldn't really happen - but just in case! - if (st->Append () == 0) { - st->ErrorMsg ("Trying to append new node"); - } - - if (wxDebugContext::GetCheckPrevious ()) { - if (st->CheckAllPrevious () < 0) { - st->ErrorMsg ("Checking previous nodes"); - } - } - - // Set up the extra markers at the middle and end. - char * ptr = wxDebugContext::MidMarkerPos (buf); - * (wxMarkerType *) ptr = MemMidCheck; - ptr = wxDebugContext::EndMarkerPos (buf, size); - * (wxMarkerType *) ptr = MemEndCheck; - - // pointer returned points to the start of the caller's - // usable area. - void *m_actualData = (void *) wxDebugContext::CallerMemPos (buf); - st->m_actualData = m_actualData; - - return m_actualData; -} - -// TODO: check whether was allocated as a vector -void wxDebugFree(void * buf, bool WXUNUSED(isVect) ) -{ - if (!buf) - return; - - // If not in debugging allocation mode, do the normal thing - // so we don't leave any trace of ourselves in the node list. - if (!wxDebugContext::GetDebugMode()) - { - free((char *)buf); - return; - } - - // Points to the start of the entire allocated area. - char * startPointer = wxDebugContext::StartPos ((char *) buf); - // Find the struct and make sure that it's identifiable. - wxMemStruct * st = (wxMemStruct *) wxDebugContext::StructPos (startPointer); - - if (! st->ValidateNode ()) - return; - - // If this is the current checkpoint, we need to - // move the checkpoint back so it points to a valid - // node. - if (st == wxDebugContext::checkPoint) - wxDebugContext::checkPoint = wxDebugContext::checkPoint->m_prev; - - if (! st->Unlink ()) - { - st->ErrorMsg ("Unlinking deleted node"); - } - - // Now put in the fill char into the id slot and the caller requested - // memory locations. - st->SetDeleted (); - (void) memset (wxDebugContext::CallerMemPos (startPointer), MemFillChar, - st->RequestSize ()); - - // Don't allow delayed freeing of memory in this version -// if (!wxDebugContext::GetDelayFree()) -// free((void *)st); - free((char *)st); -} - -// Trace: send output to the current debugging stream -void wxTrace(const char *fmt ...) -{ - va_list ap; - static char buffer[512]; - - va_start(ap, fmt); - -#ifdef __WXMSW__ - wvsprintf(buffer,fmt,ap) ; -#else - vsprintf(buffer,fmt,ap) ; -#endif - - va_end(ap); - - if (wxDebugContext::HasStream()) - { - wxDebugContext::GetStream() << buffer; - wxDebugContext::GetStream().flush(); - } - else -#ifdef __WXMSW__ - OutputDebugString((LPCSTR)buffer) ; -#else - fprintf(stderr, buffer); -#endif -} - -// Trace with level -void wxTraceLevel(int level, const char *fmt ...) -{ - if (wxDebugContext::GetLevel() < level) - return; - - va_list ap; - static char buffer[512]; - - va_start(ap, fmt); - -#ifdef __WXMSW__ - wvsprintf(buffer,fmt,ap) ; -#else - vsprintf(buffer,fmt,ap) ; -#endif - - va_end(ap); - - if (wxDebugContext::HasStream()) - { - wxDebugContext::GetStream() << buffer; - wxDebugContext::GetStream().flush(); - } - else -#ifdef __WXMSW__ - OutputDebugString((LPCSTR)buffer) ; -#else - fprintf(stderr, buffer); -#endif -} - -#else // USE_MEMORY_TRACING && WXDEBUG -void wxTrace(const char *WXUNUSED(fmt) ...) -{ -} - -void wxTraceLevel(int WXUNUSED(level), const char *WXUNUSED(fmt) ...) -{ -} -#endif - diff --git a/src/common/module.cpp b/src/common/module.cpp deleted file mode 100644 index 57c8a312cc..0000000000 --- a/src/common/module.cpp +++ /dev/null @@ -1,79 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: module.cpp -// Purpose: Modules initialization/destruction -// Author: Wolfram Gloger/adapted by Guilhem Lavaux -// Modified by: -// Created: 04/11/98 -// RCS-ID: $Id$ -// Copyright: (c) Wolfram Gloger and Guilhem Lavaux -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "module.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include "wx/module.h" -#include "wx/hash.h" - -IMPLEMENT_CLASS(wxModule, wxObject) - -wxList wxModule::m_modules; - -void wxModule::RegisterModule(wxModule* module) -{ - m_modules.Append(module); -} - -// Collect up all module-derived classes, create an instance of each, -// and register them. -bool wxModule::RegisterModules(void) -{ - wxNode *node; - wxClassInfo* classInfo; - - wxClassInfo::classTable.BeginFind(); - node = wxClassInfo::classTable.Next(); - while (node) - { - classInfo = (wxClassInfo *)node->Data(); - if ((classInfo != (& (wxModule::classwxModule))) && - classInfo->IsKindOf(CLASSINFO(wxModule))) - { - wxModule* module = (wxModule*) classInfo->CreateObject(); - RegisterModule(module); - } - node = wxClassInfo::classTable.Next(); - } - return TRUE; -} - -bool wxModule::InitializeModules(void) -{ - // Initialize user-defined modules - for (wxNode *node = m_modules.First(); node; node = node->Next()) - { - if (!((wxModule*)(node->Data()))->Init()) - return FALSE; - } - return TRUE; -} - -void wxModule::CleanUpModules(void) -{ - // Cleanup user-defined modules - for(wxNode* node = m_modules.Last(); node; node = node->Previous()) - { - ((wxModule*)(node->Data()))->Exit(); - delete (wxModule*)(node->Data()); - } - m_modules.Clear(); -} - diff --git a/src/common/mstream.cpp b/src/common/mstream.cpp deleted file mode 100644 index 7f72e82db4..0000000000 --- a/src/common/mstream.cpp +++ /dev/null @@ -1,210 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: mstream.cpp -// Purpose: "Memory stream" classes -// Author: Guilhem Lavaux -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "mstream.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" -#include -#include -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -// ---------------------------------------------------------------------------- -// wxMemoryStreamBase -// ---------------------------------------------------------------------------- -wxMemoryStreamBase::wxMemoryStreamBase() -{ - m_buffer = NULL; - m_iolimit = 0; - m_persistent = FALSE; - m_length = 0; -} - -wxMemoryStreamBase::~wxMemoryStreamBase() -{ - if (!m_persistent && m_buffer) - free(m_buffer); -} - -bool wxMemoryStreamBase::ChangeBufferSize(size_t new_size) -{ - if (m_iolimit == 1) - return FALSE; - - m_length = new_size; - if (!m_buffer) - m_buffer = (char *)malloc(m_length); - else - m_buffer = (char *)realloc(m_buffer, m_length); - - return (m_buffer != NULL); -} - -// ---------------------------------------------------------------------------- -// wxMemoryInputStream -// ---------------------------------------------------------------------------- - -wxMemoryInputStream::wxMemoryInputStream(const char *data, size_t len) -{ - m_persistent = TRUE; - m_length = len; - m_buffer = (char *)data; // It's bad. - m_position_i = 0; - m_lastread = 0; - m_eof = FALSE; - m_iolimit = 1; - - m_i_streambuf->SetBufferIO(0); -} - -wxMemoryInputStream::~wxMemoryInputStream() -{ -} - -char wxMemoryInputStream::Peek() -{ - // wxStreamBuffer is disabled so just peek the current character. - - return m_buffer[m_position_i]; -} - -size_t wxMemoryInputStream::DoRead(void *buffer, size_t size) -{ - if (m_iolimit == 2) { - m_eof = TRUE; - return 0; - } - if (m_position_i+size > m_length) - size = m_length-m_position_i; - - memcpy((void *)((unsigned long)buffer+m_position_i), m_buffer, size); - m_position_i += size; - - return size; -} - -off_t wxMemoryInputStream::DoSeekInput(off_t pos, wxSeekMode mode) -{ - if (m_iolimit == 2) - return 0; - - switch (mode) { - case wxFromStart: - if ((size_t)pos > m_length) - return m_position_i; - return (m_position_i = pos); - - case wxFromCurrent: - if ((size_t)(m_position_i+pos) > m_length) - return m_position_i; - - return (m_position_i += pos); - - case wxFromEnd: - if ((size_t)(m_length-pos) > m_length) - return m_position_i; - - return (m_position_i = m_length-pos); - } - - return m_position_i; -} - -// ---------------------------------------------------------------------------- -// wxMemoryOutputStream -// ---------------------------------------------------------------------------- - -wxMemoryOutputStream::wxMemoryOutputStream(char *data, size_t len) -{ - m_persistent = FALSE; - m_buffer = data; - m_length = len; - m_position_o = 0; - m_lastwrite = 0; - m_bad = FALSE; - m_iolimit = 2; - - m_o_streambuf->SetBufferIO(0); -} - -wxMemoryOutputStream::~wxMemoryOutputStream() -{ - Sync(); -} - -size_t wxMemoryOutputStream::DoWrite(const void *buffer, size_t size) -{ - if (m_iolimit == 1) { - m_bad = TRUE; - return 0; - } - - if (m_position_o+size > m_length) - if (!ChangeBufferSize(m_position_o+size)) { - m_bad = TRUE; - return 0; - } - - memcpy(m_buffer+m_position_o, buffer, size); - m_position_o += size; - - return size; -} - -off_t wxMemoryOutputStream::DoSeekOutput(off_t pos, wxSeekMode mode) -{ - if (m_iolimit == 1) - return 0; - - switch (mode) { - case wxFromStart: - if ((size_t)pos > m_length) - return m_position_o; - return (m_position_o = pos); - - case wxFromCurrent: - if ((size_t)(m_position_o+pos) > m_length) - return m_position_o; - - return (m_position_o += pos); - - case wxFromEnd: - if ((size_t)(m_length-pos) > m_length) - return m_position_o; - - return (m_position_o = m_length-pos); - } - - return m_position_o; -} - -// ---------------------------------------------------------------------------- -// wxMemoryStream -// ---------------------------------------------------------------------------- - -wxMemoryStream::wxMemoryStream(char *data, size_t len) - : wxMemoryInputStream(NULL, 0), wxMemoryOutputStream(NULL, 0) -{ - m_persistent = FALSE; - m_buffer = data; - m_length = len; - m_iolimit = 0; -} - -wxMemoryStream::~wxMemoryStream() -{ -} diff --git a/src/common/object.cpp b/src/common/object.cpp deleted file mode 100644 index 8cbdcef7c4..0000000000 --- a/src/common/object.cpp +++ /dev/null @@ -1,332 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: object.cpp -// Purpose: wxObject implementation -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "object.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/hash.h" -#ifdef USE_SERIAL -#include "wx/objstrm.h" -#include "wx/serbase.h" -#endif -#endif - -#include -#include - -#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT -#include "wx/memory.h" -#endif - -#if WXDEBUG || USE_DEBUG_CONTEXT - // for wxObject::Dump - #include -#endif - -#if !USE_SHARED_LIBRARY -wxClassInfo wxObject::classwxObject((char *) "wxObject", (char *) NULL, (char *) NULL, (int ) sizeof(wxObject), (wxObjectConstructorFn) NULL); -wxClassInfo *wxClassInfo::first = (wxClassInfo *) NULL; -wxHashTable wxClassInfo::classTable(wxKEY_STRING); -#endif - -/* - * wxWindows root object. - */ - -wxObject::wxObject(void) -{ - m_refData = (wxObjectRefData *) NULL; -#ifdef USE_SERIAL - m_serialObj = (wxObject_Serialize *)NULL; -#endif -} - -wxObject::~wxObject(void) -{ - UnRef(); -#ifdef USE_SERIAL - if (m_serialObj) - delete m_serialObj; -#endif -} - -/* - * Is this object a kind of (a subclass of) 'info'? - * E.g. is wxWindow a kind of wxObject? - * Go from this class to superclass, taking into account - * two possible base classes. - */ - -bool wxObject::IsKindOf(wxClassInfo *info) -{ - wxClassInfo *thisInfo = GetClassInfo(); - if (thisInfo) - return thisInfo->IsKindOf(info); - else - return FALSE; -} - -#if WXDEBUG || USE_DEBUG_CONTEXT -void wxObject::Dump(ostream& str) -{ - if (GetClassInfo() && GetClassInfo()->GetClassName()) - str << GetClassInfo()->GetClassName(); - else - str << "unknown object class"; -} -#endif - -#if WXDEBUG && USE_MEMORY_TRACING - -#ifdef new -#undef new -#endif - -void * wxObject::operator new (size_t size, char * fileName, int lineNum) -{ - return wxDebugAlloc(size, fileName, lineNum, TRUE); -} - -void wxObject::operator delete (void * buf) -{ - wxDebugFree(buf); -} - -// Cause problems for VC++ - crashes -#ifndef _MSC_VER -void * wxObject::operator new[] (size_t size, char * fileName, int lineNum) -{ - return wxDebugAlloc(size, fileName, lineNum, TRUE, TRUE); -} - -void wxObject::operator delete[] (void * buf) -{ - wxDebugFree(buf, TRUE); -} -#endif - -#endif - -/* - * Class info: provides run-time class type information. - */ - -wxClassInfo::wxClassInfo(char *cName, char *baseName1, char *baseName2, int sz, wxObjectConstructorFn constr) -{ - className = cName; - baseClassName1 = baseName1; - baseClassName2 = baseName2; - - objectSize = sz; - objectConstructor = constr; - - next = first; - first = this; - - baseInfo1 = (wxClassInfo *) NULL; - baseInfo2 = (wxClassInfo *) NULL; -} - -wxObject *wxClassInfo::CreateObject(void) -{ - if (objectConstructor) - return (wxObject *)(*objectConstructor)(); - else - return (wxObject *) NULL; -} - -wxClassInfo *wxClassInfo::FindClass(char *c) -{ - wxClassInfo *p = first; - while (p) - { - if (p && p->GetClassName() && strcmp(p->GetClassName(), c) == 0) - return p; - p = p->next; - } - return (wxClassInfo *) NULL; -} - -// Climb upwards through inheritance hierarchy. -// Dual inheritance is catered for. -bool wxClassInfo::IsKindOf(wxClassInfo *info) -{ - if (info == NULL) - return FALSE; - - // For some reason, when making/using a DLL, static data has to be included - // in both the DLL and the application. This can lead to duplicate - // wxClassInfo objects, so we have to test the name instead of the pointers. -#if WXMAKINGDLL - if (GetClassName() && info->GetClassName() && (strcmp(GetClassName(), info->GetClassName()) == 0)) - return TRUE; -#else - if (this == info) - return TRUE; -#endif - - if (baseInfo1) - if (baseInfo1->IsKindOf(info)) - return TRUE; - - if (baseInfo2) - return baseInfo2->IsKindOf(info); - - return FALSE; -} - -// Set pointers to base class(es) to speed up IsKindOf -void wxClassInfo::InitializeClasses(void) -{ - // Index all class infos by their class name - wxClassInfo *info = first; - while (info) - { - if (info->className) - classTable.Put(info->className, (wxObject *)info); - info = info->next; - } - - // Set base pointers for each wxClassInfo - info = first; - while (info) - { - if (info->GetBaseClassName1()) - info->baseInfo1 = (wxClassInfo *)classTable.Get(info->GetBaseClassName1()); - if (info->GetBaseClassName2()) - info->baseInfo2 = (wxClassInfo *)classTable.Get(info->GetBaseClassName2()); - info = info->next; - } - first = NULL; -} - -wxObject *wxCreateDynamicObject(char *name) -{ - wxClassInfo *info; - - info = (wxClassInfo *)wxClassInfo::classTable.Get(name); - if (!info) - return (wxObject *)NULL; - - return info->CreateObject(); -} - -#ifdef USE_SERIAL - -#include "wx/serbase.h" -#include "wx/dynlib.h" -#include "wx/msgdlg.h" - -wxObject* wxCreateStoredObject( wxInputStream &stream ) -{ - wxObjectInputStream obj_s(stream); - return obj_s.LoadObject(); -}; - -void wxObject::StoreObject( wxObjectOutputStream& stream ) -{ - wxString obj_name = wxString(GetClassInfo()->GetClassName()) + "_Serialize"; - wxLibrary *lib = wxTheLibraries.LoadLibrary("wxserial"); - - if (!lib) { - wxMessageBox("Can't load wxSerial dynamic library.", "Alert !"); - return; - } - if (!m_serialObj) { - m_serialObj = (WXSERIAL(wxObject) *)lib->CreateObject( obj_name ); - - if (!m_serialObj) { - wxString message; - - message.Printf("Can't find the serialization object (%s) for the object %s", - WXSTRINGCAST obj_name, - WXSTRINGCAST GetClassInfo()->GetClassName()); - wxMessageBox(message, "Alert !"); - return; - } - m_serialObj->SetObject(this); - } - - m_serialObj->StoreObject(stream); -} - -void wxObject::LoadObject( wxObjectInputStream& stream ) -{ - wxString obj_name = wxString(GetClassInfo()->GetClassName()) + "_Serialize"; - wxLibrary *lib = wxTheLibraries.LoadLibrary("wxserial"); - - if (!m_serialObj) { - m_serialObj = (WXSERIAL(wxObject) *)lib->CreateObject( obj_name ); - - if (!m_serialObj) { - wxString message; - - message.Printf("Can't find the serialization object (%s) for the object %s", - WXSTRINGCAST obj_name, - WXSTRINGCAST GetClassInfo()->GetClassName()); - wxMessageBox(message, "Alert !"); - return; - } - m_serialObj->SetObject(this); - } - - m_serialObj->LoadObject(stream); -} - -#endif - -/* - * wxObject: cloning of objects - */ - -void wxObject::Ref(const wxObject& clone) -{ - // delete reference to old data - UnRef(); - // reference new data - if (clone.m_refData) { - m_refData = clone.m_refData; - ++(m_refData->m_count); - } -} - -void wxObject::UnRef(void) -{ - if (m_refData) { - assert(m_refData->m_count > 0); - --(m_refData->m_count); - if (m_refData->m_count == 0) - delete m_refData; - } - m_refData = (wxObjectRefData *) NULL; -} - -/* - * wxObjectData - */ - -wxObjectRefData::wxObjectRefData(void) : m_count(1) -{ -} - -wxObjectRefData::~wxObjectRefData(void) -{ -} - diff --git a/src/common/objstrm.cpp b/src/common/objstrm.cpp deleted file mode 100644 index 2bb34f1c59..0000000000 --- a/src/common/objstrm.cpp +++ /dev/null @@ -1,312 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: objstrm.cpp -// Purpose: wxObjectStream classes -// Author: Guilhem Lavaux -// Modified by: -// Created: 16/07/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "objstrm.h" -#endif - -#include "wx/object.h" -#include "wx/objstrm.h" -#include "wx/datstrm.h" - -#define WXOBJ_BEGIN "OBEGIN" -#define WXOBJ_BEG_LEN 6 - -#define TAG_EMPTY_OBJECT "NULL" -#define TAG_DUPLICATE_OBJECT "DUPLIC" - -// ---------------------------------------------------------------------------- -// wxObjectOutputStream -// ---------------------------------------------------------------------------- - -wxObjectOutputStream::wxObjectOutputStream(wxOutputStream& s) - : wxFilterOutputStream(s) -{ - m_saving = FALSE; -} - -wxString wxObjectOutputStream::GetObjectName(wxObject *obj) -{ - wxString name; - - name.Printf("%x", (unsigned long)obj); - return name; -} - -void wxObjectOutputStream::WriteObjectDef(wxObjectStreamInfo& info) -{ - wxDataOutputStream data_s(*this); - - Write(WXOBJ_BEGIN, WXOBJ_BEG_LEN); - - if (info.duplicate) { - data_s.WriteString(TAG_DUPLICATE_OBJECT); - data_s.WriteString(GetObjectName(info.object)); - printf("info.object (dup %s)\n", info.object->GetClassInfo()->GetClassName()); - return; - } - - if (info.object) { - data_s.WriteString(info.object->GetClassInfo()->GetClassName()); - printf("info.object (%s)\n", info.object->GetClassInfo()->GetClassName()); - } else { - data_s.WriteString(TAG_EMPTY_OBJECT); - printf("info.object (NULL)\n"); - return; - } - - data_s.WriteString(GetObjectName(info.object)); - - // I assume an object will not have millions of children - // Hmmm ... it could have (for example wxGrid) - data_s.Write32(info.children.Number()); -} - -void wxObjectOutputStream::AddChild(wxObject *obj) -{ - wxObjectStreamInfo *info; - - if (!FirstStage()) - return; - - info = new wxObjectStreamInfo; - - if (m_saved_objs.Member(obj) != NULL) { - info->duplicate = TRUE; - } else { - info->duplicate = FALSE; - m_saved_objs.Append(obj); - } - if (!obj) - info->duplicate = FALSE; - - info->n_children = 0; - info->object = obj; - info->parent = m_current_info; // Not useful here. - m_current_info->n_children++; - m_current_info->children.Append(info); -} - -void wxObjectOutputStream::ProcessObjectDef(wxObjectStreamInfo *info) -{ - wxNode *node; - - m_current_info = info; - // First stage: get children of obj - if (info->object && !info->duplicate) - info->object->StoreObject(*this); - - // Prepare and write the sub-entry about the child obj. - WriteObjectDef(*info); - - node = info->children.First(); - - while (node) { - ProcessObjectDef((wxObjectStreamInfo *)node->Data()); - node = node->Next(); - } -} - -void wxObjectOutputStream::ProcessObjectData(wxObjectStreamInfo *info) -{ - wxNode *node = info->children.First(); - - m_current_info = info; - - if (info->object && !info->duplicate) - info->object->StoreObject(*this); - - while (node) { - ProcessObjectData((wxObjectStreamInfo *)node->Data()); - node = node->Next(); - } -} - -bool wxObjectOutputStream::SaveObject(wxObject& obj) -{ - wxObjectStreamInfo info; - - if (m_saving) - return FALSE; - - m_saving = TRUE; - - // First stage - m_stage = 0; - info.object = &obj; - info.n_children = 0; - info.duplicate = FALSE; - ProcessObjectDef(&info); - - m_stage = 1; - ProcessObjectData(&info); - - info.children.Clear(); - m_saved_objs.Clear(); - - m_saving = FALSE; - - return TRUE; -} - -// ---------------------------------------------------------------------------- -// wxObjectInputStream -// ---------------------------------------------------------------------------- - -wxObjectInputStream::wxObjectInputStream(wxInputStream& s) - : wxFilterInputStream(s) -{ -} - -wxObject *wxObjectInputStream::SolveName(const wxString& name) const -{ - wxNode *node = m_solver.First(); - wxObjectStreamInfo *info; - - while (node) { - info = (wxObjectStreamInfo *)node->Data(); - if (info->object_name == name) - return info->object; - - node = node->Next(); - } - return (wxObject *) NULL; -} - -wxObject *wxObjectInputStream::GetParent() const -{ - if (!m_current_info->parent) - return (wxObject *) NULL; - - return m_current_info->parent->object; -} - -wxObject *wxObjectInputStream::GetChild() -{ - wxObject *obj = GetChild(0); - - m_current_info->children_removed++; - - return obj; -} - -wxObject *wxObjectInputStream::GetChild(int no) const -{ - wxNode *node; - wxObjectStreamInfo *info; - - if (m_current_info->children_removed >= m_current_info->n_children) - return (wxObject *) NULL; - - node = m_current_info->children.Nth(m_current_info->children_removed+no); - - if (!node) - return (wxObject *) NULL; - - info = (wxObjectStreamInfo *)node->Data(); - - return info->object; -} - -void wxObjectInputStream::RemoveChildren(int nb) -{ - m_current_info->children_removed += nb; -} - -bool wxObjectInputStream::ReadObjectDef(wxObjectStreamInfo *info) -{ - wxDataInputStream data_s(*this); - char sig[WXOBJ_BEG_LEN+1]; - wxString class_name; - - Read(sig, WXOBJ_BEG_LEN); - sig[WXOBJ_BEG_LEN] = 0; - if (wxString(sig) != WXOBJ_BEGIN) - return FALSE; - - class_name = data_s.ReadString(); - info->children_removed = 0; - info->n_children = 0; - - if (class_name == TAG_EMPTY_OBJECT) - info->object = (wxObject *) NULL; - else if (class_name == TAG_DUPLICATE_OBJECT) { - info->object_name = data_s.ReadString(); - info->object = SolveName(info->object_name); - } else { - info->object_name = data_s.ReadString(); - info->object = wxCreateDynamicObject( WXSTRINGCAST class_name); - info->n_children = data_s.Read32(); - } - return TRUE; -} - -wxObjectStreamInfo *wxObjectInputStream::ProcessObjectDef(wxObjectStreamInfo *parent) -{ - wxObjectStreamInfo *info, *c_info; - int c; - - info = new wxObjectStreamInfo; - info->parent = parent; - info->children.DeleteContents(TRUE); - - m_solver.Append(info); - - if (!ReadObjectDef(info)) - return (wxObjectStreamInfo *) NULL; - - for (c=0;cn_children;c++) { - c_info = ProcessObjectDef(info); - if (!c_info) - return (wxObjectStreamInfo *) NULL; - info->children.Append(c_info); - } - - return info; -} - -void wxObjectInputStream::ProcessObjectData(wxObjectStreamInfo *info) -{ - wxNode *node = info->children.First(); - - m_current_info = info; - - if (info->object) - info->object->LoadObject(*this); - while (node) { - ProcessObjectData((wxObjectStreamInfo *)node->Data()); - node = node->Next(); - } - - m_current_info = info; - - if (info->recall) { - m_secondcall = TRUE; - info->object->LoadObject(*this); - m_secondcall = FALSE; - } -} - -wxObject *wxObjectInputStream::LoadObject() -{ - wxObjectStreamInfo *info; - wxObject *object; - - info = ProcessObjectDef((wxObjectStreamInfo *) NULL); - if (!info) - return (wxObject *) NULL; - ProcessObjectData(info); - - object = info->object; - - delete info; // It's magic ! The whole tree is destroyed. - - return object; -} diff --git a/src/common/odbc.cpp b/src/common/odbc.cpp deleted file mode 100644 index de925cc2ea..0000000000 --- a/src/common/odbc.cpp +++ /dev/null @@ -1,1830 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: odbc.cpp -// Purpose: ODBC implementation -// Author: Julian Smart, Olaf Klein (oklein@smallo.ruhr.de), -// Patrick Halke (patrick@zaphod.ruhr.de) -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "odbc.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include "wx/defs.h" - -#if USE_ODBC - -#ifndef WX_PRECOMP -#include "wx/utils.h" -#include "wx/dialog.h" -#endif - -#include "wx/string.h" -#include "wx/odbc.h" - -#include -#include - -#if defined(__WXMSW__) && !defined(__WIN32__) -#include -#endif - -HENV wxDatabase::hEnv = 0; -int wxDatabase::refCount = 0; - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxDatabase, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxQueryCol, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxQueryField, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxRecordSet, wxObject) -#endif - -wxDatabase::wxDatabase(void) -{ - hDBC = 0; - username = NULL; - password = NULL; - datasource = NULL; - dbname = NULL; - connectstring = NULL; - isOpen = FALSE; - refCount ++; - retcode = 0; - username = NULL; - password = NULL; - err_occured = FALSE; - - memset(sqlstate, 0, sizeof sqlstate); - memset(errmsg, 0, sizeof errmsg); - - if (hEnv == 0) - { - retcode = SQLAllocEnv(&hEnv); - - if (retcode != SQL_SUCCESS) - hEnv = 0; - } -} - -wxDatabase::~wxDatabase(void) -{ - Close(); - DeleteRecordSets(); // Added JACS - - if (connectstring) - delete[] connectstring; - if (datasource) - delete[] datasource; - if (username) - delete[] username; - if (password) - delete[] password; - if (dbname) - delete[] dbname; - - refCount --; - if (!refCount && hEnv) - { - retcode = SQLFreeEnv(hEnv); - hEnv = 0; // JACS 17/6 - } -} - -void wxDatabase::ErrorSnapshot(HSTMT hstmt) -{ - SWORD len = 0; // JACS: sometimes doesn't get filled in by SQLError. - - err_occured = TRUE; - SQLError(hEnv, hDBC, hstmt, (unsigned char *)sqlstate, &nat_err, (unsigned char *)errmsg, SQL_MAX_MESSAGE_LENGTH-1, &len); - errmsg[len] = '\0'; -} - -bool wxDatabase::ErrorOccured(void) -{ - return err_occured; -} - -char* wxDatabase::GetErrorMessage(void) -{ - return errmsg; -} - -long wxDatabase::GetErrorNumber(void) -{ - return nat_err; -} - -char* wxDatabase::GetErrorClass(void) { - return sqlstate; -} - -bool wxDatabase::Open(char *thedatasource, bool WXUNUSED(exclusive), - bool WXUNUSED(readOnly), char *username, char *password) -{ - err_occured = FALSE; - - if (isOpen) - return FALSE; - - SetUsername(username); - SetPassword(password); - SetDataSource(thedatasource); - - if (!hEnv) - return FALSE; - - retcode = SQLAllocConnect(hEnv, &hDBC); - if (retcode != SQL_SUCCESS) { - hDBC = 0; - return FALSE; - } - - retcode = SQLConnect(hDBC, (UCHAR FAR*)thedatasource, strlen(thedatasource), (UCHAR FAR*)username, strlen(username), - (UCHAR FAR*)password, strlen(password)); - - if (retcode != SQL_SUCCESS && retcode != SQL_SUCCESS_WITH_INFO) { - ErrorSnapshot(); - return FALSE; - } - - isOpen = TRUE; - - return TRUE; -} - -bool wxDatabase::Close(void) -{ - // JACS: make sure the record set statements are all released. - ResetRecordSets(); - - err_occured = FALSE; - if (hDBC != 0) - { - retcode = SQLDisconnect(hDBC); - - if (retcode != SQL_SUCCESS && retcode != SQL_SUCCESS_WITH_INFO) { - ErrorSnapshot(); - return FALSE; - } - - retcode = SQLFreeConnect(hDBC); - - hDBC = 0; - isOpen = FALSE; - - return TRUE; - } - - return FALSE; -} - -// Database attributes -char *wxDatabase::GetDatabaseName(void) -{ - err_occured = FALSE; - if (hDBC == 0) - return NULL; - - char nameBuf[400]; - int nameSize = 0; - - retcode = SQLGetInfo(hDBC, SQL_DATABASE_NAME, (unsigned char*)nameBuf, sizeof(nameBuf), (short *)&nameSize); - - if (retcode != SQL_SUCCESS && retcode != SQL_SUCCESS_WITH_INFO) - return NULL; - - delete[] dbname; - dbname = NULL; - - if (nameSize > 0) - { - dbname = copystring(nameBuf); - return dbname; - } - else - return NULL; -} - -bool wxDatabase::CanUpdate(void) -{ - return FALSE; -} - -bool wxDatabase::CanTransact(void) -{ - return FALSE; -} - -bool wxDatabase::InWaitForDataSource(void) -{ - return FALSE; -} - -void wxDatabase::SetLoginTimeout(long WXUNUSED(seconds)) -{ -} - -void wxDatabase::SetQueryTimeout(long WXUNUSED(seconds)) -{ -} - -void wxDatabase::SetSynchronousMode(bool WXUNUSED(synchronous)) -{ -} - -// Database operations -bool wxDatabase::BeginTrans(void) -{ - return FALSE; -} - -bool wxDatabase::CommitTrans(void) -{ - return FALSE; -} - -bool wxDatabase::RollbackTrans(void) -{ - return FALSE; -} - -void wxDatabase::Cancel(void) -{ -} - -// Overridables -void wxDatabase::OnSetOptions(wxRecordSet *WXUNUSED(recordSet)) -{ -} - -void wxDatabase::OnWaitForDataSource(bool WXUNUSED(stillExecuting)) -{ -} - -void wxDatabase::SetPassword(char *s) -{ - if (password) - delete[] password; - if (s) - { - password = copystring(s); - } - else - password = NULL; -} - -void wxDatabase::SetUsername(char *s) -{ - delete[] username; - - if (s) - username = copystring(s); - else - username = NULL; -} - -void wxDatabase::SetDataSource(char *s) -{ - delete[] datasource; - - if (s) - datasource = copystring(s); - else - datasource = NULL; -} - -/* - * Added by JACS - */ - -void wxDatabase::DeleteRecordSets(void) -{ - wxNode *node = recordSets.First(); - while (node) - { - wxNode *next = node->Next(); - wxRecordSet *rec = (wxRecordSet *)node->Data(); - delete rec; - // The node is implicitly deleted by ~wxRecordSet - node = next; - } -} - -void wxDatabase::ResetRecordSets(void) -{ - wxNode *node = recordSets.First(); - while (node) - { - wxRecordSet *rec = (wxRecordSet *)node->Data(); - rec->ReleaseHandle(); - - node = node->Next(); - } -} - -bool wxDatabase::GetInfo(long infoType, long *buf) -{ - short sz = 0; - retcode = SQLGetInfo(hDBC, (UWORD)infoType, (unsigned char*)buf, sizeof(buf), &sz); - - if (retcode != SQL_ERROR) - return TRUE; - else - return FALSE; -} - -bool wxDatabase::GetInfo(long infoType, char *buf, int bufSize) -{ - if (bufSize == -1) - bufSize = sizeof(buf); - - short sz = 0; - retcode = SQLGetInfo(hDBC, (UWORD)infoType, (unsigned char*)buf, bufSize, &sz); - - if (retcode != SQL_ERROR) - return TRUE; - else - return FALSE; -} - -wxString wxDatabase::GetODBCVersionString(bool implementation) -{ - char buf[50]; - if (!implementation) - { -#ifdef SQL_SPEC_MAJOR - sprintf(buf, "%d%d.%d", (int)(SQL_SPEC_MAJOR/10), (int)(SQL_SPEC_MAJOR - (((int)(SQL_SPEC_MAJOR/10))*10)), - SQL_SPEC_MINOR); - return wxString(buf); -#else - return wxString("00.00"); -#endif - } - - bool noDBC = FALSE; - if (hDBC == 0) - { - noDBC = TRUE; - retcode = SQLAllocConnect(hEnv, &hDBC); - if (retcode != SQL_SUCCESS) - { - hDBC = 0; - return wxString("00.00"); - } - } - - int bufSize = sizeof(buf); - - short sz = 0; - retcode = SQLGetInfo(hDBC, (UWORD)SQL_ODBC_VER, (unsigned char*)buf, bufSize, &sz); - - if (hDBC != 0 && noDBC) - { - retcode = SQLFreeConnect(hDBC); - hDBC = 0; - } - - if (retcode == SQL_ERROR) - return wxString(""); - else - return wxString(buf); -} - -float wxDatabase::GetODBCVersionFloat(bool implementation) -{ - if (!implementation) - { -#ifdef SQL_SPEC_MAJOR - return (float)(SQL_SPEC_MAJOR + (SQL_SPEC_MINOR/100.0)); -#else - return 0.0; -#endif - } - - bool noDBC = FALSE; - if (hDBC == 0) - { - noDBC = TRUE; - retcode = SQLAllocConnect(hEnv, &hDBC); - if (retcode != SQL_SUCCESS) - { - hDBC = 0; - return (float)0.0; - } - } - - char buf[50]; - int bufSize = sizeof(buf); - - short sz = 0; - retcode = SQLGetInfo(hDBC, (UWORD)SQL_ODBC_VER, (unsigned char*)buf, bufSize, &sz); - - if (hDBC != 0 && noDBC) - { - retcode = SQLFreeConnect(hDBC); - hDBC = 0; - } - - if (retcode == SQL_ERROR) - return 0.0; - else - return atof(buf); -} - -/* - * wxRecordSet - */ - -wxRecordSet::wxRecordSet(wxDatabase *db, int typ, int opt): - cols(wxKEY_STRING) -{ - parentdb = db; - hStmt = 0; - nFields = 0; - nParams = 0; - recordFilter = NULL; - sortString = NULL; - retcode = 0; - cursor = 0; - tablename = NULL; - nCols = 0; - nRecords = 0; - - type = typ; - options = opt; - - // Added JACS - if (parentdb) - parentdb->GetRecordSets().Append(this); -} - -wxRecordSet::~wxRecordSet(void) -{ - ReleaseHandle(); - - // JACS - if (parentdb) - parentdb->GetRecordSets().DeleteObject(this); - - if (recordFilter) - delete[] recordFilter; - if (sortString) - delete[] sortString; - if (tablename) - delete[] tablename; -} - -// If SQL is non-NULL, table and columns can be NULL. -bool wxRecordSet::BeginQuery(int WXUNUSED(openType), char *WXUNUSED(sql), int WXUNUSED(options)) -{ - // Needs to construct an appropriate SQL statement. By default - // (i.e. if table and columns are provided) then - // SELECT FROM - // will be used. - if (!parentdb) - return FALSE; - if (!parentdb->GetHDBC()) - return FALSE; - - if (hStmt) - { - retcode = SQLFreeStmt(hStmt, SQL_DROP); - if (retcode == SQL_ERROR) - { - parentdb->ErrorSnapshot(hStmt); - return FALSE; - } - hStmt = 0; - } - - retcode = SQLAllocStmt(parentdb->GetHDBC(), &hStmt); - if (retcode != SQL_SUCCESS) - return FALSE; - - return TRUE; -} - -bool wxRecordSet::Query(char *columns, char *table, char *filter) -{ - // Needs to construct an appropriate SQL statement. By default - // (i.e. if table and columns are provided) then - // SELECT FROM
    - // will be used. - - char* thetable = table ? table : tablename; - - if (!thetable) - return FALSE; - if (!columns) - return FALSE; - - wxString query; - - query += "SELECT "; - query += columns; - query += " FROM "; - query += thetable; - - if (filter) { - query += " WHERE "; - query += filter; - } - retcode = SQLPrepare(hStmt, (UCHAR FAR *)query.GetData(), strlen(query.GetData())); - if (retcode != SQL_SUCCESS) { - parentdb->ErrorSnapshot(hStmt); - return FALSE; - } - - retcode = SQLExecute(hStmt); - - if (retcode != SQL_SUCCESS && retcode != SQL_SUCCESS_WITH_INFO) { - parentdb->ErrorSnapshot(hStmt); - return FALSE; - } - - return TRUE; -} - -bool wxRecordSet::EndQuery(void) -{ - return TRUE; -} - -void wxRecordSet::FillVars(int recnum) { - wxNode* node = cols.First(); - - do { - ((wxQueryCol*)node->Data())->FillVar(recnum); - } while ((node = node->Next())); -} - -bool wxRecordSet::GetResultSet(void) -{ -// long trash = SQL_NULL_DATA; // value added by JACS - long trash; - // contains the number of bytes transferred by SQLFetch() - // who needs this ? - wxNode *currow, *fetch, *curcol; - - retcode = SQLNumResultCols(hStmt, &nCols); - - if (!nCols) - return TRUE; - - // delete old data first - cols.DeleteContents(TRUE); - cols.Clear(); - fetchbuf.DeleteContents(TRUE); - fetchbuf.Clear(); - - nRecords = 0; - cursor = 0; - - int i; - for (i=0; iErrorSnapshot(hStmt); - return FALSE; - } - - wxQueryCol *col1 = new wxQueryCol; - curcol = cols.Append(name, col1); - col1->SetName(name); - col1->SetType(type); - col1->SetNullable((nullable != 0)); - - wxQueryField *field1 = new wxQueryField; - fetch = fetchbuf.Append(field1); - field1->SetType(type); - field1->SetSize(len); - - SQLBindCol(hStmt, i+1, SQL_C_BINARY, field1->GetData(), field1->GetSize(), &trash); - } - - switch (type) { - case wxOPEN_TYPE_SNAPSHOT: - // get it all ! - // After we've done an SQLFetch, copy the data in the fetch buffer into - // new fields, for each column. - while (SQL_SUCCESS == (retcode = SQLFetch(hStmt)) || SQL_SUCCESS_WITH_INFO == retcode) { - nRecords++; - - curcol = cols.First(); - fetch = fetchbuf.First(); - for (i=0; iData(); - wxQueryCol *col = (wxQueryCol *)curcol->Data(); - wxQueryField *field = new wxQueryField; - - currow = col->fields.Append(field); - - field->SetType(fetchField->GetType()); - field->SetData(fetchField->GetData(), fetchField->GetSize()); - curcol = curcol->Next(); - fetchField->ClearData(); // Runs ok if this commented out and SetData commented out - fetch = fetch->Next(); - } - } - // while loop should only be left, when no more data was found; - // otherwise it seems, that there was an error - if (SQL_NO_DATA_FOUND != retcode) { - parentdb->ErrorSnapshot(hStmt); - return FALSE; - } - break; - case wxOPEN_TYPE_DYNASET: - // get first record only - if (SQL_SUCCESS == (retcode = SQLFetch(hStmt)) || retcode == SQL_SUCCESS_WITH_INFO) { - nRecords = 1; // TO DO! # of records in the ODBC result set should be set here. - - curcol = cols.First(); - fetch = fetchbuf.First(); - for (i=0; iData())->fields.Append(new wxQueryField); - - ((wxQueryField*)currow->Data())->SetType(((wxQueryField*)fetch->Data())->GetType()); - ((wxQueryField*)currow->Data())->SetData(((wxQueryField*)fetch->Data())->GetData(), ((wxQueryField*)fetch->Data())->GetSize()); - curcol = curcol->Next(); - ((wxQueryField*)fetch->Data())->ClearData(); - fetch = fetch->Next(); - } - } - if (SQL_NO_DATA_FOUND != retcode) { - parentdb->ErrorSnapshot(hStmt); - return FALSE; - } - break; - default: - return FALSE; - } - - FillVars(0); - - return TRUE; -} - -bool wxRecordSet::ExecuteSQL(char *sql) -{ - if (hStmt) - { - retcode = SQLFreeStmt(hStmt, SQL_DROP); - if (retcode == SQL_ERROR) - { - parentdb->ErrorSnapshot(hStmt); - return FALSE; - } - hStmt = NULL; - } - - retcode = SQLAllocStmt(parentdb->GetHDBC(), &hStmt); - - if (SQL_SUCCESS != retcode) { - parentdb->ErrorSnapshot(hStmt); - return FALSE; - } - - retcode = SQLExecDirect(hStmt, (UCHAR FAR*)sql, SQL_NTS); - - if (SQL_SUCCESS != retcode && SQL_SUCCESS_WITH_INFO != retcode) { - parentdb->ErrorSnapshot(hStmt); - return FALSE; - } - - return GetResultSet(); -} - -bool wxRecordSet::GetDataSources(void) { - - char *dsname = "Name", *dsdesc = "Description"; - char namebuf[64]; - char descbuf[512]; - short namelen, desclen; - - cursor = 0; - - // delete old data first - cols.DeleteContents(TRUE); - cols.Clear(); - nRecords = 0; - - // JACS This is a snapshot, not a dynaset. - type = wxOPEN_TYPE_SNAPSHOT; - - wxNode *namecol, *desccol; - - namecol = cols.Append(dsname, new wxQueryCol); - ((wxQueryCol*)namecol->Data())->SetName(dsname); - ((wxQueryCol*)namecol->Data())->SetType(SQL_CHAR); - desccol = cols.Append(dsdesc, new wxQueryCol); - ((wxQueryCol*)desccol->Data())->SetName(dsdesc); - ((wxQueryCol*)desccol->Data())->SetType(SQL_CHAR); - - retcode = SQLDataSources(parentdb->GetHENV(), SQL_FETCH_FIRST, (unsigned char *)namebuf, 63, &namelen, (unsigned char *)descbuf, 511, &desclen); - while (SQL_SUCCESS == retcode || SQL_SUCCESS_WITH_INFO == retcode) { - nRecords++; - ((wxQueryCol*)namecol->Data())->AppendField(namebuf, namelen); - ((wxQueryCol*)desccol->Data())->AppendField(descbuf, desclen); - retcode = SQLDataSources(parentdb->GetHENV(), SQL_FETCH_NEXT, (unsigned char *)namebuf, 63, &namelen, (unsigned char *)descbuf, 511, &desclen); - } - - if (SQL_SUCCESS != retcode && SQL_SUCCESS_WITH_INFO != retcode && SQL_NO_DATA_FOUND != retcode) { - parentdb->ErrorSnapshot(); - return FALSE; - } - - cursor = 0; - - return TRUE; -} - -// Attributes -void wxRecordSet::SetTableName(char* name) { - delete[] tablename; - tablename = NULL; - - if (name) - tablename = copystring(name); -} - -bool wxRecordSet::GetTables(void) -{ - if (hStmt) - { - retcode = SQLFreeStmt(hStmt, SQL_DROP); - if (retcode == SQL_ERROR) - { - parentdb->ErrorSnapshot(hStmt); - return FALSE; - } - - hStmt = NULL; - } - - retcode = SQLAllocStmt(parentdb->GetHDBC(), &hStmt); - - if (SQL_SUCCESS != retcode) { - parentdb->ErrorSnapshot(); - return FALSE; - } - - retcode = SQLTables(hStmt, NULL, 0, NULL, 0, NULL, 0, NULL, 0); - - if (SQL_SUCCESS != retcode && SQL_SUCCESS_WITH_INFO != retcode) { - parentdb->ErrorSnapshot(hStmt); - return FALSE; - } - - return GetResultSet(); -} - -bool wxRecordSet::GetColumns(char* table) -{ - char* name=NULL; -// char* wildcard = "%"; - - name = table ? table : tablename; - - if (!name) - return FALSE; - - if (hStmt) - { - retcode = SQLFreeStmt(hStmt, SQL_DROP); - if (retcode == SQL_ERROR) - { - parentdb->ErrorSnapshot(hStmt); - return FALSE; - } - hStmt = NULL; - } - - retcode = SQLAllocStmt(parentdb->GetHDBC(), &hStmt); - - if (SQL_SUCCESS != retcode) { - parentdb->ErrorSnapshot(); - return FALSE; - } - - //retcode = SQLColumns(hstmt, (unsigned char*)parentdb->GetDataSource(), strlen(parentdb->GetDataSource()), wildcard, 1, name, strlen(name), wildcard, 1); - retcode = SQLColumns(hStmt, NULL, 0, NULL, 0, (unsigned char *)name, strlen(name), NULL, 0); - - if (SQL_SUCCESS != retcode && SQL_SUCCESS_WITH_INFO != retcode) { - parentdb->ErrorSnapshot(hStmt); - return FALSE; - } - - return GetResultSet(); -} - -// It is derived from previous GetColumns -bool wxRecordSet::GetPrimaryKeys(char* table) -{ - char* name=NULL; -// char* wildcard = "%"; - - name = table ? table : tablename; - - if (!name) - return FALSE; - - if (hStmt) - { - retcode = SQLFreeStmt(hStmt, SQL_DROP); - if (retcode == SQL_ERROR) - { - parentdb->ErrorSnapshot(hStmt); - return FALSE; - } - hStmt = NULL; - } - - retcode = SQLAllocStmt(parentdb->GetHDBC(), &hStmt); - - if (SQL_SUCCESS != retcode) { - parentdb->ErrorSnapshot(); - return FALSE; - } - - retcode = SQLPrimaryKeys(hStmt, NULL, 0, NULL, 0, (unsigned char *)name, SQL_NTS); - - if (SQL_SUCCESS != retcode && SQL_SUCCESS_WITH_INFO != retcode) { - parentdb->ErrorSnapshot(hStmt); - return FALSE; - } - - return GetResultSet(); -} - -bool wxRecordSet::GetForeignKeys(char* PkTableName, char * FkTableName) -{ - char* Pkname=NULL; - char* Fkname=NULL; -// char* wildcard = "%"; - -// Try to disable situation: both PkTableName and FkTableName are NULL -// set Pkname from tablename - if( !PkTableName && !FkTableName ) { - Pkname = PkTableName ? PkTableName : tablename; - Fkname = FkTableName ; - if (!Pkname ) - return FALSE; - } else { - Pkname = PkTableName ; - Fkname = FkTableName ; - } - - if (hStmt) - { - retcode = SQLFreeStmt(hStmt, SQL_DROP); - if (retcode == SQL_ERROR) - { - parentdb->ErrorSnapshot(hStmt); - return FALSE; - } - hStmt = NULL; - } - - retcode = SQLAllocStmt(parentdb->GetHDBC(), &hStmt); - - if (SQL_SUCCESS != retcode) { - parentdb->ErrorSnapshot(); - return FALSE; - } - - retcode = SQLForeignKeys(hStmt, NULL, 0, NULL, 0, (unsigned char *)Pkname, - (Pkname ? SQL_NTS : 0), NULL, 0, NULL, 0, (unsigned char *)Fkname ,(Fkname ?SQL_NTS : 0) ); - - if (SQL_SUCCESS != retcode && SQL_SUCCESS_WITH_INFO != retcode) { - parentdb->ErrorSnapshot(hStmt); - return FALSE; - } - - return GetResultSet(); -} - -long wxRecordSet::GetNumberRecords(void) -{ - return nRecords; -} - -long wxRecordSet::GetNumberCols(void) -{ - return nCols; -} - -char* wxRecordSet::GetColName(int col) -{ - wxNode* node = cols.Nth(col); - - if (!node) - return NULL; - - return ((wxQueryCol*)node->Data())->GetName(); -} - -short wxRecordSet::GetColType(int col) -{ - wxNode* node = cols.Nth(col); - - if (!node) - return SQL_TYPE_NULL; - - return ((wxQueryCol*)node->Data())->GetType(); -} - -short wxRecordSet::GetColType(const char *col) -{ - wxNode* node = cols.Find(col); - - if (!node) - return SQL_TYPE_NULL; - - return ((wxQueryCol*)node->Data())->GetType(); -} - -bool wxRecordSet::GetFieldData(int col, int type, void* data) -{ - wxNode* node = cols.Nth(col); - - if (!node) - return FALSE; - - if (((wxQueryCol*)node->Data())->GetType() != type) - return FALSE; - - void* src = ((wxQueryCol*)node->Data())->GetData(cursor); - - if (!src) - return FALSE; - - memcpy(data, src, ((wxQueryCol*)node->Data())->GetSize(cursor)); - - return TRUE; -} - -bool wxRecordSet::GetFieldData(const char* name, int type, void *data) -{ - wxNode* node = cols.Find(name); - - if (!node) - return FALSE; - - if (((wxQueryCol*)node->Data())->GetType() != type) - return FALSE; - - void* src = ((wxQueryCol*)node->Data())->GetData(cursor); - - if (!src) - return FALSE; - - memcpy(data, src, ((wxQueryCol*)node->Data())->GetSize(cursor)); - - return TRUE; -} - -void* wxRecordSet::GetFieldDataPtr(int col, int type) -{ - wxNode* node = cols.Nth(col); - - if (!node) - return NULL; - - if (((wxQueryCol*)node->Data())->GetType() != type) - return NULL; - - return ((wxQueryCol*)node->Data())->GetData(cursor); -} - -void* wxRecordSet::GetFieldDataPtr(const char* name, int type) -{ - wxNode* node = cols.Find(name); - - if (!node) - return NULL; - - if (((wxQueryCol*)node->Data())->GetType() != type) - return NULL; - - return ((wxQueryCol*)node->Data())->GetData(cursor); -} - -void* wxRecordSet::BindVar(int col, void* var, long size) { - wxNode* node = cols.Nth(col); - - if (!node) - return NULL; - - return ((wxQueryCol*)node->Data())->BindVar(var, size); -} - -void* wxRecordSet::BindVar(const char* name, void* var, long size) { - wxNode* node = cols.Find(name); - - if (!node) - return NULL; - - return ((wxQueryCol*)node->Data())->BindVar(var, size); -} - -void wxRecordSet::SetType(int typ) { - type = typ; -} - -int wxRecordSet::GetType(void) { - return type; -} - -void wxRecordSet::SetOptions(int opts) { - options = opts; -} - -int wxRecordSet::GetOptions(void) { - return options; -} - -bool wxRecordSet::CanAppend(void) -{ - return FALSE; -} - -bool wxRecordSet::CanRestart(void) -{ - return FALSE; -} - -bool wxRecordSet::CanScroll(void) -{ - return FALSE; -} - -bool wxRecordSet::CanTransact(void) -{ - return FALSE; -} - -bool wxRecordSet::CanUpdate(void) -{ - return FALSE; -} - -long wxRecordSet::GetCurrentRecord(void) -{ - return -1L; -} - -bool wxRecordSet::RecordCountFinal(void) -{ - return FALSE; -} - -char* wxRecordSet::GetTableName(void) -{ - return tablename; -} - -char *wxRecordSet::GetSQL(void) -{ - return NULL; -} - -bool wxRecordSet::IsOpen(void) -{ - return parentdb->IsOpen(); -} - -bool wxRecordSet::IsBOF(void) -{ - return cursor < 0; -} - -bool wxRecordSet::IsEOF(void) -{ - return cursor >= nRecords; -} - -bool wxRecordSet::IsDeleted(void) -{ - return FALSE; -} - -// Update operations -void wxRecordSet::AddNew(void) -{ -} - -bool wxRecordSet::Delete(void) -{ - return FALSE; -} - -void wxRecordSet::Edit(void) -{ -} - -bool wxRecordSet::Update(void) -{ - return FALSE; -} - -// Record navigation -bool wxRecordSet::Move(long rows) -{ - if (!nRecords) { - cursor = -1; - return FALSE; - } - - switch (type) { - case wxOPEN_TYPE_SNAPSHOT: - cursor += (int)rows; - if (cursor < 0) { - cursor = -1; - return FALSE; - } - if (cursor > nRecords-1) { - cursor = nRecords; - return FALSE; - } - return TRUE; - - case wxOPEN_TYPE_DYNASET: - return FALSE; - default: - return FALSE; - } -} - -bool wxRecordSet::GoTo(long row) -{ - if (!nRecords) { - cursor = -1; - return FALSE; - } - - switch (type) { - case wxOPEN_TYPE_SNAPSHOT: - cursor = (int)row; - if (cursor < 0) { - cursor = -1; - return FALSE; - } - if (cursor > nRecords-1) { - cursor = nRecords; - return FALSE; - } - return TRUE; - - case wxOPEN_TYPE_DYNASET: - return FALSE; - default: - return FALSE; - } -} - -bool wxRecordSet::MoveFirst(void) -{ - if (!nRecords) { - cursor = -1; - return FALSE; - } - - switch (type) { - case wxOPEN_TYPE_SNAPSHOT: - cursor = 0; - return TRUE; - - case wxOPEN_TYPE_DYNASET: - return FALSE; - default: - return FALSE; - } -} - -bool wxRecordSet::MoveLast(void) -{ - if (!nRecords) { - cursor = -1; - return FALSE; - } - - switch (type) { - case wxOPEN_TYPE_SNAPSHOT: - cursor = nRecords-1; - return TRUE; - - case wxOPEN_TYPE_DYNASET: - return FALSE; - default: - return FALSE; - } -} - -bool wxRecordSet::MoveNext(void) -{ - if (!nRecords) { - cursor = -1; - return FALSE; - } - - switch (type) { - case wxOPEN_TYPE_SNAPSHOT: - cursor++; - if (cursor >= nRecords) { - cursor = nRecords; - return FALSE; - } - return TRUE; - - case wxOPEN_TYPE_DYNASET: - return FALSE; - default: - return FALSE; - } -} - -bool wxRecordSet::MovePrev(void) -{ - if (!nRecords) { - cursor = -1; - return FALSE; - } - - switch (type) { - case wxOPEN_TYPE_SNAPSHOT: - cursor--; - if (cursor < 0) { - cursor = 0; - return FALSE; - } - return TRUE; - - case wxOPEN_TYPE_DYNASET: - return FALSE; - default: - return FALSE; - } -} - -// Others -void wxRecordSet::Cancel(void) -{ -} - -bool wxRecordSet::IsFieldDirty(int col) -{ - wxNode* node = cols.Nth(col); - - if (!node) - return FALSE; - - return ((wxQueryCol*)node->Data())->IsFieldDirty(cursor); -} - -bool wxRecordSet::IsFieldDirty(const char* name) -{ - wxNode* node = cols.Find(name); - - if (!node) - return FALSE; - - return ((wxQueryCol*)node->Data())->IsFieldDirty(cursor); -} - -bool wxRecordSet::IsFieldNull(int col) -{ - wxNode* node = cols.Nth(col); - - if (!node) - return TRUE; - - return NULL != ((wxQueryCol*)node->Data())->GetData(cursor); -} - -bool wxRecordSet::IsFieldNull(const char* name) -{ - wxNode* node = cols.Find(name); - - if (!node) - return TRUE; - - return NULL != ((wxQueryCol*)node->Data())->GetData(cursor); -} - -bool wxRecordSet::IsColNullable(int col) -{ - wxNode* node = cols.Nth(col); - - if (!node) - return FALSE; - - return ((wxQueryCol*)node->Data())->IsNullable(); -} - -bool wxRecordSet::IsColNullable(const char* name) -{ - wxNode* node = cols.Find(name); - - if (!node) - return FALSE; - - return ((wxQueryCol*)node->Data())->IsNullable(); -} - -bool wxRecordSet::Requery(void) -{ - return FALSE; -} - -void wxRecordSet::SetFieldDirty(int col, bool dirty) -{ - wxNode* node = cols.Nth(col); - - if (!node) - return; - - ((wxQueryCol*)node->Data())->SetFieldDirty(cursor, dirty); -} - -void wxRecordSet::SetFieldDirty(const char* name, bool dirty) -{ - wxNode* node = cols.Find(name); - - if (!node) - return; - - ((wxQueryCol*)node->Data())->SetFieldDirty(cursor, dirty); -} - -void wxRecordSet::SetFieldNull(void *WXUNUSED(p), bool WXUNUSED(isNull)) -{ -} - -// Overridables -char *wxRecordSet::GetDefaultConnect(void) -{ - return NULL; -} - -char *wxRecordSet::GetDefaultSQL(void) -{ - return NULL; -} - -void wxRecordSet::SetDefaultSQL(char *s) -{ - delete[] defaultSQL; - - if (s) - defaultSQL = copystring(s); - else - defaultSQL = NULL; -} - -// Build SQL query from column specification -bool wxRecordSet::ConstructDefaultSQL(void) -{ -// if (queryCols.Number() == 0) - return FALSE; -} - -bool wxRecordSet::ReleaseHandle(void) -{ - if (hStmt) - { - retcode = SQLFreeStmt(hStmt, SQL_DROP); - if (retcode == SQL_ERROR) - { - if (parentdb) - parentdb->ErrorSnapshot(hStmt); - return FALSE; - } - hStmt = 0; - } - return TRUE; -} - -wxQueryCol::wxQueryCol(void) { -// __type = wxTYPE_QUERYCOL; - name = NULL; - type = SQL_TYPE_NULL; - nullable = FALSE; - var = NULL; - varsize = 0; -} - -wxQueryCol::~wxQueryCol(void) { - // delete all data - fields.DeleteContents(TRUE); - fields.Clear(); - - if (name) - delete[] name; -} - -void wxQueryCol::SetName(char* n) { - name = new char[strlen(n)+1]; - strcpy(name, n); -} - -bool wxQueryCol::SetData(int row, void* buf, long len) { - wxNode* node = fields.Nth(row); - - if (!node) - return FALSE; - - return ((wxQueryField*)node->Data())->SetData(buf, len); -} - -void wxQueryCol::SetFieldDirty(int row, bool dirty) { - wxNode* node = fields.Nth(row); - - if (!node) - return; - - ((wxQueryField*)node->Data())->SetDirty(dirty); -} - -void wxQueryCol::AppendField(void* buf, long len) { - wxNode* node = fields.Append(new wxQueryField); - ((wxQueryField*)node->Data())->SetType(type); - ((wxQueryField*)node->Data())->SetData(buf, len); -} - -void wxQueryCol::SetType(short t) { - type = t; -} - -void* wxQueryCol::BindVar(void* v, long s) { - void* oldvar = var; - - var = v; - varsize = s; - - return oldvar; -} - -void wxQueryCol::FillVar(int recnum) { - if (!var) - return; - - wxNode* node = fields.Nth(recnum); - - if (!node) - return; - - long actsize = ((wxQueryField*)node->Data())->GetSize(); - if (actsize > varsize) - actsize = varsize; - - memcpy(var, ((wxQueryField*)node->Data())->GetData(), actsize); -} - -void wxQueryCol::SetNullable(bool n) { - nullable = n; -} - -char* wxQueryCol::GetName(void) { - return name; -} - -short wxQueryCol::GetType(void) { - return type; -} - -bool wxQueryCol::IsNullable(void) { - return nullable; -} - - -bool wxQueryCol::IsFieldDirty(int row) { - wxNode* node = fields.Nth(row); - - if (!node) - return FALSE; - - return ((wxQueryField*)node->Data())->IsDirty(); -} - -void* wxQueryCol::GetData(int row) { - wxNode* node = fields.Nth(row); - - if (!node) - return NULL; - - return ((wxQueryField*)node->Data())->GetData(); -} - -long wxQueryCol::GetSize(int row) { - wxNode* node = fields.Nth(row); - - if (!node) - return 0; - - return ((wxQueryField*)node->Data())->GetSize(); -} - -wxQueryField::wxQueryField(void) { -// __type = wxTYPE_QUERYROW; - data = NULL; - type = SQL_TYPE_NULL; - size = 0; - dirty = FALSE; -} - -wxQueryField::~wxQueryField(void) { - switch (type) - { - case SQL_NUMERIC: - case SQL_DECIMAL: - case SQL_CHAR: - case SQL_VARCHAR: - if (data) // JACS - delete[] (char*)data; - break; - case SQL_INTEGER: - if (data) // JACS - delete (long*)data; - break; - case SQL_SMALLINT: - if (data) - delete (short*)data; - break; - case SQL_FLOAT: - case SQL_DOUBLE: - if (data) - delete (double*)data; - break; - case SQL_REAL: - if (data) - delete (float*)data; - break; - case SQL_TIME: - if (data) - delete (TIME_STRUCT *)data; - break; - case SQL_DATE: - if (data) - delete (DATE_STRUCT *)data; - break; - case SQL_TIMESTAMP: - if (data) - delete (TIMESTAMP_STRUCT *)data; - break; - } -} - -bool wxQueryField::AllocData(void) { - switch (type) - { - case SQL_NUMERIC: - case SQL_DECIMAL: - case SQL_CHAR: - case SQL_VARCHAR: - { - if (data) // JACS - delete[] (char*)data; - if ((data = new char[size+1])) - { - char *str = (char *)data; - int i; - for (i = 0; i < size; i++) - str[i] = 0; -// memset(data, 0, size+1); - } - break; - } - case SQL_INTEGER: - { - if (data) // JACS - delete (long*)data; - if ((data = new long)) - *(long*)data = 0L; - break; - } - case SQL_SMALLINT: - { - if (data) - delete (short*)data; - if ((data = new short)) - *(short*)data = 0; - break; - } - case SQL_FLOAT: - case SQL_DOUBLE: - { - if (data) - delete (double*)data; - if ((data = new double)) - *(double*)data = 0; - break; - } - case SQL_REAL: - { - if (data) - delete (float*)data; - if ((data = new float)) - *(float*)data = (float)0; - break; - } - case SQL_TIME: - { - if (data) - delete (TIME_STRUCT *)data; - data = new TIME_STRUCT; - memset(data, 0, sizeof(TIME_STRUCT)); - break; - } - case SQL_DATE: - { - if (data) - delete (DATE_STRUCT *)data; - data = new DATE_STRUCT; - memset(data, 0, sizeof(DATE_STRUCT)); - break; - } - case SQL_TIMESTAMP: - { - if (data) - delete (TIMESTAMP_STRUCT *)data; - data = new TIMESTAMP_STRUCT; - memset(data, 0, sizeof(TIMESTAMP_STRUCT)); - break; - } - default: - return FALSE; - } - - return TRUE; -} - -bool wxQueryField::SetData(void* d, long s) { - size = s; - if (AllocData() && d) - { -// memcpy(data, d, s); - switch (type) - { - case SQL_NUMERIC: - case SQL_DECIMAL: - case SQL_CHAR: - case SQL_VARCHAR: - { - char *str = (char *)data; - int i; - for (i = 0; i < size; i++) - str[i] = 0; - - strncpy(str, (char *)d, (int)size); - str[size] = 0; - break; - } - case SQL_INTEGER: - { - *(long*)data = *((long *)d); - break; - } - case SQL_SMALLINT: - { - *(short*)data = *((short*)d); - break; - } - case SQL_FLOAT: - case SQL_DOUBLE: - { - *(double*)data = *((double*)d); - break; - } - case SQL_REAL: - { - *(float*)data = *((float*)d); - break; - } - case SQL_TIME: - { - *(TIME_STRUCT *)data = *((TIME_STRUCT*)d); - break; - } - case SQL_TIMESTAMP: - { - *(TIMESTAMP_STRUCT *)data = *((TIMESTAMP_STRUCT*)d); - break; - } - case SQL_DATE: - { - *(DATE_STRUCT *)data = *((DATE_STRUCT*)d); - break; - } - default: - return FALSE; - } - return TRUE; - } - return FALSE; -} - -void wxQueryField::ClearData(void) { - if (data) - { - // memset(data, 0, size); - switch (type) - { - case SQL_NUMERIC: - case SQL_DECIMAL: - case SQL_CHAR: - case SQL_VARCHAR: - { - char *str = (char *)data; - int i; - for (i = 0; i < size; i++) - str[i] = 0; - break; - } - case SQL_INTEGER: - { - *(long*)data = 0L; - break; - } - case SQL_SMALLINT: - { - *(short*)data = 0; - break; - } - case SQL_FLOAT: - case SQL_DOUBLE: - { - *(double*)data = (double)0.0; - break; - } - case SQL_REAL: - { - *(float*)data = (float)0.0; - break; - } - case SQL_TIME: - { - memset(data, 0, sizeof(TIME_STRUCT)); - break; - } - case SQL_DATE: - { - memset(data, 0, sizeof(DATE_STRUCT)); - break; - } - case SQL_TIMESTAMP: - { - memset(data, 0, sizeof(TIMESTAMP_STRUCT)); - break; - } - default: - return; - } - } -} - -void wxQueryField::SetDirty(bool d) { - dirty = d; -} - -void wxQueryField::SetType(short t) { - type = t; -} - -void wxQueryField::SetSize(long s) { - size = s; - AllocData(); -} - -void* wxQueryField::GetData(void) { - return data; -} - -short wxQueryField::GetType(void) { - return type; -} - -long wxQueryField::GetSize(void) { - return size; -} - -bool wxQueryField::IsDirty(void) { - return dirty; -} - -#endif // USE_ODBC diff --git a/src/common/parser.y b/src/common/parser.y deleted file mode 100644 index 336ee0f964..0000000000 --- a/src/common/parser.y +++ /dev/null @@ -1,161 +0,0 @@ - %{ -#include -#include "wx/expr.h" - -#ifndef __EXTERN_C__ -#define __EXTERN_C__ 1 -#endif - -#if defined(__cplusplus) || defined(__STDC__) -#if defined(__cplusplus) && defined(__EXTERN_C__) -extern "C" { -#endif -#endif -int yylex(void); -int yylook(void); -int yywrap(void); -int yyback(int *, int); -void yyerror(char *); - -/* You may need to put /DLEX_SCANNER in your makefile - * if you're using LEX! - */ -#ifdef LEX_SCANNER -/* int yyoutput(int); */ -void yyoutput(int); -#else -void yyoutput(int); -#endif - -#if defined(__cplusplus) || defined(__STDC__) -#if defined(__cplusplus) && defined(__EXTERN_C__) -} -#endif -#endif -%} - -%union { - char *s; -/* struct pexpr *expr; */ -} - - -%start commands - -%token INTEGER 1 -%token WORD 2 -%token STRING 3 -%token PERIOD 13 -%token OPEN 4 -%token CLOSE 5 -%token COMMA 6 -%token NEWLINE 7 -%token ERROR 8 -%token OPEN_SQUARE 9 -%token CLOSE_SQUARE 10 -%token EQUALS 11 -%token EXP 14 - -/* %type command expr arglist arg arg1 */ -%type command expr arglist arg arg1 - -%% - -commands : /* empty */ - | commands command - ; - -command : WORD PERIOD - {process_command(proio_cons(make_word($1), NULL)); free($1);} - | expr PERIOD - {process_command($1);} - | error PERIOD - {syntax_error("Unrecognized command.");} - ; - -expr : WORD OPEN arglist CLOSE - {$$ = proio_cons(make_word($1), $3); free($1);} - | OPEN_SQUARE CLOSE_SQUARE - {$$ = proio_cons(NULL, NULL);} - | OPEN_SQUARE arglist CLOSE_SQUARE - {$$ = $2; } - ; - -arglist : - {$$ = NULL;} - | arg - {$$ = proio_cons($1, NULL);} - | - arg COMMA arglist - {$$ = proio_cons($1, $3);} - ; - -arg : WORD EQUALS arg1 - {$$ = proio_cons(make_word("="), proio_cons(make_word($1), proio_cons($3, NULL))); - free($1); } - | arg1 - {$$ = $1; } - -arg1 : WORD - {$$ = make_word($1); free($1);} - | STRING - {$$ = make_string($1); free($1);} - | INTEGER - {$$ = make_integer($1); free($1);} - | INTEGER PERIOD INTEGER - {$$ = make_real($1, $3); free($1); free($3); } - | INTEGER EXP INTEGER - {$$ = make_exp($1, $3); free($1); free($3); } - | - INTEGER PERIOD INTEGER EXP INTEGER - {$$ = make_exp2($1, $3, $5); free($1); free($3); - free($5); } - - | expr - {$$ = $1;} - ; - -%% - -#ifdef __WXGTK__ -#include "lexer.c" -#else -#include "../common/lex_yy.c" -#endif - -/* -void yyerror(s) -char *s; -{ - syntax_error(s); -} -*/ - -/* Ansi prototype. If this doesn't work for you... uncomment - the above instead. - */ - -void yyerror(char *s) -{ - syntax_error(s); -} - -/* - * Unfortunately, my DOS version of FLEX - * requires yywrap to be #def'ed, whereas - * the UNIX flex expects a proper function. - */ - -/* Not sure if __SC__ is the appropriate thing - * to test - */ - -#ifndef __SC__ -#ifdef USE_DEFINE -#ifndef yywrap -#define yywrap() 1 -#endif -#else if !defined(__alpha) && !defined(__ultrix) -int yywrap() { return 1; } -#endif -#endif diff --git a/src/common/postscrp.cpp b/src/common/postscrp.cpp deleted file mode 100644 index e8e5b5bef1..0000000000 --- a/src/common/postscrp.cpp +++ /dev/null @@ -1,2577 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: postscrp.cpp -// Purpose: wxPostScriptDC implementation -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "postscrp.h" -#pragma implementation -#pragma interface -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include "wx/defs.h" - -#if USE_POSTSCRIPT - -#ifndef WX_PRECOMP -#include "wx/intl.h" -#include "wx/frame.h" -#include "wx/postscrp.h" -#include "wx/utils.h" -#include "wx/filedlg.h" -#include "wx/msgdlg.h" -#include "wx/app.h" -#include "wx/button.h" -#include "wx/radiobox.h" -#include "wx/textctrl.h" -#include "wx/stattext.h" -#include "wx/icon.h" -#include "wx/list.h" -#endif - -#include "wx/dcmemory.h" - -#ifdef __WXMSW__ -#include "wx/msw/private.h" -#endif - -#if USE_IOSTREAMH -#include -#else -#include -#endif - -#include -#include -#include -#include -#include -#include -#include - -#ifdef __WXGTK__ - -#include "gdk/gdkx.h" // GDK_DISPLAY -#include "gdk/gdkprivate.h" // XImage -#include -#include - -#endif - -#ifdef __WXMSW__ - -#ifdef DrawText -#undef DrawText -#endif - -#ifdef StartDoc -#undef StartDoc -#endif - -#ifdef GetCharWidth -#undef GetCharWidth -#endif - -#ifdef FindWindow -#undef FindWindow -#endif - -#endif - -// Declarations local to this file -#define YSCALE(y) (m_yOrigin / m_scaleFactor - (y)) - -// Determine the Default Postscript Previewer -// available on the platform -#if defined(__SUN__) && defined(__XVIEW__) -// OpenWindow/NeWS's Postscript Previewer -# define PS_VIEWER_PROG "pageview" -#elif defined(__VMS__) -#define PS_VIEWER_PROG "view/format=ps/select=x_display" -#elif defined(__SGI__) -// SGI's Display Postscript Previewer -//# define PS_VIEWER_PROG "dps" -# define PS_VIEWER_PROG "xpsview" -#elif defined(__X__) || defined(__WXGTK__) -// Front-end to ghostscript -# define PS_VIEWER_PROG "ghostview" -#else -// Windows ghostscript/ghostview -# define PS_VIEWER_PROG NULL -#endif - -wxPrintSetupData *wxThePrintSetupData = (wxPrintSetupData *) NULL; - -// these should move into wxPostscriptDC: -double UnderlinePosition = 0.0F; -double UnderlineThickness = 0.0F; - -#define _MAXPATHLEN 500 - -/* See "wxspline.inc" and "xfspline.inc" */ -#if USE_XFIG_SPLINE_CODE -static const char *wxPostScriptHeaderSpline = " \ -/DrawSplineSection {\n\ - /y3 exch def\n\ - /x3 exch def\n\ - /y2 exch def\n\ - /x2 exch def\n\ - /y1 exch def\n\ - /x1 exch def\n\ - /xa x1 x2 x1 sub 0.666667 mul add def\n\ - /ya y1 y2 y1 sub 0.666667 mul add def\n\ - /xb x3 x2 x3 sub 0.666667 mul add def\n\ - /yb y3 y2 y3 sub 0.666667 mul add def\n\ - x1 y1 lineto\n\ - xa ya xb yb x3 y3 curveto\n\ - } def\n\ -"; -#else -// No extra PS header for this spline implementation. -static const char *wxPostScriptHeaderSpline = (char *) NULL; - -#endif /* USE_XFIG_SPLINE_CODE */ - -// steve, 05.09.94 -// VMS has a bug in the ofstream class. -// the buffering doesn't work correctly. therefore -// we will allocate (temporarily) a very big buffer (1MB), so -// that a buffer overflow will not occur. -#ifdef __VMS__ -#define VMS_BUFSIZ (1024L*1024L) -static char *fileBuffer = NULL; -#endif - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase, wxList) -#endif - -wxPostScriptDC::wxPostScriptDC (void) -{ -// m_yOrigin = 792; // For EPS output - m_yOrigin = 842; // For A4 output - - m_minX = 1000; - m_minY = 1000; - m_maxX = -1000; - m_maxY = -1000; - m_title = ""; - - m_pstream = (ofstream *) NULL; - -#ifdef __WXMSW__ - // Can only send to file in Windows - wxThePrintSetupData->SetPrinterMode(PS_FILE); -#endif - - m_currentRed = 255; - m_currentGreen = 255; - m_currentBlue = 0; -} - -wxPostScriptDC::wxPostScriptDC (const wxString& file, bool interactive, wxWindow *parent) -{ - Create(file, interactive, parent); -} - -bool wxPostScriptDC::Create(const wxString& file, bool interactive, wxWindow *parent) -{ - m_isInteractive = interactive; - - m_yOrigin = 792; // For EPS output -// m_yOrigin = 842; // For A4 output - - m_minX = 1000; - m_minY = 1000; - m_maxX = -1000; - m_maxY = -1000; - m_title = ""; - m_filename = file; - m_pstream = (ofstream *) NULL; - -#ifdef __WXMSW__ - // Can only send to file in Windows - wxThePrintSetupData->SetPrinterMode(PS_FILE); -#endif - - if (m_isInteractive) - { - if ((m_ok = PrinterDialog (parent) ) == FALSE) return FALSE; - } - else - m_ok = TRUE; - - m_currentRed = 255; - m_currentGreen = 255; - m_currentBlue = 0; - - m_scaleFactor = 1.0; - - return m_ok; -} - -wxPostScriptDC::~wxPostScriptDC (void) -{ - if (m_pstream) - delete m_pstream; -} - -bool wxPostScriptDC::PrinterDialog(wxWindow *parent) -{ - wxPostScriptPrintDialog dialog (parent, _("Printer Settings"), wxPoint(150, 150), wxSize(400, 400), wxDEFAULT_DIALOG_STYLE | wxDIALOG_MODAL); - m_ok = (dialog.ShowModal () == wxID_OK) ; - - if (!m_ok) - return FALSE; - - if ((m_filename == "") && (wxThePrintSetupData->GetPrinterMode() == PS_PREVIEW || wxThePrintSetupData->GetPrinterMode() == PS_PRINTER)) - { -// steve, 05.09.94 -#ifdef __VMS__ - wxThePrintSetupData->SetPrinterFile("preview"); -#else - // For PS_PRINTER action this depends on a Unix-style print spooler - // since the wx_printer_file can be destroyed during a session - // @@@ TODO: a Windows-style answer for non-Unix - char userId[256]; - wxGetUserId (userId, sizeof (userId) / sizeof (char)); - char tmp[256]; - strcpy (tmp, "/tmp/preview_"); - strcat (tmp, userId); - wxThePrintSetupData->SetPrinterFile(tmp); -#endif - char tmp2[256]; - strcpy(tmp2, wxThePrintSetupData->GetPrinterFile()); - strcat (tmp2, ".ps"); - wxThePrintSetupData->SetPrinterFile(tmp2); - m_filename = tmp2; - } - else if ((m_filename == "") && (wxThePrintSetupData->GetPrinterMode() == PS_FILE)) - { - char *file = wxSaveFileSelector (_("PostScript"), "ps"); - if (!file) - { - m_ok = FALSE; - return FALSE; - } - wxThePrintSetupData->SetPrinterFile(file); - m_filename = file; - m_ok = TRUE; - } - - return m_ok; -} - -void wxPostScriptDC::SetClippingRegion (long cx, long cy, long cw, long ch) -{ - if (m_clipping) - return; - if (!m_pstream) - return; - - m_clipping = TRUE; - *m_pstream << "gsave\n"; - *m_pstream << "newpath\n"; - *m_pstream << cx << " " << YSCALE (cy) << " moveto\n"; - *m_pstream << cx + cw << " " << YSCALE (cy) << " lineto\n"; - *m_pstream << cx + cw << " " << YSCALE (cy + ch) << " lineto\n"; - *m_pstream << cx << " " << YSCALE (cy + ch) << " lineto\n"; - *m_pstream << "closepath clip newpath\n"; -} - -void wxPostScriptDC::DestroyClippingRegion (void) -{ - if (!m_pstream) - return; - if (m_clipping) - { - m_clipping = FALSE; - *m_pstream << "grestore\n"; - } -} - -void wxPostScriptDC::Clear (void) -{ -} - -void wxPostScriptDC::FloodFill (long WXUNUSED(x), long WXUNUSED(y), wxColour * WXUNUSED(col), int WXUNUSED(style)) -{ -} - -bool wxPostScriptDC::GetPixel (long WXUNUSED(x), long WXUNUSED(y), wxColour * WXUNUSED(col)) const -{ - return FALSE; -} - -void wxPostScriptDC::CrossHair (long WXUNUSED(x), long WXUNUSED(y)) -{ -} - -void wxPostScriptDC::DrawLine (long x1, long y1, long x2, long y2) -{ - if (!m_pstream) - return; - if (m_pen.Ok()) - SetPen (m_pen); - *m_pstream << "newpath\n"; - *m_pstream << x1 << " " << YSCALE (y1) << " moveto\n"; - *m_pstream << x2 << " " << YSCALE (y2) << " lineto\n"; - *m_pstream << "stroke\n"; - CalcBoundingBox (x1, (long)YSCALE (y1)); - CalcBoundingBox (x2, (long)YSCALE (y2)); -} - -#define RAD2DEG 57.29577951308 - -void wxPostScriptDC::DrawArc (long x1, long y1, long x2, long y2, long xc, long yc) -{ - if (!m_pstream) - return; - - long dx = x1 - xc; - long dy = y1 - yc; - long radius = (long) sqrt(dx*dx+dy*dy); - double alpha1, alpha2; - - if (x1 == x2 && y1 == y2) { - alpha1 = 0.0; - alpha2 = 360.0; - } else if (radius == 0.0) { - alpha1 = alpha2 = 0.0; - } else { - alpha1 = (x1 - xc == 0) ? - (y1 - yc < 0) ? 90.0 : -90.0 : - -atan2(double(y1-yc), double(x1-xc)) * RAD2DEG; - alpha2 = (x2 - xc == 0) ? - (y2 - yc < 0) ? 90.0 : -90.0 : - -atan2(double(y2-yc), double(x2-xc)) * RAD2DEG; - } - while (alpha1 <= 0) alpha1 += 360; - while (alpha2 <= 0) alpha2 += 360; // adjust angles to be between - while (alpha1 > 360) alpha1 -= 360; // 0 and 360 degree - while (alpha2 > 360) alpha2 -= 360; - - if (m_brush.Ok() && m_brush.GetStyle() != wxTRANSPARENT) { - SetBrush(m_brush); - *m_pstream << "newpath\n" - << xc << " " << YSCALE(yc) << " " - << radius << " " << radius << " " - << alpha1 << " " << alpha2 << " ellipse\n" - << xc << " " << YSCALE(yc) << " lineto\n" - << "closepath\n" - << "fill\n"; - } - if (m_pen.Ok() && m_pen.GetStyle() != wxTRANSPARENT) { - SetPen(m_pen); - *m_pstream << "newpath\n" - << xc << " " << YSCALE(yc) << " " - << radius << " " << radius << " " - << alpha1 << " " << alpha2 << " ellipse\n" - << "stroke\n"; - } - CalcBoundingBox(x1, (long)YSCALE(y1)); - CalcBoundingBox(x2, (long)YSCALE(y2)); -} - -void wxPostScriptDC::DrawEllipticArc(long x,long y,long w,long h,double sa,double ea) -{ - if (!m_pstream) - return; - - if (sa>=360 || sa<=-360) sa=sa-int(sa/360)*360; - if (ea>=360 || ea<=-360) ea=ea-int(ea/360)*360; - if (sa<0) sa+=360; - if (ea<0) ea+=360; - if (sa==ea) - { - DrawEllipse(x,y,w,h); - return; - } - - if (m_brush.Ok() && m_brush.GetStyle () != wxTRANSPARENT) - { - SetBrush (m_brush); - - *m_pstream << - "newpath\n" << - x+w/2 << " " << YSCALE (y+h/2) << " " << - w/2 << " " << h/2 << " " << - int(sa) <<" "<< int(ea)<<" true ellipticarc\n"; - - CalcBoundingBox (x , (long)YSCALE (y )); - CalcBoundingBox (x+w,(long)YSCALE(y+h)); - } - if (m_pen.Ok() && m_pen.GetStyle () != wxTRANSPARENT) - { - SetPen (m_pen); - - *m_pstream << - "newpath\n" << - x+w/2 << " " << YSCALE (y+h/2) << " " << - w/2 << " " << h/2 << " " << - int(sa) <<" "<< int(ea)<<" false ellipticarc\n"; - - CalcBoundingBox (x , (long)YSCALE (y )); - CalcBoundingBox (x+w,(long)YSCALE(y+h)); - } -} - -void wxPostScriptDC::DrawPoint (long x, long y) -{ - if (!m_pstream) - return; - if (m_pen.Ok()) - SetPen (m_pen); - *m_pstream << "newpath\n"; - *m_pstream << x << " " << YSCALE (y) << " moveto\n"; - *m_pstream << (x+1) << " " << YSCALE (y) << " lineto\n"; - *m_pstream << "stroke\n"; - CalcBoundingBox (x, (long)YSCALE (y)); -} - -void wxPostScriptDC::DrawPolygon (int n, wxPoint points[], long xoffset, long yoffset, int WXUNUSED(fillStyle)) -{ - if (!m_pstream) - return; - if (n > 0) - { - if (m_brush.Ok() && m_brush.GetStyle () != wxTRANSPARENT) - { - SetBrush (m_brush); - *m_pstream << "newpath\n"; - - long xx = points[0].x + xoffset; - long yy = (long) YSCALE (points[0].y + yoffset); - *m_pstream << xx << " " << yy << " moveto\n"; - CalcBoundingBox (xx, yy); - - int i; - for (i = 1; i < n; i++) - { - xx = points[i].x + xoffset; - yy = (long) YSCALE (points[i].y + yoffset); - *m_pstream << xx << " " << yy << " lineto\n"; - CalcBoundingBox (xx, yy); - } - *m_pstream << "fill\n"; - } - - if (m_pen.Ok() && m_pen.GetStyle () != wxTRANSPARENT) - { - SetPen (m_pen); - *m_pstream << "newpath\n"; - - long xx = points[0].x + xoffset; - long yy = (long) YSCALE (points[0].y + yoffset); - *m_pstream << xx << " " << yy << " moveto\n"; - CalcBoundingBox (xx, yy); - - int i; - for (i = 1; i < n; i++) - { - xx = points[i].x + xoffset; - yy = (long) YSCALE (points[i].y + yoffset); - *m_pstream << xx << " " << yy << " lineto\n"; - CalcBoundingBox (xx, yy); - } - - // Close the polygon - xx = points[0].x + xoffset; - yy = (long) YSCALE (points[0].y + yoffset); - *m_pstream << xx << " " << yy << " lineto\n"; - - // Output the line - *m_pstream << "stroke\n"; - } - } -} - -void wxPostScriptDC::DrawLines (int n, wxPoint points[], long xoffset, long yoffset) -{ - if (!m_pstream) - return; - if (n > 0) - { - if (m_pen.Ok()) - SetPen (m_pen); - - *m_pstream << "newpath\n"; - - long xx = points[0].x + xoffset; - long yy = (long) YSCALE (points[0].y + yoffset); - *m_pstream << xx << " " << yy << " moveto\n"; - CalcBoundingBox (xx, yy); - - int i; - for (i = 1; i < n; i++) - { - xx = points[i].x + xoffset; - yy = (long) YSCALE (points[i].y + yoffset); - *m_pstream << xx << " " << yy << " lineto\n"; - CalcBoundingBox (xx, yy); - } - *m_pstream << "stroke\n"; - } -} - -void wxPostScriptDC::DrawRectangle (long x, long y, long width, long height) -{ - if (!m_pstream) - return; - if (m_brush.Ok() && m_brush.GetStyle () != wxTRANSPARENT) - { - SetBrush (m_brush); - - *m_pstream << "newpath\n"; - *m_pstream << x << " " << YSCALE (y) << " moveto\n"; - *m_pstream << x + width << " " << YSCALE (y) << " lineto\n"; - *m_pstream << x + width << " " << YSCALE (y + height) << " lineto\n"; - *m_pstream << x << " " << YSCALE (y + height) << " lineto\n"; - *m_pstream << "closepath\n"; - *m_pstream << "fill\n"; - - CalcBoundingBox (x, (long)YSCALE (y)); - CalcBoundingBox (x + width, (long)YSCALE (y + height)); - } - if (m_pen.Ok() && m_pen.GetStyle () != wxTRANSPARENT) - { - SetPen (m_pen); - - *m_pstream << "newpath\n"; - *m_pstream << x << " " << YSCALE (y) << " moveto\n"; - *m_pstream << x + width << " " << YSCALE (y) << " lineto\n"; - *m_pstream << x + width << " " << YSCALE (y + height) << " lineto\n"; - *m_pstream << x << " " << YSCALE (y + height) << " lineto\n"; - *m_pstream << "closepath\n"; - *m_pstream << "stroke\n"; - - CalcBoundingBox (x, (long)YSCALE (y)); - CalcBoundingBox (x + width, (long)YSCALE (y + height)); - } -} - -void wxPostScriptDC::DrawRoundedRectangle (long x, long y, long width, long height, double radius) -{ - if (!m_pstream) - return; - - if (radius < 0.0) - { - // Now, a negative radius is interpreted to mean - // 'the proportion of the smallest X or Y dimension' - double smallest = 0.0; - if (width < height) - smallest = width; - else - smallest = height; - radius = (-radius * smallest); - } - - if (m_brush.Ok() && m_brush.GetStyle () != wxTRANSPARENT) - { - SetBrush (m_brush); - // Draw rectangle anticlockwise - *m_pstream << "newpath\n"; - *m_pstream << x + radius << " " << YSCALE (y + radius) << " " << radius << " 90 180 arc\n"; - - *m_pstream << x << " " << YSCALE (y + radius) << " moveto\n"; - - *m_pstream << x + radius << " " << YSCALE (y + height - radius) << " " << radius << " 180 270 arc\n"; - *m_pstream << x + width - radius << " " << YSCALE (y + height) << " lineto\n"; - - *m_pstream << x + width - radius << " " << YSCALE (y + height - radius) << " " << radius << " 270 0 arc\n"; - *m_pstream << x + width << " " << YSCALE (y + radius) << " lineto\n"; - - *m_pstream << x + width - radius << " " << YSCALE (y + radius) << " " << radius << " 0 90 arc\n"; - - *m_pstream << x + radius << " " << YSCALE (y) << " lineto\n"; - - *m_pstream << "closepath\n"; - - *m_pstream << "fill\n"; - - CalcBoundingBox (x, (long)YSCALE (y)); - CalcBoundingBox (x + width, (long)YSCALE (y + height)); - } - if (m_pen.Ok() && m_pen.GetStyle () != wxTRANSPARENT) - { - SetPen (m_pen); - // Draw rectangle anticlockwise - *m_pstream << "newpath\n"; - *m_pstream << x + radius << " " << YSCALE (y + radius) << " " << radius << " 90 180 arc\n"; - - *m_pstream << x << " " << YSCALE (y + height - radius) << " lineto\n"; - - *m_pstream << x + radius << " " << YSCALE (y + height - radius) << " " << radius << " 180 270 arc\n"; - *m_pstream << x + width - radius << " " << YSCALE (y + height) << " lineto\n"; - - *m_pstream << x + width - radius << " " << YSCALE (y + height - radius) << " " << radius << " 270 0 arc\n"; - *m_pstream << x + width << " " << YSCALE (y + radius) << " lineto\n"; - - *m_pstream << x + width - radius << " " << YSCALE (y + radius) << " " << radius << " 0 90 arc\n"; - - *m_pstream << x + radius << " " << YSCALE (y) << " lineto\n"; - - *m_pstream << "closepath\n"; - - *m_pstream << "stroke\n"; - - CalcBoundingBox (x, (long)YSCALE (y)); - CalcBoundingBox (x + width, (long)YSCALE (y + height)); - } -} - -void wxPostScriptDC::DrawEllipse (long x, long y, long width, long height) -{ - if (!m_pstream) - return; - if (m_brush.Ok() && m_brush.GetStyle () != wxTRANSPARENT) - { - SetBrush (m_brush); - - *m_pstream << "newpath\n"; - *m_pstream << x + width / 2 << " " << YSCALE (y + height / 2) << " "; - *m_pstream << width / 2 << " " << height / 2 << " 0 360 ellipse\n"; - *m_pstream << "fill\n"; - - CalcBoundingBox (x - width, (long)YSCALE (y - height)); - CalcBoundingBox (x + width, (long)YSCALE (y + height)); - } - if (m_pen.Ok() && m_pen.GetStyle () != wxTRANSPARENT) - { - SetPen (m_pen); - - *m_pstream << "newpath\n"; - *m_pstream << x + width / 2 << " " << YSCALE (y + height / 2) << " "; - *m_pstream << width / 2 << " " << height / 2 << " 0 360 ellipse\n"; - *m_pstream << "stroke\n"; - - CalcBoundingBox (x - width, (long)YSCALE (y - height)); - CalcBoundingBox (x + width, (long)YSCALE (y + height)); - } -} - -void wxPostScriptDC::DrawIcon (const wxIcon& icon, long x, long y) -{ -#if defined(__X__) || defined(__WXGTK__) - wxMemoryDC memDC; - memDC.SelectObject(icon); - Blit(x, y, icon.GetWidth(), icon.GetHeight(), &memDC, 0, 0); -#endif -} - -void wxPostScriptDC::SetFont (const wxFont& the_font) -{ - if (!m_pstream) - return; - - if (m_font == the_font) - return; - - m_font = the_font; - - if ( !m_font.Ok() ) - return; - - char buf[100]; - const char *name; - const char *style = ""; - int Style = m_font.GetStyle (); - int Weight = m_font.GetWeight (); - - switch (m_font.GetFamily ()) - { - case wxTELETYPE: - case wxMODERN: - name = "/Courier"; - break; - case wxSWISS: - name = "/Helvetica"; - break; - case wxROMAN: -// name = "/Times-Roman"; - name = "/Times"; // Altered by EDZ - break; - case wxSCRIPT: - name = "/Zapf-Chancery-MediumItalic"; - Style = wxNORMAL; - Weight = wxNORMAL; - break; - default: - case wxDEFAULT: // Sans Serif Font - name = "/LucidaSans"; - } - - if (Style == wxNORMAL && (Weight == wxNORMAL || Weight == wxLIGHT)) - { - if (m_font.GetFamily () == wxROMAN) - style = "-Roman"; - else - style = ""; - } - else if (Style == wxNORMAL && Weight == wxBOLD) - style = "-Bold"; - - else if (Style == wxITALIC && (Weight == wxNORMAL || Weight == wxLIGHT)) - { - if (m_font.GetFamily () == wxROMAN) - style = "-Italic"; - else - style = "-Oblique"; - } - else if (Style == wxITALIC && Weight == wxBOLD) - { - if (m_font.GetFamily () == wxROMAN) - style = "-BoldItalic"; - else - style = "-BoldOblique"; - } - else if (Style == wxSLANT && (Weight == wxNORMAL || Weight == wxLIGHT)) - { - if (m_font.GetFamily () == wxROMAN) - style = "-Italic"; - else - style = "-Oblique"; - } - else if (Style == wxSLANT && Weight == wxBOLD) - { - if (m_font.GetFamily () == wxROMAN) - style = "-BoldItalic"; - else - style = "-BoldOblique"; - } - else - style = ""; - - strcpy (buf, name); - strcat (buf, style); - *m_pstream << buf << " findfont\n"; - *m_pstream << m_font.GetPointSize() * m_scaleFactor << " scalefont setfont\n"; -} - -void wxPostScriptDC::SetPen (const wxPen& pen) -{ - if (!m_pstream) - return; - - int oldStyle = m_pen.GetStyle(); - - m_pen = pen; - - if (!m_pen.Ok()) - return; - - // Line width - *m_pstream << m_pen.GetWidth () << " setlinewidth\n"; - - // Line style - WRONG: 2nd arg is OFFSET - /* - Here, I'm afraid you do not conceive meaning of parameters of 'setdash' - operator correctly. You should look-up this in the Red Book: the 2nd parame- - ter is not number of values in the array of the first one, but an offset - into this description of the pattern. I mean a real *offset* not index - into array. I.e. If the command is [3 4] 1 setdash is used, then there - will be first black line *2* units long, then space 4 units, then the - pattern of *3* units black, 4 units space will be repeated. - */ - static const char *dotted = "[2 5] 2"; - static const char *short_dashed = "[4 4] 2"; - static const char *long_dashed = "[4 8] 2"; - static const char *dotted_dashed = "[6 6 2 6] 4"; - - const char *psdash = (char *) NULL; - switch (m_pen.GetStyle ()) - { - case wxDOT: - psdash = dotted; - break; - case wxSHORT_DASH: - psdash = short_dashed; - break; - case wxLONG_DASH: - psdash = long_dashed; - break; - case wxDOT_DASH: - psdash = dotted_dashed; - break; - case wxSOLID: - case wxTRANSPARENT: - default: - psdash = "[] 0"; - break; - } - if (oldStyle != m_pen.GetStyle()) - *m_pstream << psdash << " setdash\n"; - - // Line colour - unsigned char red = m_pen.GetColour ().Red (); - unsigned char blue = m_pen.GetColour ().Blue (); - unsigned char green = m_pen.GetColour ().Green (); - - if (!m_colour) - { - // Anything not white is black - if (!(red == (unsigned char) 255 && blue == (unsigned char) 255 - && green == (unsigned char) 255)) - { - red = (unsigned char) 0; - green = (unsigned char) 0; - blue = (unsigned char) 0; - } - } - - if (!(red == m_currentRed && green == m_currentGreen && blue == m_currentBlue)) - { - long redPS = (long) (((int) red) / 255.0); - long bluePS = (long) (((int) blue) / 255.0); - long greenPS = (long) (((int) green) / 255.0); - - *m_pstream << redPS << " " << greenPS << " " << bluePS << " setrgbcolor\n"; - - m_currentRed = red; - m_currentBlue = blue; - m_currentGreen = green; - } -} - -void wxPostScriptDC::SetBrush (const wxBrush& brush) -{ - if (!m_pstream) - return; - - m_brush = brush; - - if ( !m_brush.Ok() ) - return; - - // Brush colour - unsigned char red = m_brush.GetColour ().Red (); - unsigned char blue = m_brush.GetColour ().Blue (); - unsigned char green = m_brush.GetColour ().Green (); - - if (!m_colour) - { - // Anything not black is white - if (!(red == (unsigned char) 0 && blue == (unsigned char) 0 - && green == (unsigned char) 0)) - { - red = (unsigned char) 255; - green = (unsigned char) 255; - blue = (unsigned char) 255; - } - } - - if (!(red == m_currentRed && green == m_currentGreen && blue == m_currentBlue)) - { - long redPS = (long) (((int) red) / 255.0); - long bluePS = (long) (((int) blue) / 255.0); - long greenPS = (long) (((int) green) / 255.0); - *m_pstream << redPS << " " << greenPS << " " << bluePS << " setrgbcolor\n"; - m_currentRed = red; - m_currentBlue = blue; - m_currentGreen = green; - } -} - -void wxPostScriptDC::DrawText (const wxString& text, long x, long y, bool WXUNUSED(use16bit)) -{ - if (!m_pstream) - return; - - // TODO: SetFont checks for identity so this will always be a NULL operation - if (m_font.Ok()) - SetFont (m_font); - - if (m_textForegroundColour.Ok ()) - { - unsigned char red = m_textForegroundColour.Red (); - unsigned char blue = m_textForegroundColour.Blue (); - unsigned char green = m_textForegroundColour.Green (); - - if (!m_colour) - { - // Anything not white is black - if (!(red == (unsigned char) 255 && blue == (unsigned char) 255 - && green == (unsigned char) 255)) - { - red = (unsigned char) 0; - green = (unsigned char) 0; - blue = (unsigned char) 0; - } - } - if (!(red == m_currentRed && green == m_currentGreen && blue == m_currentBlue)) - { - long redPS = (long) (((int) red) / 255.0); - long bluePS = (long) (((int) blue) / 255.0); - long greenPS = (long) (((int) green) / 255.0); - *m_pstream << redPS << " " << greenPS << " " << bluePS << " setrgbcolor\n"; - - m_currentRed = red; - m_currentBlue = blue; - m_currentGreen = green; - } - } - - int size = 10; - if (m_font.Ok()) - size = m_font.GetPointSize (); - - *m_pstream << x << " " << YSCALE (y + size) << " moveto\n"; - -// *m_pstream << "(" << text << ")" << " show\n"; - *m_pstream << "("; - int len = strlen ((char *)(const char *)text); - int i; - for (i = 0; i < len; i++) - { -/* - char ch = text[i]; - if (ch == ')' || ch == '(' || ch == '\\') - *m_pstream << "\\"; - *m_pstream << ch; -*/ - int c = (unsigned char) text[i]; - if ( c == ')' || c == '(' || c == '\\') - { - *m_pstream << "\\" << (char) c; - } - else if ( c >= 128 ) - { - // Cope with character codes > 127 - char tmp[5]; - sprintf(tmp, "\\%o", c); - *m_pstream << tmp; - } - else - *m_pstream << (char) c; - } - - *m_pstream << ")" << " show\n"; - - if (m_font.GetUnderlined()) - { - long w, h; - GetTextExtent(text, &w, &h); - *m_pstream << "gsave " << x << " " << YSCALE (y + size - UnderlinePosition) - << " moveto\n" - << UnderlineThickness << " setlinewidth " - << x + w << " " << YSCALE (y + size - UnderlinePosition) - << " lineto stroke grestore\n"; - } - - CalcBoundingBox (x, (long)YSCALE (y + size)); - CalcBoundingBox (x + size * strlen ((char *)(const char *)text), (long)YSCALE (y)); -} - - -void wxPostScriptDC::SetBackground (const wxBrush& brush) -{ - m_backgroundBrush = brush; -} - -void wxPostScriptDC::SetLogicalFunction (int WXUNUSED(function)) -{ -} - -static const char *wxPostScriptHeaderEllipse = "\ -/ellipsedict 8 dict def\n\ -ellipsedict /mtrx matrix put\n\ -/ellipse\n\ -{ ellipsedict begin\n\ - /endangle exch def\n\ - /startangle exch def\n\ - /yrad exch def\n\ - /xrad exch def\n\ - /y exch def\n\ - /x exch def\n\ - /savematrix mtrx currentmatrix def\n\ - x y translate\n\ - xrad yrad scale\n\ - 0 0 1 startangle endangle arc\n\ - savematrix setmatrix\n\ - end\n\ - } def\n\ -"; - -static const char *wxPostScriptHeaderEllipticArc= "\ -/ellipticarcdict 8 dict def\n\ -ellipticarcdict /mtrx matrix put\n\ -/ellipticarc\n\ -{ ellipticarcdict begin\n\ - /do_fill exch def\n\ - /endangle exch def\n\ - /startangle exch def\n\ - /yrad exch def\n\ - /xrad exch def \n\ - /y exch def\n\ - /x exch def\n\ - /savematrix mtrx currentmatrix def\n\ - x y translate\n\ - xrad yrad scale\n\ - do_fill { 0 0 moveto } if\n\ - 0 0 1 startangle endangle arc\n\ - savematrix setmatrix\n\ - do_fill { fill }{ stroke } ifelse\n\ - end\n\ -} def\n"; - -bool wxPostScriptDC::StartDoc (const wxString& message) -{ - if (m_filename == "") - { -#ifdef __VMS__ - m_filename = "wxtmp.ps"; -#else - m_filename = wxGetTempFileName("ps"); -#endif - wxThePrintSetupData->SetPrinterFile((char *)(const char *)m_filename); - m_ok = TRUE; - } - else - wxThePrintSetupData->SetPrinterFile((char *)(const char *)m_filename); - -#ifdef __VMS__ - // steve, 05.09.94 - // VMS is sh*t! - m_pstream = new ofstream; - if(fileBuffer) delete[] fileBuffer; - fileBuffer = new char[VMS_BUFSIZ]; - m_pstream->setbuf(fileBuffer,VMS_BUFSIZ); - m_pstream->open(wxThePrintSetupData->GetPrinterFile()); -#else - m_pstream = new ofstream (wxThePrintSetupData->GetPrinterFile()); -#endif - if (!m_pstream || !m_pstream->good()) - { - wxMessageBox (_("Cannot open file!"), _("Error"), wxOK); - m_ok = FALSE; - return FALSE; - } - m_ok = TRUE; - - SetBrush (*wxBLACK_BRUSH); - SetPen (*wxBLACK_PEN); - - wxPageNumber = 1; - m_title = message; - return TRUE; -} - - -void wxPostScriptDC::EndDoc (void) -{ - static char wxPostScriptHeaderReencodeISO1[] = - "\n/reencodeISO {\n" -"dup dup findfont dup length dict begin\n" -"{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n" -"/Encoding ISOLatin1Encoding def\n" -"currentdict end definefont\n" -"} def\n" -"/ISOLatin1Encoding [\n" -"/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n" -"/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n" -"/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n" -"/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n" -"/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright\n" -"/parenleft/parenright/asterisk/plus/comma/minus/period/slash\n" -"/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon\n" -"/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N\n" -"/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright\n" -"/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m\n" -"/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde\n" -"/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n" -"/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n" -"/.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve\n" -"/dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut\n"; - - static char wxPostScriptHeaderReencodeISO2[] = -"/ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar\n" -"/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot\n" -"/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior\n" -"/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine\n" -"/guillemotright/onequarter/onehalf/threequarters/questiondown\n" -"/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla\n" -"/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex\n" -"/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis\n" -"/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute\n" -"/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis\n" -"/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave\n" -"/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex\n" -"/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis\n" -"/yacute/thorn/ydieresis\n" - "] def\n\n"; - - if (!m_pstream) - return; - if (m_clipping) - { - m_clipping = FALSE; - *m_pstream << "grestore\n"; - } - - // Will reuse m_pstream for header -#ifdef __VMS__ - // see the definition of fileBuffer for explanation - m_pstream->close(); // steve, 05.09.94 - if(fileBuffer) delete[] fileBuffer; -#endif - if (m_pstream) - { - delete m_pstream; - m_pstream = (ofstream *) NULL; - } - - // Write header now -// steve, 05.09.94 -#ifdef __VMS__ - char *header_file = "header.ps"; -#else - char *header_file = wxGetTempFileName("ps"); -#endif - m_pstream = new ofstream (header_file); - - *m_pstream << "%!PS-Adobe-2.0\n"; /* PostScript magic strings */ - *m_pstream << "%%Title: " << (const char *) m_title << "\n"; - *m_pstream << "%%Creator: " << wxTheApp->argv[0] << "\n"; -// time_t when; time (&when); -// *m_pstream << "%%CreationDate: " << ctime (&when); - *m_pstream << "%%CreationDate: " << wxNow() << "\n"; - - // User Id information - char userID[256]; - if ( wxGetEmailAddress(userID, sizeof(userID)) ) - { - *m_pstream << "%%For: " << (char *)userID; - char userName[245]; - if (wxGetUserName(userName, sizeof(userName))) - *m_pstream << " (" << (char *)userName << ")"; - *m_pstream << "\n"; - } - else if ( wxGetUserName(userID, sizeof(userID)) ) - { - *m_pstream << "%%For: " << (char *)userID << "\n"; - } - - // THE FOLLOWING HAS BEEN CONTRIBUTED BY Andy Fyfe - - long wx_printer_translate_x, wx_printer_translate_y; - double wx_printer_scale_x, wx_printer_scale_y; - wxThePrintSetupData->GetPrinterTranslation(&wx_printer_translate_x, &wx_printer_translate_y); - wxThePrintSetupData->GetPrinterScaling(&wx_printer_scale_x, &wx_printer_scale_y); - - if (wxThePrintSetupData->GetPrinterOrientation() == PS_LANDSCAPE) - { - *m_pstream << "%%Orientation: Landscape\n"; - } - else - { - *m_pstream << "%%Orientation: Portrait\n"; - } - - // Compute the bounding box. Note that it is in the default user - // coordinate system, thus we have to convert the values. - long llx = (long) ((m_minX+wx_printer_translate_x)*wx_printer_scale_x); - long lly = (long) ((m_minY+wx_printer_translate_y)*wx_printer_scale_y); - long urx = (long) ((m_maxX+wx_printer_translate_x)*wx_printer_scale_x); - long ury = (long) ((m_maxY+wx_printer_translate_y)*wx_printer_scale_y); - -#if 0 - // If we're landscape, our sense of "x" and "y" is reversed. - if (wxThePrintSetupData->GetPrinterOrientation() == PS_LANDSCAPE) - { - double tmp; - tmp = llx; llx = lly; lly = tmp; - tmp = urx; urx = ury; ury = tmp; - - // We need either the two lines that follow, or we need to subtract - // min_x from real_translate_y, which is commented out below. - llx = llx - m_minX*wx_printer_scale_y; - urx = urx - m_minX*wx_printer_scale_y; - } -#endif - - // The Adobe specifications call for integers; we round as to make - // the bounding larger. - *m_pstream << "%%BoundingBox: " - << floor(llx) << " " << floor(lly) << " " - << ceil(urx) << " " << ceil(ury) << "\n"; - *m_pstream << "%%Pages: " << wxPageNumber - 1 << "\n"; - *m_pstream << "%%EndComments\n\n"; - - // To check the correctness of the bounding box, postscript commands - // to draw a box corresponding to the bounding box are generated below. - // But since we typically don't want to print such a box, the postscript - // commands are generated within comments. These lines appear before any - // adjustment of scale, rotation, or translation, and hence are in the - // default user coordinates. - *m_pstream << "% newpath\n"; - *m_pstream << "% " << llx << " " << lly << " moveto\n"; - *m_pstream << "% " << urx << " " << lly << " lineto\n"; - *m_pstream << "% " << urx << " " << ury << " lineto\n"; - *m_pstream << "% " << llx << " " << ury << " lineto closepath stroke\n"; - -#if 0 - // Output scaling - long real_translate_y = wx_printer_translate_y; - if (wxThePrintSetupData->GetPrinterOrientation() == PS_LANDSCAPE) - { - real_translate_y -= m_maxY; - // The following line can be used instead of the adjustment to - // llx and urx above. - // real_translate_y -= m_minX; - *m_pstream << "90 rotate\n"; - } - -/* Probably don't want this now we have it in EndPage, below. - * We should rationalise the scaling code to one place. JACS, October 1995 - * Do we take the next 2 lines out or not? - */ - - *m_pstream << wx_printer_scale_x << " " << wx_printer_scale_y << " scale\n"; - *m_pstream << wx_printer_translate_x << " " << real_translate_y << " translate\n"; -#endif - - *m_pstream << "%%BeginProlog\n"; - *m_pstream << wxPostScriptHeaderEllipse; - *m_pstream << wxPostScriptHeaderEllipticArc; - *m_pstream << wxPostScriptHeaderReencodeISO1; - *m_pstream << wxPostScriptHeaderReencodeISO2; - - if (wxPostScriptHeaderSpline) - *m_pstream << wxPostScriptHeaderSpline; - *m_pstream << "%%EndProlog\n"; - - delete m_pstream; - m_pstream = (ofstream *) NULL; - -#ifdef __VMS__ - char *tmp_file = "tmp.ps"; -#else - char *tmp_file = wxGetTempFileName("ps"); -#endif - - // Paste header Before wx_printer_file - wxConcatFiles (header_file, wxThePrintSetupData->GetPrinterFile(), tmp_file); - wxRemoveFile (header_file); - wxRemoveFile (wxThePrintSetupData->GetPrinterFile()); - wxRenameFile(tmp_file, wxThePrintSetupData->GetPrinterFile()); - -#if defined(__X__) || defined(__WXGTK__) - if (m_ok) - { - switch (wxThePrintSetupData->GetPrinterMode()) { - case PS_PREVIEW: - { - char *argv[3]; - argv[0] = wxThePrintSetupData->GetPrintPreviewCommand(); - argv[1] = wxThePrintSetupData->GetPrinterFile(); - argv[2] = (char *) NULL; - wxExecute (argv, TRUE); - wxRemoveFile(wxThePrintSetupData->GetPrinterFile()); - } - break; - - case PS_PRINTER: - { - char *argv[4]; - int argc = 0; - argv[argc++] = wxThePrintSetupData->GetPrinterCommand(); - - // !SM! If we simply assign to argv[1] here, if printer options - // are blank, we get an annoying and confusing message from lpr. - char * opts = wxThePrintSetupData->GetPrinterOptions(); - if (opts && *opts) - argv[argc++] = opts; - - argv[argc++] = wxThePrintSetupData->GetPrinterFile(); - argv[argc++] = (char *) NULL; - wxExecute (argv, TRUE); - wxRemoveFile(wxThePrintSetupData->GetPrinterFile()); - } - break; - - case PS_FILE: - break; - } - } -#endif -} - -void wxPostScriptDC::StartPage (void) -{ - if (!m_pstream) - return; - *m_pstream << "%%Page: " << wxPageNumber++ << "\n"; -// *m_pstream << "matrix currentmatrix\n"; - - // Added by Chris Breeze - - // Each page starts with an "initgraphics" which resets the - // transformation and so we need to reset the origin - // (and rotate the page for landscape printing) - m_scaleFactor = 1.0; - m_logicalOriginX = 0; - m_logicalOriginY = 0; - - // Output scaling - long translate_x, translate_y; - double scale_x, scale_y; - wxThePrintSetupData->GetPrinterTranslation(&translate_x, &translate_y); - wxThePrintSetupData->GetPrinterScaling(&scale_x, &scale_y); - - if (wxThePrintSetupData->GetPrinterOrientation() == PS_LANDSCAPE) - { - translate_y -= GetYOrigin(); - *m_pstream << "90 rotate\n"; - } - - *m_pstream << scale_x << " " << scale_y << " scale\n"; - *m_pstream << translate_x << " " << translate_y << " translate\n"; -} - -void wxPostScriptDC::EndPage (void) -{ - if (!m_pstream) - return; - *m_pstream << "showpage\n"; - - // Removed by Chris Breeze -#if 0 - *m_pstream << "setmatrix\n"; - - // THE FOLLOWING HAS BEEN CONTRIBUTED BY Andy Fyfe - - long wx_printer_translate_x, wx_printer_translate_y; - double wx_printer_scale_x, wx_printer_scale_y; - wxThePrintSetupData->GetPrinterTranslation(&wx_printer_translate_x, &wx_printer_translate_y); - wxThePrintSetupData->GetPrinterScaling(&wx_printer_scale_x, &wx_printer_scale_y); - - // Compute the bounding box. Note that it is in the default user - // coordinate system, thus we have to convert the values. - long llx = (m_minX+wx_printer_translate_x)*wx_printer_scale_x; - long lly = (m_minY+wx_printer_translate_y)*wx_printer_scale_y; - long urx = (m_maxX+wx_printer_translate_x)*wx_printer_scale_x; - long ury = (m_maxY+wx_printer_translate_y)*wx_printer_scale_y; - - // If we're landscape, our sense of "x" and "y" is reversed. - if (wxThePrintSetupData->GetPrinterOrientation() == PS_LANDSCAPE) - { - long tmp; - tmp = llx; llx = lly; lly = tmp; - tmp = urx; urx = ury; ury = tmp; - - // We need either the two lines that follow, or we need to subtract - // m_minX from real_translate_y, which is commented out below. - llx = llx - m_minX*wx_printer_scale_y; - urx = urx - m_minX*wx_printer_scale_y; - } - - // Output scaling - long real_translate_y = wx_printer_translate_y; - if (wxThePrintSetupData->GetPrinterOrientation() == PS_LANDSCAPE) - { - real_translate_y -= m_maxY; - // The following line can be used instead of the adjustment to - // llx and urx above. - // real_translate_y -= m_minX; - *m_pstream << "90 rotate\n"; - } - - *m_pstream << wx_printer_scale_x << " " << wx_printer_scale_y << " scale\n"; - *m_pstream << wx_printer_translate_x << " " << real_translate_y << " translate\n"; -#endif -} - -/* MATTHEW: Implement Blit: */ -/* MATTHEW: [4] Re-wrote to use colormap */ -bool wxPostScriptDC:: -Blit (long xdest, long ydest, long fwidth, long fheight, - wxDC *source, long xsrc, long ysrc, int WXUNUSED(rop), bool WXUNUSED(useMask)) -{ - long width, height, x, y; - -#if !defined(__X__) && !defined(__WXGTK__) - return FALSE; -#endif - - if (!source->IsKindOf(CLASSINFO(wxPaintDC))) return FALSE; - - width = (long)floor(fwidth); - height = (long)floor(fheight); - x = (long)floor(xsrc); - y = (long)floor(ysrc); - - /* PostScript setup: */ - *m_pstream << "gsave\n"; - *m_pstream << xdest << " " << YSCALE(ydest + fheight) << " translate\n"; - *m_pstream << fwidth << " " << fheight << " scale\n"; - *m_pstream << "/DataString " << width << " string def\n"; - *m_pstream << width << " " << height << " 8 [ "; - *m_pstream << width << " 0 0 " << (-height) << " 0 " << height; - *m_pstream << " ]\n{\n"; - *m_pstream << " currentfile DataString readhexstring pop\n"; - *m_pstream << "} bind image\n"; - -#if defined(__X__) || defined(__WXGTK__) - - /* Output data as hex digits: */ - Display *d; - Colormap cm; - XImage *image; - long j, i; - char s[3]; - -#ifdef __WXGTK__ - - d = gdk_display; - cm = ((GdkColormapPrivate*)gdk_colormap_get_system())->xcolormap; - GdkWindow *gwin = ((wxClientDC*)source)->GetWindow(); - image = XGetImage(d, ((GdkWindowPrivate*)gwin)->xwindow, x, y, width, height, AllPlanes, ZPixmap); - -#else - -#ifdef __WXMOTIF__ - d = source->display; -#else - d = wxGetDisplay(); -#endif - - cm = wxGetMainColormap(d); - image = XGetImage(d, source->pixmap, x, y, width, height, AllPlanes, ZPixmap); - -#endif - - - s[2] = 0; - -#define CM_CACHE_SIZE 256 - unsigned long cachesrc[CM_CACHE_SIZE]; - int cachedest[CM_CACHE_SIZE], cache_pos = 0, all_cache = FALSE; - - for (j = 0; j < height; j++) { - for (i = 0; i < width; i++) { - XColor xcol; - unsigned long spixel; - int pixel, k; - const unsigned short MAX_COLOR = 0xFFFF; - - spixel = XGetPixel(image, i, j); - - for (k = cache_pos; k--; ) - if (cachesrc[k] == spixel) { - pixel = cachedest[k]; - goto install; - } - if (all_cache) - for (k = CM_CACHE_SIZE; k-- > cache_pos; ) - if (cachesrc[k] == spixel) { - pixel = cachedest[k]; - goto install; - } - - cachesrc[cache_pos] = xcol.pixel = spixel; - XQueryColor(d, cm, &xcol); - - long r, g, b; - - r = (long)((double)(xcol.red) / MAX_COLOR); - g = (long)((double)(xcol.green) / MAX_COLOR); - b = (long)((double)(xcol.blue) / MAX_COLOR); - - pixel = (int)(255 * sqrt(((r * r) + (g * g) + (b * b)) / 3)); - - cachedest[cache_pos] = pixel; - - if (++cache_pos >= CM_CACHE_SIZE) { - cache_pos = 0; - all_cache = TRUE; - } - - install: - int h, l; - - h = (pixel >> 4) & 0xF; - l = pixel & 0xF; - - if (h <= 9) - s[0] = '0' + h; - else - s[0] = 'a' + (h - 10); - if (l <= 9) - s[1] = '0' + l; - else - s[1] = 'a' + (l - 10); - - *m_pstream << s; - } - *m_pstream << "\n"; - } - - XDestroyImage(image); -#endif - - *m_pstream << "grestore\n"; - - CalcBoundingBox(xdest, (long)YSCALE(ydest)); - CalcBoundingBox(xdest + fwidth, (long)YSCALE(ydest + fheight)); - - return TRUE; -} - -long wxPostScriptDC::GetCharHeight (void) -{ - if (m_font.Ok()) - return m_font.GetPointSize (); - else - return 12; -} - -void wxPostScriptDC::GetTextExtent (const wxString& string, long *x, long *y, - long *descent, long *externalLeading, wxFont *theFont, - bool WXUNUSED(use16)) -{ - wxFont *fontToUse = theFont; - if (!fontToUse) - fontToUse = (wxFont*) &m_font; - - if (!m_pstream) - return; -#if !USE_AFM_FOR_POSTSCRIPT - // Provide a VERY rough estimate (avoid using it) - // Chris Breeze 5/11/97: produces accurate results for mono-spaced - // font such as Courier (aka wxMODERN) - int height = 12; - if (fontToUse) - { - height = fontToUse->GetPointSize(); - } - *x = strlen (string) * height * 72 / 120; - *y = (long) (height * 1.32); // allow for descender - - if (descent) - *descent = 0; - if (externalLeading) - *externalLeading = 0; -#else - // +++++ start of contributed code +++++ - - // ************************************************************ - // method for calculating string widths in postscript: - // read in the AFM (adobe font metrics) file for the - // actual font, parse it and extract the character widths - // and also the descender. this may be improved, but for now - // it works well. the AFM file is only read in if the - // font is changed. this may be chached in the future. - // calls to GetTextExtent with the font unchanged are rather - // efficient!!! - // - // for each font and style used there is an AFM file necessary. - // currently i have only files for the roman font family. - // i try to get files for the other ones! - // - // CAVE: the size of the string is currently always calculated - // in 'points' (1/72 of an inch). this should later on be - // changed to depend on the mapping mode. - // CAVE: the path to the AFM files must be set before calling this - // function. this is usually done by a call like the following: - // wxSetAFMPath("d:\\wxw161\\afm\\"); - // - // example: - // - // wxPostScriptDC dc(NULL, TRUE); - // if (dc.Ok()){ - // wxSetAFMPath("d:\\wxw161\\afm\\"); - // dc.StartDoc("Test"); - // dc.StartPage(); - // long w,h; - // dc.SetFont(new wxFont(10, wxROMAN, wxNORMAL, wxNORMAL)); - // dc.GetTextExtent("Hallo",&w,&h); - // dc.EndPage(); - // dc.EndDoc(); - // } - // - // by steve (stefan.hammes@urz.uni-heidelberg.de) - // created: 10.09.94 - // updated: 14.05.95 - - assert(fontToUse && "void wxPostScriptDC::GetTextExtent: no font defined"); - assert(x && "void wxPostScriptDC::GetTextExtent: x == NULL"); - assert(y && "void wxPostScriptDC::GetTextExtent: y == NULL"); - - // these static vars are for storing the state between calls - static int lastFamily= INT_MIN; - static int lastSize= INT_MIN; - static int lastStyle= INT_MIN; - static int lastWeight= INT_MIN; - static int lastDescender = INT_MIN; - static int lastWidths[256]; // widths of the characters - - // get actual parameters - const int Family = fontToUse->GetFamily(); - const int Size = fontToUse->GetPointSize(); - const int Style = fontToUse->GetStyle(); - const int Weight = fontToUse->GetWeight(); - - // if we have another font, read the font-metrics - if(Family!=lastFamily||Size!=lastSize||Style!=lastStyle||Weight!=lastWeight){ - // store actual values - lastFamily = Family; - lastSize = Size; - lastStyle = Style; - lastWeight = Weight; - - // read in new font metrics ************************************** - - // 1. construct filename ****************************************** - /* MATTHEW: [2] Use wxTheFontNameDirectory */ - const char *name; - - // Julian - we'll need to do this a different way now we've removed the - // font directory system. Must find Stefan's original code. - - name = wxTheFontNameDirectory->GetAFMName(Family, Weight, Style); - if (!name) - name = "unknown"; - - // get the directory of the AFM files - char afmName[256]; - afmName[0] = 0; - if (wxGetAFMPath()) - strcpy(afmName,wxGetAFMPath()); - - // 2. open and process the file ********************************** - - // a short explanation of the AFM format: - // we have for each character a line, which gives its size - // e.g.: - // - // C 63 ; WX 444 ; N question ; B 49 -14 395 676 ; - // - // that means, we have a character with ascii code 63, and width - // (444/1000 * fontSize) points. - // the other data is ignored for now! - // - // when the font has changed, we read in the right AFM file and store the - // character widths in an array, which is processed below (see point 3.). - - // new elements JC Sun Aug 25 23:21:44 MET DST 1996 - - - strcat(afmName,name); - strcat(afmName,".afm"); - FILE *afmFile = fopen(afmName,"r"); - if(afmFile==NULL){ - wxDebugMsg("GetTextExtent: can't open AFM file '%s'\n",afmName); - wxDebugMsg(" using approximate values\n"); - int i; - for (i=0; i<256; i++) lastWidths[i] = 500; // an approximate value - lastDescender = -150; // dito. - }else{ - int i; - // init the widths array - for(i=0; i<256; i++) lastWidths[i]= INT_MIN; - // some variables for holding parts of a line - char cString[10],semiString[10],WXString[10],descString[20]; - char upString[30], utString[30], encString[50]; - char line[256]; - int ascii,cWidth; - // read in the file and parse it - while(fgets(line,sizeof(line),afmFile)!=NULL){ - // A.) check for descender definition - if(strncmp(line,"Descender",9)==0){ - if((sscanf(line,"%s%d",descString,&lastDescender)!=2) - || (strcmp(descString,"Descender")!=0)) { - wxDebugMsg("AFM-file '%s': line '%s' has error (bad descender)\n", - afmName,line); - } - } - // JC 1.) check for UnderlinePosition - else if(strncmp(line,"UnderlinePosition",17)==0){ - if((sscanf(line,"%s%lf",upString,&UnderlinePosition)!=2) - || (strcmp(upString,"UnderlinePosition")!=0)) { - wxDebugMsg("AFM-file '%s': line '%s' has error (bad UnderlinePosition)\n", - afmName,line); - } - } - // JC 2.) check for UnderlineThickness - else if(strncmp(line,"UnderlineThickness",18)==0){ - if((sscanf(line,"%s%lf",utString,&UnderlineThickness)!=2) - || (strcmp(utString,"UnderlineThickness")!=0)) { - wxDebugMsg("AFM-file '%s': line '%s' has error (bad UnderlineThickness)\n", - afmName,line); - } - } - // JC 3.) check for EncodingScheme - else if(strncmp(line,"EncodingScheme",14)==0){ - if((sscanf(line,"%s%s",utString,encString)!=2) - || (strcmp(utString,"EncodingScheme")!=0)) { - wxDebugMsg("AFM-file '%s': line '%s' has error (bad EncodingScheme)\n", - afmName,line); - } - else if (strncmp(encString, "AdobeStandardEncoding", 21)) - { - wxDebugMsg("AFM-file '%s': line '%s' has error (unsupported EncodingScheme %s)\n", - afmName,line, encString); - } - } - // B.) check for char-width - else if(strncmp(line,"C ",2)==0){ - if(sscanf(line,"%s%d%s%s%d", - cString,&ascii,semiString,WXString,&cWidth)!=5){ - wxDebugMsg("AFM-file '%s': line '%s' has an error (bad character width)\n",afmName,line); - } - if(strcmp(cString,"C")!=0 || strcmp(semiString,";")!=0 || - strcmp(WXString,"WX")!=0){ - wxDebugMsg("AFM-file '%s': line '%s' has a format error\n",afmName,line); - } - //printf(" char '%c'=%d has width '%d'\n",ascii,ascii,cWidth); - if(ascii>=0 && ascii<256){ - lastWidths[ascii] = cWidth; // store width - }else{ - /* MATTHEW: this happens a lot; don't print an error */ - // wxDebugMsg("AFM-file '%s': ASCII value %d out of range\n",afmName,ascii); - } - } - // C.) ignore other entries. - } - fclose(afmFile); - } - // hack to compute correct values for german 'Umlaute' - // the correct way would be to map the character names - // like 'adieresis' to corresp. positions of ISOEnc and read - // these values from AFM files, too. Maybe later ... - lastWidths[196] = lastWidths['A']; // Ä - lastWidths[228] = lastWidths['a']; // ä - lastWidths[214] = lastWidths['O']; // Ö - lastWidths[246] = lastWidths['o']; // ö - lastWidths[220] = lastWidths['U']; // Ü - lastWidths[252] = lastWidths['u']; // ü - lastWidths[223] = lastWidths[251]; // ß - } - - // JC: calculate UnderlineThickness/UnderlinePosition - UnderlinePosition = UnderlinePosition * fontToUse->GetPointSize() / 1000.0f; - UnderlineThickness = UnderlineThickness * fontToUse->GetPointSize() / 1000.0f * m_scaleFactor; - - // 3. now the font metrics are read in, calc size ******************* - // this is done by adding the widths of the characters in the - // string. they are given in 1/1000 of the size! - - long widthSum=0; - long height=Size; // by default - unsigned char *p; - for(p=(unsigned char *)(const char *)string; *p; p++){ - if(lastWidths[*p]== INT_MIN){ - wxDebugMsg("GetTextExtent: undefined width for character '%c' (%d)\n", - *p,*p); - widthSum += (long)(lastWidths[' ']/1000.0F * Size); // assume space - }else{ - widthSum += (long)((lastWidths[*p]/1000.0F)*Size); - } - } - // add descender to height (it is usually a negative value) - if(lastDescender!=INT_MIN){ - height += (long)(((-lastDescender)/1000.0F) * Size); /* MATTHEW: forgot scale */ - } - - // return size values - *x = widthSum; - *y = height; - - // return other parameters - if (descent){ - if(lastDescender!=INT_MIN){ - *descent = (long)(((-lastDescender)/1000.0F) * Size); /* MATTHEW: forgot scale */ - }else{ - *descent = 0; - } - } - - // currently no idea how to calculate this! - // if (externalLeading) *externalLeading = 0; - if (externalLeading) - *externalLeading = 0; - - // ----- end of contributed code ----- -#endif -} - -void wxPostScriptDC::DrawOpenSpline( wxList *points ) -{ - double a, b, c, d, x1, y1, x2, y2, x3, y3; - wxPoint *p, *q; - - wxNode *node = points->First(); - p = (wxPoint *)node->Data(); - - x1 = p->x; y1 = p->y; - - node = node->Next(); - p = (wxPoint *)node->Data(); - c = p->x; d = p->y; - x3 = a = (double)(x1 + c) / 2; - y3 = b = (double)(y1 + d) / 2; - - *(GetStream()) << "newpath " << x1 << " " << GetYOrigin() - y1 << " moveto " << x3 << " " << GetYOrigin() - y3; - *(GetStream()) << " lineto\n"; - CalcBoundingBox( (long)x1, (long)(GetYOrigin() - y1)); - CalcBoundingBox( (long)x3, (long)(GetYOrigin() - y3)); - - while ((node = node->Next()) != NULL) - { - q = (wxPoint *)node->Data(); - - x1 = x3; y1 = y3; - x2 = c; y2 = d; - c = q->x; d = q->y; - x3 = (double)(x2 + c) / 2; - y3 = (double)(y2 + d) / 2; - *(GetStream()) << x1 << " " << GetYOrigin() - y1 << " " << x2 << " " << GetYOrigin() - y2 << " "; - *(GetStream()) << x3 << " " << GetYOrigin() - y3 << " DrawSplineSection\n"; - - CalcBoundingBox( (long)x1, (long)(GetYOrigin() - y1)); - CalcBoundingBox( (long)x3, (long)(GetYOrigin() - y3)); - } - /* - * At this point, (x2,y2) and (c,d) are the position of the - * next-to-last and last point respectively, in the point list - */ - *(GetStream()) << c << " " << GetYOrigin() - d << " lineto stroke\n"; -} - -long wxPostScriptDC::GetCharWidth (void) -{ - // Chris Breeze: reasonable approximation using wxMODERN/Courier - return (long) (GetCharHeight() * 72.0 / 120.0); -} - - -void wxPostScriptDC::SetMapMode (int mode) -{ - m_mappingMode = mode; - SetLogicalOrigin(0, 0); - if(m_mappingMode == MM_METRIC) - { - SetUserScale(72.0f / 25.4f, 72.0f / 25.4f); - } - else - { - SetUserScale(1.0, 1.0); - } - return; -} - -/* - * Set the logical origin. - * Actually we are setting the printer's origin and since - * postscript transformations are cumulative we need to reset - * the previous origin. We also need to allow for the user scale - * factor (which affects printer coords but not logical) - */ -void wxPostScriptDC::SetLogicalOrigin(long x, long y) -{ - if (m_scaleFactor) - { - long xOffset = (long) ((m_logicalOriginX - x) / m_scaleFactor); - long yOffset = (long) ((y - m_logicalOriginY) / m_scaleFactor); - - if (m_pstream) - { - *m_pstream << xOffset << " " << yOffset << " translate\n"; - } - } - m_logicalOriginX = x; - m_logicalOriginY = y; -} - -/* - * Obsolete - now performed by SetUserScale() and SetLogicalOrigin() - */ -void -wxPostScriptDC::SetupCTM() -{ -} - -/* - * Set the user scale. - * NB: Postscript transformations are cumulative and so we - * need to take into account the current scale. Also, this - * affects the logical origin - */ -void wxPostScriptDC::SetUserScale (double x, double y) -{ - // reset logical origin - long xOrg = m_logicalOriginX; - long yOrg = m_logicalOriginY; - SetLogicalOrigin(0, 0); - - // set new scale factor - double factor = x; - if (m_scaleFactor) - { - factor /= m_scaleFactor; - } - if (m_pstream) - { - *m_pstream << factor << " " << factor << " scale\n"; - } - - // set logical origin at new scale - SetLogicalOrigin(xOrg, yOrg); - - m_userScaleX = x; - m_userScaleY = y; - - m_scaleFactor = m_userScaleX; -} - -long wxPostScriptDC::DeviceToLogicalX (int x) const -{ - return x; -} - -long wxPostScriptDC::DeviceToLogicalXRel (int x) const -{ - return x; -} - -long wxPostScriptDC::DeviceToLogicalY (int y) const -{ - return y; -} - -long wxPostScriptDC::DeviceToLogicalYRel (int y) const -{ - return y; -} - -long wxPostScriptDC::LogicalToDeviceX (long x) const -{ - return x; -} - -long wxPostScriptDC::LogicalToDeviceXRel (long x) const -{ - return x; -} - -long wxPostScriptDC::LogicalToDeviceY (long y) const -{ - return y; -} - -long wxPostScriptDC::LogicalToDeviceYRel (long y) const -{ - return y; -} - -void wxPostScriptDC::GetSize(int* width, int* height) const -{ - const char *paperType = wxThePrintSetupData->GetPaperName(); - if (!paperType) - paperType = _("A4 210 x 297 mm"); - - wxPrintPaperType *paper = wxThePrintPaperDatabase->FindPaperType(paperType); - if (!paper) - paper = wxThePrintPaperDatabase->FindPaperType(_("A4 210 x 297 mm")); - if (paper) - { - *width = paper->widthPixels; - *height = paper->heightPixels; - } - else - { - *width = 1000; - *height = 1000; - } -} - -void wxPostScriptDC::GetSizeMM(long *width, long *height) const -{ - const char *paperType = wxThePrintSetupData->GetPaperName(); - if (!paperType) - paperType = _("A4 210 x 297 mm"); - - wxPrintPaperType *paper = wxThePrintPaperDatabase->FindPaperType(paperType); - if (!paper) - paper = wxThePrintPaperDatabase->FindPaperType(_("A4 210 x 297 mm")); - if (paper) - { - *width = paper->widthMM; - *height = paper->heightMM; - } - else - { - *width = 1000; - *height = 1000; - } -} - -void wxPostScriptDC::CalcBoundingBox(long x, long y) -{ - long device_x = (long) (x - m_logicalOriginX * m_scaleFactor); - long device_y = (long) (y + m_logicalOriginY * m_scaleFactor); - - if (device_x < m_minX) m_minX = device_x; - if (device_y < m_minY) m_minY = device_y; - if (device_x > m_maxX) m_maxX = device_x; - if (device_y > m_maxY) m_maxY = device_y; -} - -IMPLEMENT_CLASS(wxPostScriptPrintDialog, wxDialog) - -wxPostScriptPrintDialog::wxPostScriptPrintDialog (wxWindow *parent, const wxString& title, - const wxPoint& pos, const wxSize& size, long style): -wxDialog(parent, -1, title, pos, size, style) -{ - wxBeginBusyCursor(); - char buf[100]; - - wxButton *okBut = new wxButton (this, wxID_OK, _("OK"), wxPoint(5, 5)); - (void) new wxButton (this, wxID_CANCEL, _("Cancel"), wxPoint(40, 5)); - okBut->SetDefault(); - - int yPos = 40; - -#if defined(__WXGTK__) || defined (__WXMOTIF__) - (void) new wxStaticText(this, -1, _("Printer Command: "), wxPoint(5, yPos)); - wxTextCtrl *text_prt = new wxTextCtrl(this, wxID_PRINTER_COMMAND, wxThePrintSetupData->GetPrinterCommand(), wxPoint(100, yPos), wxSize(100, -1)); - - (void) new wxStaticText(this, -1, _("Printer Options: "), wxPoint(210, yPos)); - wxTextCtrl *text0 = new wxTextCtrl(this, wxID_PRINTER_OPTIONS, wxThePrintSetupData->GetPrinterOptions(), wxPoint(305, yPos), wxSize(150, -1)); - - yPos += 40; -#endif - - wxString orientation[2]; - orientation[0] = _("Portrait"); - orientation[1] = _("Landscape"); - - wxRadioBox *radio0 = new wxRadioBox(this, wxID_PRINTER_ORIENTATION, "Orientation: ", wxPoint(5, yPos), wxSize(-1,-1), - 2,orientation,2,0); - radio0->SetSelection((int)wxThePrintSetupData->GetPrinterOrientation() - 1); - - // @@@ Configuration hook - if (wxThePrintSetupData->GetPrintPreviewCommand() == NULL) - wxThePrintSetupData->SetPrintPreviewCommand(PS_VIEWER_PROG); - - wxGetResource ("wxWindows", "PSView", &wxThePrintSetupData->previewCommand); - - wxString print_modes[3]; - print_modes[0] = _("Send to Printer"); - print_modes[1] = _("Print to File"); - print_modes[2] = _("Preview Only"); - - int features = (wxThePrintSetupData->GetPrintPreviewCommand() && *wxThePrintSetupData->GetPrintPreviewCommand()) ? 3 : 2; - wxRadioBox *radio1 = new wxRadioBox(this, wxID_PRINTER_MODES, _("PostScript:"), - wxPoint(150, yPos), wxSize(-1,-1), features, print_modes, features, 0); - -#ifdef __WXMSW__ - radio1->Enable(0, FALSE); - if (wxThePrintSetupData->GetPrintPreviewCommand() && *wxThePrintSetupData->GetPrintPreviewCommand()) - radio1->Enable(2, FALSE); -#endif - - radio1->SetSelection((int)wxThePrintSetupData->GetPrinterMode()); - - long wx_printer_translate_x, wx_printer_translate_y; - double wx_printer_scale_x, wx_printer_scale_y; - wxThePrintSetupData->GetPrinterTranslation(&wx_printer_translate_x, &wx_printer_translate_y); - wxThePrintSetupData->GetPrinterScaling(&wx_printer_scale_x, &wx_printer_scale_y); - - sprintf (buf, "%.2f", wx_printer_scale_x); - - yPos += 90; - - (void) new wxStaticText(this, -1, _("X Scaling"), wxPoint(5, yPos)); - /* wxTextCtrl *text1 = */ (void) new wxTextCtrl(this, wxID_PRINTER_X_SCALE, buf, wxPoint(100, yPos), wxSize(100, -1)); - - sprintf (buf, "%.2f", wx_printer_scale_y); - (void) new wxStaticText(this, -1, _("Y Scaling"), wxPoint(220, yPos)); - /* wxTextCtrl *text2 = */ (void) new wxTextCtrl(this, wxID_PRINTER_Y_SCALE, buf, wxPoint(320, yPos), wxSize(100, -1)); - - yPos += 25; - - (void) new wxStaticText(this, -1, _("X Translation"), wxPoint(5, yPos)); - sprintf (buf, "%.2ld", wx_printer_translate_x); - /* wxTextCtrl *text3 = */ (void) new wxTextCtrl(this, wxID_PRINTER_X_TRANS, buf, wxPoint(100, yPos), wxSize(100, -1)); - - (void) new wxStaticText(this, -1, _("Y Translation"), wxPoint(220, yPos)); - sprintf (buf, "%.2ld", wx_printer_translate_y); - /* wxTextCtrl *text4 = */ (void) new wxTextCtrl(this, wxID_PRINTER_Y_TRANS, buf, wxPoint(320, yPos), wxSize(100, -1)); - - Fit (); - - wxEndBusyCursor(); -} - -int wxPostScriptPrintDialog::ShowModal (void) -{ - if ( wxDialog::ShowModal() == wxID_OK ) - { -// wxTextCtrl *text0 = (wxTextCtrl *)FindWindow(wxID_PRINTER_OPTIONS); - wxTextCtrl *text1 = (wxTextCtrl *)FindWindow(wxID_PRINTER_X_SCALE); - wxTextCtrl *text2 = (wxTextCtrl *)FindWindow(wxID_PRINTER_Y_SCALE); - wxTextCtrl *text3 = (wxTextCtrl *)FindWindow(wxID_PRINTER_X_TRANS); - wxTextCtrl *text4 = (wxTextCtrl *)FindWindow(wxID_PRINTER_Y_TRANS); -// wxTextCtrl *text_prt = (wxTextCtrl *)FindWindow(wxID_PRINTER_COMMAND); - wxRadioBox *radio0 = (wxRadioBox *)FindWindow(wxID_PRINTER_ORIENTATION); - wxRadioBox *radio1 = (wxRadioBox *)FindWindow(wxID_PRINTER_MODES); - - StringToDouble (WXSTRINGCAST text1->GetValue (), &wxThePrintSetupData->printerScaleX); - StringToDouble (WXSTRINGCAST text2->GetValue (), &wxThePrintSetupData->printerScaleY); - StringToLong (WXSTRINGCAST text3->GetValue (), &wxThePrintSetupData->printerTranslateX); - StringToLong (WXSTRINGCAST text4->GetValue (), &wxThePrintSetupData->printerTranslateY); - -#ifdef __X__ - wxThePrintSetupData->SetPrinterOptions(WXSTRINGCAST text0->GetValue ()); - wxThePrintSetupData->SetPrinterCommand(WXSTRINGCAST text_prt->GetValue ()); -#endif - - wxThePrintSetupData->SetPrinterOrientation((radio0->GetSelection() == 1 ? PS_LANDSCAPE : PS_PORTRAIT)); - - // C++ wants this - switch ( radio1->GetSelection() ) { - case 0: wxThePrintSetupData->SetPrinterMode(PS_PRINTER); break; - case 1: wxThePrintSetupData->SetPrinterMode(PS_FILE); break; - case 2: wxThePrintSetupData->SetPrinterMode(PS_PREVIEW); break; - } - return wxID_OK; - } - return wxID_CANCEL; -} - -// PostScript printer settings -// RETAINED FOR BACKWARD COMPATIBILITY -void wxSetPrinterCommand(const char *cmd) -{ - wxThePrintSetupData->SetPrinterCommand(cmd); -} - -void wxSetPrintPreviewCommand(const char *cmd) -{ - wxThePrintSetupData->SetPrintPreviewCommand(cmd); -} - -void wxSetPrinterOptions(const char *flags) -{ - wxThePrintSetupData->SetPrinterOptions(flags); -} - -void wxSetPrinterFile(const char *f) -{ - wxThePrintSetupData->SetPrinterFile(f); -} - -void wxSetPrinterOrientation(int orient) -{ - wxThePrintSetupData->SetPrinterOrientation(orient); -} - -void wxSetPrinterScaling(double x, double y) -{ - wxThePrintSetupData->SetPrinterScaling(x, y); -} - -void wxSetPrinterTranslation(long x, long y) -{ - wxThePrintSetupData->SetPrinterTranslation(x, y); -} - -// 1 = Preview, 2 = print to file, 3 = send to printer -void wxSetPrinterMode(int mode) -{ - wxThePrintSetupData->SetPrinterMode(mode); -} - -void wxSetAFMPath(const char *f) -{ - wxThePrintSetupData->SetAFMPath(f); -} - -// Get current values -char *wxGetPrinterCommand(void) -{ - return wxThePrintSetupData->GetPrinterCommand(); -} - -char *wxGetPrintPreviewCommand(void) -{ - return wxThePrintSetupData->GetPrintPreviewCommand(); -} - -char *wxGetPrinterOptions(void) -{ - return wxThePrintSetupData->GetPrinterOptions(); -} - -char *wxGetPrinterFile(void) -{ - return wxThePrintSetupData->GetPrinterFile(); -} - -int wxGetPrinterOrientation(void) -{ - return wxThePrintSetupData->GetPrinterOrientation(); -} - -void wxGetPrinterScaling(double* x, double* y) -{ - wxThePrintSetupData->GetPrinterScaling(x, y); -} - -void wxGetPrinterTranslation(long *x, long *y) -{ - wxThePrintSetupData->GetPrinterTranslation(x, y); -} - -int wxGetPrinterMode(void) -{ - return wxThePrintSetupData->GetPrinterMode(); -} - -char *wxGetAFMPath(void) -{ - return wxThePrintSetupData->GetAFMPath(); -} - -/* - * Print setup data - */ - -wxPrintSetupData::wxPrintSetupData(void) -{ - printerCommand = (char *) NULL; - previewCommand = (char *) NULL; - printerFlags = (char *) NULL; - printerOrient = PS_PORTRAIT; - printerScaleX = (double)1.0; - printerScaleY = (double)1.0; - printerTranslateX = 0; - printerTranslateY = 0; - // 1 = Preview, 2 = print to file, 3 = send to printer - printerMode = 3; - afmPath = (char *) NULL; - paperName = (char *) NULL; - printColour = TRUE; - printerFile = (char *) NULL; -} - -wxPrintSetupData::~wxPrintSetupData(void) -{ - if (printerCommand) - delete[] printerCommand; - if (previewCommand) - delete[] previewCommand; - if (printerFlags) - delete[] printerFlags; - if (afmPath) - delete[] afmPath; - if (paperName) - delete[] paperName; - if (printerFile) - delete[] printerFile; -} - -void wxPrintSetupData::SetPrinterCommand(const char *cmd) -{ - if (cmd == printerCommand) - return; - - if (printerCommand) - delete[] printerCommand; - if (cmd) - printerCommand = copystring(cmd); - else - printerCommand = (char *) NULL; -} - -void wxPrintSetupData::SetPrintPreviewCommand(const char *cmd) -{ - if (cmd == previewCommand) - return; - - if (previewCommand) - delete[] previewCommand; - if (cmd) - previewCommand = copystring(cmd); - else - previewCommand = (char *) NULL; -} - -void wxPrintSetupData::SetPaperName(const char *name) -{ - if (name == paperName) - return; - - if (paperName) - delete[] paperName; - if (name) - paperName = copystring(name); - else - paperName = (char *) NULL; -} - -void wxPrintSetupData::SetPrinterOptions(const char *flags) -{ - if (printerFlags == flags) - return; - - if (printerFlags) - delete[] printerFlags; - if (flags) - printerFlags = copystring(flags); - else - printerFlags = (char *) NULL; -} - -void wxPrintSetupData::SetPrinterFile(const char *f) -{ - if (f == printerFile) - return; - - if (printerFile) - delete[] printerFile; - if (f) - printerFile = copystring(f); - else - printerFile = (char *) NULL; -} - -void wxPrintSetupData::SetPrinterOrientation(int orient) -{ - printerOrient = orient; -} - -void wxPrintSetupData::SetPrinterScaling(double x, double y) -{ - printerScaleX = x; - printerScaleY = y; -} - -void wxPrintSetupData::SetPrinterTranslation(long x, long y) -{ - printerTranslateX = x; - printerTranslateY = y; -} - -// 1 = Preview, 2 = print to file, 3 = send to printer -void wxPrintSetupData::SetPrinterMode(int mode) -{ - printerMode = mode; -} - -void wxPrintSetupData::SetAFMPath(const char *f) -{ - if (f == afmPath) - return; - - if (afmPath) - delete[] afmPath; - if (f) - afmPath = copystring(f); - else - afmPath = (char *) NULL; -} - -void wxPrintSetupData::SetColour(bool col) -{ - printColour = col; -} - -// Get current values -char *wxPrintSetupData::GetPrinterCommand(void) -{ - return printerCommand; -} - -char *wxPrintSetupData::GetPrintPreviewCommand(void) -{ - return previewCommand; -} - -char *wxPrintSetupData::GetPrinterOptions(void) -{ - return printerFlags; -} - -char *wxPrintSetupData::GetPrinterFile(void) -{ - return printerFile; -} - -char *wxPrintSetupData::GetPaperName(void) -{ - return paperName; -} - -int wxPrintSetupData::GetPrinterOrientation(void) -{ - return printerOrient; -} - -void wxPrintSetupData::GetPrinterScaling(double *x, double *y) -{ - *x = printerScaleX; - *y = printerScaleY; -} - -void wxPrintSetupData::GetPrinterTranslation(long *x, long *y) -{ - *x = printerTranslateX; - *y = printerTranslateY; -} - -int wxPrintSetupData::GetPrinterMode(void) -{ - return printerMode; -} - -char *wxPrintSetupData::GetAFMPath(void) -{ - return afmPath; -} - -bool wxPrintSetupData::GetColour(void) -{ - return printColour; -} - -void wxPrintSetupData::operator=(wxPrintSetupData& data) -{ - SetPrinterCommand(data.GetPrinterCommand()); - SetPrintPreviewCommand(data.GetPrintPreviewCommand()); - SetPrinterOptions(data.GetPrinterOptions()); - long x, y; - data.GetPrinterTranslation(&x, &y); - SetPrinterTranslation(x, y); - - double x1, y1; - data.GetPrinterScaling(&x1, &y1); - SetPrinterScaling(x1, y1); - - SetPrinterOrientation(data.GetPrinterOrientation()); - SetPrinterMode(data.GetPrinterMode()); - SetAFMPath(data.GetAFMPath()); - SetPaperName(data.GetPaperName()); - SetColour(data.GetColour()); -} - -void wxInitializePrintSetupData(bool init) -{ - if (init) - { - wxThePrintSetupData = new wxPrintSetupData; - - wxThePrintSetupData->SetPrintPreviewCommand(PS_VIEWER_PROG); - wxThePrintSetupData->SetPrinterOrientation(PS_PORTRAIT); - wxThePrintSetupData->SetPrinterMode(PS_PREVIEW); - wxThePrintSetupData->SetPaperName(_("A4 210 x 297 mm")); - - // Could have a .ini file to read in some defaults - // - and/or use environment variables, e.g. WXWIN -#ifdef __VMS__ - wxThePrintSetupData->SetPrinterCommand("print"); - wxThePrintSetupData->SetPrinterOptions("/nonotify/queue=psqueue"); - wxThePrintSetupData->SetAFMPath("sys$ps_font_metrics:"); -#endif -#ifdef __WXMSW__ - wxThePrintSetupData->SetPrinterCommand("print"); - wxThePrintSetupData->SetAFMPath("c:\\windows\\system\\"); - wxThePrintSetupData->SetPrinterOptions(NULL); -#endif -#if !defined(__VMS__) && !defined(__WXMSW__) - wxThePrintSetupData->SetPrinterCommand("lpr"); - wxThePrintSetupData->SetPrinterOptions((char *) NULL); - wxThePrintSetupData->SetAFMPath((char *) NULL); -#endif - } - else - { - if (wxThePrintSetupData) - delete wxThePrintSetupData; - wxThePrintSetupData = (wxPrintSetupData *) NULL; - } -} - -/* - * Paper size database for PostScript - */ - -wxPrintPaperType::wxPrintPaperType(const char *name, int wmm, int hmm, int wp, int hp) -{ - widthMM = wmm; - heightMM = hmm; - widthPixels = wp; - heightPixels = hp; - pageName = copystring(name); -} - -wxPrintPaperType::~wxPrintPaperType(void) -{ - delete[] pageName; -} - -wxPrintPaperDatabase::wxPrintPaperDatabase(void):wxList(wxKEY_STRING) -{ - DeleteContents(TRUE); -} - -wxPrintPaperDatabase::~wxPrintPaperDatabase(void) -{ -} - -void wxPrintPaperDatabase::CreateDatabase(void) -{ - // Need correct values for page size in pixels. - // Each unit is one 'point' = 1/72 of an inch. - // NOTE: WE NEED ALSO TO MAKE ADJUSTMENTS WHEN TRANSLATING - // in wxPostScriptDC code, so we can start from top left. - // So access this database and translate by appropriate number - // of points for this paper size. OR IS IT OK ALREADY? - // Can't remember where the PostScript origin is by default. - // Heck, someone will know how to make it hunky-dory... - // JACS 25/5/95 - - AddPaperType(_("A4 210 x 297 mm"), 210, 297, 595, 842); - AddPaperType(_("A3 297 x 420 mm"), 297, 420, 842, 1191); - AddPaperType(_("Letter 8 1/2 x 11 in"), 216, 279, 612, 791); - AddPaperType(_("Legal 8 1/2 x 14 in"), 216, 356, 612, 1009); -} - -void wxPrintPaperDatabase::ClearDatabase(void) -{ - Clear(); -} - -void wxPrintPaperDatabase::AddPaperType(const char *name, int wmm, int hmm, int wp, int hp) -{ - Append(name, new wxPrintPaperType(name, wmm, hmm, wp, hp)); -} - -wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(const char *name) -{ - wxNode *node = Find(name); - if (node) - return (wxPrintPaperType *)node->Data(); - else - return (wxPrintPaperType *) NULL; -} - -#endif diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp deleted file mode 100644 index 9a16bf0eff..0000000000 --- a/src/common/prntbase.cpp +++ /dev/null @@ -1,768 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: prntbase.cpp -// Purpose: Printing framework base class implementation -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "prntbase.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include "wx/defs.h" - -#ifdef __WXMSW__ -#define __GOOD_COMPILER__ -#endif - -#ifndef WX_PRECOMP -#include "wx/utils.h" -#include "wx/dc.h" -#include "wx/app.h" -#include "wx/msgdlg.h" -#include "wx/layout.h" -#include "wx/choice.h" -#include "wx/button.h" -#include "wx/settings.h" -#include "wx/dcmemory.h" -#include "wx/stattext.h" -#include "wx/intl.h" -#endif - -#include "wx/prntbase.h" -#include "wx/dcprint.h" -#include "wx/printdlg.h" - -#include -#include - -#ifdef __WXMSW__ -#include -#include - -// Clash with Windows header files -#ifdef StartDoc -#undef StartDoc -#endif - -#ifndef __WIN32__ -#include -#endif - -#endif - // End __WXMSW__ - -#if !USE_SHARED_LIBRARY -IMPLEMENT_CLASS(wxPrinterBase, wxObject) -IMPLEMENT_ABSTRACT_CLASS(wxPrintout, wxObject) -IMPLEMENT_CLASS(wxPreviewCanvas, wxWindow) -IMPLEMENT_CLASS(wxPreviewControlBar, wxWindow) -IMPLEMENT_CLASS(wxPreviewFrame, wxFrame) -IMPLEMENT_CLASS(wxPrintPreviewBase, wxObject) - -BEGIN_EVENT_TABLE(wxPrintAbortDialog, wxDialog) - EVT_BUTTON(wxID_CANCEL, wxPrintAbortDialog::OnCancel) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxPreviewCanvas, wxScrolledWindow) - EVT_PAINT(wxPreviewCanvas::OnPaint) - EVT_SYS_COLOUR_CHANGED(wxPreviewCanvas::OnSysColourChanged) -END_EVENT_TABLE() -#endif - -/* - * Printer - */ - -wxPrinterBase::wxPrinterBase(wxPrintData *data) -{ - m_currentPrintout = (wxPrintout *) NULL; - sm_abortWindow = (wxWindow *) NULL; - sm_abortIt = FALSE; - if (data) - m_printData = (*data); -} - -wxWindow *wxPrinterBase::sm_abortWindow = (wxWindow *) NULL; -bool wxPrinterBase::sm_abortIt = FALSE; - -wxPrinterBase::~wxPrinterBase() -{ -} - -void wxPrintAbortDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) -{ - wxPrinterBase::sm_abortIt = TRUE; - wxPrinterBase::sm_abortWindow->Show(FALSE); - wxPrinterBase::sm_abortWindow->Close(TRUE); - wxPrinterBase::sm_abortWindow = (wxWindow *) NULL; -} - -wxWindow *wxPrinterBase::CreateAbortWindow(wxWindow *parent, wxPrintout *WXUNUSED(printout)) -{ - wxPrintAbortDialog *dialog = new wxPrintAbortDialog(parent, _("Printing"), wxPoint(0, 0), wxSize(400, 400), wxDEFAULT_DIALOG_STYLE); - (void) new wxStaticText(dialog, -1, _("Please wait..."), wxPoint(5, 5)); - - wxButton *button = new wxButton(dialog, wxID_CANCEL, _("Cancel"), wxPoint(5, 30)); - - dialog->Fit(); - button->Centre(wxHORIZONTAL); - - dialog->Centre(); - return dialog; -} - -void wxPrinterBase::ReportError(wxWindow *parent, wxPrintout *WXUNUSED(printout), char *message) -{ - wxMessageBox(message, _("Printing Error"), wxOK, parent); -} - -/* - * Printout class - */ - -wxPrintout::wxPrintout(const wxString& title) -{ - m_printoutTitle = title ; - m_printoutDC = (wxDC *) NULL; - m_pageWidthMM = 0; - m_pageHeightMM = 0; - m_pageWidthPixels = 0; - m_pageHeightPixels = 0; - m_PPIScreenX = 0; - m_PPIScreenY = 0; - m_PPIPrinterX = 0; - m_PPIPrinterY = 0; - m_isPreview = FALSE; -} - -wxPrintout::~wxPrintout() -{ -} - -bool wxPrintout::OnBeginDocument(int WXUNUSED(startPage), int WXUNUSED(endPage)) -{ - return GetDC()->StartDoc(_("Printing")); -} - -void wxPrintout::OnEndDocument() -{ - GetDC()->EndDoc(); -} - -void wxPrintout::OnBeginPrinting() -{ -} - -void wxPrintout::OnEndPrinting() -{ -} - -bool wxPrintout::HasPage(int page) -{ - return (page == 1); -} - -void wxPrintout::GetPageInfo(int *minPage, int *maxPage, int *fromPage, int *toPage) -{ - *minPage = 1; - *maxPage = 32000; - *fromPage = 1; - *toPage = 1; -} - -/* - * Preview canvas - */ - -wxPreviewCanvas::wxPreviewCanvas(wxPrintPreviewBase *preview, wxWindow *parent, - const wxPoint& pos, const wxSize& size, long style, const wxString& name): - wxScrolledWindow(parent, -1, pos, size, style, name) -{ - m_printPreview = preview; - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE)); - - SetScrollbars(40, 40, 100, 100); -} - -wxPreviewCanvas::~wxPreviewCanvas() -{ -} - -void wxPreviewCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) -{ - wxPaintDC dc(this); - - if (m_printPreview) - { - m_printPreview->PaintPage(this, dc); - } -} - -// Responds to colour changes, and passes event on to children. -void wxPreviewCanvas::OnSysColourChanged(wxSysColourChangedEvent& event) -{ - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE)); - Refresh(); - - // Propagate the event to the non-top-level children - wxWindow::OnSysColourChanged(event); -} - -/* - * Preview control bar - */ - -BEGIN_EVENT_TABLE(wxPreviewControlBar, wxPanel) - EVT_BUTTON(wxID_PREVIEW_CLOSE, wxPreviewControlBar::OnClose) - EVT_BUTTON(wxID_PREVIEW_PRINT, wxPreviewControlBar::OnPrint) - EVT_BUTTON(wxID_PREVIEW_PREVIOUS, wxPreviewControlBar::OnPrevious) - EVT_BUTTON(wxID_PREVIEW_NEXT, wxPreviewControlBar::OnNext) - EVT_CHOICE(wxID_PREVIEW_ZOOM, wxPreviewControlBar::OnZoom) - EVT_PAINT(wxPreviewControlBar::OnPaint) -END_EVENT_TABLE() - -wxPreviewControlBar::wxPreviewControlBar(wxPrintPreviewBase *preview, long buttons, - wxWindow *parent, const wxPoint& pos, const wxSize& size, - long style, const wxString& name): - wxPanel(parent, -1, pos, size, style, name) -{ - m_printPreview = preview; - m_closeButton = (wxButton *) NULL; - m_nextPageButton = (wxButton *) NULL; - m_previousPageButton = (wxButton *) NULL; - m_printButton = (wxButton *) NULL; - m_zoomControl = (wxChoice *) NULL; - m_buttonFlags = buttons; -} - -wxPreviewControlBar::~wxPreviewControlBar() -{ -} - -void wxPreviewControlBar::OnPaint(wxPaintEvent& WXUNUSED(event)) -{ - wxPaintDC dc(this); - - int w, h; - GetSize(&w, &h); - dc.SetPen(*wxBLACK_PEN); - dc.SetBrush(*wxTRANSPARENT_BRUSH); - dc.DrawLine( 0, h-1, w, h-1 ); -} - -void wxPreviewControlBar::OnClose(wxCommandEvent& WXUNUSED(event)) -{ - wxPreviewFrame *frame = (wxPreviewFrame *)GetParent(); - frame->Close(TRUE); -} - -void wxPreviewControlBar::OnPrint(wxCommandEvent& WXUNUSED(event)) -{ - wxPrintPreviewBase *preview = GetPrintPreview(); - preview->Print(TRUE); -} - -void wxPreviewControlBar::OnNext(wxCommandEvent& WXUNUSED(event)) -{ - wxPrintPreviewBase *preview = GetPrintPreview(); - if (preview) - { - int currentPage = preview->GetCurrentPage(); - if ((preview->GetMaxPage() > 0) && - (currentPage < preview->GetMaxPage()) && - preview->GetPrintout()->HasPage(currentPage + 1)) - { - preview->SetCurrentPage(currentPage + 1); - } - } -} - -void wxPreviewControlBar::OnPrevious(wxCommandEvent& WXUNUSED(event)) -{ - wxPrintPreviewBase *preview = GetPrintPreview(); - if (preview) - { - int currentPage = preview->GetCurrentPage(); - if ((preview->GetMinPage() > 0) && - (currentPage > preview->GetMinPage()) && - preview->GetPrintout()->HasPage(currentPage - 1)) - { - preview->SetCurrentPage(currentPage - 1); - } - } -} - -void wxPreviewControlBar::OnZoom(wxCommandEvent& WXUNUSED(event)) -{ - int zoom = GetZoomControl(); - if (GetPrintPreview()) - GetPrintPreview()->SetZoom(zoom); -} - -void wxPreviewControlBar::CreateButtons() -{ -#ifdef __GOOD_COMPILER__ // Robert Roebling - - SetSize(0, 0, 400, 40); - -#ifdef __WXMSW__ - int fontSize = 9; -#else - int fontSize = 10; -#endif - - wxFont buttonFont(fontSize, wxSWISS, wxNORMAL, wxBOLD); - SetButtonFont(buttonFont); - - int buttonWidth = 65; - int buttonHeight = 24; - - int x = 5; - int y = 5; - int gap = 5; - - m_closeButton = new wxButton(this, wxID_PREVIEW_CLOSE, _("Close"), - wxPoint(x, y), wxSize(buttonWidth, buttonHeight)); - - x += gap + buttonWidth; - - if (m_buttonFlags & wxPREVIEW_PRINT) - { - m_printButton = new wxButton(this, wxID_PREVIEW_PRINT, _("Print..."), wxPoint(x, y), - wxSize(buttonWidth, buttonHeight)); - x += gap + buttonWidth; - } - - if (m_buttonFlags & wxPREVIEW_PREVIOUS) - { - m_previousPageButton = new wxButton(this, wxID_PREVIEW_PREVIOUS, "<<", wxPoint(x, y), - wxSize(buttonWidth, buttonHeight)); - x += gap + buttonWidth; - } - - if (m_buttonFlags & wxPREVIEW_NEXT) - { - m_nextPageButton = new wxButton(this, wxID_PREVIEW_NEXT, ">>", - wxPoint(x, y), wxSize(buttonWidth, buttonHeight)); - x += gap + buttonWidth; - } - - static wxString choices[] = { "10%", "20%", "25%", "30%", "35%", "40%", "45%", "50%", "55%", "60%", - "65%", "70%", "75%", "80%", "85%", "90%", "95%", "100%", "110%", "120%", "150%", "200%" }; - int n = 22; - if (m_buttonFlags & wxPREVIEW_ZOOM) - { - m_zoomControl = new wxChoice(this, wxID_PREVIEW_ZOOM, wxPoint(x, y), - wxSize(100, -1), n, (wxString *)choices); - SetZoomControl(m_printPreview->GetZoom()); - } - - m_closeButton->SetDefault(); - -#endif -} - -void wxPreviewControlBar::SetZoomControl(int zoom) -{ -#ifdef __GOOD_COMPILER__ // Robert Roebling - char buf[20]; - sprintf(buf, "%d%%", zoom); - if (m_zoomControl) - m_zoomControl->SetStringSelection(buf); -#endif -} - -int wxPreviewControlBar::GetZoomControl() -{ -#ifdef __GOOD_COMPILER__ // Robert Roebling - char buf[20]; - if (m_zoomControl && m_zoomControl->GetStringSelection()) - { - strcpy(buf, m_zoomControl->GetStringSelection()); - buf[strlen(buf) - 1] = 0; - return (int)atoi(buf); - } - else return 0; -#else - return 0; -#endif -} - - -/* - * Preview frame - */ - -wxPreviewFrame::wxPreviewFrame(wxPrintPreviewBase *preview, wxFrame *parent, const wxString& title, - const wxPoint& pos, const wxSize& size, long style, const wxString& name): - wxFrame(parent, -1, title, pos, size, style, name) -{ -#ifdef __GOOD_COMPILER__ // Robert Roebling - m_printPreview = preview; - m_controlBar = NULL; - m_previewCanvas = NULL; -#endif -} - -wxPreviewFrame::~wxPreviewFrame() -{ -} - -bool wxPreviewFrame::OnClose() -{ -#ifdef __GOOD_COMPILER__ // Robert Roebling - - MakeModal(FALSE); - - // Need to delete the printout and the print preview - wxPrintout *printout = m_printPreview->GetPrintout(); - if (printout) - { - delete printout; - m_printPreview->SetPrintout(NULL); - m_printPreview->SetCanvas(NULL); - m_printPreview->SetFrame(NULL); - } - delete m_printPreview; - return TRUE; -#else - return FALSE; -#endif -} - -void wxPreviewFrame::Initialize() -{ - -#ifdef __GOOD_COMPILER__ // Robert Roebling - - CreateStatusBar(); - - CreateCanvas(); - CreateControlBar(); - - m_printPreview->SetCanvas(m_previewCanvas); - m_printPreview->SetFrame(this); - - // Set layout constraints here - - // Control bar constraints - wxLayoutConstraints *c1 = new wxLayoutConstraints; -// int w, h; -// m_controlBar->GetSize(&w, &h); - int h; -#ifdef __WXMSW__ - h = 40; -#else - h = 60; -#endif - - c1->left.SameAs (this, wxLeft); - c1->top.SameAs (this, wxTop); - c1->right.SameAs (this, wxRight); - c1->height.Absolute (h); - - m_controlBar->SetConstraints(c1); - - // Canvas constraints - wxLayoutConstraints *c2 = new wxLayoutConstraints; - - c2->left.SameAs (this, wxLeft); - c2->top.Below (m_controlBar); - c2->right.SameAs (this, wxRight); - c2->bottom.SameAs (this, wxBottom); - - m_previewCanvas->SetConstraints(c2); - - SetAutoLayout(TRUE); - - MakeModal(TRUE); - - Layout(); - -#endif -} - -void wxPreviewFrame::CreateCanvas() -{ -#ifdef __GOOD_COMPILER__ // Robert Roebling - - m_previewCanvas = new wxPreviewCanvas(m_printPreview, this); - -#endif -} - -void wxPreviewFrame::CreateControlBar() -{ -#ifdef __GOOD_COMPILER__ // Robert Roebling - - long buttons = wxPREVIEW_DEFAULT; - if (m_printPreview->GetPrintoutForPrinting()) - buttons |= wxPREVIEW_PRINT; - - m_controlBar = new wxPreviewControlBar(m_printPreview, buttons, this, wxPoint(0, 0), wxSize(400, 40)); - m_controlBar->CreateButtons(); -#endif -} - -/* - * Print preview - */ - -wxPrintPreviewBase::wxPrintPreviewBase(wxPrintout *printout, wxPrintout *printoutForPrinting, wxPrintData *data) -{ - -#ifdef __GOOD_COMPILER__ // Robert Roebling - - m_isOk = TRUE; - m_previewPrintout = printout; - if (m_previewPrintout) - m_previewPrintout->SetIsPreview(TRUE); - - m_printPrintout = printoutForPrinting; - if (data) - m_printData = (*data); - - m_previewCanvas = NULL; - m_previewFrame = NULL; - m_previewBitmap = NULL; - m_currentPage = 1; - m_currentZoom = 30; - m_topMargin = 40; - m_leftMargin = 40; - m_pageWidth = 0; - m_pageHeight = 0; - - printout->OnPreparePrinting(); - - // Get some parameters from the printout, if defined - int selFrom, selTo; - printout->GetPageInfo(&m_minPage, &m_maxPage, &selFrom, &selTo); - -#endif -} - -wxPrintPreviewBase::~wxPrintPreviewBase() -{ -#ifdef __GOOD_COMPILER__ // Robert Roebling - - if (m_previewPrintout) - delete m_previewPrintout; - if (m_previewBitmap) - delete m_previewBitmap; - if (m_printPrintout) - delete m_printPrintout; - -#endif -} - -bool wxPrintPreviewBase::SetCurrentPage(int pageNum) -{ -#ifdef __GOOD_COMPILER__ // Robert Roebling - if (m_currentPage == pageNum) - return TRUE; - - m_currentPage = pageNum; - if (m_previewBitmap) - { - delete m_previewBitmap; - m_previewBitmap = NULL; - } - - if (m_previewCanvas) - { - RenderPage(pageNum); - m_previewCanvas->Refresh(); - } - -#endif - return TRUE; -} - -bool wxPrintPreviewBase::PaintPage(wxWindow *canvas, wxDC& dc) -{ - -#ifdef __GOOD_COMPILER__ // Robert Roebling - - DrawBlankPage(canvas, dc); - - if (!m_previewBitmap) - RenderPage(m_currentPage); - - if (!m_previewBitmap) - return FALSE; - - if (!canvas) - return FALSE; - - int canvasWidth, canvasHeight; - canvas->GetSize(&canvasWidth, &canvasHeight); - - double zoomScale = ((float)m_currentZoom/(float)100); - double actualWidth = (zoomScale*m_pageWidth*m_previewScale); -// float actualHeight = (float)(zoomScale*m_pageHeight*m_previewScale); - - int x = ((canvasWidth - actualWidth)/2.0); - if (x < m_leftMargin) - x = m_leftMargin; - int y = m_topMargin; - - wxMemoryDC temp_dc; - temp_dc.SelectObject(*m_previewBitmap); - - dc.Blit(x, y, m_previewBitmap->GetWidth(), m_previewBitmap->GetHeight(), &temp_dc, 0, 0); - - temp_dc.SelectObject(wxNullBitmap); - -#endif - - return TRUE; -} - -bool wxPrintPreviewBase::RenderPage(int pageNum) -{ - int canvasWidth, canvasHeight; - -#ifdef __GOOD_COMPILER__ // Robert Roebling - - if (!m_previewCanvas) - { - wxMessageBox(_("wxPrintPreviewBase::RenderPage: must use wxPrintPreviewBase::SetCanvas to let me know about the canvas!"), - _("Print Preview Failure"), wxOK); - return FALSE; - } - m_previewCanvas->GetSize(&canvasWidth, &canvasHeight); - - double zoomScale = (m_currentZoom/100.0); - int actualWidth = (int)(zoomScale*m_pageWidth*m_previewScale); - int actualHeight = (int)(zoomScale*m_pageHeight*m_previewScale); - - int x = (int)((canvasWidth - actualWidth)/2.0); - if (x < m_leftMargin) - x = m_leftMargin; -// int y = m_topMargin; - - - if (!m_previewBitmap) - { - m_previewBitmap = new wxBitmap((int)actualWidth, (int)actualHeight); - if (!m_previewBitmap || !m_previewBitmap->Ok()) - { - if (m_previewBitmap) - delete m_previewBitmap; - wxMessageBox(_("Sorry, not enough memory to create a preview."), _("Print Preview Failure"), wxOK); - return FALSE; - } - } - - wxMemoryDC memoryDC; - memoryDC.SelectObject(*m_previewBitmap); - - memoryDC.Clear(); - - m_previewPrintout->SetDC(&memoryDC); - m_previewPrintout->SetPageSizePixels(m_pageWidth, m_pageHeight); - - m_previewPrintout->OnBeginPrinting(); - - - if (!m_previewPrintout->OnBeginDocument(m_printData.GetFromPage(), m_printData.GetToPage())) - { - wxMessageBox(_("Could not start document preview."), _("Print Preview Failure"), wxOK); - - memoryDC.SelectObject(wxNullBitmap); - - delete m_previewBitmap; - return FALSE; - } - - m_previewPrintout->OnPrintPage(pageNum); - m_previewPrintout->OnEndDocument(); - m_previewPrintout->OnEndPrinting(); - - m_previewPrintout->SetDC(NULL); - - memoryDC.SelectObject(wxNullBitmap); -#endif - - char buf[200]; - if (m_maxPage != 0) - sprintf(buf, _("Page %d of %d"), pageNum, m_maxPage); - else - sprintf(buf, _("Page %d"), pageNum); - - if (m_previewFrame) - m_previewFrame->SetStatusText(buf); - - return TRUE; -} - - -bool wxPrintPreviewBase::DrawBlankPage(wxWindow *canvas, wxDC& dc) -{ - -#ifdef __GOOD_COMPILER__ // Robert Roebling - - int canvasWidth, canvasHeight; - canvas->GetSize(&canvasWidth, &canvasHeight); - - float zoomScale = (float)((float)m_currentZoom/(float)100); - float actualWidth = zoomScale*m_pageWidth*m_previewScale; - float actualHeight = zoomScale*m_pageHeight*m_previewScale; - - float x = (float)((canvasWidth - actualWidth)/2.0); - if (x < m_leftMargin) - x = (float)m_leftMargin; - float y = (float)m_topMargin; - - // Draw shadow, allowing for 1-pixel border AROUND the actual page - int shadowOffset = 4; - dc.SetPen(*wxBLACK_PEN); - dc.SetBrush(*wxBLACK_BRUSH); - dc.DrawRectangle(x-1 + shadowOffset, y-1 + shadowOffset, actualWidth+2, actualHeight+2); - - // Draw blank page allowing for 1-pixel border AROUND the actual page - dc.SetPen(*wxBLACK_PEN); - dc.SetBrush(*wxWHITE_BRUSH); - - - dc.DrawRectangle(x-1, y-1, actualWidth+2, actualHeight+2); - -#endif - - return TRUE; -} - -void wxPrintPreviewBase::SetZoom(int percent) -{ -#ifdef __GOOD_COMPILER__ // Robert Roebling - if (m_currentZoom == percent) - return; - - m_currentZoom = percent; - if (m_previewBitmap) - { - delete m_previewBitmap; - m_previewBitmap = NULL; - } - RenderPage(m_currentPage); - - if (m_previewCanvas) - { - m_previewCanvas->Clear(); - m_previewCanvas->Refresh(); - } -#endif - -} diff --git a/src/common/process.cpp b/src/common/process.cpp deleted file mode 100644 index d1c255ac95..0000000000 --- a/src/common/process.cpp +++ /dev/null @@ -1,57 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: process.cpp -// Purpose: Process termination classes -// Author: Guilhem Lavaux -// Modified by: -// Created: 24/06/98 -// RCS-ID: $Id$ -// Copyright: (c) Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "process.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#endif - -#include "wx/process.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxProcess, wxEvtHandler) -IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent, wxEvent) -#endif - -wxProcess::wxProcess(wxEvtHandler *parent, int id) -{ - if (parent) - SetPreviousHandler(parent); - - m_id = id; -} - -wxProcess::~wxProcess() -{ -} - -void wxProcess::OnTerminate(int pid) -{ - wxProcessEvent event(m_id, pid); - - ProcessEvent(event); -} - -wxProcessEvent::wxProcessEvent(int id, int pid): - wxEvent(id), m_pid(pid) -{ -} - diff --git a/src/common/resource.cpp b/src/common/resource.cpp deleted file mode 100644 index 5cda920f99..0000000000 --- a/src/common/resource.cpp +++ /dev/null @@ -1,2941 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: resource.cpp -// Purpose: Resource system -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "resource.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#include "wx/setup.h" -#include "wx/list.h" -#include "wx/hash.h" -#include "wx/gdicmn.h" -#include "wx/utils.h" -#include "wx/types.h" -#include "wx/menu.h" -#include "wx/stattext.h" -#include "wx/button.h" -#include "wx/bmpbuttn.h" -#include "wx/radiobox.h" -#include "wx/listbox.h" -#include "wx/choice.h" -#include "wx/checkbox.h" -#include "wx/slider.h" -#include "wx/statbox.h" -#if USE_GAUGE -#include "wx/gauge.h" -#endif -#include "wx/textctrl.h" -#include "wx/msgdlg.h" -#include "wx/intl.h" -#endif - -#if USE_SCROLLBAR -#include "wx/scrolbar.h" -#endif - -#if USE_COMBOBOX -#include "wx/combobox.h" -#endif - -#include "wx/validate.h" - -#include "wx/log.h" - -#if USE_WX_RESOURCES - -#include -#include -#include -#include - -#include "wx/resource.h" -#include "wx/string.h" -#include "wx/wxexpr.h" - -// Forward (private) declarations -bool wxResourceInterpretResources(wxResourceTable& table, PrologDatabase& db); -wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, PrologExpr *expr, bool isPanel = FALSE); -wxItemResource *wxResourceInterpretControl(wxResourceTable& table, PrologExpr *expr); -wxItemResource *wxResourceInterpretMenu(wxResourceTable& table, PrologExpr *expr); -wxItemResource *wxResourceInterpretMenuBar(wxResourceTable& table, PrologExpr *expr); -wxItemResource *wxResourceInterpretString(wxResourceTable& table, PrologExpr *expr); -wxItemResource *wxResourceInterpretBitmap(wxResourceTable& table, PrologExpr *expr); -wxItemResource *wxResourceInterpretIcon(wxResourceTable& table, PrologExpr *expr); -// Interpret list expression -wxFont *wxResourceInterpretFontSpec(PrologExpr *expr); - -bool wxResourceReadOneResource(FILE *fd, PrologDatabase& db, bool *eof, wxResourceTable *table = (wxResourceTable *) NULL); -bool wxResourceParseIncludeFile(char *f, wxResourceTable *table = (wxResourceTable *) NULL); - -wxResourceTable *wxDefaultResourceTable = (wxResourceTable *) NULL; - -static char *wxResourceBuffer = (char *) NULL; -static long wxResourceBufferSize = 0; -static long wxResourceBufferCount = 0; -static int wxResourceStringPtr = 0; - -void wxInitializeResourceSystem(void) -{ - wxDefaultResourceTable = new wxResourceTable; -} - -void wxCleanUpResourceSystem(void) -{ - delete wxDefaultResourceTable; - if (wxResourceBuffer) - delete[] wxResourceBuffer; -} - -void wxLogWarning(char *msg) -{ - wxMessageBox(msg, _("Warning"), wxOK); -} - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxItemResource, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxResourceTable, wxHashTable) -#endif - -wxItemResource::wxItemResource(void) -{ - itemType = (char *) NULL; - title = (char *) NULL; - name = (char *) NULL; - windowStyle = 0; - x = y = width = height = 0; - value1 = value2 = value3 = value5 = 0; - value4 = (char *) NULL; - stringValues = (wxStringList *) NULL; - bitmap = (wxBitmap *) NULL; - backgroundColour = labelColour = buttonColour = (wxColour *) NULL; - windowFont = (wxFont *) NULL; - m_windowId = 0; -} - -wxItemResource::~wxItemResource(void) -{ - if (itemType) delete[] itemType; - if (title) delete[] title; - if (name) delete[] name; - if (value4) delete[] value4; - if (stringValues) - delete stringValues; - if (bitmap) - delete bitmap; - if (backgroundColour) - delete backgroundColour; - if (labelColour) - delete labelColour; - if (buttonColour) - delete buttonColour; - wxNode *node = children.First(); - while (node) - { - wxItemResource *item = (wxItemResource *)node->Data(); - delete item; - delete node; - node = children.First(); - } -} - -void wxItemResource::SetTitle(char *t) -{ - if (t == title) - return; - - if (title) delete[] title; - if (t) - title = copystring(t); - else - title = (char *) NULL; -} - -void wxItemResource::SetType(char *t) -{ - if (itemType == t) - return; - - if (itemType) delete[] itemType; - if (t) - itemType = copystring(t); - else - itemType = (char *) NULL; -} - -void wxItemResource::SetName(char *n) -{ - if (n == name) - return; - - if (name) delete[] name; - if (n) - name = copystring(n); - else - name = (char *) NULL; -} - -void wxItemResource::SetStringValues(wxStringList *svalues) -{ - if (stringValues) - delete stringValues; - if (svalues) - stringValues = svalues; - else - stringValues = (wxStringList *) NULL; -} - -void wxItemResource::SetValue4(char *v) -{ - if (value4 == v) - return; - - if (value4) delete[] value4; - if (v) - value4 = copystring(v); - else - value4 = (char *) NULL; -} - -/* - * Resource table - */ - -wxResourceTable::wxResourceTable(void):wxHashTable(wxKEY_STRING), identifiers(wxKEY_STRING) -{ -} - -wxResourceTable::~wxResourceTable(void) -{ - ClearTable(); -} - -wxItemResource *wxResourceTable::FindResource(const wxString& name) const -{ - wxItemResource *item = (wxItemResource *)Get((char *)(const char *)name); - return item; -} - -void wxResourceTable::AddResource(wxItemResource *item) -{ - char *name = item->GetName(); - if (!name) - name = item->GetTitle(); - if (!name) - name = "no name"; - - // Delete existing resource, if any. - Delete(name); - - Put(name, item); -} - -bool wxResourceTable::DeleteResource(const wxString& name) -{ - wxItemResource *item = (wxItemResource *)Delete((char *)(const char *)name); - if (item) - { - // See if any resource has this as its child; if so, delete from - // parent's child list. - BeginFind(); - wxNode *node = (wxNode *) NULL; - while ((node = Next())) - { - wxItemResource *parent = (wxItemResource *)node->Data(); - if (parent->GetChildren().Member(item)) - { - parent->GetChildren().DeleteObject(item); - break; - } - } - - delete item; - return TRUE; - } - else - return FALSE; -} - -bool wxResourceTable::ParseResourceFile(char *filename) -{ - PrologDatabase db; - - FILE *fd = fopen(filename, "r"); - if (!fd) - return FALSE; - bool eof = FALSE; - while (wxResourceReadOneResource(fd, db, &eof, this) && !eof) - { - // Loop - } - fclose(fd); - return wxResourceInterpretResources(*this, db); -} - -bool wxResourceTable::ParseResourceData(char *data) -{ - PrologDatabase db; - if (!db.ReadPrologFromString(data)) - { - wxLogWarning(_("Ill-formed resource file syntax.")); - return FALSE; - } - - return wxResourceInterpretResources(*this, db); -} - -bool wxResourceTable::RegisterResourceBitmapData(char *name, char bits[], int width, int height) -{ - // Register pre-loaded bitmap data - wxItemResource *item = new wxItemResource; -// item->SetType(wxRESOURCE_TYPE_XBM_DATA); - item->SetType("wxXBMData"); - item->SetName(name); - item->SetValue1((long)bits); - item->SetValue2((long)width); - item->SetValue3((long)height); - AddResource(item); - return TRUE; -} - -bool wxResourceTable::RegisterResourceBitmapData(char *name, char **data) -{ - // Register pre-loaded bitmap data - wxItemResource *item = new wxItemResource; -// item->SetType(wxRESOURCE_TYPE_XPM_DATA); - item->SetType("wxXPMData"); - item->SetName(name); - item->SetValue1((long)data); - AddResource(item); - return TRUE; -} - -bool wxResourceTable::SaveResource(char *WXUNUSED(filename)) -{ - return FALSE; -} - -void wxResourceTable::ClearTable(void) -{ - BeginFind(); - wxNode *node = Next(); - while (node) - { - wxNode *next = Next(); - wxItemResource *item = (wxItemResource *)node->Data(); - delete item; - delete node; - node = next; - } -} - -wxControl *wxResourceTable::CreateItem(wxWindow *parent, wxItemResource *childResource) const -{ - int id = childResource->GetId(); - if ( id == 0 ) - id = -1; - - wxControl *control = (wxControl *) NULL; - wxString itemType(childResource->GetType()); - if (itemType == wxString("wxButton") || itemType == wxString("wxBitmapButton")) - { - if (childResource->GetValue4()) - { - // Bitmap button - wxBitmap *bitmap = childResource->GetBitmap(); - if (!bitmap) - { - bitmap = wxResourceCreateBitmap(childResource->GetValue4(), (wxResourceTable *)this); - childResource->SetBitmap(bitmap); - } - if (bitmap) - control = new wxBitmapButton(parent, id, *bitmap, - wxPoint(childResource->GetX(), childResource->GetY()), - wxSize(childResource->GetWidth(), childResource->GetHeight()), - childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); - } - else - // Normal, text button - control = new wxButton(parent, id, childResource->GetTitle(), - wxPoint(childResource->GetX(), childResource->GetY()), - wxSize(childResource->GetWidth(), childResource->GetHeight()), - childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); - } - else if (itemType == wxString("wxMessage") || itemType == wxString("wxStaticText") || - itemType == wxString("wxStaticBitmap")) - { - if (childResource->GetValue4()) - { - // Bitmap message - wxBitmap *bitmap = childResource->GetBitmap(); - if (!bitmap) - { - bitmap = wxResourceCreateBitmap(childResource->GetValue4(), (wxResourceTable *)this); - childResource->SetBitmap(bitmap); - } -#if USE_BITMAP_MESSAGE - if (bitmap) - control = new wxStaticBitmap(parent, id, *bitmap, - wxPoint(childResource->GetX(), childResource->GetY()), - wxSize(childResource->GetWidth(), childResource->GetHeight()), - childResource->GetStyle(), childResource->GetName()); -#endif - } - else - { - control = new wxStaticText(parent, id, childResource->GetTitle(), - wxPoint(childResource->GetX(), childResource->GetY()), - wxSize(childResource->GetWidth(), childResource->GetHeight()), - childResource->GetStyle(), childResource->GetName()); - } - } - else if (itemType == wxString("wxText") || itemType == wxString("wxTextCtrl") || itemType == wxString("wxMultiText")) - { - control = new wxTextCtrl(parent, id, childResource->GetValue4(), - wxPoint(childResource->GetX(), childResource->GetY()), - wxSize(childResource->GetWidth(), childResource->GetHeight()), - childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); - } - else if (itemType == wxString("wxCheckBox")) - { - control = new wxCheckBox(parent, id, childResource->GetTitle(), - wxPoint(childResource->GetX(), childResource->GetY()), - wxSize(childResource->GetWidth(), childResource->GetHeight()), - childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); - - ((wxCheckBox *)control)->SetValue((childResource->GetValue1() != 0)); - } -#if USE_GAUGE - else if (itemType == wxString("wxGauge")) - { - control = new wxGauge(parent, id, (int)childResource->GetValue2(), - wxPoint(childResource->GetX(), childResource->GetY()), - wxSize(childResource->GetWidth(), childResource->GetHeight()), - childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); - - ((wxGauge *)control)->SetValue((int)childResource->GetValue1()); - } -#endif -#if USE_RADIOBUTTON - else if (itemType == wxString("wxRadioButton")) - { - control = new wxRadioButton(parent, id, childResource->GetTitle(), // (int)childResource->GetValue1(), - wxPoint(childResource->GetX(), childResource->GetY()), - wxSize(childResource->GetWidth(), childResource->GetHeight()), - childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); - } -#endif -#if USE_SCROLLBAR - else if (itemType == wxString("wxScrollBar")) - { - control = new wxScrollBar(parent, id, - wxPoint(childResource->GetX(), childResource->GetY()), - wxSize(childResource->GetWidth(), childResource->GetHeight()), - childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); - ((wxScrollBar *)control)->SetValue((int)childResource->GetValue1()); - ((wxScrollBar *)control)->SetPageSize((int)childResource->GetValue2()); - ((wxScrollBar *)control)->SetObjectLength((int)childResource->GetValue3()); - ((wxScrollBar *)control)->SetViewLength((int)(long)childResource->GetValue5()); - } -#endif - else if (itemType == wxString("wxSlider")) - { - control = new wxSlider(parent, id, (int)childResource->GetValue1(), - (int)childResource->GetValue2(), (int)childResource->GetValue3(), - wxPoint(childResource->GetX(), childResource->GetY()), - wxSize(childResource->GetWidth(), childResource->GetHeight()), - childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); - } - else if (itemType == wxString("wxGroupBox") || itemType == wxString("wxStaticBox")) - { - control = new wxStaticBox(parent, id, childResource->GetTitle(), - wxPoint(childResource->GetX(), childResource->GetY()), - wxSize(childResource->GetWidth(), childResource->GetHeight()), - childResource->GetStyle(), childResource->GetName()); - } - else if (itemType == wxString("wxListBox")) - { - wxStringList *stringList = childResource->GetStringValues(); - wxString *strings = (wxString *) NULL; - int noStrings = 0; - if (stringList && (stringList->Number() > 0)) - { - noStrings = stringList->Number(); - strings = new wxString[noStrings]; - wxNode *node = stringList->First(); - int i = 0; - while (node) - { - strings[i] = (char *)node->Data(); - i ++; - node = node->Next(); - } - } - control = new wxListBox(parent, id, - wxPoint(childResource->GetX(), childResource->GetY()), - wxSize(childResource->GetWidth(), childResource->GetHeight()), - noStrings, strings, childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); - - if (strings) - delete[] strings; - } - else if (itemType == wxString("wxChoice")) - { - wxStringList *stringList = childResource->GetStringValues(); - wxString *strings = (wxString *) NULL; - int noStrings = 0; - if (stringList && (stringList->Number() > 0)) - { - noStrings = stringList->Number(); - strings = new wxString[noStrings]; - wxNode *node = stringList->First(); - int i = 0; - while (node) - { - strings[i] = (char *)node->Data(); - i ++; - node = node->Next(); - } - } - control = new wxChoice(parent, id, - wxPoint(childResource->GetX(), childResource->GetY()), - wxSize(childResource->GetWidth(), childResource->GetHeight()), - noStrings, strings, childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); - - if (strings) - delete[] strings; - } -#if USE_COMBOBOX - else if (itemType == wxString("wxComboBox")) - { - wxStringList *stringList = childResource->GetStringValues(); - wxString *strings = (wxString *) NULL; - int noStrings = 0; - if (stringList && (stringList->Number() > 0)) - { - noStrings = stringList->Number(); - strings = new wxString[noStrings]; - wxNode *node = stringList->First(); - int i = 0; - while (node) - { - strings[i] = (char *)node->Data(); - i ++; - node = node->Next(); - } - } - control = new wxComboBox(parent, id, childResource->GetValue4(), - wxPoint(childResource->GetX(), childResource->GetY()), - wxSize(childResource->GetWidth(), childResource->GetHeight()), - noStrings, strings, childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); - - if (strings) - delete[] strings; - } -#endif - else if (itemType == wxString("wxRadioBox")) - { - wxStringList *stringList = childResource->GetStringValues(); - wxString *strings = (wxString *) NULL; - int noStrings = 0; - if (stringList && (stringList->Number() > 0)) - { - noStrings = stringList->Number(); - strings = new wxString[noStrings]; - wxNode *node = stringList->First(); - int i = 0; - while (node) - { - strings[i] = (char *)node->Data(); - i ++; - node = node->Next(); - } - } - control = new wxRadioBox(parent, (wxWindowID) id, wxString(childResource->GetTitle()), - wxPoint(childResource->GetX(), childResource->GetY()), - wxSize(childResource->GetWidth(), childResource->GetHeight()), - noStrings, strings, (int)childResource->GetValue1(), childResource->GetStyle(), wxDefaultValidator, - childResource->GetName()); - - if (strings) - delete[] strings; - } - - if (control && childResource->GetFont()) - control->SetFont(*childResource->GetFont()); - return control; -} - -/* - * Interpret database as a series of resources - */ - -bool wxResourceInterpretResources(wxResourceTable& table, PrologDatabase& db) -{ - wxNode *node = db.First(); - while (node) - { - PrologExpr *clause = (PrologExpr *)node->Data(); - wxString functor(clause->Functor()); - - wxItemResource *item = (wxItemResource *) NULL; - if (functor == "dialog") - item = wxResourceInterpretDialog(table, clause); - else if (functor == "panel") - item = wxResourceInterpretDialog(table, clause, TRUE); - else if (functor == "menubar") - item = wxResourceInterpretMenuBar(table, clause); - else if (functor == "menu") - item = wxResourceInterpretMenu(table, clause); - else if (functor == "string") - item = wxResourceInterpretString(table, clause); - else if (functor == "bitmap") - item = wxResourceInterpretBitmap(table, clause); - else if (functor == "icon") - item = wxResourceInterpretIcon(table, clause); - - if (item) - { - // Remove any existing resource of same name - if (item->GetName()) - table.DeleteResource(item->GetName()); - table.AddResource(item); - } - node = node->Next(); - } - return TRUE; -} - -static char *g_ValidControlClasses[] = { "wxButton", "wxBitmapButton", "wxMessage", - "wxStaticText", "wxStaticBitmap", "wxText", "wxTextCtrl", "wxMultiText", - "wxListBox", "wxRadioBox", "wxRadioButton", "wxCheckBox", "wxBitmapCheckBox", - "wxGroupBox", "wxStaticBox", "wxSlider", "wxGauge", "wxScrollBar", - "wxChoice", "wxComboBox" } ; -static int g_ValidControlClassesCount = sizeof(g_ValidControlClasses) / sizeof(char *) ; - -static bool wxIsValidControlClass(const wxString& c) -{ - int i; - for ( i = 0; i < g_ValidControlClassesCount; i++) - { - if ( c == g_ValidControlClasses[i] ) - return TRUE; - } - return FALSE; -} - -wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, PrologExpr *expr, bool isPanel) -{ - wxItemResource *dialogItem = new wxItemResource; - if (isPanel) - dialogItem->SetType("wxPanel"); - else - dialogItem->SetType("wxDialog"); - char *style = (char *) NULL; - char *title = (char *) NULL; - char *name = (char *) NULL; - char *backColourHex = (char *) NULL; - char *labelColourHex = (char *) NULL; - char *buttonColourHex = (char *) NULL; - - long windowStyle = wxDEFAULT_DIALOG_STYLE; - if (isPanel) - windowStyle = 0; - - int x = 0; int y = 0; int width = -1; int height = -1; - int isModal = 0; - PrologExpr *labelFontExpr = (PrologExpr *) NULL; - PrologExpr *buttonFontExpr = (PrologExpr *) NULL; - PrologExpr *fontExpr = (PrologExpr *) NULL; - expr->AssignAttributeValue("style", &style); - expr->AssignAttributeValue("name", &name); - expr->AssignAttributeValue("title", &title); - expr->AssignAttributeValue("x", &x); - expr->AssignAttributeValue("y", &y); - expr->AssignAttributeValue("width", &width); - expr->AssignAttributeValue("height", &height); - expr->AssignAttributeValue("modal", &isModal); - expr->AssignAttributeValue("label_font", &labelFontExpr); - expr->AssignAttributeValue("button_font", &buttonFontExpr); - expr->AssignAttributeValue("font", &fontExpr); - expr->AssignAttributeValue("background_colour", &backColourHex); - expr->AssignAttributeValue("label_colour", &labelColourHex); - expr->AssignAttributeValue("button_colour", &buttonColourHex); - - long id = 0; - expr->GetAttributeValue("id", id); - dialogItem->SetId(id); - - if (style) - { - windowStyle = wxParseWindowStyle(style); - } - dialogItem->SetStyle(windowStyle); - dialogItem->SetValue1(isModal); - if (name) - dialogItem->SetName(name); - if (title) - dialogItem->SetTitle(title); - dialogItem->SetSize(x, y, width, height); - - if (backColourHex) - { - int r = 0; - int g = 0; - int b = 0; - r = wxHexToDec(backColourHex); - g = wxHexToDec(backColourHex+2); - b = wxHexToDec(backColourHex+4); - dialogItem->SetBackgroundColour(new wxColour((unsigned char)r,(unsigned char)g,(unsigned char)b)); - delete[] backColourHex; - } - if (labelColourHex) - { - int r = 0; - int g = 0; - int b = 0; - r = wxHexToDec(labelColourHex); - g = wxHexToDec(labelColourHex+2); - b = wxHexToDec(labelColourHex+4); - dialogItem->SetLabelColour(new wxColour((unsigned char)r,(unsigned char)g,(unsigned char)b)); - delete[] labelColourHex; - } - if (buttonColourHex) - { - int r = 0; - int g = 0; - int b = 0; - r = wxHexToDec(buttonColourHex); - g = wxHexToDec(buttonColourHex+2); - b = wxHexToDec(buttonColourHex+4); - dialogItem->SetButtonColour(new wxColour((unsigned char)r,(unsigned char)g,(unsigned char)b)); - delete[] buttonColourHex; - } - - if (name) - delete[] name; - if (title) - delete[] title; - if (style) - delete[] style; - - if (fontExpr) - dialogItem->SetFont(wxResourceInterpretFontSpec(fontExpr)); - else if (buttonFontExpr) - dialogItem->SetFont(wxResourceInterpretFontSpec(buttonFontExpr)); - else if (labelFontExpr) - dialogItem->SetFont(wxResourceInterpretFontSpec(labelFontExpr)); - - // Now parse all controls - PrologExpr *controlExpr = expr->GetFirst(); - while (controlExpr) - { - if (controlExpr->Number() == 3) - { - wxString controlKeyword(controlExpr->Nth(1)->StringValue()); - if (controlKeyword != "" && controlKeyword == "control") - { - // The value part: always a list. - PrologExpr *listExpr = controlExpr->Nth(2); - if (listExpr->Type() == PrologList) - { - wxItemResource *controlItem = wxResourceInterpretControl(table, listExpr); - if (controlItem) - { - dialogItem->GetChildren().Append(controlItem); - } - } - } - } - controlExpr = controlExpr->GetNext(); - } - return dialogItem; -} - -wxItemResource *wxResourceInterpretControl(wxResourceTable& table, PrologExpr *expr) -{ - wxItemResource *controlItem = new wxItemResource; - - // First, find the standard features of a control definition: - // [optional integer/string id], control name, title, style, name, x, y, width, height - - wxString controlType; - wxString style; - wxString title; - wxString name; - int id = 0; - long windowStyle = 0; - int x = 0; int y = 0; int width = -1; int height = -1; - int count = 0; - - PrologExpr *expr1 = expr->Nth(0); - - if ( expr1->Type() == PrologString || expr1->Type() == PrologWord ) - { - if ( wxIsValidControlClass(expr1->StringValue()) ) - { - count = 1; - controlType = expr1->StringValue(); - } - else - { - wxString str(expr1->StringValue()); - id = wxResourceGetIdentifier(WXSTRINGCAST str, &table); - if (id == 0) - { - wxLogWarning(_("Could not resolve control class or id '%s'. " - "Use (non-zero) integer instead\n or provide #define " - "(see manual for caveats)"), - (const char*) expr1->StringValue()); - delete controlItem; - return (wxItemResource *) NULL; - } - else - { - // Success - we have an id, so the 2nd element must be the control class. - controlType = expr->Nth(1)->StringValue(); - count = 2; - } - } - } - else if (expr1->Type() == PrologInteger) - { - id = (int)expr1->IntegerValue(); - // Success - we have an id, so the 2nd element must be the control class. - controlType = expr->Nth(1)->StringValue(); - count = 2; - } - - expr1 = expr->Nth(count); - count ++; - if ( expr1 ) - title = expr1->StringValue(); - - expr1 = expr->Nth(count); - count ++; - if (expr1) - { - style = expr1->StringValue(); - windowStyle = wxParseWindowStyle(WXSTRINGCAST style); - } - - expr1 = expr->Nth(count); - count ++; - if (expr1) - name = expr1->StringValue(); - - expr1 = expr->Nth(count); - count ++; - if (expr1) - x = (int)expr1->IntegerValue(); - - expr1 = expr->Nth(count); - count ++; - if (expr1) - y = (int)expr1->IntegerValue(); - - expr1 = expr->Nth(count); - count ++; - if (expr1) - width = (int)expr1->IntegerValue(); - - expr1 = expr->Nth(count); - count ++; - if (expr1) - height = (int)expr1->IntegerValue(); - - controlItem->SetStyle(windowStyle); - controlItem->SetName(WXSTRINGCAST name); - controlItem->SetTitle(WXSTRINGCAST title); - controlItem->SetSize(x, y, width, height); - controlItem->SetType(WXSTRINGCAST controlType); - controlItem->SetId(id); - - if (controlType == "wxButton") - { - // Check for bitmap resource name - if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord))) - { - wxString str(expr->Nth(count)->StringValue()); - controlItem->SetValue4(WXSTRINGCAST str); - count ++; - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - } - else if (controlType == "wxCheckBox") - { - // Check for default value - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue1(expr->Nth(count)->IntegerValue()); - count ++; - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - } -#if USE_RADIOBUTTON - else if (controlType == "wxRadioButton") - { - // Check for default value - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue1(expr->Nth(count)->IntegerValue()); - count ++; - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - } -#endif - else if (controlType == "wxText" || controlType == "wxTextCtrl" || controlType == "wxMultiText") - { - // Check for default value - if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord))) - { - wxString str(expr->Nth(count)->StringValue()); - controlItem->SetValue4(WXSTRINGCAST str); - count ++; - - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - { - // controlItem->SetLabelFont(wxResourceInterpretFontSpec(expr->Nth(count))); - // Do nothing - no label font any more - count ++; - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - } - } - else if (controlType == "wxMessage" || controlType == "wxStaticText") - { - // Check for bitmap resource name - if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord))) - { - wxString str(expr->Nth(count)->StringValue()); - controlItem->SetValue4(WXSTRINGCAST str); - count ++; - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - } - else if (controlType == "wxGroupBox" || controlType == "wxStaticBox") - { - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - else if (controlType == "wxGauge") - { - // Check for default value - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue1(expr->Nth(count)->IntegerValue()); - count ++; - - // Check for range - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue2(expr->Nth(count)->IntegerValue()); - count ++; - - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - { - // controlItem->SetLabelFont(wxResourceInterpretFontSpec(expr->Nth(count))); - // Do nothing - count ++; - - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - } - } - } - else if (controlType == "wxSlider") - { - // Check for default value - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue1(expr->Nth(count)->IntegerValue()); - count ++; - - // Check for min - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue2(expr->Nth(count)->IntegerValue()); - count ++; - - // Check for max - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue3(expr->Nth(count)->IntegerValue()); - count ++; - - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - { - // controlItem->SetLabelFont(wxResourceInterpretFontSpec(expr->Nth(count))); - // do nothing - count ++; - - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - } - } - } - } - else if (controlType == "wxScrollBar") - { - // DEFAULT VALUE - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue1(expr->Nth(count)->IntegerValue()); - count ++; - - // PAGE LENGTH - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue2(expr->Nth(count)->IntegerValue()); - count ++; - - // OBJECT LENGTH - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue3(expr->Nth(count)->IntegerValue()); - count ++; - - // VIEW LENGTH - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - controlItem->SetValue5(expr->Nth(count)->IntegerValue()); - } - } - } - } - else if (controlType == "wxListBox") - { - PrologExpr *valueList = (PrologExpr *) NULL; - - if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList)) - { - wxStringList *stringList = new wxStringList; - PrologExpr *stringExpr = valueList->GetFirst(); - while (stringExpr) - { - stringList->Add(stringExpr->StringValue()); - stringExpr = stringExpr->GetNext(); - } - controlItem->SetStringValues(stringList); - count ++; - - // Check for wxSINGLE/wxMULTIPLE - PrologExpr *mult = (PrologExpr *) NULL; - controlItem->SetValue1(wxLB_SINGLE); - if ((mult = expr->Nth(count)) && ((mult->Type() == PrologString)||(mult->Type() == PrologWord))) - { - wxString m(mult->StringValue()); - if (m == "wxMULTIPLE") - controlItem->SetValue1(wxLB_MULTIPLE); - else if (m == "wxEXTENDED") - controlItem->SetValue1(wxLB_EXTENDED); - count ++; - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - { - // controlItem->SetLabelFont(wxResourceInterpretFontSpec(expr->Nth(count))); - count ++; - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - } - } - } - else if (controlType == "wxChoice") - { - PrologExpr *valueList = (PrologExpr *) NULL; - // Check for default value list - if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList)) - { - wxStringList *stringList = new wxStringList; - PrologExpr *stringExpr = valueList->GetFirst(); - while (stringExpr) - { - stringList->Add(stringExpr->StringValue()); - stringExpr = stringExpr->GetNext(); - } - controlItem->SetStringValues(stringList); - - count ++; - - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - { - // controlItem->SetLabelFont(wxResourceInterpretFontSpec(expr->Nth(count))); - count ++; - - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - } - } -#if USE_COMBOBOX - else if (controlType == "wxComboBox") - { - PrologExpr *textValue = expr->Nth(count); - if (textValue && (textValue->Type() == PrologString || textValue->Type() == PrologWord)) - { - wxString str(textValue->StringValue()); - controlItem->SetValue4(WXSTRINGCAST str); - - count ++; - - PrologExpr *valueList = (PrologExpr *) NULL; - // Check for default value list - if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList)) - { - wxStringList *stringList = new wxStringList; - PrologExpr *stringExpr = valueList->GetFirst(); - while (stringExpr) - { - stringList->Add(stringExpr->StringValue()); - stringExpr = stringExpr->GetNext(); - } - controlItem->SetStringValues(stringList); - - count ++; - - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - { - // controlItem->SetLabelFont(wxResourceInterpretFontSpec(expr->Nth(count))); - count ++; - - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - } - } - } -#endif -#if 0 - else if (controlType == "wxRadioBox") - { - PrologExpr *valueList = (PrologExpr *) NULL; - // Check for default value list - if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList)) - { - wxStringList *stringList = new wxStringList; - PrologExpr *stringExpr = valueList->GetFirst(); - while (stringExpr) - { - stringList->Add(stringExpr->StringValue()); - stringExpr = stringExpr->GetNext(); - } - controlItem->SetStringValues(stringList); - count ++; - - // majorDim (number of rows or cols) - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue1(expr->Nth(count)->IntegerValue()); - count ++; - } - else - controlItem->SetValue1(0); - - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - { - // controlItem->SetLabelFont(wxResourceInterpretFontSpec(expr->Nth(count))); - count ++; - - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - } - } -#endif - else - { - delete controlItem; - return (wxItemResource *) NULL; - } - return controlItem; -} - -// Forward declaration -wxItemResource *wxResourceInterpretMenu1(wxResourceTable& table, PrologExpr *expr); - -/* - * Interpet a menu item - */ - -wxItemResource *wxResourceInterpretMenuItem(wxResourceTable& table, PrologExpr *expr) -{ - wxItemResource *item = new wxItemResource; - - PrologExpr *labelExpr = expr->Nth(0); - PrologExpr *idExpr = expr->Nth(1); - PrologExpr *helpExpr = expr->Nth(2); - PrologExpr *checkableExpr = expr->Nth(3); - - // Further keywords/attributes to follow sometime... - if (expr->Number() == 0) - { -// item->SetType(wxRESOURCE_TYPE_SEPARATOR); - item->SetType("wxMenuSeparator"); - return item; - } - else - { -// item->SetType(wxTYPE_MENU); // Well, menu item, but doesn't matter. - item->SetType("wxMenu"); // Well, menu item, but doesn't matter. - if (labelExpr) - { - wxString str(labelExpr->StringValue()); - item->SetTitle(WXSTRINGCAST str); - } - if (idExpr) - { - int id = 0; - // If a string or word, must look up in identifier table. - if ((idExpr->Type() == PrologString) || (idExpr->Type() == PrologWord)) - { - wxString str(idExpr->StringValue()); - id = wxResourceGetIdentifier(WXSTRINGCAST str, &table); - if (id == 0) - { - wxLogWarning(_("Could not resolve menu id '%s'. " - "Use (non-zero) integer instead\n" - "or provide #define (see manual for caveats)"), - (const char*) idExpr->StringValue()); - } - } - else if (idExpr->Type() == PrologInteger) - id = (int)idExpr->IntegerValue(); - item->SetValue1(id); - } - if (helpExpr) - { - wxString str(helpExpr->StringValue()); - item->SetValue4(WXSTRINGCAST str); - } - if (checkableExpr) - item->SetValue2(checkableExpr->IntegerValue()); - - // Find the first expression that's a list, for submenu - PrologExpr *subMenuExpr = expr->GetFirst(); - while (subMenuExpr && (subMenuExpr->Type() != PrologList)) - subMenuExpr = subMenuExpr->GetNext(); - - while (subMenuExpr) - { - wxItemResource *child = wxResourceInterpretMenuItem(table, subMenuExpr); - item->GetChildren().Append(child); - subMenuExpr = subMenuExpr->GetNext(); - } - } - return item; -} - -/* - * Interpret a nested list as a menu - */ -/* -wxItemResource *wxResourceInterpretMenu1(wxResourceTable& table, PrologExpr *expr) -{ - wxItemResource *menu = new wxItemResource; -// menu->SetType(wxTYPE_MENU); - menu->SetType("wxMenu"); - PrologExpr *element = expr->GetFirst(); - while (element) - { - wxItemResource *item = wxResourceInterpretMenuItem(table, element); - if (item) - menu->GetChildren().Append(item); - element = element->GetNext(); - } - return menu; -} -*/ - -wxItemResource *wxResourceInterpretMenu(wxResourceTable& table, PrologExpr *expr) -{ - PrologExpr *listExpr = (PrologExpr *) NULL; - expr->AssignAttributeValue("menu", &listExpr); - if (!listExpr) - return (wxItemResource *) NULL; - - wxItemResource *menuResource = wxResourceInterpretMenuItem(table, listExpr); - - if (!menuResource) - return (wxItemResource *) NULL; - - char *name = (char *) NULL; - expr->AssignAttributeValue("name", &name); - if (name) - { - menuResource->SetName(name); - delete[] name; - } - - return menuResource; -} - -wxItemResource *wxResourceInterpretMenuBar(wxResourceTable& table, PrologExpr *expr) -{ - PrologExpr *listExpr = (PrologExpr *) NULL; - expr->AssignAttributeValue("menu", &listExpr); - if (!listExpr) - return (wxItemResource *) NULL; - - wxItemResource *resource = new wxItemResource; - resource->SetType("wxMenu"); -// resource->SetType(wxTYPE_MENU); - - PrologExpr *element = listExpr->GetFirst(); - while (element) - { - wxItemResource *menuResource = wxResourceInterpretMenuItem(table, listExpr); - resource->GetChildren().Append(menuResource); - element = element->GetNext(); - } - - char *name = (char *) NULL; - expr->AssignAttributeValue("name", &name); - if (name) - { - resource->SetName(name); - delete[] name; - } - - return resource; -} - -wxItemResource *wxResourceInterpretString(wxResourceTable& WXUNUSED(table), PrologExpr *WXUNUSED(expr)) -{ - return (wxItemResource *) NULL; -} - -wxItemResource *wxResourceInterpretBitmap(wxResourceTable& WXUNUSED(table), PrologExpr *expr) -{ - wxItemResource *bitmapItem = new wxItemResource; -// bitmapItem->SetType(wxTYPE_BITMAP); - bitmapItem->SetType("wxBitmap"); - char *name = (char *) NULL; - expr->AssignAttributeValue("name", &name); - if (name) - { - bitmapItem->SetName(name); - delete[] name; - } - // Now parse all bitmap specifications - PrologExpr *bitmapExpr = expr->GetFirst(); - while (bitmapExpr) - { - if (bitmapExpr->Number() == 3) - { - wxString bitmapKeyword(bitmapExpr->Nth(1)->StringValue()); - if (bitmapKeyword == "bitmap" || bitmapKeyword == "icon") - { - // The value part: always a list. - PrologExpr *listExpr = bitmapExpr->Nth(2); - if (listExpr->Type() == PrologList) - { - wxItemResource *bitmapSpec = new wxItemResource; -// bitmapSpec->SetType(wxTYPE_BITMAP); - bitmapSpec->SetType("wxBitmap"); - - // List is of form: [filename, bitmaptype, platform, colours, xresolution, yresolution] - // where everything after 'filename' is optional. - PrologExpr *nameExpr = listExpr->Nth(0); - PrologExpr *typeExpr = listExpr->Nth(1); - PrologExpr *platformExpr = listExpr->Nth(2); - PrologExpr *coloursExpr = listExpr->Nth(3); - PrologExpr *xresExpr = listExpr->Nth(4); - PrologExpr *yresExpr = listExpr->Nth(5); - if (nameExpr && nameExpr->StringValue()) - { - wxString str(nameExpr->StringValue()); - bitmapSpec->SetName(WXSTRINGCAST str); - } - if (typeExpr && typeExpr->StringValue()) - { - wxString str(typeExpr->StringValue()); - bitmapSpec->SetValue1(wxParseWindowStyle(WXSTRINGCAST str)); - } - else - bitmapSpec->SetValue1(0); - - if (platformExpr && platformExpr->StringValue()) - { - wxString plat(platformExpr->StringValue()); - if (plat == "windows" || plat == "WINDOWS") - bitmapSpec->SetValue2(RESOURCE_PLATFORM_WINDOWS); - else if (plat == "x" || plat == "X") - bitmapSpec->SetValue2(RESOURCE_PLATFORM_X); - else if (plat == "mac" || plat == "MAC") - bitmapSpec->SetValue2(RESOURCE_PLATFORM_MAC); - else - bitmapSpec->SetValue2(RESOURCE_PLATFORM_ANY); - } - else - bitmapSpec->SetValue2(RESOURCE_PLATFORM_ANY); - - if (coloursExpr) - bitmapSpec->SetValue3(coloursExpr->IntegerValue()); - int xres = 0; - int yres = 0; - if (xresExpr) - xres = (int)xresExpr->IntegerValue(); - if (yresExpr) - yres = (int)yresExpr->IntegerValue(); - bitmapSpec->SetSize(0, 0, xres, yres); - - bitmapItem->GetChildren().Append(bitmapSpec); - } - } - } - bitmapExpr = bitmapExpr->GetNext(); - } - - return bitmapItem; -} - -wxItemResource *wxResourceInterpretIcon(wxResourceTable& table, PrologExpr *expr) -{ - wxItemResource *item = wxResourceInterpretBitmap(table, expr); - if (item) - { -// item->SetType(wxTYPE_ICON); - item->SetType("wxIcon"); - return item; - } - else - return (wxItemResource *) NULL; -} - -// Interpret list expression as a font -wxFont *wxResourceInterpretFontSpec(PrologExpr *expr) -{ - if (expr->Type() != PrologList) - return (wxFont *) NULL; - - int point = 10; - int family = wxSWISS; - int style = wxNORMAL; - int weight = wxNORMAL; - int underline = 0; - wxString faceName(""); - - PrologExpr *pointExpr = expr->Nth(0); - PrologExpr *familyExpr = expr->Nth(1); - PrologExpr *styleExpr = expr->Nth(2); - PrologExpr *weightExpr = expr->Nth(3); - PrologExpr *underlineExpr = expr->Nth(4); - PrologExpr *faceNameExpr = expr->Nth(5); - if (pointExpr) - point = (int)pointExpr->IntegerValue(); - - wxString str; - if (familyExpr) - { - str = familyExpr->StringValue(); - family = (int)wxParseWindowStyle(WXSTRINGCAST str); - } - if (styleExpr) - { - str = styleExpr->StringValue(); - style = (int)wxParseWindowStyle(WXSTRINGCAST str); - } - if (weightExpr) - { - str = weightExpr->StringValue(); - weight = (int)wxParseWindowStyle(WXSTRINGCAST str); - } - if (underlineExpr) - underline = (int)underlineExpr->IntegerValue(); - if (faceNameExpr) - faceName = faceNameExpr->StringValue(); - - char *faceName1 = (char *) NULL; - if (faceName != "") - faceName1 = WXSTRINGCAST faceName; - wxFont *font = wxTheFontList->FindOrCreateFont(point, family, style, weight, (underline != 0), faceName1); - return font; -} - -/* - * (Re)allocate buffer for reading in from resource file - */ - -bool wxReallocateResourceBuffer(void) -{ - if (!wxResourceBuffer) - { - wxResourceBufferSize = 1000; - wxResourceBuffer = new char[wxResourceBufferSize]; - return TRUE; - } - if (wxResourceBuffer) - { - long newSize = wxResourceBufferSize + 1000; - char *tmp = new char[(int)newSize]; - strncpy(tmp, wxResourceBuffer, (int)wxResourceBufferCount); - delete[] wxResourceBuffer; - wxResourceBuffer = tmp; - wxResourceBufferSize = newSize; - } - return TRUE; -} - -static bool wxEatWhiteSpace(FILE *fd) -{ - int ch = getc(fd); - if ((ch != ' ') && (ch != '/') && (ch != ' ') && (ch != 10) && (ch != 13) && (ch != 9)) - { - ungetc(ch, fd); - return TRUE; - } - - // Eat whitespace - while (ch == ' ' || ch == 10 || ch == 13 || ch == 9) - ch = getc(fd); - // Check for comment - if (ch == '/') - { - ch = getc(fd); - if (ch == '*') - { - bool finished = FALSE; - while (!finished) - { - ch = getc(fd); - if (ch == EOF) - return FALSE; - if (ch == '*') - { - int newCh = getc(fd); - if (newCh == '/') - finished = TRUE; - else - { - ungetc(newCh, fd); - } - } - } - } - else // False alarm - return FALSE; - } - else - ungetc(ch, fd); - return wxEatWhiteSpace(fd); -} - -bool wxGetResourceToken(FILE *fd) -{ - if (!wxResourceBuffer) - wxReallocateResourceBuffer(); - wxResourceBuffer[0] = 0; - wxEatWhiteSpace(fd); - - int ch = getc(fd); - if (ch == '"') - { - // Get string - wxResourceBufferCount = 0; - ch = getc(fd); - while (ch != '"') - { - int actualCh = ch; - if (ch == EOF) - { - wxResourceBuffer[wxResourceBufferCount] = 0; - return FALSE; - } - // Escaped characters - else if (ch == '\\') - { - int newCh = getc(fd); - if (newCh == '"') - actualCh = '"'; - else if (newCh == 10) - actualCh = 10; - else - { - ungetc(newCh, fd); - } - } - - if (wxResourceBufferCount >= wxResourceBufferSize-1) - wxReallocateResourceBuffer(); - wxResourceBuffer[wxResourceBufferCount] = (char)actualCh; - wxResourceBufferCount ++; - ch = getc(fd); - } - wxResourceBuffer[wxResourceBufferCount] = 0; - } - else - { - wxResourceBufferCount = 0; - // Any other token - while (ch != ' ' && ch != EOF && ch != ' ' && ch != 13 && ch != 9 && ch != 10) - { - if (wxResourceBufferCount >= wxResourceBufferSize-1) - wxReallocateResourceBuffer(); - wxResourceBuffer[wxResourceBufferCount] = (char)ch; - wxResourceBufferCount ++; - - ch = getc(fd); - } - wxResourceBuffer[wxResourceBufferCount] = 0; - if (ch == EOF) - return FALSE; - } - return TRUE; -} - -/* - * Files are in form: - static char *name = "...."; - with possible comments. - */ - -bool wxResourceReadOneResource(FILE *fd, PrologDatabase& db, bool *eof, wxResourceTable *table) -{ - if (!table) - table = wxDefaultResourceTable; - - // static or #define - if (!wxGetResourceToken(fd)) - { - *eof = TRUE; - return FALSE; - } - - if (strcmp(wxResourceBuffer, "#define") == 0) - { - wxGetResourceToken(fd); - char *name = copystring(wxResourceBuffer); - wxGetResourceToken(fd); - char *value = copystring(wxResourceBuffer); - if (isalpha(value[0])) - { - int val = (int)atol(value); - wxResourceAddIdentifier(name, val, table); - } - else - { - wxLogWarning(_("#define %s must be an integer."), name); - delete[] name; - delete[] value; - return FALSE; - } - delete[] name; - delete[] value; - - return TRUE; - } - else if (strcmp(wxResourceBuffer, "#include") == 0) - { - wxGetResourceToken(fd); - char *name = copystring(wxResourceBuffer); - char *actualName = name; - if (name[0] == '"') - actualName = name + 1; - int len = strlen(name); - if ((len > 0) && (name[len-1] == '"')) - name[len-1] = 0; - if (!wxResourceParseIncludeFile(actualName, table)) - { - wxLogWarning(_("Could not find resource include file %s."), actualName); - } - delete[] name; - return TRUE; - } - else if (strcmp(wxResourceBuffer, "static") != 0) - { - char buf[300]; - strcpy(buf, _("Found ")); - strncat(buf, wxResourceBuffer, 30); - strcat(buf, _(", expected static, #include or #define\nwhilst parsing resource.")); - wxLogWarning(buf); - return FALSE; - } - - // char - if (!wxGetResourceToken(fd)) - { - wxLogWarning(_("Unexpected end of file whilst parsing resource.")); - *eof = TRUE; - return FALSE; - } - - if (strcmp(wxResourceBuffer, "char") != 0) - { - wxLogWarning(_("Expected 'char' whilst parsing resource.")); - return FALSE; - } - - // *name - if (!wxGetResourceToken(fd)) - { - wxLogWarning(_("Unexpected end of file whilst parsing resource.")); - *eof = TRUE; - return FALSE; - } - - if (wxResourceBuffer[0] != '*') - { - wxLogWarning(_("Expected '*' whilst parsing resource.")); - return FALSE; - } - char nameBuf[100]; - strncpy(nameBuf, wxResourceBuffer+1, 99); - - // = - if (!wxGetResourceToken(fd)) - { - wxLogWarning(_("Unexpected end of file whilst parsing resource.")); - *eof = TRUE; - return FALSE; - } - - if (strcmp(wxResourceBuffer, "=") != 0) - { - wxLogWarning(_("Expected '=' whilst parsing resource.")); - return FALSE; - } - - // String - if (!wxGetResourceToken(fd)) - { - wxLogWarning(_("Unexpected end of file whilst parsing resource.")); - *eof = TRUE; - return FALSE; - } - else - { - if (!db.ReadPrologFromString(wxResourceBuffer)) - { - wxLogWarning(_("%s: ill-formed resource file syntax."), nameBuf); - return FALSE; - } - } - // Semicolon - if (!wxGetResourceToken(fd)) - { - *eof = TRUE; - } - return TRUE; -} - -/* - * Parses string window style into integer window style - */ - -/* - * Style flag parsing, e.g. - * "wxSYSTEM_MENU | wxBORDER" -> integer - */ - -char *wxResourceParseWord(char *s, int *i) -{ - if (!s) - return (char *) NULL; - - static char buf[150]; - int len = strlen(s); - int j = 0; - int ii = *i; - while ((ii < len) && (isalpha(s[ii]) || (s[ii] == '_'))) - { - buf[j] = s[ii]; - j ++; - ii ++; - } - buf[j] = 0; - - // Eat whitespace and conjunction characters - while ((ii < len) && - ((s[ii] == ' ') || (s[ii] == '|') || (s[ii] == ','))) - { - ii ++; - } - *i = ii; - if (j == 0) - return (char *) NULL; - else - return buf; -} - -struct wxResourceBitListStruct -{ - char *word; - long bits; -}; - -static wxResourceBitListStruct wxResourceBitListTable[] = -{ - /* wxListBox */ - { "wxSINGLE", wxLB_SINGLE }, - { "wxMULTIPLE", wxLB_MULTIPLE }, - { "wxEXTENDED", wxLB_EXTENDED }, - { "wxLB_SINGLE", wxLB_SINGLE }, - { "wxLB_MULTIPLE", wxLB_MULTIPLE }, - { "wxLB_EXTENDED", wxLB_EXTENDED }, - { "wxLB_NEEDED_SB", wxLB_NEEDED_SB }, - { "wxLB_ALWAYS_SB", wxLB_ALWAYS_SB }, - { "wxLB_SORT", wxLB_SORT }, - { "wxLB_OWNERDRAW", wxLB_OWNERDRAW }, - { "wxLB_HSCROLL", wxLB_HSCROLL }, - - /* wxComboxBox */ - { "wxCB_SIMPLE", wxCB_SIMPLE }, - { "wxCB_DROPDOWN", wxCB_DROPDOWN }, - { "wxCB_READONLY", wxCB_READONLY }, - { "wxCB_SORT", wxCB_SORT }, - - /* wxGauge */ - { "wxGA_PROGRESSBAR", wxGA_PROGRESSBAR }, - { "wxGA_HORIZONTAL", wxGA_HORIZONTAL }, - { "wxGA_VERTICAL", wxGA_VERTICAL }, - - /* wxTextCtrl */ - { "wxPASSWORD", wxPASSWORD}, - { "wxPROCESS_ENTER", wxPROCESS_ENTER}, - { "wxTE_PASSWORD", wxTE_PASSWORD}, - { "wxTE_READONLY", wxTE_READONLY}, - { "wxTE_PROCESS_ENTER", wxTE_PROCESS_ENTER}, - { "wxTE_MULTILINE", wxTE_MULTILINE}, - - /* wxRadioBox/wxRadioButton */ - { "wxRB_GROUP", wxRB_GROUP }, - { "wxRA_HORIZONTAL", wxRA_HORIZONTAL }, - { "wxRA_VERTICAL", wxRA_VERTICAL }, - - /* wxSlider */ - { "wxSL_HORIZONTAL", wxSL_HORIZONTAL }, - { "wxSL_VERTICAL", wxSL_VERTICAL }, - { "wxSL_AUTOTICKS", wxSL_AUTOTICKS }, - { "wxSL_LABELS", wxSL_LABELS }, - { "wxSL_LEFT", wxSL_LEFT }, - { "wxSL_TOP", wxSL_TOP }, - { "wxSL_RIGHT", wxSL_RIGHT }, - { "wxSL_BOTTOM", wxSL_BOTTOM }, - { "wxSL_BOTH", wxSL_BOTH }, - { "wxSL_SELRANGE", wxSL_SELRANGE }, - - /* wxScrollBar */ - { "wxSB_HORIZONTAL", wxSB_HORIZONTAL }, - { "wxSB_VERTICAL", wxSB_VERTICAL }, - - /* wxButton */ - { "wxBU_AUTODRAW", wxBU_AUTODRAW }, - { "wxBU_NOAUTODRAW", wxBU_NOAUTODRAW }, - - /* wxTreeCtrl */ - { "wxTR_HAS_BUTTONS", wxTR_HAS_BUTTONS }, - { "wxTR_EDIT_LABELS", wxTR_EDIT_LABELS }, - { "wxTR_LINES_AT_ROOT", wxTR_LINES_AT_ROOT }, - - /* wxListCtrl */ - { "wxLC_ICON", wxLC_ICON }, - { "wxLC_SMALL_ICON", wxLC_SMALL_ICON }, - { "wxLC_LIST", wxLC_LIST }, - { "wxLC_REPORT", wxLC_REPORT }, - { "wxLC_ALIGN_TOP", wxLC_ALIGN_TOP }, - { "wxLC_ALIGN_LEFT", wxLC_ALIGN_LEFT }, - { "wxLC_AUTOARRANGE", wxLC_AUTOARRANGE }, - { "wxLC_USER_TEXT", wxLC_USER_TEXT }, - { "wxLC_EDIT_LABELS", wxLC_EDIT_LABELS }, - { "wxLC_NO_HEADER", wxLC_NO_HEADER }, - { "wxLC_NO_SORT_HEADER", wxLC_NO_SORT_HEADER }, - { "wxLC_SINGLE_SEL", wxLC_SINGLE_SEL }, - { "wxLC_SORT_ASCENDING", wxLC_SORT_ASCENDING }, - { "wxLC_SORT_DESCENDING", wxLC_SORT_DESCENDING }, - - /* wxSpinButton */ - { "wxSP_VERTICAL", wxSP_VERTICAL}, - { "wxSP_HORIZONTAL", wxSP_HORIZONTAL}, - { "wxSP_ARROW_KEYS", wxSP_ARROW_KEYS}, - { "wxSP_WRAP", wxSP_WRAP}, - - /* wxSplitterWnd */ - { "wxSP_NOBORDER", wxSP_NOBORDER}, - { "wxSP_3D", wxSP_3D}, - { "wxSP_BORDER", wxSP_BORDER}, - - /* wxTabCtrl */ - { "wxTC_MULTILINE", wxTC_MULTILINE}, - { "wxTC_RIGHTJUSTIFY", wxTC_RIGHTJUSTIFY}, - { "wxTC_FIXEDWIDTH", wxTC_FIXEDWIDTH}, - { "wxTC_OWNERDRAW", wxTC_OWNERDRAW}, - - /* wxStatusBar95 */ - { "wxST_SIZEGRIP", wxST_SIZEGRIP}, - - /* wxControl */ - { "wxFIXED_LENGTH", wxFIXED_LENGTH}, - { "wxALIGN_LEFT", wxALIGN_LEFT}, - { "wxALIGN_CENTER", wxALIGN_CENTER}, - { "wxALIGN_CENTRE", wxALIGN_CENTRE}, - { "wxALIGN_RIGHT", wxALIGN_RIGHT}, - { "wxCOLOURED", wxCOLOURED}, - - /* wxToolBar */ - { "wxTB_3DBUTTONS", wxTB_3DBUTTONS}, - { "wxTB_HORIZONTAL", wxTB_HORIZONTAL}, - { "wxTB_VERTICAL", wxTB_VERTICAL}, - { "wxTB_FLAT", wxTB_FLAT}, - - /* Generic */ - { "wxVSCROLL", wxVSCROLL }, - { "wxHSCROLL", wxHSCROLL }, - { "wxCAPTION", wxCAPTION }, - { "wxSTAY_ON_TOP", wxSTAY_ON_TOP}, - { "wxICONIZE", wxICONIZE}, - { "wxMINIMIZE", wxICONIZE}, - { "wxMAXIMIZE", wxMAXIMIZE}, - { "wxSDI", 0}, - { "wxMDI_PARENT", 0}, - { "wxMDI_CHILD", 0}, - { "wxTHICK_FRAME", wxTHICK_FRAME}, - { "wxRESIZE_BORDER", wxRESIZE_BORDER}, - { "wxSYSTEM_MENU", wxSYSTEM_MENU}, - { "wxMINIMIZE_BOX", wxMINIMIZE_BOX}, - { "wxMAXIMIZE_BOX", wxMAXIMIZE_BOX}, - { "wxRESIZE_BOX", wxRESIZE_BOX}, - { "wxDEFAULT_FRAME", wxDEFAULT_FRAME}, - { "wxDEFAULT_DIALOG_STYLE", wxDEFAULT_DIALOG_STYLE}, - { "wxBORDER", wxBORDER}, - { "wxRETAINED", wxRETAINED}, - { "wxNATIVE_IMPL", 0}, - { "wxEXTENDED_IMPL", 0}, - { "wxBACKINGSTORE", wxBACKINGSTORE}, -// { "wxFLAT", wxFLAT}, -// { "wxMOTIF_RESIZE", wxMOTIF_RESIZE}, - { "wxFIXED_LENGTH", 0}, - { "wxDOUBLE_BORDER", wxDOUBLE_BORDER}, - { "wxSUNKEN_BORDER", wxSUNKEN_BORDER}, - { "wxRAISED_BORDER", wxRAISED_BORDER}, - { "wxSIMPLE_BORDER", wxSIMPLE_BORDER}, - { "wxSTATIC_BORDER", wxSTATIC_BORDER}, - { "wxTRANSPARENT_WINDOW", wxTRANSPARENT_WINDOW}, - { "wxNO_BORDER", wxNO_BORDER}, - { "wxCLIP_CHILDREN", wxCLIP_CHILDREN}, - - { "wxTINY_CAPTION_HORIZ", wxTINY_CAPTION_HORIZ}, - { "wxTINY_CAPTION_VERT", wxTINY_CAPTION_VERT}, - - // Text font families - { "wxDEFAULT", wxDEFAULT}, - { "wxDECORATIVE", wxDECORATIVE}, - { "wxROMAN", wxROMAN}, - { "wxSCRIPT", wxSCRIPT}, - { "wxSWISS", wxSWISS}, - { "wxMODERN", wxMODERN}, - { "wxTELETYPE", wxTELETYPE}, - { "wxVARIABLE", wxVARIABLE}, - { "wxFIXED", wxFIXED}, - { "wxNORMAL", wxNORMAL}, - { "wxLIGHT", wxLIGHT}, - { "wxBOLD", wxBOLD}, - { "wxITALIC", wxITALIC}, - { "wxSLANT", wxSLANT}, - { "wxSOLID", wxSOLID}, - { "wxDOT", wxDOT}, - { "wxLONG_DASH", wxLONG_DASH}, - { "wxSHORT_DASH", wxSHORT_DASH}, - { "wxDOT_DASH", wxDOT_DASH}, - { "wxUSER_DASH", wxUSER_DASH}, - { "wxTRANSPARENT", wxTRANSPARENT}, - { "wxSTIPPLE", wxSTIPPLE}, - { "wxBDIAGONAL_HATCH", wxBDIAGONAL_HATCH}, - { "wxCROSSDIAG_HATCH", wxCROSSDIAG_HATCH}, - { "wxFDIAGONAL_HATCH", wxFDIAGONAL_HATCH}, - { "wxCROSS_HATCH", wxCROSS_HATCH}, - { "wxHORIZONTAL_HATCH", wxHORIZONTAL_HATCH}, - { "wxVERTICAL_HATCH", wxVERTICAL_HATCH}, - { "wxJOIN_BEVEL", wxJOIN_BEVEL}, - { "wxJOIN_MITER", wxJOIN_MITER}, - { "wxJOIN_ROUND", wxJOIN_ROUND}, - { "wxCAP_ROUND", wxCAP_ROUND}, - { "wxCAP_PROJECTING", wxCAP_PROJECTING}, - { "wxCAP_BUTT", wxCAP_BUTT}, - - // Logical ops - { "wxCLEAR", wxCLEAR}, - { "wxXOR", wxXOR}, - { "wxINVERT", wxINVERT}, - { "wxOR_REVERSE", wxOR_REVERSE}, - { "wxAND_REVERSE", wxAND_REVERSE}, - { "wxCOPY", wxCOPY}, - { "wxAND", wxAND}, - { "wxAND_INVERT", wxAND_INVERT}, - { "wxNO_OP", wxNO_OP}, - { "wxNOR", wxNOR}, - { "wxEQUIV", wxEQUIV}, - { "wxSRC_INVERT", wxSRC_INVERT}, - { "wxOR_INVERT", wxOR_INVERT}, - { "wxNAND", wxNAND}, - { "wxOR", wxOR}, - { "wxSET", wxSET}, - - { "wxFLOOD_SURFACE", wxFLOOD_SURFACE}, - { "wxFLOOD_BORDER", wxFLOOD_BORDER}, - { "wxODDEVEN_RULE", wxODDEVEN_RULE}, - { "wxWINDING_RULE", wxWINDING_RULE}, - { "wxHORIZONTAL", wxHORIZONTAL}, - { "wxVERTICAL", wxVERTICAL}, - { "wxBOTH", wxBOTH}, - { "wxCENTER_FRAME", wxCENTER_FRAME}, - { "wxOK", wxOK}, - { "wxYES_NO", wxYES_NO}, - { "wxCANCEL", wxCANCEL}, - { "wxYES", wxYES}, - { "wxNO", wxNO}, - { "wxICON_EXCLAMATION", wxICON_EXCLAMATION}, - { "wxICON_HAND", wxICON_HAND}, - { "wxICON_QUESTION", wxICON_QUESTION}, - { "wxICON_INFORMATION", wxICON_INFORMATION}, - { "wxICON_STOP", wxICON_STOP}, - { "wxICON_ASTERISK", wxICON_ASTERISK}, - { "wxICON_MASK", wxICON_MASK}, - { "wxCENTRE", wxCENTRE}, - { "wxCENTER", wxCENTRE}, - { "wxUSER_COLOURS", wxUSER_COLOURS}, - { "wxVERTICAL_LABEL", 0}, - { "wxHORIZONTAL_LABEL", 0}, - - // Bitmap types (not strictly styles) - { "wxBITMAP_TYPE_XPM", wxBITMAP_TYPE_XPM}, - { "wxBITMAP_TYPE_XBM", wxBITMAP_TYPE_XBM}, - { "wxBITMAP_TYPE_BMP", wxBITMAP_TYPE_BMP}, - { "wxBITMAP_TYPE_RESOURCE", wxBITMAP_TYPE_BMP_RESOURCE}, - { "wxBITMAP_TYPE_BMP_RESOURCE", wxBITMAP_TYPE_BMP_RESOURCE}, - { "wxBITMAP_TYPE_GIF", wxBITMAP_TYPE_GIF}, - { "wxBITMAP_TYPE_TIF", wxBITMAP_TYPE_TIF}, - { "wxBITMAP_TYPE_ICO", wxBITMAP_TYPE_ICO}, - { "wxBITMAP_TYPE_ICO_RESOURCE", wxBITMAP_TYPE_ICO_RESOURCE}, - { "wxBITMAP_TYPE_CUR", wxBITMAP_TYPE_CUR}, - { "wxBITMAP_TYPE_CUR_RESOURCE", wxBITMAP_TYPE_CUR_RESOURCE}, - { "wxBITMAP_TYPE_XBM_DATA", wxBITMAP_TYPE_XBM_DATA}, - { "wxBITMAP_TYPE_XPM_DATA", wxBITMAP_TYPE_XPM_DATA}, - { "wxBITMAP_TYPE_ANY", wxBITMAP_TYPE_ANY} -}; - -static int wxResourceBitListCount = (sizeof(wxResourceBitListTable)/sizeof(wxResourceBitListStruct)); - -long wxParseWindowStyle(char *bitListString) -{ - int i = 0; - char *word; - long bitList = 0; - while ((word = wxResourceParseWord(bitListString, &i))) - { - bool found = FALSE; - int j; - for (j = 0; j < wxResourceBitListCount; j++) - if (strcmp(wxResourceBitListTable[j].word, word) == 0) - { - bitList |= wxResourceBitListTable[j].bits; - found = TRUE; - break; - } - if (!found) - { - wxLogWarning(_("Unrecognized style %s whilst parsing resource."), word); - return 0; - } - } - return bitList; -} - -/* - * Load a bitmap from a wxWindows resource, choosing an optimum - * depth and appropriate type. - */ - -wxBitmap *wxResourceCreateBitmap(char *resource, wxResourceTable *table) -{ - if (!table) - table = wxDefaultResourceTable; - - wxItemResource *item = table->FindResource(resource); - if (item) - { - if (!item->GetType() || strcmp(item->GetType(), "wxBitmap") != 0) - { - wxLogWarning(_("%s not a bitmap resource specification."), resource); - return (wxBitmap *) NULL; - } - int thisDepth = wxDisplayDepth(); - long thisNoColours = (long)pow(2.0, (double)thisDepth); - - wxItemResource *optResource = (wxItemResource *) NULL; - - // Try to find optimum bitmap for this platform/colour depth - wxNode *node = item->GetChildren().First(); - while (node) - { - wxItemResource *child = (wxItemResource *)node->Data(); - int platform = (int)child->GetValue2(); - int noColours = (int)child->GetValue3(); -/* - char *name = child->GetName(); - int bitmapType = (int)child->GetValue1(); - int xRes = child->GetWidth(); - int yRes = child->GetHeight(); -*/ - - switch (platform) - { - case RESOURCE_PLATFORM_ANY: - { - if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) - optResource = child; - else - { - // Maximise the number of colours. - // If noColours is zero (unspecified), then assume this - // is the right one. - if ((noColours == 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) - optResource = child; - } - break; - } -#ifdef __WXMSW__ - case RESOURCE_PLATFORM_WINDOWS: - { - if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) - optResource = child; - else - { - // Maximise the number of colours - if ((noColours > 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) - optResource = child; - } - break; - } -#endif -#ifdef __WXGTK__ - case RESOURCE_PLATFORM_X: - { - if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) - optResource = child; - else - { - // Maximise the number of colours - if ((noColours == 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) - optResource = child; - } - break; - } -#endif -#ifdef wx_max - case RESOURCE_PLATFORM_MAC: - { - if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) - optResource = child; - else - { - // Maximise the number of colours - if ((noColours == 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) - optResource = child; - } - break; - } -#endif - default: - break; - } - node = node->Next(); - } - // If no matching resource, fail. - if (!optResource) - return (wxBitmap *) NULL; - - char *name = optResource->GetName(); - int bitmapType = (int)optResource->GetValue1(); - wxBitmap *bitmap = (wxBitmap *) NULL; - switch (bitmapType) - { - case wxBITMAP_TYPE_XBM_DATA: - { -#ifdef __WXGTK__ - wxItemResource *item = table->FindResource(name); - if (!item) - { - wxLogWarning(_("Failed to find XBM resource %s.\n" - "Forgot to use wxResourceLoadBitmapData?"), name); - return (wxBitmap *) NULL; - } - bitmap = new wxBitmap((char *)item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3()); -#else - wxLogWarning(_("No XBM facility available!")); -#endif - break; - } - case wxBITMAP_TYPE_XPM_DATA: - { -#if (defined(__WXGTK__)) || (defined(__WXMSW__) && USE_XPM_IN_MSW) - wxItemResource *item = table->FindResource(name); - if (!item) - { - wxLogWarning(_("Failed to find XPM resource %s.\n" - "Forgot to use wxResourceLoadBitmapData?"), name); - return (wxBitmap *) NULL; - } - bitmap = new wxBitmap(item->GetValue1()); -#else - wxLogWarning(_("No XPM facility available!")); -#endif - break; - } - default: - { - bitmap = new wxBitmap(name, bitmapType); - break; - } - } - if (!bitmap) - return (wxBitmap *) NULL; - - if (bitmap->Ok()) - { - return bitmap; - } - else - { - delete bitmap; - return (wxBitmap *) NULL; - } - } - else - { - wxLogWarning(_("Bitmap resource specification %s not found."), resource); - return (wxBitmap *) NULL; - } -} - -/* - * Load an icon from a wxWindows resource, choosing an optimum - * depth and appropriate type. - */ - -wxIcon *wxResourceCreateIcon(char *resource, wxResourceTable *table) -{ - if (!table) - table = wxDefaultResourceTable; - - wxItemResource *item = table->FindResource(resource); - if (item) - { - if (!item->GetType() || strcmp(item->GetType(), "wxIcon") != 0) - { - wxLogWarning(_("%s not an icon resource specification."), resource); - return (wxIcon *) NULL; - } - int thisDepth = wxDisplayDepth(); - long thisNoColours = (long)pow(2.0, (double)thisDepth); - - wxItemResource *optResource = (wxItemResource *) NULL; - - // Try to find optimum icon for this platform/colour depth - wxNode *node = item->GetChildren().First(); - while (node) - { - wxItemResource *child = (wxItemResource *)node->Data(); - int platform = (int)child->GetValue2(); - int noColours = (int)child->GetValue3(); -/* - char *name = child->GetName(); - int bitmapType = (int)child->GetValue1(); - int xRes = child->GetWidth(); - int yRes = child->GetHeight(); -*/ - - switch (platform) - { - case RESOURCE_PLATFORM_ANY: - { - if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) - optResource = child; - else - { - // Maximise the number of colours. - // If noColours is zero (unspecified), then assume this - // is the right one. - if ((noColours == 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) - optResource = child; - } - break; - } -#ifdef __WXMSW__ - case RESOURCE_PLATFORM_WINDOWS: - { - if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) - optResource = child; - else - { - // Maximise the number of colours - if ((noColours > 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) - optResource = child; - } - break; - } -#endif -#ifdef __WXGTK__ - case RESOURCE_PLATFORM_X: - { - if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) - optResource = child; - else - { - // Maximise the number of colours - if ((noColours == 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) - optResource = child; - } - break; - } -#endif -#ifdef wx_max - case RESOURCE_PLATFORM_MAC: - { - if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) - optResource = child; - else - { - // Maximise the number of colours - if ((noColours == 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) - optResource = child; - } - break; - } -#endif - default: - break; - } - node = node->Next(); - } - // If no matching resource, fail. - if (!optResource) - return (wxIcon *) NULL; - - char *name = optResource->GetName(); - int bitmapType = (int)optResource->GetValue1(); - wxIcon *icon = (wxIcon *) NULL; - switch (bitmapType) - { - case wxBITMAP_TYPE_XBM_DATA: - { -#ifdef __WXGTK__ - wxItemResource *item = table->FindResource(name); - if (!item) - { - wxLogWarning(_("Failed to find XBM resource %s.\n" - "Forgot to use wxResourceLoadIconData?"), name); - return (wxIcon *) NULL; - } - icon = new wxIcon((char **)item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3()); -#else - wxLogWarning(_("No XBM facility available!")); -#endif - break; - } - case wxBITMAP_TYPE_XPM_DATA: - { - // *** XPM ICON NOT YET IMPLEMENTED IN WXWINDOWS *** -/* -#if (defined(__WXGTK__)) || (defined(__WXMSW__) && USE_XPM_IN_MSW) - wxItemResource *item = table->FindResource(name); - if (!item) - { - char buf[400]; - sprintf(buf, _("Failed to find XPM resource %s.\nForgot to use wxResourceLoadIconData?"), name); - wxLogWarning(buf); - return NULL; - } - icon = new wxIcon((char **)item->GetValue1()); -#else - wxLogWarning(_("No XPM facility available!")); -#endif -*/ - wxLogWarning(_("No XPM icon facility available!")); - break; - } - default: - { -#ifdef __WXGTK__ - wxLogWarning(_("Icon resource specification %s not found."), resource); -#else - icon = new wxIcon(name, bitmapType); -#endif - break; - } - } - if (!icon) - return (wxIcon *) NULL; - - if (icon->Ok()) - { - return icon; - } - else - { - delete icon; - return (wxIcon *) NULL; - } - } - else - { - wxLogWarning(_("Icon resource specification %s not found."), resource); - return (wxIcon *) NULL; - } -} - -wxMenu *wxResourceCreateMenu(wxItemResource *item) -{ - wxMenu *menu = new wxMenu; - wxNode *node = item->GetChildren().First(); - while (node) - { - wxItemResource *child = (wxItemResource *)node->Data(); - if (child->GetType() && strcmp(child->GetType(), "wxMenuSeparator") == 0) - menu->AppendSeparator(); - else if (child->GetChildren().Number() > 0) - { - wxMenu *subMenu = wxResourceCreateMenu(child); - if (subMenu) - menu->Append((int)child->GetValue1(), child->GetTitle(), subMenu, child->GetValue4()); - } - else - { - menu->Append((int)child->GetValue1(), child->GetTitle(), child->GetValue4(), (child->GetValue2() != 0)); - } - node = node->Next(); - } - return menu; -} - -wxMenuBar *wxResourceCreateMenuBar(char *resource, wxResourceTable *table, wxMenuBar *menuBar) -{ - if (!table) - table = wxDefaultResourceTable; - - wxItemResource *menuResource = table->FindResource(resource); - if (menuResource && menuResource->GetType() && strcmp(menuResource->GetType(), "wxMenu") == 0) - { - if (!menuBar) - menuBar = new wxMenuBar; - wxNode *node = menuResource->GetChildren().First(); - while (node) - { - wxItemResource *child = (wxItemResource *)node->Data(); - wxMenu *menu = wxResourceCreateMenu(child); - if (menu) - menuBar->Append(menu, child->GetTitle()); - node = node->Next(); - } - return menuBar; - } - return (wxMenuBar *) NULL; -} - -wxMenu *wxResourceCreateMenu(char *resource, wxResourceTable *table) -{ - if (!table) - table = wxDefaultResourceTable; - - wxItemResource *menuResource = table->FindResource(resource); - if (menuResource && menuResource->GetType() && strcmp(menuResource->GetType(), "wxMenu") == 0) -// if (menuResource && (menuResource->GetType() == wxTYPE_MENU)) - return wxResourceCreateMenu(menuResource); - return (wxMenu *) NULL; -} - -// Global equivalents (so don't have to refer to default table explicitly) -bool wxResourceParseData(char *resource, wxResourceTable *table) -{ - if (!table) - table = wxDefaultResourceTable; - - return table->ParseResourceData(resource); -} - -bool wxResourceParseFile(char *filename, wxResourceTable *table) -{ - if (!table) - table = wxDefaultResourceTable; - - return table->ParseResourceFile(filename); -} - -// Register XBM/XPM data -bool wxResourceRegisterBitmapData(char *name, char bits[], int width, int height, wxResourceTable *table) -{ - if (!table) - table = wxDefaultResourceTable; - - return table->RegisterResourceBitmapData(name, bits, width, height); -} - -bool wxResourceRegisterBitmapData(char *name, char **data, wxResourceTable *table) -{ - if (!table) - table = wxDefaultResourceTable; - - return table->RegisterResourceBitmapData(name, data); -} - -void wxResourceClear(wxResourceTable *table) -{ - if (!table) - table = wxDefaultResourceTable; - - table->ClearTable(); -} - -/* - * Identifiers - */ - -bool wxResourceAddIdentifier(char *name, int value, wxResourceTable *table) -{ - if (!table) - table = wxDefaultResourceTable; - - table->identifiers.Put(name, (wxObject *)value); - return TRUE; -} - -int wxResourceGetIdentifier(char *name, wxResourceTable *table) -{ - if (!table) - table = wxDefaultResourceTable; - - return (int)table->identifiers.Get(name); -} - -/* - * Parse #include file for #defines (only) - */ - -bool wxResourceParseIncludeFile(char *f, wxResourceTable *table) -{ - if (!table) - table = wxDefaultResourceTable; - - FILE *fd = fopen(f, "r"); - if (!fd) - { - return FALSE; - } - while (wxGetResourceToken(fd)) - { - if (strcmp(wxResourceBuffer, "#define") == 0) - { - wxGetResourceToken(fd); - char *name = copystring(wxResourceBuffer); - wxGetResourceToken(fd); - char *value = copystring(wxResourceBuffer); - if (isdigit(value[0])) - { - int val = (int)atol(value); - wxResourceAddIdentifier(name, val, table); - } - delete[] name; - delete[] value; - } - } - fclose(fd); - return TRUE; -} - -/* - * Reading strings as if they were .wxr files - */ - -static int getc_string(char *s) -{ - int ch = s[wxResourceStringPtr]; - if (ch == 0) - return EOF; - else - { - wxResourceStringPtr ++; - return ch; - } -} - -static int ungetc_string(void) -{ - wxResourceStringPtr --; - return 0; -} - -bool wxEatWhiteSpaceString(char *s) -{ - int ch = getc_string(s); - if (ch == EOF) - return TRUE; - - if ((ch != ' ') && (ch != '/') && (ch != ' ') && (ch != 10) && (ch != 13) && (ch != 9)) - { - ungetc_string(); - return TRUE; - } - - // Eat whitespace - while (ch == ' ' || ch == 10 || ch == 13 || ch == 9) - ch = getc_string(s); - // Check for comment - if (ch == '/') - { - ch = getc_string(s); - if (ch == '*') - { - bool finished = FALSE; - while (!finished) - { - ch = getc_string(s); - if (ch == EOF) - return FALSE; - if (ch == '*') - { - int newCh = getc_string(s); - if (newCh == '/') - finished = TRUE; - else - { - ungetc_string(); - } - } - } - } - else // False alarm - return FALSE; - } - else if (ch != EOF) - ungetc_string(); - return wxEatWhiteSpaceString(s); -} - -bool wxGetResourceTokenString(char *s) -{ - if (!wxResourceBuffer) - wxReallocateResourceBuffer(); - wxResourceBuffer[0] = 0; - wxEatWhiteSpaceString(s); - - int ch = getc_string(s); - if (ch == '"') - { - // Get string - wxResourceBufferCount = 0; - ch = getc_string(s); - while (ch != '"') - { - int actualCh = ch; - if (ch == EOF) - { - wxResourceBuffer[wxResourceBufferCount] = 0; - return FALSE; - } - // Escaped characters - else if (ch == '\\') - { - int newCh = getc_string(s); - if (newCh == '"') - actualCh = '"'; - else if (newCh == 10) - actualCh = 10; - else - { - ungetc_string(); - } - } - - if (wxResourceBufferCount >= wxResourceBufferSize-1) - wxReallocateResourceBuffer(); - wxResourceBuffer[wxResourceBufferCount] = (char)actualCh; - wxResourceBufferCount ++; - ch = getc_string(s); - } - wxResourceBuffer[wxResourceBufferCount] = 0; - } - else - { - wxResourceBufferCount = 0; - // Any other token - while (ch != ' ' && ch != EOF && ch != ' ' && ch != 13 && ch != 9 && ch != 10) - { - if (wxResourceBufferCount >= wxResourceBufferSize-1) - wxReallocateResourceBuffer(); - wxResourceBuffer[wxResourceBufferCount] = (char)ch; - wxResourceBufferCount ++; - - ch = getc_string(s); - } - wxResourceBuffer[wxResourceBufferCount] = 0; - if (ch == EOF) - return FALSE; - } - return TRUE; -} - -/* - * Files are in form: - static char *name = "...."; - with possible comments. - */ - -bool wxResourceReadOneResourceString(char *s, PrologDatabase& db, bool *eof, wxResourceTable *table) -{ - if (!table) - table = wxDefaultResourceTable; - - // static or #define - if (!wxGetResourceTokenString(s)) - { - *eof = TRUE; - return FALSE; - } - - if (strcmp(wxResourceBuffer, "#define") == 0) - { - wxGetResourceTokenString(s); - char *name = copystring(wxResourceBuffer); - wxGetResourceTokenString(s); - char *value = copystring(wxResourceBuffer); - if (isalpha(value[0])) - { - int val = (int)atol(value); - wxResourceAddIdentifier(name, val, table); - } - else - { - wxLogWarning(_("#define %s must be an integer."), name); - delete[] name; - delete[] value; - return FALSE; - } - delete[] name; - delete[] value; - - return TRUE; - } -/* - else if (strcmp(wxResourceBuffer, "#include") == 0) - { - wxGetResourceTokenString(s); - char *name = copystring(wxResourceBuffer); - char *actualName = name; - if (name[0] == '"') - actualName = name + 1; - int len = strlen(name); - if ((len > 0) && (name[len-1] == '"')) - name[len-1] = 0; - if (!wxResourceParseIncludeFile(actualName, table)) - { - char buf[400]; - sprintf(buf, _("Could not find resource include file %s."), actualName); - wxLogWarning(buf); - } - delete[] name; - return TRUE; - } -*/ - else if (strcmp(wxResourceBuffer, "static") != 0) - { - char buf[300]; - strcpy(buf, _("Found ")); - strncat(buf, wxResourceBuffer, 30); - strcat(buf, _(", expected static, #include or #define\nwhilst parsing resource.")); - wxLogWarning(buf); - return FALSE; - } - - // char - if (!wxGetResourceTokenString(s)) - { - wxLogWarning(_("Unexpected end of file whilst parsing resource.")); - *eof = TRUE; - return FALSE; - } - - if (strcmp(wxResourceBuffer, "char") != 0) - { - wxLogWarning(_("Expected 'char' whilst parsing resource.")); - return FALSE; - } - - // *name - if (!wxGetResourceTokenString(s)) - { - wxLogWarning(_("Unexpected end of file whilst parsing resource.")); - *eof = TRUE; - return FALSE; - } - - if (wxResourceBuffer[0] != '*') - { - wxLogWarning(_("Expected '*' whilst parsing resource.")); - return FALSE; - } - char nameBuf[100]; - strncpy(nameBuf, wxResourceBuffer+1, 99); - - // = - if (!wxGetResourceTokenString(s)) - { - wxLogWarning(_("Unexpected end of file whilst parsing resource.")); - *eof = TRUE; - return FALSE; - } - - if (strcmp(wxResourceBuffer, "=") != 0) - { - wxLogWarning(_("Expected '=' whilst parsing resource.")); - return FALSE; - } - - // String - if (!wxGetResourceTokenString(s)) - { - wxLogWarning(_("Unexpected end of file whilst parsing resource.")); - *eof = TRUE; - return FALSE; - } - else - { - if (!db.ReadPrologFromString(wxResourceBuffer)) - { - wxLogWarning(_("%s: ill-formed resource file syntax."), nameBuf); - return FALSE; - } - } - // Semicolon - if (!wxGetResourceTokenString(s)) - { - *eof = TRUE; - } - return TRUE; -} - -bool wxResourceParseString(char *s, wxResourceTable *table) -{ - if (!table) - table = wxDefaultResourceTable; - - if (!s) - return FALSE; - - // Turn backslashes into spaces - if (s) - { - int len = strlen(s); - int i; - for (i = 0; i < len; i++) - if (s[i] == 92 && s[i+1] == 13) - { - s[i] = ' '; - s[i+1] = ' '; - } - } - - PrologDatabase db; - wxResourceStringPtr = 0; - - bool eof = FALSE; - while (wxResourceReadOneResourceString(s, db, &eof, table) && !eof) - { - // Loop - } - return wxResourceInterpretResources(*table, db); -} - -/* - * resource loading facility - */ - -bool wxWindow::LoadFromResource(wxWindow *parent, const wxString& resourceName, const wxResourceTable *table) -{ - if (!table) - table = wxDefaultResourceTable; - - wxItemResource *resource = table->FindResource((const char *)resourceName); -// if (!resource || (resource->GetType() != wxTYPE_DIALOG_BOX)) - if (!resource || !resource->GetType() || - ! ((strcmp(resource->GetType(), "wxDialog") == 0) || (strcmp(resource->GetType(), "wxPanel") == 0))) - return FALSE; - - char *title = resource->GetTitle(); - long theWindowStyle = resource->GetStyle(); - bool isModal = (resource->GetValue1() != 0); - int x = resource->GetX(); - int y = resource->GetY(); - int width = resource->GetWidth(); - int height = resource->GetHeight(); - char *name = resource->GetName(); - - wxFont *theFont = resource->GetFont(); - - if (IsKindOf(CLASSINFO(wxDialog))) - { - wxDialog *dialogBox = (wxDialog *)this; - long modalStyle = isModal ? wxDIALOG_MODAL : 0; - if (!dialogBox->Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), theWindowStyle|modalStyle, name)) - return FALSE; - dialogBox->SetClientSize(width, height); - } - else - { - if (!((wxWindow *)this)->Create(parent, -1, wxPoint(x, y), wxSize(width, height), theWindowStyle, name)) - return FALSE; - } - - if (theFont) - SetFont(*theFont); - - if (resource->GetBackgroundColour()) - SetBackgroundColour(*resource->GetBackgroundColour()); - - // TODO - if (resource->GetLabelColour()) - SetForegroundColour(*resource->GetLabelColour()); - else if (resource->GetButtonColour()) - SetForegroundColour(*resource->GetButtonColour()); - - // Now create children - wxNode *node = resource->GetChildren().First(); - while (node) - { - wxItemResource *childResource = (wxItemResource *)node->Data(); - - (void) CreateItem(childResource, table); - - node = node->Next(); - } - return TRUE; -} - -wxControl *wxWindow::CreateItem(const wxItemResource *resource, const wxResourceTable *table) -{ - if (!table) - table = wxDefaultResourceTable; - return table->CreateItem((wxWindow *)this, (wxItemResource *)resource); -} - -#endif // USE_WX_RESOURCES diff --git a/src/common/serbase.cpp b/src/common/serbase.cpp deleted file mode 100644 index e5bb3d9dd6..0000000000 --- a/src/common/serbase.cpp +++ /dev/null @@ -1,31 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: serbase.cpp -// Purpose: wxStream base classes -// Author: Robert Roebling -// Modified by: -// Created: 11/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Robert Roebling -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "stream.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -// ---------------------------------------------------------------------------- -// wxObject_Serialize -// ---------------------------------------------------------------------------- - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxObject_Serialize,wxObject) -#endif diff --git a/src/common/stream.cpp b/src/common/stream.cpp deleted file mode 100644 index f25f6381fb..0000000000 --- a/src/common/stream.cpp +++ /dev/null @@ -1,622 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: stream.cpp -// Purpose: wxStream base classes -// Author: Guilhem Lavaux -// Modified by: -// Created: 11/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "stream.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" -#include -#include -#include -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -// ---------------------------------------------------------------------------- -// wxStreamBuffer -// ---------------------------------------------------------------------------- - -wxStreamBuffer::wxStreamBuffer(wxInputStream& i_stream) - : m_buffer_start(NULL), m_buffer_end(NULL), m_buffer_pos(NULL), - m_buffer_size(0), m_istream(&i_stream), m_ostream(NULL) -{ -} - -wxStreamBuffer::wxStreamBuffer(wxOutputStream& o_stream) - : m_buffer_start(NULL), m_buffer_end(NULL), m_buffer_pos(NULL), - m_buffer_size(0), m_istream(NULL), m_ostream(&o_stream) -{ -} - -wxStreamBuffer::~wxStreamBuffer() -{ - wxDELETEA(m_buffer_start); -} - -void wxStreamBuffer::WriteBack(char c) -{ - if (m_ostream) - return; - - // Assume that if we write "back" we have read a few bytes: so we have some - // space. - if (m_buffer_pos == m_buffer_start) - return; - - m_buffer_pos--; - *m_buffer_pos = c; -} - -void wxStreamBuffer::SetBufferIO(char *buffer_start, char *buffer_end) -{ - size_t ret; - - m_buffer_start = buffer_start; - m_buffer_end = buffer_end; - - m_buffer_size = m_buffer_end-m_buffer_start; - - if (m_istream) { - ret = m_istream->DoRead(m_buffer_start, m_buffer_size); - m_buffer_end = m_buffer_start + ret; - } - m_buffer_pos = m_buffer_start; -} - -void wxStreamBuffer::SetBufferIO(size_t bufsize) -{ - char *b_start; - - wxDELETE(m_buffer_start); - - if (!bufsize) { - m_buffer_start = NULL; - m_buffer_end = NULL; - m_buffer_pos = NULL; - m_buffer_size = 0; - return; - } - - b_start = new char[bufsize]; - - SetBufferIO(b_start, b_start + bufsize); -} - -void wxStreamBuffer::ResetBuffer() -{ - if (m_istream) - m_buffer_pos = m_buffer_end; - else - m_buffer_pos = m_buffer_start; -} - -void wxStreamBuffer::Read(void *buffer, size_t size) -{ - wxASSERT(m_istream != NULL); - - // ------------------ - // Buffering disabled - // ------------------ - - if (!m_buffer_size) { - m_istream->m_lastread = m_istream->DoRead(buffer, size); - return; - } - - // ----------------- - // Buffering enabled - // ----------------- - size_t buf_left, orig_size = size; - size_t read_ret; - - while (size > 0) { - buf_left = m_buffer_end - m_buffer_pos; - - // First case: the requested buffer is larger than the stream buffer, - // we split - if (size > buf_left) { - memcpy(buffer, m_buffer_pos, buf_left); - size -= buf_left; - buffer = (char *)buffer + buf_left; // ANSI C++ violation. - - read_ret = m_istream->DoRead(m_buffer_start, m_buffer_size); - - // Read failed: EOF - if (read_ret == 0) { - m_istream->m_lastread = orig_size-size; - m_istream->m_eof = TRUE; - m_buffer_pos = m_buffer_end = m_buffer_start; - return; - } else { - m_buffer_end = m_buffer_start+read_ret; - m_buffer_pos = m_buffer_start; - } - } else { - - // Second case: we just copy from the stream buffer. - memcpy(buffer, m_buffer_pos, size); - m_buffer_pos += size; - break; - } - } - m_istream->m_lastread = orig_size; -} - -void wxStreamBuffer::Write(const void *buffer, size_t size) -{ - wxASSERT(m_ostream != NULL); - - // ------------------ - // Buffering disabled - // ------------------ - - if (!m_buffer_size) { - m_ostream->m_lastwrite = m_ostream->DoWrite(buffer, size); - return; - } - - // ------------------ - // Buffering enabled - // ------------------ - - size_t buf_left, orig_size = size; - size_t write_ret; - - while (size > 0) { - buf_left = m_buffer_end - m_buffer_pos; - - // First case: the buffer to write is larger than the stream buffer, - // we split it - if (size > buf_left) { - memcpy(m_buffer_pos, buffer, buf_left); - size -= buf_left; - buffer = (char *)buffer + buf_left; // ANSI C++ violation. - - write_ret = m_ostream->DoWrite(m_buffer_start, m_buffer_size); - if (write_ret != m_buffer_size) { - m_ostream->m_bad = TRUE; - m_ostream->m_lastwrite = orig_size-size; - m_buffer_pos = m_buffer_end = m_buffer_start; - return; - } - m_buffer_pos = m_buffer_start; - - } else { - - // Second case: just copy it in the stream buffer. - - memcpy(m_buffer_pos, buffer, size); - m_buffer_pos += size; - break; - } - } - m_ostream->m_lastwrite = orig_size; -} - -// ---------------------------------------------------------------------------- -// wxInputStream -// ---------------------------------------------------------------------------- - -wxInputStream::wxInputStream() -{ - m_i_destroybuf = TRUE; - m_i_streambuf = new wxStreamBuffer(*this); - m_eof = FALSE; - m_lastread = 0; -} - -wxInputStream::wxInputStream(wxStreamBuffer *buffer) -{ - m_i_destroybuf = FALSE; - m_i_streambuf = buffer; - m_eof = FALSE; - m_lastread = 0; -} - -wxInputStream::~wxInputStream() -{ - if (m_i_destroybuf) - delete m_i_streambuf; -} - -char wxInputStream::GetC() -{ - char c; - m_i_streambuf->Read(&c, 1); - return c; -} - -wxInputStream& wxInputStream::Read(void *buffer, size_t size) -{ - m_i_streambuf->Read(buffer, size); - // wxStreamBuffer sets all variables for us - return *this; -} - -#define BUF_TEMP_SIZE 10000 - -wxInputStream& wxInputStream::Read(wxOutputStream& stream_out) -{ - char buf[BUF_TEMP_SIZE]; - size_t bytes_read = BUF_TEMP_SIZE; - - while (bytes_read == BUF_TEMP_SIZE && !stream_out.Bad()) { - bytes_read = Read(buf, bytes_read).LastRead(); - - stream_out.Write(buf, bytes_read); - } - return *this; -} - -wxInputStream& wxInputStream::operator>>(wxString& line) -{ - wxDataInputStream s(*this); - - line = s.ReadLine(); - return *this; -} - -wxInputStream& wxInputStream::operator>>(char& c) -{ - c = GetC(); - return *this; -} - -wxInputStream& wxInputStream::operator>>(short& i) -{ - long l; - - *this >> l; - i = (short)l; - return *this; -} - -wxInputStream& wxInputStream::operator>>(int& i) -{ - long l; - - *this >> l; - i = (short)l; - return *this; -} - -wxInputStream& wxInputStream::operator>>(long& i) -{ - /* I only implemented a simple integer parser */ - int c, sign; - - while (isspace( c = GetC() ) ) - /* Do nothing */ ; - - i = 0; - if (! (c == '-' || isdigit(c)) ) { - InputStreamBuffer()->WriteBack(c); - return *this; - } - - if (c == '-') { - sign = -1; - c = GetC(); - } else - sign = 1; - - while (isdigit(c)) { - i = i*10 + c; - c = GetC(); - } - - i *= sign; - - return *this; -} - -wxInputStream& wxInputStream::operator>>(float& f) -{ - /* I only implemented a simple float parser */ - int c, sign; - - while (isspace( c = GetC() ) ) - /* Do nothing */ ; - - f = 0.0; - if (! (c == '-' || isdigit(c)) ) { - InputStreamBuffer()->WriteBack(c); - return *this; - } - - if (c == '-') { - sign = -1; - c = GetC(); - } else - sign = 1; - - while (isdigit(c)) { - f = f*10 + c; - c = GetC(); - } - - if (c == '.') { - float f_multiplicator = 0.1; - c = GetC(); - - while (isdigit(c)) { - f += c*f_multiplicator; - f_multiplicator /= 10; - c = GetC(); - } - } - - f *= sign; - - return *this; -} - -wxInputStream& wxInputStream::operator>>(wxObject *& obj) -{ - wxObjectInputStream obj_s(*this); - obj = obj_s.LoadObject(); - return *this; -} - -off_t wxInputStream::SeekI(off_t pos, wxSeekMode mode) -{ - off_t ret_off, diff, last_access; - - last_access = m_i_streambuf->GetLastAccess(); - - switch (mode) { - case wxFromStart: - diff = DoTellInput() - pos; - if ( diff < 0 || diff > last_access ) { - ret_off = DoSeekInput(pos, wxFromStart); - m_i_streambuf->ResetBuffer(); - return ret_off; - } else { - m_i_streambuf->SetIntPosition(last_access - diff); - return pos; - } - case wxFromCurrent: - diff = pos + m_i_streambuf->GetIntPosition(); - - if ( (diff > last_access) || (diff < 0) ) { - ret_off = DoSeekInput(pos, wxFromCurrent); - m_i_streambuf->ResetBuffer(); - return ret_off; - } else { - m_i_streambuf->SetIntPosition(diff); - return pos; - } - case wxFromEnd: - // Hard to compute: always seek to the requested position. - ret_off = DoSeekInput(pos, wxFromEnd); - m_i_streambuf->ResetBuffer(); - return ret_off; - } - return wxInvalidOffset; -} - -off_t wxInputStream::TellI() const -{ - return DoTellInput() - m_i_streambuf->GetLastAccess() + - m_i_streambuf->GetIntPosition(); -} - -// ---------------------------------------------------------------------------- -// wxOutputStream -// ---------------------------------------------------------------------------- -wxOutputStream::wxOutputStream() -{ - m_o_destroybuf = TRUE; - m_o_streambuf = new wxStreamBuffer(*this); - m_bad = FALSE; - m_lastwrite = 0; -} - -wxOutputStream::wxOutputStream(wxStreamBuffer *buffer) -{ - m_o_destroybuf = FALSE; - m_o_streambuf = buffer; - m_bad = FALSE; - m_lastwrite = 0; -} - -wxOutputStream::~wxOutputStream() -{ - if (m_o_destroybuf) - delete m_o_streambuf; -} - -wxOutputStream& wxOutputStream::Write(const void *buffer, size_t size) -{ - m_o_streambuf->Write(buffer, size); - return *this; -} - -wxOutputStream& wxOutputStream::Write(wxInputStream& stream_in) -{ - stream_in.Read(*this); - return *this; -} - -off_t wxOutputStream::SeekO(off_t pos, wxSeekMode mode) -{ - off_t ret_off; - - switch (mode) { - case wxFromStart: - if ( (unsigned)abs (DoTellOutput()-pos) > m_o_streambuf->GetLastAccess() ) { - ret_off = DoSeekOutput(pos, wxFromStart); - m_o_streambuf->ResetBuffer(); - return ret_off; - } else { - m_o_streambuf->SetIntPosition( DoTellOutput() - pos); - return pos; - } - case wxFromCurrent: - if ( ((unsigned)pos > m_o_streambuf->GetLastAccess()) || (pos < 0) ) { - ret_off = DoSeekOutput(pos, wxFromCurrent); - m_o_streambuf->ResetBuffer(); - return ret_off; - } else { - m_o_streambuf->SetIntPosition(pos); - return pos; - } - case wxFromEnd: - // Hard to compute: always seek to the requested position. - ret_off = DoSeekOutput(pos, wxFromEnd); - m_o_streambuf->ResetBuffer(); - return ret_off; - } - return wxInvalidOffset; -} - -off_t wxOutputStream::TellO() const -{ - return DoTellOutput() - m_o_streambuf->GetLastAccess() - + m_o_streambuf->GetIntPosition(); -} - -void wxOutputStream::Sync() -{ - DoWrite(m_o_streambuf->GetBufferStart(), m_o_streambuf->GetIntPosition()); - - m_o_streambuf->ResetBuffer(); -} - -wxOutputStream& wxOutputStream::operator<<(const char *string) -{ - return Write(string, strlen(string)); -} - -wxOutputStream& wxOutputStream::operator<<(wxString& string) -{ - return Write(string, string.Len()); -} - -wxOutputStream& wxOutputStream::operator<<(char c) -{ - return Write(&c, 1); -} - -wxOutputStream& wxOutputStream::operator<<(short i) -{ - wxString strint; - - strint.Printf("%i", i); - return Write(strint, strint.Len()); -} - -wxOutputStream& wxOutputStream::operator<<(int i) -{ - wxString strint; - - strint.Printf("%i", i); - return Write(strint, strint.Len()); -} - -wxOutputStream& wxOutputStream::operator<<(long i) -{ - wxString strlong; - - strlong.Printf("%i", i); - return Write((const char *)strlong, strlong.Len()); -} - -wxOutputStream& wxOutputStream::operator<<(double f) -{ - wxString strfloat; - - strfloat.Printf("%f", f); - return Write(strfloat, strfloat.Len()); -} - -wxOutputStream& wxOutputStream::operator<<(wxObject& obj) -{ - wxObjectOutputStream obj_s(*this); - obj_s.SaveObject(obj); - return *this; -} - -// ---------------------------------------------------------------------------- -// wxFilterInputStream -// ---------------------------------------------------------------------------- -wxFilterInputStream::wxFilterInputStream(wxInputStream& stream) - : wxInputStream(NULL) -{ - m_parent_i_stream = &stream; - m_i_streambuf = stream.InputStreamBuffer(); -} - -wxFilterInputStream::~wxFilterInputStream() -{ -} - -size_t wxFilterInputStream::DoRead(void *buffer, size_t size) -{ - return m_parent_i_stream->Read(buffer, size).LastRead(); -} - -off_t wxFilterInputStream::DoSeekInput(off_t pos, wxSeekMode mode) -{ - return m_parent_i_stream->SeekI(pos, mode); -} - -off_t wxFilterInputStream::DoTellInput() const -{ - return m_parent_i_stream->TellI(); -} - - -// ---------------------------------------------------------------------------- -// wxFilterOutputStream -// ---------------------------------------------------------------------------- -wxFilterOutputStream::wxFilterOutputStream(wxOutputStream& stream) - : wxOutputStream(NULL) -{ - m_parent_o_stream = &stream; - m_o_streambuf = stream.OutputStreamBuffer(); -} - -wxFilterOutputStream::~wxFilterOutputStream() -{ -} - -size_t wxFilterOutputStream::DoWrite(const void *buffer, size_t size) -{ - return m_parent_o_stream->Write(buffer, size).LastWrite(); -} - -off_t wxFilterOutputStream::DoSeekOutput(off_t pos, wxSeekMode mode) -{ - return m_parent_o_stream->SeekO(pos, mode); -} - -off_t wxFilterOutputStream::DoTellOutput() const -{ - return m_parent_o_stream->TellO(); -} - -// ---------------------------------------------------------------------------- -// Some IOManip function -// ---------------------------------------------------------------------------- - -wxOutputStream& wxEndL(wxOutputStream& stream) -{ -#ifdef __MSW__ - return stream.Write("\r\n", 2); -#else - return stream.Write("\n", 1); -#endif -} diff --git a/src/common/string.cpp b/src/common/string.cpp deleted file mode 100644 index 05dce3179b..0000000000 --- a/src/common/string.cpp +++ /dev/null @@ -1,1280 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: string.cpp -// Purpose: wxString class -// Author: Vadim Zeitlin -// Modified by: -// Created: 29/01/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "string.h" -#endif - -/* - * About ref counting: - * 1) all empty strings use g_strEmpty, nRefs = -1 (set in Init()) - * 2) AllocBuffer() sets nRefs to 1, Lock() increments it by one - * 3) Unlock() decrements nRefs and frees memory if it goes to 0 - */ - -// =========================================================================== -// headers, declarations, constants -// =========================================================================== - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#include "wx/string.h" -#include -#endif - -#include -#include -#include - -#ifdef WXSTRING_IS_WXOBJECT - IMPLEMENT_DYNAMIC_CLASS(wxString, wxObject) -#endif //WXSTRING_IS_WXOBJECT - -// allocating extra space for each string consumes more memory but speeds up -// the concatenation operations (nLen is the current string's length) -// NB: EXTRA_ALLOC must be >= 0! -#define EXTRA_ALLOC (19 - nLen % 16) - -// --------------------------------------------------------------------------- -// static class variables definition -// --------------------------------------------------------------------------- - -#ifdef STD_STRING_COMPATIBILITY - const size_t wxString::npos = STRING_MAXLEN; -#endif - -// ---------------------------------------------------------------------------- -// static data -// ---------------------------------------------------------------------------- - -// for an empty string, GetStringData() will return this address -static int g_strEmpty[] = { -1, // ref count (locked) - 0, // current length - 0, // allocated memory - 0 }; // string data -// empty C style string: points to 'string data' byte of g_strEmpty -extern const char *g_szNul = (const char *)(&g_strEmpty[3]); - -// ---------------------------------------------------------------------------- -// global functions -// ---------------------------------------------------------------------------- - -#ifdef STD_STRING_COMPATIBILITY - -// MS Visual C++ version 5.0 provides the new STL headers as well as the old -// iostream ones. -// -// ATTN: you can _not_ use both of these in the same program! -#if 0 // def _MSC_VER - #include - #define NAMESPACE std:: -#else - #include - #define NAMESPACE -#endif //Visual C++ - -NAMESPACE istream& operator>>(NAMESPACE istream& is, wxString& WXUNUSED(str)) -{ -#if 0 - int w = is.width(0); - if ( is.ipfx(0) ) { - NAMESPACE streambuf *sb = is.rdbuf(); - str.erase(); - while ( true ) { - int ch = sb->sbumpc (); - if ( ch == EOF ) { - is.setstate(NAMESPACE ios::eofbit); - break; - } - else if ( isspace(ch) ) { - sb->sungetc(); - break; - } - - str += ch; - if ( --w == 1 ) - break; - } - } - - is.isfx(); - if ( str.length() == 0 ) - is.setstate(NAMESPACE ios::failbit); -#endif - return is; -} - -#endif //std::string compatibility - -// ---------------------------------------------------------------------------- -// private classes -// ---------------------------------------------------------------------------- - -// this small class is used to gather statistics for performance tuning -//#define WXSTRING_STATISTICS -#ifdef WXSTRING_STATISTICS - class Averager - { - public: - Averager(const char *sz) { m_sz = sz; m_nTotal = m_nCount = 0; } - ~Averager() - { printf("wxString: average %s = %f\n", m_sz, ((float)m_nTotal)/m_nCount); } - - void Add(size_t n) { m_nTotal += n; m_nCount++; } - - private: - size_t m_nCount, m_nTotal; - const char *m_sz; - } g_averageLength("allocation size"), - g_averageSummandLength("summand length"), - g_averageConcatHit("hit probability in concat"), - g_averageInitialLength("initial string length"); - - #define STATISTICS_ADD(av, val) g_average##av.Add(val) -#else - #define STATISTICS_ADD(av, val) -#endif // WXSTRING_STATISTICS - -// =========================================================================== -// wxString class core -// =========================================================================== - -// --------------------------------------------------------------------------- -// construction -// --------------------------------------------------------------------------- - -// constructs string of copies of character -wxString::wxString(char ch, size_t nLength) -{ - Init(); - - if ( nLength > 0 ) { - AllocBuffer(nLength); - - wxASSERT( sizeof(char) == 1 ); // can't use memset if not - - memset(m_pchData, ch, nLength); - } -} - -// takes nLength elements of psz starting at nPos -void wxString::InitWith(const char *psz, size_t nPos, size_t nLength) -{ - Init(); - - wxASSERT( nPos <= Strlen(psz) ); - - if ( nLength == STRING_MAXLEN ) - nLength = Strlen(psz + nPos); - - STATISTICS_ADD(InitialLength, nLength); - - if ( nLength > 0 ) { - // trailing '\0' is written in AllocBuffer() - AllocBuffer(nLength); - memcpy(m_pchData, psz + nPos, nLength*sizeof(char)); - } -} - -// the same as previous constructor, but for compilers using unsigned char -wxString::wxString(const unsigned char* psz, size_t nLength) -{ - InitWith((const char *)psz, 0, nLength); -} - -#ifdef STD_STRING_COMPATIBILITY - -// poor man's iterators are "void *" pointers -wxString::wxString(const void *pStart, const void *pEnd) -{ - InitWith((const char *)pStart, 0, - (const char *)pEnd - (const char *)pStart); -} - -#endif //std::string compatibility - -// from wide string -wxString::wxString(const wchar_t *pwz) -{ - // first get necessary size - size_t nLen = wcstombs((char *) NULL, pwz, 0); - - // empty? - if ( nLen != 0 ) { - AllocBuffer(nLen); - wcstombs(m_pchData, pwz, nLen); - } - else { - Init(); - } -} - -// --------------------------------------------------------------------------- -// memory allocation -// --------------------------------------------------------------------------- - -// allocates memory needed to store a C string of length nLen -void wxString::AllocBuffer(size_t nLen) -{ - wxASSERT( nLen > 0 ); // - wxASSERT( nLen <= INT_MAX-1 ); // max size (enough room for 1 extra) - - STATISTICS_ADD(Length, nLen); - - // allocate memory: - // 1) one extra character for '\0' termination - // 2) sizeof(wxStringData) for housekeeping info - wxStringData* pData = (wxStringData*) - malloc(sizeof(wxStringData) + (nLen + EXTRA_ALLOC + 1)*sizeof(char)); - pData->nRefs = 1; - pData->nDataLength = nLen; - pData->nAllocLength = nLen + EXTRA_ALLOC; - m_pchData = pData->data(); // data starts after wxStringData - m_pchData[nLen] = '\0'; -} - -// must be called before changing this string -void wxString::CopyBeforeWrite() -{ - wxStringData* pData = GetStringData(); - - if ( pData->IsShared() ) { - pData->Unlock(); // memory not freed because shared - size_t nLen = pData->nDataLength; - AllocBuffer(nLen); - memcpy(m_pchData, pData->data(), nLen*sizeof(char)); - } - - wxASSERT( !GetStringData()->IsShared() ); // we must be the only owner -} - -// must be called before replacing contents of this string -void wxString::AllocBeforeWrite(size_t nLen) -{ - wxASSERT( nLen != 0 ); // doesn't make any sense - - // must not share string and must have enough space - wxStringData* pData = GetStringData(); - if ( pData->IsShared() || (nLen > pData->nAllocLength) ) { - // can't work with old buffer, get new one - pData->Unlock(); - AllocBuffer(nLen); - } - - wxASSERT( !GetStringData()->IsShared() ); // we must be the only owner -} - -// allocate enough memory for nLen characters -void wxString::Alloc(size_t nLen) -{ - wxStringData *pData = GetStringData(); - if ( pData->nAllocLength <= nLen ) { - if ( pData->IsEmpty() ) { - nLen += EXTRA_ALLOC; - - wxStringData* pData = (wxStringData*) - malloc(sizeof(wxStringData) + (nLen + 1)*sizeof(char)); - pData->nRefs = 1; - pData->nDataLength = 0; - pData->nAllocLength = nLen; - m_pchData = pData->data(); // data starts after wxStringData - m_pchData[0u] = '\0'; - } - else if ( pData->IsShared() ) { - pData->Unlock(); // memory not freed because shared - size_t nOldLen = pData->nDataLength; - AllocBuffer(nLen); - memcpy(m_pchData, pData->data(), nOldLen*sizeof(char)); - } - else { - nLen += EXTRA_ALLOC; - - wxStringData *p = (wxStringData *) - realloc(pData, sizeof(wxStringData) + (nLen + 1)*sizeof(char)); - - if ( p == NULL ) { - // @@@ what to do on memory error? - return; - } - - // it's not important if the pointer changed or not (the check for this - // is not faster than assigning to m_pchData in all cases) - p->nAllocLength = nLen; - m_pchData = p->data(); - } - } - //else: we've already got enough -} - -// shrink to minimal size (releasing extra memory) -void wxString::Shrink() -{ - wxStringData *pData = GetStringData(); - - // this variable is unused in release build, so avoid the compiler warning by - // just not declaring it -#ifdef __WXDEBUG__ - void *p = -#endif - realloc(pData, sizeof(wxStringData) + (pData->nDataLength + 1)*sizeof(char)); - - wxASSERT( p != NULL ); // can't free memory? - wxASSERT( p == pData ); // we're decrementing the size - block shouldn't move! -} - -// get the pointer to writable buffer of (at least) nLen bytes -char *wxString::GetWriteBuf(size_t nLen) -{ - AllocBeforeWrite(nLen); - - wxASSERT( GetStringData()->nRefs == 1 ); - GetStringData()->Validate(FALSE); - - return m_pchData; -} - -// put string back in a reasonable state after GetWriteBuf -void wxString::UngetWriteBuf() -{ - GetStringData()->nDataLength = strlen(m_pchData); - GetStringData()->Validate(TRUE); -} - -// --------------------------------------------------------------------------- -// data access -// --------------------------------------------------------------------------- - -// all functions are inline in string.h - -// --------------------------------------------------------------------------- -// assignment operators -// --------------------------------------------------------------------------- - -// helper function: does real copy -void wxString::AssignCopy(size_t nSrcLen, const char *pszSrcData) -{ - if ( nSrcLen == 0 ) { - Reinit(); - } - else { - AllocBeforeWrite(nSrcLen); - memcpy(m_pchData, pszSrcData, nSrcLen*sizeof(char)); - GetStringData()->nDataLength = nSrcLen; - m_pchData[nSrcLen] = '\0'; - } -} - -// assigns one string to another -wxString& wxString::operator=(const wxString& stringSrc) -{ - wxASSERT( stringSrc.GetStringData()->IsValid() ); - - // don't copy string over itself - if ( m_pchData != stringSrc.m_pchData ) { - if ( stringSrc.GetStringData()->IsEmpty() ) { - Reinit(); - } - else { - // adjust references - GetStringData()->Unlock(); - m_pchData = stringSrc.m_pchData; - GetStringData()->Lock(); - } - } - - return *this; -} - -// assigns a single character -wxString& wxString::operator=(char ch) -{ - AssignCopy(1, &ch); - return *this; -} - -// assigns C string -wxString& wxString::operator=(const char *psz) -{ - AssignCopy(Strlen(psz), psz); - return *this; -} - -// same as 'signed char' variant -wxString& wxString::operator=(const unsigned char* psz) -{ - *this = (const char *)psz; - return *this; -} - -wxString& wxString::operator=(const wchar_t *pwz) -{ - wxString str(pwz); - *this = str; - return *this; -} - -// --------------------------------------------------------------------------- -// string concatenation -// --------------------------------------------------------------------------- - -// add something to this string -void wxString::ConcatSelf(int nSrcLen, const char *pszSrcData) -{ - STATISTICS_ADD(SummandLength, nSrcLen); - - // concatenating an empty string is a NOP, but it happens quite rarely, - // so we don't waste our time checking for it - // if ( nSrcLen > 0 ) - wxStringData *pData = GetStringData(); - size_t nLen = pData->nDataLength; - size_t nNewLen = nLen + nSrcLen; - - // alloc new buffer if current is too small - if ( pData->IsShared() ) { - STATISTICS_ADD(ConcatHit, 0); - - // we have to allocate another buffer - wxStringData* pOldData = GetStringData(); - AllocBuffer(nNewLen); - memcpy(m_pchData, pOldData->data(), nLen*sizeof(char)); - pOldData->Unlock(); - } - else if ( nNewLen > pData->nAllocLength ) { - STATISTICS_ADD(ConcatHit, 0); - - // we have to grow the buffer - Alloc(nNewLen); - } - else { - STATISTICS_ADD(ConcatHit, 1); - - // the buffer is already big enough - } - - // should be enough space - wxASSERT( nNewLen <= GetStringData()->nAllocLength ); - - // fast concatenation - all is done in our buffer - memcpy(m_pchData + nLen, pszSrcData, nSrcLen*sizeof(char)); - - m_pchData[nNewLen] = '\0'; // put terminating '\0' - GetStringData()->nDataLength = nNewLen; // and fix the length -} - -/* - * concatenation functions come in 5 flavours: - * string + string - * char + string and string + char - * C str + string and string + C str - */ - -wxString operator+(const wxString& string1, const wxString& string2) -{ - wxASSERT( string1.GetStringData()->IsValid() ); - wxASSERT( string2.GetStringData()->IsValid() ); - - wxString s = string1; - s += string2; - - return s; -} - -wxString operator+(const wxString& string, char ch) -{ - wxASSERT( string.GetStringData()->IsValid() ); - - wxString s = string; - s += ch; - - return s; -} - -wxString operator+(char ch, const wxString& string) -{ - wxASSERT( string.GetStringData()->IsValid() ); - - wxString s = ch; - s += string; - - return s; -} - -wxString operator+(const wxString& string, const char *psz) -{ - wxASSERT( string.GetStringData()->IsValid() ); - - wxString s; - s.Alloc(Strlen(psz) + string.Len()); - s = string; - s += psz; - - return s; -} - -wxString operator+(const char *psz, const wxString& string) -{ - wxASSERT( string.GetStringData()->IsValid() ); - - wxString s; - s.Alloc(Strlen(psz) + string.Len()); - s = psz; - s += string; - - return s; -} - -// =========================================================================== -// other common string functions -// =========================================================================== - -// --------------------------------------------------------------------------- -// simple sub-string extraction -// --------------------------------------------------------------------------- - -// helper function: clone the data attached to this string -void wxString::AllocCopy(wxString& dest, int nCopyLen, int nCopyIndex) const -{ - if ( nCopyLen == 0 ) { - dest.Init(); - } - else { - dest.AllocBuffer(nCopyLen); - memcpy(dest.m_pchData, m_pchData + nCopyIndex, nCopyLen*sizeof(char)); - } -} - -// extract string of length nCount starting at nFirst -// default value of nCount is 0 and means "till the end" -wxString wxString::Mid(size_t nFirst, size_t nCount) const -{ - // out-of-bounds requests return sensible things - if ( nCount == 0 ) - nCount = GetStringData()->nDataLength - nFirst; - - if ( nFirst + nCount > (size_t)GetStringData()->nDataLength ) - nCount = GetStringData()->nDataLength - nFirst; - if ( nFirst > (size_t)GetStringData()->nDataLength ) - nCount = 0; - - wxString dest; - AllocCopy(dest, nCount, nFirst); - return dest; -} - -// extract nCount last (rightmost) characters -wxString wxString::Right(size_t nCount) const -{ - if ( nCount > (size_t)GetStringData()->nDataLength ) - nCount = GetStringData()->nDataLength; - - wxString dest; - AllocCopy(dest, nCount, GetStringData()->nDataLength - nCount); - return dest; -} - -// get all characters after the last occurence of ch -// (returns the whole string if ch not found) -wxString wxString::Right(char ch) const -{ - wxString str; - int iPos = Find(ch, TRUE); - if ( iPos == NOT_FOUND ) - str = *this; - else - str = c_str() + iPos + 1; - - return str; -} - -// extract nCount first (leftmost) characters -wxString wxString::Left(size_t nCount) const -{ - if ( nCount > (size_t)GetStringData()->nDataLength ) - nCount = GetStringData()->nDataLength; - - wxString dest; - AllocCopy(dest, nCount, 0); - return dest; -} - -// get all characters before the first occurence of ch -// (returns the whole string if ch not found) -wxString wxString::Left(char ch) const -{ - wxString str; - for ( const char *pc = m_pchData; *pc != '\0' && *pc != ch; pc++ ) - str += *pc; - - return str; -} - -/// get all characters before the last occurence of ch -/// (returns empty string if ch not found) -wxString wxString::Before(char ch) const -{ - wxString str; - int iPos = Find(ch, TRUE); - if ( iPos != NOT_FOUND && iPos != 0 ) - str = wxString(c_str(), iPos); - - return str; -} - -/// get all characters after the first occurence of ch -/// (returns empty string if ch not found) -wxString wxString::After(char ch) const -{ - wxString str; - int iPos = Find(ch); - if ( iPos != NOT_FOUND ) - str = c_str() + iPos + 1; - - return str; -} - -// replace first (or all) occurences of some substring with another one -size_t wxString::Replace(const char *szOld, const char *szNew, bool bReplaceAll) -{ - size_t uiCount = 0; // count of replacements made - - size_t uiOldLen = Strlen(szOld); - - wxString strTemp; - const char *pCurrent = m_pchData; - const char *pSubstr; - while ( *pCurrent != '\0' ) { - pSubstr = strstr(pCurrent, szOld); - if ( pSubstr == NULL ) { - // strTemp is unused if no replacements were made, so avoid the copy - if ( uiCount == 0 ) - return 0; - - strTemp += pCurrent; // copy the rest - break; // exit the loop - } - else { - // take chars before match - strTemp.ConcatSelf(pSubstr - pCurrent, pCurrent); - strTemp += szNew; - pCurrent = pSubstr + uiOldLen; // restart after match - - uiCount++; - - // stop now? - if ( !bReplaceAll ) { - strTemp += pCurrent; // copy the rest - break; // exit the loop - } - } - } - - // only done if there were replacements, otherwise would have returned above - *this = strTemp; - - return uiCount; -} - -bool wxString::IsAscii() const -{ - const char *s = (const char*) *this; - while(*s){ - if(!isascii(*s)) return(FALSE); - s++; - } - return(TRUE); -} - -bool wxString::IsWord() const -{ - const char *s = (const char*) *this; - while(*s){ - if(!isalpha(*s)) return(FALSE); - s++; - } - return(TRUE); -} - -bool wxString::IsNumber() const -{ - const char *s = (const char*) *this; - while(*s){ - if(!isdigit(*s)) return(FALSE); - s++; - } - return(TRUE); -} - -wxString wxString::Strip(stripType w) const -{ - wxString s = *this; - if ( w & leading ) s.Trim(FALSE); - if ( w & trailing ) s.Trim(TRUE); - return s; -} - -// --------------------------------------------------------------------------- -// case conversion -// --------------------------------------------------------------------------- - -wxString& wxString::MakeUpper() -{ - CopyBeforeWrite(); - - for ( char *p = m_pchData; *p; p++ ) - *p = (char)toupper(*p); - - return *this; -} - -wxString& wxString::MakeLower() -{ - CopyBeforeWrite(); - - for ( char *p = m_pchData; *p; p++ ) - *p = (char)tolower(*p); - - return *this; -} - -// --------------------------------------------------------------------------- -// trimming and padding -// --------------------------------------------------------------------------- - -// trims spaces (in the sense of isspace) from left or right side -wxString& wxString::Trim(bool bFromRight) -{ - CopyBeforeWrite(); - - if ( bFromRight ) - { - // find last non-space character - char *psz = m_pchData + GetStringData()->nDataLength - 1; - while ( isspace(*psz) && (psz >= m_pchData) ) - psz--; - - // truncate at trailing space start - *++psz = '\0'; - GetStringData()->nDataLength = psz - m_pchData; - } - else - { - // find first non-space character - const char *psz = m_pchData; - while ( isspace(*psz) ) - psz++; - - // fix up data and length - int nDataLength = GetStringData()->nDataLength - (psz - m_pchData); - memmove(m_pchData, psz, (nDataLength + 1)*sizeof(char)); - GetStringData()->nDataLength = nDataLength; - } - - return *this; -} - -// adds nCount characters chPad to the string from either side -wxString& wxString::Pad(size_t nCount, char chPad, bool bFromRight) -{ - wxString s(chPad, nCount); - - if ( bFromRight ) - *this += s; - else - { - s += *this; - *this = s; - } - - return *this; -} - -// truncate the string -wxString& wxString::Truncate(size_t uiLen) -{ - *(m_pchData + uiLen) = '\0'; - GetStringData()->nDataLength = uiLen; - - return *this; -} - -// --------------------------------------------------------------------------- -// finding (return NOT_FOUND if not found and index otherwise) -// --------------------------------------------------------------------------- - -// find a character -int wxString::Find(char ch, bool bFromEnd) const -{ - const char *psz = bFromEnd ? strrchr(m_pchData, ch) : strchr(m_pchData, ch); - - return (psz == NULL) ? NOT_FOUND : psz - m_pchData; -} - -// find a sub-string (like strstr) -int wxString::Find(const char *pszSub) const -{ - const char *psz = strstr(m_pchData, pszSub); - - return (psz == NULL) ? NOT_FOUND : psz - m_pchData; -} - -// --------------------------------------------------------------------------- -// formatted output -// --------------------------------------------------------------------------- -int wxString::Printf(const char *pszFormat, ...) -{ - va_list argptr; - va_start(argptr, pszFormat); - - int iLen = PrintfV(pszFormat, argptr); - - va_end(argptr); - - return iLen; -} - -int wxString::PrintfV(const char* pszFormat, va_list argptr) -{ - static char s_szScratch[1024]; - - int iLen = vsprintf(s_szScratch, pszFormat, argptr); - AllocBeforeWrite(iLen); - strcpy(m_pchData, s_szScratch); - - return iLen; -} - -// ---------------------------------------------------------------------------- -// misc other operations -// ---------------------------------------------------------------------------- -bool wxString::Matches(const char *pszMask) const -{ - // check char by char - const char *pszTxt; - for ( pszTxt = c_str(); *pszMask != '\0'; pszMask++, pszTxt++ ) { - switch ( *pszMask ) { - case '?': - if ( *pszTxt == '\0' ) - return FALSE; - - pszTxt++; - pszMask++; - break; - - case '*': - { - // ignore special chars immediately following this one - while ( *pszMask == '*' || *pszMask == '?' ) - pszMask++; - - // if there is nothing more, match - if ( *pszMask == '\0' ) - return TRUE; - - // are there any other metacharacters in the mask? - size_t uiLenMask; - const char *pEndMask = strpbrk(pszMask, "*?"); - - if ( pEndMask != NULL ) { - // we have to match the string between two metachars - uiLenMask = pEndMask - pszMask; - } - else { - // we have to match the remainder of the string - uiLenMask = strlen(pszMask); - } - - wxString strToMatch(pszMask, uiLenMask); - const char* pMatch = strstr(pszTxt, strToMatch); - if ( pMatch == NULL ) - return FALSE; - - // -1 to compensate "++" in the loop - pszTxt = pMatch + uiLenMask - 1; - pszMask += uiLenMask - 1; - } - break; - - default: - if ( *pszMask != *pszTxt ) - return FALSE; - break; - } - } - - // match only if nothing left - return *pszTxt == '\0'; -} - -// --------------------------------------------------------------------------- -// standard C++ library string functions -// --------------------------------------------------------------------------- -#ifdef STD_STRING_COMPATIBILITY - -wxString& wxString::insert(size_t nPos, const wxString& str) -{ - wxASSERT( str.GetStringData()->IsValid() ); - wxASSERT( nPos <= Len() ); - - if ( !str.IsEmpty() ) { - wxString strTmp; - char *pc = strTmp.GetWriteBuf(Len() + str.Len()); - strncpy(pc, c_str(), nPos); - strcpy(pc + nPos, str); - strcpy(pc + nPos + str.Len(), c_str() + nPos); - strTmp.UngetWriteBuf(); - *this = strTmp; - } - - return *this; -} - -size_t wxString::find(const wxString& str, size_t nStart) const -{ - wxASSERT( str.GetStringData()->IsValid() ); - wxASSERT( nStart <= Len() ); - - const char *p = strstr(c_str() + nStart, str); - - return p == NULL ? npos : p - c_str(); -} - -// VC++ 1.5 can't cope with the default argument in the header. -#if ! (defined(_MSC_VER) && !defined(__WIN32__)) -size_t wxString::find(const char* sz, size_t nStart, size_t n) const -{ - return find(wxString(sz, n == npos ? 0 : n), nStart); -} -#endif - -size_t wxString::find(char ch, size_t nStart) const -{ - wxASSERT( nStart <= Len() ); - - const char *p = strchr(c_str() + nStart, ch); - - return p == NULL ? npos : p - c_str(); -} - -size_t wxString::rfind(const wxString& str, size_t nStart) const -{ - wxASSERT( str.GetStringData()->IsValid() ); - wxASSERT( nStart <= Len() ); - - // # could be quicker than that - const char *p = c_str() + (nStart == npos ? Len() : nStart); - while ( p >= c_str() + str.Len() ) { - if ( strncmp(p - str.Len(), str, str.Len()) == 0 ) - return p - str.Len() - c_str(); - p--; - } - - return npos; -} - -// VC++ 1.5 can't cope with the default argument in the header. -#if ! (defined(_MSC_VER) && !defined(__WIN32__)) -size_t wxString::rfind(const char* sz, size_t nStart, size_t n) const -{ - return rfind(wxString(sz, n == npos ? 0 : n), nStart); -} - -size_t wxString::rfind(char ch, size_t nStart) const -{ - wxASSERT( nStart <= Len() ); - - const char *p = strrchr(c_str() + nStart, ch); - - return p == NULL ? npos : p - c_str(); -} -#endif - -wxString wxString::substr(size_t nStart, size_t nLen) const -{ - // npos means 'take all' - if ( nLen == npos ) - nLen = 0; - - wxASSERT( nStart + nLen <= Len() ); - - return wxString(c_str() + nStart, nLen == npos ? 0 : nLen); -} - -wxString& wxString::erase(size_t nStart, size_t nLen) -{ - wxString strTmp(c_str(), nStart); - if ( nLen != npos ) { - wxASSERT( nStart + nLen <= Len() ); - - strTmp.append(c_str() + nStart + nLen); - } - - *this = strTmp; - return *this; -} - -wxString& wxString::replace(size_t nStart, size_t nLen, const char *sz) -{ - wxASSERT( nStart + nLen <= Strlen(sz) ); - - wxString strTmp; - if ( nStart != 0 ) - strTmp.append(c_str(), nStart); - strTmp += sz; - strTmp.append(c_str() + nStart + nLen); - - *this = strTmp; - return *this; -} - -wxString& wxString::replace(size_t nStart, size_t nLen, size_t nCount, char ch) -{ - return replace(nStart, nLen, wxString(ch, nCount)); -} - -wxString& wxString::replace(size_t nStart, size_t nLen, - const wxString& str, size_t nStart2, size_t nLen2) -{ - return replace(nStart, nLen, str.substr(nStart2, nLen2)); -} - -wxString& wxString::replace(size_t nStart, size_t nLen, - const char* sz, size_t nCount) -{ - return replace(nStart, nLen, wxString(sz, nCount)); -} - -#endif //std::string compatibility - -// ============================================================================ -// ArrayString -// ============================================================================ - -// size increment = max(50% of current size, ARRAY_MAXSIZE_INCREMENT) -#define ARRAY_MAXSIZE_INCREMENT 4096 -#ifndef ARRAY_DEFAULT_INITIAL_SIZE // also defined in dynarray.h - #define ARRAY_DEFAULT_INITIAL_SIZE (16) -#endif - -#define STRING(p) ((wxString *)(&(p))) - -// ctor -wxArrayString::wxArrayString() -{ - m_nSize = - m_nCount = 0; - m_pItems = (char **) NULL; -} - -// copy ctor -wxArrayString::wxArrayString(const wxArrayString& src) -{ - m_nSize = - m_nCount = 0; - m_pItems = (char **) NULL; - - *this = src; -} - -// assignment operator -wxArrayString& wxArrayString::operator=(const wxArrayString& src) -{ - if ( m_nSize > 0 ) - Clear(); - - if ( src.m_nCount > ARRAY_DEFAULT_INITIAL_SIZE ) - Alloc(src.m_nCount); - - // we can't just copy the pointers here because otherwise we would share - // the strings with another array - for ( size_t n = 0; n < src.m_nCount; n++ ) - Add(src[n]); - - if ( m_nCount != 0 ) - memcpy(m_pItems, src.m_pItems, m_nCount*sizeof(char *)); - - return *this; -} - -// grow the array -void wxArrayString::Grow() -{ - // only do it if no more place - if( m_nCount == m_nSize ) { - if( m_nSize == 0 ) { - // was empty, alloc some memory - m_nSize = ARRAY_DEFAULT_INITIAL_SIZE; - m_pItems = new char *[m_nSize]; - } - else { - // otherwise when it's called for the first time, nIncrement would be 0 - // and the array would never be expanded - wxASSERT( ARRAY_DEFAULT_INITIAL_SIZE != 0 ); - - // add 50% but not too much - size_t nIncrement = m_nSize < ARRAY_DEFAULT_INITIAL_SIZE - ? ARRAY_DEFAULT_INITIAL_SIZE : m_nSize >> 1; - if ( nIncrement > ARRAY_MAXSIZE_INCREMENT ) - nIncrement = ARRAY_MAXSIZE_INCREMENT; - m_nSize += nIncrement; - char **pNew = new char *[m_nSize]; - - // copy data to new location - memcpy(pNew, m_pItems, m_nCount*sizeof(char *)); - - // delete old memory (but do not release the strings!) - wxDELETEA(m_pItems); - - m_pItems = pNew; - } - } -} - -void wxArrayString::Free() -{ - for ( size_t n = 0; n < m_nCount; n++ ) { - STRING(m_pItems[n])->GetStringData()->Unlock(); - } -} - -// deletes all the strings from the list -void wxArrayString::Empty() -{ - Free(); - - m_nCount = 0; -} - -// as Empty, but also frees memory -void wxArrayString::Clear() -{ - Free(); - - m_nSize = - m_nCount = 0; - - wxDELETEA(m_pItems); -} - -// dtor -wxArrayString::~wxArrayString() -{ - Free(); - - wxDELETEA(m_pItems); -} - -// pre-allocates memory (frees the previous data!) -void wxArrayString::Alloc(size_t nSize) -{ - wxASSERT( nSize > 0 ); - - // only if old buffer was not big enough - if ( nSize > m_nSize ) { - Free(); - wxDELETEA(m_pItems); - m_pItems = new char *[nSize]; - m_nSize = nSize; - } - - m_nCount = 0; -} - -// searches the array for an item (forward or backwards) -int wxArrayString::Index(const char *sz, bool bCase, bool bFromEnd) const -{ - if ( bFromEnd ) { - if ( m_nCount > 0 ) { - size_t ui = m_nCount; - do { - if ( STRING(m_pItems[--ui])->IsSameAs(sz, bCase) ) - return ui; - } - while ( ui != 0 ); - } - } - else { - for( size_t ui = 0; ui < m_nCount; ui++ ) { - if( STRING(m_pItems[ui])->IsSameAs(sz, bCase) ) - return ui; - } - } - - return NOT_FOUND; -} - -// add item at the end -void wxArrayString::Add(const wxString& str) -{ - wxASSERT( str.GetStringData()->IsValid() ); - - Grow(); - - // the string data must not be deleted! - str.GetStringData()->Lock(); - m_pItems[m_nCount++] = (char *)str.c_str(); -} - -// add item at the given position -void wxArrayString::Insert(const wxString& str, size_t nIndex) -{ - wxASSERT( str.GetStringData()->IsValid() ); - - wxCHECK_RET( nIndex <= m_nCount, ("bad index in wxArrayString::Insert") ); - - Grow(); - - memmove(&m_pItems[nIndex + 1], &m_pItems[nIndex], - (m_nCount - nIndex)*sizeof(char *)); - - str.GetStringData()->Lock(); - m_pItems[nIndex] = (char *)str.c_str(); - - m_nCount++; -} - -// removes item from array (by index) -void wxArrayString::Remove(size_t nIndex) -{ - wxCHECK_RET( nIndex <= m_nCount, _("bad index in wxArrayString::Remove") ); - - // release our lock - Item(nIndex).GetStringData()->Unlock(); - - memmove(&m_pItems[nIndex], &m_pItems[nIndex + 1], - (m_nCount - nIndex - 1)*sizeof(char *)); - m_nCount--; -} - -// removes item from array (by value) -void wxArrayString::Remove(const char *sz) -{ - int iIndex = Index(sz); - - wxCHECK_RET( iIndex != NOT_FOUND, - _("removing inexistent element in wxArrayString::Remove") ); - - Remove(iIndex); -} - -// sort array elements using passed comparaison function - -void wxArrayString::Sort(bool WXUNUSED(bCase), bool WXUNUSED(bReverse) ) -{ - //@@@@ TO DO - //qsort(m_pItems, m_nCount, sizeof(char *), fCmp); -} diff --git a/src/common/tbarbase.cpp b/src/common/tbarbase.cpp deleted file mode 100644 index aac6b6ae94..0000000000 --- a/src/common/tbarbase.cpp +++ /dev/null @@ -1,741 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tbarbase.cpp -// Purpose: Toolbar base classes -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "tbarbase.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -// For ::UpdateWindow -#ifdef __WXMSW__ -#include -#endif - -#if USE_TOOLBAR - -#include "wx/tbarbase.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_ABSTRACT_CLASS(wxToolBarBase, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool, wxObject) - -BEGIN_EVENT_TABLE(wxToolBarBase, wxControl) - EVT_SCROLL(wxToolBarBase::OnScroll) - EVT_SIZE(wxToolBarBase::OnSize) - EVT_IDLE(wxToolBarBase::OnIdle) -END_EVENT_TABLE() -#endif - -// Keep a list of all toolbars created, so you can tell whether a toolbar -// is still valid: a tool may have quit the toolbar. -static wxList gs_ToolBars; - -wxToolBarTool::wxToolBarTool(int theIndex, - const wxBitmap& theBitmap1, const wxBitmap& theBitmap2, bool toggle, - long xPos, long yPos, const wxString& helpS1, const wxString& helpS2) -{ - m_toolStyle = wxTOOL_STYLE_BUTTON; - m_clientData = NULL; - m_index = theIndex; - m_isToggle = toggle; - m_toggleState = FALSE; - m_enabled = TRUE; - m_bitmap1 = theBitmap1; - m_bitmap2 = theBitmap2; - m_x = xPos; - m_y = yPos; - m_width = m_height = 0; - m_deleteSecondBitmap = FALSE; - if (m_bitmap1.Ok()) - { - m_width = m_bitmap1.GetWidth()+2; - m_height = m_bitmap1.GetHeight()+2; - } - m_shortHelpString = helpS1; - m_longHelpString = helpS2; -} - -wxToolBarTool::~wxToolBarTool(void) -{ -/* - if (m_deleteSecondBitmap && m_bitmap2) - delete m_bitmap2; -*/ -} - - -// class wxToolBar - -wxToolBarBase::wxToolBarBase(void) : m_tools(wxKEY_INTEGER) -{ - gs_ToolBars.Append(this); - - m_maxRows = 1; - m_maxCols = 32000; - m_maxWidth = 0; - m_maxHeight = 0; - m_defaultWidth = 16; - m_defaultHeight = 15; - m_xMargin = 0; - m_yMargin = 0; - m_toolPacking = 1; - m_toolSeparation = 5; - m_currentTool = -1; - - m_xScrollPixelsPerLine = 0; - m_yScrollPixelsPerLine = 0; - m_xScrollingEnabled = TRUE; - m_yScrollingEnabled = TRUE; - m_xScrollPosition = 0; - m_yScrollPosition = 0; - m_calcScrolledOffset = TRUE; - m_xScrollLines = 0; - m_yScrollLines = 0; - m_xScrollLinesPerPage = 0; - m_yScrollLinesPerPage = 0; -} - -wxToolBarBase::~wxToolBarBase () -{ - gs_ToolBars.DeleteObject(this); - - for ( wxNode *node = m_tools.First(); node; node = node->Next() ) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - delete tool; - } -} - -// Only allow toggle if returns TRUE -bool wxToolBarBase::OnLeftClick(int toolIndex, bool toggleDown) -{ - wxCommandEvent event(wxEVT_COMMAND_TOOL_CLICKED, toolIndex); - event.SetEventObject(this); - event.SetExtraLong((long) toggleDown); - - GetEventHandler()->ProcessEvent(event); - - return TRUE; -} - -// Call when right button down. -void wxToolBarBase::OnRightClick(int toolIndex, long x, long y) -{ - wxCommandEvent event(wxEVT_COMMAND_TOOL_RCLICKED, toolIndex); - event.SetEventObject(this); - event.SetInt(toolIndex); - - GetEventHandler()->ProcessEvent(event); -} - -// Called when the mouse cursor enters a tool bitmap (no button pressed). -// Argument is -1 if mouse is exiting the toolbar. -// Note that for this event, the id of the window is used, -// and the integer parameter of wxCommandEvent is used to retrieve -// the tool id. -void wxToolBarBase::OnMouseEnter ( int toolIndex ) -{ - wxCommandEvent event(wxEVT_COMMAND_TOOL_ENTER, GetId()); - event.SetEventObject(this); - event.SetInt(toolIndex); - - GetEventHandler()->ProcessEvent(event); -} - -// If pushedBitmap is NULL, a reversed version of bitmap is -// created and used as the pushed/toggled image. -// If toggle is TRUE, the button toggles between the two states. -wxToolBarTool *wxToolBarBase::AddTool(int index, const wxBitmap& bitmap, const wxBitmap& pushedBitmap, - bool toggle, long xPos, long yPos, wxObject *clientData, - const wxString& helpString1, const wxString& helpString2) -{ - wxToolBarTool *tool = new wxToolBarTool(index, bitmap, pushedBitmap, toggle, xPos, yPos, helpString1, helpString2); - tool->m_clientData = clientData; - - if (xPos > -1) - tool->m_x = xPos; - else - tool->m_x = m_xMargin; - - if (yPos > -1) - tool->m_y = yPos; - else - tool->m_y = m_yMargin; - - // Calculate reasonable max size in case Layout() not called - if ((tool->m_x + bitmap.GetWidth() + m_xMargin) > m_maxWidth) - m_maxWidth = (tool->m_x + bitmap.GetWidth() + m_xMargin); - - if ((tool->m_y + bitmap.GetHeight() + m_yMargin) > m_maxHeight) - m_maxHeight = (tool->m_y + bitmap.GetHeight() + m_yMargin); - - m_tools.Append((long)index, tool); - return tool; -} - -void wxToolBarBase::AddSeparator () -{ - wxToolBarTool *tool = new wxToolBarTool; - tool->m_toolStyle = wxTOOL_STYLE_SEPARATOR; - m_tools.Append(tool); -} - -void wxToolBarBase::ClearTools(void) -{ - m_pressedTool = m_currentTool = -1; - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - wxNode *nextNode = node->Next(); - delete tool; - delete node; - node = nextNode; - } -} - -void wxToolBarBase::EnableTool(int index, bool enable) -{ - wxNode *node = m_tools.Find((long)index); - if (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - if (tool) - tool->m_enabled = enable; - } -} - -void wxToolBarBase::ToggleTool(int index, bool toggle) -{ -} - -void wxToolBarBase::SetToggle(int index, bool value) -{ - wxNode *node=m_tools.Find((long)index); - if (node){ - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - tool->m_isToggle = value; - } -} - -bool wxToolBarBase::GetToolState(int index) const -{ - wxNode *node = m_tools.Find((long)index); - if (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - if (tool) - { - return tool->m_toggleState; - } - else return FALSE; - } - else return FALSE; -} - -bool wxToolBarBase::GetToolEnabled(int index) const -{ - wxNode *node = m_tools.Find((long)index); - if (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - if (tool) - { - return tool->m_enabled; - } - else return FALSE; - } - else return FALSE; -} - -wxObject *wxToolBarBase::GetToolClientData(int index) const -{ - wxNode *node = m_tools.Find((long)index); - if (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - if (tool) - { - return tool->m_clientData; - } - else return NULL; - } - else return NULL; -} - -void wxToolBarBase::SetToolShortHelp(int index, const wxString& helpString) -{ - wxNode *node=m_tools.Find((long)index); - if (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - tool->m_shortHelpString = helpString; - } -} - -wxString wxToolBarBase::GetToolShortHelp(int index) const -{ - wxNode *node=m_tools.Find((long)index); - if (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - return tool->m_shortHelpString; - } - else - return wxString(""); -} - -void wxToolBarBase::SetToolLongHelp(int index, const wxString& helpString) -{ - wxNode *node=m_tools.Find((long)index); - if (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - tool->m_longHelpString = helpString; - } -} - -wxString wxToolBarBase::GetToolLongHelp(int index) const -{ - wxNode *node=m_tools.Find((long)index); - if (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - return tool->m_longHelpString; - } - else - return wxString(""); -} - -wxToolBarTool *wxToolBarBase::FindToolForPosition(long x, long y) const -{ - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - if ((x >= tool->m_x) && (y >= tool->m_y) && - (x <= (tool->m_x + tool->GetWidth())) && - (y <= (tool->m_y + tool->GetHeight()))) - return tool; - - node = node->Next(); - } - return NULL; -} - -wxSize wxToolBarBase::GetMaxSize ( void ) const -{ - return wxSize(m_maxWidth, m_maxHeight); -} - -// Okay, so we've left the tool we're in ... we must check if -// the tool we're leaving was a 'sprung push button' and if so, -// spring it back to the up state. -// -void wxToolBarBase::SetMargins(int x, int y) -{ - m_xMargin = x; - m_yMargin = y; -} - -void wxToolBarBase::SetToolPacking(int packing) -{ - m_toolPacking = packing; -} - -void wxToolBarBase::SetToolSeparation(int separation) -{ - m_toolSeparation = separation; -} - -void wxToolBarBase::Command(wxCommandEvent& event) -{ -} - -void wxToolBarBase::Layout(void) -{ -} - - -// SCROLLING IMPLEMENTATION - -/* - * pixelsPerUnitX/pixelsPerUnitY: number of pixels per unit (e.g. pixels per text line) - * noUnitsX/noUnitsY: : no. units per scrollbar - */ -void wxToolBarBase::SetScrollbars (int pixelsPerUnitX, int pixelsPerUnitY, - int noUnitsX, int noUnitsY, - int xPos, int yPos) -{ - m_xScrollPixelsPerLine = pixelsPerUnitX; - m_yScrollPixelsPerLine = pixelsPerUnitY; - m_xScrollLines = noUnitsX; - m_yScrollLines = noUnitsY; - - int w, h; - GetSize(&w, &h); - - // Recalculate scroll bar range and position - if (m_xScrollLines > 0) - { - m_xScrollPosition = xPos; - SetScrollPos (wxHORIZONTAL, m_xScrollPosition, TRUE); - } - else - { - SetScrollbar(wxHORIZONTAL, 0, 0, 0, FALSE); - m_xScrollPosition = 0; - } - - if (m_yScrollLines > 0) - { - m_yScrollPosition = yPos; - SetScrollPos (wxVERTICAL, m_yScrollPosition, TRUE); - } - else - { - SetScrollbar(wxVERTICAL, 0, 0, 0, FALSE); - m_yScrollPosition = 0; - } - AdjustScrollbars(); - Refresh(); -#ifdef __WXMSW__ - ::UpdateWindow ((HWND) GetHWND()); -#endif -} - - -void wxToolBarBase::OnScroll(wxScrollEvent& event) -{ - int orient = event.GetOrientation(); - - int nScrollInc = CalcScrollInc(event); - if (nScrollInc == 0) - return; - - if (orient == wxHORIZONTAL) - { - int newPos = m_xScrollPosition + nScrollInc; - SetScrollPos(wxHORIZONTAL, newPos, TRUE ); - } - else - { - int newPos = m_yScrollPosition + nScrollInc; - SetScrollPos(wxVERTICAL, newPos, TRUE ); - } - - if (orient == wxHORIZONTAL) - { - if (m_xScrollingEnabled) - ScrollWindow(-m_xScrollPixelsPerLine * nScrollInc, 0, NULL); - else - Refresh(); - } - else - { - if (m_yScrollingEnabled) - ScrollWindow(0, -m_yScrollPixelsPerLine * nScrollInc, NULL); - else - Refresh(); - } - - if (orient == wxHORIZONTAL) - { - m_xScrollPosition += nScrollInc; - } - else - { - m_yScrollPosition += nScrollInc; - } - -} - -int wxToolBarBase::CalcScrollInc(wxScrollEvent& event) -{ - int pos = event.GetPosition(); - int orient = event.GetOrientation(); - - int nScrollInc = 0; - switch (event.GetEventType()) - { - case wxEVT_SCROLL_TOP: - { - if (orient == wxHORIZONTAL) - nScrollInc = - m_xScrollPosition; - else - nScrollInc = - m_yScrollPosition; - break; - } - case wxEVT_SCROLL_BOTTOM: - { - if (orient == wxHORIZONTAL) - nScrollInc = m_xScrollLines - m_xScrollPosition; - else - nScrollInc = m_yScrollLines - m_yScrollPosition; - break; - } - case wxEVT_SCROLL_LINEUP: - { - nScrollInc = -1; - break; - } - case wxEVT_SCROLL_LINEDOWN: - { - nScrollInc = 1; - break; - } - case wxEVT_SCROLL_PAGEUP: - { - if (orient == wxHORIZONTAL) - nScrollInc = -GetScrollPageSize(wxHORIZONTAL); - else - nScrollInc = -GetScrollPageSize(wxVERTICAL); - break; - } - case wxEVT_SCROLL_PAGEDOWN: - { - if (orient == wxHORIZONTAL) - nScrollInc = GetScrollPageSize(wxHORIZONTAL); - else - nScrollInc = GetScrollPageSize(wxVERTICAL); - break; - } - case wxEVT_SCROLL_THUMBTRACK: - { - if (orient == wxHORIZONTAL) - nScrollInc = pos - m_xScrollPosition; - else - nScrollInc = pos - m_yScrollPosition; - break; - } - default: - { - break; - } - } - if (orient == wxHORIZONTAL) - { - int w, h; - GetClientSize(&w, &h); - - int nMaxWidth = m_xScrollLines*m_xScrollPixelsPerLine; - int noPositions = (int) ( ((nMaxWidth - w)/(float)m_xScrollPixelsPerLine) + 0.5 ); - if (noPositions < 0) - noPositions = 0; - - if ( (m_xScrollPosition + nScrollInc) < 0 ) - nScrollInc = -m_xScrollPosition; // As -ve as we can go - else if ( (m_xScrollPosition + nScrollInc) > noPositions ) - nScrollInc = noPositions - m_xScrollPosition; // As +ve as we can go - - return nScrollInc; - } - else - { - int w, h; - GetClientSize(&w, &h); - - int nMaxHeight = m_yScrollLines*m_yScrollPixelsPerLine; - int noPositions = (int) ( ((nMaxHeight - h)/(float)m_yScrollPixelsPerLine) + 0.5 ); - if (noPositions < 0) - noPositions = 0; - - if ( (m_yScrollPosition + nScrollInc) < 0 ) - nScrollInc = -m_yScrollPosition; // As -ve as we can go - else if ( (m_yScrollPosition + nScrollInc) > noPositions ) - nScrollInc = noPositions - m_yScrollPosition; // As +ve as we can go - - return nScrollInc; - } -} - -// Adjust the scrollbars - new version. -void wxToolBarBase::AdjustScrollbars(void) -{ - int w, h; - GetClientSize(&w, &h); - - // Recalculate scroll bar range and position - if (m_xScrollLines > 0) - { - int nMaxWidth = m_xScrollLines*m_xScrollPixelsPerLine; - int newRange = (int) ( ((nMaxWidth)/(float)m_xScrollPixelsPerLine) + 0.5 ); - if (newRange < 0) - newRange = 0; - - m_xScrollPosition = wxMin(newRange, m_xScrollPosition); - - // Calculate page size i.e. number of scroll units you get on the - // current client window - int noPagePositions = (int) ( (w/(float)m_xScrollPixelsPerLine) + 0.5 ); - if (noPagePositions < 1) - noPagePositions = 1; - - SetScrollbar(wxHORIZONTAL, m_xScrollPosition, noPagePositions, newRange); - SetScrollPageSize(wxHORIZONTAL, noPagePositions); - } - if (m_yScrollLines > 0) - { - int nMaxHeight = m_yScrollLines*m_yScrollPixelsPerLine; - int newRange = (int) ( ((nMaxHeight)/(float)m_yScrollPixelsPerLine) + 0.5 ); - if (newRange < 0) - newRange = 0; - - m_yScrollPosition = wxMin(newRange, m_yScrollPosition); - - // Calculate page size i.e. number of scroll units you get on the - // current client window - int noPagePositions = (int) ( (h/(float)m_yScrollPixelsPerLine) + 0.5 ); - if (noPagePositions < 1) - noPagePositions = 1; - - SetScrollbar(wxVERTICAL, m_yScrollPosition, noPagePositions, newRange); - SetScrollPageSize(wxVERTICAL, noPagePositions); - } -} - -// Default OnSize resets scrollbars, if any -void wxToolBarBase::OnSize(wxSizeEvent& event) -{ -#if USE_CONSTRAINTS - if (GetAutoLayout()) - Layout(); -#endif - - AdjustScrollbars(); -} - -// Prepare the DC by translating it according to the current scroll position -void wxToolBarBase::PrepareDC(wxDC& dc) -{ - dc.SetDeviceOrigin(- m_xScrollPosition * m_xScrollPixelsPerLine, - m_yScrollPosition * m_yScrollPixelsPerLine); -} - -void wxToolBarBase::GetScrollPixelsPerUnit (int *x_unit, int *y_unit) const -{ - *x_unit = m_xScrollPixelsPerLine; - *y_unit = m_yScrollPixelsPerLine; -} - -int wxToolBarBase::GetScrollPageSize(int orient) const -{ - if ( orient == wxHORIZONTAL ) - return m_xScrollLinesPerPage; - else - return m_yScrollLinesPerPage; -} - -void wxToolBarBase::SetScrollPageSize(int orient, int pageSize) -{ - if ( orient == wxHORIZONTAL ) - m_xScrollLinesPerPage = pageSize; - else - m_yScrollLinesPerPage = pageSize; -} - -/* - * Scroll to given position (scroll position, not pixel position) - */ -void wxToolBarBase::Scroll (int x_pos, int y_pos) -{ - int old_x, old_y; - ViewStart (&old_x, &old_y); - if (((x_pos == -1) || (x_pos == old_x)) && ((y_pos == -1) || (y_pos == old_y))) - return; - - if (x_pos > -1) - { - m_xScrollPosition = x_pos; - SetScrollPos (wxHORIZONTAL, x_pos, TRUE); - } - if (y_pos > -1) - { - m_yScrollPosition = y_pos; - SetScrollPos (wxVERTICAL, y_pos, TRUE); - } - Refresh(); -#ifdef __WXMSW__ - UpdateWindow ((HWND) GetHWND()); -#endif -} - -void wxToolBarBase::EnableScrolling (bool x_scroll, bool y_scroll) -{ - m_xScrollingEnabled = x_scroll; - m_yScrollingEnabled = y_scroll; -} - -void wxToolBarBase::GetVirtualSize (int *x, int *y) const -{ - *x = m_xScrollPixelsPerLine * m_xScrollLines; - *y = m_yScrollPixelsPerLine * m_yScrollLines; -} - -// Where the current view starts from -void wxToolBarBase::ViewStart (int *x, int *y) const -{ - *x = m_xScrollPosition; - *y = m_yScrollPosition; -} - -void wxToolBarBase::OnIdle(wxIdleEvent& event) -{ - wxWindow::OnIdle(event); - - DoToolbarUpdates(); -} - -// Do the toolbar button updates (check for EVT_UPDATE_UI handlers) -void wxToolBarBase::DoToolbarUpdates(void) -{ - wxNode* node = GetTools().First(); - while (node) - { - wxToolBarTool* tool = (wxToolBarTool* ) node->Data(); - - wxUpdateUIEvent event(tool->m_index); - event.SetEventObject(this); - - if (GetEventHandler()->ProcessEvent(event)) - { - if (event.GetSetEnabled()) - EnableTool(tool->m_index, event.GetEnabled()); - if (event.GetSetChecked()) - ToggleTool(tool->m_index, event.GetChecked()); -/* - if (event.GetSetText()) - // Set tooltip? -*/ - } - - node = node->Next(); - } -} - -#ifdef __WXMSW__ -// Circumvent wxControl::MSWOnMouseMove which doesn't set the cursor. -void wxToolBarBase::MSWOnMouseMove(int x, int y, WXUINT flags) -{ - wxWindow::MSWOnMouseMove(x, y, flags); -} -#endif - -#endif diff --git a/src/common/tbarsmpl.cpp b/src/common/tbarsmpl.cpp deleted file mode 100644 index c7eceb5eed..0000000000 --- a/src/common/tbarsmpl.cpp +++ /dev/null @@ -1,454 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tbarsmpl.cpp -// Purpose: wxToolBarSimple -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "tbarsmpl.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#if USE_TOOLBAR - -#include "wx/tbarsmpl.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxToolBarSimple, wxToolBarBase) - -BEGIN_EVENT_TABLE(wxToolBarSimple, wxToolBarBase) - EVT_SIZE(wxToolBarSimple::OnSize) - EVT_PAINT(wxToolBarSimple::OnPaint) - EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus) - EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent) -END_EVENT_TABLE() -#endif - -wxToolBarSimple::wxToolBarSimple(void) -{ - m_currentRowsOrColumns = 0; - m_lastX = 0; - m_lastY = 0; -} - -bool wxToolBarSimple::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, - const wxString& name ) -{ - if ( ! wxWindow::Create(parent, id, pos, size, style, name) ) - return FALSE; - - // Set it to grey (or other 3D face colour) - wxSystemSettings settings; - SetBackgroundColour(settings.GetSystemColour(wxSYS_COLOUR_3DFACE)); - SetDefaultBackgroundColour(settings.GetSystemColour(wxSYS_COLOUR_3DFACE)); - - if ( GetWindowStyleFlag() & wxTB_VERTICAL ) - { m_lastX = 7; m_lastY = 3; } - else - { m_lastX = 3; m_lastY = 7; } - m_maxWidth = m_maxHeight = 0; - m_pressedTool = m_currentTool = -1; - m_xMargin = 0; - m_yMargin = 0; - m_toolPacking = 1; - m_toolSeparation = 5; - - return TRUE; -} - -wxToolBarSimple::~wxToolBarSimple () -{ -} - -void wxToolBarSimple::OnPaint (wxPaintEvent& event) -{ - wxPaintDC dc(this); - PrepareDC(dc); - - static int count = 0; - // Prevent reentry of OnPaint which would cause wxMemoryDC errors. - if ( count > 0 ) - return; - count++; - - wxMemoryDC mem_dc; - - for ( wxNode *node = m_tools.First(); node; node = node->Next() ) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - if (tool->m_toolStyle == wxTOOL_STYLE_BUTTON) - DrawTool(dc, mem_dc, tool); - } - - count--; -} - -void wxToolBarSimple::OnSize ( wxSizeEvent& event ) -{ - wxToolBarBase::OnSize(event); -} - -void wxToolBarSimple::OnKillFocus (wxFocusEvent& event) -{ - OnMouseEnter(m_pressedTool = m_currentTool = -1); -} - -void wxToolBarSimple::OnMouseEvent ( wxMouseEvent & event ) -{ - long x, y; - event.Position(&x, &y); - wxToolBarTool *tool = FindToolForPosition(x, y); - - if (event.LeftDown()) - { - CaptureMouse(); - } - if (event.LeftUp()) - { - ReleaseMouse(); - } - - if (!tool) - { - if (m_currentTool > -1) - { - if (event.LeftIsDown()) - SpringUpButton(m_currentTool); - m_currentTool = -1; - OnMouseEnter(-1); - } - return; - } - - if (!event.IsButton()) - { - if (tool->m_index != m_currentTool) - { - // If the left button is kept down and moved over buttons, - // press those buttons. - if (event.LeftIsDown() && tool->m_enabled) - { - SpringUpButton(m_currentTool); - tool->m_toggleState = !tool->m_toggleState; - wxMemoryDC *dc2 = new wxMemoryDC; - wxClientDC dc(this); - DrawTool(dc, *dc2, tool); - delete dc2; - } - m_currentTool = tool->m_index; - OnMouseEnter(tool->m_index); - } - return; - } - - // Left button pressed. - if (event.LeftDown() && tool->m_enabled) - { - if (tool->m_isToggle) - { - tool->m_toggleState = !tool->m_toggleState; - } - - wxMemoryDC *dc2 = new wxMemoryDC; - wxClientDC dc(this); - DrawTool(dc, *dc2, tool); - delete dc2; - - } - else if (event.RightDown()) - { - OnRightClick(tool->m_index, x, y); - } - - // Left Button Released. Only this action confirms selection. - // If the button is enabled and it is not a toggle tool and it is - // in the pressed state, then raise the button and call OnLeftClick. - // - if (event.LeftUp() && tool->m_enabled && - (tool->m_toggleState || tool->m_isToggle)) - { - if (!tool->m_isToggle) - tool->m_toggleState = FALSE; - - // Pass the OnLeftClick event to tool - if (!OnLeftClick(tool->m_index, tool->m_toggleState) && tool->m_isToggle) - { - // If it was a toggle, and OnLeftClick says No Toggle allowed, - // then change it back - tool->m_toggleState = !tool->m_toggleState; - } - - wxClientDC dc(this); - wxMemoryDC *dc2 = new wxMemoryDC; - DrawTool(dc, *dc2, tool); - delete dc2; - } -} - -void wxToolBarSimple::DrawTool(wxDC& dc, wxMemoryDC& memDC, wxToolBarTool *tool) -{ - PrepareDC(dc); - - wxPen dark_grey_pen(wxColour( 85,85,85 ), 1, wxSOLID); - wxPen white_pen("WHITE", 1, wxSOLID); - wxPen black_pen("BLACK", 1, wxSOLID); - - wxBitmap *bitmap = tool->m_toggleState ? (& tool->m_bitmap2) : (& tool->m_bitmap1); - - if (bitmap && bitmap->Ok()) - { - if (bitmap->GetPalette()) - memDC.SetPalette(*bitmap->GetPalette()); - - int ax = (int)tool->m_x, - ay = (int)tool->m_y, - bx = (int)(tool->m_x+tool->GetWidth()), - by = (int)(tool->m_y+tool->GetHeight()); - - memDC.SelectObject(*bitmap); - if (m_windowStyle & wxTB_3DBUTTONS) - { - dc.SetClippingRegion(ax, ay, (bx-ax+1), (by-ay+1)); - dc.Blit((ax+1), (ay+1), (bx-ax-2), (by-ay-2), &memDC, 0, 0); - wxPen * old_pen = dc.GetPen(); - dc.SetPen( white_pen ); - dc.DrawLine(ax,(by-1),ax,ay); - dc.DrawLine(ax,ay,(bx-1),ay); - dc.SetPen( dark_grey_pen ); - dc.DrawLine((bx-1),(ay+1),(bx-1),(by-1)); - dc.DrawLine((bx-1),(by-1),(ax+1),(by-1)); - dc.SetPen( black_pen ); - dc.DrawLine(bx,ay,bx,by); - dc.DrawLine(bx,by,ax,by); - dc.SetPen( *old_pen ); - dc.DestroyClippingRegion(); - // Select bitmap out of the DC - } - else - { - dc.Blit(tool->m_x, tool->m_y, - bitmap->GetWidth(), bitmap->GetHeight(), - &memDC, 0, 0); - } - memDC.SelectObject(wxNullBitmap); - memDC.SetPalette(wxNullPalette); - } - // No second bitmap, so draw a thick line around bitmap, or invert if mono - else if (tool->m_toggleState) - { - bool drawBorder = FALSE; - #ifdef __X__ // X doesn't invert properly on colour - drawBorder = wxColourDisplay(); - #else // Inversion works fine under Windows - drawBorder = FALSE; - #endif - - if (!drawBorder) - { - memDC.SelectObject(tool->m_bitmap1); - dc.Blit(tool->m_x, tool->m_y, tool->GetWidth(), tool->GetHeight(), - &memDC, 0, 0, wxSRC_INVERT); - memDC.SelectObject(wxNullBitmap); - } - else - { - if (m_windowStyle & wxTB_3DBUTTONS) - { - int ax = (int)tool->m_x, - ay = (int)tool->m_y, - bx = (int)(tool->m_x+tool->GetWidth()), - by = (int)(tool->m_y+tool->GetHeight()); - - memDC.SelectObject(tool->m_bitmap1); - dc.SetClippingRegion(ax, ay, (bx-ax+1), (by-ay+1)); - dc.Blit((ax+2), (ay+2), (bx-ax-2), (by-ay-2), &memDC, 0, 0); - wxPen * old_pen = dc.GetPen(); - dc.SetPen( black_pen ); - dc.DrawLine(ax,(by-1),ax,ay); - dc.DrawLine(ax,ay,(bx-1),ay); - dc.SetPen( dark_grey_pen ); - dc.DrawLine((ax+1),(by-2),(ax+1),(ay+1)); - dc.DrawLine((ax+1),(ay+1),(bx-2),(ay+1)); - dc.SetPen( white_pen ); - dc.DrawLine(bx,ay,bx,by); - dc.DrawLine(bx,by,ax,by); - dc.SetPen( *old_pen ); - dc.DestroyClippingRegion(); - memDC.SelectObject(wxNullBitmap); - } - else - { - long x = tool->m_x; - long y = tool->m_y; - long w = tool->m_bitmap1.GetWidth(); - long h = tool->m_bitmap1.GetHeight(); - wxPen thick_black_pen("BLACK", 3, wxSOLID); - - memDC.SelectObject(tool->m_bitmap1); - dc.SetClippingRegion(tool->m_x, tool->m_y, w, h); - dc.Blit(tool->m_x, tool->m_y, w, h, - &memDC, 0, 0); - dc.SetPen(thick_black_pen); - dc.SetBrush(*wxTRANSPARENT_BRUSH); - dc.DrawRectangle(x, y, w-1, h-1); - dc.DestroyClippingRegion(); - memDC.SelectObject(wxNullBitmap); - } - } - } -} - -void wxToolBarSimple::ToggleTool(int index, bool toggle) -{ - wxNode *node = m_tools.Find((long)index); - if (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - if (tool && tool->m_isToggle) - { - bool oldState = tool->m_toggleState; - tool->m_toggleState = toggle; - - if (oldState != toggle) - { - wxMemoryDC memDC; - wxClientDC dc(this); - DrawTool(dc, memDC, tool); - } - } - } -} - -// Okay, so we've left the tool we're in ... we must check if -// the tool we're leaving was a 'sprung push button' and if so, -// spring it back to the up state. -// -void wxToolBarSimple::SpringUpButton(int index) -{ - wxNode *node=m_tools.Find((long)index); - if (node) { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - if (tool && !tool->m_isToggle && tool->m_toggleState){ - tool->m_toggleState = FALSE; - wxMemoryDC memDC; - wxClientDC dc(this); - DrawTool(dc, memDC, tool); - } - else if (tool && tool->m_isToggle){ - tool->m_toggleState = !tool->m_toggleState; - wxMemoryDC memDC; - wxClientDC dc(this); - DrawTool(dc, memDC, tool); - } - } -} - -void wxToolBarSimple::Layout(void) -{ - m_currentRowsOrColumns = 0; - m_lastX = m_xMargin; - m_lastY = m_yMargin; - int maxToolWidth = 0; - int maxToolHeight = 0; - m_maxWidth = 0; - m_maxHeight = 0; - - // Find the maximum tool width and height - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - if (tool->GetWidth() > maxToolWidth) - maxToolWidth = (int)tool->GetWidth(); - if (tool->GetHeight() > maxToolHeight) - maxToolHeight = (int)tool->GetHeight(); - node = node->Next(); - } - - int separatorSize = m_toolSeparation; - - node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - if (tool->m_toolStyle == wxTOOL_STYLE_SEPARATOR) - { - if ( GetWindowStyleFlag() & wxTB_HORIZONTAL ) - { - if (m_currentRowsOrColumns >= m_maxCols) - m_lastY += separatorSize; - else - m_lastX += separatorSize; - } - else - { - if (m_currentRowsOrColumns >= m_maxRows) - m_lastX += separatorSize; - else - m_lastY += separatorSize; - } - } - else if (tool->m_toolStyle == wxTOOL_STYLE_BUTTON) - { - if ( GetWindowStyleFlag() & wxTB_HORIZONTAL ) - { - if (m_currentRowsOrColumns >= m_maxCols) - { - m_currentRowsOrColumns = 0; - m_lastX = m_xMargin; - m_lastY += maxToolHeight + m_toolPacking; - } - tool->m_x = (long) (m_lastX + (maxToolWidth - tool->GetWidth())/2.0); - tool->m_y = (long) (m_lastY + (maxToolHeight - tool->GetHeight())/2.0); - - m_lastX += maxToolWidth + m_toolPacking; - } - else - { - if (m_currentRowsOrColumns >= m_maxRows) - { - m_currentRowsOrColumns = 0; - m_lastX += (maxToolWidth + m_toolPacking); - m_lastY = m_yMargin; - } - tool->m_x = (long) (m_lastX + (maxToolWidth - tool->GetWidth())/2.0); - tool->m_y = (long) (m_lastY + (maxToolHeight - tool->GetHeight())/2.0); - - m_lastY += maxToolHeight + m_toolPacking; - } - m_currentRowsOrColumns ++; - } - - if (m_lastX > m_maxWidth) - m_maxWidth = m_lastX; - if (m_lastY > m_maxHeight) - m_maxHeight = m_lastY; - - node = node->Next(); - } - if ( GetWindowStyleFlag() & wxTB_HORIZONTAL ) - m_maxWidth += maxToolWidth; - else - m_maxHeight += maxToolHeight; - - m_maxWidth += m_xMargin; - m_maxHeight += m_yMargin; -} - - -#endif diff --git a/src/common/textfile.cpp b/src/common/textfile.cpp deleted file mode 100644 index cf3095cd5e..0000000000 --- a/src/common/textfile.cpp +++ /dev/null @@ -1,239 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: textfile.cpp -// Purpose: implementation of wxTextFile class -// Author: Vadim Zeitlin -// Modified by: -// Created: 03.04.98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// headers -// ============================================================================ - -#ifdef __GNUG__ -#pragma implementation "textfile.h" -#endif - -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif //__BORLANDC__ - -#include -#include -#include -#include -#include - -// ============================================================================ -// wxTextFile class implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// static variables -// ---------------------------------------------------------------------------- - -// default type is the native one -const wxTextFile::Type wxTextFile::typeDefault = wxTextFile:: -#if defined(__WINDOWS__) - Type_Dos; -#elif defined(__UNIX__) - Type_Unix; -#elif defined(__WXMAC__) - Type_Mac; - // if you feel brave, remove the next line - #error "wxTextFile: code for Mac files is untested." -#else - Type_None; - #error "wxTextFile: unsupported platform." -#endif - - -// ---------------------------------------------------------------------------- -// ctors & dtor -// ---------------------------------------------------------------------------- - -wxTextFile::wxTextFile(const wxString& strFile) : m_strFile(strFile) -{ -} - -wxTextFile::~wxTextFile() -{ - // m_file dtor called automatically -} - -// ---------------------------------------------------------------------------- -// file operations -// ---------------------------------------------------------------------------- - -bool wxTextFile::Open(const wxString& strFile) -{ - m_strFile = strFile; - return Open(); -} - -bool wxTextFile::Open() -{ - // file name must be either given in ctor or in Open(const wxString&) - wxASSERT( !m_strFile.IsEmpty() ); - - // open file in read-only mode - if ( !m_file.Open(m_strFile) ) - return FALSE; - - // read file into memory - bool bRet = Read(); - - m_file.Close(); - - return bRet; -} - -// analyse some lines of the file trying to guess it's type. -// if it fails, it assumes the native type for our platform. -wxTextFile::Type wxTextFile::GuessType() const -{ - // file should be opened and we must be in it's beginning - wxASSERT( m_file.IsOpened() && m_file.Tell() == 0 ); - - // scan the file lines - size_t nUnix = 0, // number of '\n's alone - nDos = 0, // number of '\r\n' - nMac = 0; // number of '\r's - - // we take MAX_LINES_SCAN in the beginning, middle and the end of file - #define MAX_LINES_SCAN (10) - size_t nCount = m_aLines.Count() / 3, - nScan = nCount > 3*MAX_LINES_SCAN ? MAX_LINES_SCAN : nCount / 3; - - #define AnalyseLine(n) \ - switch ( m_aTypes[n] ) { \ - case Type_Unix: nUnix++; break; \ - case Type_Dos: nDos++; break; \ - case Type_Mac: nMac++; break; \ - default: wxFAIL_MSG(_("unknown line terminator")); \ - } - - size_t n; - for ( n = 0; n < nScan; n++ ) // the beginning - AnalyseLine(n); - for ( n = (nCount - nScan)/2; n < (nCount + nScan)/2; n++ ) - AnalyseLine(n); - for ( n = nCount - nScan; n < nCount; n++ ) - AnalyseLine(n); - - #undef AnalyseLine - - // interpret the results (@@ far from being even 50% fool proof) - if ( nDos + nUnix + nMac == 0 ) { - // no newlines at all - wxLogWarning(_("'%s' is probably a binary file."), m_strFile.c_str()); - } - else { - #define GREATER_OF(t1, t2) n##t1 == n##t2 ? typeDefault \ - : n##t1 > n##t2 ? Type_##t1 \ - : Type_##t2 - - if ( nDos > nUnix ) - return GREATER_OF(Dos, Mac); - else if ( nDos < nUnix ) - return GREATER_OF(Unix, Mac); - else { - // nDos == nUnix - return nMac > nDos ? Type_Mac : typeDefault; - } - - #undef GREATER_OF - } - - return typeDefault; -} - -bool wxTextFile::Read() -{ - // file should be opened and we must be in it's beginning - wxASSERT( m_file.IsOpened() && m_file.Tell() == 0 ); - - wxString str; - char ch, chLast = '\0'; - char buf[1024]; - int n, nRead; - while ( !m_file.Eof() ) { - nRead = m_file.Read(buf, WXSIZEOF(buf)); - if ( nRead == wxInvalidOffset ) { - // read error (error message already given in wxFile::Read) - m_file.Close(); - return FALSE; - } - - #ifdef __MAC__ - #pragma message("wxTextFile::Read() hasn't been tested with Mac files.") - #endif - - for ( n = 0; n < nRead; n++ ) { - ch = buf[n]; - switch ( ch ) { - case '\n': - // Dos/Unix line termination - m_aLines.Add(str); - m_aTypes.Add(chLast == '\r' ? Type_Dos : Type_Unix); - str.Empty(); - chLast = '\n'; - break; - - case '\r': - if ( chLast == '\r' ) { - // Mac empty line - m_aLines.Add(""); - m_aTypes.Add(Type_Mac); - } - else - chLast = '\r'; - break; - - default: - if ( chLast == '\r' ) { - // Mac line termination - m_aLines.Add(str); - m_aTypes.Add(Type_Mac); - str = ch; - } - else { - // add to the current line - str += ch; - } - } - } - } - - // anything in the last line? - if ( !str.IsEmpty() ) { - m_aTypes.Add(Type_None); // no line terminator - m_aLines.Add(str); - } - - return TRUE; -} - -bool wxTextFile::Write(Type typeNew) -{ - wxTempFile fileTmp(m_strFile); - - if ( !fileTmp.IsOpened() ) { - wxLogError(_("can't write file '%s' to disk."), m_strFile.c_str()); - return FALSE; - } - - size_t nCount = m_aLines.Count(); - for ( size_t n = 0; n < nCount; n++ ) { - fileTmp.Write(m_aLines[n] + - GetEOL(typeNew == Type_None ? m_aTypes[n] : typeNew)); - } - - // replace the old file with this one - return fileTmp.Commit(); -} diff --git a/src/common/time.cpp b/src/common/time.cpp deleted file mode 100644 index 01eed9a495..0000000000 --- a/src/common/time.cpp +++ /dev/null @@ -1,384 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: time.cpp -// Purpose: wxTime class, from NIHCL -// Author: Julian Smart, after K. E. Gorlen -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "time.h" -#endif - -/* -Provides an object that represents a Time, stored as the number of -seconds since January 1, 1901, GMT. -*/ - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include "wx/setup.h" - -#if USE_TIMEDATE - -#include "wx/time.h" -#include "wx/date.h" -#include "wx/utils.h" -#include - -#if USE_IOSTREAMH -#include -#else -#include -#endif - -#include -#include - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxTime, wxObject) -#endif - - -extern bool wxGetLocalTime(long *timeZone, int *dstObserved); -extern long wxGetCurrentTime(void); - -static long TIME_ZONE; /* seconds west of GMT */ -static int DST_OBSERVED; /* flags U.S. daylight saving time observed */ - -static bool wxTimeInitialized = FALSE; - -wxTime::tFormat wxTime::Format = wxTime::wx12h; -wxTime::tPrecision wxTime::Precision = wxTime::wxStdMinSec; - -static const unsigned long seconds_in_day = 24*60*60L; -static const wxDate refDate(1,1,1901); -// static const wxDate maxDate(49709L); /* ((2**32)-1)/seconds_in_day -1 */ - -wxTime wxTime::GetLocalTime(const wxDate& date, hourTy h, minuteTy m, secondTy s) -/* - Return a local wxTime for the specified Standard Time date, hour, minute, - and second. -*/ -{ - if (!wxTimeInitialized) - { - wxGetLocalTime(&TIME_ZONE, &DST_OBSERVED); - wxTimeInitialized = TRUE; - } -/* - if (!date.IsBetween(refDate,maxDate)) - setError(NIHCL_DATERANGE,DEFAULT, - date.dayOfMonth(),date.nameOfMonth(),date.year()); -*/ - // The following line causes an error in GCC 2.1 -// long daysBetween = date-refDate; - // ... but this seems to get round it. - wxDate tmp1(date); - wxDate tmp2(refDate); - long daysBetween = tmp1 - tmp2; - - return wxTime(seconds_in_day*daysBetween + 60*60L*h + 60*m + s); -} - -wxTime::wxTime() -/* - Construct a wxTime for this instant. -*/ -{ - if (!wxTimeInitialized) - { - wxGetLocalTime(&TIME_ZONE, &DST_OBSERVED); - wxTimeInitialized = TRUE; - } - sec = wxGetCurrentTime(); - sec += 2177452800UL; /* seconds from 1/1/01 to 1/1/70 */ -} - -wxTime::wxTime(hourTy h, minuteTy m, secondTy s, bool dst) -/* - Construct a wxTime for today at the specified (local) hour, minute, and - second. -*/ -{ - if (!wxTimeInitialized) - { - wxGetLocalTime(&TIME_ZONE, &DST_OBSERVED); - wxTimeInitialized = TRUE; - } - - sec = wxTime(wxDate(),h,m,s,dst).sec; -} - - -wxTime::wxTime(const wxDate& date, hourTy h, minuteTy m, secondTy s, bool dst) -/* - Construct a wxTime for the specified (local) Date, hour, minute, and - second. -*/ -{ - if (!wxTimeInitialized) - { - wxGetLocalTime(&TIME_ZONE, &DST_OBSERVED); - wxTimeInitialized = TRUE; - } - sec = GetLocalTime(date,h,m,s).sec-3600; - if (IsDST()) - { - sec += 3600; - if (IsDST() || dst) sec -= 3600; - } - else - { - sec += 3600; -/* - if (IsDST()) setError(NIHCL_BADTIME,DEFAULT, - date.dayOfMonth(),date.nameOfMonth(),date.year(), - h,m,s,(dst?_("DST"):"")); -*/ - } - sec += TIME_ZONE; // adjust to GMT -} - -wxTime::operator wxDate() const -/* - Convert a wxTime to a local wxDate -*/ -{ -// return wxDate((int)(GetLocalTime().sec/seconds_in_day)); 4.2 cc bug - long daycount = (long)(GetLocalTime().sec/seconds_in_day); - - wxDate date(1,1,1901); - date += daycount; - return date; -} - -bool wxTime::IsBetween(const wxTime& a, const wxTime& b) const -{ - return *this >= a && *this <= b; -} - -hourTy wxTime::GetHour() const -/* - Return the hour of this wxTime in local time; i.e., adjust for - time zone and Daylight Savings Time. -*/ -{ - return GetLocalTime().GetHourGMT(); -} - -hourTy wxTime::GetHourGMT() const -/* - Return the hour of this Time in GMT. -*/ -{ - return (hourTy)((sec % 86400) / 3600); -} - -wxTime wxTime::GetBeginDST(unsigned year) -/* - Return the local Standard Time at which Daylight Savings Time - begins in the specified year. -*/ -{ - // Previous Sunday - wxTime DSTtime(GetLocalTime(wxDate(3,31,year).Previous(1)+7,2)); - if (year<=1986) { - // Previous Sunday - DSTtime = GetLocalTime(wxDate(4,30,year).Previous(1),2); - if (year==1974) DSTtime = GetLocalTime(wxDate(1,6,1974),2); - if (year==1975) DSTtime = GetLocalTime(wxDate(2,23,1975),2); - } - return DSTtime; -} - -wxTime wxTime::GetEndDST(unsigned year) -/* - Return the local Standard Time at which Daylight Savings Time - ends in the specified year. -*/ -{ - wxTime STDtime(GetLocalTime(wxDate(10,31,year).Previous(1),2-1)); - return STDtime; -} - -bool wxTime::IsDST() const -/* - Return TRUE if this local Standard Time should be adjusted - for Daylight Savings Time. -*/ -{ - long daycount = (long)(sec/seconds_in_day); - - // At this point, daycount is the number of days from 1/1/1901. - // Need to convert to julian date (which starts at 1/1/4713 B.C.) - wxDate date(1,1,1901); - date += daycount; - - unsigned year = date.GetYear(); - if (DST_OBSERVED) - { - if (*this >= GetBeginDST(year)) - if (*this < GetEndDST(year)) return TRUE; - } - return FALSE; -} - -wxTime wxTime::GetLocalTime() const -/* - Adjusts this GM Time for local time zone and Daylight Savings Time. -*/ -{ - wxTime local_time(sec-TIME_ZONE); - if (local_time.IsDST()) local_time.sec += 3600; - return local_time; -} - -minuteTy wxTime::GetMinute() const -/* - Return the minute of this wxTime in local time; i.e., adjust - for time zone and Daylight Savings Time. -*/ -{ - return GetLocalTime().GetMinuteGMT(); -} - -minuteTy wxTime::GetMinuteGMT() const -/* - Return the minute of this wxTime in GMT. -*/ -{ - return (minuteTy)(((sec % 86400) % 3600) / 60); -} - -secondTy wxTime::GetSecond() const -/* - Return the second of this wxTime. -*/ -{ - return (secondTy)(((sec % 86400) % 3600) % 60); -} - -wxTime wxTime::Max(const wxTime& t) const -{ - if (t < *this) return *this; - return t; -} - -wxTime wxTime::Min(const wxTime& t) const -{ - if (t > *this) return *this; - return t; -} - -wxTime::operator char *(void) -{ - return FormatTime(); -} - -void wxTime::SetFormat(const wxTime::tFormat lFormat, - const wxTime::tPrecision lPrecision) { - - wxTime::Format = lFormat; - wxTime::Precision = lPrecision; -} - -char *wxTime::FormatTime() const { - static char timeBuf[30]; - unsigned hh(GetHour()); - - switch (Format) { - case wx12h: - hh -= 12; - break; - case wx24h: - break; - } - - switch (Precision) { - case wxStdMinSec: - sprintf(timeBuf,"%2d:%02d:%02d",hh,GetMinute(),GetSecond()); - break; - case wxStdMin: - sprintf(timeBuf,"%2d:%02d",hh,GetMinute()); - break; - } - - if (Format == wx12h) - if (GetHour() <= 12) - strcat(timeBuf,_("am")); - else - strcat(timeBuf,_("pm")); - - return timeBuf; -} - -/* -int wxTime::compare(const Object& ob) const -{ - assertArgSpecies(ob,classDesc,"compare"); - register clockTy t = castdown(ob).sec; - if (sec < t) return -1; - if (sec > t) return 1; - return 0; -} - -void wxTime::deepenShallowCopy() {} - -unsigned wxTime::hash() const { return sec; } - -bool wxTime::isEqual(const Object& ob) const -{ - return ob.isSpecies(classDesc) && *this==castdown(ob); -} - -const Class* wxTime::species() const { return &classDesc; } - -void wxTime::printOn(ostream& strm) const -{ - register unsigned hh = GetHour(); - wxDate(*this).printOn(strm); - strm << ' ' << ((hh <= 12) ? hh : hh-12) << ':' - << setfill('0') << setw(2) << GetMinute() << ':' - << setfill('0') << setw(2) << GetSecond() << ' '; - if (hh < 12) strm << _("am"); - else strm << _("pm"); -} - -wxTime::wxTime(OIOin& strm) - : BASE(strm) -{ - unsigned long usec; - strm >> sec >> usec; -} - -void wxTime::storer(OIOout& strm) const -{ - BASE::storer(strm); - strm << sec << 0l; -} - - -wxTime::wxTime(OIOifd& fd) - : BASE(fd) -{ - unsigned long usec; - fd >> sec >> usec; -} - -void wxTime::storer(OIOofd& fd) const -{ - BASE::storer(fd); - fd << sec << 0l; -} -*/ - -#endif diff --git a/src/common/timercmn.cpp b/src/common/timercmn.cpp deleted file mode 100644 index f25a817409..0000000000 --- a/src/common/timercmn.cpp +++ /dev/null @@ -1,210 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: timercmn.cpp -// Purpose: Common timer implementation -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -//#pragma implementation "timercmn.h" -#pragma implementation -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#include "wx/list.h" -#endif - -#include "wx/timer.h" - -#ifdef __SVR4__ -#define __SYSV__ -#endif - -#include -#include - -#if (!defined(__SC__) && !defined(__SGI__) && !defined(__GNUWIN32__)) || defined(__MINGW32__) -#include -#endif - -#if defined(__linux__) || defined(__SVR4__) || defined(__SYSV__) || defined(__SGI__) || \ - defined(__ALPHA__) || defined(__GNUWIN32__) || defined(__FreeBSD__) || defined(__NetBSD__) -#include -#endif - -#ifdef __MINGW32__ -#include "windows.h" -#endif - -#if defined(__SUN__) || defined(__OSF__) -// At least on Sun, ftime is undeclared. -// Need to be verified on other platforms. -extern "C" int ftime(struct timeb *tp); -// extern "C" time_t time(time_t); -// #include -#if defined(__SVR4__) && !defined(__ALPHA__) -// ditto for gettimeofday on Solaris 2.x. -extern "C" int gettimeofday(struct timeval *tp, void *); -#endif -#endif - -/* - * Timer functions - * - */ - -long wxStartTime = 0; -void wxStartTimer(void) -{ -#if defined(__xlC__) || defined(__AIX__) || defined(__SVR4__) || defined(__SYSV__) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) // || defined(__AIXV3__) - struct timeval tp; -#ifdef __SYSV__ - gettimeofday(&tp, (struct timezone *)NULL); -#else - gettimeofday(&tp); -#endif - wxStartTime = 1000*tp.tv_sec + tp.tv_usec/1000; -#elif (defined(__SC__) || defined(__SGI__) || defined(___BSDI__) || defined(__ALPHA__) || defined(__MINGW32__)) - time_t t0; - struct tm *tp; - time(&t0); - tp = localtime(&t0); - wxStartTime = 1000*(60*(60*tp->tm_hour+tp->tm_min)+tp->tm_sec); -#else - struct timeb tp; - ftime(&tp); - wxStartTime = 1000*tp.time + tp.millitm; -#endif -} - -// Returns elapsed time in milliseconds -long wxGetElapsedTime(bool resetTimer) -{ -#if defined(__xlC__) || defined(__AIX__) || defined(__SVR4__) || defined(__SYSV__) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) // || defined(__AIXV3__) - struct timeval tp; -#ifdef __SYSV__ - gettimeofday(&tp, (struct timezone *)NULL); -#else - gettimeofday(&tp); -#endif - long oldTime = wxStartTime; - long newTime = 1000*tp.tv_sec + tp.tv_usec / 1000; - if (resetTimer) - wxStartTime = newTime; -#elif (defined(__SC__) || defined(__SGI__) || defined(___BSDI__) || defined(__ALPHA__) || defined(__MINGW32__)) - time_t t0; - struct tm *tp; - time(&t0); - tp = localtime(&t0); - long oldTime = wxStartTime; - long newTime = 1000*(60*(60*tp->tm_hour+tp->tm_min)+tp->tm_sec); - if (resetTimer) - wxStartTime = newTime; -#else - struct timeb tp; - ftime(&tp); - long oldTime = wxStartTime; - long newTime = 1000*tp.time + tp.millitm; - if (resetTimer) - wxStartTime = newTime; -#endif - return newTime - oldTime; -} - -// EXPERIMENTAL: comment this out if it doesn't compile. -#ifndef __VMS__ -bool wxGetLocalTime(long *timeZone, int *dstObserved) -{ -#if defined(__MINGW32__) && defined(__EGCS__) - time_t t0; - struct tm *tp; - time(&t0); - tp = localtime(&t0); - *timeZone = timezone; // tp->tm_gmtoff; // ??? - *dstObserved = tp->tm_isdst; -#elif defined(__MINGW32__) - time_t t0; - struct tm *tp; - time(&t0); - tp = localtime(&t0); - timeb tz; - ftime(& tz); - *timeZone = tz._timezone; - *dstObserved = tp->tm_isdst; -#else - -#if (((defined(__SYSV__) && !defined(__HPUX__)) || defined(__MSDOS__) || defined(__WXMSW__)) && !defined(__GNUWIN32__)) -#ifdef __BORLANDC__ - /* Borland uses underscores */ - *timeZone = _timezone; - *dstObserved = _daylight; -#else - *timeZone = timezone; - *dstObserved = daylight; -#endif -#elif defined(__xlC__) || defined(__AIX__) || defined(__SVR4__) || defined(__SYSV__) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) // || defined(__AIXV3__) - struct timeval tp; -#if defined(__SYSV__) || (defined(__GNUWIN32__) && !defined(__MINGW32)) - struct timezone tz; - gettimeofday(&tp, &tz); - *timeZone = 60*(tz.tz_minuteswest); - *dstObserved = tz.tz_dsttime; -#else - time_t t0; - struct tm *tp; - time(&t0); - tp = localtime(&t0); - *timeZone = tp->tm_gmtoff; // ??? - *dstObserved = tp->tm_isdst; -#endif -#elif defined(__WXSTUBS__) - return FALSE; -#else -// #error wxGetLocalTime not implemented. - struct timeval tp; - struct timezone tz; - gettimeofday(&tp, &tz); - *timeZone = 60*(tz.tz_minuteswest); - *dstObserved = tz.tz_dsttime; -#endif -#endif - // __MINGW32__ - return TRUE; -} -#endif - -// Get number of seconds since 00:00:00 GMT, Jan 1st 1970. -long wxGetCurrentTime(void) -{ -#if defined(__xlC__) || defined(__AIX__) || defined(__SVR4__) || defined(__SYSV__) // || defined(__AIXV3__) - struct timeval tp; -#ifdef __SYSV__ - gettimeofday(&tp, (struct timezone *)NULL); -#else - gettimeofday(&tp); -#endif - return tp.tv_sec; -#else // (defined(__SC__) || defined(__SGI__) || defined(___BSDI__) || defined(__ALPHA__)) - return time(0); -#endif -/* -#else - struct timeb tp; - ftime(&tp); - return tp.time; -#endif -*/ -} - diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp deleted file mode 100644 index 37d62161f6..0000000000 --- a/src/common/utilscmn.cpp +++ /dev/null @@ -1,742 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: utilscmn.cpp -// Purpose: Miscellaneous utility functions and classes -// Author: Julian Smart -// Modified by: -// Created: 29/01/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "utils.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#include "wx/utils.h" -#include "wx/window.h" -#include "wx/menu.h" -#include "wx/frame.h" -#endif - -#if USE_IOSTREAMH -#include -#else -#include -#endif - -#include -#include -#include -#include -#include -#if !defined(__WATCOMC__) -#if !(defined(_MSC_VER) && (_MSC_VER > 800)) -#include -#endif -#endif -#include -#include -#include - -// Pattern matching code. -// Yes, this path is deliberate (for Borland compilation) -#ifdef wx_mac /* MATTHEW: [5] Mac doesn't like paths with "/" */ -#include "glob.inc" -#else -#include "../common/glob.inc" -#endif - -#ifdef __WXMSW__ -#include "windows.h" -#endif - -#define _MAXPATHLEN 500 - -extern char *wxBuffer; - -#ifdef __VMS__ -// we have no strI functions under VMS, therefore I have implemented -// an inefficient but portable version: convert copies of strings to lowercase -// and then use the normal comparison -static void myLowerString(char *s) -{ - while(*s){ - if(isalpha(*s)) *s = (char)tolower(*s); - s++; - } -} - -int strcasecmp(const char *str_1, const char *str_2) -{ - char *temp1 = new char[strlen(str_1)+1]; - char *temp2 = new char[strlen(str_2)+1]; - strcpy(temp1,str_1); - strcpy(temp2,str_2); - myLowerString(temp1); - myLowerString(temp2); - - int result = strcmp(temp1,temp2); - delete[] temp1; - delete[] temp2; - - return(result); -} - -int strncasecmp(const char *str_1, const char *str_2, size_t maxchar) -{ - char *temp1 = new char[strlen(str_1)+1]; - char *temp2 = new char[strlen(str_2)+1]; - strcpy(temp1,str_1); - strcpy(temp2,str_2); - myLowerString(temp1); - myLowerString(temp2); - - int result = strncmp(temp1,temp2,maxchar); - delete[] temp1; - delete[] temp2; - - return(result); -} -#endif - -#ifdef __WINDOWS__ - -#ifndef __GNUWIN32__ -#define strcasecmp stricmp -#define strncasecmp strnicmp -#endif - -#ifdef _MSC_VER -#pragma warning (disable : 4245) -#endif - -#ifdef _MSC_VER -#pragma warning (default : 4245) -#endif - -#else -// This declaration is missing in SunOS! -// (Yes, I know it is NOT ANSI-C but its in BSD libc) -#if defined(__xlC) || defined(__AIX__) || defined(__GNUG__) -extern "C" -{ - int strcasecmp (const char *, const char *); - int strncasecmp (const char *, const char *, size_t); -} -#endif -#endif /* __WXMSW__ */ - - -char * -copystring (const char *s) -{ - if (s == NULL) s = ""; - size_t len = strlen (s) + 1; - - char *news = new char[len]; - memcpy (news, s, len); // Should be the fastest - - return news; -} - -// Id generation -static long wxCurrentId = 100; - -long -wxNewId (void) -{ - return wxCurrentId++; -} - -long -wxGetCurrentId(void) { return wxCurrentId; } - -void -wxRegisterId (long id) -{ - if (id >= wxCurrentId) - wxCurrentId = id + 1; -} - -void -StringToFloat (char *s, float *number) -{ - if (s && *s && number) - *number = (float) strtod (s, (char **) NULL); -} - -void -StringToDouble (char *s, double *number) -{ - if (s && *s && number) - *number = strtod (s, (char **) NULL); -} - -char * -FloatToString (float number, const char *fmt) -{ - static char buf[256]; - -// sprintf (buf, "%.2f", number); - sprintf (buf, fmt, number); - return buf; -} - -char * -DoubleToString (double number, const char *fmt) -{ - static char buf[256]; - - sprintf (buf, fmt, number); - return buf; -} - -void -StringToInt (char *s, int *number) -{ - if (s && *s && number) - *number = (int) strtol (s, (char **) NULL, 10); -} - -void -StringToLong (char *s, long *number) -{ - if (s && *s && number) - *number = strtol (s, (char **) NULL, 10); -} - -char * -IntToString (int number) -{ - static char buf[20]; - - sprintf (buf, "%d", number); - return buf; -} - -char * -LongToString (long number) -{ - static char buf[20]; - - sprintf (buf, "%ld", number); - return buf; -} - -// Array used in DecToHex conversion routine. -static char hexArray[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', - 'C', 'D', 'E', 'F' }; - -// Convert 2-digit hex number to decimal -int wxHexToDec(char *buf) -{ - int firstDigit, secondDigit; - - if (buf[0] >= 'A') - firstDigit = buf[0] - 'A' + 10; - else - firstDigit = buf[0] - '0'; - - if (buf[1] >= 'A') - secondDigit = buf[1] - 'A' + 10; - else - secondDigit = buf[1] - '0'; - - return firstDigit * 16 + secondDigit; -} - -// Convert decimal integer to 2-character hex string -void wxDecToHex(int dec, char *buf) -{ - int firstDigit = (int)(dec/16.0); - int secondDigit = (int)(dec - (firstDigit*16.0)); - buf[0] = hexArray[firstDigit]; - buf[1] = hexArray[secondDigit]; - buf[2] = 0; -} - -// Match a string INDEPENDENT OF CASE -bool -StringMatch (char *str1, char *str2, bool subString, bool exact) -{ - if (str1 == NULL || str2 == NULL) - return FALSE; - if (str1 == str2) - return TRUE; - - if (subString) - { - int len1 = strlen (str1); - int len2 = strlen (str2); - int i; - - // Search for str1 in str2 - // Slow .... but acceptable for short strings - for (i = 0; i <= len2 - len1; i++) - { - if (strncasecmp (str1, str2 + i, len1) == 0) - return TRUE; - } - } - else if (exact) - { - if (strcasecmp (str1, str2) == 0) - return TRUE; - } - else - { - int len1 = strlen (str1); - int len2 = strlen (str2); - - if (strncasecmp (str1, str2, wxMin (len1, len2)) == 0) - return TRUE; - } - - return FALSE; -} - -// Return the current date/time -// [volatile] -wxString wxNow( void ) -{ - time_t now = time((time_t *) NULL); - char *date = ctime(&now); - date[24] = '\0'; - return wxString(date); -} - -/* Get Full RFC822 style email address */ -bool -wxGetEmailAddress (char *address, int maxSize) -{ - char host[65]; - char user[65]; - - if (wxGetHostName(host, 64) == FALSE) - return FALSE; - if (wxGetUserId(user, 64) == FALSE) - return FALSE; - - char tmp[130]; - strcpy(tmp, user); - strcat(tmp, "@"); - strcat(tmp, host); - - strncpy(address, tmp, maxSize - 1); - address[maxSize-1] = '\0'; - return TRUE; -} - -/* - * Strip out any menu codes - */ - -char *wxStripMenuCodes (char *in, char *out) -{ - if (!in) - return (char *) NULL; - - if (!out) - out = copystring(in); - - char *tmpOut = out; - - while (*in) - { - if (*in == '&') - { - // Check && -> &, &x -> x - if (*++in == '&') - *out++ = *in++; - } - else if (*in == '\t') - { - // Remove all stuff after \t in X mode, and let the stuff as is - // in Windows mode. - // Accelerators are handled in wx_item.cc for Motif, and are not - // YET supported in XView - break; - } - else - *out++ = *in++; - } // while - - *out = '\0'; - - return tmpOut; -} - - -/* - * Window search functions - * - */ - -/* - * If parent is non-NULL, look through children for a label or title - * matching the specified string. If NULL, look through all top-level windows. - * - */ - -static wxWindow *wxFindWindowByLabel1 (const wxString& title, wxWindow * parent); - -wxWindow * -wxFindWindowByLabel (const wxString& title, wxWindow * parent) -{ - if (parent) - { - return wxFindWindowByLabel1 (title, parent); - } - else - { - for (wxNode * node = wxTopLevelWindows.First (); node; node = node->Next ()) - { - wxWindow *win = (wxWindow *) node->Data (); - wxWindow *retwin = wxFindWindowByLabel1 (title, win); - if (retwin) - return retwin; - } // for() - - } - return (wxWindow *) NULL; -} - -// Recursive -static wxWindow * -wxFindWindowByLabel1 (const wxString& title, wxWindow * parent) -{ - if (parent) - { - if (parent->GetLabel() == title) - return parent; - } - - if (parent) - { - for (wxNode * node = parent->GetChildren()->First (); node; node = node->Next ()) - { - wxWindow *win = (wxWindow *) node->Data (); - wxWindow *retwin = wxFindWindowByLabel1 (title, win); - if (retwin) - return retwin; - } // for() - - } - - return (wxWindow *) NULL; // Not found - -} - -/* - * If parent is non-NULL, look through children for a name - * matching the specified string. If NULL, look through all top-level windows. - * - */ - -static wxWindow *wxFindWindowByName1 (const wxString& title, wxWindow * parent); - -wxWindow * -wxFindWindowByName (const wxString& title, wxWindow * parent) -{ - if (parent) - { - return wxFindWindowByName1 (title, parent); - } - else - { - for (wxNode * node = wxTopLevelWindows.First (); node; node = node->Next ()) - { - wxWindow *win = (wxWindow *) node->Data (); - wxWindow *retwin = wxFindWindowByName1 (title, win); - if (retwin) - return retwin; - } // for() - - } - // Failed? Try by label instead. - return wxFindWindowByLabel(title, parent); -} - -// Recursive -static wxWindow * -wxFindWindowByName1 (const wxString& title, wxWindow * parent) -{ - if (parent) - { - if ( parent->GetName() == title ) - return parent; - } - - if (parent) - { - for (wxNode * node = parent->GetChildren()->First (); node; node = node->Next ()) - { - wxWindow *win = (wxWindow *) node->Data (); - wxWindow *retwin = wxFindWindowByName1 (title, win); - if (retwin) - return retwin; - } // for() - - } - - return (wxWindow *) NULL; // Not found - -} - -// Returns menu item id or -1 if none. -int -wxFindMenuItemId (wxFrame * frame, const wxString& menuString, const wxString& itemString) -{ - wxMenuBar *menuBar = frame->GetMenuBar (); - if (!menuBar) - return -1; - return menuBar->FindMenuItem (menuString, itemString); -} - -/* - * wxDebugStreamBuf - */ -#if !defined(_WINDLL) - -wxDebugStreamBuf::wxDebugStreamBuf(void) -{ - if (allocate()) setp(base(),ebuf()); -} - -int wxDebugStreamBuf::overflow(int WXUNUSED(i)) -{ - int len = pptr() - pbase(); - char *txt = new char[len+1]; - strncpy(txt, pbase(), len); - txt[len] = '\0'; -#ifdef __WXMSW__ - OutputDebugString((LPCSTR)txt); -#else - fprintf(stderr, txt); -#endif - setp(pbase(), epptr()); - delete[] txt; - return EOF; -} - -int wxDebugStreamBuf::sync(void) -{ - int len = pptr() - pbase(); - char *txt = new char[len+1]; - strncpy(txt, pbase(), len); - txt[len] = '\0'; -#ifdef __WXMSW__ - OutputDebugString((LPCSTR)txt); -#else - fprintf(stderr, txt); -#endif - setp(pbase(), epptr()); - delete[] txt; - return 0; -} - -#endif - -/* -On Fri, 21 Jul 1995, Paul Craven wrote: - -> Is there a way to find the path of running program's executable? I can get -> my home directory, and the current directory, but I don't know how to get the -> executable directory. -> - -The code below (warty as it is), does what you want on most Unix, -DOS, and Mac platforms (it's from the ALS Prolog main). - -|| Ken Bowen Applied Logic Systems, Inc. PO Box 180, -||==== Voice: +1 (617)965-9191 Newton Centre, -|| FAX: +1 (617)965-1636 MA 02159 USA - Email: ken@als.com WWW: http://www.als.com ------------------------------------------------------------------------- -*/ - -// This code is commented out but it may be integrated with wxWin at -// a later date, after testing. Thanks Ken! -#if 0 - -/*--------------------------------------------------------------------* - | whereami is given a filename f in the form: whereami(argv[0]) - | It returns the directory in which the executable file (containing - | this code [main.c] ) may be found. A dot will be returned to indicate - | the current directory. - *--------------------------------------------------------------------*/ - -static void -whereami(name) - char *name; -{ - register char *cutoff = NULL; /* stifle -Wall */ - register char *s; - register char *t; - int cc; - char ebuf[4096]; - - /* - * See if the file is accessible either through the current directory - * or through an absolute path. - */ - - if (access(name, R_OK) == 0) { - - /*-------------------------------------------------------------* - * The file was accessible without any other work. But the current - * working directory might change on us, so if it was accessible - * through the cwd, then we should get it for later accesses. - *-------------------------------------------------------------*/ - - t = imagedir; - if (!absolute_pathname(name)) { -#if defined(DOS) || defined(__WIN32__) - int drive; - char *newrbuf; - - newrbuf = imagedir; -#ifndef __DJGPP__ - if (*(name + 1) == ':') { - if (*name >= 'a' && *name <= 'z') - drive = (int) (*name - 'a' + 1); - else - drive = (int) (*name - 'A' + 1); - *newrbuf++ = *name; - *newrbuf++ = *(name + 1); - *newrbuf++ = DIR_SEPARATOR; - } - else { - drive = 0; - *newrbuf++ = DIR_SEPARATOR; - } - if (getcwd(newrbuf, drive) == 0) { /* } */ -#else - if (getcwd(newrbuf, 1024) == 0) { /* } */ -#endif -#else /* DOS */ -#ifdef HAVE_GETWD - if (getwd(imagedir) == 0) { /* } */ -#else /* !HAVE_GETWD */ - if (getcwd(imagedir, 1024) == 0) { -#endif /* !HAVE_GETWD */ -#endif /* DOS */ - fatal_error(FE_GETCWD, 0); - } - for (; *t; t++) /* Set t to end of buffer */ - ; - if (*(t - 1) == DIR_SEPARATOR) /* leave slash if already - * last char - */ - cutoff = t - 1; - else { - cutoff = t; /* otherwise put one in */ - *t++ = DIR_SEPARATOR; - } - } -#if (!defined(__MAC__) && !defined(__DJGPP__) && !defined(__GO32__) && !defined(__WIN32__)) - else - (*t++ = DIR_SEPARATOR); -#endif - - /*-------------------------------------------------------------* - * Copy the rest of the string and set the cutoff if it was not - * already set. If the first character of name is a slash, cutoff - * is not presently set but will be on the first iteration of the - * loop below. - *-------------------------------------------------------------*/ - - for ((*name == DIR_SEPARATOR ? (s = name+1) : (s = name));;) { - if (*s == DIR_SEPARATOR) - cutoff = t; - if (!(*t++ = *s++)) - break; - } - - } - else { - - /*-------------------------------------------------------------* - * Get the path list from the environment. If the path list is - * inaccessible for any reason, leave with fatal error. - *-------------------------------------------------------------*/ - -#ifdef __MAC__ - if ((s = getenv("Commands")) == (char *) 0) -#else - if ((s = getenv("PATH")) == (char *) 0) -#endif - fatal_error(FE_PATH, 0); - - /* - * Copy path list into ebuf and set the source pointer to the - * beginning of this buffer. - */ - - strcpy(ebuf, s); - s = ebuf; - - for (;;) { - t = imagedir; - while (*s && *s != PATH_SEPARATOR) - *t++ = *s++; - if (t > imagedir && *(t - 1) == DIR_SEPARATOR) - ; /* do nothing -- slash already is in place */ - else - *t++ = DIR_SEPARATOR; /* put in the slash */ - cutoff = t - 1; /* set cutoff */ - strcpy(t, name); - if (access(imagedir, R_OK) == 0) - break; - - if (*s) - s++; /* advance source pointer */ - else - fatal_error(FE_INFND, 0); - } - - } - - /*-------------------------------------------------------------* - | At this point the full pathname should exist in imagedir and - | cutoff should be set to the final slash. We must now determine - | whether the file name is a symbolic link or not and chase it down - | if it is. Note that we reuse ebuf for getting the link. - *-------------------------------------------------------------*/ - -#ifdef HAVE_SYMLINK - while ((cc = readlink(imagedir, ebuf, 512)) != -1) { - ebuf[cc] = 0; - s = ebuf; - if (*s == DIR_SEPARATOR) { - t = imagedir; - } - else { - t = cutoff + 1; - } - for (;;) { - if (*s == DIR_SEPARATOR) - cutoff = t; /* mark the last slash seen */ - if (!(*t++ = *s++)) /* copy the character */ - break; - } - } - -#endif /* HAVE_SYMLINK */ - - strcpy(imagename, cutoff + 1); /* keep the image name */ - *(cutoff + 1) = 0; /* chop off the filename part */ -} - -#endif - diff --git a/src/common/validate.cpp b/src/common/validate.cpp deleted file mode 100644 index fe0ec85316..0000000000 --- a/src/common/validate.cpp +++ /dev/null @@ -1,44 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: validate.cpp -// Purpose: wxValidator -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "validate.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "wx/validate.h" - -const wxValidator wxDefaultValidator; - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxValidator, wxEvtHandler) -#endif - -wxValidator::wxValidator(void) -{ - m_validatorWindow = (wxWindow *) NULL; -} - -wxValidator::~wxValidator() -{ -} - - diff --git a/src/common/valtext.cpp b/src/common/valtext.cpp deleted file mode 100644 index 3973230d80..0000000000 --- a/src/common/valtext.cpp +++ /dev/null @@ -1,294 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: valtext.cpp -// Purpose: wxTextValidator -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "valtext.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/textctrl.h" -#include "wx/utils.h" -#include "wx/msgdlg.h" -#include "wx/intl.h" -#endif - -#include "wx/valtext.h" - -#include -#include -#include - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxTextValidator, wxValidator) - -BEGIN_EVENT_TABLE(wxTextValidator, wxValidator) - EVT_CHAR(wxTextValidator::OnChar) -END_EVENT_TABLE() -#endif - -wxTextValidator::wxTextValidator(long style, wxString *val) -{ - m_validatorStyle = style ; - m_stringValue = val ; -/* - m_refData = new wxVTextRefData; - - M_VTEXTDATA->m_validatorStyle = style ; - M_VTEXTDATA->m_stringValue = val ; -*/ -} - -wxTextValidator::wxTextValidator(const wxTextValidator& val) -{ - Copy(val); -} - -bool wxTextValidator::Copy(const wxTextValidator& val) -{ - wxValidator::Copy(val); - - m_validatorStyle = val.m_validatorStyle ; - m_stringValue = val.m_stringValue ; - - wxNode *node = val.m_includeList.First() ; - while ( node ) - { - char *s = (char *)node->Data(); - m_includeList.Add(s); - node = node->Next(); - } - node = val.m_excludeList.First() ; - while ( node ) - { - char *s = (char *)node->Data(); - m_excludeList.Add(s); - node = node->Next(); - } - return TRUE; -} - -wxTextValidator::~wxTextValidator() -{ -} - -static bool wxIsAlpha(const wxString& val) -{ - int i; - for ( i = 0; i < (int)val.Length(); i++) - { - if (!isalpha(val[i])) - return FALSE; - } - return TRUE; -} - -static bool wxIsAlphaNumeric(const wxString& val) -{ - int i; - for ( i = 0; i < (int)val.Length(); i++) - { - if (!isalnum(val[i])) - return FALSE; - } - return TRUE; -} - -// Called when the value in the window must be validated. -// This function can pop up an error message. -bool wxTextValidator::Validate(wxWindow *parent) -{ - if ( !m_validatorWindow ) - return FALSE; - if ( !m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) ) - return FALSE; - if ( !m_stringValue ) - return FALSE; - - wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ; - - // If window is disabled, don't validate - if ( !control->Enabled() ) - return FALSE; - - wxString val(control->GetValue()); - - if ( m_validatorStyle & wxFILTER_INCLUDE_LIST ) - { - if ( !m_includeList.Member(val) ) - { - char buf[512]; - sprintf(buf, _("%s is invalid."), (const char *)val); - wxMessageBox(buf, _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent); - return FALSE; - } - } - if ( m_validatorStyle & wxFILTER_EXCLUDE_LIST ) - { - if ( m_excludeList.Member(val) ) - { - char buf[512]; - sprintf(buf, _("%s is invalid."), (const char *)val); - wxMessageBox(buf, _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent); - return FALSE; - } - } - if ( (m_validatorStyle & wxFILTER_ASCII) && !val.IsAscii() ) - { - char buf[512]; - sprintf(buf, _("%s should only contain ASCII characters."), (const char *)val); - wxMessageBox(buf, _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent); - return FALSE; - } - if ( (m_validatorStyle & wxFILTER_ALPHA) && !wxIsAlpha(val) ) - { - char buf[512]; - sprintf(buf, _("%s should only contain alphabetic characters."), (const char *)val); - wxMessageBox(buf, _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent); - return FALSE; - } - if ( (m_validatorStyle & wxFILTER_ALPHANUMERIC) && !wxIsAlphaNumeric(val)) - { - char buf[512]; - sprintf(buf, _("%s should only contain alphabetic or numeric characters."), (const char *)val); - wxMessageBox(buf,_("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent); - return FALSE; - } - if ( (m_validatorStyle & wxFILTER_NUMERIC) && !val.IsNumber()) - { - char buf[512]; - sprintf(buf, _("%s should be numeric."), (const char *)val); - wxMessageBox(buf, _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent); - return FALSE; - } - - return TRUE ; -} - -// Called to transfer data to the window -bool wxTextValidator::TransferToWindow(void) -{ - if ( !m_validatorWindow ) - return FALSE; - if ( !m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) ) - return FALSE; - if ( !m_stringValue ) - return FALSE; - - wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ; - control->SetValue(* m_stringValue) ; - - return TRUE; -} - -// Called to transfer data to the window -bool wxTextValidator::TransferFromWindow(void) -{ - if ( !m_validatorWindow ) - return FALSE; - if ( !m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) ) - return FALSE; - if ( !m_stringValue ) - return FALSE; - - wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ; - * m_stringValue = control->GetValue() ; - - return TRUE; -} - -void wxTextValidator::SetIncludeList(const wxStringList& list) -{ -/* - if ( !M_VTEXTDATA ) - return; -*/ - - m_includeList.Clear(); - // TODO: replace with = - wxNode *node = list.First() ; - while ( node ) - { - char *s = (char *)node->Data(); - m_includeList.Add(s); - node = node->Next(); - } -} - -void wxTextValidator::SetExcludeList(const wxStringList& list) -{ -/* - if ( !M_VTEXTDATA ) - return; -*/ - - m_excludeList.Clear(); - // TODO: replace with = - wxNode *node = list.First() ; - while ( node ) - { - char *s = (char *)node->Data(); - m_excludeList.Add(s); - node = node->Next(); - } -} - -void wxTextValidator::OnChar(wxKeyEvent& event) -{ -/* - if ( !M_VTEXTDATA ) - return; -*/ - - if ( !m_validatorWindow ) - return; - - wxTextCtrl *textCtrl = (wxTextCtrl *)m_validatorWindow; - - int keyCode = event.KeyCode(); - if ( keyCode == WXK_DELETE || keyCode == WXK_RETURN || keyCode == WXK_BACK) - { - textCtrl->wxTextCtrl::OnChar(event); - return ; - } - - if ( (m_validatorStyle & wxFILTER_ASCII) && !isascii(keyCode) ) - { - wxBell(); - return; - } - if ( (m_validatorStyle & wxFILTER_ALPHA) && !isalpha(keyCode) ) - { - wxBell(); - return; - } - if ( (m_validatorStyle & wxFILTER_ALPHANUMERIC) && !isalnum(keyCode) ) - { - wxBell(); - return; - } - if ( (m_validatorStyle & wxFILTER_NUMERIC) && !isdigit(keyCode) && keyCode != '.' ) - { - wxBell(); - return; - } - - textCtrl->wxTextCtrl::OnChar(event); -} - - diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp deleted file mode 100644 index 087ab89f12..0000000000 --- a/src/common/wincmn.cpp +++ /dev/null @@ -1,64 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: windows.cpp -// Purpose: common (to all ports) wxWindow functions -// Author: Julian Smart, Vadim Zeitlin -// Modified by: -// Created: 13/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include "wx/frame.h" - -#include "wx/defs.h" -#include "wx/window.h" - -// Do Update UI processing for child controls - -// TODO: should this be implemented for the child window rather -// than the parent? Then you can override it e.g. for wxCheckBox -// to do the Right Thing rather than having to assume a fixed number -// of control classes. -#include "wx/checkbox.h" -#include "wx/radiobut.h" - -void wxWindow::UpdateWindowUI() -{ - wxWindowID id = GetId(); - if (id > 0) - { - wxUpdateUIEvent event(id); - event.m_eventObject = this; - - if (this->GetEventHandler()->ProcessEvent(event)) - { - if (event.GetSetEnabled()) - this->Enable(event.GetEnabled()); - - if (event.GetSetText() && this->IsKindOf(CLASSINFO(wxControl))) - ((wxControl*)this)->SetLabel(event.GetText()); - - if (this->IsKindOf(CLASSINFO(wxCheckBox))) - { - if (event.GetSetChecked()) - ((wxCheckBox *) this)->SetValue(event.GetChecked()); - } - // @@@ No radio buttons in wxGTK yet -#ifndef __WXGTK__ - else if (this->IsKindOf(CLASSINFO(wxRadioButton))) - { - if (event.GetSetChecked()) - ((wxRadioButton *) this)->SetValue(event.GetChecked()); - } -#endif - } - } -} diff --git a/src/common/wxexpr.cpp b/src/common/wxexpr.cpp deleted file mode 100644 index 926cae3001..0000000000 --- a/src/common/wxexpr.cpp +++ /dev/null @@ -1,1252 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: wxexpr.cpp -// Purpose: wxExpr -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "wxexpr.h" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include -#include -#include -#include - -#include "wx/utils.h" - -#include "wx/expr.h" -#include "wx/wxexpr.h" - -extern "C" void add_expr(char *); -extern "C" void LexFromFile(FILE *fd); -extern "C" void LexFromString(char *buf); - -wxExprDatabase *thewxExprDatabase = NULL; -wxExprErrorHandler currentwxExprErrorHandler; - -IMPLEMENT_DYNAMIC_CLASS(wxExprDatabase, wxList) - -wxExpr::wxExpr(const wxString& functor) -{ - type = wxExprList; - next = NULL; - last = NULL; - value.first = NULL; - - wxExpr *pfunctor = new wxExpr(wxExprWord, functor); - Append(pfunctor); - client_data = NULL; -} - -wxExpr::wxExpr(wxExprType the_type, const wxString& word_or_string) -{ - type = the_type; - - switch (the_type) - { - case wxExprWord: - value.word = copystring((const char *)word_or_string); - break; - case wxExprString: - value.string = copystring((const char *)word_or_string); - break; - case wxExprList: - last = NULL; - value.first = NULL; - break; - case wxExprReal: - case wxExprInteger: - case wxExprNull: - break; - } - client_data = NULL; - next = NULL; -} - -wxExpr::wxExpr(wxExprType the_type, char *word_or_string, bool allocate) -{ - type = the_type; - - switch (the_type) - { - case wxExprWord: - value.word = allocate ? copystring(word_or_string) : word_or_string; - break; - case wxExprString: - value.string = allocate ? copystring(word_or_string) : word_or_string; - break; - case wxExprList: - last = NULL; - value.first = NULL; - break; - case wxExprReal: - case wxExprInteger: - case wxExprNull: - break; - } - client_data = NULL; - next = NULL; -} - -wxExpr::wxExpr(long the_integer) -{ - type = wxExprInteger; - value.integer = the_integer; - client_data = NULL; - next = NULL; -} - -wxExpr::wxExpr(double the_real) -{ - type = wxExprReal; - value.real = the_real; - client_data = NULL; - next = NULL; -} - -wxExpr::wxExpr(wxList *the_list) -{ - type = wxExprList; - client_data = NULL; - last = NULL; - value.first = NULL; - - wxExpr *listExpr = new wxExpr(wxExprList); - - wxNode *node = the_list->First(); - while (node) - { - wxExpr *expr = (wxExpr *)node->Data(); - listExpr->Append(expr); - node = node->Next(); - } - Append(listExpr); - - delete the_list; -} - -wxExpr::~wxExpr(void) -{ - switch (type) - { - case wxExprInteger: - case wxExprReal: - { - break; - } - case wxExprString: - { - delete[] value.string; - break; - } - case wxExprWord: - { - delete[] value.word; - break; - } - case wxExprList: - { - wxExpr *expr = value.first; - while (expr) - { - wxExpr *expr1 = expr->next; - - delete expr; - expr = expr1; - } - break; - } - case wxExprNull: break; - } -} - -void wxExpr::Append(wxExpr *expr) -{ - if (!value.first) - value.first = expr; - - if (last) - last->next = expr; - last = expr; -} - -void wxExpr::Insert(wxExpr *expr) -{ - expr->next = value.first; - value.first = expr; - - if (!last) - last = expr; -} - -wxExpr *wxExpr::Copy(void) const -{ - // This seems to get round an optimizer bug when - // using Watcom C++ 10a in WIN32 compilation mode. - // If these lines not present, the type seems to be - // interpreted wrongly as an integer. - // I don't want to turn optimization off since it's needed - // for reading in files quickly. -#if defined(__WATCOMC__) - char buf[2]; - sprintf(buf, ""); -#endif - - switch (type) - { - case wxExprInteger: - return new wxExpr(value.integer); - case wxExprReal: - return new wxExpr(value.real); - case wxExprString: - return new wxExpr(wxExprString, wxString(value.string)); - case wxExprWord: - return new wxExpr(wxExprWord, wxString(value.word)); - case wxExprList: - { - wxExpr *expr = value.first; - wxExpr *new_list = new wxExpr(wxExprList); - while (expr) - { - wxExpr *expr2 = expr->Copy(); - new_list->Append(expr2); - expr = expr->next; - } - return new_list; - } - case wxExprNull: - break; - } - return NULL; -} - - -// Get the wxExpr (containing (= wxExpr Value) form) for the given word -// or string, assuming that we have Attribute=Value, ... -wxExpr *wxExpr::GetAttributeValueNode(const wxString& word) const // Use only for a clause or list -{ - if (type != wxExprList) - return NULL; - - wxExpr *expr = value.first; - while (expr) - { - if (expr->type == wxExprList) - { - wxExpr *firstNode = expr->value.first; - if ((firstNode->type == wxExprWord) && (firstNode->value.word[0] == '=')) - { - wxExpr *secondNode = firstNode->next; - if ((secondNode->type == wxExprWord) && - (strcmp((const char *)word, secondNode->value.word) == 0)) - { - return expr; - } - } - } - expr = expr->next; - } - return NULL; -} - -// Get the value (in wxExpr form) for the given word or string, assuming -// that we have Attribute=Value, ... -wxExpr *wxExpr::AttributeValue(const wxString& word) const // Use only for a clause or list -{ - if (type != wxExprList) - return NULL; - - wxExpr *attExpr = GetAttributeValueNode(word); - if (attExpr && attExpr->value.first && attExpr->value.first->next) - return attExpr->value.first->next->next; - else return NULL; -} - -wxString wxExpr::Functor(void) const // Use only for a clause -{ - if ((type != wxExprList) || !value.first) - return wxString(""); - - if (value.first->type == wxExprWord) - return wxString(value.first->value.word); - else - return wxString(""); -} - -bool wxExpr::IsFunctor(const wxString& f) const // Use only for a clause -{ - if ((type != wxExprList) || !value.first) - return FALSE; - - return (value.first->type == wxExprWord && - (strcmp((const char *)f, value.first->value.word) == 0)); -} - -// Return nth argument of a clause (starting from 1) -wxExpr *wxExpr::Arg(wxExprType theType, int arg) const -{ - wxExpr *expr = value.first; - int i; - for (i = 1; i < arg; i++) - if (expr) - expr = expr->next; - - if (expr && (expr->type == theType)) - return expr; - else - return NULL; -} - -// Return nth argument of a list expression (starting from zero) -wxExpr *wxExpr::Nth(int arg) const -{ - if (type != wxExprList) - return NULL; - - wxExpr *expr = value.first; - int i; - for (i = 0; i < arg; i++) - if (expr) - expr = expr->next; - else return NULL; - - if (expr) - return expr; - else - return NULL; -} - - // Returns the number of elements in a list expression -int wxExpr::Number(void) const -{ - if (type != wxExprList) - return 0; - - int i = 0; - wxExpr *expr = value.first; - while (expr) - { - expr = expr->next; - i ++; - } - return i; -} - -void wxExpr::DeleteAttributeValue(const wxString& attribute) -{ - if (type != wxExprList) - return; - - wxExpr *expr = value.first; - wxExpr *lastExpr = this; - while (expr) - { - if (expr->type == wxExprList) - { - wxExpr *firstNode = expr->value.first; - if ((firstNode->type == wxExprWord) && (firstNode->value.word[0] == '=')) - { - wxExpr *secondNode = firstNode->next; - if ((secondNode->type == wxExprWord) && - (strcmp((const char *)attribute, secondNode->value.word) == 0)) - { - wxExpr *nextExpr = expr->next; - delete expr; - - lastExpr->next = nextExpr; - - if (last == expr) - last = lastExpr; - - return; - } - } - } - lastExpr = expr; - expr = expr->next; - } - return; -} - -void wxExpr::AddAttributeValue(const wxString& attribute, wxExpr *val) -{ - if (type != wxExprList) - { -// cout << "Error! tried to add an attribute-value pair to a nonlist wxExpr expression\n"; - return; - } - // Warning - existing code may assume that any existing value - // is deleted first. For efficiency, we leave this to the application. -// DeleteAttributeValue(attribute); - - wxExpr *patt = new wxExpr(wxExprWord, attribute); - wxExpr *pequals = new wxExpr(wxExprWord, "="); - - wxExpr *listExpr = new wxExpr(wxExprList); - - listExpr->Append(pequals); - listExpr->Append(patt); - listExpr->Append(val); - - Append(listExpr); -} - -void wxExpr::AddAttributeValue(const wxString& attribute, long val) -{ - if (type != wxExprList) - { -// cout << "Error! tried to add an attribute-value pair to a nonlist wxExpr expression\n"; - return; - } - // Warning - existing code may assume that any existing value - // is deleted first. For efficiency, we leave this to the application. -// DeleteAttributeValue(attribute); - - wxExpr *patt = new wxExpr(wxExprWord, attribute); - wxExpr *pval = new wxExpr(val); - wxExpr *pequals = new wxExpr(wxExprWord, "="); - - wxExpr *listExpr = new wxExpr(wxExprList); - - listExpr->Append(pequals); - listExpr->Append(patt); - listExpr->Append(pval); - - Append(listExpr); -} - -void wxExpr::AddAttributeValue(const wxString& attribute, double val) -{ - if (type != wxExprList) - { -// cout << "Error! tried to add an attribute-value pair to a nonlist wxExpr expression\n"; - return; - } - -// DeleteAttributeValue(attribute); - wxExpr *patt = new wxExpr(wxExprWord, attribute); - wxExpr *pval = new wxExpr(val); - wxExpr *pequals = new wxExpr(wxExprWord, "="); - - wxExpr *listExpr = new wxExpr(wxExprList); - - listExpr->Append(pequals); - listExpr->Append(patt); - listExpr->Append(pval); - - Append(listExpr); -} - -void wxExpr::AddAttributeValueString(const wxString& attribute, const wxString& val) -{ - if (type != wxExprList) - { -// cout << "Error! tried to add an attribute-value pair to a nonlist wxExpr expression\n"; - return; - } - -// DeleteAttributeValue(attribute); - - wxExpr *patt = new wxExpr(wxExprWord, attribute); - wxExpr *pval = new wxExpr(wxExprString, val); - wxExpr *pequals = new wxExpr(wxExprWord, "="); - - wxExpr *listExpr = new wxExpr(wxExprList); - - listExpr->Append(pequals); - listExpr->Append(patt); - listExpr->Append(pval); - - Append(listExpr); -} - -void wxExpr::AddAttributeValueWord(const wxString& attribute, const wxString& val) -{ - if (type != wxExprList) - { -// cout << "Error! tried to add an attribute-value pair to a nonlist wxExpr expression\n"; - return; - } - -// DeleteAttributeValue(attribute); - - wxExpr *patt = new wxExpr(wxExprWord, attribute); - wxExpr *pval = new wxExpr(wxExprWord, val); - wxExpr *pequals = new wxExpr(wxExprWord, "="); - - wxExpr *listExpr = new wxExpr(wxExprList); - - listExpr->Append(pequals); - listExpr->Append(patt); - listExpr->Append(pval); - - Append(listExpr); -} - -void wxExpr::AddAttributeValue(const wxString& attribute, wxList *val) -{ - if (type != wxExprList) - { -// cout << "Error! tried to add an attribute-value pair to a nonlist wxExpr expression\n"; - return; - } - if (!val) - return; - -// DeleteAttributeValue(attribute); - - wxExpr *patt = new wxExpr(wxExprWord, attribute); - wxExpr *pval = new wxExpr(val); - wxExpr *pequals = new wxExpr(wxExprWord, "="); - - wxExpr *listExpr = new wxExpr(wxExprList); - - listExpr->Append(pequals); - listExpr->Append(patt); - listExpr->Append(pval); - - Append(listExpr); -} - -void wxExpr::AddAttributeValueStringList(const wxString& attribute, wxList *string_list) -{ - if (type != wxExprList) - { -// cout << "Error! tried to add an attribute-value pair to a nonlist wxExpr expression\n"; - return; - } - if (!string_list) - return; - -// DeleteAttributeValue(attribute); - - // First make a list of wxExpr strings - wxExpr *listExpr = new wxExpr(wxExprList); - wxNode *node = string_list->First(); - while (node) - { - char *string = (char *)node->Data(); - wxExpr *expr = new wxExpr(wxExprString, wxString(string)); - listExpr->Append(expr); - node = node->Next(); - } - - // Now make an (=, Att, Value) triple - wxExpr *patt = new wxExpr(wxExprWord, attribute); - wxExpr *pequals = new wxExpr(wxExprWord, "="); - - wxExpr *listExpr2 = new wxExpr(wxExprList); - - listExpr2->Append(pequals); - listExpr2->Append(patt); - listExpr2->Append(listExpr); - - Append(listExpr2); -} - -bool wxExpr::GetAttributeValue(const wxString& att, int& var) const -{ - wxExpr *expr = AttributeValue(att); - - if (expr && (expr->Type() == wxExprInteger || expr->Type() == wxExprReal)) - { - var = (int)(expr->IntegerValue()); - return TRUE; - } - else - return FALSE; -} - -bool wxExpr::GetAttributeValue(const wxString& att, long& var) const -{ - wxExpr *expr = AttributeValue(att); - - if (expr && (expr->Type() == wxExprInteger || expr->Type() == wxExprReal)) - { - var = expr->IntegerValue(); - return TRUE; - } - else - return FALSE; -} - -bool wxExpr::GetAttributeValue(const wxString& att, float& var) const -{ - wxExpr *expr = AttributeValue(att); - if (expr && (expr->Type() == wxExprInteger || expr->Type() == wxExprReal)) - { - var = (float) expr->RealValue(); - return TRUE; - } - else - return FALSE; -} - -bool wxExpr::GetAttributeValue(const wxString& att, double& var) const -{ - wxExpr *expr = AttributeValue(att); - if (expr && (expr->Type() == wxExprInteger || expr->Type() == wxExprReal)) - { - var = expr->RealValue(); - return TRUE; - } - else - return FALSE; -} - -bool wxExpr::GetAttributeValue(const wxString& att, wxString& var) const // Word OR string -> string -{ - wxExpr *expr = AttributeValue(att); - if (expr && expr->Type() == wxExprWord) - { - var = expr->WordValue(); - return TRUE; - } - else if (expr && expr->Type() == wxExprString) - { - var = expr->StringValue(); - return TRUE; - } - else - return FALSE; -} - -bool wxExpr::GetAttributeValue(const wxString& att, wxExpr **var) const -{ - wxExpr *expr = AttributeValue(att); - if (expr) - { - *var = expr; - return TRUE; - } - else - return FALSE; -} - -bool wxExpr::GetAttributeValueStringList(const wxString& att, wxList *var) const -{ - wxExpr *expr = AttributeValue(att); - if (expr && expr->Type() == wxExprList) - { - wxExpr *string_expr = expr->value.first; - while (string_expr) - { - if (string_expr->Type() == wxExprString) - var->Append((wxObject *)copystring(string_expr->StringValue())); - - string_expr = string_expr->next; - } - return TRUE; - } - else - return FALSE; -} - -// Compatibility -void wxExpr::AssignAttributeValue(char *att, char **var) const -{ - wxString str; - if (GetAttributeValue(att, str)) - { - if (*var) - delete[] *var; - *var = copystring((const char *) str); - } -} - -void wxExpr::WriteClause(ostream& stream) // Write this expression as a top-level clause -{ - if (type != wxExprList) - return; - - wxExpr *node = value.first; - if (node) - { - node->WriteExpr(stream); - stream << "("; - node = node->next; - bool first = TRUE; - while (node) - { - if (!first) - stream << " "; - node->WriteExpr(stream); - node = node->next; - if (node) stream << ",\n"; - first = FALSE; - } - stream << ").\n\n"; - } -} - -void wxExpr::WriteExpr(ostream& stream) // Write as any other subexpression -{ - // This seems to get round an optimizer bug when - // using Watcom C++ 10a in WIN32 compilation mode. - // If these lines not present, the type seems to be - // interpreted wrongly as an integer. - // I don't want to turn optimization off since it's needed - // for reading in files quickly. -#if defined(__WATCOMC__) - char buf[2]; - sprintf(buf, ""); -#endif - - switch (type) - { - case wxExprInteger: - { - stream << value.integer; - break; - } - case wxExprReal: - { - double f = value.real; -/* Now the parser can cope with this. - // Prevent printing in 'e' notation. Any better way? - if (fabs(f) < 0.00001) - f = 0.0; -*/ - char buf[40]; - sprintf(buf, "%.6g", f); - stream << buf; - break; - } - case wxExprString: - { - stream << "\""; - int i; - int len = strlen(value.string); - for (i = 0; i < len; i++) - { - char ch = value.string[i]; - if (ch == '"' || ch == '\\') - stream << "\\"; - stream << ch; - } - - stream << "\""; - break; - } - case wxExprWord: - { - bool quote_it = FALSE; - int len = strlen(value.word); - if ((len == 0) || (len > 0 && (value.word[0] > 64 && value.word[0] < 91))) - quote_it = TRUE; - else - { - int i; - for (i = 0; i < len; i++) - if ((!isalpha(value.word[i])) && (!isdigit(value.word[i])) && - (value.word[i] != '_')) - { quote_it = TRUE; i = len; } - } - - if (quote_it) - stream << "'"; - - stream << value.word; - - if (quote_it) - stream << "'"; - - break; - } - case wxExprList: - { - if (!value.first) - stream << "[]"; - else - { - wxExpr *expr = value.first; - - if ((expr->Type() == wxExprWord) && (strcmp(expr->WordValue(), "=") == 0)) - { - wxExpr *arg1 = expr->next; - wxExpr *arg2 = arg1->next; - arg1->WriteExpr(stream); - stream << " = "; - arg2->WriteExpr(stream); - } - else - { - stream << "["; - while (expr) - { - expr->WriteExpr(stream); - expr = expr->next; - if (expr) stream << ", "; - } - stream << "]"; - } - } - break; - } - case wxExprNull: break; - } -} - -void wxExpr::WriteLispExpr(ostream& stream) -{ - switch (type) - { - case wxExprInteger: - { - stream << value.integer; - break; - } - case wxExprReal: - { - stream << value.real; - break; - } - case wxExprString: - { - stream << "\"" << value.string << "\""; - break; - } - case wxExprWord: - { - stream << value.word; - break; - } - case wxExprList: - { - wxExpr *expr = value.first; - - stream << "("; - while (expr) - { - expr->WriteLispExpr(stream); - expr = expr->next; - if (expr) stream << " "; - } - - stream << ")"; - break; - } - case wxExprNull: break; - } -} - -// wxExpr 'database' (list of expressions) -wxExprDatabase::wxExprDatabase(wxExprErrorHandler handler) -{ - position = NULL; - hash_table = NULL; - currentwxExprErrorHandler = handler; - noErrors = 0; -} - -wxExprDatabase::wxExprDatabase(wxExprType type, const wxString& attribute, int size, - wxExprErrorHandler handler) -{ - position = NULL; - attribute_to_hash = attribute; - if (type == wxExprString) - hash_table = new wxHashTable(wxKEY_STRING, size); - else if (type == wxExprInteger) - hash_table = new wxHashTable(wxKEY_INTEGER, size); - else hash_table = NULL; - - currentwxExprErrorHandler = handler; - noErrors = 0; -} - -wxExprDatabase::~wxExprDatabase(void) -{ - ClearDatabase(); - if (hash_table) - delete hash_table; -} - -void wxExprDatabase::BeginFind(void) // Initialise a search -{ - position = First(); -} - -wxExpr *wxExprDatabase::FindClause(long id) // Find a term based on an integer id attribute - // e.g. node(id=23, type=rectangle, ....). -{ - wxExpr *found = NULL; - while (position && !found) - { - wxExpr *term = (wxExpr *)position->Data(); - - if (term->Type() == wxExprList) - { - wxExpr *value = term->AttributeValue("id"); - if (value->Type() == wxExprInteger && value->IntegerValue() == id) - found = term; - } - position = position->Next(); - } - return found; -} - -// Find on basis of attribute/value pairs, e.g. type=rectangle -wxExpr *wxExprDatabase::FindClause(const wxString& word, const wxString& val) -{ - wxExpr *found = NULL; - while (position && !found) - { - wxExpr *term = (wxExpr *)position->Data(); - - if (term->Type() == wxExprList) - { - wxExpr *value = term->AttributeValue(word); - if ((value->Type() == wxExprWord && value->WordValue() == val) || - (value->Type() == wxExprString && value->StringValue() == val)) - found = term; - } - position = position->Next(); - } - return found; -} - -wxExpr *wxExprDatabase::FindClause(const wxString& word, long val) -{ - wxExpr *found = NULL; - while (position && !found) - { - wxExpr *term = (wxExpr *)position->Data(); - - if (term->Type() == wxExprList) - { - wxExpr *value = term->AttributeValue(word); - if ((value->Type() == wxExprInteger) && (value->IntegerValue() == val)) - found = term; - } - position = position->Next(); - } - return found; -} - -wxExpr *wxExprDatabase::FindClause(const wxString& word, double val) -{ - wxExpr *found = NULL; - while (position && !found) - { - wxExpr *term = (wxExpr *)position->Data(); - - if (term->Type() == wxExprList) - { - wxExpr *value = term->AttributeValue(word); - if ((value->Type() == wxExprReal) && (value->RealValue() == val)) - found = term; - } - position = position->Next(); - } - return found; -} - -wxExpr *wxExprDatabase::FindClauseByFunctor(const wxString& functor) -{ - wxExpr *found = NULL; - while (position && !found) - { - wxExpr *term = (wxExpr *)position->Data(); - - if (term->Type() == wxExprList) - { - if (term->Functor() == functor) - found = term; - } - position = position->Next(); - } - return found; -} - -// If hashing is on, must store in hash table too -void wxExprDatabase::Append(wxExpr *clause) -{ - wxList::Append((wxObject *)clause); - if (hash_table) - { - wxString functor(clause->Functor()); - wxExpr *expr = clause->AttributeValue(attribute_to_hash); - if (expr) - { - long functor_key = hash_table->MakeKey((char *)(const char *)functor); - long value_key = 0; - if (expr && expr->Type() == wxExprString) - { - value_key = hash_table->MakeKey((char *)(const char *)expr->StringValue()); - hash_table->Put(functor_key + value_key, (char *)(const char *)expr->StringValue(), (wxObject *)clause); - } - else if (expr && expr->Type() == wxExprInteger) - { - value_key = expr->IntegerValue(); - hash_table->Put(functor_key + value_key, expr->IntegerValue(), (wxObject *)clause); - } - - } - } -} - -wxExpr *wxExprDatabase::HashFind(const wxString& functor, long value) const -{ - long key = hash_table->MakeKey((char *)(const char *)functor) + value; - - // The key alone isn't guaranteed to be unique: - // must supply value too. Let's assume the value of the - // id is going to be reasonably unique. - return (wxExpr *)hash_table->Get(key, value); -} - -wxExpr *wxExprDatabase::HashFind(const wxString& functor, const wxString& value) const -{ - long key = hash_table->MakeKey((char *)(const char *)functor) + hash_table->MakeKey((char *)(const char *)value); - return (wxExpr *)hash_table->Get(key, (char *)(const char *)value); -} - -void wxExprDatabase::ClearDatabase(void) -{ - noErrors = 0; - wxNode *node = First(); - while (node) - { - wxExpr *expr = (wxExpr *)node->Data(); - delete expr; - delete node; - node = First(); - } - - if (hash_table) - hash_table->Clear(); -} - -bool wxExprDatabase::Read(const wxString& filename) -{ - noErrors = 0; - - FILE *f = fopen((const char *)filename, "r"); - if (f) - { - thewxExprDatabase = this; - - LexFromFile(f); - yyparse(); - fclose(f); - - wxExprCleanUp(); - return (noErrors == 0); - } - else - { - return FALSE; - } -} - -bool wxExprDatabase::ReadFromString(const wxString& buffer) -{ - noErrors = 0; - thewxExprDatabase = this; - - LexFromString((char *)(const char *)buffer); - yyparse(); - wxExprCleanUp(); - return (noErrors == 0); -} - -bool wxExprDatabase::Write(const wxString& fileName) -{ - ofstream str((char *)(const char *)fileName); - if (str.bad()) - return FALSE; - return Write(str); -} - -bool wxExprDatabase::Write(ostream& stream) -{ - noErrors = 0; - wxNode *node = First(); - while (node) - { - wxExpr *expr = (wxExpr *)node->Data(); - expr->WriteClause(stream); - node = node->Next(); - } - return (noErrors == 0); -} - -void wxExprDatabase::WriteLisp(ostream& stream) -{ - noErrors = 0; - wxNode *node = First(); - while (node) - { - wxExpr *expr = (wxExpr *)node->Data(); - expr->WriteLispExpr(stream); - stream << "\n\n"; - node = node->Next(); - } -} - -void add_expr(wxExpr * expr) -{ - thewxExprDatabase->Append(expr); -} - -// Checks functor -bool wxExprIsFunctor(wxExpr *expr, const wxString& functor) -{ - if (expr && (expr->Type() == wxExprList)) - { - wxExpr *first_expr = expr->value.first; - - if (first_expr && (first_expr->Type() == wxExprWord) && - (first_expr->WordValue() == functor)) - return TRUE; - else - return FALSE; - } - else - return FALSE; -} - -/* - * Called from parser - * - */ - -char *make_integer(char *str) -{ - wxExpr *x = new wxExpr(atol(str)); - - return (char *)x; -} - -char *make_real(char *str1, char *str2) -{ - char buf[50]; - - sprintf(buf, "%s.%s", str1, str2); - double f = (double)atof(buf); - wxExpr *x = new wxExpr(f); - - return (char *)x; -} - -// extern "C" double exp10(double); - -char *make_exp(char *str1, char *str2) -{ - double mantissa = (double)atoi(str1); - double exponent = (double)atoi(str2); - - double d = mantissa * pow(10.0, exponent); - - wxExpr *x = new wxExpr(d); - - return (char *)x; -} - -char *make_exp2(char *str1, char *str2, char *str3) -{ - char buf[50]; - - sprintf(buf, "%s.%s", str1, str2); - double mantissa = (double)atof(buf); - double exponent = (double)atoi(str3); - - double d = mantissa * pow(10.0, exponent); - - wxExpr *x = new wxExpr(d); - - return (char *)x; -} - -char *make_word(char *str) -{ - wxExpr *x = new wxExpr(wxExprWord, str); - return (char *)x; -} - -char *make_string(char *str) -{ - char *s, *t; - int len, i; - - str++; /* skip leading quote */ - len = strlen(str) - 1; /* ignore trailing quote */ - - s = new char[len + 1]; - - t = s; - for(i=0; iInsert(car); - return (char *)cdr; -} - -void process_command(char * cexpr) -{ - wxExpr *expr = (wxExpr *)cexpr; - add_expr(expr); -} - -void syntax_error(char *s) -{ - if (currentwxExprErrorHandler) - (void)(*(currentwxExprErrorHandler))(WXEXPR_ERROR_SYNTAX, "syntax error"); - if (thewxExprDatabase) thewxExprDatabase->noErrors += 1; -} - -#if 0 -#ifdef _WINDLL -// char *__cdecl strdup(const char *s) -WXDLLEXPORT char *strdup(const char *s) -{ - int len = strlen(s); - char *new_s = (char *)malloc(sizeof(char)*(len+1)); - strcpy(new_s, s); - return new_s; -} -#endif -#endif - diff --git a/src/common/zstream.cpp b/src/common/zstream.cpp deleted file mode 100644 index 569401fdce..0000000000 --- a/src/common/zstream.cpp +++ /dev/null @@ -1,193 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: zstream.cpp -// Purpose: Compressed stream classes -// Author: Guilhem Lavaux -// Modified by: -// Created: 11/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Guilhem Lavaux -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "zstream.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" -#include -#include -#include -#include -#include "../zlib/zlib.h" // don't change this, Robert - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#define ZSTREAM_BUFFER_SIZE 1024 - -////////////////////// -// wxZlibInputStream -////////////////////// - -wxZlibInputStream::wxZlibInputStream(wxInputStream& stream) - : wxFilterInputStream(stream) -{ - int err; - - // I need a private stream buffer. - m_i_streambuf = new wxStreamBuffer(*this); - m_i_destroybuf = TRUE; - - m_inflate.zalloc = (alloc_func)0; - m_inflate.zfree = (free_func)0; - m_inflate.opaque = (voidpf)0; - - err = inflateInit(&m_inflate); - if (err != Z_OK) { - inflateEnd(&m_inflate); - return; - } - - m_z_buffer = new unsigned char[ZSTREAM_BUFFER_SIZE]; - m_z_size = ZSTREAM_BUFFER_SIZE; - - m_inflate.avail_in = 0; - m_inflate.next_in = NULL; -} - -wxZlibInputStream::~wxZlibInputStream() -{ - inflateEnd(&m_inflate); -} - -size_t wxZlibInputStream::DoRead(void *buffer, size_t size) -{ - int err; - - m_inflate.next_out = (unsigned char *)buffer; - m_inflate.avail_out = size; - - while (m_inflate.avail_out > 0) { - if (m_inflate.avail_in == 0) { - - m_parent_i_stream->Read(m_z_buffer, m_z_size); - m_inflate.next_in = m_z_buffer; - m_inflate.avail_in = m_parent_i_stream->LastRead(); - - if (m_parent_i_stream->Eof()) - return (size - m_inflate.avail_in); - } - err = inflate(&m_inflate, Z_FINISH); - if (err == Z_STREAM_END) - return (size - m_inflate.avail_in); - } - - return size-m_inflate.avail_in; -} - -bool wxZlibInputStream::Eof() const -{ - if (!m_eof) - return m_parent_i_stream->Eof(); - return m_eof; -} - -////////////////////// -// wxZlibOutputStream -////////////////////// - -wxZlibOutputStream::wxZlibOutputStream(wxOutputStream& stream) - : wxFilterOutputStream(stream) -{ - int err; - - m_o_streambuf = new wxStreamBuffer(*this); - m_o_destroybuf = TRUE; - - m_deflate.zalloc = (alloc_func)0; - m_deflate.zfree = (free_func)0; - m_deflate.opaque = (voidpf)0; - - err = deflateInit(&m_deflate, Z_DEFAULT_COMPRESSION); - if (err != Z_OK) { - deflateEnd(&m_deflate); - return; - } - - m_z_buffer = new unsigned char[ZSTREAM_BUFFER_SIZE]; - m_z_size = ZSTREAM_BUFFER_SIZE; - - m_deflate.avail_in = 0; - m_deflate.next_out = m_z_buffer; - m_deflate.avail_out = m_z_size; -} - -wxZlibOutputStream::~wxZlibOutputStream() -{ - int err; - - Sync(); - - err = deflate(&m_deflate, Z_FINISH); - if (err != Z_STREAM_END) { - wxDebugMsg(_("wxZlibOutputStream: an error occured while we was closing " - "the stream.\n")); - return; - } - - deflateEnd(&m_deflate); - - delete[] m_z_buffer; -} - -void wxZlibOutputStream::Sync() -{ - int err; - - m_parent_o_stream->Write(m_z_buffer, m_z_size-m_deflate.avail_out); - m_deflate.next_out = m_z_buffer; - m_deflate.avail_out = m_z_size; - - err = deflate(&m_deflate, Z_FULL_FLUSH); - if (err != Z_OK) { - m_bad = TRUE; - return; - } - - m_parent_o_stream->Write(m_z_buffer, m_z_size-m_deflate.avail_out); - m_deflate.next_out = m_z_buffer; - m_deflate.avail_out = m_z_size; -} - -size_t wxZlibOutputStream::DoWrite(const void *buffer, size_t size) -{ - int err; - - m_deflate.next_in = (unsigned char *)buffer; - m_deflate.avail_in = size; - - while (m_deflate.avail_in > 0) { - - if (m_deflate.avail_out == 0) { - m_parent_o_stream->Write(m_z_buffer, m_z_size); - if (m_parent_o_stream->Bad()) - return (size - m_deflate.avail_in); - - m_deflate.next_out = m_z_buffer; - m_deflate.avail_out = m_z_size; - } - - err = deflate(&m_deflate, Z_NO_FLUSH); - if (err != Z_OK) - return (size - m_deflate.avail_in); - } - return size; -} - -bool wxZlibOutputStream::Bad() const -{ - if (!m_bad) - return m_parent_o_stream->Bad(); - return m_bad; -} diff --git a/src/cygnus.bat b/src/cygnus.bat deleted file mode 100644 index 4cf2cf09cf..0000000000 --- a/src/cygnus.bat +++ /dev/null @@ -1,15 +0,0 @@ -rem Cygnus Gnu-Win32 environment variables -rem Assumes that compiler and wxWindows are installed on the g: drive. -rem -set WXWIN=d:\wx2 -path C:\WINDOWS;C:\WINDOWS\COMMAND;g:\gnuwin32\b19\H-i386-cygwin32\bin;g:\gnuwin32\b19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\cygnus-2.7.2-970404;c:\bin;g:\gnuwin32\b19\tcl\bin -set GCC_EXEC_PREFIX=G:\gnuwin32\b19\H-i386-cygwin32\lib\gcc-lib\ -set RCINCLUDE=%WXWIN\include -set CPLUS_INCLUDE_PATH=/g/gnuwin32/b19/h-i386-cygwin32/i386-cygwin32/include:/g/gnuwin32/b19/include/g++:/g/gnuwin32/b19/H-i386-cygwin32/lib/gcc-lib/i386-cygwin32/cygnus-2.7.2-970404/include:/d/wx2/include:/g/gnuwin32/b19/include/g++ -set MAKE_MODE=unix -mount G: /g -mount D: /d - -rem 4DOS users only... -unalias make -alias makegnu make -f makefile.g95 diff --git a/src/gdk_imlib/AUDIT b/src/gdk_imlib/AUDIT deleted file mode 100644 index e69b50738d..0000000000 --- a/src/gdk_imlib/AUDIT +++ /dev/null @@ -1,26 +0,0 @@ -Audit status of gdk_imlib so far: - -cache.c appears clean -globals.c appears clean - -load.c: - JPEG, PNG, GIF and TIFF loaders seem safe but the underlying - yet libraries have not been checked - Helper stuff should now be safe. - -misc.c - The obvious screwups have been remedied with the usual - length checking sscanfs and snprintfs. - Rewrote a little of the parsing code to avoid future problems. - -rend.c - Appears ok - -save.c - Some stuff has been fixed. The helpers should be safe but - are incomplete - -utils.c - Ok this seems clean now. There's a few FIXME's but they are - either new features (helper needs %Q) or bogus but non fatal - stuff diff --git a/src/gdk_imlib/AUTHORS b/src/gdk_imlib/AUTHORS deleted file mode 100644 index 2c8f9861b2..0000000000 --- a/src/gdk_imlib/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -Rasterdude :-) diff --git a/src/gdk_imlib/COPYING.LIB b/src/gdk_imlib/COPYING.LIB deleted file mode 100644 index eb685a5ec9..0000000000 --- a/src/gdk_imlib/COPYING.LIB +++ /dev/null @@ -1,481 +0,0 @@ - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - d) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/src/gdk_imlib/ChangeLog b/src/gdk_imlib/ChangeLog deleted file mode 100644 index 67cab52052..0000000000 --- a/src/gdk_imlib/ChangeLog +++ /dev/null @@ -1,74 +0,0 @@ -1998-05-07 Raja R Harinath - - * save.c (gdk_imlib_save_image): Replaces `snprintf' with - `g_snprintf' calls. - * utils.c (gdk_imlib_create_image_from_data): Likewise. - -Tue May 5 15:11:59 1998 Radek Doulik - - * replaced snprintf calls with g_snprintf ones, so it - compiles now on SunOS - -Sat Apr 11 12:30:13 1998 George Lebl - - * utils.c: fixed yet one more SIGFPE on alpha - -Fri Mar 20 00:02:43 1998 Tom Tromey - - * gdk_imlib.h: Replaced `()' with `(void)'. - -Sun Mar 15 12:34:45 1998 Owen Taylor - - * Makefile.am (INCLUDES): Added GTK_CFLAGS - -1998-02-25 Raja R Harinath - - * Makefile.am (DEFS): Define `SYSTEM_IMRC' too. - -1998-02-25 Federico Mena Quintero - - * misc.c (gdk_imlib_copy_image): The drawable passed to gdk_gc_new - should be the dest drawable, not the base imlib window. This - caused BadMatches all over the place (especially in copy_mask). - (gdk_imlib_copy_mask): Likewise. - -1998-02-24 Raja R Harinath - - * Makefile.am (DEFS): New var. Moved stuff from CFLAGS. - (INCLUDES): New var. - -1998-02-24 Mark Galassi - - * Makefile.am (libgdk_imlib_la_SOURCES): - (lib_LTLIBRARIES): changed gdk_imlib to use the libtool+automake - formalisms. - - * load.c (gdk_imlib_load_image): changed JPEG_PATH to DJPEG_PROG - and removed %s/djpeg, sine DJPEG_PROG is the full program path. - -1998-02-17 Federico Mena Quintero - - * Makefile.in (install): Make directory for config files. - - * configure.in: Fixed ENL_LIB_SUPPORT function for non-existing libraries. - -1998-02-16 Federico Mena Quintero - - * misc.c (gdk_imlib_init): I create a colormap specific to the - visual the base_window will be using. This fixes BadMatch errors - on machines with multiple visual/depth combinations. - -1998-02-17 The Rasterman - - * misc.c (gdk_imlib_init) Fixed visual stuff slightly, and Colormap - creation (so it only does so if the visual for the default and the - chosen visual mismatch), added function calls to retrieve Imlib's - visual and Colormap, plus endianess fixes for network displaying. - -1998-02-17 The Rasterman - - added system imrc config return function - -1998-02-18 The Rasterman - - Fixed load.c - missed a not (!) in an if clause diff --git a/src/gdk_imlib/README b/src/gdk_imlib/README deleted file mode 100644 index ac167f6462..0000000000 --- a/src/gdk_imlib/README +++ /dev/null @@ -1,29 +0,0 @@ -------------------------------------------------------------------------------- - I M L I B - 1.4 -------------------------------------------------------------------------------- - -This software is Copyright (C) 1998 By The Rasterman (Carsten Haitzler). I -accept no responsability for anythign this software may or may not do to -your system - you use it completely at your own risk. This software comes -under the LGPL and GPL licences. The library itself is LGPL (all software in -Imlib and gdk_imlib directories) see the COPYING and COPYING.LIB files for -full legal details. - -------------------------------------------------------------------------------- - -If you have picked up a net release of imlib you should be able to -just follow the instructions in the INSTALL file. - -If you are using imlib out of the CVS repository, then you need to -have some extra tools installed, and the configuration process is -lengthier. the HACKING file has all the details for building from a -CVS checkout. - -Imlib will run MARKEDLY better if you get certain libraries. Notably, -libjpeg, libpng, libtiff and libgif. For more information please go look at: - -http://www.labs.redhat.com/imlib/ - -This will give links to everything you need or may want for Imlib's optimal -functionality. diff --git a/src/gdk_imlib/cache.c b/src/gdk_imlib/cache.c deleted file mode 100644 index 561097404d..0000000000 --- a/src/gdk_imlib/cache.c +++ /dev/null @@ -1,496 +0,0 @@ -#define _GNU_SOURCE -#include "../gdk_imlib/gdk_imlib.h" -#include "../gdk_imlib/gdk_imlib_private.h" - -/* uncomment this to compile imlib's cahce with pixmap accounting output */ -/*#define PIXMAP_ACCOUNTING */ - -void -gdirty_pixmaps(GdkImlibImage * im) -{ - struct pixmap_cache *ptr; - - ptr = id->cache.pixmap; - while (ptr) - { - if ((ptr->im == im) && ((!ptr->file) || (!strcmp(im->filename, ptr->file)))) - ptr->dirty = 1; - ptr = ptr->next; - } -} - -void -gdirty_images(GdkImlibImage * im) -{ - struct image_cache *ptr; - - ptr = id->cache.image; - while (ptr) - { - if ((!strcmp(im->filename, ptr->file)) && (im == ptr->im)) - { - ptr->dirty = 1; - return; - } - ptr = ptr->next; - } -} - -void -gfind_pixmap(GdkImlibImage * im, int width, int height, GdkPixmap ** pmap, GdkBitmap ** mask) -{ - struct pixmap_cache *ptr; - - ptr = id->cache.pixmap; - while (ptr) - { - if ((ptr->im == im) && (ptr->width == width) && (ptr->height == height) && - ((!ptr->file) || (!strcmp(im->filename, ptr->file))) && - (!ptr->dirty)) - { - if (ptr->refnum > 0) - ptr->refnum++; - else - { - ptr->refnum++; - id->cache.num_pixmap++; - if (ptr->pmap) - id->cache.used_pixmap -= width * height * id->x.depth; - if (ptr->shape_mask) - id->cache.used_pixmap -= width * height; - if (id->cache.used_pixmap < 0) - { - id->cache.used_pixmap = 0; - fprintf(stderr, "IMLIB: uhoh.. caching problems.... meep meep\n"); - } - } - if (ptr->prev) - { - ptr->prev->next = ptr->next; - if (ptr->next) - ptr->next->prev = ptr->prev; - ptr->next = id->cache.pixmap; - ptr->next->prev = ptr; - id->cache.pixmap = ptr; - ptr->prev = NULL; - } - *pmap = ptr->pmap; - *mask = ptr->shape_mask; - return; - } - ptr = ptr->next; - } - *pmap = NULL; - *mask = NULL; -} - -GdkImlibImage * -gfind_image(char *file) -{ - struct image_cache *ptr; - - ptr = id->cache.image; - while (ptr) - { - if ((!strcmp(file, ptr->file)) && (!ptr->dirty)) - { - if (ptr->refnum) - ptr->refnum++; - else - { - ptr->refnum++; - id->cache.num_image++; - id->cache.used_image -= ptr->im->rgb_width * ptr->im->rgb_height * 3; - if (id->cache.used_image < 0) - { - id->cache.used_image = 0; - fprintf(stderr, "IMLIB: uhoh.. caching problems.... meep meep\n"); - } - } - if (ptr->prev) - { - ptr->prev->next = ptr->next; - if (ptr->next) - ptr->next->prev = ptr->prev; - ptr->next = id->cache.image; - ptr->next->prev = ptr; - id->cache.image = ptr; - ptr->prev = NULL; - } - return ptr->im; - } - ptr = ptr->next; - } - return NULL; -} - -void -gfree_pixmappmap(GdkPixmap * pmap) -{ - struct pixmap_cache *ptr; - - ptr = id->cache.pixmap; - while (ptr) - { - if ((ptr->pmap == pmap) || (ptr->shape_mask == pmap)) - { - if (ptr->shape_mask == pmap) - return; - if (ptr->refnum > 0) - { - ptr->refnum--; - if (ptr->refnum == 0) - { - id->cache.num_pixmap--; - if (ptr->pmap) - id->cache.used_pixmap += ptr->width * ptr->height * id->x.depth; - if (ptr->shape_mask) - id->cache.used_pixmap += ptr->width * ptr->height; - } - } - return; - } - ptr = ptr->next; - } - gdk_pixmap_unref(pmap); -} - -void -gfree_image(GdkImlibImage * im) -{ - struct image_cache *ptr; - - ptr = id->cache.image; - while (ptr) - { - if (im == ptr->im) - { - if (ptr->refnum) - { - ptr->refnum--; - if (!ptr->refnum) - { - id->cache.num_image--; - id->cache.used_image += ptr->im->rgb_width * ptr->im->rgb_height * 3; - } - } - return; - } - ptr = ptr->next; - } - gnullify_image(im); -} - -void -gflush_image(GdkImlibImage * im) -{ - if (im) - im->cache = 0; -} - -void -gadd_image(GdkImlibImage * im, char *file) -{ - struct image_cache *ptr; - struct image_cache *n; - - if ((!im) || (!file)) - return; - ptr = id->cache.image; - n = malloc(sizeof(struct image_cache)); - - if (!n) - return; - n->prev = NULL; - n->next = ptr; - n->file = malloc(strlen(file) + 1); - if (!n->file) - { - free(n); - return; - } - strcpy(n->file, file); - n->im = im; - n->refnum = 1; - n->dirty = 0; - if (n->next) - n->next->prev = n; - id->cache.image = n; - id->cache.num_image++; -} - -void -gadd_pixmap(GdkImlibImage * im, int width, int height, XImage * xim, XImage * sxim) -{ - struct pixmap_cache *ptr; - struct pixmap_cache *n; - - if (!im) - return; - ptr = id->cache.pixmap; - n = malloc(sizeof(struct pixmap_cache)); - - if (!n) - return; - n->prev = NULL; - n->next = ptr; - n->im = im; - if (im->filename) - { - n->file = malloc(strlen(im->filename) + 1); - if (n->file) - strcpy(n->file, im->filename); - } - else - n->file = NULL; - n->refnum = 1; - n->dirty = 0; - n->width = width; - n->height = height; - n->pmap = im->pixmap; - n->shape_mask = im->shape_mask; - n->xim = xim; - n->sxim = sxim; - if (n->next) - n->next->prev = n; - id->cache.pixmap = n; - id->cache.num_pixmap++; -} - -void -gclean_caches() -{ - { - struct image_cache *ptr = NULL; - struct image_cache *pptr = NULL; - struct image_cache *last = NULL; - int newlast; - - /* find the back of the list */ - ptr = id->cache.image; - while (ptr) - { - last = ptr; - ptr = ptr->next; - } - newlast = 0; - ptr = last; - /* remove all images that are tagged non-cachable, and have 0 */ - /* references , even if the cache has spare room. */ - while (ptr) - { - if (!ptr->refnum) - { - if (!ptr->im->cache) - { - if (ptr == last) - newlast = 1; - id->cache.used_image -= ptr->im->rgb_width * ptr->im->rgb_height * 3; - gnullify_image(ptr->im); - if (pptr) - ptr = pptr->prev; - if (ptr->prev) - ptr->prev->next = ptr->next; - else - id->cache.image = ptr->next; - if (ptr->next) - ptr->next->prev = ptr->prev; - if (ptr->file) - free(ptr->file); - free(ptr); - ptr = NULL; - } - } - if (ptr) - ptr = ptr->prev; - if (newlast) - { - last = NULL; - ptr = id->cache.image; - while (ptr) - { - last = ptr; - ptr = ptr->next; - } - newlast = 0; - ptr = last; - } - } - /* find the back of the list */ - ptr = id->cache.image; - last = NULL; - while (ptr) - { - last = ptr; - ptr = ptr->next; - } - newlast = 0; - ptr = last; - /* while the amount of data in the cache is greater than the set */ - /* amount, delete the last entry (last used) from the unreferenced */ - /* cached 24-bit images */ - while (id->cache.used_image > id->cache.size_image) - { - while (ptr) - { - if (ptr->refnum < 1) - { - if (ptr == last) - newlast = 1; - id->cache.used_image -= ptr->im->rgb_width * ptr->im->rgb_height * 3; - gnullify_image(ptr->im); - if (ptr->prev) - ptr->prev->next = ptr->next; - else - id->cache.image = ptr->next; - if (ptr->next) - ptr->next->prev = ptr->prev; - if (ptr->file) - free(ptr->file); - free(ptr); - ptr = NULL; - break; - } - if (ptr) - ptr = ptr->prev; - } - if (newlast) - { - last = NULL; - ptr = id->cache.image; - while (ptr) - { - last = ptr; - ptr = ptr->next; - } - newlast = 0; - ptr = last; - } - if (!ptr) - break; - } - } - { - struct pixmap_cache *ptr; - struct pixmap_cache *last; - int newlast; - -#ifdef PIXMAP_ACCOUNTING - int total, total2, num, num2; - - printf("--------- Pixmap cashe zise %i / %i with %i pixmaps referenced\n", - id->cache.used_pixmap, id->cache.size_pixmap, - id->cache.num_pixmap); - ptr = id->cache.pixmap; - total = 0; - total2 = 0; - num = 0; - num2 = 0; - while (ptr) - { - printf("Pmap for file %s REFNUM %3i SIZE %4ix%4i PMAP %8x MASK %8x\n", - ptr->file, ptr->refnum, ptr->width, ptr->height, ptr->pmap, - ptr->shape_mask); - if (ptr->refnum > 0) - { - total += (ptr->width * ptr->height * id->x.depth); - if (ptr->shape_mask) - total += (ptr->width * ptr->height); - num++; - } - else - { - total2 += (ptr->width * ptr->height * id->x.depth); - if (ptr->shape_mask) - total2 += (ptr->width * ptr->height); - num2++; - } - ptr = ptr->next; - } - printf("Accounting Data:\n"); - printf("*** total pixmap's in cache %i with %i pixmaps\n", - total, num); - printf("*** total unreffed pixmap's in cache %i with %i pixmaps\n\n", - total2, num2); -#endif - /* find the back of the list */ - ptr = id->cache.pixmap; - last = NULL; - while (ptr) - { - last = ptr; - ptr = ptr->next; - } - newlast = 0; - ptr = last; - /* while the amount of data in the cache is greater than the set */ - /* amount, delete the last entry (last used) from the unreferenced */ - /* cached pixmaps */ - while (id->cache.used_pixmap > id->cache.size_pixmap) - { - while (ptr) - { - if (ptr->refnum < 1) - { - if (ptr == last) - newlast = 1; - if (ptr->pmap) - id->cache.used_pixmap -= ptr->width * ptr->height * id->x.depth; - if (ptr->shape_mask) - id->cache.used_pixmap -= ptr->width * ptr->height; - if (ptr->pmap) - gdk_pixmap_unref(ptr->pmap); - if (ptr->shape_mask) - gdk_pixmap_unref(ptr->shape_mask); - if (ptr->xim) - XDestroyImage(ptr->xim); - if (ptr->sxim) - XDestroyImage(ptr->sxim); - if (ptr->prev) - ptr->prev->next = ptr->next; - else - id->cache.pixmap = ptr->next; - if (ptr->next) - ptr->next->prev = ptr->prev; - if (ptr->file) - free(ptr->file); - free(ptr); - ptr = NULL; - break; - } - if (ptr) - ptr = ptr->prev; - } - if (newlast) - { - last = NULL; - ptr = id->cache.pixmap; - while (ptr) - { - last = ptr; - ptr = ptr->next; - } - newlast = 0; - ptr = last; - } - if (!ptr) - break; - } - } -} - -void -gnullify_image(GdkImlibImage * im) -{ - if (!im) - return; - if (im->rgb_data) - free(im->rgb_data); - if (im->alpha_data) - free(im->alpha_data); - if (im->pixmap) - gfree_pixmappmap(im->pixmap); - if (im->filename) - free(im->filename); - free(im); -} diff --git a/src/gdk_imlib/colors.c b/src/gdk_imlib/colors.c deleted file mode 100644 index 768440dc8f..0000000000 --- a/src/gdk_imlib/colors.c +++ /dev/null @@ -1,113 +0,0 @@ -#define _GNU_SOURCE -#include "../gdk_imlib/gdk_imlib.h" -#include "../gdk_imlib/gdk_imlib_private.h" - -void -g_PaletteAlloc(int num, int *cols) -{ - XColor xcl; - int i; - int r, g, b; - - if (id->palette) - free(id->palette); - id->palette = malloc(sizeof(GdkImlibColor) * num); - if (id->palette_orig) - free(id->palette_orig); - id->palette_orig = malloc(sizeof(GdkImlibColor) * num); - for (i = 0; i < num; i++) - { - r = cols[(i * 3) + 0]; - g = cols[(i * 3) + 1]; - b = cols[(i * 3) + 2]; - xcl.red = (unsigned short)((r << 8) | (r)); - xcl.green = (unsigned short)((g << 8) | (g)); - xcl.blue = (unsigned short)((b << 8) | (b)); - xcl.flags = DoRed | DoGreen | DoBlue; - XAllocColor(id->x.disp, id->x.root_cmap, &xcl); - id->palette[i].r = xcl.red >> 8; - id->palette[i].g = xcl.green >> 8; - id->palette[i].b = xcl.blue >> 8; - id->palette[i].pixel = xcl.pixel; - id->palette_orig[i].r = r; - id->palette_orig[i].g = g; - id->palette_orig[i].b = b; - id->palette_orig[i].pixel = xcl.pixel; - } - id->num_colors = num; -} - -gint -gdk_imlib_load_colors(char *file) -{ - FILE *f; - char s[256]; - int i; - int pal[768]; - int r, g, b; - int rr, gg, bb; - - f = fopen(file, "r"); - if (!f) - { - fprintf(stderr, "GImLib ERROR: Cannot find palette file %s\n", file); - return 0; - } - i = 0; - while (fgets(s, 256, f)) - { - if (s[0] == '0') - { - sscanf(s, "%x %x %x", &r, &g, &b); - if (r < 0) - r = 0; - if (r > 255) - r = 255; - if (g < 0) - g = 0; - if (g > 255) - g = 255; - if (b < 0) - b = 0; - if (b > 255) - b = 255; - pal[i++] = r; - pal[i++] = g; - pal[i++] = b; - } - if (i >= 768) - break; - } - fclose(f); - g_PaletteAlloc((i / 3), pal); - if (id->fast_rgb) - free(id->fast_rgb); - id->fast_rgb = malloc(sizeof(int) * 32 * 32 * 32); - - for (r = 0; r < 32; r++) - { - for (g = 0; g < 32; g++) - { - for (b = 0; b < 32; b++) - { - rr = (r << 3) | (r >> 2); - gg = (g << 3) | (g >> 2); - bb = (b << 3) | (b >> 2); - INDEX_RGB(r, g, b) = gindex_best_color_match(&rr, &gg, &bb); - } - } - } - return 1; -} - -void -gdk_imlib_free_colors() -{ - int i; - unsigned long pixels[256]; - - for (i = 0; i < id->num_colors; i++) - pixels[i] = id->palette[i].pixel; - XFreeColors(id->x.disp, id->x.root_cmap, pixels, id->num_colors, 0); - id->num_colors = 0; -} diff --git a/src/gdk_imlib/config.h b/src/gdk_imlib/config.h deleted file mode 100644 index 225d595547..0000000000 --- a/src/gdk_imlib/config.h +++ /dev/null @@ -1,2 +0,0 @@ -#undef PACKAGE -#undef VERSION diff --git a/src/gdk_imlib/gdk_imlib.h b/src/gdk_imlib/gdk_imlib.h deleted file mode 100644 index 6513b1873f..0000000000 --- a/src/gdk_imlib/gdk_imlib.h +++ /dev/null @@ -1,78 +0,0 @@ - -#ifndef __GDK_IMLIB_H__ -#define __GDK_IMLIB_H__ - -/* we need this funny include path, because the working directory when */ -/* including this might actually be ../gdk/ instead of . */ -#include "../gdk_imlib/gdk_imlib_types.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - void gdk_imlib_init(void); - void gdk_imlib_init_params(GdkImlibInitParams * p); - gint gdk_imlib_get_render_type(void); - void gdk_imlib_set_render_type(gint rend_type); - gint gdk_imlib_load_colors(char *file); - GdkImlibImage *gdk_imlib_load_image(char *file); - gint gdk_imlib_best_color_match(gint * r, gint * g, gint * b); - gint gdk_imlib_render(GdkImlibImage * image, gint width, gint height); - GdkPixmap *gdk_imlib_copy_image(GdkImlibImage * image); - GdkBitmap *gdk_imlib_copy_mask(GdkImlibImage * image); - GdkPixmap *gdk_imlib_move_image(GdkImlibImage * image); - GdkBitmap *gdk_imlib_move_mask(GdkImlibImage * image); - void gdk_imlib_destroy_image(GdkImlibImage * image); - void gdk_imlib_kill_image(GdkImlibImage * image); - void gdk_imlib_free_colors(void); - void gdk_imlib_free_pixmap(GdkPixmap * pixmap); - void gdk_imlib_free_bitmap(GdkBitmap * bitmap); - void gdk_imlib_get_image_border(GdkImlibImage * image, GdkImlibBorder * border); - void gdk_imlib_set_image_border(GdkImlibImage * image, GdkImlibBorder * border); - void gdk_imlib_get_image_shape(GdkImlibImage * image, GdkImlibColor * color); - void gdk_imlib_set_image_shape(GdkImlibImage * image, GdkImlibColor * color); - gint gdk_imlib_save_image_to_eim(GdkImlibImage * image, char *file); - gint gdk_imlib_add_image_to_eim(GdkImlibImage * image, char *file); - gint gdk_imlib_save_image_to_ppm(GdkImlibImage * image, char *file); - gint gdk_imlib_load_file_to_pixmap(char *filename, GdkPixmap ** pmap, GdkBitmap ** mask); - void gdk_imlib_set_image_modifier(GdkImlibImage * im, GdkImlibColorModifier * mod); - void gdk_imlib_set_image_red_modifier(GdkImlibImage * im, GdkImlibColorModifier * mod); - void gdk_imlib_set_image_green_modifier(GdkImlibImage * im, GdkImlibColorModifier * mod); - void gdk_imlib_set_image_blue_modifier(GdkImlibImage * im, GdkImlibColorModifier * mod); - void gdk_imlib_get_image_modifier(GdkImlibImage * im, GdkImlibColorModifier * mod); - void gdk_imlib_get_image_red_modifier(GdkImlibImage * im, GdkImlibColorModifier * mod); - void gdk_imlib_get_image_green_modifier(GdkImlibImage * im, GdkImlibColorModifier * mod); - void gdk_imlib_get_image_blue_modifier(GdkImlibImage * im, GdkImlibColorModifier * mod); - void gdk_imlib_set_image_red_curve(GdkImlibImage * im, unsigned char *mod); - void gdk_imlib_set_image_green_curve(GdkImlibImage * im, unsigned char *mod); - void gdk_imlib_set_image_blue_curve(GdkImlibImage * im, unsigned char *mod); - void gdk_imlib_get_image_red_curve(GdkImlibImage * im, unsigned char *mod); - void gdk_imlib_get_image_green_curve(GdkImlibImage * im, unsigned char *mod); - void gdk_imlib_get_image_blue_curve(GdkImlibImage * im, unsigned char *mod); - void gdk_imlib_apply_modifiers_to_rgb(GdkImlibImage * im); - void gdk_imlib_changed_image(GdkImlibImage * im); - void gdk_imlib_apply_image(GdkImlibImage * im, GdkWindow * p); - void gdk_imlib_paste_image(GdkImlibImage * im, GdkWindow * p, gint x, gint y, gint w, gint h); - void gdk_imlib_paste_image_border(GdkImlibImage * im, GdkWindow * p, gint x, gint y, gint w, gint h); - void gdk_imlib_flip_image_horizontal(GdkImlibImage * im); - void gdk_imlib_flip_image_vertical(GdkImlibImage * im); - void gdk_imlib_rotate_image(GdkImlibImage * im, gint d); - GdkImlibImage *gdk_imlib_create_image_from_data(unsigned char *data, unsigned char *alpha, gint w, gint h); - GdkImlibImage *gdk_imlib_clone_image(GdkImlibImage * im); - GdkImlibImage *gdk_imlib_clone_scaled_image(GdkImlibImage * im, int w, int h); - gint gdk_imlib_get_fallback(void); - void gdk_imlib_set_fallback(gint fallback); - GdkVisual *gdk_imlib_get_visual(void); - GdkColormap *gdk_imlib_get_colormap(void); - gchar *gdk_imlib_get_sysconfig(void); - GdkImlibImage *gdk_imlib_create_image_from_xpm_data(char **data); - gint gdk_imlib_data_to_pixmap(char **data, GdkPixmap ** pmap, GdkBitmap ** mask); - void gdk_imlib_crop_image(GdkImlibImage * im, gint x, gint y, gint w, gint h); - gint gdk_imlib_save_image(GdkImlibImage * im, char *file, GdkImlibSaveInfo * info); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/src/gdk_imlib/gdk_imlib_private.h b/src/gdk_imlib/gdk_imlib_private.h deleted file mode 100644 index 94ba61c187..0000000000 --- a/src/gdk_imlib/gdk_imlib_private.h +++ /dev/null @@ -1,226 +0,0 @@ -#ifdef _HAVE_STRING_H -#include -#elif _HAVE_STRINGS_H -#include -#endif - -#ifndef CONVERT_PATH -#define CONVERT_PATH "/usr/X11/bin" -#endif - -#ifndef NETPBM_PATH -#define NETPBM_PATH "/usr/local/bin" -#endif - -#ifndef CJPEG_PROG -#define CJPEG_PROG "/usr/bin/cjpeg" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef _HAVE_STRING_H -#include -#elif _HAVE_STRINGS_H -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_LIBJPEG -#include -#endif -#ifdef HAVE_LIBPNG -#include <../png/png.h> -#endif -#ifdef HAVE_LIBTIFF -#include -#endif -#ifdef HAVE_LIBGIF -#include -#endif - -#define BYTE_ORD_24_RGB 0 -#define BYTE_ORD_24_RBG 1 -#define BYTE_ORD_24_BRG 2 -#define BYTE_ORD_24_BGR 3 -#define BYTE_ORD_24_GRB 4 -#define BYTE_ORD_24_GBR 5 - -struct image_cache - { - gchar *file; - GdkImlibImage *im; - gint refnum; - gchar dirty; - struct image_cache *prev; - struct image_cache *next; - }; - -struct pixmap_cache - { - GdkImlibImage *im; - gchar *file; - gchar dirty; - gint width, height; - GdkPixmap *pmap; - GdkBitmap *shape_mask; - XImage *xim, *sxim; - gint refnum; - struct pixmap_cache *prev; - struct pixmap_cache *next; - }; - -typedef struct _xdata - { - Display *disp; - gint screen; - Window root; - Visual *visual; - gint depth; - gint render_depth; - Colormap root_cmap; - gchar shm; - gchar shmp; - gint shm_event; - XImage *last_xim; - XImage *last_sxim; - XShmSegmentInfo last_shminfo; - XShmSegmentInfo last_sshminfo; - Window base_window; - GdkWindow *gdk_win; - GdkColormap *gdk_cmap; - } -Xdata; - -typedef struct _imlibdata - { - gint num_colors; - GdkImlibColor *palette; - GdkImlibColor *palette_orig; - unsigned char *fast_rgb; - gint *fast_err; - gint *fast_erg; - gint *fast_erb; - gint render_type; - gint max_shm; - Xdata x; - gint byte_order; - struct _cache - { - gchar on_image; - gint size_image; - gint num_image; - gint used_image; - struct image_cache *image; - gchar on_pixmap; - gint size_pixmap; - gint num_pixmap; - gint used_pixmap; - struct pixmap_cache *pixmap; - } - cache; - gchar fastrend; - gchar hiq; - GdkImlibColorModifier mod, rmod, gmod, bmod; - unsigned char rmap[256], gmap[256], bmap[256]; - gchar fallback; - gchar ordered_dither; - } -ImlibData; - -extern ImlibData *id; - -gint gindex_best_color_match(gint * r, gint * g, gint * b); - -void gdirty_pixmaps(GdkImlibImage * im); -void gdirty_images(GdkImlibImage * im); -void gfind_pixmap(GdkImlibImage * im, int width, int height, GdkPixmap ** pmap, GdkBitmap ** mask); -GdkImlibImage *gfind_image(char *file); -void gfree_pixmappmap(GdkPixmap * pmap); -void gfree_image(GdkImlibImage * im); -void gflush_image(GdkImlibImage * im); -void gadd_image(GdkImlibImage * im, char *file); -void gadd_pixmap(GdkImlibImage * im, int width, int height, XImage * xim, XImage * sxim); -void gclean_caches(); -void gnullify_image(GdkImlibImage * im); - -/* char *g_SplitID(char *file); */ -char *g_GetExtension(char *file); - -#ifdef HAVE_LIBJPEG -unsigned char *g_LoadJPEG(FILE * f, int *w, int *h); - -#endif /* HAVE_LIBJPEG */ -#ifdef HAVE_LIBPNG -unsigned char *g_LoadPNG(FILE * f, int *w, int *h, int *t); - -#endif /* HAVE_LIBPNG */ -#ifdef HAVE_LIBTIFF -unsigned char *g_LoadTIFF(char *f, int *w, int *h, int *t); - -#endif /* HAVE_LIBTIFF */ -#ifdef HAVE_LIBGIF -unsigned char *g_LoadGIF(char *f, int *w, int *h, int *t); - -#endif /* HAVE_LIBGIF */ -unsigned char *g_LoadXPM(char *f, int *w, int *h, int *t); -unsigned char *g_LoadPPM(FILE * f, int *w, int *h); - -/* -static int gispnm(char *file); -static int gisjpeg(char *file); -static int gispng(char *file); -static int gistiff(char *file); -static int giseim(char *file); -static int gisgif(char *file); -static int gisxpm(char *file); -*/ - -GdkPixmap *gdk_imlib_pixmap_foreign_new(gint width, gint height, gint depth, Pixmap pmap); - -void gcalc_map_tables(GdkImlibImage * im); - -void g_PaletteAlloc(int num, int *cols); - -FILE *open_helper(const char *, const char *, const char *); -int close_helper(FILE *); - -#define INDEX_RGB(r,g,b) id->fast_rgb[(r<<10)|(g<<5)|(b)] -#define COLOR_INDEX(i) id->palette[i].pixel -#define COLOR_RGB(r,g,b) id->palette[INDEX_RGB(r,g,b)].pixel -#define ERROR_RED(rr,i) rr-id->palette[i].r; -#define ERROR_GRN(gg,i) gg-id->palette[i].g; -#define ERROR_BLU(bb,i) bb-id->palette[i].b; - -#define DITHER_ERROR(Der1,Der2,Dex,Der,Deg,Deb) \ -ter=&(Der1[Dex]);\ -(*ter)+=(Der*7)>>4;ter++;\ -(*ter)+=(Deg*7)>>4;ter++;\ -(*ter)+=(Deb*7)>>4;\ -ter=&(Der2[Dex-6]);\ -(*ter)+=(Der*3)>>4;ter++;\ -(*ter)+=(Deg*3)>>4;ter++;\ -(*ter)+=(Deb*3)>>4;ter++;\ -(*ter)+=(Der*5)>>4;ter++;\ -(*ter)+=(Deg*5)>>4;ter++;\ -(*ter)+=(Deb*5)>>4;ter++;\ -(*ter)+=Der>>4;ter++;\ -(*ter)+=Deg>>4;ter++;\ -(*ter)+=Deb>>4; diff --git a/src/gdk_imlib/gdk_imlib_types.h b/src/gdk_imlib/gdk_imlib_types.h deleted file mode 100644 index fa3d894080..0000000000 --- a/src/gdk_imlib/gdk_imlib_types.h +++ /dev/null @@ -1,101 +0,0 @@ -#include - -#ifndef SYSTEM_IMRC -#define SYSTEM_IMRC "/etc/imrc" -#endif /* endef SYSTEM_IMRC */ - -typedef struct _GdkImlibBorder - { - gint left, right; - gint top, bottom; - } -GdkImlibBorder; - -typedef struct _GdkImlibColor - { - gint r, g, b; - gint pixel; - } -GdkImlibColor; - -typedef struct _GdkImlibColorModifier - { - gint gamma; - gint brightness; - gint contrast; - } -GdkImlibColorModifier; - -typedef struct _GdkImlibImage - { - gint rgb_width, rgb_height; - unsigned char *rgb_data; - unsigned char *alpha_data; - gchar *filename; -/* the below information is private */ - gint width, height; - GdkImlibColor shape_color; - GdkImlibBorder border; - GdkPixmap *pixmap; - GdkBitmap *shape_mask; - gchar cache; - GdkImlibColorModifier mod, rmod, gmod, bmod; - unsigned char rmap[256], gmap[256], bmap[256]; - } -GdkImlibImage; - -typedef struct _GdkImlibSaveInfo - { - int quality; - int scaling; - int xjustification; - int yjustification; - int page_size; - char color; - } -GdkImlibSaveInfo; - -typedef struct _GdkImlibInitParams - { - int flags; - int visualid; - char *palettefile; - char sharedmem; - char sharedpixmaps; - char paletteoverride; - char remap; - char fastrender; - char hiquality; - char dither; - int imagecachesize; - int pixmapcachesize; - } -GdkImlibInitParams; - -#define PARAMS_VISUALID 1<<0 -#define PARAMS_PALETTEFILE 1<<1 -#define PARAMS_SHAREDMEM 1<<2 -#define PARAMS_SHAREDPIXMAPS 1<<3 -#define PARAMS_PALETTEOVERRIDE 1<<4 -#define PARAMS_REMAP 1<<5 -#define PARAMS_FASTRENDER 1<<6 -#define PARAMS_HIQUALITY 1<<7 -#define PARAMS_DITHER 1<<8 -#define PARAMS_IMAGECACHESIZE 1<<9 -#define PARAMS_PIXMAPCACHESIZE 1<<10 - -#define PAGE_SIZE_EXECUTIVE 0 -#define PAGE_SIZE_LETTER 1 -#define PAGE_SIZE_LEGAL 2 -#define PAGE_SIZE_A4 3 -#define PAGE_SIZE_A3 4 -#define PAGE_SIZE_A5 5 -#define PAGE_SIZE_FOLIO 6 - -#define RT_PLAIN_PALETTE 0 -#define RT_PLAIN_PALETTE_FAST 1 -#define RT_DITHER_PALETTE 2 -#define RT_DITHER_PALETTE_FAST 3 -#define RT_PLAIN_TRUECOL 4 -/* a special high-quality renderer for people with 15 and 16bpp that dithers */ -#define RT_DITHER_TRUECOL 5 diff --git a/src/gdk_imlib/globals.c b/src/gdk_imlib/globals.c deleted file mode 100644 index ab506d6815..0000000000 --- a/src/gdk_imlib/globals.c +++ /dev/null @@ -1,6 +0,0 @@ - -#define _GNU_SOURCE -#include "../gdk_imlib/gdk_imlib.h" -#include "../gdk_imlib/gdk_imlib_private.h" - -ImlibData *id; diff --git a/src/gdk_imlib/load.c b/src/gdk_imlib/load.c deleted file mode 100644 index ef5913da87..0000000000 --- a/src/gdk_imlib/load.c +++ /dev/null @@ -1,1498 +0,0 @@ - -#define _GNU_SOURCE -#include "../gdk_imlib/config.h" - -#include "../gdk_imlib/gdk_imlib.h" -#include "../gdk_imlib/gdk_imlib_private.h" - -/* Split the ID - damages input */ - -static char * -g_SplitID(char *file) -{ - char *p = strrchr(file, ':'); - - if (p == NULL) - return ""; - else - { - *p++ = 0; - return p; - } -} - -/* - * Doesn't damage the input - */ - -char * -g_GetExtension(char *file) -{ - char *p = strrchr(file, '.'); - - if (p == NULL) - return ""; - else - return p + 1; -} - -#ifdef HAVE_LIBJPEG -unsigned char * -g_LoadJPEG(FILE * f, int *w, int *h) -{ - struct jpeg_decompress_struct cinfo; - struct jpeg_error_mgr jerr; - unsigned char *data, *line[16], *ptr; - int x, y, i; - - cinfo.err = jpeg_std_error(&jerr); - jpeg_create_decompress(&cinfo); - jpeg_stdio_src(&cinfo, f); - jpeg_read_header(&cinfo, TRUE); - cinfo.do_fancy_upsampling = FALSE; - cinfo.do_block_smoothing = FALSE; - jpeg_start_decompress(&cinfo); - *w = cinfo.output_width; - *h = cinfo.output_height; - data = malloc(*w ** h * 3); - if (!data) - { - jpeg_destroy_decompress(&cinfo); - return NULL; - } - ptr = data; - - if (cinfo.rec_outbuf_height > 16) - { - fprintf(stderr, "gdk_imlib ERROR: JPEG uses line buffers > 16. Cannot load.\n"); - return NULL; - } - if (cinfo.output_components == 3) - { - for (y = 0; y < *h; y += cinfo.rec_outbuf_height) - { - for (i = 0; i < cinfo.rec_outbuf_height; i++) - { - line[i] = ptr; - ptr += *w * 3; - } - jpeg_read_scanlines(&cinfo, line, cinfo.rec_outbuf_height); - } - } - else if (cinfo.output_components == 1) - { - for (i = 0; i < cinfo.rec_outbuf_height; i++) - { - if ((line[i] = malloc(*w)) == NULL) - { - int t = 0; - - for (t = 0; t < i; t++) - free(line[t]); - jpeg_destroy_decompress(&cinfo); - return NULL; - } - } - for (y = 0; y < *h; y += cinfo.rec_outbuf_height) - { - jpeg_read_scanlines(&cinfo, line, cinfo.rec_outbuf_height); - for (i = 0; i < cinfo.rec_outbuf_height; i++) - { - for (x = 0; x < *w; x++) - { - *ptr++ = line[i][x]; - *ptr++ = line[i][x]; - *ptr++ = line[i][x]; - } - } - } - for (i = 0; i < cinfo.rec_outbuf_height; i++) - free(line[i]); - } - jpeg_finish_decompress(&cinfo); - jpeg_destroy_decompress(&cinfo); - return data; -} -#endif /* HAVE_LIBJPEG */ - -#ifdef HAVE_LIBPNG -unsigned char * -g_LoadPNG(FILE * f, int *w, int *h, int *t) -{ - png_structp png_ptr; - png_infop info_ptr; - unsigned char *data, *ptr, **lines, *ptr2, r, g, b, a; - int i, x, y, transp, bit_depth, color_type, interlace_type; - png_uint_32 *ww, *hh; - - /* Init PNG Reader */ - transp = 0; - png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); - if (!png_ptr) - return NULL; - - info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) - { - png_destroy_read_struct(&png_ptr, NULL, NULL); - return NULL; - } - - if (setjmp(png_ptr->jmpbuf)) - { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return NULL; - } - - if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) - { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return NULL; - } - png_init_io(png_ptr, f); - /* Read Header */ - png_read_info(png_ptr, info_ptr); - ww = (png_uint_32 *) w; - hh = (png_uint_32 *) h; - png_get_IHDR(png_ptr, info_ptr, ww, hh, &bit_depth, &color_type, &interlace_type, - NULL, NULL); - /* Setup Translators */ - if (color_type == PNG_COLOR_TYPE_PALETTE) - png_set_expand(png_ptr); - png_set_strip_16(png_ptr); - png_set_packing(png_ptr); - if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) - png_set_expand(png_ptr); - png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER); - *w = info_ptr->width; - *h = info_ptr->height; - data = malloc(*w ** h * 3); - if (!data) - { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return NULL; - } - lines = (unsigned char **)malloc(*h * sizeof(unsigned char *)); - - if (lines == NULL) - { - free(data); - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return NULL; - } - for (i = 0; i < *h; i++) - { - if ((lines[i] = malloc(*w * (sizeof(unsigned char) * 4))) == NULL) - { - int n; - - free(data); - for (n = 0; n < i; n++) - free(lines[n]); - free(lines); - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return NULL; - } - } - png_read_image(png_ptr, lines); - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - ptr = data; - if (color_type == PNG_COLOR_TYPE_GRAY) - { - for (y = 0; y < *h; y++) - { - ptr2 = lines[y]; - for (x = 0; x < *w; x++) - { - r = *ptr2++; - *ptr++ = r; - *ptr++ = r; - *ptr++ = r; - } - } - } - else - { - for (y = 0; y < *h; y++) - { - ptr2 = lines[y]; - for (x = 0; x < *w; x++) - { - r = *ptr2++; - g = *ptr2++; - b = *ptr2++; - a = *ptr2++; - if (a < 128) - { - *ptr++ = 255; - *ptr++ = 0; - *ptr++ = 255; - transp = 1; - } - else - { - if ((r == 255) && (g == 0) && (b == 255)) - r = 254; - *ptr++ = r; - *ptr++ = g; - *ptr++ = b; - } - } - } - } - for (i = 0; i < *h; i++) - free(lines[i]); - free(lines); - *t = transp; - return data; -} -#endif /* HAVE_LIBPNG */ - -#ifdef HAVE_LIBTIFF -unsigned char * -g_LoadTIFF(char *f, int *w, int *h, int *t) -{ - TIFF *tif; - unsigned char *data, *ptr, r, g, b, a; - int x, y; - uint32 ww, hh, *rast, *tptr; - size_t npix; - int istransp; - - istransp = 0; - if (!f) - return NULL; - - tif = TIFFOpen(f, "r"); - if (!tif) - return NULL; - - TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &ww); - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &hh); - npix = ww * hh; - *w = (int)ww; - *h = (int)hh; - rast = (uint32 *) _TIFFmalloc(npix * sizeof(uint32)); - if (!rast) - { - TIFFClose(tif); - return NULL; - } - data = NULL; - if (TIFFReadRGBAImage(tif, ww, hh, rast, 0)) - { - data = (unsigned char *)malloc(*w ** h * 3); - if (!data) - { - _TIFFfree(rast); - TIFFClose(tif); - return NULL; - } - ptr = data; - for (y = 0; y < *h; y++) - { - tptr = rast; - tptr += ((*h - y - 1) ** w); - for (x = 0; x < *w; x++) - { - a = TIFFGetA(*tptr); - b = TIFFGetB(*tptr); - g = TIFFGetG(*tptr); - r = TIFFGetR(*tptr); - tptr++; - if (a < 128) - { - *ptr++ = 255; - *ptr++ = 0; - *ptr++ = 255; - istransp = 1; - } - else - { - if ((r == 255) && (g == 0) && (b == 255)) - r = 254; - *ptr++ = r; - *ptr++ = g; - *ptr++ = b; - } - } - } - } - _TIFFfree(rast); - TIFFClose(tif); - *t = istransp; - return data; -} - -#endif /* HAVE_LIBTIFF */ - -#ifdef HAVE_LIBGIF -unsigned char * -g_LoadGIF(char *f, int *w, int *h, int *t) -{ - unsigned char *data, *ptr; - GifFileType *gif; - GifRowType *rows; - GifRecordType rec; - ColorMapObject *cmap; - int i, j, done, bg, csize, r, g, b; - int intoffset[] = - {0, 4, 2, 1}; - int intjump[] = - {8, 8, 4, 2}; - int istransp, transp; - - done = 0; - istransp = 0; - gif = DGifOpenFileName(f); - if (!gif) - return NULL; - - do - { - DGifGetRecordType(gif, &rec); - if ((rec == IMAGE_DESC_RECORD_TYPE) && (!done)) - { - DGifGetImageDesc(gif); - *w = gif->Image.Width; - *h = gif->Image.Height; - rows = malloc(*h * sizeof(GifRowType *)); - if (!rows) - { - DGifCloseFile(gif); - return NULL; - } - data = malloc(*w ** h * 3); - if (!data) - { - DGifCloseFile(gif); - free(rows); - return NULL; - } - for (i = 0; i < *h; i++) - rows[i] = NULL; - for (i = 0; i < *h; i++) - { - rows[i] = malloc(*w * sizeof(GifPixelType)); - if (!rows[i]) - { - DGifCloseFile(gif); - for (i = 0; i < *h; i++) - if (rows[i]) - free(rows[i]); - free(rows); - free(data); - return NULL; - } - } - if (gif->Image.Interlace) - { - for (i = 0; i < 4; i++) - { - for (j = intoffset[i]; j < *h; j += intjump[i]) - DGifGetLine(gif, rows[j], *w); - } - } - else - { - for (i = 0; i < *h; i++) - DGifGetLine(gif, rows[i], *w); - } - done = 1; - } - else if (rec == EXTENSION_RECORD_TYPE) - { - int ext_code; - GifByteType *ext; - - DGifGetExtension(gif, &ext_code, &ext); - if (ext) - { - if ((ext[1] & 1)) - { - istransp = 1; - transp = (int)ext[4]; - } - } - do - { - DGifGetExtensionNext(gif, &ext); - } - while (ext); - } - } - while (rec != TERMINATE_RECORD_TYPE); - bg = gif->SBackGroundColor; - cmap = (gif->Image.ColorMap ? gif->Image.ColorMap : gif->SColorMap); - csize = cmap->ColorCount; - ptr = data; - if (!istransp) - { - for (i = 0; i < *h; i++) - { - for (j = 0; j < *w; j++) - { - r = cmap->Colors[rows[i][j]].Red; - g = cmap->Colors[rows[i][j]].Green; - b = cmap->Colors[rows[i][j]].Blue; - *ptr++ = r; - *ptr++ = g; - *ptr++ = b; - } - } - } - else - { - for (i = 0; i < *h; i++) - { - for (j = 0; j < *w; j++) - { - if (rows[i][j] == transp) - { - *ptr++ = 255; - *ptr++ = 0; - *ptr++ = 255; - } - else - { - r = cmap->Colors[rows[i][j]].Red; - g = cmap->Colors[rows[i][j]].Green; - b = cmap->Colors[rows[i][j]].Blue; - if (r == 255 && g == 0 && b == 255) - r = 254; - *ptr++ = r; - *ptr++ = g; - *ptr++ = b; - } - } - } - } - DGifCloseFile(gif); - for (i = 0; i < *h; i++) - free(rows[i]); - free(rows); - *t = istransp; - return data; -} - -#endif /* HAVE_LIBGIF */ - -unsigned char * -g_LoadXPM(char *f, int *w, int *h, int *t) -{ - FILE *file; - unsigned char *data, *ptr; - int pc, c, i, j, k, ncolors, cpp, comment, transp, quote, - context, len, /*token,*/ done; - char line[65536], s[65536], tok[65536], col[65536]; - XColor xcol; - struct _cmap - { - char str[8]; - char transp; - int r, g, b; - } - *cmap; - int lookup[128][128]; - - i = 0; - j = 0; - - transp = 0; - done = 0; - cmap = NULL; - - file = fopen(f, "r"); - if (!file) - return NULL; - - *w = 10; - *h = 10; - - ptr = NULL; - data = NULL; - c = ' '; - comment = 0; - quote = 0; - context = 0; - - while (!done) - { - pc = c; - c = fgetc(file); - if (c == EOF) - break; - if (!quote) - { - if (pc == '/' && c == '*') - comment = 1; - else if (pc == '*' && c == '/' && comment) - comment = 0; - } - if (!comment) - { - if (!quote && c == '"') - { - quote = 1; - i = 0; - } - else if (quote && c == '"') - { - line[i] = 0; - quote = 0; - if (context == 0) - { - /* Header */ - sscanf(line, "%i %i %i %i", w, h, &ncolors, &cpp); - if (cpp > 7) - { - fprintf(stderr, "gdk_imlib ERROR: XPM files with characters per pixel > 7 not supported\n"); - return NULL; - } - if (*w > 32767) - { - fprintf(stderr, "gdk_imlib ERROR: Image width > 32767 pixels for file\n"); - return NULL; - } - if (*h > 32767) - { - fprintf(stderr, "gdk_imlib ERROR: Image height > 32767 pixels for file\n"); - return NULL; - } - cmap = malloc(sizeof(struct _cmap) * ncolors); - - if (!cmap) - return NULL; - data = malloc(*w ** h * 3); - if (!data) - { - free(cmap); - return NULL; - } - ptr = data; - j = 0; - context++; - } - else if (context == 1) - { - /* Color Table */ - if (j < ncolors) - { - /* int colptr = 0; not used */ - int slen; - - tok[0] = 0; - col[0] = 0; - s[0] = 0; - len = strlen(line); - strncpy(cmap[j].str, line, cpp); - cmap[j].str[cpp] = 0; - cmap[j].r = -1; - cmap[j].transp = 0; - for (k = cpp; k < len; k++) - { - if (line[k] != ' ') - { - s[0] = 0; - sscanf(&line[k], "%65535s", s); - slen = strlen(s); - k += slen; - if ((!strcmp(s, "m")) || (!strcmp(s, "s")) || - (!strcmp(s, "g4")) || (!strcmp(s, "g")) || - (!strcmp(s, "c")) || (k >= len)) - { - if (k >= len) - { - if (col[0]) - strcat(col, " "); - strcat(col, s); - } - if (col[0]) - { - if (!strcasecmp(col, "none")) - { - transp = 1; - cmap[j].transp = 1; - } - else - { - if ((cmap[j].r < 0) || - (!strcmp(tok, "c"))) - { - XParseColor(id->x.disp, - id->x.root_cmap, - col, &xcol); - cmap[j].r = xcol.red >> 8; - cmap[j].g = xcol.green >> 8; - cmap[j].b = xcol.blue >> 8; - if ((cmap[j].r == 255) && - (cmap[j].g == 0) && - (cmap[j].b == 255)) - cmap[j].r = 254; - } - } - } - strcpy(tok, s); - col[0] = 0; - } - else - { - if (col[0]) - strcat(col, " "); - strcat(col, s); - } - } - } - } - j++; - if (j >= ncolors) - { - if (cpp == 1) - for (i = 0; i < ncolors; i++) - lookup[(int)cmap[i].str[0]][(int)cmap[i].str[1]] = i; - if (cpp == 2) - for (i = 0; i < ncolors; i++) - lookup[(int)cmap[i].str[0]][(int)cmap[i].str[1]] = i; - context++; - } - } - else - { - /* Image Data */ - i = 0; - if (cpp == 0) - { - /* Chars per pixel = 0? well u never know */ - } - if (cpp == 1) - { - if (transp) - { - for (i = 0; ((i < 65536) && (line[i])); i++) - { - col[0] = line[i]; - if (cmap[lookup[(int)col[0]][0]].transp) - { - *ptr++ = 255; - *ptr++ = 0; - *ptr++ = 255; - } - else - { - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].r; - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].g; - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].b; - } - } - } - else - { - for (i = 0; ((i < 65536) && (line[i])); i++) - { - col[0] = line[i]; - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].r; - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].g; - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].b; - } - } - } - else if (cpp == 2) - { - if (transp) - { - for (i = 0; ((i < 65536) && (line[i])); i++) - { - col[0] = line[i++]; - col[1] = line[i]; - if (cmap[lookup[(int)col[0]][(int)col[1]]].transp) - { - *ptr++ = 255; - *ptr++ = 0; - *ptr++ = 255; - } - else - { - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].r; - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].g; - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].b; - } - } - } - else - { - for (i = 0; ((i < 65536) && (line[i])); i++) - { - col[0] = line[i++]; - col[1] = line[i]; - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].r; - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].g; - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].b; - } - } - } - else - { - if (transp) - { - for (i = 0; ((i < 65536) && (line[i])); i++) - { - for (j = 0; j < cpp; j++, i++) - { - col[j] = line[i]; - } - col[j] = 0; - i--; - for (j = 0; j < ncolors; j++) - { - if (!strcmp(col, cmap[j].str)) - { - if (cmap[j].transp) - { - *ptr++ = 255; - *ptr++ = 0; - *ptr++ = 255; - } - else - { - *ptr++ = (unsigned char)cmap[j].r; - *ptr++ = (unsigned char)cmap[j].g; - *ptr++ = (unsigned char)cmap[j].b; - } - j = ncolors; - } - } - } - } - else - { - for (i = 0; ((i < 65536) && (line[i])); i++) - { - for (j = 0; j < cpp; j++, i++) - { - col[j] = line[i]; - } - col[j] = 0; - i--; - for (j = 0; j < ncolors; j++) - { - if (!strcmp(col, cmap[j].str)) - { - *ptr++ = (unsigned char)cmap[j].r; - *ptr++ = (unsigned char)cmap[j].g; - *ptr++ = (unsigned char)cmap[j].b; - j = ncolors; - } - } - } - } - } - } - } - } - /* Scan in line from XPM file (limit line length 65k) */ - if (i < 65536) - { - if ((!comment) && (quote) && (c != '"')) - { - line[i++] = c; - } - } - if ((ptr) && ((ptr - data) >= *w ** h * 3)) - done = 1; - } - fclose(file); - if (transp) - *t = 1; - else - *t = 0; - free(cmap); - return data; -} - -unsigned char * -g_LoadPPM(FILE * f, int *w, int *h) -{ - int done; - unsigned char *ptr; - unsigned char chr; - char s[256]; - int a, b; - int color, scale; - - a = b = scale = 0; - fgets(s, 256, f); - s[strlen(s) - 1] = 0; - - if (!strcmp(s, "P6")) - color = 1; - else if (!strcmp(s, "P5")) - color = 0; - else - return NULL; - - done = 1; - ptr = NULL; - while (done) - { - if (fgets(s, 256, f) == NULL) - break; - - s[strlen(s) - 1] = 0; - if (s[0] != '#') - { - done = 0; - sscanf(s, "%i %i", w, h); - a = *w; - b = *h; - if (a > 32767) - { - fprintf(stderr, "gdk_imlib ERROR: Image width > 32767 pixels for file\n"); - return NULL; - } - if (b > 32767) - { - fprintf(stderr, "gdk_imlib ERROR: Image height > 32767 pixels for file\n"); - return NULL; - } - fgets(s, 256, f); - sscanf(s, "%i", &scale); - s[strlen(s) - 1] = 0; - ptr = (unsigned char *)malloc(a * b * 3); - if (!ptr) - { - fprintf(stderr, "gdk_imlib ERROR: Cannot allocate RAM for RGB data in file"); - return ptr; - } - if (color) - { - if (!fread(ptr, a * b * 3, 1, f)) - { - free(ptr); - return NULL; - } - } - else - { - b = (a * b * 3); - a = 0; - while ((fread(&chr, 1, 1, f)) && (a < b)) - { - ptr[a++] = chr; - ptr[a++] = chr; - ptr[a++] = chr; - } - } - } - } - if (scale == 0) - { - free(ptr); - return NULL; - } - if (scale < 255) - { - int rot; - unsigned char *po; - - if (scale <= 1) - rot = 7; - else if (scale <= 3) - rot = 6; - else if (scale <= 7) - rot = 5; - else if (scale <= 15) - rot = 4; - else if (scale <= 31) - rot = 3; - else if (scale <= 63) - rot = 2; - else - rot = 1; - - if (rot > 0) - { - po = ptr; - while (po < (ptr + (*w ** h * 3))) - { - *po++ <<= rot; - *po++ <<= rot; - *po++ <<= rot; - } - } - } - return ptr; -} - -static int -gispnm(char *file) -{ - FILE *f; - char buf[8]; - - f = fopen(file, "rb"); - if (!f) - return 0; - fgets(buf, 8, f); - fclose(f); - if (!strcmp("P6\n", buf)) - return 1; - if (!strcmp("P5\n", buf)) - return 1; - return 0; -} - -static int -gisjpeg(char *file) -{ - FILE *f; - unsigned char buf[8]; - - f = fopen(file, "rb"); - if (!f) - return 0; - fread(buf, 1, 2, f); - fclose(f); - if ((buf[0] == 0xff) && (buf[1] == 0xd8)) - return 1; - return 0; -} - -static int -gispng(char *file) -{ -#ifdef HAVE_LIBPNG - FILE *f; - unsigned char buf[8]; - - f = fopen(file, "rb"); - if (!f) - return 0; - fread(buf, 1, 8, f); - fclose(f); - return (int)png_check_sig(buf, 8); -#else - return 0; -#endif -} - -static int -gistiff(char *file) -{ - FILE *f; - char buf[8]; - - f = fopen(file, "rb"); - if (!f) - return 0; - fgets(buf, 5, f); - fclose(f); - if ((buf[0] == 'M') && (buf[1] == 'M') && (buf[2] == 0x00) && (buf[3] == 0x2a)) - return 1; - if ((buf[0] == 'I') && (buf[1] == 'I') && (buf[2] == 0x2a) && (buf[3] == 0x00)) - return 1; - return 0; -} - -static int -giseim(char *file) -{ - FILE *f; - char buf[8]; - - f = fopen(file, "rb"); - if (!f) - return 0; - fread(buf, 1, 4, f); - fclose(f); - if (!strncmp("EIM ", buf, 4)) - return 1; - return 0; -} - -static int -gisgif(char *file) -{ - FILE *f; - char buf[8]; - - f = fopen(file, "rb"); - if (!f) - return 0; - fread(buf, 1, 4, f); - fclose(f); - buf[4] = 0; - if (!strcmp("GIF8", buf)) - return 1; - return 0; -} - -static int -gisxpm(char *file) -{ - FILE *f; - char buf[11]; - - f = fopen(file, "rb"); - if (!f) - return 0; - fread(buf, 1, 9, f); - fclose(f); - buf[9] = 0; - if (!strcmp("/* XPM */", buf)) - return 1; - return 0; -} - -GdkImlibImage * -gdk_imlib_load_image(char *file) -{ - int w, h; - int needs_conv = 1; - unsigned char *data; - GdkImlibImage *im; - char s[4096]; - char fil[4096]; - char *iden; - char *e; - char cmd[4096]; - FILE *p; - int eim; - int fmt; - int trans; - - eim = 0; - fmt = 0; - p = NULL; - data = NULL; - - if (!file) - return NULL; - if (id->cache.on_image) - if ((im = gfind_image(file))) - return im; - - strncpy(fil, file, sizeof(fil)); - iden = g_SplitID(fil); - e = g_GetExtension(fil); - - if (gispnm(fil)) - { - needs_conv = 0; - fmt = 0; - } - else if (gisjpeg(fil)) - { -#ifdef HAVE_LIBJPEG - needs_conv = 0; - fmt = 2; -#else - needs_conv = 1; - fmt = 0; -#endif - } - else if (gistiff(fil)) - { -#ifdef HAVE_LIBTIFF - needs_conv = 0; - fmt = 3; -#else - needs_conv = 1; - fmt = 0; -#endif - } - else if (giseim(fil)) - { - needs_conv = 0; - eim = 1; - fmt = 9999; - } - else if (gisxpm(fil)) - { - needs_conv = 0; - fmt = 5; - } - else if (gispng(fil)) - { -#ifdef HAVE_LIBPNG - needs_conv = 0; - fmt = 1; -#else - needs_conv = 1; - fmt = 0; -#endif - } - else if (gisgif(fil)) - { -#ifdef HAVE_LIBGIF - needs_conv = 0; - fmt = 4; -#else - needs_conv = 1; - fmt = 0; -#endif - } - if (needs_conv && id->fallback) - { - p = open_helper("%C/convert %s pnm:-", fil, "rb"); - } - else if ((fmt == 2) || (fmt == 1) || (fmt == 0)) - p = fopen(fil, "rb"); - - trans = 0; - if (!eim && !data) - { - switch (fmt) - { - case 5: - data = g_LoadXPM(fil, &w, &h, &trans); - break; -#ifdef HAVE_LIBGIF - case 4: - data = g_LoadGIF(fil, &w, &h, &trans); - break; -#endif -#ifdef HAVE_LIBTIFF - case 3: - data = g_LoadTIFF(fil, &w, &h, &trans); - break; -#endif -#ifdef HAVE_LIBJPEG - case 2: - if (p) - data = g_LoadJPEG(p, &w, &h); - break; -#endif -#ifdef HAVE_LIBPNG - case 1: - if (p) - data = g_LoadPNG(p, &w, &h, &trans); - break; -#endif - default: - if (p) - data = g_LoadPPM(p, &w, &h); - break; - } - } - - if (p && !needs_conv) - fclose(p); - else if (p) - close_helper(p); - - if ((!data) && (id->fallback)) - { - p = open_helper("%C/convert %s pnm:-", fil, "rb"); - if (p) - { - data = g_LoadPPM(p, &w, &h); - close_helper(p); - } - } - if ((!eim) && (!data) && (id->fallback)) - { - if (!strcasecmp(s, "jpeg")) - strcpy(cmd, "%J %s"); - else if (!strcasecmp(s, "jpg")) - strcpy(cmd, "%J %s"); - else if (!strcasecmp(s, "bmp")) - strcpy(cmd, "%P/bmptoppm %s"); - else if (!strcasecmp(s, "ilbm")) - strcpy(cmd, "%P/ilbmtoppm %s"); - else if (!strcasecmp(s, "ilb")) - strcpy(cmd, "%P/ilbmtoppm %s"); - else if (!strcasecmp(s, "iff")) - strcpy(cmd, "%P/ilbmtoppm %s"); - else if (!strcasecmp(s, "img")) - strcpy(cmd, "%P/imgtoppm %s"); - else if (!strcasecmp(s, "mtv")) - strcpy(cmd, "%P/mtvtoppm %s"); - else if (!strcasecmp(s, "pcx")) - strcpy(cmd, "%P/pcxtoppm %s"); - else if (!strcasecmp(s, "pgm")) - strcpy(cmd, "%P/pgmtoppm rgb:ffff/ffff/ffff %s"); - else if (!strcasecmp(s, "pi1")) - strcpy(cmd, "%P/pi1toppm %s"); - else if (!strcasecmp(s, "pict")) - strcpy(cmd, "%P/picttoppm %s"); - else if (!strcasecmp(s, "pic")) - strcpy(cmd, "%P/picttoppm %s"); - else if (!strcasecmp(s, "pj")) - strcpy(cmd, "%P/pjtoppm %s"); - else if (!strcasecmp(s, "qrt")) - strcpy(cmd, "%P/qrttoppm %s"); - else if (!strcasecmp(s, "sld")) - strcpy(cmd, "%P/sldtoppm %s"); - else if (!strcasecmp(s, "spc")) - strcpy(cmd, "%P/spctoppm %s"); - else if (!strcasecmp(s, "spu")) - strcpy(cmd, "%P/sputoppm %s"); - else if (!strcasecmp(s, "tga")) - strcpy(cmd, "%P/tgatoppm %s"); - else if (!strcasecmp(s, "xim")) - strcpy(cmd, "%P/ximtoppm %s"); - else if (!strcasecmp(s, "xpm")) - strcpy(cmd, "%P/xpmtoppm %s"); - else if (!strcasecmp(s, "gif")) - strcpy(cmd, "%P/giftopnm %s"); - else if (!strcasecmp(s, "rast")) - strcpy(cmd, "%P/rasttopnm %s"); - else if (!strcasecmp(s, "ras")) - strcpy(cmd, "%P/rasttopnm %s"); - else if (!strcasecmp(s, "sgi")) - strcpy(cmd, "%P/sgitopnm %s"); - else if (!strcasecmp(s, "sir")) - strcpy(cmd, "%P/sirtopnm %s"); - else if (!strcasecmp(s, "tiff")) - strcpy(cmd, "%P/tifftopnm %s"); - else if (!strcasecmp(s, "tif")) - strcpy(cmd, "%P/tifftopnm %s"); - else if (!strcasecmp(s, "wxd")) - strcpy(cmd, "%P/wxdtopnm %s"); - else if (!strcasecmp(s, "zeiss")) - strcpy(cmd, "%P/zeisstopnm -ppm %s"); - else if (!strcasecmp(s, "zei")) - strcpy(cmd, "%P/zeisstopnm -ppm %s"); - else if (!strcasecmp(s, "zis")) - strcpy(cmd, "%P/zeisstopnm -ppm %s"); - else - strcpy(cmd, "%P/anytopnm %s"); - p = open_helper(cmd, fil, "rb"); - if (p) - { - data = g_LoadPPM(p, &w, &h); - close_helper(p); - } - } - - if (!eim && !data) - { - fprintf(stderr, "gdk_imlib ERROR: Cannot load image: %s\nAll fallbacks failed.\n", fil); - return NULL; - } - - im = (GdkImlibImage *) malloc(sizeof(GdkImlibImage)); - if (!im) - { - fprintf(stderr, "gdk_imlib ERROR: Cannot allocate RAM for image data\n"); - if (data) - free(data); - return NULL; - } - im->alpha_data = NULL; - if (trans) - { - im->shape_color.r = 255; - im->shape_color.g = 0; - im->shape_color.b = 255; - } - else - { - im->shape_color.r = -1; - im->shape_color.g = -1; - im->shape_color.b = -1; - } - im->border.left = 0; - im->border.right = 0; - im->border.top = 0; - im->border.bottom = 0; - im->cache = 1; - im->rgb_data = data; - im->rgb_width = w; - im->rgb_height = h; - im->pixmap = NULL; - im->shape_mask = NULL; - if (eim) - { - char s1[256], s2[256]; - int num, size; - int r, g, b; - int br, bl, bt, bb; - - /* Load Native-as-can-be EIM format (Enlightenment IMlib format) */ - p = fopen(fil, "r"); - if (!p) - { - free(im); - return NULL; - } - fgets(s, 4096, p); - if ((s[0] != 'E') && (s[1] != 'I') && (s[2] != 'M') && (s[3] != ' ')) - { - fclose(p); - free(im); - return NULL; - } - sscanf(s, "%256s %i", s1, &num); - if (num <= 0) - { - fclose(p); - free(im); - return NULL; - } - while (fgets(s, 4096, p)) - { - sscanf(s, "%256s", s1); - if (!strcmp("IMAGE", s1)) - { - sscanf(s, "%256s %i %256s %i %i %i %i %i %i %i %i %i", s1, &size, s2, &w, &h, &r, &g, &b, &bl, &br, &bt, &bb); - if (!iden[0]) - break; - else if (!strcmp(iden, s2)) - break; - if (size > 0) - fseek(p, size, SEEK_CUR); - } - } - im->rgb_data = malloc(w * h * 3); - if (!im->rgb_data) - { - fclose(p); - free(im); - return NULL; - } - im->shape_color.r = r; - im->shape_color.g = g; - im->shape_color.b = b; - im->rgb_width = w; - im->rgb_height = h; - im->border.left = bl; - im->border.right = br; - im->border.top = bt; - im->border.bottom = bb; - fread(im->rgb_data, 1, w * h * 3, p); - fclose(p); - if (iden[0]) - { - strncat(fil, ":", sizeof(fil) - strlen(fil)); - strncat(fil, iden, sizeof(fil) - strlen(fil)); - } - } - im->mod.gamma = id->mod.gamma; - im->mod.brightness = id->mod.brightness; - im->mod.contrast = id->mod.contrast; - im->rmod.gamma = id->rmod.gamma; - im->rmod.brightness = id->rmod.brightness; - im->rmod.contrast = id->rmod.contrast; - im->gmod.gamma = id->gmod.gamma; - im->gmod.brightness = id->gmod.brightness; - im->gmod.contrast = id->gmod.contrast; - im->bmod.gamma = id->bmod.gamma; - im->bmod.brightness = id->bmod.brightness; - im->bmod.contrast = id->bmod.contrast; - im->filename = malloc(strlen(file) + 1); - if (im->filename) - strcpy(im->filename, file); - if ((id->cache.on_image && im)) - gadd_image(im, fil); - gcalc_map_tables(im); - return im; -} - -gint -gdk_imlib_save_image_to_eim(GdkImlibImage * im, char *file) -{ - char fil[4096]; - char *iden; - FILE *f; - int size; - - if ((!id) || (!im) || (!file)) - return 0; - strncpy(fil, file, sizeof(fil)); - iden = g_SplitID(fil); - if (!iden[0]) - iden = "default"; - f = fopen(fil, "w"); - if (!f) - return 0; - - size = im->rgb_width * im->rgb_height * 3; - fprintf(f, "EIM 1\n"); - fprintf(f, "IMAGE %i %s %i %i %i %i %i %i %i %i %i\n", - size, - iden, - im->rgb_width, - im->rgb_height, - im->shape_color.r, - im->shape_color.g, - im->shape_color.b, - im->border.left, - im->border.right, - im->border.top, - im->border.bottom); - if (fwrite(im->rgb_data, size, 1, f) != 1) - { - fclose(f); - return 0; - } - fclose(f); - return 1; -} - -gint -gdk_imlib_add_image_to_eim(GdkImlibImage * im, char *file) -{ - char fil[4096]; - char *iden; - FILE *f; - int size; - - if ((!id) || (!im) || (!file)) - return 0; - strncpy(fil, file, sizeof(fil)); - - iden = g_SplitID(file); - if (!iden[0]) - strcpy(iden, "default"); - - f = fopen(fil, "a"); - if (!f) - return 0; - - size = im->rgb_width * im->rgb_height * 3; - fprintf(f, "IMAGE %i %s %i %i %i %i %i %i %i %i %i\n", - size, - iden, - im->rgb_width, - im->rgb_height, - im->shape_color.r, - im->shape_color.g, - im->shape_color.b, - im->border.left, - im->border.right, - im->border.top, - im->border.bottom); - - if (fwrite(im->rgb_data, size, 1, f) != 1) - { - fclose(f); - return 0; - } - fclose(f); - return 1; -} - -gint -gdk_imlib_save_image_to_ppm(GdkImlibImage * im, char *file) -{ - FILE *f; - - if ((!id) || (!im) || (!file)) - return 0; - f = fopen(file, "w"); - if (!f) - return 0; - - fprintf(f, "P6\n"); - fprintf(f, "%i %i\n255\n", - im->rgb_width, - im->rgb_height); - if (fwrite(im->rgb_data, im->rgb_width * im->rgb_height * 3, 1, f) != 1) - { - fclose(f); - return 0; - } - fclose(f); - return 1; -} diff --git a/src/gdk_imlib/misc.c b/src/gdk_imlib/misc.c deleted file mode 100644 index d18964373c..0000000000 --- a/src/gdk_imlib/misc.c +++ /dev/null @@ -1,1165 +0,0 @@ -#define _GNU_SOURCE -#include "../gdk_imlib/gdk_imlib.h" -#include "../gdk_imlib/gdk_imlib_private.h" - -gint -gdk_imlib_get_render_type() -{ - if (id) - return id->render_type; - else - return -1; -} - -void -gdk_imlib_set_render_type(gint rend_type) -{ - if (id) - { - if (id->x.depth > 8) - id->render_type = rend_type; - else - { - if ((rend_type == RT_PLAIN_TRUECOL) || - (rend_type == RT_DITHER_TRUECOL)) - id->render_type = RT_DITHER_PALETTE_FAST; - else - id->render_type = rend_type; - } - return; - } - else - return; -} - -static void -gdk_imlib_set_fast_render(ImlibData * id, Display * disp) -{ - /* Turn off fastrender if there is an endianess diff between */ - /* client and Xserver */ - int byt, bit; - - byt = ImageByteOrder(id->x.disp); /* LSBFirst | MSBFirst */ - bit = BitmapBitOrder(id->x.disp); /* LSBFirst | MSBFirst */ - /* if little endian && server big */ - if (htonl(1) != 1 && byt == MSBFirst) - id->fastrend = 0; - /* if big endian && server little */ - if (htonl(1) == 1 && byt == LSBFirst) - id->fastrend = 0; -} - -static int -gdk_imlib_set_color_map(ImlibData * id, Display * disp) -{ - XSetWindowAttributes at; - unsigned long mask; - int newcm = 0; - - at.border_pixel = 0; - at.backing_store = NotUseful; - at.background_pixel = 0; - at.save_under = False; - at.override_redirect = True; - mask = CWOverrideRedirect | CWBackPixel | CWBorderPixel | - CWBackingStore | CWSaveUnder; - newcm = 0; - if (id->x.visual != DefaultVisual(disp, id->x.screen)) - { - Colormap cm; - - cm = XCreateColormap(id->x.disp, id->x.root, - id->x.visual, AllocNone); - if (cm) - { - mask |= CWColormap; - id->x.root_cmap = cm; - at.colormap = cm; - newcm = 1; - } - } - id->x.base_window = XCreateWindow(id->x.disp, id->x.root, - -100, -100, 10, 10, 0, - id->x.depth, InputOutput, - id->x.visual, mask, &at); - id->x.gdk_win = gdk_window_foreign_new(id->x.base_window); - if (newcm) - id->x.gdk_cmap = gdk_colormap_new(gdk_window_get_visual - (id->x.gdk_win), FALSE); - else - id->x.gdk_cmap = gdk_colormap_get_system(); - return newcm; -} - -void -gdk_imlib_init() -{ - Display *disp; - XWindowAttributes xwa; - XVisualInfo xvi, *xvir; - char *homedir; - char s[4096]; - char *s1; - char *s2; - FILE *f; - int override = 0; - int dither = 0; - int remap = 1; - int num; - int i, max, maxn; - int clas; - char *palfile = NULL; - int loadpal; - int vis; - int newcm; - - disp = (Display *) gdk_display; - if (!disp) - { - fprintf(stderr, "gdk_imlib ERROR: gdk has not connected to the display\n"); - return; - } - vis = -1; - loadpal = 0; - if (id) - return; - id = (ImlibData *) malloc(sizeof(ImlibData)); - if (!id) - { - fprintf(stderr, "gdk_imlib ERROR: Cannot alloc RAM for Initial data struct\n"); - return; - } - id->palette = NULL; - id->palette_orig = NULL; - id->fast_rgb = NULL; - id->fast_err = NULL; - id->fast_erg = NULL; - id->fast_erb = NULL; - id->x.disp = disp; - id->x.screen = DefaultScreen(disp); /* the screen number */ - id->x.root = DefaultRootWindow(disp); /* the root window id */ - id->x.visual = DefaultVisual(disp, id->x.screen); /* the visual type */ - id->x.depth = DefaultDepth(disp, id->x.screen); /* the depth of the screen in bpp */ - if (XShmQueryExtension(id->x.disp)) - { - id->x.shm = 1; - id->x.shm_event = XShmGetEventBase(id->x.disp) + ShmCompletion; - id->x.last_xim = NULL; - id->x.last_sxim = NULL; - id->max_shm = 0x7fffffff; - if (XShmPixmapFormat(id->x.disp) == ZPixmap) - id->x.shmp = 1; - } - else - { - id->x.shm = 0; - id->x.shmp = 0; - } - id->cache.on_image = 0; - id->cache.size_image = 0; - id->cache.num_image = 0; - id->cache.used_image = 0; - id->cache.image = NULL; - id->cache.on_pixmap = 0; - id->cache.size_pixmap = 0; - id->cache.num_pixmap = 0; - id->cache.used_pixmap = 0; - id->cache.pixmap = NULL; - id->byte_order = 0; - id->fastrend = 0; - id->hiq = 0; - id->fallback = 1; - id->mod.gamma = 256; - id->mod.brightness = 256; - id->mod.contrast = 256; - id->rmod.gamma = 256; - id->rmod.brightness = 256; - id->rmod.contrast = 256; - id->gmod.gamma = 256; - id->gmod.brightness = 256; - id->gmod.contrast = 256; - id->bmod.gamma = 256; - id->bmod.brightness = 256; - id->bmod.contrast = 256; - id->ordered_dither = 1; - - if (XGetWindowAttributes(disp, id->x.root, &xwa)) - { - if (xwa.colormap) - id->x.root_cmap = xwa.colormap; - else - id->x.root_cmap = 0; - } - else - id->x.root_cmap = 0; - - id->num_colors = 0; - homedir = getenv("HOME"); - g_snprintf(s, sizeof(s), "%s/.imrc", homedir); - f = fopen(s, "r"); - if (!f) - f = fopen(SYSTEM_IMRC, "r"); - if (f) - { - while (fgets(s, 4096, f)) - { - if (s[0] == '#') - continue; - - s1 = strtok(s, " \t\n"); - - /* Blank line ? */ - - if (s1 == NULL) - continue; - - s2 = strtok(NULL, " \t\n"); - if (s2 == NULL) - s2 = ""; /* NULL argument */ - - if (!strcasecmp("PaletteFile", s1)) - { - palfile = strdup(s2); - } - else if (!strcasecmp("PaletteOverride", s1)) - { - if (!strcasecmp("yes", s2)) - override = 1; - else - override = 0; - } - else if (!strcasecmp("Dither", s1)) - { - if (!strcasecmp("yes", s2)) - dither = 1; - else - dither = 0; - } - else if (!strcasecmp("Remap", s1)) - { - if (!strcasecmp("fast", s2)) - remap = 1; - else - remap = 0; - } - else if (!strcasecmp("Mit-Shm", s1)) - { - if (!strcasecmp("off", s2)) - { - id->x.shm = 0; - id->x.shmp = 0; - } - } - else if (!strcasecmp("SharedPixmaps", s1)) - { - if (!strcasecmp("off", s2)) - id->x.shmp = 0; - } - else if (!strcasecmp("FastRender", s1)) - { - if (!strcasecmp("on", s2)) - id->fastrend = 1; - } - else if (!strcasecmp("HighQuality", s1)) - { - if (!strcasecmp("on", s2)) - id->hiq = 1; - } - else if (!strcasecmp("Shm_Max_Size", s1)) - { - num = atoi(s2); - id->max_shm = num; - } - else if (!strcasecmp("Image_Cache_Size", s1)) - { - num = atoi(s2); - id->cache.size_image = num; - } - else if (!strcasecmp("Pixmap_Cache_Size", s1)) - { - num = atoi(s2); - id->cache.size_pixmap = num; - } - else if (!strcasecmp("Image_Cache", s1)) - { - if (!strcasecmp("on", s2)) - id->cache.on_image = 1; - } - else if (!strcasecmp("Pixmap_Cache", s1)) - { - if (!strcasecmp("on", s2)) - id->cache.on_pixmap = 1; - } - else if (!strcasecmp("ForceVisualID", s1)) - { - sscanf(s, "%1024s %x", s1, &num); - vis = num; - } - else if (!strcasecmp("Fallback", s1)) - { - if (!strcasecmp("off", s2)) - id->fallback = 0; - else - id->fallback = 1; - } - else if (!strcasecmp("Gamma", s1)) - { - id->mod.gamma = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Brightness", s1)) - { - id->mod.brightness = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Contrast", s1)) - { - id->mod.contrast = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Red_Gamma", s1)) - { - id->rmod.gamma = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Red_Brightness", s1)) - { - id->rmod.brightness = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Red_Contrast", s1)) - { - id->rmod.contrast = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Green_Gamma", s1)) - { - id->gmod.gamma = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Green_Brightness", s1)) - { - id->gmod.brightness = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Green_Contrast", s1)) - { - id->gmod.contrast = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Blue_Gamma", s1)) - { - id->bmod.gamma = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Blue_Brightness", s1)) - { - id->bmod.brightness = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Blue_Contrast", s1)) - { - id->bmod.contrast = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Ordered_Dither", s1)) - { - if (!strcasecmp("off", s2)) - id->ordered_dither = 0; - else - id->ordered_dither = 1; - } - } - fclose(f); - } - /* list all visuals for the default screen */ - xvi.screen = id->x.screen; - xvir = XGetVisualInfo(disp, VisualScreenMask, &xvi, &num); - if (vis >= 0) - { - /* use the forced visual id */ - maxn = 0; - for (i = 0; i < num; i++) - { - if (xvir[i].visualid == (VisualID) vis) - maxn = i; - } - if (maxn >= 0) - { - unsigned long rmsk, gmsk, bmsk; - - id->x.depth = xvir[maxn].depth; - id->x.visual = xvir[maxn].visual; - rmsk = xvir[maxn].red_mask; - gmsk = xvir[maxn].green_mask; - bmsk = xvir[maxn].blue_mask; - - if ((rmsk > gmsk) && (gmsk > bmsk)) - id->byte_order = BYTE_ORD_24_RGB; - else if ((rmsk > bmsk) && (bmsk > gmsk)) - id->byte_order = BYTE_ORD_24_RBG; - else if ((bmsk > rmsk) && (rmsk > gmsk)) - id->byte_order = BYTE_ORD_24_BRG; - else if ((bmsk > gmsk) && (gmsk > rmsk)) - id->byte_order = BYTE_ORD_24_BGR; - else if ((gmsk > rmsk) && (rmsk > bmsk)) - id->byte_order = BYTE_ORD_24_GRB; - else if ((gmsk > bmsk) && (bmsk > rmsk)) - id->byte_order = BYTE_ORD_24_GBR; - else - id->byte_order = 0; - } - else - fprintf(stderr, "Visual Id no 0x%x specified in the imrc file is invalid on this display.\nUsing Default Visual.\n", vis); - } - else - { - if (xvir) - { - /* find the highest bit-depth supported by visuals */ - max = 0; - for (i = 0; i < num; i++) - { - if (xvir[i].depth > max) - max = xvir[i].depth; - } - if (max > 8) - { - id->x.depth = max; - clas = -1; - maxn = -1; - for (i = 0; i < num; i++) - { - if (xvir[i].depth == id->x.depth) - { - if ((xvir[i].class > clas) && (xvir[i].class != DirectColor)) - { - maxn = i; - clas = xvir[i].class; - } - } - } - if (maxn >= 0) - { - unsigned long rmsk, gmsk, bmsk; - - id->x.visual = xvir[maxn].visual; - rmsk = xvir[maxn].red_mask; - gmsk = xvir[maxn].green_mask; - bmsk = xvir[maxn].blue_mask; - - if ((rmsk > gmsk) && (gmsk > bmsk)) - id->byte_order = BYTE_ORD_24_RGB; - else if ((rmsk > bmsk) && (bmsk > gmsk)) - id->byte_order = BYTE_ORD_24_RBG; - else if ((bmsk > rmsk) && (rmsk > gmsk)) - id->byte_order = BYTE_ORD_24_BRG; - else if ((bmsk > gmsk) && (gmsk > rmsk)) - id->byte_order = BYTE_ORD_24_BGR; - else if ((gmsk > rmsk) && (rmsk > bmsk)) - id->byte_order = BYTE_ORD_24_GRB; - else if ((gmsk > bmsk) && (bmsk > rmsk)) - id->byte_order = BYTE_ORD_24_GBR; - else - id->byte_order = 0; - } - } - } - } - id->x.render_depth = id->x.depth; - XFree(xvir); - - if (id->x.depth == 16) - { - xvi.visual = id->x.visual; - xvi.visualid = XVisualIDFromVisual(id->x.visual); - xvir = XGetVisualInfo(disp, VisualIDMask, &xvi, &num); - if (xvir) - { - if (xvir->red_mask != 0xf800) - id->x.render_depth = 15; - XFree(xvir); - } - } - if (id->x.depth <= 8 || override == 1) - loadpal = 1; - - if (loadpal) - { - if (dither == 1) - { - if (remap == 1) - id->render_type = RT_DITHER_PALETTE_FAST; - else - id->render_type = RT_DITHER_PALETTE; - } - else - { - if (remap == 1) - id->render_type = RT_PLAIN_PALETTE_FAST; - else - id->render_type = RT_PLAIN_PALETTE; - } - /* Should we error this case or default it nicely */ - if (palfile != NULL) - gdk_imlib_load_colors(palfile); - if (id->num_colors == 0) - { - fprintf(stderr, "gdk_imlib: Cannot Find Palette. A Palette is required for this mode\n"); - free(id); - id = NULL; - if (palfile) - free(palfile); - return; - } - } - else - { - if (id->hiq == 1) - id->render_type = RT_DITHER_TRUECOL; - else - id->render_type = RT_PLAIN_TRUECOL; - } - - newcm = gdk_imlib_set_color_map(id, disp); - - gdk_imlib_set_fast_render(id, disp); - - if (palfile) - free(palfile); -} - -void -gdk_imlib_init_params(GdkImlibInitParams * p) -{ - Display *disp; - XWindowAttributes xwa; - XVisualInfo xvi, *xvir; - char *homedir; -/* char file[4096]; */ - char s[4096], *s1, *s2; - FILE *f; - int override = 0; - int dither = 0; - int remap = 1; - int num; - int i, max, maxn; - int clas; - char *palfile = NULL; - int loadpal; - int vis; - int newcm; - - disp = (Display *) gdk_display; - if (!disp) - { - fprintf(stderr, "gdk_imlib ERROR: gdk has not connected to the display\n"); - return; - } - vis = -1; - loadpal = 0; - if (id) - return; - id = (ImlibData *) malloc(sizeof(ImlibData)); - if (!id) - { - fprintf(stderr, "gdk_imlib ERROR: Cannot alloc RAM for Initial data struct\n"); - return; - } - id->palette = NULL; - id->palette_orig = NULL; - id->fast_rgb = NULL; - id->fast_err = NULL; - id->fast_erg = NULL; - id->fast_erb = NULL; - id->x.disp = disp; - id->x.screen = DefaultScreen(disp); /* the screen number */ - id->x.root = DefaultRootWindow(disp); /* the root window id */ - id->x.visual = DefaultVisual(disp, id->x.screen); /* the visual type */ - id->x.depth = DefaultDepth(disp, id->x.screen); /* the depth of the screen in bpp */ - if (XShmQueryExtension(id->x.disp)) - { - id->x.shm = 1; - id->x.shm_event = XShmGetEventBase(id->x.disp) + ShmCompletion; - id->x.last_xim = NULL; - id->x.last_sxim = NULL; - id->max_shm = 0x7fffffff; - if (XShmPixmapFormat(id->x.disp) == ZPixmap) - id->x.shmp = 1; - } - else - { - id->x.shm = 0; - id->x.shmp = 0; - } - id->cache.on_image = 0; - id->cache.size_image = 0; - id->cache.num_image = 0; - id->cache.used_image = 0; - id->cache.image = NULL; - id->cache.on_pixmap = 0; - id->cache.size_pixmap = 0; - id->cache.num_pixmap = 0; - id->cache.used_pixmap = 0; - id->cache.pixmap = NULL; - id->byte_order = 0; - id->fastrend = 0; - id->hiq = 0; - id->fallback = 1; - id->mod.gamma = 256; - id->mod.brightness = 256; - id->mod.contrast = 256; - id->rmod.gamma = 256; - id->rmod.brightness = 256; - id->rmod.contrast = 256; - id->gmod.gamma = 256; - id->gmod.brightness = 256; - id->gmod.contrast = 256; - id->bmod.gamma = 256; - id->bmod.brightness = 256; - id->bmod.contrast = 256; - - if (XGetWindowAttributes(disp, id->x.root, &xwa)) - { - if (xwa.colormap) - id->x.root_cmap = xwa.colormap; - else - id->x.root_cmap = 0; - } - else - id->x.root_cmap = 0; - id->num_colors = 0; - homedir = getenv("HOME"); - g_snprintf(s, sizeof(s), "%s/.imrc", homedir); - f = fopen(s, "r"); - if (!f) - f = fopen(SYSTEM_IMRC, "r"); - if (f) - { - while (fgets(s, 4096, f)) - { - if (s[0] == '#') - continue; - - s1 = strtok(s, " \t\n"); - - /* Blank line ? */ - - if (s1 == NULL) - continue; - - s2 = strtok(NULL, " \t\n"); - if (s2 == NULL) - s2 = ""; /* NULL argument */ - - if (!strcasecmp("PaletteFile", s1)) - { - palfile = strdup(s2); - } - else if (!strcasecmp("PaletteOverride", s1)) - { - if (!strcasecmp("yes", s2)) - override = 1; - else - override = 0; - } - else if (!strcasecmp("Dither", s1)) - { - if (!strcasecmp("yes", s2)) - dither = 1; - else - dither = 0; - } - else if (!strcasecmp("Remap", s1)) - { - if (!strcasecmp("fast", s2)) - remap = 1; - else - remap = 0; - } - else if (!strcasecmp("Mit-Shm", s1)) - { - if (!strcasecmp("off", s2)) - { - id->x.shm = 0; - id->x.shmp = 0; - } - } - else if (!strcasecmp("SharedPixmaps", s1)) - { - if (!strcasecmp("off", s2)) - id->x.shmp = 0; - } - else if (!strcasecmp("FastRender", s1)) - { - if (!strcasecmp("on", s2)) - id->fastrend = 1; - } - else if (!strcasecmp("HighQuality", s1)) - { - if (!strcasecmp("on", s2)) - id->hiq = 1; - } - else if (!strcasecmp("Shm_Max_Size", s1)) - { - num = atoi(s2); - id->max_shm = num; - } - if (!strcasecmp("Image_Cache_Size", s1)) - { - num = atoi(s2); - id->cache.size_image = num; - } - else if (!strcasecmp("Pixmap_Cache_Size", s1)) - { - num = atoi(s2); - id->cache.size_pixmap = num; - } - else if (!strcasecmp("Image_Cache", s1)) - { - if (!strcasecmp("on", s2)) - id->cache.on_image = 1; - } - else if (!strcasecmp("Pixmap_Cache", s1)) - { - if (!strcasecmp("on", s2)) - id->cache.on_pixmap = 1; - } - else if (!strcasecmp("ForceVisualID", s1)) - { - sscanf(s, "%1024s %x", s1, &num); - vis = num; - } - else if (!strcasecmp("Fallback", s1)) - { - if (!strcasecmp("off", s2)) - id->fallback = 0; - else - id->fallback = 1; - } - else if (!strcasecmp("Gamma", s1)) - { - id->mod.gamma = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Brightness", s1)) - { - id->mod.brightness = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Contrast", s1)) - { - id->mod.contrast = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Red_Gamma", s1)) - { - id->rmod.gamma = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Red_Brightness", s1)) - { - id->rmod.brightness = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Red_Contrast", s1)) - { - id->rmod.contrast = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Green_Gamma", s1)) - { - id->gmod.gamma = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Green_Brightness", s1)) - { - id->gmod.brightness = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Green_Contrast", s1)) - { - id->gmod.contrast = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Blue_Gamma", s1)) - { - id->bmod.gamma = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Blue_Brightness", s1)) - { - id->bmod.brightness = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Blue_Contrast", s1)) - { - id->bmod.contrast = (int)(256.0 * atof(s2)); - } - else if (!strcasecmp("Ordered_Dither", s1)) - { - if (!strcasecmp("off", s2)) - id->ordered_dither = 0; - else - id->ordered_dither = 1; - } - } - fclose(f); - } - if (p) - { - if (p->flags & PARAMS_VISUALID) - vis = p->visualid; - if (p->flags & PARAMS_PALETTEFILE) - palfile = strdup(p->palettefile); - if (p->flags & PARAMS_SHAREDMEM) - { - if (!p->sharedmem) - { - id->x.shm = 0; - id->x.shmp = 0; - } - else - { - id->x.shm = 1; - id->x.shmp = 0; - } - } - if (p->flags & PARAMS_SHAREDPIXMAPS) - { - if (id->x.shm) - id->x.shmp = p->sharedpixmaps; - } - if (p->flags & PARAMS_PALETTEOVERRIDE) - override = p->paletteoverride; - if (p->flags & PARAMS_REMAP) - remap = p->remap; - if (p->flags & PARAMS_FASTRENDER) - id->fastrend = p->fastrender; - if (p->flags & PARAMS_HIQUALITY) - id->hiq = p->hiquality; - if (p->flags & PARAMS_DITHER) - dither = p->dither; - if (p->flags & PARAMS_IMAGECACHESIZE) - id->cache.size_image = p->imagecachesize; - if (p->flags & PARAMS_PIXMAPCACHESIZE) - id->cache.size_pixmap = p->pixmapcachesize; - } - /* list all visuals for the default screen */ - xvi.screen = id->x.screen; - xvir = XGetVisualInfo(disp, VisualScreenMask, &xvi, &num); - if (vis >= 0) - { - /* use the forced visual id */ - maxn = 0; - for (i = 0; i < num; i++) - { - if (xvir[i].visualid == (VisualID) vis) - maxn = i; - } - if (maxn >= 0) - { - unsigned long rmsk, gmsk, bmsk; - - id->x.depth = xvir[maxn].depth; - id->x.visual = xvir[maxn].visual; - rmsk = xvir[maxn].red_mask; - gmsk = xvir[maxn].green_mask; - bmsk = xvir[maxn].blue_mask; - - if ((rmsk > gmsk) && (gmsk > bmsk)) - id->byte_order = BYTE_ORD_24_RGB; - else if ((rmsk > bmsk) && (bmsk > gmsk)) - id->byte_order = BYTE_ORD_24_RBG; - else if ((bmsk > rmsk) && (rmsk > gmsk)) - id->byte_order = BYTE_ORD_24_BRG; - else if ((bmsk > gmsk) && (gmsk > rmsk)) - id->byte_order = BYTE_ORD_24_BGR; - else if ((gmsk > rmsk) && (rmsk > bmsk)) - id->byte_order = BYTE_ORD_24_GRB; - else if ((gmsk > bmsk) && (bmsk > rmsk)) - id->byte_order = BYTE_ORD_24_GBR; - else - id->byte_order = 0; - } - else - fprintf(stderr, "Visual Id no 0x%x specified in the imrc file is invalid on this display.\nUsing Default Visual.\n", vis); - } - else - { - if (xvir) - { - /* find the highest bit-depth supported by visuals */ - max = 0; - for (i = 0; i < num; i++) - { - if (xvir[i].depth > max) - max = xvir[i].depth; - } - if (max > 8) - { - id->x.depth = max; - clas = -1; - maxn = -1; - for (i = 0; i < num; i++) - { - if (xvir[i].depth == id->x.depth) - { - if ((xvir[i].class > clas) && (xvir[i].class != DirectColor)) - { - maxn = i; - clas = xvir[i].class; - } - } - } - if (maxn >= 0) - { - unsigned long rmsk, gmsk, bmsk; - - id->x.visual = xvir[maxn].visual; - rmsk = xvir[maxn].red_mask; - gmsk = xvir[maxn].green_mask; - bmsk = xvir[maxn].blue_mask; - - if ((rmsk > gmsk) && (gmsk > bmsk)) - id->byte_order = BYTE_ORD_24_RGB; - else if ((rmsk > bmsk) && (bmsk > gmsk)) - id->byte_order = BYTE_ORD_24_RBG; - else if ((bmsk > rmsk) && (rmsk > gmsk)) - id->byte_order = BYTE_ORD_24_BRG; - else if ((bmsk > gmsk) && (gmsk > rmsk)) - id->byte_order = BYTE_ORD_24_BGR; - else if ((gmsk > rmsk) && (rmsk > bmsk)) - id->byte_order = BYTE_ORD_24_GRB; - else if ((gmsk > bmsk) && (bmsk > rmsk)) - id->byte_order = BYTE_ORD_24_GBR; - else - id->byte_order = 0; - } - } - } - } - id->x.render_depth = id->x.depth; - XFree(xvir); - if (id->x.depth == 16) - { - xvi.visual = id->x.visual; - xvi.visualid = XVisualIDFromVisual(id->x.visual); - xvir = XGetVisualInfo(disp, VisualIDMask, &xvi, &num); - if (xvir) - { - if (xvir->red_mask != 0xf800) - id->x.render_depth = 15; - XFree(xvir); - } - } - if ((id->x.depth <= 8) || (override == 1)) - loadpal = 1; - if (loadpal) - { - if (dither == 1) - { - if (remap == 1) - id->render_type = RT_DITHER_PALETTE_FAST; - else - id->render_type = RT_DITHER_PALETTE; - } - else - { - if (remap == 1) - id->render_type = RT_PLAIN_PALETTE_FAST; - else - id->render_type = RT_PLAIN_PALETTE; - } - gdk_imlib_load_colors(palfile); - if (id->num_colors == 0) - { - fprintf(stderr, "gdk_imlib: Cannot Find Palette. A Palette is required for this mode\n"); - free(id); - id = NULL; - if (palfile) - free(palfile); - return; - } - } - else - { - if (id->hiq == 1) - id->render_type = RT_DITHER_TRUECOL; - else - id->render_type = RT_PLAIN_TRUECOL; - } - - newcm = gdk_imlib_set_color_map(id, disp); - gdk_imlib_set_fast_render(id, disp); - if (palfile) - free(palfile); -} - -GdkPixmap * -gdk_imlib_copy_image(GdkImlibImage * im) -{ - GdkPixmap *p; - GdkGC *gc; - - if ((!im) || (!im->pixmap)) - return NULL; - p = gdk_pixmap_new(id->x.gdk_win, im->width, im->height, id->x.depth); - gc = gdk_gc_new(p); - gdk_draw_pixmap(p, gc, im->pixmap, 0, 0, 0, 0, im->width, im->height); - gdk_gc_destroy(gc); - return p; -} - -GdkPixmap * -gdk_imlib_move_image(GdkImlibImage * im) -{ - GdkPixmap *p; - - if (!im) - return NULL; - p = im->pixmap; - im->pixmap = NULL; - return p; -} - -GdkBitmap * -gdk_imlib_copy_mask(GdkImlibImage * im) -{ - GdkBitmap *p; - GdkGC *gc; - - if ((!im) || (!im->shape_mask)) - return NULL; - p = gdk_pixmap_new(id->x.gdk_win, im->width, im->height, 1); - gc = gdk_gc_new(p); - gdk_draw_pixmap(p, gc, im->shape_mask, 0, 0, 0, 0, im->width, im->height); - gdk_gc_destroy(gc); - return p; -} - -GdkBitmap * -gdk_imlib_move_mask(GdkImlibImage * im) -{ - GdkBitmap *p; - - if (!im) - return NULL; - p = im->shape_mask; - im->shape_mask = NULL; - return p; -} - -void -gdk_imlib_destroy_image(GdkImlibImage * im) -{ - if (im) - { - if (id->cache.on_image) - { - gfree_image(im); - gclean_caches(); - } - else - gnullify_image(im); - } -} - -void -gdk_imlib_kill_image(GdkImlibImage * im) -{ - if (im) - { - if (id->cache.on_image) - { - gfree_image(im); - gflush_image(im); - gclean_caches(); - } - else - gnullify_image(im); - } -} - -void -gdk_imlib_free_pixmap(GdkPixmap * pmap) -{ - if (pmap) - { - gfree_pixmappmap(pmap); - gclean_caches(); - } -} - -void -gdk_imlib_free_bitmap(GdkBitmap * pmap) -{ - if (pmap) - { - gfree_pixmappmap(pmap); - gclean_caches(); - } -} - -void -gdk_imlib_set_image_border(GdkImlibImage * im, GdkImlibBorder * border) -{ - if ((im) && (border)) - { - im->border.left = border->left; - im->border.right = border->right; - im->border.top = border->top; - im->border.bottom = border->bottom; - gdirty_pixmaps(im); - } -} - -void -gdk_imlib_get_image_border(GdkImlibImage * im, GdkImlibBorder * border) -{ - if ((im) && (border)) - { - border->left = im->border.left; - border->right = im->border.right; - border->top = im->border.top; - border->bottom = im->border.bottom; - } -} - -void -gdk_imlib_get_image_shape(GdkImlibImage * im, GdkImlibColor * color) -{ - if ((!im) || (!color)) - return; - color->r = im->shape_color.r; - color->g = im->shape_color.g; - color->b = im->shape_color.b; -} - -void -gdk_imlib_set_image_shape(GdkImlibImage * im, GdkImlibColor * color) -{ - if ((!im) || (!color)) - return; - im->shape_color.r = color->r; - im->shape_color.g = color->g; - im->shape_color.b = color->b; - gdirty_pixmaps(im); -} - -gint -gdk_imlib_get_fallback() -{ - if (!id) - return 0; - return id->fallback; -} - -void -gdk_imlib_set_fallback(gint fallback) -{ - if (!id) - return; - id->fallback = fallback; -} - -GdkVisual * -gdk_imlib_get_visual() -{ - if (!id) - return NULL; - return gdk_window_get_visual(id->x.gdk_win); -} - -GdkColormap * -gdk_imlib_get_colormap() -{ - if (!id) - return NULL; - return (id->x.gdk_cmap); -} - -gchar * -gdk_imlib_get_sysconfig() -{ - if (!id) - return NULL; - return strdup(SYSTEM_IMRC); -} diff --git a/src/gdk_imlib/rend.c b/src/gdk_imlib/rend.c deleted file mode 100644 index 09b277ee9c..0000000000 --- a/src/gdk_imlib/rend.c +++ /dev/null @@ -1,6170 +0,0 @@ -#define _GNU_SOURCE -#include "../gdk_imlib/gdk_imlib.h" -#include "../gdk_imlib/gdk_imlib_private.h" - -GdkPixmap * -gdk_imlib_pixmap_foreign_new(gint width, gint height, - gint depth, Pixmap pmap) -{ - GdkPixmap *pixmap; - GdkWindowPrivate *private; - GdkWindowPrivate *window_private; - - private = g_new(GdkWindowPrivate, 1); - pixmap = (GdkPixmap *) private; - - window_private = (GdkWindowPrivate *) id->x.gdk_win; - - private->xdisplay = window_private->xdisplay; - private->window_type = GDK_WINDOW_PIXMAP; - private->xwindow = pmap; - private->colormap = id->x.gdk_cmap; - private->children = NULL; - private->parent = NULL; - private->x = 0; - private->y = 0; - private->width = width; - private->height = height; - private->resize_count = 0; - private->ref_count = 1; - private->destroyed = 0; - - gdk_xid_table_insert(&private->xwindow, pixmap); - - return pixmap; -} - -gint -gdk_imlib_best_color_match(gint * r, gint * g, gint * b) -{ - int i; - int dif; - int dr, dg, db; - int col; - int mindif = 0x7fffffff; - XColor xcl; - - col = 0; - if (!id) - { - fprintf(stderr, "ImLib ERROR: No ImlibData initialised\n"); - return -1; - } - if ((id->render_type == RT_PLAIN_TRUECOL) || - (id->render_type == RT_DITHER_TRUECOL)) - { - xcl.red = (unsigned short)((*r << 8) | (*r)); - xcl.green = (unsigned short)((*g << 8) | (*g)); - xcl.blue = (unsigned short)((*b << 8) | (*b)); - xcl.flags = DoRed | DoGreen | DoBlue; - XAllocColor(id->x.disp, id->x.root_cmap, &xcl); - *r = xcl.red >> 8; - *g = xcl.green >> 8; - *b = xcl.blue >> 8; - return xcl.pixel; - } - for (i = 0; i < id->num_colors; i++) - { - dr = *r - id->palette[i].r; - if (dr < 0) - dr = -dr; - dg = *g - id->palette[i].g; - if (dg < 0) - dg = -dg; - db = *b - id->palette[i].b; - if (db < 0) - db = -db; - dif = dr + dg + db; - if (dif < mindif) - { - mindif = dif; - col = i; - } - } - *r -= id->palette[col].r; - *g -= id->palette[col].g; - *b -= id->palette[col].b; - col = id->palette[col].pixel; - return col; -} - -gint -gindex_best_color_match(gint * r, gint * g, gint * b) -{ - int i; - int dif; - int dr, dg, db; - int col; - int mindif = 0x7fffffff; - XColor xcl; - - col = 0; - if (!id) - { - fprintf(stderr, "ImLib ERROR: No ImlibData initialised\n"); - return -1; - } - if ((id->render_type == RT_PLAIN_TRUECOL) || - (id->render_type == RT_DITHER_TRUECOL)) - { - xcl.red = (unsigned short)((*r << 8) | (*r)); - xcl.green = (unsigned short)((*g << 8) | (*g)); - xcl.blue = (unsigned short)((*b << 8) | (*b)); - xcl.flags = DoRed | DoGreen | DoBlue; - XAllocColor(id->x.disp, id->x.root_cmap, &xcl); - *r = xcl.red >> 8; - *g = xcl.green >> 8; - *b = xcl.blue >> 8; - return xcl.pixel; - } - for (i = 0; i < id->num_colors; i++) - { - dr = *r - id->palette[i].r; - if (dr < 0) - dr = -dr; - dg = *g - id->palette[i].g; - if (dg < 0) - dg = -dg; - db = *b - id->palette[i].b; - if (db < 0) - db = -db; - dif = dr + dg + db; - if (dif < mindif) - { - mindif = dif; - col = i; - } - } - *r -= id->palette[col].r; - *g -= id->palette[col].g; - *b -= id->palette[col].b; - return col; -} - -void -grender_shaped_15_fast_dither(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, *ter, ex, er, eg, eb; - unsigned char *ptr2; - unsigned short *img; - int jmp; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - ex += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - if (eg > 255) - eg = 255; - if (eb > 255) - eb = 255; - val = ((er & 0xf8) << 7) | ((eg & 0xf8) << 2) | ((eb & 0xf8) >> 3); - er = er & 0x07; - eg = eg & 0x07; - eb = eb & 0x07; - DITHER_ERROR(er1, er2, ex, er, eg, eb); - *img++ = val; - } - } - img += jmp; - } -} - -void -grender_shaped_15_fast_dither_ordered(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb; - unsigned char *ptr2; - unsigned short *img; - int jmp; - - unsigned char dither[4][4] = - { - {0, 4, 6, 5}, - {6, 2, 7, 3}, - {2, 6, 1, 5}, - {7, 4, 7, 3} - }; - int dithy, dithx; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - dithy = y & 0x3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - er = r & 0x07; - eg = g & 0x07; - eb = b & 0x07; - dithx = x & 0x3; - if ((dither[dithy][dithx] < er) && (r < (256 - 8))) - r += 8; - if ((dither[dithy][dithx] < eg) && (g < (256 - 8))) - g += 8; - if ((dither[dithy][dithx] < eb) && (b < (256 - 8))) - b += 8; - val = ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | ((b & 0xf8) >> 3); - *img++ = val; - } - } - img += jmp; - } -} - -void -grender_15_fast_dither(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, *ter, ex, er, eg, eb; - unsigned char *ptr2; - unsigned short *img; - int jmp; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - if (eg > 255) - eg = 255; - if (eb > 255) - eb = 255; - val = ((er & 0xf8) << 7) | ((eg & 0xf8) << 2) | ((eb & 0xf8) >> 3); - er = er & 0x07; - eg = eg & 0x07; - eb = eb & 0x07; - DITHER_ERROR(er1, er2, ex, er, eg, eb); - *img++ = val; - } - img += jmp; - } -} - -void -grender_15_fast_dither_ordered(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb; - unsigned char *ptr2; - - unsigned short *img; - int jmp; - - unsigned char dither[4][4] = - { - {0, 4, 6, 5}, - {6, 2, 7, 3}, - {2, 6, 1, 5}, - {7, 4, 7, 3} - }; - int dithy, dithx; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - dithy = y & 0x3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - er = r & 0x07; - eg = g & 0x07; - eb = b & 0x07; - dithx = x & 0x3; - if ((dither[dithy][dithx] < er) && (r < (256 - 8))) - r += 8; - if ((dither[dithy][dithx] < eg) && (g < (256 - 8))) - g += 8; - if ((dither[dithy][dithx] < eb) && (b < (256 - 8))) - b += 8; - val = ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | ((b & 0xf8) >> 3); - *img++ = val; - } - img += jmp; - } -} - -void -grender_shaped_16_fast_dither(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, *ter, ex, er, eg, eb; - unsigned char *ptr2; - unsigned short *img; - int jmp; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - ex += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - if (eg > 255) - eg = 255; - if (eb > 255) - eb = 255; - val = ((er & 0xf8) << 8) | ((eg & 0xfc) << 3) | ((eb & 0xf8) >> 3); - er = er & 0x07; - eg = eg & 0x03; - eb = eb & 0x07; - DITHER_ERROR(er1, er2, ex, er, eg, eb); - *img++ = val; - } - } - img += jmp; - } -} - -void -grender_shaped_16_fast_dither_ordered(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb; - unsigned char *ptr2; - unsigned short *img; - int jmp; - - unsigned char dither[4][4] = - { - {0, 4, 6, 5}, - {6, 2, 7, 3}, - {2, 6, 1, 5}, - {7, 4, 7, 3} - }; - int dithy, dithx; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - dithy = y & 0x3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - er = r & 0x07; - eg = g & 0x03; - eb = b & 0x07; - dithx = x & 0x3; - if ((dither[dithy][dithx] < er) && (r < (256 - 8))) - r += 8; - if ((dither[dithy][dithx] < (eg << 1)) && (g < (256 - 4))) - g += 4; - if ((dither[dithy][dithx] < eb) && (b < (256 - 8))) - b += 8; - val = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | ((b & 0xf8) >> 3); - *img++ = val; - } - } - img += jmp; - } -} - -void -grender_16_fast_dither(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, *ter, ex, er, eg, eb; - unsigned char *ptr2; - - unsigned short *img; - int jmp; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - if (eg > 255) - eg = 255; - if (eb > 255) - eb = 255; - val = ((er & 0xf8) << 8) | ((eg & 0xfc) << 3) | ((eb & 0xf8) >> 3); - er = er & 0x07; - eg = eg & 0x03; - eb = eb & 0x07; - DITHER_ERROR(er1, er2, ex, er, eg, eb); - *img++ = val; - } - img += jmp; - } -} - -void -grender_16_fast_dither_ordered(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, /* *ter, ex, */ er, eg, eb; - unsigned char *ptr2; - - unsigned short *img; - int jmp; - - unsigned char dither[4][4] = - { - {0, 4, 6, 5}, - {6, 2, 7, 3}, - {2, 6, 1, 5}, - {7, 4, 7, 3} - }; - int dithy, dithx; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - dithy = y & 0x3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - er = r & 0x07; - eg = g & 0x03; - eb = b & 0x07; - dithx = x & 0x3; - if ((dither[dithy][dithx] < er) && (r < (256 - 8))) - r += 8; - if ((dither[dithy][dithx] < (eg << 1)) && (g < (256 - 4))) - g += 4; - if ((dither[dithy][dithx] < eb) && (b < (256 - 8))) - b += 8; - val = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | ((b & 0xf8) >> 3); - *img++ = val; - } - img += jmp; - } -} - -void -grender_shaped_15_dither(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, *ter, ex, er, eg, eb; - unsigned char *ptr2; - - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - ex += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - if (eg > 255) - eg = 255; - if (eb > 255) - eb = 255; - val = ((er & 0xf8) << 7) | ((eg & 0xf8) << 2) | ((eb & 0xf8) >> 3); - er = er & 0x07; - eg = eg & 0x07; - eb = eb & 0x07; - if (er > 255) - er = 255; - else if (er < 0) - er = 0; - if (eg > 255) - eg = 255; - else if (eg < 0) - eg = 0; - if (eb > 255) - eb = 255; - else if (eb < 0) - eb = 0; - val = ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | ((b & 0xf8) >> 3); - er = r & 0x07; - eg = g & 0x07; - eb = b & 0x07; - DITHER_ERROR(er1, er2, ex, er, eg, eb); - XPutPixel(xim, x, y, val); - } - } - } -} - -void -grender_shaped_15_dither_ordered(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb; - unsigned char *ptr2; - - unsigned char dither[4][4] = - { - {0, 4, 6, 5}, - {6, 2, 7, 3}, - {2, 6, 1, 5}, - {7, 4, 7, 3} - }; - int dithy, dithx; - - for (y = 0; y < h; y++) - { - dithy = y & 0x3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - } - else - { - XPutPixel(sxim, x, y, 1); - er = r & 0x07; - eg = g & 0x07; - eb = b & 0x07; - dithx = x & 0x3; - if ((dither[dithy][dithx] < er) && (r < (256 - 8))) - r += 8; - if ((dither[dithy][dithx] < eg) && (g < (256 - 8))) - g += 8; - if ((dither[dithy][dithx] < eb) && (b < (256 - 8))) - b += 8; - val = ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | ((b & 0xf8) >> 3); - XPutPixel(xim, x, y, val); - } - } - } -} - -void -grender_15_dither(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, *ter, ex, er, eg, eb; - unsigned char *ptr2; - - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - if (eg > 255) - eg = 255; - if (eb > 255) - eb = 255; - val = ((er & 0xf8) << 7) | ((eg & 0xf8) << 2) | ((eb & 0xf8) >> 3); - er = er & 0x07; - eg = eg & 0x07; - eb = eb & 0x07; - DITHER_ERROR(er1, er2, ex, er, eg, eb); - XPutPixel(xim, x, y, val); - } - } -} - -void -grender_15_dither_ordered(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, /* *ter, ex, */ er, eg, eb; - unsigned char *ptr2; - - unsigned char dither[4][4] = - { - {0, 4, 6, 5}, - {6, 2, 7, 3}, - {2, 6, 1, 5}, - {7, 4, 7, 3} - }; - int dithy, dithx; - - for (y = 0; y < h; y++) - { - dithy = y & 0x3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - er = r & 0x07; - eg = g & 0x07; - eb = b & 0x07; - dithx = x & 0x3; - if ((dither[dithy][dithx] < er) && (r < (256 - 8))) - r += 8; - if ((dither[dithy][dithx] < eg) && (g < (256 - 8))) - g += 8; - if ((dither[dithy][dithx] < eb) && (b < (256 - 8))) - b += 8; - val = ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | ((b & 0xf8) >> 3); - XPutPixel(xim, x, y, val); - } - } -} - -void -grender_shaped_16_dither(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, *ter, ex, er, eg, eb; - unsigned char *ptr2; - - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - ex += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - if (eg > 255) - eg = 255; - if (eb > 255) - eb = 255; - val = ((er & 0xf8) << 8) | ((eg & 0xfc) << 3) | ((eb & 0xf8) >> 3); - er = er & 0x07; - eg = eg & 0x03; - eb = eb & 0x07; - DITHER_ERROR(er1, er2, ex, er, eg, eb); - XPutPixel(xim, x, y, val); - } - } - } -} - -void -grender_shaped_16_dither_ordered(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, /* *ter, ex, */ er, eg, eb; - unsigned char *ptr2; - - unsigned char dither[4][4] = - { - {0, 4, 6, 5}, - {6, 2, 7, 3}, - {2, 6, 1, 5}, - {7, 4, 7, 3} - }; - int dithy, dithx; - - for (y = 0; y < h; y++) - { - dithy = y & 0x3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - } - else - { - XPutPixel(sxim, x, y, 1); - er = r & 0x07; - eg = g & 0x03; - eb = b & 0x07; - dithx = x & 0x3; - if ((dither[dithy][dithx] < er) && (r < (256 - 8))) - r += 8; - if ((dither[dithy][dithx] < (eg << 1)) && (g < (256 - 4))) - g += 4; - if ((dither[dithy][dithx] < eb) && (b < (256 - 8))) - b += 8; - val = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | ((b & 0xf8) >> 3); - XPutPixel(xim, x, y, val); - } - } - } -} - -void -grender_16_dither(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, *ter, ex, er, eg, eb; - unsigned char *ptr2; - - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - if (eg > 255) - eg = 255; - if (eb > 255) - eb = 255; - val = ((er & 0xf8) << 8) | ((eg & 0xfc) << 3) | ((eb & 0xf8) >> 3); - er = er & 0x07; - eg = eg & 0x03; - eb = eb & 0x07; - DITHER_ERROR(er1, er2, ex, er, eg, eb); - XPutPixel(xim, x, y, val); - } - } -} - -void -grender_16_dither_ordered(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb; - unsigned char *ptr2; - - unsigned char dither[4][4] = - { - {0, 4, 6, 5}, - {6, 2, 7, 3}, - {2, 6, 1, 5}, - {7, 4, 7, 3} - }; - int dithy, dithx; - - for (y = 0; y < h; y++) - { - dithy = y & 0x3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - er = r & 0x07; - eg = g & 0x03; - eb = b & 0x07; - dithx = x & 0x3; - if ((dither[dithy][dithx] < er) && (r < (256 - 8))) - r += 8; - if ((dither[dithy][dithx] < (eg << 1)) && (g < (256 - 4))) - g += 4; - if ((dither[dithy][dithx] < eb) && (b < (256 - 8))) - b += 8; - val = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | ((b & 0xf8) >> 3); - XPutPixel(xim, x, y, val); - } - } -} - -void -grender_shaped_15_fast(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - unsigned short *img; - int jmp; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - val = ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | ((b & 0xf8) >> 3); - *img++ = val; - } - } - img += jmp; - } -} - -void -grender_15_fast(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - unsigned short *img; - int jmp; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - val = ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | ((b & 0xf8) >> 3); - *img++ = val; - } - img += jmp; - } -} - -void -grender_shaped_16_fast(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - unsigned short *img; - int jmp; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - val = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | ((b & 0xf8) >> 3); - *img++ = val; - } - } - img += jmp; - } -} - -void -grender_16_fast(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - - unsigned short *img; - int jmp; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - val = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | ((b & 0xf8) >> 3); - *img++ = val; - } - img += jmp; - } -} - -void -grender_shaped_24_fast(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, r, g, b; - unsigned char *ptr2; - unsigned char *img; - int jmp; - - jmp = (xim->bytes_per_line) - w; - img = (unsigned char *)xim->data; - if (id->byte_order == BYTE_ORD_24_RGB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - *img++ = r; - *img++ = g; - *img++ = b; - } - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_RBG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - *img++ = r; - *img++ = b; - *img++ = g; - } - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_BRG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - *img++ = b; - *img++ = r; - *img++ = g; - } - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_BGR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - *img++ = b; - *img++ = g; - *img++ = r; - } - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_GRB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - *img++ = g; - *img++ = r; - *img++ = b; - } - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_GBR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - *img++ = g; - *img++ = b; - *img++ = r; - } - } - img += jmp; - } - } -} - -void -grender_24_fast(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, r, g, b; - unsigned char *ptr2; - unsigned char *img; - int jmp; - - jmp = (xim->bytes_per_line) - w; - img = (unsigned char *)xim->data; - if (id->byte_order == BYTE_ORD_24_RGB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - *img++ = r; - *img++ = g; - *img++ = b; - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_RBG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - *img++ = r; - *img++ = b; - *img++ = g; - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_BRG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - *img++ = b; - *img++ = r; - *img++ = g; - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_BGR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - *img++ = b; - *img++ = g; - *img++ = r; - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_GRB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - *img++ = g; - *img++ = r; - *img++ = b; - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_GBR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - *img++ = g; - *img++ = b; - *img++ = r; - } - img += jmp; - } - } -} - -void -grender_shaped_32_fast(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - unsigned int *img; - int jmp; - - jmp = (xim->bytes_per_line >> 2) - w; - img = (unsigned int *)xim->data; - if (id->byte_order == BYTE_ORD_24_RGB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - val = (r << 16) | (g << 8) | b; - *img++ = val; - } - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_RBG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - val = (r << 16) | (b << 8) | g; - *img++ = val; - } - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_BRG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - val = (b << 16) | (r << 8) | g; - *img++ = val; - } - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_BGR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - val = (b << 16) | (g << 8) | r; - *img++ = val; - } - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_GRB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - val = (g << 16) | (r << 8) | b; - *img++ = val; - } - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_GBR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - val = (g << 16) | (b << 8) | r; - *img++ = val; - } - } - img += jmp; - } - } -} - -void -grender_32_fast(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - unsigned int *img; - int jmp; - - jmp = (xim->bytes_per_line >> 2) - w; - img = (unsigned int *)xim->data; - if (id->byte_order == BYTE_ORD_24_RGB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - val = (r << 16) | (g << 8) | b; - *img++ = val; - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_RBG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - val = (r << 16) | (b << 8) | g; - *img++ = val; - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_BRG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - val = (b << 16) | (r << 8) | g; - *img++ = val; - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_BGR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - val = (b << 16) | (g << 8) | r; - *img++ = val; - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_GRB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - val = (g << 16) | (r << 8) | b; - *img++ = val; - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_GBR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - val = (g << 16) | (b << 8) | r; - *img++ = val; - } - img += jmp; - } - } -} - -void -grender_shaped_15(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - XPutPixel(sxim, x, y, 0); - else - { - XPutPixel(sxim, x, y, 1); - val = ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | ((b & 0xf8) >> 3); - XPutPixel(xim, x, y, val); - } - } - } -} - -void -grender_15(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - val = ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | ((b & 0xf8) >> 3); - XPutPixel(xim, x, y, val); - } - } -} - -void -grender_shaped_16(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - XPutPixel(sxim, x, y, 0); - else - { - XPutPixel(sxim, x, y, 1); - val = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | ((b & 0xf8) >> 3); - XPutPixel(xim, x, y, val); - } - } - } -} - -void -grender_16(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - val = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | ((b & 0xf8) >> 3); - XPutPixel(xim, x, y, val); - } - } -} - -void -grender_shaped_24(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - - if (id->byte_order == BYTE_ORD_24_RGB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - XPutPixel(sxim, x, y, 0); - else - { - XPutPixel(sxim, x, y, 1); - val = (r << 16) | (g << 8) | b; - XPutPixel(xim, x, y, val); - } - } - } - } - else if (id->byte_order == BYTE_ORD_24_RBG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - XPutPixel(sxim, x, y, 0); - else - { - XPutPixel(sxim, x, y, 1); - val = (r << 16) | (b << 8) | g; - XPutPixel(xim, x, y, val); - } - } - } - } - else if (id->byte_order == BYTE_ORD_24_BRG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - XPutPixel(sxim, x, y, 0); - else - { - XPutPixel(sxim, x, y, 1); - val = (b << 16) | (r << 8) | g; - XPutPixel(xim, x, y, val); - } - } - } - } - else if (id->byte_order == BYTE_ORD_24_BGR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - XPutPixel(sxim, x, y, 0); - else - { - XPutPixel(sxim, x, y, 1); - val = (b << 16) | (g << 8) | r; - XPutPixel(xim, x, y, val); - } - } - } - } - else if (id->byte_order == BYTE_ORD_24_GRB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - XPutPixel(sxim, x, y, 0); - else - { - XPutPixel(sxim, x, y, 1); - val = (g << 16) | (r << 8) | b; - XPutPixel(xim, x, y, val); - } - } - } - } - else if (id->byte_order == BYTE_ORD_24_GBR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - XPutPixel(sxim, x, y, 0); - else - { - XPutPixel(sxim, x, y, 1); - val = (g << 16) | (b << 8) | r; - XPutPixel(xim, x, y, val); - } - } - } - } -} - -void -grender_24(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - - if (id->byte_order == BYTE_ORD_24_RGB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - val = (r << 16) | (g << 8) | b; - XPutPixel(xim, x, y, val); - } - } - } - else if (id->byte_order == BYTE_ORD_24_RBG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - val = (r << 16) | (b << 8) | g; - XPutPixel(xim, x, y, val); - } - } - } - else if (id->byte_order == BYTE_ORD_24_BRG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - val = (b << 16) | (r << 8) | g; - XPutPixel(xim, x, y, val); - } - } - } - else if (id->byte_order == BYTE_ORD_24_BGR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - val = (b << 16) | (g << 8) | r; - XPutPixel(xim, x, y, val); - } - } - } - else if (id->byte_order == BYTE_ORD_24_GRB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - val = (g << 16) | (r << 8) | b; - XPutPixel(xim, x, y, val); - } - } - } - else if (id->byte_order == BYTE_ORD_24_GBR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - val = (g << 16) | (b << 8) | r; - XPutPixel(xim, x, y, val); - } - } - } -} - -void -grender_shaped(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray, int bpp) -{ - int x, y, val, r, g, b, *ter, ex, er, eg, eb; - unsigned char *ptr2; - unsigned char *img; - int jmp; - - jmp = (xim->bytes_per_line) - w; - img = (unsigned char *)xim->data; - switch (id->render_type) - { - case RT_PLAIN_PALETTE: - if ((id->fastrend) && (xim->bits_per_pixel == 8)) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - val = gdk_imlib_best_color_match(&r, &g, &b); - *img++ = val; - } - } - img += jmp; - } - } - else - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - XPutPixel(sxim, x, y, 0); - else - { - XPutPixel(sxim, x, y, 1); - val = gdk_imlib_best_color_match(&r, &g, &b); - XPutPixel(xim, x, y, val); - } - } - } - } - break; - case RT_PLAIN_PALETTE_FAST: - if ((id->fastrend) && (xim->bits_per_pixel == 8)) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - val = COLOR_RGB(r >> 3, g >> 3, b >> 3); - *img++ = val; - } - } - img += jmp; - } - } - else - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - XPutPixel(sxim, x, y, 0); - else - { - XPutPixel(sxim, x, y, 1); - val = COLOR_RGB(r >> 3, g >> 3, b >> 3); - XPutPixel(xim, x, y, val); - } - } - } - } - break; - case RT_DITHER_PALETTE: - if ((id->fastrend) && (xim->bits_per_pixel == 8)) - { - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - { - XPutPixel(sxim, x, y, 0); - img++; - } - ex += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - else if (er < 0) - er = 0; - if (eg > 255) - eg = 255; - else if (eg < 0) - eg = 0; - if (eb > 255) - eb = 255; - else if (eb < 0) - eb = 0; - val = gdk_imlib_best_color_match(&er, &eg, &eb); - DITHER_ERROR(er1, er2, ex, er, eg, eb); - *img++ = val; - } - } - img += jmp; - } - } - else - { - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - ex += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - else if (er < 0) - er = 0; - if (eg > 255) - eg = 255; - else if (eg < 0) - eg = 0; - if (eb > 255) - eb = 255; - else if (eb < 0) - eb = 0; - val = gdk_imlib_best_color_match(&er, &eg, &eb); - DITHER_ERROR(er1, er2, ex, er, eg, eb); - XPutPixel(xim, x, y, val); - } - } - } - } - break; - case RT_DITHER_PALETTE_FAST: - if ((id->fastrend) && (xim->bits_per_pixel == 8)) - { - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - { - XPutPixel(sxim, x, y, 0); - img++; - } - ex += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - else if (er < 0) - er = 0; - if (eg > 255) - eg = 255; - else if (eg < 0) - eg = 0; - if (eb > 255) - eb = 255; - else if (eb < 0) - eb = 0; - val = INDEX_RGB(er >> 3, eg >> 3, eb >> 3); - er = ERROR_RED(er, val); - eg = ERROR_GRN(eg, val); - eb = ERROR_BLU(eb, val); - DITHER_ERROR(er1, er2, ex, er, eg, eb); - *img++ = COLOR_INDEX(val); - } - } - img += jmp; - } - } - else - { - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - ex += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - else if (er < 0) - er = 0; - if (eg > 255) - eg = 255; - else if (eg < 0) - eg = 0; - if (eb > 255) - eb = 255; - else if (eb < 0) - eb = 0; - val = INDEX_RGB(er >> 3, eg >> 3, eb >> 3); - er = ERROR_RED(er, val); - eg = ERROR_GRN(eg, val); - eb = ERROR_BLU(eb, val); - DITHER_ERROR(er1, er2, ex, er, eg, eb); - XPutPixel(xim, x, y, COLOR_INDEX(val)); - } - } - } - } - break; - default: - if (id->fastrend) - { - switch (bpp) - { - case 8: - break; - case 15: - if (id->render_type == RT_DITHER_TRUECOL) - { - if (id->ordered_dither) - grender_shaped_15_fast_dither_ordered(im, w, h, xim, sxim, er1, er2, xarray, yarray); - else - grender_shaped_15_fast_dither(im, w, h, xim, sxim, er1, er2, xarray, yarray); - } - else - grender_shaped_15_fast(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - case 16: - if (id->render_type == RT_DITHER_TRUECOL) - { - if (id->ordered_dither) - grender_shaped_16_fast_dither_ordered(im, w, h, xim, sxim, er1, er2, xarray, yarray); - else - grender_shaped_16_fast_dither(im, w, h, xim, sxim, er1, er2, xarray, yarray); - } - else - grender_shaped_16_fast(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - case 24: - case 32: - if (xim->bits_per_pixel == 24) - grender_shaped_24_fast(im, w, h, xim, sxim, er1, er2, xarray, yarray); - else - grender_shaped_32_fast(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - default: - break; - } - } - else - { - switch (bpp) - { - case 8: - break; - case 15: - if (id->render_type == RT_DITHER_TRUECOL) - { - if (id->ordered_dither) - grender_shaped_15_dither_ordered(im, w, h, xim, sxim, er1, er2, xarray, yarray); - else - grender_shaped_15_dither(im, w, h, xim, sxim, er1, er2, xarray, yarray); - } - else - grender_shaped_15(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - case 16: - if (id->render_type == RT_DITHER_TRUECOL) - { - if (id->ordered_dither) - grender_shaped_16_dither_ordered(im, w, h, xim, sxim, er1, er2, xarray, yarray); - else - grender_shaped_16_dither(im, w, h, xim, sxim, er1, er2, xarray, yarray); - } - else - grender_shaped_16(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - case 24: - grender_shaped_24(im, w, h, xim, sxim, er1, er2, xarray, yarray); - case 32: - grender_shaped_24(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - default: - break; - } - } - break; - } -} - -void -grender(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray, int bpp) -{ - int x, y, val, r, g, b, *ter, ex, er, eg, eb; - unsigned char *ptr2; - unsigned char *img; - int jmp; - - jmp = (xim->bytes_per_line) - w; - img = (unsigned char *)xim->data; - switch (id->render_type) - { - case RT_PLAIN_PALETTE: - if ((id->fastrend) && (xim->bits_per_pixel == 8)) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - val = gdk_imlib_best_color_match(&r, &g, &b); - *img++ = val; - } - img += jmp; - } - } - else - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - val = gdk_imlib_best_color_match(&r, &g, &b); - XPutPixel(xim, x, y, val); - } - } - } - break; - case RT_PLAIN_PALETTE_FAST: - if ((id->fastrend) && (xim->bits_per_pixel == 8)) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - val = COLOR_RGB(r >> 3, g >> 3, b >> 3); - *img++ = val; - } - img += jmp; - } - } - else - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - val = COLOR_RGB(r >> 3, g >> 3, b >> 3); - XPutPixel(xim, x, y, val); - } - } - } - break; - case RT_DITHER_PALETTE: - if ((id->fastrend) && (xim->bits_per_pixel == 8)) - { - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - else if (er < 0) - er = 0; - if (eg > 255) - eg = 255; - else if (eg < 0) - eg = 0; - if (eb > 255) - eb = 255; - else if (eb < 0) - eb = 0; - val = gdk_imlib_best_color_match(&er, &eg, &eb); - DITHER_ERROR(er1, er2, ex, er, eg, eb); - *img++ = val; - } - img += jmp; - } - } - else - { - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - else if (er < 0) - er = 0; - if (eg > 255) - eg = 255; - else if (eg < 0) - eg = 0; - if (eb > 255) - eb = 255; - else if (eb < 0) - eb = 0; - val = gdk_imlib_best_color_match(&er, &eg, &eb); - DITHER_ERROR(er1, er2, ex, er, eg, eb); - XPutPixel(xim, x, y, val); - } - } - } - break; - case RT_DITHER_PALETTE_FAST: - if ((id->fastrend) && (xim->bits_per_pixel == 8)) - { - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - else if (er < 0) - er = 0; - if (eg > 255) - eg = 255; - else if (eg < 0) - eg = 0; - if (eb > 255) - eb = 255; - else if (eb < 0) - eb = 0; - val = INDEX_RGB(er >> 3, eg >> 3, eb >> 3); - er = ERROR_RED(er, val); - eg = ERROR_GRN(eg, val); - eb = ERROR_BLU(eb, val); - DITHER_ERROR(er1, er2, ex, er, eg, eb); - *img++ = COLOR_INDEX(val); - } - img += jmp; - } - } - else - { - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - else if (er < 0) - er = 0; - if (eg > 255) - eg = 255; - else if (eg < 0) - eg = 0; - if (eb > 255) - eb = 255; - else if (eb < 0) - eb = 0; - val = INDEX_RGB(er >> 3, eg >> 3, eb >> 3); - er = ERROR_RED(er, val); - eg = ERROR_GRN(eg, val); - eb = ERROR_BLU(eb, val); - DITHER_ERROR(er1, er2, ex, er, eg, eb); - XPutPixel(xim, x, y, COLOR_INDEX(val)); - } - } - } - break; - default: - if (id->fastrend) - { - switch (bpp) - { - case 8: - break; - case 15: - if (id->render_type == RT_DITHER_TRUECOL) - { - if (id->ordered_dither) - grender_15_fast_dither_ordered(im, w, h, xim, sxim, er1, er2, xarray, yarray); - else - grender_15_fast_dither(im, w, h, xim, sxim, er1, er2, xarray, yarray); - } - else - grender_15_fast(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - case 16: - if (id->render_type == RT_DITHER_TRUECOL) - { - if (id->ordered_dither) - grender_16_fast_dither_ordered(im, w, h, xim, sxim, er1, er2, xarray, yarray); - else - grender_16_fast_dither(im, w, h, xim, sxim, er1, er2, xarray, yarray); - } - else - grender_16_fast(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - case 24: - case 32: - if (xim->bits_per_pixel == 24) - grender_24_fast(im, w, h, xim, sxim, er1, er2, xarray, yarray); - else - grender_32_fast(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - default: - break; - } - } - else - { - switch (bpp) - { - case 8: - break; - case 15: - if (id->render_type == RT_DITHER_TRUECOL) - { - if (id->ordered_dither) - grender_15_dither_ordered(im, w, h, xim, sxim, er1, er2, xarray, yarray); - else - grender_15_dither(im, w, h, xim, sxim, er1, er2, xarray, yarray); - } - else - grender_15(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - case 16: - if (id->render_type == RT_DITHER_TRUECOL) - { - if (id->ordered_dither) - grender_16_dither_ordered(im, w, h, xim, sxim, er1, er2, xarray, yarray); - else - grender_16_dither(im, w, h, xim, sxim, er1, er2, xarray, yarray); - } - else - grender_16(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - case 24: - grender_24(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - case 32: - grender_24(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - default: - break; - } - break; - } - } -} - -void -grender_shaped_15_fast_dither_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, *ter, ex, er, eg, eb; - unsigned char *ptr2; - unsigned short *img; - int jmp; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - ex += 3; - } - else - { - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - XPutPixel(sxim, x, y, 1); - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - if (eg > 255) - eg = 255; - if (eb > 255) - eb = 255; - val = ((er & 0xf8) << 7) | ((eg & 0xf8) << 2) | ((eb & 0xf8) >> 3); - er = er & 0x07; - eg = eg & 0x07; - eb = eb & 0x07; - DITHER_ERROR(er1, er2, ex, er, eg, eb); - *img++ = val; - } - } - img += jmp; - } -} - -void -grender_shaped_15_fast_dither_mod_ordered(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb; - unsigned char *ptr2; - unsigned short *img; - int jmp; - - unsigned char dither[4][4] = - { - {0, 4, 6, 5}, - {6, 2, 7, 3}, - {2, 6, 1, 5}, - {7, 4, 7, 3} - }; - int dithy, dithx; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - dithy = y & 0x3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - XPutPixel(sxim, x, y, 1); - er = r & 0x07; - eg = g & 0x07; - eb = b & 0x07; - dithx = x & 0x3; - if ((dither[dithy][dithx] < er) && (r < (256 - 8))) - r += 8; - if ((dither[dithy][dithx] < eg) && (g < (256 - 8))) - g += 8; - if ((dither[dithy][dithx] < eb) && (b < (256 - 8))) - b += 8; - val = ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | ((b & 0xf8) >> 3); - *img++ = val; - } - } - img += jmp; - } -} - -void -grender_15_fast_dither_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, *ter, ex, er, eg, eb; - unsigned char *ptr2; - unsigned short *img; - int jmp; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - if (eg > 255) - eg = 255; - if (eb > 255) - eb = 255; - val = ((er & 0xf8) << 7) | ((eg & 0xf8) << 2) | ((eb & 0xf8) >> 3); - er = er & 0x07; - eg = eg & 0x07; - eb = eb & 0x07; - DITHER_ERROR(er1, er2, ex, er, eg, eb); - *img++ = val; - } - img += jmp; - } -} - -void -grender_15_fast_dither_mod_ordered(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb; - unsigned char *ptr2; - - unsigned short *img; - int jmp; - - unsigned char dither[4][4] = - { - {0, 4, 6, 5}, - {6, 2, 7, 3}, - {2, 6, 1, 5}, - {7, 4, 7, 3} - }; - int dithy, dithx; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - dithy = y & 0x3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - er = r & 0x07; - eg = g & 0x07; - eb = b & 0x07; - dithx = x & 0x3; - if ((dither[dithy][dithx] < er) && (r < (256 - 8))) - r += 8; - if ((dither[dithy][dithx] < eg) && (g < (256 - 8))) - g += 8; - if ((dither[dithy][dithx] < eb) && (b < (256 - 8))) - b += 8; - val = ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | ((b & 0xf8) >> 3); - *img++ = val; - } - img += jmp; - } -} - -void -grender_shaped_16_fast_dither_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, *ter, ex, er, eg, eb; - unsigned char *ptr2; - unsigned short *img; - int jmp; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - ex += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - if (eg > 255) - eg = 255; - if (eb > 255) - eb = 255; - val = ((er & 0xf8) << 8) | ((eg & 0xfc) << 3) | ((eb & 0xf8) >> 3); - er = er & 0x07; - eg = eg & 0x03; - eb = eb & 0x07; - DITHER_ERROR(er1, er2, ex, er, eg, eb); - *img++ = val; - } - } - img += jmp; - } -} - -void -grender_shaped_16_fast_dither_mod_ordered(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb; - unsigned char *ptr2; - unsigned short *img; - int jmp; - - unsigned char dither[4][4] = - { - {0, 4, 6, 5}, - {6, 2, 7, 3}, - {2, 6, 1, 5}, - {7, 4, 7, 3} - }; - int dithy, dithx; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - dithy = y & 0x3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - XPutPixel(sxim, x, y, 1); - er = r & 0x07; - eg = g & 0x03; - eb = b & 0x07; - dithx = x & 0x3; - if ((dither[dithy][dithx] < er) && (r < (256 - 8))) - r += 8; - if ((dither[dithy][dithx] < (eg << 1)) && (g < (256 - 4))) - g += 4; - if ((dither[dithy][dithx] < eb) && (b < (256 - 8))) - b += 8; - val = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | ((b & 0xf8) >> 3); - *img++ = val; - } - } - img += jmp; - } -} - -void -grender_16_fast_dither_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, *ter, ex, er, eg, eb; - unsigned char *ptr2; - - unsigned short *img; - int jmp; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - if (eg > 255) - eg = 255; - if (eb > 255) - eb = 255; - val = ((er & 0xf8) << 8) | ((eg & 0xfc) << 3) | ((eb & 0xf8) >> 3); - er = er & 0x07; - eg = eg & 0x03; - eb = eb & 0x07; - DITHER_ERROR(er1, er2, ex, er, eg, eb); - *img++ = val; - } - img += jmp; - } -} - -void -grender_16_fast_dither_mod_ordered(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb; - unsigned char *ptr2; - - unsigned short *img; - int jmp; - - unsigned char dither[4][4] = - { - {0, 4, 6, 5}, - {6, 2, 7, 3}, - {2, 6, 1, 5}, - {7, 4, 7, 3} - }; - int dithy, dithx; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - dithy = y & 0x3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - er = r & 0x07; - eg = g & 0x03; - eb = b & 0x07; - dithx = x & 0x3; - if ((dither[dithy][dithx] < er) && (r < (256 - 8))) - r += 8; - if ((dither[dithy][dithx] < (eg << 1)) && (g < (256 - 4))) - g += 4; - if ((dither[dithy][dithx] < eb) && (b < (256 - 8))) - b += 8; - val = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | ((b & 0xf8) >> 3); - *img++ = val; - } - img += jmp; - } -} - -void -grender_shaped_15_dither_mod_ordered(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, /* *ter, ex, */ er, eg, eb; - unsigned char *ptr2; - - unsigned char dither[4][4] = - { - {0, 4, 6, 5}, - {6, 2, 7, 3}, - {2, 6, 1, 5}, - {7, 4, 7, 3} - }; - int dithy, dithx; - - for (y = 0; y < h; y++) - { - dithy = y & 0x3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - } - else - { - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - XPutPixel(sxim, x, y, 1); - er = r & 0x07; - eg = g & 0x07; - eb = b & 0x07; - dithx = x & 0x3; - if ((dither[dithy][dithx] < er) && (r < (256 - 8))) - r += 8; - if ((dither[dithy][dithx] < eg) && (g < (256 - 8))) - g += 8; - if ((dither[dithy][dithx] < eb) && (b < (256 - 8))) - b += 8; - val = ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | ((b & 0xf8) >> 3); - XPutPixel(xim, x, y, val); - } - } - } -} - -void -grender_15_dither_mod_ordered(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, /* *ter, ex, */ er, eg, eb; - unsigned char *ptr2; - - unsigned char dither[4][4] = - { - {0, 4, 6, 5}, - {6, 2, 7, 3}, - {2, 6, 1, 5}, - {7, 4, 7, 3} - }; - int dithy, dithx; - - for (y = 0; y < h; y++) - { - dithy = y & 0x3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - er = r & 0x07; - eg = g & 0x07; - eb = b & 0x07; - dithx = x & 0x3; - if ((dither[dithy][dithx] < er) && (r < (256 - 8))) - r += 8; - if ((dither[dithy][dithx] < eg) && (g < (256 - 8))) - g += 8; - if ((dither[dithy][dithx] < eb) && (b < (256 - 8))) - b += 8; - val = ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | ((b & 0xf8) >> 3); - XPutPixel(xim, x, y, val); - } - } -} - -void -grender_shaped_16_dither_mod_ordered(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb; - unsigned char *ptr2; - - unsigned char dither[4][4] = - { - {0, 4, 6, 5}, - {6, 2, 7, 3}, - {2, 6, 1, 5}, - {7, 4, 7, 3} - }; - int dithy, dithx; - - for (y = 0; y < h; y++) - { - dithy = y & 0x3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - } - else - { - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - XPutPixel(sxim, x, y, 1); - er = r & 0x07; - eg = g & 0x03; - eb = b & 0x07; - dithx = x & 0x3; - if ((dither[dithy][dithx] < er) && (r < (256 - 8))) - r += 8; - if ((dither[dithy][dithx] < (eg << 1)) && (g < (256 - 4))) - g += 4; - if ((dither[dithy][dithx] < eb) && (b < (256 - 8))) - b += 8; - val = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | ((b & 0xf8) >> 3); - XPutPixel(xim, x, y, val); - } - } - } -} - -void -grender_16_dither_mod_ordered(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, /* *ter, ex, */ er, eg, eb; - unsigned char *ptr2; - - unsigned char dither[4][4] = - { - {0, 4, 6, 5}, - {6, 2, 7, 3}, - {2, 6, 1, 5}, - {7, 4, 7, 3} - }; - int dithy, dithx; - - for (y = 0; y < h; y++) - { - dithy = y & 0x3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - er = r & 0x07; - eg = g & 0x03; - eb = b & 0x07; - dithx = x & 0x3; - if ((dither[dithy][dithx] < er) && (r < (256 - 8))) - r += 8; - if ((dither[dithy][dithx] < (eg << 1)) && (g < (256 - 4))) - g += 4; - if ((dither[dithy][dithx] < eb) && (b < (256 - 8))) - b += 8; - val = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | ((b & 0xf8) >> 3); - XPutPixel(xim, x, y, val); - } - } -} - -void -grender_shaped_15_dither_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, *ter, ex, er, eg, eb; - unsigned char *ptr2; - - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - ex += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - if (eg > 255) - eg = 255; - if (eb > 255) - eb = 255; - val = ((er & 0xf8) << 7) | ((eg & 0xf8) << 2) | ((eb & 0xf8) >> 3); - er = er & 0x07; - eg = eg & 0x07; - eb = eb & 0x07; - if (er > 255) - er = 255; - else if (er < 0) - er = 0; - if (eg > 255) - eg = 255; - else if (eg < 0) - eg = 0; - if (eb > 255) - eb = 255; - else if (eb < 0) - eb = 0; - val = ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | ((b & 0xf8) >> 3); - er = r & 0x07; - eg = g & 0x07; - eb = b & 0x07; - DITHER_ERROR(er1, er2, ex, er, eg, eb); - XPutPixel(xim, x, y, val); - } - } - } -} - -void -grender_15_dither_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, *ter, ex, er, eg, eb; - unsigned char *ptr2; - - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - if (eg > 255) - eg = 255; - if (eb > 255) - eb = 255; - val = ((er & 0xf8) << 7) | ((eg & 0xf8) << 2) | ((eb & 0xf8) >> 3); - er = er & 0x07; - eg = eg & 0x07; - eb = eb & 0x07; - DITHER_ERROR(er1, er2, ex, er, eg, eb); - XPutPixel(xim, x, y, val); - } - } -} - -void -grender_shaped_16_dither_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, *ter, ex, er, eg, eb; - unsigned char *ptr2; - - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - ex += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - if (eg > 255) - eg = 255; - if (eb > 255) - eb = 255; - val = ((er & 0xf8) << 8) | ((eg & 0xfc) << 3) | ((eb & 0xf8) >> 3); - er = er & 0x07; - eg = eg & 0x03; - eb = eb & 0x07; - DITHER_ERROR(er1, er2, ex, er, eg, eb); - XPutPixel(xim, x, y, val); - } - } - } -} - -void -grender_16_dither_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b, *ter, ex, er, eg, eb; - unsigned char *ptr2; - - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - if (eg > 255) - eg = 255; - if (eb > 255) - eb = 255; - val = ((er & 0xf8) << 8) | ((eg & 0xfc) << 3) | ((eb & 0xf8) >> 3); - er = er & 0x07; - eg = eg & 0x03; - eb = eb & 0x07; - DITHER_ERROR(er1, er2, ex, er, eg, eb); - XPutPixel(xim, x, y, val); - } - } -} - -void -grender_shaped_15_fast_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - unsigned short *img; - int jmp; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | ((b & 0xf8) >> 3); - *img++ = val; - } - } - img += jmp; - } -} - -void -grender_15_fast_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - unsigned short *img; - int jmp; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | ((b & 0xf8) >> 3); - *img++ = val; - } - img += jmp; - } -} - -void -grender_shaped_16_fast_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - unsigned short *img; - int jmp; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | ((b & 0xf8) >> 3); - *img++ = val; - } - } - img += jmp; - } -} - -void -grender_16_fast_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - - unsigned short *img; - int jmp; - - jmp = (xim->bytes_per_line >> 1) - w; - img = (unsigned short *)xim->data; - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | ((b & 0xf8) >> 3); - *img++ = val; - } - img += jmp; - } -} - -void -grender_shaped_24_fast_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, r, g, b; - unsigned char *ptr2; - unsigned char *img; - int jmp; - - jmp = (xim->bytes_per_line) - w; - img = (unsigned char *)xim->data; - if (id->byte_order == BYTE_ORD_24_RGB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - *img++ = r; - *img++ = g; - *img++ = b; - } - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_RBG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - *img++ = r; - *img++ = b; - *img++ = g; - } - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_BRG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - *img++ = b; - *img++ = r; - *img++ = g; - } - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_BGR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - *img++ = b; - *img++ = g; - *img++ = r; - } - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_GRB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - *img++ = g; - *img++ = r; - *img++ = b; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - } - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_GBR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - *img++ = g; - *img++ = b; - *img++ = r; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - } - } - img += jmp; - } - } -} - -void -grender_24_fast_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, r, g, b; - unsigned char *ptr2; - unsigned char *img; - int jmp; - - jmp = (xim->bytes_per_line) - w; - img = (unsigned char *)xim->data; - if (id->byte_order == BYTE_ORD_24_RGB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - *img++ = r; - *img++ = g; - *img++ = b; - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_RBG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - *img++ = r; - *img++ = b; - *img++ = g; - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_BRG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - *img++ = b; - *img++ = r; - *img++ = g; - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_BGR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - *img++ = b; - *img++ = g; - *img++ = r; - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_GRB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - *img++ = g; - *img++ = r; - *img++ = b; - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_GBR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - *img++ = g; - *img++ = b; - *img++ = r; - } - img += jmp; - } - } -} - -void -grender_shaped_32_fast_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - unsigned int *img; - int jmp; - - jmp = (xim->bytes_per_line >> 2) - w; - img = (unsigned int *)xim->data; - if (id->byte_order == BYTE_ORD_24_RGB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (r << 16) | (g << 8) | b; - *img++ = val; - } - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_RBG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (r << 16) | (b << 8) | g; - *img++ = val; - } - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_BRG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (b << 16) | (r << 8) | g; - *img++ = val; - } - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_BGR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (b << 16) | (g << 8) | r; - *img++ = val; - } - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_GRB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (g << 16) | (r << 8) | b; - *img++ = val; - } - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_GBR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (g << 16) | (b << 8) | r; - *img++ = val; - } - } - img += jmp; - } - } -} - -void -grender_32_fast_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - unsigned int *img; - int jmp; - - jmp = (xim->bytes_per_line >> 2) - w; - img = (unsigned int *)xim->data; - if (id->byte_order == BYTE_ORD_24_RGB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (r << 16) | (g << 8) | b; - *img++ = val; - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_RBG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (r << 16) | (b << 8) | g; - *img++ = val; - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_BRG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (b << 16) | (r << 8) | g; - *img++ = val; - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_BGR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (b << 16) | (g << 8) | r; - *img++ = val; - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_GRB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (g << 16) | (r << 8) | b; - *img++ = val; - } - img += jmp; - } - } - else if (id->byte_order == BYTE_ORD_24_GBR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (g << 16) | (b << 8) | r; - *img++ = val; - } - img += jmp; - } - } -} - -void -grender_shaped_15_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - XPutPixel(sxim, x, y, 0); - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | ((b & 0xf8) >> 3); - XPutPixel(xim, x, y, val); - } - } - } -} - -void -grender_15_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | ((b & 0xf8) >> 3); - XPutPixel(xim, x, y, val); - } - } -} - -void -grender_shaped_16_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - XPutPixel(sxim, x, y, 0); - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | ((b & 0xf8) >> 3); - XPutPixel(xim, x, y, val); - } - } - } -} - -void -grender_16_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | ((b & 0xf8) >> 3); - XPutPixel(xim, x, y, val); - } - } -} - -void -grender_shaped_24_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - - if (id->byte_order == BYTE_ORD_24_RGB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - XPutPixel(sxim, x, y, 0); - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (r << 16) | (g << 8) | b; - XPutPixel(xim, x, y, val); - } - } - } - } - else if (id->byte_order == BYTE_ORD_24_RBG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - XPutPixel(sxim, x, y, 0); - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (r << 16) | (b << 8) | g; - XPutPixel(xim, x, y, val); - } - } - } - } - else if (id->byte_order == BYTE_ORD_24_BRG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - XPutPixel(sxim, x, y, 0); - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (b << 16) | (r << 8) | g; - XPutPixel(xim, x, y, val); - } - } - } - } - else if (id->byte_order == BYTE_ORD_24_BGR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - XPutPixel(sxim, x, y, 0); - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (b << 16) | (g << 8) | r; - XPutPixel(xim, x, y, val); - } - } - } - } - else if (id->byte_order == BYTE_ORD_24_GRB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - XPutPixel(sxim, x, y, 0); - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (g << 16) | (r << 8) | b; - XPutPixel(xim, x, y, val); - } - } - } - } - else if (id->byte_order == BYTE_ORD_24_GBR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - XPutPixel(sxim, x, y, 0); - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (g << 16) | (b << 8) | r; - XPutPixel(xim, x, y, val); - } - } - } - } -} - -void -grender_24_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray) -{ - int x, y, val, r, g, b; - unsigned char *ptr2; - - if (id->byte_order == BYTE_ORD_24_RGB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (r << 16) | (g << 8) | b; - XPutPixel(xim, x, y, val); - } - } - } - else if (id->byte_order == BYTE_ORD_24_RBG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (r << 16) | (b << 8) | g; - XPutPixel(xim, x, y, val); - } - } - } - else if (id->byte_order == BYTE_ORD_24_BRG) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (b << 16) | (r << 8) | g; - XPutPixel(xim, x, y, val); - } - } - } - else if (id->byte_order == BYTE_ORD_24_BGR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (b << 16) | (g << 8) | r; - XPutPixel(xim, x, y, val); - } - } - } - else if (id->byte_order == BYTE_ORD_24_GRB) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (g << 16) | (r << 8) | b; - XPutPixel(xim, x, y, val); - } - } - } - else if (id->byte_order == BYTE_ORD_24_GBR) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = (g << 16) | (b << 8) | r; - XPutPixel(xim, x, y, val); - } - } - } -} - -void -grender_shaped_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray, int bpp) -{ - int x, y, val, r, g, b, *ter, ex, er, eg, eb; - unsigned char *ptr2; - unsigned char *img; - int jmp; - - jmp = (xim->bytes_per_line) - w; - img = (unsigned char *)xim->data; - switch (id->render_type) - { - case RT_PLAIN_PALETTE: - if ((id->fastrend) && (xim->bits_per_pixel == 8)) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = gdk_imlib_best_color_match(&r, &g, &b); - *img++ = val; - } - } - img += jmp; - } - } - else - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - XPutPixel(sxim, x, y, 0); - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = gdk_imlib_best_color_match(&r, &g, &b); - XPutPixel(xim, x, y, val); - } - } - } - } - break; - case RT_PLAIN_PALETTE_FAST: - if ((id->fastrend) && (xim->bits_per_pixel == 8)) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - img++; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = COLOR_RGB(r >> 3, g >> 3, b >> 3); - *img++ = val; - } - } - img += jmp; - } - } - else - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - XPutPixel(sxim, x, y, 0); - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = COLOR_RGB(r >> 3, g >> 3, b >> 3); - XPutPixel(xim, x, y, val); - } - } - } - } - break; - case RT_DITHER_PALETTE: - if ((id->fastrend) && (xim->bits_per_pixel == 8)) - { - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - { - XPutPixel(sxim, x, y, 0); - img++; - } - ex += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - else if (er < 0) - er = 0; - if (eg > 255) - eg = 255; - else if (eg < 0) - eg = 0; - if (eb > 255) - eb = 255; - else if (eb < 0) - eb = 0; - val = gdk_imlib_best_color_match(&er, &eg, &eb); - DITHER_ERROR(er1, er2, ex, er, eg, eb); - *img++ = val; - } - } - img += jmp; - } - } - else - { - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - ex += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - else if (er < 0) - er = 0; - if (eg > 255) - eg = 255; - else if (eg < 0) - eg = 0; - if (eb > 255) - eb = 255; - else if (eb < 0) - eb = 0; - val = gdk_imlib_best_color_match(&er, &eg, &eb); - DITHER_ERROR(er1, er2, ex, er, eg, eb); - XPutPixel(xim, x, y, val); - } - } - } - } - break; - case RT_DITHER_PALETTE_FAST: - if ((id->fastrend) && (xim->bits_per_pixel == 8)) - { - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - { - XPutPixel(sxim, x, y, 0); - img++; - } - ex += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - else if (er < 0) - er = 0; - if (eg > 255) - eg = 255; - else if (eg < 0) - eg = 0; - if (eb > 255) - eb = 255; - else if (eb < 0) - eb = 0; - val = INDEX_RGB(er >> 3, eg >> 3, eb >> 3); - er = ERROR_RED(er, val); - eg = ERROR_GRN(eg, val); - eb = ERROR_BLU(eb, val); - DITHER_ERROR(er1, er2, ex, er, eg, eb); - *img++ = COLOR_INDEX(val); - } - } - img += jmp; - } - } - else - { - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - if ((r == im->shape_color.r) && - (g == im->shape_color.g) && - (b == im->shape_color.b)) - { - XPutPixel(sxim, x, y, 0); - ex += 3; - } - else - { - XPutPixel(sxim, x, y, 1); - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - else if (er < 0) - er = 0; - if (eg > 255) - eg = 255; - else if (eg < 0) - eg = 0; - if (eb > 255) - eb = 255; - else if (eb < 0) - eb = 0; - val = INDEX_RGB(er >> 3, eg >> 3, eb >> 3); - er = ERROR_RED(er, val); - eg = ERROR_GRN(eg, val); - eb = ERROR_BLU(eb, val); - DITHER_ERROR(er1, er2, ex, er, eg, eb); - XPutPixel(xim, x, y, COLOR_INDEX(val)); - } - } - } - } - break; - default: - if (id->fastrend) - { - switch (bpp) - { - case 8: - break; - case 15: - if (id->render_type == RT_DITHER_TRUECOL) - { - if (id->ordered_dither) - grender_shaped_15_fast_dither_mod_ordered(im, w, h, xim, sxim, er1, er2, xarray, yarray); - else - grender_shaped_15_fast_dither_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - } - else - grender_shaped_15_fast_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - case 16: - if (id->render_type == RT_DITHER_TRUECOL) - { - if (id->ordered_dither) - grender_shaped_16_fast_dither_mod_ordered(im, w, h, xim, sxim, er1, er2, xarray, yarray); - else - grender_shaped_16_fast_dither_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - } - else - grender_shaped_16_fast_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - case 24: - case 32: - if (xim->bits_per_pixel == 24) - grender_shaped_24_fast_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - else - grender_shaped_32_fast_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - default: - break; - } - } - else - { - switch (bpp) - { - case 8: - break; - case 15: - if (id->render_type == RT_DITHER_TRUECOL) - { - if (id->ordered_dither) - grender_shaped_15_dither_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - grender_shaped_15_dither_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - } - else - grender_shaped_15_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - case 16: - if (id->render_type == RT_DITHER_TRUECOL) - { - if (id->ordered_dither) - grender_shaped_16_dither_mod_ordered(im, w, h, xim, sxim, er1, er2, xarray, yarray); - else - grender_shaped_16_dither_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - } - else - grender_shaped_16_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - case 24: - grender_shaped_24_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - case 32: - grender_shaped_24_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - default: - break; - } - } - break; - } -} - -void -grender_mod(GdkImlibImage * im, int w, int h, XImage * xim, - XImage * sxim, int *er1, int *er2, int *xarray, - unsigned char **yarray, int bpp) -{ - int x, y, val, r, g, b, *ter, ex, er, eg, eb; - unsigned char *ptr2; - unsigned char *img; - int jmp; - - jmp = (xim->bytes_per_line) - w; - img = (unsigned char *)xim->data; - switch (id->render_type) - { - case RT_PLAIN_PALETTE: - if ((id->fastrend) && (xim->bits_per_pixel == 8)) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = gdk_imlib_best_color_match(&r, &g, &b); - *img++ = val; - } - img += jmp; - } - } - else - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = gdk_imlib_best_color_match(&r, &g, &b); - XPutPixel(xim, x, y, val); - } - } - } - break; - case RT_PLAIN_PALETTE_FAST: - if ((id->fastrend) && (xim->bits_per_pixel == 8)) - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = COLOR_RGB(r >> 3, g >> 3, b >> 3); - *img++ = val; - } - img += jmp; - } - } - else - { - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - val = COLOR_RGB(r >> 3, g >> 3, b >> 3); - XPutPixel(xim, x, y, val); - } - } - } - break; - case RT_DITHER_PALETTE: - if ((id->fastrend) && (xim->bits_per_pixel == 8)) - { - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - else if (er < 0) - er = 0; - if (eg > 255) - eg = 255; - else if (eg < 0) - eg = 0; - if (eb > 255) - eb = 255; - else if (eb < 0) - eb = 0; - val = gdk_imlib_best_color_match(&er, &eg, &eb); - DITHER_ERROR(er1, er2, ex, er, eg, eb); - *img++ = val; - } - img += jmp; - } - } - else - { - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - else if (er < 0) - er = 0; - if (eg > 255) - eg = 255; - else if (eg < 0) - eg = 0; - if (eb > 255) - eb = 255; - else if (eb < 0) - eb = 0; - val = gdk_imlib_best_color_match(&er, &eg, &eb); - DITHER_ERROR(er1, er2, ex, er, eg, eb); - XPutPixel(xim, x, y, val); - } - } - } - break; - case RT_DITHER_PALETTE_FAST: - if ((id->fastrend) && (xim->bits_per_pixel == 8)) - { - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - else if (er < 0) - er = 0; - if (eg > 255) - eg = 255; - else if (eg < 0) - eg = 0; - if (eb > 255) - eb = 255; - else if (eb < 0) - eb = 0; - val = INDEX_RGB(er >> 3, eg >> 3, eb >> 3); - er = ERROR_RED(er, val); - eg = ERROR_GRN(eg, val); - eb = ERROR_BLU(eb, val); - DITHER_ERROR(er1, er2, ex, er, eg, eb); - *img++ = COLOR_INDEX(val); - } - img += jmp; - } - } - else - { - for (y = 0; y < h; y++) - { - ter = er1; - er1 = er2; - er2 = ter; - for (ex = 0; ex < (w + 2) * 3; ex++) - er2[ex] = 0; - ex = 3; - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - r = (int)*ptr2++; - g = (int)*ptr2++; - b = (int)*ptr2; - r = im->rmap[r]; - g = im->gmap[g]; - b = im->bmap[b]; - er = r + er1[ex++]; - eg = g + er1[ex++]; - eb = b + er1[ex++]; - if (er > 255) - er = 255; - else if (er < 0) - er = 0; - if (eg > 255) - eg = 255; - else if (eg < 0) - eg = 0; - if (eb > 255) - eb = 255; - else if (eb < 0) - eb = 0; - val = INDEX_RGB(er >> 3, eg >> 3, eb >> 3); - er = ERROR_RED(er, val); - eg = ERROR_GRN(eg, val); - eb = ERROR_BLU(eb, val); - DITHER_ERROR(er1, er2, ex, er, eg, eb); - XPutPixel(xim, x, y, COLOR_INDEX(val)); - } - } - } - break; - default: - if (id->fastrend) - { - switch (bpp) - { - case 8: - break; - case 15: - if (id->render_type == RT_DITHER_TRUECOL) - { - if (id->ordered_dither) - grender_15_fast_dither_mod_ordered(im, w, h, xim, sxim, er1, er2, xarray, yarray); - else - grender_15_fast_dither_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - } - else - grender_15_fast_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - case 16: - if (id->render_type == RT_DITHER_TRUECOL) - { - if (id->ordered_dither) - grender_16_fast_dither_mod_ordered(im, w, h, xim, sxim, er1, er2, xarray, yarray); - else - grender_16_fast_dither_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - } - else - grender_16_fast_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - case 24: - case 32: - if (xim->bits_per_pixel == 24) - grender_24_fast_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - else - grender_32_fast_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - default: - break; - } - } - else - { - switch (bpp) - { - case 8: - break; - case 15: - if (id->render_type == RT_DITHER_TRUECOL) - { - if (id->ordered_dither) - grender_15_dither_mod_ordered(im, w, h, xim, sxim, er1, er2, xarray, yarray); - else - grender_15_dither_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - } - else - grender_15_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - case 16: - if (id->render_type == RT_DITHER_TRUECOL) - { - if (id->ordered_dither) - grender_16_dither_mod_ordered(im, w, h, xim, sxim, er1, er2, xarray, yarray); - else - grender_16_dither_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - } - else - grender_16_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - case 24: - grender_24_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - case 32: - grender_24_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray); - break; - default: - break; - } - break; - } - } -} - -gint -gdk_imlib_render(GdkImlibImage * im, gint w, gint h) -{ - XImage *xim, *sxim; - GC tgc, stgc; - XGCValues gcv; - unsigned char *tmp, *stmp, **yarray, *ptr22; - int w3, x, inc, pos, *error, *er1, *er2, *xarray, ex, - bpp, huge; - Pixmap pmap, mask; - GdkPixmap *pm, *mm; - int shared_pixmap, shared_image, ok; - - sxim = NULL; - xim = NULL; - tmp = NULL; - stmp = NULL; - pmap = 0; - mask = 0; - tgc = 0; - stgc = 0; - inc = 0; - if (!im) - return 0; - if (w <= 0) - return 0; - if (h <= 0) - return 0; - gcv.graphics_exposures = False; - -/* look for the pixmap in cache first */ - if (id->cache.on_pixmap) - { - pmap = 0; - gfind_pixmap(im, w, h, &pm, &mm); - if (pm) - { - im->width = w; - im->height = h; - im->pixmap = pm; - if (mm) - im->shape_mask = mm; - else - im->shape_mask = NULL; - return 1; - } - } - - if (im->pixmap) - gfree_pixmappmap(im->pixmap); - im->pixmap = NULL; - im->shape_mask = NULL; -/* setup stuff */ - huge = 0; - if (id->x.depth <= 8) - bpp = 1; - else if (id->x.depth <= 16) - bpp = 2; - else - bpp = 4; - if ((id->max_shm) && ((bpp * w * h) > id->max_shm)) - huge = 1; - im->width = w; - im->height = h; - -/* dithering array */ - error = (int *)malloc(sizeof(int) * (w + 2) * 2 * 3); - - if (!error) - { - fprintf(stderr, "ERROR: Cannot allocate RAM for image dither buffer\n"); - return 0; - } - -/* setup pointers to point right */ - er1 = error; - er2 = error + ((w + 2) * 3); - w3 = im->rgb_width * 3; - ptr22 = im->rgb_data; - -/* setup coord-mapping array (specially for border scaling) */ - xarray = malloc(sizeof(int) * w); - - if (!xarray) - { - fprintf(stderr, "ERROR: Cannot allocate X co-ord buffer\n"); - free(error); - return 0; - } - yarray = malloc(sizeof(unsigned char *) * h); - - if (!yarray) - { - fprintf(stderr, "ERROR: Cannot allocate Y co-ord buffer\n"); - free(xarray); - free(error); - return 0; - } - for (ex = 0; ex < ((w + 2) * 3 * 2); ex++) - error[ex] = 0; - { - int l, r, m; - - if (w < im->border.left + im->border.right) - { - l = w >> 1; - r = w - l; - m = 0; - } - else - { - l = im->border.left; - r = im->border.right; - m = w - l - r; - } - if (m > 0) - inc = ((im->rgb_width - im->border.left - im->border.right) << 16) / m; - pos = 0; - if (l) - for (x = 0; x < l; x++) - { - xarray[x] = (pos >> 16) + (pos >> 16) + (pos >> 16); - pos += 0x10000; - } - if (m) - { - for (x = l; x < l + m; x++) - { - xarray[x] = (pos >> 16) + (pos >> 16) + (pos >> 16); - pos += inc; - } - } - pos = (im->rgb_width - r) << 16; - for (x = w - r; x < w; x++) - { - xarray[x] = (pos >> 16) + (pos >> 16) + (pos >> 16); - pos += 0x10000; - } - - if (h < im->border.top + im->border.bottom) - { - l = h >> 1; - r = h - l; - m = 0; - } - else - { - l = im->border.top; - r = im->border.bottom; - m = h - l - r; - } - if (m > 0) - inc = ((im->rgb_height - im->border.top - im->border.bottom) << 16) / m; - pos = 0; - for (x = 0; x < l; x++) - { - yarray[x] = ptr22 + ((pos >> 16) * w3); - pos += 0x10000; - } - if (m) - { - for (x = l; x < l + m; x++) - { - yarray[x] = ptr22 + ((pos >> 16) * w3); - pos += inc; - } - } - pos = (im->rgb_height - r) << 16; - for (x = h - r; x < h; x++) - { - yarray[x] = ptr22 + ((pos >> 16) * w3); - pos += 0x10000; - } - } - -/* work out if we should use shared pixmap. images etc */ - shared_pixmap = 0; - shared_image = 0; - if ((id->x.shmp) && (id->x.shm) && (!huge)) - { - shared_pixmap = 1; - shared_image = 0; - } - else if ((id->x.shm) && (!huge)) - { - shared_pixmap = 0; - shared_image = 1; - } - else - shared_pixmap = 0; - shared_image = 0; - -/* init images and pixmaps */ - ok = 1; - if (shared_pixmap) - { - xim = XShmCreateImage(id->x.disp, id->x.visual, id->x.depth, ZPixmap, NULL, &id->x.last_shminfo, w, h); - if (!xim) - { - fprintf(stderr, "IMLIB ERROR: Mit-SHM can't create XImage for Shared Pixmap Wrapper\n"); - fprintf(stderr, " Falling back on Shared XImages\n"); - shared_pixmap = 0; - shared_image = 1; - ok = 0; - } - if (ok) - { - id->x.last_shminfo.shmid = shmget(IPC_PRIVATE, xim->bytes_per_line * xim->height, IPC_CREAT | 0777); - if (id->x.last_shminfo.shmid == -1) - { - fprintf(stderr, "IMLIB ERROR: SHM can't get SHM Identifier for Shared Pixmap Wrapper\n"); - fprintf(stderr, " Falling back on Shared XImages\n"); - XDestroyImage(xim); - shared_pixmap = 0; - shared_image = 1; - ok = 1; - } - if (ok) - { - id->x.last_shminfo.shmaddr = xim->data = shmat(id->x.last_shminfo.shmid, 0, 0); - id->x.last_shminfo.readOnly = False; - XShmAttach(id->x.disp, &id->x.last_shminfo); - tmp = (unsigned char *)xim->data; - id->x.last_xim = xim; - pmap = XShmCreatePixmap(id->x.disp, id->x.base_window, - id->x.last_shminfo.shmaddr, - &id->x.last_shminfo, w, h, id->x.depth); - tgc = XCreateGC(id->x.disp, pmap, GCGraphicsExposures, &gcv); - if ((im->shape_color.r >= 0) && (im->shape_color.g >= 0) && (im->shape_color.b >= 0)) - { - sxim = XShmCreateImage(id->x.disp, id->x.visual, 1, ZPixmap, NULL, &id->x.last_sshminfo, w, h); - if (!sxim) - { - fprintf(stderr, "IMLIB ERROR: Mit-SHM can't create XImage for Shared Pixmap mask Wrapper\n"); - fprintf(stderr, " Falling back on Shared XImages\n"); - XShmDetach(id->x.disp, &id->x.last_shminfo); - XDestroyImage(xim); - shmdt(id->x.last_shminfo.shmaddr); - shmctl(id->x.last_shminfo.shmid, IPC_RMID, 0); - shared_pixmap = 0; - shared_image = 1; - ok = 0; - } - if (ok) - { - id->x.last_sshminfo.shmid = shmget(IPC_PRIVATE, sxim->bytes_per_line * sxim->height, IPC_CREAT | 0777); - if (id->x.last_sshminfo.shmid == -1) - { - fprintf(stderr, "IMLIB ERROR: SHM can't get SHM Identifier for Shared Pixmap mask Wrapper\n"); - fprintf(stderr, " Falling back on Shared XImages\n"); - XShmDetach(id->x.disp, &id->x.last_shminfo); - XDestroyImage(xim); - shmdt(id->x.last_shminfo.shmaddr); - shmctl(id->x.last_shminfo.shmid, IPC_RMID, 0); - XDestroyImage(sxim); - shared_pixmap = 0; - shared_image = 1; - ok = 0; - } - id->x.last_sshminfo.shmaddr = sxim->data = shmat(id->x.last_sshminfo.shmid, 0, 0); - id->x.last_sshminfo.readOnly = False; - XShmAttach(id->x.disp, &id->x.last_sshminfo); - stmp = (unsigned char *)sxim->data; - id->x.last_sxim = sxim; - mask = XShmCreatePixmap(id->x.disp, id->x.base_window, - id->x.last_sshminfo.shmaddr, - &id->x.last_sshminfo, w, h, 1); - stgc = XCreateGC(id->x.disp, mask, GCGraphicsExposures, &gcv); - } - } - } - } - } - ok = 1; - if (shared_image) - { - xim = XShmCreateImage(id->x.disp, id->x.visual, id->x.depth, ZPixmap, NULL, &id->x.last_shminfo, w, h); - if (!xim) - { - fprintf(stderr, "IMLIB ERROR: Mit-SHM can't create Shared XImage\n"); - fprintf(stderr, " Falling back on XImages\n"); - shared_pixmap = 0; - shared_image = 0; - ok = 0; - } - if (ok) - { - id->x.last_shminfo.shmid = shmget(IPC_PRIVATE, xim->bytes_per_line * xim->height, IPC_CREAT | 0777); - if (id->x.last_shminfo.shmid == -1) - { - fprintf(stderr, "IMLIB ERROR: SHM can't get SHM Identifier for Shared XImage\n"); - fprintf(stderr, " Falling back on XImages\n"); - XDestroyImage(xim); - shared_pixmap = 0; - shared_image = 0; - ok = 0; - } - if (ok) - { - id->x.last_shminfo.shmaddr = xim->data = shmat(id->x.last_shminfo.shmid, 0, 0); - id->x.last_shminfo.readOnly = False; - XShmAttach(id->x.disp, &id->x.last_shminfo); - tmp = (unsigned char *)xim->data; - id->x.last_xim = xim; - pmap = XCreatePixmap(id->x.disp, id->x.base_window, w, h, id->x.depth); - tgc = XCreateGC(id->x.disp, pmap, GCGraphicsExposures, &gcv); - if ((im->shape_color.r >= 0) && (im->shape_color.g >= 0) && (im->shape_color.b >= 0)) - { - sxim = XShmCreateImage(id->x.disp, id->x.visual, 1, ZPixmap, NULL, &id->x.last_sshminfo, w, h); - if (!sxim) - { - fprintf(stderr, "IMLIB ERROR: Mit-SHM can't create Shared XImage mask\n"); - fprintf(stderr, " Falling back on XImages\n"); - XShmDetach(id->x.disp, &id->x.last_shminfo); - XDestroyImage(xim); - shmdt(id->x.last_shminfo.shmaddr); - shmctl(id->x.last_shminfo.shmid, IPC_RMID, 0); - shared_pixmap = 0; - shared_image = 0; - ok = 0; - } - if (ok) - { - id->x.last_sshminfo.shmid = shmget(IPC_PRIVATE, sxim->bytes_per_line * sxim->height, IPC_CREAT | 0777); - if (id->x.last_sshminfo.shmid == -1) - { - fprintf(stderr, "Imlib ERROR: SHM can't get SHM Identifierfor Shared XImage mask\n"); - fprintf(stderr, " Falling back on XImages\n"); - XShmDetach(id->x.disp, &id->x.last_shminfo); - XDestroyImage(xim); - shmdt(id->x.last_shminfo.shmaddr); - shmctl(id->x.last_shminfo.shmid, IPC_RMID, 0); - XDestroyImage(sxim); - shared_pixmap = 0; - shared_image = 0; - ok = 0; - } - if (ok) - { - id->x.last_sshminfo.shmaddr = sxim->data = shmat(id->x.last_sshminfo.shmid, 0, 0); - id->x.last_sshminfo.readOnly = False; - XShmAttach(id->x.disp, &id->x.last_sshminfo); - stmp = (unsigned char *)sxim->data; - id->x.last_sxim = sxim; - mask = XCreatePixmap(id->x.disp, id->x.base_window, w, h, 1); - stgc = XCreateGC(id->x.disp, mask, GCGraphicsExposures, &gcv); - } - } - } - } - } - } - ok = 1; - if ((!shared_pixmap) && (!shared_image)) - { - tmp = (unsigned char *)malloc(w * h * bpp); - if (!tmp) - { - fprintf(stderr, "IMLIB ERROR: Cannot allocate RAM for XImage data\n"); - free(xarray); - free(yarray); - free(error); - return 0; - } - xim = XCreateImage(id->x.disp, id->x.visual, id->x.depth, ZPixmap, 0, (char *)tmp, w, h, 8, 0); - if (!xim) - { - fprintf(stderr, "IMLIB ERROR: Cannot allocate XImage buffer\n"); - free(xarray); - free(yarray); - free(error); - free(tmp); - return 0; - } - pmap = XCreatePixmap(id->x.disp, id->x.base_window, w, h, id->x.depth); - if (!pmap) - { - fprintf(stderr, "IMLIB ERROR: Cannot create pixmap\n"); - free(xarray); - free(yarray); - free(error); - XDestroyImage(xim); - return 0; - } - tgc = XCreateGC(id->x.disp, pmap, GCGraphicsExposures, &gcv); - if ((im->shape_color.r >= 0) && (im->shape_color.g >= 0) && (im->shape_color.b >= 0)) - { - stmp = (unsigned char *)malloc(((w >> 3) + 8) * h); - if (!stmp) - { - fprintf(stderr, "IMLIB ERROR: Cannot allocate RAM for shape XImage data\n"); - free(xarray); - free(yarray); - free(error); - XDestroyImage(xim); - return 0; - } - sxim = XCreateImage(id->x.disp, id->x.visual, 1, ZPixmap, 0, (char *)stmp, w, h, 8, 0); - if (!sxim) - { - fprintf(stderr, "IMLIB ERROR: Cannot allocate XImage shape buffer\n"); - free(xarray); - free(yarray); - free(error); - free(stmp); - XDestroyImage(xim); - return 0; - } - mask = XCreatePixmap(id->x.disp, id->x.base_window, w, h, 1); - if (!mask) - { - fprintf(stderr, "IMLIB ERROR: Cannot create shape pixmap\n"); - free(xarray); - free(yarray); - free(error); - XDestroyImage(sxim); - XDestroyImage(xim); - return 0; - } - stgc = XCreateGC(id->x.disp, mask, GCGraphicsExposures, &gcv); - } - } - -/* copy XImage to the pixmap, if not a shared pixmap */ - if ((im->shape_color.r >= 0) && (im->shape_color.g >= 0) && (im->shape_color.b >= 0)) - { - if ((im->mod.gamma == 256) && (im->mod.brightness == 256) && (im->mod.contrast == 256) && - (im->rmod.gamma == 256) && (im->rmod.brightness == 256) && (im->rmod.contrast == 256) && - (im->gmod.gamma == 256) && (im->gmod.brightness == 256) && (im->gmod.contrast == 256) && - (im->bmod.gamma == 256) && (im->bmod.brightness == 256) && (im->bmod.contrast == 256)) - { - if (id->x.depth <= 8) - grender_shaped(im, w, h, xim, sxim, er1, er2, xarray, yarray, 8); - else - grender_shaped(im, w, h, xim, sxim, er1, er2, xarray, yarray, id->x.render_depth); - } - else - { - if (id->x.depth <= 8) - grender_shaped_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray, 8); - else - grender_shaped_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray, id->x.render_depth); - } - if (shared_image) - { - XShmPutImage(id->x.disp, pmap, tgc, xim, 0, 0, 0, 0, w, h, False); - XShmPutImage(id->x.disp, mask, stgc, sxim, 0, 0, 0, 0, w, h, False); - XSync(id->x.disp, False); - im->pixmap = gdk_imlib_pixmap_foreign_new(w, h, id->x.depth, pmap); - im->shape_mask = gdk_imlib_pixmap_foreign_new(w, h, 1, mask); - XShmDetach(id->x.disp, &id->x.last_shminfo); - XDestroyImage(xim); - shmdt(id->x.last_shminfo.shmaddr); - shmctl(id->x.last_shminfo.shmid, IPC_RMID, 0); - XShmDetach(id->x.disp, &id->x.last_sshminfo); - XDestroyImage(sxim); - shmdt(id->x.last_sshminfo.shmaddr); - shmctl(id->x.last_sshminfo.shmid, IPC_RMID, 0); - id->x.last_xim = NULL; - id->x.last_sxim = NULL; - xim = NULL; - sxim = NULL; - XFreeGC(id->x.disp, tgc); - XFreeGC(id->x.disp, stgc); - } - else if (shared_pixmap) - { - Pixmap p2, m2; - - p2 = XCreatePixmap(id->x.disp, id->x.base_window, w, h, id->x.depth); - m2 = XCreatePixmap(id->x.disp, id->x.base_window, w, h, 1); - XCopyArea(id->x.disp, pmap, p2, tgc, 0, 0, w, h, 0, 0); - XCopyArea(id->x.disp, mask, m2, stgc, 0, 0, w, h, 0, 0); - im->pixmap = gdk_imlib_pixmap_foreign_new(w, h, id->x.depth, p2); - im->shape_mask = gdk_imlib_pixmap_foreign_new(w, h, 1, m2); - XFreeGC(id->x.disp, tgc); - XFreeGC(id->x.disp, stgc); - XFreePixmap(id->x.disp, pmap); - XFreePixmap(id->x.disp, mask); - XSync(id->x.disp, False); - XShmDetach(id->x.disp, &id->x.last_shminfo); - XDestroyImage(xim); - shmdt(id->x.last_shminfo.shmaddr); - shmctl(id->x.last_shminfo.shmid, IPC_RMID, 0); - XShmDetach(id->x.disp, &id->x.last_sshminfo); - XDestroyImage(sxim); - shmdt(id->x.last_sshminfo.shmaddr); - shmctl(id->x.last_sshminfo.shmid, IPC_RMID, 0); - id->x.last_xim = NULL; - id->x.last_sxim = NULL; - xim = NULL; - sxim = NULL; - } - else - { - XPutImage(id->x.disp, pmap, tgc, xim, 0, 0, 0, 0, w, h); - XPutImage(id->x.disp, mask, stgc, sxim, 0, 0, 0, 0, w, h); - im->pixmap = gdk_imlib_pixmap_foreign_new(w, h, id->x.depth, pmap); - im->shape_mask = gdk_imlib_pixmap_foreign_new(w, h, 1, mask); - XDestroyImage(xim); - XDestroyImage(sxim); - xim = NULL; - sxim = NULL; - XFreeGC(id->x.disp, tgc); - XFreeGC(id->x.disp, stgc); - } - } - else - { - if ((im->mod.gamma == 256) && (im->mod.brightness == 256) && (im->mod.contrast == 256) && - (im->rmod.gamma == 256) && (im->rmod.brightness == 256) && (im->rmod.contrast == 256) && - (im->gmod.gamma == 256) && (im->gmod.brightness == 256) && (im->gmod.contrast == 256) && - (im->bmod.gamma == 256) && (im->bmod.brightness == 256) && (im->bmod.contrast == 256)) - { - if (id->x.depth <= 8) - grender(im, w, h, xim, sxim, er1, er2, xarray, yarray, 8); - else - grender(im, w, h, xim, sxim, er1, er2, xarray, yarray, id->x.render_depth); - } - else - { - if (id->x.depth <= 8) - grender_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray, 8); - else - grender_mod(im, w, h, xim, sxim, er1, er2, xarray, yarray, id->x.render_depth); - } - if (shared_image) - { - XShmPutImage(id->x.disp, pmap, tgc, xim, 0, 0, 0, 0, w, h, False); - im->pixmap = gdk_imlib_pixmap_foreign_new(w, h, id->x.depth, pmap); - im->shape_mask = NULL; - XSync(id->x.disp, False); - XShmDetach(id->x.disp, &id->x.last_shminfo); - XDestroyImage(xim); - shmdt(id->x.last_shminfo.shmaddr); - shmctl(id->x.last_shminfo.shmid, IPC_RMID, 0); - id->x.last_xim = NULL; - xim = NULL; - sxim = NULL; - XFreeGC(id->x.disp, tgc); - } - else if (shared_pixmap) - { - Pixmap p2; - - p2 = XCreatePixmap(id->x.disp, id->x.base_window, w, h, id->x.depth); - XCopyArea(id->x.disp, pmap, p2, tgc, 0, 0, w, h, 0, 0); - im->pixmap = gdk_imlib_pixmap_foreign_new(w, h, id->x.depth, p2); - im->shape_mask = NULL; - XFreeGC(id->x.disp, tgc); - XFreePixmap(id->x.disp, pmap); - XSync(id->x.disp, False); - XShmDetach(id->x.disp, &id->x.last_shminfo); - XDestroyImage(xim); - shmdt(id->x.last_shminfo.shmaddr); - shmctl(id->x.last_shminfo.shmid, IPC_RMID, 0); - id->x.last_xim = NULL; - xim = NULL; - sxim = NULL; - } - else - { - XPutImage(id->x.disp, pmap, tgc, xim, 0, 0, 0, 0, w, h); - im->pixmap = gdk_imlib_pixmap_foreign_new(w, h, id->x.depth, pmap); - im->shape_mask = NULL; - XDestroyImage(xim); - xim = NULL; - sxim = NULL; - XFreeGC(id->x.disp, tgc); - } - } - -/* cleanup */ - XSync(id->x.disp, False); - free(error); - free(xarray); - free(yarray); - -/* add this pixmap to the cache */ - gadd_pixmap(im, w, h, xim, sxim); - return 1; -} diff --git a/src/gdk_imlib/save.c b/src/gdk_imlib/save.c deleted file mode 100644 index 59d4e9c5bc..0000000000 --- a/src/gdk_imlib/save.c +++ /dev/null @@ -1,538 +0,0 @@ -#define _GNU_SOURCE -#include "../gdk_imlib/config.h" - -#include "../gdk_imlib/gdk_imlib.h" -#include "../gdk_imlib/gdk_imlib_private.h" - -gint -gdk_imlib_save_image(GdkImlibImage * im, char *file, GdkImlibSaveInfo * info) -{ - char *ext; - char cmd[10240]; - FILE *f; - GdkImlibSaveInfo defaults; - - if (!im || !file) - return 0; - - defaults.quality = 208; - defaults.scaling = 1024; - defaults.xjustification = 512; - defaults.yjustification = 512; - defaults.page_size = PAGE_SIZE_LETTER; - defaults.color = 1; - - if (!info) - info = &defaults; - ext = g_GetExtension(file); - - if ((!strcasecmp(ext, "ppm")) || (!strcasecmp(ext, "pnm"))) - { - f = fopen(file, "wb"); - if (f) - { - if (!fprintf(f, "P6\n# Created by Imlib\n%i %i\n255\n", im->rgb_width, im->rgb_height)) - { - fclose(f); - return 0; - } - if (!fwrite(im->rgb_data, 1, (im->rgb_width * im->rgb_height * 3), f)) - { - fclose(f); - return 0; - } - fclose(f); - return 1; - } - } - else if (!strcasecmp(ext, "pgm")) - { - int x, y; - unsigned char *ptr, val; - int v; - - f = fopen(file, "wb"); - if (f) - { - if (!fprintf(f, "P5\n# Created by Imlib\n%i %i\n255\n", im->rgb_width, im->rgb_height)) - { - fclose(f); - return 0; - } - ptr = im->rgb_data; - for (y = 0; y < im->rgb_height; y++) - { - for (x = 0; x < im->rgb_width; x++) - { - v = (int)(*ptr++); - v += (int)(*ptr++); - v += (int)(*ptr++); - val = (unsigned char)(v / 3); - if (!fwrite(&val, 1, 1, f)) - { - fclose(f); - return 0; - } - } - } - fclose(f); - return 1; - } - } - else if (!strcasecmp(ext, "ps")) - { - int bx, by, bxx, byy; - int w, h; - int sx = 0, sy = 0; - int tx = 35, ty = 35; - int x, y; - unsigned char *ptr; - int v; - - f = fopen(file, "wb"); - - if (f == NULL) - return 0; - - w = im->rgb_width; - h = im->rgb_height; - - switch (info->page_size) - { - case PAGE_SIZE_EXECUTIVE: - sx = 540; - sy = 720; - break; - case PAGE_SIZE_LETTER: - sx = 612; - sy = 792; - break; - case PAGE_SIZE_LEGAL: - sx = 612; - sy = 1008; - break; - case PAGE_SIZE_A4: - sx = 595; - sy = 842; - break; - case PAGE_SIZE_A3: - sx = 842; - sy = 1190; - break; - case PAGE_SIZE_A5: - sx = 420; - sy = 595; - break; - case PAGE_SIZE_FOLIO: - sx = 612; - sy = 936; - break; - } - bxx = ((sx - (tx * 2)) * info->scaling) >> 10; - byy = ((h * bxx / w) * info->scaling) >> 10; - if ((((sy - (ty * 2)) * info->scaling) >> 10) < byy) - { - byy = ((sy - (ty * 2)) * info->scaling) >> 10; - bxx = ((w * byy / h) * info->scaling) >> 10; - } - bx = tx + ((((sx - (tx * 2)) - bxx) * info->xjustification) >> 10); - by = ty + ((((sy - (ty * 2)) - byy) * info->yjustification) >> 10); - if (f) - { - fprintf(f, "%%!PS-Adobe-2.0 EPSF-2.0\n"); - fprintf(f, "%%%%Title: %s\n", file); - fprintf(f, "%%%%Creator: Imlib by The Rasterman\n"); - fprintf(f, "%%%%BoundingBox: %i %i %i %i\n", bx, by, bxx, byy); - fprintf(f, "%%%%Pages: 1\n"); - fprintf(f, "%%%%DocumentFonts:\n"); - fprintf(f, "%%%%EndComments\n"); - fprintf(f, "%%%%EndProlog\n"); - fprintf(f, "%%%%Page: 1 1\n"); - fprintf(f, "/origstate save def\n"); - fprintf(f, "20 dict begin\n"); - if (info->color) - { - fprintf(f, "/pix %i string def\n", w * 3); - fprintf(f, "/grays %i string def\n", w); - fprintf(f, "/npixls 0 def\n"); - fprintf(f, "/rgbindx 0 def\n"); - fprintf(f, "%i %i translate\n", bx, by); - fprintf(f, "%i %i scale\n", bxx, byy); - fprintf(f, - "/colorimage where\n" - "{ pop }\n" - "{\n" - "/colortogray {\n" - "/rgbdata exch store\n" - "rgbdata length 3 idiv\n" - "/npixls exch store\n" - "/rgbindx 0 store\n" - "0 1 npixls 1 sub {\n" - "grays exch\n" - "rgbdata rgbindx get 20 mul\n" - "rgbdata rgbindx 1 add get 32 mul\n" - "rgbdata rgbindx 2 add get 12 mul\n" - "add add 64 idiv\n" - "put\n" - "/rgbindx rgbindx 3 add store\n" - "} for\n" - "grays 0 npixls getinterval\n" - "} bind def\n" - "/mergeprocs {\n" - "dup length\n" - "3 -1 roll\n" - "dup\n" - "length\n" - "dup\n" - "5 1 roll\n" - "3 -1 roll\n" - "add\n" - "array cvx\n" - "dup\n" - "3 -1 roll\n" - "0 exch\n" - "putinterval\n" - "dup\n" - "4 2 roll\n" - "putinterval\n" - "} bind def\n" - "/colorimage {\n" - "pop pop\n" - "{colortogray} mergeprocs\n" - "image\n" - "} bind def\n" - "} ifelse\n"); - fprintf(f, "%i %i 8\n", w, h); - fprintf(f, "[%i 0 0 -%i 0 %i]\n", w, h, h); - fprintf(f, "{currentfile pix readhexstring pop}\n"); - fprintf(f, "false 3 colorimage\n"); - fprintf(f, "\n"); - ptr = im->rgb_data; - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - v = (int)(*ptr++); - if (v < 0x10) - fprintf(f, "0%x", v); - else - fprintf(f, "%x", v); - v = (int)(*ptr++); - if (v < 0x10) - fprintf(f, "0%x", v); - else - fprintf(f, "%x", v); - v = (int)(*ptr++); - if (v < 0x10) - fprintf(f, "0%x", v); - else - fprintf(f, "%x", v); - } - fprintf(f, "\n"); - } - } - else - { - fprintf(f, "/pix %i string def\n", w); - fprintf(f, "/grays %i string def\n", w); - fprintf(f, "/npixls 0 def\n"); - fprintf(f, "/rgbindx 0 def\n"); - fprintf(f, "%i %i translate\n", bx, by); - fprintf(f, "%i %i scale\n", bxx, byy); - fprintf(f, "%i %i 8\n", w, h); - fprintf(f, "[%i 0 0 -%i 0 %i]\n", w, h, h); - fprintf(f, "{currentfile pix readhexstring pop}\n"); - fprintf(f, "image\n"); - fprintf(f, "\n"); - ptr = im->rgb_data; - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - v = (int)(*ptr++); - v += (int)(*ptr++); - v += (int)(*ptr++); - v /= 3; - if (v < 0x10) - fprintf(f, "0%x", v); - else - fprintf(f, "%x", v); - } - fprintf(f, "\n"); - } - } - fprintf(f, "\n"); - fprintf(f, "showpage\n"); - fprintf(f, "end\n"); - fprintf(f, "origstate restore\n"); - fprintf(f, "%%%%Trailer\n"); - fclose(f); - return 1; - } - } - else if ((!strcasecmp(ext, "jpeg")) || (!strcasecmp(ext, "jpg"))) - { -#ifdef HAVE_LIBJPEG - struct jpeg_compress_struct cinfo; - struct jpeg_error_mgr jerr; - JSAMPROW row_pointer[1]; - int row_stride; - int y; - - f = fopen(file, "wb"); - if (f) - { - cinfo.err = jpeg_std_error(&jerr); - jpeg_create_compress(&cinfo); - jpeg_stdio_dest(&cinfo, f); - cinfo.image_width = im->rgb_width; - cinfo.image_height = im->rgb_height; - cinfo.input_components = 3; - cinfo.in_color_space = JCS_RGB; - jpeg_set_defaults(&cinfo); - jpeg_set_quality(&cinfo, (100 * info->quality) >> 8, TRUE); - jpeg_start_compress(&cinfo, TRUE); - row_stride = cinfo.image_width * 3; - while (cinfo.next_scanline < cinfo.image_height) - { - row_pointer[0] = im->rgb_data + (cinfo.next_scanline * row_stride); - jpeg_write_scanlines(&cinfo, row_pointer, 1); - } - jpeg_finish_compress(&cinfo); - fclose(f); - return 1; - } -#endif - } - else if (!strcasecmp(ext, "png")) - { -#ifdef HAVE_LIBPNG - png_structp png_ptr; - png_infop info_ptr; - unsigned char *data, *ptr; - int x, y; - png_bytep row_ptr; - png_color_8 sig_bit; - - f = fopen(file, "wb"); - if (f) - { - png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, - NULL, NULL, NULL); - if (!png_ptr) - { - fclose(f); - return 0; - } - info_ptr = png_create_info_struct(png_ptr); - if (info_ptr == NULL) - { - fclose(f); - png_destroy_write_struct(&png_ptr, (png_infopp) NULL); - return 0; - } - if (setjmp(png_ptr->jmpbuf)) - { - fclose(f); - png_destroy_write_struct(&png_ptr, (png_infopp) NULL); - return 0; - } - png_init_io(png_ptr, f); - png_set_IHDR(png_ptr, info_ptr, im->rgb_width, im->rgb_height, 8, - PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE, - PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); - sig_bit.red = 8; - sig_bit.green = 8; - sig_bit.blue = 8; - sig_bit.alpha = 8; - png_set_sBIT(png_ptr, info_ptr, &sig_bit); - png_write_info(png_ptr, info_ptr); - png_set_shift(png_ptr, &sig_bit); - png_set_packing(png_ptr); - data = malloc(im->rgb_width * 4); - if (!data) - { - fclose(f); - png_destroy_write_struct(&png_ptr, (png_infopp) NULL); - return 0; - } - for (y = 0; y < im->rgb_height; y++) - { - ptr = im->rgb_data + (y * im->rgb_width * 3); - for (x = 0; x < im->rgb_width; x++) - { - data[(x << 2) + 0] = *ptr++; - data[(x << 2) + 1] = *ptr++; - data[(x << 2) + 2] = *ptr++; - if ((data[(x << 2) + 0] == im->shape_color.r) && - (data[(x << 2) + 1] == im->shape_color.g) && - (data[(x << 2) + 2] == im->shape_color.b)) - data[(x << 2) + 3] = 0; - else - data[(x << 2) + 3] = 255; - } - row_ptr = data; - png_write_rows(png_ptr, &row_ptr, 1); - } - free(data); - png_write_end(png_ptr, info_ptr); - png_destroy_write_struct(&png_ptr, (png_infopp) NULL); - - fclose(f); - return 1; - } -#endif - } - else if ((!strcasecmp(ext, "tiff")) || (!strcasecmp(ext, "tif"))) - { -#ifdef HAVE_LIBTIFF - TIFF *tif; - unsigned char *ptr, *data; - int x, y; - int w; - - tif = TIFFOpen(file, "w"); - if (tif) - { - TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, im->rgb_width); - TIFFSetField(tif, TIFFTAG_IMAGELENGTH, im->rgb_height); - TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); - TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_LZW); - { - TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 3); - TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); - w = TIFFScanlineSize(tif); - TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, - TIFFDefaultStripSize(tif, -1)); - for (y = 0; y < im->rgb_height; y++) - { - data = im->rgb_data + (y * im->rgb_width * 3); - TIFFWriteScanline(tif, data, y, 0); - } - } - TIFFClose(tif); - return 1; - } -#endif - } - if (id->fallback) - { - f = open_helper("%C/convert pnm:- %s", file, "wb"); - if (f) - { - if (!fprintf(f, "P6\n# Created by Imlib\n%i %i\n255\n", im->rgb_width, im->rgb_height)) - { - close_helper(f); - return 0; - } - if (!fwrite(im->rgb_data, 1, (im->rgb_width * im->rgb_height * 3), f)) - { - close_helper(f); - return 0; - } - if (close_helper(f)) - return 0; - return 1; - } - - if (!strcasecmp(ext, "jpeg")) - g_snprintf(cmd, sizeof(cmd), "%%H -quality %i -progressive -outfile %%s", 100 * info->quality / 256); - else if (!strcasecmp(ext, "jpg")) - g_snprintf(cmd, sizeof(cmd), "%%H -quality %i -progressive -outfile %%s", 100 * info->quality / 256); - else if (!strcasecmp(ext, "bmp")) - strcpy(cmd, "%Q %N/ppmtobmp >%s"); - else if (!strcasecmp(ext, "gif")) - strcpy(cmd, "%Q %N/ppmtogif -interlace >%s"); - else if (!strcasecmp(ext, "ilbm")) - strcpy(cmd, "%N/ppmtoilbm -24if -hires -lace -compress >%s"); - else if (!strcasecmp(ext, "ilb")) - strcpy(cmd, "%N/ppmtoilbm -24if -hires -lace -compress >%s"); - else if (!strcasecmp(ext, "iff")) - strcpy(cmd, "%N/ppmtoilbm -24if -hires -lace -compress >%s"); - else if (!strcasecmp(ext, "icr")) - strcpy(cmd, "%N/ppmtoicr >%s"); - else if (!strcasecmp(ext, "map")) - strcpy(cmd, "%N/ppmtomap >%s"); - else if (!strcasecmp(ext, "mit")) - strcpy(cmd, "%N/ppmtomitsu -sharpness 4 >%s"); - else if (!strcasecmp(ext, "mitsu")) - strcpy(cmd, "%N/ppmtomitsu -sharpness 4 >%s"); - else if (!strcasecmp(ext, "pcx")) - strcpy(cmd, "%N/ppmtopcx -24bit -packed >%s"); - else if (!strcasecmp(ext, "pgm")) - strcpy(cmd, "%N/ppmtopgm >%s"); - else if (!strcasecmp(ext, "pi1")) - strcpy(cmd, "%N/ppmtopi1 >%s"); - else if (!strcasecmp(ext, "pic")) - strcpy(cmd, "%Q %N/ppmtopict >%s"); - else if (!strcasecmp(ext, "pict")) - strcpy(cmd, "%Q %N/ppmtopict >%s"); - else if (!strcasecmp(ext, "pj")) - strcpy(cmd, "%N/ppmtopj >%s"); - else if (!strcasecmp(ext, "pjxl")) - strcpy(cmd, "%N/ppmtopjxl >%s"); - else if (!strcasecmp(ext, "puz")) - strcpy(cmd, "%N/ppmtopuzz >%s"); - else if (!strcasecmp(ext, "puzz")) - strcpy(cmd, "%N/ppmtopuzz >%s"); - else if (!strcasecmp(ext, "rgb3")) - strcpy(cmd, "%N/ppmtorgb3 >%s"); - else if (!strcasecmp(ext, "six")) - strcpy(cmd, "%N/ppmtosixel >%s"); - else if (!strcasecmp(ext, "sixel")) - strcpy(cmd, "%N/ppmtosizel >%s"); - else if (!strcasecmp(ext, "tga")) - strcpy(cmd, "%N/ppmtotga -rgb >%s"); - else if (!strcasecmp(ext, "targa")) - strcpy(cmd, "%N/ppmtotga -rgb >%s"); - else if (!strcasecmp(ext, "uil")) - strcpy(cmd, "%N/ppmtouil >%s"); - else if (!strcasecmp(ext, "xpm")) - strcpy(cmd, "%Q %N/ppmtoxpm >%s"); - else if (!strcasecmp(ext, "yuv")) - strcpy(cmd, "%N/ppmtoyuv >%s"); - else if (!strcasecmp(ext, "png")) - strcpy(cmd, "%N/pnmtopng >%s"); - else if (!strcasecmp(ext, "ps")) - strcpy(cmd, "%N/pnmtops -center -scale 100 >%s"); - else if (!strcasecmp(ext, "rast")) - strcpy(cmd, "%N/pnmtorast -rle >%s"); - else if (!strcasecmp(ext, "ras")) - strcpy(cmd, "%N/pnmtorast -rle >%s"); - else if (!strcasecmp(ext, "sgi")) - strcpy(cmd, "%N/pnmtosgi >%s"); - else if (!strcasecmp(ext, "sir")) - strcpy(cmd, "%N/pnmtosir >%s"); - else if (!strcasecmp(ext, "tif")) - strcpy(cmd, "%N/pnmtotiff -lzw >%s"); - else if (!strcasecmp(ext, "tiff")) - strcpy(cmd, "%N/pnmtotiff -lzw >%s"); - else if (!strcasecmp(ext, "xwd")) - strcpy(cmd, "%N/pnmtoxwd >%s"); - else - ext = ""; - if (ext[0]) - { - f = open_helper(cmd, file, "wb"); - if (f) - { - if (!fprintf(f, "P6\n# Created by Imlib\n%i %i\n255\n", im->rgb_width, im->rgb_height)) - { - close_helper(f); - return 0; - } - if (!fwrite(im->rgb_data, 1, (im->rgb_width * im->rgb_height * 3), f)) - { - close_helper(f); - return 0; - } - if (close_helper(f)) - return 0; - return 1; - } - } - } - return 0; -} diff --git a/src/gdk_imlib/utils.c b/src/gdk_imlib/utils.c deleted file mode 100644 index 039e93c4ea..0000000000 --- a/src/gdk_imlib/utils.c +++ /dev/null @@ -1,1521 +0,0 @@ -#define _GNU_SOURCE - -#include "../gdk_imlib/gdk_imlib.h" -#include "../gdk_imlib/gdk_imlib_private.h" - -void -gcalc_map_tables(GdkImlibImage * im) -{ - int i; - double g, b, c, ii, v; - - if (!im) - return; - - g = ((double)im->mod.gamma) / 256; - b = ((double)im->mod.brightness) / 256; - c = ((double)im->mod.contrast) / 256; - if (g < 0.01) - g = 0.01; - - for (i = 0; i < 256; i++) - { - ii = ((double)i) / 256; - v = ((ii - 0.5) * c) + 0.5 + (b - 1); - if (v > 0) - v = pow(((ii - 0.5) * c) + 0.5 + (b - 1), 1 / g) * 256; - else - v = 0; - if (v > 255) - v = 255; - else if (v < 0) - v = 0; - im->rmap[i] = (unsigned char)v; - im->gmap[i] = (unsigned char)v; - im->bmap[i] = (unsigned char)v; - } - g = ((double)im->rmod.gamma) / 256; - b = ((double)im->rmod.brightness) / 256; - c = ((double)im->rmod.contrast) / 256; - if (g < 0.01) - g = 0.01; - - for (i = 0; i < 256; i++) - { - ii = ((double)im->rmap[i]) / 256; - v = ((ii - 0.5) * c) + 0.5 + (b - 1); - if (v > 0) - v = pow(((ii - 0.5) * c) + 0.5 + (b - 1), 1 / g) * 256; - else - v = 0; - if (v > 255) - v = 255; - else if (v < 0) - v = 0; - im->rmap[i] = (unsigned char)v; - } - g = ((double)im->gmod.gamma) / 256; - b = ((double)im->gmod.brightness) / 256; - c = ((double)im->gmod.contrast) / 256; - if (g < 0.01) - g = 0.01; - - for (i = 0; i < 256; i++) - { - ii = ((double)im->gmap[i]) / 256; - v = ((ii - 0.5) * c) + 0.5 + (b - 1); - if (v > 0) - v = pow(((ii - 0.5) * c) + 0.5 + (b - 1), 1 / g) * 256; - else - v = 0; - if (v > 255) - v = 255; - else if (v < 0) - v = 0; - im->gmap[i] = (unsigned char)v; - } - g = ((double)im->bmod.gamma) / 256; - b = ((double)im->bmod.brightness) / 256; - c = ((double)im->bmod.contrast) / 256; - if (g < 0.01) - g = 0.01; - for (i = 0; i < 256; i++) - { - ii = ((double)im->bmap[i]) / 256; - v = ((ii - 0.5) * c) + 0.5 + (b - 1); - if (v > 0) - v = pow(((ii - 0.5) * c) + 0.5 + (b - 1), 1 / g) * 256; - else - v = 0; - if (v > 255) - v = 255; - else if (v < 0) - v = 0; - im->bmap[i] = (unsigned char)v; - } - gdirty_pixmaps(im); -} - -gint -gdk_imlib_load_file_to_pixmap(char *filename, GdkPixmap ** pmap, GdkBitmap ** mask) -{ - GdkImlibImage *im; - - im = gdk_imlib_load_image(filename); - if (!im) - { - if (pmap) - *pmap = NULL; - if (mask) - *mask = NULL; - return 0; - } - if (!gdk_imlib_render(im, im->rgb_width, im->rgb_height)) - { - gdk_imlib_destroy_image(im); - if (pmap) - *pmap = NULL; - if (mask) - *mask = NULL; - return 0; - } - if (pmap) - *pmap = gdk_imlib_move_image(im); - if (mask) - *mask = gdk_imlib_move_mask(im); - gdk_imlib_destroy_image(im); - return 1; -} - -void -gdk_imlib_set_image_modifier(GdkImlibImage * im, GdkImlibColorModifier * mod) -{ - if (!im || !mod) - return; - im->mod.gamma = mod->gamma; - im->mod.brightness = mod->brightness; - im->mod.contrast = mod->contrast; - gcalc_map_tables(im); -} - -void -gdk_imlib_set_image_red_modifier(GdkImlibImage * im, GdkImlibColorModifier * mod) -{ - if (!im || !mod) - return; - im->rmod.gamma = mod->gamma; - im->rmod.brightness = mod->brightness; - im->rmod.contrast = mod->contrast; - gcalc_map_tables(im); -} - -void -gdk_imlib_set_image_green_modifier(GdkImlibImage * im, GdkImlibColorModifier * mod) -{ - if (!im || !mod) - return; - im->gmod.gamma = mod->gamma; - im->gmod.brightness = mod->brightness; - im->gmod.contrast = mod->contrast; - gcalc_map_tables(im); -} - -void -gdk_imlib_set_image_blue_modifier(GdkImlibImage * im, GdkImlibColorModifier * mod) -{ - if (!im | !mod) - return; - im->bmod.gamma = mod->gamma; - im->bmod.brightness = mod->brightness; - im->bmod.contrast = mod->contrast; - gcalc_map_tables(im); -} - -void -gdk_imlib_get_image_modifier(GdkImlibImage * im, GdkImlibColorModifier * mod) -{ - if (!im || !mod) - return; - mod->gamma = im->mod.gamma; - mod->brightness = im->mod.brightness; - mod->contrast = im->mod.contrast; - gcalc_map_tables(im); -} - -void -gdk_imlib_get_image_red_modifier(GdkImlibImage * im, GdkImlibColorModifier * mod) -{ - if (!im || !mod) - return; - mod->gamma = im->rmod.gamma; - mod->brightness = im->rmod.brightness; - mod->contrast = im->rmod.contrast; -} - -void -gdk_imlib_get_image_green_modifier(GdkImlibImage * im, GdkImlibColorModifier * mod) -{ - if (!im || !mod) - return; - mod->gamma = im->gmod.gamma; - mod->brightness = im->gmod.brightness; - mod->contrast = im->gmod.contrast; -} - -void -gdk_imlib_get_image_blue_modifier(GdkImlibImage * im, GdkImlibColorModifier * mod) -{ - if (!im || !mod) - return; - mod->gamma = im->bmod.gamma; - mod->brightness = im->bmod.brightness; - mod->contrast = im->bmod.contrast; -} - -void -gdk_imlib_set_image_red_curve(GdkImlibImage * im, unsigned char *mod) -{ - int i; - - if (!im || !mod) - return; - for (i = 0; i < 256; i++) - im->rmap[i] = mod[i]; - gdirty_pixmaps(im); - im->mod.contrast = 257; -} - -void -gdk_imlib_set_image_green_curve(GdkImlibImage * im, unsigned char *mod) -{ - int i; - - if (!im || !mod) - return; - for (i = 0; i < 256; i++) - im->gmap[i] = mod[i]; - gdirty_pixmaps(im); - im->mod.contrast = 257; -} - -void -gdk_imlib_set_image_blue_curve(GdkImlibImage * im, unsigned char *mod) -{ - int i; - - if (!im || !mod) - return; - for (i = 0; i < 256; i++) - im->bmap[i] = mod[i]; - gdirty_pixmaps(im); - im->mod.contrast = 257; -} - -void -gdk_imlib_get_image_red_curve(GdkImlibImage * im, unsigned char *mod) -{ - int i; - - if ((!im) || (!mod)) - return; - for (i = 0; i < 256; i++) - mod[i] = im->rmap[i]; -} - -void -gdk_imlib_get_image_green_curve(GdkImlibImage * im, unsigned char *mod) -{ - int i; - - if (!im || !mod) - return; - for (i = 0; i < 256; i++) - mod[i] = im->gmap[i]; -} - -void -gdk_imlib_get_image_blue_curve(GdkImlibImage * im, unsigned char *mod) -{ - int i; - - if (!im || !mod) - return; - for (i = 0; i < 256; i++) - mod[i] = im->bmap[i]; -} - -void -gdk_imlib_apply_modifiers_to_rgb(GdkImlibImage * im) -{ - int x, y; - unsigned char *ptr; - - if (!im) - return; - ptr = im->rgb_data; - for (y = 0; y < im->rgb_height; y++) - { - for (x = 0; x < im->rgb_width; x++) - { - *ptr = im->rmap[*ptr]; - ptr++; - *ptr = im->gmap[*ptr]; - ptr++; - *ptr = im->bmap[*ptr]; - ptr++; - } - } - im->mod.gamma = 256; - im->mod.brightness = 256; - im->mod.contrast = 256; - im->rmod.gamma = 256; - im->rmod.brightness = 256; - im->rmod.contrast = 256; - im->gmod.gamma = 256; - im->gmod.brightness = 256; - im->gmod.contrast = 256; - im->bmod.gamma = 256; - im->bmod.brightness = 256; - im->bmod.contrast = 256; - gcalc_map_tables(im); - gdirty_images(im); - gdirty_pixmaps(im); -} - -void -gdk_imlib_crop_image(GdkImlibImage * im, gint x, gint y, gint w, gint h) -{ - unsigned char *data; - int xx, yy, w3, w4; - unsigned char *ptr1, *ptr2; - - if (!im) - return; - if (x < 0) - { - w += x; - x = 0; - } - if (y < 0) - { - h += y; - y = 0; - } - if (x >= im->rgb_width) - return; - if (y >= im->rgb_height) - return; - if (w <= 0) - return; - if (h <= 0) - return; - if (x + w > im->rgb_width) - w = im->rgb_width - x; - if (y + h > im->rgb_height) - h = im->rgb_height - y; - if (w <= 0) - return; - if (h <= 0) - return; - - w3 = im->rgb_width * 3; - w4 = (im->rgb_width - w) * 3; - data = malloc(w * h * 3); - if (data == NULL) - return; - ptr1 = im->rgb_data + (y * w3) + (x * 3); - ptr2 = data; - for (yy = 0; yy < h; yy++) - { - for (xx = 0; xx < w; xx++) - { - *ptr2++ = *ptr1++; - *ptr2++ = *ptr1++; - *ptr2++ = *ptr1++; - } - ptr1 += w4; - } - free(im->rgb_data); - im->rgb_data = data; - if (im->border.left > x) - im->border.left = im->border.left - x; - else - im->border.left = 0; - if (im->border.top > y) - im->border.top = im->border.top - y; - else - im->border.top = 0; - if (im->rgb_width - im->border.right < x + w) - im->border.right = im->border.right - (im->rgb_width - (x + w)); - else - im->border.right = 0; - if (im->rgb_height - im->border.bottom < y + h) - im->border.bottom = im->border.bottom - (im->rgb_height - (y + h)); - else - im->border.bottom = 0; - im->rgb_width = w; - im->rgb_height = h; - gdirty_images(im); - gdirty_pixmaps(im); -} - -void -gdk_imlib_changed_image(GdkImlibImage * im) -{ - if (!im) - return; - gdirty_images(im); - gdirty_pixmaps(im); -} - -void -gdk_imlib_apply_image(GdkImlibImage * im, GdkWindow * p) -{ - GdkPixmap *pp, *mm; - int w, h; - - if (!im || !p) - return; - gdk_window_get_size(p, &w, &h); - if (w <= 0 || h <= 0) - return; - gdk_imlib_render(im, w, h); - pp = gdk_imlib_move_image(im); - mm = gdk_imlib_move_mask(im); - gdk_window_set_back_pixmap(p, pp, 0); - if (mm) - gdk_window_shape_combine_mask(p, mm, 0, 0); - gdk_window_clear(p); - gdk_imlib_free_pixmap(pp); -} - -void -gdk_imlib_paste_image(GdkImlibImage * im, GdkWindow * p, gint x, gint y, gint w, gint h) -{ - GdkGC *gc; - GdkPixmap *pp, *mm; - - if (!im || !p) - return; - if ((w <= 0) || (h <= 0)) - return; - gc = gdk_gc_new(p); - gdk_imlib_render(im, w, h); - pp = gdk_imlib_move_image(im); - mm = gdk_imlib_move_mask(im); - if (mm) - { - gdk_gc_set_clip_mask(gc, mm); - gdk_gc_set_clip_origin(gc, x, y); - } - gdk_draw_pixmap(p, gc, pp, 0, 0, x, y, w, h); - gdk_imlib_free_pixmap(pp); - gdk_gc_destroy(gc); -} - -void -gdk_imlib_paste_image_border(GdkImlibImage * im, GdkWindow * p, gint x, gint y, gint w, gint h) -{ - GdkGC *gc; - GdkPixmap *pp, *mm; - - if (!im) - return; - - if (w <= 0 || h <= 0) - return; - gc = gdk_gc_new(p); - gdk_imlib_render(im, w, h); - pp = gdk_imlib_move_image(im); - mm = gdk_imlib_move_mask(im); - if (mm) - { - gdk_gc_set_clip_mask(gc, mm); - gdk_gc_set_clip_origin(gc, x, y); - } - if ((w <= (im->border.left + im->border.right)) || - (h <= (im->border.top + im->border.bottom))) - gdk_draw_pixmap(p, gc, pp, 0, 0, x, y, w, h); - else - { - gdk_draw_pixmap(p, gc, pp, 0, 0, x, y, w, im->border.top); - gdk_draw_pixmap(p, gc, pp, 0, h - im->border.bottom, - x, y + (h - im->border.bottom), - w, im->border.bottom); - gdk_draw_pixmap(p, gc, pp, 0, im->border.top, - x, y + im->border.top, - im->border.left, h - (im->border.top + im->border.bottom)); - gdk_draw_pixmap(p, gc, pp, w - im->border.right, h - im->border.bottom, - x + (w - im->border.right), y + (h - im->border.bottom), - im->border.right, h - (im->border.top + im->border.bottom)); - } - gdk_imlib_free_pixmap(pp); - gdk_gc_destroy(gc); -} - -void -gdk_imlib_flip_image_horizontal(GdkImlibImage * im) -{ - unsigned char *ptr1, *ptr2, r, rr; - int x, y; - int w3; - - if (!im) - return; - w3 = im->rgb_width * 3; - for (y = 0; y < im->rgb_height; y++) - { - ptr1 = im->rgb_data + (y * w3); - ptr2 = im->rgb_data + (y * w3) + w3 - 3; - for (x = 0; x < im->rgb_width >> 1; x++) - { - r = *ptr1; - rr = *ptr2; - *ptr2++ = r; - *ptr1++ = rr; - - r = *ptr1; - rr = *ptr2; - *ptr2++ = r; - *ptr1++ = rr; - - r = *ptr1; - rr = *ptr2; - *ptr2 = r; - *ptr1++ = rr; - - ptr2 -= 5; - } - } - w3 = im->border.left; - im->border.left = im->border.right; - im->border.right = w3; - gdirty_images(im); - gdirty_pixmaps(im); -} - -void -gdk_imlib_flip_image_vertical(GdkImlibImage * im) -{ - unsigned char *ptr1, *ptr2, r, rr; - int x, y, yy; - int w3; - - if (!im) - return; - - w3 = im->rgb_width * 3; - for (yy = im->rgb_height - 1, y = 0; y < im->rgb_height >> 1; y++, yy--) - { - ptr1 = im->rgb_data + (y * w3); - ptr2 = im->rgb_data + (yy * w3); - for (x = 0; x < im->rgb_width; x++) - { - r = *ptr1; - rr = *ptr2; - *ptr2++ = r; - *ptr1++ = rr; - r = *ptr1; - rr = *ptr2; - *ptr2++ = r; - *ptr1++ = rr; - r = *ptr1; - rr = *ptr2; - *ptr2++ = r; - *ptr1++ = rr; - } - } - w3 = im->border.top; - im->border.top = im->border.bottom; - im->border.bottom = w3; - gdirty_images(im); - gdirty_pixmaps(im); -} - -void -gdk_imlib_rotate_image(GdkImlibImage * im, gint d) -{ - unsigned char *data; - int x, y, w3, w4; - unsigned char *ptr1, *ptr2; - - if (!im) - return; - w3 = im->rgb_width * 3; - w4 = im->rgb_height * 3; - - data = malloc(im->rgb_width * im->rgb_height * 3); - if (data == NULL) - return; - - for (y = 0; y < im->rgb_height; y++) - { - ptr1 = im->rgb_data + (y * w3); - ptr2 = data + (y * 3); - for (x = 0; x < im->rgb_width; x++) - { - *ptr2++ = *ptr1++; - *ptr2++ = *ptr1++; - *ptr2 = *ptr1++; - ptr2 += w4 - 2; - } - } - free(im->rgb_data); - im->rgb_data = data; - w3 = im->rgb_width; - im->rgb_width = im->rgb_height; - im->rgb_height = w3; - w3 = im->border.top; - im->border.top = im->border.left; - im->border.left = w3; - w3 = im->border.bottom; - im->border.bottom = im->border.right; - im->border.right = w3; - gdirty_images(im); - gdirty_pixmaps(im); -} - -GdkImlibImage * -gdk_imlib_create_image_from_data(unsigned char *data, unsigned char *alpha, gint w, gint h) -{ - GdkImlibImage *im; - char s[128]; - - if (!data || w <= 0 || h <= 0) - return NULL; - - im = malloc(sizeof(GdkImlibImage)); - if (!im) - return NULL; - - im->rgb_width = w; - im->rgb_height = h; - im->rgb_data = malloc(im->rgb_width * im->rgb_height * 3); - if (!im->rgb_data) - { - free(im); - return NULL; - } - - memcpy(im->rgb_data, data, im->rgb_width * im->rgb_height * 3); -/* im->alpha_data=alpha; */ - im->alpha_data = NULL; - g_snprintf(s, sizeof(s), "creat_%x_%x", (int)time(NULL), (int)rand()); - im->filename = malloc(strlen(s) + 1); - if (im->filename) - strcpy(im->filename, s); - im->width = 0; - im->height = 0; - im->shape_color.r = -1; - im->shape_color.g = -1; - im->shape_color.b = -1; - im->border.left = 0; - im->border.right = 0; - im->border.top = 0; - im->border.bottom = 0; - im->pixmap = NULL; - im->shape_mask = NULL; - im->cache = 1; - im->mod.gamma = id->mod.gamma; - im->mod.brightness = id->mod.brightness; - im->mod.contrast = id->mod.contrast; - im->rmod.gamma = id->rmod.gamma; - im->rmod.brightness = id->rmod.brightness; - im->rmod.contrast = id->rmod.contrast; - im->gmod.gamma = id->gmod.gamma; - im->gmod.brightness = id->gmod.brightness; - im->gmod.contrast = id->gmod.contrast; - im->bmod.gamma = id->bmod.gamma; - im->bmod.brightness = id->bmod.brightness; - im->bmod.contrast = id->bmod.contrast; - if (id->cache.on_image) - gadd_image(im, im->filename); - gcalc_map_tables(im); - return im; -} - -GdkImlibImage * -gdk_imlib_clone_image(GdkImlibImage * im) -{ - GdkImlibImage *im2; - char *s; - - if (!im) - return NULL; - im2 = malloc(sizeof(GdkImlibImage)); - if (!im2) - return NULL; - im2->rgb_width = im->rgb_width; - im2->rgb_height = im->rgb_height; - im2->rgb_data = malloc(im2->rgb_width * im2->rgb_height * 3); - if (!im2->rgb_data) - { - free(im2); - return NULL; - } - - memcpy(im2->rgb_data, im->rgb_data, im2->rgb_width * im2->rgb_height * 3); - if (im->alpha_data) - { - im2->alpha_data = malloc(im2->rgb_width * im2->rgb_height); - if (!im2->alpha_data) - { - free(im2->rgb_data); - free(im2); - return NULL; - } - memcpy(im2->alpha_data, im->alpha_data, im2->rgb_width * im2->rgb_height); - } - else - im2->alpha_data = NULL; - s = malloc(strlen(im->filename) + 320); - if (s) - { - g_snprintf(s, sizeof(s), "%s_%x_%x", im->filename, (int)time(NULL), (int)rand()); - im2->filename = malloc(strlen(s) + 1); - if (im2->filename) - strcpy(im2->filename, s); - free(s); - } - else - im2->filename = NULL; - im2->width = 0; - im2->height = 0; - im2->shape_color.r = im->shape_color.r; - im2->shape_color.g = im->shape_color.g; - im2->shape_color.b = im->shape_color.b; - im2->border.left = im->border.left; - im2->border.right = im->border.right; - im2->border.top = im->border.top; - im2->border.bottom = im->border.bottom; - im2->pixmap = NULL; - im2->shape_mask = NULL; - im2->cache = 1; - im2->mod.gamma = im->mod.gamma; - im2->mod.brightness = im->mod.brightness; - im2->mod.contrast = im->mod.contrast; - im2->rmod.gamma = im->rmod.gamma; - im2->rmod.brightness = im->rmod.brightness; - im2->rmod.contrast = im->rmod.contrast; - im2->gmod.gamma = im->gmod.gamma; - im2->gmod.brightness = im->gmod.brightness; - im2->gmod.contrast = im->gmod.contrast; - im2->bmod.gamma = im->bmod.gamma; - im2->bmod.brightness = im->bmod.brightness; - im2->bmod.contrast = im->bmod.contrast; - gcalc_map_tables(im2); - if (id->cache.on_image) - gadd_image(im2, im2->filename); - return im2; -} - -GdkImlibImage * -gdk_imlib_clone_scaled_image(GdkImlibImage * im, int w, int h) -{ - GdkImlibImage *im2; - char *s; - - if (!im || w <= 0 || h <= 0) - return NULL; - - im2 = malloc(sizeof(GdkImlibImage)); - if (!im2) - return NULL; - im2->rgb_width = w; - im2->rgb_height = h; - im2->rgb_data = malloc(w * h * 3); - if (!im2->rgb_data) - { - free(im2); - return NULL; - } - { - int x, y, *xarray; - unsigned char **yarray, *ptr, *ptr2, *ptr22; - int l, r, m, pos, inc, w3; - - xarray = malloc(sizeof(int) * w); - - if (!xarray) - { - fprintf(stderr, "ERROR: Cannot allocate X co-ord buffer\n"); - free(im2->rgb_data); - free(im2); - return NULL; - } - yarray = malloc(sizeof(unsigned char *) * h); - - if (!yarray) - { - fprintf(stderr, "ERROR: Cannot allocate Y co-ord buffer\n"); - free(xarray); - free(im2->rgb_data); - free(im2); - return NULL; - } - ptr22 = im->rgb_data; - w3 = im->rgb_width * 3; - inc = 0; - if (w < im->border.left + im->border.right) - { - l = w >> 1; - r = w - l; - m = 0; - } - else - { - l = im->border.left; - r = im->border.right; - m = w - l - r; - } - if (m > 0) - inc = ((im->rgb_width - im->border.left - im->border.right) << 16) / m; - pos = 0; - if (l) - { - for (x = 0; x < l; x++) - { - xarray[x] = (pos >> 16) + (pos >> 16) + (pos >> 16); - pos += 0x10000; - } - } - if (m) - { - for (x = l; x < l + m; x++) - { - xarray[x] = (pos >> 16) + (pos >> 16) + (pos >> 16); - pos += inc; - } - } - pos = (im->rgb_width - r) << 16; - for (x = w - r; x < w; x++) - { - xarray[x] = (pos >> 16) + (pos >> 16) + (pos >> 16); - pos += 0x10000; - } - - if (h < im->border.top + im->border.bottom) - { - l = h >> 1; - r = h - l; - m = 0; - } - else - { - l = im->border.top; - r = im->border.bottom; - m = h - l - r; - } - if (m > 0) - inc = ((im->rgb_height - im->border.top - im->border.bottom) << 16) / m; - pos = 0; - for (x = 0; x < l; x++) - { - yarray[x] = ptr22 + ((pos >> 16) * w3); - pos += 0x10000; - } - if (m) - { - for (x = l; x < l + m; x++) - { - yarray[x] = ptr22 + ((pos >> 16) * w3); - pos += inc; - } - } - pos = (im->rgb_height - r) << 16; - for (x = h - r; x < h; x++) - { - yarray[x] = ptr22 + ((pos >> 16) * w3); - pos += 0x10000; - } - - ptr = im2->rgb_data; - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - ptr2 = yarray[y] + xarray[x]; - *ptr++ = (int)*ptr2++; - *ptr++ = (int)*ptr2++; - *ptr++ = (int)*ptr2; - } - } - } - if (im->alpha_data) - { - im2->alpha_data = NULL; - /* yet to be filled in */ - } - else - im2->alpha_data = NULL; - - s = malloc(strlen(im->filename) + 320); - if (s) - { - g_snprintf(s, sizeof(s), "%s_%x_%x_%x_%x", im->filename, (int)time(NULL), w, h, (int)rand()); - im2->filename = malloc(strlen(s) + 1); - if (im2->filename) - strcpy(im2->filename, s); - free(s); - } - else - im2->filename = NULL; - im2->width = 0; - im2->height = 0; - im2->shape_color.r = im->shape_color.r; - im2->shape_color.g = im->shape_color.g; - im2->shape_color.b = im->shape_color.b; - im2->border.left = im->border.left; - im2->border.right = im->border.right; - im2->border.top = im->border.top; - im2->border.bottom = im->border.bottom; - im2->pixmap = NULL; - im2->shape_mask = NULL; - im2->cache = 1; - im2->mod.gamma = im->mod.gamma; - im2->mod.brightness = im->mod.brightness; - im2->mod.contrast = im->mod.contrast; - im2->rmod.gamma = im->rmod.gamma; - im2->rmod.brightness = im->rmod.brightness; - im2->rmod.contrast = im->rmod.contrast; - im2->gmod.gamma = im->gmod.gamma; - im2->gmod.brightness = im->gmod.brightness; - im2->gmod.contrast = im->gmod.contrast; - im2->bmod.gamma = im->bmod.gamma; - im2->bmod.brightness = im->bmod.brightness; - im2->bmod.contrast = im->bmod.contrast; - gcalc_map_tables(im2); - if (id->cache.on_image) - gadd_image(im2, im2->filename); - return im2; -} - -GdkImlibImage * -gdk_imlib_create_image_from_xpm_data(char **data) -{ - GdkImlibImage *im; - unsigned char *ptr; - int /* pc, */ c, i, j, k, ncolors, cpp, comment, transp, quote, - context, len, count, done; - int w, h; - char *line, s[65536], tok[65536], col[65536]; - XColor xcol; - struct _cmap - { - char str[8]; - char transp; - int r, g, b; - } - *cmap; - - int lookup[128][128]; - - cmap = NULL; - j = 0; - if (!data) - return NULL; - im = malloc(sizeof(GdkImlibImage)); - if (!im) - return NULL; - count = 0; - transp = 0; - done = 0; - - c = ' '; - comment = 0; - quote = 0; - context = 0; - ptr = NULL; - - while (!done) - { - line = data[count++]; - if (context == 0) - { - /* Header */ - sscanf(line, "%i %i %i %i", &w, &h, &ncolors, &cpp); - if (cpp > 7) - { - fprintf(stderr, "gdk_imlib ERROR: XPM data with characters per pixel > 7 not supported\n"); - free(im); - return NULL; - } - if (w > 32767) - { - fprintf(stderr, "gdk_imlib ERROR: Image width > 32767 pixels for data\n"); - free(im); - return NULL; - } - if (h > 32767) - { - fprintf(stderr, "gdk_imlib ERROR: Image height > 32767 pixels for data\n"); - free(im); - return NULL; - } - cmap = malloc(sizeof(struct _cmap) * ncolors); - - if (!cmap) - { - free(im); - return NULL; - } - im->rgb_width = w; - im->rgb_height = h; - im->rgb_data = malloc(im->rgb_width * im->rgb_height * 3); - if (!im->rgb_data) - { - free(cmap); - free(im); - return NULL; - } - im->alpha_data = NULL; - g_snprintf(s, sizeof(s), "creat_%x_%x", (int)time(NULL), (int)rand()); - im->filename = malloc(strlen(s) + 1); - if (im->filename) - strcpy(im->filename, s); - im->width = 0; - im->height = 0; - im->border.left = 0; - im->border.right = 0; - im->border.top = 0; - im->border.bottom = 0; - im->pixmap = NULL; - im->shape_mask = NULL; - im->cache = 1; - im->mod.gamma = id->mod.gamma; - im->mod.brightness = id->mod.brightness; - im->mod.contrast = id->mod.contrast; - im->rmod.gamma = id->rmod.gamma; - im->rmod.brightness = id->rmod.brightness; - im->rmod.contrast = id->rmod.contrast; - im->gmod.gamma = id->gmod.gamma; - im->gmod.brightness = id->gmod.brightness; - im->gmod.contrast = id->gmod.contrast; - im->bmod.gamma = id->bmod.gamma; - im->bmod.brightness = id->bmod.brightness; - im->bmod.contrast = id->bmod.contrast; - ptr = im->rgb_data; - j = 0; - context++; - } - else if (context == 1) - { - int colptr; - - /* Color Table */ - if (j < ncolors) - { - tok[0] = 0; - col[0] = 0; - s[0] = 0; - colptr = 0; - len = strlen(line); - strncpy(cmap[j].str, line, cpp); - cmap[j].str[cpp] = 0; - cmap[j].r = -1; - cmap[j].transp = 0; - for (k = cpp; k < len; k++) - { - if (line[k] != ' ') - { - sscanf(&line[k], "%65536s", s); - k += strlen(s); - if ((!strcmp(s, "m")) || (!strcmp(s, "s")) || - (!strcmp(s, "g4")) || (!strcmp(s, "g")) || - (!strcmp(s, "c")) || (k >= len)) - { - if (k >= len) - { - int ls; - - ls = strlen(s); - - if (col[0] && colptr < sizeof(col)) - { - strcpy(col + colptr, " "); - colptr++; - } - if (colptr + ls <= sizeof(col)) - { - strcpy(col + colptr, s); - colptr += ls; - } - - } - if (col[0]) - { - if (!strcasecmp(col, "none")) - { - transp = 1; - cmap[j].transp = 1; - } - else - { - if ((cmap[j].r < 0) || - (!strcmp(tok, "c"))) - { - XParseColor(id->x.disp, - id->x.root_cmap, - col, &xcol); - cmap[j].r = xcol.red >> 8; - cmap[j].g = xcol.green >> 8; - cmap[j].b = xcol.blue >> 8; - if ((cmap[j].r == 255) && - (cmap[j].g == 0) && - (cmap[j].b == 255)) - cmap[j].r = 254; - } - } - } - if (strlen(s) < sizeof(tok)) - strcpy(tok, s); - col[0] = 0; - } - else - { - int ls; - - ls = strlen(s); - - if (col[0] && colptr < sizeof(col)) - { - strcpy(col + colptr, " "); - colptr++; - } - if (ls + colptr < sizeof(col)) - { - strcpy(col + colptr, s); - colptr += ls; - } - } - } - } - } - j++; - if (j >= ncolors) - { - if (cpp == 1) - for (i = 0; i < ncolors; i++) - lookup[(int)cmap[i].str[0]][(int)cmap[i].str[1]] = i; - if (cpp == 2) - for (i = 0; i < ncolors; i++) - lookup[(int)cmap[i].str[0]][(int)cmap[i].str[1]] = i; - context++; - } - } - else - { - /* Image Data */ - i = 0; - if (cpp == 0) - { - } - else if (cpp == 1) - { - if (transp) - { - for (i = 0; ((i < 65536) && (line[i])); i++) - { - col[0] = line[i]; - if (cmap[lookup[(int)col[0]][0]].transp) - { - *ptr++ = 255; - *ptr++ = 0; - *ptr++ = 255; - } - else - { - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].r; - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].g; - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].b; - } - } - } - else - { - for (i = 0; ((i < 65536) && (line[i])); i++) - { - col[0] = line[i]; - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].r; - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].g; - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].b; - } - } - } - else if (cpp == 2) - { - if (transp) - { - for (i = 0; ((i < 65536) && (line[i])); i++) - { - col[0] = line[i++]; - col[1] = line[i]; - if (cmap[lookup[(int)col[0]][(int)col[1]]].transp) - { - *ptr++ = 255; - *ptr++ = 0; - *ptr++ = 255; - } - else - { - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].r; - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].g; - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].b; - } - } - } - else - { - for (i = 0; ((i < 65536) && (line[i])); i++) - { - col[0] = line[i++]; - col[1] = line[i]; - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].r; - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].g; - *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].b; - } - } - } - else - { - if (transp) - { - for (i = 0; ((i < 65536) && (line[i])); i++) - { - for (j = 0; j < cpp; j++, i++) - { - col[j] = line[i]; - } - col[j] = 0; - i--; - for (j = 0; j < ncolors; j++) - { - if (!strcmp(col, cmap[j].str)) - { - if (cmap[j].transp) - { - *ptr++ = 255; - *ptr++ = 0; - *ptr++ = 255; - } - else - { - *ptr++ = (unsigned char)cmap[j].r; - *ptr++ = (unsigned char)cmap[j].g; - *ptr++ = (unsigned char)cmap[j].b; - } - j = ncolors; - } - } - } - } - else - { - for (i = 0; ((i < 65536) && (line[i])); i++) - { - for (j = 0; j < cpp; j++, i++) - { - col[j] = line[i]; - } - col[j] = 0; - i--; - for (j = 0; j < ncolors; j++) - { - if (!strcmp(col, cmap[j].str)) - { - *ptr++ = (unsigned char)cmap[j].r; - *ptr++ = (unsigned char)cmap[j].g; - *ptr++ = (unsigned char)cmap[j].b; - j = ncolors; - } - } - } - } - } - } - if ((ptr) && ((ptr - im->rgb_data) >= w * h * 3)) - done = 1; - } - if (!transp) - { - im->shape_color.r = -1; - im->shape_color.g = -1; - im->shape_color.b = -1; - } - else - { - im->shape_color.r = 255; - im->shape_color.g = 0; - im->shape_color.b = 255; - } - if (id->cache.on_image) - gadd_image(im, im->filename); - gcalc_map_tables(im); - free(cmap); - return im; -} - -gint -gdk_imlib_data_to_pixmap(char **data, GdkPixmap ** pmap, GdkBitmap ** mask) -{ - GdkImlibImage *im; - - im = gdk_imlib_create_image_from_xpm_data(data); - if (!im) - { - if (pmap) - *pmap = NULL; - if (mask) - *mask = NULL; - return 0; - } - if (!gdk_imlib_render(im, im->rgb_width, im->rgb_height)) - { - gdk_imlib_destroy_image(im); - if (pmap) - *pmap = NULL; - if (mask) - *mask = NULL; - return 0; - } - if (pmap) - *pmap = gdk_imlib_move_image(im); - if (mask) - *mask = gdk_imlib_move_mask(im); - gdk_imlib_kill_image(im); - return 1; -} - -#include -#include - -/* - * Helper library - */ - -static int hpid; -void *oldpiper; /* actually sighandler_t but BSD uses sig_t. */ - -FILE * -open_helper(const char *instring, const char *fn, const char *mode) -{ - char buf[256]; /* This is safe since our input strings - - * - * * are bounded */ - static char *vec[16]; - char *p = strdup(instring); - char *pp; - char *ep; - int vn = 0; - int pid; - FILE *fp = NULL; - char *ofil = NULL; - int ofd = -1; - - int pfd[2]; - - if (p == NULL) - return NULL; - - if (strncmp(instring, "%Q", 2) == 0) - { - /* - * Generate a quanting pipeline - */ - fprintf(stderr, "Not currently supported: install ImageMagic.\n"); - return NULL; - } - /* - * Ok split the instring on spaces and translate - * %C %P %F and %s - * - * FIXME: We need to handle a format string that begins - * %Q to indicate an 8bit quant in the pipeline first. - */ - - pp = p; - - while (vn < 15) - { - while (*pp && isspace(*pp)) - pp++; - ep = pp; - while (*ep && !isspace(*ep)) - ep++; - if (*pp == 0) - break; - /* pp->ep is now the input string block */ - if (*ep) - *ep++ = 0; - - if (strcmp(pp, "%s") == 0) - vec[vn] = strdup(fn); - else if (strncmp(pp, "%P/", 3) == 0) - { - strcpy(buf, NETPBM_PATH); - strcat(buf, pp + 2); - if ((vec[vn] = strdup(buf)) == NULL) - break; - } - else if (strncmp(pp, "%J", 3) == 0) - { - if ((vec[vn] = strdup(DJPEG_PROG)) == NULL) - break; - } - else if (strncmp(pp, "%H", 3) == 0) - { - if ((vec[vn] = strdup(CJPEG_PROG)) == NULL) - break; - } - else if (strncmp(pp, "%C/", 3) == 0) - { - strcpy(buf, CONVERT_PATH); - strcat(buf, pp + 2); - if ((vec[vn] = strdup(buf)) == NULL) - break; - } - else if (strncmp(pp, ">%s", 3) == 0) - { - ofil = pp; - vn++; - pp = ep; - continue; - } - else - { - if ((vec[vn] = strdup(pp)) == NULL) - break; - } - vn++; - pp = ep; - } - - vec[vn] = NULL; - - if (pipe(pfd) == -1) - goto oops; - - if (*mode == 'r') - { - fp = fdopen(pfd[0], "r"); - if (fp == NULL) - goto oops; - } - else if (*mode == 'w') - { - fp = fdopen(pfd[1], "w"); - if (fp == NULL) - goto oops; - } - else - goto oops; - - if (ofil != NULL) - if ((ofd = open(ofil, O_WRONLY | O_TRUNC | O_CREAT)) == -1) - goto oops; - - switch (pid = fork()) - { - case -1: - break; - case 0: - signal(SIGPIPE, SIG_DFL); - if (*mode == 'r') - dup2(pfd[1], 1); - if (*mode == 'w') - { - dup2(pfd[0], 0); - if (ofd != -1) - { - dup2(ofd, 1); - close(1); - } - } - close(pfd[0]); - close(pfd[1]); - execv(vec[0], vec); - perror(vec[0]); - /* - * This MUST be _exit or we will hit the SIGPIPE - * handler in ways we dont want. We want our parent - * to flush the inherited file buffers not us. - */ - _exit(1); - default: - hpid = pid; - - if (ofd != -1) - close(ofd); - if (*mode == 'r') - close(pfd[1]); - else - close(pfd[0]); - } - for (vn = 0; vn < 16; vn++) - if (vec[vn]) - free(vec[vn]); - oldpiper = signal(SIGPIPE, SIG_IGN); - return fp; - - oops: - if (ofd != -1) - close(ofd); - if (fp) - fclose(fp); - for (vn = 0; vn < 16; vn++) - if (vec[vn]) - free(vec[vn]); - return NULL; -} - -int -close_helper(FILE * fp) -{ - int info; - - fclose(fp); - signal(SIGPIPE, oldpiper); - waitpid(hpid, &info, 0); - return WEXITSTATUS(info); -} diff --git a/src/generic/choicdgg.cpp b/src/generic/choicdgg.cpp deleted file mode 100644 index ee1280ca39..0000000000 --- a/src/generic/choicdgg.cpp +++ /dev/null @@ -1,329 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: choicesg.cpp -// Purpose: Choice dialogs -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "choicdgg.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/utils.h" -#include "wx/dialog.h" -#include "wx/listbox.h" -#include "wx/button.h" -#include "wx/stattext.h" -#include "wx/layout.h" -#include "wx/intl.h" -#endif - -#include "wx/generic/choicdgg.h" - -extern void wxSplitMessage2(const char *message, wxList *messageList, wxWindow *parent, wxRowColSizer *sizer); - -wxString wxGetSingleChoice( const wxString& message, const wxString& caption, int n, - const wxString *choices, wxWindow *parent, - int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(centre), - int WXUNUSED(width), int WXUNUSED(height) ) -{ - wxSingleChoiceDialog dialog(parent, message, caption, n, choices); - if ( dialog.ShowModal() == wxID_OK ) - { - return dialog.GetStringSelection(); - } - else - return ""; -} - -// Overloaded for backward compatibility -wxString wxGetSingleChoice( const wxString& message, const wxString& caption, int n, - char *choices[], wxWindow *parent, - int x, int y, bool centre, - int width, int height ) -{ - wxString *strings = new wxString[n]; - int i; - for ( i = 0; i < n; i++) - { - strings[i] = choices[i]; - } - wxString ans(wxGetSingleChoice(message, caption, n, (const wxString *)strings, parent, - x, y, centre, width, height)); - delete[] strings; - return ans; -} - -int wxGetSingleChoiceIndex( const wxString& message, const wxString& caption, int n, - const wxString *choices, wxWindow *parent, - int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(centre), - int WXUNUSED(width), int WXUNUSED(height) ) -{ - wxSingleChoiceDialog dialog(parent, message, caption, n, choices); - if ( dialog.ShowModal() == wxID_OK ) - { - return dialog.GetSelection(); - } - else - return -1; -} - -// Overloaded for backward compatibility -int wxGetSingleChoiceIndex( const wxString& message, const wxString& caption, int n, - char *choices[], wxWindow *parent, - int x, int y, bool centre, - int width, int height ) -{ - wxString *strings = new wxString[n]; - int i; - for ( i = 0; i < n; i++) - { - strings[i] = choices[i]; - } - int ans = wxGetSingleChoiceIndex(message, caption, n, (const wxString *)strings, parent, - x, y, centre, width, height); - delete[] strings; - return ans; -} - -char *wxGetSingleChoiceData( const wxString& message, const wxString& caption, int n, - const wxString *choices, char **client_data, wxWindow *parent, - int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(centre), - int WXUNUSED(width), int WXUNUSED(height) ) -{ - wxSingleChoiceDialog dialog(parent, message, caption, n, choices, client_data); - if ( dialog.ShowModal() == wxID_OK ) - { - return dialog.GetSelectionClientData(); - } - else - return NULL; -} - -// Overloaded for backward compatibility -char *wxGetSingleChoiceData( const wxString& message, const wxString& caption, int n, - char *choices[], char **client_data, wxWindow *parent, - int x, int y, bool centre, - int width, int height ) -{ - wxString *strings = new wxString[n]; - int i; - for ( i = 0; i < n; i++) - { - strings[i] = choices[i]; - } - char *data = wxGetSingleChoiceData(message, caption, n, (const wxString *)strings, client_data, parent, - x, y, centre, width, height); - delete[] strings; - return data; -} - - -/* Multiple choice dialog contributed by Robert Cowell - * - -The new data passed are in the "int nsel" and "int * selection" - -The idea is to make a multiple selection from list of strings. -The returned value is the total number selected. initialily there -are nsel selected, with indices stored in -selection[0],...,selection[nsel-1] which appear highlighted to -begin with. On exit with value i -selection[0..i-1] contains the indices of the selected items. -(Some prior selectecions might be deselected.) -Thus selection must be as big as choices, in case all items are -selected. - -*/ -/* -int wxGetMultipleChoice(const wxString& message, const wxString& caption, - int n, const wxString *choices, - int nsel, int * selection, - wxWindow *parent , int x , int y, bool centre, - int width, int height) -{ - return -1; -} -*/ - -// wxSingleChoiceDialog - -#if !USE_SHARED_LIBRARY -BEGIN_EVENT_TABLE(wxSingleChoiceDialog, wxDialog) - EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK) - EVT_LISTBOX_DCLICK(wxID_LISTBOX, wxSingleChoiceDialog::OnListBoxDClick) -END_EVENT_TABLE() - -IMPLEMENT_CLASS(wxSingleChoiceDialog, wxDialog) -#endif - -wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, - int n, const wxString *choices, char **clientData, long style, const wxPoint& pos): - wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL) -{ - Create(parent, message, caption, n, choices, clientData, style); -} - -wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, - const wxStringList& choices, char **clientData, long style, const wxPoint& pos): - wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL) -{ - Create(parent, message, caption, choices, clientData, style); -} - -bool wxSingleChoiceDialog::Create(wxWindow *parent, const wxString& message, const wxString& caption, - const wxStringList& choices, char **clientData, long style, const wxPoint& pos) -{ - wxString *strings = new wxString[choices.Number()]; - int i; - for ( i = 0; i < choices.Number(); i++) - { - strings[i] = (char *)choices.Nth(i)->Data(); - } - bool ans = Create(parent, message, caption, choices.Number(), strings, clientData, style, pos); - delete[] strings; - return ans; -} - -bool wxSingleChoiceDialog::Create( wxWindow *WXUNUSED(parent), const wxString& message, - const wxString& WXUNUSED(caption), int n, - const wxString *choices, char **clientData, long style, - const wxPoint& WXUNUSED(pos) ) -{ - m_dialogStyle = style; - m_selection = 0; - m_stringSelection = ""; - m_clientData = NULL; - - wxBeginBusyCursor(); - - wxSizer *topSizer = new wxSizer(this, wxSizerShrink); - topSizer->SetBorder(10, 10); - - wxRowColSizer *messageSizer = new wxRowColSizer(topSizer, wxSIZER_COLS, 100); - messageSizer->SetName("messageSizer"); - -// bool centre = ((style & wxCENTRE) == wxCENTRE); - - wxList messageList; - wxSplitMessage2(message, &messageList, this, messageSizer); - - // Insert a spacer - wxSpacingSizer *spacingSizer = new wxSpacingSizer(topSizer, wxBelow, messageSizer, 10); - - wxListBox *listBox = new wxListBox(this, wxID_LISTBOX, wxPoint(-1, -1), wxSize(240, 160), - n, choices); - listBox->SetSelection(m_selection); - if ( clientData ) - { - int i; - for ( i = 0; i < n; i++) - { - listBox->SetClientData(i, clientData[i]); - } - } - - wxRowColSizer *listBoxSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS); - listBoxSizer->AddSizerChild(listBox); - listBoxSizer->SetName("listBoxSizer"); - - // Create constraints for the text sizer - wxLayoutConstraints *textC = new wxLayoutConstraints; - textC->left.SameAs (messageSizer, wxLeft); - textC->top.Below (spacingSizer); - listBoxSizer->SetConstraints(textC); - - // Insert another spacer - wxSpacingSizer *spacingSizer2 = new wxSpacingSizer(topSizer, wxBelow, listBoxSizer, 10); - spacingSizer->SetName("spacingSizer2"); - - // Insert a sizer for the buttons - wxRowColSizer *buttonSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS); - buttonSizer->SetName("buttonSizer"); - - // Specify constraints for the button sizer - wxLayoutConstraints *c = new wxLayoutConstraints; - c->width.AsIs (); - c->height.AsIs (); - c->top.Below (spacingSizer2); - c->centreX.SameAs (listBoxSizer, wxCentreX); - buttonSizer->SetConstraints(c); - - wxButton *ok = NULL; - wxButton *cancel = NULL; - - if (style & wxOK) { - ok = new wxButton(this, wxID_OK, _("OK")); - buttonSizer->AddSizerChild(ok); - } - - if (style & wxCANCEL) { - cancel = new wxButton(this, wxID_CANCEL, _("Cancel")); - buttonSizer->AddSizerChild(cancel); - } - - if (ok) - { - ok->SetDefault(); - ok->SetFocus(); - } - - Layout(); - Centre(wxBOTH); - - wxEndBusyCursor(); - - return TRUE; -} - -// Set the selection -void wxSingleChoiceDialog::SetSelection(int sel) -{ - wxListBox *listBox = (wxListBox *)FindWindow(wxID_LISTBOX); - if (listBox) - { - listBox->SetSelection(sel); - } - m_selection = sel; -} - -void wxSingleChoiceDialog::OnOK(wxCommandEvent& WXUNUSED(event)) -{ - wxListBox *listBox = (wxListBox *)FindWindow(wxID_LISTBOX); - if ( listBox ) - { - m_selection = listBox->GetSelection(); - m_stringSelection = listBox->GetStringSelection(); - m_clientData = listBox->GetClientData(m_selection); - } - - EndModal(wxID_OK); -} - -void wxSingleChoiceDialog::OnListBoxDClick(wxCommandEvent& WXUNUSED(event)) -{ - wxListBox *listBox = (wxListBox *)FindWindow(wxID_LISTBOX); - if ( listBox ) - { - m_selection = listBox->GetSelection(); - m_stringSelection = listBox->GetStringSelection(); - m_clientData = listBox->GetClientData(m_selection); - } - - EndModal(wxID_OK); -} - - diff --git a/src/generic/colrdlgg.cpp b/src/generic/colrdlgg.cpp deleted file mode 100644 index 4e011463ab..0000000000 --- a/src/generic/colrdlgg.cpp +++ /dev/null @@ -1,487 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: colrdlgg.cpp -// Purpose: Choice dialogs -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "colrdlgg.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include -#include "wx/utils.h" -#include "wx/intl.h" -#include "wx/dialog.h" -#include "wx/listbox.h" -#include "wx/button.h" -#include "wx/stattext.h" -#include "wx/layout.h" -#include "wx/dcclient.h" -#include "wx/slider.h" -#endif - -#include "wx/generic/colrdlgg.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxGenericColourDialog, wxDialog) - -BEGIN_EVENT_TABLE(wxGenericColourDialog, wxDialog) - EVT_BUTTON(wxID_ADD_CUSTOM, wxGenericColourDialog::OnAddCustom) - EVT_SLIDER(wxID_RED_SLIDER, wxGenericColourDialog::OnRedSlider) - EVT_SLIDER(wxID_GREEN_SLIDER, wxGenericColourDialog::OnGreenSlider) - EVT_SLIDER(wxID_BLUE_SLIDER, wxGenericColourDialog::OnBlueSlider) - EVT_PAINT(wxGenericColourDialog::OnPaint) - EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent) -END_EVENT_TABLE() - -#endif - -/* - * Generic wxColourDialog - */ - -#define NUM_COLS 48 -static wxString wxColourDialogNames[NUM_COLS]={"ORANGE", - "GOLDENROD", - "WHEAT", - "SPRING GREEN", - "SKY BLUE", - "SLATE BLUE", - "MEDIUM VIOLET RED", - "PURPLE", - - "RED", - "YELLOW", - "MEDIUM SPRING GREEN", - "PALE GREEN", - "CYAN", - "LIGHT STEEL BLUE", - "ORCHID", - "LIGHT MAGENTA", - - "BROWN", - "YELLOW", - "GREEN", - "CADET BLUE", - "MEDIUM BLUE", - "MAGENTA", - "MAROON", - "ORANGE RED", - - "FIREBRICK", - "CORAL", - "FOREST GREEN", - "AQUARAMINE", - "BLUE", - "NAVY", - "THISTLE", - "MEDIUM VIOLET RED", - - "INDIAN RED", - "GOLD", - "MEDIUM SEA GREEN", - "MEDIUM BLUE", - "MIDNIGHT BLUE", - "GREY", - "PURPLE", - "KHAKI", - - "BLACK", - "MEDIUM FOREST GREEN", - "KHAKI", - "DARK GREY", - "SEA GREEN", - "LIGHT GREY", - "MEDIUM SLATE BLUE", - "WHITE" - }; - -wxGenericColourDialog::wxGenericColourDialog(void) -{ - dialogParent = NULL; - whichKind = 1; - colourSelection = 0; -} - -wxGenericColourDialog::wxGenericColourDialog(wxWindow *parent, wxColourData *data): - wxDialog(parent, -1, "Colour", wxPoint(0, 0), wxSize(900, 900), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL) -{ - whichKind = 1; - colourSelection = 0; - Create(parent, data); -} - -wxGenericColourDialog::~wxGenericColourDialog(void) -{ -} - -bool wxGenericColourDialog::OnClose(void) -{ - Show(FALSE); - return FALSE; -} - -bool wxGenericColourDialog::Create(wxWindow *parent, wxColourData *data) -{ - dialogParent = parent; - - if (data) - colourData = *data; - - InitializeColours(); - CalculateMeasurements(); - CreateWidgets(); - - return TRUE; -} - -int wxGenericColourDialog::ShowModal(void) -{ - return wxDialog::ShowModal(); -} - - -// Internal functions -void wxGenericColourDialog::OnMouseEvent(wxMouseEvent& event) -{ - if (event.ButtonDown(1)) - { - int x = (int)event.GetX(); - int y = (int)event.GetY(); - - if ((x >= standardColoursRect.x && x <= (standardColoursRect.x + standardColoursRect.width)) && - (y >= standardColoursRect.y && y <= (standardColoursRect.y + standardColoursRect.height))) - { - int selX = (int)(x - standardColoursRect.x)/(smallRectangleSize.x + gridSpacing); - int selY = (int)(y - standardColoursRect.y)/(smallRectangleSize.y + gridSpacing); - int ptr = (int)(selX + selY*8); - OnBasicColourClick(ptr); - } - else if ((x >= customColoursRect.x && x <= (customColoursRect.x + customColoursRect.width)) && - (y >= customColoursRect.y && y <= (customColoursRect.y + customColoursRect.height))) - { - int selX = (int)(x - customColoursRect.x)/(smallRectangleSize.x + gridSpacing); - int selY = (int)(y - customColoursRect.y)/(smallRectangleSize.y + gridSpacing); - int ptr = (int)(selX + selY*8); - OnCustomColourClick(ptr); - } - } -} - -void wxGenericColourDialog::OnPaint(wxPaintEvent& event) -{ - wxDialog::OnPaint(event); - - wxPaintDC dc(this); - - PaintBasicColours(dc); - PaintCustomColours(dc); - PaintCustomColour(dc); - PaintHighlight(dc, TRUE); -} - -void wxGenericColourDialog::CalculateMeasurements(void) -{ - smallRectangleSize.x = 18; - smallRectangleSize.y = 14; - customRectangleSize.x = 40; - customRectangleSize.y = 40; - - gridSpacing = 6; - sectionSpacing = 15; - - standardColoursRect.x = 10; - standardColoursRect.y = 15; - standardColoursRect.width = (8*smallRectangleSize.x) + (7*gridSpacing); - standardColoursRect.height = (6*smallRectangleSize.y) + (5*gridSpacing); - - customColoursRect.x = standardColoursRect.x; - customColoursRect.y = standardColoursRect.y + standardColoursRect.height + 20; - customColoursRect.width = (8*smallRectangleSize.x) + (7*gridSpacing); - customColoursRect.height = (2*smallRectangleSize.y) + (1*gridSpacing); - - singleCustomColourRect.x = customColoursRect.width + customColoursRect.x + sectionSpacing; - singleCustomColourRect.y = 80; - singleCustomColourRect.width = customRectangleSize.x; - singleCustomColourRect.height = customRectangleSize.y; - - okButtonX = 10; - customButtonX = singleCustomColourRect.x ; - buttonY = customColoursRect.y + customColoursRect.height + 10; -} - -void wxGenericColourDialog::CreateWidgets(void) -{ - wxBeginBusyCursor(); - - wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(okButtonX, buttonY)); - int bw, bh; - okButton->GetSize(&bw, &bh); - - (void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(okButtonX + bw + 10, buttonY)); - (void) new wxButton(this, wxID_ADD_CUSTOM, _("Add to custom colours"), - wxPoint(customButtonX, buttonY)); - - int sliderX = singleCustomColourRect.x + singleCustomColourRect.width + sectionSpacing; -#ifdef __X__ - int sliderSpacing = 75; - int sliderHeight = 160; -#else - int sliderSpacing = 45; - int sliderHeight = 160; -#endif - - redSlider = new wxSlider(this, wxID_RED_SLIDER, 0, 0, 255, - wxPoint(sliderX, 10), wxSize(-1, sliderHeight), wxVERTICAL|wxSL_LABELS); - greenSlider = new wxSlider(this, wxID_GREEN_SLIDER, 0, 0, 255, - wxPoint(sliderX + sliderSpacing, 10), wxSize(-1, sliderHeight), wxVERTICAL|wxSL_LABELS); - blueSlider = new wxSlider(this, wxID_BLUE_SLIDER, 0, 0, 255, - wxPoint(sliderX + 2*sliderSpacing, 10), wxSize(-1, sliderHeight), wxVERTICAL|wxSL_LABELS); - - SetClientSize(sliderX + 3*sliderSpacing, buttonY + 30); - okButton->SetDefault(); - - Centre(wxBOTH); - - wxEndBusyCursor(); -} - -void wxGenericColourDialog::InitializeColours(void) -{ - int i; - for (i = 0; i < 48; i++) - { - wxColour *col = wxTheColourDatabase->FindColour(wxColourDialogNames[i]); - if (col) - standardColours[i].Set(col->Red(), col->Green(), col->Blue()); - else - standardColours[i].Set(0, 0, 0); - } - - for (i = 0; i < 16; i++) - customColours[i] = -/* -#ifndef __VMS__ - (wxColour&) -#endif -*/ - colourData.GetCustomColour(i); - - singleCustomColour.Set(0, 0, 0); -} - -void wxGenericColourDialog::PaintBasicColours(wxDC& dc) -{ - dc.BeginDrawing(); - - int i; - for (i = 0; i < 6; i++) - { - int j; - for (j = 0; j < 8; j++) - { - int ptr = i*8 + j; - - int x = (j*(smallRectangleSize.x+gridSpacing) + standardColoursRect.x); - int y = (i*(smallRectangleSize.y+gridSpacing) + standardColoursRect.y); - - dc.SetPen(*wxBLACK_PEN); - wxBrush brush(standardColours[ptr], wxSOLID); - dc.SetBrush(brush); - - dc.DrawRectangle( x, y, smallRectangleSize.x, smallRectangleSize.y); - } - } - dc.EndDrawing(); -} - -void wxGenericColourDialog::PaintCustomColours(wxDC& dc) -{ - dc.BeginDrawing(); - - int i; - for (i = 0; i < 2; i++) - { - int j; - for (j = 0; j < 8; j++) - { - int ptr = i*8 + j; - - int x = (j*(smallRectangleSize.x+gridSpacing)) + customColoursRect.x; - int y = (i*(smallRectangleSize.y+gridSpacing)) + customColoursRect.y; - - dc.SetPen(*wxBLACK_PEN); - - wxBrush brush(customColours[ptr], wxSOLID); - dc.SetBrush(brush); - - dc.DrawRectangle( x, y, smallRectangleSize.x, smallRectangleSize.y); - } - } - dc.EndDrawing(); -} - -void wxGenericColourDialog::PaintHighlight(wxDC& dc, bool draw) -{ - dc.BeginDrawing(); - - // Number of pixels bigger than the standard rectangle size - // for drawing a highlight - int deltaX = 2; - int deltaY = 2; - - if (whichKind == 1) - { - // Standard colours - int y = (int)(colourSelection / 8); - int x = (int)(colourSelection - (y*8)); - - x = (x*(smallRectangleSize.x + gridSpacing) + standardColoursRect.x) - deltaX; - y = (y*(smallRectangleSize.y + gridSpacing) + standardColoursRect.y) - deltaY; - - if (draw) - dc.SetPen(*wxBLACK_PEN); - else - dc.SetPen(*wxLIGHT_GREY_PEN); - - dc.SetBrush(*wxTRANSPARENT_BRUSH); - dc.DrawRectangle( x, y, (smallRectangleSize.x + (2*deltaX)), (smallRectangleSize.y + (2*deltaY))); - } - else - { - // User-defined colours - int y = (int)(colourSelection / 8); - int x = (int)(colourSelection - (y*8)); - - x = (x*(smallRectangleSize.x + gridSpacing) + customColoursRect.x) - deltaX; - y = (y*(smallRectangleSize.y + gridSpacing) + customColoursRect.y) - deltaY; - - if (draw) - dc.SetPen(*wxBLACK_PEN); - else - dc.SetPen(*wxLIGHT_GREY_PEN); - - dc.SetBrush(*wxTRANSPARENT_BRUSH); - dc.DrawRectangle( x, y, (smallRectangleSize.x + (2*deltaX)), (smallRectangleSize.y + (2*deltaY))); - } - - dc.EndDrawing(); -} - -void wxGenericColourDialog::PaintCustomColour(wxDC& dc) -{ - dc.BeginDrawing(); - - dc.SetPen(*wxBLACK_PEN); - - wxBrush *brush = new wxBrush(singleCustomColour, wxSOLID); - dc.SetBrush(*brush); - - dc.DrawRectangle( singleCustomColourRect.x, singleCustomColourRect.y, - customRectangleSize.x, customRectangleSize.y); - - dc.SetBrush(wxNullBrush); - delete brush; - - dc.EndDrawing(); -} - -void wxGenericColourDialog::OnBasicColourClick(int which) -{ - wxClientDC dc(this); - - PaintHighlight(dc, FALSE); - whichKind = 1; - colourSelection = which; - colourData.SetColour(standardColours[colourSelection]); - - PaintHighlight(dc, TRUE); -} - -void wxGenericColourDialog::OnCustomColourClick(int which) -{ - wxClientDC dc(this); - PaintHighlight(dc, FALSE); - whichKind = 2; - colourSelection = which; - colourData.SetColour(customColours[colourSelection]); - - PaintHighlight(dc, TRUE); -} - -/* -void wxGenericColourDialog::OnOk(void) -{ - Show(FALSE); -} - -void wxGenericColourDialog::OnCancel(void) -{ - colourDialogCancelled = TRUE; - Show(FALSE); -} -*/ - -void wxGenericColourDialog::OnAddCustom(wxCommandEvent& WXUNUSED(event)) -{ - wxClientDC dc(this); - if (whichKind != 2) - { - PaintHighlight(dc, FALSE); - whichKind = 2; - colourSelection = 0; - PaintHighlight(dc, TRUE); - } - - customColours[colourSelection].Set(singleCustomColour.Red(), singleCustomColour.Green(), singleCustomColour.Blue()); - colourData.SetColour(customColours[colourSelection]); - colourData.SetCustomColour(colourSelection, customColours[colourSelection]); - - PaintCustomColours(dc); -} - -void wxGenericColourDialog::OnRedSlider(wxCommandEvent& WXUNUSED(event)) -{ - if (!redSlider) - return; - - wxClientDC dc(this); - singleCustomColour.Set(redSlider->GetValue(), singleCustomColour.Green(), singleCustomColour.Blue()); - PaintCustomColour(dc); -} - -void wxGenericColourDialog::OnGreenSlider(wxCommandEvent& WXUNUSED(event)) -{ - if (!greenSlider) - return; - - wxClientDC dc(this); - singleCustomColour.Set(singleCustomColour.Red(), greenSlider->GetValue(), singleCustomColour.Blue()); - PaintCustomColour(dc); -} - -void wxGenericColourDialog::OnBlueSlider(wxCommandEvent& WXUNUSED(event)) -{ - if (!blueSlider) - return; - - wxClientDC dc(this); - singleCustomColour.Set(singleCustomColour.Red(), singleCustomColour.Green(), blueSlider->GetValue()); - PaintCustomColour(dc); -} - - diff --git a/src/generic/fontdlgg.cpp b/src/generic/fontdlgg.cpp deleted file mode 100644 index 269f389d52..0000000000 --- a/src/generic/fontdlgg.cpp +++ /dev/null @@ -1,430 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: fontdlgg.cpp -// Purpose: Generic font dialog -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "fontdlgg.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/utils.h" -#include "wx/dialog.h" -#include "wx/listbox.h" -#include "wx/button.h" -#include "wx/stattext.h" -#include "wx/layout.h" -#include "wx/dcclient.h" -#include "wx/choice.h" -#include "wx/checkbox.h" -#include -#endif - -#include -#include - -#include "wx/cmndata.h" -#include "wx/generic/fontdlgg.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxGenericFontDialog, wxDialog) - -BEGIN_EVENT_TABLE(wxGenericFontDialog, wxDialog) - EVT_CHECKBOX(wxID_FONT_UNDERLINE, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_STYLE, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_WEIGHT, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_FAMILY, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_COLOUR, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_SIZE, wxGenericFontDialog::OnChangeFont) - EVT_PAINT(wxGenericFontDialog::OnPaint) -END_EVENT_TABLE() - -#endif - -#define NUM_COLS 48 -static wxString wxColourDialogNames[NUM_COLS]={"ORANGE", - "GOLDENROD", - "WHEAT", - "SPRING GREEN", - "SKY BLUE", - "SLATE BLUE", - "MEDIUM VIOLET RED", - "PURPLE", - - "RED", - "YELLOW", - "MEDIUM SPRING GREEN", - "PALE GREEN", - "CYAN", - "LIGHT STEEL BLUE", - "ORCHID", - "LIGHT MAGENTA", - - "BROWN", - "YELLOW", - "GREEN", - "CADET BLUE", - "MEDIUM BLUE", - "MAGENTA", - "MAROON", - "ORANGE RED", - - "FIREBRICK", - "CORAL", - "FOREST GREEN", - "AQUARAMINE", - "BLUE", - "NAVY", - "THISTLE", - "MEDIUM VIOLET RED", - - "INDIAN RED", - "GOLD", - "MEDIUM SEA GREEN", - "MEDIUM BLUE", - "MIDNIGHT BLUE", - "GREY", - "PURPLE", - "KHAKI", - - "BLACK", - "MEDIUM FOREST GREEN", - "KHAKI", - "DARK GREY", - "SEA GREEN", - "LIGHT GREY", - "MEDIUM SLATE BLUE", - "WHITE" - }; - -/* - * Generic wxFontDialog - */ - -wxGenericFontDialog::wxGenericFontDialog(void) -{ - m_useEvents = FALSE; - dialogParent = NULL; -} - -wxGenericFontDialog::wxGenericFontDialog(wxWindow *parent, wxFontData *data): - wxDialog(parent, -1, _("Font"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL) -{ - m_useEvents = FALSE; - Create(parent, data); -} - -wxGenericFontDialog::~wxGenericFontDialog(void) -{ -} - -bool wxGenericFontDialog::OnClose(void) -{ - Show(FALSE); - return FALSE; -} - -bool wxGenericFontDialog::Create(wxWindow *parent, wxFontData *data) -{ - dialogParent = parent; - - if (data) - fontData = *data; - - InitializeFont(); - CreateWidgets(); - - return TRUE; -} - -int wxGenericFontDialog::ShowModal(void) -{ - int ret = wxDialog::ShowModal(); - - if (ret != wxID_CANCEL) - { - fontData.chosenFont = dialogFont; - } - - return ret; -} - - -void wxGenericFontDialog::OnPaint(wxPaintEvent& event) -{ - wxDialog::OnPaint(event); - - wxPaintDC dc(this); - PaintFontBackground(dc); - PaintFont(dc); -} - -/* -static void wxGenericChangeFontText(wxTextCtrl& text, wxCommandEvent& event) -{ - if (event.GetEventType() == wxEVENT_TYPE_TEXT_ENTER_COMMAND) - { - wxGenericFontDialog *dialog = (wxGenericFontDialog *)text.GetParent(); - dialog->OnChangeFont(); - } -} -*/ - -void wxGenericFontDialog::CreateWidgets(void) -{ - wxBeginBusyCursor(); - - fontRect.x = 5; -#ifdef __X__ - fontRect.y = 125; -#else - fontRect.y = 115; -#endif - fontRect.width = 350; - fontRect.height = 100; - -/* - static char *families[] = { "Roman", "Decorative", "Modern", "Script", "Swiss" }; - static char *styles[] = { "Normal", "Italic", "Slant" }; - static char *weights[] = { "Normal", "Light", "Bold" }; -*/ - static wxString families[] = { "Roman", "Decorative", "Modern", "Script", "Swiss" }; - static wxString styles[] = { "Normal", "Italic", "Slant" }; - static wxString weights[] = { "Normal", "Light", "Bold" }; - - int x=-1; - int y=40; - familyChoice = new wxChoice(this, wxID_FONT_FAMILY, wxPoint(10, 10), wxSize(120, -1), 5, families); - styleChoice = new wxChoice(this, wxID_FONT_STYLE, wxPoint(140, 10), wxSize(120, -1), 3, styles); - weightChoice = new wxChoice(this, wxID_FONT_WEIGHT, wxPoint(270, 10), wxSize(120, -1), 3, weights); - - colourChoice = new wxChoice(this, wxID_FONT_COLOUR, wxPoint(10, 40), wxSize(190, -1), NUM_COLS, wxColourDialogNames); -#ifdef __MOTIF__ - // We want the pointSizeText to line up on the y axis with the colourChoice - colourChoice->GetPosition(&fontRect.x, &y); //NL mod - y+=3; //NL mod -#endif - - wxString pointSizes[40]; - int i; - for ( i = 0; i < 40; i++) - { - char buf[5]; - sprintf(buf, "%d", i + 1); - pointSizes[i] = buf; - } - - pointSizeChoice = new wxChoice(this, wxID_FONT_SIZE, wxPoint(210, y), wxSize(50, -1), 40, pointSizes); - underLineCheckBox = new wxCheckBox(this, wxID_FONT_UNDERLINE, _("Underline"), wxPoint(280, y)); - - int rectY; - pointSizeChoice->GetPosition(&x, &rectY); //NL mod - fontRect.y = rectY; - pointSizeChoice->GetSize(&x, &y); //NL mod - - // Calculate the position of the bottom of the pointSizeChoice, and place - // the fontRect there (+5 for a nice gap) - - fontRect.y+=y+5; //NL mod - - int by = (fontRect.y + fontRect.height + 5); - - wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(5, by)); - (void) new wxButton(this, wxID_OK, _("Cancel"), wxPoint(50, by)); - - familyChoice->SetStringSelection( wxFontFamilyIntToString(dialogFont.GetFamily()) ); - styleChoice->SetStringSelection(wxFontStyleIntToString(dialogFont.GetStyle())); - weightChoice->SetStringSelection(wxFontWeightIntToString(dialogFont.GetWeight())); - wxString name(wxTheColourDatabase->FindName(fontData.fontColour)); - colourChoice->SetStringSelection(name); - - underLineCheckBox->SetValue(dialogFont.GetUnderlined()); - pointSizeChoice->SetSelection(dialogFont.GetPointSize()-1); - - okButton->SetDefault(); - - SetClientSize(400, by + 30); - - Centre(wxBOTH); - - wxEndBusyCursor(); - - m_useEvents = TRUE; -} - -void wxGenericFontDialog::InitializeFont(void) -{ - int fontFamily = wxSWISS; - int fontWeight = wxNORMAL; - int fontStyle = wxNORMAL; - int fontSize = 12; - int fontUnderline = FALSE; - if (fontData.initialFont.Ok()) - { - fontFamily = fontData.initialFont.GetFamily(); - fontWeight = fontData.initialFont.GetWeight(); - fontStyle = fontData.initialFont.GetStyle(); - fontSize = fontData.initialFont.GetPointSize(); - fontUnderline = fontData.initialFont.GetUnderlined(); - } - dialogFont = wxFont(fontSize, fontFamily, fontStyle, fontWeight, (fontUnderline != 0)); -} - -void wxGenericFontDialog::PaintFontBackground(wxDC& dc) -{ - dc.BeginDrawing(); - - dc.SetPen(*wxBLACK_PEN); - dc.SetBrush(*wxWHITE_BRUSH); - dc.DrawRectangle( fontRect.x, fontRect.y, fontRect.width, fontRect.height); - dc.EndDrawing(); -} - -void wxGenericFontDialog::PaintFont(wxDC& dc) -{ - dc.BeginDrawing(); - if (dialogFont.Ok()) - { - dc.SetFont(dialogFont); - // Calculate vertical centre - long w, h; - dc.GetTextExtent("X", &w, &h); - float cx = (float)(fontRect.x + 10); - float cy = (float)(fontRect.y + (fontRect.height/2.0) - (h/2.0)); - dc.SetTextForeground(fontData.fontColour); - dc.SetClippingRegion( fontRect.x, fontRect.y, (long)(fontRect.width-2.0), (long)(fontRect.height-2.0)); - dc.DrawText(_("ABCDEFGabcdefg12345"), (long)cx, (long)cy); - dc.DestroyClippingRegion(); - dc.SetFont(wxNullFont); - } - dc.EndDrawing(); -} - -void wxGenericFontDialog::OnChangeFont(wxCommandEvent& WXUNUSED(event)) -{ - if (!m_useEvents) return; - - int fontFamily = wxFontFamilyStringToInt(WXSTRINGCAST familyChoice->GetStringSelection()); - int fontWeight = wxFontWeightStringToInt(WXSTRINGCAST weightChoice->GetStringSelection()); - int fontStyle = wxFontStyleStringToInt(WXSTRINGCAST styleChoice->GetStringSelection()); - int fontSize = atoi(pointSizeChoice->GetStringSelection()); - int fontUnderline = underLineCheckBox->GetValue(); - - dialogFont = wxFont(fontSize, fontFamily, fontStyle, fontWeight, (fontUnderline != 0)); - if (colourChoice->GetStringSelection() != "") - { - wxColour *col = wxTheColourDatabase->FindColour(colourChoice->GetStringSelection()); - if (col) - { - fontData.fontColour = *col; - } - } - wxClientDC dc(this); - PaintFontBackground(dc); - PaintFont(dc); -} - -char *wxFontWeightIntToString(int weight) -{ - switch (weight) - { - case wxLIGHT: - return "Light"; - case wxBOLD: - return "Bold"; - case wxNORMAL: - default: - return "Normal"; - } - return "Normal"; -} - -char *wxFontStyleIntToString(int style) -{ - switch (style) - { - case wxITALIC: - return "Italic"; - case wxSLANT: - return "Slant"; - case wxNORMAL: - default: - return "Normal"; - } - return "Normal"; -} - -char *wxFontFamilyIntToString(int family) -{ - switch (family) - { - case wxROMAN: - return "Roman"; - case wxDECORATIVE: - return "Decorative"; - case wxMODERN: - return "Modern"; - case wxSCRIPT: - return "Script"; - case wxSWISS: - default: - return "Swiss"; - } - return "Swiss"; -} - -int wxFontFamilyStringToInt(char *family) -{ - if (!family) - return wxSWISS; - - if (strcmp(family, "Roman") == 0) - return wxROMAN; - else if (strcmp(family, "Decorative") == 0) - return wxDECORATIVE; - else if (strcmp(family, "Modern") == 0) - return wxMODERN; - else if (strcmp(family, "Script") == 0) - return wxSCRIPT; - else return wxSWISS; -} - -int wxFontStyleStringToInt(char *style) -{ - if (!style) - return wxNORMAL; - if (strcmp(style, "Italic") == 0) - return wxITALIC; - else if (strcmp(style, "Slant") == 0) - return wxSLANT; - else - return wxNORMAL; -} - -int wxFontWeightStringToInt(char *weight) -{ - if (!weight) - return wxNORMAL; - if (strcmp(weight, "Bold") == 0) - return wxBOLD; - else if (strcmp(weight, "Light") == 0) - return wxLIGHT; - else - return wxNORMAL; -} - - diff --git a/src/generic/gridg.cpp b/src/generic/gridg.cpp deleted file mode 100644 index 6e12f51835..0000000000 --- a/src/generic/gridg.cpp +++ /dev/null @@ -1,2457 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gridg.cpp -// Purpose: wxGenericGrid -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "gridg.h" -#pragma interface -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include - -#include "wx/string.h" -#include "wx/generic/gridg.h" -#include "wx/settings.h" - -// Set to zero to use no double-buffering -#ifdef __WXMSW__ -#define USE_DOUBLE_BUFFERING 1 -#else -#define USE_DOUBLE_BUFFERING 0 -#endif - -#define wxGRID_DRAG_NONE 0 -#define wxGRID_DRAG_LEFT_RIGHT 1 -#define wxGRID_DRAG_UP_DOWN 2 - -IMPLEMENT_DYNAMIC_CLASS(wxGenericGrid, wxPanel) - -BEGIN_EVENT_TABLE(wxGenericGrid, wxPanel) - EVT_SIZE(wxGenericGrid::OnSize) - EVT_PAINT(wxGenericGrid::OnPaint) - EVT_ERASE_BACKGROUND(wxGenericGrid::OnEraseBackground) - EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent) - EVT_TEXT(wxGRID_TEXT_CTRL, wxGenericGrid::OnText) - EVT_COMMAND_SCROLL(wxGRID_HSCROLL, wxGenericGrid::OnGridScroll) - EVT_COMMAND_SCROLL(wxGRID_VSCROLL, wxGenericGrid::OnGridScroll) -END_EVENT_TABLE() - -wxGenericGrid::wxGenericGrid(void) -{ - m_batchCount = 0; - m_hScrollBar = (wxScrollBar *) NULL; - m_vScrollBar = (wxScrollBar *) NULL; - m_cellTextColour = *wxBLACK; - m_cellBackgroundColour = *wxWHITE; - m_labelTextColour = *wxBLACK; -// m_labelBackgroundColour = *wxLIGHT_GREY; - m_labelBackgroundColour = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE ); - m_labelBackgroundBrush = (wxBrush *) NULL; - m_labelTextFont = (wxFont *) NULL; - m_cellTextFont = (wxFont *) NULL; - m_textItem = (wxTextCtrl *) NULL; - m_currentRectVisible = FALSE; - m_editable = TRUE; -#if defined(__WIN95__) - m_scrollWidth = wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X); -#else - m_scrollWidth = 16; -#endif - m_dragStatus = wxGRID_DRAG_NONE; - m_dragRowOrCol = 0; - m_dragStartPosition = 0; - m_dragLastPosition = 0; - m_divisionPen = (wxPen *) NULL; - m_leftOfSheet = wxGRID_DEFAULT_SHEET_LEFT; - m_topOfSheet = wxGRID_DEFAULT_SHEET_TOP; - m_cellHeight = wxGRID_DEFAULT_CELL_HEIGHT; - m_totalGridWidth = 0; - m_totalGridHeight = 0; - m_colWidths = (short *) NULL; - m_rowHeights = (short *) NULL; - m_verticalLabelWidth = wxGRID_DEFAULT_VERTICAL_LABEL_WIDTH; - m_horizontalLabelHeight = wxGRID_DEFAULT_HORIZONAL_LABEL_HEIGHT; - m_verticalLabelAlignment = wxCENTRE; - m_horizontalLabelAlignment = wxCENTRE; - m_editControlPosition.x = wxGRID_DEFAULT_EDIT_X; - m_editControlPosition.y = wxGRID_DEFAULT_EDIT_Y; - m_editControlPosition.width = wxGRID_DEFAULT_EDIT_WIDTH; - m_editControlPosition.height = wxGRID_DEFAULT_EDIT_HEIGHT; - m_wCursorRow = 0; - m_wCursorColumn = 0; - m_scrollPosX = 0; - m_scrollPosY = 0; - m_editCreated = FALSE; - m_totalRows = 0; - m_totalCols = 0; - m_gridCells = (wxGridCell ***) NULL; - m_rowLabelCells = (wxGridCell **) NULL; - m_colLabelCells = (wxGridCell **) NULL; - m_textItem = (wxTextCtrl *) NULL; - m_horizontalSashCursor = (wxCursor *) NULL; - m_verticalSashCursor = (wxCursor *) NULL; -} - -bool wxGenericGrid::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style, const wxString& name) -{ - m_batchCount = 0; - m_editingPanel = (wxPanel *) NULL; - m_hScrollBar = (wxScrollBar *) NULL; - m_vScrollBar = (wxScrollBar *) NULL; - m_horizontalSashCursor = (wxCursor *) NULL; - m_verticalSashCursor = (wxCursor *) NULL; - m_cellTextColour = *wxBLACK; - m_cellBackgroundColour = *wxWHITE; - m_labelTextColour = *wxBLACK; -// m_labelBackgroundColour = *wxLIGHT_GREY; - m_labelBackgroundColour = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE ); - m_labelBackgroundBrush = (wxBrush *) NULL; - m_labelTextFont = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxBOLD); - m_cellTextFont = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL); - m_textItem = (wxTextCtrl *) NULL; - m_currentRectVisible = FALSE; - m_editable = TRUE; -#if defined(__WIN95__) - m_scrollWidth = wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X); -#else - m_scrollWidth = 16; -#endif - m_dragStatus = wxGRID_DRAG_NONE; - m_dragRowOrCol = 0; - m_dragStartPosition = 0; - m_dragLastPosition = 0; - m_divisionPen = wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID); - m_doubleBufferingBitmap = (wxBitmap *) NULL; - - if (!m_horizontalSashCursor) - { - m_horizontalSashCursor = new wxCursor(wxCURSOR_SIZEWE); - m_verticalSashCursor = new wxCursor(wxCURSOR_SIZENS); - } - - SetLabelBackgroundColour(m_labelBackgroundColour); - - m_leftOfSheet = wxGRID_DEFAULT_SHEET_LEFT; - m_topOfSheet = wxGRID_DEFAULT_SHEET_TOP; - m_cellHeight = wxGRID_DEFAULT_CELL_HEIGHT; - m_totalGridWidth = 0; - m_totalGridHeight = 0; - m_colWidths = (short *) NULL; - m_rowHeights = (short *) NULL; - - m_verticalLabelWidth = wxGRID_DEFAULT_VERTICAL_LABEL_WIDTH; - m_horizontalLabelHeight = wxGRID_DEFAULT_HORIZONAL_LABEL_HEIGHT; - m_verticalLabelAlignment = wxCENTRE; - m_horizontalLabelAlignment = wxCENTRE; - m_editControlPosition.x = wxGRID_DEFAULT_EDIT_X; - m_editControlPosition.y = wxGRID_DEFAULT_EDIT_Y; - m_editControlPosition.width = wxGRID_DEFAULT_EDIT_WIDTH; - m_editControlPosition.height = wxGRID_DEFAULT_EDIT_HEIGHT; - - m_wCursorRow = 0; - m_wCursorColumn = 0; - - m_scrollPosX = 0; - m_scrollPosY = 0; - - /* Store the rect. coordinates for the current cell */ - SetCurrentRect(m_wCursorRow, m_wCursorColumn); - - m_editCreated = FALSE; - - m_totalRows = 0; - m_totalCols = 0; - m_gridCells = (wxGridCell ***) NULL; - m_rowLabelCells = (wxGridCell **) NULL; - m_colLabelCells = (wxGridCell **) NULL; - m_textItem = (wxTextCtrl *) NULL; - - wxPanel::Create(parent, id, pos, size, style, name); - - m_editingPanel = new wxPanel(this); - - m_textItem = new wxTextCtrl(m_editingPanel, wxGRID_TEXT_CTRL, "", - wxPoint(m_editControlPosition.x, m_editControlPosition.y), wxSize(m_editControlPosition.width, -1), - 0); - m_textItem->Show(TRUE); - m_textItem->SetFocus(); - int controlW, controlH; - - m_textItem->GetSize(&controlW, &controlH); - m_editControlPosition.height = controlH; - - m_topOfSheet = m_editControlPosition.y + controlH + 2; - - m_editCreated = TRUE; - - m_hScrollBar = new wxScrollBar(this, wxGRID_HSCROLL, wxPoint(0, 0), wxSize(20, 100), wxHORIZONTAL); - m_vScrollBar = new wxScrollBar(this, wxGRID_VSCROLL, wxPoint(0, 0), wxSize(100, 20), wxVERTICAL); - - return TRUE; -} - -wxGenericGrid::~wxGenericGrid(void) -{ - ClearGrid(); -} - -void wxGenericGrid::ClearGrid(void) -{ - int i,j; - if (m_gridCells) - { - for (i = 0; i < m_totalRows; i++) - { - for (j = 0; j < m_totalCols; j++) - if (m_gridCells[i][j]) - delete m_gridCells[i][j]; - delete[] m_gridCells[i]; - } - delete[] m_gridCells; - m_gridCells = (wxGridCell ***) NULL; - } - if (m_colWidths) - delete[] m_colWidths; - m_colWidths = (short *) NULL; - if (m_rowHeights) - delete[] m_rowHeights; - m_rowHeights = (short *) NULL; - - if (m_rowLabelCells) - { - for (i = 0; i < m_totalRows; i++) - delete m_rowLabelCells[i]; - delete[] m_rowLabelCells; - m_rowLabelCells = (wxGridCell **) NULL; - } - if (m_colLabelCells) - { - for (i = 0; i < m_totalCols; i++) - delete m_colLabelCells[i]; - delete[] m_colLabelCells; - m_colLabelCells = (wxGridCell **) NULL; - } - if (m_doubleBufferingBitmap) - { - delete m_doubleBufferingBitmap; - m_doubleBufferingBitmap = (wxBitmap *) NULL; - } -} - -bool wxGenericGrid::CreateGrid(int nRows, int nCols, wxString **cellValues, short *widths, - short defaultWidth, short defaultHeight) -{ - m_totalRows = nRows; - m_totalCols = nCols; - - int i,j; - m_colWidths = new short[nCols]; - m_rowHeights = new short[nRows]; - for (i = 0; i < nCols; i++) - if (widths) - m_colWidths[i] = widths[i]; - else - m_colWidths[i] = defaultWidth; - for (i = 0; i < nRows; i++) - m_rowHeights[i] = defaultHeight; - - m_gridCells = new wxGridCell **[nRows]; - - for (i = 0; i < nRows; i++) - m_gridCells[i] = new wxGridCell *[nCols]; - - for (i = 0; i < nRows; i++) - for (j = 0; j < nCols; j++) - if (cellValues) - { - m_gridCells[i][j] = OnCreateCell(); - m_gridCells[i][j]->SetTextValue(cellValues[i][j]); - } - else - m_gridCells[i][j] = (wxGridCell *) NULL; - - m_rowLabelCells = new wxGridCell *[nRows]; - for (i = 0; i < nRows; i++) - m_rowLabelCells[i] = new wxGridCell(this); - m_colLabelCells = new wxGridCell *[nCols]; - for (i = 0; i < nCols; i++) - m_colLabelCells[i] = new wxGridCell(this); - - m_wCursorRow = m_wCursorColumn = 0; - SetCurrentRect(0, 0); - - // Need to determine various dimensions - UpdateDimensions(); - - // Number of 'lines' - int objectSizeX = m_totalCols; - int pageSizeX = 1; - int viewLengthX = m_totalCols; - -/* - m_hScrollBar->SetViewLength(viewLengthX); - m_hScrollBar->SetObjectLength(objectSizeX); - m_hScrollBar->SetPageSize(pageSizeX); -*/ - m_hScrollBar->SetScrollbar(m_hScrollBar->GetPosition(), pageSizeX, objectSizeX, viewLengthX); - - int objectSizeY = m_totalRows; - int pageSizeY = 1; - int viewLengthY = m_totalRows; - -/* - m_vScrollBar->SetViewLength(viewLengthY); - m_vScrollBar->SetObjectLength(objectSizeY); - m_vScrollBar->SetPageSize(pageSizeY); -*/ - - m_vScrollBar->SetScrollbar(m_vScrollBar->GetPosition(), pageSizeY, objectSizeY, viewLengthY); - - AdjustScrollbars(); - - OnChangeLabels(); - OnChangeSelectionLabel(); - - return TRUE; -} - -// Need to determine various dimensions -void wxGenericGrid::UpdateDimensions(void) -{ - int canvasWidth, canvasHeight; - GetSize(&canvasWidth, &canvasHeight); - - if (m_editCreated && m_editable) - { - int controlW, controlH; - GetTextItem()->GetSize(&controlW, &controlH); - m_topOfSheet = m_editControlPosition.y + controlH + 2; - } - else - m_topOfSheet = 0; - m_rightOfSheet = m_leftOfSheet + m_verticalLabelWidth; - int i; - for (i = m_scrollPosX; i < m_totalCols; i++) - { - if (m_rightOfSheet > canvasWidth) - break; - else - m_rightOfSheet += m_colWidths[i]; - } - m_bottomOfSheet = m_topOfSheet + m_horizontalLabelHeight; - for (i = m_scrollPosY; i < m_totalRows; i++) - { - if (m_bottomOfSheet > canvasHeight) - break; - else - m_bottomOfSheet += m_rowHeights[i]; - } - - m_totalGridWidth = m_leftOfSheet + m_verticalLabelWidth; - for (i = 0; i < m_totalCols; i++) - { - m_totalGridWidth += m_colWidths[i]; - } - m_totalGridHeight = m_topOfSheet + m_horizontalLabelHeight; - for (i = 0; i < m_totalRows; i++) - { - m_totalGridHeight += m_rowHeights[i]; - } -} - -wxGridCell *wxGenericGrid::GetCell(int row, int col) -{ - if (!m_gridCells) - return (wxGridCell *) NULL; - - if ((row >= m_totalRows) || (col >= m_totalCols)) - return (wxGridCell *) NULL; - - wxGridCell *cell = m_gridCells[row][col]; - if (!cell) - { - m_gridCells[row][col] = OnCreateCell(); - return m_gridCells[row][col]; - } - else - return cell; -} - -void wxGenericGrid::SetGridClippingRegion(wxDC *dc) -{ - int m_scrollWidthHoriz = 0; - int m_scrollWidthVert = 0; - int cw, ch; - GetClientSize(&cw, &ch); - - if (m_hScrollBar && m_hScrollBar->IsShown()) - m_scrollWidthHoriz = m_scrollWidth; - if (m_vScrollBar && m_vScrollBar->IsShown()) - m_scrollWidthVert = m_scrollWidth; - - // Don't paint over the scrollbars - dc->SetClippingRegion(m_leftOfSheet, m_topOfSheet, - cw - m_scrollWidthVert - m_leftOfSheet, ch - m_scrollWidthHoriz - m_topOfSheet); -} - -void wxGenericGrid::OnPaint(wxPaintEvent& WXUNUSED(event)) -{ - int w, h; - GetClientSize(&w, &h); - - bool useDoubleBuffering = (bool) USE_DOUBLE_BUFFERING; - if (useDoubleBuffering) - { - // Reuse the old bitmap if possible - - if (!m_doubleBufferingBitmap || - (m_doubleBufferingBitmap->GetWidth() < w || m_doubleBufferingBitmap->GetHeight() < h)) - { - if (m_doubleBufferingBitmap) - delete m_doubleBufferingBitmap; - m_doubleBufferingBitmap = new wxBitmap(w, h); - } - if (!m_doubleBufferingBitmap || !m_doubleBufferingBitmap->Ok()) - { - // If we couldn't create a new bitmap, perhaps because resources were low, - // then don't complain, just don't double-buffer - if (m_doubleBufferingBitmap) - delete m_doubleBufferingBitmap; - m_doubleBufferingBitmap = (wxBitmap *) NULL; - useDoubleBuffering = FALSE; - } - } - - if (useDoubleBuffering) - { - wxPaintDC paintDC(this); - wxMemoryDC dc(& paintDC); - dc.SelectObject(* m_doubleBufferingBitmap); - - PaintGrid(dc); - - int vertScrollBarWidth = m_scrollWidth; - int horizScrollBarHeight = m_scrollWidth; - if (m_vScrollBar && !m_vScrollBar->IsShown()) - vertScrollBarWidth = 0; - if (m_hScrollBar && !m_hScrollBar->IsShown()) - horizScrollBarHeight = 0; - - paintDC.Blit(m_leftOfSheet, m_topOfSheet, w - vertScrollBarWidth - m_leftOfSheet, h - horizScrollBarHeight - m_topOfSheet, - &dc, m_leftOfSheet, m_topOfSheet, wxCOPY); - - dc.SelectObject(wxNullBitmap); - } - else - { - wxPaintDC dc(this); - PaintGrid(dc); - } -} - -void wxGenericGrid::PaintGrid(wxDC& dc) -{ - dc.BeginDrawing(); - dc.SetOptimization(FALSE); - - SetGridClippingRegion(& dc); - - DrawLabelAreas(& dc); - - DrawEditableArea(& dc); - DrawColumnLabels(& dc); - DrawRowLabels(& dc); - DrawCells(& dc); - DrawGridLines(& dc); - - /* Hilight present cell */ - SetCurrentRect(m_wCursorRow, m_wCursorColumn); - if (m_currentRectVisible) - HighlightCell(& dc); - - dc.DestroyClippingRegion(); - dc.SetOptimization(TRUE); - dc.EndDrawing(); -} - -// Erase (some of) the background. -// Currently, a Windows-only optimisation. -void wxGenericGrid::OnEraseBackground(wxEraseEvent& WXUNUSED(event) ) -{ - wxClientDC dc(this); - dc.BeginDrawing(); - dc.SetOptimization(FALSE); - - int w, h; - GetClientSize(& w, & h); - dc.SetBrush(*wxLIGHT_GREY_BRUSH); - dc.SetPen(*wxLIGHT_GREY_PEN); - - if (m_hScrollBar && m_hScrollBar->IsShown() && m_vScrollBar && m_vScrollBar->IsShown()) - { - dc.DrawRectangle(w - m_scrollWidth, h - m_scrollWidth, m_scrollWidth, m_scrollWidth); - } - - dc.SetOptimization(TRUE); - dc.EndDrawing(); -} - - -void wxGenericGrid::DrawLabelAreas(wxDC *dc) -{ - int cw, ch; - GetClientSize(&cw, &ch); - - dc->SetPen(*wxTRANSPARENT_PEN); -// dc->SetBrush(*dc->GetBackground()); - - // Should blank out any area which isn't going to be painted over. -// dc->DrawRectangle(m_leftOfSheet, m_bottomOfSheet, cw - m_leftOfSheet, ch - m_bottomOfSheet); -// dc->DrawRectangle(m_rightOfSheet, m_topOfSheet, cw - m_rightOfSheet, ch - m_topOfSheet); - - // Paint the label areas - dc->SetBrush(*m_labelBackgroundBrush); -// dc->DrawRectangle(m_leftOfSheet, m_topOfSheet, m_rightOfSheet - m_leftOfSheet + 1, m_horizontalLabelHeight + 1); - dc->DrawRectangle(m_leftOfSheet, m_topOfSheet, cw-m_leftOfSheet, m_horizontalLabelHeight + 1); -// dc->DrawRectangle(m_leftOfSheet, m_topOfSheet, m_verticalLabelWidth + 1, m_bottomOfSheet - m_topOfSheet + 1); - dc->DrawRectangle(m_leftOfSheet, m_topOfSheet, m_verticalLabelWidth + 1, ch-m_topOfSheet); -} - -void wxGenericGrid::DrawEditableArea(wxDC *dc) -{ - int cw, ch; - GetClientSize(&cw, &ch); - - dc->SetPen(*wxTRANSPARENT_PEN); - dc->SetBrush(*wxTheBrushList->FindOrCreateBrush(m_cellBackgroundColour, wxSOLID)); -// dc->DrawRectangle(m_leftOfSheet+m_verticalLabelWidth, m_topOfSheet+m_horizontalLabelHeight, -// m_rightOfSheet-(m_leftOfSheet+m_verticalLabelWidth) + 1, m_bottomOfSheet - (m_topOfSheet+m_horizontalLabelHeight) + 1); - dc->DrawRectangle(m_leftOfSheet+m_verticalLabelWidth, m_topOfSheet+m_horizontalLabelHeight, - cw-(m_leftOfSheet+m_verticalLabelWidth), ch - (m_topOfSheet+m_horizontalLabelHeight)); -} - -void wxGenericGrid::DrawGridLines(wxDC *dc) -{ - int cw, ch; - GetClientSize(&cw, &ch); - - int i; - - if (m_divisionPen) - { - dc->SetPen(*m_divisionPen); - - int heightCount = m_topOfSheet + m_horizontalLabelHeight; - - // Draw horizontal grey lines for cells - for (i = m_scrollPosY; i < (m_totalRows+1); i++) - { - if (heightCount > ch) - break; - else - { - dc->DrawLine(m_leftOfSheet, heightCount, - cw, heightCount); - if (i < m_totalRows) - heightCount += m_rowHeights[i]; - } - } - } - - if (m_verticalLabelWidth > 0) - { - dc->SetPen(*wxBLACK_PEN); - - // Draw horizontal black lines for row labels - int heightCount = m_topOfSheet + m_horizontalLabelHeight; - for (i = m_scrollPosY; i < (m_totalRows+1); i++) - { - if (heightCount > ch) - break; - else - { - dc->DrawLine(m_leftOfSheet, heightCount, - m_verticalLabelWidth, heightCount); - if (i < m_totalRows) - heightCount += m_rowHeights[i]; - } - } - // Draw a black vertical line for row number cells - dc->DrawLine(m_leftOfSheet + m_verticalLabelWidth, m_topOfSheet, - m_leftOfSheet + m_verticalLabelWidth, ch); - // First vertical line - dc->DrawLine(m_leftOfSheet, m_topOfSheet, m_leftOfSheet, ch); - - dc->SetPen(*wxWHITE_PEN); - - // Draw highlights on row labels - heightCount = m_topOfSheet + m_horizontalLabelHeight; - for (i = m_scrollPosY; i < m_totalRows; i++) - { - if (heightCount > ch) - break; - else - { - dc->DrawLine(m_leftOfSheet+1, heightCount+1, - m_verticalLabelWidth, heightCount+1); - dc->DrawLine(m_leftOfSheet+1, heightCount+1, - m_leftOfSheet+1, heightCount + m_rowHeights[i] - 1); - heightCount += m_rowHeights[i]; - } - } - // Last one - down to the floor. - dc->DrawLine(m_leftOfSheet+1, heightCount+1, - m_verticalLabelWidth, heightCount+1); - dc->DrawLine(m_leftOfSheet+1, heightCount+1, - m_leftOfSheet+1, ch); - - } - - if (m_divisionPen) - { - dc->SetPen(*m_divisionPen); - - // Draw vertical grey lines for cells - int widthCount = m_leftOfSheet + m_verticalLabelWidth; - for (i = m_scrollPosX; i < m_totalCols; i++) - { - if (widthCount > cw) - break; - else - { - // Skip the first one - if (i != m_scrollPosX) - { - dc->DrawLine(widthCount, m_topOfSheet + m_horizontalLabelHeight, - widthCount, m_bottomOfSheet); - } - widthCount += m_colWidths[i]; - } - } - // Last one - dc->DrawLine(widthCount, m_topOfSheet + m_horizontalLabelHeight, - widthCount, m_bottomOfSheet); - } - - dc->SetPen(*wxBLACK_PEN); - - // Draw two black horizontal lines for column number cells - dc->DrawLine( - m_leftOfSheet, m_topOfSheet, - cw, m_topOfSheet); - dc->DrawLine(m_leftOfSheet, m_topOfSheet + m_horizontalLabelHeight, - cw, m_topOfSheet + m_horizontalLabelHeight); - - if (m_horizontalLabelHeight > 0) - { - int widthCount = m_leftOfSheet + m_verticalLabelWidth; - - // Draw black vertical lines for column number cells - for (i = m_scrollPosX; i < m_totalCols; i++) - { - if (widthCount > cw) - break; - else - { - dc->DrawLine(widthCount, m_topOfSheet, - widthCount, m_topOfSheet + m_horizontalLabelHeight); - widthCount += m_colWidths[i]; - } - } - - // Last one - dc->DrawLine(widthCount, m_topOfSheet, - widthCount, m_topOfSheet + m_horizontalLabelHeight); - - // Draw highlights - dc->SetPen(*wxWHITE_PEN); - widthCount = m_leftOfSheet + m_verticalLabelWidth; - - for (i = m_scrollPosX; i < m_totalCols; i++) - { - if (widthCount > cw) - break; - else - { - dc->DrawLine(widthCount+1, m_topOfSheet+1, - widthCount+m_colWidths[i], m_topOfSheet+1); - dc->DrawLine(widthCount+1, m_topOfSheet+1, - widthCount+1, m_topOfSheet+m_horizontalLabelHeight); - widthCount += m_colWidths[i]; - } - } - // Last one - to the right side of the canvas. - dc->DrawLine(widthCount+1, m_topOfSheet+1, - cw, m_topOfSheet+1); - dc->DrawLine(widthCount+1, m_topOfSheet+1, - widthCount+1, m_topOfSheet+m_horizontalLabelHeight); - - } -} - -void wxGenericGrid::DrawColumnLabels(wxDC *dc) -{ - int cw, ch; - GetClientSize(&cw, &ch); - - if (m_horizontalLabelHeight == 0) - return; - - int i; - wxRectangle rect; - - // Draw letters for columns - rect.y = m_topOfSheet + 1; - rect.height = m_horizontalLabelHeight - 1; - - dc->SetTextBackground(m_labelBackgroundColour); - dc->SetBackgroundMode(wxTRANSPARENT); -// dc->SetTextForeground(m_labelTextColour); - - int widthCount = m_leftOfSheet + m_verticalLabelWidth; - for (i = m_scrollPosX; i < m_totalCols; i++) - { - if (widthCount > cw) - break; - else - { - rect.x = 1 + widthCount; - rect.width = m_colWidths[i]; - DrawColumnLabel(dc, &rect, i); - - widthCount += m_colWidths[i]; - } - } -} - -void wxGenericGrid::DrawColumnLabel(wxDC *dc, wxRectangle *rect, int col) -{ - wxGridCell *cell = GetLabelCell(wxHORIZONTAL, col); - if (cell) - { - wxRectangle rect2; - rect2 = *rect; - rect2.x += 3; - rect2.y += 2; - rect2.width -= 5; - rect2.height -= 4; - dc->SetTextForeground(GetLabelTextColour()); - dc->SetFont(*GetLabelTextFont()); - if ( !cell->GetTextValue().IsNull() ) - DrawTextRect(dc, cell->GetTextValue(), &rect2, GetLabelAlignment(wxHORIZONTAL)); - } -} - -void wxGenericGrid::DrawRowLabels(wxDC *dc) -{ - int cw, ch; - GetClientSize(&cw, &ch); - - if (m_verticalLabelWidth == 0) - return; - - int i; - wxRectangle rect; - - // Draw numbers for rows - rect.x = m_leftOfSheet; - rect.width = m_verticalLabelWidth; - - int heightCount = m_topOfSheet + m_horizontalLabelHeight; - - dc->SetTextBackground(m_labelBackgroundColour); - dc->SetBackgroundMode(wxTRANSPARENT); - - for (i = m_scrollPosY; i < m_totalRows; i++) - { - if (heightCount > ch) - break; - else - { - rect.y = 1 + heightCount; - rect.height = m_rowHeights[i]; - DrawRowLabel(dc, &rect, i); - - heightCount += m_rowHeights[i]; - } - } -} - -void wxGenericGrid::DrawRowLabel(wxDC *dc, wxRectangle *rect, int row) -{ - wxGridCell *cell = GetLabelCell(wxVERTICAL, row); - if (cell) - { - wxRectangle rect2; - rect2 = *rect; - rect2.x += 3; - rect2.y += 2; - rect2.width -= 5; - rect2.height -= 4; - dc->SetTextForeground(GetLabelTextColour()); - dc->SetFont(*GetLabelTextFont()); - if ( !cell->GetTextValue().IsNull() ) - DrawTextRect(dc, cell->GetTextValue(), &rect2, GetLabelAlignment(wxVERTICAL)); - } -} - -void wxGenericGrid::DrawCells(wxDC *dc) -{ - int cw, ch; - GetClientSize(&cw, &ch); - - int i,j; - - // Draw value corresponding to each cell - for (i = m_scrollPosY; i < m_totalRows; i++) - { - for (j = m_scrollPosX; j < m_totalCols; j++) - { - SetCurrentRect(i, j, cw, ch); - if (m_currentRectVisible) - { - DrawCellBackground(dc, &m_currentRect, i, j); - DrawCellValue(dc, &m_currentRect, i, j); - } - if (m_currentRect.x > cw) - break; - } - if (m_currentRect.y > ch) - break; - } - dc->SetBackgroundMode(wxSOLID); - dc->SetPen(*wxBLACK_PEN); -} - -void wxGenericGrid::DrawCellBackground(wxDC *dc, wxRectangle *rect, int row, int col) -{ - wxGridCell *cell = GetCell(row, col); - if (cell) - { - dc->SetBrush(*cell->GetBackgroundBrush()); - dc->SetPen(*wxTRANSPARENT_PEN); - -#if 0 // In wxWin 2.0 the dc code is exact. RR. -#ifdef __WXMOTIF__ - dc->DrawRectangle(rect->x+1, rect->y+1, rect->width-1, rect->height-1); -#else - dc->DrawRectangle(rect->x+1, rect->y+1, rect->width, rect->height); -#endif -#endif - - dc->DrawRectangle(rect->x+1, rect->y+1, rect->width-1, rect->height-1); - - dc->SetPen(*wxBLACK_PEN); - } -} - -void wxGenericGrid::DrawCellValue(wxDC *dc, wxRectangle *rect, int row, int col) -{ - wxGridCell *cell = GetCell(row, col); - if (cell) - { - wxBitmap *bitmap = cell->GetCellBitmap(); - wxRectangle rect2; - rect2 = *rect; - rect2.x += 3; - rect2.y += 2; - rect2.width -= 5; - rect2.height -= 4; - - if (bitmap) - { - DrawBitmapRect(dc, bitmap, &rect2, cell->GetAlignment()); - } - else - { - dc->SetBackgroundMode(wxTRANSPARENT); - dc->SetTextForeground(cell->GetTextColour()); - dc->SetFont(*cell->GetFont()); - - if ( !cell->GetTextValue().IsNull() ) - DrawTextRect(dc, cell->GetTextValue(), &rect2, cell->GetAlignment()); - } - } -} - -void wxGenericGrid::AdjustScrollbars(void) -{ - int cw, ch; - GetClientSize(&cw, &ch); - - // To calculate the number of steps for each scrollbar, - // we need to see how much will fit onto the canvas - // at the present size. So: - // 1) Find the *last* row r1 such that when it's at the top of the - // window, all the remaining rows are visible. - // 2) There should therefore be r1 - 1 steps in the scrollbar. - // Similarly with columns. - - // IGNORE THE ABOVE, it's crap. - // We find the view size by seeing how many rows/cols fit on - // the current view. - // BUT... this means that the scrollbar should be adjusted every time - // it's scrolled, as well as when sized, because with variable size rows/cols, - // the number of rows/col visible on the view differs according to what bit - // you're looking at. The object length is always the same, but the - // view length differs. - - // Since this may not be known until the end of this function, we should probably call AdjustScrollbars - // twice. - int vertScrollBarWidth = m_scrollWidth; - int horizScrollBarHeight = m_scrollWidth; - if (m_vScrollBar && !m_vScrollBar->IsShown()) - vertScrollBarWidth = 0; - if (m_hScrollBar && !m_hScrollBar->IsShown()) - horizScrollBarHeight = 0; - - int noHorizSteps = 0; - int noVertSteps = 0; - - if (m_totalGridWidth <= cw) - noHorizSteps = 0; - else - { - noHorizSteps = 0; - int widthCount = 0; -/* - if (GetLabelSize(wxVERTICAL) > 0) - noHorizSteps ++; -*/ - - int i; - int nx = 0; - for (i = m_scrollPosX ; i < m_totalCols; i++) - { - widthCount += m_colWidths[i]; - // A partial bit doesn't count, we still have to scroll to see the - // rest of it - if (widthCount + m_leftOfSheet + m_verticalLabelWidth > (cw-vertScrollBarWidth)) - break; - else - nx ++; - - } - - noHorizSteps += nx; - } - if (m_totalGridHeight <= ch) - noVertSteps = 0; - else - { - noVertSteps = 0; - int heightCount = 0; -/* - if (GetLabelSize(wxHORIZONTAL) > 0) - noVertSteps ++; -*/ - - int i; - int ny = 0; - for (i = m_scrollPosY ; i < m_totalRows; i++) - { - heightCount += m_rowHeights[i]; - // A partial bit doesn't count, we still have to scroll to see the - // rest of it - if (heightCount + m_topOfSheet + m_horizontalLabelHeight > (ch-horizScrollBarHeight)) - break; - else - ny ++; - } - - noVertSteps += ny; - } - - if (m_totalGridWidth <= cw) - { - if ( m_hScrollBar ) - m_hScrollBar->Show(FALSE); - SetScrollPosX(0); - } - else - { - if ( m_hScrollBar ) - m_hScrollBar->Show(TRUE); - } - - if (m_totalGridHeight <= ch) - { - if ( m_vScrollBar ) - m_vScrollBar->Show(FALSE); - SetScrollPosY(0); - } - else - { - if ( m_vScrollBar ) - m_vScrollBar->Show(TRUE); - } - - UpdateDimensions(); // Necessary in case m_scrollPosX/Y changed - - vertScrollBarWidth = m_scrollWidth; - horizScrollBarHeight = m_scrollWidth; - if (m_vScrollBar && !m_vScrollBar->IsShown()) - vertScrollBarWidth = 0; - if (m_hScrollBar && !m_hScrollBar->IsShown()) - horizScrollBarHeight = 0; - - if (m_hScrollBar) - { - int nCols = GetCols(); -/* - m_hScrollBar->SetPageSize(wxMax(noHorizSteps, 1)); - m_hScrollBar->SetViewLength(wxMax(noHorizSteps, 1)); - m_hScrollBar->SetObjectLength(nCols); -*/ - m_hScrollBar->SetScrollbar(m_hScrollBar->GetPosition(), wxMax(noHorizSteps, 1), nCols, wxMax(noHorizSteps, 1)); - - m_hScrollBar->SetSize(m_leftOfSheet, ch - m_scrollWidth -2, - cw - vertScrollBarWidth - m_leftOfSheet, m_scrollWidth); - } - - if (m_vScrollBar) - { - int nRows = GetRows(); -/* - m_vScrollBar->SetPageSize(wxMax(noVertSteps, 1)); - m_vScrollBar->SetViewLength(wxMax(noVertSteps, 1)); - m_vScrollBar->SetObjectLength(nRows); -*/ - - m_vScrollBar->SetScrollbar(m_vScrollBar->GetPosition(), wxMax(noVertSteps, 1), nRows, wxMax(noVertSteps, 1)); - m_vScrollBar->SetSize(cw - m_scrollWidth, m_topOfSheet, - m_scrollWidth, ch - m_topOfSheet - horizScrollBarHeight); - } -} - -void wxGenericGrid::OnSize(wxSizeEvent& WXUNUSED(event) ) -{ - if (!m_vScrollBar || !m_hScrollBar) - return; - - AdjustScrollbars(); - - int cw, ch; - GetClientSize(&cw, &ch); - - if (m_editCreated && m_editingPanel && GetTextItem() && GetTextItem()->IsShown()) - { - m_editingPanel->SetSize(0, 0, cw, m_editControlPosition.height + m_editControlPosition.y + 2); - GetTextItem()->SetSize(m_editControlPosition.x, m_editControlPosition.y, - cw - m_editControlPosition.x, m_editControlPosition.height); - } -} - -bool wxGenericGrid::CellHitTest(int x, int y, int *row, int *col) -{ - // Find the selected cell and call OnSelectCell - if (x >= (m_leftOfSheet + m_verticalLabelWidth) && y >= (m_topOfSheet + m_horizontalLabelHeight) && - x <= m_rightOfSheet && y <= m_bottomOfSheet) - { - // Calculate the cell number from x and y - x -= (m_verticalLabelWidth + m_leftOfSheet); - y -= (m_topOfSheet + m_horizontalLabelHeight); - - int i; - - // Now we need to do a hit test for which row we're on - int currentHeight = 0; - for (i = m_scrollPosY; i < m_totalRows; i++) - { - if (y >= currentHeight && y <= (currentHeight + m_rowHeights[i])) - { - *row = i; - break; - } - currentHeight += m_rowHeights[i]; - } - - // Now we need to do a hit test for which column we're on - int currentWidth = 0; - for (i = m_scrollPosX; i < m_totalCols; i++) - { - if (x >= currentWidth && x <= (currentWidth + m_colWidths[i])) - { - *col = i; - break; - } - currentWidth += m_colWidths[i]; - } - return TRUE; - } - return FALSE; -} - -bool wxGenericGrid::LabelSashHitTest(int x, int y, int *orientation, int *rowOrCol, int *startPos) -{ - int i; - int tolerance = 3; - - if (x >= (m_leftOfSheet + m_verticalLabelWidth) && y >= m_topOfSheet && - x <= m_rightOfSheet && y <= (m_topOfSheet + m_horizontalLabelHeight)) - { - // We may be on a column label sash. - int currentWidth = m_leftOfSheet + m_verticalLabelWidth; - for (i = m_scrollPosX; i < m_totalCols; i++) - { - if (x >= (currentWidth + m_colWidths[i] - tolerance) && x <= (currentWidth + m_colWidths[i] + tolerance)) - { - *orientation = wxHORIZONTAL; - *rowOrCol = i; - *startPos = currentWidth; - return TRUE; - } - currentWidth += m_colWidths[i]; - } - return FALSE; - } - else if (x >= m_leftOfSheet && y >= (m_topOfSheet + m_horizontalLabelHeight) && - x <= (m_leftOfSheet + m_verticalLabelWidth) && y <= m_bottomOfSheet) - { - // We may be on a row label sash. - int currentHeight = m_topOfSheet + m_horizontalLabelHeight; - for (i = m_scrollPosY; i < m_totalRows; i++) - { - if (y >= (currentHeight + m_rowHeights[i] - tolerance) && y <= (currentHeight + m_rowHeights[i] + tolerance)) - { - *orientation = wxVERTICAL; - *rowOrCol = i; - *startPos = currentHeight; - return TRUE; - } - currentHeight += m_rowHeights[i]; - } - return FALSE; - } - return FALSE; -} - -bool wxGenericGrid::LabelHitTest(int x, int y, int *row, int *col) -{ - // Find the selected label - if (x >= m_leftOfSheet && y >= m_topOfSheet && - x <= m_rightOfSheet && y <= m_bottomOfSheet) - { - // Calculate the cell number from x and y - x -= m_leftOfSheet; - y -= m_topOfSheet; - - int i; - - // Now we need to do a hit test for which row we're on - int currentHeight = m_horizontalLabelHeight; - for (i = m_scrollPosY; i < m_totalRows; i++) - { - if (y >= currentHeight && y <= (currentHeight + m_rowHeights[i])) - { - *row = i; - break; - } - currentHeight += m_rowHeights[i]; - } - if (y >= 0 && y <= m_horizontalLabelHeight) - { - *row = -1; - } - - // Now we need to do a hit test for which column we're on - int currentWidth = m_verticalLabelWidth; - for (i = m_scrollPosX; i < m_totalCols; i++) - { - if (x >= currentWidth && x <= (currentWidth + m_colWidths[i])) - { - *col = i; - break; - } - currentWidth += m_colWidths[i]; - } - if (x >= 0 && x <= m_verticalLabelWidth) - { - *col = -1; - } - - if ((*col == -1) || (*row == -1)) - { - return TRUE; - } - } - return FALSE; -} - -void wxGenericGrid::OnMouseEvent(wxMouseEvent& ev) -{ - if (ev.LeftDown()) - { - wxClientDC dc(this); - dc.BeginDrawing(); - - int row, col; - if (CellHitTest((int)ev.GetX(), (int)ev.GetY(), &row, &col)) - { - OnSelectCellImplementation(& dc, row, col); - OnCellLeftClick(row, col, (int)ev.GetX(), (int)ev.GetY(), ev.ControlDown(), ev.ShiftDown()); - } - if (LabelHitTest((int)ev.GetX(), (int)ev.GetY(), &row, &col)) - { - OnLabelLeftClick(row, col, (int)ev.GetX(), (int)ev.GetY(), ev.ControlDown(), ev.ShiftDown()); - } - dc.EndDrawing(); - } - else if (ev.Dragging() && ev.LeftIsDown()) - { - switch (m_dragStatus) - { - case wxGRID_DRAG_NONE: - { - int orientation; - if (LabelSashHitTest((int)ev.GetX(), (int)ev.GetY(), &orientation, &m_dragRowOrCol, &m_dragStartPosition)) - { - if (orientation == wxHORIZONTAL) - { - m_dragStatus = wxGRID_DRAG_LEFT_RIGHT; - SetCursor(*m_horizontalSashCursor); - m_dragLastPosition = (int)ev.GetX(); - } - else - { - m_dragStatus = wxGRID_DRAG_UP_DOWN; - SetCursor(*m_verticalSashCursor); - m_dragLastPosition = (int)ev.GetY(); - } - wxClientDC dc(this); - dc.BeginDrawing(); - dc.SetLogicalFunction(wxINVERT); - if (orientation == wxHORIZONTAL) - dc.DrawLine((int)ev.GetX(), m_topOfSheet, (int)ev.GetX(), m_bottomOfSheet); - else - dc.DrawLine(m_leftOfSheet, (int)ev.GetY(), m_rightOfSheet, (int)ev.GetY()); - dc.EndDrawing(); - - CaptureMouse(); - } - break; - } - case wxGRID_DRAG_LEFT_RIGHT: - { - wxClientDC dc(this); - dc.BeginDrawing(); - dc.SetLogicalFunction(wxINVERT); - dc.DrawLine(m_dragLastPosition, m_topOfSheet, m_dragLastPosition, m_bottomOfSheet); - - dc.DrawLine((int)ev.GetX(), m_topOfSheet, (int)ev.GetX(), m_bottomOfSheet); - dc.EndDrawing(); - - m_dragLastPosition = (int)ev.GetX(); - SetCursor(*m_horizontalSashCursor); - break; - } - case wxGRID_DRAG_UP_DOWN: - { - wxClientDC dc(this); - dc.BeginDrawing(); - dc.SetLogicalFunction(wxINVERT); - dc.DrawLine(m_leftOfSheet, m_dragLastPosition, m_rightOfSheet, m_dragLastPosition); - - dc.DrawLine(m_leftOfSheet, (int)ev.GetY(), m_rightOfSheet, (int)ev.GetY()); - dc.EndDrawing(); - - m_dragLastPosition = (int)ev.GetY(); - SetCursor(*m_verticalSashCursor); - break; - } - } - } - else if (ev.Moving()) - { - int rowOrCol, orientation, startPos; - if (LabelSashHitTest((int)ev.GetX(), (int)ev.GetY(), &orientation, &rowOrCol, &startPos)) - { - if (orientation == wxHORIZONTAL) - SetCursor(*m_horizontalSashCursor); - else - SetCursor(*m_verticalSashCursor); - } - else - SetCursor(*wxSTANDARD_CURSOR); - } - else if (ev.LeftUp()) - { - switch (m_dragStatus) - { - case wxGRID_DRAG_LEFT_RIGHT: - { - wxClientDC dc(this); - dc.BeginDrawing(); - dc.SetLogicalFunction(wxINVERT); - dc.DrawLine(m_dragLastPosition, m_topOfSheet, m_dragLastPosition, m_bottomOfSheet); - dc.SetLogicalFunction(wxCOPY); - dc.EndDrawing(); - - ReleaseMouse(); - if (ev.GetX() > m_dragStartPosition) - { - m_colWidths[m_dragRowOrCol] = (short)(ev.GetX() - m_dragStartPosition); - UpdateDimensions(); - AdjustScrollbars(); - Refresh(); - } - SetCursor(*wxSTANDARD_CURSOR); - int cw, ch; - GetClientSize(&cw, &ch); - wxSizeEvent evt; - OnSize(evt); - break; - } - case wxGRID_DRAG_UP_DOWN: - { - wxClientDC dc(this); - dc.BeginDrawing(); - dc.SetLogicalFunction(wxINVERT); - dc.DrawLine(m_leftOfSheet, m_dragLastPosition, m_rightOfSheet, m_dragLastPosition); - dc.SetLogicalFunction(wxCOPY); - dc.EndDrawing(); - - ReleaseMouse(); - if (ev.GetY() > m_dragStartPosition) - { - m_rowHeights[m_dragRowOrCol] = (short)(ev.GetY() - m_dragStartPosition); - UpdateDimensions(); - AdjustScrollbars(); - Refresh(); - } - SetCursor(*wxSTANDARD_CURSOR); - break; - } - } - m_dragStatus = wxGRID_DRAG_NONE; - } - else if (ev.RightDown()) - { - int row, col; - if (CellHitTest((int)ev.GetX(), (int)ev.GetY(), &row, &col)) - { - OnCellRightClick(row, col, (int)ev.GetX(), (int)ev.GetY(), ev.ControlDown(), ev.ShiftDown()); - } - if (LabelHitTest((int)ev.GetX(), (int)ev.GetY(), &row, &col)) - { - OnLabelRightClick(row, col, (int)ev.GetX(), (int)ev.GetY(), ev.ControlDown(), ev.ShiftDown()); - } - } -} - -void wxGenericGrid::OnSelectCellImplementation(wxDC *dc, int row, int col) -{ - m_wCursorColumn = col; - m_wCursorRow = row; - - OnChangeSelectionLabel(); - - SetGridClippingRegion(dc); - - // Remove the highlight from the old cell - if (m_currentRectVisible) - HighlightCell(dc); - - // Highlight the new cell and copy its content to the edit control - SetCurrentRect(m_wCursorRow, m_wCursorColumn); - wxGridCell *cell = GetCell(m_wCursorRow, m_wCursorColumn); - if (cell) - { - if ( cell->GetTextValue().IsNull() ) - m_textItem->SetValue(""); - else - m_textItem->SetValue(cell->GetTextValue()); - } - - SetGridClippingRegion(dc); - - // Why isn't this needed for Windows?? - // Probably because of the SetValue?? - // Arrrrrgh. This isn't needed anywhere, of course. RR. -#ifndef __WXMSW__ -// HighlightCell(dc); -#endif - dc->DestroyClippingRegion(); - - OnSelectCell(row, col); -} - -wxGridCell *wxGenericGrid::OnCreateCell(void) -{ - return new wxGridCell(this); -} - -void wxGenericGrid::OnChangeLabels(void) -{ - char buf[100]; - int i; - for (i = 0; i < m_totalRows; i++) - { - sprintf(buf, "%d", i+1); - SetLabelValue(wxVERTICAL, buf, i); - } - // A...Z,AA...ZZ,AAA...ZZZ, etc. - for (i = 0; i < m_totalCols; i++) - { - int j; - int noTimes = (i/26 + 1); - int ch = (i % 26) + 65; - buf[0] = 0; - for (j = 0; j < noTimes; j++) - { - char buf2[20]; - sprintf(buf2, "%c", (char)ch); - strcat(buf, buf2); - } - SetLabelValue(wxHORIZONTAL, buf, i); - } -} - -void wxGenericGrid::OnChangeSelectionLabel(void) -{ - if (!GetEditable()) - return; - - wxString rowLabel(GetLabelValue(wxVERTICAL, GetCursorRow())); - wxString colLabel(GetLabelValue(wxHORIZONTAL, GetCursorColumn())); - - wxString newLabel = colLabel + rowLabel; - if ((newLabel.Length() > 0) && (newLabel.Length() <= 8) && GetTextItem()) - { -// GetTextItem()->SetLabel(newLabel); - } -} - -void wxGenericGrid::HighlightCell(wxDC *dc) -{ - dc->SetLogicalFunction(wxINVERT); - - // Top - dc->DrawLine( m_currentRect.x + 1, - m_currentRect.y + 1, - m_currentRect.x + m_currentRect.width - 1, - m_currentRect.y + 1); - // Right - dc->DrawLine( m_currentRect.x + m_currentRect.width - 1, - m_currentRect.y + 1, - m_currentRect.x + m_currentRect.width - 1, - m_currentRect.y +m_currentRect.height - 1 ); - // Bottom - dc->DrawLine( m_currentRect.x + m_currentRect.width - 1, - m_currentRect.y + m_currentRect.height - 1, - m_currentRect.x + 1, - m_currentRect.y + m_currentRect.height - 1); - // Left - dc->DrawLine( m_currentRect.x + 1, - m_currentRect.y + m_currentRect.height - 1, - m_currentRect.x + 1, - m_currentRect.y + 1); - - dc->SetLogicalFunction(wxCOPY); -} - -void wxGenericGrid::DrawCellText(void) -{ - if (!m_currentRectVisible) - return; - - wxGridCell *cell = GetCell(GetCursorRow(), GetCursorColumn()); - if (!cell) - return; - - static char szEdit[300]; - - wxClientDC dc(this); - dc.BeginDrawing(); - - SetGridClippingRegion(& dc); - - dc.SetBackgroundMode(wxTRANSPARENT); - dc.SetBrush(*cell->GetBackgroundBrush()); - - strcpy(szEdit, m_textItem->GetValue()); - - wxRectangle rect; - rect = m_currentRect; - rect.x += 3; - rect.y += 2; - rect.width -= 5; - rect.height -= 4; - - DrawTextRect(& dc, " ", &rect, wxLEFT); - DrawTextRect(& dc, szEdit, &rect, cell->GetAlignment()); - - dc.DestroyClippingRegion(); - - dc.SetBackgroundMode(wxSOLID); - - dc.EndDrawing(); -} - -void wxGenericGrid::SetCurrentRect(int Row, int Column, int canvasW, int canvasH) -{ - int currentWidth = m_leftOfSheet + m_verticalLabelWidth; - int i; - for (i = m_scrollPosX; i < Column; i++) - currentWidth += m_colWidths[i]; - - int currentHeight = m_topOfSheet + m_horizontalLabelHeight; - for (i = m_scrollPosY; i < Row; i++) - currentHeight += m_rowHeights[i]; - - m_currentRect.x = currentWidth; - m_currentRect.y = currentHeight; - m_currentRect.width = m_colWidths ? (m_colWidths[Column]) : 0; - m_currentRect.height = m_rowHeights ? (m_rowHeights[Row]) : 0; - - if (Row < m_scrollPosY || Column < m_scrollPosX) - m_currentRectVisible = FALSE; - else if ((canvasW != -1 && canvasH != -1) && (m_currentRect.x > canvasW || m_currentRect.y > canvasH)) - m_currentRectVisible = FALSE; - else m_currentRectVisible = TRUE; -} - -static bool wxRectIntersection(wxRectangle *rect1, wxRectangle *rect2, wxRectangle *rect3) -{ - int x2_1 = rect1->x + rect1->width; - int y2_1 = rect1->y + rect1->height; - - int x2_2 = rect2->x + rect2->width; - int y2_2 = rect2->y + rect2->height; - - int x2_3, y2_3; - - // Check for intersection - if ((rect1->x > x2_2) || (rect2->x > x2_1) || - (rect1->y > y2_2) || (rect2->y > y2_1)) - { - // No intersection - rect3->x = rect3->y = rect3->width = rect3->height = 0; - return FALSE; - } - - if (rect1->x > rect2->x) - rect3->x = rect1->x; - else - rect3->x = rect2->x; - if (rect1->y > rect2->y) - rect3->y = rect1->y; - else - rect3->y = rect2->y; - - if (x2_1 > x2_2) - x2_3 = x2_2; - else - x2_3 = x2_1; - if (y2_1 > y2_2) - y2_3 = y2_2; - else - y2_3 = y2_1; - - rect3->width = (int)(x2_3 - rect3->x); - rect3->height = (int)(y2_3 - rect3->y); - return TRUE; -} - -void wxGenericGrid::DrawTextRect(wxDC *dc, const wxString& text, wxRectangle *rect, int flag) -{ - dc->BeginDrawing(); - - // Ultimately, this functionality should be built into wxWindows, - // and optimized for each platform. E.g. on Windows, use DrawText - // passing a clipping rectangle, so that the wxWindows clipping region - // does not have to be used to implement this. - - // If we're already clipping, we need to find the intersection - // between current clipping area and text clipping area. - - wxRectangle clipRect; - wxRectangle clipRect2; - long clipX, clipY, clipW, clipH; - dc->GetClippingBox(&clipX, &clipY, &clipW, &clipH); - clipRect.x = (int)clipX; clipRect.y = (int)clipY; - clipRect.width = (int)clipW; clipRect.height = (int)clipH; - - bool alreadyClipping = TRUE; - - if (clipRect.x == 0 && clipRect.y == 0 && clipRect.width == 0 && clipRect.height == 0) - { - alreadyClipping = FALSE; - clipRect2.x = rect->x; clipRect2.y = rect->y; - clipRect2.width = rect->width; clipRect2.height = rect->height; - } - else - { - // Find intersection. - if (!wxRectIntersection(rect, &clipRect, &clipRect2)) - return; - } - - if (alreadyClipping) - dc->DestroyClippingRegion(); - - dc->SetClippingRegion(clipRect2.x, clipRect2.y, clipRect2.width, clipRect2.height); - long textWidth, textHeight; - - dc->GetTextExtent(text, &textWidth, &textHeight); - - // Do alignment - float x,y; - switch (flag) - { - case wxRIGHT: - { - x = (rect->x + rect->width - textWidth - 1.0); - y = (rect->y + (rect->height - textHeight)/2.0); - break; - } - case wxCENTRE: - { - x = (rect->x + (rect->width - textWidth)/2.0); - y = (rect->y + (rect->height - textHeight)/2.0); - break; - } - case wxLEFT: - default: - { - x = (rect->x + 1.0); - y = (rect->y + (rect->height - textHeight)/2.0); - break; - } - } - dc->DrawText(text, (long)x, (long)y ); - - dc->DestroyClippingRegion(); - - // Restore old clipping - if (alreadyClipping) - dc->SetClippingRegion(clipRect.x, clipRect.y, clipRect.width, clipRect.height); - - dc->EndDrawing(); -} - -void wxGenericGrid::DrawBitmapRect(wxDC *dc, wxBitmap *bitmap, wxRectangle *rect, int flag) -{ - dc->BeginDrawing(); - - // Ultimately, this functionality should be built into wxWindows, - // and optimized for each platform. E.g. on Windows, use DrawText - // passing a clipping rectangle, so that the wxWindows clipping region - // does not have to be used to implement this. - - // If we're already clipping, we need to find the intersection - // between current clipping area and text clipping area. - - wxRectangle clipRect; - wxRectangle clipRect2; - long clipX, clipY, clipW, clipH; - dc->GetClippingBox(&clipX, &clipY, &clipW, &clipH); - clipRect.x = (int)clipX; clipRect.y = (int)clipY; - clipRect.width = (int)clipW; clipRect.height = (int)clipH; - - bool alreadyClipping = TRUE; - - if (clipRect.x == 0 && clipRect.y == 0 && clipRect.width == 0 && clipRect.height == 0) - { - alreadyClipping = FALSE; - clipRect2.x = rect->x; clipRect2.y = rect->y; - clipRect2.width = rect->width; clipRect2.height = rect->height; - } - else - { - // Find intersection. - if (!wxRectIntersection(rect, &clipRect, &clipRect2)) - return; - } - - if (alreadyClipping) - dc->DestroyClippingRegion(); - - dc->SetClippingRegion(clipRect2.x, clipRect2.y, clipRect2.width, clipRect2.height); - float bitmapWidth, bitmapHeight; - - bitmapWidth = bitmap->GetWidth(); - bitmapHeight = bitmap->GetHeight(); - - // Do alignment - long x,y; - switch (flag) - { - case wxRIGHT: - { - x = (long)(rect->x + rect->width - bitmapWidth - 1); - y = (long)(rect->y + (rect->height - bitmapHeight)/2.0); - break; - } - case wxCENTRE: - { - x = (long)(rect->x + (rect->width - bitmapWidth)/2.0); - y = (long)(rect->y + (rect->height - bitmapHeight)/2.0); - break; - } - case wxLEFT: - default: - { - x = (long)(rect->x + 1); - y = (long)(rect->y + (rect->height - bitmapHeight)/2.0); - break; - } - } - wxMemoryDC dcTemp; - dcTemp.SelectObject(*bitmap); - - dc->Blit( (long)x, (long)y, (long)bitmapWidth, (long)bitmapHeight, &dcTemp, 0, 0); - dcTemp.SelectObject(wxNullBitmap); - - dc->DestroyClippingRegion(); - - // Restore old clipping - if (alreadyClipping) - dc->SetClippingRegion(clipRect.x, clipRect.y, clipRect.width, clipRect.height); - - dc->EndDrawing(); -} - -void wxGenericGrid::OnActivate(bool active) -{ - if (active) - { - // Edit control should always have the focus - if (GetTextItem() && GetEditable()) - { - GetTextItem()->SetFocus(); - wxGridCell *cell = GetCell(GetCursorRow(), GetCursorColumn()); - if (cell) - GetTextItem()->SetValue(cell->GetTextValue()); - } - } -} - -void wxGenericGrid::SetCellValue(const wxString& val, int row, int col) -{ - wxGridCell *cell = GetCell(row, col); - if (cell) - { - cell->SetTextValue(val); - - RefreshCell(row, col, TRUE); - } -} - -void wxGenericGrid::RefreshCell(int row, int col, bool setText) -{ - // Don't refresh within a pair of batch brackets - if (GetBatchCount() > 0) - return; - - int cw, ch; - GetClientSize(&cw, &ch); - - SetCurrentRect(row, col, cw, ch); - if (m_currentRectVisible) - { - wxGridCell *cell = GetCell(row, col); - - bool currentPos = FALSE; - if (row == m_wCursorRow && col == m_wCursorColumn && GetTextItem() && GetTextItem()->IsShown() && setText) - { - GetTextItem()->SetValue(cell->GetTextValue()); - currentPos = TRUE; - } - // Gets refreshed anyway in MSW -#ifdef __WXMSW__ - if (!currentPos) -#endif - { - wxClientDC dc(this); - dc.BeginDrawing(); - DrawCellBackground(& dc, &m_currentRect, row, col); - DrawCellValue(& dc, &m_currentRect, row, col); - dc.EndDrawing(); - } - } -} - -wxString& wxGenericGrid::GetCellValue(int row, int col) -{ - static wxString emptyString(""); - - wxGridCell *cell = GetCell(row, col); - if (cell) - return cell->GetTextValue(); - else - return emptyString; -} - -void wxGenericGrid::SetColumnWidth(int col, int width) -{ - if (col <= m_totalCols) - m_colWidths[col] = width; -} - -int wxGenericGrid::GetColumnWidth(int col) -{ - if (col <= m_totalCols) - return m_colWidths[col]; - else - return 0; -} - -void wxGenericGrid::SetRowHeight(int row, int height) -{ - if (row <= m_totalRows) - m_rowHeights[row] = height; -} - -int wxGenericGrid::GetRowHeight(int row) -{ - if (row <= m_totalRows) - return m_rowHeights[row]; - else - return 0; -} - -void wxGenericGrid::SetLabelSize(int orientation, int sz) -{ - if (orientation == wxHORIZONTAL) - m_horizontalLabelHeight = sz; - else - m_verticalLabelWidth = sz; - UpdateDimensions(); - SetCurrentRect(GetCursorRow(), GetCursorColumn()); -} - -int wxGenericGrid::GetLabelSize(int orientation) -{ - if (orientation == wxHORIZONTAL) - return m_horizontalLabelHeight; - else - return m_verticalLabelWidth; -} - -wxGridCell *wxGenericGrid::GetLabelCell(int orientation, int pos) -{ - if (orientation == wxHORIZONTAL) - { - if (m_colLabelCells && pos < m_totalCols) - return m_colLabelCells[pos]; - else - return (wxGridCell *) NULL; - } - else - { - if (m_rowLabelCells && pos < m_totalRows) - return m_rowLabelCells[pos]; - else - return (wxGridCell *) NULL; - } -} - -void wxGenericGrid::SetLabelValue(int orientation, const wxString& val, int pos) -{ - wxGridCell *cell = GetLabelCell(orientation, pos); - if (cell) - cell->SetTextValue(val); -} - -wxString& wxGenericGrid::GetLabelValue(int orientation, int pos) -{ - static wxString emptyString = ""; - wxGridCell *cell = GetLabelCell(orientation, pos); - if (cell) - return cell->GetTextValue(); - else - return emptyString; -} - -void wxGenericGrid::SetLabelAlignment(int orientation, int align) -{ - if (orientation == wxHORIZONTAL) - m_horizontalLabelAlignment = align; - else - m_verticalLabelAlignment = align; - UpdateDimensions(); - SetCurrentRect(GetCursorRow(), GetCursorColumn()); -} - -int wxGenericGrid::GetLabelAlignment(int orientation) -{ - if (orientation == wxHORIZONTAL) - return m_horizontalLabelAlignment; - else - return m_verticalLabelAlignment; -} - -void wxGenericGrid::SetLabelTextColour(const wxColour& colour) -{ - m_labelTextColour = colour; - -} - -void wxGenericGrid::SetLabelBackgroundColour(const wxColour& colour) -{ - m_labelBackgroundColour = colour; - m_labelBackgroundBrush = wxTheBrushList->FindOrCreateBrush(m_labelBackgroundColour, wxSOLID); -} - -void wxGenericGrid::SetEditable(bool edit) -{ - m_editable = edit; - if (edit) - { - int controlW, controlH; - m_textItem->GetSize(&controlW, &controlH); - m_editControlPosition.height = controlH; - - m_topOfSheet = m_editControlPosition.x + controlH + 2; - if (m_textItem) - { - m_editingPanel->Show(TRUE); - m_textItem->Show(TRUE); - m_textItem->SetFocus(); - } - } - else - { - m_topOfSheet = 0; - if (m_textItem) - { - m_textItem->Show(FALSE); - m_editingPanel->Show(FALSE); - } - } - UpdateDimensions(); - SetCurrentRect(GetCursorRow(), GetCursorColumn()); - - int cw, ch; - GetClientSize(&cw, &ch); - wxSizeEvent evt; - OnSize(evt); -/* - int cw, ch; - int m_scrollWidth = 16; - GetClientSize(&cw, &ch); - - if (m_vScrollBar) - m_vScrollBar->SetSize(cw - m_scrollWidth, m_topOfSheet, - m_scrollWidth, ch - m_topOfSheet - m_scrollWidth); -*/ -} - -void wxGenericGrid::SetCellAlignment(int flag, int row, int col) -{ - wxGridCell *cell = GetCell(row, col); - if (cell) - cell->SetAlignment(flag); -} - -int wxGenericGrid::GetCellAlignment(int row, int col) -{ - wxGridCell *cell = GetCell(row, col); - if (cell) - return cell->GetAlignment(); - else - return m_cellAlignment; -} - -void wxGenericGrid::SetCellAlignment(int flag) -{ - m_cellAlignment = flag; - int i,j; - for (i = 0; i < GetRows(); i++) - for (j = 0; j < GetCols(); j++) - if (GetCell(i, j)) - GetCell(i, j)->SetAlignment(flag); -} - -int wxGenericGrid::GetCellAlignment(void) -{ - return m_cellAlignment; -} - -void wxGenericGrid::SetCellBackgroundColour(const wxColour& col) -{ - m_cellBackgroundColour = col; - int i,j; - for (i = 0; i < GetRows(); i++) - for (j = 0; j < GetCols(); j++) - if (GetCell(i, j)) - GetCell(i, j)->SetBackgroundColour(col); -} - -void wxGenericGrid::SetCellBackgroundColour(const wxColour& val, int row, int col) -{ - wxGridCell *cell = GetCell(row, col); - if (cell) - { - cell->SetBackgroundColour(val); - RefreshCell(row, col); - } -} - -wxColour& wxGenericGrid::GetCellBackgroundColour(int row, int col) -{ - wxGridCell *cell = GetCell(row, col); - if (cell) - return cell->GetBackgroundColour(); - else - return m_cellBackgroundColour; -} - -void wxGenericGrid::SetCellTextColour(const wxColour& val, int row, int col) -{ - wxGridCell *cell = GetCell(row, col); - if (cell) - { - cell->SetTextColour(val); - RefreshCell(row, col); - } -} - -void wxGenericGrid::SetCellTextFont(wxFont *fnt, int row, int col) -{ - wxGridCell *cell = GetCell(row, col); - if (cell) - { - cell->SetFont(fnt); - RefreshCell(row, col); - } -} - -wxFont *wxGenericGrid::GetCellTextFont(int row, int col) -{ - wxGridCell *cell = GetCell(row, col); - if (cell) - return cell->GetFont(); - else - return m_cellTextFont; -} - -wxColour& wxGenericGrid::GetCellTextColour(int row, int col) -{ - wxGridCell *cell = GetCell(row, col); - if (cell) - return cell->GetTextColour(); - else - return m_cellTextColour; -} - -void wxGenericGrid::SetCellTextColour(const wxColour& val) -{ - m_cellTextColour = val; - int i,j; - for (i = 0; i < GetRows(); i++) - for (j = 0; j < GetCols(); j++) - if (GetCell(i, j)) - GetCell(i, j)->SetTextColour(val); -} - -void wxGenericGrid::SetCellTextFont(wxFont *fnt) -{ - m_cellTextFont = fnt; - int i,j; - for (i = 0; i < GetRows(); i++) - for (j = 0; j < GetCols(); j++) - if (GetCell(i, j)) - GetCell(i, j)->SetFont(fnt); -} - -void wxGenericGrid::SetCellBitmap(wxBitmap *bitmap, int row, int col) -{ - wxGridCell *cell = GetCell(row, col); - if (cell) - { - cell->SetCellBitmap(bitmap); - RefreshCell(row, col); - } -} - -wxBitmap *wxGenericGrid::GetCellBitmap(int row, int col) -{ - wxGridCell *cell = GetCell(row, col); - if (cell) - { - return cell->GetCellBitmap(); - } - else - return (wxBitmap *) NULL; -} - -bool wxGenericGrid::InsertCols(int pos, int n, bool updateLabels) -{ - if (pos > m_totalCols) - return FALSE; - - if (!m_gridCells) - return CreateGrid(1, n); - else - { - int i, j; - // Cells - for (i = 0; i < m_totalRows; i++) - { - wxGridCell **cols = m_gridCells[i]; - wxGridCell **newCols = new wxGridCell *[m_totalCols + n]; - for (j = 0; j < pos; j++) - newCols[j] = cols[j]; - for (j = pos; j < pos + n; j++) - newCols[j] = new wxGridCell(this); - for (j = pos + n; j < m_totalCols + n; j++) - newCols[j] = cols[j - n]; - - delete[] cols; - m_gridCells[i] = newCols; - } - - // Column widths - short *newColWidths = new short[m_totalCols + n]; - for (j = 0; j < pos; j++) - newColWidths[j] = m_colWidths[j]; - for (j = pos; j < pos + n; j++) - newColWidths[j] = wxGRID_DEFAULT_CELL_WIDTH; - for (j = pos + n; j < m_totalCols + n; j++) - newColWidths[j] = m_colWidths[j - n]; - delete[] m_colWidths; - m_colWidths = newColWidths; - - // Column labels - wxGridCell **newLabels = new wxGridCell *[m_totalCols + n]; - for (j = 0; j < pos; j++) - newLabels[j] = m_colLabelCells[j]; - for (j = pos; j < pos + n; j++) - newLabels[j] = new wxGridCell(this); - for (j = pos + n; j < m_totalCols + n; j++) - newLabels[j] = m_colLabelCells[j - n]; - - delete[] m_colLabelCells; - m_colLabelCells = newLabels; - - m_totalCols += n; - - if (updateLabels) - OnChangeLabels(); - UpdateDimensions(); - AdjustScrollbars(); - return TRUE; - } -} - -bool wxGenericGrid::InsertRows(int pos, int n, bool updateLabels) -{ - if (pos > m_totalRows) - return FALSE; - - if (!m_gridCells) - return CreateGrid(n, 1); - else - { - int i, j; - - wxGridCell ***rows = new wxGridCell **[m_totalRows + n]; - - // Cells - for (i = 0; i < pos; i++) - rows[i] = m_gridCells[i]; - - for (i = pos; i < pos + n; i++) - { - rows[i] = new wxGridCell *[m_totalCols]; - for (j = 0; j < m_totalCols; j++) - rows[i][j] = new wxGridCell(this); - } - - for (i = pos + n; i < m_totalRows + n; i++) - rows[i] = m_gridCells[i - n]; - - delete[] m_gridCells; - m_gridCells = rows; - - // Row heights - short *newRowHeights = new short[m_totalRows + n]; - for (i = 0; i < pos; i++) - newRowHeights[i] = m_rowHeights[i]; - for (i = pos; i < pos + n; i++) - newRowHeights[i] = wxGRID_DEFAULT_CELL_HEIGHT; - for (i = pos + n; i < m_totalRows + n; i++) - newRowHeights[i] = m_rowHeights[i - n]; - delete[] m_rowHeights; - m_rowHeights = newRowHeights; - - // Column labels - wxGridCell **newLabels = new wxGridCell *[m_totalRows + n]; - for (i = 0; i < pos; i++) - newLabels[i] = m_rowLabelCells[i]; - for (i = pos; i < pos + n; i++) - newLabels[i] = new wxGridCell(this); - for (i = pos + n; i < m_totalRows + n; i++) - newLabels[i] = m_rowLabelCells[i - n]; - - delete[] m_rowLabelCells; - m_rowLabelCells = newLabels; - - m_totalRows += n; - - if (updateLabels) - OnChangeLabels(); - UpdateDimensions(); - AdjustScrollbars(); - return TRUE; - } -} - -bool wxGenericGrid::AppendCols(int n, bool updateLabels) -{ - return InsertCols(GetCols(), n, updateLabels); -} - -bool wxGenericGrid::AppendRows(int n, bool updateLabels) -{ - return InsertRows(GetRows(), n, updateLabels); -} - -bool wxGenericGrid::DeleteRows(int pos, int n, bool updateLabels) -{ - if (pos > m_totalRows) - return FALSE; - if (!m_gridCells) - return FALSE; - - int i; - - wxGridCell ***rows = new wxGridCell **[m_totalRows - n]; - - // Cells - for (i = 0; i < pos; i++) - rows[i] = m_gridCells[i]; - - for (i = pos + n; i < m_totalRows; i++) - rows[i-n] = m_gridCells[i]; - - delete[] m_gridCells; - m_gridCells = rows; - - // Row heights - short *newRowHeights = new short[m_totalRows - n]; - for (i = 0; i < pos; i++) - newRowHeights[i] = m_rowHeights[i]; - for (i = pos + n; i < m_totalRows; i++) - newRowHeights[i-n] = m_rowHeights[i]; - delete[] m_rowHeights; - m_rowHeights = newRowHeights; - - // Column labels - wxGridCell **newLabels = new wxGridCell *[m_totalRows - n]; - for (i = 0; i < pos; i++) - newLabels[i] = m_rowLabelCells[i]; - for (i = pos + n; i < m_totalRows; i++) - newLabels[i-n] = m_rowLabelCells[i]; - - delete[] m_rowLabelCells; - m_rowLabelCells = newLabels; - - m_totalRows -= n; - - if (updateLabels) - OnChangeLabels(); - UpdateDimensions(); - AdjustScrollbars(); - return TRUE; -} - -bool wxGenericGrid::DeleteCols(int pos, int n, bool updateLabels) -{ - if (pos + n > m_totalCols) - return FALSE; - if (!m_gridCells) - return FALSE; - - int i, j; - - // Cells - for (i = 0; i < m_totalRows; i++) - { - wxGridCell **cols = m_gridCells[i]; - wxGridCell **newCols = new wxGridCell *[m_totalCols - n]; - for (j = 0; j < pos; j++) - newCols[j] = cols[j]; - for (j = pos; j < pos + n; j++) - delete cols[j]; - for (j = pos + n; j < m_totalCols; j++) - newCols[j-n] = cols[j]; - - delete[] cols; - m_gridCells[i] = newCols; - } - - // Column widths - short *newColWidths = new short[m_totalCols - n]; - for (j = 0; j < pos; j++) - newColWidths[j] = m_colWidths[j]; - for (j = pos + n; j < m_totalCols; j++) - newColWidths[j-n] = m_colWidths[j]; - delete[] m_colWidths; - m_colWidths = newColWidths; - - // Column labels - wxGridCell **newLabels = new wxGridCell *[m_totalCols - n]; - for (j = 0; j < pos; j++) - newLabels[j] = m_colLabelCells[j]; - for (j = pos + n; j < m_totalCols; j++) - newLabels[j-n] = m_colLabelCells[j]; - - delete[] m_colLabelCells; - m_colLabelCells = newLabels; - - m_totalCols -= n; - - if (updateLabels) - OnChangeLabels(); - UpdateDimensions(); - AdjustScrollbars(); - return TRUE; -} - -void wxGenericGrid::SetGridCursor(int row, int col) -{ - if (row >= m_totalRows || col >= m_totalCols) - return; - - if (row == GetCursorRow() && col == GetCursorColumn()) - return; - - wxClientDC dc(this); - dc.BeginDrawing(); - - SetGridClippingRegion(& dc); - - if (m_currentRectVisible) - HighlightCell(& dc); - - m_wCursorRow = row; - m_wCursorColumn = col; - SetCurrentRect(row, col); - if (m_currentRectVisible) - HighlightCell(& dc); - - dc.DestroyClippingRegion(); - dc.EndDrawing(); -} - -/* - * Grid cell - */ - -wxGridCell::wxGridCell(wxGenericGrid *window) -{ - cellBitmap = (wxBitmap *) NULL; - font = (wxFont *) NULL; - backgroundBrush = (wxBrush *) NULL; - if (window) - textColour = window->GetCellTextColour(); - else - textColour.Set(0,0,0); - if (window) - backgroundColour = window->GetCellBackgroundColour(); - else - backgroundColour.Set(255,255,255); - - if (window) - font = window->GetCellTextFont(); - else - font = wxTheFontList->FindOrCreateFont(12, wxSWISS, wxNORMAL, wxNORMAL); - - SetBackgroundColour(backgroundColour); - - if (window) - alignment = window->GetCellAlignment(); - else - alignment = wxLEFT; -} - -wxGridCell::~wxGridCell(void) -{ -} - -void wxGridCell::SetBackgroundColour(const wxColour& colour) -{ - backgroundColour = colour; - backgroundBrush = wxTheBrushList->FindOrCreateBrush(backgroundColour, wxSOLID); -} - -void wxGenericGrid::OnText(wxCommandEvent& WXUNUSED(ev) ) -{ - wxGenericGrid *grid = this; - wxGridCell *cell = grid->GetCell(grid->GetCursorRow(), grid->GetCursorColumn()); - if (cell && grid->CurrentCellVisible()) - { - cell->SetTextValue(grid->GetTextItem()->GetValue()); - wxClientDC dc(grid); - - dc.BeginDrawing(); - grid->SetGridClippingRegion(& dc); - grid->DrawCellBackground(& dc, &grid->GetCurrentRect(), grid->GetCursorRow(), grid->GetCursorColumn()); - grid->DrawCellValue(& dc, &grid->GetCurrentRect(), grid->GetCursorRow(), grid->GetCursorColumn()); - grid->HighlightCell(& dc); - dc.DestroyClippingRegion(); - dc.EndDrawing(); - - grid->OnCellChange(grid->GetCursorRow(), grid->GetCursorColumn()); - -// grid->DrawCellText(); - } -} - -void wxGenericGrid::OnGridScroll(wxScrollEvent& ev) -{ - static bool inScroll = FALSE; - - if ( inScroll ) - return; - - inScroll = TRUE; - wxGenericGrid *win = this; - - bool change = FALSE; - - if (ev.GetEventObject() == win->GetHorizScrollBar()) - { - change = (ev.GetPosition() != m_scrollPosX); - win->SetScrollPosX(ev.GetPosition()); - } - else - { - change = (ev.GetPosition() != m_scrollPosY); - win->SetScrollPosY(ev.GetPosition()); - } - - win->UpdateDimensions(); - win->SetCurrentRect(win->GetCursorRow(), win->GetCursorColumn()); - - // Because rows and columns can be arbitrary sizes, - // the scrollbars will need to be adjusted to reflect the - // current view. - AdjustScrollbars(); - - if (change) win->Refresh(FALSE); - inScroll = FALSE; - -} diff --git a/src/generic/helpxlp.cpp b/src/generic/helpxlp.cpp deleted file mode 100644 index 7cf6872a82..0000000000 --- a/src/generic/helpxlp.cpp +++ /dev/null @@ -1,266 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: helpxlp.cpp -// Purpose: Help system: wxHelp implementation -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "helpxlp.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#endif - -#include "wx/generic/helpxlp.h" - -#if USE_HELP -#include - -#ifdef __X__ -#include - -#ifdef SUN_CC -#include -#endif // SUN_CC -#ifdef ____HPUX__ -#include -#endif // ____HPUX__ -#endif // __X__ - -#include - -// Timeout in seconds -#define WX_HELP_TIMEOUT 15 /* was 30 */ - -// MAX path length -#define _MAXPATHLEN 500 - -// MAX length of Help descriptor -#define _MAX_HELP_LEN 500 - -#include "wx/generic/helpxlp.h" - -#if !USE_SHARED_LIBRARY - -#ifdef __WXMSW__ -IMPLEMENT_CLASS(wxXLPHelpClient, wxDDEClient) -IMPLEMENT_CLASS(wxXLPHelpConnection, wxDDEConnection) -#else -IMPLEMENT_CLASS(wxXLPHelpClient, wxTCPClient) -IMPLEMENT_CLASS(wxXLPHelpConnection, wxTCPConnection) -#endif - -IMPLEMENT_CLASS(wxXLPHelpController, wxHelpControllerBase) -#endif - -// suppress annoying warning "'this' used in base member init list" (so what?) -#ifdef _MSC_VER -#pragma warning(disable: 4355) -#endif // Visual C++ - -wxXLPHelpController::wxXLPHelpController(void) - : helpClient(this) -{ - helpFile = ""; helpServer = -1; helpHost = ""; - helpRunning = FALSE; helpConnection = NULL; -} - -#ifdef _MSC_VER -#pragma warning(default: 4355) -#endif // Visual C++ - -wxXLPHelpController::~wxXLPHelpController(void) -{ -} - -bool wxXLPHelpController::Initialize(const wxString& filename, int server) -{ -#ifdef __X__ - char host_buf[255]; - if (wxGetHostName(host_buf, sizeof(host_buf))) - helpHost = host_buf; - else helpHost = ""; -#endif - - helpFile = filename; - helpServer = server; - wxIPCInitialize(); - return TRUE; -} - -bool wxXLPHelpController::LoadFile(const wxString& file) -{ - helpFile = file; - - if (!helpRunning) - { - if (!Run()) - return FALSE; - } - char buf[_MAX_HELP_LEN]; - sprintf(buf, "f %s", (const char*) file); - if (helpConnection) - return helpConnection->Execute(buf); - else return FALSE; -} - -bool wxXLPHelpController::DisplayContents(void) -{ - if (!helpRunning) - { - if (!Run()) - return FALSE; - } - if (helpConnection) - return helpConnection->Execute("s -1"); - else - return FALSE; -} - -bool wxXLPHelpController::DisplaySection(int section) -{ - if (!helpRunning) - { - if (!Run()) - return FALSE; - } - char buf[_MAX_HELP_LEN]; - sprintf(buf, "s %d", section); - if (helpConnection) - return helpConnection->Execute(buf); - else return FALSE; -} - -bool wxXLPHelpController::DisplayBlock(long block) -{ - if (!helpRunning) - { - if (!Run()) - return FALSE; - } - char buf[_MAX_HELP_LEN]; - sprintf(buf, "b %ld", block); - if (helpConnection) - return helpConnection->Execute(buf); - else return FALSE; -} - -bool wxXLPHelpController::KeywordSearch(const wxString& k) -{ - if (!helpRunning) - { - if (!Run()) - return FALSE; - } - char buf[500]; - sprintf(buf, "k %s", (const char*) k); - if (helpConnection) - return helpConnection->Execute(buf); - else return FALSE; -} - -bool wxXLPHelpController::Quit(void) -{ - if (helpConnection) - return helpConnection->Disconnect(); // Calls OnQuit via OnDisconnect - else return TRUE; -} - -void wxXLPHelpController::OnQuit(void) -{ -} - -bool wxXLPHelpController::Run(void) -{ -#ifdef __X__ - if (!helpFile || !helpHost || helpRunning) - return FALSE; -#endif -#ifdef __WXMSW__ - if (!helpFile || helpRunning) - return FALSE; -#endif - - time_t current_time; -#ifdef __X__ - // Invent a server name that's likely to be unique but different from - // last time - (void)time(¤t_time); - if (helpServer == -1) - helpServer = (int)(4000 + (current_time % 4000)); -#else - // Only one instance of wxHelp at a time - helpServer = 4000; -#endif - - char server[32]; - sprintf(server, "%d", helpServer); -#ifdef __WXMSW__ - // Only one instance of wxHelp under Windows. - // See if there's already an instance of wxHelp - if ((helpConnection = (wxXLPHelpConnection *)helpClient.MakeConnection(helpHost, server, "WXHELP"))) - { - helpRunning = TRUE; - return TRUE; - } -#endif - - // Start help process in server modus -// char *argv[] = {"wxhelp", "-server", server, NULL}; // HP compiler complains - char *argv[4]; - argv[0] = "wxhelp"; - argv[1] = "-server"; - argv[2] = server; - argv[3] = NULL; - - if (wxExecute((char **)argv) == FALSE) - return FALSE; // Maybe we should print a message? - - time_t start_time; - (void)time(&start_time); - // Give it some time to respond - do { - wxSleep(1); - helpConnection = (wxXLPHelpConnection *)helpClient.MakeConnection(helpHost, server, "WXHELP"); - (void)time(¤t_time); - } while (!helpConnection && ((current_time - start_time) < WX_HELP_TIMEOUT)); - - if (helpConnection == NULL) { - char buf[100]; - sprintf(buf, (const char *) _("Connection to wxHelp timed out in %d seconds"), WX_HELP_TIMEOUT); - (void)wxMessageBox(buf, _("Error")); - return FALSE; - } - helpRunning = TRUE; - return TRUE; -} - -wxXLPHelpConnection::wxXLPHelpConnection(wxXLPHelpController *instance) -{ - helpInstance = instance; -} - -bool wxXLPHelpConnection::OnDisconnect(void) -{ - helpInstance->OnQuit(); - helpInstance->helpRunning = FALSE; - helpInstance->helpConnection = NULL; - helpInstance->helpServer = -1; - delete this; - return TRUE; -} - -#endif // USE_HELP diff --git a/src/generic/imaglist.cpp b/src/generic/imaglist.cpp deleted file mode 100644 index 91fa7e0087..0000000000 --- a/src/generic/imaglist.cpp +++ /dev/null @@ -1,147 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: imaglist.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "imaglist.h" -#endif - -#include "wx/imaglist.h" - -//----------------------------------------------------------------------------- -// wxImageList -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxImageList, wxObject) - -wxImageList::wxImageList( int width, int height, bool WXUNUSED(mask), int WXUNUSED(initialCount) ) -{ - m_width = width; - m_height = height; - Create(); -}; - -wxImageList::~wxImageList() -{ -}; - -int wxImageList::GetImageCount() const -{ - return m_images.Number(); -}; - -bool wxImageList::Create() -{ - m_images.DeleteContents( TRUE ); - return TRUE; -}; - -int wxImageList::Add( const wxBitmap &bitmap ) -{ - m_images.Append( new wxBitmap(bitmap) ); - return m_images.Number(); -}; - -wxBitmap *wxImageList::GetBitmap(int index) { - wxNode *node = m_images.Nth(index); - if (node != NULL) - return (wxBitmap*)node->Data(); - - return (wxBitmap *) NULL; -} - -bool wxImageList::Replace( int index, const wxBitmap &bitmap ) -{ - wxNode *node = m_images.Nth( index ); - if (!node) return FALSE; - - if (index == m_images.Number()-1) - { - m_images.DeleteNode( node ); - m_images.Append( new wxBitmap(bitmap) ); - } - else - { - wxNode *next = node->Next(); - m_images.DeleteNode( node ); - m_images.Insert( next, new wxBitmap(bitmap) ); - }; - - return TRUE; -}; - -bool wxImageList::Remove( int index ) -{ - wxNode *node = m_images.Nth( index ); - if (node) m_images.DeleteNode( node ); - return (node != NULL); -}; - -bool wxImageList::RemoveAll() -{ - m_images.Clear(); - return TRUE; -}; - -bool wxImageList::GetSize( int index, int &width, int &height ) const -{ -#ifdef __WXGTK__ - - width = m_width; - height = m_height; - - return (m_images.Nth( index ) != NULL); - -#else - - wxNode *node = m_images.Nth( index ); - if (node) - { - wxBitmap *bm = (wxBitmap*)node->Data(); - width = bm->GetWidth(); - height = bm->GetHeight(); - return TRUE; - } - else - { - width = 0; - height = 0; - return FALSE; - }; - -#endif -}; - -bool wxImageList::Draw( int index, wxDC &dc, int x, int y, - int flags, bool WXUNUSED(solidBackground) ) -{ - wxNode *node = m_images.Nth( index ); - if (!node) return FALSE; - wxBitmap *bm = (wxBitmap*)node->Data(); - -#ifdef __WXGTK__ - - // As X doesn't have a standard size for icons, we resize here. - // Otherwise we'd simply have to forbid different bitmap sizes. - - if ((m_width != bm->GetWidth()) || - (m_height != bm->GetHeight())) - { - bm->Resize( m_width, m_height ); - }; - -#endif - - wxIcon *icon = (wxIcon*)bm; - dc.DrawIcon( *icon, x, y, (flags & wxIMAGELIST_DRAW_TRANSPARENT) > 0 ); - - return TRUE; -}; - - diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp deleted file mode 100644 index b484ac5033..0000000000 --- a/src/generic/listctrl.cpp +++ /dev/null @@ -1,2577 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: listctrl.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "listctrl.h" -#endif - -#include "wx/listctrl.h" - -//----------------------------------------------------------------------------- -// wxListItemData -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxListItemData,wxObject); - -wxListItemData::wxListItemData(void) -{ - m_image = -1; - m_data = 0; - m_xpos = 0; - m_ypos = 0; - m_width = 0; - m_height = 0; - m_colour = wxBLACK; -}; - -wxListItemData::wxListItemData( const wxListItem &info ) -{ - m_image = -1; - m_data = 0; - m_colour = info.m_colour; - SetItem( info ); -}; - -void wxListItemData::SetItem( const wxListItem &info ) -{ - if (info.m_mask & wxLIST_MASK_TEXT) m_text = info.m_text; - if (info.m_mask & wxLIST_MASK_IMAGE) m_image = info.m_image; - if (info.m_mask & wxLIST_MASK_DATA) m_data = info.m_data; - m_colour = info.m_colour; - m_xpos = 0; - m_ypos = 0; - m_width = info.m_width; - m_height = 0; -}; - -void wxListItemData::SetText( const wxString &s ) -{ - m_text = s; -}; - -void wxListItemData::SetImage( int image ) -{ - m_image = image; -}; - -void wxListItemData::SetData( long data ) -{ - m_data = data; -}; - -void wxListItemData::SetPosition( int x, int y ) -{ - m_xpos = x; - m_ypos = y; -}; - -void wxListItemData::SetSize( int const width, int height ) -{ - m_width = width; - m_height = height; -}; - -void wxListItemData::SetColour( wxColour *col ) -{ - m_colour = col; -}; - -bool wxListItemData::HasImage(void) const -{ - return (m_image >= 0); -}; - -bool wxListItemData::HasText(void) const -{ - return (!m_text.IsNull()); -}; - -bool wxListItemData::IsHit( int x, int y ) const -{ - return ((x >= m_xpos) && (x <= m_xpos+m_width) && (y >= m_ypos) && (y <= m_ypos+m_height)); -}; - -void wxListItemData::GetText( wxString &s ) -{ - s = m_text; -}; - -int wxListItemData::GetX( void ) const -{ - return m_xpos; -}; - -int wxListItemData::GetY( void ) const -{ - return m_ypos; -}; - -int wxListItemData::GetWidth(void) const -{ - return m_width; -}; - -int wxListItemData::GetHeight(void) const -{ - return m_height; -}; - -int wxListItemData::GetImage(void) const -{ - return m_image; -}; - -void wxListItemData::GetItem( wxListItem &info ) -{ - info.m_text = m_text; - info.m_image = m_image; - info.m_data = m_data; -}; - -wxColour *wxListItemData::GetColour(void) -{ - return m_colour; -}; - -//----------------------------------------------------------------------------- -// wxListHeaderData -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxListHeaderData,wxObject); - -wxListHeaderData::wxListHeaderData(void) -{ - m_mask = 0; - m_image = 0; - m_format = 0; - m_width = 0; - m_xpos = 0; - m_ypos = 0; - m_height = 0; -}; - -wxListHeaderData::wxListHeaderData( const wxListItem &item ) -{ - SetItem( item ); - m_xpos = 0; - m_ypos = 0; - m_height = 0; -}; - -void wxListHeaderData::SetItem( const wxListItem &item ) -{ - m_mask = item.m_mask; - m_text = item.m_text; - m_image = item.m_image; - m_format = item.m_format; - m_width = item.m_width; - if (m_width < 0) m_width = 80; - if (m_width < 6) m_width = 6; -}; - -void wxListHeaderData::SetPosition( int x, int y ) -{ - m_xpos = x; - m_ypos = y; -}; - -void wxListHeaderData::SetHeight( int h ) -{ - m_height = h; -}; - -void wxListHeaderData::SetWidth( int w ) -{ - m_width = w; - if (m_width < 0) m_width = 80; - if (m_width < 6) m_width = 6; -}; - -void wxListHeaderData::SetFormat( int format ) -{ - m_format = format; -}; - -bool wxListHeaderData::HasImage(void) const -{ - return (m_image != 0); -}; - -bool wxListHeaderData::HasText(void) const -{ - return (m_text.Length() > 0); -}; - -bool wxListHeaderData::IsHit( int x, int y ) const -{ - return ((x >= m_xpos) && (x <= m_xpos+m_width) && (y >= m_ypos) && (y <= m_ypos+m_height)); -}; - -void wxListHeaderData::GetItem( wxListItem &item ) -{ - item.m_mask = m_mask; - item.m_text = m_text; - item.m_image = m_image; - item.m_format = m_format; - item.m_width = m_width; -}; - -void wxListHeaderData::GetText( wxString &s ) -{ - s = m_text; -}; - -int wxListHeaderData::GetImage(void) const -{ - return m_image; -}; - -int wxListHeaderData::GetWidth(void) const -{ - return m_width; -}; - -int wxListHeaderData::GetFormat(void) const -{ - return m_format; -}; - -//----------------------------------------------------------------------------- -// wxListLineData -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxListLineData,wxObject); - -wxListLineData::wxListLineData( wxListMainWindow *owner, int mode, wxBrush *hilightBrush ) -{ - m_mode = mode; - m_hilighted = FALSE; - m_owner = owner; - m_hilightBrush = hilightBrush; - m_items.DeleteContents( TRUE ); - m_spacing = 0; -}; - -void wxListLineData::CalculateSize( wxPaintDC *dc, int spacing ) -{ - m_spacing = spacing; - switch (m_mode) - { - case wxLC_ICON: - { - m_bound_all.width = m_spacing; - m_bound_all.height = m_spacing+13; - wxNode *node = m_items.First(); - if (node) - { - wxListItemData *item = (wxListItemData*)node->Data(); - wxString s; - item->GetText( s ); - long lw,lh; - dc->GetTextExtent( s, &lw, &lh ); - if (lw > m_spacing) m_bound_all.width = lw; - }; - break; - }; - case wxLC_LIST: - { - wxNode *node = m_items.First(); - if (node) - { - wxListItemData *item = (wxListItemData*)node->Data(); - wxString s; - item->GetText( s ); - long lw,lh; - dc->GetTextExtent( s, &lw, &lh ); - m_bound_all.width = lw; - m_bound_all.height = lh; - }; - break; - }; - case wxLC_REPORT: - { - m_bound_all.width = 0; - m_bound_all.height = 0; - wxNode *node = m_items.First(); - while (node) - { - wxListItemData *item = (wxListItemData*)node->Data(); - wxString s; - item->GetText( s ); - if (s.IsNull()) s = "H"; - long lw,lh; - dc->GetTextExtent( s, &lw, &lh ); - item->SetSize( item->GetWidth(), lh ); - m_bound_all.width += lw; - m_bound_all.height = lh; - node = node->Next(); - }; - break; - }; - }; -}; - -void wxListLineData::SetPosition( wxPaintDC *dc, int x, int y, int window_width ) -{ - m_bound_all.x = x; - m_bound_all.y = y; - switch (m_mode) - { - case wxLC_ICON: - { - AssignRect( m_bound_icon, 0, 0, 0, 0 ); - AssignRect( m_bound_label, 0, 0, 0, 0 ); - AssignRect( m_bound_hilight, m_bound_all ); - wxNode *node = m_items.First(); - if (node) - { - wxListItemData *item = (wxListItemData*)node->Data(); - if (item->HasImage()) - { - wxListItemData *item = (wxListItemData*)node->Data(); - int w = 0; - int h = 0; - m_owner->GetImageSize( item->GetImage(), w, h ); - m_bound_icon.x = m_bound_all.x + (m_spacing/2) - (w/2); - m_bound_icon.y = m_bound_all.y + m_spacing - h - 5; - m_bound_icon.width = w; - m_bound_icon.height = h; - if (!item->HasText()) - { - AssignRect( m_bound_hilight, m_bound_icon ); - m_bound_hilight.x -= 3; - m_bound_hilight.y -= 3; - m_bound_hilight.width += 7; - m_bound_hilight.height += 7; - }; - }; - if (item->HasText()) - { - wxString s; - item->GetText( s ); - long lw,lh; - dc->GetTextExtent( s, &lw, &lh ); - if (m_bound_all.width > m_spacing) - m_bound_label.x = m_bound_all.x; - else - m_bound_label.x = m_bound_all.x + (m_spacing/2) - lw/2; - m_bound_label.y = m_bound_all.y + m_bound_all.height - lh; - m_bound_label.width = lw; - m_bound_label.height = lh; - AssignRect( m_bound_hilight, m_bound_label ); - }; - }; - break; - }; - case wxLC_LIST: - { - AssignRect( m_bound_label, m_bound_all ); - AssignRect( m_bound_hilight, m_bound_all ); - AssignRect( m_bound_icon, 0, 0, 0, 0 ); - break; - }; - case wxLC_REPORT: - { - long lw,lh; - dc->GetTextExtent( "H", &lw, &lh ); - m_bound_all.height = lh; - m_bound_all.width = window_width; - AssignRect( m_bound_label, m_bound_all ); - AssignRect( m_bound_hilight, m_bound_all ); - AssignRect( m_bound_icon, 0, 0, 0, 0 ); - m_bound_hilight.width = window_width-10; - m_bound_label.width = window_width-10; - break; - }; - }; -}; - -void wxListLineData::SetColumnPosition( int index, int x ) -{ - int i = index; - wxNode *node = m_items.Nth( i ); - if (node) - { - wxListItemData *item = (wxListItemData*)node->Data(); - item->SetPosition( x, m_bound_all.y ); - }; -}; - -void wxListLineData::GetSize( int &width, int &height ) -{ - width = m_bound_all.width; - height = m_bound_all.height; -}; - -void wxListLineData::GetExtent( int &x, int &y, int &width, int &height ) -{ - x = m_bound_all.x; - y = m_bound_all.y; - width = m_bound_all.width; - height = m_bound_all.height; -}; - -void wxListLineData::GetLabelExtent( int &x, int &y, int &width, int &height ) -{ - x = m_bound_label.x; - y = m_bound_label.y; - width = m_bound_label.width; - height = m_bound_label.height; -}; - -void wxListLineData::GetRect( wxRectangle &rect ) -{ - AssignRect( rect, m_bound_all ); -}; - -long wxListLineData::IsHit( int x, int y ) -{ - wxNode *node = m_items.First(); - if (node) - { - wxListItemData *item = (wxListItemData*)node->Data(); - if (item->HasImage() && IsInRect( x, y, m_bound_icon )) return wxLIST_HITTEST_ONITEMICON; - if (item->HasText() && IsInRect( x, y, m_bound_label )) return wxLIST_HITTEST_ONITEMLABEL; -// if (!(item->HasImage() || item->HasText())) return 0; - }; - // if there is no icon or text = empty - if (IsInRect( x, y, m_bound_all )) return wxLIST_HITTEST_ONITEMICON; - return 0; -}; - -void wxListLineData::InitItems( int num ) -{ - for (int i = 0; i < num; i++) m_items.Append( new wxListItemData() ); -}; - -void wxListLineData::SetItem( int index, const wxListItem &info ) -{ - wxNode *node = m_items.Nth( index ); - if (node) - { - wxListItemData *item = (wxListItemData*)node->Data(); - item->SetItem( info ); - }; -}; - -void wxListLineData::GetItem( int const index, wxListItem &info ) -{ - int i = index; - wxNode *node = m_items.Nth( i ); - if (node) - { - wxListItemData *item = (wxListItemData*)node->Data(); - item->GetItem( info ); - }; -}; - -void wxListLineData::GetText( int index, wxString &s ) -{ - int i = index; - wxNode *node = m_items.Nth( i ); - s = ""; - if (node) - { - wxListItemData *item = (wxListItemData*)node->Data(); - item->GetText( s ); - }; -}; - -void wxListLineData::SetText( int index, const wxString s ) -{ - int i = index; - wxNode *node = m_items.Nth( i ); - if (node) - { - wxListItemData *item = (wxListItemData*)node->Data(); - item->SetText( s ); - }; -}; - -int wxListLineData::GetImage( int index ) -{ - int i = index; - wxNode *node = m_items.Nth( i ); - if (node) - { - wxListItemData *item = (wxListItemData*)node->Data(); - return item->GetImage(); - }; - return -1; -}; - -void wxListLineData::DoDraw( wxPaintDC *dc, bool hilight, bool paintBG ) -{ - long dev_x = dc->LogicalToDeviceX( m_bound_all.x-2 ); - long dev_y = dc->LogicalToDeviceY( m_bound_all.y-2 ); - long dev_w = dc->LogicalToDeviceXRel( m_bound_all.width+4 ); - long dev_h = dc->LogicalToDeviceYRel( m_bound_all.height+4 ); - if (!m_owner->IsExposed( dev_x, dev_y, dev_w, dev_h ) ) return; - - if (paintBG) - { - if (hilight) - { - dc->SetBrush( m_hilightBrush ); - dc->SetPen( wxTRANSPARENT_PEN ); - } - else - { - dc->SetBrush( wxWHITE_BRUSH ); - dc->SetPen( wxTRANSPARENT_PEN ); - }; - dc->DrawRectangle( m_bound_hilight.x-2, m_bound_hilight.y-2, - m_bound_hilight.width+4, m_bound_hilight.height+4 ); - }; - if (m_mode == wxLC_REPORT) - { - wxString s; - wxNode *node = m_items.First(); - while (node) - { - wxListItemData *info = (wxListItemData*)node->Data(); - dc->SetClippingRegion( info->GetX(), info->GetY(), info->GetWidth(), info->GetHeight() ); - info->GetText( s ); - if (hilight) - dc->SetTextForeground( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) ); - else - dc->SetTextForeground( info->GetColour() ); - dc->DrawText( s, info->GetX()+2, info->GetY() ); - dc->DestroyClippingRegion(); - node = node->Next(); - }; - } - else - { - wxNode *node = m_items.First(); - if (node) - { - wxListItemData *item = (wxListItemData*)node->Data(); - if (item->HasImage()) - { - m_owner->DrawImage( item->GetImage(), dc, m_bound_icon.x, m_bound_icon.y ); - }; - if (item->HasText()) - { - wxString s; - item->GetText( s ); - if (hilight) - dc->SetTextForeground( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) ); - else - dc->SetTextForeground( item->GetColour() ); - dc->DrawText( s, m_bound_label.x, m_bound_label.y ); - }; - }; - }; -}; - -void wxListLineData::Hilight( bool on ) -{ - if (on == m_hilighted) return; - if (on) - m_owner->SelectLine( this ); - else - m_owner->DeselectLine( this ); - m_hilighted = on; -}; - -void wxListLineData::ReverseHilight( void ) -{ - m_hilighted = !m_hilighted; - if (m_hilighted) - m_owner->SelectLine( this ); - else - m_owner->DeselectLine( this ); -}; - -void wxListLineData::DrawRubberBand( wxPaintDC *dc, bool on ) -{ - if (on) - { - dc->SetPen( wxBLACK_PEN ); - dc->SetBrush( wxTRANSPARENT_BRUSH ); - dc->DrawRectangle( m_bound_hilight.x-2, m_bound_hilight.y-2, - m_bound_hilight.width+4, m_bound_hilight.height+4 ); - }; -}; - -void wxListLineData::Draw( wxPaintDC *dc ) -{ - DoDraw( dc, m_hilighted, m_hilighted ); -}; - -bool wxListLineData::IsInRect( int x, int y, const wxRectangle &rect ) -{ - return ((x >= rect.x) && (x <= rect.x+rect.width) && (y >= rect.y) && (y <= rect.y+rect.height)); -}; - -bool wxListLineData::IsHilighted( void ) -{ - return m_hilighted; -}; - -void wxListLineData::AssignRect( wxRectangle &dest, int x, int y, int width, int height ) -{ - dest.x = x; - dest.y = y; - dest.width = width; - dest.height = height; -}; - -void wxListLineData::AssignRect( wxRectangle &dest, const wxRectangle &source ) -{ - dest.x = source.x; - dest.y = source.y; - dest.width = source.width; - dest.height = source.height; -}; - -//----------------------------------------------------------------------------- -// wxListHeaderWindow -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxListHeaderWindow,wxWindow); - -BEGIN_EVENT_TABLE(wxListHeaderWindow,wxWindow) - EVT_PAINT (wxListHeaderWindow::OnPaint) - EVT_MOUSE_EVENTS (wxListHeaderWindow::OnMouse) - EVT_SET_FOCUS (wxListHeaderWindow::OnSetFocus) -END_EVENT_TABLE() - -wxListHeaderWindow::wxListHeaderWindow( void ) -{ - m_owner = (wxListMainWindow *) NULL; - m_currentCursor = (wxCursor *) NULL; - m_resizeCursor = (wxCursor *) NULL; -}; - -wxListHeaderWindow::wxListHeaderWindow( wxWindow *win, wxWindowID id, wxListMainWindow *owner, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) : - wxWindow( win, id, pos, size, style, name ) -{ - m_owner = owner; -// m_currentCursor = wxSTANDARD_CURSOR; - m_currentCursor = (wxCursor *) NULL; - m_resizeCursor = new wxCursor( wxCURSOR_SIZEWE ); -}; - -void wxListHeaderWindow::DoDrawRect( wxPaintDC *dc, int x, int y, int w, int h ) -{ - const int m_corner = 1; - - dc->SetBrush( *wxTRANSPARENT_BRUSH ); - - dc->SetPen( *wxBLACK_PEN ); - dc->DrawLine( x+w-m_corner+1, y, x+w, y+h ); // right (outer) - dc->DrawRectangle( x, y+h, w, 1 ); // bottom (outer) - - dc->SetPen( *wxMEDIUM_GREY_PEN ); - dc->DrawLine( x+w-m_corner, y, x+w-1, y+h ); // right (inner) - dc->DrawRectangle( x+1, y+h-1, w-2, 1 ); // bottom (inner) - - dc->SetPen( *wxWHITE_PEN ); - dc->DrawRectangle( x, y, w-m_corner+1, 1 ); // top (outer) -// dc->DrawRectangle( x, y+1, w-m_corner, 1 ); // top (inner) - dc->DrawRectangle( x, y, 1, h ); // left (outer) -// dc->DrawRectangle( x+1, y, 1, h-1 ); // left (inner) -}; - -void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) -{ - wxPaintDC dc( this ); - PrepareDC( dc ); - - dc.BeginDrawing(); - - dc.SetFont( wxSystemSettings::GetSystemFont( wxSYS_SYSTEM_FONT ) ); - - int w = 0; - int h = 0; - int x = 0; - int y = 0; - GetClientSize( &w, &h ); - - dc.SetTextForeground( *wxBLACK ); - - x = 1; - y = 1; - int numColumns = m_owner->GetColumnCount(); - wxListItem item; - for (int i = 0; i < numColumns; i++) - { - m_owner->GetColumn( i, item ); - int cw = item.m_width-2; - if ((i+1 == numColumns) || (x+item.m_width > w-5)) cw = w-x-1; - dc.SetPen( *wxWHITE_PEN ); - - DoDrawRect( &dc, x, y, cw, h-2 ); - dc.SetClippingRegion( x, y, cw-5, h-4 ); - dc.DrawText( item.m_text, x+4, y+3 ); - dc.DestroyClippingRegion(); - x += item.m_width; - if (x > w+5) break; - }; - dc.EndDrawing(); -}; - -void wxListHeaderWindow::OnMouse( wxMouseEvent &event ) -{ - float fx = 0; - float fy = 0; - event.Position( &fx, &fy ); - int x = (int)fx; - int y = (int)fy; - if (event.Moving()) - { - bool hit = FALSE; - int xpos = 0; - for (int j = 0; j < m_owner->GetColumnCount(); j++) - { - xpos += m_owner->GetColumnWidth( j ); - if ((abs(x-xpos) < 2) && (y < 14)) { hit = TRUE; break; } - }; - if (hit) - { - if (m_currentCursor == wxSTANDARD_CURSOR) SetCursor( m_resizeCursor ); - m_currentCursor = m_resizeCursor; - } - else - { - if (m_currentCursor != wxSTANDARD_CURSOR) SetCursor( wxSTANDARD_CURSOR ); - m_currentCursor = wxSTANDARD_CURSOR; - }; - }; -}; - -void wxListHeaderWindow::OnSetFocus( wxFocusEvent &WXUNUSED(event) ) -{ - m_owner->SetFocus(); -}; - -//----------------------------------------------------------------------------- -// wxListRenameTimer (internal) -//----------------------------------------------------------------------------- - -wxListRenameTimer::wxListRenameTimer( wxListMainWindow *owner ) -{ - m_owner = owner; -}; - -void wxListRenameTimer::Notify() -{ - m_owner->OnRenameTimer(); -}; - -//----------------------------------------------------------------------------- -// wxListTextCtrl (internal) -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxListTextCtrl,wxTextCtrl); - -BEGIN_EVENT_TABLE(wxListTextCtrl,wxTextCtrl) - EVT_CHAR (wxListTextCtrl::OnChar) - EVT_KILL_FOCUS (wxListTextCtrl::OnKillFocus) -END_EVENT_TABLE() - -wxListTextCtrl::wxListTextCtrl( wxWindow *parent, const wxWindowID id, - bool *accept, wxString *res, wxListMainWindow *owner, - const wxString &value, const wxPoint &pos, const wxSize &size, - int style, const wxValidator& validator, const wxString &name ) : - wxTextCtrl( parent, id, value, pos, size, style, validator, name ) -{ - m_res = res; - m_accept = accept; - m_owner = owner; -} - -void wxListTextCtrl::OnChar( wxKeyEvent &event ) -{ - if (event.m_keyCode == WXK_RETURN) - { - (*m_accept) = TRUE; - (*m_res) = GetValue(); - m_owner->OnRenameAccept(); -// Show( FALSE ); - Destroy(); - return; - } - if (event.m_keyCode == WXK_ESCAPE) - { - (*m_accept) = FALSE; - (*m_res) = ""; -// Show( FALSE ); - Destroy(); - return; - } - event.Skip(); -} - -void wxListTextCtrl::OnKillFocus( wxFocusEvent &WXUNUSED(event) ) -{ - (*m_accept) = FALSE; - (*m_res) = ""; -// Show( FALSE ); - Destroy(); - return; -} - -//----------------------------------------------------------------------------- -// wxListMainWindow -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxListMainWindow,wxScrolledWindow); - -BEGIN_EVENT_TABLE(wxListMainWindow,wxScrolledWindow) - EVT_PAINT (wxListMainWindow::OnPaint) - EVT_SIZE (wxListMainWindow::OnSize) - EVT_MOUSE_EVENTS (wxListMainWindow::OnMouse) - EVT_CHAR (wxListMainWindow::OnChar) - EVT_SET_FOCUS (wxListMainWindow::OnSetFocus) - EVT_KILL_FOCUS (wxListMainWindow::OnKillFocus) -END_EVENT_TABLE() - -wxListMainWindow::wxListMainWindow( void ) -{ - m_mode = 0; - m_lines.DeleteContents( TRUE ); - m_columns.DeleteContents( TRUE ); - m_current = (wxListLineData *) NULL; - m_visibleLines = 0; - m_hilightBrush = (wxBrush *) NULL; - m_myFont = (wxFont *) NULL; - m_xScroll = 0; - m_yScroll = 0; - m_dirty = TRUE; - m_small_image_list = (wxImageList *) NULL; - m_normal_image_list = (wxImageList *) NULL; - m_small_spacing = 30; - m_normal_spacing = 40; - m_hasFocus = FALSE; - m_usedKeys = TRUE; - m_lastOnSame = FALSE; -// m_renameTimer = new wxListRenameTimer( this ); - m_renameTimer = (wxTimer *) NULL; - m_isCreated = FALSE; - m_dragCount = 0; -}; - -wxListMainWindow::wxListMainWindow( wxWindow *parent, wxWindowID id, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) : - wxScrolledWindow( parent, id, pos, size, style, name ) -{ - m_mode = style; - m_lines.DeleteContents( TRUE ); - m_columns.DeleteContents( TRUE ); - m_current = (wxListLineData *) NULL; - m_dirty = TRUE; - m_visibleLines = 0; - m_hilightBrush = new wxBrush( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_HIGHLIGHT), wxSOLID ); - m_small_image_list = (wxImageList *) NULL; - m_normal_image_list = (wxImageList *) NULL; - m_small_spacing = 30; - m_normal_spacing = 40; -// AllowDoubleClick( TRUE ); - m_myFont = wxNORMAL_FONT; - m_hasFocus = FALSE; - m_dragCount = 0; - m_isCreated = FALSE; - wxSize sz = size; - sz.y = 25; - - if (m_mode & wxLC_REPORT) - { - m_xScroll = 0; - m_yScroll = 15; - } - else - { - m_xScroll = 15; - m_yScroll = 0; - }; - SetScrollbars( m_xScroll, m_yScroll, 0, 0, 0, 0 ); - - m_usedKeys = TRUE; - m_lastOnSame = FALSE; - m_renameTimer = new wxListRenameTimer( this ); - m_renameAccept = FALSE; -// m_text = new wxRawListTextCtrl( GetParent(), "", &m_renameAccept, &m_renameRes, this, 10, 10, 40, 10 ); -// m_text->Show( FALSE ); - - SetBackgroundColour( *wxWHITE ); -}; - -wxListMainWindow::~wxListMainWindow( void ) -{ -// if (m_hilightColour) delete m_hilightColour; -// if (m_hilightBrush) delete m_hilightBrush; -// if (m_myFont) delete m_myFont; - delete m_renameTimer; -// delete m_text; -}; - -void wxListMainWindow::RefreshLine( wxListLineData *line ) -{ - int x = 0; - int y = 0; - int w = 0; - int h = 0; - if (line) - { - wxClientDC dc(this); - PrepareDC( dc ); - line->GetExtent( x, y, w, h ); - wxRectangle rect( - dc.LogicalToDeviceX(x-3), - dc.LogicalToDeviceY(y-3), - dc.LogicalToDeviceXRel(w+6), - dc.LogicalToDeviceXRel(h+6) ); - Refresh( TRUE, &rect ); - }; -}; - -void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) -{ - if (m_dirty) return; - - wxPaintDC dc( this ); - PrepareDC( dc ); - - dc.BeginDrawing(); - -// dc.SetFont( *m_myFont ); - dc.SetFont( wxSystemSettings::GetSystemFont( wxSYS_SYSTEM_FONT ) ); - - wxNode *node = m_lines.First(); - while (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - line->Draw( &dc ); - node = node->Next(); - }; - if (m_current) m_current->DrawRubberBand( &dc, m_hasFocus ); - - dc.EndDrawing(); -}; - -void wxListMainWindow::HilightAll( bool on ) -{ - wxNode *node = m_lines.First(); - while (node) - { - wxListLineData *line = (wxListLineData *)node->Data(); - if (line->IsHilighted() != on) - { - line->Hilight( on ); - RefreshLine( line ); - }; - node = node->Next(); - }; -}; - -void wxListMainWindow::ActivateLine( wxListLineData *line ) -{ - if (!m_parent) return; - wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, m_parent->GetId() ); - le.SetEventObject( m_parent ); - le.m_code = 0; - le.m_itemIndex = GetIndexOfLine( line ); - le.m_col = 0; - line->GetItem( 0, le.m_item ); - OnListNotify( le ); -}; - -void wxListMainWindow::SendNotify( wxListLineData *line, wxEventType command ) -{ - if (!m_parent) return; - wxListEvent le( command, m_parent->GetId() ); - le.SetEventObject( m_parent ); - le.m_code = 0; - le.m_itemIndex = GetIndexOfLine( line ); - le.m_col = 0; - line->GetItem( 0, le.m_item ); - OnListNotify( le ); -}; - -void wxListMainWindow::FocusLine( wxListLineData *WXUNUSED(line) ) -{ -// SendNotify( line, wxEVT_COMMAND_LIST_ITEM_FOCUSSED ); -}; - -void wxListMainWindow::UnfocusLine( wxListLineData *WXUNUSED(line) ) -{ -// SendNotify( line, wxEVT_COMMAND_LIST_ITEM_UNFOCUSSED ); -}; - -void wxListMainWindow::SelectLine( wxListLineData *line ) -{ - SendNotify( line, wxEVT_COMMAND_LIST_ITEM_SELECTED ); -}; - -void wxListMainWindow::DeselectLine( wxListLineData *line ) -{ - SendNotify( line, wxEVT_COMMAND_LIST_ITEM_DESELECTED ); -}; - -void wxListMainWindow::DeleteLine( wxListLineData *line ) -{ - SendNotify( line, wxEVT_COMMAND_LIST_DELETE_ITEM ); -}; - -void wxListMainWindow::StartLabelEdit( wxListLineData *line ) -{ - SendNotify( line, wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT ); -}; - -void wxListMainWindow::RenameLine( wxListLineData *line, const wxString &newName ) -{ - if (!m_parent) return; - - wxListEvent le( wxEVT_COMMAND_LIST_END_LABEL_EDIT, m_parent->GetId() ); - le.SetEventObject( m_parent ); - le.m_code = 0; - le.m_itemIndex = GetIndexOfLine( line ); - le.m_col = 0; - line->GetItem( 0, le.m_item ); - le.m_item.m_text = newName; - OnListNotify( le ); -}; - -void wxListMainWindow::OnRenameTimer() -{ - StartLabelEdit( m_current ); - wxString s; - m_current->GetText( 0, s ); - int x = 0; - int y = 0; - int w = 0; - int h = 0; - m_current->GetLabelExtent( x, y, w, h ); - - wxClientDC dc(this); - PrepareDC( dc ); - x = dc.LogicalToDeviceX( x ); - y = dc.LogicalToDeviceY( y ); - - wxListTextCtrl *text = new wxListTextCtrl( - this, -1, &m_renameAccept, &m_renameRes, this, s, wxPoint(x-4,y-4), wxSize(w+11,h+8) ); - text->SetFocus(); -/* - m_text->SetSize( x+3, y+3, w+6, h+6 ); - m_text->SetValue( s ); - m_text->Show( TRUE ); - m_text->SetFocus(); -*/ -/* - char *res = wxGetTextFromUser( _("Enter new name:"), "", s ); - if (res) - { - m_dirty = TRUE; - s = res; - RenameLine( m_current, s ); - }; - */ -}; - -void wxListMainWindow::OnRenameAccept() -{ - RenameLine( m_current, m_renameRes ); -}; - -void wxListMainWindow::OnMouse( wxMouseEvent &event ) -{ - if (m_parent->ProcessEvent( event)) return; - - if (!m_current) return; - if (m_dirty) return; - - wxClientDC dc(this); - PrepareDC(dc); - long x = dc.DeviceToLogicalX( (long)event.GetX() ); - long y = dc.DeviceToLogicalY( (long)event.GetY() ); - - long hitResult = 0; - wxNode *node = m_lines.First(); - wxListLineData *line = (wxListLineData *) NULL; - while (node) - { - line = (wxListLineData*)node->Data(); - hitResult = line->IsHit( x, y ); - if (hitResult) break; - line = (wxListLineData *) NULL; - node = node->Next(); - }; - - if (!event.Dragging()) - m_dragCount = 0; - else - m_dragCount++; - - if (event.Dragging() && (m_dragCount > 3)) - { - m_dragCount = 0; - wxListEvent le( wxEVT_COMMAND_LIST_BEGIN_DRAG, m_parent->GetId() ); - le.SetEventObject( this ); - le.m_code = 0; - le.m_itemIndex = 0; - le.m_col = 0; - OnListNotify( le ); - }; - - if (!line) return; - - if (event.ButtonDClick()) - { - m_usedKeys = FALSE; - m_lastOnSame = FALSE; - m_renameTimer->Stop(); - ActivateLine( line ); - return; - }; - - if (event.LeftUp() && m_lastOnSame) - { - m_usedKeys = FALSE; - if ((line == m_current) && - (hitResult == wxLIST_HITTEST_ONITEMLABEL) /* && - (m_mode & wxLC_ICON) */ ) - { - m_renameTimer->Start( 100, TRUE ); - }; - m_lastOnSame = FALSE; - return; - }; - - if (event.LeftDown()) - { - m_usedKeys = FALSE; - wxListLineData *oldCurrent = m_current; - if (m_mode & wxLC_SINGLE_SEL) - { - m_current = line; - HilightAll( FALSE ); - m_current->ReverseHilight(); - RefreshLine( m_current ); - } - else - { - if (event.ShiftDown()) - { - m_current = line; - m_current->ReverseHilight(); - RefreshLine( m_current ); - } - else if (event.ControlDown()) - { - m_current = line; - int numOfCurrent = -1; - node = m_lines.First(); - while (node) - { - wxListLineData *test_line = (wxListLineData*)node->Data(); - numOfCurrent++; - if (test_line == oldCurrent) break; - node = node->Next(); - }; - int numOfLine = -1; - node = m_lines.First(); - while (node) - { - wxListLineData *test_line = (wxListLineData*)node->Data(); - numOfLine++; - if (test_line == line) break; - node = node->Next(); - }; - - if (numOfLine < numOfCurrent) - { int i = numOfLine; numOfLine = numOfCurrent; numOfCurrent = i; } - wxNode *node = m_lines.Nth( numOfCurrent ); - for (int i = 0; i <= numOfLine-numOfCurrent; i++) - { - wxListLineData *test_line= (wxListLineData*)node->Data(); - test_line->Hilight(TRUE); - RefreshLine( test_line ); - node = node->Next(); - } - } - else - { - m_current = line; - HilightAll( FALSE ); - m_current->ReverseHilight(); - RefreshLine( m_current ); - } - } - if (m_current != oldCurrent) - { - RefreshLine( oldCurrent ); - UnfocusLine( oldCurrent ); - FocusLine( m_current ); - }; - m_lastOnSame = (m_current == oldCurrent); - return; - }; - -}; - -void wxListMainWindow::MoveToFocus( void ) -{ - if (!m_current) return; -/* - int x = 0; - int y = 0; - int w = 0; - int h = 0; - m_current->GetExtent( x, y, w, h ); - int w_p = 0; - int h_p = 0; - GetClientSize( &w_p, &h_p ); - if (m_mode & wxLC_REPORT) - { - if (GetScrollPos( wxHORIZONTAL ) != 0) SetScrollPos( wxHORIZONTAL, 0); - int y_s = m_yScroll*GetScrollPos( wxVERTICAL ); - if ((y > y_s) && (y+h < y_s+h_p)) return; - if (y-y_s < 5) SetScrollPos( wxVERTICAL, (y-5)/m_yScroll ); - if (y+h+5 > y_s+h_p) SetScrollPos( wxVERTICAL, (y+h-h_p+h+5)/m_yScroll ); - } - else - { - if (GetScrollPos( wxVERTICAL ) != 0) SetScrollPos( wxVERTICAL, 0); - int x_s = m_xScroll*GetScrollPos( wxHORIZONTAL ); - if ((x > x_s) && (x+w < x_s+w_p)) return; - if (x-x_s < 5) SetScrollPos( wxHORIZONTAL, (x-5)/m_xScroll ); - if (x+w > x_s+w_p) SetScrollPos( wxHORIZONTAL, (x+w-w_p+5)/m_xScroll ); - }; -*/ -}; - -void wxListMainWindow::OnArrowChar( wxListLineData *newCurrent, bool shiftDown ) -{ - if ((m_mode & wxLC_SINGLE_SEL) || (m_usedKeys == FALSE)) m_current->Hilight( FALSE ); - wxListLineData *oldCurrent = m_current; - m_current = newCurrent; - MoveToFocus(); - if (shiftDown || (m_mode & wxLC_SINGLE_SEL)) m_current->Hilight( TRUE ); - RefreshLine( m_current ); - RefreshLine( oldCurrent ); - FocusLine( m_current ); - UnfocusLine( oldCurrent ); -}; - -void wxListMainWindow::OnChar( wxKeyEvent &event ) -{ -/* - if (event.KeyCode() == WXK_TAB) - { - if (event.ShiftDown()) - TravPrev( &event ); - else - TravNext( &event ); - return; - }; -*/ - if (!m_current) return; - switch (event.KeyCode()) - { - case WXK_UP: - { - wxNode *node = m_lines.Member( m_current )->Previous(); - if (node) OnArrowChar( (wxListLineData*)node->Data(), event.ShiftDown() ); - break; - }; - case WXK_DOWN: - { - wxNode *node = m_lines.Member( m_current )->Next(); - if (node) OnArrowChar( (wxListLineData*)node->Data(), event.ShiftDown() ); - break; - }; - case WXK_END: - { - wxNode *node = m_lines.Last(); - OnArrowChar( (wxListLineData*)node->Data(), event.ShiftDown() ); - break; - }; - case WXK_HOME: - { - wxNode *node = m_lines.First(); - OnArrowChar( (wxListLineData*)node->Data(), event.ShiftDown() ); - break; - }; - case WXK_PRIOR: - { - int steps = 0; - if (m_mode & wxLC_REPORT) { steps = m_visibleLines-1; } - else - { - int pos = 0; - wxNode *node = m_lines.First(); - for (;;) { if (m_current == (wxListLineData*)node->Data()) break; pos++; node = node->Next(); }; - steps = pos % m_visibleLines; - }; - wxNode *node = m_lines.Member( m_current ); - for (int i = 0; i < steps; i++) if (node->Previous()) node = node->Previous(); - if (node) OnArrowChar( (wxListLineData*)node->Data(), event.ShiftDown() ); - break; - }; - case WXK_NEXT: - { - int steps = 0; - if (m_mode & wxLC_REPORT) { steps = m_visibleLines-1; } - else - { - int pos = 0; wxNode *node = m_lines.First(); - for (;;) { if (m_current == (wxListLineData*)node->Data()) break; pos++; node = node->Next(); }; - steps = m_visibleLines-(pos % m_visibleLines)-1; - }; - wxNode *node = m_lines.Member( m_current ); - for (int i = 0; i < steps; i++) if (node->Next()) node = node->Next(); - if (node) OnArrowChar( (wxListLineData*)node->Data(), event.ShiftDown() ); - break; - }; - case WXK_LEFT: - { - if (!(m_mode & wxLC_REPORT)) - { - wxNode *node = m_lines.Member( m_current ); - for (int i = 0; i Previous()) node = node->Previous(); - if (node) OnArrowChar( (wxListLineData*)node->Data(), event.ShiftDown() ); - }; - break; - }; - case WXK_RIGHT: - { - if (!(m_mode & wxLC_REPORT)) - { - wxNode *node = m_lines.Member( m_current ); - for (int i = 0; i Next()) node = node->Next(); - if (node) OnArrowChar( (wxListLineData*)node->Data(), event.ShiftDown() ); - }; - break; - }; - case WXK_SPACE: - { - m_current->ReverseHilight(); - RefreshLine( m_current ); - }; - break; - case WXK_INSERT: - { - if (!(m_mode & wxLC_SINGLE_SEL)) - { - wxListLineData *oldCurrent = m_current; - m_current->ReverseHilight(); - wxNode *node = m_lines.Member( m_current )->Next(); - if (node) m_current = (wxListLineData*)node->Data(); - MoveToFocus(); - RefreshLine( oldCurrent ); - RefreshLine( m_current ); - UnfocusLine( oldCurrent ); - FocusLine( m_current ); - }; - }; - break; - case WXK_RETURN: - case WXK_EXECUTE: - { - ActivateLine( m_current ); - }; - break; - default: - { - event.Skip(); - return; - }; - }; - m_usedKeys = TRUE; -}; - -void wxListMainWindow::OnSetFocus( wxFocusEvent &WXUNUSED(event) ) -{ - m_hasFocus = TRUE; - RefreshLine( m_current ); - - if (!m_parent) return; - - wxFocusEvent event( wxEVT_SET_FOCUS, m_parent->GetId() ); - event.SetEventObject( m_parent ); - m_parent->ProcessEvent( event ); -}; - -void wxListMainWindow::OnKillFocus( wxFocusEvent &WXUNUSED(event) ) -{ - m_hasFocus = FALSE; - RefreshLine( m_current ); -}; - -void wxListMainWindow::OnSize( wxSizeEvent &WXUNUSED(event) ) -{ -/* - We don't even allow the wxScrolledWindow::AdjustScrollbars() call - - CalculatePositions(); - printf( "OnSize::Refresh.\n" ); - Refresh(); - event.Skip(); -*/ -}; - -wxFont *wxListMainWindow::GetMyFont( void ) -{ - return m_myFont; -}; - -void wxListMainWindow::DrawImage( int index, wxPaintDC *dc, int x, int y ) -{ - if ((m_mode & wxLC_ICON) && (m_normal_image_list)) - { - m_normal_image_list->Draw( index, *dc, x, y, wxIMAGELIST_DRAW_TRANSPARENT ); - return; - }; - if ((m_mode & wxLC_SMALL_ICON) && (m_small_image_list)) - { - m_small_image_list->Draw( index, *dc, x, y, wxIMAGELIST_DRAW_TRANSPARENT ); - }; -}; - -void wxListMainWindow::GetImageSize( int index, int &width, int &height ) -{ - if ((m_mode & wxLC_ICON) && (m_normal_image_list)) - { - m_normal_image_list->GetSize( index, width, height ); - return; - }; - if ((m_mode & wxLC_SMALL_ICON) && (m_small_image_list)) - { - m_small_image_list->GetSize( index, width, height ); - return; - }; - width = 0; - height = 0; -}; - -int wxListMainWindow::GetTextLength( wxString &s ) -{ - wxPaintDC dc( this ); - long lw = 0; - long lh = 0; - dc.GetTextExtent( s, &lw, &lh ); - return lw + 6; -}; - -int wxListMainWindow::GetIndexOfLine( const wxListLineData *line ) -{ - int i = 0; - wxNode *node = m_lines.First(); - while (node) - { - if (line == (wxListLineData*)node->Data()) return i; - i++; - node = node->Next(); - }; - return -1; -}; - -void wxListMainWindow::SetImageList( wxImageList *imageList, int which ) -{ - m_dirty = TRUE; - if (which == wxIMAGE_LIST_NORMAL) m_normal_image_list = imageList; - if (which == wxIMAGE_LIST_SMALL) m_small_image_list = imageList; -}; - -void wxListMainWindow::SetItemSpacing( int spacing, bool isSmall ) -{ - m_dirty = TRUE; - if (isSmall) - { - m_small_spacing = spacing; - } - else - { - m_normal_spacing = spacing; - }; -}; - -int wxListMainWindow::GetItemSpacing( bool isSmall ) -{ - if (isSmall) return m_small_spacing; else return m_normal_spacing; -}; - -void wxListMainWindow::SetColumn( int col, wxListItem &item ) -{ - m_dirty = TRUE; - wxNode *node = m_columns.Nth( col ); - if (node) - { - if (item.m_width == wxLIST_AUTOSIZE_USEHEADER) item.m_width = GetTextLength( item.m_text )+7; - wxListHeaderData *column = (wxListHeaderData*)node->Data(); - column->SetItem( item ); - }; -}; - -void wxListMainWindow::SetColumnWidth( int col, int width ) -{ - m_dirty = TRUE; - wxNode *node = m_columns.Nth( col ); - if (node) - { - wxListHeaderData *column = (wxListHeaderData*)node->Data(); - column->SetWidth( width ); - }; -}; - -void wxListMainWindow::GetColumn( int col, wxListItem &item ) -{ - wxNode *node = m_columns.Nth( col ); - if (node) - { - wxListHeaderData *column = (wxListHeaderData*)node->Data(); - column->GetItem( item ); - } - else - { - item.m_format = 0; - item.m_width = 0; - item.m_text = ""; - item.m_image = 0; - item.m_data = 0; - }; -}; - -int wxListMainWindow::GetColumnWidth( int col ) -{ - wxNode *node = m_columns.Nth( col ); - if (node) - { - wxListHeaderData *column = (wxListHeaderData*)node->Data(); - return column->GetWidth(); - } - else - return 0; -}; - -int wxListMainWindow::GetColumnCount( void ) -{ - return m_columns.Number(); -}; - -int wxListMainWindow::GetCountPerPage( void ) -{ - return m_visibleLines; -}; - -void wxListMainWindow::SetItem( wxListItem &item ) -{ - m_dirty = TRUE; - wxNode *node = m_lines.Nth( item.m_itemId ); - if (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - if (m_mode & wxLC_REPORT) item.m_width = GetColumnWidth( item.m_col )-3; - line->SetItem( item.m_col, item ); - }; -}; - -void wxListMainWindow::SetItemState( long item, long state, long stateMask ) -{ - // m_dirty = TRUE; no recalcs needed - wxListLineData *oldCurrent = m_current; - if (stateMask & wxLIST_STATE_FOCUSED) - { - wxNode *node = m_lines.Nth( item ); - if (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - UnfocusLine( m_current ); - m_current = line; - FocusLine( m_current ); - RefreshLine( m_current ); - RefreshLine( oldCurrent ); - }; - }; - if (stateMask & wxLIST_STATE_SELECTED) - { - wxNode *node = m_lines.Nth( item ); - if (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - bool on = state & wxLIST_STATE_SELECTED; - line->Hilight( on ); - RefreshLine( line ); - }; - }; -}; - -int wxListMainWindow::GetItemState( long item, long stateMask ) -{ - int ret = wxLIST_STATE_DONTCARE; - if (stateMask & wxLIST_STATE_FOCUSED) - { - wxNode *node = m_lines.Nth( item ); - if (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - if (line == m_current) ret |= wxLIST_STATE_FOCUSED; - }; - }; - if (stateMask & wxLIST_STATE_SELECTED) - { - wxNode *node = m_lines.Nth( item ); - if (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - if (line->IsHilighted()) ret |= wxLIST_STATE_FOCUSED; - }; - }; - return ret; -}; - -void wxListMainWindow::GetItem( wxListItem &item ) -{ - wxNode *node = m_lines.Nth( item.m_itemId ); - if (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - line->GetItem( item.m_col, item ); - } - else - { - item.m_mask = 0; - item.m_text = ""; - item.m_image = 0; - item.m_data = 0; - }; -}; - -int wxListMainWindow::GetItemCount( void ) -{ - return m_lines.Number(); -}; - -void wxListMainWindow::GetItemRect( long index, wxRectangle &rect ) -{ - wxNode *node = m_lines.Nth( index ); - if (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - line->GetRect( rect ); - } - else - { - rect.x = 0; - rect.y = 0; - rect.width = 0; - rect.height = 0; - }; -}; - -bool wxListMainWindow::GetItemPosition(long item, wxPoint& pos) -{ - wxNode *node = m_lines.Nth( item ); - if (node) - { - wxRectangle rect; - wxListLineData *line = (wxListLineData*)node->Data(); - line->GetRect( rect ); - pos.x = rect.x; - pos.y = rect.y; - } - else - { - pos.x = 0; - pos.y = 0; - }; - return TRUE; -}; - -int wxListMainWindow::GetSelectedItemCount( void ) -{ - int ret = 0; - wxNode *node = m_lines.First(); - while (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - if (line->IsHilighted()) ret++; - node = node->Next(); - }; - return 0; -}; - -void wxListMainWindow::SetMode( long mode ) -{ - m_dirty = TRUE; - m_mode = mode; - - DeleteEverything(); - - if (m_mode & wxLC_REPORT) - { - m_xScroll = 0; - m_yScroll = 15; - } - else - { - m_xScroll = 15; - m_yScroll = 0; - }; -}; - -long wxListMainWindow::GetMode( void ) const -{ - return m_mode; -}; - -void wxListMainWindow::CalculatePositions( void ) -{ - wxPaintDC dc( this ); - dc.SetFont( wxSystemSettings::GetSystemFont( wxSYS_SYSTEM_FONT ) ); - - int iconSpacing = 0; - if (m_mode & wxLC_ICON) iconSpacing = m_normal_spacing; - if (m_mode & wxLC_SMALL_ICON) iconSpacing = m_small_spacing; - wxNode *node = m_lines.First(); - while (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - line->CalculateSize( &dc, iconSpacing ); - node = node->Next(); - }; - - int lineWidth = 0; - int lineHeight = 0; - int lineSpacing = 0; - - node = m_lines.First(); - if (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - int dummy = 0; - line->GetSize( dummy, lineSpacing ); - lineSpacing += 6; - } - else - { - // just in case - lineSpacing = 6 + (int)dc.GetCharHeight(); - }; - - int clientWidth = 0; - int clientHeight = 0; - - if (m_mode & wxLC_REPORT) - { - int x = 5; - int y = 6; - int entireHeight = m_lines.Number() * lineSpacing + 10; - SetScrollbars( m_xScroll, m_yScroll, 0, (entireHeight+10) / m_yScroll, 0, 0, TRUE ); - GetClientSize( &clientWidth, &clientHeight ); - node = m_lines.First(); - while (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - line->SetPosition( &dc, x, y, clientWidth ); - int col_x = 3; - for (int i = 0; i < GetColumnCount(); i++) - { - line->SetColumnPosition( i, col_x ); - col_x += GetColumnWidth( i ); - }; - y += lineSpacing; - node = node->Next(); - }; - } - else - { - // At first, we try without any scrollbar - GetSize( &clientWidth, &clientHeight ); - - int entireWidth = 0; - - for (int tries = 0; tries < 2; tries++) - { - entireWidth = 0; - int x = 5; - int y = 6; - int maxWidth = 0; - node = m_lines.First(); - while (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - line->SetPosition( &dc, x, y, clientWidth ); - line->GetSize( lineWidth, lineHeight ); - if (lineWidth > maxWidth) maxWidth = lineWidth; - y += lineSpacing; - if (y+lineHeight > clientHeight-4) - { - y = 6; - x += maxWidth+13; - entireWidth += maxWidth+13; - maxWidth = 0; - }; - node = node->Next(); - if (!node) entireWidth += maxWidth; - if ((tries == 0) && (entireWidth > clientWidth)) - { - clientHeight -= 14; // scrollbar height - break; - }; - if (!node) tries = 1; - }; - }; - SetScrollbars( m_xScroll, m_yScroll, (entireWidth+15) / m_xScroll, 0, 0, 0, TRUE ); - }; - m_visibleLines = (clientHeight-4) / (lineSpacing); -}; - -void wxListMainWindow::RealizeChanges( void ) -{ - if (!m_current) - { - wxNode *node = m_lines.First(); - if (node) m_current = (wxListLineData*)node->Data(); - }; - if (m_current) - { - FocusLine( m_current ); - if (m_mode & wxLC_SINGLE_SEL) m_current->Hilight( TRUE ); - }; -}; - -long wxListMainWindow::GetNextItem( long item, int WXUNUSED(geometry), int state ) -{ - long ret = 0; - if (item > 0) ret = item; - wxNode *node = m_lines.Nth( ret ); - while (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - if ((state & wxLIST_STATE_FOCUSED) && (line == m_current)) return ret; - if ((state & wxLIST_STATE_SELECTED) && (line->IsHilighted())) return ret; - if (!state) return ret; - ret++; - node = node->Next(); - }; - return -1; -}; - -void wxListMainWindow::DeleteItem( long index ) -{ - m_dirty = TRUE; - wxNode *node = m_lines.Nth( index ); - if (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - if (m_current == line) m_current = (wxListLineData *) NULL; - DeleteLine( line ); - m_lines.DeleteNode( node ); - }; -}; - -void wxListMainWindow::DeleteColumn( int col ) -{ - m_dirty = TRUE; - wxNode *node = m_columns.Nth( col ); - if (node) m_columns.DeleteNode( node ); -}; - -void wxListMainWindow::DeleteAllItems( void ) -{ - m_dirty = TRUE; - m_current = (wxListLineData *) NULL; - wxNode *node = m_lines.First(); - while (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - DeleteLine( line ); - node = node->Next(); - }; - m_lines.Clear(); -}; - -void wxListMainWindow::DeleteEverything( void ) -{ - m_dirty = TRUE; - m_current = (wxListLineData *) NULL; - wxNode *node = m_lines.First(); - while (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - DeleteLine( line ); - node = node->Next(); - }; - m_lines.Clear(); - m_current = (wxListLineData *) NULL; - m_columns.Clear(); -}; - -void wxListMainWindow::EnsureVisible( long index ) -{ - wxListLineData *oldCurrent = m_current; - m_current = (wxListLineData *) NULL; - int i = index; - wxNode *node = m_lines.Nth( i ); - if (node) m_current = (wxListLineData*)node->Data(); - if (m_current) MoveToFocus(); - m_current = oldCurrent; -}; - -long wxListMainWindow::FindItem(long start, const wxString& str, bool WXUNUSED(partial) ) -{ - long pos = start; - wxString tmp = str; - if (pos < 0) pos = 0; - wxNode *node = m_lines.Nth( pos ); - while (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - wxString s = ""; - line->GetText( 0, s ); - if (s == tmp) return pos; - node = node->Next(); - pos++; - }; - return -1; -}; - -long wxListMainWindow::FindItem(long start, long data) -{ - long pos = start; - if (pos < 0) pos = 0; - wxNode *node = m_lines.Nth( pos ); - while (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - wxListItem item; - line->GetItem( 0, item ); - if (item.m_data == data) return pos; - node = node->Next(); - pos++; - }; - return -1; -}; - -long wxListMainWindow::HitTest( int x, int y, int &flags ) -{ - wxNode *node = m_lines.First(); - int count = 0; - while (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - long ret = line->IsHit( x, y ); - if (ret & flags) - { - flags = ret; - return count; - }; - node = node->Next(); - count++; - }; - return -1; -}; - -void wxListMainWindow::InsertItem( wxListItem &item ) -{ - m_dirty = TRUE; - int mode = 0; - if (m_mode & wxLC_REPORT) mode = wxLC_REPORT; - else if (m_mode & wxLC_LIST) mode = wxLC_LIST; - else if (m_mode & wxLC_ICON) mode = wxLC_ICON; - else if (m_mode & wxLC_SMALL_ICON) mode = wxLC_ICON; // no typo - wxListLineData *line = new wxListLineData( this, mode, m_hilightBrush ); - if (m_mode & wxLC_REPORT) - { - line->InitItems( GetColumnCount() ); - item.m_width = GetColumnWidth( 0 )-3; - } - else - line->InitItems( 1 ); - line->SetItem( 0, item ); - wxNode *node = m_lines.Nth( item.m_itemId ); - if (node) - m_lines.Insert( node, line ); - else - m_lines.Append( line ); -}; - -void wxListMainWindow::InsertColumn( long col, wxListItem &item ) -{ - m_dirty = TRUE; - if (m_mode & wxLC_REPORT) - { - if (item.m_width == wxLIST_AUTOSIZE_USEHEADER) item.m_width = GetTextLength( item.m_text ); - wxListHeaderData *column = new wxListHeaderData( item ); - wxNode *node = m_columns.Nth( col ); - if (node) - m_columns.Insert( node, column ); - else - m_columns.Append( column ); - }; -}; - -wxListCtrlCompare list_ctrl_compare_func_2; -long list_ctrl_compare_data; - -int list_ctrl_compare_func_1( const void *arg1, const void *arg2 ) -{ - wxListLineData *line1 = *((wxListLineData**)arg1); - wxListLineData *line2 = *((wxListLineData**)arg2); - wxListItem item; - line1->GetItem( 0, item ); - long data1 = item.m_data; - line2->GetItem( 0, item ); - long data2 = item.m_data; - return list_ctrl_compare_func_2( data1, data2, list_ctrl_compare_data ); -}; - -void wxListMainWindow::SortItems( wxListCtrlCompare fn, long data ) -{ - list_ctrl_compare_func_2 = fn; - list_ctrl_compare_data = data; - m_lines.Sort( list_ctrl_compare_func_1 ); -}; - -bool wxListMainWindow::OnListNotify( wxListEvent &event ) -{ - if (m_parent) m_parent->ProcessEvent( event ); - return FALSE; -}; - -// ------------------------------------------------------------------------------------- -// wxListItem -// ------------------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxListItem, wxObject) - -wxListItem::wxListItem(void) -{ - m_mask = 0; - m_itemId = 0; - m_col = 0; - m_state = 0; - m_stateMask = 0; - m_image = 0; - m_data = 0; - m_format = wxLIST_FORMAT_CENTRE; - m_width = 0; - m_colour = wxBLACK; -} - -// ------------------------------------------------------------------------------------- -// wxListEvent -// ------------------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxListEvent, wxCommandEvent) - -wxListEvent::wxListEvent( wxEventType commandType, int id ): - wxCommandEvent( commandType, id ) -{ - m_code = 0; - m_itemIndex = 0; - m_col = 0; - m_cancelled = FALSE; -}; - -// ------------------------------------------------------------------------------------- -// wxListCtrl -// ------------------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxListCtrl, wxControl) - -BEGIN_EVENT_TABLE(wxListCtrl,wxControl) - EVT_SIZE (wxListCtrl::OnSize) - EVT_IDLE (wxListCtrl::OnIdle) -END_EVENT_TABLE() - -wxListCtrl::wxListCtrl(void) -{ - m_imageListNormal = (wxImageList *) NULL; - m_imageListSmall = (wxImageList *) NULL; - m_imageListState = (wxImageList *) NULL; -} - -wxListCtrl::wxListCtrl( wxWindow *parent, wxWindowID id, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) - -{ - Create( parent, id, pos, size, style, name ); -}; - -wxListCtrl::~wxListCtrl(void) -{ -} - -bool wxListCtrl::Create( wxWindow *parent, wxWindowID id, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - m_imageListNormal = (wxImageList *) NULL; - m_imageListSmall = (wxImageList *) NULL; - m_imageListState = (wxImageList *) NULL; - - long s = style; - - if ((s & wxLC_REPORT == 0) && - (s & wxLC_LIST == 0) && - (s & wxLC_ICON == 0)) - s = s | wxLC_LIST; - - bool ret = wxControl::Create( parent, id, pos, size, s, name ); - - m_mainWin = new wxListMainWindow( this, -1, wxPoint(0,0), size, s ); - - if (GetWindowStyleFlag() & wxLC_REPORT) - m_headerWin = new wxListHeaderWindow( this, -1, m_mainWin, wxPoint(0,0), wxSize(size.x,23) ); - else - m_headerWin = (wxListHeaderWindow *) NULL; - - return ret; -}; - -void wxListCtrl::OnSize( wxSizeEvent &WXUNUSED(event) ) -{ - // handled in OnIdle - - if (m_mainWin) m_mainWin->m_dirty = TRUE; -}; - -void wxListCtrl::SetSingleStyle( long style, bool add ) -{ - long flag = GetWindowStyleFlag(); - - if (add) - { - if (style & wxLC_MASK_TYPE) flag = flag & ~wxLC_MASK_TYPE; - if (style & wxLC_MASK_ALIGN) flag = flag & ~wxLC_MASK_ALIGN; - if (style & wxLC_MASK_SORT) flag = flag & ~wxLC_MASK_SORT; - }; - - if (add) - { - flag |= style; - } - else - { - if (flag & style) flag -= style; - }; - - SetWindowStyleFlag( flag ); -}; - -void wxListCtrl::SetWindowStyleFlag( long flag ) -{ - m_mainWin->DeleteEverything(); - - int width = 0; - int height = 0; - GetClientSize( &width, &height ); - - m_mainWin->SetMode( flag ); - - if (flag & wxLC_REPORT) - { - if (!(GetWindowStyleFlag() & wxLC_REPORT)) - { -// m_mainWin->SetSize( 0, 24, width, height-24 ); - if (!m_headerWin) - { - m_headerWin = new wxListHeaderWindow( this, -1, m_mainWin, wxPoint(0,0), wxSize(width,23) ); - } - else - { -// m_headerWin->SetSize( 0, 0, width, 23 ); - m_headerWin->Show( TRUE ); - }; - }; - } - else - { - if (GetWindowStyleFlag() & wxLC_REPORT) - { -// m_mainWin->SetSize( 0, 0, width, height ); - m_headerWin->Show( FALSE ); - }; - }; - - wxWindow::SetWindowStyleFlag( flag ); -}; - -bool wxListCtrl::GetColumn(int col, wxListItem &item) -{ - m_mainWin->GetColumn( col, item ); - return TRUE; -}; - -bool wxListCtrl::SetColumn( int col, wxListItem& item ) -{ - m_mainWin->SetColumn( col, item ); - return TRUE; -}; - -int wxListCtrl::GetColumnWidth( int col ) -{ - return m_mainWin->GetColumnWidth( col ); -}; - -bool wxListCtrl::SetColumnWidth( int col, int width ) -{ - m_mainWin->SetColumnWidth( col, width ); - return TRUE; -}; - -int wxListCtrl::GetCountPerPage(void) -{ - return m_mainWin->GetCountPerPage(); // different from Windows ? -}; - -/* -wxText& wxListCtrl::GetEditControl(void) const -{ -}; -*/ - -bool wxListCtrl::GetItem( wxListItem &info ) -{ - m_mainWin->GetItem( info ); - return TRUE; -}; - -bool wxListCtrl::SetItem( wxListItem &info ) -{ - m_mainWin->SetItem( info ); - return TRUE; -}; - -long wxListCtrl::SetItem( long index, int col, const wxString& label, int imageId ) -{ - wxListItem info; - info.m_text = label; - info.m_mask = wxLIST_MASK_TEXT; - info.m_itemId = index; - info.m_col = col; - if ( imageId > -1 ) - { - info.m_image = imageId; - info.m_mask |= wxLIST_MASK_IMAGE; - } -; - m_mainWin->SetItem(info); - return TRUE; -}; - -int wxListCtrl::GetItemState( long item, long stateMask ) -{ - return m_mainWin->GetItemState( item, stateMask ); -}; - -bool wxListCtrl::SetItemState( long item, long state, long stateMask ) -{ - m_mainWin->SetItemState( item, state, stateMask ); - return TRUE; -}; - -bool wxListCtrl::SetItemImage( long item, int image, int WXUNUSED(selImage) ) -{ - wxListItem info; - info.m_image = image; - info.m_mask = wxLIST_MASK_IMAGE; - info.m_itemId = item; - m_mainWin->SetItem( info ); - return TRUE; -}; - -wxString wxListCtrl::GetItemText( long item ) -{ - wxListItem info; - info.m_itemId = item; - m_mainWin->GetItem( info ); - return info.m_text; -}; - -void wxListCtrl::SetItemText( long item, const wxString &str ) -{ - wxListItem info; - info.m_mask = wxLIST_MASK_TEXT; - info.m_itemId = item; - info.m_text = str; - m_mainWin->SetItem( info ); -}; - -long wxListCtrl::GetItemData( long item ) -{ - wxListItem info; - info.m_itemId = item; - m_mainWin->GetItem( info ); - return info.m_data; -}; - -bool wxListCtrl::SetItemData( long item, long data ) -{ - wxListItem info; - info.m_mask = wxLIST_MASK_DATA; - info.m_itemId = item; - info.m_data = data; - m_mainWin->SetItem( info ); - return TRUE; -}; - -bool wxListCtrl::GetItemRect( long item, wxRectangle &rect, int WXUNUSED(code) ) -{ - m_mainWin->GetItemRect( item, rect ); - return TRUE; -}; - -bool wxListCtrl::GetItemPosition( long item, wxPoint& pos ) -{ - m_mainWin->GetItemPosition( item, pos ); - return TRUE; -}; - -bool wxListCtrl::SetItemPosition( long WXUNUSED(item), const wxPoint& WXUNUSED(pos) ) -{ - return 0; -}; - -int wxListCtrl::GetItemCount(void) -{ - return m_mainWin->GetItemCount(); -}; - -void wxListCtrl::SetItemSpacing( int spacing, bool isSmall ) -{ - m_mainWin->SetItemSpacing( spacing, isSmall ); -}; - -int wxListCtrl::GetItemSpacing( bool isSmall ) -{ - return m_mainWin->GetItemSpacing( isSmall ); -}; - -int wxListCtrl::GetSelectedItemCount(void) -{ - return m_mainWin->GetSelectedItemCount(); -}; - -/* -wxColour wxListCtrl::GetTextColour(void) const -{ -}; - -void wxListCtrl::SetTextColour(const wxColour& WXUNUSED(col)) -{ -}; -*/ - -long wxListCtrl::GetTopItem(void) -{ - return 0; -}; - -long wxListCtrl::GetNextItem( long item, int geom, int state ) const -{ - return m_mainWin->GetNextItem( item, geom, state ); -}; - -wxImageList *wxListCtrl::GetImageList(int which) -{ - if (which == wxIMAGE_LIST_NORMAL) - { - return m_imageListNormal; - } - else if (which == wxIMAGE_LIST_SMALL) - { - return m_imageListSmall; - } - else if (which == wxIMAGE_LIST_STATE) - { - return m_imageListState; - }; - return (wxImageList *) NULL; -}; - -void wxListCtrl::SetImageList( wxImageList *imageList, int which ) -{ - m_mainWin->SetImageList( imageList, which ); -}; - -bool wxListCtrl::Arrange( int WXUNUSED(flag) ) -{ - return 0; -}; - -bool wxListCtrl::DeleteItem( long item ) -{ - m_mainWin->DeleteItem( item ); - return TRUE; -}; - -bool wxListCtrl::DeleteAllItems(void) -{ - m_mainWin->DeleteAllItems(); - return TRUE; -}; - -bool wxListCtrl::DeleteColumn( int col ) -{ - m_mainWin->DeleteColumn( col ); - return TRUE; -}; - -/* -wxText& wxListCtrl::Edit( long WXUNUSED(item ) ) -{ -}; -*/ - -bool wxListCtrl::EnsureVisible( long item ) -{ - m_mainWin->EnsureVisible( item ); - return TRUE; -}; - -long wxListCtrl::FindItem( long start, const wxString& str, bool partial ) -{ - return m_mainWin->FindItem( start, str, partial ); -}; - -long wxListCtrl::FindItem( long start, long data ) -{ - return m_mainWin->FindItem( start, data ); -}; - -long wxListCtrl::FindItem( long WXUNUSED(start), const wxPoint& WXUNUSED(pt), - int WXUNUSED(direction)) -{ - return 0; -}; - -long wxListCtrl::HitTest( const wxPoint &point, int &flags ) -{ - return m_mainWin->HitTest( (int)point.x, (int)point.y, flags ); -}; - -long wxListCtrl::InsertItem( wxListItem& info ) -{ - m_mainWin->InsertItem( info ); - return 0; -}; - -long wxListCtrl::InsertItem( long index, const wxString &label ) -{ - wxListItem info; - info.m_text = label; - info.m_mask = wxLIST_MASK_TEXT; - info.m_itemId = index; - return InsertItem( info ); -}; - -long wxListCtrl::InsertItem( long index, int imageIndex ) -{ - wxListItem info; - info.m_mask = wxLIST_MASK_IMAGE; - info.m_image = imageIndex; - info.m_itemId = index; - return InsertItem( info ); -}; - -long wxListCtrl::InsertItem( long index, const wxString &label, int imageIndex ) -{ - wxListItem info; - info.m_text = label; - info.m_image = imageIndex; - info.m_mask = wxLIST_MASK_TEXT | wxLIST_MASK_IMAGE; - info.m_itemId = index; - return InsertItem( info ); -}; - -long wxListCtrl::InsertColumn( long col, wxListItem &item ) -{ - m_mainWin->InsertColumn( col, item ); - return 0; -}; - -long wxListCtrl::InsertColumn( long col, const wxString &heading, - int format, int width ) -{ - wxListItem item; - item.m_mask = wxLIST_MASK_TEXT | wxLIST_MASK_FORMAT; - item.m_text = heading; - if (width >= -2) - { - item.m_mask |= wxLIST_MASK_WIDTH; - item.m_width = width; - } -; - item.m_format = format; - - return InsertColumn( col, item ); -}; - -bool wxListCtrl::ScrollList( int WXUNUSED(dx), int WXUNUSED(dy) ) -{ - return 0; -}; - -// Sort items. -// fn is a function which takes 3 long arguments: item1, item2, data. -// item1 is the long data associated with a first item (NOT the index). -// item2 is the long data associated with a second item (NOT the index). -// data is the same value as passed to SortItems. -// The return value is a negative number if the first item should precede the second -// item, a positive number of the second item should precede the first, -// or zero if the two items are equivalent. -// data is arbitrary data to be passed to the sort function. - -bool wxListCtrl::SortItems( wxListCtrlCompare fn, long data ) -{ - m_mainWin->SortItems( fn, data ); - return TRUE; -}; - -void wxListCtrl::OnIdle( wxIdleEvent &WXUNUSED(event) ) -{ - if (!m_mainWin->m_dirty) return; - - int cw = 0; - int ch = 0; - GetClientSize( &cw, &ch ); - - int x = 0; - int y = 0; - int w = 0; - int h = 0; - - if (GetWindowStyleFlag() & wxLC_REPORT) - { - m_headerWin->GetPosition( &x, &y ); - m_headerWin->GetSize( &w, &h ); - if ((x != 0) || (y != 0) || (w != cw) || (h != 23)) - m_headerWin->SetSize( 0, 0, cw, 23 ); - - m_mainWin->GetPosition( &x, &y ); - m_mainWin->GetSize( &w, &h ); - if ((x != 0) || (y != 24) || (w != cw) || (h != ch-24)) - m_mainWin->SetSize( 0, 24, cw, ch-24 ); - } - else - { - m_mainWin->GetPosition( &x, &y ); - m_mainWin->GetSize( &w, &h ); - if ((x != 0) || (y != 24) || (w != cw) || (h != ch)) - m_mainWin->SetSize( 0, 0, cw, ch ); - }; - - m_mainWin->CalculatePositions(); - m_mainWin->RealizeChanges(); - m_mainWin->m_dirty = FALSE; - m_mainWin->Refresh(); -}; - - diff --git a/src/generic/msgdlgg.cpp b/src/generic/msgdlgg.cpp deleted file mode 100644 index aa867e2284..0000000000 --- a/src/generic/msgdlgg.cpp +++ /dev/null @@ -1,201 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: msgdlgg.cpp -// Purpose: wxGenericMessageDialog -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "msgdlgg.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/utils.h" -#include "wx/dialog.h" -#include "wx/listbox.h" -#include "wx/button.h" -#include "wx/stattext.h" -#include "wx/layout.h" -#include "wx/intl.h" -#endif - -#include -#include - -#include "wx/generic/msgdlgg.h" - -/////////////////////////////////////////////////////////////////// -// New dialog box implementations - -// Split message, using constraints to position controls -void wxSplitMessage2(const char *message, wxList *messageList, wxWindow *parent, wxRowColSizer *sizer) -{ - char *copyMessage = copystring(message); - size_t i = 0; - size_t len = strlen(copyMessage); - char *currentMessage = copyMessage; - -// wxWindow *lastWindow = parent; - - while (i < len) { - while ((i < len) && (copyMessage[i] != '\n')) i++; - if (i < len) copyMessage[i] = 0; - wxStaticText *mess = new wxStaticText(parent, -1, currentMessage); - -/* - wxLayoutConstraints *c = new wxLayoutConstraints; - c->left.SameAs (parent, wxLeft, 10); - c->top.SameAs (lastWindow, wxBottom, 5); - c->right.AsIs (); - c->height.AsIs (); - - mess->SetConstraints(c); -*/ - sizer->AddSizerChild(mess); - - messageList->Append(mess); - - currentMessage = copyMessage + i + 1; - } - delete[] copyMessage; -} - -#if !USE_SHARED_LIBRARY -BEGIN_EVENT_TABLE(wxGenericMessageDialog, wxDialog) - EVT_BUTTON(wxID_YES, wxGenericMessageDialog::OnYes) - EVT_BUTTON(wxID_NO, wxGenericMessageDialog::OnNo) - EVT_BUTTON(wxID_CANCEL, wxGenericMessageDialog::OnCancel) -END_EVENT_TABLE() - -IMPLEMENT_CLASS(wxGenericMessageDialog, wxDialog) -#endif - -wxGenericMessageDialog::wxGenericMessageDialog(wxWindow *parent, const wxString& message, const wxString& caption, - long style, const wxPoint& pos): - wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL) -{ - m_dialogStyle = style; - - wxBeginBusyCursor(); - - wxSizer *topSizer = new wxSizer(this, wxSizerShrink); - topSizer->SetBorder(10, 10); - - wxRowColSizer *messageSizer = new wxRowColSizer(topSizer, wxSIZER_COLS, 100); - messageSizer->SetName("messageSizer"); - -// bool centre = ((style & wxCENTRE) == wxCENTRE); - - wxList messageList; - wxSplitMessage2(message, &messageList, this, messageSizer); - - // Insert a spacer - wxSpacingSizer *spacingSizer = new wxSpacingSizer(topSizer, wxBelow, messageSizer, 20); - - wxRowColSizer *buttonSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS); - buttonSizer->SetName("buttonSizer"); - - // Specify constraints for the button sizer - wxLayoutConstraints *c = new wxLayoutConstraints; - c->width.AsIs (); - c->height.AsIs (); - c->top.Below (spacingSizer); - c->centreX.SameAs (spacingSizer, wxCentreX); - buttonSizer->SetConstraints(c); - - wxButton *ok = (wxButton *) NULL; - wxButton *cancel = (wxButton *) NULL; - wxButton *yes = (wxButton *) NULL; - wxButton *no = (wxButton *) NULL; - - if (style & wxYES_NO) { - yes = new wxButton(this, wxID_YES, _("Yes")); - no = new wxButton(this, wxID_NO, _("No")); - - buttonSizer->AddSizerChild(yes); - buttonSizer->AddSizerChild(no); - } - - if (style & wxOK) { - ok = new wxButton(this, wxID_OK, _("OK")); - buttonSizer->AddSizerChild(ok); - } - - if (style & wxCANCEL) { - cancel = new wxButton(this, wxID_CANCEL, _("Cancel")); - buttonSizer->AddSizerChild(cancel); - } - - if (ok) - { - ok->SetDefault(); - ok->SetFocus(); - } - else if (yes) - { - yes->SetDefault(); - yes->SetFocus(); - } - - Layout(); - Centre(wxBOTH); - - wxEndBusyCursor(); -} - -void wxGenericMessageDialog::OnYes(wxCommandEvent& WXUNUSED(event)) -{ - EndModal(wxID_YES); -} - -void wxGenericMessageDialog::OnNo(wxCommandEvent& WXUNUSED(event)) -{ - EndModal(wxID_NO); -} - -void wxGenericMessageDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) -{ - // Allow cancellation via ESC/Close button except if - // only YES and NO are specified. - if ( (m_dialogStyle & wxYES_NO) != wxYES_NO || (m_dialogStyle & wxCANCEL) ) - EndModal(wxID_CANCEL); -} - - -int wxMessageBox(const wxString& message, const wxString& caption, long style, - wxWindow *parent, int WXUNUSED(x), int WXUNUSED(y) ) -{ - wxMessageDialog dialog(parent, message, caption, style); - - int ans = dialog.ShowModal(); - switch ( ans ) - { - case wxID_OK: - return wxOK; - break; - case wxID_YES: - return wxYES; - break; - case wxID_NO: - return wxNO; - break; - default: - case wxID_CANCEL: - return wxCANCEL; - break; - } - - return ans; -} - diff --git a/src/generic/panelg.cpp b/src/generic/panelg.cpp deleted file mode 100644 index c58841ba5c..0000000000 --- a/src/generic/panelg.cpp +++ /dev/null @@ -1,175 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: panelg.cpp -// Purpose: wxPanel -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "panelg.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/settings.h" -#endif - -#include "wx/generic/panelg.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxPanel, wxWindow) - -BEGIN_EVENT_TABLE(wxPanel, wxWindow) - EVT_SYS_COLOUR_CHANGED(wxPanel::OnSysColourChanged) - EVT_NAVIGATION_KEY(wxPanel::OnNavigationKey) -END_EVENT_TABLE() - -#endif - -wxPanel::wxPanel() -{ -} - -bool wxPanel::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - bool ret = wxWindow::Create(parent, id, pos, size, style, name); - - if ( ret ) { - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); - SetDefaultBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); - SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT)); - } - - return ret; -} - -void wxPanel::InitDialog(void) -{ - wxInitDialogEvent event(GetId()); - event.SetEventObject(this); - GetEventHandler()->ProcessEvent(event); -} - -void wxPanel::SetFocus() -{ - SetFocusToNextChild(); -} - -// Responds to colour changes, and passes event on to children. -void wxPanel::OnSysColourChanged(wxSysColourChangedEvent& event) -{ - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); - SetDefaultBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); - Refresh(); - - // Propagate the event to the non-top-level children - wxWindow::OnSysColourChanged(event); -} - -void wxPanel::OnNavigationKey(wxNavigationKeyEvent& event) -{ - // don't process these ones here - if ( event.IsWindowChange() ) { - event.Skip(); - return; - } - - // first of all, find the window which currently has the focus - wxNode *node = GetChildren()->First(); - wxWindow *winFocus = event.GetCurrentFocus(); - - // @@@ no FindFocus() in wxGTK - #ifndef __WXGTK__ - if ( winFocus == NULL ) - winFocus = wxWindow::FindFocus(); - #endif - - while ( node != NULL ) { - if ( node->Data() == winFocus ) - break; - - node = node->Next(); - } - - if ( !SetFocusToNextChild(node, event.GetDirection()) ) - event.Skip(); -} - -// set focus to the next child which accepts it (or first/last if node == NULL) -bool wxPanel::SetFocusToNextChild(wxNode *node, bool bForward) -{ - // @@ using typed list would be better... - #define WIN(node) ((wxWindow *)(node->Data())) - - bool bFound = FALSE; // have we found a window we will set focus to? - - wxList *children = GetChildren(); - if ( node == NULL ) { - // we've never had focus before - node = bForward ? children->First() : children->Last(); - if ( node == NULL ) { - // no children - return FALSE; - } - - bFound = WIN(node)->AcceptsFocus(); - } -#if 0 // to restore when it will really work (now it's triggered all the time) - else { - // just to be sure it's the right one - wxASSERT( WIN(node)->AcceptsFocus() ); - } -#endif // 0 - - // find the next child which accepts focus - bool bParentWantsIt = TRUE; - while ( !bFound ) { - node = bForward ? node->Next() : node->Previous(); - if ( node == NULL ) { - if ( !bParentWantsIt ) { - // we've already been here which means that we've done a whole - // cycle without success - get out from the infinite loop - return FALSE; - } - - // ask parent if he doesn't want to advance focus to the next panel - if ( GetParent() != NULL ) { - wxNavigationKeyEvent event; - event.SetDirection(bForward); - event.SetWindowChange(FALSE); - event.SetCurrentFocus(this); - - if ( GetParent()->ProcessEvent(event) ) - return TRUE; - } - - // a sentinel to avoid infinite loops - bParentWantsIt = FALSE; - - // wrap around - node = bForward ? children->First() : children->Last(); - } - - bFound = WIN(node)->AcceptsFocus(); - } - - WIN(node)->SetFocus(); - - #undef WIN - - return TRUE; -} diff --git a/src/generic/printps.cpp b/src/generic/printps.cpp deleted file mode 100644 index d1acf4870e..0000000000 --- a/src/generic/printps.cpp +++ /dev/null @@ -1,265 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: printps.cpp -// Purpose: Postscript print/preview framework -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "printps.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include "wx/defs.h" - -#ifndef WX_PRECOMP -#include "wx/utils.h" -#include "wx/dc.h" -#include "wx/app.h" -#include "wx/msgdlg.h" -#include -#endif - -#include "wx/generic/printps.h" -#include "wx/dcprint.h" -#include "wx/printdlg.h" -#include "wx/generic/prntdlgg.h" - -#include - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter, wxPrinterBase) -IMPLEMENT_CLASS(wxPostScriptPrintPreview, wxPrintPreviewBase) -#endif - -/* - * Printer - */ - -wxPostScriptPrinter::wxPostScriptPrinter(wxPrintData *data): - wxPrinterBase(data) -{ -} - -wxPostScriptPrinter::~wxPostScriptPrinter(void) -{ -} - -bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt) -{ - sm_abortIt = FALSE; - sm_abortWindow = (wxWindow *) NULL; - - if (!printout) - return FALSE; - - printout->SetIsPreview(FALSE); - printout->OnPreparePrinting(); - - // Get some parameters from the printout, if defined - int fromPage, toPage; - int minPage, maxPage; - printout->GetPageInfo(&minPage, &maxPage, &fromPage, &toPage); - - if (maxPage == 0) - return FALSE; - - m_printData.SetMinPage(minPage); - m_printData.SetMaxPage(maxPage); - if (fromPage != 0) - m_printData.SetFromPage(fromPage); - if (toPage != 0) - m_printData.SetToPage(toPage); - - if (minPage != 0) - { - m_printData.EnablePageNumbers(TRUE); - if (m_printData.GetFromPage() < m_printData.GetMinPage()) - m_printData.SetFromPage(m_printData.GetMinPage()); - else if (m_printData.GetFromPage() > m_printData.GetMaxPage()) - m_printData.SetFromPage(m_printData.GetMaxPage()); - if (m_printData.GetToPage() > m_printData.GetMaxPage()) - m_printData.SetToPage(m_printData.GetMaxPage()); - else if (m_printData.GetToPage() < m_printData.GetMinPage()) - m_printData.SetToPage(m_printData.GetMinPage()); - } - else - m_printData.EnablePageNumbers(FALSE); - - // Create a suitable device context - wxDC *dc = (wxDC *) NULL; - if (prompt) - { - wxGenericPrintDialog dialog(parent, & m_printData); - if (dialog.ShowModal() == wxID_OK) - { - dc = dialog.GetPrintDC(); - m_printData = dialog.GetPrintData(); - } - } - else - { - dc = new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, (wxWindow *) NULL); - } - - // May have pressed cancel. - if (!dc || !dc->Ok()) - { - if (dc) delete dc; - return FALSE; - } - - int logPPIScreenX = 0; - int logPPIScreenY = 0; - int logPPIPrinterX = 0; - int logPPIPrinterY = 0; - - // Correct values for X/PostScript? - logPPIScreenX = 100; - logPPIScreenY = 100; - logPPIPrinterX = 100; - logPPIPrinterY = 100; - - printout->SetPPIScreen(logPPIScreenX, logPPIScreenY); - printout->SetPPIPrinter(logPPIPrinterX, logPPIPrinterY); - - // Set printout parameters - printout->SetDC(dc); - - int w, h; - long ww, hh; - dc->GetSize(&w, &h); - printout->SetPageSizePixels((int)w, (int)h); - dc->GetSizeMM(&ww, &hh); - printout->SetPageSizeMM((int)ww, (int)hh); - - // Create an abort window - wxBeginBusyCursor(); - - printout->OnBeginPrinting(); - - bool keepGoing = TRUE; - - int copyCount; - for (copyCount = 1; copyCount <= m_printData.GetNoCopies(); copyCount ++) - { - if (!printout->OnBeginDocument(m_printData.GetFromPage(), m_printData.GetToPage())) - { - wxEndBusyCursor(); - wxMessageBox(_("Could not start printing."), _("Print Error"), wxOK, parent); - break; - } - if (sm_abortIt) - break; - - int pn; - for (pn = m_printData.GetFromPage(); keepGoing && (pn <= m_printData.GetToPage()) && printout->HasPage(pn); - pn++) - { - if (sm_abortIt) - { - keepGoing = FALSE; - break; - } - else - { - dc->StartPage(); - printout->OnPrintPage(pn); - dc->EndPage(); - } - } - printout->OnEndDocument(); - } - - printout->OnEndPrinting(); - - wxEndBusyCursor(); - - delete dc; - - return TRUE; -} - -bool wxPostScriptPrinter::PrintDialog(wxWindow *parent) -{ - wxGenericPrintDialog dialog(parent, & m_printData); - return (dialog.ShowModal() == wxID_OK); -} - -bool wxPostScriptPrinter::Setup(wxWindow *parent) -{ - wxGenericPrintDialog dialog(parent, & m_printData); - dialog.GetPrintData().SetSetupDialog(TRUE); - return (dialog.ShowModal() == wxID_OK); -} - -/* - * Print preview - */ - -wxPostScriptPrintPreview::wxPostScriptPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting, wxPrintData *data): - wxPrintPreviewBase(printout, printoutForPrinting, data) -{ - // Have to call it here since base constructor can't call it - DetermineScaling(); -} - -wxPostScriptPrintPreview::~wxPostScriptPrintPreview(void) -{ -} - -bool wxPostScriptPrintPreview::Print(bool interactive) -{ - if (!m_printPrintout) - return FALSE; - wxPostScriptPrinter printer(&m_printData); - return printer.Print(m_previewFrame, m_printPrintout, interactive); -} - -void wxPostScriptPrintPreview::DetermineScaling(void) -{ - const char *paperType = wxThePrintSetupData->GetPaperName(); - if (!paperType) - paperType = _("A4 210 x 297 mm"); - - wxPrintPaperType *paper = wxThePrintPaperDatabase->FindPaperType(paperType); - if (!paper) - paper = wxThePrintPaperDatabase->FindPaperType(_("A4 210 x 297 mm")); - if (paper) - { - m_previewPrintout->SetPPIScreen(100, 100); - m_previewPrintout->SetPPIPrinter(100, 100); - - // If in landscape mode, we need to swap the width and height. - if ( m_printData.GetOrientation() == wxLANDSCAPE ) - { - m_pageWidth = paper->heightPixels; - m_pageHeight = paper->widthPixels; - m_previewPrintout->SetPageSizeMM(paper->heightMM, paper->widthMM); - m_previewPrintout->SetPageSizePixels(paper->heightPixels, paper->widthPixels); - } - else - { - m_pageWidth = paper->widthPixels; - m_pageHeight = paper->heightPixels; - m_previewPrintout->SetPageSizeMM(paper->widthMM, paper->heightMM); - m_previewPrintout->SetPageSizePixels(paper->widthPixels, paper->heightPixels); - } - - // At 100%, the page should look about page-size on the screen. - m_previewScale = (float)0.8; -// m_previewScale = (float)((float)screenWidth/(float)printerWidth); -// m_previewScale = previewScale * (float)((float)screenXRes/(float)printerYRes); - } -} - diff --git a/src/generic/prntdlgg.cpp b/src/generic/prntdlgg.cpp deleted file mode 100644 index 74837533a2..0000000000 --- a/src/generic/prntdlgg.cpp +++ /dev/null @@ -1,633 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: prntdlgg.cpp -// Purpose: Generic print dialogs -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "prntdlgg.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include "wx/defs.h" - -#define WINDOWS_PRINTING (wxTheApp->GetPrintMode() == wxPRINT_WINDOWS) - -#ifndef WX_PRECOMP -#include "wx/utils.h" -#include "wx/dc.h" -#include "wx/app.h" -#include "wx/frame.h" -#include "wx/stattext.h" -#include "wx/button.h" -#include "wx/checkbox.h" -#include "wx/textctrl.h" -#include "wx/radiobox.h" -#include "wx/filedlg.h" -#include "wx/choice.h" -#include -#endif - -#include "wx/generic/prntdlgg.h" -#include "wx/printdlg.h" - -#include -#include - -#if !USE_SHARED_LIBRARY -IMPLEMENT_CLASS(wxGenericPrintDialog, wxDialog) -IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialog) -IMPLEMENT_CLASS(wxGenericPageSetupDialog, wxDialog) - -BEGIN_EVENT_TABLE(wxGenericPrintDialog, wxDialog) - EVT_BUTTON(wxID_OK, wxGenericPrintDialog::OnOK) - EVT_BUTTON(wxPRINTID_SETUP, wxGenericPrintDialog::OnSetup) - EVT_RADIOBOX(wxPRINTID_RANGE, wxGenericPrintDialog::OnRange) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxGenericPageSetupDialog, wxDialog) - EVT_BUTTON(wxPRINTID_SETUP, wxGenericPageSetupDialog::OnPrinter) -END_EVENT_TABLE() -#endif - -extern wxPrintPaperDatabase *wxThePrintPaperDatabase; - -/* - * Generic print dialog for non-Windows printing use. - */ - - -wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, wxPrintData* data): - wxDialog(parent, -1, _("Print"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL) -{ - if ( data ) - printData = *data; - - int buttonWidth = 65; - int buttonHeight = 25; - int spacing = 5; - int yPos = 5; - int xPos = 5; - - wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(5, yPos), wxSize(buttonWidth, buttonHeight)); - (void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(buttonWidth + 5 + spacing, yPos), wxSize(buttonWidth, buttonHeight)); - - setupButton = new wxButton(this, wxPRINTID_SETUP, _("Setup..."), wxPoint(buttonWidth*2 + 5 + 2*spacing, yPos), wxSize(buttonWidth, buttonHeight)); - - okButton->SetDefault(); - okButton->SetFocus(); - - yPos += 35; - - wxString choices[2]; - choices[0] = _("All"); - choices[1] = _("Pages"); - - fromText = (wxTextCtrl*)NULL; - - if(printData.GetFromPage() != 0) - { - rangeRadioBox = new wxRadioBox(this, wxPRINTID_RANGE, _("Print Range"), - wxPoint(5, yPos), wxSize(-1, -1), 2, choices, 2); - rangeRadioBox->SetSelection(1); - } - - yPos += 60; - xPos = 5; - int staticWidth = 45; - int textWidth = 40; - spacing = 10; - - if(printData.GetFromPage() != 0) - { - (void) new wxStaticText(this, wxPRINTID_STATIC, _("From:"), wxPoint(xPos, yPos)); - xPos += staticWidth; - - fromText = new wxTextCtrl(this, wxPRINTID_FROM, "", wxPoint(xPos, yPos), wxSize(textWidth, -1)); - xPos += spacing + textWidth; - - (void) new wxStaticText(this, wxPRINTID_STATIC, _("To:"), wxPoint(xPos, yPos)); - xPos += staticWidth; - - toText = new wxTextCtrl(this, wxPRINTID_TO, "", wxPoint(xPos, yPos), wxSize(textWidth, -1)); - xPos += spacing + textWidth; - } - - (void) new wxStaticText(this, wxPRINTID_STATIC, _("Copies:"), wxPoint(xPos, yPos)); - xPos += spacing + staticWidth; - - noCopiesText = new wxTextCtrl(this, wxPRINTID_COPIES, "", wxPoint(xPos, yPos), wxSize(textWidth, -1)); - - yPos += 30; - xPos = 5; - - printToFileCheckBox = new wxCheckBox(this, wxPRINTID_PRINTTOFILE, _("Print to File"), wxPoint(xPos, yPos)); - - Fit(); - Centre(wxBOTH); - - // Calls wxWindow::OnInitDialog and then wxGenericPrintDialog::TransferDataToWindow - InitDialog(); -} - -int wxGenericPrintDialog::ShowModal(void) -{ - if ( printData.GetSetupDialog() ) - { - wxGenericPrintSetupDialog *genericPrintSetupDialog = - new wxGenericPrintSetupDialog(GetParent(), wxThePrintSetupData); - int ret = genericPrintSetupDialog->ShowModal(); - if ( ret != wxID_CANCEL ) - { - *wxThePrintSetupData = genericPrintSetupDialog->printData; - } - genericPrintSetupDialog->Close(TRUE); - return ret; - } - else - { - return wxDialog::ShowModal(); - } -} - -wxGenericPrintDialog::~wxGenericPrintDialog(void) -{ -} - -void wxGenericPrintDialog::OnOK(wxCommandEvent& WXUNUSED(event)) -{ - TransferDataFromWindow(); - - // There are some interactions between the global setup data - // and the standard print dialog. The global printing 'mode' - // is determined by whether the user checks Print to file - // or not. - if (printData.GetPrintToFile()) - { - wxThePrintSetupData->SetPrinterMode(PS_FILE); - - char *f = wxFileSelector(_("PostScript file"), - wxPathOnly(wxThePrintSetupData->GetPrinterFile()), - wxFileNameFromPath(wxThePrintSetupData->GetPrinterFile()), - "ps", "*.ps", 0, this); - if (f) - wxThePrintSetupData->SetPrinterFile(f); - else - return; - } - else - wxThePrintSetupData->SetPrinterMode(PS_PRINTER); - - EndModal(wxID_OK); -} - -void wxGenericPrintDialog::OnRange(wxCommandEvent& event) -{ - if (!fromText) return; - - if (event.GetInt() == 1) - { - fromText->Enable(FALSE); - toText->Enable(FALSE); - } - else if (event.GetInt() == 0) - { - fromText->Enable(TRUE); - toText->Enable(TRUE); - } -} - -void wxGenericPrintDialog::OnSetup(wxCommandEvent& WXUNUSED(event)) -{ - wxGenericPrintSetupDialog *genericPrintSetupDialog = - new wxGenericPrintSetupDialog(this, wxThePrintSetupData); - int ret = genericPrintSetupDialog->ShowModal(); - if ( ret != wxID_CANCEL ) - { - *wxThePrintSetupData = genericPrintSetupDialog->printData; - printData.SetOrientation(wxThePrintSetupData->GetPrinterOrientation()); - } - - genericPrintSetupDialog->Close(TRUE); -} - -bool wxGenericPrintDialog::TransferDataToWindow(void) -{ - char buf[10]; - - if(printData.GetFromPage() != 0) - { - if (printData.GetEnablePageNumbers()) - { - fromText->Enable(TRUE); - toText->Enable(TRUE); - - sprintf(buf, "%d", printData.GetFromPage()); - fromText->SetValue(buf); - sprintf(buf, "%d", printData.GetFromPage()); - toText->SetValue(buf); - - if (printData.GetAllPages()) - rangeRadioBox->SetSelection(0); - else - rangeRadioBox->SetSelection(1); - } - else - { - fromText->Enable(FALSE); - toText->Enable(FALSE); - rangeRadioBox->SetSelection(0); - rangeRadioBox->wxRadioBox::Enable(1, FALSE); - } - } - sprintf(buf, "%d", printData.GetNoCopies()); - noCopiesText->SetValue(buf); - - printToFileCheckBox->SetValue(printData.GetPrintToFile()); - printToFileCheckBox->Enable(printData.GetEnablePrintToFile()); - return TRUE; -} - -bool wxGenericPrintDialog::TransferDataFromWindow(void) -{ - if(printData.GetFromPage() != -1) - { - if (printData.GetEnablePageNumbers()) - { - printData.SetFromPage(atoi(fromText->GetValue())); - printData.SetToPage(atoi(toText->GetValue())); - } - if (rangeRadioBox->GetSelection() == 0) - printData.SetAllPages(TRUE); - else - printData.SetAllPages(FALSE); - } - else - { // continuous printing - printData.SetFromPage(1); - printData.SetToPage(32000); - } - printData.SetNoCopies(atoi(noCopiesText->GetValue())); - printData.SetPrintToFile(printToFileCheckBox->GetValue()); - - return TRUE; -} - -wxDC *wxGenericPrintDialog::GetPrintDC(void) -{ - return new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, (wxWindow *) NULL); -} - -/* - * Generic print setup dialog - */ - -wxGenericPrintSetupDialog::wxGenericPrintSetupDialog(wxWindow *parent, wxPrintSetupData* data): - wxDialog(parent, -1, _("Print Setup"), wxPoint(0, 0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL) -{ - if ( data ) - printData = *data; - - int buttonWidth = 65; - int buttonHeight = 25; - int spacing = 5; - int yPos = 5; - int xPos = 5; - - wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(xPos, yPos), wxSize(buttonWidth, buttonHeight)); - xPos += buttonWidth + spacing; - (void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(xPos, yPos), wxSize(buttonWidth, buttonHeight)); - - okButton->SetDefault(); - okButton->SetFocus(); - - yPos += 35; - xPos = 5; - - paperTypeChoice = CreatePaperTypeChoice(&xPos, &yPos); - - wxString choices[2]; - choices[0] = _("Portrait"); - choices[1] = _("Landscape"); - - orientationRadioBox = new wxRadioBox(this, wxPRINTID_ORIENTATION, _("Orientation"), - wxPoint(xPos, yPos), wxSize(-1, -1), 2, choices, 2); - orientationRadioBox->SetSelection(0); - - xPos += 200; - - colourCheckBox = new wxCheckBox(this, wxPRINTID_PRINTCOLOUR, _("Print in colour"), wxPoint(xPos, yPos)); - - xPos = 5; - yPos += 60; - - int staticWidth = 100; - int textWidth = 120; - spacing = 10; - - (void) new wxStaticText(this, wxPRINTID_STATIC, _("Printer command:"), wxPoint(xPos, yPos)); - xPos += staticWidth; - - printerCommandText = new wxTextCtrl(this, wxPRINTID_COMMAND, "", wxPoint(xPos, yPos), wxSize(textWidth, -1)); - xPos += textWidth + spacing; - - (void) new wxStaticText(this, wxPRINTID_STATIC, _("Printer options:"), wxPoint(xPos, yPos)); - xPos += staticWidth; - - printerOptionsText = new wxTextCtrl(this, wxPRINTID_OPTIONS, "", wxPoint(xPos, yPos), wxSize(textWidth, -1)); - - Fit(); - Centre(wxBOTH); - - InitDialog(); -} - -wxGenericPrintSetupDialog::~wxGenericPrintSetupDialog(void) -{ -} - -bool wxGenericPrintSetupDialog::TransferDataToWindow(void) -{ - if (printerCommandText && printData.GetPrinterCommand()) - printerCommandText->SetValue(printData.GetPrinterCommand()); - if (printerOptionsText && printData.GetPrinterOptions()) - printerOptionsText->SetValue(printData.GetPrinterOptions()); - if (colourCheckBox) - colourCheckBox->SetValue(printData.GetColour()); - - if (orientationRadioBox) - { - if (printData.GetPrinterOrientation() == PS_PORTRAIT) - orientationRadioBox->SetSelection(0); - else - orientationRadioBox->SetSelection(1); - } - return TRUE; -} - -bool wxGenericPrintSetupDialog::TransferDataFromWindow(void) -{ - if (printerCommandText) - printData.SetPrinterCommand(WXSTRINGCAST printerCommandText->GetValue()); - if (printerOptionsText) - printData.SetPrinterOptions(WXSTRINGCAST printerOptionsText->GetValue()); - if (colourCheckBox) - printData.SetColour(colourCheckBox->GetValue()); - if (orientationRadioBox) - { - int sel = orientationRadioBox->GetSelection(); - if (sel == 0) - printData.SetPrinterOrientation(PS_PORTRAIT); - else - printData.SetPrinterOrientation(PS_LANDSCAPE); - } - if (paperTypeChoice) - { - wxString val(paperTypeChoice->GetStringSelection()); - if (!val.IsNull() && val != "") - printData.SetPaperName((char *)(const char *)val); - } - return TRUE; -} - -wxChoice *wxGenericPrintSetupDialog::CreatePaperTypeChoice(int *x, int *y) -{ - if (!wxThePrintPaperDatabase) - { - wxThePrintPaperDatabase = new wxPrintPaperDatabase; - wxThePrintPaperDatabase->CreateDatabase(); - } - int n = wxThePrintPaperDatabase->Number(); - wxString *choices = new wxString [n]; - int sel = 0; - int i; - for (i = 0; i < n; i++) - { - wxPrintPaperType *paper = (wxPrintPaperType *)wxThePrintPaperDatabase->Nth(i)->Data(); - choices[i] = paper->pageName; - if (printData.GetPaperName() && choices[i] == printData.GetPaperName()) - sel = i; - } - - (void) new wxStaticText(this, wxPRINTID_STATIC, _("Paper size"), wxPoint(*x, *y)); - *y += 25; - - wxChoice *choice = new wxChoice(this, wxPRINTID_PAPERSIZE, wxPoint(*x, *y), wxSize(300, -1), n, - choices); - *y += 35; - delete[] choices; - - choice->SetSelection(sel); - return choice; -} - -/* - * Generic page setup dialog - */ - -void wxGenericPageSetupDialog::OnPrinter(wxCommandEvent& WXUNUSED(event)) -{ - if (wxTheApp->GetPrintMode() == wxPRINT_POSTSCRIPT) - { - wxGenericPrintSetupDialog *genericPrintSetupDialog = - new wxGenericPrintSetupDialog(this, wxThePrintSetupData); - int ret = genericPrintSetupDialog->ShowModal(); - if (ret == wxID_OK) - *wxThePrintSetupData = genericPrintSetupDialog->GetPrintData(); - - genericPrintSetupDialog->Close(TRUE); - } -#ifdef __WXMSW__ - else - { - wxPrintData data; - data.SetSetupDialog(TRUE); - wxPrintDialog printDialog(this, & data); - printDialog.Show(TRUE); - } -#endif -} - -wxGenericPageSetupDialog::wxGenericPageSetupDialog(wxWindow *parent, wxPageSetupData* data): - wxDialog(parent, -1, _("Page Setup"), wxPoint(0, 0), wxSize(600, 600), wxDIALOG_MODAL|wxDEFAULT_DIALOG_STYLE) -{ - if ( data ) - pageData = *data; - - int buttonWidth = 75; - int buttonHeight = 25; - int spacing = 5; - int yPos = 5; - int xPos = 5; - - wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(5, yPos), wxSize(buttonWidth, buttonHeight)); - (void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(buttonWidth + 5 + spacing, yPos), wxSize(buttonWidth, buttonHeight)); - - printerButton = new wxButton(this, wxPRINTID_SETUP, _("Printer..."), wxPoint(buttonWidth*2 + 5 + 2*spacing, yPos), wxSize(buttonWidth, buttonHeight)); - - if ( !pageData.GetEnablePrinter() ) - printerButton->Enable(FALSE); - -// if (printData.GetEnableHelp()) -// wxButton *helpButton = new wxButton(this, (wxFunction)wxGenericPageSetupHelpProc, _("Help"), -1, -1, buttonWidth, buttonHeight); - - okButton->SetDefault(); - okButton->SetFocus(); - - xPos = 5; - yPos += 35; - - paperTypeChoice = CreatePaperTypeChoice(&xPos, &yPos); - - xPos = 5; - - wxString choices[2]; - choices[0] = _("Portrait"); - choices[1] = _("Landscape"); - orientationRadioBox = new wxRadioBox(this, wxPRINTID_ORIENTATION, _("Orientation"), - wxPoint(xPos, yPos), wxSize(-1, -1), 2, choices, 2); - orientationRadioBox->SetSelection(0); - - xPos = 5; - yPos += 60; - - int staticWidth = 110; - int textWidth = 60; - spacing = 10; - - (void) new wxStaticText(this, wxPRINTID_STATIC, _("Left margin (mm):"), wxPoint(xPos, yPos)); - xPos += staticWidth; - - marginLeftText = new wxTextCtrl(this, wxPRINTID_LEFTMARGIN, "", wxPoint(xPos, yPos), wxSize(textWidth, -1)); - xPos += textWidth + spacing; - - (void) new wxStaticText(this, wxPRINTID_STATIC, _("Right margin (mm):"), wxPoint(xPos, yPos)); - xPos += staticWidth; - - marginRightText = new wxTextCtrl(this, wxPRINTID_RIGHTMARGIN, "", wxPoint(xPos, yPos), wxSize(textWidth, -1)); - xPos += textWidth + spacing; - - yPos += 35; - xPos = 5; - - (void) new wxStaticText(this, wxPRINTID_STATIC, _("Top margin (mm):"), wxPoint(xPos, yPos)); - xPos += staticWidth; - - marginTopText = new wxTextCtrl(this, wxPRINTID_TOPMARGIN, "", wxPoint(xPos, yPos), wxSize(textWidth, -1)); - xPos += textWidth + spacing; - - (void) new wxStaticText(this, wxPRINTID_STATIC, _("Bottom margin (mm):"), wxPoint(xPos, yPos)); - xPos += staticWidth; - - marginBottomText = new wxTextCtrl(this, wxPRINTID_BOTTOMMARGIN, "", wxPoint(xPos, yPos), wxSize(textWidth, -1)); - - Fit(); - Centre(wxBOTH); - - InitDialog(); -} - -wxGenericPageSetupDialog::~wxGenericPageSetupDialog(void) -{ -} - -bool wxGenericPageSetupDialog::TransferDataToWindow(void) -{ - if (marginLeftText) - marginLeftText->SetValue(IntToString((int) pageData.GetMarginTopLeft().x)); - if (marginTopText) - marginTopText->SetValue(IntToString((int) pageData.GetMarginTopLeft().y)); - if (marginRightText) - marginRightText->SetValue(IntToString((int) pageData.GetMarginBottomRight().x)); - if (marginBottomText) - marginBottomText->SetValue(IntToString((int) pageData.GetMarginBottomRight().y)); - - if (orientationRadioBox) - { - if (pageData.GetOrientation() == wxPORTRAIT) - orientationRadioBox->SetSelection(0); - else - orientationRadioBox->SetSelection(1); - } - return TRUE; -} - -bool wxGenericPageSetupDialog::TransferDataFromWindow(void) -{ - if (marginLeftText && marginTopText) - pageData.SetMarginTopLeft(wxPoint(atoi((const char *)marginLeftText->GetValue()),atoi((const char *)marginTopText->GetValue()))); - if (marginRightText && marginBottomText) - pageData.SetMarginBottomRight(wxPoint(atoi((const char *)marginRightText->GetValue()),atoi((const char *)marginBottomText->GetValue()))); - - if (orientationRadioBox) - { - int sel = orientationRadioBox->GetSelection(); - if (sel == 0) - { - wxThePrintSetupData->SetPrinterOrientation(wxPORTRAIT); - pageData.SetOrientation(wxPORTRAIT); - } - else - { - wxThePrintSetupData->SetPrinterOrientation(wxLANDSCAPE); - pageData.SetOrientation(wxLANDSCAPE); - } - } - if (paperTypeChoice) - { - wxString val(paperTypeChoice->GetStringSelection()); - if (!val.IsNull() && val != "") - { - wxPrintPaperType* paper = wxThePrintPaperDatabase->FindPaperType((char*) (const char *)val); - if ( paper ) - { - pageData.SetPaperSize(wxPoint(paper->widthMM, paper->heightMM)); - } - } - } - return TRUE; -} - -wxChoice *wxGenericPageSetupDialog::CreatePaperTypeChoice(int *x, int *y) -{ - if (!wxThePrintPaperDatabase) - { - wxThePrintPaperDatabase = new wxPrintPaperDatabase; - wxThePrintPaperDatabase->CreateDatabase(); - } - int n = wxThePrintPaperDatabase->Number(); - wxString *choices = new wxString [n]; - int sel = 0; - int i; - for (i = 0; i < n; i++) - { - wxPrintPaperType *paper = (wxPrintPaperType *)wxThePrintPaperDatabase->Nth(i)->Data(); - choices[i] = paper->pageName; - if (pageData.GetPaperSize().x == paper->widthMM && pageData.GetPaperSize().y == paper->heightMM) - sel = i; - } - - (void) new wxStaticText(this, wxPRINTID_STATIC, _("Paper size"), wxPoint(*x, *y)); - *y += 25; - - wxChoice *choice = new wxChoice(this, wxPRINTID_PAPERSIZE, wxPoint(*x, *y), wxSize(300, -1), n, - choices); - *y += 35; - delete[] choices; - - choice->SetSelection(sel); - return choice; -} - - diff --git a/src/generic/scrolwin.cpp b/src/generic/scrolwin.cpp deleted file mode 100644 index 4305d4a866..0000000000 --- a/src/generic/scrolwin.cpp +++ /dev/null @@ -1,449 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: scrolwin.cpp -// Purpose: wxScrolledWindow implementation -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#pragma implementation "scrolwin.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#include "wx/utils.h" -#include "wx/dcclient.h" - -#ifdef __WXMSW__ -#include "windows.h" -#endif - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include "wx/generic/scrolwin.h" - -#if !USE_SHARED_LIBRARY -BEGIN_EVENT_TABLE(wxScrolledWindow, wxWindow) - EVT_SCROLL(wxScrolledWindow::OnScroll) - EVT_SIZE(wxScrolledWindow::OnSize) - EVT_PAINT(wxScrolledWindow::OnPaint) -END_EVENT_TABLE() - -IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow, wxWindow) -#endif - -wxScrolledWindow::wxScrolledWindow(void) -{ - m_xScrollPixelsPerLine = 0; - m_yScrollPixelsPerLine = 0; - m_xScrollingEnabled = TRUE; - m_yScrollingEnabled = TRUE; - m_xScrollPosition = 0; - m_yScrollPosition = 0; - m_xScrollLines = 0; - m_yScrollLines = 0; - m_xScrollLinesPerPage = 0; - m_yScrollLinesPerPage = 0; - m_scaleX = 1.0; - m_scaleY = 1.0; -} - -bool wxScrolledWindow::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - m_xScrollPixelsPerLine = 0; - m_yScrollPixelsPerLine = 0; - m_xScrollingEnabled = TRUE; - m_yScrollingEnabled = TRUE; - m_xScrollPosition = 0; - m_yScrollPosition = 0; - m_xScrollLines = 0; - m_yScrollLines = 0; - m_xScrollLinesPerPage = 0; - m_yScrollLinesPerPage = 0; - m_scaleX = 1.0; - m_scaleY = 1.0; - - return wxWindow::Create(parent, id, pos, size, style, name); -} - -/* - * pixelsPerUnitX/pixelsPerUnitY: number of pixels per unit (e.g. pixels per text line) - * noUnitsX/noUnitsY: : no. units per scrollbar - */ -void wxScrolledWindow::SetScrollbars (int pixelsPerUnitX, int pixelsPerUnitY, - int noUnitsX, int noUnitsY, - int xPos, int yPos, bool noRefresh ) -{ - bool do_refresh = - ( - (noUnitsX != 0 && m_xScrollLines == 0) || - (noUnitsX < m_xScrollPosition) || - (noUnitsY != 0 && m_yScrollLines == 0) || - (noUnitsY < m_yScrollPosition) || - (xPos != m_xScrollPosition) || - (yPos != m_yScrollPosition) || - (pixelsPerUnitX != m_xScrollPixelsPerLine) || - (pixelsPerUnitY != m_yScrollPixelsPerLine) - ); - - m_xScrollPixelsPerLine = pixelsPerUnitX; - m_yScrollPixelsPerLine = pixelsPerUnitY; - m_xScrollPosition = xPos; - m_yScrollPosition = yPos; - m_xScrollLines = noUnitsX; - m_yScrollLines = noUnitsY; - - AdjustScrollbars(); - - if (do_refresh && !noRefresh) Refresh(); - -#ifdef __WXMSW__ - UpdateWindow ((HWND) GetHWND()); -#endif -} - -void wxScrolledWindow::OnScroll(wxScrollEvent& event) -{ - int orient = event.GetOrientation(); - - int nScrollInc = CalcScrollInc(event); - if (nScrollInc == 0) - return; - - // TODO: should we store the scroll position here as well as in wxWindow? - if (orient == wxHORIZONTAL) - { - int newPos = m_xScrollPosition + nScrollInc; - SetScrollPos(wxHORIZONTAL, newPos, TRUE ); - } - else - { - int newPos = m_yScrollPosition + nScrollInc; - SetScrollPos(wxVERTICAL, newPos, TRUE ); - } - -/* - // TODO We need to multiply the ScrollWindow amount by the scaling - // factor, but how do we know what this is in wxWin 2.0??? - float scaleX = 1.0; - float scaleY = 1.0; - - if ( this->IsKindOf(CLASSINFO(wxCanvas)) ) - { - wxDC* dc = ((wxCanvas *)this)->GetDC(); - dc->GetUserScale(&scaleX, &scaleY); - } -*/ - - if (orient == wxHORIZONTAL) - { - m_xScrollPosition += nScrollInc; - } - else - { - m_yScrollPosition += nScrollInc; - } - - if (orient == wxHORIZONTAL) - { - if (m_xScrollingEnabled) - ScrollWindow(-m_xScrollPixelsPerLine * nScrollInc, 0, (const wxRect *) NULL); - else - Refresh(); - } - else - { - if (m_yScrollingEnabled) - ScrollWindow(0, -m_yScrollPixelsPerLine * nScrollInc, (const wxRect *) NULL); - else - Refresh(); - } - -} - -int wxScrolledWindow::CalcScrollInc(wxScrollEvent& event) -{ - int pos = event.GetPosition(); - int orient = event.GetOrientation(); - - int nScrollInc = 0; - switch (event.GetEventType()) - { - case wxEVENT_TYPE_SCROLL_TOP: - { - if (orient == wxHORIZONTAL) - nScrollInc = - m_xScrollPosition; - else - nScrollInc = - m_yScrollPosition; - break; - } - case wxEVENT_TYPE_SCROLL_BOTTOM: - { - if (orient == wxHORIZONTAL) - nScrollInc = m_xScrollLines - m_xScrollPosition; - else - nScrollInc = m_yScrollLines - m_yScrollPosition; - break; - } - case wxEVENT_TYPE_SCROLL_LINEUP: - { - nScrollInc = -1; - break; - } - case wxEVENT_TYPE_SCROLL_LINEDOWN: - { - nScrollInc = 1; - break; - } - case wxEVENT_TYPE_SCROLL_PAGEUP: - { - if (orient == wxHORIZONTAL) - nScrollInc = -GetScrollPageSize(wxHORIZONTAL); - else - nScrollInc = -GetScrollPageSize(wxVERTICAL); - break; - } - case wxEVENT_TYPE_SCROLL_PAGEDOWN: - { - if (orient == wxHORIZONTAL) - nScrollInc = GetScrollPageSize(wxHORIZONTAL); - else - nScrollInc = GetScrollPageSize(wxVERTICAL); - break; - } - case wxEVENT_TYPE_SCROLL_THUMBTRACK: - { - if (orient == wxHORIZONTAL) - nScrollInc = pos - m_xScrollPosition; - else - nScrollInc = pos - m_yScrollPosition; - break; - } - default: - { - break; - } - } - if (orient == wxHORIZONTAL) - { - int w, h; - GetClientSize(&w, &h); - - int nMaxWidth = m_xScrollLines*m_xScrollPixelsPerLine; - int noPositions = (int) ( ((nMaxWidth - w)/(float)m_xScrollPixelsPerLine) + 0.5 ); - if (noPositions < 0) - noPositions = 0; - - if ( (m_xScrollPosition + nScrollInc) < 0 ) - nScrollInc = -m_xScrollPosition; // As -ve as we can go - else if ( (m_xScrollPosition + nScrollInc) > noPositions ) - nScrollInc = noPositions - m_xScrollPosition; // As +ve as we can go - - return nScrollInc; - } - else - { - int w, h; - GetClientSize(&w, &h); - - int nMaxHeight = m_yScrollLines*m_yScrollPixelsPerLine; - int noPositions = (int) ( ((nMaxHeight - h)/(float)m_yScrollPixelsPerLine) + 0.5 ); - if (noPositions < 0) - noPositions = 0; - - if ( (m_yScrollPosition + nScrollInc) < 0 ) - nScrollInc = -m_yScrollPosition; // As -ve as we can go - else if ( (m_yScrollPosition + nScrollInc) > noPositions ) - nScrollInc = noPositions - m_yScrollPosition; // As +ve as we can go - - return nScrollInc; - } -} - -// Adjust the scrollbars - new version. -void wxScrolledWindow::AdjustScrollbars(void) -{ - int w, h; - GetClientSize(&w, &h); - - // Recalculate scroll bar range and position - if (m_xScrollLines > 0) - { - int nMaxWidth = m_xScrollLines*m_xScrollPixelsPerLine; - int newRange = (int) ( ((nMaxWidth)/(float)m_xScrollPixelsPerLine) + 0.5 ); - if (newRange < 0) - newRange = 0; - - m_xScrollPosition = wxMin(newRange, m_xScrollPosition); - - // Calculate page size i.e. number of scroll units you get on the - // current client window - int noPagePositions = (int) ( (w/(float)m_xScrollPixelsPerLine) + 0.5 ); - if (noPagePositions < 1) - noPagePositions = 1; - - SetScrollbar(wxHORIZONTAL, m_xScrollPosition, noPagePositions, newRange); - SetScrollPageSize(wxHORIZONTAL, noPagePositions); - } - // Robert Roebling - else - { - m_xScrollPosition = 0; - SetScrollbar (wxHORIZONTAL, 0, 0, 0, FALSE); - } - - if (m_yScrollLines > 0) - { - int nMaxHeight = m_yScrollLines*m_yScrollPixelsPerLine; - int newRange = (int) ( ((nMaxHeight)/(float)m_yScrollPixelsPerLine) + 0.5 ); - if (newRange < 0) - newRange = 0; - - m_yScrollPosition = wxMin(newRange, m_yScrollPosition); - - // Calculate page size i.e. number of scroll units you get on the - // current client window - int noPagePositions = (int) ( (h/(float)m_yScrollPixelsPerLine) + 0.5 ); - if (noPagePositions < 1) - noPagePositions = 1; - - SetScrollbar(wxVERTICAL, m_yScrollPosition, noPagePositions, newRange); - SetScrollPageSize(wxVERTICAL, noPagePositions); - } - else - { - m_yScrollPosition = 0; - SetScrollbar (wxVERTICAL, 0, 0, 0, FALSE); // Robert Roebling - } - -} - -// Default OnSize resets scrollbars, if any -void wxScrolledWindow::OnSize(wxSizeEvent& WXUNUSED(event)) -{ -#if USE_CONSTRAINTS - if (GetAutoLayout()) - Layout(); -#endif - - AdjustScrollbars(); -} - -// This calls OnDraw, having adjusted the origin according to the current -// scroll position -void wxScrolledWindow::OnPaint(wxPaintEvent& WXUNUSED(event)) -{ - wxPaintDC dc(this); - PrepareDC(dc); - - OnDraw(dc); -} - -// Override this function if you don't want to have wxScrolledWindow -// automatically change the origin according to the scroll position. -void wxScrolledWindow::PrepareDC(wxDC& dc) -{ - dc.SetDeviceOrigin(- m_xScrollPosition * m_xScrollPixelsPerLine, - m_yScrollPosition * m_yScrollPixelsPerLine); - dc.SetUserScale(m_scaleX, m_scaleY); -} - -#if WXWIN_COMPATIBILITY -void wxScrolledWindow::GetScrollUnitsPerPage (int *x_page, int *y_page) const -{ - *x_page = GetScrollPageSize(wxHORIZONTAL); - *y_page = GetScrollPageSize(wxVERTICAL); -} -#endif - -void wxScrolledWindow::GetScrollPixelsPerUnit (int *x_unit, int *y_unit) const -{ - *x_unit = m_xScrollPixelsPerLine; - *y_unit = m_yScrollPixelsPerLine; -} - -int wxScrolledWindow::GetScrollPageSize(int orient) const -{ - if ( orient == wxHORIZONTAL ) - return m_xScrollLinesPerPage; - else - return m_yScrollLinesPerPage; -} - -void wxScrolledWindow::SetScrollPageSize(int orient, int pageSize) -{ - if ( orient == wxHORIZONTAL ) - m_xScrollLinesPerPage = pageSize; - else - m_yScrollLinesPerPage = pageSize; -} - -/* - * Scroll to given position (scroll position, not pixel position) - */ -void wxScrolledWindow::Scroll (int x_pos, int y_pos) -{ - int old_x, old_y; - ViewStart (&old_x, &old_y); - if (((x_pos == -1) || (x_pos == old_x)) && ((y_pos == -1) || (y_pos == old_y))) - return; - - if (x_pos > -1) - { - m_xScrollPosition = x_pos; - SetScrollPos (wxHORIZONTAL, x_pos, TRUE); - } - if (y_pos > -1) - { - m_yScrollPosition = y_pos; - SetScrollPos (wxVERTICAL, y_pos, TRUE); - } - Refresh(); -#ifdef __WXMSW__ - ::UpdateWindow ((HWND) GetHWND()); -#endif -} - -void wxScrolledWindow::EnableScrolling (bool x_scroll, bool y_scroll) -{ - m_xScrollingEnabled = x_scroll; - m_yScrollingEnabled = y_scroll; -} - -void wxScrolledWindow::GetVirtualSize (int *x, int *y) const -{ - *x = m_xScrollPixelsPerLine * m_xScrollLines; - *y = m_yScrollPixelsPerLine * m_yScrollLines; -} - -// Where the current view starts from -void wxScrolledWindow::ViewStart (int *x, int *y) const -{ - *x = m_xScrollPosition; - *y = m_yScrollPosition; -} - -void wxScrolledWindow::CalcScrolledPosition(int x, int y, int *xx, int *yy) const -{ - *xx = x - m_xScrollPosition * m_xScrollPixelsPerLine; - *yy = y - m_yScrollPosition * m_yScrollPixelsPerLine; -} - -void wxScrolledWindow::CalcUnscrolledPosition(int x, int y, float *xx, float *yy) const -{ - *xx = (float)(x + m_xScrollPosition * m_xScrollPixelsPerLine); - *yy = (float)(y + m_yScrollPosition * m_yScrollPixelsPerLine); -} - - diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp deleted file mode 100644 index 764f9c4b6c..0000000000 --- a/src/generic/splitter.cpp +++ /dev/null @@ -1,718 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: splitter.cpp -// Purpose: wxSplitterWindow implementation -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "splitter.h" -// #pragma interface -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include -#include - -#include "wx/string.h" -#include "wx/splitter.h" -#include "wx/dcscreen.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxSplitterWindow, wxWindow) - -BEGIN_EVENT_TABLE(wxSplitterWindow, wxWindow) - EVT_PAINT(wxSplitterWindow::OnPaint) - EVT_SIZE(wxSplitterWindow::OnSize) - EVT_MOUSE_EVENTS(wxSplitterWindow::OnMouseEvent) -END_EVENT_TABLE() -#endif - -wxSplitterWindow::wxSplitterWindow(void) -{ - m_splitMode = wxSPLIT_VERTICAL; - m_windowOne = (wxWindow *) NULL; - m_windowTwo = (wxWindow *) NULL; - m_dragMode = wxSPLIT_DRAG_NONE; - m_oldX = 0; - m_oldY = 0; - m_firstX = 0; - m_firstY = 0; - m_sashSize = 7; - m_borderSize = 2; - m_sashPosition = 0; - m_sashCursorWE = (wxCursor *) NULL; - m_sashCursorNS = (wxCursor *) NULL; - m_sashTrackerPen = (wxPen *) NULL; - m_lightShadowPen = (wxPen *) NULL; - m_mediumShadowPen = (wxPen *) NULL; - m_darkShadowPen = (wxPen *) NULL; - m_faceBrush = (wxBrush *) NULL; - m_facePen = (wxPen *) NULL; - m_hilightPen = (wxPen *) NULL; - m_minimumPaneSize = 0; -} - -wxSplitterWindow::wxSplitterWindow(wxWindow *parent, wxWindowID id, const wxPoint& pos, - const wxSize& size, long style, const wxString& name) - :wxWindow(parent, id, pos, size, style, name) -{ - m_splitMode = wxSPLIT_VERTICAL; - m_windowOne = (wxWindow *) NULL; - m_windowTwo = (wxWindow *) NULL; - m_dragMode = wxSPLIT_DRAG_NONE; - m_oldX = 0; - m_oldY = 0; - m_firstX = 0; - m_firstY = 0; - m_sashSize = 7; - m_borderSize = 2; - m_sashPosition = 0; - m_minimumPaneSize = 0; - m_sashCursorWE = new wxCursor(wxCURSOR_SIZEWE); - m_sashCursorNS = new wxCursor(wxCURSOR_SIZENS); - m_sashTrackerPen = new wxPen(*wxBLACK, 2, wxSOLID); - m_lightShadowPen = (wxPen *) NULL; - m_mediumShadowPen = (wxPen *) NULL; - m_darkShadowPen = (wxPen *) NULL; - m_faceBrush = (wxBrush *) NULL; - m_facePen = (wxPen *) NULL; - m_hilightPen = (wxPen *) NULL; - - if ( style & wxSP_3D ) - { - m_borderSize = 2; - m_sashSize = 7; - } - else if ( style & wxSP_BORDER ) - { - m_borderSize = 1; - m_sashSize = 3; - } - else - { - m_borderSize = 0; - m_sashSize = 3; - } - - // Eventually, we'll respond to colour change messages - InitColours(); - - // For debugging purposes, to see the background. -// SetBackground(wxBLUE_BRUSH); -} - -wxSplitterWindow::~wxSplitterWindow(void) -{ - delete m_sashCursorWE; - delete m_sashCursorNS; - delete m_sashTrackerPen; - delete m_lightShadowPen; - delete m_darkShadowPen; - delete m_mediumShadowPen; - delete m_hilightPen; - delete m_facePen; - delete m_faceBrush; -} - -void wxSplitterWindow::OnPaint(wxPaintEvent& WXUNUSED(event)) -{ - wxPaintDC dc(this); - - if ( m_borderSize > 0 ) - DrawBorders(dc); - DrawSash(dc); -} - -void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) -{ - long x, y; - event.Position(&x, &y); - - if (event.LeftDown()) - { - if ( SashHitTest(x, y) ) - { - CaptureMouse(); - - // Required for X to specify that - // that we wish to draw on top of all windows - // - and we optimise by specifying the area - // for creating the overlap window. - wxScreenDC::StartDrawingOnTop(this); - - // We don't say we're dragging yet; we leave that - // decision for the Dragging() branch, to ensure - // the user has dragged a little bit. - m_dragMode = wxSPLIT_DRAG_LEFT_DOWN; - m_firstX = x; - m_firstY = y; - } - } - else if ( event.LeftUp() && m_dragMode == wxSPLIT_DRAG_LEFT_DOWN ) - { - // Wasn't a proper drag - ReleaseMouse(); - wxScreenDC::EndDrawingOnTop(); - m_dragMode = wxSPLIT_DRAG_NONE; - - SetCursor(*wxSTANDARD_CURSOR); - } - else if (event.LeftUp() && m_dragMode == wxSPLIT_DRAG_DRAGGING) - { - // We can stop dragging now and see what we've got. - m_dragMode = wxSPLIT_DRAG_NONE; - ReleaseMouse(); - // Erase old tracker - DrawSashTracker(m_oldX, m_oldY); - - // End drawing on top (frees the window used for drawing - // over the screen) - wxScreenDC::EndDrawingOnTop(); - - int w, h; - GetClientSize(&w, &h); - if ( m_splitMode == wxSPLIT_VERTICAL ) - { - // First check if we should veto this resize because - // the pane size is too small - if ( wxMax(x, 0) < m_minimumPaneSize || wxMax((w - x), 0) < m_minimumPaneSize) - return; - - if ( x <= 4 ) - { - // We remove the first window from the view - wxWindow *removedWindow = m_windowOne; - m_windowOne = m_windowTwo; - m_windowTwo = (wxWindow *) NULL; - - OnUnsplit(removedWindow); - m_sashPosition = 0; - } - else if ( x >= (w - 4) ) - { - // We remove the second window from the view - wxWindow *removedWindow = m_windowTwo; - m_windowTwo = (wxWindow *) NULL; - OnUnsplit(removedWindow); - m_sashPosition = 0; - } - else - { - m_sashPosition = x; - } - } - else - { - // First check if we should veto this resize because - // the pane size is too small - if ( wxMax(y, 0) < m_minimumPaneSize || wxMax((h - y), 0) < m_minimumPaneSize) - return; - - if ( y <= 4 ) - { - // We remove the first window from the view - wxWindow *removedWindow = m_windowOne; - m_windowOne = m_windowTwo; - m_windowTwo = (wxWindow *) NULL; - - OnUnsplit(removedWindow); - m_sashPosition = 0; - } - else if ( y >= (h - 4) ) - { - // We remove the second window from the view - wxWindow *removedWindow = m_windowTwo; - m_windowTwo = (wxWindow *) NULL; - OnUnsplit(removedWindow); - m_sashPosition = 0; - } - else - { - m_sashPosition = y; - } - } - SizeWindows(); - } - else if (event.Moving() && !event.Dragging()) - { - // Just change the cursor if required - if ( SashHitTest(x, y) ) - { - if ( m_splitMode == wxSPLIT_VERTICAL ) - { - SetCursor(*m_sashCursorWE); - } - else - { - SetCursor(*m_sashCursorNS); - } - } - else - { - SetCursor(*wxSTANDARD_CURSOR); - } - } - else if ( (event.Dragging() && (m_dragMode == wxSPLIT_DRAG_DRAGGING)) || - (event.Dragging() && SashHitTest(x, y, 4)) ) - { - if ( m_splitMode == wxSPLIT_VERTICAL ) - { - SetCursor(*m_sashCursorWE); - } - else - { - SetCursor(*m_sashCursorNS); - } - - // Detect that this is really a drag: we've moved more than 1 pixel either way - if ((m_dragMode == wxSPLIT_DRAG_LEFT_DOWN) && -// (abs((int)x - m_firstX) > 1 || abs((int)y - m_firstY) > 1) ) - (abs((int)x - m_firstX) > 0 || abs((int)y - m_firstY) > 1) ) - { - m_dragMode = wxSPLIT_DRAG_DRAGGING; - DrawSashTracker(x, y); - } - else - { - if ( m_dragMode == wxSPLIT_DRAG_DRAGGING ) - { - // Erase old tracker - DrawSashTracker(m_oldX, m_oldY); - - // Draw new one - DrawSashTracker(x, y); - } - } - m_oldX = x; - m_oldY = y; - } - else if ( event.LeftDClick() ) - { - OnDoubleClickSash(x, y); - } - else - { - } -} - -void wxSplitterWindow::OnSize(wxSizeEvent& WXUNUSED(event)) -{ - int cw, ch; - GetClientSize( &cw, &ch ); - if ( m_windowTwo ) - { - if ( m_splitMode == wxSPLIT_VERTICAL ) - { - if ( m_sashPosition >= (cw - 5) ) - m_sashPosition = wxMax(10, cw - 40); - } - if ( m_splitMode == wxSPLIT_HORIZONTAL ) - { - if ( m_sashPosition >= (ch - 5) ) - m_sashPosition = wxMax(10, ch - 40); - } - } - SizeWindows(); -} - -bool wxSplitterWindow::SashHitTest(int x, int y, int tolerance) -{ - if ( m_windowTwo == NULL || m_sashPosition == 0) - return FALSE; // No sash - - if ( m_splitMode == wxSPLIT_VERTICAL ) - { - if ( (x >= m_sashPosition - tolerance) && (x <= m_sashPosition + m_sashSize + tolerance) ) - return TRUE; - else - return FALSE; - } - else - { - if ( (y >= (m_sashPosition- tolerance)) && (y <= (m_sashPosition + m_sashSize + tolerance)) ) - return TRUE; - else - return FALSE; - } - - return FALSE; -} - -// Draw 3D effect borders -void wxSplitterWindow::DrawBorders(wxDC& dc) -{ - int w, h; - GetClientSize(&w, &h); - - if ( GetWindowStyleFlag() & wxSP_3D ) - { - dc.SetPen(*m_mediumShadowPen); - dc.DrawLine(0, 0, w-1, 0); - dc.DrawLine(0, 0, 0, h - 1); - - dc.SetPen(*m_darkShadowPen); - dc.DrawLine(1, 1, w-2, 1); - dc.DrawLine(1, 1, 1, h-2); - - dc.SetPen(*m_hilightPen); - dc.DrawLine(0, h-1, w-1, h-1); - dc.DrawLine(w-1, 0, w-1, h); // Surely the maximum y pos. should be h - 1. - /// Anyway, h is required for MSW. - - dc.SetPen(*m_lightShadowPen); - dc.DrawLine(w-2, 1, w-2, h-2); // Right hand side - dc.DrawLine(1, h-2, w-1, h-2); // Bottom - } - else if ( GetWindowStyleFlag() & wxSP_BORDER ) - { - dc.SetBrush(*wxTRANSPARENT_BRUSH); - dc.SetPen(*wxBLACK_PEN); - dc.DrawRectangle(0, 0, w-1, h-1); - } - - dc.SetPen(wxNullPen); - dc.SetBrush(wxNullBrush); -} - -// Draw the sash -void wxSplitterWindow::DrawSash(wxDC& dc) -{ - if ( m_sashPosition == 0 || !m_windowTwo) - return; - - int w, h; - GetClientSize(&w, &h); - - if ( GetWindowStyleFlag() & wxSP_3D ) - { - if ( m_splitMode == wxSPLIT_VERTICAL ) - { - dc.SetPen(*m_facePen); - dc.SetBrush(*m_faceBrush); - dc.DrawRectangle(m_sashPosition + 2, 0, m_sashSize - 4, h); - - dc.SetBrush(*wxTRANSPARENT_BRUSH); - - dc.SetPen(*m_lightShadowPen); - dc.DrawLine(m_sashPosition, 1, m_sashPosition, h-2); - - dc.SetPen(*m_hilightPen); - dc.DrawLine(m_sashPosition+1, 0, m_sashPosition+1, h); - - dc.SetPen(*m_mediumShadowPen); - dc.DrawLine(m_sashPosition+m_sashSize-2, 1, m_sashPosition+m_sashSize-2, h-1); - - dc.SetPen(*m_darkShadowPen); - dc.DrawLine(m_sashPosition+m_sashSize-1, 2, m_sashPosition+m_sashSize-1, h-2); - } - else - { - dc.SetPen(*m_facePen); - dc.SetBrush(*m_faceBrush); - dc.DrawRectangle(0, m_sashPosition + 2, w, m_sashSize - 4); - - dc.SetBrush(*wxTRANSPARENT_BRUSH); - - dc.SetPen(*m_lightShadowPen); - dc.DrawLine(1, m_sashPosition, w-2, m_sashPosition); - - dc.SetPen(*m_hilightPen); - dc.DrawLine(0, m_sashPosition+1, w, m_sashPosition+1); - - dc.SetPen(*m_mediumShadowPen); - dc.DrawLine(1, m_sashPosition+m_sashSize-2, w-1, m_sashPosition+m_sashSize-2); - - dc.SetPen(*m_darkShadowPen); - dc.DrawLine(2, m_sashPosition+m_sashSize-1, w-2, m_sashPosition+m_sashSize-1); - } - } - else - { - if ( m_splitMode == wxSPLIT_VERTICAL ) - { - dc.SetPen(*wxBLACK_PEN); - dc.SetBrush(*wxBLACK_BRUSH); - int h1 = h-1; - if ( (GetWindowStyleFlag() & wxSP_BORDER) != wxSP_BORDER ) - h1 += 1; // Not sure why this is necessary... - dc.DrawRectangle(m_sashPosition, 0, m_sashSize, h1); - } - else - { - dc.SetPen(*wxBLACK_PEN); - dc.SetBrush(*wxBLACK_BRUSH); - int w1 = w-1; - if ( (GetWindowStyleFlag() & wxSP_BORDER) != wxSP_BORDER ) - w1 ++; - - dc.DrawRectangle(0, m_sashPosition, w1, m_sashSize); - } - - } - - dc.SetPen(wxNullPen); - dc.SetBrush(wxNullBrush); -} - -// Draw the sash tracker (for whilst moving the sash) -void wxSplitterWindow::DrawSashTracker(int x, int y) -{ - int w, h; - GetClientSize(&w, &h); - - wxScreenDC screenDC; - int x1, y1; - int x2, y2; - - if ( m_splitMode == wxSPLIT_VERTICAL ) - { - x1 = x; y1 = 2; - x2 = x; y2 = h-2; - - if ( x1 > w ) - { - x1 = w; x2 = w; - } - else if ( x1 < 0 ) - { - x1 = 0; x2 = 0; - } - } - else - { - x1 = 2; y1 = y; - x2 = w-2; y2 = y; - - if ( y1 > h ) - { - y1 = h; - y2 = h; - } - else if ( y1 < 0 ) - { - y1 = 0; - y2 = 0; - } - } - - ClientToScreen(&x1, &y1); - ClientToScreen(&x2, &y2); - - screenDC.SetLogicalFunction(wxXOR); - screenDC.SetPen(*m_sashTrackerPen); - screenDC.SetBrush(*wxTRANSPARENT_BRUSH); - - screenDC.DrawLine(x1, y1, x2, y2); - - screenDC.SetLogicalFunction(wxCOPY); - - screenDC.SetPen(wxNullPen); - screenDC.SetBrush(wxNullBrush); -} - -// Position and size subwindows. -// Note that the border size applies to each subwindow, not -// including the edges next to the sash. -void wxSplitterWindow::SizeWindows(void) -{ - int w, h; - GetClientSize(&w, &h); - - if ( m_windowOne && !m_windowTwo ) - { - m_windowOne->SetSize(m_borderSize, m_borderSize, w - 2*m_borderSize, h - 2*m_borderSize); - } - else if ( m_windowOne && m_windowTwo ) - { - if (m_splitMode == wxSPLIT_VERTICAL) - { - int x1 = m_borderSize; - int y1 = m_borderSize; - int w1 = m_sashPosition - m_borderSize; - int h1 = h - 2*m_borderSize; - - int x2 = m_sashPosition + m_sashSize; - int y2 = m_borderSize; - int w2 = w - 2*m_borderSize - m_sashSize - w1; - int h2 = h - 2*m_borderSize; - - m_windowOne->SetSize(x1, y1, - w1, h1); - m_windowTwo->SetSize(x2, y2, - w2, h2); - } - else - { - m_windowOne->SetSize(m_borderSize, m_borderSize, - w - 2*m_borderSize, m_sashPosition - m_borderSize); - m_windowTwo->SetSize(m_borderSize, m_sashPosition + m_sashSize, - w - 2*m_borderSize, h - 2*m_borderSize - m_sashSize - (m_sashPosition - m_borderSize)); - } - } - wxClientDC dc(this); - DrawBorders(dc); - DrawSash(dc); -} - -// Set pane for unsplit window -void wxSplitterWindow::Initialize(wxWindow *window) -{ - m_windowOne = window; - m_windowTwo = (wxWindow *) NULL; - m_sashPosition = 0; -} - -// Associates the given window with window 2, drawing the appropriate sash -// and changing the split mode. -// Does nothing and returns FALSE if the window is already split. -bool wxSplitterWindow::SplitVertically(wxWindow *window1, wxWindow *window2, int sashPosition) -{ - if ( IsSplit() ) - return FALSE; - - m_splitMode = wxSPLIT_VERTICAL; - m_windowOne = window1; - m_windowTwo = window2; - if ( sashPosition == -1 ) - m_sashPosition = 100; - else - m_sashPosition = sashPosition; - - SizeWindows(); - - return TRUE; -} - -bool wxSplitterWindow::SplitHorizontally(wxWindow *window1, wxWindow *window2, int sashPosition) -{ - if ( IsSplit() ) - return FALSE; - - m_splitMode = wxSPLIT_HORIZONTAL; - m_windowOne = window1; - m_windowTwo = window2; - if ( sashPosition == -1 ) - m_sashPosition = 100; - else - m_sashPosition = sashPosition; - - SizeWindows(); - - return TRUE; -} - - -// Remove the specified (or second) window from the view -// Doesn't actually delete the window. -bool wxSplitterWindow::Unsplit(wxWindow *toRemove) -{ - if ( ! IsSplit() ) - return FALSE; - - if ( toRemove == NULL || toRemove == m_windowTwo) - { - wxWindow *win = m_windowTwo ; - m_windowTwo = (wxWindow *) NULL; - m_sashPosition = 0; - OnUnsplit(win); - SizeWindows(); - } - else if ( toRemove == m_windowOne ) - { - wxWindow *win = m_windowOne ; - m_windowOne = m_windowTwo; - m_windowTwo = (wxWindow *) NULL; - m_sashPosition = 0; - OnUnsplit(win); - SizeWindows(); - } - else - return FALSE; - - return TRUE; -} - -void wxSplitterWindow::SetSashPosition(int position, bool redraw) -{ - m_sashPosition = position; - - if ( redraw ) - { - SizeWindows(); - } -} - -// Called when the sash is double-clicked. -// The default behaviour is to remove the sash if the -// minimum pane size is zero. -void wxSplitterWindow::OnDoubleClickSash(int WXUNUSED(x), int WXUNUSED(y) ) -{ - if ( GetMinimumPaneSize() == 0 ) - { - Unsplit(); - } -} - -// Initialize colours -void wxSplitterWindow::InitColours(void) -{ - if ( m_facePen ) - delete m_facePen; - if ( m_faceBrush ) - delete m_faceBrush; - if ( m_mediumShadowPen ) - delete m_mediumShadowPen; - if ( m_darkShadowPen ) - delete m_darkShadowPen; - if ( m_lightShadowPen ) - delete m_lightShadowPen; - if ( m_hilightPen ) - delete m_hilightPen; - - // Shadow colours -#if defined(__WIN95__) -// COLORREF ref = ::GetSysColor(COLOR_3DFACE); // Normally light grey - wxColour faceColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); - m_facePen = new wxPen(faceColour, 1, wxSOLID); - m_faceBrush = new wxBrush(faceColour, wxSOLID); - -// ref = ::GetSysColor(COLOR_3DSHADOW); // Normally dark grey - wxColour mediumShadowColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DSHADOW)); - m_mediumShadowPen = new wxPen(mediumShadowColour, 1, wxSOLID); - -// ref = ::GetSysColor(COLOR_3DDKSHADOW); // Normally black - wxColour darkShadowColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DDKSHADOW)); - m_darkShadowPen = new wxPen(darkShadowColour, 1, wxSOLID); - -// ref = ::GetSysColor(COLOR_3DLIGHT); // Normally light grey - wxColour lightShadowColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DLIGHT)); - m_lightShadowPen = new wxPen(lightShadowColour, 1, wxSOLID); - -// ref = ::GetSysColor(COLOR_3DHILIGHT); // Normally white - wxColour hilightColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DHILIGHT)); - m_hilightPen = new wxPen(hilightColour, 1, wxSOLID); -#else - m_facePen = new wxPen("LIGHT GREY", 1, wxSOLID); - m_faceBrush = new wxBrush("LIGHT GREY", wxSOLID); - m_mediumShadowPen = new wxPen("GREY", 1, wxSOLID); - m_darkShadowPen = new wxPen("BLACK", 1, wxSOLID); - m_lightShadowPen = new wxPen("LIGHT GREY", 1, wxSOLID); - m_hilightPen = new wxPen("WHITE", 1, wxSOLID); -#endif -} - diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp deleted file mode 100644 index fee8fe43f8..0000000000 --- a/src/generic/statusbr.cpp +++ /dev/null @@ -1,332 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: statusbr.cpp -// Purpose: wxStatusBar class implementation -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "statusbr.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/setup.h" -#include "wx/frame.h" -#include "wx/settings.h" -#include "wx/dcclient.h" -#endif - -#include "wx/generic/statusbr.h" - -#ifdef __WXMSW__ -#include - -#ifdef DrawText -#undef DrawText -#endif - -#endif - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxStatusBar, wxWindow) - -BEGIN_EVENT_TABLE(wxStatusBar, wxWindow) - EVT_PAINT(wxStatusBar::OnPaint) - EVT_SYS_COLOUR_CHANGED(wxStatusBar::OnSysColourChanged) -END_EVENT_TABLE() -#endif - -// Default status border dimensions -#define wxTHICK_LINE_BORDER 2 -#define wxTHICK_LINE_WIDTH 1 - -wxStatusBar::wxStatusBar(void) -{ - m_statusWidths = (int *) NULL; - m_statusStrings = (wxString *) NULL; - m_nFields = 0; - m_borderX = wxTHICK_LINE_BORDER; - m_borderY = wxTHICK_LINE_BORDER; -} - -wxStatusBar::~wxStatusBar(void) -{ - SetFont(wxNullFont); - - if ( m_statusWidths ) - delete[] m_statusWidths; - if ( m_statusStrings ) - delete[] m_statusStrings; -} - -bool wxStatusBar::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - m_statusWidths = (int *) NULL; - m_statusStrings = (wxString *) NULL; - m_nFields = 0; - m_borderX = wxTHICK_LINE_BORDER; - m_borderY = wxTHICK_LINE_BORDER; - - bool success = wxWindow::Create(parent, id, pos, size, style, name); - - // Don't wish this to be found as a child - parent->GetChildren()->DeleteObject(this); - - InitColours(); - - SetFont(m_defaultStatusBarFont); - - return success; -} - -void wxStatusBar::SetFieldsCount(int number, const int widths[]) -{ - m_nFields = number; - - if ( m_statusWidths ) - delete[] m_statusWidths; - - if ( m_statusStrings ) - delete[] m_statusStrings; - - m_statusStrings = new wxString[number]; - - int i; - for (i = 0; i < number; i++) - m_statusStrings[i] = ""; - - if ( widths ) - SetStatusWidths(number, widths); -} - -void wxStatusBar::SetStatusText(const wxString& text, int number) -{ - if ((number < 0) || (number >= m_nFields)) - return; - - m_statusStrings[number] = text; - - Refresh(); - -#ifdef __WXMSW__ - // For some reason, this can cause major GDI problems - graphics - // all over the place. E.g. in print previewing. -// ::UpdateWindow((HWND) GetHWND()); -#endif -} - -wxString wxStatusBar::GetStatusText(int n) const -{ - if ((n < 0) || (n >= m_nFields)) - return wxString(""); - else - return m_statusStrings[n]; -} - -void wxStatusBar::SetStatusWidths(int n, const int widths_field[]) -{ - // only set status widths, when n == number of statuswindows - if (n == m_nFields) - { - // only set status widths, - // when one window (minimum) is variable (width <= 0) - bool is_variable = FALSE; - int i; - for (i = 0; i < m_nFields; i++) - { - if (widths_field[i] <= 0) is_variable = TRUE; - } - - // if there are old widths, delete them - if (m_statusWidths) - delete [] m_statusWidths; - - // set widths - m_statusWidths = new int[n]; - for (i = 0; i < m_nFields; i++) - { - m_statusWidths[i] = widths_field[i]; - } - } -} - -void wxStatusBar::OnPaint(wxPaintEvent& WXUNUSED(event) ) -{ - wxPaintDC dc(this); - - int i; - if ( GetFont() ) - dc.SetFont(*GetFont()); - dc.SetBackgroundMode(wxTRANSPARENT); - - for ( i = 0; i < m_nFields; i ++ ) - DrawField(dc, i); -} - -void wxStatusBar::DrawFieldText(wxDC& dc, int i) -{ - int leftMargin = 2; - - wxRectangle rect; - GetFieldRect(i, rect); - - wxString text(GetStatusText(i)); - - long x, y; - - dc.GetTextExtent(text, &x, &y); - - int xpos = rect.x + leftMargin; - int ypos = (int) (((rect.height - y) / 2 ) + rect.y + 0.5) ; - - dc.SetClippingRegion(rect.x, rect.y, rect.width, rect.height); - - dc.DrawText(text, xpos, ypos); - - dc.DestroyClippingRegion(); -} - -void wxStatusBar::DrawField(wxDC& dc, int i) -{ - wxRectangle rect; - GetFieldRect(i, rect); - - // Draw border - // Have grey background, plus 3-d border - - // One black rectangle. - // Inside this, left and top sides - dark grey. Bottom and right - - // white. - - dc.SetPen(m_hilightPen); - - // Right and bottom white lines - dc.DrawLine(rect.x + rect.width, rect.y, - rect.x + rect.width, rect.y + rect.height); - dc.DrawLine(rect.x + rect.width, rect.y + rect.height, - rect.x, rect.y + rect.height); - - dc.SetPen(m_mediumShadowPen); - - // Left and top grey lines - dc.DrawLine(rect.x, rect.y + rect.height, - rect.x, rect.y); - dc.DrawLine(rect.x, rect.y, - rect.x + rect.width, rect.y); - - DrawFieldText(dc, i); -} - - // Get the position and size of the field's internal bounding rectangle -bool wxStatusBar::GetFieldRect(int n, wxRectangle& rect) const -{ - if ((n < 0) || (n >= m_nFields)) - return FALSE; - - int width, height; - GetClientSize(&width, &height); - - int i; - int sum_of_nonvar = 0; - int num_of_var = 0; - bool do_same_width = FALSE; - - int fieldWidth = 0; - int fieldPosition = 0; - - if (m_statusWidths) - { - // if sum(not variable Windows) > c_width - (20 points per variable_window) - // then do_same_width = TRUE; - for (i = 0; i < m_nFields; i++) - { - if (m_statusWidths[i] > 0) sum_of_nonvar += m_statusWidths[i]; - else num_of_var++; - } - if (sum_of_nonvar > (width - 20*num_of_var)) do_same_width = TRUE; - } - else do_same_width = TRUE; - if (do_same_width) - { - for (i = 0; i < m_nFields; i++) - { - fieldWidth = (int)(width/m_nFields); - fieldPosition = i*fieldWidth; - if ( i == n ) - break; - } - } - else // no_same_width - { - int *tempwidth = new int[m_nFields]; - int temppos = 0; - for (i = 0; i < m_nFields; i++) - { - if (m_statusWidths[i] > 0) tempwidth[i] = m_statusWidths[i]; - else tempwidth[i] = (width - sum_of_nonvar) / num_of_var; - } - for (i = 0; i < m_nFields; i++) - { - fieldWidth = tempwidth[i]; - fieldPosition = temppos; - - temppos += tempwidth[i]; - - if ( i == n ) - break; - } - delete [] tempwidth; - } - - rect.x = fieldPosition + wxTHICK_LINE_BORDER; - rect.y = wxTHICK_LINE_BORDER; - - rect.width = fieldWidth - 2 * wxTHICK_LINE_BORDER ; - rect.height = height - 2 * wxTHICK_LINE_BORDER ; - - return TRUE; -} - -// Initialize colours -void wxStatusBar::InitColours(void) -{ - // Shadow colours -#if defined(__WIN95__) - wxColour mediumShadowColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DSHADOW)); - m_mediumShadowPen = wxPen(mediumShadowColour, 1, wxSOLID); - - wxColour hilightColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DHILIGHT)); - m_hilightPen = wxPen(hilightColour, 1, wxSOLID); -#else - m_mediumShadowPen = wxPen("GREY", 1, wxSOLID); - m_hilightPen = wxPen("WHITE", 1, wxSOLID); -#endif - - m_defaultStatusBarFont = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT); - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); -} - -// Responds to colour changes, and passes event on to children. -void wxStatusBar::OnSysColourChanged(wxSysColourChangedEvent& event) -{ - InitColours(); - Refresh(); - - // Propagate the event to the non-top-level children - wxWindow::OnSysColourChanged(event); -} - diff --git a/src/generic/tabg.cpp b/src/generic/tabg.cpp deleted file mode 100644 index 433d3c1801..0000000000 --- a/src/generic/tabg.cpp +++ /dev/null @@ -1,1164 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tabg.cpp -// Purpose: Generic tabbed dialogs -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "tabg.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include -#include -#include -#include - -#include "wx/tab.h" - -IMPLEMENT_DYNAMIC_CLASS(wxTabControl, wxObject) - -IMPLEMENT_DYNAMIC_CLASS(wxTabLayer, wxList) - -wxTabControl::wxTabControl(wxTabView *v) -{ - m_view = v; - m_isSelected = FALSE; - m_labelFont = (wxFont *) NULL; - m_offsetX = 0; - m_offsetY = 0; - m_width = 0; - m_height = 0; - m_id = 0; - m_rowPosition = 0; - m_colPosition = 0; -} - -wxTabControl::~wxTabControl(void) -{ -} - -void wxTabControl::OnDraw(wxDC& dc, bool lastInRow) -{ - // Old, but in some ways better (drawing opaque tabs) -#if 0 - if (!m_view) - return; - - // Top-left of tab view area - int viewX = m_view->GetViewRect().x; - int viewY = m_view->GetViewRect().y; - - // Top-left of tab control - int tabX = GetX() + viewX; - int tabY = GetY() + viewY; - int tabHeightInc = 0; - if (m_isSelected) - { - tabHeightInc = (view->GetTabSelectionHeight() - view->GetTabHeight()); - tabY -= tabHeightInc; - } - - dc.SetPen(wxTRANSPARENT_PEN); - - // Draw grey background - if (view->GetTabStyle() & wxTAB_STYLE_COLOUR_INTERIOR) - { - dc.SetBrush(m_view->GetBackgroundBrush()); - - // Add 1 because the pen is transparent. Under Motif, may be different. - dc.DrawRectangle(tabX, tabY, (GetWidth()+1), (GetHeight() + 1 + tabHeightInc)); - } - - // Draw highlight and shadow - dc.SetPen(m_view->GetHighlightPen()); - - // Calculate the top of the tab beneath. It's the height of the tab, MINUS - // a bit if the tab below happens to be selected. Check. - wxTabControl *tabBeneath = NULL; - int subtractThis = 0; - if (GetColPosition() > 0) - tabBeneath = m_view->FindTabControlForPosition(GetColPosition() - 1, GetRowPosition()); - if (tabBeneath && tabBeneath->IsSelected()) - subtractThis = (m_view->GetTabSelectionHeight() - m_view->GetTabHeight()); - - // Vertical highlight: if first tab, draw to bottom of view - if (tabX == m_view->GetViewRect().x && (m_view->GetTabStyle() & wxTAB_STYLE_DRAW_BOX)) - dc.DrawLine(tabX, tabY, tabX, (m_view->GetViewRect().y + m_view->GetViewRect().height)); - else if (tabX == m_view->GetViewRect().x) - // Not box drawing, just to top of view. - dc.DrawLine(tabX, tabY, tabX, (m_view->GetViewRect().y)); - else - dc.DrawLine(tabX, tabY, tabX, (tabY + GetHeight() + tabHeightInc - subtractThis)); - - dc.DrawLine(tabX, tabY, (tabX + GetWidth()), tabY); - dc.SetPen(m_view->GetShadowPen()); - - // Test if we're outside the right-hand edge of the view area - if (((tabX + GetWidth()) >= m_view->GetViewRect().x + m_view->GetViewRect().width) && (m_view->GetTabStyle() & wxTAB_STYLE_DRAW_BOX)) - { - int bottomY = m_view->GetViewRect().y + m_view->GetViewRect().height + GetY() + m_view->GetTabHeight() + m_view->GetTopMargin(); - // Add a tab height since we wish to draw to the bottom of the view. - dc.DrawLine((tabX + GetWidth()), tabY, - (tabX + GetWidth()), bottomY); - - // Calculate the far-right of the view, since we don't wish to - // draw inside that - int rightOfView = m_view->GetViewRect().x + m_view->GetViewRect().width + 1; - - // Draw the horizontal bit to connect to the view rectangle - dc.DrawLine((wxMax((tabX + GetWidth() - m_view->GetHorizontalTabOffset()), rightOfView)), (bottomY-1), - (tabX + GetWidth()), (bottomY-1)); - - // Draw black line to emphasize shadow - dc.SetPen(wxBLACK_PEN); - dc.DrawLine((tabX + GetWidth() + 1), (tabY+1), - (tabX + GetWidth() + 1), bottomY); - - // Draw the horizontal bit to connect to the view rectangle - dc.DrawLine((wxMax((tabX + GetWidth() - m_view->GetHorizontalTabOffset()), rightOfView)), (bottomY), - (tabX + GetWidth() + 1), (bottomY)); - } - else - { - if (lastInRow) - { - // 25/5/97 UNLESS it's less than the max number of positions in this row - - int topY = m_view->GetViewRect().y - m_view->GetTopMargin(); - - int maxPositions = ((wxTabLayer *)m_view->GetLayers().Nth(0)->Data())->Number(); - - // Only down to the bottom of the tab, not to the top of the view - if ( GetColPosition() < maxPositions ) - topY = tabY + GetHeight() + tabHeightInc; - - // Shadow - dc.DrawLine((tabX + GetWidth()), tabY, (tabX + GetWidth()), topY); - // Draw black line to emphasize shadow - dc.SetPen(wxBLACK_PEN); - dc.DrawLine((tabX + GetWidth() + 1), (tabY+1), (tabX + GetWidth() + 1), - topY); - } - else - { - // Calculate the top of the tab beneath. It's the height of the tab, MINUS - // a bit if the tab below (and next col along) happens to be selected. Check. - wxTabControl *tabBeneath = NULL; - int subtractThis = 0; - if (GetColPosition() > 0) - tabBeneath = m_view->FindTabControlForPosition(GetColPosition() - 1, GetRowPosition() + 1); - if (tabBeneath && tabBeneath->IsSelected()) - subtractThis = (m_view->GetTabSelectionHeight() - m_view->GetTabHeight()); - - // Draw only to next tab down. - dc.DrawLine((tabX + GetWidth()), tabY, - (tabX + GetWidth()), (tabY + GetHeight() + tabHeightInc - subtractThis)); - - // Draw black line to emphasize shadow - dc.SetPen(wxBLACK_PEN); - dc.DrawLine((tabX + GetWidth() + 1), (tabY+1), (tabX + GetWidth() + 1), - (tabY + GetHeight() + tabHeightInc - subtractThis)); - } - } - - // Draw centered text - int textY = tabY + m_view->GetVerticalTabTextSpacing() + tabHeightInc; - - if (m_isSelected) - dc.SetFont(m_view->GetSelectedTabFont()); - else - dc.SetFont(GetFont()); - - wxColour col(m_view->GetTextColour()); - dc.SetTextForeground(&col); -// dc.SetTextForeground(&(m_view->GetTextColour())); - dc.SetBackgroundMode(wxTRANSPARENT); - float textWidth, textHeight; - dc.GetTextExtent(GetLabel(), &textWidth, &textHeight); - - int textX = (int)(tabX + (GetWidth() - textWidth)/2.0); - dc.DrawText(GetLabel(), textX, textY); - - if (m_isSelected) - { - dc.SetPen(m_view->GetHighlightPen()); - - // Draw white highlight from the tab's left side to the left hand edge of the view - dc.DrawLine(m_view->GetViewRect().x, (tabY + GetHeight() + tabHeightInc), - tabX, (tabY + GetHeight() + tabHeightInc)); - - // Draw white highlight from the tab's right side to the right hand edge of the view - dc.DrawLine((tabX + GetWidth()), (tabY + GetHeight() + tabHeightInc), - m_view->GetViewRect().x + m_view->GetViewRect().width, (tabY + GetHeight() + tabHeightInc)); - } -#endif - -// New HEL version with rounder tabs -#if 1 - if (!m_view) return; - - int tabInc = 0; - if (m_isSelected) - { - tabInc = m_view->GetTabSelectionHeight() - m_view->GetTabHeight(); - } - int tabLeft = GetX() + m_view->GetViewRect().x; - int tabTop = GetY() + m_view->GetViewRect().y - tabInc; - int tabRight = tabLeft + m_view->GetTabWidth(); - int left = m_view->GetViewRect().x; - int top = tabTop + m_view->GetTabHeight() + tabInc; - int right = left + m_view->GetViewRect().width; - int bottom = top + m_view->GetViewRect().height; - - if (m_isSelected) - { - // TAB is selected - draw TAB and the View's full outline - - dc.SetPen(*(m_view->GetHighlightPen())); - wxPoint pnts[10]; - int n = 0; - pnts[n].x = left; pnts[n++].y = bottom; - pnts[n].x = left; pnts[n++].y = top; - pnts[n].x = tabLeft; pnts[n++].y = top; - pnts[n].x = tabLeft; pnts[n++].y = tabTop + 2; - pnts[n].x = tabLeft + 2; pnts[n++].y = tabTop; - pnts[n].x = tabRight - 1; pnts[n++].y = tabTop; - dc.DrawLines(n, pnts); - if (!lastInRow) - { - dc.DrawLine( - (tabRight + 2), - top, - right, - top - ); - } - - dc.SetPen(*(m_view->GetShadowPen())); - dc.DrawLine( - tabRight, - tabTop + 2, - tabRight, - top - ); - dc.DrawLine( - right, - top, - right, - bottom - ); - dc.DrawLine( - right, - bottom, - left, - bottom - ); - - dc.SetPen(*wxBLACK_PEN); - dc.DrawPoint( - tabRight, - tabTop + 1 - ); - dc.DrawPoint( - tabRight + 1, - tabTop + 2 - ); - if (lastInRow) - { - dc.DrawLine( - tabRight + 1, - bottom, - tabRight + 1, - tabTop + 1 - ); - } - else - { - dc.DrawLine( - tabRight + 1, - tabTop + 2, - tabRight + 1, - top - ); - dc.DrawLine( - right + 1, - top, - right + 1, - bottom + 1 - ); - } - dc.DrawLine( - right + 1, - bottom + 1, - left + 1, - bottom + 1 - ); - } - else - { - // TAB is not selected - just draw TAB outline and RH edge - // if the TAB is the last in the row - - int maxPositions = ((wxTabLayer*)m_view->GetLayers().Nth(0)->Data())->Number(); - wxTabControl* tabBelow = 0; - wxTabControl* tabBelowRight = 0; - if (GetColPosition() > 0) - { - tabBelow = m_view->FindTabControlForPosition( - GetColPosition() - 1, - GetRowPosition() - ); - } - if (!lastInRow && GetColPosition() > 0) - { - tabBelowRight = m_view->FindTabControlForPosition( - GetColPosition() - 1, - GetRowPosition() + 1 - ); - } - - float raisedTop = top - m_view->GetTabSelectionHeight() + - m_view->GetTabHeight(); - - dc.SetPen(*(m_view->GetHighlightPen())); - wxPoint pnts[10]; - int n = 0; - - pnts[n].x = tabLeft; - - if (tabBelow && tabBelow->IsSelected()) - { - pnts[n++].y = (long)raisedTop; - } - else - { - pnts[n++].y = top; - } - pnts[n].x = tabLeft; pnts[n++].y = tabTop + 2; - pnts[n].x = tabLeft + 2; pnts[n++].y = tabTop; - pnts[n].x = tabRight - 1; pnts[n++].y = tabTop; - dc.DrawLines(n, pnts); - - dc.SetPen(*(m_view->GetShadowPen())); - if (GetRowPosition() >= maxPositions - 1) - { - dc.DrawLine( - tabRight, - (tabTop + 2), - tabRight, - bottom - ); - dc.DrawLine( - tabRight, - bottom, - (tabRight - m_view->GetHorizontalTabOffset()), - bottom - ); - } - else - { - if (tabBelowRight && tabBelowRight->IsSelected()) - { - dc.DrawLine( - tabRight, - (long)raisedTop, - tabRight, - tabTop + 1 - ); - } - else - { - dc.DrawLine( - tabRight, - top - 1, - tabRight, - tabTop + 1 - ); - } - } - - dc.SetPen(*wxBLACK_PEN); - dc.DrawPoint( - tabRight, - tabTop + 1 - ); - dc.DrawPoint( - tabRight + 1, - tabTop + 2 - ); - if (GetRowPosition() >= maxPositions - 1) - { - // draw right hand edge to bottom of view - dc.DrawLine( - tabRight + 1, - bottom + 1, - tabRight + 1, - tabTop + 2 - ); - dc.DrawLine( - tabRight + 1, - bottom + 1, - (tabRight - m_view->GetHorizontalTabOffset()), - bottom + 1 - ); - } - else - { - // draw right hand edge of TAB - if (tabBelowRight && tabBelowRight->IsSelected()) - { - dc.DrawLine( - tabRight + 1, - (long)(raisedTop - 1), - tabRight + 1, - tabTop + 2 - ); - } - else - { - dc.DrawLine( - tabRight + 1, - top - 1, - tabRight + 1, - tabTop + 2 - ); - } - } - } - - // Draw centered text - dc.SetPen(*wxBLACK_PEN); - if (m_isSelected) - { - dc.SetFont(*(m_view->GetSelectedTabFont())); - } - else - { - dc.SetFont(*(GetFont())); - } - - wxColour col(m_view->GetTextColour()); - dc.SetTextForeground(col); - dc.SetBackgroundMode(wxTRANSPARENT); - long textWidth, textHeight; - dc.GetTextExtent(GetLabel(), &textWidth, &textHeight); - - float textX = (tabLeft + tabRight - textWidth) / 2; - float textY = (tabInc + tabTop + m_view->GetVerticalTabTextSpacing()); - - dc.DrawText(GetLabel(), (long)textX, (long)textY); -#endif -} - -bool wxTabControl::HitTest(int x, int y) const -{ - // Top-left of tab control - int tabX1 = GetX() + m_view->GetViewRect().x; - int tabY1 = GetY() + m_view->GetViewRect().y; - - // Bottom-right - int tabX2 = tabX1 + GetWidth(); - int tabY2 = tabY1 + GetHeight(); - - if (x >= tabX1 && y >= tabY1 && x <= tabX2 && y <= tabY2) - return TRUE; - else - return FALSE; -} - -IMPLEMENT_DYNAMIC_CLASS(wxTabView, wxObject) - -wxTabView::wxTabView(long style) -{ - m_noTabs = 0; - m_tabStyle = style; - m_tabSelection = -1; - m_tabHeight = 20; - m_tabSelectionHeight = m_tabHeight + 2; - m_tabWidth = 80; - m_tabHorizontalOffset = 10; - m_tabHorizontalSpacing = 2; - m_tabVerticalTextSpacing = 3; - m_topMargin = 5; - m_tabViewRect.x = 20; - m_tabViewRect.y = 20; - m_tabViewRect.width = 300; - m_tabViewRect.x = 300; - m_highlightColour = *wxWHITE; - m_shadowColour = wxColour(128, 128, 128); - m_backgroundColour = *wxLIGHT_GREY; - m_textColour = *wxBLACK; - m_highlightPen = wxWHITE_PEN; - m_shadowPen = wxGREY_PEN; - m_backgroundPen = wxLIGHT_GREY_PEN; - m_backgroundBrush = wxLIGHT_GREY_BRUSH; - m_tabFont = wxTheFontList->FindOrCreateFont(9, wxSWISS, wxNORMAL, wxNORMAL); - m_tabSelectedFont = wxTheFontList->FindOrCreateFont(9, wxSWISS, wxNORMAL, wxBOLD); - m_window = (wxWindow *) NULL; -} - -wxTabView::~wxTabView() -{ -} - -// Automatically positions tabs -wxTabControl *wxTabView::AddTab(int id, const wxString& label, wxTabControl *existingTab) -{ - // First, find which layer we should be adding to. - wxNode *node = m_layers.Last(); - if (!node) - { - wxTabLayer *newLayer = new wxTabLayer; - node = m_layers.Append(newLayer); - } - // Check if adding another tab control would go off the - // right-hand edge of the layer. - wxTabLayer *tabLayer = (wxTabLayer *)node->Data(); - wxNode *lastTabNode = tabLayer->Last(); - if (lastTabNode) - { - wxTabControl *lastTab = (wxTabControl *)lastTabNode->Data(); - // Start another layer (row). - // Tricky choice: can't just check if will be overlapping the edge, because - // this happens anyway for 2nd and subsequent rows. - // Should check this for 1st row, and then subsequent rows should not exceed 1st - // in length. - if (((tabLayer == m_layers.First()->Data()) && ((lastTab->GetX() + 2*lastTab->GetWidth() + GetHorizontalTabSpacing()) - > GetViewRect().width)) || - ((tabLayer != m_layers.First()->Data()) && (tabLayer->Number() == ((wxTabLayer *)m_layers.First()->Data())->Number()))) - { - tabLayer = new wxTabLayer; - m_layers.Append(tabLayer); - lastTabNode = (wxNode *) NULL; - } - } - int layer = m_layers.Number() - 1; - - wxTabControl *tabControl = existingTab; - if (!existingTab) - tabControl = OnCreateTabControl(); - tabControl->SetRowPosition(tabLayer->Number()); - tabControl->SetColPosition(layer); - - wxTabControl *lastTab = (wxTabControl *) NULL; - if (lastTabNode) - lastTab = (wxTabControl *)lastTabNode->Data(); - - // Top of new tab - int verticalOffset = (- GetTopMargin()) - ((layer+1)*GetTabHeight()); - // Offset from view top-left - int horizontalOffset = 0; - if (!lastTab) - horizontalOffset = layer*GetHorizontalTabOffset(); - else - horizontalOffset = lastTab->GetX() + GetTabWidth() + GetHorizontalTabSpacing(); - - tabControl->SetPosition(horizontalOffset, verticalOffset); - tabControl->SetSize(GetTabWidth(), GetTabHeight()); - tabControl->SetId(id); - tabControl->SetLabel(label); - tabControl->SetFont(GetTabFont()); - - tabLayer->Append(tabControl); - m_noTabs ++; - - return tabControl; -} - -void wxTabView::ClearTabs(bool deleteTabs) -{ - wxNode *layerNode = m_layers.First(); - while (layerNode) - { - wxTabLayer *layer = (wxTabLayer *)layerNode->Data(); - wxNode *tabNode = layer->First(); - while (tabNode) - { - wxTabControl *tab = (wxTabControl *)tabNode->Data(); - if (deleteTabs) - delete tab; - wxNode *next = tabNode->Next(); - delete tabNode; - tabNode = next; - } - wxNode *nextLayerNode = layerNode->Next(); - delete layer; - delete layerNode; - layerNode = nextLayerNode; - } -} - -// Layout tabs (optional, e.g. if resizing window) -void wxTabView::Layout(void) -{ - // Make a list of the tab controls, deleting the wxTabLayers. - wxList controls; - - wxNode *layerNode = m_layers.First(); - while (layerNode) - { - wxTabLayer *layer = (wxTabLayer *)layerNode->Data(); - wxNode *tabNode = layer->First(); - while (tabNode) - { - wxTabControl *tab = (wxTabControl *)tabNode->Data(); - controls.Append(tab); - wxNode *next = tabNode->Next(); - delete tabNode; - tabNode = next; - } - wxNode *nextLayerNode = layerNode->Next(); - delete layer; - delete layerNode; - layerNode = nextLayerNode; - } - - wxTabControl *lastTab = (wxTabControl *) NULL; - - wxTabLayer *currentLayer = new wxTabLayer; - m_layers.Append(currentLayer); - - wxNode *node = controls.First(); - while (node) - { - wxTabControl *tabControl = (wxTabControl *)node->Data(); - if (lastTab) - { - // Start another layer (row). - // Tricky choice: can't just check if will be overlapping the edge, because - // this happens anyway for 2nd and subsequent rows. - // Should check this for 1st row, and then subsequent rows should not exceed 1st - // in length. - if (((currentLayer == m_layers.First()->Data()) && ((lastTab->GetX() + 2*lastTab->GetWidth() + GetHorizontalTabSpacing()) - > GetViewRect().width)) || - ((currentLayer != m_layers.First()->Data()) && (currentLayer->Number() == ((wxTabLayer *)m_layers.First()->Data())->Number()))) - { - currentLayer = new wxTabLayer; - m_layers.Append(currentLayer); - lastTab = (wxTabControl *) NULL; - } - } - - int layer = m_layers.Number() - 1; - - tabControl->SetRowPosition(currentLayer->Number()); - tabControl->SetColPosition(layer); - - // Top of new tab - int verticalOffset = (- GetTopMargin()) - ((layer+1)*GetTabHeight()); - // Offset from view top-left - int horizontalOffset = 0; - if (!lastTab) - horizontalOffset = layer*GetHorizontalTabOffset(); - else - horizontalOffset = lastTab->GetX() + GetTabWidth() + GetHorizontalTabSpacing(); - - tabControl->SetPosition(horizontalOffset, verticalOffset); - tabControl->SetSize(GetTabWidth(), GetTabHeight()); - - currentLayer->Append(tabControl); - lastTab = tabControl; - - node = node->Next(); - } - - // Move the selected tab to the bottom - wxTabControl *control = FindTabControlForId(m_tabSelection); - if (control) - MoveSelectionTab(control); - -} - -// Draw all tabs -void wxTabView::Draw(wxDC& dc) -{ - // Draw top margin area (beneath tabs and above view area) - if (GetTabStyle() & wxTAB_STYLE_COLOUR_INTERIOR) - { - dc.SetPen(*wxTRANSPARENT_PEN); - dc.SetBrush(*GetBackgroundBrush()); - - // Add 1 because the pen is transparent. Under Motif, may be different. - dc.DrawRectangle( - m_tabViewRect.x, - (m_tabViewRect.y - m_topMargin), - (m_tabViewRect.width + 1), - (m_topMargin + 1) - ); - } - - // Draw layers in reverse order - wxNode *node = m_layers.Last(); - while (node) - { - wxTabLayer *layer = (wxTabLayer *)node->Data(); - wxNode *node2 = layer->First(); - while (node2) - { - wxTabControl *control = (wxTabControl *)node2->Data(); - control->OnDraw(dc, (node2->Next() == NULL)); - node2 = node2->Next(); - } - - node = node->Previous(); - } - - -#if 0 - if (GetTabStyle() & wxTAB_STYLE_DRAW_BOX) - { - dc.SetPen(GetShadowPen()); - - // Draw bottom line - dc.DrawLine( - (GetViewRect().x + 1), - (GetViewRect().y + GetViewRect().height), - (GetViewRect().x + GetViewRect().width), - (GetViewRect().y + GetViewRect().height) - ); - - // Draw right line - dc.DrawLine( - (GetViewRect().x + GetViewRect().width), - (GetViewRect().y - GetTopMargin() + 1), - (GetViewRect().x + GetViewRect().width), - (GetViewRect().y + GetViewRect().height) - ); - - dc.SetPen(wxBLACK_PEN); - - // Draw bottom line - dc.DrawLine( - (GetViewRect().x), - (GetViewRect().y + GetViewRect().height + 1), - (GetViewRect().x + GetViewRect().width), - (GetViewRect().y + GetViewRect().height + 1) - ); - - // Draw right line - dc.DrawLine( - (GetViewRect().x + GetViewRect().width + 1), - (GetViewRect().y - GetTopMargin()), - (GetViewRect().x + GetViewRect().width + 1), - (GetViewRect().y + GetViewRect().height + 1) - ); - } -#endif -} - -// Process mouse event, return FALSE if we didn't process it -bool wxTabView::OnEvent(wxMouseEvent& event) -{ - if (!event.LeftDown()) - return FALSE; - - float x, y; - event.Position(&x, &y); - - wxTabControl *hitControl = (wxTabControl *) NULL; - - wxNode *node = m_layers.First(); - while (node) - { - wxTabLayer *layer = (wxTabLayer *)node->Data(); - wxNode *node2 = layer->First(); - while (node2) - { - wxTabControl *control = (wxTabControl *)node2->Data(); - if (control->HitTest((int)x, (int)y)) - { - hitControl = control; - node = (wxNode *) NULL; - node2 = (wxNode *) NULL; - } - else - node2 = node2->Next(); - } - - if (node) - node = node->Next(); - } - - if (!hitControl) - return FALSE; - - wxTabControl *currentTab = FindTabControlForId(m_tabSelection); - - if (hitControl == currentTab) - return FALSE; - - ChangeTab(hitControl); - - return TRUE; -} - -bool wxTabView::ChangeTab(wxTabControl *control) -{ - wxTabControl *currentTab = FindTabControlForId(m_tabSelection); - int oldTab = -1; - if (currentTab) - oldTab = currentTab->GetId(); - - if (control == currentTab) - return TRUE; - - if (m_layers.Number() == 0) - return FALSE; - - if (!OnTabPreActivate(control->GetId(), oldTab)) - return FALSE; - - // Move the tab to the bottom - MoveSelectionTab(control); - - if (currentTab) - currentTab->SetSelected(FALSE); - - control->SetSelected(TRUE); - m_tabSelection = control->GetId(); - - OnTabActivate(control->GetId(), oldTab); - - // Leave window refresh for the implementing window - - return TRUE; -} - -// Move the selected tab to the bottom layer, if necessary, -// without calling app activation code -bool wxTabView::MoveSelectionTab(wxTabControl *control) -{ - if (m_layers.Number() == 0) - return FALSE; - - wxTabLayer *firstLayer = (wxTabLayer *)m_layers.First()->Data(); - - // Find what column this tab is at, so we can swap with the one at the bottom. - // If we're on the bottom layer, then no need to swap. - if (!firstLayer->Member(control)) - { - // Do a swap - int col = 0; - wxNode *thisNode = FindTabNodeAndColumn(control, &col); - if (!thisNode) - return FALSE; - wxNode *otherNode = firstLayer->Nth(col); - if (!otherNode) - return FALSE; - - // If this is already in the bottom layer, return now - if (otherNode == thisNode) - return TRUE; - - wxTabControl *otherTab = (wxTabControl *)otherNode->Data(); - - // We now have pointers to the tab to be changed to, - // and the tab on the first layer. Swap tab structures and - // position details. - - int thisX = control->GetX(); - int thisY = control->GetY(); - int thisColPos = control->GetColPosition(); - int otherX = otherTab->GetX(); - int otherY = otherTab->GetY(); - int otherColPos = otherTab->GetColPosition(); - - control->SetPosition(otherX, otherY); - control->SetColPosition(otherColPos); - otherTab->SetPosition(thisX, thisY); - otherTab->SetColPosition(thisColPos); - - // Swap the data for the nodes - thisNode->SetData(otherTab); - otherNode->SetData(control); - } - return TRUE; -} - -// Called when a tab is activated -void wxTabView::OnTabActivate(int /*activateId*/, int /*deactivateId*/) -{ -} - -void wxTabView::SetHighlightColour(const wxColour& col) -{ - m_highlightColour = col; - m_highlightPen = wxThePenList->FindOrCreatePen(col, 1, wxSOLID); -} - -void wxTabView::SetShadowColour(const wxColour& col) -{ - m_shadowColour = col; - m_shadowPen = wxThePenList->FindOrCreatePen(col, 1, wxSOLID); -} - -void wxTabView::SetBackgroundColour(const wxColour& col) -{ - m_backgroundColour = col; - m_backgroundPen = wxThePenList->FindOrCreatePen(col, 1, wxSOLID); - m_backgroundBrush = wxTheBrushList->FindOrCreateBrush(col, wxSOLID); -} - -void wxTabView::SetTabSelection(int sel, bool activateTool) -{ - int oldSel = m_tabSelection; - wxTabControl *control = FindTabControlForId(sel); - - if (!OnTabPreActivate(sel, oldSel)) - return; - - if (control) - control->SetSelected((sel != 0)); // TODO ?? - else - { - wxMessageBox(_("Could not find tab for id"), _("Error"), wxOK); - return; - } - - m_tabSelection = sel; - MoveSelectionTab(control); - - if (activateTool) - OnTabActivate(sel, oldSel); -} - -// Find tab control for id -wxTabControl *wxTabView::FindTabControlForId(int id) const -{ - wxNode *node1 = m_layers.First(); - while (node1) - { - wxTabLayer *layer = (wxTabLayer *)node1->Data(); - wxNode *node2 = layer->First(); - while (node2) - { - wxTabControl *control = (wxTabControl *)node2->Data(); - if (control->GetId() == id) - return control; - node2 = node2->Next(); - } - node1 = node1->Next(); - } - return (wxTabControl *) NULL; -} - -// Find tab control for layer, position (starting from zero) -wxTabControl *wxTabView::FindTabControlForPosition(int layer, int position) const -{ - wxNode *node1 = m_layers.Nth(layer); - if (!node1) - return (wxTabControl *) NULL; - wxTabLayer *tabLayer = (wxTabLayer *)node1->Data(); - wxNode *node2 = tabLayer->Nth(position); - if (!node2) - return (wxTabControl *) NULL; - return (wxTabControl *)node2->Data(); -} - -// Find the node and the column at which this control is positioned. -wxNode *wxTabView::FindTabNodeAndColumn(wxTabControl *control, int *col) const -{ - wxNode *node1 = m_layers.First(); - while (node1) - { - wxTabLayer *layer = (wxTabLayer *)node1->Data(); - int c = 0; - wxNode *node2 = layer->First(); - while (node2) - { - wxTabControl *cnt = (wxTabControl *)node2->Data(); - if (cnt == control) - { - *col = c; - return node2; - } - node2 = node2->Next(); - c ++; - } - node1 = node1->Next(); - } - return (wxNode *) NULL; -} - -int wxTabView::CalculateTabWidth(int noTabs, bool adjustView) -{ - m_tabWidth = (int)((m_tabViewRect.width - ((noTabs - 1)*GetHorizontalTabSpacing()))/noTabs); - if (adjustView) - { - m_tabViewRect.width = noTabs*m_tabWidth + ((noTabs-1)*GetHorizontalTabSpacing()); - } - return m_tabWidth; -} - -/* - * wxTabbedDialog - */ - -IMPLEMENT_CLASS(wxTabbedDialog, wxDialog) - -BEGIN_EVENT_TABLE(wxTabbedDialog, wxDialog) - EVT_CLOSE(wxTabbedDialog::OnCloseWindow) - EVT_MOUSE_EVENTS(wxTabbedDialog::OnMouseEvent) - EVT_PAINT(wxTabbedDialog::OnPaint) -END_EVENT_TABLE() - -wxTabbedDialog::wxTabbedDialog(wxWindow *parent, wxWindowID id, - const wxString& title, - const wxPoint& pos, const wxSize& size, - long windowStyle, const wxString& name): - wxDialog(parent, id, title, pos, size, windowStyle, name) -{ - m_tabView = (wxTabView *) NULL; -} - -wxTabbedDialog::~wxTabbedDialog(void) -{ - if (m_tabView) - delete m_tabView; -} - -void wxTabbedDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event) ) -{ - Destroy(); -} - -void wxTabbedDialog::OnMouseEvent(wxMouseEvent& event ) -{ - if (m_tabView) - m_tabView->OnEvent(event); -} - -void wxTabbedDialog::OnPaint(wxPaintEvent& WXUNUSED(event) ) -{ - wxPaintDC dc(this); - if (m_tabView) - m_tabView->Draw(dc); -} - -/* - * wxTabbedPanel - */ - -IMPLEMENT_CLASS(wxTabbedPanel, wxPanel) - -BEGIN_EVENT_TABLE(wxTabbedPanel, wxPanel) - EVT_MOUSE_EVENTS(wxTabbedPanel::OnMouseEvent) - EVT_PAINT(wxTabbedPanel::OnPaint) -END_EVENT_TABLE() - -wxTabbedPanel::wxTabbedPanel(wxWindow *parent, wxWindowID id, const wxPoint& pos, - const wxSize& size, long windowStyle, const wxString& name): - wxPanel(parent, id, pos, size, windowStyle, name) -{ - m_tabView = (wxTabView *) NULL; -} - -wxTabbedPanel::~wxTabbedPanel(void) -{ - delete m_tabView; -} - -void wxTabbedPanel::OnMouseEvent(wxMouseEvent& event) -{ - if (m_tabView) - m_tabView->OnEvent(event); -} - -void wxTabbedPanel::OnPaint(wxPaintEvent& WXUNUSED(event) ) -{ - wxPaintDC dc(this); - if (m_tabView) - m_tabView->Draw(dc); -} - -/* - * wxDialogTabView - */ - -IMPLEMENT_CLASS(wxPanelTabView, wxTabView) - -wxPanelTabView::wxPanelTabView(wxPanel *pan, long style): wxTabView(style), m_tabWindows(wxKEY_INTEGER) -{ - m_panel = pan; - m_currentWindow = (wxWindow *) NULL; - - if (m_panel->IsKindOf(CLASSINFO(wxTabbedDialog))) - ((wxTabbedDialog *)m_panel)->SetTabView(this); - else if (m_panel->IsKindOf(CLASSINFO(wxTabbedPanel))) - ((wxTabbedPanel *)m_panel)->SetTabView(this); - - SetWindow(m_panel); -} - -wxPanelTabView::~wxPanelTabView(void) -{ - ClearWindows(TRUE); -} - -// Called when a tab is activated -void wxPanelTabView::OnTabActivate(int activateId, int deactivateId) -{ - if (!m_panel) - return; - - wxWindow *oldWindow = ((deactivateId == -1) ? 0 : GetTabWindow(deactivateId)); - wxWindow *newWindow = GetTabWindow(activateId); - - if (oldWindow) - oldWindow->Show(FALSE); - if (newWindow) - newWindow->Show(TRUE); - - m_panel->Refresh(); -} - - -void wxPanelTabView::AddTabWindow(int id, wxWindow *window) -{ - m_tabWindows.Append((long)id, window); - window->Show(FALSE); -} - -wxWindow *wxPanelTabView::GetTabWindow(int id) const -{ - wxNode *node = m_tabWindows.Find((long)id); - if (!node) - return (wxWindow *) NULL; - return (wxWindow *)node->Data(); -} - -void wxPanelTabView::ClearWindows(bool deleteWindows) -{ - if (deleteWindows) - m_tabWindows.DeleteContents(TRUE); - m_tabWindows.Clear(); - m_tabWindows.DeleteContents(FALSE); -} - -void wxPanelTabView::ShowWindowForTab(int id) -{ - wxWindow *newWindow = GetTabWindow(id); - if (newWindow == m_currentWindow) - return; - if (m_currentWindow) - m_currentWindow->Show(FALSE); - newWindow->Show(TRUE); - newWindow->Refresh(); -} - diff --git a/src/generic/textdlgg.cpp b/src/generic/textdlgg.cpp deleted file mode 100644 index 345d05740e..0000000000 --- a/src/generic/textdlgg.cpp +++ /dev/null @@ -1,140 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: textdlgg.cpp -// Purpose: wxTextEntryDialog -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "textdlgg.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/utils.h" -#include "wx/dialog.h" -#include "wx/listbox.h" -#include "wx/button.h" -#include "wx/stattext.h" -#include "wx/textctrl.h" -#include "wx/layout.h" -#include "wx/intl.h" -#endif - -#include "wx/generic/textdlgg.h" - -// wxTextEntryDialog - -#if !USE_SHARED_LIBRARY -BEGIN_EVENT_TABLE(wxTextEntryDialog, wxDialog) - EVT_BUTTON(wxID_OK, wxTextEntryDialog::OnOK) -END_EVENT_TABLE() - -IMPLEMENT_CLASS(wxTextEntryDialog, wxDialog) -#endif - -extern void wxSplitMessage2(const char *message, wxList *messageList, wxWindow *parent, wxRowColSizer *sizer); - -wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent, const wxString& message, const wxString& caption, - const wxString& value, long style, const wxPoint& pos): - wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL) -{ - m_dialogStyle = style; - m_value = value; - - wxBeginBusyCursor(); - - wxSizer *topSizer = new wxSizer(this, wxSizerShrink); - topSizer->SetBorder(10, 10); - - wxRowColSizer *messageSizer = new wxRowColSizer(topSizer, wxSIZER_COLS, 100); - messageSizer->SetName("messageSizer"); - -// bool centre = ((style & wxCENTRE) == wxCENTRE); - - wxList messageList; - wxSplitMessage2(message, &messageList, this, messageSizer); - - // Insert a spacer - wxSpacingSizer *spacingSizer = new wxSpacingSizer(topSizer, wxBelow, messageSizer, 10); - - wxTextCtrl *textCtrl = new wxTextCtrl(this, wxID_TEXT, value, wxPoint(-1, -1), wxSize(350, -1)); - - wxRowColSizer *textSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS); - textSizer->AddSizerChild(textCtrl); - textSizer->SetName("textSizer"); - - // Create constraints for the text sizer - wxLayoutConstraints *textC = new wxLayoutConstraints; - textC->left.SameAs (messageSizer, wxLeft); - textC->top.Below (spacingSizer); - textSizer->SetConstraints(textC); - - // Insert another spacer - wxSpacingSizer *spacingSizer2 = new wxSpacingSizer(topSizer, wxBelow, textSizer, 10); - spacingSizer->SetName("spacingSizer2"); - - // Insert a sizer for the buttons - wxRowColSizer *buttonSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS); - buttonSizer->SetName("buttonSizer"); - - // Specify constraints for the button sizer - wxLayoutConstraints *c = new wxLayoutConstraints; - c->width.AsIs (); - c->height.AsIs (); - c->top.Below (spacingSizer2); - c->centreX.SameAs (textSizer, wxCentreX); - buttonSizer->SetConstraints(c); - - wxButton *ok = NULL; - wxButton *cancel = NULL; - - if (style & wxOK) { - ok = new wxButton(this, wxID_OK, _("OK")); - buttonSizer->AddSizerChild(ok); - } - - if (style & wxCANCEL) { - cancel = new wxButton(this, wxID_CANCEL, _("Cancel")); - buttonSizer->AddSizerChild(cancel); - } - - if (ok) - ok->SetDefault(); - - Layout(); - Centre(wxBOTH); - - wxEndBusyCursor(); -} - -void wxTextEntryDialog::OnOK(wxCommandEvent& WXUNUSED(event) ) -{ - wxTextCtrl *textCtrl = (wxTextCtrl *)FindWindow(wxID_TEXT); - if ( textCtrl ) - m_value = textCtrl->GetValue(); - - EndModal(wxID_OK); -} - -wxString wxGetTextFromUser(const wxString& message, const wxString& caption, - const wxString& defaultValue, wxWindow *parent, - int x, int y, bool WXUNUSED(centre) ) -{ - wxTextEntryDialog dialog(parent, message, caption, defaultValue, wxOK|wxCANCEL, wxPoint(x, y)); - if (dialog.ShowModal() == wxID_OK) - return dialog.GetValue(); - else - return wxString(""); -} diff --git a/src/generic/treectrl.cpp b/src/generic/treectrl.cpp deleted file mode 100644 index e6504c9bec..0000000000 --- a/src/generic/treectrl.cpp +++ /dev/null @@ -1,1148 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: treectrl.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: $Id$ -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "treectrl.h" -#endif - -#include "wx/treectrl.h" -#include "wx/settings.h" -#include "wx/log.h" -#include - -//----------------------------------------------------------------------------- -// wxTreeItem -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxTreeItem, wxObject) - -wxTreeItem::wxTreeItem() -{ - m_mask = 0; - m_itemId = 0; - m_state = 0; - m_stateMask = 0; - m_image = -1; - m_selectedImage = -1; - m_children = 0; - m_data = 0; -} - -//----------------------------------------------------------------------------- -// wxTreeEvent -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent,wxCommandEvent) - -wxTreeEvent::wxTreeEvent( wxEventType commandType, int id ) : - wxCommandEvent( commandType, id ) -{ - m_code = 0; - m_oldItem = 0; -} - -//----------------------------------------------------------------------------- -// wxGenericTreeItem -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxGenericTreeItem,wxObject) - -wxGenericTreeItem::wxGenericTreeItem( wxGenericTreeItem *parent ) -{ - Reset(); - m_parent = parent; - m_hasHilight = FALSE; -} - -wxGenericTreeItem::wxGenericTreeItem( wxGenericTreeItem *parent, const wxTreeItem& item, wxDC *dc ) -{ - Reset(); - SetItem( item, dc ); - m_parent = parent; - m_hasHilight = FALSE; -} - -void wxGenericTreeItem::SetItem( const wxTreeItem &item, wxDC *dc ) -{ - if ((item.m_mask & wxTREE_MASK_HANDLE) == wxTREE_MASK_HANDLE) - m_itemId = item.m_itemId; - if ((item.m_mask & wxTREE_MASK_STATE) == wxTREE_MASK_STATE) - m_state = item.m_state; - if ((item.m_mask & wxTREE_MASK_TEXT) == wxTREE_MASK_TEXT) - m_text = item.m_text; - if ((item.m_mask & wxTREE_MASK_IMAGE) == wxTREE_MASK_IMAGE) - m_image = item.m_image; - if ((item.m_mask & wxTREE_MASK_SELECTED_IMAGE) == wxTREE_MASK_SELECTED_IMAGE) - m_selectedImage = item.m_selectedImage; - if ((item.m_mask & wxTREE_MASK_CHILDREN) == wxTREE_MASK_CHILDREN) - m_hasChildren = (item.m_children > 0); - if ((item.m_mask & wxTREE_MASK_DATA) == wxTREE_MASK_DATA) - m_data = item.m_data; - long lw = 0; - long lh = 0; - dc->GetTextExtent( m_text, &lw, &lh ); - m_width = lw; - m_height = lh; -} - -void wxGenericTreeItem::SetText( const wxString &text, wxDC *dc ) -{ - m_text = text; - long lw = 0; - long lh = 0; - dc->GetTextExtent( m_text, &lw, &lh ); - m_width = lw; - m_height = lh; -} - -void wxGenericTreeItem::Reset() -{ - m_itemId = -1; - m_state = 0; - m_text = ""; - m_image = -1; - m_selectedImage = -1; -// m_children = 0; - m_hasChildren = FALSE; - m_data = 0; - m_x = 0; - m_y = 0; - m_height = 0; - m_width = 0; - m_xCross = 0; - m_yCross = 0; - m_level = 0; - m_children.DeleteContents( TRUE ); - m_isCollapsed = TRUE; - m_parent = (wxGenericTreeItem *) NULL; -} - -void wxGenericTreeItem::GetItem( wxTreeItem &item ) const -{ - if ((item.m_mask & wxTREE_MASK_STATE) == wxTREE_MASK_STATE) - item.m_state = m_state; - if ((item.m_mask & wxTREE_MASK_TEXT) == wxTREE_MASK_TEXT) - item.m_text = m_text; - if ((item.m_mask & wxTREE_MASK_IMAGE) == wxTREE_MASK_IMAGE) - item.m_image = m_image; - if ((item.m_mask & wxTREE_MASK_SELECTED_IMAGE) == wxTREE_MASK_SELECTED_IMAGE) - item.m_selectedImage = m_selectedImage; - if ((item.m_mask & wxTREE_MASK_CHILDREN) == wxTREE_MASK_CHILDREN) - item.m_children = (int)m_hasChildren; - if ((item.m_mask & wxTREE_MASK_DATA) == wxTREE_MASK_DATA) - item.m_data = m_data; -} - -bool wxGenericTreeItem::HasChildren() -{ - return m_hasChildren; -} - -bool wxGenericTreeItem::HasPlus() -{ - if ( !HasChildren() ) - return FALSE; - - return !IsExpanded(); -} - -int wxGenericTreeItem::NumberOfVisibleDescendents() -{ - int ret = m_children.Number(); - wxNode *node = m_children.First(); - while (node) - { - wxGenericTreeItem *item = (wxGenericTreeItem*)node->Data(); - ret += item->NumberOfVisibleDescendents(); - node = node->Next(); - } - return ret; -} - -int wxGenericTreeItem::NumberOfVisibleChildren() -{ - return m_isCollapsed ? 0 : m_children.Number(); -} - -wxGenericTreeItem *wxGenericTreeItem::FindItem( long itemId ) const -{ - if (m_itemId == itemId) return (wxGenericTreeItem*)(this); - wxNode *node = m_children.First(); - while (node) - { - wxGenericTreeItem *item = (wxGenericTreeItem*)node->Data(); - wxGenericTreeItem *res = item->FindItem( itemId ); - if (res) return (wxGenericTreeItem*)(res); - node = node->Next(); - } - return (wxGenericTreeItem *) NULL; -} - -void wxGenericTreeItem::AddChild( wxGenericTreeItem *child ) -{ - m_children.Append( child ); -} - -void wxGenericTreeItem::SetCross( int x, int y ) -{ - m_xCross = x; - m_yCross = y; -} - -void wxGenericTreeItem::GetSize( int &x, int &y ) -{ - if (y < m_y + 10) y = m_y +10; - int width = m_x + m_width; - if (width > x) x = width; - wxNode *node = m_children.First(); - while (node) - { - wxGenericTreeItem *item = (wxGenericTreeItem*)node->Data(); - item->GetSize( x, y ); - node = node->Next(); - } -} - -long wxGenericTreeItem::HitTest( const wxPoint& point, int &flags ) -{ - if ((point.y > m_y) && (point.y < m_y+m_height)) - { - if ((point.x > m_xCross-5) && - (point.x < m_xCross+5) && - (point.y > m_yCross-5) && - (point.y < m_yCross+5) && - (m_hasChildren)) - { - flags = wxTREE_HITTEST_ONITEMBUTTON; - return m_itemId; - } - if ((point.x > m_x) && (point.x < m_x+m_width)) - { - flags = wxTREE_HITTEST_ONITEMLABEL; - return m_itemId; - } - if (point.x > m_x) - { - flags = wxTREE_HITTEST_ONITEMRIGHT; - return m_itemId; - } - flags = wxTREE_HITTEST_ONITEMINDENT; - return m_itemId; - } - else - { - if (!m_isCollapsed) - { - wxNode *node = m_children.First(); - while (node) - { - wxGenericTreeItem *child = (wxGenericTreeItem*)node->Data(); - long res = child->HitTest( point, flags ); - if (res != -1) return res; - node = node->Next(); - } - } - } - return -1; -} - -void wxGenericTreeItem::PrepareEvent( wxTreeEvent &event ) -{ - event.m_item.m_itemId = m_itemId; - event.m_item.m_state = m_state; - event.m_item.m_text = m_text; - event.m_item.m_image = m_image; - event.m_item.m_selectedImage = m_selectedImage; - event.m_item.m_children = (int)m_hasChildren; - event.m_item.m_data = m_data; - event.m_oldItem = 0; - event.m_code = 0; - event.m_pointDrag.x = 0; - event.m_pointDrag.y = 0; -} - -void wxGenericTreeItem::SendKeyDown( wxWindow *target ) -{ - wxTreeEvent event( wxEVT_COMMAND_TREE_KEY_DOWN, target->GetId() ); - PrepareEvent( event ); - event.SetEventObject( target ); - target->ProcessEvent( event ); -} - -void wxGenericTreeItem::SendSelected( wxWindow *target ) -{ - wxTreeEvent event( wxEVT_COMMAND_TREE_SEL_CHANGED, target->GetId() ); - PrepareEvent( event ); - event.SetEventObject( target ); - target->ProcessEvent( event ); -} - -void wxGenericTreeItem::SendDelete( wxWindow *target ) -{ - wxTreeEvent event( wxEVT_COMMAND_TREE_DELETE_ITEM, target->GetId() ); - PrepareEvent( event ); - event.SetEventObject( target ); - target->ProcessEvent( event ); -} - -void wxGenericTreeItem::SendExpand( wxWindow *target ) -{ - m_isCollapsed = FALSE; - - wxTreeEvent event( wxEVT_COMMAND_TREE_ITEM_EXPANDING, target->GetId() ); - event.SetEventObject( target ); - PrepareEvent( event ); - target->ProcessEvent( event ); - - event.SetEventType(wxEVT_COMMAND_TREE_ITEM_EXPANDED); - PrepareEvent( event ); - target->ProcessEvent( event ); -} - -void wxGenericTreeItem::SendCollapse( wxWindow *target ) -{ - m_isCollapsed = TRUE; - - wxTreeEvent event( wxEVT_COMMAND_TREE_ITEM_COLLAPSING, target->GetId() ); - event.SetEventObject( target ); - PrepareEvent( event ); - target->ProcessEvent( event ); - - event.SetEventType(wxEVT_COMMAND_TREE_ITEM_COLLAPSED); - PrepareEvent( event ); - target->ProcessEvent( event ); -} - -void wxGenericTreeItem::SetHilight( bool set ) -{ - m_hasHilight = set; -} - -bool wxGenericTreeItem::HasHilight() -{ - return m_hasHilight; -} - -//----------------------------------------------------------------------------- -// wxTreeCtrl -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxTreeCtrl,wxScrolledWindow) - -BEGIN_EVENT_TABLE(wxTreeCtrl,wxScrolledWindow) - EVT_PAINT (wxTreeCtrl::OnPaint) - EVT_MOUSE_EVENTS (wxTreeCtrl::OnMouse) - EVT_CHAR (wxTreeCtrl::OnChar) - EVT_SET_FOCUS (wxTreeCtrl::OnSetFocus) - EVT_KILL_FOCUS (wxTreeCtrl::OnKillFocus) -END_EVENT_TABLE() - -wxTreeCtrl::wxTreeCtrl() -{ - m_current = (wxGenericTreeItem *) NULL; - m_anchor = (wxGenericTreeItem *) NULL; - m_hasFocus = FALSE; - m_xScroll = 0; - m_yScroll = 0; - m_lastId = 0; - m_lineHeight = 10; - m_indent = 15; - m_isCreated = FALSE; - m_hilightBrush = new wxBrush( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_HIGHLIGHT), wxSOLID ); - m_imageList = (wxImageList *) NULL; - m_smallImageList = (wxImageList *) NULL; -} - -wxTreeCtrl::wxTreeCtrl(wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) -{ - m_current = (wxGenericTreeItem *) NULL; - m_anchor = (wxGenericTreeItem *) NULL; - m_hasFocus = FALSE; - m_xScroll = 0; - m_yScroll = 0; - m_lastId = 0; - m_lineHeight = 10; - m_indent = 15; - m_isCreated = FALSE; - m_hilightBrush = new wxBrush( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_HIGHLIGHT), wxSOLID ); - m_imageList = (wxImageList *) NULL; - m_smallImageList = (wxImageList *) NULL; - Create( parent, id, pos, size, style, name ); -} - -wxTreeCtrl::~wxTreeCtrl() -{ -} - -bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) -{ - wxScrolledWindow::Create( parent, id, pos, size, style, name ); - SetBackgroundColour( *wxWHITE ); - m_dottedPen = wxPen( *wxBLACK, 0, 0 ); - return TRUE; -} - -int wxTreeCtrl::GetCount() const -{ - if (!m_anchor) return 0; - return m_anchor->NumberOfVisibleDescendents(); -} - -long wxTreeCtrl::InsertItem( long parent, const wxString& label, int image, - int selImage, long WXUNUSED(insertAfter) ) -{ - wxGenericTreeItem *p = (wxGenericTreeItem *) NULL; - if (parent == 0) - { - if (m_anchor) return -1; - } - else - { - p = FindItem( parent ); - if (!p) return -1; - } - wxTreeItem item; - m_lastId++; - item.m_mask = wxTREE_MASK_HANDLE; - item.m_itemId = m_lastId; - if (!label.IsNull() || (label == "")) - { - item.m_text = label; - item.m_mask |= wxTREE_MASK_TEXT; - } - if (image >= 0) - { - item.m_image = image; - item.m_mask |= wxTREE_MASK_IMAGE; - } - if (selImage >= 0) - { - item.m_selectedImage = selImage; - item.m_mask |= wxTREE_MASK_SELECTED_IMAGE; - } - - wxClientDC dc(this); - wxGenericTreeItem *new_child = new wxGenericTreeItem( p, item, &dc ); - if (p) - p->AddChild( new_child ); - else - m_anchor = new_child; - - if (p) - { - CalculatePositions(); - - if (!p->HasChildren()) p->m_hasChildren = TRUE; - - int ch = 0; - GetClientSize( (int *) NULL, &ch ); - - PrepareDC( dc ); - - wxRectangle rect; - rect.x = dc.LogicalToDeviceX( 0 ); - rect.y = 0; - rect.width = 10000; - rect.height = ch; - - if (p->m_children.Number() == 1) - { - rect.y = dc.LogicalToDeviceY( p->m_y ); - } - else - { - wxNode *node = p->m_children.Member( new_child )->Previous(); - wxGenericTreeItem* last_child = (wxGenericTreeItem*)node->Data(); - rect.y = dc.LogicalToDeviceY( last_child->m_y ); - } - - AdjustMyScrollbars(); - - if (rect.height > 0) Refresh( FALSE, &rect); - } - else - { - AdjustMyScrollbars(); - - Refresh(); - } - - return m_lastId; -} - -long wxTreeCtrl::InsertItem( long parent, wxTreeItem &info, long WXUNUSED(insertAfter) ) -{ - int oldMask = info.m_mask; - wxGenericTreeItem *p = (wxGenericTreeItem *) NULL; - if (parent == 0) - { - if (m_anchor) return -1; - } - else - { - p = FindItem( parent ); - if (!p) - { - printf( "TreeItem not found.\n" ); - return -1; - } - } - long ret = 0; - if ((info.m_mask & wxTREE_MASK_HANDLE) == 0) - { - m_lastId++; - info.m_itemId = m_lastId; - info.m_mask |= wxTREE_MASK_HANDLE; - ret = m_lastId; - } - else - { - ret = info.m_itemId; - } - - wxClientDC dc(this); - wxGenericTreeItem *new_child = new wxGenericTreeItem( p, info, &dc ); - if (p) - p->AddChild( new_child ); - else - m_anchor = new_child; - - if (p) - { - CalculatePositions(); - - if (!p->HasChildren()) p->m_hasChildren = TRUE; - - int ch = 0; - GetClientSize( (int *) NULL, &ch ); - - PrepareDC( dc ); - - wxRectangle rect; - rect.x = dc.LogicalToDeviceX( 0 ); - rect.y = 0; - rect.width = 10000; - rect.height = ch; - - if (p->m_children.Number() == 1) - { - rect.y = dc.LogicalToDeviceY( p->m_y ); - } - else - { - wxNode *node = p->m_children.Member( new_child )->Previous(); - wxGenericTreeItem* last_child = (wxGenericTreeItem*)node->Data(); - rect.y = dc.LogicalToDeviceY( last_child->m_y ); - } - - AdjustMyScrollbars(); - - if (rect.height > 0) Refresh( FALSE, &rect); - } - else - { - AdjustMyScrollbars(); - - Refresh(); - } - - info.m_mask = oldMask; - return ret; -} - -bool wxTreeCtrl::ExpandItem( long item, int action ) -{ - wxGenericTreeItem *i = FindItem( item ); - if (!i) - return FALSE; - - switch (action) - { - case wxTREE_EXPAND_EXPAND: - { - i->SendExpand( this ); - break; - } - - case wxTREE_EXPAND_COLLAPSE_RESET: - case wxTREE_EXPAND_COLLAPSE: - { - wxNode *node = i->m_children.First(); - while (node) - { - wxGenericTreeItem *child = (wxGenericTreeItem*)node->Data(); - if ( child->IsExpanded() ) - ExpandItem( child->m_itemId, wxTREE_EXPAND_COLLAPSE ); - node = node->Next(); - } - - CalculatePositions(); - - i->SendCollapse( this ); - break; - } - - case wxTREE_EXPAND_TOGGLE: - { - if ( i->IsExpanded() ) - ExpandItem( item, wxTREE_EXPAND_COLLAPSE ); - else - ExpandItem( item, wxTREE_EXPAND_EXPAND ); - return TRUE; - } - } - - wxClientDC dc(this); - PrepareDC(dc); - - int cw = 0; - int ch = 0; - GetClientSize( &cw, &ch ); - - wxRect rect; - rect.x = dc.LogicalToDeviceX( 0 ); - rect.width = cw; - rect.y = dc.LogicalToDeviceY( i->m_y ); - rect.height = ch; - Refresh( TRUE, &rect ); - - AdjustMyScrollbars(); - - return TRUE; -} - -void wxTreeCtrl::DeleteItem( long item ) -{ - wxGenericTreeItem *pItem = FindItem( item ); - wxCHECK_RET( pItem != NULL, _("wxTreeCtrl::DeleteItem: no such pItem.") ); - - pItem->m_parent->m_children.DeleteObject(pItem); - - Refresh(); -} - -void wxTreeCtrl::DeleteChildren( long item ) -{ - wxGenericTreeItem *pItem = FindItem( item ); - wxCHECK_RET( pItem != NULL, _("wxTreeCtrl::DeleteChildren: no such pItem.") ); - - pItem->m_children.Clear(); - - Refresh(); -} - -bool wxTreeCtrl::DeleteAllItems() -{ - delete m_anchor; - m_anchor = (wxGenericTreeItem *) NULL; - Refresh(); - return TRUE; -} - -bool wxTreeCtrl::GetItem( wxTreeItem &info ) const -{ - wxGenericTreeItem *i = FindItem( info.m_itemId ); - if (!i) return FALSE; - i->GetItem( info ); - return TRUE; -} - -long wxTreeCtrl::GetItemData( long item ) const -{ - wxGenericTreeItem *i = FindItem( item ); - if (!i) return 0; - return i->m_data; -} - -wxString wxTreeCtrl::GetItemText( long item ) const -{ - wxGenericTreeItem *i = FindItem( item ); - if (!i) return ""; - return i->m_text; -} - -int wxTreeCtrl::GetItemImage(long item) const -{ - wxGenericTreeItem *i = FindItem( item ); - return i == 0 ? -1 : i->GetImage(); -} - -long wxTreeCtrl::GetParent( long item ) const -{ - wxGenericTreeItem *i = FindItem( item ); - if (!i) return -1; - i = i->m_parent; - if (!i) return -1; - return i->m_parent->m_itemId; -} - -long wxTreeCtrl::GetRootItem() const -{ - if (m_anchor) return m_anchor->m_itemId; - return -1; -} - -long wxTreeCtrl::GetChild( long item ) const -{ - wxGenericTreeItem *i = FindItem( item ); - if (!i) return -1; - if (!i->HasChildren()) return -1; - wxNode *node = i->m_children.First(); - i = (wxGenericTreeItem *)node->Data(); - return i->m_itemId; -} - -long wxTreeCtrl::GetNextItem( long item, int code ) const -{ - switch (code) - { - case wxTREE_NEXT_CARET: return GetSelection(); - case wxTREE_NEXT_CHILD: return GetChild( item ); - case wxTREE_NEXT_ROOT: return GetRootItem(); - case wxTREE_NEXT_PARENT: return GetParent( item ); - case wxTREE_NEXT_NEXT: - { - wxGenericTreeItem *i = FindItem( item ); - if (!i) return -1; - if (i->m_parent) - { - wxNode *node = i->m_parent->m_children.Member( i ); - if (!node) return -1; - node = node->Next(); - if (!node) return -1; - i = (wxGenericTreeItem *)node->Data(); - return i->m_itemId; - } - break; - } - case wxTREE_NEXT_PREVIOUS: - { - wxGenericTreeItem *i = FindItem( item ); - if (!i) return -1; - if (i->m_parent) - { - wxNode *node = i->m_parent->m_children.Member( i ); - if (!node) return -1; - node = node->Previous(); - if (!node) return -1; - i = (wxGenericTreeItem *)node->Data(); - return i->m_itemId; - } - break; - } - } - return -1; -} - -long wxTreeCtrl::GetSelection() const -{ - return m_current ? m_current->GetItemId() : -1; -} - -bool wxTreeCtrl::SelectItem( long itemId ) -{ - wxGenericTreeItem *pItem = FindItem(itemId); - if ( !pItem ) { - wxLogDebug(_("Can't select an item %d which doesn't exist."), itemId); - - return FALSE; - } - - SelectItem(pItem); - - return TRUE; -} - -void wxTreeCtrl::SelectItem(wxGenericTreeItem *item) -{ - if (m_current != item) - { - if (m_current) - { - m_current->SetHilight( FALSE ); - RefreshLine( m_current ); - } - m_current = item; - m_current->SetHilight( TRUE ); - RefreshLine( m_current ); - - m_current->SendSelected( this ); - } -} - -bool wxTreeCtrl::ItemHasChildren( long item ) const -{ - wxGenericTreeItem *i = FindItem( item ); - if (!i) return FALSE; - return i->m_hasChildren; -} - -void wxTreeCtrl::SetIndent( int indent ) -{ - m_indent = indent; - Refresh(); -} - -int wxTreeCtrl::GetIndent() const -{ - return m_indent; -} - -bool wxTreeCtrl::SetItem( wxTreeItem &info ) -{ - wxGenericTreeItem *i = FindItem( info.m_itemId ); - if (!i) return FALSE; - wxClientDC dc(this); - i->SetItem( info, &dc ); - Refresh(); - return TRUE; -} - -bool wxTreeCtrl::SetItemData( long item, long data ) -{ - wxGenericTreeItem *i = FindItem( item ); - if (!i) return FALSE; - i->m_data = data; - return TRUE; -} - -bool wxTreeCtrl::SetItemText( long item, const wxString &text ) -{ - wxGenericTreeItem *i = FindItem( item ); - if (!i) return FALSE; - wxClientDC dc(this); - i->SetText( text, &dc ); - return TRUE; -} - -void wxTreeCtrl::SetItemImage(long item, int image, int imageSel) const -{ - wxGenericTreeItem *i = FindItem( item ); - if ( i != 0 ) - { - i->SetImage(image); - i->SetSelectedImage(imageSel); - } -} - -int wxTreeCtrl::GetItemState( long item, long stateMask ) const -{ - wxGenericTreeItem *i = FindItem( item ); - if (!i) return 0; - int ret = 0; - - // Currently, an item is always selected _and_ focussed in wxGTK - - if (stateMask & wxTREE_STATE_FOCUSED) - if (m_current == i) - ret += wxTREE_STATE_FOCUSED; - - if (stateMask & wxTREE_STATE_SELECTED) - if (m_current == i) - ret += wxTREE_STATE_SELECTED; - - if (stateMask & wxTREE_STATE_EXPANDED) - if (i->IsExpanded()) - ret += wxTREE_STATE_EXPANDED; - - return ret; -} - -bool wxTreeCtrl::SetItemState( long item, long state, long stateMask ) -{ - wxGenericTreeItem *i = FindItem( item ); - if (!i) return FALSE; - - if (stateMask & wxTREE_STATE_FOCUSED) - { - if (state & wxTREE_STATE_FOCUSED) - SelectItem( i ); - } - - if (stateMask & wxTREE_STATE_SELECTED) - { - if (state & wxTREE_STATE_SELECTED) - SelectItem( i ); - } - - if (stateMask & wxTREE_STATE_EXPANDED) - { - if (state & wxTREE_STATE_EXPANDED) - ExpandItem( i->m_itemId, wxTREE_EXPAND_EXPAND ); - else - ExpandItem( i->m_itemId, wxTREE_EXPAND_COLLAPSE ); - } - - return TRUE; -} - -long wxTreeCtrl::HitTest( const wxPoint& point, int &flags ) -{ - flags = 0; - if (!m_anchor) return -1; - return m_anchor->HitTest( point, flags ); -} - -wxImageList *wxTreeCtrl::GetImageList( int which ) const -{ - if (which == wxIMAGE_LIST_NORMAL) return m_imageList; - return m_smallImageList; -} - -void wxTreeCtrl::SetImageList( wxImageList *imageList, int which ) -{ - if (which == wxIMAGE_LIST_NORMAL) - { - if (m_imageList) delete m_imageList; - m_imageList = imageList; - } - else - { - if (m_smallImageList) delete m_smallImageList; - m_smallImageList = imageList; - } -} - -void wxTreeCtrl::AdjustMyScrollbars() -{ - if (m_anchor) - { - int x = 0; - int y = 0; - m_anchor->GetSize( x, y ); - y += 2*m_lineHeight; - int x_pos = GetScrollPos( wxHORIZONTAL ); - int y_pos = GetScrollPos( wxVERTICAL ); - SetScrollbars( 10, 10, x/10, y/10, x_pos, y_pos ); - } - else - { - SetScrollbars( 0, 0, 0, 0 ); - } -} - -void wxTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxPaintDC &dc, int level, int &y ) -{ - int horizX = level*m_indent; - - item->m_x = horizX+33; - item->m_y = y-m_lineHeight/3; - item->m_height = m_lineHeight; - - item->SetCross( horizX+15, y ); - - int oldY = y; - - int exposed_x = dc.LogicalToDeviceX( 0 ); - int exposed_y = dc.LogicalToDeviceY( item->m_y-2 ); - - if (IsExposed( exposed_x, exposed_y, 1000, m_lineHeight+4 )) - { - int startX = horizX; - int endX = horizX + 10; - - if (!item->HasChildren()) endX += 20; - - dc.DrawLine( startX, y, endX, y ); - - if (item->HasChildren()) - { - dc.DrawLine( horizX+20, y, horizX+30, y ); - dc.SetPen( *wxGREY_PEN ); - dc.DrawRectangle( horizX+10, y-4, 11, 9 ); - dc.SetPen( *wxBLACK_PEN ); - dc.DrawLine( horizX+13, y, horizX+18, y ); - if (item->HasPlus()) - dc.DrawLine( horizX+15, y-2, horizX+15, y+3 ); - } - - if (item->HasHilight()) - { - dc.SetTextForeground( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) ); - dc.SetBrush( *m_hilightBrush ); - long tw, th; - dc.GetTextExtent( item->m_text, &tw, &th ); - if (m_hasFocus) - { - dc.SetPen( *wxBLACK_PEN ); - dc.DrawRectangle( item->m_x-2, item->m_y-2, tw+4, th+4 ); - } - else - { - dc.SetPen( *wxTRANSPARENT_PEN ); - dc.DrawRectangle( item->m_x-2, item->m_y-2, tw+4, th+4 ); - } - dc.DrawText( item->m_text, item->m_x, item->m_y ); - - dc.SetPen( *wxBLACK_PEN ); - dc.SetTextForeground( *wxBLACK ); - dc.SetBrush( *wxWHITE_BRUSH ); - } - else - { - dc.SetBrush( *wxWHITE_BRUSH ); - dc.SetPen( *wxTRANSPARENT_PEN ); - long tw, th; - dc.GetTextExtent( item->m_text, &tw, &th ); - dc.DrawRectangle( item->m_x-2, item->m_y-2, tw+4, th+4 ); - dc.DrawText( item->m_text, item->m_x, item->m_y ); - dc.SetPen( *wxBLACK_PEN ); - } - } - - if (item->NumberOfVisibleChildren() == 0) return; - - int semiOldY = y; - - wxNode *node = item->m_children.First(); - while (node) - { - wxGenericTreeItem *child = (wxGenericTreeItem *)node->Data(); - - y += m_lineHeight; - semiOldY = y; - - PaintLevel( child, dc, level+1, y ); - - node = node->Next(); - } - - dc.DrawLine( horizX+15, oldY+5, horizX+15, semiOldY ); -} - -void wxTreeCtrl::OnPaint( const wxPaintEvent &WXUNUSED(event) ) -{ - if (!m_anchor) return; - - wxPaintDC dc(this); - PrepareDC( dc ); - - dc.SetFont( wxSystemSettings::GetSystemFont( wxSYS_SYSTEM_FONT ) ); - - dc.SetPen( m_dottedPen ); - m_lineHeight = (int)(dc.GetCharHeight() + 4); - - int y = m_lineHeight / 2 + 2; - PaintLevel( m_anchor, dc, 0, y ); -} - -void wxTreeCtrl::OnSetFocus( const wxFocusEvent &WXUNUSED(event) ) -{ - m_hasFocus = TRUE; - if (m_current) RefreshLine( m_current ); -} - -void wxTreeCtrl::OnKillFocus( const wxFocusEvent &WXUNUSED(event) ) -{ - m_hasFocus = FALSE; - if (m_current) RefreshLine( m_current ); -} - -void wxTreeCtrl::OnChar( wxKeyEvent &event ) -{ - event.Skip(); -} - -void wxTreeCtrl::OnMouse( const wxMouseEvent &event ) -{ - if (!event.LeftDown() && - !event.LeftDClick()) return; - - wxClientDC dc(this); - PrepareDC(dc); - long x = dc.DeviceToLogicalX( (long)event.GetX() ); - long y = dc.DeviceToLogicalY( (long)event.GetY() ); - - int flag = 0; - long id = HitTest( wxPoint(x,y), flag ); - if (id == -1) - return; - wxGenericTreeItem *item = FindItem( id ); - - if (!item) return; - if ((flag != wxTREE_HITTEST_ONITEMBUTTON) && - (flag != wxTREE_HITTEST_ONITEMLABEL)) return; - - SelectItem(item); - - if (event.LeftDClick()) - m_current->SendKeyDown( this ); - - if (flag == wxTREE_HITTEST_ONITEMBUTTON) - { - ExpandItem( item->m_itemId, wxTREE_EXPAND_TOGGLE ); - return; - } -} - -void wxTreeCtrl::CalculateLevel( wxGenericTreeItem *item, wxPaintDC &dc, int level, int &y ) -{ - int horizX = level*m_indent; - - item->m_x = horizX+33; - item->m_y = y-m_lineHeight/3-2; - item->m_height = m_lineHeight; - - if (item->NumberOfVisibleChildren() == 0) return; - - wxNode *node = item->m_children.First(); - while (node) - { - wxGenericTreeItem *child = (wxGenericTreeItem *)node->Data(); - - y += m_lineHeight; - CalculateLevel( child, dc, level+1, y ); - - node = node->Next(); - } -} - -void wxTreeCtrl::CalculatePositions() -{ - if (!m_anchor) - return; - - wxClientDC dc(this); - PrepareDC( dc ); - - dc.SetFont( wxSystemSettings::GetSystemFont( wxSYS_SYSTEM_FONT ) ); - - dc.SetPen( m_dottedPen ); - m_lineHeight = (int)(dc.GetCharHeight() + 4); - - int y = m_lineHeight / 2 + 2; - CalculateLevel( m_anchor, dc, 0, y ); -} - -wxGenericTreeItem *wxTreeCtrl::FindItem( long itemId ) const -{ - if (!m_anchor) return (wxGenericTreeItem *) NULL; - return m_anchor->FindItem( itemId ); -} - -void wxTreeCtrl::RefreshLine( wxGenericTreeItem *item ) -{ - if (!item) return; - wxClientDC dc(this); - PrepareDC( dc ); - wxRect rect; - rect.x = dc.LogicalToDeviceX( item->m_x-2 ); - rect.y = dc.LogicalToDeviceY( item->m_y-2 ); - rect.width = 1000; - rect.height = dc.GetCharHeight()+6; - Refresh( TRUE, &rect ); -} - - - diff --git a/src/gtk.inc b/src/gtk.inc deleted file mode 100644 index 48d8fab100..0000000000 --- a/src/gtk.inc +++ /dev/null @@ -1,181 +0,0 @@ -# needed for unactivated -NONE = - -# define library name -LIB_TARGET=wx_gtk -LIB_MAJOR=1 -LIB_MINOR=91 - -# define library sources - -LIB_CPP_SRC=\ -\ - common/cmndata.cpp \ - common/config.cpp \ - common/date.cpp \ - common/docmdi.cpp \ - common/docview.cpp \ - common/dynarray.cpp \ - common/dynlib.cpp \ - common/event.cpp \ - common/file.cpp \ - common/fileconf.cpp \ - common/filefn.cpp \ - common/gdicmn.cpp \ - common/hash.cpp \ - common/helpbase.cpp \ - common/intl.cpp \ - common/ipcbase.cpp \ - common/layout.cpp \ - common/list.cpp \ - common/log.cpp \ - common/matrix.cpp \ - common/memory.cpp \ - common/module.cpp \ - common/object.cpp \ - common/postscrp.cpp \ - common/prntbase.cpp \ - common/resource.cpp \ - common/serbase.cpp \ - common/string.cpp \ - common/textfile.cpp \ - common/time.cpp \ - common/timercmn.cpp \ - common/utilscmn.cpp \ - common/wincmn.cpp \ - common/framecmn.cpp \ - common/stream.cpp \ - common/datstrm.cpp \ - common/fstream.cpp \ - common/mstream.cpp \ - common/zstream.cpp \ - common/objstrm.cpp \ - common/validate.cpp \ - common/valtext.cpp \ - common/wxexpr.cpp \ -\ - gtk/accel.cpp \ - gtk/app.cpp \ - gtk/bitmap.cpp \ - gtk/bmpbuttn.cpp \ - gtk/brush.cpp \ - gtk/button.cpp \ - gtk/checkbox.cpp \ - gtk/choice.cpp \ - gtk/colour.cpp \ - gtk/control.cpp \ - gtk/combobox.cpp \ - gtk/cursor.cpp \ - gtk/data.cpp \ - gtk/dc.cpp \ - gtk/dcclient.cpp \ - gtk/dcmemory.cpp \ - gtk/dcscreen.cpp \ - gtk/dnd.cpp \ - gtk/dialog.cpp \ - gtk/filedlg.cpp \ - gtk/font.cpp \ - gtk/frame.cpp \ - gtk/gauge.cpp \ - gtk/gdiobj.cpp \ - gtk/icon.cpp \ - gtk/listbox.cpp \ - gtk/mdi.cpp \ - gtk/menu.cpp \ - gtk/notebook.cpp \ - gtk/palette.cpp \ - gtk/pen.cpp \ - gtk/radiobox.cpp \ - gtk/radiobut.cpp \ - gtk/region.cpp \ - gtk/scrolbar.cpp \ - gtk/settings.cpp \ - gtk/slider.cpp \ - gtk/statbox.cpp \ - gtk/statbmp.cpp \ - gtk/stattext.cpp \ - gtk/tbargtk.cpp \ - gtk/textctrl.cpp \ - gtk/timer.cpp \ - gtk/utilsgtk.cpp \ - gtk/utilsres.cpp \ - gtk/window.cpp \ -\ - generic/choicdgg.cpp \ - generic/colrdlgg.cpp \ - generic/fontdlgg.cpp \ - generic/gridg.cpp \ - generic/imaglist.cpp \ - generic/listctrl.cpp \ - generic/msgdlgg.cpp \ - generic/panelg.cpp \ - generic/printps.cpp \ - generic/prntdlgg.cpp \ - generic/scrolwin.cpp \ - generic/splitter.cpp \ - generic/statusbr.cpp \ - generic/tabg.cpp \ - generic/textdlgg.cpp \ - generic/treectrl.cpp - - -LIB_C_SRC=\ - common/extended.c \ -\ - gtk/win_gtk.c \ -\ - png/png.c \ - png/pngset.c \ - png/pngget.c \ - png/pngrutil.c \ - png/pngtrans.c \ - png/pngwutil.c \ - png/pngread.c \ - png/pngrio.c \ - png/pngwio.c \ - png/pngwrite.c \ - png/pngrtran.c \ - png/pngwtran.c \ - png/pngmem.c \ - png/pngerror.c \ - png/pngpread.c \ -\ - zlib/adler32.c \ - zlib/compress.c \ - zlib/crc32.c \ - zlib/gzio.c \ - zlib/uncompr.c \ - zlib/deflate.c \ - zlib/trees.c \ - zlib/zutil.c \ - zlib/inflate.c \ - zlib/infblock.c \ - zlib/inftrees.c \ - zlib/infcodes.c \ - zlib/infutil.c \ - zlib/inffast.c \ -\ - gdk_imlib/cache.c \ - gdk_imlib/colors.c \ - gdk_imlib/globals.c \ - gdk_imlib/load.c \ - gdk_imlib/misc.c \ - gdk_imlib/rend.c \ - gdk_imlib/save.c \ - gdk_imlib/utils.c -# \ -# iodbc/dlf.c \ -# iodbc/dlproc.c \ -# iodbc/herr.c \ -# iodbc/henv.c \ -# iodbc/hdbc.c \ -# iodbc/hstmt.c \ -# iodbc/connect.c \ -# iodbc/prepare.c \ -# iodbc/result.c \ -# iodbc/execute.c \ -# iodbc/fetch.c \ -# iodbc/info.c \ -# iodbc/catalog.c \ -# iodbc/misc.c \ -# iodbc/itrace.c diff --git a/src/gtk/accel.cpp b/src/gtk/accel.cpp deleted file mode 100644 index 08b5436b34..0000000000 --- a/src/gtk/accel.cpp +++ /dev/null @@ -1,80 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: accel.cpp -// Purpose: -// Author: Robert Roebling -// Id: -// Copyright: (c) 1998 Robert Roebling -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "accel.h" -#endif - -#include "wx/accel.h" - -//----------------------------------------------------------------------------- -// wxAcceleratorTable -//----------------------------------------------------------------------------- - -class wxAccelRefData: public wxObjectRefData -{ - public: - - wxAccelRefData(void); - - wxList m_accels; -}; - -wxAccelRefData::wxAccelRefData(void) -{ - m_accels.DeleteContents( TRUE ); -} - -//----------------------------------------------------------------------------- - -#define M_ACCELDATA ((wxAccelRefData *)m_refData) - -IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable,wxObject) - -wxAcceleratorTable::wxAcceleratorTable() -{ - m_refData = new wxAccelRefData(); -} - -wxAcceleratorTable::wxAcceleratorTable( int n, wxAcceleratorEntry entries[] ) -{ - m_refData = new wxAccelRefData(); - for (int i = 0; i < n; i++) - { - M_ACCELDATA->m_accels.Append( (wxObject*) - new wxAcceleratorEntry( entries[n].GetFlags(), entries[n].GetKeyCode(), entries[n].GetCommand() ) ); - } -} - -wxAcceleratorTable::~wxAcceleratorTable() -{ -} - -bool wxAcceleratorTable::Ok() const -{ - return (m_refData != NULL); -} - -int wxAcceleratorTable::GetCommand( wxKeyEvent &event ) -{ - wxNode *node = M_ACCELDATA->m_accels.First(); - while (node) - { - wxAcceleratorEntry *entry = (wxAcceleratorEntry*)node->Data(); - if ((event.m_keyCode == entry->GetKeyCode()) && - (((entry->GetFlags() & wxACCEL_CTRL) == 0) || event.ControlDown()) && - (((entry->GetFlags() & wxACCEL_SHIFT) == 0) || event.ShiftDown()) && - (((entry->GetFlags() & wxACCEL_ALT) == 0) || event.AltDown() || event.MetaDown())) - return entry->GetCommand(); - node = node->Next(); - } - - return -1; -} - diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp deleted file mode 100644 index dbe4a42999..0000000000 --- a/src/gtk/app.cpp +++ /dev/null @@ -1,418 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: app.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "app.h" -#endif - -#include "wx/app.h" -#include "wx/gdicmn.h" -#include "wx/utils.h" -#include "wx/postscrp.h" -#include "wx/intl.h" -#include "wx/log.h" -#include "wx/memory.h" -#include "wx/font.h" -#include "wx/settings.h" -#include "wx/resource.h" - -#include "unistd.h" - -#ifdef USE_GDK_IMLIB -#include "../gdk_imlib/gdk_imlib.h" -#endif - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -wxApp *wxTheApp = (wxApp *) NULL; -wxAppInitializerFunction wxApp::m_appInitFn = (wxAppInitializerFunction) NULL; - -extern wxList wxPendingDelete; -extern wxResourceCache *wxTheResourceCache; - -//----------------------------------------------------------------------------- -// local functions -//----------------------------------------------------------------------------- - -extern void wxFlushResources(void); - -//----------------------------------------------------------------------------- -// global functions -//----------------------------------------------------------------------------- - -void wxExit(void) -{ - gtk_main_quit(); -} - -bool wxYield(void) -{ - while (gtk_events_pending() > 0) gtk_main_iteration(); - return TRUE; -} - -//----------------------------------------------------------------------------- -// wxApp -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxApp,wxEvtHandler) - -BEGIN_EVENT_TABLE(wxApp, wxEvtHandler) - EVT_IDLE(wxApp::OnIdle) -END_EVENT_TABLE() - -gint wxapp_idle_callback( gpointer WXUNUSED(data) ) -{ - if (wxTheApp) while (wxTheApp->ProcessIdle()) {} - usleep( 10000 ); - return TRUE; -} - -wxApp::wxApp() -{ - m_idleTag = 0; - m_topWindow = (wxWindow *) NULL; - m_exitOnFrameDelete = TRUE; - wxTheApp = this; -} - -wxApp::~wxApp(void) -{ - gtk_idle_remove( m_idleTag ); -} - -bool wxApp::OnInit(void) -{ - return TRUE; -} - -bool wxApp::OnInitGui(void) -{ - m_idleTag = gtk_idle_add( wxapp_idle_callback, NULL ); - return TRUE; -} - -int wxApp::OnRun(void) -{ - return MainLoop(); -} - -bool wxApp::ProcessIdle(void) -{ - wxIdleEvent event; - event.SetEventObject( this ); - ProcessEvent( event ); - - return event.MoreRequested(); -} - -void wxApp::OnIdle( wxIdleEvent &event ) -{ - static bool inOnIdle = FALSE; - - // Avoid recursion (via ProcessEvent default case) - if (inOnIdle) - return; - - inOnIdle = TRUE; - - // 'Garbage' collection of windows deleted with Close(). - DeletePendingObjects(); - - // flush the logged messages if any - wxLog *pLog = wxLog::GetActiveTarget(); - if ( pLog != NULL && pLog->HasPendingMessages() ) - pLog->Flush(); - - // Send OnIdle events to all windows - bool needMore = SendIdleEvents(); - - if (needMore) - event.RequestMore(TRUE); - - inOnIdle = FALSE; -} - -bool wxApp::SendIdleEvents(void) -{ - bool needMore = FALSE; - wxNode* node = wxTopLevelWindows.First(); - while (node) - { - wxWindow* win = (wxWindow*) node->Data(); - if (SendIdleEvents(win)) - needMore = TRUE; - - node = node->Next(); - } - return needMore; -} - -bool wxApp::SendIdleEvents( wxWindow* win ) -{ - bool needMore = FALSE; - - wxIdleEvent event; - event.SetEventObject(win); - win->ProcessEvent(event); - - if (event.MoreRequested()) - needMore = TRUE; - - wxNode* node = win->GetChildren()->First(); - while (node) - { - wxWindow* win = (wxWindow*) node->Data(); - if (SendIdleEvents(win)) - needMore = TRUE; - - node = node->Next(); - } - return needMore ; -} - -int wxApp::OnExit(void) -{ - return 0; -} - -int wxApp::MainLoop(void) -{ - gtk_main(); - return 0; -} - -void wxApp::ExitMainLoop(void) -{ - gtk_main_quit(); -} - -bool wxApp::Initialized(void) -{ - return m_initialized; -} - -bool wxApp::Pending(void) -{ - return FALSE; -} - -void wxApp::Dispatch(void) -{ -} - -void wxApp::DeletePendingObjects(void) -{ - wxNode *node = wxPendingDelete.First(); - while (node) - { - wxObject *obj = (wxObject *)node->Data(); - - delete obj; - - if (wxPendingDelete.Member(obj)) - delete node; - - node = wxPendingDelete.First(); - } -} - -wxWindow *wxApp::GetTopWindow(void) -{ - if (m_topWindow) return m_topWindow; - wxNode *node = wxTopLevelWindows.First(); - if (!node) return (wxWindow *) NULL; - return (wxWindow*)node->Data(); -} - -void wxApp::SetTopWindow( wxWindow *win ) -{ - m_topWindow = win; -} - -void wxApp::CommonInit(void) -{ - -/* -#if USE_RESOURCES - (void) wxGetResource("wxWindows", "OsVersion", &wxOsVersion); -#endif -*/ - wxSystemSettings::Init(); - wxTheResourceCache = new wxResourceCache(wxKEY_STRING); - - wxTheFontNameDirectory = new wxFontNameDirectory; - wxTheFontNameDirectory->Initialize(); - - wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING); - wxTheColourDatabase->Initialize(); - - wxInitializeStockLists(); - wxInitializeStockObjects(); - - wxInitializeResourceSystem(); - - // For PostScript printing -#if USE_POSTSCRIPT - wxInitializePrintSetupData(); - wxThePrintPaperDatabase = new wxPrintPaperDatabase; - wxThePrintPaperDatabase->CreateDatabase(); -#endif - - -/* - wxBitmap::InitStandardHandlers(); - - g_globalCursor = new wxCursor; -*/ -} - -void wxApp::CommonCleanUp(void) -{ - wxDELETE(wxTheColourDatabase); - wxDELETE(wxThePrintPaperDatabase); - wxDELETE(wxThePrintSetupData); - wxDELETE(wxTheFontNameDirectory); - wxDeleteStockObjects(); - - wxFlushResources(); - - wxDELETE(wxTheResourceCache); - - wxDeleteStockLists(); - - wxCleanUpResourceSystem(); - - wxSystemSettings::Done(); -} - -wxLog *wxApp::CreateLogTarget() -{ - return new wxLogGui; -} - -//----------------------------------------------------------------------------- -// wxEntry -//----------------------------------------------------------------------------- - -int wxEntry( int argc, char *argv[] ) -{ - wxBuffer = new char[BUFSIZ + 512]; - - wxClassInfo::InitializeClasses(); - -#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT - -#if !defined(_WINDLL) - streambuf* sBuf = new wxDebugStreamBuf; -#else - streambuf* sBuf = NULL; -#endif - ostream* oStr = new ostream(sBuf) ; - wxDebugContext::SetStream(oStr, sBuf); - -#endif - - if (!wxTheApp) - { - if (!wxApp::GetInitializerFunction()) - { - printf( "wxWindows error: No initializer - use IMPLEMENT_APP macro.\n" ); - return 0; - } - - wxAppInitializerFunction app_ini = wxApp::GetInitializerFunction(); - - wxObject *test_app = app_ini(); - - wxTheApp = (wxApp*) test_app; - } - - if (!wxTheApp) - { - printf( "wxWindows error: wxTheApp == NULL\n" ); - return 0; - } - - wxTheApp->argc = argc; - wxTheApp->argv = argv; - - gtk_set_locale(); - - gtk_init( &argc, &argv ); - -#ifdef USE_GDK_IMLIB - - gdk_imlib_init(); - - gtk_widget_push_visual(gdk_imlib_get_visual()); - - gtk_widget_push_colormap(gdk_imlib_get_colormap()); - -#endif - - wxApp::CommonInit(); - - wxTheApp->OnInitGui(); - - // Here frames insert themselves automatically - // into wxTopLevelWindows by getting created - // in OnInit(). - - if (!wxTheApp->OnInit()) return 0; - - wxTheApp->m_initialized = (wxTopLevelWindows.Number() > 0); - - int retValue = 0; - - if (wxTheApp->Initialized()) retValue = wxTheApp->OnRun(); - - wxTheApp->DeletePendingObjects(); - - wxTheApp->OnExit(); - - wxApp::CommonCleanUp(); - - wxDELETE(wxTheApp); - -#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT - // At this point we want to check if there are any memory - // blocks that aren't part of the wxDebugContext itself, - // as a special case. Then when dumping we need to ignore - // wxDebugContext, too. - if (wxDebugContext::CountObjectsLeft() > 0) - { - wxTrace("There were memory leaks.\n"); - wxDebugContext::Dump(); - wxDebugContext::PrintStatistics(); - } - wxDebugContext::SetStream(NULL, NULL); -#endif - - return retValue; -} - -//----------------------------------------------------------------------------- -// main() -//----------------------------------------------------------------------------- - -#if defined(AIX) || defined(AIX4) || defined(____HPUX__) || defined(NOMAIN) - - // main in IMPLEMENT_WX_MAIN in IMPLEMENT_APP in app.h - -#else - - int main(int argc, char *argv[]) { return wxEntry(argc, argv); } - -#endif - - diff --git a/src/gtk/bdiag.xbm b/src/gtk/bdiag.xbm deleted file mode 100644 index 9ff0a1822f..0000000000 --- a/src/gtk/bdiag.xbm +++ /dev/null @@ -1,6 +0,0 @@ -#define bdiag_width 16 -#define bdiag_height 16 -static char bdiag_bits[] = { - 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x04, - 0x02, 0x02, 0x01, 0x01, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, - 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01}; diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp deleted file mode 100644 index b06f111e55..0000000000 --- a/src/gtk/bitmap.cpp +++ /dev/null @@ -1,400 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bitmap.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "bitmap.h" -#endif - -#include "wx/bitmap.h" -#include "wx/icon.h" -#include "gdk/gdkprivate.h" - -#ifdef USE_GDK_IMLIB -#include "../gdk_imlib/gdk_imlib.h" -#endif - -//----------------------------------------------------------------------------- -// wxMask -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxMask,wxObject) - -wxMask::wxMask(void) -{ - m_bitmap = (GdkBitmap *) NULL; -} - -wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap), const wxColour& WXUNUSED(colour) ) -{ -} - -wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap), int WXUNUSED(paletteIndex) ) -{ -} - -wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap) ) -{ -} - -wxMask::~wxMask(void) -{ -#ifdef USE_GDK_IMLIB - // do not delete the mask, gdk_imlib does it for you -#else - if (m_bitmap) gdk_bitmap_unref( m_bitmap ); -#endif -} - -GdkBitmap *wxMask::GetBitmap(void) const -{ - return m_bitmap; -} - -//----------------------------------------------------------------------------- -// wxBitmap -//----------------------------------------------------------------------------- - -// CMB 20/5/98: added m_bitmap for GdkBitmaps -class wxBitmapRefData: public wxObjectRefData -{ - public: - - wxBitmapRefData(void); - ~wxBitmapRefData(void); - - GdkPixmap *m_pixmap; - GdkBitmap *m_bitmap; - wxMask *m_mask; - int m_width; - int m_height; - int m_bpp; -#ifdef USE_GDK_IMLIB - GdkImlibImage *m_image; -#endif - wxPalette *m_palette; -}; - -wxBitmapRefData::wxBitmapRefData(void) -{ - m_pixmap = (GdkPixmap *) NULL; - m_bitmap = (GdkBitmap *) NULL; - m_mask = (wxMask *) NULL; - m_width = 0; - m_height = 0; - m_bpp = 0; - m_palette = (wxPalette *) NULL; -#ifdef USE_GDK_IMLIB - m_image = (GdkImlibImage *) NULL; -#endif -} - -wxBitmapRefData::~wxBitmapRefData(void) -{ -#ifdef USE_GDK_IMLIB - if (m_pixmap) gdk_imlib_free_pixmap( m_pixmap ); - if (m_image) gdk_imlib_kill_image( m_image ); -#else - if (m_pixmap) gdk_pixmap_unref( m_pixmap ); -#endif - if (m_bitmap) gdk_bitmap_unref( m_bitmap ); - if (m_mask) delete m_mask; - if (m_palette) delete m_palette; -} - -//----------------------------------------------------------------------------- - -#define M_BMPDATA ((wxBitmapRefData *)m_refData) - -IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxGDIObject) - -wxBitmap::wxBitmap(void) -{ - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::wxBitmap( int width, int height, int depth ) -{ - m_refData = new wxBitmapRefData(); - M_BMPDATA->m_mask = (wxMask *) NULL; - M_BMPDATA->m_pixmap = - gdk_pixmap_new( (GdkWindow*) &gdk_root_parent, width, height, depth ); - M_BMPDATA->m_width = width; - M_BMPDATA->m_height = height; - M_BMPDATA->m_bpp = depth; - - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::wxBitmap( char **bits ) -{ - m_refData = new wxBitmapRefData(); - -#ifndef USE_GDK_IMLIB - - GdkBitmap *mask = NULL; - - M_BMPDATA->m_pixmap = - gdk_pixmap_create_from_xpm_d( (GdkWindow*) &gdk_root_parent, &mask, NULL, (gchar **) bits ); - - if (mask) - { - M_BMPDATA->m_mask = new wxMask(); - M_BMPDATA->m_mask->m_bitmap = mask; - } - - gdk_window_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) ); - -#else - - M_BMPDATA->m_image = gdk_imlib_create_image_from_xpm_data( bits ); - Render(); - -#endif - - M_BMPDATA->m_bpp = 24; // ? - - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::wxBitmap( const wxBitmap& bmp ) -{ - Ref( bmp ); - - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::wxBitmap( const wxBitmap* bmp ) -{ - if (bmp) Ref( *bmp ); - - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::wxBitmap( const wxString &filename, int type ) -{ - LoadFile( filename, type ); - - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); -} - -// CMB 15/5/98: add constructor for xbm bitmaps -wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth)) -{ - m_refData = new wxBitmapRefData(); - - M_BMPDATA->m_mask = (wxMask *) NULL; - M_BMPDATA->m_bitmap = - gdk_bitmap_create_from_data( (GdkWindow*) &gdk_root_parent, (gchar *) bits, width, height ); - M_BMPDATA->m_width = width; - M_BMPDATA->m_height = height; - M_BMPDATA->m_bpp = 1; - - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::~wxBitmap(void) -{ - if (wxTheBitmapList) wxTheBitmapList->DeleteObject(this); -} - -wxBitmap& wxBitmap::operator = ( const wxBitmap& bmp ) -{ - if (*this == bmp) return (*this); - Ref( bmp ); - return *this; -} - -bool wxBitmap::operator == ( const wxBitmap& bmp ) -{ - return m_refData == bmp.m_refData; -} - -bool wxBitmap::operator != ( const wxBitmap& bmp ) -{ - return m_refData != bmp.m_refData; -} - -bool wxBitmap::Ok(void) const -{ - return m_refData != NULL; -} - -int wxBitmap::GetHeight(void) const -{ - if (!Ok()) return 0; - return M_BMPDATA->m_height; -} - -int wxBitmap::GetWidth(void) const -{ - if (!Ok()) return 0; - return M_BMPDATA->m_width; -} - -int wxBitmap::GetDepth(void) const -{ - if (!Ok()) return 0; - return M_BMPDATA->m_bpp; -} - -void wxBitmap::SetHeight( int height ) -{ - if (!Ok()) return; - M_BMPDATA->m_height = height; -} - -void wxBitmap::SetWidth( int width ) -{ - if (!Ok()) return; - M_BMPDATA->m_width = width; -} - -void wxBitmap::SetDepth( int depth ) -{ - if (!Ok()) return; - M_BMPDATA->m_bpp = depth; -} - -wxMask *wxBitmap::GetMask(void) const -{ - if (!Ok()) return (wxMask *) NULL; - - return M_BMPDATA->m_mask; -} - -void wxBitmap::SetMask( wxMask *mask ) -{ - if (!Ok()) return; - - if (M_BMPDATA->m_mask) delete M_BMPDATA->m_mask; - M_BMPDATA->m_mask = mask; -} - -void wxBitmap::Resize( int height, int width ) -{ - if (!Ok()) return; - -#ifdef USE_GDK_IMLIB - - if (M_BMPDATA->m_bitmap) return; // not supported for bitmaps - - if (!M_BMPDATA->m_image) RecreateImage(); - - if (M_BMPDATA->m_pixmap) gdk_imlib_free_pixmap( M_BMPDATA->m_pixmap ); - if (M_BMPDATA->m_mask) delete M_BMPDATA->m_mask; - - GdkImlibImage* image = gdk_imlib_clone_scaled_image( M_BMPDATA->m_image, height, width ); - gdk_imlib_destroy_image( M_BMPDATA->m_image ); - M_BMPDATA->m_image = image; - M_BMPDATA->m_height = height; - M_BMPDATA->m_width = width; - - Render(); - -#endif -} - -bool wxBitmap::SaveFile( const wxString &name, int WXUNUSED(type), - wxPalette *WXUNUSED(palette) ) -{ -#ifdef USE_GDK_IMLIB - - if (!Ok()) return FALSE; - - if (!M_BMPDATA->m_image) RecreateImage(); - - return gdk_imlib_save_image( M_BMPDATA->m_image, WXSTRINGCAST name, (GdkImlibSaveInfo *) NULL ); - -#endif - - return FALSE; -} - -bool wxBitmap::LoadFile( const wxString &name, int WXUNUSED(type) ) -{ -#ifdef USE_GDK_IMLIB - - UnRef(); - m_refData = new wxBitmapRefData(); - - M_BMPDATA->m_image = gdk_imlib_load_image( WXSTRINGCAST name ); - - if (!M_BMPDATA->m_image) - { - UnRef(); - return FALSE; - } - - Render(); - - gdk_window_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) ); - M_BMPDATA->m_bpp = 24; // ? - - return TRUE; -#endif - - return FALSE; -} - -wxPalette *wxBitmap::GetPalette(void) const -{ - if (!Ok()) return (wxPalette *) NULL; - return M_BMPDATA->m_palette; -} - -GdkPixmap *wxBitmap::GetPixmap(void) const -{ - if (!Ok()) return (GdkPixmap *) NULL; - return M_BMPDATA->m_pixmap; -} - -GdkBitmap *wxBitmap::GetBitmap(void) const -{ - if (!Ok()) return (GdkBitmap *) NULL; - - return M_BMPDATA->m_bitmap; -} - -void wxBitmap::DestroyImage(void) -{ - if (!Ok()) return; - - if (M_BMPDATA->m_image) - { - gdk_imlib_destroy_image( M_BMPDATA->m_image ); - M_BMPDATA->m_image = (GdkImlibImage *) NULL; - } -} - -void wxBitmap::RecreateImage(void) -{ -} - -void wxBitmap::Render(void) -{ - if (!Ok()) return; - -#ifdef USE_GDK_IMLIB - - gdk_imlib_render( M_BMPDATA->m_image, M_BMPDATA->m_image->rgb_width, M_BMPDATA->m_image->rgb_height ); - M_BMPDATA->m_width = M_BMPDATA->m_image->rgb_width; - M_BMPDATA->m_height = M_BMPDATA->m_image->rgb_height; - M_BMPDATA->m_pixmap = gdk_imlib_move_image( M_BMPDATA->m_image ); - GdkBitmap *mask = gdk_imlib_move_mask( M_BMPDATA->m_image ); - if (mask) - { - M_BMPDATA->m_mask = new wxMask(); - M_BMPDATA->m_mask->m_bitmap = mask; - } - -#endif -} - - diff --git a/src/gtk/bmpbuttn.cpp b/src/gtk/bmpbuttn.cpp deleted file mode 100644 index d72416a63c..0000000000 --- a/src/gtk/bmpbuttn.cpp +++ /dev/null @@ -1,126 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bmpbuttn.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "bmpbuttn.h" -#endif - -#include "wx/bmpbuttn.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxBitmapButton; - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxBitmapButton -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton,wxControl) - -static void gtk_bmpbutton_clicked_callback( GtkWidget *WXUNUSED(widget), wxBitmapButton *button ) -{ - if (!button->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId()); - event.SetEventObject(button); - button->GetEventHandler()->ProcessEvent(event); -} - -//----------------------------------------------------------------------------- - -wxBitmapButton::wxBitmapButton(void) -{ -} - -bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, - const wxPoint &pos, const wxSize &size, - long style, const wxValidator& validator, const wxString &name ) -{ - m_needParent = TRUE; - - wxSize newSize = size; - - PreCreation( parent, id, pos, newSize, style, name ); - - SetValidator( validator ); - - m_bitmap = bitmap; - m_label = ""; - - m_widget = gtk_button_new(); - - if (m_bitmap.Ok()) - { - GdkBitmap *mask = (GdkBitmap *) NULL; - if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); - GtkWidget *pixmap = gtk_pixmap_new( m_bitmap.GetPixmap(), mask ); - - gtk_widget_show( pixmap ); - gtk_container_add( GTK_CONTAINER(m_widget), pixmap ); - } - - if (newSize.x == -1) newSize.x = m_bitmap.GetHeight()+10; - if (newSize.y == -1) newSize.y = m_bitmap.GetWidth()+10; - SetSize( newSize.x, newSize.y ); - - gtk_signal_connect( GTK_OBJECT(m_widget), "clicked", - GTK_SIGNAL_FUNC(gtk_bmpbutton_clicked_callback), (gpointer*)this ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -void wxBitmapButton::SetDefault(void) -{ -/* - GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT ); - gtk_widget_grab_default( m_widget ); -*/ -} - -void wxBitmapButton::SetLabel( const wxString &label ) -{ - wxControl::SetLabel( label ); -} - -wxString wxBitmapButton::GetLabel(void) const -{ - return wxControl::GetLabel(); -} - -void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap ) -{ - m_bitmap = bitmap; - if (!m_bitmap.Ok()) return; - - GtkButton *bin = GTK_BUTTON( m_widget ); - GtkPixmap *g_pixmap = GTK_PIXMAP( bin->child ); - - GdkBitmap *mask = (GdkBitmap *) NULL; - if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); - - gtk_pixmap_set( g_pixmap, m_bitmap.GetPixmap(), mask ); -} - - - - diff --git a/src/gtk/brush.cpp b/src/gtk/brush.cpp deleted file mode 100644 index 1229a9516e..0000000000 --- a/src/gtk/brush.cpp +++ /dev/null @@ -1,132 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: brush.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "brush.h" -#endif - -#include "wx/brush.h" - -//----------------------------------------------------------------------------- -// wxBrush -//----------------------------------------------------------------------------- - -class wxBrushRefData: public wxObjectRefData -{ - public: - - wxBrushRefData(void); - - int m_style; - wxBitmap m_stipple; - wxColour m_colour; -}; - -wxBrushRefData::wxBrushRefData(void) -{ - m_style = 0; -} - -//----------------------------------------------------------------------------- - -#define M_BRUSHDATA ((wxBrushRefData *)m_refData) - -IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject) - -wxBrush::wxBrush(void) -{ - if (wxTheBrushList) wxTheBrushList->AddBrush( this ); -} - -wxBrush::wxBrush( const wxColour &colour, int style ) -{ - m_refData = new wxBrushRefData(); - M_BRUSHDATA->m_style = style; - M_BRUSHDATA->m_colour = colour; - - if (wxTheBrushList) wxTheBrushList->AddBrush( this ); -} - -wxBrush::wxBrush( const wxString &colourName, int style ) -{ - m_refData = new wxBrushRefData(); - M_BRUSHDATA->m_style = style; - M_BRUSHDATA->m_colour = colourName; - - if (wxTheBrushList) wxTheBrushList->AddBrush( this ); -} - -wxBrush::wxBrush( const wxBitmap &stippleBitmap ) -{ - m_refData = new wxBrushRefData(); - M_BRUSHDATA->m_style = wxSTIPPLE; - M_BRUSHDATA->m_colour = *wxBLACK; - M_BRUSHDATA->m_stipple = stippleBitmap; - - if (wxTheBrushList) wxTheBrushList->AddBrush( this ); -} - -wxBrush::wxBrush( const wxBrush &brush ) -{ - Ref( brush ); - - if (wxTheBrushList) wxTheBrushList->AddBrush( this ); -} - -wxBrush::wxBrush( const wxBrush *brush ) -{ - if (brush) Ref( *brush ); - - if (wxTheBrushList) wxTheBrushList->Append( this ); -} - -wxBrush::~wxBrush(void) -{ - if (wxTheBrushList) wxTheBrushList->RemoveBrush( this ); -} - -wxBrush& wxBrush::operator = ( const wxBrush& brush ) -{ - if (*this == brush) return (*this); - Ref( brush ); - return *this; -} - -bool wxBrush::operator == ( const wxBrush& brush ) -{ - return m_refData == brush.m_refData; -} - -bool wxBrush::operator != ( const wxBrush& brush ) -{ - return m_refData != brush.m_refData; -} - -bool wxBrush::Ok(void) const -{ - return ((m_refData) && M_BRUSHDATA->m_colour.Ok()); -} - -int wxBrush::GetStyle(void) const -{ - return M_BRUSHDATA->m_style; -} - -wxColour &wxBrush::GetColour(void) const -{ - return M_BRUSHDATA->m_colour; -} - -wxBitmap *wxBrush::GetStipple(void) const -{ - return &M_BRUSHDATA->m_stipple; -} - - diff --git a/src/gtk/button.cpp b/src/gtk/button.cpp deleted file mode 100644 index 066c92a17a..0000000000 --- a/src/gtk/button.cpp +++ /dev/null @@ -1,103 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: button.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "button.h" -#endif - -#include "wx/button.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxButton; - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxButton -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxButton,wxControl) - -static void gtk_button_clicked_callback( GtkWidget *WXUNUSED(widget), wxButton *button ) -{ - if (!button->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId()); - event.SetEventObject(button); - button->GetEventHandler()->ProcessEvent(event); -} - -//----------------------------------------------------------------------------- - -wxButton::wxButton(void) -{ -} - -bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label, - const wxPoint &pos, const wxSize &size, - long style, const wxValidator& validator, const wxString &name ) -{ - m_needParent = TRUE; - - wxSize newSize = size; - - PreCreation( parent, id, pos, newSize, style, name ); - - SetValidator( validator ); - - m_widget = gtk_button_new_with_label( m_label ); - SetLabel(label); - - if (newSize.x == -1) newSize.x = 15+gdk_string_measure( m_widget->style->font, label ); - if (newSize.y == -1) newSize.y = 26; - SetSize( newSize.x, newSize.y ); - - gtk_signal_connect( GTK_OBJECT(m_widget), "clicked", - GTK_SIGNAL_FUNC(gtk_button_clicked_callback), (gpointer*)this ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -void wxButton::SetDefault(void) -{ -/* - GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT ); - gtk_widget_grab_default( m_widget ); -*/ -} - -void wxButton::SetLabel( const wxString &label ) -{ - wxControl::SetLabel( label ); - GtkButton *bin = GTK_BUTTON( m_widget ); - GtkLabel *g_label = GTK_LABEL( bin->child ); - gtk_label_set( g_label, GetLabel() ); -} - -void wxButton::Enable( bool enable ) -{ - wxControl::Enable( enable ); - GtkButton *bin = GTK_BUTTON( m_widget ); - GtkWidget *label = bin->child; - gtk_widget_set_sensitive( label, enable ); -} - diff --git a/src/gtk/cdiag.xbm b/src/gtk/cdiag.xbm deleted file mode 100644 index 15dc7ba86d..0000000000 --- a/src/gtk/cdiag.xbm +++ /dev/null @@ -1,6 +0,0 @@ -#define cdiag_width 16 -#define cdiag_height 16 -static char cdiag_bits[] = { - 0x81, 0x81, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, 0x18, 0x18, 0x24, 0x24, - 0x42, 0x42, 0x81, 0x81, 0x81, 0x81, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, - 0x18, 0x18, 0x24, 0x24, 0x42, 0x42, 0x81, 0x81}; diff --git a/src/gtk/checkbox.cpp b/src/gtk/checkbox.cpp deleted file mode 100644 index 036a1dbcde..0000000000 --- a/src/gtk/checkbox.cpp +++ /dev/null @@ -1,89 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: checkbox.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "checkbox.h" -#endif - -#include "wx/checkbox.h" - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxCheckBox -//----------------------------------------------------------------------------- - -static void gtk_checkbox_clicked_callback( GtkWidget *WXUNUSED(widget), wxCheckBox *cb ) -{ - if (!cb->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - wxCommandEvent event(wxEVT_COMMAND_CHECKBOX_CLICKED, cb->GetId()); - event.SetInt( cb->GetValue() ); - event.SetEventObject(cb); - cb->GetEventHandler()->ProcessEvent(event); -} - -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxCheckBox,wxControl) - -wxCheckBox::wxCheckBox(void) -{ -} - -bool wxCheckBox::Create( wxWindow *parent, wxWindowID id, const wxString &label, - const wxPoint &pos, const wxSize &size, - long style, const wxValidator& validator, const wxString &name ) -{ - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - SetValidator( validator ); - - SetLabel( label ); - - m_widget = gtk_check_button_new_with_label( m_label ); - - wxSize newSize = size; - if (newSize.x == -1) newSize.x = 25+gdk_string_measure( m_widget->style->font, label ); - if (newSize.y == -1) newSize.y = 26; - SetSize( newSize.x, newSize.y ); - - gtk_signal_connect( GTK_OBJECT(m_widget), "clicked", - GTK_SIGNAL_FUNC(gtk_checkbox_clicked_callback), (gpointer*)this ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -void wxCheckBox::SetValue( bool state ) -{ - if (state) - gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_widget), GTK_STATE_ACTIVE ); - else - gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_widget), GTK_STATE_NORMAL ); -} - -bool wxCheckBox::GetValue(void) const -{ - GtkToggleButton *tb = GTK_TOGGLE_BUTTON(m_widget); - return tb->active; -} - diff --git a/src/gtk/choice.cpp b/src/gtk/choice.cpp deleted file mode 100644 index 4fec00cb30..0000000000 --- a/src/gtk/choice.cpp +++ /dev/null @@ -1,227 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: choice.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "choice.h" -#endif - -#include "wx/choice.h" - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxChoice -//----------------------------------------------------------------------------- - -static void gtk_choice_clicked_callback( GtkWidget *WXUNUSED(widget), wxChoice *choice ) -{ - if (!choice->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, choice->GetId() ); - event.SetInt( choice->GetSelection() ); - wxString tmp( choice->GetStringSelection() ); - event.SetString( WXSTRINGCAST(tmp) ); - event.SetEventObject(choice); - choice->GetEventHandler()->ProcessEvent(event); -} - -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxChoice,wxControl) - -wxChoice::wxChoice(void) -{ -} - -bool wxChoice::Create( wxWindow *parent, wxWindowID id, - const wxPoint &pos, const wxSize &size, - int n, const wxString choices[], - long style, const wxValidator& validator, const wxString &name ) -{ - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - SetValidator( validator ); - - m_widget = gtk_option_menu_new(); - - wxSize newSize = size; - if (newSize.x == -1) newSize.x = 80; - if (newSize.y == -1) newSize.y = 26; - SetSize( newSize.x, newSize.y ); - - GtkWidget *menu; - menu = gtk_menu_new(); - - for (int i = 0; i < n; i++) - { - GtkWidget *item; - item = gtk_menu_item_new_with_label( choices[i] ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", - GTK_SIGNAL_FUNC(gtk_choice_clicked_callback), (gpointer*)this ); - gtk_menu_append( GTK_MENU(menu), item ); - gtk_widget_show( item ); - } - gtk_option_menu_set_menu( GTK_OPTION_MENU(m_widget), menu ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -void wxChoice::Append( const wxString &item ) -{ - GtkWidget *menu = gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ); - GtkWidget *menu_item; - menu_item = gtk_menu_item_new_with_label( item ); - gtk_signal_connect( GTK_OBJECT( menu_item ), "activate", - GTK_SIGNAL_FUNC(gtk_choice_clicked_callback), (gpointer*)this ); - gtk_menu_append( GTK_MENU(menu), menu_item ); - gtk_widget_show( menu_item ); -} - -void wxChoice::Clear(void) -{ - gtk_option_menu_remove_menu( GTK_OPTION_MENU(m_widget) ); - GtkWidget *menu = gtk_menu_new(); - gtk_option_menu_set_menu( GTK_OPTION_MENU(m_widget), menu ); -} - -void wxChoice::Delete( int WXUNUSED(n) ) -{ - wxFAIL_MSG( "wxChoice:Delete not implemented" ); -} - -int wxChoice::FindString( const wxString &string ) const -{ - // If you read this code once and you think you understand - // it, then you are very wrong. Robert Roebling. - - GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) ); - int count = 0; - GList *child = menu_shell->children; - while (child) - { - GtkBin *bin = GTK_BIN( child->data ); - GtkLabel *label = (GtkLabel *) NULL; - if (bin->child) label = GTK_LABEL(bin->child); - - wxASSERT_MSG( label != NULL , "wxChoice: invalid label" ); - - if (!label) label = GTK_LABEL( GTK_BUTTON(m_widget)->child ); - if (string == label->label) return count; - child = child->next; - count++; - } - - wxFAIL_MSG( "wxChoice: string not found" ); - - return -1; -} - -int wxChoice::GetColumns(void) const -{ - return 1; -} - -int wxChoice::GetSelection(void) -{ - GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) ); - int count = 0; - GList *child = menu_shell->children; - while (child) - { - GtkBin *bin = GTK_BIN( child->data ); - if (!bin->child) return count; - child = child->next; - count++; - } - - wxFAIL_MSG( "wxChoice: no selection" ); - - return -1; -} - -wxString wxChoice::GetString( int n ) const -{ - GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) ); - int count = 0; - GList *child = menu_shell->children; - while (child) - { - GtkBin *bin = GTK_BIN( child->data ); - if (count == n) - { - GtkLabel *label = (GtkLabel *) NULL; - if (bin->child) label = GTK_LABEL(bin->child); - - wxASSERT_MSG( label != NULL , "wxChoice: invalid label" ); - - if (!label) label = GTK_LABEL( GTK_BUTTON(m_widget)->child ); - return label->label; - } - child = child->next; - count++; - } - - wxFAIL_MSG( "wxChoice: string not found" ); - - return ""; -} - -wxString wxChoice::GetStringSelection(void) const -{ - GtkLabel *label = GTK_LABEL( GTK_BUTTON(m_widget)->child ); - - wxASSERT_MSG( label != NULL , "wxChoice: invalid label" ); - - return label->label; -} - -int wxChoice::Number(void) const -{ - GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) ); - int count = 0; - GList *child = menu_shell->children; - while (child) - { - count++; - child = child->next; - } - return count; -} - -void wxChoice::SetColumns( int WXUNUSED(n) ) -{ -} - -void wxChoice::SetSelection( int n ) -{ - int tmp = n; - gtk_option_menu_set_history( GTK_OPTION_MENU(m_widget), (gint)tmp ); - - gtk_choice_clicked_callback( (GtkWidget *) NULL, this ); -} - -void wxChoice::SetStringSelection( const wxString &string ) -{ - int n = FindString( string ); - if (n != -1) SetSelection( n ); -} - diff --git a/src/gtk/colour.cpp b/src/gtk/colour.cpp deleted file mode 100644 index f9d2fa62a2..0000000000 --- a/src/gtk/colour.cpp +++ /dev/null @@ -1,227 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: colour.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "colour.h" -#endif - -#include "wx/gdicmn.h" - -#ifdef USE_GDK_IMLIB -#include "../gdk_imlib/gdk_imlib.h" -#endif - -//----------------------------------------------------------------------------- -// wxColour -//----------------------------------------------------------------------------- - -class wxColourRefData: public wxObjectRefData -{ - public: - - wxColourRefData(void); - ~wxColourRefData(void); - void FreeColour(void); - - GdkColor m_color; - GdkColormap *m_colormap; - bool m_hasPixel; - - friend wxColour; -}; - -wxColourRefData::wxColourRefData(void) -{ - m_color.red = 0; - m_color.green = 0; - m_color.blue = 0; - m_color.pixel = 0; - m_colormap = (GdkColormap *) NULL; - m_hasPixel = FALSE; -} - -wxColourRefData::~wxColourRefData(void) -{ - FreeColour(); -} - -void wxColourRefData::FreeColour(void) -{ -// if (m_hasPixel) gdk_colors_free( m_colormap, &m_color, 1, 0 ); -} - -//----------------------------------------------------------------------------- - -#define M_COLDATA ((wxColourRefData *)m_refData) - -#define SHIFT (8*(sizeof(short int)-sizeof(char))) - -IMPLEMENT_DYNAMIC_CLASS(wxColour,wxGDIObject) - -wxColour::wxColour(void) -{ -} - -wxColour::wxColour( char red, char green, char blue ) -{ - m_refData = new wxColourRefData(); - M_COLDATA->m_color.red = ((unsigned short)red) << SHIFT; - M_COLDATA->m_color.green = ((unsigned short)green) << SHIFT; - M_COLDATA->m_color.blue = ((unsigned short)blue) << SHIFT; - M_COLDATA->m_color.pixel = 0; -} - -wxColour::wxColour( const wxString &colourName ) -{ - wxNode *node = (wxNode *) NULL; - if ( (wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) ) - { - wxColour *col = (wxColour*)node->Data(); - UnRef(); - if (col) Ref( *col ); - } - else - { - m_refData = new wxColourRefData(); - if (!gdk_color_parse( colourName, &M_COLDATA->m_color )) - { - wxFAIL_MSG( "wxColour: couldn't find colour" ); - delete m_refData; - m_refData = (wxObjectRefData *) NULL; - } - } -} - -wxColour::wxColour( const wxColour& col ) -{ - Ref( col ); -} - -wxColour::wxColour( const wxColour* col ) -{ - if (col) Ref( *col ); -} - -wxColour::~wxColour(void) -{ -} - -wxColour& wxColour::operator = ( const wxColour& col ) -{ - if (*this == col) return (*this); - Ref( col ); - return *this; -} - -wxColour& wxColour::operator = ( const wxString& colourName ) -{ - UnRef(); - wxNode *node = (wxNode *) NULL; - if ((wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) ) - { - wxColour *col = (wxColour*)node->Data(); - if (col) Ref( *col ); - } - else - { - m_refData = new wxColourRefData(); - if (!gdk_color_parse( colourName, &M_COLDATA->m_color )) - { - wxFAIL_MSG( "wxColour: couldn't find colour" ); - delete m_refData; - m_refData = (wxObjectRefData *) NULL; - } - } - return *this; -} - -bool wxColour::operator == ( const wxColour& col ) -{ - return m_refData == col.m_refData; -} - -bool wxColour::operator != ( const wxColour& col) -{ - return m_refData != col.m_refData; -} - -void wxColour::Set( const unsigned char red, const unsigned char green, const unsigned char blue ) -{ - UnRef(); - m_refData = new wxColourRefData(); - M_COLDATA->m_color.red = ((unsigned short)red) << SHIFT; - M_COLDATA->m_color.green = ((unsigned short)green) << SHIFT; - M_COLDATA->m_color.blue = ((unsigned short)blue) << SHIFT; - M_COLDATA->m_color.pixel = 0; -} - -unsigned char wxColour::Red(void) const -{ - if (!Ok()) return 0; - return (unsigned char)(M_COLDATA->m_color.red >> SHIFT); -} - -unsigned char wxColour::Green(void) const -{ - if (!Ok()) return 0; - return (unsigned char)(M_COLDATA->m_color.green >> SHIFT); -} - -unsigned char wxColour::Blue(void) const -{ - if (!Ok()) return 0; - return (unsigned char)(M_COLDATA->m_color.blue >> SHIFT); -} - -bool wxColour::Ok(void) const -{ - return (m_refData); -} - -void wxColour::CalcPixel( GdkColormap *cmap ) -{ - if (!Ok()) return; - - if ((M_COLDATA->m_hasPixel) && (M_COLDATA->m_colormap == cmap)) return; - M_COLDATA->FreeColour(); - -#ifdef USE_GDK_IMLIB - - int r = M_COLDATA->m_color.red >> SHIFT; - int g = M_COLDATA->m_color.green >> SHIFT; - int b = M_COLDATA->m_color.blue >> SHIFT; - M_COLDATA->m_hasPixel = TRUE; - M_COLDATA->m_color.pixel = gdk_imlib_best_color_match( &r, &g, &b ); - -#else - - M_COLDATA->m_hasPixel = gdk_color_alloc( cmap, &M_COLDATA->m_color ); - -#endif - - M_COLDATA->m_colormap = cmap; -} - -int wxColour::GetPixel(void) -{ - if (!Ok()) return 0; - - return M_COLDATA->m_color.pixel; -} - -GdkColor *wxColour::GetColor(void) -{ - if (!Ok()) return (GdkColor *) NULL; - - return &M_COLDATA->m_color; -} - - diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp deleted file mode 100644 index 302cf3abda..0000000000 --- a/src/gtk/combobox.cpp +++ /dev/null @@ -1,378 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: combobox.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "combobox.h" -#endif - -#include "wx/combobox.h" -#include - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxComboBox -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// clicked - -static void gtk_combo_clicked_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo ) -{ - if (!combo->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - if (combo->m_alreadySent) - { - combo->m_alreadySent = FALSE; - return; - } - - combo->m_alreadySent = TRUE; - - wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, combo->GetId()); - event.SetInt( combo->GetSelection() ); - wxString tmp( combo->GetStringSelection() ); - event.SetString( WXSTRINGCAST(tmp) ); - event.SetEventObject(combo); - combo->GetEventHandler()->ProcessEvent(event); -} - -//----------------------------------------------------------------------------- -// size - -/* -static gint gtk_combo_size_callback( GtkCombo *widget, GtkAllocation* alloc, wxComboBox *win ) -{ - if (!win->HasVMT()) return FALSE; - if (g_blockEventsOnDrag) return FALSE; - if (!widget->button) return FALSE; - - widget->button->allocation.x = - alloc->width - widget->button->allocation.width; - - return FALSE; -} -*/ - -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxComboBox,wxControl) - -bool wxComboBox::Create(wxWindow *parent, wxWindowID id, const wxString& value, - const wxPoint& pos, const wxSize& size, - int n, const wxString choices[], - long style, const wxValidator& validator, const wxString& name ) -{ - m_alreadySent = FALSE; - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - SetValidator( validator ); - - m_widget = gtk_combo_new(); - - wxSize newSize = size; - if (newSize.x == -1) newSize.x = 100; - if (newSize.y == -1) newSize.y = 26; - SetSize( newSize.x, newSize.y ); - - GtkWidget *list = GTK_COMBO(m_widget)->list; - - for (int i = 0; i < n; i++) - { - GtkWidget *list_item; - list_item = gtk_list_item_new_with_label( choices[i] ); - - gtk_container_add( GTK_CONTAINER(list), list_item ); - - m_clientData.Append( (wxObject*)NULL ); - - gtk_widget_show( list_item ); - - gtk_signal_connect( GTK_OBJECT(list_item), "select", - GTK_SIGNAL_FUNC(gtk_combo_clicked_callback), (gpointer)this ); - } - - PostCreation(); - -/* - gtk_signal_connect( GTK_OBJECT(m_widget), "size_allocate", - GTK_SIGNAL_FUNC(gtk_combo_size_callback), (gpointer)this ); -*/ - - if (!value.IsNull()) SetValue( value ); - - Show( TRUE ); - - return TRUE; -} - -void wxComboBox::Clear(void) -{ - GtkWidget *list = GTK_COMBO(m_widget)->list; - gtk_list_clear_items( GTK_LIST(list), 0, Number() ); - - m_clientData.Clear(); -} - -void wxComboBox::Append( const wxString &item ) -{ - Append( item, (char*)NULL ); -} - -void wxComboBox::Append( const wxString &item, char *clientData ) -{ - GtkWidget *list = GTK_COMBO(m_widget)->list; - - GtkWidget *list_item; - list_item = gtk_list_item_new_with_label( item ); - - gtk_signal_connect( GTK_OBJECT(list_item), "select", - GTK_SIGNAL_FUNC(gtk_combo_clicked_callback), (gpointer)this ); - - m_clientData.Append( (wxObject*)clientData ); - - gtk_container_add( GTK_CONTAINER(list), list_item ); - - gtk_widget_show( list_item ); -} - -void wxComboBox::Delete( int n ) -{ - GtkList *listbox = GTK_LIST( GTK_COMBO(m_widget)->list ); - - GList *child = g_list_nth( listbox->children, n ); - - if (!child) - { - wxFAIL_MSG("wrong index"); - return; - } - - GList *list = g_list_append( NULL, child->data ); - gtk_list_remove_items( listbox, list ); - g_list_free( list ); - - wxNode *node = m_clientData.Nth( n ); - if (!node) - { - wxFAIL_MSG( "wrong index" ); - } - else - m_clientData.DeleteNode( node ); -} - -int wxComboBox::FindString( const wxString &item ) -{ - GtkWidget *list = GTK_COMBO(m_widget)->list; - - GList *child = GTK_LIST(list)->children; - int count = 0; - while (child) - { - GtkBin *bin = GTK_BIN( child->data ); - GtkLabel *label = GTK_LABEL( bin->child ); - if (item == label->label) return count; - count++; - child = child->next; - } - - wxFAIL_MSG( "wxComboBox: string not found" ); - - return -1; -} - -char* wxComboBox::GetClientData( int n ) -{ - wxNode *node = m_clientData.Nth( n ); - if (node) return (char*)node->Data(); - - wxFAIL_MSG( "wxComboBox: wrong index" ); - - return (char *) NULL; -} - -void wxComboBox::SetClientData( int n, char * clientData ) -{ - wxNode *node = m_clientData.Nth( n ); - if (node) node->SetData( (wxObject*) clientData ); - - wxFAIL_MSG( "wxComboBox: wrong index" ); -} - -int wxComboBox::GetSelection(void) const -{ - GtkWidget *list = GTK_COMBO(m_widget)->list; - - GList *selection = GTK_LIST(list)->selection; - if (selection) - { - GList *child = GTK_LIST(list)->children; - int count = 0; - while (child) - { - if (child->data == selection->data) return count; - count++; - child = child->next; - } - } - - wxFAIL_MSG( "wxComboBox: no selection" ); - - return -1; -} - -wxString wxComboBox::GetString( int n ) const -{ - GtkWidget *list = GTK_COMBO(m_widget)->list; - - GList *child = g_list_nth( GTK_LIST(list)->children, n ); - if (child) - { - GtkBin *bin = GTK_BIN( child->data ); - GtkLabel *label = GTK_LABEL( bin->child ); - return label->label; - } - - wxFAIL_MSG( "wxComboBox: wrong index" ); - - return ""; -} - -wxString wxComboBox::GetStringSelection(void) const -{ - GtkWidget *list = GTK_COMBO(m_widget)->list; - - GList *selection = GTK_LIST(list)->selection; - if (selection) - { - GtkBin *bin = GTK_BIN( selection->data ); - wxString tmp = GTK_LABEL( bin->child )->label; - return tmp; - } - - wxFAIL_MSG( "wxComboBox: no selection" ); - - return ""; -} - -int wxComboBox::Number(void) const -{ - GtkWidget *list = GTK_COMBO(m_widget)->list; - - GList *child = GTK_LIST(list)->children; - int count = 0; - while (child) { count++; child = child->next; } - return count; -} - -void wxComboBox::SetSelection( int n ) -{ - GtkWidget *list = GTK_COMBO(m_widget)->list; - gtk_list_select_item( GTK_LIST(list), n ); -} - -void wxComboBox::SetStringSelection( const wxString &string ) -{ - int res = FindString( string ); - if (res == -1) return; - SetSelection( res ); -} - -wxString wxComboBox::GetValue(void) const -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - wxString tmp = gtk_entry_get_text( GTK_ENTRY(entry) ); - return tmp; -} - -void wxComboBox::SetValue( const wxString& value ) -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - wxString tmp = ""; - if (!value.IsNull()) tmp = value; - gtk_entry_set_text( GTK_ENTRY(entry), tmp ); -} - -void wxComboBox::Copy(void) -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - gtk_editable_copy_clipboard( GTK_EDITABLE(entry), 0 ); -} - -void wxComboBox::Cut(void) -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - gtk_editable_cut_clipboard( GTK_EDITABLE(entry), 0 ); -} - -void wxComboBox::Paste(void) -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - gtk_editable_paste_clipboard( GTK_EDITABLE(entry), 0 ); -} - -void wxComboBox::SetInsertionPoint( long pos ) -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - int tmp = (int) pos; - gtk_entry_set_position( GTK_ENTRY(entry), tmp ); -} - -void wxComboBox::SetInsertionPointEnd(void) -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - int pos = GTK_ENTRY(entry)->text_length; - SetInsertionPoint( pos-1 ); -} - -long wxComboBox::GetInsertionPoint(void) const -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - return (long) GTK_EDITABLE(entry)->current_pos; -} - -long wxComboBox::GetLastPosition(void) const -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - int pos = GTK_ENTRY(entry)->text_length; - return (long) pos-1; -} - -void wxComboBox::Replace( long from, long to, const wxString& value ) -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - gtk_editable_delete_text( GTK_EDITABLE(entry), (gint)from, (gint)to ); - if (value.IsNull()) return; - gint pos = (gint)to; - gtk_editable_insert_text( GTK_EDITABLE(entry), value, value.Length(), &pos ); -} - -void wxComboBox::Remove(long from, long to) -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - gtk_editable_delete_text( GTK_EDITABLE(entry), (gint)from, (gint)to ); -} - -void wxComboBox::SetSelection( long WXUNUSED(from), long WXUNUSED(to) ) -{ -} - -void wxComboBox::SetEditable( bool WXUNUSED(editable) ) -{ -} - - diff --git a/src/gtk/control.cpp b/src/gtk/control.cpp deleted file mode 100644 index 61bab59ecf..0000000000 --- a/src/gtk/control.cpp +++ /dev/null @@ -1,61 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: control.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "control.h" -#endif - -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// wxControl -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxControl,wxWindow) - -wxControl::wxControl(void) -{ - m_needParent = TRUE; -} - -wxControl::wxControl( wxWindow *parent, wxWindowID id, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) : - wxWindow( parent, id, pos, size, style, name ) -{ -} - -void wxControl::Command( wxCommandEvent &WXUNUSED(event) ) -{ -} - -void wxControl::SetLabel( const wxString &label ) -{ - m_label = ""; - for ( const char *pc = label; *pc != '\0'; pc++ ) { - if ( *pc == '&' ) { - pc++; // skip it -#if 0 // it would be unused anyhow for now - kbd interface not done yet - if ( *pc != '&' ) - m_chAccel = *pc; -#endif - } - - m_label << *pc; - } -} - -wxString wxControl::GetLabel(void) const -{ - return m_label; -} - - - diff --git a/src/gtk/cross.xbm b/src/gtk/cross.xbm deleted file mode 100644 index b07cbe7fcd..0000000000 --- a/src/gtk/cross.xbm +++ /dev/null @@ -1,6 +0,0 @@ -#define cross_width 15 -#define cross_height 15 -static char cross_bits[] = { - 0x84, 0x10, 0x84, 0x10, 0xff, 0x7f, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, - 0x84, 0x10, 0xff, 0x7f, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, - 0xff, 0x7f, 0x84, 0x10, 0x84, 0x10}; diff --git a/src/gtk/cursor.cpp b/src/gtk/cursor.cpp deleted file mode 100644 index 6b9fd7f642..0000000000 --- a/src/gtk/cursor.cpp +++ /dev/null @@ -1,173 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: cursor.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "cursor.h" -#endif - -#include "wx/cursor.h" - -//----------------------------------------------------------------------------- -// wxCursor -//----------------------------------------------------------------------------- - -class wxCursorRefData: public wxObjectRefData -{ - public: - - wxCursorRefData(void); - ~wxCursorRefData(void); - - GdkCursor *m_cursor; -}; - -wxCursorRefData::wxCursorRefData(void) -{ - m_cursor = (GdkCursor *) NULL; -} - -wxCursorRefData::~wxCursorRefData(void) -{ - if (m_cursor) gdk_cursor_destroy( m_cursor ); -} - -//----------------------------------------------------------------------------- - -#define M_CURSORDATA ((wxCursorRefData *)m_refData) - -IMPLEMENT_DYNAMIC_CLASS(wxCursor,wxObject) - -wxCursor::wxCursor(void) -{ -} - -wxCursor::wxCursor( int cursorId ) -{ - m_refData = new wxCursorRefData(); - - GdkCursorType gdk_cur = GDK_LEFT_PTR; - switch (cursorId) - { - case wxCURSOR_HAND: gdk_cur = GDK_HAND1; break; - case wxCURSOR_CROSS: gdk_cur = GDK_CROSSHAIR; break; - case wxCURSOR_SIZEWE: gdk_cur = GDK_SB_H_DOUBLE_ARROW; break; - case wxCURSOR_SIZENS: gdk_cur = GDK_SB_V_DOUBLE_ARROW; break; - case wxCURSOR_WAIT: gdk_cur = GDK_WATCH; break; - case wxCURSOR_WATCH: gdk_cur = GDK_WATCH; break; - case wxCURSOR_SIZING: gdk_cur = GDK_SIZING; break; - case wxCURSOR_SPRAYCAN: gdk_cur = GDK_SPRAYCAN; break; - case wxCURSOR_IBEAM: gdk_cur = GDK_XTERM; break; - case wxCURSOR_PENCIL: gdk_cur = GDK_PENCIL; break; - case wxCURSOR_NO_ENTRY: gdk_cur = GDK_PIRATE; break; - } - - M_CURSORDATA->m_cursor = gdk_cursor_new( gdk_cur ); - -/* - do that yourself - - wxCURSOR_BULLSEYE, - wxCURSOR_CHAR, - wxCURSOR_LEFT_BUTTON, - wxCURSOR_MAGNIFIER, - wxCURSOR_MIDDLE_BUTTON, - wxCURSOR_NO_ENTRY, - wxCURSOR_PAINT_BRUSH, - wxCURSOR_POINT_LEFT, - wxCURSOR_POINT_RIGHT, - wxCURSOR_QUESTION_ARROW, - wxCURSOR_RIGHT_BUTTON, - wxCURSOR_SIZENESW, - wxCURSOR_SIZENS, - wxCURSOR_SIZENWSE, - wxCURSOR_SIZEWE, - wxCURSOR_BLANK -, - wxCURSOR_CROSS_REVERSE, - wxCURSOR_DOUBLE_ARROW, - wxCURSOR_BASED_ARROW_UP, - wxCURSOR_BASED_ARROW_DOWN -*/ - -} - -wxCursor::wxCursor( const wxCursor &cursor ) -{ - Ref( cursor ); -} - -wxCursor::wxCursor( const wxCursor *cursor ) -{ - UnRef(); - if (cursor) Ref( *cursor ); -} - -wxCursor::~wxCursor(void) -{ -} - -wxCursor& wxCursor::operator = ( const wxCursor& cursor ) -{ - if (*this == cursor) return (*this); - Ref( cursor ); - return *this; -} - -bool wxCursor::operator == ( const wxCursor& cursor ) -{ - return m_refData == cursor.m_refData; -} - -bool wxCursor::operator != ( const wxCursor& cursor ) -{ - return m_refData != cursor.m_refData; -} - -bool wxCursor::Ok(void) const -{ - return TRUE; -} - -GdkCursor *wxCursor::GetCursor(void) const -{ - return M_CURSORDATA->m_cursor; -} - -//----------------------------------------------------------------------------- -// busy cursor routines -//----------------------------------------------------------------------------- - -bool g_isBusy = FALSE; - -void wxEndBusyCursor(void) -{ - g_isBusy = FALSE; -} - -void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) ) -{ - g_isBusy = TRUE; -} - -bool wxIsBusy(void) -{ - return g_isBusy; -} - -void wxSetCursor( const wxCursor& cursor ) -{ - extern wxCursor *g_globalCursor; - if (g_globalCursor) (*g_globalCursor) = cursor; - - if (cursor.Ok()) {} -} - - diff --git a/src/gtk/data.cpp b/src/gtk/data.cpp deleted file mode 100644 index 8e02841a18..0000000000 --- a/src/gtk/data.cpp +++ /dev/null @@ -1,724 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: data.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -// #pragma implementation -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/window.h" -#include "wx/dc.h" -#include "wx/accel.h" -#include "wx/postscrp.h" - -#define _MAXPATHLEN 500 - -// Used for X resources - -#include -#include -#include - -wxResourceCache *wxTheResourceCache = (wxResourceCache *) NULL; -XrmDatabase wxResourceDatabase; - -// Useful buffer, initialized in wxCommonInit -char *wxBuffer = (char *) NULL; - -// Windows List -wxList wxTopLevelWindows; - -// List of windows pending deletion -wxList wxPendingDelete; - -// Current cursor, in order to hang on to -// cursor handle when setting the cursor globally -wxCursor *g_globalCursor = (wxCursor *) NULL; - -// Don't allow event propagation during drag -bool g_blockEventsOnDrag = FALSE; - -// Message Strings for Internationalization -char **wx_msg_str = (char**)NULL; - -// Custom OS version, as optionally placed in wx.ini/.wxrc -// Currently this can be Win95, Windows, Win32s, WinNT. -// For some systems, you can't tell until run-time what services you -// have. See wxGetOsVersion, which uses this string if present. -char *wxOsVersion = (char *) NULL; - -// For printing several pages -int wxPageNumber; -wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL; - -// GDI Object Lists -wxBrushList *wxTheBrushList = (wxBrushList *) NULL; -wxPenList *wxThePenList = (wxPenList *) NULL; -wxFontList *wxTheFontList = (wxFontList *) NULL; -wxColourDatabase *wxTheColourDatabase = (wxColourDatabase *) NULL; -wxBitmapList *wxTheBitmapList = (wxBitmapList *) NULL; - - -// X only font names -wxFontNameDirectory *wxTheFontNameDirectory; - -// Stock objects -wxFont *wxNORMAL_FONT; -wxFont *wxSMALL_FONT; -wxFont *wxITALIC_FONT; -wxFont *wxSWISS_FONT; - -wxPen *wxRED_PEN; -wxPen *wxCYAN_PEN; -wxPen *wxGREEN_PEN; -wxPen *wxBLACK_PEN; -wxPen *wxWHITE_PEN; -wxPen *wxTRANSPARENT_PEN; -wxPen *wxBLACK_DASHED_PEN; -wxPen *wxGREY_PEN; -wxPen *wxMEDIUM_GREY_PEN; -wxPen *wxLIGHT_GREY_PEN; - -wxBrush *wxBLUE_BRUSH; -wxBrush *wxGREEN_BRUSH; -wxBrush *wxWHITE_BRUSH; -wxBrush *wxBLACK_BRUSH; -wxBrush *wxTRANSPARENT_BRUSH; -wxBrush *wxCYAN_BRUSH; -wxBrush *wxRED_BRUSH; -wxBrush *wxGREY_BRUSH; -wxBrush *wxMEDIUM_GREY_BRUSH; -wxBrush *wxLIGHT_GREY_BRUSH; - -wxColour *wxBLACK; -wxColour *wxWHITE; -wxColour *wxGREY; // Robert Roebling -wxColour *wxRED; -wxColour *wxBLUE; -wxColour *wxGREEN; -wxColour *wxCYAN; -wxColour *wxLIGHT_GREY; - -wxCursor *wxSTANDARD_CURSOR = (wxCursor *) NULL; -wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL; -wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL; - -// 'Null' objects -wxAcceleratorTable wxNullAcceleratorTable; -wxBitmap wxNullBitmap; -wxIcon wxNullIcon; -wxCursor wxNullCursor; -wxPen wxNullPen; -wxBrush wxNullBrush; -wxFont wxNullFont; -wxColour wxNullColour; -wxPalette wxNullPalette; - -// Default window names -const char *wxButtonNameStr = "button"; -const char *wxCanvasNameStr = "canvas"; -const char *wxCheckBoxNameStr = "check"; -const char *wxChoiceNameStr = "choice"; -const char *wxComboBoxNameStr = "comboBox"; -const char *wxDialogNameStr = "dialog"; -const char *wxFrameNameStr = "frame"; -const char *wxGaugeNameStr = "gauge"; -const char *wxStaticBoxNameStr = "groupBox"; -const char *wxListBoxNameStr = "listBox"; -const char *wxStaticTextNameStr = "message"; -const char *wxStaticBitmapNameStr = "message"; -const char *wxMultiTextNameStr = "multitext"; -const char *wxPanelNameStr = "panel"; -const char *wxRadioBoxNameStr = "radioBox"; -const char *wxRadioButtonNameStr = "radioButton"; -const char *wxBitmapRadioButtonNameStr = "radioButton"; -const char *wxScrollBarNameStr = "scrollBar"; -const char *wxSliderNameStr = "slider"; -const char *wxStaticNameStr = "static"; -const char *wxTextCtrlWindowNameStr = "textWindow"; -const char *wxTextCtrlNameStr = "text"; -const char *wxVirtListBoxNameStr = "virtListBox"; -const char *wxButtonBarNameStr = "buttonbar"; -const char *wxEnhDialogNameStr = "Shell"; -const char *wxToolBarNameStr = "toolbar"; -const char *wxStatusLineNameStr = "status_line"; -const char *wxEmptyString = ""; -const char *wxGetTextFromUserPromptStr = "Input Text"; -const char *wxMessageBoxCaptionStr = "Message"; -const char *wxFileSelectorPromptStr = "Select a file"; -const char *wxFileSelectorDefaultWildcardStr = "*.*"; -const char *wxInternalErrorStr = "wxWindows Internal Error"; -const char *wxFatalErrorStr = "wxWindows Fatal Error"; - -// See wx/utils.h -const char *wxFloatToStringStr = "%.2f"; -const char *wxDoubleToStringStr = "%.2f"; - -#ifdef wx_msw -const char *wxUserResourceStr = "TEXT"; -#endif - - -#if USE_SHARED_LIBRARY -/* - * For wxWindows to be made into a dynamic library (e.g. Sun), - * all IMPLEMENT_... macros must be in one place. - * But normally, the definitions are in the appropriate places. - */ - -// Hand-coded IMPLEMENT... macro for wxObject (define static data) -wxClassInfo wxObject::classwxObject((char *) "wxObject", (char *) NULL, (char *) NULL, (int ) sizeof(wxObject), (wxObjectConstructorFn) NULL); -wxClassInfo *wxClassInfo::first = (wxClassInfo *) NULL; -wxHashTable wxClassInfo::classTable(wxKEY_STRING); - -#include "wx/button.h" -#include "wx/bmpbuttn.h" -IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton) - -#include "wx/checkbox.h" -IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox) - -#include "wx/choice.h" -IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl) - -#if USE_CLIPBOARD -#include "wx/clipbrd.h" -IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject) -IMPLEMENT_ABSTRACT_CLASS(wxClipboardClient, wxObject) -#endif - -#if USE_COMBOBOX -#include "wx/combobox.h" -IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl) -#endif - -#include "wx/dc.h" -#include "wx/dcmemory.h" -#include "wx/dcclient.h" -#include "wx/dcscreen.h" -IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC) - -#if defined(wx_msw) -#include "wx/dcprint.h" -IMPLEMENT_CLASS(wxPrinterDC, wxDC) -#endif - -#include "wx/dialog.h" -IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxWindow) - -#include "wx/frame.h" -IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow) - -#include "wx/mdi.h" -IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame, wxFrame) -IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame, wxFrame) -IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxWindow) - -#include "wx/cmndata.h" -IMPLEMENT_DYNAMIC_CLASS(wxColourData, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxFontData, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxPrintData, wxObject) - -#include "wx/colordlg.h" -#include "wx/fontdlg.h" - -#if !defined(wx_msw) || USE_GENERIC_DIALOGS_IN_MSW -#include "wx/generic/colordlg.h" -#include "wx/generic/fontdlg.h" -IMPLEMENT_DYNAMIC_CLASS(wxGenericColourDialog, wxDialog) -IMPLEMENT_DYNAMIC_CLASS(wxGenericFontDialog, wxDialog) -#endif - -// X defines wxColourDialog to be wxGenericColourDialog -#ifndef wx_x -IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog) -IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog) -#endif - -#include "wx/gdicmn.h" -#include "wx/pen.h" -#include "wx/brush.h" -#include "wx/font.h" -#include "wx/palette.h" -#include "wx/icon.h" -#include "wx/cursor.h" - -IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject) -IMPLEMENT_CLASS(wxColourDatabase, wxList) -IMPLEMENT_DYNAMIC_CLASS(wxFontList, wxList) -IMPLEMENT_DYNAMIC_CLASS(wxPenList, wxList) -IMPLEMENT_DYNAMIC_CLASS(wxBrushList, wxList) -IMPLEMENT_DYNAMIC_CLASS(wxBitmapList, wxList) - -/* -#if (!USE_TYPEDEFS) -IMPLEMENT_DYNAMIC_CLASS(wxPoint, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxIntPoint, wxObject) -#endif -*/ - -#if defined(wx_x) || (defined(wx_msw) && USE_PORTABLE_FONTS_IN_MSW) -IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory, wxObject) -#endif - -#include "wx/hash.h" -IMPLEMENT_DYNAMIC_CLASS(wxHashTable, wxObject) - -#include "wx/help.h" -IMPLEMENT_DYNAMIC_CLASS(wxHelpInstance, wxClient) -IMPLEMENT_CLASS(wxHelpConnection, wxConnection) - -#include "wx/list.h" -IMPLEMENT_DYNAMIC_CLASS(wxNode, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxList, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxStringList, wxList) - -#if USE_PRINTING_ARCHITECTURE -#include "wx/print.h" -IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog, wxDialog) -IMPLEMENT_DYNAMIC_CLASS(wxPrinterBase, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter, wxPrinterBase) -IMPLEMENT_DYNAMIC_CLASS(wxWindowsPrinter, wxPrinterBase) -IMPLEMENT_ABSTRACT_CLASS(wxPrintout, wxObject) -IMPLEMENT_CLASS(wxPreviewCanvas, wxWindow) -IMPLEMENT_CLASS(wxPreviewControlBar, wxWindow) -IMPLEMENT_CLASS(wxPreviewFrame, wxFrame) -IMPLEMENT_CLASS(wxPrintPreviewBase, wxObject) -IMPLEMENT_CLASS(wxPostScriptPrintPreview, wxPrintPreviewBase) -IMPLEMENT_CLASS(wxWindowsPrintPreview, wxPrintPreviewBase) -IMPLEMENT_CLASS(wxGenericPrintDialog, wxDialog) -IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialog) -#endif - -#if USE_POSTSCRIPT -#include "wx/postscrp.h" -IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxPageSetupData, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase, wxList) -#endif - -#if USE_WX_RESOURCES -#include "wx/resource.h" -IMPLEMENT_DYNAMIC_CLASS(wxItemResource, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxResourceTable, wxHashTable) -#endif - -#include "wx/event.h" -IMPLEMENT_DYNAMIC_CLASS(wxEvtHandler, wxObject) -IMPLEMENT_ABSTRACT_CLASS(wxEvent, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxCommandEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxScrollEvent, wxCommandEvent) -IMPLEMENT_DYNAMIC_CLASS(wxMouseEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxKeyEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxSizeEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxPaintEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxEraseEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxMoveEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxFocusEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxCloseEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxMenuEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxJoystickEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxDropFilesEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxActivateEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxInitDialogEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxSysColourChangedEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxIdleEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxUpdateUIEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent, wxEvent) - -#include "wx/utils.h" -IMPLEMENT_DYNAMIC_CLASS(wxPathList, wxList) - -// IMPLEMENT_DYNAMIC_CLASS(wxRect, wxObject) - -#include "wx/process.h" -IMPLEMENT_DYNAMIC_CLASS(wxProcess, wxEvtHandler) - -#if USE_TIMEDATE -#include "wx/date.h" -IMPLEMENT_DYNAMIC_CLASS(wxDate, wxObject) -#endif - -#if USE_DOC_VIEW_ARCHITECTURE -#include "wx/docview.h" -//IMPLEMENT_ABSTRACT_CLASS(wxDocItem, wxObject) -IMPLEMENT_ABSTRACT_CLASS(wxDocument, wxEvtHandler) -IMPLEMENT_ABSTRACT_CLASS(wxView, wxEvtHandler) -IMPLEMENT_ABSTRACT_CLASS(wxDocTemplate, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxDocManager, wxEvtHandler) -IMPLEMENT_CLASS(wxDocChildFrame, wxFrame) -IMPLEMENT_CLASS(wxDocParentFrame, wxFrame) -#if USE_PRINTING_ARCHITECTURE -IMPLEMENT_DYNAMIC_CLASS(wxDocPrintout, wxPrintout) -#endif -IMPLEMENT_CLASS(wxCommand, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxFileHistory, wxObject) -#endif - -#if USE_CONSTRAINTS -#include "wx/layout.h" -IMPLEMENT_DYNAMIC_CLASS(wxIndividualLayoutConstraint, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxLayoutConstraints, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxSizer, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxRowColSizer, wxSizer) -#endif - -#if USE_TOOLBAR -#include "wx/tbarbase.h" -IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxToolBarBase, wxControl) - -#include "wx/tbarsmpl.h" -IMPLEMENT_DYNAMIC_CLASS(wxToolBarSimple, wxToolBarBase) - -#ifdef wx_msw -#include "wx/tbarmsw.h" -IMPLEMENT_DYNAMIC_CLASS(wxToolBarMSW, wxToolBarBase) - -#include "wx/tbar95.h" -IMPLEMENT_DYNAMIC_CLASS(wxToolBar95, wxToolBarBase) -#endif - -#endif - -#include "wx/statusbr.h" - -IMPLEMENT_DYNAMIC_CLASS(wxStatusBar, wxWindow) - -BEGIN_EVENT_TABLE(wxStatusBar, wxWindow) - EVT_PAINT(wxStatusBar::OnPaint) - EVT_SYS_COLOUR_CHANGED(wxStatusBar::OnSysColourChanged) -END_EVENT_TABLE() - -#if USE_TIMEDATE -#include "wx/time.h" -IMPLEMENT_DYNAMIC_CLASS(wxTime, wxObject) -#endif - -#if !USE_GNU_WXSTRING -#include "wx/string.h" -IMPLEMENT_DYNAMIC_CLASS(wxString, wxObject) -#endif - -#ifdef wx_motif -IMPLEMENT_DYNAMIC_CLASS(wxXColormap, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxXFont, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxXCursor, wxObject) -#endif -IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) -IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject) -IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject) -IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject) -IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap) -IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxBitmap) -IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject) -IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject) - -// This will presumably be implemented on other platforms too -#ifdef wx_msw -IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler, wxBitmapHandler) -IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler, wxBitmapHandler) -IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler, wxBitmapHandler) -IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler, wxBitmapHandler) -IMPLEMENT_DYNAMIC_CLASS(wxICOFileHandler, wxBitmapHandler) -IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler, wxBitmapHandler) -#endif - -#include "wx/statbox.h" -IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl) - -#if USE_IPC -#include "wx/dde.h" -IMPLEMENT_ABSTRACT_CLASS(wxDDEObject, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxDDEServer, wxDDEObject) -IMPLEMENT_DYNAMIC_CLASS(wxDDEClient, wxDDEObject) -IMPLEMENT_CLASS(wxDDEConnection, wxObject) -#endif - -IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow) - -#include "wx/listbox.h" -IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl) - -IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler) - -#include "wx/menu.h" -IMPLEMENT_DYNAMIC_CLASS(wxMenu, wxWindow) -IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxWindow) - -#include "wx/stattext.h" -#include "wx/statbmp.h" -IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl) - -#if USE_METAFILE -#include "wx/metafile.h" -IMPLEMENT_DYNAMIC_CLASS(wxMetaFile, wxObject) -IMPLEMENT_ABSTRACT_CLASS(wxMetaFileDC, wxDC) -#endif - -#include "wx/radiobox.h" -#include "wx/radiobut.h" -IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) - -IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl) -// IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton) - -#include "wx/scrolbar.h" -IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl) - -#if WXWIN_COMPATIBILITY -BEGIN_EVENT_TABLE(wxScrollBar, wxControl) - EVT_SCROLL(wxScrollBar::OnScroll) -END_EVENT_TABLE() -#endif - -#include "wx/slider.h" -IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl) - -#if WXWIN_COMPATIBILITY -BEGIN_EVENT_TABLE(wxSlider, wxControl) - EVT_SCROLL(wxSlider::OnScroll) -END_EVENT_TABLE() -#endif - -#include "wx/timer.h" -IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject) - -#include "wx/textctrl.h" -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) - -#include "wx/window.h" -IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxEvtHandler) - -#include "wx/scrolwin.h" -IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow, wxWindow) - -#include "wx/panel.h" -IMPLEMENT_DYNAMIC_CLASS(wxPanel, wxWindow) - -#include "wx/msgbxdlg.h" -#include "wx/textdlg.h" -#include "wx/filedlg.h" -#include "wx/dirdlg.h" -#include "wx/choicdlg.h" - -#if !defined(wx_msw) || USE_GENERIC_DIALOGS_IN_MSW -#include "wx/generic/msgdlgg.h" -IMPLEMENT_CLASS(wxGenericMessageDialog, wxDialog) -#endif - -IMPLEMENT_CLASS(wxTextEntryDialog, wxDialog) -IMPLEMENT_CLASS(wxSingleChoiceDialog, wxDialog) -IMPLEMENT_CLASS(wxFileDialog, wxDialog) -IMPLEMENT_CLASS(wxDirDialog, wxDialog) - -#ifdef wx_msw -IMPLEMENT_CLASS(wxMessageDialog) -#endif - -#if USE_GAUGE -#ifdef wx_motif -#include "../../contrib/xmgauge/gauge.h" -#endif -#include "wx_gauge.h" -IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl) -#endif - -#include "wx/grid.h" -IMPLEMENT_DYNAMIC_CLASS(wxGenericGrid, wxPanel) - -///// Event tables (also must be in one, statically-linked file for shared libraries) - -// This is the base, wxEvtHandler 'bootstrap' code which is expanded manually here -const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable; } - -const wxEventTable wxEvtHandler::sm_eventTable = - { NULL, &wxEvtHandler::sm_eventTableEntries[0] }; - -const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, -#ifdef __SGI_CC__ - 0L -#else - NULL -#endif - } -}; - -BEGIN_EVENT_TABLE(wxFrame, wxWindow) - EVT_SIZE(wxFrame::OnSize) - EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight) - EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged) - EVT_IDLE(wxFrame::OnIdle) - EVT_CLOSE(wxFrame::OnCloseWindow) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxDialog, wxPanel) - EVT_BUTTON(wxID_OK, wxDialog::OnOK) - EVT_BUTTON(wxID_APPLY, wxDialog::OnApply) - EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel) - EVT_CHAR_HOOK(wxDialog::OnCharHook) - EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged) - EVT_CLOSE(wxDialog::OnCloseWindow) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxWindow, wxEvtHandler) - EVT_CHAR(wxWindow::OnChar) - EVT_SIZE(wxWindow::Size) - EVT_ERASE_BACKGROUND(wxWindow::OnEraseBackground) - EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged) - EVT_INIT_DIALOG(wxWindow::OnInitDialog) - EVT_IDLE(wxWindow::OnIdle) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxScrolledWindow, wxWindow) - EVT_SCROLL(wxScrolledWindow::OnScroll) - EVT_SIZE(wxScrolledWindow::OnSize) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxPanel, wxWindow) - EVT_SYS_COLOUR_CHANGED(wxPanel::OnSysColourChanged) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) - EVT_CHAR(wxTextCtrl::OnChar) - EVT_DROP_FILES(wxTextCtrl::OnDropFiles) - EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground) -END_EVENT_TABLE() - -#ifdef wx_msw -BEGIN_EVENT_TABLE(wxMDIParentWindow, wxFrame) - EVT_SIZE(wxMDIParentWindow::OnSize) - EVT_ACTIVATE(wxMDIParentWindow::OnActivate) - EVT_SYS_COLOUR_CHANGED(wxMDIParentWindow::OnSysColourChanged) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxMDIClientWindow, wxWindow) - EVT_SCROLL(wxMDIClientWindow::OnScroll) -END_EVENT_TABLE() -#endif - -BEGIN_EVENT_TABLE(wxToolBarBase, wxControl) - EVT_SCROLL(wxToolBarBase::OnScroll) - EVT_SIZE(wxToolBarBase::OnSize) - EVT_IDLE(wxToolBarBase::OnIdle) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxToolBarSimple, wxToolBarBase) - EVT_SIZE(wxToolBarSimple::OnSize) - EVT_PAINT(wxToolBarSimple::OnPaint) - EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus) - EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent) -END_EVENT_TABLE() - -#ifdef wx_msw -BEGIN_EVENT_TABLE(wxToolBarMSW, wxToolBarBase) - EVT_SIZE(wxToolBarMSW::OnSize) - EVT_PAINT(wxToolBarMSW::OnPaint) - EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxToolBar95, wxToolBarBase) - EVT_SIZE(wxToolBar95::OnSize) - EVT_PAINT(wxToolBar95::OnPaint) - EVT_KILL_FOCUS(wxToolBar95::OnKillFocus) - EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent) - EVT_SYS_COLOUR_CHANGED(wxToolBar95::OnSysColourChanged) -END_EVENT_TABLE() -#endif - -BEGIN_EVENT_TABLE(wxGenericGrid, wxPanel) - EVT_SIZE(wxGenericGrid::OnSize) - EVT_PAINT(wxGenericGrid::OnPaint) - EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent) - EVT_TEXT(wxGRID_TEXT_CTRL, wxGenericGrid::OnText) - EVT_COMMAND_SCROLL(wxGRID_HSCROLL, wxGenericGrid::OnGridScroll) - EVT_COMMAND_SCROLL(wxGRID_VSCROLL, wxGenericGrid::OnGridScroll) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxControl, wxWindow) - EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground) -END_EVENT_TABLE() - -#if !defined(wx_msw) || USE_GENERIC_DIALOGS_IN_MSW -BEGIN_EVENT_TABLE(wxGenericMessageDialog, wxDialog) - EVT_BUTTON(wxID_YES, wxGenericMessageDialog::OnYes) - EVT_BUTTON(wxID_NO, wxGenericMessageDialog::OnNo) - EVT_BUTTON(wxID_CANCEL, wxGenericMessageDialog::OnCancel) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxGenericColourDialog, wxDialog) - EVT_BUTTON(wxID_ADD_CUSTOM, wxGenericColourDialog::OnAddCustom) - EVT_SLIDER(wxID_RED_SLIDER, wxGenericColourDialog::OnRedSlider) - EVT_SLIDER(wxID_GREEN_SLIDER, wxGenericColourDialog::OnGreenSlider) - EVT_SLIDER(wxID_BLUE_SLIDER, wxGenericColourDialog::OnBlueSlider) - EVT_PAINT(wxGenericColourDialog::OnPaint) - EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxGenericFontDialog, wxDialog) - EVT_CHECKBOX(wxID_FONT_UNDERLINE, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_STYLE, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_WEIGHT, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_FAMILY, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_COLOUR, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_SIZE, wxGenericFontDialog::OnChangeFont) - EVT_PAINT(wxGenericFontDialog::OnPaint) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxGenericPrintDialog, wxDialog) - EVT_BUTTON(wxID_OK, wxGenericPrintDialog::OnOK) - EVT_BUTTON(wxPRINTID_SETUP, wxGenericPrintDialog::OnSetup) - EVT_RADIOBOX(wxPRINTID_RANGE, wxGenericPrintDialog::OnRange) -END_EVENT_TABLE() - -#endif - -BEGIN_EVENT_TABLE(wxTextEntryDialog, wxDialog) - EVT_BUTTON(wxID_OK, wxTextEntryDialog::OnOK) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxSingleChoiceDialog, wxDialog) - EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK) -END_EVENT_TABLE() - -#include "wx/prntbase.h" - -BEGIN_EVENT_TABLE(wxPrintAbortDialog, wxDialog) - EVT_BUTTON(wxID_CANCEL, wxPrintAbortDialog::OnCancel) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxPreviewControlBar, wxWindow) - EVT_BUTTON(wxID_PREVIEW_CLOSE, wxPreviewControlBar::OnClose) - EVT_BUTTON(wxID_PREVIEW_PRINT, wxPreviewControlBar::OnPrint) - EVT_BUTTON(wxID_PREVIEW_PREVIOUS, wxPreviewControlBar::OnPrevious) - EVT_BUTTON(wxID_PREVIEW_NEXT, wxPreviewControlBar::OnNext) - EVT_CHOICE(wxID_PREVIEW_ZOOM, wxPreviewControlBar::OnZoom) -END_EVENT_TABLE() - -#endif - - -const wxSize wxDefaultSize(-1, -1); -const wxPoint wxDefaultPosition(-1, -1); diff --git a/src/gtk/dc.cpp b/src/gtk/dc.cpp deleted file mode 100644 index ff6f369904..0000000000 --- a/src/gtk/dc.cpp +++ /dev/null @@ -1,371 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dc.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "dc.h" -#endif - -#include "wx/dc.h" - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -#define mm2inches 0.0393700787402 -#define inches2mm 25.4 -#define mm2twips 56.6929133859 -#define twips2mm 0.0176388888889 -#define mm2pt 2.83464566929 -#define pt2mm 0.352777777778 - -//----------------------------------------------------------------------------- -// wxDC -//----------------------------------------------------------------------------- - -IMPLEMENT_ABSTRACT_CLASS(wxDC,wxObject) - -wxDC::wxDC(void) -{ - m_ok = FALSE; - m_optimize = FALSE; - m_autoSetting = FALSE; - m_colour = TRUE; - m_clipping = FALSE; - - m_mm_to_pix_x = 1.0; - m_mm_to_pix_y = 1.0; - - m_logicalOriginX = 0; - m_logicalOriginY = 0; - m_deviceOriginX = 0; - m_deviceOriginY = 0; - - m_logicalScaleX = 1.0; - m_logicalScaleY = 1.0; - m_userScaleX = 1.0; - m_userScaleY = 1.0; - m_scaleX = 1.0; - m_scaleY = 1.0; - - m_mappingMode = MM_TEXT; - m_needComputeScaleX = FALSE; - m_needComputeScaleY = FALSE; - - m_signX = 1; // default x-axis left to right - m_signY = 1; // default y-axis top down - - m_maxX = m_maxY = -100000; - m_minY = m_minY = 100000; - - m_logicalFunction = wxCOPY; -// m_textAlignment = wxALIGN_TOP_LEFT; - m_backgroundMode = wxTRANSPARENT; - - m_textForegroundColour = *wxBLACK; - m_textBackgroundColour = *wxWHITE; - m_pen = *wxBLACK_PEN; - m_font = *wxNORMAL_FONT; - m_brush = *wxTRANSPARENT_BRUSH; - m_backgroundBrush = *wxWHITE_BRUSH; - -// m_palette = wxAPP_COLOURMAP; -} - -wxDC::~wxDC(void) -{ -} - -void wxDC::DrawArc( long WXUNUSED(x1), long WXUNUSED(y1), long WXUNUSED(x2), long WXUNUSED(y2), - double WXUNUSED(xc), double WXUNUSED(yc) ) -{ -} - -void wxDC::DrawIcon( const wxIcon &WXUNUSED(icon), long WXUNUSED(x), long WXUNUSED(y), bool WXUNUSED(useMask) ) -{ -} - -void wxDC::DrawPoint( wxPoint& point ) -{ - DrawPoint( point.x, point.y ); -} - -void wxDC::DrawPolygon( wxList *list, long xoffset, long yoffset, int fillStyle ) -{ - int n = list->Number(); - wxPoint *points = new wxPoint[n]; - - int i = 0; - for( wxNode *node = list->First(); node; node = node->Next() ) - { - wxPoint *point = (wxPoint *)node->Data(); - points[i].x = point->x; - points[i++].y = point->y; - } - DrawPolygon( n, points, xoffset, yoffset, fillStyle ); - delete[] points; -} - -void wxDC::DrawLines( wxList *list, long xoffset, long yoffset ) -{ - int n = list->Number(); - wxPoint *points = new wxPoint[n]; - - int i = 0; - for( wxNode *node = list->First(); node; node = node->Next() ) - { - wxPoint *point = (wxPoint *)node->Data(); - points[i].x = point->x; - points[i++].y = point->y; - } - DrawLines( n, points, xoffset, yoffset ); - delete []points; -} - -void wxDC::DrawSpline( long x1, long y1, long x2, long y2, long x3, long y3 ) -{ - wxList list; - list.Append( (wxObject*)new wxPoint(x1, y1) ); - list.Append( (wxObject*)new wxPoint(x2, y2) ); - list.Append( (wxObject*)new wxPoint(x3, y3) ); - DrawSpline(&list); - wxNode *node = list.First(); - while (node) - { - wxPoint *p = (wxPoint*)node->Data(); - delete p; - node = node->Next(); - } -} - -void wxDC::DrawSpline( wxList *points ) -{ - DrawOpenSpline( points ); -} - -void wxDC::DrawSpline( int n, wxPoint points[] ) -{ - wxList list; - for (int i = 0; i < n; i++) list.Append( (wxObject*)&points[i] ); - DrawSpline( &list ); -} - -void wxDC::SetClippingRegion( long x, long y, long width, long height ) -{ - m_clipping = TRUE; - m_clipX1 = x; - m_clipY1 = y; - m_clipX2 = x + width; - m_clipY2 = y + height; -} - -void wxDC::DestroyClippingRegion(void) -{ - m_clipping = FALSE; -} - -void wxDC::GetClippingBox( long *x, long *y, long *width, long *height ) const -{ - if (m_clipping) - { - if (x) *x = m_clipX1; - if (y) *y = m_clipY1; - if (width) *width = (m_clipX2 - m_clipX1); - if (height) *height = (m_clipY2 - m_clipY1); - } - else - *x = *y = *width = *height = 0; -} - -void wxDC::GetSize( int* width, int* height ) const -{ - *width = m_maxX-m_minX; - *height = m_maxY-m_minY; -} - -void wxDC::GetSizeMM( long* width, long* height ) const -{ - int w = 0; - int h = 0; - GetSize( &w, &h ); - *width = long( double(w) / (m_scaleX*m_mm_to_pix_x) ); - *height = long( double(h) / (m_scaleY*m_mm_to_pix_y) ); -} - -void wxDC::SetTextForeground( const wxColour &col ) -{ - if (!Ok()) return; - m_textForegroundColour = col; -} - -void wxDC::SetTextBackground( const wxColour &col ) -{ - if (!Ok()) return; - m_textBackgroundColour = col; -} - -void wxDC::SetMapMode( int mode ) -{ - switch (mode) - { - case MM_TWIPS: - SetLogicalScale( twips2mm*m_mm_to_pix_x, twips2mm*m_mm_to_pix_y ); - break; - case MM_POINTS: - SetLogicalScale( pt2mm*m_mm_to_pix_x, pt2mm*m_mm_to_pix_y ); - break; - case MM_METRIC: - SetLogicalScale( m_mm_to_pix_x, m_mm_to_pix_y ); - break; - case MM_LOMETRIC: - SetLogicalScale( m_mm_to_pix_x/10.0, m_mm_to_pix_y/10.0 ); - break; - default: - case MM_TEXT: - SetLogicalScale( 1.0, 1.0 ); - break; - } - if (mode != MM_TEXT) - { - m_needComputeScaleX = TRUE; - m_needComputeScaleY = TRUE; - } -} - -void wxDC::SetUserScale( double x, double y ) -{ - // allow negative ? -> no - m_userScaleX = x; - m_userScaleY = y; - ComputeScaleAndOrigin(); -} - -void wxDC::GetUserScale( double *x, double *y ) -{ - if (x) *x = m_userScaleX; - if (y) *y = m_userScaleY; -} - -void wxDC::SetLogicalScale( double x, double y ) -{ - // allow negative ? - m_logicalScaleX = x; - m_logicalScaleY = y; - ComputeScaleAndOrigin(); -} - -void wxDC::GetLogicalScale( double *x, double *y ) -{ - if (x) *x = m_logicalScaleX; - if (y) *y = m_logicalScaleY; -} - -void wxDC::SetLogicalOrigin( long x, long y ) -{ - m_logicalOriginX = x * m_signX; // is this still correct ? - m_logicalOriginY = y * m_signY; - ComputeScaleAndOrigin(); -} - -void wxDC::GetLogicalOrigin( long *x, long *y ) -{ - if (x) *x = m_logicalOriginX; - if (y) *y = m_logicalOriginY; -} - -void wxDC::SetDeviceOrigin( long x, long y ) -{ - m_deviceOriginX = x; - m_deviceOriginY = y; - ComputeScaleAndOrigin(); -} - -void wxDC::GetDeviceOrigin( long *x, long *y ) -{ - if (x) *x = m_deviceOriginX; - if (y) *y = m_deviceOriginY; -} - -void wxDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp ) -{ - m_signX = (xLeftRight ? 1 : -1); - m_signY = (yBottomUp ? -1 : 1); - ComputeScaleAndOrigin(); -} - -long wxDC::DeviceToLogicalX(long x) const -{ - return XDEV2LOG(x); -} - -long wxDC::DeviceToLogicalY(long y) const -{ - return YDEV2LOG(y); -} - -long wxDC::DeviceToLogicalXRel(long x) const -{ - return XDEV2LOGREL(x); -} - -long wxDC::DeviceToLogicalYRel(long y) const -{ - return YDEV2LOGREL(y); -} - -long wxDC::LogicalToDeviceX(long x) const -{ - return XLOG2DEV(x); -} - -long wxDC::LogicalToDeviceY(long y) const -{ - return YLOG2DEV(y); -} - -long wxDC::LogicalToDeviceXRel(long x) const -{ - return XLOG2DEVREL(x); -} - -long wxDC::LogicalToDeviceYRel(long y) const -{ - return YLOG2DEVREL(y); -} - -void wxDC::CalcBoundingBox( long x, long y ) -{ - if (x < m_minX) m_minX = x; - if (y < m_minY) m_minY = y; - if (x > m_maxX) m_maxX = x; - if (y > m_maxY) m_maxY = y; -} - -void wxDC::ComputeScaleAndOrigin(void) -{ - // CMB: copy scale to see if it changes - double origScaleX = m_scaleX; - double origScaleY = m_scaleY; - - m_scaleX = m_logicalScaleX * m_userScaleX; - m_scaleY = m_logicalScaleY * m_userScaleY; - - // CMB: if scale has changed call SetPen to recalulate the line width - if (m_scaleX != origScaleX || m_scaleY != origScaleY) - { - // this is a bit artificial, but we need to force wxDC to think - // the pen has changed - wxPen* pen = GetPen(); - wxPen tempPen; - m_pen = tempPen; - SetPen(pen); - } -} - diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp deleted file mode 100644 index ca39cfbb84..0000000000 --- a/src/gtk/dcclient.cpp +++ /dev/null @@ -1,1030 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcclient.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dcclient.h" -#endif - -#include "wx/dcclient.h" -#include "wx/dcmemory.h" - -//----------------------------------------------------------------------------- -// local data -//----------------------------------------------------------------------------- - -#include "bdiag.xbm" -#include "fdiag.xbm" -#include "cdiag.xbm" -#include "horiz.xbm" -#include "verti.xbm" -#include "cross.xbm" -#define num_hatches 6 - -static GdkPixmap *hatches[num_hatches]; -static GdkPixmap **hatch_bitmap = (GdkPixmap **) NULL; - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -#define RAD2DEG 57.2957795131 - -//----------------------------------------------------------------------------- -// temporary implementation of the missing GDK function -//----------------------------------------------------------------------------- -#include "gdk/gdkprivate.h" -void gdk_draw_bitmap (GdkDrawable *drawable, - GdkGC *gc, - GdkDrawable *src, - gint xsrc, - gint ysrc, - gint xdest, - gint ydest, - gint width, - gint height) -{ - GdkWindowPrivate *drawable_private; - GdkWindowPrivate *src_private; - GdkGCPrivate *gc_private; - - g_return_if_fail (drawable != NULL); - g_return_if_fail (src != NULL); - g_return_if_fail (gc != NULL); - - drawable_private = (GdkWindowPrivate*) drawable; - src_private = (GdkWindowPrivate*) src; - if (drawable_private->destroyed || src_private->destroyed) - return; - gc_private = (GdkGCPrivate*) gc; - - if (width == -1) - width = src_private->width; - if (height == -1) - height = src_private->height; - - XCopyPlane (drawable_private->xdisplay, - src_private->xwindow, - drawable_private->xwindow, - gc_private->xgc, - xsrc, ysrc, - width, height, - xdest, ydest, - 1); -} - -//----------------------------------------------------------------------------- -// wxPaintDC -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxPaintDC,wxDC) - -wxPaintDC::wxPaintDC(void) -{ - m_penGC = (GdkGC *) NULL; - m_brushGC = (GdkGC *) NULL; - m_textGC = (GdkGC *) NULL; - m_bgGC = (GdkGC *) NULL; - m_cmap = (GdkColormap *) NULL; -} - -wxPaintDC::wxPaintDC( wxWindow *window ) -{ - m_penGC = (GdkGC *) NULL; - m_brushGC = (GdkGC *) NULL; - m_textGC = (GdkGC *) NULL; - m_bgGC = (GdkGC *) NULL; - m_cmap = (GdkColormap *) NULL; - - if (!window) return; - GtkWidget *widget = window->m_wxwindow; - if (!widget) return; - m_window = widget->window; - if (!m_window) return; - if (window->m_wxwindow) - m_cmap = gtk_widget_get_colormap( window->m_wxwindow ); - else - m_cmap = gtk_widget_get_colormap( window->m_widget ); - - m_isDrawable = TRUE; - - SetUpDC(); -} - -wxPaintDC::~wxPaintDC(void) -{ -} - -void wxPaintDC::FloodFill( long WXUNUSED(x1), long WXUNUSED(y1), - wxColour *WXUNUSED(col), int WXUNUSED(style) ) -{ -} - -bool wxPaintDC::GetPixel( long WXUNUSED(x1), long WXUNUSED(y1), wxColour *WXUNUSED(col) ) const -{ - return FALSE; -} - -void wxPaintDC::DrawLine( long x1, long y1, long x2, long y2 ) -{ - if (!Ok()) return; - - if (m_pen.GetStyle() != wxTRANSPARENT) - { - gdk_draw_line( m_window, m_penGC, - XLOG2DEV(x1), YLOG2DEV(y1), XLOG2DEV(x2), YLOG2DEV(y2) ); - } -} - -void wxPaintDC::CrossHair( long x, long y ) -{ - if (!Ok()) return; - - if (m_pen.GetStyle() != wxTRANSPARENT) - { - int w = 0; - int h = 0; - GetSize( &w, &h ); - long xx = XLOG2DEV(x); - long yy = YLOG2DEV(y); - gdk_draw_line( m_window, m_penGC, - 0, yy, XLOG2DEVREL(w), yy ); - gdk_draw_line( m_window, m_penGC, - xx, 0, xx, YLOG2DEVREL(h) ); - } -} - -void wxPaintDC::DrawArc( long x1, long y1, long x2, long y2, double xc, double yc ) -{ - if (!Ok()) return; - - long xx1 = XLOG2DEV(x1); - long yy1 = YLOG2DEV(y1); - long xx2 = XLOG2DEV(x2); - long yy2 = YLOG2DEV(y2); - long xxc = XLOG2DEV((long)xc); - long yyc = YLOG2DEV((long)yc); - double dx = xx1 - xxc; - double dy = yy1 - yyc; - double radius = sqrt(dx*dx+dy*dy); - long r = (long)radius; - double radius1, radius2; - - if (xx1 == xx2 && yy1 == yy2) - { - radius1 = 0.0; - radius2 = 360.0; - } - else - if (radius == 0.0) - { - radius1 = radius2 = 0.0; - } - else - { - radius1 = (xx1 - xxc == 0) ? - (yy1 - yyc < 0) ? 90.0 : -90.0 : - -atan2(double(yy1-yyc), double(xx1-xxc)) * RAD2DEG; - radius2 = (xx2 - xxc == 0) ? - (yy2 - yyc < 0) ? 90.0 : -90.0 : - -atan2(double(yy2-yyc), double(xx2-xxc)) * RAD2DEG; - } - long alpha1 = long(radius1 * 64.0); - long alpha2 = long((radius2 - radius1) * 64.0); - while (alpha2 <= 0) alpha2 += 360*64; - while (alpha1 > 360*64) alpha1 -= 360*64; - - if (m_brush.GetStyle() != wxTRANSPARENT) - gdk_draw_arc( m_window, m_brushGC, TRUE, xxc-r, yyc-r, 2*r,2*r, alpha1, alpha2 ); - - if (m_pen.GetStyle() != wxTRANSPARENT) - gdk_draw_arc( m_window, m_penGC, FALSE, xxc-r, yyc-r, 2*r,2*r, alpha1, alpha2 ); - -} - -void wxPaintDC::DrawEllipticArc( long x, long y, long width, long height, double sa, double ea ) -{ - if (!Ok()) return; - - long xx = XLOG2DEV(x); - long yy = YLOG2DEV(y); - long ww = m_signX * XLOG2DEVREL(width); - long hh = m_signY * YLOG2DEVREL(height); - - // CMB: handle -ve width and/or height - if (ww < 0) { ww = -ww; xx = xx - ww; } - if (hh < 0) { hh = -hh; yy = yy - hh; } - - long start = long(sa * 64.0); - long end = long(ea * 64.0); - if (m_brush.GetStyle() != wxTRANSPARENT) - gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy, ww, hh, start, end ); - - if (m_pen.GetStyle() != wxTRANSPARENT) - gdk_draw_arc( m_window, m_penGC, FALSE, xx, yy, ww, hh, start, end ); -} - -void wxPaintDC::DrawPoint( long x, long y ) -{ - if (!Ok()) return; - - if (m_pen.GetStyle() != wxTRANSPARENT) - gdk_draw_point( m_window, m_penGC, XLOG2DEV(x), YLOG2DEV(y) ); -} - -void wxPaintDC::DrawLines( int n, wxPoint points[], long xoffset, long yoffset ) -{ - if (!Ok()) return; - - if (m_pen.GetStyle() == wxTRANSPARENT) return; - - for (int i = 0; i < n-1; i++) - { - long x1 = XLOG2DEV(points[i].x + xoffset); - long x2 = XLOG2DEV(points[i+1].x + xoffset); - long y1 = YLOG2DEV(points[i].y + yoffset); // oh, what a waste - long y2 = YLOG2DEV(points[i+1].y + yoffset); - gdk_draw_line( m_window, m_penGC, x1, y1, x2, y2 ); - } -} - -void wxPaintDC::DrawLines( wxList *points, long xoffset, long yoffset ) -{ - if (!Ok()) return; - - if (m_pen.GetStyle() == wxTRANSPARENT) return; - - wxNode *node = points->First(); - while (node->Next()) - { - wxPoint *point = (wxPoint*)node->Data(); - wxPoint *npoint = (wxPoint*)node->Next()->Data(); - long x1 = XLOG2DEV(point->x + xoffset); - long x2 = XLOG2DEV(npoint->x + xoffset); - long y1 = YLOG2DEV(point->y + yoffset); // and again... - long y2 = YLOG2DEV(npoint->y + yoffset); - gdk_draw_line( m_window, m_penGC, x1, y1, x2, y2 ); - node = node->Next(); - } -} - -void wxPaintDC::DrawPolygon( int n, wxPoint points[], - long xoffset, long yoffset, int WXUNUSED(fillStyle) ) - { - if (!Ok()) return; - if (!n) return; // Nothing to draw - GdkPoint *gdkpoints = new GdkPoint[n+1]; - int i; - for (i = 0 ; i < n ; i++) - { - gdkpoints[i].x = XLOG2DEV(points[i].x + xoffset); - gdkpoints[i].y = YLOG2DEV(points[i].y + yoffset); - } - if (m_brush.GetStyle() != wxTRANSPARENT) - gdk_draw_polygon (m_window, m_brushGC, TRUE, gdkpoints, n); - // To do: Fillstyle - if (m_pen.GetStyle() != wxTRANSPARENT) - for (i = 0 ; i < n ; i++) - gdk_draw_line( m_window, m_penGC, - gdkpoints[i%n].x, - gdkpoints[i%n].y, - gdkpoints[(i+1)%n].x, - gdkpoints[(i+1)%n].y); - delete[] gdkpoints; -} - -void wxPaintDC::DrawPolygon( wxList *lines, long xoffset, - long yoffset, int WXUNUSED(fillStyle)) - { - int n = lines->Number(); - - if (!Ok()) return; - GdkPoint *gdkpoints = new GdkPoint[n]; - wxNode *node = lines->First(); - int cnt=0; - while (node) - { - wxPoint *p = (wxPoint *) node->Data(); - gdkpoints[cnt].x = XLOG2DEV(p->x + xoffset); - gdkpoints[cnt].y = YLOG2DEV(p->y + yoffset); - node = node->Next(); - cnt++; - } - if (m_brush.GetStyle() != wxTRANSPARENT) - gdk_draw_polygon (m_window, m_brushGC, TRUE, gdkpoints, n); - // To do: Fillstyle - if (m_pen.GetStyle() != wxTRANSPARENT) - { - int i; - for (i = 0 ; i < n ; i++) - gdk_draw_line( m_window, m_penGC, - gdkpoints[i%n].x, - gdkpoints[i%n].y, - gdkpoints[(i+1)%n].x, - gdkpoints[(i+1)%n].y); - } - delete[] gdkpoints; -} - -void wxPaintDC::DrawRectangle( long x, long y, long width, long height ) -{ - if (!Ok()) return; - - long xx = XLOG2DEV(x); - long yy = YLOG2DEV(y); - long ww = m_signX * XLOG2DEVREL(width); - long hh = m_signY * YLOG2DEVREL(height); - - // CMB: draw nothing if transformed w or h is 0 - if (ww == 0 || hh == 0) return; - - // CMB: handle -ve width and/or height - if (ww < 0) { ww = -ww; xx = xx - ww; } - if (hh < 0) { hh = -hh; yy = yy - hh; } - - if (m_brush.GetStyle() != wxTRANSPARENT) - gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx, yy, ww, hh ); - - if (m_pen.GetStyle() != wxTRANSPARENT) - gdk_draw_rectangle( m_window, m_penGC, FALSE, xx, yy, ww-1, hh-1 ); -} - -void wxPaintDC::DrawRoundedRectangle( long x, long y, long width, long height, double radius ) -{ - if (!Ok()) return; - - if (radius < 0.0) radius = - radius * ((width < height) ? width : height); - - long xx = XLOG2DEV(x); - long yy = YLOG2DEV(y); - long ww = m_signX * XLOG2DEVREL(width); - long hh = m_signY * YLOG2DEVREL(height); - long rr = XLOG2DEVREL((long)radius); - - // CMB: handle -ve width and/or height - if (ww < 0) { ww = -ww; xx = xx - ww; } - if (hh < 0) { hh = -hh; yy = yy - hh; } - - // CMB: if radius is zero use DrawRectangle() instead to avoid - // X drawing errors with small radii - if (rr == 0) - { - DrawRectangle( x, y, width, height ); - return; - } - - // CMB: draw nothing if transformed w or h is 0 - if (ww == 0 || hh == 0) return; - - // CMB: adjust size if outline is drawn otherwise the result is - // 1 pixel too wide and high - if (m_pen.GetStyle() != wxTRANSPARENT) - { - ww--; - hh--; - } - - // CMB: ensure dd is not larger than rectangle otherwise we - // get an hour glass shape - long dd = 2 * rr; - if (dd > ww) dd = ww; - if (dd > hh) dd = hh; - rr = dd / 2; - - if (m_brush.GetStyle() != wxTRANSPARENT) - { - gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx+rr, yy, ww-dd+1, hh ); - gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx, yy+rr, ww, hh-dd+1 ); - gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy, dd, dd, 90*64, 90*64 ); - gdk_draw_arc( m_window, m_brushGC, TRUE, xx+ww-dd, yy, dd, dd, 0, 90*64 ); - gdk_draw_arc( m_window, m_brushGC, TRUE, xx+ww-dd, yy+hh-dd, dd, dd, 270*64, 90*64 ); - gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy+hh-dd, dd, dd, 180*64, 90*64 ); - } - - if (m_pen.GetStyle() != wxTRANSPARENT) - { - gdk_draw_line( m_window, m_penGC, xx+rr, yy, xx+ww-rr, yy ); - gdk_draw_line( m_window, m_penGC, xx+rr, yy+hh, xx+ww-rr, yy+hh ); - gdk_draw_line( m_window, m_penGC, xx, yy+rr, xx, yy+hh-rr ); - gdk_draw_line( m_window, m_penGC, xx+ww, yy+rr, xx+ww, yy+hh-rr ); - gdk_draw_arc( m_window, m_penGC, FALSE, xx, yy, dd, dd, 90*64, 90*64 ); - gdk_draw_arc( m_window, m_penGC, FALSE, xx+ww-dd, yy, dd, dd, 0, 90*64 ); - gdk_draw_arc( m_window, m_penGC, FALSE, xx+ww-dd, yy+hh-dd, dd, dd, 270*64, 90*64 ); - gdk_draw_arc( m_window, m_penGC, FALSE, xx, yy+hh-dd, dd, dd, 180*64, 90*64 ); - } -} - -void wxPaintDC::DrawEllipse( long x, long y, long width, long height ) -{ - if (!Ok()) return; - - long xx = XLOG2DEV(x); - long yy = YLOG2DEV(y); - long ww = m_signX * XLOG2DEVREL(width); - long hh = m_signY * YLOG2DEVREL(height); - - // CMB: handle -ve width and/or height - if (ww < 0) { ww = -ww; xx = xx - ww; } - if (hh < 0) { hh = -hh; yy = yy - hh; } - - if (m_brush.GetStyle() != wxTRANSPARENT) - gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy, ww, hh, 0, 360*64 ); - - if (m_pen.GetStyle() != wxTRANSPARENT) - gdk_draw_arc( m_window, m_penGC, FALSE, xx, yy, ww, hh, 0, 360*64 ); -} - -bool wxPaintDC::CanDrawBitmap(void) const -{ - return TRUE; -} - -void wxPaintDC::DrawIcon( const wxIcon &icon, long x, long y, bool useMask ) -{ - if (!Ok()) return; - - if (!icon.Ok()) return; - - int xx = XLOG2DEV(x); - int yy = YLOG2DEV(y); - - GdkBitmap *mask = (GdkBitmap *) NULL; - if (icon.GetMask()) mask = icon.GetMask()->GetBitmap(); - - if (useMask && mask) - { - gdk_gc_set_clip_mask( m_penGC, mask ); - gdk_gc_set_clip_origin( m_penGC, xx, yy ); - } - - GdkPixmap *pm = icon.GetPixmap(); - gdk_draw_pixmap( m_window, m_penGC, pm, 0, 0, xx, yy, -1, -1 ); - - if (useMask && mask) - { - gdk_gc_set_clip_mask( m_penGC, (GdkBitmap *) NULL ); - gdk_gc_set_clip_origin( m_penGC, 0, 0 ); - } -} - -bool wxPaintDC::Blit( long xdest, long ydest, long width, long height, - wxDC *source, long xsrc, long ysrc, int WXUNUSED(logical_func), bool WXUNUSED(useMask) ) -{ - if (!Ok()) return FALSE; - - // CMB 20/5/98: add blitting of bitmaps - if (source->IsKindOf(CLASSINFO(wxMemoryDC))) - { - wxMemoryDC* srcDC = (wxMemoryDC*)source; - GdkBitmap* bmap = srcDC->m_selected.GetBitmap(); - if (bmap) - { - gdk_draw_bitmap ( - m_window, - m_textGC, - bmap, - source->DeviceToLogicalX(xsrc), source->DeviceToLogicalY(ysrc), - XLOG2DEV(xdest), YLOG2DEV(ydest), - source->DeviceToLogicalXRel(width), source->DeviceToLogicalYRel(height) - ); - return TRUE; - } - } - - wxClientDC *csrc = (wxClientDC*)source; - gdk_window_copy_area ( m_window, m_penGC, - XLOG2DEV(xdest), YLOG2DEV(ydest), - csrc->GetWindow(), - source->DeviceToLogicalX(xsrc), source->DeviceToLogicalY(ysrc), - source->DeviceToLogicalXRel(width), source->DeviceToLogicalYRel(height) ); - -/* - gdk_window_copy_area ( m_window, m_penGC, - XLOG2DEV(xdest), YLOG2DEV(ydest), - csrc->GetWindow(), - xsrc, ysrc, - width, height ); -*/ - - return TRUE; -} - -void wxPaintDC::DrawText( const wxString &text, long x, long y, bool WXUNUSED(use16) ) -{ - if (!Ok()) return; - - GdkFont *font = m_font.GetInternalFont( m_scaleY ); - - x = XLOG2DEV(x); - y = YLOG2DEV(y); - - // CMB 21/5/98: draw text background if mode is wxSOLID - if (m_backgroundMode == wxSOLID) - { - long width = gdk_string_width( font, text ); - long height = font->ascent + font->descent; - gdk_gc_set_foreground( m_textGC, m_textBackgroundColour.GetColor() ); - gdk_draw_rectangle( m_window, m_textGC, TRUE, x, y, width, height ); - gdk_gc_set_foreground( m_textGC, m_textForegroundColour.GetColor() ); - } - gdk_draw_string( m_window, font, m_textGC, x, y + font->ascent, text ); - - // CMB 17/7/98: simple underline: ignores scaling and underlying - // X font's XA_UNDERLINE_POSITION and XA_UNDERLINE_THICKNESS - // properties (see wxXt implementation) - if (m_font.GetUnderlined()) - { - long width = gdk_string_width( font, text ); - long ul_y = y + font->ascent; - if (font->descent > 0) ul_y++; - gdk_draw_line( m_window, m_textGC, x, ul_y, x + width, ul_y); - } -} - -bool wxPaintDC::CanGetTextExtent(void) const -{ - return TRUE; -} - -void wxPaintDC::GetTextExtent( const wxString &string, long *width, long *height, - long *descent, long *externalLeading, - wxFont *theFont, bool WXUNUSED(use16) ) -{ - if (!Ok()) return; - - wxFont fontToUse = m_font; - if (theFont) fontToUse = *theFont; - - GdkFont *font = fontToUse.GetInternalFont( m_scaleY ); - if (width) (*width) = long(gdk_string_width( font, string ) / m_scaleX); - if (height) (*height) = long((font->ascent + font->descent) / m_scaleY); - if (descent) (*descent) = long(font->descent / m_scaleY); - if (externalLeading) (*externalLeading) = 0; // ?? -} - -long wxPaintDC::GetCharWidth(void) -{ - if (!Ok()) return 0; - - GdkFont *font = m_font.GetInternalFont( m_scaleY ); - return long(gdk_string_width( font, "H" ) / m_scaleX); -} - -long wxPaintDC::GetCharHeight(void) -{ - if (!Ok()) return 0; - - GdkFont *font = m_font.GetInternalFont( m_scaleY ); - return long((font->ascent + font->descent) / m_scaleY); -} - -void wxPaintDC::Clear(void) -{ - if (!Ok()) return; - -// DestroyClippingRegion(); - - if (m_isDrawable) - { - gdk_window_clear( m_window ); - } - else - { - int width = 0; - int height = 0; - GetSize( &width, &height ); - gdk_draw_rectangle( m_window, m_bgGC, TRUE, 0, 0, width, height ); - } -} - -void wxPaintDC::SetFont( const wxFont &font ) -{ - if (!Ok()) return; - - m_font = font; -} - -void wxPaintDC::SetPen( const wxPen &pen ) -{ - if (!Ok()) return; - - if (m_pen == pen) return; - - m_pen = pen; - - if (!m_pen.Ok()) return; - - gint width = m_pen.GetWidth(); - // CMB: if width is non-zero scale it with the dc - if (width <= 0) - { - width = 1; - } - else - { - // X doesn't allow different width in x and y and so we take - // the average - double w = 0.5 + (abs(XLOG2DEVREL(width)) + abs(YLOG2DEVREL(width))) / 2.0; - width = (int)w; - } - - GdkLineStyle lineStyle = GDK_LINE_SOLID; - switch (m_pen.GetStyle()) - { - case wxSOLID: { lineStyle = GDK_LINE_SOLID; break; } - case wxDOT: { lineStyle = GDK_LINE_ON_OFF_DASH; break; } - case wxLONG_DASH: { lineStyle = GDK_LINE_ON_OFF_DASH; break; } - case wxSHORT_DASH: { lineStyle = GDK_LINE_ON_OFF_DASH; break; } - case wxDOT_DASH: { lineStyle = GDK_LINE_DOUBLE_DASH; break; } - } - - GdkCapStyle capStyle = GDK_CAP_ROUND; - switch (m_pen.GetCap()) - { - case wxCAP_ROUND: { capStyle = (width <= 1) ? GDK_CAP_NOT_LAST : GDK_CAP_ROUND; break; } - case wxCAP_PROJECTING: { capStyle = GDK_CAP_PROJECTING; break; } - case wxCAP_BUTT: { capStyle = GDK_CAP_BUTT; break; } - } - - GdkJoinStyle joinStyle = GDK_JOIN_ROUND; - switch (m_pen.GetJoin()) - { - case wxJOIN_BEVEL: { joinStyle = GDK_JOIN_BEVEL; break; } - case wxJOIN_ROUND: { joinStyle = GDK_JOIN_ROUND; break; } - case wxJOIN_MITER: { joinStyle = GDK_JOIN_MITER; break; } - } - - gdk_gc_set_line_attributes( m_penGC, width, lineStyle, capStyle, joinStyle ); - - m_pen.GetColour().CalcPixel( m_cmap ); - gdk_gc_set_foreground( m_penGC, m_pen.GetColour().GetColor() ); -} - -void wxPaintDC::SetBrush( const wxBrush &brush ) -{ - if (!Ok()) return; - - if (m_brush == brush) return; - - m_brush = brush; - - if (!m_brush.Ok()) return; - - m_brush.GetColour().CalcPixel( m_cmap ); - gdk_gc_set_foreground( m_brushGC, m_brush.GetColour().GetColor() ); - - GdkFill fillStyle = GDK_SOLID; - switch (m_brush.GetStyle()) - { - case wxSOLID: - case wxTRANSPARENT: - break; - default: - fillStyle = GDK_STIPPLED; - } - - gdk_gc_set_fill( m_brushGC, fillStyle ); - - if (m_brush.GetStyle() == wxSTIPPLE) - { - gdk_gc_set_stipple( m_brushGC, m_brush.GetStipple()->GetPixmap() ); - } - - if (IS_HATCH(m_brush.GetStyle())) - { - int num = m_brush.GetStyle() - wxBDIAGONAL_HATCH; - gdk_gc_set_stipple( m_brushGC, hatches[num] ); - } -} - -// CMB 21/7/98: Added SetBackground. Sets background brush -// for Clear() and bg colour for shapes filled with cross-hatch brush -void wxPaintDC::SetBackground( const wxBrush &brush ) -{ - if (!Ok()) return; - - if (m_backgroundBrush == brush) return; - - m_backgroundBrush = brush; - - if (!m_backgroundBrush.Ok()) return; - - m_backgroundBrush.GetColour().CalcPixel( m_cmap ); - gdk_gc_set_background( m_brushGC, m_backgroundBrush.GetColour().GetColor() ); - gdk_gc_set_foreground( m_bgGC, m_backgroundBrush.GetColour().GetColor() ); - - GdkFill fillStyle = GDK_SOLID; - switch (m_backgroundBrush.GetStyle()) - { - case wxSOLID: - case wxTRANSPARENT: - break; - default: - fillStyle = GDK_STIPPLED; - } - - gdk_gc_set_fill( m_bgGC, fillStyle ); - - if (m_backgroundBrush.GetStyle() == wxSTIPPLE) - { - gdk_gc_set_stipple( m_bgGC, m_backgroundBrush.GetStipple()->GetPixmap() ); - } - - if (IS_HATCH(m_backgroundBrush.GetStyle())) - { - int num = m_backgroundBrush.GetStyle() - wxBDIAGONAL_HATCH; - gdk_gc_set_stipple( m_bgGC, hatches[num] ); - } -} - -void wxPaintDC::SetLogicalFunction( int function ) -{ - if (m_logicalFunction == function) return; - GdkFunction mode = GDK_COPY; - switch (function) - { - case wxXOR: mode = GDK_INVERT; break; - case wxINVERT: mode = GDK_INVERT; break; - default: break; - } - m_logicalFunction = function; - gdk_gc_set_function( m_penGC, mode ); - gdk_gc_set_function( m_brushGC, mode ); -} - -void wxPaintDC::SetTextForeground( const wxColour &col ) -{ - if (!Ok()) return; - - if (m_textForegroundColour == col) return; - - m_textForegroundColour = col; - if (!m_textForegroundColour.Ok()) return; - - m_textForegroundColour.CalcPixel( m_cmap ); - gdk_gc_set_foreground( m_textGC, m_textForegroundColour.GetColor() ); -} - -void wxPaintDC::SetTextBackground( const wxColour &col ) -{ - if (!Ok()) return; - - if (m_textBackgroundColour == col) return; - - m_textBackgroundColour = col; - if (!m_textBackgroundColour.Ok()) return; - - m_textBackgroundColour.CalcPixel( m_cmap ); - gdk_gc_set_background( m_textGC, m_textBackgroundColour.GetColor() ); -} - -void wxPaintDC::SetBackgroundMode( int mode ) -{ - m_backgroundMode = mode; - - // CMB 21/7/98: fill style of cross-hatch brushes is affected by - // transparent/solid background mode - if (m_brush.GetStyle() != wxSOLID && m_brush.GetStyle() != wxTRANSPARENT) - { - gdk_gc_set_fill( m_brushGC, - (m_backgroundMode == wxTRANSPARENT) ? GDK_STIPPLED : GDK_OPAQUE_STIPPLED); - } -} - -void wxPaintDC::SetPalette( const wxPalette& WXUNUSED(palette) ) -{ -} - -void wxPaintDC::SetClippingRegion( long x, long y, long width, long height ) -{ - wxDC::SetClippingRegion( x, y, width, height ); - - GdkRectangle rect; - rect.x = XLOG2DEV(x); - rect.y = YLOG2DEV(y); - rect.width = XLOG2DEVREL(width); - rect.height = YLOG2DEVREL(height); - gdk_gc_set_clip_rectangle( m_penGC, &rect ); - gdk_gc_set_clip_rectangle( m_brushGC, &rect ); - gdk_gc_set_clip_rectangle( m_textGC, &rect ); - gdk_gc_set_clip_rectangle( m_bgGC, &rect ); - -} - -void wxPaintDC::DestroyClippingRegion(void) -{ - wxDC::DestroyClippingRegion(); - - gdk_gc_set_clip_rectangle( m_penGC, (GdkRectangle *) NULL ); - gdk_gc_set_clip_rectangle( m_brushGC, (GdkRectangle *) NULL ); - gdk_gc_set_clip_rectangle( m_textGC, (GdkRectangle *) NULL ); - gdk_gc_set_clip_rectangle( m_bgGC, (GdkRectangle *) NULL ); -} - -void wxPaintDC::SetUpDC(void) -{ - m_ok = TRUE; - m_logicalFunction = wxCOPY; - if (m_penGC) gdk_gc_unref( m_penGC ); - m_penGC = gdk_gc_new( m_window ); - if (m_brushGC) gdk_gc_unref( m_brushGC ); - m_brushGC = gdk_gc_new( m_window ); - if (m_textGC) gdk_gc_unref( m_textGC ); - m_textGC = gdk_gc_new( m_window ); - if (m_bgGC) gdk_gc_unref( m_bgGC ); - m_bgGC = gdk_gc_new( m_window ); - SetTextForeground( m_textForegroundColour ); - SetTextBackground( m_textBackgroundColour ); - SetPen( m_pen ); - SetFont( m_font ); - SetBrush( m_brush ); - - gdk_gc_set_background( m_penGC, wxWHITE->GetColor() ); - - if (!hatch_bitmap) - { - hatch_bitmap = hatches; - hatch_bitmap[0] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, bdiag_bits, bdiag_width, bdiag_height ); - hatch_bitmap[1] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, cdiag_bits, cdiag_width, cdiag_height ); - hatch_bitmap[2] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, fdiag_bits, fdiag_width, fdiag_height ); - hatch_bitmap[3] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, cross_bits, cross_width, cross_height ); - hatch_bitmap[4] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, horiz_bits, horiz_width, horiz_height ); - hatch_bitmap[5] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, verti_bits, verti_width, verti_height ); - } -} - -GdkWindow *wxPaintDC::GetWindow(void) -{ - return m_window; -} - -// ----------------------------------- spline code ---------------------------------------- - -void wx_quadratic_spline(double a1, double b1, double a2, double b2, - double a3, double b3, double a4, double b4); -void wx_clear_stack(void); -int wx_spline_pop(double *x1, double *y1, double *x2, double *y2, double *x3, - double *y3, double *x4, double *y4); -void wx_spline_push(double x1, double y1, double x2, double y2, double x3, double y3, - double x4, double y4); -static bool wx_spline_add_point(double x, double y); -static void wx_spline_draw_point_array(wxDC *dc); - -wxList wx_spline_point_list; - -#define half(z1, z2) ((z1+z2)/2.0) -#define THRESHOLD 5 - -/* iterative version */ - -void wx_quadratic_spline(double a1, double b1, double a2, double b2, double a3, double b3, double a4, - double b4) -{ - register double xmid, ymid; - double x1, y1, x2, y2, x3, y3, x4, y4; - - wx_clear_stack(); - wx_spline_push(a1, b1, a2, b2, a3, b3, a4, b4); - - while (wx_spline_pop(&x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4)) { - xmid = (double)half(x2, x3); - ymid = (double)half(y2, y3); - if (fabs(x1 - xmid) < THRESHOLD && fabs(y1 - ymid) < THRESHOLD && - fabs(xmid - x4) < THRESHOLD && fabs(ymid - y4) < THRESHOLD) { - wx_spline_add_point( x1, y1 ); - wx_spline_add_point( xmid, ymid ); - } else { - wx_spline_push(xmid, ymid, (double)half(xmid, x3), (double)half(ymid, y3), - (double)half(x3, x4), (double)half(y3, y4), x4, y4); - wx_spline_push(x1, y1, (double)half(x1, x2), (double)half(y1, y2), - (double)half(x2, xmid), (double)half(y2, ymid), xmid, ymid); - } - } -} - -/* utilities used by spline drawing routines */ - -typedef struct wx_spline_stack_struct { - double x1, y1, x2, y2, x3, y3, x4, y4; -} Stack; - -#define SPLINE_STACK_DEPTH 20 -static Stack wx_spline_stack[SPLINE_STACK_DEPTH]; -static Stack *wx_stack_top; -static int wx_stack_count; - -void wx_clear_stack(void) -{ - wx_stack_top = wx_spline_stack; - wx_stack_count = 0; -} - -void wx_spline_push(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) -{ - wx_stack_top->x1 = x1; - wx_stack_top->y1 = y1; - wx_stack_top->x2 = x2; - wx_stack_top->y2 = y2; - wx_stack_top->x3 = x3; - wx_stack_top->y3 = y3; - wx_stack_top->x4 = x4; - wx_stack_top->y4 = y4; - wx_stack_top++; - wx_stack_count++; -} - -int wx_spline_pop(double *x1, double *y1, double *x2, double *y2, - double *x3, double *y3, double *x4, double *y4) -{ - if (wx_stack_count == 0) - return (0); - wx_stack_top--; - wx_stack_count--; - *x1 = wx_stack_top->x1; - *y1 = wx_stack_top->y1; - *x2 = wx_stack_top->x2; - *y2 = wx_stack_top->y2; - *x3 = wx_stack_top->x3; - *y3 = wx_stack_top->y3; - *x4 = wx_stack_top->x4; - *y4 = wx_stack_top->y4; - return (1); -} - -static bool wx_spline_add_point(double x, double y) -{ - wxPoint *point = new wxPoint ; - point->x = (int) x; - point->y = (int) y; - wx_spline_point_list.Append((wxObject*)point); - return TRUE; -} - -static void wx_spline_draw_point_array(wxDC *dc) -{ - dc->DrawLines(&wx_spline_point_list, 0, 0 ); - wxNode *node = wx_spline_point_list.First(); - while (node) - { - wxPoint *point = (wxPoint *)node->Data(); - delete point; - delete node; - node = wx_spline_point_list.First(); - } -} - -void wxPaintDC::DrawOpenSpline( wxList *points ) -{ - wxPoint *p; - double cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4; - double x1, y1, x2, y2; - - wxNode *node = points->First(); - p = (wxPoint *)node->Data(); - - x1 = p->x; - y1 = p->y; - - node = node->Next(); - p = (wxPoint *)node->Data(); - - x2 = p->x; - y2 = p->y; - cx1 = (double)((x1 + x2) / 2); - cy1 = (double)((y1 + y2) / 2); - cx2 = (double)((cx1 + x2) / 2); - cy2 = (double)((cy1 + y2) / 2); - - wx_spline_add_point(x1, y1); - - while ((node = node->Next()) != NULL) - { - p = (wxPoint *)node->Data(); - x1 = x2; - y1 = y2; - x2 = p->x; - y2 = p->y; - cx4 = (double)(x1 + x2) / 2; - cy4 = (double)(y1 + y2) / 2; - cx3 = (double)(x1 + cx4) / 2; - cy3 = (double)(y1 + cy4) / 2; - - wx_quadratic_spline(cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4); - - cx1 = cx4; - cy1 = cy4; - cx2 = (double)(cx1 + x2) / 2; - cy2 = (double)(cy1 + y2) / 2; - } - - wx_spline_add_point( cx1, cy1 ); - wx_spline_add_point( x2, y2 ); - - wx_spline_draw_point_array( this ); -} diff --git a/src/gtk/dcmemory.cpp b/src/gtk/dcmemory.cpp deleted file mode 100644 index 5a6e982f9e..0000000000 --- a/src/gtk/dcmemory.cpp +++ /dev/null @@ -1,78 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcmemory.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dcmemory.h" -#endif - -#include "wx/dcmemory.h" - -//----------------------------------------------------------------------------- -// wxMemoryDC -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxPaintDC) - -wxMemoryDC::wxMemoryDC(void) -{ - m_ok = FALSE; - m_cmap = gdk_colormap_get_system(); -} - -wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) ) -{ - m_ok = FALSE; - m_cmap = gdk_colormap_get_system(); -} - -wxMemoryDC::~wxMemoryDC(void) -{ -} - -void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) -{ - m_selected = bitmap; - if (m_selected.Ok()) - { - if (m_selected.GetPixmap()) - { - m_window = m_selected.GetPixmap(); - } - else - { - m_window = m_selected.GetBitmap(); - } - - SetUpDC(); - - m_isDrawable = FALSE; - } - else - { - m_ok = FALSE; - m_window = (GdkWindow *) NULL; - } -} - -void wxMemoryDC::GetSize( int *width, int *height ) const -{ - if (m_selected.Ok()) - { - if (width) (*width) = m_selected.GetWidth(); - if (height) (*height) = m_selected.GetHeight(); - } - else - { - if (width) (*width) = 0; - if (height) (*height) = 0; - } -} - - diff --git a/src/gtk/dcscreen.cpp b/src/gtk/dcscreen.cpp deleted file mode 100644 index c3a9303751..0000000000 --- a/src/gtk/dcscreen.cpp +++ /dev/null @@ -1,122 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcscreen.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dcscreen.h" -#endif - -#include "wx/dcscreen.h" -#include "wx/window.h" -#include "gdk/gdkx.h" - -//----------------------------------------------------------------------------- -// wxScreenDC -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxScreenDC,wxPaintDC) - -wxScreenDC::wxScreenDC(void) -{ - m_ok = FALSE; - m_window = (GdkWindow *) NULL; - m_cmap = gdk_colormap_get_system(); - - m_window = GDK_ROOT_PARENT(); - - SetUpDC(); - - gdk_gc_set_subwindow( m_penGC, GDK_INCLUDE_INFERIORS ); - gdk_gc_set_subwindow( m_brushGC, GDK_INCLUDE_INFERIORS ); - gdk_gc_set_subwindow( m_textGC, GDK_INCLUDE_INFERIORS ); - gdk_gc_set_subwindow( m_bgGC, GDK_INCLUDE_INFERIORS ); -} - -wxScreenDC::~wxScreenDC(void) -{ - EndDrawingOnTop(); -} - -bool wxScreenDC::StartDrawingOnTop( wxWindow *WXUNUSED(window) ) -{ - return TRUE; -/* - if (!window) - { - StartDrawingOnTop(); - return; - } - wxRectangle rect; - rect.x = 0; - rect.y = 0; - window->GetPosition( &rect.x, &rect.y ); - rect.width = 0; - rect.height = 0; - window->GetSize( &rect.width, &rect.height ); - window->ClientToScreen( &rect.x, &rect.y ); - StartDrawingOnTop( &rect ); - return TRUE; -*/ -} - -bool wxScreenDC::StartDrawingOnTop( wxRectangle *WXUNUSED(rect) ) -{ - return TRUE; -/* - int x = 0; - int y = 0; - int width = gdk_screen_width(); - int height = gdk_screen_height(); - if (rect) - { - x = rect->x; - y = rect->y; - width = rect->width; - height = rect->height; - } - - GTK cannot set transparent backgrounds. :-( - - GdkWindowAttr attr; - attr.x = x; - attr.y = y; - attr.width = width; - attr.height = height; - attr.override_redirect = TRUE; - attr.wclass = GDK_INPUT_OUTPUT; - attr.event_mask = 0; - attr.window_type = GDK_WINDOW_TEMP; - m_window = gdk_window_new( NULL, &attr, GDK_WA_NOREDIR | GDK_WA_X | GDK_WA_Y ); - - gdk_window_show( m_window ); - - m_window = GDK_ROOT_PARENT(); - - SetUpDC(); - - gdk_gc_set_subwindow( m_penGC, GDK_INCLUDE_INFERIORS ); - gdk_gc_set_subwindow( m_brushGC, GDK_INCLUDE_INFERIORS ); - gdk_gc_set_subwindow( m_textGC, GDK_INCLUDE_INFERIORS ); - gdk_gc_set_subwindow( m_bgGC, GDK_INCLUDE_INFERIORS ); - - return TRUE; -*/ -} - -bool wxScreenDC::EndDrawingOnTop(void) -{ - return TRUE; -/* - if (m_window) gdk_window_destroy( m_window ); - m_window = NULL; - m_isOk = FALSE; - return TRUE; -*/ -} - diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp deleted file mode 100644 index 929a4ecd77..0000000000 --- a/src/gtk/dialog.cpp +++ /dev/null @@ -1,283 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dialog.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dialog.h" -#endif - -#include "wx/dialog.h" -#include "wx/frame.h" -#include "wx/app.h" -#include "wx/gtk/win_gtk.h" - -//----------------------------------------------------------------------------- - -extern wxList wxPendingDelete; - -//----------------------------------------------------------------------------- -// delete - -bool gtk_dialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxDialog *win ) -{ -/* - printf( "OnDelete from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - win->Close(); - - return TRUE; -} - -//----------------------------------------------------------------------------- -// wxDialog -//----------------------------------------------------------------------------- - -BEGIN_EVENT_TABLE(wxDialog,wxWindow) - EVT_BUTTON (wxID_OK, wxDialog::OnOK) - EVT_BUTTON (wxID_CANCEL, wxDialog::OnCancel) - EVT_BUTTON (wxID_APPLY, wxDialog::OnApply) - EVT_CLOSE (wxDialog::OnCloseWindow) -END_EVENT_TABLE() - -IMPLEMENT_DYNAMIC_CLASS(wxDialog,wxWindow) - -wxDialog::wxDialog(void) -{ - m_title = ""; - m_modalShowing = FALSE; - wxTopLevelWindows.Insert( this ); -} - -wxDialog::wxDialog( wxWindow *parent, - wxWindowID id, const wxString &title, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - m_modalShowing = FALSE; - wxTopLevelWindows.Insert( this ); - Create( parent, id, title, pos, size, style, name ); -} - -bool wxDialog::Create( wxWindow *parent, - wxWindowID id, const wxString &title, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - m_needParent = FALSE; - - PreCreation( parent, id, pos, size, style, name ); - - m_widget = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS ); - - gtk_widget_set( m_widget, "GtkWindow::allow_shrink", TRUE, NULL); - - gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event", - GTK_SIGNAL_FUNC(gtk_dialog_delete_callback), (gpointer)this ); - - m_wxwindow = gtk_myfixed_new(); - gtk_widget_show( m_wxwindow ); - GTK_WIDGET_UNSET_FLAGS( m_wxwindow, GTK_CAN_FOCUS ); - - gtk_container_add( GTK_CONTAINER(m_widget), m_wxwindow ); - - SetTitle( title ); - - if ((m_x != -1) || (m_y != -1)) - gtk_widget_set_uposition( m_widget, m_x, m_y ); - - gtk_widget_set_usize( m_widget, m_width, m_height ); - - PostCreation(); - - return TRUE; -} - -wxDialog::~wxDialog(void) -{ - wxTopLevelWindows.DeleteObject( this ); - if (wxTopLevelWindows.Number() == 0) wxTheApp->ExitMainLoop(); -} - -void wxDialog::SetTitle(const wxString& title ) -{ - m_title = title; - if (m_title.IsNull()) m_title = ""; - gtk_window_set_title( GTK_WINDOW(m_widget), m_title ); -} - -wxString wxDialog::GetTitle(void) const -{ - return (wxString&)m_title; -} - -void wxDialog::OnApply( wxCommandEvent &WXUNUSED(event) ) -{ - if (Validate()) TransferDataFromWindow(); -} - -void wxDialog::OnCancel( wxCommandEvent &WXUNUSED(event) ) -{ - if (IsModal()) - { - EndModal(wxID_CANCEL); - } - else - { - SetReturnCode(wxID_CANCEL); - this->Show(FALSE); - } -} - -void wxDialog::OnOK( wxCommandEvent &WXUNUSED(event) ) -{ - if ( Validate() && TransferDataFromWindow()) - { - if (IsModal()) - { - EndModal(wxID_OK); - } - else - { - SetReturnCode(wxID_OK); - this->Show(FALSE); - } - } -} - -void wxDialog::OnPaint( wxPaintEvent& WXUNUSED(event) ) -{ - // yes -} - -bool wxDialog::OnClose(void) -{ - static wxList closing; - - if (closing.Member(this)) return FALSE; // no loops - - closing.Append(this); - - wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL); - cancelEvent.SetEventObject( this ); - GetEventHandler()->ProcessEvent(cancelEvent); - closing.DeleteObject(this); - - return FALSE; -} - -bool wxDialog::Destroy(void) -{ - if (!wxPendingDelete.Member(this)) - wxPendingDelete.Append(this); - - return TRUE; -} - -void wxDialog::OnCloseWindow(wxCloseEvent& event) -{ - if (GetEventHandler()->OnClose() || event.GetForce()) - { - this->Destroy(); - } -} - -void wxDialog::ImplementSetPosition(void) -{ - if ((m_x != -1) || (m_y != -1)) - gtk_widget_set_uposition( m_widget, m_x, m_y ); -} - -void wxDialog::Centre( int direction ) -{ - if (direction & wxHORIZONTAL == wxHORIZONTAL) m_x = (gdk_screen_width () - m_width) / 2; - if (direction & wxVERTICAL == wxVERTICAL) m_y = (gdk_screen_height () - m_height) / 2; - ImplementSetPosition(); -} - -bool wxDialog::Show( bool show ) -{ - if (!show && IsModal() && m_modalShowing) - { - EndModal( wxID_CANCEL ); - } - - wxWindow::Show( show ); - - if (show) InitDialog(); - - return TRUE; -} - -void wxDialog::SetModal(bool flag) -{ - if (flag) - m_windowStyle |= wxDIALOG_MODAL; - else - if (m_windowStyle & wxDIALOG_MODAL) m_windowStyle -= wxDIALOG_MODAL; -} - -int wxDialog::ShowModal(void) -{ - if (m_modalShowing) return GetReturnCode(); - - Show( TRUE ); - - m_modalShowing = TRUE; - - gtk_grab_add( m_widget ); - gtk_main(); - gtk_grab_remove( m_widget ); - - return GetReturnCode(); -} - -void wxDialog::EndModal( int retCode ) -{ - SetReturnCode( retCode ); - - if (!m_modalShowing) - { - wxFAIL_MSG( "wxDialog: called EndModal twice" ); - return; - } - - m_modalShowing = FALSE; - - gtk_main_quit(); -} - -void wxDialog::InitDialog(void) -{ - wxWindow::InitDialog(); -} - -void wxDialog::SetSizeHints(int minW, int minH, int maxW, int maxH, int WXUNUSED(incW) ) -{ - gdk_window_set_hints( m_widget->window, -1, -1, - minW, minH, maxW, maxH, GDK_HINT_MIN_SIZE | GDK_HINT_MIN_SIZE ); -} - -void wxDialog::SetIcon( const wxIcon &icon ) -{ - m_icon = icon; - if (!icon.Ok()) return; - - wxMask *mask = icon.GetMask(); - GdkBitmap *bm = (GdkBitmap *) NULL; - if (mask) bm = mask->GetBitmap(); - - gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm ); -} - - diff --git a/src/gtk/dnd.cpp b/src/gtk/dnd.cpp deleted file mode 100644 index cb081dc8d3..0000000000 --- a/src/gtk/dnd.cpp +++ /dev/null @@ -1,306 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: dnd.cpp -// Purpose: wxDropTarget class -// Author: Robert Roebling -// Copyright: Robert Roebling -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dnd.h" -#endif - -#include "wx/dnd.h" -#include "wx/window.h" -#include "wx/app.h" -#include "wx/gdicmn.h" -#include - -#include "gdk/gdkprivate.h" - -#include - -// ---------------------------------------------------------------------------- -// global -// ---------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -// ---------------------------------------------------------------------------- -// wxDropTarget -// ---------------------------------------------------------------------------- - -wxDropTarget::wxDropTarget() -{ -} - -wxDropTarget::~wxDropTarget() -{ -} - -void wxDropTarget::Drop( GdkEvent *event, int x, int y ) -{ - printf( "Drop data is of type %s.\n", event->dropdataavailable.data_type ); - - OnDrop( x, y, (char *)event->dropdataavailable.data); -} - -void wxDropTarget::UnregisterWidget( GtkWidget *widget ) -{ - if (!widget) return; - - gtk_widget_dnd_drop_set( widget, FALSE, (gchar **) NULL, 0, FALSE ); -} - -void wxDropTarget::RegisterWidget( GtkWidget *widget ) -{ - wxString formats; - int valid = 0; - - for ( size_t i = 0; i < GetFormatCount(); i++ ) - { - wxDataFormat df = GetFormat( i ); - switch (df) - { - case wxDF_TEXT: - if (i > 0) formats += ";"; - formats += "text/plain"; - valid++; - break; - case wxDF_FILENAME: - if (i > 0) formats += ";"; - formats += "url:any"; - valid++; - break; - default: - break; - } - } - - char *str = WXSTRINGCAST formats; - - gtk_widget_dnd_drop_set( widget, TRUE, &str, valid, FALSE ); -} - -// ---------------------------------------------------------------------------- -// wxTextDropTarget -// ---------------------------------------------------------------------------- - -bool wxTextDropTarget::OnDrop( long x, long y, const void *pData ) -{ - OnDropText( x, y, (const char*)pData ); - return TRUE; -} - -bool wxTextDropTarget::OnDropText( long x, long y, const char *psz ) -{ - printf( "Got dropped text: %s.\n", psz ); - printf( "At x: %d, y: %d.\n", (int)x, (int)y ); - return TRUE; -} - -size_t wxTextDropTarget::GetFormatCount() const -{ - return 1; -} - -wxDataFormat wxTextDropTarget::GetFormat(size_t WXUNUSED(n)) const -{ - return wxDF_TEXT; -} - -// ---------------------------------------------------------------------------- -// wxFileDropTarget -// ---------------------------------------------------------------------------- - -bool wxFileDropTarget::OnDropFiles( long x, long y, size_t nFiles, const char * const WXUNUSED(aszFiles)[] ) -{ - printf( "Got %d dropped files.\n", (int)nFiles ); - printf( "At x: %d, y: %d.\n", (int)x, (int)y ); - return TRUE; -} - -bool wxFileDropTarget::OnDrop(long x, long y, const void *WXUNUSED(pData) ) -{ - char *str = "/this/is/a/path.txt"; - - return OnDropFiles(x, y, 1, &str ); -} - -size_t wxFileDropTarget::GetFormatCount() const -{ - return 1; -} - -wxDataFormat wxFileDropTarget::GetFormat(size_t WXUNUSED(n)) const -{ - return wxDF_FILENAME; -} - -//------------------------------------------------------------------------- -// wxDropSource -//------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// drag request - -void gtk_drag_callback( GtkWidget *widget, GdkEvent *event, wxDropSource *source ) -{ - printf( "Data requested for dropping.\n" ); - - wxDataObject *data = source->m_data; - - size_t size = data->GetDataSize(); - char *ptr = new char[size]; - data->GetDataHere( ptr ); - - gtk_widget_dnd_data_set( widget, event, ptr, size ); - - delete ptr; - - source->m_retValue = wxDropSource::Copy; -} - -wxDropSource::wxDropSource( wxWindow *win ) -{ - g_blockEventsOnDrag = TRUE; - - m_window = win; - m_widget = win->m_widget; - if (win->m_wxwindow) m_widget = win->m_wxwindow; - - m_data = (wxDataObject *) NULL; - m_retValue = Cancel; - - m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY ); - m_goaheadCursor = wxCursor( wxCURSOR_HAND ); -} - -wxDropSource::wxDropSource( wxDataObject &data, wxWindow *win ) -{ - g_blockEventsOnDrag = TRUE; - - m_window = win; - m_widget = win->m_widget; - if (win->m_wxwindow) m_widget = win->m_wxwindow; - m_retValue = Cancel; - - m_data = &data; - - m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY ); - m_goaheadCursor = wxCursor( wxCURSOR_HAND ); -} - -void wxDropSource::SetData( wxDataObject &data ) -{ - m_data = &data; -} - -wxDropSource::~wxDropSource(void) -{ -// if (m_data) delete m_data; - - g_blockEventsOnDrag = FALSE; -} - -wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) ) -{ - if (gdk_dnd.dnd_grabbed) return (wxDropSource::DragResult) None; - if (gdk_dnd.drag_really) return (wxDropSource::DragResult) None; - - wxASSERT_MSG( m_data, "wxDragSource: no data" ); - - if (!m_data) return (wxDropSource::DragResult) None; - if (m_data->GetDataSize() == 0) return (wxDropSource::DragResult) None; - - GdkWindowPrivate *wp = (GdkWindowPrivate*) m_widget->window; - - RegisterWindow(); - - gdk_dnd.drag_perhaps = TRUE; - - gdk_dnd.dnd_drag_start.x = 5; - gdk_dnd.dnd_drag_start.y = 5; - gdk_dnd.real_sw = wp; - - if (gdk_dnd.drag_startwindows) - { - g_free( gdk_dnd.drag_startwindows ); - gdk_dnd.drag_startwindows = (GdkWindow **) NULL; - } - gdk_dnd.drag_numwindows = gdk_dnd.drag_really = 0; - - XWindowAttributes dnd_winattr; - XGetWindowAttributes( gdk_display, wp->xwindow, &dnd_winattr ); - wp->dnd_drag_savedeventmask = dnd_winattr.your_event_mask; - - gdk_dnd_drag_addwindow( m_widget->window ); - - GdkEventDragBegin ev; - ev.type = GDK_DRAG_BEGIN; - ev.window = m_widget->window; - ev.u.allflags = 0; - ev.u.flags.protocol_version = DND_PROTOCOL_VERSION; - - gdk_event_put( (GdkEvent*)&ev ); - - XGrabPointer( gdk_display, wp->xwindow, False, - ButtonMotionMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask, - GrabModeAsync, GrabModeAsync, gdk_root_window, None, CurrentTime ); - - gdk_dnd_set_drag_cursors( m_defaultCursor.GetCursor(), m_goaheadCursor.GetCursor() ); - - gdk_dnd.dnd_grabbed = TRUE; - gdk_dnd.drag_really = 1; - - int x = 0; - int y = 0; - gdk_window_get_pointer( m_widget->window, &x, &y, (GdkModifierType *) NULL ); - - gdk_dnd_display_drag_cursor( x, y, FALSE, TRUE ); - - while (gdk_dnd.drag_really || gdk_dnd.drag_perhaps) wxYield(); - - UnregisterWindow(); - - g_blockEventsOnDrag = FALSE; - - return m_retValue; -} - -void wxDropSource::RegisterWindow(void) -{ - if (!m_data) return; - - wxString formats; - - wxDataFormat df = m_data->GetPreferredFormat(); - - switch (df) - { - case wxDF_TEXT: - formats += "text/plain"; - break; - case wxDF_FILENAME: - formats += "url:any"; - break; - default: - break; - } - - char *str = WXSTRINGCAST formats; - - gtk_widget_dnd_drag_set( m_widget, TRUE, &str, 1 ); - - gtk_signal_connect( GTK_OBJECT(m_widget), "drag_request_event", - GTK_SIGNAL_FUNC(gtk_drag_callback), (gpointer)this ); -} - -void wxDropSource::UnregisterWindow(void) -{ - if (!m_widget) return; - - gtk_widget_dnd_drag_set( m_widget, FALSE, (gchar **) NULL, 0 ); - - gtk_signal_disconnect_by_data( GTK_OBJECT(m_widget), (gpointer)this ); -} diff --git a/src/gtk/fdiag.xbm b/src/gtk/fdiag.xbm deleted file mode 100644 index 67d3b4732a..0000000000 --- a/src/gtk/fdiag.xbm +++ /dev/null @@ -1,6 +0,0 @@ -#define fdiag_width 16 -#define fdiag_height 16 -static char fdiag_bits[] = { - 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, - 0x40, 0x40, 0x80, 0x80, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, - 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80}; diff --git a/src/gtk/filedlg.cpp b/src/gtk/filedlg.cpp deleted file mode 100644 index 6b705b101b..0000000000 --- a/src/gtk/filedlg.cpp +++ /dev/null @@ -1,167 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: filedlg.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "filedlg.h" -#endif - -#include "wx/filedlg.h" -#include "wx/utils.h" -#include "wx/intl.h" -#include "wx/generic/msgdlgg.h" - -//----------------------------------------------------------------------------- -// wxFileDialog -//----------------------------------------------------------------------------- - -void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), gpointer data ) -{ - wxFileDialog *dialog = (wxFileDialog*)data; - wxCommandEvent event(wxEVT_NULL); - int style; - - style=dialog->GetStyle(); - - if((style&wxSAVE)&&(style&wxOVERWRITE_PROMPT)) - if(wxFileExists(gtk_file_selection_get_filename(GTK_FILE_SELECTION(dialog->m_widget) ))) { - if(wxMessageBox(_("File exists. Overwrite?"), - _("Confirm"), wxYES_NO) != wxYES) - return; - } - - dialog->OnOK( event ); -} - -void gtk_filedialog_cancel_callback( GtkWidget *WXUNUSED(widget), gpointer data ) -{ - wxFileDialog *dialog = (wxFileDialog*)data; - wxCommandEvent event(wxEVT_NULL); - dialog->OnCancel( event ); -} - -IMPLEMENT_DYNAMIC_CLASS(wxFileDialog,wxDialog) - -wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, - const wxString& defaultDir, const wxString& defaultFileName, - const wxString& wildCard, - long style, const wxPoint& pos ) -{ - m_needParent = FALSE; - - PreCreation( parent, -1, pos, wxDefaultSize, style | wxDIALOG_MODAL, "filedialog" ); - m_message = message; - m_path = ""; - m_fileName = defaultFileName; - m_dir = defaultDir; - m_wildCard = wildCard; - m_dialogStyle = style; - m_filterIndex = 1; - - m_widget = gtk_file_selection_new(_("File selection")); - - int x = (gdk_screen_width () - 400) / 2; - int y = (gdk_screen_height () - 400) / 2; - gtk_widget_set_uposition( m_widget, x, y ); - - GtkFileSelection *sel = GTK_FILE_SELECTION(m_widget); - - m_path.Append(m_dir); - if(! m_path.IsEmpty() && m_path.Last()!='/') m_path.Append('/'); - m_path.Append(m_fileName); - - if(m_path.Length()>1) gtk_file_selection_set_filename(sel,m_path); - - gtk_signal_connect( GTK_OBJECT(sel->ok_button), "clicked", - GTK_SIGNAL_FUNC(gtk_filedialog_ok_callback), (gpointer*)this ); - - gtk_signal_connect( GTK_OBJECT(sel->cancel_button), "clicked", - GTK_SIGNAL_FUNC(gtk_filedialog_cancel_callback), (gpointer*)this ); -} - -int wxFileDialog::ShowModal(void) -{ - int ret = wxDialog::ShowModal(); - - if (ret == wxID_OK) - { - m_fileName = gtk_file_selection_get_filename( GTK_FILE_SELECTION(m_widget) ); - m_path = gtk_file_selection_get_filename( GTK_FILE_SELECTION(m_widget) ); - } - return ret; -} - - -char *wxFileSelector(const char *title, - const char *defaultDir, const char *defaultFileName, - const char *defaultExtension, const char *filter, int flags, - wxWindow *parent, int x, int y) -{ - wxString filter2(""); - if ( defaultExtension && !filter ) - filter2 = wxString("*.") + wxString(defaultExtension) ; - else if ( filter ) - filter2 = filter; - - wxString defaultDirString; - if (defaultDir) - defaultDirString = defaultDir; - else - defaultDirString = ""; - - wxString defaultFilenameString; - if (defaultFileName) - defaultFilenameString = defaultFileName; - else - defaultFilenameString = ""; - - wxFileDialog fileDialog(parent, title, defaultDirString, defaultFilenameString, - filter2, flags, wxPoint(x, y)); - - if ( fileDialog.ShowModal() == wxID_OK ) - { - strcpy(wxBuffer, (const char *)fileDialog.GetPath()); - return wxBuffer; - } - else - return (char *) NULL; -} - -char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name, - wxWindow *parent ) -{ - char *ext = (char *)extension; - - char prompt[50]; - wxString str = _("Load %s file"); - sprintf(prompt, str, what); - - if (*ext == '.') ext++; - char wild[60]; - sprintf(wild, "*.%s", ext); - - return wxFileSelector (prompt, (const char *) NULL, default_name, ext, wild, 0, parent); -} - -char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name, - wxWindow *parent ) -{ - char *ext = (char *)extension; - - char prompt[50]; - wxString str = _("Save %s file"); - sprintf(prompt, str, what); - - if (*ext == '.') ext++; - char wild[60]; - sprintf(wild, "*.%s", ext); - - return wxFileSelector (prompt, (const char *) NULL, default_name, ext, wild, 0, parent); -} - diff --git a/src/gtk/font.cpp b/src/gtk/font.cpp deleted file mode 100644 index 47dc19b2e5..0000000000 --- a/src/gtk/font.cpp +++ /dev/null @@ -1,827 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: font.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "font.h" -#endif - -#include "wx/font.h" -#include "wx/utils.h" -#include - -//----------------------------------------------------------------------------- -// local data -//----------------------------------------------------------------------------- - -static char *wx_font_family [] = { - "wxDEFAULT", "wxDECORATIVE", "wxMODERN", "wxROMAN", "wxSCRIPT", - "wxSWISS", "wxTELETYPE", -}; - -static char *wx_font_style [] = { - "wxDEFAULT", "wxNORMAL", "wxSLANT", "wxITALIC", -}; - -static char *wx_font_weight [] = { - "wxDEFAULT", "wxNORMAL", "wxBOLD", "wxLIGHT", -}; - -extern wxFontNameDirectory *wxTheFontNameDirectory; - -//----------------------------------------------------------------------------- -// wxFont -//----------------------------------------------------------------------------- - -class wxFontRefData: public wxObjectRefData -{ - public: - - wxFontRefData(void); - ~wxFontRefData(void); - - wxList m_scaled_xfonts; - int m_pointSize; - int m_family, m_style, m_weight; - bool m_underlined; - int m_fontId; - char* m_faceName; - - bool m_byXFontName; - GdkFont *m_font; - - friend wxFont; -}; - -wxFontRefData::wxFontRefData(void) : m_scaled_xfonts(wxKEY_INTEGER) -{ - m_byXFontName = FALSE; - m_pointSize = -1; - m_family = -1; - m_style = -1; - m_weight = -1; - m_underlined = FALSE; - m_fontId = 0; - m_faceName = (char *) NULL; - m_font = (GdkFont *) NULL; -} - -wxFontRefData::~wxFontRefData(void) -{ - wxNode *node = m_scaled_xfonts.First(); - while (node) - { - GdkFont *font = (GdkFont*)node->Data(); - wxNode *next = node->Next(); - gdk_font_unref( font ); - node = next; - } - if (m_faceName) - { - delete m_faceName; - m_faceName = (char *) NULL; - } - if (m_font) gdk_font_unref( m_font ); -} - -//----------------------------------------------------------------------------- - -#define M_FONTDATA ((wxFontRefData *)m_refData) - -IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) - -wxFont::wxFont(void) -{ - if (wxTheFontList) wxTheFontList->Append( this ); -} - -wxFont::wxFont( char *xFontName ) -{ - if (!xFontName) return; - - m_refData = new wxFontRefData(); - - M_FONTDATA->m_byXFontName = TRUE; - M_FONTDATA->m_font = gdk_font_load( xFontName ); -} - -wxFont::wxFont(int PointSize, int FontIdOrFamily, int Style, int Weight, - bool Underlined, const char* Face) -{ - m_refData = new wxFontRefData(); - - if ((M_FONTDATA->m_faceName = (Face) ? copystring(Face) : (char*)NULL) ) - { - M_FONTDATA->m_fontId = wxTheFontNameDirectory->FindOrCreateFontId( Face, FontIdOrFamily ); - M_FONTDATA->m_family = wxTheFontNameDirectory->GetFamily( FontIdOrFamily ); - } - else - { - M_FONTDATA->m_fontId = FontIdOrFamily; - M_FONTDATA->m_family = wxTheFontNameDirectory->GetFamily( FontIdOrFamily ); - } - M_FONTDATA->m_style = Style; - M_FONTDATA->m_weight = Weight; - M_FONTDATA->m_pointSize = PointSize; - M_FONTDATA->m_underlined = Underlined; - - if (wxTheFontList) wxTheFontList->Append( this ); -} - -wxFont::wxFont(int PointSize, const char *Face, int Family, int Style, - int Weight, bool Underlined) -{ - m_refData = new wxFontRefData(); - - M_FONTDATA->m_fontId = wxTheFontNameDirectory->FindOrCreateFontId( Face, Family ); - M_FONTDATA->m_faceName = (Face) ? copystring(Face) : (char*)NULL; - M_FONTDATA->m_family = wxTheFontNameDirectory->GetFamily( M_FONTDATA->m_fontId ); - M_FONTDATA->m_style = Style; - M_FONTDATA->m_weight = Weight; - M_FONTDATA->m_pointSize = PointSize; - M_FONTDATA->m_underlined = Underlined; - - if (wxTheFontList) wxTheFontList->Append( this ); -} - -wxFont::wxFont( const wxFont& font ) -{ - Ref( font ); - - if (wxTheFontList) wxTheFontList->Append( this ); -} - -wxFont::wxFont( const wxFont* font ) -{ - UnRef(); - if (font) Ref( *font ); - - if (wxTheFontList) wxTheFontList->Append( this ); -} - -wxFont::~wxFont(void) -{ - if (wxTheFontList) wxTheFontList->DeleteObject( this ); -} - -wxFont& wxFont::operator = ( const wxFont& font ) -{ - if (*this == font) return (*this); - Ref( font ); - return *this; -} - -bool wxFont::operator == ( const wxFont& font ) -{ - return m_refData == font.m_refData; -} - -bool wxFont::operator != ( const wxFont& font ) -{ - return m_refData != font.m_refData; -} - -bool wxFont::Ok() -{ - return (m_refData != NULL); -} - -int wxFont::GetPointSize(void) const -{ - return M_FONTDATA->m_pointSize; -} - -wxString wxFont::GetFaceString(void) const -{ - wxString s = wxTheFontNameDirectory->GetFontName( M_FONTDATA->m_fontId ); - return s; -} - -wxString wxFont::GetFaceName(void) const -{ - wxString s = wxTheFontNameDirectory->GetFontName( M_FONTDATA->m_fontId ); - return s; -} - -int wxFont::GetFamily(void) const -{ - return M_FONTDATA->m_family; -} - -wxString wxFont::GetFamilyString(void) const -{ - wxString s = wx_font_family[M_FONTDATA->m_family]; - return s; -} - -int wxFont::GetFontId(void) const -{ - return M_FONTDATA->m_fontId; // stub -} - -int wxFont::GetStyle(void) const -{ - return M_FONTDATA->m_style; -} - -wxString wxFont::GetStyleString(void) const -{ - wxString s = wx_font_style[M_FONTDATA->m_style]; - return s; -} - -int wxFont::GetWeight(void) const -{ - return M_FONTDATA->m_weight; -} - -wxString wxFont::GetWeightString(void) const -{ - wxString s = wx_font_weight[M_FONTDATA->m_weight]; - return s; -} - -bool wxFont::GetUnderlined(void) const -{ - return M_FONTDATA->m_underlined; -} - -//----------------------------------------------------------------------------- -// get internal representation of font -//----------------------------------------------------------------------------- - -// local help function -static GdkFont *wxLoadQueryNearestFont(int point_size, int fontid, - int style, int weight, - bool underlined); - -GdkFont *wxFont::GetInternalFont(float scale) const -{ - if (M_FONTDATA->m_byXFontName) return M_FONTDATA->m_font; - - long int_scale = long(scale * 100.0 + 0.5); // key for fontlist - int point_scale = (M_FONTDATA->m_pointSize * 10 * int_scale) / 100; - GdkFont *font = (GdkFont *) NULL; - - wxNode *node = M_FONTDATA->m_scaled_xfonts.Find(int_scale); - if (node) - { - font = (GdkFont*)node->Data(); - } - else - { - font = wxLoadQueryNearestFont( point_scale, M_FONTDATA->m_fontId, M_FONTDATA->m_style, - M_FONTDATA->m_weight, M_FONTDATA->m_underlined ); - M_FONTDATA->m_scaled_xfonts.Append( int_scale, (wxObject*)font ); - } - if (!font) - printf("could not load any font"); -// wxError("could not load any font", "wxFont"); - return font; -} - -//----------------------------------------------------------------------------- -// local utilities to find a X font -//----------------------------------------------------------------------------- - -static GdkFont *wxLoadQueryFont(int point_size, int fontid, int style, - int weight, bool WXUNUSED(underlined)) -{ - char buffer[512]; - char *name = wxTheFontNameDirectory->GetScreenName( fontid, weight, style ); - - if (!name) - name = "-*-*-*-*-*-*-*-%d-*-*-*-*-*-*"; - sprintf(buffer, name, point_size); - - return gdk_font_load( buffer ); -} - -static GdkFont *wxLoadQueryNearestFont(int point_size, int fontid, - int style, int weight, - bool underlined) -{ - GdkFont *font; - - font = wxLoadQueryFont( point_size, fontid, style, weight, underlined ); - - if (!font) { - // search up and down by stepsize 10 - int max_size = point_size + 20 * (1 + (point_size/180)); - int min_size = point_size - 20 * (1 + (point_size/180)); - int i; - - // Search for smaller size (approx.) - for (i=point_size-10; !font && i >= 10 && i >= min_size; i -= 10) - font = wxLoadQueryFont(i, fontid, style, weight, underlined); - // Search for larger size (approx.) - for (i=point_size+10; !font && i <= max_size; i += 10) - font = wxLoadQueryFont(i, fontid, style, weight, underlined); - // Try default family - if (!font && fontid != wxDEFAULT) - font = wxLoadQueryFont(point_size, wxDEFAULT, style, - weight, underlined); - // Bogus font - if (!font) - font = wxLoadQueryFont(120, wxDEFAULT, wxNORMAL, wxNORMAL, - underlined); - } - return font; -} - -//----------------------------------------------------------------------------- -// face names and index functions -//----------------------------------------------------------------------------- - -static char *font_defaults[] = { - "FamilyDefault", "Default", - "FamilyRoman", "Roman", - "FamilyDecorative", "Decorative", - "FamilyModern", "Modern", - "FamilyTeletype", "Teletype", - "FamilySwiss", "Swiss", - "FamilyScript", "Script", - - "AfmMedium", "", - "AfmBold", "Bo", - "AfmLight", "", - "AfmStraight", "", - "AfmItalic", "${AfmSlant}", - "AfmSlant", "O", - "AfmRoman", "Ro", - "AfmTimes", "Times", - "AfmHelvetica", "Helv", - "AfmCourier", "Cour", - - "Afm___", "${AfmTimes,$[weight],$[style]}", - - "AfmTimes__", "${AfmTimes}${Afm$[weight]}${Afm$[style]}", - "AfmTimesMediumStraight", "${AfmTimes}${AfmRoman}", - "AfmTimesLightStraight", "${AfmTimes}${AfmRoman}", - "AfmTimes_Italic", "${AfmTimes}$[weight]${AfmItalic}", - "AfmTimes_Slant", "${AfmTimes}$[weight]${AfmItalic}", - - "AfmSwiss__", "${AfmHelvetica}${Afm$[weight]}${Afm$[style]}", - "AfmModern__", "${AfmCourier}${Afm$[weight]}${Afm$[style]}", - - "AfmTeletype__", "${AfmModern,$[weight],$[style]}", - - "PostScriptMediumStraight", "", - "PostScriptMediumItalic", "-Oblique", - "PostScriptMediumSlant", "-Oblique", - "PostScriptLightStraight", "", - "PostScriptLightItalic", "-Oblique", - "PostScriptLightSlant", "-Oblique", - "PostScriptBoldStraight", "-Bold", - "PostScriptBoldItalic", "-BoldOblique", - "PostScriptBoldSlant", "-BoldOblique", - -#if WX_NORMALIZED_PS_FONTS - "PostScript___", "${PostScriptTimes,$[weight],$[style]}", -#else - "PostScriptRoman__", "${PostScriptTimes,$[weight],$[style]}", - "PostScript___", "LucidaSans${PostScript$[weight]$[style]}", -#endif - - "PostScriptTimesMedium", "", - "PostScriptTimesLight", "", - "PostScriptTimesBold", "Bold", - - "PostScriptTimes__", "Times${PostScript$[weight]$[style]}", - "PostScriptTimesMediumStraight", "Times-Roman", - "PostScriptTimesLightStraight", "Times-Roman", - "PostScriptTimes_Slant", "Times-${PostScriptTimes$[weight]}Italic", - "PostScriptTimes_Italic", "Times-${PostScriptTimes$[weight]}Italic", - - "PostScriptSwiss__", "Helvetica${PostScript$[weight]$[style]}", - "PostScriptModern__", "Courier${PostScript$[weight]$[style]}", - - "PostScriptTeletype__", "${PostScriptModern,$[weight],$[style]}", - -#if !WX_NORMALIZED_PS_FONTS - "PostScriptScript__", "Zapf-Chancery-MediumItalic", -#endif - - "ScreenMedium", "medium", - "ScreenBold", "bold", - "ScreenLight", "light", - "ScreenStraight", "r", - "ScreenItalic", "i", - "ScreenSlant", "o", - - "ScreenDefaultBase", "misc-fixed", - "ScreenRomanBase", "*-times", - "ScreenDecorativeBase", "*-helvetica", - "ScreenModernBase", "*-courier", - "ScreenTeletypeBase", "*-lucidatypewriter", - "ScreenSwissBase", "*-lucida", - "ScreenScriptBase", "*-zapfchancery", - - "ScreenStdSuffix", "-${Screen$[weight]}-${Screen$[style]}" - "-normal-*-*-%d-*-*-*-*-*-*", - - "Screen___", - "-${ScreenDefaultBase}${ScreenStdSuffix}", - "ScreenRoman__", - "-${ScreenRomanBase}${ScreenStdSuffix}", - "ScreenDecorative__", - "-${ScreenDecorativeBase}${ScreenStdSuffix}", - "ScreenModern__", - "-${ScreenModernBase}${ScreenStdSuffix}", - "ScreenTeletype__", - "-${ScreenTeletypeBase}${ScreenStdSuffix}", - "ScreenSwiss__", - "-${ScreenSwissBase}${ScreenStdSuffix}", - "ScreenScript__", - "-${ScreenScriptBase}${ScreenStdSuffix}", - (char *) NULL -}; - -enum {wxWEIGHT_NORMAL, wxWEIGHT_BOLD, wxWEIGHT_LIGHT, wxNUM_WEIGHTS}; -enum {wxSTYLE_NORMAL, wxSTYLE_ITALIC, wxSTYLE_SLANT, wxNUM_STYLES}; - -static int WCoordinate(int w) -{ - switch (w) { - case wxBOLD: return wxWEIGHT_BOLD; - case wxLIGHT: return wxWEIGHT_LIGHT; - case wxNORMAL: - default: return wxWEIGHT_NORMAL; - } -}; - -static int SCoordinate(int s) -{ - switch (s) { - case wxITALIC: return wxSTYLE_ITALIC; - case wxSLANT: return wxSTYLE_SLANT; - case wxNORMAL: - default: return wxSTYLE_NORMAL; - } -}; - -//----------------------------------------------------------------------------- -// wxSuffixMap -//----------------------------------------------------------------------------- - -class wxSuffixMap { -public: - ~wxSuffixMap(void); - - inline char *GetName(int weight, int style) - { - return ( map [WCoordinate(weight)] [SCoordinate(style)] ); - } - - char *map[wxNUM_WEIGHTS][wxNUM_STYLES]; - void Initialize(const char *, const char *); -}; - -//#if !USE_RESOURCES -#define wxGetResource(a, b, c) 0 -//#endif - -static void SearchResource(const char *prefix, const char **names, int count, char **v) -{ - int k, i, j; - char resource[1024], **defaults, *internal; - - k = 1 << count; - - *v = (char *) NULL; - internal = (char *) NULL; - - for (i = 0; i < k; i++) { - strcpy(resource, prefix); - for (j = 0; j < count; j++) { - if (!(i & (1 << j))) - strcat(resource, names[j]); - else - strcat(resource, "_"); - } - if (wxGetResource(wxAPP_CLASS, (char *)resource, v)) - return; - if (!internal) { - defaults = font_defaults; - while (*defaults) { - if (!strcmp(*defaults, resource)) { - internal = defaults[1]; - break; - } - defaults += 2; - } - } - } - if (internal) - *v = copystring(internal); -} - -wxSuffixMap::~wxSuffixMap(void) -{ - int k, j; - - for (k = 0; k < wxNUM_WEIGHTS; ++k) - for (j = 0; j < wxNUM_STYLES; ++j) - if (map[k][j]) { - delete[] map[k][j]; - map[k][j] = (char *) NULL; - } -} - -void wxSuffixMap::Initialize(const char *resname, const char *devresname) -{ - const char *weight, *style; - char *v; - int i, j, k; - const char *names[3]; - - for (k = 0; k < wxNUM_WEIGHTS; k++) { - switch (k) { - case wxWEIGHT_NORMAL: weight = "Medium"; break; - case wxWEIGHT_LIGHT: weight = "Light"; break; - case wxWEIGHT_BOLD: - default: weight = "Bold"; - } - for (j = 0; j < wxNUM_STYLES; j++) { - switch (j) { - case wxSTYLE_NORMAL: style = "Straight"; break; - case wxSTYLE_ITALIC: style = "Italic"; break; - case wxSTYLE_SLANT: - default: style = "Slant"; - } - names[0] = resname; - names[1] = weight; - names[2] = style; - - SearchResource(devresname, names, 3, &v); - - /* Expand macros in the found string: */ - found: - int len, closer = 0, startpos = 0; - - len = (v ? strlen(v) : 0); - for (i = 0; i < len; i++) { - if (v[i] == '$' && ((v[i+1] == '[') || (v[i+1] == '{'))) { - startpos = i; - closer = (v[i+1] == '[') ? ']' : '}'; - ++i; - } else if (v[i] == closer) { - int newstrlen; - const char *r = (char *) NULL; bool delete_r = FALSE; - char *name; - - name = v + startpos + 2; - v[i] = 0; - - if (closer == '}') { - int i, count, len; - char **names; - - for (i = 0, count = 1; name[i]; i++) - if (name[i] == ',') - count++; - - len = i; - - names = new char*[count]; - names[0] = name; - for (i = 0, count = 1; i < len; i++) - if (name[i] == ',') { - names[count++] = name + i + 1; - name[i] = 0; - } - - SearchResource("", (const char **)names, count, (char **)&r); - delete_r = (r != 0); - delete[] names; - - if (!r) { - for (i = 0; i < len; i++) - if (!name[i]) - name[i] = ','; - r = ""; - printf("Bad resource name \"%s\" in font lookup\n", name); - } - } else if (!strcmp(name, "weight")) { - r = weight; - } else if (!strcmp(name, "style")) { - r = style; - } else if (!strcmp(name, "family")) { - r = resname; - } else { - r = ""; - printf("Bad font macro name \"%s\"\n", name); - } - - // add r to v - newstrlen = strlen(r); - char *naya = new char[startpos + newstrlen + len - i]; - memcpy(naya, v, startpos); - memcpy(naya + startpos, r, newstrlen); - memcpy(naya + startpos + newstrlen, v + i + 1, len - i); - if (delete_r) - delete[] (char*)r; - delete[] v; - v = naya; - - goto found; - } - } - /* We have a final value: */ - map[k][j] = v; - } - } -} - -//----------------------------------------------------------------------------- -// wxFontNameItem -//----------------------------------------------------------------------------- - -class wxFontNameItem : public wxObject { -DECLARE_DYNAMIC_CLASS(wxFontNameItem) -public: - wxFontNameItem(const char *name, int id, int family); - ~wxFontNameItem(); - - inline char* GetScreenName(int w, int s) {return screen.GetName(w, s);} - inline char* GetPostScriptName(int w, int s) {return printing.GetName(w, s);} - inline char* GetAFMName(int w, int s) {return afm.GetName(w, s);} - inline char* GetName(void) {return name;} - inline int GetFamily(void) {return family;} - inline int GetId(void) {return id;} - inline bool IsRoman(void) {return isroman;} -#if WXDEBUG - void Dump(ostream& str); -#endif - - int id; - int family; - char *name; - wxSuffixMap screen, printing, afm; - bool isroman; -}; - -IMPLEMENT_ABSTRACT_CLASS(wxFontNameItem, wxObject) - -wxFontNameItem::wxFontNameItem(const char *Name, int Id, int Family) -{ - name = copystring(Name); - id = Id; - family = Family; - - screen. Initialize(name, "Screen"); - printing.Initialize(name, "PostScript"); - afm. Initialize(name, "Afm"); -} - -wxFontNameItem::~wxFontNameItem(void) -{ - if (name) - delete[] name; - name = (char *) NULL; -} - -#if WXDEBUG -void wxFontNameItem::Dump(ostream& str) -{ - str << "wxFontNameItem(" << name << ")"; -} -#endif - -//----------------------------------------------------------------------------- -// wxFontDirectory -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory, wxObject) - -wxFontNameDirectory::wxFontNameDirectory(void) -{ - table = new wxHashTable(wxKEY_INTEGER, 20); - nextFontId = -1; -} - -wxFontNameDirectory::~wxFontNameDirectory() -{ - // Cleanup wxFontNameItems allocated - table->BeginFind(); - wxNode *node = table->Next(); - while (node) { - wxFontNameItem *item = (wxFontNameItem*)node->Data(); - delete item; - node = table->Next(); - } - delete table; -} - -int wxFontNameDirectory::GetNewFontId(void) -{ - return (nextFontId--); -} - -void wxFontNameDirectory::Initialize() -{ - Initialize(wxDEFAULT, wxDEFAULT, "Default"); - Initialize(wxDECORATIVE, wxDECORATIVE, "Decorative"); - Initialize(wxROMAN, wxROMAN, "Roman"); - Initialize(wxMODERN, wxMODERN, "Modern"); - Initialize(wxTELETYPE, wxTELETYPE, "Teletype"); - Initialize(wxSWISS, wxSWISS, "Swiss"); - Initialize(wxSCRIPT, wxSCRIPT, "Script"); -} - -void wxFontNameDirectory::Initialize(int fontid, int family, const char *resname) -{ - char *fam, resource[256]; - - sprintf(resource, "Family%s", resname); - SearchResource((const char *)resource, (const char **) NULL, 0, (char **)&fam); - if (fam) { - if (!strcmp(fam, "Default")) family = wxDEFAULT; - else if (!strcmp(fam, "Roman")) family = wxROMAN; - else if (!strcmp(fam, "Decorative")) family = wxDECORATIVE; - else if (!strcmp(fam, "Modern")) family = wxMODERN; - else if (!strcmp(fam, "Teletype")) family = wxTELETYPE; - else if (!strcmp(fam, "Swiss")) family = wxSWISS; - else if (!strcmp(fam, "Script")) family = wxSCRIPT; - delete[] fam; // free resource - } - table->Put(fontid, new wxFontNameItem(resname, fontid, family)); -} - -int wxFontNameDirectory::FindOrCreateFontId(const char *name, int family) -{ - int id; - - // font exists -> return id - if ( (id = GetFontId(name)) ) return id; - // create new font - Initialize(id=GetNewFontId(), family, name); - return id; -} - -char *wxFontNameDirectory::GetScreenName(int fontid, int weight, int style) -{ - wxFontNameItem *item = (wxFontNameItem*)table->Get(fontid); // find font - if (item) - return item->GetScreenName(weight, style); - // font does not exist - return (char *) NULL; -} - -char *wxFontNameDirectory::GetPostScriptName(int fontid, int weight, int style) -{ - wxFontNameItem *item = (wxFontNameItem*)table->Get(fontid); // find font - if (item) - return item->GetPostScriptName(weight, style); - // font does not exist - return (char *) NULL; -} - -char *wxFontNameDirectory::GetAFMName(int fontid, int weight, int style) -{ - wxFontNameItem *item = (wxFontNameItem *)table->Get(fontid); // find font - if (item) - return item->GetAFMName(weight, style); - // font does not exist - return (char *) NULL; -} - -char *wxFontNameDirectory::GetFontName(int fontid) -{ - wxFontNameItem *item = (wxFontNameItem *)table->Get(fontid); // find font - if (item) - return item->GetName(); - // font does not exist - return (char *) NULL; -} - -int wxFontNameDirectory::GetFontId(const char *name) -{ - wxNode *node; - - table->BeginFind(); - - while ( (node = table->Next()) ) { - wxFontNameItem *item = (wxFontNameItem*)node->Data(); - if (!strcmp(name, item->name)) - return item->id; - } - // font does not exist - return 0; -} - -int wxFontNameDirectory::GetFamily(int fontid) -{ - wxFontNameItem *item = (wxFontNameItem *)table->Get(fontid); - - if (item) - return item->family; - // font does not exist - return wxDEFAULT; -} diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp deleted file mode 100644 index 70a326b33d..0000000000 --- a/src/gtk/frame.cpp +++ /dev/null @@ -1,541 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: frame.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "frame.h" -#endif - -#include "wx/frame.h" -#include "wx/dialog.h" -#include "wx/control.h" -#include "wx/app.h" -#include "wx/menu.h" -#include "wx/toolbar.h" -#include "wx/statusbr.h" -#include "wx/mdi.h" -#include "wx/dcclient.h" -#include "wx/gtk/win_gtk.h" - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -const int wxMENU_HEIGHT = 28; -const int wxSTATUS_HEIGHT = 25; - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern wxList wxTopLevelWindows; -extern wxList wxPendingDelete; - -//----------------------------------------------------------------------------- -// "size_allocate" -//----------------------------------------------------------------------------- - -static void gtk_frame_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxFrame *win ) -{ - if (!win->HasVMT()) return; - -/* - printf( "OnFrameResize from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - win->GtkOnSize( alloc->x, alloc->y, alloc->width, alloc->height ); -} - -//----------------------------------------------------------------------------- -// "delete_event" -//----------------------------------------------------------------------------- - -static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxFrame *win ) -{ -/* - printf( "OnDelete from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - win->Close(); - - return TRUE; -} - -//----------------------------------------------------------------------------- -// "configure_event" -//----------------------------------------------------------------------------- - -static gint gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *event, wxFrame *win ) -{ - if (!win->HasVMT()) return FALSE; - - win->m_x = event->x; - win->m_y = event->y; - - return FALSE; -} - -//----------------------------------------------------------------------------- -// wxFrame -//----------------------------------------------------------------------------- - -BEGIN_EVENT_TABLE(wxFrame, wxWindow) - EVT_SIZE(wxFrame::OnSize) - EVT_CLOSE(wxFrame::OnCloseWindow) - EVT_IDLE(wxFrame::OnIdle) -END_EVENT_TABLE() - -IMPLEMENT_DYNAMIC_CLASS(wxFrame,wxWindow) - -wxFrame::wxFrame() -{ - m_frameMenuBar = (wxMenuBar *) NULL; - m_frameStatusBar = (wxStatusBar *) NULL; - m_frameToolBar = (wxToolBar *) NULL; - m_sizeSet = FALSE; - m_addPrivateChild = FALSE; - m_wxwindow = (GtkWidget *) NULL; - m_mainWindow = (GtkWidget *) NULL; - wxTopLevelWindows.Insert( this ); -} - -wxFrame::wxFrame( wxWindow *parent, wxWindowID id, const wxString &title, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - m_frameMenuBar = (wxMenuBar *) NULL; - m_frameStatusBar = (wxStatusBar *) NULL; - m_frameToolBar = (wxToolBar *) NULL; - m_sizeSet = FALSE; - m_addPrivateChild = FALSE; - m_wxwindow = (GtkWidget *) NULL; - m_mainWindow = (GtkWidget *) NULL; - Create( parent, id, title, pos, size, style, name ); - wxTopLevelWindows.Insert( this ); -} - -bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - m_needParent = FALSE; - - PreCreation( parent, id, pos, size, style, name ); - - m_title = title; - - m_widget = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - if ((size.x != -1) && (size.y != -1)) - gtk_widget_set_usize( m_widget, m_width, m_height ); - if ((pos.x != -1) && (pos.y != -1)) - gtk_widget_set_uposition( m_widget, m_x, m_y ); - - gtk_window_set_title( GTK_WINDOW(m_widget), title ); - GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS ); - - gtk_widget_set( m_widget, "GtkWindow::allow_shrink", TRUE, NULL); - - gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event", - GTK_SIGNAL_FUNC(gtk_frame_delete_callback), (gpointer)this ); - - m_mainWindow = gtk_myfixed_new(); - gtk_widget_show( m_mainWindow ); - GTK_WIDGET_UNSET_FLAGS( m_mainWindow, GTK_CAN_FOCUS ); - - gtk_container_add( GTK_CONTAINER(m_widget), m_mainWindow ); - gtk_widget_set_uposition( m_mainWindow, 0, 0 ); - - m_wxwindow = gtk_myfixed_new(); - gtk_widget_show( m_wxwindow ); - GTK_WIDGET_UNSET_FLAGS( m_wxwindow, GTK_CAN_FOCUS ); - - gtk_container_add( GTK_CONTAINER(m_mainWindow), m_wxwindow ); - - gtk_signal_connect( GTK_OBJECT(m_widget), "size_allocate", - GTK_SIGNAL_FUNC(gtk_frame_size_callback), (gpointer)this ); - - gtk_signal_connect( GTK_OBJECT(m_widget), "configure_event", - GTK_SIGNAL_FUNC(gtk_frame_configure_callback), (gpointer)this ); - - PostCreation(); - - gtk_widget_realize( m_mainWindow ); - - return TRUE; -} - -wxFrame::~wxFrame() -{ - if (m_frameMenuBar) delete m_frameMenuBar; - if (m_frameStatusBar) delete m_frameStatusBar; - if (m_frameToolBar) delete m_frameToolBar; - -// if (m_mainWindow) gtk_widget_destroy( m_mainWindow ); - - wxTopLevelWindows.DeleteObject( this ); - if (wxTopLevelWindows.Number() == 0) wxTheApp->ExitMainLoop(); -} - -bool wxFrame::Show( bool show ) -{ - if (show) - { - wxSizeEvent event( wxSize(m_width,m_height), GetId() ); - m_sizeSet = FALSE; - ProcessEvent( event ); - } - return wxWindow::Show( show ); -} - -void wxFrame::Enable( bool enable ) -{ - wxWindow::Enable( enable ); - gtk_widget_set_sensitive( m_mainWindow, enable ); -} - -void wxFrame::OnCloseWindow( wxCloseEvent &event ) -{ - if ( GetEventHandler()->OnClose() || event.GetForce()) - { - this->Destroy(); - } -} - -bool wxFrame::Destroy() -{ - if (!wxPendingDelete.Member(this)) - wxPendingDelete.Append(this); - - return TRUE; -} - -void wxFrame::ImplementSetPosition(void) -{ - if ((m_x != -1) || (m_y != -1)) - gtk_widget_set_uposition( m_widget, m_x, m_y ); -} - -void wxFrame::Centre( int direction ) -{ - if (direction & wxHORIZONTAL == wxHORIZONTAL) m_x = (gdk_screen_width () - m_width) / 2; - if (direction & wxVERTICAL == wxVERTICAL) m_y = (gdk_screen_height () - m_height) / 2; - ImplementSetPosition(); -} - -void wxFrame::GetClientSize( int *width, int *height ) const -{ - wxWindow::GetClientSize( width, height ); - if (height) - { - if (m_frameMenuBar) (*height) -= wxMENU_HEIGHT; - if (m_frameStatusBar) (*height) -= wxSTATUS_HEIGHT; - if (m_frameToolBar) - { - int y = 0; - m_frameToolBar->GetSize( (int *) NULL, &y ); - (*height) -= y; - } - } -} - -void wxFrame::SetClientSize( int const width, int const height ) -{ - int h = height; - if (m_frameMenuBar) h += wxMENU_HEIGHT; - if (m_frameStatusBar) h += wxSTATUS_HEIGHT; - if (m_frameToolBar) - { - int y = 0; - m_frameToolBar->GetSize( (int *) NULL, &y ); - h += y; - } - wxWindow::SetClientSize( width, h ); -} - -void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height ) -{ - // due to a bug in gtk, x,y are always 0 - // m_x = x; - // m_y = y; - - if ((m_height == height) && (m_width == width) && - (m_sizeSet)) return; - if (!m_mainWindow) return; - if (!m_wxwindow) return; - - m_width = width; - m_height = height; - if ((m_minWidth != -1) && (m_width < m_minWidth)) m_width = m_minWidth; - if ((m_minHeight != -1) && (m_height < m_minHeight)) m_height = m_minHeight; - if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_minWidth; - if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_minHeight; - - gtk_widget_set_usize( m_widget, width, height ); - - int main_x = 0; - int main_y = 0; - int main_height = height; - int main_width = width; - - // This emulates Windows behaviour: - // The menu bar is part of the main window, but the status bar - // is on the implementation side in the client area. The - // function GetClientSize returns the size of the client area - // minus the status bar height. Under wxGTK, the main window - // is represented by m_mainWindow. The menubar is inserted - // into m_mainWindow whereas the statusbar is insertes into - // m_wxwindow just like any other window. - -// not really needed -// gtk_widget_set_usize( m_mainWindow, width, height ); - - if (m_frameMenuBar) - { - main_y = wxMENU_HEIGHT; - main_height -= wxMENU_HEIGHT; - } - - int toolbar_height = 0; - if (m_frameToolBar) m_frameToolBar->GetSize( (int *) NULL, &toolbar_height ); - - main_y += toolbar_height; - main_height -= toolbar_height; - - gtk_myfixed_move( GTK_MYFIXED(m_mainWindow), m_wxwindow, main_x, main_y ); - gtk_widget_set_usize( m_wxwindow, main_width, main_height ); - - if (m_frameMenuBar) - { - gtk_myfixed_move( GTK_MYFIXED(m_mainWindow), m_frameMenuBar->m_widget, 1, 1 ); - gtk_widget_set_usize( m_frameMenuBar->m_widget, width-2, wxMENU_HEIGHT-2 ); - } - - if (m_frameToolBar) - { - gtk_myfixed_move( GTK_MYFIXED(m_mainWindow), m_frameToolBar->m_widget, 1, wxMENU_HEIGHT ); - gtk_widget_set_usize( m_frameToolBar->m_widget, width-2, toolbar_height ); - } - - if (m_frameStatusBar) - { - m_frameStatusBar->SetSize( 0, main_height-wxSTATUS_HEIGHT, width, wxSTATUS_HEIGHT ); - } - - m_sizeSet = TRUE; - - wxSizeEvent event( wxSize(m_width,m_height), GetId() ); - event.SetEventObject( this ); - ProcessEvent( event ); -} - -void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) ) -{ - if ( GetAutoLayout() ) - Layout(); - else { - // no child: go out ! - if (!GetChildren()->First()) - return; - - // do we have exactly one child? - wxWindow *child = (wxWindow *) NULL; - for(wxNode *node = GetChildren()->First(); node; node = node->Next()) - { - wxWindow *win = (wxWindow *)node->Data(); - if (!IS_KIND_OF(win,wxFrame) && !IS_KIND_OF(win,wxDialog) -#if 0 // not in m_children anyway - && (win != m_frameMenuBar) && - (win != m_frameToolBar) && - (win != m_frameStatusBar) -#endif - ) - { - if ( child ) // it's the second one: do nothing - return; - - child = win; - } - } - - // yes: set it's size to fill all the frame - int client_x, client_y; - GetClientSize(&client_x, &client_y); - child->SetSize( 1, 1, client_x-2, client_y); - } -} - -void wxFrame::AddChild( wxWindow *child ) -{ - // wxFrame and wxDialog as children aren't placed into the parents - - if (IS_KIND_OF(child,wxMDIChildFrame)) wxFAIL_MSG( "wxFrame::AddChild error.\n" ); - - if ( IS_KIND_OF(child,wxFrame) || IS_KIND_OF(child,wxDialog)) - { - m_children.Append( child ); - - if ((child->m_x != -1) && (child->m_y != -1)) - gtk_widget_set_uposition( child->m_widget, child->m_x, child->m_y ); - - return; - } - - if (m_addPrivateChild) - { - gtk_myfixed_put( GTK_MYFIXED(m_mainWindow), child->m_widget, child->m_x, child->m_y ); - - gtk_widget_set_usize( child->m_widget, child->m_width, child->m_height ); - } - else - { - m_children.Append( child ); - - if (m_wxwindow) - gtk_myfixed_put( GTK_MYFIXED(m_wxwindow), child->m_widget, child->m_x, child->m_y ); - - gtk_widget_set_usize( child->m_widget, child->m_width, child->m_height ); - } -} - -static void SetInvokingWindow( wxMenu *menu, wxWindow *win ) -{ - menu->SetInvokingWindow( win ); - wxNode *node = menu->m_items.First(); - while (node) - { - wxMenuItem *menuitem = (wxMenuItem*)node->Data(); - if (menuitem->IsSubMenu()) - SetInvokingWindow( menuitem->GetSubMenu(), win ); - node = node->Next(); - } -} - -void wxFrame::SetMenuBar( wxMenuBar *menuBar ) -{ - m_frameMenuBar = menuBar; - - if (m_frameMenuBar) - { - wxNode *node = m_frameMenuBar->m_menus.First(); - while (node) - { - wxMenu *menu = (wxMenu*)node->Data(); - SetInvokingWindow( menu, this ); - node = node->Next(); - } - - if (m_frameMenuBar->m_parent != this) - { - m_frameMenuBar->m_parent = this; - gtk_myfixed_put( GTK_MYFIXED(m_mainWindow), - m_frameMenuBar->m_widget, m_frameMenuBar->m_x, m_frameMenuBar->m_y ); - } - } -} - -wxMenuBar *wxFrame::GetMenuBar(void) const -{ - return m_frameMenuBar; -} - -wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& name) -{ - wxCHECK_MSG( m_frameToolBar == NULL, FALSE, "recreating toolbar in wxFrame" ); - - m_addPrivateChild = TRUE; - m_frameToolBar = OnCreateToolBar( style, id, name ); - m_addPrivateChild = FALSE; - - return m_frameToolBar; -} - -wxToolBar* wxFrame::OnCreateToolBar( long style, wxWindowID id, const wxString& name ) -{ - return new wxToolBar( this, id, wxDefaultPosition, wxDefaultSize, style, name ); -} - -wxToolBar *wxFrame::GetToolBar(void) const -{ - return m_frameToolBar; -} - -wxStatusBar* wxFrame::CreateStatusBar( int number, long style, wxWindowID id, const wxString& name ) -{ - wxCHECK_MSG( m_frameStatusBar == NULL, FALSE, "recreating status bar in wxFrame" ); - - m_frameStatusBar = OnCreateStatusBar( number, style, id, name ); - - return m_frameStatusBar; -} - -wxStatusBar *wxFrame::OnCreateStatusBar( int number, long style, wxWindowID id, const wxString& name ) -{ - wxStatusBar *statusBar = (wxStatusBar *) NULL; - - statusBar = new wxStatusBar(this, id, wxPoint(0, 0), wxSize(100, 20), style, name); - - // Set the height according to the font and the border size - wxClientDC dc(statusBar); - dc.SetFont( *statusBar->GetFont() ); - - long x, y; - dc.GetTextExtent( "X", &x, &y ); - - int height = (int)( (y * 1.1) + 2* statusBar->GetBorderY()); - - statusBar->SetSize( -1, -1, 100, height ); - - statusBar->SetFieldsCount( number ); - return statusBar; -} - -void wxFrame::SetStatusText(const wxString& text, int number) -{ - wxCHECK_RET( m_frameStatusBar != NULL, "no statusbar to set text for" ); - - m_frameStatusBar->SetStatusText(text, number); -} - -void wxFrame::SetStatusWidths(int n, const int widths_field[] ) -{ - wxCHECK_RET( m_frameStatusBar != NULL, "no statusbar to set widths for" ); - - m_frameStatusBar->SetStatusWidths(n, widths_field); -} - -wxStatusBar *wxFrame::GetStatusBar(void) const -{ - return m_frameStatusBar; -} - -void wxFrame::SetTitle( const wxString &title ) -{ - m_title = title; - if (m_title.IsNull()) m_title = ""; - gtk_window_set_title( GTK_WINDOW(m_widget), title ); -} - -void wxFrame::SetIcon( const wxIcon &icon ) -{ - m_icon = icon; - if (!icon.Ok()) return; - - wxMask *mask = icon.GetMask(); - GdkBitmap *bm = (GdkBitmap *) NULL; - if (mask) bm = mask->GetBitmap(); - - gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm ); -} - diff --git a/src/gtk/gauge.cpp b/src/gtk/gauge.cpp deleted file mode 100644 index 8499339d67..0000000000 --- a/src/gtk/gauge.cpp +++ /dev/null @@ -1,71 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gauge.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "gauge.h" -#endif - -#include "wx/gauge.h" - -//----------------------------------------------------------------------------- -// wxGauge -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxGauge,wxControl) - -bool wxGauge::Create( wxWindow *parent, wxWindowID id, int range, - const wxPoint& pos, const wxSize& size, - long style, const wxValidator& validator, const wxString& name ) -{ - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - SetValidator( validator ); - - m_rangeMax = range; - m_gaugePos = 0; - m_useProgressBar = TRUE; - - m_widget = gtk_progress_bar_new(); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -void wxGauge::SetRange( int r ) -{ - m_rangeMax = r; - if (m_gaugePos > m_rangeMax) m_gaugePos = m_rangeMax; - - gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), ((float)m_gaugePos)/m_rangeMax ); -} - -void wxGauge::SetValue( int pos ) -{ - m_gaugePos = pos; - if (m_gaugePos > m_rangeMax) m_gaugePos = m_rangeMax; - - gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), ((float)m_gaugePos)/m_rangeMax ); -} - -int wxGauge::GetRange(void) const -{ - return m_rangeMax; -} - -int wxGauge::GetValue(void) const -{ - return m_gaugePos; -} - diff --git a/src/gtk/gdiobj.cpp b/src/gtk/gdiobj.cpp deleted file mode 100644 index 8df2e5ff09..0000000000 --- a/src/gtk/gdiobj.cpp +++ /dev/null @@ -1,21 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gdiobj.cpp -// Purpose: wxGDIObject class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "gdiobj.h" -#endif - -#include "wx/gdiobj.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxGDIObject, wxObject) -#endif - diff --git a/src/gtk/horiz.xbm b/src/gtk/horiz.xbm deleted file mode 100644 index ff3309bcc4..0000000000 --- a/src/gtk/horiz.xbm +++ /dev/null @@ -1,6 +0,0 @@ -#define horiz_width 15 -#define horiz_height 15 -static char horiz_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00}; diff --git a/src/gtk/icon.cpp b/src/gtk/icon.cpp deleted file mode 100644 index 33d85df2ac..0000000000 --- a/src/gtk/icon.cpp +++ /dev/null @@ -1,48 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: icon.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "icon.h" -#endif - -#include "wx/icon.h" - -//----------------------------------------------------------------------------- -// wxIcon -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxIcon,wxBitmap) - -wxIcon::wxIcon( char **bits, int WXUNUSED(width), int WXUNUSED(height) ) : - wxBitmap( bits ) -{ -} - -wxIcon::wxIcon() : wxBitmap() -{ -} - -wxIcon::wxIcon(const wxIcon& icon) : wxBitmap() -{ - Ref(icon); -} - -wxIcon::wxIcon(const wxIcon* icon) : wxBitmap() -{ - if (icon) Ref(*icon); -} - -wxIcon& wxIcon::operator = (const wxIcon& icon) -{ - if (*this == icon) return (*this); - Ref(icon); - return *this; -} - diff --git a/src/gtk/joystick.cpp b/src/gtk/joystick.cpp deleted file mode 100644 index e783f1276d..0000000000 --- a/src/gtk/joystick.cpp +++ /dev/null @@ -1,358 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: joystick.cpp -// Purpose: wxJoystick class -// Author: Ported to Linux by Guilhem Lavaux -// Modified by: -// Created: 05/23/98 -// RCS-ID: $Id$ -// Copyright: (c) Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "joystick.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include "wx/event.h" -#include "wx/window.h" -#include "wx/gtk/joystick.h" - -#define JOYSTICK_AXE_MAX 32767 -#define JOYSTICK_AXE_MIN -32767 - -IMPLEMENT_DYNAMIC_CLASS(wxJoystick, wxObject) - -wxJoystick::wxJoystick(int joystick) -{ - wxString dev_name; - // Assume it's the same device name on all Linux systems ... - dev_name.Printf("/dev/js%d", (joystick == wxJOYSTICK1) ? 0 : 1); - - m_joystick = open(dev_name, O_RDWR); - m_lastposition = wxPoint(-1, -1); - for (int i=0;i<15;i++) - m_axe[i] = 0; - if (m_joystick != -1) - Create(); -} - -//////////////////////////////////////////////////////////////////////////// -// Background thread -//////////////////////////////////////////////////////////////////////////// -void *wxJoystick::Entry(void) -{ - struct js_event j_evt; - wxJoystickEvent jwx_event; - fd_set read_fds; - struct timeval time_out = {0, 0}; - - FD_ZERO(&read_fds); - DeferDestroy(TRUE); - while (1) { - TestDestroy(); - - if (m_polling) { - FD_SET(m_joystick, &read_fds); - select(m_joystick+1, &read_fds, NULL, NULL, &time_out); - if (FD_ISSET(m_joystick, &read_fds)) - read(m_joystick, &j_evt, sizeof(j_evt)); - else - j_evt.type = 0; - } else { - read(m_joystick, &j_evt, sizeof(j_evt)); - } - - if ((j_evt.type & JS_EVENT_AXIS) == JS_EVENT_AXIS) { - switch (j_evt.number) { - case 1: - m_lastposition.x = j_evt.value; - jwx_event.SetEventType(wxEVT_JOY_MOVE); - break; - case 2: - m_lastposition.y = j_evt.value; - jwx_event.SetEventType(wxEVT_JOY_MOVE); - break; - case 3: - m_axe[3] = j_evt.value; - jwx_event.SetEventType(wxEVT_JOY_ZMOVE); - break; - default: - m_axe[j_evt.number] = j_evt.value; - jwx_event.SetEventType(wxEVT_JOY_MOVE); - break; - } - jwx_event.SetPosition(m_lastposition); - jwx_event.SetZPosition(m_axe[3]); - } - if ((j_evt.type & JS_EVENT_BUTTON) == JS_EVENT_BUTTON) { - register int mask = 1 << j_evt.number; - char button = m_buttons & mask; - - m_buttons &= ~mask; - if (button) { - jwx_event.SetEventType(wxEVT_JOY_BUTTON_UP); - } else { - jwx_event.SetEventType(wxEVT_JOY_BUTTON_DOWN); - m_buttons |= mask; - } - - jwx_event.SetButtonState(m_buttons); - jwx_event.SetButtonChange(j_evt.number); - } - } - if (m_catchwin) - m_catchwin->ProcessEvent(jwx_event); - if (m_polling) - usleep(m_polling*1000); -} - -//////////////////////////////////////////////////////////////////////////// -// State -//////////////////////////////////////////////////////////////////////////// - -wxPoint wxJoystick::GetPosition(void) const -{ - return m_lastposition; -} - -int wxJoystick::GetZPosition(void) const -{ - return m_axe[3]; -} - -int wxJoystick::GetButtonState(void) const -{ - return m_buttons; -} - -int wxJoystick::GetPOVPosition(void) const -{ - return 0; -} - -int wxJoystick::GetPOVCTSPosition(void) const -{ - return 0; -} - -int wxJoystick::GetRudderPosition(void) const -{ - return m_axe[4]; -} - -int wxJoystick::GetUPosition(void) const -{ - return m_axe[5]; -} - -int wxJoystick::GetVPosition(void) const -{ - return m_axe[6]; -} - -int wxJoystick::GetMovementThreshold(void) const -{ - return 0; -} - -void wxJoystick::SetMovementThreshold(int threshold) -{ -} - -//////////////////////////////////////////////////////////////////////////// -// Capabilities -//////////////////////////////////////////////////////////////////////////// - -bool wxJoystick::IsOk(void) const -{ - return (m_joystick != -1); -} - -int wxJoystick::GetNumberJoysticks(void) const -{ - wxString dev_name; - int fd, j; - - for (j=0;j<2;j++) { - dev_name.Printf("/dev/js%d", j); - fd = open(dev_name, O_RDONLY); - if (fd == -1) - return j; - close(fd); - } - return j; -} - -int wxJoystick::GetManufacturerId(void) const -{ - return 0; -} - -int wxJoystick::GetProductId(void) const -{ - return 0; -} - -wxString wxJoystick::GetProductName(void) const -{ - return ""; -} - -int wxJoystick::GetXMin(void) const -{ - return JOYSTICK_AXE_MAX; -} - -int wxJoystick::GetYMin(void) const -{ - return JOYSTICK_AXE_MAX; -} - -int wxJoystick::GetZMin(void) const -{ - return JOYSTICK_AXE_MAX; -} - -int wxJoystick::GetXMax(void) const -{ - return JOYSTICK_AXE_MAX; -} - -int wxJoystick::GetYMax(void) const -{ - return JOYSTICK_AXE_MAX; -} - -int wxJoystick::GetZMax(void) const -{ - return JOYSTICK_AXE_MAX; -} - -int wxJoystick::GetNumberButtons(void) const -{ - int nb; - - ioctl(m_joystick, JSIOCGBUTTONS, &nb); - - return nb; -} - -int wxJoystick::GetNumberAxes(void) const -{ - int nb; - - ioctl(m_joystick, JSIOCGAXES, &nb); - - return nb; -} - -int wxJoystick::GetMaxButtons(void) const -{ - return 15; // internal -} - -int wxJoystick::GetMaxAxes(void) const -{ - return 15; // internal -} - -int wxJoystick::GetPollingMin(void) const -{ - return -1; -} - -int wxJoystick::GetPollingMax(void) const -{ - return -1; -} - -int wxJoystick::GetRudderMin(void) const -{ - return JOYSTICK_AXE_MIN; -} - -int wxJoystick::GetRudderMax(void) const -{ - return JOYSTICK_AXE_MAX; -} - -int wxJoystick::GetUMin(void) const -{ - return JOYSTICK_AXE_MIN; -} - -int wxJoystick::GetUMax(void) const -{ - return JOYSTICK_AXE_MAX; -} - -int wxJoystick::GetVMin(void) const -{ - return JOYSTICK_AXE_MIN; -} - -int wxJoystick::GetVMax(void) const -{ - return JOYSTICK_AXE_MAX; -} - -bool wxJoystick::HasRudder(void) const -{ - return GetNumberAxes() >= 4; -} - -bool wxJoystick::HasZ(void) const -{ - return GetNumberAxes() >= 3; -} - -bool wxJoystick::HasU(void) const -{ - return GetNumberAxes() >= 5; -} - -bool wxJoystick::HasV(void) const -{ - return GetNumberAxes() >= 6; -} - -bool wxJoystick::HasPOV(void) const -{ - return FALSE; -} - -bool wxJoystick::HasPOV4Dir(void) const -{ - return FALSE; -} - -bool wxJoystick::HasPOVCTS(void) const -{ - return FALSE; -} - -//////////////////////////////////////////////////////////////////////////// -// Operations -//////////////////////////////////////////////////////////////////////////// - -bool wxJoystick::SetCapture(wxWindow* win, int pollingFreq = 0) -{ - m_catchwin = win; - m_polling = pollingFreq; - return TRUE; -} - -bool wxJoystick::ReleaseCapture(void) -{ - m_catchwin = NULL; - m_polling = 0; - return TRUE; -} - diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp deleted file mode 100644 index 916d8490ad..0000000000 --- a/src/gtk/listbox.cpp +++ /dev/null @@ -1,381 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: listbox.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "listbox.h" -#endif - -#include "wx/dynarray.h" -#include "wx/listbox.h" -#include "wx/utils.h" -#include - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxListBox -//----------------------------------------------------------------------------- - -static void gtk_listitem_select_callback( GtkWidget *WXUNUSED(widget), wxListBox *listbox ) -{ - if (!listbox->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - wxCommandEvent event(wxEVT_COMMAND_LISTBOX_SELECTED, listbox->GetId() ); - - wxArrayInt aSelections; - int count = listbox->GetSelections(aSelections); - if ( count > 0 ) - { - event.m_commandInt = aSelections[0] ; - event.m_clientData = listbox->GetClientData(event.m_commandInt); - wxString str(listbox->GetString(event.m_commandInt)); - if (str != "") - event.m_commandString = copystring((char *)(const char *)str); - } - else - { - event.m_commandInt = -1 ; - event.m_commandString = copystring("") ; - } - - event.SetEventObject( listbox ); - - listbox->GetEventHandler()->ProcessEvent( event ); - if (event.m_commandString) delete[] event.m_commandString ; -} - -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxListBox,wxControl) - -wxListBox::wxListBox(void) -{ - m_list = (GtkList *) NULL; -} - -bool wxListBox::Create( wxWindow *parent, wxWindowID id, - const wxPoint &pos, const wxSize &size, - int n, const wxString choices[], - long style, const wxValidator& validator, const wxString &name ) -{ - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - SetValidator( validator ); - - m_widget = gtk_scrolled_window_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL ); - gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(m_widget), - GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC ); - - m_list = GTK_LIST( gtk_list_new() ); - - // @@ what's the difference between BROWSE and SINGLE? - GtkSelectionMode mode = GTK_SELECTION_BROWSE; - if ( style & wxLB_MULTIPLE ) - mode = GTK_SELECTION_MULTIPLE; - else if ( style & wxLB_EXTENDED ) - mode = GTK_SELECTION_EXTENDED; - - gtk_list_set_selection_mode( GTK_LIST(m_list), mode ); - - gtk_container_add (GTK_CONTAINER(m_widget), GTK_WIDGET(m_list) ); - gtk_widget_show( GTK_WIDGET(m_list) ); - - for (int i = 0; i < n; i++) - { - GtkWidget *list_item; - list_item = gtk_list_item_new_with_label( choices[i] ); - - gtk_container_add( GTK_CONTAINER(m_list), list_item ); - - gtk_signal_connect( GTK_OBJECT(list_item), "select", - GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this ); - - if ( style & wxLB_MULTIPLE ) - gtk_signal_connect( GTK_OBJECT(list_item), "deselect", - GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this ); - - m_clientData.Append( (wxObject*)NULL ); - - gtk_widget_show( list_item ); - } - - PostCreation(); - - gtk_widget_realize( GTK_WIDGET(m_list) ); - - Show( TRUE ); - - return TRUE; -} - -void wxListBox::Append( const wxString &item ) -{ - Append( item, (char*)NULL ); -} - -void wxListBox::Append( const wxString &item, char *clientData ) -{ - GtkWidget *list_item; - list_item = gtk_list_item_new_with_label( item ); - - gtk_signal_connect( GTK_OBJECT(list_item), "select", - GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this ); - - if ( GetWindowStyleFlag() & wxLB_MULTIPLE ) - gtk_signal_connect( GTK_OBJECT(list_item), "deselect", - GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this ); - - m_clientData.Append( (wxObject*)clientData ); - - gtk_container_add( GTK_CONTAINER(m_list), list_item ); - - gtk_widget_show( list_item ); -} - -void wxListBox::Clear(void) -{ - gtk_list_clear_items( m_list, 0, Number() ); - - m_clientData.Clear(); -} - -void wxListBox::Delete( int n ) -{ - GList *child = g_list_nth( m_list->children, n ); - - if (!child) - { - wxFAIL_MSG("wrong listbox index"); - return; - } - - GList *list = g_list_append( NULL, child->data ); - gtk_list_remove_items( m_list, list ); - g_list_free( list ); - - wxNode *node = m_clientData.Nth( n ); - if (!node) - { - wxFAIL_MSG("wrong listbox index"); - } - else - m_clientData.DeleteNode( node ); -} - -void wxListBox::Deselect( int n ) -{ - gtk_list_unselect_item( m_list, n ); -} - -int wxListBox::FindString( const wxString &item ) const -{ - GList *child = m_list->children; - int count = 0; - while (child) - { - GtkBin *bin = GTK_BIN( child->data ); - GtkLabel *label = GTK_LABEL( bin->child ); - if (item == label->label) return count; - count++; - child = child->next; - } - wxFAIL_MSG("wrong listbox index"); - return -1; -} - -char *wxListBox::GetClientData( int n ) const -{ - wxNode *node = m_clientData.Nth( n ); - if (node) return ((char*)node->Data()); - - wxFAIL_MSG("wrong listbox index"); - return (char *) NULL; -} - -int wxListBox::GetSelection(void) const -{ - GList *selection = m_list->selection; - if (selection) - { - GList *child = m_list->children; - int count = 0; - while (child) - { - if (child->data == selection->data) return count; - count++; - child = child->next; - } - } - wxFAIL_MSG("wrong listbox index"); - return -1; -} - -int wxListBox::GetSelections(wxArrayInt& aSelections) const -{ - // get the number of selected items first - GList *child = m_list->children; - int count = 0; - for ( child = m_list->children; child != NULL; child = child->next ) { - if ( GTK_WIDGET(child->data)->state == GTK_STATE_SELECTED ) - count++; - } - - aSelections.Empty(); - - if ( count > 0 ) { - // now fill the list - aSelections.Alloc(count); // optimization attempt - int i = 0; - for ( child = m_list->children; child != NULL; child = child->next, i++ ) { - if ( GTK_WIDGET(child->data)->state == GTK_STATE_SELECTED ) - aSelections.Add(i); - } - } - - return count; -} - -wxString wxListBox::GetString( int n ) const -{ - GList *child = g_list_nth( m_list->children, n ); - if (child) - { - GtkBin *bin = GTK_BIN( child->data ); - GtkLabel *label = GTK_LABEL( bin->child ); - return label->label; - } - wxFAIL_MSG("wrong listbox index"); - return ""; -} - -wxString wxListBox::GetStringSelection(void) const -{ - GList *selection = m_list->selection; - if (selection) - { - GtkBin *bin = GTK_BIN( selection->data ); - wxString tmp = GTK_LABEL( bin->child )->label; - return tmp; - } - wxFAIL_MSG("no listbox selection available"); - return ""; -} - -int wxListBox::Number(void) -{ - GList *child = m_list->children; - int count = 0; - while (child) { count++; child = child->next; } - return count; -} - -bool wxListBox::Selected( int n ) -{ - GList *target = g_list_nth( m_list->children, n ); - if (target) - { - GList *child = m_list->selection; - while (child) - { - if (child->data == target->data) return TRUE; - child = child->next; - } - } - wxFAIL_MSG("wrong listbox index"); - return FALSE; -} - -void wxListBox::Set( int WXUNUSED(n), const wxString *WXUNUSED(choices) ) -{ - wxFAIL_MSG("wxListBox::Set not implemented"); -} - -void wxListBox::SetClientData( int n, char *clientData ) -{ - wxNode *node = m_clientData.Nth( n ); - if (node) - { - node->SetData( (wxObject*)clientData ); - } - else - { - wxFAIL_MSG("wrong listbox index"); - } -} - -void wxListBox::SetFirstItem( int WXUNUSED(n) ) -{ - wxFAIL_MSG("wxListBox::SetFirstItem not implemented"); -} - -void wxListBox::SetFirstItem( const wxString &WXUNUSED(item) ) -{ - wxFAIL_MSG("wxListBox::SetFirstItem not implemented"); -} - -void wxListBox::SetSelection( int n, bool select ) -{ - if (select) - gtk_list_select_item( m_list, n ); - else - gtk_list_unselect_item( m_list, n ); -} - -void wxListBox::SetString( int n, const wxString &string ) -{ - GList *child = g_list_nth( m_list->children, n ); - if (child) - { - GtkBin *bin = GTK_BIN( child->data ); - GtkLabel *label = GTK_LABEL( bin->child ); - gtk_label_set( label, string ); - } - else - { - wxFAIL_MSG("wrong listbox index"); - } -} - -void wxListBox::SetStringSelection( const wxString &string, bool select ) -{ - SetSelection( FindString(string), select ); -} - -int wxListBox::GetIndex( GtkWidget *item ) const -{ - if (item) - { - GList *child = m_list->children; - int count = 0; - while (child) - { - if (GTK_WIDGET(child->data) == item) return count; - count++; - child = child->next; - } - } - return -1; -} - -GtkWidget *wxListBox::GetConnectWidget(void) -{ - return GTK_WIDGET(m_list); -} - - - diff --git a/src/gtk/mdi.cpp b/src/gtk/mdi.cpp deleted file mode 100644 index f902779e84..0000000000 --- a/src/gtk/mdi.cpp +++ /dev/null @@ -1,354 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: mdi.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "mdi.h" -#endif - -#include "wx/mdi.h" -#include "wx/dialog.h" -#include "wx/menu.h" -#include "wx/gtk/win_gtk.h" -#include - -//----------------------------------------------------------------------------- - -extern wxList wxPendingDelete; - -//----------------------------------------------------------------------------- -// wxMDIParentFrame -//----------------------------------------------------------------------------- - -static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxWindow *win ) -{ - if ((win->m_x == alloc->x) && - (win->m_y == alloc->y) && - (win->m_width == alloc->width) && - (win->m_height == alloc->height)) - { - return; - } - - win->SetSize( alloc->x, alloc->y, alloc->width, alloc->height ); -} - -// page change callback -static void gtk_page_change_callback( GtkNotebook *WXUNUSED(widget), - GtkNotebookPage *page, - gint WXUNUSED(nPage), - wxMDIClientWindow *client_win ) -{ - wxNode *node = client_win->m_children.First(); - while (node) - { - wxMDIChildFrame *child_frame = (wxMDIChildFrame *)node->Data(); - if (child_frame->m_page == page) - { - wxMDIParentFrame *mdi_frame = (wxMDIParentFrame*)client_win->m_parent; - mdi_frame->m_currentChild = child_frame; - mdi_frame->SetMDIMenuBar( child_frame->m_menuBar ); - return; - } - node = node->Next(); - } -} - -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame,wxFrame) - -BEGIN_EVENT_TABLE(wxMDIParentFrame, wxFrame) -END_EVENT_TABLE() - -wxMDIParentFrame::wxMDIParentFrame(void) -{ - m_clientWindow = (wxMDIClientWindow *) NULL; - m_currentChild = (wxMDIChildFrame *) NULL; - m_parentFrameActive = TRUE; -} - -wxMDIParentFrame::wxMDIParentFrame( wxWindow *parent, - wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) -{ - m_clientWindow = (wxMDIClientWindow *) NULL; - m_currentChild = (wxMDIChildFrame *) NULL; - m_parentFrameActive = TRUE; - Create( parent, id, title, pos, size, style, name ); -} - -wxMDIParentFrame::~wxMDIParentFrame(void) -{ -} - -bool wxMDIParentFrame::Create( wxWindow *parent, - wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) -{ - wxFrame::Create( parent, id, title, pos, size, style, name ); - - OnCreateClient(); - - return TRUE; -} - -void wxMDIParentFrame::GtkOnSize( int x, int y, int width, int height ) -{ - wxFrame::GtkOnSize( x, y, width, height ); - - if (m_mdiMenuBar) - { - int x = 0; - int y = 0; - GetClientSize( &x, &y ); - m_mdiMenuBar->SetSize( 1, 1, x-2, 26 ); - } -} - -void wxMDIParentFrame::SetMDIMenuBar( wxMenuBar *menu_bar ) -{ - if (m_mdiMenuBar) m_mdiMenuBar->Show( FALSE ); - m_mdiMenuBar = menu_bar; - if (m_mdiMenuBar) - { - int x = 0; - int y = 0; - GetClientSize( &x, &y ); - m_mdiMenuBar->SetSize( 1, 1, x-2, 26 ); - m_mdiMenuBar->Show( TRUE ); - } -} - -void wxMDIParentFrame::GetClientSize(int *width, int *height ) const -{ - wxFrame::GetClientSize( width, height ); -} - -wxMDIChildFrame *wxMDIParentFrame::GetActiveChild(void) const -{ - return m_currentChild; -} - -wxMDIClientWindow *wxMDIParentFrame::GetClientWindow(void) const -{ - return m_clientWindow; -} - -wxMDIClientWindow *wxMDIParentFrame::OnCreateClient(void) -{ - m_clientWindow = new wxMDIClientWindow( this ); - return m_clientWindow; -} - -void wxMDIParentFrame::ActivateNext(void) -{ - if (m_clientWindow) - gtk_notebook_next_page( GTK_NOTEBOOK(m_clientWindow->m_widget) ); -} - -void wxMDIParentFrame::ActivatePrevious(void) -{ - if (m_clientWindow) - gtk_notebook_prev_page( GTK_NOTEBOOK(m_clientWindow->m_widget) ); -} - -void wxMDIParentFrame::OnActivate( wxActivateEvent& WXUNUSED(event) ) -{ -} - -void wxMDIParentFrame::OnSysColourChanged( wxSysColourChangedEvent& WXUNUSED(event) ) -{ -} - -//----------------------------------------------------------------------------- -// wxMDIChildFrame -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame,wxFrame) - -BEGIN_EVENT_TABLE(wxMDIChildFrame, wxFrame) - EVT_ACTIVATE(wxMDIChildFrame::OnActivate) -END_EVENT_TABLE() - -wxMDIChildFrame::wxMDIChildFrame(void) -{ - m_menuBar = (wxMenuBar *) NULL; - m_page = (GtkNotebookPage *) NULL; -} - -wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent, - wxWindowID id, const wxString& title, - const wxPoint& WXUNUSED(pos), const wxSize& size, - long style, const wxString& name ) -{ - m_menuBar = (wxMenuBar *) NULL; - m_page = (GtkNotebookPage *) NULL; - Create( parent, id, title, wxDefaultPosition, size, style, name ); -} - -wxMDIChildFrame::~wxMDIChildFrame(void) -{ - if (m_menuBar) - { - wxMDIParentFrame *mdi_frame = (wxMDIParentFrame*)m_parent->m_parent; - if (mdi_frame->m_currentChild == this) - { - mdi_frame->SetMDIMenuBar( (wxMenuBar *) NULL ); - mdi_frame->m_currentChild = (wxMDIChildFrame *) NULL; - } - delete m_menuBar; - } -} - -bool wxMDIChildFrame::Create( wxMDIParentFrame *parent, - wxWindowID id, const wxString& title, - const wxPoint& WXUNUSED(pos), const wxSize& size, - long style, const wxString& name ) -{ - m_title = title; - return wxWindow::Create( parent->GetClientWindow(), id, wxDefaultPosition, size, style, name ); -} - -void wxMDIChildFrame::GetClientSize( int *width, int *height ) const -{ - wxWindow::GetClientSize( width, height ); -} - -void wxMDIChildFrame::AddChild( wxWindow *child ) -{ - wxWindow::AddChild( child ); -} - -static void SetInvokingWindow( wxMenu *menu, wxWindow *win ) -{ - menu->SetInvokingWindow( win ); - wxNode *node = menu->m_items.First(); - while (node) - { - wxMenuItem *menuitem = (wxMenuItem*)node->Data(); - if (menuitem->IsSubMenu()) - SetInvokingWindow( menuitem->GetSubMenu(), win ); - node = node->Next(); - } -} - -void wxMDIChildFrame::SetMenuBar( wxMenuBar *menu_bar ) -{ - m_menuBar = menu_bar; - - if (m_menuBar) - { - wxMDIParentFrame *mdi_frame = (wxMDIParentFrame*)m_parent->m_parent; - - if (m_menuBar->m_parent != this) - { - wxNode *node = m_menuBar->m_menus.First(); - while (node) - { - wxMenu *menu = (wxMenu*)node->Data(); - SetInvokingWindow( menu, this ); - node = node->Next(); - } - - m_menuBar->m_parent = mdi_frame; - } - mdi_frame->SetMDIMenuBar( m_menuBar ); - - gtk_myfixed_put( GTK_MYFIXED(mdi_frame->m_mainWindow), - m_menuBar->m_widget, m_menuBar->m_x, m_menuBar->m_y ); - } -} - -wxMenuBar *wxMDIChildFrame::GetMenuBar() -{ - return m_menuBar; -} - -void wxMDIChildFrame::Activate(void) -{ -} - -void wxMDIChildFrame::OnActivate( wxActivateEvent &WXUNUSED(event) ) -{ -} - -//----------------------------------------------------------------------------- -// wxMDIClientWindow -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow,wxWindow) - -wxMDIClientWindow::wxMDIClientWindow(void) -{ -} - -wxMDIClientWindow::wxMDIClientWindow( wxMDIParentFrame *parent, long style ) -{ - CreateClient( parent, style ); -} - -wxMDIClientWindow::~wxMDIClientWindow(void) -{ -} - -bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style ) -{ - m_needParent = TRUE; - - PreCreation( parent, -1, wxPoint(10,10), wxSize(100,100), style, "wxMDIClientWindow" ); - - m_widget = gtk_notebook_new(); - - gtk_signal_connect( GTK_OBJECT(m_widget), "switch_page", - GTK_SIGNAL_FUNC(gtk_page_change_callback), (gpointer)this ); - - gtk_notebook_set_scrollable( GTK_NOTEBOOK(m_widget), 1 ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -void wxMDIClientWindow::AddChild( wxWindow *child ) -{ - if (!child->IsKindOf(CLASSINFO(wxMDIChildFrame))) - { - wxFAIL_MSG("wxNotebook::AddChild: Child has to be wxMDIChildFrame"); - return; - } - - m_children.Append( child ); - - wxString s; - wxMDIChildFrame* mdi_child = (wxMDIChildFrame*) child; - s = mdi_child->m_title; - if (s.IsNull()) s = _("MDI child"); - - GtkWidget *label_widget; - label_widget = gtk_label_new( s ); - gtk_misc_set_alignment( GTK_MISC(label_widget), 0.0, 0.5 ); - - gtk_signal_connect( GTK_OBJECT(child->m_widget), "size_allocate", - GTK_SIGNAL_FUNC(gtk_page_size_callback), (gpointer)child ); - - gtk_notebook_append_page( GTK_NOTEBOOK(m_widget), child->m_widget, label_widget ); - - mdi_child->m_page = (GtkNotebookPage*) (g_list_last(GTK_NOTEBOOK(m_widget)->children)->data); - - gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), m_children.Number()-1 ); - - gtk_page_change_callback( (GtkNotebook *) NULL, mdi_child->m_page, 0, this ); -} - - diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp deleted file mode 100644 index fad9d5bb8e..0000000000 --- a/src/gtk/menu.cpp +++ /dev/null @@ -1,428 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: menu.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: $Id$ -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "menu.h" -#endif - -#include "wx/menu.h" -#include "wx/log.h" -#include "wx/intl.h" - -//----------------------------------------------------------------------------- -// wxMenuBar -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxMenuBar,wxWindow) - -wxMenuBar::wxMenuBar() -{ - m_needParent = FALSE; // hmmm - - PreCreation( (wxWindow *) NULL, -1, wxDefaultPosition, wxDefaultSize, 0, "menu" ); - - m_menus.DeleteContents( TRUE ); - - m_widget = gtk_handle_box_new(); - - m_menubar = gtk_menu_bar_new(); - - gtk_container_add( GTK_CONTAINER(m_widget), m_menubar ); - - gtk_widget_show( m_menubar ); - - PostCreation(); - - Show( TRUE ); -} - -void wxMenuBar::Append( wxMenu *menu, const wxString &title ) -{ - m_menus.Append( menu ); - menu->m_title = title; // ?????? - - int pos; - do { - pos = menu->m_title.First( '&' ); - if (pos != -1) menu->m_title.Remove( pos, 1 ); - } while (pos != -1); - - GtkWidget *root_menu; - root_menu = gtk_menu_item_new_with_label( WXSTRINGCAST(menu->m_title) ); - gtk_widget_show( root_menu ); - gtk_menu_item_set_submenu( GTK_MENU_ITEM(root_menu), menu->m_menu ); - - gtk_menu_bar_append( GTK_MENU_BAR(m_menubar), root_menu ); -} - -static int FindMenuItemRecursive( const wxMenu *menu, const wxString &menuString, const wxString &itemString ) -{ - if (menu->m_title == menuString) - { - int res = menu->FindItem( itemString ); - if (res != -1) return res; - } - wxNode *node = menu->m_items.First(); - while (node) - { - wxMenuItem *item = (wxMenuItem*)node->Data(); - if (item->IsSubMenu()) - return FindMenuItemRecursive(item->GetSubMenu(), menuString, itemString); - node = node->Next(); - } - return -1; -} - -int wxMenuBar::FindMenuItem( const wxString &menuString, const wxString &itemString ) const -{ - wxNode *node = m_menus.First(); - while (node) - { - wxMenu *menu = (wxMenu*)node->Data(); - int res = FindMenuItemRecursive( menu, menuString, itemString); - if (res != -1) return res; - node = node->Next(); - } - return -1; -} - -// Find a wxMenuItem using its id. Recurses down into sub-menus -static wxMenuItem* FindMenuItemByIdRecursive(const wxMenu* menu, int id) -{ - wxMenuItem* result = menu->FindItem(id); - - wxNode *node = menu->m_items.First(); - while ( node && result == NULL ) { - wxMenuItem *item = (wxMenuItem*)node->Data(); - if ( item->IsSubMenu() ) - result = FindMenuItemByIdRecursive( item->GetSubMenu(), id ); - node = node->Next(); - } - - return result; -} - -wxMenuItem* wxMenuBar::FindMenuItemById( int id ) const -{ - wxMenuItem* result = 0; - wxNode *node = m_menus.First(); - while (node && result == 0) - { - wxMenu *menu = (wxMenu*)node->Data(); - result = FindMenuItemByIdRecursive( menu, id ); - node = node->Next(); - } - return result; -} - -void wxMenuBar::Check( int id, bool check ) -{ - wxMenuItem* item = FindMenuItemById( id ); - if (item) item->Check(check); -} - -bool wxMenuBar::Checked( int id ) const -{ - wxMenuItem* item = FindMenuItemById( id ); - if (item) return item->IsChecked(); - return FALSE; -} - -void wxMenuBar::Enable( int id, bool enable ) -{ - wxMenuItem* item = FindMenuItemById( id ); - if (item) item->Enable(enable); -} - -bool wxMenuBar::Enabled( int id ) const -{ - wxMenuItem* item = FindMenuItemById( id ); - if (item) return item->IsEnabled(); - return FALSE; -} - -//----------------------------------------------------------------------------- -// wxMenu -//----------------------------------------------------------------------------- - -static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu ) -{ - int id = menu->FindMenuIdByMenuItem(widget); - - wxASSERT( id != -1 ); // should find it! - - if (!menu->IsEnabled(id)) return; - - wxCommandEvent event( wxEVENT_TYPE_MENU_COMMAND, id ); - event.SetEventObject( menu ); - event.SetInt(id ); - - if (menu->m_callback) - { - (void) (*(menu->m_callback)) (*menu, event); - return; - } - - if (menu->GetEventHandler()->ProcessEvent(event)) return; - - wxWindow *win = menu->GetInvokingWindow(); - if (win) win->GetEventHandler()->ProcessEvent( event ); -} - -IMPLEMENT_DYNAMIC_CLASS(wxMenuItem,wxObject) - -wxMenuItem::wxMenuItem() -{ - m_id = ID_SEPARATOR; - m_isCheckMenu = FALSE; - m_isChecked = FALSE; - m_isEnabled = TRUE; - m_subMenu = (wxMenu *) NULL; - m_menuItem = (GtkWidget *) NULL; -} - -void wxMenuItem::SetText(const wxString& str) -{ - m_text = ""; - for ( const char *pc = str; *pc != '\0'; pc++ ) { - if ( *pc == '&' ) - pc++; // skip it - - m_text << *pc; - } -} - -void wxMenuItem::Check( bool check ) -{ - wxCHECK_RET( IsCheckable(), "Can't check uncheckable item!" ) - - m_isChecked = check; - gtk_check_menu_item_set_state( (GtkCheckMenuItem*)m_menuItem, (gint)check ); -} - -void wxMenuItem::Enable( bool enable ) -{ - gtk_widget_set_sensitive( m_menuItem, enable ); - m_isEnabled = enable; -} - -bool wxMenuItem::IsChecked() const -{ - wxCHECK( IsCheckable(), FALSE ); // can't get state of uncheckable item! - - bool bIsChecked = ((GtkCheckMenuItem*)m_menuItem)->active != 0; - - wxASSERT( bIsChecked == m_isChecked ); // consistency check - - return bIsChecked; -} - -IMPLEMENT_DYNAMIC_CLASS(wxMenu,wxEvtHandler) - -wxMenu::wxMenu( const wxString& title, const wxFunction func ) -{ - m_title = title; - m_items.DeleteContents( TRUE ); - m_invokingWindow = (wxWindow *) NULL; - m_menu = gtk_menu_new(); // Do not show! - m_callback = func; - m_eventHandler = this; - if (m_title.IsNull()) m_title = ""; - if (m_title != "") - { - Append(-2, m_title); - AppendSeparator(); - } -} - -void wxMenu::SetTitle( const wxString& title ) -{ - // Waiting for something better. - m_title = title; -} - -const wxString wxMenu::GetTitle() const -{ - return m_title; -} - -void wxMenu::AppendSeparator() -{ - wxMenuItem *mitem = new wxMenuItem(); - mitem->SetId(ID_SEPARATOR); - - GtkWidget *menuItem = gtk_menu_item_new(); - gtk_menu_append( GTK_MENU(m_menu), menuItem ); - gtk_widget_show( menuItem ); - mitem->SetMenuItem(menuItem); - m_items.Append( mitem ); -} - -void wxMenu::Append( int id, const wxString &item, const wxString &helpStr, bool checkable ) -{ - wxMenuItem *mitem = new wxMenuItem(); - mitem->SetId(id); - mitem->SetText(item); - mitem->SetHelp(helpStr); - mitem->SetCheckable(checkable); - const char *text = mitem->GetText(); - GtkWidget *menuItem = checkable ? gtk_check_menu_item_new_with_label(text) - : gtk_menu_item_new_with_label(text); - - mitem->SetMenuItem(menuItem); - - gtk_signal_connect( GTK_OBJECT(menuItem), "activate", - GTK_SIGNAL_FUNC(gtk_menu_clicked_callback), - (gpointer*)this ); - - gtk_menu_append( GTK_MENU(m_menu), menuItem ); - gtk_widget_show( menuItem ); - m_items.Append( mitem ); -} - -void wxMenu::Append( int id, const wxString &text, wxMenu *subMenu, const wxString &helpStr ) -{ - wxMenuItem *mitem = new wxMenuItem(); - mitem->SetId(id); - mitem->SetText(text); - - GtkWidget *menuItem = gtk_menu_item_new_with_label(mitem->GetText()); - mitem->SetHelp(helpStr); - mitem->SetMenuItem(menuItem); - mitem->SetSubMenu(subMenu); - - gtk_menu_item_set_submenu( GTK_MENU_ITEM(menuItem), subMenu->m_menu ); - gtk_menu_append( GTK_MENU(m_menu), menuItem ); - gtk_widget_show( menuItem ); - m_items.Append( mitem ); -} - -int wxMenu::FindItem( const wxString itemString ) const -{ - wxString s( itemString ); - - int pos; - do { - pos = s.First( '&' ); - if (pos != -1) s.Remove( pos, 1 ); - } while (pos != -1); - - wxNode *node = m_items.First(); - while (node) - { - wxMenuItem *item = (wxMenuItem*)node->Data(); - if (item->GetText() == s) - return item->GetId(); - node = node->Next(); - } - - return -1; -} - -void wxMenu::Enable( int id, bool enable ) -{ - wxMenuItem *item = FindItem(id); - if ( item ) - item->Enable(enable); -} - -bool wxMenu::IsEnabled( int id ) const -{ - wxMenuItem *item = FindItem(id); - if ( item ) - return item->IsEnabled(); - else - return FALSE; -} - -void wxMenu::Check( int id, bool enable ) -{ - wxMenuItem *item = FindItem(id); - if ( item ) - item->Check(enable); -} - -bool wxMenu::IsChecked( int id ) const -{ - wxMenuItem *item = FindItem(id); - if ( item ) - return item->IsChecked(); - else - return FALSE; -} - -void wxMenu::SetLabel( int id, const wxString &label ) -{ - wxMenuItem *item = FindItem(id); - if (item) - item->SetText(label); -} - -wxString wxMenu::GetLabel( int id ) const -{ - wxMenuItem *item = FindItem(id); - if (item) return item->GetText(); - return ""; -} - -void wxMenu::SetHelpString( int id, const wxString& helpString ) -{ - wxMenuItem *item = FindItem(id); - if (item) item->SetHelp( helpString ); -} - -wxString wxMenu::GetHelpString( int id ) const -{ - wxMenuItem *item = FindItem(id); - if (item) return item->GetHelp(); - return ""; -} - -int wxMenu::FindMenuIdByMenuItem( GtkWidget *menuItem ) const -{ - wxNode *node = m_items.First(); - while (node) - { - wxMenuItem *item = (wxMenuItem*)node->Data(); - if (item->GetMenuItem() == menuItem) - return item->GetId(); - node = node->Next(); - } - - return -1; -} - -wxMenuItem *wxMenu::FindItem(int id) const -{ - wxNode *node = m_items.First(); - while (node) { - wxMenuItem *item = (wxMenuItem*)node->Data(); - if ( item->GetId() == id ) - return item; - node = node->Next(); - } - - wxLogDebug( "wxMenu::FindItem: item %d not found.", id); - - return (wxMenuItem *) NULL; -} - -void wxMenu::SetInvokingWindow( wxWindow *win ) -{ - m_invokingWindow = win; -} - -wxWindow *wxMenu::GetInvokingWindow() -{ - return m_invokingWindow; -} - - diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp deleted file mode 100644 index cd33a23f62..0000000000 --- a/src/gtk/notebook.cpp +++ /dev/null @@ -1,444 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: notebook.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "notebook.h" -#endif - -#include "wx/notebook.h" -#include "wx/panel.h" -#include "wx/utils.h" -#include "wx/imaglist.h" -#include "wx/intl.h" -#include "wx/log.h" - -//----------------------------------------------------------------------------- -// wxNotebookPage -//----------------------------------------------------------------------------- - -class wxNotebookPage: public wxObject -{ -public: - wxNotebookPage() - { - m_id = -1; - m_text = ""; - m_image = -1; - m_page = (GtkNotebookPage *) NULL; - m_client = (wxWindow *) NULL; - m_parent = (GtkNotebook *) NULL; - } - -//private: - int m_id; - wxString m_text; - int m_image; - GtkNotebookPage *m_page; - GtkLabel *m_label; - wxWindow *m_client; - GtkNotebook *m_parent; -}; - -//----------------------------------------------------------------------------- -// GTK callbacks -//----------------------------------------------------------------------------- - -// page change callback -static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget), - GtkNotebookPage *WXUNUSED(page), - gint nPage, - gpointer data) -{ - wxNotebook *notebook = (wxNotebook *)data; - - int nOld = notebook->GetSelection(); - - // TODO: emulate PAGE_CHANGING event - wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, - notebook->GetId(), - nPage, - nOld); - event.SetEventObject(notebook); - notebook->ProcessEvent(event); -} - -static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxWindow *win ) -{ - if ( win->GetAutoLayout() ) - win->Layout(); - - if ((win->m_x == alloc->x) && - (win->m_y == alloc->y) && - (win->m_width == alloc->width) && - (win->m_height == alloc->height)) - { - return; - } - -/* - printf( "OnResize from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( " .\n" ); - - printf( " Old: X: %d Y: %d ", win->m_x, win->m_y ); - printf( " W: %d H: %d ", win->m_width, win->m_height ); - printf( " .\n" ); - - printf( " New: X: %d Y: %d ", alloc->x, alloc->y ); - printf( " W: %d H: %d ", alloc->width, alloc->height ); - printf( " .\n" ); -*/ - - win->SetSize( alloc->x, alloc->y, alloc->width, alloc->height ); - -/* - printf( " Res: X: %d Y: %d ", win->m_x, win->m_y ); - printf( " W: %d H: %d ", win->m_width, win->m_height ); - printf( " .\n" ); -*/ -} - -//----------------------------------------------------------------------------- -// wxNotebook -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxNotebook,wxControl) - -void wxNotebook::Init() -{ - m_imageList = (wxImageList *) NULL; - m_pages.DeleteContents( TRUE ); - m_idHandler = 0; -} - -wxNotebook::wxNotebook() -{ - Init(); -} - -wxNotebook::wxNotebook( wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) -{ - Init(); - Create( parent, id, pos, size, style, name ); -} - -wxNotebook::~wxNotebook() -{ - // don't generate change page events any more - if ( m_idHandler != 0 ) - gtk_signal_disconnect(GTK_OBJECT(m_widget), m_idHandler); - - DeleteAllPages(); -} - -bool wxNotebook::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) -{ - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - m_widget = gtk_notebook_new(); - - gtk_notebook_set_scrollable( GTK_NOTEBOOK(m_widget), 1 ); - - m_idHandler = gtk_signal_connect - ( - GTK_OBJECT(m_widget), "switch_page", - GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback), - (gpointer)this - ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -int wxNotebook::GetSelection() const -{ - if (m_pages.Number() == 0) - return -1; - - GtkNotebookPage *g_page = GTK_NOTEBOOK(m_widget)->cur_page; - - wxNotebookPage *page = (wxNotebookPage *) NULL; - - wxNode *node = m_pages.First(); - while (node) - { - page = (wxNotebookPage*)node->Data(); - if (page->m_page == g_page) - break; - node = node->Next(); - } - - wxCHECK_MSG( node != NULL, -1, "wxNotebook: no selection?" ); - - return page->m_id; -} - -int wxNotebook::GetPageCount() const -{ - return m_pages.Number(); -} - -int wxNotebook::GetRowCount() const -{ - return 1; -} - -wxString wxNotebook::GetPageText( int page ) const -{ - wxNotebookPage* nb_page = GetNotebookPage(page); - if (nb_page) - return nb_page->m_text; - else - return ""; -} - -int wxNotebook::GetPageImage( int page ) const -{ - wxNotebookPage* nb_page = GetNotebookPage(page); - if (nb_page) - return nb_page->m_image; - else - return 0; -} - -wxNotebookPage* wxNotebook::GetNotebookPage(int page) const -{ - wxNotebookPage *nb_page = (wxNotebookPage *) NULL; - - wxNode *node = m_pages.First(); - while (node) - { - nb_page = (wxNotebookPage*)node->Data(); - if (nb_page->m_id == page) - return nb_page; - node = node->Next(); - } - - wxLogDebug( "Notebook page %d not found!", page ); - - return (wxNotebookPage *) NULL; -} - -int wxNotebook::SetSelection( int page ) -{ - int selOld = GetSelection(); - wxNotebookPage* nb_page = GetNotebookPage(page); - if (!nb_page) - return -1; - - int page_num = 0; - GList *child = GTK_NOTEBOOK(m_widget)->children; - while (child) - { - if (nb_page->m_page == (GtkNotebookPage*)child->data) - break; - page_num++; - child = child->next; - } - - if (!child) return -1; - - gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), page_num ); - - return selOld; -} - -void wxNotebook::AdvanceSelection(bool bForward) -{ - int nSel = GetSelection(), - nMax = GetPageCount(); - - if ( bForward ) { - SetSelection(nSel == nMax ? 0 : nSel + 1); - } - else { - SetSelection(nSel == 0 ? nMax : nSel - 1); - } -} - -void wxNotebook::SetImageList( wxImageList* imageList ) -{ - m_imageList = imageList; -} - -bool wxNotebook::SetPageText( int page, const wxString &text ) -{ - wxNotebookPage* nb_page = GetNotebookPage(page); - if (!nb_page) - return FALSE; - - nb_page->m_text = text; - - return TRUE; -} - -bool wxNotebook::SetPageImage( int page, int image ) -{ - wxNotebookPage* nb_page = GetNotebookPage(page); - if (!nb_page) - return FALSE; - - nb_page->m_image = image; - - return TRUE; -} - -void wxNotebook::SetPageSize( const wxSize &WXUNUSED(size) ) -{ - wxFAIL_MSG(_("wxNotebook::SetPageSize not implemented")); -} - -void wxNotebook::SetPadding( const wxSize &WXUNUSED(padding) ) -{ - wxFAIL_MSG(_("wxNotebook::SetPadding not implemented")); -} - -bool wxNotebook::DeleteAllPages() -{ - wxNode *page_node = m_pages.First(); - while (page_node) - { - wxNotebookPage *page = (wxNotebookPage*)page_node->Data(); - - DeletePage( page->m_id ); - - page_node = m_pages.First(); - } - - return TRUE; -} - -bool wxNotebook::DeletePage( int page ) -{ - wxNotebookPage* nb_page = GetNotebookPage(page); - if (!nb_page) return FALSE; - - int page_num = 0; - GList *child = GTK_NOTEBOOK(m_widget)->children; - while (child) - { - if (nb_page->m_page == (GtkNotebookPage*)child->data) break; - page_num++; - child = child->next; - } - - wxASSERT( child ); - - delete nb_page->m_client; - -// Amazingly, this is not necessary -// gtk_notebook_remove_page( GTK_NOTEBOOK(m_widget), page_num ); - - m_pages.DeleteObject( nb_page ); - - return TRUE; -} - -bool wxNotebook::AddPage(wxWindow* win, const wxString& text, - bool bSelect, int imageId) -{ - // we've created the notebook page in AddChild(). Now we just have to set - // the caption for the page and set the others parameters. - - // first, find the page - wxNotebookPage *page = (wxNotebookPage *) NULL; - - wxNode *node = m_pages.First(); - while (node) - { - page = (wxNotebookPage*)node->Data(); - if ( page->m_client == win ) - break; // found - node = node->Next(); - } - - wxCHECK_MSG(page != NULL, FALSE, - _("Can't add a page whose parent is not the notebook!")); - - // then set the attributes - page->m_text = text; - if ( page->m_text.IsEmpty() ) - page->m_text = ""; - page->m_image = imageId; - gtk_label_set(page->m_label, page->m_text); - - if ( bSelect ) { - SetSelection(GetPageCount()); - } - - return TRUE; -} - -wxWindow *wxNotebook::GetPage( int page ) const -{ - wxNotebookPage* nb_page = GetNotebookPage(page); - if (!nb_page) - return (wxWindow *) NULL; - else - return nb_page->m_client; -} - -void wxNotebook::AddChild( wxWindow *win ) -{ - m_children.Append(win); - - wxNotebookPage *page = new wxNotebookPage(); - - page->m_id = GetPageCount(); - page->m_label = (GtkLabel *)gtk_label_new(_("Handle")); - page->m_client = win; - gtk_notebook_append_page( GTK_NOTEBOOK(m_widget), win->m_widget, - (GtkWidget *)page->m_label); - gtk_misc_set_alignment(GTK_MISC(page->m_label), 0.0, 0.5); - - page->m_page = - (GtkNotebookPage*) (g_list_last(GTK_NOTEBOOK(m_widget)->children)->data); - - page->m_parent = GTK_NOTEBOOK(m_widget); - - gtk_signal_connect( GTK_OBJECT(win->m_widget), "size_allocate", - GTK_SIGNAL_FUNC(gtk_page_size_callback), (gpointer)win ); - - if (!page->m_page) - { - wxLogFatalError( _("Notebook page creation error") ); - return; - } - - m_pages.Append( page ); -} - -// override these 2 functions to do nothing: everything is done in OnSize -void wxNotebook::SetConstraintSizes( bool WXUNUSED(recurse) ) -{ - // don't set the sizes of the pages - their correct size is not yet known - wxControl::SetConstraintSizes(FALSE); -} - -bool wxNotebook::DoPhase( int WXUNUSED(nPhase) ) -{ - return TRUE; -} - -//----------------------------------------------------------------------------- -// wxNotebookEvent -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent) diff --git a/src/gtk/palette.cpp b/src/gtk/palette.cpp deleted file mode 100644 index 5657c4355e..0000000000 --- a/src/gtk/palette.cpp +++ /dev/null @@ -1,106 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: palette.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "palette.h" -#endif - -#include "wx/palette.h" - -//----------------------------------------------------------------------------- -// wxPalette -//----------------------------------------------------------------------------- - -class wxPaletteRefData: public wxObjectRefData -{ - public: - - wxPaletteRefData(void); - ~wxPaletteRefData(void); - - GdkColormap *m_colormap; -}; - -wxPaletteRefData::wxPaletteRefData(void) -{ - m_colormap = (GdkColormap *) NULL; -}; - -wxPaletteRefData::~wxPaletteRefData(void) -{ - if (m_colormap) gdk_colormap_unref( m_colormap ); -}; - -//----------------------------------------------------------------------------- - -#define M_PALETTEDATA ((wxPaletteRefData *)m_refData) - -IMPLEMENT_DYNAMIC_CLASS(wxPalette,wxGDIObject) - -wxPalette::wxPalette(void) -{ -}; - -wxPalette::wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue ) -{ - m_refData = new wxPaletteRefData(); - Create( n, red, green, blue ); -}; - -wxPalette::wxPalette( const wxPalette& palette ) -{ - Ref( palette ); -}; - -wxPalette::wxPalette( const wxPalette* palette ) -{ - UnRef(); - if (palette) Ref( *palette ); -}; - -wxPalette::~wxPalette(void) -{ -}; - -wxPalette& wxPalette::operator = ( const wxPalette& palette ) -{ - if (*this == palette) return (*this); - Ref( palette ); - return *this; -}; - -bool wxPalette::operator == ( const wxPalette& palette ) -{ - return m_refData == palette.m_refData; -}; - -bool wxPalette::operator != ( const wxPalette& palette ) -{ - return m_refData != palette.m_refData; -}; - -bool wxPalette::Ok(void) const -{ - return (m_refData); -}; - -bool wxPalette::Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue) -{ -}; - -int wxPalette::GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const -{ -}; - -bool wxPalette::GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const -{ -}; - diff --git a/src/gtk/pen.cpp b/src/gtk/pen.cpp deleted file mode 100644 index b50ec2063e..0000000000 --- a/src/gtk/pen.cpp +++ /dev/null @@ -1,207 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: pen.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "pen.h" -#endif - -#include "wx/pen.h" - -//----------------------------------------------------------------------------- -// wxPen -//----------------------------------------------------------------------------- - -class wxPenRefData: public wxObjectRefData -{ - public: - - wxPenRefData(void); - - int m_width; - int m_style; - int m_joinStyle; - int m_capStyle; - wxColour m_colour; -}; - -wxPenRefData::wxPenRefData(void) -{ - m_width = 1; - m_style = wxSOLID; - m_joinStyle = wxJOIN_ROUND; - m_capStyle = wxCAP_ROUND; -} - -//----------------------------------------------------------------------------- - -#define M_PENDATA ((wxPenRefData *)m_refData) - -IMPLEMENT_DYNAMIC_CLASS(wxPen,wxGDIObject) - -wxPen::wxPen(void) -{ - if (wxThePenList) wxThePenList->AddPen( this ); -} - -wxPen::wxPen( const wxColour &colour, int width, int style ) -{ - m_refData = new wxPenRefData(); - M_PENDATA->m_width = width; - M_PENDATA->m_style = style; - M_PENDATA->m_colour = colour; - - if (wxThePenList) wxThePenList->AddPen( this ); -} - -wxPen::wxPen( const wxString &colourName, int width, int style ) -{ - m_refData = new wxPenRefData(); - M_PENDATA->m_width = width; - M_PENDATA->m_style = style; - M_PENDATA->m_colour = colourName; - - if (wxThePenList) wxThePenList->AddPen( this ); -} - -wxPen::wxPen( const wxPen& pen ) -{ - Ref( pen ); - if (wxThePenList) wxThePenList->AddPen( this ); -} - -wxPen::wxPen( const wxPen* pen ) -{ - UnRef(); - if (pen) Ref( *pen ); - - if (wxThePenList) wxThePenList->AddPen( this ); -} - -wxPen::~wxPen(void) -{ - if (wxThePenList) wxThePenList->RemovePen( this ); -} - -wxPen& wxPen::operator = ( const wxPen& pen ) -{ - if (*this == pen) return (*this); - Ref( pen ); - return *this; -} - -bool wxPen::operator == ( const wxPen& pen ) -{ - return m_refData == pen.m_refData; -} - -bool wxPen::operator != ( const wxPen& pen ) -{ - return m_refData != pen.m_refData; -} - -void wxPen::SetColour( const wxColour &colour ) -{ - if (!m_refData) - m_refData = new wxPenRefData(); - - M_PENDATA->m_colour = colour; -} - -void wxPen::SetColour( const wxString &colourName ) -{ - if (!m_refData) - m_refData = new wxPenRefData(); - - M_PENDATA->m_colour = colourName; -} - -void wxPen::SetColour( int red, int green, int blue ) -{ - if (!m_refData) - m_refData = new wxPenRefData(); - - M_PENDATA->m_colour.Set( red, green, blue ); -} - -void wxPen::SetCap( int capStyle ) -{ - if (!m_refData) - m_refData = new wxPenRefData(); - - M_PENDATA->m_capStyle = capStyle; -} - -void wxPen::SetJoin( int joinStyle ) -{ - if (!m_refData) - m_refData = new wxPenRefData(); - - M_PENDATA->m_joinStyle = joinStyle; -} - -void wxPen::SetStyle( int style ) -{ - if (!m_refData) - m_refData = new wxPenRefData(); - - M_PENDATA->m_style = style; -} - -void wxPen::SetWidth( int width ) -{ - if (!m_refData) - m_refData = new wxPenRefData(); - - M_PENDATA->m_width = width; -} - -int wxPen::GetCap(void) const -{ - return M_PENDATA->m_capStyle; -} - -int wxPen::GetJoin(void) const -{ - if (!m_refData) - return 0; - else - return M_PENDATA->m_joinStyle; -} - -int wxPen::GetStyle(void) const -{ - if (!m_refData) - return 0; - else - return M_PENDATA->m_style; -} - -int wxPen::GetWidth(void) const -{ - if (!m_refData) - return 0; - else - return M_PENDATA->m_width; -} - -wxColour &wxPen::GetColour(void) const -{ - if (!m_refData) - return wxNullColour; - else - return M_PENDATA->m_colour; -} - -bool wxPen::Ok(void) const -{ - return (m_refData); -} - diff --git a/src/gtk/radiobox.cpp b/src/gtk/radiobox.cpp deleted file mode 100644 index c8120af624..0000000000 --- a/src/gtk/radiobox.cpp +++ /dev/null @@ -1,281 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: radiobox.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "radiobox.h" -#endif - -#include "wx/radiobox.h" -#include "wx/dialog.h" -#include "wx/frame.h" -#include "wx/gtk/win_gtk.h" - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxRadioBox -//----------------------------------------------------------------------------- - -static void gtk_radiobutton_clicked_callback( GtkWidget *WXUNUSED(widget), wxRadioBox *rb ) -{ - if (!rb->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - if (rb->m_alreadySent) - { - rb->m_alreadySent = FALSE; - return; - } - - rb->m_alreadySent = TRUE; - - wxCommandEvent event( wxEVT_COMMAND_RADIOBOX_SELECTED, rb->GetId() ); - event.SetInt( rb->GetSelection() ); - wxString tmp( rb->GetStringSelection() ); - event.SetString( WXSTRINGCAST(tmp) ); - event.SetEventObject( rb ); - rb->GetEventHandler()->ProcessEvent(event); -} - -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxRadioBox,wxControl) - -wxRadioBox::wxRadioBox(void) -{ -} - -bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint &pos, const wxSize &size, - int n, const wxString choices[], int WXUNUSED(majorDim), - long style, const wxValidator& validator, const wxString &name ) -{ - m_alreadySent = FALSE; - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - SetValidator( validator ); - - m_widget = gtk_frame_new( title ); - - int x = m_x+5; - int y = m_y+15; - int maxLen = 0; - int height = 20; - -// if (((m_style & wxRA_VERTICAL) == wxRA_VERTICAL) && (n > 0)) - if (n > 0) - { - GSList *radio_button_group = (GSList *) NULL; - for (int i = 0; i < n; i++) - { - if (i) radio_button_group = gtk_radio_button_group( GTK_RADIO_BUTTON(m_radio) ); - - m_radio = GTK_RADIO_BUTTON( gtk_radio_button_new_with_label( radio_button_group, choices[i] ) ); - - if (!i) gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_radio), TRUE ); - - gtk_signal_connect( GTK_OBJECT(m_radio), "clicked", - GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this ); - - gtk_myfixed_put( GTK_MYFIXED(m_parent->m_wxwindow), GTK_WIDGET(m_radio), x, y ); - - int tmp = 22+gdk_string_measure( GTK_WIDGET(m_radio)->style->font, choices[i] ); - if (tmp > maxLen) maxLen = tmp; - - int width = m_width-10; - if (size.x == -1) width = tmp; - gtk_widget_set_usize( GTK_WIDGET(m_radio), width, 20 ); - - y += 20; - height += 20; - - } - } - - wxSize newSize = size; - if (newSize.x == -1) newSize.x = maxLen+10; - if (newSize.y == -1) newSize.y = height; - SetSize( newSize.x, newSize.y ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -bool wxRadioBox::Show( bool show ) -{ - wxWindow::Show( show ); - - GSList *item = gtk_radio_button_group( m_radio ); - while (item) - { - GtkWidget *w = GTK_WIDGET( item->data ); - if (show) gtk_widget_show( w ); else gtk_widget_hide( w ); - item = item->next; - } - - return TRUE; -} - -int wxRadioBox::FindString( const wxString &s ) const -{ - GSList *item = gtk_radio_button_group( m_radio ); - - int count = g_slist_length(item)-1; - - while (item) - { - GtkButton *b = GTK_BUTTON( item->data ); - GtkLabel *l = GTK_LABEL( b->child ); - if (s == l->label) return count; - count--; - item = item->next; - } - - return -1; -} - -void wxRadioBox::SetSelection( int n ) -{ - GSList *item = gtk_radio_button_group( m_radio ); - item = g_slist_nth( item, g_slist_length(item)-n-1 ); - if (!item) return; - - GtkToggleButton *button = GTK_TOGGLE_BUTTON( item->data ); - - gtk_toggle_button_set_state( button, 1 ); -} - -int wxRadioBox::GetSelection(void) const -{ - GSList *item = gtk_radio_button_group( m_radio ); - int count = 0; - int found = -1; - while (item) - { - GtkButton *button = GTK_BUTTON( item->data ); - if (GTK_TOGGLE_BUTTON(button)->active) found = count; - count++; - item = item->next; - } - - return found != -1 ? count-found-1 : -1; -} - -wxString wxRadioBox::GetString( int n ) const -{ - GSList *item = gtk_radio_button_group( m_radio ); - - item = g_slist_nth( item, g_slist_length(item)-n-1 ); - if (!item) return ""; - - GtkToggleButton *button = GTK_TOGGLE_BUTTON( item->data ); - - GtkLabel *label = GTK_LABEL( GTK_BUTTON(button)->child ); - - return wxString( label->label ); -} - -wxString wxRadioBox::GetLabel(void) const -{ - return wxControl::GetLabel(); -} - -void wxRadioBox::SetLabel( const wxString& WXUNUSED(label) ) -{ - wxFAIL_MSG("wxRadioBox::SetLabel not implemented."); -} - -void wxRadioBox::SetLabel( int WXUNUSED(item), const wxString& WXUNUSED(label) ) -{ - wxFAIL_MSG("wxRadioBox::SetLabel not implemented."); -} - -void wxRadioBox::SetLabel( int WXUNUSED(item), wxBitmap *WXUNUSED(bitmap) ) -{ - wxFAIL_MSG("wxRadioBox::SetLabel not implemented."); -} - -wxString wxRadioBox::GetLabel( int WXUNUSED(item) ) const -{ - wxFAIL_MSG("wxRadioBox::GetLabel not implemented."); - return ""; -} - -void wxRadioBox::Enable( bool WXUNUSED(enable) ) -{ - wxFAIL_MSG("wxRadioBox::Enable not implemented."); -} - -void wxRadioBox::Enable( int WXUNUSED(item), bool WXUNUSED(enable) ) -{ - wxFAIL_MSG("wxRadioBox::Enable not implemented."); -} - -void wxRadioBox::Show( int WXUNUSED(item), bool WXUNUSED(show) ) -{ - wxFAIL_MSG("wxRadioBox::Show not implemented."); -} - -wxString wxRadioBox::GetStringSelection(void) const -{ - GSList *item = gtk_radio_button_group( m_radio ); - while (item) - { - GtkButton *button = GTK_BUTTON( item->data ); - if (GTK_TOGGLE_BUTTON(button)->active) - { - GtkLabel *label = GTK_LABEL( button->child ); - return label->label; - } - item = item->next; - } - return ""; -} - -bool wxRadioBox::SetStringSelection( const wxString&s ) -{ - int res = FindString( s ); - if (res == -1) return FALSE; - SetSelection( res ); - return TRUE; -} - -int wxRadioBox::Number(void) const -{ - int count = 0; - GSList *item = gtk_radio_button_group( m_radio ); - while (item) - { - item = item->next; - count++; - } - return count; -} - -int wxRadioBox::GetNumberOfRowsOrCols(void) const -{ - return 1; -} - -void wxRadioBox::SetNumberOfRowsOrCols( int WXUNUSED(n) ) -{ - wxFAIL_MSG("wxRadioBox::SetNumberOfRowsOrCols not implemented."); -} - diff --git a/src/gtk/radiobut.cpp b/src/gtk/radiobut.cpp deleted file mode 100644 index 321210ec3d..0000000000 --- a/src/gtk/radiobut.cpp +++ /dev/null @@ -1,89 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: radiobut.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "radiobut.h" -#endif - -#include "wx/radiobut.h" - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxRadioButton -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxRadioButton,wxControl) - -static void gtk_radiobutton_clicked_callback( GtkWidget *WXUNUSED(widget), wxRadioButton *rb ) -{ - if (!rb->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - wxCommandEvent event( wxEVT_COMMAND_RADIOBUTTON_SELECTED, rb->GetId()); - event.SetInt( rb->GetValue() ); - event.SetEventObject( rb ); - rb->GetEventHandler()->ProcessEvent( event ); -} - -bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos, const wxSize& size, long style, - const wxValidator& validator, const wxString& name ) -{ - m_needParent = TRUE; - - wxSize newSize = size; - - PreCreation( parent, id, pos, newSize, style, name ); - - SetValidator( validator ); - - m_widget = gtk_radio_button_new_with_label( (GSList *) NULL, label ); - - SetLabel(label); - - if (newSize.x == -1) newSize.x = 22+gdk_string_measure( m_widget->style->font, label ); - if (newSize.y == -1) newSize.y = 26; - SetSize( newSize.x, newSize.y ); - - gtk_signal_connect( GTK_OBJECT(m_widget), "clicked", - GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -void wxRadioButton::SetLabel( const wxString& label ) -{ - wxControl::SetLabel( label ); - GtkButton *bin = GTK_BUTTON( m_widget ); - GtkLabel *g_label = GTK_LABEL( bin->child ); - gtk_label_set( g_label, GetLabel() ); -} - -void wxRadioButton::SetValue( bool val ) -{ - gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_widget), val ); -} - -bool wxRadioButton::GetValue(void) const -{ - return GTK_TOGGLE_BUTTON(m_widget)->active; -} - - diff --git a/src/gtk/region.cpp b/src/gtk/region.cpp deleted file mode 100644 index 274e53b35d..0000000000 --- a/src/gtk/region.cpp +++ /dev/null @@ -1,422 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: region.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/98 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "region.h" -#endif - -#include "wx/region.h" - -//----------------------------------------------------------------------------- -// wxRegion -//----------------------------------------------------------------------------- - -class wxRegionRefData: public wxObjectRefData -{ - public: - - wxRegionRefData(void); - ~wxRegionRefData(void); - - public: - - GdkRegion *m_region; - wxList m_rects; -}; - -wxRegionRefData::wxRegionRefData(void) -{ - m_region = (GdkRegion *) NULL; -} - -wxRegionRefData::~wxRegionRefData(void) -{ - if (m_region) gdk_region_destroy( m_region ); - - wxNode *node = m_rects.First(); - while (node) - { - wxRect *r = (wxRect*)node->Data(); - delete r; - node = node->Next(); - } -} - -//----------------------------------------------------------------------------- - -#define M_REGIONDATA ((wxRegionRefData *)m_refData) - -IMPLEMENT_DYNAMIC_CLASS(wxRegion,wxGDIObject); - -wxRegion::wxRegion( long x, long y, long w, long h ) -{ - m_refData = new wxRegionRefData(); - GdkRegion *reg = gdk_region_new(); - GdkRectangle rect; - rect.x = x; - rect.y = y; - rect.width = w; - rect.height = h; - M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &rect ); - gdk_region_destroy( reg ); - M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(x,y,w,h) ); -} - -wxRegion::wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight ) -{ - m_refData = new wxRegionRefData(); - GdkRegion *reg = gdk_region_new(); - GdkRectangle rect; - rect.x = topLeft.x; - rect.y = topLeft.y; - rect.width = bottomRight.x - rect.x; - rect.height = bottomRight.y - rect.y; - M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &rect ); - gdk_region_destroy( reg ); - M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(topLeft,bottomRight) ); -} - -wxRegion::wxRegion( const wxRect& rect ) -{ - m_refData = new wxRegionRefData(); - GdkRegion *reg = gdk_region_new(); - GdkRectangle g_rect; - g_rect.x = rect.x; - g_rect.y = rect.y; - g_rect.width = rect.width; - g_rect.height = rect.height; - M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &g_rect ); - gdk_region_destroy( reg ); - - wxNode *node = M_REGIONDATA->m_rects.First(); - while (node) - { - wxRect *r = (wxRect*)node->Data(); - M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(r->x,r->y,r->width,r->height) ); - node = node->Next(); - } -} - -wxRegion::wxRegion(void) -{ - m_refData = new wxRegionRefData(); - M_REGIONDATA->m_region = gdk_region_new(); -} - -wxRegion::~wxRegion(void) -{ -} - -void wxRegion::Clear(void) -{ - UnRef(); - m_refData = new wxRegionRefData(); - M_REGIONDATA->m_region = gdk_region_new(); -} - -bool wxRegion::Union( long x, long y, long width, long height ) -{ - GdkRectangle rect; - rect.x = x; - rect.y = y; - rect.width = width; - rect.height = height; - GdkRegion *reg = gdk_region_union_with_rect( M_REGIONDATA->m_region, &rect ); - gdk_region_destroy( M_REGIONDATA->m_region ); - M_REGIONDATA->m_region = reg; - M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(x,y,width,height) ); - return TRUE; -} - -bool wxRegion::Union( const wxRect& rect ) -{ - GdkRectangle g_rect; - g_rect.x = rect.x; - g_rect.y = rect.y; - g_rect.width = rect.width; - g_rect.height = rect.height; - GdkRegion *reg = gdk_region_union_with_rect( M_REGIONDATA->m_region, &g_rect ); - gdk_region_destroy( M_REGIONDATA->m_region ); - M_REGIONDATA->m_region = reg; - M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(rect.x,rect.y,rect.width,rect.height) ); - return TRUE; -} - -bool wxRegion::Union( const wxRegion& region ) -{ - GdkRegion *reg = gdk_regions_union( M_REGIONDATA->m_region, region.GetRegion() ); - gdk_region_destroy( M_REGIONDATA->m_region ); - M_REGIONDATA->m_region = reg; - - wxNode *node = region.GetRectList()->First(); - while (node) - { - wxRect *r = (wxRect*)node->Data(); - M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(r->x,r->y,r->width,r->height) ); - node = node->Next(); - } - - return TRUE; -} - -bool wxRegion::Intersect( long x, long y, long width, long height ) -{ - wxRegion reg( x, y, width, height ); - Intersect( reg ); - return TRUE; -} - -bool wxRegion::Intersect( const wxRect& rect ) -{ - wxRegion reg( rect ); - Intersect( reg ); - return TRUE; -} - -bool wxRegion::Intersect( const wxRegion& region ) -{ - GdkRegion *reg = gdk_regions_intersect( M_REGIONDATA->m_region, region.GetRegion() ); - gdk_region_destroy( M_REGIONDATA->m_region ); - M_REGIONDATA->m_region = reg; - return TRUE; -} - -bool wxRegion::Subtract( long x, long y, long width, long height ) -{ - wxRegion reg( x, y, width, height ); - Subtract( reg ); - return TRUE; -} - -bool wxRegion::Subtract( const wxRect& rect ) -{ - wxRegion reg( rect ); - Subtract( reg ); - return TRUE; -} - -bool wxRegion::Subtract( const wxRegion& region ) -{ - GdkRegion *reg = gdk_regions_subtract( M_REGIONDATA->m_region, region.GetRegion() ); - gdk_region_destroy( M_REGIONDATA->m_region ); - M_REGIONDATA->m_region = reg; - return TRUE; -} - -bool wxRegion::Xor( long x, long y, long width, long height ) -{ - wxRegion reg( x, y, width, height ); - Xor( reg ); - return TRUE; -} - -bool wxRegion::Xor( const wxRect& rect ) -{ - wxRegion reg( rect ); - Xor( reg ); - return TRUE; -} - -bool wxRegion::Xor( const wxRegion& region ) -{ - GdkRegion *reg = gdk_regions_xor( M_REGIONDATA->m_region, region.GetRegion() ); - gdk_region_destroy( M_REGIONDATA->m_region ); - M_REGIONDATA->m_region = reg; - - wxNode *node = region.GetRectList()->First(); - while (node) - { - wxRect *r = (wxRect*)node->Data(); - M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(r->x,r->y,r->width,r->height) ); - node = node->Next(); - } - - return TRUE; -} - -void wxRegion::GetBox( long& x, long& y, long&w, long &h ) const -{ - x = 0; - y = 0; - w = -1; - h = -1; - wxNode *node = GetRectList()->First(); - while (node) - { - wxRect *r = (wxRect*)node->Data(); - if (node == GetRectList()->First()) - { - x = r->x; - y = r->y; - w = r->width; - h = r->height; - } - else - { - if (r->x < x) - { - x = r->x; - w += x - r->x; - } - if (r->y < y) - { - y = r->y; - h += y - r->y; - } - if (r->width+r->x > x+w) - { - w = r->x + r->width - x; - } - if (r->height+r->y > y+h) - { - h = r->y + r->height - y; - } - } - node = node->Next(); - } -} - -wxRect wxRegion::GetBox(void) const -{ - long x = 0; - long y = 0; - long w = -1; - long h = -1; - GetBox( x, y, w, h ); - return wxRect( x, y, w, h ); -} - -bool wxRegion::Empty(void) const -{ - return gdk_region_empty( M_REGIONDATA->m_region ); -} - -wxRegionContain wxRegion::Contains( long x, long y ) const -{ - if (gdk_region_point_in( M_REGIONDATA->m_region, x, y )) - return wxInRegion; - else - return wxOutRegion; -} - -wxRegionContain wxRegion::Contains( long x, long y, long w, long h ) const -{ - GdkRectangle rect; - rect.x = x; - rect.y = y; - rect.width = w; - rect.height = h; - GdkOverlapType res = gdk_region_rect_in( M_REGIONDATA->m_region, &rect ); - switch (res) - { - case GDK_OVERLAP_RECTANGLE_IN: return wxInRegion; - case GDK_OVERLAP_RECTANGLE_OUT: return wxOutRegion; - case GDK_OVERLAP_RECTANGLE_PART: return wxPartRegion; - } - return wxOutRegion; -} - -wxRegionContain wxRegion::Contains(const wxPoint& pt) const -{ - return Contains( pt.x, pt.y ); -} - -wxRegionContain wxRegion::Contains(const wxRect& rect) const -{ - return Contains( rect.x, rect.y, rect.width, rect.height ); -} - -GdkRegion *wxRegion::GetRegion(void) const -{ - return M_REGIONDATA->m_region; -} - -wxList *wxRegion::GetRectList() const -{ - return &(M_REGIONDATA->m_rects); -} - -//----------------------------------------------------------------------------- -// wxRegion -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator,wxObject); - -wxRegionIterator::wxRegionIterator(void) -{ - m_current = 0; -} - -wxRegionIterator::wxRegionIterator( const wxRegion& region ) -{ - m_region = region; - m_current = 0; -} - -void wxRegionIterator::Reset( const wxRegion& region ) -{ - m_region = region; - m_current = 0; -} - -wxRegionIterator::operator bool (void) const -{ - return m_current < m_region.GetRectList()->Number(); -} - -bool wxRegionIterator::HaveRects(void) const -{ - return m_current < m_region.GetRectList()->Number(); -} - -void wxRegionIterator::operator ++ (void) -{ - if (m_current < m_region.GetRectList()->Number()) ++m_current; -} - -void wxRegionIterator::operator ++ (int) -{ - if (m_current < m_region.GetRectList()->Number()) ++m_current; -} - -long wxRegionIterator::GetX(void) const -{ - wxNode *node = m_region.GetRectList()->Nth( m_current ); - if (!node) return 0; - wxRect *r = (wxRect*)node->Data(); - return r->x; -} - -long wxRegionIterator::GetY(void) const -{ - wxNode *node = m_region.GetRectList()->Nth( m_current ); - if (!node) return 0; - wxRect *r = (wxRect*)node->Data(); - return r->y; -} - -long wxRegionIterator::GetW(void) const -{ - wxNode *node = m_region.GetRectList()->Nth( m_current ); - if (!node) return 0; - wxRect *r = (wxRect*)node->Data(); - return r->width; -} - -long wxRegionIterator::GetH(void) const -{ - wxNode *node = m_region.GetRectList()->Nth( m_current ); - if (!node) return 0; - wxRect *r = (wxRect*)node->Data(); - return r->height; -} - - diff --git a/src/gtk/scrolbar.cpp b/src/gtk/scrolbar.cpp deleted file mode 100644 index de1cb7a888..0000000000 --- a/src/gtk/scrolbar.cpp +++ /dev/null @@ -1,211 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: scrolbar.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "scrolbar.h" -#endif - -#include "wx/scrolbar.h" -#include "wx/utils.h" - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxScrollBar -//----------------------------------------------------------------------------- - -static void gtk_scrollbar_callback( GtkWidget *WXUNUSED(widget), wxScrollBar *win ) -{ - if (!win->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - float diff = win->m_adjust->value - win->m_oldPos; - if (fabs(diff) < 0.2) return; - - wxEventType command = wxEVT_NULL; - - float line_step = win->m_adjust->step_increment; - float page_step = win->m_adjust->page_increment; - - if (fabs(diff-line_step) < 0.2) command = wxEVT_SCROLL_LINEDOWN; - else if (fabs(diff+line_step) < 0.2) command = wxEVT_SCROLL_LINEUP; - else if (fabs(diff-page_step) < 0.2) command = wxEVT_SCROLL_PAGEDOWN; - else if (fabs(diff+page_step) < 0.2) command = wxEVT_SCROLL_PAGEUP; - else command = wxEVT_SCROLL_THUMBTRACK; - - int value = (int)(win->m_adjust->value+0.5); - - int orient = wxHORIZONTAL; - if (win->GetWindowStyleFlag() & wxSB_VERTICAL == wxSB_VERTICAL) orient = wxHORIZONTAL; - - wxScrollEvent event( command, win->GetId(), value, orient ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); - -/* - wxCommandEvent cevent( wxEVT_COMMAND_SCROLLBAR_UPDATED, win->GetId() ); - cevent.SetEventObject( win ); - win->ProcessEvent( cevent ); -*/ -} - -IMPLEMENT_DYNAMIC_CLASS(wxScrollBar,wxControl) - -wxScrollBar::~wxScrollBar(void) -{ -} - -bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - long style, const wxValidator& validator, const wxString& name ) -{ - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - SetValidator( validator ); - - m_oldPos = 0.0; - - if (style & wxSB_VERTICAL == wxSB_VERTICAL) - m_widget = gtk_hscrollbar_new( (GtkAdjustment *) NULL ); - else - m_widget = gtk_vscrollbar_new( (GtkAdjustment *) NULL ); - - m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) ); - - gtk_signal_connect (GTK_OBJECT (m_adjust), "value_changed", - (GtkSignalFunc) gtk_scrollbar_callback, (gpointer) this ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -int wxScrollBar::GetPosition(void) const -{ - return (int)(m_adjust->value+0.5); -} - -int wxScrollBar::GetThumbSize() const -{ - return (int)(m_adjust->page_size+0.5); -} - -int wxScrollBar::GetPageSize() const -{ - return (int)(m_adjust->page_increment+0.5); -} - -int wxScrollBar::GetRange() const -{ - return (int)(m_adjust->upper+0.5); -} - -void wxScrollBar::SetPosition( int viewStart ) -{ - float fpos = (float)viewStart; - m_oldPos = fpos; - if (fabs(fpos-m_adjust->value) < 0.2) return; - m_adjust->value = fpos; - - gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "value_changed" ); -} - -void wxScrollBar::SetScrollbar( int position, int thumbSize, int range, int pageSize, - bool WXUNUSED(refresh) ) -{ - float fpos = (float)position; - m_oldPos = fpos; - float frange = (float)range; - float fthumb = (float)thumbSize; - float fpage = (float)pageSize; - - if ((fabs(fpos-m_adjust->value) < 0.2) && - (fabs(frange-m_adjust->upper) < 0.2) && - (fabs(fthumb-m_adjust->page_size) < 0.2) && - (fabs(fpage-m_adjust->page_increment) < 0.2)) - return; - - m_adjust->lower = 0.0; - m_adjust->upper = frange; - m_adjust->value = fpos; - m_adjust->step_increment = 1.0; - m_adjust->page_increment = (float)(wxMax(fpage-2,0)); - m_adjust->page_size = fthumb; - - gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "changed" ); -} - -// Backward compatibility -int wxScrollBar::GetValue(void) const -{ - return GetPosition(); -} - -void wxScrollBar::SetValue( int viewStart ) -{ - SetPosition( viewStart ); -} - -void wxScrollBar::GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength ) const -{ - int pos = (int)(m_adjust->value+0.5); - int thumb = (int)(m_adjust->page_size+0.5); - int page = (int)(m_adjust->page_increment+0.5); - int range = (int)(m_adjust->upper+0.5); - - *viewStart = pos; - *viewLength = range; - *objectLength = thumb; - *pageLength = page; -} - -int wxScrollBar::GetViewLength() const -{ - return (int)(m_adjust->upper+0.5); -} - -int wxScrollBar::GetObjectLength() const -{ - return (int)(m_adjust->page_size+0.5); -} - -void wxScrollBar::SetPageSize( int pageLength ) -{ - int pos = (int)(m_adjust->value+0.5); - int thumb = (int)(m_adjust->page_size+0.5); - int range = (int)(m_adjust->upper+0.5); - SetScrollbar( pos, thumb, range, pageLength ); -} - -void wxScrollBar::SetObjectLength( int objectLength ) -{ - int pos = (int)(m_adjust->value+0.5); - int page = (int)(m_adjust->page_increment+0.5); - int range = (int)(m_adjust->upper+0.5); - SetScrollbar( pos, objectLength, range, page ); -} - -void wxScrollBar::SetViewLength( int viewLength ) -{ - int pos = (int)(m_adjust->value+0.5); - int thumb = (int)(m_adjust->page_size+0.5); - int page = (int)(m_adjust->page_increment+0.5); - SetScrollbar( pos, thumb, viewLength, page ); -} - diff --git a/src/gtk/settings.cpp b/src/gtk/settings.cpp deleted file mode 100644 index b3e40b850b..0000000000 --- a/src/gtk/settings.cpp +++ /dev/null @@ -1,188 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: settings.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "settings.h" -#endif - -#include "wx/settings.h" - -/* -#define wxSYS_COLOUR_SCROLLBAR 0 -#define wxSYS_COLOUR_BACKGROUND 1 -#define wxSYS_COLOUR_ACTIVECAPTION 2 -#define wxSYS_COLOUR_INACTIVECAPTION 3 -#define wxSYS_COLOUR_MENU 4 -#define wxSYS_COLOUR_WINDOW 5 -#define wxSYS_COLOUR_WINDOWFRAME 6 -#define wxSYS_COLOUR_MENUTEXT 7 -#define wxSYS_COLOUR_WINDOWTEXT 8 -#define wxSYS_COLOUR_CAPTIONTEXT 9 -#define wxSYS_COLOUR_ACTIVEBORDER 10 -#define wxSYS_COLOUR_INACTIVEBORDER 11 -#define wxSYS_COLOUR_APPWORKSPACE 12 -#define wxSYS_COLOUR_HIGHLIGHT 13 -#define wxSYS_COLOUR_HIGHLIGHTTEXT 14 -#define wxSYS_COLOUR_BTNFACE 15 -#define wxSYS_COLOUR_BTNSHADOW 16 -#define wxSYS_COLOUR_GRAYTEXT 17 -#define wxSYS_COLOUR_BTNTEXT 18 -#define wxSYS_COLOUR_INACTIVECAPTIONTEXT 19 -#define wxSYS_COLOUR_BTNHIGHLIGHT 20 - -#define wxSYS_COLOUR_3DDKSHADOW 21 -#define wxSYS_COLOUR_3DLIGHT 22 -#define wxSYS_COLOUR_INFOTEXT 23 -#define wxSYS_COLOUR_INFOBK 24 - -#define wxSYS_COLOUR_DESKTOP wxSYS_COLOUR_BACKGROUND -#define wxSYS_COLOUR_3DFACE wxSYS_COLOUR_BTNFACE -#define wxSYS_COLOUR_3DSHADOW wxSYS_COLOUR_BTNSHADOW -#define wxSYS_COLOUR_3DHIGHLIGHT wxSYS_COLOUR_BTNHIGHLIGHT -#define wxSYS_COLOUR_3DHILIGHT wxSYS_COLOUR_BTNHIGHLIGHT -#define wxSYS_COLOUR_BTNHILIGHT wxSYS_COLOUR_BTNHIGHLIGHT -*/ - -#define SHIFT (8*(sizeof(short int)-sizeof(char))) - -wxColour *g_systemBtnFaceColour = (wxColour *) NULL; -wxColour *g_systemBtnShadowColour = (wxColour *) NULL; -wxColour *g_systemBtnHighlightColour = (wxColour *) NULL; -wxColour *g_systemHighlightColour = (wxColour *) NULL; - -wxFont *g_systemFont = (wxFont *) NULL; - -void wxSystemSettings::Done() { - wxDELETE(g_systemBtnFaceColour); - wxDELETE(g_systemBtnShadowColour); - wxDELETE(g_systemBtnHighlightColour); - wxDELETE(g_systemHighlightColour); - wxDELETE(g_systemFont); -} - -wxColour wxSystemSettings::GetSystemColour( int index ) -{ - switch (index) - { - case wxSYS_COLOUR_SCROLLBAR: - case wxSYS_COLOUR_BACKGROUND: - case wxSYS_COLOUR_ACTIVECAPTION: - case wxSYS_COLOUR_INACTIVECAPTION: - case wxSYS_COLOUR_MENU: - case wxSYS_COLOUR_WINDOW: - case wxSYS_COLOUR_WINDOWFRAME: - case wxSYS_COLOUR_ACTIVEBORDER: - case wxSYS_COLOUR_INACTIVEBORDER: - case wxSYS_COLOUR_BTNFACE: - { - GtkStyle *style = gtk_widget_get_default_style(); - if (!g_systemBtnFaceColour) - { - g_systemBtnFaceColour = - new wxColour( style->bg[0].red >> SHIFT, - style->bg[0].green >> SHIFT, - style->bg[0].blue >> SHIFT ); - } - return *g_systemBtnFaceColour; - } - case wxSYS_COLOUR_BTNSHADOW: - { - GtkStyle *style = gtk_widget_get_default_style(); - if (!g_systemBtnShadowColour) - { - g_systemBtnShadowColour = - new wxColour( style->dark[0].red >> SHIFT, - style->dark[0].green >> SHIFT, - style->dark[0].blue >> SHIFT ); - } - return *g_systemBtnShadowColour; - } - case wxSYS_COLOUR_GRAYTEXT: - case wxSYS_COLOUR_BTNHIGHLIGHT: - { - GtkStyle *style = gtk_widget_get_default_style(); - if (!g_systemBtnHighlightColour) - { - g_systemBtnHighlightColour = - new wxColour( style->light[0].red >> SHIFT, - style->light[0].green >> SHIFT, - style->light[0].blue >> SHIFT ); - } - return *g_systemBtnHighlightColour; - } - case wxSYS_COLOUR_HIGHLIGHT: - { - GtkStyle *style = gtk_widget_get_default_style(); - if (!g_systemHighlightColour) - { - g_systemHighlightColour = - new wxColour( style->bg[GTK_STATE_SELECTED].red >> SHIFT, - style->bg[GTK_STATE_SELECTED].green >> SHIFT, - style->bg[GTK_STATE_SELECTED].blue >> SHIFT ); - } - return *g_systemHighlightColour; - } - case wxSYS_COLOUR_MENUTEXT: - case wxSYS_COLOUR_WINDOWTEXT: - case wxSYS_COLOUR_CAPTIONTEXT: - case wxSYS_COLOUR_INACTIVECAPTIONTEXT: - case wxSYS_COLOUR_INFOTEXT: - { - return *wxBLACK; - } - case wxSYS_COLOUR_HIGHLIGHTTEXT: - { - return *wxWHITE; - } - case wxSYS_COLOUR_INFOBK: - case wxSYS_COLOUR_APPWORKSPACE: - { - return *wxWHITE; // ? - } - } - return *wxWHITE; -} - -wxFont wxSystemSettings::GetSystemFont( int index ) -{ - switch (index) - { - case wxSYS_OEM_FIXED_FONT: - case wxSYS_ANSI_FIXED_FONT: - case wxSYS_SYSTEM_FIXED_FONT: - { - return *wxNORMAL_FONT; - } - case wxSYS_ANSI_VAR_FONT: - case wxSYS_SYSTEM_FONT: - case wxSYS_DEVICE_DEFAULT_FONT: - case wxSYS_DEFAULT_GUI_FONT: - { - if (!g_systemFont) - g_systemFont = new wxFont( "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*" ); - return *g_systemFont; - } - } - - return wxNullFont; -} - -int wxSystemSettings::GetSystemMetric( int index ) -{ - switch (index) - { - case wxSYS_SCREEN_X: - return gdk_screen_width(); - case wxSYS_SCREEN_Y: - return gdk_screen_height(); - } - return 0; -} diff --git a/src/gtk/slider.cpp b/src/gtk/slider.cpp deleted file mode 100644 index 83c33ce33d..0000000000 --- a/src/gtk/slider.cpp +++ /dev/null @@ -1,236 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: slider.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "slider.h" -#endif - -#include "wx/slider.h" -#include "wx/utils.h" - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxSlider -//----------------------------------------------------------------------------- - -static void gtk_slider_callback( GtkWidget *WXUNUSED(widget), wxSlider *win ) -{ - if (!win->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - float diff = win->m_adjust->value - win->m_oldPos; - if (fabs(diff) < 0.2) return; - - wxEventType command = wxEVT_NULL; - - float line_step = win->m_adjust->step_increment; - float page_step = win->m_adjust->page_increment; - - if (fabs(diff-line_step) < 0.2) command = wxEVT_SCROLL_LINEDOWN; - else if (fabs(diff+line_step) < 0.2) command = wxEVT_SCROLL_LINEUP; - else if (fabs(diff-page_step) < 0.2) command = wxEVT_SCROLL_PAGEDOWN; - else if (fabs(diff+page_step) < 0.2) command = wxEVT_SCROLL_PAGEUP; - else command = wxEVT_SCROLL_THUMBTRACK; - - int value = (int)(win->m_adjust->value+0.5); - - int orient = wxHORIZONTAL; - if (win->GetWindowStyleFlag() & wxSB_VERTICAL == wxSB_VERTICAL) orient = wxHORIZONTAL; - - wxScrollEvent event( command, win->GetId(), value, orient ); - event.SetEventObject( win ); - win->ProcessEvent( event ); - - wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, win->GetId() ); - cevent.SetEventObject( win ); - win->ProcessEvent( cevent ); -} - -IMPLEMENT_DYNAMIC_CLASS(wxSlider,wxControl) - -wxSlider::wxSlider(void) -{ -} - -wxSlider::~wxSlider(void) -{ -} - -bool wxSlider::Create(wxWindow *parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& pos, const wxSize& size, - long style, const wxValidator& validator, const wxString& name ) -{ - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - SetValidator( validator ); - - m_oldPos = 0.0; - - if (style & wxSL_VERTICAL == wxSL_VERTICAL) - m_widget = gtk_hscale_new( (GtkAdjustment *) NULL ); - else - m_widget = gtk_vscale_new( (GtkAdjustment *) NULL ); - - m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) ); - - gtk_signal_connect (GTK_OBJECT (m_adjust), "value_changed", - (GtkSignalFunc) gtk_slider_callback, (gpointer) this ); - SetRange( minValue, maxValue ); - SetValue( value ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -int wxSlider::GetValue(void) const -{ - return (int)(m_adjust->value+0.5); -} - -void wxSlider::SetValue( int value ) -{ - float fpos = (float)value; - m_oldPos = fpos; - if (fabs(fpos-m_adjust->value) < 0.2) return; - m_adjust->value = fpos; - - gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "value_changed" ); -} - -void wxSlider::SetRange( int minValue, int maxValue ) -{ - float fmin = (float)minValue; - float fmax = (float)maxValue; - - if ((fabs(fmin-m_adjust->lower) < 0.2) && - (fabs(fmax-m_adjust->upper) < 0.2)) - return; - - m_adjust->lower = fmin; - m_adjust->upper = fmax; - - gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "changed" ); -} - -int wxSlider::GetMin(void) const -{ - return (int)(m_adjust->lower+0.5); -} - -int wxSlider::GetMax(void) const -{ - return (int)(m_adjust->upper+0.5); -} - -void wxSlider::SetPageSize( int pageSize ) -{ - float fpage = (float)pageSize; - - if (fabs(fpage-m_adjust->page_increment) < 0.2) return; - - m_adjust->page_increment = fpage; - - gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "changed" ); -} - -int wxSlider::GetPageSize(void) const -{ - return (int)(m_adjust->page_increment+0.5); -} - -void wxSlider::SetThumbLength( int len ) -{ - float flen = (float)len; - - if (fabs(flen-m_adjust->page_size) < 0.2) return; - - m_adjust->page_size = flen; - - gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "changed" ); -} - -int wxSlider::GetThumbLength(void) const -{ - return (int)(m_adjust->page_size+0.5); -} - -void wxSlider::SetLineSize( int WXUNUSED(lineSize) ) -{ -} - -int wxSlider::GetLineSize(void) const -{ - return 0; -} - -// not supported in wxGTK (and GTK) - -void wxSlider::GetSize( int *x, int *y ) const -{ - wxWindow::GetSize( x, y ); -} - -void wxSlider::SetSize( int x, int y, int width, int height, int sizeFlags ) -{ - wxWindow::SetSize( x, y, width, height, sizeFlags ); -} - -void wxSlider::GetPosition( int *x, int *y ) const -{ - wxWindow::GetPosition( x, y ); -} - -void wxSlider::SetTick( int WXUNUSED(tickPos) ) -{ -} - -void wxSlider::SetTickFreq( int WXUNUSED(n), int WXUNUSED(pos) ) -{ -} - -int wxSlider::GetTickFreq(void) const -{ - return 0; -} - -void wxSlider::ClearTicks(void) -{ -} - -void wxSlider::SetSelection( int WXUNUSED(minPos), int WXUNUSED(maxPos) ) -{ -} - -int wxSlider::GetSelEnd(void) const -{ - return 0; -} - -int wxSlider::GetSelStart(void) const -{ - return 0; -} - -void wxSlider::ClearSel(void) -{ -} - diff --git a/src/gtk/statbmp.cpp b/src/gtk/statbmp.cpp deleted file mode 100644 index 4f68379b41..0000000000 --- a/src/gtk/statbmp.cpp +++ /dev/null @@ -1,79 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: statbmp.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "statbmp.h" -#endif - -#include "wx/statbmp.h" - -//----------------------------------------------------------------------------- -// wxStaticBitmap -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap,wxControl) - -wxStaticBitmap::wxStaticBitmap(void) -{ -}; - -wxStaticBitmap::wxStaticBitmap( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - Create( parent, id, bitmap, pos, size, style, name ); -}; - -bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - m_needParent = TRUE; - - wxSize newSize = size; - - PreCreation( parent, id, pos, size, style, name ); - - m_bitmap = bitmap; - - if (m_bitmap.Ok()) - { - GdkBitmap *mask = (GdkBitmap *) NULL; - if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); - m_widget = gtk_pixmap_new( m_bitmap.GetPixmap(), mask ); - - if (newSize.x == -1) newSize.x = m_bitmap.GetWidth(); - if (newSize.y == -1) newSize.y = m_bitmap.GetHeight(); - SetSize( newSize.x, newSize.y ); - } - else - { - m_widget = gtk_label_new( "Bitmap" ); - } - - PostCreation(); - - Show( TRUE ); - - return TRUE; -}; - -void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap ) -{ - m_bitmap = bitmap; - - if (m_bitmap.Ok()) - { - GdkBitmap *mask = (GdkBitmap *) NULL; - if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); - gtk_pixmap_set( GTK_PIXMAP(m_widget), m_bitmap.GetPixmap(), mask ); - } -}; - diff --git a/src/gtk/statbox.cpp b/src/gtk/statbox.cpp deleted file mode 100644 index 3f6abe3198..0000000000 --- a/src/gtk/statbox.cpp +++ /dev/null @@ -1,50 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: statbox.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "statbox.h" -#endif - -#include "wx/statbox.h" - -//----------------------------------------------------------------------------- -// wxStaticBox -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxStaticBox,wxControl) - -wxStaticBox::wxStaticBox(void) -{ -}; - -wxStaticBox::wxStaticBox( wxWindow *parent, wxWindowID id, const wxString &label, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - Create( parent, id, label, pos, size, style, name ); -}; - -bool wxStaticBox::Create( wxWindow *parent, wxWindowID id, const wxString &label, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - SetLabel(label); - m_widget = gtk_frame_new(m_label); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -}; diff --git a/src/gtk/stattext.cpp b/src/gtk/stattext.cpp deleted file mode 100644 index 502014914f..0000000000 --- a/src/gtk/stattext.cpp +++ /dev/null @@ -1,113 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: stattext.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "stattext.h" -#endif - -#include "wx/stattext.h" - -//----------------------------------------------------------------------------- -// wxStaticText -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxStaticText,wxControl) - -wxStaticText::wxStaticText(void) -{ -}; - -wxStaticText::wxStaticText( wxWindow *parent, wxWindowID id, const wxString &label, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - Create( parent, id, label, pos, size, style, name ); -}; - -bool wxStaticText::Create( wxWindow *parent, wxWindowID id, const wxString &label, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - m_needParent = TRUE; - - wxSize newSize = size; - - PreCreation( parent, id, pos, size, style, name ); - - wxControl::SetLabel(label); - m_widget = gtk_label_new( m_label ); - - GtkJustification justify; - if ( style & wxALIGN_CENTER ) - justify = GTK_JUSTIFY_CENTER; - else if ( style & wxALIGN_RIGHT ) - justify = GTK_JUSTIFY_RIGHT; - else // wxALIGN_LEFT is 0 - justify = GTK_JUSTIFY_LEFT; - gtk_label_set_justify(GTK_LABEL(m_widget), justify); - - int y = 1; - if (newSize.x == -1) { - char *s = WXSTRINGCAST m_label; - char *nl = strchr(s, '\n'); - if (nl) { - do { - *nl = 0; - int x = gdk_string_measure( m_widget->style->font, s ); - if (x > newSize.x) { - newSize.x = x; - } - *nl++ = '\n'; - if ((nl = strchr(s = nl, '\n'))) { - ++y; - } else { - int x = gdk_string_measure( m_widget->style->font, s ); - if (x > newSize.x) { - newSize.x = x; - } - } - } while (nl); - } else { - newSize.x = gdk_string_measure( m_widget->style->font, label ); - } - } - if (newSize.y == -1) { - if (y == 1) { - newSize.y = 26; - } else { - newSize.y - = y * (m_widget->style->font->ascent +m_widget->style->font->descent); - } - } - - SetSize( newSize.x, newSize.y ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -}; - -wxString wxStaticText::GetLabel(void) const -{ - char *str = (char *) NULL; - gtk_label_get( GTK_LABEL(m_widget), &str ); - wxString tmp( str ); - return tmp; -}; - -void wxStaticText::SetLabel( const wxString &label ) -{ - wxControl::SetLabel(label); - - gtk_label_set( GTK_LABEL(m_widget), m_label ); -}; diff --git a/src/gtk/tbargtk.cpp b/src/gtk/tbargtk.cpp deleted file mode 100644 index 1ced090e50..0000000000 --- a/src/gtk/tbargtk.cpp +++ /dev/null @@ -1,328 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tbargtk.cpp -// Purpose: GTK toolbar -// Author: Robert Roebling -// Modified by: -// Created: 01/02/97 -// RCS-ID: -// Copyright: (c) Robert Roebling -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "tbargtk.h" -#endif - -#include "wx/toolbar.h" -#include - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxToolBarTool -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool,wxObject) - -wxToolBarTool::wxToolBarTool( wxToolBar *owner, int theIndex, - const wxBitmap& bitmap1, const wxBitmap& bitmap2, - bool toggle, wxObject *clientData, - const wxString& shortHelpString, const wxString& longHelpString, - GtkWidget *item ) -{ - m_owner = owner; - m_index = theIndex; - m_bitmap1 = bitmap1; - m_bitmap2 = bitmap2; - m_isToggle = toggle; - m_enabled = TRUE; - m_toggleState = FALSE; - m_shortHelpString = shortHelpString; - m_longHelpString = longHelpString; - m_isMenuCommand = TRUE; - m_clientData = clientData; - m_deleteSecondBitmap = FALSE; - m_item = item; -} - -wxToolBarTool::~wxToolBarTool() -{ -} - -//----------------------------------------------------------------------------- -// "clicked" (internal from gtk_toolbar) -//----------------------------------------------------------------------------- - -static void gtk_toolbar_callback( GtkWidget *WXUNUSED(widget), wxToolBarTool *tool ) -{ - if (g_blockEventsOnDrag) return; - if (!tool->m_enabled) return; - - if (tool->m_isToggle) tool->m_toggleState = !tool->m_toggleState; - - tool->m_owner->OnLeftClick( tool->m_index, tool->m_toggleState ); -} - -//----------------------------------------------------------------------------- -// "enter_notify_event" -//----------------------------------------------------------------------------- - -static gint gtk_toolbar_enter_callback( GtkWidget *WXUNUSED(widget), - GdkEventCrossing *WXUNUSED(gdk_event), wxToolBarTool *tool ) -{ - if (g_blockEventsOnDrag) return TRUE; - - tool->m_owner->OnMouseEnter( tool->m_index ); - - return TRUE; -} - -//----------------------------------------------------------------------------- -// wxToolBar -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxToolBar,wxControl) - -wxToolBar::wxToolBar() -{ -} - -wxToolBar::wxToolBar( wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) -{ - Create( parent, id, pos, size, style, name ); -} - -wxToolBar::~wxToolBar() -{ -} - -bool wxToolBar::Create( wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) -{ - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - m_tools.DeleteContents( TRUE ); - - m_widget = gtk_handle_box_new(); - - m_toolbar = GTK_TOOLBAR( gtk_toolbar_new( GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS ) ); - - gtk_container_add( GTK_CONTAINER(m_widget), GTK_WIDGET(m_toolbar) ); - - gtk_widget_show( GTK_WIDGET(m_toolbar) ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -bool wxToolBar::OnLeftClick( int toolIndex, bool toggleDown ) -{ - wxCommandEvent event( wxEVT_COMMAND_TOOL_CLICKED, toolIndex ); - event.SetEventObject(this); - event.SetInt( toolIndex ); - event.SetExtraLong((long) toggleDown); - - GetEventHandler()->ProcessEvent(event); - - return TRUE; -} - -void wxToolBar::OnRightClick( int toolIndex, float WXUNUSED(x), float WXUNUSED(y) ) -{ - wxCommandEvent event( wxEVT_COMMAND_TOOL_RCLICKED, toolIndex ); - event.SetEventObject( this ); - event.SetInt( toolIndex ); - - GetEventHandler()->ProcessEvent(event); -} - -void wxToolBar::OnMouseEnter( int toolIndex ) -{ - wxCommandEvent event( wxEVT_COMMAND_TOOL_ENTER, GetId() ); - event.SetEventObject(this); - event.SetInt( toolIndex ); - - GetEventHandler()->ProcessEvent(event); -} - -wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap, - const wxBitmap& pushedBitmap, bool toggle, - float WXUNUSED(xPos), float WXUNUSED(yPos), wxObject *clientData, - const wxString& helpString1, const wxString& helpString2 ) -{ - if (!bitmap.Ok()) return (wxToolBarTool *) NULL; - - wxToolBarTool *tool = new wxToolBarTool( this, toolIndex, bitmap, pushedBitmap, toggle, - clientData, helpString1, helpString2 ); - - GtkWidget *tool_pixmap = (GtkWidget *) NULL; - - wxCHECK_MSG( bitmap.GetBitmap() == NULL, (wxToolBarTool *)NULL, "wxToolBar doesn't support GdkBitmap" ) - - wxCHECK_MSG( bitmap.GetPixmap() != NULL, (wxToolBarTool *)NULL, "wxToolBar::Add needs a wxBitmap" ) - - if (TRUE) - { - GdkPixmap *pixmap = bitmap.GetPixmap(); - - GdkBitmap *mask = (GdkBitmap *) NULL; - if (bitmap.GetMask()) mask = bitmap.GetMask()->GetBitmap(); - - tool_pixmap = gtk_pixmap_new( pixmap, mask ); - } - - gtk_misc_set_alignment( GTK_MISC(tool_pixmap), 0.5, 0.5 ); - - GtkToolbarChildType ctype = GTK_TOOLBAR_CHILD_BUTTON; - if (toggle) ctype = GTK_TOOLBAR_CHILD_TOGGLEBUTTON; - - tool->m_item = gtk_toolbar_append_element( m_toolbar, ctype, (GtkWidget *) NULL, (const char *) NULL, helpString1, "", tool_pixmap, - (GtkSignalFunc)gtk_toolbar_callback, (gpointer)tool ); - - gtk_signal_connect( GTK_OBJECT(tool->m_item), "enter_notify_event", - GTK_SIGNAL_FUNC(gtk_toolbar_enter_callback), (gpointer)tool ); - - m_tools.Append( tool ); - - return tool; -} - -void wxToolBar::AddSeparator(void) -{ - gtk_toolbar_append_space( m_toolbar ); -} - -void wxToolBar::ClearTools(void) -{ - wxFAIL_MSG( "wxToolBar::ClearTools not implemented" ); -} - -void wxToolBar::Realize(void) -{ - m_x = 0; - m_y = 0; - m_width = 100; - m_height = 0; - - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool*)node->Data(); - if (tool->m_bitmap1.Ok()) - { - int tool_height = tool->m_bitmap1.GetHeight(); - if (tool_height > m_height) m_height = tool_height; - } - - node = node->Next(); - } - - m_height += 10; -} - -void wxToolBar::EnableTool(int toolIndex, bool enable) -{ - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool*)node->Data(); - if (tool->m_index == toolIndex) - { - tool->m_enabled = enable; - return; - } - node = node->Next(); - } - - wxFAIL_MSG( "wrong toolbar index" ); -} - -void wxToolBar::ToggleTool( int toolIndex, bool toggle ) -{ - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool*)node->Data(); - if (tool->m_index == toolIndex) - { - tool->m_toggleState = toggle; - if ((tool->m_item) && (GTK_IS_TOGGLE_BUTTON(tool->m_item))) - gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(tool->m_item), toggle ); - return; - } - node = node->Next(); - } - - wxFAIL_MSG( "wrong toolbar index" ); -} - -wxObject *wxToolBar::GetToolClientData( int index ) const -{ - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool*)node->Data(); - if (tool->m_index == index) return tool->m_clientData;; - node = node->Next(); - } - - wxFAIL_MSG( "wrong toolbar index" ); - - return (wxObject*)NULL; -} - -bool wxToolBar::GetToolState(int toolIndex) const -{ - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool*)node->Data(); - if (tool->m_index == toolIndex) return tool->m_toggleState; - node = node->Next(); - } - - wxFAIL_MSG( "wrong toolbar index" ); - - return FALSE; -} - -bool wxToolBar::GetToolEnabled(int toolIndex) const -{ - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool*)node->Data(); - if (tool->m_index == toolIndex) return tool->m_enabled; - node = node->Next(); - } - - wxFAIL_MSG( "wrong toolbar index" ); - - return FALSE; -} - -void wxToolBar::SetMargins( int WXUNUSED(x), int WXUNUSED(y) ) -{ -} - -void wxToolBar::SetToolPacking( int WXUNUSED(packing) ) -{ -} - -void wxToolBar::SetToolSeparation( int separation ) -{ - gtk_toolbar_set_space_size( m_toolbar, separation ); -} - diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp deleted file mode 100644 index 5d5b5056b3..0000000000 --- a/src/gtk/textctrl.cpp +++ /dev/null @@ -1,433 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: textctrl.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "textctrl.h" -#endif - -#include "wx/textctrl.h" -#include "wx/utils.h" -#include - -//----------------------------------------------------------------------------- -// "changed" -//----------------------------------------------------------------------------- - -static void gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxTextCtrl *win ) -{ - win->SetModified(); - - wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, win->m_windowId ); - wxString val( win->GetValue() ); - if (!val.IsNull()) event.m_commandString = WXSTRINGCAST val; - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); -} - -//----------------------------------------------------------------------------- -// wxTextCtrl -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl,wxControl) - -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) - EVT_CHAR(wxTextCtrl::OnChar) -END_EVENT_TABLE() - -wxTextCtrl::wxTextCtrl(void) : streambuf() -{ - if (allocate()) setp(base(),ebuf()); - - m_modified = FALSE; -} - -wxTextCtrl::wxTextCtrl( wxWindow *parent, wxWindowID id, const wxString &value, - const wxPoint &pos, const wxSize &size, - int style, const wxValidator& validator, const wxString &name ) : streambuf() -{ - if (allocate()) setp(base(),ebuf()); - - m_modified = FALSE; - Create( parent, id, value, pos, size, style, validator, name ); -} - -bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value, - const wxPoint &pos, const wxSize &size, - int style, const wxValidator& validator, const wxString &name ) -{ - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - SetValidator( validator ); - - bool bMultiLine = (style & wxTE_MULTILINE) != 0; - if ( bMultiLine ) - { - // a multi-line edit control: create a vertical scrollbar by default and - // horizontal if requested - bool bHasHScrollbar = (style & wxHSCROLL) != 0; - - // create our control... - m_text = gtk_text_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL ); - - // ... and put into the upper left hand corner of the table - m_widget = gtk_table_new(bHasHScrollbar ? 2 : 1, 2, FALSE); - gtk_table_attach(GTK_TABLE(m_widget), m_text, 0, 1, 0, 1, - GTK_FILL | GTK_EXPAND, - GTK_FILL | GTK_EXPAND | GTK_SHRINK, - 0, 0); - - // put the horizontal scrollbar in the lower left hand corner - if (bHasHScrollbar) - { - GtkWidget *hscrollbar = gtk_hscrollbar_new(GTK_TEXT(m_text)->hadj); - gtk_table_attach(GTK_TABLE(m_widget), hscrollbar, 0, 1, 1, 2, - GTK_EXPAND | GTK_FILL, - GTK_FILL, - 0, 0); - gtk_widget_show(hscrollbar); - } - - // finally, put the vertical scrollbar in the upper right corner - GtkWidget *vscrollbar = gtk_vscrollbar_new(GTK_TEXT(m_text)->vadj); - gtk_table_attach(GTK_TABLE(m_widget), vscrollbar, 1, 2, 0, 1, - GTK_FILL, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, - 0, 0); - gtk_widget_show( vscrollbar ); - } - else - { - // a single-line text control: no need for scrollbars - m_widget = - m_text = gtk_entry_new(); - } - - wxSize newSize = size; - if (newSize.x == -1) newSize.x = 80; - if (newSize.y == -1) newSize.y = 26; - SetSize( newSize.x, newSize.y ); - - PostCreation(); - - if (bMultiLine) - { - gtk_widget_realize(m_text); - gtk_widget_show(m_text); - } - - // we want to be notified about text changes - gtk_signal_connect(GTK_OBJECT(m_text), "changed", - GTK_SIGNAL_FUNC(gtk_text_changed_callback), - (gpointer)this); - - if (!value.IsNull()) - { - gint tmp = 0; - gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.Length(), &tmp ); - } - - if (style & wxTE_READONLY) - { - } - else - { - if (bMultiLine) - gtk_text_set_editable( GTK_TEXT(m_text), 1 ); - } - - Show( TRUE ); - - return TRUE; -} - -wxString wxTextCtrl::GetValue(void) const -{ - wxString tmp; - if (m_windowStyle & wxTE_MULTILINE) - { - gint len = gtk_text_get_length( GTK_TEXT(m_text) ); - tmp = gtk_editable_get_chars( GTK_EDITABLE(m_text), 0, len ); - } - else - { - tmp = gtk_entry_get_text( GTK_ENTRY(m_text) ); - } - return tmp; -} - -void wxTextCtrl::SetValue( const wxString &value ) -{ - wxString tmp = ""; - if (!value.IsNull()) tmp = value; - if (m_windowStyle & wxTE_MULTILINE) - { - gint len = gtk_text_get_length( GTK_TEXT(m_text) ); - gtk_editable_delete_text( GTK_EDITABLE(m_text), 0, len ); - len = 0; - gtk_editable_insert_text( GTK_EDITABLE(m_text), tmp, tmp.Length(), &len ); - } - else - { - gtk_entry_set_text( GTK_ENTRY(m_text), tmp ); - } -} - -void wxTextCtrl::WriteText( const wxString &text ) -{ - if (text.IsNull()) return; - - if (m_windowStyle & wxTE_MULTILINE) - { - gint len = gtk_text_get_length( GTK_TEXT(m_text) ); - gtk_editable_insert_text( GTK_EDITABLE(m_text), text, text.Length(), &len ); - } - else - { - gtk_entry_append_text( GTK_ENTRY(m_text), text ); - } -} - -bool wxTextCtrl::LoadFile( const wxString &WXUNUSED(file) ) -{ - wxFAIL_MSG( "wxTextCtrl::LoadFile not implemented" ); - - return FALSE; -} - -bool wxTextCtrl::SaveFile( const wxString &WXUNUSED(file) ) -{ - wxFAIL_MSG( "wxTextCtrl::SaveFile not implemented" ); - - return FALSE; -} - -/* -wxString wxTextCtrl::GetLineText( long lineNo ) const -{ -} - - -void wxTextCtrl::OnDropFiles( wxDropFilesEvent &event ) -{ -} - -long wxTextCtrl::PositionToXY( long pos, long *x, long *y ) const -{ -} - -long wxTextCtrl::XYToPosition( long x, long y ) -{ -} - -int wxTextCtrl::GetNumberOfLines(void) -{ -} - -*/ -void wxTextCtrl::SetInsertionPoint( long pos ) -{ - int tmp = (int) pos; - if (m_windowStyle & wxTE_MULTILINE) - gtk_text_set_point( GTK_TEXT(m_text), tmp ); - else - gtk_entry_set_position( GTK_ENTRY(m_text), tmp ); -} - -void wxTextCtrl::SetInsertionPointEnd(void) -{ - int pos = 0; - if (m_windowStyle & wxTE_MULTILINE) - pos = gtk_text_get_length( GTK_TEXT(m_text) ); - else - pos = GTK_ENTRY(m_text)->text_length; - SetInsertionPoint( pos-1 ); -} - -void wxTextCtrl::SetEditable( bool editable ) -{ - if (m_windowStyle & wxTE_MULTILINE) - gtk_text_set_editable( GTK_TEXT(m_text), editable ); - else - gtk_entry_set_editable( GTK_ENTRY(m_text), editable ); -} - -void wxTextCtrl::SetSelection( long from, long to ) -{ - gtk_editable_select_region( GTK_EDITABLE(m_text), (gint)from, (gint)to ); -} - -void wxTextCtrl::ShowPosition( long WXUNUSED(pos) ) -{ - wxFAIL_MSG(_("wxTextCtrl::ShowPosition not implemented")); -} - -long wxTextCtrl::GetInsertionPoint(void) const -{ - return (long) GTK_EDITABLE(m_text)->current_pos; -} - -long wxTextCtrl::GetLastPosition(void) const -{ - int pos = 0; - if (m_windowStyle & wxTE_MULTILINE) - pos = gtk_text_get_length( GTK_TEXT(m_text) ); - else - pos = GTK_ENTRY(m_text)->text_length; - return (long)pos-1; -} - -void wxTextCtrl::Remove( long from, long to ) -{ - gtk_editable_delete_text( GTK_EDITABLE(m_text), (gint)from, (gint)to ); -} - -void wxTextCtrl::Replace( long from, long to, const wxString &value ) -{ - gtk_editable_delete_text( GTK_EDITABLE(m_text), (gint)from, (gint)to ); - if (value.IsNull()) return; - gint pos = (gint)to; - gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.Length(), &pos ); -} - -void wxTextCtrl::Cut(void) -{ - gtk_editable_cut_clipboard( GTK_EDITABLE(m_text), 0 ); -} - -void wxTextCtrl::Copy(void) -{ - gtk_editable_copy_clipboard( GTK_EDITABLE(m_text), 0 ); -} - -void wxTextCtrl::Paste(void) -{ - gtk_editable_paste_clipboard( GTK_EDITABLE(m_text), 0 ); -} - -void wxTextCtrl::Delete(void) -{ - SetValue( "" ); -} - -void wxTextCtrl::OnChar( wxKeyEvent &key_event ) -{ - if ((key_event.KeyCode() == WXK_RETURN) && (m_windowStyle & wxPROCESS_ENTER)) - { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); - event.SetEventObject(this); - printf( "Hallo.\n" ); - if (GetEventHandler()->ProcessEvent(event)) return; - } - else if (key_event.KeyCode() == WXK_TAB) - { - wxNavigationKeyEvent event; - event.SetDirection( key_event.m_shiftDown ); - event.SetWindowChange(FALSE); - event.SetEventObject(this); - - if (GetEventHandler()->ProcessEvent(event)) return; - } - key_event.Skip(); -} - -int wxTextCtrl::overflow( int WXUNUSED(c) ) -{ - int len = pptr() - pbase(); - char *txt = new char[len+1]; - strncpy(txt, pbase(), len); - txt[len] = '\0'; - (*this) << txt; - setp(pbase(), epptr()); - delete[] txt; - return EOF; -} - -int wxTextCtrl::sync(void) -{ - int len = pptr() - pbase(); - char *txt = new char[len+1]; - strncpy(txt, pbase(), len); - txt[len] = '\0'; - (*this) << txt; - setp(pbase(), epptr()); - delete[] txt; - return 0; -} - -int wxTextCtrl::underflow(void) -{ - return EOF; -} - -wxTextCtrl& wxTextCtrl::operator<<(const wxString& s) -{ - WriteText(s); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(float f) -{ - static char buf[100]; - sprintf(buf, "%.2f", f); - WriteText(buf); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(double d) -{ - static char buf[100]; - sprintf(buf, "%.2f", d); - WriteText(buf); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(int i) -{ - static char buf[100]; - sprintf(buf, "%i", i); - WriteText(buf); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(long i) -{ - static char buf[100]; - sprintf(buf, "%ld", i); - WriteText(buf); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(const char c) -{ - char buf[2]; - - buf[0] = c; - buf[1] = 0; - WriteText(buf); - return *this; -} - -GtkWidget* wxTextCtrl::GetConnectWidget(void) -{ - return GTK_WIDGET(m_text); -} - -bool wxTextCtrl::IsOwnGtkWindow( GdkWindow *window ) -{ - if (m_windowStyle & wxTE_MULTILINE) - return (window == GTK_TEXT(m_text)->text_area); - else - return (window == GTK_ENTRY(m_text)->text_area); -} - - - diff --git a/src/gtk/threadgui.inc b/src/gtk/threadgui.inc deleted file mode 100644 index 165fef3c01..0000000000 --- a/src/gtk/threadgui.inc +++ /dev/null @@ -1,65 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: threadgui.inc -// Purpose: GUI thread manager for GTK -// Author: Original from Wolfram Gloger/Guilhem Lavaux -// Modified by: -// Created: 04/22/98 -// RCS-ID: $Id$ -// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#include -#include - -// for select() -#include -#include -#ifdef __sgi -#include -#endif - -#include - - -///////////////////////////////////////////////////////////////////////////// -// Static variables -///////////////////////////////////////////////////////////////////////////// - -static int p_thrd_pipe[2] = { -1, -1 }; -// WorkProc in GTK -static gint p_thrd_inid; - -#define THREAD_SEND_EXIT_MSG(ptr) write(p_thrd_pipe[1], &ptr, sizeof(ptr)); - -static void -ThreadExitProc(gpointer WXUNUSED(client), gint fid, - GdkInputCondition WXUNUSED(cond)) -{ - wxThread* ptr; - - if (fid != p_thrd_pipe[0]) - return; - if (read(fid, &ptr, sizeof(ptr)) == sizeof(ptr)) { - //fprintf(stderr, "calling OnExit %p\n", ptr); - ptr->OnExit(); - } else { - //fprintf(stderr, "this should never happen\n"); - } -} - -// Global initialization -static void wxThreadGuiInit() -{ - pipe(p_thrd_pipe); - p_thrd_inid = gdk_input_add(p_thrd_pipe[0], GDK_INPUT_READ, - ThreadExitProc, 0); -} - -// Global cleanup -static void wxThreadGuiExit() -{ - gdk_input_remove(p_thrd_inid); - close(p_thrd_pipe[0]); - close(p_thrd_pipe[1]); -} diff --git a/src/gtk/threadno.cpp b/src/gtk/threadno.cpp deleted file mode 100644 index 3a1f3460c7..0000000000 --- a/src/gtk/threadno.cpp +++ /dev/null @@ -1,180 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: thread.cpp -// Purpose: No thread support -// Author: Original from Wolfram Gloger/Guilhem Lavaux -// Modified by: -// Created: 04/22/98 -// RCS-ID: $Id$ -// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "thread.h" -#endif - -#include "wx/wx.h" -#include "wx/module.h" -#include "wx/thread.h" - -wxMutex::wxMutex() -{ - m_locked = 0; -} - -wxMutex::~wxMutex() -{ - if (m_locked) - wxDebugMsg("wxMutex warning: destroying a locked mutex (%d locks)\n", m_locked); -} - -wxMutexError wxMutex::Lock() -{ - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::TryLock() -{ - if (m_locked > 0) - return MUTEX_BUSY; - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::Unlock() -{ - if (m_locked == 0) - return MUTEX_UNLOCKED; - m_locked--; - return MUTEX_NO_ERROR; -} - -wxCondition::wxCondition() -{ -} - -wxCondition::~wxCondition() -{ -} - -void wxCondition::Wait(wxMutex& WXUNUSED(mutex)) -{ -} - -bool wxCondition::Wait(wxMutex& WXUNUSED(mutex), unsigned long WXUNUSED(sec), - unsigned long WXUNUSED(nsec)) -{ - return FALSE; -} - -void wxCondition::Signal() -{ -} - -void wxCondition::Broadcast() -{ -} - -struct wxThreadInternal { - int thread_id; - void* exit_status; -}; - -wxThreadError wxThread::Create() -{ - p_internal->exit_status = Entry(); - OnExit(); - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Destroy() -{ - return THREAD_NOT_RUNNING; -} - -wxThreadError wxThread::Pause() -{ - return THREAD_NOT_RUNNING; -} - -wxThreadError wxThread::Resume() -{ - return THREAD_NOT_RUNNING; -} - -void wxThread::DeferDestroy( bool WXUNUSED(on) ) -{ -} - -void wxThread::TestDestroy() -{ -} - -void *wxThread::Join() -{ - return p_internal->exit_status; -} - -unsigned long wxThread::GetID() const -{ - return 0; -} - -bool wxThread::IsMain() -{ - return TRUE; -} - -bool wxThread::IsRunning() const -{ - return FALSE; -} - -bool wxThread::IsAlive() const -{ - return FALSE; -} - -void wxThread::SetPriority(int WXUNUSED(prio)) { } -int wxThread::GetPriority() const { return 0; } - -wxMutex wxMainMutex; // controls access to all GUI functions - -wxThread::wxThread() -{ - p_internal = new wxThreadInternal(); -} - -wxThread::~wxThread() -{ - Destroy(); - Join(); - delete p_internal; -} - -// The default callback just joins the thread and throws away the result. -void wxThread::OnExit() -{ - Join(); -} - - -// Automatic initialization -class wxThreadModule : public wxModule { - DECLARE_DYNAMIC_CLASS(wxThreadModule) -public: - bool OnInit(); - void OnExit(); -}; - -bool wxThreadModule::OnInit() { - wxMainMutex.Lock(); - return TRUE; -} - -void wxThreadModule::OnExit() -{ - wxMainMutex.Unlock(); -} - -IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule) diff --git a/src/gtk/threadpsx.cpp b/src/gtk/threadpsx.cpp deleted file mode 100644 index 9623b91c30..0000000000 --- a/src/gtk/threadpsx.cpp +++ /dev/null @@ -1,394 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: threadpsx.cpp -// Purpose: wxThread (Posix) Implementation -// Author: Original from Wolfram Gloger/Guilhem Lavaux -// Modified by: -// Created: 04/22/98 -// RCS-ID: $Id$ -// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "thread.h" -#endif - -#include -#include -#include -#include -#include "wx/thread.h" -#include "wx/module.h" -#include "wx/utils.h" - -enum thread_state { - STATE_IDLE = 0, - STATE_RUNNING, - STATE_PAUSING, - STATE_PAUSED, - STATE_CANCELED, - STATE_EXITED -}; - -///////////////////////////////////////////////////////////////////////////// -// Static variables -///////////////////////////////////////////////////////////////////////////// - -static pthread_t p_mainid; -static wxMutex p_list_mutex; -static wxList p_threads_list; - -wxMutex wxMainMutex; // controls access to all GUI functions - -///////////////////////////////////////////////////////////////////////////// -// GUI thread manager -///////////////////////////////////////////////////////////////////////////// -#include "threadgui.inc" - -///////////////////////////////////////////////////////////////////////////// -// wxThread: Posix Thread implementation (Mutex) -///////////////////////////////////////////////////////////////////////////// - -class wxMutexInternal { -public: - pthread_mutex_t p_mutex; -}; - -wxMutex::wxMutex() -{ - p_internal = new wxMutexInternal; - pthread_mutex_init(&(p_internal->p_mutex), NULL); - m_locked = 0; -} - -wxMutex::~wxMutex() -{ - if (m_locked > 0) - wxDebugMsg("wxMutex warning: freeing a locked mutex (%d locks)\n", - m_locked); - - pthread_mutex_destroy(&(p_internal->p_mutex)); - delete p_internal; -} - -wxMutexError wxMutex::Lock() -{ - int err; - - err = pthread_mutex_lock(&(p_internal->p_mutex)); - if (err == EDEADLK) - return MUTEX_DEAD_LOCK; - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::TryLock() -{ - int err; - - if (m_locked) - return MUTEX_BUSY; - err = pthread_mutex_trylock(&(p_internal->p_mutex)); - switch (err) { - case EBUSY: return MUTEX_BUSY; - } - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::Unlock() -{ - if (m_locked > 0) - m_locked--; - else - return MUTEX_UNLOCKED; - pthread_mutex_unlock(&(p_internal->p_mutex)); - return MUTEX_NO_ERROR; -} - -///////////////////////////////////////////////////////////////////////////// -// wxThread: Posix Thread implementation (Condition) -///////////////////////////////////////////////////////////////////////////// - -class wxConditionInternal { -public: - pthread_cond_t p_condition; -}; - -wxCondition::wxCondition() -{ - p_internal = new wxConditionInternal; - pthread_cond_init(&(p_internal->p_condition), NULL); -} - -wxCondition::~wxCondition() -{ - pthread_cond_destroy(&(p_internal->p_condition)); - delete p_internal; -} - -void wxCondition::Wait(wxMutex& mutex) -{ - pthread_cond_wait(&(p_internal->p_condition), &(mutex.p_internal->p_mutex)); -} - -bool wxCondition::Wait(wxMutex& mutex, unsigned long sec, unsigned long nsec) -{ - struct timespec tspec; - - tspec.tv_sec = time(NULL)+sec; - tspec.tv_nsec = nsec; - return (pthread_cond_timedwait(&(p_internal->p_condition), &(mutex.p_internal->p_mutex), &tspec) != ETIMEDOUT); -} - -void wxCondition::Signal() -{ - pthread_cond_signal(&(p_internal->p_condition)); -} - -void wxCondition::Broadcast() -{ - pthread_cond_broadcast(&(p_internal->p_condition)); -} - -///////////////////////////////////////////////////////////////////////////// -// wxThread: Posix Thread implementation (Thread) -///////////////////////////////////////////////////////////////////////////// - -class wxThreadInternal { -public: - wxThreadInternal() { state = STATE_IDLE; } - ~wxThreadInternal() {} - static void *PthreadStart(void *ptr); - pthread_t thread_id; - int state; - int prio; - int defer_destroy; - int id; -}; - -void *wxThreadInternal::PthreadStart(void *ptr) -{ - wxThread *thread = (wxThread *)ptr; - - // Add the current thread to the list - p_list_mutex.Lock(); - thread->p_internal->id = p_threads_list.Number(); - p_threads_list.Append((wxObject *)thread); - p_list_mutex.Unlock(); - - // Call the main entry - pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); - void* status = thread->Entry(); - - thread->Exit(status); - - return NULL; -} - -wxThreadError wxThread::Create() -{ - pthread_attr_t a; - int min_prio, max_prio, p; - struct sched_param sp; - - if (p_internal->state != STATE_IDLE) - return THREAD_RUNNING; - - // Change thread priority - pthread_attr_init(&a); - pthread_attr_getschedpolicy(&a, &p); - - min_prio = sched_get_priority_min(p); - max_prio = sched_get_priority_max(p); - - pthread_attr_getschedparam(&a, &sp); - sp.sched_priority = min_prio + - (p_internal->prio*(max_prio-min_prio))/100; - pthread_attr_setschedparam(&a, &sp); - - // this is the point of no return - p_internal->state = STATE_RUNNING; - if (pthread_create(&p_internal->thread_id, &a, - wxThreadInternal::PthreadStart, (void *)this) != 0) { - p_internal->state = STATE_IDLE; - pthread_attr_destroy(&a); - return THREAD_NO_RESOURCE; - } - pthread_attr_destroy(&a); - - return THREAD_NO_ERROR; -} - -void wxThread::SetPriority(int prio) -{ - if (p_internal->state == STATE_RUNNING) - return; - - if (prio > 100) - prio = 100; - if (prio < 0) - prio = 0; - p_internal->prio = prio; -} - -int wxThread::GetPriority() const -{ - return p_internal->prio; -} - -void wxThread::DeferDestroy(bool on) -{ - if (on) - pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL); - else - pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); -} - -wxThreadError wxThread::Destroy() -{ - int res = 0; - - if (p_internal->state == STATE_RUNNING) { - res = pthread_cancel(p_internal->thread_id); - if (res == 0) - p_internal->state = STATE_CANCELED; - } - - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Pause() -{ - if (p_internal->state != STATE_RUNNING) - return THREAD_NOT_RUNNING; - - if (!p_internal->defer_destroy) - return THREAD_MISC_ERROR; - - p_internal->state = STATE_PAUSING; - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Resume() -{ - if (p_internal->state == STATE_PAUSING || p_internal->state == STATE_PAUSED) - p_internal->state = STATE_RUNNING; - - return THREAD_NO_ERROR; -} - -void *wxThread::Join() -{ - void* status = 0; - - if (p_internal->state != STATE_IDLE) { - bool do_unlock = wxThread::IsMain(); - - while (p_internal->state == STATE_RUNNING) - wxYield(); - - if (do_unlock) - wxMainMutex.Unlock(); - pthread_join(p_internal->thread_id, &status); - if (do_unlock) - wxMainMutex.Lock(); - - p_list_mutex.Lock(); - delete p_threads_list.Nth(p_internal->id); - p_list_mutex.Unlock(); - - p_internal->state = STATE_IDLE; - } - return status; -} - -unsigned long wxThread::GetID() const -{ - return p_internal->id; -} - -wxThread *wxThread::GetThreadFromID(unsigned long id) -{ - wxNode *node = p_threads_list.Nth(id); - - if (!node) - return NULL; - return (wxThread *)node->Data(); -} - -void wxThread::Exit(void *status) -{ - wxThread* ptr = this; - - THREAD_SEND_EXIT_MSG(ptr); - p_internal->state = STATE_EXITED; - pthread_exit(status); -} - -void wxThread::TestDestroy() -{ - if (p_internal->state == STATE_PAUSING) { - p_internal->state = STATE_PAUSED; - while (p_internal->state == STATE_PAUSED) { - pthread_testcancel(); - usleep(1); - } - } - pthread_testcancel(); -} - -bool wxThread::IsMain() -{ - return (bool)pthread_equal(pthread_self(), p_mainid); -} - -bool wxThread::IsRunning() const -{ - return (p_internal->state == STATE_RUNNING); -} - -bool wxThread::IsAlive() const -{ - return (p_internal->state == STATE_RUNNING) || - (p_internal->state == STATE_PAUSING) || - (p_internal->state == STATE_PAUSED); -} - -wxThread::wxThread() -{ - p_internal = new wxThreadInternal(); -} - -wxThread::~wxThread() -{ - Destroy(); - Join(); - delete p_internal; -} - -// The default callback just joins the thread and throws away the result. -void wxThread::OnExit() -{ - Join(); -} - -// Automatic initialization -class wxThreadModule : public wxModule { - DECLARE_DYNAMIC_CLASS(wxThreadModule) -public: - virtual bool OnInit() { - wxThreadGuiInit(); - p_mainid = pthread_self(); - p_threads_list = wxList(wxKEY_INTEGER); - wxMainMutex.Lock(); - - return TRUE; - } - - virtual void OnExit() { - wxMainMutex.Unlock(); - wxThreadGuiExit(); - } -}; - -IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule) diff --git a/src/gtk/threadsgi.cpp b/src/gtk/threadsgi.cpp deleted file mode 100644 index 3503e79616..0000000000 --- a/src/gtk/threadsgi.cpp +++ /dev/null @@ -1,252 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: threadsgi.cpp -// Purpose: wxThread (SGI) Implementation -// Author: Original from Wolfram Gloger/Guilhem Lavaux -// Modified by: -// Created: 04/22/98 -// RCS-ID: $Id$ -// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "thread.h" -#endif - -#include -#include - -#include -#include -#include -#include "wx/thread.h" -#include "wx/module.h" -#include "wx/utils.h" - -enum thread_state { - STATE_IDLE = 0, - STATE_RUNNING, - STATE_CANCELED, - STATE_EXITED -}; - -///////////////////////////////////////////////////////////////////////////// -// Static variables -///////////////////////////////////////////////////////////////////////////// - -static int p_mainid; -wxMutex wxMainMutex; - -#include "threadgui.inc" - -///////////////////////////////////////////////////////////////////////////// -// Unix implementations (SGI threads) -///////////////////////////////////////////////////////////////////////////// - -class wxMutexInternal { -public: - abilock_t p_mutex; -}; - -wxMutex::wxMutex() -{ - m_locked = 0; - p_internal = new wxMutexInternal; - init_lock(&(p_internal->p_mutex)); -} - -wxMutex::~wxMutex() -{ - if (m_locked > 0) - wxDebugMsg("wxMutex warning: freeing a locked mutex (%d locks)\n", - m_locked); - delete p_internal; -} - -wxMutexError wxMutex::Lock() -{ - spin_lock(&(p_internal->p_mutex)); - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::TryLock() -{ - if (acquire_lock(&(p_internal->p_mutex)) != 0) - return MUTEX_BUSY; - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::Unlock() -{ - if (m_locked == 0) - return MUTEX_UNLOCKED; - release_lock(&(p_internal->p_mutex)); - m_locked--; - return MUTEX_NO_ERROR; -} - -// GL: Don't know how it works on SGI. Wolfram ? - -wxCondition::wxCondition() {} -wxCondition::~wxCondition() {} -int wxCondition::Wait(wxMutex& WXUNUSED(mutex)) { return 0;} -int wxCondition::Wait(wxMutex& WXUNUSED(mutex), unsigned long WXUNUSED(sec), - unsigned long WXUNUSED(nsec)) { return 0; } -int wxCondition::Signal() { return 0; } -int wxCondition::Broadcast() { return 0; } - -class -wxThreadPrivate { -public: - wxThreadPrivate() { thread_id = 0; state = STATE_IDLE; } - ~wxThreadPrivate() {} - static void SprocStart(void *ptr); - static void SignalHandler(int sig); -public: - int state, thread_id; - void* exit_status; -}; - -void wxThreadPrivate::SprocStart(void *ptr) -{ - void* status; - - wxThread *thr = (wxThread *)ptr; - - thr->p_internal->thread_id = getpid(); - thr->p_internal->exit_status = 0; - status = thr->Entry(); - thr->Exit(status); -} - -void wxThread::Exit(void* status) -{ - wxThread* ptr = this; - THREAD_SEND_EXIT_MSG(ptr); - p_internal->state = STATE_EXITED; - p_internal->exit_status = status; - _exit(0); -} - -wxThreadError wxThread::Create() -{ - if (p_internal->state != STATE_IDLE) - return THREAD_RUNNING; - p_internal->state = STATE_RUNNING; - if (sproc(p_internal->SprocStart, PR_SALL, this) < 0) { - p_internal->state = STATE_IDLE; - return THREAD_NO_RESOURCE; - } - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Destroy() -{ - if (p_internal->state == STATE_RUNNING) - p_internal->state = STATE_CANCELED; - - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Pause() -{ - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Resume() -{ - return THREAD_NO_ERROR; -} - -void *wxThread::Join() -{ - if (p_internal->state != STATE_IDLE) { - bool do_unlock = wxThread::IsMain(); - int stat; - - if (do_unlock) - wxMainMutex.Unlock(); - waitpid(p_internal->thread_id, &stat, 0); - if (do_unlock) - wxMainMutex.Lock(); - if (!WIFEXITED(stat) && !WIFSIGNALED(stat)) - return 0; - p_internal->state = STATE_IDLE; - return p_internal->exit_status; - } - return 0; -} - -unsigned long wxThread::GetID() const -{ - return (unsigned long)p_internal->thread_id; -} - -void wxThread::TestDestroy() -{ - if (p_internal->state == STATE_CANCELED) { - p_internal->exit_status = 0; - _exit(0); - } -} - -void wxThread::SetPriority(int prio) -{ -} - -int wxThread::GetPriority() const -{ - return 0; -} - -bool wxThread::IsMain() -{ - return (int)getpid() == main_id; -} - -bool wxThread::IsAlive() const -{ - return (p_internal->state == STATE_RUNNING); -} - -bool wxThread::IsRunning() const -{ - return (p_internal->state == STATE_RUNNING); -} - -wxThread::wxThread() -{ - p_internal = new wxThreadPrivate(); -} - -wxThread::~wxThread() -{ - Cancel(); - Join(); - delete p_internal; -} - -// The default callback just joins the thread and throws away the result. -void wxThread::OnExit() -{ - Join(); -} - -// Global initialization -class wxThreadModule : public wxModule { - DECLARE_DYNAMIC_CLASS(wxThreadModule) -public: - virtual bool OnInit() { - wxThreadGuiInit(); - p_mainid = (int)getpid(); - wxMainMutex.Lock(); - } - - virtual void OnExit() { - wxMainMutex.Unlock(); - wxThreadGuiExit(); - } -}; - -IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule) diff --git a/src/gtk/timer.cpp b/src/gtk/timer.cpp deleted file mode 100644 index cf9d2c64a3..0000000000 --- a/src/gtk/timer.cpp +++ /dev/null @@ -1,71 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: timer.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "timer.h" -#endif - -#include "wx/timer.h" - -//----------------------------------------------------------------------------- -// wxTimer -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxTimer,wxObject) - -gint timeout_callback( gpointer data ) -{ - wxTimer *timer = (wxTimer*)data; - timer->Notify(); - if (timer->OneShot()) timer->Stop(); - return TRUE; -} - -wxTimer::wxTimer(void) -{ - m_tag = -1; - m_time = 1000; - m_oneShot = FALSE; -} - -wxTimer::~wxTimer(void) -{ - Stop(); -} - -int wxTimer::Interval(void) -{ - return m_time; -} - -bool wxTimer::OneShot(void) -{ - return m_oneShot; -} - -void wxTimer::Notify(void) -{ -} - -void wxTimer::Start( int millisecs, bool oneShot ) -{ - if (millisecs != -1) m_time = millisecs; - m_oneShot = oneShot; - m_tag = gtk_timeout_add( millisecs, timeout_callback, this ); -} - -void wxTimer::Stop(void) -{ - if (m_tag != -1) - gtk_timeout_remove( m_tag ); - m_tag = -1; -} - diff --git a/src/gtk/treectrl.cpp b/src/gtk/treectrl.cpp deleted file mode 100644 index 3ae18cf4f6..0000000000 --- a/src/gtk/treectrl.cpp +++ /dev/null @@ -1,736 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: treectrl.cpp -// Purpose: -// Author: Denis Pershin -// Created: 07/05/98 -// Id: $Id$ -// Copyright: (c) 1998 Denis Pershin and Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "treectrl.h" -#endif - -#include "wx/gtk/treectrl.h" -#include "wx/settings.h" -#include "wx/log.h" - -#ifdef USE_GDK_IMLIB -#include "../gdk_imlib/gdk_imlib.h" -#endif - -//----------------------------------------------------------------------------- -// wxTreeItem -//----------------------------------------------------------------------------- - -// clicked - -void gtk_treeitem_expand_callback(GtkWidget *WXUNUSED(widget), wxTreeItem *treeitem) { - if (treeitem->ignore) - return; - treeitem->SendExpanding(treeitem->m_owner); - treeitem->SendExpand(treeitem->m_owner); -}; - -void gtk_treeitem_collapse_callback( GtkWidget *WXUNUSED(widget), wxTreeItem *treeitem) { - if (treeitem->ignore) - return; - treeitem->SendCollapsing(treeitem->m_owner); - treeitem->SendCollapse(treeitem->m_owner); -}; - -void gtk_treeitem_select_callback( GtkWidget *WXUNUSED(widget), wxTreeItem *treeitem) { - treeitem->SendSelChanging(treeitem->m_owner); - treeitem->m_state |= wxTREE_STATE_SELECTED; - treeitem->SendSelChanged(treeitem->m_owner); -} - -void gtk_treeitem_deselect_callback( GtkWidget *WXUNUSED(widget), wxTreeItem *treeitem) { - treeitem->SendSelChanging(treeitem->m_owner); - treeitem->m_state &= !wxTREE_STATE_SELECTED; - treeitem->SendSelChanged(treeitem->m_owner); -} - -IMPLEMENT_DYNAMIC_CLASS(wxTreeItem, wxObject) - -wxTreeItem::wxTreeItem() { - m_mask = 0; - m_itemId = 0; - m_state = 0; - m_stateMask = 0; - m_image = -1; - m_children = 0; - m_selectedImage = -1; - m_tree = NULL; - m_parentwidget = NULL; - m_widget = NULL; - m_data = 0; - m_owner = 0; - expand_handler = 0; - collapse_handler = 0; -}; - -wxTreeItem::wxTreeItem(GtkWidget *parent, const wxTreeItem &item) { - m_mask = item.m_mask; - m_text = item.m_text; - m_itemId = item.m_itemId; - m_state = item.m_state; - m_stateMask = item.m_stateMask; - m_image = item.m_image; - m_tree = NULL; - m_owner = 0; - m_selectedImage = item.m_selectedImage; - m_children = item.m_children; - m_childlist = item.m_childlist; - m_data = item.m_data; - m_parentwidget = parent; - expand_handler = 0; - collapse_handler = 0; - - Create(); -} - -void wxTreeItem::Create() { - wxASSERT(m_parentwidget != NULL); - - m_widget = GTK_TREE_ITEM(gtk_tree_item_new_with_label ((char *)(const char *)m_text)); - gtk_container_add (GTK_CONTAINER(m_parentwidget), GTK_WIDGET(m_widget)); - gtk_widget_show(GTK_WIDGET(m_widget)); - - ignore = FALSE; - - gtk_signal_connect(GTK_OBJECT(m_widget), "select", - GTK_SIGNAL_FUNC(gtk_treeitem_select_callback), (gpointer)this ); - - gtk_signal_connect(GTK_OBJECT(m_widget), "deselect", - GTK_SIGNAL_FUNC(gtk_treeitem_deselect_callback), (gpointer)this ); - - if (expand_handler == 0) - expand_handler = gtk_signal_connect(GTK_OBJECT(m_widget), "expand", - GTK_SIGNAL_FUNC(gtk_treeitem_expand_callback), (gpointer)this ); - - if (collapse_handler == 0) - collapse_handler = gtk_signal_connect( GTK_OBJECT(m_widget), "collapse", - GTK_SIGNAL_FUNC(gtk_treeitem_collapse_callback), (gpointer)this ); - - if ((m_mask & wxTREE_MASK_CHILDREN) != 0) - AddSubtree(); -} - -wxTreeItem::~wxTreeItem() { - if (m_owner != NULL) - SendDelete(m_owner); - DeleteChildren(); - if ((m_widget != NULL) && (m_parentwidget != NULL)) - gtk_container_remove(GTK_CONTAINER(m_parentwidget), - GTK_WIDGET(m_widget)); -// if (m_tree != NULL) { -// gtk_widget_destroy(GTK_WIDGET(m_tree)); -// m_tree = NULL; -// } - -// if (m_widget != NULL) -// gtk_widget_destroy(GTK_WIDGET(m_widget)); -} - -void wxTreeItem::AddSubtree() { - if (m_widget == NULL) - return; - - m_tree = GTK_TREE(gtk_tree_new()); - gtk_tree_item_set_subtree(GTK_TREE_ITEM(m_widget), GTK_WIDGET(m_tree)); - gtk_widget_show(GTK_WIDGET(m_tree)); - - ignore = TRUE; - gtk_tree_item_expand(m_widget); - gtk_tree_item_collapse(m_widget); - ignore = FALSE; -} - -void wxTreeItem::AddChild(wxTreeItem *child) { - wxASSERT(child != NULL); - - m_childlist.Append(child); -} - -bool wxTreeItem::HasChildren() { - return (m_childlist.Number() != 0); -} - -void wxTreeItem::DeleteChildren() { - wxTreeItem *item; - - long no = GetChildrenNumber(); - for (long i=0; isubtree == 0) - AddSubtree(); -} - -int wxTreeItem::NumberOfVisibleDescendents() { - wxTreeItem *item; - long no = GetChildrenNumber(); - long num = 0; - for (long i=0; iNumberOfVisibleDescendents(); - - num+=no; - - return num; -} - -wxTreeItem *wxTreeItem::FindItem(long itemId) const { - if (m_itemId == itemId) return (wxTreeItem*)(this); - wxNode *node = m_childlist.First(); - while (node) { - wxTreeItem *item = (wxTreeItem*)node->Data(); - wxTreeItem *res = item->FindItem( itemId ); - if (res) return (wxTreeItem*)(res); - node = node->Next(); - }; - return NULL; -}; - -wxTreeItem *wxTreeItem::FindItem(GtkTreeItem *item) const { - if (m_widget == item) - return (wxTreeItem*)(this); - wxNode *node = m_childlist.First(); - while (node) { - wxTreeItem *i = (wxTreeItem*)node->Data(); - wxTreeItem *res = i->FindItem(item); - if (res) return (wxTreeItem*)(res); - node = node->Next(); - }; - return NULL; -}; - -void wxTreeItem::PrepareEvent(wxTreeEvent &event) { - event.m_item.m_itemId = m_itemId; - event.m_item.m_state = m_state; - event.m_item.m_text = m_text; - event.m_item.m_image = m_image; - event.m_item.m_selectedImage = m_selectedImage; - event.m_item.m_children = (GetChildrenNumber() > 0); - event.m_item.m_data = m_data; - event.m_oldItem = 0; - event.m_code = 0; -// event.m_pointDrag.x = 0; -// event.m_pointDrag.y = 0; -}; - -void wxTreeItem::SendDelete(wxWindow *target) { - wxTreeEvent event(wxEVT_COMMAND_TREE_DELETE_ITEM, target->GetId()); - PrepareEvent(event); - event.SetEventObject(target); - target->ProcessEvent(event); -}; - -void wxTreeItem::SendExpand(wxWindow *target) { - wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_EXPANDED, target->GetId()); - PrepareEvent(event); - event.SetEventObject(target); - target->ProcessEvent(event); -}; - -void wxTreeItem::SendExpanding(wxWindow *target) { - wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_EXPANDING, target->GetId()); - PrepareEvent(event); - event.SetEventObject(target); - target->ProcessEvent(event); -}; - -void wxTreeItem::SendCollapse(wxWindow *target) { - wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_COLLAPSED, target->GetId()); - PrepareEvent(event); - event.SetEventObject(target); - target->ProcessEvent(event); -}; - -void wxTreeItem::SendCollapsing(wxWindow *target) { - wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_COLLAPSING, target->GetId()); - PrepareEvent(event); - event.SetEventObject(target); - target->ProcessEvent(event); -}; - -void wxTreeItem::SendSelChanged(wxWindow *target) { - wxTreeEvent event(wxEVT_COMMAND_TREE_SEL_CHANGED, target->GetId()); - PrepareEvent(event); - event.SetEventObject(target); - target->ProcessEvent(event); -}; - -void wxTreeItem::SendSelChanging(wxWindow *target) { - wxTreeEvent event(wxEVT_COMMAND_TREE_SEL_CHANGING, target->GetId()); - PrepareEvent(event); - event.SetEventObject(target); - target->ProcessEvent(event); -}; - -//----------------------------------------------------------------------------- -// wxTreeCtrl -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxTreeCtrl, wxScrolledWindow) - -wxTreeCtrl::wxTreeCtrl() { - m_current = NULL; - m_lastId = 0; - m_isCreated = FALSE; - m_imageList = NULL; - m_smallImageList = NULL; -}; - -wxTreeCtrl::wxTreeCtrl(wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) { - m_current = NULL; - m_lastId = 0; - m_isCreated = FALSE; - m_imageList = NULL; - m_smallImageList = NULL; - Create( parent, id, pos, size, style, name ); -}; - -wxTreeCtrl::~wxTreeCtrl() { - DeleteAllItems(); -}; - -bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) { - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - m_widget = gtk_scrolled_window_new(NULL, NULL); - gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(m_widget), - GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - - m_tree = GTK_TREE(gtk_tree_new()); - -/* - gtk_signal_connect( GTK_OBJECT(m_tree), "selection_changed", - GTK_SIGNAL_FUNC(gtk_treectrl_selection_changed_callback), (gpointer)this); - gtk_signal_connect( GTK_OBJECT(m_tree), "select_child", - GTK_SIGNAL_FUNC(gtk_treectrl_select_child_callback), (gpointer)this); - gtk_signal_connect( GTK_OBJECT(m_tree), "unselect_child", - GTK_SIGNAL_FUNC(gtk_treectrl_unselect_child_callback), (gpointer)this); -*/ - - gtk_container_add(GTK_CONTAINER(m_widget), GTK_WIDGET(m_tree)); - gtk_widget_show(GTK_WIDGET(m_tree)); - - PostCreation(); - - gtk_widget_realize(GTK_WIDGET(m_tree)); - - Show(TRUE); - - return TRUE; -}; - -int wxTreeCtrl::GetCount() const -{ - if (!m_anchor) return 0; - return m_anchor->NumberOfVisibleDescendents(); -}; - -long wxTreeCtrl::InsertItem(long parent, const wxString& label, - int image, int selImage, long insertAfter) { - wxTreeItem item; - if (!label.IsNull() || (label == "")) { - item.m_text = label; - item.m_mask |= wxTREE_MASK_TEXT; - }; - - if (image >= 0) { - item.m_image = image; - item.m_mask |= wxTREE_MASK_IMAGE; - }; - - if (selImage >= 0) { - item.m_selectedImage = selImage; - item.m_mask |= wxTREE_MASK_SELECTED_IMAGE; - }; - - return InsertItem(parent, item, insertAfter); -}; - -long wxTreeCtrl::InsertItem( long parent, wxTreeItem &info, long WXUNUSED(insertAfter) ) { - int oldMask = info.m_mask; - long ret = 0; - wxTreeItem *p = NULL; - wxTreeItem *new_child; - - if (parent == 0) { - if (m_anchor) - return -1; - } else { - p = FindItem(parent); - if (!p) return -1; - }; - - if ((info.m_mask & wxTREE_MASK_HANDLE) == 0) { - m_lastId++; - info.m_itemId = m_lastId; - info.m_mask |= wxTREE_MASK_HANDLE; - ret = m_lastId; - } else - ret = info.m_itemId; - - if (p) { - if (p->m_tree == NULL) - p->AddSubtree(); - - new_child = new wxTreeItem(GTK_WIDGET(p->m_tree), info); - p->AddChild(new_child); -gtk_widget_draw_default(GTK_WIDGET(m_tree)); - } else { - new_child = new wxTreeItem(GTK_WIDGET(m_tree), info); - m_anchor = new_child; - } - -/* Disabled until wxImageList q solved >>> seems it solved */ -/* - wxBitmap *bmp; - if ((new_child->m_mask & wxTREE_MASK_IMAGE) != 0) { - if (m_imageList != NULL) { -// if ((bmp = m_imageList->GetBitmap(new_child->m_image)) != NULL) { - if ((bmp = m_imageList->GetBitmap(0)) != NULL) { - if (bmp->Ok()) { - GdkBitmap *mask = NULL; - if (bmp->GetMask()) mask = bmp->GetMask()->GetBitmap(); - GtkWidget *pixmap = gtk_pixmap_new(bmp->GetPixmap(), mask); - -gtk_widget_unref(new_child->m_widget->plus_pix_widget); -gtk_container_remove(GTK_CONTAINER(new_child->m_widget->pixmaps_box), - new_child->m_widget->plus_pix_widget); -gtk_container_add(GTK_CONTAINER(new_child->m_widget->pixmaps_box), - pixmap); - gtk_widget_show(pixmap); - GTK_TREE_ITEM(new_child->m_widget)->plus_pix_widget = pixmap; - } - } - - if ((bmp = m_imageList->GetBitmap(1)) != NULL) { - if (bmp->Ok()) { - GdkBitmap *mask = NULL; - if (bmp->GetMask()) mask = bmp->GetMask()->GetBitmap(); - GtkWidget *pixmap = gtk_pixmap_new(bmp->GetPixmap(), mask); - -gtk_widget_unref(new_child->m_widget->minus_pix_widget); -//gtk_container_remove(GTK_CONTAINER(new_child->m_widget->pixmaps_box), -// new_child->m_widget->plus_pix_widget); -//gtk_container_add(GTK_CONTAINER(new_child->m_widget->pixmaps_box), -// pixmap); - gtk_widget_show(pixmap); - GTK_TREE_ITEM(new_child->m_widget)->minus_pix_widget = pixmap; - } - } - } - } -*/ - - new_child->m_owner = this; - - info.m_mask = oldMask; - return ret; -}; - - -bool wxTreeCtrl::ExpandItem( long item, int action ) { - wxTreeItem *i = FindItem( item ); - if (!i) - return FALSE; - - switch (action) { - case wxTREE_EXPAND_EXPAND: - gtk_tree_item_expand(GTK_TREE_ITEM(i->m_widget)); - break; - - case wxTREE_EXPAND_COLLAPSE_RESET: - case wxTREE_EXPAND_COLLAPSE: - gtk_tree_item_collapse(GTK_TREE_ITEM(i->m_widget)); - break; - - case wxTREE_EXPAND_TOGGLE: - if ((i->GetState() & wxTREE_STATE_EXPANDED) == 0) - gtk_tree_item_expand(GTK_TREE_ITEM(i->m_widget)); - else - gtk_tree_item_collapse(GTK_TREE_ITEM(i->m_widget)); - break; - } - - return TRUE; -}; - -void wxTreeCtrl::DeleteItem( long item ) -{ - wxTreeItem *pItem = FindItem( item ); - wxCHECK_RET( pItem != NULL, "wxTreeCtrl::DeleteItem: no such pItem." ); - -// pItem->m_parent->m_childlist.DeleteObject(pItem); -} - -void wxTreeCtrl::DeleteChildren( long item ) -{ - wxTreeItem *pItem = FindItem( item ); - wxCHECK_RET( pItem != NULL, "wxTreeCtrl::DeleteChildren: no such pItem." ); - - pItem->DeleteChildren(); -} - -bool wxTreeCtrl::DeleteAllItems() -{ - delete m_anchor; - m_anchor = NULL; - return TRUE; -}; - -/* -bool wxTreeCtrl::GetItem( wxTreeItem &info ) const -{ - wxTreeItem *i = FindItem( info.m_itemId ); - if (!i) return FALSE; - i->GetItem( info ); - return TRUE; -}; -*/ - -long wxTreeCtrl::GetItemData( long item ) const -{ - wxTreeItem *i = FindItem( item ); - if (!i) return 0; - return i->m_data; -}; - -wxString wxTreeCtrl::GetItemText( long item ) const -{ - wxTreeItem *i = FindItem( item ); - if (!i) return ""; - return i->m_text; -}; - -int wxTreeCtrl::GetItemImage(long item) const -{ - wxTreeItem *i = FindItem( item ); - return i == 0 ? -1 : i->GetImage(); -} - -long wxTreeCtrl::GetParent( long item ) const -{ - wxTreeItem *i = FindItem( item ); - if (!i) return -1; -/* - i = i->m_parent; - if (!i) return -1; - return i->m_parent->m_itemId; -*/ - return -1; -}; - -long wxTreeCtrl::GetRootItem() const -{ - if (m_anchor) return m_anchor->m_itemId; - return -1; -}; - -/* -long wxTreeCtrl::GetSelection() const -{ - return m_current ? m_current->GetItemId() : -1; -}; - -bool wxTreeCtrl::SelectItem(long itemId) -{ - wxTreeItem *pItem = FindItem(itemId); - if ( !pItem ) { - wxLogDebug("Can't select an item %d which doesn't exist.", itemId); - - return FALSE; - } - - SelectItem(pItem); - - return TRUE; -}; - -void wxTreeCtrl::SelectItem(wxTreeItem *item, bool bDoEvents ) -{ - if (m_current != item) - { - if (m_current) - { - m_current->SetHilight( FALSE ); -// RefreshLine( m_current ); - }; - m_current = item; - m_current->SetHilight( TRUE ); -// RefreshLine( m_current ); - - if (bDoEvents) m_current->SendSelected( this ); - } -} -*/ - -bool wxTreeCtrl::ItemHasChildren( long item ) const -{ - wxTreeItem *i = FindItem( item ); - if (!i) return FALSE; - return i->HasChildren(); -}; - -void wxTreeCtrl::SetIndent( int indent ) -{ - m_indent = indent; - Refresh(); -}; - -int wxTreeCtrl::GetIndent() const -{ - return m_indent; -}; - -/* -bool wxTreeCtrl::SetItem( wxTreeItem &info ) -{ - wxTreeItem *i = FindItem( info.m_itemId ); - if (!i) return FALSE; - wxClientDC dc(this); - i->SetItem( info, &dc ); - Refresh(); - return TRUE; -}; - -bool wxTreeCtrl::SetItemData( long item, long data ) -{ - wxTreeItem *i = FindItem( item ); - if (!i) return FALSE; - i->m_data = data; - return TRUE; -}; - -bool wxTreeCtrl::SetItemText( long item, const wxString &text ) -{ - wxTreeItem *i = FindItem( item ); - if (!i) return FALSE; - wxClientDC dc(this); - i->SetText( text, &dc ); - return TRUE; -}; - -void wxTreeCtrl::SetItemImage(long item, int image, int imageSel) const -{ - wxTreeItem *i = FindItem( item ); - if ( i != 0 ) { - i->SetImage(image); - i->SetSelectedImage(imageSel); - } -} - -long wxTreeCtrl::HitTest( const wxPoint& point, int &flags ) -{ - flags = 0; - if (!m_anchor) return -1; - return m_anchor->HitTest( point, flags ); -}; -*/ - -wxImageList *wxTreeCtrl::GetImageList( int which ) const -{ - if (which == wxIMAGE_LIST_NORMAL) return m_imageList; - return m_smallImageList; -}; - -void wxTreeCtrl::SetImageList( wxImageList *imageList, int which ) -{ - if (which == wxIMAGE_LIST_NORMAL) - { - if (m_imageList) delete m_imageList; - m_imageList = imageList; - } - else - { - if (m_smallImageList) delete m_smallImageList; - m_smallImageList = imageList; - }; -}; - -wxTreeItem *wxTreeCtrl::FindItem( long itemId ) const { - if (!m_anchor) return NULL; - return m_anchor->FindItem( itemId ); - return 0; -}; - -wxTreeItem *wxTreeCtrl::FindItem(GtkTreeItem *item) const { - if (!m_anchor) return NULL; - return m_anchor->FindItem(item); - return 0; -}; - -//----------------------------------------------------------------------------- -// wxTreeEvent -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent,wxCommandEvent) - -wxTreeEvent::wxTreeEvent( wxEventType commandType, int id ) : - wxCommandEvent( commandType, id ) -{ - m_code = 0; - m_oldItem = 0; -}; - -/* Bunch of old code might be useful */ -/* - wxBitmap *bmp; - - if ((bmp = m_imageList->GetItem(0))->Ok()) { - GdkBitmap *mask = NULL; - if (bmp->GetMask()) mask = bmp->GetMask()->GetBitmap(); - GtkWidget *pixmap = gtk_pixmap_new( bmp->GetPixmap(), mask ); - - gtk_widget_set_parent(pixmap, GTK_WIDGET(new_child->m_widget)); - gtk_widget_show(pixmap); - GTK_TREE_ITEM(new_child->m_widget)->pixmaps_box = pixmap; - } - - if ((bmp = m_imageList->GetItem(1))->Ok()) { - GdkBitmap *mask = NULL; - if (bmp->GetMask()) mask = bmp->GetMask()->GetBitmap(); - GtkWidget *pixmap = gtk_pixmap_new( bmp->GetPixmap(), mask ); - - gtk_widget_set_parent(pixmap, GTK_WIDGET(new_child->m_widget)); - gtk_widget_show(pixmap); - GTK_TREE_ITEM(new_child->m_widget)->plus_pix_widget = pixmap; - } - - if ((bmp = m_imageList->GetItem(2))->Ok()) { - GdkBitmap *mask = NULL; - if (bmp->GetMask()) mask = bmp->GetMask()->GetBitmap(); - GtkWidget *pixmap = gtk_pixmap_new( bmp->GetPixmap(), mask ); - - gtk_widget_set_parent(pixmap, GTK_WIDGET(new_child->m_widget)); - gtk_widget_show(pixmap); - GTK_TREE_ITEM(new_child->m_widget)->minus_pix_widget = pixmap; - } - - if (p) - if (p->m_childlist.Number() == 1) { - gtk_tree_item_collapse(GTK_TREE_ITEM(p->m_widget)); - gtk_tree_item_expand(GTK_TREE_ITEM(p->m_widget)); - } -*/ diff --git a/src/gtk/utilsgtk.cpp b/src/gtk/utilsgtk.cpp deleted file mode 100644 index 050d1718ce..0000000000 --- a/src/gtk/utilsgtk.cpp +++ /dev/null @@ -1,476 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: utils.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -//#ifdef __GNUG__ -//#pragma implementation "utils.h" -//#endif - -#include "wx/utils.h" -#include "wx/string.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef __SVR4__ -#include -#endif - -//------------------------------------------------------------------------ -// misc. -//------------------------------------------------------------------------ - -void wxBell(void) -{ - gdk_beep(); -}; - -void wxSleep(int nSecs) -{ - sleep(nSecs); -}; - -int wxKill(long pid, int sig) -{ - return kill(pid, sig); -}; - -void wxDisplaySize( int *width, int *height ) -{ - if (width) *width = gdk_screen_width(); - if (height) *height = gdk_screen_height(); -} - -void wxGetMousePosition( int* x, int* y ) -{ - wxFAIL_MSG( "GetMousePosition not yet implemented" ); - if (x) *x = 0; - if (y) *y = 0; -}; - -bool wxColourDisplay(void) -{ - wxFAIL_MSG( "wxColourDisplay always returns TRUE" ); - return TRUE; -} - -int wxDisplayDepth(void) -{ - wxFAIL_MSG( "wxDisplayDepth always returns 8" ); - return 8; -} - -//------------------------------------------------------------------------ -// user and home routines -//------------------------------------------------------------------------ - -char* wxGetHomeDir( char *dest ) -{ - wxString tmp = wxGetUserHome( wxString() ); - if (tmp.IsNull()) - strcpy( wxBuffer, "/" ); - else - strcpy( wxBuffer, tmp ); - if (dest) strcpy( dest, WXSTRINGCAST tmp ); - return wxBuffer; -}; - -char *wxGetUserHome( const wxString &user ) -{ - struct passwd *who = (struct passwd *) NULL; - - if (user.IsNull() || (user== "")) - { - register char *ptr; - - if ((ptr = getenv("HOME")) != NULL) - return ptr; - if ((ptr = getenv("USER")) != NULL - || (ptr = getenv("LOGNAME")) != NULL) { - who = getpwnam(ptr); - } - // We now make sure the the user exists! - if (who == NULL) - who = getpwuid(getuid()); - } - else - who = getpwnam (user); - - return who ? who->pw_dir : (char*)NULL; -}; - -//------------------------------------------------------------------------ -// id routines -//------------------------------------------------------------------------ - -bool wxGetHostName(char *buf, int sz) -{ - *buf = '\0'; -#if defined(__SVR4__) && !defined(__sgi) - return (sysinfo(SI_HOSTNAME, buf, sz) != -1); -#else /* BSD Sockets */ - char name[255]; - struct hostent *h; - // Get hostname - if (gethostname(name, sizeof(name)/sizeof(char)-1) == -1) - return FALSE; - // Get official full name of host - strncpy(buf, (h=gethostbyname(name))!=NULL ? h->h_name : name, sz-1); - return TRUE; -#endif -} - -bool wxGetUserId(char *buf, int sz) -{ - struct passwd *who; - - *buf = '\0'; - if ((who = getpwuid(getuid ())) != NULL) { - strncpy (buf, who->pw_name, sz-1); - return TRUE; - } - return FALSE; -} - -bool wxGetUserName(char *buf, int sz) -{ - struct passwd *who; - - *buf = '\0'; - if ((who = getpwuid (getuid ())) != NULL) { - strncpy (buf, who->pw_gecos, sz - 1); - return TRUE; - } - return FALSE; -} - -//------------------------------------------------------------------------ -// error and debug output routines -//------------------------------------------------------------------------ - -void wxDebugMsg( const char *format, ... ) -{ - va_list ap; - va_start( ap, format ); - vfprintf( stderr, format, ap ); - fflush( stderr ); - va_end(ap); -}; - -void wxError( const wxString &msg, const wxString &title ) -{ - fprintf( stderr, "Error " ); - if (!title.IsNull()) fprintf( stderr, "%s ", WXSTRINGCAST(title) ); - if (!msg.IsNull()) fprintf( stderr, ": %s", WXSTRINGCAST(msg) ); - fprintf( stderr, ".\n" ); -}; - -void wxFatalError( const wxString &msg, const wxString &title ) -{ - fprintf( stderr, "Error " ); - if (!title.IsNull()) fprintf( stderr, "%s ", WXSTRINGCAST(title) ); - if (!msg.IsNull()) fprintf( stderr, ": %s", WXSTRINGCAST(msg) ); - fprintf( stderr, ".\n" ); - exit(1); -}; - -//------------------------------------------------------------------------ -// directory routines -//------------------------------------------------------------------------ - -bool wxDirExists( const wxString& dir ) -{ - char buf[500]; - strcpy( buf, WXSTRINGCAST(dir) ); - struct stat sbuf; - return ((stat(buf, &sbuf) != -1) && S_ISDIR(sbuf.st_mode) ? TRUE : FALSE); -}; - -//------------------------------------------------------------------------ -// wild character routines -//------------------------------------------------------------------------ - -bool wxIsWild( const wxString& pattern ) -{ - wxString tmp = pattern; - char *pat = WXSTRINGCAST(tmp); - while (*pat) { - switch (*pat++) { - case '?': case '*': case '[': case '{': - return TRUE; - case '\\': - if (!*pat++) - return FALSE; - } - } - return FALSE; -}; - - -bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special ) -{ - wxString tmp1 = pat; - char *pattern = WXSTRINGCAST(tmp1); - wxString tmp2 = text; - char *str = WXSTRINGCAST(tmp2); - char c; - char *cp; - bool done = FALSE, ret_code, ok; - // Below is for vi fans - const char OB = '{', CB = '}'; - - // dot_special means '.' only matches '.' - if (dot_special && *str == '.' && *pattern != *str) - return FALSE; - - while ((*pattern != '\0') && (!done) - && (((*str=='\0')&&((*pattern==OB)||(*pattern=='*')))||(*str!='\0'))) { - switch (*pattern) { - case '\\': - pattern++; - if (*pattern != '\0') - pattern++; - break; - case '*': - pattern++; - ret_code = FALSE; - while ((*str!='\0') - && (!(ret_code=wxMatchWild(pattern, str++, FALSE)))) - /*loop*/; - if (ret_code) { - while (*str != '\0') - str++; - while (*pattern != '\0') - pattern++; - } - break; - case '[': - pattern++; - repeat: - if ((*pattern == '\0') || (*pattern == ']')) { - done = TRUE; - break; - } - if (*pattern == '\\') { - pattern++; - if (*pattern == '\0') { - done = TRUE; - break; - } - } - if (*(pattern + 1) == '-') { - c = *pattern; - pattern += 2; - if (*pattern == ']') { - done = TRUE; - break; - } - if (*pattern == '\\') { - pattern++; - if (*pattern == '\0') { - done = TRUE; - break; - } - } - if ((*str < c) || (*str > *pattern)) { - pattern++; - goto repeat; - } - } else if (*pattern != *str) { - pattern++; - goto repeat; - } - pattern++; - while ((*pattern != ']') && (*pattern != '\0')) { - if ((*pattern == '\\') && (*(pattern + 1) != '\0')) - pattern++; - pattern++; - } - if (*pattern != '\0') { - pattern++, str++; - } - break; - case '?': - pattern++; - str++; - break; - case OB: - pattern++; - while ((*pattern != CB) && (*pattern != '\0')) { - cp = str; - ok = TRUE; - while (ok && (*cp != '\0') && (*pattern != '\0') - && (*pattern != ',') && (*pattern != CB)) { - if (*pattern == '\\') - pattern++; - ok = (*pattern++ == *cp++); - } - if (*pattern == '\0') { - ok = FALSE; - done = TRUE; - break; - } else if (ok) { - str = cp; - while ((*pattern != CB) && (*pattern != '\0')) { - if (*++pattern == '\\') { - if (*++pattern == CB) - pattern++; - } - } - } else { - while (*pattern!=CB && *pattern!=',' && *pattern!='\0') { - if (*++pattern == '\\') { - if (*++pattern == CB || *pattern == ',') - pattern++; - } - } - } - if (*pattern != '\0') - pattern++; - } - break; - default: - if (*str == *pattern) { - str++, pattern++; - } else { - done = TRUE; - } - } - } - while (*pattern == '*') - pattern++; - return ((*str == '\0') && (*pattern == '\0')); -}; - -//------------------------------------------------------------------------ -// subprocess routines -//------------------------------------------------------------------------ - -typedef struct { - gint pid, tag; - wxProcess *process; -} wxEndProcessData; - -static void GTK_EndProcessDetector(gpointer data, gint source, - GdkInputCondition WXUNUSED(condition) ) -{ - wxEndProcessData *proc_data = (wxEndProcessData *)data; - int pid; - - pid = (proc_data->pid > 0) ? proc_data->pid : -(proc_data->pid); - - /* wait4 is not part of any standard, use at own risk - * not sure what wait4 does, but wait3 seems to be closest, whats a digit ;-) - * --- offer@sgi.com */ -#if !defined(__sgi) - wait4(proc_data->pid, NULL, 0, NULL); -#else - wait3((int *) NULL, 0, (rusage *) NULL); -#endif - - close(source); - gdk_input_remove(proc_data->tag); - - if (proc_data->process) - proc_data->process->OnTerminate(proc_data->pid); - - if (proc_data->pid > 0) - delete proc_data; - else - proc_data->pid = 0; -}; - -long wxExecute( char **argv, bool sync, wxProcess *process ) -{ - wxEndProcessData *data = new wxEndProcessData; - int end_proc_detect[2]; - - if (*argv == NULL) - return 0; - - /* Create pipes */ - if (pipe(end_proc_detect) == -1) { - perror("pipe failed"); - return 0; - } - - /* fork the process */ -#if defined(sun) || defined(__ultrix) || defined(__bsdi__) - pid_t pid = vfork(); -#else - pid_t pid = fork(); -#endif - if (pid == -1) { - perror ("fork failed"); - return 0; - } else if (pid == 0) { - /* Close fd not useful */ - close(end_proc_detect[0]); // close reading side - - /* child */ -#ifdef _AIX - execvp ((const char *)*argv, (const char **)argv); -#else - execvp (*argv, argv); -#endif - if (errno == ENOENT) - wxError("command not found", *argv); - else - perror (*argv); - wxError("could not execute", *argv); - _exit (-1); - } - - close(end_proc_detect[1]); // close writing side - data->tag = gdk_input_add(end_proc_detect[0], GDK_INPUT_READ, - GTK_EndProcessDetector, (gpointer)data); - data->pid = pid; - if (!sync) { - data->process = process; - } else { - data->process = (wxProcess *) NULL; - data->pid = -(data->pid); - - while (data->pid != 0) - wxYield(); - - delete data; - } - - return pid; -}; - -long wxExecute( const wxString& command, bool sync, wxProcess *process ) -{ - if (command.IsNull() || command == "") return FALSE; - - int argc = 0; - char *argv[127]; - char tmp[1024]; - const char *IFS = " \t\n"; - - strncpy (tmp, command, sizeof(tmp) / sizeof(char) - 1); - tmp[sizeof (tmp) / sizeof (char) - 1] = '\0'; - argv[argc++] = strtok (tmp, IFS); - while ((argv[argc++] = strtok((char *) NULL, IFS)) != NULL) - /* loop */ ; - return wxExecute(argv, sync, process); -}; - - diff --git a/src/gtk/utilsres.cpp b/src/gtk/utilsres.cpp deleted file mode 100644 index ec34009cba..0000000000 --- a/src/gtk/utilsres.cpp +++ /dev/null @@ -1,336 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: utils.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -//#ifdef __GNUG__ -//#pragma implementation "utils.h" -//#endif - -#include "wx/utils.h" -#include "wx/string.h" -#include "wx/list.h" - -#include -#include -#include -#ifdef __SVR4__ -#include -#endif - -#include "gdk/gdkx.h" // GDK_DISPLAY -#include "gdk/gdkprivate.h" // gdk_progclass - -#include -#include -#include - -#include "wx/log.h" - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -// Yuck this is really BOTH site and platform dependent -// so we should use some other strategy! -#ifdef __SUN__ - #define DEFAULT_XRESOURCE_DIR "/usr/openwin/lib/app-defaults" -#else - #define DEFAULT_XRESOURCE_DIR "/usr/lib/X11/app-defaults" -#endif - -//----------------------------------------------------------------------------- -// glabal data (data.cpp) -//----------------------------------------------------------------------------- - -extern wxResourceCache *wxTheResourceCache; -extern XrmDatabase wxResourceDatabase; - -//----------------------------------------------------------------------------- -// utility functions for get/write resources -//----------------------------------------------------------------------------- - -static char *GetResourcePath(char *buf, char *name, bool create) -{ - if (create && FileExists(name)) { - strcpy(buf, name); - return buf; // Exists so ... - } - if (*name == '/') - strcpy(buf, name); - else { - // Put in standard place for resource files if not absolute - strcpy(buf, DEFAULT_XRESOURCE_DIR); - strcat(buf, "/"); - strcat(buf, FileNameFromPath(name)); - } - if (create) { - // Touch the file to create it - FILE *fd = fopen(buf, "w"); - if (fd) fclose(fd); - } - return buf; -} - -// Read $HOME for what it says is home, if not -// read $USER or $LOGNAME for user name else determine -// the Real User, then determine the Real home dir. -static char *GetIniFile(char *dest, const char *filename) -{ - char *home = (char *) NULL; - if (filename && wxIsAbsolutePath(filename)) - { - strcpy(dest, filename); - } - else - { - if ((home = wxGetUserHome(wxString())) != NULL) - { - strcpy(dest, home); - if (dest[strlen(dest) - 1] != '/') strcat(dest, "/"); - if (filename == NULL) - { - if ((filename = getenv("XENVIRONMENT")) == NULL) filename = ".Xdefaults"; - } - else - if (*filename != '.') strcat(dest, "."); - strcat(dest, filename); - } - else - { - dest[0] = '\0'; - } - } - return dest; -} - -static void wxXMergeDatabases(void) -{ - XrmDatabase homeDB, serverDB, applicationDB; - char filenamebuf[1024]; - - char *filename = &filenamebuf[0]; - char *environment; - char *classname = gdk_progclass; // Robert Roebling ?? - char name[256]; - (void)strcpy(name, "/usr/lib/X11/app-defaults/"); - (void)strcat(name, classname ? classname : "wxWindows"); - - // Get application defaults file, if any - if ((applicationDB = XrmGetFileDatabase(name))) - (void)XrmMergeDatabases(applicationDB, &wxResourceDatabase); - - // Merge server defaults, created by xrdb, loaded as a property of the root - // window when the server initializes and loaded into the display - // structure on XOpenDisplay; - // if not defined, use .Xdefaults - if (XResourceManagerString(GDK_DISPLAY()) != NULL) { - serverDB = XrmGetStringDatabase(XResourceManagerString(GDK_DISPLAY())); - } else { - (void)GetIniFile(filename, (char *) NULL); - serverDB = XrmGetFileDatabase(filename); - } - if (serverDB) - XrmMergeDatabases(serverDB, &wxResourceDatabase); - - // Open XENVIRONMENT file, or if not defined, the .Xdefaults, - // and merge into existing database - - if ((environment = getenv("XENVIRONMENT")) == NULL) { - size_t len; - environment = GetIniFile(filename, (const char *) NULL); - len = strlen(environment); -#if !defined(SVR4) || defined(__sgi) - (void)gethostname(environment + len, 1024 - len); -#else - (void)sysinfo(SI_HOSTNAME, environment + len, 1024 - len); -#endif - } - if ((homeDB = XrmGetFileDatabase(environment))) - XrmMergeDatabases(homeDB, &wxResourceDatabase); -} - -//----------------------------------------------------------------------------- -// called on application exit -//----------------------------------------------------------------------------- - -void wxFlushResources(void) -{ - char nameBuffer[512]; - - wxNode *node = wxTheResourceCache->First(); - while (node) { - char *file = node->key.string; - // If file doesn't exist, create it first. - (void)GetResourcePath(nameBuffer, file, TRUE); - - XrmDatabase database = (XrmDatabase)node->Data(); - XrmPutFileDatabase(database, nameBuffer); - XrmDestroyDatabase(database); - wxNode *next = node->Next(); -// delete node; - node = next; - } -} - -void wxDeleteResources(const char *file) -{ - wxLogTrace(wxTraceResAlloc, "Delete: Number = %d", wxTheResourceCache->Number()); - char buffer[500]; - (void)GetIniFile(buffer, file); - - wxNode *node = wxTheResourceCache->Find(buffer); - if (node) { - XrmDatabase database = (XrmDatabase)node->Data(); - XrmDestroyDatabase(database); -// delete node; - } -} - -//----------------------------------------------------------------------------- -// resource functions -//----------------------------------------------------------------------------- - -bool wxWriteResource(const wxString& section, const wxString& entry, const wxString& value, const wxString& file ) -{ - char buffer[500]; - - if (!entry) return FALSE; - - (void)GetIniFile(buffer, file); - - XrmDatabase database; - wxNode *node = wxTheResourceCache->Find(buffer); - if (node) - database = (XrmDatabase)node->Data(); - else { - database = XrmGetFileDatabase(buffer); - wxLogTrace(wxTraceResAlloc, "Write: Number = %d", wxTheResourceCache->Number()); - wxTheResourceCache->Append(buffer, (wxObject *)database); - } - char resName[300]; - strcpy(resName, !section.IsNull() ? WXSTRINGCAST section : "wxWindows"); - strcat(resName, "."); - strcat(resName, entry); - XrmPutStringResource(&database, resName, value); - return TRUE; -}; - -bool wxWriteResource(const wxString& section, const wxString& entry, float value, const wxString& file ) -{ - char buf[50]; - sprintf(buf, "%.4f", value); - return wxWriteResource(section, entry, buf, file); -}; - -bool wxWriteResource(const wxString& section, const wxString& entry, long value, const wxString& file ) -{ - char buf[50]; - sprintf(buf, "%ld", value); - return wxWriteResource(section, entry, buf, file); -}; - -bool wxWriteResource(const wxString& section, const wxString& entry, int value, const wxString& file ) -{ - char buf[50]; - sprintf(buf, "%d", value); - return wxWriteResource(section, entry, buf, file); -}; - -bool wxGetResource(const wxString& section, const wxString& entry, char **value, const wxString& file ) -{ - if (!wxResourceDatabase) - wxXMergeDatabases(); - - XrmDatabase database; - if (file) { - char buffer[500]; - // Is this right? Trying to get it to look in the user's - // home directory instead of current directory -- JACS - (void)GetIniFile(buffer, file); - - wxNode *node = wxTheResourceCache->Find(buffer); - if (node) - database = (XrmDatabase)node->Data(); - else { - database = XrmGetFileDatabase(buffer); - wxLogTrace(wxTraceResAlloc, "Get: Number = %d", wxTheResourceCache->Number()); - wxTheResourceCache->Append(buffer, (wxObject *)database); - } - } else - database = wxResourceDatabase; - - XrmValue xvalue; - char *str_type[20]; - char buf[150]; - strcpy(buf, section); - strcat(buf, "."); - strcat(buf, entry); - - bool success = XrmGetResource(database, buf, "*", str_type, &xvalue); - // Try different combinations of upper/lower case, just in case... - if (!success) { - buf[0] = (isupper(buf[0]) ? tolower(buf[0]) : toupper(buf[0])); - success = XrmGetResource(database, buf, "*", str_type, &xvalue); - } - if (success) { - if (*value) - delete[] *value; - *value = new char[xvalue.size + 1]; - strncpy(*value, xvalue.addr, (int)xvalue.size); - return TRUE; - } - return FALSE; -}; - -bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file ) -{ - char *s = (char *) NULL; - bool succ = wxGetResource(section, entry, &s, file); - if (succ) { - *value = (float)strtod(s, (char **) NULL); - delete[]s; - return TRUE; - } else - return FALSE; -}; - -bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file ) -{ - char *s = (char *) NULL; - bool succ = wxGetResource(section, entry, &s, file); - if (succ) { - *value = strtol(s, (char **) NULL, 10); - delete[]s; - return TRUE; - } else - return FALSE; -}; - -bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file ) -{ - char *s = (char *) NULL; - bool succ = wxGetResource(section, entry, &s, file); - if (succ) { - // Handle True, False here - // True, Yes, Enables, Set or Activated - if (*s == 'T' || *s == 'Y' || *s == 'E' || *s == 'S' || *s == 'A') - *value = TRUE; - // False, No, Disabled, Reset, Cleared, Deactivated - else if (*s == 'F' || *s == 'N' || *s == 'D' || *s == 'R' || *s == 'C') - *value = FALSE; - // Handle as Integer - else - *value = (int)strtol(s, (char **) NULL, 10); - delete[]s; - return TRUE; - } else - return FALSE; -}; - diff --git a/src/gtk/verti.xbm b/src/gtk/verti.xbm deleted file mode 100644 index 2dd9dc4c05..0000000000 --- a/src/gtk/verti.xbm +++ /dev/null @@ -1,6 +0,0 @@ -#define verti_width 15 -#define verti_height 15 -static char verti_bits[] = { - 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, - 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, - 0x84, 0x10, 0x84, 0x10, 0x84, 0x10}; diff --git a/src/gtk/win_gtk.c b/src/gtk/win_gtk.c deleted file mode 100644 index 4164200ac1..0000000000 --- a/src/gtk/win_gtk.c +++ /dev/null @@ -1,484 +0,0 @@ -/* /////////////////////////////////////////////////////////////////////////// -// Name: wx_gtk.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////// */ - -#include "wx/gtk/win_gtk.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -static void gtk_myfixed_class_init (GtkMyFixedClass *klass); -static void gtk_myfixed_init (GtkMyFixed *myfixed); -static void gtk_myfixed_map (GtkWidget *widget); -static void gtk_myfixed_unmap (GtkWidget *widget); -static void gtk_myfixed_realize (GtkWidget *widget); -static void gtk_myfixed_size_request (GtkWidget *widget, - GtkRequisition *requisition); -static void gtk_myfixed_size_allocate (GtkWidget *widget, - GtkAllocation *allocation); -static void gtk_myfixed_paint (GtkWidget *widget, - GdkRectangle *area); -static void gtk_myfixed_draw (GtkWidget *widget, - GdkRectangle *area); -static gint gtk_myfixed_expose (GtkWidget *widget, - GdkEventExpose *event); -static void gtk_myfixed_add (GtkContainer *container, - GtkWidget *widget); -static void gtk_myfixed_remove (GtkContainer *container, - GtkWidget *widget); -static void gtk_myfixed_foreach (GtkContainer *container, - GtkCallback callback, - gpointer callback_data); - - -static GtkContainerClass *parent_class = NULL; - - -guint -gtk_myfixed_get_type () -{ - static guint myfixed_type = 0; - - if (!myfixed_type) - { - GtkTypeInfo myfixed_info = - { - "GtkMyFixed", - sizeof (GtkMyFixed), - sizeof (GtkMyFixedClass), - (GtkClassInitFunc) gtk_myfixed_class_init, - (GtkObjectInitFunc) gtk_myfixed_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - myfixed_type = gtk_type_unique (gtk_container_get_type (), &myfixed_info); - } - - return myfixed_type; -} - -static void -gtk_myfixed_class_init (GtkMyFixedClass *klass) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - GtkContainerClass *container_class; - - object_class = (GtkObjectClass*) klass; - widget_class = (GtkWidgetClass*) klass; - container_class = (GtkContainerClass*) klass; - - parent_class = gtk_type_class (gtk_container_get_type ()); - - widget_class->map = gtk_myfixed_map; - widget_class->unmap = gtk_myfixed_unmap; - widget_class->realize = gtk_myfixed_realize; - widget_class->size_request = gtk_myfixed_size_request; - widget_class->size_allocate = gtk_myfixed_size_allocate; - widget_class->draw = gtk_myfixed_draw; - widget_class->expose_event = gtk_myfixed_expose; - - container_class->add = gtk_myfixed_add; - container_class->remove = gtk_myfixed_remove; - container_class->foreach = gtk_myfixed_foreach; -} - -static void -gtk_myfixed_init (GtkMyFixed *myfixed) -{ - GTK_WIDGET_UNSET_FLAGS (myfixed, GTK_NO_WINDOW); - GTK_WIDGET_SET_FLAGS (myfixed, GTK_BASIC); - - myfixed->children = NULL; -} - -GtkWidget* -gtk_myfixed_new () -{ - GtkMyFixed *myfixed; - - myfixed = gtk_type_new (gtk_myfixed_get_type ()); - - return GTK_WIDGET (myfixed); -} - -void -gtk_myfixed_put (GtkMyFixed *myfixed, - GtkWidget *widget, - gint16 x, - gint16 y) -{ - GtkMyFixedChild *child_info; - - g_return_if_fail (myfixed != NULL); - g_return_if_fail (GTK_IS_MYFIXED (myfixed)); - g_return_if_fail (widget != NULL); - - child_info = g_new (GtkMyFixedChild, 1); - child_info->widget = widget; - child_info->x = x; - child_info->y = y; - - gtk_widget_set_parent (widget, GTK_WIDGET (myfixed)); - - myfixed->children = g_list_append (myfixed->children, child_info); - - if (GTK_WIDGET_REALIZED (myfixed) && !GTK_WIDGET_REALIZED (widget)) - gtk_widget_realize (widget); - - if (GTK_WIDGET_MAPPED (myfixed) && !GTK_WIDGET_MAPPED (widget)) - gtk_widget_map (widget); - - if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (myfixed)) - gtk_widget_queue_resize (GTK_WIDGET (myfixed)); -} - -void -gtk_myfixed_move (GtkMyFixed *myfixed, - GtkWidget *widget, - gint16 x, - gint16 y) -{ - GtkMyFixedChild *child; - GList *children; - - g_return_if_fail (myfixed != NULL); - g_return_if_fail (GTK_IS_MYFIXED (myfixed)); - g_return_if_fail (widget != NULL); - - children = myfixed->children; - while (children) - { - child = children->data; - children = children->next; - - if (child->widget == widget) - { - child->x = x; - child->y = y; - - if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (myfixed)) - gtk_widget_queue_resize (GTK_WIDGET (myfixed)); - - break; - } - } -} - -static void -gtk_myfixed_map (GtkWidget *widget) -{ - GtkMyFixed *myfixed; - GtkMyFixedChild *child; - GList *children; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_MYFIXED (widget)); - - GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED); - myfixed = GTK_MYFIXED (widget); - - gdk_window_show (widget->window); - - children = myfixed->children; - while (children) - { - child = children->data; - children = children->next; - - if (GTK_WIDGET_VISIBLE (child->widget) && - !GTK_WIDGET_MAPPED (child->widget)) - gtk_widget_map (child->widget); - } -} - -static void -gtk_myfixed_unmap (GtkWidget *widget) -{ - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_MYFIXED (widget)); - - GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED); -} - -static void -gtk_myfixed_realize (GtkWidget *widget) -{ - GtkMyFixed *myfixed; - GdkWindowAttr attributes; - gint attributes_mask; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_MYFIXED (widget)); - - myfixed = GTK_MYFIXED (widget); - - GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); - - attributes.window_type = GDK_WINDOW_CHILD; - attributes.x = widget->allocation.x; - attributes.y = widget->allocation.y; - attributes.width = 32000; - attributes.height = 32000; - attributes.wclass = GDK_INPUT_OUTPUT; - attributes.visual = gtk_widget_get_visual (widget); - attributes.colormap = gtk_widget_get_colormap (widget); - attributes.event_mask = gtk_widget_get_events (widget); - attributes.event_mask |= - GDK_EXPOSURE_MASK | - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_MOTION_MASK | - GDK_BUTTON1_MOTION_MASK | - GDK_BUTTON2_MOTION_MASK | - GDK_BUTTON3_MOTION_MASK | - GDK_BUTTON_PRESS_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_KEY_PRESS_MASK | - GDK_KEY_RELEASE_MASK | - GDK_ENTER_NOTIFY_MASK | - GDK_LEAVE_NOTIFY_MASK | - GDK_FOCUS_CHANGE_MASK; - - attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; - - widget->window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, - attributes_mask); - gdk_window_set_user_data (widget->window, widget); - - widget->style = gtk_style_attach (widget->style, widget->window); - gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL); -} - -static void -gtk_myfixed_size_request (GtkWidget *widget, - GtkRequisition *requisition) -{ - GtkMyFixed *myfixed; - GtkMyFixedChild *child; - GList *children; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_MYFIXED (widget)); - g_return_if_fail (requisition != NULL); - - myfixed = GTK_MYFIXED (widget); - - requisition->width = 0; - requisition->height = 0; - - children = myfixed->children; - while (children) - { - child = children->data; - children = children->next; - - if (GTK_WIDGET_VISIBLE (child->widget)) - { - gtk_widget_size_request (child->widget, &child->widget->requisition); - } - } -} - -static void -gtk_myfixed_size_allocate (GtkWidget *widget, - GtkAllocation *allocation) -{ - GtkMyFixed *myfixed; - GtkMyFixedChild *child; - GtkAllocation child_allocation; - GList *children; - guint16 border_width; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_MYFIXED(widget)); - g_return_if_fail (allocation != NULL); - - myfixed = GTK_MYFIXED (widget); - - widget->allocation = *allocation; - if (GTK_WIDGET_REALIZED (widget)) - gdk_window_move_resize (widget->window, allocation->x, allocation->y, 32000, 32000 ); - - border_width = GTK_CONTAINER (myfixed)->border_width; - - children = myfixed->children; - while (children) - { - child = children->data; - children = children->next; - - if (GTK_WIDGET_VISIBLE (child->widget)) - { - child_allocation.x = child->x + border_width; - child_allocation.y = child->y + border_width; - child_allocation.width = child->widget->requisition.width; - child_allocation.height = child->widget->requisition.height; - gtk_widget_size_allocate (child->widget, &child_allocation); - } - } -} - -static void -gtk_myfixed_paint (GtkWidget *widget, - GdkRectangle *area) -{ - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_MYFIXED (widget)); - g_return_if_fail (area != NULL); - - if (GTK_WIDGET_DRAWABLE (widget)) - gdk_window_clear_area (widget->window, - area->x, area->y, - area->width, area->height); -} - -static void -gtk_myfixed_draw (GtkWidget *widget, - GdkRectangle *area) -{ - GtkMyFixed *myfixed; - GtkMyFixedChild *child; - GdkRectangle child_area; - GList *children; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_MYFIXED (widget)); - - if (GTK_WIDGET_DRAWABLE (widget)) - { - myfixed = GTK_MYFIXED (widget); - gtk_myfixed_paint (widget, area); - - children = myfixed->children; - while (children) - { - child = children->data; - children = children->next; - - if (gtk_widget_intersect (child->widget, area, &child_area)) - gtk_widget_draw (child->widget, &child_area); - } - } -} - -static gint -gtk_myfixed_expose (GtkWidget *widget, - GdkEventExpose *event) -{ - GtkMyFixed *myfixed; - GtkMyFixedChild *child; - GdkEventExpose child_event; - GList *children; - - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (GTK_IS_MYFIXED (widget), FALSE); - g_return_val_if_fail (event != NULL, FALSE); - - if (GTK_WIDGET_DRAWABLE (widget)) - { - myfixed = GTK_MYFIXED (widget); - - child_event = *event; - - children = myfixed->children; - while (children) - { - child = children->data; - children = children->next; - - if (GTK_WIDGET_NO_WINDOW (child->widget) && - gtk_widget_intersect (child->widget, &event->area, - &child_event.area)) - gtk_widget_event (child->widget, (GdkEvent*) &child_event); - } - } - - return FALSE; -} - -static void -gtk_myfixed_add (GtkContainer *container, - GtkWidget *widget) -{ - g_return_if_fail (container != NULL); - g_return_if_fail (GTK_IS_MYFIXED (container)); - g_return_if_fail (widget != NULL); - - gtk_myfixed_put (GTK_MYFIXED (container), widget, 0, 0); -} - -static void -gtk_myfixed_remove (GtkContainer *container, - GtkWidget *widget) -{ - GtkMyFixed *myfixed; - GtkMyFixedChild *child; - GList *children; - - g_return_if_fail (container != NULL); - g_return_if_fail (GTK_IS_MYFIXED (container)); - g_return_if_fail (widget != NULL); - - myfixed = GTK_MYFIXED (container); - - children = myfixed->children; - while (children) - { - child = children->data; - - if (child->widget == widget) - { - gtk_widget_unparent (widget); - - myfixed->children = g_list_remove_link (myfixed->children, children); - g_list_free (children); - g_free (child); - - if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (container)) - gtk_widget_queue_resize (GTK_WIDGET (container)); - - break; - } - - children = children->next; - } -} - -static void -gtk_myfixed_foreach (GtkContainer *container, - GtkCallback callback, - gpointer callback_data) -{ - GtkMyFixed *myfixed; - GtkMyFixedChild *child; - GList *children; - - g_return_if_fail (container != NULL); - g_return_if_fail (GTK_IS_MYFIXED (container)); - g_return_if_fail (callback != NULL); - - myfixed = GTK_MYFIXED (container); - - children = myfixed->children; - while (children) - { - child = children->data; - children = children->next; - - (* callback) (child->widget, callback_data); - } -} - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp deleted file mode 100644 index dba832d740..0000000000 --- a/src/gtk/window.cpp +++ /dev/null @@ -1,2586 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: window.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "window.h" -#endif - -#include "wx/defs.h" -#include "wx/window.h" -#include "wx/dc.h" -#include "wx/frame.h" -#include "wx/app.h" -#include "wx/layout.h" -#include "wx/utils.h" -#include "wx/dialog.h" -#include "wx/msgdlg.h" -#include "wx/dcclient.h" -#include "wx/dnd.h" -#include "wx/mdi.h" -#include "wx/menu.h" -#include "wx/notebook.h" -#include "wx/statusbr.h" -#include -#include "gdk/gdkkeysyms.h" -#include -#include "wx/gtk/win_gtk.h" -#include "gdk/gdkprivate.h" - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern wxList wxPendingDelete; -extern wxList wxTopLevelWindows; -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// "expose_event" (of m_wxwindow, not of m_widget) -//----------------------------------------------------------------------------- - -static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExpose *gdk_event, wxWindow *win ) -{ - if (!win->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - win->m_updateRegion.Union( gdk_event->area.x, - gdk_event->area.y, - gdk_event->area.width, - gdk_event->area.height ); - - if (gdk_event->count > 0) return; - - wxPaintEvent event( win->GetId() ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); - - win->m_updateRegion.Clear(); -} - -//----------------------------------------------------------------------------- -// "draw" (of m_wxwindow, not of m_widget) -//----------------------------------------------------------------------------- - -static void gtk_window_draw_callback( GtkWidget *WXUNUSED(widget), GdkRectangle *rect, wxWindow *win ) -{ - if (!win->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - win->m_updateRegion.Union( rect->x, rect->y, rect->width, rect->height ); - - wxPaintEvent event( win->GetId() ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); - - win->m_updateRegion.Clear(); -} - -//----------------------------------------------------------------------------- -// "key_press_event" -//----------------------------------------------------------------------------- - -static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxWindow *win ) -{ - if (!win->HasVMT()) return FALSE; - if (g_blockEventsOnDrag) return FALSE; - -/* - printf( "OnKeyPress from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - long key_code = 0; - switch (gdk_event->keyval) - { - case GDK_BackSpace: key_code = WXK_BACK; break; - case GDK_Tab: key_code = WXK_TAB; break; - case GDK_Linefeed: key_code = WXK_RETURN; break; - case GDK_Clear: key_code = WXK_CLEAR; break; - case GDK_Return: key_code = WXK_RETURN; break; - case GDK_Pause: key_code = WXK_PAUSE; break; - case GDK_Scroll_Lock: key_code = WXK_SCROLL; break; - case GDK_Escape: key_code = WXK_ESCAPE; break; - case GDK_Delete: key_code = WXK_DELETE; break; - case GDK_Home: key_code = WXK_HOME; break; - case GDK_Left: key_code = WXK_LEFT; break; - case GDK_Up: key_code = WXK_UP; break; - case GDK_Right: key_code = WXK_RIGHT; break; - case GDK_Down: key_code = WXK_DOWN; break; - case GDK_Prior: key_code = WXK_PRIOR; break; -// case GDK_Page_Up: key_code = WXK_PAGEUP; break; - case GDK_Next: key_code = WXK_NEXT; break; -// case GDK_Page_Down: key_code = WXK_PAGEDOWN; break; - case GDK_End: key_code = WXK_END; break; - case GDK_Begin: key_code = WXK_HOME; break; - case GDK_Select: key_code = WXK_SELECT; break; - case GDK_Print: key_code = WXK_PRINT; break; - case GDK_Execute: key_code = WXK_EXECUTE; break; - case GDK_Insert: key_code = WXK_INSERT; break; - case GDK_Num_Lock: key_code = WXK_NUMLOCK; break; - case GDK_KP_Tab: key_code = WXK_TAB; break; - case GDK_KP_Enter: key_code = WXK_RETURN; break; - case GDK_KP_Home: key_code = WXK_HOME; break; - case GDK_KP_Left: key_code = WXK_LEFT; break; - case GDK_KP_Up: key_code = WXK_UP; break; - case GDK_KP_Right: key_code = WXK_RIGHT; break; - case GDK_KP_Down: key_code = WXK_DOWN; break; - case GDK_KP_Prior: key_code = WXK_PRIOR; break; -// case GDK_KP_Page_Up: key_code = WXK_PAGEUP; break; - case GDK_KP_Next: key_code = WXK_NEXT; break; -// case GDK_KP_Page_Down: key_code = WXK_PAGEDOWN; break; - case GDK_KP_End: key_code = WXK_END; break; - case GDK_KP_Begin: key_code = WXK_HOME; break; - case GDK_KP_Insert: key_code = WXK_INSERT; break; - case GDK_KP_Delete: key_code = WXK_DELETE; break; - case GDK_KP_Multiply: key_code = WXK_MULTIPLY; break; - case GDK_KP_Add: key_code = WXK_ADD; break; - case GDK_KP_Separator: key_code = WXK_SEPARATOR; break; - case GDK_KP_Subtract: key_code = WXK_SUBTRACT; break; - case GDK_KP_Decimal: key_code = WXK_DECIMAL; break; - case GDK_KP_Divide: key_code = WXK_DIVIDE; break; - case GDK_KP_0: key_code = WXK_NUMPAD0; break; - case GDK_KP_1: key_code = WXK_NUMPAD1; break; - case GDK_KP_2: key_code = WXK_NUMPAD2; break; - case GDK_KP_3: key_code = WXK_NUMPAD3; break; - case GDK_KP_4: key_code = WXK_NUMPAD4; break; - case GDK_KP_5: key_code = WXK_NUMPAD5; break; - case GDK_KP_6: key_code = WXK_NUMPAD6; break; - case GDK_KP_7: key_code = WXK_NUMPAD7; break; - case GDK_KP_8: key_code = WXK_NUMPAD7; break; - case GDK_KP_9: key_code = WXK_NUMPAD9; break; - case GDK_F1: key_code = WXK_F1; break; - case GDK_F2: key_code = WXK_F2; break; - case GDK_F3: key_code = WXK_F3; break; - case GDK_F4: key_code = WXK_F4; break; - case GDK_F5: key_code = WXK_F5; break; - case GDK_F6: key_code = WXK_F6; break; - case GDK_F7: key_code = WXK_F7; break; - case GDK_F8: key_code = WXK_F8; break; - case GDK_F9: key_code = WXK_F9; break; - case GDK_F10: key_code = WXK_F10; break; - case GDK_F11: key_code = WXK_F11; break; - case GDK_F12: key_code = WXK_F12; break; - default: - { - if ((gdk_event->keyval >= 0x20) && (gdk_event->keyval <= 0xFF)) - key_code = gdk_event->keyval; - } - } - - if (!key_code) return FALSE; - - wxKeyEvent event( wxEVT_CHAR ); - event.m_shiftDown = (gdk_event->state & GDK_SHIFT_MASK); - event.m_controlDown = (gdk_event->state & GDK_CONTROL_MASK); - event.m_altDown = (gdk_event->state & GDK_MOD1_MASK); - event.m_metaDown = (gdk_event->state & GDK_MOD2_MASK); - event.m_keyCode = key_code; - event.m_x = 0; - event.m_y = 0; - event.SetEventObject( win ); - - bool ret = win->GetEventHandler()->ProcessEvent( event ); - - if (!ret) - { - int command = win->GetAcceleratorTable()->GetCommand( event ); - if (command != -1) - { - wxCommandEvent command_event( wxEVT_COMMAND_MENU_SELECTED, command ); - ret = win->GetEventHandler()->ProcessEvent( command_event ); - } - } - - if (ret) - { - if ((gdk_event->keyval >= 0x20) && (gdk_event->keyval <= 0xFF)) - gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "key_press_event" ); - } - - return ret; -} - -//----------------------------------------------------------------------------- -// "button_press_event" -//----------------------------------------------------------------------------- - -static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton *gdk_event, wxWindow *win ) -{ - if (!win->IsOwnGtkWindow( gdk_event->window )) return TRUE; - - if (g_blockEventsOnDrag) return TRUE; - - if (win->m_wxwindow) - { - if (GTK_WIDGET_CAN_FOCUS(win->m_wxwindow) && !GTK_WIDGET_HAS_FOCUS (win->m_wxwindow) ) - { - gtk_widget_grab_focus (win->m_wxwindow); - -/* - printf( "GrabFocus from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - } - } - - if (!win->HasVMT()) return TRUE; - -/* - printf( "OnButtonPress from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - wxEventType event_type = wxEVT_LEFT_DOWN; - - if (gdk_event->button == 1) - { - switch (gdk_event->type) - { - case GDK_BUTTON_PRESS: event_type = wxEVT_LEFT_DOWN; break; - case GDK_2BUTTON_PRESS: event_type = wxEVT_LEFT_DCLICK; break; - default: break; - } - } - else if (gdk_event->button == 2) - { - switch (gdk_event->type) - { - case GDK_BUTTON_PRESS: event_type = wxEVT_MIDDLE_DOWN; break; - case GDK_2BUTTON_PRESS: event_type = wxEVT_MIDDLE_DCLICK; break; - default: break; - } - } - else if (gdk_event->button == 3) - { - switch (gdk_event->type) - { - case GDK_BUTTON_PRESS: event_type = wxEVT_RIGHT_DOWN; break; - case GDK_2BUTTON_PRESS: event_type = wxEVT_RIGHT_DCLICK; break; - default: break; - } - } - - wxMouseEvent event( event_type ); - event.m_shiftDown = (gdk_event->state & GDK_SHIFT_MASK); - event.m_controlDown = (gdk_event->state & GDK_CONTROL_MASK); - event.m_altDown = (gdk_event->state & GDK_MOD1_MASK); - event.m_metaDown = (gdk_event->state & GDK_MOD2_MASK); - event.m_leftDown = (gdk_event->state & GDK_BUTTON1_MASK); - event.m_middleDown = (gdk_event->state & GDK_BUTTON2_MASK); - event.m_rightDown = (gdk_event->state & GDK_BUTTON3_MASK); - - event.m_x = (long)gdk_event->x; - event.m_y = (long)gdk_event->y; - - // Some control don't have their own X window and thus cannot get - // any events. - - wxNode *node = win->GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow*)node->Data(); - if ((child->m_x <= event.m_x) && - (child->m_y <= event.m_y) && - (child->m_x+child->m_width >= event.m_x) && - (child->m_y+child->m_height >= event.m_y)) - { - win = child; - event.m_x -= child->m_x; - event.m_y -= child->m_y; - break; - } - node = node->Next(); - } - - event.SetEventObject( win ); - - if (win->GetEventHandler()->ProcessEvent( event )) - gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "button_press_event" ); - - return TRUE; -} - -//----------------------------------------------------------------------------- -// "button_release" -//----------------------------------------------------------------------------- - -static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButton *gdk_event, wxWindow *win ) -{ - if (!win->IsOwnGtkWindow( gdk_event->window )) return TRUE; - if (g_blockEventsOnDrag) return TRUE; - - if (!win->HasVMT()) return TRUE; - -/* - printf( "OnButtonRelease from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - wxEventType event_type = wxEVT_NULL; - - switch (gdk_event->button) - { - case 1: event_type = wxEVT_LEFT_UP; break; - case 2: event_type = wxEVT_MIDDLE_UP; break; - case 3: event_type = wxEVT_RIGHT_UP; break; - } - - wxMouseEvent event( event_type ); - event.m_shiftDown = (gdk_event->state & GDK_SHIFT_MASK); - event.m_controlDown = (gdk_event->state & GDK_CONTROL_MASK); - event.m_altDown = (gdk_event->state & GDK_MOD1_MASK); - event.m_metaDown = (gdk_event->state & GDK_MOD2_MASK); - event.m_leftDown = (gdk_event->state & GDK_BUTTON1_MASK); - event.m_middleDown = (gdk_event->state & GDK_BUTTON2_MASK); - event.m_rightDown = (gdk_event->state & GDK_BUTTON3_MASK); - event.m_x = (long)gdk_event->x; - event.m_y = (long)gdk_event->y; - - // Some control don't have their own X window and thus cannot get - // any events. - - wxNode *node = win->GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow*)node->Data(); - if ((child->m_x <= event.m_x) && - (child->m_y <= event.m_y) && - (child->m_x+child->m_width >= event.m_x) && - (child->m_y+child->m_height >= event.m_y)) - { - win = child; - event.m_x -= child->m_x; - event.m_y -= child->m_y; - break; - } - node = node->Next(); - } - - event.SetEventObject( win ); - - if (win->GetEventHandler()->ProcessEvent( event )) - gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "button_release_event" ); - - return TRUE; -} - -//----------------------------------------------------------------------------- -// "motion_notify_event" -//----------------------------------------------------------------------------- - -static gint gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion *gdk_event, wxWindow *win ) -{ - if (!win->IsOwnGtkWindow( gdk_event->window )) return TRUE; - if (g_blockEventsOnDrag) return TRUE; - - if (!win->HasVMT()) return TRUE; - -/* - printf( "OnMotion from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - wxMouseEvent event( wxEVT_MOTION ); - event.m_shiftDown = (gdk_event->state & GDK_SHIFT_MASK); - event.m_controlDown = (gdk_event->state & GDK_CONTROL_MASK); - event.m_altDown = (gdk_event->state & GDK_MOD1_MASK); - event.m_metaDown = (gdk_event->state & GDK_MOD2_MASK); - event.m_leftDown = (gdk_event->state & GDK_BUTTON1_MASK); - event.m_middleDown = (gdk_event->state & GDK_BUTTON2_MASK); - event.m_rightDown = (gdk_event->state & GDK_BUTTON3_MASK); - - event.m_x = (long)gdk_event->x; - event.m_y = (long)gdk_event->y; - - // Some control don't have their own X window and thus cannot get - // any events. - - wxNode *node = win->GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow*)node->Data(); - if ((child->m_x <= event.m_x) && - (child->m_y <= event.m_y) && - (child->m_x+child->m_width >= event.m_x) && - (child->m_y+child->m_height >= event.m_y)) - { - win = child; - event.m_x -= child->m_x; - event.m_y -= child->m_y; - break; - } - node = node->Next(); - } - - event.SetEventObject( win ); - - if (win->GetEventHandler()->ProcessEvent( event )) - gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "motion_notify_event" ); - - return TRUE; -} - -//----------------------------------------------------------------------------- -// "focus_in_event" -//----------------------------------------------------------------------------- - -static gint gtk_window_focus_in_callback( GtkWidget *widget, GdkEvent *WXUNUSED(event), wxWindow *win ) -{ - if (g_blockEventsOnDrag) return TRUE; - if (win->m_wxwindow) - { - if (GTK_WIDGET_CAN_FOCUS(win->m_wxwindow)) - { - GTK_WIDGET_SET_FLAGS (win->m_wxwindow, GTK_HAS_FOCUS); -/* - printf( "SetFocus flag from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - } - } - - if (!win->HasVMT()) return TRUE; - -/* - printf( "OnSetFocus from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( " " ); - printf( WXSTRINGCAST win->GetLabel() ); - printf( ".\n" ); -*/ - - wxFocusEvent event( wxEVT_SET_FOCUS, win->GetId() ); - event.SetEventObject( win ); - - if (win->GetEventHandler()->ProcessEvent( event )) - gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_in_event" ); - - return TRUE; -} - -//----------------------------------------------------------------------------- -// "focus_out_event" -//----------------------------------------------------------------------------- - -static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED(event), wxWindow *win ) -{ - if (g_blockEventsOnDrag) return TRUE; - if (win->m_wxwindow) - { - if (GTK_WIDGET_CAN_FOCUS(win->m_wxwindow)) - GTK_WIDGET_UNSET_FLAGS (win->m_wxwindow, GTK_HAS_FOCUS); - } - - if (!win->HasVMT()) return TRUE; - -/* - printf( "OnKillFocus from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - wxFocusEvent event( wxEVT_KILL_FOCUS, win->GetId() ); - event.SetEventObject( win ); - - if (win->GetEventHandler()->ProcessEvent( event )) - gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_out_event" ); - - return TRUE; -} - -//----------------------------------------------------------------------------- -// "value_changed" from m_vAdjust -//----------------------------------------------------------------------------- - -static void gtk_window_vscroll_callback( GtkWidget *WXUNUSED(widget), wxWindow *win ) -{ - if (g_blockEventsOnDrag) return; - -/* - printf( "OnVScroll from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - if (!win->HasVMT()) return; - - float diff = win->m_vAdjust->value - win->m_oldVerticalPos; - if (fabs(diff) < 0.2) return; - - wxEventType command = wxEVT_NULL; - - float line_step = win->m_vAdjust->step_increment; - float page_step = win->m_vAdjust->page_increment; - - if (fabs(diff-line_step) < 0.2) command = wxEVT_SCROLL_LINEDOWN; - else if (fabs(diff+line_step) < 0.2) command = wxEVT_SCROLL_LINEUP; - else if (fabs(diff-page_step) < 0.2) command = wxEVT_SCROLL_PAGEDOWN; - else if (fabs(diff+page_step) < 0.2) command = wxEVT_SCROLL_PAGEUP; - else command = wxEVT_SCROLL_THUMBTRACK; - - int value = (int)(win->m_vAdjust->value+0.5); - - wxScrollEvent event( command, win->GetId(), value, wxVERTICAL ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); -} - -//----------------------------------------------------------------------------- -// "value_changed" from m_hAdjust -//----------------------------------------------------------------------------- - -static void gtk_window_hscroll_callback( GtkWidget *WXUNUSED(widget), wxWindow *win ) -{ - if (g_blockEventsOnDrag) return; - -/* - printf( "OnHScroll from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - if (!win->HasVMT()) return; - - float diff = win->m_hAdjust->value - win->m_oldHorizontalPos; - if (fabs(diff) < 0.2) return; - - wxEventType command = wxEVT_NULL; - - float line_step = win->m_hAdjust->step_increment; - float page_step = win->m_hAdjust->page_increment; - - if (fabs(diff-line_step) < 0.2) command = wxEVT_SCROLL_LINEDOWN; - else if (fabs(diff+line_step) < 0.2) command = wxEVT_SCROLL_LINEUP; - else if (fabs(diff-page_step) < 0.2) command = wxEVT_SCROLL_PAGEDOWN; - else if (fabs(diff+page_step) < 0.2) command = wxEVT_SCROLL_PAGEUP; - else command = wxEVT_SCROLL_THUMBTRACK; - - int value = (int)(win->m_hAdjust->value+0.5); - - wxScrollEvent event( command, win->GetId(), value, wxHORIZONTAL ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); -} - -//----------------------------------------------------------------------------- -// "changed" from m_vAdjust -//----------------------------------------------------------------------------- - -static void gtk_window_vscroll_change_callback( GtkWidget *WXUNUSED(widget), wxWindow *win ) -{ - if (g_blockEventsOnDrag) return; - -/* - printf( "OnVScroll change from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - if (!win->HasVMT()) return; - - wxEventType command = wxEVT_SCROLL_THUMBTRACK; - int value = (int)(win->m_vAdjust->value+0.5); - - wxScrollEvent event( command, win->GetId(), value, wxVERTICAL ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); -} - -//----------------------------------------------------------------------------- -// "changed" from m_hAdjust -//----------------------------------------------------------------------------- - -static void gtk_window_hscroll_change_callback( GtkWidget *WXUNUSED(widget), wxWindow *win ) -{ - if (g_blockEventsOnDrag) return; - -/* - printf( "OnHScroll change from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - if (!win->HasVMT()) return; - - wxEventType command = wxEVT_SCROLL_THUMBTRACK; - int value = (int)(win->m_hAdjust->value+0.5); - - wxScrollEvent event( command, win->GetId(), value, wxHORIZONTAL ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); -} - -//----------------------------------------------------------------------------- -// "drop_data_available_event" -//----------------------------------------------------------------------------- - -static void gtk_window_drop_callback( GtkWidget *widget, GdkEvent *event, wxWindow *win ) -{ - if (!win->HasVMT()) return; - - if (win->GetDropTarget()) - { - int x = 0; - int y = 0; - gdk_window_get_pointer( widget->window, &x, &y, (GdkModifierType *) NULL ); - win->GetDropTarget()->Drop( event, x, y ); - } - -/* - g_free (event->dropdataavailable.data); - g_free (event->dropdataavailable.data_type); -*/ -} - -//----------------------------------------------------------------------------- -// "enter_notify_event" -//----------------------------------------------------------------------------- - -static gint gtk_window_enter_callback( GtkWidget *widget, GdkEventCrossing *gdk_event, wxWindow *win ) -{ - if (widget->window != gdk_event->window) return TRUE; - if (g_blockEventsOnDrag) return TRUE; - if (!win->HasVMT()) return TRUE; - - if (widget->window) - gdk_window_set_cursor( widget->window, win->m_cursor->GetCursor() ); - - wxMouseEvent event( wxEVT_ENTER_WINDOW ); - event.SetEventObject( win ); - return win->GetEventHandler()->ProcessEvent( event ); -} - -//----------------------------------------------------------------------------- -// "leave_notify_event" -//----------------------------------------------------------------------------- - -static gint gtk_window_leave_callback( GtkWidget *widget, GdkEventCrossing *gdk_event, wxWindow *win ) -{ - if (widget->window != gdk_event->window) return TRUE; - if (!win->HasVMT()) return TRUE; - if (g_blockEventsOnDrag) return TRUE; - - if (widget->window) - gdk_window_set_cursor( widget->window, wxSTANDARD_CURSOR->GetCursor() ); - - wxMouseEvent event( wxEVT_LEAVE_WINDOW ); - event.SetEventObject( win ); - return win->GetEventHandler()->ProcessEvent( event ); -} - -//----------------------------------------------------------------------------- -// wxWindow -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxWindow,wxEvtHandler) - -BEGIN_EVENT_TABLE(wxWindow, wxEvtHandler) - EVT_SIZE(wxWindow::OnSize) - EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged) - EVT_INIT_DIALOG(wxWindow::OnInitDialog) - EVT_IDLE(wxWindow::OnIdle) -END_EVENT_TABLE() - -wxWindow::wxWindow() -{ - m_widget = (GtkWidget *) NULL; - m_wxwindow = (GtkWidget *) NULL; - m_parent = (wxWindow *) NULL; - m_children.DeleteContents( FALSE ); - m_x = 0; - m_y = 0; - m_width = 0; - m_height = 0; - m_minWidth = -1; - m_minHeight = -1; - m_maxWidth = -1; - m_maxHeight = -1; - m_retCode = 0; - m_eventHandler = this; - m_windowValidator = (wxValidator *) NULL; - m_windowId = -1; - m_cursor = new wxCursor( wxCURSOR_ARROW ); - m_font = *wxSWISS_FONT; - m_windowStyle = 0; - m_windowName = "noname"; - m_constraints = (wxLayoutConstraints *) NULL; - m_constraintsInvolvedIn = (wxList *) NULL; - m_windowSizer = (wxSizer *) NULL; - m_sizerParent = (wxWindow *) NULL; - m_autoLayout = FALSE; - m_sizeSet = FALSE; - m_hasVMT = FALSE; - m_needParent = TRUE; - m_hasScrolling = FALSE; - m_hAdjust = (GtkAdjustment *) NULL; - m_vAdjust = (GtkAdjustment *) NULL; - m_oldHorizontalPos = 0.0; - m_oldVerticalPos = 0.0; - m_isShown = FALSE; - m_isEnabled = TRUE; - m_pDropTarget = (wxDropTarget *) NULL; - m_resizing = FALSE; -} - -bool wxWindow::Create( wxWindow *parent, wxWindowID id, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - m_isShown = FALSE; - m_isEnabled = TRUE; - m_needParent = TRUE; - - m_cursor = (wxCursor *) NULL; - - PreCreation( parent, id, pos, size, style, name ); - - m_widget = gtk_scrolled_window_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL ); - m_hasScrolling = TRUE; - - GtkScrolledWindow *s_window; - s_window = GTK_SCROLLED_WINDOW(m_widget); - - GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass ); - scroll_class->scrollbar_spacing = 0; - - gtk_scrolled_window_set_policy( s_window, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC ); - - m_oldHorizontalPos = 0.0; - m_oldVerticalPos = 0.0; - - m_hAdjust = gtk_range_get_adjustment( GTK_RANGE(s_window->hscrollbar) ); - m_vAdjust = gtk_range_get_adjustment( GTK_RANGE(s_window->vscrollbar) ); - - gtk_signal_connect (GTK_OBJECT (m_hAdjust), "value_changed", - (GtkSignalFunc) gtk_window_hscroll_callback, (gpointer) this ); - gtk_signal_connect (GTK_OBJECT (m_vAdjust), "value_changed", - (GtkSignalFunc) gtk_window_vscroll_callback, (gpointer) this ); - - gtk_signal_connect (GTK_OBJECT (m_hAdjust), "changed", - (GtkSignalFunc) gtk_window_hscroll_change_callback, (gpointer) this ); - gtk_signal_connect (GTK_OBJECT (m_vAdjust), "changed", - (GtkSignalFunc) gtk_window_vscroll_change_callback, (gpointer) this ); - - GtkViewport *viewport; - viewport = GTK_VIEWPORT(s_window->viewport); - - if (m_windowStyle & wxRAISED_BORDER) - { - gtk_viewport_set_shadow_type( viewport, GTK_SHADOW_OUT ); - } - else if (m_windowStyle & wxSUNKEN_BORDER) - { - gtk_viewport_set_shadow_type( viewport, GTK_SHADOW_IN ); - } - else - { - gtk_viewport_set_shadow_type( viewport, GTK_SHADOW_NONE ); - } - - m_wxwindow = gtk_myfixed_new(); - - if (m_wxwindow) GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS ); - - if (m_windowStyle & wxTAB_TRAVERSAL == wxTAB_TRAVERSAL) - GTK_WIDGET_UNSET_FLAGS( m_wxwindow, GTK_CAN_FOCUS ); - else - GTK_WIDGET_SET_FLAGS( m_wxwindow, GTK_CAN_FOCUS ); - - gtk_container_add( GTK_CONTAINER(m_widget), m_wxwindow ); - - // shut the viewport up - gtk_viewport_set_hadjustment( viewport, (GtkAdjustment*) gtk_adjustment_new( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) ); - gtk_viewport_set_vadjustment( viewport, (GtkAdjustment*) gtk_adjustment_new( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) ); - - // I _really_ don't want scrollbars in the beginning - m_vAdjust->lower = 0.0; - m_vAdjust->upper = 1.0; - m_vAdjust->value = 0.0; - m_vAdjust->step_increment = 1.0; - m_vAdjust->page_increment = 1.0; - m_vAdjust->page_size = 5.0; - gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "changed" ); - m_hAdjust->lower = 0.0; - m_hAdjust->upper = 1.0; - m_hAdjust->value = 0.0; - m_hAdjust->step_increment = 1.0; - m_hAdjust->page_increment = 1.0; - m_hAdjust->page_size = 5.0; - gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "changed" ); - - gtk_widget_show( m_wxwindow ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -wxWindow::~wxWindow(void) -{ - m_hasVMT = FALSE; - - if (m_pDropTarget) delete m_pDropTarget; - - if (m_parent) m_parent->RemoveChild( this ); - if (m_widget) Show( FALSE ); - - DestroyChildren(); - - if (m_wxwindow) gtk_widget_destroy( m_wxwindow ); - - if (m_widget) gtk_widget_destroy( m_widget ); - - wxDELETE(m_cursor); - - DeleteRelatedConstraints(); - if (m_constraints) - { - // This removes any dangling pointers to this window - // in other windows' constraintsInvolvedIn lists. - UnsetConstraints(m_constraints); - delete m_constraints; - m_constraints = (wxLayoutConstraints *) NULL; - } - if (m_windowSizer) - { - delete m_windowSizer; - m_windowSizer = (wxSizer *) NULL; - } - // If this is a child of a sizer, remove self from parent - if (m_sizerParent) m_sizerParent->RemoveChild((wxWindow *)this); - - // Just in case the window has been Closed, but - // we're then deleting immediately: don't leave - // dangling pointers. - wxPendingDelete.DeleteObject(this); - - // Just in case we've loaded a top-level window via - // wxWindow::LoadNativeDialog but we weren't a dialog - // class - wxTopLevelWindows.DeleteObject(this); - - if (m_windowValidator) delete m_windowValidator; -} - -void wxWindow::PreCreation( wxWindow *parent, wxWindowID id, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - if (m_needParent && (parent == NULL)) - wxFatalError( "Need complete parent.", name ); - - m_widget = (GtkWidget *) NULL; - m_hasVMT = FALSE; - m_parent = parent; - m_children.DeleteContents( FALSE ); - m_x = (int)pos.x; - m_y = (int)pos.y; - m_width = size.x; - if (m_width == -1) m_width = 20; - m_height = size.y; - if (m_height == -1) m_height = 20; - m_minWidth = -1; - m_minHeight = -1; - m_maxWidth = -1; - m_maxHeight = -1; - m_retCode = 0; - m_eventHandler = this; - m_windowId = id; - m_sizeSet = FALSE; - if (m_cursor == NULL) - m_cursor = new wxCursor( wxCURSOR_ARROW ); - m_font = *wxSWISS_FONT; - m_backgroundColour = wxWHITE; - m_foregroundColour = wxBLACK; - m_windowStyle = style; - m_windowName = name; - m_constraints = (wxLayoutConstraints *) NULL; - m_constraintsInvolvedIn = (wxList *) NULL; - m_windowSizer = (wxSizer *) NULL; - m_sizerParent = (wxWindow *) NULL; - m_autoLayout = FALSE; - m_pDropTarget = (wxDropTarget *) NULL; - m_resizing = FALSE; - m_windowValidator = (wxValidator *) NULL; -} - -void wxWindow::PostCreation(void) -{ - if (m_parent) m_parent->AddChild( this ); - -// GtkStyle *style = m_widget->style; -// style->font = m_font.GetInternalFont( 1.0 ); // destroy old font ? - - GtkWidget *connect_widget = GetConnectWidget(); - - if (m_wxwindow) - { - gtk_signal_connect( GTK_OBJECT(m_wxwindow), "expose_event", - GTK_SIGNAL_FUNC(gtk_window_expose_callback), (gpointer)this ); - - gtk_signal_connect( GTK_OBJECT(m_wxwindow), "draw", - GTK_SIGNAL_FUNC(gtk_window_draw_callback), (gpointer)this ); - } - - gtk_signal_connect( GTK_OBJECT(connect_widget), "key_press_event", - GTK_SIGNAL_FUNC(gtk_window_key_press_callback), (gpointer)this ); - - gtk_signal_connect( GTK_OBJECT(connect_widget), "button_press_event", - GTK_SIGNAL_FUNC(gtk_window_button_press_callback), (gpointer)this ); - - gtk_signal_connect( GTK_OBJECT(connect_widget), "button_release_event", - GTK_SIGNAL_FUNC(gtk_window_button_release_callback), (gpointer)this ); - - gtk_signal_connect( GTK_OBJECT(connect_widget), "motion_notify_event", - GTK_SIGNAL_FUNC(gtk_window_motion_notify_callback), (gpointer)this ); - - gtk_signal_connect( GTK_OBJECT(connect_widget), "focus_in_event", - GTK_SIGNAL_FUNC(gtk_window_focus_in_callback), (gpointer)this ); - - gtk_signal_connect( GTK_OBJECT(connect_widget), "focus_out_event", - GTK_SIGNAL_FUNC(gtk_window_focus_out_callback), (gpointer)this ); - - // Only for cursor handling - - gtk_signal_connect( GTK_OBJECT(m_widget), "enter_notify_event", - GTK_SIGNAL_FUNC(gtk_window_enter_callback), (gpointer)this ); - - gtk_signal_connect( GTK_OBJECT(m_widget), "leave_notify_event", - GTK_SIGNAL_FUNC(gtk_window_leave_callback), (gpointer)this ); - - if (m_wxwindow) - { - gtk_signal_connect( GTK_OBJECT(m_wxwindow), "enter_notify_event", - GTK_SIGNAL_FUNC(gtk_window_enter_callback), (gpointer)this ); - - gtk_signal_connect( GTK_OBJECT(m_wxwindow), "leave_notify_event", - GTK_SIGNAL_FUNC(gtk_window_leave_callback), (gpointer)this ); - } - - if (m_widget && m_parent) gtk_widget_realize( m_widget ); - - if (m_wxwindow) - { - gtk_widget_realize( m_wxwindow ); - gdk_gc_set_exposures( m_wxwindow->style->fg_gc[0], TRUE ); - } - - SetCursor( wxSTANDARD_CURSOR ); - - m_hasVMT = TRUE; -} - -bool wxWindow::HasVMT(void) -{ - return m_hasVMT; -} - -bool wxWindow::Close( bool force ) -{ - wxCloseEvent event(wxEVT_CLOSE_WINDOW, m_windowId); - event.SetEventObject(this); - event.SetForce(force); - - return GetEventHandler()->ProcessEvent(event); -} - -bool wxWindow::Destroy(void) -{ - m_hasVMT = FALSE; - delete this; - return TRUE; -} - -bool wxWindow::DestroyChildren(void) -{ - if (GetChildren()) - { - wxNode *node; - while ((node = GetChildren()->First()) != (wxNode *)NULL) - { - wxWindow *child; - if ((child = (wxWindow *)node->Data()) != (wxWindow *)NULL) - { - delete child; - if (GetChildren()->Member(child)) delete node; - } - } - } - return TRUE; -} - -void wxWindow::PrepareDC( wxDC &WXUNUSED(dc) ) -{ - // are we to set fonts here ? -} - -void wxWindow::ImplementSetSize(void) -{ - if ((m_minWidth != -1) && (m_width < m_minWidth)) m_width = m_minWidth; - if ((m_minHeight != -1) && (m_height < m_minHeight)) m_height = m_minHeight; - if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_minWidth; - if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_minHeight; - gtk_widget_set_usize( m_widget, m_width, m_height ); -} - -void wxWindow::ImplementSetPosition(void) -{ - if (IS_KIND_OF(this,wxFrame) || IS_KIND_OF(this,wxDialog)) - { - if ((m_x != -1) || (m_y != -1)) - gtk_widget_set_uposition( m_widget, m_x, m_y ); - return; - } - - if (!m_parent) - { - wxFAIL_MSG( "wxWindow::SetSize error.\n" ); - return; - } - - if ((m_parent) && (m_parent->m_wxwindow)) - gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), m_widget, m_x, m_y ); - - // Don't do anything for children of wxNotebook and wxMDIChildFrame -} - -void wxWindow::SetSize( int x, int y, int width, int height, int sizeFlags ) -{ - if (m_resizing) return; // I don't like recursions - m_resizing = TRUE; - - int newX = x; - int newY = y; - int newW = width; - int newH = height; - - if ((sizeFlags & wxSIZE_USE_EXISTING) == wxSIZE_USE_EXISTING) - { - if (newX == -1) newX = m_x; - if (newY == -1) newY = m_y; - if (newW == -1) newW = m_width; - if (newH == -1) newH = m_height; - } - - if ((sizeFlags & wxSIZE_AUTO_WIDTH) == wxSIZE_AUTO_WIDTH) - { - if (newW == -1) newW = 80; - } - - if ((sizeFlags & wxSIZE_AUTO_HEIGHT) == wxSIZE_AUTO_HEIGHT) - { - if (newH == -1) newH = 26; - } - - if ((m_x != newX) || (m_y != newY) || (!m_sizeSet)) - { - m_x = newX; - m_y = newY; - ImplementSetPosition(); - } - if ((m_width != newW) || (m_height != newH) || (!m_sizeSet)) - { - m_width = newW; - m_height = newH; - ImplementSetSize(); - } - m_sizeSet = TRUE; - - wxSizeEvent event( wxSize(m_width,m_height), GetId() ); - event.SetEventObject( this ); - ProcessEvent( event ); - - m_resizing = FALSE; -} - -void wxWindow::SetSize( int width, int height ) -{ - SetSize( -1, -1, width, height, wxSIZE_USE_EXISTING ); -} - -void wxWindow::Move( int x, int y ) -{ - SetSize( x, y, -1, -1, wxSIZE_USE_EXISTING ); -} - -void wxWindow::GetSize( int *width, int *height ) const -{ - if (width) (*width) = m_width; - if (height) (*height) = m_height; -} - -void wxWindow::SetClientSize( int width, int height ) -{ - if (!m_wxwindow) - { - SetSize( width, height ); - } - else - { - int dw = 0; - int dh = 0; - - if (!m_hasScrolling) - { -/* - do we have sunken dialogs ? - - GtkStyleClass *window_class = m_wxwindow->style->klass; - - dw += 2 * window_class->xthickness; - dh += 2 * window_class->ythickness; -*/ - } - else - { - GtkScrolledWindow *scroll_window = GTK_SCROLLED_WINDOW(m_widget); - GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass ); - - GtkWidget *viewport = scroll_window->viewport; - GtkStyleClass *viewport_class = viewport->style->klass; - - GtkWidget *hscrollbar = scroll_window->hscrollbar; - GtkWidget *vscrollbar = scroll_window->vscrollbar; - - if ((m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSUNKEN_BORDER)) - { - dw += 2 * viewport_class->xthickness; - dh += 2 * viewport_class->ythickness; - } - - if (GTK_WIDGET_VISIBLE(vscrollbar)) - { - dw += vscrollbar->allocation.width; - dw += scroll_class->scrollbar_spacing; - } - - if (GTK_WIDGET_VISIBLE(hscrollbar)) - { - dh += hscrollbar->allocation.height; - dw += scroll_class->scrollbar_spacing; - } - } - - SetSize( width+dw, height+dh ); - } -} - -void wxWindow::GetClientSize( int *width, int *height ) const -{ - if (!m_wxwindow) - { - if (width) (*width) = m_width; - if (height) (*height) = m_height; - } - else - { - int dw = 0; - int dh = 0; - - if (!m_hasScrolling) - { -/* - do we have sunken dialogs ? - - GtkStyleClass *window_class = m_wxwindow->style->klass; - - dw += 2 * window_class->xthickness; - dh += 2 * window_class->ythickness; -*/ - } - else - { - GtkScrolledWindow *scroll_window = GTK_SCROLLED_WINDOW(m_widget); - GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass ); - - GtkWidget *viewport = scroll_window->viewport; - GtkStyleClass *viewport_class = viewport->style->klass; - - GtkWidget *hscrollbar = scroll_window->hscrollbar; - GtkWidget *vscrollbar = scroll_window->vscrollbar; - - if ((m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSUNKEN_BORDER)) - { - dw += 2 * viewport_class->xthickness; - dh += 2 * viewport_class->ythickness; - } - - if (GTK_WIDGET_VISIBLE(vscrollbar)) - { -// dw += vscrollbar->allocation.width; - dw += 15; // range.slider_width = 11 + 2*2pts edge - dw += scroll_class->scrollbar_spacing; - } - - if (GTK_WIDGET_VISIBLE(hscrollbar)) - { -// dh += hscrollbar->allocation.height; - dh += 15; - dh += scroll_class->scrollbar_spacing; - } - } - - if (width) (*width) = m_width - dw; - if (height) (*height) = m_height - dh; - } -} - -void wxWindow::GetPosition( int *x, int *y ) const -{ - if (x) (*x) = m_x; - if (y) (*y) = m_y; -} - -void wxWindow::ClientToScreen( int *x, int *y ) -{ - GdkWindow *source = (GdkWindow *) NULL; - if (m_wxwindow) - source = m_wxwindow->window; - else - source = m_widget->window; - - int org_x = 0; - int org_y = 0; - gdk_window_get_origin( source, &org_x, &org_y ); - - if (!m_wxwindow) - { - if (GTK_WIDGET_NO_WINDOW (m_widget)) - { - org_x += m_widget->allocation.x; - org_y += m_widget->allocation.y; - } - } - - if (x) *x += org_x; - if (y) *y += org_y; -} - -void wxWindow::ScreenToClient( int *x, int *y ) -{ - GdkWindow *source = (GdkWindow *) NULL; - if (m_wxwindow) - source = m_wxwindow->window; - else - source = m_widget->window; - - int org_x = 0; - int org_y = 0; - gdk_window_get_origin( source, &org_x, &org_y ); - - if (!m_wxwindow) - { - if (GTK_WIDGET_NO_WINDOW (m_widget)) - { - org_x += m_widget->allocation.x; - org_y += m_widget->allocation.y; - } - } - - if (x) *x -= org_x; - if (y) *y -= org_y; -} - -void wxWindow::Centre( int direction ) -{ - if (IS_KIND_OF(this,wxDialog) || IS_KIND_OF(this,wxFrame)) - { - if (direction & wxHORIZONTAL == wxHORIZONTAL) m_x = (gdk_screen_width () - m_width) / 2; - if (direction & wxVERTICAL == wxVERTICAL) m_y = (gdk_screen_height () - m_height) / 2; - ImplementSetPosition(); - } - else - { - if (m_parent) - { - int p_w = 0; - int p_h = 0; - m_parent->GetSize( &p_w, &p_h ); - if (direction & wxHORIZONTAL == wxHORIZONTAL) m_x = (p_w - m_width) / 2; - if (direction & wxVERTICAL == wxVERTICAL) m_y = (p_h - m_height) / 2; - ImplementSetPosition(); - } - } -} - -void wxWindow::Fit(void) -{ - int maxX = 0; - int maxY = 0; - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow *win = (wxWindow *)node->Data(); - int wx, wy, ww, wh; - win->GetPosition(&wx, &wy); - win->GetSize(&ww, &wh); - if ( wx + ww > maxX ) - maxX = wx + ww; - if ( wy + wh > maxY ) - maxY = wy + wh; - - node = node->Next(); - } - SetClientSize(maxX + 5, maxY + 10); -} - -void wxWindow::SetSizeHints( int minW, int minH, int maxW, int maxH, int WXUNUSED(incW), int WXUNUSED(incH) ) -{ - m_minWidth = minW; - m_minHeight = minH; - m_maxWidth = maxW; - m_maxHeight = maxH; -} - -void wxWindow::OnSize( wxSizeEvent &WXUNUSED(event) ) -{ - //if (GetAutoLayout()) Layout(); -} - -bool wxWindow::Show( bool show ) -{ - if (show) - gtk_widget_show( m_widget ); - else - gtk_widget_hide( m_widget ); - m_isShown = show; - return TRUE; -} - -void wxWindow::Enable( bool enable ) -{ - m_isEnabled = enable; - gtk_widget_set_sensitive( m_widget, enable ); - if (m_wxwindow) gtk_widget_set_sensitive( m_wxwindow, enable ); -} - -int wxWindow::GetCharHeight(void) const -{ - GdkFont *font = m_font.GetInternalFont( 1.0 ); - return font->ascent + font->descent; -} - -int wxWindow::GetCharWidth(void) const -{ - GdkFont *font = m_font.GetInternalFont( 1.0 ); - return gdk_string_width( font, "H" ); -} - -void wxWindow::GetTextExtent( const wxString& string, int *x, int *y, - int *descent, int *externalLeading, const wxFont *theFont, bool WXUNUSED(use16) ) const -{ - wxFont fontToUse = m_font; - if (theFont) fontToUse = *theFont; - - GdkFont *font = fontToUse.GetInternalFont( 1.0 ); - if (x) (*y) = gdk_string_width( font, string ); - if (y) (*y) = font->ascent + font->descent; - if (descent) (*descent) = font->descent; - if (externalLeading) (*externalLeading) = 0; // ?? -} - -void wxWindow::MakeModal( bool modal ) -{ - return; - // Disable all other windows - if (this->IsKindOf(CLASSINFO(wxDialog)) || this->IsKindOf(CLASSINFO(wxFrame))) - { - wxNode *node = wxTopLevelWindows.First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (win != this) - win->Enable(!modal); - - node = node->Next(); - } - } -} - -void wxWindow::SetFocus(void) -{ - GtkWidget *connect_widget = GetConnectWidget(); - if (connect_widget) - { - if (GTK_WIDGET_CAN_FOCUS(connect_widget) && !GTK_WIDGET_HAS_FOCUS (connect_widget) ) - { - gtk_widget_grab_focus (connect_widget); - } - } -} - -bool wxWindow::OnClose(void) -{ - return TRUE; -} - -void wxWindow::AddChild( wxWindow *child ) -{ - // Addchild is (often) called before the program - // has left the parents constructor so that no - // virtual tables work yet. The approach below - // practically imitates virtual tables, i.e. it - // implements a different AddChild() behaviour - // for wxFrame, wxDialog, wxWindow and - // wxMDIParentFrame. - - // wxFrame and wxDialog as children aren't placed into the parents - - if (( IS_KIND_OF(child,wxFrame) || IS_KIND_OF(child,wxDialog) ) && - (!IS_KIND_OF(child,wxMDIChildFrame))) - { - m_children.Append( child ); - - if ((child->m_x != -1) && (child->m_y != -1)) - gtk_widget_set_uposition( child->m_widget, child->m_x, child->m_y ); - - return; - } - - // In the case of an wxMDIChildFrame descendant, we use the - // client windows's AddChild() - - if (IS_KIND_OF(this,wxMDIParentFrame)) - { - if (IS_KIND_OF(child,wxMDIChildFrame)) - { - wxMDIClientWindow *client = ((wxMDIParentFrame*)this)->GetClientWindow(); - if (client) - { - client->AddChild( child ); - return; - } - } - } - - // wxNotebook is very special, so it has a private AddChild() - - if (IS_KIND_OF(this,wxNotebook)) - { - wxNotebook *tab = (wxNotebook*)this; - tab->AddChild( child ); - return; - } - - // wxFrame has a private AddChild - - if (IS_KIND_OF(this,wxFrame) && !IS_KIND_OF(this,wxMDIChildFrame)) - { - wxFrame *frame = (wxFrame*)this; - frame->AddChild( child ); - return; - } - - // All the rest - - m_children.Append( child ); - if (m_wxwindow) gtk_myfixed_put( GTK_MYFIXED(m_wxwindow), child->m_widget, - child->m_x, child->m_y ); - - gtk_widget_set_usize( child->m_widget, child->m_width, child->m_height ); -} - -wxList *wxWindow::GetChildren(void) -{ - return (&m_children); -} - -void wxWindow::RemoveChild( wxWindow *child ) -{ - if (GetChildren()) - GetChildren()->DeleteObject( child ); - child->m_parent = (wxWindow *) NULL; -} - -void wxWindow::SetReturnCode( int retCode ) -{ - m_retCode = retCode; -} - -int wxWindow::GetReturnCode(void) -{ - return m_retCode; -} - -void wxWindow::Raise(void) -{ - if (m_widget) gdk_window_raise( m_widget->window ); -} - -void wxWindow::Lower(void) -{ - if (m_widget) gdk_window_lower( m_widget->window ); -} - -wxEvtHandler *wxWindow::GetEventHandler(void) -{ - return m_eventHandler; -} - -void wxWindow::SetEventHandler( wxEvtHandler *handler ) -{ - m_eventHandler = handler; -} - -void wxWindow::PushEventHandler(wxEvtHandler *handler) -{ - handler->SetNextHandler(GetEventHandler()); - SetEventHandler(handler); -} - -wxEvtHandler *wxWindow::PopEventHandler(bool deleteHandler) -{ - if ( GetEventHandler() ) - { - wxEvtHandler *handlerA = GetEventHandler(); - wxEvtHandler *handlerB = handlerA->GetNextHandler(); - handlerA->SetNextHandler((wxEvtHandler *) NULL); - SetEventHandler(handlerB); - if ( deleteHandler ) - { - delete handlerA; - return (wxEvtHandler *) NULL; - } - else - return handlerA; - } - else - return (wxEvtHandler *) NULL; -} - -wxValidator *wxWindow::GetValidator(void) -{ - return m_windowValidator; -} - -void wxWindow::SetValidator( const wxValidator& validator ) -{ - if (m_windowValidator) delete m_windowValidator; - m_windowValidator = validator.Clone(); - if (m_windowValidator) m_windowValidator->SetWindow(this); -} - -bool wxWindow::IsBeingDeleted(void) -{ - return FALSE; -} - -void wxWindow::SetId( wxWindowID id ) -{ - m_windowId = id; -} - -wxWindowID wxWindow::GetId(void) -{ - return m_windowId; -} - -void wxWindow::SetCursor( const wxCursor &cursor ) -{ - wxASSERT(m_cursor != NULL); - - if (m_cursor != NULL) - if (*m_cursor == cursor) - return; - (*m_cursor) = cursor; - if (m_widget->window) - gdk_window_set_cursor( m_widget->window, m_cursor->GetCursor() ); - if (m_wxwindow && m_wxwindow->window) - gdk_window_set_cursor( m_wxwindow->window, m_cursor->GetCursor() ); -} - -void wxWindow::Refresh( bool eraseBackground, const wxRect *rect ) -{ - if (eraseBackground && m_wxwindow && m_wxwindow->window) - { - if (rect) - gdk_window_clear_area( m_wxwindow->window, - rect->x, - rect->y, - rect->width, - rect->height ); - else - Clear(); - } - if (!rect) - { - if (m_wxwindow) - { - int w = 0; - int h = 0; - GetClientSize( &w, &h ); - - GdkRectangle gdk_rect; - gdk_rect.x = 0; - gdk_rect.y = 0; - gdk_rect.width = w; - gdk_rect.height = h; - gtk_widget_draw( m_wxwindow, &gdk_rect ); - } - } - else - { - GdkRectangle gdk_rect; - gdk_rect.x = rect->x; - gdk_rect.y = rect->y; - gdk_rect.width = rect->width; - gdk_rect.height = rect->height; - - if (m_wxwindow) - gtk_widget_draw( m_wxwindow, &gdk_rect ); - else - gtk_widget_draw( m_widget, &gdk_rect ); - } -} - -wxRegion wxWindow::GetUpdateRegion() const -{ - return m_updateRegion; -} - -bool wxWindow::IsExposed( int x, int y) const -{ - return (m_updateRegion.Contains( x, y ) != wxOutRegion ); -} - -bool wxWindow::IsExposed( int x, int y, int w, int h ) const -{ - return (m_updateRegion.Contains( x, y, w, h ) != wxOutRegion ); -} - -bool wxWindow::IsExposed( const wxPoint& pt ) const -{ - return (m_updateRegion.Contains( pt.x, pt.y ) != wxOutRegion ); -} - -bool wxWindow::IsExposed( const wxRect& rect ) const -{ - return (m_updateRegion.Contains( rect.x, rect.y, rect.width, rect.height ) != wxOutRegion ); -} - -void wxWindow::Clear(void) -{ - if (m_wxwindow && m_wxwindow->window) gdk_window_clear( m_wxwindow->window ); -} - -wxColour wxWindow::GetBackgroundColour(void) const -{ - return m_backgroundColour; -} - -void wxWindow::SetBackgroundColour( const wxColour &colour ) -{ - m_backgroundColour = colour; - if (m_wxwindow) - { - m_backgroundColour.CalcPixel( m_wxwindow->style->colormap ); - gdk_window_set_background( m_wxwindow->window, m_backgroundColour.GetColor() ); - gdk_window_clear( m_wxwindow->window ); - } - // do something ? -} - -wxColour wxWindow::GetForegroundColour(void) const -{ - return m_foregroundColour; -} - -void wxWindow::SetForegroundColour( const wxColour &colour ) -{ - m_foregroundColour = colour; -} - -bool wxWindow::Validate(void) -{ - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow *)node->Data(); - if (child->GetValidator() && /* child->GetValidator()->Ok() && */ !child->GetValidator()->Validate(this)) - { return FALSE; } - node = node->Next(); - } - return TRUE; -} - -bool wxWindow::TransferDataToWindow(void) -{ - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow *)node->Data(); - if (child->GetValidator() && /* child->GetValidator()->Ok() && */ - !child->GetValidator()->TransferToWindow() ) - { - wxMessageBox( _("Application Error"), _("Could not transfer data to window"), wxOK|wxICON_EXCLAMATION ); - return FALSE; - } - node = node->Next(); - } - return TRUE; -} - -bool wxWindow::TransferDataFromWindow(void) -{ - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow *)node->Data(); - if ( child->GetValidator() && /* child->GetValidator()->Ok() && */ !child->GetValidator()->TransferFromWindow() ) - { return FALSE; } - node = node->Next(); - } - return TRUE; -} - -void wxWindow::SetAcceleratorTable( const wxAcceleratorTable& accel ) -{ - m_acceleratorTable = accel; -} - -void wxWindow::OnInitDialog( wxInitDialogEvent &WXUNUSED(event) ) -{ - TransferDataToWindow(); -} - -void wxWindow::InitDialog(void) -{ - wxInitDialogEvent event(GetId()); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); -} - -static void SetInvokingWindow( wxMenu *menu, wxWindow *win ) -{ - menu->SetInvokingWindow( win ); - wxNode *node = menu->m_items.First(); - while (node) - { - wxMenuItem *menuitem = (wxMenuItem*)node->Data(); - if (menuitem->IsSubMenu()) - SetInvokingWindow( menuitem->GetSubMenu(), win ); - node = node->Next(); - } -} - -bool wxWindow::PopupMenu( wxMenu *menu, int WXUNUSED(x), int WXUNUSED(y) ) -{ - SetInvokingWindow( menu, this ); - gtk_menu_popup( GTK_MENU(menu->m_menu), (GtkWidget *) NULL, (GtkWidget *) NULL, (GtkMenuPositionFunc) NULL, NULL, 0, 0 ); - return TRUE; -} - -void wxWindow::SetDropTarget( wxDropTarget *dropTarget ) -{ - GtkWidget *dnd_widget = GetConnectWidget(); - - if (m_pDropTarget) - { - gtk_signal_disconnect_by_func( GTK_OBJECT(dnd_widget), - GTK_SIGNAL_FUNC(gtk_window_drop_callback), (gpointer)this ); - - m_pDropTarget->UnregisterWidget( dnd_widget ); - delete m_pDropTarget; - } - m_pDropTarget = dropTarget; - if (m_pDropTarget) - { - m_pDropTarget->RegisterWidget( dnd_widget ); - - gtk_signal_connect( GTK_OBJECT(dnd_widget), "drop_data_available_event", - GTK_SIGNAL_FUNC(gtk_window_drop_callback), (gpointer)this ); - } -} - -wxDropTarget *wxWindow::GetDropTarget() const -{ - return m_pDropTarget; -} - -GtkWidget* wxWindow::GetConnectWidget(void) -{ - GtkWidget *connect_widget = m_widget; - if (m_wxwindow) connect_widget = m_wxwindow; - - return connect_widget; -} - -bool wxWindow::IsOwnGtkWindow( GdkWindow *window ) -{ - if (m_wxwindow) return (window == m_wxwindow->window); - return (window == m_widget->window); -} - -void wxWindow::SetFont( const wxFont &font ) -{ - m_font = font; -/* - create new style - copy old style values to new one - set font in new style - -> takes to many resources - - GtkStyle *style = gtk_style_new(); - ... -*/ -} - -wxFont *wxWindow::GetFont(void) -{ - return &m_font; -} - -void wxWindow::SetWindowStyleFlag( long flag ) -{ - m_windowStyle = flag; -} - -long wxWindow::GetWindowStyleFlag(void) const -{ - return m_windowStyle; -} - -void wxWindow::CaptureMouse(void) -{ - GtkWidget *connect_widget = GetConnectWidget(); - gtk_grab_add( connect_widget ); - gdk_pointer_grab ( connect_widget->window, FALSE, - (GdkEventMask) - (GDK_BUTTON_PRESS_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_POINTER_MOTION_MASK), - (GdkWindow *) NULL, (GdkCursor *) NULL, GDK_CURRENT_TIME ); -} - -void wxWindow::ReleaseMouse(void) -{ - GtkWidget *connect_widget = GetConnectWidget(); - gtk_grab_remove( connect_widget ); - gdk_pointer_ungrab ( GDK_CURRENT_TIME ); -} - -void wxWindow::SetTitle( const wxString &WXUNUSED(title) ) -{ -} - -wxString wxWindow::GetTitle(void) const -{ - return (wxString&)m_windowName; -} - -wxString wxWindow::GetLabel(void) const -{ - return GetTitle(); -} - -void wxWindow::SetName( const wxString &name ) -{ - m_windowName = name; -} - -wxString wxWindow::GetName(void) const -{ - return (wxString&)m_windowName; -} - -bool wxWindow::IsShown(void) const -{ - return m_isShown; -} - -bool wxWindow::IsRetained(void) -{ - return FALSE; -} - -wxWindow *wxWindow::FindWindow( long id ) -{ - if (id == m_windowId) return this; - wxNode *node = m_children.First(); - while (node) - { - wxWindow *child = (wxWindow*)node->Data(); - wxWindow *res = child->FindWindow( id ); - if (res) return res; - node = node->Next(); - } - return (wxWindow *) NULL; -} - -wxWindow *wxWindow::FindWindow( const wxString& name ) -{ - if (name == m_windowName) return this; - wxNode *node = m_children.First(); - while (node) - { - wxWindow *child = (wxWindow*)node->Data(); - wxWindow *res = child->FindWindow( name ); - if (res) return res; - node = node->Next(); - } - return (wxWindow *) NULL; -} - -void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible, - int range, bool WXUNUSED(refresh) ) -{ - if (!m_wxwindow) return; - - if (orient == wxHORIZONTAL) - { - float fpos = (float)pos; - m_oldHorizontalPos = fpos; - float frange = (float)range; - float fthumb = (float)thumbVisible; - - if ((fabs(fpos-m_hAdjust->value) < 0.2) && - (fabs(frange-m_hAdjust->upper) < 0.2) && - (fabs(fthumb-m_hAdjust->page_size) < 0.2)) - return; - - m_hAdjust->lower = 0.0; - m_hAdjust->upper = frange; - m_hAdjust->value = fpos; - m_hAdjust->step_increment = 1.0; - m_hAdjust->page_increment = (float)(wxMax(fthumb-2,0)); - m_hAdjust->page_size = fthumb; - } - else - { - float fpos = (float)pos; - m_oldVerticalPos = fpos; - float frange = (float)range; - float fthumb = (float)thumbVisible; - - if ((fabs(fpos-m_vAdjust->value) < 0.2) && - (fabs(frange-m_vAdjust->upper) < 0.2) && - (fabs(fthumb-m_vAdjust->page_size) < 0.2)) - return; - - m_vAdjust->lower = 0.0; - m_vAdjust->upper = frange; - m_vAdjust->value = fpos; - m_vAdjust->step_increment = 1.0; - m_vAdjust->page_increment = (float)(wxMax(fthumb-2,0)); - m_vAdjust->page_size = fthumb; - } - - if (m_wxwindow->window) - { - if (orient == wxHORIZONTAL) - gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "changed" ); - else - gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "changed" ); - - gtk_widget_set_usize( m_widget, m_width, m_height ); - } -} - -void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) ) -{ - if (!m_wxwindow) return; - - if (orient == wxHORIZONTAL) - { - float fpos = (float)pos; - m_oldHorizontalPos = fpos; - - if (fabs(fpos-m_hAdjust->value) < 0.2) return; - m_hAdjust->value = fpos; - } - else - { - float fpos = (float)pos; - m_oldVerticalPos = fpos; - if (fabs(fpos-m_vAdjust->value) < 0.2) return; - m_vAdjust->value = fpos; - } - - if (m_wxwindow->window) - { - if (orient == wxHORIZONTAL) - gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "value_changed" ); - else - gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "value_changed" ); - } -} - -int wxWindow::GetScrollThumb( int orient ) const -{ - if (!m_wxwindow) return 0; - - if (orient == wxHORIZONTAL) - return (int)(m_hAdjust->page_size+0.5); - else - return (int)(m_vAdjust->page_size+0.5); -} - -int wxWindow::GetScrollPos( int orient ) const -{ - if (!m_wxwindow) return 0; - - if (orient == wxHORIZONTAL) - return (int)(m_hAdjust->value+0.5); - else - return (int)(m_vAdjust->value+0.5); -} - -int wxWindow::GetScrollRange( int orient ) const -{ - if (!m_wxwindow) return 0; - - if (orient == wxHORIZONTAL) - return (int)(m_hAdjust->upper+0.5); - else - return (int)(m_vAdjust->upper+0.5); -} - -void wxWindow::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) ) -{ - if (!m_wxwindow) return; - -/* - bool refresh = FALSE; - - if ((m_drawingOffsetX == 0) && (m_drawingOffsetY == 0)) - { - m_drawingOffsetX = -16000; - m_drawingOffsetY = -16000; - refresh = TRUE; - } - else - { - m_drawingOffsetX += dx; - m_drawingOffsetY += dy; - } - -// printf( "X: %d Y: %d \n", (int)m_drawingOffsetX, (int)m_drawingOffsetY ); - - gtk_myfixed_set_offset( GTK_MYFIXED(m_wxwindow), m_drawingOffsetX, m_drawingOffsetY ); - - if (refresh) Refresh(); - - The code here is very nifty, but it doesn't work with - overlapping windows... -*/ - - int cw = 0; - int ch = 0; - GetClientSize( &cw, &ch ); - - int w = cw - abs(dx); - int h = ch - abs(dy); - if ((h < 0) || (w < 0)) - { - Refresh(); - return; - } - int s_x = 0; - int s_y = 0; - if (dx < 0) s_x = -dx; - if (dy < 0) s_y = -dy; - int d_x = 0; - int d_y = 0; - if (dx > 0) d_x = dx; - if (dy > 0) d_y = dy; - gdk_window_copy_area( m_wxwindow->window, m_wxwindow->style->fg_gc[0], d_x, d_y, - m_wxwindow->window, s_x, s_y, w, h ); - - wxRect rect; - if (dx < 0) rect.x = cw+dx; else rect.x = 0; - if (dy < 0) rect.y = ch+dy; else rect.y = 0; - if (dy != 0) rect.width = cw; else rect.width = abs(dx); - if (dx != 0) rect.height = ch; else rect.height = abs(dy); - - Refresh( TRUE, &rect ); -} - -//------------------------------------------------------------------------------------- -// Layout -//------------------------------------------------------------------------------------- - -wxLayoutConstraints *wxWindow::GetConstraints(void) const -{ - return m_constraints; -} - -void wxWindow::SetConstraints( wxLayoutConstraints *constraints ) -{ - if (m_constraints) - { - UnsetConstraints(m_constraints); - delete m_constraints; - } - m_constraints = constraints; - if (m_constraints) - { - // Make sure other windows know they're part of a 'meaningful relationship' - if (m_constraints->left.GetOtherWindow() && (m_constraints->left.GetOtherWindow() != this)) - m_constraints->left.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->top.GetOtherWindow() && (m_constraints->top.GetOtherWindow() != this)) - m_constraints->top.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->right.GetOtherWindow() && (m_constraints->right.GetOtherWindow() != this)) - m_constraints->right.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->bottom.GetOtherWindow() && (m_constraints->bottom.GetOtherWindow() != this)) - m_constraints->bottom.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->width.GetOtherWindow() && (m_constraints->width.GetOtherWindow() != this)) - m_constraints->width.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->height.GetOtherWindow() && (m_constraints->height.GetOtherWindow() != this)) - m_constraints->height.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->centreX.GetOtherWindow() && (m_constraints->centreX.GetOtherWindow() != this)) - m_constraints->centreX.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->centreY.GetOtherWindow() && (m_constraints->centreY.GetOtherWindow() != this)) - m_constraints->centreY.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - } -; -} -; - -void wxWindow::SetAutoLayout( bool autoLayout ) -{ - m_autoLayout = autoLayout; -} - -bool wxWindow::GetAutoLayout(void) const -{ - return m_autoLayout; -} - -wxSizer *wxWindow::GetSizer(void) const -{ - return m_windowSizer; -} - -void wxWindow::SetSizerParent( wxWindow *win ) -{ - m_sizerParent = win; -} - -wxWindow *wxWindow::GetSizerParent(void) const -{ - return m_sizerParent; -} - -// This removes any dangling pointers to this window -// in other windows' constraintsInvolvedIn lists. -void wxWindow::UnsetConstraints(wxLayoutConstraints *c) -{ - if (c) - { - if (c->left.GetOtherWindow() && (c->top.GetOtherWindow() != this)) - c->left.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->top.GetOtherWindow() && (c->top.GetOtherWindow() != this)) - c->top.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->right.GetOtherWindow() && (c->right.GetOtherWindow() != this)) - c->right.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->bottom.GetOtherWindow() && (c->bottom.GetOtherWindow() != this)) - c->bottom.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->width.GetOtherWindow() && (c->width.GetOtherWindow() != this)) - c->width.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->height.GetOtherWindow() && (c->height.GetOtherWindow() != this)) - c->height.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->centreX.GetOtherWindow() && (c->centreX.GetOtherWindow() != this)) - c->centreX.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->centreY.GetOtherWindow() && (c->centreY.GetOtherWindow() != this)) - c->centreY.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - } -} - -// Back-pointer to other windows we're involved with, so if we delete -// this window, we must delete any constraints we're involved with. -void wxWindow::AddConstraintReference(wxWindow *otherWin) -{ - if (!m_constraintsInvolvedIn) - m_constraintsInvolvedIn = new wxList; - if (!m_constraintsInvolvedIn->Member(otherWin)) - m_constraintsInvolvedIn->Append(otherWin); -} - -// REMOVE back-pointer to other windows we're involved with. -void wxWindow::RemoveConstraintReference(wxWindow *otherWin) -{ - if (m_constraintsInvolvedIn) - m_constraintsInvolvedIn->DeleteObject(otherWin); -} - -// Reset any constraints that mention this window -void wxWindow::DeleteRelatedConstraints(void) -{ - if (m_constraintsInvolvedIn) - { - wxNode *node = m_constraintsInvolvedIn->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - wxNode *next = node->Next(); - wxLayoutConstraints *constr = win->GetConstraints(); - - // Reset any constraints involving this window - if (constr) - { - constr->left.ResetIfWin((wxWindow *)this); - constr->top.ResetIfWin((wxWindow *)this); - constr->right.ResetIfWin((wxWindow *)this); - constr->bottom.ResetIfWin((wxWindow *)this); - constr->width.ResetIfWin((wxWindow *)this); - constr->height.ResetIfWin((wxWindow *)this); - constr->centreX.ResetIfWin((wxWindow *)this); - constr->centreY.ResetIfWin((wxWindow *)this); - } - delete node; - node = next; - } - delete m_constraintsInvolvedIn; - m_constraintsInvolvedIn = (wxList *) NULL; - } -} - -void wxWindow::SetSizer(wxSizer *sizer) -{ - m_windowSizer = sizer; - if (sizer) - sizer->SetSizerParent((wxWindow *)this); -} - -/* - * New version - */ - -bool wxWindow::Layout(void) -{ - if (GetConstraints()) - { - int w, h; - GetClientSize(&w, &h); - GetConstraints()->width.SetValue(w); - GetConstraints()->height.SetValue(h); - } - - // If top level (one sizer), evaluate the sizer's constraints. - if (GetSizer()) - { - int noChanges; - GetSizer()->ResetConstraints(); // Mark all constraints as unevaluated - GetSizer()->LayoutPhase1(&noChanges); - GetSizer()->LayoutPhase2(&noChanges); - GetSizer()->SetConstraintSizes(); // Recursively set the real window sizes - return TRUE; - } - else - { - // Otherwise, evaluate child constraints - ResetConstraints(); // Mark all constraints as unevaluated - DoPhase(1); // Just one phase need if no sizers involved - DoPhase(2); - SetConstraintSizes(); // Recursively set the real window sizes - } - return TRUE; -} - - -// Do a phase of evaluating constraints: -// the default behaviour. wxSizers may do a similar -// thing, but also impose their own 'constraints' -// and order the evaluation differently. -bool wxWindow::LayoutPhase1(int *noChanges) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - return constr->SatisfyConstraints((wxWindow *)this, noChanges); - } - else - return TRUE; -} - -bool wxWindow::LayoutPhase2(int *noChanges) -{ - *noChanges = 0; - - // Layout children - DoPhase(1); - DoPhase(2); - return TRUE; -} - -// Do a phase of evaluating child constraints -bool wxWindow::DoPhase(int phase) -{ - int noIterations = 0; - int maxIterations = 500; - int noChanges = 1; - int noFailures = 0; - wxList succeeded; - while ((noChanges > 0) && (noIterations < maxIterations)) - { - noChanges = 0; - noFailures = 0; - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow *)node->Data(); - if (!child->IsKindOf(CLASSINFO(wxFrame)) && !child->IsKindOf(CLASSINFO(wxDialog))) - { - wxLayoutConstraints *constr = child->GetConstraints(); - if (constr) - { - if (succeeded.Member(child)) - { - } - else - { - int tempNoChanges = 0; - bool success = ( (phase == 1) ? child->LayoutPhase1(&tempNoChanges) : child->LayoutPhase2(&tempNoChanges) ) ; - noChanges += tempNoChanges; - if (success) - { - succeeded.Append(child); - } - } - } - } - node = node->Next(); - } - noIterations ++; - } - return TRUE; -} - -void wxWindow::ResetConstraints(void) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - constr->left.SetDone(FALSE); - constr->top.SetDone(FALSE); - constr->right.SetDone(FALSE); - constr->bottom.SetDone(FALSE); - constr->width.SetDone(FALSE); - constr->height.SetDone(FALSE); - constr->centreX.SetDone(FALSE); - constr->centreY.SetDone(FALSE); - } - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (!win->IsKindOf(CLASSINFO(wxFrame)) && !win->IsKindOf(CLASSINFO(wxDialog))) - win->ResetConstraints(); - node = node->Next(); - } -} - -// Need to distinguish between setting the 'fake' size for -// windows and sizers, and setting the real values. -void wxWindow::SetConstraintSizes(bool recurse) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr && constr->left.GetDone() && constr->right.GetDone() && - constr->width.GetDone() && constr->height.GetDone()) - { - int x = constr->left.GetValue(); - int y = constr->top.GetValue(); - int w = constr->width.GetValue(); - int h = constr->height.GetValue(); - - // If we don't want to resize this window, just move it... - if ((constr->width.GetRelationship() != wxAsIs) || - (constr->height.GetRelationship() != wxAsIs)) - { - // Calls Layout() recursively. AAAGH. How can we stop that. - // Simply take Layout() out of non-top level OnSizes. - SizerSetSize(x, y, w, h); - } - else - { - SizerMove(x, y); - } - } - else if (constr) - { - char *windowClass = this->GetClassInfo()->GetClassName(); - - wxString winName; - if (GetName() == "") - winName = _("unnamed"); - else - winName = GetName(); - wxDebugMsg(_("Constraint(s) not satisfied for window of type %s, name %s:\n"), (const char *)windowClass, (const char *)winName); - if (!constr->left.GetDone()) - wxDebugMsg(_(" unsatisfied 'left' constraint.\n")); - if (!constr->right.GetDone()) - wxDebugMsg(_(" unsatisfied 'right' constraint.\n")); - if (!constr->width.GetDone()) - wxDebugMsg(_(" unsatisfied 'width' constraint.\n")); - if (!constr->height.GetDone()) - wxDebugMsg(_(" unsatisfied 'height' constraint.\n")); - wxDebugMsg(_("Please check constraints: try adding AsIs() constraints.\n")); - } - - if (recurse) - { - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (!win->IsKindOf(CLASSINFO(wxFrame)) && !win->IsKindOf(CLASSINFO(wxDialog))) - win->SetConstraintSizes(); - node = node->Next(); - } - } -} - -// This assumes that all sizers are 'on' the same -// window, i.e. the parent of this window. -void wxWindow::TransformSizerToActual(int *x, int *y) const -{ - if (!m_sizerParent || m_sizerParent->IsKindOf(CLASSINFO(wxDialog)) || - m_sizerParent->IsKindOf(CLASSINFO(wxFrame)) ) - return; - - int xp, yp; - m_sizerParent->GetPosition(&xp, &yp); - m_sizerParent->TransformSizerToActual(&xp, &yp); - *x += xp; - *y += yp; -} - -void wxWindow::SizerSetSize(int x, int y, int w, int h) -{ - int xx = x; - int yy = y; - TransformSizerToActual(&xx, &yy); - SetSize(xx, yy, w, h); -} - -void wxWindow::SizerMove(int x, int y) -{ - int xx = x; - int yy = y; - TransformSizerToActual(&xx, &yy); - Move(xx, yy); -} - -// Only set the size/position of the constraint (if any) -void wxWindow::SetSizeConstraint(int x, int y, int w, int h) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - if (x != -1) - { - constr->left.SetValue(x); - constr->left.SetDone(TRUE); - } - if (y != -1) - { - constr->top.SetValue(y); - constr->top.SetDone(TRUE); - } - if (w != -1) - { - constr->width.SetValue(w); - constr->width.SetDone(TRUE); - } - if (h != -1) - { - constr->height.SetValue(h); - constr->height.SetDone(TRUE); - } - } -} - -void wxWindow::MoveConstraint(int x, int y) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - if (x != -1) - { - constr->left.SetValue(x); - constr->left.SetDone(TRUE); - } - if (y != -1) - { - constr->top.SetValue(y); - constr->top.SetDone(TRUE); - } - } -} - -void wxWindow::GetSizeConstraint(int *w, int *h) const -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - *w = constr->width.GetValue(); - *h = constr->height.GetValue(); - } - else - GetSize(w, h); -} - -void wxWindow::GetClientSizeConstraint(int *w, int *h) const -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - *w = constr->width.GetValue(); - *h = constr->height.GetValue(); - } - else - GetClientSize(w, h); -} - -void wxWindow::GetPositionConstraint(int *x, int *y) const -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - *x = constr->left.GetValue(); - *y = constr->top.GetValue(); - } - else - GetPosition(x, y); -} - -bool wxWindow::AcceptsFocus() const -{ - return IsEnabled() && IsShown(); -} - -void wxWindow::OnIdle(wxIdleEvent& WXUNUSED(event) ) -{ - UpdateWindowUI(); -} diff --git a/src/gtk1/accel.cpp b/src/gtk1/accel.cpp deleted file mode 100644 index 08b5436b34..0000000000 --- a/src/gtk1/accel.cpp +++ /dev/null @@ -1,80 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: accel.cpp -// Purpose: -// Author: Robert Roebling -// Id: -// Copyright: (c) 1998 Robert Roebling -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "accel.h" -#endif - -#include "wx/accel.h" - -//----------------------------------------------------------------------------- -// wxAcceleratorTable -//----------------------------------------------------------------------------- - -class wxAccelRefData: public wxObjectRefData -{ - public: - - wxAccelRefData(void); - - wxList m_accels; -}; - -wxAccelRefData::wxAccelRefData(void) -{ - m_accels.DeleteContents( TRUE ); -} - -//----------------------------------------------------------------------------- - -#define M_ACCELDATA ((wxAccelRefData *)m_refData) - -IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable,wxObject) - -wxAcceleratorTable::wxAcceleratorTable() -{ - m_refData = new wxAccelRefData(); -} - -wxAcceleratorTable::wxAcceleratorTable( int n, wxAcceleratorEntry entries[] ) -{ - m_refData = new wxAccelRefData(); - for (int i = 0; i < n; i++) - { - M_ACCELDATA->m_accels.Append( (wxObject*) - new wxAcceleratorEntry( entries[n].GetFlags(), entries[n].GetKeyCode(), entries[n].GetCommand() ) ); - } -} - -wxAcceleratorTable::~wxAcceleratorTable() -{ -} - -bool wxAcceleratorTable::Ok() const -{ - return (m_refData != NULL); -} - -int wxAcceleratorTable::GetCommand( wxKeyEvent &event ) -{ - wxNode *node = M_ACCELDATA->m_accels.First(); - while (node) - { - wxAcceleratorEntry *entry = (wxAcceleratorEntry*)node->Data(); - if ((event.m_keyCode == entry->GetKeyCode()) && - (((entry->GetFlags() & wxACCEL_CTRL) == 0) || event.ControlDown()) && - (((entry->GetFlags() & wxACCEL_SHIFT) == 0) || event.ShiftDown()) && - (((entry->GetFlags() & wxACCEL_ALT) == 0) || event.AltDown() || event.MetaDown())) - return entry->GetCommand(); - node = node->Next(); - } - - return -1; -} - diff --git a/src/gtk1/app.cpp b/src/gtk1/app.cpp deleted file mode 100644 index dbe4a42999..0000000000 --- a/src/gtk1/app.cpp +++ /dev/null @@ -1,418 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: app.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "app.h" -#endif - -#include "wx/app.h" -#include "wx/gdicmn.h" -#include "wx/utils.h" -#include "wx/postscrp.h" -#include "wx/intl.h" -#include "wx/log.h" -#include "wx/memory.h" -#include "wx/font.h" -#include "wx/settings.h" -#include "wx/resource.h" - -#include "unistd.h" - -#ifdef USE_GDK_IMLIB -#include "../gdk_imlib/gdk_imlib.h" -#endif - -//----------------------------------------------------------------------------- -// global data -//----------------------------------------------------------------------------- - -wxApp *wxTheApp = (wxApp *) NULL; -wxAppInitializerFunction wxApp::m_appInitFn = (wxAppInitializerFunction) NULL; - -extern wxList wxPendingDelete; -extern wxResourceCache *wxTheResourceCache; - -//----------------------------------------------------------------------------- -// local functions -//----------------------------------------------------------------------------- - -extern void wxFlushResources(void); - -//----------------------------------------------------------------------------- -// global functions -//----------------------------------------------------------------------------- - -void wxExit(void) -{ - gtk_main_quit(); -} - -bool wxYield(void) -{ - while (gtk_events_pending() > 0) gtk_main_iteration(); - return TRUE; -} - -//----------------------------------------------------------------------------- -// wxApp -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxApp,wxEvtHandler) - -BEGIN_EVENT_TABLE(wxApp, wxEvtHandler) - EVT_IDLE(wxApp::OnIdle) -END_EVENT_TABLE() - -gint wxapp_idle_callback( gpointer WXUNUSED(data) ) -{ - if (wxTheApp) while (wxTheApp->ProcessIdle()) {} - usleep( 10000 ); - return TRUE; -} - -wxApp::wxApp() -{ - m_idleTag = 0; - m_topWindow = (wxWindow *) NULL; - m_exitOnFrameDelete = TRUE; - wxTheApp = this; -} - -wxApp::~wxApp(void) -{ - gtk_idle_remove( m_idleTag ); -} - -bool wxApp::OnInit(void) -{ - return TRUE; -} - -bool wxApp::OnInitGui(void) -{ - m_idleTag = gtk_idle_add( wxapp_idle_callback, NULL ); - return TRUE; -} - -int wxApp::OnRun(void) -{ - return MainLoop(); -} - -bool wxApp::ProcessIdle(void) -{ - wxIdleEvent event; - event.SetEventObject( this ); - ProcessEvent( event ); - - return event.MoreRequested(); -} - -void wxApp::OnIdle( wxIdleEvent &event ) -{ - static bool inOnIdle = FALSE; - - // Avoid recursion (via ProcessEvent default case) - if (inOnIdle) - return; - - inOnIdle = TRUE; - - // 'Garbage' collection of windows deleted with Close(). - DeletePendingObjects(); - - // flush the logged messages if any - wxLog *pLog = wxLog::GetActiveTarget(); - if ( pLog != NULL && pLog->HasPendingMessages() ) - pLog->Flush(); - - // Send OnIdle events to all windows - bool needMore = SendIdleEvents(); - - if (needMore) - event.RequestMore(TRUE); - - inOnIdle = FALSE; -} - -bool wxApp::SendIdleEvents(void) -{ - bool needMore = FALSE; - wxNode* node = wxTopLevelWindows.First(); - while (node) - { - wxWindow* win = (wxWindow*) node->Data(); - if (SendIdleEvents(win)) - needMore = TRUE; - - node = node->Next(); - } - return needMore; -} - -bool wxApp::SendIdleEvents( wxWindow* win ) -{ - bool needMore = FALSE; - - wxIdleEvent event; - event.SetEventObject(win); - win->ProcessEvent(event); - - if (event.MoreRequested()) - needMore = TRUE; - - wxNode* node = win->GetChildren()->First(); - while (node) - { - wxWindow* win = (wxWindow*) node->Data(); - if (SendIdleEvents(win)) - needMore = TRUE; - - node = node->Next(); - } - return needMore ; -} - -int wxApp::OnExit(void) -{ - return 0; -} - -int wxApp::MainLoop(void) -{ - gtk_main(); - return 0; -} - -void wxApp::ExitMainLoop(void) -{ - gtk_main_quit(); -} - -bool wxApp::Initialized(void) -{ - return m_initialized; -} - -bool wxApp::Pending(void) -{ - return FALSE; -} - -void wxApp::Dispatch(void) -{ -} - -void wxApp::DeletePendingObjects(void) -{ - wxNode *node = wxPendingDelete.First(); - while (node) - { - wxObject *obj = (wxObject *)node->Data(); - - delete obj; - - if (wxPendingDelete.Member(obj)) - delete node; - - node = wxPendingDelete.First(); - } -} - -wxWindow *wxApp::GetTopWindow(void) -{ - if (m_topWindow) return m_topWindow; - wxNode *node = wxTopLevelWindows.First(); - if (!node) return (wxWindow *) NULL; - return (wxWindow*)node->Data(); -} - -void wxApp::SetTopWindow( wxWindow *win ) -{ - m_topWindow = win; -} - -void wxApp::CommonInit(void) -{ - -/* -#if USE_RESOURCES - (void) wxGetResource("wxWindows", "OsVersion", &wxOsVersion); -#endif -*/ - wxSystemSettings::Init(); - wxTheResourceCache = new wxResourceCache(wxKEY_STRING); - - wxTheFontNameDirectory = new wxFontNameDirectory; - wxTheFontNameDirectory->Initialize(); - - wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING); - wxTheColourDatabase->Initialize(); - - wxInitializeStockLists(); - wxInitializeStockObjects(); - - wxInitializeResourceSystem(); - - // For PostScript printing -#if USE_POSTSCRIPT - wxInitializePrintSetupData(); - wxThePrintPaperDatabase = new wxPrintPaperDatabase; - wxThePrintPaperDatabase->CreateDatabase(); -#endif - - -/* - wxBitmap::InitStandardHandlers(); - - g_globalCursor = new wxCursor; -*/ -} - -void wxApp::CommonCleanUp(void) -{ - wxDELETE(wxTheColourDatabase); - wxDELETE(wxThePrintPaperDatabase); - wxDELETE(wxThePrintSetupData); - wxDELETE(wxTheFontNameDirectory); - wxDeleteStockObjects(); - - wxFlushResources(); - - wxDELETE(wxTheResourceCache); - - wxDeleteStockLists(); - - wxCleanUpResourceSystem(); - - wxSystemSettings::Done(); -} - -wxLog *wxApp::CreateLogTarget() -{ - return new wxLogGui; -} - -//----------------------------------------------------------------------------- -// wxEntry -//----------------------------------------------------------------------------- - -int wxEntry( int argc, char *argv[] ) -{ - wxBuffer = new char[BUFSIZ + 512]; - - wxClassInfo::InitializeClasses(); - -#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT - -#if !defined(_WINDLL) - streambuf* sBuf = new wxDebugStreamBuf; -#else - streambuf* sBuf = NULL; -#endif - ostream* oStr = new ostream(sBuf) ; - wxDebugContext::SetStream(oStr, sBuf); - -#endif - - if (!wxTheApp) - { - if (!wxApp::GetInitializerFunction()) - { - printf( "wxWindows error: No initializer - use IMPLEMENT_APP macro.\n" ); - return 0; - } - - wxAppInitializerFunction app_ini = wxApp::GetInitializerFunction(); - - wxObject *test_app = app_ini(); - - wxTheApp = (wxApp*) test_app; - } - - if (!wxTheApp) - { - printf( "wxWindows error: wxTheApp == NULL\n" ); - return 0; - } - - wxTheApp->argc = argc; - wxTheApp->argv = argv; - - gtk_set_locale(); - - gtk_init( &argc, &argv ); - -#ifdef USE_GDK_IMLIB - - gdk_imlib_init(); - - gtk_widget_push_visual(gdk_imlib_get_visual()); - - gtk_widget_push_colormap(gdk_imlib_get_colormap()); - -#endif - - wxApp::CommonInit(); - - wxTheApp->OnInitGui(); - - // Here frames insert themselves automatically - // into wxTopLevelWindows by getting created - // in OnInit(). - - if (!wxTheApp->OnInit()) return 0; - - wxTheApp->m_initialized = (wxTopLevelWindows.Number() > 0); - - int retValue = 0; - - if (wxTheApp->Initialized()) retValue = wxTheApp->OnRun(); - - wxTheApp->DeletePendingObjects(); - - wxTheApp->OnExit(); - - wxApp::CommonCleanUp(); - - wxDELETE(wxTheApp); - -#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT - // At this point we want to check if there are any memory - // blocks that aren't part of the wxDebugContext itself, - // as a special case. Then when dumping we need to ignore - // wxDebugContext, too. - if (wxDebugContext::CountObjectsLeft() > 0) - { - wxTrace("There were memory leaks.\n"); - wxDebugContext::Dump(); - wxDebugContext::PrintStatistics(); - } - wxDebugContext::SetStream(NULL, NULL); -#endif - - return retValue; -} - -//----------------------------------------------------------------------------- -// main() -//----------------------------------------------------------------------------- - -#if defined(AIX) || defined(AIX4) || defined(____HPUX__) || defined(NOMAIN) - - // main in IMPLEMENT_WX_MAIN in IMPLEMENT_APP in app.h - -#else - - int main(int argc, char *argv[]) { return wxEntry(argc, argv); } - -#endif - - diff --git a/src/gtk1/bdiag.xbm b/src/gtk1/bdiag.xbm deleted file mode 100644 index 9ff0a1822f..0000000000 --- a/src/gtk1/bdiag.xbm +++ /dev/null @@ -1,6 +0,0 @@ -#define bdiag_width 16 -#define bdiag_height 16 -static char bdiag_bits[] = { - 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x04, - 0x02, 0x02, 0x01, 0x01, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, - 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01}; diff --git a/src/gtk1/bitmap.cpp b/src/gtk1/bitmap.cpp deleted file mode 100644 index b06f111e55..0000000000 --- a/src/gtk1/bitmap.cpp +++ /dev/null @@ -1,400 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bitmap.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "bitmap.h" -#endif - -#include "wx/bitmap.h" -#include "wx/icon.h" -#include "gdk/gdkprivate.h" - -#ifdef USE_GDK_IMLIB -#include "../gdk_imlib/gdk_imlib.h" -#endif - -//----------------------------------------------------------------------------- -// wxMask -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxMask,wxObject) - -wxMask::wxMask(void) -{ - m_bitmap = (GdkBitmap *) NULL; -} - -wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap), const wxColour& WXUNUSED(colour) ) -{ -} - -wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap), int WXUNUSED(paletteIndex) ) -{ -} - -wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap) ) -{ -} - -wxMask::~wxMask(void) -{ -#ifdef USE_GDK_IMLIB - // do not delete the mask, gdk_imlib does it for you -#else - if (m_bitmap) gdk_bitmap_unref( m_bitmap ); -#endif -} - -GdkBitmap *wxMask::GetBitmap(void) const -{ - return m_bitmap; -} - -//----------------------------------------------------------------------------- -// wxBitmap -//----------------------------------------------------------------------------- - -// CMB 20/5/98: added m_bitmap for GdkBitmaps -class wxBitmapRefData: public wxObjectRefData -{ - public: - - wxBitmapRefData(void); - ~wxBitmapRefData(void); - - GdkPixmap *m_pixmap; - GdkBitmap *m_bitmap; - wxMask *m_mask; - int m_width; - int m_height; - int m_bpp; -#ifdef USE_GDK_IMLIB - GdkImlibImage *m_image; -#endif - wxPalette *m_palette; -}; - -wxBitmapRefData::wxBitmapRefData(void) -{ - m_pixmap = (GdkPixmap *) NULL; - m_bitmap = (GdkBitmap *) NULL; - m_mask = (wxMask *) NULL; - m_width = 0; - m_height = 0; - m_bpp = 0; - m_palette = (wxPalette *) NULL; -#ifdef USE_GDK_IMLIB - m_image = (GdkImlibImage *) NULL; -#endif -} - -wxBitmapRefData::~wxBitmapRefData(void) -{ -#ifdef USE_GDK_IMLIB - if (m_pixmap) gdk_imlib_free_pixmap( m_pixmap ); - if (m_image) gdk_imlib_kill_image( m_image ); -#else - if (m_pixmap) gdk_pixmap_unref( m_pixmap ); -#endif - if (m_bitmap) gdk_bitmap_unref( m_bitmap ); - if (m_mask) delete m_mask; - if (m_palette) delete m_palette; -} - -//----------------------------------------------------------------------------- - -#define M_BMPDATA ((wxBitmapRefData *)m_refData) - -IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxGDIObject) - -wxBitmap::wxBitmap(void) -{ - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::wxBitmap( int width, int height, int depth ) -{ - m_refData = new wxBitmapRefData(); - M_BMPDATA->m_mask = (wxMask *) NULL; - M_BMPDATA->m_pixmap = - gdk_pixmap_new( (GdkWindow*) &gdk_root_parent, width, height, depth ); - M_BMPDATA->m_width = width; - M_BMPDATA->m_height = height; - M_BMPDATA->m_bpp = depth; - - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::wxBitmap( char **bits ) -{ - m_refData = new wxBitmapRefData(); - -#ifndef USE_GDK_IMLIB - - GdkBitmap *mask = NULL; - - M_BMPDATA->m_pixmap = - gdk_pixmap_create_from_xpm_d( (GdkWindow*) &gdk_root_parent, &mask, NULL, (gchar **) bits ); - - if (mask) - { - M_BMPDATA->m_mask = new wxMask(); - M_BMPDATA->m_mask->m_bitmap = mask; - } - - gdk_window_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) ); - -#else - - M_BMPDATA->m_image = gdk_imlib_create_image_from_xpm_data( bits ); - Render(); - -#endif - - M_BMPDATA->m_bpp = 24; // ? - - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::wxBitmap( const wxBitmap& bmp ) -{ - Ref( bmp ); - - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::wxBitmap( const wxBitmap* bmp ) -{ - if (bmp) Ref( *bmp ); - - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::wxBitmap( const wxString &filename, int type ) -{ - LoadFile( filename, type ); - - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); -} - -// CMB 15/5/98: add constructor for xbm bitmaps -wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth)) -{ - m_refData = new wxBitmapRefData(); - - M_BMPDATA->m_mask = (wxMask *) NULL; - M_BMPDATA->m_bitmap = - gdk_bitmap_create_from_data( (GdkWindow*) &gdk_root_parent, (gchar *) bits, width, height ); - M_BMPDATA->m_width = width; - M_BMPDATA->m_height = height; - M_BMPDATA->m_bpp = 1; - - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::~wxBitmap(void) -{ - if (wxTheBitmapList) wxTheBitmapList->DeleteObject(this); -} - -wxBitmap& wxBitmap::operator = ( const wxBitmap& bmp ) -{ - if (*this == bmp) return (*this); - Ref( bmp ); - return *this; -} - -bool wxBitmap::operator == ( const wxBitmap& bmp ) -{ - return m_refData == bmp.m_refData; -} - -bool wxBitmap::operator != ( const wxBitmap& bmp ) -{ - return m_refData != bmp.m_refData; -} - -bool wxBitmap::Ok(void) const -{ - return m_refData != NULL; -} - -int wxBitmap::GetHeight(void) const -{ - if (!Ok()) return 0; - return M_BMPDATA->m_height; -} - -int wxBitmap::GetWidth(void) const -{ - if (!Ok()) return 0; - return M_BMPDATA->m_width; -} - -int wxBitmap::GetDepth(void) const -{ - if (!Ok()) return 0; - return M_BMPDATA->m_bpp; -} - -void wxBitmap::SetHeight( int height ) -{ - if (!Ok()) return; - M_BMPDATA->m_height = height; -} - -void wxBitmap::SetWidth( int width ) -{ - if (!Ok()) return; - M_BMPDATA->m_width = width; -} - -void wxBitmap::SetDepth( int depth ) -{ - if (!Ok()) return; - M_BMPDATA->m_bpp = depth; -} - -wxMask *wxBitmap::GetMask(void) const -{ - if (!Ok()) return (wxMask *) NULL; - - return M_BMPDATA->m_mask; -} - -void wxBitmap::SetMask( wxMask *mask ) -{ - if (!Ok()) return; - - if (M_BMPDATA->m_mask) delete M_BMPDATA->m_mask; - M_BMPDATA->m_mask = mask; -} - -void wxBitmap::Resize( int height, int width ) -{ - if (!Ok()) return; - -#ifdef USE_GDK_IMLIB - - if (M_BMPDATA->m_bitmap) return; // not supported for bitmaps - - if (!M_BMPDATA->m_image) RecreateImage(); - - if (M_BMPDATA->m_pixmap) gdk_imlib_free_pixmap( M_BMPDATA->m_pixmap ); - if (M_BMPDATA->m_mask) delete M_BMPDATA->m_mask; - - GdkImlibImage* image = gdk_imlib_clone_scaled_image( M_BMPDATA->m_image, height, width ); - gdk_imlib_destroy_image( M_BMPDATA->m_image ); - M_BMPDATA->m_image = image; - M_BMPDATA->m_height = height; - M_BMPDATA->m_width = width; - - Render(); - -#endif -} - -bool wxBitmap::SaveFile( const wxString &name, int WXUNUSED(type), - wxPalette *WXUNUSED(palette) ) -{ -#ifdef USE_GDK_IMLIB - - if (!Ok()) return FALSE; - - if (!M_BMPDATA->m_image) RecreateImage(); - - return gdk_imlib_save_image( M_BMPDATA->m_image, WXSTRINGCAST name, (GdkImlibSaveInfo *) NULL ); - -#endif - - return FALSE; -} - -bool wxBitmap::LoadFile( const wxString &name, int WXUNUSED(type) ) -{ -#ifdef USE_GDK_IMLIB - - UnRef(); - m_refData = new wxBitmapRefData(); - - M_BMPDATA->m_image = gdk_imlib_load_image( WXSTRINGCAST name ); - - if (!M_BMPDATA->m_image) - { - UnRef(); - return FALSE; - } - - Render(); - - gdk_window_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) ); - M_BMPDATA->m_bpp = 24; // ? - - return TRUE; -#endif - - return FALSE; -} - -wxPalette *wxBitmap::GetPalette(void) const -{ - if (!Ok()) return (wxPalette *) NULL; - return M_BMPDATA->m_palette; -} - -GdkPixmap *wxBitmap::GetPixmap(void) const -{ - if (!Ok()) return (GdkPixmap *) NULL; - return M_BMPDATA->m_pixmap; -} - -GdkBitmap *wxBitmap::GetBitmap(void) const -{ - if (!Ok()) return (GdkBitmap *) NULL; - - return M_BMPDATA->m_bitmap; -} - -void wxBitmap::DestroyImage(void) -{ - if (!Ok()) return; - - if (M_BMPDATA->m_image) - { - gdk_imlib_destroy_image( M_BMPDATA->m_image ); - M_BMPDATA->m_image = (GdkImlibImage *) NULL; - } -} - -void wxBitmap::RecreateImage(void) -{ -} - -void wxBitmap::Render(void) -{ - if (!Ok()) return; - -#ifdef USE_GDK_IMLIB - - gdk_imlib_render( M_BMPDATA->m_image, M_BMPDATA->m_image->rgb_width, M_BMPDATA->m_image->rgb_height ); - M_BMPDATA->m_width = M_BMPDATA->m_image->rgb_width; - M_BMPDATA->m_height = M_BMPDATA->m_image->rgb_height; - M_BMPDATA->m_pixmap = gdk_imlib_move_image( M_BMPDATA->m_image ); - GdkBitmap *mask = gdk_imlib_move_mask( M_BMPDATA->m_image ); - if (mask) - { - M_BMPDATA->m_mask = new wxMask(); - M_BMPDATA->m_mask->m_bitmap = mask; - } - -#endif -} - - diff --git a/src/gtk1/bmpbuttn.cpp b/src/gtk1/bmpbuttn.cpp deleted file mode 100644 index d72416a63c..0000000000 --- a/src/gtk1/bmpbuttn.cpp +++ /dev/null @@ -1,126 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bmpbuttn.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "bmpbuttn.h" -#endif - -#include "wx/bmpbuttn.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxBitmapButton; - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxBitmapButton -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton,wxControl) - -static void gtk_bmpbutton_clicked_callback( GtkWidget *WXUNUSED(widget), wxBitmapButton *button ) -{ - if (!button->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId()); - event.SetEventObject(button); - button->GetEventHandler()->ProcessEvent(event); -} - -//----------------------------------------------------------------------------- - -wxBitmapButton::wxBitmapButton(void) -{ -} - -bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, - const wxPoint &pos, const wxSize &size, - long style, const wxValidator& validator, const wxString &name ) -{ - m_needParent = TRUE; - - wxSize newSize = size; - - PreCreation( parent, id, pos, newSize, style, name ); - - SetValidator( validator ); - - m_bitmap = bitmap; - m_label = ""; - - m_widget = gtk_button_new(); - - if (m_bitmap.Ok()) - { - GdkBitmap *mask = (GdkBitmap *) NULL; - if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); - GtkWidget *pixmap = gtk_pixmap_new( m_bitmap.GetPixmap(), mask ); - - gtk_widget_show( pixmap ); - gtk_container_add( GTK_CONTAINER(m_widget), pixmap ); - } - - if (newSize.x == -1) newSize.x = m_bitmap.GetHeight()+10; - if (newSize.y == -1) newSize.y = m_bitmap.GetWidth()+10; - SetSize( newSize.x, newSize.y ); - - gtk_signal_connect( GTK_OBJECT(m_widget), "clicked", - GTK_SIGNAL_FUNC(gtk_bmpbutton_clicked_callback), (gpointer*)this ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -void wxBitmapButton::SetDefault(void) -{ -/* - GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT ); - gtk_widget_grab_default( m_widget ); -*/ -} - -void wxBitmapButton::SetLabel( const wxString &label ) -{ - wxControl::SetLabel( label ); -} - -wxString wxBitmapButton::GetLabel(void) const -{ - return wxControl::GetLabel(); -} - -void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap ) -{ - m_bitmap = bitmap; - if (!m_bitmap.Ok()) return; - - GtkButton *bin = GTK_BUTTON( m_widget ); - GtkPixmap *g_pixmap = GTK_PIXMAP( bin->child ); - - GdkBitmap *mask = (GdkBitmap *) NULL; - if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); - - gtk_pixmap_set( g_pixmap, m_bitmap.GetPixmap(), mask ); -} - - - - diff --git a/src/gtk1/brush.cpp b/src/gtk1/brush.cpp deleted file mode 100644 index 1229a9516e..0000000000 --- a/src/gtk1/brush.cpp +++ /dev/null @@ -1,132 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: brush.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "brush.h" -#endif - -#include "wx/brush.h" - -//----------------------------------------------------------------------------- -// wxBrush -//----------------------------------------------------------------------------- - -class wxBrushRefData: public wxObjectRefData -{ - public: - - wxBrushRefData(void); - - int m_style; - wxBitmap m_stipple; - wxColour m_colour; -}; - -wxBrushRefData::wxBrushRefData(void) -{ - m_style = 0; -} - -//----------------------------------------------------------------------------- - -#define M_BRUSHDATA ((wxBrushRefData *)m_refData) - -IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject) - -wxBrush::wxBrush(void) -{ - if (wxTheBrushList) wxTheBrushList->AddBrush( this ); -} - -wxBrush::wxBrush( const wxColour &colour, int style ) -{ - m_refData = new wxBrushRefData(); - M_BRUSHDATA->m_style = style; - M_BRUSHDATA->m_colour = colour; - - if (wxTheBrushList) wxTheBrushList->AddBrush( this ); -} - -wxBrush::wxBrush( const wxString &colourName, int style ) -{ - m_refData = new wxBrushRefData(); - M_BRUSHDATA->m_style = style; - M_BRUSHDATA->m_colour = colourName; - - if (wxTheBrushList) wxTheBrushList->AddBrush( this ); -} - -wxBrush::wxBrush( const wxBitmap &stippleBitmap ) -{ - m_refData = new wxBrushRefData(); - M_BRUSHDATA->m_style = wxSTIPPLE; - M_BRUSHDATA->m_colour = *wxBLACK; - M_BRUSHDATA->m_stipple = stippleBitmap; - - if (wxTheBrushList) wxTheBrushList->AddBrush( this ); -} - -wxBrush::wxBrush( const wxBrush &brush ) -{ - Ref( brush ); - - if (wxTheBrushList) wxTheBrushList->AddBrush( this ); -} - -wxBrush::wxBrush( const wxBrush *brush ) -{ - if (brush) Ref( *brush ); - - if (wxTheBrushList) wxTheBrushList->Append( this ); -} - -wxBrush::~wxBrush(void) -{ - if (wxTheBrushList) wxTheBrushList->RemoveBrush( this ); -} - -wxBrush& wxBrush::operator = ( const wxBrush& brush ) -{ - if (*this == brush) return (*this); - Ref( brush ); - return *this; -} - -bool wxBrush::operator == ( const wxBrush& brush ) -{ - return m_refData == brush.m_refData; -} - -bool wxBrush::operator != ( const wxBrush& brush ) -{ - return m_refData != brush.m_refData; -} - -bool wxBrush::Ok(void) const -{ - return ((m_refData) && M_BRUSHDATA->m_colour.Ok()); -} - -int wxBrush::GetStyle(void) const -{ - return M_BRUSHDATA->m_style; -} - -wxColour &wxBrush::GetColour(void) const -{ - return M_BRUSHDATA->m_colour; -} - -wxBitmap *wxBrush::GetStipple(void) const -{ - return &M_BRUSHDATA->m_stipple; -} - - diff --git a/src/gtk1/button.cpp b/src/gtk1/button.cpp deleted file mode 100644 index 066c92a17a..0000000000 --- a/src/gtk1/button.cpp +++ /dev/null @@ -1,103 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: button.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "button.h" -#endif - -#include "wx/button.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxButton; - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxButton -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxButton,wxControl) - -static void gtk_button_clicked_callback( GtkWidget *WXUNUSED(widget), wxButton *button ) -{ - if (!button->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId()); - event.SetEventObject(button); - button->GetEventHandler()->ProcessEvent(event); -} - -//----------------------------------------------------------------------------- - -wxButton::wxButton(void) -{ -} - -bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label, - const wxPoint &pos, const wxSize &size, - long style, const wxValidator& validator, const wxString &name ) -{ - m_needParent = TRUE; - - wxSize newSize = size; - - PreCreation( parent, id, pos, newSize, style, name ); - - SetValidator( validator ); - - m_widget = gtk_button_new_with_label( m_label ); - SetLabel(label); - - if (newSize.x == -1) newSize.x = 15+gdk_string_measure( m_widget->style->font, label ); - if (newSize.y == -1) newSize.y = 26; - SetSize( newSize.x, newSize.y ); - - gtk_signal_connect( GTK_OBJECT(m_widget), "clicked", - GTK_SIGNAL_FUNC(gtk_button_clicked_callback), (gpointer*)this ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -void wxButton::SetDefault(void) -{ -/* - GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT ); - gtk_widget_grab_default( m_widget ); -*/ -} - -void wxButton::SetLabel( const wxString &label ) -{ - wxControl::SetLabel( label ); - GtkButton *bin = GTK_BUTTON( m_widget ); - GtkLabel *g_label = GTK_LABEL( bin->child ); - gtk_label_set( g_label, GetLabel() ); -} - -void wxButton::Enable( bool enable ) -{ - wxControl::Enable( enable ); - GtkButton *bin = GTK_BUTTON( m_widget ); - GtkWidget *label = bin->child; - gtk_widget_set_sensitive( label, enable ); -} - diff --git a/src/gtk1/cdiag.xbm b/src/gtk1/cdiag.xbm deleted file mode 100644 index 15dc7ba86d..0000000000 --- a/src/gtk1/cdiag.xbm +++ /dev/null @@ -1,6 +0,0 @@ -#define cdiag_width 16 -#define cdiag_height 16 -static char cdiag_bits[] = { - 0x81, 0x81, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, 0x18, 0x18, 0x24, 0x24, - 0x42, 0x42, 0x81, 0x81, 0x81, 0x81, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, - 0x18, 0x18, 0x24, 0x24, 0x42, 0x42, 0x81, 0x81}; diff --git a/src/gtk1/checkbox.cpp b/src/gtk1/checkbox.cpp deleted file mode 100644 index 036a1dbcde..0000000000 --- a/src/gtk1/checkbox.cpp +++ /dev/null @@ -1,89 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: checkbox.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "checkbox.h" -#endif - -#include "wx/checkbox.h" - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxCheckBox -//----------------------------------------------------------------------------- - -static void gtk_checkbox_clicked_callback( GtkWidget *WXUNUSED(widget), wxCheckBox *cb ) -{ - if (!cb->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - wxCommandEvent event(wxEVT_COMMAND_CHECKBOX_CLICKED, cb->GetId()); - event.SetInt( cb->GetValue() ); - event.SetEventObject(cb); - cb->GetEventHandler()->ProcessEvent(event); -} - -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxCheckBox,wxControl) - -wxCheckBox::wxCheckBox(void) -{ -} - -bool wxCheckBox::Create( wxWindow *parent, wxWindowID id, const wxString &label, - const wxPoint &pos, const wxSize &size, - long style, const wxValidator& validator, const wxString &name ) -{ - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - SetValidator( validator ); - - SetLabel( label ); - - m_widget = gtk_check_button_new_with_label( m_label ); - - wxSize newSize = size; - if (newSize.x == -1) newSize.x = 25+gdk_string_measure( m_widget->style->font, label ); - if (newSize.y == -1) newSize.y = 26; - SetSize( newSize.x, newSize.y ); - - gtk_signal_connect( GTK_OBJECT(m_widget), "clicked", - GTK_SIGNAL_FUNC(gtk_checkbox_clicked_callback), (gpointer*)this ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -void wxCheckBox::SetValue( bool state ) -{ - if (state) - gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_widget), GTK_STATE_ACTIVE ); - else - gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_widget), GTK_STATE_NORMAL ); -} - -bool wxCheckBox::GetValue(void) const -{ - GtkToggleButton *tb = GTK_TOGGLE_BUTTON(m_widget); - return tb->active; -} - diff --git a/src/gtk1/choice.cpp b/src/gtk1/choice.cpp deleted file mode 100644 index 4fec00cb30..0000000000 --- a/src/gtk1/choice.cpp +++ /dev/null @@ -1,227 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: choice.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "choice.h" -#endif - -#include "wx/choice.h" - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxChoice -//----------------------------------------------------------------------------- - -static void gtk_choice_clicked_callback( GtkWidget *WXUNUSED(widget), wxChoice *choice ) -{ - if (!choice->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, choice->GetId() ); - event.SetInt( choice->GetSelection() ); - wxString tmp( choice->GetStringSelection() ); - event.SetString( WXSTRINGCAST(tmp) ); - event.SetEventObject(choice); - choice->GetEventHandler()->ProcessEvent(event); -} - -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxChoice,wxControl) - -wxChoice::wxChoice(void) -{ -} - -bool wxChoice::Create( wxWindow *parent, wxWindowID id, - const wxPoint &pos, const wxSize &size, - int n, const wxString choices[], - long style, const wxValidator& validator, const wxString &name ) -{ - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - SetValidator( validator ); - - m_widget = gtk_option_menu_new(); - - wxSize newSize = size; - if (newSize.x == -1) newSize.x = 80; - if (newSize.y == -1) newSize.y = 26; - SetSize( newSize.x, newSize.y ); - - GtkWidget *menu; - menu = gtk_menu_new(); - - for (int i = 0; i < n; i++) - { - GtkWidget *item; - item = gtk_menu_item_new_with_label( choices[i] ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", - GTK_SIGNAL_FUNC(gtk_choice_clicked_callback), (gpointer*)this ); - gtk_menu_append( GTK_MENU(menu), item ); - gtk_widget_show( item ); - } - gtk_option_menu_set_menu( GTK_OPTION_MENU(m_widget), menu ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -void wxChoice::Append( const wxString &item ) -{ - GtkWidget *menu = gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ); - GtkWidget *menu_item; - menu_item = gtk_menu_item_new_with_label( item ); - gtk_signal_connect( GTK_OBJECT( menu_item ), "activate", - GTK_SIGNAL_FUNC(gtk_choice_clicked_callback), (gpointer*)this ); - gtk_menu_append( GTK_MENU(menu), menu_item ); - gtk_widget_show( menu_item ); -} - -void wxChoice::Clear(void) -{ - gtk_option_menu_remove_menu( GTK_OPTION_MENU(m_widget) ); - GtkWidget *menu = gtk_menu_new(); - gtk_option_menu_set_menu( GTK_OPTION_MENU(m_widget), menu ); -} - -void wxChoice::Delete( int WXUNUSED(n) ) -{ - wxFAIL_MSG( "wxChoice:Delete not implemented" ); -} - -int wxChoice::FindString( const wxString &string ) const -{ - // If you read this code once and you think you understand - // it, then you are very wrong. Robert Roebling. - - GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) ); - int count = 0; - GList *child = menu_shell->children; - while (child) - { - GtkBin *bin = GTK_BIN( child->data ); - GtkLabel *label = (GtkLabel *) NULL; - if (bin->child) label = GTK_LABEL(bin->child); - - wxASSERT_MSG( label != NULL , "wxChoice: invalid label" ); - - if (!label) label = GTK_LABEL( GTK_BUTTON(m_widget)->child ); - if (string == label->label) return count; - child = child->next; - count++; - } - - wxFAIL_MSG( "wxChoice: string not found" ); - - return -1; -} - -int wxChoice::GetColumns(void) const -{ - return 1; -} - -int wxChoice::GetSelection(void) -{ - GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) ); - int count = 0; - GList *child = menu_shell->children; - while (child) - { - GtkBin *bin = GTK_BIN( child->data ); - if (!bin->child) return count; - child = child->next; - count++; - } - - wxFAIL_MSG( "wxChoice: no selection" ); - - return -1; -} - -wxString wxChoice::GetString( int n ) const -{ - GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) ); - int count = 0; - GList *child = menu_shell->children; - while (child) - { - GtkBin *bin = GTK_BIN( child->data ); - if (count == n) - { - GtkLabel *label = (GtkLabel *) NULL; - if (bin->child) label = GTK_LABEL(bin->child); - - wxASSERT_MSG( label != NULL , "wxChoice: invalid label" ); - - if (!label) label = GTK_LABEL( GTK_BUTTON(m_widget)->child ); - return label->label; - } - child = child->next; - count++; - } - - wxFAIL_MSG( "wxChoice: string not found" ); - - return ""; -} - -wxString wxChoice::GetStringSelection(void) const -{ - GtkLabel *label = GTK_LABEL( GTK_BUTTON(m_widget)->child ); - - wxASSERT_MSG( label != NULL , "wxChoice: invalid label" ); - - return label->label; -} - -int wxChoice::Number(void) const -{ - GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) ); - int count = 0; - GList *child = menu_shell->children; - while (child) - { - count++; - child = child->next; - } - return count; -} - -void wxChoice::SetColumns( int WXUNUSED(n) ) -{ -} - -void wxChoice::SetSelection( int n ) -{ - int tmp = n; - gtk_option_menu_set_history( GTK_OPTION_MENU(m_widget), (gint)tmp ); - - gtk_choice_clicked_callback( (GtkWidget *) NULL, this ); -} - -void wxChoice::SetStringSelection( const wxString &string ) -{ - int n = FindString( string ); - if (n != -1) SetSelection( n ); -} - diff --git a/src/gtk1/colour.cpp b/src/gtk1/colour.cpp deleted file mode 100644 index f9d2fa62a2..0000000000 --- a/src/gtk1/colour.cpp +++ /dev/null @@ -1,227 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: colour.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "colour.h" -#endif - -#include "wx/gdicmn.h" - -#ifdef USE_GDK_IMLIB -#include "../gdk_imlib/gdk_imlib.h" -#endif - -//----------------------------------------------------------------------------- -// wxColour -//----------------------------------------------------------------------------- - -class wxColourRefData: public wxObjectRefData -{ - public: - - wxColourRefData(void); - ~wxColourRefData(void); - void FreeColour(void); - - GdkColor m_color; - GdkColormap *m_colormap; - bool m_hasPixel; - - friend wxColour; -}; - -wxColourRefData::wxColourRefData(void) -{ - m_color.red = 0; - m_color.green = 0; - m_color.blue = 0; - m_color.pixel = 0; - m_colormap = (GdkColormap *) NULL; - m_hasPixel = FALSE; -} - -wxColourRefData::~wxColourRefData(void) -{ - FreeColour(); -} - -void wxColourRefData::FreeColour(void) -{ -// if (m_hasPixel) gdk_colors_free( m_colormap, &m_color, 1, 0 ); -} - -//----------------------------------------------------------------------------- - -#define M_COLDATA ((wxColourRefData *)m_refData) - -#define SHIFT (8*(sizeof(short int)-sizeof(char))) - -IMPLEMENT_DYNAMIC_CLASS(wxColour,wxGDIObject) - -wxColour::wxColour(void) -{ -} - -wxColour::wxColour( char red, char green, char blue ) -{ - m_refData = new wxColourRefData(); - M_COLDATA->m_color.red = ((unsigned short)red) << SHIFT; - M_COLDATA->m_color.green = ((unsigned short)green) << SHIFT; - M_COLDATA->m_color.blue = ((unsigned short)blue) << SHIFT; - M_COLDATA->m_color.pixel = 0; -} - -wxColour::wxColour( const wxString &colourName ) -{ - wxNode *node = (wxNode *) NULL; - if ( (wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) ) - { - wxColour *col = (wxColour*)node->Data(); - UnRef(); - if (col) Ref( *col ); - } - else - { - m_refData = new wxColourRefData(); - if (!gdk_color_parse( colourName, &M_COLDATA->m_color )) - { - wxFAIL_MSG( "wxColour: couldn't find colour" ); - delete m_refData; - m_refData = (wxObjectRefData *) NULL; - } - } -} - -wxColour::wxColour( const wxColour& col ) -{ - Ref( col ); -} - -wxColour::wxColour( const wxColour* col ) -{ - if (col) Ref( *col ); -} - -wxColour::~wxColour(void) -{ -} - -wxColour& wxColour::operator = ( const wxColour& col ) -{ - if (*this == col) return (*this); - Ref( col ); - return *this; -} - -wxColour& wxColour::operator = ( const wxString& colourName ) -{ - UnRef(); - wxNode *node = (wxNode *) NULL; - if ((wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) ) - { - wxColour *col = (wxColour*)node->Data(); - if (col) Ref( *col ); - } - else - { - m_refData = new wxColourRefData(); - if (!gdk_color_parse( colourName, &M_COLDATA->m_color )) - { - wxFAIL_MSG( "wxColour: couldn't find colour" ); - delete m_refData; - m_refData = (wxObjectRefData *) NULL; - } - } - return *this; -} - -bool wxColour::operator == ( const wxColour& col ) -{ - return m_refData == col.m_refData; -} - -bool wxColour::operator != ( const wxColour& col) -{ - return m_refData != col.m_refData; -} - -void wxColour::Set( const unsigned char red, const unsigned char green, const unsigned char blue ) -{ - UnRef(); - m_refData = new wxColourRefData(); - M_COLDATA->m_color.red = ((unsigned short)red) << SHIFT; - M_COLDATA->m_color.green = ((unsigned short)green) << SHIFT; - M_COLDATA->m_color.blue = ((unsigned short)blue) << SHIFT; - M_COLDATA->m_color.pixel = 0; -} - -unsigned char wxColour::Red(void) const -{ - if (!Ok()) return 0; - return (unsigned char)(M_COLDATA->m_color.red >> SHIFT); -} - -unsigned char wxColour::Green(void) const -{ - if (!Ok()) return 0; - return (unsigned char)(M_COLDATA->m_color.green >> SHIFT); -} - -unsigned char wxColour::Blue(void) const -{ - if (!Ok()) return 0; - return (unsigned char)(M_COLDATA->m_color.blue >> SHIFT); -} - -bool wxColour::Ok(void) const -{ - return (m_refData); -} - -void wxColour::CalcPixel( GdkColormap *cmap ) -{ - if (!Ok()) return; - - if ((M_COLDATA->m_hasPixel) && (M_COLDATA->m_colormap == cmap)) return; - M_COLDATA->FreeColour(); - -#ifdef USE_GDK_IMLIB - - int r = M_COLDATA->m_color.red >> SHIFT; - int g = M_COLDATA->m_color.green >> SHIFT; - int b = M_COLDATA->m_color.blue >> SHIFT; - M_COLDATA->m_hasPixel = TRUE; - M_COLDATA->m_color.pixel = gdk_imlib_best_color_match( &r, &g, &b ); - -#else - - M_COLDATA->m_hasPixel = gdk_color_alloc( cmap, &M_COLDATA->m_color ); - -#endif - - M_COLDATA->m_colormap = cmap; -} - -int wxColour::GetPixel(void) -{ - if (!Ok()) return 0; - - return M_COLDATA->m_color.pixel; -} - -GdkColor *wxColour::GetColor(void) -{ - if (!Ok()) return (GdkColor *) NULL; - - return &M_COLDATA->m_color; -} - - diff --git a/src/gtk1/combobox.cpp b/src/gtk1/combobox.cpp deleted file mode 100644 index 302cf3abda..0000000000 --- a/src/gtk1/combobox.cpp +++ /dev/null @@ -1,378 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: combobox.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "combobox.h" -#endif - -#include "wx/combobox.h" -#include - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxComboBox -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// clicked - -static void gtk_combo_clicked_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo ) -{ - if (!combo->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - if (combo->m_alreadySent) - { - combo->m_alreadySent = FALSE; - return; - } - - combo->m_alreadySent = TRUE; - - wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, combo->GetId()); - event.SetInt( combo->GetSelection() ); - wxString tmp( combo->GetStringSelection() ); - event.SetString( WXSTRINGCAST(tmp) ); - event.SetEventObject(combo); - combo->GetEventHandler()->ProcessEvent(event); -} - -//----------------------------------------------------------------------------- -// size - -/* -static gint gtk_combo_size_callback( GtkCombo *widget, GtkAllocation* alloc, wxComboBox *win ) -{ - if (!win->HasVMT()) return FALSE; - if (g_blockEventsOnDrag) return FALSE; - if (!widget->button) return FALSE; - - widget->button->allocation.x = - alloc->width - widget->button->allocation.width; - - return FALSE; -} -*/ - -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxComboBox,wxControl) - -bool wxComboBox::Create(wxWindow *parent, wxWindowID id, const wxString& value, - const wxPoint& pos, const wxSize& size, - int n, const wxString choices[], - long style, const wxValidator& validator, const wxString& name ) -{ - m_alreadySent = FALSE; - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - SetValidator( validator ); - - m_widget = gtk_combo_new(); - - wxSize newSize = size; - if (newSize.x == -1) newSize.x = 100; - if (newSize.y == -1) newSize.y = 26; - SetSize( newSize.x, newSize.y ); - - GtkWidget *list = GTK_COMBO(m_widget)->list; - - for (int i = 0; i < n; i++) - { - GtkWidget *list_item; - list_item = gtk_list_item_new_with_label( choices[i] ); - - gtk_container_add( GTK_CONTAINER(list), list_item ); - - m_clientData.Append( (wxObject*)NULL ); - - gtk_widget_show( list_item ); - - gtk_signal_connect( GTK_OBJECT(list_item), "select", - GTK_SIGNAL_FUNC(gtk_combo_clicked_callback), (gpointer)this ); - } - - PostCreation(); - -/* - gtk_signal_connect( GTK_OBJECT(m_widget), "size_allocate", - GTK_SIGNAL_FUNC(gtk_combo_size_callback), (gpointer)this ); -*/ - - if (!value.IsNull()) SetValue( value ); - - Show( TRUE ); - - return TRUE; -} - -void wxComboBox::Clear(void) -{ - GtkWidget *list = GTK_COMBO(m_widget)->list; - gtk_list_clear_items( GTK_LIST(list), 0, Number() ); - - m_clientData.Clear(); -} - -void wxComboBox::Append( const wxString &item ) -{ - Append( item, (char*)NULL ); -} - -void wxComboBox::Append( const wxString &item, char *clientData ) -{ - GtkWidget *list = GTK_COMBO(m_widget)->list; - - GtkWidget *list_item; - list_item = gtk_list_item_new_with_label( item ); - - gtk_signal_connect( GTK_OBJECT(list_item), "select", - GTK_SIGNAL_FUNC(gtk_combo_clicked_callback), (gpointer)this ); - - m_clientData.Append( (wxObject*)clientData ); - - gtk_container_add( GTK_CONTAINER(list), list_item ); - - gtk_widget_show( list_item ); -} - -void wxComboBox::Delete( int n ) -{ - GtkList *listbox = GTK_LIST( GTK_COMBO(m_widget)->list ); - - GList *child = g_list_nth( listbox->children, n ); - - if (!child) - { - wxFAIL_MSG("wrong index"); - return; - } - - GList *list = g_list_append( NULL, child->data ); - gtk_list_remove_items( listbox, list ); - g_list_free( list ); - - wxNode *node = m_clientData.Nth( n ); - if (!node) - { - wxFAIL_MSG( "wrong index" ); - } - else - m_clientData.DeleteNode( node ); -} - -int wxComboBox::FindString( const wxString &item ) -{ - GtkWidget *list = GTK_COMBO(m_widget)->list; - - GList *child = GTK_LIST(list)->children; - int count = 0; - while (child) - { - GtkBin *bin = GTK_BIN( child->data ); - GtkLabel *label = GTK_LABEL( bin->child ); - if (item == label->label) return count; - count++; - child = child->next; - } - - wxFAIL_MSG( "wxComboBox: string not found" ); - - return -1; -} - -char* wxComboBox::GetClientData( int n ) -{ - wxNode *node = m_clientData.Nth( n ); - if (node) return (char*)node->Data(); - - wxFAIL_MSG( "wxComboBox: wrong index" ); - - return (char *) NULL; -} - -void wxComboBox::SetClientData( int n, char * clientData ) -{ - wxNode *node = m_clientData.Nth( n ); - if (node) node->SetData( (wxObject*) clientData ); - - wxFAIL_MSG( "wxComboBox: wrong index" ); -} - -int wxComboBox::GetSelection(void) const -{ - GtkWidget *list = GTK_COMBO(m_widget)->list; - - GList *selection = GTK_LIST(list)->selection; - if (selection) - { - GList *child = GTK_LIST(list)->children; - int count = 0; - while (child) - { - if (child->data == selection->data) return count; - count++; - child = child->next; - } - } - - wxFAIL_MSG( "wxComboBox: no selection" ); - - return -1; -} - -wxString wxComboBox::GetString( int n ) const -{ - GtkWidget *list = GTK_COMBO(m_widget)->list; - - GList *child = g_list_nth( GTK_LIST(list)->children, n ); - if (child) - { - GtkBin *bin = GTK_BIN( child->data ); - GtkLabel *label = GTK_LABEL( bin->child ); - return label->label; - } - - wxFAIL_MSG( "wxComboBox: wrong index" ); - - return ""; -} - -wxString wxComboBox::GetStringSelection(void) const -{ - GtkWidget *list = GTK_COMBO(m_widget)->list; - - GList *selection = GTK_LIST(list)->selection; - if (selection) - { - GtkBin *bin = GTK_BIN( selection->data ); - wxString tmp = GTK_LABEL( bin->child )->label; - return tmp; - } - - wxFAIL_MSG( "wxComboBox: no selection" ); - - return ""; -} - -int wxComboBox::Number(void) const -{ - GtkWidget *list = GTK_COMBO(m_widget)->list; - - GList *child = GTK_LIST(list)->children; - int count = 0; - while (child) { count++; child = child->next; } - return count; -} - -void wxComboBox::SetSelection( int n ) -{ - GtkWidget *list = GTK_COMBO(m_widget)->list; - gtk_list_select_item( GTK_LIST(list), n ); -} - -void wxComboBox::SetStringSelection( const wxString &string ) -{ - int res = FindString( string ); - if (res == -1) return; - SetSelection( res ); -} - -wxString wxComboBox::GetValue(void) const -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - wxString tmp = gtk_entry_get_text( GTK_ENTRY(entry) ); - return tmp; -} - -void wxComboBox::SetValue( const wxString& value ) -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - wxString tmp = ""; - if (!value.IsNull()) tmp = value; - gtk_entry_set_text( GTK_ENTRY(entry), tmp ); -} - -void wxComboBox::Copy(void) -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - gtk_editable_copy_clipboard( GTK_EDITABLE(entry), 0 ); -} - -void wxComboBox::Cut(void) -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - gtk_editable_cut_clipboard( GTK_EDITABLE(entry), 0 ); -} - -void wxComboBox::Paste(void) -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - gtk_editable_paste_clipboard( GTK_EDITABLE(entry), 0 ); -} - -void wxComboBox::SetInsertionPoint( long pos ) -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - int tmp = (int) pos; - gtk_entry_set_position( GTK_ENTRY(entry), tmp ); -} - -void wxComboBox::SetInsertionPointEnd(void) -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - int pos = GTK_ENTRY(entry)->text_length; - SetInsertionPoint( pos-1 ); -} - -long wxComboBox::GetInsertionPoint(void) const -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - return (long) GTK_EDITABLE(entry)->current_pos; -} - -long wxComboBox::GetLastPosition(void) const -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - int pos = GTK_ENTRY(entry)->text_length; - return (long) pos-1; -} - -void wxComboBox::Replace( long from, long to, const wxString& value ) -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - gtk_editable_delete_text( GTK_EDITABLE(entry), (gint)from, (gint)to ); - if (value.IsNull()) return; - gint pos = (gint)to; - gtk_editable_insert_text( GTK_EDITABLE(entry), value, value.Length(), &pos ); -} - -void wxComboBox::Remove(long from, long to) -{ - GtkWidget *entry = GTK_COMBO(m_widget)->entry; - gtk_editable_delete_text( GTK_EDITABLE(entry), (gint)from, (gint)to ); -} - -void wxComboBox::SetSelection( long WXUNUSED(from), long WXUNUSED(to) ) -{ -} - -void wxComboBox::SetEditable( bool WXUNUSED(editable) ) -{ -} - - diff --git a/src/gtk1/control.cpp b/src/gtk1/control.cpp deleted file mode 100644 index 61bab59ecf..0000000000 --- a/src/gtk1/control.cpp +++ /dev/null @@ -1,61 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: control.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "control.h" -#endif - -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// wxControl -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxControl,wxWindow) - -wxControl::wxControl(void) -{ - m_needParent = TRUE; -} - -wxControl::wxControl( wxWindow *parent, wxWindowID id, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) : - wxWindow( parent, id, pos, size, style, name ) -{ -} - -void wxControl::Command( wxCommandEvent &WXUNUSED(event) ) -{ -} - -void wxControl::SetLabel( const wxString &label ) -{ - m_label = ""; - for ( const char *pc = label; *pc != '\0'; pc++ ) { - if ( *pc == '&' ) { - pc++; // skip it -#if 0 // it would be unused anyhow for now - kbd interface not done yet - if ( *pc != '&' ) - m_chAccel = *pc; -#endif - } - - m_label << *pc; - } -} - -wxString wxControl::GetLabel(void) const -{ - return m_label; -} - - - diff --git a/src/gtk1/cross.xbm b/src/gtk1/cross.xbm deleted file mode 100644 index b07cbe7fcd..0000000000 --- a/src/gtk1/cross.xbm +++ /dev/null @@ -1,6 +0,0 @@ -#define cross_width 15 -#define cross_height 15 -static char cross_bits[] = { - 0x84, 0x10, 0x84, 0x10, 0xff, 0x7f, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, - 0x84, 0x10, 0xff, 0x7f, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, - 0xff, 0x7f, 0x84, 0x10, 0x84, 0x10}; diff --git a/src/gtk1/cursor.cpp b/src/gtk1/cursor.cpp deleted file mode 100644 index 6b9fd7f642..0000000000 --- a/src/gtk1/cursor.cpp +++ /dev/null @@ -1,173 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: cursor.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "cursor.h" -#endif - -#include "wx/cursor.h" - -//----------------------------------------------------------------------------- -// wxCursor -//----------------------------------------------------------------------------- - -class wxCursorRefData: public wxObjectRefData -{ - public: - - wxCursorRefData(void); - ~wxCursorRefData(void); - - GdkCursor *m_cursor; -}; - -wxCursorRefData::wxCursorRefData(void) -{ - m_cursor = (GdkCursor *) NULL; -} - -wxCursorRefData::~wxCursorRefData(void) -{ - if (m_cursor) gdk_cursor_destroy( m_cursor ); -} - -//----------------------------------------------------------------------------- - -#define M_CURSORDATA ((wxCursorRefData *)m_refData) - -IMPLEMENT_DYNAMIC_CLASS(wxCursor,wxObject) - -wxCursor::wxCursor(void) -{ -} - -wxCursor::wxCursor( int cursorId ) -{ - m_refData = new wxCursorRefData(); - - GdkCursorType gdk_cur = GDK_LEFT_PTR; - switch (cursorId) - { - case wxCURSOR_HAND: gdk_cur = GDK_HAND1; break; - case wxCURSOR_CROSS: gdk_cur = GDK_CROSSHAIR; break; - case wxCURSOR_SIZEWE: gdk_cur = GDK_SB_H_DOUBLE_ARROW; break; - case wxCURSOR_SIZENS: gdk_cur = GDK_SB_V_DOUBLE_ARROW; break; - case wxCURSOR_WAIT: gdk_cur = GDK_WATCH; break; - case wxCURSOR_WATCH: gdk_cur = GDK_WATCH; break; - case wxCURSOR_SIZING: gdk_cur = GDK_SIZING; break; - case wxCURSOR_SPRAYCAN: gdk_cur = GDK_SPRAYCAN; break; - case wxCURSOR_IBEAM: gdk_cur = GDK_XTERM; break; - case wxCURSOR_PENCIL: gdk_cur = GDK_PENCIL; break; - case wxCURSOR_NO_ENTRY: gdk_cur = GDK_PIRATE; break; - } - - M_CURSORDATA->m_cursor = gdk_cursor_new( gdk_cur ); - -/* - do that yourself - - wxCURSOR_BULLSEYE, - wxCURSOR_CHAR, - wxCURSOR_LEFT_BUTTON, - wxCURSOR_MAGNIFIER, - wxCURSOR_MIDDLE_BUTTON, - wxCURSOR_NO_ENTRY, - wxCURSOR_PAINT_BRUSH, - wxCURSOR_POINT_LEFT, - wxCURSOR_POINT_RIGHT, - wxCURSOR_QUESTION_ARROW, - wxCURSOR_RIGHT_BUTTON, - wxCURSOR_SIZENESW, - wxCURSOR_SIZENS, - wxCURSOR_SIZENWSE, - wxCURSOR_SIZEWE, - wxCURSOR_BLANK -, - wxCURSOR_CROSS_REVERSE, - wxCURSOR_DOUBLE_ARROW, - wxCURSOR_BASED_ARROW_UP, - wxCURSOR_BASED_ARROW_DOWN -*/ - -} - -wxCursor::wxCursor( const wxCursor &cursor ) -{ - Ref( cursor ); -} - -wxCursor::wxCursor( const wxCursor *cursor ) -{ - UnRef(); - if (cursor) Ref( *cursor ); -} - -wxCursor::~wxCursor(void) -{ -} - -wxCursor& wxCursor::operator = ( const wxCursor& cursor ) -{ - if (*this == cursor) return (*this); - Ref( cursor ); - return *this; -} - -bool wxCursor::operator == ( const wxCursor& cursor ) -{ - return m_refData == cursor.m_refData; -} - -bool wxCursor::operator != ( const wxCursor& cursor ) -{ - return m_refData != cursor.m_refData; -} - -bool wxCursor::Ok(void) const -{ - return TRUE; -} - -GdkCursor *wxCursor::GetCursor(void) const -{ - return M_CURSORDATA->m_cursor; -} - -//----------------------------------------------------------------------------- -// busy cursor routines -//----------------------------------------------------------------------------- - -bool g_isBusy = FALSE; - -void wxEndBusyCursor(void) -{ - g_isBusy = FALSE; -} - -void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) ) -{ - g_isBusy = TRUE; -} - -bool wxIsBusy(void) -{ - return g_isBusy; -} - -void wxSetCursor( const wxCursor& cursor ) -{ - extern wxCursor *g_globalCursor; - if (g_globalCursor) (*g_globalCursor) = cursor; - - if (cursor.Ok()) {} -} - - diff --git a/src/gtk1/data.cpp b/src/gtk1/data.cpp deleted file mode 100644 index 8e02841a18..0000000000 --- a/src/gtk1/data.cpp +++ /dev/null @@ -1,724 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: data.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -// #pragma implementation -#endif - -#include "wx/defs.h" -#include "wx/object.h" -#include "wx/window.h" -#include "wx/dc.h" -#include "wx/accel.h" -#include "wx/postscrp.h" - -#define _MAXPATHLEN 500 - -// Used for X resources - -#include -#include -#include - -wxResourceCache *wxTheResourceCache = (wxResourceCache *) NULL; -XrmDatabase wxResourceDatabase; - -// Useful buffer, initialized in wxCommonInit -char *wxBuffer = (char *) NULL; - -// Windows List -wxList wxTopLevelWindows; - -// List of windows pending deletion -wxList wxPendingDelete; - -// Current cursor, in order to hang on to -// cursor handle when setting the cursor globally -wxCursor *g_globalCursor = (wxCursor *) NULL; - -// Don't allow event propagation during drag -bool g_blockEventsOnDrag = FALSE; - -// Message Strings for Internationalization -char **wx_msg_str = (char**)NULL; - -// Custom OS version, as optionally placed in wx.ini/.wxrc -// Currently this can be Win95, Windows, Win32s, WinNT. -// For some systems, you can't tell until run-time what services you -// have. See wxGetOsVersion, which uses this string if present. -char *wxOsVersion = (char *) NULL; - -// For printing several pages -int wxPageNumber; -wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL; - -// GDI Object Lists -wxBrushList *wxTheBrushList = (wxBrushList *) NULL; -wxPenList *wxThePenList = (wxPenList *) NULL; -wxFontList *wxTheFontList = (wxFontList *) NULL; -wxColourDatabase *wxTheColourDatabase = (wxColourDatabase *) NULL; -wxBitmapList *wxTheBitmapList = (wxBitmapList *) NULL; - - -// X only font names -wxFontNameDirectory *wxTheFontNameDirectory; - -// Stock objects -wxFont *wxNORMAL_FONT; -wxFont *wxSMALL_FONT; -wxFont *wxITALIC_FONT; -wxFont *wxSWISS_FONT; - -wxPen *wxRED_PEN; -wxPen *wxCYAN_PEN; -wxPen *wxGREEN_PEN; -wxPen *wxBLACK_PEN; -wxPen *wxWHITE_PEN; -wxPen *wxTRANSPARENT_PEN; -wxPen *wxBLACK_DASHED_PEN; -wxPen *wxGREY_PEN; -wxPen *wxMEDIUM_GREY_PEN; -wxPen *wxLIGHT_GREY_PEN; - -wxBrush *wxBLUE_BRUSH; -wxBrush *wxGREEN_BRUSH; -wxBrush *wxWHITE_BRUSH; -wxBrush *wxBLACK_BRUSH; -wxBrush *wxTRANSPARENT_BRUSH; -wxBrush *wxCYAN_BRUSH; -wxBrush *wxRED_BRUSH; -wxBrush *wxGREY_BRUSH; -wxBrush *wxMEDIUM_GREY_BRUSH; -wxBrush *wxLIGHT_GREY_BRUSH; - -wxColour *wxBLACK; -wxColour *wxWHITE; -wxColour *wxGREY; // Robert Roebling -wxColour *wxRED; -wxColour *wxBLUE; -wxColour *wxGREEN; -wxColour *wxCYAN; -wxColour *wxLIGHT_GREY; - -wxCursor *wxSTANDARD_CURSOR = (wxCursor *) NULL; -wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL; -wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL; - -// 'Null' objects -wxAcceleratorTable wxNullAcceleratorTable; -wxBitmap wxNullBitmap; -wxIcon wxNullIcon; -wxCursor wxNullCursor; -wxPen wxNullPen; -wxBrush wxNullBrush; -wxFont wxNullFont; -wxColour wxNullColour; -wxPalette wxNullPalette; - -// Default window names -const char *wxButtonNameStr = "button"; -const char *wxCanvasNameStr = "canvas"; -const char *wxCheckBoxNameStr = "check"; -const char *wxChoiceNameStr = "choice"; -const char *wxComboBoxNameStr = "comboBox"; -const char *wxDialogNameStr = "dialog"; -const char *wxFrameNameStr = "frame"; -const char *wxGaugeNameStr = "gauge"; -const char *wxStaticBoxNameStr = "groupBox"; -const char *wxListBoxNameStr = "listBox"; -const char *wxStaticTextNameStr = "message"; -const char *wxStaticBitmapNameStr = "message"; -const char *wxMultiTextNameStr = "multitext"; -const char *wxPanelNameStr = "panel"; -const char *wxRadioBoxNameStr = "radioBox"; -const char *wxRadioButtonNameStr = "radioButton"; -const char *wxBitmapRadioButtonNameStr = "radioButton"; -const char *wxScrollBarNameStr = "scrollBar"; -const char *wxSliderNameStr = "slider"; -const char *wxStaticNameStr = "static"; -const char *wxTextCtrlWindowNameStr = "textWindow"; -const char *wxTextCtrlNameStr = "text"; -const char *wxVirtListBoxNameStr = "virtListBox"; -const char *wxButtonBarNameStr = "buttonbar"; -const char *wxEnhDialogNameStr = "Shell"; -const char *wxToolBarNameStr = "toolbar"; -const char *wxStatusLineNameStr = "status_line"; -const char *wxEmptyString = ""; -const char *wxGetTextFromUserPromptStr = "Input Text"; -const char *wxMessageBoxCaptionStr = "Message"; -const char *wxFileSelectorPromptStr = "Select a file"; -const char *wxFileSelectorDefaultWildcardStr = "*.*"; -const char *wxInternalErrorStr = "wxWindows Internal Error"; -const char *wxFatalErrorStr = "wxWindows Fatal Error"; - -// See wx/utils.h -const char *wxFloatToStringStr = "%.2f"; -const char *wxDoubleToStringStr = "%.2f"; - -#ifdef wx_msw -const char *wxUserResourceStr = "TEXT"; -#endif - - -#if USE_SHARED_LIBRARY -/* - * For wxWindows to be made into a dynamic library (e.g. Sun), - * all IMPLEMENT_... macros must be in one place. - * But normally, the definitions are in the appropriate places. - */ - -// Hand-coded IMPLEMENT... macro for wxObject (define static data) -wxClassInfo wxObject::classwxObject((char *) "wxObject", (char *) NULL, (char *) NULL, (int ) sizeof(wxObject), (wxObjectConstructorFn) NULL); -wxClassInfo *wxClassInfo::first = (wxClassInfo *) NULL; -wxHashTable wxClassInfo::classTable(wxKEY_STRING); - -#include "wx/button.h" -#include "wx/bmpbuttn.h" -IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton) - -#include "wx/checkbox.h" -IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox) - -#include "wx/choice.h" -IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl) - -#if USE_CLIPBOARD -#include "wx/clipbrd.h" -IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject) -IMPLEMENT_ABSTRACT_CLASS(wxClipboardClient, wxObject) -#endif - -#if USE_COMBOBOX -#include "wx/combobox.h" -IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl) -#endif - -#include "wx/dc.h" -#include "wx/dcmemory.h" -#include "wx/dcclient.h" -#include "wx/dcscreen.h" -IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC) - -#if defined(wx_msw) -#include "wx/dcprint.h" -IMPLEMENT_CLASS(wxPrinterDC, wxDC) -#endif - -#include "wx/dialog.h" -IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxWindow) - -#include "wx/frame.h" -IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow) - -#include "wx/mdi.h" -IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame, wxFrame) -IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame, wxFrame) -IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxWindow) - -#include "wx/cmndata.h" -IMPLEMENT_DYNAMIC_CLASS(wxColourData, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxFontData, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxPrintData, wxObject) - -#include "wx/colordlg.h" -#include "wx/fontdlg.h" - -#if !defined(wx_msw) || USE_GENERIC_DIALOGS_IN_MSW -#include "wx/generic/colordlg.h" -#include "wx/generic/fontdlg.h" -IMPLEMENT_DYNAMIC_CLASS(wxGenericColourDialog, wxDialog) -IMPLEMENT_DYNAMIC_CLASS(wxGenericFontDialog, wxDialog) -#endif - -// X defines wxColourDialog to be wxGenericColourDialog -#ifndef wx_x -IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog) -IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog) -#endif - -#include "wx/gdicmn.h" -#include "wx/pen.h" -#include "wx/brush.h" -#include "wx/font.h" -#include "wx/palette.h" -#include "wx/icon.h" -#include "wx/cursor.h" - -IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject) -IMPLEMENT_CLASS(wxColourDatabase, wxList) -IMPLEMENT_DYNAMIC_CLASS(wxFontList, wxList) -IMPLEMENT_DYNAMIC_CLASS(wxPenList, wxList) -IMPLEMENT_DYNAMIC_CLASS(wxBrushList, wxList) -IMPLEMENT_DYNAMIC_CLASS(wxBitmapList, wxList) - -/* -#if (!USE_TYPEDEFS) -IMPLEMENT_DYNAMIC_CLASS(wxPoint, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxIntPoint, wxObject) -#endif -*/ - -#if defined(wx_x) || (defined(wx_msw) && USE_PORTABLE_FONTS_IN_MSW) -IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory, wxObject) -#endif - -#include "wx/hash.h" -IMPLEMENT_DYNAMIC_CLASS(wxHashTable, wxObject) - -#include "wx/help.h" -IMPLEMENT_DYNAMIC_CLASS(wxHelpInstance, wxClient) -IMPLEMENT_CLASS(wxHelpConnection, wxConnection) - -#include "wx/list.h" -IMPLEMENT_DYNAMIC_CLASS(wxNode, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxList, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxStringList, wxList) - -#if USE_PRINTING_ARCHITECTURE -#include "wx/print.h" -IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog, wxDialog) -IMPLEMENT_DYNAMIC_CLASS(wxPrinterBase, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter, wxPrinterBase) -IMPLEMENT_DYNAMIC_CLASS(wxWindowsPrinter, wxPrinterBase) -IMPLEMENT_ABSTRACT_CLASS(wxPrintout, wxObject) -IMPLEMENT_CLASS(wxPreviewCanvas, wxWindow) -IMPLEMENT_CLASS(wxPreviewControlBar, wxWindow) -IMPLEMENT_CLASS(wxPreviewFrame, wxFrame) -IMPLEMENT_CLASS(wxPrintPreviewBase, wxObject) -IMPLEMENT_CLASS(wxPostScriptPrintPreview, wxPrintPreviewBase) -IMPLEMENT_CLASS(wxWindowsPrintPreview, wxPrintPreviewBase) -IMPLEMENT_CLASS(wxGenericPrintDialog, wxDialog) -IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialog) -#endif - -#if USE_POSTSCRIPT -#include "wx/postscrp.h" -IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxPageSetupData, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase, wxList) -#endif - -#if USE_WX_RESOURCES -#include "wx/resource.h" -IMPLEMENT_DYNAMIC_CLASS(wxItemResource, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxResourceTable, wxHashTable) -#endif - -#include "wx/event.h" -IMPLEMENT_DYNAMIC_CLASS(wxEvtHandler, wxObject) -IMPLEMENT_ABSTRACT_CLASS(wxEvent, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxCommandEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxScrollEvent, wxCommandEvent) -IMPLEMENT_DYNAMIC_CLASS(wxMouseEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxKeyEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxSizeEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxPaintEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxEraseEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxMoveEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxFocusEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxCloseEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxMenuEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxJoystickEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxDropFilesEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxActivateEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxInitDialogEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxSysColourChangedEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxIdleEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxUpdateUIEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent, wxEvent) - -#include "wx/utils.h" -IMPLEMENT_DYNAMIC_CLASS(wxPathList, wxList) - -// IMPLEMENT_DYNAMIC_CLASS(wxRect, wxObject) - -#include "wx/process.h" -IMPLEMENT_DYNAMIC_CLASS(wxProcess, wxEvtHandler) - -#if USE_TIMEDATE -#include "wx/date.h" -IMPLEMENT_DYNAMIC_CLASS(wxDate, wxObject) -#endif - -#if USE_DOC_VIEW_ARCHITECTURE -#include "wx/docview.h" -//IMPLEMENT_ABSTRACT_CLASS(wxDocItem, wxObject) -IMPLEMENT_ABSTRACT_CLASS(wxDocument, wxEvtHandler) -IMPLEMENT_ABSTRACT_CLASS(wxView, wxEvtHandler) -IMPLEMENT_ABSTRACT_CLASS(wxDocTemplate, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxDocManager, wxEvtHandler) -IMPLEMENT_CLASS(wxDocChildFrame, wxFrame) -IMPLEMENT_CLASS(wxDocParentFrame, wxFrame) -#if USE_PRINTING_ARCHITECTURE -IMPLEMENT_DYNAMIC_CLASS(wxDocPrintout, wxPrintout) -#endif -IMPLEMENT_CLASS(wxCommand, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxFileHistory, wxObject) -#endif - -#if USE_CONSTRAINTS -#include "wx/layout.h" -IMPLEMENT_DYNAMIC_CLASS(wxIndividualLayoutConstraint, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxLayoutConstraints, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxSizer, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxRowColSizer, wxSizer) -#endif - -#if USE_TOOLBAR -#include "wx/tbarbase.h" -IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxToolBarBase, wxControl) - -#include "wx/tbarsmpl.h" -IMPLEMENT_DYNAMIC_CLASS(wxToolBarSimple, wxToolBarBase) - -#ifdef wx_msw -#include "wx/tbarmsw.h" -IMPLEMENT_DYNAMIC_CLASS(wxToolBarMSW, wxToolBarBase) - -#include "wx/tbar95.h" -IMPLEMENT_DYNAMIC_CLASS(wxToolBar95, wxToolBarBase) -#endif - -#endif - -#include "wx/statusbr.h" - -IMPLEMENT_DYNAMIC_CLASS(wxStatusBar, wxWindow) - -BEGIN_EVENT_TABLE(wxStatusBar, wxWindow) - EVT_PAINT(wxStatusBar::OnPaint) - EVT_SYS_COLOUR_CHANGED(wxStatusBar::OnSysColourChanged) -END_EVENT_TABLE() - -#if USE_TIMEDATE -#include "wx/time.h" -IMPLEMENT_DYNAMIC_CLASS(wxTime, wxObject) -#endif - -#if !USE_GNU_WXSTRING -#include "wx/string.h" -IMPLEMENT_DYNAMIC_CLASS(wxString, wxObject) -#endif - -#ifdef wx_motif -IMPLEMENT_DYNAMIC_CLASS(wxXColormap, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxXFont, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxXCursor, wxObject) -#endif -IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) -IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject) -IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject) -IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject) -IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap) -IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxBitmap) -IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject) -IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject) - -// This will presumably be implemented on other platforms too -#ifdef wx_msw -IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler, wxBitmapHandler) -IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler, wxBitmapHandler) -IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler, wxBitmapHandler) -IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler, wxBitmapHandler) -IMPLEMENT_DYNAMIC_CLASS(wxICOFileHandler, wxBitmapHandler) -IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler, wxBitmapHandler) -#endif - -#include "wx/statbox.h" -IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl) - -#if USE_IPC -#include "wx/dde.h" -IMPLEMENT_ABSTRACT_CLASS(wxDDEObject, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxDDEServer, wxDDEObject) -IMPLEMENT_DYNAMIC_CLASS(wxDDEClient, wxDDEObject) -IMPLEMENT_CLASS(wxDDEConnection, wxObject) -#endif - -IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow) - -#include "wx/listbox.h" -IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl) - -IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler) - -#include "wx/menu.h" -IMPLEMENT_DYNAMIC_CLASS(wxMenu, wxWindow) -IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxWindow) - -#include "wx/stattext.h" -#include "wx/statbmp.h" -IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl) - -#if USE_METAFILE -#include "wx/metafile.h" -IMPLEMENT_DYNAMIC_CLASS(wxMetaFile, wxObject) -IMPLEMENT_ABSTRACT_CLASS(wxMetaFileDC, wxDC) -#endif - -#include "wx/radiobox.h" -#include "wx/radiobut.h" -IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) - -IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl) -// IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton) - -#include "wx/scrolbar.h" -IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl) - -#if WXWIN_COMPATIBILITY -BEGIN_EVENT_TABLE(wxScrollBar, wxControl) - EVT_SCROLL(wxScrollBar::OnScroll) -END_EVENT_TABLE() -#endif - -#include "wx/slider.h" -IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl) - -#if WXWIN_COMPATIBILITY -BEGIN_EVENT_TABLE(wxSlider, wxControl) - EVT_SCROLL(wxSlider::OnScroll) -END_EVENT_TABLE() -#endif - -#include "wx/timer.h" -IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject) - -#include "wx/textctrl.h" -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) - -#include "wx/window.h" -IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxEvtHandler) - -#include "wx/scrolwin.h" -IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow, wxWindow) - -#include "wx/panel.h" -IMPLEMENT_DYNAMIC_CLASS(wxPanel, wxWindow) - -#include "wx/msgbxdlg.h" -#include "wx/textdlg.h" -#include "wx/filedlg.h" -#include "wx/dirdlg.h" -#include "wx/choicdlg.h" - -#if !defined(wx_msw) || USE_GENERIC_DIALOGS_IN_MSW -#include "wx/generic/msgdlgg.h" -IMPLEMENT_CLASS(wxGenericMessageDialog, wxDialog) -#endif - -IMPLEMENT_CLASS(wxTextEntryDialog, wxDialog) -IMPLEMENT_CLASS(wxSingleChoiceDialog, wxDialog) -IMPLEMENT_CLASS(wxFileDialog, wxDialog) -IMPLEMENT_CLASS(wxDirDialog, wxDialog) - -#ifdef wx_msw -IMPLEMENT_CLASS(wxMessageDialog) -#endif - -#if USE_GAUGE -#ifdef wx_motif -#include "../../contrib/xmgauge/gauge.h" -#endif -#include "wx_gauge.h" -IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl) -#endif - -#include "wx/grid.h" -IMPLEMENT_DYNAMIC_CLASS(wxGenericGrid, wxPanel) - -///// Event tables (also must be in one, statically-linked file for shared libraries) - -// This is the base, wxEvtHandler 'bootstrap' code which is expanded manually here -const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable; } - -const wxEventTable wxEvtHandler::sm_eventTable = - { NULL, &wxEvtHandler::sm_eventTableEntries[0] }; - -const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, -#ifdef __SGI_CC__ - 0L -#else - NULL -#endif - } -}; - -BEGIN_EVENT_TABLE(wxFrame, wxWindow) - EVT_SIZE(wxFrame::OnSize) - EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight) - EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged) - EVT_IDLE(wxFrame::OnIdle) - EVT_CLOSE(wxFrame::OnCloseWindow) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxDialog, wxPanel) - EVT_BUTTON(wxID_OK, wxDialog::OnOK) - EVT_BUTTON(wxID_APPLY, wxDialog::OnApply) - EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel) - EVT_CHAR_HOOK(wxDialog::OnCharHook) - EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged) - EVT_CLOSE(wxDialog::OnCloseWindow) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxWindow, wxEvtHandler) - EVT_CHAR(wxWindow::OnChar) - EVT_SIZE(wxWindow::Size) - EVT_ERASE_BACKGROUND(wxWindow::OnEraseBackground) - EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged) - EVT_INIT_DIALOG(wxWindow::OnInitDialog) - EVT_IDLE(wxWindow::OnIdle) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxScrolledWindow, wxWindow) - EVT_SCROLL(wxScrolledWindow::OnScroll) - EVT_SIZE(wxScrolledWindow::OnSize) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxPanel, wxWindow) - EVT_SYS_COLOUR_CHANGED(wxPanel::OnSysColourChanged) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) - EVT_CHAR(wxTextCtrl::OnChar) - EVT_DROP_FILES(wxTextCtrl::OnDropFiles) - EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground) -END_EVENT_TABLE() - -#ifdef wx_msw -BEGIN_EVENT_TABLE(wxMDIParentWindow, wxFrame) - EVT_SIZE(wxMDIParentWindow::OnSize) - EVT_ACTIVATE(wxMDIParentWindow::OnActivate) - EVT_SYS_COLOUR_CHANGED(wxMDIParentWindow::OnSysColourChanged) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxMDIClientWindow, wxWindow) - EVT_SCROLL(wxMDIClientWindow::OnScroll) -END_EVENT_TABLE() -#endif - -BEGIN_EVENT_TABLE(wxToolBarBase, wxControl) - EVT_SCROLL(wxToolBarBase::OnScroll) - EVT_SIZE(wxToolBarBase::OnSize) - EVT_IDLE(wxToolBarBase::OnIdle) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxToolBarSimple, wxToolBarBase) - EVT_SIZE(wxToolBarSimple::OnSize) - EVT_PAINT(wxToolBarSimple::OnPaint) - EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus) - EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent) -END_EVENT_TABLE() - -#ifdef wx_msw -BEGIN_EVENT_TABLE(wxToolBarMSW, wxToolBarBase) - EVT_SIZE(wxToolBarMSW::OnSize) - EVT_PAINT(wxToolBarMSW::OnPaint) - EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxToolBar95, wxToolBarBase) - EVT_SIZE(wxToolBar95::OnSize) - EVT_PAINT(wxToolBar95::OnPaint) - EVT_KILL_FOCUS(wxToolBar95::OnKillFocus) - EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent) - EVT_SYS_COLOUR_CHANGED(wxToolBar95::OnSysColourChanged) -END_EVENT_TABLE() -#endif - -BEGIN_EVENT_TABLE(wxGenericGrid, wxPanel) - EVT_SIZE(wxGenericGrid::OnSize) - EVT_PAINT(wxGenericGrid::OnPaint) - EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent) - EVT_TEXT(wxGRID_TEXT_CTRL, wxGenericGrid::OnText) - EVT_COMMAND_SCROLL(wxGRID_HSCROLL, wxGenericGrid::OnGridScroll) - EVT_COMMAND_SCROLL(wxGRID_VSCROLL, wxGenericGrid::OnGridScroll) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxControl, wxWindow) - EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground) -END_EVENT_TABLE() - -#if !defined(wx_msw) || USE_GENERIC_DIALOGS_IN_MSW -BEGIN_EVENT_TABLE(wxGenericMessageDialog, wxDialog) - EVT_BUTTON(wxID_YES, wxGenericMessageDialog::OnYes) - EVT_BUTTON(wxID_NO, wxGenericMessageDialog::OnNo) - EVT_BUTTON(wxID_CANCEL, wxGenericMessageDialog::OnCancel) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxGenericColourDialog, wxDialog) - EVT_BUTTON(wxID_ADD_CUSTOM, wxGenericColourDialog::OnAddCustom) - EVT_SLIDER(wxID_RED_SLIDER, wxGenericColourDialog::OnRedSlider) - EVT_SLIDER(wxID_GREEN_SLIDER, wxGenericColourDialog::OnGreenSlider) - EVT_SLIDER(wxID_BLUE_SLIDER, wxGenericColourDialog::OnBlueSlider) - EVT_PAINT(wxGenericColourDialog::OnPaint) - EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxGenericFontDialog, wxDialog) - EVT_CHECKBOX(wxID_FONT_UNDERLINE, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_STYLE, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_WEIGHT, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_FAMILY, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_COLOUR, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_SIZE, wxGenericFontDialog::OnChangeFont) - EVT_PAINT(wxGenericFontDialog::OnPaint) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxGenericPrintDialog, wxDialog) - EVT_BUTTON(wxID_OK, wxGenericPrintDialog::OnOK) - EVT_BUTTON(wxPRINTID_SETUP, wxGenericPrintDialog::OnSetup) - EVT_RADIOBOX(wxPRINTID_RANGE, wxGenericPrintDialog::OnRange) -END_EVENT_TABLE() - -#endif - -BEGIN_EVENT_TABLE(wxTextEntryDialog, wxDialog) - EVT_BUTTON(wxID_OK, wxTextEntryDialog::OnOK) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxSingleChoiceDialog, wxDialog) - EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK) -END_EVENT_TABLE() - -#include "wx/prntbase.h" - -BEGIN_EVENT_TABLE(wxPrintAbortDialog, wxDialog) - EVT_BUTTON(wxID_CANCEL, wxPrintAbortDialog::OnCancel) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxPreviewControlBar, wxWindow) - EVT_BUTTON(wxID_PREVIEW_CLOSE, wxPreviewControlBar::OnClose) - EVT_BUTTON(wxID_PREVIEW_PRINT, wxPreviewControlBar::OnPrint) - EVT_BUTTON(wxID_PREVIEW_PREVIOUS, wxPreviewControlBar::OnPrevious) - EVT_BUTTON(wxID_PREVIEW_NEXT, wxPreviewControlBar::OnNext) - EVT_CHOICE(wxID_PREVIEW_ZOOM, wxPreviewControlBar::OnZoom) -END_EVENT_TABLE() - -#endif - - -const wxSize wxDefaultSize(-1, -1); -const wxPoint wxDefaultPosition(-1, -1); diff --git a/src/gtk1/dc.cpp b/src/gtk1/dc.cpp deleted file mode 100644 index ff6f369904..0000000000 --- a/src/gtk1/dc.cpp +++ /dev/null @@ -1,371 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dc.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "dc.h" -#endif - -#include "wx/dc.h" - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -#define mm2inches 0.0393700787402 -#define inches2mm 25.4 -#define mm2twips 56.6929133859 -#define twips2mm 0.0176388888889 -#define mm2pt 2.83464566929 -#define pt2mm 0.352777777778 - -//----------------------------------------------------------------------------- -// wxDC -//----------------------------------------------------------------------------- - -IMPLEMENT_ABSTRACT_CLASS(wxDC,wxObject) - -wxDC::wxDC(void) -{ - m_ok = FALSE; - m_optimize = FALSE; - m_autoSetting = FALSE; - m_colour = TRUE; - m_clipping = FALSE; - - m_mm_to_pix_x = 1.0; - m_mm_to_pix_y = 1.0; - - m_logicalOriginX = 0; - m_logicalOriginY = 0; - m_deviceOriginX = 0; - m_deviceOriginY = 0; - - m_logicalScaleX = 1.0; - m_logicalScaleY = 1.0; - m_userScaleX = 1.0; - m_userScaleY = 1.0; - m_scaleX = 1.0; - m_scaleY = 1.0; - - m_mappingMode = MM_TEXT; - m_needComputeScaleX = FALSE; - m_needComputeScaleY = FALSE; - - m_signX = 1; // default x-axis left to right - m_signY = 1; // default y-axis top down - - m_maxX = m_maxY = -100000; - m_minY = m_minY = 100000; - - m_logicalFunction = wxCOPY; -// m_textAlignment = wxALIGN_TOP_LEFT; - m_backgroundMode = wxTRANSPARENT; - - m_textForegroundColour = *wxBLACK; - m_textBackgroundColour = *wxWHITE; - m_pen = *wxBLACK_PEN; - m_font = *wxNORMAL_FONT; - m_brush = *wxTRANSPARENT_BRUSH; - m_backgroundBrush = *wxWHITE_BRUSH; - -// m_palette = wxAPP_COLOURMAP; -} - -wxDC::~wxDC(void) -{ -} - -void wxDC::DrawArc( long WXUNUSED(x1), long WXUNUSED(y1), long WXUNUSED(x2), long WXUNUSED(y2), - double WXUNUSED(xc), double WXUNUSED(yc) ) -{ -} - -void wxDC::DrawIcon( const wxIcon &WXUNUSED(icon), long WXUNUSED(x), long WXUNUSED(y), bool WXUNUSED(useMask) ) -{ -} - -void wxDC::DrawPoint( wxPoint& point ) -{ - DrawPoint( point.x, point.y ); -} - -void wxDC::DrawPolygon( wxList *list, long xoffset, long yoffset, int fillStyle ) -{ - int n = list->Number(); - wxPoint *points = new wxPoint[n]; - - int i = 0; - for( wxNode *node = list->First(); node; node = node->Next() ) - { - wxPoint *point = (wxPoint *)node->Data(); - points[i].x = point->x; - points[i++].y = point->y; - } - DrawPolygon( n, points, xoffset, yoffset, fillStyle ); - delete[] points; -} - -void wxDC::DrawLines( wxList *list, long xoffset, long yoffset ) -{ - int n = list->Number(); - wxPoint *points = new wxPoint[n]; - - int i = 0; - for( wxNode *node = list->First(); node; node = node->Next() ) - { - wxPoint *point = (wxPoint *)node->Data(); - points[i].x = point->x; - points[i++].y = point->y; - } - DrawLines( n, points, xoffset, yoffset ); - delete []points; -} - -void wxDC::DrawSpline( long x1, long y1, long x2, long y2, long x3, long y3 ) -{ - wxList list; - list.Append( (wxObject*)new wxPoint(x1, y1) ); - list.Append( (wxObject*)new wxPoint(x2, y2) ); - list.Append( (wxObject*)new wxPoint(x3, y3) ); - DrawSpline(&list); - wxNode *node = list.First(); - while (node) - { - wxPoint *p = (wxPoint*)node->Data(); - delete p; - node = node->Next(); - } -} - -void wxDC::DrawSpline( wxList *points ) -{ - DrawOpenSpline( points ); -} - -void wxDC::DrawSpline( int n, wxPoint points[] ) -{ - wxList list; - for (int i = 0; i < n; i++) list.Append( (wxObject*)&points[i] ); - DrawSpline( &list ); -} - -void wxDC::SetClippingRegion( long x, long y, long width, long height ) -{ - m_clipping = TRUE; - m_clipX1 = x; - m_clipY1 = y; - m_clipX2 = x + width; - m_clipY2 = y + height; -} - -void wxDC::DestroyClippingRegion(void) -{ - m_clipping = FALSE; -} - -void wxDC::GetClippingBox( long *x, long *y, long *width, long *height ) const -{ - if (m_clipping) - { - if (x) *x = m_clipX1; - if (y) *y = m_clipY1; - if (width) *width = (m_clipX2 - m_clipX1); - if (height) *height = (m_clipY2 - m_clipY1); - } - else - *x = *y = *width = *height = 0; -} - -void wxDC::GetSize( int* width, int* height ) const -{ - *width = m_maxX-m_minX; - *height = m_maxY-m_minY; -} - -void wxDC::GetSizeMM( long* width, long* height ) const -{ - int w = 0; - int h = 0; - GetSize( &w, &h ); - *width = long( double(w) / (m_scaleX*m_mm_to_pix_x) ); - *height = long( double(h) / (m_scaleY*m_mm_to_pix_y) ); -} - -void wxDC::SetTextForeground( const wxColour &col ) -{ - if (!Ok()) return; - m_textForegroundColour = col; -} - -void wxDC::SetTextBackground( const wxColour &col ) -{ - if (!Ok()) return; - m_textBackgroundColour = col; -} - -void wxDC::SetMapMode( int mode ) -{ - switch (mode) - { - case MM_TWIPS: - SetLogicalScale( twips2mm*m_mm_to_pix_x, twips2mm*m_mm_to_pix_y ); - break; - case MM_POINTS: - SetLogicalScale( pt2mm*m_mm_to_pix_x, pt2mm*m_mm_to_pix_y ); - break; - case MM_METRIC: - SetLogicalScale( m_mm_to_pix_x, m_mm_to_pix_y ); - break; - case MM_LOMETRIC: - SetLogicalScale( m_mm_to_pix_x/10.0, m_mm_to_pix_y/10.0 ); - break; - default: - case MM_TEXT: - SetLogicalScale( 1.0, 1.0 ); - break; - } - if (mode != MM_TEXT) - { - m_needComputeScaleX = TRUE; - m_needComputeScaleY = TRUE; - } -} - -void wxDC::SetUserScale( double x, double y ) -{ - // allow negative ? -> no - m_userScaleX = x; - m_userScaleY = y; - ComputeScaleAndOrigin(); -} - -void wxDC::GetUserScale( double *x, double *y ) -{ - if (x) *x = m_userScaleX; - if (y) *y = m_userScaleY; -} - -void wxDC::SetLogicalScale( double x, double y ) -{ - // allow negative ? - m_logicalScaleX = x; - m_logicalScaleY = y; - ComputeScaleAndOrigin(); -} - -void wxDC::GetLogicalScale( double *x, double *y ) -{ - if (x) *x = m_logicalScaleX; - if (y) *y = m_logicalScaleY; -} - -void wxDC::SetLogicalOrigin( long x, long y ) -{ - m_logicalOriginX = x * m_signX; // is this still correct ? - m_logicalOriginY = y * m_signY; - ComputeScaleAndOrigin(); -} - -void wxDC::GetLogicalOrigin( long *x, long *y ) -{ - if (x) *x = m_logicalOriginX; - if (y) *y = m_logicalOriginY; -} - -void wxDC::SetDeviceOrigin( long x, long y ) -{ - m_deviceOriginX = x; - m_deviceOriginY = y; - ComputeScaleAndOrigin(); -} - -void wxDC::GetDeviceOrigin( long *x, long *y ) -{ - if (x) *x = m_deviceOriginX; - if (y) *y = m_deviceOriginY; -} - -void wxDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp ) -{ - m_signX = (xLeftRight ? 1 : -1); - m_signY = (yBottomUp ? -1 : 1); - ComputeScaleAndOrigin(); -} - -long wxDC::DeviceToLogicalX(long x) const -{ - return XDEV2LOG(x); -} - -long wxDC::DeviceToLogicalY(long y) const -{ - return YDEV2LOG(y); -} - -long wxDC::DeviceToLogicalXRel(long x) const -{ - return XDEV2LOGREL(x); -} - -long wxDC::DeviceToLogicalYRel(long y) const -{ - return YDEV2LOGREL(y); -} - -long wxDC::LogicalToDeviceX(long x) const -{ - return XLOG2DEV(x); -} - -long wxDC::LogicalToDeviceY(long y) const -{ - return YLOG2DEV(y); -} - -long wxDC::LogicalToDeviceXRel(long x) const -{ - return XLOG2DEVREL(x); -} - -long wxDC::LogicalToDeviceYRel(long y) const -{ - return YLOG2DEVREL(y); -} - -void wxDC::CalcBoundingBox( long x, long y ) -{ - if (x < m_minX) m_minX = x; - if (y < m_minY) m_minY = y; - if (x > m_maxX) m_maxX = x; - if (y > m_maxY) m_maxY = y; -} - -void wxDC::ComputeScaleAndOrigin(void) -{ - // CMB: copy scale to see if it changes - double origScaleX = m_scaleX; - double origScaleY = m_scaleY; - - m_scaleX = m_logicalScaleX * m_userScaleX; - m_scaleY = m_logicalScaleY * m_userScaleY; - - // CMB: if scale has changed call SetPen to recalulate the line width - if (m_scaleX != origScaleX || m_scaleY != origScaleY) - { - // this is a bit artificial, but we need to force wxDC to think - // the pen has changed - wxPen* pen = GetPen(); - wxPen tempPen; - m_pen = tempPen; - SetPen(pen); - } -} - diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp deleted file mode 100644 index ca39cfbb84..0000000000 --- a/src/gtk1/dcclient.cpp +++ /dev/null @@ -1,1030 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcclient.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dcclient.h" -#endif - -#include "wx/dcclient.h" -#include "wx/dcmemory.h" - -//----------------------------------------------------------------------------- -// local data -//----------------------------------------------------------------------------- - -#include "bdiag.xbm" -#include "fdiag.xbm" -#include "cdiag.xbm" -#include "horiz.xbm" -#include "verti.xbm" -#include "cross.xbm" -#define num_hatches 6 - -static GdkPixmap *hatches[num_hatches]; -static GdkPixmap **hatch_bitmap = (GdkPixmap **) NULL; - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -#define RAD2DEG 57.2957795131 - -//----------------------------------------------------------------------------- -// temporary implementation of the missing GDK function -//----------------------------------------------------------------------------- -#include "gdk/gdkprivate.h" -void gdk_draw_bitmap (GdkDrawable *drawable, - GdkGC *gc, - GdkDrawable *src, - gint xsrc, - gint ysrc, - gint xdest, - gint ydest, - gint width, - gint height) -{ - GdkWindowPrivate *drawable_private; - GdkWindowPrivate *src_private; - GdkGCPrivate *gc_private; - - g_return_if_fail (drawable != NULL); - g_return_if_fail (src != NULL); - g_return_if_fail (gc != NULL); - - drawable_private = (GdkWindowPrivate*) drawable; - src_private = (GdkWindowPrivate*) src; - if (drawable_private->destroyed || src_private->destroyed) - return; - gc_private = (GdkGCPrivate*) gc; - - if (width == -1) - width = src_private->width; - if (height == -1) - height = src_private->height; - - XCopyPlane (drawable_private->xdisplay, - src_private->xwindow, - drawable_private->xwindow, - gc_private->xgc, - xsrc, ysrc, - width, height, - xdest, ydest, - 1); -} - -//----------------------------------------------------------------------------- -// wxPaintDC -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxPaintDC,wxDC) - -wxPaintDC::wxPaintDC(void) -{ - m_penGC = (GdkGC *) NULL; - m_brushGC = (GdkGC *) NULL; - m_textGC = (GdkGC *) NULL; - m_bgGC = (GdkGC *) NULL; - m_cmap = (GdkColormap *) NULL; -} - -wxPaintDC::wxPaintDC( wxWindow *window ) -{ - m_penGC = (GdkGC *) NULL; - m_brushGC = (GdkGC *) NULL; - m_textGC = (GdkGC *) NULL; - m_bgGC = (GdkGC *) NULL; - m_cmap = (GdkColormap *) NULL; - - if (!window) return; - GtkWidget *widget = window->m_wxwindow; - if (!widget) return; - m_window = widget->window; - if (!m_window) return; - if (window->m_wxwindow) - m_cmap = gtk_widget_get_colormap( window->m_wxwindow ); - else - m_cmap = gtk_widget_get_colormap( window->m_widget ); - - m_isDrawable = TRUE; - - SetUpDC(); -} - -wxPaintDC::~wxPaintDC(void) -{ -} - -void wxPaintDC::FloodFill( long WXUNUSED(x1), long WXUNUSED(y1), - wxColour *WXUNUSED(col), int WXUNUSED(style) ) -{ -} - -bool wxPaintDC::GetPixel( long WXUNUSED(x1), long WXUNUSED(y1), wxColour *WXUNUSED(col) ) const -{ - return FALSE; -} - -void wxPaintDC::DrawLine( long x1, long y1, long x2, long y2 ) -{ - if (!Ok()) return; - - if (m_pen.GetStyle() != wxTRANSPARENT) - { - gdk_draw_line( m_window, m_penGC, - XLOG2DEV(x1), YLOG2DEV(y1), XLOG2DEV(x2), YLOG2DEV(y2) ); - } -} - -void wxPaintDC::CrossHair( long x, long y ) -{ - if (!Ok()) return; - - if (m_pen.GetStyle() != wxTRANSPARENT) - { - int w = 0; - int h = 0; - GetSize( &w, &h ); - long xx = XLOG2DEV(x); - long yy = YLOG2DEV(y); - gdk_draw_line( m_window, m_penGC, - 0, yy, XLOG2DEVREL(w), yy ); - gdk_draw_line( m_window, m_penGC, - xx, 0, xx, YLOG2DEVREL(h) ); - } -} - -void wxPaintDC::DrawArc( long x1, long y1, long x2, long y2, double xc, double yc ) -{ - if (!Ok()) return; - - long xx1 = XLOG2DEV(x1); - long yy1 = YLOG2DEV(y1); - long xx2 = XLOG2DEV(x2); - long yy2 = YLOG2DEV(y2); - long xxc = XLOG2DEV((long)xc); - long yyc = YLOG2DEV((long)yc); - double dx = xx1 - xxc; - double dy = yy1 - yyc; - double radius = sqrt(dx*dx+dy*dy); - long r = (long)radius; - double radius1, radius2; - - if (xx1 == xx2 && yy1 == yy2) - { - radius1 = 0.0; - radius2 = 360.0; - } - else - if (radius == 0.0) - { - radius1 = radius2 = 0.0; - } - else - { - radius1 = (xx1 - xxc == 0) ? - (yy1 - yyc < 0) ? 90.0 : -90.0 : - -atan2(double(yy1-yyc), double(xx1-xxc)) * RAD2DEG; - radius2 = (xx2 - xxc == 0) ? - (yy2 - yyc < 0) ? 90.0 : -90.0 : - -atan2(double(yy2-yyc), double(xx2-xxc)) * RAD2DEG; - } - long alpha1 = long(radius1 * 64.0); - long alpha2 = long((radius2 - radius1) * 64.0); - while (alpha2 <= 0) alpha2 += 360*64; - while (alpha1 > 360*64) alpha1 -= 360*64; - - if (m_brush.GetStyle() != wxTRANSPARENT) - gdk_draw_arc( m_window, m_brushGC, TRUE, xxc-r, yyc-r, 2*r,2*r, alpha1, alpha2 ); - - if (m_pen.GetStyle() != wxTRANSPARENT) - gdk_draw_arc( m_window, m_penGC, FALSE, xxc-r, yyc-r, 2*r,2*r, alpha1, alpha2 ); - -} - -void wxPaintDC::DrawEllipticArc( long x, long y, long width, long height, double sa, double ea ) -{ - if (!Ok()) return; - - long xx = XLOG2DEV(x); - long yy = YLOG2DEV(y); - long ww = m_signX * XLOG2DEVREL(width); - long hh = m_signY * YLOG2DEVREL(height); - - // CMB: handle -ve width and/or height - if (ww < 0) { ww = -ww; xx = xx - ww; } - if (hh < 0) { hh = -hh; yy = yy - hh; } - - long start = long(sa * 64.0); - long end = long(ea * 64.0); - if (m_brush.GetStyle() != wxTRANSPARENT) - gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy, ww, hh, start, end ); - - if (m_pen.GetStyle() != wxTRANSPARENT) - gdk_draw_arc( m_window, m_penGC, FALSE, xx, yy, ww, hh, start, end ); -} - -void wxPaintDC::DrawPoint( long x, long y ) -{ - if (!Ok()) return; - - if (m_pen.GetStyle() != wxTRANSPARENT) - gdk_draw_point( m_window, m_penGC, XLOG2DEV(x), YLOG2DEV(y) ); -} - -void wxPaintDC::DrawLines( int n, wxPoint points[], long xoffset, long yoffset ) -{ - if (!Ok()) return; - - if (m_pen.GetStyle() == wxTRANSPARENT) return; - - for (int i = 0; i < n-1; i++) - { - long x1 = XLOG2DEV(points[i].x + xoffset); - long x2 = XLOG2DEV(points[i+1].x + xoffset); - long y1 = YLOG2DEV(points[i].y + yoffset); // oh, what a waste - long y2 = YLOG2DEV(points[i+1].y + yoffset); - gdk_draw_line( m_window, m_penGC, x1, y1, x2, y2 ); - } -} - -void wxPaintDC::DrawLines( wxList *points, long xoffset, long yoffset ) -{ - if (!Ok()) return; - - if (m_pen.GetStyle() == wxTRANSPARENT) return; - - wxNode *node = points->First(); - while (node->Next()) - { - wxPoint *point = (wxPoint*)node->Data(); - wxPoint *npoint = (wxPoint*)node->Next()->Data(); - long x1 = XLOG2DEV(point->x + xoffset); - long x2 = XLOG2DEV(npoint->x + xoffset); - long y1 = YLOG2DEV(point->y + yoffset); // and again... - long y2 = YLOG2DEV(npoint->y + yoffset); - gdk_draw_line( m_window, m_penGC, x1, y1, x2, y2 ); - node = node->Next(); - } -} - -void wxPaintDC::DrawPolygon( int n, wxPoint points[], - long xoffset, long yoffset, int WXUNUSED(fillStyle) ) - { - if (!Ok()) return; - if (!n) return; // Nothing to draw - GdkPoint *gdkpoints = new GdkPoint[n+1]; - int i; - for (i = 0 ; i < n ; i++) - { - gdkpoints[i].x = XLOG2DEV(points[i].x + xoffset); - gdkpoints[i].y = YLOG2DEV(points[i].y + yoffset); - } - if (m_brush.GetStyle() != wxTRANSPARENT) - gdk_draw_polygon (m_window, m_brushGC, TRUE, gdkpoints, n); - // To do: Fillstyle - if (m_pen.GetStyle() != wxTRANSPARENT) - for (i = 0 ; i < n ; i++) - gdk_draw_line( m_window, m_penGC, - gdkpoints[i%n].x, - gdkpoints[i%n].y, - gdkpoints[(i+1)%n].x, - gdkpoints[(i+1)%n].y); - delete[] gdkpoints; -} - -void wxPaintDC::DrawPolygon( wxList *lines, long xoffset, - long yoffset, int WXUNUSED(fillStyle)) - { - int n = lines->Number(); - - if (!Ok()) return; - GdkPoint *gdkpoints = new GdkPoint[n]; - wxNode *node = lines->First(); - int cnt=0; - while (node) - { - wxPoint *p = (wxPoint *) node->Data(); - gdkpoints[cnt].x = XLOG2DEV(p->x + xoffset); - gdkpoints[cnt].y = YLOG2DEV(p->y + yoffset); - node = node->Next(); - cnt++; - } - if (m_brush.GetStyle() != wxTRANSPARENT) - gdk_draw_polygon (m_window, m_brushGC, TRUE, gdkpoints, n); - // To do: Fillstyle - if (m_pen.GetStyle() != wxTRANSPARENT) - { - int i; - for (i = 0 ; i < n ; i++) - gdk_draw_line( m_window, m_penGC, - gdkpoints[i%n].x, - gdkpoints[i%n].y, - gdkpoints[(i+1)%n].x, - gdkpoints[(i+1)%n].y); - } - delete[] gdkpoints; -} - -void wxPaintDC::DrawRectangle( long x, long y, long width, long height ) -{ - if (!Ok()) return; - - long xx = XLOG2DEV(x); - long yy = YLOG2DEV(y); - long ww = m_signX * XLOG2DEVREL(width); - long hh = m_signY * YLOG2DEVREL(height); - - // CMB: draw nothing if transformed w or h is 0 - if (ww == 0 || hh == 0) return; - - // CMB: handle -ve width and/or height - if (ww < 0) { ww = -ww; xx = xx - ww; } - if (hh < 0) { hh = -hh; yy = yy - hh; } - - if (m_brush.GetStyle() != wxTRANSPARENT) - gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx, yy, ww, hh ); - - if (m_pen.GetStyle() != wxTRANSPARENT) - gdk_draw_rectangle( m_window, m_penGC, FALSE, xx, yy, ww-1, hh-1 ); -} - -void wxPaintDC::DrawRoundedRectangle( long x, long y, long width, long height, double radius ) -{ - if (!Ok()) return; - - if (radius < 0.0) radius = - radius * ((width < height) ? width : height); - - long xx = XLOG2DEV(x); - long yy = YLOG2DEV(y); - long ww = m_signX * XLOG2DEVREL(width); - long hh = m_signY * YLOG2DEVREL(height); - long rr = XLOG2DEVREL((long)radius); - - // CMB: handle -ve width and/or height - if (ww < 0) { ww = -ww; xx = xx - ww; } - if (hh < 0) { hh = -hh; yy = yy - hh; } - - // CMB: if radius is zero use DrawRectangle() instead to avoid - // X drawing errors with small radii - if (rr == 0) - { - DrawRectangle( x, y, width, height ); - return; - } - - // CMB: draw nothing if transformed w or h is 0 - if (ww == 0 || hh == 0) return; - - // CMB: adjust size if outline is drawn otherwise the result is - // 1 pixel too wide and high - if (m_pen.GetStyle() != wxTRANSPARENT) - { - ww--; - hh--; - } - - // CMB: ensure dd is not larger than rectangle otherwise we - // get an hour glass shape - long dd = 2 * rr; - if (dd > ww) dd = ww; - if (dd > hh) dd = hh; - rr = dd / 2; - - if (m_brush.GetStyle() != wxTRANSPARENT) - { - gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx+rr, yy, ww-dd+1, hh ); - gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx, yy+rr, ww, hh-dd+1 ); - gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy, dd, dd, 90*64, 90*64 ); - gdk_draw_arc( m_window, m_brushGC, TRUE, xx+ww-dd, yy, dd, dd, 0, 90*64 ); - gdk_draw_arc( m_window, m_brushGC, TRUE, xx+ww-dd, yy+hh-dd, dd, dd, 270*64, 90*64 ); - gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy+hh-dd, dd, dd, 180*64, 90*64 ); - } - - if (m_pen.GetStyle() != wxTRANSPARENT) - { - gdk_draw_line( m_window, m_penGC, xx+rr, yy, xx+ww-rr, yy ); - gdk_draw_line( m_window, m_penGC, xx+rr, yy+hh, xx+ww-rr, yy+hh ); - gdk_draw_line( m_window, m_penGC, xx, yy+rr, xx, yy+hh-rr ); - gdk_draw_line( m_window, m_penGC, xx+ww, yy+rr, xx+ww, yy+hh-rr ); - gdk_draw_arc( m_window, m_penGC, FALSE, xx, yy, dd, dd, 90*64, 90*64 ); - gdk_draw_arc( m_window, m_penGC, FALSE, xx+ww-dd, yy, dd, dd, 0, 90*64 ); - gdk_draw_arc( m_window, m_penGC, FALSE, xx+ww-dd, yy+hh-dd, dd, dd, 270*64, 90*64 ); - gdk_draw_arc( m_window, m_penGC, FALSE, xx, yy+hh-dd, dd, dd, 180*64, 90*64 ); - } -} - -void wxPaintDC::DrawEllipse( long x, long y, long width, long height ) -{ - if (!Ok()) return; - - long xx = XLOG2DEV(x); - long yy = YLOG2DEV(y); - long ww = m_signX * XLOG2DEVREL(width); - long hh = m_signY * YLOG2DEVREL(height); - - // CMB: handle -ve width and/or height - if (ww < 0) { ww = -ww; xx = xx - ww; } - if (hh < 0) { hh = -hh; yy = yy - hh; } - - if (m_brush.GetStyle() != wxTRANSPARENT) - gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy, ww, hh, 0, 360*64 ); - - if (m_pen.GetStyle() != wxTRANSPARENT) - gdk_draw_arc( m_window, m_penGC, FALSE, xx, yy, ww, hh, 0, 360*64 ); -} - -bool wxPaintDC::CanDrawBitmap(void) const -{ - return TRUE; -} - -void wxPaintDC::DrawIcon( const wxIcon &icon, long x, long y, bool useMask ) -{ - if (!Ok()) return; - - if (!icon.Ok()) return; - - int xx = XLOG2DEV(x); - int yy = YLOG2DEV(y); - - GdkBitmap *mask = (GdkBitmap *) NULL; - if (icon.GetMask()) mask = icon.GetMask()->GetBitmap(); - - if (useMask && mask) - { - gdk_gc_set_clip_mask( m_penGC, mask ); - gdk_gc_set_clip_origin( m_penGC, xx, yy ); - } - - GdkPixmap *pm = icon.GetPixmap(); - gdk_draw_pixmap( m_window, m_penGC, pm, 0, 0, xx, yy, -1, -1 ); - - if (useMask && mask) - { - gdk_gc_set_clip_mask( m_penGC, (GdkBitmap *) NULL ); - gdk_gc_set_clip_origin( m_penGC, 0, 0 ); - } -} - -bool wxPaintDC::Blit( long xdest, long ydest, long width, long height, - wxDC *source, long xsrc, long ysrc, int WXUNUSED(logical_func), bool WXUNUSED(useMask) ) -{ - if (!Ok()) return FALSE; - - // CMB 20/5/98: add blitting of bitmaps - if (source->IsKindOf(CLASSINFO(wxMemoryDC))) - { - wxMemoryDC* srcDC = (wxMemoryDC*)source; - GdkBitmap* bmap = srcDC->m_selected.GetBitmap(); - if (bmap) - { - gdk_draw_bitmap ( - m_window, - m_textGC, - bmap, - source->DeviceToLogicalX(xsrc), source->DeviceToLogicalY(ysrc), - XLOG2DEV(xdest), YLOG2DEV(ydest), - source->DeviceToLogicalXRel(width), source->DeviceToLogicalYRel(height) - ); - return TRUE; - } - } - - wxClientDC *csrc = (wxClientDC*)source; - gdk_window_copy_area ( m_window, m_penGC, - XLOG2DEV(xdest), YLOG2DEV(ydest), - csrc->GetWindow(), - source->DeviceToLogicalX(xsrc), source->DeviceToLogicalY(ysrc), - source->DeviceToLogicalXRel(width), source->DeviceToLogicalYRel(height) ); - -/* - gdk_window_copy_area ( m_window, m_penGC, - XLOG2DEV(xdest), YLOG2DEV(ydest), - csrc->GetWindow(), - xsrc, ysrc, - width, height ); -*/ - - return TRUE; -} - -void wxPaintDC::DrawText( const wxString &text, long x, long y, bool WXUNUSED(use16) ) -{ - if (!Ok()) return; - - GdkFont *font = m_font.GetInternalFont( m_scaleY ); - - x = XLOG2DEV(x); - y = YLOG2DEV(y); - - // CMB 21/5/98: draw text background if mode is wxSOLID - if (m_backgroundMode == wxSOLID) - { - long width = gdk_string_width( font, text ); - long height = font->ascent + font->descent; - gdk_gc_set_foreground( m_textGC, m_textBackgroundColour.GetColor() ); - gdk_draw_rectangle( m_window, m_textGC, TRUE, x, y, width, height ); - gdk_gc_set_foreground( m_textGC, m_textForegroundColour.GetColor() ); - } - gdk_draw_string( m_window, font, m_textGC, x, y + font->ascent, text ); - - // CMB 17/7/98: simple underline: ignores scaling and underlying - // X font's XA_UNDERLINE_POSITION and XA_UNDERLINE_THICKNESS - // properties (see wxXt implementation) - if (m_font.GetUnderlined()) - { - long width = gdk_string_width( font, text ); - long ul_y = y + font->ascent; - if (font->descent > 0) ul_y++; - gdk_draw_line( m_window, m_textGC, x, ul_y, x + width, ul_y); - } -} - -bool wxPaintDC::CanGetTextExtent(void) const -{ - return TRUE; -} - -void wxPaintDC::GetTextExtent( const wxString &string, long *width, long *height, - long *descent, long *externalLeading, - wxFont *theFont, bool WXUNUSED(use16) ) -{ - if (!Ok()) return; - - wxFont fontToUse = m_font; - if (theFont) fontToUse = *theFont; - - GdkFont *font = fontToUse.GetInternalFont( m_scaleY ); - if (width) (*width) = long(gdk_string_width( font, string ) / m_scaleX); - if (height) (*height) = long((font->ascent + font->descent) / m_scaleY); - if (descent) (*descent) = long(font->descent / m_scaleY); - if (externalLeading) (*externalLeading) = 0; // ?? -} - -long wxPaintDC::GetCharWidth(void) -{ - if (!Ok()) return 0; - - GdkFont *font = m_font.GetInternalFont( m_scaleY ); - return long(gdk_string_width( font, "H" ) / m_scaleX); -} - -long wxPaintDC::GetCharHeight(void) -{ - if (!Ok()) return 0; - - GdkFont *font = m_font.GetInternalFont( m_scaleY ); - return long((font->ascent + font->descent) / m_scaleY); -} - -void wxPaintDC::Clear(void) -{ - if (!Ok()) return; - -// DestroyClippingRegion(); - - if (m_isDrawable) - { - gdk_window_clear( m_window ); - } - else - { - int width = 0; - int height = 0; - GetSize( &width, &height ); - gdk_draw_rectangle( m_window, m_bgGC, TRUE, 0, 0, width, height ); - } -} - -void wxPaintDC::SetFont( const wxFont &font ) -{ - if (!Ok()) return; - - m_font = font; -} - -void wxPaintDC::SetPen( const wxPen &pen ) -{ - if (!Ok()) return; - - if (m_pen == pen) return; - - m_pen = pen; - - if (!m_pen.Ok()) return; - - gint width = m_pen.GetWidth(); - // CMB: if width is non-zero scale it with the dc - if (width <= 0) - { - width = 1; - } - else - { - // X doesn't allow different width in x and y and so we take - // the average - double w = 0.5 + (abs(XLOG2DEVREL(width)) + abs(YLOG2DEVREL(width))) / 2.0; - width = (int)w; - } - - GdkLineStyle lineStyle = GDK_LINE_SOLID; - switch (m_pen.GetStyle()) - { - case wxSOLID: { lineStyle = GDK_LINE_SOLID; break; } - case wxDOT: { lineStyle = GDK_LINE_ON_OFF_DASH; break; } - case wxLONG_DASH: { lineStyle = GDK_LINE_ON_OFF_DASH; break; } - case wxSHORT_DASH: { lineStyle = GDK_LINE_ON_OFF_DASH; break; } - case wxDOT_DASH: { lineStyle = GDK_LINE_DOUBLE_DASH; break; } - } - - GdkCapStyle capStyle = GDK_CAP_ROUND; - switch (m_pen.GetCap()) - { - case wxCAP_ROUND: { capStyle = (width <= 1) ? GDK_CAP_NOT_LAST : GDK_CAP_ROUND; break; } - case wxCAP_PROJECTING: { capStyle = GDK_CAP_PROJECTING; break; } - case wxCAP_BUTT: { capStyle = GDK_CAP_BUTT; break; } - } - - GdkJoinStyle joinStyle = GDK_JOIN_ROUND; - switch (m_pen.GetJoin()) - { - case wxJOIN_BEVEL: { joinStyle = GDK_JOIN_BEVEL; break; } - case wxJOIN_ROUND: { joinStyle = GDK_JOIN_ROUND; break; } - case wxJOIN_MITER: { joinStyle = GDK_JOIN_MITER; break; } - } - - gdk_gc_set_line_attributes( m_penGC, width, lineStyle, capStyle, joinStyle ); - - m_pen.GetColour().CalcPixel( m_cmap ); - gdk_gc_set_foreground( m_penGC, m_pen.GetColour().GetColor() ); -} - -void wxPaintDC::SetBrush( const wxBrush &brush ) -{ - if (!Ok()) return; - - if (m_brush == brush) return; - - m_brush = brush; - - if (!m_brush.Ok()) return; - - m_brush.GetColour().CalcPixel( m_cmap ); - gdk_gc_set_foreground( m_brushGC, m_brush.GetColour().GetColor() ); - - GdkFill fillStyle = GDK_SOLID; - switch (m_brush.GetStyle()) - { - case wxSOLID: - case wxTRANSPARENT: - break; - default: - fillStyle = GDK_STIPPLED; - } - - gdk_gc_set_fill( m_brushGC, fillStyle ); - - if (m_brush.GetStyle() == wxSTIPPLE) - { - gdk_gc_set_stipple( m_brushGC, m_brush.GetStipple()->GetPixmap() ); - } - - if (IS_HATCH(m_brush.GetStyle())) - { - int num = m_brush.GetStyle() - wxBDIAGONAL_HATCH; - gdk_gc_set_stipple( m_brushGC, hatches[num] ); - } -} - -// CMB 21/7/98: Added SetBackground. Sets background brush -// for Clear() and bg colour for shapes filled with cross-hatch brush -void wxPaintDC::SetBackground( const wxBrush &brush ) -{ - if (!Ok()) return; - - if (m_backgroundBrush == brush) return; - - m_backgroundBrush = brush; - - if (!m_backgroundBrush.Ok()) return; - - m_backgroundBrush.GetColour().CalcPixel( m_cmap ); - gdk_gc_set_background( m_brushGC, m_backgroundBrush.GetColour().GetColor() ); - gdk_gc_set_foreground( m_bgGC, m_backgroundBrush.GetColour().GetColor() ); - - GdkFill fillStyle = GDK_SOLID; - switch (m_backgroundBrush.GetStyle()) - { - case wxSOLID: - case wxTRANSPARENT: - break; - default: - fillStyle = GDK_STIPPLED; - } - - gdk_gc_set_fill( m_bgGC, fillStyle ); - - if (m_backgroundBrush.GetStyle() == wxSTIPPLE) - { - gdk_gc_set_stipple( m_bgGC, m_backgroundBrush.GetStipple()->GetPixmap() ); - } - - if (IS_HATCH(m_backgroundBrush.GetStyle())) - { - int num = m_backgroundBrush.GetStyle() - wxBDIAGONAL_HATCH; - gdk_gc_set_stipple( m_bgGC, hatches[num] ); - } -} - -void wxPaintDC::SetLogicalFunction( int function ) -{ - if (m_logicalFunction == function) return; - GdkFunction mode = GDK_COPY; - switch (function) - { - case wxXOR: mode = GDK_INVERT; break; - case wxINVERT: mode = GDK_INVERT; break; - default: break; - } - m_logicalFunction = function; - gdk_gc_set_function( m_penGC, mode ); - gdk_gc_set_function( m_brushGC, mode ); -} - -void wxPaintDC::SetTextForeground( const wxColour &col ) -{ - if (!Ok()) return; - - if (m_textForegroundColour == col) return; - - m_textForegroundColour = col; - if (!m_textForegroundColour.Ok()) return; - - m_textForegroundColour.CalcPixel( m_cmap ); - gdk_gc_set_foreground( m_textGC, m_textForegroundColour.GetColor() ); -} - -void wxPaintDC::SetTextBackground( const wxColour &col ) -{ - if (!Ok()) return; - - if (m_textBackgroundColour == col) return; - - m_textBackgroundColour = col; - if (!m_textBackgroundColour.Ok()) return; - - m_textBackgroundColour.CalcPixel( m_cmap ); - gdk_gc_set_background( m_textGC, m_textBackgroundColour.GetColor() ); -} - -void wxPaintDC::SetBackgroundMode( int mode ) -{ - m_backgroundMode = mode; - - // CMB 21/7/98: fill style of cross-hatch brushes is affected by - // transparent/solid background mode - if (m_brush.GetStyle() != wxSOLID && m_brush.GetStyle() != wxTRANSPARENT) - { - gdk_gc_set_fill( m_brushGC, - (m_backgroundMode == wxTRANSPARENT) ? GDK_STIPPLED : GDK_OPAQUE_STIPPLED); - } -} - -void wxPaintDC::SetPalette( const wxPalette& WXUNUSED(palette) ) -{ -} - -void wxPaintDC::SetClippingRegion( long x, long y, long width, long height ) -{ - wxDC::SetClippingRegion( x, y, width, height ); - - GdkRectangle rect; - rect.x = XLOG2DEV(x); - rect.y = YLOG2DEV(y); - rect.width = XLOG2DEVREL(width); - rect.height = YLOG2DEVREL(height); - gdk_gc_set_clip_rectangle( m_penGC, &rect ); - gdk_gc_set_clip_rectangle( m_brushGC, &rect ); - gdk_gc_set_clip_rectangle( m_textGC, &rect ); - gdk_gc_set_clip_rectangle( m_bgGC, &rect ); - -} - -void wxPaintDC::DestroyClippingRegion(void) -{ - wxDC::DestroyClippingRegion(); - - gdk_gc_set_clip_rectangle( m_penGC, (GdkRectangle *) NULL ); - gdk_gc_set_clip_rectangle( m_brushGC, (GdkRectangle *) NULL ); - gdk_gc_set_clip_rectangle( m_textGC, (GdkRectangle *) NULL ); - gdk_gc_set_clip_rectangle( m_bgGC, (GdkRectangle *) NULL ); -} - -void wxPaintDC::SetUpDC(void) -{ - m_ok = TRUE; - m_logicalFunction = wxCOPY; - if (m_penGC) gdk_gc_unref( m_penGC ); - m_penGC = gdk_gc_new( m_window ); - if (m_brushGC) gdk_gc_unref( m_brushGC ); - m_brushGC = gdk_gc_new( m_window ); - if (m_textGC) gdk_gc_unref( m_textGC ); - m_textGC = gdk_gc_new( m_window ); - if (m_bgGC) gdk_gc_unref( m_bgGC ); - m_bgGC = gdk_gc_new( m_window ); - SetTextForeground( m_textForegroundColour ); - SetTextBackground( m_textBackgroundColour ); - SetPen( m_pen ); - SetFont( m_font ); - SetBrush( m_brush ); - - gdk_gc_set_background( m_penGC, wxWHITE->GetColor() ); - - if (!hatch_bitmap) - { - hatch_bitmap = hatches; - hatch_bitmap[0] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, bdiag_bits, bdiag_width, bdiag_height ); - hatch_bitmap[1] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, cdiag_bits, cdiag_width, cdiag_height ); - hatch_bitmap[2] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, fdiag_bits, fdiag_width, fdiag_height ); - hatch_bitmap[3] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, cross_bits, cross_width, cross_height ); - hatch_bitmap[4] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, horiz_bits, horiz_width, horiz_height ); - hatch_bitmap[5] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, verti_bits, verti_width, verti_height ); - } -} - -GdkWindow *wxPaintDC::GetWindow(void) -{ - return m_window; -} - -// ----------------------------------- spline code ---------------------------------------- - -void wx_quadratic_spline(double a1, double b1, double a2, double b2, - double a3, double b3, double a4, double b4); -void wx_clear_stack(void); -int wx_spline_pop(double *x1, double *y1, double *x2, double *y2, double *x3, - double *y3, double *x4, double *y4); -void wx_spline_push(double x1, double y1, double x2, double y2, double x3, double y3, - double x4, double y4); -static bool wx_spline_add_point(double x, double y); -static void wx_spline_draw_point_array(wxDC *dc); - -wxList wx_spline_point_list; - -#define half(z1, z2) ((z1+z2)/2.0) -#define THRESHOLD 5 - -/* iterative version */ - -void wx_quadratic_spline(double a1, double b1, double a2, double b2, double a3, double b3, double a4, - double b4) -{ - register double xmid, ymid; - double x1, y1, x2, y2, x3, y3, x4, y4; - - wx_clear_stack(); - wx_spline_push(a1, b1, a2, b2, a3, b3, a4, b4); - - while (wx_spline_pop(&x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4)) { - xmid = (double)half(x2, x3); - ymid = (double)half(y2, y3); - if (fabs(x1 - xmid) < THRESHOLD && fabs(y1 - ymid) < THRESHOLD && - fabs(xmid - x4) < THRESHOLD && fabs(ymid - y4) < THRESHOLD) { - wx_spline_add_point( x1, y1 ); - wx_spline_add_point( xmid, ymid ); - } else { - wx_spline_push(xmid, ymid, (double)half(xmid, x3), (double)half(ymid, y3), - (double)half(x3, x4), (double)half(y3, y4), x4, y4); - wx_spline_push(x1, y1, (double)half(x1, x2), (double)half(y1, y2), - (double)half(x2, xmid), (double)half(y2, ymid), xmid, ymid); - } - } -} - -/* utilities used by spline drawing routines */ - -typedef struct wx_spline_stack_struct { - double x1, y1, x2, y2, x3, y3, x4, y4; -} Stack; - -#define SPLINE_STACK_DEPTH 20 -static Stack wx_spline_stack[SPLINE_STACK_DEPTH]; -static Stack *wx_stack_top; -static int wx_stack_count; - -void wx_clear_stack(void) -{ - wx_stack_top = wx_spline_stack; - wx_stack_count = 0; -} - -void wx_spline_push(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) -{ - wx_stack_top->x1 = x1; - wx_stack_top->y1 = y1; - wx_stack_top->x2 = x2; - wx_stack_top->y2 = y2; - wx_stack_top->x3 = x3; - wx_stack_top->y3 = y3; - wx_stack_top->x4 = x4; - wx_stack_top->y4 = y4; - wx_stack_top++; - wx_stack_count++; -} - -int wx_spline_pop(double *x1, double *y1, double *x2, double *y2, - double *x3, double *y3, double *x4, double *y4) -{ - if (wx_stack_count == 0) - return (0); - wx_stack_top--; - wx_stack_count--; - *x1 = wx_stack_top->x1; - *y1 = wx_stack_top->y1; - *x2 = wx_stack_top->x2; - *y2 = wx_stack_top->y2; - *x3 = wx_stack_top->x3; - *y3 = wx_stack_top->y3; - *x4 = wx_stack_top->x4; - *y4 = wx_stack_top->y4; - return (1); -} - -static bool wx_spline_add_point(double x, double y) -{ - wxPoint *point = new wxPoint ; - point->x = (int) x; - point->y = (int) y; - wx_spline_point_list.Append((wxObject*)point); - return TRUE; -} - -static void wx_spline_draw_point_array(wxDC *dc) -{ - dc->DrawLines(&wx_spline_point_list, 0, 0 ); - wxNode *node = wx_spline_point_list.First(); - while (node) - { - wxPoint *point = (wxPoint *)node->Data(); - delete point; - delete node; - node = wx_spline_point_list.First(); - } -} - -void wxPaintDC::DrawOpenSpline( wxList *points ) -{ - wxPoint *p; - double cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4; - double x1, y1, x2, y2; - - wxNode *node = points->First(); - p = (wxPoint *)node->Data(); - - x1 = p->x; - y1 = p->y; - - node = node->Next(); - p = (wxPoint *)node->Data(); - - x2 = p->x; - y2 = p->y; - cx1 = (double)((x1 + x2) / 2); - cy1 = (double)((y1 + y2) / 2); - cx2 = (double)((cx1 + x2) / 2); - cy2 = (double)((cy1 + y2) / 2); - - wx_spline_add_point(x1, y1); - - while ((node = node->Next()) != NULL) - { - p = (wxPoint *)node->Data(); - x1 = x2; - y1 = y2; - x2 = p->x; - y2 = p->y; - cx4 = (double)(x1 + x2) / 2; - cy4 = (double)(y1 + y2) / 2; - cx3 = (double)(x1 + cx4) / 2; - cy3 = (double)(y1 + cy4) / 2; - - wx_quadratic_spline(cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4); - - cx1 = cx4; - cy1 = cy4; - cx2 = (double)(cx1 + x2) / 2; - cy2 = (double)(cy1 + y2) / 2; - } - - wx_spline_add_point( cx1, cy1 ); - wx_spline_add_point( x2, y2 ); - - wx_spline_draw_point_array( this ); -} diff --git a/src/gtk1/dcmemory.cpp b/src/gtk1/dcmemory.cpp deleted file mode 100644 index 5a6e982f9e..0000000000 --- a/src/gtk1/dcmemory.cpp +++ /dev/null @@ -1,78 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcmemory.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dcmemory.h" -#endif - -#include "wx/dcmemory.h" - -//----------------------------------------------------------------------------- -// wxMemoryDC -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxPaintDC) - -wxMemoryDC::wxMemoryDC(void) -{ - m_ok = FALSE; - m_cmap = gdk_colormap_get_system(); -} - -wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) ) -{ - m_ok = FALSE; - m_cmap = gdk_colormap_get_system(); -} - -wxMemoryDC::~wxMemoryDC(void) -{ -} - -void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) -{ - m_selected = bitmap; - if (m_selected.Ok()) - { - if (m_selected.GetPixmap()) - { - m_window = m_selected.GetPixmap(); - } - else - { - m_window = m_selected.GetBitmap(); - } - - SetUpDC(); - - m_isDrawable = FALSE; - } - else - { - m_ok = FALSE; - m_window = (GdkWindow *) NULL; - } -} - -void wxMemoryDC::GetSize( int *width, int *height ) const -{ - if (m_selected.Ok()) - { - if (width) (*width) = m_selected.GetWidth(); - if (height) (*height) = m_selected.GetHeight(); - } - else - { - if (width) (*width) = 0; - if (height) (*height) = 0; - } -} - - diff --git a/src/gtk1/dcscreen.cpp b/src/gtk1/dcscreen.cpp deleted file mode 100644 index c3a9303751..0000000000 --- a/src/gtk1/dcscreen.cpp +++ /dev/null @@ -1,122 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcscreen.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dcscreen.h" -#endif - -#include "wx/dcscreen.h" -#include "wx/window.h" -#include "gdk/gdkx.h" - -//----------------------------------------------------------------------------- -// wxScreenDC -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxScreenDC,wxPaintDC) - -wxScreenDC::wxScreenDC(void) -{ - m_ok = FALSE; - m_window = (GdkWindow *) NULL; - m_cmap = gdk_colormap_get_system(); - - m_window = GDK_ROOT_PARENT(); - - SetUpDC(); - - gdk_gc_set_subwindow( m_penGC, GDK_INCLUDE_INFERIORS ); - gdk_gc_set_subwindow( m_brushGC, GDK_INCLUDE_INFERIORS ); - gdk_gc_set_subwindow( m_textGC, GDK_INCLUDE_INFERIORS ); - gdk_gc_set_subwindow( m_bgGC, GDK_INCLUDE_INFERIORS ); -} - -wxScreenDC::~wxScreenDC(void) -{ - EndDrawingOnTop(); -} - -bool wxScreenDC::StartDrawingOnTop( wxWindow *WXUNUSED(window) ) -{ - return TRUE; -/* - if (!window) - { - StartDrawingOnTop(); - return; - } - wxRectangle rect; - rect.x = 0; - rect.y = 0; - window->GetPosition( &rect.x, &rect.y ); - rect.width = 0; - rect.height = 0; - window->GetSize( &rect.width, &rect.height ); - window->ClientToScreen( &rect.x, &rect.y ); - StartDrawingOnTop( &rect ); - return TRUE; -*/ -} - -bool wxScreenDC::StartDrawingOnTop( wxRectangle *WXUNUSED(rect) ) -{ - return TRUE; -/* - int x = 0; - int y = 0; - int width = gdk_screen_width(); - int height = gdk_screen_height(); - if (rect) - { - x = rect->x; - y = rect->y; - width = rect->width; - height = rect->height; - } - - GTK cannot set transparent backgrounds. :-( - - GdkWindowAttr attr; - attr.x = x; - attr.y = y; - attr.width = width; - attr.height = height; - attr.override_redirect = TRUE; - attr.wclass = GDK_INPUT_OUTPUT; - attr.event_mask = 0; - attr.window_type = GDK_WINDOW_TEMP; - m_window = gdk_window_new( NULL, &attr, GDK_WA_NOREDIR | GDK_WA_X | GDK_WA_Y ); - - gdk_window_show( m_window ); - - m_window = GDK_ROOT_PARENT(); - - SetUpDC(); - - gdk_gc_set_subwindow( m_penGC, GDK_INCLUDE_INFERIORS ); - gdk_gc_set_subwindow( m_brushGC, GDK_INCLUDE_INFERIORS ); - gdk_gc_set_subwindow( m_textGC, GDK_INCLUDE_INFERIORS ); - gdk_gc_set_subwindow( m_bgGC, GDK_INCLUDE_INFERIORS ); - - return TRUE; -*/ -} - -bool wxScreenDC::EndDrawingOnTop(void) -{ - return TRUE; -/* - if (m_window) gdk_window_destroy( m_window ); - m_window = NULL; - m_isOk = FALSE; - return TRUE; -*/ -} - diff --git a/src/gtk1/dialog.cpp b/src/gtk1/dialog.cpp deleted file mode 100644 index 929a4ecd77..0000000000 --- a/src/gtk1/dialog.cpp +++ /dev/null @@ -1,283 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dialog.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dialog.h" -#endif - -#include "wx/dialog.h" -#include "wx/frame.h" -#include "wx/app.h" -#include "wx/gtk/win_gtk.h" - -//----------------------------------------------------------------------------- - -extern wxList wxPendingDelete; - -//----------------------------------------------------------------------------- -// delete - -bool gtk_dialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxDialog *win ) -{ -/* - printf( "OnDelete from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - win->Close(); - - return TRUE; -} - -//----------------------------------------------------------------------------- -// wxDialog -//----------------------------------------------------------------------------- - -BEGIN_EVENT_TABLE(wxDialog,wxWindow) - EVT_BUTTON (wxID_OK, wxDialog::OnOK) - EVT_BUTTON (wxID_CANCEL, wxDialog::OnCancel) - EVT_BUTTON (wxID_APPLY, wxDialog::OnApply) - EVT_CLOSE (wxDialog::OnCloseWindow) -END_EVENT_TABLE() - -IMPLEMENT_DYNAMIC_CLASS(wxDialog,wxWindow) - -wxDialog::wxDialog(void) -{ - m_title = ""; - m_modalShowing = FALSE; - wxTopLevelWindows.Insert( this ); -} - -wxDialog::wxDialog( wxWindow *parent, - wxWindowID id, const wxString &title, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - m_modalShowing = FALSE; - wxTopLevelWindows.Insert( this ); - Create( parent, id, title, pos, size, style, name ); -} - -bool wxDialog::Create( wxWindow *parent, - wxWindowID id, const wxString &title, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - m_needParent = FALSE; - - PreCreation( parent, id, pos, size, style, name ); - - m_widget = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS ); - - gtk_widget_set( m_widget, "GtkWindow::allow_shrink", TRUE, NULL); - - gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event", - GTK_SIGNAL_FUNC(gtk_dialog_delete_callback), (gpointer)this ); - - m_wxwindow = gtk_myfixed_new(); - gtk_widget_show( m_wxwindow ); - GTK_WIDGET_UNSET_FLAGS( m_wxwindow, GTK_CAN_FOCUS ); - - gtk_container_add( GTK_CONTAINER(m_widget), m_wxwindow ); - - SetTitle( title ); - - if ((m_x != -1) || (m_y != -1)) - gtk_widget_set_uposition( m_widget, m_x, m_y ); - - gtk_widget_set_usize( m_widget, m_width, m_height ); - - PostCreation(); - - return TRUE; -} - -wxDialog::~wxDialog(void) -{ - wxTopLevelWindows.DeleteObject( this ); - if (wxTopLevelWindows.Number() == 0) wxTheApp->ExitMainLoop(); -} - -void wxDialog::SetTitle(const wxString& title ) -{ - m_title = title; - if (m_title.IsNull()) m_title = ""; - gtk_window_set_title( GTK_WINDOW(m_widget), m_title ); -} - -wxString wxDialog::GetTitle(void) const -{ - return (wxString&)m_title; -} - -void wxDialog::OnApply( wxCommandEvent &WXUNUSED(event) ) -{ - if (Validate()) TransferDataFromWindow(); -} - -void wxDialog::OnCancel( wxCommandEvent &WXUNUSED(event) ) -{ - if (IsModal()) - { - EndModal(wxID_CANCEL); - } - else - { - SetReturnCode(wxID_CANCEL); - this->Show(FALSE); - } -} - -void wxDialog::OnOK( wxCommandEvent &WXUNUSED(event) ) -{ - if ( Validate() && TransferDataFromWindow()) - { - if (IsModal()) - { - EndModal(wxID_OK); - } - else - { - SetReturnCode(wxID_OK); - this->Show(FALSE); - } - } -} - -void wxDialog::OnPaint( wxPaintEvent& WXUNUSED(event) ) -{ - // yes -} - -bool wxDialog::OnClose(void) -{ - static wxList closing; - - if (closing.Member(this)) return FALSE; // no loops - - closing.Append(this); - - wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL); - cancelEvent.SetEventObject( this ); - GetEventHandler()->ProcessEvent(cancelEvent); - closing.DeleteObject(this); - - return FALSE; -} - -bool wxDialog::Destroy(void) -{ - if (!wxPendingDelete.Member(this)) - wxPendingDelete.Append(this); - - return TRUE; -} - -void wxDialog::OnCloseWindow(wxCloseEvent& event) -{ - if (GetEventHandler()->OnClose() || event.GetForce()) - { - this->Destroy(); - } -} - -void wxDialog::ImplementSetPosition(void) -{ - if ((m_x != -1) || (m_y != -1)) - gtk_widget_set_uposition( m_widget, m_x, m_y ); -} - -void wxDialog::Centre( int direction ) -{ - if (direction & wxHORIZONTAL == wxHORIZONTAL) m_x = (gdk_screen_width () - m_width) / 2; - if (direction & wxVERTICAL == wxVERTICAL) m_y = (gdk_screen_height () - m_height) / 2; - ImplementSetPosition(); -} - -bool wxDialog::Show( bool show ) -{ - if (!show && IsModal() && m_modalShowing) - { - EndModal( wxID_CANCEL ); - } - - wxWindow::Show( show ); - - if (show) InitDialog(); - - return TRUE; -} - -void wxDialog::SetModal(bool flag) -{ - if (flag) - m_windowStyle |= wxDIALOG_MODAL; - else - if (m_windowStyle & wxDIALOG_MODAL) m_windowStyle -= wxDIALOG_MODAL; -} - -int wxDialog::ShowModal(void) -{ - if (m_modalShowing) return GetReturnCode(); - - Show( TRUE ); - - m_modalShowing = TRUE; - - gtk_grab_add( m_widget ); - gtk_main(); - gtk_grab_remove( m_widget ); - - return GetReturnCode(); -} - -void wxDialog::EndModal( int retCode ) -{ - SetReturnCode( retCode ); - - if (!m_modalShowing) - { - wxFAIL_MSG( "wxDialog: called EndModal twice" ); - return; - } - - m_modalShowing = FALSE; - - gtk_main_quit(); -} - -void wxDialog::InitDialog(void) -{ - wxWindow::InitDialog(); -} - -void wxDialog::SetSizeHints(int minW, int minH, int maxW, int maxH, int WXUNUSED(incW) ) -{ - gdk_window_set_hints( m_widget->window, -1, -1, - minW, minH, maxW, maxH, GDK_HINT_MIN_SIZE | GDK_HINT_MIN_SIZE ); -} - -void wxDialog::SetIcon( const wxIcon &icon ) -{ - m_icon = icon; - if (!icon.Ok()) return; - - wxMask *mask = icon.GetMask(); - GdkBitmap *bm = (GdkBitmap *) NULL; - if (mask) bm = mask->GetBitmap(); - - gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm ); -} - - diff --git a/src/gtk1/dnd.cpp b/src/gtk1/dnd.cpp deleted file mode 100644 index cb081dc8d3..0000000000 --- a/src/gtk1/dnd.cpp +++ /dev/null @@ -1,306 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: dnd.cpp -// Purpose: wxDropTarget class -// Author: Robert Roebling -// Copyright: Robert Roebling -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dnd.h" -#endif - -#include "wx/dnd.h" -#include "wx/window.h" -#include "wx/app.h" -#include "wx/gdicmn.h" -#include - -#include "gdk/gdkprivate.h" - -#include - -// ---------------------------------------------------------------------------- -// global -// ---------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -// ---------------------------------------------------------------------------- -// wxDropTarget -// ---------------------------------------------------------------------------- - -wxDropTarget::wxDropTarget() -{ -} - -wxDropTarget::~wxDropTarget() -{ -} - -void wxDropTarget::Drop( GdkEvent *event, int x, int y ) -{ - printf( "Drop data is of type %s.\n", event->dropdataavailable.data_type ); - - OnDrop( x, y, (char *)event->dropdataavailable.data); -} - -void wxDropTarget::UnregisterWidget( GtkWidget *widget ) -{ - if (!widget) return; - - gtk_widget_dnd_drop_set( widget, FALSE, (gchar **) NULL, 0, FALSE ); -} - -void wxDropTarget::RegisterWidget( GtkWidget *widget ) -{ - wxString formats; - int valid = 0; - - for ( size_t i = 0; i < GetFormatCount(); i++ ) - { - wxDataFormat df = GetFormat( i ); - switch (df) - { - case wxDF_TEXT: - if (i > 0) formats += ";"; - formats += "text/plain"; - valid++; - break; - case wxDF_FILENAME: - if (i > 0) formats += ";"; - formats += "url:any"; - valid++; - break; - default: - break; - } - } - - char *str = WXSTRINGCAST formats; - - gtk_widget_dnd_drop_set( widget, TRUE, &str, valid, FALSE ); -} - -// ---------------------------------------------------------------------------- -// wxTextDropTarget -// ---------------------------------------------------------------------------- - -bool wxTextDropTarget::OnDrop( long x, long y, const void *pData ) -{ - OnDropText( x, y, (const char*)pData ); - return TRUE; -} - -bool wxTextDropTarget::OnDropText( long x, long y, const char *psz ) -{ - printf( "Got dropped text: %s.\n", psz ); - printf( "At x: %d, y: %d.\n", (int)x, (int)y ); - return TRUE; -} - -size_t wxTextDropTarget::GetFormatCount() const -{ - return 1; -} - -wxDataFormat wxTextDropTarget::GetFormat(size_t WXUNUSED(n)) const -{ - return wxDF_TEXT; -} - -// ---------------------------------------------------------------------------- -// wxFileDropTarget -// ---------------------------------------------------------------------------- - -bool wxFileDropTarget::OnDropFiles( long x, long y, size_t nFiles, const char * const WXUNUSED(aszFiles)[] ) -{ - printf( "Got %d dropped files.\n", (int)nFiles ); - printf( "At x: %d, y: %d.\n", (int)x, (int)y ); - return TRUE; -} - -bool wxFileDropTarget::OnDrop(long x, long y, const void *WXUNUSED(pData) ) -{ - char *str = "/this/is/a/path.txt"; - - return OnDropFiles(x, y, 1, &str ); -} - -size_t wxFileDropTarget::GetFormatCount() const -{ - return 1; -} - -wxDataFormat wxFileDropTarget::GetFormat(size_t WXUNUSED(n)) const -{ - return wxDF_FILENAME; -} - -//------------------------------------------------------------------------- -// wxDropSource -//------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// drag request - -void gtk_drag_callback( GtkWidget *widget, GdkEvent *event, wxDropSource *source ) -{ - printf( "Data requested for dropping.\n" ); - - wxDataObject *data = source->m_data; - - size_t size = data->GetDataSize(); - char *ptr = new char[size]; - data->GetDataHere( ptr ); - - gtk_widget_dnd_data_set( widget, event, ptr, size ); - - delete ptr; - - source->m_retValue = wxDropSource::Copy; -} - -wxDropSource::wxDropSource( wxWindow *win ) -{ - g_blockEventsOnDrag = TRUE; - - m_window = win; - m_widget = win->m_widget; - if (win->m_wxwindow) m_widget = win->m_wxwindow; - - m_data = (wxDataObject *) NULL; - m_retValue = Cancel; - - m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY ); - m_goaheadCursor = wxCursor( wxCURSOR_HAND ); -} - -wxDropSource::wxDropSource( wxDataObject &data, wxWindow *win ) -{ - g_blockEventsOnDrag = TRUE; - - m_window = win; - m_widget = win->m_widget; - if (win->m_wxwindow) m_widget = win->m_wxwindow; - m_retValue = Cancel; - - m_data = &data; - - m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY ); - m_goaheadCursor = wxCursor( wxCURSOR_HAND ); -} - -void wxDropSource::SetData( wxDataObject &data ) -{ - m_data = &data; -} - -wxDropSource::~wxDropSource(void) -{ -// if (m_data) delete m_data; - - g_blockEventsOnDrag = FALSE; -} - -wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) ) -{ - if (gdk_dnd.dnd_grabbed) return (wxDropSource::DragResult) None; - if (gdk_dnd.drag_really) return (wxDropSource::DragResult) None; - - wxASSERT_MSG( m_data, "wxDragSource: no data" ); - - if (!m_data) return (wxDropSource::DragResult) None; - if (m_data->GetDataSize() == 0) return (wxDropSource::DragResult) None; - - GdkWindowPrivate *wp = (GdkWindowPrivate*) m_widget->window; - - RegisterWindow(); - - gdk_dnd.drag_perhaps = TRUE; - - gdk_dnd.dnd_drag_start.x = 5; - gdk_dnd.dnd_drag_start.y = 5; - gdk_dnd.real_sw = wp; - - if (gdk_dnd.drag_startwindows) - { - g_free( gdk_dnd.drag_startwindows ); - gdk_dnd.drag_startwindows = (GdkWindow **) NULL; - } - gdk_dnd.drag_numwindows = gdk_dnd.drag_really = 0; - - XWindowAttributes dnd_winattr; - XGetWindowAttributes( gdk_display, wp->xwindow, &dnd_winattr ); - wp->dnd_drag_savedeventmask = dnd_winattr.your_event_mask; - - gdk_dnd_drag_addwindow( m_widget->window ); - - GdkEventDragBegin ev; - ev.type = GDK_DRAG_BEGIN; - ev.window = m_widget->window; - ev.u.allflags = 0; - ev.u.flags.protocol_version = DND_PROTOCOL_VERSION; - - gdk_event_put( (GdkEvent*)&ev ); - - XGrabPointer( gdk_display, wp->xwindow, False, - ButtonMotionMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask, - GrabModeAsync, GrabModeAsync, gdk_root_window, None, CurrentTime ); - - gdk_dnd_set_drag_cursors( m_defaultCursor.GetCursor(), m_goaheadCursor.GetCursor() ); - - gdk_dnd.dnd_grabbed = TRUE; - gdk_dnd.drag_really = 1; - - int x = 0; - int y = 0; - gdk_window_get_pointer( m_widget->window, &x, &y, (GdkModifierType *) NULL ); - - gdk_dnd_display_drag_cursor( x, y, FALSE, TRUE ); - - while (gdk_dnd.drag_really || gdk_dnd.drag_perhaps) wxYield(); - - UnregisterWindow(); - - g_blockEventsOnDrag = FALSE; - - return m_retValue; -} - -void wxDropSource::RegisterWindow(void) -{ - if (!m_data) return; - - wxString formats; - - wxDataFormat df = m_data->GetPreferredFormat(); - - switch (df) - { - case wxDF_TEXT: - formats += "text/plain"; - break; - case wxDF_FILENAME: - formats += "url:any"; - break; - default: - break; - } - - char *str = WXSTRINGCAST formats; - - gtk_widget_dnd_drag_set( m_widget, TRUE, &str, 1 ); - - gtk_signal_connect( GTK_OBJECT(m_widget), "drag_request_event", - GTK_SIGNAL_FUNC(gtk_drag_callback), (gpointer)this ); -} - -void wxDropSource::UnregisterWindow(void) -{ - if (!m_widget) return; - - gtk_widget_dnd_drag_set( m_widget, FALSE, (gchar **) NULL, 0 ); - - gtk_signal_disconnect_by_data( GTK_OBJECT(m_widget), (gpointer)this ); -} diff --git a/src/gtk1/fdiag.xbm b/src/gtk1/fdiag.xbm deleted file mode 100644 index 67d3b4732a..0000000000 --- a/src/gtk1/fdiag.xbm +++ /dev/null @@ -1,6 +0,0 @@ -#define fdiag_width 16 -#define fdiag_height 16 -static char fdiag_bits[] = { - 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, - 0x40, 0x40, 0x80, 0x80, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, - 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80}; diff --git a/src/gtk1/filedlg.cpp b/src/gtk1/filedlg.cpp deleted file mode 100644 index 6b705b101b..0000000000 --- a/src/gtk1/filedlg.cpp +++ /dev/null @@ -1,167 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: filedlg.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "filedlg.h" -#endif - -#include "wx/filedlg.h" -#include "wx/utils.h" -#include "wx/intl.h" -#include "wx/generic/msgdlgg.h" - -//----------------------------------------------------------------------------- -// wxFileDialog -//----------------------------------------------------------------------------- - -void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), gpointer data ) -{ - wxFileDialog *dialog = (wxFileDialog*)data; - wxCommandEvent event(wxEVT_NULL); - int style; - - style=dialog->GetStyle(); - - if((style&wxSAVE)&&(style&wxOVERWRITE_PROMPT)) - if(wxFileExists(gtk_file_selection_get_filename(GTK_FILE_SELECTION(dialog->m_widget) ))) { - if(wxMessageBox(_("File exists. Overwrite?"), - _("Confirm"), wxYES_NO) != wxYES) - return; - } - - dialog->OnOK( event ); -} - -void gtk_filedialog_cancel_callback( GtkWidget *WXUNUSED(widget), gpointer data ) -{ - wxFileDialog *dialog = (wxFileDialog*)data; - wxCommandEvent event(wxEVT_NULL); - dialog->OnCancel( event ); -} - -IMPLEMENT_DYNAMIC_CLASS(wxFileDialog,wxDialog) - -wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, - const wxString& defaultDir, const wxString& defaultFileName, - const wxString& wildCard, - long style, const wxPoint& pos ) -{ - m_needParent = FALSE; - - PreCreation( parent, -1, pos, wxDefaultSize, style | wxDIALOG_MODAL, "filedialog" ); - m_message = message; - m_path = ""; - m_fileName = defaultFileName; - m_dir = defaultDir; - m_wildCard = wildCard; - m_dialogStyle = style; - m_filterIndex = 1; - - m_widget = gtk_file_selection_new(_("File selection")); - - int x = (gdk_screen_width () - 400) / 2; - int y = (gdk_screen_height () - 400) / 2; - gtk_widget_set_uposition( m_widget, x, y ); - - GtkFileSelection *sel = GTK_FILE_SELECTION(m_widget); - - m_path.Append(m_dir); - if(! m_path.IsEmpty() && m_path.Last()!='/') m_path.Append('/'); - m_path.Append(m_fileName); - - if(m_path.Length()>1) gtk_file_selection_set_filename(sel,m_path); - - gtk_signal_connect( GTK_OBJECT(sel->ok_button), "clicked", - GTK_SIGNAL_FUNC(gtk_filedialog_ok_callback), (gpointer*)this ); - - gtk_signal_connect( GTK_OBJECT(sel->cancel_button), "clicked", - GTK_SIGNAL_FUNC(gtk_filedialog_cancel_callback), (gpointer*)this ); -} - -int wxFileDialog::ShowModal(void) -{ - int ret = wxDialog::ShowModal(); - - if (ret == wxID_OK) - { - m_fileName = gtk_file_selection_get_filename( GTK_FILE_SELECTION(m_widget) ); - m_path = gtk_file_selection_get_filename( GTK_FILE_SELECTION(m_widget) ); - } - return ret; -} - - -char *wxFileSelector(const char *title, - const char *defaultDir, const char *defaultFileName, - const char *defaultExtension, const char *filter, int flags, - wxWindow *parent, int x, int y) -{ - wxString filter2(""); - if ( defaultExtension && !filter ) - filter2 = wxString("*.") + wxString(defaultExtension) ; - else if ( filter ) - filter2 = filter; - - wxString defaultDirString; - if (defaultDir) - defaultDirString = defaultDir; - else - defaultDirString = ""; - - wxString defaultFilenameString; - if (defaultFileName) - defaultFilenameString = defaultFileName; - else - defaultFilenameString = ""; - - wxFileDialog fileDialog(parent, title, defaultDirString, defaultFilenameString, - filter2, flags, wxPoint(x, y)); - - if ( fileDialog.ShowModal() == wxID_OK ) - { - strcpy(wxBuffer, (const char *)fileDialog.GetPath()); - return wxBuffer; - } - else - return (char *) NULL; -} - -char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name, - wxWindow *parent ) -{ - char *ext = (char *)extension; - - char prompt[50]; - wxString str = _("Load %s file"); - sprintf(prompt, str, what); - - if (*ext == '.') ext++; - char wild[60]; - sprintf(wild, "*.%s", ext); - - return wxFileSelector (prompt, (const char *) NULL, default_name, ext, wild, 0, parent); -} - -char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name, - wxWindow *parent ) -{ - char *ext = (char *)extension; - - char prompt[50]; - wxString str = _("Save %s file"); - sprintf(prompt, str, what); - - if (*ext == '.') ext++; - char wild[60]; - sprintf(wild, "*.%s", ext); - - return wxFileSelector (prompt, (const char *) NULL, default_name, ext, wild, 0, parent); -} - diff --git a/src/gtk1/font.cpp b/src/gtk1/font.cpp deleted file mode 100644 index 47dc19b2e5..0000000000 --- a/src/gtk1/font.cpp +++ /dev/null @@ -1,827 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: font.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "font.h" -#endif - -#include "wx/font.h" -#include "wx/utils.h" -#include - -//----------------------------------------------------------------------------- -// local data -//----------------------------------------------------------------------------- - -static char *wx_font_family [] = { - "wxDEFAULT", "wxDECORATIVE", "wxMODERN", "wxROMAN", "wxSCRIPT", - "wxSWISS", "wxTELETYPE", -}; - -static char *wx_font_style [] = { - "wxDEFAULT", "wxNORMAL", "wxSLANT", "wxITALIC", -}; - -static char *wx_font_weight [] = { - "wxDEFAULT", "wxNORMAL", "wxBOLD", "wxLIGHT", -}; - -extern wxFontNameDirectory *wxTheFontNameDirectory; - -//----------------------------------------------------------------------------- -// wxFont -//----------------------------------------------------------------------------- - -class wxFontRefData: public wxObjectRefData -{ - public: - - wxFontRefData(void); - ~wxFontRefData(void); - - wxList m_scaled_xfonts; - int m_pointSize; - int m_family, m_style, m_weight; - bool m_underlined; - int m_fontId; - char* m_faceName; - - bool m_byXFontName; - GdkFont *m_font; - - friend wxFont; -}; - -wxFontRefData::wxFontRefData(void) : m_scaled_xfonts(wxKEY_INTEGER) -{ - m_byXFontName = FALSE; - m_pointSize = -1; - m_family = -1; - m_style = -1; - m_weight = -1; - m_underlined = FALSE; - m_fontId = 0; - m_faceName = (char *) NULL; - m_font = (GdkFont *) NULL; -} - -wxFontRefData::~wxFontRefData(void) -{ - wxNode *node = m_scaled_xfonts.First(); - while (node) - { - GdkFont *font = (GdkFont*)node->Data(); - wxNode *next = node->Next(); - gdk_font_unref( font ); - node = next; - } - if (m_faceName) - { - delete m_faceName; - m_faceName = (char *) NULL; - } - if (m_font) gdk_font_unref( m_font ); -} - -//----------------------------------------------------------------------------- - -#define M_FONTDATA ((wxFontRefData *)m_refData) - -IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) - -wxFont::wxFont(void) -{ - if (wxTheFontList) wxTheFontList->Append( this ); -} - -wxFont::wxFont( char *xFontName ) -{ - if (!xFontName) return; - - m_refData = new wxFontRefData(); - - M_FONTDATA->m_byXFontName = TRUE; - M_FONTDATA->m_font = gdk_font_load( xFontName ); -} - -wxFont::wxFont(int PointSize, int FontIdOrFamily, int Style, int Weight, - bool Underlined, const char* Face) -{ - m_refData = new wxFontRefData(); - - if ((M_FONTDATA->m_faceName = (Face) ? copystring(Face) : (char*)NULL) ) - { - M_FONTDATA->m_fontId = wxTheFontNameDirectory->FindOrCreateFontId( Face, FontIdOrFamily ); - M_FONTDATA->m_family = wxTheFontNameDirectory->GetFamily( FontIdOrFamily ); - } - else - { - M_FONTDATA->m_fontId = FontIdOrFamily; - M_FONTDATA->m_family = wxTheFontNameDirectory->GetFamily( FontIdOrFamily ); - } - M_FONTDATA->m_style = Style; - M_FONTDATA->m_weight = Weight; - M_FONTDATA->m_pointSize = PointSize; - M_FONTDATA->m_underlined = Underlined; - - if (wxTheFontList) wxTheFontList->Append( this ); -} - -wxFont::wxFont(int PointSize, const char *Face, int Family, int Style, - int Weight, bool Underlined) -{ - m_refData = new wxFontRefData(); - - M_FONTDATA->m_fontId = wxTheFontNameDirectory->FindOrCreateFontId( Face, Family ); - M_FONTDATA->m_faceName = (Face) ? copystring(Face) : (char*)NULL; - M_FONTDATA->m_family = wxTheFontNameDirectory->GetFamily( M_FONTDATA->m_fontId ); - M_FONTDATA->m_style = Style; - M_FONTDATA->m_weight = Weight; - M_FONTDATA->m_pointSize = PointSize; - M_FONTDATA->m_underlined = Underlined; - - if (wxTheFontList) wxTheFontList->Append( this ); -} - -wxFont::wxFont( const wxFont& font ) -{ - Ref( font ); - - if (wxTheFontList) wxTheFontList->Append( this ); -} - -wxFont::wxFont( const wxFont* font ) -{ - UnRef(); - if (font) Ref( *font ); - - if (wxTheFontList) wxTheFontList->Append( this ); -} - -wxFont::~wxFont(void) -{ - if (wxTheFontList) wxTheFontList->DeleteObject( this ); -} - -wxFont& wxFont::operator = ( const wxFont& font ) -{ - if (*this == font) return (*this); - Ref( font ); - return *this; -} - -bool wxFont::operator == ( const wxFont& font ) -{ - return m_refData == font.m_refData; -} - -bool wxFont::operator != ( const wxFont& font ) -{ - return m_refData != font.m_refData; -} - -bool wxFont::Ok() -{ - return (m_refData != NULL); -} - -int wxFont::GetPointSize(void) const -{ - return M_FONTDATA->m_pointSize; -} - -wxString wxFont::GetFaceString(void) const -{ - wxString s = wxTheFontNameDirectory->GetFontName( M_FONTDATA->m_fontId ); - return s; -} - -wxString wxFont::GetFaceName(void) const -{ - wxString s = wxTheFontNameDirectory->GetFontName( M_FONTDATA->m_fontId ); - return s; -} - -int wxFont::GetFamily(void) const -{ - return M_FONTDATA->m_family; -} - -wxString wxFont::GetFamilyString(void) const -{ - wxString s = wx_font_family[M_FONTDATA->m_family]; - return s; -} - -int wxFont::GetFontId(void) const -{ - return M_FONTDATA->m_fontId; // stub -} - -int wxFont::GetStyle(void) const -{ - return M_FONTDATA->m_style; -} - -wxString wxFont::GetStyleString(void) const -{ - wxString s = wx_font_style[M_FONTDATA->m_style]; - return s; -} - -int wxFont::GetWeight(void) const -{ - return M_FONTDATA->m_weight; -} - -wxString wxFont::GetWeightString(void) const -{ - wxString s = wx_font_weight[M_FONTDATA->m_weight]; - return s; -} - -bool wxFont::GetUnderlined(void) const -{ - return M_FONTDATA->m_underlined; -} - -//----------------------------------------------------------------------------- -// get internal representation of font -//----------------------------------------------------------------------------- - -// local help function -static GdkFont *wxLoadQueryNearestFont(int point_size, int fontid, - int style, int weight, - bool underlined); - -GdkFont *wxFont::GetInternalFont(float scale) const -{ - if (M_FONTDATA->m_byXFontName) return M_FONTDATA->m_font; - - long int_scale = long(scale * 100.0 + 0.5); // key for fontlist - int point_scale = (M_FONTDATA->m_pointSize * 10 * int_scale) / 100; - GdkFont *font = (GdkFont *) NULL; - - wxNode *node = M_FONTDATA->m_scaled_xfonts.Find(int_scale); - if (node) - { - font = (GdkFont*)node->Data(); - } - else - { - font = wxLoadQueryNearestFont( point_scale, M_FONTDATA->m_fontId, M_FONTDATA->m_style, - M_FONTDATA->m_weight, M_FONTDATA->m_underlined ); - M_FONTDATA->m_scaled_xfonts.Append( int_scale, (wxObject*)font ); - } - if (!font) - printf("could not load any font"); -// wxError("could not load any font", "wxFont"); - return font; -} - -//----------------------------------------------------------------------------- -// local utilities to find a X font -//----------------------------------------------------------------------------- - -static GdkFont *wxLoadQueryFont(int point_size, int fontid, int style, - int weight, bool WXUNUSED(underlined)) -{ - char buffer[512]; - char *name = wxTheFontNameDirectory->GetScreenName( fontid, weight, style ); - - if (!name) - name = "-*-*-*-*-*-*-*-%d-*-*-*-*-*-*"; - sprintf(buffer, name, point_size); - - return gdk_font_load( buffer ); -} - -static GdkFont *wxLoadQueryNearestFont(int point_size, int fontid, - int style, int weight, - bool underlined) -{ - GdkFont *font; - - font = wxLoadQueryFont( point_size, fontid, style, weight, underlined ); - - if (!font) { - // search up and down by stepsize 10 - int max_size = point_size + 20 * (1 + (point_size/180)); - int min_size = point_size - 20 * (1 + (point_size/180)); - int i; - - // Search for smaller size (approx.) - for (i=point_size-10; !font && i >= 10 && i >= min_size; i -= 10) - font = wxLoadQueryFont(i, fontid, style, weight, underlined); - // Search for larger size (approx.) - for (i=point_size+10; !font && i <= max_size; i += 10) - font = wxLoadQueryFont(i, fontid, style, weight, underlined); - // Try default family - if (!font && fontid != wxDEFAULT) - font = wxLoadQueryFont(point_size, wxDEFAULT, style, - weight, underlined); - // Bogus font - if (!font) - font = wxLoadQueryFont(120, wxDEFAULT, wxNORMAL, wxNORMAL, - underlined); - } - return font; -} - -//----------------------------------------------------------------------------- -// face names and index functions -//----------------------------------------------------------------------------- - -static char *font_defaults[] = { - "FamilyDefault", "Default", - "FamilyRoman", "Roman", - "FamilyDecorative", "Decorative", - "FamilyModern", "Modern", - "FamilyTeletype", "Teletype", - "FamilySwiss", "Swiss", - "FamilyScript", "Script", - - "AfmMedium", "", - "AfmBold", "Bo", - "AfmLight", "", - "AfmStraight", "", - "AfmItalic", "${AfmSlant}", - "AfmSlant", "O", - "AfmRoman", "Ro", - "AfmTimes", "Times", - "AfmHelvetica", "Helv", - "AfmCourier", "Cour", - - "Afm___", "${AfmTimes,$[weight],$[style]}", - - "AfmTimes__", "${AfmTimes}${Afm$[weight]}${Afm$[style]}", - "AfmTimesMediumStraight", "${AfmTimes}${AfmRoman}", - "AfmTimesLightStraight", "${AfmTimes}${AfmRoman}", - "AfmTimes_Italic", "${AfmTimes}$[weight]${AfmItalic}", - "AfmTimes_Slant", "${AfmTimes}$[weight]${AfmItalic}", - - "AfmSwiss__", "${AfmHelvetica}${Afm$[weight]}${Afm$[style]}", - "AfmModern__", "${AfmCourier}${Afm$[weight]}${Afm$[style]}", - - "AfmTeletype__", "${AfmModern,$[weight],$[style]}", - - "PostScriptMediumStraight", "", - "PostScriptMediumItalic", "-Oblique", - "PostScriptMediumSlant", "-Oblique", - "PostScriptLightStraight", "", - "PostScriptLightItalic", "-Oblique", - "PostScriptLightSlant", "-Oblique", - "PostScriptBoldStraight", "-Bold", - "PostScriptBoldItalic", "-BoldOblique", - "PostScriptBoldSlant", "-BoldOblique", - -#if WX_NORMALIZED_PS_FONTS - "PostScript___", "${PostScriptTimes,$[weight],$[style]}", -#else - "PostScriptRoman__", "${PostScriptTimes,$[weight],$[style]}", - "PostScript___", "LucidaSans${PostScript$[weight]$[style]}", -#endif - - "PostScriptTimesMedium", "", - "PostScriptTimesLight", "", - "PostScriptTimesBold", "Bold", - - "PostScriptTimes__", "Times${PostScript$[weight]$[style]}", - "PostScriptTimesMediumStraight", "Times-Roman", - "PostScriptTimesLightStraight", "Times-Roman", - "PostScriptTimes_Slant", "Times-${PostScriptTimes$[weight]}Italic", - "PostScriptTimes_Italic", "Times-${PostScriptTimes$[weight]}Italic", - - "PostScriptSwiss__", "Helvetica${PostScript$[weight]$[style]}", - "PostScriptModern__", "Courier${PostScript$[weight]$[style]}", - - "PostScriptTeletype__", "${PostScriptModern,$[weight],$[style]}", - -#if !WX_NORMALIZED_PS_FONTS - "PostScriptScript__", "Zapf-Chancery-MediumItalic", -#endif - - "ScreenMedium", "medium", - "ScreenBold", "bold", - "ScreenLight", "light", - "ScreenStraight", "r", - "ScreenItalic", "i", - "ScreenSlant", "o", - - "ScreenDefaultBase", "misc-fixed", - "ScreenRomanBase", "*-times", - "ScreenDecorativeBase", "*-helvetica", - "ScreenModernBase", "*-courier", - "ScreenTeletypeBase", "*-lucidatypewriter", - "ScreenSwissBase", "*-lucida", - "ScreenScriptBase", "*-zapfchancery", - - "ScreenStdSuffix", "-${Screen$[weight]}-${Screen$[style]}" - "-normal-*-*-%d-*-*-*-*-*-*", - - "Screen___", - "-${ScreenDefaultBase}${ScreenStdSuffix}", - "ScreenRoman__", - "-${ScreenRomanBase}${ScreenStdSuffix}", - "ScreenDecorative__", - "-${ScreenDecorativeBase}${ScreenStdSuffix}", - "ScreenModern__", - "-${ScreenModernBase}${ScreenStdSuffix}", - "ScreenTeletype__", - "-${ScreenTeletypeBase}${ScreenStdSuffix}", - "ScreenSwiss__", - "-${ScreenSwissBase}${ScreenStdSuffix}", - "ScreenScript__", - "-${ScreenScriptBase}${ScreenStdSuffix}", - (char *) NULL -}; - -enum {wxWEIGHT_NORMAL, wxWEIGHT_BOLD, wxWEIGHT_LIGHT, wxNUM_WEIGHTS}; -enum {wxSTYLE_NORMAL, wxSTYLE_ITALIC, wxSTYLE_SLANT, wxNUM_STYLES}; - -static int WCoordinate(int w) -{ - switch (w) { - case wxBOLD: return wxWEIGHT_BOLD; - case wxLIGHT: return wxWEIGHT_LIGHT; - case wxNORMAL: - default: return wxWEIGHT_NORMAL; - } -}; - -static int SCoordinate(int s) -{ - switch (s) { - case wxITALIC: return wxSTYLE_ITALIC; - case wxSLANT: return wxSTYLE_SLANT; - case wxNORMAL: - default: return wxSTYLE_NORMAL; - } -}; - -//----------------------------------------------------------------------------- -// wxSuffixMap -//----------------------------------------------------------------------------- - -class wxSuffixMap { -public: - ~wxSuffixMap(void); - - inline char *GetName(int weight, int style) - { - return ( map [WCoordinate(weight)] [SCoordinate(style)] ); - } - - char *map[wxNUM_WEIGHTS][wxNUM_STYLES]; - void Initialize(const char *, const char *); -}; - -//#if !USE_RESOURCES -#define wxGetResource(a, b, c) 0 -//#endif - -static void SearchResource(const char *prefix, const char **names, int count, char **v) -{ - int k, i, j; - char resource[1024], **defaults, *internal; - - k = 1 << count; - - *v = (char *) NULL; - internal = (char *) NULL; - - for (i = 0; i < k; i++) { - strcpy(resource, prefix); - for (j = 0; j < count; j++) { - if (!(i & (1 << j))) - strcat(resource, names[j]); - else - strcat(resource, "_"); - } - if (wxGetResource(wxAPP_CLASS, (char *)resource, v)) - return; - if (!internal) { - defaults = font_defaults; - while (*defaults) { - if (!strcmp(*defaults, resource)) { - internal = defaults[1]; - break; - } - defaults += 2; - } - } - } - if (internal) - *v = copystring(internal); -} - -wxSuffixMap::~wxSuffixMap(void) -{ - int k, j; - - for (k = 0; k < wxNUM_WEIGHTS; ++k) - for (j = 0; j < wxNUM_STYLES; ++j) - if (map[k][j]) { - delete[] map[k][j]; - map[k][j] = (char *) NULL; - } -} - -void wxSuffixMap::Initialize(const char *resname, const char *devresname) -{ - const char *weight, *style; - char *v; - int i, j, k; - const char *names[3]; - - for (k = 0; k < wxNUM_WEIGHTS; k++) { - switch (k) { - case wxWEIGHT_NORMAL: weight = "Medium"; break; - case wxWEIGHT_LIGHT: weight = "Light"; break; - case wxWEIGHT_BOLD: - default: weight = "Bold"; - } - for (j = 0; j < wxNUM_STYLES; j++) { - switch (j) { - case wxSTYLE_NORMAL: style = "Straight"; break; - case wxSTYLE_ITALIC: style = "Italic"; break; - case wxSTYLE_SLANT: - default: style = "Slant"; - } - names[0] = resname; - names[1] = weight; - names[2] = style; - - SearchResource(devresname, names, 3, &v); - - /* Expand macros in the found string: */ - found: - int len, closer = 0, startpos = 0; - - len = (v ? strlen(v) : 0); - for (i = 0; i < len; i++) { - if (v[i] == '$' && ((v[i+1] == '[') || (v[i+1] == '{'))) { - startpos = i; - closer = (v[i+1] == '[') ? ']' : '}'; - ++i; - } else if (v[i] == closer) { - int newstrlen; - const char *r = (char *) NULL; bool delete_r = FALSE; - char *name; - - name = v + startpos + 2; - v[i] = 0; - - if (closer == '}') { - int i, count, len; - char **names; - - for (i = 0, count = 1; name[i]; i++) - if (name[i] == ',') - count++; - - len = i; - - names = new char*[count]; - names[0] = name; - for (i = 0, count = 1; i < len; i++) - if (name[i] == ',') { - names[count++] = name + i + 1; - name[i] = 0; - } - - SearchResource("", (const char **)names, count, (char **)&r); - delete_r = (r != 0); - delete[] names; - - if (!r) { - for (i = 0; i < len; i++) - if (!name[i]) - name[i] = ','; - r = ""; - printf("Bad resource name \"%s\" in font lookup\n", name); - } - } else if (!strcmp(name, "weight")) { - r = weight; - } else if (!strcmp(name, "style")) { - r = style; - } else if (!strcmp(name, "family")) { - r = resname; - } else { - r = ""; - printf("Bad font macro name \"%s\"\n", name); - } - - // add r to v - newstrlen = strlen(r); - char *naya = new char[startpos + newstrlen + len - i]; - memcpy(naya, v, startpos); - memcpy(naya + startpos, r, newstrlen); - memcpy(naya + startpos + newstrlen, v + i + 1, len - i); - if (delete_r) - delete[] (char*)r; - delete[] v; - v = naya; - - goto found; - } - } - /* We have a final value: */ - map[k][j] = v; - } - } -} - -//----------------------------------------------------------------------------- -// wxFontNameItem -//----------------------------------------------------------------------------- - -class wxFontNameItem : public wxObject { -DECLARE_DYNAMIC_CLASS(wxFontNameItem) -public: - wxFontNameItem(const char *name, int id, int family); - ~wxFontNameItem(); - - inline char* GetScreenName(int w, int s) {return screen.GetName(w, s);} - inline char* GetPostScriptName(int w, int s) {return printing.GetName(w, s);} - inline char* GetAFMName(int w, int s) {return afm.GetName(w, s);} - inline char* GetName(void) {return name;} - inline int GetFamily(void) {return family;} - inline int GetId(void) {return id;} - inline bool IsRoman(void) {return isroman;} -#if WXDEBUG - void Dump(ostream& str); -#endif - - int id; - int family; - char *name; - wxSuffixMap screen, printing, afm; - bool isroman; -}; - -IMPLEMENT_ABSTRACT_CLASS(wxFontNameItem, wxObject) - -wxFontNameItem::wxFontNameItem(const char *Name, int Id, int Family) -{ - name = copystring(Name); - id = Id; - family = Family; - - screen. Initialize(name, "Screen"); - printing.Initialize(name, "PostScript"); - afm. Initialize(name, "Afm"); -} - -wxFontNameItem::~wxFontNameItem(void) -{ - if (name) - delete[] name; - name = (char *) NULL; -} - -#if WXDEBUG -void wxFontNameItem::Dump(ostream& str) -{ - str << "wxFontNameItem(" << name << ")"; -} -#endif - -//----------------------------------------------------------------------------- -// wxFontDirectory -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory, wxObject) - -wxFontNameDirectory::wxFontNameDirectory(void) -{ - table = new wxHashTable(wxKEY_INTEGER, 20); - nextFontId = -1; -} - -wxFontNameDirectory::~wxFontNameDirectory() -{ - // Cleanup wxFontNameItems allocated - table->BeginFind(); - wxNode *node = table->Next(); - while (node) { - wxFontNameItem *item = (wxFontNameItem*)node->Data(); - delete item; - node = table->Next(); - } - delete table; -} - -int wxFontNameDirectory::GetNewFontId(void) -{ - return (nextFontId--); -} - -void wxFontNameDirectory::Initialize() -{ - Initialize(wxDEFAULT, wxDEFAULT, "Default"); - Initialize(wxDECORATIVE, wxDECORATIVE, "Decorative"); - Initialize(wxROMAN, wxROMAN, "Roman"); - Initialize(wxMODERN, wxMODERN, "Modern"); - Initialize(wxTELETYPE, wxTELETYPE, "Teletype"); - Initialize(wxSWISS, wxSWISS, "Swiss"); - Initialize(wxSCRIPT, wxSCRIPT, "Script"); -} - -void wxFontNameDirectory::Initialize(int fontid, int family, const char *resname) -{ - char *fam, resource[256]; - - sprintf(resource, "Family%s", resname); - SearchResource((const char *)resource, (const char **) NULL, 0, (char **)&fam); - if (fam) { - if (!strcmp(fam, "Default")) family = wxDEFAULT; - else if (!strcmp(fam, "Roman")) family = wxROMAN; - else if (!strcmp(fam, "Decorative")) family = wxDECORATIVE; - else if (!strcmp(fam, "Modern")) family = wxMODERN; - else if (!strcmp(fam, "Teletype")) family = wxTELETYPE; - else if (!strcmp(fam, "Swiss")) family = wxSWISS; - else if (!strcmp(fam, "Script")) family = wxSCRIPT; - delete[] fam; // free resource - } - table->Put(fontid, new wxFontNameItem(resname, fontid, family)); -} - -int wxFontNameDirectory::FindOrCreateFontId(const char *name, int family) -{ - int id; - - // font exists -> return id - if ( (id = GetFontId(name)) ) return id; - // create new font - Initialize(id=GetNewFontId(), family, name); - return id; -} - -char *wxFontNameDirectory::GetScreenName(int fontid, int weight, int style) -{ - wxFontNameItem *item = (wxFontNameItem*)table->Get(fontid); // find font - if (item) - return item->GetScreenName(weight, style); - // font does not exist - return (char *) NULL; -} - -char *wxFontNameDirectory::GetPostScriptName(int fontid, int weight, int style) -{ - wxFontNameItem *item = (wxFontNameItem*)table->Get(fontid); // find font - if (item) - return item->GetPostScriptName(weight, style); - // font does not exist - return (char *) NULL; -} - -char *wxFontNameDirectory::GetAFMName(int fontid, int weight, int style) -{ - wxFontNameItem *item = (wxFontNameItem *)table->Get(fontid); // find font - if (item) - return item->GetAFMName(weight, style); - // font does not exist - return (char *) NULL; -} - -char *wxFontNameDirectory::GetFontName(int fontid) -{ - wxFontNameItem *item = (wxFontNameItem *)table->Get(fontid); // find font - if (item) - return item->GetName(); - // font does not exist - return (char *) NULL; -} - -int wxFontNameDirectory::GetFontId(const char *name) -{ - wxNode *node; - - table->BeginFind(); - - while ( (node = table->Next()) ) { - wxFontNameItem *item = (wxFontNameItem*)node->Data(); - if (!strcmp(name, item->name)) - return item->id; - } - // font does not exist - return 0; -} - -int wxFontNameDirectory::GetFamily(int fontid) -{ - wxFontNameItem *item = (wxFontNameItem *)table->Get(fontid); - - if (item) - return item->family; - // font does not exist - return wxDEFAULT; -} diff --git a/src/gtk1/frame.cpp b/src/gtk1/frame.cpp deleted file mode 100644 index 70a326b33d..0000000000 --- a/src/gtk1/frame.cpp +++ /dev/null @@ -1,541 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: frame.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "frame.h" -#endif - -#include "wx/frame.h" -#include "wx/dialog.h" -#include "wx/control.h" -#include "wx/app.h" -#include "wx/menu.h" -#include "wx/toolbar.h" -#include "wx/statusbr.h" -#include "wx/mdi.h" -#include "wx/dcclient.h" -#include "wx/gtk/win_gtk.h" - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -const int wxMENU_HEIGHT = 28; -const int wxSTATUS_HEIGHT = 25; - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern wxList wxTopLevelWindows; -extern wxList wxPendingDelete; - -//----------------------------------------------------------------------------- -// "size_allocate" -//----------------------------------------------------------------------------- - -static void gtk_frame_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxFrame *win ) -{ - if (!win->HasVMT()) return; - -/* - printf( "OnFrameResize from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - win->GtkOnSize( alloc->x, alloc->y, alloc->width, alloc->height ); -} - -//----------------------------------------------------------------------------- -// "delete_event" -//----------------------------------------------------------------------------- - -static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxFrame *win ) -{ -/* - printf( "OnDelete from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - win->Close(); - - return TRUE; -} - -//----------------------------------------------------------------------------- -// "configure_event" -//----------------------------------------------------------------------------- - -static gint gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *event, wxFrame *win ) -{ - if (!win->HasVMT()) return FALSE; - - win->m_x = event->x; - win->m_y = event->y; - - return FALSE; -} - -//----------------------------------------------------------------------------- -// wxFrame -//----------------------------------------------------------------------------- - -BEGIN_EVENT_TABLE(wxFrame, wxWindow) - EVT_SIZE(wxFrame::OnSize) - EVT_CLOSE(wxFrame::OnCloseWindow) - EVT_IDLE(wxFrame::OnIdle) -END_EVENT_TABLE() - -IMPLEMENT_DYNAMIC_CLASS(wxFrame,wxWindow) - -wxFrame::wxFrame() -{ - m_frameMenuBar = (wxMenuBar *) NULL; - m_frameStatusBar = (wxStatusBar *) NULL; - m_frameToolBar = (wxToolBar *) NULL; - m_sizeSet = FALSE; - m_addPrivateChild = FALSE; - m_wxwindow = (GtkWidget *) NULL; - m_mainWindow = (GtkWidget *) NULL; - wxTopLevelWindows.Insert( this ); -} - -wxFrame::wxFrame( wxWindow *parent, wxWindowID id, const wxString &title, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - m_frameMenuBar = (wxMenuBar *) NULL; - m_frameStatusBar = (wxStatusBar *) NULL; - m_frameToolBar = (wxToolBar *) NULL; - m_sizeSet = FALSE; - m_addPrivateChild = FALSE; - m_wxwindow = (GtkWidget *) NULL; - m_mainWindow = (GtkWidget *) NULL; - Create( parent, id, title, pos, size, style, name ); - wxTopLevelWindows.Insert( this ); -} - -bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - m_needParent = FALSE; - - PreCreation( parent, id, pos, size, style, name ); - - m_title = title; - - m_widget = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - if ((size.x != -1) && (size.y != -1)) - gtk_widget_set_usize( m_widget, m_width, m_height ); - if ((pos.x != -1) && (pos.y != -1)) - gtk_widget_set_uposition( m_widget, m_x, m_y ); - - gtk_window_set_title( GTK_WINDOW(m_widget), title ); - GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS ); - - gtk_widget_set( m_widget, "GtkWindow::allow_shrink", TRUE, NULL); - - gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event", - GTK_SIGNAL_FUNC(gtk_frame_delete_callback), (gpointer)this ); - - m_mainWindow = gtk_myfixed_new(); - gtk_widget_show( m_mainWindow ); - GTK_WIDGET_UNSET_FLAGS( m_mainWindow, GTK_CAN_FOCUS ); - - gtk_container_add( GTK_CONTAINER(m_widget), m_mainWindow ); - gtk_widget_set_uposition( m_mainWindow, 0, 0 ); - - m_wxwindow = gtk_myfixed_new(); - gtk_widget_show( m_wxwindow ); - GTK_WIDGET_UNSET_FLAGS( m_wxwindow, GTK_CAN_FOCUS ); - - gtk_container_add( GTK_CONTAINER(m_mainWindow), m_wxwindow ); - - gtk_signal_connect( GTK_OBJECT(m_widget), "size_allocate", - GTK_SIGNAL_FUNC(gtk_frame_size_callback), (gpointer)this ); - - gtk_signal_connect( GTK_OBJECT(m_widget), "configure_event", - GTK_SIGNAL_FUNC(gtk_frame_configure_callback), (gpointer)this ); - - PostCreation(); - - gtk_widget_realize( m_mainWindow ); - - return TRUE; -} - -wxFrame::~wxFrame() -{ - if (m_frameMenuBar) delete m_frameMenuBar; - if (m_frameStatusBar) delete m_frameStatusBar; - if (m_frameToolBar) delete m_frameToolBar; - -// if (m_mainWindow) gtk_widget_destroy( m_mainWindow ); - - wxTopLevelWindows.DeleteObject( this ); - if (wxTopLevelWindows.Number() == 0) wxTheApp->ExitMainLoop(); -} - -bool wxFrame::Show( bool show ) -{ - if (show) - { - wxSizeEvent event( wxSize(m_width,m_height), GetId() ); - m_sizeSet = FALSE; - ProcessEvent( event ); - } - return wxWindow::Show( show ); -} - -void wxFrame::Enable( bool enable ) -{ - wxWindow::Enable( enable ); - gtk_widget_set_sensitive( m_mainWindow, enable ); -} - -void wxFrame::OnCloseWindow( wxCloseEvent &event ) -{ - if ( GetEventHandler()->OnClose() || event.GetForce()) - { - this->Destroy(); - } -} - -bool wxFrame::Destroy() -{ - if (!wxPendingDelete.Member(this)) - wxPendingDelete.Append(this); - - return TRUE; -} - -void wxFrame::ImplementSetPosition(void) -{ - if ((m_x != -1) || (m_y != -1)) - gtk_widget_set_uposition( m_widget, m_x, m_y ); -} - -void wxFrame::Centre( int direction ) -{ - if (direction & wxHORIZONTAL == wxHORIZONTAL) m_x = (gdk_screen_width () - m_width) / 2; - if (direction & wxVERTICAL == wxVERTICAL) m_y = (gdk_screen_height () - m_height) / 2; - ImplementSetPosition(); -} - -void wxFrame::GetClientSize( int *width, int *height ) const -{ - wxWindow::GetClientSize( width, height ); - if (height) - { - if (m_frameMenuBar) (*height) -= wxMENU_HEIGHT; - if (m_frameStatusBar) (*height) -= wxSTATUS_HEIGHT; - if (m_frameToolBar) - { - int y = 0; - m_frameToolBar->GetSize( (int *) NULL, &y ); - (*height) -= y; - } - } -} - -void wxFrame::SetClientSize( int const width, int const height ) -{ - int h = height; - if (m_frameMenuBar) h += wxMENU_HEIGHT; - if (m_frameStatusBar) h += wxSTATUS_HEIGHT; - if (m_frameToolBar) - { - int y = 0; - m_frameToolBar->GetSize( (int *) NULL, &y ); - h += y; - } - wxWindow::SetClientSize( width, h ); -} - -void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height ) -{ - // due to a bug in gtk, x,y are always 0 - // m_x = x; - // m_y = y; - - if ((m_height == height) && (m_width == width) && - (m_sizeSet)) return; - if (!m_mainWindow) return; - if (!m_wxwindow) return; - - m_width = width; - m_height = height; - if ((m_minWidth != -1) && (m_width < m_minWidth)) m_width = m_minWidth; - if ((m_minHeight != -1) && (m_height < m_minHeight)) m_height = m_minHeight; - if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_minWidth; - if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_minHeight; - - gtk_widget_set_usize( m_widget, width, height ); - - int main_x = 0; - int main_y = 0; - int main_height = height; - int main_width = width; - - // This emulates Windows behaviour: - // The menu bar is part of the main window, but the status bar - // is on the implementation side in the client area. The - // function GetClientSize returns the size of the client area - // minus the status bar height. Under wxGTK, the main window - // is represented by m_mainWindow. The menubar is inserted - // into m_mainWindow whereas the statusbar is insertes into - // m_wxwindow just like any other window. - -// not really needed -// gtk_widget_set_usize( m_mainWindow, width, height ); - - if (m_frameMenuBar) - { - main_y = wxMENU_HEIGHT; - main_height -= wxMENU_HEIGHT; - } - - int toolbar_height = 0; - if (m_frameToolBar) m_frameToolBar->GetSize( (int *) NULL, &toolbar_height ); - - main_y += toolbar_height; - main_height -= toolbar_height; - - gtk_myfixed_move( GTK_MYFIXED(m_mainWindow), m_wxwindow, main_x, main_y ); - gtk_widget_set_usize( m_wxwindow, main_width, main_height ); - - if (m_frameMenuBar) - { - gtk_myfixed_move( GTK_MYFIXED(m_mainWindow), m_frameMenuBar->m_widget, 1, 1 ); - gtk_widget_set_usize( m_frameMenuBar->m_widget, width-2, wxMENU_HEIGHT-2 ); - } - - if (m_frameToolBar) - { - gtk_myfixed_move( GTK_MYFIXED(m_mainWindow), m_frameToolBar->m_widget, 1, wxMENU_HEIGHT ); - gtk_widget_set_usize( m_frameToolBar->m_widget, width-2, toolbar_height ); - } - - if (m_frameStatusBar) - { - m_frameStatusBar->SetSize( 0, main_height-wxSTATUS_HEIGHT, width, wxSTATUS_HEIGHT ); - } - - m_sizeSet = TRUE; - - wxSizeEvent event( wxSize(m_width,m_height), GetId() ); - event.SetEventObject( this ); - ProcessEvent( event ); -} - -void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) ) -{ - if ( GetAutoLayout() ) - Layout(); - else { - // no child: go out ! - if (!GetChildren()->First()) - return; - - // do we have exactly one child? - wxWindow *child = (wxWindow *) NULL; - for(wxNode *node = GetChildren()->First(); node; node = node->Next()) - { - wxWindow *win = (wxWindow *)node->Data(); - if (!IS_KIND_OF(win,wxFrame) && !IS_KIND_OF(win,wxDialog) -#if 0 // not in m_children anyway - && (win != m_frameMenuBar) && - (win != m_frameToolBar) && - (win != m_frameStatusBar) -#endif - ) - { - if ( child ) // it's the second one: do nothing - return; - - child = win; - } - } - - // yes: set it's size to fill all the frame - int client_x, client_y; - GetClientSize(&client_x, &client_y); - child->SetSize( 1, 1, client_x-2, client_y); - } -} - -void wxFrame::AddChild( wxWindow *child ) -{ - // wxFrame and wxDialog as children aren't placed into the parents - - if (IS_KIND_OF(child,wxMDIChildFrame)) wxFAIL_MSG( "wxFrame::AddChild error.\n" ); - - if ( IS_KIND_OF(child,wxFrame) || IS_KIND_OF(child,wxDialog)) - { - m_children.Append( child ); - - if ((child->m_x != -1) && (child->m_y != -1)) - gtk_widget_set_uposition( child->m_widget, child->m_x, child->m_y ); - - return; - } - - if (m_addPrivateChild) - { - gtk_myfixed_put( GTK_MYFIXED(m_mainWindow), child->m_widget, child->m_x, child->m_y ); - - gtk_widget_set_usize( child->m_widget, child->m_width, child->m_height ); - } - else - { - m_children.Append( child ); - - if (m_wxwindow) - gtk_myfixed_put( GTK_MYFIXED(m_wxwindow), child->m_widget, child->m_x, child->m_y ); - - gtk_widget_set_usize( child->m_widget, child->m_width, child->m_height ); - } -} - -static void SetInvokingWindow( wxMenu *menu, wxWindow *win ) -{ - menu->SetInvokingWindow( win ); - wxNode *node = menu->m_items.First(); - while (node) - { - wxMenuItem *menuitem = (wxMenuItem*)node->Data(); - if (menuitem->IsSubMenu()) - SetInvokingWindow( menuitem->GetSubMenu(), win ); - node = node->Next(); - } -} - -void wxFrame::SetMenuBar( wxMenuBar *menuBar ) -{ - m_frameMenuBar = menuBar; - - if (m_frameMenuBar) - { - wxNode *node = m_frameMenuBar->m_menus.First(); - while (node) - { - wxMenu *menu = (wxMenu*)node->Data(); - SetInvokingWindow( menu, this ); - node = node->Next(); - } - - if (m_frameMenuBar->m_parent != this) - { - m_frameMenuBar->m_parent = this; - gtk_myfixed_put( GTK_MYFIXED(m_mainWindow), - m_frameMenuBar->m_widget, m_frameMenuBar->m_x, m_frameMenuBar->m_y ); - } - } -} - -wxMenuBar *wxFrame::GetMenuBar(void) const -{ - return m_frameMenuBar; -} - -wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& name) -{ - wxCHECK_MSG( m_frameToolBar == NULL, FALSE, "recreating toolbar in wxFrame" ); - - m_addPrivateChild = TRUE; - m_frameToolBar = OnCreateToolBar( style, id, name ); - m_addPrivateChild = FALSE; - - return m_frameToolBar; -} - -wxToolBar* wxFrame::OnCreateToolBar( long style, wxWindowID id, const wxString& name ) -{ - return new wxToolBar( this, id, wxDefaultPosition, wxDefaultSize, style, name ); -} - -wxToolBar *wxFrame::GetToolBar(void) const -{ - return m_frameToolBar; -} - -wxStatusBar* wxFrame::CreateStatusBar( int number, long style, wxWindowID id, const wxString& name ) -{ - wxCHECK_MSG( m_frameStatusBar == NULL, FALSE, "recreating status bar in wxFrame" ); - - m_frameStatusBar = OnCreateStatusBar( number, style, id, name ); - - return m_frameStatusBar; -} - -wxStatusBar *wxFrame::OnCreateStatusBar( int number, long style, wxWindowID id, const wxString& name ) -{ - wxStatusBar *statusBar = (wxStatusBar *) NULL; - - statusBar = new wxStatusBar(this, id, wxPoint(0, 0), wxSize(100, 20), style, name); - - // Set the height according to the font and the border size - wxClientDC dc(statusBar); - dc.SetFont( *statusBar->GetFont() ); - - long x, y; - dc.GetTextExtent( "X", &x, &y ); - - int height = (int)( (y * 1.1) + 2* statusBar->GetBorderY()); - - statusBar->SetSize( -1, -1, 100, height ); - - statusBar->SetFieldsCount( number ); - return statusBar; -} - -void wxFrame::SetStatusText(const wxString& text, int number) -{ - wxCHECK_RET( m_frameStatusBar != NULL, "no statusbar to set text for" ); - - m_frameStatusBar->SetStatusText(text, number); -} - -void wxFrame::SetStatusWidths(int n, const int widths_field[] ) -{ - wxCHECK_RET( m_frameStatusBar != NULL, "no statusbar to set widths for" ); - - m_frameStatusBar->SetStatusWidths(n, widths_field); -} - -wxStatusBar *wxFrame::GetStatusBar(void) const -{ - return m_frameStatusBar; -} - -void wxFrame::SetTitle( const wxString &title ) -{ - m_title = title; - if (m_title.IsNull()) m_title = ""; - gtk_window_set_title( GTK_WINDOW(m_widget), title ); -} - -void wxFrame::SetIcon( const wxIcon &icon ) -{ - m_icon = icon; - if (!icon.Ok()) return; - - wxMask *mask = icon.GetMask(); - GdkBitmap *bm = (GdkBitmap *) NULL; - if (mask) bm = mask->GetBitmap(); - - gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm ); -} - diff --git a/src/gtk1/gauge.cpp b/src/gtk1/gauge.cpp deleted file mode 100644 index 8499339d67..0000000000 --- a/src/gtk1/gauge.cpp +++ /dev/null @@ -1,71 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gauge.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "gauge.h" -#endif - -#include "wx/gauge.h" - -//----------------------------------------------------------------------------- -// wxGauge -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxGauge,wxControl) - -bool wxGauge::Create( wxWindow *parent, wxWindowID id, int range, - const wxPoint& pos, const wxSize& size, - long style, const wxValidator& validator, const wxString& name ) -{ - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - SetValidator( validator ); - - m_rangeMax = range; - m_gaugePos = 0; - m_useProgressBar = TRUE; - - m_widget = gtk_progress_bar_new(); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -void wxGauge::SetRange( int r ) -{ - m_rangeMax = r; - if (m_gaugePos > m_rangeMax) m_gaugePos = m_rangeMax; - - gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), ((float)m_gaugePos)/m_rangeMax ); -} - -void wxGauge::SetValue( int pos ) -{ - m_gaugePos = pos; - if (m_gaugePos > m_rangeMax) m_gaugePos = m_rangeMax; - - gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), ((float)m_gaugePos)/m_rangeMax ); -} - -int wxGauge::GetRange(void) const -{ - return m_rangeMax; -} - -int wxGauge::GetValue(void) const -{ - return m_gaugePos; -} - diff --git a/src/gtk1/gdiobj.cpp b/src/gtk1/gdiobj.cpp deleted file mode 100644 index 8df2e5ff09..0000000000 --- a/src/gtk1/gdiobj.cpp +++ /dev/null @@ -1,21 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gdiobj.cpp -// Purpose: wxGDIObject class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "gdiobj.h" -#endif - -#include "wx/gdiobj.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxGDIObject, wxObject) -#endif - diff --git a/src/gtk1/horiz.xbm b/src/gtk1/horiz.xbm deleted file mode 100644 index ff3309bcc4..0000000000 --- a/src/gtk1/horiz.xbm +++ /dev/null @@ -1,6 +0,0 @@ -#define horiz_width 15 -#define horiz_height 15 -static char horiz_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00}; diff --git a/src/gtk1/icon.cpp b/src/gtk1/icon.cpp deleted file mode 100644 index 33d85df2ac..0000000000 --- a/src/gtk1/icon.cpp +++ /dev/null @@ -1,48 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: icon.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "icon.h" -#endif - -#include "wx/icon.h" - -//----------------------------------------------------------------------------- -// wxIcon -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxIcon,wxBitmap) - -wxIcon::wxIcon( char **bits, int WXUNUSED(width), int WXUNUSED(height) ) : - wxBitmap( bits ) -{ -} - -wxIcon::wxIcon() : wxBitmap() -{ -} - -wxIcon::wxIcon(const wxIcon& icon) : wxBitmap() -{ - Ref(icon); -} - -wxIcon::wxIcon(const wxIcon* icon) : wxBitmap() -{ - if (icon) Ref(*icon); -} - -wxIcon& wxIcon::operator = (const wxIcon& icon) -{ - if (*this == icon) return (*this); - Ref(icon); - return *this; -} - diff --git a/src/gtk1/joystick.cpp b/src/gtk1/joystick.cpp deleted file mode 100644 index e783f1276d..0000000000 --- a/src/gtk1/joystick.cpp +++ /dev/null @@ -1,358 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: joystick.cpp -// Purpose: wxJoystick class -// Author: Ported to Linux by Guilhem Lavaux -// Modified by: -// Created: 05/23/98 -// RCS-ID: $Id$ -// Copyright: (c) Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "joystick.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include "wx/event.h" -#include "wx/window.h" -#include "wx/gtk/joystick.h" - -#define JOYSTICK_AXE_MAX 32767 -#define JOYSTICK_AXE_MIN -32767 - -IMPLEMENT_DYNAMIC_CLASS(wxJoystick, wxObject) - -wxJoystick::wxJoystick(int joystick) -{ - wxString dev_name; - // Assume it's the same device name on all Linux systems ... - dev_name.Printf("/dev/js%d", (joystick == wxJOYSTICK1) ? 0 : 1); - - m_joystick = open(dev_name, O_RDWR); - m_lastposition = wxPoint(-1, -1); - for (int i=0;i<15;i++) - m_axe[i] = 0; - if (m_joystick != -1) - Create(); -} - -//////////////////////////////////////////////////////////////////////////// -// Background thread -//////////////////////////////////////////////////////////////////////////// -void *wxJoystick::Entry(void) -{ - struct js_event j_evt; - wxJoystickEvent jwx_event; - fd_set read_fds; - struct timeval time_out = {0, 0}; - - FD_ZERO(&read_fds); - DeferDestroy(TRUE); - while (1) { - TestDestroy(); - - if (m_polling) { - FD_SET(m_joystick, &read_fds); - select(m_joystick+1, &read_fds, NULL, NULL, &time_out); - if (FD_ISSET(m_joystick, &read_fds)) - read(m_joystick, &j_evt, sizeof(j_evt)); - else - j_evt.type = 0; - } else { - read(m_joystick, &j_evt, sizeof(j_evt)); - } - - if ((j_evt.type & JS_EVENT_AXIS) == JS_EVENT_AXIS) { - switch (j_evt.number) { - case 1: - m_lastposition.x = j_evt.value; - jwx_event.SetEventType(wxEVT_JOY_MOVE); - break; - case 2: - m_lastposition.y = j_evt.value; - jwx_event.SetEventType(wxEVT_JOY_MOVE); - break; - case 3: - m_axe[3] = j_evt.value; - jwx_event.SetEventType(wxEVT_JOY_ZMOVE); - break; - default: - m_axe[j_evt.number] = j_evt.value; - jwx_event.SetEventType(wxEVT_JOY_MOVE); - break; - } - jwx_event.SetPosition(m_lastposition); - jwx_event.SetZPosition(m_axe[3]); - } - if ((j_evt.type & JS_EVENT_BUTTON) == JS_EVENT_BUTTON) { - register int mask = 1 << j_evt.number; - char button = m_buttons & mask; - - m_buttons &= ~mask; - if (button) { - jwx_event.SetEventType(wxEVT_JOY_BUTTON_UP); - } else { - jwx_event.SetEventType(wxEVT_JOY_BUTTON_DOWN); - m_buttons |= mask; - } - - jwx_event.SetButtonState(m_buttons); - jwx_event.SetButtonChange(j_evt.number); - } - } - if (m_catchwin) - m_catchwin->ProcessEvent(jwx_event); - if (m_polling) - usleep(m_polling*1000); -} - -//////////////////////////////////////////////////////////////////////////// -// State -//////////////////////////////////////////////////////////////////////////// - -wxPoint wxJoystick::GetPosition(void) const -{ - return m_lastposition; -} - -int wxJoystick::GetZPosition(void) const -{ - return m_axe[3]; -} - -int wxJoystick::GetButtonState(void) const -{ - return m_buttons; -} - -int wxJoystick::GetPOVPosition(void) const -{ - return 0; -} - -int wxJoystick::GetPOVCTSPosition(void) const -{ - return 0; -} - -int wxJoystick::GetRudderPosition(void) const -{ - return m_axe[4]; -} - -int wxJoystick::GetUPosition(void) const -{ - return m_axe[5]; -} - -int wxJoystick::GetVPosition(void) const -{ - return m_axe[6]; -} - -int wxJoystick::GetMovementThreshold(void) const -{ - return 0; -} - -void wxJoystick::SetMovementThreshold(int threshold) -{ -} - -//////////////////////////////////////////////////////////////////////////// -// Capabilities -//////////////////////////////////////////////////////////////////////////// - -bool wxJoystick::IsOk(void) const -{ - return (m_joystick != -1); -} - -int wxJoystick::GetNumberJoysticks(void) const -{ - wxString dev_name; - int fd, j; - - for (j=0;j<2;j++) { - dev_name.Printf("/dev/js%d", j); - fd = open(dev_name, O_RDONLY); - if (fd == -1) - return j; - close(fd); - } - return j; -} - -int wxJoystick::GetManufacturerId(void) const -{ - return 0; -} - -int wxJoystick::GetProductId(void) const -{ - return 0; -} - -wxString wxJoystick::GetProductName(void) const -{ - return ""; -} - -int wxJoystick::GetXMin(void) const -{ - return JOYSTICK_AXE_MAX; -} - -int wxJoystick::GetYMin(void) const -{ - return JOYSTICK_AXE_MAX; -} - -int wxJoystick::GetZMin(void) const -{ - return JOYSTICK_AXE_MAX; -} - -int wxJoystick::GetXMax(void) const -{ - return JOYSTICK_AXE_MAX; -} - -int wxJoystick::GetYMax(void) const -{ - return JOYSTICK_AXE_MAX; -} - -int wxJoystick::GetZMax(void) const -{ - return JOYSTICK_AXE_MAX; -} - -int wxJoystick::GetNumberButtons(void) const -{ - int nb; - - ioctl(m_joystick, JSIOCGBUTTONS, &nb); - - return nb; -} - -int wxJoystick::GetNumberAxes(void) const -{ - int nb; - - ioctl(m_joystick, JSIOCGAXES, &nb); - - return nb; -} - -int wxJoystick::GetMaxButtons(void) const -{ - return 15; // internal -} - -int wxJoystick::GetMaxAxes(void) const -{ - return 15; // internal -} - -int wxJoystick::GetPollingMin(void) const -{ - return -1; -} - -int wxJoystick::GetPollingMax(void) const -{ - return -1; -} - -int wxJoystick::GetRudderMin(void) const -{ - return JOYSTICK_AXE_MIN; -} - -int wxJoystick::GetRudderMax(void) const -{ - return JOYSTICK_AXE_MAX; -} - -int wxJoystick::GetUMin(void) const -{ - return JOYSTICK_AXE_MIN; -} - -int wxJoystick::GetUMax(void) const -{ - return JOYSTICK_AXE_MAX; -} - -int wxJoystick::GetVMin(void) const -{ - return JOYSTICK_AXE_MIN; -} - -int wxJoystick::GetVMax(void) const -{ - return JOYSTICK_AXE_MAX; -} - -bool wxJoystick::HasRudder(void) const -{ - return GetNumberAxes() >= 4; -} - -bool wxJoystick::HasZ(void) const -{ - return GetNumberAxes() >= 3; -} - -bool wxJoystick::HasU(void) const -{ - return GetNumberAxes() >= 5; -} - -bool wxJoystick::HasV(void) const -{ - return GetNumberAxes() >= 6; -} - -bool wxJoystick::HasPOV(void) const -{ - return FALSE; -} - -bool wxJoystick::HasPOV4Dir(void) const -{ - return FALSE; -} - -bool wxJoystick::HasPOVCTS(void) const -{ - return FALSE; -} - -//////////////////////////////////////////////////////////////////////////// -// Operations -//////////////////////////////////////////////////////////////////////////// - -bool wxJoystick::SetCapture(wxWindow* win, int pollingFreq = 0) -{ - m_catchwin = win; - m_polling = pollingFreq; - return TRUE; -} - -bool wxJoystick::ReleaseCapture(void) -{ - m_catchwin = NULL; - m_polling = 0; - return TRUE; -} - diff --git a/src/gtk1/listbox.cpp b/src/gtk1/listbox.cpp deleted file mode 100644 index 916d8490ad..0000000000 --- a/src/gtk1/listbox.cpp +++ /dev/null @@ -1,381 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: listbox.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "listbox.h" -#endif - -#include "wx/dynarray.h" -#include "wx/listbox.h" -#include "wx/utils.h" -#include - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxListBox -//----------------------------------------------------------------------------- - -static void gtk_listitem_select_callback( GtkWidget *WXUNUSED(widget), wxListBox *listbox ) -{ - if (!listbox->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - wxCommandEvent event(wxEVT_COMMAND_LISTBOX_SELECTED, listbox->GetId() ); - - wxArrayInt aSelections; - int count = listbox->GetSelections(aSelections); - if ( count > 0 ) - { - event.m_commandInt = aSelections[0] ; - event.m_clientData = listbox->GetClientData(event.m_commandInt); - wxString str(listbox->GetString(event.m_commandInt)); - if (str != "") - event.m_commandString = copystring((char *)(const char *)str); - } - else - { - event.m_commandInt = -1 ; - event.m_commandString = copystring("") ; - } - - event.SetEventObject( listbox ); - - listbox->GetEventHandler()->ProcessEvent( event ); - if (event.m_commandString) delete[] event.m_commandString ; -} - -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxListBox,wxControl) - -wxListBox::wxListBox(void) -{ - m_list = (GtkList *) NULL; -} - -bool wxListBox::Create( wxWindow *parent, wxWindowID id, - const wxPoint &pos, const wxSize &size, - int n, const wxString choices[], - long style, const wxValidator& validator, const wxString &name ) -{ - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - SetValidator( validator ); - - m_widget = gtk_scrolled_window_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL ); - gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(m_widget), - GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC ); - - m_list = GTK_LIST( gtk_list_new() ); - - // @@ what's the difference between BROWSE and SINGLE? - GtkSelectionMode mode = GTK_SELECTION_BROWSE; - if ( style & wxLB_MULTIPLE ) - mode = GTK_SELECTION_MULTIPLE; - else if ( style & wxLB_EXTENDED ) - mode = GTK_SELECTION_EXTENDED; - - gtk_list_set_selection_mode( GTK_LIST(m_list), mode ); - - gtk_container_add (GTK_CONTAINER(m_widget), GTK_WIDGET(m_list) ); - gtk_widget_show( GTK_WIDGET(m_list) ); - - for (int i = 0; i < n; i++) - { - GtkWidget *list_item; - list_item = gtk_list_item_new_with_label( choices[i] ); - - gtk_container_add( GTK_CONTAINER(m_list), list_item ); - - gtk_signal_connect( GTK_OBJECT(list_item), "select", - GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this ); - - if ( style & wxLB_MULTIPLE ) - gtk_signal_connect( GTK_OBJECT(list_item), "deselect", - GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this ); - - m_clientData.Append( (wxObject*)NULL ); - - gtk_widget_show( list_item ); - } - - PostCreation(); - - gtk_widget_realize( GTK_WIDGET(m_list) ); - - Show( TRUE ); - - return TRUE; -} - -void wxListBox::Append( const wxString &item ) -{ - Append( item, (char*)NULL ); -} - -void wxListBox::Append( const wxString &item, char *clientData ) -{ - GtkWidget *list_item; - list_item = gtk_list_item_new_with_label( item ); - - gtk_signal_connect( GTK_OBJECT(list_item), "select", - GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this ); - - if ( GetWindowStyleFlag() & wxLB_MULTIPLE ) - gtk_signal_connect( GTK_OBJECT(list_item), "deselect", - GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this ); - - m_clientData.Append( (wxObject*)clientData ); - - gtk_container_add( GTK_CONTAINER(m_list), list_item ); - - gtk_widget_show( list_item ); -} - -void wxListBox::Clear(void) -{ - gtk_list_clear_items( m_list, 0, Number() ); - - m_clientData.Clear(); -} - -void wxListBox::Delete( int n ) -{ - GList *child = g_list_nth( m_list->children, n ); - - if (!child) - { - wxFAIL_MSG("wrong listbox index"); - return; - } - - GList *list = g_list_append( NULL, child->data ); - gtk_list_remove_items( m_list, list ); - g_list_free( list ); - - wxNode *node = m_clientData.Nth( n ); - if (!node) - { - wxFAIL_MSG("wrong listbox index"); - } - else - m_clientData.DeleteNode( node ); -} - -void wxListBox::Deselect( int n ) -{ - gtk_list_unselect_item( m_list, n ); -} - -int wxListBox::FindString( const wxString &item ) const -{ - GList *child = m_list->children; - int count = 0; - while (child) - { - GtkBin *bin = GTK_BIN( child->data ); - GtkLabel *label = GTK_LABEL( bin->child ); - if (item == label->label) return count; - count++; - child = child->next; - } - wxFAIL_MSG("wrong listbox index"); - return -1; -} - -char *wxListBox::GetClientData( int n ) const -{ - wxNode *node = m_clientData.Nth( n ); - if (node) return ((char*)node->Data()); - - wxFAIL_MSG("wrong listbox index"); - return (char *) NULL; -} - -int wxListBox::GetSelection(void) const -{ - GList *selection = m_list->selection; - if (selection) - { - GList *child = m_list->children; - int count = 0; - while (child) - { - if (child->data == selection->data) return count; - count++; - child = child->next; - } - } - wxFAIL_MSG("wrong listbox index"); - return -1; -} - -int wxListBox::GetSelections(wxArrayInt& aSelections) const -{ - // get the number of selected items first - GList *child = m_list->children; - int count = 0; - for ( child = m_list->children; child != NULL; child = child->next ) { - if ( GTK_WIDGET(child->data)->state == GTK_STATE_SELECTED ) - count++; - } - - aSelections.Empty(); - - if ( count > 0 ) { - // now fill the list - aSelections.Alloc(count); // optimization attempt - int i = 0; - for ( child = m_list->children; child != NULL; child = child->next, i++ ) { - if ( GTK_WIDGET(child->data)->state == GTK_STATE_SELECTED ) - aSelections.Add(i); - } - } - - return count; -} - -wxString wxListBox::GetString( int n ) const -{ - GList *child = g_list_nth( m_list->children, n ); - if (child) - { - GtkBin *bin = GTK_BIN( child->data ); - GtkLabel *label = GTK_LABEL( bin->child ); - return label->label; - } - wxFAIL_MSG("wrong listbox index"); - return ""; -} - -wxString wxListBox::GetStringSelection(void) const -{ - GList *selection = m_list->selection; - if (selection) - { - GtkBin *bin = GTK_BIN( selection->data ); - wxString tmp = GTK_LABEL( bin->child )->label; - return tmp; - } - wxFAIL_MSG("no listbox selection available"); - return ""; -} - -int wxListBox::Number(void) -{ - GList *child = m_list->children; - int count = 0; - while (child) { count++; child = child->next; } - return count; -} - -bool wxListBox::Selected( int n ) -{ - GList *target = g_list_nth( m_list->children, n ); - if (target) - { - GList *child = m_list->selection; - while (child) - { - if (child->data == target->data) return TRUE; - child = child->next; - } - } - wxFAIL_MSG("wrong listbox index"); - return FALSE; -} - -void wxListBox::Set( int WXUNUSED(n), const wxString *WXUNUSED(choices) ) -{ - wxFAIL_MSG("wxListBox::Set not implemented"); -} - -void wxListBox::SetClientData( int n, char *clientData ) -{ - wxNode *node = m_clientData.Nth( n ); - if (node) - { - node->SetData( (wxObject*)clientData ); - } - else - { - wxFAIL_MSG("wrong listbox index"); - } -} - -void wxListBox::SetFirstItem( int WXUNUSED(n) ) -{ - wxFAIL_MSG("wxListBox::SetFirstItem not implemented"); -} - -void wxListBox::SetFirstItem( const wxString &WXUNUSED(item) ) -{ - wxFAIL_MSG("wxListBox::SetFirstItem not implemented"); -} - -void wxListBox::SetSelection( int n, bool select ) -{ - if (select) - gtk_list_select_item( m_list, n ); - else - gtk_list_unselect_item( m_list, n ); -} - -void wxListBox::SetString( int n, const wxString &string ) -{ - GList *child = g_list_nth( m_list->children, n ); - if (child) - { - GtkBin *bin = GTK_BIN( child->data ); - GtkLabel *label = GTK_LABEL( bin->child ); - gtk_label_set( label, string ); - } - else - { - wxFAIL_MSG("wrong listbox index"); - } -} - -void wxListBox::SetStringSelection( const wxString &string, bool select ) -{ - SetSelection( FindString(string), select ); -} - -int wxListBox::GetIndex( GtkWidget *item ) const -{ - if (item) - { - GList *child = m_list->children; - int count = 0; - while (child) - { - if (GTK_WIDGET(child->data) == item) return count; - count++; - child = child->next; - } - } - return -1; -} - -GtkWidget *wxListBox::GetConnectWidget(void) -{ - return GTK_WIDGET(m_list); -} - - - diff --git a/src/gtk1/mdi.cpp b/src/gtk1/mdi.cpp deleted file mode 100644 index f902779e84..0000000000 --- a/src/gtk1/mdi.cpp +++ /dev/null @@ -1,354 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: mdi.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "mdi.h" -#endif - -#include "wx/mdi.h" -#include "wx/dialog.h" -#include "wx/menu.h" -#include "wx/gtk/win_gtk.h" -#include - -//----------------------------------------------------------------------------- - -extern wxList wxPendingDelete; - -//----------------------------------------------------------------------------- -// wxMDIParentFrame -//----------------------------------------------------------------------------- - -static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxWindow *win ) -{ - if ((win->m_x == alloc->x) && - (win->m_y == alloc->y) && - (win->m_width == alloc->width) && - (win->m_height == alloc->height)) - { - return; - } - - win->SetSize( alloc->x, alloc->y, alloc->width, alloc->height ); -} - -// page change callback -static void gtk_page_change_callback( GtkNotebook *WXUNUSED(widget), - GtkNotebookPage *page, - gint WXUNUSED(nPage), - wxMDIClientWindow *client_win ) -{ - wxNode *node = client_win->m_children.First(); - while (node) - { - wxMDIChildFrame *child_frame = (wxMDIChildFrame *)node->Data(); - if (child_frame->m_page == page) - { - wxMDIParentFrame *mdi_frame = (wxMDIParentFrame*)client_win->m_parent; - mdi_frame->m_currentChild = child_frame; - mdi_frame->SetMDIMenuBar( child_frame->m_menuBar ); - return; - } - node = node->Next(); - } -} - -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame,wxFrame) - -BEGIN_EVENT_TABLE(wxMDIParentFrame, wxFrame) -END_EVENT_TABLE() - -wxMDIParentFrame::wxMDIParentFrame(void) -{ - m_clientWindow = (wxMDIClientWindow *) NULL; - m_currentChild = (wxMDIChildFrame *) NULL; - m_parentFrameActive = TRUE; -} - -wxMDIParentFrame::wxMDIParentFrame( wxWindow *parent, - wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) -{ - m_clientWindow = (wxMDIClientWindow *) NULL; - m_currentChild = (wxMDIChildFrame *) NULL; - m_parentFrameActive = TRUE; - Create( parent, id, title, pos, size, style, name ); -} - -wxMDIParentFrame::~wxMDIParentFrame(void) -{ -} - -bool wxMDIParentFrame::Create( wxWindow *parent, - wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) -{ - wxFrame::Create( parent, id, title, pos, size, style, name ); - - OnCreateClient(); - - return TRUE; -} - -void wxMDIParentFrame::GtkOnSize( int x, int y, int width, int height ) -{ - wxFrame::GtkOnSize( x, y, width, height ); - - if (m_mdiMenuBar) - { - int x = 0; - int y = 0; - GetClientSize( &x, &y ); - m_mdiMenuBar->SetSize( 1, 1, x-2, 26 ); - } -} - -void wxMDIParentFrame::SetMDIMenuBar( wxMenuBar *menu_bar ) -{ - if (m_mdiMenuBar) m_mdiMenuBar->Show( FALSE ); - m_mdiMenuBar = menu_bar; - if (m_mdiMenuBar) - { - int x = 0; - int y = 0; - GetClientSize( &x, &y ); - m_mdiMenuBar->SetSize( 1, 1, x-2, 26 ); - m_mdiMenuBar->Show( TRUE ); - } -} - -void wxMDIParentFrame::GetClientSize(int *width, int *height ) const -{ - wxFrame::GetClientSize( width, height ); -} - -wxMDIChildFrame *wxMDIParentFrame::GetActiveChild(void) const -{ - return m_currentChild; -} - -wxMDIClientWindow *wxMDIParentFrame::GetClientWindow(void) const -{ - return m_clientWindow; -} - -wxMDIClientWindow *wxMDIParentFrame::OnCreateClient(void) -{ - m_clientWindow = new wxMDIClientWindow( this ); - return m_clientWindow; -} - -void wxMDIParentFrame::ActivateNext(void) -{ - if (m_clientWindow) - gtk_notebook_next_page( GTK_NOTEBOOK(m_clientWindow->m_widget) ); -} - -void wxMDIParentFrame::ActivatePrevious(void) -{ - if (m_clientWindow) - gtk_notebook_prev_page( GTK_NOTEBOOK(m_clientWindow->m_widget) ); -} - -void wxMDIParentFrame::OnActivate( wxActivateEvent& WXUNUSED(event) ) -{ -} - -void wxMDIParentFrame::OnSysColourChanged( wxSysColourChangedEvent& WXUNUSED(event) ) -{ -} - -//----------------------------------------------------------------------------- -// wxMDIChildFrame -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame,wxFrame) - -BEGIN_EVENT_TABLE(wxMDIChildFrame, wxFrame) - EVT_ACTIVATE(wxMDIChildFrame::OnActivate) -END_EVENT_TABLE() - -wxMDIChildFrame::wxMDIChildFrame(void) -{ - m_menuBar = (wxMenuBar *) NULL; - m_page = (GtkNotebookPage *) NULL; -} - -wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent, - wxWindowID id, const wxString& title, - const wxPoint& WXUNUSED(pos), const wxSize& size, - long style, const wxString& name ) -{ - m_menuBar = (wxMenuBar *) NULL; - m_page = (GtkNotebookPage *) NULL; - Create( parent, id, title, wxDefaultPosition, size, style, name ); -} - -wxMDIChildFrame::~wxMDIChildFrame(void) -{ - if (m_menuBar) - { - wxMDIParentFrame *mdi_frame = (wxMDIParentFrame*)m_parent->m_parent; - if (mdi_frame->m_currentChild == this) - { - mdi_frame->SetMDIMenuBar( (wxMenuBar *) NULL ); - mdi_frame->m_currentChild = (wxMDIChildFrame *) NULL; - } - delete m_menuBar; - } -} - -bool wxMDIChildFrame::Create( wxMDIParentFrame *parent, - wxWindowID id, const wxString& title, - const wxPoint& WXUNUSED(pos), const wxSize& size, - long style, const wxString& name ) -{ - m_title = title; - return wxWindow::Create( parent->GetClientWindow(), id, wxDefaultPosition, size, style, name ); -} - -void wxMDIChildFrame::GetClientSize( int *width, int *height ) const -{ - wxWindow::GetClientSize( width, height ); -} - -void wxMDIChildFrame::AddChild( wxWindow *child ) -{ - wxWindow::AddChild( child ); -} - -static void SetInvokingWindow( wxMenu *menu, wxWindow *win ) -{ - menu->SetInvokingWindow( win ); - wxNode *node = menu->m_items.First(); - while (node) - { - wxMenuItem *menuitem = (wxMenuItem*)node->Data(); - if (menuitem->IsSubMenu()) - SetInvokingWindow( menuitem->GetSubMenu(), win ); - node = node->Next(); - } -} - -void wxMDIChildFrame::SetMenuBar( wxMenuBar *menu_bar ) -{ - m_menuBar = menu_bar; - - if (m_menuBar) - { - wxMDIParentFrame *mdi_frame = (wxMDIParentFrame*)m_parent->m_parent; - - if (m_menuBar->m_parent != this) - { - wxNode *node = m_menuBar->m_menus.First(); - while (node) - { - wxMenu *menu = (wxMenu*)node->Data(); - SetInvokingWindow( menu, this ); - node = node->Next(); - } - - m_menuBar->m_parent = mdi_frame; - } - mdi_frame->SetMDIMenuBar( m_menuBar ); - - gtk_myfixed_put( GTK_MYFIXED(mdi_frame->m_mainWindow), - m_menuBar->m_widget, m_menuBar->m_x, m_menuBar->m_y ); - } -} - -wxMenuBar *wxMDIChildFrame::GetMenuBar() -{ - return m_menuBar; -} - -void wxMDIChildFrame::Activate(void) -{ -} - -void wxMDIChildFrame::OnActivate( wxActivateEvent &WXUNUSED(event) ) -{ -} - -//----------------------------------------------------------------------------- -// wxMDIClientWindow -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow,wxWindow) - -wxMDIClientWindow::wxMDIClientWindow(void) -{ -} - -wxMDIClientWindow::wxMDIClientWindow( wxMDIParentFrame *parent, long style ) -{ - CreateClient( parent, style ); -} - -wxMDIClientWindow::~wxMDIClientWindow(void) -{ -} - -bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style ) -{ - m_needParent = TRUE; - - PreCreation( parent, -1, wxPoint(10,10), wxSize(100,100), style, "wxMDIClientWindow" ); - - m_widget = gtk_notebook_new(); - - gtk_signal_connect( GTK_OBJECT(m_widget), "switch_page", - GTK_SIGNAL_FUNC(gtk_page_change_callback), (gpointer)this ); - - gtk_notebook_set_scrollable( GTK_NOTEBOOK(m_widget), 1 ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -void wxMDIClientWindow::AddChild( wxWindow *child ) -{ - if (!child->IsKindOf(CLASSINFO(wxMDIChildFrame))) - { - wxFAIL_MSG("wxNotebook::AddChild: Child has to be wxMDIChildFrame"); - return; - } - - m_children.Append( child ); - - wxString s; - wxMDIChildFrame* mdi_child = (wxMDIChildFrame*) child; - s = mdi_child->m_title; - if (s.IsNull()) s = _("MDI child"); - - GtkWidget *label_widget; - label_widget = gtk_label_new( s ); - gtk_misc_set_alignment( GTK_MISC(label_widget), 0.0, 0.5 ); - - gtk_signal_connect( GTK_OBJECT(child->m_widget), "size_allocate", - GTK_SIGNAL_FUNC(gtk_page_size_callback), (gpointer)child ); - - gtk_notebook_append_page( GTK_NOTEBOOK(m_widget), child->m_widget, label_widget ); - - mdi_child->m_page = (GtkNotebookPage*) (g_list_last(GTK_NOTEBOOK(m_widget)->children)->data); - - gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), m_children.Number()-1 ); - - gtk_page_change_callback( (GtkNotebook *) NULL, mdi_child->m_page, 0, this ); -} - - diff --git a/src/gtk1/menu.cpp b/src/gtk1/menu.cpp deleted file mode 100644 index fad9d5bb8e..0000000000 --- a/src/gtk1/menu.cpp +++ /dev/null @@ -1,428 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: menu.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: $Id$ -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "menu.h" -#endif - -#include "wx/menu.h" -#include "wx/log.h" -#include "wx/intl.h" - -//----------------------------------------------------------------------------- -// wxMenuBar -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxMenuBar,wxWindow) - -wxMenuBar::wxMenuBar() -{ - m_needParent = FALSE; // hmmm - - PreCreation( (wxWindow *) NULL, -1, wxDefaultPosition, wxDefaultSize, 0, "menu" ); - - m_menus.DeleteContents( TRUE ); - - m_widget = gtk_handle_box_new(); - - m_menubar = gtk_menu_bar_new(); - - gtk_container_add( GTK_CONTAINER(m_widget), m_menubar ); - - gtk_widget_show( m_menubar ); - - PostCreation(); - - Show( TRUE ); -} - -void wxMenuBar::Append( wxMenu *menu, const wxString &title ) -{ - m_menus.Append( menu ); - menu->m_title = title; // ?????? - - int pos; - do { - pos = menu->m_title.First( '&' ); - if (pos != -1) menu->m_title.Remove( pos, 1 ); - } while (pos != -1); - - GtkWidget *root_menu; - root_menu = gtk_menu_item_new_with_label( WXSTRINGCAST(menu->m_title) ); - gtk_widget_show( root_menu ); - gtk_menu_item_set_submenu( GTK_MENU_ITEM(root_menu), menu->m_menu ); - - gtk_menu_bar_append( GTK_MENU_BAR(m_menubar), root_menu ); -} - -static int FindMenuItemRecursive( const wxMenu *menu, const wxString &menuString, const wxString &itemString ) -{ - if (menu->m_title == menuString) - { - int res = menu->FindItem( itemString ); - if (res != -1) return res; - } - wxNode *node = menu->m_items.First(); - while (node) - { - wxMenuItem *item = (wxMenuItem*)node->Data(); - if (item->IsSubMenu()) - return FindMenuItemRecursive(item->GetSubMenu(), menuString, itemString); - node = node->Next(); - } - return -1; -} - -int wxMenuBar::FindMenuItem( const wxString &menuString, const wxString &itemString ) const -{ - wxNode *node = m_menus.First(); - while (node) - { - wxMenu *menu = (wxMenu*)node->Data(); - int res = FindMenuItemRecursive( menu, menuString, itemString); - if (res != -1) return res; - node = node->Next(); - } - return -1; -} - -// Find a wxMenuItem using its id. Recurses down into sub-menus -static wxMenuItem* FindMenuItemByIdRecursive(const wxMenu* menu, int id) -{ - wxMenuItem* result = menu->FindItem(id); - - wxNode *node = menu->m_items.First(); - while ( node && result == NULL ) { - wxMenuItem *item = (wxMenuItem*)node->Data(); - if ( item->IsSubMenu() ) - result = FindMenuItemByIdRecursive( item->GetSubMenu(), id ); - node = node->Next(); - } - - return result; -} - -wxMenuItem* wxMenuBar::FindMenuItemById( int id ) const -{ - wxMenuItem* result = 0; - wxNode *node = m_menus.First(); - while (node && result == 0) - { - wxMenu *menu = (wxMenu*)node->Data(); - result = FindMenuItemByIdRecursive( menu, id ); - node = node->Next(); - } - return result; -} - -void wxMenuBar::Check( int id, bool check ) -{ - wxMenuItem* item = FindMenuItemById( id ); - if (item) item->Check(check); -} - -bool wxMenuBar::Checked( int id ) const -{ - wxMenuItem* item = FindMenuItemById( id ); - if (item) return item->IsChecked(); - return FALSE; -} - -void wxMenuBar::Enable( int id, bool enable ) -{ - wxMenuItem* item = FindMenuItemById( id ); - if (item) item->Enable(enable); -} - -bool wxMenuBar::Enabled( int id ) const -{ - wxMenuItem* item = FindMenuItemById( id ); - if (item) return item->IsEnabled(); - return FALSE; -} - -//----------------------------------------------------------------------------- -// wxMenu -//----------------------------------------------------------------------------- - -static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu ) -{ - int id = menu->FindMenuIdByMenuItem(widget); - - wxASSERT( id != -1 ); // should find it! - - if (!menu->IsEnabled(id)) return; - - wxCommandEvent event( wxEVENT_TYPE_MENU_COMMAND, id ); - event.SetEventObject( menu ); - event.SetInt(id ); - - if (menu->m_callback) - { - (void) (*(menu->m_callback)) (*menu, event); - return; - } - - if (menu->GetEventHandler()->ProcessEvent(event)) return; - - wxWindow *win = menu->GetInvokingWindow(); - if (win) win->GetEventHandler()->ProcessEvent( event ); -} - -IMPLEMENT_DYNAMIC_CLASS(wxMenuItem,wxObject) - -wxMenuItem::wxMenuItem() -{ - m_id = ID_SEPARATOR; - m_isCheckMenu = FALSE; - m_isChecked = FALSE; - m_isEnabled = TRUE; - m_subMenu = (wxMenu *) NULL; - m_menuItem = (GtkWidget *) NULL; -} - -void wxMenuItem::SetText(const wxString& str) -{ - m_text = ""; - for ( const char *pc = str; *pc != '\0'; pc++ ) { - if ( *pc == '&' ) - pc++; // skip it - - m_text << *pc; - } -} - -void wxMenuItem::Check( bool check ) -{ - wxCHECK_RET( IsCheckable(), "Can't check uncheckable item!" ) - - m_isChecked = check; - gtk_check_menu_item_set_state( (GtkCheckMenuItem*)m_menuItem, (gint)check ); -} - -void wxMenuItem::Enable( bool enable ) -{ - gtk_widget_set_sensitive( m_menuItem, enable ); - m_isEnabled = enable; -} - -bool wxMenuItem::IsChecked() const -{ - wxCHECK( IsCheckable(), FALSE ); // can't get state of uncheckable item! - - bool bIsChecked = ((GtkCheckMenuItem*)m_menuItem)->active != 0; - - wxASSERT( bIsChecked == m_isChecked ); // consistency check - - return bIsChecked; -} - -IMPLEMENT_DYNAMIC_CLASS(wxMenu,wxEvtHandler) - -wxMenu::wxMenu( const wxString& title, const wxFunction func ) -{ - m_title = title; - m_items.DeleteContents( TRUE ); - m_invokingWindow = (wxWindow *) NULL; - m_menu = gtk_menu_new(); // Do not show! - m_callback = func; - m_eventHandler = this; - if (m_title.IsNull()) m_title = ""; - if (m_title != "") - { - Append(-2, m_title); - AppendSeparator(); - } -} - -void wxMenu::SetTitle( const wxString& title ) -{ - // Waiting for something better. - m_title = title; -} - -const wxString wxMenu::GetTitle() const -{ - return m_title; -} - -void wxMenu::AppendSeparator() -{ - wxMenuItem *mitem = new wxMenuItem(); - mitem->SetId(ID_SEPARATOR); - - GtkWidget *menuItem = gtk_menu_item_new(); - gtk_menu_append( GTK_MENU(m_menu), menuItem ); - gtk_widget_show( menuItem ); - mitem->SetMenuItem(menuItem); - m_items.Append( mitem ); -} - -void wxMenu::Append( int id, const wxString &item, const wxString &helpStr, bool checkable ) -{ - wxMenuItem *mitem = new wxMenuItem(); - mitem->SetId(id); - mitem->SetText(item); - mitem->SetHelp(helpStr); - mitem->SetCheckable(checkable); - const char *text = mitem->GetText(); - GtkWidget *menuItem = checkable ? gtk_check_menu_item_new_with_label(text) - : gtk_menu_item_new_with_label(text); - - mitem->SetMenuItem(menuItem); - - gtk_signal_connect( GTK_OBJECT(menuItem), "activate", - GTK_SIGNAL_FUNC(gtk_menu_clicked_callback), - (gpointer*)this ); - - gtk_menu_append( GTK_MENU(m_menu), menuItem ); - gtk_widget_show( menuItem ); - m_items.Append( mitem ); -} - -void wxMenu::Append( int id, const wxString &text, wxMenu *subMenu, const wxString &helpStr ) -{ - wxMenuItem *mitem = new wxMenuItem(); - mitem->SetId(id); - mitem->SetText(text); - - GtkWidget *menuItem = gtk_menu_item_new_with_label(mitem->GetText()); - mitem->SetHelp(helpStr); - mitem->SetMenuItem(menuItem); - mitem->SetSubMenu(subMenu); - - gtk_menu_item_set_submenu( GTK_MENU_ITEM(menuItem), subMenu->m_menu ); - gtk_menu_append( GTK_MENU(m_menu), menuItem ); - gtk_widget_show( menuItem ); - m_items.Append( mitem ); -} - -int wxMenu::FindItem( const wxString itemString ) const -{ - wxString s( itemString ); - - int pos; - do { - pos = s.First( '&' ); - if (pos != -1) s.Remove( pos, 1 ); - } while (pos != -1); - - wxNode *node = m_items.First(); - while (node) - { - wxMenuItem *item = (wxMenuItem*)node->Data(); - if (item->GetText() == s) - return item->GetId(); - node = node->Next(); - } - - return -1; -} - -void wxMenu::Enable( int id, bool enable ) -{ - wxMenuItem *item = FindItem(id); - if ( item ) - item->Enable(enable); -} - -bool wxMenu::IsEnabled( int id ) const -{ - wxMenuItem *item = FindItem(id); - if ( item ) - return item->IsEnabled(); - else - return FALSE; -} - -void wxMenu::Check( int id, bool enable ) -{ - wxMenuItem *item = FindItem(id); - if ( item ) - item->Check(enable); -} - -bool wxMenu::IsChecked( int id ) const -{ - wxMenuItem *item = FindItem(id); - if ( item ) - return item->IsChecked(); - else - return FALSE; -} - -void wxMenu::SetLabel( int id, const wxString &label ) -{ - wxMenuItem *item = FindItem(id); - if (item) - item->SetText(label); -} - -wxString wxMenu::GetLabel( int id ) const -{ - wxMenuItem *item = FindItem(id); - if (item) return item->GetText(); - return ""; -} - -void wxMenu::SetHelpString( int id, const wxString& helpString ) -{ - wxMenuItem *item = FindItem(id); - if (item) item->SetHelp( helpString ); -} - -wxString wxMenu::GetHelpString( int id ) const -{ - wxMenuItem *item = FindItem(id); - if (item) return item->GetHelp(); - return ""; -} - -int wxMenu::FindMenuIdByMenuItem( GtkWidget *menuItem ) const -{ - wxNode *node = m_items.First(); - while (node) - { - wxMenuItem *item = (wxMenuItem*)node->Data(); - if (item->GetMenuItem() == menuItem) - return item->GetId(); - node = node->Next(); - } - - return -1; -} - -wxMenuItem *wxMenu::FindItem(int id) const -{ - wxNode *node = m_items.First(); - while (node) { - wxMenuItem *item = (wxMenuItem*)node->Data(); - if ( item->GetId() == id ) - return item; - node = node->Next(); - } - - wxLogDebug( "wxMenu::FindItem: item %d not found.", id); - - return (wxMenuItem *) NULL; -} - -void wxMenu::SetInvokingWindow( wxWindow *win ) -{ - m_invokingWindow = win; -} - -wxWindow *wxMenu::GetInvokingWindow() -{ - return m_invokingWindow; -} - - diff --git a/src/gtk1/notebook.cpp b/src/gtk1/notebook.cpp deleted file mode 100644 index cd33a23f62..0000000000 --- a/src/gtk1/notebook.cpp +++ /dev/null @@ -1,444 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: notebook.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "notebook.h" -#endif - -#include "wx/notebook.h" -#include "wx/panel.h" -#include "wx/utils.h" -#include "wx/imaglist.h" -#include "wx/intl.h" -#include "wx/log.h" - -//----------------------------------------------------------------------------- -// wxNotebookPage -//----------------------------------------------------------------------------- - -class wxNotebookPage: public wxObject -{ -public: - wxNotebookPage() - { - m_id = -1; - m_text = ""; - m_image = -1; - m_page = (GtkNotebookPage *) NULL; - m_client = (wxWindow *) NULL; - m_parent = (GtkNotebook *) NULL; - } - -//private: - int m_id; - wxString m_text; - int m_image; - GtkNotebookPage *m_page; - GtkLabel *m_label; - wxWindow *m_client; - GtkNotebook *m_parent; -}; - -//----------------------------------------------------------------------------- -// GTK callbacks -//----------------------------------------------------------------------------- - -// page change callback -static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget), - GtkNotebookPage *WXUNUSED(page), - gint nPage, - gpointer data) -{ - wxNotebook *notebook = (wxNotebook *)data; - - int nOld = notebook->GetSelection(); - - // TODO: emulate PAGE_CHANGING event - wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, - notebook->GetId(), - nPage, - nOld); - event.SetEventObject(notebook); - notebook->ProcessEvent(event); -} - -static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxWindow *win ) -{ - if ( win->GetAutoLayout() ) - win->Layout(); - - if ((win->m_x == alloc->x) && - (win->m_y == alloc->y) && - (win->m_width == alloc->width) && - (win->m_height == alloc->height)) - { - return; - } - -/* - printf( "OnResize from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( " .\n" ); - - printf( " Old: X: %d Y: %d ", win->m_x, win->m_y ); - printf( " W: %d H: %d ", win->m_width, win->m_height ); - printf( " .\n" ); - - printf( " New: X: %d Y: %d ", alloc->x, alloc->y ); - printf( " W: %d H: %d ", alloc->width, alloc->height ); - printf( " .\n" ); -*/ - - win->SetSize( alloc->x, alloc->y, alloc->width, alloc->height ); - -/* - printf( " Res: X: %d Y: %d ", win->m_x, win->m_y ); - printf( " W: %d H: %d ", win->m_width, win->m_height ); - printf( " .\n" ); -*/ -} - -//----------------------------------------------------------------------------- -// wxNotebook -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxNotebook,wxControl) - -void wxNotebook::Init() -{ - m_imageList = (wxImageList *) NULL; - m_pages.DeleteContents( TRUE ); - m_idHandler = 0; -} - -wxNotebook::wxNotebook() -{ - Init(); -} - -wxNotebook::wxNotebook( wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) -{ - Init(); - Create( parent, id, pos, size, style, name ); -} - -wxNotebook::~wxNotebook() -{ - // don't generate change page events any more - if ( m_idHandler != 0 ) - gtk_signal_disconnect(GTK_OBJECT(m_widget), m_idHandler); - - DeleteAllPages(); -} - -bool wxNotebook::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) -{ - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - m_widget = gtk_notebook_new(); - - gtk_notebook_set_scrollable( GTK_NOTEBOOK(m_widget), 1 ); - - m_idHandler = gtk_signal_connect - ( - GTK_OBJECT(m_widget), "switch_page", - GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback), - (gpointer)this - ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -int wxNotebook::GetSelection() const -{ - if (m_pages.Number() == 0) - return -1; - - GtkNotebookPage *g_page = GTK_NOTEBOOK(m_widget)->cur_page; - - wxNotebookPage *page = (wxNotebookPage *) NULL; - - wxNode *node = m_pages.First(); - while (node) - { - page = (wxNotebookPage*)node->Data(); - if (page->m_page == g_page) - break; - node = node->Next(); - } - - wxCHECK_MSG( node != NULL, -1, "wxNotebook: no selection?" ); - - return page->m_id; -} - -int wxNotebook::GetPageCount() const -{ - return m_pages.Number(); -} - -int wxNotebook::GetRowCount() const -{ - return 1; -} - -wxString wxNotebook::GetPageText( int page ) const -{ - wxNotebookPage* nb_page = GetNotebookPage(page); - if (nb_page) - return nb_page->m_text; - else - return ""; -} - -int wxNotebook::GetPageImage( int page ) const -{ - wxNotebookPage* nb_page = GetNotebookPage(page); - if (nb_page) - return nb_page->m_image; - else - return 0; -} - -wxNotebookPage* wxNotebook::GetNotebookPage(int page) const -{ - wxNotebookPage *nb_page = (wxNotebookPage *) NULL; - - wxNode *node = m_pages.First(); - while (node) - { - nb_page = (wxNotebookPage*)node->Data(); - if (nb_page->m_id == page) - return nb_page; - node = node->Next(); - } - - wxLogDebug( "Notebook page %d not found!", page ); - - return (wxNotebookPage *) NULL; -} - -int wxNotebook::SetSelection( int page ) -{ - int selOld = GetSelection(); - wxNotebookPage* nb_page = GetNotebookPage(page); - if (!nb_page) - return -1; - - int page_num = 0; - GList *child = GTK_NOTEBOOK(m_widget)->children; - while (child) - { - if (nb_page->m_page == (GtkNotebookPage*)child->data) - break; - page_num++; - child = child->next; - } - - if (!child) return -1; - - gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), page_num ); - - return selOld; -} - -void wxNotebook::AdvanceSelection(bool bForward) -{ - int nSel = GetSelection(), - nMax = GetPageCount(); - - if ( bForward ) { - SetSelection(nSel == nMax ? 0 : nSel + 1); - } - else { - SetSelection(nSel == 0 ? nMax : nSel - 1); - } -} - -void wxNotebook::SetImageList( wxImageList* imageList ) -{ - m_imageList = imageList; -} - -bool wxNotebook::SetPageText( int page, const wxString &text ) -{ - wxNotebookPage* nb_page = GetNotebookPage(page); - if (!nb_page) - return FALSE; - - nb_page->m_text = text; - - return TRUE; -} - -bool wxNotebook::SetPageImage( int page, int image ) -{ - wxNotebookPage* nb_page = GetNotebookPage(page); - if (!nb_page) - return FALSE; - - nb_page->m_image = image; - - return TRUE; -} - -void wxNotebook::SetPageSize( const wxSize &WXUNUSED(size) ) -{ - wxFAIL_MSG(_("wxNotebook::SetPageSize not implemented")); -} - -void wxNotebook::SetPadding( const wxSize &WXUNUSED(padding) ) -{ - wxFAIL_MSG(_("wxNotebook::SetPadding not implemented")); -} - -bool wxNotebook::DeleteAllPages() -{ - wxNode *page_node = m_pages.First(); - while (page_node) - { - wxNotebookPage *page = (wxNotebookPage*)page_node->Data(); - - DeletePage( page->m_id ); - - page_node = m_pages.First(); - } - - return TRUE; -} - -bool wxNotebook::DeletePage( int page ) -{ - wxNotebookPage* nb_page = GetNotebookPage(page); - if (!nb_page) return FALSE; - - int page_num = 0; - GList *child = GTK_NOTEBOOK(m_widget)->children; - while (child) - { - if (nb_page->m_page == (GtkNotebookPage*)child->data) break; - page_num++; - child = child->next; - } - - wxASSERT( child ); - - delete nb_page->m_client; - -// Amazingly, this is not necessary -// gtk_notebook_remove_page( GTK_NOTEBOOK(m_widget), page_num ); - - m_pages.DeleteObject( nb_page ); - - return TRUE; -} - -bool wxNotebook::AddPage(wxWindow* win, const wxString& text, - bool bSelect, int imageId) -{ - // we've created the notebook page in AddChild(). Now we just have to set - // the caption for the page and set the others parameters. - - // first, find the page - wxNotebookPage *page = (wxNotebookPage *) NULL; - - wxNode *node = m_pages.First(); - while (node) - { - page = (wxNotebookPage*)node->Data(); - if ( page->m_client == win ) - break; // found - node = node->Next(); - } - - wxCHECK_MSG(page != NULL, FALSE, - _("Can't add a page whose parent is not the notebook!")); - - // then set the attributes - page->m_text = text; - if ( page->m_text.IsEmpty() ) - page->m_text = ""; - page->m_image = imageId; - gtk_label_set(page->m_label, page->m_text); - - if ( bSelect ) { - SetSelection(GetPageCount()); - } - - return TRUE; -} - -wxWindow *wxNotebook::GetPage( int page ) const -{ - wxNotebookPage* nb_page = GetNotebookPage(page); - if (!nb_page) - return (wxWindow *) NULL; - else - return nb_page->m_client; -} - -void wxNotebook::AddChild( wxWindow *win ) -{ - m_children.Append(win); - - wxNotebookPage *page = new wxNotebookPage(); - - page->m_id = GetPageCount(); - page->m_label = (GtkLabel *)gtk_label_new(_("Handle")); - page->m_client = win; - gtk_notebook_append_page( GTK_NOTEBOOK(m_widget), win->m_widget, - (GtkWidget *)page->m_label); - gtk_misc_set_alignment(GTK_MISC(page->m_label), 0.0, 0.5); - - page->m_page = - (GtkNotebookPage*) (g_list_last(GTK_NOTEBOOK(m_widget)->children)->data); - - page->m_parent = GTK_NOTEBOOK(m_widget); - - gtk_signal_connect( GTK_OBJECT(win->m_widget), "size_allocate", - GTK_SIGNAL_FUNC(gtk_page_size_callback), (gpointer)win ); - - if (!page->m_page) - { - wxLogFatalError( _("Notebook page creation error") ); - return; - } - - m_pages.Append( page ); -} - -// override these 2 functions to do nothing: everything is done in OnSize -void wxNotebook::SetConstraintSizes( bool WXUNUSED(recurse) ) -{ - // don't set the sizes of the pages - their correct size is not yet known - wxControl::SetConstraintSizes(FALSE); -} - -bool wxNotebook::DoPhase( int WXUNUSED(nPhase) ) -{ - return TRUE; -} - -//----------------------------------------------------------------------------- -// wxNotebookEvent -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent) diff --git a/src/gtk1/palette.cpp b/src/gtk1/palette.cpp deleted file mode 100644 index 5657c4355e..0000000000 --- a/src/gtk1/palette.cpp +++ /dev/null @@ -1,106 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: palette.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "palette.h" -#endif - -#include "wx/palette.h" - -//----------------------------------------------------------------------------- -// wxPalette -//----------------------------------------------------------------------------- - -class wxPaletteRefData: public wxObjectRefData -{ - public: - - wxPaletteRefData(void); - ~wxPaletteRefData(void); - - GdkColormap *m_colormap; -}; - -wxPaletteRefData::wxPaletteRefData(void) -{ - m_colormap = (GdkColormap *) NULL; -}; - -wxPaletteRefData::~wxPaletteRefData(void) -{ - if (m_colormap) gdk_colormap_unref( m_colormap ); -}; - -//----------------------------------------------------------------------------- - -#define M_PALETTEDATA ((wxPaletteRefData *)m_refData) - -IMPLEMENT_DYNAMIC_CLASS(wxPalette,wxGDIObject) - -wxPalette::wxPalette(void) -{ -}; - -wxPalette::wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue ) -{ - m_refData = new wxPaletteRefData(); - Create( n, red, green, blue ); -}; - -wxPalette::wxPalette( const wxPalette& palette ) -{ - Ref( palette ); -}; - -wxPalette::wxPalette( const wxPalette* palette ) -{ - UnRef(); - if (palette) Ref( *palette ); -}; - -wxPalette::~wxPalette(void) -{ -}; - -wxPalette& wxPalette::operator = ( const wxPalette& palette ) -{ - if (*this == palette) return (*this); - Ref( palette ); - return *this; -}; - -bool wxPalette::operator == ( const wxPalette& palette ) -{ - return m_refData == palette.m_refData; -}; - -bool wxPalette::operator != ( const wxPalette& palette ) -{ - return m_refData != palette.m_refData; -}; - -bool wxPalette::Ok(void) const -{ - return (m_refData); -}; - -bool wxPalette::Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue) -{ -}; - -int wxPalette::GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const -{ -}; - -bool wxPalette::GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const -{ -}; - diff --git a/src/gtk1/pen.cpp b/src/gtk1/pen.cpp deleted file mode 100644 index b50ec2063e..0000000000 --- a/src/gtk1/pen.cpp +++ /dev/null @@ -1,207 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: pen.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "pen.h" -#endif - -#include "wx/pen.h" - -//----------------------------------------------------------------------------- -// wxPen -//----------------------------------------------------------------------------- - -class wxPenRefData: public wxObjectRefData -{ - public: - - wxPenRefData(void); - - int m_width; - int m_style; - int m_joinStyle; - int m_capStyle; - wxColour m_colour; -}; - -wxPenRefData::wxPenRefData(void) -{ - m_width = 1; - m_style = wxSOLID; - m_joinStyle = wxJOIN_ROUND; - m_capStyle = wxCAP_ROUND; -} - -//----------------------------------------------------------------------------- - -#define M_PENDATA ((wxPenRefData *)m_refData) - -IMPLEMENT_DYNAMIC_CLASS(wxPen,wxGDIObject) - -wxPen::wxPen(void) -{ - if (wxThePenList) wxThePenList->AddPen( this ); -} - -wxPen::wxPen( const wxColour &colour, int width, int style ) -{ - m_refData = new wxPenRefData(); - M_PENDATA->m_width = width; - M_PENDATA->m_style = style; - M_PENDATA->m_colour = colour; - - if (wxThePenList) wxThePenList->AddPen( this ); -} - -wxPen::wxPen( const wxString &colourName, int width, int style ) -{ - m_refData = new wxPenRefData(); - M_PENDATA->m_width = width; - M_PENDATA->m_style = style; - M_PENDATA->m_colour = colourName; - - if (wxThePenList) wxThePenList->AddPen( this ); -} - -wxPen::wxPen( const wxPen& pen ) -{ - Ref( pen ); - if (wxThePenList) wxThePenList->AddPen( this ); -} - -wxPen::wxPen( const wxPen* pen ) -{ - UnRef(); - if (pen) Ref( *pen ); - - if (wxThePenList) wxThePenList->AddPen( this ); -} - -wxPen::~wxPen(void) -{ - if (wxThePenList) wxThePenList->RemovePen( this ); -} - -wxPen& wxPen::operator = ( const wxPen& pen ) -{ - if (*this == pen) return (*this); - Ref( pen ); - return *this; -} - -bool wxPen::operator == ( const wxPen& pen ) -{ - return m_refData == pen.m_refData; -} - -bool wxPen::operator != ( const wxPen& pen ) -{ - return m_refData != pen.m_refData; -} - -void wxPen::SetColour( const wxColour &colour ) -{ - if (!m_refData) - m_refData = new wxPenRefData(); - - M_PENDATA->m_colour = colour; -} - -void wxPen::SetColour( const wxString &colourName ) -{ - if (!m_refData) - m_refData = new wxPenRefData(); - - M_PENDATA->m_colour = colourName; -} - -void wxPen::SetColour( int red, int green, int blue ) -{ - if (!m_refData) - m_refData = new wxPenRefData(); - - M_PENDATA->m_colour.Set( red, green, blue ); -} - -void wxPen::SetCap( int capStyle ) -{ - if (!m_refData) - m_refData = new wxPenRefData(); - - M_PENDATA->m_capStyle = capStyle; -} - -void wxPen::SetJoin( int joinStyle ) -{ - if (!m_refData) - m_refData = new wxPenRefData(); - - M_PENDATA->m_joinStyle = joinStyle; -} - -void wxPen::SetStyle( int style ) -{ - if (!m_refData) - m_refData = new wxPenRefData(); - - M_PENDATA->m_style = style; -} - -void wxPen::SetWidth( int width ) -{ - if (!m_refData) - m_refData = new wxPenRefData(); - - M_PENDATA->m_width = width; -} - -int wxPen::GetCap(void) const -{ - return M_PENDATA->m_capStyle; -} - -int wxPen::GetJoin(void) const -{ - if (!m_refData) - return 0; - else - return M_PENDATA->m_joinStyle; -} - -int wxPen::GetStyle(void) const -{ - if (!m_refData) - return 0; - else - return M_PENDATA->m_style; -} - -int wxPen::GetWidth(void) const -{ - if (!m_refData) - return 0; - else - return M_PENDATA->m_width; -} - -wxColour &wxPen::GetColour(void) const -{ - if (!m_refData) - return wxNullColour; - else - return M_PENDATA->m_colour; -} - -bool wxPen::Ok(void) const -{ - return (m_refData); -} - diff --git a/src/gtk1/radiobox.cpp b/src/gtk1/radiobox.cpp deleted file mode 100644 index c8120af624..0000000000 --- a/src/gtk1/radiobox.cpp +++ /dev/null @@ -1,281 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: radiobox.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "radiobox.h" -#endif - -#include "wx/radiobox.h" -#include "wx/dialog.h" -#include "wx/frame.h" -#include "wx/gtk/win_gtk.h" - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxRadioBox -//----------------------------------------------------------------------------- - -static void gtk_radiobutton_clicked_callback( GtkWidget *WXUNUSED(widget), wxRadioBox *rb ) -{ - if (!rb->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - if (rb->m_alreadySent) - { - rb->m_alreadySent = FALSE; - return; - } - - rb->m_alreadySent = TRUE; - - wxCommandEvent event( wxEVT_COMMAND_RADIOBOX_SELECTED, rb->GetId() ); - event.SetInt( rb->GetSelection() ); - wxString tmp( rb->GetStringSelection() ); - event.SetString( WXSTRINGCAST(tmp) ); - event.SetEventObject( rb ); - rb->GetEventHandler()->ProcessEvent(event); -} - -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxRadioBox,wxControl) - -wxRadioBox::wxRadioBox(void) -{ -} - -bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint &pos, const wxSize &size, - int n, const wxString choices[], int WXUNUSED(majorDim), - long style, const wxValidator& validator, const wxString &name ) -{ - m_alreadySent = FALSE; - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - SetValidator( validator ); - - m_widget = gtk_frame_new( title ); - - int x = m_x+5; - int y = m_y+15; - int maxLen = 0; - int height = 20; - -// if (((m_style & wxRA_VERTICAL) == wxRA_VERTICAL) && (n > 0)) - if (n > 0) - { - GSList *radio_button_group = (GSList *) NULL; - for (int i = 0; i < n; i++) - { - if (i) radio_button_group = gtk_radio_button_group( GTK_RADIO_BUTTON(m_radio) ); - - m_radio = GTK_RADIO_BUTTON( gtk_radio_button_new_with_label( radio_button_group, choices[i] ) ); - - if (!i) gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_radio), TRUE ); - - gtk_signal_connect( GTK_OBJECT(m_radio), "clicked", - GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this ); - - gtk_myfixed_put( GTK_MYFIXED(m_parent->m_wxwindow), GTK_WIDGET(m_radio), x, y ); - - int tmp = 22+gdk_string_measure( GTK_WIDGET(m_radio)->style->font, choices[i] ); - if (tmp > maxLen) maxLen = tmp; - - int width = m_width-10; - if (size.x == -1) width = tmp; - gtk_widget_set_usize( GTK_WIDGET(m_radio), width, 20 ); - - y += 20; - height += 20; - - } - } - - wxSize newSize = size; - if (newSize.x == -1) newSize.x = maxLen+10; - if (newSize.y == -1) newSize.y = height; - SetSize( newSize.x, newSize.y ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -bool wxRadioBox::Show( bool show ) -{ - wxWindow::Show( show ); - - GSList *item = gtk_radio_button_group( m_radio ); - while (item) - { - GtkWidget *w = GTK_WIDGET( item->data ); - if (show) gtk_widget_show( w ); else gtk_widget_hide( w ); - item = item->next; - } - - return TRUE; -} - -int wxRadioBox::FindString( const wxString &s ) const -{ - GSList *item = gtk_radio_button_group( m_radio ); - - int count = g_slist_length(item)-1; - - while (item) - { - GtkButton *b = GTK_BUTTON( item->data ); - GtkLabel *l = GTK_LABEL( b->child ); - if (s == l->label) return count; - count--; - item = item->next; - } - - return -1; -} - -void wxRadioBox::SetSelection( int n ) -{ - GSList *item = gtk_radio_button_group( m_radio ); - item = g_slist_nth( item, g_slist_length(item)-n-1 ); - if (!item) return; - - GtkToggleButton *button = GTK_TOGGLE_BUTTON( item->data ); - - gtk_toggle_button_set_state( button, 1 ); -} - -int wxRadioBox::GetSelection(void) const -{ - GSList *item = gtk_radio_button_group( m_radio ); - int count = 0; - int found = -1; - while (item) - { - GtkButton *button = GTK_BUTTON( item->data ); - if (GTK_TOGGLE_BUTTON(button)->active) found = count; - count++; - item = item->next; - } - - return found != -1 ? count-found-1 : -1; -} - -wxString wxRadioBox::GetString( int n ) const -{ - GSList *item = gtk_radio_button_group( m_radio ); - - item = g_slist_nth( item, g_slist_length(item)-n-1 ); - if (!item) return ""; - - GtkToggleButton *button = GTK_TOGGLE_BUTTON( item->data ); - - GtkLabel *label = GTK_LABEL( GTK_BUTTON(button)->child ); - - return wxString( label->label ); -} - -wxString wxRadioBox::GetLabel(void) const -{ - return wxControl::GetLabel(); -} - -void wxRadioBox::SetLabel( const wxString& WXUNUSED(label) ) -{ - wxFAIL_MSG("wxRadioBox::SetLabel not implemented."); -} - -void wxRadioBox::SetLabel( int WXUNUSED(item), const wxString& WXUNUSED(label) ) -{ - wxFAIL_MSG("wxRadioBox::SetLabel not implemented."); -} - -void wxRadioBox::SetLabel( int WXUNUSED(item), wxBitmap *WXUNUSED(bitmap) ) -{ - wxFAIL_MSG("wxRadioBox::SetLabel not implemented."); -} - -wxString wxRadioBox::GetLabel( int WXUNUSED(item) ) const -{ - wxFAIL_MSG("wxRadioBox::GetLabel not implemented."); - return ""; -} - -void wxRadioBox::Enable( bool WXUNUSED(enable) ) -{ - wxFAIL_MSG("wxRadioBox::Enable not implemented."); -} - -void wxRadioBox::Enable( int WXUNUSED(item), bool WXUNUSED(enable) ) -{ - wxFAIL_MSG("wxRadioBox::Enable not implemented."); -} - -void wxRadioBox::Show( int WXUNUSED(item), bool WXUNUSED(show) ) -{ - wxFAIL_MSG("wxRadioBox::Show not implemented."); -} - -wxString wxRadioBox::GetStringSelection(void) const -{ - GSList *item = gtk_radio_button_group( m_radio ); - while (item) - { - GtkButton *button = GTK_BUTTON( item->data ); - if (GTK_TOGGLE_BUTTON(button)->active) - { - GtkLabel *label = GTK_LABEL( button->child ); - return label->label; - } - item = item->next; - } - return ""; -} - -bool wxRadioBox::SetStringSelection( const wxString&s ) -{ - int res = FindString( s ); - if (res == -1) return FALSE; - SetSelection( res ); - return TRUE; -} - -int wxRadioBox::Number(void) const -{ - int count = 0; - GSList *item = gtk_radio_button_group( m_radio ); - while (item) - { - item = item->next; - count++; - } - return count; -} - -int wxRadioBox::GetNumberOfRowsOrCols(void) const -{ - return 1; -} - -void wxRadioBox::SetNumberOfRowsOrCols( int WXUNUSED(n) ) -{ - wxFAIL_MSG("wxRadioBox::SetNumberOfRowsOrCols not implemented."); -} - diff --git a/src/gtk1/radiobut.cpp b/src/gtk1/radiobut.cpp deleted file mode 100644 index 321210ec3d..0000000000 --- a/src/gtk1/radiobut.cpp +++ /dev/null @@ -1,89 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: radiobut.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "radiobut.h" -#endif - -#include "wx/radiobut.h" - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxRadioButton -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxRadioButton,wxControl) - -static void gtk_radiobutton_clicked_callback( GtkWidget *WXUNUSED(widget), wxRadioButton *rb ) -{ - if (!rb->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - wxCommandEvent event( wxEVT_COMMAND_RADIOBUTTON_SELECTED, rb->GetId()); - event.SetInt( rb->GetValue() ); - event.SetEventObject( rb ); - rb->GetEventHandler()->ProcessEvent( event ); -} - -bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos, const wxSize& size, long style, - const wxValidator& validator, const wxString& name ) -{ - m_needParent = TRUE; - - wxSize newSize = size; - - PreCreation( parent, id, pos, newSize, style, name ); - - SetValidator( validator ); - - m_widget = gtk_radio_button_new_with_label( (GSList *) NULL, label ); - - SetLabel(label); - - if (newSize.x == -1) newSize.x = 22+gdk_string_measure( m_widget->style->font, label ); - if (newSize.y == -1) newSize.y = 26; - SetSize( newSize.x, newSize.y ); - - gtk_signal_connect( GTK_OBJECT(m_widget), "clicked", - GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -void wxRadioButton::SetLabel( const wxString& label ) -{ - wxControl::SetLabel( label ); - GtkButton *bin = GTK_BUTTON( m_widget ); - GtkLabel *g_label = GTK_LABEL( bin->child ); - gtk_label_set( g_label, GetLabel() ); -} - -void wxRadioButton::SetValue( bool val ) -{ - gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_widget), val ); -} - -bool wxRadioButton::GetValue(void) const -{ - return GTK_TOGGLE_BUTTON(m_widget)->active; -} - - diff --git a/src/gtk1/region.cpp b/src/gtk1/region.cpp deleted file mode 100644 index 274e53b35d..0000000000 --- a/src/gtk1/region.cpp +++ /dev/null @@ -1,422 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: region.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/98 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "region.h" -#endif - -#include "wx/region.h" - -//----------------------------------------------------------------------------- -// wxRegion -//----------------------------------------------------------------------------- - -class wxRegionRefData: public wxObjectRefData -{ - public: - - wxRegionRefData(void); - ~wxRegionRefData(void); - - public: - - GdkRegion *m_region; - wxList m_rects; -}; - -wxRegionRefData::wxRegionRefData(void) -{ - m_region = (GdkRegion *) NULL; -} - -wxRegionRefData::~wxRegionRefData(void) -{ - if (m_region) gdk_region_destroy( m_region ); - - wxNode *node = m_rects.First(); - while (node) - { - wxRect *r = (wxRect*)node->Data(); - delete r; - node = node->Next(); - } -} - -//----------------------------------------------------------------------------- - -#define M_REGIONDATA ((wxRegionRefData *)m_refData) - -IMPLEMENT_DYNAMIC_CLASS(wxRegion,wxGDIObject); - -wxRegion::wxRegion( long x, long y, long w, long h ) -{ - m_refData = new wxRegionRefData(); - GdkRegion *reg = gdk_region_new(); - GdkRectangle rect; - rect.x = x; - rect.y = y; - rect.width = w; - rect.height = h; - M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &rect ); - gdk_region_destroy( reg ); - M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(x,y,w,h) ); -} - -wxRegion::wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight ) -{ - m_refData = new wxRegionRefData(); - GdkRegion *reg = gdk_region_new(); - GdkRectangle rect; - rect.x = topLeft.x; - rect.y = topLeft.y; - rect.width = bottomRight.x - rect.x; - rect.height = bottomRight.y - rect.y; - M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &rect ); - gdk_region_destroy( reg ); - M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(topLeft,bottomRight) ); -} - -wxRegion::wxRegion( const wxRect& rect ) -{ - m_refData = new wxRegionRefData(); - GdkRegion *reg = gdk_region_new(); - GdkRectangle g_rect; - g_rect.x = rect.x; - g_rect.y = rect.y; - g_rect.width = rect.width; - g_rect.height = rect.height; - M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &g_rect ); - gdk_region_destroy( reg ); - - wxNode *node = M_REGIONDATA->m_rects.First(); - while (node) - { - wxRect *r = (wxRect*)node->Data(); - M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(r->x,r->y,r->width,r->height) ); - node = node->Next(); - } -} - -wxRegion::wxRegion(void) -{ - m_refData = new wxRegionRefData(); - M_REGIONDATA->m_region = gdk_region_new(); -} - -wxRegion::~wxRegion(void) -{ -} - -void wxRegion::Clear(void) -{ - UnRef(); - m_refData = new wxRegionRefData(); - M_REGIONDATA->m_region = gdk_region_new(); -} - -bool wxRegion::Union( long x, long y, long width, long height ) -{ - GdkRectangle rect; - rect.x = x; - rect.y = y; - rect.width = width; - rect.height = height; - GdkRegion *reg = gdk_region_union_with_rect( M_REGIONDATA->m_region, &rect ); - gdk_region_destroy( M_REGIONDATA->m_region ); - M_REGIONDATA->m_region = reg; - M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(x,y,width,height) ); - return TRUE; -} - -bool wxRegion::Union( const wxRect& rect ) -{ - GdkRectangle g_rect; - g_rect.x = rect.x; - g_rect.y = rect.y; - g_rect.width = rect.width; - g_rect.height = rect.height; - GdkRegion *reg = gdk_region_union_with_rect( M_REGIONDATA->m_region, &g_rect ); - gdk_region_destroy( M_REGIONDATA->m_region ); - M_REGIONDATA->m_region = reg; - M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(rect.x,rect.y,rect.width,rect.height) ); - return TRUE; -} - -bool wxRegion::Union( const wxRegion& region ) -{ - GdkRegion *reg = gdk_regions_union( M_REGIONDATA->m_region, region.GetRegion() ); - gdk_region_destroy( M_REGIONDATA->m_region ); - M_REGIONDATA->m_region = reg; - - wxNode *node = region.GetRectList()->First(); - while (node) - { - wxRect *r = (wxRect*)node->Data(); - M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(r->x,r->y,r->width,r->height) ); - node = node->Next(); - } - - return TRUE; -} - -bool wxRegion::Intersect( long x, long y, long width, long height ) -{ - wxRegion reg( x, y, width, height ); - Intersect( reg ); - return TRUE; -} - -bool wxRegion::Intersect( const wxRect& rect ) -{ - wxRegion reg( rect ); - Intersect( reg ); - return TRUE; -} - -bool wxRegion::Intersect( const wxRegion& region ) -{ - GdkRegion *reg = gdk_regions_intersect( M_REGIONDATA->m_region, region.GetRegion() ); - gdk_region_destroy( M_REGIONDATA->m_region ); - M_REGIONDATA->m_region = reg; - return TRUE; -} - -bool wxRegion::Subtract( long x, long y, long width, long height ) -{ - wxRegion reg( x, y, width, height ); - Subtract( reg ); - return TRUE; -} - -bool wxRegion::Subtract( const wxRect& rect ) -{ - wxRegion reg( rect ); - Subtract( reg ); - return TRUE; -} - -bool wxRegion::Subtract( const wxRegion& region ) -{ - GdkRegion *reg = gdk_regions_subtract( M_REGIONDATA->m_region, region.GetRegion() ); - gdk_region_destroy( M_REGIONDATA->m_region ); - M_REGIONDATA->m_region = reg; - return TRUE; -} - -bool wxRegion::Xor( long x, long y, long width, long height ) -{ - wxRegion reg( x, y, width, height ); - Xor( reg ); - return TRUE; -} - -bool wxRegion::Xor( const wxRect& rect ) -{ - wxRegion reg( rect ); - Xor( reg ); - return TRUE; -} - -bool wxRegion::Xor( const wxRegion& region ) -{ - GdkRegion *reg = gdk_regions_xor( M_REGIONDATA->m_region, region.GetRegion() ); - gdk_region_destroy( M_REGIONDATA->m_region ); - M_REGIONDATA->m_region = reg; - - wxNode *node = region.GetRectList()->First(); - while (node) - { - wxRect *r = (wxRect*)node->Data(); - M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(r->x,r->y,r->width,r->height) ); - node = node->Next(); - } - - return TRUE; -} - -void wxRegion::GetBox( long& x, long& y, long&w, long &h ) const -{ - x = 0; - y = 0; - w = -1; - h = -1; - wxNode *node = GetRectList()->First(); - while (node) - { - wxRect *r = (wxRect*)node->Data(); - if (node == GetRectList()->First()) - { - x = r->x; - y = r->y; - w = r->width; - h = r->height; - } - else - { - if (r->x < x) - { - x = r->x; - w += x - r->x; - } - if (r->y < y) - { - y = r->y; - h += y - r->y; - } - if (r->width+r->x > x+w) - { - w = r->x + r->width - x; - } - if (r->height+r->y > y+h) - { - h = r->y + r->height - y; - } - } - node = node->Next(); - } -} - -wxRect wxRegion::GetBox(void) const -{ - long x = 0; - long y = 0; - long w = -1; - long h = -1; - GetBox( x, y, w, h ); - return wxRect( x, y, w, h ); -} - -bool wxRegion::Empty(void) const -{ - return gdk_region_empty( M_REGIONDATA->m_region ); -} - -wxRegionContain wxRegion::Contains( long x, long y ) const -{ - if (gdk_region_point_in( M_REGIONDATA->m_region, x, y )) - return wxInRegion; - else - return wxOutRegion; -} - -wxRegionContain wxRegion::Contains( long x, long y, long w, long h ) const -{ - GdkRectangle rect; - rect.x = x; - rect.y = y; - rect.width = w; - rect.height = h; - GdkOverlapType res = gdk_region_rect_in( M_REGIONDATA->m_region, &rect ); - switch (res) - { - case GDK_OVERLAP_RECTANGLE_IN: return wxInRegion; - case GDK_OVERLAP_RECTANGLE_OUT: return wxOutRegion; - case GDK_OVERLAP_RECTANGLE_PART: return wxPartRegion; - } - return wxOutRegion; -} - -wxRegionContain wxRegion::Contains(const wxPoint& pt) const -{ - return Contains( pt.x, pt.y ); -} - -wxRegionContain wxRegion::Contains(const wxRect& rect) const -{ - return Contains( rect.x, rect.y, rect.width, rect.height ); -} - -GdkRegion *wxRegion::GetRegion(void) const -{ - return M_REGIONDATA->m_region; -} - -wxList *wxRegion::GetRectList() const -{ - return &(M_REGIONDATA->m_rects); -} - -//----------------------------------------------------------------------------- -// wxRegion -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator,wxObject); - -wxRegionIterator::wxRegionIterator(void) -{ - m_current = 0; -} - -wxRegionIterator::wxRegionIterator( const wxRegion& region ) -{ - m_region = region; - m_current = 0; -} - -void wxRegionIterator::Reset( const wxRegion& region ) -{ - m_region = region; - m_current = 0; -} - -wxRegionIterator::operator bool (void) const -{ - return m_current < m_region.GetRectList()->Number(); -} - -bool wxRegionIterator::HaveRects(void) const -{ - return m_current < m_region.GetRectList()->Number(); -} - -void wxRegionIterator::operator ++ (void) -{ - if (m_current < m_region.GetRectList()->Number()) ++m_current; -} - -void wxRegionIterator::operator ++ (int) -{ - if (m_current < m_region.GetRectList()->Number()) ++m_current; -} - -long wxRegionIterator::GetX(void) const -{ - wxNode *node = m_region.GetRectList()->Nth( m_current ); - if (!node) return 0; - wxRect *r = (wxRect*)node->Data(); - return r->x; -} - -long wxRegionIterator::GetY(void) const -{ - wxNode *node = m_region.GetRectList()->Nth( m_current ); - if (!node) return 0; - wxRect *r = (wxRect*)node->Data(); - return r->y; -} - -long wxRegionIterator::GetW(void) const -{ - wxNode *node = m_region.GetRectList()->Nth( m_current ); - if (!node) return 0; - wxRect *r = (wxRect*)node->Data(); - return r->width; -} - -long wxRegionIterator::GetH(void) const -{ - wxNode *node = m_region.GetRectList()->Nth( m_current ); - if (!node) return 0; - wxRect *r = (wxRect*)node->Data(); - return r->height; -} - - diff --git a/src/gtk1/scrolbar.cpp b/src/gtk1/scrolbar.cpp deleted file mode 100644 index de1cb7a888..0000000000 --- a/src/gtk1/scrolbar.cpp +++ /dev/null @@ -1,211 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: scrolbar.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "scrolbar.h" -#endif - -#include "wx/scrolbar.h" -#include "wx/utils.h" - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxScrollBar -//----------------------------------------------------------------------------- - -static void gtk_scrollbar_callback( GtkWidget *WXUNUSED(widget), wxScrollBar *win ) -{ - if (!win->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - float diff = win->m_adjust->value - win->m_oldPos; - if (fabs(diff) < 0.2) return; - - wxEventType command = wxEVT_NULL; - - float line_step = win->m_adjust->step_increment; - float page_step = win->m_adjust->page_increment; - - if (fabs(diff-line_step) < 0.2) command = wxEVT_SCROLL_LINEDOWN; - else if (fabs(diff+line_step) < 0.2) command = wxEVT_SCROLL_LINEUP; - else if (fabs(diff-page_step) < 0.2) command = wxEVT_SCROLL_PAGEDOWN; - else if (fabs(diff+page_step) < 0.2) command = wxEVT_SCROLL_PAGEUP; - else command = wxEVT_SCROLL_THUMBTRACK; - - int value = (int)(win->m_adjust->value+0.5); - - int orient = wxHORIZONTAL; - if (win->GetWindowStyleFlag() & wxSB_VERTICAL == wxSB_VERTICAL) orient = wxHORIZONTAL; - - wxScrollEvent event( command, win->GetId(), value, orient ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); - -/* - wxCommandEvent cevent( wxEVT_COMMAND_SCROLLBAR_UPDATED, win->GetId() ); - cevent.SetEventObject( win ); - win->ProcessEvent( cevent ); -*/ -} - -IMPLEMENT_DYNAMIC_CLASS(wxScrollBar,wxControl) - -wxScrollBar::~wxScrollBar(void) -{ -} - -bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - long style, const wxValidator& validator, const wxString& name ) -{ - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - SetValidator( validator ); - - m_oldPos = 0.0; - - if (style & wxSB_VERTICAL == wxSB_VERTICAL) - m_widget = gtk_hscrollbar_new( (GtkAdjustment *) NULL ); - else - m_widget = gtk_vscrollbar_new( (GtkAdjustment *) NULL ); - - m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) ); - - gtk_signal_connect (GTK_OBJECT (m_adjust), "value_changed", - (GtkSignalFunc) gtk_scrollbar_callback, (gpointer) this ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -int wxScrollBar::GetPosition(void) const -{ - return (int)(m_adjust->value+0.5); -} - -int wxScrollBar::GetThumbSize() const -{ - return (int)(m_adjust->page_size+0.5); -} - -int wxScrollBar::GetPageSize() const -{ - return (int)(m_adjust->page_increment+0.5); -} - -int wxScrollBar::GetRange() const -{ - return (int)(m_adjust->upper+0.5); -} - -void wxScrollBar::SetPosition( int viewStart ) -{ - float fpos = (float)viewStart; - m_oldPos = fpos; - if (fabs(fpos-m_adjust->value) < 0.2) return; - m_adjust->value = fpos; - - gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "value_changed" ); -} - -void wxScrollBar::SetScrollbar( int position, int thumbSize, int range, int pageSize, - bool WXUNUSED(refresh) ) -{ - float fpos = (float)position; - m_oldPos = fpos; - float frange = (float)range; - float fthumb = (float)thumbSize; - float fpage = (float)pageSize; - - if ((fabs(fpos-m_adjust->value) < 0.2) && - (fabs(frange-m_adjust->upper) < 0.2) && - (fabs(fthumb-m_adjust->page_size) < 0.2) && - (fabs(fpage-m_adjust->page_increment) < 0.2)) - return; - - m_adjust->lower = 0.0; - m_adjust->upper = frange; - m_adjust->value = fpos; - m_adjust->step_increment = 1.0; - m_adjust->page_increment = (float)(wxMax(fpage-2,0)); - m_adjust->page_size = fthumb; - - gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "changed" ); -} - -// Backward compatibility -int wxScrollBar::GetValue(void) const -{ - return GetPosition(); -} - -void wxScrollBar::SetValue( int viewStart ) -{ - SetPosition( viewStart ); -} - -void wxScrollBar::GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength ) const -{ - int pos = (int)(m_adjust->value+0.5); - int thumb = (int)(m_adjust->page_size+0.5); - int page = (int)(m_adjust->page_increment+0.5); - int range = (int)(m_adjust->upper+0.5); - - *viewStart = pos; - *viewLength = range; - *objectLength = thumb; - *pageLength = page; -} - -int wxScrollBar::GetViewLength() const -{ - return (int)(m_adjust->upper+0.5); -} - -int wxScrollBar::GetObjectLength() const -{ - return (int)(m_adjust->page_size+0.5); -} - -void wxScrollBar::SetPageSize( int pageLength ) -{ - int pos = (int)(m_adjust->value+0.5); - int thumb = (int)(m_adjust->page_size+0.5); - int range = (int)(m_adjust->upper+0.5); - SetScrollbar( pos, thumb, range, pageLength ); -} - -void wxScrollBar::SetObjectLength( int objectLength ) -{ - int pos = (int)(m_adjust->value+0.5); - int page = (int)(m_adjust->page_increment+0.5); - int range = (int)(m_adjust->upper+0.5); - SetScrollbar( pos, objectLength, range, page ); -} - -void wxScrollBar::SetViewLength( int viewLength ) -{ - int pos = (int)(m_adjust->value+0.5); - int thumb = (int)(m_adjust->page_size+0.5); - int page = (int)(m_adjust->page_increment+0.5); - SetScrollbar( pos, thumb, viewLength, page ); -} - diff --git a/src/gtk1/settings.cpp b/src/gtk1/settings.cpp deleted file mode 100644 index b3e40b850b..0000000000 --- a/src/gtk1/settings.cpp +++ /dev/null @@ -1,188 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: settings.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "settings.h" -#endif - -#include "wx/settings.h" - -/* -#define wxSYS_COLOUR_SCROLLBAR 0 -#define wxSYS_COLOUR_BACKGROUND 1 -#define wxSYS_COLOUR_ACTIVECAPTION 2 -#define wxSYS_COLOUR_INACTIVECAPTION 3 -#define wxSYS_COLOUR_MENU 4 -#define wxSYS_COLOUR_WINDOW 5 -#define wxSYS_COLOUR_WINDOWFRAME 6 -#define wxSYS_COLOUR_MENUTEXT 7 -#define wxSYS_COLOUR_WINDOWTEXT 8 -#define wxSYS_COLOUR_CAPTIONTEXT 9 -#define wxSYS_COLOUR_ACTIVEBORDER 10 -#define wxSYS_COLOUR_INACTIVEBORDER 11 -#define wxSYS_COLOUR_APPWORKSPACE 12 -#define wxSYS_COLOUR_HIGHLIGHT 13 -#define wxSYS_COLOUR_HIGHLIGHTTEXT 14 -#define wxSYS_COLOUR_BTNFACE 15 -#define wxSYS_COLOUR_BTNSHADOW 16 -#define wxSYS_COLOUR_GRAYTEXT 17 -#define wxSYS_COLOUR_BTNTEXT 18 -#define wxSYS_COLOUR_INACTIVECAPTIONTEXT 19 -#define wxSYS_COLOUR_BTNHIGHLIGHT 20 - -#define wxSYS_COLOUR_3DDKSHADOW 21 -#define wxSYS_COLOUR_3DLIGHT 22 -#define wxSYS_COLOUR_INFOTEXT 23 -#define wxSYS_COLOUR_INFOBK 24 - -#define wxSYS_COLOUR_DESKTOP wxSYS_COLOUR_BACKGROUND -#define wxSYS_COLOUR_3DFACE wxSYS_COLOUR_BTNFACE -#define wxSYS_COLOUR_3DSHADOW wxSYS_COLOUR_BTNSHADOW -#define wxSYS_COLOUR_3DHIGHLIGHT wxSYS_COLOUR_BTNHIGHLIGHT -#define wxSYS_COLOUR_3DHILIGHT wxSYS_COLOUR_BTNHIGHLIGHT -#define wxSYS_COLOUR_BTNHILIGHT wxSYS_COLOUR_BTNHIGHLIGHT -*/ - -#define SHIFT (8*(sizeof(short int)-sizeof(char))) - -wxColour *g_systemBtnFaceColour = (wxColour *) NULL; -wxColour *g_systemBtnShadowColour = (wxColour *) NULL; -wxColour *g_systemBtnHighlightColour = (wxColour *) NULL; -wxColour *g_systemHighlightColour = (wxColour *) NULL; - -wxFont *g_systemFont = (wxFont *) NULL; - -void wxSystemSettings::Done() { - wxDELETE(g_systemBtnFaceColour); - wxDELETE(g_systemBtnShadowColour); - wxDELETE(g_systemBtnHighlightColour); - wxDELETE(g_systemHighlightColour); - wxDELETE(g_systemFont); -} - -wxColour wxSystemSettings::GetSystemColour( int index ) -{ - switch (index) - { - case wxSYS_COLOUR_SCROLLBAR: - case wxSYS_COLOUR_BACKGROUND: - case wxSYS_COLOUR_ACTIVECAPTION: - case wxSYS_COLOUR_INACTIVECAPTION: - case wxSYS_COLOUR_MENU: - case wxSYS_COLOUR_WINDOW: - case wxSYS_COLOUR_WINDOWFRAME: - case wxSYS_COLOUR_ACTIVEBORDER: - case wxSYS_COLOUR_INACTIVEBORDER: - case wxSYS_COLOUR_BTNFACE: - { - GtkStyle *style = gtk_widget_get_default_style(); - if (!g_systemBtnFaceColour) - { - g_systemBtnFaceColour = - new wxColour( style->bg[0].red >> SHIFT, - style->bg[0].green >> SHIFT, - style->bg[0].blue >> SHIFT ); - } - return *g_systemBtnFaceColour; - } - case wxSYS_COLOUR_BTNSHADOW: - { - GtkStyle *style = gtk_widget_get_default_style(); - if (!g_systemBtnShadowColour) - { - g_systemBtnShadowColour = - new wxColour( style->dark[0].red >> SHIFT, - style->dark[0].green >> SHIFT, - style->dark[0].blue >> SHIFT ); - } - return *g_systemBtnShadowColour; - } - case wxSYS_COLOUR_GRAYTEXT: - case wxSYS_COLOUR_BTNHIGHLIGHT: - { - GtkStyle *style = gtk_widget_get_default_style(); - if (!g_systemBtnHighlightColour) - { - g_systemBtnHighlightColour = - new wxColour( style->light[0].red >> SHIFT, - style->light[0].green >> SHIFT, - style->light[0].blue >> SHIFT ); - } - return *g_systemBtnHighlightColour; - } - case wxSYS_COLOUR_HIGHLIGHT: - { - GtkStyle *style = gtk_widget_get_default_style(); - if (!g_systemHighlightColour) - { - g_systemHighlightColour = - new wxColour( style->bg[GTK_STATE_SELECTED].red >> SHIFT, - style->bg[GTK_STATE_SELECTED].green >> SHIFT, - style->bg[GTK_STATE_SELECTED].blue >> SHIFT ); - } - return *g_systemHighlightColour; - } - case wxSYS_COLOUR_MENUTEXT: - case wxSYS_COLOUR_WINDOWTEXT: - case wxSYS_COLOUR_CAPTIONTEXT: - case wxSYS_COLOUR_INACTIVECAPTIONTEXT: - case wxSYS_COLOUR_INFOTEXT: - { - return *wxBLACK; - } - case wxSYS_COLOUR_HIGHLIGHTTEXT: - { - return *wxWHITE; - } - case wxSYS_COLOUR_INFOBK: - case wxSYS_COLOUR_APPWORKSPACE: - { - return *wxWHITE; // ? - } - } - return *wxWHITE; -} - -wxFont wxSystemSettings::GetSystemFont( int index ) -{ - switch (index) - { - case wxSYS_OEM_FIXED_FONT: - case wxSYS_ANSI_FIXED_FONT: - case wxSYS_SYSTEM_FIXED_FONT: - { - return *wxNORMAL_FONT; - } - case wxSYS_ANSI_VAR_FONT: - case wxSYS_SYSTEM_FONT: - case wxSYS_DEVICE_DEFAULT_FONT: - case wxSYS_DEFAULT_GUI_FONT: - { - if (!g_systemFont) - g_systemFont = new wxFont( "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*" ); - return *g_systemFont; - } - } - - return wxNullFont; -} - -int wxSystemSettings::GetSystemMetric( int index ) -{ - switch (index) - { - case wxSYS_SCREEN_X: - return gdk_screen_width(); - case wxSYS_SCREEN_Y: - return gdk_screen_height(); - } - return 0; -} diff --git a/src/gtk1/slider.cpp b/src/gtk1/slider.cpp deleted file mode 100644 index 83c33ce33d..0000000000 --- a/src/gtk1/slider.cpp +++ /dev/null @@ -1,236 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: slider.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "slider.h" -#endif - -#include "wx/slider.h" -#include "wx/utils.h" - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxSlider -//----------------------------------------------------------------------------- - -static void gtk_slider_callback( GtkWidget *WXUNUSED(widget), wxSlider *win ) -{ - if (!win->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - float diff = win->m_adjust->value - win->m_oldPos; - if (fabs(diff) < 0.2) return; - - wxEventType command = wxEVT_NULL; - - float line_step = win->m_adjust->step_increment; - float page_step = win->m_adjust->page_increment; - - if (fabs(diff-line_step) < 0.2) command = wxEVT_SCROLL_LINEDOWN; - else if (fabs(diff+line_step) < 0.2) command = wxEVT_SCROLL_LINEUP; - else if (fabs(diff-page_step) < 0.2) command = wxEVT_SCROLL_PAGEDOWN; - else if (fabs(diff+page_step) < 0.2) command = wxEVT_SCROLL_PAGEUP; - else command = wxEVT_SCROLL_THUMBTRACK; - - int value = (int)(win->m_adjust->value+0.5); - - int orient = wxHORIZONTAL; - if (win->GetWindowStyleFlag() & wxSB_VERTICAL == wxSB_VERTICAL) orient = wxHORIZONTAL; - - wxScrollEvent event( command, win->GetId(), value, orient ); - event.SetEventObject( win ); - win->ProcessEvent( event ); - - wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, win->GetId() ); - cevent.SetEventObject( win ); - win->ProcessEvent( cevent ); -} - -IMPLEMENT_DYNAMIC_CLASS(wxSlider,wxControl) - -wxSlider::wxSlider(void) -{ -} - -wxSlider::~wxSlider(void) -{ -} - -bool wxSlider::Create(wxWindow *parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& pos, const wxSize& size, - long style, const wxValidator& validator, const wxString& name ) -{ - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - SetValidator( validator ); - - m_oldPos = 0.0; - - if (style & wxSL_VERTICAL == wxSL_VERTICAL) - m_widget = gtk_hscale_new( (GtkAdjustment *) NULL ); - else - m_widget = gtk_vscale_new( (GtkAdjustment *) NULL ); - - m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) ); - - gtk_signal_connect (GTK_OBJECT (m_adjust), "value_changed", - (GtkSignalFunc) gtk_slider_callback, (gpointer) this ); - SetRange( minValue, maxValue ); - SetValue( value ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -int wxSlider::GetValue(void) const -{ - return (int)(m_adjust->value+0.5); -} - -void wxSlider::SetValue( int value ) -{ - float fpos = (float)value; - m_oldPos = fpos; - if (fabs(fpos-m_adjust->value) < 0.2) return; - m_adjust->value = fpos; - - gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "value_changed" ); -} - -void wxSlider::SetRange( int minValue, int maxValue ) -{ - float fmin = (float)minValue; - float fmax = (float)maxValue; - - if ((fabs(fmin-m_adjust->lower) < 0.2) && - (fabs(fmax-m_adjust->upper) < 0.2)) - return; - - m_adjust->lower = fmin; - m_adjust->upper = fmax; - - gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "changed" ); -} - -int wxSlider::GetMin(void) const -{ - return (int)(m_adjust->lower+0.5); -} - -int wxSlider::GetMax(void) const -{ - return (int)(m_adjust->upper+0.5); -} - -void wxSlider::SetPageSize( int pageSize ) -{ - float fpage = (float)pageSize; - - if (fabs(fpage-m_adjust->page_increment) < 0.2) return; - - m_adjust->page_increment = fpage; - - gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "changed" ); -} - -int wxSlider::GetPageSize(void) const -{ - return (int)(m_adjust->page_increment+0.5); -} - -void wxSlider::SetThumbLength( int len ) -{ - float flen = (float)len; - - if (fabs(flen-m_adjust->page_size) < 0.2) return; - - m_adjust->page_size = flen; - - gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "changed" ); -} - -int wxSlider::GetThumbLength(void) const -{ - return (int)(m_adjust->page_size+0.5); -} - -void wxSlider::SetLineSize( int WXUNUSED(lineSize) ) -{ -} - -int wxSlider::GetLineSize(void) const -{ - return 0; -} - -// not supported in wxGTK (and GTK) - -void wxSlider::GetSize( int *x, int *y ) const -{ - wxWindow::GetSize( x, y ); -} - -void wxSlider::SetSize( int x, int y, int width, int height, int sizeFlags ) -{ - wxWindow::SetSize( x, y, width, height, sizeFlags ); -} - -void wxSlider::GetPosition( int *x, int *y ) const -{ - wxWindow::GetPosition( x, y ); -} - -void wxSlider::SetTick( int WXUNUSED(tickPos) ) -{ -} - -void wxSlider::SetTickFreq( int WXUNUSED(n), int WXUNUSED(pos) ) -{ -} - -int wxSlider::GetTickFreq(void) const -{ - return 0; -} - -void wxSlider::ClearTicks(void) -{ -} - -void wxSlider::SetSelection( int WXUNUSED(minPos), int WXUNUSED(maxPos) ) -{ -} - -int wxSlider::GetSelEnd(void) const -{ - return 0; -} - -int wxSlider::GetSelStart(void) const -{ - return 0; -} - -void wxSlider::ClearSel(void) -{ -} - diff --git a/src/gtk1/statbmp.cpp b/src/gtk1/statbmp.cpp deleted file mode 100644 index 4f68379b41..0000000000 --- a/src/gtk1/statbmp.cpp +++ /dev/null @@ -1,79 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: statbmp.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "statbmp.h" -#endif - -#include "wx/statbmp.h" - -//----------------------------------------------------------------------------- -// wxStaticBitmap -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap,wxControl) - -wxStaticBitmap::wxStaticBitmap(void) -{ -}; - -wxStaticBitmap::wxStaticBitmap( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - Create( parent, id, bitmap, pos, size, style, name ); -}; - -bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - m_needParent = TRUE; - - wxSize newSize = size; - - PreCreation( parent, id, pos, size, style, name ); - - m_bitmap = bitmap; - - if (m_bitmap.Ok()) - { - GdkBitmap *mask = (GdkBitmap *) NULL; - if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); - m_widget = gtk_pixmap_new( m_bitmap.GetPixmap(), mask ); - - if (newSize.x == -1) newSize.x = m_bitmap.GetWidth(); - if (newSize.y == -1) newSize.y = m_bitmap.GetHeight(); - SetSize( newSize.x, newSize.y ); - } - else - { - m_widget = gtk_label_new( "Bitmap" ); - } - - PostCreation(); - - Show( TRUE ); - - return TRUE; -}; - -void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap ) -{ - m_bitmap = bitmap; - - if (m_bitmap.Ok()) - { - GdkBitmap *mask = (GdkBitmap *) NULL; - if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); - gtk_pixmap_set( GTK_PIXMAP(m_widget), m_bitmap.GetPixmap(), mask ); - } -}; - diff --git a/src/gtk1/statbox.cpp b/src/gtk1/statbox.cpp deleted file mode 100644 index 3f6abe3198..0000000000 --- a/src/gtk1/statbox.cpp +++ /dev/null @@ -1,50 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: statbox.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "statbox.h" -#endif - -#include "wx/statbox.h" - -//----------------------------------------------------------------------------- -// wxStaticBox -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxStaticBox,wxControl) - -wxStaticBox::wxStaticBox(void) -{ -}; - -wxStaticBox::wxStaticBox( wxWindow *parent, wxWindowID id, const wxString &label, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - Create( parent, id, label, pos, size, style, name ); -}; - -bool wxStaticBox::Create( wxWindow *parent, wxWindowID id, const wxString &label, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - SetLabel(label); - m_widget = gtk_frame_new(m_label); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -}; diff --git a/src/gtk1/stattext.cpp b/src/gtk1/stattext.cpp deleted file mode 100644 index 502014914f..0000000000 --- a/src/gtk1/stattext.cpp +++ /dev/null @@ -1,113 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: stattext.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "stattext.h" -#endif - -#include "wx/stattext.h" - -//----------------------------------------------------------------------------- -// wxStaticText -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxStaticText,wxControl) - -wxStaticText::wxStaticText(void) -{ -}; - -wxStaticText::wxStaticText( wxWindow *parent, wxWindowID id, const wxString &label, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - Create( parent, id, label, pos, size, style, name ); -}; - -bool wxStaticText::Create( wxWindow *parent, wxWindowID id, const wxString &label, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - m_needParent = TRUE; - - wxSize newSize = size; - - PreCreation( parent, id, pos, size, style, name ); - - wxControl::SetLabel(label); - m_widget = gtk_label_new( m_label ); - - GtkJustification justify; - if ( style & wxALIGN_CENTER ) - justify = GTK_JUSTIFY_CENTER; - else if ( style & wxALIGN_RIGHT ) - justify = GTK_JUSTIFY_RIGHT; - else // wxALIGN_LEFT is 0 - justify = GTK_JUSTIFY_LEFT; - gtk_label_set_justify(GTK_LABEL(m_widget), justify); - - int y = 1; - if (newSize.x == -1) { - char *s = WXSTRINGCAST m_label; - char *nl = strchr(s, '\n'); - if (nl) { - do { - *nl = 0; - int x = gdk_string_measure( m_widget->style->font, s ); - if (x > newSize.x) { - newSize.x = x; - } - *nl++ = '\n'; - if ((nl = strchr(s = nl, '\n'))) { - ++y; - } else { - int x = gdk_string_measure( m_widget->style->font, s ); - if (x > newSize.x) { - newSize.x = x; - } - } - } while (nl); - } else { - newSize.x = gdk_string_measure( m_widget->style->font, label ); - } - } - if (newSize.y == -1) { - if (y == 1) { - newSize.y = 26; - } else { - newSize.y - = y * (m_widget->style->font->ascent +m_widget->style->font->descent); - } - } - - SetSize( newSize.x, newSize.y ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -}; - -wxString wxStaticText::GetLabel(void) const -{ - char *str = (char *) NULL; - gtk_label_get( GTK_LABEL(m_widget), &str ); - wxString tmp( str ); - return tmp; -}; - -void wxStaticText::SetLabel( const wxString &label ) -{ - wxControl::SetLabel(label); - - gtk_label_set( GTK_LABEL(m_widget), m_label ); -}; diff --git a/src/gtk1/tbargtk.cpp b/src/gtk1/tbargtk.cpp deleted file mode 100644 index 1ced090e50..0000000000 --- a/src/gtk1/tbargtk.cpp +++ /dev/null @@ -1,328 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tbargtk.cpp -// Purpose: GTK toolbar -// Author: Robert Roebling -// Modified by: -// Created: 01/02/97 -// RCS-ID: -// Copyright: (c) Robert Roebling -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "tbargtk.h" -#endif - -#include "wx/toolbar.h" -#include - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// wxToolBarTool -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool,wxObject) - -wxToolBarTool::wxToolBarTool( wxToolBar *owner, int theIndex, - const wxBitmap& bitmap1, const wxBitmap& bitmap2, - bool toggle, wxObject *clientData, - const wxString& shortHelpString, const wxString& longHelpString, - GtkWidget *item ) -{ - m_owner = owner; - m_index = theIndex; - m_bitmap1 = bitmap1; - m_bitmap2 = bitmap2; - m_isToggle = toggle; - m_enabled = TRUE; - m_toggleState = FALSE; - m_shortHelpString = shortHelpString; - m_longHelpString = longHelpString; - m_isMenuCommand = TRUE; - m_clientData = clientData; - m_deleteSecondBitmap = FALSE; - m_item = item; -} - -wxToolBarTool::~wxToolBarTool() -{ -} - -//----------------------------------------------------------------------------- -// "clicked" (internal from gtk_toolbar) -//----------------------------------------------------------------------------- - -static void gtk_toolbar_callback( GtkWidget *WXUNUSED(widget), wxToolBarTool *tool ) -{ - if (g_blockEventsOnDrag) return; - if (!tool->m_enabled) return; - - if (tool->m_isToggle) tool->m_toggleState = !tool->m_toggleState; - - tool->m_owner->OnLeftClick( tool->m_index, tool->m_toggleState ); -} - -//----------------------------------------------------------------------------- -// "enter_notify_event" -//----------------------------------------------------------------------------- - -static gint gtk_toolbar_enter_callback( GtkWidget *WXUNUSED(widget), - GdkEventCrossing *WXUNUSED(gdk_event), wxToolBarTool *tool ) -{ - if (g_blockEventsOnDrag) return TRUE; - - tool->m_owner->OnMouseEnter( tool->m_index ); - - return TRUE; -} - -//----------------------------------------------------------------------------- -// wxToolBar -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxToolBar,wxControl) - -wxToolBar::wxToolBar() -{ -} - -wxToolBar::wxToolBar( wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) -{ - Create( parent, id, pos, size, style, name ); -} - -wxToolBar::~wxToolBar() -{ -} - -bool wxToolBar::Create( wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) -{ - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - m_tools.DeleteContents( TRUE ); - - m_widget = gtk_handle_box_new(); - - m_toolbar = GTK_TOOLBAR( gtk_toolbar_new( GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS ) ); - - gtk_container_add( GTK_CONTAINER(m_widget), GTK_WIDGET(m_toolbar) ); - - gtk_widget_show( GTK_WIDGET(m_toolbar) ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -bool wxToolBar::OnLeftClick( int toolIndex, bool toggleDown ) -{ - wxCommandEvent event( wxEVT_COMMAND_TOOL_CLICKED, toolIndex ); - event.SetEventObject(this); - event.SetInt( toolIndex ); - event.SetExtraLong((long) toggleDown); - - GetEventHandler()->ProcessEvent(event); - - return TRUE; -} - -void wxToolBar::OnRightClick( int toolIndex, float WXUNUSED(x), float WXUNUSED(y) ) -{ - wxCommandEvent event( wxEVT_COMMAND_TOOL_RCLICKED, toolIndex ); - event.SetEventObject( this ); - event.SetInt( toolIndex ); - - GetEventHandler()->ProcessEvent(event); -} - -void wxToolBar::OnMouseEnter( int toolIndex ) -{ - wxCommandEvent event( wxEVT_COMMAND_TOOL_ENTER, GetId() ); - event.SetEventObject(this); - event.SetInt( toolIndex ); - - GetEventHandler()->ProcessEvent(event); -} - -wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap, - const wxBitmap& pushedBitmap, bool toggle, - float WXUNUSED(xPos), float WXUNUSED(yPos), wxObject *clientData, - const wxString& helpString1, const wxString& helpString2 ) -{ - if (!bitmap.Ok()) return (wxToolBarTool *) NULL; - - wxToolBarTool *tool = new wxToolBarTool( this, toolIndex, bitmap, pushedBitmap, toggle, - clientData, helpString1, helpString2 ); - - GtkWidget *tool_pixmap = (GtkWidget *) NULL; - - wxCHECK_MSG( bitmap.GetBitmap() == NULL, (wxToolBarTool *)NULL, "wxToolBar doesn't support GdkBitmap" ) - - wxCHECK_MSG( bitmap.GetPixmap() != NULL, (wxToolBarTool *)NULL, "wxToolBar::Add needs a wxBitmap" ) - - if (TRUE) - { - GdkPixmap *pixmap = bitmap.GetPixmap(); - - GdkBitmap *mask = (GdkBitmap *) NULL; - if (bitmap.GetMask()) mask = bitmap.GetMask()->GetBitmap(); - - tool_pixmap = gtk_pixmap_new( pixmap, mask ); - } - - gtk_misc_set_alignment( GTK_MISC(tool_pixmap), 0.5, 0.5 ); - - GtkToolbarChildType ctype = GTK_TOOLBAR_CHILD_BUTTON; - if (toggle) ctype = GTK_TOOLBAR_CHILD_TOGGLEBUTTON; - - tool->m_item = gtk_toolbar_append_element( m_toolbar, ctype, (GtkWidget *) NULL, (const char *) NULL, helpString1, "", tool_pixmap, - (GtkSignalFunc)gtk_toolbar_callback, (gpointer)tool ); - - gtk_signal_connect( GTK_OBJECT(tool->m_item), "enter_notify_event", - GTK_SIGNAL_FUNC(gtk_toolbar_enter_callback), (gpointer)tool ); - - m_tools.Append( tool ); - - return tool; -} - -void wxToolBar::AddSeparator(void) -{ - gtk_toolbar_append_space( m_toolbar ); -} - -void wxToolBar::ClearTools(void) -{ - wxFAIL_MSG( "wxToolBar::ClearTools not implemented" ); -} - -void wxToolBar::Realize(void) -{ - m_x = 0; - m_y = 0; - m_width = 100; - m_height = 0; - - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool*)node->Data(); - if (tool->m_bitmap1.Ok()) - { - int tool_height = tool->m_bitmap1.GetHeight(); - if (tool_height > m_height) m_height = tool_height; - } - - node = node->Next(); - } - - m_height += 10; -} - -void wxToolBar::EnableTool(int toolIndex, bool enable) -{ - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool*)node->Data(); - if (tool->m_index == toolIndex) - { - tool->m_enabled = enable; - return; - } - node = node->Next(); - } - - wxFAIL_MSG( "wrong toolbar index" ); -} - -void wxToolBar::ToggleTool( int toolIndex, bool toggle ) -{ - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool*)node->Data(); - if (tool->m_index == toolIndex) - { - tool->m_toggleState = toggle; - if ((tool->m_item) && (GTK_IS_TOGGLE_BUTTON(tool->m_item))) - gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(tool->m_item), toggle ); - return; - } - node = node->Next(); - } - - wxFAIL_MSG( "wrong toolbar index" ); -} - -wxObject *wxToolBar::GetToolClientData( int index ) const -{ - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool*)node->Data(); - if (tool->m_index == index) return tool->m_clientData;; - node = node->Next(); - } - - wxFAIL_MSG( "wrong toolbar index" ); - - return (wxObject*)NULL; -} - -bool wxToolBar::GetToolState(int toolIndex) const -{ - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool*)node->Data(); - if (tool->m_index == toolIndex) return tool->m_toggleState; - node = node->Next(); - } - - wxFAIL_MSG( "wrong toolbar index" ); - - return FALSE; -} - -bool wxToolBar::GetToolEnabled(int toolIndex) const -{ - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool*)node->Data(); - if (tool->m_index == toolIndex) return tool->m_enabled; - node = node->Next(); - } - - wxFAIL_MSG( "wrong toolbar index" ); - - return FALSE; -} - -void wxToolBar::SetMargins( int WXUNUSED(x), int WXUNUSED(y) ) -{ -} - -void wxToolBar::SetToolPacking( int WXUNUSED(packing) ) -{ -} - -void wxToolBar::SetToolSeparation( int separation ) -{ - gtk_toolbar_set_space_size( m_toolbar, separation ); -} - diff --git a/src/gtk1/textctrl.cpp b/src/gtk1/textctrl.cpp deleted file mode 100644 index 5d5b5056b3..0000000000 --- a/src/gtk1/textctrl.cpp +++ /dev/null @@ -1,433 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: textctrl.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "textctrl.h" -#endif - -#include "wx/textctrl.h" -#include "wx/utils.h" -#include - -//----------------------------------------------------------------------------- -// "changed" -//----------------------------------------------------------------------------- - -static void gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxTextCtrl *win ) -{ - win->SetModified(); - - wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, win->m_windowId ); - wxString val( win->GetValue() ); - if (!val.IsNull()) event.m_commandString = WXSTRINGCAST val; - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); -} - -//----------------------------------------------------------------------------- -// wxTextCtrl -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl,wxControl) - -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) - EVT_CHAR(wxTextCtrl::OnChar) -END_EVENT_TABLE() - -wxTextCtrl::wxTextCtrl(void) : streambuf() -{ - if (allocate()) setp(base(),ebuf()); - - m_modified = FALSE; -} - -wxTextCtrl::wxTextCtrl( wxWindow *parent, wxWindowID id, const wxString &value, - const wxPoint &pos, const wxSize &size, - int style, const wxValidator& validator, const wxString &name ) : streambuf() -{ - if (allocate()) setp(base(),ebuf()); - - m_modified = FALSE; - Create( parent, id, value, pos, size, style, validator, name ); -} - -bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value, - const wxPoint &pos, const wxSize &size, - int style, const wxValidator& validator, const wxString &name ) -{ - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - SetValidator( validator ); - - bool bMultiLine = (style & wxTE_MULTILINE) != 0; - if ( bMultiLine ) - { - // a multi-line edit control: create a vertical scrollbar by default and - // horizontal if requested - bool bHasHScrollbar = (style & wxHSCROLL) != 0; - - // create our control... - m_text = gtk_text_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL ); - - // ... and put into the upper left hand corner of the table - m_widget = gtk_table_new(bHasHScrollbar ? 2 : 1, 2, FALSE); - gtk_table_attach(GTK_TABLE(m_widget), m_text, 0, 1, 0, 1, - GTK_FILL | GTK_EXPAND, - GTK_FILL | GTK_EXPAND | GTK_SHRINK, - 0, 0); - - // put the horizontal scrollbar in the lower left hand corner - if (bHasHScrollbar) - { - GtkWidget *hscrollbar = gtk_hscrollbar_new(GTK_TEXT(m_text)->hadj); - gtk_table_attach(GTK_TABLE(m_widget), hscrollbar, 0, 1, 1, 2, - GTK_EXPAND | GTK_FILL, - GTK_FILL, - 0, 0); - gtk_widget_show(hscrollbar); - } - - // finally, put the vertical scrollbar in the upper right corner - GtkWidget *vscrollbar = gtk_vscrollbar_new(GTK_TEXT(m_text)->vadj); - gtk_table_attach(GTK_TABLE(m_widget), vscrollbar, 1, 2, 0, 1, - GTK_FILL, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, - 0, 0); - gtk_widget_show( vscrollbar ); - } - else - { - // a single-line text control: no need for scrollbars - m_widget = - m_text = gtk_entry_new(); - } - - wxSize newSize = size; - if (newSize.x == -1) newSize.x = 80; - if (newSize.y == -1) newSize.y = 26; - SetSize( newSize.x, newSize.y ); - - PostCreation(); - - if (bMultiLine) - { - gtk_widget_realize(m_text); - gtk_widget_show(m_text); - } - - // we want to be notified about text changes - gtk_signal_connect(GTK_OBJECT(m_text), "changed", - GTK_SIGNAL_FUNC(gtk_text_changed_callback), - (gpointer)this); - - if (!value.IsNull()) - { - gint tmp = 0; - gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.Length(), &tmp ); - } - - if (style & wxTE_READONLY) - { - } - else - { - if (bMultiLine) - gtk_text_set_editable( GTK_TEXT(m_text), 1 ); - } - - Show( TRUE ); - - return TRUE; -} - -wxString wxTextCtrl::GetValue(void) const -{ - wxString tmp; - if (m_windowStyle & wxTE_MULTILINE) - { - gint len = gtk_text_get_length( GTK_TEXT(m_text) ); - tmp = gtk_editable_get_chars( GTK_EDITABLE(m_text), 0, len ); - } - else - { - tmp = gtk_entry_get_text( GTK_ENTRY(m_text) ); - } - return tmp; -} - -void wxTextCtrl::SetValue( const wxString &value ) -{ - wxString tmp = ""; - if (!value.IsNull()) tmp = value; - if (m_windowStyle & wxTE_MULTILINE) - { - gint len = gtk_text_get_length( GTK_TEXT(m_text) ); - gtk_editable_delete_text( GTK_EDITABLE(m_text), 0, len ); - len = 0; - gtk_editable_insert_text( GTK_EDITABLE(m_text), tmp, tmp.Length(), &len ); - } - else - { - gtk_entry_set_text( GTK_ENTRY(m_text), tmp ); - } -} - -void wxTextCtrl::WriteText( const wxString &text ) -{ - if (text.IsNull()) return; - - if (m_windowStyle & wxTE_MULTILINE) - { - gint len = gtk_text_get_length( GTK_TEXT(m_text) ); - gtk_editable_insert_text( GTK_EDITABLE(m_text), text, text.Length(), &len ); - } - else - { - gtk_entry_append_text( GTK_ENTRY(m_text), text ); - } -} - -bool wxTextCtrl::LoadFile( const wxString &WXUNUSED(file) ) -{ - wxFAIL_MSG( "wxTextCtrl::LoadFile not implemented" ); - - return FALSE; -} - -bool wxTextCtrl::SaveFile( const wxString &WXUNUSED(file) ) -{ - wxFAIL_MSG( "wxTextCtrl::SaveFile not implemented" ); - - return FALSE; -} - -/* -wxString wxTextCtrl::GetLineText( long lineNo ) const -{ -} - - -void wxTextCtrl::OnDropFiles( wxDropFilesEvent &event ) -{ -} - -long wxTextCtrl::PositionToXY( long pos, long *x, long *y ) const -{ -} - -long wxTextCtrl::XYToPosition( long x, long y ) -{ -} - -int wxTextCtrl::GetNumberOfLines(void) -{ -} - -*/ -void wxTextCtrl::SetInsertionPoint( long pos ) -{ - int tmp = (int) pos; - if (m_windowStyle & wxTE_MULTILINE) - gtk_text_set_point( GTK_TEXT(m_text), tmp ); - else - gtk_entry_set_position( GTK_ENTRY(m_text), tmp ); -} - -void wxTextCtrl::SetInsertionPointEnd(void) -{ - int pos = 0; - if (m_windowStyle & wxTE_MULTILINE) - pos = gtk_text_get_length( GTK_TEXT(m_text) ); - else - pos = GTK_ENTRY(m_text)->text_length; - SetInsertionPoint( pos-1 ); -} - -void wxTextCtrl::SetEditable( bool editable ) -{ - if (m_windowStyle & wxTE_MULTILINE) - gtk_text_set_editable( GTK_TEXT(m_text), editable ); - else - gtk_entry_set_editable( GTK_ENTRY(m_text), editable ); -} - -void wxTextCtrl::SetSelection( long from, long to ) -{ - gtk_editable_select_region( GTK_EDITABLE(m_text), (gint)from, (gint)to ); -} - -void wxTextCtrl::ShowPosition( long WXUNUSED(pos) ) -{ - wxFAIL_MSG(_("wxTextCtrl::ShowPosition not implemented")); -} - -long wxTextCtrl::GetInsertionPoint(void) const -{ - return (long) GTK_EDITABLE(m_text)->current_pos; -} - -long wxTextCtrl::GetLastPosition(void) const -{ - int pos = 0; - if (m_windowStyle & wxTE_MULTILINE) - pos = gtk_text_get_length( GTK_TEXT(m_text) ); - else - pos = GTK_ENTRY(m_text)->text_length; - return (long)pos-1; -} - -void wxTextCtrl::Remove( long from, long to ) -{ - gtk_editable_delete_text( GTK_EDITABLE(m_text), (gint)from, (gint)to ); -} - -void wxTextCtrl::Replace( long from, long to, const wxString &value ) -{ - gtk_editable_delete_text( GTK_EDITABLE(m_text), (gint)from, (gint)to ); - if (value.IsNull()) return; - gint pos = (gint)to; - gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.Length(), &pos ); -} - -void wxTextCtrl::Cut(void) -{ - gtk_editable_cut_clipboard( GTK_EDITABLE(m_text), 0 ); -} - -void wxTextCtrl::Copy(void) -{ - gtk_editable_copy_clipboard( GTK_EDITABLE(m_text), 0 ); -} - -void wxTextCtrl::Paste(void) -{ - gtk_editable_paste_clipboard( GTK_EDITABLE(m_text), 0 ); -} - -void wxTextCtrl::Delete(void) -{ - SetValue( "" ); -} - -void wxTextCtrl::OnChar( wxKeyEvent &key_event ) -{ - if ((key_event.KeyCode() == WXK_RETURN) && (m_windowStyle & wxPROCESS_ENTER)) - { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); - event.SetEventObject(this); - printf( "Hallo.\n" ); - if (GetEventHandler()->ProcessEvent(event)) return; - } - else if (key_event.KeyCode() == WXK_TAB) - { - wxNavigationKeyEvent event; - event.SetDirection( key_event.m_shiftDown ); - event.SetWindowChange(FALSE); - event.SetEventObject(this); - - if (GetEventHandler()->ProcessEvent(event)) return; - } - key_event.Skip(); -} - -int wxTextCtrl::overflow( int WXUNUSED(c) ) -{ - int len = pptr() - pbase(); - char *txt = new char[len+1]; - strncpy(txt, pbase(), len); - txt[len] = '\0'; - (*this) << txt; - setp(pbase(), epptr()); - delete[] txt; - return EOF; -} - -int wxTextCtrl::sync(void) -{ - int len = pptr() - pbase(); - char *txt = new char[len+1]; - strncpy(txt, pbase(), len); - txt[len] = '\0'; - (*this) << txt; - setp(pbase(), epptr()); - delete[] txt; - return 0; -} - -int wxTextCtrl::underflow(void) -{ - return EOF; -} - -wxTextCtrl& wxTextCtrl::operator<<(const wxString& s) -{ - WriteText(s); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(float f) -{ - static char buf[100]; - sprintf(buf, "%.2f", f); - WriteText(buf); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(double d) -{ - static char buf[100]; - sprintf(buf, "%.2f", d); - WriteText(buf); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(int i) -{ - static char buf[100]; - sprintf(buf, "%i", i); - WriteText(buf); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(long i) -{ - static char buf[100]; - sprintf(buf, "%ld", i); - WriteText(buf); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(const char c) -{ - char buf[2]; - - buf[0] = c; - buf[1] = 0; - WriteText(buf); - return *this; -} - -GtkWidget* wxTextCtrl::GetConnectWidget(void) -{ - return GTK_WIDGET(m_text); -} - -bool wxTextCtrl::IsOwnGtkWindow( GdkWindow *window ) -{ - if (m_windowStyle & wxTE_MULTILINE) - return (window == GTK_TEXT(m_text)->text_area); - else - return (window == GTK_ENTRY(m_text)->text_area); -} - - - diff --git a/src/gtk1/threadgui.inc b/src/gtk1/threadgui.inc deleted file mode 100644 index 165fef3c01..0000000000 --- a/src/gtk1/threadgui.inc +++ /dev/null @@ -1,65 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: threadgui.inc -// Purpose: GUI thread manager for GTK -// Author: Original from Wolfram Gloger/Guilhem Lavaux -// Modified by: -// Created: 04/22/98 -// RCS-ID: $Id$ -// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#include -#include - -// for select() -#include -#include -#ifdef __sgi -#include -#endif - -#include - - -///////////////////////////////////////////////////////////////////////////// -// Static variables -///////////////////////////////////////////////////////////////////////////// - -static int p_thrd_pipe[2] = { -1, -1 }; -// WorkProc in GTK -static gint p_thrd_inid; - -#define THREAD_SEND_EXIT_MSG(ptr) write(p_thrd_pipe[1], &ptr, sizeof(ptr)); - -static void -ThreadExitProc(gpointer WXUNUSED(client), gint fid, - GdkInputCondition WXUNUSED(cond)) -{ - wxThread* ptr; - - if (fid != p_thrd_pipe[0]) - return; - if (read(fid, &ptr, sizeof(ptr)) == sizeof(ptr)) { - //fprintf(stderr, "calling OnExit %p\n", ptr); - ptr->OnExit(); - } else { - //fprintf(stderr, "this should never happen\n"); - } -} - -// Global initialization -static void wxThreadGuiInit() -{ - pipe(p_thrd_pipe); - p_thrd_inid = gdk_input_add(p_thrd_pipe[0], GDK_INPUT_READ, - ThreadExitProc, 0); -} - -// Global cleanup -static void wxThreadGuiExit() -{ - gdk_input_remove(p_thrd_inid); - close(p_thrd_pipe[0]); - close(p_thrd_pipe[1]); -} diff --git a/src/gtk1/threadno.cpp b/src/gtk1/threadno.cpp deleted file mode 100644 index 3a1f3460c7..0000000000 --- a/src/gtk1/threadno.cpp +++ /dev/null @@ -1,180 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: thread.cpp -// Purpose: No thread support -// Author: Original from Wolfram Gloger/Guilhem Lavaux -// Modified by: -// Created: 04/22/98 -// RCS-ID: $Id$ -// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "thread.h" -#endif - -#include "wx/wx.h" -#include "wx/module.h" -#include "wx/thread.h" - -wxMutex::wxMutex() -{ - m_locked = 0; -} - -wxMutex::~wxMutex() -{ - if (m_locked) - wxDebugMsg("wxMutex warning: destroying a locked mutex (%d locks)\n", m_locked); -} - -wxMutexError wxMutex::Lock() -{ - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::TryLock() -{ - if (m_locked > 0) - return MUTEX_BUSY; - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::Unlock() -{ - if (m_locked == 0) - return MUTEX_UNLOCKED; - m_locked--; - return MUTEX_NO_ERROR; -} - -wxCondition::wxCondition() -{ -} - -wxCondition::~wxCondition() -{ -} - -void wxCondition::Wait(wxMutex& WXUNUSED(mutex)) -{ -} - -bool wxCondition::Wait(wxMutex& WXUNUSED(mutex), unsigned long WXUNUSED(sec), - unsigned long WXUNUSED(nsec)) -{ - return FALSE; -} - -void wxCondition::Signal() -{ -} - -void wxCondition::Broadcast() -{ -} - -struct wxThreadInternal { - int thread_id; - void* exit_status; -}; - -wxThreadError wxThread::Create() -{ - p_internal->exit_status = Entry(); - OnExit(); - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Destroy() -{ - return THREAD_NOT_RUNNING; -} - -wxThreadError wxThread::Pause() -{ - return THREAD_NOT_RUNNING; -} - -wxThreadError wxThread::Resume() -{ - return THREAD_NOT_RUNNING; -} - -void wxThread::DeferDestroy( bool WXUNUSED(on) ) -{ -} - -void wxThread::TestDestroy() -{ -} - -void *wxThread::Join() -{ - return p_internal->exit_status; -} - -unsigned long wxThread::GetID() const -{ - return 0; -} - -bool wxThread::IsMain() -{ - return TRUE; -} - -bool wxThread::IsRunning() const -{ - return FALSE; -} - -bool wxThread::IsAlive() const -{ - return FALSE; -} - -void wxThread::SetPriority(int WXUNUSED(prio)) { } -int wxThread::GetPriority() const { return 0; } - -wxMutex wxMainMutex; // controls access to all GUI functions - -wxThread::wxThread() -{ - p_internal = new wxThreadInternal(); -} - -wxThread::~wxThread() -{ - Destroy(); - Join(); - delete p_internal; -} - -// The default callback just joins the thread and throws away the result. -void wxThread::OnExit() -{ - Join(); -} - - -// Automatic initialization -class wxThreadModule : public wxModule { - DECLARE_DYNAMIC_CLASS(wxThreadModule) -public: - bool OnInit(); - void OnExit(); -}; - -bool wxThreadModule::OnInit() { - wxMainMutex.Lock(); - return TRUE; -} - -void wxThreadModule::OnExit() -{ - wxMainMutex.Unlock(); -} - -IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule) diff --git a/src/gtk1/threadpsx.cpp b/src/gtk1/threadpsx.cpp deleted file mode 100644 index 9623b91c30..0000000000 --- a/src/gtk1/threadpsx.cpp +++ /dev/null @@ -1,394 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: threadpsx.cpp -// Purpose: wxThread (Posix) Implementation -// Author: Original from Wolfram Gloger/Guilhem Lavaux -// Modified by: -// Created: 04/22/98 -// RCS-ID: $Id$ -// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "thread.h" -#endif - -#include -#include -#include -#include -#include "wx/thread.h" -#include "wx/module.h" -#include "wx/utils.h" - -enum thread_state { - STATE_IDLE = 0, - STATE_RUNNING, - STATE_PAUSING, - STATE_PAUSED, - STATE_CANCELED, - STATE_EXITED -}; - -///////////////////////////////////////////////////////////////////////////// -// Static variables -///////////////////////////////////////////////////////////////////////////// - -static pthread_t p_mainid; -static wxMutex p_list_mutex; -static wxList p_threads_list; - -wxMutex wxMainMutex; // controls access to all GUI functions - -///////////////////////////////////////////////////////////////////////////// -// GUI thread manager -///////////////////////////////////////////////////////////////////////////// -#include "threadgui.inc" - -///////////////////////////////////////////////////////////////////////////// -// wxThread: Posix Thread implementation (Mutex) -///////////////////////////////////////////////////////////////////////////// - -class wxMutexInternal { -public: - pthread_mutex_t p_mutex; -}; - -wxMutex::wxMutex() -{ - p_internal = new wxMutexInternal; - pthread_mutex_init(&(p_internal->p_mutex), NULL); - m_locked = 0; -} - -wxMutex::~wxMutex() -{ - if (m_locked > 0) - wxDebugMsg("wxMutex warning: freeing a locked mutex (%d locks)\n", - m_locked); - - pthread_mutex_destroy(&(p_internal->p_mutex)); - delete p_internal; -} - -wxMutexError wxMutex::Lock() -{ - int err; - - err = pthread_mutex_lock(&(p_internal->p_mutex)); - if (err == EDEADLK) - return MUTEX_DEAD_LOCK; - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::TryLock() -{ - int err; - - if (m_locked) - return MUTEX_BUSY; - err = pthread_mutex_trylock(&(p_internal->p_mutex)); - switch (err) { - case EBUSY: return MUTEX_BUSY; - } - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::Unlock() -{ - if (m_locked > 0) - m_locked--; - else - return MUTEX_UNLOCKED; - pthread_mutex_unlock(&(p_internal->p_mutex)); - return MUTEX_NO_ERROR; -} - -///////////////////////////////////////////////////////////////////////////// -// wxThread: Posix Thread implementation (Condition) -///////////////////////////////////////////////////////////////////////////// - -class wxConditionInternal { -public: - pthread_cond_t p_condition; -}; - -wxCondition::wxCondition() -{ - p_internal = new wxConditionInternal; - pthread_cond_init(&(p_internal->p_condition), NULL); -} - -wxCondition::~wxCondition() -{ - pthread_cond_destroy(&(p_internal->p_condition)); - delete p_internal; -} - -void wxCondition::Wait(wxMutex& mutex) -{ - pthread_cond_wait(&(p_internal->p_condition), &(mutex.p_internal->p_mutex)); -} - -bool wxCondition::Wait(wxMutex& mutex, unsigned long sec, unsigned long nsec) -{ - struct timespec tspec; - - tspec.tv_sec = time(NULL)+sec; - tspec.tv_nsec = nsec; - return (pthread_cond_timedwait(&(p_internal->p_condition), &(mutex.p_internal->p_mutex), &tspec) != ETIMEDOUT); -} - -void wxCondition::Signal() -{ - pthread_cond_signal(&(p_internal->p_condition)); -} - -void wxCondition::Broadcast() -{ - pthread_cond_broadcast(&(p_internal->p_condition)); -} - -///////////////////////////////////////////////////////////////////////////// -// wxThread: Posix Thread implementation (Thread) -///////////////////////////////////////////////////////////////////////////// - -class wxThreadInternal { -public: - wxThreadInternal() { state = STATE_IDLE; } - ~wxThreadInternal() {} - static void *PthreadStart(void *ptr); - pthread_t thread_id; - int state; - int prio; - int defer_destroy; - int id; -}; - -void *wxThreadInternal::PthreadStart(void *ptr) -{ - wxThread *thread = (wxThread *)ptr; - - // Add the current thread to the list - p_list_mutex.Lock(); - thread->p_internal->id = p_threads_list.Number(); - p_threads_list.Append((wxObject *)thread); - p_list_mutex.Unlock(); - - // Call the main entry - pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); - void* status = thread->Entry(); - - thread->Exit(status); - - return NULL; -} - -wxThreadError wxThread::Create() -{ - pthread_attr_t a; - int min_prio, max_prio, p; - struct sched_param sp; - - if (p_internal->state != STATE_IDLE) - return THREAD_RUNNING; - - // Change thread priority - pthread_attr_init(&a); - pthread_attr_getschedpolicy(&a, &p); - - min_prio = sched_get_priority_min(p); - max_prio = sched_get_priority_max(p); - - pthread_attr_getschedparam(&a, &sp); - sp.sched_priority = min_prio + - (p_internal->prio*(max_prio-min_prio))/100; - pthread_attr_setschedparam(&a, &sp); - - // this is the point of no return - p_internal->state = STATE_RUNNING; - if (pthread_create(&p_internal->thread_id, &a, - wxThreadInternal::PthreadStart, (void *)this) != 0) { - p_internal->state = STATE_IDLE; - pthread_attr_destroy(&a); - return THREAD_NO_RESOURCE; - } - pthread_attr_destroy(&a); - - return THREAD_NO_ERROR; -} - -void wxThread::SetPriority(int prio) -{ - if (p_internal->state == STATE_RUNNING) - return; - - if (prio > 100) - prio = 100; - if (prio < 0) - prio = 0; - p_internal->prio = prio; -} - -int wxThread::GetPriority() const -{ - return p_internal->prio; -} - -void wxThread::DeferDestroy(bool on) -{ - if (on) - pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL); - else - pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); -} - -wxThreadError wxThread::Destroy() -{ - int res = 0; - - if (p_internal->state == STATE_RUNNING) { - res = pthread_cancel(p_internal->thread_id); - if (res == 0) - p_internal->state = STATE_CANCELED; - } - - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Pause() -{ - if (p_internal->state != STATE_RUNNING) - return THREAD_NOT_RUNNING; - - if (!p_internal->defer_destroy) - return THREAD_MISC_ERROR; - - p_internal->state = STATE_PAUSING; - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Resume() -{ - if (p_internal->state == STATE_PAUSING || p_internal->state == STATE_PAUSED) - p_internal->state = STATE_RUNNING; - - return THREAD_NO_ERROR; -} - -void *wxThread::Join() -{ - void* status = 0; - - if (p_internal->state != STATE_IDLE) { - bool do_unlock = wxThread::IsMain(); - - while (p_internal->state == STATE_RUNNING) - wxYield(); - - if (do_unlock) - wxMainMutex.Unlock(); - pthread_join(p_internal->thread_id, &status); - if (do_unlock) - wxMainMutex.Lock(); - - p_list_mutex.Lock(); - delete p_threads_list.Nth(p_internal->id); - p_list_mutex.Unlock(); - - p_internal->state = STATE_IDLE; - } - return status; -} - -unsigned long wxThread::GetID() const -{ - return p_internal->id; -} - -wxThread *wxThread::GetThreadFromID(unsigned long id) -{ - wxNode *node = p_threads_list.Nth(id); - - if (!node) - return NULL; - return (wxThread *)node->Data(); -} - -void wxThread::Exit(void *status) -{ - wxThread* ptr = this; - - THREAD_SEND_EXIT_MSG(ptr); - p_internal->state = STATE_EXITED; - pthread_exit(status); -} - -void wxThread::TestDestroy() -{ - if (p_internal->state == STATE_PAUSING) { - p_internal->state = STATE_PAUSED; - while (p_internal->state == STATE_PAUSED) { - pthread_testcancel(); - usleep(1); - } - } - pthread_testcancel(); -} - -bool wxThread::IsMain() -{ - return (bool)pthread_equal(pthread_self(), p_mainid); -} - -bool wxThread::IsRunning() const -{ - return (p_internal->state == STATE_RUNNING); -} - -bool wxThread::IsAlive() const -{ - return (p_internal->state == STATE_RUNNING) || - (p_internal->state == STATE_PAUSING) || - (p_internal->state == STATE_PAUSED); -} - -wxThread::wxThread() -{ - p_internal = new wxThreadInternal(); -} - -wxThread::~wxThread() -{ - Destroy(); - Join(); - delete p_internal; -} - -// The default callback just joins the thread and throws away the result. -void wxThread::OnExit() -{ - Join(); -} - -// Automatic initialization -class wxThreadModule : public wxModule { - DECLARE_DYNAMIC_CLASS(wxThreadModule) -public: - virtual bool OnInit() { - wxThreadGuiInit(); - p_mainid = pthread_self(); - p_threads_list = wxList(wxKEY_INTEGER); - wxMainMutex.Lock(); - - return TRUE; - } - - virtual void OnExit() { - wxMainMutex.Unlock(); - wxThreadGuiExit(); - } -}; - -IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule) diff --git a/src/gtk1/threadsgi.cpp b/src/gtk1/threadsgi.cpp deleted file mode 100644 index 3503e79616..0000000000 --- a/src/gtk1/threadsgi.cpp +++ /dev/null @@ -1,252 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: threadsgi.cpp -// Purpose: wxThread (SGI) Implementation -// Author: Original from Wolfram Gloger/Guilhem Lavaux -// Modified by: -// Created: 04/22/98 -// RCS-ID: $Id$ -// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "thread.h" -#endif - -#include -#include - -#include -#include -#include -#include "wx/thread.h" -#include "wx/module.h" -#include "wx/utils.h" - -enum thread_state { - STATE_IDLE = 0, - STATE_RUNNING, - STATE_CANCELED, - STATE_EXITED -}; - -///////////////////////////////////////////////////////////////////////////// -// Static variables -///////////////////////////////////////////////////////////////////////////// - -static int p_mainid; -wxMutex wxMainMutex; - -#include "threadgui.inc" - -///////////////////////////////////////////////////////////////////////////// -// Unix implementations (SGI threads) -///////////////////////////////////////////////////////////////////////////// - -class wxMutexInternal { -public: - abilock_t p_mutex; -}; - -wxMutex::wxMutex() -{ - m_locked = 0; - p_internal = new wxMutexInternal; - init_lock(&(p_internal->p_mutex)); -} - -wxMutex::~wxMutex() -{ - if (m_locked > 0) - wxDebugMsg("wxMutex warning: freeing a locked mutex (%d locks)\n", - m_locked); - delete p_internal; -} - -wxMutexError wxMutex::Lock() -{ - spin_lock(&(p_internal->p_mutex)); - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::TryLock() -{ - if (acquire_lock(&(p_internal->p_mutex)) != 0) - return MUTEX_BUSY; - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::Unlock() -{ - if (m_locked == 0) - return MUTEX_UNLOCKED; - release_lock(&(p_internal->p_mutex)); - m_locked--; - return MUTEX_NO_ERROR; -} - -// GL: Don't know how it works on SGI. Wolfram ? - -wxCondition::wxCondition() {} -wxCondition::~wxCondition() {} -int wxCondition::Wait(wxMutex& WXUNUSED(mutex)) { return 0;} -int wxCondition::Wait(wxMutex& WXUNUSED(mutex), unsigned long WXUNUSED(sec), - unsigned long WXUNUSED(nsec)) { return 0; } -int wxCondition::Signal() { return 0; } -int wxCondition::Broadcast() { return 0; } - -class -wxThreadPrivate { -public: - wxThreadPrivate() { thread_id = 0; state = STATE_IDLE; } - ~wxThreadPrivate() {} - static void SprocStart(void *ptr); - static void SignalHandler(int sig); -public: - int state, thread_id; - void* exit_status; -}; - -void wxThreadPrivate::SprocStart(void *ptr) -{ - void* status; - - wxThread *thr = (wxThread *)ptr; - - thr->p_internal->thread_id = getpid(); - thr->p_internal->exit_status = 0; - status = thr->Entry(); - thr->Exit(status); -} - -void wxThread::Exit(void* status) -{ - wxThread* ptr = this; - THREAD_SEND_EXIT_MSG(ptr); - p_internal->state = STATE_EXITED; - p_internal->exit_status = status; - _exit(0); -} - -wxThreadError wxThread::Create() -{ - if (p_internal->state != STATE_IDLE) - return THREAD_RUNNING; - p_internal->state = STATE_RUNNING; - if (sproc(p_internal->SprocStart, PR_SALL, this) < 0) { - p_internal->state = STATE_IDLE; - return THREAD_NO_RESOURCE; - } - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Destroy() -{ - if (p_internal->state == STATE_RUNNING) - p_internal->state = STATE_CANCELED; - - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Pause() -{ - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Resume() -{ - return THREAD_NO_ERROR; -} - -void *wxThread::Join() -{ - if (p_internal->state != STATE_IDLE) { - bool do_unlock = wxThread::IsMain(); - int stat; - - if (do_unlock) - wxMainMutex.Unlock(); - waitpid(p_internal->thread_id, &stat, 0); - if (do_unlock) - wxMainMutex.Lock(); - if (!WIFEXITED(stat) && !WIFSIGNALED(stat)) - return 0; - p_internal->state = STATE_IDLE; - return p_internal->exit_status; - } - return 0; -} - -unsigned long wxThread::GetID() const -{ - return (unsigned long)p_internal->thread_id; -} - -void wxThread::TestDestroy() -{ - if (p_internal->state == STATE_CANCELED) { - p_internal->exit_status = 0; - _exit(0); - } -} - -void wxThread::SetPriority(int prio) -{ -} - -int wxThread::GetPriority() const -{ - return 0; -} - -bool wxThread::IsMain() -{ - return (int)getpid() == main_id; -} - -bool wxThread::IsAlive() const -{ - return (p_internal->state == STATE_RUNNING); -} - -bool wxThread::IsRunning() const -{ - return (p_internal->state == STATE_RUNNING); -} - -wxThread::wxThread() -{ - p_internal = new wxThreadPrivate(); -} - -wxThread::~wxThread() -{ - Cancel(); - Join(); - delete p_internal; -} - -// The default callback just joins the thread and throws away the result. -void wxThread::OnExit() -{ - Join(); -} - -// Global initialization -class wxThreadModule : public wxModule { - DECLARE_DYNAMIC_CLASS(wxThreadModule) -public: - virtual bool OnInit() { - wxThreadGuiInit(); - p_mainid = (int)getpid(); - wxMainMutex.Lock(); - } - - virtual void OnExit() { - wxMainMutex.Unlock(); - wxThreadGuiExit(); - } -}; - -IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule) diff --git a/src/gtk1/timer.cpp b/src/gtk1/timer.cpp deleted file mode 100644 index cf9d2c64a3..0000000000 --- a/src/gtk1/timer.cpp +++ /dev/null @@ -1,71 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: timer.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "timer.h" -#endif - -#include "wx/timer.h" - -//----------------------------------------------------------------------------- -// wxTimer -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxTimer,wxObject) - -gint timeout_callback( gpointer data ) -{ - wxTimer *timer = (wxTimer*)data; - timer->Notify(); - if (timer->OneShot()) timer->Stop(); - return TRUE; -} - -wxTimer::wxTimer(void) -{ - m_tag = -1; - m_time = 1000; - m_oneShot = FALSE; -} - -wxTimer::~wxTimer(void) -{ - Stop(); -} - -int wxTimer::Interval(void) -{ - return m_time; -} - -bool wxTimer::OneShot(void) -{ - return m_oneShot; -} - -void wxTimer::Notify(void) -{ -} - -void wxTimer::Start( int millisecs, bool oneShot ) -{ - if (millisecs != -1) m_time = millisecs; - m_oneShot = oneShot; - m_tag = gtk_timeout_add( millisecs, timeout_callback, this ); -} - -void wxTimer::Stop(void) -{ - if (m_tag != -1) - gtk_timeout_remove( m_tag ); - m_tag = -1; -} - diff --git a/src/gtk1/treectrl.cpp b/src/gtk1/treectrl.cpp deleted file mode 100644 index 3ae18cf4f6..0000000000 --- a/src/gtk1/treectrl.cpp +++ /dev/null @@ -1,736 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: treectrl.cpp -// Purpose: -// Author: Denis Pershin -// Created: 07/05/98 -// Id: $Id$ -// Copyright: (c) 1998 Denis Pershin and Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "treectrl.h" -#endif - -#include "wx/gtk/treectrl.h" -#include "wx/settings.h" -#include "wx/log.h" - -#ifdef USE_GDK_IMLIB -#include "../gdk_imlib/gdk_imlib.h" -#endif - -//----------------------------------------------------------------------------- -// wxTreeItem -//----------------------------------------------------------------------------- - -// clicked - -void gtk_treeitem_expand_callback(GtkWidget *WXUNUSED(widget), wxTreeItem *treeitem) { - if (treeitem->ignore) - return; - treeitem->SendExpanding(treeitem->m_owner); - treeitem->SendExpand(treeitem->m_owner); -}; - -void gtk_treeitem_collapse_callback( GtkWidget *WXUNUSED(widget), wxTreeItem *treeitem) { - if (treeitem->ignore) - return; - treeitem->SendCollapsing(treeitem->m_owner); - treeitem->SendCollapse(treeitem->m_owner); -}; - -void gtk_treeitem_select_callback( GtkWidget *WXUNUSED(widget), wxTreeItem *treeitem) { - treeitem->SendSelChanging(treeitem->m_owner); - treeitem->m_state |= wxTREE_STATE_SELECTED; - treeitem->SendSelChanged(treeitem->m_owner); -} - -void gtk_treeitem_deselect_callback( GtkWidget *WXUNUSED(widget), wxTreeItem *treeitem) { - treeitem->SendSelChanging(treeitem->m_owner); - treeitem->m_state &= !wxTREE_STATE_SELECTED; - treeitem->SendSelChanged(treeitem->m_owner); -} - -IMPLEMENT_DYNAMIC_CLASS(wxTreeItem, wxObject) - -wxTreeItem::wxTreeItem() { - m_mask = 0; - m_itemId = 0; - m_state = 0; - m_stateMask = 0; - m_image = -1; - m_children = 0; - m_selectedImage = -1; - m_tree = NULL; - m_parentwidget = NULL; - m_widget = NULL; - m_data = 0; - m_owner = 0; - expand_handler = 0; - collapse_handler = 0; -}; - -wxTreeItem::wxTreeItem(GtkWidget *parent, const wxTreeItem &item) { - m_mask = item.m_mask; - m_text = item.m_text; - m_itemId = item.m_itemId; - m_state = item.m_state; - m_stateMask = item.m_stateMask; - m_image = item.m_image; - m_tree = NULL; - m_owner = 0; - m_selectedImage = item.m_selectedImage; - m_children = item.m_children; - m_childlist = item.m_childlist; - m_data = item.m_data; - m_parentwidget = parent; - expand_handler = 0; - collapse_handler = 0; - - Create(); -} - -void wxTreeItem::Create() { - wxASSERT(m_parentwidget != NULL); - - m_widget = GTK_TREE_ITEM(gtk_tree_item_new_with_label ((char *)(const char *)m_text)); - gtk_container_add (GTK_CONTAINER(m_parentwidget), GTK_WIDGET(m_widget)); - gtk_widget_show(GTK_WIDGET(m_widget)); - - ignore = FALSE; - - gtk_signal_connect(GTK_OBJECT(m_widget), "select", - GTK_SIGNAL_FUNC(gtk_treeitem_select_callback), (gpointer)this ); - - gtk_signal_connect(GTK_OBJECT(m_widget), "deselect", - GTK_SIGNAL_FUNC(gtk_treeitem_deselect_callback), (gpointer)this ); - - if (expand_handler == 0) - expand_handler = gtk_signal_connect(GTK_OBJECT(m_widget), "expand", - GTK_SIGNAL_FUNC(gtk_treeitem_expand_callback), (gpointer)this ); - - if (collapse_handler == 0) - collapse_handler = gtk_signal_connect( GTK_OBJECT(m_widget), "collapse", - GTK_SIGNAL_FUNC(gtk_treeitem_collapse_callback), (gpointer)this ); - - if ((m_mask & wxTREE_MASK_CHILDREN) != 0) - AddSubtree(); -} - -wxTreeItem::~wxTreeItem() { - if (m_owner != NULL) - SendDelete(m_owner); - DeleteChildren(); - if ((m_widget != NULL) && (m_parentwidget != NULL)) - gtk_container_remove(GTK_CONTAINER(m_parentwidget), - GTK_WIDGET(m_widget)); -// if (m_tree != NULL) { -// gtk_widget_destroy(GTK_WIDGET(m_tree)); -// m_tree = NULL; -// } - -// if (m_widget != NULL) -// gtk_widget_destroy(GTK_WIDGET(m_widget)); -} - -void wxTreeItem::AddSubtree() { - if (m_widget == NULL) - return; - - m_tree = GTK_TREE(gtk_tree_new()); - gtk_tree_item_set_subtree(GTK_TREE_ITEM(m_widget), GTK_WIDGET(m_tree)); - gtk_widget_show(GTK_WIDGET(m_tree)); - - ignore = TRUE; - gtk_tree_item_expand(m_widget); - gtk_tree_item_collapse(m_widget); - ignore = FALSE; -} - -void wxTreeItem::AddChild(wxTreeItem *child) { - wxASSERT(child != NULL); - - m_childlist.Append(child); -} - -bool wxTreeItem::HasChildren() { - return (m_childlist.Number() != 0); -} - -void wxTreeItem::DeleteChildren() { - wxTreeItem *item; - - long no = GetChildrenNumber(); - for (long i=0; isubtree == 0) - AddSubtree(); -} - -int wxTreeItem::NumberOfVisibleDescendents() { - wxTreeItem *item; - long no = GetChildrenNumber(); - long num = 0; - for (long i=0; iNumberOfVisibleDescendents(); - - num+=no; - - return num; -} - -wxTreeItem *wxTreeItem::FindItem(long itemId) const { - if (m_itemId == itemId) return (wxTreeItem*)(this); - wxNode *node = m_childlist.First(); - while (node) { - wxTreeItem *item = (wxTreeItem*)node->Data(); - wxTreeItem *res = item->FindItem( itemId ); - if (res) return (wxTreeItem*)(res); - node = node->Next(); - }; - return NULL; -}; - -wxTreeItem *wxTreeItem::FindItem(GtkTreeItem *item) const { - if (m_widget == item) - return (wxTreeItem*)(this); - wxNode *node = m_childlist.First(); - while (node) { - wxTreeItem *i = (wxTreeItem*)node->Data(); - wxTreeItem *res = i->FindItem(item); - if (res) return (wxTreeItem*)(res); - node = node->Next(); - }; - return NULL; -}; - -void wxTreeItem::PrepareEvent(wxTreeEvent &event) { - event.m_item.m_itemId = m_itemId; - event.m_item.m_state = m_state; - event.m_item.m_text = m_text; - event.m_item.m_image = m_image; - event.m_item.m_selectedImage = m_selectedImage; - event.m_item.m_children = (GetChildrenNumber() > 0); - event.m_item.m_data = m_data; - event.m_oldItem = 0; - event.m_code = 0; -// event.m_pointDrag.x = 0; -// event.m_pointDrag.y = 0; -}; - -void wxTreeItem::SendDelete(wxWindow *target) { - wxTreeEvent event(wxEVT_COMMAND_TREE_DELETE_ITEM, target->GetId()); - PrepareEvent(event); - event.SetEventObject(target); - target->ProcessEvent(event); -}; - -void wxTreeItem::SendExpand(wxWindow *target) { - wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_EXPANDED, target->GetId()); - PrepareEvent(event); - event.SetEventObject(target); - target->ProcessEvent(event); -}; - -void wxTreeItem::SendExpanding(wxWindow *target) { - wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_EXPANDING, target->GetId()); - PrepareEvent(event); - event.SetEventObject(target); - target->ProcessEvent(event); -}; - -void wxTreeItem::SendCollapse(wxWindow *target) { - wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_COLLAPSED, target->GetId()); - PrepareEvent(event); - event.SetEventObject(target); - target->ProcessEvent(event); -}; - -void wxTreeItem::SendCollapsing(wxWindow *target) { - wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_COLLAPSING, target->GetId()); - PrepareEvent(event); - event.SetEventObject(target); - target->ProcessEvent(event); -}; - -void wxTreeItem::SendSelChanged(wxWindow *target) { - wxTreeEvent event(wxEVT_COMMAND_TREE_SEL_CHANGED, target->GetId()); - PrepareEvent(event); - event.SetEventObject(target); - target->ProcessEvent(event); -}; - -void wxTreeItem::SendSelChanging(wxWindow *target) { - wxTreeEvent event(wxEVT_COMMAND_TREE_SEL_CHANGING, target->GetId()); - PrepareEvent(event); - event.SetEventObject(target); - target->ProcessEvent(event); -}; - -//----------------------------------------------------------------------------- -// wxTreeCtrl -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxTreeCtrl, wxScrolledWindow) - -wxTreeCtrl::wxTreeCtrl() { - m_current = NULL; - m_lastId = 0; - m_isCreated = FALSE; - m_imageList = NULL; - m_smallImageList = NULL; -}; - -wxTreeCtrl::wxTreeCtrl(wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) { - m_current = NULL; - m_lastId = 0; - m_isCreated = FALSE; - m_imageList = NULL; - m_smallImageList = NULL; - Create( parent, id, pos, size, style, name ); -}; - -wxTreeCtrl::~wxTreeCtrl() { - DeleteAllItems(); -}; - -bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) { - m_needParent = TRUE; - - PreCreation( parent, id, pos, size, style, name ); - - m_widget = gtk_scrolled_window_new(NULL, NULL); - gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(m_widget), - GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - - m_tree = GTK_TREE(gtk_tree_new()); - -/* - gtk_signal_connect( GTK_OBJECT(m_tree), "selection_changed", - GTK_SIGNAL_FUNC(gtk_treectrl_selection_changed_callback), (gpointer)this); - gtk_signal_connect( GTK_OBJECT(m_tree), "select_child", - GTK_SIGNAL_FUNC(gtk_treectrl_select_child_callback), (gpointer)this); - gtk_signal_connect( GTK_OBJECT(m_tree), "unselect_child", - GTK_SIGNAL_FUNC(gtk_treectrl_unselect_child_callback), (gpointer)this); -*/ - - gtk_container_add(GTK_CONTAINER(m_widget), GTK_WIDGET(m_tree)); - gtk_widget_show(GTK_WIDGET(m_tree)); - - PostCreation(); - - gtk_widget_realize(GTK_WIDGET(m_tree)); - - Show(TRUE); - - return TRUE; -}; - -int wxTreeCtrl::GetCount() const -{ - if (!m_anchor) return 0; - return m_anchor->NumberOfVisibleDescendents(); -}; - -long wxTreeCtrl::InsertItem(long parent, const wxString& label, - int image, int selImage, long insertAfter) { - wxTreeItem item; - if (!label.IsNull() || (label == "")) { - item.m_text = label; - item.m_mask |= wxTREE_MASK_TEXT; - }; - - if (image >= 0) { - item.m_image = image; - item.m_mask |= wxTREE_MASK_IMAGE; - }; - - if (selImage >= 0) { - item.m_selectedImage = selImage; - item.m_mask |= wxTREE_MASK_SELECTED_IMAGE; - }; - - return InsertItem(parent, item, insertAfter); -}; - -long wxTreeCtrl::InsertItem( long parent, wxTreeItem &info, long WXUNUSED(insertAfter) ) { - int oldMask = info.m_mask; - long ret = 0; - wxTreeItem *p = NULL; - wxTreeItem *new_child; - - if (parent == 0) { - if (m_anchor) - return -1; - } else { - p = FindItem(parent); - if (!p) return -1; - }; - - if ((info.m_mask & wxTREE_MASK_HANDLE) == 0) { - m_lastId++; - info.m_itemId = m_lastId; - info.m_mask |= wxTREE_MASK_HANDLE; - ret = m_lastId; - } else - ret = info.m_itemId; - - if (p) { - if (p->m_tree == NULL) - p->AddSubtree(); - - new_child = new wxTreeItem(GTK_WIDGET(p->m_tree), info); - p->AddChild(new_child); -gtk_widget_draw_default(GTK_WIDGET(m_tree)); - } else { - new_child = new wxTreeItem(GTK_WIDGET(m_tree), info); - m_anchor = new_child; - } - -/* Disabled until wxImageList q solved >>> seems it solved */ -/* - wxBitmap *bmp; - if ((new_child->m_mask & wxTREE_MASK_IMAGE) != 0) { - if (m_imageList != NULL) { -// if ((bmp = m_imageList->GetBitmap(new_child->m_image)) != NULL) { - if ((bmp = m_imageList->GetBitmap(0)) != NULL) { - if (bmp->Ok()) { - GdkBitmap *mask = NULL; - if (bmp->GetMask()) mask = bmp->GetMask()->GetBitmap(); - GtkWidget *pixmap = gtk_pixmap_new(bmp->GetPixmap(), mask); - -gtk_widget_unref(new_child->m_widget->plus_pix_widget); -gtk_container_remove(GTK_CONTAINER(new_child->m_widget->pixmaps_box), - new_child->m_widget->plus_pix_widget); -gtk_container_add(GTK_CONTAINER(new_child->m_widget->pixmaps_box), - pixmap); - gtk_widget_show(pixmap); - GTK_TREE_ITEM(new_child->m_widget)->plus_pix_widget = pixmap; - } - } - - if ((bmp = m_imageList->GetBitmap(1)) != NULL) { - if (bmp->Ok()) { - GdkBitmap *mask = NULL; - if (bmp->GetMask()) mask = bmp->GetMask()->GetBitmap(); - GtkWidget *pixmap = gtk_pixmap_new(bmp->GetPixmap(), mask); - -gtk_widget_unref(new_child->m_widget->minus_pix_widget); -//gtk_container_remove(GTK_CONTAINER(new_child->m_widget->pixmaps_box), -// new_child->m_widget->plus_pix_widget); -//gtk_container_add(GTK_CONTAINER(new_child->m_widget->pixmaps_box), -// pixmap); - gtk_widget_show(pixmap); - GTK_TREE_ITEM(new_child->m_widget)->minus_pix_widget = pixmap; - } - } - } - } -*/ - - new_child->m_owner = this; - - info.m_mask = oldMask; - return ret; -}; - - -bool wxTreeCtrl::ExpandItem( long item, int action ) { - wxTreeItem *i = FindItem( item ); - if (!i) - return FALSE; - - switch (action) { - case wxTREE_EXPAND_EXPAND: - gtk_tree_item_expand(GTK_TREE_ITEM(i->m_widget)); - break; - - case wxTREE_EXPAND_COLLAPSE_RESET: - case wxTREE_EXPAND_COLLAPSE: - gtk_tree_item_collapse(GTK_TREE_ITEM(i->m_widget)); - break; - - case wxTREE_EXPAND_TOGGLE: - if ((i->GetState() & wxTREE_STATE_EXPANDED) == 0) - gtk_tree_item_expand(GTK_TREE_ITEM(i->m_widget)); - else - gtk_tree_item_collapse(GTK_TREE_ITEM(i->m_widget)); - break; - } - - return TRUE; -}; - -void wxTreeCtrl::DeleteItem( long item ) -{ - wxTreeItem *pItem = FindItem( item ); - wxCHECK_RET( pItem != NULL, "wxTreeCtrl::DeleteItem: no such pItem." ); - -// pItem->m_parent->m_childlist.DeleteObject(pItem); -} - -void wxTreeCtrl::DeleteChildren( long item ) -{ - wxTreeItem *pItem = FindItem( item ); - wxCHECK_RET( pItem != NULL, "wxTreeCtrl::DeleteChildren: no such pItem." ); - - pItem->DeleteChildren(); -} - -bool wxTreeCtrl::DeleteAllItems() -{ - delete m_anchor; - m_anchor = NULL; - return TRUE; -}; - -/* -bool wxTreeCtrl::GetItem( wxTreeItem &info ) const -{ - wxTreeItem *i = FindItem( info.m_itemId ); - if (!i) return FALSE; - i->GetItem( info ); - return TRUE; -}; -*/ - -long wxTreeCtrl::GetItemData( long item ) const -{ - wxTreeItem *i = FindItem( item ); - if (!i) return 0; - return i->m_data; -}; - -wxString wxTreeCtrl::GetItemText( long item ) const -{ - wxTreeItem *i = FindItem( item ); - if (!i) return ""; - return i->m_text; -}; - -int wxTreeCtrl::GetItemImage(long item) const -{ - wxTreeItem *i = FindItem( item ); - return i == 0 ? -1 : i->GetImage(); -} - -long wxTreeCtrl::GetParent( long item ) const -{ - wxTreeItem *i = FindItem( item ); - if (!i) return -1; -/* - i = i->m_parent; - if (!i) return -1; - return i->m_parent->m_itemId; -*/ - return -1; -}; - -long wxTreeCtrl::GetRootItem() const -{ - if (m_anchor) return m_anchor->m_itemId; - return -1; -}; - -/* -long wxTreeCtrl::GetSelection() const -{ - return m_current ? m_current->GetItemId() : -1; -}; - -bool wxTreeCtrl::SelectItem(long itemId) -{ - wxTreeItem *pItem = FindItem(itemId); - if ( !pItem ) { - wxLogDebug("Can't select an item %d which doesn't exist.", itemId); - - return FALSE; - } - - SelectItem(pItem); - - return TRUE; -}; - -void wxTreeCtrl::SelectItem(wxTreeItem *item, bool bDoEvents ) -{ - if (m_current != item) - { - if (m_current) - { - m_current->SetHilight( FALSE ); -// RefreshLine( m_current ); - }; - m_current = item; - m_current->SetHilight( TRUE ); -// RefreshLine( m_current ); - - if (bDoEvents) m_current->SendSelected( this ); - } -} -*/ - -bool wxTreeCtrl::ItemHasChildren( long item ) const -{ - wxTreeItem *i = FindItem( item ); - if (!i) return FALSE; - return i->HasChildren(); -}; - -void wxTreeCtrl::SetIndent( int indent ) -{ - m_indent = indent; - Refresh(); -}; - -int wxTreeCtrl::GetIndent() const -{ - return m_indent; -}; - -/* -bool wxTreeCtrl::SetItem( wxTreeItem &info ) -{ - wxTreeItem *i = FindItem( info.m_itemId ); - if (!i) return FALSE; - wxClientDC dc(this); - i->SetItem( info, &dc ); - Refresh(); - return TRUE; -}; - -bool wxTreeCtrl::SetItemData( long item, long data ) -{ - wxTreeItem *i = FindItem( item ); - if (!i) return FALSE; - i->m_data = data; - return TRUE; -}; - -bool wxTreeCtrl::SetItemText( long item, const wxString &text ) -{ - wxTreeItem *i = FindItem( item ); - if (!i) return FALSE; - wxClientDC dc(this); - i->SetText( text, &dc ); - return TRUE; -}; - -void wxTreeCtrl::SetItemImage(long item, int image, int imageSel) const -{ - wxTreeItem *i = FindItem( item ); - if ( i != 0 ) { - i->SetImage(image); - i->SetSelectedImage(imageSel); - } -} - -long wxTreeCtrl::HitTest( const wxPoint& point, int &flags ) -{ - flags = 0; - if (!m_anchor) return -1; - return m_anchor->HitTest( point, flags ); -}; -*/ - -wxImageList *wxTreeCtrl::GetImageList( int which ) const -{ - if (which == wxIMAGE_LIST_NORMAL) return m_imageList; - return m_smallImageList; -}; - -void wxTreeCtrl::SetImageList( wxImageList *imageList, int which ) -{ - if (which == wxIMAGE_LIST_NORMAL) - { - if (m_imageList) delete m_imageList; - m_imageList = imageList; - } - else - { - if (m_smallImageList) delete m_smallImageList; - m_smallImageList = imageList; - }; -}; - -wxTreeItem *wxTreeCtrl::FindItem( long itemId ) const { - if (!m_anchor) return NULL; - return m_anchor->FindItem( itemId ); - return 0; -}; - -wxTreeItem *wxTreeCtrl::FindItem(GtkTreeItem *item) const { - if (!m_anchor) return NULL; - return m_anchor->FindItem(item); - return 0; -}; - -//----------------------------------------------------------------------------- -// wxTreeEvent -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent,wxCommandEvent) - -wxTreeEvent::wxTreeEvent( wxEventType commandType, int id ) : - wxCommandEvent( commandType, id ) -{ - m_code = 0; - m_oldItem = 0; -}; - -/* Bunch of old code might be useful */ -/* - wxBitmap *bmp; - - if ((bmp = m_imageList->GetItem(0))->Ok()) { - GdkBitmap *mask = NULL; - if (bmp->GetMask()) mask = bmp->GetMask()->GetBitmap(); - GtkWidget *pixmap = gtk_pixmap_new( bmp->GetPixmap(), mask ); - - gtk_widget_set_parent(pixmap, GTK_WIDGET(new_child->m_widget)); - gtk_widget_show(pixmap); - GTK_TREE_ITEM(new_child->m_widget)->pixmaps_box = pixmap; - } - - if ((bmp = m_imageList->GetItem(1))->Ok()) { - GdkBitmap *mask = NULL; - if (bmp->GetMask()) mask = bmp->GetMask()->GetBitmap(); - GtkWidget *pixmap = gtk_pixmap_new( bmp->GetPixmap(), mask ); - - gtk_widget_set_parent(pixmap, GTK_WIDGET(new_child->m_widget)); - gtk_widget_show(pixmap); - GTK_TREE_ITEM(new_child->m_widget)->plus_pix_widget = pixmap; - } - - if ((bmp = m_imageList->GetItem(2))->Ok()) { - GdkBitmap *mask = NULL; - if (bmp->GetMask()) mask = bmp->GetMask()->GetBitmap(); - GtkWidget *pixmap = gtk_pixmap_new( bmp->GetPixmap(), mask ); - - gtk_widget_set_parent(pixmap, GTK_WIDGET(new_child->m_widget)); - gtk_widget_show(pixmap); - GTK_TREE_ITEM(new_child->m_widget)->minus_pix_widget = pixmap; - } - - if (p) - if (p->m_childlist.Number() == 1) { - gtk_tree_item_collapse(GTK_TREE_ITEM(p->m_widget)); - gtk_tree_item_expand(GTK_TREE_ITEM(p->m_widget)); - } -*/ diff --git a/src/gtk1/utilsgtk.cpp b/src/gtk1/utilsgtk.cpp deleted file mode 100644 index 050d1718ce..0000000000 --- a/src/gtk1/utilsgtk.cpp +++ /dev/null @@ -1,476 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: utils.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -//#ifdef __GNUG__ -//#pragma implementation "utils.h" -//#endif - -#include "wx/utils.h" -#include "wx/string.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef __SVR4__ -#include -#endif - -//------------------------------------------------------------------------ -// misc. -//------------------------------------------------------------------------ - -void wxBell(void) -{ - gdk_beep(); -}; - -void wxSleep(int nSecs) -{ - sleep(nSecs); -}; - -int wxKill(long pid, int sig) -{ - return kill(pid, sig); -}; - -void wxDisplaySize( int *width, int *height ) -{ - if (width) *width = gdk_screen_width(); - if (height) *height = gdk_screen_height(); -} - -void wxGetMousePosition( int* x, int* y ) -{ - wxFAIL_MSG( "GetMousePosition not yet implemented" ); - if (x) *x = 0; - if (y) *y = 0; -}; - -bool wxColourDisplay(void) -{ - wxFAIL_MSG( "wxColourDisplay always returns TRUE" ); - return TRUE; -} - -int wxDisplayDepth(void) -{ - wxFAIL_MSG( "wxDisplayDepth always returns 8" ); - return 8; -} - -//------------------------------------------------------------------------ -// user and home routines -//------------------------------------------------------------------------ - -char* wxGetHomeDir( char *dest ) -{ - wxString tmp = wxGetUserHome( wxString() ); - if (tmp.IsNull()) - strcpy( wxBuffer, "/" ); - else - strcpy( wxBuffer, tmp ); - if (dest) strcpy( dest, WXSTRINGCAST tmp ); - return wxBuffer; -}; - -char *wxGetUserHome( const wxString &user ) -{ - struct passwd *who = (struct passwd *) NULL; - - if (user.IsNull() || (user== "")) - { - register char *ptr; - - if ((ptr = getenv("HOME")) != NULL) - return ptr; - if ((ptr = getenv("USER")) != NULL - || (ptr = getenv("LOGNAME")) != NULL) { - who = getpwnam(ptr); - } - // We now make sure the the user exists! - if (who == NULL) - who = getpwuid(getuid()); - } - else - who = getpwnam (user); - - return who ? who->pw_dir : (char*)NULL; -}; - -//------------------------------------------------------------------------ -// id routines -//------------------------------------------------------------------------ - -bool wxGetHostName(char *buf, int sz) -{ - *buf = '\0'; -#if defined(__SVR4__) && !defined(__sgi) - return (sysinfo(SI_HOSTNAME, buf, sz) != -1); -#else /* BSD Sockets */ - char name[255]; - struct hostent *h; - // Get hostname - if (gethostname(name, sizeof(name)/sizeof(char)-1) == -1) - return FALSE; - // Get official full name of host - strncpy(buf, (h=gethostbyname(name))!=NULL ? h->h_name : name, sz-1); - return TRUE; -#endif -} - -bool wxGetUserId(char *buf, int sz) -{ - struct passwd *who; - - *buf = '\0'; - if ((who = getpwuid(getuid ())) != NULL) { - strncpy (buf, who->pw_name, sz-1); - return TRUE; - } - return FALSE; -} - -bool wxGetUserName(char *buf, int sz) -{ - struct passwd *who; - - *buf = '\0'; - if ((who = getpwuid (getuid ())) != NULL) { - strncpy (buf, who->pw_gecos, sz - 1); - return TRUE; - } - return FALSE; -} - -//------------------------------------------------------------------------ -// error and debug output routines -//------------------------------------------------------------------------ - -void wxDebugMsg( const char *format, ... ) -{ - va_list ap; - va_start( ap, format ); - vfprintf( stderr, format, ap ); - fflush( stderr ); - va_end(ap); -}; - -void wxError( const wxString &msg, const wxString &title ) -{ - fprintf( stderr, "Error " ); - if (!title.IsNull()) fprintf( stderr, "%s ", WXSTRINGCAST(title) ); - if (!msg.IsNull()) fprintf( stderr, ": %s", WXSTRINGCAST(msg) ); - fprintf( stderr, ".\n" ); -}; - -void wxFatalError( const wxString &msg, const wxString &title ) -{ - fprintf( stderr, "Error " ); - if (!title.IsNull()) fprintf( stderr, "%s ", WXSTRINGCAST(title) ); - if (!msg.IsNull()) fprintf( stderr, ": %s", WXSTRINGCAST(msg) ); - fprintf( stderr, ".\n" ); - exit(1); -}; - -//------------------------------------------------------------------------ -// directory routines -//------------------------------------------------------------------------ - -bool wxDirExists( const wxString& dir ) -{ - char buf[500]; - strcpy( buf, WXSTRINGCAST(dir) ); - struct stat sbuf; - return ((stat(buf, &sbuf) != -1) && S_ISDIR(sbuf.st_mode) ? TRUE : FALSE); -}; - -//------------------------------------------------------------------------ -// wild character routines -//------------------------------------------------------------------------ - -bool wxIsWild( const wxString& pattern ) -{ - wxString tmp = pattern; - char *pat = WXSTRINGCAST(tmp); - while (*pat) { - switch (*pat++) { - case '?': case '*': case '[': case '{': - return TRUE; - case '\\': - if (!*pat++) - return FALSE; - } - } - return FALSE; -}; - - -bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special ) -{ - wxString tmp1 = pat; - char *pattern = WXSTRINGCAST(tmp1); - wxString tmp2 = text; - char *str = WXSTRINGCAST(tmp2); - char c; - char *cp; - bool done = FALSE, ret_code, ok; - // Below is for vi fans - const char OB = '{', CB = '}'; - - // dot_special means '.' only matches '.' - if (dot_special && *str == '.' && *pattern != *str) - return FALSE; - - while ((*pattern != '\0') && (!done) - && (((*str=='\0')&&((*pattern==OB)||(*pattern=='*')))||(*str!='\0'))) { - switch (*pattern) { - case '\\': - pattern++; - if (*pattern != '\0') - pattern++; - break; - case '*': - pattern++; - ret_code = FALSE; - while ((*str!='\0') - && (!(ret_code=wxMatchWild(pattern, str++, FALSE)))) - /*loop*/; - if (ret_code) { - while (*str != '\0') - str++; - while (*pattern != '\0') - pattern++; - } - break; - case '[': - pattern++; - repeat: - if ((*pattern == '\0') || (*pattern == ']')) { - done = TRUE; - break; - } - if (*pattern == '\\') { - pattern++; - if (*pattern == '\0') { - done = TRUE; - break; - } - } - if (*(pattern + 1) == '-') { - c = *pattern; - pattern += 2; - if (*pattern == ']') { - done = TRUE; - break; - } - if (*pattern == '\\') { - pattern++; - if (*pattern == '\0') { - done = TRUE; - break; - } - } - if ((*str < c) || (*str > *pattern)) { - pattern++; - goto repeat; - } - } else if (*pattern != *str) { - pattern++; - goto repeat; - } - pattern++; - while ((*pattern != ']') && (*pattern != '\0')) { - if ((*pattern == '\\') && (*(pattern + 1) != '\0')) - pattern++; - pattern++; - } - if (*pattern != '\0') { - pattern++, str++; - } - break; - case '?': - pattern++; - str++; - break; - case OB: - pattern++; - while ((*pattern != CB) && (*pattern != '\0')) { - cp = str; - ok = TRUE; - while (ok && (*cp != '\0') && (*pattern != '\0') - && (*pattern != ',') && (*pattern != CB)) { - if (*pattern == '\\') - pattern++; - ok = (*pattern++ == *cp++); - } - if (*pattern == '\0') { - ok = FALSE; - done = TRUE; - break; - } else if (ok) { - str = cp; - while ((*pattern != CB) && (*pattern != '\0')) { - if (*++pattern == '\\') { - if (*++pattern == CB) - pattern++; - } - } - } else { - while (*pattern!=CB && *pattern!=',' && *pattern!='\0') { - if (*++pattern == '\\') { - if (*++pattern == CB || *pattern == ',') - pattern++; - } - } - } - if (*pattern != '\0') - pattern++; - } - break; - default: - if (*str == *pattern) { - str++, pattern++; - } else { - done = TRUE; - } - } - } - while (*pattern == '*') - pattern++; - return ((*str == '\0') && (*pattern == '\0')); -}; - -//------------------------------------------------------------------------ -// subprocess routines -//------------------------------------------------------------------------ - -typedef struct { - gint pid, tag; - wxProcess *process; -} wxEndProcessData; - -static void GTK_EndProcessDetector(gpointer data, gint source, - GdkInputCondition WXUNUSED(condition) ) -{ - wxEndProcessData *proc_data = (wxEndProcessData *)data; - int pid; - - pid = (proc_data->pid > 0) ? proc_data->pid : -(proc_data->pid); - - /* wait4 is not part of any standard, use at own risk - * not sure what wait4 does, but wait3 seems to be closest, whats a digit ;-) - * --- offer@sgi.com */ -#if !defined(__sgi) - wait4(proc_data->pid, NULL, 0, NULL); -#else - wait3((int *) NULL, 0, (rusage *) NULL); -#endif - - close(source); - gdk_input_remove(proc_data->tag); - - if (proc_data->process) - proc_data->process->OnTerminate(proc_data->pid); - - if (proc_data->pid > 0) - delete proc_data; - else - proc_data->pid = 0; -}; - -long wxExecute( char **argv, bool sync, wxProcess *process ) -{ - wxEndProcessData *data = new wxEndProcessData; - int end_proc_detect[2]; - - if (*argv == NULL) - return 0; - - /* Create pipes */ - if (pipe(end_proc_detect) == -1) { - perror("pipe failed"); - return 0; - } - - /* fork the process */ -#if defined(sun) || defined(__ultrix) || defined(__bsdi__) - pid_t pid = vfork(); -#else - pid_t pid = fork(); -#endif - if (pid == -1) { - perror ("fork failed"); - return 0; - } else if (pid == 0) { - /* Close fd not useful */ - close(end_proc_detect[0]); // close reading side - - /* child */ -#ifdef _AIX - execvp ((const char *)*argv, (const char **)argv); -#else - execvp (*argv, argv); -#endif - if (errno == ENOENT) - wxError("command not found", *argv); - else - perror (*argv); - wxError("could not execute", *argv); - _exit (-1); - } - - close(end_proc_detect[1]); // close writing side - data->tag = gdk_input_add(end_proc_detect[0], GDK_INPUT_READ, - GTK_EndProcessDetector, (gpointer)data); - data->pid = pid; - if (!sync) { - data->process = process; - } else { - data->process = (wxProcess *) NULL; - data->pid = -(data->pid); - - while (data->pid != 0) - wxYield(); - - delete data; - } - - return pid; -}; - -long wxExecute( const wxString& command, bool sync, wxProcess *process ) -{ - if (command.IsNull() || command == "") return FALSE; - - int argc = 0; - char *argv[127]; - char tmp[1024]; - const char *IFS = " \t\n"; - - strncpy (tmp, command, sizeof(tmp) / sizeof(char) - 1); - tmp[sizeof (tmp) / sizeof (char) - 1] = '\0'; - argv[argc++] = strtok (tmp, IFS); - while ((argv[argc++] = strtok((char *) NULL, IFS)) != NULL) - /* loop */ ; - return wxExecute(argv, sync, process); -}; - - diff --git a/src/gtk1/utilsres.cpp b/src/gtk1/utilsres.cpp deleted file mode 100644 index ec34009cba..0000000000 --- a/src/gtk1/utilsres.cpp +++ /dev/null @@ -1,336 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: utils.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -//#ifdef __GNUG__ -//#pragma implementation "utils.h" -//#endif - -#include "wx/utils.h" -#include "wx/string.h" -#include "wx/list.h" - -#include -#include -#include -#ifdef __SVR4__ -#include -#endif - -#include "gdk/gdkx.h" // GDK_DISPLAY -#include "gdk/gdkprivate.h" // gdk_progclass - -#include -#include -#include - -#include "wx/log.h" - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -// Yuck this is really BOTH site and platform dependent -// so we should use some other strategy! -#ifdef __SUN__ - #define DEFAULT_XRESOURCE_DIR "/usr/openwin/lib/app-defaults" -#else - #define DEFAULT_XRESOURCE_DIR "/usr/lib/X11/app-defaults" -#endif - -//----------------------------------------------------------------------------- -// glabal data (data.cpp) -//----------------------------------------------------------------------------- - -extern wxResourceCache *wxTheResourceCache; -extern XrmDatabase wxResourceDatabase; - -//----------------------------------------------------------------------------- -// utility functions for get/write resources -//----------------------------------------------------------------------------- - -static char *GetResourcePath(char *buf, char *name, bool create) -{ - if (create && FileExists(name)) { - strcpy(buf, name); - return buf; // Exists so ... - } - if (*name == '/') - strcpy(buf, name); - else { - // Put in standard place for resource files if not absolute - strcpy(buf, DEFAULT_XRESOURCE_DIR); - strcat(buf, "/"); - strcat(buf, FileNameFromPath(name)); - } - if (create) { - // Touch the file to create it - FILE *fd = fopen(buf, "w"); - if (fd) fclose(fd); - } - return buf; -} - -// Read $HOME for what it says is home, if not -// read $USER or $LOGNAME for user name else determine -// the Real User, then determine the Real home dir. -static char *GetIniFile(char *dest, const char *filename) -{ - char *home = (char *) NULL; - if (filename && wxIsAbsolutePath(filename)) - { - strcpy(dest, filename); - } - else - { - if ((home = wxGetUserHome(wxString())) != NULL) - { - strcpy(dest, home); - if (dest[strlen(dest) - 1] != '/') strcat(dest, "/"); - if (filename == NULL) - { - if ((filename = getenv("XENVIRONMENT")) == NULL) filename = ".Xdefaults"; - } - else - if (*filename != '.') strcat(dest, "."); - strcat(dest, filename); - } - else - { - dest[0] = '\0'; - } - } - return dest; -} - -static void wxXMergeDatabases(void) -{ - XrmDatabase homeDB, serverDB, applicationDB; - char filenamebuf[1024]; - - char *filename = &filenamebuf[0]; - char *environment; - char *classname = gdk_progclass; // Robert Roebling ?? - char name[256]; - (void)strcpy(name, "/usr/lib/X11/app-defaults/"); - (void)strcat(name, classname ? classname : "wxWindows"); - - // Get application defaults file, if any - if ((applicationDB = XrmGetFileDatabase(name))) - (void)XrmMergeDatabases(applicationDB, &wxResourceDatabase); - - // Merge server defaults, created by xrdb, loaded as a property of the root - // window when the server initializes and loaded into the display - // structure on XOpenDisplay; - // if not defined, use .Xdefaults - if (XResourceManagerString(GDK_DISPLAY()) != NULL) { - serverDB = XrmGetStringDatabase(XResourceManagerString(GDK_DISPLAY())); - } else { - (void)GetIniFile(filename, (char *) NULL); - serverDB = XrmGetFileDatabase(filename); - } - if (serverDB) - XrmMergeDatabases(serverDB, &wxResourceDatabase); - - // Open XENVIRONMENT file, or if not defined, the .Xdefaults, - // and merge into existing database - - if ((environment = getenv("XENVIRONMENT")) == NULL) { - size_t len; - environment = GetIniFile(filename, (const char *) NULL); - len = strlen(environment); -#if !defined(SVR4) || defined(__sgi) - (void)gethostname(environment + len, 1024 - len); -#else - (void)sysinfo(SI_HOSTNAME, environment + len, 1024 - len); -#endif - } - if ((homeDB = XrmGetFileDatabase(environment))) - XrmMergeDatabases(homeDB, &wxResourceDatabase); -} - -//----------------------------------------------------------------------------- -// called on application exit -//----------------------------------------------------------------------------- - -void wxFlushResources(void) -{ - char nameBuffer[512]; - - wxNode *node = wxTheResourceCache->First(); - while (node) { - char *file = node->key.string; - // If file doesn't exist, create it first. - (void)GetResourcePath(nameBuffer, file, TRUE); - - XrmDatabase database = (XrmDatabase)node->Data(); - XrmPutFileDatabase(database, nameBuffer); - XrmDestroyDatabase(database); - wxNode *next = node->Next(); -// delete node; - node = next; - } -} - -void wxDeleteResources(const char *file) -{ - wxLogTrace(wxTraceResAlloc, "Delete: Number = %d", wxTheResourceCache->Number()); - char buffer[500]; - (void)GetIniFile(buffer, file); - - wxNode *node = wxTheResourceCache->Find(buffer); - if (node) { - XrmDatabase database = (XrmDatabase)node->Data(); - XrmDestroyDatabase(database); -// delete node; - } -} - -//----------------------------------------------------------------------------- -// resource functions -//----------------------------------------------------------------------------- - -bool wxWriteResource(const wxString& section, const wxString& entry, const wxString& value, const wxString& file ) -{ - char buffer[500]; - - if (!entry) return FALSE; - - (void)GetIniFile(buffer, file); - - XrmDatabase database; - wxNode *node = wxTheResourceCache->Find(buffer); - if (node) - database = (XrmDatabase)node->Data(); - else { - database = XrmGetFileDatabase(buffer); - wxLogTrace(wxTraceResAlloc, "Write: Number = %d", wxTheResourceCache->Number()); - wxTheResourceCache->Append(buffer, (wxObject *)database); - } - char resName[300]; - strcpy(resName, !section.IsNull() ? WXSTRINGCAST section : "wxWindows"); - strcat(resName, "."); - strcat(resName, entry); - XrmPutStringResource(&database, resName, value); - return TRUE; -}; - -bool wxWriteResource(const wxString& section, const wxString& entry, float value, const wxString& file ) -{ - char buf[50]; - sprintf(buf, "%.4f", value); - return wxWriteResource(section, entry, buf, file); -}; - -bool wxWriteResource(const wxString& section, const wxString& entry, long value, const wxString& file ) -{ - char buf[50]; - sprintf(buf, "%ld", value); - return wxWriteResource(section, entry, buf, file); -}; - -bool wxWriteResource(const wxString& section, const wxString& entry, int value, const wxString& file ) -{ - char buf[50]; - sprintf(buf, "%d", value); - return wxWriteResource(section, entry, buf, file); -}; - -bool wxGetResource(const wxString& section, const wxString& entry, char **value, const wxString& file ) -{ - if (!wxResourceDatabase) - wxXMergeDatabases(); - - XrmDatabase database; - if (file) { - char buffer[500]; - // Is this right? Trying to get it to look in the user's - // home directory instead of current directory -- JACS - (void)GetIniFile(buffer, file); - - wxNode *node = wxTheResourceCache->Find(buffer); - if (node) - database = (XrmDatabase)node->Data(); - else { - database = XrmGetFileDatabase(buffer); - wxLogTrace(wxTraceResAlloc, "Get: Number = %d", wxTheResourceCache->Number()); - wxTheResourceCache->Append(buffer, (wxObject *)database); - } - } else - database = wxResourceDatabase; - - XrmValue xvalue; - char *str_type[20]; - char buf[150]; - strcpy(buf, section); - strcat(buf, "."); - strcat(buf, entry); - - bool success = XrmGetResource(database, buf, "*", str_type, &xvalue); - // Try different combinations of upper/lower case, just in case... - if (!success) { - buf[0] = (isupper(buf[0]) ? tolower(buf[0]) : toupper(buf[0])); - success = XrmGetResource(database, buf, "*", str_type, &xvalue); - } - if (success) { - if (*value) - delete[] *value; - *value = new char[xvalue.size + 1]; - strncpy(*value, xvalue.addr, (int)xvalue.size); - return TRUE; - } - return FALSE; -}; - -bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file ) -{ - char *s = (char *) NULL; - bool succ = wxGetResource(section, entry, &s, file); - if (succ) { - *value = (float)strtod(s, (char **) NULL); - delete[]s; - return TRUE; - } else - return FALSE; -}; - -bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file ) -{ - char *s = (char *) NULL; - bool succ = wxGetResource(section, entry, &s, file); - if (succ) { - *value = strtol(s, (char **) NULL, 10); - delete[]s; - return TRUE; - } else - return FALSE; -}; - -bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file ) -{ - char *s = (char *) NULL; - bool succ = wxGetResource(section, entry, &s, file); - if (succ) { - // Handle True, False here - // True, Yes, Enables, Set or Activated - if (*s == 'T' || *s == 'Y' || *s == 'E' || *s == 'S' || *s == 'A') - *value = TRUE; - // False, No, Disabled, Reset, Cleared, Deactivated - else if (*s == 'F' || *s == 'N' || *s == 'D' || *s == 'R' || *s == 'C') - *value = FALSE; - // Handle as Integer - else - *value = (int)strtol(s, (char **) NULL, 10); - delete[]s; - return TRUE; - } else - return FALSE; -}; - diff --git a/src/gtk1/verti.xbm b/src/gtk1/verti.xbm deleted file mode 100644 index 2dd9dc4c05..0000000000 --- a/src/gtk1/verti.xbm +++ /dev/null @@ -1,6 +0,0 @@ -#define verti_width 15 -#define verti_height 15 -static char verti_bits[] = { - 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, - 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, - 0x84, 0x10, 0x84, 0x10, 0x84, 0x10}; diff --git a/src/gtk1/win_gtk.c b/src/gtk1/win_gtk.c deleted file mode 100644 index 4164200ac1..0000000000 --- a/src/gtk1/win_gtk.c +++ /dev/null @@ -1,484 +0,0 @@ -/* /////////////////////////////////////////////////////////////////////////// -// Name: wx_gtk.h -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////// */ - -#include "wx/gtk/win_gtk.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -static void gtk_myfixed_class_init (GtkMyFixedClass *klass); -static void gtk_myfixed_init (GtkMyFixed *myfixed); -static void gtk_myfixed_map (GtkWidget *widget); -static void gtk_myfixed_unmap (GtkWidget *widget); -static void gtk_myfixed_realize (GtkWidget *widget); -static void gtk_myfixed_size_request (GtkWidget *widget, - GtkRequisition *requisition); -static void gtk_myfixed_size_allocate (GtkWidget *widget, - GtkAllocation *allocation); -static void gtk_myfixed_paint (GtkWidget *widget, - GdkRectangle *area); -static void gtk_myfixed_draw (GtkWidget *widget, - GdkRectangle *area); -static gint gtk_myfixed_expose (GtkWidget *widget, - GdkEventExpose *event); -static void gtk_myfixed_add (GtkContainer *container, - GtkWidget *widget); -static void gtk_myfixed_remove (GtkContainer *container, - GtkWidget *widget); -static void gtk_myfixed_foreach (GtkContainer *container, - GtkCallback callback, - gpointer callback_data); - - -static GtkContainerClass *parent_class = NULL; - - -guint -gtk_myfixed_get_type () -{ - static guint myfixed_type = 0; - - if (!myfixed_type) - { - GtkTypeInfo myfixed_info = - { - "GtkMyFixed", - sizeof (GtkMyFixed), - sizeof (GtkMyFixedClass), - (GtkClassInitFunc) gtk_myfixed_class_init, - (GtkObjectInitFunc) gtk_myfixed_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - myfixed_type = gtk_type_unique (gtk_container_get_type (), &myfixed_info); - } - - return myfixed_type; -} - -static void -gtk_myfixed_class_init (GtkMyFixedClass *klass) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - GtkContainerClass *container_class; - - object_class = (GtkObjectClass*) klass; - widget_class = (GtkWidgetClass*) klass; - container_class = (GtkContainerClass*) klass; - - parent_class = gtk_type_class (gtk_container_get_type ()); - - widget_class->map = gtk_myfixed_map; - widget_class->unmap = gtk_myfixed_unmap; - widget_class->realize = gtk_myfixed_realize; - widget_class->size_request = gtk_myfixed_size_request; - widget_class->size_allocate = gtk_myfixed_size_allocate; - widget_class->draw = gtk_myfixed_draw; - widget_class->expose_event = gtk_myfixed_expose; - - container_class->add = gtk_myfixed_add; - container_class->remove = gtk_myfixed_remove; - container_class->foreach = gtk_myfixed_foreach; -} - -static void -gtk_myfixed_init (GtkMyFixed *myfixed) -{ - GTK_WIDGET_UNSET_FLAGS (myfixed, GTK_NO_WINDOW); - GTK_WIDGET_SET_FLAGS (myfixed, GTK_BASIC); - - myfixed->children = NULL; -} - -GtkWidget* -gtk_myfixed_new () -{ - GtkMyFixed *myfixed; - - myfixed = gtk_type_new (gtk_myfixed_get_type ()); - - return GTK_WIDGET (myfixed); -} - -void -gtk_myfixed_put (GtkMyFixed *myfixed, - GtkWidget *widget, - gint16 x, - gint16 y) -{ - GtkMyFixedChild *child_info; - - g_return_if_fail (myfixed != NULL); - g_return_if_fail (GTK_IS_MYFIXED (myfixed)); - g_return_if_fail (widget != NULL); - - child_info = g_new (GtkMyFixedChild, 1); - child_info->widget = widget; - child_info->x = x; - child_info->y = y; - - gtk_widget_set_parent (widget, GTK_WIDGET (myfixed)); - - myfixed->children = g_list_append (myfixed->children, child_info); - - if (GTK_WIDGET_REALIZED (myfixed) && !GTK_WIDGET_REALIZED (widget)) - gtk_widget_realize (widget); - - if (GTK_WIDGET_MAPPED (myfixed) && !GTK_WIDGET_MAPPED (widget)) - gtk_widget_map (widget); - - if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (myfixed)) - gtk_widget_queue_resize (GTK_WIDGET (myfixed)); -} - -void -gtk_myfixed_move (GtkMyFixed *myfixed, - GtkWidget *widget, - gint16 x, - gint16 y) -{ - GtkMyFixedChild *child; - GList *children; - - g_return_if_fail (myfixed != NULL); - g_return_if_fail (GTK_IS_MYFIXED (myfixed)); - g_return_if_fail (widget != NULL); - - children = myfixed->children; - while (children) - { - child = children->data; - children = children->next; - - if (child->widget == widget) - { - child->x = x; - child->y = y; - - if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (myfixed)) - gtk_widget_queue_resize (GTK_WIDGET (myfixed)); - - break; - } - } -} - -static void -gtk_myfixed_map (GtkWidget *widget) -{ - GtkMyFixed *myfixed; - GtkMyFixedChild *child; - GList *children; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_MYFIXED (widget)); - - GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED); - myfixed = GTK_MYFIXED (widget); - - gdk_window_show (widget->window); - - children = myfixed->children; - while (children) - { - child = children->data; - children = children->next; - - if (GTK_WIDGET_VISIBLE (child->widget) && - !GTK_WIDGET_MAPPED (child->widget)) - gtk_widget_map (child->widget); - } -} - -static void -gtk_myfixed_unmap (GtkWidget *widget) -{ - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_MYFIXED (widget)); - - GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED); -} - -static void -gtk_myfixed_realize (GtkWidget *widget) -{ - GtkMyFixed *myfixed; - GdkWindowAttr attributes; - gint attributes_mask; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_MYFIXED (widget)); - - myfixed = GTK_MYFIXED (widget); - - GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); - - attributes.window_type = GDK_WINDOW_CHILD; - attributes.x = widget->allocation.x; - attributes.y = widget->allocation.y; - attributes.width = 32000; - attributes.height = 32000; - attributes.wclass = GDK_INPUT_OUTPUT; - attributes.visual = gtk_widget_get_visual (widget); - attributes.colormap = gtk_widget_get_colormap (widget); - attributes.event_mask = gtk_widget_get_events (widget); - attributes.event_mask |= - GDK_EXPOSURE_MASK | - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_MOTION_MASK | - GDK_BUTTON1_MOTION_MASK | - GDK_BUTTON2_MOTION_MASK | - GDK_BUTTON3_MOTION_MASK | - GDK_BUTTON_PRESS_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_KEY_PRESS_MASK | - GDK_KEY_RELEASE_MASK | - GDK_ENTER_NOTIFY_MASK | - GDK_LEAVE_NOTIFY_MASK | - GDK_FOCUS_CHANGE_MASK; - - attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; - - widget->window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, - attributes_mask); - gdk_window_set_user_data (widget->window, widget); - - widget->style = gtk_style_attach (widget->style, widget->window); - gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL); -} - -static void -gtk_myfixed_size_request (GtkWidget *widget, - GtkRequisition *requisition) -{ - GtkMyFixed *myfixed; - GtkMyFixedChild *child; - GList *children; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_MYFIXED (widget)); - g_return_if_fail (requisition != NULL); - - myfixed = GTK_MYFIXED (widget); - - requisition->width = 0; - requisition->height = 0; - - children = myfixed->children; - while (children) - { - child = children->data; - children = children->next; - - if (GTK_WIDGET_VISIBLE (child->widget)) - { - gtk_widget_size_request (child->widget, &child->widget->requisition); - } - } -} - -static void -gtk_myfixed_size_allocate (GtkWidget *widget, - GtkAllocation *allocation) -{ - GtkMyFixed *myfixed; - GtkMyFixedChild *child; - GtkAllocation child_allocation; - GList *children; - guint16 border_width; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_MYFIXED(widget)); - g_return_if_fail (allocation != NULL); - - myfixed = GTK_MYFIXED (widget); - - widget->allocation = *allocation; - if (GTK_WIDGET_REALIZED (widget)) - gdk_window_move_resize (widget->window, allocation->x, allocation->y, 32000, 32000 ); - - border_width = GTK_CONTAINER (myfixed)->border_width; - - children = myfixed->children; - while (children) - { - child = children->data; - children = children->next; - - if (GTK_WIDGET_VISIBLE (child->widget)) - { - child_allocation.x = child->x + border_width; - child_allocation.y = child->y + border_width; - child_allocation.width = child->widget->requisition.width; - child_allocation.height = child->widget->requisition.height; - gtk_widget_size_allocate (child->widget, &child_allocation); - } - } -} - -static void -gtk_myfixed_paint (GtkWidget *widget, - GdkRectangle *area) -{ - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_MYFIXED (widget)); - g_return_if_fail (area != NULL); - - if (GTK_WIDGET_DRAWABLE (widget)) - gdk_window_clear_area (widget->window, - area->x, area->y, - area->width, area->height); -} - -static void -gtk_myfixed_draw (GtkWidget *widget, - GdkRectangle *area) -{ - GtkMyFixed *myfixed; - GtkMyFixedChild *child; - GdkRectangle child_area; - GList *children; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_MYFIXED (widget)); - - if (GTK_WIDGET_DRAWABLE (widget)) - { - myfixed = GTK_MYFIXED (widget); - gtk_myfixed_paint (widget, area); - - children = myfixed->children; - while (children) - { - child = children->data; - children = children->next; - - if (gtk_widget_intersect (child->widget, area, &child_area)) - gtk_widget_draw (child->widget, &child_area); - } - } -} - -static gint -gtk_myfixed_expose (GtkWidget *widget, - GdkEventExpose *event) -{ - GtkMyFixed *myfixed; - GtkMyFixedChild *child; - GdkEventExpose child_event; - GList *children; - - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (GTK_IS_MYFIXED (widget), FALSE); - g_return_val_if_fail (event != NULL, FALSE); - - if (GTK_WIDGET_DRAWABLE (widget)) - { - myfixed = GTK_MYFIXED (widget); - - child_event = *event; - - children = myfixed->children; - while (children) - { - child = children->data; - children = children->next; - - if (GTK_WIDGET_NO_WINDOW (child->widget) && - gtk_widget_intersect (child->widget, &event->area, - &child_event.area)) - gtk_widget_event (child->widget, (GdkEvent*) &child_event); - } - } - - return FALSE; -} - -static void -gtk_myfixed_add (GtkContainer *container, - GtkWidget *widget) -{ - g_return_if_fail (container != NULL); - g_return_if_fail (GTK_IS_MYFIXED (container)); - g_return_if_fail (widget != NULL); - - gtk_myfixed_put (GTK_MYFIXED (container), widget, 0, 0); -} - -static void -gtk_myfixed_remove (GtkContainer *container, - GtkWidget *widget) -{ - GtkMyFixed *myfixed; - GtkMyFixedChild *child; - GList *children; - - g_return_if_fail (container != NULL); - g_return_if_fail (GTK_IS_MYFIXED (container)); - g_return_if_fail (widget != NULL); - - myfixed = GTK_MYFIXED (container); - - children = myfixed->children; - while (children) - { - child = children->data; - - if (child->widget == widget) - { - gtk_widget_unparent (widget); - - myfixed->children = g_list_remove_link (myfixed->children, children); - g_list_free (children); - g_free (child); - - if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (container)) - gtk_widget_queue_resize (GTK_WIDGET (container)); - - break; - } - - children = children->next; - } -} - -static void -gtk_myfixed_foreach (GtkContainer *container, - GtkCallback callback, - gpointer callback_data) -{ - GtkMyFixed *myfixed; - GtkMyFixedChild *child; - GList *children; - - g_return_if_fail (container != NULL); - g_return_if_fail (GTK_IS_MYFIXED (container)); - g_return_if_fail (callback != NULL); - - myfixed = GTK_MYFIXED (container); - - children = myfixed->children; - while (children) - { - child = children->data; - children = children->next; - - (* callback) (child->widget, callback_data); - } -} - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp deleted file mode 100644 index dba832d740..0000000000 --- a/src/gtk1/window.cpp +++ /dev/null @@ -1,2586 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: window.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "window.h" -#endif - -#include "wx/defs.h" -#include "wx/window.h" -#include "wx/dc.h" -#include "wx/frame.h" -#include "wx/app.h" -#include "wx/layout.h" -#include "wx/utils.h" -#include "wx/dialog.h" -#include "wx/msgdlg.h" -#include "wx/dcclient.h" -#include "wx/dnd.h" -#include "wx/mdi.h" -#include "wx/menu.h" -#include "wx/notebook.h" -#include "wx/statusbr.h" -#include -#include "gdk/gdkkeysyms.h" -#include -#include "wx/gtk/win_gtk.h" -#include "gdk/gdkprivate.h" - -//----------------------------------------------------------------------------- -// data -//----------------------------------------------------------------------------- - -extern wxList wxPendingDelete; -extern wxList wxTopLevelWindows; -extern bool g_blockEventsOnDrag; - -//----------------------------------------------------------------------------- -// "expose_event" (of m_wxwindow, not of m_widget) -//----------------------------------------------------------------------------- - -static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExpose *gdk_event, wxWindow *win ) -{ - if (!win->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - win->m_updateRegion.Union( gdk_event->area.x, - gdk_event->area.y, - gdk_event->area.width, - gdk_event->area.height ); - - if (gdk_event->count > 0) return; - - wxPaintEvent event( win->GetId() ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); - - win->m_updateRegion.Clear(); -} - -//----------------------------------------------------------------------------- -// "draw" (of m_wxwindow, not of m_widget) -//----------------------------------------------------------------------------- - -static void gtk_window_draw_callback( GtkWidget *WXUNUSED(widget), GdkRectangle *rect, wxWindow *win ) -{ - if (!win->HasVMT()) return; - if (g_blockEventsOnDrag) return; - - win->m_updateRegion.Union( rect->x, rect->y, rect->width, rect->height ); - - wxPaintEvent event( win->GetId() ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); - - win->m_updateRegion.Clear(); -} - -//----------------------------------------------------------------------------- -// "key_press_event" -//----------------------------------------------------------------------------- - -static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxWindow *win ) -{ - if (!win->HasVMT()) return FALSE; - if (g_blockEventsOnDrag) return FALSE; - -/* - printf( "OnKeyPress from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - long key_code = 0; - switch (gdk_event->keyval) - { - case GDK_BackSpace: key_code = WXK_BACK; break; - case GDK_Tab: key_code = WXK_TAB; break; - case GDK_Linefeed: key_code = WXK_RETURN; break; - case GDK_Clear: key_code = WXK_CLEAR; break; - case GDK_Return: key_code = WXK_RETURN; break; - case GDK_Pause: key_code = WXK_PAUSE; break; - case GDK_Scroll_Lock: key_code = WXK_SCROLL; break; - case GDK_Escape: key_code = WXK_ESCAPE; break; - case GDK_Delete: key_code = WXK_DELETE; break; - case GDK_Home: key_code = WXK_HOME; break; - case GDK_Left: key_code = WXK_LEFT; break; - case GDK_Up: key_code = WXK_UP; break; - case GDK_Right: key_code = WXK_RIGHT; break; - case GDK_Down: key_code = WXK_DOWN; break; - case GDK_Prior: key_code = WXK_PRIOR; break; -// case GDK_Page_Up: key_code = WXK_PAGEUP; break; - case GDK_Next: key_code = WXK_NEXT; break; -// case GDK_Page_Down: key_code = WXK_PAGEDOWN; break; - case GDK_End: key_code = WXK_END; break; - case GDK_Begin: key_code = WXK_HOME; break; - case GDK_Select: key_code = WXK_SELECT; break; - case GDK_Print: key_code = WXK_PRINT; break; - case GDK_Execute: key_code = WXK_EXECUTE; break; - case GDK_Insert: key_code = WXK_INSERT; break; - case GDK_Num_Lock: key_code = WXK_NUMLOCK; break; - case GDK_KP_Tab: key_code = WXK_TAB; break; - case GDK_KP_Enter: key_code = WXK_RETURN; break; - case GDK_KP_Home: key_code = WXK_HOME; break; - case GDK_KP_Left: key_code = WXK_LEFT; break; - case GDK_KP_Up: key_code = WXK_UP; break; - case GDK_KP_Right: key_code = WXK_RIGHT; break; - case GDK_KP_Down: key_code = WXK_DOWN; break; - case GDK_KP_Prior: key_code = WXK_PRIOR; break; -// case GDK_KP_Page_Up: key_code = WXK_PAGEUP; break; - case GDK_KP_Next: key_code = WXK_NEXT; break; -// case GDK_KP_Page_Down: key_code = WXK_PAGEDOWN; break; - case GDK_KP_End: key_code = WXK_END; break; - case GDK_KP_Begin: key_code = WXK_HOME; break; - case GDK_KP_Insert: key_code = WXK_INSERT; break; - case GDK_KP_Delete: key_code = WXK_DELETE; break; - case GDK_KP_Multiply: key_code = WXK_MULTIPLY; break; - case GDK_KP_Add: key_code = WXK_ADD; break; - case GDK_KP_Separator: key_code = WXK_SEPARATOR; break; - case GDK_KP_Subtract: key_code = WXK_SUBTRACT; break; - case GDK_KP_Decimal: key_code = WXK_DECIMAL; break; - case GDK_KP_Divide: key_code = WXK_DIVIDE; break; - case GDK_KP_0: key_code = WXK_NUMPAD0; break; - case GDK_KP_1: key_code = WXK_NUMPAD1; break; - case GDK_KP_2: key_code = WXK_NUMPAD2; break; - case GDK_KP_3: key_code = WXK_NUMPAD3; break; - case GDK_KP_4: key_code = WXK_NUMPAD4; break; - case GDK_KP_5: key_code = WXK_NUMPAD5; break; - case GDK_KP_6: key_code = WXK_NUMPAD6; break; - case GDK_KP_7: key_code = WXK_NUMPAD7; break; - case GDK_KP_8: key_code = WXK_NUMPAD7; break; - case GDK_KP_9: key_code = WXK_NUMPAD9; break; - case GDK_F1: key_code = WXK_F1; break; - case GDK_F2: key_code = WXK_F2; break; - case GDK_F3: key_code = WXK_F3; break; - case GDK_F4: key_code = WXK_F4; break; - case GDK_F5: key_code = WXK_F5; break; - case GDK_F6: key_code = WXK_F6; break; - case GDK_F7: key_code = WXK_F7; break; - case GDK_F8: key_code = WXK_F8; break; - case GDK_F9: key_code = WXK_F9; break; - case GDK_F10: key_code = WXK_F10; break; - case GDK_F11: key_code = WXK_F11; break; - case GDK_F12: key_code = WXK_F12; break; - default: - { - if ((gdk_event->keyval >= 0x20) && (gdk_event->keyval <= 0xFF)) - key_code = gdk_event->keyval; - } - } - - if (!key_code) return FALSE; - - wxKeyEvent event( wxEVT_CHAR ); - event.m_shiftDown = (gdk_event->state & GDK_SHIFT_MASK); - event.m_controlDown = (gdk_event->state & GDK_CONTROL_MASK); - event.m_altDown = (gdk_event->state & GDK_MOD1_MASK); - event.m_metaDown = (gdk_event->state & GDK_MOD2_MASK); - event.m_keyCode = key_code; - event.m_x = 0; - event.m_y = 0; - event.SetEventObject( win ); - - bool ret = win->GetEventHandler()->ProcessEvent( event ); - - if (!ret) - { - int command = win->GetAcceleratorTable()->GetCommand( event ); - if (command != -1) - { - wxCommandEvent command_event( wxEVT_COMMAND_MENU_SELECTED, command ); - ret = win->GetEventHandler()->ProcessEvent( command_event ); - } - } - - if (ret) - { - if ((gdk_event->keyval >= 0x20) && (gdk_event->keyval <= 0xFF)) - gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "key_press_event" ); - } - - return ret; -} - -//----------------------------------------------------------------------------- -// "button_press_event" -//----------------------------------------------------------------------------- - -static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton *gdk_event, wxWindow *win ) -{ - if (!win->IsOwnGtkWindow( gdk_event->window )) return TRUE; - - if (g_blockEventsOnDrag) return TRUE; - - if (win->m_wxwindow) - { - if (GTK_WIDGET_CAN_FOCUS(win->m_wxwindow) && !GTK_WIDGET_HAS_FOCUS (win->m_wxwindow) ) - { - gtk_widget_grab_focus (win->m_wxwindow); - -/* - printf( "GrabFocus from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - } - } - - if (!win->HasVMT()) return TRUE; - -/* - printf( "OnButtonPress from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - wxEventType event_type = wxEVT_LEFT_DOWN; - - if (gdk_event->button == 1) - { - switch (gdk_event->type) - { - case GDK_BUTTON_PRESS: event_type = wxEVT_LEFT_DOWN; break; - case GDK_2BUTTON_PRESS: event_type = wxEVT_LEFT_DCLICK; break; - default: break; - } - } - else if (gdk_event->button == 2) - { - switch (gdk_event->type) - { - case GDK_BUTTON_PRESS: event_type = wxEVT_MIDDLE_DOWN; break; - case GDK_2BUTTON_PRESS: event_type = wxEVT_MIDDLE_DCLICK; break; - default: break; - } - } - else if (gdk_event->button == 3) - { - switch (gdk_event->type) - { - case GDK_BUTTON_PRESS: event_type = wxEVT_RIGHT_DOWN; break; - case GDK_2BUTTON_PRESS: event_type = wxEVT_RIGHT_DCLICK; break; - default: break; - } - } - - wxMouseEvent event( event_type ); - event.m_shiftDown = (gdk_event->state & GDK_SHIFT_MASK); - event.m_controlDown = (gdk_event->state & GDK_CONTROL_MASK); - event.m_altDown = (gdk_event->state & GDK_MOD1_MASK); - event.m_metaDown = (gdk_event->state & GDK_MOD2_MASK); - event.m_leftDown = (gdk_event->state & GDK_BUTTON1_MASK); - event.m_middleDown = (gdk_event->state & GDK_BUTTON2_MASK); - event.m_rightDown = (gdk_event->state & GDK_BUTTON3_MASK); - - event.m_x = (long)gdk_event->x; - event.m_y = (long)gdk_event->y; - - // Some control don't have their own X window and thus cannot get - // any events. - - wxNode *node = win->GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow*)node->Data(); - if ((child->m_x <= event.m_x) && - (child->m_y <= event.m_y) && - (child->m_x+child->m_width >= event.m_x) && - (child->m_y+child->m_height >= event.m_y)) - { - win = child; - event.m_x -= child->m_x; - event.m_y -= child->m_y; - break; - } - node = node->Next(); - } - - event.SetEventObject( win ); - - if (win->GetEventHandler()->ProcessEvent( event )) - gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "button_press_event" ); - - return TRUE; -} - -//----------------------------------------------------------------------------- -// "button_release" -//----------------------------------------------------------------------------- - -static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButton *gdk_event, wxWindow *win ) -{ - if (!win->IsOwnGtkWindow( gdk_event->window )) return TRUE; - if (g_blockEventsOnDrag) return TRUE; - - if (!win->HasVMT()) return TRUE; - -/* - printf( "OnButtonRelease from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - wxEventType event_type = wxEVT_NULL; - - switch (gdk_event->button) - { - case 1: event_type = wxEVT_LEFT_UP; break; - case 2: event_type = wxEVT_MIDDLE_UP; break; - case 3: event_type = wxEVT_RIGHT_UP; break; - } - - wxMouseEvent event( event_type ); - event.m_shiftDown = (gdk_event->state & GDK_SHIFT_MASK); - event.m_controlDown = (gdk_event->state & GDK_CONTROL_MASK); - event.m_altDown = (gdk_event->state & GDK_MOD1_MASK); - event.m_metaDown = (gdk_event->state & GDK_MOD2_MASK); - event.m_leftDown = (gdk_event->state & GDK_BUTTON1_MASK); - event.m_middleDown = (gdk_event->state & GDK_BUTTON2_MASK); - event.m_rightDown = (gdk_event->state & GDK_BUTTON3_MASK); - event.m_x = (long)gdk_event->x; - event.m_y = (long)gdk_event->y; - - // Some control don't have their own X window and thus cannot get - // any events. - - wxNode *node = win->GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow*)node->Data(); - if ((child->m_x <= event.m_x) && - (child->m_y <= event.m_y) && - (child->m_x+child->m_width >= event.m_x) && - (child->m_y+child->m_height >= event.m_y)) - { - win = child; - event.m_x -= child->m_x; - event.m_y -= child->m_y; - break; - } - node = node->Next(); - } - - event.SetEventObject( win ); - - if (win->GetEventHandler()->ProcessEvent( event )) - gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "button_release_event" ); - - return TRUE; -} - -//----------------------------------------------------------------------------- -// "motion_notify_event" -//----------------------------------------------------------------------------- - -static gint gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion *gdk_event, wxWindow *win ) -{ - if (!win->IsOwnGtkWindow( gdk_event->window )) return TRUE; - if (g_blockEventsOnDrag) return TRUE; - - if (!win->HasVMT()) return TRUE; - -/* - printf( "OnMotion from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - wxMouseEvent event( wxEVT_MOTION ); - event.m_shiftDown = (gdk_event->state & GDK_SHIFT_MASK); - event.m_controlDown = (gdk_event->state & GDK_CONTROL_MASK); - event.m_altDown = (gdk_event->state & GDK_MOD1_MASK); - event.m_metaDown = (gdk_event->state & GDK_MOD2_MASK); - event.m_leftDown = (gdk_event->state & GDK_BUTTON1_MASK); - event.m_middleDown = (gdk_event->state & GDK_BUTTON2_MASK); - event.m_rightDown = (gdk_event->state & GDK_BUTTON3_MASK); - - event.m_x = (long)gdk_event->x; - event.m_y = (long)gdk_event->y; - - // Some control don't have their own X window and thus cannot get - // any events. - - wxNode *node = win->GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow*)node->Data(); - if ((child->m_x <= event.m_x) && - (child->m_y <= event.m_y) && - (child->m_x+child->m_width >= event.m_x) && - (child->m_y+child->m_height >= event.m_y)) - { - win = child; - event.m_x -= child->m_x; - event.m_y -= child->m_y; - break; - } - node = node->Next(); - } - - event.SetEventObject( win ); - - if (win->GetEventHandler()->ProcessEvent( event )) - gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "motion_notify_event" ); - - return TRUE; -} - -//----------------------------------------------------------------------------- -// "focus_in_event" -//----------------------------------------------------------------------------- - -static gint gtk_window_focus_in_callback( GtkWidget *widget, GdkEvent *WXUNUSED(event), wxWindow *win ) -{ - if (g_blockEventsOnDrag) return TRUE; - if (win->m_wxwindow) - { - if (GTK_WIDGET_CAN_FOCUS(win->m_wxwindow)) - { - GTK_WIDGET_SET_FLAGS (win->m_wxwindow, GTK_HAS_FOCUS); -/* - printf( "SetFocus flag from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - } - } - - if (!win->HasVMT()) return TRUE; - -/* - printf( "OnSetFocus from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( " " ); - printf( WXSTRINGCAST win->GetLabel() ); - printf( ".\n" ); -*/ - - wxFocusEvent event( wxEVT_SET_FOCUS, win->GetId() ); - event.SetEventObject( win ); - - if (win->GetEventHandler()->ProcessEvent( event )) - gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_in_event" ); - - return TRUE; -} - -//----------------------------------------------------------------------------- -// "focus_out_event" -//----------------------------------------------------------------------------- - -static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED(event), wxWindow *win ) -{ - if (g_blockEventsOnDrag) return TRUE; - if (win->m_wxwindow) - { - if (GTK_WIDGET_CAN_FOCUS(win->m_wxwindow)) - GTK_WIDGET_UNSET_FLAGS (win->m_wxwindow, GTK_HAS_FOCUS); - } - - if (!win->HasVMT()) return TRUE; - -/* - printf( "OnKillFocus from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - wxFocusEvent event( wxEVT_KILL_FOCUS, win->GetId() ); - event.SetEventObject( win ); - - if (win->GetEventHandler()->ProcessEvent( event )) - gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_out_event" ); - - return TRUE; -} - -//----------------------------------------------------------------------------- -// "value_changed" from m_vAdjust -//----------------------------------------------------------------------------- - -static void gtk_window_vscroll_callback( GtkWidget *WXUNUSED(widget), wxWindow *win ) -{ - if (g_blockEventsOnDrag) return; - -/* - printf( "OnVScroll from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - if (!win->HasVMT()) return; - - float diff = win->m_vAdjust->value - win->m_oldVerticalPos; - if (fabs(diff) < 0.2) return; - - wxEventType command = wxEVT_NULL; - - float line_step = win->m_vAdjust->step_increment; - float page_step = win->m_vAdjust->page_increment; - - if (fabs(diff-line_step) < 0.2) command = wxEVT_SCROLL_LINEDOWN; - else if (fabs(diff+line_step) < 0.2) command = wxEVT_SCROLL_LINEUP; - else if (fabs(diff-page_step) < 0.2) command = wxEVT_SCROLL_PAGEDOWN; - else if (fabs(diff+page_step) < 0.2) command = wxEVT_SCROLL_PAGEUP; - else command = wxEVT_SCROLL_THUMBTRACK; - - int value = (int)(win->m_vAdjust->value+0.5); - - wxScrollEvent event( command, win->GetId(), value, wxVERTICAL ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); -} - -//----------------------------------------------------------------------------- -// "value_changed" from m_hAdjust -//----------------------------------------------------------------------------- - -static void gtk_window_hscroll_callback( GtkWidget *WXUNUSED(widget), wxWindow *win ) -{ - if (g_blockEventsOnDrag) return; - -/* - printf( "OnHScroll from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - if (!win->HasVMT()) return; - - float diff = win->m_hAdjust->value - win->m_oldHorizontalPos; - if (fabs(diff) < 0.2) return; - - wxEventType command = wxEVT_NULL; - - float line_step = win->m_hAdjust->step_increment; - float page_step = win->m_hAdjust->page_increment; - - if (fabs(diff-line_step) < 0.2) command = wxEVT_SCROLL_LINEDOWN; - else if (fabs(diff+line_step) < 0.2) command = wxEVT_SCROLL_LINEUP; - else if (fabs(diff-page_step) < 0.2) command = wxEVT_SCROLL_PAGEDOWN; - else if (fabs(diff+page_step) < 0.2) command = wxEVT_SCROLL_PAGEUP; - else command = wxEVT_SCROLL_THUMBTRACK; - - int value = (int)(win->m_hAdjust->value+0.5); - - wxScrollEvent event( command, win->GetId(), value, wxHORIZONTAL ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); -} - -//----------------------------------------------------------------------------- -// "changed" from m_vAdjust -//----------------------------------------------------------------------------- - -static void gtk_window_vscroll_change_callback( GtkWidget *WXUNUSED(widget), wxWindow *win ) -{ - if (g_blockEventsOnDrag) return; - -/* - printf( "OnVScroll change from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - if (!win->HasVMT()) return; - - wxEventType command = wxEVT_SCROLL_THUMBTRACK; - int value = (int)(win->m_vAdjust->value+0.5); - - wxScrollEvent event( command, win->GetId(), value, wxVERTICAL ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); -} - -//----------------------------------------------------------------------------- -// "changed" from m_hAdjust -//----------------------------------------------------------------------------- - -static void gtk_window_hscroll_change_callback( GtkWidget *WXUNUSED(widget), wxWindow *win ) -{ - if (g_blockEventsOnDrag) return; - -/* - printf( "OnHScroll change from " ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - printf( win->GetClassInfo()->GetClassName() ); - printf( ".\n" ); -*/ - - if (!win->HasVMT()) return; - - wxEventType command = wxEVT_SCROLL_THUMBTRACK; - int value = (int)(win->m_hAdjust->value+0.5); - - wxScrollEvent event( command, win->GetId(), value, wxHORIZONTAL ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); -} - -//----------------------------------------------------------------------------- -// "drop_data_available_event" -//----------------------------------------------------------------------------- - -static void gtk_window_drop_callback( GtkWidget *widget, GdkEvent *event, wxWindow *win ) -{ - if (!win->HasVMT()) return; - - if (win->GetDropTarget()) - { - int x = 0; - int y = 0; - gdk_window_get_pointer( widget->window, &x, &y, (GdkModifierType *) NULL ); - win->GetDropTarget()->Drop( event, x, y ); - } - -/* - g_free (event->dropdataavailable.data); - g_free (event->dropdataavailable.data_type); -*/ -} - -//----------------------------------------------------------------------------- -// "enter_notify_event" -//----------------------------------------------------------------------------- - -static gint gtk_window_enter_callback( GtkWidget *widget, GdkEventCrossing *gdk_event, wxWindow *win ) -{ - if (widget->window != gdk_event->window) return TRUE; - if (g_blockEventsOnDrag) return TRUE; - if (!win->HasVMT()) return TRUE; - - if (widget->window) - gdk_window_set_cursor( widget->window, win->m_cursor->GetCursor() ); - - wxMouseEvent event( wxEVT_ENTER_WINDOW ); - event.SetEventObject( win ); - return win->GetEventHandler()->ProcessEvent( event ); -} - -//----------------------------------------------------------------------------- -// "leave_notify_event" -//----------------------------------------------------------------------------- - -static gint gtk_window_leave_callback( GtkWidget *widget, GdkEventCrossing *gdk_event, wxWindow *win ) -{ - if (widget->window != gdk_event->window) return TRUE; - if (!win->HasVMT()) return TRUE; - if (g_blockEventsOnDrag) return TRUE; - - if (widget->window) - gdk_window_set_cursor( widget->window, wxSTANDARD_CURSOR->GetCursor() ); - - wxMouseEvent event( wxEVT_LEAVE_WINDOW ); - event.SetEventObject( win ); - return win->GetEventHandler()->ProcessEvent( event ); -} - -//----------------------------------------------------------------------------- -// wxWindow -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxWindow,wxEvtHandler) - -BEGIN_EVENT_TABLE(wxWindow, wxEvtHandler) - EVT_SIZE(wxWindow::OnSize) - EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged) - EVT_INIT_DIALOG(wxWindow::OnInitDialog) - EVT_IDLE(wxWindow::OnIdle) -END_EVENT_TABLE() - -wxWindow::wxWindow() -{ - m_widget = (GtkWidget *) NULL; - m_wxwindow = (GtkWidget *) NULL; - m_parent = (wxWindow *) NULL; - m_children.DeleteContents( FALSE ); - m_x = 0; - m_y = 0; - m_width = 0; - m_height = 0; - m_minWidth = -1; - m_minHeight = -1; - m_maxWidth = -1; - m_maxHeight = -1; - m_retCode = 0; - m_eventHandler = this; - m_windowValidator = (wxValidator *) NULL; - m_windowId = -1; - m_cursor = new wxCursor( wxCURSOR_ARROW ); - m_font = *wxSWISS_FONT; - m_windowStyle = 0; - m_windowName = "noname"; - m_constraints = (wxLayoutConstraints *) NULL; - m_constraintsInvolvedIn = (wxList *) NULL; - m_windowSizer = (wxSizer *) NULL; - m_sizerParent = (wxWindow *) NULL; - m_autoLayout = FALSE; - m_sizeSet = FALSE; - m_hasVMT = FALSE; - m_needParent = TRUE; - m_hasScrolling = FALSE; - m_hAdjust = (GtkAdjustment *) NULL; - m_vAdjust = (GtkAdjustment *) NULL; - m_oldHorizontalPos = 0.0; - m_oldVerticalPos = 0.0; - m_isShown = FALSE; - m_isEnabled = TRUE; - m_pDropTarget = (wxDropTarget *) NULL; - m_resizing = FALSE; -} - -bool wxWindow::Create( wxWindow *parent, wxWindowID id, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - m_isShown = FALSE; - m_isEnabled = TRUE; - m_needParent = TRUE; - - m_cursor = (wxCursor *) NULL; - - PreCreation( parent, id, pos, size, style, name ); - - m_widget = gtk_scrolled_window_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL ); - m_hasScrolling = TRUE; - - GtkScrolledWindow *s_window; - s_window = GTK_SCROLLED_WINDOW(m_widget); - - GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass ); - scroll_class->scrollbar_spacing = 0; - - gtk_scrolled_window_set_policy( s_window, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC ); - - m_oldHorizontalPos = 0.0; - m_oldVerticalPos = 0.0; - - m_hAdjust = gtk_range_get_adjustment( GTK_RANGE(s_window->hscrollbar) ); - m_vAdjust = gtk_range_get_adjustment( GTK_RANGE(s_window->vscrollbar) ); - - gtk_signal_connect (GTK_OBJECT (m_hAdjust), "value_changed", - (GtkSignalFunc) gtk_window_hscroll_callback, (gpointer) this ); - gtk_signal_connect (GTK_OBJECT (m_vAdjust), "value_changed", - (GtkSignalFunc) gtk_window_vscroll_callback, (gpointer) this ); - - gtk_signal_connect (GTK_OBJECT (m_hAdjust), "changed", - (GtkSignalFunc) gtk_window_hscroll_change_callback, (gpointer) this ); - gtk_signal_connect (GTK_OBJECT (m_vAdjust), "changed", - (GtkSignalFunc) gtk_window_vscroll_change_callback, (gpointer) this ); - - GtkViewport *viewport; - viewport = GTK_VIEWPORT(s_window->viewport); - - if (m_windowStyle & wxRAISED_BORDER) - { - gtk_viewport_set_shadow_type( viewport, GTK_SHADOW_OUT ); - } - else if (m_windowStyle & wxSUNKEN_BORDER) - { - gtk_viewport_set_shadow_type( viewport, GTK_SHADOW_IN ); - } - else - { - gtk_viewport_set_shadow_type( viewport, GTK_SHADOW_NONE ); - } - - m_wxwindow = gtk_myfixed_new(); - - if (m_wxwindow) GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS ); - - if (m_windowStyle & wxTAB_TRAVERSAL == wxTAB_TRAVERSAL) - GTK_WIDGET_UNSET_FLAGS( m_wxwindow, GTK_CAN_FOCUS ); - else - GTK_WIDGET_SET_FLAGS( m_wxwindow, GTK_CAN_FOCUS ); - - gtk_container_add( GTK_CONTAINER(m_widget), m_wxwindow ); - - // shut the viewport up - gtk_viewport_set_hadjustment( viewport, (GtkAdjustment*) gtk_adjustment_new( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) ); - gtk_viewport_set_vadjustment( viewport, (GtkAdjustment*) gtk_adjustment_new( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) ); - - // I _really_ don't want scrollbars in the beginning - m_vAdjust->lower = 0.0; - m_vAdjust->upper = 1.0; - m_vAdjust->value = 0.0; - m_vAdjust->step_increment = 1.0; - m_vAdjust->page_increment = 1.0; - m_vAdjust->page_size = 5.0; - gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "changed" ); - m_hAdjust->lower = 0.0; - m_hAdjust->upper = 1.0; - m_hAdjust->value = 0.0; - m_hAdjust->step_increment = 1.0; - m_hAdjust->page_increment = 1.0; - m_hAdjust->page_size = 5.0; - gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "changed" ); - - gtk_widget_show( m_wxwindow ); - - PostCreation(); - - Show( TRUE ); - - return TRUE; -} - -wxWindow::~wxWindow(void) -{ - m_hasVMT = FALSE; - - if (m_pDropTarget) delete m_pDropTarget; - - if (m_parent) m_parent->RemoveChild( this ); - if (m_widget) Show( FALSE ); - - DestroyChildren(); - - if (m_wxwindow) gtk_widget_destroy( m_wxwindow ); - - if (m_widget) gtk_widget_destroy( m_widget ); - - wxDELETE(m_cursor); - - DeleteRelatedConstraints(); - if (m_constraints) - { - // This removes any dangling pointers to this window - // in other windows' constraintsInvolvedIn lists. - UnsetConstraints(m_constraints); - delete m_constraints; - m_constraints = (wxLayoutConstraints *) NULL; - } - if (m_windowSizer) - { - delete m_windowSizer; - m_windowSizer = (wxSizer *) NULL; - } - // If this is a child of a sizer, remove self from parent - if (m_sizerParent) m_sizerParent->RemoveChild((wxWindow *)this); - - // Just in case the window has been Closed, but - // we're then deleting immediately: don't leave - // dangling pointers. - wxPendingDelete.DeleteObject(this); - - // Just in case we've loaded a top-level window via - // wxWindow::LoadNativeDialog but we weren't a dialog - // class - wxTopLevelWindows.DeleteObject(this); - - if (m_windowValidator) delete m_windowValidator; -} - -void wxWindow::PreCreation( wxWindow *parent, wxWindowID id, - const wxPoint &pos, const wxSize &size, - long style, const wxString &name ) -{ - if (m_needParent && (parent == NULL)) - wxFatalError( "Need complete parent.", name ); - - m_widget = (GtkWidget *) NULL; - m_hasVMT = FALSE; - m_parent = parent; - m_children.DeleteContents( FALSE ); - m_x = (int)pos.x; - m_y = (int)pos.y; - m_width = size.x; - if (m_width == -1) m_width = 20; - m_height = size.y; - if (m_height == -1) m_height = 20; - m_minWidth = -1; - m_minHeight = -1; - m_maxWidth = -1; - m_maxHeight = -1; - m_retCode = 0; - m_eventHandler = this; - m_windowId = id; - m_sizeSet = FALSE; - if (m_cursor == NULL) - m_cursor = new wxCursor( wxCURSOR_ARROW ); - m_font = *wxSWISS_FONT; - m_backgroundColour = wxWHITE; - m_foregroundColour = wxBLACK; - m_windowStyle = style; - m_windowName = name; - m_constraints = (wxLayoutConstraints *) NULL; - m_constraintsInvolvedIn = (wxList *) NULL; - m_windowSizer = (wxSizer *) NULL; - m_sizerParent = (wxWindow *) NULL; - m_autoLayout = FALSE; - m_pDropTarget = (wxDropTarget *) NULL; - m_resizing = FALSE; - m_windowValidator = (wxValidator *) NULL; -} - -void wxWindow::PostCreation(void) -{ - if (m_parent) m_parent->AddChild( this ); - -// GtkStyle *style = m_widget->style; -// style->font = m_font.GetInternalFont( 1.0 ); // destroy old font ? - - GtkWidget *connect_widget = GetConnectWidget(); - - if (m_wxwindow) - { - gtk_signal_connect( GTK_OBJECT(m_wxwindow), "expose_event", - GTK_SIGNAL_FUNC(gtk_window_expose_callback), (gpointer)this ); - - gtk_signal_connect( GTK_OBJECT(m_wxwindow), "draw", - GTK_SIGNAL_FUNC(gtk_window_draw_callback), (gpointer)this ); - } - - gtk_signal_connect( GTK_OBJECT(connect_widget), "key_press_event", - GTK_SIGNAL_FUNC(gtk_window_key_press_callback), (gpointer)this ); - - gtk_signal_connect( GTK_OBJECT(connect_widget), "button_press_event", - GTK_SIGNAL_FUNC(gtk_window_button_press_callback), (gpointer)this ); - - gtk_signal_connect( GTK_OBJECT(connect_widget), "button_release_event", - GTK_SIGNAL_FUNC(gtk_window_button_release_callback), (gpointer)this ); - - gtk_signal_connect( GTK_OBJECT(connect_widget), "motion_notify_event", - GTK_SIGNAL_FUNC(gtk_window_motion_notify_callback), (gpointer)this ); - - gtk_signal_connect( GTK_OBJECT(connect_widget), "focus_in_event", - GTK_SIGNAL_FUNC(gtk_window_focus_in_callback), (gpointer)this ); - - gtk_signal_connect( GTK_OBJECT(connect_widget), "focus_out_event", - GTK_SIGNAL_FUNC(gtk_window_focus_out_callback), (gpointer)this ); - - // Only for cursor handling - - gtk_signal_connect( GTK_OBJECT(m_widget), "enter_notify_event", - GTK_SIGNAL_FUNC(gtk_window_enter_callback), (gpointer)this ); - - gtk_signal_connect( GTK_OBJECT(m_widget), "leave_notify_event", - GTK_SIGNAL_FUNC(gtk_window_leave_callback), (gpointer)this ); - - if (m_wxwindow) - { - gtk_signal_connect( GTK_OBJECT(m_wxwindow), "enter_notify_event", - GTK_SIGNAL_FUNC(gtk_window_enter_callback), (gpointer)this ); - - gtk_signal_connect( GTK_OBJECT(m_wxwindow), "leave_notify_event", - GTK_SIGNAL_FUNC(gtk_window_leave_callback), (gpointer)this ); - } - - if (m_widget && m_parent) gtk_widget_realize( m_widget ); - - if (m_wxwindow) - { - gtk_widget_realize( m_wxwindow ); - gdk_gc_set_exposures( m_wxwindow->style->fg_gc[0], TRUE ); - } - - SetCursor( wxSTANDARD_CURSOR ); - - m_hasVMT = TRUE; -} - -bool wxWindow::HasVMT(void) -{ - return m_hasVMT; -} - -bool wxWindow::Close( bool force ) -{ - wxCloseEvent event(wxEVT_CLOSE_WINDOW, m_windowId); - event.SetEventObject(this); - event.SetForce(force); - - return GetEventHandler()->ProcessEvent(event); -} - -bool wxWindow::Destroy(void) -{ - m_hasVMT = FALSE; - delete this; - return TRUE; -} - -bool wxWindow::DestroyChildren(void) -{ - if (GetChildren()) - { - wxNode *node; - while ((node = GetChildren()->First()) != (wxNode *)NULL) - { - wxWindow *child; - if ((child = (wxWindow *)node->Data()) != (wxWindow *)NULL) - { - delete child; - if (GetChildren()->Member(child)) delete node; - } - } - } - return TRUE; -} - -void wxWindow::PrepareDC( wxDC &WXUNUSED(dc) ) -{ - // are we to set fonts here ? -} - -void wxWindow::ImplementSetSize(void) -{ - if ((m_minWidth != -1) && (m_width < m_minWidth)) m_width = m_minWidth; - if ((m_minHeight != -1) && (m_height < m_minHeight)) m_height = m_minHeight; - if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_minWidth; - if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_minHeight; - gtk_widget_set_usize( m_widget, m_width, m_height ); -} - -void wxWindow::ImplementSetPosition(void) -{ - if (IS_KIND_OF(this,wxFrame) || IS_KIND_OF(this,wxDialog)) - { - if ((m_x != -1) || (m_y != -1)) - gtk_widget_set_uposition( m_widget, m_x, m_y ); - return; - } - - if (!m_parent) - { - wxFAIL_MSG( "wxWindow::SetSize error.\n" ); - return; - } - - if ((m_parent) && (m_parent->m_wxwindow)) - gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), m_widget, m_x, m_y ); - - // Don't do anything for children of wxNotebook and wxMDIChildFrame -} - -void wxWindow::SetSize( int x, int y, int width, int height, int sizeFlags ) -{ - if (m_resizing) return; // I don't like recursions - m_resizing = TRUE; - - int newX = x; - int newY = y; - int newW = width; - int newH = height; - - if ((sizeFlags & wxSIZE_USE_EXISTING) == wxSIZE_USE_EXISTING) - { - if (newX == -1) newX = m_x; - if (newY == -1) newY = m_y; - if (newW == -1) newW = m_width; - if (newH == -1) newH = m_height; - } - - if ((sizeFlags & wxSIZE_AUTO_WIDTH) == wxSIZE_AUTO_WIDTH) - { - if (newW == -1) newW = 80; - } - - if ((sizeFlags & wxSIZE_AUTO_HEIGHT) == wxSIZE_AUTO_HEIGHT) - { - if (newH == -1) newH = 26; - } - - if ((m_x != newX) || (m_y != newY) || (!m_sizeSet)) - { - m_x = newX; - m_y = newY; - ImplementSetPosition(); - } - if ((m_width != newW) || (m_height != newH) || (!m_sizeSet)) - { - m_width = newW; - m_height = newH; - ImplementSetSize(); - } - m_sizeSet = TRUE; - - wxSizeEvent event( wxSize(m_width,m_height), GetId() ); - event.SetEventObject( this ); - ProcessEvent( event ); - - m_resizing = FALSE; -} - -void wxWindow::SetSize( int width, int height ) -{ - SetSize( -1, -1, width, height, wxSIZE_USE_EXISTING ); -} - -void wxWindow::Move( int x, int y ) -{ - SetSize( x, y, -1, -1, wxSIZE_USE_EXISTING ); -} - -void wxWindow::GetSize( int *width, int *height ) const -{ - if (width) (*width) = m_width; - if (height) (*height) = m_height; -} - -void wxWindow::SetClientSize( int width, int height ) -{ - if (!m_wxwindow) - { - SetSize( width, height ); - } - else - { - int dw = 0; - int dh = 0; - - if (!m_hasScrolling) - { -/* - do we have sunken dialogs ? - - GtkStyleClass *window_class = m_wxwindow->style->klass; - - dw += 2 * window_class->xthickness; - dh += 2 * window_class->ythickness; -*/ - } - else - { - GtkScrolledWindow *scroll_window = GTK_SCROLLED_WINDOW(m_widget); - GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass ); - - GtkWidget *viewport = scroll_window->viewport; - GtkStyleClass *viewport_class = viewport->style->klass; - - GtkWidget *hscrollbar = scroll_window->hscrollbar; - GtkWidget *vscrollbar = scroll_window->vscrollbar; - - if ((m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSUNKEN_BORDER)) - { - dw += 2 * viewport_class->xthickness; - dh += 2 * viewport_class->ythickness; - } - - if (GTK_WIDGET_VISIBLE(vscrollbar)) - { - dw += vscrollbar->allocation.width; - dw += scroll_class->scrollbar_spacing; - } - - if (GTK_WIDGET_VISIBLE(hscrollbar)) - { - dh += hscrollbar->allocation.height; - dw += scroll_class->scrollbar_spacing; - } - } - - SetSize( width+dw, height+dh ); - } -} - -void wxWindow::GetClientSize( int *width, int *height ) const -{ - if (!m_wxwindow) - { - if (width) (*width) = m_width; - if (height) (*height) = m_height; - } - else - { - int dw = 0; - int dh = 0; - - if (!m_hasScrolling) - { -/* - do we have sunken dialogs ? - - GtkStyleClass *window_class = m_wxwindow->style->klass; - - dw += 2 * window_class->xthickness; - dh += 2 * window_class->ythickness; -*/ - } - else - { - GtkScrolledWindow *scroll_window = GTK_SCROLLED_WINDOW(m_widget); - GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass ); - - GtkWidget *viewport = scroll_window->viewport; - GtkStyleClass *viewport_class = viewport->style->klass; - - GtkWidget *hscrollbar = scroll_window->hscrollbar; - GtkWidget *vscrollbar = scroll_window->vscrollbar; - - if ((m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSUNKEN_BORDER)) - { - dw += 2 * viewport_class->xthickness; - dh += 2 * viewport_class->ythickness; - } - - if (GTK_WIDGET_VISIBLE(vscrollbar)) - { -// dw += vscrollbar->allocation.width; - dw += 15; // range.slider_width = 11 + 2*2pts edge - dw += scroll_class->scrollbar_spacing; - } - - if (GTK_WIDGET_VISIBLE(hscrollbar)) - { -// dh += hscrollbar->allocation.height; - dh += 15; - dh += scroll_class->scrollbar_spacing; - } - } - - if (width) (*width) = m_width - dw; - if (height) (*height) = m_height - dh; - } -} - -void wxWindow::GetPosition( int *x, int *y ) const -{ - if (x) (*x) = m_x; - if (y) (*y) = m_y; -} - -void wxWindow::ClientToScreen( int *x, int *y ) -{ - GdkWindow *source = (GdkWindow *) NULL; - if (m_wxwindow) - source = m_wxwindow->window; - else - source = m_widget->window; - - int org_x = 0; - int org_y = 0; - gdk_window_get_origin( source, &org_x, &org_y ); - - if (!m_wxwindow) - { - if (GTK_WIDGET_NO_WINDOW (m_widget)) - { - org_x += m_widget->allocation.x; - org_y += m_widget->allocation.y; - } - } - - if (x) *x += org_x; - if (y) *y += org_y; -} - -void wxWindow::ScreenToClient( int *x, int *y ) -{ - GdkWindow *source = (GdkWindow *) NULL; - if (m_wxwindow) - source = m_wxwindow->window; - else - source = m_widget->window; - - int org_x = 0; - int org_y = 0; - gdk_window_get_origin( source, &org_x, &org_y ); - - if (!m_wxwindow) - { - if (GTK_WIDGET_NO_WINDOW (m_widget)) - { - org_x += m_widget->allocation.x; - org_y += m_widget->allocation.y; - } - } - - if (x) *x -= org_x; - if (y) *y -= org_y; -} - -void wxWindow::Centre( int direction ) -{ - if (IS_KIND_OF(this,wxDialog) || IS_KIND_OF(this,wxFrame)) - { - if (direction & wxHORIZONTAL == wxHORIZONTAL) m_x = (gdk_screen_width () - m_width) / 2; - if (direction & wxVERTICAL == wxVERTICAL) m_y = (gdk_screen_height () - m_height) / 2; - ImplementSetPosition(); - } - else - { - if (m_parent) - { - int p_w = 0; - int p_h = 0; - m_parent->GetSize( &p_w, &p_h ); - if (direction & wxHORIZONTAL == wxHORIZONTAL) m_x = (p_w - m_width) / 2; - if (direction & wxVERTICAL == wxVERTICAL) m_y = (p_h - m_height) / 2; - ImplementSetPosition(); - } - } -} - -void wxWindow::Fit(void) -{ - int maxX = 0; - int maxY = 0; - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow *win = (wxWindow *)node->Data(); - int wx, wy, ww, wh; - win->GetPosition(&wx, &wy); - win->GetSize(&ww, &wh); - if ( wx + ww > maxX ) - maxX = wx + ww; - if ( wy + wh > maxY ) - maxY = wy + wh; - - node = node->Next(); - } - SetClientSize(maxX + 5, maxY + 10); -} - -void wxWindow::SetSizeHints( int minW, int minH, int maxW, int maxH, int WXUNUSED(incW), int WXUNUSED(incH) ) -{ - m_minWidth = minW; - m_minHeight = minH; - m_maxWidth = maxW; - m_maxHeight = maxH; -} - -void wxWindow::OnSize( wxSizeEvent &WXUNUSED(event) ) -{ - //if (GetAutoLayout()) Layout(); -} - -bool wxWindow::Show( bool show ) -{ - if (show) - gtk_widget_show( m_widget ); - else - gtk_widget_hide( m_widget ); - m_isShown = show; - return TRUE; -} - -void wxWindow::Enable( bool enable ) -{ - m_isEnabled = enable; - gtk_widget_set_sensitive( m_widget, enable ); - if (m_wxwindow) gtk_widget_set_sensitive( m_wxwindow, enable ); -} - -int wxWindow::GetCharHeight(void) const -{ - GdkFont *font = m_font.GetInternalFont( 1.0 ); - return font->ascent + font->descent; -} - -int wxWindow::GetCharWidth(void) const -{ - GdkFont *font = m_font.GetInternalFont( 1.0 ); - return gdk_string_width( font, "H" ); -} - -void wxWindow::GetTextExtent( const wxString& string, int *x, int *y, - int *descent, int *externalLeading, const wxFont *theFont, bool WXUNUSED(use16) ) const -{ - wxFont fontToUse = m_font; - if (theFont) fontToUse = *theFont; - - GdkFont *font = fontToUse.GetInternalFont( 1.0 ); - if (x) (*y) = gdk_string_width( font, string ); - if (y) (*y) = font->ascent + font->descent; - if (descent) (*descent) = font->descent; - if (externalLeading) (*externalLeading) = 0; // ?? -} - -void wxWindow::MakeModal( bool modal ) -{ - return; - // Disable all other windows - if (this->IsKindOf(CLASSINFO(wxDialog)) || this->IsKindOf(CLASSINFO(wxFrame))) - { - wxNode *node = wxTopLevelWindows.First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (win != this) - win->Enable(!modal); - - node = node->Next(); - } - } -} - -void wxWindow::SetFocus(void) -{ - GtkWidget *connect_widget = GetConnectWidget(); - if (connect_widget) - { - if (GTK_WIDGET_CAN_FOCUS(connect_widget) && !GTK_WIDGET_HAS_FOCUS (connect_widget) ) - { - gtk_widget_grab_focus (connect_widget); - } - } -} - -bool wxWindow::OnClose(void) -{ - return TRUE; -} - -void wxWindow::AddChild( wxWindow *child ) -{ - // Addchild is (often) called before the program - // has left the parents constructor so that no - // virtual tables work yet. The approach below - // practically imitates virtual tables, i.e. it - // implements a different AddChild() behaviour - // for wxFrame, wxDialog, wxWindow and - // wxMDIParentFrame. - - // wxFrame and wxDialog as children aren't placed into the parents - - if (( IS_KIND_OF(child,wxFrame) || IS_KIND_OF(child,wxDialog) ) && - (!IS_KIND_OF(child,wxMDIChildFrame))) - { - m_children.Append( child ); - - if ((child->m_x != -1) && (child->m_y != -1)) - gtk_widget_set_uposition( child->m_widget, child->m_x, child->m_y ); - - return; - } - - // In the case of an wxMDIChildFrame descendant, we use the - // client windows's AddChild() - - if (IS_KIND_OF(this,wxMDIParentFrame)) - { - if (IS_KIND_OF(child,wxMDIChildFrame)) - { - wxMDIClientWindow *client = ((wxMDIParentFrame*)this)->GetClientWindow(); - if (client) - { - client->AddChild( child ); - return; - } - } - } - - // wxNotebook is very special, so it has a private AddChild() - - if (IS_KIND_OF(this,wxNotebook)) - { - wxNotebook *tab = (wxNotebook*)this; - tab->AddChild( child ); - return; - } - - // wxFrame has a private AddChild - - if (IS_KIND_OF(this,wxFrame) && !IS_KIND_OF(this,wxMDIChildFrame)) - { - wxFrame *frame = (wxFrame*)this; - frame->AddChild( child ); - return; - } - - // All the rest - - m_children.Append( child ); - if (m_wxwindow) gtk_myfixed_put( GTK_MYFIXED(m_wxwindow), child->m_widget, - child->m_x, child->m_y ); - - gtk_widget_set_usize( child->m_widget, child->m_width, child->m_height ); -} - -wxList *wxWindow::GetChildren(void) -{ - return (&m_children); -} - -void wxWindow::RemoveChild( wxWindow *child ) -{ - if (GetChildren()) - GetChildren()->DeleteObject( child ); - child->m_parent = (wxWindow *) NULL; -} - -void wxWindow::SetReturnCode( int retCode ) -{ - m_retCode = retCode; -} - -int wxWindow::GetReturnCode(void) -{ - return m_retCode; -} - -void wxWindow::Raise(void) -{ - if (m_widget) gdk_window_raise( m_widget->window ); -} - -void wxWindow::Lower(void) -{ - if (m_widget) gdk_window_lower( m_widget->window ); -} - -wxEvtHandler *wxWindow::GetEventHandler(void) -{ - return m_eventHandler; -} - -void wxWindow::SetEventHandler( wxEvtHandler *handler ) -{ - m_eventHandler = handler; -} - -void wxWindow::PushEventHandler(wxEvtHandler *handler) -{ - handler->SetNextHandler(GetEventHandler()); - SetEventHandler(handler); -} - -wxEvtHandler *wxWindow::PopEventHandler(bool deleteHandler) -{ - if ( GetEventHandler() ) - { - wxEvtHandler *handlerA = GetEventHandler(); - wxEvtHandler *handlerB = handlerA->GetNextHandler(); - handlerA->SetNextHandler((wxEvtHandler *) NULL); - SetEventHandler(handlerB); - if ( deleteHandler ) - { - delete handlerA; - return (wxEvtHandler *) NULL; - } - else - return handlerA; - } - else - return (wxEvtHandler *) NULL; -} - -wxValidator *wxWindow::GetValidator(void) -{ - return m_windowValidator; -} - -void wxWindow::SetValidator( const wxValidator& validator ) -{ - if (m_windowValidator) delete m_windowValidator; - m_windowValidator = validator.Clone(); - if (m_windowValidator) m_windowValidator->SetWindow(this); -} - -bool wxWindow::IsBeingDeleted(void) -{ - return FALSE; -} - -void wxWindow::SetId( wxWindowID id ) -{ - m_windowId = id; -} - -wxWindowID wxWindow::GetId(void) -{ - return m_windowId; -} - -void wxWindow::SetCursor( const wxCursor &cursor ) -{ - wxASSERT(m_cursor != NULL); - - if (m_cursor != NULL) - if (*m_cursor == cursor) - return; - (*m_cursor) = cursor; - if (m_widget->window) - gdk_window_set_cursor( m_widget->window, m_cursor->GetCursor() ); - if (m_wxwindow && m_wxwindow->window) - gdk_window_set_cursor( m_wxwindow->window, m_cursor->GetCursor() ); -} - -void wxWindow::Refresh( bool eraseBackground, const wxRect *rect ) -{ - if (eraseBackground && m_wxwindow && m_wxwindow->window) - { - if (rect) - gdk_window_clear_area( m_wxwindow->window, - rect->x, - rect->y, - rect->width, - rect->height ); - else - Clear(); - } - if (!rect) - { - if (m_wxwindow) - { - int w = 0; - int h = 0; - GetClientSize( &w, &h ); - - GdkRectangle gdk_rect; - gdk_rect.x = 0; - gdk_rect.y = 0; - gdk_rect.width = w; - gdk_rect.height = h; - gtk_widget_draw( m_wxwindow, &gdk_rect ); - } - } - else - { - GdkRectangle gdk_rect; - gdk_rect.x = rect->x; - gdk_rect.y = rect->y; - gdk_rect.width = rect->width; - gdk_rect.height = rect->height; - - if (m_wxwindow) - gtk_widget_draw( m_wxwindow, &gdk_rect ); - else - gtk_widget_draw( m_widget, &gdk_rect ); - } -} - -wxRegion wxWindow::GetUpdateRegion() const -{ - return m_updateRegion; -} - -bool wxWindow::IsExposed( int x, int y) const -{ - return (m_updateRegion.Contains( x, y ) != wxOutRegion ); -} - -bool wxWindow::IsExposed( int x, int y, int w, int h ) const -{ - return (m_updateRegion.Contains( x, y, w, h ) != wxOutRegion ); -} - -bool wxWindow::IsExposed( const wxPoint& pt ) const -{ - return (m_updateRegion.Contains( pt.x, pt.y ) != wxOutRegion ); -} - -bool wxWindow::IsExposed( const wxRect& rect ) const -{ - return (m_updateRegion.Contains( rect.x, rect.y, rect.width, rect.height ) != wxOutRegion ); -} - -void wxWindow::Clear(void) -{ - if (m_wxwindow && m_wxwindow->window) gdk_window_clear( m_wxwindow->window ); -} - -wxColour wxWindow::GetBackgroundColour(void) const -{ - return m_backgroundColour; -} - -void wxWindow::SetBackgroundColour( const wxColour &colour ) -{ - m_backgroundColour = colour; - if (m_wxwindow) - { - m_backgroundColour.CalcPixel( m_wxwindow->style->colormap ); - gdk_window_set_background( m_wxwindow->window, m_backgroundColour.GetColor() ); - gdk_window_clear( m_wxwindow->window ); - } - // do something ? -} - -wxColour wxWindow::GetForegroundColour(void) const -{ - return m_foregroundColour; -} - -void wxWindow::SetForegroundColour( const wxColour &colour ) -{ - m_foregroundColour = colour; -} - -bool wxWindow::Validate(void) -{ - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow *)node->Data(); - if (child->GetValidator() && /* child->GetValidator()->Ok() && */ !child->GetValidator()->Validate(this)) - { return FALSE; } - node = node->Next(); - } - return TRUE; -} - -bool wxWindow::TransferDataToWindow(void) -{ - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow *)node->Data(); - if (child->GetValidator() && /* child->GetValidator()->Ok() && */ - !child->GetValidator()->TransferToWindow() ) - { - wxMessageBox( _("Application Error"), _("Could not transfer data to window"), wxOK|wxICON_EXCLAMATION ); - return FALSE; - } - node = node->Next(); - } - return TRUE; -} - -bool wxWindow::TransferDataFromWindow(void) -{ - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow *)node->Data(); - if ( child->GetValidator() && /* child->GetValidator()->Ok() && */ !child->GetValidator()->TransferFromWindow() ) - { return FALSE; } - node = node->Next(); - } - return TRUE; -} - -void wxWindow::SetAcceleratorTable( const wxAcceleratorTable& accel ) -{ - m_acceleratorTable = accel; -} - -void wxWindow::OnInitDialog( wxInitDialogEvent &WXUNUSED(event) ) -{ - TransferDataToWindow(); -} - -void wxWindow::InitDialog(void) -{ - wxInitDialogEvent event(GetId()); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); -} - -static void SetInvokingWindow( wxMenu *menu, wxWindow *win ) -{ - menu->SetInvokingWindow( win ); - wxNode *node = menu->m_items.First(); - while (node) - { - wxMenuItem *menuitem = (wxMenuItem*)node->Data(); - if (menuitem->IsSubMenu()) - SetInvokingWindow( menuitem->GetSubMenu(), win ); - node = node->Next(); - } -} - -bool wxWindow::PopupMenu( wxMenu *menu, int WXUNUSED(x), int WXUNUSED(y) ) -{ - SetInvokingWindow( menu, this ); - gtk_menu_popup( GTK_MENU(menu->m_menu), (GtkWidget *) NULL, (GtkWidget *) NULL, (GtkMenuPositionFunc) NULL, NULL, 0, 0 ); - return TRUE; -} - -void wxWindow::SetDropTarget( wxDropTarget *dropTarget ) -{ - GtkWidget *dnd_widget = GetConnectWidget(); - - if (m_pDropTarget) - { - gtk_signal_disconnect_by_func( GTK_OBJECT(dnd_widget), - GTK_SIGNAL_FUNC(gtk_window_drop_callback), (gpointer)this ); - - m_pDropTarget->UnregisterWidget( dnd_widget ); - delete m_pDropTarget; - } - m_pDropTarget = dropTarget; - if (m_pDropTarget) - { - m_pDropTarget->RegisterWidget( dnd_widget ); - - gtk_signal_connect( GTK_OBJECT(dnd_widget), "drop_data_available_event", - GTK_SIGNAL_FUNC(gtk_window_drop_callback), (gpointer)this ); - } -} - -wxDropTarget *wxWindow::GetDropTarget() const -{ - return m_pDropTarget; -} - -GtkWidget* wxWindow::GetConnectWidget(void) -{ - GtkWidget *connect_widget = m_widget; - if (m_wxwindow) connect_widget = m_wxwindow; - - return connect_widget; -} - -bool wxWindow::IsOwnGtkWindow( GdkWindow *window ) -{ - if (m_wxwindow) return (window == m_wxwindow->window); - return (window == m_widget->window); -} - -void wxWindow::SetFont( const wxFont &font ) -{ - m_font = font; -/* - create new style - copy old style values to new one - set font in new style - -> takes to many resources - - GtkStyle *style = gtk_style_new(); - ... -*/ -} - -wxFont *wxWindow::GetFont(void) -{ - return &m_font; -} - -void wxWindow::SetWindowStyleFlag( long flag ) -{ - m_windowStyle = flag; -} - -long wxWindow::GetWindowStyleFlag(void) const -{ - return m_windowStyle; -} - -void wxWindow::CaptureMouse(void) -{ - GtkWidget *connect_widget = GetConnectWidget(); - gtk_grab_add( connect_widget ); - gdk_pointer_grab ( connect_widget->window, FALSE, - (GdkEventMask) - (GDK_BUTTON_PRESS_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_POINTER_MOTION_MASK), - (GdkWindow *) NULL, (GdkCursor *) NULL, GDK_CURRENT_TIME ); -} - -void wxWindow::ReleaseMouse(void) -{ - GtkWidget *connect_widget = GetConnectWidget(); - gtk_grab_remove( connect_widget ); - gdk_pointer_ungrab ( GDK_CURRENT_TIME ); -} - -void wxWindow::SetTitle( const wxString &WXUNUSED(title) ) -{ -} - -wxString wxWindow::GetTitle(void) const -{ - return (wxString&)m_windowName; -} - -wxString wxWindow::GetLabel(void) const -{ - return GetTitle(); -} - -void wxWindow::SetName( const wxString &name ) -{ - m_windowName = name; -} - -wxString wxWindow::GetName(void) const -{ - return (wxString&)m_windowName; -} - -bool wxWindow::IsShown(void) const -{ - return m_isShown; -} - -bool wxWindow::IsRetained(void) -{ - return FALSE; -} - -wxWindow *wxWindow::FindWindow( long id ) -{ - if (id == m_windowId) return this; - wxNode *node = m_children.First(); - while (node) - { - wxWindow *child = (wxWindow*)node->Data(); - wxWindow *res = child->FindWindow( id ); - if (res) return res; - node = node->Next(); - } - return (wxWindow *) NULL; -} - -wxWindow *wxWindow::FindWindow( const wxString& name ) -{ - if (name == m_windowName) return this; - wxNode *node = m_children.First(); - while (node) - { - wxWindow *child = (wxWindow*)node->Data(); - wxWindow *res = child->FindWindow( name ); - if (res) return res; - node = node->Next(); - } - return (wxWindow *) NULL; -} - -void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible, - int range, bool WXUNUSED(refresh) ) -{ - if (!m_wxwindow) return; - - if (orient == wxHORIZONTAL) - { - float fpos = (float)pos; - m_oldHorizontalPos = fpos; - float frange = (float)range; - float fthumb = (float)thumbVisible; - - if ((fabs(fpos-m_hAdjust->value) < 0.2) && - (fabs(frange-m_hAdjust->upper) < 0.2) && - (fabs(fthumb-m_hAdjust->page_size) < 0.2)) - return; - - m_hAdjust->lower = 0.0; - m_hAdjust->upper = frange; - m_hAdjust->value = fpos; - m_hAdjust->step_increment = 1.0; - m_hAdjust->page_increment = (float)(wxMax(fthumb-2,0)); - m_hAdjust->page_size = fthumb; - } - else - { - float fpos = (float)pos; - m_oldVerticalPos = fpos; - float frange = (float)range; - float fthumb = (float)thumbVisible; - - if ((fabs(fpos-m_vAdjust->value) < 0.2) && - (fabs(frange-m_vAdjust->upper) < 0.2) && - (fabs(fthumb-m_vAdjust->page_size) < 0.2)) - return; - - m_vAdjust->lower = 0.0; - m_vAdjust->upper = frange; - m_vAdjust->value = fpos; - m_vAdjust->step_increment = 1.0; - m_vAdjust->page_increment = (float)(wxMax(fthumb-2,0)); - m_vAdjust->page_size = fthumb; - } - - if (m_wxwindow->window) - { - if (orient == wxHORIZONTAL) - gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "changed" ); - else - gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "changed" ); - - gtk_widget_set_usize( m_widget, m_width, m_height ); - } -} - -void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) ) -{ - if (!m_wxwindow) return; - - if (orient == wxHORIZONTAL) - { - float fpos = (float)pos; - m_oldHorizontalPos = fpos; - - if (fabs(fpos-m_hAdjust->value) < 0.2) return; - m_hAdjust->value = fpos; - } - else - { - float fpos = (float)pos; - m_oldVerticalPos = fpos; - if (fabs(fpos-m_vAdjust->value) < 0.2) return; - m_vAdjust->value = fpos; - } - - if (m_wxwindow->window) - { - if (orient == wxHORIZONTAL) - gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "value_changed" ); - else - gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "value_changed" ); - } -} - -int wxWindow::GetScrollThumb( int orient ) const -{ - if (!m_wxwindow) return 0; - - if (orient == wxHORIZONTAL) - return (int)(m_hAdjust->page_size+0.5); - else - return (int)(m_vAdjust->page_size+0.5); -} - -int wxWindow::GetScrollPos( int orient ) const -{ - if (!m_wxwindow) return 0; - - if (orient == wxHORIZONTAL) - return (int)(m_hAdjust->value+0.5); - else - return (int)(m_vAdjust->value+0.5); -} - -int wxWindow::GetScrollRange( int orient ) const -{ - if (!m_wxwindow) return 0; - - if (orient == wxHORIZONTAL) - return (int)(m_hAdjust->upper+0.5); - else - return (int)(m_vAdjust->upper+0.5); -} - -void wxWindow::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) ) -{ - if (!m_wxwindow) return; - -/* - bool refresh = FALSE; - - if ((m_drawingOffsetX == 0) && (m_drawingOffsetY == 0)) - { - m_drawingOffsetX = -16000; - m_drawingOffsetY = -16000; - refresh = TRUE; - } - else - { - m_drawingOffsetX += dx; - m_drawingOffsetY += dy; - } - -// printf( "X: %d Y: %d \n", (int)m_drawingOffsetX, (int)m_drawingOffsetY ); - - gtk_myfixed_set_offset( GTK_MYFIXED(m_wxwindow), m_drawingOffsetX, m_drawingOffsetY ); - - if (refresh) Refresh(); - - The code here is very nifty, but it doesn't work with - overlapping windows... -*/ - - int cw = 0; - int ch = 0; - GetClientSize( &cw, &ch ); - - int w = cw - abs(dx); - int h = ch - abs(dy); - if ((h < 0) || (w < 0)) - { - Refresh(); - return; - } - int s_x = 0; - int s_y = 0; - if (dx < 0) s_x = -dx; - if (dy < 0) s_y = -dy; - int d_x = 0; - int d_y = 0; - if (dx > 0) d_x = dx; - if (dy > 0) d_y = dy; - gdk_window_copy_area( m_wxwindow->window, m_wxwindow->style->fg_gc[0], d_x, d_y, - m_wxwindow->window, s_x, s_y, w, h ); - - wxRect rect; - if (dx < 0) rect.x = cw+dx; else rect.x = 0; - if (dy < 0) rect.y = ch+dy; else rect.y = 0; - if (dy != 0) rect.width = cw; else rect.width = abs(dx); - if (dx != 0) rect.height = ch; else rect.height = abs(dy); - - Refresh( TRUE, &rect ); -} - -//------------------------------------------------------------------------------------- -// Layout -//------------------------------------------------------------------------------------- - -wxLayoutConstraints *wxWindow::GetConstraints(void) const -{ - return m_constraints; -} - -void wxWindow::SetConstraints( wxLayoutConstraints *constraints ) -{ - if (m_constraints) - { - UnsetConstraints(m_constraints); - delete m_constraints; - } - m_constraints = constraints; - if (m_constraints) - { - // Make sure other windows know they're part of a 'meaningful relationship' - if (m_constraints->left.GetOtherWindow() && (m_constraints->left.GetOtherWindow() != this)) - m_constraints->left.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->top.GetOtherWindow() && (m_constraints->top.GetOtherWindow() != this)) - m_constraints->top.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->right.GetOtherWindow() && (m_constraints->right.GetOtherWindow() != this)) - m_constraints->right.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->bottom.GetOtherWindow() && (m_constraints->bottom.GetOtherWindow() != this)) - m_constraints->bottom.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->width.GetOtherWindow() && (m_constraints->width.GetOtherWindow() != this)) - m_constraints->width.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->height.GetOtherWindow() && (m_constraints->height.GetOtherWindow() != this)) - m_constraints->height.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->centreX.GetOtherWindow() && (m_constraints->centreX.GetOtherWindow() != this)) - m_constraints->centreX.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->centreY.GetOtherWindow() && (m_constraints->centreY.GetOtherWindow() != this)) - m_constraints->centreY.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - } -; -} -; - -void wxWindow::SetAutoLayout( bool autoLayout ) -{ - m_autoLayout = autoLayout; -} - -bool wxWindow::GetAutoLayout(void) const -{ - return m_autoLayout; -} - -wxSizer *wxWindow::GetSizer(void) const -{ - return m_windowSizer; -} - -void wxWindow::SetSizerParent( wxWindow *win ) -{ - m_sizerParent = win; -} - -wxWindow *wxWindow::GetSizerParent(void) const -{ - return m_sizerParent; -} - -// This removes any dangling pointers to this window -// in other windows' constraintsInvolvedIn lists. -void wxWindow::UnsetConstraints(wxLayoutConstraints *c) -{ - if (c) - { - if (c->left.GetOtherWindow() && (c->top.GetOtherWindow() != this)) - c->left.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->top.GetOtherWindow() && (c->top.GetOtherWindow() != this)) - c->top.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->right.GetOtherWindow() && (c->right.GetOtherWindow() != this)) - c->right.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->bottom.GetOtherWindow() && (c->bottom.GetOtherWindow() != this)) - c->bottom.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->width.GetOtherWindow() && (c->width.GetOtherWindow() != this)) - c->width.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->height.GetOtherWindow() && (c->height.GetOtherWindow() != this)) - c->height.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->centreX.GetOtherWindow() && (c->centreX.GetOtherWindow() != this)) - c->centreX.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->centreY.GetOtherWindow() && (c->centreY.GetOtherWindow() != this)) - c->centreY.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - } -} - -// Back-pointer to other windows we're involved with, so if we delete -// this window, we must delete any constraints we're involved with. -void wxWindow::AddConstraintReference(wxWindow *otherWin) -{ - if (!m_constraintsInvolvedIn) - m_constraintsInvolvedIn = new wxList; - if (!m_constraintsInvolvedIn->Member(otherWin)) - m_constraintsInvolvedIn->Append(otherWin); -} - -// REMOVE back-pointer to other windows we're involved with. -void wxWindow::RemoveConstraintReference(wxWindow *otherWin) -{ - if (m_constraintsInvolvedIn) - m_constraintsInvolvedIn->DeleteObject(otherWin); -} - -// Reset any constraints that mention this window -void wxWindow::DeleteRelatedConstraints(void) -{ - if (m_constraintsInvolvedIn) - { - wxNode *node = m_constraintsInvolvedIn->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - wxNode *next = node->Next(); - wxLayoutConstraints *constr = win->GetConstraints(); - - // Reset any constraints involving this window - if (constr) - { - constr->left.ResetIfWin((wxWindow *)this); - constr->top.ResetIfWin((wxWindow *)this); - constr->right.ResetIfWin((wxWindow *)this); - constr->bottom.ResetIfWin((wxWindow *)this); - constr->width.ResetIfWin((wxWindow *)this); - constr->height.ResetIfWin((wxWindow *)this); - constr->centreX.ResetIfWin((wxWindow *)this); - constr->centreY.ResetIfWin((wxWindow *)this); - } - delete node; - node = next; - } - delete m_constraintsInvolvedIn; - m_constraintsInvolvedIn = (wxList *) NULL; - } -} - -void wxWindow::SetSizer(wxSizer *sizer) -{ - m_windowSizer = sizer; - if (sizer) - sizer->SetSizerParent((wxWindow *)this); -} - -/* - * New version - */ - -bool wxWindow::Layout(void) -{ - if (GetConstraints()) - { - int w, h; - GetClientSize(&w, &h); - GetConstraints()->width.SetValue(w); - GetConstraints()->height.SetValue(h); - } - - // If top level (one sizer), evaluate the sizer's constraints. - if (GetSizer()) - { - int noChanges; - GetSizer()->ResetConstraints(); // Mark all constraints as unevaluated - GetSizer()->LayoutPhase1(&noChanges); - GetSizer()->LayoutPhase2(&noChanges); - GetSizer()->SetConstraintSizes(); // Recursively set the real window sizes - return TRUE; - } - else - { - // Otherwise, evaluate child constraints - ResetConstraints(); // Mark all constraints as unevaluated - DoPhase(1); // Just one phase need if no sizers involved - DoPhase(2); - SetConstraintSizes(); // Recursively set the real window sizes - } - return TRUE; -} - - -// Do a phase of evaluating constraints: -// the default behaviour. wxSizers may do a similar -// thing, but also impose their own 'constraints' -// and order the evaluation differently. -bool wxWindow::LayoutPhase1(int *noChanges) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - return constr->SatisfyConstraints((wxWindow *)this, noChanges); - } - else - return TRUE; -} - -bool wxWindow::LayoutPhase2(int *noChanges) -{ - *noChanges = 0; - - // Layout children - DoPhase(1); - DoPhase(2); - return TRUE; -} - -// Do a phase of evaluating child constraints -bool wxWindow::DoPhase(int phase) -{ - int noIterations = 0; - int maxIterations = 500; - int noChanges = 1; - int noFailures = 0; - wxList succeeded; - while ((noChanges > 0) && (noIterations < maxIterations)) - { - noChanges = 0; - noFailures = 0; - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow *)node->Data(); - if (!child->IsKindOf(CLASSINFO(wxFrame)) && !child->IsKindOf(CLASSINFO(wxDialog))) - { - wxLayoutConstraints *constr = child->GetConstraints(); - if (constr) - { - if (succeeded.Member(child)) - { - } - else - { - int tempNoChanges = 0; - bool success = ( (phase == 1) ? child->LayoutPhase1(&tempNoChanges) : child->LayoutPhase2(&tempNoChanges) ) ; - noChanges += tempNoChanges; - if (success) - { - succeeded.Append(child); - } - } - } - } - node = node->Next(); - } - noIterations ++; - } - return TRUE; -} - -void wxWindow::ResetConstraints(void) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - constr->left.SetDone(FALSE); - constr->top.SetDone(FALSE); - constr->right.SetDone(FALSE); - constr->bottom.SetDone(FALSE); - constr->width.SetDone(FALSE); - constr->height.SetDone(FALSE); - constr->centreX.SetDone(FALSE); - constr->centreY.SetDone(FALSE); - } - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (!win->IsKindOf(CLASSINFO(wxFrame)) && !win->IsKindOf(CLASSINFO(wxDialog))) - win->ResetConstraints(); - node = node->Next(); - } -} - -// Need to distinguish between setting the 'fake' size for -// windows and sizers, and setting the real values. -void wxWindow::SetConstraintSizes(bool recurse) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr && constr->left.GetDone() && constr->right.GetDone() && - constr->width.GetDone() && constr->height.GetDone()) - { - int x = constr->left.GetValue(); - int y = constr->top.GetValue(); - int w = constr->width.GetValue(); - int h = constr->height.GetValue(); - - // If we don't want to resize this window, just move it... - if ((constr->width.GetRelationship() != wxAsIs) || - (constr->height.GetRelationship() != wxAsIs)) - { - // Calls Layout() recursively. AAAGH. How can we stop that. - // Simply take Layout() out of non-top level OnSizes. - SizerSetSize(x, y, w, h); - } - else - { - SizerMove(x, y); - } - } - else if (constr) - { - char *windowClass = this->GetClassInfo()->GetClassName(); - - wxString winName; - if (GetName() == "") - winName = _("unnamed"); - else - winName = GetName(); - wxDebugMsg(_("Constraint(s) not satisfied for window of type %s, name %s:\n"), (const char *)windowClass, (const char *)winName); - if (!constr->left.GetDone()) - wxDebugMsg(_(" unsatisfied 'left' constraint.\n")); - if (!constr->right.GetDone()) - wxDebugMsg(_(" unsatisfied 'right' constraint.\n")); - if (!constr->width.GetDone()) - wxDebugMsg(_(" unsatisfied 'width' constraint.\n")); - if (!constr->height.GetDone()) - wxDebugMsg(_(" unsatisfied 'height' constraint.\n")); - wxDebugMsg(_("Please check constraints: try adding AsIs() constraints.\n")); - } - - if (recurse) - { - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (!win->IsKindOf(CLASSINFO(wxFrame)) && !win->IsKindOf(CLASSINFO(wxDialog))) - win->SetConstraintSizes(); - node = node->Next(); - } - } -} - -// This assumes that all sizers are 'on' the same -// window, i.e. the parent of this window. -void wxWindow::TransformSizerToActual(int *x, int *y) const -{ - if (!m_sizerParent || m_sizerParent->IsKindOf(CLASSINFO(wxDialog)) || - m_sizerParent->IsKindOf(CLASSINFO(wxFrame)) ) - return; - - int xp, yp; - m_sizerParent->GetPosition(&xp, &yp); - m_sizerParent->TransformSizerToActual(&xp, &yp); - *x += xp; - *y += yp; -} - -void wxWindow::SizerSetSize(int x, int y, int w, int h) -{ - int xx = x; - int yy = y; - TransformSizerToActual(&xx, &yy); - SetSize(xx, yy, w, h); -} - -void wxWindow::SizerMove(int x, int y) -{ - int xx = x; - int yy = y; - TransformSizerToActual(&xx, &yy); - Move(xx, yy); -} - -// Only set the size/position of the constraint (if any) -void wxWindow::SetSizeConstraint(int x, int y, int w, int h) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - if (x != -1) - { - constr->left.SetValue(x); - constr->left.SetDone(TRUE); - } - if (y != -1) - { - constr->top.SetValue(y); - constr->top.SetDone(TRUE); - } - if (w != -1) - { - constr->width.SetValue(w); - constr->width.SetDone(TRUE); - } - if (h != -1) - { - constr->height.SetValue(h); - constr->height.SetDone(TRUE); - } - } -} - -void wxWindow::MoveConstraint(int x, int y) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - if (x != -1) - { - constr->left.SetValue(x); - constr->left.SetDone(TRUE); - } - if (y != -1) - { - constr->top.SetValue(y); - constr->top.SetDone(TRUE); - } - } -} - -void wxWindow::GetSizeConstraint(int *w, int *h) const -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - *w = constr->width.GetValue(); - *h = constr->height.GetValue(); - } - else - GetSize(w, h); -} - -void wxWindow::GetClientSizeConstraint(int *w, int *h) const -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - *w = constr->width.GetValue(); - *h = constr->height.GetValue(); - } - else - GetClientSize(w, h); -} - -void wxWindow::GetPositionConstraint(int *x, int *y) const -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - *x = constr->left.GetValue(); - *y = constr->top.GetValue(); - } - else - GetPosition(x, y); -} - -bool wxWindow::AcceptsFocus() const -{ - return IsEnabled() && IsShown(); -} - -void wxWindow::OnIdle(wxIdleEvent& WXUNUSED(event) ) -{ - UpdateWindowUI(); -} diff --git a/src/iodbc/Changes.log b/src/iodbc/Changes.log deleted file mode 100644 index fd43047296..0000000000 --- a/src/iodbc/Changes.log +++ /dev/null @@ -1,58 +0,0 @@ -July 30, 1995, v2.00.beta: - 0. the first release and beta version. - -Sep. 11, 1995, v2.10: - 1. Porting to AIX 3.x and 4.x, by writing dlopen(), - dlsym(), dlclose() interface. - 2. Tested on SCO OpenServer 5.x - 3. Awared of that, unlike s700/s800, exported function - symbols on HP9000 s300/s400 will be prepended with - a '_' prefix by compiler(and this '_' prefix is not - automatically handled by shl_findsym()). Now, it works - fine on s300/s400. - 4. Support driver ODBC call tracing. - -Oct. 12, 1995, v2.11: - 5. Driver's SQLNumResultCols() will automatically be - invoked in driver manager's SQLExecute(), - SQLExecDirect() and SQLParamData() after successfully - (i.e. return SQL_SUCCESS or SQL_SUCCESS_WITH_INFO ) - calling of their correspondent driver functions. This - simplifies the state tracing/checking of the driver - manager a lot and allows store procedures to return - result set and also make iODBC driver manager work - properly with SELECT INTO statements which actually - don't return result sets. - 6. Memory leaks are cleared. - 7. Two bugs in dld.c for AIX are fixed - 8. A bug of setting tracing option is fixed. - 9. The driver will not be unloaded by SQLDisconnect() - but by SQLFreeConnect() or next SQLConnect()/ - SQLDriverConnect()/SQLBrowsConnect() on a different - driver. This will save driver's loading time if it - has been used by a previous connection(even there - is no active connection on this driver). - 10.Another three platforms are supported: - FreeBSD 2.x - Concurrent Max/OS SVR4 1.x - DG/UX 5.x - 11.autoconfig and build -- shell scripts to help modifying - Config.mk and building iodbc driver manager - -Nov. 12, 1995, v2.12 - 12.I realized that a driver manager doesn't aware of - difference between a C5 (i.e. hstmt) and a C6 - (i.e. transaction) states. - 13.The link flags "-lc" has been droped from Linux ELF - section of Config.mk to fix a segment fault problem. - Now, it works fine on Slackware 2.3 and Red Hat 2.0 - (kernel version are 1.2.xx and 1.3.xx respectively). - 14.On FreeBSD 2.x, dlsym() doesn't handle the '_' prefix - prepended to an exportting function symbol by compiler. - So, CLI_NAME_PREFIX needs to be defined as "_SQL" for - FreeBSD 2.x. - 15.Some files are renamed - dld.c -> dlf.c - dld.h -> dlf.h - confg.h -> config.h - 16. Fix a bug on setting tracing options. diff --git a/src/iodbc/Config.mk b/src/iodbc/Config.mk deleted file mode 100644 index 35511a785d..0000000000 --- a/src/iodbc/Config.mk +++ /dev/null @@ -1,21 +0,0 @@ -# -# Copyright (C) 1995 by Ke Jin -# - -#============ Default for all system ============== -SHELL = -SHELL = /bin/sh -DLDAPI = DLDAPI_SVR4_DLFCN -DLSUFFIX= so -OUTFILE = iodbc -OBJX = - -#============= Linux ELF ========================= -# Slackware 2.x,(kernel 1.3.x) on i386 -# Red Hat 2.x (kernel 1.2.x) on i486 -# -ANSI = -ansi -CC = gcc -PIC = -fPIC -LDFLAGS = -shared -LIBS = -ldl diff --git a/src/iodbc/IAFA-PACKAGE b/src/iodbc/IAFA-PACKAGE deleted file mode 100644 index 488ec4c711..0000000000 --- a/src/iodbc/IAFA-PACKAGE +++ /dev/null @@ -1,37 +0,0 @@ -Title: iODBC Driver Manager for Unix - -Version: 2.12.0 - -Description: iODBC (intrinsic Open Database Connectivity) driver manager - is compatible with ODBC 2.0 specification and performs exactly - same jobs of ODBC 2.0 driver manager(i.e driver loading, - parameters and function sequence checking, driver's function - invoking, etc.). Any ODBC driver works with ODBC 2.0 driver - manager will also work with iODBC driver manager and vice versa. - Applications(which using ODBC function calls) linked with - iODBC driver manager will be able to simultaneously access - different type of data sources within one process through - suitable ODBC drivers. - -Author: Jin, Ke - -Platforms: SunOS (Sparc) 4.1.x - HP/UX (s700/s800) 9.x, 10.x - HP/UX (s300/s400) 9.x - IBM AIX 3.x, 4.x - Solaris (Sparc) 2.x - Solaris (PCx86) 2.x - SGI Irix 5.x, 6.x - NCR SVR4 3.x - UnixWare SVR4.2 1.x, 2.x - DEC Unix (OSF/1) 3.x, 4.x - FreeBSD 2.x - BSDI BSD/OS 2.x - Linux ELF 1.2.x - SCO OpenServer 5.x - Concurrent MAX/OS 1.x - DG/UX 5.x - -Copying-Policy: Freely Redistributable under GNU General Public License - -Keywords: ODBC, database, SQL diff --git a/src/iodbc/Makefile b/src/iodbc/Makefile deleted file mode 100644 index a92adfcd0a..0000000000 --- a/src/iodbc/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -include Version.mk -include Config.mk - - - - - - - - - - - -INCDIR = . -OUTDIR = $(HOME) - -CFLAGS = -O $(PIC) $(ANSI) -I$(INCDIR) -D$(DLDAPI) $(CFLAGSX)\ - -DVERSION=\"$(VERSION)$(EXTVER)\" - -ODBCDM = $(OUTDIR)/$(OUTFILE)-$(VERSION).$(DLSUFFIX) - -OBJS = dlf.o dlproc.o herr.o henv.o hdbc.o hstmt.o \ - connect.o prepare.o execute.o result.o \ - fetch.o info.o catalog.o misc.o itrace.o $(OBJX) - -all: $(OBJS) - @echo "Generating iODBC driver manager -->" $(ODBCDM) - @\rm -f $(ODBCDM) - @$(LD) $(LDFLAGS) $(OBJS) $(LIBS) -o $(ODBCDM) - -clean: - \rm -f $(OBJS) diff --git a/src/iodbc/README b/src/iodbc/README deleted file mode 100644 index 23cb2a5e82..0000000000 --- a/src/iodbc/README +++ /dev/null @@ -1,187 +0,0 @@ -0. Changes - a. I realized that a driver manager doesn't aware of - difference between a C5 (i.e. hstmt) and a C6 - (i.e. transaction) states. - - b. The link flags "-lc" has been removed from Linux ELF - section of Config.mk to fix a segment fault problem. - Now, it works fine on Slackware 2.3 and Red Hat 2.0 - (kernel version are 1.2.xx and 1.3.xx respectively). - - c. On FreeBSD 2.x, dlsym() doesn't handle the '_' - prepended before a exporting function symbol. So, - CLI_NAME_PREFIX needs to be defined as "_SQL" for - FreeBSD. - - d. Some files are renamed - dld.c -> dlf.c - dld.h -> dlf.h - confg.h -> config.h - -1. iODBC driver manager platform availability - - iODBC driver manager has been ported to following Unix platforms: - - SunOS 4.1.x Sun Sparc - HP/UX 9.x, 10.x HP9000 s700/s800 - HP/UX 9.x HP9000 s300/s400 - IBM AIX 3.x, 4.x IBM RS6000, PowerPC - Sun Solaris 2.x Sun Sparc, PCx86 - SGI Irix SVR4 5.x, 6.x IP12 MIPS, IP22 MIPS - NCR SVR4 3.x NCR 3435 - UnixWare SVR4.2 1.x, 2.x x86 - DEC Unix(OSF/1) 3.x, 4.x DEC Alpha - FreeBSD 2.x x86 - BSDI BSD/OS 2.x ? - Linux ELF 1.2.x, 1.3.x x86 - SCO OpenServer 5.x x86 - Max/OS SVR4 1.x Concurrent Maxion 9200 MP - DG/UX 5.x Aviion - - Porting of iODBC driver manager to some non-unix operating systems - such as Windows family(3.x, 95, NT), OS/2 and Mac is supported but - has never compiled and tested yet :). Of cause, you need to supply - a make/build file and a short LibMain for creating the iodbc.dll. - -2. How to build iODBC driver manager: - - step 1. Identify your system - step 2. Run build with a suitable option - - Here is an example: - - %[1]: sh iodbc-2.12.shar - .... - %[2]: cd iodbc-2.12 - %[3]: uname -s -v -r -m - HP-UX B.10.01 A 9000/710 - %[4]: ./build hp700 - autoconfig hp700 - make - .... - Generating iODBC driver manager --> /home/kejin/iodbc-2.12.sl - -3. odbc.ini( ~/.odbc.ini ) - - Driver manager and drivers use odbc.ini(or ~/.odbc.ini on Unix) file - or connection string when establishing a data source connection. On - Windows, odbc.ini is located in Windows directory. On unix, iODBC driver - manager(and all other ODBC drivers and driver managers I awared) looks - .odbc.ini file in real user's home directory (it could be a softlink to - the file located somewhere else). Make sure your driver will look into - the same file (or a file which is a symbolic link to the same file). - The format of odbc.ini( or ~/.odbc.ini ) is defined as: - - odbc.ini(or .odbc.ini) ::= data_source_list - - data_source_list ::= /* empty */ - | data_source '\n' data_source_list - - data_source ::= '[' data_source_name ']' '\n' data_source_desc - - data_source_name ::= 'default' | [A-Za-z]*[A-Za-z0-9_]* - - data_source_desc ::= /* empty */ - | attrib_desc '\n' data_source_desc - - addrib_desc ::= Attrib '=' attrib_value - - Attrib ::= 'Driver' | 'PID' | 'UID' | driver_def_attrib - - driver_def_attrib ::= [A-Za-z]*[A-Za-z0-9_]* - - An example of .odbc.ini file: - - [toronto_yp] - # yellow page of metro Toronto - Driver = /usr/lib/odbc/oracle.so - <....> - - [toronto_wp] - # white page of metro Toronto - Driver = /usr/lib/odbc/oracle.so - <....> - - [contract] - # all contract documents - Driver = /usr/lib/odbc/informix.so - <....> - - [netnews] - # NNTP netnews group - Driver = /usr/lib/odbc/nnodbc.so - Server = news.empress.com - - [rnd_test] - # data source for R&D test - Driver = /home/r_d/odbc/empodbc.so - URL = empodbc://rnd.empress.com:6322/rnd_test/testdb - - [default] - # default to odbc gateway - Driver = /usr/lib/odbc/gateway.so - -4. Tracing - - iODBC driver manager traces driver's ODBC call invoked by the driver - manager. Default tracing file is ./odbc.log. Tracing option (i.e. - on/off or optional tracing file name) can be set in ~/.odbc.ini - file (under a data source section) as: - - TraceFile = - Trace = ON | On | on | 1 | OFF | Off | off | 0 - - If is stderr or stdout, i.e. - - TraceFile = stderr - - or - - TraceFile = stdout - - the tracing message will go to the terminal screen(if it is available). - - iODBC driver manager allows one to tune on/off tracing on selected - connection(s). Different connections can share one or use different - tracing file(s). ODBC calls on connections without tuning tracing on - will not be traced. - -5. File list: - - README This file - IAFA-PACKAGE Version and copyright information - Changes.log Source changes log - Version.mk Version make include file - Config.mk Config make include file - Makefile make file - config.h system config include file - isql.h ODBC 1.0 macro - isqlext.h ODBC 2.0 macro - dlf.h general dynamic loader module interface - dlf.c general dynamic loader module (mapping to svr4) - dlproc.h simple dynamic loader module interface - dlproc.c simple dynamic loader on top of dlf module - herr.h error handling module interface - herr.c error handling module - herr.ci error handling source include - henv.h environment handle interface - henv.c environment handle module - henv.ci environment handle source include - hdbc.h connection handle interface - hdbc.c connection handle module - hstmt.h statement handle interface - hstmt.c statement handle module - connect.c connect functions - prepare.c query prepare functions - execute.c query executing functions - result.c query result property functions - fetch.c query result fetch functions - info.c driver information functions - catalog.c catalog functions - misc.c miscellaneous functions - itrace.h macro - itrace.c trace function - main.c entry function used to build a share library on AIX - shrsub.exp export symbol list used on AIX - autoconfig shell script for creating Config.mk - build shell script for building iodbc driver manager diff --git a/src/iodbc/Version.mk b/src/iodbc/Version.mk deleted file mode 100644 index c61ab27c21..0000000000 --- a/src/iodbc/Version.mk +++ /dev/null @@ -1,2 +0,0 @@ -VERSION = 2.12 -EXTVER = .0 diff --git a/src/iodbc/autoconfig b/src/iodbc/autoconfig deleted file mode 100755 index ac6de96f2d..0000000000 --- a/src/iodbc/autoconfig +++ /dev/null @@ -1,230 +0,0 @@ -#! /usr/bin/sh - -cat > Config.tmp << '@END' -# -# Copyright (C) 1995 by Ke Jin -# - -#============ Default for all system ============== -SHELL = -SHELL = /bin/sh -DLDAPI = DLDAPI_SVR4_DLFCN -DLSUFFIX= so -OUTFILE = iodbc -OBJX = -@END - -\rm -f Makefile.tmp -cat > Makefile.tmp <<'@END' -include Version.mk -include Config.mk -@END - -case $1 in - sun4) - cat >> Config.tmp << '@END' - -#============ SunOS 4.1.x ========================= -PIC = -pic -CC = acc -LIBS = -ldl -@END - ;; - - aix) - cat >> Config.tmp << '@END' - -#=========== AIX 3.x 4.x ========================== -DLDAPI = DLDAPI_AIX_LOAD -ANSI = -langlvl=ansi -LDFLAGS = -H512 -T512 -bE:shrsub.exp -bM:SRE -LIBS = -lc -OBJX = main.o -DLSUFFIX= s.o -CFLAGSX = -DCLI_NAME_PREFIX=\".SQL\" -@END - ;; - - hp300 | hp400) - cat >> Config.tmp << '@END' - -#============ HP/UX (s300/s400) 9.x 10.x ========== -DLDAPI = DLDAPI_HP_SHL -ANSI = -Aa -PIC = +z -LDFLAGS = -b -DLSUFFIX= sl -CFLAGSX = -D_INCLUDE_POSIX_SOURCE -DCLI_NAME_PREFIX=\"_SQL\" -@END - ;; - - hp700 | hp800) - cat >> Config.tmp << '@END' - -#============ HP/UX 9000(s700/s800) 9.x 10.x ====== -DLDAPI = DLDAPI_HP_SHL -ANSI = -Aa -PIC = +z -LDFLAGS = -b -LIBS = -lc -ldld -DLSUFFIX= sl -CFLAGSX = -D_INCLUDE_POSIX_SOURCE -@END - ;; - - solaris) - cat >> Config.tmp << '@END' - -#======= Solaris 2.x, SunOS 5.x (Sparc/x86) ======= -LDFLAGS = -G -z defs -LIBS = -lc -ldl -lnsl -@END - ;; - - ncr |gis) - cat >> Config.tmp << '@END' - -#============= NCR SVR4 3.x ======================= -PIC = -KPIC -LDFLAGS = -G -z defs -LIBS = -lc -ldl -@END - ;; - - unixware) - cat >> Config.tmp << '@END' - -#========= UnixWare SVR4 1.x, 2.x ================= -PIC = -KPIC -LDFLAGS = -G -z defs -LIBS = -lc -ldl -@END - ;; - - maxos) - cat >> Config.tmp << '@END' - -#============ Concurrent Maxion MAX/OS 1.x ======== -PIC = -KPIC -LDFLAGS = -G -z defs -LIBS = -lc -ldl -@END - ;; - - sco-opensrv | sco-osr5 ) - cat >> Config.tmp << '@END' - -#============ SCO OpenServer 5.x ================== -PIC = -K PIC -b elf -LDFLAGS = -G -z defs -LIBS = -lc -ldl -@END - ;; - - dgux) - cat >> Config.tmp << '@END' - -#============ DG/UX 5.x =========================== -PIC = -K PIC -LDFLAGS = -G -z defs -LIBS = -lc -ldl -@END - ;; - - freebsd) - cat >> Config.tmp << '@END' - -#============= FreeBSD 2.x ======================== -PIC = -fPIC -CFLAGSX = -DCLI_NAME_PREFIX=\"_SQL\" -LDFLAGS = -Bshareable -LIBS = -lc -@END - - \rm -f Makefile.tmp - cat > Makefile.tmp <<'@END' -.include "Version.mk" -.include "Config.mk" -@END - ;; - - bsd-os) - cat >> Config.tmp << '@END' - -#============ BSDI BSD/OS 2.x ===================== -# -# ported by: Stuart Hayton -# -CC = gcc -LDFLAGS = -r -LDSUFFIX= o -LIBS = -lc_s.2.0 -ldl -@END - ;; - - linux-elf) - cat >> Config.tmp << '@END' - -#============= Linux ELF ========================= -# Slackware 2.x,(kernel 1.3.x) on i386 -# Red Hat 2.x (kernel 1.2.x) on i486 -# -ANSI = -ansi -CC = gcc -PIC = -fPIC -LDFLAGS = -shared -LIBS = -ldl -@END - ;; - - irix5| irix6) - cat >> Config.tmp << '@END' - -#============= SGI IRIX 5.x, 6.x ================= -LDFLAGS = -shared -LIBS = -lc -@END - ;; - - dec-osf1 | dec-unix) - cat >> Config.tmp << '@END' - -#============= DEC Unix(OSF/1) 3.x, 4.x ========== -LDFLAGS = -shared -LIBS = -lc -@END - ;; - *) - cat << '@END' - - Usage: autoconfig or - build - - platform_opt: - - sun4 -- SunOS 4.1.x - aix -- IBM AIX 3.x, 4.x - hp300, hp400 -- HP/UX 9.x, 10.x on 9000 s300/s400 - hp700, hp800 -- HP/UX 9.x, 10.x on 9000 s700/s800 - solaris -- Sun Solaris 2.x, SunOS 5.x - ncr, gis -- NCR(GIS) SVR4 3.x - unixware -- Novell UnixWare 1.x, 2.x - maxos -- Concurrent MAX/OS SVR4 1.x - sco-osr5 -- SCO Open Server 5.x - dgux -- DG/UX 5.x - freebsd -- FreeBSD 2.x - bsd-os -- BSDI BSD/OS 2.x - linux-elf -- Linux ELF 1.2.x and up - irix5, irix6 -- SGI Irix 5.x, 6.x - dec-osf1 -- DEC Unix(OSF/1) 3.x, 4.x - -@END - \rm -f Config.tmp - \rm -f Makefile.tmp - exit 1 - ;; -esac - \mv -f Config.tmp Config.mk - sed -e 's/.include.*//' -e 's/include.*//' Makefile >> Makefile.tmp - \mv -f Makefile.tmp Makefile - exit 0 diff --git a/src/iodbc/build b/src/iodbc/build deleted file mode 100755 index eb47c38745..0000000000 --- a/src/iodbc/build +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh - -echo autoconfig $1 - -if sh ./autoconfig $1 -then -echo make -make -fi diff --git a/src/iodbc/catalog.c b/src/iodbc/catalog.c deleted file mode 100644 index 0d85940454..0000000000 --- a/src/iodbc/catalog.c +++ /dev/null @@ -1,1092 +0,0 @@ -/** Catalog functions of iODBC driver manager - - Copyright (C) 1995 by Ke Jin - - This program 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. -**/ - -#include <../iodbc/iodbc.h> - -#include <../iodbc/isql.h> -#include <../iodbc/isqlext.h> - -#include <../iodbc/dlproc.h> - -#include <../iodbc/herr.h> -#include <../iodbc/henv.h> -#include <../iodbc/hdbc.h> -#include <../iodbc/hstmt.h> - -#include <../iodbc/itrace.h> - -static RETCODE _iodbcdm_cata_state_ok ( - HSTMT hstmt, - int fidx ) -/* check state for executing catalog functions */ -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - int sqlstat = en_00000; - - if( pstmt->asyn_on == en_NullProc ) - { - switch( pstmt->state ) - { - case en_stmt_needdata: - case en_stmt_mustput: - case en_stmt_canput: - sqlstat = en_S1010; - break; - - case en_stmt_fetched: - case en_stmt_xfetched: - sqlstat = en_24000; - break; - - default: - break; - } - } - else if( pstmt->asyn_on != fidx ) - { - sqlstat = en_S1010; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - return SQL_SUCCESS; -} - -static RETCODE _iodbcdm_cata_state_tr( - HSTMT hstmt, - int fidx, - RETCODE result ) -/* state transition for catalog function */ -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - DBC_t FAR* pdbc; - - pdbc = (DBC_t FAR*)(pstmt->hdbc); - - if( pstmt->asyn_on == fidx ) - { - switch( result ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - case SQL_ERROR: - pstmt->asyn_on = en_NullProc; - break; - - case SQL_STILL_EXECUTING: - default: - return result; - } - } - - if( pstmt->state <= en_stmt_executed ) - { - switch( result ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - pstmt->state = en_stmt_cursoropen; - break; - - case SQL_ERROR: - pstmt->state = en_stmt_allocated; - pstmt->prep_state = 0; - break; - - case SQL_STILL_EXECUTING: - pstmt->asyn_on = fidx; - break; - - default: - break; - } - } - - return result; -} - -RETCODE SQL_API SQLGetTypeInfo( - HSTMT hstmt, - SWORD fSqlType ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc = SQL_NULL_HPROC; - int sqlstat = en_00000; - RETCODE retcode; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - for(;;) - { - if( fSqlType > SQL_TYPE_MAX ) - { - sqlstat = en_S1004; - break; - } - - if( fSqlType < SQL_TYPE_MIN - && fSqlType > SQL_TYPE_DRIVER_START ) - /* Note: SQL_TYPE_DRIVER_START is a nagtive - * number So, we use ">" */ - { - sqlstat = en_S1004; - break; - } - - retcode = _iodbcdm_cata_state_ok( hstmt, en_GetTypeInfo ); - - if( retcode != SQL_SUCCESS ) - { - return SQL_ERROR; - } - - hproc = _iodbcdm_getproc ( pstmt->hdbc, en_GetTypeInfo ); - - if( hproc == SQL_NULL_HPROC ) - { - sqlstat = en_IM001; - break; - } - - sqlstat = en_00000; - if( 1 ) /* turn off solaris warning message */ - break; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, - en_GetTypeInfo, ( pstmt->dhstmt, fSqlType) ) - -#if 0 - retcode = hproc ( pstmt->dhstmt, fSqlType ); -#endif - - return _iodbcdm_cata_state_tr( hstmt, en_GetTypeInfo, retcode ); -} - -RETCODE SQL_API SQLSpecialColumns( - HSTMT hstmt, - UWORD fColType, - UCHAR FAR* szTableQualifier, - SWORD cbTableQualifier, - UCHAR FAR* szTableOwner, - SWORD cbTableOwner, - UCHAR FAR* szTableName, - SWORD cbTableName, - UWORD fScope, - UWORD fNullable ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc = SQL_NULL_HPROC; - RETCODE retcode; - int sqlstat = en_00000; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - for(;;) - { - if( ( cbTableQualifier < 0 && cbTableQualifier != SQL_NTS ) - || ( cbTableOwner < 0 && cbTableOwner != SQL_NTS ) - || ( cbTableName < 0 && cbTableName != SQL_NTS ) ) - { - sqlstat = en_S1090; - break; - } - - if( fColType != SQL_BEST_ROWID - && fColType != SQL_ROWVER ) - { - sqlstat = en_S1097; - break; - } - - if( fScope != SQL_SCOPE_CURROW - && fScope != SQL_SCOPE_TRANSACTION - && fScope != SQL_SCOPE_SESSION ) - { - sqlstat = en_S1098; - break; - } - - if( fNullable != SQL_NO_NULLS - && fNullable != SQL_NULLABLE ) - { - sqlstat = en_S1099; - break; - } - - retcode = _iodbcdm_cata_state_ok ( hstmt, en_SpecialColumns ); - - if( retcode != SQL_SUCCESS ) - { - return SQL_ERROR; - } - - hproc = _iodbcdm_getproc( pstmt->hdbc, en_SpecialColumns ); - - if( hproc == SQL_NULL_HPROC ) - { - sqlstat = en_IM001; - break; - } - - sqlstat = en_00000; - if( 1 ) /* turn off solaris warning message */ - break; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_SpecialColumns, ( - pstmt->dhstmt, - fColType, - szTableQualifier, - cbTableQualifier, - szTableOwner, - cbTableOwner, - szTableName, - cbTableName, - fScope, - fNullable ) ) - -#if 0 - retcode = hproc(pstmt->dhstmt, - fColType, - szTableQualifier, - cbTableQualifier, - szTableOwner, - cbTableOwner, - szTableName, - cbTableName, - fScope, - fNullable ); -#endif - - return _iodbcdm_cata_state_tr( hstmt, en_SpecialColumns, retcode ); -} - -RETCODE SQL_API SQLStatistics( - HSTMT hstmt, - UCHAR FAR* szTableQualifier, - SWORD cbTableQualifier, - UCHAR FAR* szTableOwner, - SWORD cbTableOwner, - UCHAR FAR* szTableName, - SWORD cbTableName, - UWORD fUnique, - UWORD fAccuracy ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc = SQL_NULL_HPROC; - RETCODE retcode; - int sqlstat = en_00000; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - for(;;) - { - if( ( cbTableQualifier < 0 && cbTableQualifier != SQL_NTS ) - || ( cbTableOwner < 0 && cbTableOwner != SQL_NTS ) - || ( cbTableName < 0 && cbTableName != SQL_NTS ) ) - { - sqlstat = en_S1090; - break; - } - - if( fUnique != SQL_INDEX_UNIQUE - && fUnique != SQL_INDEX_ALL ) - { - sqlstat = en_S1100; - break; - } - - if( fAccuracy != SQL_ENSURE - && fAccuracy != SQL_QUICK ) - { - sqlstat = en_S1101; - break; - } - - retcode = _iodbcdm_cata_state_ok ( hstmt, en_Statistics ); - - if( retcode != SQL_SUCCESS ) - { - return SQL_ERROR; - } - - hproc = _iodbcdm_getproc( pstmt->hdbc, en_Statistics ); - - if( hproc == SQL_NULL_HPROC ) - { - sqlstat = en_IM001; - break; - } - - sqlstat = en_00000; - - if( 1 ) /* turn off solaris warning message */ - break; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_Statistics, ( - pstmt->dhstmt, - szTableQualifier, - cbTableQualifier, - szTableOwner, - cbTableOwner, - szTableName, - cbTableName, - fUnique, - fAccuracy ) ) - -#if 0 - retcode = hproc(pstmt->dhstmt, - szTableQualifier, - cbTableQualifier, - szTableOwner, - cbTableOwner, - szTableName, - cbTableName, - fUnique, - fAccuracy ); -#endif - - return _iodbcdm_cata_state_tr( hstmt, en_Statistics, retcode ); -} - -RETCODE SQL_API SQLTables( - HSTMT hstmt, - UCHAR FAR* szTableQualifier, - SWORD cbTableQualifier, - UCHAR FAR* szTableOwner, - SWORD cbTableOwner, - UCHAR FAR* szTableName, - SWORD cbTableName, - UCHAR FAR* szTableType, - SWORD cbTableType ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc = SQL_NULL_HPROC; - RETCODE retcode; - int sqlstat = en_00000; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - for(;;) - { - if( ( cbTableQualifier < 0 && cbTableQualifier != SQL_NTS ) - || ( cbTableOwner < 0 && cbTableOwner != SQL_NTS ) - || ( cbTableName < 0 && cbTableName != SQL_NTS ) - || ( cbTableType < 0 && cbTableType != SQL_NTS ) ) - { - sqlstat = en_S1090; - break; - } - - retcode = _iodbcdm_cata_state_ok ( hstmt, en_Tables ); - - if( retcode != SQL_SUCCESS ) - { - return SQL_ERROR; - } - - hproc = _iodbcdm_getproc( pstmt->hdbc, en_Tables ); - - if( hproc == SQL_NULL_HPROC ) - { - sqlstat = en_IM001; - break; - } - - sqlstat = en_00000; - - if( 1 ) /* turn off solaris warning message */ - break; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_Tables, ( - pstmt->dhstmt, - szTableQualifier, - cbTableQualifier, - szTableOwner, - cbTableOwner, - szTableName, - cbTableName, - szTableType, - cbTableType ) ) - -#if 0 - retcode = hproc(pstmt->dhstmt, - szTableQualifier, - cbTableQualifier, - szTableOwner, - cbTableOwner, - szTableName, - cbTableName, - szTableType, - cbTableType ); -#endif - - return _iodbcdm_cata_state_tr( hstmt, en_Tables, retcode ); -} - -RETCODE SQL_API SQLColumnPrivileges( - HSTMT hstmt, - UCHAR FAR* szTableQualifier, - SWORD cbTableQualifier, - UCHAR FAR* szTableOwner, - SWORD cbTableOwner, - UCHAR FAR* szTableName, - SWORD cbTableName, - UCHAR FAR* szColumnName, - SWORD cbColumnName ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc = SQL_NULL_HPROC; - RETCODE retcode; - int sqlstat = en_00000; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - for(;;) - { - if( ( cbTableQualifier < 0 && cbTableQualifier != SQL_NTS ) - || ( cbTableOwner < 0 && cbTableOwner != SQL_NTS ) - || ( cbTableName < 0 && cbTableName != SQL_NTS ) - || ( cbColumnName < 0 && cbColumnName != SQL_NTS ) ) - { - sqlstat = en_S1090; - break; - } - - retcode = _iodbcdm_cata_state_ok ( hstmt, en_ColumnPrivileges ); - - if( retcode != SQL_SUCCESS ) - { - return SQL_ERROR; - } - - hproc = _iodbcdm_getproc( pstmt->hdbc, en_ColumnPrivileges ); - - if( hproc == SQL_NULL_HPROC ) - { - sqlstat = en_IM001; - break; - } - - sqlstat = en_00000; - - if( 1 ) /* turn off solaris warning message */ - break; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_ColumnPrivileges, ( - pstmt->dhstmt, - szTableQualifier, - cbTableQualifier, - szTableOwner, - cbTableOwner, - szTableName, - cbTableName, - szColumnName, - cbColumnName ) ) - -#if 0 - retcode = hproc(pstmt->dhstmt, - szTableQualifier, - cbTableQualifier, - szTableOwner, - cbTableOwner, - szTableName, - cbTableName, - szColumnName, - cbColumnName ); -#endif - - return _iodbcdm_cata_state_tr( hstmt, en_ColumnPrivileges, retcode ); -} - -RETCODE SQL_API SQLColumns( - HSTMT hstmt, - UCHAR FAR* szTableQualifier, - SWORD cbTableQualifier, - UCHAR FAR* szTableOwner, - SWORD cbTableOwner, - UCHAR FAR* szTableName, - SWORD cbTableName, - UCHAR FAR* szColumnName, - SWORD cbColumnName ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc = SQL_NULL_HPROC; - RETCODE retcode; - int sqlstat = en_00000; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - for(;;) - { - if( ( cbTableQualifier < 0 && cbTableQualifier != SQL_NTS ) - || ( cbTableOwner < 0 && cbTableOwner != SQL_NTS ) - || ( cbTableName < 0 && cbTableName != SQL_NTS ) - || ( cbColumnName < 0 && cbColumnName != SQL_NTS ) ) - { - sqlstat = en_S1090; - break; - } - - retcode = _iodbcdm_cata_state_ok ( hstmt, en_Columns ); - - if( retcode != SQL_SUCCESS ) - { - return SQL_ERROR; - } - - hproc = _iodbcdm_getproc( pstmt->hdbc, en_Columns ); - - if( hproc == SQL_NULL_HPROC ) - { - sqlstat = en_IM001; - break; - } - - sqlstat = en_00000; - - if( 1 ) /* turn off solaris warning message */ - break; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_Columns, ( - pstmt->dhstmt, - szTableQualifier, - cbTableQualifier, - szTableOwner, - cbTableOwner, - szTableName, - cbTableName, - szColumnName, - cbColumnName ) ) - -#if 0 - retcode = hproc(pstmt->dhstmt, - szTableQualifier, - cbTableQualifier, - szTableOwner, - cbTableOwner, - szTableName, - cbTableName, - szColumnName, - cbColumnName ); -#endif - - return _iodbcdm_cata_state_tr( hstmt, en_Columns, retcode ); -} - -RETCODE SQL_API SQLForeignKeys( - HSTMT hstmt, - UCHAR FAR* szPkTableQualifier, - SWORD cbPkTableQualifier, - UCHAR FAR* szPkTableOwner, - SWORD cbPkTableOwner, - UCHAR FAR* szPkTableName, - SWORD cbPkTableName, - UCHAR FAR* szFkTableQualifier, - SWORD cbFkTableQualifier, - UCHAR FAR* szFkTableOwner, - SWORD cbFkTableOwner, - UCHAR FAR* szFkTableName, - SWORD cbFkTableName ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc = SQL_NULL_HPROC; - RETCODE retcode; - int sqlstat = en_00000; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - for(;;) - { - if( ( cbPkTableQualifier < 0 && cbPkTableQualifier != SQL_NTS ) - || ( cbPkTableOwner < 0 && cbPkTableOwner != SQL_NTS ) - || ( cbPkTableName < 0 && cbPkTableName != SQL_NTS ) - || ( cbFkTableQualifier < 0 && cbFkTableQualifier != SQL_NTS ) - || ( cbFkTableOwner < 0 && cbFkTableOwner != SQL_NTS ) - || ( cbFkTableName < 0 && cbFkTableName != SQL_NTS ) ) - { - sqlstat = en_S1090; - break; - } - - retcode = _iodbcdm_cata_state_ok ( hstmt, en_ForeignKeys ); - - if( retcode != SQL_SUCCESS ) - { - return SQL_ERROR; - } - - hproc = _iodbcdm_getproc( pstmt->hdbc, en_ForeignKeys ); - - if( hproc == SQL_NULL_HPROC ) - { - sqlstat = en_IM001; - break; - } - - sqlstat = en_00000; - - if( 1 ) /* turn off solaris warning message */ - break; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_ForeignKeys, ( - pstmt->dhstmt, - szPkTableQualifier, - cbPkTableQualifier, - szPkTableOwner, - cbPkTableOwner, - szPkTableName, - cbPkTableName, - szFkTableQualifier, - cbFkTableQualifier, - szFkTableOwner, - cbFkTableOwner, - szFkTableName, - cbFkTableName ) ) - -#if 0 - retcode = hproc(pstmt->dhstmt, - szPkTableQualifier, - cbPkTableQualifier, - szPkTableOwner, - cbPkTableOwner, - szPkTableName, - cbPkTableName, - szFkTableQualifier, - cbFkTableQualifier, - szFkTableOwner, - cbFkTableOwner, - szFkTableName, - cbFkTableName ); -#endif - - return _iodbcdm_cata_state_tr( hstmt, en_ForeignKeys, retcode ); -} - -RETCODE SQL_API SQLPrimaryKeys( - HSTMT hstmt, - UCHAR FAR* szTableQualifier, - SWORD cbTableQualifier, - UCHAR FAR* szTableOwner, - SWORD cbTableOwner, - UCHAR FAR* szTableName, - SWORD cbTableName ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc = SQL_NULL_HPROC; - RETCODE retcode; - int sqlstat = en_00000; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - for(;;) - { - if( ( cbTableQualifier < 0 && cbTableQualifier != SQL_NTS ) - || ( cbTableOwner < 0 && cbTableOwner != SQL_NTS ) - || ( cbTableName < 0 && cbTableName != SQL_NTS ) ) - { - sqlstat = en_S1090; - break; - } - - retcode = _iodbcdm_cata_state_ok ( hstmt, en_PrimaryKeys ); - - if( retcode != SQL_SUCCESS ) - { - return SQL_ERROR; - } - - hproc = _iodbcdm_getproc( pstmt->hdbc, en_PrimaryKeys ); - - if( hproc == SQL_NULL_HPROC ) - { - sqlstat = en_IM001; - break; - } - - sqlstat = en_00000; - - if( 1 ) /* turn off solaris warning message */ - break; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_PrimaryKeys, ( - pstmt->dhstmt, - szTableQualifier, - cbTableQualifier, - szTableOwner, - cbTableOwner, - szTableName, - cbTableName ) ) - -#if 0 - retcode = hproc(pstmt->dhstmt, - szTableQualifier, - cbTableQualifier, - szTableOwner, - cbTableOwner, - szTableName, - cbTableName ); -#endif - - return _iodbcdm_cata_state_tr( hstmt, en_PrimaryKeys, retcode ); -} - -RETCODE SQL_API SQLProcedureColumns( - HSTMT hstmt, - UCHAR FAR* szProcQualifier, - SWORD cbProcQualifier, - UCHAR FAR* szProcOwner, - SWORD cbProcOwner, - UCHAR FAR* szProcName, - SWORD cbProcName, - UCHAR FAR* szColumnName, - SWORD cbColumnName ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc = SQL_NULL_HPROC; - RETCODE retcode; - int sqlstat = en_00000; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - for(;;) - { - if( ( cbProcQualifier < 0 && cbProcQualifier != SQL_NTS ) - || ( cbProcOwner < 0 && cbProcOwner != SQL_NTS ) - || ( cbProcName < 0 && cbProcName != SQL_NTS ) - || ( cbColumnName < 0 && cbColumnName != SQL_NTS ) ) - { - sqlstat = en_S1090; - break; - } - - retcode = _iodbcdm_cata_state_ok ( hstmt, en_ProcedureColumns ); - - if( retcode != SQL_SUCCESS ) - { - return SQL_ERROR; - } - - hproc = _iodbcdm_getproc( pstmt->hdbc, en_ProcedureColumns ); - - if( hproc == SQL_NULL_HPROC ) - { - sqlstat = en_IM001; - break; - } - - sqlstat = en_00000; - - if( 1 ) /* turn off solaris warning message */ - break; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_ProcedureColumns, ( - pstmt->dhstmt, - szProcQualifier, - cbProcQualifier, - szProcOwner, - cbProcOwner, - szProcName, - cbProcName, - szColumnName, - cbColumnName ) ) - -#if 0 - retcode = hproc(pstmt->dhstmt, - szProcQualifier, - cbProcQualifier, - szProcOwner, - cbProcOwner, - szProcName, - cbProcName, - szColumnName, - cbColumnName ); -#endif - - return _iodbcdm_cata_state_tr( hstmt, en_ProcedureColumns, retcode ); -} - -RETCODE SQL_API SQLProcedures( - HSTMT hstmt, - UCHAR FAR* szProcQualifier, - SWORD cbProcQualifier, - UCHAR FAR* szProcOwner, - SWORD cbProcOwner, - UCHAR FAR* szProcName, - SWORD cbProcName ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc = SQL_NULL_HPROC; - RETCODE retcode; - int sqlstat = en_00000; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - for(;;) - { - if( ( cbProcQualifier < 0 && cbProcQualifier != SQL_NTS ) - || ( cbProcOwner < 0 && cbProcOwner != SQL_NTS ) - || ( cbProcName < 0 && cbProcName != SQL_NTS ) ) - { - sqlstat = en_S1090; - break; - } - - retcode = _iodbcdm_cata_state_ok ( hstmt, en_Procedures ); - - if( retcode != SQL_SUCCESS ) - { - return SQL_ERROR; - } - - hproc = _iodbcdm_getproc( pstmt->hdbc, en_Procedures ); - - if( hproc == SQL_NULL_HPROC ) - { - sqlstat = en_IM001; - break; - } - - sqlstat = en_00000; - - if( 1 ) /* turn off solaris warning message */ - break; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_Procedures, ( - pstmt->dhstmt, - szProcQualifier, - cbProcQualifier, - szProcOwner, - cbProcOwner, - szProcName, - cbProcName ) ) - -#if 0 - retcode = hproc(pstmt->dhstmt, - szProcQualifier, - cbProcQualifier, - szProcOwner, - cbProcOwner, - szProcName, - cbProcName ); -#endif - - return _iodbcdm_cata_state_tr( hstmt, en_Procedures, retcode ); -} - -RETCODE SQL_API SQLTablePrivileges( - HSTMT hstmt, - UCHAR FAR* szTableQualifier, - SWORD cbTableQualifier, - UCHAR FAR* szTableOwner, - SWORD cbTableOwner, - UCHAR FAR* szTableName, - SWORD cbTableName ) -{ - - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc = SQL_NULL_HPROC; - RETCODE retcode; - int sqlstat = en_00000; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - for(;;) - { - if( ( cbTableQualifier < 0 && cbTableQualifier != SQL_NTS ) - || ( cbTableOwner < 0 && cbTableOwner != SQL_NTS ) - || ( cbTableName < 0 && cbTableName != SQL_NTS ) ) - { - sqlstat = en_S1090; - break; - } - - retcode = _iodbcdm_cata_state_ok ( hstmt, en_TablePrivileges ); - - if( retcode != SQL_SUCCESS ) - { - return SQL_ERROR; - } - - hproc = _iodbcdm_getproc( pstmt->hdbc, en_TablePrivileges ); - - if( hproc == SQL_NULL_HPROC ) - { - sqlstat = en_IM001; - break; - } - - sqlstat = en_00000; - - if( 1 ) /* turn off solaris warning message */ - break; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_TablePrivileges, ( - pstmt->dhstmt, - szTableQualifier, - cbTableQualifier, - szTableOwner, - cbTableOwner, - szTableName, - cbTableName ) ) - -#if 0 - retcode = hproc(pstmt->dhstmt, - szTableQualifier, - cbTableQualifier, - szTableOwner, - cbTableOwner, - szTableName, - cbTableName ); -#endif - - return _iodbcdm_cata_state_tr( hstmt, en_TablePrivileges, retcode ); -} diff --git a/src/iodbc/config.h b/src/iodbc/config.h deleted file mode 100644 index 7883fb87be..0000000000 --- a/src/iodbc/config.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef _LINUX_CONFIG_H -#define _LINUX_CONFIG_H - -#ifdef __LINUX__ -#include -#endif - -/* - * Defines for what uname() should return - */ -#ifndef UTS_SYSNAME -#define UTS_SYSNAME "Linux" -#endif - -#ifndef UTS_MACHINE -#define UTS_MACHINE "unknown" -#endif - -#ifndef UTS_NODENAME -#define UTS_NODENAME "(none)" /* set by sethostname() */ -#endif - -#ifndef UTS_DOMAINNAME -#define UTS_DOMAINNAME "(none)" /* set by setdomainname() */ -#endif - -/* - * The definitions for UTS_RELEASE and UTS_VERSION are now defined - * in linux/version.h, and should only be used by linux/version.c - */ - -/* Shouldn't these be defined somewhere in a i386 definition? */ - -/* Don't touch these, unless you really know what you're doing. */ -#define DEF_INITSEG 0x9000 -#define DEF_SYSSEG 0x1000 -#define DEF_SETUPSEG 0x9020 -#define DEF_SYSSIZE 0x7F00 - -/* internal svga startup constants */ -#define NORMAL_VGA 0xffff /* 80x25 mode */ -#define EXTENDED_VGA 0xfffe /* 80x50 mode */ -#define ASK_VGA 0xfffd /* ask for it at bootup */ - -#endif diff --git a/src/iodbc/connect.c b/src/iodbc/connect.c deleted file mode 100644 index 88e636aca7..0000000000 --- a/src/iodbc/connect.c +++ /dev/null @@ -1,1262 +0,0 @@ -/** Connect(load) driver - - Copyright (C) 1995 by Ke Jin - - This program 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. -**/ - -#include <../iodbc/iodbc.h> - -#include <../iodbc/isql.h> -#include <../iodbc/isqlext.h> - -#include <../iodbc/dlproc.h> - -#include <../iodbc/herr.h> -#include <../iodbc/henv.h> -#include <../iodbc/hdbc.h> -#include <../iodbc/hstmt.h> - -#include <../iodbc/itrace.h> -#include -#include - -extern char* _iodbcdm_getkeyvalbydsn(); -extern char* _iodbcdm_getkeyvalinstr(); -extern RETCODE _iodbcdm_driverunload(); - -/* - * Following id string is a copyright mark. Removing(i.e. use - * souce code of this package without it or make it not appear - * in the final object file) or modifing it without permission - * from original author(kejin@empress.com) are copyright - * violation. - */ -static char sccsid[] - = "@(#)iODBC driver manager " "2.12" ", Copyright(c) 1995 by Ke Jin"; - -static RETCODE _iodbcdm_driverload( - char FAR* path, - HDBC hdbc ) -/* - Load driver share library( or increase its reference count - * if it has already been loaded by another active connection) - * - Call driver's SQLAllocEnv() (for the first reference only) - * - Call driver's SQLAllocConnect() - * - Call driver's SQLSetConnectOption() (set login time out) - * - Increase the bookkeeping reference count - */ -{ - DBC_t FAR* pdbc = (DBC_t FAR*)hdbc; - GENV_t FAR* genv; - ENV_t FAR* penv = NULL; - HDLL hdll; - HPROC hproc; - RETCODE retcode = SQL_SUCCESS; - int sqlstat = en_00000; - - if( path == NULL || path[0] == '\0' ) - { - PUSHSQLERR ( pdbc->herr, en_IM002 ); - - return SQL_ERROR; - } - - if( hdbc == SQL_NULL_HDBC - || pdbc->genv == SQL_NULL_HENV ) - { - return SQL_INVALID_HANDLE; - } - - genv = (GENV_t FAR*)pdbc->genv; - - hdll = _iodbcdm_dllopen( (char FAR*) path ); - /* This will either load the - * driver dll or increase its - * reference count */ - - if( hdll == SQL_NULL_HDLL ) - { - PUSHSYSERR ( pdbc->herr, _iodbcdm_dllerror() ); - PUSHSQLERR ( pdbc->herr, en_IM003 ); - return SQL_ERROR; - } - - penv = (ENV_t FAR*)(pdbc->henv); - - if( penv != NULL ) - { - if( penv->hdll != hdll ) - { - _iodbcdm_driverunload(hdbc); - } - else - { - _iodbcdm_dllclose( hdll ); - /* this will not unload the driver - * but only decrease its internal - * reference count - */ - } - } - - if(penv == NULL ) - { - /* find out whether this dll has already - * been loaded on another connection */ - for( penv = (ENV_t FAR*)genv->henv; - penv != NULL; - penv = (ENV_t FAR*)penv->next ) - { - if( penv->hdll == hdll ) - { - _iodbcdm_dllclose( hdll ); - /* this will not unload the driver - * but only decrease its internal - * reference count - */ - break; - } - } - - if( penv == NULL ) - /* no connection attaching with this dll */ - { - int i; - - /* create a new dll env instance */ - penv = (ENV_t FAR*)MEM_ALLOC ( sizeof(ENV_t) ); - - if( penv == NULL ) - { - _iodbcdm_dllclose(hdll); - - PUSHSQLERR ( pdbc->herr, en_S1001 ); - - return SQL_ERROR; - } - - for( i = 0; i< SQL_EXT_API_LAST + 1; i++) - { - (penv->dllproc_tab)[i] = SQL_NULL_HPROC; - } - - pdbc->henv = penv; - penv->hdll = hdll; - - /* call driver's SQLAllocHandle() or SQLAllocEnv() */ -#if (ODBCVER >= 0x0300) - hproc = _iodbcdm_getproc( hdbc, en_AllocHandle ); - - if( hproc ) - { - CALL_DRIVER ( hdbc, retcode, hproc, en_AllocHandle, - ( SQL_HANDLE_ENV, SQL_NULL_HANDLE, &(penv->dhenv) ) - } - else /* try driver's SQLAllocEnv() */ -#endif - { - hproc = _iodbcdm_getproc( hdbc, en_AllocEnv ); - - if( hproc == SQL_NULL_HPROC) - { - sqlstat = en_IM004; - } - else - { - CALL_DRIVER ( hdbc, retcode, hproc, - en_AllocEnv, (&(penv->dhenv)) ) - } - } - - if( retcode == SQL_ERROR ) - { - sqlstat = en_IM004; - } - - if( sqlstat != en_00000 ) - { - _iodbcdm_dllclose ( hdll ); - MEM_FREE ( penv ); - PUSHSQLERR ( pdbc->herr, en_IM004 ); - - return SQL_ERROR; - } - - /* insert into dll env list */ - penv->next = (ENV_t FAR*)genv->henv; - genv->henv = penv; - - /* initiate this new env entry */ - penv->refcount = 0; /* we will increase it after - * driver's SQLAllocConnect() - * success - */ - } - - pdbc->henv = penv; - - if( pdbc->dhdbc == SQL_NULL_HDBC ) - { -#if (ODBCVER >= 0x0300) - hproc = _iodbcdm_getproc( hdbc, en_AllocHandle ); - - if( hproc ) - { - CALL_DRIVER( hdbc, retcode, hproc, en_AllocHandle, - (SQL_HANDLE_DBC, penv->dhenv, &(pdbc->dhdbc)) ) - } - else -#endif - { - hproc = _iodbcdm_getproc( hdbc, en_AllocConnect ); - - if( hproc == SQL_NULL_HPROC ) - { - sqlstat = en_IM005; - } - else - { - CALL_DRIVER ( hdbc, retcode, hproc, - en_AllocConnect, (penv->dhenv, &(pdbc->dhdbc)) ) - } - } - - if( retcode == SQL_ERROR ) - { - sqlstat = en_IM005; - } - - if( sqlstat != en_00000 ) - { - _iodbcdm_driverunload(hdbc); - - pdbc->dhdbc = SQL_NULL_HDBC; - PUSHSQLERR ( pdbc->herr, en_IM005 ); - - return SQL_ERROR; - } - } - - pdbc->henv = penv; - penv->refcount ++; /* bookkeeping reference count on this driver */ - } - - /* driver's login timeout option must been set before - * its SQLConnect() call */ - if( pdbc->login_timeout != 0UL ) - { - hproc = _iodbcdm_getproc( hdbc, en_SetConnectOption ); - - if( hproc == SQL_NULL_HPROC ) - { - sqlstat = en_IM004; - } - else - { - CALL_DRIVER ( hdbc, retcode, hproc, - en_SetConnectOption, ( - pdbc->dhdbc, - SQL_LOGIN_TIMEOUT, - pdbc->login_timeout ) ) - - if( retcode == SQL_ERROR ) - { - PUSHSQLERR ( pdbc->herr, en_IM006 ); - - return SQL_SUCCESS_WITH_INFO; - } - } - } - - return SQL_SUCCESS; -} - -RETCODE _iodbcdm_driverunload( HDBC hdbc ) -/* - Call driver's SQLFreeConnect() - * - Call driver's SQLFreeEnv() ( for the last reference only) - * - Unload the share library( or decrease its reference - * count if it is not the last referenct ) - * - decrease bookkeeping reference count - * - state transition to allocated - */ -{ - DBC_t FAR* pdbc = (DBC_t FAR*)hdbc; - ENV_t FAR* penv; - ENV_t FAR* tpenv; - GENV_t FAR* genv; - HPROC hproc; - RETCODE retcode = SQL_SUCCESS; -/* int sqlstat = en_00000; */ - - if( hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* no pointer check will be performed in this function */ - penv = (ENV_t FAR*)pdbc->henv; - genv = (GENV_t FAR*)pdbc->genv; - - if( penv == NULL - || penv->hdll == SQL_NULL_HDLL ) - { - return SQL_SUCCESS; - } - -#if (ODBCVER >= 0x0300) - hproc = _iodbcdm_getproc( hdbc, en_FreeHandle ); - - if( hproc ) - { - CALL_DRIVER ( hdbc, retcode, hproc, en_FreeHandle, - ( SQL_HANDLE_DBC, pdbc->dhdbc ) ) - } - else -#endif - { - hproc = _iodbcdm_getproc( hdbc, en_FreeConnect ); - - if( hproc != SQL_NULL_HPROC ) - { - CALL_DRIVER ( hdbc, retcode, hproc, - en_FreeConnect, ( pdbc->dhdbc ) ) - - pdbc->dhdbc = SQL_NULL_HDBC; - } - } - - penv->refcount --; - - if( ! penv->refcount ) - /* no other connections still attaching with this driver */ - { -#if (ODBCVER >= 0x0300) - hproc = _iodbcdm_getproc( hdbc, en_FreeHandle ); - - if( hproc ) - { - CALL_DRIVER ( hdbc, retcode, hproc, en_FreeHandle, - ( SQL_HANDLE_ENV, penv->dhenv ) ) - } - else -#endif - { - hproc = _iodbcdm_getproc( hdbc, en_FreeEnv ); - - if( hproc != SQL_NULL_HPROC ) - { - CALL_DRIVER ( hdbc, retcode, hproc, en_FreeEnv, - ( penv->dhenv ) ) - - penv->dhenv = SQL_NULL_HENV; - } - } - - _iodbcdm_dllclose ( penv->hdll ); - - penv->hdll = SQL_NULL_HDLL; - - for( tpenv = (ENV_t FAR*)genv->henv; - tpenv != NULL; - tpenv = (ENV_t FAR*)penv->next ) - { - if( tpenv == penv ) - { - genv->henv = penv->next; - break; - } - - if( tpenv->next == penv ) - { - tpenv->next = penv->next; - break; - } - } - - MEM_FREE( penv ); - } - - pdbc->henv = SQL_NULL_HENV; - pdbc->hstmt= SQL_NULL_HSTMT; - /* pdbc->herr = SQL_NULL_HERR; - -- delay to DM's SQLFreeConnect() */ - pdbc->dhdbc= SQL_NULL_HDBC; - pdbc->state= en_dbc_allocated; - - /* set connect options to default values */ - /********** - pdbc->access_mode = SQL_MODE_DEFAULT; - pdbc->autocommit = SQL_AUTOCOMMIT_DEFAULT; - pdbc->login_timeout = 0UL; - **********/ - pdbc->odbc_cursors = SQL_CUR_DEFAULT; - pdbc->packet_size = 0UL; - pdbc->quiet_mode = (UDWORD)NULL; - pdbc->txn_isolation = SQL_TXN_READ_UNCOMMITTED; - - if( pdbc->current_qualifier != NULL ) - { - MEM_FREE ( pdbc->current_qualifier ); - pdbc->current_qualifier = NULL; - } - - return SQL_SUCCESS; -} - -static RETCODE _iodbcdm_dbcdelayset( HDBC hdbc ) -{ - DBC_t FAR* pdbc = (DBC_t FAR*)hdbc; - ENV_t FAR* penv; - HPROC hproc; - RETCODE retcode = SQL_SUCCESS; - RETCODE ret; - - penv = pdbc->henv; - - hproc = _iodbcdm_getproc( hdbc, en_SetConnectOption ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pdbc->herr, en_IM006 ); - - return SQL_SUCCESS_WITH_INFO; - } - - if( pdbc->access_mode != SQL_MODE_DEFAULT ) - { - CALL_DRIVER ( hdbc, ret, hproc, - en_SetConnectOption, ( - SQL_ACCESS_MODE, - pdbc->access_mode) ) - - retcode |= ret; - } - - if( pdbc->autocommit != SQL_AUTOCOMMIT_DEFAULT ) - { - CALL_DRIVER ( hdbc, ret, hproc, - en_SetConnectOption, ( - pdbc->dhdbc, - SQL_AUTOCOMMIT, - pdbc->autocommit ) ) - - retcode |= ret; - } - - if( pdbc->current_qualifier != NULL ) - { - CALL_DRIVER ( hdbc, ret, hproc, - en_SetConnectOption, ( - pdbc->dhdbc, - SQL_CURRENT_QUALIFIER, - pdbc->current_qualifier ) ) - - retcode |= ret; - } - - if( pdbc->packet_size != 0UL ) - { - CALL_DRIVER ( hdbc, ret, hproc, - en_SetConnectOption, ( - pdbc->dhdbc, - SQL_PACKET_SIZE, - pdbc->packet_size ) ) - - retcode |= ret; - } - - if( pdbc->quiet_mode != (UDWORD)NULL ) - { - CALL_DRIVER ( hdbc, ret, hproc, - en_SetConnectOption, ( - pdbc->dhdbc, - SQL_QUIET_MODE, - pdbc->quiet_mode ) ) - - retcode |= ret; - } - - if( pdbc->txn_isolation != SQL_TXN_READ_UNCOMMITTED ) - { - CALL_DRIVER ( hdbc, ret, hproc, - en_SetConnectOption, ( - pdbc->dhdbc, - SQL_TXN_ISOLATION, - pdbc->txn_isolation ) ) - } - - /* check error code for driver's SQLSetConnectOption() call */ - if( retcode != SQL_SUCCESS - && retcode != SQL_SUCCESS_WITH_INFO ) - { - PUSHSQLERR ( pdbc->herr, en_IM006 ); - - retcode = SQL_ERROR; - } - - /* get cursor behavior on transaction commit or rollback */ - hproc = _iodbcdm_getproc( hdbc, en_GetInfo ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pdbc->herr, en_01000 ); - - return retcode; - } - - CALL_DRIVER ( hdbc, ret, hproc, - en_GetInfo, ( - pdbc->dhdbc, - SQL_CURSOR_COMMIT_BEHAVIOR, - (PTR)&(pdbc->cb_commit), - sizeof(pdbc->cb_commit), - NULL ) ) - - retcode |= ret; - - CALL_DRIVER ( hdbc, ret, hproc, - en_GetInfo, ( - pdbc->dhdbc, - SQL_CURSOR_ROLLBACK_BEHAVIOR, - (PTR)&(pdbc->cb_rollback), - sizeof(pdbc->cb_rollback), - NULL ) ) - - retcode |= ret; - - if( retcode != SQL_SUCCESS - && retcode != SQL_SUCCESS_WITH_INFO ) - { - return SQL_ERROR; - } - - return retcode; -} - -static RETCODE _iodbcdm_settracing( HDBC hdbc, char* dsn, int dsnlen ) -{ - char buf[256]; - char* ptr; - RETCODE setopterr = SQL_SUCCESS; - - /* Get Driver's DLL path from specificed or default dsn section */ - ptr = _iodbcdm_getkeyvalbydsn( dsn, dsnlen, "TraceFile", - (char FAR*)buf, sizeof(buf)); - - if( ptr == NULL || ptr[0] == '\0' ) - { - ptr = (char FAR*)(SQL_OPT_TRACE_FILE_DEFAULT); - } - - setopterr |= SQLSetConnectOption( hdbc, - SQL_OPT_TRACEFILE, (UDWORD)(ptr)); - - ptr = _iodbcdm_getkeyvalbydsn( dsn, dsnlen, "Trace", - (char FAR*)buf, sizeof(buf)); - - if( ptr != NULL ) - { - UDWORD opt = (UDWORD)(-1L); - - if( STREQ(ptr, "ON") - || STREQ(ptr, "On") - || STREQ(ptr, "on") - || STREQ(ptr, "1" ) ) - { - opt = SQL_OPT_TRACE_ON; - } - - if( STREQ(ptr, "OFF") - || STREQ(ptr, "Off") - || STREQ(ptr, "off") - || STREQ(ptr, "0" ) ) - { - opt = SQL_OPT_TRACE_OFF; - } - - if( opt != (UDWORD)(-1L) ) - { - setopterr |= SQLSetConnectOption( hdbc, - SQL_OPT_TRACE, opt); - } - } - - return setopterr; -} - -RETCODE SQL_API SQLConnect ( - HDBC hdbc, - UCHAR FAR* szDSN, - SWORD cbDSN, - UCHAR FAR* szUID, - SWORD cbUID, - UCHAR FAR* szAuthStr, - SWORD cbAuthStr) -{ - DBC_t FAR* pdbc = (DBC_t FAR*)hdbc; - RETCODE retcode = SQL_SUCCESS; - RETCODE setopterr = SQL_SUCCESS; - char driver[1024] = { '\0' }; /* MS SDK Guide - * specifies driver - * path can't longer - * than 255. */ - char *ptr; - HPROC hproc; - - if( hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check arguments */ - if( ( cbDSN < 0 && cbDSN != SQL_NTS ) - || ( cbUID < 0 && cbUID != SQL_NTS ) - || ( cbAuthStr < 0 && cbAuthStr != SQL_NTS ) - || ( cbDSN > SQL_MAX_DSN_LENGTH ) ) - { - PUSHSQLERR ( pdbc->herr, en_S1090 ); - - return SQL_ERROR; - } - - if( szDSN == NULL || cbDSN == 0 ) - { - PUSHSQLERR ( pdbc->herr, en_IM002 ); - - return SQL_ERROR; - } - - /* check state */ - if( pdbc->state != en_dbc_allocated ) - { - PUSHSQLERR ( pdbc->herr, en_08002 ); - - return SQL_ERROR; - } - - setopterr |= _iodbcdm_settracing( hdbc, - (char*)szDSN, cbDSN ); - - ptr = _iodbcdm_getkeyvalbydsn( szDSN, cbDSN, "Driver", - (char FAR*)driver, sizeof(driver)); - - if( ptr == NULL ) - /* No specified or default dsn section or - * no driver specification in this dsn section */ - { - PUSHSQLERR ( pdbc->herr, en_IM002 ); - - return SQL_ERROR; - } - - retcode = _iodbcdm_driverload( driver, hdbc ); - - switch( retcode ) - { - case SQL_SUCCESS: - break; - - case SQL_SUCCESS_WITH_INFO: - setopterr = SQL_ERROR; - /* unsuccessed in calling driver's - * SQLSetConnectOption() to set login - * timeout. - */ - break; - - default: - return retcode; - } - - hproc = _iodbcdm_getproc( hdbc, en_Connect ); - - if( hproc == SQL_NULL_HPROC ) - { - _iodbcdm_driverunload( hdbc ); - - PUSHSQLERR ( pdbc->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( hdbc, retcode, hproc, en_Connect, ( - pdbc->dhdbc, - szDSN, cbDSN, - szUID, cbUID, - szAuthStr, cbAuthStr ) ) - -#if 0 - retcode = hproc(pdbc->dhdbc, - szDSN, cbDSN, - szUID, cbUID, - szAuthStr, cbAuthStr ); -#endif - - if( retcode != SQL_SUCCESS - && retcode != SQL_SUCCESS_WITH_INFO ) - { - /* not unload driver for retrive error - * messge from driver */ - /********* - _iodbcdm_driverunload( hdbc ); - **********/ - - return retcode; - } - - /* state transition */ - pdbc->state = en_dbc_connected; - - /* do delaid option setting */ - setopterr |= _iodbcdm_dbcdelayset( hdbc ); - - if( setopterr != SQL_SUCCESS ) - { - return SQL_SUCCESS_WITH_INFO; - } - - return retcode; -} - -RETCODE SQL_API SQLDriverConnect ( - HDBC hdbc, - HWND hwnd, - UCHAR FAR* szConnStrIn, - SWORD cbConnStrIn, - UCHAR FAR* szConnStrOut, - SWORD cbConnStrOutMax, - SWORD FAR* pcbConnStrOut, - UWORD fDriverCompletion ) -{ - DBC_t FAR* pdbc = (DBC_t FAR*)hdbc; - HDLL hdll; - char FAR* drv; - char drvbuf[1024]; - char FAR* dsn; - char dsnbuf[SQL_MAX_DSN_LENGTH + 1]; - UCHAR cnstr2drv[1024]; - - HPROC hproc, dialproc; - - int sqlstat = en_00000; - RETCODE retcode = SQL_SUCCESS; - RETCODE setopterr = SQL_SUCCESS; - - if( hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check arguments */ - if( ( cbConnStrIn < 0 && cbConnStrIn != SQL_NTS ) - || cbConnStrOutMax < 0 ) - { - PUSHSQLERR (pdbc->herr, en_S1090 ); - - return SQL_ERROR; - } - - /* check state */ - if( pdbc->state != en_dbc_allocated ) - { - PUSHSQLERR (pdbc->herr, en_08002 ); - - return SQL_ERROR; - } - - drv = _iodbcdm_getkeyvalinstr(szConnStrIn, cbConnStrIn, - "DRIVER", drvbuf, sizeof(drvbuf)); - - dsn = _iodbcdm_getkeyvalinstr(szConnStrIn, cbConnStrIn, - "DSN", dsnbuf, sizeof(dsnbuf)); - - switch( fDriverCompletion ) - { - case SQL_DRIVER_NOPROMPT: - break; - - case SQL_DRIVER_COMPLETE: - case SQL_DRIVER_COMPLETE_REQUIRED: - if( dsn != NULL ) - { - break; - } - /* fall to next case */ - case SQL_DRIVER_PROMPT: - /* Get data source dialog box function from - * current executable */ - hdll = _iodbcdm_dllopen((char FAR*)NULL); - dialproc = _iodbcdm_dllproc( hdll, - "_iodbcdm_drvconn_dialbox"); - - if( dialproc == SQL_NULL_HPROC ) - { - sqlstat = en_IM008; - break; - } - - retcode = dialproc( - hwnd, /* window or display handle */ - dsnbuf, /* input/output dsn buf */ - sizeof(dsnbuf), /* buf size */ - &sqlstat); /* error code */ - - if( retcode != SQL_SUCCESS ) - { - break; - } - - if( cbConnStrIn == SQL_NTS ) - { - cbConnStrIn = STRLEN(szConnStrIn ); - } - - dsn = dsnbuf; - - if( dsn[0] == '\0' ) - { - dsn = "default"; - } - - if( cbConnStrIn > sizeof(cnstr2drv) - - STRLEN(dsn) - STRLEN("DSN=;") -1 ) - { - sqlstat = en_S1001; /* a lazy way to avoid - * using heap memory */ - break; - } - - sprintf( (char FAR *)cnstr2drv, "DSN=%s;", dsn); - cbConnStrIn += STRLEN(cnstr2drv); - STRNCAT( cnstr2drv, szConnStrIn, cbConnStrIn ); - szConnStrIn = cnstr2drv; - break; - - default: - sqlstat = en_S1110; - break; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR( pdbc->herr, sqlstat ); - - return SQL_ERROR; - } - - if( dsn == NULL || dsn[0] == '\0' ) - { - dsn = "default"; - } - else /* if you want tracing, you must use a DSN */ - { - setopterr |= _iodbcdm_settracing( hdbc, - (char*)dsn, SQL_NTS ); - } - - if( drv == NULL || drv[0] == '\0' ) - { - drv = _iodbcdm_getkeyvalbydsn( dsn, SQL_NTS, "Driver", - drvbuf, sizeof(drvbuf)); - } - - if( drv == NULL ) - { - PUSHSQLERR( pdbc->herr, en_IM002 ); - - return SQL_ERROR; - } - - retcode = _iodbcdm_driverload( drv, hdbc ); - - switch( retcode ) - { - case SQL_SUCCESS: - break; - - case SQL_SUCCESS_WITH_INFO: - setopterr = SQL_ERROR; - /* unsuccessed in calling driver's - * SQLSetConnectOption() to set login - * timeout. - */ - break; - - default: - return retcode; - } - - hproc = _iodbcdm_getproc( hdbc, en_DriverConnect ); - - if( hproc == SQL_NULL_HPROC ) - { - _iodbcdm_driverunload( hdbc ); - - PUSHSQLERR ( pdbc->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( hdbc, retcode, hproc, en_DriverConnect, ( - pdbc->dhdbc, hwnd, - szConnStrIn, cbConnStrIn, - szConnStrOut, cbConnStrOutMax, - pcbConnStrOut, fDriverCompletion ) ) - -#if 0 - retcode = hproc(pdbc->dhdbc, hwnd, - szConnStrIn, cbConnStrIn, - szConnStrOut, cbConnStrOutMax, - pcbConnStrOut, fDriverCompletion ); -#endif - - if( retcode != SQL_SUCCESS - && retcode != SQL_SUCCESS_WITH_INFO ) - { - /* don't unload driver here for retrive - * error message from driver */ - /******** - _iodbcdm_driverunload( hdbc ); - *********/ - - return retcode; - } - - /* state transition */ - pdbc->state = en_dbc_connected; - - /* do delaid option setting */ - setopterr |= _iodbcdm_dbcdelayset( hdbc ); - - if( setopterr != SQL_SUCCESS ) - { - return SQL_SUCCESS_WITH_INFO; - } - - return retcode; -} - -RETCODE SQL_API SQLBrowseConnect ( - HDBC hdbc, - HWND hwnd, - UCHAR FAR* szConnStrIn, - SWORD cbConnStrIn, - UCHAR FAR* szConnStrOut, - SWORD cbConnStrOutMax, - SWORD FAR* pcbConnStrOut ) -{ - DBC_t FAR* pdbc = (DBC_t FAR*)hdbc; -/* HDLL hdll; */ - char FAR* drv; - char drvbuf[1024]; - char FAR* dsn; - char dsnbuf[SQL_MAX_DSN_LENGTH + 1]; -/* UCHAR cnstr2drv[1024]; */ - - HPROC hproc /*, dialproc*/ ; - -/* int sqlstat = en_00000; */ - RETCODE retcode = SQL_SUCCESS; - RETCODE setopterr = SQL_SUCCESS; - - if( hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check arguments */ - if( ( cbConnStrIn < 0 && cbConnStrIn != SQL_NTS ) - || cbConnStrOutMax < 0 ) - { - PUSHSQLERR (pdbc->herr, en_S1090 ); - - return SQL_ERROR; - } - - if( pdbc->state == en_dbc_allocated ) - { - drv = _iodbcdm_getkeyvalinstr(szConnStrIn, cbConnStrIn, - "DRIVER", drvbuf, sizeof(drvbuf)); - - dsn = _iodbcdm_getkeyvalinstr(szConnStrIn, cbConnStrIn, - "DSN", dsnbuf, sizeof(dsnbuf)); - - if( dsn == NULL || dsn[0] == '\0' ) - { - dsn = "default"; - } - else /* if you want tracing, you must use a DSN */ - { - setopterr |= _iodbcdm_settracing( hdbc, - (char*)dsn, SQL_NTS ); - } - - if( drv == NULL || drv[0] == '\0' ) - { - drv = _iodbcdm_getkeyvalbydsn( dsn, SQL_NTS, "Driver", - drvbuf, sizeof(drvbuf)); - } - - if( drv == NULL ) - { - PUSHSQLERR( pdbc->herr, en_IM002 ); - - return SQL_ERROR; - } - - retcode = _iodbcdm_driverload( drv, hdbc ); - - switch( retcode ) - { - case SQL_SUCCESS: - break; - - case SQL_SUCCESS_WITH_INFO: - setopterr = SQL_ERROR; - /* unsuccessed in calling driver's - * SQLSetConnectOption() to set login - * timeout. - */ - break; - - default: - return retcode; - } - } - else if( pdbc->state != en_dbc_needdata ) - { - PUSHSQLERR ( pdbc->herr, en_08002 ); - - return SQL_ERROR; - } - - hproc = _iodbcdm_getproc( hdbc, en_BrowseConnect); - - if( hproc == SQL_NULL_HPROC ) - { - _iodbcdm_driverunload( hdbc ); - - pdbc->state = en_dbc_allocated; - - PUSHSQLERR( pdbc->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( hdbc, retcode, hproc, en_BrowseConnect, ( - pdbc->dhdbc, hwnd, - szConnStrIn, cbConnStrIn, - szConnStrOut, cbConnStrOutMax, - pcbConnStrOut ) ) - -#if 0 - retcode = hproc(pdbc->dhdbc, hwnd, - szConnStrIn, cbConnStrIn, - szConnStrOut, cbConnStrOutMax, - pcbConnStrOut ); -#endif - - switch( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - pdbc->state = en_dbc_connected; - setopterr |= _iodbcdm_dbcdelayset( hdbc ); - if( setopterr != SQL_SUCCESS ) - { - retcode = SQL_SUCCESS_WITH_INFO; - } - break; - - case SQL_NEED_DATA: - pdbc->state = en_dbc_needdata; - break; - - case SQL_ERROR: - pdbc->state = en_dbc_allocated; - /* but the driver will not unloaded - * to allow application retrive err - * message from driver - */ - break; - - default: - break; - } - - return retcode; -} - -RETCODE SQL_API SQLDisconnect ( HDBC hdbc ) -{ - DBC_t FAR* pdbc = (DBC_t*)hdbc; - STMT_t FAR* pstmt; - RETCODE retcode; - HPROC hproc; - - int sqlstat = en_00000; - - if( hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check hdbc state */ - if ( pdbc->state == en_dbc_allocated ) - { - sqlstat = en_08003; - } - - /* check stmt(s) state */ - for( pstmt = (STMT_t FAR*)pdbc->hstmt; - pstmt != NULL && sqlstat == en_00000; - pstmt = (STMT_t FAR*)pstmt->next ) - { - if( pstmt->state >= en_stmt_needdata - || pstmt->asyn_on != en_NullProc ) - /* In this case one need to call - * SQLCancel() first */ - { - sqlstat = en_S1010; - } - } - - if( sqlstat == en_00000 ) - { - hproc = _iodbcdm_getproc( hdbc, en_Disconnect ); - - if( hproc == SQL_NULL_HPROC ) - { - sqlstat = en_IM001; - } - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pdbc->herr, sqlstat ); - - return SQL_ERROR; - } - - CALL_DRIVER ( hdbc, retcode, hproc, en_Disconnect, ( - pdbc->dhdbc ) ) - -#if 0 - retcode = hproc( pdbc->dhdbc ); -#endif - - if( retcode == SQL_SUCCESS - || retcode == SQL_SUCCESS_WITH_INFO ) - { - /* diff from MS specs. We disallow - * driver SQLDisconnect() return - * SQL_SUCCESS_WITH_INFO and post - * error message. - */ - retcode = SQL_SUCCESS; - } - else - { - return retcode; - } - - /* free all statement handle(s) on this connection */ - for(;pdbc->hstmt;) - { - _iodbcdm_dropstmt( pdbc->hstmt ); - } - -#if 0 - retcode = _iodbcdm_driverunload( hdbc ); -#endif - - /* state transition */ - if( retcode == SQL_SUCCESS ) - { - pdbc->state = en_dbc_allocated; - } - - return retcode; -} - -RETCODE SQL_API SQLNativeSql( - HDBC hdbc, - UCHAR FAR* szSqlStrIn, - SDWORD cbSqlStrIn, - UCHAR FAR* szSqlStr, - SDWORD cbSqlStrMax, - SDWORD FAR* pcbSqlStr ) -{ - DBC_t FAR* pdbc = (DBC_t FAR*)hdbc; - HPROC hproc; - int sqlstat = en_00000; - RETCODE retcode; - - if( hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check argument */ - if( szSqlStrIn == NULL ) - { - sqlstat = en_S1009; - } - else if( cbSqlStrIn < 0 - && cbSqlStrIn != SQL_NTS ) - { - sqlstat = en_S1090; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pdbc->herr, sqlstat ); - - return SQL_ERROR; - } - - /* check state */ - if( pdbc->state <= en_dbc_needdata ) - { - PUSHSQLERR ( pdbc->herr, en_08003 ); - - return SQL_ERROR; - } - - /* call driver */ - hproc = _iodbcdm_getproc( hdbc, en_NativeSql ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pdbc->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( hdbc, retcode, hproc, en_NativeSql, ( - pdbc->dhdbc, - szSqlStrIn, - cbSqlStrIn, - szSqlStr, - cbSqlStrMax, - pcbSqlStr ) ) - -#if 0 - retcode = hproc(pdbc->dhdbc, - szSqlStrIn, - cbSqlStrIn, - szSqlStr, - cbSqlStrMax, - pcbSqlStr ); -#endif - - return retcode; -} diff --git a/src/iodbc/dlf.c b/src/iodbc/dlf.c deleted file mode 100644 index 5745f8f07e..0000000000 --- a/src/iodbc/dlf.c +++ /dev/null @@ -1,595 +0,0 @@ -/** dynamic library loader (mapping to svr4) - - Copyright (C) 1995 by Ke Jin - - This program 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. -**/ - -#include "wx/setup.h" - -#include <../iodbc/dlf.h> -#include - -#ifdef DLDAPI_DEFINED -# undef DLDAPI_DEFINED -#endif - -#ifdef DLDAPI_SVR4_DLFCN -# define DLDAPI_DEFINED -static char sccsid[] = "@(#)dynamic load interface -- SVR4 dlfcn"; -#endif - -/********************************* - * - * HP/UX - * - *********************************/ -#ifdef DLDAPI_HP_SHL -# define DLDAPI_DEFINED -# include - -static char sccsid[] = "@(#)dynamic load interface -- HP/UX dl(shl)"; - -void* dlopen(char* path, int mode) -{ - return (void*)shl_load((char*)(path), BIND_DEFERRED, 0L); -} - -void* dlsym(void* hdll, char* sym) -{ - void* symaddr = 0; - int ret; - - if( ! hdll ) - hdll = (void*)PROG_HANDLE; - - /* Remember, a driver may export calls as function pointers - * (i.e. with type TYPE_DATA) rather than as functions - * (i.e. with type TYPE_PROCEDURE). Thus, to be safe, we - * uses TYPE_UNDEFINED to cover all of them. - */ - ret = shl_findsym((shl_t*)&hdll, sym, TYPE_UNDEFINED, &symaddr); - - if( ret == -1 ) - return 0; - - return symaddr; -} - -char* dlerror() -{ - extern char* strerror(); - - return strerror(errno); -} - -int dlclose(void* hdll) -{ - return shl_unload((shl_t)hdll); -} - -#endif /* end of HP/UX Seection */ - -/********************************* - * - * IBM AIX - * - *********************************/ -#ifdef DLDAPI_AIX_LOAD -# define DLDAPI_DEFINED -# include -# include -# include -# include - -/* - * Following id sting is a copyright mark. Removing(i.e. use the - * source code in this .c file without include it or make it not - * appear in the final object file of AIX platform) or modifing - * it without permission from original author(kejin@empress.com) - * are copyright violation. - */ -static char sccsid[] - = "@(#)dynamic load interface, Copyright(c) 1995 by Ke Jin"; - -# ifndef HTAB_SIZE -# define HTAB_SIZE 256 -# endif - -# define FACTOR 0.618039887 /* i.e. (sqrt(5) - 1)/2 */ - -# ifndef ENTRY_SYM -# define ENTRY_SYM ".__start" /* default entry point for aix */ -# endif - -typedef struct slot_s -{ - char* sym; - long fdesc[3]; /* 12 bytes function descriptor */ - struct slot_s* next; -} slot_t; - -/* Note: on AIX, a function pointer actually points to a - * function descriptor, a 12 bytes data. The first 4 bytes - * is the virtual address of the function. The next 4 bytes - * is the virtual address of TOC (Table of Contents) of the - * object module the function belong to. The last 4 bytes - * are always 0 for C and Fortran functions. Every object - * module has an entry point (which can be specified at link - * time by -e ld option). iODBC driver manager requires ODBC - * driver shared library always use the default entry point - * (so you shouldn't use -e ld option when creating a driver - * share library). load() returns the function descriptor of - * a module's entry point. From which we can calculate function - * descriptors of other functions in the same module by using - * the fact that the load() doesn't change the relative - * offset of functions to their module entry point(i.e the - * offset in memory loaded by load() will be as same as in - * the module library file). - */ - -typedef slot_t* hent_t; -typedef struct nlist nlist_t; -typedef struct stat stat_t; - -typedef struct obj -{ - int dev; /* device id */ - int ino; /* inode number */ - char* path; /* file name */ - int (*pentry)(); /* entry point of this share library */ - int refn; /* number of reference */ - hent_t htab[HTAB_SIZE]; - struct obj* - next; -} obj_t; - -static char* errmsg = 0; - -static void init_htab(hent_t* ht) -/* initate a hashing table */ -{ - int i; - - for(i=0; inext; - - free(ent->sym); - free(ent); - - ent = tent; - } - - ht[i] = 0; - } - - return; -} - -static int hash(char* sym ) -{ - int a, key; - double f; - - if( !sym || !*sym ) - return 0; - - for(key=*sym;*sym;sym++) - { - key += *sym; - a = key; - - key = (int)( (a<<8) + (key>>8) ); - key = (key>0)? key:-key; - } - - f = key*FACTOR; - a = (int)f; - - return (int)((HTAB_SIZE - 1)*( f - a )); -} - -static hent_t search(hent_t* htab, char* sym) -/* search hashing table to find a matched slot */ -{ - int key; - slot_t* ent; - - key = hash(sym); - - for(ent = htab[key]; ent; ent = ent->next ) - { - if(!strcmp(ent->sym, sym)) - return ent; - } - - return 0; /* no match */ -} - -static void insert(hent_t* htab, slot_t* ent) -/* insert a new slot to hashing table */ -{ - int key; - - key = hash(ent->sym); - - ent->next = htab[key]; - htab[key] = ent; - - return; -} - -static slot_t* slot_alloc(char* sym) -/* allocate a new slot with symbol */ -{ - slot_t* ent; - - ent = (slot_t*)malloc(sizeof(slot_t)); - - ent->sym = (char*)malloc(strlen(sym)+1); - - if( ! ent->sym ) - { - free(ent); - return 0; - } - - strcpy( ent->sym, sym ); - - return ent; -} - -static obj_t* obj_list = 0; - -void* dlopen(char* file, int mode ) -{ - stat_t st; - obj_t* pobj; - char buf[1024]; - - if( ! file || ! *file ) - { - errno = EINVAL; - return 0; - } - - errno = 0; - errmsg = 0; - -#if 0 - if( file[0] != '/' && file[0] != '.' ) - { - for(;;) - { - sprintf(buf, "/lib/%s", file); - - if( stat( buf, &st ) ) - { - file = buf; - break; - } - - sprintf(buf, "/usr/lib/%s", file); - - if( stat( buf, &st ) ) - { - file = buf; - break; - } - - if( stat( file, &st ) ) - break; - - return 0; - } - } - else -#endif - if( stat( file, &st ) ) - return 0; - - for( pobj = obj_list; pobj; pobj = pobj->next ) - /* find a match object */ - { - if( pobj->ino == st.st_ino - && pobj->dev == st.st_dev ) - { - /* found a match. increase its - * reference count and return - * its address */ - pobj->refn ++; - return pobj; - } - } - - pobj = (obj_t*)malloc( sizeof(obj_t) ); - - if( ! pobj ) - return 0; - - pobj->path = (char*)malloc( strlen(file) + 1); - - if( ! pobj->path ) - { - free( pobj ); - return 0; - } - - strcpy( pobj->path, file ); - - pobj->dev = st.st_dev; - pobj->ino = st.st_ino; - pobj->refn = 1; - - pobj->pentry = (int(*)())load(file, 0, 0); - - if( ! pobj->pentry ) - { - free( pobj->path ); - free( pobj ); - return 0; - } - - init_htab(pobj->htab); - - pobj->next = obj_list; - obj_list = pobj; - - return pobj; -} - -int dlclose(void* hobj) -{ - obj_t* pobj = (obj_t*)hobj; - obj_t* tpobj; - int match = 0; - - if( ! hobj ) - { - errno = EINVAL; - return -1; - } - - errno = 0; - errmsg = 0; - - if( pobj == obj_list ) - { - pobj->refn --; - - if( pobj->refn ) - return 0; - - match = 1; - obj_list = pobj->next; - } - - for( tpobj = obj_list; !match && tpobj; tpobj = tpobj->next ) - { - if( tpobj->next == pobj ) - { - pobj->refn --; - - if( pobj->refn ) - return 0; - - match = 1; - tpobj->next = pobj->next; - } - } - - if(match) - { - unload((void*)(pobj->pentry)); - clean_htab(pobj->htab); - free(pobj->path); - free(pobj); - } - - return 0; -} - -char* dlerror() -{ - extern char* sys_errlist[]; - - if( ! errmsg || ! errmsg[0] ) - { - if( errno >= 0 ) - return sys_errlist[errno]; - - return ""; - } - - return errmsg; -} - -void* dlsym(void* hdl, char* sym) -{ - nlist_t nl[3]; - obj_t* pobj = (obj_t*)hdl; - slot_t* ent; - int (*fp)(); - long lbuf[3]; - - if( !hdl || !(pobj->htab) || !sym || ! *sym ) - { - errno = EINVAL; - return 0; - } - - errno = 0; - errmsg = 0; - - ent = search( pobj->htab, sym ); - - if( ent ) - return ent->fdesc; - -#define n_name _n._n_name - - nl[0].n_name = ENTRY_SYM; - nl[1].n_name = sym; - nl[2].n_name = 0; - - /* There is a potential problem here. If application - * did not pass a full path name, and changed the - * working directory after the load(), then nlist() - * will be unable to open the original shared library - * file to resolve the symbols. there are 3 ways to working - * round this: 1. convert to full pathname in driver - * manager. 2. applications always pass driver's full - * path name. 3. if driver itself don't support - * SQLGetFunctions(), call it with SQL_ALL_FUNCTIONS - * as flag immidately after SQLConnect(), SQLDriverConnect() - * and SQLBrowseConnect() to force the driver manager - * resolving all will be used symbols. - */ - if( nlist( pobj->path, nl) == -1 ) - return 0; - - if( ! nl[0].n_type && ! nl[0].n_value ) - { - errmsg = "can't locate module entry symbol"; - return 0; - } - - /* Note: On AIX 3.x if the object library is not - * built with -g compiling option, .n_type field - * is always 0. While on 4.x it will be 32. - * On AIX 4.x, if the symbol is a entry point, - * n_value will be 0. However, one thing is for sure - * that if a symbol is not existance in the file, - * both .n_type and .n_value would be 0. - */ - - if( ! nl[1].n_type && ! nl[1].n_value ) - { - errmsg = "symbol not existance in this module"; - return 0; - } - - ent = slot_alloc(sym); - - if( ! ent ) - return 0; - - /* catch it with a slot in the hashing table */ - insert(pobj->htab, ent); - - memcpy(ent->fdesc, pobj->pentry, sizeof(ent->fdesc)); - - /* now ent->fdesc[0] is the virtual address of entry point - * and ent->fdesc[1] is the TOC of the module - */ - - /* let's calculate the virtual address of the symbol - * by adding a relative offset getting from the module - * file symbol table, i.e - * - * functin virtual address = entry point virtual address + - * + ( function offset in file - entry point offset in file ) - */ - - (ent->fdesc)[0] = (ent->fdesc)[0] + - ( nl[1].n_value - nl[0].n_value ); - - /* return the function descriptor */ - return ent->fdesc; -} - -#endif /* end of IBM AIX Section */ - - -/********************************* - * - * Windows 3.x, 95, NT - * - *********************************/ -#ifdef DLDAPI_WINDOWS -# define DLDAPI_DEFINED -# include - -void FAR* dlopen(char FAR* dll, int mode) -{ - HINSTANCE hint; - - if( dll == NULL ) - { - return GetWindowWord( NULL, GWW_HINSTANCE ); - } - - hint = LoadLibrary(dll); - - if( hint < HINSTANCE_ERROR ) - { - return NULL; - } - - return (void FAR*)hint; -} - -void FAR* dlsym( void FAR* hdll, char FAR* sym ) -{ - return (void FAR*)GetProcAddress(hdll, sym); -} - -char FAR* dlerror() -{ - return 0L; /* unimplemented yet */ -} - -int dlclose(void FAR* hdll) -{ - FreeLibrary((HINSTANCE)hdll); -} - -#endif /* end of Windows family */ - -/*********************************** - * - * other platforms - * - ***********************************/ -#ifdef DLDAPI_OS2 -# define DLDAPI_DEFINED -/* - * DosLoadModule(), DosQueryProcAddress(), DosFreeModule(), ... - */ -#endif - -#ifdef DLDAPI_MAC -# define DLDAPI_DEFINED -#endif - -#ifdef DLDAPI_NEXT -# define DLDAPI_DEFINED -#endif - -#ifndef DLDAPI_DEFINED -# error "dynamic load editor undefined" -#endif diff --git a/src/iodbc/dlf.h b/src/iodbc/dlf.h deleted file mode 100644 index 185b478c07..0000000000 --- a/src/iodbc/dlf.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _DLF_H -# define _DLF_H - -#define DLDAPI_SVR4_DLFCN - -#ifdef __HPUX__ -#define DLDAPI_HP_SHL -#endif - -#ifdef __AIX__ -#define DLDAPI_AIX_LOAD -#endif - -# include <../iodbc/config.h> -# include <../iodbc/windows.h> - -# ifdef DLDAPI_SVR4_DLFCN -# include -# else - extern void FAR* dlopen(char FAR* path, int mode); - extern void FAR* dlsym(void FAR* hdll, char FAR* sym); - extern char FAR* dlerror(); - extern int dlclose(void FAR* hdll); -# endif - -# ifndef RTLD_LAZY -# define RTLD_LAZY 1 -# endif - -# define DLL_OPEN(dll) (void*)dlopen((char*)(path), RTLD_LAZY) -# define DLL_PROC(hdll, sym) (void*)dlsym((void*)(hdll), (char*)sym) -# define DLL_ERROR() (char*)dlerror() -# define DLL_CLOSE(hdll) dlclose((void*)(hdll)) - -#endif diff --git a/src/iodbc/dlproc.c b/src/iodbc/dlproc.c deleted file mode 100644 index db23fa2562..0000000000 --- a/src/iodbc/dlproc.c +++ /dev/null @@ -1,99 +0,0 @@ -/** Load driver and resolve driver's function entry point - - Copyright (C) 1995 by Ke Jin - - This program 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. -**/ - -#include <../iodbc/iodbc.h> - -#include <../iodbc/isql.h> -#include <../iodbc/isqlext.h> - -#include <../iodbc/dlproc.h> - -#include <../iodbc/herr.h> -#include <../iodbc/henv.h> -#include <../iodbc/hdbc.h> - -#include <../iodbc/itrace.h> - -#include "../iodbc/henv.ci" - -HPROC _iodbcdm_getproc( HDBC hdbc, int idx ) -{ - DBC_t FAR* pdbc = (DBC_t FAR*)hdbc; - ENV_t FAR* penv; -/* HDLL hdll; */ - HPROC FAR* phproc; - - if( idx <= 0 || idx > SQL_EXT_API_LAST ) - /* first entry naver used */ - { - return SQL_NULL_HPROC; - } - - penv = (ENV_t FAR*)(pdbc->henv); - - if( penv == NULL ) - { - return SQL_NULL_HPROC; - } - - phproc = penv->dllproc_tab + idx; - - if( *phproc == SQL_NULL_HPROC ) - { - int i, en_idx; - - for( i=0 ; ; i++ ) - { - en_idx = odbcapi_symtab[i].en_idx; - - if( en_idx == en_NullProc ) - { - break; - } - - if( en_idx == idx ) - { - *phproc = _iodbcdm_dllproc( penv->hdll, - odbcapi_symtab[i].symbol ); - - break; - } - } - } - - return *phproc; -} - -HDLL _iodbcdm_dllopen( char FAR* path ) -{ - return (HDLL)DLL_OPEN( path ); -} - -HPROC _iodbcdm_dllproc( HDLL hdll, char FAR* sym ) -{ - return (HPROC)DLL_PROC( hdll, sym ); -} - -int _iodbcdm_dllclose( HDLL hdll ) -{ - DLL_CLOSE( hdll ); - - return 0; -} - -char* _iodbcdm_dllerror( ) -{ - return DLL_ERROR(); -} diff --git a/src/iodbc/dlproc.h b/src/iodbc/dlproc.h deleted file mode 100644 index 127b0d4c64..0000000000 --- a/src/iodbc/dlproc.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef _DLPROC_H -# define _DLPROC_H - -# include <../iodbc/dlf.h> - - typedef RETCODE (FAR* HPROC)(); - -# ifdef DLDAPI_SVR4_DLFCN -# include - typedef void* HDLL; -# endif - -# ifdef DLDAPI_HP_SHL -# include - typedef shl_t HDLL; -# endif - -# ifdef DLDAPI_AIX_LOAD - typedef void* HDLL; -# endif - -extern HPROC _iodbcdm_getproc(); -extern HDLL _iodbcdm_dllopen(char FAR* dll); -extern HPROC _iodbcdm_dllproc(HDLL hdll, char FAR* sym); -extern char FAR* _iodbcdm_dllerror(); -extern int _iodbcdm_dllclose(HDLL hdll); - -#define SQL_NULL_HDLL ((HDLL)NULL) -#define SQL_NULL_HPROC ((HPROC)NULL) - -#endif diff --git a/src/iodbc/execute.c b/src/iodbc/execute.c deleted file mode 100644 index eb2633a6ed..0000000000 --- a/src/iodbc/execute.c +++ /dev/null @@ -1,789 +0,0 @@ -/** Invoke a query - - Copyright (C) 1995 by Ke Jin - - This program 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. -**/ - -#include <../iodbc/iodbc.h> - -#include <../iodbc/isql.h> -#include <../iodbc/isqlext.h> - -#include <../iodbc/dlproc.h> - -#include <../iodbc/herr.h> -#include <../iodbc/henv.h> -#include <../iodbc/hdbc.h> -#include <../iodbc/hstmt.h> - -#include <../iodbc/itrace.h> - -static void do_cursoropen(STMT_t FAR* pstmt) -{ - RETCODE retcode; - SWORD ncol; - - pstmt->state = en_stmt_executed; - - retcode = SQLNumResultCols( pstmt, &ncol ); - - if( retcode == SQL_SUCCESS - || retcode == SQL_SUCCESS_WITH_INFO ) - { - if( ncol ) - { - pstmt->state = en_stmt_cursoropen; - pstmt->cursor_state = en_stmt_cursor_opened; - } - else - { - pstmt->state = en_stmt_executed; - pstmt->cursor_state = en_stmt_cursor_no; - } - } -} - -RETCODE SQL_API SQLExecute ( HSTMT hstmt ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc = SQL_NULL_HPROC; - RETCODE retcode; - - int sqlstat = en_00000; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check state */ - if( pstmt->asyn_on == en_NullProc ) - { - switch( pstmt->state ) - { - case en_stmt_allocated: - sqlstat = en_S1010; - break; - - case en_stmt_executed: - if( ! pstmt->prep_state ) - { - sqlstat = en_S1010; - } - break; - - case en_stmt_cursoropen: - if( ! pstmt->prep_state ) - { - sqlstat = en_S1010; - } - break; - - case en_stmt_fetched: - case en_stmt_xfetched: - if( ! pstmt->prep_state ) - { - sqlstat = en_S1010; - } - else - { - sqlstat = en_24000; - } - break; - - case en_stmt_needdata: - case en_stmt_mustput: - case en_stmt_canput: - sqlstat = en_S1010; - break; - - default: - break; - } - } - else if( pstmt->asyn_on != en_Execute ) - { - sqlstat = en_S1010; - } - - if( sqlstat == en_00000 ) - { - hproc = _iodbcdm_getproc( pstmt->hdbc, en_Execute ); - - if( hproc == SQL_NULL_HPROC ) - { - sqlstat = en_IM001; - } - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, - en_Execute, ( pstmt->dhstmt ) ) - -#if 0 - retcode = hproc ( pstmt->dhstmt ); -#endif - - /* stmt state transition */ - if( pstmt->asyn_on == en_Execute ) - { - switch ( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - case SQL_NEED_DATA: - case SQL_ERROR: - pstmt->asyn_on = en_NullProc; - break; - - case SQL_STILL_EXECUTING: - default: - return retcode; - } - } - - switch( pstmt->state ) - { - case en_stmt_prepared: - switch( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - do_cursoropen(hstmt); - break; - - case SQL_NEED_DATA: - pstmt->state = en_stmt_needdata; - pstmt->need_on = en_Execute; - break; - - case SQL_STILL_EXECUTING: - pstmt->asyn_on = en_Execute; - break; - - default: - break; - } - break; - - case en_stmt_executed: - switch( retcode ) - { - case SQL_ERROR: - pstmt->state = en_stmt_allocated; - pstmt->cursor_state = en_stmt_cursor_no; - pstmt->prep_state = 0; - break; - - case SQL_NEED_DATA: - pstmt->state = en_stmt_needdata; - pstmt->need_on = en_Execute; - break; - - case SQL_STILL_EXECUTING: - pstmt->asyn_on = en_Execute; - break; - - default: - break; - } - break; - - default: - break; - } - - return retcode; -} - -RETCODE SQL_API SQLExecDirect ( - HSTMT hstmt, - UCHAR FAR* szSqlStr, - SDWORD cbSqlStr ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc = SQL_NULL_HPROC; - - int sqlstat = en_00000; - RETCODE retcode = SQL_SUCCESS; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check arguments */ - if( szSqlStr == NULL ) - { - sqlstat = en_S1009; - } - else if( cbSqlStr < 0 && cbSqlStr != SQL_NTS ) - { - sqlstat = en_S1090; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - /* check state */ - if( pstmt->asyn_on == en_NullProc ) - { - switch ( pstmt->state ) - { - case en_stmt_fetched: - case en_stmt_xfetched: - sqlstat = en_24000; - break; - - case en_stmt_needdata: - case en_stmt_mustput: - case en_stmt_canput: - sqlstat = en_S1010; - break; - - default: - break; - } - } - else if( pstmt->asyn_on != en_ExecDirect ) - { - sqlstat = en_S1010; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - hproc = _iodbcdm_getproc( pstmt->hdbc, en_ExecDirect); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_ExecDirect, ( - pstmt->dhstmt, szSqlStr, cbSqlStr) ) - - -#if 0 - retcode = hproc ( pstmt->dhstmt, szSqlStr, cbSqlStr ); -#endif - - /* stmt state transition */ - if( pstmt->asyn_on == en_ExecDirect ) - { - switch ( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - case SQL_NEED_DATA: - case SQL_ERROR: - pstmt->asyn_on = en_NullProc; - break; - - case SQL_STILL_EXECUTING: - default: - return retcode; - } - } - - if( pstmt->state <= en_stmt_executed ) - { - switch( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - do_cursoropen(hstmt); - break; - - case SQL_NEED_DATA: - pstmt->state = en_stmt_needdata; - pstmt->need_on = en_ExecDirect; - break; - - case SQL_STILL_EXECUTING: - pstmt->asyn_on = en_ExecDirect; - break; - - case SQL_ERROR: - pstmt->state = en_stmt_allocated; - pstmt->cursor_state = en_stmt_cursor_no; - pstmt->prep_state = 0; - break; - - default: - break; - } - } - - return retcode; -} - -RETCODE SQL_API SQLPutData( - HSTMT hstmt, - PTR rgbValue, - SDWORD cbValue ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc; - RETCODE retcode; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check argument value */ - if( rgbValue == NULL - && ( cbValue != SQL_DEFAULT_PARAM - && cbValue != SQL_NULL_DATA ) ) - { - PUSHSQLERR ( pstmt->herr, en_S1009 ); - - return SQL_ERROR; - } - - /* check state */ - if( pstmt->asyn_on == en_NullProc ) - { - if( pstmt->state <= en_stmt_xfetched ) - { - PUSHSQLERR( pstmt->herr, en_S1010 ); - - return SQL_ERROR; - } - } - else if( pstmt->asyn_on != en_PutData ) - { - PUSHSQLERR ( pstmt->herr, en_S1010 ); - - return SQL_ERROR; - } - - /* call driver */ - hproc = _iodbcdm_getproc( pstmt->hdbc, en_PutData ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_PutData, ( - pstmt->dhstmt, rgbValue, cbValue ) ) - -#if 0 - retcode = hproc(pstmt->dhstmt, rgbValue, cbValue ); -#endif - - /* state transition */ - if( pstmt->asyn_on == en_PutData ) - { - switch( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - case SQL_ERROR: - pstmt->asyn_on = en_NullProc; - break; - - case SQL_STILL_EXECUTING: - default: - return retcode; - } - } - - /* must in mustput or canput states */ - switch( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - pstmt->state = en_stmt_canput; - break; - - case SQL_ERROR: - switch( pstmt->need_on ) - { - case en_ExecDirect: - pstmt->state = en_stmt_allocated; - pstmt->need_on = en_NullProc; - break; - - case en_Execute: - if( pstmt->prep_state ) - { - pstmt->state = en_stmt_prepared; - pstmt->need_on = en_NullProc; - } - break; - - case en_SetPos: - /* Is this possible ???? */ - pstmt->state = en_stmt_xfetched; - break; - - default: - break; - } - break; - - case SQL_STILL_EXECUTING: - pstmt->asyn_on = en_PutData; - break; - - default: - break; - } - - return retcode; -} - -RETCODE SQL_API SQLParamData ( - HSTMT hstmt, - PTR FAR* prgbValue ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc; - RETCODE retcode; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check argument */ - - /* check state */ - if( pstmt->asyn_on == en_NullProc ) - { - if( pstmt->state <= en_stmt_xfetched ) - { - PUSHSQLERR ( pstmt->herr, en_S1010 ); - - return SQL_ERROR; - } - } - else if( pstmt->asyn_on != en_ParamData ) - { - PUSHSQLERR ( pstmt->herr, en_S1010 ); - - return SQL_ERROR; - } - - /* call driver */ - hproc = _iodbcdm_getproc( pstmt->hdbc, en_ParamData ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_ParamData, ( - pstmt->dhstmt, prgbValue ) ) - -#if 0 - retcode = hproc ( pstmt->dhstmt, prgbValue ); -#endif - - /* state transition */ - if( pstmt->asyn_on == en_ParamData ) - { - switch( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - case SQL_ERROR: - pstmt->asyn_on = en_NullProc; - break; - - case SQL_STILL_EXECUTING: - default: - return retcode; - } - } - - if( pstmt->state < en_stmt_needdata ) - { - return retcode; - } - - switch( retcode ) - { - case SQL_ERROR: - switch( pstmt->need_on ) - { - case en_ExecDirect: - pstmt->state = en_stmt_allocated; - break; - - case en_Execute: - pstmt->state = en_stmt_prepared; - break; - - case en_SetPos: - pstmt->state = en_stmt_xfetched; - pstmt->cursor_state - = en_stmt_cursor_xfetched; - break; - - default: - break; - } - pstmt->need_on = en_NullProc; - break; - - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - switch( pstmt->state ) - { - case en_stmt_needdata: - pstmt->state = en_stmt_mustput; - break; - - case en_stmt_canput: - switch( pstmt->need_on ) - { - case en_SetPos: - pstmt->state - = en_stmt_xfetched; - pstmt->cursor_state - = en_stmt_cursor_xfetched; - break; - - case en_ExecDirect: - case en_Execute: - do_cursoropen(hstmt); - break; - - default: - break; - } - break; - - default: - break; - } - pstmt->need_on = en_NullProc; - break; - - case SQL_NEED_DATA: - pstmt->state = en_stmt_mustput; - break; - - default: - break; - } - - return retcode; -} - - -RETCODE SQL_API SQLNumParams ( - HSTMT hstmt, - SWORD FAR* pcpar ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc; - RETCODE retcode; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check argument */ - - /* check state */ - if( pstmt->asyn_on == en_NullProc ) - { - switch( pstmt->state ) - { - case en_stmt_allocated: - case en_stmt_needdata: - case en_stmt_mustput: - case en_stmt_canput: - PUSHSQLERR ( pstmt->herr, en_S1010 ); - return SQL_ERROR; - - default: - break; - } - } - else if( pstmt->asyn_on != en_NumParams ) - { - PUSHSQLERR ( pstmt->herr, en_S1010 ); - - return SQL_ERROR; - } - - /* call driver */ - hproc = _iodbcdm_getproc ( pstmt->hdbc, en_NumParams ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_NumParams, ( - pstmt->dhstmt, pcpar) ) - - -#if 0 - retcode = hproc ( pstmt->dhstmt, pcpar ); -#endif - - /* state transition */ - if( pstmt->asyn_on == en_NumParams ) - { - switch ( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - case SQL_ERROR: - break; - - default: - return retcode; - } - } - - if( retcode == SQL_STILL_EXECUTING ) - { - pstmt->asyn_on = en_NumParams; - } - - return retcode; -} - -RETCODE SQL_API SQLDescribeParam ( - HSTMT hstmt, - UWORD ipar, - SWORD FAR* pfSqlType, - UDWORD FAR* pcbColDef, - SWORD FAR* pibScale, - SWORD FAR* pfNullable ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc; - RETCODE retcode; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check argument */ - if( ipar == 0 ) - { - PUSHSQLERR ( pstmt->herr, en_S1093 ); - - return SQL_ERROR; - } - - /* check state */ - if( pstmt->asyn_on == en_NullProc ) - { - switch( pstmt->state ) - { - case en_stmt_allocated: - case en_stmt_needdata: - case en_stmt_mustput: - case en_stmt_canput: - PUSHSQLERR ( pstmt->herr, en_S1010 ); - return SQL_ERROR; - - default: - break; - } - } - else if( pstmt->asyn_on != en_DescribeParam ) - { - PUSHSQLERR ( pstmt->herr, en_S1010 ); - - return SQL_ERROR; - } - - /* call driver */ - hproc = _iodbcdm_getproc ( pstmt->hdbc, en_DescribeParam ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_DescribeParam, ( - pstmt->dhstmt, - ipar, - pfSqlType, - pcbColDef, - pibScale, - pfNullable ) ) - -#if 0 - retcode = hproc(pstmt->dhstmt, - ipar, - pfSqlType, - pcbColDef, - pibScale, - pfNullable ); -#endif - - /* state transition */ - if( pstmt->asyn_on == en_DescribeParam ) - { - switch ( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - case SQL_ERROR: - break; - - default: - return retcode; - } - } - - if( retcode == SQL_STILL_EXECUTING ) - { - pstmt->asyn_on = en_DescribeParam; - } - - return retcode; -} diff --git a/src/iodbc/fetch.c b/src/iodbc/fetch.c deleted file mode 100644 index 85bd13e59f..0000000000 --- a/src/iodbc/fetch.c +++ /dev/null @@ -1,675 +0,0 @@ -/** Fetch query result - - Copyright (C) 1995 by Ke Jin - - This program 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. -**/ - -#include <../iodbc/iodbc.h> - -#include <../iodbc/isql.h> -#include <../iodbc/isqlext.h> - -#include <../iodbc/dlproc.h> - -#include <../iodbc/herr.h> -#include <../iodbc/henv.h> -#include <../iodbc/hdbc.h> -#include <../iodbc/hstmt.h> - -#include <../iodbc/itrace.h> - -RETCODE SQL_API SQLFetch ( HSTMT hstmt ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc = SQL_NULL_HPROC; - RETCODE retcode; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check state */ - if( pstmt->asyn_on == en_NullProc ) - { - switch( pstmt->state ) - { - case en_stmt_allocated: - case en_stmt_prepared: - case en_stmt_xfetched: - case en_stmt_needdata: - case en_stmt_mustput: - case en_stmt_canput: - PUSHSQLERR ( pstmt->herr, en_S1010 ); - return SQL_ERROR; - - default: - break; - } - } - else if( pstmt->asyn_on != en_Fetch ) - { - PUSHSQLERR ( pstmt->herr, en_S1010 ); - return SQL_ERROR; - } - - hproc = _iodbcdm_getproc( pstmt->hdbc, en_Fetch ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_Fetch, (pstmt->dhstmt) ) - -#if 0 - retcode = hproc( pstmt->dhstmt ); -#endif - /* state transition */ - if( pstmt->asyn_on == en_Fetch ) - { - switch( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - case SQL_NO_DATA_FOUND: - case SQL_ERROR: - pstmt->asyn_on = en_NullProc; - break; - - case SQL_STILL_EXECUTING: - default: - return retcode; - } - } - - switch( pstmt->state ) - { - case en_stmt_cursoropen: - case en_stmt_fetched: - switch( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - pstmt->state = en_stmt_fetched; - pstmt->cursor_state = en_stmt_cursor_fetched; - break; - - case SQL_NO_DATA_FOUND: - if( pstmt->prep_state ) - { - pstmt->state = en_stmt_prepared; - } - else - { - - pstmt->state = en_stmt_allocated; - } - pstmt->cursor_state = en_stmt_cursor_no; - break; - - case SQL_STILL_EXECUTING: - pstmt->asyn_on = en_Fetch; - break; - - default: - break; - } - break; - - default: - break; - } - - return retcode; -} - -RETCODE SQL_API SQLExtendedFetch ( - HSTMT hstmt, - UWORD fFetchType, - SDWORD irow, - UDWORD FAR* pcrow, - UWORD FAR* rgfRowStatus ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc = SQL_NULL_HPROC; - RETCODE retcode; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check fetch type */ - if( fFetchType < SQL_FETCH_NEXT - || fFetchType > SQL_FETCH_BOOKMARK ) - { - /* Unlike MS driver manager(i.e. DM), - * we don't check driver's ODBC version - * against SQL_FETCH_RESUME (only 1.0) - * and SQL_FETCH_BOOKMARK (only 2.0). - */ - PUSHSQLERR ( pstmt->herr, en_S1106 ); - - return SQL_ERROR; - } - - /* check state */ - if( pstmt->asyn_on == en_NullProc ) - { - switch( pstmt->state ) - { - case en_stmt_allocated: - case en_stmt_prepared: - case en_stmt_fetched: - case en_stmt_needdata: - case en_stmt_mustput: - case en_stmt_canput: - PUSHSQLERR ( pstmt->herr, en_S1010 ); - return SQL_ERROR; - - default: - break; - } - } - else if( pstmt->asyn_on != en_ExtendedFetch ) - { - PUSHSQLERR ( pstmt->herr, en_S1010 ); - return SQL_ERROR; - } - - hproc = _iodbcdm_getproc( pstmt->hdbc, en_ExtendedFetch ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_ExtendedFetch, ( - pstmt->dhstmt, - fFetchType, - irow, - pcrow, - rgfRowStatus ) ) - -#if 0 - retcode = hproc(pstmt->dhstmt, - fFetchType, - irow, - pcrow, - rgfRowStatus ); -#endif - - /* state transition */ - if( pstmt->asyn_on == en_ExtendedFetch ) - { - switch( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - case SQL_NO_DATA_FOUND: - case SQL_ERROR: - pstmt->asyn_on = en_NullProc; - break; - - case SQL_STILL_EXECUTING: - default: - return retcode; - } - } - - switch( pstmt->state ) - { - case en_stmt_cursoropen: - case en_stmt_xfetched: - switch( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - case SQL_NO_DATA_FOUND: - pstmt->state = en_stmt_xfetched; - pstmt->cursor_state = en_stmt_cursor_xfetched; - break; - - case SQL_STILL_EXECUTING: - pstmt->asyn_on = en_ExtendedFetch; - break; - - default: - break; - } - break; - - default: - break; - } - - return retcode; -} - -RETCODE SQL_API SQLGetData( - HSTMT hstmt, - UWORD icol, - SWORD fCType, - PTR rgbValue, - SDWORD cbValueMax, - SDWORD FAR* pcbValue ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc; - RETCODE retcode; - int sqlstat = en_00000; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check argument */ - if( rgbValue == NULL ) - { - sqlstat = en_S1009; - } - else if( cbValueMax < 0 ) - { - sqlstat = en_S1090; - } - else - { - switch(fCType) - { - case SQL_C_DEFAULT: - case SQL_C_CHAR: - case SQL_C_BINARY: - case SQL_C_BIT: - case SQL_C_TINYINT: - case SQL_C_STINYINT: - case SQL_C_UTINYINT: - case SQL_C_SHORT: - case SQL_C_SSHORT: - case SQL_C_USHORT: - case SQL_C_LONG: - case SQL_C_SLONG: - case SQL_C_ULONG: - case SQL_C_FLOAT: - case SQL_C_DOUBLE: - case SQL_C_DATE: - case SQL_C_TIME: - case SQL_C_TIMESTAMP: - break; - - default: - sqlstat = en_S1003; - break; - } - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - /* check state */ - if( pstmt->asyn_on == en_NullProc ) - { - switch( pstmt->state ) - { - case en_stmt_allocated: - case en_stmt_prepared: - case en_stmt_needdata: - case en_stmt_mustput: - case en_stmt_canput: - sqlstat = en_S1010; - break; - - case en_stmt_executed: - case en_stmt_cursoropen: - sqlstat = en_24000; - break; - - default: - break; - } - } - else if( pstmt->asyn_on != en_GetData ) - { - sqlstat = en_S1010; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - /* call driver */ - hproc = _iodbcdm_getproc( pstmt->hdbc, en_GetData ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_GetData, ( - pstmt->dhstmt, - icol, - fCType, - rgbValue, - cbValueMax, - pcbValue ) ) - -#if 0 - retcode = hproc(pstmt->dhstmt, - icol, - fCType, - rgbValue, - cbValueMax, - pcbValue ); -#endif - - /* state transition */ - if( pstmt->asyn_on == en_GetData ) - { - switch ( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - case SQL_NO_DATA_FOUND: - case SQL_ERROR: - pstmt->asyn_on = en_NullProc; - break; - - case SQL_STILL_EXECUTING: - default: - return retcode; - } - } - - switch( pstmt->state ) - { - case en_stmt_fetched: - case en_stmt_xfetched: - if( retcode == SQL_STILL_EXECUTING ) - { - pstmt->asyn_on = en_GetData; - break; - } - break; - - default: - break; - } - - return retcode; -} - -RETCODE SQL_API SQLMoreResults( HSTMT hstmt ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc; - RETCODE retcode; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check state */ - if( pstmt->asyn_on == en_NullProc ) - { - switch( pstmt->state ) - { - case en_stmt_allocated: - case en_stmt_prepared: - return SQL_NO_DATA_FOUND; - - case en_stmt_needdata: - case en_stmt_mustput: - case en_stmt_canput: - PUSHSQLERR ( pstmt->herr, en_S1010 ); - return SQL_ERROR; - - default: - break; - } - } - else if( pstmt->asyn_on != en_MoreResults ) - { - PUSHSQLERR ( pstmt->herr, en_S1010 ); - - return SQL_ERROR; - } - - /* call driver */ - hproc = _iodbcdm_getproc( pstmt->hdbc, en_MoreResults ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_MoreResults, (pstmt->dhstmt) ) - -#if 0 - retcode = hproc( pstmt->dhstmt ); -#endif - - /* state transition */ - if( pstmt->asyn_on == en_MoreResults ) - { - switch( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - case SQL_NO_DATA_FOUND: - case SQL_ERROR: - pstmt->asyn_on = en_NullProc; - break; - - case SQL_STILL_EXECUTING: - default: - return retcode; - } - } - - switch( pstmt->state ) - { - case en_stmt_allocated: - case en_stmt_prepared: - /* driver should return SQL_NO_DATA_FOUND */ - break; - - case en_stmt_executed: - if( retcode == SQL_NO_DATA_FOUND ) - { - if( pstmt->prep_state ) - { - pstmt->state = en_stmt_prepared; - } - else - { - pstmt->state = en_stmt_allocated; - } - } - else if( retcode == SQL_STILL_EXECUTING ) - { - pstmt->asyn_on = en_MoreResults; - } - break; - - case en_stmt_cursoropen: - case en_stmt_fetched: - case en_stmt_xfetched: - if( retcode == SQL_SUCCESS ) - { - break; - } - else if( retcode == SQL_NO_DATA_FOUND ) - { - if( pstmt->prep_state ) - { - pstmt->state = en_stmt_prepared; - } - else - { - pstmt->state = en_stmt_allocated; - } - } - else if( retcode == SQL_STILL_EXECUTING ) - { - pstmt->asyn_on = en_MoreResults; - } - break; - - default: - break; - } - - return retcode; -} - -RETCODE SQL_API SQLSetPos ( - HSTMT hstmt, - UWORD irow, - UWORD fOption, - UWORD fLock ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc; - RETCODE retcode; - int sqlstat = en_00000; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check argument value */ - if( fOption > SQL_ADD - || fLock > SQL_LOCK_UNLOCK ) - { - PUSHSQLERR ( pstmt->herr, en_S1009 ); - } - - /* check state */ - if( pstmt->asyn_on == en_NullProc ) - { - switch( pstmt->state ) - { - case en_stmt_allocated: - case en_stmt_prepared: - case en_stmt_fetched: - case en_stmt_needdata: - case en_stmt_mustput: - case en_stmt_canput: - sqlstat = en_S1010; - break; - - case en_stmt_executed: - case en_stmt_cursoropen: - sqlstat = en_24000; - break; - - default: - break; - } - } - else if( pstmt->asyn_on != en_SetPos ) - { - sqlstat = en_S1010; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - /* call driver */ - hproc = _iodbcdm_getproc( pstmt->hdbc, en_SetPos ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_SetPos, ( - pstmt->dhstmt, - irow, - fOption, - fLock ) ) -#if 0 - retcode = hproc(pstmt->dhstmt, - irow, - fOption, - fLock ); -#endif - - /* state transition */ - if( pstmt->asyn_on == en_SetPos ) - { - switch( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - case SQL_NEED_DATA: - case SQL_ERROR: - pstmt->asyn_on = en_NullProc; - break; - - case SQL_STILL_EXECUTING: - default: - return retcode; - } - } - - /* now, the only possible init state is 'xfetched' */ - switch( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - break; - - case SQL_NEED_DATA: - pstmt->state = en_stmt_needdata; - pstmt->need_on = en_SetPos; - break; - - case SQL_STILL_EXECUTING: - pstmt->asyn_on = en_SetPos; - break; - - default: - break; - } - - return retcode; -} diff --git a/src/iodbc/hdbc.c b/src/iodbc/hdbc.c deleted file mode 100644 index 7157480dd1..0000000000 --- a/src/iodbc/hdbc.c +++ /dev/null @@ -1,806 +0,0 @@ -/** data source connect object management functions - - Copyright (C) 1995 by Ke Jin - - This program 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. -**/ - -#include <../iodbc/iodbc.h> - -#include <../iodbc/isql.h> -#include <../iodbc/isqlext.h> - -#include <../iodbc/dlproc.h> - -#include <../iodbc/herr.h> -#include <../iodbc/henv.h> -#include <../iodbc/hdbc.h> -#include <../iodbc/hstmt.h> - -#include <../iodbc/itrace.h> -#include - -extern RETCODE _iodbcdm_driverunload(); - -RETCODE SQL_API SQLAllocConnect( - HENV henv, - HDBC FAR* phdbc ) -{ - GENV_t FAR* genv = (GENV_t FAR*)henv; - DBC_t FAR* pdbc; - -#if (ODBCVER >= 0x0300) - if( henv == SQL_NULL_HENV - || genv->type != SQL_HANDLE_ENV ) -#else - if( henv == SQL_NULL_HENV ) -#endif - { - return SQL_INVALID_HANDLE; - } - - if( phdbc == NULL ) - { - PUSHSQLERR ( genv->herr, en_S1009 ); - - return SQL_ERROR; - } - - pdbc = (DBC_t FAR*)MEM_ALLOC (sizeof(DBC_t)); - - if( pdbc == NULL ) - { - *phdbc = SQL_NULL_HDBC; - - PUSHSQLERR ( genv->herr, en_S1001 ); - - return SQL_ERROR; - } - -#if (ODBCVER >= 0x0300) - pdbc->type = SQL_HANDLE_DBC; -#endif - /* insert this dbc entry into the link list */ - pdbc->next = genv->hdbc; - genv->hdbc = pdbc; - pdbc->genv = henv; - - pdbc->henv = SQL_NULL_HENV; - pdbc->hstmt= SQL_NULL_HSTMT; - pdbc->herr = SQL_NULL_HERR; - pdbc->dhdbc= SQL_NULL_HDBC; - pdbc->state= en_dbc_allocated; - pdbc->trace = 0; - pdbc->tstm = NULL; - pdbc->tfile = NULL; - - /* set connect options to default values */ - pdbc->access_mode = SQL_MODE_DEFAULT; - pdbc->autocommit = SQL_AUTOCOMMIT_DEFAULT; - pdbc->current_qualifier = NULL; - pdbc->login_timeout = 0UL; - pdbc->odbc_cursors = SQL_CUR_DEFAULT; - pdbc->packet_size = 0UL; - pdbc->quiet_mode = (UDWORD)NULL; - pdbc->txn_isolation = SQL_TXN_READ_UNCOMMITTED; - pdbc->cb_commit = (SWORD)SQL_CB_DELETE; - pdbc->cb_rollback = (SWORD)SQL_CB_DELETE; - - *phdbc = (HDBC)pdbc; - - return SQL_SUCCESS; -} - -RETCODE SQL_API SQLFreeConnect( HDBC hdbc ) -{ - GENV_t FAR* genv; - DBC_t FAR* pdbc = (DBC_t FAR*)hdbc; - DBC_t FAR* tpdbc; - - if( hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check state */ - if( pdbc->state != en_dbc_allocated ) - { - PUSHSQLERR ( pdbc->herr, en_S1010 ); - - return SQL_ERROR; - } - - genv = (GENV_t FAR*)pdbc->genv; - - for( tpdbc = (DBC_t FAR*)genv->hdbc; - tpdbc != NULL; - tpdbc = tpdbc->next ) - { - if( pdbc == tpdbc ) - { - genv->hdbc = pdbc->next; - break; - } - - if( pdbc == tpdbc->next ) - { - tpdbc->next = pdbc->next; - break; - } - } - - /* free this dbc */ - _iodbcdm_driverunload(pdbc); - _iodbcdm_freesqlerrlist( pdbc->herr ); - - if( pdbc->tfile ) - { - MEM_FREE( pdbc->tfile ); - } - - SQLSetConnectOption( pdbc, SQL_OPT_TRACE, SQL_OPT_TRACE_OFF); - - MEM_FREE ( pdbc ); - - return SQL_SUCCESS; -} - -RETCODE SQL_API SQLSetConnectOption( - HDBC hdbc, - UWORD fOption, - UDWORD vParam ) -{ -/* GENV_t FAR* genv; */ - DBC_t FAR* pdbc = (DBC_t FAR*)hdbc; - STMT_t FAR* pstmt; - HPROC hproc = SQL_NULL_HPROC; - int sqlstat = en_00000; - RETCODE retcode = SQL_SUCCESS; - - if( hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check option */ - if( fOption < SQL_CONN_OPT_MIN - || ( fOption > SQL_CONN_OPT_MAX - && fOption < SQL_CONNECT_OPT_DRVR_START ) ) - { - PUSHSQLERR ( pdbc->herr, en_S1092 ); - - return SQL_ERROR; - } - - /* check state of connection handle */ - switch( pdbc->state ) - { - case en_dbc_allocated: - if( fOption == SQL_TRANSLATE_DLL - || fOption == SQL_TRANSLATE_OPTION ) - { - /* This two options are only meaningful - * for specified driver. So, has to be - * set after a dirver has been loaded. - */ - sqlstat = en_08003; - break; - } - - if( fOption >= SQL_CONNECT_OPT_DRVR_START - && pdbc->henv == SQL_NULL_HENV ) - /* An option only meaningful for drivers - * is passed before loading a driver. - * We classify this as an invalid option error. - * This is not documented by MS SDK guide. - */ - { - sqlstat = en_S1092; - break; - } - break; - - case en_dbc_needdata: - sqlstat = en_S1010; - break; - - case en_dbc_connected: - case en_dbc_hstmt: - if( fOption == SQL_ODBC_CURSORS ) - { - sqlstat = en_08002; - } - break; - - default: - break; - } - - /* check state of statement handle(s) */ - for( pstmt = (STMT_t FAR*)pdbc->hstmt; - pstmt != NULL && sqlstat == en_00000; - pstmt = (STMT_t FAR*)pstmt->next ) - { - if( pstmt->state >= en_stmt_needdata - || pstmt->asyn_on != en_NullProc ) - { - sqlstat = en_S1010; - } - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pdbc->herr, sqlstat ); - - return SQL_ERROR; - } - - if( fOption == SQL_OPT_TRACE ) - /* tracing flag can be set before and after connect - * and only meaningful for driver manager(actually - * there is only one tracing file under one global - * environment). - */ - { - switch( vParam ) - { - case SQL_OPT_TRACE_ON: - if( pdbc->tfile == NULL ) - { - pdbc->tfile = (char FAR*)MEM_ALLOC( 1 + - STRLEN(SQL_OPT_TRACE_FILE_DEFAULT) ); - - if( pdbc->tfile == NULL ) - { - PUSHSQLERR( pdbc->herr, en_S1001 ); - - return SQL_ERROR; - } - - STRCPY( pdbc->tfile, SQL_OPT_TRACE_FILE_DEFAULT ); - } - - if( pdbc->tstm == NULL ) - { -#if defined(stderr) && defined(stdout) - if(STREQ( pdbc->tfile, "stderr")) - { - pdbc->tstm = stderr; - } - else - if(STREQ(pdbc->tfile, "stdout")) - { - pdbc->tstm = stdout; - } - else -#endif - { - pdbc->tstm - = fopen(pdbc->tfile, "a+"); - } - - if(pdbc->tstm ) - { - pdbc->trace = 1; - } - else - { - pdbc->trace = 0; - - sqlstat = en_IM013; - retcode = SQL_ERROR; - } - } - break; - - case SQL_OPT_TRACE_OFF: - if( pdbc->trace && pdbc->tstm ) - { -#if defined(stderr) && defined(stdout) - if( stderr != (FILE FAR*)(pdbc->tstm) - && stdout != (FILE FAR*)(pdbc->tstm) ) -#endif - { - fclose(pdbc->tstm); - } - } - pdbc->tstm = NULL; - pdbc->trace = 0; - break; - - default: - PUSHSQLERR (pdbc->herr, en_S1009); - retcode = SQL_ERROR; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pdbc->herr, sqlstat ); - } - - return retcode; - } - - if( fOption == SQL_OPT_TRACEFILE ) - /* Tracing file can be set before and after connect - * and only meaningful for driver manager. - */ - { - if( vParam == 0UL - || ((char FAR*)vParam)[0] == 0 ) - { - PUSHSQLERR ( pdbc->herr, en_S1009 ); - - return SQL_ERROR; - } - - if( pdbc->tfile && STREQ (pdbc->tfile, vParam) ) - { - return SQL_SUCCESS; - } - - if( pdbc->trace ) - { - PUSHSQLERR ( pdbc->herr, en_IM014 ); - - return SQL_ERROR; - } - - if( pdbc->tfile ) - { - MEM_FREE( pdbc->tfile ); - } - - pdbc->tfile = (char FAR*)MEM_ALLOC( 1 + STRLEN( vParam ) ); - - if( pdbc->tfile == NULL ) - { - PUSHSQLERR( pdbc->herr, en_S1001 ); - - return SQL_ERROR; - } - - STRCPY ( pdbc->tfile, vParam ); - - return SQL_SUCCESS; - } - - if( pdbc->state != en_dbc_allocated ) - { - /* If already connected, then, driver's odbc call - * will be invoked. Otherwise, we only save the options - * and delay the setting process until the connection - * been established. - */ - hproc = _iodbcdm_getproc( hdbc, en_SetConnectOption ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pdbc->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( hdbc, retcode, hproc, en_SetConnectOption, ( - pdbc->dhdbc, fOption, vParam ) ) - -#if 0 - retcode = hproc( pdbc->dhdbc, fOption, vParam); -#endif - - if( retcode != SQL_SUCCESS - && retcode != SQL_SUCCESS_WITH_INFO ) - { - return retcode; - } - } - - /* - * Now, either driver's odbc call was successed or - * driver has not been loaded yet. In the first case, we - * need flip flag for(such as access_mode, autocommit, ...) - * for our finit state machine. While in the second case, - * we need save option values(such as current_qualifier, ...) - * for delaied setting. So, ... - */ - - /* No matter what state we are(i.e. allocated or connected, ..) - * we need to flip the flag. - */ - switch( fOption ) - { - case SQL_ACCESS_MODE: - pdbc->access_mode = vParam; - break; - - case SQL_AUTOCOMMIT: - pdbc->autocommit = vParam; - break; - } - - /* state transition */ - if( pdbc->state != en_dbc_allocated ) - { - return retcode; - } - - /* Only 'allocated' state is possible here, and we need to - * save the options for delaied setting. - */ - switch( fOption ) - { - case SQL_CURRENT_QUALIFIER: - if( pdbc->current_qualifier != NULL ) - { - MEM_FREE ( pdbc->current_qualifier ); - } - - if( vParam == 0UL ) - { - pdbc->current_qualifier = NULL; - - break; - } - - pdbc->current_qualifier - = (char FAR*)MEM_ALLOC ( - STRLEN (vParam) + 1 ); - - if( pdbc->current_qualifier == NULL ) - { - PUSHSQLERR ( pdbc->herr, en_S1001 ); - return SQL_ERROR; - } - - STRCPY ( pdbc->current_qualifier, vParam ); - break; - - case SQL_LOGIN_TIMEOUT: - pdbc->login_timeout = vParam; - break; - - case SQL_ODBC_CURSORS: - pdbc->odbc_cursors = vParam; - break; - - case SQL_PACKET_SIZE: - pdbc->packet_size = vParam; - break; - - case SQL_QUIET_MODE: - pdbc->quiet_mode = vParam; - break; - - case SQL_TXN_ISOLATION: - pdbc->txn_isolation = vParam; - break; - - default: - /* Since we didn't save the option value for delaied - * setting, we should raise an error here. - */ - break; - } - - return retcode; -} - -RETCODE SQL_API SQLGetConnectOption( - HDBC hdbc, - UWORD fOption, - PTR pvParam ) -{ -/* GENV_t FAR* genv; */ - DBC_t FAR* pdbc = (DBC_t FAR*)hdbc; - int sqlstat = en_00000; - HPROC hproc = SQL_NULL_HPROC; - RETCODE retcode; - - if( hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check option */ - if( fOption < SQL_CONN_OPT_MIN - || ( fOption > SQL_CONN_OPT_MAX - && fOption < SQL_CONNECT_OPT_DRVR_START ) ) - { - PUSHSQLERR ( pdbc->herr, en_S1092 ); - - return SQL_ERROR; - } - - /* check state */ - switch( pdbc->state ) - { - case en_dbc_allocated: - if( fOption != SQL_ACCESS_MODE - && fOption != SQL_AUTOCOMMIT - && fOption != SQL_LOGIN_TIMEOUT - && fOption != SQL_OPT_TRACE - && fOption != SQL_OPT_TRACEFILE ) - { - sqlstat = en_08003; - } - /* MS ODBC SDK document only - * allows SQL_ACCESS_MODE - * and SQL_AUTOCOMMIT in this - * dbc state. We allow another - * two options, because they - * are only meaningful for driver - * manager. - */ - break; - - case en_dbc_needdata: - sqlstat = en_S1010; - break; - - default: - break; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pdbc->herr, sqlstat ); - - return SQL_ERROR; - } - - /* Tracing and tracing file options are only - * meaningful for driver manager - */ - if( fOption == SQL_OPT_TRACE ) - { - if( pdbc->trace ) - *((UDWORD*)pvParam) = (UDWORD)SQL_OPT_TRACE_ON; - else - *((UDWORD*)pvParam) = (UDWORD)SQL_OPT_TRACE_OFF; - - return SQL_SUCCESS; - } - - if( fOption == SQL_OPT_TRACEFILE ) - { - STRCPY (pvParam, pdbc->tfile ); - - return SQL_ERROR; - } - - if( pdbc->state != en_dbc_allocated ) - /* if already connected, we will invoke driver's function */ - { - hproc = _iodbcdm_getproc( hdbc, en_GetConnectOption ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR( pdbc->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( hdbc, retcode, hproc, en_GetConnectOption, ( - pdbc->dhdbc, fOption, pvParam ) ) - -#if 0 - retcode = hproc(pdbc->dhdbc, fOption, pvParam); -#endif - - return retcode; - } - - /* We needn't to handle options which are not allowed - * to be *get* at a allocated dbc state(and two tracing - * options which has been handled and returned). Thus, - * there are only two possible cases. - */ - switch( fOption ) - { - case SQL_ACCESS_MODE: - *((UDWORD*)pvParam) = pdbc->access_mode; - break; - - case SQL_AUTOCOMMIT: - *((UDWORD*)pvParam) = pdbc->autocommit; - break; - - case SQL_LOGIN_TIMEOUT: - *((UDWORD*)pvParam) = pdbc->login_timeout; - break; - - default: - break; - } - - return SQL_SUCCESS; -} - -static RETCODE _iodbcdm_transact( - HDBC hdbc, - UWORD fType ) -{ - DBC_t FAR* pdbc = (DBC_t FAR*)hdbc; - STMT_t FAR* pstmt; - HPROC hproc; - RETCODE retcode; - - /* check state */ - switch( pdbc->state ) - { - case en_dbc_allocated: - case en_dbc_needdata: - PUSHSQLERR ( pdbc->herr, en_08003 ); - return SQL_ERROR; - - case en_dbc_connected: - return SQL_SUCCESS; - - case en_dbc_hstmt: - default: - break; - } - - for( pstmt = (STMT_t FAR*)(pdbc->hstmt); - pstmt != NULL; - pstmt = pstmt->next ) - { - if( pstmt->state >= en_stmt_needdata - || pstmt->asyn_on != en_NullProc ) - { - PUSHSQLERR ( pdbc->herr, en_S1010 ); - - return SQL_ERROR; - } - } - - hproc = _iodbcdm_getproc( hdbc, en_Transact ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pdbc->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( hdbc, retcode, hproc, en_Transact, ( - SQL_NULL_HENV, pdbc->dhdbc, fType ) ) - -#if 0 - retcode = hproc( SQL_NULL_HENV, pdbc->dhdbc, fType ); -#endif - - /* state transition */ - if( retcode != SQL_SUCCESS - && retcode != SQL_SUCCESS_WITH_INFO ) - { - return retcode; - } - - pdbc->state = en_dbc_hstmt; - - for( pstmt = (STMT_t FAR*)(pdbc->hstmt); - pstmt != NULL; - pstmt = pstmt->next ) - { - switch( pstmt->state ) - { - case en_stmt_prepared: - if( pdbc->cb_commit == SQL_CB_DELETE - || pdbc->cb_rollback == SQL_CB_DELETE ) - { - pstmt->state = en_stmt_allocated; - pstmt->prep_state = 0; - break; - } - break; - - case en_stmt_executed: - case en_stmt_cursoropen: - case en_stmt_fetched: - case en_stmt_xfetched: - if( ! pstmt->prep_state - && pdbc->cb_commit != SQL_CB_PRESERVE - && pdbc->cb_rollback != SQL_CB_PRESERVE ) - { - pstmt->state = en_stmt_allocated; - pstmt->prep_state = 0; - pstmt->cursor_state = en_stmt_cursor_no; - break; - } - - if( pstmt->prep_state ) - { - if( pdbc->cb_commit == SQL_CB_DELETE - || pdbc->cb_rollback== SQL_CB_DELETE ) - { - pstmt->state = en_stmt_allocated; - pstmt->prep_state = 0; - pstmt->cursor_state = en_stmt_cursor_no; - break; - } - - if( pdbc->cb_commit == SQL_CB_CLOSE - || pdbc->cb_rollback== SQL_CB_CLOSE ) - { - pstmt->state - = en_stmt_prepared; - pstmt->cursor_state - = en_stmt_cursor_no; - break; - } - break; - } - break; - - default: - break; - } - } - - return retcode; -} - -RETCODE SQL_API SQLTransact( - HENV henv, - HDBC hdbc, - UWORD fType ) -{ - GENV_t FAR* genv = (GENV_t FAR*)henv; - DBC_t FAR* pdbc = (DBC_t FAR*)hdbc; - HERR herr; - RETCODE retcode = 0; - - if( hdbc != SQL_NULL_HDBC ) - { - herr = pdbc->herr; - } - else if( henv != SQL_NULL_HENV ) - { - herr = genv->herr; - } - else - { - return SQL_INVALID_HANDLE; - } - - /* check argument */ - if( fType != SQL_COMMIT - && fType != SQL_ROLLBACK ) - { - PUSHSQLERR ( herr, en_S1012 ); - - return SQL_ERROR; - } - - if( hdbc != SQL_NULL_HDBC ) - { - retcode = _iodbcdm_transact( hdbc, fType ); - } - else - { - for( pdbc = (DBC_t FAR*)(genv->hdbc); - pdbc != NULL; - pdbc = pdbc->next ) - { - retcode |= _iodbcdm_transact( hdbc, fType ); - } - } - - if( retcode != SQL_SUCCESS - && retcode != SQL_SUCCESS_WITH_INFO ) - { - /* fail on one of the connection */ - return SQL_ERROR; - } - - return retcode; -} diff --git a/src/iodbc/hdbc.h b/src/iodbc/hdbc.h deleted file mode 100644 index 88f953983b..0000000000 --- a/src/iodbc/hdbc.h +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef _HDBC_H -#define _HDBC_H - -typedef struct DBC -{ - int type; /* must be 1st field */ - struct DBC FAR* - next; - - HENV genv; /* back point to global env object */ - - HDBC dhdbc; /* driver's private dbc */ - HENV henv; /* back point to instant env object */ - HSTMT hstmt; /* list of statement object handle(s) */ - HERR herr; - - int state; - - /* options */ - UDWORD access_mode; - UDWORD autocommit; - - UDWORD login_timeout; - UDWORD odbc_cursors; - UDWORD packet_size; - UDWORD quiet_mode; - UDWORD txn_isolation; - SWORD cb_commit; - SWORD cb_rollback; - - char FAR* - current_qualifier; - - int trace; /* trace flag */ - char FAR* - tfile; - void FAR* - tstm; /* trace stream */ -} DBC_t; - -/* - * Note: - * - ODBC applications can see address of driver manager's - * connection object, i.e connection handle -- a void pointer, - * but not detail of it. ODBC applications can neither see - * detail driver's connection object nor its address. - * - * - ODBC driver manager knows its own connection objects and - * exposes their address to an ODBC application. Driver manager - * also knows address of driver's connection objects and keeps - * it via dhdbc field in driver manager's connection object. - * - * - ODBC driver exposes address of its own connection object to - * driver manager without detail. - * - * - Applications can get driver's connection object handle by - * SQLGetInfo() with fInfoType equals to SQL_DRIVER_HDBC. - */ - -enum { - en_dbc_allocated, - en_dbc_needdata, - en_dbc_connected, - en_dbc_hstmt -}; - -#endif diff --git a/src/iodbc/henv.c b/src/iodbc/henv.c deleted file mode 100644 index be4b4ae8d5..0000000000 --- a/src/iodbc/henv.c +++ /dev/null @@ -1,75 +0,0 @@ -/** Environment object managment functions - - Copyright (C) 1995 by Ke Jin - - This program 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. -**/ - -#include <../iodbc/iodbc.h> - -#include <../iodbc/isql.h> -#include <../iodbc/isqlext.h> - -#include <../iodbc/dlproc.h> - -#include <../iodbc/herr.h> -#include <../iodbc/henv.h> - -#include <../iodbc/itrace.h> - -RETCODE SQL_API SQLAllocEnv( HENV FAR* phenv ) -{ - GENV_t FAR* genv; - - genv = (GENV_t*)MEM_ALLOC( sizeof(GENV_t) ); - - if( genv == NULL ) - { - *phenv = SQL_NULL_HENV; - - return SQL_ERROR; - } - -#if (ODBCVER >= 0x0300 ) - genv->type = SQL_HANDLE_ENV; -#endif - - genv->henv = SQL_NULL_HENV; /* driver's env list */ - genv->hdbc = SQL_NULL_HDBC; /* driver's dbc list */ - genv->herr = SQL_NULL_HERR; /* err list */ - - *phenv = (HENV)genv; - - return SQL_SUCCESS; -} - -RETCODE SQL_API SQLFreeEnv ( HENV henv ) -{ - GENV_t FAR* genv = (GENV_t*)henv; - - if( henv == SQL_NULL_HENV ) - { - return SQL_INVALID_HANDLE; - } - - if( genv->hdbc != SQL_NULL_HDBC ) - { - PUSHSQLERR ( genv->herr, en_S1010 ); - - return SQL_ERROR; - } - - _iodbcdm_freesqlerrlist( genv->herr ); - - MEM_FREE( henv ); - - return SQL_SUCCESS; -} diff --git a/src/iodbc/henv.ci b/src/iodbc/henv.ci deleted file mode 100644 index 639c6ec842..0000000000 --- a/src/iodbc/henv.ci +++ /dev/null @@ -1,95 +0,0 @@ - -#ifdef __HPUX__ -#define CLI_NAME_PREFIX "_SQL" -#endif - -#ifdef __AIX__ -#define CLI_NAME_PREFIX ".SQL" -#endif - -#ifndef CLI_NAME_PREFIX - -/* There are some exceptions : - * on FreeBSD 2.x CLI_NAME_PREFIX is defined in Config.mk as "_SQL" - * on HP/UX s300/s400, CLI_NAME_PREFIX is defined in Config.mk as "_SQL" - * on AIX 3.x 4.x, CLI_NAME_PREFIX is defined in Config.mk as ".SQL" - */ - -# define CLI_NAME_PREFIX "SQL" /* using call by value prefix */ -#endif - -static struct { - int en_idx; - char* symbol; -} odbcapi_symtab[] = { -#if (ODBCVER >= 0x0300) - en_AllocHandle CLI_NAME_PREFIX "AllocHandle", - en_FreeHandle CLI_NAME_PREFIX "FreeHandle", -#endif - en_AllocEnv, CLI_NAME_PREFIX "AllocEnv", - en_AllocConnect, CLI_NAME_PREFIX "AllocConnect", - en_Connect, CLI_NAME_PREFIX "Connect", - en_DriverConnect, CLI_NAME_PREFIX "DriverConnect", - en_BrowseConnect, CLI_NAME_PREFIX "BrowseConnect", - - en_DataSources, CLI_NAME_PREFIX "DataSources", - en_Drivers, CLI_NAME_PREFIX "Driver", - en_GetInfo, CLI_NAME_PREFIX "GetInfo", - en_GetFunctions, CLI_NAME_PREFIX "GetFunctions", - en_GetTypeInfo, CLI_NAME_PREFIX "GetTypeInfo", - - en_SetConnectOption, CLI_NAME_PREFIX "SetConnectOption", - en_GetConnectOption, CLI_NAME_PREFIX "GetConnectOption", - en_SetStmtOption, CLI_NAME_PREFIX "SetStmtOption", - en_GetStmtOption, CLI_NAME_PREFIX "GetStmtOption", - - en_AllocStmt, CLI_NAME_PREFIX "AllocStmt", - en_Prepare, CLI_NAME_PREFIX "Prepare", - en_BindParameter, CLI_NAME_PREFIX "BindParameter", - en_ParamOptions, CLI_NAME_PREFIX "ParamOptions", - en_GetCursorName, CLI_NAME_PREFIX "GetCursorName", - en_SetCursorName, CLI_NAME_PREFIX "SetCursorName", - en_SetScrollOptions, CLI_NAME_PREFIX "SetScrollOptions", - en_SetParam, CLI_NAME_PREFIX "SetParam", - - en_Execute, CLI_NAME_PREFIX "Execute", - en_ExecDirect, CLI_NAME_PREFIX "ExecDirect", - en_NativeSql, CLI_NAME_PREFIX "NativeSql", - en_DescribeParam, CLI_NAME_PREFIX "DescribeParam", - en_NumParams, CLI_NAME_PREFIX "NumParams", - en_ParamData, CLI_NAME_PREFIX "ParamData", - en_PutData, CLI_NAME_PREFIX "PutData", - - en_RowCount, CLI_NAME_PREFIX "RowCount", - en_NumResultCols, CLI_NAME_PREFIX "NumResultCols", - en_DescribeCol, CLI_NAME_PREFIX "DescribeCol", - en_ColAttributes, CLI_NAME_PREFIX "ColAttributes", - en_BindCol, CLI_NAME_PREFIX "BindCol", - en_Fetch, CLI_NAME_PREFIX "Fetch", - en_ExtendedFetch, CLI_NAME_PREFIX "ExtendedFetch", - en_GetData, CLI_NAME_PREFIX "GetData", - en_SetPos, CLI_NAME_PREFIX "SetPos", - en_MoreResults, CLI_NAME_PREFIX "MoreResults", - en_Error, CLI_NAME_PREFIX "Error", - - en_ColumnPrivileges, CLI_NAME_PREFIX "ColumnPrivileges", - en_Columns, CLI_NAME_PREFIX "Columns", - en_ForeignKeys, CLI_NAME_PREFIX "ForeignKeys", - en_PrimaryKeys, CLI_NAME_PREFIX "PrimaryKeys", - en_ProcedureColumns, CLI_NAME_PREFIX "ProcedureColumns", - en_Procedures, CLI_NAME_PREFIX "Procedures", - en_SpecialColumns, CLI_NAME_PREFIX "SpecialColumns", - en_Statistics, CLI_NAME_PREFIX "Statistics", - en_TablePrivileges, CLI_NAME_PREFIX "TablePrivileges", - en_Tables, CLI_NAME_PREFIX "Tables", - - en_FreeStmt, CLI_NAME_PREFIX "FreeStmt", - en_Cancel, CLI_NAME_PREFIX "Cancel", - en_Transact, CLI_NAME_PREFIX "Transact", - - en_Disconnect, CLI_NAME_PREFIX "Disconnect", - en_FreeConnect, CLI_NAME_PREFIX "FreeConnect", - en_FreeEnv, CLI_NAME_PREFIX "FreeEnv", - - en_NullProc, NULL -}; diff --git a/src/iodbc/henv.h b/src/iodbc/henv.h deleted file mode 100644 index 8dc260c996..0000000000 --- a/src/iodbc/henv.h +++ /dev/null @@ -1,125 +0,0 @@ -#ifndef _HENV_H -#define _HENV_H - -# include <../iodbc/config.h> -# include <../iodbc/dlproc.h> - -# include <../iodbc/isql.h> -# include <../iodbc/isqlext.h> - -enum { -#if (ODBCVER >= 0x0300) - en_AllocHandle = SQL_API_SQLALLOCHANDLE, - en_FreeHandle = SQL_API_SQLFREEHANDLE, -#endif - en_AllocEnv = SQL_API_SQLALLOCENV, - en_AllocConnect = SQL_API_SQLALLOCCONNECT, - en_Connect = SQL_API_SQLCONNECT, - en_DriverConnect = SQL_API_SQLDRIVERCONNECT, - en_BrowseConnect = SQL_API_SQLBROWSECONNECT, - - en_DataSources = SQL_API_SQLDATASOURCES, - en_Drivers = SQL_API_SQLDRIVERS, - en_GetInfo = SQL_API_SQLGETINFO, - en_GetFunctions = SQL_API_SQLGETFUNCTIONS, - en_GetTypeInfo = SQL_API_SQLGETTYPEINFO, - - en_SetConnectOption = SQL_API_SQLSETCONNECTOPTION, - en_GetConnectOption = SQL_API_SQLGETCONNECTOPTION, - en_SetStmtOption = SQL_API_SQLSETSTMTOPTION, - en_GetStmtOption = SQL_API_SQLGETSTMTOPTION, - - en_AllocStmt = SQL_API_SQLALLOCSTMT, - en_Prepare = SQL_API_SQLPREPARE, - en_BindParameter = SQL_API_SQLBINDPARAMETER, - en_ParamOptions = SQL_API_SQLPARAMOPTIONS, - en_GetCursorName = SQL_API_SQLGETCURSORNAME, - en_SetCursorName = SQL_API_SQLSETCURSORNAME, - en_SetScrollOptions = SQL_API_SQLSETSCROLLOPTIONS, - en_SetParam = SQL_API_SQLSETPARAM, - - en_Execute = SQL_API_SQLEXECUTE, - en_ExecDirect = SQL_API_SQLEXECDIRECT, - en_NativeSql = SQL_API_SQLNATIVESQL, - en_DescribeParam = SQL_API_SQLDESCRIBEPARAM, - en_NumParams = SQL_API_SQLNUMPARAMS, - en_ParamData = SQL_API_SQLPARAMDATA, - en_PutData = SQL_API_SQLPUTDATA, - - en_RowCount = SQL_API_SQLROWCOUNT, - en_NumResultCols = SQL_API_SQLNUMRESULTCOLS, - en_DescribeCol = SQL_API_SQLDESCRIBECOL, - en_ColAttributes = SQL_API_SQLCOLATTRIBUTES, - en_BindCol = SQL_API_SQLBINDCOL, - en_Fetch = SQL_API_SQLFETCH, - en_ExtendedFetch = SQL_API_SQLEXTENDEDFETCH, - en_GetData = SQL_API_SQLGETDATA, - en_SetPos = SQL_API_SQLSETPOS, - en_MoreResults = SQL_API_SQLMORERESULTS, - en_Error = SQL_API_SQLERROR, - - en_ColumnPrivileges = SQL_API_SQLCOLUMNPRIVILEGES, - en_Columns = SQL_API_SQLCOLUMNS, - en_ForeignKeys = SQL_API_SQLFOREIGNKEYS, - en_PrimaryKeys = SQL_API_SQLPRIMARYKEYS, - en_ProcedureColumns = SQL_API_SQLPROCEDURECOLUMNS, - en_Procedures = SQL_API_SQLPROCEDURES, - en_SpecialColumns = SQL_API_SQLSPECIALCOLUMNS, - en_Statistics = SQL_API_SQLSTATISTICS, - en_TablePrivileges = SQL_API_SQLTABLEPRIVILEGES, - en_Tables = SQL_API_SQLTABLES, - - en_FreeStmt = SQL_API_SQLFREESTMT, - en_Cancel = SQL_API_SQLCANCEL, - en_Transact = SQL_API_SQLTRANSACT, - - en_Disconnect = SQL_API_SQLDISCONNECT, - en_FreeConnect = SQL_API_SQLFREECONNECT, - en_FreeEnv = SQL_API_SQLFREEENV, - - en_NullProc = SYSERR -}; - -typedef struct { - int type; /* must be 1st field */ - - HENV henv; /* driver's env list */ - HDBC hdbc; /* driver's dbc list */ - HERR herr; /* err list */ - int state; -} GENV_t; - -typedef struct { - HENV next; /* next attached env handle */ - int refcount; /* Driver's bookkeeping reference count */ - HPROC dllproc_tab[SQL_EXT_API_LAST + 1]; /* driver api calls */ - - HENV dhenv; /* driver env handle */ - HDLL hdll; /* drvier share library handle */ -} ENV_t; - -/* Note: - * - * - ODBC applications only know about global environment handle, - * a void pointer points to a GENV_t object. There is only one - * this object per process(however, to make the library reentrant, - * we still keep this object on heap). Applications only know - * address of this object and needn't care about its detail. - * - * - ODBC driver manager knows about instance environment handles, - * void pointers point to ENV_t objects. There are maybe more - * than one this kind of objects per process. However, multiple - * connections to a same data source(i.e. call same share library) - * will share one instance environment object. - * - * - ODBC drvier manager knows about their own environemnt handle, - * a void pointer point to a driver defined object. Every driver - * keeps one of its own environment object and driver manager - * keeps address of it by the 'dhenv' field in the instance - * environment object without care about its detail. - * - * - Applications can get driver's environment object handle by - * SQLGetInfo() with fInfoType equals to SQL_DRIVER_HENV - */ - -#endif diff --git a/src/iodbc/herr.c b/src/iodbc/herr.c deleted file mode 100644 index 9c299e6597..0000000000 --- a/src/iodbc/herr.c +++ /dev/null @@ -1,366 +0,0 @@ -/** Error stack management functions - - Copyright (C) 1995 by Ke Jin - - This program 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. -**/ - -#include <../iodbc/iodbc.h> - -#include <../iodbc/isql.h> -#include <../iodbc/isqlext.h> - -#include <../iodbc/dlproc.h> - -#include <../iodbc/herr.h> -#include <../iodbc/henv.h> -#include <../iodbc/hdbc.h> -#include <../iodbc/hstmt.h> - -#include <../iodbc/itrace.h> - -#include "../iodbc/herr.ci" -#include -#include - -static HERR _iodbcdm_popsqlerr( HERR herr ) -{ - sqlerr_t* list = (sqlerr_t*)herr; - sqlerr_t* next; - - if( herr == SQL_NULL_HERR ) - { - return herr; - } - - next = list->next; - - MEM_FREE (list); - - return next; -} - -void _iodbcdm_freesqlerrlist( HERR herrlist ) -{ - HERR list; - - for(list = herrlist; list!= 0; ) - { - list = _iodbcdm_popsqlerr(list); - } -} - -HERR _iodbcdm_pushsqlerr ( - HERR herr, - sqlstcode_t code, - char* msg ) -{ - sqlerr_t* ebuf; - sqlerr_t* perr = (sqlerr_t*)herr; - int idx = 0; - - if(herr != SQL_NULL_HERR ) - { - idx = perr->idx + 1; - } - - if( idx == 64 ) - /* over wirte the top entry to prevent error stack blow out */ - { - perr->code = code; - perr->msg = msg; - - return herr; - } - - ebuf = (sqlerr_t*)MEM_ALLOC (sizeof(sqlerr_t)); - - if( ebuf == NULL ) - { - return NULL; - } - - ebuf->msg = msg; - ebuf->code = code; - ebuf->idx = idx; - ebuf->next = (sqlerr_t*)herr; - - return (HERR)ebuf; -} - -static char FAR* _iodbcdm_getsqlstate ( - HERR herr, - void FAR* tab ) -{ - sqlerr_t* perr = (sqlerr_t*)herr; - sqlerrmsg_t* ptr; - - if( herr == SQL_NULL_HERR || tab == NULL ) - { - return (char FAR*)NULL; - } - - for( ptr = tab; - ptr->code != en_sqlstat_total; - ptr++ ) - { - if(ptr->code == perr->code) - { - return (char FAR*)(ptr->stat); - } - } - - return (char FAR*)NULL; -} - -static char FAR* _iodbcdm_getsqlerrmsg( - HERR herr, - void FAR* errtab ) -{ - sqlerr_t* perr = (sqlerr_t*)herr; - sqlerrmsg_t* ptr; - - if( herr == SQL_NULL_HERR ) - { - return NULL; - } - - if( perr->msg == NULL && errtab == NULL ) - { - return NULL; - } - - if( perr->msg != NULL ) - { - return perr->msg; - } - - for( ptr = (sqlerrmsg_t*)errtab; - ptr->code != en_sqlstat_total; - ptr++ ) - { - if( ptr->code == perr->code ) - { - return (char FAR*)ptr->msg; - } - } - - return (char FAR*)NULL; -} - -RETCODE SQL_API SQLError ( - HENV henv, - HDBC hdbc, - HSTMT hstmt, - UCHAR FAR* szSqlstate, - SDWORD FAR* pfNativeError, - UCHAR FAR* szErrorMsg, - SWORD cbErrorMsgMax, - SWORD FAR* pcbErrorMsg ) -{ - GENV_t FAR* genv = (GENV_t FAR*) henv; - DBC_t FAR* pdbc = (DBC_t FAR*) hdbc; - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HDBC thdbc; - - HENV dhenv = SQL_NULL_HENV; - HDBC dhdbc = SQL_NULL_HDBC; - HSTMT dhstmt = SQL_NULL_HSTMT; - - HERR herr = SQL_NULL_HERR; - HPROC hproc = SQL_NULL_HPROC; - - char FAR* errmsg = NULL; - char FAR* ststr = NULL; - - int handle = 0; - RETCODE retcode = SQL_SUCCESS; - - if( hstmt != SQL_NULL_HSTMT ) /* retrive stmt err */ - { - herr = pstmt->herr; - thdbc = pstmt->hdbc; - - if( thdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - hproc = _iodbcdm_getproc( thdbc, en_Error ); - dhstmt = pstmt->dhstmt; - handle = 3; - } - else if( hdbc != SQL_NULL_HDBC ) /* retrive dbc err */ - { - herr = pdbc->herr; - thdbc = hdbc; - if( thdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - hproc = _iodbcdm_getproc( thdbc, en_Error ); - dhdbc = pdbc->dhdbc; - handle = 2; - - if( herr == SQL_NULL_HERR - && pdbc->henv == SQL_NULL_HENV ) - { - return SQL_NO_DATA_FOUND; - } - } - else if( henv != SQL_NULL_HENV ) /* retrive env err */ - { - herr = genv->herr; - - /* Drivers shouldn't push error message - * on envoriment handle */ - - if( herr == SQL_NULL_HERR ) - { - return SQL_NO_DATA_FOUND; - } - - handle = 1; - } - else - { - return SQL_INVALID_HANDLE; - } - - if( szErrorMsg != NULL ) - { - if( cbErrorMsgMax < 0 - || cbErrorMsgMax > SQL_MAX_MESSAGE_LENGTH - 1 ) - { - return SQL_ERROR; - /* SQLError() doesn't post error for itself */ - } - } - - if( herr == SQL_NULL_HERR ) /* no err on drv mng */ - { - /* call driver */ - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( thdbc, retcode, hproc, en_Error, ( - dhenv, dhdbc, dhstmt, - szSqlstate, pfNativeError, - szErrorMsg, cbErrorMsgMax, pcbErrorMsg) ) - -#if 0 - retcode = hproc(dhenv, dhdbc, dhstmt, - szSqlstate, pfNativeError, - szErrorMsg, cbErrorMsgMax, pcbErrorMsg); -#endif - - return retcode; - } - - if( szSqlstate != NULL ) - { - int len; - - /* get sql state string */ - ststr = (char FAR*)_iodbcdm_getsqlstate( herr, - (void FAR*)sqlerrmsg_tab ); - - if( ststr == NULL) - { - len = 0; - } - else - { - len = (int)STRLEN(ststr); - } - - STRNCPY ( szSqlstate, ststr, len ); - szSqlstate[len] = 0; - /* buffer size of szSqlstate is not checked. Applications - * suppose provide enough ( not less than 6 bytes ) buffer - * or NULL for it. - */ - } - - if( pfNativeError != NULL ) - { - /* native error code is specific to data source */ - *pfNativeError = (SDWORD)0L; - } - - if( szErrorMsg == NULL || cbErrorMsgMax == 0 ) - { - if( pcbErrorMsg != NULL ) - { - *pcbErrorMsg = (SWORD)0; - } - } - else - { - int len; - char msgbuf[256] = { '\0' }; - - /* get sql state message */ - errmsg = _iodbcdm_getsqlerrmsg(herr, - (void FAR*)sqlerrmsg_tab); - - if(errmsg == NULL) - { - errmsg = (char FAR*)""; - } - - sprintf(msgbuf, "%s%s", sqlerrhd, errmsg); - - len = STRLEN( msgbuf ); - - if( len < cbErrorMsgMax - 1 ) - { - retcode = SQL_SUCCESS; - } - else - { - len = cbErrorMsgMax - 1; - retcode = SQL_SUCCESS_WITH_INFO; - /* and not posts error for itself */ - } - - STRNCPY((char*)szErrorMsg, msgbuf, len); - szErrorMsg[len] = 0; - - if( pcbErrorMsg != NULL) - { - *pcbErrorMsg = (SWORD)len; - } - } - - switch(handle) /* free this err */ - { - case 1: - genv->herr = _iodbcdm_popsqlerr(genv->herr); - break; - - case 2: - pdbc->herr = _iodbcdm_popsqlerr(pdbc->herr); - break; - - case 3: - pstmt->herr= _iodbcdm_popsqlerr(pstmt->herr); - break; - - default: - break; - } - - return retcode; -} diff --git a/src/iodbc/herr.ci b/src/iodbc/herr.ci deleted file mode 100644 index d502850933..0000000000 --- a/src/iodbc/herr.ci +++ /dev/null @@ -1,98 +0,0 @@ -static const sqlerrmsg_t sqlerrmsg_tab[] = -{ - en_00000, "00000", "", - en_01000, "01000", "General warning", - en_01002, "01002", "Disconnect error", - en_01004, "01004", "Data truncated", - en_01006, "01006", "Privilege not revoked", - en_01S00, "01S00", "Invalid connection string attribute", - en_01S01, "01S01", "Error in row", - en_01S02, "01S02", "Optional value changed", - en_01S03, "01S03", "No rows updated or deleted", - en_01S04, "01S04", "More than one row updated or deleted", - en_07001, "07001", "Wrong number of parameters", - en_07006, "07006", "Restricted data type attribute violation", - en_08001, "08001", "Unable to connect to data source", - en_08002, "08002", "Connection in use", - en_08003, "08003", "Connect not open", - en_08004, "08004", "Data source rejected establishment of connection", - en_08007, "08007", "Connection failure during transaction", - en_08S01, "08S01", "Communication link failure", - en_21S01, "21S01", "Insert value list does not match", - en_21S02, "21S02", "Degree of derived table does not match column list", - en_22001, "22001", "String data right truncation", - en_22003, "22003", "Numeric value out of range", - en_22005, "22005", "Error in assignment", - en_22008, "22008", "Datetime field overflow", - en_22012, "22012", "Division by zero", - en_22026, "22026", "String data, length mismatch", - en_23000, "23000", "Integrity constraint violation", - en_24000, "24000", "Invalid cursor state", - en_25000, "25000", "Invalid transaction state", - en_28000, "28000", "Invalid authorization specification", - en_34000, "34000", "Invalid cursor name", - en_37000, "37000", "Syntex error or access violation", - en_3C000, "3C000", "Duplicate cursor name", - en_40001, "40001", "Serialization failure", - en_42000, "42000", "Syntax error or access violation", - en_70100, "70100", "Operation aborted", - en_IM001, "IM001", "Driver does not support this function", - en_IM002, "IM002", "Data source name not found and no default " - "driver specified. Driver could not be loaded", - en_IM003, "IM003", "Specified driver could not be loaded", - en_IM004, "IM004", "Driver's SQLAllocEnv() failed", - en_IM005, "IM005", "Driver's SQLAllocConnect() failed", - en_IM006, "IM006", "Driver's SQLSetConnectOption failed", - en_IM007, "IM007", "No data source or driver specified, dialog prohibited", - en_IM008, "IM008", "Dialog failed", - en_IM009, "IM009", "Unable to load translation DLL", - en_IM010, "IM010", "Data source name too long", - en_IM011, "IM011", "Driver name too long", - en_IM012, "IM012", "DRIVER keyword syntax error", - en_IM013, "IM013", "Trace file error", - en_IM014, "IM014", "Try to change tracing file while tracing is on", - en_S0001, "S0001", "Base table or view already exists", - en_S0002, "S0002", "Base table not found", - en_S0011, "S0011", "Index already exists", - en_S0012, "S0012", "Index not found", - en_S0021, "S0021", "Column already exists", - en_S0022, "S0022", "Column not found", - en_S0023, "S0023", "No default for column", - en_S1000, "S1000", "General error", - en_S1001, "S1001", "Memory allocation failure", - en_S1002, "S1002", "Invalid column number", - en_S1003, "S1003", "Program type out of range", - en_S1004, "S1004", "SQL data type out of range", - en_S1008, "S1008", "Operation canceled", - en_S1009, "S1009", "Invalid argument value", - en_S1010, "S1010", "Function sequence error", - en_S1011, "S1011", "Operation invalid at this time", - en_S1012, "S1012", "Invalid transaction operation code specified", - en_S1015, "S1015", "No cursor name available", - en_S1090, "S1090", "Invalid string or buffer length", - en_S1091, "S1091", "Descriptor type out of range", - en_S1092, "S1092", "Option type out of range", - en_S1093, "S1093", "Invalid parameter", - en_S1094, "S1094", "Invalid scale value", - en_S1095, "S1095", "Function type out of range", - en_S1096, "S1096", "Information type out of range", - en_S1097, "S1097", "Column type out of range", - en_S1098, "S1098", "Scope type out of range", - en_S1099, "S1099", "Nullable type out of range", - en_S1100, "S1100", "Uniquenss option type out of range", - en_S1101, "S1101", "Accuracy option type out of range", - en_S1103, "S1103", "Direction option out of range", - en_S1104, "S1104", "Invalid precision value", - en_S1105, "S1105", "Invalid parameter type", - en_S1106, "S1106", "Fetch type out of range", - en_S1107, "S1107", "Row value out of range", - en_S1108, "S1108", "Concurrency option out of range", - en_S1109, "S1109", "Invalid cursor position", - en_S1110, "S1110", "Invalid driver completion", - en_S1111, "S1111", "Invalid bookmark value", - en_S1C00, "S1C00", "Driver not capable", - en_S1T00, "S1T00", "Timeout expired", - en_sqlstat_total, NULL, NULL -}; - -static char FAR* sqlerrhd = "[iODBC][Driver Manager]"; diff --git a/src/iodbc/herr.h b/src/iodbc/herr.h deleted file mode 100644 index e01941d463..0000000000 --- a/src/iodbc/herr.h +++ /dev/null @@ -1,125 +0,0 @@ -#ifndef _HERR_H -#define _HERR_H - -typedef enum { - en_00000 = 0, - en_01000, - en_01002, - en_01004, - en_01006, - en_01S00, - en_01S01, - en_01S02, - en_01S03, - en_01S04, - en_07001, - en_07006, - en_08001, - en_08002, - en_08003, - en_08004, - en_08007, - en_08S01, - en_21S01, - en_21S02, - en_22001, - en_22003, - en_22005, - en_22008, - en_22012, - en_22026, - en_23000, - en_24000, - en_25000, - en_28000, - en_34000, - en_37000, - en_3C000, - en_40001, - en_42000, - en_70100, - en_IM001, - en_IM002, - en_IM003, - en_IM004, - en_IM005, - en_IM006, - en_IM007, - en_IM008, - en_IM009, - en_IM010, - en_IM011, - en_IM012, - en_IM013, - en_IM014, - en_S0001, - en_S0002, - en_S0011, - en_S0012, - en_S0021, - en_S0022, - en_S0023, - en_S1000, - en_S1001, - en_S1002, - en_S1003, - en_S1004, - en_S1008, - en_S1009, - en_S1010, - en_S1011, - en_S1012, - en_S1015, - en_S1090, - en_S1091, - en_S1092, - en_S1093, - en_S1094, - en_S1095, - en_S1096, - en_S1097, - en_S1098, - en_S1099, - en_S1100, - en_S1101, - en_S1103, - en_S1104, - en_S1105, - en_S1106, - en_S1107, - en_S1108, - en_S1109, - en_S1110, - en_S1111, - en_S1C00, - en_S1T00, - en_sqlstat_total -} sqlstcode_t; - -typedef void FAR* HERR; -# define SQL_NULL_HERR ((HERR)NULL) - -typedef struct -{ - sqlstcode_t code; - char FAR* stat; - char FAR* msg; -} sqlerrmsg_t; - -typedef struct sqlerr { - sqlstcode_t code; - int idx; - char FAR* msg; - struct sqlerr* next; -} sqlerr_t; - -extern void _iodbcdm_freesqlerrlist( HERR herr ); -extern HERR _iodbcdm_pushsqlerr ( HERR list, sqlstcode_t code, char* sysmsg ); - -# define PUSHSYSERR(list, msg) \ - list = (HERR)_iodbcdm_pushsqlerr( (HERR)(list), 0, (char*)msg ) -# define PUSHSQLERR(list, code) \ - list = (HERR)_iodbcdm_pushsqlerr( (HERR)(list), (int)(code), NULL ) - - -#endif /* _SQLERR_H */ diff --git a/src/iodbc/hstmt.c b/src/iodbc/hstmt.c deleted file mode 100644 index 0aec8ef807..0000000000 --- a/src/iodbc/hstmt.c +++ /dev/null @@ -1,598 +0,0 @@ -/** Query statement object management functions - - Copyright (C) 1995 by Ke Jin - - This program 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. -**/ - -#include <../iodbc/iodbc.h> - -#include <../iodbc/isql.h> -#include <../iodbc/isqlext.h> - -#include <../iodbc/dlproc.h> - -#include <../iodbc/herr.h> -#include <../iodbc/henv.h> -#include <../iodbc/hdbc.h> -#include <../iodbc/hstmt.h> - -#include <../iodbc/itrace.h> - -RETCODE SQL_API SQLAllocStmt ( - HDBC hdbc, - HSTMT FAR* phstmt ) -{ - DBC_t FAR* pdbc = (DBC_t FAR*)hdbc; - STMT_t FAR* pstmt = NULL; - HPROC hproc = SQL_NULL_HPROC; - RETCODE retcode = SQL_SUCCESS; - -#if (ODBCVER >= 0x0300) - if( hdbc == SQL_NULL_HDBC - || pdbc->type != SQL_HANDLE_DBC ) -#else - if( hdbc == SQL_NULL_HDBC ) -#endif - { - return SQL_INVALID_HANDLE; - } - - if( phstmt == NULL ) - { - PUSHSQLERR ( pdbc->herr, en_S1009 ); - - return SQL_ERROR; - } - - /* check state */ - switch( pdbc->state ) - { - case en_dbc_connected: - case en_dbc_hstmt: - break; - - case en_dbc_allocated: - case en_dbc_needdata: - PUSHSQLERR ( pdbc->herr, en_08003 ); - *phstmt = SQL_NULL_HSTMT; - return SQL_ERROR; - - default: - return SQL_INVALID_HANDLE; - } - - pstmt = (STMT_t FAR*)MEM_ALLOC(sizeof(STMT_t)); - - if( pstmt == NULL ) - { - PUSHSQLERR ( pdbc->herr, en_S1001 ); - *phstmt = SQL_NULL_HSTMT; - - return SQL_ERROR; - } - -#if (ODBCVER >= 0x0300) - pstmt->type = SQL_HANDLE_STMT; -#endif - /* initiate the object */ - pstmt->herr = SQL_NULL_HERR; - pstmt->hdbc = hdbc; - pstmt->state = en_stmt_allocated; - pstmt->cursor_state = en_stmt_cursor_no; - pstmt->prep_state = 0; - pstmt->asyn_on = en_NullProc; - pstmt->need_on = en_NullProc; - - /* call driver's function */ -#if (ODBCVER >= 0x0300) - hproc = _iodbcdm_getproc( hdbc, en_AllocHandle ); - - if( hproc ) - { - CALL_DRIVER ( pstmt->hdbc, hdbc, retcode, hproc, - en_AllocHandle, ( - SQL_HANDLE_STMT, - pdbc->dhdbc, - &(pstmt->dhstmt) ) ) - } - else -#endif - { - hproc = _iodbcdm_getproc( hdbc, en_AllocStmt ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - *phstmt = SQL_NULL_HSTMT; - MEM_FREE ( pstmt ); - - return SQL_ERROR; - } - - CALL_DRIVER ( hdbc, retcode, hproc, en_AllocStmt, ( - pdbc->dhdbc, &(pstmt->dhstmt) ) ) - } - - if( retcode != SQL_SUCCESS - && retcode != SQL_SUCCESS_WITH_INFO ) - { - *phstmt = SQL_NULL_HSTMT; - MEM_FREE ( pstmt ); - - return retcode; - } - - /* insert into list */ - pstmt->next = pdbc->hstmt; - pdbc->hstmt = pstmt; - - *phstmt = (HSTMT)pstmt; - - /* state transition */ - pdbc->state = en_dbc_hstmt; - - return SQL_SUCCESS; -} - -RETCODE _iodbcdm_dropstmt( HSTMT hstmt ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - STMT_t FAR* tpstmt; - DBC_t FAR* pdbc; - - if( hstmt == SQL_NULL_HSTMT ) - { - return SQL_INVALID_HANDLE; - } - - pdbc = (DBC_t FAR*)(pstmt->hdbc); - - for(tpstmt = (STMT_t FAR*)pdbc->hstmt; - tpstmt != NULL; - tpstmt = tpstmt->next ) - { - if(tpstmt == pstmt) - { - pdbc->hstmt = (HSTMT)pstmt->next; - break; - } - - if(tpstmt->next == pstmt) - { - tpstmt->next = pstmt->next; - break; - } - } - - if( tpstmt == NULL ) - { - return SQL_INVALID_HANDLE; - } - - _iodbcdm_freesqlerrlist(pstmt->herr); - MEM_FREE(hstmt); - - return SQL_SUCCESS; -} - -RETCODE SQL_API SQLFreeStmt ( - HSTMT hstmt, - UWORD fOption ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; -/* STMT_t FAR* tpstmt; */ - DBC_t FAR* pdbc; - - HPROC hproc = SQL_NULL_HPROC; - RETCODE retcode; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - pdbc = (DBC_t FAR*)(pstmt->hdbc); - - /* check option */ - switch( fOption ) - { - case SQL_DROP: - case SQL_CLOSE: - case SQL_UNBIND: - case SQL_RESET_PARAMS: - break; - - default: - PUSHSQLERR ( pstmt->herr, en_S1092 ); - return SQL_ERROR; - } - - /* check state */ - if( pstmt->state >= en_stmt_needdata - || pstmt->asyn_on != en_NullProc ) - { - PUSHSQLERR ( pstmt->herr, en_S1010 ); - - return SQL_ERROR; - } - - hproc = SQL_NULL_HPROC; - -#if (ODBCVER >= 0x0300) - if( fOption == SQL_DROP ) - { - hproc = _iodbcdm_getproc( pstmt->hdbc, en_FreeHandle ); - - if( hproc ) - { - CALL_DRIVER( pstmt->hdbc, retcode, hproc, en_FreeHandle, ( - SQL_HANDLE_STMT, pstmt->dhstmt ) - } - } -#endif - - if( hproc == SQL_NULL_HPROC ) - { - hproc = _iodbcdm_getproc( pstmt->hdbc, en_FreeStmt); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_FreeStmt, ( - pstmt->dhstmt, fOption) ) - } - - if( retcode != SQL_SUCCESS - && retcode != SQL_SUCCESS_WITH_INFO ) - { - return retcode; - } - - /* state transition */ - switch( fOption ) - { - case SQL_DROP: - /* delet this object (ignore return) */ - _iodbcdm_dropstmt( hstmt ); - break; - - case SQL_CLOSE: - pstmt->cursor_state = en_stmt_cursor_no; - /* This means cursor name set by - * SQLSetCursorName() call will also - * be erased. - */ - - switch( pstmt->state ) - { - case en_stmt_allocated: - case en_stmt_prepared: - break; - - case en_stmt_executed: - case en_stmt_cursoropen: - case en_stmt_fetched: - case en_stmt_xfetched: - if( pstmt->prep_state ) - { - pstmt->state = - en_stmt_prepared; - } - else - { - pstmt->state = - en_stmt_allocated; - } - break; - - default: - break; - } - break; - - case SQL_UNBIND: - case SQL_RESET_PARAMS: - default: - break; - } - - return retcode; -} - -RETCODE SQL_API SQLSetStmtOption ( - HSTMT hstmt, - UWORD fOption, - UDWORD vParam ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc; - int sqlstat = en_00000; - RETCODE retcode; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check option */ - if(/* fOption < SQL_STMT_OPT_MIN || */ - fOption > SQL_STMT_OPT_MAX ) - { - PUSHSQLERR ( pstmt->herr, en_S1092 ); - - return SQL_ERROR; - } - - if( fOption == SQL_CONCURRENCY - || fOption == SQL_CURSOR_TYPE - || fOption == SQL_SIMULATE_CURSOR - || fOption == SQL_USE_BOOKMARKS ) - { - if( pstmt->asyn_on != en_NullProc ) - { - if( pstmt->prep_state ) - { - sqlstat = en_S1011; - } - } - else - { - switch( pstmt->state ) - { - case en_stmt_prepared: - sqlstat = en_S1011; - break; - - case en_stmt_executed: - case en_stmt_cursoropen: - case en_stmt_fetched: - case en_stmt_xfetched: - sqlstat = en_24000; - break; - - case en_stmt_needdata: - case en_stmt_mustput: - case en_stmt_canput: - if( pstmt->prep_state ) - { - sqlstat = en_S1011; - } - break; - - default: - break; - } - } - } - else - { - if( pstmt->asyn_on != en_NullProc ) - { - if( ! pstmt->prep_state ) - { - sqlstat = en_S1010; - } - } - else - { - if( pstmt->state >= en_stmt_needdata ) - { - sqlstat = en_S1010; - } - } - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - hproc = _iodbcdm_getproc( pstmt->hdbc, en_SetStmtOption ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_SetStmtOption, ( - pstmt->dhstmt, fOption, vParam ) ) - -#if 0 - retcode = hproc ( pstmt->dhstmt, fOption, vParam ); -#endif - - return retcode; -} - -RETCODE SQL_API SQLGetStmtOption ( - HSTMT hstmt, - UWORD fOption, - PTR pvParam ) -{ - STMT_t FAR* pstmt = (STMT_t*)hstmt; - HPROC hproc; - int sqlstat = en_00000; - RETCODE retcode; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check option */ - if( /* fOption < SQL_STMT_OPT_MIN || */ - fOption > SQL_STMT_OPT_MAX ) - { - PUSHSQLERR ( pstmt->herr, en_S1092 ); - - return SQL_ERROR; - } - - /* check state */ - if( pstmt->state >= en_stmt_needdata - || pstmt->asyn_on != en_NullProc ) - { - sqlstat = en_S1010; - } - else - { - switch( pstmt->state ) - { - case en_stmt_allocated: - case en_stmt_prepared: - case en_stmt_executed: - case en_stmt_cursoropen: - if( fOption == SQL_ROW_NUMBER - || fOption == SQL_GET_BOOKMARK ) - { - sqlstat = en_24000; - } - break; - - default: - break; - } - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - hproc = _iodbcdm_getproc( pstmt->hdbc, en_GetStmtOption); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_GetStmtOption, ( - pstmt->dhstmt, fOption, pvParam ) ) - -#if 0 - retcode = hproc ( pstmt->dhstmt, fOption, pvParam ); -#endif - - return retcode; -} - -RETCODE SQL_API SQLCancel ( HSTMT hstmt ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc; - RETCODE retcode; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check argument */ - /* check state */ - - /* call driver */ - hproc = _iodbcdm_getproc( pstmt->hdbc, en_Cancel ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_Cancel, (pstmt->dhstmt) ) - -#if 0 - retcode = hproc ( pstmt->dhstmt ); -#endif - - /* state transition */ - if( retcode != SQL_SUCCESS - && retcode != SQL_SUCCESS_WITH_INFO ) - { - return retcode; - } - - switch( pstmt->state ) - { - case en_stmt_allocated: - case en_stmt_prepared: - break; - - case en_stmt_executed: - if( pstmt->prep_state ) - { - pstmt->state = en_stmt_prepared; - } - else - { - pstmt->state = en_stmt_allocated; - } - break; - - case en_stmt_cursoropen: - case en_stmt_fetched: - case en_stmt_xfetched: - if( pstmt->prep_state ) - { - pstmt->state = en_stmt_prepared; - } - else - { - pstmt->state = en_stmt_allocated; - } - break; - - case en_stmt_needdata: - case en_stmt_mustput: - case en_stmt_canput: - switch( pstmt->need_on ) - { - case en_ExecDirect: - pstmt->state = en_stmt_allocated; - break; - - case en_Execute: - pstmt->state = en_stmt_prepared; - break; - - case en_SetPos: - pstmt->state = en_stmt_xfetched; - break; - - default: - break; - } - pstmt->need_on = en_NullProc; - break; - - default: - break; - } - - return retcode; -} diff --git a/src/iodbc/hstmt.h b/src/iodbc/hstmt.h deleted file mode 100644 index 68403e4603..0000000000 --- a/src/iodbc/hstmt.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef _HSTMT_H -#define _HSTMT_H - -#include <../iodbc/config.h> - -#include <../iodbc/isql.h> -#include <../iodbc/isqlext.h> - -typedef struct STMT -{ - int type; /* must be 1st field */ - - struct STMT* next; - - HERR herr; - HDBC hdbc; /* back point to connection object */ - HSTMT dhstmt; /* driver's stmt handle */ - - int state; - int cursor_state; - int prep_state; - int asyn_on; /* async executing which odbc call */ - int need_on; /* which call return SQL_NEED_DATA */ -} STMT_t; - -enum { - en_stmt_allocated = 0, - en_stmt_prepared, - en_stmt_executed, - en_stmt_cursoropen, - en_stmt_fetched, - en_stmt_xfetched, - en_stmt_needdata, /* not call SQLParamData() yet */ - en_stmt_mustput, /* not call SQLPutData() yet */ - en_stmt_canput /* SQLPutData() called */ -}; /* for statement handle state */ - -enum { - en_stmt_cursor_no = 0, - en_stmt_cursor_named, - en_stmt_cursor_opened, - en_stmt_cursor_fetched, - en_stmt_cursor_xfetched -}; /* for statement cursor state */ - -extern RETCODE _iodbcdm_dropstmt(); - -#endif diff --git a/src/iodbc/info.c b/src/iodbc/info.c deleted file mode 100644 index 600bcc6a3a..0000000000 --- a/src/iodbc/info.c +++ /dev/null @@ -1,392 +0,0 @@ -/** Information functions - - Copyright (C) 1995 by Ke Jin - - This program 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. -**/ - -#include <../iodbc/iodbc.h> - -#include <../iodbc/isql.h> -#include <../iodbc/isqlext.h> - -#include <../iodbc/dlproc.h> - -#include <../iodbc/herr.h> -#include <../iodbc/henv.h> -#include <../iodbc/hdbc.h> -#include <../iodbc/hstmt.h> - -#include <../iodbc/itrace.h> - -#include -#include - -RETCODE SQL_API SQLDataSources( - HENV henv, - UWORD fDir, - UCHAR FAR* szDSN, - SWORD cbDSNMax, - SWORD FAR* pcbDSN, - UCHAR FAR* szDesc, - SWORD cbDescMax, - SWORD FAR* pcbDesc ) -{ - GENV_t FAR* genv = (GENV_t FAR*)henv; - - if( henv == SQL_NULL_HENV ) - { - return SQL_INVALID_HANDLE; - } - - /* check argument */ - if( cbDSNMax < 0 || cbDescMax < 0 ) - { - PUSHSQLERR ( genv->herr, en_S1090 ); - - return SQL_ERROR; - } - - if( fDir != SQL_FETCH_FIRST - && fDir != SQL_FETCH_NEXT ) - { - PUSHSQLERR ( genv->herr, en_S1103 ); - - return SQL_ERROR; - } - - /*************************/ - - return SQL_NO_DATA_FOUND; -} - -RETCODE SQL_API SQLDrivers( - HENV henv, - UWORD fDir, - UCHAR FAR* szDrvDesc, - SWORD cbDrvDescMax, - SWORD FAR* pcbDrvDesc, - UCHAR FAR* szDrvAttr, - SWORD cbDrvAttrMax, - SWORD FAR* pcbDrvAttr ) -{ - GENV_t FAR* genv = (GENV_t FAR*)henv; - - if( henv == SQL_NULL_HENV ) - { - return SQL_INVALID_HANDLE; - } - - if( cbDrvDescMax < 0 - || cbDrvAttrMax < 0 - || cbDrvAttrMax == 1 ) - { - PUSHSQLERR ( genv->herr, en_S1090 ); - - return SQL_ERROR; - } - - if( fDir != SQL_FETCH_FIRST - || fDir != SQL_FETCH_NEXT ) - { - PUSHSQLERR ( genv->herr, en_S1103 ); - - return SQL_ERROR; - } - - /*********************/ - return SQL_SUCCESS; -} - - -RETCODE SQL_API SQLGetInfo( - HDBC hdbc, - UWORD fInfoType, - PTR rgbInfoValue, - SWORD cbInfoValueMax, - SWORD FAR* pcbInfoValue ) -{ - DBC_t FAR* pdbc = (DBC_t FAR*)hdbc; - ENV_t FAR* penv; - STMT_t FAR* pstmt = NULL; - STMT_t FAR* tpstmt; - HPROC hproc; - RETCODE retcode = SQL_SUCCESS; - - DWORD dword = 0; - int size = 0, len = 0; - char buf[16] = { '\0' }; - - if( hdbc == SQL_NULL_HDBC - || pdbc->henv == SQL_NULL_HENV ) - { - return SQL_INVALID_HANDLE; - } - - if( cbInfoValueMax < 0 ) - { - PUSHSQLERR ( pdbc->herr, en_S1090 ); - - return SQL_ERROR; - } - - if( /* fInfoType < SQL_INFO_FIRST || */ - ( fInfoType > SQL_INFO_LAST - && fInfoType < SQL_INFO_DRIVER_START ) ) - { - PUSHSQLERR ( pdbc->herr, en_S1096 ); - - return SQL_ERROR; - } - - if( fInfoType == SQL_ODBC_VER ) - { - sprintf( buf, "%02d.%02d", - (ODBCVER)>>8, 0x00FF&(ODBCVER) ); - - - if( rgbInfoValue != NULL - && cbInfoValueMax > 0 ) - { - len = STRLEN( buf ); - - if( len < cbInfoValueMax - 1 ) - { - len = cbInfoValueMax - 1; - PUSHSQLERR ( pdbc->herr, en_01004 ); - - retcode = SQL_SUCCESS_WITH_INFO; - } - - STRNCPY( rgbInfoValue, buf, len ); - ((char FAR*)rgbInfoValue)[len] = '\0'; - } - - if( pcbInfoValue != NULL ) - { - *pcbInfoValue = (SWORD)len; - } - - return retcode; - } - - if( pdbc->state == en_dbc_allocated - || pdbc->state == en_dbc_needdata ) - { - PUSHSQLERR ( pdbc->herr, en_08003 ); - - return SQL_ERROR; - } - - switch( fInfoType ) - { - case SQL_DRIVER_HDBC: - dword = (DWORD)(pdbc->dhdbc); - size = sizeof(dword); - break; - - case SQL_DRIVER_HENV: - penv = (ENV_t FAR*)(pdbc->henv); - dword = (DWORD)(penv->dhenv); - size = sizeof(dword); - break; - - case SQL_DRIVER_HLIB: - penv = (ENV_t FAR*)(pdbc->henv); - dword = (DWORD)(penv->hdll); - size = sizeof(dword); - break; - - case SQL_DRIVER_HSTMT: - if( rgbInfoValue != NULL ) - { - pstmt = *((STMT_t FAR**)rgbInfoValue); - } - - for( tpstmt = (STMT_t FAR*)(pdbc->hstmt); - tpstmt != NULL; - tpstmt = tpstmt->next ) - { - if( tpstmt == pstmt ) - { - break; - } - } - - if( tpstmt == NULL ) - { - PUSHSQLERR ( pdbc->herr, en_S1009 ); - - return SQL_ERROR; - } - - dword = (DWORD)(pstmt->dhstmt); - size = sizeof(dword); - break; - - default: - break; - } - - if( size ) - { - if( rgbInfoValue != NULL ) - { - *((DWORD*)rgbInfoValue) = dword; - } - - if( pcbInfoValue != NULL ) - { - *(pcbInfoValue) = (SWORD)size; - } - - return SQL_SUCCESS; - } - - hproc = _iodbcdm_getproc( hdbc, en_GetInfo ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pdbc->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( hdbc, retcode, hproc, en_GetInfo, ( - pdbc->dhdbc, - fInfoType, - rgbInfoValue, - cbInfoValueMax, - pcbInfoValue ) ) - -#if 0 - retcode = hproc(pdbc->dhdbc, - fInfoType, - rgbInfoValue, - cbInfoValueMax, - pcbInfoValue ); -#endif - - if( retcode == SQL_ERROR - && fInfoType == SQL_DRIVER_ODBC_VER ) - { - STRCPY( buf, "01.00" ); - - if( rgbInfoValue != NULL - && cbInfoValueMax > 0 ) - { - len = STRLEN( buf ); - - if( len < cbInfoValueMax - 1 ) - { - len = cbInfoValueMax - 1; - PUSHSQLERR ( pdbc->herr, en_01004 ); - } - - STRNCPY( rgbInfoValue, buf, len ); - ((char FAR*)rgbInfoValue)[len] = '\0'; - } - - if( pcbInfoValue != NULL ) - { - *pcbInfoValue = (SWORD)len; - } - - /* what should we return in this case ???? */ - } - - return retcode; -} - -RETCODE SQL_API SQLGetFunctions( - HDBC hdbc, - UWORD fFunc, - UWORD FAR* pfExists ) -{ - DBC_t FAR* pdbc = (DBC_t FAR*)hdbc; - HPROC hproc; - RETCODE retcode; - - if( hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - if( fFunc > SQL_EXT_API_LAST ) - { - PUSHSQLERR ( pdbc->herr, en_S1095 ); - - return SQL_ERROR; - } - - if( pdbc->state == en_dbc_allocated - || pdbc->state == en_dbc_needdata ) - { - PUSHSQLERR ( pdbc->herr, en_S1010 ); - - return SQL_ERROR; - } - - if( pfExists == NULL ) - { - return SQL_SUCCESS; - } - - hproc = _iodbcdm_getproc( hdbc, en_GetFunctions ); - - if( hproc != SQL_NULL_HPROC ) - { - CALL_DRIVER ( hdbc, retcode, hproc, en_GetFunctions, ( - pdbc->dhdbc, fFunc, pfExists ) ) - -#if 0 - retcode = hproc( pdbc->dhdbc, fFunc, pfExists ); -#endif - return retcode; - } - - if( fFunc == SQL_API_SQLSETPARAM ) - { - fFunc = SQL_API_SQLBINDPARAMETER; - } - - if( fFunc != SQL_API_ALL_FUNCTIONS ) - { - hproc = _iodbcdm_getproc( hdbc, fFunc ); - - if( hproc == SQL_NULL_HPROC ) - { - *pfExists = (UWORD)0; - } - else - { - *pfExists = (UWORD)1; - } - - return SQL_SUCCESS; - } - - for( fFunc=0 ; fFunc < 100; fFunc ++ ) - { - hproc = _iodbcdm_getproc( hdbc, fFunc ); - - if( hproc == SQL_NULL_HPROC ) - { - pfExists[fFunc] = (UWORD)0; - } - else - { - pfExists[fFunc] = (UWORD)1; - } - } - - return SQL_SUCCESS; -} diff --git a/src/iodbc/iodbc.h b/src/iodbc/iodbc.h deleted file mode 100644 index e60123d0b2..0000000000 --- a/src/iodbc/iodbc.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef _CONFIG_H -#define _CONFIG_H - -# if !defined(WINDOWS) && !defined(WIN32_SYSTEM) -# define _UNIX_ - -# include -# include - -# define MEM_ALLOC(size) (malloc((size_t)(size))) -# define MEM_FREE(ptr) {if(ptr) free(ptr);} - -# define STRCPY(t, s) (strcpy((char*)(t), (char*)(s))) -# define STRNCPY(t,s,n) (strncpy((char*)(t), (char*)(s), (size_t)(n))) -# define STRCAT(t, s) (strcat((char*)(t), (char*)(s))) -# define STRNCAT(t,s,n) (strncat((char*)(t), (char*)(s), (size_t)(n))) -# define STREQ(a, b) (strcmp((char*)(a), (char*)(b)) == 0) -# define STRLEN(str) ((str)? strlen((char*)(str)):0) - -# define EXPORT -# define CALLBACK -# define FAR - - typedef signed short SSHOR; - typedef short WORD; - typedef long DWORD; - - typedef WORD WPARAM; - typedef DWORD LPARAM; - typedef void* HWND; - typedef int BOOL; - -# endif /* _UNIX_ */ - -# if defined(WINDOWS) || defined(WIN32_SYSTEM) - -# include -# include - -# ifdef _MSVC_ -# define MEM_ALLOC(size) (fmalloc((size_t)(size))) -# define MEM_FREE(ptr) ((ptr)? ffree((PTR)(ptr)):0)) -# define STRCPY(t, s) (fstrcpy((char FAR*)(t), (char FAR*)(s))) -# define STRNCPY(t,s,n) (fstrncpy((char FAR*)(t), (char FAR*)(s), (size_t)(n))) -# define STRLEN(str) ((str)? fstrlen((char FAR*)(str)):0) -# define STREQ(a, b) (fstrcmp((char FAR*)(a), (char FAR*)(b) == 0) -# endif - -# ifdef _BORLAND_ -# define MEM_ALLOC(size) (farmalloc((unsigned long)(size)) -# define MEM_FREE(ptr) ((ptr)? farfree((void far*)(ptr)):0) -# define STRCPY(t, s) (_fstrcpy((char FAR*)(t), (char FAR*)(s))) -# define STRNCPY(t,s,n) (_fstrncpy((char FAR*)(t), (char FAR*)(s), (size_t)(n))) -# define STRLEN(str) ((str)? _fstrlen((char FAR*)(str)):0) -# define STREQ(a, b) (_fstrcmp((char FAR*)(a), (char FAR*)(b) == 0) -# endif - -# endif /* WINDOWS */ - -# define SYSERR (-1) - -# ifndef NULL -# define NULL ((void FAR*)0UL) -# endif - -#endif diff --git a/src/iodbc/isql.h b/src/iodbc/isql.h deleted file mode 100644 index d26cbe8669..0000000000 --- a/src/iodbc/isql.h +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef _INTRINSIC_SQL_H -# define _INTRINSIC_SQL_H - -typedef unsigned char UCHAR; -typedef long int SDWORD; -typedef short int SWORD; -typedef unsigned long int UDWORD; -typedef unsigned short int UWORD; - -typedef void FAR* PTR; - -typedef void FAR* HENV; -typedef void FAR* HDBC; -typedef void FAR* HSTMT; - -typedef signed short RETCODE; - -# ifdef WIN32 -# define SQL_API __stdcall -# else -# define SQL_API EXPORT CALLBACK -# endif - -# define ODBCVER 0x0200 - -# define SQL_MAX_MESSAGE_LENGTH 512 -# define SQL_MAX_DSN_LENGTH 32 - -/* return code */ -# define SQL_INVALID_HANDLE (-2) -# define SQL_ERROR (-1) -# define SQL_SUCCESS 0 -# define SQL_SUCCESS_WITH_INFO 1 -# define SQL_NO_DATA_FOUND 100 - -/* standard SQL datatypes (agree with ANSI type numbering) */ -# define SQL_CHAR 1 -# define SQL_NUMERIC 2 -# define SQL_DECIMAL 3 -# define SQL_INTEGER 4 -# define SQL_SMALLINT 5 -# define SQL_FLOAT 6 -# define SQL_REAL 7 -# define SQL_DOUBLE 8 -# define SQL_VARCHAR 12 - -# define SQL_TYPE_MIN SQL_CHAR -# define SQL_TYPE_NULL 0 -# define SQL_TYPE_MAX SQL_VARCHAR - -/* C to SQL datatype mapping */ -# define SQL_C_CHAR SQL_CHAR -# define SQL_C_LONG SQL_INTEGER -# define SQL_C_SHORT SQL_SMALLINT -# define SQL_C_FLOAT SQL_REAL -# define SQL_C_DOUBLE SQL_DOUBLE -# define SQL_C_DEFAULT 99 - -# define SQL_NO_NULLS 0 -# define SQL_NULLABLE 1 -# define SQL_NULLABLE_UNKNOWN 2 - -/* some special length values */ -# define SQL_NULL_DATA (-1) -# define SQL_DATA_AT_EXEC (-2) -# define SQL_NTS (-3) - -/* SQLFreeStmt flag values */ -# define SQL_CLOSE 0 -# define SQL_DROP 1 -# define SQL_UNBIND 2 -# define SQL_RESET_PARAMS 3 - -/* SQLTransact flag values */ -# define SQL_COMMIT 0 -# define SQL_ROLLBACK 1 - -/* SQLColAttributes flag values */ -# define SQL_COLUMN_COUNT 0 -# define SQL_COLUMN_LABEL 18 -# define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL -# define SQL_COLUMN_DRIVER_START 1000 - -# define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT - -/* Null handles */ -# define SQL_NULL_HENV 0 -# define SQL_NULL_HDBC 0 -# define SQL_NULL_HSTMT 0 - -#endif diff --git a/src/iodbc/isqlext.h b/src/iodbc/isqlext.h deleted file mode 100644 index a4bae149c4..0000000000 --- a/src/iodbc/isqlext.h +++ /dev/null @@ -1,307 +0,0 @@ -#ifndef _INTRINSIC_SQLEXT_H -# define _INTRINSIC_SQLEXT_H - -# include <../iodbc/isql.h> - -# define SQL_STILL_EXECUTING 2 -# define SQL_NEED_DATA 99 - -/* extend SQL datatypes */ -# define SQL_DATE 9 -# define SQL_TIME 10 -# define SQL_TIMESTAMP 11 -# define SQL_LONGVARCHAR (-1) -# define SQL_BINARY (-2) -# define SQL_VARBINARY (-3) -# define SQL_LONGVARBINARY (-4) -# define SQL_BIGINT (-5) -# define SQL_TINYINT (-6) -# define SQL_BIT (-7) /* conflict with SQL3 ??? */ -# define SQL_TYPE_DRIVER_START (-80) - -/* C to SQL datatype mapping */ -# define SQL_C_DATE SQL_DATE -# define SQL_C_TIME SQL_TIME -# define SQL_C_TIMESTAMP SQL_TIMESTAMP -# define SQL_C_BINARY SQL_BINARY -# define SQL_C_BIT SQL_BIT -# define SQL_C_TINYINT SQL_TINYINT - -# define SQL_SIGNED_OFFSET (-20) -# define SQL_UNSIGNED_OFFSET (-22) - -# define SQL_C_SLONG (SQL_C_LONG + SQL_SIGNED_OFFSET) -# define SQL_C_SSHORT (SQL_C_SHORT + SQL_SIGNED_OFFSET) -# define SQL_C_STINYINT (SQL_TINYINT + SQL_SIGNED_OFFSET) -# define SQL_C_ULONG (SQL_C_LONG + SQL_UNSIGNED_OFFSET) -# define SQL_C_USHORT (SQL_C_SHORT + SQL_UNSIGNED_OFFSET) -# define SQL_C_UTINYINT (SQL_TINYINT + SQL_UNSIGNED_OFFSET) -# define SQL_C_BOOKMARK SQL_C_ULONG - -# if defined(SQL_TYPE_MIN) -# undef SQL_TYPE_MIN -# define SQL_TYPE_MIN SQL_BIT -/* Note:If SQL_BIT uses SQL3 value (i.e. 14) then, - * SQL_TYPE_MIN need to be defined as SQL_TINYINT - * (i.e. -6). - */ -# endif - -# define SQL_ALL_TYPES 0 - -/* SQLDriverConnect flag values */ -# define SQL_DRIVER_NOPROMPT 0 -# define SQL_DRIVER_COMPLETE 1 -# define SQL_DRIVER_PROMPT 2 -# define SQL_DRIVER_COMPLETE_REQUIRED 3 - -/* SQLSetParam extensions */ -# define SQL_DEFAULT_PARAM (-5) -# define SQL_IGNORE (-6) - -/* function number for SQLGetFunctions and _iodbcdm_getproc */ -# define SQL_API_SQLALLOCCONNECT 1 -# define SQL_API_SQLALLOCENV 2 -# define SQL_API_SQLALLOCSTMT 3 -# define SQL_API_SQLBINDCOL 4 -# define SQL_API_SQLCANCEL 5 -# define SQL_API_SQLCOLATTRIBUTES 6 -# define SQL_API_SQLCONNECT 7 -# define SQL_API_SQLDESCRIBECOL 8 -# define SQL_API_SQLDISCONNECT 9 -# define SQL_API_SQLERROR 10 -# define SQL_API_SQLEXECDIRECT 11 -# define SQL_API_SQLEXECUTE 12 -# define SQL_API_SQLFETCH 13 -# define SQL_API_SQLFREECONNECT 14 -# define SQL_API_SQLFREEENV 15 -# define SQL_API_SQLFREESTMT 16 -# define SQL_API_SQLGETCURSORNAME 17 -# define SQL_API_SQLNUMRESULTCOLS 18 -# define SQL_API_SQLPREPARE 19 -# define SQL_API_SQLROWCOUNT 20 -# define SQL_API_SQLSETCURSORNAME 21 -# define SQL_API_SQLSETPARAM 22 -# define SQL_API_SQLTRANSACT 23 - -# define SQL_NUM_FUNCTIONS 23 - -# define SQL_EXT_API_START 40 - -# define SQL_API_SQLCOLUMNS 40 - -# define SQL_API_SQLDRIVERCONNECT 41 -# define SQL_API_SQLGETCONNECTOPTION 42 -# define SQL_API_SQLGETDATA 43 -# define SQL_API_SQLGETFUNCTIONS 44 -# define SQL_API_SQLGETINFO 45 -# define SQL_API_SQLGETSTMTOPTION 46 -# define SQL_API_SQLGETTYPEINFO 47 -# define SQL_API_SQLPARAMDATA 48 -# define SQL_API_SQLPUTDATA 49 -# define SQL_API_SQLSETCONNECTOPTION 50 -# define SQL_API_SQLSETSTMTOPTION 51 -# define SQL_API_SQLSPECIALCOLUMNS 52 -# define SQL_API_SQLSTATISTICS 53 -# define SQL_API_SQLTABLES 54 - -# define SQL_API_SQLBROWSECONNECT 55 -# define SQL_API_SQLCOLUMNPRIVILEGES 56 -# define SQL_API_SQLDATASOURCES 57 -# define SQL_API_SQLDESCRIBEPARAM 58 -# define SQL_API_SQLEXTENDEDFETCH 59 -# define SQL_API_SQLFOREIGNKEYS 60 -# define SQL_API_SQLMORERESULTS 61 -# define SQL_API_SQLNATIVESQL 62 -# define SQL_API_SQLNUMPARAMS 63 -# define SQL_API_SQLPARAMOPTIONS 64 -# define SQL_API_SQLPRIMARYKEYS 65 -# define SQL_API_SQLPROCEDURECOLUMNS 66 -# define SQL_API_SQLPROCEDURES 67 -# define SQL_API_SQLSETPOS 68 -# define SQL_API_SQLSETSCROLLOPTIONS 69 -# define SQL_API_SQLTABLEPRIVILEGES 70 - -# define SQL_API_SQLDRIVERS 71 -# define SQL_API_SQLBINDPARAMETER 72 -# define SQL_EXT_API_LAST SQL_API_SQLBINDPARAMETER - -# define SQL_API_ALL_FUNCTIONS 0 - -/* SQLGetInfo infor number */ -# define SQL_INFO_FIRST 0 -# define SQL_DRIVER_HDBC 3 -# define SQL_DRIVER_HENV 4 -# define SQL_DRIVER_HSTMT 5 -# define SQL_DRIVER_NAME 6 -# define SQL_ODBC_VER 10 -# define SQL_CURSOR_COMMIT_BEHAVIOR 23 -# define SQL_CURSOR_ROLLBACK_BEHAVIOR 24 -# define SQL_DEFAULT_TXN_ISOLATION 26 - -# define SQL_TXN_ISOLATION_OPTION 72 -# define SQL_NON_NULLABLE_COLUMNS 75 - -# define SQL_DRIVER_HLIB 76 -# define SQL_DRIVER_ODBC_VER 77 - -# define SQL_QUALIFIER_LOCATION 114 - -# define SQL_INFO_LAST SQL_QUALIFIER_LOCATION - -# define SQL_INFO_DRIVER_START 1000 - - -/* SQL_TXN_ISOLATION_OPTION masks */ -# define SQL_TXN_READ_UNCOMMITTED 0x00000001L -# define SQL_TXN_READ_COMMITTED 0x00000002L -# define SQL_TXN_REPEATABLE_READ 0x00000004L -# define SQL_TXN_SERIALIZABLE 0x00000008L -# define SQL_TXN_VERSIONING 0x00000010L - -/* SQL_CURSOR_COMMIT_BEHAVIOR and SQL_CURSOR_ROLLBACK_BEHAVIOR values */ - -# define SQL_CB_DELETE 0x0000 -# define SQL_CB_CLOSE 0x0001 -# define SQL_CB_PRESERVE 0x0002 - -/* options for SQLGetStmtOption/SQLSetStmtOption */ -# define SQL_QUERY_TIMEOUT 0 -# define SQL_MAX_ROWS 1 -# define SQL_NOSCAN 2 -# define SQL_MAX_LENGTH 3 -# define SQL_ASYNC_ENABLE 4 -# define SQL_BIND_TYPE 5 -# define SQL_CURSOR_TYPE 6 -# define SQL_CONCURRENCY 7 -# define SQL_KEYSET_SIZE 8 -# define SQL_ROWSET_SIZE 9 -# define SQL_SIMULATE_CURSOR 10 -# define SQL_RETRIEVE_DATA 11 -# define SQL_USE_BOOKMARKS 12 -# define SQL_GET_BOOKMARK 13 /* GetStmtOption Only */ -# define SQL_ROW_NUMBER 14 /* GetStmtOption Only */ -# define SQL_STMT_OPT_MAX SQL_ROW_NUMBER - -# define SQL_STMT_OPT_MIN SQL_QUERY_TIMEOUT - - -/* SQL_QUERY_TIMEOUT options */ -# define SQL_QUERY_TIMEOUT_DEFAULT 0UL - -/* SQL_MAX_ROWS options */ -# define SQL_MAX_ROWS_DEFAULT 0UL - -/* SQL_MAX_LENGTH options */ -# define SQL_MAX_LENGTH_DEFAULT 0UL - -/* SQL_CONCURRENCY options */ -# define SQL_CONCUR_READ_ONLY 1 -# define SQL_CONCUR_LOCK 2 -# define SQL_CONCUR_ROWVER 3 -# define SQL_CONCUR_VALUES 4 - -/* options for SQLSetConnectOption/SQLGetConnectOption */ -# define SQL_ACCESS_MODE 101 -# define SQL_AUTOCOMMIT 102 -# define SQL_LOGIN_TIMEOUT 103 -# define SQL_OPT_TRACE 104 -# define SQL_OPT_TRACEFILE 105 -# define SQL_TRANSLATE_DLL 106 -# define SQL_TRANSLATE_OPTION 107 -# define SQL_TXN_ISOLATION 108 -# define SQL_CURRENT_QUALIFIER 109 -# define SQL_ODBC_CURSORS 110 -# define SQL_QUIET_MODE 111 -# define SQL_PACKET_SIZE 112 -# define SQL_CONN_OPT_MAX SQL_PACKET_SIZE -# define SQL_CONNECT_OPT_DRVR_START 1000 - -# define SQL_CONN_OPT_MIN SQL_ACCESS_MODE - -/* SQL_ACCESS_MODE options */ -# define SQL_MODE_READ_WRITE 0UL -# define SQL_MODE_READ_ONLY 1UL -# define SQL_MODE_DEFAULT SQL_MODE_READ_WRITE - -/* SQL_AUTOCOMMIT options */ -# define SQL_AUTOCOMMIT_OFF 0UL -# define SQL_AUTOCOMMIT_ON 1UL -# define SQL_AUTOCOMMIT_DEFAULT SQL_AUTOCOMMIT_ON - -/* SQL_LOGIN_TIMEOUT options */ -# define SQL_LOGIN_TIMEOUT_DEFAULT 15UL - -/* SQL_OPT_TRACE options */ -# define SQL_OPT_TRACE_OFF 0UL -# define SQL_OPT_TRACE_ON 1UL -# define SQL_OPT_TRACE_DEFAULT SQL_OPT_TRACE_OFF -# define SQL_OPT_TRACE_FILE_DEFAULT "odbc.log" - -/* SQL_ODBC_CURSORS options */ -# define SQL_CUR_USE_IF_NEEDED 0UL -# define SQL_CUR_USE_ODBC 1UL -# define SQL_CUR_USE_DRIVER 2UL -# define SQL_CUR_DEFAULT SQL_CUR_USE_DRIVER - -/* Column types and scopes in SQLSpecialColumns. */ -# define SQL_BEST_ROWID 1 -# define SQL_ROWVER 2 - -# define SQL_SCOPE_CURROW 0 -# define SQL_SCOPE_TRANSACTION 1 -# define SQL_SCOPE_SESSION 2 - -/* Operations in SQLSetPos */ -# define SQL_ADD 4 - -/* Lock options in SQLSetPos */ -# define SQL_LOCK_NO_CHANGE 0 -# define SQL_LOCK_EXCLUSIVE 1 -# define SQL_LOCK_UNLOCK 2 - -/* SQLExtendedFetch flag values */ -# define SQL_FETCH_NEXT 1 -# define SQL_FETCH_FIRST 2 -# define SQL_FETCH_LAST 3 -# define SQL_FETCH_PRIOR 4 -# define SQL_FETCH_ABSOLUTE 5 -# define SQL_FETCH_RELATIVE 6 -# define SQL_FETCH_BOOKMARK 8 - -/* Defines for SQLBindParameter/SQLProcedureColumns */ -# define SQL_PARAM_TYPE_UNKNOWN 0 -# define SQL_PARAM_INPUT 1 -# define SQL_PARAM_INPUT_OUTPUT 2 -# define SQL_RESULT_COL 3 -# define SQL_PARAM_OUTPUT 4 - -/* Defines used by Driver Manager for mapping SQLSetParam to SQLBindParameter */ -# define SQL_PARAM_TYPE_DEFAULT SQL_PARAM_INPUT_OUTPUT -# define SQL_SETPARAM_VALUE_MAX (-1L) - -/* SQLStatistics flag values */ -# define SQL_INDEX_UNIQUE 0 -# define SQL_INDEX_ALL 1 - -# define SQL_QUICK 0 -# define SQL_ENSURE 1 - -/* SQLSetScrollOption flag values */ -# define SQL_SCROLL_FORWARD_ONLY 0L -# define SQL_SCROLL_KEYSET_DRIVEN (-1L) -# define SQL_SCROLL_DYNAMIC (-2L) -# define SQL_SCROLL_STATIC (-3L) - -# ifdef __cplusplus - extern "C" { -# endif - -RETCODE SQL_API SQLSetConnectOption (HDBC, UWORD, UDWORD); -RETCODE SQL_API SQLNumResultCols ( HSTMT, SWORD FAR* ); - -# ifdef __cplusplus - } -# endif - -#endif diff --git a/src/iodbc/itrace.c b/src/iodbc/itrace.c deleted file mode 100644 index 106d7a3804..0000000000 --- a/src/iodbc/itrace.c +++ /dev/null @@ -1,104 +0,0 @@ -/** trace functions - - Copyright (C) 1995 by Ke Jin - - This program 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. -**/ - -#include <../iodbc/iodbc.h> - -#include <../iodbc/isql.h> -#include <../iodbc/isqlext.h> - -#include <../iodbc/dlproc.h> - -#include <../iodbc/itrace.h> - -#include <../iodbc/herr.h> -#include <../iodbc/henv.h> -#include "../iodbc/henv.ci" - -#include - -static int printreturn(void FAR* istm, int ret ) -{ - FILE FAR* stm = (FILE FAR*)istm; - char FAR* ptr = "Invalid return value"; - - switch( ret ) - { - case SQL_SUCCESS: - ptr = "SQL_SUCCESS"; - break; - - case SQL_SUCCESS_WITH_INFO: - ptr = "SQL_SUCCESS_WITH_INFO"; - break; - - case SQL_NO_DATA_FOUND: - ptr = "SQL_NO_DATA_FOUND"; - break; - - case SQL_NEED_DATA: - ptr = "SQL_NEED_DATA"; - break; - - case SQL_INVALID_HANDLE: - ptr = "SQL_INVALID_HANDLE"; - break; - - case SQL_ERROR: - ptr = "SQL_ERROR"; - break; - - case SQL_STILL_EXECUTING: - ptr = "SQL_STILL_EXECUTING"; - break; - - default: - break; - } - - fprintf( stm, "%s\n", ptr); - fflush( stm ); - - return 0; -} - -HPROC _iodbcdm_gettrproc(void FAR* istm, int procid, int type) -{ - FILE FAR* stm = (FILE FAR*)istm; - - if( type == TRACE_TYPE_DM2DRV ) - { - int i,j = 0; - - for(i=0;j != en_NullProc ;i++) - { - j = odbcapi_symtab[i].en_idx; - - if( j == procid ) - { - fprintf( stm, "\n%s ( ... )\n", - odbcapi_symtab[i].symbol); - - fflush( stm ); - } - } - } - - if( type == TRACE_TYPE_RETURN ) - { - return (HPROC)printreturn; - } - - return SQL_NULL_HPROC; -} diff --git a/src/iodbc/itrace.h b/src/iodbc/itrace.h deleted file mode 100644 index 6b4e850cba..0000000000 --- a/src/iodbc/itrace.h +++ /dev/null @@ -1,97 +0,0 @@ -#ifndef _ITRACE_H -# define _ITRACE_H - -# ifdef DEBUG -# ifndef NO_TRACE -# define NO_TRACE -# endif -# endif - -# define TRACE_TYPE_APP2DM 1 -# define TRACE_TYPE_DM2DRV 2 -# define TRACE_TYPE_DRV2DM 3 - -# define TRACE_TYPE_RETURN 4 - -extern HPROC _iodbcdm_gettrproc(void FAR* stm, int procid, int type); - -# ifdef NO_TRACE -# define TRACE_CALL( stm, trace_on, procid, plist ) -# else -# define TRACE_CALL( stm, trace_on, plist )\ - {\ - if( trace_on)\ - {\ - HPROC hproc;\ -\ - hproc = _iodbcdm_gettrproc(stm, procid, TRACE_TYPE_APP2DM);\ -\ - if( hproc )\ - hproc plist;\ - }\ - } -# endif - -# ifdef NO_TRACE -# define TRACE_DM2DRV( stm, procid, plist ) -# else -# define TRACE_DM2DRV( stm, procid, plist )\ - {\ - HPROC hproc;\ -\ - hproc = _iodbcdm_gettrproc(stm, procid, TRACE_TYPE_DM2DRV);\ -\ - if( hproc )\ - hproc plist;\ - } -# endif - -# ifdef NO_TRACE -# define TRACE_DRV2DM( stm, procid, plist ) -# else -# define TRACE_DRV2DM( stm, procid, plist ) \ - {\ - HPROC hproc;\ -\ - hproc = _iodbcdm_gettrproc( stm, procid, TRACE_TYPE_DRV2DM);\ -\ - if( hproc )\ - hproc plist;\ - } -# endif - -# ifdef NO_TRACE -# define TRACE_RETURN( stm, trace_on, ret ) -# else -# define TRACE_RETURN( stm, trace_on, ret )\ - {\ - if( trace_on ) {\ - HPROC hproc;\ -\ - hproc = _iodbcdm_gettrproc( stm, 0, TRACE_TYPE_RETURN);\ -\ - if( hproc )\ - hproc( stm, ret );\ - }\ - } -# endif - -# ifdef NO_TRACE -# define CALL_DRIVER( hdbc, ret, proc, procid, plist ) { ret = proc plist; } -# else -# define CALL_DRIVER( hdbc, ret, proc, procid, plist )\ - {\ - DBC_t FAR* pdbc = (DBC_t FAR*)(hdbc);\ -\ - if( pdbc->trace ) {\ - TRACE_DM2DRV( pdbc->tstm, procid, plist )\ - ret = proc plist;\ - TRACE_DRV2DM( pdbc->tstm, procid, plist )\ - TRACE_RETURN( pdbc->tstm, 1, ret )\ - }\ - else\ - ret = proc plist;\ - } -# endif - -#endif diff --git a/src/iodbc/main.c b/src/iodbc/main.c deleted file mode 100644 index d6062de7c0..0000000000 --- a/src/iodbc/main.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -/* entry function used to build a share library on AIX */ -int __start() -{ - return 0; -} diff --git a/src/iodbc/misc.c b/src/iodbc/misc.c deleted file mode 100644 index 4793645a12..0000000000 --- a/src/iodbc/misc.c +++ /dev/null @@ -1,380 +0,0 @@ -/** miscellaneous functions - - Copyright (C) 1995 by Ke Jin - - This program 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. -**/ - -#include <../iodbc/iodbc.h> - -#include <../iodbc/isql.h> -#include <../iodbc/isqlext.h> - -#include -#include - -static int -upper_strneq( - char* s1, - char* s2, - int n ) -{ - int i; - char c1 = 0, c2 = 0; - - for(i=1;i= 'a' && c1 <= 'z' ) - { - c1 += ('A' - 'a'); - } - else if( c1 == '\n' ) - { - c1 = '\0'; - } - - if( c2 >= 'a' && c2 <= 'z' ) - { - c2 += ('A' - 'a'); - } - else if( c2 == '\n' ) - { - c2 = '\0'; - } - - if( (c1 - c2) || !c1 || !c2 ) - { - break; - } - } - - return (int)!(c1 - c2); -} - -static char* /* return new position in input str */ -readtoken( - char* istr, /* old position in input buf */ - char* obuf ) /* token string ( if "\0", then finished ) */ -{ - for(; *istr && *istr != '\n' ; istr ++ ) - { - char c, nx; - - c = *(istr); - - if( c == ' ' || c == '\t' ) - { - continue; - } - - nx = *(istr + 1); - - *obuf = c; - obuf ++; - - if( c == ';' || c == '=' ) - { - istr ++; - break; - } - - if( nx == ' ' || nx == '\t' || nx == ';' || nx == '=' ) - { - istr ++; - break; - } - } - - *obuf = '\0'; - - return istr; -} - -#if !defined(WINDOWS) && !defined(WIN32) && !defined(OS2) -# include -# define UNIX_PWD -#endif - -static char* -getinitfile(char* buf, int size) -{ - int /* i, */ j; - char* ptr; - - j = STRLEN("/odbc.ini") + 1; - - if( size < j ) - { - return NULL; - } - -#if !defined(UNIX_PWD) - - i = GetWindowsDirectory((LPSTR)buf, size ); - - if( i == 0 || i > size - j ) - { - return NULL; - } - - sprintf( buf + i, "/odbc.ini"); - - return buf; -#else - ptr = (char*)getpwuid(getuid()); - - if( ptr == NULL ) - { - return NULL; - } - - ptr = ((struct passwd*)ptr)->pw_dir; - - if( ptr == NULL || *ptr == '\0' ) - { - ptr = "/home"; - } - - if( size < STRLEN(ptr) + j ) - { - return NULL; - } - - sprintf( buf, "%s%s", ptr, "/.odbc.ini"); - /* i.e. searching ~/.odbc.ini */ -#endif - - return buf; -} - -char* _iodbcdm_getkeyvalbydsn( - char* dsn, - int dsnlen, - char* keywd, - char* value, - int size ) -/* read odbc init file to resolve the value of specified - * key from named or defaulted dsn section - */ -{ - char buf[1024]; - char dsntk[SQL_MAX_DSN_LENGTH + 3] = { '[', '\0' }; - char token[1024]; /* large enough */ - FILE* file; - char pathbuf[1024]; - char* path; - -#define DSN_NOMATCH 0 -#define DSN_NAMED 1 -#define DSN_DEFAULT 2 - - int dsnid = DSN_NOMATCH; - int defaultdsn = DSN_NOMATCH; - - if( dsn == NULL || *dsn == 0 ) - { - dsn = "default"; - dsnlen = STRLEN(dsn); - } - - if( dsnlen == SQL_NTS ) - { - dsnlen = STRLEN(dsn); - } - - if( dsnlen <= 0 || keywd == NULL || buf == 0 || size <= 0 ) - { - return NULL; - } - - if( dsnlen > sizeof(dsntk) - 2 ) - { - return NULL; - } - - value[0] = '\0'; - - STRNCAT( dsntk, dsn, dsnlen ); - STRCAT( dsntk, "]" ); - - dsnlen = dsnlen + 2; - - path = getinitfile(pathbuf, sizeof(pathbuf)); - - if( path == NULL ) - { - return NULL; - } - - file = (FILE*)fopen(path, "r"); - - if( file == NULL ) - { - return NULL; - } - - for(;;) - { - char* str; - - str = fgets(buf, sizeof(buf), file); - - if( str == NULL ) - { - break; - } - - if( *str == '[' ) - { - if( upper_strneq(str, "[default]", STRLEN("[default]")) ) - { - /* we only read first dsn default dsn - * section (as well as named dsn). - */ - if( defaultdsn == DSN_NOMATCH ) - { - dsnid = DSN_DEFAULT; - defaultdsn = DSN_DEFAULT; - } - else - { - dsnid = DSN_NOMATCH; - } - - continue; - } - else if( upper_strneq( str, dsntk, dsnlen ) ) - { - dsnid = DSN_NAMED; - } - else - { - dsnid = DSN_NOMATCH; - } - - continue; - } - else if( dsnid == DSN_NOMATCH ) - { - continue; - } - - str = readtoken(str, token); - - if( upper_strneq( keywd, token, STRLEN(keywd)) ) - { - str = readtoken(str, token); - - if( ! STREQ( token, "=") ) - /* something other than = */ - { - continue; - } - - str = readtoken(str, token); - - if( STRLEN(token) > size - 1) - { - break; - } - - STRNCPY(value, token, size); - /* copy the value(i.e. next token) to buf */ - - if( dsnid != DSN_DEFAULT ) - { - break; - } - } - } - - fclose(file); - - return (*value)? value:NULL; -} - -char* _iodbcdm_getkeyvalinstr( - char* cnstr, - int cnlen, - char* keywd, - char* value, - int size ) -{ - char token[1024] = { '\0' }; - int flag = 0; - - if( cnstr == NULL || value == NULL - || keywd == NULL || size < 1 ) - { - return NULL; - } - - if( cnlen == SQL_NTS ) - { - cnlen = STRLEN (cnstr); - } - - if( cnlen <= 0 ) - { - return NULL; - } - - for(;;) - { - cnstr = readtoken(cnstr, token); - - if( *token == '\0' ) - { - break; - } - - if( STREQ( token, ";" ) ) - { - flag = 0; - continue; - } - - switch(flag) - { - case 0: - if( upper_strneq(token, keywd, strlen(keywd)) ) - { - flag = 1; - } - break; - - case 1: - if( STREQ( token, "=" ) ) - { - flag = 2; - } - break; - - case 2: - if( size < strlen(token) + 1 ) - { - return NULL; - } - - STRNCPY( value, token, size ); - - return value; - - default: - break; - } - } - - return NULL; -} diff --git a/src/iodbc/postgres/isql.h b/src/iodbc/postgres/isql.h deleted file mode 100644 index 4b622494d8..0000000000 --- a/src/iodbc/postgres/isql.h +++ /dev/null @@ -1,188 +0,0 @@ -#ifndef _INTRINSIC_SQL_H -# define _INTRINSIC_SQL_H - -#ifndef OS2 -typedef unsigned char UCHAR; -#endif -typedef long int SDWORD; -typedef short int SWORD; -typedef unsigned long int UDWORD; -typedef unsigned short int UWORD; - -#ifndef FAR -# define FAR -#endif -#ifndef NEAR -# define NEAR -#endif -#ifndef HANDLE - typedef int HANDLE; - #endif -#ifndef HGLOBAL - typedef HANDLE HGLOBAL; - #endif -#ifndef SQL_INDEX_OTHER -#define SQL_INDEX_OTHER 3 - #endif - -# ifndef BOOL -# define BOOL int -# endif -# ifndef CHAR -# define CHAR char -# endif -# ifndef FALSE -# define FALSE (0 != 0) -# endif -# ifndef HWND -# define HWND int -# endif -# ifndef SQLHWND -# define SQLHWND int -# endif -# ifndef LONG -# define LONG long -# endif -# ifndef PASCAL -# define PASCAL -# endif -# ifndef SHORT -# define SHORT short -# endif -# ifndef SQL_API -# define SQL_API -# endif -# ifndef SQL_LOCAL_API -# define SQL_LOCAL_API -# endif -# ifndef TRUE -# define TRUE (0 == 0) -# endif - -typedef struct tagDATE_STRUCT -{ -SWORD year; -UWORD month; -UWORD day; -} DATE_STRUCT; - -typedef struct tagTIME_STRUCT -{ -UWORD hour; -UWORD minute; -UWORD second; -} TIME_STRUCT; - -typedef struct tagTIMESTAMP_STRUCT -{ -SWORD year; -UWORD month; -UWORD day; -UWORD hour; -UWORD minute; -UWORD second; -UDWORD fraction; -} TIMESTAMP_STRUCT; - - - -typedef UCHAR FAR* PTR, - FAR* SQLPTR; - -typedef void FAR* HENV, - FAR* SQLHENV; -typedef void FAR* HDBC, - FAR* SQLHDBC; -typedef void FAR* HSTMT, - FAR* SQLHSTMT; -typedef SDWORD SQLINTEGER; -typedef signed short RETCODE; -typedef UCHAR SQLCHAR; -typedef UWORD SQLUSMALLINT; -typedef PTR SQLPOINTER; -typedef SWORD SQLSMALLINT; -typedef UDWORD SQLUINTEGER; - -# ifdef WIN32 -# define SQL_API __stdcall -# else -# define SQL_API /* giovanni EXPORT CALLBACK */ -# endif -# ifdef OS2 -# ifdef BCPP -# define _Optlink -# define _System _syscall -# endif -# undef SQL_API -# define SQL_API _System -# endif - -# define ODBCVER 0x0200 - -# define SQL_MAX_MESSAGE_LENGTH 512 -# define SQL_MAX_DSN_LENGTH 32 - -/* return code */ -# define SQL_INVALID_HANDLE (-2) -# define SQL_ERROR (-1) -# define SQL_SUCCESS 0 -# define SQL_SUCCESS_WITH_INFO 1 -# define SQL_NO_DATA_FOUND 100 - -/* standard SQL datatypes (agree with ANSI type numbering) */ -# define SQL_CHAR 1 -# define SQL_NUMERIC 2 -# define SQL_DECIMAL 3 -# define SQL_INTEGER 4 -# define SQL_SMALLINT 5 -# define SQL_FLOAT 6 -# define SQL_REAL 7 -# define SQL_DOUBLE 8 -# define SQL_VARCHAR 12 - -# define SQL_TYPE_MIN SQL_CHAR -# define SQL_TYPE_NULL 0 -# define SQL_TYPE_MAX SQL_VARCHAR - -/* C to SQL datatype mapping */ -# define SQL_C_CHAR SQL_CHAR -# define SQL_C_LONG SQL_INTEGER -# define SQL_C_SHORT SQL_SMALLINT -# define SQL_C_FLOAT SQL_REAL -# define SQL_C_DOUBLE SQL_DOUBLE -# define SQL_C_DEFAULT 99 - -# define SQL_NO_NULLS 0 -# define SQL_NULLABLE 1 -# define SQL_NULLABLE_UNKNOWN 2 - -/* some special length values */ -# define SQL_NULL_DATA (-1) -# define SQL_DATA_AT_EXEC (-2) -# define SQL_NTS (-3) - -/* SQLFreeStmt flag values */ -# define SQL_CLOSE 0 -# define SQL_DROP 1 -# define SQL_UNBIND 2 -# define SQL_RESET_PARAMS 3 - -/* SQLTransact flag values */ -# define SQL_COMMIT 0 -# define SQL_ROLLBACK 1 - -/* SQLColAttributes flag values */ -# define SQL_COLUMN_COUNT 0 -# define SQL_COLUMN_LABEL 18 -# define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL -# define SQL_COLUMN_DRIVER_START 1000 - -# define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT - -/* Null handles */ -# define SQL_NULL_HENV 0 -# define SQL_NULL_HDBC 0 -# define SQL_NULL_HSTMT 0 - -#endif - diff --git a/src/iodbc/postgres/isqlext.h b/src/iodbc/postgres/isqlext.h deleted file mode 100644 index 164ea16253..0000000000 --- a/src/iodbc/postgres/isqlext.h +++ /dev/null @@ -1,321 +0,0 @@ -#ifndef _INTRINSIC_SQLEXT_H -# define _INTRINSIC_SQLEXT_H - -# include <../iodbc/postgres/isql.h> - -# define SQL_STILL_EXECUTING 2 -# define SQL_NEED_DATA 99 - -/* extend SQL datatypes */ -# define SQL_DATE 9 -# define SQL_TIME 10 -# define SQL_TIMESTAMP 11 -# define SQL_LONGVARCHAR (-1) -# define SQL_BINARY (-2) -# define SQL_VARBINARY (-3) -# define SQL_LONGVARBINARY (-4) -# define SQL_BIGINT (-5) -# define SQL_TINYINT (-6) -# define SQL_BIT (-7) /* conflict with SQL3 ??? */ -# define SQL_TYPE_DRIVER_START (-80) - -/* C to SQL datatype mapping */ -# define SQL_C_DATE SQL_DATE -# define SQL_C_TIME SQL_TIME -# define SQL_C_TIMESTAMP SQL_TIMESTAMP -# define SQL_C_BINARY SQL_BINARY -# define SQL_C_BIT SQL_BIT -# define SQL_C_TINYINT SQL_TINYINT - -# define SQL_SIGNED_OFFSET (-20) -# define SQL_UNSIGNED_OFFSET (-22) - -# define SQL_C_SLONG (SQL_C_LONG + SQL_SIGNED_OFFSET) -# define SQL_C_SSHORT (SQL_C_SHORT + SQL_SIGNED_OFFSET) -# define SQL_C_STINYINT (SQL_TINYINT + SQL_SIGNED_OFFSET) -# define SQL_C_ULONG (SQL_C_LONG + SQL_UNSIGNED_OFFSET) -# define SQL_C_USHORT (SQL_C_SHORT + SQL_UNSIGNED_OFFSET) -# define SQL_C_UTINYINT (SQL_TINYINT + SQL_UNSIGNED_OFFSET) -# define SQL_C_BOOKMARK SQL_C_ULONG - -# if defined(SQL_TYPE_MIN) -# undef SQL_TYPE_MIN -# define SQL_TYPE_MIN SQL_BIT -/* Note:If SQL_BIT uses SQL3 value (i.e. 14) then, - * SQL_TYPE_MIN need to be defined as SQL_TINYINT - * (i.e. -6). - */ -# endif - -# define SQL_ALL_TYPES 0 - -/* SQLDriverConnect flag values */ -# define SQL_DRIVER_NOPROMPT 0 -# define SQL_DRIVER_COMPLETE 1 -# define SQL_DRIVER_PROMPT 2 -# define SQL_DRIVER_COMPLETE_REQUIRED 3 - -/* SQLSetParam extensions */ -# define SQL_DEFAULT_PARAM (-5) -# define SQL_IGNORE (-6) - -/* function number for SQLGetFunctions and _iodbcdm_getproc */ -# define SQL_API_SQLALLOCCONNECT 1 -# define SQL_API_SQLALLOCENV 2 -# define SQL_API_SQLALLOCSTMT 3 -# define SQL_API_SQLBINDCOL 4 -# define SQL_API_SQLCANCEL 5 -# define SQL_API_SQLCOLATTRIBUTES 6 -# define SQL_API_SQLCONNECT 7 -# define SQL_API_SQLDESCRIBECOL 8 -# define SQL_API_SQLDISCONNECT 9 -# define SQL_API_SQLERROR 10 -# define SQL_API_SQLEXECDIRECT 11 -# define SQL_API_SQLEXECUTE 12 -# define SQL_API_SQLFETCH 13 -# define SQL_API_SQLFREECONNECT 14 -# define SQL_API_SQLFREEENV 15 -# define SQL_API_SQLFREESTMT 16 -# define SQL_API_SQLGETCURSORNAME 17 -# define SQL_API_SQLNUMRESULTCOLS 18 -# define SQL_API_SQLPREPARE 19 -# define SQL_API_SQLROWCOUNT 20 -# define SQL_API_SQLSETCURSORNAME 21 -# define SQL_API_SQLSETPARAM 22 -# define SQL_API_SQLTRANSACT 23 - -# define SQL_NUM_FUNCTIONS 23 - -# define SQL_EXT_API_START 40 - -# define SQL_API_SQLCOLUMNS 40 - -# define SQL_API_SQLDRIVERCONNECT 41 -# define SQL_API_SQLGETCONNECTOPTION 42 -# define SQL_API_SQLGETDATA 43 -# define SQL_API_SQLGETFUNCTIONS 44 -# define SQL_API_SQLGETINFO 45 -# define SQL_API_SQLGETSTMTOPTION 46 -# define SQL_API_SQLGETTYPEINFO 47 -# define SQL_API_SQLPARAMDATA 48 -# define SQL_API_SQLPUTDATA 49 -# define SQL_API_SQLSETCONNECTOPTION 50 -# define SQL_API_SQLSETSTMTOPTION 51 -# define SQL_API_SQLSPECIALCOLUMNS 52 -# define SQL_API_SQLSTATISTICS 53 -# define SQL_API_SQLTABLES 54 - -# define SQL_API_SQLBROWSECONNECT 55 -# define SQL_API_SQLCOLUMNPRIVILEGES 56 -# define SQL_API_SQLDATASOURCES 57 -# define SQL_API_SQLDESCRIBEPARAM 58 -# define SQL_API_SQLEXTENDEDFETCH 59 -# define SQL_API_SQLFOREIGNKEYS 60 -# define SQL_API_SQLMORERESULTS 61 -# define SQL_API_SQLNATIVESQL 62 -# define SQL_API_SQLNUMPARAMS 63 -# define SQL_API_SQLPARAMOPTIONS 64 -# define SQL_API_SQLPRIMARYKEYS 65 -# define SQL_API_SQLPROCEDURECOLUMNS 66 -# define SQL_API_SQLPROCEDURES 67 -# define SQL_API_SQLSETPOS 68 -# define SQL_API_SQLSETSCROLLOPTIONS 69 -# define SQL_API_SQLTABLEPRIVILEGES 70 - -# define SQL_API_SQLDRIVERS 71 -# define SQL_API_SQLBINDPARAMETER 72 -# define SQL_EXT_API_LAST SQL_API_SQLBINDPARAMETER - -# define SQL_API_ALL_FUNCTIONS 0 - -/* SQLGetInfo infor number */ -# define SQL_INFO_FIRST 0 -# define SQL_DRIVER_HDBC 3 -# define SQL_DRIVER_HENV 4 -# define SQL_DRIVER_HSTMT 5 -# define SQL_DRIVER_NAME 6 -# define SQL_ODBC_VER 10 -# define SQL_CURSOR_COMMIT_BEHAVIOR 23 -# define SQL_CURSOR_ROLLBACK_BEHAVIOR 24 -# define SQL_DEFAULT_TXN_ISOLATION 26 - -# define SQL_TXN_ISOLATION_OPTION 72 -# define SQL_NON_NULLABLE_COLUMNS 75 - -# define SQL_DRIVER_HLIB 76 -# define SQL_DRIVER_ODBC_VER 77 - -# define SQL_QUALIFIER_LOCATION 114 - -# define SQL_INFO_LAST SQL_QUALIFIER_LOCATION - -# define SQL_INFO_DRIVER_START 1000 - - -/* SQL_TXN_ISOLATION_OPTION masks */ -# define SQL_TXN_READ_UNCOMMITTED 0x00000001L -# define SQL_TXN_READ_COMMITTED 0x00000002L -# define SQL_TXN_REPEATABLE_READ 0x00000004L -# define SQL_TXN_SERIALIZABLE 0x00000008L -# define SQL_TXN_VERSIONING 0x00000010L - -/* SQL_CURSOR_COMMIT_BEHAVIOR and SQL_CURSOR_ROLLBACK_BEHAVIOR values */ - -# define SQL_CB_DELETE 0x0000 -# define SQL_CB_CLOSE 0x0001 -# define SQL_CB_PRESERVE 0x0002 - -/* options for SQLGetStmtOption/SQLSetStmtOption */ -# define SQL_QUERY_TIMEOUT 0 -# define SQL_MAX_ROWS 1 -# define SQL_NOSCAN 2 -# define SQL_MAX_LENGTH 3 -# define SQL_ASYNC_ENABLE 4 -# define SQL_BIND_TYPE 5 -# define SQL_CURSOR_TYPE 6 -# define SQL_CONCURRENCY 7 -# define SQL_KEYSET_SIZE 8 -# define SQL_ROWSET_SIZE 9 -# define SQL_SIMULATE_CURSOR 10 -# define SQL_RETRIEVE_DATA 11 -# define SQL_USE_BOOKMARKS 12 -# define SQL_GET_BOOKMARK 13 /* GetStmtOption Only */ -# define SQL_ROW_NUMBER 14 /* GetStmtOption Only */ -# define SQL_STMT_OPT_MAX SQL_ROW_NUMBER - -# define SQL_STMT_OPT_MIN SQL_QUERY_TIMEOUT - - -/* SQL_QUERY_TIMEOUT options */ -# define SQL_QUERY_TIMEOUT_DEFAULT 0UL - -/* SQL_MAX_ROWS options */ -# define SQL_MAX_ROWS_DEFAULT 0UL - -/* SQL_MAX_LENGTH options */ -# define SQL_MAX_LENGTH_DEFAULT 0UL - -/* SQL_CONCURRENCY options */ -# define SQL_CONCUR_READ_ONLY 1 -# define SQL_CONCUR_LOCK 2 -# define SQL_CONCUR_ROWVER 3 -# define SQL_CONCUR_VALUES 4 - -/* options for SQLSetConnectOption/SQLGetConnectOption */ -# define SQL_ACCESS_MODE 101 -# define SQL_AUTOCOMMIT 102 -# define SQL_LOGIN_TIMEOUT 103 -# define SQL_OPT_TRACE 104 -# define SQL_OPT_TRACEFILE 105 -# define SQL_TRANSLATE_DLL 106 -# define SQL_TRANSLATE_OPTION 107 -# define SQL_TXN_ISOLATION 108 -# define SQL_CURRENT_QUALIFIER 109 -# define SQL_ODBC_CURSORS 110 -# define SQL_QUIET_MODE 111 -# define SQL_PACKET_SIZE 112 -# define SQL_CONN_OPT_MAX SQL_PACKET_SIZE -# define SQL_CONNECT_OPT_DRVR_START 1000 - -# define SQL_CONN_OPT_MIN SQL_ACCESS_MODE - -/* SQL_ACCESS_MODE options */ -# define SQL_MODE_READ_WRITE 0UL -# define SQL_MODE_READ_ONLY 1UL -# define SQL_MODE_DEFAULT SQL_MODE_READ_WRITE - -/* SQL_AUTOCOMMIT options */ -# define SQL_AUTOCOMMIT_OFF 0UL -# define SQL_AUTOCOMMIT_ON 1UL -# define SQL_AUTOCOMMIT_DEFAULT SQL_AUTOCOMMIT_ON - -/* SQL_LOGIN_TIMEOUT options */ -# define SQL_LOGIN_TIMEOUT_DEFAULT 15UL - -/* SQL_OPT_TRACE options */ -# define SQL_OPT_TRACE_OFF 0UL -# define SQL_OPT_TRACE_ON 1UL -# define SQL_OPT_TRACE_DEFAULT SQL_OPT_TRACE_OFF -# define SQL_OPT_TRACE_FILE_DEFAULT "odbc.log" - -/* SQL_ODBC_CURSORS options */ -# define SQL_CUR_USE_IF_NEEDED 0UL -# define SQL_CUR_USE_ODBC 1UL -# define SQL_CUR_USE_DRIVER 2UL -# define SQL_CUR_DEFAULT SQL_CUR_USE_DRIVER - -/* Column types and scopes in SQLSpecialColumns. */ -# define SQL_BEST_ROWID 1 -# define SQL_ROWVER 2 - -# define SQL_SCOPE_CURROW 0 -# define SQL_SCOPE_TRANSACTION 1 -# define SQL_SCOPE_SESSION 2 - -/* Operations in SQLSetPos */ -# define SQL_ADD 4 - -/* Lock options in SQLSetPos */ -# define SQL_LOCK_NO_CHANGE 0 -# define SQL_LOCK_EXCLUSIVE 1 -# define SQL_LOCK_UNLOCK 2 - -/* SQLExtendedFetch flag values */ -# define SQL_FETCH_NEXT 1 -# define SQL_FETCH_FIRST 2 -# define SQL_FETCH_LAST 3 -# define SQL_FETCH_PRIOR 4 -# define SQL_FETCH_ABSOLUTE 5 -# define SQL_FETCH_RELATIVE 6 -# define SQL_FETCH_BOOKMARK 8 - -/* Defines for SQLBindParameter/SQLProcedureColumns */ -# define SQL_PARAM_TYPE_UNKNOWN 0 -# define SQL_PARAM_INPUT 1 -# define SQL_PARAM_INPUT_OUTPUT 2 -# define SQL_RESULT_COL 3 -# define SQL_PARAM_OUTPUT 4 - -/* Defines used by Driver Manager for mapping SQLSetParam to SQLBindParameter */ -# define SQL_PARAM_TYPE_DEFAULT SQL_PARAM_INPUT_OUTPUT -# define SQL_SETPARAM_VALUE_MAX (-1L) - -/* SQLStatistics flag values */ -# define SQL_INDEX_UNIQUE 0 -# define SQL_INDEX_ALL 1 - -# define SQL_QUICK 0 -# define SQL_ENSURE 1 - -/* SQLSetScrollOption flag values */ -# define SQL_SCROLL_FORWARD_ONLY 0L -# define SQL_SCROLL_KEYSET_DRIVEN (-1L) -# define SQL_SCROLL_DYNAMIC (-2L) -# define SQL_SCROLL_STATIC (-3L) - -# if defined(__cplusplus) || defined(__IBMCPP__) - extern "C" { -# endif - - -/* SQL CONVERT_FUNCTIONS function */ -#define SQL_FN_CVT_CONVERT 0x00000001L - -/* SQL_SUBQUERIES masks */ - -#define SQL_SQ_COMPARISON 0x00000001L -#define SQL_SQ_EXISTS 0x00000002L -#define SQL_SQ_IN 0x00000004L -#define SQL_SQ_QUANTIFIED 0x00000008L -#define SQL_SQ_CORRELATED_SUBQUERIES 0x00000010L - - - -RETCODE SQL_API SQLSetConnectOption (HDBC, UWORD, UDWORD); -RETCODE SQL_API SQLNumResultCols ( HSTMT, SWORD FAR* ); - -# if defined(__cplusplus) || defined(__IBMCPP__) - } -# endif - -#endif diff --git a/src/iodbc/postgres/odbc_funcs.h b/src/iodbc/postgres/odbc_funcs.h deleted file mode 100644 index 508d5bd717..0000000000 --- a/src/iodbc/postgres/odbc_funcs.h +++ /dev/null @@ -1,380 +0,0 @@ -#define SQLRETURN RETCODE -SQLRETURN SQL_API SQLDriverConnect( - SQLHDBC hdbc, - SQLHWND hwnd, - SQLCHAR FAR *szConnStrIn, - SQLSMALLINT cbConnStrIn, - SQLCHAR FAR *szConnStrOut, - SQLSMALLINT cbConnStrOutMax, - SQLSMALLINT FAR *pcbConnStrOut, - SQLUSMALLINT fDriverCompletion); - -SQLRETURN SQL_API SQLBrowseConnect( - SQLHDBC hdbc, - SQLCHAR FAR *szConnStrIn, - SQLSMALLINT cbConnStrIn, - SQLCHAR FAR *szConnStrOut, - SQLSMALLINT cbConnStrOutMax, - SQLSMALLINT FAR *pcbConnStrOut); - -SQLRETURN SQL_API SQLColumnPrivileges( - SQLHSTMT hstmt, - SQLCHAR FAR *szCatalogName, - SQLSMALLINT cbCatalogName, - SQLCHAR FAR *szSchemaName, - SQLSMALLINT cbSchemaName, - SQLCHAR FAR *szTableName, - SQLSMALLINT cbTableName, - SQLCHAR FAR *szColumnName, - SQLSMALLINT cbColumnName); - -SQLRETURN SQL_API SQLDescribeParam( - SQLHSTMT hstmt, - SQLUSMALLINT ipar, - SQLSMALLINT FAR *pfSqlType, - SQLUINTEGER FAR *pcbParamDef, - SQLSMALLINT FAR *pibScale, - SQLSMALLINT FAR *pfNullable); - -SQLRETURN SQL_API SQLExtendedFetch( - SQLHSTMT hstmt, - SQLUSMALLINT fFetchType, - SQLINTEGER irow, - SQLUINTEGER FAR *pcrow, - SQLUSMALLINT FAR *rgfRowStatus); - -SQLRETURN SQL_API SQLForeignKeys( - SQLHSTMT hstmt, - SQLCHAR FAR *szPkCatalogName, - SQLSMALLINT cbPkCatalogName, - SQLCHAR FAR *szPkSchemaName, - SQLSMALLINT cbPkSchemaName, - SQLCHAR FAR *szPkTableName, - SQLSMALLINT cbPkTableName, - SQLCHAR FAR *szFkCatalogName, - SQLSMALLINT cbFkCatalogName, - SQLCHAR FAR *szFkSchemaName, - SQLSMALLINT cbFkSchemaName, - SQLCHAR FAR *szFkTableName, - SQLSMALLINT cbFkTableName); - -SQLRETURN SQL_API SQLMoreResults( - SQLHSTMT hstmt); - -SQLRETURN SQL_API SQLNativeSql( - SQLHDBC hdbc, - SQLCHAR FAR *szSqlStrIn, - SQLINTEGER cbSqlStrIn, - SQLCHAR FAR *szSqlStr, - SQLINTEGER cbSqlStrMax, - SQLINTEGER FAR *pcbSqlStr); - -SQLRETURN SQL_API SQLNumParams( - SQLHSTMT hstmt, - SQLSMALLINT FAR *pcpar); - -SQLRETURN SQL_API SQLParamOptions( - SQLHSTMT hstmt, - SQLUINTEGER crow, - SQLUINTEGER FAR *pirow); - -SQLRETURN SQL_API SQLPrimaryKeys( - SQLHSTMT hstmt, - SQLCHAR FAR *szCatalogName, - SQLSMALLINT cbCatalogName, - SQLCHAR FAR *szSchemaName, - SQLSMALLINT cbSchemaName, - SQLCHAR FAR *szTableName, - SQLSMALLINT cbTableName); - -SQLRETURN SQL_API SQLProcedureColumns( - SQLHSTMT hstmt, - SQLCHAR FAR *szCatalogName, - SQLSMALLINT cbCatalogName, - SQLCHAR FAR *szSchemaName, - SQLSMALLINT cbSchemaName, - SQLCHAR FAR *szProcName, - SQLSMALLINT cbProcName, - SQLCHAR FAR *szColumnName, - SQLSMALLINT cbColumnName); - -SQLRETURN SQL_API SQLProcedures( - SQLHSTMT hstmt, - SQLCHAR FAR *szCatalogName, - SQLSMALLINT cbCatalogName, - SQLCHAR FAR *szSchemaName, - SQLSMALLINT cbSchemaName, - SQLCHAR FAR *szProcName, - SQLSMALLINT cbProcName); - -SQLRETURN SQL_API SQLSetPos( - SQLHSTMT hstmt, - SQLUSMALLINT irow, - SQLUSMALLINT fOption, - SQLUSMALLINT fLock); - -SQLRETURN SQL_API SQLTablePrivileges( - SQLHSTMT hstmt, - SQLCHAR FAR *szCatalogName, - SQLSMALLINT cbCatalogName, - SQLCHAR FAR *szSchemaName, - SQLSMALLINT cbSchemaName, - SQLCHAR FAR *szTableName, - SQLSMALLINT cbTableName); - -SQLRETURN SQL_API SQLDrivers( - SQLHENV henv, - SQLUSMALLINT fDirection, - SQLCHAR FAR *szDriverDesc, - SQLSMALLINT cbDriverDescMax, - SQLSMALLINT FAR *pcbDriverDesc, - SQLCHAR FAR *szDriverAttributes, - SQLSMALLINT cbDrvrAttrMax, - SQLSMALLINT FAR *pcbDrvrAttr); - -SQLRETURN SQL_API SQLBindParameter( - SQLHSTMT hstmt, - SQLUSMALLINT ipar, - SQLSMALLINT fParamType, - SQLSMALLINT fCType, - SQLSMALLINT fSqlType, - SQLUINTEGER cbColDef, - SQLSMALLINT ibScale, - SQLPOINTER rgbValue, - SQLINTEGER cbValueMax, - SQLINTEGER FAR *pcbValue); - -SQLRETURN SQL_API SQLAllocConnect( - SQLHENV henv, - SQLHDBC FAR *phdbc); - -SQLRETURN SQL_API SQLAllocEnv( - SQLHENV FAR *phenv); - -SQLRETURN SQL_API SQLAllocStmt( - SQLHDBC hdbc, - SQLHSTMT FAR *phstmt); - -SQLRETURN SQL_API SQLBindCol( - SQLHSTMT hstmt, - SQLUSMALLINT icol, - SQLSMALLINT fCType, - SQLPOINTER rgbValue, - SQLINTEGER cbValueMax, - SQLINTEGER FAR *pcbValue); - -SQLRETURN SQL_API SQLCancel( - SQLHSTMT hstmt); - -SQLRETURN SQL_API SQLColAttributes( - SQLHSTMT hstmt, - SQLUSMALLINT icol, - SQLUSMALLINT fDescType, - SQLPOINTER rgbDesc, - SQLSMALLINT cbDescMax, - SQLSMALLINT FAR *pcbDesc, - SQLINTEGER FAR *pfDesc); - -SQLRETURN SQL_API SQLConnect( - SQLHDBC hdbc, - SQLCHAR FAR *szDSN, - SQLSMALLINT cbDSN, - SQLCHAR FAR *szUID, - SQLSMALLINT cbUID, - SQLCHAR FAR *szAuthStr, - SQLSMALLINT cbAuthStr); - -SQLRETURN SQL_API SQLDescribeCol( - SQLHSTMT hstmt, - SQLUSMALLINT icol, - SQLCHAR FAR *szColName, - SQLSMALLINT cbColNameMax, - SQLSMALLINT FAR *pcbColName, - SQLSMALLINT FAR *pfSqlType, - SQLUINTEGER FAR *pcbColDef, - SQLSMALLINT FAR *pibScale, - SQLSMALLINT FAR *pfNullable); - -SQLRETURN SQL_API SQLDisconnect( - SQLHDBC hdbc); - -SQLRETURN SQL_API SQLError( - SQLHENV henv, - SQLHDBC hdbc, - SQLHSTMT hstmt, - SQLCHAR FAR *szSqlState, - SQLINTEGER FAR *pfNativeError, - SQLCHAR FAR *szErrorMsg, - SQLSMALLINT cbErrorMsgMax, - SQLSMALLINT FAR *pcbErrorMsg); - -SQLRETURN SQL_API SQLExecDirect( - SQLHSTMT hstmt, - SQLCHAR FAR *szSqlStr, - SQLINTEGER cbSqlStr); - -SQLRETURN SQL_API SQLExecute( - SQLHSTMT hstmt); - -SQLRETURN SQL_API SQLFetch( - SQLHSTMT hstmt); - -SQLRETURN SQL_API SQLFreeConnect( - SQLHDBC hdbc); - -SQLRETURN SQL_API SQLFreeEnv( - SQLHENV henv); - -SQLRETURN SQL_API SQLFreeStmt( - SQLHSTMT hstmt, - SQLUSMALLINT fOption); - -SQLRETURN SQL_API SQLGetCursorName( - SQLHSTMT hstmt, - SQLCHAR FAR *szCursor, - SQLSMALLINT cbCursorMax, - SQLSMALLINT FAR *pcbCursor); - -SQLRETURN SQL_API SQLNumResultCols( - SQLHSTMT hstmt, - SQLSMALLINT FAR *pccol); - -SQLRETURN SQL_API SQLPrepare( - SQLHSTMT hstmt, - SQLCHAR FAR *szSqlStr, - SQLINTEGER cbSqlStr); - -SQLRETURN SQL_API SQLRowCount( - SQLHSTMT hstmt, - SQLINTEGER FAR *pcrow); - -SQLRETURN SQL_API SQLSetCursorName( - SQLHSTMT hstmt, - SQLCHAR FAR *szCursor, - SQLSMALLINT cbCursor); - -SQLRETURN SQL_API SQLTransact( - SQLHENV henv, - SQLHDBC hdbc, - SQLUSMALLINT fType); - - -SQLRETURN SQL_API SQLSetParam( /* Use SQLBindParameter */ - SQLHSTMT hstmt, - SQLUSMALLINT ipar, - SQLSMALLINT fCType, - SQLSMALLINT fSqlType, - SQLUINTEGER cbParamDef, - SQLSMALLINT ibScale, - SQLPOINTER rgbValue, - SQLINTEGER FAR *pcbValue); - -SQLRETURN SQL_API SQLColumns( - SQLHSTMT hstmt, - SQLCHAR FAR *szCatalogName, - SQLSMALLINT cbCatalogName, - SQLCHAR FAR *szSchemaName, - SQLSMALLINT cbSchemaName, - SQLCHAR FAR *szTableName, - SQLSMALLINT cbTableName, - SQLCHAR FAR *szColumnName, - SQLSMALLINT cbColumnName); - -SQLRETURN SQL_API SQLGetConnectOption( - SQLHDBC hdbc, - SQLUSMALLINT fOption, - SQLPOINTER pvParam); - -SQLRETURN SQL_API SQLGetData( - SQLHSTMT hstmt, - SQLUSMALLINT icol, - SQLSMALLINT fCType, - SQLPOINTER rgbValue, - SQLINTEGER cbValueMax, - SQLINTEGER FAR *pcbValue); - -SQLRETURN SQL_API SQLGetFunctions( - SQLHDBC hdbc, - SQLUSMALLINT fFunction, - SQLUSMALLINT FAR *pfExists); - -SQLRETURN SQL_API SQLGetInfo( - SQLHDBC hdbc, - SQLUSMALLINT fInfoType, - SQLPOINTER rgbInfoValue, - SQLSMALLINT cbInfoValueMax, - SQLSMALLINT FAR *pcbInfoValue); - -SQLRETURN SQL_API SQLGetStmtOption( - SQLHSTMT hstmt, - SQLUSMALLINT fOption, - SQLPOINTER pvParam); - -SQLRETURN SQL_API SQLGetTypeInfo( - SQLHSTMT hstmt, - SQLSMALLINT fSqlType); - -SQLRETURN SQL_API SQLParamData( - SQLHSTMT hstmt, - SQLPOINTER FAR *prgbValue); - -SQLRETURN SQL_API SQLPutData( - SQLHSTMT hstmt, - SQLPOINTER rgbValue, - SQLINTEGER cbValue); - -SQLRETURN SQL_API SQLSetConnectOption( - SQLHDBC hdbc, - SQLUSMALLINT fOption, - SQLUINTEGER vParam); - -SQLRETURN SQL_API SQLSetStmtOption( - SQLHSTMT hstmt, - SQLUSMALLINT fOption, - SQLUINTEGER vParam); - -SQLRETURN SQL_API SQLSpecialColumns( - SQLHSTMT hstmt, - SQLUSMALLINT fColType, - SQLCHAR FAR *szCatalogName, - SQLSMALLINT cbCatalogName, - SQLCHAR FAR *szSchemaName, - SQLSMALLINT cbSchemaName, - SQLCHAR FAR *szTableName, - SQLSMALLINT cbTableName, - SQLUSMALLINT fScope, - SQLUSMALLINT fNullable); - -SQLRETURN SQL_API SQLStatistics( - SQLHSTMT hstmt, - SQLCHAR FAR *szCatalogName, - SQLSMALLINT cbCatalogName, - SQLCHAR FAR *szSchemaName, - SQLSMALLINT cbSchemaName, - SQLCHAR FAR *szTableName, - SQLSMALLINT cbTableName, - SQLUSMALLINT fUnique, - SQLUSMALLINT fAccuracy); - -SQLRETURN SQL_API SQLTables( - SQLHSTMT hstmt, - SQLCHAR FAR *szCatalogName, - SQLSMALLINT cbCatalogName, - SQLCHAR FAR *szSchemaName, - SQLSMALLINT cbSchemaName, - SQLCHAR FAR *szTableName, - SQLSMALLINT cbTableName, - SQLCHAR FAR *szTableType, - SQLSMALLINT cbTableType); - - -SQLRETURN SQL_API SQLDataSources( - SQLHENV henv, - SQLUSMALLINT fDirection, - SQLCHAR FAR *szDSN, - SQLSMALLINT cbDSNMax, - SQLSMALLINT FAR *pcbDSN, - SQLCHAR FAR *szDescription, - SQLSMALLINT cbDescriptionMax, - SQLSMALLINT FAR *pcbDescription); - diff --git a/src/iodbc/postgres/odbc_types.h b/src/iodbc/postgres/odbc_types.h deleted file mode 100644 index 36333128fa..0000000000 --- a/src/iodbc/postgres/odbc_types.h +++ /dev/null @@ -1,298 +0,0 @@ -#define SQL_SPEC_STRING "02.00" /* String constant for version */ -#define SQL_ACTIVE_CONNECTIONS 0 -#define SQL_ACTIVE_STATEMENTS 1 -#define SQL_DATA_SOURCE_NAME 2 -#define SQL_DATABASE_NAME 16 /* Use SQLGetConnectOption/SQL_CURRENT_QUALIFIER */ -#define SQL_DBMS_VER 18 -#define SQL_FETCH_DIRECTION 8 -#define SQL_ROW_UPDATES 11 -#define SQL_ODBC_SAG_CLI_CONFORMANCE 12 -#define SQL_DRIVER_VER 7 -#define SQL_SERVER_NAME 13 -#define SQL_SEARCH_PATTERN_ESCAPE 14 -#define SQL_ODBC_API_CONFORMANCE 9 -#define SQL_ODBC_SQL_CONFORMANCE 15 -#define SQL_OAC_LEVEL1 0x0001 -#define SQL_DBMS_NAME 17 -#define SQL_ACCESSIBLE_PROCEDURES 20 -#define SQL_OUTER_JOINS 38 -#define SQL_NEED_LONG_DATA_LEN 111 -#define SQL_EXPRESSIONS_IN_ORDERBY 27 -#define SQL_PROCEDURES 21 -#define SQL_COLUMN_ALIAS 87 -#define SQL_CONCAT_NULL_BEHAVIOR 22 -#define SQL_DATA_SOURCE_READ_ONLY 25 -#define SQL_ACCESSIBLE_TABLES 19 -#define SQL_IDENTIFIER_QUOTE_CHAR 29 -#define SQL_MAX_COLUMN_NAME_LEN 30 -#define SQL_MAX_CURSOR_NAME_LEN 31 -#define SQL_MAX_OWNER_NAME_LEN 32 -#define SQL_MAX_PROCEDURE_NAME_LEN 33 -#define SQL_MAX_QUALIFIER_NAME_LEN 34 -#define SQL_MAX_TABLE_NAME_LEN 35 -#define SQL_MULT_RESULT_SETS 36 -#define SQL_MULTIPLE_ACTIVE_TXN 37 -#define SQL_MAX_ROW_SIZE_INCLUDES_LONG 103 -#define SQL_OWNER_TERM 39 -#define SQL_PROCEDURE_TERM 40 -#define SQL_QUALIFIER_NAME_SEPARATOR 41 -#define SQL_QUALIFIER_TERM 42 -#define SQL_SCROLL_CONCURRENCY 43 -#define SQL_SCROLL_OPTIONS 44 -#define SQL_TABLE_TERM 45 -#define SQL_TXN_CAPABLE 46 -#define SQL_USER_NAME 47 -#define SQL_CONVERT_FUNCTIONS 48 -#define SQL_SYSTEM_FUNCTIONS 51 -#define SQL_NUMERIC_FUNCTIONS 49 -#define SQL_FN_NUM_ABS 0x00000001L -#define SQL_FN_NUM_FLOOR 0x00000200L -#define SQL_FN_NUM_MOD 0x00000800L -#define SQL_FN_NUM_SIGN 0x00001000L -#define SQL_STRING_FUNCTIONS 50 -#define SQL_FN_STR_CONCAT 0x00000001L -#define SQL_FN_STR_LEFT 0x00000004L -#define SQL_FN_STR_LENGTH 0x00000010L -#define SQL_FN_STR_LOCATE 0x00000020L -#define SQL_FN_STR_LOCATE_2 0x00010000L -#define SQL_FN_STR_RIGHT 0x00000200L -#define SQL_FN_STR_SUBSTRING 0x00000800L -#define SQL_FN_STR_REPLACE 0x00000100L -#define SQL_FN_STR_LCASE 0x00000040L -#define SQL_FN_STR_UCASE 0x00001000L -#define SQL_TIMEDATE_FUNCTIONS 52 -#define SQL_FN_TD_CURDATE 0x00000002L -#define SQL_CONVERT_BIGINT 53 -#define SQL_CONVERT_BIT 55 -#define SQL_CONVERT_CHAR 56 -#define SQL_CONVERT_DATE 57 -#define SQL_CONVERT_DECIMAL 58 -#define SQL_CONVERT_DOUBLE 59 -#define SQL_CONVERT_FLOAT 60 -#define SQL_CONVERT_INTEGER 61 -#define SQL_CONVERT_LONGVARCHAR 62 -#define SQL_CONVERT_NUMERIC 63 -#define SQL_CONVERT_REAL 64 -#define SQL_CONVERT_SMALLINT 65 -#define SQL_CONVERT_TIME 66 -#define SQL_CONVERT_TIMESTAMP 67 -#define SQL_CONVERT_TIMESTAMP 67 -#define SQL_CONVERT_TINYINT 68 -#define SQL_CONVERT_VARCHAR 70 -#define SQL_CVT_CHAR 0x00000001L -#define SQL_CVT_NUMERIC 0x00000002L -#define SQL_CVT_DECIMAL 0x00000004L -#define SQL_CVT_INTEGER 0x00000008L -#define SQL_CVT_SMALLINT 0x00000010L -#define SQL_CVT_FLOAT 0x00000020L -#define SQL_CVT_REAL 0x00000040L -#define SQL_CVT_DOUBLE 0x00000080L -#define SQL_CVT_VARCHAR 0x00000100L -#define SQL_CVT_LONGVARCHAR 0x00000200L -#define SQL_CVT_BIT 0x00001000L -#define SQL_CVT_TINYINT 0x00002000L -#define SQL_CVT_BIGINT 0x00004000L -#define SQL_CVT_DATE 0x00008000L -#define SQL_CVT_TIME 0x00010000L -#define SQL_CVT_TIMESTAMP 0x00020000L -#define SQL_CVT_TIMESTAMP 0x00020000L -#define SQL_CONVERT_BINARY 54 -#define SQL_CONVERT_VARBINARY 69 -#define SQL_CONVERT_LONGVARBINARY 71 -#define SQL_CORRELATION_NAME 74 -#define SQL_CN_DIFFERENT 0x0001 -#define SQL_NNC_NON_NULL 0x0001 -#define SQL_NULL_COLLATION 85 -#define SQL_NC_START 0x0002 -#define SQL_MAX_COLUMNS_IN_GROUP_BY 97 -#define SQL_MAX_COLUMNS_IN_ORDER_BY 99 -#define SQL_MAX_COLUMNS_IN_SELECT 100 -#define SQL_MAX_COLUMNS_IN_TABLE 101 -#define SQL_MAX_TABLES_IN_SELECT 106 -#define SQL_MAX_ROW_SIZE_INCLUDES_LONG 103 -#define SQL_MAX_ROW_SIZE 104 -#define SQL_MAX_BINARY_LITERAL_LEN 112 -#define SQL_MAX_CHAR_LITERAL_LEN 108 -#define SQL_MAX_COLUMNS_IN_INDEX 98 -#define SQL_MAX_INDEX_SIZE 102 -#define SQL_MAX_STATEMENT_LEN 105 -#define SQL_QL_START 0x0001L -#define SQL_SEARCHABLE 3 -#define SQL_IDENTIFIER_CASE 28 -#define SQL_COLUMN_NAME 1 -#define SQL_COLUMN_TYPE 2 -#define SQL_COLUMN_TYPE_NAME 14 -#define SQL_COLUMN_PRECISION 4 -#define SQL_COLUMN_DISPLAY_SIZE 6 -#define SQL_COLUMN_LENGTH 3 -#define SQL_COLUMN_SCALE 5 -#define SQL_COLUMN_NULLABLE 7 -#define SQL_COLUMN_SEARCHABLE 13 -#define SQL_COLUMN_UNSIGNED 8 -#define SQL_COLUMN_MONEY 9 -#define SQL_COLUMN_AUTO_INCREMENT 11 -#define SQL_COLUMN_CASE_SENSITIVE 12 -#define SQL_COLUMN_UPDATABLE 10 -#define SQL_COLUMN_OWNER_NAME 16 -#define SQL_COLUMN_QUALIFIER_NAME 17 -#define SQL_OSCC_COMPLIANT 0x0001 -#define SQL_ODBC_SQL_OPT_IEF 73 -#define SQL_LIKE_ESCAPE_CLAUSE 113 -#define SQL_ORDER_BY_COLUMNS_IN_SELECT 90 -#define SQL_POS_OPERATIONS 79 -#define SQL_POSITIONED_STATEMENTS 80 -#define SQL_LOCK_TYPES 78 -#define SQL_BOOKMARK_PERSISTENCE 82 -#define SQL_ALTER_TABLE 86 -#define SQL_OWNER_USAGE 91 -#define SQL_QUALIFIER_USAGE 92 -#define SQL_QUOTED_IDENTIFIER_CASE 93 -#define SQL_SUBQUERIES 95 -#define SQL_UNION 96 -#define SQL_TIMEDATE_DIFF_INTERVALS 110 -#define SQL_GETDATA_EXTENSIONS 81 -#define SQL_GD_ANY_COLUMN 0x00000001L -#define SQL_GD_ANY_ORDER 0x00000002L -#define SQL_GD_BOUND 0x00000008L -#define SQL_STATIC_SENSITIVITY 83 -#define SQL_SS_DELETIONS 0x00000002L -#define SQL_SS_UPDATES 0x00000004L -#define SQL_FILE_USAGE 84 -#define SQL_FILE_NOT_SUPPORTED 0x0000 -#define SQL_GROUP_BY 88 -#define SQL_GB_GROUP_BY_EQUALS_SELECT 0x0001 -#define SQL_KEYWORDS 89 -#define SQL_SPECIAL_CHARACTERS 94 -#define SQL_TIMEDATE_ADD_INTERVALS 109 -#define SQL_FN_SYS_DBNAME 0x00000002L -#define SQL_FN_SYS_IFNULL 0x00000004L -#define SQL_FN_SYS_USERNAME 0x00000001L -#define SQL_FN_NUM_CEILING 0x00000020L -#define SQL_FN_NUM_EXP 0x00000100L -#define SQL_FN_NUM_LOG 0x00000400L -#define SQL_FN_NUM_LOG10 0x00080000L -#define SQL_FN_NUM_LOG10 0x00080000L -#define SQL_FN_NUM_POWER 0x00100000L -#define SQL_FN_NUM_SQRT 0x00004000L -#define SQL_FN_NUM_ROUND 0x00400000L -#define SQL_FN_STR_INSERT 0x00000002L -#define SQL_FN_STR_LTRIM 0x00000008L -#define SQL_FN_STR_RTRIM 0x00000400L -#define SQL_BLOB 21 -#define SQL_BLOB_LOCATOR 22 -#define SQL_CLOB 23 -#define SQL_CLOB_LOCATOR 24 -#define SQL_DBCLOB 25 -#define SQL_DBCLOB_LOCATOR 26 -#define SQL_GRAPHIC 27 -#define SQL_LONGVARGRAPHIC 30 -#define SQL_VARGRAPHIC 32 -#define SQL_SQLSTATE_SIZE 8 -#define SQL_COLUMN_DISTINCT_TYPE 1250 -#define SQL_COLUMN_TABLE_NAME 15 -#define SQL_LEN_DATA_AT_EXEC_OFFSET (-100) -#define SQL_CB_NULL 0x0000 -#define SQL_FN_NUM_RAND 0x00020000L -#define SQL_NOSCAN_OFF 0UL -#define SQL_ASYNC_ENABLE_OFF 0UL -#define SQL_CURSOR_STATIC 3UL -#define SQL_SC_NON_UNIQUE 0UL -#define SQL_UB_OFF 0UL -#define SQL_PC_NOT_PSEUDO 1 -#define SQL_PC_NON_PSEUDO SQL_PC_NOT_PSEUDO -#define SQL_UNSEARCHABLE 0 - -/* - * Following constants are missed in original odbc_types.h - * Added by serg@informika.ru - */ - -#define SQL_UNKNOWN_TYPE 0 - -/* SQLColAttributes subdefines for SQL_COLUMN_SEARCHABLE */ -/* These are also used by SQLGetInfo */ -#define SQL_UNSEARCHABLE 0 -#define SQL_LIKE_ONLY 1 -#define SQL_ALL_EXCEPT_LIKE 2 -#define SQL_SEARCHABLE 3 -#define SQL_PRED_SEARCHABLE SQL_SEARCHABLE - -/* Special return values for SQLGetData */ -#define SQL_NO_TOTAL (-4) - -/* SQL_CORRELATION_NAME values */ - -#define SQL_CN_NONE 0x0000 -#define SQL_CN_DIFFERENT 0x0001 -#define SQL_CN_ANY 0x0002 - -/* SQL_NULL_COLLATION values */ - -#define SQL_NC_HIGH 0 -#define SQL_NC_LOW 1 -#define SQL_NC_START 0x0002 -#define SQL_NC_END 0x0004 - -/* SQL_GROUP_BY values */ - -#define SQL_GB_NOT_SUPPORTED 0x0000 -#define SQL_GB_GROUP_BY_EQUALS_SELECT 0x0001 -#define SQL_GB_GROUP_BY_CONTAINS_SELECT 0x0002 -#define SQL_GB_NO_RELATION 0x0003 - -/* SQL_IDENTIFIER_CASE values */ -#define SQL_IC_UPPER 1 -#define SQL_IC_LOWER 2 -#define SQL_IC_SENSITIVE 3 -#define SQL_IC_MIXED 4 - -/* SQL_ODBC_SQL_CONFORMANCE values */ - -#define SQL_OSC_MINIMUM 0x0000 -#define SQL_OSC_CORE 0x0001 -#define SQL_OSC_EXTENDED 0x0002 - -/* SQL_SCROLL_OPTIONS masks */ - -#define SQL_SO_FORWARD_ONLY 0x00000001L -#define SQL_SO_KEYSET_DRIVEN 0x00000002L -#define SQL_SO_DYNAMIC 0x00000004L -#define SQL_SO_MIXED 0x00000008L -#define SQL_SO_STATIC 0x00000010L - -/* SQL_TXN_CAPABLE values */ - -#define SQL_TC_NONE 0 -#define SQL_TC_DML 1 -#define SQL_TC_ALL 2 -#define SQL_TC_DDL_COMMIT 3 -#define SQL_TC_DDL_IGNORE 4 - -/* SQL_ALTER_TABLE bitmasks */ - -#if (ODBCVER >= 0x0200) -#define SQL_AT_ADD_COLUMN 0x00000001L -#define SQL_AT_DROP_COLUMN 0x00000002L -#endif /* ODBCVER >= 0x0200 */ - -#define SQL_MAX_USER_NAME_LEN 107 - -/* SQLColAttributes subdefines for SQL_COLUMN_UPDATABLE */ - -#define SQL_ATTR_READONLY 0 -#define SQL_ATTR_WRITE 1 -#define SQL_ATTR_READWRITE_UNKNOWN 2 - -/* SQLExtendedFetch "rgfRowStatus" element values */ - -#define SQL_ROW_SUCCESS 0 -#define SQL_ROW_DELETED 1 -#define SQL_ROW_UPDATED 2 -#define SQL_ROW_NOROW 3 -#define SQL_ROW_ADDED 4 -#define SQL_ROW_ERROR 5 - -/* SQL_TIMEDATE_FUNCTIONS */ - -#define SQL_FN_TD_NOW 0x00000001L -#define SQL_FN_TD_CURTIME 0x00000200L diff --git a/src/iodbc/prepare.c b/src/iodbc/prepare.c deleted file mode 100644 index 9e71ea0c4a..0000000000 --- a/src/iodbc/prepare.c +++ /dev/null @@ -1,537 +0,0 @@ -/** Prepare a query - - Copyright (C) 1995 by Ke Jin - - This program 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. -**/ - -#include <../iodbc/iodbc.h> - -#include <../iodbc/isql.h> -#include <../iodbc/isqlext.h> - -#include <../iodbc/dlproc.h> - -#include <../iodbc/herr.h> -#include <../iodbc/henv.h> -#include <../iodbc/hdbc.h> -#include <../iodbc/hstmt.h> - -#include <../iodbc/itrace.h> - -RETCODE SQL_API SQLPrepare ( - HSTMT hstmt, - UCHAR FAR* szSqlStr, - SDWORD cbSqlStr ) -{ - STMT_t FAR* pstmt = (STMT_t*)hstmt; - - HPROC hproc = SQL_NULL_HPROC; - RETCODE retcode = SQL_SUCCESS; - int sqlstat = en_00000; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check state */ - if( pstmt->asyn_on == en_NullProc ) - { - /* not on asyn state */ - switch( pstmt->state ) - { - case en_stmt_fetched: - case en_stmt_xfetched: - sqlstat = en_24000; - break; - - case en_stmt_needdata: - case en_stmt_mustput: - case en_stmt_canput: - sqlstat = en_S1010; - break; - - default: - break; - } - } - else if( pstmt->asyn_on != en_Prepare ) - { - /* asyn on other */ - sqlstat = en_S1010; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - if( szSqlStr == NULL ) - { - PUSHSQLERR ( pstmt->herr, en_S1009 ); - - return SQL_ERROR; - } - - if( cbSqlStr < 0 && cbSqlStr != SQL_NTS ) - { - PUSHSQLERR ( pstmt->herr, en_S1090 ); - - return SQL_ERROR; - } - - hproc = _iodbcdm_getproc( pstmt->hdbc, en_Prepare ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_Prepare, ( - pstmt->dhstmt, szSqlStr, cbSqlStr) ) - -#if 0 - retcode = hproc ( pstmt->dhstmt, szSqlStr, cbSqlStr ); -#endif - - /* stmt state transition */ - if( pstmt->asyn_on == en_Prepare ) - { - switch( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - case SQL_ERROR: - pstmt->asyn_on = en_NullProc; - return retcode; - - case SQL_STILL_EXECUTING: - default: - return retcode; - } - } - - switch( retcode ) - { - case SQL_STILL_EXECUTING: - pstmt->asyn_on = en_Prepare; - break; - - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - pstmt->state = en_stmt_prepared; - pstmt->prep_state = 1; - break; - - case SQL_ERROR: - switch( pstmt->state ) - { - case en_stmt_prepared: - case en_stmt_executed: - pstmt->state = en_stmt_allocated; - pstmt->prep_state = 0; - break; - - default: - break; - } - - default: - break; - } - - return retcode; -} - -RETCODE SQL_API SQLSetCursorName ( - HSTMT hstmt, - UCHAR FAR* szCursor, - SWORD cbCursor ) -{ - STMT_t FAR* pstmt = (STMT_t*)hstmt; - HPROC hproc = SQL_NULL_HPROC; - - RETCODE retcode = SQL_SUCCESS; - int sqlstat = en_00000; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - if( szCursor == NULL ) - { - PUSHSQLERR ( pstmt->herr, en_S1009 ); - - return SQL_ERROR; - } - - if( cbCursor < 0 && cbCursor != SQL_NTS ) - { - PUSHSQLERR ( pstmt->herr, en_S1090 ); - - return SQL_ERROR; - } - - /* check state */ - if( pstmt->asyn_on != en_NullProc ) - { - sqlstat = en_S1010; - } - else - { - switch( pstmt->state ) - { - case en_stmt_executed: - case en_stmt_cursoropen: - case en_stmt_fetched: - case en_stmt_xfetched: - sqlstat = en_24000; - break; - - case en_stmt_needdata: - case en_stmt_mustput: - case en_stmt_canput: - sqlstat = en_S1010; - break; - - default: - break; - } - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - hproc = _iodbcdm_getproc( pstmt->hdbc, en_SetCursorName); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_SetCursorName, ( - pstmt->dhstmt, szCursor, cbCursor ) ) - -#if 0 - retcode = hproc ( pstmt->dhstmt, szCursor, cbCursor ); -#endif - - if( retcode == SQL_SUCCESS - || retcode == SQL_SUCCESS_WITH_INFO ) - { - pstmt->cursor_state = en_stmt_cursor_named; - } - - return retcode; -} - -RETCODE SQL_API SQLBindParameter ( - HSTMT hstmt, - UWORD ipar, - SWORD fParamType, - SWORD fCType, - SWORD fSqlType, - UDWORD cbColDef, - SWORD ibScale, - PTR rgbValue, - SDWORD cbValueMax, - SDWORD FAR* pcbValue ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc = SQL_NULL_HPROC; - - int sqlstat = en_00000; - RETCODE retcode = SQL_SUCCESS; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check param */ - if( fSqlType > SQL_TYPE_MAX - || ( fSqlType < SQL_TYPE_MIN - && fSqlType > SQL_TYPE_DRIVER_START ) ) - /* Note: SQL_TYPE_DRIVER_START is a nagtive number - * So, we use ">" */ - { - sqlstat = en_S1004; - } - else if ( ipar < 1 ) - { - sqlstat = en_S1093; - } - else if( (rgbValue == NULL && pcbValue == NULL) - && fParamType != SQL_PARAM_OUTPUT ) - { - sqlstat = en_S1009; - /* This means, I allow output to nowhere - * (i.e. * junk output result). But I can't - * allow input from nowhere. - */ - } -/********** - else if( cbValueMax < 0L && cbValueMax != SQL_SETPARAM_VALUE_MAX ) - { - sqlstat = en_S1090; - } -**********/ - else if( fParamType != SQL_PARAM_INPUT - && fParamType != SQL_PARAM_OUTPUT - && fParamType != SQL_PARAM_INPUT_OUTPUT ) - { - sqlstat = en_S1105; - } - else - { - switch( fCType ) - { - case SQL_C_DEFAULT: - case SQL_C_CHAR: - case SQL_C_BINARY: - case SQL_C_BIT: - case SQL_C_TINYINT: - case SQL_C_STINYINT: - case SQL_C_UTINYINT: - case SQL_C_SHORT: - case SQL_C_SSHORT: - case SQL_C_USHORT: - case SQL_C_LONG: - case SQL_C_SLONG: - case SQL_C_ULONG: - case SQL_C_FLOAT: - case SQL_C_DOUBLE: - case SQL_C_DATE: - case SQL_C_TIME: - case SQL_C_TIMESTAMP: - break; - - default: - sqlstat = en_S1003; - break; - } - } - - if(sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - /* check state */ - if( pstmt->state >= en_stmt_needdata - || pstmt->asyn_on != en_NullProc ) - { - PUSHSQLERR ( pstmt->herr, en_S1010 ); - - retcode = SQL_ERROR; - } - - hproc = _iodbcdm_getproc( pstmt->hdbc, en_BindParameter ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_BindParameter, ( - pstmt->dhstmt, ipar, fParamType, fCType, fSqlType, - cbColDef, ibScale, rgbValue, cbValueMax, pcbValue ) ) - -#if 0 - retcode = hproc(pstmt->dhstmt, ipar, fParamType, fCType, fSqlType, - cbColDef, ibScale, rgbValue, cbValueMax, pcbValue ); -#endif - - return retcode; -} - -RETCODE SQL_API SQLParamOptions( - HSTMT hstmt, - UDWORD crow, - UDWORD FAR* pirow ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc; - RETCODE retcode; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - if( crow == (UDWORD)0UL ) - { - PUSHSQLERR ( pstmt->herr, en_S1107 ); - - return SQL_ERROR; - } - - if( pstmt->state >= en_stmt_needdata - || pstmt->asyn_on != en_NullProc ) - { - PUSHSQLERR ( pstmt->herr, en_S1010 ); - - return SQL_ERROR; - } - - hproc = _iodbcdm_getproc ( pstmt->hdbc, en_ParamOptions ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_ParamOptions, ( - pstmt->dhstmt, crow, pirow) ) - -#if 0 - retcode = hproc ( pstmt->dhstmt, crow, pirow ); -#endif - - return retcode; -} - -RETCODE SQL_API SQLSetScrollOptions( - HSTMT hstmt, - UWORD fConcurrency, - SDWORD crowKeyset, - UWORD crowRowset ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc; - int sqlstat = en_00000; - RETCODE retcode; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - for(;;) - { - if( crowRowset == (UWORD)0 ) - { - sqlstat = en_S1107; - break; - } - - if( crowKeyset > (SDWORD)0L && crowKeyset < (SDWORD)crowRowset ) - { - sqlstat = en_S1107; - break; - } - - if( crowKeyset < 1 ) - { - if( crowKeyset != SQL_SCROLL_FORWARD_ONLY - && crowKeyset != SQL_SCROLL_STATIC - && crowKeyset != SQL_SCROLL_KEYSET_DRIVEN - && crowKeyset != SQL_SCROLL_DYNAMIC ) - { - sqlstat = en_S1107; - break; - } - } - - if( fConcurrency != SQL_CONCUR_READ_ONLY - && fConcurrency != SQL_CONCUR_LOCK - && fConcurrency != SQL_CONCUR_ROWVER - && fConcurrency != SQL_CONCUR_VALUES ) - { - sqlstat = en_S1108; - break; - } - - if( pstmt->state != en_stmt_allocated ) - { - sqlstat = en_S1010; - break; - } - - hproc = _iodbcdm_getproc( pstmt->hdbc, en_SetScrollOptions ); - - if( hproc == SQL_NULL_HPROC ) - { - sqlstat = en_IM001; - break; - } - - sqlstat = en_00000; - if( 1 ) /* turn off solaris warning message */ - break; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_SetScrollOptions, ( - pstmt->dhstmt, - fConcurrency, - crowKeyset, - crowRowset ) ) - -#if 0 - retcode = hproc(pstmt->dhstmt, - fConcurrency, - crowKeyset, - crowRowset ); -#endif - - return retcode; -} - -RETCODE SQL_API SQLSetParam ( - HSTMT hstmt, - UWORD ipar, - SWORD fCType, - SWORD fSqlType, - UDWORD cbColDef, - SWORD ibScale, - PTR rgbValue, - SDWORD FAR *pcbValue) -{ - return SQLBindParameter(hstmt, - ipar, - (SWORD)SQL_PARAM_INPUT_OUTPUT, - fCType, - fSqlType, - cbColDef, - ibScale, - rgbValue, - SQL_SETPARAM_VALUE_MAX, - pcbValue ); -} diff --git a/src/iodbc/result.c b/src/iodbc/result.c deleted file mode 100644 index 1060d40d83..0000000000 --- a/src/iodbc/result.c +++ /dev/null @@ -1,575 +0,0 @@ -/** Prepare for getting query result - - Copyright (C) 1995 by Ke Jin - - This program 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. -**/ - -#include <../iodbc/iodbc.h> - -#include <../iodbc/isql.h> -#include <../iodbc/isqlext.h> - -#include <../iodbc/dlproc.h> - -#include <../iodbc/herr.h> -#include <../iodbc/henv.h> -#include <../iodbc/hdbc.h> -#include <../iodbc/hstmt.h> - -#include <../iodbc/itrace.h> - -RETCODE SQL_API SQLBindCol ( - HSTMT hstmt, - UWORD icol, - SWORD fCType, - PTR rgbValue, - SDWORD cbValueMax, - SDWORD FAR* pcbValue ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc = SQL_NULL_HPROC; - RETCODE retcode; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check argument */ - switch(fCType) - { - case SQL_C_DEFAULT: - case SQL_C_CHAR: - case SQL_C_BINARY: - case SQL_C_BIT: - case SQL_C_TINYINT: - case SQL_C_STINYINT: - case SQL_C_UTINYINT: - case SQL_C_SHORT: - case SQL_C_SSHORT: - case SQL_C_USHORT: - case SQL_C_LONG: - case SQL_C_SLONG: - case SQL_C_ULONG: - case SQL_C_FLOAT: - case SQL_C_DOUBLE: - case SQL_C_DATE: - case SQL_C_TIME: - case SQL_C_TIMESTAMP: - break; - - default: - PUSHSQLERR ( pstmt->herr, en_S1003); - return SQL_ERROR; - } - - if( cbValueMax < 0 ) - { - PUSHSQLERR ( pstmt->herr, en_S1090 ); - - return SQL_ERROR; - } - - /* check state */ - if( pstmt->state > en_stmt_needdata - || pstmt->asyn_on != en_NullProc ) - { - PUSHSQLERR ( pstmt->herr, en_S1010 ); - return SQL_ERROR; - } - - /* call driver's function */ - hproc = _iodbcdm_getproc( pstmt->hdbc, en_BindCol ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_BindCol, ( - pstmt->dhstmt, - icol, - fCType, - rgbValue, - cbValueMax, - pcbValue ) ) - -#if 0 - retcode = hproc(pstmt->dhstmt, - icol, - fCType, - rgbValue, - cbValueMax, - pcbValue ); -#endif - - return retcode; -} - -RETCODE SQL_API SQLGetCursorName( - HSTMT hstmt, - UCHAR FAR* szCursor, - SWORD cbCursorMax, - SWORD FAR* pcbCursor ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc; - RETCODE retcode; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check argument */ - if( cbCursorMax < (SWORD)0 ) - { - PUSHSQLERR ( pstmt->herr, en_S1090 ); - - return SQL_ERROR; - } - - /* check state */ - if( pstmt->state >= en_stmt_needdata - || pstmt->asyn_on != en_NullProc ) - { - PUSHSQLERR ( pstmt->herr, en_S1010 ); - - return SQL_ERROR; - } - - if( pstmt->state < en_stmt_cursoropen - && pstmt->cursor_state == en_stmt_cursor_no ) - { - PUSHSQLERR ( pstmt->herr, en_S1015 ); - - return SQL_ERROR; - } - - /* call driver's function */ - hproc = _iodbcdm_getproc ( pstmt->hdbc, en_GetCursorName ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_GetCursorName, ( - pstmt->dhstmt, - szCursor, - cbCursorMax, - pcbCursor ) ) - -#if 0 - retcode = hproc(pstmt->dhstmt, - szCursor, - cbCursorMax, - pcbCursor ); -#endif - - return retcode; -} - -RETCODE SQL_API SQLRowCount( - HSTMT hstmt, - SDWORD FAR* pcrow ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc; - RETCODE retcode; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check state */ - if( pstmt->state >= en_stmt_needdata - || pstmt->state <= en_stmt_prepared - || pstmt->asyn_on != en_NullProc ) - { - PUSHSQLERR ( pstmt->herr, en_S1010 ); - - return SQL_ERROR; - } - - /* call driver */ - hproc = _iodbcdm_getproc( pstmt->hdbc, en_RowCount ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_RowCount, ( - pstmt->dhstmt, pcrow) ) - -#if 0 - retcode = hproc ( pstmt->dhstmt, pcrow ); -#endif - - return retcode; -} - -RETCODE SQL_API SQLNumResultCols( - HSTMT hstmt, - SWORD FAR* pccol ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc; - RETCODE retcode; - SWORD ccol; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check state */ - if( pstmt->asyn_on == en_NullProc ) - { - if( pstmt->state == en_stmt_allocated - || pstmt->state >= en_stmt_needdata ) - { - PUSHSQLERR ( pstmt->herr, en_S1010 ); - return SQL_ERROR; - } - } - else if( pstmt->asyn_on != en_NumResultCols ) - { - PUSHSQLERR ( pstmt->herr, en_S1010 ); - - return SQL_ERROR; - } - - /* call driver */ - hproc = _iodbcdm_getproc( pstmt->hdbc, en_NumResultCols ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_NumResultCols, ( - pstmt->dhstmt, &ccol) ) - -#if 0 - retcode = hproc( pstmt->dhstmt, &ccol ); -#endif - - /* state transition */ - if( pstmt->asyn_on == en_NumResultCols ) - { - switch( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - case SQL_ERROR: - pstmt->asyn_on = en_NullProc; - - case SQL_STILL_EXECUTING: - default: - break; - } - } - - switch( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - break; - - case SQL_STILL_EXECUTING: - ccol = 0; - pstmt->asyn_on = en_NumResultCols; - break; - - default: - ccol = 0; - break; - } - - if( pccol ) - { - *pccol = ccol; - } - - return retcode; -} - -RETCODE SQL_API SQLDescribeCol( - HSTMT hstmt, - UWORD icol, - UCHAR FAR* szColName, - SWORD cbColNameMax, - SWORD FAR* pcbColName, - SWORD FAR* pfSqlType, - UDWORD FAR* pcbColDef, - SWORD FAR* pibScale, - SWORD FAR* pfNullable ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc; - RETCODE retcode; - int sqlstat = en_00000; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check arguments */ - if( icol == 0 ) - { - sqlstat = en_S1002; - } - else if( cbColNameMax < 0 ) - { - sqlstat = en_S1090; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - /* check state */ - if( pstmt->asyn_on == en_NullProc ) - { - if( pstmt->asyn_on == en_stmt_allocated - || pstmt->asyn_on >= en_stmt_needdata ) - { - sqlstat = en_S1010; - } - } - else if( pstmt->asyn_on != en_DescribeCol ) - { - sqlstat = en_S1010; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - /* call driver */ - hproc = _iodbcdm_getproc( pstmt->hdbc, en_DescribeCol ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_DescribeCol, ( - pstmt->dhstmt, - icol, - szColName, - cbColNameMax, - pcbColName, - pfSqlType, - pcbColDef, - pibScale, - pfNullable) ) - -#if 0 - retcode = hproc(pstmt->dhstmt, - icol, - szColName, - cbColNameMax, - pcbColName, - pfSqlType, - pcbColDef, - pibScale, - pfNullable ); -#endif - - /* state transition */ - if( pstmt->asyn_on == en_DescribeCol ) - { - switch( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - case SQL_ERROR: - pstmt->asyn_on = en_NullProc; - break; - - default: - return retcode; - } - } - - switch( pstmt->state ) - { - case en_stmt_prepared: - case en_stmt_cursoropen: - case en_stmt_fetched: - case en_stmt_xfetched: - if( retcode == SQL_STILL_EXECUTING ) - { - pstmt->asyn_on = en_DescribeCol; - } - break; - - default: - break; - } - - return retcode; -} - -RETCODE SQL_API SQLColAttributes( - HSTMT hstmt, - UWORD icol, - UWORD fDescType, - PTR rgbDesc, - SWORD cbDescMax, - SWORD FAR* pcbDesc, - SDWORD FAR* pfDesc ) -{ - STMT_t FAR* pstmt = (STMT_t FAR*)hstmt; - HPROC hproc; - RETCODE retcode; - int sqlstat = en_00000; - - if( hstmt == SQL_NULL_HSTMT - || pstmt->hdbc == SQL_NULL_HDBC ) - { - return SQL_INVALID_HANDLE; - } - - /* check arguments */ - if( icol == 0 && fDescType != SQL_COLUMN_COUNT ) - { - sqlstat = en_S1002; - } - else if( cbDescMax < 0 ) - { - sqlstat = en_S1090; - } - else if(/* fDescType < SQL_COLATT_OPT_MIN || */ /* turnoff warning */ - ( fDescType > SQL_COLATT_OPT_MAX - && fDescType < SQL_COLUMN_DRIVER_START ) ) - { - sqlstat = en_S1091; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - /* check state */ - if( pstmt->asyn_on == en_NullProc ) - { - if( pstmt->asyn_on == en_stmt_allocated - || pstmt->asyn_on >= en_stmt_needdata ) - { - sqlstat = en_S1010; - } - } - else if( pstmt->asyn_on != en_ColAttributes ) - { - sqlstat = en_S1010; - } - - if( sqlstat != en_00000 ) - { - PUSHSQLERR ( pstmt->herr, sqlstat ); - - return SQL_ERROR; - } - - /* call driver */ - hproc = _iodbcdm_getproc( pstmt->hdbc, en_ColAttributes ); - - if( hproc == SQL_NULL_HPROC ) - { - PUSHSQLERR ( pstmt->herr, en_IM001 ); - - return SQL_ERROR; - } - - CALL_DRIVER ( pstmt->hdbc, retcode, hproc, en_ColAttributes, ( - pstmt->dhstmt, - icol, - fDescType, - rgbDesc, - cbDescMax, - pcbDesc, - pfDesc) ) - -#if 0 - retcode = hproc(pstmt->dhstmt, - icol, - fDescType, - rgbDesc, - cbDescMax, - pcbDesc, - pfDesc ); -#endif - - /* state transition */ - if( pstmt->asyn_on == en_ColAttributes ) - { - switch( retcode ) - { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - case SQL_ERROR: - pstmt->asyn_on = en_NullProc; - break; - - default: - return retcode; - } - } - - switch( pstmt->state ) - { - case en_stmt_prepared: - case en_stmt_cursoropen: - case en_stmt_fetched: - case en_stmt_xfetched: - if( retcode == SQL_STILL_EXECUTING ) - { - pstmt->asyn_on = en_ColAttributes; - } - break; - - default: - break; - } - - return retcode; -} diff --git a/src/iodbc/shrsub.exp b/src/iodbc/shrsub.exp deleted file mode 100644 index bf32323d91..0000000000 --- a/src/iodbc/shrsub.exp +++ /dev/null @@ -1,64 +0,0 @@ -SQLAllocEnv -SQLAllocConnect -SQLConnect -SQLDriverConnect -SQLBrowseConnect - -SQLDataSources -SQLDrivers -SQLGetInfo -SQLGetFunctions -SQLGetTypeInfo - -SQLSetConnectOption -SQLGetConnectOption -SQLSetStmtOption -SQLGetStmtOption - -SQLAllocStmt -SQLPrepare -SQLBindParameter -SQLParamOptions -SQLGetCursorName -SQLSetCursorName -SQLSetScrollOptions -SQLSetParam - -SQLExecute -SQLExecDirect -SQLNativeSql -SQLDescribeParam -SQLNumParams -SQLParamData -SQLPutData - -SQLRowCount -SQLNumResultCols -SQLDescribeCol -SQLColAttributes -SQLBindCol -SQLFetch -SQLExtendedFetch -SQLGetData -SQLSetPos -SQLMoreResults -SQLError - -SQLColumnPrivileges -SQLColumns -SQLForeignKeys -SQLPrimaryKeys -SQLProcedureColumns -SQLProcedures -SQLSpecialColumns -SQLStatistics -SQLTablePrivileges -SQLTables - -SQLFreeStmt -SQLCancel -SQLTransact - -SQLDisconnect -SQLFreeConnect -SQLFreeEnv diff --git a/src/iodbc/windows.h b/src/iodbc/windows.h deleted file mode 100644 index ab92116aed..0000000000 --- a/src/iodbc/windows.h +++ /dev/null @@ -1,145 +0,0 @@ -#ifndef DEBUG - -#endif -#ifndef APWIN /* don't reinclude */ -#define APWIN -#ifndef DEBUG - -#endif - -#ifdef WININC -# include /* normal windows.h */ -# ifdef WIN32 -# include /* windows extensions */ -# define GetCurrentTask (HTASK)GetCurrentProcess -# define GetDOSEnvironment GetEnvironmentStrings -# define PCALL -# else -# define PCALL PASCAL -# endif -#else /* not windows */ -/******* Common definitions and typedefs **********************/ -#ifdef HPUX -# ifndef _VOID -# define VOID int -# endif -# ifndef _UCHAR - typedef char UCHAR; -# define _UCHAR -# endif -# ifndef _SCHAR - typedef char SCHAR; -# define _SCHAR -# endif -#endif /* HPUX */ - -#ifdef OSF1 -# ifndef _UCHAR - typedef char UCHAR; -# define _UCHAR -# endif -# ifndef _SDWORD -# define _SDWORD - typedef int SDWORD; -# endif -# ifndef _UDWORD -# define _UDWORD - typedef unsigned int UDWORD; -# endif -# ifndef _LDOUBLE -# define _LDOUBLE - typedef double LDOUBLE; -# endif -# ifndef _DWORD -# define _DWORD - typedef int DWORD; -# endif -#endif /* OSF1 */ - -#if defined (SVR4) && defined(I386) -# ifndef _UCHAR - typedef char UCHAR; -# define _UCHAR -# endif -# ifndef _LDOUBLE -# define _LDOUBLE - typedef double LDOUBLE; -# endif -#endif /* SVR4 && I386 */ - -#ifndef _VOID -# define _VOID -# define VOID void -#endif - -#ifdef WIN -# define LONG long -#endif - -#ifndef _DWORD -# define _DWORD -/* typedef unsigned long DWORD; */ -#endif - -#ifndef _UINT -# define _UINT - typedef unsigned int UINT; -#endif - -#ifdef PC -# define FAR _far -# define NEAR _near -# define PASCAL _pascal -# define CDECL _cdecl -# define WINAPI _far _pascal -# define CALLBACK _far _pascal -# define EXPORT _export -#else -# define FAR -# define NEAR -# define PASCAL -# define CDECL -# define WINAPI -# define CALLBACK -# define EXPORT -#endif -#define PCALL PASCAL - -/****** Simple types & common helper macros ********************/ - -/* typedef int BOOL; */ -#define FALSE 0 -#define TRUE 1 - -typedef unsigned char BYTE; -/* typedef unsigned short WORD; */ - -#define LOBYTE(w) ((BYTE)(w)) -#define HIBYTE(w) ((BYTE)(((UINT)(w) >> 8) & 0xFF)) - -#define LOWORD(l) ((WORD)(DWORD)(l)) -#define HIWORD(l) ((WORD)((((DWORD)(l)) >> 16) & 0xFFFF)) - -#define MAKELONG(low, high) ((LONG)(((WORD)(low)) |\ - (((DWORD)((WORD)(high))) << 16))) - -#define max(a,b) (((a) > (b)) ? (a) : (b)) -#define min(a,b) (((a) < (b)) ? (a) : (b)) - -/****** Common pointer types **********************************/ - -#ifndef NULL -#define NULL 0 -#endif - -/****** Common handle types *************************************/ - -typedef UINT HANDLE; -/* typedef UINT HWND; */ - - -#endif /* ifdef not WIN */ - -#endif /* ifdef APWIN */ - -/* end of apwin.h */ diff --git a/src/makeb32.env b/src/makeb32.env deleted file mode 100644 index 57e62fa081..0000000000 --- a/src/makeb32.env +++ /dev/null @@ -1,32 +0,0 @@ -# Common settings for Borland 32-bit compilation (makefile.b32 files) - -WXDIR = $(WXWIN) -CFG = $(WXDIR)\src\msw\wxwin32.cfg -WXLIBDIR = $(WXDIR)\lib -WXINC = $(WXDIR)\include -WIN95FLAG = -D__WIN95__ -D__WINDOWS__ - -!ifndef FINAL -FINAL=0 -!endif - -!if "$(FINAL)" == "0" -OPT = -Od -DEBUG_FLAGS= -v -DWXDEBUG=1 -D__WXDEBUG__ -DUSE_DEFINE -!else -OPT = -O2 -DEBUG_FLAGS = -DUSE_DEFINE -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -LIBTARGET= $(WXLIBDIR)\wx32.lib -DUMMY=dummy - -SRCSUFF = cpp -OBJSUFF = obj - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } diff --git a/src/makebcc.env b/src/makebcc.env deleted file mode 100644 index 70b5f43388..0000000000 --- a/src/makebcc.env +++ /dev/null @@ -1,33 +0,0 @@ -# Common settings for Borland 16-bit compilation (makefile.bcc files) - -WXDIR = $(WXWIN) - -CFG = $(WXDIR)\src\wxwin.cfg -WXLIB = $(WXDIR)\lib -WXINC = $(WXDIR)\include\msw -WXBASEINC = $(WXDIR)\include\base - -!ifndef FINAL -FINAL=0 -!endif - -!if "$(FINAL)" == "0" -LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -D__WXDEBUG__ -DWXDEBUG=1 -!else -LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -O2 -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -LIBTARGET= $(WXLIB)\wx.lib - -SRCSUFF = cpp -OBJSUFF = obj - -.$(SRCSUFF).obj: - bcc $(CPPFLAGS) -c {$< } diff --git a/src/makefile.bcc b/src/makefile.bcc deleted file mode 100644 index eec6ab1157..0000000000 --- a/src/makefile.bcc +++ /dev/null @@ -1,97 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds wxWindows library wx.lib for Windows 3.1 -# and Borland C++ 3.1. This makefile calls makefile.bcc in msw and -# base subdirectories. - -!if "$(BCCDIR)" == "" -!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 -!endif - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -!ifndef DEBUG -DEBUG=0 -!endif - -!ifndef FINAL -FINAL=0 -!endif - -# Change these if needed. -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makebcc.env - -!if "$(FINAL)" == "0" -OPT = -Od -DEBUG_FLAGS= -v /DDEBUG=$(DEBUG) # -v # -v for debugging info -!else -OPT = -O2 -DEBUG_FLAGS = /DDEBUG=$(DEBUG) -!endif - -BOR_VER = 4 - -#!if "$(BOR_VER)" == "3.1" -#BCCDIR = d:\bc3 -#!elif "$(BOR_VER)" == "4" -#BCCDIR = d:\bc4 -#!endif - -WXBASEINC = $(WXDIR)\include\base -WXINC = $(WXDIR)\include\msw -PROLOGIOINC = $(WXDIR)\utils\prologio\src -XPMINC=$(WXDIR)\contrib\wxxpm\libxpm.34b\lib - -all: wxwin.cfg - cd $(WXDIR)\src\msw - make -f makefile.bcc -DCFG=$(CFG) -DWXDIR=$(WXDIR) DEBUG=$(DEBUG) -DDEBUG_FLAGS=$(DEBUG_FLAGS) -DOPT=$(OPT) -DFINAL=$(FINAL) - cd $(WXDIR)\src - -clean: - erase wxwin.cfg - cd $(WXDIR)\src\msw - make -f makefile.bcc clean - cd $(WXDIR)\src - -wxwin.cfg: makefile.bcc - copy &&! --H=$(WXDIR)\src\borland.pch --2 --P --d --w-hid --w-par --w-pia --w-aus --w-rch --ml --Od --WE --Fs- --Vf --I$(WXBASEINC);$(WXINC);$(PROLOGIOINC);$(XPMINC);$(BCCDIR)\include;$(WXDIR)\contrib\fafa;$(WXDIR)\contrib\itsybits;$(WXDIR)\utils\rcparser\src - --L$(BCCDIR)\lib --Dwx_msw -! wxwin.cfg -!if "$(BOR_VER)" == "3.1" - echo -Ff=4 >>wxwin.cfg -!elif "$(BOR_VER)" == "4" - echo -Ff=512 >>wxwin.cfg - echo -dc >>wxwin.cfg -!endif - - -# -O was: -Oxt - diff --git a/src/makefile.dos b/src/makefile.dos deleted file mode 100644 index 4e5afd4ce7..0000000000 --- a/src/makefile.dos +++ /dev/null @@ -1,51 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds wxWindows library wx.lib for Windows 3.1 -# You can invoke the makefile in this directory, wx/src, or -# equally from wx/src/msw. This makefile was created to be -# consistent with other makefiles which were appearing this -# directory. - -# Arguments: -# -# FINAL=1 argument to nmake to build version with no debugging info. -# DEBUG=1 argument to nmake to build DEBUG version (memory checking, tracing) -# -# Set WXDIR to the wxWindows directory if env. variable WXWIN not set. -# -WXDIR = $(WXWIN) -THISDIR = $(WXDIR)\src\msw -WXLIB = $(WXDIR)\lib -WXINC = $(WXDIR)\include\msw -WXBASESRC = $(WXDIR)\src\base -WXBASEINC = $(WXDIR)\include\base - -!ifndef FINAL -FINAL=0 -!endif - -!ifndef WXDEBUG -WXDEBUG=0 -!endif - -all: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) WXDEBUG=$(WXDEBUG) - cd $(THISDIR) - -clean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -cleanall: - cd $(WXDIR)\src\msw - nmake -f makefile.dos cleanall - cd $(THISDIR) diff --git a/src/makefile.nt b/src/makefile.nt deleted file mode 100644 index a6681a2230..0000000000 --- a/src/makefile.nt +++ /dev/null @@ -1,35 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1997 -# Updated: -# Copyright: (c) 1997, Julian Smart -# -# "%W% %G%" -# -# Makefile : Builds wxWindows library wx.lib for VC++ (32-bit) -# Arguments: -# -# FINAL=1 argument to nmake to build version with no debugging info. -# dll builds a library (wxdll.lib) suitable for creating DLLs -# * Note that the dll target is experimental - see docs/dll.txt. -# -!include - -THISDIR=$(WXWIN)\src - -all: - cd msw - nmake -f makefile.nt - cd $(THISDIR) - -clean: - cd msw - nmake -f makefile.nt clean - cd $(THISDIR) - -cleanall: - cd msw - nmake -f makefile.nt cleanall - cd $(THISDIR) - diff --git a/src/makeg95.env b/src/makeg95.env deleted file mode 100644 index d9aa03c776..0000000000 --- a/src/makeg95.env +++ /dev/null @@ -1,192 +0,0 @@ -# makeg95.env -# Common makefile settings for wxWindows programs -# This file is included by all the other makefiles, thus changes -# made here take effect everywhere (except where overriden). -# -# An alternative to editing this file is to create a shell script -# to export specific variables, and call make with the -e switch -# to override makefile variables. See wx/install/install.txt. -# And you can override specific variables on the make command line, e.g. -# -# make -f makefile.unix WXDEBUG='' -# -# You may prefer to use the GNU configure script than raw makefiles - -# see contrib/wxshlib. -# - -########################## Compiler ################################## - -# C++ compiler -# For AIX/CSet++: use CC = xlC -# For IRIX: use CC = CC -# CC = gcc-2.6.2 -CC = gcc - -# C compiler for pure C programs -# Typical: CC=g++ , CCC=gcc -# CC=cl386 /Tp, CCC=cl386 -# -# (Used only for XView, file sb_scrol.c) -# -CCC = $(CC) - -# Compiler used for LEX generated C -# AIX: use $(CCC) -CCLEX=$(CC) - -MAKE=make - -# LEX -LEX=flex.exe -t -L - -# YACC. byacc or bison -# YACC=byacc.exe -YACC=bison.exe - -# Resource compiler -RESCOMP=windres.exe - -RESFLAGS=--include-dir $(WXDIR)/include --define __WIN32__ --define __WIN95__ --define __GNUWIN32__ - -########################## Compiler flags ############################# - -# Miscellaneous compiler options -# Solaris/GCC: -DSVR4 -# Solaris/GCC, dynamic library: -DSVR4 -fPIC -# FreeBDS 2.0: does not need -D_BSD - always defined -# AIX/CSet++: -+ -qsrcmsg -DSYSV -# AIX/GCC: -DSYSV -DAIX -# Data General: -DDG -# HP: -D_HPUX_SOURCE +a1 -Aa +d -z -# IRIX: -mips2 -OPTIONS= # -D__MINGW32__ # -D__EGCS__ - -# Debugging information -# AIX: comment out. -# IRIX: -g3 -DEBUGFLAGS = -ggdb -D__WXDEBUG__ - -# Debug/trace mode. 1 or more for debugging. -WXDEBUG=0 - -WIN95=1 - -ifeq ($(WIN95),0) -# With 3.50, Win95 will use your existing icons to show smaller ones. -# With 4.0, you'll have to follow Win95 procedures for icons or you'll get the -# default Windows icon. -APPVER=3.50 -WINVERSION=-DWINVER=0x0350 -D__GNUWIN32__ -D__WIN32__ # Generic WIN32 -else -APPVER=3.50 # 4.0 -# This means 'enable Windows 95 features' (in wxWindows and in VC++ 4.0). -WINVERSION=-DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ -endif - -CPU=i386 - -# Suffixes -OBJSUFF=o -SRCSUFF=cpp -LIBPREFIX=lib -LIBSUFF=a -EXESUFF=.exe -RESSUFF=res -RSCSUFF=rsc - -# Warnings -# AIX: comment out -# IRIX: -w -wlint,-fpiv -# These are for the GNU compiler. We now get the compiler to check for as -# many things as we can, to catch portability problems sooner. -WARN = -Wall - -# Which GUI, -Dwx_xview or -Dwx_motif (don't change this) -GUI = -D__WXMSW__ -D__WINDOWS__ - -# Optimization -# OPT = -O -# FreeBSD 2.0 with i486: OPT = -O2 -m486 -# IRIX: -O2 #-O0 : no, -O1: quick, -O2: global -O3: full(register) -# Linux: -m486 # -O2 for optimization -OPT = - -# Options for ar archiver -# AROPTIONS = crs # For IRIX and Solaris (both SYSVR4). -AROPTIONS = ruv -RANLIB = ranlib - -# Compiler libraries: defaults to GCC libraries -# Solaris: -lgen -ldl -lsocket -lnsl -# and/or possibly -lucb, whatever that is... (-lucb CAUSES MOTIF FILE SELECTION PROBLEMS) -# or possibly -lgen -lsocket -L/usr/ccs/lib linbnsl.a -# GCC > 2.7.1 on Solaris: -lstdc++ -lc -lgen -ldl -lsocket -lnsl -lucb -# SGI: -lPW -# FreeBSD 2.0: -lg++ -lcompat -# FreeBSD 1.x: -lcompat doesn`t need, only -lg++ needed -# AIX: -lCns -lbsd -# G++ 2.7.0 requires -liostream too. -# IRIX: -lPW -#COMPLIBS=-lg++ -#for win95 -#COMPLIBS=-lgcc - -# Compiler or system-specific include paths -# E.g. some SPARCStations need -# -I/usr/ucbinclude/sys -#added for win95 -COMPPATHS= - -########################## Directories ############################### - - -WINLIBS=-lstdc++ -lgcc \ - -lwinspool -lwinmm -lshell32 -loldnames \ - -lcomctl32 -lctl3d32 -lodbc32 - -# Shouldn't need to change these... -WXSRC=$(WXDIR)/src/msw -WXINC=$(WXDIR)/include -WXBASESRC=$(WXDIR)/src/common -WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx.$(LIBSUFF) -INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/include/wx/msw/gnuwin32 -I$(WXDIR)/src/zlib $(EXTRAINC)$(COMPPATHS) -RCLFLAGS=-cpp "cpp -lang-c++ -DWIN32 -D_WIN32 -DRCL_INVOKED -I$(WXWIN)\include" - -#LIBS = -lctl3d32 $(WXLIB) $(WINLIBS) $(COMPLIBS) -LIBS = $(WXLIB) $(WINLIBS) $(COMPLIBS) - -WINFLAGS=-D_X86_=1 -DWIN32 -D_WIN32 $(WINVERSION) - -#for windows 95 -XINCLUDE=$(WINFLAGS) -XLIB=$(LIBS) -LDLIBS = $(LIBS) - -# Directory for object files (don't change) -OBJDIR = objects$(GUISUFFIX) - -# You shouldn't need to change these... -CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DWXDEBUG='$(WXDEBUG)' $(WARN) $(OPT) -CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DWXDEBUG='$(WXDEBUG)' $(WARN) $(OPT) -LDFLAGS = -Wl,--subsystem,windows -mwindows -L$(WXDIR)/lib - -.SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .c - -# Set these in a batch file instead e.g. install/cygnus.bat -# RCINCLUDE="$(WXDIR)/include/msw;$(WXDIR)/contrib/fafa;$(WXDIR)/contrib/itsybits"; \ -# CPLUS_INCLUDE_PATH=/usr/H-i386-cygwin32/i386-cygwin32/include:/usr/H-i386-cygwin32/lib/gcc-lib/i386-cygwin32/cygnus-2.7.2-961023/include:$(WXDIR)/include/common:$(WXDIR)/include/msw:$(WXDIR)/contrib/fafa:$(WXDIR)/contrib/itsybits; \ -# export CPLUS_INCLUDE_PATH RCINCLUDE; \ - -.rc.$(RESSUFF): $< $(WXDIR)/include/msw/wx.rc - $(RC) $(RESFLAGS1) $< $(RESFLAGS2) $*.$(RESSUFF) $(RCLFLAGS) - -.$(RESSUFF).$(RSCSUFF): $< - $(CVTRES) $< $*.$(RSCSUFF) - -.$(SRCSUFF).$(OBJSUFF): - $(CC) -c $(CPPFLAGS) -o $@ $*.$(SRCSUFF) - -.c.o: - $(CC) -c $(CPPFLAGS) -o $@ $*.c - - diff --git a/src/makemsc.env b/src/makemsc.env deleted file mode 100644 index e12f7b692b..0000000000 --- a/src/makemsc.env +++ /dev/null @@ -1,71 +0,0 @@ -# -# File: makemsc.env -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Include file for MS VC++ makefiles -# Arguments: -# -# FINAL=1 argument to nmake to build version with no debugging info. -# DLL=1 builds a library (wxdll.lib) suitable for creating DLLs. -# -# Set WXDIR to the wxWindows directory if env. variable WXWIN not set. -# From your specific makefile, set EXTRAFLAGS to add flags to CPPFLAGS, -# such as extra include directories or defines. - -WXDIR = $(WXWIN) -WXINC = $(WXDIR)\include - -WXLIB=$(WXDIR)\lib\wx1.lib $(WXDIR)\lib\wx2.lib $(WXDIR)\lib\wx3.lib - -# Suffixes -OBJSUFF=obj -SRCSUFF=cpp - -INC=/I$(WXDIR)\include - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!ifndef FINAL -FINAL=0 -!endif - -!ifndef DLL -DLL=0 -!endif - -OPTIONS= - -!if "$(FINAL)" == "0" -OPT = /Od /Gy -DEBUG_FLAGS= /Zi $(ZOPTION) -LINK_DEBUG_FLAGS=/CO -!else -OPT = /Od /Gy # Note: /Ox or /Os crash the compiler or samples -DEBUG_FLAGS= -LINK_DEBUG_FLAGS= -!endif - -LIBS=$(WXLIB) $(EXTRALIBS) oldnames libw llibcew commdlg ddeml shell mmsystem $(WXDIR)\src\msw\ctl3d\msvc\ctl3dv2.lib - -!if "$(DLL)" == "0" -PCH=WX.PCH -PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\src\msw\$(PCH) -CPPFLAGS= $(DEBUG_FLAGS) $(OPTIONS) $(INC) $(EXTRAFLAGS) /DWXDEBUG=1 /D__WXDEBUG__ /AL /Gt4 /Gx- /W4 /G2sw $(OPT) /D__WXMSW__ /D__WINDOWS__ $(PRECOMP) -CPPFLAGS2= $(DEBUG_FLAGS) $(OPTIONS) $(INC) $(EXTRAFLAGS) /DWXDEBUG=1 /D__WXDEBUG__ /AL /Gt4 /Gx- /W4 /G2sw $(OPT) /D__WXMSW__ /D__WINDOWS__ -LINKFLAGS=$(LINK_DEBUG_FLAGS) /NOD /SEG:512 /ONERROR:NOEXE -DUMMY=dummy -!else -PCH=WX.PCH -PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\src\msw\$(PCH) -CPPFLAGS= $(DEBUG_FLAGS) $(OPTIONS) $(INC) $(EXTRAFLAGS) /AL /Gt4 /Gx- /W4 /G2s /GD $(OPT) /D__WXMSW__ /D__WINDOWS__$(PRECOMP) -CPPFLAGS2= $(DEBUG_FLAGS) $(OPTIONS) $(INC) $(EXTRAFLAGS) /AL /Gt4 /Gx- /W4 /G2s /GD $(OPT) /D__WXMSW__ /D__WINDOWS__ -LINKFLAGS=$(LINK_DEBUG_FLAGS) /NOD /SEG:512 /ONERROR:NOEXE -DUMMY=dummydll -!endif - diff --git a/src/makesc.env b/src/makesc.env deleted file mode 100644 index 9c3455bff6..0000000000 --- a/src/makesc.env +++ /dev/null @@ -1,20 +0,0 @@ -# Common settings for Symantec - -WXDIR = $(WXWIN) -INCDIR = $(WXDIR)\include -MSWINC = $(INCDIR)\msw -BASEINC = $(INCDIR)\base - -SRCSUFF = cpp -OBJSUFF = obj - -# default values - -CC=sc -RC=rc -CFLAGS = -o -ml -W -D__WXMSW__ -LDFLAGS = -ml -W - -.$(SRCSUFF).obj: - *$(CC) -c $(CFLAGS) -I$(INCLUDE) $(OPTIONS) $< - diff --git a/src/makewat.env b/src/makewat.env deleted file mode 100644 index 8a668d85b2..0000000000 --- a/src/makewat.env +++ /dev/null @@ -1,159 +0,0 @@ -# File: makewat.env -# Purpose: Watcom environments for wxWindows makefiles. -# Author: Julian Smart and others -# -# The main things to change are: -# -# WATCOM: set to where the compiler is installed -# WXDIR: set to where the wxWindows is installed -# MODE: set to windows [16 bit windows], nt [win32s], or win386 [32-bit non-WIN32] - -FINAL=0 -WATCOMDIR=$(%WATCOM) -#.EXTENSIONS: .exe .obj .c .cc .cpp .res .rc .def - -# Set this to win386 if compiling under WIN386 mode, or -# to windows for normal 16-bit Windows, nt if compiling for WIN32s/NT -MODE= nt # windows - -WXDIR = c:\wx -WXINC = $(WXDIR)\include\msw -WXBASEINC = $(WXDIR)\include\base - -# Suffixes -OBJSUFF=obj -SRCSUFF=cpp - -WXDEBUG=0 - -!ifneq NOPRECOMP 1 -PRECOMP = /fh=$(WXDIR)\src\msw\watcom.pch -!endif - -RC = wrc - -!ifeq MODE win386 - -##### WIN386 OPTIONS - -# Set LEVEL to 386 if using 32-bit compilation -LEVEL = 386 -CCC = wpp$(LEVEL) -CC = wcc$(LEVEL) -OS_TARGET = win386 -MODEL = -LINKOPTION = win386 -BINDCOMMAND = wbind -WATLIBDIR = $(WATCOMDIR)\lib386\win -MINDATA = option mindata=100K -MAXDATA = option maxdata=100K -STACK = option stack=64k -EXTRALIBS = $(WXDIR)\contrib\ctl3d\ctl3d32.obj -IFLAGS = -i=$(WXINC) -i=$(WXBASEINC) -i=$(WXDIR)\contrib\fafa -i=$(%watcom)\h;$(%watcom)\h\win -RESFLAGS1 = -r -bt=windows /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa -RESFLAGS2 = -R $(name) /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa -DEBUGINFO = debug all - -#CPPFLAGS = /zw /w1 /zq /d2 /d__WIN386__ /zt4 $(MODEL) /d__WXMSW__ -CPPFLAGS = /zw /w1 /zq /d1 /d__WIN386__ $(MODEL) $(PRECOMP) /d__WXMSW__ $(EXTRACPPFLAGS) - -!endif -#### END WIN386 MODE - -!ifeq MODE windows - -##### 16-BIT WINDOWS OPTIONS - -# Set LEVEL to 386 if using 32-bit compilation -LEVEL = -CCC = wpp$(LEVEL) -CC = wcc$(LEVEL) -OS_TARGET = windows -MODEL =/ml -LINKOPTION = windows -BINDCOMMAND = echo -WATLIBDIR = $(WATCOMDIR)\lib286\win -MINDATA = -MAXDATA = -STACK = -EXTRALIBS=$(WATLIBDIR)\shell.lib $(WATLIBDIR)\ddeml.lib $(WATLIBDIR)\ctl3d.lib $(WATLIBDIR)\commdlg.lib $(WATLIBDIR)\mmsystem.lib -IFLAGS = -i=$(WXINC) -i=$(WXBASEINC) -i=$(WXDIR)\contrib\fafa -RESFLAGS1 = -r -bt=windows -i=$(WXINC) -i=$(WXDIR)\contrib\fafa -RESFLAGS2 = -R -DEBUGINFO = debug all - -#-i=$(WXDIR)\contrib\itsybits - -# Note: I've added the data threshold (/zt4) for 16-bit operation, -# or we get link failure (TEXT segment overflow). Is this OK for -# 32-bit mode also? -- JACS -# An alternative might be /zc (put string literals in code segment). -#CPPFLAGS = /zw /w1 /zq /d1 /zt4 $(MODEL) /d__WXMSW__ -CPPFLAGS = /zw /w2 /zq /d1 $(MODEL) $(PRECOMP) /d__WXMSW__ $(EXTRACPPFLAGS) - -!endif -#### END WINDOWS MODE - -!ifeq MODE nt - -##### NT OPTIONS - -LEVEL = 386 -CCC = wpp$(LEVEL) -CC = wcc$(LEVEL) -OS_TARGET = nt_win -MODEL = -# If you use win95, assumptions will be made about Win95 icon format etc. -# so nt_win is probably better for simultaneous Win32s/Win95/NT operation. -LINKOPTION = nt_win # win95 -BINDCOMMAND = wrc -WATLIBDIR = $(WATCOMDIR)\lib386\nt -MINDATA = -MAXDATA = -STACK = option stack=64k -EXTRALIBS = $(WATLIBDIR)\ctl3d32.lib $(WATLIBDIR)\odbc32.lib -IFLAGS = -i=$(WXINC) -i=$(WXBASEINC) -i=$(WXDIR)\contrib\fafa -i=$(%watcom)\h;$(%watcom)\h\nt -RESFLAGS1 = -r -bt=nt /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa -RESFLAGS2 = -R $(name) /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa -DEBUGINFO = debug all # Linking: comment out if operating in a non-debuggable environment - -#-i=$(WXDIR)\contrib\itsybits - -# Here are some possible optimization flags: -# /5r Pentium timings -# /fp5 /fpi87 Inline 80x87 instructions optimized for Pentium: coprocessor must be present -# /ox Standard optimizations -# /or Reordering for Pentium timings (included in /ox) -# The Watcom-recommended flags for optimum Pentium speed are: -# /oneatx /zp4 /5 /fpi87 /fp5 - -OPTFLAGS=/ox /5r # /DWXDEBUG=1 - -# /d1 for line numbers only: anything else produces an enormous wx32.lib -CPPFLAGS = /bt=nt /w1 /D__WIN32__ /zq $(OPTFLAGS) $(MODEL) $(PRECOMP) /d1 /d__WXMSW__ $(EXTRACPPFLAGS) - -!endif -#### END NT MODE - -.cpp.obj: # $< # .AUTODEPEND - *$(CCC) $(CPPFLAGS) $(IFLAGS) $< - -# %create tmp.lbc -# @%append tmp.lbc $(CPPFLAGS) $(IFLAGS) $< -# echo $< -# $(CCC) @tmp.lbc - -.c.obj: # $< # .AUTODEPEND - *$(CC) $(CPPFLAGS) $(IFLAGS) $< - -# This doesn't work for wcc -# %create tmp.lbc -# @%append tmp.lbc $(CPPFLAGS) $(IFLAGS) $< -# echo $< -# $(CC) @tmp.lbc - -dummy: .SYMBOLIC - @echo Please give a target for wxWin makefiles: the usual one is 'all'. - -erasepch: .SYMBOLIC - -erase $(WXDIR)\src\msw\watcom.pch diff --git a/src/mingegcs.bat b/src/mingegcs.bat deleted file mode 100644 index 2176c2885d..0000000000 --- a/src/mingegcs.bat +++ /dev/null @@ -1,13 +0,0 @@ -REM -REM replace g:\egcs-mingw32 with whatever your installation root may be. -REM -path C:\WINDOWS;C:\WINDOWS\COMMAND;g:\egcs-mingw32\bin;c:\bin - -SET GCC_EXEC_PREFIX=g:\egcs-mingw32\lib\gcc-lib\ -set BISON_SIMPLE=g:\egcs-mingw32\share\bison.simple -set BISON_HAIRY=g:\egcs-mingw32\share\bison.hairy - -rem 4DOS users only... -unalias make -alias makeming make -f makefile.g95 - diff --git a/src/mingw32.bat b/src/mingw32.bat deleted file mode 100644 index 6e3bea5c20..0000000000 --- a/src/mingw32.bat +++ /dev/null @@ -1,16 +0,0 @@ -rem Mingw32 environment variables -rem -set WXWIN=d:\wx2 -path C:\WINDOWS;C:\WINDOWS\COMMAND;e:\mingw32\bin;e:\mingw32\lib\gcc-lib\i386-mingw32\2.8.1;c:\bin -rem set GCC_EXEC_PREFIX=G:\gnuwin32\b18\H-i386-cygwin32\lib\gcc-lib\ -set RCINCLUDE=%WXWIN\include -rem set CPLUS_INCLUDE_PATH=/g/gnuwin32/b18/h-i386-cygwin32/i386-cygwin32/include:/g/gnuwin32/b18/include/g++:/g/gnuwin32/b18/H-i386-cygwin32/lib/gcc-lib/i386-cygwin32/cygnus-2.7.2-970404/include:/d/wx2/include:/g/gnuwin32/b18/include/g++ -set CPLUS_INCLUDE_PATH=e:\mingw32\include;e:\mingw32\lib\gcc-lib\i386-mingw32\2.8.1\include;e:\mingw32\include\g++ -set C_INCLUDE_PATH=e:\mingw32\include;e:\mingw32\lib\gcc-lib\i386-mingw32\2.8.1\include;e:\mingw32\include\g++ -set LIBRARY_PATH=e:\mingw32\lib;e:\mingw32\lib\gcc-lib\i386-mingw32\2.8.1 -set BISON_SIMPLE=e:\mingw32\share\bison.simple -set BISON_HAIRY=e:\mingw32\share\bison.hairy - -rem 4DOS users only... -unalias make -alias makeming make -f makefile.g95 diff --git a/src/motif.inc b/src/motif.inc deleted file mode 100644 index 5faa67a46d..0000000000 --- a/src/motif.inc +++ /dev/null @@ -1,61 +0,0 @@ -# needed for unactivated -NONE = - -# define library name -LIB_TARGET=wx_motif -LIB_MAJOR=0 -LIB_MINOR=1 - -# define library sources - -LIB_CPP_SRC=\ -\ - -LIB_C_SRC=\ -\ - png/png.c \ - png/pngset.c \ - png/pngget.c \ - png/pngrutil.c \ - png/pngtrans.c \ - png/pngwutil.c \ - png/pngread.c \ - png/pngrio.c \ - png/pngwio.c \ - png/pngwrite.c \ - png/pngrtran.c \ - png/pngwtran.c \ - png/pngmem.c \ - png/pngerror.c \ - png/pngpread.c \ -\ - zlib/adler32.c \ - zlib/compress.c \ - zlib/crc32.c \ - zlib/gzio.c \ - zlib/uncompr.c \ - zlib/deflate.c \ - zlib/trees.c \ - zlib/zutil.c \ - zlib/inflate.c \ - zlib/infblock.c \ - zlib/inftrees.c \ - zlib/infcodes.c \ - zlib/infutil.c \ - zlib/inffast.c \ -\ - iodbc/dlf.c \ - iodbc/dlproc.c \ - iodbc/herr.c \ - iodbc/henv.c \ - iodbc/hdbc.c \ - iodbc/hstmt.c \ - iodbc/connect.c \ - iodbc/prepare.c \ - iodbc/result.c \ - iodbc/execute.c \ - iodbc/fetch.c \ - iodbc/info.c \ - iodbc/catalog.c \ - iodbc/misc.c \ - iodbc/itrace.c diff --git a/src/msw/Y_TAB.C b/src/msw/Y_TAB.C deleted file mode 100644 index e1e62c59f6..0000000000 --- a/src/msw/Y_TAB.C +++ /dev/null @@ -1,521 +0,0 @@ -#ifndef lint -static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; -#endif -#define YYBYACC 1 -#define YYMAJOR 1 -#define YYMINOR 9 -#define yyclearin (yychar=(-1)) -#define yyerrok (yyerrflag=0) -#define YYRECOVERING (yyerrflag!=0) -#define YYPREFIX "yy" -#line 2 "../common/parser.y" -#include -#include "wx/expr.h" - -#ifndef __EXTERN_C__ -#define __EXTERN_C__ 1 -#endif - -#if defined(__cplusplus) || defined(__STDC__) -#if defined(__cplusplus) && defined(__EXTERN_C__) -extern "C" { -#endif -#endif -int yylex(void); -int yylook(void); -int yywrap(void); -int yyback(int *, int); -void yyerror(char *); - -/* You may need to put /DLEX_SCANNER in your makefile - * if you're using LEX! - */ -#ifdef LEX_SCANNER -/* int yyoutput(int); */ -void yyoutput(int); -#else -void yyoutput(int); -#endif - -#if defined(__cplusplus) || defined(__STDC__) -#if defined(__cplusplus) && defined(__EXTERN_C__) -} -#endif -#endif -#line 37 "../common/parser.y" -typedef union { - char *s; -/* struct pexpr *expr; */ -} YYSTYPE; -#line 51 "y_tab.c" -#define INTEGER 1 -#define WORD 2 -#define STRING 3 -#define PERIOD 13 -#define OPEN 4 -#define CLOSE 5 -#define COMMA 6 -#define NEWLINE 7 -#define ERROR 8 -#define OPEN_SQUARE 9 -#define CLOSE_SQUARE 10 -#define EQUALS 11 -#define EXP 14 -#define YYERRCODE 256 -short yylhs[] = { -1, - 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, - 3, 4, 4, 5, 5, 5, 5, 5, 5, 5, -}; -short yylen[] = { 2, - 0, 2, 2, 2, 2, 4, 2, 3, 0, 1, - 3, 3, 1, 1, 1, 1, 3, 3, 5, 1, -}; -short yydefred[] = { 1, - 0, 0, 0, 0, 2, 0, 5, 3, 0, 0, - 0, 15, 7, 20, 0, 0, 13, 4, 0, 0, - 0, 0, 8, 0, 6, 0, 18, 0, 12, 11, - 0, 19, -}; -short yydgoto[] = { 1, - 5, 14, 15, 16, 17, -}; -short yysindex[] = { 0, - -2, 9, 2, 1, 0, 10, 0, 0, 11, -5, - 17, 0, 0, 0, 14, -1, 0, 0, 33, 38, - 41, 16, 0, 11, 0, 29, 0, 40, 0, 0, - 44, 0, -}; -short yyrindex[] = { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 42, 21, - 24, 0, 0, 0, 0, 30, 0, 0, 0, 0, - 0, 0, 0, 31, 0, 27, 0, 24, 0, 0, - 0, 0, -}; -short yygindex[] = { 0, - 0, 45, -8, 0, 26, -}; -#define YYTABLESIZE 254 -short yytable[] = { 3, - 19, 10, 11, 12, 24, 9, 4, 20, 21, 4, - 13, 10, 11, 12, 8, 30, 10, 28, 12, 4, - 9, 7, 18, 23, 4, 16, 16, 22, 14, 14, - 16, 17, 17, 14, 10, 9, 17, 25, 26, 10, - 9, 27, 31, 9, 32, 6, 9, 29, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, -}; -short yycheck[] = { 2, - 9, 1, 2, 3, 6, 4, 9, 13, 14, 9, - 10, 1, 2, 3, 13, 24, 1, 2, 3, 9, - 4, 13, 13, 10, 9, 5, 6, 11, 5, 6, - 10, 5, 6, 10, 5, 5, 10, 5, 1, 10, - 10, 1, 14, 4, 1, 1, 5, 22, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 256, -}; -#define YYFINAL 1 -#ifndef YYDEBUG -#define YYDEBUG 0 -#endif -#define YYMAXTOKEN 14 -#if YYDEBUG -char *yyname[] = { -"end-of-file","INTEGER","WORD","STRING","OPEN","CLOSE","COMMA","NEWLINE", -"ERROR","OPEN_SQUARE","CLOSE_SQUARE","EQUALS",0,"PERIOD","EXP", -}; -char *yyrule[] = { -"$accept : commands", -"commands :", -"commands : commands command", -"command : WORD PERIOD", -"command : expr PERIOD", -"command : error PERIOD", -"expr : WORD OPEN arglist CLOSE", -"expr : OPEN_SQUARE CLOSE_SQUARE", -"expr : OPEN_SQUARE arglist CLOSE_SQUARE", -"arglist :", -"arglist : arg", -"arglist : arg COMMA arglist", -"arg : WORD EQUALS arg1", -"arg : arg1", -"arg1 : WORD", -"arg1 : STRING", -"arg1 : INTEGER", -"arg1 : INTEGER PERIOD INTEGER", -"arg1 : INTEGER EXP INTEGER", -"arg1 : INTEGER PERIOD INTEGER EXP INTEGER", -"arg1 : expr", -}; -#endif -#ifdef YYSTACKSIZE -#undef YYMAXDEPTH -#define YYMAXDEPTH YYSTACKSIZE -#else -#ifdef YYMAXDEPTH -#define YYSTACKSIZE YYMAXDEPTH -#else -#define YYSTACKSIZE 500 -#define YYMAXDEPTH 500 -#endif -#endif -int yydebug; -int yynerrs; -int yyerrflag; -int yychar; -short *yyssp; -YYSTYPE *yyvsp; -YYSTYPE yyval; -YYSTYPE yylval; -short yyss[YYSTACKSIZE]; -YYSTYPE yyvs[YYSTACKSIZE]; -#define yystacksize YYSTACKSIZE -#line 119 "../common/parser.y" - -#include "../common/lex_yy.c" - -/* -void yyerror(s) -char *s; -{ - syntax_error(s); -} -*/ - -/* Ansi prototype. If this doesn't work for you... uncomment - the above instead. - */ - -void yyerror(char *s) -{ - syntax_error(s); -} - -/* - * Unfortunately, my DOS version of FLEX - * requires yywrap to be #def'ed, whereas - * the UNIX flex expects a proper function. - */ - -/* Not sure if __SC__ is the appropriate thing - * to test - */ - -#ifndef __SC__ -#ifdef USE_DEFINE -#ifndef yywrap -#define yywrap() 1 -#endif -#else if !defined(__alpha) && !defined(__ultrix) -int yywrap() { return 1; } -#endif -#endif -#line 251 "y_tab.c" -#define YYABORT goto yyabort -#define YYREJECT goto yyabort -#define YYACCEPT goto yyaccept -#define YYERROR goto yyerrlab -int -yyparse() -{ - register int yym, yyn, yystate; -#if YYDEBUG - register char *yys; - extern char *getenv(); - - if (yys = getenv("YYDEBUG")) - { - yyn = *yys; - if (yyn >= '0' && yyn <= '9') - yydebug = yyn - '0'; - } -#endif - - yynerrs = 0; - yyerrflag = 0; - yychar = (-1); - - yyssp = yyss; - yyvsp = yyvs; - *yyssp = yystate = 0; - -yyloop: - if (yyn = yydefred[yystate]) goto yyreduce; - if (yychar < 0) - { - if ((yychar = yylex()) < 0) yychar = 0; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - printf("%sdebug: state %d, reading %d (%s)\n", - YYPREFIX, yystate, yychar, yys); - } -#endif - } - if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yychar) - { -#if YYDEBUG - if (yydebug) - printf("%sdebug: state %d, shifting to state %d\n", - YYPREFIX, yystate, yytable[yyn]); -#endif - if (yyssp >= yyss + yystacksize - 1) - { - goto yyoverflow; - } - *++yyssp = yystate = yytable[yyn]; - *++yyvsp = yylval; - yychar = (-1); - if (yyerrflag > 0) --yyerrflag; - goto yyloop; - } - if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yychar) - { - yyn = yytable[yyn]; - goto yyreduce; - } - if (yyerrflag) goto yyinrecovery; -#ifdef lint - goto yynewerror; -#endif -yynewerror: - yyerror("syntax error"); -#ifdef lint - goto yyerrlab; -#endif -yyerrlab: - ++yynerrs; -yyinrecovery: - if (yyerrflag < 3) - { - yyerrflag = 3; - for (;;) - { - if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) - { -#if YYDEBUG - if (yydebug) - printf("%sdebug: state %d, error recovery shifting\ - to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); -#endif - if (yyssp >= yyss + yystacksize - 1) - { - goto yyoverflow; - } - *++yyssp = yystate = yytable[yyn]; - *++yyvsp = yylval; - goto yyloop; - } - else - { -#if YYDEBUG - if (yydebug) - printf("%sdebug: error recovery discarding state %d\n", - YYPREFIX, *yyssp); -#endif - if (yyssp <= yyss) goto yyabort; - --yyssp; - --yyvsp; - } - } - } - else - { - if (yychar == 0) goto yyabort; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - printf("%sdebug: state %d, error recovery discards token %d (%s)\n", - YYPREFIX, yystate, yychar, yys); - } -#endif - yychar = (-1); - goto yyloop; - } -yyreduce: -#if YYDEBUG - if (yydebug) - printf("%sdebug: state %d, reducing by rule %d (%s)\n", - YYPREFIX, yystate, yyn, yyrule[yyn]); -#endif - yym = yylen[yyn]; - yyval = yyvsp[1-yym]; - switch (yyn) - { -case 3: -#line 69 "../common/parser.y" -{process_command(proio_cons(make_word(yyvsp[-1].s), NULL)); free(yyvsp[-1].s);} -break; -case 4: -#line 71 "../common/parser.y" -{process_command(yyvsp[-1].s);} -break; -case 5: -#line 73 "../common/parser.y" -{syntax_error("Unrecognized command.");} -break; -case 6: -#line 77 "../common/parser.y" -{yyval.s = proio_cons(make_word(yyvsp[-3].s), yyvsp[-1].s); free(yyvsp[-3].s);} -break; -case 7: -#line 79 "../common/parser.y" -{yyval.s = proio_cons(NULL, NULL);} -break; -case 8: -#line 81 "../common/parser.y" -{yyval.s = yyvsp[-1].s; } -break; -case 9: -#line 85 "../common/parser.y" -{yyval.s = NULL;} -break; -case 10: -#line 87 "../common/parser.y" -{yyval.s = proio_cons(yyvsp[0].s, NULL);} -break; -case 11: -#line 90 "../common/parser.y" -{yyval.s = proio_cons(yyvsp[-2].s, yyvsp[0].s);} -break; -case 12: -#line 94 "../common/parser.y" -{yyval.s = proio_cons(make_word("="), proio_cons(make_word(yyvsp[-2].s), proio_cons(yyvsp[0].s, NULL))); - free(yyvsp[-2].s); } -break; -case 13: -#line 97 "../common/parser.y" -{yyval.s = yyvsp[0].s; } -break; -case 14: -#line 100 "../common/parser.y" -{yyval.s = make_word(yyvsp[0].s); free(yyvsp[0].s);} -break; -case 15: -#line 102 "../common/parser.y" -{yyval.s = make_string(yyvsp[0].s); free(yyvsp[0].s);} -break; -case 16: -#line 104 "../common/parser.y" -{yyval.s = make_integer(yyvsp[0].s); free(yyvsp[0].s);} -break; -case 17: -#line 106 "../common/parser.y" -{yyval.s = make_real(yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-2].s); free(yyvsp[0].s); } -break; -case 18: -#line 108 "../common/parser.y" -{yyval.s = make_exp(yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-2].s); free(yyvsp[0].s); } -break; -case 19: -#line 111 "../common/parser.y" -{yyval.s = make_exp2(yyvsp[-4].s, yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-4].s); free(yyvsp[-2].s); - free(yyvsp[0].s); } -break; -case 20: -#line 115 "../common/parser.y" -{yyval.s = yyvsp[0].s;} -break; -#line 466 "y_tab.c" - } - yyssp -= yym; - yystate = *yyssp; - yyvsp -= yym; - yym = yylhs[yyn]; - if (yystate == 0 && yym == 0) - { -#if YYDEBUG - if (yydebug) - printf("%sdebug: after reduction, shifting from state 0 to\ - state %d\n", YYPREFIX, YYFINAL); -#endif - yystate = YYFINAL; - *++yyssp = YYFINAL; - *++yyvsp = yyval; - if (yychar < 0) - { - if ((yychar = yylex()) < 0) yychar = 0; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - printf("%sdebug: state %d, reading %d (%s)\n", - YYPREFIX, YYFINAL, yychar, yys); - } -#endif - } - if (yychar == 0) goto yyaccept; - goto yyloop; - } - if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yystate) - yystate = yytable[yyn]; - else - yystate = yydgoto[yym]; -#if YYDEBUG - if (yydebug) - printf("%sdebug: after reduction, shifting from state %d \ -to state %d\n", YYPREFIX, *yyssp, yystate); -#endif - if (yyssp >= yyss + yystacksize - 1) - { - goto yyoverflow; - } - *++yyssp = yystate; - *++yyvsp = yyval; - goto yyloop; -yyoverflow: - yyerror("yacc stack overflow"); -yyabort: - return (1); -yyaccept: - return (0); -} diff --git a/src/msw/accel.cpp b/src/msw/accel.cpp deleted file mode 100644 index 391937f23a..0000000000 --- a/src/msw/accel.cpp +++ /dev/null @@ -1,152 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: accel.cpp -// Purpose: wxAcceleratorTable -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "accel.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/setup.h" -#endif - -#include "wx/msw/private.h" -#include "wx/msw/accel.h" - -#ifdef LoadAccelerators -#undef LoadAccelerators -#endif - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject) -#endif - -class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData -{ - friend class WXDLLEXPORT wxAcceleratorTable; -public: - wxAcceleratorRefData(void); - ~wxAcceleratorRefData(void); - - inline HACCEL GetHACCEL() const { return m_hAccel; } -protected: - HACCEL m_hAccel; - bool m_ok; -}; - -#define M_ACCELDATA ((wxAcceleratorRefData *)m_refData) - -wxAcceleratorRefData::wxAcceleratorRefData() -{ - m_ok = FALSE; - m_hAccel = 0; -} - -wxAcceleratorRefData::~wxAcceleratorRefData() -{ - if (m_hAccel) - { - DestroyAcceleratorTable((HACCEL) m_hAccel); - } - m_hAccel = 0 ; -} - -wxAcceleratorTable::wxAcceleratorTable() -{ - m_refData = NULL; -} - -wxAcceleratorTable::~wxAcceleratorTable() -{ -} - -// Load from .rc resource -wxAcceleratorTable::wxAcceleratorTable(const wxString& resource) -{ - m_refData = new wxAcceleratorRefData; - - HACCEL hAccel = -#ifdef __WIN32__ -#ifdef UNICODE - ::LoadAcceleratorsW(wxGetInstance(), (const char *)resource); -#else - ::LoadAcceleratorsA(wxGetInstance(), (const char *)resource); -#endif -#else - ::LoadAccelerators(wxGetInstance(), (const char *)resource); -#endif - M_ACCELDATA->m_hAccel = hAccel; - M_ACCELDATA->m_ok = (hAccel != 0); -} - -extern int wxCharCodeWXToMSW(int id, bool *isVirtual); - -// Create from an array -wxAcceleratorTable::wxAcceleratorTable(int n, wxAcceleratorEntry entries[]) -{ - m_refData = new wxAcceleratorRefData; - - ACCEL* arr = new ACCEL[n]; - int i; - for (i = 0; i < n; i++) - { - BYTE fVirt = 0; - if (entries[i].m_flags & wxACCEL_ALT) - fVirt |= FALT; - if (entries[i].m_flags & wxACCEL_SHIFT) - fVirt |= FSHIFT; - if (entries[i].m_flags & wxACCEL_CTRL) - fVirt |= FCONTROL; - - bool isVirtual; - WORD key = wxCharCodeWXToMSW(entries[i].m_keyCode, & isVirtual); - fVirt |= FVIRTKEY; - - WORD cmd = entries[i].m_command; - - arr[i].fVirt = fVirt; - arr[i].key = key; - arr[i].cmd = cmd; - } - - M_ACCELDATA->m_hAccel = ::CreateAcceleratorTable(arr, n); - delete[] arr; - - M_ACCELDATA->m_ok = (M_ACCELDATA->m_hAccel != 0); -} - -bool wxAcceleratorTable::Ok(void) const -{ - return (M_ACCELDATA && (M_ACCELDATA->m_ok)); -} - -void wxAcceleratorTable::SetHACCEL(WXHACCEL hAccel) -{ - if (!M_ACCELDATA) - m_refData = new wxAcceleratorRefData; - - M_ACCELDATA->m_hAccel = (HACCEL) hAccel; -} - -WXHACCEL wxAcceleratorTable::GetHACCEL() const -{ - if (!M_ACCELDATA) - return 0; - return (WXHACCEL) M_ACCELDATA->m_hAccel; -} - diff --git a/src/msw/app.cpp b/src/msw/app.cpp deleted file mode 100644 index 2380393bfd..0000000000 --- a/src/msw/app.cpp +++ /dev/null @@ -1,1026 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: app.cpp -// Purpose: wxApp -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "app.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#define IN_WX_MAIN_CPP -#include "wx/wxprec.h" - -#if defined(__BORLANDC__) -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/frame.h" -#include "wx/app.h" -#include "wx/utils.h" -#include "wx/gdicmn.h" -#include "wx/pen.h" -#include "wx/brush.h" -#include "wx/cursor.h" -#include "wx/icon.h" -#include "wx/palette.h" -#include "wx/dc.h" -#include "wx/dialog.h" -#include "wx/msgdlg.h" -#endif - -#include "wx/msw/private.h" -#include "wx/postscrp.h" -#include "wx/log.h" -#include "wx/module.h" - -#if USE_WX_RESOURCES -#include "wx/resource.h" -#endif - - -#include - -#if defined(__WIN95__) && !defined(__GNUWIN32__) -#include -#endif - -// use debug CRT functions for memory leak detections in VC++ -/* Doesn't work when using the makefiles, for some reason. -#if defined(__WXDEBUG__) && defined(_MSC_VER) - #include -#endif -*/ - -extern char *wxBuffer; -extern char *wxOsVersion; -extern wxList *wxWinHandleList; -extern wxList wxPendingDelete; -extern void wxSetKeyboardHook(bool doIt); -extern wxCursor *g_globalCursor; - -HINSTANCE wxhInstance = 0; -static MSG s_currentMsg; -wxApp *wxTheApp = NULL; - -char wxFrameClassName[] = "wxFrameClass"; -char wxMDIFrameClassName[] = "wxMDIFrameClass"; -char wxMDIChildFrameClassName[] = "wxMDIChildFrameClass"; -char wxPanelClassName[] = "wxPanelClass"; -char wxCanvasClassName[] = "wxCanvasClass"; - -HICON wxSTD_FRAME_ICON = NULL; -HICON wxSTD_MDICHILDFRAME_ICON = NULL; -HICON wxSTD_MDIPARENTFRAME_ICON = NULL; - -HICON wxDEFAULT_FRAME_ICON = NULL; -HICON wxDEFAULT_MDICHILDFRAME_ICON = NULL; -HICON wxDEFAULT_MDIPARENTFRAME_ICON = NULL; - -HBRUSH wxDisableButtonBrush = 0; - -LRESULT APIENTRY wxWndProc(HWND, UINT, WPARAM, LPARAM); - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler) -BEGIN_EVENT_TABLE(wxApp, wxEvtHandler) - EVT_IDLE(wxApp::OnIdle) -END_EVENT_TABLE() -#endif - -long wxApp::sm_lastMessageTime = 0; - -#ifdef __WIN95__ -static HINSTANCE gs_hRichEdit = NULL; -#endif - -bool wxApp::Initialize(WXHINSTANCE instance) -{ - HINSTANCE hInstance = (HINSTANCE) instance; - - CommonInit(); - -#if defined(__WIN95__) - InitCommonControls(); - gs_hRichEdit = LoadLibrary("RICHED32.DLL"); - - if (gs_hRichEdit == NULL) - { - wxMessageBox("Could not initialise Rich Edit DLL"); - } -#endif - -#if defined(WX_DRAG_DROP) - // we need to initialize OLE library - if ( FAILED(::OleInitialize(NULL)) ) - wxFatalError(_("Cannot initialize OLE")); -#endif - -#if CTL3D - if (!Ctl3dRegister(hInstance)) - wxFatalError("Cannot register CTL3D"); - - Ctl3dAutoSubclass(hInstance); -#endif - - wxSTD_FRAME_ICON = LoadIcon(hInstance, "wxSTD_FRAME"); - wxSTD_MDIPARENTFRAME_ICON = LoadIcon(hInstance, "wxSTD_MDIPARENTFRAME"); - wxSTD_MDICHILDFRAME_ICON = LoadIcon(hInstance, "wxSTD_MDICHILDFRAME"); - - wxDEFAULT_FRAME_ICON = LoadIcon(hInstance, "wxDEFAULT_FRAME"); - wxDEFAULT_MDIPARENTFRAME_ICON = LoadIcon(hInstance, "wxDEFAULT_MDIPARENTFRAME"); - wxDEFAULT_MDICHILDFRAME_ICON = LoadIcon(hInstance, "wxDEFAULT_MDICHILDFRAME"); - - RegisterWindowClasses(); - - // Create the brush for disabling bitmap buttons - - LOGBRUSH lb ; - lb.lbStyle = BS_PATTERN; - lb.lbHatch = (int)LoadBitmap( hInstance, "wxDISABLE_BUTTON_BITMAP" ) ; - wxDisableButtonBrush = ::CreateBrushIndirect( & lb ) ; - ::DeleteObject( (HGDIOBJ)lb.lbHatch ) ; - -#if USE_PENWINDOWS - wxRegisterPenWin(); -#endif - - wxWinHandleList = new wxList(wxKEY_INTEGER); - - // This is to foil optimizations in Visual C++ that - // throw out dummy.obj. -#if (_MSC_VER >= 800) && !defined(WXMAKINGDLL) - extern char wxDummyChar; - if (wxDummyChar) wxDummyChar++; -#endif - wxSetKeyboardHook(TRUE); - - wxModule::RegisterModules(); - if (!wxModule::InitializeModules()) - return FALSE; - return TRUE; -} - -bool wxApp::RegisterWindowClasses() -{ -/////////////////////////////////////////////////////////////////////// -// Register the frame window class. - WNDCLASS wndclass; // Structure used to register Windows class. - - wndclass.style = CS_HREDRAW | CS_VREDRAW; - wndclass.lpfnWndProc = (WNDPROC)wxWndProc; - wndclass.cbClsExtra = 0; - wndclass.cbWndExtra = sizeof( DWORD ); // was 4 - wndclass.hInstance = wxhInstance; - wndclass.hIcon = NULL; // wxSTD_FRAME_ICON; - wndclass.hCursor = LoadCursor( NULL, IDC_ARROW ); - wndclass.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE+1) ; -// wndclass.hbrBackground = GetStockObject( WHITE_BRUSH ); - wndclass.lpszMenuName = NULL; -#ifdef _MULTIPLE_INSTANCES - sprintf( wxFrameClassName,"wxFrameClass%d", hInstance ); -#endif - wndclass.lpszClassName = wxFrameClassName; - - if (!RegisterClass( &wndclass )) - { - // wxFatalError("Can't register Frame Window class"); - } - -/////////////////////////////////////////////////////////////////////// -// Register the MDI frame window class. - WNDCLASS wndclass1; // Structure used to register Windows class. - - wndclass1.style = CS_HREDRAW | CS_VREDRAW; - wndclass1.lpfnWndProc = (WNDPROC)wxWndProc; - wndclass1.cbClsExtra = 0; - wndclass1.cbWndExtra = sizeof( DWORD ); // was 4 - wndclass1.hInstance = wxhInstance; - wndclass1.hIcon = NULL; // wxSTD_MDIPARENTFRAME_ICON; - wndclass1.hCursor = LoadCursor( NULL, IDC_ARROW ); -// wndclass1.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE+1) ; - wndclass1.hbrBackground = NULL; - wndclass1.lpszMenuName = NULL; - - wndclass1.lpszClassName = wxMDIFrameClassName; - if (!RegisterClass( &wndclass1 )) - { -// wxFatalError("Can't register MDI Frame window class"); -// return FALSE; - } - -/////////////////////////////////////////////////////////////////////// -// Register the MDI child frame window class. - WNDCLASS wndclass4; // Structure used to register Windows class. - - wndclass4.style = CS_HREDRAW | CS_VREDRAW; - wndclass4.lpfnWndProc = (WNDPROC)wxWndProc; - wndclass4.cbClsExtra = 0; - wndclass4.cbWndExtra = sizeof( DWORD ); // was 4 - wndclass4.hInstance = wxhInstance; - wndclass4.hIcon = NULL; // wxSTD_MDICHILDFRAME_ICON; - wndclass4.hCursor = LoadCursor( NULL, IDC_ARROW ); - // TODO: perhaps this should be NULL so that Windows doesn't - // paint the background itself (would OnEraseBackground duplicate - // this?) - wndclass4.hbrBackground = (HBRUSH)(COLOR_WINDOW+1) ; -// wndclass4.hbrBackground = NULL; - wndclass4.lpszMenuName = NULL; - wndclass4.lpszClassName = wxMDIChildFrameClassName; - - if (!RegisterClass( &wndclass4 )) - { -// wxFatalError("Can't register MDI child frame window class"); -// return FALSE; - } - -/////////////////////////////////////////////////////////////////////// -// Register the panel window class. - WNDCLASS wndclass2; // Structure used to register Windows class. - memset(&wndclass2, 0, sizeof(WNDCLASS)); // start with NULL defaults - // Use CS_OWNDC to avoid messing about restoring the context - // for every graphic operation. - wndclass2.style = CS_HREDRAW | CS_VREDRAW; - wndclass2.lpfnWndProc = (WNDPROC)wxWndProc; - wndclass2.cbClsExtra = 0; - wndclass2.cbWndExtra = sizeof( DWORD ); // was 4 - wndclass2.hInstance = wxhInstance; - wndclass2.hIcon = NULL; - wndclass2.hCursor = NULL; -// wndclass2.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1) ; - wndclass2.hbrBackground = (HBRUSH) GetStockObject( LTGRAY_BRUSH ); - wndclass2.lpszMenuName = NULL; - wndclass2.lpszClassName = wxPanelClassName; - if (!RegisterClass( &wndclass2 )) - { -// wxFatalError("Can't register Panel Window class"); -// return FALSE; - } - -/////////////////////////////////////////////////////////////////////// -// Register the canvas and textsubwindow class name - WNDCLASS wndclass3; // Structure used to register Windows class. - memset(&wndclass3, 0, sizeof(WNDCLASS)); // start with NULL defaults - // Use CS_OWNDC to avoid messing about restoring the context - // for every graphic operation. -// wndclass3.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC | CS_DBLCLKS ; - // wxWin 2.0 - wndclass3.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS ; - wndclass3.lpfnWndProc = (WNDPROC)wxWndProc; - wndclass3.cbClsExtra = 0; - wndclass3.cbWndExtra = sizeof( DWORD ); // was 4 - wndclass3.hInstance = wxhInstance; - wndclass3.hIcon = NULL; - wndclass3.hCursor = NULL; -// wndclass3.hbrBackground = (HBRUSH)(COLOR_WINDOW+1) ; - wndclass3.hbrBackground = NULL; - wndclass3.lpszMenuName = NULL; - wndclass3.lpszClassName = wxCanvasClassName; - if (!RegisterClass( &wndclass3)) - { -// wxFatalError("Can't register Canvas class"); -// return FALSE; - } - - return TRUE; -} - -// Cleans up any wxWindows internal structures left lying around -void wxApp::CleanUp() -{ - wxModule::CleanUpModules(); - - CommonCleanUp(); - - wxSetKeyboardHook(FALSE); - -#ifdef __WIN95__ - if (gs_hRichEdit != NULL) - FreeLibrary(gs_hRichEdit); -#endif - -#if USE_PENWINDOWS - wxCleanUpPenWin(); -#endif - - if (wxSTD_FRAME_ICON) - DestroyIcon(wxSTD_FRAME_ICON); - if (wxSTD_MDICHILDFRAME_ICON) - DestroyIcon(wxSTD_MDICHILDFRAME_ICON); - if (wxSTD_MDIPARENTFRAME_ICON) - DestroyIcon(wxSTD_MDIPARENTFRAME_ICON); - - if (wxDEFAULT_FRAME_ICON) - DestroyIcon(wxDEFAULT_FRAME_ICON); - if (wxDEFAULT_MDICHILDFRAME_ICON) - DestroyIcon(wxDEFAULT_MDICHILDFRAME_ICON); - if (wxDEFAULT_MDIPARENTFRAME_ICON) - DestroyIcon(wxDEFAULT_MDIPARENTFRAME_ICON); - - if ( wxDisableButtonBrush ) - ::DeleteObject( wxDisableButtonBrush ) ; - -#if defined(WX_DRAG_DROP) - ::OleUninitialize(); -#endif - -#if CTL3D - Ctl3dUnregister(wxhInstance); -#endif - - if (wxWinHandleList) - delete wxWinHandleList ; - - // do it as the very last thing because everything else can log messages - wxLog::DontCreateOnDemand(); - delete wxLog::SetActiveTarget(NULL); -} - -void wxApp::CommonInit() -{ -#ifdef __WXMSW__ - wxBuffer = new char[1500]; -#else - wxBuffer = new char[BUFSIZ + 512]; -#endif - - wxClassInfo::InitializeClasses(); - -#if USE_RESOURCES - wxGetResource("wxWindows", "OsVersion", &wxOsVersion); -#endif - - wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING); - wxTheColourDatabase->Initialize(); - - wxInitializeStockLists(); - wxInitializeStockObjects(); - -#if USE_WX_RESOURCES - wxInitializeResourceSystem(); -#endif - - // For PostScript printing -#if USE_POSTSCRIPT - wxInitializePrintSetupData(); - wxThePrintPaperDatabase = new wxPrintPaperDatabase; - wxThePrintPaperDatabase->CreateDatabase(); -#endif - - wxBitmap::InitStandardHandlers(); - - g_globalCursor = new wxCursor; -} - -void wxApp::CommonCleanUp() -{ -#if USE_WX_RESOURCES - wxCleanUpResourceSystem(); - -// wxDefaultResourceTable->ClearTable(); -#endif - - // Indicate that the cursor can be freed, - // so that cursor won't be deleted by deleting - // the bitmap list before g_globalCursor goes out - // of scope (double deletion of the cursor). - wxSetCursor(wxNullCursor); - delete g_globalCursor; - - wxDeleteStockObjects() ; - - // Destroy all GDI lists, etc. - wxDeleteStockLists(); - - delete wxTheColourDatabase; - wxTheColourDatabase = NULL; - -#if USE_POSTSCRIPT - wxInitializePrintSetupData(FALSE); - delete wxThePrintPaperDatabase; - wxThePrintPaperDatabase = NULL; -#endif - - wxBitmap::CleanUpHandlers(); - - delete[] wxBuffer; - wxBuffer = NULL; -} - -#if !defined(_WINDLL) || (defined(_WINDLL) && defined(WXMAKINGDLL)) - -// Main wxWindows entry point - -int wxEntry(WXHINSTANCE hInstance, WXHINSTANCE WXUNUSED(hPrevInstance), char *m_lpCmdLine, - int nCmdShow, bool enterLoop) -{ - wxhInstance = (HINSTANCE) hInstance; - -/* Doesn't work when using the makefiles, for some reason. - #if defined(__WXDEBUG__) && defined(_MSC_VER) - // do check for memory leaks on program exit - // (another useful flag is _CRTDBG_DELAY_FREE_MEM_DF which doesn't free - // deallocated memory which may be used to simulate low-memory condition) - _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_LEAK_CHECK_DF); - #endif // debug build under MS VC++ -*/ - -#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT - -#if !defined(_WINDLL) - streambuf* sBuf = new wxDebugStreamBuf; -#else - streambuf* sBuf = NULL; -#endif - ostream* oStr = new ostream(sBuf) ; - wxDebugContext::SetStream(oStr, sBuf); - -#endif // USE_MEMORY_TRACING - - if (!wxApp::Initialize((WXHINSTANCE) wxhInstance)) - return 0; - - // The app may have declared a global application object, but we recommend - // the IMPLEMENT_APP macro is used instead, which sets an initializer function - // for delayed, dynamic app object construction. - if (!wxTheApp) - { - if (!wxApp::GetInitializerFunction()) - { - MessageBox(NULL, "No initializer - use IMPLEMENT_APP macro.", "wxWindows Error", MB_APPLMODAL | MB_ICONSTOP | MB_OK); - return 0; - } - - wxTheApp = (* wxApp::GetInitializerFunction()) (); - } - - if (!wxTheApp) { - MessageBox(NULL, "You have to define an instance of wxApp!", "wxWindows Error", MB_APPLMODAL | MB_ICONSTOP | MB_OK); - return 0; - } - - // Split command line into tokens, as in usual main(argc, argv) - char **command = new char*[50]; - - int count = 0; - char *buf = new char[strlen(m_lpCmdLine) + 1]; - - // Hangs around until end of app. in case - // user carries pointers to the tokens - - /* Model independent strcpy */ - int i; - for (i = 0; (buf[i] = m_lpCmdLine[i]) != 0; i++) - { - /* loop */; - } - - // Get application name - char name[200]; - ::GetModuleFileName(wxhInstance, name, 199); - - // Is it only 16-bit Borland that already copies the program name - // to the first argv index? -#if !defined(__GNUWIN32__) -// #if ! (defined(__BORLANDC__) && !defined(__WIN32__)) - command[count++] = copystring(name); -// #endif -#endif - - strcpy(name, wxFileNameFromPath(name)); - wxStripExtension(name); - wxTheApp->SetAppName(name); - - /* Break up string */ - // Treat strings enclosed in double-quotes as single arguments - char* str = buf; - while (*str) - { - while (*str && *str <= ' ') str++; // skip whitespace - if (*str == '"') - { - str++; - command[count++] = str; - while (*str && *str != '"') str++; - } - else if (*str) - { - command[count++] = str; - while (*str && *str > ' ') str++; - } - if (*str) *str++ = '\0'; - } - command[count] = NULL; /* argv[] is NULL terminated list! */ - - wxTheApp->argc = count; - wxTheApp->argv = command; - wxTheApp->m_nCmdShow = nCmdShow; - - // GUI-specific initialisation. In fact on Windows we don't have any, - // but this call is provided for compatibility across platforms. - wxTheApp->OnInitGui() ; - - if (!wxTheApp->OnInit()) - { - wxTheApp->DeletePendingObjects(); - wxTheApp->OnExit(); - wxApp::CleanUp(); - - delete wxTheApp; - wxTheApp = NULL; - - delete [] buf ; - - // TODO: This should really be cleaned up in ~wxApp - delete [] command[0] ; - delete [] command ; - return 0; - } - - if (!enterLoop) - return 0; - - int retValue = 1; - -/* New behaviour - leave it to the app to show the top window - if (wxTheApp->GetTopWindow()) { - // show the toplevel frame, only if we are not iconized (from MS-Windows) - if(wxTheApp->GetShowFrameOnInit() && (nCmdShow!=SW_HIDE)) wxTheApp->GetTopWindow()->Show(TRUE); - } -*/ - - retValue = wxTheApp->OnRun(); - - if (wxTheApp->GetTopWindow()) - { - // Forcibly delete the window. - if (wxTheApp->GetTopWindow()->IsKindOf(CLASSINFO(wxFrame)) || - wxTheApp->GetTopWindow()->IsKindOf(CLASSINFO(wxDialog))) - { - wxTheApp->GetTopWindow()->Close(TRUE); - wxTheApp->DeletePendingObjects(); - } - else - { - delete wxTheApp->GetTopWindow(); - wxTheApp->SetTopWindow(NULL); - } - } - - wxTheApp->OnExit(); - wxApp::CleanUp(); - - delete wxTheApp; - wxTheApp = NULL; - - delete [] buf ; - delete [] command[0] ; - delete [] command ; - -#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT - // At this point we want to check if there are any memory - // blocks that aren't part of the wxDebugContext itself, - // as a special case. Then when dumping we need to ignore - // wxDebugContext, too. - if (wxDebugContext::CountObjectsLeft() > 0) - { - wxTrace("There were memory leaks.\n"); - wxDebugContext::Dump(); - wxDebugContext::PrintStatistics(); - } - wxDebugContext::SetStream(NULL, NULL); -#endif - - return retValue; -} - -#else /* _WINDLL */ - -int wxEntry(WXHINSTANCE hInstance) -{ - wxhInstance = (HINSTANCE) hInstance; - wxApp::Initialize((WXHINSTANCE) wxhInstance); - - // The app may have declared a global application object, but we recommend - // the IMPLEMENT_APP macro is used instead, which sets an initializer function - // for delayed, dynamic app object construction. - - if (!wxTheApp) - { - if (!wxApp::GetInitializerFunction()) - { - MessageBox(NULL, "No initializer - use IMPLEMENT_APP macro.", "wxWindows Error", MB_APPLMODAL | MB_ICONSTOP | MB_OK); - return 0; - } - - wxTheApp = (* wxApp::GetInitializerFunction()) (); - } - - if (!wxTheApp) { - MessageBox(NULL, "You have to define an instance of wxApp!", "wxWindows Error", MB_APPLMODAL | MB_ICONSTOP | MB_OK); - return 0; - } - - wxTheApp->argc = 0; - wxTheApp->argv = NULL; - - wxTheApp->OnInitGui(); - - wxTheApp->OnInit(); - - if (wxTheApp->GetTopWindow() && wxTheApp->GetTopWindow()->GetHWND()) { - wxTheApp->GetTopWindow()->Show(TRUE); - } - - return 1; -} -#endif // _WINDLL - -// Static member initialization -wxAppInitializerFunction wxApp::m_appInitFn = (wxAppInitializerFunction) NULL; - -wxApp::wxApp() -{ - m_topWindow = NULL; - wxTheApp = this; -// work_proc = NULL ; - m_className = ""; -// m_resourceCollection = TRUE; -// m_pendingCleanup = FALSE; - m_wantDebugOutput = TRUE ; - m_appName = ""; - argc = 0; - argv = NULL; -#ifdef __WXMSW__ - m_printMode = wxPRINT_WINDOWS; -#else - m_printMode = wxPRINT_POSTSCRIPT; -#endif - m_exitOnFrameDelete = TRUE; - m_auto3D = TRUE; -} - -bool wxApp::Initialized() -{ -#ifndef _WINDLL - if (GetTopWindow()) - return TRUE; - else - return FALSE; -#endif -#ifdef _WINDLL // Assume initialized if DLL (no way of telling) - return TRUE; -#endif -} - -/* - * Get and process a message, returning FALSE if WM_QUIT - * received. - * - */ -bool wxApp::DoMessage() -{ - if (!::GetMessage(&s_currentMsg, (HWND) NULL, 0, 0)) - { - return FALSE; - } - - // Process the message - if (!ProcessMessage((WXMSG *)&s_currentMsg)) - { - ::TranslateMessage(&s_currentMsg); - wxApp::sm_lastMessageTime = s_currentMsg.time; /* MATTHEW: timeStamp impl. */ - ::DispatchMessage(&s_currentMsg); - } - return TRUE; -} - -/* - * Keep trying to process messages until WM_QUIT - * received. - * - * If there are messages to be processed, they will all be - * processed and OnIdle will not be called. - * When there are no more messages, OnIdle is called. - * If OnIdle requests more time, - * it will be repeatedly called so long as there are no pending messages. - * A 'feature' of this is that once OnIdle has decided that no more processing - * is required, then it won't get processing time until further messages - * are processed (it'll sit in DoMessage). - */ - -int wxApp::MainLoop() -{ - m_keepGoing = TRUE; - while (m_keepGoing) - { - while (!::PeekMessage(&s_currentMsg, 0, 0, 0, PM_NOREMOVE) && - ProcessIdle()) {} - if (!DoMessage()) - m_keepGoing = FALSE; - } - - return s_currentMsg.wParam; -} - -// Returns TRUE if more time is needed. -bool wxApp::ProcessIdle() -{ - wxIdleEvent event; - event.SetEventObject(this); - ProcessEvent(event); - - return event.MoreRequested(); -} - -void wxApp::ExitMainLoop() -{ - m_keepGoing = FALSE; -} - -bool wxApp::Pending() -{ - return (::PeekMessage(&s_currentMsg, 0, 0, 0, PM_NOREMOVE) != 0) ; -} - -void wxApp::Dispatch() -{ - if (!DoMessage()) - m_keepGoing = FALSE; -} - -/* - * Give all windows a chance to preprocess - * the message. Some may have accelerator tables, or have - * MDI complications. - */ -bool wxApp::ProcessMessage(WXMSG *Msg) -{ - MSG *msg = (MSG *)Msg; - - HWND hWnd; - - // Try translations first; find the youngest window with - // a translation table. - for (hWnd = msg->hwnd; hWnd != NULL; hWnd = ::GetParent(hWnd)) - { - wxWindow *wnd = wxFindWinFromHandle((WXHWND) hWnd); - if (wnd) - { - if (wnd->MSWTranslateMessage(Msg)) - return TRUE; - } - } - - // Anyone for a non-translation message? Try youngest descendants first. - for (hWnd = msg->hwnd; hWnd != NULL; hWnd = ::GetParent(hWnd)) - { - wxWindow *wnd = wxFindWinFromHandle((WXHWND) hWnd); - if (wnd) - { - if (wnd->MSWProcessMessage(Msg)) - return TRUE; - } - } - return FALSE; -} - -void wxApp::OnIdle(wxIdleEvent& event) -{ - static bool inOnIdle = FALSE; - - // Avoid recursion (via ProcessEvent default case) - if (inOnIdle) - return; - - inOnIdle = TRUE; - - // 'Garbage' collection of windows deleted with Close(). - DeletePendingObjects(); - - // flush the logged messages if any - wxLog *pLog = wxLog::GetActiveTarget(); - if ( pLog != NULL && pLog->HasPendingMessages() ) - pLog->Flush(); - - // Send OnIdle events to all windows - bool needMore = SendIdleEvents(); -// bool needMore = FALSE; - - if (needMore) - event.RequestMore(TRUE); - - inOnIdle = FALSE; -} - -// Send idle event to all top-level windows -bool wxApp::SendIdleEvents() -{ - bool needMore = FALSE; - wxNode* node = wxTopLevelWindows.First(); - while (node) - { - wxWindow* win = (wxWindow*) node->Data(); - if (SendIdleEvents(win)) - needMore = TRUE; - - node = node->Next(); - } - return needMore; -} - -// Send idle event to window and all subwindows -bool wxApp::SendIdleEvents(wxWindow* win) -{ - bool needMore = FALSE; - - wxIdleEvent event; - event.SetEventObject(win); - win->ProcessEvent(event); - - if (event.MoreRequested()) - needMore = TRUE; - - wxNode* node = win->GetChildren()->First(); - while (node) - { - wxWindow* win = (wxWindow*) node->Data(); - if (SendIdleEvents(win)) - needMore = TRUE; - - node = node->Next(); - } - return needMore ; -} - -void wxApp::DeletePendingObjects() -{ - wxNode *node = wxPendingDelete.First(); - while (node) - { - wxObject *obj = (wxObject *)node->Data(); - - delete obj; - - if (wxPendingDelete.Member(obj)) - delete node; - - // Deleting one object may have deleted other pending - // objects, so start from beginning of list again. - node = wxPendingDelete.First(); - } -} - -/* -// Free up font objects that are not being used at present. -bool wxApp::DoResourceCleanup() -{ -// wxDebugMsg("ResourceCleanup\n"); - - if (wxTheFontList) - { - wxNode *node = wxTheFontList->First(); - while (node) - { - wxGDIObject *obj = (wxGDIObject *)node->Data(); - if ((obj->GetResourceHandle() != 0) && (obj->GetResourceUsage() == 0)) - { -// wxDebugMsg("Freeing font %ld (GDI object %d)\n", (long)obj, (int)obj->GetResourceHandle()); - obj->FreeResource(); - } - node = node->Next(); - } - } - if (wxThePenList) - { - wxNode *node = wxThePenList->First(); - while (node) - { - wxGDIObject *obj = (wxGDIObject *)node->Data(); - if ((obj->GetResourceHandle() != 0) && (obj->GetResourceUsage() == 0)) - { -// wxDebugMsg("Freeing pen %ld (GDI object %d)\n", (long)obj, (int)obj->GetResourceHandle()); - obj->FreeResource(); - } - node = node->Next(); - } - } - if (wxTheBrushList) - { - wxNode *node = wxTheBrushList->First(); - while (node) - { - wxGDIObject *obj = (wxGDIObject *)node->Data(); - if ((obj->GetResourceHandle() != 0) && (obj->GetResourceUsage() == 0)) - { -// wxDebugMsg("Freeing brush %ld (GDI object %d)\n", (long)obj, (int)obj->GetResourceHandle()); - obj->FreeResource(); - } - node = node->Next(); - } - } - - SetPendingCleanup(FALSE); - return FALSE; -} -*/ - -wxLog* wxApp::CreateLogTarget() -{ - return new wxLogGui; -} - -wxWindow* wxApp::GetTopWindow() const -{ - if (m_topWindow) - return m_topWindow; - else if (wxTopLevelWindows.Number() > 0) - return (wxWindow*) wxTopLevelWindows.First()->Data(); - else - return NULL; -} - -int wxApp::GetComCtl32Version() const -{ - // have we loaded COMCTL32 yet? - HMODULE theModule = ::GetModuleHandle("COMCTL32"); - int version = 0; - - // if so, then we can check for the version - if (theModule) - { - // InitCommonControlsEx is unique to 4.7 and later - FARPROC theProc = ::GetProcAddress(theModule, "InitCommonControlsEx"); - - if (! theProc) - { // not found, must be 4.00 - version = 400; - } - else - { - // The following symbol are unique to 4.71 - // DllInstall - // FlatSB_EnableScrollBar FlatSB_GetScrollInfo FlatSB_GetScrollPos - // FlatSB_GetScrollProp FlatSB_GetScrollRange FlatSB_SetScrollInfo - // FlatSB_SetScrollPos FlatSB_SetScrollProp FlatSB_SetScrollRange - // FlatSB_ShowScrollBar - // _DrawIndirectImageList _DuplicateImageList - // InitializeFlatSB - // UninitializeFlatSB - // we could check for any of these - I chose DllInstall - FARPROC theProc = ::GetProcAddress(theModule, "DllInstall"); - if (! theProc) - { - // not found, must be 4.70 - version = 470; - } - else - { // found, must be 4.71 - version = 471; - } - } - } - return version; -} - -void wxExit() -{ - wxApp::CleanUp(); - FatalAppExit(0, "Fatal error: exiting"); -} - -// Yield to incoming messages -bool wxYield() -{ - MSG msg; - // We want to go back to the main message loop - // if we see a WM_QUIT. (?) - while (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) && msg.message != WM_QUIT) - { - if (!wxTheApp->DoMessage()) - break; - } - - return TRUE; -} - -HINSTANCE wxGetInstance() -{ - return wxhInstance; -} - -// For some reason, with MSVC++ 1.5, WinMain isn't linked in properly -// if in a separate file. So include it here to ensure it's linked. -#if (defined(_MSC_VER) && !defined(__WIN32__)) || defined(__GNUWIN32__) -#include "main.cpp" -#endif - -#undef IN_WX_MAIN_CPP - diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp deleted file mode 100644 index a7c0cb8e1d..0000000000 --- a/src/msw/bitmap.cpp +++ /dev/null @@ -1,927 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bitmap.cpp -// Purpose: wxBitmap -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "bitmap.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/setup.h" -#include "wx/list.h" -#include "wx/utils.h" -#include "wx/app.h" -#include "wx/palette.h" -#include "wx/bitmap.h" -#include "wx/icon.h" -#endif - -#include "wx/msw/private.h" -#include "wx/log.h" - -#include "assert.h" - -#if USE_XPM_IN_MSW -#define FOR_MSW 1 -#include "../../contrib/wxxpm/libxpm.34b/lib/xpm34.h" -#endif - -#include "wx/msw/dib.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject) -IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject) -#endif - -wxBitmapRefData::wxBitmapRefData(void) -{ - m_ok = FALSE; - m_width = 0; - m_height = 0; - m_depth = 0; - m_quality = 0; - m_hBitmap = 0 ; - m_selectedInto = NULL; - m_numColors = 0; - m_bitmapMask = NULL; -} - -wxBitmapRefData::~wxBitmapRefData(void) -{ - if (m_selectedInto) - { - char buf[200]; - sprintf(buf, "Bitmap was deleted without selecting out of wxMemoryDC %X.", (unsigned int) m_selectedInto); - wxFatalError(buf); - } - if (m_hBitmap) - { - DeleteObject((HBITMAP) m_hBitmap); - } - m_hBitmap = 0 ; - - if (m_bitmapMask) - delete m_bitmapMask; - m_bitmapMask = NULL; -} - -wxList wxBitmap::sm_handlers; - -wxBitmap::wxBitmap(void) -{ - m_refData = NULL; // new wxBitmapRefData; - - if ( wxTheBitmapList ) - wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::~wxBitmap(void) -{ - if (wxTheBitmapList) - wxTheBitmapList->DeleteObject(this); -} - -bool wxBitmap::FreeResource(bool force) -{ - if ( !M_BITMAPDATA ) - return FALSE; - - if (M_BITMAPDATA->m_selectedInto) - { - char buf[200]; - sprintf(buf, "Bitmap %X was deleted without selecting out of wxMemoryDC %X.", (unsigned int) this, (unsigned int) M_BITMAPDATA->m_selectedInto); - wxFatalError(buf); - } - if (M_BITMAPDATA->m_hBitmap) - { - DeleteObject((HBITMAP) M_BITMAPDATA->m_hBitmap); - } - M_BITMAPDATA->m_hBitmap = 0 ; - -/* - if (M_BITMAPDATA->m_bitmapPalette) - delete M_BITMAPDATA->m_bitmapPalette; - - M_BITMAPDATA->m_bitmapPalette = NULL ; -*/ - - return TRUE; -} - - -wxBitmap::wxBitmap(const char bits[], int the_width, int the_height, int no_bits) -{ - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_width = the_width ; - M_BITMAPDATA->m_height = the_height ; - M_BITMAPDATA->m_depth = no_bits ; - M_BITMAPDATA->m_numColors = 0; - - M_BITMAPDATA->m_hBitmap = (WXHBITMAP) CreateBitmap(the_width, the_height, 1, no_bits, bits); - - if (M_BITMAPDATA->m_hBitmap) - M_BITMAPDATA->m_ok = TRUE; - else - M_BITMAPDATA->m_ok = FALSE; - - M_BITMAPDATA->m_selectedInto = NULL; - - if ( wxTheBitmapList ) - wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::wxBitmap(int w, int h, int d) -{ - (void)Create(w, h, d); - - if ( wxTheBitmapList ) - wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::wxBitmap(void *data, long type, int width, int height, int depth) -{ - (void) Create(data, type, width, height, depth); - - if ( wxTheBitmapList ) - wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::wxBitmap(const wxString& filename, long type) -{ - LoadFile(filename, (int)type); - - if ( wxTheBitmapList ) - wxTheBitmapList->AddBitmap(this); -} - -#if USE_XPM_IN_MSW -// Create from data -wxBitmap::wxBitmap(const char **data, wxItem *WXUNUSED(anItem)) -{ - (void) Create((void *)data, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0); -} -#endif - -bool wxBitmap::Create(int w, int h, int d) -{ - UnRef(); - - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_width = w; - M_BITMAPDATA->m_height = h; - M_BITMAPDATA->m_depth = d; - - if (d > 0) - { - M_BITMAPDATA->m_hBitmap = (WXHBITMAP) CreateBitmap(w, h, 1, d, NULL); - } - else - { - HDC dc = GetDC(NULL); - M_BITMAPDATA->m_hBitmap = (WXHBITMAP) CreateCompatibleBitmap(dc, w, h); - ReleaseDC(NULL, dc); - M_BITMAPDATA->m_depth = wxDisplayDepth(); - } - if (M_BITMAPDATA->m_hBitmap) - M_BITMAPDATA->m_ok = TRUE; - else - M_BITMAPDATA->m_ok = FALSE; - return M_BITMAPDATA->m_ok; -} - -bool wxBitmap::LoadFile(const wxString& filename, long type) -{ - UnRef(); - - m_refData = new wxBitmapRefData; - - wxBitmapHandler *handler = FindHandler(type); - - if ( handler == NULL ) { - wxLogWarning("no bitmap handler for type %d defined.", type); - - return FALSE; - } - - return handler->LoadFile(this, filename, type, -1, -1); -} - -bool wxBitmap::Create(void *data, long type, int width, int height, int depth) -{ - UnRef(); - - m_refData = new wxBitmapRefData; - - wxBitmapHandler *handler = FindHandler(type); - - if ( handler == NULL ) { - wxLogWarning("no bitmap handler for type %d defined.", type); - - return FALSE; - } - - return handler->Create(this, data, type, width, height, depth); -} - -bool wxBitmap::SaveFile(const wxString& filename, int type, const wxPalette *palette) -{ - wxBitmapHandler *handler = FindHandler(type); - - if ( handler == NULL ) { - wxLogWarning("no bitmap handler for type %d defined.", type); - - return FALSE; - } - - return handler->SaveFile(this, filename, type, palette); -} - -void wxBitmap::SetWidth(int w) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_width = w; -} - -void wxBitmap::SetHeight(int h) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_height = h; -} - -void wxBitmap::SetDepth(int d) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_depth = d; -} - -void wxBitmap::SetQuality(int q) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_quality = q; -} - -void wxBitmap::SetOk(bool isOk) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_ok = isOk; -} - -void wxBitmap::SetPalette(const wxPalette& palette) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_bitmapPalette = palette ; -} - -void wxBitmap::SetMask(wxMask *mask) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_bitmapMask = mask ; -} - -void wxBitmap::SetHBITMAP(WXHBITMAP bmp) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_hBitmap = bmp; -} - -void wxBitmap::AddHandler(wxBitmapHandler *handler) -{ - sm_handlers.Append(handler); -} - -void wxBitmap::InsertHandler(wxBitmapHandler *handler) -{ - sm_handlers.Insert(handler); -} - -bool wxBitmap::RemoveHandler(const wxString& name) -{ - wxBitmapHandler *handler = FindHandler(name); - if ( handler ) - { - sm_handlers.DeleteObject(handler); - return TRUE; - } - else - return FALSE; -} - -wxBitmapHandler *wxBitmap::FindHandler(const wxString& name) -{ - wxNode *node = sm_handlers.First(); - while ( node ) - { - wxBitmapHandler *handler = (wxBitmapHandler *)node->Data(); - if ( handler->GetName() == name ) - return handler; - node = node->Next(); - } - return NULL; -} - -wxBitmapHandler *wxBitmap::FindHandler(const wxString& extension, long bitmapType) -{ - wxNode *node = sm_handlers.First(); - while ( node ) - { - wxBitmapHandler *handler = (wxBitmapHandler *)node->Data(); - if ( handler->GetExtension() == extension && - (bitmapType == -1 || handler->GetType() == bitmapType) ) - return handler; - node = node->Next(); - } - return NULL; -} - -wxBitmapHandler *wxBitmap::FindHandler(long bitmapType) -{ - wxNode *node = sm_handlers.First(); - while ( node ) - { - wxBitmapHandler *handler = (wxBitmapHandler *)node->Data(); - if (handler->GetType() == bitmapType) - return handler; - node = node->Next(); - } - return NULL; -} - -// New Create/FreeDIB functions since ones in dibutils.cpp are confusing -static long createDIB(long xSize, long ySize, long bitsPerPixel, - HPALETTE hPal, LPBITMAPINFO* lpDIBHeader); -static long freeDIB(LPBITMAPINFO lpDIBHeader); - -// Creates a bitmap that matches the device context, from -// an arbitray bitmap. At present, the original bitmap must have an -// associated palette. TODO: use a default palette if no palette exists. -// Contributed by Frederic Villeneuve -wxBitmap wxBitmap::GetBitmapForDC(wxDC& dc) const -{ - wxMemoryDC memDC; - wxBitmap tmpBitmap(this->GetWidth(), this->GetHeight(), dc.GetDepth()); - HPALETTE hPal = NULL; - LPBITMAPINFO lpDib; - void *lpBits = NULL; - - wxASSERT( this->GetPalette() && this->GetPalette()->Ok() && (this->GetPalette()->GetHPALETTE() != NULL) ); - - tmpBitmap.SetPalette(this->GetPalette()); - memDC.SelectObject(tmpBitmap); - memDC.SetPalette(this->GetPalette()); - - hPal = (HPALETTE) this->GetPalette()->GetHPALETTE(); - - // set the height negative because in a DIB the order of the lines is reversed - createDIB(this->GetWidth(), -this->GetHeight(), this->GetDepth(), hPal, &lpDib); - - lpBits = malloc(lpDib->bmiHeader.biSizeImage); - - ::GetBitmapBits((HBITMAP)GetHBITMAP(), lpDib->bmiHeader.biSizeImage, lpBits); - - ::SetDIBitsToDevice((HDC) memDC.GetHDC(), 0, 0, this->GetWidth(), this->GetHeight(), - 0, 0, 0, this->GetHeight(), lpBits, lpDib, DIB_RGB_COLORS); - - free(lpBits); - - freeDIB(lpDib); - return (tmpBitmap); -} - -/* - * wxMask - */ - -wxMask::wxMask(void) -{ - m_maskBitmap = 0; -} - -// Construct a mask from a bitmap and a colour indicating -// the transparent area -wxMask::wxMask(const wxBitmap& bitmap, const wxColour& colour) -{ - m_maskBitmap = 0; - Create(bitmap, colour); -} - -// Construct a mask from a bitmap and a palette index indicating -// the transparent area -wxMask::wxMask(const wxBitmap& bitmap, int paletteIndex) -{ - m_maskBitmap = 0; - Create(bitmap, paletteIndex); -} - -// Construct a mask from a mono bitmap (copies the bitmap). -wxMask::wxMask(const wxBitmap& bitmap) -{ - m_maskBitmap = 0; - Create(bitmap); -} - -wxMask::~wxMask(void) -{ - if ( m_maskBitmap ) - ::DeleteObject((HBITMAP) m_maskBitmap); -} - -// Create a mask from a mono bitmap (copies the bitmap). -bool wxMask::Create(const wxBitmap& bitmap) -{ - if ( m_maskBitmap ) - { - ::DeleteObject((HBITMAP) m_maskBitmap); - m_maskBitmap = 0; - } - if (!bitmap.Ok() || bitmap.GetDepth() != 1) - { - return FALSE; - } - m_maskBitmap = (WXHBITMAP) CreateBitmap( - bitmap.GetWidth(), - bitmap.GetHeight(), - 1, 1, 0 - ); - HDC srcDC = CreateCompatibleDC(0); - SelectObject(srcDC, (HBITMAP) bitmap.GetHBITMAP()); - HDC destDC = CreateCompatibleDC(0); - SelectObject(destDC, (HBITMAP) m_maskBitmap); - BitBlt(destDC, 0, 0, bitmap.GetWidth(), bitmap.GetHeight(), srcDC, 0, 0, SRCCOPY); - SelectObject(srcDC, 0); - DeleteDC(srcDC); - SelectObject(destDC, 0); - DeleteDC(destDC); - return TRUE; -} - -// Create a mask from a bitmap and a palette index indicating -// the transparent area -bool wxMask::Create(const wxBitmap& bitmap, int paletteIndex) -{ - if ( m_maskBitmap ) - { - ::DeleteObject((HBITMAP) m_maskBitmap); - m_maskBitmap = 0; - } - if (bitmap.Ok() && bitmap.GetPalette()->Ok()) - { - unsigned char red, green, blue; - if (bitmap.GetPalette()->GetRGB(paletteIndex, &red, &green, &blue)) - { - wxColour transparentColour(red, green, blue); - return Create(bitmap, transparentColour); - } - } - return FALSE; -} - -// Create a mask from a bitmap and a colour indicating -// the transparent area -bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) -{ - if ( m_maskBitmap ) - { - ::DeleteObject((HBITMAP) m_maskBitmap); - m_maskBitmap = 0; - } - if (!bitmap.Ok()) - { - return FALSE; - } - - // scan the bitmap for the transparent colour and set - // the corresponding pixels in the mask to BLACK and - // the rest to WHITE - COLORREF maskColour = RGB(colour.Red(), colour.Green(), colour.Blue()); - m_maskBitmap = (WXHBITMAP) ::CreateBitmap( - bitmap.GetWidth(), - bitmap.GetHeight(), - 1, 1, 0 - ); - HDC srcDC = ::CreateCompatibleDC(0); - ::SelectObject(srcDC, (HBITMAP) bitmap.GetHBITMAP()); - HDC destDC = ::CreateCompatibleDC(0); - ::SelectObject(destDC, (HBITMAP) m_maskBitmap); - - // this is not very efficient, but I can't think - // of a better way of doing it - for (int w = 0; w < bitmap.GetWidth(); w++) - { - for (int h = 0; h < bitmap.GetHeight(); h++) - { - COLORREF col = GetPixel(srcDC, w, h); - if (col == maskColour) - { - ::SetPixel(destDC, w, h, RGB(0, 0, 0)); - } - else - { - ::SetPixel(destDC, w, h, RGB(255, 255, 255)); - } - } - } - ::SelectObject(srcDC, 0); - ::DeleteDC(srcDC); - ::SelectObject(destDC, 0); - ::DeleteDC(destDC); - return TRUE; -} - -/* - * wxBitmapHandler - */ - -IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject) - -bool wxBitmapHandler::Create(wxBitmap *bitmap, void *data, long type, int width, int height, int depth) -{ - return FALSE; -} - -bool wxBitmapHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long type, - int desiredWidth, int desiredHeight) -{ - return FALSE; -} - -bool wxBitmapHandler::SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette) -{ - return FALSE; -} - -/* - * Standard handlers - */ - -class WXDLLEXPORT wxBMPResourceHandler: public wxBitmapHandler -{ - DECLARE_DYNAMIC_CLASS(wxBMPResourceHandler) -public: - inline wxBMPResourceHandler(void) - { - m_name = "Windows bitmap resource"; - m_extension = ""; - m_type = wxBITMAP_TYPE_BMP_RESOURCE; - }; - - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth, int desiredHeight); -}; -IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler, wxBitmapHandler) - -bool wxBMPResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth, int desiredHeight) -{ - // TODO: load colourmap. - M_BITMAPHANDLERDATA->m_hBitmap = (WXHBITMAP) ::LoadBitmap(wxGetInstance(), name); - if (M_BITMAPHANDLERDATA->m_hBitmap) - { - M_BITMAPHANDLERDATA->m_ok = TRUE; - BITMAP bm; - GetObject((HBITMAP) M_BITMAPHANDLERDATA->m_hBitmap, sizeof(BITMAP), (LPSTR) &bm); - M_BITMAPHANDLERDATA->m_width = bm.bmWidth; - M_BITMAPHANDLERDATA->m_height = bm.bmHeight; - M_BITMAPHANDLERDATA->m_depth = bm.bmBitsPixel; - return TRUE; - } - - // it's probably not found - wxLogError("Can't load bitmap '%s' from resources! Check .rc file.", name.c_str()); - - return FALSE; -} - -class WXDLLEXPORT wxBMPFileHandler: public wxBitmapHandler -{ - DECLARE_DYNAMIC_CLASS(wxBMPFileHandler) -public: - inline wxBMPFileHandler(void) - { - m_name = "Windows bitmap file"; - m_extension = "bmp"; - m_type = wxBITMAP_TYPE_BMP; - }; - - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth, int desiredHeight); - virtual bool SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL); -}; -IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler, wxBitmapHandler) - -bool wxBMPFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth, int desiredHeight) -{ -#if USE_IMAGE_LOADING_IN_MSW - wxPalette *palette = NULL; - bool success = FALSE; -/* - if (type & wxBITMAP_DISCARD_COLOURMAP) - success = wxLoadIntoBitmap(WXSTRINGCAST name, bitmap); - else -*/ - success = (wxLoadIntoBitmap(WXSTRINGCAST name, bitmap, &palette) != 0); - if (!success && palette) - { - delete palette; - palette = NULL; - } - if (palette) - M_BITMAPHANDLERDATA->m_bitmapPalette = *palette; - return success; -#else - return FALSE; -#endif -} - -bool wxBMPFileHandler::SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *pal) -{ -#if USE_IMAGE_LOADING_IN_MSW - wxPalette *actualPalette = (wxPalette *)pal; - if (!actualPalette && (!M_BITMAPHANDLERDATA->m_bitmapPalette.IsNull())) - actualPalette = & (M_BITMAPHANDLERDATA->m_bitmapPalette); - return (wxSaveBitmap(WXSTRINGCAST name, bitmap, actualPalette) != 0); -#else - return FALSE; -#endif -} - -class WXDLLEXPORT wxXPMFileHandler: public wxBitmapHandler -{ - DECLARE_DYNAMIC_CLASS(wxXPMFileHandler) -public: - inline wxXPMFileHandler(void) - { - m_name = "XPM bitmap file"; - m_extension = "xpm"; - m_type = wxBITMAP_TYPE_XPM; - }; - - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth = -1, int desiredHeight = -1); - virtual bool SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL); -}; -IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler, wxBitmapHandler) - -bool wxXPMFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth, int desiredHeight) -{ -#if USE_XPM_IN_MSW - XImage *ximage; - XpmAttributes xpmAttr; - HDC dc; - - M_BITMAPHANDLERDATA->m_ok = FALSE; - dc = CreateCompatibleDC(NULL); - if (dc) - { - xpmAttr.valuemask = XpmReturnPixels; - int errorStatus = XpmReadFileToImage(&dc, WXSTRINGCAST name, &ximage, (XImage **) NULL, &xpmAttr); - DeleteDC(dc); - if (errorStatus == XpmSuccess) - { - M_BITMAPHANDLERDATA->m_hBitmap = (WXHBITMAP) ximage->bitmap; - - BITMAP bm; - GetObject((HBITMAP)M_BITMAPHANDLERDATA->m_hBitmap, sizeof(bm), (LPSTR) & bm); - - M_BITMAPHANDLERDATA->m_width = (bm.bmWidth); - M_BITMAPHANDLERDATA->m_height = (bm.bmHeight); - M_BITMAPHANDLERDATA->m_depth = (bm.bmPlanes * bm.bmBitsPixel); - M_BITMAPHANDLERDATA->m_numColors = xpmAttr.npixels; - XpmFreeAttributes(&xpmAttr); - XImageFree(ximage); - - M_BITMAPHANDLERDATA->m_ok = TRUE; - return TRUE; - } - else - { - M_BITMAPHANDLERDATA->m_ok = FALSE; - return FALSE; - } - } -#endif - - return FALSE; -} - -bool wxXPMFileHandler::SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette) -{ -#if USE_XPM_IN_MSW - HDC dc = NULL; - - Visual *visual = NULL; - XImage ximage; - - dc = CreateCompatibleDC(NULL); - if (dc) - { - if (SelectObject(dc, (HBITMAP) M_BITMAPHANDLERDATA->m_hBitmap)) - { /* for following SetPixel */ - /* fill the XImage struct 'by hand' */ - ximage.width = M_BITMAPHANDLERDATA->m_width; - ximage.height = M_BITMAPHANDLERDATA->m_height; - ximage.depth = M_BITMAPHANDLERDATA->m_depth; - ximage.bitmap = (void *)M_BITMAPHANDLERDATA->m_hBitmap; - int errorStatus = XpmWriteFileFromImage(&dc, WXSTRINGCAST name, - &ximage, (XImage *) NULL, (XpmAttributes *) NULL); - - if (dc) - DeleteDC(dc); - - if (errorStatus == XpmSuccess) - return TRUE; /* no error */ - else - return FALSE; - } else return FALSE; - } else return FALSE; -#else - return FALSE; -#endif -} - -class WXDLLEXPORT wxXPMDataHandler: public wxBitmapHandler -{ - DECLARE_DYNAMIC_CLASS(wxXPMDataHandler) -public: - inline wxXPMDataHandler(void) - { - m_name = "XPM bitmap data"; - m_extension = "xpm"; - m_type = wxBITMAP_TYPE_XPM_DATA; - }; - - virtual bool Create(wxBitmap *bitmap, void *data, long flags, int width, int height, int depth = 1); -}; -IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler, wxBitmapHandler) - -bool wxXPMDataHandler::Create(wxBitmap *bitmap, void *data, long flags, int width, int height, int depth) -{ -#if USE_XPM_IN_MSW - XImage *ximage; - int ErrorStatus; - XpmAttributes xpmAttr; - HDC dc; - - M_BITMAPHANDLERDATA->m_ok = FALSE; - M_BITMAPHANDLERDATA->m_numColors = 0; - - dc = CreateCompatibleDC(NULL); /* memory DC */ - - if (dc) - { - xpmAttr.valuemask = XpmReturnInfos; /* get infos back */ - ErrorStatus = XpmCreateImageFromData(&dc, (char **)data, - &ximage, (XImage **) NULL, &xpmAttr); - - if (ErrorStatus == XpmSuccess) - { - /* ximage is malloced and contains bitmap and attributes */ - M_BITMAPHANDLERDATA->m_hBitmap = (WXHBITMAP) ximage->bitmap; - - BITMAP bm; - GetObject((HBITMAP) M_BITMAPHANDLERDATA->m_hBitmap, sizeof(bm), (LPSTR) & bm); - - M_BITMAPHANDLERDATA->m_width = (bm.bmWidth); - M_BITMAPHANDLERDATA->m_height = (bm.bmHeight); - M_BITMAPHANDLERDATA->m_depth = (bm.bmPlanes * bm.bmBitsPixel); - M_BITMAPHANDLERDATA->m_numColors = xpmAttr.npixels; - XpmFreeAttributes(&xpmAttr); - - XImageFree(ximage); // releases the malloc, but does not detroy - // the bitmap - M_BITMAPHANDLERDATA->m_ok = TRUE; - DeleteDC(dc); - - return TRUE; - } - else - { - M_BITMAPHANDLERDATA->m_ok = FALSE; -// XpmDebugError(ErrorStatus, NULL); - DeleteDC(dc); - return FALSE; - } - } -#endif - - return FALSE; -} - -void wxBitmap::CleanUpHandlers(void) -{ - wxNode *node = sm_handlers.First(); - while ( node ) - { - wxBitmapHandler *handler = (wxBitmapHandler *)node->Data(); - wxNode *next = node->Next(); - delete handler; - delete node; - node = next; - } -} - -void wxBitmap::InitStandardHandlers(void) -{ - AddHandler(new wxBMPResourceHandler); - AddHandler(new wxBMPFileHandler); - AddHandler(new wxXPMFileHandler); - AddHandler(new wxXPMDataHandler); - AddHandler(new wxICOResourceHandler); - AddHandler(new wxICOFileHandler); -} - -static long createDIB(long xSize, long ySize, long bitsPerPixel, - HPALETTE hPal, LPBITMAPINFO* lpDIBHeader) -{ - unsigned long i, headerSize; - LPBITMAPINFO lpDIBheader = NULL; - LPPALETTEENTRY lpPe = NULL; - - - // Allocate space for a DIB header - headerSize = (sizeof(BITMAPINFOHEADER) + (256 * sizeof(PALETTEENTRY))); - lpDIBheader = (BITMAPINFO *) malloc(headerSize); - lpPe = (PALETTEENTRY *)((BYTE*)lpDIBheader + sizeof(BITMAPINFOHEADER)); - - GetPaletteEntries(hPal, 0, 256, lpPe); - - - memset(lpDIBheader, 0x00, sizeof(BITMAPINFOHEADER)); - - - // Fill in the static parts of the DIB header - lpDIBheader->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - lpDIBheader->bmiHeader.biWidth = xSize; - lpDIBheader->bmiHeader.biHeight = ySize; - lpDIBheader->bmiHeader.biPlanes = 1; - - // this value must be 1, 4, 8 or 24 so PixelDepth can only be - lpDIBheader->bmiHeader.biBitCount = (WORD)(bitsPerPixel); - lpDIBheader->bmiHeader.biCompression = BI_RGB; - lpDIBheader->bmiHeader.biSizeImage = xSize * abs(ySize) * bitsPerPixel >> -3; - lpDIBheader->bmiHeader.biClrUsed = 256; - - - // Initialize the DIB palette - for (i = 0; i < 256; i++) { - lpDIBheader->bmiColors[i].rgbReserved = lpPe[i].peFlags; - lpDIBheader->bmiColors[i].rgbRed = lpPe[i].peRed; - lpDIBheader->bmiColors[i].rgbGreen = lpPe[i].peGreen; - lpDIBheader->bmiColors[i].rgbBlue = lpPe[i].peBlue; - } - - *lpDIBHeader = lpDIBheader; - - - return (0); - -} - - - -static long freeDIB(LPBITMAPINFO lpDIBHeader) -{ - - if (lpDIBHeader != NULL) { - free(lpDIBHeader); - } - - return (0); -} - - diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp deleted file mode 100644 index af8a1e72fe..0000000000 --- a/src/msw/bmpbuttn.cpp +++ /dev/null @@ -1,263 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bmpbuttn.cpp -// Purpose: wxBitmapButton -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "bmpbuttn.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/bmpbuttn.h" -#endif - -#include "wx/msw/private.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton) -#endif - -#define BUTTON_HEIGHT_FACTOR (EDIT_CONTROL_FACTOR * 1.1) - -bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - m_buttonBitmap = bitmap; - SetName(name); - SetValidator(validator); - - parent->AddChild(this); - - m_backgroundColour = parent->GetDefaultBackgroundColour() ; - m_foregroundColour = parent->GetDefaultForegroundColour() ; - m_windowStyle = style; - m_marginX = 0; - m_marginY = 0; - - if ( style & wxBU_AUTODRAW ) - { - m_marginX = wxDEFAULT_BUTTON_MARGIN; - m_marginY = wxDEFAULT_BUTTON_MARGIN; - } - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - if (id == -1) - m_windowId = NewControlId(); - else - m_windowId = id; - - if ( width == -1 && bitmap.Ok()) - width = bitmap.GetWidth() + 2*m_marginX; - - if ( height == -1 && bitmap.Ok()) - height = bitmap.GetHeight() + 2*m_marginY; - - HWND wx_button = - CreateWindowEx(0, "BUTTON", "", BS_OWNERDRAW | WS_TABSTOP | WS_CHILD, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, - wxGetInstance(), NULL); - - m_hWnd = (WXHWND)wx_button; - - // Subclass again for purposes of dialog editing mode - SubclassWin((WXHWND)wx_button); - - SetFont(* parent->GetFont()) ; - - SetSize(x, y, width, height); - ShowWindow(wx_button, SW_SHOW); - - return TRUE; -} - -void wxBitmapButton::SetBitmapLabel(const wxBitmap& bitmap) -{ - m_buttonBitmap = bitmap; -} - -bool wxBitmapButton::MSWOnDraw(WXDRAWITEMSTRUCT *item) -{ - long style = GetWindowLong((HWND) GetHWND(), GWL_STYLE); -#if defined(__WIN95__) - if (style & BS_BITMAP) - { - // Should we call Default() here? -// Default(); - - // Let default procedure draw the bitmap, which is defined - // in the Windows resource. - return FALSE; - } -#endif - - LPDRAWITEMSTRUCT lpDIS = (LPDRAWITEMSTRUCT) item; - - wxBitmap* bitmap = &m_buttonBitmap; - - UINT state = lpDIS->itemState; - if ((state & ODS_SELECTED) && m_buttonBitmapSelected.Ok()) - bitmap = &m_buttonBitmapSelected; - else if ((state & ODS_FOCUS) && m_buttonBitmapFocus.Ok()) - bitmap = &m_buttonBitmapFocus; - else if ((state & ODS_DISABLED) && m_buttonBitmapDisabled.Ok()) - bitmap = &m_buttonBitmapDisabled; - - if ( !bitmap->Ok() ) - return FALSE; - - HDC hDC = lpDIS->hDC; - HDC memDC = ::CreateCompatibleDC(hDC); - - HBITMAP old = (HBITMAP) ::SelectObject(memDC, (HBITMAP) bitmap->GetHBITMAP()); - - if (!old) - return FALSE; - - RECT rect = lpDIS->rcItem; - - int x = lpDIS->rcItem.left; - int y = lpDIS->rcItem.top; - int width = lpDIS->rcItem.right - x; - int height = lpDIS->rcItem.bottom - y; - - // Draw the face, if auto-drawing - if ( GetWindowStyleFlag() & wxBU_AUTODRAW ) - DrawFace((WXHDC) hDC, lpDIS->rcItem.left, lpDIS->rcItem.top, lpDIS->rcItem.right, lpDIS->rcItem.bottom, - ((state & ODS_SELECTED) == ODS_SELECTED)); - - // Centre the bitmap in the control area - int x1 = (int) (x + ((width - bitmap->GetWidth()) / 2)); - int y1 = (int) (y + ((height - bitmap->GetHeight()) / 2)); - - if ( (state & ODS_SELECTED) && (GetWindowStyleFlag() & wxBU_AUTODRAW) ) - { - x1 ++; - y1 ++; - } - - ::BitBlt(hDC, x1, y1, bitmap->GetWidth(), bitmap->GetHeight(), memDC, 0, 0, SRCCOPY); - - if ( (state & ODS_DISABLED) && (GetWindowStyleFlag() & wxBU_AUTODRAW) ) - DrawButtonDisable( (WXHDC) hDC, lpDIS->rcItem.left, lpDIS->rcItem.top, lpDIS->rcItem.right, lpDIS->rcItem.bottom, TRUE ) ; - else if ( (state & ODS_FOCUS) && (GetWindowStyleFlag() & wxBU_AUTODRAW) ) - DrawButtonFocus( (WXHDC) hDC, lpDIS->rcItem.left, lpDIS->rcItem.top, lpDIS->rcItem.right, lpDIS->rcItem.bottom, ((state & ODS_SELECTED) == ODS_SELECTED)); - - ::SelectObject(memDC, old); - - ::DeleteDC(memDC); - - return TRUE; -} - -void wxBitmapButton::DrawFace( WXHDC dc, int left, int top, int right, int bottom, bool sel ) -{ - HPEN oldp; - HBRUSH oldb ; - - HPEN penBorder; - HPEN penLight; - HPEN penShadow; - HBRUSH brushFace; - COLORREF ms_color; - - ms_color = GetSysColor(COLOR_WINDOWFRAME) ; - penBorder = CreatePen(PS_SOLID,0,ms_color) ; - - ms_color = GetSysColor(COLOR_BTNSHADOW) ; - penShadow = CreatePen(PS_SOLID,0,ms_color) ; - - ms_color = GetSysColor(COLOR_BTNHIGHLIGHT) ; - penLight = CreatePen(PS_SOLID,0,ms_color) ; - - ms_color = GetSysColor(COLOR_BTNFACE) ; - brushFace = CreateSolidBrush(ms_color) ; - - oldp = (HPEN) SelectObject( (HDC) dc, GetStockObject( NULL_PEN ) ) ; - oldb = (HBRUSH) SelectObject( (HDC) dc, brushFace ) ; - Rectangle( (HDC) dc, left, top, right, bottom ) ; - SelectObject( (HDC) dc, penBorder) ; - MoveToEx((HDC) dc,left+1,top,NULL);LineTo((HDC) dc,right-1,top); - MoveToEx((HDC) dc,left,top+1,NULL);LineTo((HDC) dc,left,bottom-1); - MoveToEx((HDC) dc,left+1,bottom-1,NULL);LineTo((HDC) dc,right-1,bottom-1); - MoveToEx((HDC) dc,right-1,top+1,NULL);LineTo((HDC) dc,right-1,bottom-1); - - SelectObject( (HDC) dc, penShadow) ; - if (sel) - { - MoveToEx((HDC) dc,left+1 ,bottom-2 ,NULL) ; - LineTo((HDC) dc, left+1 ,top+1) ; - LineTo((HDC) dc, right-2 ,top+1) ; - } - else - { - MoveToEx((HDC) dc,left+1 ,bottom-2 ,NULL) ; - LineTo((HDC) dc, right-2 ,bottom-2) ; - LineTo((HDC) dc, right-2 ,top) ; - MoveToEx((HDC) dc,left+2 ,bottom-3 ,NULL) ; - LineTo((HDC) dc, right-3 ,bottom-3) ; - LineTo((HDC) dc, right-3 ,top+1) ; - - SelectObject( (HDC) dc, penLight) ; - - MoveToEx((HDC) dc,left+1 ,bottom-2 ,NULL) ; - LineTo((HDC) dc, left+1 ,top+1) ; - LineTo((HDC) dc, right-2 ,top+1) ; - } - SelectObject((HDC) dc,oldp) ; - SelectObject((HDC) dc,oldb) ; - - DeleteObject(penBorder); - DeleteObject(penLight); - DeleteObject(penShadow); - DeleteObject(brushFace); -} - -#define FOCUS_MARGIN 6 - -void wxBitmapButton::DrawButtonFocus( WXHDC dc, int left, int top, int right, int bottom, bool sel ) -{ - RECT rect; - rect.left = left; - rect.top = top; - rect.right = right; - rect.bottom = bottom; - InflateRect( &rect, - FOCUS_MARGIN, - FOCUS_MARGIN ) ; - if ( sel ) - OffsetRect( &rect, 1, 1 ) ; - DrawFocusRect( (HDC) dc, &rect ) ; -} - -extern HBRUSH wxDisableButtonBrush; -void wxBitmapButton::DrawButtonDisable( WXHDC dc, int left, int top, int right, int bottom, bool with_marg ) -{ - HBRUSH old = (HBRUSH) SelectObject( (HDC) dc, wxDisableButtonBrush ) ; - - if ( with_marg ) - ::PatBlt( (HDC) dc, left + m_marginX, top + m_marginY, - right - 2 * m_marginX, bottom - 2 * m_marginY, - 0xfa0089ul ) ; - else ::PatBlt( (HDC) dc, left, top, right, bottom, 0xfa0089ul ) ; - - ::SelectObject( (HDC) dc, old ) ; -} - diff --git a/src/msw/brush.cpp b/src/msw/brush.cpp deleted file mode 100644 index 3f31a36166..0000000000 --- a/src/msw/brush.cpp +++ /dev/null @@ -1,262 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: brush.cpp -// Purpose: wxBrush -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "brush.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/setup.h" -#include "wx/list.h" -#include "wx/utils.h" -#include "wx/app.h" -#include "wx/brush.h" -#endif - -#include "wx/msw/private.h" - -#include "assert.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject) -#endif - -wxBrushRefData::wxBrushRefData(void) -{ - m_style = wxSOLID; - m_hBrush = 0; -} - -wxBrushRefData::wxBrushRefData(const wxBrushRefData& data) -{ - m_style = data.m_style; - m_stipple = data.m_stipple; - m_colour = data.m_colour; - m_hBrush = 0; -} - -wxBrushRefData::~wxBrushRefData(void) -{ - if ( m_hBrush ) - ::DeleteObject((HBRUSH) m_hBrush); -} - -// Brushes -wxBrush::wxBrush(void) -{ - if ( wxTheBrushList ) - wxTheBrushList->AddBrush(this); -} - -wxBrush::~wxBrush() -{ - if (wxTheBrushList) - wxTheBrushList->RemoveBrush(this); -} - -wxBrush::wxBrush(const wxColour& col, int Style) -{ - m_refData = new wxBrushRefData; - - M_BRUSHDATA->m_colour = col; - M_BRUSHDATA->m_style = Style; - M_BRUSHDATA->m_hBrush = 0; - - RealizeResource(); - - if ( wxTheBrushList ) - wxTheBrushList->AddBrush(this); -} - -wxBrush::wxBrush(const wxString& col, int Style) -{ - m_refData = new wxBrushRefData; - - M_BRUSHDATA->m_colour = col; - M_BRUSHDATA->m_style = Style; - M_BRUSHDATA->m_hBrush = 0; - - RealizeResource(); - - if ( wxTheBrushList ) - wxTheBrushList->AddBrush(this); -} - -wxBrush::wxBrush(const wxBitmap& stipple) -{ - m_refData = new wxBrushRefData; - - M_BRUSHDATA->m_style = wxSTIPPLE; - M_BRUSHDATA->m_stipple = stipple; - M_BRUSHDATA->m_hBrush = 0; - - RealizeResource(); - - if ( wxTheBrushList ) - wxTheBrushList->AddBrush(this); -} - -bool wxBrush::RealizeResource(void) -{ - if (M_BRUSHDATA && (M_BRUSHDATA->m_hBrush == 0)) - { - if (M_BRUSHDATA->m_style==wxTRANSPARENT) - { - M_BRUSHDATA->m_hBrush = (WXHBRUSH) ::GetStockObject(NULL_BRUSH); - return TRUE; - } - COLORREF ms_colour = 0 ; - - ms_colour = M_BRUSHDATA->m_colour.GetPixel() ; - - switch (M_BRUSHDATA->m_style) - { -/**** - // Don't reset cbrush, wxTRANSPARENT is handled by wxBrush::SelectBrush() - // this could save (many) time if frequently switching from - // wxSOLID to wxTRANSPARENT, because Create... is not always called!! - // - // NB August 95: now create and select a Null brush instead. - // This could be optimized as above. - case wxTRANSPARENT: - M_BRUSHDATA->m_hBrush = NULL; // Must always select a suitable background brush - // - could choose white always for a quick solution - break; -***/ - case wxBDIAGONAL_HATCH: - M_BRUSHDATA->m_hBrush = (WXHBRUSH) CreateHatchBrush(HS_BDIAGONAL,ms_colour) ; - break ; - case wxCROSSDIAG_HATCH: - M_BRUSHDATA->m_hBrush = (WXHBRUSH) CreateHatchBrush(HS_DIAGCROSS,ms_colour) ; - break ; - case wxFDIAGONAL_HATCH: - M_BRUSHDATA->m_hBrush = (WXHBRUSH) CreateHatchBrush(HS_FDIAGONAL,ms_colour) ; - break ; - case wxCROSS_HATCH: - M_BRUSHDATA->m_hBrush = (WXHBRUSH) CreateHatchBrush(HS_CROSS,ms_colour) ; - break ; - case wxHORIZONTAL_HATCH: - M_BRUSHDATA->m_hBrush = (WXHBRUSH) CreateHatchBrush(HS_HORIZONTAL,ms_colour) ; - break ; - case wxVERTICAL_HATCH: - M_BRUSHDATA->m_hBrush = (WXHBRUSH) CreateHatchBrush(HS_VERTICAL,ms_colour) ; - break ; - case wxSTIPPLE: - if (M_BRUSHDATA->m_stipple.Ok()) - M_BRUSHDATA->m_hBrush = (WXHBRUSH) CreatePatternBrush((HBITMAP) M_BRUSHDATA->m_stipple.GetHBITMAP()) ; - else - M_BRUSHDATA->m_hBrush = (WXHBRUSH) CreateSolidBrush(ms_colour) ; - break ; - case wxSOLID: - default: - M_BRUSHDATA->m_hBrush = (WXHBRUSH) CreateSolidBrush(ms_colour) ; - break; - } -#ifdef WXDEBUG_CREATE - if (M_BRUSHDATA->m_hBrush==NULL) wxError("Cannot create brush","Internal error") ; -#endif - return TRUE; - } - else - return FALSE; -} - -WXHANDLE wxBrush::GetResourceHandle(void) -{ - return (WXHANDLE) M_BRUSHDATA->m_hBrush; -} - -bool wxBrush::FreeResource(bool force) -{ - if (M_BRUSHDATA && (M_BRUSHDATA->m_hBrush != 0)) - { - DeleteObject((HBRUSH) M_BRUSHDATA->m_hBrush); - M_BRUSHDATA->m_hBrush = 0; - return TRUE; - } - else return FALSE; -} - -bool wxBrush::IsFree(void) -{ - return (M_BRUSHDATA && (M_BRUSHDATA->m_hBrush == 0)); -} - -void wxBrush::Unshare() -{ - // Don't change shared data - if (!m_refData) - { - m_refData = new wxBrushRefData(); - } - else - { - wxBrushRefData* ref = new wxBrushRefData(*(wxBrushRefData*)m_refData); - UnRef(); - m_refData = ref; - } -} - - -void wxBrush::SetColour(const wxColour& col) -{ - Unshare(); - - M_BRUSHDATA->m_colour = col; - - RealizeResource(); -} - -void wxBrush::SetColour(const wxString& col) -{ - Unshare(); - - M_BRUSHDATA->m_colour = col; - - RealizeResource(); -} - -void wxBrush::SetColour(const unsigned char r, const unsigned char g, const unsigned char b) -{ - Unshare(); - - M_BRUSHDATA->m_colour.Set(r, g, b); - - RealizeResource(); -} - -void wxBrush::SetStyle(int Style) -{ - Unshare(); - - M_BRUSHDATA->m_style = Style; - - RealizeResource(); -} - -void wxBrush::SetStipple(const wxBitmap& Stipple) -{ - Unshare(); - - M_BRUSHDATA->m_stipple = Stipple; - - RealizeResource(); -} - - diff --git a/src/msw/button.cpp b/src/msw/button.cpp deleted file mode 100644 index 380af24126..0000000000 --- a/src/msw/button.cpp +++ /dev/null @@ -1,197 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: button.cpp -// Purpose: wxButton -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "button.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/button.h" -#endif - -#include "wx/msw/private.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) -#endif - -#define BUTTON_HEIGHT_FACTOR (EDIT_CONTROL_FACTOR * 1.1) - -// Buttons - -bool wxButton::MSWCommand(WXUINT param, WXWORD id) -{ - if (param == BN_CLICKED || (param == 1)) // 1 for accelerator - { - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, id); - event.SetEventObject(this); - ProcessCommand(event); - return TRUE; - } - else return FALSE; -} - -bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - - parent->AddChild((wxButton *)this); - m_backgroundColour = parent->GetDefaultBackgroundColour() ; - m_foregroundColour = parent->GetDefaultForegroundColour() ; - - m_windowStyle = (long&)style; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - if (id == -1) - m_windowId = NewControlId(); - else - m_windowId = id; - - DWORD exStyle = MakeExtendedStyle(m_windowStyle); - HWND wx_button = - CreateWindowEx(exStyle, "BUTTON", label, BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, - wxGetInstance(), NULL); - -#if CTL3D -// if (!(GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS)) -// Ctl3dSubclassCtl(wx_button); -#endif - - m_hWnd = (WXHWND)wx_button; - - // Subclass again for purposes of dialog editing mode - SubclassWin((WXHWND)wx_button); - - SetFont(* parent->GetFont()); - - SetSize(x, y, width, height); - ShowWindow(wx_button, SW_SHOW); - - return TRUE; -} - -void wxButton::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - int currentX, currentY; - GetPosition(¤tX, ¤tY); - int x1 = x; - int y1 = y; - if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - x1 = currentX; - if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - y1 = currentY; - - AdjustForParentClientOrigin(x1, y1, sizeFlags); - - int actualWidth = width; - int actualHeight = height; - int ww, hh; - GetSize(&ww, &hh); - - int current_width; - int cyf; - char buf[300]; - GetWindowText((HWND) GetHWND(), buf, 300); - GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL,GetFont()); - - // If we're prepared to use the existing width, then... - if (width == -1 && ((sizeFlags & wxSIZE_AUTO_WIDTH) != wxSIZE_AUTO_WIDTH)) - actualWidth = ww; - else if (width == -1) - { - int cx; - int cy; - wxGetCharSize(GetHWND(), &cx, &cy,GetFont()); - actualWidth = (int)(current_width + 3*cx) ; - } - - // If we're prepared to use the existing height, then... - if (height == -1 && ((sizeFlags & wxSIZE_AUTO_HEIGHT) != wxSIZE_AUTO_HEIGHT)) - actualHeight = hh; - else if (height == -1) - { - actualHeight = (int)(cyf*BUTTON_HEIGHT_FACTOR) ; - } - - MoveWindow((HWND) GetHWND(), x1, y1, actualWidth, actualHeight, TRUE); -} - -void wxButton::SetDefault(void) -{ - wxWindow *parent = (wxWindow *)GetParent(); - if (parent) - parent->SetDefaultItem(this); - - if (parent) - { - SendMessage((HWND) parent->GetHWND(), DM_SETDEFID, m_windowId, 0L); - } -} - -wxString wxButton::GetLabel(void) const -{ - GetWindowText((HWND) GetHWND(), wxBuffer, 300); - return wxString(wxBuffer); -} - -void wxButton::SetLabel(const wxString& label) -{ - SetWindowText((HWND) GetHWND(), (const char *) label); -} - -WXHBRUSH wxButton::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ -/* - WXHBRUSH hBrush = (WXHBRUSH) MSWDefWindowProc(message, wParam, lParam); -// ::SetTextColor((HDC) pDC, GetSysColor(COLOR_BTNTEXT)); - ::SetTextColor((HDC) pDC, RGB(GetForegroundColour().Red(), GetForegroundColour().Green(), - GetForegroundColour().Blue())); - - return hBrush; -*/ - // This doesn't in fact seem to make any difference at all - buttons are always - // the same colour. - ::SetBkColor((HDC) pDC, RGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue())); - ::SetTextColor((HDC) pDC, RGB(GetForegroundColour().Red(), GetForegroundColour().Green(), GetForegroundColour().Blue())); - - wxBrush *backgroundBrush = wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID); - - // Note that this will be cleaned up in wxApp::OnIdle, if backgroundBrush - // has a zero usage count. - // NOT NOW; CHANGED. -// backgroundBrush->RealizeResource(); - return (WXHBRUSH) backgroundBrush->GetResourceHandle(); -} - -void wxButton::Command (wxCommandEvent & event) -{ - ProcessCommand (event); -} - - diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp deleted file mode 100644 index ebaaec67d5..0000000000 --- a/src/msw/checkbox.cpp +++ /dev/null @@ -1,307 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: checkbox.cpp -// Purpose: wxCheckBox -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "checkbox.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/checkbox.h" -#endif - -#include "wx/msw/private.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox) -#endif - -bool wxCheckBox::MSWCommand(WXUINT WXUNUSED(param), WXWORD WXUNUSED(id)) -{ - wxCommandEvent event(wxEVENT_TYPE_CHECKBOX_COMMAND, m_windowId); - event.SetInt(GetValue()); - event.SetEventObject(this); - ProcessCommand(event); - return TRUE; -} - -// Single check box item -bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - if (parent) parent->AddChild(this); - - SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; - SetForegroundColour(parent->GetDefaultForegroundColour()) ; - - m_windowStyle = style; - - wxString Label = label; - if (Label == "") - Label = " "; // Apparently needed or checkbox won't show - - if ( id == -1 ) - m_windowId = NewControlId(); - else - m_windowId = id; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - long msStyle = BS_AUTOCHECKBOX|WS_TABSTOP|WS_CHILD; - - // We perhaps have different concepts of 3D here - a 3D border, - // versus a 3D button. - // So we only wish to give a border if this is specified - // in the style. - bool want3D; - WXDWORD exStyle = Determine3DEffects(0, &want3D) ; - - // Even with extended styles, need to combine with WS_BORDER - // for them to look right. - if (want3D && ((m_windowStyle & wxSIMPLE_BORDER) || (m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSUNKEN_BORDER) || (m_windowStyle & wxDOUBLE_BORDER))) - msStyle |= WS_BORDER; - - HWND wx_button = CreateWindowEx(exStyle, "BUTTON", (const char *)Label, - msStyle, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, - wxGetInstance(), NULL); - -#if CTL3D - if (want3D) - { - Ctl3dSubclassCtl(wx_button); - m_useCtl3D = TRUE; - } -#endif - - m_hWnd = (WXHWND) wx_button; - - // Subclass again for purposes of dialog editing mode - SubclassWin((WXHWND) wx_button); - - SetFont(* parent->GetFont()); - - SetSize(x, y, width, height); - - ShowWindow(wx_button, SW_SHOW); - return TRUE; -} - -void wxCheckBox::SetLabel(const wxString& label) -{ - SetWindowText((HWND) GetHWND(), (const char *)label); -} - -void wxCheckBox::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - int currentX, currentY; - GetPosition(¤tX, ¤tY); - int x1 = x; - int y1 = y; - int w1 = width; - int h1 = height; - - if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - x1 = currentX; - if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - y1 = currentY; - - AdjustForParentClientOrigin(x1, y1, sizeFlags); - - char buf[300]; - - int current_width, cyf; - HWND button = (HWND) GetHWND(); - - GetWindowText(button, buf, 300); - if (buf[0]) - { - GetTextExtent(buf, ¤t_width, &cyf, NULL, NULL, GetFont()); - if (w1 < 0) - w1 = (int)(current_width + RADIO_SIZE); - if (h1 < 0) - { - h1 = (int)(cyf); - if (h1 < RADIO_SIZE) - h1 = RADIO_SIZE; - } - } - else - { - if (w1 < 0) - w1 = RADIO_SIZE; - if (h1 < 0) - h1 = RADIO_SIZE; - } - - MoveWindow(button, x1, y1, w1, h1, TRUE); -} - -void wxCheckBox::SetValue(bool val) -{ - SendMessage((HWND) GetHWND(), BM_SETCHECK, val, 0); -} - -bool wxCheckBox::GetValue(void) const -{ -#ifdef __WIN32__ - return (SendMessage((HWND) GetHWND(), BM_GETCHECK, 0, 0) == BST_CHECKED); -#else - return ((0x003 & SendMessage((HWND) GetHWND(), BM_GETCHECK, 0, 0)) == 0x003); -#endif -} - -WXHBRUSH wxCheckBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ -#if CTL3D - if ( m_useCtl3D ) - { - HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam); - - return (WXHBRUSH) hbrush; - } -#endif - - if (GetParent()->GetTransparentBackground()) - SetBkMode((HDC) pDC, TRANSPARENT); - else - SetBkMode((HDC) pDC, OPAQUE); - - ::SetBkColor((HDC) pDC, RGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue())); - ::SetTextColor((HDC) pDC, RGB(GetForegroundColour().Red(), GetForegroundColour().Green(), GetForegroundColour().Blue())); - - wxBrush *backgroundBrush = wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID); - - // Note that this will be cleaned up in wxApp::OnIdle, if backgroundBrush - // has a zero usage count. -// backgroundBrush->RealizeResource(); - return (WXHBRUSH) backgroundBrush->GetResourceHandle(); -} - -void wxCheckBox::Command (wxCommandEvent & event) -{ - SetValue ((event.GetInt() != 0)); - ProcessCommand (event); -} - -bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *label, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - if (parent) parent->AddChild(this); - - SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; - SetForegroundColour(parent->GetDefaultForegroundColour()) ; - m_windowStyle = style; - - if ( id == -1 ) - m_windowId = NewControlId(); - else - m_windowId = id; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - checkWidth = -1 ; - checkHeight = -1 ; - long msStyle = CHECK_FLAGS; - - HWND wx_button = CreateWindowEx(MakeExtendedStyle(m_windowStyle), CHECK_CLASS, "toggle", - msStyle, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, - wxGetInstance(), NULL); - -#if CTL3D - if (!(GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS)) - { - Ctl3dSubclassCtl(wx_button); - m_useCtl3D = TRUE; - } -#endif - - m_hWnd = (WXHWND)wx_button; - - // Subclass again for purposes of dialog editing mode - SubclassWin((WXHWND)wx_button); - -// SetFont(parent->GetFont()); - - SetSize(x, y, width, height); - - ShowWindow(wx_button, SW_SHOW); - return TRUE; -} - -void wxBitmapCheckBox::SetLabel(const wxBitmap *bitmap) -{ -} - -void wxBitmapCheckBox::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - int currentX, currentY; - GetPosition(¤tX, ¤tY); - - int x1 = x; - int y1 = y; - int w1 = width; - int h1 = height; - - if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - x1 = currentX; - if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - y1 = currentY; - - AdjustForParentClientOrigin(x1, y1, sizeFlags); - - HWND button = (HWND) GetHWND(); -/* - if (w1<0) - w1 = checkWidth + FB_MARGIN ; - if (h1<0) - h1 = checkHeight + FB_MARGIN ; -*/ - MoveWindow(button, x1, y1, w1, h1, TRUE); -} - -void wxBitmapCheckBox::SetValue(bool val) -{ - SendMessage((HWND) GetHWND(), BM_SETCHECK, val, 0); -} - -bool wxBitmapCheckBox::GetValue(void) const -{ - return ((0x003 & SendMessage((HWND) GetHWND(), BM_GETCHECK, 0, 0)) == 0x003); -} - - diff --git a/src/msw/checklst.cpp b/src/msw/checklst.cpp deleted file mode 100644 index 2eb9b3d7a6..0000000000 --- a/src/msw/checklst.cpp +++ /dev/null @@ -1,311 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: msw/checklst.cpp -// Purpose: implementation of wxCheckListBox class -// Author: Vadim Zeitlin -// Modified by: -// Created: 16.11.97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// headers & declarations -// ============================================================================ - -#ifdef __GNUG__ -#pragma implementation "checklst.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#if USE_OWNER_DRAWN - -#include - -#include "wx/ownerdrw.h" -#include "wx/msw/checklst.h" - -// ============================================================================ -// implementation -// ============================================================================ - -#if !USE_SHARED_LIBRARY - IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox, wxListBox) -#endif - -// ---------------------------------------------------------------------------- -// declaration and implementation of wxCheckListBoxItem class -// ---------------------------------------------------------------------------- - -class wxCheckListBoxItem : public wxOwnerDrawn -{ -public: - // ctor - wxCheckListBoxItem(wxCheckListBox *pParent, size_t nIndex); - - // drawing functions - virtual bool OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODStatus stat); - - // simple accessors - bool IsChecked() const { return m_bChecked; } - void Check(bool bCheck) { m_bChecked = bCheck; } - void Toggle(); - -private: - bool m_bChecked; - wxCheckListBox *m_pParent; - size_t m_nIndex; -}; - -wxCheckListBoxItem::wxCheckListBoxItem(wxCheckListBox *pParent, size_t nIndex) - : wxOwnerDrawn("", TRUE) // checkable -{ - m_bChecked = FALSE; - m_pParent = pParent; - m_nIndex = nIndex; - - // we don't initialize m_nCheckHeight/Width vars because it's - // done in OnMeasure while they are used only in OnDraw and we - // know that there will always be OnMeasure before OnDraw - - // fix appearance - SetFont(wxSystemSettings::GetSystemFont(wxSYS_ANSI_VAR_FONT)); - SetMarginWidth(GetDefaultMarginWidth()); -} - -/* - * JACS - I've got the owner-draw stuff partially working with WIN16, - * with a really horrible-looking cross for wxCheckListBox instead of a - * check - could use a bitmap check-mark instead, defined in wx.rc. - * Also there's a refresh problem whereby it doesn't always draw the - * check until you click to the right of it, which is OK for WIN32. - */ - -bool wxCheckListBoxItem::OnDrawItem(wxDC& dc, const wxRect& rc, - wxODAction act, wxODStatus stat) -{ - if ( IsChecked() ) - stat = (wxOwnerDrawn::wxODStatus)(stat | wxOwnerDrawn::wxODChecked); - - if ( wxOwnerDrawn::OnDrawItem(dc, rc, act, stat) ) { - // ## using native API for performance and precision - size_t nCheckWidth = GetDefaultMarginWidth(), - nCheckHeight = m_pParent->GetItemHeight(); - - int x = rc.GetX(), - y = rc.GetY(); - - HDC hdc = (HDC)dc.GetHDC(); - - // create pens - HPEN hpenBack = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_WINDOW)), - hpenGray = CreatePen(PS_SOLID, 0, RGB(128, 128, 128)), - hpenPrev = (HPEN)SelectObject(hdc, hpenBack); - - // we erase the 1-pixel border - Rectangle(hdc, x, y, x + nCheckWidth, y + nCheckHeight); - - // shift check mark 1 pixel to the right (it looks better like this) - x++; - - if ( IsChecked() ) { - // first create a monochrome bitmap in a memory DC - HDC hdcMem = CreateCompatibleDC(hdc); - HBITMAP hbmpCheck = CreateBitmap(nCheckWidth, nCheckHeight, 1, 1, 0); - HBITMAP hbmpOld = (HBITMAP)SelectObject(hdcMem, hbmpCheck); - - // then draw a check mark into it - RECT rect = { 0, 0, nCheckWidth, nCheckHeight }; - -#ifdef __WIN32__ - DrawFrameControl(hdcMem, &rect, DFC_MENU, DFCS_MENUCHECK); -#else - // In WIN16, draw a cross - HPEN blackPen = CreatePen(PS_SOLID, 1, RGB(0, 0, 0)); - HPEN whiteBrush = GetStockObject(WHITE_BRUSH); - HPEN hPenOld = ::SelectObject(hdcMem, blackPen); - HPEN hBrushOld = ::SelectObject(hdcMem, whiteBrush); - ::SetROP2(hdcMem, R2_COPYPEN); - Rectangle(hdcMem, 0, 0, nCheckWidth, nCheckHeight); - MoveTo(hdcMem, 0, 0); - LineTo(hdcMem, nCheckWidth, nCheckHeight); - MoveTo(hdcMem, nCheckWidth, 0); - LineTo(hdcMem, 0, nCheckHeight); - ::SelectObject(hdcMem, hPenOld); - ::SelectObject(hdcMem, hBrushOld); - ::DeleteObject(blackPen); -#endif - - // finally copy it to screen DC and clean up - BitBlt(hdc, x, y, nCheckWidth - 1, nCheckHeight, - hdcMem, 0, 0, SRCCOPY); - - SelectObject(hdcMem, hbmpOld); - DeleteObject(hbmpCheck); - DeleteDC(hdcMem); - } - - // now we draw the smaller rectangle - y++; - nCheckWidth -= 2; - nCheckHeight -= 2; - - // draw hollow gray rectangle - (void)SelectObject(hdc, hpenGray); - HBRUSH hbrPrev = (HBRUSH)SelectObject(hdc, GetStockObject(NULL_BRUSH)); - Rectangle(hdc, x, y, x + nCheckWidth, y + nCheckHeight); - - // clean up - (void)SelectObject(hdc, hpenPrev); - (void)SelectObject(hdc, hbrPrev); - - DeleteObject(hpenBack); - DeleteObject(hpenGray); - - /* - dc.DrawRectangle(x, y, nCheckWidth, nCheckHeight); - - if ( IsChecked() ) { - dc.DrawLine(x, y, x + nCheckWidth, y + nCheckHeight); - dc.DrawLine(x, y + nCheckHeight, x + nCheckWidth, y); - } - */ - - return TRUE; - } - - return FALSE; -} - -// change the state of the item and redraw it -void wxCheckListBoxItem::Toggle() -{ - m_bChecked = !m_bChecked; - - size_t nHeight = m_pParent->GetItemHeight(); - size_t y = m_nIndex * nHeight; - RECT rcUpdate = { 0, y, GetDefaultMarginWidth(), y + nHeight}; - InvalidateRect((HWND)m_pParent->GetHWND(), &rcUpdate, FALSE); - - wxCommandEvent event(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, m_pParent->GetId()); - event.SetInt(m_nIndex); - event.SetEventObject(m_pParent); - m_pParent->ProcessCommand(event); -} - -// ---------------------------------------------------------------------------- -// implementation of wxCheckListBox class -// ---------------------------------------------------------------------------- - -// define event table -// ------------------ -BEGIN_EVENT_TABLE(wxCheckListBox, wxListBox) - EVT_CHAR(wxCheckListBox::OnChar) - EVT_LEFT_DOWN(wxCheckListBox::OnLeftClick) -END_EVENT_TABLE() - -// control creation -// ---------------- - -// def ctor: use Create() to really create the control -wxCheckListBox::wxCheckListBox() : wxListBox() -{ -} - -// ctor which creates the associated control -wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - int nStrings, const wxString choices[], - long style, const wxValidator& val, - const wxString& name) // , const wxFont& font) - // don't use ctor with arguments! we must call Create() - // ourselves from here. - : wxListBox() -// , m_font(font) -{ - Create(parent, id, pos, size, nStrings, choices, style|wxLB_OWNERDRAW, val, name); -} - -// create/retrieve item -// -------------------- - -// create a check list box item -wxOwnerDrawn *wxCheckListBox::CreateItem(size_t nIndex) -{ - wxCheckListBoxItem *pItem = new wxCheckListBoxItem(this, nIndex); - if ( m_windowFont.Ok() ) - pItem->SetFont(m_windowFont); - - return pItem; -} - -// get item (converted to right type) -#define GetItem(n) ((wxCheckListBoxItem *)(GetItem(n))) - -// return item size -// ---------------- -bool wxCheckListBox::MSWOnMeasure(WXMEASUREITEMSTRUCT *item) -{ - if ( wxListBox::MSWOnMeasure(item) ) { - MEASUREITEMSTRUCT *pStruct = (MEASUREITEMSTRUCT *)item; - - // save item height - m_nItemHeight = pStruct->itemHeight; - - // add place for the check mark - pStruct->itemWidth += wxOwnerDrawn::GetDefaultMarginWidth(); - - return TRUE; - } - - return FALSE; -} - -// check items -// ----------- - -bool wxCheckListBox::IsChecked(size_t uiIndex) const -{ - return GetItem(uiIndex)->IsChecked(); -} - -void wxCheckListBox::Check(size_t uiIndex, bool bCheck) -{ - GetItem(uiIndex)->Check(bCheck); -} - -// process events -// -------------- - -void wxCheckListBox::OnChar(wxKeyEvent& event) -{ - if ( event.KeyCode() == WXK_SPACE ) - GetItem(GetSelection())->Toggle(); - else - wxListBox::OnChar(event); -} - -void wxCheckListBox::OnLeftClick(wxMouseEvent& event) -{ - // clicking on the item selects it, clicking on the checkmark toggles - if ( event.GetX() <= wxOwnerDrawn::GetDefaultMarginWidth() ) { - // # better use LB_ITEMFROMPOINT perhaps? - size_t nItem = ((size_t)event.GetY()) / m_nItemHeight; - if ( nItem < (size_t)m_noItems ) - GetItem(nItem)->Toggle(); - //else: it's not an error, just click outside of client zone - } - else { - // implement default behaviour: clicking on the item selects it - event.Skip(); - } -} - -#endif - diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp deleted file mode 100644 index 61119e6b67..0000000000 --- a/src/msw/choice.cpp +++ /dev/null @@ -1,342 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: choice.cpp -// Purpose: wxChoice -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "choice.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/choice.h" -#endif - -#include "wx/msw/private.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl) -#endif - -bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) -{ - if (param == CBN_SELCHANGE) - { - wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, m_windowId); - event.SetInt(GetSelection()); - event.SetEventObject(this); - event.SetString(copystring(GetStringSelection())); - ProcessCommand(event); - delete[] event.GetString(); - return TRUE; - } - else return FALSE; -} - -bool wxChoice::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, - const wxSize& size, - int n, const wxString choices[], - long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - if (parent) parent->AddChild(this); - SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; - SetForegroundColour(parent->GetDefaultForegroundColour()) ; - m_noStrings = n; - - m_windowStyle = style; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - long msStyle = WS_CHILD | CBS_DROPDOWNLIST | WS_HSCROLL | WS_VSCROLL - | WS_TABSTOP | WS_VISIBLE; - if (m_windowStyle & wxCB_SORT) - msStyle |= CBS_SORT; - - bool want3D; - WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D) ; - - // Even with extended styles, need to combine with WS_BORDER - // for them to look right. - if (want3D || (m_windowStyle & wxSIMPLE_BORDER) || (m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSUNKEN_BORDER) || (m_windowStyle & wxDOUBLE_BORDER)) - msStyle |= WS_BORDER; - - HWND wx_combo = CreateWindowEx(exStyle, "COMBOBOX", NULL, - msStyle, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, - wxGetInstance(), NULL); -/* -#if CTL3D - if (want3D) - { - m_useCtl3D = TRUE; - Ctl3dSubclassCtl(wx_combo); // Does CTL3D affect the combobox? I think not. - } -#endif -*/ - - m_hWnd = (WXHWND) wx_combo; - - // Subclass again for purposes of dialog editing mode - SubclassWin((WXHWND) wx_combo); - - SetFont(* parent->GetFont()); - - int i; - for (i = 0; i < n; i++) - SendMessage(wx_combo, CB_INSERTSTRING, i, (LONG)(const char *)choices[i]); - SendMessage(wx_combo, CB_SETCURSEL, i, 0); - - SetSize(x, y, width, height); - - return TRUE; -} - -void wxChoice::Append(const wxString& item) -{ - SendMessage((HWND) GetHWND(), CB_ADDSTRING, 0, (LONG)(const char *)item); - - m_noStrings ++; -} - -void wxChoice::Delete(int n) -{ - m_noStrings = (int)SendMessage((HWND) GetHWND(), CB_DELETESTRING, n, 0); -} - -void wxChoice::Clear(void) -{ - SendMessage((HWND) GetHWND(), CB_RESETCONTENT, 0, 0); - - m_noStrings = 0; -} - - -int wxChoice::GetSelection(void) const -{ - return (int)SendMessage((HWND) GetHWND(), CB_GETCURSEL, 0, 0); -} - -void wxChoice::SetSelection(int n) -{ - SendMessage((HWND) GetHWND(), CB_SETCURSEL, n, 0); -} - -int wxChoice::FindString(const wxString& s) const -{ -#if defined(__WATCOMC__) && defined(__WIN386__) - // For some reason, Watcom in WIN386 mode crashes in the CB_FINDSTRINGEXACT message. - // Do it the long way instead. - char buf[512]; - for (int i = 0; i < Number(); i++) - { - int len = (int)SendMessage((HWND) GetHWND(), CB_GETLBTEXT, i, (LPARAM)(LPSTR)buf); - buf[len] = 0; - if (strcmp(buf, (const char *)s) == 0) - return i; - } - return -1; -#else - int pos = (int)SendMessage((HWND) GetHWND(), CB_FINDSTRINGEXACT, (WPARAM)-1, (LPARAM)(LPSTR)(const char *)s); - if (pos == LB_ERR) - return -1; - else - return pos; -#endif -} - -wxString wxChoice::GetString(int n) const -{ - int len = (int)SendMessage((HWND) GetHWND(), CB_GETLBTEXT, n, (long)wxBuffer); - wxBuffer[len] = 0; - return wxString(wxBuffer); -} - -void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - int currentX, currentY; - GetPosition(¤tX, ¤tY); - - int x1 = x; - int y1 = y; - int w1 = width; - int h1 = height; - - if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - x1 = currentX; - if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - y1 = currentY; - - AdjustForParentClientOrigin(x1, y1, sizeFlags); - - // If we're prepared to use the existing size, then... - if (width == -1 && height == -1 && ((sizeFlags & wxSIZE_AUTO) != wxSIZE_AUTO)) - { - GetSize(&w1, &h1); - } - - int cx; // button font dimensions - int cy; - wxGetCharSize(GetHWND(), &cx, &cy, GetFont()); - - float control_width, control_height; - - // Ignore height parameter because height doesn't - // mean 'initially displayed' height, it refers to the - // drop-down menu as well. The wxWindows interpretation - // is different; also, getting the size returns the - // _displayed_ size (NOT the drop down menu size) - // so setting-getting-setting size would not work. - h1 = -1; - - // Deal with default size (using -1 values) - if (width <= 0) - { - // Find the longest string - if (m_noStrings == 0) - control_width = (float)100.0; - else - { - int len, ht; - float longest = (float)0.0; - int i; - for (i = 0; i < m_noStrings; i++) - { - wxString str(GetString(i)); - GetTextExtent(str, &len, &ht, NULL, NULL,GetFont()); - if ( len > longest) longest = len; - } - - control_width = (float)(int)(longest + cx*5); - } - } - - // Choice drop-down list depends on number of items (limited to 10) - if (h1 <= 0) - { - if (m_noStrings == 0) - h1 = (int)(EDIT_CONTROL_FACTOR*cy*10.0); - else h1 = (int)(EDIT_CONTROL_FACTOR*cy*(wxMin(10, m_noStrings) + 1)); - } - - // If non-default width... - if (w1 >= 0) - control_width = (float)w1; - - control_height = (float)h1; - - // Calculations may have made text size too small - if (control_height <= 0) - control_height = (float)(int)(cy*EDIT_CONTROL_FACTOR) ; - - if (control_width <= 0) - control_width = (float)100.0; - - MoveWindow((HWND) GetHWND(), x1, y1, - (int)control_width, (int)control_height, TRUE); -} - -WXHBRUSH wxChoice::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ - return 0; -} - -long wxChoice::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) -{ - switch (nMsg) - { -/* - case WM_GETDLGCODE: - { - if (GetWindowStyleFlag() & wxPROCESS_ENTER) - return DLGC_WANTALLKEYS; - break; - } -*/ -/* - case WM_CHAR: // Always an ASCII character - { - if (wParam == VK_RETURN) - { - wxCommandEvent event(wxEVENT_TYPE_TEXT_ENTER_COMMAND); - event.commandString = ((wxTextCtrl *)item)->GetValue(); - event.eventObject = item; - item->ProcessCommand(event); - return FALSE; - } - break; - } -*/ - case WM_LBUTTONUP: - { - int x = (int)LOWORD(lParam); - int y = (int)HIWORD(lParam); - - // Ok, this is truly weird, but if a panel with a wxChoice loses the - // focus, then you get a *fake* WM_LBUTTONUP message - // with x = 65535 and y = 65535. - // Filter out this nonsense. - if (x == 65535 && y == 65535) - return Default(); - break; - } - } - - return wxWindow::MSWWindowProc(nMsg, wParam, lParam); -} - -wxString wxChoice::GetStringSelection (void) const -{ - int sel = GetSelection (); - if (sel > -1) - return wxString(this->GetString (sel)); - else - return wxString(""); -} - -bool wxChoice::SetStringSelection (const wxString& s) -{ - int sel = FindString (s); - if (sel > -1) - { - SetSelection (sel); - return TRUE; - } - else - return FALSE; -} - -void wxChoice::Command(wxCommandEvent & event) -{ - SetSelection (event.GetInt()); - ProcessCommand (event); -} - - - diff --git a/src/msw/clipbrd.cpp b/src/msw/clipbrd.cpp deleted file mode 100644 index 0c92cfc8e2..0000000000 --- a/src/msw/clipbrd.cpp +++ /dev/null @@ -1,465 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: clipbrd.cpp -// Purpose: Clipboard functionality -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#pragma implementation "clipbrd.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/setup.h" -#endif - -#if USE_CLIPBOARD - -#ifndef WX_PRECOMP -#include "wx/app.h" -#include "wx/frame.h" -#include "wx/bitmap.h" -#include "wx/utils.h" -#endif - -#include "wx/metafile.h" -#include "wx/clipbrd.h" -#include "wx/msw/private.h" -#include "wx/msw/dib.h" - -#include - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject) -IMPLEMENT_ABSTRACT_CLASS(wxClipboardClient, wxObject) -#endif - -bool wxClipboardIsOpen = FALSE; - -bool wxOpenClipboard(void) -{ - if (wxTheApp->GetTopWindow() && !wxClipboardIsOpen) - { - wxClipboardIsOpen = (::OpenClipboard((HWND) wxTheApp->GetTopWindow()->GetHWND()) != 0); - return wxClipboardIsOpen; - } - else return FALSE; -} - -bool wxCloseClipboard(void) -{ - if (wxClipboardIsOpen) - { - wxClipboardIsOpen = FALSE; - } - return (::CloseClipboard() != 0); -} - -bool wxEmptyClipboard(void) -{ - return (::EmptyClipboard() != 0); -} - -bool wxClipboardOpen(void) -{ - return wxClipboardIsOpen; -} - -bool wxIsClipboardFormatAvailable(int dataFormat) -{ - return (::IsClipboardFormatAvailable(dataFormat) != 0); -} - -bool wxSetClipboardData(int dataFormat, wxObject *obj, int width, int height) -{ - switch (dataFormat) - { - case wxDF_BITMAP: - { - wxBitmap *wxBM = (wxBitmap *)obj; - - HDC hdcMem = CreateCompatibleDC(NULL); - HDC hdcSrc = CreateCompatibleDC(NULL); - HBITMAP old = (HBITMAP) ::SelectObject(hdcSrc, (HBITMAP) wxBM->GetHBITMAP()); - HBITMAP hBitmap = CreateCompatibleBitmap(hdcSrc, - wxBM->GetWidth(), wxBM->GetHeight()); - if (!hBitmap) - { - SelectObject(hdcSrc, old); - DeleteDC(hdcMem); - DeleteDC(hdcSrc); - return FALSE; - } - HBITMAP old1 = (HBITMAP) SelectObject(hdcMem, hBitmap); - BitBlt(hdcMem, 0, 0, wxBM->GetWidth(), wxBM->GetHeight(), - hdcSrc, 0, 0, SRCCOPY); - - // Select new bitmap out of memory DC - SelectObject(hdcMem, old1); - - // Set the data - bool success = (bool)(::SetClipboardData(CF_BITMAP, hBitmap) != 0); - - // Clean up - SelectObject(hdcSrc, old); - DeleteDC(hdcSrc); - DeleteDC(hdcMem); - return success; - break; - } - case wxDF_DIB: - { -#if USE_IMAGE_LOADING_IN_MSW - HBITMAP hBitmap=(HBITMAP) ((wxBitmap *)obj)->GetHBITMAP(); - HANDLE hDIB=BitmapToDIB(hBitmap,NULL); // NULL==uses system palette - bool success = (::SetClipboardData(CF_DIB,hDIB) != 0); -#else - bool success=FALSE; -#endif - return success; - break; - } -#if USE_METAFILE - case wxDF_METAFILE: - { - wxMetaFile *wxMF = (wxMetaFile *)obj; - HANDLE data = GlobalAlloc(GHND, sizeof(METAFILEPICT) + 1); -#ifdef __WINDOWS_386__ - METAFILEPICT *mf = (METAFILEPICT *)MK_FP32(GlobalLock(data)); -#else - METAFILEPICT *mf = (METAFILEPICT *)GlobalLock(data); -#endif - - mf->mm = wxMF->GetWindowsMappingMode(); - mf->xExt = width; - mf->yExt = height; - mf->hMF = (HMETAFILE) wxMF->GetHMETAFILE(); - GlobalUnlock(data); - wxMF->SetHMETAFILE((WXHANDLE) NULL); - - return (SetClipboardData(CF_METAFILEPICT, data) != 0); - break; - } -#endif - case CF_SYLK: - case CF_DIF: - case CF_TIFF: - case CF_PALETTE: - { - return FALSE; - break; - } - case wxDF_OEMTEXT: - dataFormat = wxDF_TEXT; - case wxDF_TEXT: - width = strlen((char *)obj) + 1; - height = 1; - default: - { - char *s = (char *)obj; - DWORD l; - - l = (width * height); - HANDLE hGlobalMemory = GlobalAlloc(GHND, l); - if (!hGlobalMemory) - return FALSE; - -#ifdef __WINDOWS_386__ - LPSTR lpGlobalMemory = (LPSTR)MK_FP32(GlobalLock(hGlobalMemory)); -#else - LPSTR lpGlobalMemory = (LPSTR)GlobalLock(hGlobalMemory); -#endif - -#ifdef __WIN32__ - memcpy(lpGlobalMemory, s, l); -#elif defined(__WATCOMC__) && defined(__WINDOWS_386__) - memcpy(lpGlobalMemory, s, l); -#else - hmemcpy(lpGlobalMemory, s, l); -#endif - - GlobalUnlock(hGlobalMemory); - HANDLE success = SetClipboardData(dataFormat, hGlobalMemory); - return (success != 0); - break; - } - } - return FALSE; -} - -wxObject *wxGetClipboardData(int dataFormat, long *len) -{ - switch (dataFormat) - { - case wxDF_BITMAP: - { - BITMAP bm; - HBITMAP hBitmap = (HBITMAP) GetClipboardData(CF_BITMAP); - if (!hBitmap) - return NULL; - - HDC hdcMem = CreateCompatibleDC(NULL); - HDC hdcSrc = CreateCompatibleDC(NULL); - - HBITMAP old = (HBITMAP) ::SelectObject(hdcSrc, hBitmap); - GetObject(hBitmap, sizeof(BITMAP), (LPSTR)&bm); - - HBITMAP hNewBitmap = CreateBitmapIndirect(&bm); - - if (!hNewBitmap) - { - SelectObject(hdcSrc, old); - DeleteDC(hdcMem); - DeleteDC(hdcSrc); - return NULL; - } - - HBITMAP old1 = (HBITMAP) SelectObject(hdcMem, hNewBitmap); - BitBlt(hdcMem, 0, 0, bm.bmWidth, bm.bmHeight, - hdcSrc, 0, 0, SRCCOPY); - - // Select new bitmap out of memory DC - SelectObject(hdcMem, old1); - - // Clean up - SelectObject(hdcSrc, old); - DeleteDC(hdcSrc); - DeleteDC(hdcMem); - - // Create and return a new wxBitmap - wxBitmap *wxBM = new wxBitmap; - wxBM->SetHBITMAP((WXHBITMAP) hNewBitmap); - wxBM->SetWidth(bm.bmWidth); - wxBM->SetHeight(bm.bmHeight); - wxBM->SetDepth(bm.bmPlanes); - wxBM->SetOk(TRUE); - return (wxObject *)wxBM; - break; - } - case wxDF_METAFILE: - case CF_SYLK: - case CF_DIF: - case CF_TIFF: - case CF_PALETTE: - case wxDF_DIB: - { - return FALSE; - break; - } - case wxDF_OEMTEXT: - dataFormat = wxDF_TEXT; - case wxDF_TEXT: - default: - { - HANDLE hGlobalMemory = GetClipboardData(dataFormat); - if (!hGlobalMemory) - return NULL; - - int hsize = (int)GlobalSize(hGlobalMemory); - if (len) - *len = hsize; - - char *s = new char[hsize]; - if (!s) - return NULL; - -#ifdef __WINDOWS_386__ - LPSTR lpGlobalMemory = (LPSTR)MK_FP32(GlobalLock(hGlobalMemory)); -#else - LPSTR lpGlobalMemory = (LPSTR)GlobalLock(hGlobalMemory); -#endif - -#ifdef __WIN32__ - memcpy(s, lpGlobalMemory, GlobalSize(hGlobalMemory)); -#elif __WATCOMC__ && defined(__WINDOWS_386__) - memcpy(s, lpGlobalMemory, GlobalSize(hGlobalMemory)); -#else - hmemcpy(s, lpGlobalMemory, GlobalSize(hGlobalMemory)); -#endif - - GlobalUnlock(hGlobalMemory); - - return (wxObject *)s; - break; - } - } - return NULL; -} - -int wxEnumClipboardFormats(int dataFormat) -{ - return ::EnumClipboardFormats(dataFormat); -} - -int wxRegisterClipboardFormat(char *formatName) -{ - return ::RegisterClipboardFormat(formatName); -} - -bool wxGetClipboardFormatName(int dataFormat, char *formatName, int maxCount) -{ - return (::GetClipboardFormatName(dataFormat, formatName, maxCount) > 0); -} - -/* - * Generalized clipboard implementation by Matthew Flatt - */ - -wxClipboard *wxTheClipboard = NULL; - -void wxInitClipboard(void) -{ - if (!wxTheClipboard) - wxTheClipboard = new wxClipboard; -} - -wxClipboard::wxClipboard() -{ - clipOwner = NULL; - cbString = NULL; -} - -wxClipboard::~wxClipboard() -{ - if (clipOwner) - clipOwner->BeingReplaced(); - if (cbString) - delete[] cbString; -} - -static int FormatStringToID(char *str) -{ - if (!strcmp(str, "TEXT")) - return wxDF_TEXT; - - return wxRegisterClipboardFormat(str); -} - -void wxClipboard::SetClipboardClient(wxClipboardClient *client, long time) -{ - bool got_selection; - - if (clipOwner) - clipOwner->BeingReplaced(); - clipOwner = client; - if (cbString) { - delete[] cbString; - cbString = NULL; - } - - if (wxOpenClipboard()) { - char **formats, *data; - int i; - int ftype; - long size; - - formats = clipOwner->formats.ListToArray(FALSE); - for (i = clipOwner->formats.Number(); i--; ) { - ftype = FormatStringToID(formats[i]); - data = clipOwner->GetData(formats[i], &size); - if (!wxSetClipboardData(ftype, (wxObject *)data, size, 1)) { - got_selection = FALSE; - break; - } - } - - if (i < 0) - got_selection = wxCloseClipboard(); - } else - got_selection = FALSE; - - got_selection = FALSE; // Assume another process takes over - - if (!got_selection) { - clipOwner->BeingReplaced(); - clipOwner = NULL; - } -} - -wxClipboardClient *wxClipboard::GetClipboardClient() -{ - return clipOwner; -} - -void wxClipboard::SetClipboardString(char *str, long time) -{ - bool got_selection; - - if (clipOwner) { - clipOwner->BeingReplaced(); - clipOwner = NULL; - } - if (cbString) - delete[] cbString; - - cbString = str; - - if (wxOpenClipboard()) { - if (!wxSetClipboardData(wxDF_TEXT, (wxObject *)str)) - got_selection = FALSE; - else - got_selection = wxCloseClipboard(); - } else - got_selection = FALSE; - - got_selection = FALSE; // Assume another process takes over - - if (!got_selection) { - delete[] cbString; - cbString = NULL; - } -} - -char *wxClipboard::GetClipboardString(long time) -{ - char *str; - long length; - - str = GetClipboardData("TEXT", &length, time); - if (!str) { - str = new char[1]; - *str = 0; - } - - return str; -} - -char *wxClipboard::GetClipboardData(char *format, long *length, long time) -{ - if (clipOwner) { - if (clipOwner->formats.Member(format)) - return clipOwner->GetData(format, length); - else - return NULL; - } else if (cbString) { - if (!strcmp(format, "TEXT")) - return copystring(cbString); - else - return NULL; - } else { - if (wxOpenClipboard()) { - receivedString = (char *)wxGetClipboardData(FormatStringToID(format), - length); - wxCloseClipboard(); - } else - receivedString = NULL; - - return receivedString; - } -} - - -#endif // USE_CLIPBOARD - diff --git a/src/msw/colordlg.cpp b/src/msw/colordlg.cpp deleted file mode 100644 index df7bd24b0b..0000000000 --- a/src/msw/colordlg.cpp +++ /dev/null @@ -1,124 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: colordlg.cpp -// Purpose: wxColourDialog class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "colordlg.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/defs.h" -#include "wx/pen.h" -#include "wx/brush.h" -#include "wx/gdicmn.h" -#include "wx/utils.h" -#include "wx/frame.h" -#include "wx/dialog.h" -#include "wx/msgdlg.h" -#endif - -#include - -#ifndef __WIN32__ -#include -#endif - -#include "wx/msw/private.h" -#include "wx/colordlg.h" -#include "wx/cmndata.h" - -#include -#include -#include - -#define wxDIALOG_DEFAULT_X 300 -#define wxDIALOG_DEFAULT_Y 300 - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog) -#endif - -/* - * wxColourDialog - */ - -wxColourDialog::wxColourDialog(void) -{ - m_dialogParent = NULL; -} - -wxColourDialog::wxColourDialog(wxWindow *parent, wxColourData *data) -{ - Create(parent, data); -} - -bool wxColourDialog::Create(wxWindow *parent, wxColourData *data) -{ - m_dialogParent = parent; - - if (data) - m_colourData = *data; - return TRUE; -} - -int wxColourDialog::ShowModal(void) -{ - CHOOSECOLOR chooseColorStruct; - COLORREF custColours[16]; - memset(&chooseColorStruct, 0, sizeof(CHOOSECOLOR)); - - int i; - for (i = 0; i < 16; i++) - custColours[i] = RGB(m_colourData.custColours[i].Red(), m_colourData.custColours[i].Green(), m_colourData.custColours[i].Blue()); - - chooseColorStruct.lStructSize = sizeof(CHOOSECOLOR); - chooseColorStruct.hwndOwner = (HWND) (m_dialogParent ? (HWND) m_dialogParent->GetHWND() : NULL); - chooseColorStruct.rgbResult = RGB(m_colourData.dataColour.Red(), m_colourData.dataColour.Green(), m_colourData.dataColour.Blue()); - chooseColorStruct.lpCustColors = custColours; - - chooseColorStruct.Flags = CC_RGBINIT; - - if (!m_colourData.GetChooseFull()) - chooseColorStruct.Flags |= CC_PREVENTFULLOPEN; - - // Do the modal dialog - bool success = (ChooseColor(&(chooseColorStruct)) != 0); - - // Try to highlight the correct window (the parent) - HWND hWndParent = 0; - if (GetParent()) - { - hWndParent = (HWND) GetParent()->GetHWND(); - if (hWndParent) - ::BringWindowToTop(hWndParent); - } - - - // Restore values - for (i = 0; i < 16; i++) - { - m_colourData.custColours[i].Set(GetRValue(custColours[i]), GetGValue(custColours[i]), - GetBValue(custColours[i])); - } - - m_colourData.dataColour.Set(GetRValue(chooseColorStruct.rgbResult), GetGValue(chooseColorStruct.rgbResult), - GetBValue(chooseColorStruct.rgbResult)); - - return success ? wxID_OK : wxID_CANCEL; -} - diff --git a/src/msw/colour.cpp b/src/msw/colour.cpp deleted file mode 100644 index bfc43c65a9..0000000000 --- a/src/msw/colour.cpp +++ /dev/null @@ -1,132 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: colour.cpp -// Purpose: wxColour class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "colour.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include "wx/gdicmn.h" - -#include -#include - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject) -#endif - -// Colour - -wxColour::wxColour (void) -{ - m_isInit = FALSE; - m_pixel = 0; - m_red = m_blue = m_green = 0; -} - -wxColour::wxColour (const unsigned char r, const unsigned char g, const unsigned char b) -{ - m_red = r; - m_green = g; - m_blue = b; - m_isInit = TRUE; - m_pixel = PALETTERGB (m_red, m_green, m_blue); -} - -wxColour::wxColour (const wxColour& col) -{ - m_red = col.m_red; - m_green = col.m_green; - m_blue = col.m_blue; - m_isInit = col.m_isInit; - m_pixel = col.m_pixel; -} - -wxColour& wxColour::operator =(const wxColour& col) -{ - m_red = col.m_red; - m_green = col.m_green; - m_blue = col.m_blue; - m_isInit = col.m_isInit; - m_pixel = col.m_pixel; - return *this; -} - -wxColour::wxColour (const wxString& col) -{ - wxColour *the_colour = wxTheColourDatabase->FindColour (col); - if (the_colour) - { - m_red = the_colour->Red (); - m_green = the_colour->Green (); - m_blue = the_colour->Blue (); - m_isInit = TRUE; - } - else - { - m_red = 0; - m_green = 0; - m_blue = 0; - m_isInit = FALSE; - } - m_pixel = PALETTERGB (m_red, m_green, m_blue); -} - -wxColour::~wxColour (void) -{ -} - -wxColour& wxColour::operator = (const wxString& col) -{ - wxColour *the_colour = wxTheColourDatabase->FindColour (col); - if (the_colour) - { - m_red = the_colour->Red (); - m_green = the_colour->Green (); - m_blue = the_colour->Blue (); - m_isInit = TRUE; - } - else - { - m_red = 0; - m_green = 0; - m_blue = 0; - m_isInit = FALSE; - } - m_pixel = PALETTERGB (m_red, m_green, m_blue); - return (*this); -} - -void wxColour::Set (unsigned char r, unsigned char g, unsigned char b) -{ - m_red = r; - m_green = g; - m_blue = b; - m_isInit = TRUE; - m_pixel = PALETTERGB (m_red, m_green, m_blue); -} - -// Obsolete -#if WXWIN_COMPATIBILITY -void wxColour::Get (unsigned char *r, unsigned char *g, unsigned char *b) const -{ - *r = m_red; - *g = m_green; - *b = m_blue; -} -#endif - diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp deleted file mode 100644 index 1b795f43e6..0000000000 --- a/src/msw/combobox.cpp +++ /dev/null @@ -1,322 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: combobox.cpp -// Purpose: wxComboBox class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "combobox.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/setup.h" -#endif - -#if USE_COMBOBOX - -#include "wx/combobox.h" -#include "wx/clipbrd.h" -#include "wx/msw/private.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl) -#endif - -bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) -{ - if (param == CBN_SELCHANGE) - { - wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId); - event.SetInt(GetSelection()); - event.SetEventObject(this); - event.SetString(copystring(GetStringSelection())); - ProcessCommand(event); - delete[] event.GetString(); - return TRUE; - } - else if (param == CBN_EDITCHANGE) - { - wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId); - event.SetString(copystring(GetValue())); - event.SetEventObject(this); - ProcessCommand(event); - delete[] event.GetString(); - return TRUE; - } - else return FALSE; -} - -bool wxComboBox::Create(wxWindow *parent, wxWindowID id, - const wxString& value, - const wxPoint& pos, - const wxSize& size, - int n, const wxString choices[], - long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - if (parent) parent->AddChild(this); - SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; - SetForegroundColour(parent->GetDefaultForegroundColour()) ; - m_noStrings = n; - - m_windowStyle = style; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - long msStyle = WS_CHILD | WS_HSCROLL | WS_VSCROLL - | WS_TABSTOP | WS_VISIBLE | CBS_NOINTEGRALHEIGHT; - if (m_windowStyle & wxCB_READONLY) - msStyle |= CBS_DROPDOWNLIST; - else if (m_windowStyle & wxCB_SIMPLE) // A list (shown always) and edit control - msStyle |= CBS_SIMPLE; - else - msStyle |= CBS_DROPDOWN; - - if (m_windowStyle & wxCB_SORT) - msStyle |= CBS_SORT; - - bool want3D; - WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D) ; - - // Even with extended styles, need to combine with WS_BORDER - // for them to look right. - if (want3D || (m_windowStyle & wxSIMPLE_BORDER) || (m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSUNKEN_BORDER) || (m_windowStyle & wxDOUBLE_BORDER)) - msStyle |= WS_BORDER; - - HWND wx_combo = CreateWindowEx(exStyle, "COMBOBOX", NULL, - msStyle, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, - wxGetInstance(), NULL); -/* -#if CTL3D - if (want3D) - { - Ctl3dSubclassCtl(wx_combo); - m_useCtl3D = TRUE; - } -#endif -*/ - - m_hWnd = (WXHWND)wx_combo; - - // Subclass again for purposes of dialog editing mode - SubclassWin((WXHWND)wx_combo); - - SetFont(* parent->GetFont()); - int i; - for (i = 0; i < n; i++) - SendMessage(wx_combo, CB_INSERTSTRING, i, (LONG)(const char *)choices[i]); - SendMessage(wx_combo, CB_SETCURSEL, i, 0); - - SetSize(x, y, width, height); - if ( value != "" ) - SetWindowText(wx_combo, (const char *)value); - - return TRUE; -} - -wxString wxComboBox::GetValue(void) const -{ - GetWindowText((HWND) GetHWND(), wxBuffer, 500); - return wxString(wxBuffer); -} - -void wxComboBox::SetValue(const wxString& value) -{ - // If newlines are denoted by just 10, must stick 13 in front. - int singletons = 0; - int len = value.Length(); - int i; - for (i = 0; i < len; i ++) - { - if ((i > 0) && (value[i] == 10) && (value[i-1] != 13)) - singletons ++; - } - if (singletons > 0) - { - char *tmp = new char[len + singletons + 1]; - int j = 0; - for (i = 0; i < len; i ++) - { - if ((i > 0) && (value[i] == 10) && (value[i-1] != 13)) - { - tmp[j] = 13; - j ++; - } - tmp[j] = value[i]; - j ++; - } - tmp[j] = 0; - SetWindowText((HWND) GetHWND(), tmp); - delete[] tmp; - } - else - SetWindowText((HWND) GetHWND(), (const char *)value); -} - -// Clipboard operations -void wxComboBox::Copy(void) -{ - HWND hWnd = (HWND) GetHWND(); - SendMessage(hWnd, WM_COPY, 0, 0L); -} - -void wxComboBox::Cut(void) -{ - HWND hWnd = (HWND) GetHWND(); - SendMessage(hWnd, WM_CUT, 0, 0L); -} - -void wxComboBox::Paste(void) -{ - HWND hWnd = (HWND) GetHWND(); - SendMessage(hWnd, WM_PASTE, 0, 0L); -} - -void wxComboBox::SetEditable(bool editable) -{ - // Can't implement in MSW? -// HWND hWnd = (HWND) GetHWND(); -// SendMessage(hWnd, EM_SETREADONLY, (WPARAM)!editable, (LPARAM)0L); -} - -void wxComboBox::SetInsertionPoint(long pos) -{ -/* - HWND hWnd = (HWND) GetHWND(); -#ifdef __WIN32__ - SendMessage(hWnd, EM_SETSEL, pos, pos); - SendMessage(hWnd, EM_SCROLLCARET, (WPARAM)0, (LPARAM)0); -#else - SendMessage(hWnd, EM_SETSEL, 0, MAKELPARAM(pos, pos)); -#endif - char *nothing = ""; - SendMessage(hWnd, EM_REPLACESEL, 0, (LPARAM)nothing); -*/ -} - -void wxComboBox::SetInsertionPointEnd(void) -{ -/* - long pos = GetLastPosition(); - SetInsertionPoint(pos); -*/ -} - -long wxComboBox::GetInsertionPoint(void) const -{ -/* - DWORD Pos=(DWORD)SendMessage((HWND) GetHWND(), EM_GETSEL, 0, 0L); - return Pos&0xFFFF; -*/ - return 0; -} - -long wxComboBox::GetLastPosition(void) const -{ -/* - HWND hWnd = (HWND) GetHWND(); - - // Will always return a number > 0 (according to docs) - int noLines = (int)SendMessage(hWnd, EM_GETLINECOUNT, (WPARAM)0, (LPARAM)0L); - - // This gets the char index for the _beginning_ of the last line - int charIndex = (int)SendMessage(hWnd, EM_LINEINDEX, (WPARAM)(noLines-1), (LPARAM)0L); - - // Get number of characters in the last line. We'll add this to the character - // index for the last line, 1st position. - int lineLength = (int)SendMessage(hWnd, EM_LINELENGTH, (WPARAM)charIndex, (LPARAM)0L); - - return (long)(charIndex + lineLength); -*/ - return 0; -} - -void wxComboBox::Replace(long from, long to, const wxString& value) -{ -#if USE_CLIPBOARD - HWND hWnd = (HWND) GetHWND(); - long fromChar = from; - long toChar = to; - - // Set selection and remove it -#ifdef __WIN32__ - SendMessage(hWnd, CB_SETEDITSEL, fromChar, toChar); -#else - SendMessage(hWnd, CB_SETEDITSEL, (WPARAM)0, (LPARAM)MAKELONG(fromChar, toChar)); -#endif - SendMessage(hWnd, WM_CUT, (WPARAM)0, (LPARAM)0); - - // Now replace with 'value', by pasting. - wxSetClipboardData(wxDF_TEXT, (wxObject *)(const char *)value, 0, 0); - - // Paste into edit control - SendMessage(hWnd, WM_PASTE, (WPARAM)0, (LPARAM)0L); -#endif -} - -void wxComboBox::Remove(long from, long to) -{ - HWND hWnd = (HWND) GetHWND(); - long fromChar = from; - long toChar = to; - - // Cut all selected text -#ifdef __WIN32__ - SendMessage(hWnd, CB_SETEDITSEL, fromChar, toChar); -#else - SendMessage(hWnd, CB_SETEDITSEL, (WPARAM)0, (LPARAM)MAKELONG(fromChar, toChar)); -#endif - SendMessage(hWnd, WM_CUT, (WPARAM)0, (LPARAM)0); -} - -void wxComboBox::SetSelection(long from, long to) -{ - HWND hWnd = (HWND) GetHWND(); - long fromChar = from; - long toChar = to; - // if from and to are both -1, it means - // (in wxWindows) that all text should be selected. - // This translates into Windows convention - if ((from == -1) && (to == -1)) - { - fromChar = 0; - toChar = -1; - } - -#ifdef __WIN32__ - SendMessage(hWnd, CB_SETEDITSEL, (WPARAM)fromChar, (LPARAM)toChar); -// SendMessage(hWnd, EM_SCROLLCARET, (WPARAM)0, (LPARAM)0); -#else - // WPARAM is 0: selection is scrolled into view - SendMessage(hWnd, CB_SETEDITSEL, (WPARAM)0, (LPARAM)MAKELONG(fromChar, toChar)); -#endif -} - -#endif - // USE_COMBOBOX - diff --git a/src/msw/control.cpp b/src/msw/control.cpp deleted file mode 100644 index 76c80cad36..0000000000 --- a/src/msw/control.cpp +++ /dev/null @@ -1,331 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: control.cpp -// Purpose: wxControl class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "control.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/app.h" -#include "wx/dcclient.h" -#endif - -#include "wx/msw/private.h" - -#if defined(__WIN95__) && !defined(__GNUWIN32__) -#include -#endif - -#ifdef GetCharWidth -#undef GetCharWidth -#undef GetWindowProc -#endif - -#if !USE_SHARED_LIBRARY -IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow) - -BEGIN_EVENT_TABLE(wxControl, wxWindow) - EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground) -END_EVENT_TABLE() -#endif - -// Item members -wxControl::wxControl(void) -{ - m_backgroundColour = *wxWHITE; - m_foregroundColour = *wxBLACK; - m_callback = 0; -} - -wxControl::~wxControl(void) -{ - m_isBeingDeleted = TRUE; - - // If we delete an item, we should initialize the parent panel, - // because it could now be invalid. - wxWindow *parent = (wxWindow *)GetParent(); - if (parent) - { - if (parent->GetDefaultItem() == this) - parent->SetDefaultItem(NULL); - } -} - -void wxControl::SetLabel(const wxString& label) -{ - if (GetHWND()) - SetWindowText((HWND) GetHWND(), (const char *)label); -} - -wxString wxControl::GetLabel(void) const -{ - wxBuffer[0] = 0; - if (GetHWND()) - { - int len = GetWindowText((HWND)GetHWND(), wxBuffer, 256); - wxBuffer[len] = 0; - } - - return wxString(wxBuffer); -} - -// Call this repeatedly for several wnds to find the overall size -// of the widget. -// Call it initially with -1 for all values in rect. -// Keep calling for other widgets, and rect will be modified -// to calculate largest bounding rectangle. -void wxFindMaxSize(WXHWND wnd, RECT *rect) -{ - int left = rect->left; - int right = rect->right; - int top = rect->top; - int bottom = rect->bottom; - - GetWindowRect((HWND) wnd, rect); - - if (left < 0) - return; - - if (left < rect->left) - rect->left = left; - - if (right > rect->right) - rect->right = right; - - if (top < rect->top) - rect->top = top; - - if (bottom > rect->bottom) - rect->bottom = bottom; - -} - -/* -// Not currently used -void wxConvertDialogToPixels(wxWindow *control, int *x, int *y) -{ - if (control->m_windowParent && control->m_windowParent->is_dialog) - { - DWORD word = GetDialogBaseUnits(); - int xs = LOWORD(word); - int ys = HIWORD(word); - *x = (int)(*x * xs/4); - *y = (int)(*y * ys/8); - } - else - { - *x = *x; - *y = *y; - } -} -*/ - -void wxControl::MSWOnMouseMove(int x, int y, WXUINT flags) -{ -/* - // Trouble with this is that it sets the cursor for controls too :-( - if (m_windowCursor.Ok() && !wxIsBusy()) - ::SetCursor(m_windowCursor.GetHCURSOR()); -*/ - - if (!m_mouseInWindow) - { - // Generate an ENTER event - m_mouseInWindow = TRUE; - MSWOnMouseEnter(x, y, flags); - } - - wxMouseEvent event(wxEVT_MOTION); - - event.m_x = x; event.m_y = y; - event.m_shiftDown = ((flags & MK_SHIFT) != 0); - event.m_controlDown = ((flags & MK_CONTROL) != 0); - event.m_leftDown = ((flags & MK_LBUTTON) != 0); - event.m_middleDown = ((flags & MK_MBUTTON) != 0); - event.m_rightDown = ((flags & MK_RBUTTON) != 0); - event.SetTimestamp(wxApp::sm_lastMessageTime); - event.SetEventObject( this ); - - // Window gets a click down message followed by a mouse move - // message even if position isn't changed! We want to discard - // the trailing move event if x and y are the same. - if ((m_lastEvent == wxEVT_RIGHT_DOWN || m_lastEvent == wxEVT_LEFT_DOWN || - m_lastEvent == wxEVT_MIDDLE_DOWN) && - (m_lastXPos == event.GetX() && m_lastYPos == event.GetY())) - { - m_lastXPos = event.GetX(); m_lastYPos = event.GetY(); - m_lastEvent = wxEVT_MOTION; - return; - } - - m_lastEvent = wxEVT_MOTION; - m_lastXPos = event.GetX(); m_lastYPos = event.GetY(); - - if (!GetEventHandler()->ProcessEvent(event)) - Default(); -} - -long wxControl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) -{ - return wxWindow::MSWWindowProc(nMsg, wParam, lParam); -} - -bool wxControl::MSWNotify(WXWPARAM wParam, WXLPARAM lParam) -{ -#if defined(__WIN95__) - wxCommandEvent event(wxEVT_NULL, m_windowId); - wxEventType eventType = wxEVT_NULL; - NMHDR *hdr1 = (NMHDR*) lParam; - switch ( hdr1->code ) - { - case NM_CLICK: - { - eventType = wxEVT_COMMAND_LEFT_CLICK; - break; - } - case NM_DBLCLK: - { - eventType = wxEVT_COMMAND_LEFT_DCLICK; - break; - } - case NM_RCLICK: - { - eventType = wxEVT_COMMAND_RIGHT_CLICK; - break; - } - case NM_RDBLCLK: - { - eventType = wxEVT_COMMAND_RIGHT_DCLICK; - break; - } - case NM_SETFOCUS: - { - eventType = wxEVT_COMMAND_SET_FOCUS; - break; - } - case NM_KILLFOCUS: - { - eventType = wxEVT_COMMAND_KILL_FOCUS; - break; - } - case NM_RETURN: - { - eventType = wxEVT_COMMAND_ENTER; - break; - } -/* Not implemented - case NM_OUTOFMEMORY: - { - eventType = wxEVT_COMMAND_OUT_OF_MEMORY; - break; - } -*/ - default : - return FALSE; - break; - } - event.SetEventType(eventType); - event.SetEventObject(this); - - if ( !ProcessEvent(event) ) - return FALSE; - return TRUE; -#else - return FALSE; -#endif -} - -/* - * Allocates control IDs within the appropriate range - */ - - -int NewControlId(void) -{ - static int controlId = 0; - controlId ++; - return controlId; -} - -void wxControl::ProcessCommand (wxCommandEvent & event) -{ - // Tries: - // 1) A callback function (to become obsolete) - // 2) OnCommand, starting at this window and working up parent hierarchy - // 3) OnCommand then calls ProcessEvent to search the event tables. - if (m_callback) - { - (void) (*(m_callback)) (*this, event); - } - else - { - GetEventHandler()->OnCommand(*this, event); - } -} - -void wxControl::OnEraseBackground(wxEraseEvent& event) -{ - // In general, you don't want to erase the background of a control, - // or you'll get a flicker. - // TODO: move this 'null' function into each control that - // might flicker. - - RECT rect; - ::GetClientRect((HWND) GetHWND(), &rect); - - HBRUSH hBrush = ::CreateSolidBrush(PALETTERGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue())); - int mode = ::SetMapMode((HDC) event.GetDC()->GetHDC(), MM_TEXT); - - ::FillRect ((HDC) event.GetDC()->GetHDC(), &rect, hBrush); - ::DeleteObject(hBrush); - ::SetMapMode((HDC) event.GetDC()->GetHDC(), mode); -} - -void wxControl::SetClientSize (int width, int height) -{ - SetSize (-1, -1, width, height); -} - -void wxControl::Centre (int direction) -{ - int x, y, width, height, panel_width, panel_height, new_x, new_y; - - wxWindow *parent = (wxWindow *) GetParent (); - if (!parent) - return; - - parent->GetClientSize (&panel_width, &panel_height); - GetSize (&width, &height); - GetPosition (&x, &y); - - new_x = x; - new_y = y; - - if (direction & wxHORIZONTAL) - new_x = (int) ((panel_width - width) / 2); - - if (direction & wxVERTICAL) - new_y = (int) ((panel_height - height) / 2); - - SetSize (new_x, new_y, width, height); - int temp_x, temp_y; - GetPosition (&temp_x, &temp_y); - GetPosition (&temp_x, &temp_y); -} - - diff --git a/src/msw/ctl3d/borland/makefile.b32 b/src/msw/ctl3d/borland/makefile.b32 deleted file mode 100644 index 1783689b82..0000000000 --- a/src/msw/ctl3d/borland/makefile.b32 +++ /dev/null @@ -1,25 +0,0 @@ -# -# File: makefile.b32 -# Author: Andre Beltman -# Created: 1995 -# Updated: -# Copyright: (c) 1995, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Imports 32bit ctl3d library for Windows 95 -# and Borland C++ 4.x - -WXDIR = $(WXWIN) -WXLIB = $(WXDIR)\lib - -LIBTARGET= $(WXLIB)\ctl3d32.lib - -all: $(LIBTARGET) - -$(LIBTARGET): - erase $(LIBTARGET) - implib $(LIBTARGET) ..\ctl3d32.dll - -clean: - -erase $(LIBTARGET) diff --git a/src/msw/ctl3d/borland/makefile.bcc b/src/msw/ctl3d/borland/makefile.bcc deleted file mode 100644 index 6a0bcdb158..0000000000 --- a/src/msw/ctl3d/borland/makefile.bcc +++ /dev/null @@ -1,25 +0,0 @@ -# -# File: makefile.b32 -# Author: Andre Beltman -# Created: 1995 -# Updated: -# Copyright: (c) 1995, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Imports ctl3d library -# and Borland C++ 4.x - -WXDIR = $(WXWIN) -WXLIB = $(WXDIR)\lib - -LIBTARGET= $(WXLIB)\ctl3dv2.lib - -all: $(LIBTARGET) - -$(LIBTARGET): - erase $(LIBTARGET) - implib $(LIBTARGET) ..\ctl3dv2.dll - -clean: - -erase $(LIBTARGET) diff --git a/src/msw/ctl3d/ctl3d.dll b/src/msw/ctl3d/ctl3d.dll deleted file mode 100644 index 8e1b74c3a8..0000000000 Binary files a/src/msw/ctl3d/ctl3d.dll and /dev/null differ diff --git a/src/msw/ctl3d/ctl3d32.dll b/src/msw/ctl3d/ctl3d32.dll deleted file mode 100644 index fc2126896e..0000000000 Binary files a/src/msw/ctl3d/ctl3d32.dll and /dev/null differ diff --git a/src/msw/ctl3d/ctl3dv2.dll b/src/msw/ctl3d/ctl3dv2.dll deleted file mode 100644 index 1799fd951b..0000000000 Binary files a/src/msw/ctl3d/ctl3dv2.dll and /dev/null differ diff --git a/src/msw/ctl3d/msvc/ctl3d.h b/src/msw/ctl3d/msvc/ctl3d.h deleted file mode 100644 index de7e67aa50..0000000000 --- a/src/msw/ctl3d/msvc/ctl3d.h +++ /dev/null @@ -1,61 +0,0 @@ -/*----------------------------------------------------------------------- -| CTL3D.DLL -| -| Adds 3d effects to Windows controls -| -| See ctl3d.doc for info -| ------------------------------------------------------------------------*/ -#ifdef __cplusplus -extern "C" { -#endif - - -BOOL WINAPI Ctl3dSubclassDlg(HWND, WORD); -BOOL WINAPI Ctl3dSubclassDlgEx(HWND, DWORD); -WORD WINAPI Ctl3dGetVer(void); -BOOL WINAPI Ctl3dEnabled(void); -HBRUSH WINAPI Ctl3dCtlColor(HDC, LONG); // ARCHAIC, use Ctl3dCtlColorEx -HBRUSH WINAPI Ctl3dCtlColorEx(UINT wm, WPARAM wParam, LPARAM lParam); -BOOL WINAPI Ctl3dColorChange(void); -BOOL WINAPI Ctl3dSubclassCtl(HWND); -LONG WINAPI Ctl3dDlgFramePaint(HWND, UINT, WPARAM, LPARAM); - -BOOL WINAPI Ctl3dAutoSubclass(HANDLE); - -BOOL WINAPI Ctl3dRegister(HANDLE); -BOOL WINAPI Ctl3dUnregister(HANDLE); - -//begin DBCS: far east short cut key support -VOID WINAPI Ctl3dWinIniChange(void); -//end DBCS - - -/* Ctl3dSubclassDlg3d flags */ -#define CTL3D_BUTTONS 0x0001 -#define CTL3D_LISTBOXES 0x0002 -#define CTL3D_EDITS 0x0004 -#define CTL3D_COMBOS 0x0008 -#define CTL3D_STATICTEXTS 0x0010 -#define CTL3D_STATICFRAMES 0x0020 - -#define CTL3D_NODLGWINDOW 0x00010000 -#define CTL3D_ALL 0xffff - -#define WM_DLGBORDER (WM_USER+3567) -/* WM_DLGBORDER *(int FAR *)lParam return codes */ -#define CTL3D_NOBORDER 0 -#define CTL3D_BORDER 1 - -#define WM_DLGSUBCLASS (WM_USER+3568) -/* WM_DLGSUBCLASS *(int FAR *)lParam return codes */ -#define CTL3D_NOSUBCLASS 0 -#define CTL3D_SUBCLASS 1 - -/* Resource ID for 3dcheck.bmp (for .lib version of ctl3d) */ -#define CTL3D_3DCHECK 26567 - - -#ifdef __cplusplus -} -#endif diff --git a/src/msw/ctl3d/msvc/ctl3d.lib b/src/msw/ctl3d/msvc/ctl3d.lib deleted file mode 100644 index 3fe7168589..0000000000 Binary files a/src/msw/ctl3d/msvc/ctl3d.lib and /dev/null differ diff --git a/src/msw/ctl3d/msvc/ctl3dv2.lib b/src/msw/ctl3d/msvc/ctl3dv2.lib deleted file mode 100644 index 8e35c80b91..0000000000 Binary files a/src/msw/ctl3d/msvc/ctl3dv2.lib and /dev/null differ diff --git a/src/msw/ctl3d/readme.txt b/src/msw/ctl3d/readme.txt deleted file mode 100644 index 58c656ba7d..0000000000 --- a/src/msw/ctl3d/readme.txt +++ /dev/null @@ -1,31 +0,0 @@ - -CTL3D ------ - -CTL3D gives 3D controls to 16-bit Windows 3.1 applications. -Its use in wxWindows is controlled by the CTL3D symbol -in include/base/wx_setup.h. - -If using a 16-bit compiler, copy ctl3dv2.lib to your compiler -library directory, and remember to distribute ctl3dv2.dll -with your applications. The DLL should be copied to -windows/system and DELETED from the application installation -directory. - -If using Watcom C++ in 386 mode, things are slightly more complex: you need -to link with Patrick Halke's ctl3d32.obj which provides an interface -from 32-bits to the 16-bit CTL3DV2 library. Link your application -with ctl3d32.obj file instead of ctl3dv2.lib, distributing -ctl3dv2.dll as above. - -ctl3d.dll ; Version 1 of the CTL3D library DLL: obsolete -ctl3dv2.dll ; Version 2 of the CTL3D library DLL -readme.txt ; This file - -msvc/ctl3d.h ; Header file for either version of CTL3D -msvc/ctl3d.lib ; Import library for 16-bit compilers -watcom/import32.zip ; Import libraries for Watcom WIN32 compilation -wat386/ ; Source & objects for Watcom 386 object file to - ; interface 16<->32 bit modes -borland/ ; Makefiles for making import libraries for Borland - diff --git a/src/msw/ctl3d/wat32/import32.zip b/src/msw/ctl3d/wat32/import32.zip deleted file mode 100644 index ca98307520..0000000000 Binary files a/src/msw/ctl3d/wat32/import32.zip and /dev/null differ diff --git a/src/msw/ctl3d/wat386/ctl3d.h b/src/msw/ctl3d/wat386/ctl3d.h deleted file mode 100644 index de7e67aa50..0000000000 --- a/src/msw/ctl3d/wat386/ctl3d.h +++ /dev/null @@ -1,61 +0,0 @@ -/*----------------------------------------------------------------------- -| CTL3D.DLL -| -| Adds 3d effects to Windows controls -| -| See ctl3d.doc for info -| ------------------------------------------------------------------------*/ -#ifdef __cplusplus -extern "C" { -#endif - - -BOOL WINAPI Ctl3dSubclassDlg(HWND, WORD); -BOOL WINAPI Ctl3dSubclassDlgEx(HWND, DWORD); -WORD WINAPI Ctl3dGetVer(void); -BOOL WINAPI Ctl3dEnabled(void); -HBRUSH WINAPI Ctl3dCtlColor(HDC, LONG); // ARCHAIC, use Ctl3dCtlColorEx -HBRUSH WINAPI Ctl3dCtlColorEx(UINT wm, WPARAM wParam, LPARAM lParam); -BOOL WINAPI Ctl3dColorChange(void); -BOOL WINAPI Ctl3dSubclassCtl(HWND); -LONG WINAPI Ctl3dDlgFramePaint(HWND, UINT, WPARAM, LPARAM); - -BOOL WINAPI Ctl3dAutoSubclass(HANDLE); - -BOOL WINAPI Ctl3dRegister(HANDLE); -BOOL WINAPI Ctl3dUnregister(HANDLE); - -//begin DBCS: far east short cut key support -VOID WINAPI Ctl3dWinIniChange(void); -//end DBCS - - -/* Ctl3dSubclassDlg3d flags */ -#define CTL3D_BUTTONS 0x0001 -#define CTL3D_LISTBOXES 0x0002 -#define CTL3D_EDITS 0x0004 -#define CTL3D_COMBOS 0x0008 -#define CTL3D_STATICTEXTS 0x0010 -#define CTL3D_STATICFRAMES 0x0020 - -#define CTL3D_NODLGWINDOW 0x00010000 -#define CTL3D_ALL 0xffff - -#define WM_DLGBORDER (WM_USER+3567) -/* WM_DLGBORDER *(int FAR *)lParam return codes */ -#define CTL3D_NOBORDER 0 -#define CTL3D_BORDER 1 - -#define WM_DLGSUBCLASS (WM_USER+3568) -/* WM_DLGSUBCLASS *(int FAR *)lParam return codes */ -#define CTL3D_NOSUBCLASS 0 -#define CTL3D_SUBCLASS 1 - -/* Resource ID for 3dcheck.bmp (for .lib version of ctl3d) */ -#define CTL3D_3DCHECK 26567 - - -#ifdef __cplusplus -} -#endif diff --git a/src/msw/ctl3d/wat386/ctl3d32.c b/src/msw/ctl3d/wat386/ctl3d32.c deleted file mode 100644 index 67f845071e..0000000000 --- a/src/msw/ctl3d/wat386/ctl3d32.c +++ /dev/null @@ -1,285 +0,0 @@ -/* - * File: ctl3d32.c - * Purpose: 32bit interface to CTL3D functions for Watcom C/C++ - * Author: Patrick Halke - * Created: 1995 - * Updated: - * Copyright: (c) 1995 - */ - -#include - -#include - -#include "ctl3d.h" - -#if defined(__WINDOWS_386__) - -#ifdef __cplusplus -extern "C" { -#endif - -#undef FAR -#define FAR - -#define INDIR_INT INDIR_WORD -#define INDIR_UINT INDIR_WORD -#define INDIR_WPARAM INDIR_UINT -#define INDIR_LPARAM INDIR_DWORD -#define INDIR_LONG INDIR_DWORD -#define INDIR_ULONG INDIR_DWORD - -#ifdef STRICT -#define INDIR_HANDLE INDIR_PTR -#define INDIR_HWND INDIR_PTR -#define INDIR_HDC INDIR_PTR -#else -#define INDIR_HANDLE INDIR_UINT -#define INDIR_HWND INDIR_UINT -#define INDIR_HDC INDIR_UINT -#endif - -typedef struct tagCTL3DFUNCTIONS { - HINSTANCE dll; - /* Function Handles */ - HINDIR _Ctl3dSubclassDlg; - HINDIR _Ctl3dSubclassDlgEx; - HINDIR _Ctl3dGetVer; - HINDIR _Ctl3dEnabled; - HINDIR _Ctl3dCtlColor; - HINDIR _Ctl3dCtlColorEx; - HINDIR _Ctl3dColorChange; - HINDIR _Ctl3dSubclassCtl; - HINDIR _Ctl3dDlgFramePaint; - HINDIR _Ctl3dAutoSubclass; - HINDIR _Ctl3dRegister; - HINDIR _Ctl3dUnregister; - HINDIR _Ctl3dWinIniChange; -} CTL3DFUNCTIONS; - -static CTL3DFUNCTIONS Ctl3dFunc = { 0 }; - -static BOOL load_functions( CTL3DFUNCTIONS* functions ) -{ - FARPROC proc; - HINSTANCE dll; - - dll = LoadLibrary( "CTL3D.DLL" ); - if( dll < HINSTANCE_ERROR ) { - return( FALSE ); - } - - /* Function thunks */ - - proc = GetProcAddress(dll, "Ctl3dSubclassDlg"); - functions->_Ctl3dSubclassDlg = GetIndirectFunctionHandle( proc, - INDIR_HWND, - INDIR_WORD, - INDIR_ENDLIST ); - - proc = GetProcAddress( dll, "Ctl3dSubclassDlgEx" ); - functions->_Ctl3dSubclassDlgEx = GetIndirectFunctionHandle( proc, - INDIR_HWND, - INDIR_DWORD, - INDIR_ENDLIST ); - - proc = GetProcAddress( dll, "Ctl3dGetVer" ); - functions->_Ctl3dGetVer = GetIndirectFunctionHandle( proc, - INDIR_ENDLIST ); - - proc = GetProcAddress( dll, "Ctl3dEnabled" ); - functions->_Ctl3dEnabled = GetIndirectFunctionHandle( proc, - INDIR_ENDLIST ); - - proc = GetProcAddress( dll, "Ctl3dCtlColor" ); - functions->_Ctl3dCtlColor = GetIndirectFunctionHandle( proc, - INDIR_HDC, - INDIR_LONG, - INDIR_ENDLIST ); - - proc = GetProcAddress( dll, "Ctl3dCtlColorEx" ); - functions->_Ctl3dCtlColorEx = GetIndirectFunctionHandle( proc, - INDIR_UINT, - INDIR_WPARAM, - INDIR_LPARAM, - INDIR_ENDLIST ); - - proc = GetProcAddress( dll, "Ctl3dColorChange" ); - functions->_Ctl3dColorChange = GetIndirectFunctionHandle( proc, - INDIR_ENDLIST ); - - proc = GetProcAddress( dll, "Ctl3dSubclassCtl" ); - functions->_Ctl3dSubclassCtl = GetIndirectFunctionHandle( proc, - INDIR_HWND, - INDIR_ENDLIST ); - - proc = GetProcAddress( dll, "Ctl3dDlgFramePaint" ); - functions->_Ctl3dDlgFramePaint = GetIndirectFunctionHandle( proc, - INDIR_HWND, - INDIR_UINT, - INDIR_WPARAM, - INDIR_LPARAM, - INDIR_ENDLIST ); - - proc = GetProcAddress( dll, "Ctl3dAutoSubclass" ); - functions->_Ctl3dAutoSubclass = GetIndirectFunctionHandle( proc, - INDIR_HANDLE, - INDIR_ENDLIST ); - - proc = GetProcAddress( dll, "Ctl3dRegister" ); - functions->_Ctl3dRegister = GetIndirectFunctionHandle( proc, - INDIR_HANDLE, - INDIR_ENDLIST ); - - proc = GetProcAddress( dll, "Ctl3dUnregister" ); - functions->_Ctl3dUnregister = GetIndirectFunctionHandle( proc, - INDIR_HANDLE, - INDIR_ENDLIST ); - - proc = GetProcAddress( dll, "Ctl3dWinIniChange" ); - functions->_Ctl3dWinIniChange = GetIndirectFunctionHandle( proc, - INDIR_ENDLIST ); - - functions->dll = dll; - return( TRUE ); -} - -static void unload_functions( CTL3DFUNCTIONS * functions ) -{ - FreeLibrary( functions->dll ); - functions->dll = 0; -} - -/* Function Definitions */ - -BOOL WINAPI Ctl3dSubclassDlg(HWND hwnd, WORD w) -{ - if (!Ctl3dFunc.dll) - if (!load_functions(&Ctl3dFunc)) - return FALSE; - - return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dSubclassDlg, - hwnd, w); -} - -BOOL WINAPI Ctl3dSubclassDlgEx(HWND hwnd, DWORD dw) -{ - if (!Ctl3dFunc.dll) - if (!load_functions(&Ctl3dFunc)) - return FALSE; - - return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dSubclassDlgEx, - hwnd, dw); -} - -WORD WINAPI Ctl3dGetVer(void) -{ - if (!Ctl3dFunc.dll) - if (!load_functions(&Ctl3dFunc)) - return FALSE; - - return (WORD)InvokeIndirectFunction(Ctl3dFunc._Ctl3dGetVer); -} - -BOOL WINAPI Ctl3dEnabled(void) -{ - if (!Ctl3dFunc.dll) - if (!load_functions(&Ctl3dFunc)) - return FALSE; - - return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dEnabled); -} - -HBRUSH WINAPI Ctl3dCtlColor(HDC hdc, LONG l) -{ - if (!Ctl3dFunc.dll) - if (!load_functions(&Ctl3dFunc)) - return FALSE; - - return (HBRUSH)InvokeIndirectFunction(Ctl3dFunc._Ctl3dCtlColor, - hdc, l); -} - -HBRUSH WINAPI Ctl3dCtlColorEx(UINT ui, WPARAM wp, LPARAM lp) -{ - if (!Ctl3dFunc.dll) - if (!load_functions(&Ctl3dFunc)) - return FALSE; - - return (HBRUSH)InvokeIndirectFunction(Ctl3dFunc._Ctl3dCtlColorEx, - ui, wp, lp); -} - -BOOL WINAPI Ctl3dColorChange(void) -{ - if (!Ctl3dFunc.dll) - if (!load_functions(&Ctl3dFunc)) - return FALSE; - - return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dColorChange); -} - -BOOL WINAPI Ctl3dSubclassCtl(HWND hwnd) -{ - if (!Ctl3dFunc.dll) - if (!load_functions(&Ctl3dFunc)) - return FALSE; - - return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dSubclassCtl, - hwnd); -} - -LONG WINAPI Ctl3dDlgFramePaint(HWND hwnd, UINT ui, WPARAM wp, LPARAM lp) -{ - if (!Ctl3dFunc.dll) - if (!load_functions(&Ctl3dFunc)) - return FALSE; - - return (LONG)InvokeIndirectFunction(Ctl3dFunc._Ctl3dDlgFramePaint, - hwnd, ui, wp, lp); -} - -BOOL WINAPI Ctl3dAutoSubclass(HANDLE hnd) -{ - if (!Ctl3dFunc.dll) - if (!load_functions(&Ctl3dFunc)) - return FALSE; - - return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dAutoSubclass, - hnd); -} - -BOOL WINAPI Ctl3dRegister(HANDLE hnd) -{ - if (!Ctl3dFunc.dll) - if (!load_functions(&Ctl3dFunc)) - return FALSE; - - return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dRegister, - hnd); -} - -BOOL WINAPI Ctl3dUnregister(HANDLE hnd) -{ - if (!Ctl3dFunc.dll) - if (!load_functions(&Ctl3dFunc)) - return FALSE; - - return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dUnregister, - hnd); -} - -VOID WINAPI Ctl3dWinIniChange(void) -{ - if (!Ctl3dFunc.dll) - if (!load_functions(&Ctl3dFunc)) - return; - - InvokeIndirectFunction(Ctl3dFunc._Ctl3dWinIniChange); -} - -#ifdef __cplusplus -} -#endif - -#endif // __WINDOWS_386__ diff --git a/src/msw/ctl3d/wat386/ctl3d32.lnk b/src/msw/ctl3d/wat386/ctl3d32.lnk deleted file mode 100644 index 2ada8d2a55..0000000000 --- a/src/msw/ctl3d/wat386/ctl3d32.lnk +++ /dev/null @@ -1 +0,0 @@ -+-ctl3d32.obj diff --git a/src/msw/ctl3d/wat386/ctl3d32.obj b/src/msw/ctl3d/wat386/ctl3d32.obj deleted file mode 100644 index 11c666054f..0000000000 Binary files a/src/msw/ctl3d/wat386/ctl3d32.obj and /dev/null differ diff --git a/src/msw/ctl3d/wat386/ctl3d32.txt b/src/msw/ctl3d/wat386/ctl3d32.txt deleted file mode 100644 index 8e6b8b6e6b..0000000000 --- a/src/msw/ctl3d/wat386/ctl3d32.txt +++ /dev/null @@ -1,11 +0,0 @@ -Using this package should be no big problem. You only need to change your -wx_setup.h for including the CTL3D stuff, compile ctl3d32.c and add -ctl3d32.obj to wx.lib (or just link it with your application). - -Please send bug reports to 'patrick@zaphod.ruhr.de'. - - -Good luck - -- patrick - diff --git a/src/msw/ctl3d/wat386/makefile.wat b/src/msw/ctl3d/wat386/makefile.wat deleted file mode 100644 index 1f0858491a..0000000000 --- a/src/msw/ctl3d/wat386/makefile.wat +++ /dev/null @@ -1,23 +0,0 @@ -CC = wcc386 -CXX = wpp386 -LIB = wlib -IFLAGS = -i=..\\..\\include\\base;..\\..\\include\\msw -CFLAGS = $(IFLAGS) -zq -zW -w1 -d2 -ot -3 -dwx_msw - -WXDIR = ..\\.. -LIBTARGET = $(WXDIR)\\lib\\wx.lib - -C_SRCS = ctl3d32.c - -OBJECTS = $(C_SRCS:.c=.obj) $(CC_SRCS:.cc=.obj) - -.c.obj: - $(CC) $(CFLAGS) $< - -.cc.obj: - $(CXX) $(CFLAGS) $< - -all: $(OBJECTS) $(LIBTARGET) - -$(LIBTARGET): $(OBJECTS) - $(LIB) /P=256 $(LIBTARGET) @ctl3d32.lnk diff --git a/src/msw/curico.cpp b/src/msw/curico.cpp deleted file mode 100644 index 854a6a65ab..0000000000 --- a/src/msw/curico.cpp +++ /dev/null @@ -1,899 +0,0 @@ -//* Written by Microsoft Product Support Services, Windows Developer Support. * -//***************************************************************************** -// (C) Copyright Microsoft Corp. 1993. All rights reserved. -// You have a royalty-free right to use, modify, reproduce and -// distribute the Sample Files (and/or any modified version) in -// any way you find useful, provided that you agree that -// Microsoft has no warranty obligations or liability for any -// Sample Application Files which are modified. - -// Modified by Petr Smilauer, March 1994 for wxWin library purposes! - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include -#include - -#ifdef __GNUWIN32__ -#include "wx/msw/gnuwin32/extra.h" -#endif - -#include "wx/msw/curicop.h" -#include "wx/msw/curico.h" - -//***************************************************************************** -//* Function : ReadIconFile() * -//* Purpose : Reads an icon resource file and creates an icon based on that * -//* information. * -//* Parameters : char *szFileName - The icon resource file. * -//* Returns : A handle to an icon. The handle will be NULL if an icon cannot * -//* be created for any reason. * -//***************************************************************************** - -HICON ReadIconFile( char *szFileName, HINSTANCE hInst, int *W, int *H) -{ HICON hIcon; - HANDLE hDIB; - - if( (hDIB = ReadIcon(szFileName, W, H)) == NULL) - // read the icon DIB from file - return NULL; - hIcon = MakeIcon( hDIB, hInst); // create an icon from DIB - GlobalFree( hDIB); - return hIcon; -} - -//***************************************************************************** -//* Function : CursorToIcon() * -//* Purpose : Reads a cursor resource file and creates an icon based on that * -//* information. * -//* Parameters : char *szFileName - The cursor resource file. * -//* Returns : A handle to an icon. The handle will be NULL if an icon cannot * -//* be created for any reason. * -//* Comments : A cursor is monochrome. So, the resulting icon will also be * -//* monochrome. * -//***************************************************************************** - -HICON CursorToIcon( char *szFileName, HINSTANCE hInst, int *W, int *H) -{ HANDLE hDIB; // Handle to DIB memory - HICON hIcon; // Handle to Icon - - if( (hDIB = ReadCur( szFileName, NULL, W, H)) == NULL) - // Read cursor DIB - return NULL; - hIcon = MakeIcon( hDIB, hInst); // make icon from cursor DIB - GlobalFree( hDIB); - return hIcon; -} - -//***************************************************************************** -//* Function : ReadIcon() * -//* Purpose : Reads an icon resource file and extracts the DIB information. * -//* Parameters : char *szFileName - The icon resource file. * -//* Returns : A handle to a DIB. The handle will be NULL if the resource file* -//* is corrupt or if memory cannot be allocated for the DIB info. * -//***************************************************************************** - -HANDLE ReadIcon( char *szFileName, int *W, int *H) -{ ICONFILEHEADER iconFileHead; // ICON file header structure - ICONFILERES iconFileRes; // ICON file resource - WORD cbHead, - cbRes, - cbBits; // Used for reading in file - int hFile; // File handle - LPBITMAPINFO lpDIB; // Pointer to DIB memory - HANDLE hDIB; - int nWidth = GetSystemMetrics( SM_CXICON), - nHeight = GetSystemMetrics( SM_CYICON), - nDirEntries = 0; - - // Open and read the .ICO file header and the first ICONFILERES - hFile = _lopen( szFileName, OF_READ); - cbHead = _lread( hFile, (LPSTR)&iconFileHead, sizeof(ICONFILEHEADER)); - cbRes = _lread( hFile, (LPSTR)&iconFileRes, sizeof(ICONFILERES)); - ++nDirEntries; - - if((cbHead != sizeof( ICONFILEHEADER)) || (cbRes != sizeof( ICONFILERES))) - return NULL; - - // Verify that it's an .ICON file - if( iconFileHead.wResourceType != 1) - return NULL; - - // inserted by P.S. - while( (nDirEntries < iconFileHead.wResourceCount) && - ((iconFileRes.bWidth != nWidth) || (iconFileRes.bHeight != nHeight))) - { - cbRes = _lread( hFile, (LPSTR )&iconFileRes, sizeof( ICONFILERES)); - if(cbRes != sizeof( ICONFILERES)) - return NULL; - else - ++nDirEntries; - } - - if(W != 0) - *W = iconFileRes.bWidth; - if(H != 0) - *H = iconFileRes.bHeight; - - // Allocate and lock memory to read in the DIB - hDIB = GlobalAlloc(GHND, iconFileRes.dwDIBSize); - if(hDIB == NULL) - return NULL; -#ifdef __WINDOWS_386__ - lpDIB = (LPBITMAPINFO)MK_FP32(GlobalLock(hDIB)); -#else - lpDIB = (LPBITMAPINFO)GlobalLock(hDIB); -#endif - - // Now read the DIB portion of the file, which follows the - // end of icon resource table - _llseek( hFile, iconFileRes.dwDIBOffset, 0); - cbBits = _lread( hFile, (LPSTR )lpDIB, (WORD )iconFileRes.dwDIBSize); - - // Done reading file - _lclose(hFile); - - GlobalUnlock( hDIB); - - if( (DWORD )cbBits != iconFileRes.dwDIBSize) - { - GlobalFree( hDIB); - return NULL; - } - return hDIB; -} - -//***************************************************************************** -//* Function : MakeIcon() * -//* Purpose : Creates an icon based on the DIB info. returned by ReadIcon. * -//* Parameters : HANDLE hDIB - A handle to the icon's DIB information. * -//* Returns : A handle to an Icon. NULL is returned if an icon cannot be * -//* successfully created. * -//* Comments : The steps involved in making an icon from a DIB are very * -//* similar to those involved in making a cursor from a DIB. * -//* Steps : 1) Obtain a pointer to the Icon's DIB bits. * -//* 2) Divide the DIB'd height with 2 to account for the fact that the* -//* DIB stores both the XOR and the AND masks, one after the other.* -//* 3) Determine the offset to the XOR bits. * -//* 4) Determine the offset to the AND bits. * -//* 5) Create a device dependent bitmap with the XOR bits. * -//* 6) Obtain the device dependent XOR bitmask and save in memory. * -//* The AND bitmask is monochrome. Monochrome bits are identical * -//* in both the device dependent bitmaps and device independent * -//* bitmaps. So, no need to convert the AND bitmask. * -//* 7) Since a DIB is stored upside down, flip the monochrome AND bits* -//* by scanlines. * -//* 8) Use the XOR and AND bits and create an icon with CreateIcon. * -//***************************************************************************** - -HICON MakeIcon( HANDLE hDIB, HINSTANCE hInst) -{ LPSTR lpXORbits, - lpANDbits; // Pointer to XOR and AND bits - HBITMAP hbmXor; // handle to XOR bitmap - BITMAP bmpXor; // Used to manipulate XOR bitmap - DWORD dwBmpSize; // Size of XOR bitmap - HANDLE hXorDDB; - LPSTR lpXorDDB; - LONG szFlip[32]; - int j, - k; - HDC hDC; - HICON hIcon; - LPBITMAPINFO lpDIB; - - // 1) Obtain a pointer to the Icon's DIB bits. -#ifdef __WINDOWS_386__ - lpDIB = (LPBITMAPINFO )MK_FP32(GlobalLock( hDIB)); -#else - lpDIB = (LPBITMAPINFO )GlobalLock( hDIB); -#endif - - // 2) Divide the DIB'd height with 2 to account for the fact that the - // DIB stores both the XOR and the AND masks, one after the other. - lpDIB->bmiHeader.biHeight /= 2; - - // 3) Determine the offset to the XOR bits. - // To obtain this value, we have to skip the header, and color table - lpXORbits = (LPSTR )lpDIB + (int )lpDIB->bmiHeader.biSize + - (DIBNumColors( (LPSTR )lpDIB) * sizeof( RGBQUAD)); - - // 4) Determine the offset to the AND bits. - // To obtain this value, skip the XOR bits - lpANDbits = lpXORbits + (int )(lpDIB->bmiHeader.biHeight * - (WIDTHBYTES ( lpDIB->bmiHeader.biWidth * - lpDIB->bmiHeader.biBitCount))); - - // Get a hDC so we can create a bitmap compatible with it - hDC = CreateDC( "DISPLAY", NULL, NULL, NULL); - - // 5) Create a device dependent bitmap with the XOR bits. - hbmXor = CreateDIBitmap( hDC, (LPBITMAPINFOHEADER)&(lpDIB->bmiHeader), - CBM_INIT, lpXORbits, lpDIB, DIB_RGB_COLORS); - - GetObject( hbmXor, sizeof(BITMAP), (LPSTR)&bmpXor); - - dwBmpSize = (DWORD )(bmpXor.bmWidthBytes * bmpXor.bmHeight * bmpXor.bmPlanes); - hXorDDB = GlobalAlloc( GHND, dwBmpSize); - if(hXorDDB == NULL) - { - // clean up before quitting - DeleteObject( hbmXor); - DeleteDC( hDC); - GlobalUnlock( hDIB); - return NULL; - } - -#ifdef __WINDOWS_386__ - lpXorDDB = (LPSTR)MK_FP32(GlobalLock( hXorDDB)); -#else - lpXorDDB = (LPSTR)GlobalLock( hXorDDB); -#endif - - // 6) Obtain the device dependent XOR bitmask and save in memory. - // The AND bitmask is monochrome. Monochrome bits are identical - // in both the device dependent bitmaps and device independent - // bitmaps. So, no need to convert the AND bitmask. - GetBitmapBits( hbmXor, dwBmpSize, lpXorDDB); - - // 7) Since a DIB is stored upside down, flip the monochrome AND bits by scanlines. - k = (int )lpDIB->bmiHeader.biHeight; - for( j = 0 ; j < k ; j++, lpANDbits += sizeof(DWORD)) - szFlip[(k - 1) - j] = *(DWORD FAR *)lpANDbits; - - // 8) Use the XOR and AND bits and create an icon with CreateIcon. - hIcon = CreateIcon( hInst, bmpXor.bmWidth, bmpXor.bmHeight, bmpXor.bmPlanes, - bmpXor.bmBitsPixel, (const BYTE *)szFlip, (const BYTE *)lpXorDDB); - - // Clean up before exiting. - DeleteObject( hbmXor); - GlobalUnlock( hXorDDB); - GlobalFree( hXorDDB); - DeleteDC( hDC); - GlobalUnlock( hDIB); - - return hIcon; -} - -// ************************************************************************** - -//***************************************************************************** -//* Function : ReadCursorFile() * -//* Purpose : Reads a cursor resource file and creates a cursor based on that* -//* information. * -//* Parameters : char *szFileName - The cursor resource file. * -//* Returns : A handle to a cursor. The handle will be NULL if a cursor can't* -//* be created for any reason. * -//***************************************************************************** - -HCURSOR ReadCursorFile( char *szFileName, HINSTANCE hInst, int *W, int *H, - int *XHot, int *YHot) -{ HANDLE hDIB; // Handle to DIB memory - HCURSOR hCursor; - POINT ptHotSpot; - - // read cur DIB from file - if( (hDIB = ReadCur( szFileName, (LPPOINT )&ptHotSpot, W, H)) == NULL) - return NULL; - hCursor = MakeCursor( hDIB, (LPPOINT )&ptHotSpot, hInst);//create cur from DIB - if(XHot != 0) - *XHot = ptHotSpot.x; - if(YHot != 0) - *YHot = ptHotSpot.y; - GlobalFree( hDIB); - return ( hCursor); -} - -//***************************************************************************** -//* Function : IconToCursor() * -//* Purpose : Reads an icon resource file and creates a cursor based on that * -//* information. * -//* Parameters : char *szFileName - The icon resource file. * -//* Returns : A handle to a cursor. The handle will be NULL if a cursor can't* -//* be created for any reason. * -//* Comments : An icon may be in color. So, the DIB has to be forced to be * -//* monochrome. * -//***************************************************************************** - -HCURSOR IconToCursor( char *szFileName, HINSTANCE hInst, int XHot, int YHot, - int *W, int *H) -{ HCURSOR hCursor; - HANDLE hDIB; - POINT ptHotSpot; - - if( (hDIB = ReadIcon( szFileName, W, H)) == NULL) - //read icon file to get icon DIB - return NULL; - // Set the hot spot of the cursor - ptHotSpot.x = XHot; - ptHotSpot.y = YHot; - hCursor = MakeCursor( hDIB, (LPPOINT )&ptHotSpot, hInst); - //create cursor from DIB - GlobalFree( hDIB); - return hCursor; -} - -//***************************************************************************** -//* Function : ReadCur() * -//* Purpose : Reads a cursor resource file and extracts the DIB information. * -//* Parameters : LPSTR szFileName - The cursor resource file. * -//* Returns : A handle to a DIB. The handle will be NULL if the resource file* -//* is corrupt or if memory cannot be allocated for the DIB info. * -//***************************************************************************** - -HANDLE ReadCur( char *szFileName, LPPOINT lpptHotSpot, int *W, int *H) -{ CURFILEHEADER curFileHead; // CURSOR file header structure - CURFILERES curFileRes; // CURSOR file resource - WORD cbHead, - cbRes, - cbBits; // Used for reading in file - LPBITMAPINFO lpDIB; // Pointer to DIB memory - int hFile; // Handle to File - HANDLE hDIB; - int nWidth = GetSystemMetrics( SM_CXCURSOR), - nHeight = GetSystemMetrics( SM_CYCURSOR), - nDirEntries = 0; - - // Open and read the .ICO file header and the first ICONFILERES - hFile = _lopen( szFileName, OF_READ); - cbHead = _lread( hFile, (LPSTR )&curFileHead, sizeof( CURFILEHEADER)); - cbRes = _lread( hFile, (LPSTR )&curFileRes, sizeof( CURFILERES)); - ++nDirEntries; - - if((cbHead != sizeof( CURFILEHEADER)) || (cbRes != sizeof( CURFILERES))) - return NULL; - - // Verify that it's an .CUR file - if ((curFileRes.bReserved1 != 0) || (curFileHead.wResourceType != 2)) - return NULL; - - // following added by P.S. - while( (nDirEntries < curFileHead.wResourceCount) && - ((curFileRes.bWidth != nWidth) || (curFileRes.bHeight != nHeight))) - { - cbRes = _lread( hFile, (LPSTR )&curFileRes, sizeof( CURFILERES)); - if(cbRes != sizeof( CURFILERES)) - return NULL; - else - ++nDirEntries; - } - if(W != 0) - *W = curFileRes.bWidth; - if(H != 0) - *H = curFileRes.bHeight; - - - // Allocate & lock memory to read in the DIB - hDIB = GlobalAlloc(GHND, curFileRes.dwDIBSize); - if(hDIB == NULL) - return NULL; - -#ifdef __WINDOWS_386__ - lpDIB = (LPBITMAPINFO )MK_FP32(GlobalLock(hDIB)); -#else - lpDIB = (LPBITMAPINFO )GlobalLock(hDIB); -#endif - - // Now read the DIB portion of the file, which follows the - // end of icon resource table - _llseek( hFile, curFileRes.dwDIBOffset, 0); - cbBits = _lread( hFile, (LPSTR )lpDIB, (WORD )curFileRes.dwDIBSize); - - // Done reading file - _lclose(hFile); - - if((DWORD)cbBits != curFileRes.dwDIBSize) - { - GlobalUnlock( hDIB); - GlobalFree( hDIB); - return NULL; - } - if(lpptHotSpot != NULL) // If it is necessary to know the hot spot - { - lpptHotSpot->x = (int )curFileRes.wXHotspot; - lpptHotSpot->y = (int )curFileRes.wYHotspot; - } - GlobalUnlock( hDIB); - return( hDIB); -} - -//***************************************************************************** -//* Function : ColorDDBToMonoDDB() * -//* Purpose : Converts a color bitmap to a monochrome bitmap. * -//* Parameters : HBITMAP hbm - The color bitmap. * -//* Returns : A handle to a monochrome bitmap. * -//***************************************************************************** -HBITMAP ColorDDBToMonoDDB ( HBITMAP hbm) -{ BITMAP bm; - BITMAPINFOHEADER bi; - LPBITMAPINFOHEADER lpbi; - DWORD dwLen; - HANDLE hdib; - HANDLE h; - HDC hdc; - HBITMAP hbmMono; - - GetObject( hbm, sizeof( bm), (LPSTR )&bm); - - bi.biSize = sizeof( BITMAPINFOHEADER); // size of this structure - bi.biWidth = bm.bmWidth; // bitmap width in pixels - bi.biHeight = bm.bmHeight; // bitmap height in pixels - bi.biPlanes = 1; // # of planes always 1 for DIBs - bi.biBitCount = bm.bmPlanes * bm.bmBitsPixel; // color bits per pixel - bi.biCompression = BI_RGB; // no compression - bi.biSizeImage = 0; // 0 means default size - bi.biXPelsPerMeter = 0; // not used - bi.biYPelsPerMeter = 0; // not used - bi.biClrUsed = 0; // 0 means default colors - bi.biClrImportant = 0; // 0 means defaults - - dwLen = bi.biSize + PaletteSize((LPSTR)&bi); - - hdc = GetDC( NULL); - - hdib = GlobalAlloc( GHND, dwLen); - if (hdib == NULL) - { - ReleaseDC( NULL, hdc); - return NULL; - } - -#ifdef __WINDOWS_386__ - lpbi = (LPBITMAPINFOHEADER )MK_FP32(GlobalLock( hdib)); -#else - lpbi = (LPBITMAPINFOHEADER )GlobalLock( hdib); -#endif - - *lpbi = bi; - - // Call GetDIBits with a NULL lpBits parameter; it will calculate - // the biSizeImage field. - GetDIBits( hdc, hbm, 0, (WORD)bi.biHeight, - NULL, (LPBITMAPINFO)lpbi, DIB_RGB_COLORS); - - bi = *lpbi; - GlobalUnlock( hdib); - - // If the driver did not fill in the biSizeImage field, make one up. - if(bi.biSizeImage == 0) - bi.biSizeImage = WIDTHBYTES( (DWORD )bm.bmWidth * bi.biBitCount) * bm.bmHeight; - - // Reallocate the buffer big enough to hold all the bits. - dwLen = bi.biSize + PaletteSize((LPSTR)&bi) + bi.biSizeImage; - if( (h = GlobalReAlloc( hdib, dwLen, 0)) != 0) - hdib = h; - else - { - GlobalFree( hdib); - ReleaseDC( NULL, hdc); - return NULL; - } - - // Call GetDIBits with a NON-NULL lpBits parameter, to actually - // get the bits this time. - -#ifdef __WINDOWS_386__ - lpbi = (LPBITMAPINFOHEADER )MK_FP32(GlobalLock( hdib)); -#else - lpbi = (LPBITMAPINFOHEADER )GlobalLock( hdib); -#endif - - if( GetDIBits( hdc, hbm, 0, (WORD)bi.biHeight, - (LPSTR)lpbi + (WORD)lpbi->biSize + PaletteSize((LPSTR)lpbi), - (LPBITMAPINFO)lpbi, DIB_RGB_COLORS) == 0) - { - GlobalUnlock( hdib); - hdib = NULL; - ReleaseDC( NULL, hdc); - return NULL; - } - - // Finally, create a monochrome DDB, and put the DIB into - // it. SetDIBits does smart color conversion. - hbmMono = CreateBitmap((WORD)lpbi->biWidth, (WORD)lpbi->biHeight, 1, 1, NULL); - SetDIBits( hdc, hbmMono, (WORD)0, (WORD)lpbi->biHeight, - (LPSTR)lpbi + (int )lpbi->biSize + PaletteSize((LPSTR)lpbi), - (LPBITMAPINFO)lpbi, DIB_RGB_COLORS); - - bi = *lpbi; - GlobalUnlock( hdib); - GlobalFree( hdib); - - ReleaseDC(NULL, hdc); - return hbmMono; -} - -//***************************************************************************** -//* Function : MakeCursor() * -//* Purpose : Creates a cursor based on the DIB info. returned by ReadCursor.* -//* Parameters : HANDLE hDIB - A handle to the cursor's DIB information. * -//* LPPOINT lppt - A pointer to a point struct. indicating the * -//* location of the Cursor's hot spot. * -//* Returns : A handle to a cursor. NULL is returned if a cursor cannot be * -//* successfully created. * -//* Comments : The steps involved in making a cursor from a DIB are very * -//* similar to those involved in making an icon from a DIB. * -//* Steps : 1) Obtain a pointer to the Cursor's DIB bits. * -//* 2) Divide the DIB's height with 2 to account for the fact that the* -//* DIB stores both the XOR and the AND masks, one after the other.* -//* 3) Determine the offset to the XOR bits. * -//* 4) Determine the offset to the AND bits. * -//* 5) Create a device dependent bitmap with the XOR bits. * -//* 6) Obtain the device dependent XOR bitmask and save in memory. * -//* The AND bitmask is monochrome. Monochrome bits are identical * -//* in both the device dependent bitmaps and device independent * -//* bitmaps. So, no need to convert the AND bitmask. * -//* 7) Since a DIB is stored upside down, flip the monochrome AND bits* -//* by scanlines. * -//* 8) Use the XOR and AND bits and create a cursor with CreateCursor.* -//***************************************************************************** - -HCURSOR MakeCursor( HANDLE hDIB, LPPOINT lpptHotSpot, HINSTANCE hInst) -{ LPSTR lpXORbits, - lpANDbits; // Pointer to XOR and AND bits - HBITMAP hbmXor; // handle to XOR bitmap - BITMAP bmpXor; // Used to manipulate XOR bitmap - DWORD dwBmpSize; // Size of XOR bitmap - HCURSOR hCursor; - HANDLE hXorDDB; - LPSTR lpXorDDB; - LONG szFlip[32]; - int j, - k; - HDC hDC; - LPBITMAPINFO lpDIB; - - // 1) Obtain a pointer to the Cursor's DIB bits. -#ifdef __WINDOWS_386__ - lpDIB = (LPBITMAPINFO )MK_FP32(GlobalLock( hDIB)); -#else - lpDIB = (LPBITMAPINFO )GlobalLock( hDIB); -#endif - - // 2) Divide the DIB's height with 2 to account for the fact that the - // DIB stores both the XOR and the AND masks, one after the other. - lpDIB->bmiHeader.biHeight /= 2; - - // 3) Determine the offset to the XOR bits. - // To obtain this value, we have to skip the header, and color table - lpXORbits = (LPSTR )lpDIB + (int )lpDIB->bmiHeader.biSize + - (DIBNumColors((LPSTR)lpDIB) * sizeof(RGBQUAD)); - - // 4) Determine the offset to the AND bits - // To obtain this value, skip the XOR bits - lpANDbits = lpXORbits + (int )( lpDIB->bmiHeader.biHeight * - (WIDTHBYTES( lpDIB->bmiHeader.biWidth * - lpDIB->bmiHeader.biBitCount))); - - // Get a hDC so we can create a bitmap compatible with it - hDC = CreateDC( "DISPLAY", NULL, NULL, NULL); - - // 5) Create a device dependent bitmap with the XOR bits. - hbmXor = CreateBitmap( (int )lpDIB->bmiHeader.biWidth, - (int )lpDIB->bmiHeader.biHeight, 1, 1, NULL); - SetDIBits( hDC, hbmXor, 0, (WORD)lpDIB->bmiHeader.biHeight, lpXORbits, - lpDIB, DIB_RGB_COLORS); - GetObject( hbmXor, sizeof( BITMAP), (LPSTR )&bmpXor); - - dwBmpSize = (DWORD )(bmpXor.bmWidthBytes * bmpXor.bmHeight * bmpXor.bmPlanes); - hXorDDB = GlobalAlloc( GHND, dwBmpSize); - if(hXorDDB == NULL) - { // clean up before quitting - DeleteObject( hbmXor); - DeleteDC( hDC); - GlobalUnlock( hDIB); - return NULL; - } -#ifdef __WINDOWS_386__ - lpXorDDB = (LPSTR)MK_FP32(GlobalLock( hXorDDB)); -#else - lpXorDDB = (LPSTR)GlobalLock( hXorDDB); -#endif - - // 6) Obtain the device dependent XOR bitmask and save in memory. - // The AND bitmask is monochrome. Monochrome bits are identical - // in both the device dependent bitmaps and device independent - // bitmaps. So, no need to convert the AND bitmask. - GetBitmapBits( hbmXor, dwBmpSize, lpXorDDB); - - // 7) Since a DIB is stored upside down, flip the monochrome AND bits by scanlines. - k = (int)lpDIB->bmiHeader.biHeight; - for( j = 0 ; j < k; j++, lpANDbits += sizeof( DWORD)) - szFlip[(k - 1) - j] = *(DWORD FAR *)lpANDbits; - - // 8) Use the XOR and AND bits and create a cursor with CreateCursor. - hCursor = CreateCursor( hInst, lpptHotSpot->x, lpptHotSpot->y, - bmpXor.bmWidth, bmpXor.bmHeight, (LPSTR)szFlip, lpXorDDB); - - // Clean up before exiting. - DeleteObject( hbmXor); - GlobalUnlock( hXorDDB); - GlobalFree( hXorDDB); - DeleteDC( hDC); - GlobalUnlock( hDIB); - - return hCursor; -} - -//***************************************************************************** -//* Function : PaletteSize() * -//* Purpose : Calculates the palette size in bytes. If the info. block is of * -//* the BITMAPCOREHEADER type, the number of colors is multiplied * -//* by sizeof(RGBTRIPLE) to give the palette size, otherwise the * -//* number of colors is multiplied by sizeof(RGBQUAD). * -//* Parameters : LPSTR pv - pointer to the BITMAPINFOHEADER * -//* Returns : The size of the palette. * -//***************************************************************************** - -WORD PaletteSize( LPSTR pv) -{ LPBITMAPINFOHEADER lpbi; - WORD NumColors; - - lpbi = (LPBITMAPINFOHEADER )pv; - NumColors = DIBNumColors((LPSTR )lpbi); - - if(lpbi->biSize == sizeof( BITMAPCOREHEADER)) // OS/2 style DIBs - return NumColors * sizeof( RGBTRIPLE); - else - return NumColors * sizeof( RGBQUAD); -} - -//***************************************************************************** -//* Function : DIBNumColors() * -//* Purpose : This function calculates the number of colors in the DIB's * -//* color table by finding the bits per pixel for the DIB (whether * -//* Win3.0 or OS/2-style DIB). If bits per pixel is 1: colors=2, * -//* if 4: colors=16, if 8: colors=256, if 24, no colors in color * -//* table. * -//* Parameters : LPSTR lpbi - pointer to packed-DIB memory block. * -//* Returns : The number of colors in the color table. * -//***************************************************************************** - -WORD DIBNumColors ( LPSTR pv) -{ int bits; - BITMAPINFOHEADER *lpbi; - BITMAPCOREHEADER *lpbc; - - lpbi = ((BITMAPINFOHEADER* )pv); // assume win 3.0 style DIBs - lpbc = ((BITMAPCOREHEADER* )pv); // assume OS/2 style DIBs - - // With the BITMAPINFO format headers, the size of the palette - // is in biClrUsed, whereas in the BITMAPCORE - style headers, it - // is dependent on the bits per pixel ( = 2 raised to the power of - // bits/pixel). - - if(lpbi->biSize != sizeof( BITMAPCOREHEADER)) - { - if(lpbi->biClrUsed != 0) - return (WORD)lpbi->biClrUsed; - bits = lpbi->biBitCount; - } - else - bits = lpbc->bcBitCount; - - switch( bits) - { - case 1: - return 2; - case 4: - return 16; - case 8: - return 256; - default: - // A 24 bitcount DIB has no color table - return 0; - } -} - -#if 0 -// ****************************************************************** -BOOL fGetXPixmap( BOOL fIsIcon, char *szFileName, HINSTANCE hInst, - char cData[], int &width, int &height) -{ HDC hdc, - hdcMemory; - HBITMAP hbmp, - holdbmp; - int i, - j, - w, - h; - BYTE *s, - cByte, - cMask; - COLORREF rgb; - HCURSOR hIconOrCursor = fIsIcon ? - IconToCursor( szFileName, hInst, 0, 0, &w, &h) - : ReadCursorFile( szFileName, hInst, &w, &h, 0, 0); - int sum; - - if(hIconOrCursor == 0) - return FALSE; - - hdc = GetDC( GetDesktopWindow()); - hdcMemory = CreateCompatibleDC( hdc); - hbmp = CreateCompatibleBitmap( hdc, w, h); - holdbmp = SelectObject( hdcMemory, hbmp); - PatBlt( hdcMemory, 0, 0, w, h, BLACKNESS); // or use WHITENESS?? - DrawIcon( hdcMemory, 0, 0, hIconOrCursor); //using HCURSOR with DrawIcon is OK - - // the data retrieval follows: - width = w; - height = h; - for( j = 0, s = (BYTE *)cData ; j < h ; ++j) - for( i = 0 ; i < w ; ++i, cMask >>= 1) - { - if( (i % 8) == 0) - { - cByte = 0; - cMask = 0x80; - } - rgb = GetPixel( hdcMemory, i, j); - sum = (int )(rgb & 0xFFL); - sum += (int )((rgb & 0xFF00L) >> 8); - sum += (int )((rgb & 0xFF0000L) >> 16); - if(sum > 381) - cByte = cByte | cMask; - if( (i % 8) == 7) - { - *s = cByte; - ++s; - } - } - SelectObject( hdcMemory, holdbmp); - DeleteDC( hdcMemory); - ReleaseDC( GetDesktopWindow(), hdc); - DestroyCursor( hIconOrCursor); - DeleteObject( hbmp); - return TRUE; -} -#endif - -// Added from scavenged internet code, JACS 23/6/95 -HCURSOR MakeCursorFromBitmap(HINSTANCE hInst, HBITMAP hBitmap, POINT *pPoint) -{ - HDC hDCColor, hDCMono; - HDC hDC; - HBITMAP hBmpOld; - HBITMAP hAndBmp; - HBITMAP hXorBmp; - HCURSOR hNewCursor; - BITMAP bm; - DWORD dwBytes; - NPSTR andBits; - NPSTR xorBits; - - hDC = GetDC(NULL); - hDCColor = CreateCompatibleDC(hDC); - hDCMono = CreateCompatibleDC(hDC); - hAndBmp = CreateCompatibleBitmap(hDCMono, 32, 32); - hXorBmp = CreateCompatibleBitmap(hDCMono, 32, 32); - - hBmpOld = (HBITMAP) SelectObject(hDCColor, hBitmap); - SelectObject(hDCMono, hAndBmp); - SetBkColor(hDCColor, RGB(191, 191, 191)); - - BitBlt(hDCMono, 0, 0, 32, 32, hDCColor, 0, 0, SRCCOPY); - - // Now we have the AND Mask - - GetObject(hAndBmp, sizeof(BITMAP), (LPSTR) &bm); - dwBytes = (bm.bmWidthBytes * bm.bmHeight); - andBits = (NPSTR) LocalAlloc(LPTR, dwBytes); - GetBitmapBits(hAndBmp, dwBytes, andBits); - - SelectObject(hDCMono, hXorBmp); - SetBkColor(hDCColor, RGB(0, 0, 0)); - - BitBlt(hDCMono, 0, 0, 32, 32, hDCColor, 0, 0, SRCCOPY); - - // Now we have the XOR Mask - - GetObject(hXorBmp, sizeof(BITMAP), (LPSTR) &bm); - dwBytes = (bm.bmWidthBytes * bm.bmHeight); - xorBits = (NPSTR) LocalAlloc(LPTR, dwBytes); - GetBitmapBits(hXorBmp, dwBytes, xorBits); - - if (pPoint->x > 32) - pPoint->x = 32; - if (pPoint->y > 32) - pPoint->y = 32; - - hNewCursor = CreateCursor(hInst, - pPoint->x, pPoint->y, 32, 32, andBits, xorBits); - - SelectObject(hDCColor, hBmpOld); - SelectObject(hDCMono, hBmpOld); - DeleteDC(hDCColor); - DeleteDC(hDCMono); - DeleteObject(hAndBmp); - DeleteObject(hXorBmp); - ReleaseDC(NULL, hDC); -#ifndef __WIN32__ - LocalUnlock(LocalHandle((WORD) andBits)); - LocalUnlock(LocalHandle((WORD) xorBits)); - LocalFree(LocalHandle((WORD) andBits)); - LocalFree(LocalHandle((WORD) xorBits)); -#else - LocalUnlock(LocalHandle((LPCVOID) andBits)); - LocalUnlock(LocalHandle((LPCVOID) xorBits)); - LocalFree(LocalHandle((LPCVOID) andBits)); - LocalFree(LocalHandle((LPCVOID) xorBits)); -#endif - return hNewCursor; -} - -/* - * This doesn't work: just gives us a grey square. Ideas, anyone? - */ - -HICON MakeIconFromBitmap(HINSTANCE hInst, HBITMAP hBitmap) -{ - HDC hDCColor, hDCMono; - HDC hDC; - HBITMAP hBmpOld; - HBITMAP hAndBmp; - HBITMAP hXorBmp; - HICON hNewIcon; - BITMAP bm; - DWORD dwBytes; - NPSTR andBits; - NPSTR xorBits; - - hDC = GetDC(NULL); - hDCColor = CreateCompatibleDC(hDC); - hDCMono = CreateCompatibleDC(hDC); - hAndBmp = CreateCompatibleBitmap(hDCMono, 32, 32); - hXorBmp = CreateCompatibleBitmap(hDCMono, 32, 32); - - hBmpOld = (HBITMAP) SelectObject(hDCColor, hBitmap); - SelectObject(hDCMono, hAndBmp); - SetBkColor(hDCColor, RGB(191, 191, 191)); - - BitBlt(hDCMono, 0, 0, 32, 32, hDCColor, 0, 0, SRCCOPY); - - // Now we have the AND Mask - - GetObject(hAndBmp, sizeof(BITMAP), (LPSTR) &bm); - dwBytes = (bm.bmWidthBytes * bm.bmHeight); - andBits = (NPSTR) LocalAlloc(LPTR, dwBytes); - GetBitmapBits(hAndBmp, dwBytes, andBits); - - SelectObject(hDCMono, hXorBmp); - SetBkColor(hDCColor, RGB(0, 0, 0)); - - BitBlt(hDCMono, 0, 0, 32, 32, hDCColor, 0, 0, SRCCOPY); - - // Now we have the XOR Mask - - GetObject(hXorBmp, sizeof(BITMAP), (LPSTR) &bm); - dwBytes = (bm.bmWidthBytes * bm.bmHeight); - xorBits = (NPSTR) LocalAlloc(LPTR, dwBytes); - GetBitmapBits(hXorBmp, dwBytes, xorBits); - - hNewIcon = CreateIcon(hInst, 1, 4, 32, 32, (unsigned char *)andBits, (unsigned char *)xorBits); - - SelectObject(hDCColor, hBmpOld); - SelectObject(hDCMono, hBmpOld); - DeleteDC(hDCColor); - DeleteDC(hDCMono); - DeleteObject(hAndBmp); - DeleteObject(hXorBmp); - ReleaseDC(NULL, hDC); -#ifndef __WIN32__ - LocalUnlock(LocalHandle((WORD) andBits)); - LocalUnlock(LocalHandle((WORD) xorBits)); - LocalFree(LocalHandle((WORD) andBits)); - LocalFree(LocalHandle((WORD) xorBits)); -#else - LocalUnlock(LocalHandle((LPCVOID) andBits)); - LocalUnlock(LocalHandle((LPCVOID) xorBits)); - LocalFree(LocalHandle((LPCVOID) andBits)); - LocalFree(LocalHandle((LPCVOID) xorBits)); -#endif - return hNewIcon; -} - diff --git a/src/msw/cursor.cpp b/src/msw/cursor.cpp deleted file mode 100644 index 8eb388fae4..0000000000 --- a/src/msw/cursor.cpp +++ /dev/null @@ -1,279 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: cursor.cpp -// Purpose: wxCursor class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "cursor.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/setup.h" -#include "wx/list.h" -#include "wx/utils.h" -#include "wx/app.h" -#include "wx/cursor.h" -#endif - -#include "wx/msw/private.h" -#include "wx/msw/dib.h" - -#include "assert.h" - -#if USE_XPM_IN_MSW -#define FOR_MSW 1 -#include "..\..\contrib\wxxpm\libxpm.34b\lib\xpm34.h" -#endif - -#if USE_RESOURCE_LOADING_IN_MSW -#include "wx/msw/curico.h" -#include "wx/msw/curicop.h" -#endif - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxBitmap) -#endif - -wxCursorRefData::wxCursorRefData(void) -{ - m_width = 32; m_height = 32; - m_hCursor = 0 ; - m_destroyCursor = FALSE; -} - -wxCursorRefData::~wxCursorRefData(void) -{ - if ( m_hCursor && m_destroyCursor) - ::DestroyCursor((HICON) m_hCursor); -} - -// Cursors -wxCursor::wxCursor(void) -{ -} - -wxCursor::wxCursor(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSED(height), - int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY), const char WXUNUSED(maskBits)[]) -{ -} - -wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int hotSpotY) -{ - m_refData = new wxIconRefData; - - M_CURSORDATA->m_destroyCursor = FALSE; - M_CURSORDATA->m_hCursor = 0; - M_CURSORDATA->m_ok = FALSE; - if (flags & wxBITMAP_TYPE_CUR_RESOURCE) - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), cursor_file); - if (M_CURSORDATA->m_hCursor) - M_CURSORDATA->m_ok = TRUE; - else - M_CURSORDATA->m_ok = FALSE; - } - else if (flags & wxBITMAP_TYPE_CUR) - { -#if USE_RESOURCE_LOADING_IN_MSW - M_CURSORDATA->m_hCursor = (WXHCURSOR) ReadCursorFile((char *)(const char *)cursor_file, wxGetInstance(), &M_CURSORDATA->m_width, &M_CURSORDATA->m_height); - M_CURSORDATA->m_destroyCursor = TRUE; -#endif - } - else if (flags & wxBITMAP_TYPE_ICO) - { -#if USE_RESOURCE_LOADING_IN_MSW - M_CURSORDATA->m_hCursor = (WXHCURSOR) IconToCursor((char *)(const char *)cursor_file, wxGetInstance(), hotSpotX, hotSpotY, &M_CURSORDATA->m_width, &M_CURSORDATA->m_height); - M_CURSORDATA->m_destroyCursor = TRUE; -#endif - } - else if (flags & wxBITMAP_TYPE_BMP) - { -#if USE_RESOURCE_LOADING_IN_MSW - HBITMAP hBitmap = 0; - HPALETTE hPalette = 0; - bool success = ReadDIB((char *)(const char *)cursor_file, &hBitmap, &hPalette) != 0; - if (!success) - return; - if (hPalette) - DeleteObject(hPalette); - POINT pnt; - pnt.x = hotSpotX; - pnt.y = hotSpotY; - M_CURSORDATA->m_hCursor = (WXHCURSOR) MakeCursorFromBitmap(wxGetInstance(), hBitmap, &pnt); - M_CURSORDATA->m_destroyCursor = TRUE; - DeleteObject(hBitmap); - if (M_CURSORDATA->m_hCursor) - M_CURSORDATA->m_ok = TRUE; -#endif - } -} - -// Cursors by stock number -wxCursor::wxCursor(int cursor_type) -{ - m_refData = new wxIconRefData; - - switch (cursor_type) - { - case wxCURSOR_WAIT: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_WAIT); - break; - case wxCURSOR_IBEAM: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_IBEAM); - break; - case wxCURSOR_CROSS: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_CROSS); - break; - case wxCURSOR_SIZENWSE: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_SIZENWSE); - break; - case wxCURSOR_SIZENESW: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_SIZENESW); - break; - case wxCURSOR_SIZEWE: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_SIZEWE); - break; - case wxCURSOR_SIZENS: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_SIZENS); - break; - case wxCURSOR_CHAR: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_ARROW); - break; - } - case wxCURSOR_HAND: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_HAND"); - break; - } - case wxCURSOR_BULLSEYE: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_BULLSEYE"); - break; - } - case wxCURSOR_PENCIL: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_PENCIL"); - break; - } - case wxCURSOR_MAGNIFIER: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_MAGNIFIER"); - break; - } - case wxCURSOR_NO_ENTRY: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_NO_ENTRY"); - break; - } - case wxCURSOR_LEFT_BUTTON: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_ARROW); - break; - } - case wxCURSOR_RIGHT_BUTTON: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_ARROW); - break; - } - case wxCURSOR_MIDDLE_BUTTON: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_ARROW); - break; - } - case wxCURSOR_SIZING: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_SIZING"); - break; - } - case wxCURSOR_WATCH: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_WATCH"); - break; - } - case wxCURSOR_SPRAYCAN: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_ROLLER"); - break; - } - case wxCURSOR_PAINT_BRUSH: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_PBRUSH"); - break; - } - case wxCURSOR_POINT_LEFT: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_PLEFT"); - break; - } - case wxCURSOR_POINT_RIGHT: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_PRIGHT"); - break; - } - case wxCURSOR_QUESTION_ARROW: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_QARROW"); - break; - } - case wxCURSOR_BLANK: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_BLANK"); - break; - } - default: - case wxCURSOR_ARROW: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_ARROW); - break; - } -} - -wxCursor::~wxCursor(void) -{ -// FreeResource(TRUE); -} - -bool wxCursor::FreeResource(bool force) -{ - if (M_CURSORDATA && M_CURSORDATA->m_hCursor && M_CURSORDATA->m_destroyCursor) - { - DestroyCursor((HCURSOR) M_CURSORDATA->m_hCursor); - M_CURSORDATA->m_hCursor = 0; - } - return TRUE; -} - -void wxCursor::SetHCURSOR(WXHCURSOR cursor) -{ - if ( !M_CURSORDATA ) - m_refData = new wxCursorRefData; - - M_CURSORDATA->m_hCursor = cursor; -} - -// Global cursor setting -void wxSetCursor(const wxCursor& cursor) -{ - extern wxCursor *g_globalCursor; - if ( g_globalCursor ) - (*g_globalCursor) = cursor; - - if (cursor.Ok() && cursor.GetHCURSOR()) - ::SetCursor((HCURSOR) cursor.GetHCURSOR()); -} - - diff --git a/src/msw/data.cpp b/src/msw/data.cpp deleted file mode 100644 index 0b9cb427f9..0000000000 --- a/src/msw/data.cpp +++ /dev/null @@ -1,734 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: data.cpp -// Purpose: Various data -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#define _MAXPATHLEN 500 - -// Useful buffer, initialized in wxCommonInit -char *wxBuffer = NULL; - -// Windows List -wxList wxTopLevelWindows; - -// List of windows pending deletion -wxList wxPendingDelete; - -// Current cursor, in order to hang on to -// cursor handle when setting the cursor globally -wxCursor *g_globalCursor = NULL; - -// Message Strings for Internationalization -char **wx_msg_str = (char**)NULL; - -// Custom OS version, as optionally placed in wx.ini/.wxrc -// Currently this can be Win95, Windows, Win32s, WinNT. -// For some systems, you can't tell until run-time what services you -// have. See wxGetOsVersion, which uses this string if present. -char *wxOsVersion = NULL; - -int wxPageNumber; - -// GDI Object Lists -wxBrushList *wxTheBrushList = NULL; -wxPenList *wxThePenList = NULL; -wxFontList *wxTheFontList = NULL; -wxBitmapList *wxTheBitmapList = NULL; - -wxColourDatabase *wxTheColourDatabase = NULL; - -// Stock objects -wxFont *wxNORMAL_FONT; -wxFont *wxSMALL_FONT; -wxFont *wxITALIC_FONT; -wxFont *wxSWISS_FONT; -wxPen *wxRED_PEN; - -wxPen *wxCYAN_PEN; -wxPen *wxGREEN_PEN; -wxPen *wxBLACK_PEN; -wxPen *wxWHITE_PEN; -wxPen *wxTRANSPARENT_PEN; -wxPen *wxBLACK_DASHED_PEN; -wxPen *wxGREY_PEN; -wxPen *wxMEDIUM_GREY_PEN; -wxPen *wxLIGHT_GREY_PEN; - -wxBrush *wxBLUE_BRUSH; -wxBrush *wxGREEN_BRUSH; -wxBrush *wxWHITE_BRUSH; -wxBrush *wxBLACK_BRUSH; -wxBrush *wxTRANSPARENT_BRUSH; -wxBrush *wxCYAN_BRUSH; -wxBrush *wxRED_BRUSH; -wxBrush *wxGREY_BRUSH; -wxBrush *wxMEDIUM_GREY_BRUSH; -wxBrush *wxLIGHT_GREY_BRUSH; - -wxColour *wxBLACK; -wxColour *wxWHITE; -wxColour *wxRED; -wxColour *wxBLUE; -wxColour *wxGREEN; -wxColour *wxCYAN; -wxColour *wxLIGHT_GREY; - -wxCursor *wxSTANDARD_CURSOR = NULL; -wxCursor *wxHOURGLASS_CURSOR = NULL; -wxCursor *wxCROSS_CURSOR = NULL; - -// 'Null' objects -wxAcceleratorTable wxNullAcceleratorTable; -wxBitmap wxNullBitmap; -wxIcon wxNullIcon; -wxCursor wxNullCursor; -wxPen wxNullPen; -wxBrush wxNullBrush; -wxPalette wxNullPalette; -wxFont wxNullFont; -wxColour wxNullColour; - -// Default window names -const char *wxButtonNameStr = "button"; -const char *wxCanvasNameStr = "canvas"; -const char *wxCheckBoxNameStr = "check"; -const char *wxChoiceNameStr = "choice"; -const char *wxComboBoxNameStr = "comboBox"; -const char *wxDialogNameStr = "dialog"; -const char *wxFrameNameStr = "frame"; -const char *wxGaugeNameStr = "gauge"; -const char *wxStaticBoxNameStr = "groupBox"; -const char *wxListBoxNameStr = "listBox"; -const char *wxStaticTextNameStr = "message"; -const char *wxStaticBitmapNameStr = "message"; -const char *wxMultiTextNameStr = "multitext"; -const char *wxPanelNameStr = "panel"; -const char *wxRadioBoxNameStr = "radioBox"; -const char *wxRadioButtonNameStr = "radioButton"; -const char *wxBitmapRadioButtonNameStr = "radioButton"; -const char *wxScrollBarNameStr = "scrollBar"; -const char *wxSliderNameStr = "slider"; -const char *wxStaticNameStr = "static"; -const char *wxTextCtrlWindowNameStr = "textWindow"; -const char *wxTextCtrlNameStr = "text"; -const char *wxVirtListBoxNameStr = "virtListBox"; -const char *wxButtonBarNameStr = "buttonbar"; -const char *wxEnhDialogNameStr = "Shell"; -const char *wxToolBarNameStr = "toolbar"; -const char *wxStatusLineNameStr = "status_line"; -const char *wxEmptyString = ""; -const char *wxGetTextFromUserPromptStr = "Input Text"; -const char *wxMessageBoxCaptionStr = "Message"; -const char *wxFileSelectorPromptStr = "Select a file"; -const char *wxFileSelectorDefaultWildcardStr = "*.*"; -const char *wxInternalErrorStr = "wxWindows Internal Error"; -const char *wxFatalErrorStr = "wxWindows Fatal Error"; - -// See wx/utils.h -const char *wxFloatToStringStr = "%.2f"; -const char *wxDoubleToStringStr = "%.2f"; - -#ifdef __WXMSW__ -const char *wxUserResourceStr = "TEXT"; -#endif - -#if USE_POSTSCRIPT -wxPrintPaperDatabase* wxThePrintPaperDatabase = NULL; -#endif - -#if USE_SHARED_LIBRARY -/* - * For wxWindows to be made into a dynamic library (e.g. Sun), - * all IMPLEMENT_... macros must be in one place. - * But normally, the definitions are in the appropriate places. - */ - -// Hand-coded IMPLEMENT... macro for wxObject (define static data) -wxClassInfo wxObject::classwxObject("wxObject", NULL, NULL, sizeof(wxObject), NULL); -wxClassInfo *wxClassInfo::first = NULL; -wxClassInfo wxClassInfo::classTable(wxKEY_STRING); - -#include "wx/button.h" -#include "wx/bmpbuttn.h" -IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton) - -#include "wx/checkbox.h" -IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox) - -#include "wx/choice.h" -IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl) - -#if USE_CLIPBOARD -#include "wx/clipbrd.h" -IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject) -IMPLEMENT_ABSTRACT_CLASS(wxClipboardClient, wxObject) -#endif - -#if USE_COMBOBOX -#include "wx/combobox.h" -IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl) -#endif - -#include "wx/dc.h" -#include "wx/dcmemory.h" -#include "wx/dcclient.h" -#include "wx/dcscreen.h" -IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC) - -#if defined(__WXMSW__) -#include "wx/dcprint.h" -IMPLEMENT_CLASS(wxPrinterDC, wxDC) -#endif - -#include "wx/dialog.h" -IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxWindow) - -#include "wx/frame.h" -IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow) - -#include "wx/mdi.h" -IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame, wxFrame) -IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame, wxFrame) -IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxWindow) - -#include "wx/cmndata.h" -IMPLEMENT_DYNAMIC_CLASS(wxColourData, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxFontData, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxPrintData, wxObject) - -#include "wx/colordlg.h" -#include "wx/fontdlg.h" - -#if !defined(__WXMSW__) || USE_GENERIC_DIALOGS_IN_MSW -#include "wx/generic/colordlg.h" -#include "wx/generic/fontdlg.h" -IMPLEMENT_DYNAMIC_CLASS(wxGenericColourDialog, wxDialog) -IMPLEMENT_DYNAMIC_CLASS(wxGenericFontDialog, wxDialog) -#endif - -// X defines wxColourDialog to be wxGenericColourDialog -#ifndef __X__ -IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog) -IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog) -#endif - -#include "wx/gdicmn.h" -#include "wx/pen.h" -#include "wx/brush.h" -#include "wx/font.h" -#include "wx/palette.h" -#include "wx/icon.h" -#include "wx/cursor.h" - -IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject) -IMPLEMENT_CLASS(wxColourDatabase, wxList) -IMPLEMENT_DYNAMIC_CLASS(wxFontList, wxList) -IMPLEMENT_DYNAMIC_CLASS(wxPenList, wxList) -IMPLEMENT_DYNAMIC_CLASS(wxBrushList, wxList) -IMPLEMENT_DYNAMIC_CLASS(wxBitmapList, wxList) - -/* -#if (!USE_TYPEDEFS) -IMPLEMENT_DYNAMIC_CLASS(wxPoint, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxRealPoint, wxObject) -#endif -*/ - -#include "wx/hash.h" -IMPLEMENT_DYNAMIC_CLASS(wxHashTable, wxObject) - -#include "wx/helpbase.h" -IMPLEMENT_CLASS(wxHelpControllerBase, wxObject) - -#if USE_HELP - -#ifdef __WXMSW__ -#include "wx/msw/helpwin.h" -IMPLEMENT_DYNAMIC_CLASS(wxWinHelpController, wxHelpControllerBase) -#endif - -// Generic wxHelp controller -IMPLEMENT_CLASS(wxXLPHelpController, wxHelpControllerBase) - -#ifdef __WXMSW__ -IMPLEMENT_CLASS(wxXLPHelpClient, wxDDEClient) -IMPLEMENT_CLASS(wxXLPHelpConnection, wxDDEConnection) -#else -IMPLEMENT_CLASS(wxXLPHelpClient, wxTCPClient) -IMPLEMENT_CLASS(wxXLPHelpConnection, wxTCPConnection) -#endif - -#endif - -IMPLEMENT_DYNAMIC_CLASS(wxString, wxObject) - -#include "wx/list.h" -IMPLEMENT_DYNAMIC_CLASS(wxNode, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxList, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxStringList, wxList) - -#if USE_PRINTING_ARCHITECTURE -#include "wx/print.h" -IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog, wxDialog) -IMPLEMENT_DYNAMIC_CLASS(wxPrinterBase, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter, wxPrinterBase) -IMPLEMENT_DYNAMIC_CLASS(wxWindowsPrinter, wxPrinterBase) -IMPLEMENT_ABSTRACT_CLASS(wxPrintout, wxObject) -IMPLEMENT_CLASS(wxPreviewCanvas, wxWindow) -IMPLEMENT_CLASS(wxPreviewControlBar, wxWindow) -IMPLEMENT_CLASS(wxPreviewFrame, wxFrame) -IMPLEMENT_CLASS(wxPrintPreviewBase, wxObject) -IMPLEMENT_CLASS(wxPostScriptPrintPreview, wxPrintPreviewBase) -IMPLEMENT_CLASS(wxWindowsPrintPreview, wxPrintPreviewBase) -IMPLEMENT_CLASS(wxGenericPrintDialog, wxDialog) -IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialog) -#endif - -#if USE_POSTSCRIPT -#include "wx/postscrp.h" -IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxPageSetupData, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase, wxList) -#endif - -#if USE_WX_RESOURCES -#include "wx/resource.h" -IMPLEMENT_DYNAMIC_CLASS(wxItemResource, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxResourceTable, wxHashTable) -#endif - -#include "wx/event.h" -IMPLEMENT_DYNAMIC_CLASS(wxEvtHandler, wxObject) -IMPLEMENT_ABSTRACT_CLASS(wxEvent, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxCommandEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxScrollEvent, wxCommandEvent) -IMPLEMENT_DYNAMIC_CLASS(wxMouseEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxKeyEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxSizeEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxPaintEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxEraseEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxMoveEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxFocusEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxCloseEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxShowEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxMaximizeEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxIconizeEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxMenuEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxJoystickEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxDropFilesEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxActivateEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxInitDialogEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxSysColourChangedEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxIdleEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxUpdateUIEvent, wxEvent) -IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent, wxEvent) - -#include "wx/utils.h" -IMPLEMENT_DYNAMIC_CLASS(wxPathList, wxList) - -// IMPLEMENT_DYNAMIC_CLASS(wxRect, wxObject) - -#include "wx/process.h" -IMPLEMENT_DYNAMIC_CLASS(wxProcess, wxEvtHandler) - -#if USE_TIMEDATE -#include "wx/date.h" -IMPLEMENT_DYNAMIC_CLASS(wxDate, wxObject) -#endif - -#if USE_DOC_VIEW_ARCHITECTURE -#include "wx/docview.h" -//IMPLEMENT_ABSTRACT_CLASS(wxDocItem, wxObject) -IMPLEMENT_ABSTRACT_CLASS(wxDocument, wxEvtHandler) -IMPLEMENT_ABSTRACT_CLASS(wxView, wxEvtHandler) -IMPLEMENT_ABSTRACT_CLASS(wxDocTemplate, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxDocManager, wxEvtHandler) -IMPLEMENT_CLASS(wxDocChildFrame, wxFrame) -IMPLEMENT_CLASS(wxDocParentFrame, wxFrame) -#if USE_PRINTING_ARCHITECTURE -IMPLEMENT_DYNAMIC_CLASS(wxDocPrintout, wxPrintout) -#endif -IMPLEMENT_CLASS(wxCommand, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxFileHistory, wxObject) -#endif - -#if USE_CONSTRAINTS -#include "wx/layout.h" -IMPLEMENT_DYNAMIC_CLASS(wxIndividualLayoutConstraint, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxLayoutConstraints, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxSizer, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxRowColSizer, wxSizer) -#endif - -#if USE_TOOLBAR -#include "wx/tbarbase.h" -IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxToolBarBase, wxControl) - -#include "wx/tbarsmpl.h" -IMPLEMENT_DYNAMIC_CLASS(wxToolBarSimple, wxToolBarBase) - -#ifdef __WXMSW__ -#include "wx/tbarmsw.h" -IMPLEMENT_DYNAMIC_CLASS(wxToolBarMSW, wxToolBarBase) - -#include "wx/tbar95.h" -IMPLEMENT_DYNAMIC_CLASS(wxToolBar95, wxToolBarBase) -#endif - -#endif - -#include "wx/statusbr.h" - -IMPLEMENT_DYNAMIC_CLASS(wxStatusBar, wxWindow) - -BEGIN_EVENT_TABLE(wxStatusBar, wxWindow) - EVT_PAINT(wxStatusBar::OnPaint) - EVT_SYS_COLOUR_CHANGED(wxStatusBar::OnSysColourChanged) -END_EVENT_TABLE() - -#if USE_TIMEDATE -#include "wx/time.h" -IMPLEMENT_DYNAMIC_CLASS(wxTime, wxObject) -#endif - -#if !USE_GNU_WXSTRING -#include "wx/string.h" -IMPLEMENT_DYNAMIC_CLASS(wxString, wxObject) -#endif - -#ifdef __WXMOTIF__ -IMPLEMENT_DYNAMIC_CLASS(wxXColormap, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxXFont, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxXCursor, wxObject) -#endif -IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) -IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject) -IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject) -IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject) -IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap) -IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxBitmap) -IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject) -IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject) - -// This will presumably be implemented on other platforms too -#ifdef __WXMSW__ -IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler, wxBitmapHandler) -IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler, wxBitmapHandler) -IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler, wxBitmapHandler) -IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler, wxBitmapHandler) -IMPLEMENT_DYNAMIC_CLASS(wxICOFileHandler, wxBitmapHandler) -IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler, wxBitmapHandler) -#endif - -#include "wx/statbox.h" -IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl) - -#if USE_IPC -#include "wx/dde.h" -IMPLEMENT_CLASS(wxServerBase, wxObject) -IMPLEMENT_CLASS(wxClientBase, wxObject) -IMPLEMENT_CLASS(wxConnectionBase, wxObject) - -IMPLEMENT_DYNAMIC_CLASS(wxDDEServer, wxServerBase) -IMPLEMENT_DYNAMIC_CLASS(wxDDEClient, wxClientBase) -IMPLEMENT_CLASS(wxDDEConnection, wxConnectionBase) -#endif - -IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow) - -#include "wx/listbox.h" -IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl) - -#include "wx/checklst.h" -IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox, wxListBox) - -IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler) - -#include "wx/menu.h" -IMPLEMENT_DYNAMIC_CLASS(wxMenu, wxEvtHandler) -IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxEvtHandler) - -#include "wx/stattext.h" -#include "wx/statbmp.h" -IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl) - -#if USE_METAFILE -#include "wx/metafile.h" -IMPLEMENT_DYNAMIC_CLASS(wxMetaFile, wxObject) -IMPLEMENT_ABSTRACT_CLASS(wxMetaFileDC, wxDC) -#endif - -#include "wx/radiobox.h" -#include "wx/radiobut.h" -IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) - -IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl) -// IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton) - -#include "wx/scrolbar.h" -IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl) - -#if WXWIN_COMPATIBILITY -BEGIN_EVENT_TABLE(wxScrollBar, wxControl) - EVT_SCROLL(wxScrollBar::OnScroll) -END_EVENT_TABLE() -#endif - -#include "wx/slider.h" -IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl) - -#if WXWIN_COMPATIBILITY -BEGIN_EVENT_TABLE(wxSlider, wxControl) - EVT_SCROLL(wxSlider::OnScroll) -END_EVENT_TABLE() -#endif - -#include "wx/timer.h" -IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject) - -#include "wx/textctrl.h" -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) - -#include "wx/window.h" -IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxEvtHandler) - -#include "wx/scrolwin.h" -IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow, wxWindow) - -#include "wx/panel.h" -IMPLEMENT_DYNAMIC_CLASS(wxPanel, wxWindow) - -#include "wx/msgbxdlg.h" -#include "wx/textdlg.h" -#include "wx/filedlg.h" -#include "wx/dirdlg.h" -#include "wx/choicdlg.h" - -#if !defined(__WXMSW__) || USE_GENERIC_DIALOGS_IN_MSW -#include "wx/generic/msgdlgg.h" -IMPLEMENT_CLASS(wxGenericMessageDialog, wxDialog) -#endif - -IMPLEMENT_CLASS(wxTextEntryDialog, wxDialog) -IMPLEMENT_CLASS(wxSingleChoiceDialog, wxDialog) -IMPLEMENT_CLASS(wxFileDialog, wxDialog) -IMPLEMENT_CLASS(wxDirDialog, wxDialog) - -#ifdef __WXMSW__ -IMPLEMENT_CLASS(wxMessageDialog) -#endif - -#if USE_GAUGE -#ifdef __WXMOTIF__ -#include "../../contrib/xmgauge/gauge.h" -#endif -#include "wx_gauge.h" -IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl) -#endif - -#include "wx/grid.h" -IMPLEMENT_DYNAMIC_CLASS(wxGenericGrid, wxPanel) - -///// Event tables (also must be in one, statically-linked file for shared libraries) - -// This is the base, wxEvtHandler 'bootstrap' code which is expanded manually here -const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable; } - -const wxEventTable wxEvtHandler::sm_eventTable = - { NULL, &wxEvtHandler::sm_eventTableEntries[0] }; - -const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, NULL } }; - -BEGIN_EVENT_TABLE(wxFrame, wxWindow) - EVT_ACTIVATE(wxFrame::OnActivate) - EVT_SIZE(wxFrame::OnSize) - EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight) - EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged) - EVT_IDLE(wxFrame::OnIdle) - EVT_CLOSE(wxFrame::OnCloseWindow) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxDialog, wxPanel) - EVT_BUTTON(wxID_OK, wxDialog::OnOK) - EVT_BUTTON(wxID_APPLY, wxDialog::OnApply) - EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel) - EVT_CHAR_HOOK(wxDialog::OnCharHook) - EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged) - EVT_CLOSE(wxDialog::OnCloseWindow) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxWindow, wxEvtHandler) - EVT_CHAR(wxWindow::OnChar) - EVT_SIZE(wxWindow::Size) - EVT_ERASE_BACKGROUND(wxWindow::OnEraseBackground) - EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged) - EVT_INIT_DIALOG(wxWindow::OnInitDialog) - EVT_IDLE(wxWindow::OnIdle) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxScrolledWindow, wxWindow) - EVT_SCROLL(wxScrolledWindow::OnScroll) - EVT_SIZE(wxScrolledWindow::OnSize) - EVT_PAINT(wxScrolledWindow::OnPaint) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxPanel, wxWindow) - EVT_SYS_COLOUR_CHANGED(wxPanel::OnSysColourChanged) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) - EVT_CHAR(wxTextCtrl::OnChar) - EVT_DROP_FILES(wxTextCtrl::OnDropFiles) - EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground) -END_EVENT_TABLE() - -#ifdef __WXMSW__ -BEGIN_EVENT_TABLE(wxMDIParentWindow, wxFrame) - EVT_SIZE(wxMDIParentWindow::OnSize) - EVT_ACTIVATE(wxMDIParentWindow::OnActivate) - EVT_SYS_COLOUR_CHANGED(wxMDIParentWindow::OnSysColourChanged) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxMDIClientWindow, wxWindow) - EVT_SCROLL(wxMDIClientWindow::OnScroll) -END_EVENT_TABLE() -#endif - -BEGIN_EVENT_TABLE(wxToolBarBase, wxControl) - EVT_SCROLL(wxToolBarBase::OnScroll) - EVT_SIZE(wxToolBarBase::OnSize) - EVT_IDLE(wxToolBarBase::OnIdle) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxToolBarSimple, wxToolBarBase) - EVT_SIZE(wxToolBarSimple::OnSize) - EVT_PAINT(wxToolBarSimple::OnPaint) - EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus) - EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent) -END_EVENT_TABLE() - -#ifdef __WXMSW__ -BEGIN_EVENT_TABLE(wxToolBarMSW, wxToolBarBase) - EVT_SIZE(wxToolBarMSW::OnSize) - EVT_PAINT(wxToolBarMSW::OnPaint) - EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxToolBar95, wxToolBarBase) - EVT_SIZE(wxToolBar95::OnSize) - EVT_PAINT(wxToolBar95::OnPaint) - EVT_KILL_FOCUS(wxToolBar95::OnKillFocus) - EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent) - EVT_SYS_COLOUR_CHANGED(wxToolBar95::OnSysColourChanged) -END_EVENT_TABLE() -#endif - -BEGIN_EVENT_TABLE(wxGenericGrid, wxPanel) - EVT_SIZE(wxGenericGrid::OnSize) - EVT_PAINT(wxGenericGrid::OnPaint) - EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent) - EVT_TEXT(wxGRID_TEXT_CTRL, wxGenericGrid::OnText) - EVT_COMMAND_SCROLL(wxGRID_HSCROLL, wxGenericGrid::OnGridScroll) - EVT_COMMAND_SCROLL(wxGRID_VSCROLL, wxGenericGrid::OnGridScroll) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxControl, wxWindow) - EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground) -END_EVENT_TABLE() - -#if !defined(__WXMSW__) || USE_GENERIC_DIALOGS_IN_MSW -BEGIN_EVENT_TABLE(wxGenericMessageDialog, wxDialog) - EVT_BUTTON(wxID_YES, wxGenericMessageDialog::OnYes) - EVT_BUTTON(wxID_NO, wxGenericMessageDialog::OnNo) - EVT_BUTTON(wxID_CANCEL, wxGenericMessageDialog::OnCancel) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxGenericColourDialog, wxDialog) - EVT_BUTTON(wxID_ADD_CUSTOM, wxGenericColourDialog::OnAddCustom) - EVT_SLIDER(wxID_RED_SLIDER, wxGenericColourDialog::OnRedSlider) - EVT_SLIDER(wxID_GREEN_SLIDER, wxGenericColourDialog::OnGreenSlider) - EVT_SLIDER(wxID_BLUE_SLIDER, wxGenericColourDialog::OnBlueSlider) - EVT_PAINT(wxGenericColourDialog::OnPaint) - EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxGenericFontDialog, wxDialog) - EVT_CHECKBOX(wxID_FONT_UNDERLINE, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_STYLE, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_WEIGHT, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_FAMILY, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_COLOUR, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_SIZE, wxGenericFontDialog::OnChangeFont) - EVT_PAINT(wxGenericFontDialog::OnPaint) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxGenericPrintDialog, wxDialog) - EVT_BUTTON(wxID_OK, wxGenericPrintDialog::OnOK) - EVT_BUTTON(wxPRINTID_SETUP, wxGenericPrintDialog::OnSetup) - EVT_RADIOBOX(wxPRINTID_RANGE, wxGenericPrintDialog::OnRange) -END_EVENT_TABLE() - -#endif - -BEGIN_EVENT_TABLE(wxTextEntryDialog, wxDialog) - EVT_BUTTON(wxID_OK, wxTextEntryDialog::OnOK) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxSingleChoiceDialog, wxDialog) - EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK) -END_EVENT_TABLE() - -#include "wx/prntbase.h" - -BEGIN_EVENT_TABLE(wxPrintAbortDialog, wxDialog) - EVT_BUTTON(wxID_CANCEL, wxPrintAbortDialog::OnCancel) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxPreviewControlBar, wxWindow) - EVT_BUTTON(wxID_PREVIEW_CLOSE, wxPreviewControlBar::OnClose) - EVT_BUTTON(wxID_PREVIEW_PRINT, wxPreviewControlBar::OnPrint) - EVT_BUTTON(wxID_PREVIEW_PREVIOUS, wxPreviewControlBar::OnPrevious) - EVT_BUTTON(wxID_PREVIEW_NEXT, wxPreviewControlBar::OnNext) - EVT_CHOICE(wxID_PREVIEW_ZOOM, wxPreviewControlBar::OnZoom) -END_EVENT_TABLE() - -#endif - - -const wxSize wxDefaultSize(-1, -1); -const wxPoint wxDefaultPosition(-1, -1); diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp deleted file mode 100644 index 432769c8c0..0000000000 --- a/src/msw/dc.cpp +++ /dev/null @@ -1,1449 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dc.cpp -// Purpose: wxDC class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dc.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/frame.h" -#include "wx/dc.h" -#include "wx/utils.h" -#include "wx/dialog.h" -#include "wx/app.h" -#endif - -#include "wx/dcprint.h" -#include "wx/msw/private.h" - -#include -#include -#include - -#if USE_COMMON_DIALOGS -#include -#endif - -#ifndef __WIN32__ -#include -#endif - -#ifdef DrawText -#undef DrawText -#endif - -#ifdef GetCharWidth -#undef GetCharWidth -#endif - -#ifdef StartDoc -#undef StartDoc -#endif - -#if !USE_SHARED_LIBRARY -IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) -#endif - -// Declarations local to this file - -#define YSCALE(y) (yorigin - (y)) - -// #define wx_round(a) (int)((a)+.5) - -// Default constructor -wxDC::wxDC(void) -{ - m_minX = 0; m_minY = 0; m_maxX = 0; m_maxY = 0; - m_clipping = FALSE; - - m_filename = ""; - m_canvas = NULL; - m_oldBitmap = 0; - m_oldPen = 0; - m_oldBrush = 0; - m_oldFont = 0; - m_oldPalette = 0; - m_minX = 0; m_minY = 0; m_maxX = 0; m_maxY = 0; - m_logicalOriginX = 0; - m_logicalOriginY = 0; - m_deviceOriginX = 0; - m_deviceOriginY = 0; - m_logicalScaleX = 1.0; - m_logicalScaleY = 1.0; - m_userScaleX = 1.0; - m_userScaleY = 1.0; - m_signX = 1; - m_signY = 1; - m_systemScaleX = 1.0; - m_systemScaleY = 1.0; - m_mappingMode = MM_TEXT; - m_bOwnsDC = FALSE; - m_hDC = 0; - m_clipping = FALSE; - m_ok = TRUE; - m_windowExtX = VIEWPORT_EXTENT; - m_windowExtY = VIEWPORT_EXTENT; - m_logicalFunction = -1; - - m_backgroundBrush = *wxWHITE_BRUSH; - - m_textForegroundColour = *wxBLACK; - m_textBackgroundColour = *wxWHITE; - - m_colour = wxColourDisplay(); - - m_hDCCount = 0; -} - - -wxDC::~wxDC(void) -{ - if ( m_hDC != 0 ) { - SelectOldObjects(m_hDC); - if ( m_bOwnsDC ) { - if ( m_canvas == NULL ) - ::DeleteDC((HDC)m_hDC); - else - ::ReleaseDC((HWND)m_canvas->GetHWND(), (HDC)m_hDC); - } - } - -} - -// This will select current objects out of the DC, -// which is what you have to do before deleting the -// DC. -void wxDC::SelectOldObjects(WXHDC dc) -{ -#if WXDEBUG > 1 - wxDebugMsg("wxDC::SelectOldObjects %X\n", this); -#endif - if (dc) - { - if (m_oldBitmap) - { -#if WXDEBUG > 1 - wxDebugMsg("wxDC::SelectOldObjects: Selecting old HBITMAP %X\n", m_oldBitmap); -#endif - ::SelectObject((HDC) dc, (HBITMAP) m_oldBitmap); - if (m_selectedBitmap.Ok()) - { - m_selectedBitmap.SetSelectedInto(NULL); - } - } - m_oldBitmap = 0 ; - if (m_oldPen) - { -#if WXDEBUG > 1 - wxDebugMsg("wxDC::SelectOldObjects: Selecting old HPEN %X\n", m_oldPen); -#endif - ::SelectObject((HDC) dc, (HPEN) m_oldPen); - } - m_oldPen = 0 ; - if (m_oldBrush) - { -#if WXDEBUG > 1 - wxDebugMsg("wxDC::SelectOldObjects: Selecting old HBRUSH %X\n", m_oldBrush); -#endif - ::SelectObject((HDC) dc, (HBRUSH) m_oldBrush); - } - m_oldBrush = 0 ; - if (m_oldFont) - { -#if WXDEBUG > 1 - wxDebugMsg("wxDC::SelectOldObjects: Selecting old HFONT %X\n", m_oldFont); -#endif - ::SelectObject((HDC) dc, (HFONT) m_oldFont); - } - m_oldFont = 0 ; - if (m_oldPalette) - { -#if WXDEBUG > 1 - wxDebugMsg("wxDC::SelectOldObjects: Selecting old HPALETTE %X\n", m_oldPalette); -#endif - ::SelectPalette((HDC) dc, (HPALETTE) m_oldPalette, TRUE); - } -#if WXDEBUG > 1 - wxDebugMsg("wxDC::SelectOldObjects: Done.\n"); -#endif - m_oldPalette = 0 ; - } - - m_brush = wxNullBrush ; - m_pen = wxNullPen; - m_palette = wxNullPalette; - m_font = wxNullFont; - m_backgroundBrush = wxNullBrush; - m_selectedBitmap = wxNullBitmap; -} - -void wxDC::SetClippingRegion(long cx, long cy, long cw, long ch) -{ - m_clipping = TRUE; - m_clipX1 = (int)cx; - m_clipY1 = (int)cy; - m_clipX2 = (int)(cx + cw); - m_clipY2 = (int)(cy + ch); - - DoClipping((WXHDC) m_hDC); -} - -void wxDC::DoClipping(WXHDC dc) -{ - if (m_clipping && dc) - { - IntersectClipRect((HDC) dc, XLOG2DEV(m_clipX1), YLOG2DEV(m_clipY1), - XLOG2DEV(m_clipX2), YLOG2DEV(m_clipY2)); - } -} - -void wxDC::DestroyClippingRegion(void) -{ - if (m_clipping && m_hDC) - { - HRGN rgn = CreateRectRgn(0, 0, 32000, 32000); -#if WXDEBUG > 1 - wxDebugMsg("wxDC::DestroyClippingRegion: Selecting HRGN %X\n", rgn); -#endif - SelectClipRgn((HDC) m_hDC, rgn); -#if WXDEBUG > 1 - wxDebugMsg("wxDC::DestroyClippingRegion: Deleting HRGN %X\n", rgn); -#endif - DeleteObject(rgn); - } - m_clipping = FALSE; -} - -bool wxDC::CanDrawBitmap(void) const -{ - return TRUE; -} - -bool wxDC::CanGetTextExtent(void) const -{ - // What sort of display is it? - int technology = ::GetDeviceCaps((HDC) m_hDC, TECHNOLOGY); - - bool ok; - - if (technology != DT_RASDISPLAY && technology != DT_RASPRINTER) - ok = FALSE; - else ok = TRUE; - - return ok; -} - -void wxDC::SetPalette(const wxPalette& palette) -{ - // Set the old object temporarily, in case the assignment deletes an object - // that's not yet selected out. - if (m_oldPalette) - { - ::SelectPalette((HDC) m_hDC, (HPALETTE) m_oldPalette, TRUE); - m_oldPalette = 0; - } - - m_palette = m_palette; - - if (!m_palette.Ok()) - { - // Setting a NULL colourmap is a way of restoring - // the original colourmap - if (m_oldPalette) - { - ::SelectPalette((HDC) m_hDC, (HPALETTE) m_oldPalette, TRUE); -#if WXDEBUG > 1 - wxDebugMsg("wxDC::SetPalette: set old palette %X\n", m_oldPalette); -#endif - m_oldPalette = 0; - } - - return; - } - - if (m_palette.Ok() && m_palette.GetHPALETTE()) - { - HPALETTE oldPal = ::SelectPalette((HDC) m_hDC, (HPALETTE) m_palette.GetHPALETTE(), TRUE); - if (!m_oldPalette) - m_oldPalette = (WXHPALETTE) oldPal; - -#if WXDEBUG > 1 - wxDebugMsg("wxDC::SetPalette %X: selected palette %X\n", this, m_palette.GetHPALETTE()); - if (oldPal) - wxDebugMsg("wxDC::SetPalette: oldPal was palette %X\n", oldPal); - if (m_oldPalette) - wxDebugMsg("wxDC::SetPalette: m_oldPalette is palette %X\n", m_oldPalette); -#endif - ::RealizePalette((HDC) m_hDC); - } -} - -void wxDC::Clear(void) -{ - RECT rect; - if (m_canvas) - GetClientRect((HWND) m_canvas->GetHWND(), &rect); - else if (m_selectedBitmap.Ok()) - { - rect.left = 0; rect.top = 0; - rect.right = m_selectedBitmap.GetWidth(); - rect.bottom = m_selectedBitmap.GetHeight(); - } - (void) ::SetMapMode((HDC) m_hDC, MM_TEXT); - - DWORD colour = GetBkColor((HDC) m_hDC); - HBRUSH brush = CreateSolidBrush(colour); - FillRect((HDC) m_hDC, &rect, brush); - DeleteObject(brush); - - ::SetMapMode((HDC) m_hDC, MM_ANISOTROPIC); - ::SetViewportExtEx((HDC) m_hDC, VIEWPORT_EXTENT, VIEWPORT_EXTENT, NULL); - ::SetWindowExtEx((HDC) m_hDC, m_windowExtX, m_windowExtY, NULL); - ::SetViewportOrgEx((HDC) m_hDC, (int)m_deviceOriginX, (int)m_deviceOriginY, NULL); - ::SetWindowOrgEx((HDC) m_hDC, (int)m_logicalOriginX, (int)m_logicalOriginY, NULL); -} - -void wxDC::FloodFill(long x, long y, const wxColour& col, int style) -{ - (void)ExtFloodFill((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y), - col.GetPixel(), - style==wxFLOOD_SURFACE? - FLOODFILLSURFACE:FLOODFILLBORDER - ); - - CalcBoundingBox(x, y); -} - -bool wxDC::GetPixel(long x, long y, wxColour *col) const -{ - // added by steve 29.12.94 (copied from DrawPoint) - // returns TRUE for pixels in the color of the current pen - // and FALSE for all other pixels colors - // if col is non-NULL return the color of the pixel - - // get the color of the pixel - COLORREF pixelcolor = ::GetPixel((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y)); - // get the color of the pen - COLORREF pencolor = 0x00ffffff; - if (m_pen.Ok()) - { - pencolor = m_pen.GetColour().GetPixel() ; - } - - // return the color of the pixel - if(col) - col->Set(GetRValue(pixelcolor),GetGValue(pixelcolor),GetBValue(pixelcolor)); - - // check, if color of the pixels is the same as the color - // of the current pen - return(pixelcolor==pencolor); -} - -void wxDC::CrossHair(long x, long y) -{ - // We suppose that our screen is 2000x2000 max. - long x1 = x-2000; - long y1 = y-2000; - long x2 = x+2000; - long y2 = y+2000; - - (void)MoveToEx((HDC) m_hDC, XLOG2DEV(x1), YLOG2DEV(y), NULL); - (void)LineTo((HDC) m_hDC, XLOG2DEV(x2), YLOG2DEV(y)); - - (void)MoveToEx((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y1), NULL); - (void)LineTo((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y2)); - - CalcBoundingBox(x1, y1); - CalcBoundingBox(x2, y2); -} - -void wxDC::DrawLine(long x1, long y1, long x2, long y2) -{ - (void)MoveToEx((HDC) m_hDC, XLOG2DEV(x1), YLOG2DEV(y1), NULL); - (void)LineTo((HDC) m_hDC, XLOG2DEV(x2), YLOG2DEV(y2)); - - /* MATTHEW: [6] New normalization */ -#if WX_STANDARD_GRAPHICS - (void)LineTo((HDC) m_hDC, XLOG2DEV(x2) + 1, YLOG2DEV(y2)); -#endif - - CalcBoundingBox(x1, y1); - CalcBoundingBox(x2, y2); -} - -void wxDC::DrawArc(long x1,long y1,long x2,long y2, long xc, long yc) -{ - double dx = xc-x1 ; - double dy = yc-y1 ; - double radius = (double)sqrt(dx*dx+dy*dy) ;; - if (x1==x2 && x2==y2) - { - DrawEllipse(xc,yc,(double)(radius*2.0),(double)(radius*2)) ; - return ; - } - - long xx1 = XLOG2DEV(x1) ; - long yy1 = YLOG2DEV(y1) ; - long xx2 = XLOG2DEV(x2) ; - long yy2 = YLOG2DEV(y2) ; - long xxc = XLOG2DEV(xc) ; - long yyc = YLOG2DEV(yc) ; - long ray = (long) sqrt(double((xxc-xx1)*(xxc-xx1)+(yyc-yy1)*(yyc-yy1))) ; - - (void)MoveToEx((HDC) m_hDC, (int) xx1, (int) yy1, NULL); - long xxx1 = (long) (xxc-ray); - long yyy1 = (long) (yyc-ray); - long xxx2 = (long) (xxc+ray); - long yyy2 = (long) (yyc+ray); - if (m_brush.Ok() && m_brush.GetStyle() !=wxTRANSPARENT) - { - // Have to add 1 to bottom-right corner of rectangle - // to make semi-circles look right (crooked line otherwise). - // Unfortunately this is not a reliable method, depends - // on the size of shape. - // TODO: figure out why this happens! - Pie((HDC) m_hDC,xxx1,yyy1,xxx2+1,yyy2+1, - xx1,yy1,xx2,yy2) ; - } - else - Arc((HDC) m_hDC,xxx1,yyy1,xxx2,yyy2, - xx1,yy1,xx2,yy2) ; - - CalcBoundingBox((xc-radius), (yc-radius)); - CalcBoundingBox((xc+radius), (yc+radius)); -} - -void wxDC::DrawPoint(long x, long y) -{ - COLORREF color = 0x00ffffff; - if (m_pen.Ok()) - { - color = m_pen.GetColour().GetPixel() ; - } - - SetPixel((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y), color); - - CalcBoundingBox(x, y); -} - -void wxDC::DrawPolygon(int n, wxPoint points[], long xoffset, long yoffset,int fillStyle) -{ - // Do things less efficiently if we have offsets - if (xoffset != 0 || yoffset != 0) - { - POINT *cpoints = new POINT[n]; - int i; - for (i = 0; i < n; i++) - { - cpoints[i].x = (int)(points[i].x + xoffset); - cpoints[i].y = (int)(points[i].y + yoffset); - - CalcBoundingBox(cpoints[i].x, cpoints[i].y); - } - int prev = SetPolyFillMode((HDC) m_hDC,fillStyle==wxODDEVEN_RULE?ALTERNATE:WINDING) ; - (void)Polygon((HDC) m_hDC, cpoints, n); - SetPolyFillMode((HDC) m_hDC,prev) ; - delete[] cpoints; - } - else - { - int i; - for (i = 0; i < n; i++) - CalcBoundingBox(points[i].x, points[i].y); - - int prev = SetPolyFillMode((HDC) m_hDC,fillStyle==wxODDEVEN_RULE?ALTERNATE:WINDING) ; - (void)Polygon((HDC) m_hDC, (POINT*) points, n); - SetPolyFillMode((HDC) m_hDC,prev) ; - } -} - -void wxDC::DrawLines(int n, wxPoint points[], long xoffset, long yoffset) -{ - // Do things less efficiently if we have offsets - if (xoffset != 0 || yoffset != 0) - { - POINT *cpoints = new POINT[n]; - int i; - for (i = 0; i < n; i++) - { - cpoints[i].x = (int)(points[i].x + xoffset); - cpoints[i].y = (int)(points[i].y + yoffset); - - CalcBoundingBox(cpoints[i].x, cpoints[i].y); - } - (void)Polyline((HDC) m_hDC, cpoints, n); - delete[] cpoints; - } - else - { - int i; - for (i = 0; i < n; i++) - CalcBoundingBox(points[i].x, points[i].y); - - (void)Polyline((HDC) m_hDC, (POINT*) points, n); - } -} - -void wxDC::DrawRectangle(long x, long y, long width, long height) -{ - long x2 = x + width; - long y2 = y + height; - -/* MATTHEW: [6] new normalization */ -#if WX_STANDARD_GRAPHICS - bool do_brush, do_pen; - - do_brush = m_brush.Ok() && m_brush.GetStyle() != wxTRANSPARENT; - do_pen = m_pen.Ok() && m_pen.GetStyle() != wxTRANSPARENT; - - if (do_brush) { - HPEN orig_pen = NULL; - - if (do_pen || !m_pen.Ok()) - orig_pen = (HPEN) ::SelectObject((HDC) m_hDC, (HPEN) ::GetStockObject(NULL_PEN)); - - (void)Rectangle((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y), - XLOG2DEV(x2) + 1, YLOG2DEV(y2) + 1); - - if (do_pen || !m_pen.Ok()) - ::SelectObject((HDC) m_hDC , orig_pen); - } - if (do_pen) { - HBRUSH orig_brush = NULL; - - if (do_brush || !m_brush.Ok()) - orig_brush = (HBRUSH) ::SelectObject((HDC) m_hDC, (HBRUSH) ::GetStockObject(NULL_BRUSH)); - - (void)Rectangle((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y), - XLOG2DEV(x2), YLOG2DEV(y2)); - - if (do_brush || !m_brush.Ok()) - ::SelectObject((HDC) m_hDC, orig_brush); - } -#else - (void)Rectangle((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y), XLOG2DEV(x2), YLOG2DEV(y2)); -#endif - - CalcBoundingBox(x, y); - CalcBoundingBox(x2, y2); -} - -void wxDC::DrawRoundedRectangle(long x, long y, long width, long height, double radius) -{ - // Now, a negative radius value is interpreted to mean - // 'the proportion of the smallest X or Y dimension' - - if (radius < 0.0) - { - double smallest = 0.0; - if (width < height) - smallest = width; - else - smallest = height; - radius = (- radius * smallest); - } - - long x2 = (x+width); - long y2 = (y+height); - - (void)RoundRect((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y), XLOG2DEV(x2), - YLOG2DEV(y2), 2*XLOG2DEV(radius), 2*YLOG2DEV(radius)); - - CalcBoundingBox(x, y); - CalcBoundingBox(x2, y2); -} - -void wxDC::DrawEllipse(long x, long y, long width, long height) -{ - long x2 = (x+width); - long y2 = (y+height); - - (void)Ellipse((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y), XLOG2DEV(x2), YLOG2DEV(y2)); - - CalcBoundingBox(x, y); - CalcBoundingBox(x2, y2); -} - -// Chris Breeze 20/5/98: first implementation of DrawEllipticArc on Windows -void wxDC::DrawEllipticArc(long x,long y,long w,long h,double sa,double ea) -{ - long x2 = (x+w); - long y2 = (y+h); - - const double deg2rad = 3.14159265359 / 180.0; - int rx1 = XLOG2DEV(x+w/2); - int ry1 = YLOG2DEV(y+h/2); - int rx2 = rx1; - int ry2 = ry1; - rx1 += (int)(100.0 * abs(w) * cos(sa * deg2rad)); - ry1 -= (int)(100.0 * abs(h) * m_signY * sin(sa * deg2rad)); - rx2 += (int)(100.0 * abs(w) * cos(ea * deg2rad)); - ry2 -= (int)(100.0 * abs(h) * m_signY * sin(ea * deg2rad)); - - // draw pie with NULL_PEN first and then outline otherwise a line is - // drawn from the start and end points to the centre - HPEN orig_pen = (HPEN) ::SelectObject((HDC) m_hDC, (HPEN) ::GetStockObject(NULL_PEN)); - if (m_signY > 0) - { - (void)Pie((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y), XLOG2DEV(x2)+1, YLOG2DEV(y2)+1, - rx1, ry1, rx2, ry2); - } - else - { - (void)Pie((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y)-1, XLOG2DEV(x2)+1, YLOG2DEV(y2), - rx1, ry1-1, rx2, ry2-1); - } - ::SelectObject((HDC) m_hDC, orig_pen); - (void)Arc((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y), XLOG2DEV(x2), YLOG2DEV(y2), - rx1, ry1, rx2, ry2); - - CalcBoundingBox(x, y); - CalcBoundingBox(x2, y2); -} - -void wxDC::DrawIcon(const wxIcon& icon, long x, long y) -{ - ::DrawIcon((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y), (HICON) icon.GetHICON()); - CalcBoundingBox(x, y); - CalcBoundingBox(x+icon.GetWidth(), y+icon.GetHeight()); -} - -void wxDC::SetFont(const wxFont& the_font) -{ - // Set the old object temporarily, in case the assignment deletes an object - // that's not yet selected out. - if (m_oldFont) - { - ::SelectObject((HDC) m_hDC, (HFONT) m_oldFont); - m_oldFont = 0; - } - - m_font = the_font; - - if (!the_font.Ok()) - { - if (m_oldFont) - ::SelectObject((HDC) m_hDC, (HFONT) m_oldFont); - m_oldFont = 0 ; - } - - if (m_font.Ok() && m_font.GetResourceHandle()) - { -#if WXDEBUG > 1 - wxDebugMsg("wxDC::SetFont: Selecting HFONT %X\n", m_font.GetResourceHandle()); -#endif - HFONT f = (HFONT) ::SelectObject((HDC) m_hDC, (HFONT) m_font.GetResourceHandle()); - if (f == NULL) - { - wxDebugMsg("::SelectObject failed in wxDC::SetFont."); - } - if (!m_oldFont) - m_oldFont = (WXHFONT) f; - } -} - -void wxDC::SetPen(const wxPen& pen) -{ - // Set the old object temporarily, in case the assignment deletes an object - // that's not yet selected out. - if (m_oldPen) - { - ::SelectObject((HDC) m_hDC, (HPEN) m_oldPen); - m_oldPen = 0; - } - - m_pen = pen; - - if (!m_pen.Ok()) - { - if (m_oldPen) - ::SelectObject((HDC) m_hDC, (HPEN) m_oldPen); - m_oldPen = 0 ; - } - - if (m_pen.Ok()) - { - if (m_pen.GetResourceHandle()) - { - HPEN p = (HPEN) ::SelectObject((HDC) m_hDC, (HPEN)m_pen.GetResourceHandle()) ; - if (!m_oldPen) - m_oldPen = (WXHPEN) p; - } - } -} - -void wxDC::SetBrush(const wxBrush& brush) -{ - // Set the old object temporarily, in case the assignment deletes an object - // that's not yet selected out. - if (m_oldBrush) - { - ::SelectObject((HDC) m_hDC, (HBRUSH) m_oldBrush); - m_oldBrush = 0; - } - - m_brush = brush; - - if (!m_brush.Ok()) - { - if (m_oldBrush) - ::SelectObject((HDC) m_hDC, (HBRUSH) m_oldBrush); - m_oldBrush = 0 ; - } - - if (m_brush.Ok()) - { - if (m_brush.GetResourceHandle()) - { - HBRUSH b = 0; - b = (HBRUSH) ::SelectObject((HDC) m_hDC, (HBRUSH)m_brush.GetResourceHandle()) ; - if (!m_oldBrush) - m_oldBrush = (WXHBRUSH) b; - } - } -} - -void wxDC::DrawText(const wxString& text, long x, long y, bool use16bit) -{ - // Should be unnecessary: SetFont should have done this already. -#if 0 - if (m_font.Ok() && m_font.GetResourceHandle()) - { -#if WXDEBUG > 1 - wxDebugMsg("wxDC::DrawText: Selecting HFONT %X\n", m_font.GetResourceHandle()); -#endif - HFONT f = (HFONT) ::SelectObject((HDC) m_hDC, (HFONT) m_font.GetResourceHandle()); - if (!m_oldFont) - m_oldFont = (WXHFONT) f; - } -#endif - - if (m_textForegroundColour.Ok()) - SetTextColor((HDC) m_hDC, m_textForegroundColour.GetPixel() ) ; - - DWORD old_background; - if (m_textBackgroundColour.Ok()) - { - old_background = SetBkColor((HDC) m_hDC, m_textBackgroundColour.GetPixel() ) ; - } - - if (m_backgroundMode == wxTRANSPARENT) - SetBkMode((HDC) m_hDC, TRANSPARENT); - else - SetBkMode((HDC) m_hDC, OPAQUE); - - (void)TextOut((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y), (char *) (const char *)text, strlen((const char *)text)); - - if (m_textBackgroundColour.Ok()) - (void)SetBkColor((HDC) m_hDC, old_background); - - CalcBoundingBox(x, y); - - long w, h; - GetTextExtent(text, &w, &h); - CalcBoundingBox((x + w), (y + h)); -} - -void wxDC::SetBackground(const wxBrush& brush) -{ - m_backgroundBrush = brush; - - if (!m_backgroundBrush.Ok()) - return; - - if (m_canvas) - { - bool customColours = TRUE; - // If we haven't specified wxUSER_COLOURS, don't allow the panel/dialog box to - // change background colours from the control-panel specified colours. - if (m_canvas->IsKindOf(CLASSINFO(wxWindow)) && ((m_canvas->GetWindowStyleFlag() & wxUSER_COLOURS) != wxUSER_COLOURS)) - customColours = FALSE; - - if (customColours) - { - if (m_backgroundBrush.GetStyle()==wxTRANSPARENT) - { - m_canvas->m_backgroundTransparent = TRUE; - } - else - { - m_canvas->SetBackgroundColour(m_backgroundBrush.GetColour()); - m_canvas->m_backgroundTransparent = FALSE; - } - } - } - COLORREF new_color = m_backgroundBrush.GetColour().GetPixel() ; - { - (void)SetBkColor((HDC) m_hDC, new_color); - } -} - -void wxDC::SetBackgroundMode(int mode) -{ - m_backgroundMode = mode; - - if (m_backgroundMode == wxTRANSPARENT) - ::SetBkMode((HDC) m_hDC, TRANSPARENT); - else - ::SetBkMode((HDC) m_hDC, OPAQUE); -} - -void wxDC::SetLogicalFunction(int function) -{ - m_logicalFunction = function; - - SetRop((WXHDC) m_hDC); -} - -void wxDC::SetRop(WXHDC dc) -{ - if (!dc || m_logicalFunction < 0) - return; - - int c_rop; - // These may be wrong - switch (m_logicalFunction) - { -// case wxXOR: c_rop = R2_XORPEN; break; - case wxXOR: c_rop = R2_NOTXORPEN; break; - case wxINVERT: c_rop = R2_NOT; break; - case wxOR_REVERSE: c_rop = R2_MERGEPENNOT; break; - case wxAND_REVERSE: c_rop = R2_MASKPENNOT; break; - case wxCLEAR: c_rop = R2_WHITE; break; - case wxSET: c_rop = R2_BLACK; break; - case wxSRC_INVERT: c_rop = R2_NOTCOPYPEN; break; - case wxOR_INVERT: c_rop = R2_MERGENOTPEN; break; - case wxAND: c_rop = R2_MASKPEN; break; - case wxOR: c_rop = R2_MERGEPEN; break; - case wxAND_INVERT: c_rop = R2_MASKNOTPEN; break; - case wxEQUIV: - case wxNAND: - case wxCOPY: - default: - c_rop = R2_COPYPEN; break; - } - SetROP2((HDC) dc, c_rop); -} - -bool wxDC::StartDoc(const wxString& message) -{ - if (!this->IsKindOf(CLASSINFO(wxPrinterDC))) - return TRUE; - - DOCINFO docinfo; - docinfo.cbSize = sizeof(DOCINFO); - docinfo.lpszDocName = (const char *)message; - - if (m_filename.IsEmpty()) - docinfo.lpszOutput = NULL; - else - docinfo.lpszOutput = (const char *)m_filename; - -#if defined(__WIN95__) - docinfo.lpszDatatype = NULL; - docinfo.fwType = 0; -#endif - - if (!m_hDC) - return FALSE; - - int ret = -#ifndef __WIN32__ - ::StartDoc((HDC) m_hDC, &docinfo); -#else -#ifdef UNICODE - ::StartDocW((HDC) m_hDC, &docinfo); -#else - ::StartDocA((HDC) m_hDC, &docinfo); -#endif -#endif - - if (ret <= 0) - { - DWORD lastError = GetLastError(); - wxDebugMsg("wxDC::StartDoc failed with error: %d\n", lastError); - } - return (ret > 0); -} - -void wxDC::EndDoc(void) -{ - if (!this->IsKindOf(CLASSINFO(wxPrinterDC))) - return; - if (m_hDC) ::EndDoc((HDC) m_hDC); -} - -void wxDC::StartPage(void) -{ - if (!this->IsKindOf(CLASSINFO(wxPrinterDC))) - return; - if (m_hDC) - ::StartPage((HDC) m_hDC); -} - -void wxDC::EndPage(void) -{ - if (!this->IsKindOf(CLASSINFO(wxPrinterDC))) - return; - if (m_hDC) - ::EndPage((HDC) m_hDC); -} - -long wxDC::GetCharHeight(void) const -{ - TEXTMETRIC lpTextMetric; - - GetTextMetrics((HDC) m_hDC, &lpTextMetric); - - return YDEV2LOGREL(lpTextMetric.tmHeight); -} - -long wxDC::GetCharWidth(void) const -{ - TEXTMETRIC lpTextMetric; - - GetTextMetrics((HDC) m_hDC, &lpTextMetric); - - return XDEV2LOGREL(lpTextMetric.tmAveCharWidth); -} - -void wxDC::GetTextExtent(const wxString& string, long *x, long *y, - long *descent, long *externalLeading, wxFont *theFont, bool use16bit) const -{ - wxFont *fontToUse = (wxFont*) theFont; - if (!fontToUse) - fontToUse = (wxFont*) &m_font; - - SIZE sizeRect; - TEXTMETRIC tm; - - GetTextExtentPoint((HDC) m_hDC, (char *)(const char *) string, strlen((char *)(const char *) string), &sizeRect); - GetTextMetrics((HDC) m_hDC, &tm); - - if (x) *x = XDEV2LOGREL(sizeRect.cx); - if (y) *y = YDEV2LOGREL(sizeRect.cy); - if (descent) *descent = tm.tmDescent; - if (externalLeading) *externalLeading = tm.tmExternalLeading; -} - -void wxDC::SetMapMode(int mode) -{ - m_mappingMode = mode; - - int pixel_width = 0; - int pixel_height = 0; - int mm_width = 0; - int mm_height = 0; - - pixel_width = GetDeviceCaps((HDC) m_hDC, HORZRES); - pixel_height = GetDeviceCaps((HDC) m_hDC, VERTRES); - mm_width = GetDeviceCaps((HDC) m_hDC, HORZSIZE); - mm_height = GetDeviceCaps((HDC) m_hDC, VERTSIZE); - - if ((pixel_width == 0) || (pixel_height == 0) || (mm_width == 0) || (mm_height == 0)) - { - return; - } - - double mm2pixelsX = pixel_width/mm_width; - double mm2pixelsY = pixel_height/mm_height; - - switch (mode) - { - case MM_TWIPS: - { - m_logicalScaleX = (twips2mm * mm2pixelsX); - m_logicalScaleY = (twips2mm * mm2pixelsY); - break; - } - case MM_POINTS: - { - m_logicalScaleX = (pt2mm * mm2pixelsX); - m_logicalScaleY = (pt2mm * mm2pixelsY); - break; - } - case MM_METRIC: - { - m_logicalScaleX = mm2pixelsX; - m_logicalScaleY = mm2pixelsY; - break; - } - case MM_LOMETRIC: - { - m_logicalScaleX = (mm2pixelsX/10.0); - m_logicalScaleY = (mm2pixelsY/10.0); - break; - } - default: - case MM_TEXT: - { - m_logicalScaleX = 1.0; - m_logicalScaleY = 1.0; - break; - } - } - - if (::GetMapMode((HDC) m_hDC) != MM_ANISOTROPIC) - ::SetMapMode((HDC) m_hDC, MM_ANISOTROPIC); - - SetViewportExtEx((HDC) m_hDC, VIEWPORT_EXTENT, VIEWPORT_EXTENT, NULL); - m_windowExtX = (int)MS_XDEV2LOGREL(VIEWPORT_EXTENT); - m_windowExtY = (int)MS_YDEV2LOGREL(VIEWPORT_EXTENT); - ::SetWindowExtEx((HDC) m_hDC, m_windowExtX, m_windowExtY, NULL); - ::SetViewportOrgEx((HDC) m_hDC, (int)m_deviceOriginX, (int)m_deviceOriginY, NULL); - ::SetWindowOrgEx((HDC) m_hDC, (int)m_logicalOriginX, (int)m_logicalOriginY, NULL); -} - -void wxDC::SetUserScale(double x, double y) -{ - m_userScaleX = x; - m_userScaleY = y; - - SetMapMode(m_mappingMode); -} - -void wxDC::SetAxisOrientation(bool xLeftRight, bool yBottomUp) -{ - m_signX = xLeftRight ? 1 : -1; - m_signY = yBottomUp ? -1 : 1; - - SetMapMode(m_mappingMode); -} - -void wxDC::SetSystemScale(double x, double y) -{ - m_systemScaleX = x; - m_systemScaleY = y; - - SetMapMode(m_mappingMode); -} - -void wxDC::SetLogicalOrigin(long x, long y) -{ - m_logicalOriginX = x; - m_logicalOriginY = y; - - ::SetWindowOrgEx((HDC) m_hDC, (int)m_logicalOriginX, (int)m_logicalOriginY, NULL); -} - -void wxDC::SetDeviceOrigin(long x, long y) -{ - m_deviceOriginX = x; - m_deviceOriginY = y; - - ::SetViewportOrgEx((HDC) m_hDC, (int)m_deviceOriginX, (int)m_deviceOriginY, NULL); -} - -long wxDC::DeviceToLogicalX(long x) const -{ - return (long) (((x) - m_deviceOriginX)/(m_logicalScaleX*m_userScaleX*m_signX*m_systemScaleX) - m_logicalOriginX) ; -} - -long wxDC::DeviceToLogicalXRel(long x) const -{ - return (long) ((x)/(m_logicalScaleX*m_userScaleX*m_signX*m_systemScaleX)) ; -} - -long wxDC::DeviceToLogicalY(long y) const -{ - return (long) (((y) - m_deviceOriginY)/(m_logicalScaleY*m_userScaleY*m_signY*m_systemScaleY) - m_logicalOriginY) ; -} - -long wxDC::DeviceToLogicalYRel(long y) const -{ - return (long) ((y)/(m_logicalScaleY*m_userScaleY*m_signY*m_systemScaleY)) ; -} - -long wxDC::LogicalToDeviceX(long x) const -{ - return (long) (floor((x) - m_logicalOriginX)*m_logicalScaleX*m_userScaleX*m_signX*m_systemScaleX + m_deviceOriginX) ; -} - -long wxDC::LogicalToDeviceXRel(long x) const -{ - return (long) (floor(x)*m_logicalScaleX*m_userScaleX*m_signX*m_systemScaleX) ; -} - -long wxDC::LogicalToDeviceY(long y) const -{ - return (long) (floor((y) - m_logicalOriginY)*m_logicalScaleY*m_userScaleY*m_signY*m_systemScaleY + m_deviceOriginY); -} - -long wxDC::LogicalToDeviceYRel(long y) const -{ - return (long) (floor(y)*m_logicalScaleY*m_userScaleY*m_signY*m_systemScaleY) ; -} - -// This group of functions may not do any conversion -// if m_scaleGDI is TRUE, since the HDC does the -// conversion automatically. - -long wxDC::ImplDeviceToLogicalX(long x) const -{ -// return (m_scaleGDI ? x : DeviceToLogicalX(x)); - return x; -} - -long wxDC::ImplDeviceToLogicalY(long y) const -{ -// return (m_scaleGDI ? y : DeviceToLogicalY(y)); - return y; -} - -long wxDC::ImplDeviceToLogicalXRel(long x) const -{ -// return (m_scaleGDI ? x : DeviceToLogicalXRel(x)); - return x; -} - -long wxDC::ImplDeviceToLogicalYRel(long y) const -{ -// return (m_scaleGDI ? y : DeviceToLogicalYRel(y)); - return y; -} - -long wxDC::ImplLogicalToDeviceX(long x) const -{ -// return (m_scaleGDI ? (floor(double(x))) : LogicalToDeviceX(x)); - return x; -} - -long wxDC::ImplLogicalToDeviceY(long y) const -{ -// return (m_scaleGDI ? (floor(double(y))) : LogicalToDeviceY(y)); - return y; -} - -long wxDC::ImplLogicalToDeviceXRel(long x) const -{ -// return (m_scaleGDI ? (floor(double(x))) : LogicalToDeviceXRel(x)); - return x; -} - -long wxDC::ImplLogicalToDeviceYRel(long y) const -{ -// return (m_scaleGDI ? (floor(double(y))) : LogicalToDeviceYRel(y)); - return y; -} - -bool wxDC::Blit(long xdest, long ydest, long width, long height, - wxDC *source, long xsrc, long ysrc, int rop, bool useMask) -{ - long xdest1 = xdest; - long ydest1 = ydest; - long xsrc1 = xsrc; - long ysrc1 = ysrc; - - // Chris Breeze 18/5/98: use text foreground/background colours - // when blitting from 1-bit bitmaps - COLORREF old_textground = ::GetTextColor((HDC)m_hDC); - COLORREF old_background = ::GetBkColor((HDC)m_hDC); - if (m_textForegroundColour.Ok()) - { - ::SetTextColor((HDC) m_hDC, m_textForegroundColour.GetPixel() ) ; - } - if (m_textBackgroundColour.Ok()) - { - ::SetBkColor((HDC) m_hDC, m_textBackgroundColour.GetPixel() ) ; - } - - DWORD dwRop = rop == wxCOPY ? SRCCOPY : - rop == wxCLEAR ? WHITENESS : - rop == wxSET ? BLACKNESS : - rop == wxINVERT ? DSTINVERT : - rop == wxAND ? MERGECOPY : - rop == wxOR ? MERGEPAINT : - rop == wxSRC_INVERT ? NOTSRCCOPY : - rop == wxXOR ? SRCINVERT : - rop == wxOR_REVERSE ? MERGEPAINT : - rop == wxAND_REVERSE ? SRCERASE : - rop == wxSRC_OR ? SRCPAINT : - rop == wxSRC_AND ? SRCAND : - SRCCOPY; - - bool success; - if (useMask && source->m_selectedBitmap.Ok() && source->m_selectedBitmap.GetMask()) - { - -#if 0 // __WIN32__ - // Not implemented under Win95 (or maybe a specific device?) - if (MaskBlt((HDC) m_hDC, xdest1, ydest1, (int)width, (int)height, - (HDC) source->m_hDC, xsrc1, ysrc1, (HBITMAP) source->m_selectedBitmap.GetMask()->GetMaskBitmap(), - 0, 0, 0xAACC0020)) - { - // Success - } - else -#endif - { - // Old code -#if 0 - HDC dc_mask = CreateCompatibleDC((HDC) source->m_hDC); - ::SelectObject(dc_mask, (HBITMAP) source->m_selectedBitmap.GetMask()->GetMaskBitmap()); - success = (BitBlt((HDC) m_hDC, xdest1, ydest1, (int)width, (int)height, - dc_mask, xsrc1, ysrc1, 0x00220326 /* NOTSRCAND */) != 0); - success = (BitBlt((HDC) m_hDC, xdest1, ydest1, (int)width, (int)height, - (HDC) source->m_hDC, xsrc1, ysrc1, SRCPAINT) != 0); - ::SelectObject(dc_mask, 0); - ::DeleteDC(dc_mask); -#endif - // New code from Chris Breeze, 15/7/98 - // Blit bitmap with mask - - if (IsKindOf(CLASSINFO(wxPrinterDC))) - { - // If we are printing source colours are screen colours - // not printer colours and so we need copy the bitmap - // pixel by pixel. - RECT rect; - HDC dc_mask = ::CreateCompatibleDC((HDC) source->m_hDC); - HDC dc_src = (HDC) source->m_hDC; - - ::SelectObject(dc_mask, (HBITMAP) source->m_selectedBitmap.GetMask()->GetMaskBitmap()); - for (int x = 0; x < width; x++) - { - for (int y = 0; y < height; y++) - { - COLORREF cref = ::GetPixel(dc_mask, x, y); - if (cref) - { - HBRUSH brush = ::CreateSolidBrush(::GetPixel(dc_src, x, y)); - rect.left = xdest1 + x; rect.right = rect.left + 1; - rect.top = ydest1 + y; rect.bottom = rect.top + 1; - ::FillRect((HDC) m_hDC, &rect, brush); - ::DeleteObject(brush); - } - } - } - ::SelectObject(dc_mask, 0); - ::DeleteDC(dc_mask); - } - else - { - // create a temp buffer bitmap and DCs to access it and the mask - HDC dc_mask = ::CreateCompatibleDC((HDC) source->m_hDC); - HDC dc_buffer = ::CreateCompatibleDC((HDC) m_hDC); - HBITMAP buffer_bmap = ::CreateCompatibleBitmap((HDC) m_hDC, width, height); - ::SelectObject(dc_mask, (HBITMAP) source->m_selectedBitmap.GetMask()->GetMaskBitmap()); - ::SelectObject(dc_buffer, buffer_bmap); - - // copy dest to buffer - ::BitBlt(dc_buffer, 0, 0, (int)width, (int)height, - (HDC) m_hDC, xdest1, ydest1, SRCCOPY); - - // copy src to buffer using selected raster op - ::BitBlt(dc_buffer, 0, 0, (int)width, (int)height, - (HDC) source->m_hDC, xsrc1, ysrc1, dwRop); - - // set masked area in buffer to BLACK (pixel value 0) - COLORREF prevBkCol = ::SetBkColor((HDC) m_hDC, RGB(255, 255, 255)); - COLORREF prevCol = ::SetTextColor((HDC) m_hDC, RGB(0, 0, 0)); - ::BitBlt(dc_buffer, 0, 0, (int)width, (int)height, - dc_mask, xsrc1, ysrc1, SRCAND); - - // set unmasked area in dest to BLACK - ::SetBkColor((HDC) m_hDC, RGB(0, 0, 0)); - ::SetTextColor((HDC) m_hDC, RGB(255, 255, 255)); - ::BitBlt((HDC) m_hDC, xdest1, ydest1, (int)width, (int)height, - dc_mask, xsrc1, ysrc1, SRCAND); - ::SetBkColor((HDC) m_hDC, prevBkCol); // restore colours to original values - ::SetTextColor((HDC) m_hDC, prevCol); - - // OR buffer to dest - success = (::BitBlt((HDC) m_hDC, xdest1, ydest1, (int)width, (int)height, - dc_buffer, 0, 0, SRCPAINT) != 0); - - // tidy up temporary DCs and bitmap - ::SelectObject(dc_mask, 0); - ::DeleteDC(dc_mask); - ::SelectObject(dc_buffer, 0); - ::DeleteDC(dc_buffer); - ::DeleteObject(buffer_bmap); - } - } - } - else - { - if (IsKindOf(CLASSINFO(wxPrinterDC))) - { - // If we are printing source colours are screen colours - // not printer colours and so we need copy the bitmap - // pixel by pixel. - HDC dc_src = (HDC) source->m_hDC; - RECT rect; - for (int x = 0; x < width; x++) - { - for (int y = 0; y < height; y++) - { - HBRUSH brush = ::CreateSolidBrush(::GetPixel(dc_src, x, y)); - rect.left = xdest1 + x; rect.right = rect.left + 1; - rect.top = ydest1 + y; rect.bottom = rect.top + 1; - ::FillRect((HDC) m_hDC, &rect, brush); - ::DeleteObject(brush); - } - } - } - else - { - success = (BitBlt((HDC) m_hDC, xdest1, ydest1, (int)width, (int)height, (HDC) source->m_hDC, - xsrc1, ysrc1, dwRop) != 0); - } - } - ::SetTextColor((HDC)m_hDC, old_textground); - ::SetBkColor((HDC)m_hDC, old_background); - - return success; -} - -void wxDC::GetSize(int* width, int* height) const -{ - long w=::GetDeviceCaps((HDC) m_hDC,HORZRES); - long h=::GetDeviceCaps((HDC) m_hDC,VERTRES); - *width = w; - *height = h; -} - -void wxDC::GetSizeMM(long *width, long *height) const -{ - long w=::GetDeviceCaps((HDC) m_hDC,HORZSIZE); - long h=::GetDeviceCaps((HDC) m_hDC,VERTSIZE); - *width = w; - *height = h; -} - -#if USE_SPLINES -#include "xfspline.inc" -#endif // USE_SPLINES - -void wxDC::DrawPolygon(wxList *list, long xoffset, long yoffset,int fillStyle) -{ - int n = list->Number(); - wxPoint *points = new wxPoint[n]; - - int i = 0; - for(wxNode *node = list->First(); node; node = node->Next()) { - wxPoint *point = (wxPoint *)node->Data(); - points[i].x = point->x; - points[i++].y = point->y; - } - DrawPolygon(n, points, xoffset, yoffset,fillStyle); - delete[] points; -} - -void wxDC::DrawLines(wxList *list, long xoffset, long yoffset) -{ - int n = list->Number(); - wxPoint *points = new wxPoint[n]; - - int i = 0; - for(wxNode *node = list->First(); node; node = node->Next()) { - wxPoint *point = (wxPoint *)node->Data(); - points[i].x = point->x; - points[i++].y = point->y; - } - DrawLines(n, points, xoffset, yoffset); - delete []points; -} - -void wxDC::SetTextForeground(const wxColour& colour) -{ - m_textForegroundColour = colour; -} - -void wxDC::SetTextBackground(const wxColour& colour) -{ - m_textBackgroundColour = colour; -} - -#if USE_SPLINES -// Make a 3-point spline -void wxDC::DrawSpline(long x1, long y1, long x2, long y2, long x3, long y3) -{ - wxList *point_list = new wxList; - - wxPoint *point1 = new wxPoint; - point1->x = x1; point1->y = y1; - point_list->Append((wxObject*)point1); - - wxPoint *point2 = new wxPoint; - point2->x = x2; point2->y = y2; - point_list->Append((wxObject*)point2); - - wxPoint *point3 = new wxPoint; - point3->x = x3; point3->y = y3; - point_list->Append((wxObject*)point3); - - DrawSpline(point_list); - - for(wxNode *node = point_list->First(); node; node = node->Next()) { - wxPoint *p = (wxPoint *)node->Data(); - delete p; - } - delete point_list; -} -#endif - -// For use by wxWindows only, unless custom units are required. -void wxDC::SetLogicalScale(double x, double y) -{ - m_logicalScaleX = x; - m_logicalScaleY = y; -} - -void wxDC::CalcBoundingBox(long x, long y) -{ - if (x < m_minX) m_minX = x; - if (y < m_minY) m_minY = y; - if (x > m_maxX) m_maxX = x; - if (y > m_maxY) m_maxY = y; -} - -void wxDC::GetClippingBox(long *x,long *y,long *w,long *h) const -{ - if (m_clipping) - { - *x = m_clipX1 ; - *y = m_clipY1 ; - *w = (m_clipX2 - m_clipX1) ; - *h = (m_clipY2 - m_clipY1) ; - } - else - *x = *y = *w = *h = 0 ; -} - -#if WXWIN_COMPATIBILITY -void wxDC::GetTextExtent(const wxString& string, float *x, float *y, - float *descent, float *externalLeading, - wxFont *theFont, bool use16bit) const -{ - long x1, y1, descent1, externalLeading1; - GetTextExtent(string, & x1, & y1, & descent1, & externalLeading1, theFont, use16bit); - *x = x1; *y = y1; - if (descent) - *descent = descent1; - if (externalLeading) - *externalLeading = externalLeading1; -} -#endif - -int wxDC::GetDepth(void) const -{ - return (int) ::GetDeviceCaps((HDC) m_hDC,BITSPIXEL); -} - - diff --git a/src/msw/dcclient.cpp b/src/msw/dcclient.cpp deleted file mode 100644 index 48f1c0345c..0000000000 --- a/src/msw/dcclient.cpp +++ /dev/null @@ -1,138 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcclient.cpp -// Purpose: wxClientDC class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dcclient.h" -#endif - -#ifdef __GNUG__ -#pragma implementation -#pragma implementation "dcclient.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#endif - -#include "wx/dcclient.h" -#include "wx/log.h" - -#include - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxDC) -#endif - -wxClientDC::wxClientDC(void) -{ - m_canvas = NULL; -} - -wxClientDC::wxClientDC(wxWindow *the_canvas) -{ - m_canvas = the_canvas; -// BeginDrawing(); - m_hDC = (WXHDC) ::GetDC((HWND) the_canvas->GetHWND()); -} - -wxClientDC::~wxClientDC(void) -{ -// EndDrawing(); - - if (m_canvas && (HDC) m_hDC) - { - SelectOldObjects(m_hDC); - - ::ReleaseDC((HWND) m_canvas->GetHWND(), (HDC) m_hDC); - m_hDC = 0; - } -} - -wxWindowDC::wxWindowDC(void) -{ - m_canvas = NULL; -} - -wxWindowDC::wxWindowDC(wxWindow *the_canvas) -{ - m_canvas = the_canvas; -// m_hDC = (WXHDC) ::GetDCEx((HWND) the_canvas->GetHWND(), NULL, DCX_WINDOW); - m_hDC = (WXHDC) ::GetWindowDC((HWND) the_canvas->GetHWND() ); - m_hDCCount ++; -} - -wxWindowDC::~wxWindowDC(void) -{ - if (m_canvas && m_hDC) - { - SelectOldObjects(m_hDC); - - ::ReleaseDC((HWND) m_canvas->GetHWND(), (HDC) m_hDC); - m_hDC = 0; - } - m_hDCCount --; -} - -wxPaintDC::wxPaintDC(void) -{ - m_canvas = NULL; -} - -static PAINTSTRUCT g_paintStruct; - -// Don't call Begin/EndPaint if it's already been called: -// for example, if calling a base class OnPaint. - -WXHDC wxPaintDC::ms_PaintHDC = 0; -size_t wxPaintDC::ms_PaintCount = 0; // count of ms_PaintHDC usage - -wxPaintDC::wxPaintDC(wxWindow *canvas) -{ - wxCHECK_RET( canvas, "NULL canvas in wxPaintDC ctor" ); - - m_canvas = canvas; - if ( ms_PaintCount > 0 ) { - // it means that we've already called BeginPaint and so we must just - // reuse the same HDC (BeginPaint shouldn't be called more than once) - wxASSERT( ms_PaintHDC ); - - m_hDC = ms_PaintHDC; - ms_PaintCount++; - } - else { - ms_PaintHDC = - m_hDC = (WXHDC)::BeginPaint((HWND)m_canvas->GetHWND(), &g_paintStruct); - ms_PaintCount = 1; - m_hDCCount++; - } -} - -wxPaintDC::~wxPaintDC() -{ - if ( m_hDC ) { - if ( !--ms_PaintCount ) { - ::EndPaint((HWND)m_canvas->GetHWND(), &g_paintStruct); - m_hDCCount--; - m_hDC = NULL; - ms_PaintHDC = NULL; - } - //else: ms_PaintHDC still in use - } -} - diff --git a/src/msw/dcmemory.cpp b/src/msw/dcmemory.cpp deleted file mode 100644 index 243861facc..0000000000 --- a/src/msw/dcmemory.cpp +++ /dev/null @@ -1,128 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcmemory.cpp -// Purpose: wxMemoryDC class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#pragma implementation "dcmemory.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#endif - -#include "wx/dcmemory.h" - -#include - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC) -#endif - -/* - * Memory DC - * - */ - -wxMemoryDC::wxMemoryDC(void) -{ - m_hDC = (WXHDC) ::CreateCompatibleDC(NULL); - m_ok = (m_hDC != 0); - m_bOwnsDC = TRUE; - - SetBrush(*wxWHITE_BRUSH); - SetPen(*wxBLACK_PEN); -} - -wxMemoryDC::wxMemoryDC(wxDC *old_dc) -{ - old_dc->BeginDrawing(); - - m_hDC = (WXHDC) ::CreateCompatibleDC((HDC) old_dc->GetHDC()); - m_ok = (m_hDC != 0); - - old_dc->EndDrawing(); - - SetBrush(*wxWHITE_BRUSH); - SetPen(*wxBLACK_PEN); -} - -wxMemoryDC::~wxMemoryDC(void) -{ -} - -void wxMemoryDC::SelectObject(const wxBitmap& bitmap) -{ - // Select old bitmap out of the device context - if (m_oldBitmap) - { - ::SelectObject((HDC) m_hDC, (HBITMAP) m_oldBitmap); - if (m_selectedBitmap.Ok()) - { - m_selectedBitmap.SetSelectedInto(NULL); - m_selectedBitmap = wxNullBitmap; - } - } - - // Do own check for whether the bitmap is already selected into - // a device context - if (bitmap.GetSelectedInto() && (bitmap.GetSelectedInto() != this)) - { - wxFatalError("Error in wxMemoryDC::SelectObject\nBitmap is selected in another wxMemoryDC.\nDelete the first wxMemoryDC or use SelectObject(NULL)"); - return; - } - - // Check if the bitmap has the correct depth for this device context - if (bitmap.Ok() && (bitmap.GetDepth() != GetDepth())) - { - // Make a new bitmap that has the correct depth. - wxBitmap newBitmap = bitmap.GetBitmapForDC(* this); - - m_selectedBitmap = newBitmap ; - } - else - { - m_selectedBitmap = bitmap; - } - - if (!m_selectedBitmap.Ok()) - return; - - m_selectedBitmap.SetSelectedInto(this); -#if WXDEBUG > 1 - wxDebugMsg("wxMemoryDC::SelectObject: Selecting HBITMAP %X\n", m_selectedBitmap.GetHBITMAP()); -#endif - HBITMAP bm = (HBITMAP) ::SelectObject((HDC) m_hDC, (HBITMAP) m_selectedBitmap.GetHBITMAP()); - - if (bm == ERROR) - { - wxFatalError("Error in wxMemoryDC::SelectObject\nBitmap may not be loaded, or may be selected in another wxMemoryDC.\nDelete the first wxMemoryDC to deselect bitmap."); - } - else if (!m_oldBitmap) - m_oldBitmap = (WXHBITMAP) bm; -} - -void wxMemoryDC::GetSize(int *width, int *height) const -{ - if (!m_selectedBitmap.Ok()) - { - *width = 0; *height = 0; - return; - } - *width = m_selectedBitmap.GetWidth(); - *height = m_selectedBitmap.GetHeight(); -} - diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp deleted file mode 100644 index 35c568f7a5..0000000000 --- a/src/msw/dcprint.cpp +++ /dev/null @@ -1,208 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcprint.cpp -// Purpose: wxPrinterDC class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#pragma implementation "dcprint.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#endif - -#include "wx/dcprint.h" -#include "math.h" -#include "fstream.h" - -#include - -#if USE_COMMON_DIALOGS -#include -#endif - -#ifndef __WIN32__ -#include -#endif - -#ifdef DrawText -#undef DrawText -#endif - -#ifdef GetCharWidth -#undef GetCharWidth -#endif - -#ifdef StartDoc -#undef StartDoc -#endif - -#if !USE_SHARED_LIBRARY -IMPLEMENT_CLASS(wxPrinterDC, wxDC) -#endif - -wxPrinterDC::wxPrinterDC(const wxString& driver_name, const wxString& device_name, const wxString& file, bool interactive, int orientation) -{ - m_isInteractive = interactive; - - if (!file.IsNull() && file != "") - m_filename = file; - -#if USE_COMMON_DIALOGS - if (interactive) - { - PRINTDLG pd; - - pd.lStructSize = sizeof( PRINTDLG ); - pd.hwndOwner=NULL; - pd.hDevMode=(HANDLE)NULL; - pd.hDevNames=(HANDLE)NULL; - pd.Flags=PD_RETURNDC | PD_NOSELECTION | PD_NOPAGENUMS; - pd.nFromPage=0; - pd.nToPage=0; - pd.nMinPage=0; - pd.nMaxPage=0; - pd.nCopies=1; - pd.hInstance=(HINSTANCE)NULL; - - if ( PrintDlg( &pd ) != 0 ) - { - m_hDC = (WXHDC) pd.hDC; - m_ok = TRUE; - } - else - { - m_ok = FALSE; - return; - } - -// m_dontDelete = TRUE; - } - else -#endif - if ((!driver_name.IsNull() && driver_name != "") && - (!device_name.IsNull() && device_name != "") && - (!file.IsNull() && file != "")) - { - m_hDC = (WXHDC) CreateDC((char *) (const char *) driver_name, (char *) (const char *) device_name, (char *) (const char *) file, NULL); - m_ok = m_hDC ? TRUE: FALSE; - } - else - { - m_hDC = wxGetPrinterDC(orientation); - m_ok = m_hDC ? TRUE: FALSE; - } - - if (m_hDC) - { -// int width = GetDeviceCaps(m_hDC, VERTRES); -// int height = GetDeviceCaps(m_hDC, HORZRES); - SetMapMode(MM_TEXT); - } - SetBrush(*wxBLACK_BRUSH); - SetPen(*wxBLACK_PEN); -} - -wxPrinterDC::wxPrinterDC(WXHDC theDC) -{ - m_isInteractive = FALSE; - - m_hDC = theDC; - m_ok = TRUE; - if (m_hDC) - { -// int width = GetDeviceCaps(m_hDC, VERTRES); -// int height = GetDeviceCaps(m_hDC, HORZRES); - SetMapMode(MM_TEXT); - } - SetBrush(*wxBLACK_BRUSH); - SetPen(*wxBLACK_PEN); -} - -wxPrinterDC::~wxPrinterDC(void) -{ -} - -WXHDC wxGetPrinterDC(int orientation) -{ - HDC hDC; - LPDEVMODE lpDevMode = NULL; - LPDEVNAMES lpDevNames; - LPSTR lpszDriverName; - LPSTR lpszDeviceName; - LPSTR lpszPortName; - - PRINTDLG pd; - // __GNUWIN32__ has trouble believing PRINTDLG is 66 bytes - thinks it is 68 - pd.lStructSize = 66; // sizeof(PRINTDLG); - pd.hwndOwner = (HWND)NULL; - pd.hDevMode = NULL; // Will be created by PrintDlg - pd.hDevNames = NULL; // Ditto - pd.Flags = PD_RETURNDEFAULT; - pd.nCopies = 1; - - if (!PrintDlg((LPPRINTDLG)&pd)) - { - if ( pd.hDevMode ) - GlobalFree(pd.hDevMode); - if (pd.hDevNames) - GlobalFree(pd.hDevNames); - - return(0); - } - - if (!pd.hDevNames) - { - if ( pd.hDevMode ) - GlobalFree(pd.hDevMode); - } - - lpDevNames = (LPDEVNAMES)GlobalLock(pd.hDevNames); - lpszDriverName = (LPSTR)lpDevNames + lpDevNames->wDriverOffset; - lpszDeviceName = (LPSTR)lpDevNames + lpDevNames->wDeviceOffset; - lpszPortName = (LPSTR)lpDevNames + lpDevNames->wOutputOffset; - GlobalUnlock(pd.hDevNames); - - if ( pd.hDevMode ) - { - lpDevMode = (DEVMODE*) GlobalLock(pd.hDevMode); - lpDevMode->dmOrientation = orientation; - lpDevMode->dmFields |= DM_ORIENTATION; - } - -#ifdef __WIN32__ - hDC = CreateDC(lpszDriverName, lpszDeviceName, lpszPortName, (DEVMODE *)lpDevMode); -#else - hDC = CreateDC(lpszDriverName, lpszDeviceName, lpszPortName, (LPSTR)lpDevMode); -#endif - - if (pd.hDevMode && lpDevMode) - GlobalUnlock(pd.hDevMode); - - if (pd.hDevNames) - { - GlobalFree(pd.hDevNames); - pd.hDevNames=NULL; - } - if (pd.hDevMode) - { - GlobalFree(pd.hDevMode); - pd.hDevMode=NULL; - } - return (WXHDC) hDC; -} - - diff --git a/src/msw/dcscreen.cpp b/src/msw/dcscreen.cpp deleted file mode 100644 index 71d61dd7d9..0000000000 --- a/src/msw/dcscreen.cpp +++ /dev/null @@ -1,48 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcscreen.cpp -// Purpose: wxScreenDC class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dcscreen.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#endif - -#include "wx/dcscreen.h" - -#include - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC) -#endif - -// Create a DC representing the whole screen -wxScreenDC::wxScreenDC(void) -{ - m_hDC = (WXHDC) ::GetDC(NULL); - m_hDCCount ++; -} - -wxScreenDC::~wxScreenDC(void) -{ - SelectOldObjects(m_hDC); - ::ReleaseDC(NULL, (HDC) m_hDC); - m_hDC = 0; - m_hDCCount --; -} - diff --git a/src/msw/dde.cpp b/src/msw/dde.cpp deleted file mode 100644 index d829167ae1..0000000000 --- a/src/msw/dde.cpp +++ /dev/null @@ -1,785 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dde.cpp -// Purpose: DDE classes -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dde.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#endif - -#if USE_IPC - -#ifndef WX_PRECOMP -#include "wx/utils.h" -#include "wx/app.h" -#endif - -#include "wx/msw/private.h" -#include "wx/dde.h" - -#ifdef __GNUWIN32__ -#include "wx/msw/gnuwin32/extra.h" -#endif - -#include -#include -#include - -#ifdef __WIN32__ -#define _EXPORT /**/ -#else -#define _EXPORT _export -#endif - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxDDEServer, wxServerBase) -IMPLEMENT_DYNAMIC_CLASS(wxDDEClient, wxClientBase) -IMPLEMENT_CLASS(wxDDEConnection, wxConnectionBase) -#endif - -static wxDDEConnection *DDEFindConnection(HCONV hConv); -static void DDEDeleteConnection(HCONV hConv); -static wxDDEServer *DDEFindServer(const wxString& s); - -extern "C" HDDEDATA EXPENTRY _EXPORT _DDECallback( -WORD wType, -WORD wFmt, -HCONV hConv, -HSZ hsz1, -HSZ hsz2, -HDDEDATA hData, -DWORD lData1, -DWORD lData2); - -// Add topic name to atom table before using in conversations -static HSZ DDEAddAtom(const wxString& string); -static HSZ DDEGetAtom(const wxString& string); -static void DDEPrintError(void); - -static DWORD DDEIdInst = 0L; -static wxDDEConnection *DDECurrentlyConnecting = NULL; - -static wxList wxAtomTable(wxKEY_STRING); -static wxList wxDDEClientObjects; -static wxList wxDDEServerObjects; - -char *DDEDefaultIPCBuffer = NULL; -int DDEDefaultIPCBufferSize = 0; - -/* - * Initialization - * - */ - -static bool DDEInitialized = FALSE; - -void wxDDEInitialize() -{ - if (DDEInitialized) - return; - DDEInitialized = TRUE; - - // Should insert filter flags - DdeInitialize(&DDEIdInst, (PFNCALLBACK)MakeProcInstance( - (FARPROC)_DDECallback, wxGetInstance()), - APPCLASS_STANDARD, - 0L); -} - -/* - * CleanUp - */ - -void wxDDECleanUp() -{ - if (DDEIdInst != 0) - { - DdeUninitialize(DDEIdInst); - DDEIdInst = 0; - } - if (DDEDefaultIPCBuffer) - delete [] DDEDefaultIPCBuffer ; -} - -// Global find connection -static wxDDEConnection *DDEFindConnection(HCONV hConv) -{ - wxNode *node = wxDDEServerObjects.First(); - wxDDEConnection *found = NULL; - while (node && !found) - { - wxDDEServer *object = (wxDDEServer *)node->Data(); - found = object->FindConnection((WXHCONV) hConv); - node = node->Next(); - } - if (found) - return found; - - node = wxDDEClientObjects.First(); - while (node && !found) - { - wxDDEClient *object = (wxDDEClient *)node->Data(); - found = object->FindConnection((WXHCONV) hConv); - node = node->Next(); - } - return found; -} - -// Global delete connection -static void DDEDeleteConnection(HCONV hConv) -{ - wxNode *node = wxDDEServerObjects.First(); - bool found = FALSE; - while (node && !found) - { - wxDDEServer *object = (wxDDEServer *)node->Data(); - found = object->DeleteConnection((WXHCONV) hConv); - node = node->Next(); - } - if (found) - return; - - node = wxDDEServerObjects.First(); - while (node && !found) - { - wxDDEClient *object = (wxDDEClient *)node->Data(); - found = object->DeleteConnection((WXHCONV) hConv); - node = node->Next(); - } -} - -// Find a server from a service name -static wxDDEServer *DDEFindServer(const wxString& s) -{ - wxNode *node = wxDDEServerObjects.First(); - wxDDEServer *found = NULL; - while (node && !found) - { - wxDDEServer *object = (wxDDEServer *)node->Data(); - - if (object->GetServiceName() == s) - found = object; - else node = node->Next(); - } - return found; -} - -/* - * Server - * - */ - -wxDDEServer::wxDDEServer(void) -{ - m_serviceName = ""; - wxDDEServerObjects.Append(this); -} - -bool wxDDEServer::Create(const wxString& server_name) -{ - m_serviceName = server_name; - HSZ serviceName = DdeCreateStringHandle(DDEIdInst, (char*) (const char *)server_name, CP_WINANSI); - - if (DdeNameService(DDEIdInst, serviceName, NULL, DNS_REGISTER) == 0) - { - DDEPrintError(); - return FALSE; - } - return TRUE; -} - -wxDDEServer::~wxDDEServer(void) -{ - if (m_serviceName != "") - { - HSZ serviceName = DdeCreateStringHandle(DDEIdInst, (char*) (const char *)m_serviceName, CP_WINANSI); - if (DdeNameService(DDEIdInst, serviceName, NULL, DNS_UNREGISTER) == 0) - { - DDEPrintError(); - } - } - wxDDEServerObjects.DeleteObject(this); - - wxNode *node = m_connections.First(); - while (node) - { - wxDDEConnection *connection = (wxDDEConnection *)node->Data(); - wxNode *next = node->Next(); - connection->OnDisconnect(); // May delete the node implicitly - node = next; - } - - // If any left after this, delete them - node = m_connections.First(); - while (node) - { - wxDDEConnection *connection = (wxDDEConnection *)node->Data(); - wxNode *next = node->Next(); - delete connection; - node = next; - } -} - -wxConnectionBase *wxDDEServer::OnAcceptConnection(const wxString& /* topic */) -{ - return new wxDDEConnection; -} - -wxDDEConnection *wxDDEServer::FindConnection(WXHCONV conv) -{ - wxNode *node = m_connections.First(); - wxDDEConnection *found = NULL; - while (node && !found) - { - wxDDEConnection *connection = (wxDDEConnection *)node->Data(); - if (connection->m_hConv == conv) - found = connection; - else node = node->Next(); - } - return found; -} - -// Only delete the entry in the map, not the actual connection -bool wxDDEServer::DeleteConnection(WXHCONV conv) -{ - wxNode *node = m_connections.First(); - bool found = FALSE; - while (node && !found) - { - wxDDEConnection *connection = (wxDDEConnection *)node->Data(); - if (connection->m_hConv == conv) - { - found = TRUE; - delete node; - } - else node = node->Next(); - } - return found; -} - - -/* - * Client - * - */ - - -wxDDEClient::wxDDEClient(void) -{ - wxDDEClientObjects.Append(this); -} - -wxDDEClient::~wxDDEClient(void) -{ - wxDDEClientObjects.DeleteObject(this); - wxNode *node = m_connections.First(); - while (node) - { - wxDDEConnection *connection = (wxDDEConnection *)node->Data(); - delete connection; // Deletes the node implicitly (see ~wxDDEConnection) - node = m_connections.First(); - } -} - -bool wxDDEClient::ValidHost(const wxString& /* host */) -{ - return TRUE; -} - -wxConnectionBase *wxDDEClient::MakeConnection(const wxString& /* host */, const wxString& server_name, const wxString& topic) -{ - HSZ serviceName = DdeCreateStringHandle(DDEIdInst, (char*) (const char *)server_name, CP_WINANSI); - HSZ topic_atom = DdeCreateStringHandle(DDEIdInst, (char*) (const char *)topic, CP_WINANSI); - - HCONV hConv = DdeConnect(DDEIdInst, serviceName, topic_atom, (PCONVCONTEXT)NULL); - if (hConv == NULL) - return NULL; - else - { - wxDDEConnection *connection = (wxDDEConnection*) OnMakeConnection(); - if (connection) - { - connection->m_hConv = (WXHCONV) hConv; - connection->m_topicName = topic; - connection->m_client = this; - m_connections.Append(connection); - return connection; - } - else return NULL; - } -} - -wxConnectionBase *wxDDEClient::OnMakeConnection(void) -{ - return new wxDDEConnection; -} - -wxDDEConnection *wxDDEClient::FindConnection(WXHCONV conv) -{ - wxNode *node = m_connections.First(); - wxDDEConnection *found = NULL; - while (node && !found) - { - wxDDEConnection *connection = (wxDDEConnection *)node->Data(); - if (connection->m_hConv == conv) - found = connection; - else node = node->Next(); - } - return found; -} - -// Only delete the entry in the map, not the actual connection -bool wxDDEClient::DeleteConnection(WXHCONV conv) -{ - wxNode *node = m_connections.First(); - bool found = FALSE; - while (node && !found) - { - wxDDEConnection *connection = (wxDDEConnection *)node->Data(); - if (connection->m_hConv == conv) - { - found = TRUE; - delete node; - } - else node = node->Next(); - } - return found; -} - -/* - * Connection - */ - -wxDDEConnection::wxDDEConnection(char *buffer, int size) -{ - if (buffer == NULL) - { - if (DDEDefaultIPCBuffer == NULL) - DDEDefaultIPCBuffer = new char[DDEDefaultIPCBufferSize]; - m_bufPtr = DDEDefaultIPCBuffer; - m_bufSize = DDEDefaultIPCBufferSize; - } - else - { - m_bufPtr = buffer; - m_bufSize = size; - } - - m_topicName = ""; - - m_client = NULL; - m_server = NULL; - - m_hConv = 0; - m_sendingData = NULL; -} - -wxDDEConnection::wxDDEConnection(void) -{ - m_hConv = 0; - m_sendingData = NULL; - m_server = NULL; - m_client = NULL; - if (DDEDefaultIPCBuffer == NULL) - DDEDefaultIPCBuffer = new char[DDEDefaultIPCBufferSize]; - - m_bufPtr = DDEDefaultIPCBuffer; - m_bufSize = DDEDefaultIPCBufferSize; - m_topicName = ""; -} - -wxDDEConnection::~wxDDEConnection(void) -{ - if (m_server) - m_server->GetConnections().DeleteObject(this); - else - m_client->GetConnections().DeleteObject(this); -} - -// Calls that CLIENT can make -bool wxDDEConnection::Disconnect(void) -{ - DDEDeleteConnection((HCONV) m_hConv); - return (DdeDisconnect((HCONV) m_hConv) != 0); -} - -bool wxDDEConnection::Execute(char *data, int size, wxDataFormat format) -{ - DWORD result; - if (size < 0) - size = strlen(data); - - size ++; - - return (DdeClientTransaction((LPBYTE)data, size, (HCONV) m_hConv, - NULL, format, XTYP_EXECUTE, 5000, &result) ? TRUE : FALSE); -} - -char *wxDDEConnection::Request(const wxString& item, int *size, wxDataFormat format) -{ - DWORD result; - HSZ atom = DDEGetAtom(item); - - HDDEDATA returned_data = DdeClientTransaction(NULL, 0, (HCONV) m_hConv, - atom, format, XTYP_REQUEST, 5000, &result); - - DWORD len = DdeGetData(returned_data, (LPBYTE)(m_bufPtr), m_bufSize, 0); - - DdeFreeDataHandle(returned_data); - - if (size) *size = (int)len; - if (len > 0) - { - return m_bufPtr; - } - else return NULL; -} - -bool wxDDEConnection::Poke(const wxString& item, char *data, int size, wxDataFormat format) -{ - DWORD result; - if (size < 0) - size = strlen(data); - - size ++; - - HSZ item_atom = DDEGetAtom(item); - return (DdeClientTransaction((LPBYTE)data, size, (HCONV) m_hConv, - item_atom, format, XTYP_POKE, 5000, &result) ? TRUE : FALSE); -} - -bool wxDDEConnection::StartAdvise(const wxString& item) -{ - DWORD result; - HSZ atom = DDEGetAtom(item); - - return (DdeClientTransaction(NULL, 0, (HCONV) m_hConv, - atom, CF_TEXT, XTYP_ADVSTART, 5000, &result) ? TRUE : FALSE); -} - -bool wxDDEConnection::StopAdvise(const wxString& item) -{ - DWORD result; - HSZ atom = DDEGetAtom(item); - - return (DdeClientTransaction(NULL, 0, (HCONV) m_hConv, - atom, CF_TEXT, XTYP_ADVSTOP, 5000, &result) ? TRUE : FALSE); -} - -// Calls that SERVER can make -bool wxDDEConnection::Advise(const wxString& item, char *data, int size, wxDataFormat format) -{ - if (size < 0) - size = strlen(data); - - size ++; - - HSZ item_atom = DDEGetAtom(item); - HSZ topic_atom = DDEGetAtom(m_topicName); - m_sendingData = data; - m_dataSize = size; - m_dataType = format; - return (DdePostAdvise(DDEIdInst, topic_atom, item_atom) != 0); -} - -bool wxDDEConnection::OnDisconnect(void) -{ - delete this; - return TRUE; -} - - -#define DDERETURN HDDEDATA - -HDDEDATA EXPENTRY _EXPORT _DDECallback( -WORD wType, -WORD wFmt, -HCONV hConv, -HSZ hsz1, -HSZ hsz2, -HDDEDATA hData, -DWORD /* lData1 */, -DWORD /* lData2 */) -{ - switch (wType) - { - case XTYP_CONNECT: - { - char topic_buf[100]; - char server_buf[100]; - DdeQueryString(DDEIdInst, hsz1, (LPSTR)topic_buf, sizeof(topic_buf), - CP_WINANSI); - DdeQueryString(DDEIdInst, hsz2, (LPSTR)server_buf, sizeof(topic_buf), - CP_WINANSI); - wxDDEServer *server = DDEFindServer(server_buf); - if (server) - { - wxDDEConnection *connection = - (wxDDEConnection*) server->OnAcceptConnection(wxString(topic_buf)); - if (connection) - { - connection->m_server = server; - server->GetConnections().Append(connection); - connection->m_hConv = 0; - connection->m_topicName = topic_buf; - DDECurrentlyConnecting = connection; - return (DDERETURN)TRUE; - } - } - else return (DDERETURN)0; - break; - } - - case XTYP_CONNECT_CONFIRM: - { - if (DDECurrentlyConnecting) - { - DDECurrentlyConnecting->m_hConv = (WXHCONV) hConv; - DDECurrentlyConnecting = NULL; - return (DDERETURN)TRUE; - } - else return 0; - break; - } - - case XTYP_DISCONNECT: - { - wxDDEConnection *connection = DDEFindConnection(hConv); - if (connection && connection->OnDisconnect()) - { - DDEDeleteConnection(hConv); // Delete mapping: hConv => connection - return (DDERETURN)TRUE; - } - else return (DDERETURN)0; - break; - } - - case XTYP_EXECUTE: - { - wxDDEConnection *connection = DDEFindConnection(hConv); - - if (connection) - { - DWORD len = DdeGetData(hData, (LPBYTE)(connection->m_bufPtr), connection->m_bufSize, 0); - DdeFreeDataHandle(hData); - if (connection->OnExecute(connection->m_topicName, connection->m_bufPtr, (int)len, (wxDataFormat) wFmt)) - return (DDERETURN)DDE_FACK; - else - return (DDERETURN)DDE_FNOTPROCESSED; - } else return (DDERETURN)DDE_FNOTPROCESSED; - break; - } - - case XTYP_REQUEST: - { - wxDDEConnection *connection = DDEFindConnection(hConv); - - if (connection) - { - char item_name[200]; - DdeQueryString(DDEIdInst, hsz2, (LPSTR)item_name, sizeof(item_name), - CP_WINANSI); - - int user_size = -1; - char *data = connection->OnRequest(connection->m_topicName, wxString(item_name), &user_size, (wxDataFormat) wFmt); - if (data) - { - if (user_size < 0) user_size = strlen(data); - - HDDEDATA handle = DdeCreateDataHandle(DDEIdInst, - (LPBYTE)data, user_size + 1, 0, hsz2, wFmt, 0); - return (DDERETURN)handle; - } else return (DDERETURN)0; - } else return (DDERETURN)0; - break; - } - - case XTYP_POKE: - { - wxDDEConnection *connection = DDEFindConnection(hConv); - - if (connection) - { - char item_name[200]; - DdeQueryString(DDEIdInst, hsz2, (LPSTR)item_name, sizeof(item_name), - CP_WINANSI); - DWORD len = DdeGetData(hData, (LPBYTE)(connection->m_bufPtr), connection->m_bufSize, 0); - DdeFreeDataHandle(hData); - connection->OnPoke(connection->m_topicName, wxString(item_name), connection->m_bufPtr, (int)len, (wxDataFormat) wFmt); - return (DDERETURN)DDE_FACK; - } else return (DDERETURN)DDE_FNOTPROCESSED; - break; - } - - case XTYP_ADVSTART: - { - wxDDEConnection *connection = DDEFindConnection(hConv); - - if (connection) - { - char item_name[200]; - DdeQueryString(DDEIdInst, hsz2, (LPSTR)item_name, sizeof(item_name), - CP_WINANSI); - - return (DDERETURN)connection->OnStartAdvise(connection->m_topicName, wxString(item_name)); - } else return (DDERETURN)0; - break; - } - - case XTYP_ADVSTOP: - { - wxDDEConnection *connection = DDEFindConnection(hConv); - - if (connection) - { - char item_name[200]; - DdeQueryString(DDEIdInst, hsz2, (LPSTR)item_name, sizeof(item_name), - CP_WINANSI); - return (DDERETURN)connection->OnStopAdvise(connection->m_topicName, wxString(item_name)); - } else return (DDERETURN)0; - break; - } - - case XTYP_ADVREQ: - { - wxDDEConnection *connection = DDEFindConnection(hConv); - - if (connection && connection->m_sendingData) - { - HDDEDATA data = DdeCreateDataHandle(DDEIdInst, - (LPBYTE)connection->m_sendingData, - connection->m_dataSize, 0, hsz2, connection->m_dataType, 0); - connection->m_sendingData = NULL; - return (DDERETURN)data; - } else return (DDERETURN)NULL; - break; - } - - case XTYP_ADVDATA: - { - wxDDEConnection *connection = DDEFindConnection(hConv); - - if (connection) - { - char item_name[200]; - DdeQueryString(DDEIdInst, hsz2, (LPSTR)item_name, sizeof(item_name), - CP_WINANSI); - - DWORD len = DdeGetData(hData, (LPBYTE)(connection->m_bufPtr), connection->m_bufSize, 0); - DdeFreeDataHandle(hData); - if (connection->OnAdvise(connection->m_topicName, wxString(item_name), connection->m_bufPtr, (int)len, (wxDataFormat) wFmt)) - return (DDERETURN)DDE_FACK; - else - return (DDERETURN)DDE_FNOTPROCESSED; - } else return (DDERETURN)DDE_FNOTPROCESSED; - break; - } - } - return 0; -} - -// Atom table stuff -static HSZ DDEAddAtom(const wxString& string) -{ - HSZ atom = DdeCreateStringHandle(DDEIdInst, (char*) (const char *)string, CP_WINANSI); - wxAtomTable.Append(string, (wxObject *)atom); - return atom; -} - -static HSZ DDEGetAtom(const wxString& string) -{ - wxNode *node = wxAtomTable.Find(string); - if (node) - return (HSZ)node->Data(); - else - { - DDEAddAtom(string); - return (HSZ)(wxAtomTable.Find(string)->Data()); - } -} - -void DDEPrintError(void) -{ - char *err = NULL; - switch (DdeGetLastError(DDEIdInst)) - { - case DMLERR_ADVACKTIMEOUT: - err = "A request for a synchronous advise transaction has timed out."; - break; - case DMLERR_BUSY: - err = "The response to the transaction caused the DDE_FBUSY bit to be set."; - break; - case DMLERR_DATAACKTIMEOUT: - err = "A request for a synchronous data transaction has timed out."; - break; - case DMLERR_DLL_NOT_INITIALIZED: - err = "A DDEML function was called without first calling the DdeInitialize function,\n\ror an invalid instance identifier\n\rwas passed to a DDEML function."; - break; - case DMLERR_DLL_USAGE: - err = "An application initialized as APPCLASS_MONITOR has\n\rattempted to perform a DDE transaction,\n\ror an application initialized as APPCMD_CLIENTONLY has \n\rattempted to perform server transactions."; - break; - case DMLERR_EXECACKTIMEOUT: - err = "A request for a synchronous execute transaction has timed out."; - break; - case DMLERR_INVALIDPARAMETER: - err = "A parameter failed to be validated by the DDEML."; - break; - case DMLERR_LOW_MEMORY: - err = "A DDEML application has created a prolonged race condition."; - break; - case DMLERR_MEMORY_ERROR: - err = "A memory allocation failed."; - break; - case DMLERR_NO_CONV_ESTABLISHED: - err = "A client's attempt to establish a conversation has failed."; - break; - case DMLERR_NOTPROCESSED: - err = "A transaction failed."; - break; - case DMLERR_POKEACKTIMEOUT: - err = "A request for a synchronous poke transaction has timed out."; - break; - case DMLERR_POSTMSG_FAILED: - err = "An internal call to the PostMessage function has failed. "; - break; - case DMLERR_REENTRANCY: - err = "Reentrancy problem."; - break; - case DMLERR_SERVER_DIED: - err = "A server-side transaction was attempted on a conversation\n\rthat was terminated by the client, or the server\n\rterminated before completing a transaction."; - break; - case DMLERR_SYS_ERROR: - err = "An internal error has occurred in the DDEML."; - break; - case DMLERR_UNADVACKTIMEOUT: - err = "A request to end an advise transaction has timed out."; - break; - case DMLERR_UNFOUND_QUEUE_ID: - err = "An invalid transaction identifier was passed to a DDEML function.\n\rOnce the application has returned from an XTYP_XACT_COMPLETE callback,\n\rthe transaction identifier for that callback is no longer valid."; - break; - default: - err = "Unrecognised error type."; - break; - } - MessageBox(NULL, (LPCSTR)err, "DDE Error", MB_OK | MB_ICONINFORMATION); -} - -#endif - // USE_IPC diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp deleted file mode 100644 index 83d0548920..0000000000 --- a/src/msw/dialog.cpp +++ /dev/null @@ -1,612 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dialog.cpp -// Purpose: wxDialog class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dialog.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/dialog.h" -#include "wx/utils.h" -#include "wx/frame.h" -#include "wx/app.h" -#include "wx/settings.h" -#endif - -#include "wx/msw/private.h" - -#if USE_COMMON_DIALOGS -#include -#endif - -#define wxDIALOG_DEFAULT_X 300 -#define wxDIALOG_DEFAULT_Y 300 - -// Lists to keep track of windows, so we can disable/enable them -// for modal dialogs -wxList wxModalDialogs; -wxList wxModelessWindows; // Frames and modeless dialogs -extern wxList wxPendingDelete; - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxPanel) - -BEGIN_EVENT_TABLE(wxDialog, wxPanel) - EVT_BUTTON(wxID_OK, wxDialog::OnOK) - EVT_BUTTON(wxID_APPLY, wxDialog::OnApply) - EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel) - EVT_CHAR_HOOK(wxDialog::OnCharHook) - EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged) - EVT_CLOSE(wxDialog::OnCloseWindow) -END_EVENT_TABLE() - -#endif - -long wxDialog::MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) -{ - return ::CallWindowProc(CASTWNDPROC m_oldWndProc, (HWND) GetHWND(), (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam); -} - -bool wxDialog::MSWProcessMessage(WXMSG* pMsg) -{ - return (::IsDialogMessage((HWND) GetHWND(), (MSG*)pMsg) != 0); -} - -bool wxDialog::MSWOnClose(void) -{ - return Close(); -} - -wxDialog::wxDialog(void) -{ - m_isShown = FALSE; - m_modalShowing = FALSE; - - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); - SetDefaultBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); -} - -bool wxDialog::Create(wxWindow *parent, wxWindowID id, - const wxString& title, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); - SetDefaultBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); - SetName(name); - - if (!parent) - wxTopLevelWindows.Append(this); - -// windowFont = wxTheFontList->FindOrCreateFont(11, wxSWISS, wxNORMAL, wxNORMAL); - - if (parent) parent->AddChild(this); - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - if (x < 0) x = wxDIALOG_DEFAULT_X; - if (y < 0) y = wxDIALOG_DEFAULT_Y; - - m_windowStyle = style; - - m_isShown = FALSE; - m_modalShowing = FALSE; - - if (width < 0) - width = 500; - if (height < 0) - height = 500; - - WXDWORD extendedStyle = MakeExtendedStyle(m_windowStyle); - if (m_windowStyle & wxSTAY_ON_TOP) - extendedStyle |= WS_EX_TOPMOST; - - // Allows creation of dialogs with & without captions under MSWindows - if(style & wxCAPTION){ - MSWCreate(m_windowId, (wxWindow *)parent, NULL, this, NULL, x, y, width, height, 0, "wxCaptionDialog", - extendedStyle); - } - else{ - MSWCreate(m_windowId, (wxWindow *)parent, NULL, this, NULL, x, y, width, height, 0, "wxNoCaptionDialog", - extendedStyle); - } - - SubclassWin(GetHWND()); - - SetWindowText((HWND) GetHWND(), (const char *)title); - SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT)); - - return TRUE; -} - -void wxDialog::SetModal(bool flag) -{ - if ( flag ) - m_windowStyle |= wxDIALOG_MODAL ; - else - if ( m_windowStyle & wxDIALOG_MODAL ) - m_windowStyle -= wxDIALOG_MODAL ; - - wxModelessWindows.DeleteObject(this); - if (!flag) - wxModelessWindows.Append(this); -} - -wxDialog::~wxDialog() -{ - m_isBeingDeleted = TRUE; - - wxTopLevelWindows.DeleteObject(this); - - if (m_modalShowing) - { - Show(FALSE); - // For some reason, wxWindows can activate another task altogether - // when a frame is destroyed after a modal dialog has been invoked. - // Try to bring the parent to the top. - // dfgg: I moved this following line from end of function - - // must not call if another window is on top!! - // This can often happen with Close() and delayed deleting - if (GetParent() && GetParent()->GetHWND()) - ::BringWindowToTop((HWND) GetParent()->GetHWND()); - } - - m_modalShowing = FALSE; - if ( GetHWND() ) - ShowWindow((HWND) GetHWND(), SW_HIDE); - - if ( (GetWindowStyleFlag() & wxDIALOG_MODAL) != wxDIALOG_MODAL ) - wxModelessWindows.DeleteObject(this); - - UnsubclassWin(); - - // If this is the last top-level window, exit. - if (wxTheApp && (wxTopLevelWindows.Number() == 0)) - { - wxTheApp->SetTopWindow(NULL); - - if (wxTheApp->GetExitOnFrameDelete()) - { - PostQuitMessage(0); - } - } -} - -// By default, pressing escape cancels the dialog -void wxDialog::OnCharHook(wxKeyEvent& event) -{ - if (GetHWND()) - { - if (event.m_keyCode == WXK_ESCAPE) - { - // Behaviour changed in 2.0: we'll send a Cancel message - // to the dialog instead of Close. - wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL); - cancelEvent.SetEventObject( this ); - GetEventHandler()->ProcessEvent(cancelEvent); - - return; - } - } - // We didn't process this event. - event.Skip(); -} - -void wxDialog::OnPaint(wxPaintEvent& event) -{ - // No: if you call the default procedure, it makes - // the following painting code not work. -// wxWindow::OnPaint(event); -} - -void wxDialog::Fit(void) -{ - wxWindow::Fit(); -} - -void wxDialog::Iconize(bool WXUNUSED(iconize)) -{ - // Windows dialog boxes can't be iconized -} - -bool wxDialog::IsIconized(void) const -{ - return FALSE; -} - -void wxDialog::SetSize(int x, int y, int width, int height, int WXUNUSED(sizeFlags)) -{ - wxWindow::SetSize(x, y, width, height); -} - -void wxDialog::SetClientSize(int width, int height) -{ - HWND hWnd = (HWND) GetHWND(); - RECT rect; - GetClientRect(hWnd, &rect); - - RECT rect2; - GetWindowRect(hWnd, &rect2); - - // Find the difference between the entire window (title bar and all) - // and the client area; add this to the new client size to move the - // window - int actual_width = rect2.right - rect2.left - rect.right + width; - int actual_height = rect2.bottom - rect2.top - rect.bottom + height; - - MoveWindow(hWnd, rect2.left, rect2.top, actual_width, actual_height, TRUE); - - wxSizeEvent event(wxSize(actual_width, actual_height), m_windowId); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); -} - -void wxDialog::GetPosition(int *x, int *y) const -{ - HWND hWnd = (HWND) GetHWND(); - RECT rect; - GetWindowRect(hWnd, &rect); - - *x = rect.left; - *y = rect.top; -} - -bool wxDialog::IsShown(void) const -{ - return m_isShown; -} - -bool wxDialog::Show(bool show) -{ - m_isShown = show; - - if (show) - InitDialog(); - - bool modal = ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL) ; - -#if WXGARBAGE_COLLECTION_ON /* MATTHEW: GC */ - if (!modal) { - if (show) { - if (!wxModelessWindows.Member(this)) - wxModelessWindows.Append(this); - } else - wxModelessWindows.DeleteObject(this); - } - if (show) { - if (!wxTopLevelWindows.Member(this)) - wxTopLevelWindows.Append(this); - } else - wxTopLevelWindows.DeleteObject(this); -#endif - - if (modal) - { - if (show) - { - m_hwndOldFocus = (WXHWND)::GetFocus(); - - wxList DisabledWindows; - if (m_modalShowing) - { - BringWindowToTop((HWND) GetHWND()); - return TRUE; - } - - m_modalShowing = TRUE; - wxNode *node = wxModalDialogs.First(); - while (node) - { - wxDialog *box = (wxDialog *)node->Data(); - if (box != this) - ::EnableWindow((HWND) box->GetHWND(), FALSE); - node = node->Next(); - } - node = wxModelessWindows.First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (::IsWindowEnabled((HWND) win->GetHWND())) - { - ::EnableWindow((HWND) win->GetHWND(), FALSE); - DisabledWindows.Append(win); - } - node = node->Next(); - } - - ShowWindow((HWND) GetHWND(), SW_SHOW); - EnableWindow((HWND) GetHWND(), TRUE); - BringWindowToTop((HWND) GetHWND()); - - if (!wxModalDialogs.Member(this)) - wxModalDialogs.Append(this); - - MSG msg; - // Must test whether this dialog still exists: we may not process - // a message before the deletion. - while (wxModalDialogs.Member(this) && m_modalShowing && GetMessage(&msg, NULL, 0, 0)) - { - if (m_acceleratorTable.Ok() && - ::TranslateAccelerator((HWND) GetHWND(), (HACCEL) m_acceleratorTable.GetHACCEL(), &msg)) - { - // Have processed the message - } - else if (!IsDialogMessage((HWND) GetHWND(), &msg)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - if (m_modalShowing && !::PeekMessage(&msg, 0, 0, 0, PM_NOREMOVE)) - // dfgg: NB MUST test m_modalShowing again as the message loop could have triggered - // a Show(FALSE) in the mean time!!! - // Without the test, we might delete the dialog before the end of modal showing. - { - while (wxTheApp->ProcessIdle() && m_modalShowing) - { - // Keep going until we decide we've done enough - } - } - } - // dfgg: now must specifically re-enable all other app windows that we disabled earlier - node=DisabledWindows.First(); - while(node) { - wxWindow* win = (wxWindow*) node->Data(); - HWND hWnd = (HWND) win->GetHWND(); - if (::IsWindow(hWnd) && (wxModalDialogs.Member(win) || wxModelessWindows.Member(win) )) - ::EnableWindow(hWnd,TRUE); - node=node->Next(); - } - } - else // !show - { - ::SetFocus((HWND)m_hwndOldFocus); - - wxModalDialogs.DeleteObject(this); - - wxNode *last = wxModalDialogs.Last(); - - // If there's still a modal dialog active, we - // enable it, else we enable all modeless windows - if (last) - { - wxDialog *box = (wxDialog *)last->Data(); - HWND hwnd = (HWND) box->GetHWND(); - if (box->m_winEnabled) - EnableWindow(hwnd, TRUE); - BringWindowToTop(hwnd); - } - else - { - wxNode *node = wxModelessWindows.First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - HWND hwnd = (HWND) win->GetHWND(); - // Only enable again if not user-disabled. - if (win->IsUserEnabled()) - EnableWindow(hwnd, TRUE); - node = node->Next(); - } - } - // Try to highlight the correct window (the parent) - HWND hWndParent = 0; - if (GetParent()) - { - hWndParent = (HWND) GetParent()->GetHWND(); - if (hWndParent) - ::BringWindowToTop(hWndParent); - } - ShowWindow((HWND) GetHWND(), SW_HIDE); - m_modalShowing = FALSE; - } - } - else // !modal - { - if (show) - { - ShowWindow((HWND) GetHWND(), SW_SHOW); - BringWindowToTop((HWND) GetHWND()); - } - else - { - // Try to highlight the correct window (the parent) - HWND hWndParent = 0; - if (GetParent()) - { - hWndParent = (HWND) GetParent()->GetHWND(); - if (hWndParent) - ::BringWindowToTop(hWndParent); - } - ShowWindow((HWND) GetHWND(), SW_HIDE); - } - } - return TRUE; -} - -void wxDialog::SetTitle(const wxString& title) -{ - SetWindowText((HWND) GetHWND(), (const char *)title); -} - -wxString wxDialog::GetTitle(void) const -{ - GetWindowText((HWND) GetHWND(), wxBuffer, 1000); - return wxString(wxBuffer); -} - -void wxDialog::Centre(int direction) -{ - int x_offset,y_offset ; - int display_width, display_height; - int width, height, x, y; - wxFrame *frame ; - if (direction & wxCENTER_FRAME) - { - frame = (wxFrame*)GetParent() ; - if (frame) - { - frame->GetPosition(&x_offset,&y_offset) ; - frame->GetSize(&display_width,&display_height) ; - } - } - else - frame = NULL ; - - if (frame==NULL) - { - wxDisplaySize(&display_width, &display_height); - x_offset = 0 ; - y_offset = 0 ; - } - - - GetSize(&width, &height); - GetPosition(&x, &y); - - if (direction & wxHORIZONTAL) - x = (int)((display_width - width)/2); - if (direction & wxVERTICAL) - y = (int)((display_height - height)/2); - - SetSize(x+x_offset, y+y_offset, width, height); -} - -// Replacement for Show(TRUE) for modal dialogs - returns return code -int wxDialog::ShowModal(void) -{ - m_windowStyle |= wxDIALOG_MODAL; - Show(TRUE); - return GetReturnCode(); -} - -void wxDialog::EndModal(int retCode) -{ - SetReturnCode(retCode); - Show(FALSE); -} - -// Define for each class of dialog and control -WXHBRUSH wxDialog::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ -#if CTL3D - HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam); - return (WXHBRUSH) hbrush; -#else - return 0; -#endif -} - -// Standard buttons -void wxDialog::OnOK(wxCommandEvent& event) -{ - if ( Validate() && TransferDataFromWindow() ) - { - if ( IsModal() ) - EndModal(wxID_OK); - else - { - SetReturnCode(wxID_OK); - this->Show(FALSE); - } - } -} - -void wxDialog::OnApply(wxCommandEvent& event) -{ - if (Validate()) - TransferDataFromWindow(); - // TODO probably need to disable the Apply button until things change again -} - -void wxDialog::OnCancel(wxCommandEvent& event) -{ - if ( IsModal() ) - EndModal(wxID_CANCEL); - else - { - SetReturnCode(wxID_CANCEL); - this->Show(FALSE); - } -} - -bool wxDialog::OnClose(void) -{ - // Behaviour changed in 2.0: we'll send a Cancel message by default, - // which may close the dialog. - // Check for looping if the Cancel event handler calls Close() - - static wxList closing; - - if ( closing.Member(this) ) - return FALSE; - - closing.Append(this); - - wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL); - cancelEvent.SetEventObject( this ); - GetEventHandler()->ProcessEvent(cancelEvent); - - closing.DeleteObject(this); - - return FALSE; -} - -void wxDialog::OnCloseWindow(wxCloseEvent& event) -{ - // Compatibility - if ( GetEventHandler()->OnClose() || event.GetForce()) - { - this->Destroy(); - } -} - -// Destroy the window (delayed, if a managed window) -bool wxDialog::Destroy(void) -{ - if (!wxPendingDelete.Member(this)) - wxPendingDelete.Append(this); - return TRUE; -} - -void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& event) -{ -#if CTL3D - Ctl3dColorChange(); -#else - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); - SetDefaultBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); - Refresh(); -#endif -} - -long wxDialog::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ - return wxWindow::MSWWindowProc(message, wParam, lParam); -} - diff --git a/src/msw/dib.cpp b/src/msw/dib.cpp deleted file mode 100644 index d86337576a..0000000000 --- a/src/msw/dib.cpp +++ /dev/null @@ -1,934 +0,0 @@ -/******************************************************************************* - * * - * MODULE : DIB.CC * - * * - * DESCRIPTION : Routines for dealing with Device Independent Bitmaps. * - * * - * FUNCTIONS : * - * * - * ReadDIB() - Reads a DIB * - * * - * WriteDIB() - Writes a global handle in CF_DIB format* - * to a file. * - * * - * PaletteSize() - Calculates the palette size in bytes * - * of given DIB * - * * - * DibNumColors() - Determines the number of colors in DIB * - * * - * DibFromBitmap() - Creates a DIB repr. the DDB passed in. * - * * - * * - * lread() - Private routine to read more than 64k * - * * - * lwrite() - Private routine to write more than 64k * - * * - *******************************************************************************/ - -// For compilers that support precompilation, includes "wx.h". -#define IN_WX_MAIN_CPP -#include "wx/wxprec.h" - -#if defined(__BORLANDC__) -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/setup.h" -#include "wx/defs.h" -#endif - -#include -#include -#include -#include - -#include "wx/msw/dib.h" - -#ifdef __GNUWIN32__ -#include "wx/msw/gnuwin32/extra.h" -#endif - -#ifndef SEEK_CUR -/* flags for _lseek */ -#define SEEK_CUR 1 -#define SEEK_END 2 -#define SEEK_SET 0 -#endif - -#define MAXREAD 32768 /* Number of bytes to be read during */ - /* each read operation. */ - -/* Header signatutes for various resources */ -#define BFT_ICON 0x4349 /* 'IC' */ -#define BFT_BITMAP 0x4d42 /* 'BM' */ -#define BFT_CURSOR 0x5450 /* 'PT' */ - -/* macro to determine if resource is a DIB */ -#define ISDIB(bft) ((bft) == BFT_BITMAP) - -/* Macro to align given value to the closest DWORD (unsigned long ) */ -#define ALIGNULONG(i) ((i+3)/4*4) - -/* Macro to determine to round off the given value to the closest byte */ -#define WIDTHBYTES(i) ((i+31)/32*4) - -#define PALVERSION 0x300 -#define MAXPALETTE 256 /* max. # supported palette entries */ - -DWORD PASCAL lread(int fh, VOID FAR *pv, DWORD ul); -DWORD PASCAL lwrite(int fh, VOID FAR *pv, DWORD ul); - -BOOL WriteDIB (LPSTR szFile,HANDLE hdib); -WORD PaletteSize (VOID FAR * pv); -WORD DibNumColors (VOID FAR * pv); -// HANDLE DibFromBitmap (HBITMAP hbm, DWORD biStyle, WORD biBits, HPALETTE hpal); -BOOL PASCAL MakeBitmapAndPalette(HDC,HANDLE,HPALETTE *,HBITMAP *); -HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER); -BOOL ReadDIB(LPSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette); - -/**************************************************************************** - * * - * FUNCTION : WriteDIB(LPSTR szFile,HANDLE hdib) * - * * - * PURPOSE : Write a global handle in CF_DIB format to a file. * - * * - * RETURNS : TRUE - if successful. * - * FALSE - otherwise * - * * - ****************************************************************************/ - -BOOL WriteDIB(LPSTR szFile, HANDLE hdib) -{ - BITMAPFILEHEADER hdr; - LPBITMAPINFOHEADER lpbi; - int fh; - OFSTRUCT of; - - if (!hdib) - return FALSE; - - fh = OpenFile(szFile, &of, OF_CREATE | OF_READWRITE); - if (fh == -1) - return FALSE; - -#ifdef __WINDOWS_386__ - lpbi = (LPBITMAPINFOHEADER) MK_FP32(GlobalLock(hdib)); -#else - lpbi = (LPBITMAPINFOHEADER) GlobalLock(hdib); -#endif - /* Fill in the fields of the file header */ - hdr.bfType = BFT_BITMAP; - hdr.bfSize = GlobalSize(hdib) + sizeof(BITMAPFILEHEADER); - hdr.bfReserved1 = 0; - hdr.bfReserved2 = 0; - hdr.bfOffBits = (DWORD) sizeof(BITMAPFILEHEADER) + lpbi->biSize + - PaletteSize(lpbi); - - /* Write the file header */ - _lwrite(fh, (LPSTR) &hdr, sizeof(BITMAPFILEHEADER)); - - /* Write the DIB header and the bits */ - lwrite(fh, (LPSTR) lpbi, GlobalSize(hdib)); - - GlobalUnlock(hdib); - _lclose(fh); - return TRUE; -} - -/**************************************************************************** - * * - * FUNCTION : PaletteSize(VOID FAR * pv) * - * * - * PURPOSE : Calculates the palette size in bytes. If the info. block * - * is of the BITMAPCOREHEADER type, the number of colors is * - * multiplied by 3 to give the palette size, otherwise the * - * number of colors is multiplied by 4. * - * * - * RETURNS : Palette size in number of bytes. * - * * - ****************************************************************************/ - -WORD PaletteSize(VOID FAR * pv) -{ - LPBITMAPINFOHEADER lpbi; - WORD NumColors; - - lpbi = (LPBITMAPINFOHEADER) pv; - NumColors = DibNumColors(lpbi); - - if (lpbi->biSize == sizeof(BITMAPCOREHEADER)) - return NumColors * sizeof(RGBTRIPLE); - else - return NumColors * sizeof(RGBQUAD); -} - -/**************************************************************************** - * * - * FUNCTION : DibNumColors(VOID FAR * pv) * - * * - * PURPOSE : Determines the number of colors in the DIB by looking at * - * the BitCount filed in the info block. * - * * - * RETURNS : The number of colors in the DIB. * - * * - ****************************************************************************/ - -WORD DibNumColors(VOID FAR *pv) -{ - int bits; - BITMAPINFOHEADER *lpbi; - BITMAPCOREHEADER *lpbc; - - lpbi = ((BITMAPINFOHEADER*) pv); - lpbc = ((BITMAPCOREHEADER*) pv); - - /* With the BITMAPINFO format headers, the size of the palette - * is in biClrUsed, whereas in the BITMAPCORE - style headers, it - * is dependent on the bits per pixel ( = 2 raised to the power of - * bits/pixel). - */ - if (lpbi->biSize != sizeof(BITMAPCOREHEADER)) { - if (lpbi->biClrUsed != 0) - return (WORD) lpbi->biClrUsed; - bits = lpbi->biBitCount; - } - else - bits = lpbc->bcBitCount; - - switch (bits) { - case 1: - return 2; - case 4: - return 16; - case 8: - return 256; - default: - /* A 24 bitcount DIB has no color table */ - return 0; - } -} - -/**************************************************************************** - * * - * FUNCTION : DibFromBitmap() * - * * - * PURPOSE : Will create a global memory block in DIB format that * - * represents the Device-dependent bitmap (DDB) passed in. * - * * - * RETURNS : A handle to the DIB * - * * - ****************************************************************************/ - -#if NOTHING -HANDLE DibFromBitmap(HBITMAP hbm, DWORD biStyle, WORD biBits, HPALETTE hpal) -{ - BITMAP bm; - BITMAPINFOHEADER bi; - BITMAPINFOHEADER FAR *lpbi; - DWORD dwLen; - HANDLE hdib; - HANDLE h; - HDC hdc; - - if (!hbm) - return NULL; - - if (hpal == NULL) - hpal = GetStockObject(DEFAULT_PALETTE); - - GetObject(hbm, sizeof (bm), (LPSTR) &bm); - - if (biBits == 0) - biBits = bm.bmPlanes * bm.bmBitsPixel; - - bi.biSize = sizeof(BITMAPINFOHEADER); - bi.biWidth = bm.bmWidth; - bi.biHeight = bm.bmHeight; - bi.biPlanes = 1; - bi.biBitCount = biBits; - bi.biCompression = biStyle; - bi.biSizeImage = 0; - bi.biXPelsPerMeter = 0; - bi.biYPelsPerMeter = 0; - bi.biClrUsed = 0; - bi.biClrImportant = 0; - - dwLen = bi.biSize + PaletteSize(&bi); - - hdc = GetDC(NULL); - hpal = SelectPalette(hdc, hpal, FALSE); - RealizePalette(hdc); - - hdib = GlobalAlloc(GHND, dwLen); - - if (!hdib) { - SelectPalette(hdc, hpal, FALSE); - ReleaseDC(NULL, hdc); - return NULL; - } - -#ifdef __WINDOWS_386__ - lpbi = (BITMAPINFOHEADER FAR *) MK_FP32(GlobalLock(hdib)); -#else - lpbi = (BITMAPINFOHEADER FAR *) GlobalLock(hdib); -#endif - - *lpbi = bi; - - /* call GetDIBits with a NULL lpBits param, so it will calculate the - * biSizeImage field for us - */ - GetDIBits(hdc, hbm, 0, (WORD) bi.biHeight, - NULL, (LPBITMAPINFO) lpbi, DIB_RGB_COLORS); - - bi = *lpbi; - GlobalUnlock(hdib); - - /* If the driver did not fill in the biSizeImage field, make one up */ - if (bi.biSizeImage == 0) { - bi.biSizeImage = WIDTHBYTES((DWORD)bm.bmWidth * biBits) * bm.bmHeight; - - if (biStyle != BI_RGB) - bi.biSizeImage = (bi.biSizeImage * 3) / 2; - } - - /* realloc the buffer big enough to hold all the bits */ - dwLen = bi.biSize + PaletteSize(&bi) + bi.biSizeImage; - if (h = GlobalReAlloc(hdib, dwLen, 0)) - hdib = h; - else { - GlobalFree(hdib); - hdib = NULL; - - SelectPalette(hdc, hpal, FALSE); - ReleaseDC(NULL, hdc); - return hdib; - } - - /* call GetDIBits with a NON-NULL lpBits param, and actualy get the - * bits this time - */ -#ifdef __WINDOWS_386__ - lpbi = (BITMAPINFOHEADER FAR *) MK_FP32(GlobalLock(hdib)); -#else - lpbi = (BITMAPINFOHEADER FAR *) GlobalLock(hdib); -#endif - - if (GetDIBits(hdc, - hbm, - 0, - (WORD) bi.biHeight, - (LPSTR) lpbi + (WORD) lpbi->biSize + PaletteSize(lpbi), - (LPBITMAPINFO) lpbi, DIB_RGB_COLORS) == 0) { - GlobalUnlock(hdib); - hdib = NULL; - SelectPalette(hdc, hpal, FALSE); - ReleaseDC(NULL, hdc); - return NULL; - } - - bi = *lpbi; - GlobalUnlock(hdib); - - SelectPalette(hdc, hpal, FALSE); - ReleaseDC(NULL, hdc); - return hdib; -} -#endif - - /************* PRIVATE ROUTINES TO READ/WRITE MORE THAN 64K ***************/ -/**************************************************************************** - * * - * FUNCTION : lread(int fh, VOID FAR *pv, DWORD ul) * - * * - * PURPOSE : Reads data in steps of 32k till all the data has been read.* - * * - * RETURNS : 0 - If read did not proceed correctly. * - * number of bytes read otherwise. * - * * - ****************************************************************************/ - -DWORD PASCAL lread(int fh, void far *pv, DWORD ul) -{ - DWORD ulT = ul; -#if defined(WINNT) || defined(__WIN32__) || defined(__WIN32__) - BYTE *hp = (BYTE *) pv; -#else - BYTE huge *hp = (BYTE huge *) pv; -#endif - while (ul > (DWORD) MAXREAD) { - if (_lread(fh, (LPSTR) hp, (WORD) MAXREAD) != MAXREAD) - return 0; - ul -= MAXREAD; - hp += MAXREAD; - } - if (_lread(fh, (LPSTR) hp, (WORD) ul) != (WORD) ul) - return 0; - return ulT; -} - -/**************************************************************************** - * * - * FUNCTION : lwrite(int fh, VOID FAR *pv, DWORD ul) * - * * - * PURPOSE : Writes data in steps of 32k till all the data is written. * - * * - * RETURNS : 0 - If write did not proceed correctly. * - * number of bytes written otherwise. * - * * - ****************************************************************************/ - -DWORD PASCAL lwrite(int fh, VOID FAR *pv, DWORD ul) -{ - DWORD ulT = ul; -#if defined(WINNT) || defined(__WIN32__) || defined(__WIN32__) - BYTE *hp = (BYTE *) pv; -#else - BYTE huge *hp = (BYTE huge *) pv; -#endif - while (ul > MAXREAD) { - if (_lwrite(fh, (LPSTR) hp, (WORD) MAXREAD) != MAXREAD) - return 0; - ul -= MAXREAD; - hp += MAXREAD; - } - if (_lwrite(fh, (LPSTR) hp, (WORD) ul) != (WORD) ul) - return 0; - return ulT; -} - -/**************************************************************************** - * - * FUNCTION : ReadDIB(hWnd) - * - * PURPOSE : Reads a DIB from a file, obtains a handle to its - * BITMAPINFO struct. and loads the DIB. Once the DIB - * is loaded, the function also creates a bitmap and - * palette out of the DIB for a device-dependent form. - * - * RETURNS : TRUE - DIB loaded and bitmap/palette created - * The DIBINIT structure pointed to by pInfo is - * filled with the appropriate handles. - * FALSE - otherwise - * - ****************************************************************************/ -BOOL ReadDIB(LPSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette) -{ - int fh; - LPBITMAPINFOHEADER lpbi; - OFSTRUCT of; - BITMAPFILEHEADER bf; - WORD nNumColors; - BOOL result = FALSE; - char str[128]; - WORD offBits; - HDC hDC; - BOOL bCoreHead = FALSE; - HANDLE hDIB = 0; - - /* Open the file and get a handle to it's BITMAPINFO */ - - fh = OpenFile (lpFileName, &of, OF_READ); - if (fh == -1) { - wsprintf(str,"Can't open file '%ls'", (LPSTR)lpFileName); - MessageBox(NULL, str, "Error", MB_ICONSTOP | MB_OK); - return (0); - } - - hDIB = GlobalAlloc(GHND, (DWORD)(sizeof(BITMAPINFOHEADER) + - 256 * sizeof(RGBQUAD))); - if (!hDIB) - return(0); - -#ifdef __WINDOWS_386__ - lpbi = (LPBITMAPINFOHEADER)MK_FP32(GlobalLock(hDIB)); -#else - lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIB); -#endif - - /* read the BITMAPFILEHEADER */ - if (sizeof (bf) != _lread (fh, (LPSTR)&bf, sizeof (bf))) - goto ErrExit; - - if (bf.bfType != 0x4d42) /* 'BM' */ - goto ErrExit; - - if (sizeof(BITMAPCOREHEADER) != _lread (fh, (LPSTR)lpbi, sizeof(BITMAPCOREHEADER))) - goto ErrExit; - - if (lpbi->biSize == sizeof(BITMAPCOREHEADER)) - { - lpbi->biSize = sizeof(BITMAPINFOHEADER); - lpbi->biBitCount = ((LPBITMAPCOREHEADER)lpbi)->bcBitCount; - lpbi->biPlanes = ((LPBITMAPCOREHEADER)lpbi)->bcPlanes; - lpbi->biHeight = ((LPBITMAPCOREHEADER)lpbi)->bcHeight; - lpbi->biWidth = ((LPBITMAPCOREHEADER)lpbi)->bcWidth; - bCoreHead = TRUE; - } - else - { - // get to the start of the header and read INFOHEADER - _llseek(fh,sizeof(BITMAPFILEHEADER),SEEK_SET); - if (sizeof(BITMAPINFOHEADER) != _lread (fh, (LPSTR)lpbi, sizeof(BITMAPINFOHEADER))) - goto ErrExit; - } - - if (!(nNumColors = (WORD)lpbi->biClrUsed)) - { - /* no color table for 24-bit, default size otherwise */ - if (lpbi->biBitCount != 24) - nNumColors = 1 << lpbi->biBitCount; /* standard size table */ - } - - /* fill in some default values if they are zero */ - if (lpbi->biClrUsed == 0) - lpbi->biClrUsed = nNumColors; - - if (lpbi->biSizeImage == 0) - { - lpbi->biSizeImage = ((((lpbi->biWidth * (DWORD)lpbi->biBitCount) + 31) & ~31) >> 3) - * lpbi->biHeight; - } - - /* get a proper-sized buffer for header, color table and bits */ - GlobalUnlock(hDIB); - hDIB = GlobalReAlloc(hDIB, lpbi->biSize + - nNumColors * sizeof(RGBQUAD) + - lpbi->biSizeImage, 0); - if (!hDIB) /* can't resize buffer for loading */ - goto ErrExit2; - -#ifdef __WINDOWS_386__ - lpbi = (LPBITMAPINFOHEADER)MK_FP32(GlobalLock(hDIB)); -#else - lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIB); -#endif - - /* read the color table */ - if (!bCoreHead) - _lread(fh, (LPSTR)(lpbi) + lpbi->biSize, nNumColors * sizeof(RGBQUAD)); - else - { - signed int i; - RGBQUAD FAR *pQuad; - RGBTRIPLE FAR *pTriple; - - _lread(fh, (LPSTR)(lpbi) + lpbi->biSize, nNumColors * sizeof(RGBTRIPLE)); - - pQuad = (RGBQUAD FAR *)((LPSTR)lpbi + lpbi->biSize); - pTriple = (RGBTRIPLE FAR *) pQuad; - for (i = nNumColors - 1; i >= 0; i--) - { - pQuad[i].rgbRed = pTriple[i].rgbtRed; - pQuad[i].rgbBlue = pTriple[i].rgbtBlue; - pQuad[i].rgbGreen = pTriple[i].rgbtGreen; - pQuad[i].rgbReserved = 0; - } - } - - /* offset to the bits from start of DIB header */ - offBits = (WORD)lpbi->biSize + nNumColors * sizeof(RGBQUAD); - - if (bf.bfOffBits != 0L) - { - _llseek(fh,bf.bfOffBits,SEEK_SET); - } - - if (lpbi->biSizeImage == lread(fh, (LPSTR)lpbi + offBits, lpbi->biSizeImage)) - { - GlobalUnlock(hDIB); - - hDC = GetDC(NULL); - if (!MakeBitmapAndPalette(hDC, hDIB, palette, - bitmap)) - { - ReleaseDC(NULL,hDC); - goto ErrExit2; - } - else - { - ReleaseDC(NULL,hDC); - GlobalFree(hDIB); - result = TRUE; - } - } - else - { -ErrExit: - GlobalUnlock(hDIB); -ErrExit2: - GlobalFree(hDIB); - } - - _lclose(fh); - return(result); -} - -/**************************************************************************** - * - * FUNCTION : MakeBitmapAndPalette - * - * PURPOSE : Given a DIB, creates a bitmap and corresponding palette - * to be used for a device-dependent representation of - * of the image. - * - * RETURNS : TRUE --> success. phPal and phBitmap are filled with - * appropriate handles. Caller is responsible - * for freeing objects. - * FALSE --> unable to create objects. both pointer are - * not valid - * - ****************************************************************************/ -BOOL PASCAL MakeBitmapAndPalette(HDC hDC, HANDLE hDIB, - HPALETTE * phPal, HBITMAP * phBitmap) -{ - LPBITMAPINFOHEADER lpInfo; - BOOL result = FALSE; - HBITMAP hBitmap; - HPALETTE hPalette, hOldPal; - LPSTR lpBits; - -#ifdef __WINDOWS_386__ - lpInfo = (LPBITMAPINFOHEADER) MK_FP32(GlobalLock(hDIB)); -#else - lpInfo = (LPBITMAPINFOHEADER) GlobalLock(hDIB); -#endif - - if ((hPalette = MakeDIBPalette(lpInfo))) - { - // Need to realize palette for converting DIB to bitmap. - hOldPal = SelectPalette(hDC, hPalette, TRUE); - RealizePalette(hDC); - - lpBits = (LPSTR)lpInfo + (WORD)lpInfo->biSize + - (WORD)lpInfo->biClrUsed * sizeof(RGBQUAD); - hBitmap = CreateDIBitmap(hDC, lpInfo, CBM_INIT, lpBits, - (LPBITMAPINFO)lpInfo, DIB_RGB_COLORS); - - SelectPalette(hDC, hOldPal, TRUE); - RealizePalette(hDC); - - if (!hBitmap) - DeleteObject(hPalette); - else - { - *phBitmap = hBitmap; - *phPal = hPalette; - result = TRUE; - } - } - return(result); -} - -/**************************************************************************** - * * - * FUNCTION : MakeDIBPalette(lpInfo) * - * * - * PURPOSE : Given a BITMAPINFOHEADER, create a palette based on - * the color table. - * - * * - * RETURNS : non-zero - handle of a corresponding palette - * zero - unable to create palette - * * - ****************************************************************************/ -HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER lpInfo) -{ - NPLOGPALETTE npPal; - RGBQUAD far *lpRGB; - HPALETTE hLogPal; - WORD i; - - /* since biClrUsed field was filled during the loading of the DIB, - ** we know it contains the number of colors in the color table. - */ - if (lpInfo->biClrUsed) - { -/* - npPal = (NPLOGPALETTE)LocalAlloc(LMEM_FIXED, sizeof(LOGPALETTE) + - (WORD)lpInfo->biClrUsed * sizeof(PALETTEENTRY)); -*/ - npPal = (NPLOGPALETTE)malloc(sizeof(LOGPALETTE) + - (WORD)lpInfo->biClrUsed * sizeof(PALETTEENTRY)); - - if (!npPal) - return(FALSE); - - npPal->palVersion = 0x300; - npPal->palNumEntries = (WORD)lpInfo->biClrUsed; - - /* get pointer to the color table */ - lpRGB = (RGBQUAD FAR *)((LPSTR)lpInfo + lpInfo->biSize); - - /* copy colors from the color table to the LogPalette structure */ - for (i = 0; i < lpInfo->biClrUsed; i++, lpRGB++) - { - npPal->palPalEntry[i].peRed = lpRGB->rgbRed; - npPal->palPalEntry[i].peGreen = lpRGB->rgbGreen; - npPal->palPalEntry[i].peBlue = lpRGB->rgbBlue; - npPal->palPalEntry[i].peFlags = 0; - } - - hLogPal = CreatePalette((LPLOGPALETTE)npPal); -// LocalFree((HANDLE)npPal); - free(npPal); - - return(hLogPal); - } - - /* 24-bit DIB with no color table. return default palette. Another - ** option would be to create a 256 color "rainbow" palette to provide - ** some good color choices. - */ - else - return((HPALETTE) GetStockObject(DEFAULT_PALETTE)); -} - -bool wxLoadIntoBitmap(char *filename, wxBitmap *bitmap, wxColourMap **pal) -{ - HBITMAP hBitmap; - HPALETTE hPalette; - - bool success = (ReadDIB(filename, &hBitmap, &hPalette) != 0); - - if (!success) - { - DeleteObject(hPalette); - return FALSE; - } - - if (hPalette) - { - if (pal) - { - *pal = new wxColourMap; - (*pal)->SetHPALETTE((WXHPALETTE) hPalette); - } - else - DeleteObject(hPalette); - } - else if (pal) - *pal = NULL; - - if (hBitmap) - { - BITMAP bm; - GetObject(hBitmap, sizeof(bm), (LPSTR)&bm); - - bitmap->SetHBITMAP((WXHBITMAP) hBitmap); - bitmap->SetWidth(bm.bmWidth); - bitmap->SetHeight(bm.bmHeight); - bitmap->SetDepth(bm.bmPlanes * bm.bmBitsPixel); - bitmap->SetOk(TRUE); - return TRUE; - } - else return FALSE; -} - -wxBitmap *wxLoadBitmap(char *filename, wxColourMap **pal) -{ - wxBitmap *bitmap = new wxBitmap; - if (wxLoadIntoBitmap(filename, bitmap, pal)) - return bitmap; - else - { - delete bitmap; - return NULL; - } -} - -//--------------------------------------------------------------------- -// -// Function: InitBitmapInfoHeader -// -// Purpose: Does a "standard" initialization of a BITMAPINFOHEADER, -// given the Width, Height, and Bits per Pixel for the -// DIB. -// -// By standard, I mean that all the relevant fields are set -// to the specified values. biSizeImage is computed, the -// biCompression field is set to "no compression," and all -// other fields are 0. -// -// Note that DIBs only allow BitsPixel values of 1, 4, 8, or -// 24. This routine makes sure that one of these values is -// used (whichever is most appropriate for the specified -// nBPP). -// -// Parms: lpBmInfoHdr == Far pointer to a BITMAPINFOHEADER structure -// to be filled in. -// dwWidth == Width of DIB (not in Win 3.0 & 3.1, high -// word MUST be 0). -// dwHeight == Height of DIB (not in Win 3.0 & 3.1, high -// word MUST be 0). -// nBPP == Bits per Pixel for the DIB. -// -// History: Date Reason -// 11/07/91 Created -// -//--------------------------------------------------------------------- - -void InitBitmapInfoHeader (LPBITMAPINFOHEADER lpBmInfoHdr, - DWORD dwWidth, - DWORD dwHeight, - int nBPP) -{ -// _fmemset (lpBmInfoHdr, 0, sizeof (BITMAPINFOHEADER)); - memset (lpBmInfoHdr, 0, sizeof (BITMAPINFOHEADER)); - - lpBmInfoHdr->biSize = sizeof (BITMAPINFOHEADER); - lpBmInfoHdr->biWidth = dwWidth; - lpBmInfoHdr->biHeight = dwHeight; - lpBmInfoHdr->biPlanes = 1; - - if (nBPP <= 1) - nBPP = 1; - else if (nBPP <= 4) - nBPP = 4; - else if (nBPP <= 8) - nBPP = 8; -/* Doesn't work - else if (nBPP <= 16) - nBPP = 16; -*/ - else - nBPP = 24; - - lpBmInfoHdr->biBitCount = nBPP; - lpBmInfoHdr->biSizeImage = WIDTHBYTES (dwWidth * nBPP) * dwHeight; -} - - - - -LPSTR FindDIBBits (LPSTR lpbi) -{ - return (lpbi + *(LPDWORD)lpbi + PaletteSize (lpbi)); -} - -//--------------------------------------------------------------------- -// -// Function: BitmapToDIB -// -// Purpose: Given a device dependent bitmap and a palette, returns -// a handle to global memory with a DIB spec in it. The -// DIB is rendered using the colors of the palette passed in. -// -// Stolen almost verbatim from ShowDIB. -// -// Parms: hBitmap == Handle to device dependent bitmap compatible -// with default screen display device. -// hPal == Palette to render the DDB with. If it's NULL, -// use the default palette. -// -// History: Date Reason -// 6/01/91 Created -// -//--------------------------------------------------------------------- - -HANDLE BitmapToDIB (HBITMAP hBitmap, HPALETTE hPal) -{ - BITMAP Bitmap; - BITMAPINFOHEADER bmInfoHdr; - LPBITMAPINFOHEADER lpbmInfoHdr; - LPSTR lpBits; - HDC hMemDC; - HANDLE hDIB; - HPALETTE hOldPal = NULL; - - // Do some setup -- make sure the Bitmap passed in is valid, - // get info on the bitmap (like its height, width, etc.), - // then setup a BITMAPINFOHEADER. - - if (!hBitmap) - return NULL; - - if (!GetObject (hBitmap, sizeof (Bitmap), (LPSTR) &Bitmap)) - return NULL; - - InitBitmapInfoHeader (&bmInfoHdr, - Bitmap.bmWidth, - Bitmap.bmHeight, - Bitmap.bmPlanes * Bitmap.bmBitsPixel); - - - // Now allocate memory for the DIB. Then, set the BITMAPINFOHEADER - // into this memory, and find out where the bitmap bits go. - - hDIB = GlobalAlloc (GHND, sizeof (BITMAPINFOHEADER) + - PaletteSize ((LPSTR) &bmInfoHdr) + bmInfoHdr.biSizeImage); - - if (!hDIB) - return NULL; - -#ifdef __WINDOWS_386__ - lpbmInfoHdr = (LPBITMAPINFOHEADER) MK_FP32(GlobalLock (hDIB)); -#else - lpbmInfoHdr = (LPBITMAPINFOHEADER) GlobalLock (hDIB); -#endif - - *lpbmInfoHdr = bmInfoHdr; - lpBits = FindDIBBits ((LPSTR) lpbmInfoHdr); - - - // Now, we need a DC to hold our bitmap. If the app passed us - // a palette, it should be selected into the DC. - - hMemDC = GetDC (NULL); - - if (hPal) - { - hOldPal = SelectPalette (hMemDC, hPal, FALSE); - RealizePalette (hMemDC); - } - - - - // We're finally ready to get the DIB. Call the driver and let - // it party on our bitmap. It will fill in the color table, - // and bitmap bits of our global memory block. - - if (!GetDIBits (hMemDC, - hBitmap, - 0, - Bitmap.bmHeight, - lpBits, - (LPBITMAPINFO) lpbmInfoHdr, - DIB_RGB_COLORS)) - { - GlobalUnlock (hDIB); - GlobalFree (hDIB); - hDIB = NULL; - } - else - GlobalUnlock (hDIB); - - - // Finally, clean up and return. - - if (hOldPal) - SelectPalette (hMemDC, hOldPal, FALSE); - - ReleaseDC (NULL, hMemDC); - - return hDIB; -} - -bool wxSaveBitmap(char *filename, wxBitmap *bitmap, wxColourMap *colourmap) -{ - HPALETTE hPalette = 0; - if (colourmap) - hPalette = (HPALETTE) colourmap->GetHPALETTE(); - - HANDLE dibHandle = BitmapToDIB((HBITMAP) bitmap->GetHBITMAP(), hPalette); - if (dibHandle) - { - bool success = (WriteDIB(filename, dibHandle) != 0); - GlobalFree(dibHandle); - return success; - } - else return FALSE; -} - - diff --git a/src/msw/dibutils.cpp b/src/msw/dibutils.cpp deleted file mode 100644 index 30dca59100..0000000000 --- a/src/msw/dibutils.cpp +++ /dev/null @@ -1,691 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dibutils.cpp -// Purpose: Utilities for DIBs -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Microsoft, Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dibutils.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/setup.h" -#include "wx/defs.h" -#endif - -#include -#include -#include -#include - -#if defined(__WIN32__) - #include // for _fmemcpy() - #define _huge -#ifndef hmemcpy - #define hmemcpy memcpy -#endif -#endif - -#define BFT_ICON 0x4349 /* 'IC' */ -#define BFT_BITMAP 0x4d42 /* 'BM' */ -#define BFT_CURSOR 0x5450 /* 'PT' */ - -/* flags for _lseek */ -#define SEEK_CUR 1 -#define SEEK_END 2 -#define SEEK_SET 0 - - -/* - * Clear the System Palette so that we can ensure an identity palette - * mapping for fast performance. - */ - -void ClearSystemPalette(void) -{ - //*** A dummy palette setup - struct - { - WORD Version; - WORD NumberOfEntries; - PALETTEENTRY aEntries[256]; - } Palette = - { - 0x300, - 256 - }; - - HPALETTE ScreenPalette = 0; - HDC ScreenDC; - int Counter; - UINT nMapped = 0; - BOOL bOK = FALSE; - int nOK = 0; - - //*** Reset everything in the system palette to black - for(Counter = 0; Counter < 256; Counter++) - { - Palette.aEntries[Counter].peRed = 0; - Palette.aEntries[Counter].peGreen = 0; - Palette.aEntries[Counter].peBlue = 0; - Palette.aEntries[Counter].peFlags = PC_NOCOLLAPSE; - } - - //*** Create, select, realize, deselect, and delete the palette - ScreenDC = GetDC(NULL); - ScreenPalette = CreatePalette((LOGPALETTE *)&Palette); - - if (ScreenPalette) - { - ScreenPalette = SelectPalette(ScreenDC,ScreenPalette,FALSE); - nMapped = RealizePalette(ScreenDC); - ScreenPalette = SelectPalette(ScreenDC,ScreenPalette,FALSE); - bOK = DeleteObject(ScreenPalette); - } - - nOK = ReleaseDC(NULL, ScreenDC); - - return; -} - - -/* - * Open a DIB file and return a MEMORY DIB, a memory handle containing.. - * - * BITMAP INFO bi - * palette data - * bits.... - */ - -int DibWriteFile(LPSTR szFile, LPBITMAPINFOHEADER lpbi) -{ - HFILE fh; - OFSTRUCT of; - - fh = OpenFile(szFile, &of, OF_WRITE | OF_CREATE); - - if (!fh) { -// printf("la regamos0"); - return 0; - } - - long size = DibSize(lpbi); - - // write file header - BITMAPFILEHEADER bmf; - bmf.bfType = 'BM'; - bmf.bfSize = sizeof(bmf) + size; - bmf.bfReserved1 = 0; - bmf.bfReserved2 = 0; - bmf.bfOffBits = sizeof(bmf) + (char far*)(DibPtr(lpbi)) - (char far*)lpbi; -#if defined( __WATCOMC__) || defined(_MSC_VER) - if (_hwrite(fh, (LPCSTR)(&bmf), sizeof(bmf))<0 || - _hwrite(fh, (LPCSTR)lpbi, size)<0) { - _lclose(fh); -// printf("la regamos1"); - return 0; - } -#else - if (_hwrite(fh, (LPBYTE)(&bmf), sizeof(bmf))<0 || - _hwrite(fh, (LPBYTE)lpbi, size)<0) { - _lclose(fh); -// printf("la regamos1"); - return 0; - } -#endif - - _lclose(fh); - return 1; -} - -PDIB DibOpenFile(LPSTR szFile) -{ - HFILE fh; - DWORD dwLen; - DWORD dwBits; - PDIB pdib; - LPVOID p; - OFSTRUCT of; - -#if defined(WIN32) || defined(_WIN32) - #define GetCurrentInstance() GetModuleHandle(NULL) -#else - #define GetCurrentInstance() (HINSTANCE)SELECTOROF((LPVOID)&of) -#endif - - fh = OpenFile(szFile, &of, OF_READ); - - if (fh == -1) - { - HRSRC h; - - // TODO: Unicode version - h = FindResourceA(GetCurrentInstance(), szFile, RT_BITMAP); - -#if defined(WIN32) || defined(_WIN32) - //!!! can we call GlobalFree() on this? is it the right format. - //!!! can we write to this resource? - if (h) - return (PDIB)LockResource(LoadResource(GetCurrentInstance(), h)); -#else - if (h) - fh = AccessResource(GetCurrentInstance(), h); -#endif - } - - if (fh == -1) - return NULL; - - pdib = DibReadBitmapInfo(fh); - - if (!pdib) - return NULL; - - /* How much memory do we need to hold the DIB */ - - dwBits = pdib->biSizeImage; - dwLen = pdib->biSize + DibPaletteSize(pdib) + dwBits; - - /* Can we get more memory? */ - - p = GlobalReAllocPtr(pdib,dwLen,0); - - if (!p) - { - GlobalFreePtr(pdib); - pdib = NULL; - } - else - { - pdib = (PDIB)p; - } - - if (pdib) - { - /* read in the bits */ - _hread(fh, (LPBYTE)pdib + (UINT)pdib->biSize + DibPaletteSize(pdib), dwBits); - } - - _lclose(fh); - - return pdib; -} - - -/* - * ReadDibBitmapInfo() - * - * Will read a file in DIB format and return a global HANDLE to its - * BITMAPINFO. This function will work with both "old" and "new" - * bitmap formats, but will always return a "new" BITMAPINFO. - */ - -PDIB DibReadBitmapInfo(HFILE fh) -{ - DWORD off; - HANDLE hbi = NULL; - int size; - int i; - int nNumColors; - - RGBQUAD FAR *pRgb; - BITMAPINFOHEADER bi; - BITMAPCOREHEADER bc; - BITMAPFILEHEADER bf; - PDIB pdib; - - if (fh == -1) - return NULL; - - off = _llseek(fh,0L,SEEK_CUR); - - if (sizeof(bf) != _lread(fh,(LPSTR)&bf,sizeof(bf))) - return FALSE; - - /* - * do we have a RC HEADER? - */ - if (bf.bfType != BFT_BITMAP) - { - bf.bfOffBits = 0L; - _llseek(fh,off,SEEK_SET); - } - - if (sizeof(bi) != _lread(fh,(LPSTR)&bi,sizeof(bi))) - return FALSE; - - /* - * what type of bitmap info is this? - */ - switch (size = (int)bi.biSize) - { - default: - case sizeof(BITMAPINFOHEADER): - break; - - case sizeof(BITMAPCOREHEADER): - bc = *(BITMAPCOREHEADER*)&bi; - bi.biSize = sizeof(BITMAPINFOHEADER); - bi.biWidth = (DWORD)bc.bcWidth; - bi.biHeight = (DWORD)bc.bcHeight; - bi.biPlanes = (UINT)bc.bcPlanes; - bi.biBitCount = (UINT)bc.bcBitCount; - bi.biCompression = BI_RGB; - bi.biSizeImage = 0; - bi.biXPelsPerMeter = 0; - bi.biYPelsPerMeter = 0; - bi.biClrUsed = 0; - bi.biClrImportant = 0; - - _llseek(fh,(LONG)sizeof(BITMAPCOREHEADER)-sizeof(BITMAPINFOHEADER),SEEK_CUR); - - break; - } - - nNumColors = DibNumColors(&bi); - -#if 0 - if (bi.biSizeImage == 0) - bi.biSizeImage = DibSizeImage(&bi); - - if (bi.biClrUsed == 0) - bi.biClrUsed = DibNumColors(&bi); -#else - FixBitmapInfo(&bi); -#endif - - pdib = (PDIB)GlobalAllocPtr(GMEM_MOVEABLE,(LONG)bi.biSize + nNumColors * sizeof(RGBQUAD)); - - if (!pdib) - return NULL; - - *pdib = bi; - - pRgb = DibColors(pdib); - - if (nNumColors) - { - if (size == sizeof(BITMAPCOREHEADER)) - { - /* - * convert a old color table (3 byte entries) to a new - * color table (4 byte entries) - */ - _lread(fh,(LPVOID)pRgb,nNumColors * sizeof(RGBTRIPLE)); - - for (i=nNumColors-1; i>=0; i--) - { - RGBQUAD rgb; - - rgb.rgbRed = ((RGBTRIPLE FAR *)pRgb)[i].rgbtRed; - rgb.rgbBlue = ((RGBTRIPLE FAR *)pRgb)[i].rgbtBlue; - rgb.rgbGreen = ((RGBTRIPLE FAR *)pRgb)[i].rgbtGreen; - rgb.rgbReserved = (BYTE)0; - - pRgb[i] = rgb; - } - } - else - { - _lread(fh,(LPVOID)pRgb,nNumColors * sizeof(RGBQUAD)); - } - } - - if (bf.bfOffBits != 0L) - _llseek(fh,off + bf.bfOffBits,SEEK_SET); - - return pdib; -} - -/* - * DibSetUsage(hdib,hpal,wUsage) - * - * Modifies the color table of the passed DIB for use with the wUsage - * parameter specifed. - * - * if wUsage is DIB_PAL_COLORS the DIB color table is set to 0-256 - * if wUsage is DIB_RGB_COLORS the DIB color table is set to the RGB values - * in the passed palette - */ - -BOOL DibSetUsage(PDIB pdib, HPALETTE hpal,UINT wUsage) -{ - PALETTEENTRY ape[256]; - RGBQUAD FAR * pRgb; - WORD FAR * pw; - int nColors; - int n; - - if (hpal == NULL) - hpal = (HPALETTE)GetStockObject(DEFAULT_PALETTE); - - if (!pdib) - return FALSE; - - nColors = DibNumColors(pdib); - - if (nColors == 3 && DibCompression(pdib) == BI_BITFIELDS) - nColors = 0; - - if (nColors > 0) - { - pRgb = DibColors(pdib); - - switch (wUsage) - { - // - // Set the DIB color table to palette indexes - // - case DIB_PAL_COLORS: - for (pw = (WORD FAR*)pRgb,n=0; nbiSize = sizeof(BITMAPINFOHEADER) ; - lpbi->biWidth = dx; - lpbi->biHeight = dy; - lpbi->biPlanes = 1; - lpbi->biBitCount = bits ; - lpbi->biCompression = BI_RGB ; - lpbi->biSizeImage = dwSizeImage; - lpbi->biXPelsPerMeter = 0 ; - lpbi->biYPelsPerMeter = 0 ; - lpbi->biClrUsed = 0 ; - lpbi->biClrImportant = 0 ; - - if (bits == 4) - lpbi->biClrUsed = 16; - - else if (bits == 8) - lpbi->biClrUsed = 256; - - pdw = (DWORD FAR *)((LPBYTE)lpbi+(int)lpbi->biSize); - - for (i=0; i<(int)lpbi->biClrUsed/16; i++) - { - *pdw++ = 0x00000000; // 0000 black - *pdw++ = 0x00800000; // 0001 dark red - *pdw++ = 0x00008000; // 0010 dark green - *pdw++ = 0x00808000; // 0011 mustard - *pdw++ = 0x00000080; // 0100 dark blue - *pdw++ = 0x00800080; // 0101 purple - *pdw++ = 0x00008080; // 0110 dark turquoise - *pdw++ = 0x00C0C0C0; // 1000 gray - *pdw++ = 0x00808080; // 0111 dark gray - *pdw++ = 0x00FF0000; // 1001 red - *pdw++ = 0x0000FF00; // 1010 green - *pdw++ = 0x00FFFF00; // 1011 yellow - *pdw++ = 0x000000FF; // 1100 blue - *pdw++ = 0x00FF00FF; // 1101 pink (magenta) - *pdw++ = 0x0000FFFF; // 1110 cyan - *pdw++ = 0x00FFFFFF; // 1111 white - } - - return (PDIB)lpbi; -} - -static void xlatClut8(BYTE FAR *pb, DWORD dwSize, BYTE FAR *xlat) -{ - DWORD dw; - -#ifdef __cplusplus - for (dw = 0; dw < dwSize; dw++, ((BYTE _huge *&)pb)++) -#else - for (dw = 0; dw < dwSize; dw++, ((BYTE _huge *)pb)++) -#endif - *pb = xlat[*pb]; -} - -static void xlatClut4(BYTE FAR *pb, DWORD dwSize, BYTE FAR *xlat) -{ - DWORD dw; - -#ifdef __cplusplus - for (dw = 0; dw < dwSize; dw++, ((BYTE _huge *&)pb)++) -#else - for (dw = 0; dw < dwSize; dw++, ((BYTE _huge *)pb)++) -#endif - *pb = (BYTE)(xlat[*pb & 0x0F] | (xlat[(*pb >> 4) & 0x0F] << 4)); -} - -#define RLE_ESCAPE 0 -#define RLE_EOL 0 -#define RLE_EOF 1 -#define RLE_JMP 2 - -static void xlatRle8(BYTE FAR *pb, DWORD dwSize, BYTE FAR *xlat) -{ - BYTE cnt; - BYTE b; - BYTE _huge *prle = pb; - - for(;;) - { - cnt = *prle++; - b = *prle; - - if (cnt == RLE_ESCAPE) - { - prle++; - - switch (b) - { - case RLE_EOF: - return; - - case RLE_EOL: - break; - - case RLE_JMP: - prle++; // skip dX - prle++; // skip dY - break; - - default: - cnt = b; - for (b=0; bbiSizeImage) == 0) - SizeImage = DibSizeImage(lpbi); - - // - // build a xlat table. from the current DIB colors to the given - // palette. - // - for (n=0; nbiClrUsed = nPalColors; - - // - // re-size the DIB - // - if (nPalColors > nDibColors) - { - GlobalReAllocPtr(lpbi, lpbi->biSize + nPalColors*sizeof(RGBQUAD) + SizeImage, 0); - hmemmove((BYTE _huge *)DibPtr(lpbi), (BYTE _huge *)lpBits, SizeImage); - lpBits = (LPBYTE)DibPtr(lpbi); - } - else if (nPalColors < nDibColors) - { - hmemcpy(DibPtr(lpbi), lpBits, SizeImage); - GlobalReAllocPtr(lpbi, lpbi->biSize + nPalColors*sizeof(RGBQUAD) + SizeImage, 0); - lpBits = (LPBYTE)DibPtr(lpbi); - } - - // - // translate the DIB bits - // - switch (lpbi->biCompression) - { - case BI_RLE8: - xlatRle8(lpBits, SizeImage, xlat); - break; - - case BI_RLE4: - xlatRle4(lpBits, SizeImage, xlat); - break; - - case BI_RGB: - if (lpbi->biBitCount == 8) - xlatClut8(lpBits, SizeImage, xlat); - else - xlatClut4(lpBits, SizeImage, xlat); - break; - } - - // - // Now copy the RGBs in the logical palette to the dib color table - // - for (n=0; nbmiColors; - - WORD nColors = Info->bmiHeader.biClrUsed; - if (nColors) { - LOGPALETTE* logPal = (LOGPALETTE*) - new BYTE[sizeof(LOGPALETTE) + (nColors-1)*sizeof(PALETTEENTRY)]; - - logPal->palVersion = 0x300; // Windows 3.0 version - logPal->palNumEntries = nColors; - for (short n = 0; n < nColors; n++) { - logPal->palPalEntry[n].peRed = rgb[n].rgbRed; - logPal->palPalEntry[n].peGreen = rgb[n].rgbGreen; - logPal->palPalEntry[n].peBlue = rgb[n].rgbBlue; - logPal->palPalEntry[n].peFlags = (BYTE)flags; - } - hPalette = ::CreatePalette(logPal); - delete logPal; - } else - hPalette = 0; - - return hPalette; -} - diff --git a/src/msw/dirdlg.cpp b/src/msw/dirdlg.cpp deleted file mode 100644 index ecfac092c5..0000000000 --- a/src/msw/dirdlg.cpp +++ /dev/null @@ -1,131 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dirdlg.cpp -// Purpose: wxDirDialog -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dirdlg.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/defs.h" -#include "wx/utils.h" -#include "wx/dialog.h" -#include "wx/dirdlg.h" -#endif - -#if defined(__WIN95__) && !defined(__GNUWIN32__) -#include "shlobj.h" // Win95 shell -#endif - -#include "wx/msw/private.h" -#include "wx/cmndata.h" - -#include -#include -#include - -#define wxDIALOG_DEFAULT_X 300 -#define wxDIALOG_DEFAULT_Y 300 - -#if !USE_SHARED_LIBRARY -IMPLEMENT_CLASS(wxDirDialog, wxDialog) -#endif - -wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message, -// const wxString& caption, - const wxString& defaultPath, - long style, const wxPoint& pos) -{ - m_message = message; -// m_caption = caption; - m_dialogStyle = style; - m_parent = parent; - m_path = defaultPath; -} - -int wxDirDialog::ShowModal(void) -{ - // Unfortunately Gnu-Win32 doesn't yet have COM support -#if defined(__WIN95__) && !defined(__GNUWIN32__) - HWND hWnd = 0; - if (m_parent) hWnd = (HWND) m_parent->GetHWND(); - - BROWSEINFO bi; - LPSTR lpBuffer; -// LPITEMIDLIST pidlPrograms; // PIDL for Programs folder - LPITEMIDLIST pidlBrowse; // PIDL selected by user - LPMALLOC pMalloc = NULL; - - HRESULT result = ::SHGetMalloc(&pMalloc); - - if (result != NOERROR) - return wxID_CANCEL; - - // Allocate a buffer to receive browse information. - if ((lpBuffer = (LPSTR) pMalloc->Alloc(MAX_PATH)) == NULL) - { - pMalloc->Release(); - return wxID_CANCEL; - } - -/* - // Get the PIDL for the Programs folder. - if (!SUCCEEDED(SHGetSpecialFolderLocation( - parent->GetSafeHwnd(), CSIDL_PROGRAMS, &pidlPrograms))) { - pMalloc->Free(lpBuffer); - pMalloc->Release(); - return wxID_CANCEL; - } -*/ - - // Fill in the BROWSEINFO structure. - bi.hwndOwner = hWnd; - bi.pidlRoot = NULL; // pidlPrograms; - bi.pszDisplayName = lpBuffer; - bi.lpszTitle = (LPCTSTR) (const char *) m_message; - bi.ulFlags = 0; - bi.lpfn = NULL; - bi.lParam = 0; - - // Browse for a folder and return its PIDL. - pidlBrowse = SHBrowseForFolder(&bi); - - int id = wxID_OK; - if (pidlBrowse != NULL) { - - // Show the display name, title, and file system path. - if (SHGetPathFromIDList(pidlBrowse, lpBuffer)) - m_path = lpBuffer; - - // Free the PIDL returned by SHBrowseForFolder. - pMalloc->Free(pidlBrowse); - } - else - id = wxID_CANCEL; - - // Clean up. -// pMalloc->Free(pidlPrograms); - pMalloc->Free(lpBuffer); - pMalloc->Release(); - - return id; -#else - return wxID_CANCEL; -#endif -} - diff --git a/src/msw/dummy.cpp b/src/msw/dummy.cpp deleted file mode 100644 index 67004e57c8..0000000000 --- a/src/msw/dummy.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * File: dummy.cc - * Purpose: See below - * Author: Julian Smart - * Created: 1993 - * Updated: - * Copyright: (c) 1993, AIAI, University of Edinburgh - */ - -/* static const char sccsid[] = "@(#)dummy.cc 1.2 5/9/94"; */ - -/* A dummy file to include wx.h. If precompiling wx.h, I - * always start by compiling this and producing the PCH file. - * Then subsequent source files use the PCH file. - * - * If precompiling wx.h for wxWindows and derived apps, - * link dummy.obj with your program (the MSC 7 linker complains otherwise). - * - * This is the only convenient way I found to use precompiled headers - * under MSC 7. - * - * This will produce a big PCH file. - */ - - - -#if defined(__BORLANDC__) -#if !(defined(__WIN32__) || defined(__NT__) || defined(__WIN32__)) -#pragma hdrfile "c:\wx\src\msw\wx.pch" -#endif - -#pragma hdrstart -#endif - -#include "wx/wxprec.h" -#include "windows.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -// Foils optimizations in Visual C++ (see also wx_main.cc) -char wxDummyChar=0; - -#if defined(WXUSINGDLL) - -// NT defines APIENTRY, 3.x not -#if !defined(APIENTRY) -#define APIENTRY FAR PASCAL -#endif - -#ifdef __WATCOMC__ -int PASCAL -#else -int APIENTRY -#endif - - WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR m_lpCmdLine, - int nCmdShow ) -{ - return wxEntry((WXHINSTANCE) hInstance, (WXHINSTANCE) hPrevInstance, m_lpCmdLine, nCmdShow); -} -#endif - - diff --git a/src/msw/dummydll.cpp b/src/msw/dummydll.cpp deleted file mode 100644 index 16f1b40d8c..0000000000 --- a/src/msw/dummydll.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* - * File: dummydll.cc - * Purpose: - * Author: Julian Smart - * Created: 1993 - * Updated: - * Copyright: (c) 1993, AIAI, University of Edinburgh - */ - -/* static const char sccsid[] = "@(#)dummydll.cc 1.2 5/9/94"; */ - -/* - * A dummy file to include wx.h. If precompiling wx.h, I - * always start by compiling this and producing the PCH file. - * Then subsequent source files use the PCH file. - */ - -#include "wx/wxprec.h" - -// Foils optimizations in Visual C++ (see also wx_main.cc) -char wxDummyChar=0; diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp deleted file mode 100644 index 78b3437750..0000000000 --- a/src/msw/filedlg.cpp +++ /dev/null @@ -1,358 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: filedlg.cpp -// Purpose: wxFileDialog -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "filedlg.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/defs.h" -#include "wx/utils.h" -#include "wx/dialog.h" -#include "wx/filedlg.h" -#endif - -#include - -#ifndef __WIN32__ -#include -#endif - -#include "wx/msw/private.h" - -#include -#include -#include - -#define wxDIALOG_DEFAULT_X 300 -#define wxDIALOG_DEFAULT_Y 300 - -#if !USE_SHARED_LIBRARY -IMPLEMENT_CLASS(wxFileDialog, wxDialog) -#endif - -char *wxFileSelector(const char *title, - const char *defaultDir, const char *defaultFileName, - const char *defaultExtension, const char *filter, int flags, - wxWindow *parent, int x, int y) -{ - // In the original implementation, defaultExtension is passed to the lpstrDefExt member - // of OPENFILENAME. This extension, if non-NULL, is appended to the filename if the user - // fails to type an extension. - // The new implementation (taken from wxFileSelectorEx) appends the extension automatically, - // by looking at the filter specification. In fact this should be better than the - // native Microsoft implementation because Windows only allows *one* default extension, - // whereas here we do the right thing depending on the filter the user has chosen. - - // If there's a default extension specified but no filter, we create a suitable - // filter. - - wxString filter2(""); - if ( defaultExtension && !filter ) - filter2 = wxString("*.") + wxString(defaultExtension) ; - else if ( filter ) - filter2 = filter; - - wxString defaultDirString; - if (defaultDir) - defaultDirString = defaultDir; - else - defaultDirString = ""; - - wxString defaultFilenameString; - if (defaultFileName) - defaultFilenameString = defaultFileName; - else - defaultFilenameString = ""; - - wxFileDialog fileDialog(parent, title, defaultDirString, defaultFilenameString, filter2, flags, wxPoint(x, y)); - - if ( fileDialog.ShowModal() == wxID_OK ) - { - strcpy(wxBuffer, (const char *)fileDialog.GetPath()); - return wxBuffer; - } - else - return NULL; -} - -# if __BORLANDC__ -# include // for MAXPATH etc. ( Borland 3.1 ) -# endif - -# ifndef MAXPATH -# define MAXPATH 400 -# endif - -# ifndef MAXDRIVE -# define MAXDRIVE 3 -# endif - -# ifndef MAXFILE -# define MAXFILE 9 -# endif - -# ifndef MAXEXT -# define MAXEXT 5 -# endif - - -char *wxFileSelectorEx(const char *title, - const char *defaultDir, - const char *defaultFileName, - int* defaultFilterIndex, - const char *filter, - int flags, - wxWindow* parent, - int x, - int y) - -{ - wxFileDialog fileDialog(parent, title ? title : "", defaultDir ? defaultDir : "", - defaultFileName ? defaultFileName : "", filter ? filter : "", flags, wxPoint(x, y)); - - if ( fileDialog.ShowModal() == wxID_OK ) - { - *defaultFilterIndex = fileDialog.GetFilterIndex(); - strcpy(wxBuffer, (const char *)fileDialog.GetPath()); - return wxBuffer; - } - else - return NULL; -} - -wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, - const wxString& defaultDir, const wxString& defaultFileName, const wxString& wildCard, - long style, const wxPoint& pos) -{ - m_message = message; - m_dialogStyle = style; - m_parent = parent; - m_path = ""; - m_fileName = defaultFileName; - m_dir = defaultDir; - m_wildCard = wildCard; - m_filterIndex = 1; -} - -int wxFileDialog::ShowModal(void) -{ - HWND hWnd = 0; - if (m_parent) hWnd = (HWND) m_parent->GetHWND(); - - static char fileNameBuffer [ MAXPATH ]; // the file-name - char titleBuffer [ MAXFILE+1+MAXEXT ]; // the file-name, without path - - *fileNameBuffer = '\0'; - *titleBuffer = '\0'; - - char* filterBuffer = NULL; - char* extension = NULL; - char* theFilter = (char *)(const char *)m_wildCard; - - long msw_flags = 0; - if ( (m_dialogStyle & wxHIDE_READONLY) || (m_dialogStyle & wxSAVE) ) - msw_flags |= OFN_HIDEREADONLY; - if ( m_dialogStyle & wxFILE_MUST_EXIST ) - msw_flags |= OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; - - OPENFILENAME of; - memset(&of, 0, sizeof(OPENFILENAME)); - - of.lpstrCustomFilter = NULL; // system should not save custom filter - of.nMaxCustFilter = 0L; - - of.nFileOffset = 0; // 0-based pointer to filname in lpstFile - of.nFileExtension = 0; // 0-based pointer to extension in lpstrFile - of.lpstrDefExt = NULL; // no default extension - - of.lStructSize = sizeof(OPENFILENAME); - of.hwndOwner = hWnd; - of.lpstrTitle = (char *)(const char *)m_message; - - - of.lpstrFileTitle = titleBuffer; - of.nMaxFileTitle = MAXFILE + 1 + MAXEXT; // Windows 3.0 and 3.1 - - of.lpstrInitialDir = (const char *) m_dir; - - of.Flags = msw_flags; - - - - //=== Like Alejandro Sierra's wildcard modification >>=================== - /* - In wxFileSelector you can put, instead of a single wild_card, - pairs of strings separated by '|'. - The first string is a description, and the - second is the wild card. You can put any number of pairs. - - eg. "description1 (*.ex1)|*.ex1|description2 (*.ex2)|*.ex2" - - If you put a single wild card, it works as before the modification. - */ - //======================================================================= - - if ( !theFilter || (strcmp(theFilter, "") == 0)) theFilter = "*.*"; - - int filterBufferLen = 0; - - if ( !strchr( theFilter, '|' ) ) { // only one filter ==> default text: - char buffText[] = "Files (%s)|%s"; - filterBufferLen = strlen( theFilter )*2 + strlen( buffText ) -4; - filterBuffer = new char[ filterBufferLen +2 ]; - - if ( filterBuffer ) { - sprintf( filterBuffer, buffText, theFilter, theFilter ); - } - } - else { // more then one filter - filterBufferLen = strlen( theFilter ); - filterBuffer = new char[ filterBufferLen +2 ]; - - if ( filterBuffer ) { - strcpy( filterBuffer, theFilter ); - } - } - - if ( filterBuffer ) { // Substituting '|' with '\0' - for ( int i = 0; i < filterBufferLen; i++ ) { - if ( filterBuffer[i] == '|' ) { filterBuffer[i] = '\0'; } - } - } - - filterBuffer[filterBufferLen+1] = '\0'; - - of.lpstrFilter = (LPSTR)filterBuffer; - of.nFilterIndex = m_filterIndex; - - //=== Setting defaultFileName >>========================================= - - strncpy( fileNameBuffer, (const char *)m_fileName, MAXPATH-1 ); - fileNameBuffer[ MAXPATH-1 ] = '\0'; - - of.lpstrFile = fileNameBuffer; // holds returned filename - of.nMaxFile = MAXPATH; - - //== Execute FileDialog >>================================================= - - bool success = (m_dialogStyle & wxSAVE) ? (GetSaveFileName(&of) != 0) : (GetOpenFileName(&of) != 0); - - if ( success ) - { - //=== Adding the correct extension >>================================= - - m_filterIndex = (int)of.nFilterIndex; - - if ( of.nFileExtension && fileNameBuffer[ of.nFileExtension-1] != '.' ) - { // user has typed an filename - // without an extension: - - int maxFilter = (int)(of.nFilterIndex*2L-1L); - extension = filterBuffer; - - for( int i = 0; i < maxFilter; i++ ) { // get extension - extension = extension + strlen( extension ) +1; - } - - if ( (extension = strrchr( extension, '.' )) // != "blabla" - && !strrchr( extension, '*' ) // != "blabla.*" - && !strrchr( extension, '?' ) // != "blabla.?" - && extension[1] // != "blabla." - && extension[1] != ' ' ) // != "blabla. " - { - // now concat extension to the fileName: - m_fileName = wxString(fileNameBuffer) + wxString(extension); - - int len = strlen( fileNameBuffer ); - strncpy( fileNameBuffer + len, extension, MAXPATH - len ); - fileNameBuffer[ MAXPATH -1 ] = '\0'; - } - } - - m_path = fileNameBuffer; - m_fileName = wxFileNameFromPath(fileNameBuffer); - - - //=== Simulating the wxOVERWRITE_PROMPT >>============================ - - if ( (m_dialogStyle & wxOVERWRITE_PROMPT) && ::wxFileExists( fileNameBuffer ) ) - { - char questionText[] = "Replace file\n%s?"; - char* messageText = new char[strlen(questionText)+strlen(fileNameBuffer)-1]; - sprintf( messageText, questionText, fileNameBuffer ); - - if ( messageText && ( wxMessageBox( (const char *)messageText, m_message, wxYES_NO ) != wxYES ) ) - { - success = FALSE; - } - - delete[] messageText; - } - - } // END: if ( success ) - - - delete[] filterBuffer; - - return (success ? wxID_OK : wxID_CANCEL) ; - -} - -#define wxDIALOG_DEFAULT_X 300 -#define wxDIALOG_DEFAULT_Y 300 - -// Generic file load/save dialog -// static inline char * // HP compiler complains -static char * -wxDefaultFileSelector(bool load, const char *what, const char *extension, const char *default_name, wxWindow *parent) -{ - char *ext = (char *)extension; - - char prompt[50]; - wxString str; - if (load) - str = "Load %s file"; - else - str = "Save %s file"; - sprintf(prompt, wxGetTranslation(str), what); - - if (*ext == '.') ext++; - char wild[60]; - sprintf(wild, "*.%s", ext); - - return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent); -} - -// Generic file load dialog -char * -wxLoadFileSelector(const char *what, const char *extension, const char *default_name, wxWindow *parent) -{ - return wxDefaultFileSelector(TRUE, what, extension, default_name, parent); -} - - -// Generic file save dialog -char * -wxSaveFileSelector(const char *what, const char *extension, const char *default_name, wxWindow *parent) -{ - return wxDefaultFileSelector(FALSE, what, extension, default_name, parent); -} - - diff --git a/src/msw/font.cpp b/src/msw/font.cpp deleted file mode 100644 index 27370bf433..0000000000 --- a/src/msw/font.cpp +++ /dev/null @@ -1,382 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: font.cpp -// Purpose: wxFont class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "font.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/setup.h" -#include "wx/list.h" -#include "wx/utils.h" -#include "wx/app.h" -#include "wx/font.h" -#endif - -#include "wx/msw/private.h" -#include "assert.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) - -#if USE_PORTABLE_FONTS_IN_MSW -IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory, wxObject) -#endif - -#endif - -wxFontRefData::wxFontRefData(void) -{ - m_style = 0; - m_temporary = FALSE; - m_pointSize = 0; - m_family = 0; - m_fontId = 0; - m_style = 0; - m_weight = 0; - m_underlined = 0; - m_faceName = ""; - m_hFont = 0; -} - -wxFontRefData::wxFontRefData(const wxFontRefData& data) -{ - m_style = data.m_style; - m_temporary = FALSE; - m_pointSize = data.m_pointSize; - m_family = data.m_family; - m_fontId = data.m_fontId; - m_style = data.m_style; - m_weight = data.m_weight; - m_underlined = data.m_underlined; - m_faceName = data.m_faceName; - m_hFont = 0; -} - -wxFontRefData::~wxFontRefData(void) -{ - if ( m_hFont ) - ::DeleteObject((HFONT) m_hFont); -} - -wxFont::wxFont(void) -{ - if ( wxTheFontList ) - wxTheFontList->Append(this); -} - -/* Constructor for a font. Note that the real construction is done - * in wxDC::SetFont, when information is available about scaling etc. - */ -wxFont::wxFont(int pointSize, int family, int style, int weight, bool underlined, const wxString& faceName) -{ - Create(pointSize, family, style, weight, underlined, faceName); - - if ( wxTheFontList ) - wxTheFontList->Append(this); -} - -bool wxFont::Create(int pointSize, int family, int style, int weight, bool underlined, const wxString& faceName) -{ - UnRef(); - m_refData = new wxFontRefData; - - M_FONTDATA->m_family = family; - M_FONTDATA->m_style = style; - M_FONTDATA->m_weight = weight; - M_FONTDATA->m_pointSize = pointSize; - M_FONTDATA->m_underlined = underlined; - M_FONTDATA->m_faceName = faceName; - - RealizeResource(); - - return TRUE; -} - -wxFont::~wxFont() -{ - if (wxTheFontList) - wxTheFontList->DeleteObject(this); -} - -bool wxFont::RealizeResource(void) -{ - if (M_FONTDATA && !M_FONTDATA->m_hFont) - { - BYTE ff_italic; - int ff_weight = 0; - int ff_family = 0; - wxString ff_face(""); - - switch (M_FONTDATA->m_family) - { - case wxSCRIPT: ff_family = FF_SCRIPT ; - ff_face = "Script" ; - break ; - case wxDECORATIVE: ff_family = FF_DECORATIVE; - break; - case wxROMAN: ff_family = FF_ROMAN; - ff_face = "Times New Roman" ; - break; - case wxTELETYPE: - case wxMODERN: ff_family = FF_MODERN; - ff_face = "Courier New" ; - break; - case wxSWISS: ff_family = FF_SWISS; - ff_face = "Arial"; - break; - case wxDEFAULT: - default: ff_family = FF_SWISS; - ff_face = "Arial" ; - } - - if (M_FONTDATA->m_style == wxITALIC || M_FONTDATA->m_style == wxSLANT) - ff_italic = 1; - else - ff_italic = 0; - - if (M_FONTDATA->m_weight == wxNORMAL) - ff_weight = FW_NORMAL; - else if (M_FONTDATA->m_weight == wxLIGHT) - ff_weight = FW_LIGHT; - else if (M_FONTDATA->m_weight == wxBOLD) - ff_weight = FW_BOLD; - - const char* pzFace = (const char*) ff_face; - if (!M_FONTDATA->m_faceName.IsNull()) - pzFace = (const char*) M_FONTDATA->m_faceName ; - -/* Always calculate fonts using the screen DC (is this the best strategy?) - * There may be confusion if a font is selected into a printer - * DC (say), because the height will be calculated very differently. - // What sort of display is it? - int technology = ::GetDeviceCaps(dc, TECHNOLOGY); - - int nHeight; - - if (technology != DT_RASDISPLAY && technology != DT_RASPRINTER) - { - // Have to get screen DC Caps, because a metafile will return 0. - HDC dc2 = ::GetDC(NULL); - nHeight = M_FONTDATA->m_pointSize*GetDeviceCaps(dc2, LOGPIXELSY)/72; - ::ReleaseDC(NULL, dc2); - } - else - { - nHeight = M_FONTDATA->m_pointSize*GetDeviceCaps(dc, LOGPIXELSY)/72; - } -*/ - // Have to get screen DC Caps, because a metafile will return 0. - HDC dc2 = ::GetDC(NULL); - int ppInch = ::GetDeviceCaps(dc2, LOGPIXELSY); - ::ReleaseDC(NULL, dc2); - - // New behaviour: apparently ppInch varies according to - // Large/Small Fonts setting in Windows. This messes - // up fonts. So, set ppInch to a constant 96 dpi. - ppInch = 96; - -#if FONT_SIZE_COMPATIBILITY - // Incorrect, but compatible with old wxWindows behaviour - int nHeight = (M_FONTDATA->m_pointSize*ppInch/72); -#else - // Correct for Windows compatibility - int nHeight = - (M_FONTDATA->m_pointSize*ppInch/72); -#endif - - bool ff_underline = M_FONTDATA->m_underlined; - - M_FONTDATA->m_hFont = (WXHFONT) CreateFont(nHeight, 0, 0, 0,ff_weight,ff_italic,(BYTE)ff_underline, - 0, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, - PROOF_QUALITY, DEFAULT_PITCH | ff_family, pzFace); -#ifdef WXDEBUG_CREATE - if (m_hFont==NULL) wxError("Cannot create font","Internal Error") ; -#endif - return (M_FONTDATA->m_hFont != (WXHFONT) NULL); - } - return FALSE; -} - -bool wxFont::FreeResource(bool force) -{ - if (M_FONTDATA && M_FONTDATA->m_hFont) - { - ::DeleteObject((HFONT) M_FONTDATA->m_hFont); - M_FONTDATA->m_hFont = 0; - return TRUE; - } - return FALSE; -} - -WXHANDLE wxFont::GetResourceHandle() -{ - if ( !M_FONTDATA ) - return 0; - else - return (WXHANDLE)M_FONTDATA->m_hFont ; -} - -bool wxFont::IsFree() -{ - return (M_FONTDATA && (M_FONTDATA->m_hFont == 0)); -} - -void wxFont::Unshare() -{ - // Don't change shared data - if (!m_refData) - { - m_refData = new wxFontRefData(); - } - else - { - wxFontRefData* ref = new wxFontRefData(*(wxFontRefData*)m_refData); - UnRef(); - m_refData = ref; - } -} - -void wxFont::SetPointSize(int pointSize) -{ - Unshare(); - - M_FONTDATA->m_pointSize = pointSize; - - RealizeResource(); -} - -void wxFont::SetFamily(int family) -{ - Unshare(); - - M_FONTDATA->m_family = family; - - RealizeResource(); -} - -void wxFont::SetStyle(int style) -{ - Unshare(); - - M_FONTDATA->m_style = style; - - RealizeResource(); -} - -void wxFont::SetWeight(int weight) -{ - Unshare(); - - M_FONTDATA->m_weight = weight; - - RealizeResource(); -} - -void wxFont::SetFaceName(const wxString& faceName) -{ - Unshare(); - - M_FONTDATA->m_faceName = faceName; - - RealizeResource(); -} - -void wxFont::SetUnderlined(bool underlined) -{ - Unshare(); - - M_FONTDATA->m_underlined = underlined; - - RealizeResource(); -} - -wxString wxFont::GetFamilyString(void) const -{ - wxString fam(""); - switch (GetFamily()) - { - case wxDECORATIVE: - fam = "wxDECORATIVE"; - break; - case wxROMAN: - fam = "wxROMAN"; - break; - case wxSCRIPT: - fam = "wxSCRIPT"; - break; - case wxSWISS: - fam = "wxSWISS"; - break; - case wxMODERN: - fam = "wxMODERN"; - break; - case wxTELETYPE: - fam = "wxTELETYPE"; - break; - default: - fam = "wxDEFAULT"; - break; - } - return fam; -} - -wxString wxFont::GetFaceName(void) const -{ - wxString str(""); - if (M_FONTDATA) - str = M_FONTDATA->m_faceName ; - return str; -} - -wxString wxFont::GetStyleString(void) const -{ - wxString styl(""); - switch (GetStyle()) - { - case wxITALIC: - styl = "wxITALIC"; - break; - case wxSLANT: - styl = "wxSLANT"; - break; - default: - styl = "wxNORMAL"; - break; - } - return styl; -} - -wxString wxFont::GetWeightString(void) const -{ - wxString w(""); - switch (GetWeight()) - { - case wxBOLD: - w = "wxBOLD"; - break; - case wxLIGHT: - w = "wxLIGHT"; - break; - default: - w = "wxNORMAL"; - break; - } - return w; -} - diff --git a/src/msw/fontdlg.cpp b/src/msw/fontdlg.cpp deleted file mode 100644 index d2c23a9d41..0000000000 --- a/src/msw/fontdlg.cpp +++ /dev/null @@ -1,281 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: fontdlg.cpp -// Purpose: wxFontDialog class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "fontdlg.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/defs.h" -#include "wx/utils.h" -#include "wx/dialog.h" -#endif - -#include "wx/fontdlg.h" - -#include - -#ifndef __WIN32__ -#include -#endif - -#include "wx/msw/private.h" -#include "wx/cmndata.h" - -#include -#include -#include - -#define wxDIALOG_DEFAULT_X 300 -#define wxDIALOG_DEFAULT_Y 300 - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog) -#endif - -/* - * wxFontDialog - */ - - -wxFontDialog::wxFontDialog(void) -{ - m_dialogParent = NULL; -} - -wxFontDialog::wxFontDialog(wxWindow *parent, wxFontData *data) -{ - Create(parent, data); -} - -bool wxFontDialog::Create(wxWindow *parent, wxFontData *data) -{ - m_dialogParent = parent; - - if (data) - m_fontData = *data; - return TRUE; -} - -int wxFontDialog::ShowModal(void) -{ - CHOOSEFONT chooseFontStruct; - LOGFONT logFont; - - DWORD flags = CF_TTONLY | CF_SCREENFONTS | CF_NOSIMULATIONS; - - memset(&chooseFontStruct, 0, sizeof(CHOOSEFONT)); - - chooseFontStruct.lStructSize = sizeof(CHOOSEFONT); - chooseFontStruct.hwndOwner = (HWND) (m_dialogParent ? (HWND) m_dialogParent->GetHWND() : NULL); - chooseFontStruct.lpLogFont = &logFont; - - if (m_fontData.initialFont.Ok()) - { - flags |= CF_INITTOLOGFONTSTRUCT; - wxFillLogFont(&logFont, & m_fontData.initialFont); - } - - chooseFontStruct.iPointSize = 0; - chooseFontStruct.rgbColors = RGB((BYTE)m_fontData.fontColour.Red(), (BYTE)m_fontData.fontColour.Green(), (BYTE)m_fontData.fontColour.Blue()); - - if (!m_fontData.GetAllowSymbols()) - flags |= CF_ANSIONLY; - if (m_fontData.GetEnableEffects()) - flags |= CF_EFFECTS; - if (m_fontData.GetShowHelp()) - flags |= CF_SHOWHELP; - if (!(m_fontData.minSize == 0 && m_fontData.maxSize == 0)) - { - chooseFontStruct.nSizeMin = m_fontData.minSize; - chooseFontStruct.nSizeMax = m_fontData.maxSize; - flags |= CF_LIMITSIZE; - } - - chooseFontStruct.Flags = flags; - chooseFontStruct.nFontType = SCREEN_FONTTYPE; - bool success = (ChooseFont(&(chooseFontStruct)) != 0); - - // Restore values - if (success) - { - m_fontData.fontColour.Set(GetRValue(chooseFontStruct.rgbColors), GetGValue(chooseFontStruct.rgbColors), - GetBValue(chooseFontStruct.rgbColors)); - m_fontData.chosenFont = wxCreateFontFromLogFont(&logFont); - } - - return success ? wxID_OK : wxID_CANCEL; -} - -void wxFillLogFont(LOGFONT *logFont, wxFont *font) -{ - BYTE ff_italic; - int ff_weight = 0; - int ff_family = 0; - wxString ff_face(""); - - switch (font->GetFamily()) - { - case wxSCRIPT: ff_family = FF_SCRIPT ; - ff_face = "Script" ; - break ; - case wxDECORATIVE: ff_family = FF_DECORATIVE; - break; - case wxROMAN: ff_family = FF_ROMAN; - ff_face = "Times New Roman" ; - break; - case wxTELETYPE: - case wxMODERN: ff_family = FF_MODERN; - ff_face = "Courier New" ; - break; - case wxSWISS: ff_family = FF_SWISS; - ff_face = "Arial"; - break; - case wxDEFAULT: - default: ff_family = FF_SWISS; - ff_face = "MS Sans Serif" ; - } - - if (font->GetStyle() == wxITALIC || font->GetStyle() == wxSLANT) - ff_italic = 1; - else - ff_italic = 0; - - if (font->GetWeight() == wxNORMAL) - ff_weight = FW_NORMAL; - else if (font->GetWeight() == wxLIGHT) - ff_weight = FW_LIGHT; - else if (font->GetWeight() == wxBOLD) - ff_weight = FW_BOLD; - - // Have to get screen DC Caps, because a metafile will return 0. - HDC dc2 = ::GetDC(NULL); - int ppInch = ::GetDeviceCaps(dc2, LOGPIXELSY); - ::ReleaseDC(NULL, dc2); - - // New behaviour: apparently ppInch varies according to - // Large/Small Fonts setting in Windows. This messes - // up fonts. So, set ppInch to a constant 96 dpi. - ppInch = 96; - -#if FONT_SIZE_COMPATIBILITY - // Incorrect, but compatible with old wxWindows behaviour - int nHeight = (font->GetPointSize()*ppInch/72); -#else - // Correct for Windows compatibility - int nHeight = - (font->GetPointSize()*ppInch/72); -#endif - - bool ff_underline = font->GetUnderlined(); - - ff_face = font->GetFaceName(); - - logFont->lfHeight = nHeight; - logFont->lfWidth = 0; - logFont->lfEscapement = 0; - logFont->lfOrientation = 0; - logFont->lfWeight = ff_weight; - logFont->lfItalic = ff_italic; - logFont->lfUnderline = (BYTE)ff_underline; - logFont->lfStrikeOut = 0; - logFont->lfCharSet = ANSI_CHARSET; - logFont->lfOutPrecision = OUT_DEFAULT_PRECIS; - logFont->lfClipPrecision = CLIP_DEFAULT_PRECIS; - logFont->lfQuality = PROOF_QUALITY; - logFont->lfPitchAndFamily = DEFAULT_PITCH | ff_family; - strcpy(logFont->lfFaceName, ff_face); -} - -wxFont wxCreateFontFromLogFont(LOGFONT *logFont) // , bool createNew) -{ - int fontFamily = wxSWISS; - int fontStyle = wxNORMAL; - int fontWeight = wxNORMAL; - int fontPoints = 10; - bool fontUnderline = FALSE; - char *fontFace = NULL; - -// int lfFamily = logFont->lfPitchAndFamily & 0xF0; - int lfFamily = logFont->lfPitchAndFamily; - if (lfFamily & FIXED_PITCH) - lfFamily -= FIXED_PITCH; - if (lfFamily & VARIABLE_PITCH) - lfFamily -= VARIABLE_PITCH; - - switch (lfFamily) - { - case FF_ROMAN: - fontFamily = wxROMAN; - break; - case FF_SWISS: - fontFamily = wxSWISS; - break; - case FF_SCRIPT: - fontFamily = wxSCRIPT; - break; - case FF_MODERN: - fontFamily = wxMODERN; - break; - case FF_DECORATIVE: - fontFamily = wxDECORATIVE; - break; - default: - fontFamily = wxSWISS; - break; - } - switch (logFont->lfWeight) - { - case FW_LIGHT: - fontWeight = wxLIGHT; - break; - case FW_NORMAL: - fontWeight = wxNORMAL; - break; - case FW_BOLD: - fontWeight = wxBOLD; - break; - default: - fontWeight = wxNORMAL; - break; - } - if (logFont->lfItalic) - fontStyle = wxITALIC; - else - fontStyle = wxNORMAL; - - if (logFont->lfUnderline) - fontUnderline = TRUE; - - if (logFont->lfFaceName) - fontFace = logFont->lfFaceName; - - HDC dc2 = ::GetDC(NULL); - - if ( logFont->lfHeight < 0 ) - logFont->lfHeight = - logFont->lfHeight; - fontPoints = abs(72*logFont->lfHeight/GetDeviceCaps(dc2, LOGPIXELSY)); - ::ReleaseDC(NULL, dc2); - -// if ( createNew ) - return wxFont(fontPoints, fontFamily, fontStyle, fontWeight, fontUnderline, fontFace); -// else -// return wxTheFontList->FindOrCreateFont(fontPoints, fontFamily, fontStyle, fontWeight, fontUnderline, fontFace); -} - - diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp deleted file mode 100644 index a45bf2ea6b..0000000000 --- a/src/msw/frame.cpp +++ /dev/null @@ -1,1037 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: frame.cpp -// Purpose: wxFrame -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "frame.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/setup.h" -#include "wx/frame.h" -#include "wx/menu.h" -#include "wx/app.h" -#include "wx/utils.h" -#include "wx/dialog.h" -#include "wx/settings.h" -#include "wx/dcclient.h" -#endif - -#include "wx/msw/private.h" -#include "wx/statusbr.h" -#include "wx/toolbar.h" -#include "wx/menuitem.h" - -#ifdef LoadAccelerators -#undef LoadAccelerators -#endif - -#if USE_NATIVE_STATUSBAR -#include -#endif - -extern wxList wxModelessWindows; -extern wxList wxPendingDelete; -extern char wxFrameClassName[]; -extern wxMenu *wxCurrentPopupMenu; - -#if !USE_SHARED_LIBRARY -BEGIN_EVENT_TABLE(wxFrame, wxWindow) - EVT_SIZE(wxFrame::OnSize) - EVT_ACTIVATE(wxFrame::OnActivate) - EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight) - EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged) - EVT_IDLE(wxFrame::OnIdle) - EVT_CLOSE(wxFrame::OnCloseWindow) -END_EVENT_TABLE() - -IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow) -#endif - -#if USE_NATIVE_STATUSBAR -bool wxFrame::m_useNativeStatusBar = TRUE; -#else -bool wxFrame::m_useNativeStatusBar = FALSE; -#endif - -wxFrame::wxFrame(void) -{ - m_frameToolBar = NULL ; - m_frameMenuBar = NULL; - m_frameStatusBar = NULL; - - m_windowParent = NULL; - m_iconized = FALSE; -} - -bool wxFrame::Create(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - if (!parent) - wxTopLevelWindows.Append(this); - - SetName(name); -// m_modalShowing = FALSE; - m_windowStyle = style; - m_frameMenuBar = NULL; - m_frameToolBar = NULL ; - m_frameStatusBar = NULL; - - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE)); - -// m_icon = NULL; - if ( id > -1 ) - m_windowId = id; - else - m_windowId = (int)NewControlId(); - - if (parent) parent->AddChild(this); - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - m_iconized = FALSE; - - // we pass NULL as parent to MSWCreate because frames with parents behave - // very strangely under Win95 shell - MSWCreate(m_windowId, NULL, wxFrameClassName, this, title, - x, y, width, height, style); - - wxModelessWindows.Append(this); - return TRUE; -} - -wxFrame::~wxFrame(void) -{ - m_isBeingDeleted = TRUE; - wxTopLevelWindows.DeleteObject(this); - - if (m_frameStatusBar) - delete m_frameStatusBar; - if (m_frameMenuBar) - delete m_frameMenuBar; - -/* New behaviour March 1998: check if it's the last top-level window */ -// if (wxTheApp && (this == wxTheApp->GetTopWindow())) - - if (wxTheApp && (wxTopLevelWindows.Number() == 0)) - { - wxTheApp->SetTopWindow(NULL); - - if (wxTheApp->GetExitOnFrameDelete()) - { - PostQuitMessage(0); - } - } - - wxModelessWindows.DeleteObject(this); - - // For some reason, wxWindows can activate another task altogether - // when a frame is destroyed after a modal dialog has been invoked. - // Try to bring the parent to the top. - if (GetParent() && GetParent()->GetHWND()) - ::BringWindowToTop((HWND) GetParent()->GetHWND()); -} - -WXHMENU wxFrame::GetWinMenu(void) const -{ - return m_hMenu; -} - -// Get size *available for subwindows* i.e. excluding menu bar, toolbar etc. -void wxFrame::GetClientSize(int *x, int *y) const -{ - RECT rect; - GetClientRect((HWND) GetHWND(), &rect); - - if ( GetStatusBar() ) - { - int statusX, statusY; - GetStatusBar()->GetClientSize(&statusX, &statusY); - rect.bottom -= statusY; - } - - wxPoint pt(GetClientAreaOrigin()); - rect.bottom -= pt.y; - rect.right -= pt.x; - - *x = rect.right; - *y = rect.bottom; -} - -// Set the client size (i.e. leave the calculation of borders etc. -// to wxWindows) -void wxFrame::SetClientSize(int width, int height) -{ - HWND hWnd = (HWND) GetHWND(); - - RECT rect; - GetClientRect(hWnd, &rect); - - RECT rect2; - GetWindowRect(hWnd, &rect2); - - // Find the difference between the entire window (title bar and all) - // and the client area; add this to the new client size to move the - // window - int actual_width = rect2.right - rect2.left - rect.right + width; - int actual_height = rect2.bottom - rect2.top - rect.bottom + height; - - if ( GetStatusBar() ) - { - int statusX, statusY; - GetStatusBar()->GetClientSize(&statusX, &statusY); - actual_height += statusY; - } - - wxPoint pt(GetClientAreaOrigin()); - actual_width += pt.y; - actual_height += pt.x; - - POINT point; - point.x = rect2.left; - point.y = rect2.top; - - MoveWindow(hWnd, point.x, point.y, actual_width, actual_height, (BOOL)TRUE); - - wxSizeEvent event(wxSize(width, height), m_windowId); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); -} - -void wxFrame::GetSize(int *width, int *height) const -{ - RECT rect; - GetWindowRect((HWND) GetHWND(), &rect); - *width = rect.right - rect.left; - *height = rect.bottom - rect.top; -} - -void wxFrame::GetPosition(int *x, int *y) const -{ - RECT rect; - GetWindowRect((HWND) GetHWND(), &rect); - POINT point; - point.x = rect.left; - point.y = rect.top; - - *x = point.x; - *y = point.y; -} - -void wxFrame::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - int currentX, currentY; - int x1 = x; - int y1 = y; - int w1 = width; - int h1 = height; - - GetPosition(¤tX, ¤tY); - if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - x1 = currentX; - if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - y1 = currentY; - - int ww,hh ; - GetSize(&ww,&hh) ; - if (width == -1) w1 = ww ; - if (height==-1) h1 = hh ; - - MoveWindow((HWND) GetHWND(), x1, y1, w1, h1, (BOOL)TRUE); - - wxSizeEvent event(wxSize(width, height), m_windowId); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); -} - -bool wxFrame::Show(bool show) -{ - int cshow; - if (show) - cshow = SW_SHOW; - else - cshow = SW_HIDE; - - if (!show) - { - // Try to highlight the correct window (the parent) - HWND hWndParent = 0; - if (GetParent()) - { - hWndParent = (HWND) GetParent()->GetHWND(); - if (hWndParent) - ::BringWindowToTop(hWndParent); - } - } - - ShowWindow((HWND) GetHWND(), (BOOL)cshow); - if (show) - { - BringWindowToTop((HWND) GetHWND()); - - wxActivateEvent event(wxEVT_ACTIVATE, TRUE, m_windowId); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); - } - return TRUE; -} - -void wxFrame::Iconize(bool iconize) -{ - if (!iconize) - Show(TRUE); - - int cshow; - if (iconize) - cshow = SW_MINIMIZE; - else - cshow = SW_RESTORE; - ShowWindow((HWND) GetHWND(), (BOOL)cshow); - m_iconized = iconize; -} - -// Equivalent to maximize/restore in Windows -void wxFrame::Maximize(bool maximize) -{ - Show(TRUE); - int cshow; - if (maximize) - cshow = SW_MAXIMIZE; - else - cshow = SW_RESTORE; - ShowWindow((HWND) GetHWND(), cshow); - m_iconized = FALSE; -} - -bool wxFrame::IsIconized(void) const -{ - ((wxFrame *)this)->m_iconized = (::IsIconic((HWND) GetHWND()) != 0); - return m_iconized; -} - -void wxFrame::SetTitle(const wxString& title) -{ - SetWindowText((HWND) GetHWND(), (const char *)title); -} - -wxString wxFrame::GetTitle(void) const -{ - GetWindowText((HWND) GetHWND(), wxBuffer, 1000); - return wxString(wxBuffer); -} - -void wxFrame::SetIcon(const wxIcon& icon) -{ - m_icon = icon; -#if defined(__WIN95__) - if ( m_icon.Ok() ) - SendMessage((HWND) GetHWND(), WM_SETICON, - (WPARAM)TRUE, (LPARAM)(HICON) m_icon.GetHICON()); -#endif -} - -wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id, - const wxString& name) -{ - wxStatusBar *statusBar = NULL; - -#if USE_NATIVE_STATUSBAR - if (UsesNativeStatusBar()) - { - statusBar = new wxStatusBar95(this, id, style); - } - else -#endif - { - statusBar = new wxStatusBar(this, id, wxPoint(0, 0), wxSize(100, 20), - style, name); - - // Set the height according to the font and the border size - wxClientDC dc(statusBar); - dc.SetFont(* statusBar->GetFont()); - - long x, y; - dc.GetTextExtent("X", &x, &y); - - int height = (int)( (y * 1.1) + 2* statusBar->GetBorderY()); - - statusBar->SetSize(-1, -1, 100, height); - } - - statusBar->SetFieldsCount(number); - return statusBar; -} - -wxStatusBar* wxFrame::CreateStatusBar(int number, long style, wxWindowID id, - const wxString& name) -{ - // VZ: calling CreateStatusBar twice is an error - why anyone would do it? - wxCHECK_MSG( m_frameStatusBar == NULL, FALSE, - "recreating status bar in wxFrame" ); - - m_frameStatusBar = OnCreateStatusBar(number, style, id, - name); - if ( m_frameStatusBar ) - { - PositionStatusBar(); - return m_frameStatusBar; - } - else - return NULL; -} - -void wxFrame::SetStatusText(const wxString& text, int number) -{ - wxCHECK_RET( m_frameStatusBar != NULL, "no statusbar to set text for" ); - - m_frameStatusBar->SetStatusText(text, number); -} - -void wxFrame::SetStatusWidths(int n, const int widths_field[]) -{ - wxCHECK_RET( m_frameStatusBar != NULL, "no statusbar to set widths for" ); - - m_frameStatusBar->SetStatusWidths(n, widths_field); - PositionStatusBar(); -} - -void wxFrame::PositionStatusBar(void) -{ - // native status bar positions itself - if (m_frameStatusBar -#if USE_NATIVE_STATUSBAR - && !m_frameStatusBar->IsKindOf(CLASSINFO(wxStatusBar95)) -#endif - ) - { - int w, h; - GetClientSize(&w, &h); - int sw, sh; - m_frameStatusBar->GetSize(&sw, &sh); - - // Since we wish the status bar to be directly under the client area, - // we use the adjusted sizes without using wxSIZE_NO_ADJUSTMENTS. - m_frameStatusBar->SetSize(0, h, w, sh); - } -} - -void wxFrame::SetMenuBar(wxMenuBar *menu_bar) -{ - if (!menu_bar) - { - m_frameMenuBar = NULL; - return; - } - - if (menu_bar->m_menuBarFrame) - return; - - int i; - HMENU menu = CreateMenu(); - - for (i = 0; i < menu_bar->m_menuCount; i ++) - { - HMENU popup = (HMENU)menu_bar->m_menus[i]->m_hMenu; - // - // After looking Bounds Checker result, it seems that all - // menus must be individually destroyed. So, don't reset m_hMenu, - // to allow ~wxMenu to do the job. - // - menu_bar->m_menus[i]->m_savehMenu = (WXHMENU) popup; - // Uncommenting for the moment... JACS - menu_bar->m_menus[i]->m_hMenu = 0; - AppendMenu(menu, MF_POPUP | MF_STRING, (UINT)popup, menu_bar->m_titles[i]); - } - - menu_bar->m_hMenu = (WXHMENU)menu; - if (m_frameMenuBar) - delete m_frameMenuBar; - - this->m_hMenu = (WXHMENU) menu; - - DWORD err = 0; - if (!SetMenu((HWND) GetHWND(), menu)) - { -#ifdef __WIN32__ - err = GetLastError(); -#endif - } - - m_frameMenuBar = menu_bar; - menu_bar->m_menuBarFrame = this; -} - -#if 0 -bool wxFrame::LoadAccelerators(const wxString& table) -{ - m_acceleratorTable = (WXHANDLE) -#ifdef __WIN32__ -#ifdef UNICODE - ::LoadAcceleratorsW(wxGetInstance(), (const char *)table); -#else - ::LoadAcceleratorsA(wxGetInstance(), (const char *)table); -#endif -#else - ::LoadAccelerators(wxGetInstance(), (const char *)table); -#endif - - // The above is necessary because LoadAccelerators is a macro - // which we have undefed earlier in the file to avoid confusion - // with wxFrame::LoadAccelerators. Ugh! - - return (m_acceleratorTable != (WXHANDLE) NULL); -} -#endif - -void wxFrame::Fit(void) -{ - // Work out max. size - wxNode *node = GetChildren()->First(); - int max_width = 0; - int max_height = 0; - while (node) - { - // Find a child that's a subwindow, but not a dialog box. - wxWindow *win = (wxWindow *)node->Data(); - - if (!win->IsKindOf(CLASSINFO(wxFrame)) && - !win->IsKindOf(CLASSINFO(wxDialog))) - { - int width, height; - int x, y; - win->GetSize(&width, &height); - win->GetPosition(&x, &y); - - if ((x + width) > max_width) - max_width = x + width; - if ((y + height) > max_height) - max_height = y + height; - } - node = node->Next(); - } - SetClientSize(max_width, max_height); -} - -// Responds to colour changes, and passes event on to children. -void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event) -{ - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE)); - Refresh(); - - if ( m_frameStatusBar ) - { - wxSysColourChangedEvent event2; - event2.SetEventObject( m_frameStatusBar ); - m_frameStatusBar->ProcessEvent(event2); - } - - // Propagate the event to the non-top-level children - wxWindow::OnSysColourChanged(event); -} - -/* - * Frame window - * - */ - -void wxFrame::MSWCreate(int id, wxWindow *parent, const char *wclass, wxWindow *wx_win, const char *title, - int x, int y, int width, int height, long style) - -{ - m_defaultIcon = (WXHICON) (wxSTD_FRAME_ICON ? wxSTD_FRAME_ICON : wxDEFAULT_FRAME_ICON); - - // If child windows aren't properly drawn initially, WS_CLIPCHILDREN - // could be the culprit. But without it, you can get a lot of flicker. - - DWORD msflags = 0; - if ((style & wxCAPTION) == wxCAPTION) - msflags = WS_OVERLAPPED; - else - msflags = WS_POPUP; - - if (style & wxMINIMIZE_BOX) - msflags |= WS_MINIMIZEBOX; - if (style & wxMAXIMIZE_BOX) - msflags |= WS_MAXIMIZEBOX; - if (style & wxTHICK_FRAME) - msflags |= WS_THICKFRAME; - if (style & wxSYSTEM_MENU) - msflags |= WS_SYSMENU; - if ((style & wxMINIMIZE) || (style & wxICONIZE)) - msflags |= WS_MINIMIZE; - if (style & wxMAXIMIZE) - msflags |= WS_MAXIMIZE; - if (style & wxCAPTION) - msflags |= WS_CAPTION; - if (style & wxCLIP_CHILDREN) - msflags |= WS_CLIPCHILDREN; - - // Keep this in wxFrame because it saves recoding this function - // in wxTinyFrame -#if USE_ITSY_BITSY - if (style & wxTINY_CAPTION_VERT) - msflags |= IBS_VERTCAPTION; - if (style & wxTINY_CAPTION_HORIZ) - msflags |= IBS_HORZCAPTION; -#else - if (style & wxTINY_CAPTION_VERT) - msflags |= WS_CAPTION; - if (style & wxTINY_CAPTION_HORIZ) - msflags |= WS_CAPTION; -#endif - if ((style & wxTHICK_FRAME) == 0) - msflags |= WS_BORDER; - - WXDWORD extendedStyle = MakeExtendedStyle(style); - - if (style & wxSTAY_ON_TOP) - extendedStyle |= WS_EX_TOPMOST; - - m_iconized = FALSE; - wxWindow::MSWCreate(id, parent, wclass, wx_win, title, x, y, width, height, - msflags, NULL, extendedStyle); - // Seems to be necessary if we use WS_POPUP - // style instead of WS_OVERLAPPED - if (width > -1 && height > -1) - ::PostMessage((HWND) GetHWND(), WM_SIZE, SIZE_RESTORED, MAKELPARAM(width, height)); -} - -bool wxFrame::MSWOnPaint(void) -{ -#if WXDEBUG > 1 - wxDebugMsg("wxFrameWnd::OnPaint %d\n", handle); -#endif - RECT rect; - if (GetUpdateRect((HWND) GetHWND(), &rect, FALSE)) - { - if (m_iconized) - { - HICON the_icon; - if (m_icon.Ok()) - the_icon = (HICON) m_icon.GetHICON(); - if (the_icon == 0) - the_icon = (HICON) m_defaultIcon; - - PAINTSTRUCT ps; - // Hold a pointer to the dc so long as the OnPaint() message - // is being processed - HDC cdc = BeginPaint((HWND) GetHWND(), &ps); - - // Erase background before painting or we get white background - this->MSWDefWindowProc(WM_ICONERASEBKGND,(WORD)ps.hdc,0L); - - if (the_icon) - { - RECT rect; - GetClientRect((HWND) GetHWND(), &rect); - int icon_width = 32; - int icon_height = 32; - int icon_x = (int)((rect.right - icon_width)/2); - int icon_y = (int)((rect.bottom - icon_height)/2); - DrawIcon(cdc, icon_x, icon_y, the_icon); - } - - EndPaint((HWND) GetHWND(), &ps); - } - else - { - wxPaintEvent event(m_windowId); - event.m_eventObject = this; - if (!GetEventHandler()->ProcessEvent(event)) - Default(); - } - return 0; - } - return 1; -} - -WXHICON wxFrame::MSWOnQueryDragIcon(void) -{ - if (m_icon.Ok() && (m_icon.GetHICON() != 0)) - return m_icon.GetHICON(); - else - return m_defaultIcon; -} - -void wxFrame::MSWOnSize(int x, int y, WXUINT id) -{ -#if WXDEBUG > 1 - wxDebugMsg("wxFrameWnd::OnSize %d\n", m_hWnd); -#endif - switch (id) - { - case SIZENORMAL: - // only do it it if we were iconized before, otherwise resizing the - // parent frame has a curious side effect of bringing it under it's - // children - if ( !m_iconized ) - break; - - // restore all child frames too - IconizeChildFrames(FALSE); - - // fall through - - case SIZEFULLSCREEN: - m_iconized = FALSE; - break; - - case SIZEICONIC: - // iconize all child frames too - IconizeChildFrames(TRUE); - - m_iconized = TRUE; - break; - } - - if (!m_iconized) - { - // forward WM_SIZE to status bar control -#if USE_NATIVE_STATUSBAR - if (m_frameStatusBar && m_frameStatusBar->IsKindOf(CLASSINFO(wxStatusBar95))) - { - wxSizeEvent event(wxSize(x, y), m_frameStatusBar->GetId()); - event.SetEventObject( m_frameStatusBar ); - - ((wxStatusBar95 *)m_frameStatusBar)->OnSize(event); - } -#endif - - PositionStatusBar(); - PositionToolBar(); - - wxSizeEvent event(wxSize(x, y), m_windowId); - event.SetEventObject( this ); - if (!GetEventHandler()->ProcessEvent(event)) - Default(); - } -} - -bool wxFrame::MSWOnClose(void) -{ -#if WXDEBUG > 1 - wxDebugMsg("wxFrameWnd::OnClose %d\n", handle); -#endif - return Close(); -} - -bool wxFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control) -{ -#if WXDEBUG > 1 - wxDebugMsg("wxFrameWnd::OnCommand %d\n", handle); -#endif - if (cmd == 0 || cmd == 1 ) // Can be either a menu command or an accelerator. - { - // In case it's e.g. a toolbar. - wxWindow *win = wxFindWinFromHandle(control); - if (win) - return win->MSWCommand(cmd, id); - - if (wxCurrentPopupMenu) - { - wxMenu *popupMenu = wxCurrentPopupMenu; - wxCurrentPopupMenu = NULL; - if (popupMenu->MSWCommand(cmd, id)) - return TRUE; - } - - if (GetMenuBar() && GetMenuBar()->FindItemForId(id)) - { - ProcessCommand(id); - return TRUE; - } - else - return FALSE; - } - else - return FALSE; -} - -void wxFrame::MSWOnMenuHighlight(WXWORD nItem, WXWORD nFlags, WXHMENU hSysMenu) -{ - if (nFlags == 0xFFFF && hSysMenu == 0) - { - wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, -1); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); - } - else if (nFlags != MF_SEPARATOR) - { - wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, nItem); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); - } -} - -bool wxFrame::MSWProcessMessage(WXMSG* pMsg) -{ - return FALSE; -} - -bool wxFrame::MSWTranslateMessage(WXMSG* pMsg) -{ - if (m_acceleratorTable.Ok() && - ::TranslateAccelerator((HWND) GetHWND(), (HACCEL) m_acceleratorTable.GetHACCEL(), (MSG *)pMsg)) - return TRUE; - - return FALSE; -} - -// Default resizing behaviour - if only ONE subwindow, -// resize to client rectangle size -void wxFrame::OnSize(wxSizeEvent& event) -{ - // if we're using constraints - do use them - #if USE_CONSTRAINTS - if ( GetAutoLayout() ) { - Layout(); - return; - } - #endif - - // do we have _exactly_ one child? - wxWindow *child = NULL; - for ( wxNode *node = GetChildren()->First(); node; node = node->Next() ) - { - wxWindow *win = (wxWindow *)node->Data(); - if ( !win->IsKindOf(CLASSINFO(wxFrame)) && - !win->IsKindOf(CLASSINFO(wxDialog)) && - (win != GetStatusBar()) && - (win != GetToolBar()) ) - { - if ( child ) - return; // it's our second subwindow - nothing to do - child = win; - } - } - - if ( child ) { - // we have exactly one child - set it's size to fill the whole frame - int clientW, clientH; - GetClientSize(&clientW, &clientH); - - int x = 0; - int y = 0; - - child->SetSize(x, y, clientW, clientH); - } -} - -// Default activation behaviour - set the focus for the first child -// subwindow found. -void wxFrame::OnActivate(wxActivateEvent& event) -{ - for(wxNode *node = GetChildren()->First(); node; node = node->Next()) - { - // Find a child that's a subwindow, but not a dialog box. - wxWindow *child = (wxWindow *)node->Data(); - if (!child->IsKindOf(CLASSINFO(wxFrame)) && - !child->IsKindOf(CLASSINFO(wxDialog))) - { -#if WXDEBUG > 1 - wxDebugMsg("wxFrame::OnActivate: about to set the child's focus.\n"); -#endif - child->SetFocus(); - return; - } - } -} - -// The default implementation for the close window event - calls -// OnClose for backward compatibility. - -void wxFrame::OnCloseWindow(wxCloseEvent& event) -{ - // Compatibility - if ( GetEventHandler()->OnClose() || event.GetForce()) - { - this->Destroy(); - } -} - -bool wxFrame::OnClose(void) -{ - return TRUE; -} - -// Destroy the window (delayed, if a managed window) -bool wxFrame::Destroy(void) -{ - if (!wxPendingDelete.Member(this)) - wxPendingDelete.Append(this); - return TRUE; -} - -// Default menu selection behaviour - display a help string -void wxFrame::OnMenuHighlight(wxMenuEvent& event) -{ - if (GetStatusBar()) - { - if (event.GetMenuId() == -1) - SetStatusText(""); - else - { - wxMenuBar *menuBar = GetMenuBar(); - if (menuBar) - { - wxString helpString(menuBar->GetHelpString(event.GetMenuId())); - if (helpString != "") - SetStatusText(helpString); - } - } - } -} - -wxMenuBar *wxFrame::GetMenuBar(void) const -{ - return m_frameMenuBar; -} - -void wxFrame::Centre(int direction) -{ - int display_width, display_height, width, height, x, y; - wxDisplaySize(&display_width, &display_height); - - GetSize(&width, &height); - GetPosition(&x, &y); - - if (direction & wxHORIZONTAL) - x = (int)((display_width - width)/2); - if (direction & wxVERTICAL) - y = (int)((display_height - height)/2); - - SetSize(x, y, width, height); -} - -// Call this to simulate a menu command -void wxFrame::Command(int id) -{ - ProcessCommand(id); -} - -void wxFrame::ProcessCommand(int id) -{ - wxCommandEvent commandEvent(wxEVENT_TYPE_MENU_COMMAND, id); - commandEvent.SetInt( id ); - commandEvent.SetEventObject( this ); - - wxMenuBar *bar = GetMenuBar() ; - if (!bar) - return; - - wxMenuItem *item = bar->FindItemForId(id) ; - if (item && item->IsCheckable()) - { - bar->Check(id,!bar->Checked(id)) ; - } - GetEventHandler()->ProcessEvent(commandEvent); -} - -// Checks if there is a toolbar, and returns the first free client position -wxPoint wxFrame::GetClientAreaOrigin() const -{ - wxPoint pt(0, 0); - if (GetToolBar()) - { - int w, h; - GetToolBar()->GetSize(& w, & h); - - if (GetToolBar()->GetWindowStyleFlag() & wxTB_VERTICAL) - { - pt.x += w; - } - else - { - pt.y += h; - } - } - return pt; -} - -wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& name) -{ - wxCHECK_MSG( m_frameToolBar == NULL, FALSE, - "recreating toolbar in wxFrame" ); - - wxToolBar* toolBar = OnCreateToolBar(style, id, name); - if (toolBar) - { - SetToolBar(toolBar); - PositionToolBar(); - return toolBar; - } - else - { - return NULL; - } -} - -wxToolBar* wxFrame::OnCreateToolBar(long style, wxWindowID id, const wxString& name) -{ - return new wxToolBar(this, id, wxDefaultPosition, wxDefaultSize, style, name); -} - -void wxFrame::PositionToolBar(void) -{ - RECT rect; - ::GetClientRect((HWND) GetHWND(), &rect); - - if ( GetStatusBar() ) - { - int statusX, statusY; - GetStatusBar()->GetClientSize(&statusX, &statusY); - rect.bottom -= statusY; - } - - if (GetToolBar()) - { - int tw, th; - GetToolBar()->GetSize(& tw, & th); - - if (GetToolBar()->GetWindowStyleFlag() & wxTB_VERTICAL) - { - // Use the 'real' MSW position - GetToolBar()->SetSize(0, 0, tw, rect.bottom, wxSIZE_NO_ADJUSTMENTS); - } - else - { - // Use the 'real' MSW position - GetToolBar()->SetSize(0, 0, rect.right, th, wxSIZE_NO_ADJUSTMENTS); - } - } -} - -// propagate our state change to all child frames -void wxFrame::IconizeChildFrames(bool bIconize) -{ - wxWindow *child = NULL; - for ( wxNode *node = GetChildren()->First(); node; node = node->Next() ) { - wxWindow *win = (wxWindow *)node->Data(); - if ( win->IsKindOf(CLASSINFO(wxFrame)) ) { - ((wxFrame *)win)->Iconize(bIconize); - } - } -} - diff --git a/src/msw/gauge95.cpp b/src/msw/gauge95.cpp deleted file mode 100644 index d0ddf67099..0000000000 --- a/src/msw/gauge95.cpp +++ /dev/null @@ -1,181 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gauge95.cpp -// Purpose: wxGauge95 class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "gauge95.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#endif - -#if USE_GAUGE && defined(__WIN95__) - -#include "wx/msw/gauge95.h" -#include "wx/msw/private.h" - -#if defined(__WIN95__) && !defined(__GNUWIN32__) -#include -#endif - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxGauge95, wxControl) -#endif - -bool wxGauge95::Create(wxWindow *parent, wxWindowID id, - int range, - const wxPoint& pos, - const wxSize& size, - long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - - if (parent) parent->AddChild(this); - m_rangeMax = range; - m_gaugePos = 0; - - SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; - SetForegroundColour(parent->GetDefaultForegroundColour()) ; - - m_windowStyle = style; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - long msFlags = WS_CHILD | WS_VISIBLE | WS_TABSTOP; - - HWND wx_button = - CreateWindowEx(MakeExtendedStyle(m_windowStyle), PROGRESS_CLASS, NULL, msFlags, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, - wxGetInstance(), NULL); - - m_hWnd = (WXHWND)wx_button; - - // Subclass again for purposes of dialog editing mode - SubclassWin((WXHWND) wx_button); - - SendMessage((HWND) GetHWND(), PBM_SETRANGE, 0, MAKELPARAM(0, range)); - - SetFont(* parent->GetFont()); - - if (width == -1) - width = 50; - if (height == -1) - height = 50; - SetSize(x, y, width, height); - - ShowWindow((HWND) GetHWND(), SW_SHOW); - - return TRUE; -} - -void wxGauge95::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - int currentX, currentY; - GetPosition(¤tX, ¤tY); - int x1 = x; - int y1 = y; - int w1 = width; - int h1 = height; - - if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - x1 = currentX; - if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - y1 = currentY; - - AdjustForParentClientOrigin(x1, y1, sizeFlags); - - // If we're prepared to use the existing size, then... - if (width == -1 && height == -1 && ((sizeFlags & wxSIZE_AUTO) != wxSIZE_AUTO)) - { - GetSize(&w1, &h1); - } - - // Deal with default size (using -1 values) - if (w1<=0) - w1 = DEFAULT_ITEM_WIDTH; - - if (h1<=0) - h1 = DEFAULT_ITEM_HEIGHT; - - MoveWindow((HWND) GetHWND(), x1, y1, w1, h1, TRUE); -} - -void wxGauge95::SetShadowWidth(int w) -{ -} - -void wxGauge95::SetBezelFace(int w) -{ -} - -void wxGauge95::SetRange(int r) -{ - m_rangeMax = r; - - SendMessage((HWND) GetHWND(), PBM_SETRANGE, 0, MAKELPARAM(0, r)); -} - -void wxGauge95::SetValue(int pos) -{ - m_gaugePos = pos; - - SendMessage((HWND) GetHWND(), PBM_SETPOS, pos, 0); -} - -int wxGauge95::GetShadowWidth(void) const -{ - return 0; -} - -int wxGauge95::GetBezelFace(void) const -{ - return 0; -} - -int wxGauge95::GetRange(void) const -{ - return m_rangeMax; -} - -int wxGauge95::GetValue(void) const -{ - return m_gaugePos; -} - -void wxGauge95::SetForegroundColour(const wxColour& col) -{ - m_foregroundColour = col ; -} - -void wxGauge95::SetBackgroundColour(const wxColour& col) -{ - m_backgroundColour = col ; -} - -#endif // USE_GAUGE diff --git a/src/msw/gaugemsw.cpp b/src/msw/gaugemsw.cpp deleted file mode 100644 index 1df35a9e9c..0000000000 --- a/src/msw/gaugemsw.cpp +++ /dev/null @@ -1,1174 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gaugemsw.cpp -// Purpose: wxGaugeMSW class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "gauge.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#endif - -#if USE_GAUGE - -#include "wx/msw/gaugemsw.h" -#include "wx/msw/private.h" - -/* gas gauge graph control messages--class "zYzGauge" */ -#define ZYZG_SETRANGE (WM_USER + 0) -#define ZYZG_GETRANGE (WM_USER + 1) -#define ZYZG_SETPOSITION (WM_USER + 2) -#define ZYZG_GETPOSITION (WM_USER + 3) -#define ZYZG_SETORIENTATION (WM_USER + 4) -#define ZYZG_GETORIENTATION (WM_USER + 5) -#define ZYZG_SETFGCOLOR (WM_USER + 6) -#define ZYZG_GETFGCOLOR (WM_USER + 7) -#define ZYZG_SETBKCOLOR (WM_USER + 8) -#define ZYZG_GETBKCOLOR (WM_USER + 9) -#define ZYZG_SETWIDTH3D (WM_USER + 10) -#define ZYZG_GETWIDTH3D (WM_USER + 11) -#define ZYZG_SETBEZELFACE (WM_USER + 12) -#define ZYZG_GETBEZELFACE (WM_USER + 13) -#define ZYZG_SETDELTAPOS (WM_USER + 14) - - -/* orientations for ZYZG_WW_ORIENTATION */ -#define ZYZG_ORIENT_LEFTTORIGHT 0 -#define ZYZG_ORIENT_RIGHTTOLEFT 1 -#define ZYZG_ORIENT_BOTTOMTOTOP 2 -#define ZYZG_ORIENT_TOPTOBOTTOM 3 - -/* gauge styles */ -#define ZYZGS_3D 0x8000L /* control will be 3D */ - -/* public function prototypes */ -BOOL FAR PASCAL gaugeInit(HINSTANCE hInstance); - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxGaugeMSW, wxControl) -#endif - -bool wxGaugeMSW::Create(wxWindow *parent, wxWindowID id, - int range, - const wxPoint& pos, - const wxSize& size, - long style, - const wxValidator& validator, - const wxString& name) -{ - static bool wxGaugeMSWInitialised = FALSE; - - if ( !wxGaugeMSWInitialised ) - { - if (!gaugeInit((HINSTANCE) wxGetInstance())) - wxFatalError("Cannot initalize Gauge library"); - wxGaugeMSWInitialised = TRUE; - } - - SetName(name); - SetValidator(validator); - - if (parent) parent->AddChild(this); - m_rangeMax = range; - m_gaugePos = 0; - - SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; - SetForegroundColour(parent->GetDefaultForegroundColour()) ; - - m_windowStyle = style; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - long msFlags = WS_CHILD | WS_VISIBLE | WS_TABSTOP; - msFlags |= ZYZGS_3D; - - HWND wx_button = - CreateWindowEx(MakeExtendedStyle(m_windowStyle), "zYzGauge", NULL, msFlags, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, - wxGetInstance(), NULL); - - m_hWnd = (WXHWND)wx_button; - - // Subclass again for purposes of dialog editing mode - SubclassWin((WXHWND)wx_button); - - int wOrient = 0; - - if (m_windowStyle & wxGA_HORIZONTAL) - wOrient = ZYZG_ORIENT_LEFTTORIGHT; - else - wOrient = ZYZG_ORIENT_BOTTOMTOTOP; - - SendMessage(wx_button, ZYZG_SETORIENTATION, wOrient, 0); - SendMessage(wx_button, ZYZG_SETRANGE, range, 0); - - SendMessage((HWND) GetHWND(), ZYZG_SETFGCOLOR, 0, RGB(GetForegroundColour().Red(), GetForegroundColour().Green(), GetForegroundColour().Blue())); - SendMessage((HWND) GetHWND(), ZYZG_SETBKCOLOR, 0, RGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue())); - - SetFont(* parent->GetFont()); - - if (width == -1) - width = 50; - if (height == -1) - height = 50; - SetSize(x, y, width, height); - - ShowWindow((HWND) GetHWND(), SW_SHOW); - - return TRUE; -} - -void wxGaugeMSW::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - int currentX, currentY; - GetPosition(¤tX, ¤tY); - int x1 = x; - int y1 = y; - int w1 = width; - int h1 = height; - - if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - x1 = currentX; - if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - y1 = currentY; - - AdjustForParentClientOrigin(x1, y1, sizeFlags); - - // If we're prepared to use the existing size, then... - if (width == -1 && height == -1 && ((sizeFlags & wxSIZE_AUTO) != wxSIZE_AUTO)) - { - GetSize(&w1, &h1); - } - - // Deal with default size (using -1 values) - if (w1<=0) - w1 = DEFAULT_ITEM_WIDTH; - - if (h1<=0) - h1 = DEFAULT_ITEM_HEIGHT; - - MoveWindow((HWND) GetHWND(), x1, y1, w1, h1, TRUE); -} - -void wxGaugeMSW::SetShadowWidth(int w) -{ - SendMessage((HWND) GetHWND(), ZYZG_SETWIDTH3D, w, 0); -} - -void wxGaugeMSW::SetBezelFace(int w) -{ - SendMessage((HWND) GetHWND(), ZYZG_SETBEZELFACE, w, 0); -} - -void wxGaugeMSW::SetRange(int r) -{ - m_rangeMax = r; - - SendMessage((HWND) GetHWND(), ZYZG_SETRANGE, r, 0); -} - -void wxGaugeMSW::SetValue(int pos) -{ - m_gaugePos = pos; - - SendMessage((HWND) GetHWND(), ZYZG_SETPOSITION, pos, 0); -} - -int wxGaugeMSW::GetShadowWidth(void) const -{ - return (int) SendMessage((HWND) GetHWND(), ZYZG_GETWIDTH3D, 0, 0); -} - -int wxGaugeMSW::GetBezelFace(void) const -{ - return (int) SendMessage((HWND) GetHWND(), ZYZG_GETBEZELFACE, 0, 0); -} - -int wxGaugeMSW::GetRange(void) const -{ - return (int) SendMessage((HWND) GetHWND(), ZYZG_GETRANGE, 0, 0); -} - -int wxGaugeMSW::GetValue(void) const -{ - return (int) SendMessage((HWND) GetHWND(), ZYZG_GETPOSITION, 0, 0); -} - -void wxGaugeMSW::SetForegroundColour(const wxColour& col) -{ - m_foregroundColour = col ; - SendMessage((HWND) GetHWND(), ZYZG_SETFGCOLOR, 0, RGB(col.Red(), col.Green(), col.Blue())); -} - -void wxGaugeMSW::SetBackgroundColour(const wxColour& col) -{ - m_backgroundColour = col ; - SendMessage((HWND) GetHWND(), ZYZG_SETBKCOLOR, 0, RGB(col.Red(), col.Green(), col.Blue())); -} - - -/** zyz3d.c - * - * DESCRIPTION: - * This module contains functions for creating nifty 3D borders - * around controls like zYzGauge. - * - * HISTORY: - * 3/14/91 cjp put in this comment - * 6/19/92 cjp touched it a bit - * - ** cjp */ -// COPYRIGHT: -// -// (C) Copyright Microsoft Corp. 1992. All rights reserved. -// -// You have a royalty-free right to use, modify, reproduce and -// distribute the Sample Files (and/or any modified version) in -// any way you find useful, provided that you agree that -// Microsoft has no warranty obligations or liability for any -// Sample Application Files which are modified. -// - - -/* get the includes we need */ -#include - -/* misc. control flag defines */ -#define DRAW3D_IN 0x0001 -#define DRAW3D_OUT 0x0002 - -#define DRAW3D_TOPLINE 0x0004 -#define DRAW3D_BOTTOMLINE 0x0008 -#define DRAW3D_LEFTLINE 0x0010 -#define DRAW3D_RIGHTLINE 0x0020 - - -/* public function prototypes */ -void FAR PASCAL Draw3DFaceFrame(HDC, LPRECT, WORD); -void FAR PASCAL Draw3DRect(HDC, LPRECT, WORD, WORD); -void FAR PASCAL Draw3DLine(HDC, WORD, WORD, WORD, WORD, WORD); - - -/** void FAR PASCAL Draw3DFaceFrame(HDC hdc, LPRECT rc, WORD wWidth) - * - * DESCRIPTION: - * This function draws a flat frame with the current button-face - * color. - * - * ARGUMENTS: - * HDC hdc : The DC to draw into. - * - * LPRECT rc : The containing rect for the new frame. - * - * WORD wWidth : The width of the frame to draw. - * - * RETURN (void FAR PASCAL): - * The frame will have been drawn into the DC. - * - * NOTES: - * - ** cjp */ - -void FAR PASCAL Draw3DFaceFrame(HDC hdc, LPRECT rc, WORD wWidth) -{ - RECT rc1; - DWORD rgbOld; - - /* don't go through a bunch of work if we don't have to */ - if (!wWidth) - return; - - /* set up color to be button-face color--so it may not be gray */ - rgbOld = SetBkColor(hdc, GetSysColor(COLOR_BTNFACE)); - - /* perform CopyRect w/o bloody windows style overhead */ - rc1 = *rc; - - /* top */ - rc1.top = rc->top; - rc1.left = rc->left; - rc1.bottom = rc->top + wWidth; - rc1.right = rc->right; - - /* blast it out */ - ExtTextOut(hdc, rc1.left, rc1.top, ETO_OPAQUE, &rc1, NULL, 0, NULL); - - /* right */ - rc1.left = rc->right - wWidth; - rc1.bottom = rc->bottom; - - /* blast this part now */ - ExtTextOut(hdc, rc1.left, rc1.top, ETO_OPAQUE, &rc1, NULL, 0, NULL); - - /* left */ - rc1.left = rc->left; - rc1.right = rc->left + wWidth; - - /* and another part */ - ExtTextOut(hdc, rc1.left, rc1.top, ETO_OPAQUE, &rc1, NULL, 0, NULL); - - /* bottom */ - rc1.right = rc->right; - rc1.top = rc->bottom - wWidth; - - /* finish it off */ - ExtTextOut(hdc, rc1.left, rc1.top, ETO_OPAQUE, &rc1, NULL, 0, NULL); - - /* restore the old bk color */ - SetBkColor(hdc, rgbOld); -} /* Draw3DFaceFrame() */ - - -/** void FAR PASCAL Draw3DRect(HDC, LPRECT, WORD, WORD) - * - * DESCRIPTION: - * Draws a 3D rectangle that is shaded. wFlags can be used to - * control how the rectangle looks. - * - * ARGUMENTS: - * HDC hdc : Handle to the device context that will be - * used to display the rectangle. - * - * RECT rect : A rectangle describing the dimensions of - * the rectangle in device coordinates. - * - * WORD wShadowWidth : Width of the shadow in device coordinates. - * - * WORD wFlags : The following flags may be passed to describe - * the style of the rectangle: - * - * DRAW3D_IN : The shadow is drawn such that - * the box appears to be sunk in to the screen. - * This is default if 0 is passed. - * - * DRAW3D_OUT : The shadow is drawn such that - * the box appears to be sticking out of the - * screen. - * - * RETURN (void FAR PASCAL): - * The 3D looking rectangle will have been drawn into the DC. - * - * NOTES: - * - ** cjp */ - -void FAR PASCAL Draw3DRect(HDC hdc, LPRECT lpRect, - WORD wShadowWidth, WORD wFlags) -{ - /* sanity check--don't work if you don't have to! */ - if (!wShadowWidth || !RectVisible(hdc, lpRect)) - return; - - /* draw the top line */ - Draw3DLine(hdc, lpRect->left, lpRect->top, - lpRect->right - lpRect->left, - wShadowWidth, DRAW3D_TOPLINE | wFlags); - - /* right line */ - Draw3DLine(hdc, lpRect->right, lpRect->top, - lpRect->bottom - lpRect->top, - wShadowWidth, DRAW3D_RIGHTLINE | wFlags); - - /* bottom line */ - Draw3DLine(hdc, lpRect->left, lpRect->bottom, - lpRect->right - lpRect->left, - wShadowWidth, DRAW3D_BOTTOMLINE | wFlags); - - /* left line */ - Draw3DLine(hdc, lpRect->left, lpRect->top, - lpRect->bottom - lpRect->top, - wShadowWidth, DRAW3D_LEFTLINE | wFlags); -} /* Draw3DRect() */ - - -/** void FAR PASCAL Draw3DLine(HDC hdc, WORD x, WORD y, WORD nLen, - * - * DESCRIPTION: - * Draws a 3D line that can be used to make a 3D box. - * - * ARGUMENTS: - * HDC hdc : Handle to the device context that will be - * used to display the 3D line. - * - * WORD x, y : Coordinates of the beginning of the line. - * These coordinates are in device units and - * represent the _outside_ most point. Horiz- - * ontal lines are drawn from left to right and - * vertical lines are drawn from top to bottom. - * - * WORD wShadowWidth : Width of the shadow in device coordinates. - * - * WORD wFlags : The following flags may be passed to - * describe the style of the 3D line: - * - * DRAW3D_IN : The shadow is drawn such that - * the box appears to be sunk in to the screen. - * This is default if 0 is passed. - * - * DRAW3D_OUT : The shadow is drawn such that - * the box appears to be sticking out of the - * screen. - * - * DRAW3D_TOPLINE, _BOTTOMLINE, _LEFTLINE, and - * _RIGHTLINE : Specifies that a "top", - * "Bottom", "Left", or"Right" line is to be - * drawn. - * - * RETURN (void FAR PASCAL): - * The line will have been drawn into the DC. - * - * NOTES: - * - ** cjp */ - -void FAR PASCAL Draw3DLine(HDC hdc, WORD x, WORD y, WORD nLen, - WORD wShadowWidth, WORD wFlags) -{ - HBRUSH hOldBrush; - HPEN hOldPen; - BOOL fDark; - POINT Point[ 4 ]; /* define a polgon with 4 points */ - - /* if width is zero, don't do nothin'! */ - if (!wShadowWidth) - return; - - /* define shape of polygon--origin is always the same */ - Point[0].x = x; - Point[0].y = y; - - /* To do this we'll simply draw a polygon with four sides, using - * the appropriate brush. I dare you to ask me why this isn't a - * switch/case! - */ - if (wFlags & DRAW3D_TOPLINE) - { - /* across to right */ - Point[1].x = x + nLen - (wShadowWidth == 1 ? 1 : 0); - Point[1].y = y; - - /* down/left */ - Point[2].x = x + nLen - wShadowWidth; - Point[2].y = y + wShadowWidth; - - /* accross to left */ - Point[3].x = x + wShadowWidth; - Point[3].y = y + wShadowWidth; - - /* select 'dark' brush if 'in'--'light' for 'out' */ - fDark = (wFlags & DRAW3D_IN) ? TRUE : FALSE; - } - - /* possibly the bottom? */ - else if (wFlags & DRAW3D_BOTTOMLINE) - { - /* across to right */ - Point[1].x = x + nLen; - Point[1].y = y; - - /* up/left */ - Point[2].x = x + nLen - wShadowWidth; - Point[2].y = y - wShadowWidth; - - /* accross to left */ - Point[3].x = x + wShadowWidth; - Point[3].y = y - wShadowWidth; - - /* select 'light' brush if 'in' */ - fDark = (wFlags & DRAW3D_IN) ? FALSE : TRUE; - } - - /* ok, it's gotta be left? */ - else if (wFlags & DRAW3D_LEFTLINE) - { - /* down */ - Point[1].x = x; - Point[1].y = y + nLen - (wShadowWidth == 1 ? 1 : 0); - - /* up/right */ - Point[2].x = x + wShadowWidth; - Point[2].y = y + nLen - wShadowWidth; - - /* down */ - Point[3].x = x + wShadowWidth; - Point[3].y = y + wShadowWidth; - - /* select 'dark' brush if 'in'--'light' for 'out' */ - fDark = (wFlags & DRAW3D_IN) ? TRUE : FALSE; - } - - /* well maybe it's for the right side? */ - else if (wFlags & DRAW3D_RIGHTLINE) - { - /* down */ - Point[1].x = x; - Point[1].y = y + nLen; - - /* up/left */ - Point[2].x = x - wShadowWidth; - Point[2].y = y + nLen - wShadowWidth; - - /* up */ - Point[3].x = x - wShadowWidth; - Point[3].y = y + wShadowWidth; - - /* select 'light' brush if 'in' */ - fDark = (wFlags & DRAW3D_IN) ? FALSE : TRUE; - } - - /* bad drugs? */ - else return; - - /* select NULL_PEN for no borders */ - hOldPen = (HPEN) SelectObject(hdc, GetStockObject(NULL_PEN)); - - /* select the appropriate color for the fill */ - if (fDark) - hOldBrush = (HBRUSH) SelectObject(hdc, GetStockObject(GRAY_BRUSH)); - else - hOldBrush = (HBRUSH) SelectObject(hdc, GetStockObject(WHITE_BRUSH)); - - /* finally, draw the dern thing */ - Polygon(hdc, (LPPOINT)&Point, 4); - - /* restore what we killed */ - SelectObject(hdc, hOldBrush); - SelectObject(hdc, hOldPen); -} /* Draw3DLine() */ - -/** EOF: zyz3d.c **/ - -/** zyzgauge.c - * - * DESCRIPTION: - * Yet another 'Gas Gauge Custom Control.' This control gives you - * a 'progress bar' class (named zYzGauge) for use in your applications. - * You can set the range, position, font, color, orientation, and 3d - * effect of the gauge by sending messages to the control. - * - * Before you can use this control, you MUST first export the window - * procedure for the control (or define it with the _export keyword): - * - * EXPORTS gaugeWndProc - * - * You then need initialize the class before you use it: - * - * if (!gaugeInit(hInstance)) - * die a horrible death - * else - * you are good to go - * - * The colors used by the control default to black and white if you - * are running on a mono-display. They default to blue and white - * if you are on a color display. You enable the 3D effect by setting - * the ZYZGS_3D style flag in the styles field of the control (like - * any other control). - * - * To select your own colors, you can send the ZYZG_SETFGCOLOR and - * ZYZG_SETBKCOLOR messages to set the foreground (percent done) and - * background (percent not done) colors. The lParam is the RGB() - * value--wParam is ignored. - * - * In all of the following ZYZG_??? messages, the arguments are - * WORDS. If you are setting parameters, the value is sent as - * the wParam (lParam is ignored). If you are getting parameters, - * the value is returned as a LONG and should be cast to a *signed* - * integer. - * - * To set the depth of the 3D effect (if enabled), you can send the - * ZYZG_SETBEZELFACE and ZYZG_SETWIDTH3D messages. The bezel face - * is the flat top on the 3D border--its color will be that of the - * button-face. The 3D width is the width of the bezel itself; inside - * and outside. The light color is white, the dark color is gray. - * Both widths *can* be zero--both default to 2 which looks to me. - * - * The range of the control can be set by sending the ZYZG_SETRANGE - * message to the control. It can be any integer from 1 to 32767. - * What this specifies is the number of pieces that create a whole. - * The default is 100. You can get the current range setting by - * sending the ZYZG_GETRANGE message to the control. - * - * The position (number of pieces out of the whole have been used) is - * set with the ZYZG_SETPOSITION message. It can be any integer from - * 0 to the current range setting of the control--it will be clipped - * if the position is out of bounds. The default position is 0. You - * can get the current position at any time with the ZYZG_GETPOSITION - * message. - * - * You can also set the range using a delta from the current range. - * This is done by sending the ZYZG_SETDELTAPOS message with wParam - * set to a _signed_ integer value within the range of the control. - * - * The font used for the percentage text can be set using the standard - * WM_SETFONT message. You can get the current font at any time with - * the WM_GETFONT message. - * - * The orientation can be left to right, right to left, bottom to top, - * or top to bottom. Whatever suits your needs. You set this by - * sending the ZYZG_ORIENTATION message to the control with one of - * the following values (default is ZYZG_ORIENT_LEFTTORIGHT): - * - * ZYZG_ORIENT_LEFTTORIGHT (0) - * ZYZG_ORIENT_RIGHTTOLEFT (1) - * ZYZG_ORIENT_BOTTOMTOTOP (2) - * ZYZG_ORIENT_TOPTOBOTTOM (3) - * - * HISTORY: - * 3/12/91 cjp put in this comment - * 6/19/92 cjp touched it a bit - * - ** cjp */ -// COPYRIGHT: -// -// (C) Copyright Microsoft Corp. 1992. All rights reserved. -// -// You have a royalty-free right to use, modify, reproduce and -// distribute the Sample Files (and/or any modified version) in -// any way you find useful, provided that you agree that -// Microsoft has no warranty obligations or liability for any -// Sample Application Files which are modified. -// - - -/* get the includes we need */ -#ifndef __GNUWIN32__ -#include -#endif -#include -#include -#include -// #include "zyz3d.h" -// #include "zyzgauge.h" - - -/* static global variables */ -static char gszzYzGaugeClass[] = "zYzGauge"; - - -/* window word position definitions */ -#define ZYZG_WW_PZYZGAUGE 0 -/* #define ZYZG_WW_EXTRABYTES 2 */ -#define ZYZG_WW_EXTRABYTES 4 - - -/* control block structure typedef */ -typedef struct tZYZGAUGE -{ - WORD wRange; - WORD wPosition; - WORD wOrientation; - WORD wWidth3D; - WORD wWidthBezelFace; - HFONT hFont; - DWORD rgbTextColor; - DWORD rgbBkColor; - -} ZYZGAUGE, *PZYZGAUGE, FAR *LPZYZGAUGE; - - -/* some default values for the control */ -#define ZYZG_DEF_RANGE 100 -#define ZYZG_DEF_POSITION 0 -#define ZYZG_DEF_ORIENTATION ZYZG_ORIENT_LEFTTORIGHT -#define ZYZG_DEF_WIDTH3D 2 -#define ZYZG_DEF_BEZELFACE 2 - - - -/* the default settings for drawing colors--display dependent */ -static DWORD rgbDefTextColor; -static DWORD rgbDefBkColor; -static BOOL fSupport3D; - -#if !defined(APIENTRY) // NT defines APIENTRY, 3.x not -#define APIENTRY FAR PASCAL -#endif - -#ifdef __WIN32__ -#define _EXPORT /**/ -#else -#define _EXPORT _export -typedef signed short int SHORT ; -#endif - -/* internal function prototypes */ -static void PASCAL gaugePaint(HWND, HDC); -/* LRESULT FAR PASCAL */ -LRESULT APIENTRY _EXPORT gaugeWndProc(HWND, UINT, WPARAM, LPARAM); - - - -/** BOOL FAR PASCAL gaugeInit(HINSTANCE hInstance) - * - * DESCRIPTION: - * Registers the window class for the zYzGauge control. Performs - * other initialization for the zYzGauge text control. This must - * be done before the zYzGauge control is used--or it will fail - * and your dialog box will not open! - * - * ARGUMENTS: - * HINSTANCE hInstance : Instance handle to register class with. - * - * RETURN (BOOL FAR): - * The return value is TRUE if the zYzGauge class was successfully - * registered. It is FALSE if the initialization fails. - * - * NOTES: - * - ** cjp */ - -//#pragma alloc_text(init, gaugeInit) - -BOOL FAR PASCAL gaugeInit(HINSTANCE hInstance) -{ - static BOOL fRegistered = FALSE; - WNDCLASS wc; - HDC hdc; - - /* assume already registered if not first instance */ - if (fRegistered) - return (TRUE); - - /* fill in the class structure for the zyzgauge control */ - wc.hCursor = LoadCursor(NULL, IDC_ARROW); - wc.hIcon = NULL; - wc.lpszMenuName = NULL; - wc.lpszClassName = gszzYzGaugeClass; - wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); - wc.hInstance = hInstance; - -#ifdef ZYZGAUGE_DLL - wc.style = CS_GLOBALCLASS | CS_HREDRAW | CS_VREDRAW; -#else - wc.style = CS_HREDRAW | CS_VREDRAW; -#endif - - wc.lpfnWndProc = gaugeWndProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = ZYZG_WW_EXTRABYTES; - - /* attempt to register it--return FALSE if fail */ - if (!RegisterClass(&wc)) - return (FALSE); - - /* Get a DC to determine whether device is mono or not, and set - * default foreground/background colors as appropriate. - */ - if ((hdc = CreateIC("DISPLAY", NULL, NULL, 0L))) - { - /* check for mono-display */ - if ((GetDeviceCaps(hdc, BITSPIXEL) == 1) && - (GetDeviceCaps(hdc, PLANES) == 1)) - { - /* using a mono DC--white foreground, black background */ - rgbDefTextColor = RGB(255, 255, 255); - rgbDefBkColor = RGB(0, 0, 0); - } - - /* good! we have color: blue foreground, white background */ - else - { - rgbDefTextColor = RGB(0, 0, 255); - rgbDefBkColor = RGB(255, 255, 255); - } - - /* need at _least_ 8 for two shades of gray (>=VGA) */ - fSupport3D = (GetDeviceCaps(hdc, NUMCOLORS) >= 8) ? TRUE : FALSE; - - /* get rid of the DC (IC) */ - DeleteDC(hdc); - } - - /* uh-oh... can't get DC (IC)... fail */ - else - { - /* unregister the class */ - UnregisterClass(gszzYzGaugeClass, hInstance); - return (FALSE); - } - - /* return success */ - return (fRegistered = TRUE); -} /* gaugeInit() */ - - -/** static void PASCAL gaugePaint(HWND hwnd, HDC hdc) - * - * DESCRIPTION: - * This function is responsible for painting the zYzGauge control. - * - * ARGUMENTS: - * HWND hwnd : The window handle for the gauge. - * - * HDC hdc : The DC for the gauge's window. - * - * RETURN (void): - * The control will have been painted. - * - * NOTES: - * - ** cjp */ - -static void PASCAL gaugePaint(HWND hwnd, HDC hdc) -{ - PZYZGAUGE pgauge; - WORD iRange, iPos; - WORD Offset = 1; - DWORD dwExtent; - RECT rc1, rc2; - HFONT hFont; - char ach[ 6 ]; - WORD dx, dy, wGomerX, wGomerY; -/* Win32s has no GetTextExtent(); let's try GetTextExtentPoint() instead, - * which needs a SIZE* parameter */ -#if defined(__WIN32__) - SIZE size; -#endif - - /* get pointer to the control's control block */ -// pgauge = (PZYZGAUGE)GetWindowWord(hwnd, ZYZG_WW_PZYZGAUGE); - pgauge = (PZYZGAUGE)GetWindowLong(hwnd, ZYZG_WW_PZYZGAUGE); - - /* set the colors into for the gauge into the control */ - SetTextColor(hdc, pgauge->rgbTextColor); - SetBkColor(hdc, pgauge->rgbBkColor); - - /* draw black rectangle for gauge */ - GetClientRect(hwnd, &rc1); - - /* draw a black border on the _outside_ */ - FrameRect(hdc, &rc1, (HBRUSH) GetStockObject(BLACK_BRUSH)); - - /* we want to draw _just inside_ the black border */ - InflateRect(&rc1, -1, -1); - - /* one line thick so far... */ -// Offset = (WORD) 1; - - /* for 3D stuff, we need to have at least two shades of gray */ - if ((GetWindowLong(hwnd, GWL_STYLE) & ZYZGS_3D) && fSupport3D) - { - Draw3DRect(hdc, &rc1, pgauge->wWidth3D, DRAW3D_OUT); - InflateRect(&rc1, ~(pgauge->wWidth3D), ~(pgauge->wWidth3D)); - - Draw3DFaceFrame(hdc, &rc1, pgauge->wWidthBezelFace); - InflateRect(&rc1, ~(pgauge->wWidthBezelFace), ~(pgauge->wWidthBezelFace)); - - Draw3DRect(hdc, &rc1, pgauge->wWidth3D, DRAW3D_IN); - InflateRect(&rc1, ~(pgauge->wWidth3D), ~(pgauge->wWidth3D)); - - /* draw a black border on the _inside_ */ - FrameRect(hdc, &rc1, (HBRUSH) GetStockObject(BLACK_BRUSH)); - - /* we want to draw _just inside_ the black border */ - InflateRect(&rc1, -1, -1); - - /* add all the other pixels into the border width */ - Offset += (2 * pgauge->wWidth3D) + pgauge->wWidthBezelFace + 1; - } - - /* dup--one rc for 'how much filled', one rc for 'how much empty' */ - rc2 = rc1; - - /* get the range--make sure it's a valid range */ - if ((iRange = pgauge->wRange) <= 0) - iRange = 1; - - /* get the position--greater than 100% would be bad */ - if ((iPos = pgauge->wPosition) > iRange) - iPos = iRange; - - /* compute the actual size of the gauge */ - dx = rc1.right - rc1.left; - dy = rc1.bottom - rc1.top; - wGomerX = (WORD)((DWORD)iPos * dx / iRange); - wGomerY = (WORD)((DWORD)iPos * dy / iRange); - - /* get the orientation and munge rects accordingly */ - switch (pgauge->wOrientation) - { - case ZYZG_ORIENT_RIGHTTOLEFT: - rc1.left = rc2.right = rc1.right - wGomerX; - break; - - case ZYZG_ORIENT_BOTTOMTOTOP: - rc1.top = rc2.bottom = rc1.bottom - wGomerY; - break; - - case ZYZG_ORIENT_TOPTOBOTTOM: - rc1.bottom = rc2.top += wGomerY; - break; - - default: - rc1.right = rc2.left += wGomerX; - break; - } /* switch () */ - - /* select the correct font */ - hFont = (HFONT) SelectObject(hdc, pgauge->hFont); - - /* build up a string to blit out--ie the meaning of life: "42%" */ - wsprintf(ach, "%3d%%", (WORD)((DWORD)iPos * 100 / iRange)); -/* Win32s has no GetTextExtent(); let's try GetTextExtentPoint() instead */ -#if defined(__WIN32__) - GetTextExtentPoint(hdc, ach, wGomerX = lstrlen(ach), &size); - dwExtent = size.cx; -#else - dwExtent = GetTextExtent(hdc, ach, wGomerX = lstrlen(ach)); -#endif - - - /* Draw the finished (ie the percent done) side of box. If - * ZYZG_WW_POSITION is 42, (in range of 0 to 100) this ExtTextOut - * draws the meaning of life (42%) bar. - */ - ExtTextOut(hdc, (dx - LOWORD(dwExtent)) / 2 + Offset, - (dy - HIWORD(dwExtent)) / 2 + Offset, - ETO_OPAQUE | ETO_CLIPPED, &rc2, ach, wGomerX, NULL); - - /* Reverse fore and back colors for drawing the undone (ie the non- - * finished) side of the box. - */ - SetBkColor(hdc, pgauge->rgbTextColor); - SetTextColor(hdc, pgauge->rgbBkColor); - - ExtTextOut(hdc, (dx - LOWORD(dwExtent)) / 2 + Offset, - (dy - HIWORD(dwExtent)) / 2 + Offset, - ETO_OPAQUE | ETO_CLIPPED, &rc1, ach, wGomerX, NULL); - - /* unselect the font */ - SelectObject(hdc, hFont); -} /* gaugePaint() */ - - -/** LRESULT FAR PASCAL gaugeWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) - * - * DESCRIPTION: - * This is the control's window procedure. Its purpose is to handle - * special messages for this custom control. - * - * The special control messages for the gauge control are: - * - * ZYZG_SETRANGE : Sets the range of the gauge. In other - * words, the number of parts that make a - * whole. - * - * ZYZG_GETRANGE : Returns the current range of the gauge. - * - * ZYZG_SETORIENTATION : Sets the orientation of the gauge. This - * can be one of the ZYZG_ORIENT_?? msgs. - * - * ZYZG_GETORIENTATION : Gets the current orientation of the - * gauge. - * - * ZYZG_SETPOSITION : Sets the current position of the gauge. - * In other words, how many pieces of the - * whole have been used. - * - * ZYZG_GETPOSITION : Gets the current position of the gauge. - * - * ZYZG_SETDELTAPOS : Sets the position of the gauge +/- the - * specified amount. - * - * ZYZG_SETFGCOLOR : Sets the foreground (percent done) color. - * - * ZYZG_GETFGCOLOR : Gets the foreground (percent done) color. - * - * ZYZG_SETBKCOLOR : Sets the background (percent not done) - * color. - * - * ZYZG_GETBKCOLOR : Gets the background (percent not done) - * color. - * - * WM_SETFONT : Sets the font to use for the percentage - * text of the gauge. - * - * WM_GETFONT : Gets the current font in use by the - * gauge. - * - * NOTES: - * - ** cjp */ - -/* LRESULT FAR PASCAL */ - -LRESULT APIENTRY _EXPORT gaugeWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - HFONT hFont; - PAINTSTRUCT ps; - PZYZGAUGE pgauge; - RECT rc; - -// pgauge = (PZYZGAUGE)GetWindowWord(hwnd, ZYZG_WW_PZYZGAUGE); - pgauge = (PZYZGAUGE)GetWindowLong(hwnd, ZYZG_WW_PZYZGAUGE); - - /* break to get DefWindowProc() */ - switch (uMsg) - { - case WM_CREATE: - /* need to allocate a control block */ -// pgauge = (PZYZGAUGE)LocalAlloc(LPTR, sizeof(ZYZGAUGE)); - pgauge = (PZYZGAUGE)malloc(sizeof(ZYZGAUGE)); - if (!pgauge) - return (0L); - - /* hang on to this control block */ -// SetWindowWord(hwnd, ZYZG_WW_PZYZGAUGE, (WORD)pgauge); - SetWindowLong(hwnd, ZYZG_WW_PZYZGAUGE, (LONG)pgauge); - - /* fill control block with defaults */ - pgauge->wRange = ZYZG_DEF_RANGE; - pgauge->wPosition = ZYZG_DEF_POSITION; - pgauge->wOrientation = ZYZG_DEF_ORIENTATION; - pgauge->wWidth3D = ZYZG_DEF_WIDTH3D; - pgauge->wWidthBezelFace = ZYZG_DEF_BEZELFACE; - pgauge->rgbTextColor = rgbDefTextColor; - pgauge->rgbBkColor = rgbDefBkColor; - - /* use system font */ - SendMessage(hwnd, WM_SETFONT, (WPARAM)NULL, 0L); - - /* go to DefWindowProc() to finish the job */ - break; - - case WM_DESTROY: - /* get rid of the control's memory */ - if (pgauge) -// LocalFree((HANDLE)pgauge); - free(pgauge); - break; - - case ZYZG_GETPOSITION: - return (pgauge->wPosition); - - case ZYZG_GETRANGE: - return (pgauge->wRange); - - case ZYZG_GETORIENTATION: - return (pgauge->wOrientation); - - case ZYZG_GETWIDTH3D: - return (pgauge->wWidth3D); - - case ZYZG_GETBEZELFACE: - return (pgauge->wWidthBezelFace); - - case ZYZG_GETBKCOLOR: - return (pgauge->rgbTextColor); - - case ZYZG_GETFGCOLOR: - return (pgauge->rgbBkColor); - - case ZYZG_SETBKCOLOR: - pgauge->rgbBkColor = lParam; - return (0L); - - case ZYZG_SETFGCOLOR: - pgauge->rgbTextColor = lParam; - return (0L); - - - case ZYZG_SETPOSITION: - pgauge->wPosition = wParam; - -zyzgForceRepaint: - GetClientRect(hwnd, &rc); - if ((GetWindowLong(hwnd, GWL_STYLE) & ZYZGS_3D) && fSupport3D) - { - wParam = (2 * pgauge->wWidth3D) + - pgauge->wWidthBezelFace + 2; - } - - else - wParam = 1; - - InflateRect(&rc, ~(wParam), ~(wParam)); - InvalidateRect(hwnd, &rc, FALSE); - UpdateWindow(hwnd); - return (0L); - - case ZYZG_SETRANGE: - pgauge->wRange = wParam; - goto zyzgForceRepaint; - - case ZYZG_SETORIENTATION: - pgauge->wOrientation = wParam; - goto zyzgForceRepaint; - - case ZYZG_SETWIDTH3D: - pgauge->wWidth3D = wParam; - -zyzgForceRepaint3D: - InvalidateRect(hwnd, NULL, FALSE); - UpdateWindow(hwnd); - return (0L); - - case ZYZG_SETBEZELFACE: - pgauge->wWidthBezelFace = wParam; - goto zyzgForceRepaint3D; - - case ZYZG_SETDELTAPOS: -/* Watcom doesn't like the following line so removing typecasts */ -/* (int)pgauge->wPosition += (int)wParam; */ - pgauge->wPosition += wParam; - goto zyzgForceRepaint; - - case WM_PAINT: - BeginPaint(hwnd, &ps); - gaugePaint(hwnd, ps.hdc); - EndPaint(hwnd, &ps); - return (0L); - - case WM_GETFONT: - hFont = pgauge->hFont; - - /* if system font, then return NULL handle */ - return (long)((hFont == GetStockObject(SYSTEM_FONT)) ? NULL : hFont); - - case WM_SETFONT: - /* if NULL hFont, use system font */ - if (!(hFont = (HFONT)wParam)) - hFont = (HFONT) GetStockObject(SYSTEM_FONT); - - pgauge->hFont = hFont; - - /* redraw if indicated in message */ - if ((BOOL)lParam) - { - InvalidateRect(hwnd, NULL, TRUE); - UpdateWindow(hwnd); - } - return (0L); - } /* switch () */ - - /* let the dialog mangler take care of this message */ - return (DefWindowProc(hwnd, uMsg, wParam, lParam)); -} /* gaugeWndProc() */ - - -/** EOF: zyzgauge.c **/ - -#endif // USE_GAUGE diff --git a/src/msw/gdiobj.cpp b/src/msw/gdiobj.cpp deleted file mode 100644 index 3a10a3fefe..0000000000 --- a/src/msw/gdiobj.cpp +++ /dev/null @@ -1,68 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gdiobj.cpp -// Purpose: wxGDIObject class -// Author: Julian Smart -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "gdiobj.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/setup.h" -#include "wx/list.h" -#include "wx/utils.h" -#include "wx/app.h" -#endif - -#include "wx/gdiobj.h" -#include "wx/msw/private.h" -#include "assert.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxGDIObject, wxObject) -#endif - -/* -void wxGDIObject::IncrementResourceUsage(void) -{ - if ( !M_GDIDATA ) - return; - -// wxDebugMsg("Object %ld about to be incremented: %d\n", (long)this, m_usageCount); - M_GDIDATA->m_usageCount ++; -}; - -void wxGDIObject::DecrementResourceUsage(void) -{ - if ( !M_GDIDATA ) - return; - - M_GDIDATA->m_usageCount --; - if (wxTheApp) - wxTheApp->SetPendingCleanup(TRUE); -// wxDebugMsg("Object %ld decremented: %d\n", (long)this, M_GDIDATA->m_usageCount); - if (M_GDIDATA->m_usageCount < 0) - { - char buf[80]; - sprintf(buf, "Object %ld usage count is %d\n", (long)this, M_GDIDATA->m_usageCount); - wxDebugMsg(buf); - } -// assert(M_GDIDATA->m_usageCount >= 0); -}; - -*/ - diff --git a/src/msw/helpwin.cpp b/src/msw/helpwin.cpp deleted file mode 100644 index 808a63ffcf..0000000000 --- a/src/msw/helpwin.cpp +++ /dev/null @@ -1,148 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: helpwin.cpp -// Purpose: Help system: WinHelp implementation -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "helpwin.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#endif - -#include "wx/msw/helpwin.h" - -#if USE_HELP -#include - -#ifdef __WXMSW__ -#include -#endif - -#include - -// MAX path length -#define _MAXPATHLEN 500 - -// MAX length of Help descriptor -#define _MAX_HELP_LEN 500 - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxWinHelpController, wxHelpControllerBase) -#endif - -wxWinHelpController::wxWinHelpController(void) -{ - m_helpFile = ""; -} - -wxWinHelpController::~wxWinHelpController(void) -{ -} - -bool wxWinHelpController::Initialize(const wxString& filename) -{ - m_helpFile = filename; - return TRUE; -} - -bool wxWinHelpController::LoadFile(const wxString& file) -{ - m_helpFile = file; - return TRUE; -} - -bool wxWinHelpController::DisplayContents(void) -{ - if (m_helpFile == "") return FALSE; - - char buf[_MAXPATHLEN]; - strcpy(buf, (const char*) m_helpFile); - size_t len = strlen(buf); - if (!(buf[len-1] == 'p' && buf[len-2] == 'l' && buf[len-3] == 'h' && buf[len-4] == '.')) - strcat(buf, ".hlp"); - if (wxTheApp->GetTopWindow()) - { -#if defined(__WIN95__) - WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), buf, HELP_FINDER, 0L); -#else - WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), buf, HELP_CONTENTS, 0L); -#endif - return TRUE; - } - return FALSE; -} - -bool wxWinHelpController::DisplaySection(int section) -{ - // No WinHelp equivalent for this - return FALSE; -} - -bool wxWinHelpController::DisplayBlock(long block) -{ - // Use context number -- a very rough equivalent to block id! - if (!m_helpFile) return FALSE; - - char buf[_MAXPATHLEN]; - strcpy(buf, m_helpFile); - size_t len = strlen(buf); - if (!(buf[len-1] == 'p' && buf[len-2] == 'l' && buf[len-3] == 'h' && buf[len-4] == '.')) - strcat(buf, ".hlp"); - if (wxTheApp->GetTopWindow()) - { - WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), buf, HELP_CONTEXT, (DWORD)block); - return TRUE; - } - return FALSE; -} - -bool wxWinHelpController::KeywordSearch(const wxString& k) -{ - if (m_helpFile == "") return FALSE; - - char buf[_MAXPATHLEN]; - strcpy(buf, m_helpFile); - size_t len = strlen(buf); - if (!(buf[len-1] == 'p' && buf[len-2] == 'l' && buf[len-3] == 'h' && buf[len-4] == '.')) - strcat(buf, ".hlp"); - if (wxTheApp->GetTopWindow()) - { - WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), buf, HELP_PARTIALKEY, (DWORD)(const char*) k); - return TRUE; - } - return FALSE; -} - -// Can't close the help window explicitly in WinHelp -bool wxWinHelpController::Quit(void) -{ - if (wxTheApp->GetTopWindow()) - { - WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), 0, HELP_QUIT, 0L); - return TRUE; - } - else - return FALSE; -} - -// Don't get notified of WinHelp quitting -void wxWinHelpController::OnQuit(void) -{ -} - -#endif // USE_HELP diff --git a/src/msw/icon.cpp b/src/msw/icon.cpp deleted file mode 100644 index 740be06b7d..0000000000 --- a/src/msw/icon.cpp +++ /dev/null @@ -1,187 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: icon.cpp -// Purpose: wxIcon class -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "icon.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/setup.h" -#include "wx/list.h" -#include "wx/utils.h" -#include "wx/app.h" -#include "wx/icon.h" -#endif - -#include "wx/msw/private.h" -#include "assert.h" - -#if USE_XPM_IN_MSW -#define FOR_MSW 1 -#include "..\..\contrib\wxxpm\libxpm.34b\lib\xpm34.h" -#endif - -#if USE_RESOURCE_LOADING_IN_MSW -#include "wx/msw/curico.h" -#include "wx/msw/curicop.h" -#endif - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap) -IMPLEMENT_DYNAMIC_CLASS(wxICOFileHandler, wxBitmapHandler) -IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler, wxBitmapHandler) -#endif - -/* - * Icons - */ - - -wxIconRefData::wxIconRefData(void) -{ - m_hIcon = (WXHICON) NULL ; -} - -wxIconRefData::~wxIconRefData(void) -{ - if ( m_hIcon ) - ::DestroyIcon((HICON) m_hIcon); -} - -wxIcon::wxIcon(void) -{ -} - -wxIcon::wxIcon(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSED(height)) -{ -} - -wxIcon::wxIcon(const wxString& icon_file, long flags, - int desiredWidth, int desiredHeight) - -{ - LoadFile(icon_file, flags, desiredWidth, desiredHeight); -} - -wxIcon::~wxIcon(void) -{ -} - -bool wxIcon::FreeResource(bool force) -{ - if (M_ICONDATA && M_ICONDATA->m_hIcon) - { - DestroyIcon((HICON) M_ICONDATA->m_hIcon); - M_ICONDATA->m_hIcon = (WXHICON) NULL; - } - return TRUE; -} - -bool wxIcon::LoadFile(const wxString& filename, long type, - int desiredWidth, int desiredHeight) -{ - UnRef(); - - m_refData = new wxIconRefData; - - wxBitmapHandler *handler = FindHandler(type); - - if ( handler ) - return handler->LoadFile(this, filename, type, desiredWidth, desiredHeight); - else - return FALSE; -} - -void wxIcon::SetHICON(WXHICON ico) -{ - if ( !M_ICONDATA ) - m_refData = new wxIconRefData; - - M_ICONDATA->m_hIcon = ico; -} - -bool wxICOFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth, int desiredHeight) -{ -#if USE_RESOURCE_LOADING_IN_MSW - if ( bitmap->IsKindOf(CLASSINFO(wxIcon)) ) - { - wxIcon *icon = (wxIcon *)bitmap; - int width, height; - WXHICON hIcon = (WXHICON) ReadIconFile((char *)(const char *)name, wxGetInstance(), &width, &height); - - ((wxIconRefData *)icon->GetRefData())->m_hIcon = hIcon; - ((wxIconRefData *)icon->GetRefData())->m_ok = (((wxIconRefData *)icon->GetRefData())->m_hIcon != 0); - return ((wxIconRefData *)icon->GetRefData())->m_ok; - } - else - return FALSE; -#else - return FALSE; -#endif -} - -bool wxICOResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth, int desiredHeight) -{ - if ( bitmap->IsKindOf(CLASSINFO(wxIcon)) ) - { -#if defined(__WIN32__) - if (desiredWidth > -1 && desiredHeight > -1) - { - M_ICONHANDLERDATA->m_hIcon = (WXHICON) ::LoadImage(wxGetInstance(), name, IMAGE_ICON, desiredWidth, desiredHeight, LR_DEFAULTCOLOR); - } - else -#endif - { - M_ICONHANDLERDATA->m_hIcon = (WXHICON) ::LoadIcon(wxGetInstance(), name); - } - -#ifdef __WIN32__ - // Win32s doesn't have GetIconInfo function... - if (M_ICONHANDLERDATA->m_hIcon && wxGetOsVersion()!=wxWIN32S) - { - ICONINFO info ; - if (::GetIconInfo((HICON) M_ICONHANDLERDATA->m_hIcon, &info)) - { - HBITMAP ms_bitmap = info.hbmMask ; - if (ms_bitmap) - { - BITMAP bm; - ::GetObject(ms_bitmap, sizeof(BITMAP), (LPSTR) &bm); - M_ICONHANDLERDATA->m_width = bm.bmWidth; - M_ICONHANDLERDATA->m_height = bm.bmHeight; - } - if (info.hbmMask) - ::DeleteObject(info.hbmMask) ; - if (info.hbmColor) - ::DeleteObject(info.hbmColor) ; - } - } -#else - M_ICONHANDLERDATA->m_width = 32; - M_ICONHANDLERDATA->m_height = 32; -#endif - M_ICONHANDLERDATA->m_ok = (M_ICONHANDLERDATA->m_hIcon != 0); - return M_ICONHANDLERDATA->m_ok; - } - else - return FALSE; -} - diff --git a/src/msw/imaglist.cpp b/src/msw/imaglist.cpp deleted file mode 100644 index e6ca103540..0000000000 --- a/src/msw/imaglist.cpp +++ /dev/null @@ -1,200 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: imaglist.cpp -// Purpose: wxImageList -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "imaglist.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#if defined(__WIN95__) - -#ifndef WX_PRECOMP -#include -#include "wx/setup.h" -#include "wx/window.h" -#include "wx/dcclient.h" -#endif - -#include "wx/msw/imaglist.h" -#include "wx/msw/private.h" - -#ifndef __GNUWIN32__ -#include -#endif - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxImageList, wxObject) -#endif - -wxImageList::wxImageList(void) -{ - m_hImageList = 0; -} - -wxImageList::~wxImageList(void) -{ - if ( m_hImageList ) - ImageList_Destroy((HIMAGELIST) m_hImageList); - m_hImageList = 0; -} - - -// Attributes -//////////////////////////////////////////////////////////////////////////// - -// Returns the number of images in the image list. -int wxImageList::GetImageCount(void) const -{ - return ImageList_GetImageCount((HIMAGELIST) m_hImageList); -} - -// Operations -//////////////////////////////////////////////////////////////////////////// - -// Creates an image list -bool wxImageList::Create(int width, int height, bool mask, int initial) -{ - UINT flags = 0; - if ( mask ) - flags |= ILC_MASK; - - // Grow by 1, I guess this is reasonable behaviour most of the time - m_hImageList = (WXHIMAGELIST) ImageList_Create(width, height, flags, initial, 1); - return (m_hImageList != 0); -} - -// Adds a bitmap, and optionally a mask bitmap. -// Note that wxImageList creates new bitmaps, so you may delete -// 'bitmap' and 'mask'. -int wxImageList::Add(const wxBitmap& bitmap, const wxBitmap& mask) -{ - HBITMAP hBitmap1 = (HBITMAP) bitmap.GetHBITMAP(); - HBITMAP hBitmap2 = 0; - if ( mask.Ok() ) - hBitmap2 = (HBITMAP) mask.GetHBITMAP(); - return ImageList_Add((HIMAGELIST) GetHIMAGELIST(), hBitmap1, hBitmap2); -} - -// Adds a bitmap, using the specified colour to create the mask bitmap -// Note that wxImageList creates new bitmaps, so you may delete -// 'bitmap'. -int wxImageList::Add(const wxBitmap& bitmap, const wxColour& maskColour) -{ - HBITMAP hBitmap1 = (HBITMAP) bitmap.GetHBITMAP(); - COLORREF colorRef = PALETTERGB(maskColour.Red(), maskColour.Green(), maskColour.Blue()); - return ImageList_AddMasked((HIMAGELIST) GetHIMAGELIST(), hBitmap1, colorRef); -} - -// Adds a bitmap and mask from an icon. -int wxImageList::Add(const wxIcon& icon) -{ - HICON hIcon = (HICON) icon.GetHICON(); - return ImageList_AddIcon((HIMAGELIST) GetHIMAGELIST(), hIcon); -} - -// Replaces a bitmap, optionally passing a mask bitmap. -// Note that wxImageList creates new bitmaps, so you may delete -// 'bitmap' and 'mask'. -bool wxImageList::Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask) -{ - HBITMAP hBitmap1 = (HBITMAP) bitmap.GetHBITMAP(); - HBITMAP hBitmap2 = 0; - if ( mask.Ok() ) - hBitmap2 = (HBITMAP) mask.GetHBITMAP(); - return (ImageList_Replace((HIMAGELIST) GetHIMAGELIST(), index, hBitmap1, hBitmap2) != 0); -} - -/* Not supported by Win95 -// Replacing a bitmap, using the specified colour to create the mask bitmap -// Note that wxImageList creates new bitmaps, so you may delete -// 'bitmap'. -bool wxImageList::Replace(int index, const wxBitmap& bitmap, const wxColour& maskColour) -{ - HBITMAP hBitmap1 = (HBITMAP) bitmap.GetHBITMAP(); - COLORREF colorRef = PALETTERGB(maskColour.Red(), maskColour.Green(), maskColour.Blue()); - return (bool) ImageList_ReplaceMasked((HIMAGELIST) GetHIMAGELIST(), index, hBitmap1, colorRef); -} -*/ - -// Replaces a bitmap and mask from an icon. -bool wxImageList::Replace(int index, const wxIcon& icon) -{ - HICON hIcon = (HICON) icon.GetHICON(); - return (ImageList_ReplaceIcon((HIMAGELIST) GetHIMAGELIST(), index, hIcon) != 0); -} - -// Removes the image at the given index. -bool wxImageList::Remove(int index) -{ - return (ImageList_Remove((HIMAGELIST) GetHIMAGELIST(), index) != 0); -} - -// Remove all images -bool wxImageList::RemoveAll(void) -{ - // TODO: Is this correct? - while ( GetImageCount() > 0 ) - { - Remove(0); - } - return TRUE; -} - -// Draws the given image on a dc at the specified position. -// If 'solidBackground' is TRUE, Draw sets the image list background -// colour to the background colour of the wxDC, to speed up -// drawing by eliminating masked drawing where possible. -bool wxImageList::Draw(int index, wxDC& dc, int x, int y, - int flags, bool solidBackground) -{ - HDC hDC = (HDC) dc.GetHDC(); - if ( !hDC ) - return FALSE; - - if ( solidBackground ) - { - wxBrush *brush = dc.GetBackground(); - if ( brush && brush->Ok()) - { - wxColour col(brush->GetColour()); - ImageList_SetBkColor((HIMAGELIST) GetHIMAGELIST(), - PALETTERGB(col.Red(), col.Green(), col.Blue())); - } - else - ImageList_SetBkColor((HIMAGELIST) GetHIMAGELIST(), - CLR_NONE); - } - else - ImageList_SetBkColor((HIMAGELIST) GetHIMAGELIST(), - CLR_NONE); - - UINT style = 0; - if ( flags & wxIMAGELIST_DRAW_NORMAL ) - style |= ILD_NORMAL; - if ( flags & wxIMAGELIST_DRAW_TRANSPARENT ) - style |= ILD_TRANSPARENT; - if ( flags & wxIMAGELIST_DRAW_SELECTED ) - style |= ILD_SELECTED; - if ( flags & wxIMAGELIST_DRAW_FOCUSED ) - style |= ILD_FOCUS; - - return (ImageList_Draw((HIMAGELIST) GetHIMAGELIST(), index, hDC, - x, y, style) != 0); -} - -#endif - diff --git a/src/msw/iniconf.cpp b/src/msw/iniconf.cpp deleted file mode 100644 index d303501597..0000000000 --- a/src/msw/iniconf.cpp +++ /dev/null @@ -1,459 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: src/msw/iniconf.cpp -// Purpose: implementation of wxIniConfig class -// Author: Vadim Zeitlin -// Modified by: -// Created: 27.07.98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif //__BORLANDC__ - -#ifndef WX_PRECOMP - #include - #include - #include -#endif //WX_PRECOMP - -#include -#include -#include - -#include - -// _WINDOWS_ is defined when windows.h is included, -// __WXMSW__ is defined for MS Windows compilation -#if defined(__WXMSW__) && !defined(_WINDOWS_) - #include -#endif //windows.h - -// ---------------------------------------------------------------------------- -// constants -// ---------------------------------------------------------------------------- - -// we replace all path separators with this character -#define PATH_SEP_REPLACE '_' - -// ============================================================================ -// implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// ctor & dtor -// ---------------------------------------------------------------------------- - -wxIniConfig::wxIniConfig(const wxString& strAppName, const wxString& strVendor, - const wxString& localFilename, const wxString& globalFilename, long style): - wxConfigBase(strAppName, strVendor, localFilename, globalFilename, style) -{ - if ( GetAppName().IsEmpty() ) - { - wxString app; - if (wxTheApp) - app = wxTheApp->GetAppName(); - wxASSERT( !app.IsEmpty() ); - SetAppName(app); - } - - // Vendor name is required in wxIniConfig. - // TODO: should it be required? Why isn't appName used instead? -- JACS - if ( GetVendorName().IsEmpty() ) - { - wxString vendor; - if (wxTheApp) - vendor = wxTheApp->GetVendorName(); - else - vendor = strAppName; - SetVendorName(vendor); - } - - m_strLocalFilename = localFilename; - if (m_strLocalFilename.IsEmpty()) - { - m_strLocalFilename = GetAppName() + ".ini"; - } - - // append the extension if none given and it's not an absolute file name - // (otherwise we assume that they know what they're doing) - if ( !wxIsPathSeparator(m_strLocalFilename[0u]) && - m_strLocalFilename.Find('.') == NOT_FOUND ) - { - m_strLocalFilename << ".ini"; - } - - // set root path - SetPath(""); -} - -wxIniConfig::~wxIniConfig() -{ -} - -// ---------------------------------------------------------------------------- -// path management -// ---------------------------------------------------------------------------- - -void wxIniConfig::SetPath(const wxString& strPath) -{ - wxArrayString aParts; - - if ( strPath.IsEmpty() ) { - // nothing - } - else if ( strPath[0u] == wxCONFIG_PATH_SEPARATOR ) { - // absolute path - wxSplitPath(aParts, strPath); - } - else { - // relative path, combine with current one - wxString strFullPath = GetPath(); - strFullPath << wxCONFIG_PATH_SEPARATOR << strPath; - wxSplitPath(aParts, strFullPath); - } - - size_t nPartsCount = aParts.Count(); - m_strPath.Empty(); - if ( nPartsCount == 0 ) { - // go to the root - m_strGroup = PATH_SEP_REPLACE; - } - else { - // translate - m_strGroup = aParts[0u]; - for ( size_t nPart = 1; nPart < nPartsCount; nPart++ ) { - if ( nPart > 1 ) - m_strPath << PATH_SEP_REPLACE; - m_strPath << aParts[nPart]; - } - } - - // other functions assume that all this is true, i.e. there are no trailing - // underscores at the end except if the group is the root one - wxASSERT( (m_strPath.IsEmpty() || m_strPath.Last() != PATH_SEP_REPLACE) && - (m_strGroup == PATH_SEP_REPLACE || - m_strGroup.Last() != PATH_SEP_REPLACE) ); -} - -const wxString& wxIniConfig::GetPath() const -{ - static wxString s_str; - - // always return abs path - s_str = wxCONFIG_PATH_SEPARATOR; - - if ( m_strGroup == PATH_SEP_REPLACE ) { - // we're at the root level, nothing to do - } - else { - s_str << m_strGroup; - if ( !m_strPath.IsEmpty() ) - s_str << wxCONFIG_PATH_SEPARATOR; - for ( const char *p = m_strPath; *p != '\0'; p++ ) { - s_str << (*p == PATH_SEP_REPLACE ? wxCONFIG_PATH_SEPARATOR : *p); - } - } - - return s_str; -} - -wxString wxIniConfig::GetPrivateKeyName(const wxString& szKey) const -{ - wxString strKey; - - if ( !m_strPath.IsEmpty() ) - strKey << m_strPath << PATH_SEP_REPLACE; - - strKey << szKey; - - return strKey; -} - -wxString wxIniConfig::GetKeyName(const wxString& szKey) const -{ - wxString strKey; - - if ( m_strGroup != PATH_SEP_REPLACE ) - strKey << m_strGroup << PATH_SEP_REPLACE; - if ( !m_strPath.IsEmpty() ) - strKey << m_strPath << PATH_SEP_REPLACE; - - strKey << szKey; - - return strKey; -} - -// ---------------------------------------------------------------------------- -// enumeration -// ---------------------------------------------------------------------------- - -// not implemented -bool wxIniConfig::GetFirstGroup(wxString& str, long& lIndex) const -{ - wxFAIL_MSG("not implemented"); - - return FALSE; -} - -bool wxIniConfig::GetNextGroup (wxString& str, long& lIndex) const -{ - wxFAIL_MSG("not implemented"); - - return FALSE; -} - -bool wxIniConfig::GetFirstEntry(wxString& str, long& lIndex) const -{ - wxFAIL_MSG("not implemented"); - - return FALSE; -} - -bool wxIniConfig::GetNextEntry (wxString& str, long& lIndex) const -{ - wxFAIL_MSG("not implemented"); - - return FALSE; -} - -// ---------------------------------------------------------------------------- -// misc info -// ---------------------------------------------------------------------------- - -// not implemented -size_t wxIniConfig::GetNumberOfEntries(bool bRecursive) const -{ - wxFAIL_MSG("not implemented"); - - return (size_t)-1; -} - -size_t wxIniConfig::GetNumberOfGroups(bool bRecursive) const -{ - wxFAIL_MSG("not implemented"); - - return (size_t)-1; -} - -bool wxIniConfig::HasGroup(const wxString& strName) const -{ - wxFAIL_MSG("not implemented"); - - return FALSE; -} - -bool wxIniConfig::HasEntry(const wxString& strName) const -{ - wxFAIL_MSG("not implemented"); - - return FALSE; -} - -// is current group empty? -bool wxIniConfig::IsEmpty() const -{ - char szBuf[1024]; - - GetPrivateProfileString(m_strGroup, NULL, "", - szBuf, WXSIZEOF(szBuf), m_strLocalFilename); - if ( !::IsEmpty(szBuf) ) - return FALSE; - - GetProfileString(m_strGroup, NULL, "", szBuf, WXSIZEOF(szBuf)); - if ( !::IsEmpty(szBuf) ) - return FALSE; - - return TRUE; -} - -// ---------------------------------------------------------------------------- -// read/write -// ---------------------------------------------------------------------------- - -bool wxIniConfig::Read(const wxString& szKey, wxString *pstr) const -{ - wxConfigPathChanger path(this, szKey); - wxString strKey = GetPrivateKeyName(path.Name()); - - char szBuf[1024]; // @@ should dynamically allocate memory... - - // first look in the private INI file - - // NB: the lpDefault param to GetPrivateProfileString can't be NULL - GetPrivateProfileString(m_strGroup, strKey, "", - szBuf, WXSIZEOF(szBuf), m_strLocalFilename); - if ( ::IsEmpty(szBuf) ) { - // now look in win.ini - wxString strKey = GetKeyName(path.Name()); - GetProfileString(m_strGroup, strKey, "", szBuf, WXSIZEOF(szBuf)); - } - - if ( ::IsEmpty(szBuf) ) { - return FALSE; - } - else { - return TRUE; - } -} - -bool wxIniConfig::Read(const wxString& szKey, wxString *pstr, - const wxString& szDefault) const -{ - wxConfigPathChanger path(this, szKey); - wxString strKey = GetPrivateKeyName(path.Name()); - - char szBuf[1024]; // @@ should dynamically allocate memory... - - // first look in the private INI file - - // NB: the lpDefault param to GetPrivateProfileString can't be NULL - GetPrivateProfileString(m_strGroup, strKey, "", - szBuf, WXSIZEOF(szBuf), m_strLocalFilename); - if ( ::IsEmpty(szBuf) ) { - // now look in win.ini - wxString strKey = GetKeyName(path.Name()); - GetProfileString(m_strGroup, strKey, "", szBuf, WXSIZEOF(szBuf)); - } - - if ( ::IsEmpty(szBuf) ) { - *pstr = szDefault; - return FALSE; - } - else { - return TRUE; - } -} - -bool wxIniConfig::Read(const wxString& szKey, long *pl) const -{ - wxConfigPathChanger path(this, szKey); - wxString strKey = GetPrivateKeyName(path.Name()); - - // hack: we have no mean to know if it really found the default value or - // didn't find anything, so we call it twice - - static const int nMagic = 17; // 17 is some "rare" number - static const int nMagic2 = 28; // arbitrary number != nMagic - long lVal = GetPrivateProfileInt(m_strGroup, strKey, nMagic, m_strLocalFilename); - if ( lVal != nMagic ) { - // the value was read from the file - *pl = lVal; - return TRUE; - } - - // is it really nMagic? - lVal = GetPrivateProfileInt(m_strGroup, strKey, nMagic2, m_strLocalFilename); - if ( lVal == nMagic ) { - // the nMagic it returned was indeed read from the file - *pl = lVal; - return TRUE; - } - - // no, it was just returning the default value, so now look in win.ini - *pl = GetProfileInt(GetVendorName(), GetKeyName(szKey), *pl); - - return TRUE; -} - -bool wxIniConfig::Write(const wxString& szKey, const wxString& szValue) -{ - wxConfigPathChanger path(this, szKey); - wxString strKey = GetPrivateKeyName(path.Name()); - - bool bOk = WritePrivateProfileString(m_strGroup, strKey, - szValue, m_strLocalFilename) != 0; - - if ( !bOk ) - wxLogLastError("WritePrivateProfileString"); - - return bOk; -} - -bool wxIniConfig::Write(const wxString& szKey, long lValue) -{ - // ltoa() is not ANSI :-( - char szBuf[40]; // should be good for sizeof(long) <= 16 (128 bits) - sprintf(szBuf, "%ld", lValue); - - return Write(szKey, szBuf); -} - -bool wxIniConfig::Flush(bool /* bCurrentOnly */) -{ - // this is just the way it works - return WritePrivateProfileString(NULL, NULL, NULL, m_strLocalFilename) != 0; -} - -// ---------------------------------------------------------------------------- -// delete -// ---------------------------------------------------------------------------- - -bool wxIniConfig::DeleteEntry(const char *szKey, bool bGroupIfEmptyAlso) -{ - // passing NULL as value to WritePrivateProfileString deletes the key - if ( !Write(szKey, (const char *)NULL) ) - return FALSE; - - if ( !bGroupIfEmptyAlso || !IsEmpty() ) - return TRUE; - - // delete the current group too - bool bOk = WritePrivateProfileString(m_strGroup, NULL, - NULL, m_strLocalFilename) != 0; - - if ( !bOk ) - wxLogLastError("WritePrivateProfileString"); - - return bOk; -} - -bool wxIniConfig::DeleteGroup(const char *szKey) -{ - wxConfigPathChanger path(this, szKey); - - // passing NULL as section name to WritePrivateProfileString deletes the - // whole section according to the docs - bool bOk = WritePrivateProfileString(path.Name(), NULL, - NULL, m_strLocalFilename) != 0; - - if ( !bOk ) - wxLogLastError("WritePrivateProfileString"); - - return bOk; -} - -bool wxIniConfig::DeleteAll() -{ - // first delete our group in win.ini - WriteProfileString(GetVendorName(), NULL, NULL); - - // then delete our own ini file - char szBuf[MAX_PATH]; - size_t nRc = GetWindowsDirectory(szBuf, WXSIZEOF(szBuf)); - if ( nRc == 0 ) - wxLogLastError("GetWindowsDirectory"); - else if ( nRc > WXSIZEOF(szBuf) ) - wxFAIL_MSG("buffer is too small for Windows directory."); - - wxString strFile = szBuf; - strFile << '\\' << m_strLocalFilename; - - if ( !DeleteFile(strFile) ) { - wxLogSysError(_("Can't delete the INI file '%s'"), strFile.c_str()); - return FALSE; - } - - return TRUE; -} diff --git a/src/msw/joystick.cpp b/src/msw/joystick.cpp deleted file mode 100644 index 7911b1338f..0000000000 --- a/src/msw/joystick.cpp +++ /dev/null @@ -1,541 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: joystick.cpp -// Purpose: wxJoystick class -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "joystick.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#if defined(__BORLANDC__) -#pragma hdrstop -#endif - -#include - -#ifndef __GNUWIN32__ -#include -#endif - -#if !defined(__WIN32__) && !defined(_MMRESULT_) -typedef UINT MMRESULT; -#endif - -#ifdef __GNUWIN32__ -#include -#endif - -// Why doesn't BC++ have joyGetPosEx? -#if !defined(__WIN32__) || defined(__BORLANDC__) -#define NO_JOYGETPOSEX -#endif - -#include - -IMPLEMENT_DYNAMIC_CLASS(wxJoystick, wxObject) - -// Attributes -//////////////////////////////////////////////////////////////////////////// - -wxPoint wxJoystick::GetPosition(void) const -{ - JOYINFO joyInfo; - MMRESULT res = joyGetPos(m_joystick, & joyInfo); - if (res == JOYERR_NOERROR ) - return wxPoint(joyInfo.wXpos, joyInfo.wYpos); - else - return wxPoint(0, 0); -} - -int wxJoystick::GetZPosition(void) const -{ - JOYINFO joyInfo; - MMRESULT res = joyGetPos(m_joystick, & joyInfo); - if (res == JOYERR_NOERROR ) - return joyInfo.wZpos; - else - return 0; -} - -int wxJoystick::GetButtonState(void) const -{ - JOYINFO joyInfo; - MMRESULT res = joyGetPos(m_joystick, & joyInfo); - if (res == JOYERR_NOERROR ) - { - int buttons = 0; - - if (joyInfo.wButtons & JOY_BUTTON1) - buttons |= wxJOY_BUTTON1; - if (joyInfo.wButtons & JOY_BUTTON2) - buttons |= wxJOY_BUTTON2; - if (joyInfo.wButtons & JOY_BUTTON3) - buttons |= wxJOY_BUTTON3; - if (joyInfo.wButtons & JOY_BUTTON4) - buttons |= wxJOY_BUTTON4; - return buttons; - } - else - return 0; -} - -int wxJoystick::GetPOVPosition(void) const -{ -#ifndef NO_JOYGETPOSEX - JOYINFOEX joyInfo; - joyInfo.dwFlags = JOY_RETURNPOV; - MMRESULT res = joyGetPosEx(m_joystick, & joyInfo); - if (res == JOYERR_NOERROR ) - { - return joyInfo.dwPOV; - } - else - return 0; -#else - return 0; -#endif -} - -int wxJoystick::GetPOVCTSPosition(void) const -{ -#ifndef NO_JOYGETPOSEX - JOYINFOEX joyInfo; - joyInfo.dwFlags = JOY_RETURNPOVCTS; - MMRESULT res = joyGetPosEx(m_joystick, & joyInfo); - if (res == JOYERR_NOERROR ) - { - return joyInfo.dwPOV; - } - else - return 0; -#else - return 0; -#endif -} - -int wxJoystick::GetRudderPosition(void) const -{ -#ifndef NO_JOYGETPOSEX - JOYINFOEX joyInfo; - joyInfo.dwFlags = JOY_RETURNR; - MMRESULT res = joyGetPosEx(m_joystick, & joyInfo); - if (res == JOYERR_NOERROR ) - { - return joyInfo.dwRpos; - } - else - return 0; -#else - return 0; -#endif -} - -int wxJoystick::GetUPosition(void) const -{ -#ifndef NO_JOYGETPOSEX - JOYINFOEX joyInfo; - joyInfo.dwFlags = JOY_RETURNU; - MMRESULT res = joyGetPosEx(m_joystick, & joyInfo); - if (res == JOYERR_NOERROR ) - { - return joyInfo.dwUpos; - } - else - return 0; -#else - return 0; -#endif -} - -int wxJoystick::GetVPosition(void) const -{ -#ifndef NO_JOYGETPOSEX - JOYINFOEX joyInfo; - joyInfo.dwFlags = JOY_RETURNV; - MMRESULT res = joyGetPosEx(m_joystick, & joyInfo); - if (res == JOYERR_NOERROR ) - { - return joyInfo.dwVpos; - } - else - return 0; -#else - return 0; -#endif -} - -int wxJoystick::GetMovementThreshold(void) const -{ - UINT thresh = 0; - MMRESULT res = joyGetThreshold(m_joystick, & thresh); - if (res == JOYERR_NOERROR ) - { - return thresh; - } - else - return 0; -} - -void wxJoystick::SetMovementThreshold(int threshold) -{ - UINT thresh = threshold; - joySetThreshold(m_joystick, thresh); -} - -// Capabilities -//////////////////////////////////////////////////////////////////////////// - -bool wxJoystick::IsOk(void) const -{ - JOYINFO joyInfo; - MMRESULT res = joyGetPos(m_joystick, & joyInfo); - return ((joyGetNumDevs() > 0) || (res == JOYERR_NOERROR)); -} - -int wxJoystick::GetNumberJoysticks(void) const -{ - return joyGetNumDevs(); -} - -int wxJoystick::GetManufacturerId(void) const -{ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return 0; - else - return joyCaps.wMid; -} - -int wxJoystick::GetProductId(void) const -{ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return 0; - else - return joyCaps.wPid; -} - -wxString wxJoystick::GetProductName(void) const -{ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return wxString(""); - else - return wxString(joyCaps.szPname); -} - -int wxJoystick::GetXMin(void) const -{ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return 0; - else - return joyCaps.wXmin; -} - -int wxJoystick::GetYMin(void) const -{ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return 0; - else - return joyCaps.wYmin; -} - -int wxJoystick::GetZMin(void) const -{ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return 0; - else - return joyCaps.wZmin; -} - -int wxJoystick::GetXMax(void) const -{ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return 0; - else - return joyCaps.wXmax; -} - -int wxJoystick::GetYMax(void) const -{ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return 0; - else - return joyCaps.wYmax; -} - -int wxJoystick::GetZMax(void) const -{ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return 0; - else - return joyCaps.wZmax; -} - -int wxJoystick::GetNumberButtons(void) const -{ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return 0; - else - return joyCaps.wNumButtons; -} - -int wxJoystick::GetNumberAxes(void) const -{ -#ifdef __WIN32__ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return 0; - else - return joyCaps.wNumAxes; -#else - return 0; -#endif -} - -int wxJoystick::GetMaxButtons(void) const -{ -#ifdef __WIN32__ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return 0; - else - return joyCaps.wMaxButtons; -#else - return 0; -#endif -} - -int wxJoystick::GetMaxAxes(void) const -{ -#ifdef __WIN32__ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return 0; - else - return joyCaps.wMaxAxes; -#else - return 0; -#endif -} - -int wxJoystick::GetPollingMin(void) const -{ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return 0; - else - return joyCaps.wPeriodMin; -} - -int wxJoystick::GetPollingMax(void) const -{ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return 0; - else - return joyCaps.wPeriodMax; -} - -int wxJoystick::GetRudderMin(void) const -{ -#ifdef __WIN32__ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return 0; - else - return joyCaps.wRmin; -#else - return 0; -#endif -} - -int wxJoystick::GetRudderMax(void) const -{ -#ifdef __WIN32__ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return 0; - else - return joyCaps.wRmax; -#else - return 0; -#endif -} - -int wxJoystick::GetUMin(void) const -{ -#ifdef __WIN32__ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return 0; - else - return joyCaps.wUmin; -#else - return 0; -#endif -} - -int wxJoystick::GetUMax(void) const -{ -#ifdef __WIN32__ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return 0; - else - return joyCaps.wUmax; -#else - return 0; -#endif -} - -int wxJoystick::GetVMin(void) const -{ -#ifdef __WIN32__ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return 0; - else - return joyCaps.wVmin; -#else - return 0; -#endif -} - -int wxJoystick::GetVMax(void) const -{ -#ifdef __WIN32__ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return 0; - else - return joyCaps.wVmax; -#else - return 0; -#endif -} - - -bool wxJoystick::HasRudder(void) const -{ -#ifdef __WIN32__ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return FALSE; - else - return ((joyCaps.wCaps & JOYCAPS_HASR) == JOYCAPS_HASR); -#else - return FALSE; -#endif -} - -bool wxJoystick::HasZ(void) const -{ -#ifdef __WIN32__ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return FALSE; - else - return ((joyCaps.wCaps & JOYCAPS_HASZ) == JOYCAPS_HASZ); -#else - return FALSE; -#endif -} - -bool wxJoystick::HasU(void) const -{ -#ifdef __WIN32__ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return FALSE; - else - return ((joyCaps.wCaps & JOYCAPS_HASU) == JOYCAPS_HASU); -#else - return FALSE; -#endif -} - -bool wxJoystick::HasV(void) const -{ -#ifdef __WIN32__ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return FALSE; - else - return ((joyCaps.wCaps & JOYCAPS_HASV) == JOYCAPS_HASV); -#else - return FALSE; -#endif -} - -bool wxJoystick::HasPOV(void) const -{ -#ifdef __WIN32__ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return FALSE; - else - return ((joyCaps.wCaps & JOYCAPS_HASPOV) == JOYCAPS_HASPOV); -#else - return FALSE; -#endif -} - -bool wxJoystick::HasPOV4Dir(void) const -{ -#ifdef __WIN32__ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return FALSE; - else - return ((joyCaps.wCaps & JOYCAPS_POV4DIR) == JOYCAPS_POV4DIR); -#else - return FALSE; -#endif -} - -bool wxJoystick::HasPOVCTS(void) const -{ -#ifdef __WIN32__ - JOYCAPS joyCaps; - if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) - return FALSE; - else - return ((joyCaps.wCaps & JOYCAPS_POVCTS) == JOYCAPS_POVCTS); -#else - return FALSE; -#endif -} - -// Operations -//////////////////////////////////////////////////////////////////////////// - -bool wxJoystick::SetCapture(wxWindow* win, int pollingFreq) -{ - BOOL changed = (pollingFreq == 0); - MMRESULT res = joySetCapture((HWND) win->GetHWND(), m_joystick, pollingFreq, changed); - return (res == JOYERR_NOERROR); -} - -bool wxJoystick::ReleaseCapture(void) -{ - MMRESULT res = joyReleaseCapture(m_joystick); - return (res == JOYERR_NOERROR); -} - diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp deleted file mode 100644 index f15ecf02e9..0000000000 --- a/src/msw/listbox.cpp +++ /dev/null @@ -1,821 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: listbox.cpp -// Purpose: wxListBox -// Author: Julian Smart -// Modified by: Vadim Zeitlin (owner drawn stuff) -// Created: -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "listbox.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/listbox.h" -#include "wx/settings.h" -#endif - -#include "wx/msw/private.h" - -#include -#include - -#ifdef __GNUWIN32__ -#include -#endif - -#ifdef GetCharWidth -#undef GetCharWidth -#endif - -#if USE_OWNER_DRAWN - #include "wx/ownerdrw.h" -#endif - -#include "wx/dynarray.h" -#include "wx/log.h" - -#if !USE_SHARED_LIBRARY - IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl) -#endif - -// ============================================================================ -// list box item declaration and implementation -// ============================================================================ - -#if USE_OWNER_DRAWN - -class wxListBoxItem : public wxOwnerDrawn -{ -public: - wxListBoxItem(const wxString& str = ""); -}; - -wxListBoxItem::wxListBoxItem(const wxString& str) : wxOwnerDrawn(str, FALSE) -{ - // no bitmaps/checkmarks - SetMarginWidth(0); -} - -wxOwnerDrawn *wxListBox::CreateItem(size_t n) -{ - return new wxListBoxItem(); -} - -#endif //USE_OWNER_DRAWN - -// ============================================================================ -// list box control implementation -// ============================================================================ - -// this macro is dangerous but still better than tons of (HWND)GetHWND() -#define hwnd (HWND)GetHWND() - -bool wxListBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) -{ -/* - if (param == LBN_SELCANCEL) - { - event.extraLong = FALSE; - } -*/ - if (param == LBN_SELCHANGE) - { - wxCommandEvent event(wxEVT_COMMAND_LISTBOX_SELECTED, m_windowId); - wxArrayInt aSelections; - int count = GetSelections(aSelections); - if ( count > 0 ) - { - event.m_commandInt = aSelections[0] ; - event.m_clientData = GetClientData(event.m_commandInt); - wxString str(GetString(event.m_commandInt)); - if (str != "") - event.m_commandString = copystring((char *)(const char *)str); - } - else - { - event.m_commandInt = -1 ; - event.m_commandString = copystring("") ; - } - - event.SetEventObject( this ); - ProcessCommand(event); - if (event.m_commandString) - delete[] event.m_commandString ; - return TRUE; - } - else if (param == LBN_DBLCLK) - { - wxCommandEvent event(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, m_windowId); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event) ; - return TRUE; -/* - { -#if WXWIN_COMPATIBILITY - wxWindow *parent = (wxWindow *)GetParent(); - if (parent) - parent->GetEventHandler()->OnDefaultAction(this); -#endif - return TRUE; - } - */ - } - return FALSE; -} - -// Listbox item -wxListBox::wxListBox(void) -{ - m_noItems = 0; - m_selected = 0; -} - -bool wxListBox::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, - const wxSize& size, - int n, const wxString choices[], - long style, - const wxValidator& validator, - const wxString& name) -{ - m_noItems = n; - m_hWnd = 0; - m_selected = 0; - - SetName(name); - SetValidator(validator); - - if (parent) parent->AddChild(this); - - wxSystemSettings settings; - SetBackgroundColour(settings.GetSystemColour(wxSYS_COLOUR_WINDOW)); - SetForegroundColour(parent->GetDefaultForegroundColour()); - - m_windowId = ( id == -1 ) ? (int)NewControlId() : id; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - m_windowStyle = style; - - DWORD wstyle = WS_VSCROLL | WS_TABSTOP | LBS_NOTIFY | LBS_HASSTRINGS; - if (m_windowStyle & wxLB_MULTIPLE) - wstyle |= LBS_MULTIPLESEL; - else if (m_windowStyle & wxLB_EXTENDED) - wstyle |= LBS_EXTENDEDSEL; - - if (m_windowStyle & wxLB_ALWAYS_SB) - wstyle |= LBS_DISABLENOSCROLL ; - if (m_windowStyle & wxLB_HSCROLL) - wstyle |= WS_HSCROLL; - if (m_windowStyle & wxLB_SORT) - wstyle |= LBS_SORT; - -#if USE_OWNER_DRAWN - if ( m_windowStyle & wxLB_OWNERDRAW ) { - // we don't support LBS_OWNERDRAWVARIABLE yet - wstyle |= LBS_OWNERDRAWFIXED; - } -#endif - // Without this style, you get unexpected heights, so e.g. constraint layout - // doesn't work properly - wstyle |= LBS_NOINTEGRALHEIGHT; - - bool want3D; - WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D) ; - - // Even with extended styles, need to combine with WS_BORDER - // for them to look right. - if ( want3D || (m_windowStyle & wxSIMPLE_BORDER) - || (m_windowStyle & wxRAISED_BORDER) - || (m_windowStyle & wxSUNKEN_BORDER) - || (m_windowStyle & wxDOUBLE_BORDER) ) { - wstyle |= WS_BORDER; - } - - HWND wx_list = CreateWindowEx(exStyle, "LISTBOX", NULL, - wstyle | WS_CHILD, - 0, 0, 0, 0, - (HWND)parent->GetHWND(), (HMENU)m_windowId, - wxGetInstance(), NULL); - - m_hWnd = (WXHWND)wx_list; - -#if CTL3D - if (want3D) - { - Ctl3dSubclassCtl(wx_list); - m_useCtl3D = TRUE; - } -#endif - - // Subclass again to catch messages - SubclassWin((WXHWND)wx_list); - - size_t ui; - for (ui = 0; ui < (size_t)n; ui++) { - SendMessage(wx_list, LB_ADDSTRING, 0, (LPARAM)(const char *)choices[ui]); - } - -#if USE_OWNER_DRAWN - if ( m_windowStyle & wxLB_OWNERDRAW ) { - for (ui = 0; ui < (size_t)n; ui++) { - // create new item which will process WM_{DRAW|MEASURE}ITEM messages - wxOwnerDrawn *pNewItem = CreateItem(ui); - pNewItem->SetName(choices[ui]); - m_aItems.Add(pNewItem); - ListBox_SetItemData(wx_list, ui, pNewItem); - } - } -#endif - - if ((m_windowStyle & wxLB_MULTIPLE) == 0) - SendMessage(wx_list, LB_SETCURSEL, 0, 0); - - SetFont(* parent->GetFont()); - - SetSize(x, y, width, height); - - ShowWindow(wx_list, SW_SHOW); - - return TRUE; -} - -wxListBox::~wxListBox(void) -{ -#if USE_OWNER_DRAWN - size_t uiCount = m_aItems.Count(); - while ( uiCount-- != 0 ) { - delete m_aItems[uiCount]; - } -#endif -} - -void wxListBox::SetupColours(void) -{ - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW)); - SetForegroundColour(GetParent()->GetDefaultForegroundColour()); -} - -void wxListBox::SetFirstItem(int N) -{ - SendMessage(hwnd,LB_SETTOPINDEX,(WPARAM)N,(LPARAM)0) ; -} - -void wxListBox::SetFirstItem(const wxString& s) -{ - int N = FindString(s) ; - - if (N>=0) - SetFirstItem(N) ; -} - -void wxListBox::Delete(int N) -{ - SendMessage(hwnd, LB_DELETESTRING, N, 0); - m_noItems --; - SetHorizontalExtent(""); -} - -void wxListBox::Append(const wxString& item) -{ - int index = ListBox_AddString(hwnd, item); - m_noItems ++; - -#if USE_OWNER_DRAWN - if ( m_windowStyle & wxLB_OWNERDRAW ) { - wxOwnerDrawn *pNewItem = CreateItem(-1); // dummy argument - pNewItem->SetName(item); - m_aItems.Add(pNewItem); - ListBox_SetItemData(hwnd, index, pNewItem); - } -#endif - - SetHorizontalExtent(item); -} - -void wxListBox::Append(const wxString& item, char *Client_data) -{ - int index = ListBox_AddString(hwnd, item); - m_noItems ++; - -#if USE_OWNER_DRAWN - if ( m_windowStyle & wxLB_OWNERDRAW ) { - // client data must be pointer to wxOwnerDrawn, otherwise we would crash - // in OnMeasure/OnDraw. - wxFAIL_MSG("Can't use client data with owner-drawn listboxes"); - } - else -#endif - ListBox_SetItemData(hwnd, index, Client_data); - - SetHorizontalExtent(item); -} - -void wxListBox::Set(int n, const wxString *choices, char** clientData) -{ - ShowWindow(hwnd, SW_HIDE); - ListBox_ResetContent(hwnd); - int i; - for (i = 0; i < n; i++) - { - ListBox_AddString(hwnd, choices[i]); - if ( clientData ) - ListBox_SetItemData(hwnd, i, clientData[i]); - } - m_noItems = n; - -#if USE_OWNER_DRAWN - if ( m_windowStyle & wxLB_OWNERDRAW ) { - // first delete old items - size_t ui = m_aItems.Count(); - while ( ui-- != 0 ) { - delete m_aItems[ui]; - } - m_aItems.Empty(); - - // then create new ones - for (ui = 0; ui < (size_t)n; ui++) { - wxOwnerDrawn *pNewItem = CreateItem(ui); - pNewItem->SetName(choices[ui]); - m_aItems.Add(pNewItem); - ListBox_SetItemData(hwnd, ui, pNewItem); - - wxASSERT_MSG(clientData[ui] == NULL, - "Can't use client data with owner-drawn listboxes"); - } - } -#endif - - SetHorizontalExtent(""); - ShowWindow(hwnd, SW_SHOW); -} - -int wxListBox::FindString(const wxString& s) const -{ - int pos = ListBox_FindStringExact(hwnd, (WPARAM)-1, s); - if (pos == LB_ERR) - return -1; - else - return pos; -} - -void wxListBox::Clear(void) -{ - ListBox_ResetContent(hwnd); - - m_noItems = 0; - ListBox_GetHorizontalExtent(hwnd); -} - -void wxListBox::SetSelection(int N, bool select) -{ - if ((m_windowStyle & wxLB_MULTIPLE) || (m_windowStyle & wxLB_EXTENDED)) - SendMessage(hwnd, LB_SETSEL, select, N); - else - { - int N1 = N; - if (!select) - N1 = -1; - SendMessage(hwnd, LB_SETCURSEL, N1, 0); - } -} - -bool wxListBox::Selected(int N) const -{ - return SendMessage(hwnd, LB_GETSEL, N, 0) == 0 ? FALSE : TRUE; -} - -void wxListBox::Deselect(int N) -{ - if ((m_windowStyle & wxLB_MULTIPLE) || (m_windowStyle & wxLB_EXTENDED)) - SendMessage(hwnd, LB_SETSEL, FALSE, N); -} - -char *wxListBox::GetClientData(int N) const -{ - return (char *)SendMessage(hwnd, LB_GETITEMDATA, N, 0); -} - -void wxListBox::SetClientData(int N, char *Client_data) -{ - if ( ListBox_SetItemData(hwnd, N, Client_data) == LB_ERR ) - wxLogDebug("LB_SETITEMDATA failed"); -} - -// Return number of selections and an array of selected integers -int wxListBox::GetSelections(wxArrayInt& aSelections) const -{ - aSelections.Empty(); - - if ((m_windowStyle & wxLB_MULTIPLE) || (m_windowStyle & wxLB_EXTENDED)) - { - int no_sel = ListBox_GetSelCount(hwnd); - if (no_sel != 0) { - int *selections = new int[no_sel]; - if ( ListBox_GetSelItems(hwnd, no_sel, selections) == LB_ERR ) { - wxFAIL_MSG("This listbox can't have single-selection style!"); - } - - aSelections.Alloc(no_sel); - for ( int n = 0; n < no_sel; n++ ) - aSelections.Add(selections[n]); - - delete [] selections; - } - - return no_sel; - } - else // single-selection listbox - { - aSelections.Add(ListBox_GetCurSel(hwnd)); - - return 1; - } -} - -// Get single selection, for single choice list items -int wxListBox::GetSelection() const -{ - wxCHECK_MSG( !(m_windowStyle & wxLB_MULTIPLE) && - !(m_windowStyle & wxLB_EXTENDED), - -1, - "GetSelection() can't be used with multiple-selection " - "listboxes, use GetSelections() instead." ); - - return ListBox_GetCurSel(hwnd); -} - -// Find string for position -wxString wxListBox::GetString(int N) const -{ - if (N < 0 || N > m_noItems) - return wxString(""); - - int len = (int)SendMessage(hwnd, LB_GETTEXT, N, (LONG)wxBuffer); - wxBuffer[len] = 0; - return wxString(wxBuffer); -} - -void wxListBox::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - int currentX, currentY; - GetPosition(¤tX, ¤tY); - - int x1 = x; - int y1 = y; - int w1 = width; - int h1 = height; - - if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - x1 = currentX; - if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - y1 = currentY; - - AdjustForParentClientOrigin(x1, y1, sizeFlags); - - // If we're prepared to use the existing size, then... - if (width == -1 && height == -1 && ((sizeFlags & wxSIZE_AUTO) != wxSIZE_AUTO)) - { - GetSize(&w1, &h1); - } - - int cx; // button font dimensions - int cy; - - wxGetCharSize(GetHWND(), &cx, &cy,GetFont()); - - float control_width, control_height, control_x, control_y; - - // Deal with default size (using -1 values) - if (w1<=0) - w1 = DEFAULT_ITEM_WIDTH; - - if (h1<=0) - h1 = DEFAULT_ITEM_HEIGHT; - - control_x = (float)x1; - control_y = (float)y1; - control_width = (float)w1; - control_height = (float)h1; - - // Calculations may have made size too small - if (control_height <= 0) - control_height = (float)DEFAULT_ITEM_HEIGHT; - - if (control_width <= 0) - control_width = (float)DEFAULT_ITEM_WIDTH; - -// wxDebugMsg("About to set the listbox height to %d", (int)control_height); - MoveWindow(hwnd, (int)control_x, (int)control_y, - (int)control_width, (int)control_height, TRUE); - -} - -// Windows-specific code to set the horizontal extent of -// the listbox, if necessary. If s is non-NULL, it's -// used to calculate the horizontal extent. -// Otherwise, all strings are used. -void wxListBox::SetHorizontalExtent(const wxString& s) -{ - // Only necessary if we want a horizontal scrollbar - if (!(m_windowStyle & wxHSCROLL)) - return; - TEXTMETRIC lpTextMetric; - - if (s != "") - { - int existingExtent = (int)SendMessage(hwnd, LB_GETHORIZONTALEXTENT, 0, 0L); - HDC dc = GetWindowDC(hwnd); - HFONT oldFont = 0; - if (GetFont() && GetFont()->GetResourceHandle()) - oldFont = (HFONT) ::SelectObject(dc, (HFONT) GetFont()->GetResourceHandle()); - - GetTextMetrics(dc, &lpTextMetric); - SIZE extentXY; - ::GetTextExtentPoint(dc, (LPSTR) (const char *)s, s.Length(), &extentXY); - int extentX = (int)(extentXY.cx + lpTextMetric.tmAveCharWidth); - - if (oldFont) - ::SelectObject(dc, oldFont); - - ReleaseDC(hwnd, dc); - if (extentX > existingExtent) - SendMessage(hwnd, LB_SETHORIZONTALEXTENT, LOWORD(extentX), 0L); - return; - } - else - { - int largestExtent = 0; - HDC dc = GetWindowDC(hwnd); - HFONT oldFont = 0; - if (GetFont() && GetFont()->GetResourceHandle()) - oldFont = (HFONT) ::SelectObject(dc, (HFONT) GetFont()->GetResourceHandle()); - - GetTextMetrics(dc, &lpTextMetric); - int i; - for (i = 0; i < m_noItems; i++) - { - int len = (int)SendMessage(hwnd, LB_GETTEXT, i, (LONG)wxBuffer); - wxBuffer[len] = 0; - SIZE extentXY; - ::GetTextExtentPoint(dc, (LPSTR)wxBuffer, len, &extentXY); - int extentX = (int)(extentXY.cx + lpTextMetric.tmAveCharWidth); - if (extentX > largestExtent) - largestExtent = extentX; - } - if (oldFont) - ::SelectObject(dc, oldFont); - - ReleaseDC(hwnd, dc); - SendMessage(hwnd, LB_SETHORIZONTALEXTENT, LOWORD(largestExtent), 0L); - } -} - -void -wxListBox::InsertItems(int nItems, const wxString items[], int pos) -{ - int i; - for (i = 0; i < nItems; i++) - ListBox_InsertString(hwnd, i + pos, items[i]); - m_noItems += nItems; - - #if USE_OWNER_DRAWN - if ( m_windowStyle & wxLB_OWNERDRAW ) { - for ( i = 0; i < nItems; i++ ) { - wxOwnerDrawn *pNewItem = CreateItem((size_t)(pos + i)); - pNewItem->SetName(items[i]); - m_aItems.Insert(pNewItem, (size_t)(pos + i)); - ListBox_SetItemData(hwnd, i, pNewItem); - } - } - #endif - - SetHorizontalExtent(""); -} - -void wxListBox::SetString(int N, const wxString& s) -{ - int sel = -1; - if (!(m_windowStyle & wxLB_MULTIPLE) && !(m_windowStyle & wxLB_EXTENDED)) - sel = GetSelection(); - - char *oldData = (char *)wxListBox::GetClientData(N); - - SendMessage(hwnd, LB_DELETESTRING, N, 0); - - int newN = N; - if (N == (m_noItems - 1)) - newN = -1; - - SendMessage(hwnd, LB_INSERTSTRING, newN, (LPARAM) (const char *)s); - if (oldData) - wxListBox::SetClientData(N, oldData); - - // Selection may have changed - if (sel >= 0) - SetSelection(sel); - -#if USE_OWNER_DRAWN - if ( m_windowStyle & wxLB_OWNERDRAW ) - // update item's text - m_aItems[N]->SetName(s); -#endif //USE_OWNER_DRAWN -} - -int wxListBox::Number (void) const -{ - return m_noItems; -} - -// For single selection items only -wxString wxListBox::GetStringSelection (void) const -{ - int sel = GetSelection (); - if (sel > -1) - return this->GetString (sel); - else - return wxString(""); -} - -bool wxListBox::SetStringSelection (const wxString& s, bool flag) -{ - int sel = FindString (s); - if (sel > -1) - { - SetSelection (sel, flag); - return TRUE; - } - else - return FALSE; -} - -// Is this the right thing? Won't setselection generate a command -// event too? No! It'll just generate a setselection event. -// But we still can't have this being called whenever a real command -// is generated, because it sets the selection, which will already -// have been done! (Unless we have an optional argument for calling -// by the actual window system, or a separate function, ProcessCommand) -void wxListBox::Command (wxCommandEvent & event) -{ - if (event.m_extraLong) - SetSelection (event.m_commandInt); - else - { - Deselect (event.m_commandInt); - return; - } - ProcessCommand (event); -} - -WXHBRUSH wxListBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ -#if CTL3D - if ( m_useCtl3D ) - { - HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam); - return (WXHBRUSH) hbrush; - } -#endif - - if (GetParent()->GetTransparentBackground()) - SetBkMode((HDC) pDC, TRANSPARENT); - else - SetBkMode((HDC) pDC, OPAQUE); - - ::SetBkColor((HDC) pDC, RGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue())); - ::SetTextColor((HDC) pDC, RGB(GetForegroundColour().Red(), GetForegroundColour().Green(), GetForegroundColour().Blue())); - - wxBrush *backgroundBrush = wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID); - - // Note that this will be cleaned up in wxApp::OnIdle, if backgroundBrush - // has a zero usage count. - backgroundBrush->RealizeResource(); - return (WXHBRUSH) backgroundBrush->GetResourceHandle(); -} - -long wxListBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) -{ -#if 0 - switch (nMsg) - { - case WM_INITDIALOG: - case WM_ACTIVATE: - case WM_SETFOCUS: - case WM_KILLFOCUS: - case WM_CREATE: - case WM_PAINT: - case WM_QUERYDRAGICON: - case WM_SIZE: - case WM_RBUTTONDOWN: - case WM_RBUTTONUP: - case WM_RBUTTONDBLCLK: - case WM_MBUTTONDOWN: - case WM_MBUTTONUP: - case WM_MBUTTONDBLCLK: - case WM_LBUTTONDOWN: - case WM_LBUTTONUP: - case WM_LBUTTONDBLCLK: - case WM_MOUSEMOVE: - case WM_COMMAND: - case WM_NOTIFY: - case WM_DESTROY: - case WM_MENUSELECT: - case WM_INITMENUPOPUP: - case WM_DRAWITEM: - case WM_MEASUREITEM: - case WM_KEYDOWN: - case WM_KEYUP: - case WM_CHAR: // Always an ASCII character - case WM_HSCROLL: - case WM_VSCROLL: - case WM_CTLCOLORBTN: - case WM_CTLCOLORDLG: - case WM_CTLCOLORLISTBOX: - case WM_CTLCOLORMSGBOX: - case WM_CTLCOLORSCROLLBAR: - case WM_CTLCOLORSTATIC: - case WM_CTLCOLOREDIT: - case WM_SYSCOLORCHANGE: - case WM_ERASEBKGND: - case WM_MDIACTIVATE: - case WM_DROPFILES: - case WM_QUERYENDSESSION: - case WM_CLOSE: - case WM_GETMINMAXINFO: - case WM_NCHITTEST: - return MSWDefWindowProc(nMsg, wParam, lParam ); - } -#endif - - return wxControl::MSWWindowProc(nMsg, wParam, lParam); -} - -#if USE_OWNER_DRAWN - -// drawing -// ------- - -// space beneath/above each row in pixels -// "standard" checklistbox use 1 here, some might prefer 2. 0 is ugly. -#define OWNER_DRAWN_LISTBOX_EXTRA_SPACE (1) - -// the height is the same for all items -// ## should be changed for LBS_OWNERDRAWVARIABLE style listboxes -// NB: can't forward this to wxListBoxItem because LB_SETITEMDATA -// message is not yet sent when we get here! -bool wxListBox::MSWOnMeasure(WXMEASUREITEMSTRUCT *item) -{ - // only owner-drawn control should receive this message - wxCHECK( ((m_windowStyle & wxLB_OWNERDRAW) == wxLB_OWNERDRAW), FALSE ); - - MEASUREITEMSTRUCT *pStruct = (MEASUREITEMSTRUCT *)item; - - wxDC dc; - dc.SetHDC((WXHDC)CreateIC("DISPLAY", NULL, NULL, 0)); - dc.SetFont(wxSystemSettings::GetSystemFont(wxSYS_ANSI_VAR_FONT)); - - pStruct->itemHeight = dc.GetCharHeight() + 2*OWNER_DRAWN_LISTBOX_EXTRA_SPACE; - pStruct->itemWidth = dc.GetCharWidth(); - - return TRUE; -} - -// forward the message to the appropriate item -bool wxListBox::MSWOnDraw(WXDRAWITEMSTRUCT *item) -{ - // only owner-drawn control should receive this message - wxCHECK( ((m_windowStyle & wxLB_OWNERDRAW) == wxLB_OWNERDRAW), FALSE ); - - DRAWITEMSTRUCT *pStruct = (DRAWITEMSTRUCT *)item; - wxListBoxItem *pItem = (wxListBoxItem *)SendMessage(hwnd, LB_GETITEMDATA, - pStruct->itemID, 0); - - wxCHECK( (int)pItem != LB_ERR, FALSE ); - - wxDC dc; - dc.SetHDC((WXHDC)pStruct->hDC, FALSE); - wxRect rect(pStruct->rcItem.left, pStruct->rcItem.top, - pStruct->rcItem.right - pStruct->rcItem.left, - pStruct->rcItem.bottom - pStruct->rcItem.top); - - return pItem->OnDrawItem(dc, rect, - (wxOwnerDrawn::wxODAction)pStruct->itemAction, - (wxOwnerDrawn::wxODStatus)pStruct->itemState); -} - -#endif - // USE_OWNER_DRAWN diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp deleted file mode 100644 index 8f0b1544b9..0000000000 --- a/src/msw/listctrl.cpp +++ /dev/null @@ -1,1425 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: listctrl.cpp -// Purpose: wxListCtrl -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "listctrl.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx.h" -#endif - -#if defined(__WIN95__) - -#include "wx/listctrl.h" -#include "wx/log.h" - -#include "wx/msw/private.h" - -#ifndef __GNUWIN32__ -#include -#endif - -#ifdef __GNUWIN32__ -#include "wx/msw/gnuwin32/extra.h" -#endif - -static void wxConvertToMSWListItem(const wxListCtrl *ctrl, wxListItem& info, LV_ITEM& tvItem); -static void wxConvertFromMSWListItem(const wxListCtrl *ctrl, wxListItem& info, LV_ITEM& tvItem, HWND getFullInfo = 0); - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxListCtrl, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxListItem, wxObject) - -#endif - -wxListCtrl::wxListCtrl(void) -{ - m_imageListNormal = NULL; - m_imageListSmall = NULL; - m_imageListState = NULL; - m_baseStyle = 0; - m_colCount = 0; - m_textCtrl = NULL; -} - -bool wxListCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style, const wxValidator& validator, const wxString& name) -{ - m_imageListNormal = NULL; - m_imageListSmall = NULL; - m_imageListState = NULL; - m_textCtrl = NULL; - m_colCount = 0; - - SetValidator(validator); - SetName(name); - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - m_windowStyle = style; - - SetParent(parent); - - if (width <= 0) - width = 100; - if (height <= 0) - height = 30; - if (x < 0) - x = 0; - if (y < 0) - y = 0; - - m_windowId = (id == -1) ? NewControlId() : id; - - DWORD wstyle = WS_VISIBLE | WS_CHILD | WS_TABSTOP; - - bool want3D; - WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D) ; - - // Even with extended styles, need to combine with WS_BORDER - // for them to look right. - if (want3D || (m_windowStyle & wxSIMPLE_BORDER) || (m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSUNKEN_BORDER) || (m_windowStyle & wxDOUBLE_BORDER)) - wstyle |= WS_BORDER; - - wstyle |= LVS_SHAREIMAGELISTS; - m_baseStyle = wstyle; - - long oldStyle = 0; // Dummy - wstyle |= ConvertToMSWStyle(oldStyle, m_windowStyle); - - // Create the ListView control. - m_hWnd = (WXHWND)CreateWindowEx(exStyle, - WC_LISTVIEW, - "", - wstyle, - x, y, width, height, - (HWND) parent->GetHWND(), - (HMENU)m_windowId, - wxGetInstance(), - NULL); - - if ( !m_hWnd ) { - wxLogError("Can't create list control window."); - - return FALSE; - } - - wxSystemSettings settings; - SetBackgroundColour(settings.GetSystemColour(wxSYS_COLOUR_WINDOW)); - SetForegroundColour(parent->GetDefaultForegroundColour()); - - if (parent) parent->AddChild(this); - - SubclassWin((WXHWND) m_hWnd); - - return TRUE; -} - -wxListCtrl::~wxListCtrl(void) -{ - if (m_textCtrl) - { - m_textCtrl->UnsubclassWin(); - m_textCtrl->SetHWND(0); - delete m_textCtrl; - m_textCtrl = NULL; - } -} - -// Add or remove a single window style -void wxListCtrl::SetSingleStyle(long style, bool add) -{ - long flag = GetWindowStyleFlag(); - - // Get rid of conflicting styles - if ( add ) - { - if ( style & wxLC_MASK_TYPE) - flag = flag & ~wxLC_MASK_TYPE ; - if ( style & wxLC_MASK_ALIGN ) - flag = flag & ~wxLC_MASK_ALIGN ; - if ( style & wxLC_MASK_SORT ) - flag = flag & ~wxLC_MASK_SORT ; - } - - if ( flag & style ) - { - if ( !add ) - flag -= style; - } - else - { - if ( add ) - { - flag |= style; - } - } - - m_windowStyle = flag; - - RecreateWindow(); -} - -// Set the whole window style -void wxListCtrl::SetWindowStyleFlag(long flag) -{ - m_windowStyle = flag; - - RecreateWindow(); -} - -void wxListCtrl::RecreateWindow(void) -{ - if ( GetHWND() ) - { - long oldStyle = 0; - long style = ConvertToMSWStyle(oldStyle, m_windowStyle); - style |= m_baseStyle; -// ::SetWindowLong((HWND) GetHWND(), GWL_STYLE, style); - - // The following recreation of the window appears to be necessary - // because SetWindowLong doesn't seem to do it. - - int x, y, width, height; - GetPosition(&x, &y); - GetSize(&width, &height); - - UnsubclassWin(); - ::DestroyWindow((HWND) GetHWND()); - - // Experimental - // Recreate the ListView control: unfortunately I can't - // make it work by using SetWindowLong. - bool want3D; - WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D) ; - HWND hWndListControl = CreateWindowEx(exStyle, - WC_LISTVIEW, - "", - style, - x, y, width, height, - (HWND) GetParent()->GetHWND(), - (HMENU)m_windowId, - wxGetInstance(), - NULL ); - - m_hWnd = (WXHWND) hWndListControl; - SubclassWin((WXHWND) m_hWnd); - - if ( m_imageListNormal ) - SetImageList(m_imageListNormal, wxIMAGE_LIST_NORMAL); - if ( m_imageListSmall ) - SetImageList(m_imageListSmall, wxIMAGE_LIST_SMALL); - if ( m_imageListState ) - SetImageList(m_imageListState, wxIMAGE_LIST_STATE); - } -} - -// Can be just a single style, or a bitlist -long wxListCtrl::ConvertToMSWStyle(long& oldStyle, long style) const -{ - long wstyle = 0; - if ( style & wxLC_ICON ) - { - if ( (oldStyle & LVS_TYPEMASK) == LVS_SMALLICON ) - oldStyle -= LVS_SMALLICON; - if ( (oldStyle & LVS_TYPEMASK) == LVS_REPORT ) - oldStyle -= LVS_REPORT; - if ( (oldStyle & LVS_TYPEMASK) == LVS_LIST ) - oldStyle -= LVS_LIST; - wstyle |= LVS_ICON; - } - - if ( style & wxLC_SMALL_ICON ) - { - if ( (oldStyle & LVS_TYPEMASK) == LVS_ICON ) - oldStyle -= LVS_ICON; - if ( (oldStyle & LVS_TYPEMASK) == LVS_REPORT ) - oldStyle -= LVS_REPORT; - if ( (oldStyle & LVS_TYPEMASK) == LVS_LIST ) - oldStyle -= LVS_LIST; - wstyle |= LVS_SMALLICON; - } - - if ( style & wxLC_LIST ) - { - if ( (oldStyle & LVS_TYPEMASK) == LVS_ICON ) - oldStyle -= LVS_ICON; - if ( (oldStyle & LVS_TYPEMASK) == LVS_REPORT ) - oldStyle -= LVS_REPORT; - if ( (oldStyle & LVS_TYPEMASK) == LVS_SMALLICON ) - oldStyle -= LVS_SMALLICON; - wstyle |= LVS_LIST; - } - - if ( style & wxLC_REPORT ) - { - if ( (oldStyle & LVS_TYPEMASK) == LVS_ICON ) - oldStyle -= LVS_ICON; - if ( (oldStyle & LVS_TYPEMASK) == LVS_LIST ) - oldStyle -= LVS_LIST; - if ( (oldStyle & LVS_TYPEMASK) == LVS_SMALLICON ) - oldStyle -= LVS_SMALLICON; - wstyle |= LVS_REPORT; - } - - if ( style & wxLC_ALIGN_LEFT ) - { - if ( oldStyle & LVS_ALIGNTOP ) - oldStyle -= LVS_ALIGNTOP; - wstyle |= LVS_ALIGNLEFT; - } - - if ( style & wxLC_ALIGN_TOP ) - { - if ( oldStyle & LVS_ALIGNLEFT ) - oldStyle -= LVS_ALIGNLEFT; - wstyle |= LVS_ALIGNTOP; - } - - if ( style & wxLC_AUTOARRANGE ) - wstyle |= LVS_AUTOARRANGE; - - // Apparently, no such style (documentation wrong?) -/* - if ( style & wxLC_BUTTON ) - wstyle |= LVS_BUTTON; -*/ - - if ( style & wxLC_NO_SORT_HEADER ) - wstyle |= LVS_NOSORTHEADER; - - if ( style & wxLC_NO_HEADER ) - wstyle |= LVS_NOCOLUMNHEADER; - - if ( style & wxLC_EDIT_LABELS ) - wstyle |= LVS_EDITLABELS; - - if ( style & wxLC_SINGLE_SEL ) - wstyle |= LVS_SINGLESEL; - - if ( style & wxLC_SORT_ASCENDING ) - { - if ( oldStyle & LVS_SORTDESCENDING ) - oldStyle -= LVS_SORTDESCENDING; - wstyle |= LVS_SORTASCENDING; - } - - if ( style & wxLC_SORT_DESCENDING ) - { - if ( oldStyle & LVS_SORTASCENDING ) - oldStyle -= LVS_SORTASCENDING; - wstyle |= LVS_SORTDESCENDING; - } - - return wstyle; -} - -// Sets the background colour (GetBackgroundColour already implicit in -// wxWindow class) -void wxListCtrl::SetBackgroundColour(const wxColour& col) -{ - wxWindow::SetBackgroundColour(col); - - ListView_SetBkColor((HWND) GetHWND(), PALETTERGB(col.Red(), col.Green(), col.Blue())); -} - -// Gets information about this column -bool wxListCtrl::GetColumn(int col, wxListItem& item) const -{ - LV_COLUMN lvCol; - lvCol.mask = 0; - lvCol.fmt = 0; - lvCol.pszText = NULL; - - if ( item.m_mask & wxLIST_MASK_TEXT ) - { - lvCol.mask |= LVCF_TEXT; - lvCol.pszText = new char[513]; - lvCol.cchTextMax = 512; - } - - bool success = (ListView_GetColumn((HWND) GetHWND(), col, & lvCol) != 0); - -// item.m_subItem = lvCol.iSubItem; - item.m_width = lvCol.cx; - - if ( (item.m_mask & wxLIST_MASK_TEXT) && lvCol.pszText ) - { - item.m_text = lvCol.pszText; - delete[] lvCol.pszText; - } - - if ( item.m_mask & wxLIST_MASK_FORMAT ) - { - if (lvCol.fmt == LVCFMT_LEFT) - item.m_format = wxLIST_FORMAT_LEFT; - else if (lvCol.fmt == LVCFMT_RIGHT) - item.m_format = wxLIST_FORMAT_RIGHT; - else if (lvCol.fmt == LVCFMT_CENTER) - item.m_format = wxLIST_FORMAT_CENTRE; - } - - return success; -} - -// Sets information about this column -bool wxListCtrl::SetColumn(int col, wxListItem& item) -{ - LV_COLUMN lvCol; - lvCol.mask = 0; - lvCol.fmt = 0; - lvCol.pszText = NULL; - - if ( item.m_mask & wxLIST_MASK_TEXT ) - { - lvCol.mask |= LVCF_TEXT; - lvCol.pszText = WXSTRINGCAST item.m_text; - lvCol.cchTextMax = 0; // Ignored - } - if ( item.m_mask & wxLIST_MASK_FORMAT ) - { - lvCol.mask |= LVCF_FMT; - - if ( item.m_format == wxLIST_FORMAT_LEFT ) - lvCol.fmt = LVCFMT_LEFT; - if ( item.m_format == wxLIST_FORMAT_RIGHT ) - lvCol.fmt = LVCFMT_RIGHT; - if ( item.m_format == wxLIST_FORMAT_CENTRE ) - lvCol.fmt = LVCFMT_CENTER; - } - - if ( item.m_mask & wxLIST_MASK_WIDTH ) - { - lvCol.mask |= LVCF_WIDTH; - lvCol.cx = item.m_width; - - if ( lvCol.cx == wxLIST_AUTOSIZE) - lvCol.cx = LVSCW_AUTOSIZE; - else if ( lvCol.cx == wxLIST_AUTOSIZE_USEHEADER) - lvCol.cx = LVSCW_AUTOSIZE_USEHEADER; - } - lvCol.mask |= LVCF_SUBITEM; - lvCol.iSubItem = col; - return (ListView_SetColumn((HWND) GetHWND(), col, & lvCol) != 0); -} - -// Gets the column width -int wxListCtrl::GetColumnWidth(int col) const -{ - return ListView_GetColumnWidth((HWND) GetHWND(), col); -} - -// Sets the column width -bool wxListCtrl::SetColumnWidth(int col, int width) -{ - int col2 = col; - if ( m_windowStyle & wxLC_LIST ) - col2 = -1; - - int width2 = width; - if ( width2 == wxLIST_AUTOSIZE) - width2 = LVSCW_AUTOSIZE; - else if ( width2 == wxLIST_AUTOSIZE_USEHEADER) - width2 = LVSCW_AUTOSIZE_USEHEADER; - - return (ListView_SetColumnWidth((HWND) GetHWND(), col2, width2) != 0); -} - -// Gets the number of items that can fit vertically in the -// visible area of the list control (list or report view) -// or the total number of items in the list control (icon -// or small icon view) -int wxListCtrl::GetCountPerPage(void) const -{ - return ListView_GetCountPerPage((HWND) GetHWND()); -} - -// Gets the edit control for editing labels. -wxTextCtrl* wxListCtrl::GetEditControl(void) const -{ - return m_textCtrl; -} - -// Gets information about the item -bool wxListCtrl::GetItem(wxListItem& info) const -{ - LV_ITEM lvItem; - lvItem.pszText = NULL; - if ( info.m_mask & wxLIST_MASK_TEXT ) - { - lvItem.pszText = new char[513]; - lvItem.cchTextMax = 512; - } - bool success = (::SendMessage((HWND) GetHWND(), LVM_GETITEM, 0, (LPARAM)& lvItem) != 0); - - if ( !success ) - { - if (lvItem.pszText) - delete[] lvItem.pszText; - - return FALSE; - } - - wxConvertFromMSWListItem(this, info, lvItem); - - if (lvItem.pszText) - delete[] lvItem.pszText; - - return success; -} - -// Sets information about the item -bool wxListCtrl::SetItem(wxListItem& info) -{ - LV_ITEM item; - wxConvertToMSWListItem(this, info, item); - item.cchTextMax = 0; - return (ListView_SetItem((HWND) GetHWND(), &item) != 0); -} - -long wxListCtrl::SetItem(long index, int col, const wxString& label, int imageId) -{ - wxListItem info; - info.m_text = label; - info.m_mask = wxLIST_MASK_TEXT; - info.m_itemId = index; - info.m_col = col; - if ( imageId > -1 ) - { - info.m_image = imageId; - info.m_mask |= wxLIST_MASK_IMAGE; - } - return SetItem(info); -} - - -// Gets the item state -int wxListCtrl::GetItemState(long item, long stateMask) const -{ - wxListItem info; - - info.m_mask = wxLIST_MASK_STATE ; - info.m_stateMask = stateMask; - info.m_itemId = item; - - if (!GetItem(info)) - return 0; - - return info.m_state; -} - -// Sets the item state -bool wxListCtrl::SetItemState(long item, long state, long stateMask) -{ - wxListItem info; - - info.m_mask = wxLIST_MASK_STATE ; - info.m_state = state; - info.m_stateMask = stateMask; - info.m_itemId = item; - - return SetItem(info); -} - -// Sets the item image -bool wxListCtrl::SetItemImage(long item, int image, int selImage) -{ - wxListItem info; - - info.m_mask = wxLIST_MASK_IMAGE ; - info.m_image = image; - info.m_itemId = item; - - return SetItem(info); -} - -// Gets the item text -wxString wxListCtrl::GetItemText(long item) const -{ - wxListItem info; - - info.m_mask = wxLIST_MASK_TEXT ; - info.m_itemId = item; - - if (!GetItem(info)) - return wxString(""); - return info.m_text; -} - -// Sets the item text -void wxListCtrl::SetItemText(long item, const wxString& str) -{ - wxListItem info; - - info.m_mask = wxLIST_MASK_TEXT ; - info.m_itemId = item; - info.m_text = str; - - SetItem(info); -} - -// Gets the item data -long wxListCtrl::GetItemData(long item) const -{ - wxListItem info; - - info.m_mask = wxLIST_MASK_DATA ; - info.m_itemId = item; - - if (!GetItem(info)) - return 0; - return info.m_data; -} - -// Sets the item data -bool wxListCtrl::SetItemData(long item, long data) -{ - wxListItem info; - - info.m_mask = wxLIST_MASK_DATA ; - info.m_itemId = item; - info.m_data = data; - - return SetItem(info); -} - -// Gets the item rectangle -bool wxListCtrl::GetItemRect(long item, wxRectangle& rect, int code) const -{ - RECT rect2; - - int code2 = LVIR_BOUNDS; - if ( code == wxLIST_RECT_BOUNDS ) - code2 = LVIR_BOUNDS; - else if ( code == wxLIST_RECT_ICON ) - code2 = LVIR_ICON; - else if ( code == wxLIST_RECT_LABEL ) - code2 = LVIR_LABEL; - - bool success = (ListView_GetItemRect((HWND) GetHWND(), (int) item, &rect2, code2) != 0); - - rect.x = rect2.left; - rect.y = rect2.top; - rect.width = rect2.right - rect2.left; - rect.height = rect2.bottom - rect2.left; - return success; -} - -// Gets the item position -bool wxListCtrl::GetItemPosition(long item, wxPoint& pos) const -{ - POINT pt; - - bool success = (ListView_GetItemPosition((HWND) GetHWND(), (int) item, &pt) != 0); - - pos.x = pt.x; pos.y = pt.y; - return success; -} - -// Sets the item position. -bool wxListCtrl::SetItemPosition(long item, const wxPoint& pos) -{ - return (ListView_SetItemPosition((HWND) GetHWND(), (int) item, pos.x, pos.y) != 0); -} - -// Gets the number of items in the list control -int wxListCtrl::GetItemCount(void) const -{ - return ListView_GetItemCount((HWND) GetHWND()); -} - -// Retrieves the spacing between icons in pixels. -// If small is TRUE, gets the spacing for the small icon -// view, otherwise the large icon view. -int wxListCtrl::GetItemSpacing(bool isSmall) const -{ - return ListView_GetItemSpacing((HWND) GetHWND(), (BOOL) isSmall); -} - -// Gets the number of selected items in the list control -int wxListCtrl::GetSelectedItemCount(void) const -{ - return ListView_GetSelectedCount((HWND) GetHWND()); -} - -// Gets the text colour of the listview -wxColour wxListCtrl::GetTextColour(void) const -{ - COLORREF ref = ListView_GetTextColor((HWND) GetHWND()); - wxColour col(GetRValue(ref), GetGValue(ref), GetBValue(ref)); - return col; -} - -// Sets the text colour of the listview -void wxListCtrl::SetTextColour(const wxColour& col) -{ - ListView_SetTextColor((HWND) GetHWND(), PALETTERGB(col.Red(), col.Blue(), col.Green())); -} - -// Gets the index of the topmost visible item when in -// list or report view -long wxListCtrl::GetTopItem(void) const -{ - return (long) ListView_GetTopIndex((HWND) GetHWND()); -} - -// Searches for an item, starting from 'item'. -// 'geometry' is one of -// wxLIST_NEXT_ABOVE/ALL/BELOW/LEFT/RIGHT. -// 'state' is a state bit flag, one or more of -// wxLIST_STATE_DROPHILITED/FOCUSED/SELECTED/CUT. -// item can be -1 to find the first item that matches the -// specified flags. -// Returns the item or -1 if unsuccessful. -long wxListCtrl::GetNextItem(long item, int geom, int state) const -{ - long flags = 0; - - if ( geom == wxLIST_NEXT_ABOVE ) - flags |= LVNI_ABOVE; - if ( geom == wxLIST_NEXT_ALL ) - flags |= LVNI_ALL; - if ( geom == wxLIST_NEXT_BELOW ) - flags |= LVNI_BELOW; - if ( geom == wxLIST_NEXT_LEFT ) - flags |= LVNI_TOLEFT; - if ( geom == wxLIST_NEXT_RIGHT ) - flags |= LVNI_TORIGHT; - - if ( state & wxLIST_STATE_CUT ) - flags |= LVNI_CUT; - if ( state & wxLIST_STATE_DROPHILITED ) - flags |= LVNI_DROPHILITED; - if ( state & wxLIST_STATE_FOCUSED ) - flags |= LVNI_FOCUSED; - if ( state & wxLIST_STATE_SELECTED ) - flags |= LVNI_SELECTED; - - return (long) ListView_GetNextItem((HWND) GetHWND(), item, flags); -} - - -wxImageList *wxListCtrl::GetImageList(int which) const -{ - if ( which == wxIMAGE_LIST_NORMAL ) - { - return m_imageListNormal; - } - else if ( which == wxIMAGE_LIST_SMALL ) - { - return m_imageListSmall; - } - else if ( which == wxIMAGE_LIST_STATE ) - { - return m_imageListState; - } - return NULL; -} - -void wxListCtrl::SetImageList(wxImageList *imageList, int which) -{ - int flags = 0; - if ( which == wxIMAGE_LIST_NORMAL ) - { - flags = LVSIL_NORMAL; - m_imageListNormal = imageList; - } - else if ( which == wxIMAGE_LIST_SMALL ) - { - flags = LVSIL_SMALL; - m_imageListSmall = imageList; - } - else if ( which == wxIMAGE_LIST_STATE ) - { - flags = LVSIL_STATE; - m_imageListState = imageList; - } - ListView_SetImageList((HWND) GetHWND(), (HIMAGELIST) imageList ? imageList->GetHIMAGELIST() : 0, flags); -} - -// Operations -//////////////////////////////////////////////////////////////////////////// - -// Arranges the items -bool wxListCtrl::Arrange(int flag) -{ - UINT code = 0; - if ( flag == wxLIST_ALIGN_LEFT ) - code = LVA_ALIGNLEFT; - else if ( flag == wxLIST_ALIGN_TOP ) - code = LVA_ALIGNTOP; - else if ( flag == wxLIST_ALIGN_DEFAULT ) - code = LVA_DEFAULT; - else if ( flag == wxLIST_ALIGN_SNAP_TO_GRID ) - code = LVA_SNAPTOGRID; - - return (ListView_Arrange((HWND) GetHWND(), code) != 0); -} - -// Deletes an item -bool wxListCtrl::DeleteItem(long item) -{ - return (ListView_DeleteItem((HWND) GetHWND(), (int) item) != 0); -} - -// Deletes all items -bool wxListCtrl::DeleteAllItems(void) -{ - return (ListView_DeleteAllItems((HWND) GetHWND()) != 0); -} - -// Deletes all items -bool wxListCtrl::DeleteAllColumns(void) -{ - int i; - for ( i = 0; i < m_colCount; i++) - { - if (ListView_DeleteColumn((HWND) GetHWND(), 0) != 0) - m_colCount --; - } - return (m_colCount == 0); -} - -// Deletes a column -bool wxListCtrl::DeleteColumn(int col) -{ - bool success = (ListView_DeleteColumn((HWND) GetHWND(), col) != 0); - - if ( success && (m_colCount > 0) ) - m_colCount --; - return success; -} - -// Clears items, and columns if there are any. -void wxListCtrl::ClearAll(void) -{ - DeleteAllItems(); - if ( m_colCount > 0 ) - DeleteAllColumns(); -} - -wxTextCtrl* wxListCtrl::EditLabel(long item, wxClassInfo* textControlClass) -{ - wxASSERT( (textControlClass->IsKindOf(CLASSINFO(wxTextCtrl))) ); - - HWND hWnd = (HWND) ListView_EditLabel((HWND) GetHWND(), item); - - if (m_textCtrl) - { - m_textCtrl->UnsubclassWin(); - m_textCtrl->SetHWND(0); - delete m_textCtrl; - m_textCtrl = NULL; - } - - m_textCtrl = (wxTextCtrl*) textControlClass->CreateObject(); - m_textCtrl->SetHWND((WXHWND) hWnd); - m_textCtrl->SubclassWin((WXHWND) hWnd); - - return m_textCtrl; -} - -// End label editing, optionally cancelling the edit -bool wxListCtrl::EndEditLabel(bool cancel) -{ - wxASSERT( FALSE); - -/* I don't know how to implement this: there's no such macro as ListView_EndEditLabelNow. - * ??? - bool success = (ListView_EndEditLabelNow((HWND) GetHWND(), cancel) != 0); - - if (m_textCtrl) - { - m_textCtrl->UnsubclassWin(); - m_textCtrl->SetHWND(0); - delete m_textCtrl; - m_textCtrl = NULL; - } - return success; -*/ - return FALSE; -} - - -// Ensures this item is visible -bool wxListCtrl::EnsureVisible(long item) -{ - return (ListView_EnsureVisible((HWND) GetHWND(), (int) item, FALSE) != 0); -} - -// Find an item whose label matches this string, starting from the item after 'start' -// or the beginning if 'start' is -1. -long wxListCtrl::FindItem(long start, const wxString& str, bool partial) -{ - LV_FINDINFO findInfo; - - findInfo.flags = LVFI_STRING; - if ( partial ) - findInfo.flags |= LVFI_STRING; - findInfo.psz = WXSTRINGCAST str; - - return ListView_FindItem((HWND) GetHWND(), (int) start, & findInfo); -} - -// Find an item whose data matches this data, starting from the item after 'start' -// or the beginning if 'start' is -1. -long wxListCtrl::FindItem(long start, long data) -{ - LV_FINDINFO findInfo; - - findInfo.flags = LVFI_PARAM; - findInfo.lParam = data; - - return ListView_FindItem((HWND) GetHWND(), (int) start, & findInfo); -} - -// Find an item nearest this position in the specified direction, starting from -// the item after 'start' or the beginning if 'start' is -1. -long wxListCtrl::FindItem(long start, const wxPoint& pt, int direction) -{ - LV_FINDINFO findInfo; - - findInfo.flags = LVFI_NEARESTXY; - findInfo.pt.x = pt.x; - findInfo.pt.y = pt.y; - findInfo.vkDirection = VK_RIGHT; - - if ( direction == wxLIST_FIND_UP ) - findInfo.vkDirection = VK_UP; - else if ( direction == wxLIST_FIND_DOWN ) - findInfo.vkDirection = VK_DOWN; - else if ( direction == wxLIST_FIND_LEFT ) - findInfo.vkDirection = VK_LEFT; - else if ( direction == wxLIST_FIND_RIGHT ) - findInfo.vkDirection = VK_RIGHT; - - return ListView_FindItem((HWND) GetHWND(), (int) start, & findInfo); -} - -// Determines which item (if any) is at the specified point, -// giving details in 'flags' (see wxLIST_HITTEST_... flags above) -long wxListCtrl::HitTest(const wxPoint& point, int& flags) -{ - LV_HITTESTINFO hitTestInfo; - hitTestInfo.pt.x = (int) point.x; - hitTestInfo.pt.y = (int) point.y; - - ListView_HitTest((HWND) GetHWND(), & hitTestInfo); - - flags = 0; - if ( hitTestInfo.flags & LVHT_ABOVE ) - flags |= wxLIST_HITTEST_ABOVE; - if ( hitTestInfo.flags & LVHT_BELOW ) - flags |= wxLIST_HITTEST_BELOW; - if ( hitTestInfo.flags & LVHT_NOWHERE ) - flags |= wxLIST_HITTEST_NOWHERE; - if ( hitTestInfo.flags & LVHT_ONITEMICON ) - flags |= wxLIST_HITTEST_ONITEMICON; - if ( hitTestInfo.flags & LVHT_ONITEMLABEL ) - flags |= wxLIST_HITTEST_ONITEMLABEL; - if ( hitTestInfo.flags & LVHT_ONITEMSTATEICON ) - flags |= wxLIST_HITTEST_ONITEMSTATEICON; - if ( hitTestInfo.flags & LVHT_TOLEFT ) - flags |= wxLIST_HITTEST_TOLEFT; - if ( hitTestInfo.flags & LVHT_TORIGHT ) - flags |= wxLIST_HITTEST_TORIGHT; - - return (long) hitTestInfo.iItem ; -} - -// Inserts an item, returning the index of the new item if successful, -// -1 otherwise. -long wxListCtrl::InsertItem(wxListItem& info) -{ - LV_ITEM item; - wxConvertToMSWListItem(this, info, item); - - return (long) ListView_InsertItem((HWND) GetHWND(), & item); -} - -long wxListCtrl::InsertItem(long index, const wxString& label) -{ - wxListItem info; - info.m_text = label; - info.m_mask = wxLIST_MASK_TEXT; - info.m_itemId = index; - return InsertItem(info); -} - -// Inserts an image item -long wxListCtrl::InsertItem(long index, int imageIndex) -{ - wxListItem info; - info.m_image = imageIndex; - info.m_mask = wxLIST_MASK_IMAGE; - info.m_itemId = index; - return InsertItem(info); -} - -// Inserts an image/string item -long wxListCtrl::InsertItem(long index, const wxString& label, int imageIndex) -{ - wxListItem info; - info.m_image = imageIndex; - info.m_text = label; - info.m_mask = wxLIST_MASK_IMAGE | wxLIST_MASK_TEXT; - info.m_itemId = index; - return InsertItem(info); -} - -// For list view mode (only), inserts a column. -long wxListCtrl::InsertColumn(long col, wxListItem& item) -{ - LV_COLUMN lvCol; - lvCol.mask = 0; - lvCol.fmt = 0; - lvCol.pszText = NULL; - - if ( item.m_mask & wxLIST_MASK_TEXT ) - { - lvCol.mask |= LVCF_TEXT; - lvCol.pszText = WXSTRINGCAST item.m_text; - lvCol.cchTextMax = 0; // Ignored - } - if ( item.m_mask & wxLIST_MASK_FORMAT ) - { - lvCol.mask |= LVCF_FMT; - - if ( item.m_format == wxLIST_FORMAT_LEFT ) - lvCol.fmt = LVCFMT_LEFT; - if ( item.m_format == wxLIST_FORMAT_RIGHT ) - lvCol.fmt = LVCFMT_RIGHT; - if ( item.m_format == wxLIST_FORMAT_CENTRE ) - lvCol.fmt = LVCFMT_CENTER; - } - - if ( item.m_mask & wxLIST_MASK_WIDTH ) - { - lvCol.mask |= LVCF_WIDTH; - lvCol.cx = item.m_width; - - if ( lvCol.cx == wxLIST_AUTOSIZE) - lvCol.cx = LVSCW_AUTOSIZE; - else if ( lvCol.cx == wxLIST_AUTOSIZE_USEHEADER) - lvCol.cx = LVSCW_AUTOSIZE_USEHEADER; - } - lvCol.mask |= LVCF_SUBITEM; - lvCol.iSubItem = col; - - bool success = (ListView_InsertColumn((HWND) GetHWND(), col, & lvCol) != 0); - if ( success ) - m_colCount ++; - return success; -} - -long wxListCtrl::InsertColumn(long col, const wxString& heading, int format, - int width) -{ - wxListItem item; - item.m_mask = wxLIST_MASK_TEXT | wxLIST_MASK_FORMAT; - item.m_text = heading; - if ( width > -1 ) - { - item.m_mask |= wxLIST_MASK_WIDTH; - item.m_width = width; - } - item.m_format = format; - - return InsertColumn(col, item); -} - -// Scrolls the list control. If in icon, small icon or report view mode, -// x specifies the number of pixels to scroll. If in list view mode, x -// specifies the number of columns to scroll. -// If in icon, small icon or list view mode, y specifies the number of pixels -// to scroll. If in report view mode, y specifies the number of lines to scroll. -bool wxListCtrl::ScrollList(int dx, int dy) -{ - return (ListView_Scroll((HWND) GetHWND(), dx, dy) != 0); -} - -// Sort items. - -// fn is a function which takes 3 long arguments: item1, item2, data. -// item1 is the long data associated with a first item (NOT the index). -// item2 is the long data associated with a second item (NOT the index). -// data is the same value as passed to SortItems. -// The return value is a negative number if the first item should precede the second -// item, a positive number of the second item should precede the first, -// or zero if the two items are equivalent. - -// data is arbitrary data to be passed to the sort function. -bool wxListCtrl::SortItems(wxListCtrlCompare fn, long data) -{ - return (ListView_SortItems((HWND) GetHWND(), (PFNLVCOMPARE) fn, data) != 0); -} - -bool wxListCtrl::MSWCommand(WXUINT cmd, WXWORD id) -{ - if (cmd == EN_UPDATE) - { - wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, id); - event.SetEventObject( this ); - ProcessCommand(event); - return TRUE; - } - else if (cmd == EN_KILLFOCUS) - { - wxCommandEvent event(wxEVT_KILL_FOCUS, id); - event.SetEventObject( this ); - ProcessCommand(event); - return TRUE; - } - else return FALSE; -} - -bool wxListCtrl::MSWNotify(WXWPARAM wParam, WXLPARAM lParam) -{ - wxListEvent event(wxEVT_NULL, m_windowId); - wxEventType eventType = wxEVT_NULL; - NMHDR *hdr1 = (NMHDR *) lParam; - switch ( hdr1->code ) - { - case LVN_BEGINDRAG: - { - eventType = wxEVT_COMMAND_LIST_BEGIN_DRAG; - NM_LISTVIEW *hdr = (NM_LISTVIEW *)lParam; - event.m_itemIndex = hdr->iItem; - event.m_pointDrag.x = hdr->ptAction.x; - event.m_pointDrag.y = hdr->ptAction.y; - break; - } - case LVN_BEGINLABELEDIT: - { - eventType = wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT; - LV_DISPINFO *info = (LV_DISPINFO *)lParam; - wxConvertFromMSWListItem(this, event.m_item, info->item, (HWND) GetHWND()); - break; - } - case LVN_BEGINRDRAG: - { - eventType = wxEVT_COMMAND_LIST_BEGIN_RDRAG; - NM_LISTVIEW* hdr = (NM_LISTVIEW*)lParam; - event.m_itemIndex = hdr->iItem; - event.m_pointDrag.x = hdr->ptAction.x; - event.m_pointDrag.y = hdr->ptAction.y; - break; - } - case LVN_COLUMNCLICK: - { - eventType = wxEVT_COMMAND_LIST_COL_CLICK; - NM_LISTVIEW* hdr = (NM_LISTVIEW*)lParam; - event.m_itemIndex = -1; - event.m_col = hdr->iSubItem; - break; - } - case LVN_DELETEALLITEMS: - { - eventType = wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS; -// NM_LISTVIEW* hdr = (NM_LISTVIEW*)lParam; - event.m_itemIndex = -1; - break; - } - case LVN_DELETEITEM: - { - eventType = wxEVT_COMMAND_LIST_DELETE_ITEM; - NM_LISTVIEW* hdr = (NM_LISTVIEW*)lParam; - event.m_itemIndex = hdr->iItem; - break; - } - case LVN_ENDLABELEDIT: - { - eventType = wxEVT_COMMAND_LIST_END_LABEL_EDIT; - LV_DISPINFO *info = (LV_DISPINFO *)lParam; - wxConvertFromMSWListItem(this, event.m_item, info->item, (HWND) GetHWND()); - if ( info->item.pszText == NULL || info->item.iItem == -1 ) - event.m_cancelled = TRUE; - break; - } - case LVN_GETDISPINFO: - { -// return FALSE; - // TODO: some text buffering here, I think - // TODO: API for getting Windows to retrieve values - // on demand. - eventType = wxEVT_COMMAND_LIST_GET_INFO; - LV_DISPINFO *info = (LV_DISPINFO *)lParam; - wxConvertFromMSWListItem(this, event.m_item, info->item, (HWND) GetHWND()); - break; - } - case LVN_INSERTITEM: - { - eventType = wxEVT_COMMAND_LIST_INSERT_ITEM; - NM_LISTVIEW* hdr = (NM_LISTVIEW*)lParam; - event.m_itemIndex = hdr->iItem; - break; - } - case LVN_ITEMCHANGED: - { - // This needs to be sent to wxListCtrl as a rather more - // concrete event. For now, just detect a selection - // or deselection. - NM_LISTVIEW* hdr = (NM_LISTVIEW*)lParam; - if ( (hdr->uNewState & LVIS_SELECTED) && !(hdr->uOldState & LVIS_SELECTED) ) - { - eventType = wxEVT_COMMAND_LIST_ITEM_SELECTED; - event.m_itemIndex = hdr->iItem; - } - else if ( !(hdr->uNewState & LVIS_SELECTED) && (hdr->uOldState & LVIS_SELECTED) ) - { - eventType = wxEVT_COMMAND_LIST_ITEM_DESELECTED; - event.m_itemIndex = hdr->iItem; - } - else - return FALSE; - break; - } - case LVN_KEYDOWN: - { - eventType = wxEVT_COMMAND_LIST_KEY_DOWN; - LV_KEYDOWN *info = (LV_KEYDOWN *)lParam; - event.m_code = wxCharCodeMSWToWX(info->wVKey); - break; - } - case LVN_SETDISPINFO: - { - eventType = wxEVT_COMMAND_LIST_SET_INFO; - LV_DISPINFO *info = (LV_DISPINFO *)lParam; - wxConvertFromMSWListItem(this, event.m_item, info->item, (HWND) GetHWND()); - break; - } - - default : - return wxControl::MSWNotify(wParam, lParam); - break; - } - - event.SetEventObject( this ); - event.SetEventType(eventType); - - if ( !GetEventHandler()->ProcessEvent(event) ) - return FALSE; - - if (hdr1->code == LVN_GETDISPINFO) - { - LV_DISPINFO *info = (LV_DISPINFO *)lParam; - if ( info->item.mask & LVIF_TEXT ) - { - if ( !event.m_item.m_text.IsNull() ) - { - info->item.pszText = AddPool(event.m_item.m_text); - info->item.cchTextMax = strlen(info->item.pszText) + 1; - } - } -// wxConvertToMSWListItem(this, event.m_item, info->item); - } - - return TRUE; -} - -char *wxListCtrl::AddPool(const wxString& str) -{ - // Remove the first element if 3 strings exist - if ( m_stringPool.Number() == 3 ) - { - wxNode *node = m_stringPool.First(); - delete[] (char *)node->Data(); - delete node; - } - wxNode *node = m_stringPool.Add((char *) (const char *)str); - return (char *)node->Data(); -} - -// List item structure -wxListItem::wxListItem(void) -{ - m_mask = 0; - m_itemId = 0; - m_col = 0; - m_state = 0; - m_stateMask = 0; - m_image = 0; - m_data = 0; - - m_format = wxLIST_FORMAT_CENTRE; - m_width = 0; -} - -static void wxConvertFromMSWListItem(const wxListCtrl *ctrl, wxListItem& info, LV_ITEM& lvItem, HWND getFullInfo) -{ - info.m_data = lvItem.lParam; - info.m_mask = 0; - info.m_state = 0; - info.m_stateMask = 0; - info.m_itemId = lvItem.iItem; - - long oldMask = lvItem.mask; - - bool needText = FALSE; - if (getFullInfo != 0) - { - if ( lvItem.mask & LVIF_TEXT ) - needText = FALSE; - else - needText = TRUE; - - if ( needText ) - { - lvItem.pszText = new char[513]; - lvItem.cchTextMax = 512; - } -// lvItem.mask |= TVIF_HANDLE | TVIF_STATE | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN | TVIF_PARAM ; - lvItem.mask |= LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM ; - ::SendMessage(getFullInfo, LVM_GETITEM, 0, (LPARAM)& lvItem) ; - } - - if ( lvItem.mask & LVIF_STATE ) - { - info.m_mask |= wxLIST_MASK_STATE; - - if ( lvItem.stateMask & LVIS_CUT) - { - info.m_stateMask |= wxLIST_STATE_CUT ; - if ( lvItem.state & LVIS_CUT ) - info.m_state |= wxLIST_STATE_CUT ; - } - if ( lvItem.stateMask & LVIS_DROPHILITED) - { - info.m_stateMask |= wxLIST_STATE_DROPHILITED ; - if ( lvItem.state & LVIS_DROPHILITED ) - info.m_state |= wxLIST_STATE_DROPHILITED ; - } - if ( lvItem.stateMask & LVIS_FOCUSED) - { - info.m_stateMask |= wxLIST_STATE_FOCUSED ; - if ( lvItem.state & LVIS_FOCUSED ) - info.m_state |= wxLIST_STATE_FOCUSED ; - } - if ( lvItem.stateMask & LVIS_SELECTED) - { - info.m_stateMask |= wxLIST_STATE_SELECTED ; - if ( lvItem.state & LVIS_SELECTED ) - info.m_state |= wxLIST_STATE_SELECTED ; - } - } - - if ( lvItem.mask & LVIF_TEXT ) - { - info.m_mask |= wxLIST_MASK_TEXT; - info.m_text = lvItem.pszText; - } - if ( lvItem.mask & LVIF_IMAGE ) - { - info.m_mask |= wxLIST_MASK_IMAGE; - info.m_image = lvItem.iImage; - } - if ( lvItem.mask & LVIF_PARAM ) - info.m_mask |= wxLIST_MASK_DATA; - if ( lvItem.mask & LVIF_DI_SETITEM ) - info.m_mask |= wxLIST_SET_ITEM; - info.m_col = lvItem.iSubItem; - - if (needText) - { - if (lvItem.pszText) - delete[] lvItem.pszText; - } - lvItem.mask = oldMask ; -} - -static void wxConvertToMSWListItem(const wxListCtrl *ctrl, wxListItem& info, LV_ITEM& lvItem) -{ - lvItem.iItem = (int) info.m_itemId ; - - lvItem.iImage = info.m_image ; - lvItem.lParam = info.m_data; - lvItem.stateMask = 0; - lvItem.state = 0; - lvItem.mask = 0; - lvItem.iSubItem = info.m_col; - - if (info.m_mask & wxLIST_MASK_STATE) - { - lvItem.mask |= LVIF_STATE ; - if (info.m_stateMask & wxLIST_STATE_CUT) - { - lvItem.stateMask |= LVIS_CUT ; - if (info.m_state & wxLIST_STATE_CUT) - lvItem.state |= LVIS_CUT; - } - if (info.m_stateMask & wxLIST_STATE_DROPHILITED) - { - lvItem.stateMask |= LVIS_DROPHILITED; - if (info.m_state & wxLIST_STATE_DROPHILITED) - lvItem.state |= LVIS_DROPHILITED; - } - if (info.m_stateMask & wxLIST_STATE_FOCUSED) - { - lvItem.stateMask |= LVIS_FOCUSED; - if (info.m_state & wxLIST_STATE_FOCUSED) - lvItem.state |= LVIS_FOCUSED; - } - if (info.m_stateMask & wxLIST_STATE_SELECTED) - { - lvItem.stateMask |= LVIS_SELECTED; - if (info.m_state & wxLIST_STATE_SELECTED) - lvItem.state |= LVIS_SELECTED; - } - } - - if (info.m_mask & wxLIST_MASK_TEXT) - { - lvItem.mask |= LVIF_TEXT ; - if ( ctrl->GetWindowStyleFlag() & wxLC_USER_TEXT ) - { - lvItem.pszText = LPSTR_TEXTCALLBACK; - } - else - { - lvItem.pszText = (char *) (const char *)info.m_text ; - if ( lvItem.pszText ) - lvItem.cchTextMax = info.m_text.Length(); - else - lvItem.cchTextMax = 0; - } - } - if (info.m_mask & wxLIST_MASK_IMAGE) - lvItem.mask |= LVIF_IMAGE ; - if (info.m_mask & wxLIST_MASK_DATA) - lvItem.mask |= LVIF_PARAM ; -} - -// List event -IMPLEMENT_DYNAMIC_CLASS(wxListEvent, wxCommandEvent) - -wxListEvent::wxListEvent(wxEventType commandType, int id): - wxCommandEvent(commandType, id) -{ - m_code = 0; - m_itemIndex = 0; - m_col = 0; - m_cancelled = FALSE; -} - -#endif - diff --git a/src/msw/main.cpp b/src/msw/main.cpp deleted file mode 100644 index 1cab1f628e..0000000000 --- a/src/msw/main.cpp +++ /dev/null @@ -1,87 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: main.cpp -// Purpose: Main/DllMain -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include "wx/app.h" -#include - -// May wish not to have a DllMain or WinMain, e.g. if we're programming -// a Netscape plugin. -#ifndef NOMAIN - -// NT defines APIENTRY, 3.x not -#if !defined(APIENTRY) -#define APIENTRY FAR PASCAL -#endif - -///////////////////////////////////////////////////////////////////////////////// -// WinMain -// Note that WinMain is also defined in dummy.obj, which is linked to -// an application that is using the DLL version of wxWindows. - -#if !defined(_WINDLL) - -#ifdef __WATCOMC__ -int PASCAL -#else -int APIENTRY -#endif - - WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR m_lpCmdLine, int nCmdShow ) -{ - return wxEntry((WXHINSTANCE) hInstance, (WXHINSTANCE) hPrevInstance, m_lpCmdLine, nCmdShow); -} -#endif - -///////////////////////////////////////////////////////////////////////////////// -// DllMain - -#if defined(_WINDLL) - -// DLL entry point - -extern "C" -#ifdef __BORLANDC__ -// SCD: I don't know why, but also OWL uses this function -BOOL WINAPI DllEntryPoint (HANDLE hModule, DWORD fdwReason, LPVOID lpReserved) -#else -BOOL WINAPI DllMain (HANDLE hModule, DWORD fdwReason, LPVOID lpReserved) -#endif -{ - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - // Only call wxEntry if the application itself is part of the DLL. - // If only the wxWindows library is in the DLL, then the initialisation - // will be called when the application implicitly calls WinMain. - -#if !defined(WXMAKINGDLL) - return wxEntry((WXHINSTANCE) hModule); -#endif - break; - - case DLL_PROCESS_DETACH: - default: - break; - } - return TRUE; -} - -#endif - -#endif - diff --git a/src/msw/makefile.b32 b/src/msw/makefile.b32 deleted file mode 100644 index 9e09253b3f..0000000000 --- a/src/msw/makefile.b32 +++ /dev/null @@ -1,604 +0,0 @@ -# -# File: makefile.b32 -# Author: Julian Smart -# Created: 1998 -# Updated: -# Copyright: -# -# "%W% %G%" -# -# Makefile : Builds wxWindows library wx.lib for MS Windows, -# and Borland C++ (32-bit). - -!if "$(BCCDIR)" == "" -!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 -!endif - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -# Please set these according to the settings in wx_setup.h, so we can include -# the appropriate libraries in wx.lib -USE_CTL3D=0 -USE_XPM_IN_MSW=0 - -PERIPH_LIBS= -PERIPH_TARGET= -PERIPH_CLEAN_TARGET= - -!if "$(USE_CTL3D)" == "1" -#Use WIN32S/WIN95 32 bit version ctl3d32.dll under win95 (Andre Beltman) -PERIPH_LIBS=$(WXDIR)\lib\ctl3d32.lib $(PERIPH_LIBS) -PERIPH_TARGET=ctl3d $(PERIPH_TARGET) -PERIPH_CLEAN_TARGET=clean_ctl3d $(PERIPH_CLEAN_TARGET) -!endif - -!if "$(USE_XPM_IN_MSW)" == "1" -PERIPH_LIBS=$(WXLIB)\xpm.lib $(PERIPH_LIBS) -PERIPH_TARGET=xpm $(PERIPH_TARGET) -PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET) -!endif - -LIBTARGET= $(WXLIBDIR)\wx32.lib -DUMMY=dummy - -GENDIR=..\generic -COMMDIR=..\common -OLEDIR=.\ole -MSWDIR=. - -DOCDIR = $(WXDIR)\docs - -GENERICOBJS= \ - $(MSWDIR)\choicdgg.obj \ - $(MSWDIR)\colrdlgg.obj \ - $(MSWDIR)\fontdlgg.obj \ - $(MSWDIR)\gridg.obj \ - $(MSWDIR)\helpxlp.obj \ - $(MSWDIR)\msgdlgg.obj \ - $(MSWDIR)\panelg.obj \ - $(MSWDIR)\printps.obj \ - $(MSWDIR)\prntdlgg.obj \ - $(MSWDIR)\scrolwin.obj \ - $(MSWDIR)\splitter.obj \ - $(MSWDIR)\statusbr.obj \ - $(MSWDIR)\tabg.obj \ - $(MSWDIR)\textdlgg.obj - -COMMONOBJS = \ - $(MSWDIR)\config.obj \ - $(MSWDIR)\cmndata.obj \ - $(MSWDIR)\docview.obj \ - $(MSWDIR)\docmdi.obj \ - $(MSWDIR)\dynarray.obj \ - $(MSWDIR)\event.obj \ - $(MSWDIR)\file.obj \ - $(MSWDIR)\fileconf.obj \ - $(MSWDIR)\filefn.obj \ - $(MSWDIR)\framecmn.obj \ - $(MSWDIR)\gdicmn.obj \ - $(MSWDIR)\helpbase.obj \ - $(MSWDIR)\intl.obj \ - $(MSWDIR)\ipcbase.obj \ - $(MSWDIR)\log.obj \ - $(MSWDIR)\layout.obj \ - $(MSWDIR)\memory.obj \ - $(MSWDIR)\module.obj \ - $(MSWDIR)\object.obj \ - $(MSWDIR)\odbc.obj \ - $(MSWDIR)\postscrp.obj \ - $(MSWDIR)\prntbase.obj \ - $(MSWDIR)\resource.obj \ - $(MSWDIR)\tbarbase.obj \ - $(MSWDIR)\tbarsmpl.obj \ - $(MSWDIR)\textfile.obj \ - $(MSWDIR)\timercmn.obj \ - $(MSWDIR)\utilscmn.obj \ - $(MSWDIR)\validate.obj \ - $(MSWDIR)\valtext.obj \ - $(MSWDIR)\date.obj \ - $(MSWDIR)\hash.obj \ - $(MSWDIR)\list.obj \ - $(MSWDIR)\string.obj \ - $(MSWDIR)\time.obj \ - $(MSWDIR)\wxexpr.obj \ - $(MSWDIR)\y_tab.obj \ - $(MSWDIR)\stream.obj \ - $(MSWDIR)\fstream.obj \ - $(MSWDIR)\mstream.obj \ - $(MSWDIR)\zstream.obj \ - $(MSWDIR)\datstrm.obj \ - $(MSWDIR)\extended.obj \ - $(MSWDIR)\wincmn.obj - -# $(MSWDIR)\matrix.obj \ - -MSWOBJS = \ - $(MSWDIR)\accel.obj \ - $(MSWDIR)\app.obj \ - $(MSWDIR)\bitmap.obj \ - $(MSWDIR)\bmpbuttn.obj \ - $(MSWDIR)\brush.obj \ - $(MSWDIR)\button.obj \ - $(MSWDIR)\checkbox.obj \ - $(MSWDIR)\checklst.obj \ - $(MSWDIR)\choice.obj \ - $(MSWDIR)\clipbrd.obj \ - $(MSWDIR)\colordlg.obj \ - $(MSWDIR)\colour.obj \ - $(MSWDIR)\combobox.obj \ - $(MSWDIR)\control.obj \ - $(MSWDIR)\curico.obj \ - $(MSWDIR)\cursor.obj \ - $(MSWDIR)\data.obj \ - $(MSWDIR)\dc.obj \ - $(MSWDIR)\dcmemory.obj \ - $(MSWDIR)\dcclient.obj \ - $(MSWDIR)\dcprint.obj \ - $(MSWDIR)\dcscreen.obj \ - $(MSWDIR)\dde.obj \ - $(MSWDIR)\dialog.obj \ - $(MSWDIR)\dib.obj \ - $(MSWDIR)\dirdlg.obj \ - $(MSWDIR)\filedlg.obj \ - $(MSWDIR)\font.obj \ - $(MSWDIR)\fontdlg.obj \ - $(MSWDIR)\frame.obj \ - $(MSWDIR)\gauge95.obj \ - $(MSWDIR)\gaugemsw.obj \ - $(MSWDIR)\gdiobj.obj \ - $(MSWDIR)\helpwin.obj \ - $(MSWDIR)\icon.obj \ - $(MSWDIR)\imaglist.obj \ - $(MSWDIR)\joystick.obj \ - $(MSWDIR)\listbox.obj \ - $(MSWDIR)\listctrl.obj \ - $(MSWDIR)\main.obj \ - $(MSWDIR)\mdi.obj \ - $(MSWDIR)\menu.obj \ - $(MSWDIR)\menuitem.obj \ - $(MSWDIR)\metafile.obj \ - $(MSWDIR)\minifram.obj \ - $(MSWDIR)\msgdlg.obj \ - $(MSWDIR)\nativdlg.obj \ - $(MSWDIR)\notebook.obj \ - $(MSWDIR)\ownerdrw.obj \ - $(MSWDIR)\palette.obj \ - $(MSWDIR)\pen.obj \ - $(MSWDIR)\penwin.obj \ - $(MSWDIR)\printdlg.obj \ - $(MSWDIR)\printwin.obj \ - $(MSWDIR)\radiobox.obj \ - $(MSWDIR)\radiobut.obj \ - $(MSWDIR)\region.obj \ - $(MSWDIR)\registry.obj \ - $(MSWDIR)\regconf.obj \ - $(MSWDIR)\scrolbar.obj \ - $(MSWDIR)\settings.obj \ - $(MSWDIR)\slidrmsw.obj \ - $(MSWDIR)\slider95.obj \ - $(MSWDIR)\spinbutt.obj \ - $(MSWDIR)\statbmp.obj \ - $(MSWDIR)\statbox.obj \ - $(MSWDIR)\statbr95.obj \ - $(MSWDIR)\stattext.obj \ - $(MSWDIR)\tabctrl.obj \ - $(MSWDIR)\taskbar.obj \ - $(MSWDIR)\tbar95.obj \ - $(MSWDIR)\tbarmsw.obj \ - $(MSWDIR)\textctrl.obj \ - $(MSWDIR)\thread.obj \ - $(MSWDIR)\timer.obj \ - $(MSWDIR)\treectrl.obj \ - $(MSWDIR)\utils.obj \ - $(MSWDIR)\utilsexc.obj \ - $(MSWDIR)\wave.obj \ - $(MSWDIR)\window.obj \ - $(MSWDIR)\droptgt.obj \ - $(MSWDIR)\dropsrc.obj \ - $(MSWDIR)\dataobj.obj \ - $(MSWDIR)\oleutils.obj \ - $(MSWDIR)\uuid.obj - -OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) - -default: wx - -wx: $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET) - -all: all_libs all_execs - -$(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(BASEOBJECTS) - erase $(LIBTARGET) - tlib $(LIBTARGET) /P512 @&&! --+$(OBJECTS:.obj =.obj -+) -+$(BASEOBJECTS:.obj =.obj -+) -+$(PERIPH_LIBS:.lib =.lib -+) -! - -dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h -dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h - -$(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c - -# cl @<< -#$(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@ -#<< - -$(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c - copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c - -$(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c - copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c - -#$(OBJECTS): $(WXDIR)\include\wx\setup.h - -$(MSWDIR)\accel.obj: $(MSWDIR)\accel.$(SRCSUFF) - -$(MSWDIR)\app.obj: $(MSWDIR)\app.$(SRCSUFF) - -$(MSWDIR)\bitmap.obj: $(MSWDIR)\bitmap.$(SRCSUFF) - -$(MSWDIR)\bmpbuttn.obj: $(MSWDIR)\bmpbuttn.$(SRCSUFF) - -$(MSWDIR)\brush.obj: $(MSWDIR)\brush.$(SRCSUFF) - -$(MSWDIR)\button.obj: $(MSWDIR)\button.$(SRCSUFF) - -$(MSWDIR)\choice.obj: $(MSWDIR)\choice.$(SRCSUFF) - -$(MSWDIR)\checkbox.obj: $(MSWDIR)\checkbox.$(SRCSUFF) - -$(MSWDIR)\checklst.obj: $(MSWDIR)\checklst.$(SRCSUFF) - -$(MSWDIR)\clipbrd.obj: $(MSWDIR)\clipbrd.$(SRCSUFF) - -$(MSWDIR)\colordlg.obj: $(MSWDIR)\colordlg.$(SRCSUFF) - -$(MSWDIR)\colour.obj: $(MSWDIR)\colour.$(SRCSUFF) - -$(MSWDIR)\combobox.obj: $(MSWDIR)\combobox.$(SRCSUFF) - -$(MSWDIR)\control.obj: $(MSWDIR)\control.$(SRCSUFF) - -$(MSWDIR)\curico.obj: $(MSWDIR)\curico.$(SRCSUFF) - -$(MSWDIR)\cursor.obj: $(MSWDIR)\cursor.$(SRCSUFF) - -$(MSWDIR)\data.obj: $(MSWDIR)\data.$(SRCSUFF) - -$(MSWDIR)\dde.obj: $(MSWDIR)\dde.$(SRCSUFF) - -$(MSWDIR)\dc.obj: $(MSWDIR)\dc.$(SRCSUFF) - -$(MSWDIR)\dcmemory.obj: $(MSWDIR)\dcmemory.$(SRCSUFF) - -$(MSWDIR)\dcclient.obj: $(MSWDIR)\dcclient.$(SRCSUFF) - -$(MSWDIR)\dcprint.obj: $(MSWDIR)\dcprint.$(SRCSUFF) - -$(MSWDIR)\dcscreen.obj: $(MSWDIR)\dcscreen.$(SRCSUFF) - -$(MSWDIR)\dialog.obj: $(MSWDIR)\dialog.$(SRCSUFF) - -$(MSWDIR)\dib.obj: $(MSWDIR)\dib.$(SRCSUFF) - -$(MSWDIR)\dirdlg.obj: $(MSWDIR)\dirdlg.$(SRCSUFF) - -$(MSWDIR)\filedlg.obj: $(MSWDIR)\filedlg.$(SRCSUFF) - -$(MSWDIR)\font.obj: $(MSWDIR)\font.$(SRCSUFF) - -$(MSWDIR)\fontdlg.obj: $(MSWDIR)\fontdlg.$(SRCSUFF) - -$(MSWDIR)\frame.obj: $(MSWDIR)\frame.$(SRCSUFF) - -$(MSWDIR)\gaugemsw.obj: $(MSWDIR)\gaugemsw.$(SRCSUFF) - -$(MSWDIR)\gauge95.obj: $(MSWDIR)\gauge95.$(SRCSUFF) - -$(MSWDIR)\gdiobj.obj: $(MSWDIR)\gdiobj.$(SRCSUFF) - -$(MSWDIR)\icon.obj: $(MSWDIR)\icon.$(SRCSUFF) - -$(MSWDIR)\imaglist.obj: $(MSWDIR)\imaglist.$(SRCSUFF) - -$(MSWDIR)\joystick.obj: $(MSWDIR)\joystick.$(SRCSUFF) - -$(MSWDIR)\listbox.obj: $(MSWDIR)\listbox.$(SRCSUFF) - -$(MSWDIR)\listctrl.obj: $(MSWDIR)\listctrl.$(SRCSUFF) - -$(MSWDIR)\main.obj: $(MSWDIR)\main.$(SRCSUFF) - -$(MSWDIR)\mdi.obj: $(MSWDIR)\mdi.$(SRCSUFF) - -$(MSWDIR)\menu.obj: $(MSWDIR)\menu.$(SRCSUFF) - -$(MSWDIR)\menuitem.obj: $(MSWDIR)\menu.$(SRCSUFF) - -$(MSWDIR)\metafile.obj: $(MSWDIR)\metafile.$(SRCSUFF) - -$(MSWDIR)\minifram.obj: $(MSWDIR)\minifram.$(SRCSUFF) - -$(MSWDIR)\msgdlg.obj: $(MSWDIR)\msgdlg.$(SRCSUFF) - -$(MSWDIR)\nativdlg.obj: $(MSWDIR)\nativdlg.$(SRCSUFF) - -$(MSWDIR)\notebook.obj: $(MSWDIR)\notebook.$(SRCSUFF) - -$(MSWDIR)\ownerdrw.obj: $(MSWDIR)\ownerdrw.$(SRCSUFF) - -$(MSWDIR)\palette.obj: $(MSWDIR)\palette.$(SRCSUFF) - -$(MSWDIR)\pen.obj: $(MSWDIR)\pen.$(SRCSUFF) - -$(MSWDIR)\penwin.obj: $(MSWDIR)\penwin.$(SRCSUFF) - -$(MSWDIR)\printdlg.obj: $(MSWDIR)\printdlg.$(SRCSUFF) - -$(MSWDIR)\printwin.obj: $(MSWDIR)\printwin.$(SRCSUFF) - -$(MSWDIR)\radiobox.obj: $(MSWDIR)\radiobox.$(SRCSUFF) - -$(MSWDIR)\radiobut.obj: $(MSWDIR)\radiobut.$(SRCSUFF) - -$(MSWDIR)\region.obj: $(MSWDIR)\region.$(SRCSUFF) - -$(MSWDIR)\registry.obj: $(MSWDIR)\registry.$(SRCSUFF) - -$(MSWDIR)\regconf.obj: $(MSWDIR)\regconf.$(SRCSUFF) - -$(MSWDIR)\scrolbar.obj: $(MSWDIR)\scrolbar.$(SRCSUFF) - -$(MSWDIR)\settings.obj: $(MSWDIR)\settings.$(SRCSUFF) - -$(MSWDIR)\slidrmsw.obj: $(MSWDIR)\slidrmsw.$(SRCSUFF) - -$(MSWDIR)\slider95.obj: $(MSWDIR)\slider95.$(SRCSUFF) - -$(MSWDIR)\spinbutt.obj: $(MSWDIR)\spinbutt.$(SRCSUFF) - -$(MSWDIR)\statbmp.obj: $(MSWDIR)\statbmp.$(SRCSUFF) - -$(MSWDIR)\statbox.obj: $(MSWDIR)\statbox.$(SRCSUFF) - -$(MSWDIR)\statbr95.obj: $(MSWDIR)\statbr95.$(SRCSUFF) - -$(MSWDIR)\stattext.obj: $(MSWDIR)\stattext.$(SRCSUFF) - -$(MSWDIR)\tabctrl.obj: $(MSWDIR)\tabctrl.$(SRCSUFF) - -$(MSWDIR)\taskbar.obj: $(MSWDIR)\taskbar.$(SRCSUFF) - -$(MSWDIR)\tbar95.obj: $(MSWDIR)\tbar95.$(SRCSUFF) - -$(MSWDIR)\tbarmsw.obj: $(MSWDIR)\tbarmsw.$(SRCSUFF) - -$(MSWDIR)\textctrl.obj: $(MSWDIR)\textctrl.$(SRCSUFF) - -$(MSWDIR)\thread.obj: $(MSWDIR)\thread.$(SRCSUFF) - -$(MSWDIR)\timer.obj: $(MSWDIR)\timer.$(SRCSUFF) - -$(MSWDIR)\treectrl.obj: $(MSWDIR)\treectrl.$(SRCSUFF) - -$(MSWDIR)\utils.obj: $(MSWDIR)\utils.$(SRCSUFF) - -$(MSWDIR)\utilsexc.obj: $(MSWDIR)\utilsexc.$(SRCSUFF) - -$(MSWDIR)\wave.obj: $(MSWDIR)\wave.$(SRCSUFF) - -$(MSWDIR)\window.obj: $(MSWDIR)\window.$(SRCSUFF) - -$(MSWDIR)\droptgt.obj: $(OLEDIR)\droptgt.$(SRCSUFF) - -$(MSWDIR)\dropsrc.obj: $(OLEDIR)\dropsrc.$(SRCSUFF) - -$(MSWDIR)\dataobj.obj: $(OLEDIR)\dataobj.$(SRCSUFF) - -$(MSWDIR)\oleutils.obj: $(OLEDIR)\oleutils.$(SRCSUFF) - -$(MSWDIR)\uuid.obj: $(OLEDIR)\uuid.$(SRCSUFF) - -######################################################## -# Common objects (always compiled) - -$(MSWDIR)\config.obj: $(COMMDIR)\config.$(SRCSUFF) - -$(MSWDIR)\cmndata.obj: $(COMMDIR)\cmndata.$(SRCSUFF) - -$(MSWDIR)\docview.obj: $(COMMDIR)\docview.$(SRCSUFF) - -$(MSWDIR)\docmdi.obj: $(COMMDIR)\docmdi.$(SRCSUFF) - -$(MSWDIR)\dynarray.obj: $(COMMDIR)\dynarray.$(SRCSUFF) - -$(MSWDIR)\event.obj: $(COMMDIR)\event.$(SRCSUFF) - -$(MSWDIR)\file.obj: $(COMMDIR)\file.$(SRCSUFF) - -$(MSWDIR)\fileconf.obj: $(COMMDIR)\fileconf.$(SRCSUFF) - -$(MSWDIR)\filefn.obj: $(COMMDIR)\filefn.$(SRCSUFF) - -$(MSWDIR)\framecmn.obj: $(COMMDIR)\framecmn.$(SRCSUFF) - -$(MSWDIR)\gdicmn.obj: $(COMMDIR)\gdicmn.$(SRCSUFF) - -$(MSWDIR)\intl.obj: $(COMMDIR)\intl.$(SRCSUFF) - -$(MSWDIR)\ipcbase.obj: $(COMMDIR)\ipcbase.$(SRCSUFF) - -$(MSWDIR)\helpbase.obj: $(COMMDIR)\helpbase.$(SRCSUFF) - -$(MSWDIR)\layout.obj: $(COMMDIR)\layout.$(SRCSUFF) - -$(MSWDIR)\log.obj: $(COMMDIR)\log.$(SRCSUFF) - -$(MSWDIR)\memory.obj: $(COMMDIR)\memory.$(SRCSUFF) - -$(MSWDIR)\module.obj: $(COMMDIR)\module.$(SRCSUFF) - -$(MSWDIR)\object.obj: $(COMMDIR)\object.$(SRCSUFF) - -$(MSWDIR)\odbc.obj: $(COMMDIR)\odbc.$(SRCSUFF) - -$(MSWDIR)\postscrp.obj: $(COMMDIR)\postscrp.$(SRCSUFF) - -$(MSWDIR)\prntbase.obj: $(COMMDIR)\prntbase.$(SRCSUFF) - -$(MSWDIR)\resource.obj: $(COMMDIR)\resource.$(SRCSUFF) - -$(MSWDIR)\tbarbase.obj: $(COMMDIR)\tbarbase.$(SRCSUFF) - -$(MSWDIR)\tbarsmpl.obj: $(COMMDIR)\tbarsmpl.$(SRCSUFF) - -$(MSWDIR)\textfile.obj: $(COMMDIR)\textfile.$(SRCSUFF) - -$(MSWDIR)\timercmn.obj: $(COMMDIR)\timercmn.$(SRCSUFF) - -$(MSWDIR)\utilscmn.obj: $(COMMDIR)\utilscmn.$(SRCSUFF) - -$(MSWDIR)\validate.obj: $(COMMDIR)\validate.$(SRCSUFF) - -$(MSWDIR)\valtext.obj: $(COMMDIR)\valtext.$(SRCSUFF) - -$(MSWDIR)\date.obj: $(COMMDIR)\date.$(SRCSUFF) - -$(MSWDIR)\wxexpr.obj: $(COMMDIR)\wxexpr.$(SRCSUFF) - -$(MSWDIR)\hash.obj: $(COMMDIR)\hash.$(SRCSUFF) - -$(MSWDIR)\list.obj: $(COMMDIR)\list.$(SRCSUFF) - -$(MSWDIR)\string.obj: $(COMMDIR)\string.$(SRCSUFF) - -$(MSWDIR)\matrix.obj: $(COMMDIR)\matrix.$(SRCSUFF) - -$(MSWDIR)\time.obj: $(COMMDIR)\time.$(SRCSUFF) - -$(MSWDIR)\datstrm.obj: $(COMMDIR)\datstrm.$(SRCSUFF) - -$(MSWDIR)\mstream.obj: $(COMMDIR)\mstream.$(SRCSUFF) - -$(MSWDIR)\zstream.obj: $(COMMDIR)\zstream.$(SRCSUFF) - -$(MSWDIR)\fstream.obj: $(COMMDIR)\fstream.$(SRCSUFF) - -$(MSWDIR)\stream.obj: $(COMMDIR)\stream.$(SRCSUFF) - -$(MSWDIR)\wincmn.obj: $(COMMDIR)\wincmn.$(SRCSUFF) - -$(MSWDIR)\extended.obj: $(COMMDIR)\extended.c - -######################################################## -# Generic objects (not always compiled, depending on -# whether platforms have native implementations) - -$(MSWDIR)\choicdgg.obj: $(GENDIR)\choicdgg.$(SRCSUFF) - -$(MSWDIR)\colrdlgg.obj: $(GENDIR)\colrdlgg.$(SRCSUFF) - -$(MSWDIR)\fontdlgg.obj: $(GENDIR)\fontdlgg.$(SRCSUFF) - -$(MSWDIR)\gridg.obj: $(GENDIR)\gridg.$(SRCSUFF) - -$(MSWDIR)\helpxlp.obj: $(GENDIR)\helpxlp.$(SRCSUFF) - -$(MSWDIR)\msgdlgg.obj: $(GENDIR)\msgdlgg.$(SRCSUFF) - -$(MSWDIR)\panelg.obj: $(GENDIR)\panelg.$(SRCSUFF) - -$(MSWDIR)\printps.obj: $(GENDIR)\printps.$(SRCSUFF) - -$(MSWDIR)\prntdlgg.obj: $(GENDIR)\prntdlgg.$(SRCSUFF) - -$(MSWDIR)\scrolwin.obj: $(GENDIR)\scrolwin.$(SRCSUFF) - -$(MSWDIR)\splitter.obj: $(GENDIR)\splitter.$(SRCSUFF) - -$(MSWDIR)\statusbr.obj: $(GENDIR)\statusbr.$(SRCSUFF) - -$(MSWDIR)\textdlgg.obj: $(GENDIR)\textdlgg.$(SRCSUFF) - -$(MSWDIR)\tabg.obj: $(GENDIR)\tabg.$(SRCSUFF) - -all_utils: - cd $(WXDIR)\utils - make -f makefile.b32 - cd $(WXDIR)\src\msw - -all_samples: - cd $(WXDIR)\samples - make -f makefile.b32 - cd $(WXDIR)\src\msw - -all_execs: - cd $(WXDIR)\utils - make -f makefile.b32 all_execs - cd $(WXDIR)\src\msw - -all_libs: - cd $(WXDIR)\src\msw - make -f makefile.b32 ctl3d dib fafa gauge hytext itsy prologio rcparser wx wxgraph\ - wxstring wxtree mfutils # wxxpm - -all_contribs: - cd $(WXDIR)\src\msw - make -f makefile.b32 ctl3d fafa wxstring itsy gauge # wxxpm - -# CONTRIB -ctl3d: $(CFG) - cd $(WXDIR)\src\msw\ctl3d\borland - make -f makefile.b32 -DCFG=$(CFG) - cd $(WXDIR)\src\msw - -wxxpm: $(CFG) - cd $(WXDIR)\src\common\wxxpm - make -f makefile.b32 -DCFG=$(CFG) -DFINAL=$(FINAL) -DWXWIN=$(WXDIR) -DDEBUG=$(DEBUG) - cd $(WXDIR)\src\msw - -$(CFG): makefile.b32 - copy &&! --H=$(WXDIR)\src\msw\wx32.csm --3 --P --d --w-hid --w-par --w-pia --w-aus --w-rch --Oxt --WE - --I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/png;$(WXDIR)/src/zlib --I$(WXDIR)\include\wx\msw\gnuwin32 - --L$(BCCDIR)\lib --D__WXWIN__ --D__WXMSW__ --D__WINDOWS__ --DWIN32 -$(OPT) -$(DEBUG_FLAGS) -$(WIN95FLAG) -! $(CFG) - -#-I$(WXDIR)\src\common\wxxpm\libxpm.34b\lib - -clean: $(PERIPH_CLEAN_TARGET) - erase $(LIBTARGET) - erase *.obj - erase *.pch - erase *.csm - erase *.cfg - erase ..\common\y_tab.c - erase ..\common\lex_yy.c - -cleanall: clean - - diff --git a/src/msw/makefile.bcc b/src/msw/makefile.bcc deleted file mode 100644 index 8270dc47cc..0000000000 --- a/src/msw/makefile.bcc +++ /dev/null @@ -1,407 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds wxWindows library wx.lib for Windows 3.1 -# and Borland C++ 3.1 - -!if "$(BCCDIR)" == "" -!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 -!endif - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -!if "$(CFG)" == "" -#!error You must start compiling from wx\src, not wx\src\msw. -!endif - -!ifndef DEBUG -DEBUG=0 -!endif - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makebcc.env - -THISDIR = $(WXDIR)\src\msw -WXLIB = $(WXDIR)\lib -WXINC = $(WXDIR)\include\msw -WXBASESRC = $(WXDIR)\src\base -WXBASEINC = $(WXDIR)\include\base - -# Please set these according to the settings in wx_setup.h, so we can include -# the appropriate libraries in wx.lib -USE_CTL3D=1 -USE_ITSYBITS=1 -USE_GAUGE=1 -USE_IMAGE_LOADING_IN_MSW=1 -USE_XPM_IN_MSW=0 -USE_WX_RESOURCES=1 -USE_RESOURCE_LOADING_IN_MSW=1 -USE_GNU_WXSTRING=1 - -PERIPH_LIBS= -PERIPH_TARGET= -PERIPH_CLEAN_TARGET= - -!if "$(USE_CTL3D)" == "1" -PERIPH_LIBS=$(WXDIR)\lib\ctl3dv2.lib $(PERIPH_LIBS) -PERIPH_TARGET=ctl3d $(PERIPH_TARGET) -PERIPH_CLEAN_TARGET=clean_ctl3d $(PERIPH_CLEAN_TARGET) -!endif - -!if "$(USE_ITSYBITS)" == "1" -PERIPH_LIBS=$(WXDIR)\contrib\itsybits\itsy.lib $(PERIPH_LIBS) -PERIPH_TARGET=itsy $(PERIPH_TARGET) -PERIPH_CLEAN_TARGET=clean_itsy $(PERIPH_CLEAN_TARGET) -!endif - -!if "$(USE_GAUGE)" == "1" -PERIPH_LIBS=$(WXDIR)\contrib\gauge\gauge.lib $(PERIPH_LIBS) -PERIPH_TARGET=gauge $(PERIPH_TARGET) -PERIPH_CLEAN_TARGET=clean_gauge $(PERIPH_CLEAN_TARGET) -!endif - -!if "$(USE_XPM_IN_MSW)" == "1" -PERIPH_LIBS=$(WXDIR)\contrib\wxxpm\xpm.lib $(PERIPH_LIBS) -PERIPH_TARGET=xpm $(PERIPH_TARGET) -PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET) -!endif - -!if "$(USE_IMAGE_LOADING_IN_MSW)" == "1" -PERIPH_LIBS=$(WXDIR)\utils\dib\dib.lib $(PERIPH_LIBS) -PERIPH_TARGET=dib $(PERIPH_TARGET) -PERIPH_CLEAN_TARGET=clean_dib $(PERIPH_CLEAN_TARGET) -!endif - -!if "$(USE_WX_RESOURCES)" == "1" -PERIPH_LIBS=$(WXDIR)\utils\prologio\lib\prologio.lib $(PERIPH_LIBS) -PERIPH_TARGET=prologio $(PERIPH_TARGET) -PERIPH_CLEAN_TARGET=clean_proio $(PERIPH_CLEAN_TARGET) -!endif - -!if "$(USE_RESOURCE_LOADING_IN_MSW)" == "1" -PERIPH_LIBS=$(WXDIR)\utils\rcparser\lib\rcparser.lib $(PERIPH_LIBS) -PERIPH_TARGET=rcparser $(PERIPH_TARGET) -PERIPH_CLEAN_TARGET=clean_rcp $(PERIPH_CLEAN_TARGET) -!endif - -WXSTRINGOBJ=..\base\wxstring.obj - -!if "$(USE_GNU_WXSTRING)" == "1" -PERIPH_LIBS=$(WXDIR)\contrib\wxstring\wxstring.lib $(PERIPH_LIBS) -PERIPH_TARGET=wxstring $(PERIPH_TARGET) -PERIPH_CLEAN_TARGET=clean_wxstring $(PERIPH_CLEAN_TARGET) -WXSTRINGOBJ= -!endif - -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -LIBTARGET= $(WXLIB)\wx.lib -DUMMY=dummy - -BASEHEADERS = $(WXBASEINC)\wx_defs.h \ - $(WXBASEINC)\wb_buttn.h \ - $(WXBASEINC)\wb_canvs.h \ - $(WXBASEINC)\wb_check.h \ - $(WXBASEINC)\wb_choic.h \ - $(WXBASEINC)\wb_dc.h \ - $(WXBASEINC)\wb_dccan.h \ - $(WXBASEINC)\wb_dcmem.h \ - $(WXBASEINC)\wb_dialg.h \ - $(WXBASEINC)\wb_frame.h \ - $(WXBASEINC)\wb_gdi.h \ - $(WXBASEINC)\wb_ipc.h \ - $(WXBASEINC)\wb_ipcob.h \ - $(WXBASEINC)\wb_item.h \ - $(WXBASEINC)\wb_lbox.h \ - $(WXBASEINC)\wb_main.h \ - $(WXBASEINC)\wb_menu.h \ - $(WXBASEINC)\wb_messg.h \ - $(WXBASEINC)\wb_mf.h \ - $(WXBASEINC)\wb_mnuit.h \ - $(WXBASEINC)\wb_mtxt.h \ - $(WXBASEINC)\wb_panel.h \ - $(WXBASEINC)\wb_slidr.h \ - $(WXBASEINC)\wb_text.h \ - $(WXBASEINC)\wb_timer.h \ - $(WXBASEINC)\wb_txt.h \ - $(WXBASEINC)\wb_win.h \ - $(WXBASEINC)\wx_dcps.h \ - $(WXBASEINC)\wx_form.h \ - $(WXBASEINC)\wx_hash.h \ - $(WXBASEINC)\wx_help.h \ - $(WXBASEINC)\wx_list.h \ - $(WXBASEINC)\wxstring.h \ - $(WXBASEINC)\wx_mgstr.h \ - $(WXBASEINC)\wx_obj.h \ - $(WXBASEINC)\wx_stdev.h \ - $(WXBASEINC)\wx_sysev.h \ - $(WXBASEINC)\wx_types.h \ - $(WXBASEINC)\wx_utils.h - -LOCALHEADERS = \ - $(WXINC)\wx_buttn.h \ - $(WXINC)\wx_canvs.h \ - $(WXINC)\wx_check.h \ - $(WXINC)\wx_choic.h \ - $(WXINC)\wx_combo.h \ - $(WXINC)\wx_dc.h \ - $(WXINC)\wx_dccan.h \ - $(WXINC)\wx_dcmem.h \ - $(WXINC)\wx_dialg.h \ - $(WXINC)\wx_frame.h \ - $(WXINC)\wx_gdi.h \ - $(WXINC)\wx_ipc.h \ - $(WXINC)\wx_ipcob.h \ - $(WXINC)\wx_item.h \ - $(WXINC)\wx_lbox.h \ - $(WXINC)\wx_main.h \ - $(WXINC)\wx_menu.h \ - $(WXINC)\wx_messg.h \ - $(WXINC)\wx_mf.h \ - $(WXINC)\wx_mnuit.h \ - $(WXINC)\wx_mtxt.h \ - $(WXINC)\wx_panel.h \ - $(WXINC)\wx_privt.h \ - $(WXINC)\wx_slidr.h \ - $(WXINC)\wx_text.h \ - $(WXINC)\wx_timer.h \ - $(WXINC)\wx_txt.h \ - $(WXINC)\wx_win.h - -OBJECTS1 = wx_win.obj wx_frame.obj wx_panel.obj wx_utils.obj wx_main.obj\ - wx_item.obj - -OBJECTS2 = wx_text.obj wx_gdi.obj wx_dialg.obj wx_canvs.obj wx_dc.obj wx_mf.obj - -OBJECTS3 = wx_ipc.obj wx_timer.obj wx_clipb.obj wx_stat.obj wx_scrol.obj wx_vlbox.obj - -OBJECTS4 = wx_buttn.obj wx_messg.obj wx_check.obj wx_choic.obj wx_rbox.obj wx_lbox.obj \ - wx_group.obj wx_gauge.obj wx_txt.obj wx_mtxt.obj wx_slidr.obj wx_menu.obj wx_db.obj\ - wx_cmdlg.obj wx_combo.obj - -OBJECTS = $(OBJECTS1) $(OBJECTS2) $(OBJECTS3) $(OBJECTS4) - -BASEOBJECTS1 = ..\base\wb_data.obj ..\base\wb_win.obj ..\base\wb_frame.obj ..\base\wb_panel.obj\ - ..\base\wb_utils.obj ..\base\wb_main.obj ..\base\wb_res.obj - -BASEOBJECTS2 = ..\base\wb_item.obj ..\base\wb_list.obj ..\base\wb_obj.obj\ - ..\base\wb_ps.obj ..\base\wx_doc.obj ..\base\wx_tbar.obj ..\base\wx_bbar.obj - -BASEOBJECTS3 = ..\base\wb_text.obj ..\base\wb_gdi.obj ..\base\wb_dialg.obj\ - ..\base\wb_canvs.obj ..\base\wx_date.obj ..\base\wx_time.obj ..\base\wx_frac.obj - -BASEOBJECTS4 = ..\base\wb_dc.obj ..\base\wb_mf.obj ..\base\wb_hash.obj\ - ..\base\wb_ipc.obj ..\base\wx_lay.obj ..\base\wx_mem.obj ..\base\wb_cmdlg.obj - -BASEOBJECTS5 = ..\base\wb_form.obj ..\base\wb_timer.obj ..\base\wb_help.obj\ - ..\base\wb_vlbox.obj ..\base\wb_scrol.obj ..\base\wb_stat.obj - -BASEOBJECTS6 = ..\base\wb_sysev.obj ..\base\wb_stdev.obj ..\base\wb_types.obj\ - ..\base\wb_mgstr.obj ..\base\wb_print.obj $(WXSTRINGOBJ) - -BASEOBJECTS = $(BASEOBJECTS1) $(BASEOBJECTS2) $(BASEOBJECTS3)\ - $(BASEOBJECTS4) $(BASEOBJECTS5) $(BASEOBJECTS6) - - -all: $(CFG) $(DUMMY).obj base $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET) - -base: - cd $(WXBASESRC) - make -f makefile.bcc -DCFG=$(CFG) -DWXDIR=$(WXDIR) DEBUG=$(DEBUG) -DDEBUG_FLAGS=$(DEBUG_FLAGS) -DOPT=$(OPT) -DFINAL=$(FINAL) - cd $(THISDIR) - -$(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(BASEOBJECTS) $(PERIPH_LIBS) - erase $(LIBTARGET) - tlib $(WXLIB)\wx.lib /P512 @&&! -+$(OBJECTS:.obj =.obj +) +$(BASEOBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +) -! - -dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\base\wx.h - - -dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\base\wx.h - -wx_obj.obj: $(WXBASEINC)\wx_obj.h - -wx_win.obj: $(WXBASEINC)\wx_defs.h $(WXINC)\wx_win.h $(WXBASEINC)\wx_obj.h \ - $(WXBASEINC)\wx_utils.h wx_win.$(SRCSUFF) $(WXINC)\wx_gdi.h $(WXINC)\wx_privt.h - -wx_main.obj: $(WXBASEINC)\wx_defs.h $(WXBASEINC)\wx_obj.h $(WXINC)\wx_frame.h $(WXBASEINC)\wx_utils.h \ - $(WXINC)\wx_main.h wx_main.$(SRCSUFF) $(WXINC)\wx_privt.h - -wx_frame.obj: $(WXBASEINC)\wx_defs.h $(WXINC)\wx_win.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h $(WXINC)\wx_frame.h wx_frame.$(SRCSUFF)\ - $(WXBASEINC)\wx_stdev.h $(WXINC)\wx_privt.h - -wx_panel.obj: $(WXBASEINC)\wx_defs.h $(WXINC)\wx_win.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h $(WXINC)\wx_frame.h $(WXINC)\wx_panel.h\ - wx_panel.$(SRCSUFF) $(WXBASEINC)\wx_stdev.h $(WXINC)\wx_privt.h - -wx_text.obj: $(WXBASEINC)\wx_defs.h $(WXINC)\wx_win.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h $(WXINC)\wx_frame.h $(WXINC)\wx_text.h\ - wx_text.$(SRCSUFF) $(WXBASEINC)\wx_stdev.h $(WXINC)\wx_privt.h - -wx_canvs.obj: $(WXBASEINC)\wx_defs.h $(WXINC)\wx_win.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h $(WXINC)\wx_frame.h $(WXINC)\wx_canvs.h\ - wx_canvs.$(SRCSUFF) $(WXBASEINC)\wx_stdev.h $(WXINC)\wx_gdi.h\ - $(WXINC)\wx_dc.h $(WXINC)\wx_privt.h - -wx_dc.obj: $(WXBASEINC)\wx_defs.h $(WXINC)\wx_win.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h $(WXINC)\wx_frame.h $(WXINC)\wx_canvs.h\ - wx_dc.$(SRCSUFF) $(WXBASEINC)\wx_stdev.h $(WXINC)\wx_gdi.h $(WXINC)\wx_dc.h\ - $(WXINC)\wx_dccan.h $(WXINC)\wx_dcmem.h - -wx_mf.obj: $(WXBASEINC)\wx_defs.h $(WXINC)\wx_win.h $(WXBASEINC)\wx_obj.h\ - wx_mf.$(SRCSUFF) $(WXBASEINC)\wx_stdev.h $(WXINC)\wx_gdi.h $(WXINC)\wx_mf.h - -wx_item.obj: $(WXBASEINC)\wx_defs.h $(WXINC)\wx_win.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h $(WXINC)\wx_frame.h $(WXINC)\wx_item.h\ - wx_item.$(SRCSUFF) $(WXBASEINC)\wx_stdev.h $(WXINC)\wx_privt.h - -wx_utils.obj: $(WXBASEINC)\wx_defs.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h wx_utils.$(SRCSUFF) - -wx_ipc.obj: $(WXBASEINC)\wx_defs.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h $(WXINC)\wx_ipc.h wx_ipc.$(SRCSUFF) - -wx_gdi.obj: $(WXBASEINC)\wx_defs.h $(WXINC)\wx_gdi.h $(WXBASEINC)\wx_utils.h wx_gdi.$(SRCSUFF) - -wx_dialg.obj: $(WXBASEINC)\wx_defs.h wx_dialg.$(SRCSUFF) $(WXINC)\wx_dialg.h $(WXINC)\wx_win.h\ - $(WXBASEINC)\wx_utils.h $(WXINC)\wx_panel.h $(WXINC)\wx_privt.h - -wx_timer.obj: $(WXBASEINC)\wx_defs.h wx_timer.$(SRCSUFF) $(WXINC)\wx_timer.h - -wx_clipb.obj: $(WXBASEINC)\wx_defs.h wx_clipb.$(SRCSUFF) $(WXINC)\wx_clipb.h - -wx_stat.obj: $(WXBASEINC)\wx_defs.h wx_stat.$(SRCSUFF) -wx_vlbox.obj: $(WXBASEINC)\wx_defs.h wx_vlbox.$(SRCSUFF) -wx_messg.obj: $(WXBASEINC)\wx_defs.h wx_messg.$(SRCSUFF) $(WXINC)\wx_messg.h -wx_buttn.obj: $(WXBASEINC)\wx_defs.h wx_buttn.$(SRCSUFF) $(WXINC)\wx_buttn.h -wx_check.obj: $(WXBASEINC)\wx_defs.h wx_check.$(SRCSUFF) $(WXINC)\wx_check.h -wx_choic.obj: $(WXBASEINC)\wx_defs.h wx_choic.$(SRCSUFF) $(WXINC)\wx_choic.h -wx_combo.obj: $(WXBASEINC)\wx_defs.h wx_combo.$(SRCSUFF) $(WXINC)\wx_combo.h -wx_group.obj: $(WXBASEINC)\wx_defs.h wx_group.$(SRCSUFF) $(WXINC)\wx_group.h -wx_gauge.obj: $(WXBASEINC)\wx_defs.h wx_gauge.$(SRCSUFF) $(WXINC)\wx_gauge.h -wx_lbox.obj: $(WXBASEINC)\wx_defs.h wx_lbox.$(SRCSUFF) $(WXINC)\wx_lbox.h -wx_rbox.obj: $(WXBASEINC)\wx_defs.h wx_rbox.$(SRCSUFF) $(WXINC)\wx_rbox.h -wx_menu.obj: $(WXBASEINC)\wx_defs.h wx_menu.$(SRCSUFF) $(WXINC)\wx_menu.h -wx_txt.obj: $(WXBASEINC)\wx_defs.h wx_txt.$(SRCSUFF) $(WXINC)\wx_txt.h -wx_mtxt.obj: $(WXBASEINC)\wx_defs.h wx_mtxt.$(SRCSUFF) $(WXINC)\wx_mtxt.h -wx_slidr.obj: $(WXBASEINC)\wx_defs.h wx_slidr.$(SRCSUFF) $(WXINC)\wx_slidr.h -wx_db.obj: $(WXBASEINC)\wx_defs.h wx_db.$(SRCSUFF) $(WXINC)\wx_db.h -wx_cmdlg.obj: $(WXBASEINC)\wx_defs.h wx_cmdlg.$(SRCSUFF) $(WXINC)\wx_cmdlg.h - -$(WXINC)\wx_win.h: $(WXBASEINC)\wb_win.h -$(WXINC)\wx_main.h: $(WXBASEINC)\wb_main.h -$(WXINC)\wx_frame.h: $(WXBASEINC)\wb_frame.h -$(WXINC)\wx_panel.h: $(WXBASEINC)\wb_panel.h -$(WXINC)\wx_text.h: $(WXBASEINC)\wb_text.h -$(WXINC)\wx_dialg.h: $(WXBASEINC)\wb_dialg.h -$(WXINC)\wx_ipc.h: $(WXBASEINC)\wb_ipc.h -$(WXINC)\wx_gdi.h: $(WXBASEINC)\wb_gdi.h -$(WXINC)\wx_event.h: $(WXBASEINC)\wb_event.h -$(WXINC)\wx_canvs.h: $(WXBASEINC)\wb_canvs.h -$(WXINC)\wx_mf.h: $(WXBASEINC)\wb_mf.h -$(WXINC)\wx_item.h: $(WXBASEINC)\wb_item.h -$(WXINC)\wx_buttn.h: $(WXBASEINC)\wb_buttn.h -$(WXINC)\wx_messg.h: $(WXBASEINC)\wb_messg.h -$(WXINC)\wx_choic.h: $(WXBASEINC)\wb_choic.h -$(WXINC)\wx_combo.h: $(WXBASEINC)\wb_combo.h -$(WXINC)\wx_check.h: $(WXBASEINC)\wb_check.h -$(WXINC)\wx_lbox.h: $(WXBASEINC)\wb_lbox.h -$(WXINC)\wx_txt.h: $(WXBASEINC)\wb_txt.h -$(WXINC)\wx_mtxt.h: $(WXBASEINC)\wb_mtxt.h -$(WXINC)\wx_slidr.h: $(WXBASEINC)\wb_slidr.h -$(WXINC)\wx_menu.h: $(WXBASEINC)\wb_menu.h - -# Peripheral components - -ctl3d: - cd $(WXDIR)\contrib\ctl3d\borland - make -f makefile.bcc DEBUG=$(DEBUG) - cd $(WXDIR)\src\msw - -clean_ctl3d: - cd $(WXDIR)\contrib\ctl3d\borland - make -f makefile.bcc clean - cd $(WXDIR)\src\msw - -itsy: - cd $(WXDIR)\contrib\itsybits - make -f makefile.bcc DEBUG=$(DEBUG) - cd $(WXDIR)\src\msw - -clean_itsy: - cd $(WXDIR)\contrib\itsybits - make -f makefile.bcc clean - cd $(WXDIR)\src\msw - -gauge: - cd $(WXDIR)\contrib\gauge - make -f makefile.bcc DEBUG=$(DEBUG) - cd $(WXDIR)\src\msw - -clean_gauge: - cd $(WXDIR)\contrib\gauge - make -f makefile.bcc clean - cd $(WXDIR)\src\msw - -xpm: - cd $(WXDIR)\contrib\wxxpm - make -f makefile.bcc DEBUG=$(DEBUG) - cd $(WXDIR)\src\msw - -clean_xpm: - cd $(WXDIR)\contrib\wxxpm - make -f makefile.bcc clean - cd $(WXDIR)\src\msw - -dib: - cd $(WXDIR)\utils\dib - make -f makefile.bcc DEBUG=$(DEBUG) - cd $(WXDIR)\src\msw - -clean_dib: - cd $(WXDIR)\utils\dib - make -f makefile.bcc clean - cd $(WXDIR)\src\msw - -prologio: - cd $(WXDIR)\utils\prologio\src - make -f makefile.bcc DEBUG=$(DEBUG) - cd $(WXDIR)\src\msw - -clean_proio: - cd $(WXDIR)\utils\prologio\src - make -f makefile.bcc clean - cd $(WXDIR)\src\msw - -rcparser: - cd $(WXDIR)\utils\rcparser\src - make -f makefile.bcc DEBUG=$(DEBUG) - cd $(WXDIR)\src\msw - -wxstring: - cd $(WXDIR)\contrib\wxstring - make -f makefile.bcc OPTIONS="$(OPTIONS)" DEBUG="$(DEBUG)" - cd $(WXDIR)\src\msw - -clean_wxstring: - cd $(WXDIR)\contrib\wxstring - make -f makefile.bcc clean - cd $(WXDIR)\src\msw - -clean_rcp: - cd $(WXDIR)\utils\rcparser\src - make -f makefile.bcc clean - cd $(WXDIR)\src\msw - -clean: $(PERIPH_CLEAN_TARGET) - erase $(LIBTARGET) - cd $(WXDIR)\src\base - erase *.obj - cd $(WXDIR)\src\msw - erase *.obj - -cleanall: clean diff --git a/src/msw/makefile.dos b/src/msw/makefile.dos deleted file mode 100644 index 6d28cd8edb..0000000000 --- a/src/msw/makefile.dos +++ /dev/null @@ -1,1220 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1997 -# Updated: -# Copyright: (c) 1997, Julian Smart -# -# "%W% %G%" -# -# Makefile : Builds wxWindows library wx.lib for VC++ (16-bit) -# Arguments: -# -# FINAL=1 argument to nmake to build version with no debugging info. -# -!include <..\makemsc.env> - -LIBTARGET=$(WXLIB) -DUMMYOBJ=dummy.obj - -# Please set these according to the settings in wx_setup.h, so we can include -# the appropriate libraries in wx.lib - -# This one overrides the others, to be consistent with the settings in wx_setup.h -MINIMAL_WXWINDOWS_SETUP=0 - -USE_CTL3D=1 -USE_XPM_IN_MSW=0 - -!if "$(MINIMAL_WXWINDOWS_SETUP)" == "1" -USE_CTL3D=0 -USE_IMAGE_LOADING_IN_MSW=0 -USE_XPM_IN_MSW=0 -USE_GNU_WXSTRING=0 -!endif - -PERIPH_LIBS= -PERIPH_TARGET= -PERIPH_CLEAN_TARGET= - -# !if "$(USE_CTL3D)" == "1" -# PERIPH_LIBS=d:\msdev\lib\ctl3d32.lib $(PERIPH_LIBS) -# !endif - -!if "$(USE_XPM_IN_MSW)" == "1" -PERIPH_LIBS=$(WXDIR)\contrib\wxxpm\xpm.lib $(PERIPH_LIBS) -PERIPH_TARGET=xpm $(PERIPH_TARGET) -PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET) -!endif - -GENDIR=..\generic -COMMDIR=..\common -OLEDIR=.\ole -MSWDIR=. - -DOCDIR = $(WXDIR)\docs - -GENERICOBJS= \ - $(GENDIR)\choicdgg.obj \ - $(GENDIR)\colrdlgg.obj \ - $(GENDIR)\fontdlgg.obj \ - $(GENDIR)\gridg.obj \ - $(GENDIR)\helpxlp.obj \ - $(GENDIR)\msgdlgg.obj \ - $(GENDIR)\panelg.obj \ - $(GENDIR)\printps.obj \ - $(GENDIR)\prntdlgg.obj \ - $(GENDIR)\scrolwin.obj \ - $(GENDIR)\splitter.obj \ - $(GENDIR)\statusbr.obj \ - $(GENDIR)\tabg.obj \ - $(GENDIR)\textdlgg.obj - -COMMONOBJS = \ - $(COMMDIR)\config.obj \ - $(COMMDIR)\cmndata.obj \ - $(COMMDIR)\docview.obj \ - $(COMMDIR)\docmdi.obj \ - $(COMMDIR)\dynarray.obj \ - $(COMMDIR)\event.obj \ - $(COMMDIR)\file.obj \ - $(COMMDIR)\filefn.obj \ - $(COMMDIR)\framecmn.obj \ - $(COMMDIR)\gdicmn.obj \ - $(COMMDIR)\intl.obj \ - $(COMMDIR)\helpbase.obj \ - $(COMMDIR)\ipcbase.obj \ - $(COMMDIR)\layout.obj \ - $(COMMDIR)\log.obj \ - $(COMMDIR)\memory.obj \ - $(COMMDIR)\module.obj \ - $(COMMDIR)\object.obj \ - $(COMMDIR)\odbc.obj \ - $(COMMDIR)\postscrp.obj \ - $(COMMDIR)\process.obj \ - $(COMMDIR)\prntbase.obj \ - $(COMMDIR)\resource.obj \ - $(COMMDIR)\tbarbase.obj \ - $(COMMDIR)\tbarsmpl.obj \ - $(COMMDIR)\textfile.obj \ - $(COMMDIR)\timercmn.obj \ - $(COMMDIR)\utilscmn.obj \ - $(COMMDIR)\validate.obj \ - $(COMMDIR)\valtext.obj \ - $(COMMDIR)\date.obj \ - $(COMMDIR)\wxexpr.obj \ - $(COMMDIR)\hash.obj \ - $(COMMDIR)\list.obj \ - $(COMMDIR)\string.obj \ - $(COMMDIR)\time.obj \ - $(COMMDIR)\y_tab.obj \ - $(COMMDIR)\stream.obj \ - $(COMMDIR)\fstream.obj \ - $(COMMDIR)\mstream.obj \ - $(COMMDIR)\zstream.obj \ - $(COMMDIR)\datstrm.obj \ - $(COMMDIR)\extended.obj \ - $(COMMDIR)\wincmn.obj - -# $(COMMDIR)\fileconf.obj # Doens't compile (nested classes) - -MSWOBJS = \ - $(MSWDIR)\accel.obj \ - $(MSWDIR)\app.obj \ - $(MSWDIR)\bitmap.obj \ - $(MSWDIR)\bmpbuttn.obj \ - $(MSWDIR)\brush.obj \ - $(MSWDIR)\button.obj \ - $(MSWDIR)\checkbox.obj \ - $(MSWDIR)\checklst.obj \ - $(MSWDIR)\choice.obj \ - $(MSWDIR)\clipbrd.obj \ - $(MSWDIR)\colordlg.obj \ - $(MSWDIR)\colour.obj \ - $(MSWDIR)\combobox.obj \ - $(MSWDIR)\control.obj \ - $(MSWDIR)\curico.obj \ - $(MSWDIR)\cursor.obj \ - $(MSWDIR)\data.obj \ - $(MSWDIR)\dc.obj \ - $(MSWDIR)\dcmemory.obj \ - $(MSWDIR)\dcclient.obj \ - $(MSWDIR)\dcprint.obj \ - $(MSWDIR)\dcscreen.obj \ - $(MSWDIR)\dde.obj \ - $(MSWDIR)\dialog.obj \ - $(MSWDIR)\dib.obj \ - $(MSWDIR)\dirdlg.obj \ - $(MSWDIR)\filedlg.obj \ - $(MSWDIR)\font.obj \ - $(MSWDIR)\fontdlg.obj \ - $(MSWDIR)\frame.obj \ - $(MSWDIR)\gaugemsw.obj \ - $(MSWDIR)\gdiobj.obj \ - $(MSWDIR)\helpwin.obj \ - $(MSWDIR)\icon.obj \ - $(MSWDIR)\imaglist.obj \ - $(MSWDIR)\joystick.obj \ - $(MSWDIR)\listbox.obj \ - $(MSWDIR)\listctrl.obj \ - $(MSWDIR)\main.obj \ - $(MSWDIR)\mdi.obj \ - $(MSWDIR)\menu.obj\ - $(MSWDIR)\menuitem.obj \ - $(MSWDIR)\metafile.obj \ - $(MSWDIR)\minifram.obj \ - $(MSWDIR)\msgdlg.obj \ - $(MSWDIR)\nativdlg.obj \ - $(MSWDIR)\ownerdrw.obj \ - $(MSWDIR)\palette.obj \ - $(MSWDIR)\pen.obj \ - $(MSWDIR)\penwin.obj \ - $(MSWDIR)\printdlg.obj \ - $(MSWDIR)\printwin.obj \ - $(MSWDIR)\radiobox.obj \ - $(MSWDIR)\radiobut.obj \ - $(MSWDIR)\region.obj \ - $(MSWDIR)\scrolbar.obj \ - $(MSWDIR)\settings.obj \ - $(MSWDIR)\slidrmsw.obj \ - $(MSWDIR)\spinbutt.obj \ - $(MSWDIR)\statbmp.obj \ - $(MSWDIR)\statbox.obj \ - $(MSWDIR)\stattext.obj \ - $(MSWDIR)\tbarmsw.obj \ - $(MSWDIR)\textctrl.obj \ - $(MSWDIR)\timer.obj \ - $(MSWDIR)\treectrl.obj \ - $(MSWDIR)\utils.obj \ - $(MSWDIR)\utilsexc.obj \ - $(MSWDIR)\wave.obj \ - $(MSWDIR)\window.obj \ - $(OLEDIR)\droptgt.obj \ - $(OLEDIR)\dropsrc.obj \ - $(OLEDIR)\dataobj.obj \ - $(OLEDIR)\oleutils.obj \ - $(OLEDIR)\uuid.obj - -# $(MSWDIR)\registry.obj \ - -OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) - -# Normal, static library -all: $(DUMMYOBJ) $(WXDIR)\lib\wx1.lib $(WXDIR)\lib\wx2.lib $(WXDIR)\lib\wx3.lib - - -#$(WXDIR)\lib\wx.lib: dummy.obj $(OBJECTS) $(PERIPH_LIBS) -# -erase $(LIBTARGET) -# lib /PAGESIZE:128 @<< -#$(LIBTARGET) -#y -#$(OBJECTS) $(PERIPH_LIBS) -#nul -#; -#<< - -$(WXDIR)\lib\wx1.lib: $(COMMONOBJS) $(PERIPH_LIBS) - -erase $(WXDIR)\lib\wx1.lib - lib /PAGESIZE:128 @<< -$(WXDIR)\lib\wx1.lib -y -$(COMMONOBJS) $(PERIPH_LIBS) -nul -; -<< - -$(WXDIR)\lib\wx2.lib: $(GENERICOBJS) - -erase $(WXDIR)\lib\wx2.lib - lib /PAGESIZE:128 @<< -$(WXDIR)\lib\wx2.lib -y -$(GENERICOBJS) -nul -; -<< - -$(WXDIR)\lib\wx3.lib: $(MSWOBJS) - -erase $(WXDIR)\lib\wx3.lib - lib /PAGESIZE:128 @<< -$(WXDIR)\lib\wx3.lib -y -$(MSWOBJS) -nul -; -<< - -######################################################## -# Windows-specific objects - -dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h - cl @<< - cl $(CPPFLAGS) /YcWX/WXPREC.H $(DEBUG_FLAGS) /c /Tp $*.$(SRCSUFF) -<< - -#dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h -# cl $(CPPFLAGS) /YcWX/WXPREC.H $(DEBUG_FLAGS) /c /Tp $*.$(SRCSUFF) - -dummydll.obj: dummydll.$(SRCSUFF) $(WXDIR)\include\wx\wx.h - cl @<< -$(CPPFLAGS) /YcWX/WXPREC.H /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/accel.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/app.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/bitmap.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/bmpbuttn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/brush.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/button.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/choice.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/checkbox.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/checklst.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/clipbrd.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/colordlg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/colour.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/combobox.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/control.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/curico.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/cursor.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/data.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/dc.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/dde.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/dcmemory.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/dcclient.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/dcprint.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/dcscreen.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/dialog.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/dib.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/dirdlg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/filedlg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/font.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/fontdlg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/frame.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/gaugemsw.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/gdiobj.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/helpwin.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/icon.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/imaglist.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/joystick.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/listbox.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/listctrl.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/main.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/mdi.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/menu.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/menuitem.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/metafile.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/minifram.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/msgdlg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/nativdlg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/ownerdrw.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/palette.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/pen.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/penwin.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/printdlg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/printwin.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/radiobox.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/radiobut.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/region.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/registry.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/scrolbar.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/settings.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/slidrmsw.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/spinbutt.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/statbmp.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/statbox.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/stattext.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/tbarmsw.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/textctrl.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/timer.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/treectrl.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/utils.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/utilsexc.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/wave.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/window.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(OLEDIR)/droptgt.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(OLEDIR)/dropsrc.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(OLEDIR)/dataobj.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(OLEDIR)/oleutils.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(OLEDIR)/uuid.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -######################################################## -# Common objects (always compiled) - -$(COMMDIR)/config.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/cmndata.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/docview.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/docmdi.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/dynarray.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/event.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/file.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/fileconf.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/filefn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/framecmn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/gdicmn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/helpbase.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/intl.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/ipcbase.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/layout.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/log.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/memory.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/module.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/object.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/odbc.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/postscrp.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/process.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/prntbase.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/resource.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/tbarbase.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/tbarsmpl.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/textfile.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/timercmn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/utilscmn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/validate.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/valtext.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/date.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/wxexpr.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/hash.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/list.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/string.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/matrix.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/wxstrgnu/wxstrgnu.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS2) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/wxstrgnu/wxregex.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS2) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/time.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/stream.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/fstream.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/mstream.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/zstream.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/datstrm.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/extended.obj: $*.c - cl @<< -$(CPPFLAGS2) /Fo$@ /c /Tp $*.c -<< - -$(COMMDIR)/wincmn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(COMMDIR)/y_tab.obj: $*.c $(COMMDIR)/lex_yy.c - cl @<< -$(CPPFLAGS2) -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@ /I ..\common /c $*.c -<< - -$(COMMDIR)/y_tab.c: $(COMMDIR)/dosyacc.c - copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c - -$(COMMDIR)/lex_yy.c: $(COMMDIR)/doslex.c - copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c - -######################################################## -# Generic objects (not always compiled, depending on -# whether platforms have native implementations) - -$(GENDIR)/choicdgg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(GENDIR)/colrdlgg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(GENDIR)/fontdlgg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(GENDIR)/gridg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(GENDIR)/helpxlp.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(GENDIR)/msgdlgg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(GENDIR)/panelg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(GENDIR)/printps.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(GENDIR)/prntdlgg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(GENDIR)/scrolwin.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(GENDIR)/splitter.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(GENDIR)/statusbr.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(GENDIR)/tabg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(GENDIR)/textdlgg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(OBJECTS): $(WXDIR)/include/wx/setup.h - -# Peripheral components - -xpm: - cd $(WXDIR)\contrib\wxxpm - nmake -f makefile.dos FINAL=$(FINAL) - cd $(WXDIR)\src\msw - -clean_xpm: - cd $(WXDIR)\contrib\wxxpm - nmake -f makefile.dos clean - cd $(WXDIR)\src\msw - -clean: $(PERIPH_CLEAN_TARGET) - -erase *.obj - -erase ..\lib\*.lib - -erase *.pdb - -erase *.sbr - -erase *.pch - cd $(WXDIR)\src\generic - -erase *.pdb - -erase *.sbr - -erase *.obj - cd $(WXDIR)\src\common - -erase *.pdb - -erase *.sbr - -erase *.obj - cd $(WXDIR)\src\msw\ole - -erase *.pdb - -erase *.sbr - -erase *.obj - cd $(WXDIR)\src\msw - -cleanall: clean - -# Making documents -docs: hlp -hlp: wxhlp faqhlp refhlp -wxhlp: $(DOCDIR)/winhelp/wx.hlp -faqhlp: $(DOCDIR)/winhelp/faq.hlp -refhlp: $(DOCDIR)/winhelp/techref.hlp -rtf: $(DOCDIR)/winhelp/wx.rtf -faqrtf: $(DOCDIR)/winhelp/faq.rtf -html: wxhtml faqhtml -wxhtml: $(DOCDIR)\html\wx\wx.htm -faqhtml: $(DOCDIR)\html\faq\faq.htm -ps: faqps wxps referencps -wxps: $(WXDIR)\docs\ps\wx.ps -faqps: $(WXDIR)\docs\ps\faq.ps -referencps: $(WXDIR)\docs\ps\referenc.ps - -alldocs: allhlp allhtml allps - -allhlp: wxhlp faqhlp - nmake -f makefile.dos hlp - cd $(WXDIR)\utils\wxprop\src - nmake -f makefile.dos hlp - cd $(WXDIR)\utils\dialoged\src - nmake -f makefile.dos hlp - cd $(THISDIR) - -# cd $(WXDIR)\utils\wxhelp\src -# nmake -f makefile.dos hlp -# cd $(WXDIR)\utils\wxhelp2\src -# nmake -f makefile.dos hlp -# cd $(WXDIR)\utils\prologio\src -# nmake -f makefile.dos hlp -# cd $(WXDIR)\utils\tex2rtf\src -# nmake -f makefile.dos hlp -# cd $(WXDIR)\utils\wxgraph\src -# nmake -f makefile.dos hlp -# cd $(WXDIR)\utils\wxchart\src -# nmake -f makefile.dos hlp -# cd $(WXDIR)\utils\wxtree\src -# nmake -f makefile.dos hlp -# cd $(WXDIR)\utils\wxbuild\src -# nmake -f makefile.dos hlp -# cd $(WXDIR)\utils\wxgrid\src -# nmake -f makefile.dos hlp -# cd $(WXDIR)\utils\wxtab\src -# nmake -f makefile.dos hlp - -# cd $(WXDIR)\utils\wxclips\src -# nmake -f makefile.dos hlp -# cd $(WXDIR)\utils\clips2c\src -# nmake -f makefile.dos hlp - -allhtml: wxhtml faqhtml - nmake -f makefile.dos html - cd $(WXDIR)\utils\wxprop\src - cd $(THISDIR) - -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\dialoged\src -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\hytext\src -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\wxhelp\src -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\wxhelp2\src -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\prologio\src -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\tex2rtf\src -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\wxgraph\src -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\wxchart\src -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\wxtree\src -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\wxtab\src -# nmake -f makefile.dos html - -# cd $(WXDIR)\utils\wxclips\src -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\clips2c\src -# nmake -f makefile.dos html - -allps: wxps faqps - nmake -f makefile.dos ps - cd $(WXDIR)\utils\wxhelp\src - nmake -f makefile.dos ps - cd $(WXDIR)\utils\wxhelp2\src - nmake -f makefile.dos ps - cd $(WXDIR)\utils\tex2rtf\src - nmake -f makefile.dos ps - cd $(WXDIR)\utils\wxgraph\src - nmake -f makefile.dos ps - cd $(WXDIR)\utils\wxchart\src - nmake -f makefile.dos ps - cd $(WXDIR)\utils\wxtree\src - nmake -f makefile.dos ps - cd $(WXDIR)\utils\wxprop\src - nmake -f makefile.dos ps - cd $(WXDIR)\utils\dialoged\src - nmake -f makefile.dos ps - cd $(THISDIR) - -# cd $(WXDIR)\utils\wxtab\src -# nmake -f makefile.dos ps -# cd $(WXDIR)\utils\prologio\src -# nmake -f makefile.dos ps -# cd $(WXDIR)\utils\wxclips\src -# nmake -f makefile.dos ps -# cd $(WXDIR)\utils\clips2c\src -# nmake -f makefile.dos ps - -$(DOCDIR)/winhelp/wx.hlp: $(DOCDIR)/latex/wx/wx.rtf $(DOCDIR)/latex/wx/wx.hpj - cd $(DOCDIR)/latex/wx - -erase wx.ph - hc wx - move wx.hlp $(DOCDIR)\winhelp\wx.hlp - move wx.cnt $(DOCDIR)\winhelp\wx.cnt - cd $(THISDIR) - -$(DOCDIR)/winhelp/faq.hlp: $(DOCDIR)/latex/faq/faq.rtf $(DOCDIR)/latex/faq/faq.hpj - cd $(DOCDIR)/latex/faq - -erase faq.ph - hc faq - move faq.hlp $(DOCDIR)\winhelp\faq.hlp - move faq.cnt $(DOCDIR)\winhelp\faq.cnt - cd $(THISDIR) - -$(DOCDIR)/winhelp/techref.hlp: $(DOCDIR)/latex/techref/techref.rtf $(DOCDIR)/latex/techref/techref.hpj - cd $(DOCDIR)/latex/techref - -erase techref.ph - hc techref - move techref.hlp $(DOCDIR)\winhelp\techref.hlp - move techref.cnt $(DOCDIR)\winhelp\techref.cnt - cd $(THISDIR) - -$(DOCDIR)/latex/wx/wx.rtf: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/manual.tex - cd $(DOCDIR)\latex\wx - -start /w tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/latex/wx/wx.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)/latex/faq/faq.rtf: $(DOCDIR)/latex/faq/faq.tex - cd $(DOCDIR)\latex\faq - -start /w tex2rtf $(DOCDIR)/latex/faq/faq.tex $(DOCDIR)/latex/faq/faq.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)/latex/techref/techref.rtf: $(DOCDIR)/latex/techref/techref.tex - cd $(DOCDIR)\latex\techref - -start /w tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/latex/techref/techref.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)\html\wx\wx.htm: $(DOCDIR)\latex\wx\classes.tex $(DOCDIR)\latex\wx\body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)\latex\wx\manual.tex - cd $(DOCDIR)\latex\wx - -mkdir $(DOCDIR)\html\wx - -start /w tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html -macros $(DOCDIR)\tex2rtf.ini - -erase $(DOCDIR)\html\wx\*.con - -erase $(DOCDIR)\html\wx\*.ref - -erase $(DOCDIR)\latex\wx\*.con - -erase $(DOCDIR)\latex\wx\*.ref - cd $(THISDIR) - -$(DOCDIR)\html\faq\faq.htm: $(DOCDIR)\latex\faq\faq.tex - cd $(DOCDIR)\latex\faq - -mkdir $(DOCDIR)\html\faq - -start /w tex2rtf $(DOCDIR)\latex\faq\faq.tex $(DOCDIR)\html\faq\faq.htm -twice -html -macros $(DOCDIR)\tex2rtf.ini - -erase $(DOCDIR)\html\faq\*.con - -erase $(DOCDIR)\html\faq\*.ref - -erase $(DOCDIR)\latex\faq\*.con - -erase $(DOCDIR)\latexfaq\*.ref - cd $(THISDIR) - -$(WXDIR)\docs\latex\wx\manual.dvi: $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/manual.tex - cd $(WXDIR)\docs\latex\wx - -latex manual - -latex manual - -makeindx manual - -bibtex manual - -latex manual - -latex manual - cd $(THISDIR) - -$(WXDIR)\docs\ps\wx.ps: $(WXDIR)\docs\latex\wx\manual.dvi - cd $(WXDIR)\docs\latex\wx - -dvips32 -o wx.ps manual - move wx.ps $(WXDIR)\docs\ps\wx.ps - cd $(THISDIR) - -$(WXDIR)\docs\latex\wx\referenc.dvi: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/referenc.tex - cd $(WXDIR)\docs\latex\wx - -latex referenc - -latex referenc - -makeindx referenc - -bibtex referenc - -latex referenc - -latex referenc - cd $(THISDIR) - -$(WXDIR)\docs\ps\referenc.ps: $(WXDIR)\docs\latex\wx\referenc.dvi - cd $(WXDIR)\docs\latex\wx - -dvips32 -o referenc.ps referenc - move referenc.ps $(WXDIR)\docs\ps\referenc.ps - cd $(THISDIR) - -$(WXDIR)\docs\latex\faq\faq.dvi: $(DOCDIR)/latex/faq/faq.tex - cd $(WXDIR)\docs\latex\faq - -latex faq - -latex faq - -makeindx faq - -latex faq - -latex faq - cd $(THISDIR) - -$(WXDIR)\docs\ps\faq.ps: $(WXDIR)\docs\latex\faq\faq.dvi - cd $(WXDIR)\docs\latex\faq - -dvips32 -o faq.ps faq - move faq.ps $(WXDIR)\docs\ps\faq.ps - cd $(THISDIR) - - diff --git a/src/msw/makefile.g95 b/src/msw/makefile.g95 deleted file mode 100644 index 5db4dfeeb6..0000000000 --- a/src/msw/makefile.g95 +++ /dev/null @@ -1,318 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "@(#)makefile.unx 1.2 5/9/94" -# -# Makefile for libwx.a - -# Replace this with your own path if necessary -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -# IMPORTANT: if you want to link in subsidiary libraries, -# required for some optional parts of wxWindows, you must -# set EXTRATARGETS and EXTRAOBJS to match the settings in wx_setup.h. -# Having done this, you won't have to worry about linking them -# into each application. -# -# Here's the full list. -# prologio: Required if using the wxWindows resource facility -# USE_WX_RESOURCES should be 1 -# xmgauge: Gauge class (required for Motif only) -# USE_GAUGE should be 1 -# xpm: XPM pixmap support -# USE_XPM_IN_X should be 1 -# image: GIF, BMP image reading -# USE_IMAGE_LOADING_IN_X should be 1 -# wxstring: string class -# USE_GNU_WXSTRING should be 1 -# -# Unfortunately, 'ar' doesn't like combining objects and libraries, -# so we must identify all the objects from the subordinate libraries. Yuck! -XPMSRC=../../contrib/wxxpm/objects$(GUISUFFIX) -XPMOBJS=$(XPMSRC)/crbuffri.$(OBJSUFF) $(XPMSRC)/crbuffrp.$(OBJSUFF) $(XPMSRC)/crdatfri.$(OBJSUFF) $(XPMSRC)/crdatfrp.$(OBJSUFF)\ - $(XPMSRC)/create.$(OBJSUFF) $(XPMSRC)/crifrbuf.$(OBJSUFF) $(XPMSRC)/crifrdat.$(OBJSUFF) $(XPMSRC)/crpfrbuf.$(OBJSUFF) $(XPMSRC)/crpfrdat.$(OBJSUFF)\ - $(XPMSRC)/data.$(OBJSUFF) $(XPMSRC)/hashtab.$(OBJSUFF) $(XPMSRC)/misc.$(OBJSUFF) $(XPMSRC)/parse.$(OBJSUFF) $(XPMSRC)/rdftodat.$(OBJSUFF)\ - $(XPMSRC)/rdftoi.$(OBJSUFF) $(XPMSRC)/rdftop.$(OBJSUFF) $(XPMSRC)/rgb.$(OBJSUFF) $(XPMSRC)/scan.$(OBJSUFF) $(XPMSRC)/simx.$(OBJSUFF)\ - $(XPMSRC)/wrffrdat.$(OBJSUFF) $(XPMSRC)/wrffri.$(OBJSUFF) $(XPMSRC)/wrffrp.$(OBJSUFF) - -# Subordinate library possibilities - -EXTRAOBJS= - -GENDIR=../generic -COMMDIR=../common -OLEDIR=ole -MSWDIR=. - -GENERICOBJDIR=../generic/$(OBJDIR) -COMMOBJDIR=../common/$(OBJDIR) -OLEOBJDIR=ole/$(OBJDIR) -MSWDIR=$(OBJDIR) - -DOCDIR = $(WXDIR)\docs - -GENERICOBJS= \ - $(GENDIR)/choicdgg.$(OBJSUFF) \ - $(GENDIR)/colrdlgg.$(OBJSUFF) \ - $(GENDIR)/fontdlgg.$(OBJSUFF) \ - $(GENDIR)/gridg.$(OBJSUFF) \ - $(GENDIR)/helpxlp.$(OBJSUFF) \ - $(GENDIR)/msgdlgg.$(OBJSUFF) \ - $(GENDIR)/panelg.$(OBJSUFF) \ - $(GENDIR)/printps.$(OBJSUFF) \ - $(GENDIR)/prntdlgg.$(OBJSUFF) \ - $(GENDIR)/scrolwin.$(OBJSUFF) \ - $(GENDIR)/splitter.$(OBJSUFF) \ - $(GENDIR)/statusbr.$(OBJSUFF) \ - $(GENDIR)/tabg.$(OBJSUFF) \ - $(GENDIR)/textdlgg.$(OBJSUFF) - -COMMONOBJS = \ - $(COMMDIR)/config.$(OBJSUFF) \ - $(COMMDIR)/cmndata.$(OBJSUFF) \ - $(COMMDIR)/docview.$(OBJSUFF) \ - $(COMMDIR)/docmdi.$(OBJSUFF) \ - $(COMMDIR)/dynarray.$(OBJSUFF) \ - $(COMMDIR)/event.$(OBJSUFF) \ - $(COMMDIR)/file.$(OBJSUFF) \ - $(COMMDIR)/fileconf.$(OBJSUFF) \ - $(COMMDIR)/filefn.$(OBJSUFF) \ - $(COMMDIR)/framecmn.$(OBJSUFF) \ - $(COMMDIR)/gdicmn.$(OBJSUFF) \ - $(COMMDIR)/helpbase.$(OBJSUFF) \ - $(COMMDIR)/intl.$(OBJSUFF) \ - $(COMMDIR)/layout.$(OBJSUFF) \ - $(COMMDIR)/log.$(OBJSUFF) \ - $(COMMDIR)/memory.$(OBJSUFF) \ - $(COMMDIR)/module.$(OBJSUFF) \ - $(COMMDIR)/object.$(OBJSUFF) \ - $(COMMDIR)/odbc.$(OBJSUFF) \ - $(COMMDIR)/postscrp.$(OBJSUFF) \ - $(COMMDIR)/process.$(OBJSUFF) \ - $(COMMDIR)/prntbase.$(OBJSUFF) \ - $(COMMDIR)/resource.$(OBJSUFF) \ - $(COMMDIR)/tbarbase.$(OBJSUFF) \ - $(COMMDIR)/tbarsmpl.$(OBJSUFF) \ - $(COMMDIR)/textfile.$(OBJSUFF) \ - $(COMMDIR)/timercmn.$(OBJSUFF) \ - $(COMMDIR)/utilscmn.$(OBJSUFF) \ - $(COMMDIR)/validate.$(OBJSUFF) \ - $(COMMDIR)/valtext.$(OBJSUFF) \ - $(COMMDIR)/date.$(OBJSUFF) \ - $(COMMDIR)/wxexpr.$(OBJSUFF) \ - $(COMMDIR)/hash.$(OBJSUFF) \ - $(COMMDIR)/list.$(OBJSUFF) \ - $(COMMDIR)/string.$(OBJSUFF) \ - $(COMMDIR)/time.$(OBJSUFF) \ - $(COMMDIR)/y_tab.$(OBJSUFF) \ - $(COMMDIR)/stream.$(OBJSUFF) \ - $(COMMDIR)/fstream.$(OBJSUFF) \ - $(COMMDIR)/mstream.$(OBJSUFF) \ - $(COMMDIR)/zstream.$(OBJSUFF) \ - $(COMMDIR)/datstrm.$(OBJSUFF) \ - $(COMMDIR)/extended.$(OBJSUFF) \ - $(COMMDIR)/wincmn.$(OBJSUFF) - -MSWOBJS = \ - accel.$(OBJSUFF) \ - app.$(OBJSUFF) \ - bitmap.$(OBJSUFF) \ - bmpbuttn.$(OBJSUFF) \ - brush.$(OBJSUFF) \ - button.$(OBJSUFF) \ - checkbox.$(OBJSUFF) \ - checklst.$(OBJSUFF) \ - choice.$(OBJSUFF) \ - clipbrd.$(OBJSUFF) \ - colordlg.$(OBJSUFF) \ - colour.$(OBJSUFF) \ - combobox.$(OBJSUFF) \ - control.$(OBJSUFF) \ - curico.$(OBJSUFF) \ - cursor.$(OBJSUFF) \ - data.$(OBJSUFF) \ - dc.$(OBJSUFF) \ - dcmemory.$(OBJSUFF) \ - dcclient.$(OBJSUFF) \ - dcprint.$(OBJSUFF) \ - dcscreen.$(OBJSUFF) \ - dde.$(OBJSUFF) \ - dialog.$(OBJSUFF) \ - dib.$(OBJSUFF) \ - dirdlg.$(OBJSUFF) \ - filedlg.$(OBJSUFF) \ - font.$(OBJSUFF) \ - fontdlg.$(OBJSUFF) \ - frame.$(OBJSUFF) \ - gaugemsw.$(OBJSUFF) \ - gauge95.$(OBJSUFF) \ - gdiobj.$(OBJSUFF) \ - helpwin.$(OBJSUFF) \ - icon.$(OBJSUFF) \ - imaglist.$(OBJSUFF) \ - joystick.$(OBJSUFF) \ - listbox.$(OBJSUFF) \ - listctrl.$(OBJSUFF) \ - main.$(OBJSUFF) \ - mdi.$(OBJSUFF) \ - menu.$(OBJSUFF) \ - menuitem.$(OBJSUFF) \ - metafile.$(OBJSUFF) \ - minifram.$(OBJSUFF) \ - msgdlg.$(OBJSUFF) \ - nativdlg.$(OBJSUFF) \ - notebook.$(OBJSUFF) \ - ownerdrw.$(OBJSUFF) \ - palette.$(OBJSUFF) \ - pen.$(OBJSUFF) \ - penwin.$(OBJSUFF) \ - printdlg.$(OBJSUFF) \ - printwin.$(OBJSUFF) \ - radiobox.$(OBJSUFF) \ - radiobut.$(OBJSUFF) \ - region.$(OBJSUFF) \ - registry.$(OBJSUFF) \ - regconf.$(OBJSUFF) \ - scrolbar.$(OBJSUFF) \ - settings.$(OBJSUFF) \ - slidrmsw.$(OBJSUFF) \ - slider95.$(OBJSUFF) \ - spinbutt.$(OBJSUFF) \ - statbmp.$(OBJSUFF) \ - statbox.$(OBJSUFF) \ - statbr95.$(OBJSUFF) \ - stattext.$(OBJSUFF) \ - tabctrl.$(OBJSUFF) \ - taskbar.$(OBJSUFF) \ - tbar95.$(OBJSUFF) \ - tbarmsw.$(OBJSUFF) \ - textctrl.$(OBJSUFF) \ - thread.$(OBJSUFF) \ - timer.$(OBJSUFF) \ - treectrl.$(OBJSUFF) \ - utils.$(OBJSUFF) \ - utilsexc.$(OBJSUFF) \ - wave.$(OBJSUFF) \ - window.$(OBJSUFF) \ - $(OLEDIR)/droptgt.$(OBJSUFF) \ - $(OLEDIR)/dropsrc.$(OBJSUFF) \ - $(OLEDIR)/dataobj.$(OBJSUFF) \ - $(OLEDIR)/oleutils.$(OBJSUFF) \ - $(OLEDIR)/uuid.$(OBJSUFF) - -OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) - -all: $(OBJECTS) $(WXLIB) - -base: - cd $(WXDIR)/src/common; $(MAKE) -f makefile.g95 GUI=$(GUI) GUISUFFIX=$(GUISUFFIX) CC=$(CC)\ - OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' DEBUGFLAGS='$(DEBUGFLAGS)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' - - -$(WXLIB): $(OBJECTS) $(EXTRAOBJS) - ar $(AROPTIONS) $@ $(EXTRAOBJS) $(OBJECTS) - $(RANLIB) $@ - -#$(MSWOBJDIR): -# mkdir $(OBJDIR) - -#$(COMMOBJDIR): -# mkdir $(COMMDIR)/$(OBJDIR) - -#$(GENERICOBJDIR): -# mkdir $(GENDIR)/$(OBJDIR) - -$(OBJECTS): $(WXINC)/wx/defs.h $(WXINC)/wx/object.h $(WXINC)/wx/setup.h - -$(COMMDIR)/y_tab.$(OBJSUFF): $(COMMDIR)/y_tab.c $(COMMDIR)/lex_yy.c - $(CCLEX) -c $(CPPFLAGS) -o $@ $(COMMDIR)/y_tab.c - -# Replace lex with flex if you run into compilation -# problems with lex_yy.c. See also note about LEX_SCANNER -# above. -$(COMMDIR)/lex_yy.c: $(COMMDIR)/lexer.l - $(LEX) $(COMMDIR)/lexer.l > $(COMMDIR)/lex_yy.c - -# sed -e "s/BUFSIZ/5000/g" < lex.yy.c | \ -# sed -e "s/yyoutput(c)/void yyoutput(c)/g" | \ -# sed -e "s/YYLMAX 200/YYLMAX 5000/g" > lex_yy.c -# rm -f lex.yy.c - -# Replace yacc with bison if you run into compilation -# problems with y_tab.c. -$(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y - $(YACC) -o $(COMMDIR)/y_tab.c $(COMMDIR)/parser.y - -# mv y.tab.c $(COMMDIR)/y_tab.c - - -# Extra targets -prologio: - cd $(WXDIR)/utils/prologio/src ; $(MAKE) -f makefile.g95 - cd $(WXDIR)/src/msw - -clean_proio: - cd $(WXDIR)/utils/prologio/src; $(MAKE) -f makefile.g95 clean - cd $(WXDIR)/src/msw - -makedib: - cd $(WXDIR)/src/msw/dib ; $(MAKE) -f makefile.g95 - cd $(WXDIR)/src/msw - -clean_dib: - cd $(WXDIR)/src/msw/dib; $(MAKE) -f makefile.g95 clean - cd $(WXDIR)/src/msw - -gauge: - cd $(WXDIR)/src/msw/gauge; $(MAKE) -f makefile.g95 - cd $(WXDIR)/src/msw - -clean_gauge: - cd $(WXDIR)/src/msw/gauge; $(MAKE) -f makefile.g95 clean - cd $(WXDIR)/src/msw - -wxstring: - cd $(WXDIR)/contrib/wxstring; $(MAKE) -f makefile.g95 OPTIONS="$(OPTIONS)" DEBUG="$(DEBUG)" - cd $(WXDIR)/src/msw - -clean_wxstring: - cd $(WXDIR)/contrib/wxstring; $(MAKE) -f makefile.g95 clean - cd $(WXDIR)/src/msw - -itsy: - cd $(WXDIR)/src/msw/itsybits; $(MAKE) -f makefile.g95 - cd $(WXDIR)/src/msw - -clean_itsy: - cd $(WXDIR)/contrib/itsybits; $(MAKE) -f makefile.g95 clean - cd $(WXDIR)/src/msw - -rcparser: - cd $(WXDIR)/utils/rcparser/src; $(MAKE) -f makefile.g95 - cd $(WXDIR)/src/msw - -clean_rcp: - cd $(WXDIR)/utils/rcparser/src; $(MAKE) -f makefile.g95 clean - cd $(WXDIR)/src/msw - -# +++start steve161(09.04.1995): added for wxString in \contrib\wxstring -wxstring_ol: - cd ../../contrib/wxstring; $(MAKE) -f makefile.unx xview -wxstring_motif: - cd ../../contrib/wxstring; $(MAKE) -f makefile.unx motif -wxstring_hp: - cd ../../contrib/wxstring; $(MAKE) -f makefile.unx hp - -clean: - rm -f $(OBJECTS) $(EXTRAOBJS) ../common/y_tab.c ../common/lex_yy.c $(WXDIR)/lib/libwx$(GUISUFFIX).a core - -cleanall: clean - diff --git a/src/msw/makefile.nt b/src/msw/makefile.nt deleted file mode 100644 index 90c5eabfb6..0000000000 --- a/src/msw/makefile.nt +++ /dev/null @@ -1,1435 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1997 -# Updated: -# Copyright: (c) 1997, Julian Smart -# -# "%W% %G%" -# -# Makefile : Builds wxWindows library wx.lib for VC++ (32-bit) -# Arguments: -# -# FINAL=1 argument to nmake to build version with no debugging info. -# dll builds a library (wxdll.lib) suitable for creating DLLs -# * Note that the dll target is experimental - see docs/dll.txt. -# -!include <..\ntwxwin.mak> - -THISDIR=$(WXWIN)\src\msw - -!if "$(WXMAKINGDLL)" == "1" -LIBTARGET=$(WXDIR)\lib\wx200.dll -DUMMYOBJ=dummydll.obj -!else -LIBTARGET=$(WXLIB) -DUMMYOBJ=dummy.obj -!endif - -# Please set these according to the settings in wx_setup.h, so we can include -# the appropriate libraries in wx.lib - -# This one overrides the others, to be consistent with the settings in wx_setup.h -MINIMAL_WXWINDOWS_SETUP=0 - -USE_XPM_IN_MSW=0 - -!if "$(MINIMAL_WXWINDOWS_SETUP)" == "1" -USE_XPM_IN_MSW=0 -!endif - -PERIPH_LIBS= -PERIPH_TARGET= -PERIPH_CLEAN_TARGET= - -!if "$(USE_XPM_IN_MSW)" == "1" -PERIPH_LIBS=$(WXDIR)\contrib\wxxpm\xpm.lib $(PERIPH_LIBS) -PERIPH_TARGET=xpm $(PERIPH_TARGET) -PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET) -!endif - -GENDIR=..\generic -COMMDIR=..\common -OLEDIR=ole -MSWDIR=. - -DOCDIR = $(WXDIR)\docs - -GENERICOBJS= \ - $(GENDIR)\choicdgg.obj \ - $(GENDIR)\colrdlgg.obj \ - $(GENDIR)\fontdlgg.obj \ - $(GENDIR)\gridg.obj \ - $(GENDIR)\helpxlp.obj \ - $(GENDIR)\msgdlgg.obj \ - $(GENDIR)\panelg.obj \ - $(GENDIR)\printps.obj \ - $(GENDIR)\prntdlgg.obj \ - $(GENDIR)\scrolwin.obj \ - $(GENDIR)\splitter.obj \ - $(GENDIR)\statusbr.obj \ - $(GENDIR)\tabg.obj \ - $(GENDIR)\textdlgg.obj - -COMMONOBJS = \ - $(COMMDIR)\cmndata.obj \ - $(COMMDIR)\config.obj \ - $(COMMDIR)\db.obj \ - $(COMMDIR)\dbtable.obj \ - $(COMMDIR)\docview.obj \ - $(COMMDIR)\docmdi.obj \ - $(COMMDIR)\dynarray.obj \ - $(COMMDIR)\event.obj \ - $(COMMDIR)\file.obj \ - $(COMMDIR)\filefn.obj \ - $(COMMDIR)\fileconf.obj \ - $(COMMDIR)\framecmn.obj \ - $(COMMDIR)\gdicmn.obj \ - $(COMMDIR)\intl.obj \ - $(COMMDIR)\ipcbase.obj \ - $(COMMDIR)\helpbase.obj \ - $(COMMDIR)\layout.obj \ - $(COMMDIR)\log.obj \ - $(COMMDIR)\memory.obj \ - $(COMMDIR)\module.obj \ - $(COMMDIR)\odbc.obj \ - $(COMMDIR)\object.obj \ - $(COMMDIR)\postscrp.obj \ - $(COMMDIR)\prntbase.obj \ - $(COMMDIR)\resource.obj \ - $(COMMDIR)\tbarbase.obj \ - $(COMMDIR)\tbarsmpl.obj \ - $(COMMDIR)\textfile.obj \ - $(COMMDIR)\timercmn.obj \ - $(COMMDIR)\utilscmn.obj \ - $(COMMDIR)\validate.obj \ - $(COMMDIR)\valtext.obj \ - $(COMMDIR)\date.obj \ - $(COMMDIR)\hash.obj \ - $(COMMDIR)\list.obj \ - $(COMMDIR)\string.obj \ - $(COMMDIR)\time.obj \ - $(COMMDIR)\wxexpr.obj \ - $(COMMDIR)\y_tab.obj \ - $(COMMDIR)\extended.obj \ - $(COMMDIR)\process.obj \ - $(COMMDIR)\fstream.obj \ - $(COMMDIR)\mstream.obj \ - $(COMMDIR)\zstream.obj \ - $(COMMDIR)\stream.obj \ - $(COMMDIR)\datstrm.obj \ - $(COMMDIR)\wincmn.obj - -MSWOBJS = \ - $(MSWDIR)\accel.obj \ - $(MSWDIR)\app.obj \ - $(MSWDIR)\bitmap.obj \ - $(MSWDIR)\bmpbuttn.obj \ - $(MSWDIR)\brush.obj \ - $(MSWDIR)\button.obj \ - $(MSWDIR)\checkbox.obj \ - $(MSWDIR)\checklst.obj \ - $(MSWDIR)\choice.obj \ - $(MSWDIR)\clipbrd.obj \ - $(MSWDIR)\colordlg.obj \ - $(MSWDIR)\colour.obj \ - $(MSWDIR)\combobox.obj \ - $(MSWDIR)\control.obj \ - $(MSWDIR)\curico.obj \ - $(MSWDIR)\cursor.obj \ - $(MSWDIR)\data.obj \ - $(MSWDIR)\dc.obj \ - $(MSWDIR)\dcmemory.obj \ - $(MSWDIR)\dcclient.obj \ - $(MSWDIR)\dcprint.obj \ - $(MSWDIR)\dcscreen.obj \ - $(MSWDIR)\dde.obj \ - $(MSWDIR)\dialog.obj \ - $(MSWDIR)\dib.obj \ - $(MSWDIR)\dibutils.obj \ - $(MSWDIR)\dirdlg.obj \ - $(MSWDIR)\filedlg.obj \ - $(MSWDIR)\font.obj \ - $(MSWDIR)\fontdlg.obj \ - $(MSWDIR)\frame.obj \ - $(MSWDIR)\gauge95.obj \ - $(MSWDIR)\gaugemsw.obj \ - $(MSWDIR)\gdiobj.obj \ - $(MSWDIR)\helpwin.obj \ - $(MSWDIR)\icon.obj \ - $(MSWDIR)\imaglist.obj \ - $(MSWDIR)\iniconf.obj \ - $(MSWDIR)\joystick.obj \ - $(MSWDIR)\listbox.obj \ - $(MSWDIR)\listctrl.obj \ - $(MSWDIR)\main.obj \ - $(MSWDIR)\mdi.obj \ - $(MSWDIR)\menu.obj \ - $(MSWDIR)\menuitem.obj \ - $(MSWDIR)\metafile.obj \ - $(MSWDIR)\minifram.obj \ - $(MSWDIR)\msgdlg.obj \ - $(MSWDIR)\nativdlg.obj \ - $(MSWDIR)\notebook.obj \ - $(MSWDIR)\ownerdrw.obj \ - $(MSWDIR)\palette.obj \ - $(MSWDIR)\pen.obj \ - $(MSWDIR)\penwin.obj \ - $(MSWDIR)\pnghand.obj \ - $(MSWDIR)\printdlg.obj \ - $(MSWDIR)\printwin.obj \ - $(MSWDIR)\radiobox.obj \ - $(MSWDIR)\radiobut.obj \ - $(MSWDIR)\region.obj \ - $(MSWDIR)\registry.obj \ - $(MSWDIR)\regconf.obj \ - $(MSWDIR)\scrolbar.obj \ - $(MSWDIR)\settings.obj \ - $(MSWDIR)\slidrmsw.obj \ - $(MSWDIR)\slider95.obj \ - $(MSWDIR)\spinbutt.obj \ - $(MSWDIR)\statbmp.obj \ - $(MSWDIR)\statbox.obj \ - $(MSWDIR)\statbr95.obj \ - $(MSWDIR)\stattext.obj \ - $(MSWDIR)\tabctrl.obj \ - $(MSWDIR)\taskbar.obj \ - $(MSWDIR)\tbar95.obj \ - $(MSWDIR)\tbarmsw.obj \ - $(MSWDIR)\textctrl.obj \ - $(MSWDIR)\thread.obj \ - $(MSWDIR)\timer.obj \ - $(MSWDIR)\treectrl.obj \ - $(MSWDIR)\utils.obj \ - $(MSWDIR)\utilsexc.obj \ - $(MSWDIR)\wave.obj \ - $(MSWDIR)\window.obj \ - $(OLEDIR)\droptgt.obj \ - $(OLEDIR)\dropsrc.obj \ - $(OLEDIR)\dataobj.obj \ - $(OLEDIR)\oleutils.obj \ - $(OLEDIR)\uuid.obj - - -OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) - -# Normal, static library -all: $(DUMMYOBJ) $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET) - -# wxWindows library as DLL -dll: - nmake -f makefile.nt all FINAL=$(FINAL) DLL=1 WXMAKINGDLL=1 - -# wxWindows + app as DLL. Only affects main.cpp. -dllapp: - nmake -f makefile.nt all FINAL=$(FINAL) DLL=1 - -# wxWindows + app as DLL, for Netscape plugin - remove DllMain. -dllnp: - nmake -f makefile.nt all NOMAIN=1 FINAL=$(FINAL) DLL=1 - -# Use this to make dummy.obj and generate a PCH. -# You might use the dll target, then the pch target, in order to -# generate a DLL, then a PCH/dummy.obj for compiling your applications with. -# -# Explanation: Normally, when compiling a static version of wx.lib, your dummy.obj/PCH -# are associated with wx.lib. When using a DLL version of wxWindows, however, -# the DLL is compiled without a PCH, so you only need it for compiling the app. -# In fact headers are compiled differently depending on whether a DLL is being made -# or an app is calling the DLL exported functionality (WXDLLEXPORT is different -# in each case) so you couldn't use the same PCH. -pch: - nmake -f makefile.nt pch1 WXUSINGDLL=1 - -pch1: $(DUMMYOBJ) - -$(WXDIR)\lib\wx.lib: dummy.obj $(OBJECTS) $(PERIPH_LIBS) - -erase $(LIBTARGET) - $(implib) @<< --out:$@ --machine:$(CPU) -$(OBJECTS) $(PERIPH_LIBS) -<< - -# Update the import library -$(WXDIR)\lib\wx200.lib: $(DUMMYOBJ) $(OBJECTS) - $(implib) @<< - -machine:$(CPU) - -def:wx.def - $(DUMMYOBJ) $(OBJECTS) - -out:$(WXDIR)\lib\wx200.lib -<< - -# Update the dynamic link library -$(WXDIR)\lib\wx200.dll: $(DUMMYOBJ) $(OBJECTS) $(WXDIR)\lib\wx200.lib - $(link) @<< - $(LINKFLAGS) - -out:$(WXDIR)\lib\wx200.dll - $(DUMMYOBJ) $(OBJECTS) $(guilibsdll) shell32.lib comctl32.lib ctl3d32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib -<< - -######################################################## -# Windows-specific objects - -dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h - cl $(CPPFLAGS) $(MAKEPRECOMP) /c /Tp $*.$(SRCSUFF) - -dummydll.obj: dummydll.$(SRCSUFF) $(WXDIR)\include\wx\wx.h - cl @<< -$(CPPFLAGS) $(MAKEPRECOMP) /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/accel.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/app.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/bitmap.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/bmpbuttn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/brush.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/button.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/choice.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/checkbox.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/checklst.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/clipbrd.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/colordlg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/colour.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/combobox.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/control.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/curico.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/cursor.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/data.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/dde.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/dc.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/dcmemory.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/dcclient.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/dcprint.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/dcscreen.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/dialog.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/dib.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/dibutils.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/dirdlg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/filedlg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/font.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/fontdlg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/frame.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/gauge95.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/gaugemsw.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/gdiobj.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/icon.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/imaglist.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/joystick.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/listbox.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/listctrl.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(MSWDIR)/main.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/mdi.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/menu.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/menuitem.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/metafile.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/minifram.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/msgdlg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/nativdlg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/notebook.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/ownerdrw.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/palette.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/pen.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/penwin.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/pnghand.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/printdlg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/printwin.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/radiobox.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/radiobut.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/region.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/registry.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/regconf.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/scrolbar.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/settings.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/slidrmsw.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/slider95.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/spinbutt.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/statbmp.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/statbox.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/statbr95.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/stattext.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/tabctrl.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/taskbar.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/tbar95.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/tbarmsw.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/textctrl.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/thread.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/timer.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/treectrl.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/utils.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/utilsexc.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/wave.obj: $*.$(SRCSUFF) - echo $(CPPFLAGS) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(MSWDIR)/window.obj: $*.$(SRCSUFF) - echo $(CPPFLAGS) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(OLEDIR)/droptgt.obj: $*.$(SRCSUFF) - echo $(CPPFLAGS) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(OLEDIR)/dropsrc.obj: $*.$(SRCSUFF) - echo $(CPPFLAGS) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(OLEDIR)/dataobj.obj: $*.$(SRCSUFF) - echo $(CPPFLAGS) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(OLEDIR)/oleutils.obj: $*.$(SRCSUFF) - echo $(CPPFLAGS) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(OLEDIR)/uuid.obj: $*.$(SRCSUFF) - echo $(CPPFLAGS) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -######################################################## -# Common objects (always compiled) - -$(COMMDIR)/cmndata.obj: $*.$(SRCSUFF) - echo $(CPPFLAGS) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/config.obj: $*.$(SRCSUFF) - echo $(CPPFLAGS) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/db.obj: $*.$(SRCSUFF) - echo $(CPPFLAGS) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/dbtable.obj: $*.$(SRCSUFF) - echo $(CPPFLAGS) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/docview.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/docmdi.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/dynarray.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/event.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/file.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/fileconf.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/filefn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/framecmn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/gdicmn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/iniconf.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/intl.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/ipcbase.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/helpbase.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/layout.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/log.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/memory.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/module.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/object.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/odbc.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/postscrp.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/prntbase.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/resource.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/tbarbase.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/tbarsmpl.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/textfile.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/timercmn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/utilscmn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/validate.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/valtext.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/date.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/wxexpr.obj: $*.$(SRCSUFF) - echo $(CPPFLAGS) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/hash.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/list.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/string.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/matrix.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -#$(COMMDIR)/wxstrgnu/wxstrgnu.obj: $*.$(SRCSUFF) -# cl @<< -#$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF) /Fo$@ -#<< - -#$(COMMDIR)/wxstrgnu/wxregex.obj: $*.$(SRCSUFF) -# cl @<< -#$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF) /Fo$@ -#<< - -$(COMMDIR)/time.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)\stream.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)\fstream.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)\mstream.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)\zstream.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)\datstrm.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/extended.obj: $*.c - cl @<< -$(CPPFLAGS2) /c /Tp $*.c /Fo$@ -<< - -$(COMMDIR)/process.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/wincmn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/y_tab.obj: $*.c $(COMMDIR)/lex_yy.c - cl @<< -$(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@ -<< - -$(COMMDIR)/y_tab.c: $(COMMDIR)/dosyacc.c - copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c - -$(COMMDIR)/lex_yy.c: $(COMMDIR)/doslex.c - copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c - -######################################################## -# Generic objects (not always compiled, depending on -# whether platforms have native implementations) - -$(GENDIR)/choicdgg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/colrdlgg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/fontdlgg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/gridg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/helpxlp.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/msgdlgg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/panelg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/printps.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/prntdlgg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/scrolwin.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/splitter.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/statusbr.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/tabg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/textdlgg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -#test: $(DUMMYOBJ) $(COMMDIR)/string.obj - - -$(OBJECTS): $(WXDIR)/include/wx/setup.h - -# Peripheral components - -xpm: - cd $(WXDIR)\contrib\wxxpm - nmake -f makefile.nt FINAL=$(FINAL) - cd $(WXDIR)\src\msw - -clean_xpm: - cd $(WXDIR)\contrib\wxxpm - nmake -f makefile.nt clean - cd $(WXDIR)\src\msw - -rcparser: - cd $(WXDIR)\utils\rcparser\src - nmake -f makefile.nt FINAL=$(FINAL) - cd $(WXDIR)\src\msw - -wxstring: - cd $(WXDIR)\contrib\wxstring - nmake -f makefile.nt OPTIONS="$(OPTIONS)" DEBUG="$(DEBUG)" FINAL=$(FINAL) - cd $(WXDIR)\src\msw - -clean_wxstring: - cd $(WXDIR)\contrib\wxstring - nmake -f makefile.nt clean - cd $(WXDIR)\src\msw - -clean_rcp: - cd $(WXDIR)\utils\rcparser\src - nmake -f makefile.nt clean - cd $(WXDIR)\src\msw - -clean: $(PERIPH_CLEAN_TARGET) - -erase *.obj - -erase $(LIBTARGET) - -erase $(WXDIR)\lib\*.pdb - -erase ..\..\lib\wx200.dll - -erase ..\..\lib\wx200.lib - -erase ..\..\lib\wx200.exp - -erase ..\..\lib\wx200.pdb - -erase ..\..\lib\wx200.ilk - -erase *.pdb - -erase *.sbr - -erase *.pch - cd $(WXDIR)\src\msw - cd $(GENDIR) - -erase *.pdb - -erase *.sbr - -erase *.obj - cd $(WXDIR)\src\msw - cd $(COMMDIR) - -erase *.pdb - -erase *.sbr - -erase *.obj - -erase y_tab.c - -erase lex_yy.c - cd $(WXDIR)\src\msw - cd $(OLEDIR) - -erase *.pdb - -erase *.sbr - -erase *.obj - cd $(WXDIR)\src\msw -# -erase ..\common\wxstrgnu\*.obj -# -erase ..\common\lex_yy.c -# -erase ..\common\y_tab.c - -cleanall: clean - -# Making documents -docs: hlp -hlp: wxhlp portinghlp # faqhlp -wxhlp: $(DOCDIR)/winhelp/wx.hlp -faqhlp: $(DOCDIR)/winhelp/faq.hlp -refhlp: $(DOCDIR)/winhelp/techref.hlp -rtf: $(DOCDIR)/winhelp/wx.rtf -faqrtf: $(DOCDIR)/winhelp/faq.rtf -pdfrtf: $(DOCDIR)/pdf/wx.rtf -faqpdfrtf: $(DOCDIR)/pdf/faq.rtf -refpdfrtf: $(DOCDIR)/pdf/techref.rtf -html: wxhtml # faqhtml -wxhtml: $(DOCDIR)\html\wx\wx.htm -faqhtml: $(DOCDIR)\html\faq\faq.htm -ps: wxps referencps # faqps -wxps: $(WXDIR)\docs\ps\wx.ps -faqps: $(WXDIR)\docs\ps\faq.ps -referencps: $(WXDIR)\docs\ps\referenc.ps - -portinghtml: $(DOCDIR)\html\porting\port.htm -portingrtf: $(DOCDIR)/winhelp/porting.rtf -portinghlp: $(DOCDIR)/winhelp/porting.hlp -portingpdfrtf: $(DOCDIR)/pdf/porting.rtf -portingps: $(WXDIR)\docs\ps\porting.ps - -alldocs: allhlp allhtml allpdfrtf # allps # TeX can't cope with references! - -allhlp: wxhlp portinghlp # faqhlp - cd $(WXDIR)\utils\wxprop\src - nmake -f makefile.nt hlp - cd $(WXDIR)\utils\dialoged\src - nmake -f makefile.nt hlp - cd $(THISDIR) - -# cd $(WXDIR)\utils\wxhelp\src -# nmake -f makefile.nt hlp -# cd $(WXDIR)\utils\wxhelp2\src -# nmake -f makefile.nt hlp -# cd $(WXDIR)\utils\prologio\src -# nmake -f makefile.nt hlp -# cd $(WXDIR)\utils\tex2rtf\src -# nmake -f makefile.nt hlp -# cd $(WXDIR)\utils\wxgraph\src -# nmake -f makefile.nt hlp -# cd $(WXDIR)\utils\wxchart\src -# nmake -f makefile.nt hlp -# cd $(WXDIR)\utils\wxtree\src -# nmake -f makefile.nt hlp -# cd $(WXDIR)\utils\wxbuild\src -# nmake -f makefile.nt hlp -# cd $(WXDIR)\utils\wxgrid\src -# nmake -f makefile.nt hlp -# cd $(WXDIR)\utils\wxtab\src -# nmake -f makefile.nt hlp - -# cd $(WXDIR)\utils\wxclips\src -# nmake -f makefile.nt hlp -# cd $(WXDIR)\utils\clips2c\src -# nmake -f makefile.nt hlp - -allhtml: wxhtml portinghtml # faqhtml - cd $(WXDIR)\utils\wxprop\src - nmake -f makefile.nt html - cd $(WXDIR)\utils\dialoged\src - nmake -f makefile.nt html - cd $(THISDIR) - -# nmake -f makefile.nt html -# cd $(WXDIR)\utils\dialoged\src -# nmake -f makefile.nt html -# cd $(WXDIR)\utils\hytext\src -# nmake -f makefile.nt html -# cd $(WXDIR)\utils\wxhelp\src -# nmake -f makefile.nt html -# cd $(WXDIR)\utils\wxhelp2\src -# nmake -f makefile.nt html -# cd $(WXDIR)\utils\prologio\src -# nmake -f makefile.nt html -# cd $(WXDIR)\utils\tex2rtf\src -# nmake -f makefile.nt html -# cd $(WXDIR)\utils\wxgraph\src -# nmake -f makefile.nt html -# cd $(WXDIR)\utils\wxchart\src -# nmake -f makefile.nt html -# cd $(WXDIR)\utils\wxtree\src -# nmake -f makefile.nt html -# cd $(WXDIR)\utils\wxtab\src -# nmake -f makefile.nt html - -# cd $(WXDIR)\utils\wxclips\src -# nmake -f makefile.nt html -# cd $(WXDIR)\utils\clips2c\src -# nmake -f makefile.nt html - -allps: wxps referencps portingps # faqps - cd $(WXDIR)\utils\wxprop\src - nmake -f makefile.nt ps - cd $(WXDIR)\utils\dialoged\src - nmake -f makefile.nt ps - cd $(THISDIR) - -allpdfrtf: pdfrtf portingpdfrtf # faqpdfrtf - cd $(WXDIR)\utils\wxprop\src - nmake -f makefile.nt pdfrtf - cd $(WXDIR)\utils\dialoged\src - nmake -f makefile.nt pdfrtf - cd $(THISDIR) - -# cd $(WXDIR)\utils\wxhelp\src -# nmake -f makefile.nt ps -# cd $(WXDIR)\utils\wxhelp2\src -# nmake -f makefile.nt ps -# cd $(WXDIR)\utils\tex2rtf\src -# nmake -f makefile.nt ps -# cd $(WXDIR)\utils\wxgraph\src -# nmake -f makefile.nt ps -# cd $(WXDIR)\utils\wxchart\src -# nmake -f makefile.nt ps -# cd $(WXDIR)\utils\wxtree\src -# nmake -f makefile.nt ps -# cd $(THISDIR) - -# cd $(WXDIR)\utils\wxtab\src -# nmake -f makefile.nt ps -# cd $(WXDIR)\utils\prologio\src -# nmake -f makefile.nt ps -# cd $(WXDIR)\utils\wxclips\src -# nmake -f makefile.nt ps -# cd $(WXDIR)\utils\clips2c\src -# nmake -f makefile.nt ps - -$(DOCDIR)/winhelp/wx.hlp: $(DOCDIR)/latex/wx/wx.rtf $(DOCDIR)/latex/wx/wx.hpj - cd $(DOCDIR)/latex/wx - -erase wx.ph - hc wx - move wx.hlp $(DOCDIR)\winhelp\wx.hlp - move wx.cnt $(DOCDIR)\winhelp\wx.cnt - cd $(THISDIR) - -$(DOCDIR)/winhelp/porting.hlp: $(DOCDIR)/latex/porting/porting.rtf $(DOCDIR)/latex/porting/porting.hpj - cd $(DOCDIR)/latex/porting - -erase porting.ph - hc porting - move porting.hlp $(DOCDIR)\winhelp\porting.hlp - move porting.cnt $(DOCDIR)\winhelp\porting.cnt - cd $(THISDIR) - -$(DOCDIR)/winhelp/faq.hlp: $(DOCDIR)/latex/faq/faq.rtf $(DOCDIR)/latex/faq/faq.hpj - cd $(DOCDIR)/latex/faq - -erase faq.ph - hc faq - move faq.hlp $(DOCDIR)\winhelp\faq.hlp - move faq.cnt $(DOCDIR)\winhelp\faq.cnt - cd $(THISDIR) - -$(DOCDIR)/winhelp/techref.hlp: $(DOCDIR)/latex/techref/techref.rtf $(DOCDIR)/latex/techref/techref.hpj - cd $(DOCDIR)/latex/techref - -erase techref.ph - hc techref - move techref.hlp $(DOCDIR)\winhelp\techref.hlp - move techref.cnt $(DOCDIR)\winhelp\techref.cnt - cd $(THISDIR) - -$(DOCDIR)/latex/wx/wx.rtf: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/manual.tex - cd $(DOCDIR)\latex\wx - -start /w tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/latex/wx/wx.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)/latex/porting/porting.rtf: $(DOCDIR)/latex/porting/porting.tex - cd $(DOCDIR)\latex\porting - -start /w tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/latex/porting/porting.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)/latex/faq/faq.rtf: $(DOCDIR)/latex/faq/faq.tex - cd $(DOCDIR)\latex\faq - -start /w tex2rtf $(DOCDIR)/latex/faq/faq.tex $(DOCDIR)/latex/faq/faq.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)/latex/techref/techref.rtf: $(DOCDIR)/latex/techref/techref.tex - cd $(DOCDIR)\latex\techref - -start /w tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/latex/techref/techref.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)/pdf/wx.rtf: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/manual.tex - cd $(DOCDIR)\latex\wx - -copy *.bmp *.wmf $(DOCDIR)\pdf - -start /w tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/pdf/wx.rtf -twice -rtf - cd $(THISDIR) - -$(DOCDIR)/pdf/porting.rtf: $(DOCDIR)/latex/porting/porting.tex - cd $(DOCDIR)\latex\porting - -copy *.bmp *.wmf $(DOCDIR)\pdf - -start /w tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/pdf/porting.rtf -twice -rtf - cd $(THISDIR) - -$(DOCDIR)/pdf/faq.rtf: $(DOCDIR)/latex/faq/faq.tex - cd $(DOCDIR)\latex\faq - -copy *.bmp *.wmf $(DOCDIR)\pdf - -start /w tex2rtf $(DOCDIR)/latex/faq/faq.tex $(DOCDIR)/pdf/faq.rtf -twice -rtf - cd $(THISDIR) - -$(DOCDIR)/pdf/techref.rtf: $(DOCDIR)/latex/techref/techref.tex - cd $(DOCDIR)\latex\techref - -copy *.bmp *.wmf $(DOCDIR)\pdf - -start /w tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/pdf/techref.rtf -twice -rtf - cd $(THISDIR) - -$(DOCDIR)\html\wx\wx.htm: $(DOCDIR)\latex\wx\classes.tex $(DOCDIR)\latex\wx\body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)\latex\wx\manual.tex - cd $(DOCDIR)\latex\wx - -mkdir $(DOCDIR)\html\wx - -start /w tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html - -erase $(DOCDIR)\html\wx\*.con - -erase $(DOCDIR)\html\wx\*.ref - -erase $(DOCDIR)\latex\wx\*.con - -erase $(DOCDIR)\latex\wx\*.ref - cd $(THISDIR) - -$(DOCDIR)\html\porting\port.htm: $(DOCDIR)\latex\porting\porting.tex - cd $(DOCDIR)\latex\porting - -mkdir $(DOCDIR)\html\porting - -start /w tex2rtf $(DOCDIR)\latex\porting\porting.tex $(DOCDIR)\html\porting\port.htm -twice -html - -erase $(DOCDIR)\html\porting\*.con - -erase $(DOCDIR)\html\porting\*.ref - -erase $(DOCDIR)\latex\porting\*.con - -erase $(DOCDIR)\latex\porting\*.ref - cd $(THISDIR) - -$(DOCDIR)\html\faq\faq.htm: $(DOCDIR)\latex\faq\faq.tex - cd $(DOCDIR)\latex\faq - -mkdir $(DOCDIR)\html\faq - -start /w tex2rtf $(DOCDIR)\latex\faq\faq.tex $(DOCDIR)\html\faq\faq.htm -twice -html - -erase $(DOCDIR)\html\faq\*.con - -erase $(DOCDIR)\html\faq\*.ref - -erase $(DOCDIR)\latex\faq\*.con - -erase $(DOCDIR)\latexfaq\*.ref - cd $(THISDIR) - -$(WXDIR)\docs\latex\wx\manual.dvi: $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/manual.tex - cd $(WXDIR)\docs\latex\wx - -latex manual - -latex manual - -makeindx manual - -bibtex manual - -latex manual - -latex manual - cd $(THISDIR) - -$(WXDIR)\docs\latex\porting\porting.dvi: $(DOCDIR)/latex/porting/porting.tex - cd $(WXDIR)\docs\latex\porting - -latex porting - -latex porting - -makeindx porting - -bibtex porting - -latex porting - -latex porting - cd $(THISDIR) - -$(WXDIR)\docs\ps\wx.ps: $(WXDIR)\docs\latex\wx\manual.dvi - cd $(WXDIR)\docs\latex\wx - -dvips32 -o wx.ps manual - move wx.ps $(WXDIR)\docs\ps\wx.ps - cd $(THISDIR) - -$(WXDIR)\docs\ps\porting.ps: $(WXDIR)\docs\latex\porting\porting.dvi - cd $(WXDIR)\docs\latex\porting - -dvips32 -o porting.ps porting - move porting.ps $(WXDIR)\docs\ps\porting.ps - cd $(THISDIR) - -$(WXDIR)\docs\latex\wx\referenc.dvi: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/referenc.tex - cd $(WXDIR)\docs\latex\wx - -latex referenc - -latex referenc - -makeindx referenc - -bibtex referenc - -latex referenc - -latex referenc - cd $(THISDIR) - -$(WXDIR)\docs\ps\referenc.ps: $(WXDIR)\docs\latex\wx\referenc.dvi - cd $(WXDIR)\docs\latex\wx - -dvips32 -o referenc.ps referenc - move referenc.ps $(WXDIR)\docs\ps\referenc.ps - cd $(THISDIR) - -$(WXDIR)\docs\latex\faq\faq.dvi: $(DOCDIR)/latex/faq/faq.tex - cd $(WXDIR)\docs\latex\faq - -latex faq - -latex faq - -makeindx faq - -latex faq - -latex faq - cd $(THISDIR) - -$(WXDIR)\docs\ps\faq.ps: $(WXDIR)\docs\latex\faq\faq.dvi - cd $(WXDIR)\docs\latex\faq - -dvips32 -o faq.ps faq - move faq.ps $(WXDIR)\docs\ps\faq.ps - cd $(THISDIR) - - diff --git a/src/msw/makefile.sc b/src/msw/makefile.sc deleted file mode 100644 index ee780f6f1c..0000000000 --- a/src/msw/makefile.sc +++ /dev/null @@ -1,147 +0,0 @@ -# Symantec C++ makefile for the msw objects -# called from src\makefile.sc - -# configuration section (see src\makefile.sc) ########################### - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makesc.env - -INCDIR = $(WXDIR)\include -MSWINC = $(INCDIR)\msw -BASEINC = $(INCDIR)\base - -# default values overridden by src\makefile.sc - -CC=sc -CFLAGS = -o -ml -W -Dwx_msw - -INCLUDE=$(BASEINC);$(MSWINC);$(WXDIR)\contrib\fafa;$(WXDIR)\contrib\itsybits - -OPTIONS= - -# end of configuration section ########################################## - -OBJS = wx_win.obj wx_frame.obj wx_panel.obj wx_utils.obj wx_main.obj \ -wx_item.obj wx_text.obj wx_gdi.obj wx_dialg.obj wx_canvs.obj wx_dc.obj \ -wx_mf.obj wx_ipc.obj wx_timer.obj wx_clipb.obj wx_scrol.obj wx_vlbox.obj \ -wx_stat.obj wx_buttn.obj wx_messg.obj wx_check.obj wx_choic.obj wx_rbox.obj wx_lbox.obj \ -wx_group.obj wx_gauge.obj wx_txt.obj wx_mtxt.obj wx_slidr.obj wx_menu.obj wx_db.obj\ -wx_cmdlg.obj - -all: $(OBJS) - -wx_obj.obj: $(BASEINC)\wx_obj.h - -wx_win.obj: $(BASEINC)\wx_defs.h $(MSWINC)\wx_win.h \ -$(BASEINC)\wx_obj.h $(BASEINC)\wx_utils.h wx_win.$(SRCSUFF) \ -$(MSWINC)\wx_gdi.h $(MSWINC)\wx_privt.h - -wx_main.obj: $(BASEINC)\wx_defs.h $(BASEINC)\wx_obj.h \ -$(MSWINC)\wx_frame.h $(BASEINC)\wx_utils.h - -wx_frame.obj: $(BASEINC)\wx_defs.h $(MSWINC)\wx_win.h $(BASEINC)\wx_obj.h \ -$(BASEINC)\wx_utils.h $(MSWINC)\wx_frame.h wx_frame.$(SRCSUFF) \ -$(BASEINC)\wx_stdev.h $(MSWINC)\wx_privt.h - -wx_panel.obj: $(BASEINC)\wx_defs.h $(MSWINC)\wx_win.h $(BASEINC)\wx_obj.h \ -$(BASEINC)\wx_utils.h $(MSWINC)\wx_frame.h $(MSWINC)\wx_panel.h \ -wx_panel.$(SRCSUFF) $(BASEINC)\wx_stdev.h $(MSWINC)\wx_privt.h - -wx_text.obj: $(BASEINC)\wx_defs.h $(MSWINC)\wx_win.h $(BASEINC)\wx_obj.h \ -$(BASEINC)\wx_utils.h $(MSWINC)\wx_frame.h $(MSWINC)\wx_text.h \ -wx_text.$(SRCSUFF) $(BASEINC)\wx_stdev.h $(MSWINC)\wx_privt.h - -wx_canvs.obj: $(BASEINC)\wx_defs.h $(MSWINC)\wx_win.h $(BASEINC)\wx_obj.h \ -$(BASEINC)\wx_utils.h $(MSWINC)\wx_frame.h $(MSWINC)\wx_canvs.h \ -wx_canvs.$(SRCSUFF) $(BASEINC)\wx_stdev.h $(MSWINC)\wx_gdi.h $(MSWINC)\wx_dc.h \ -$(MSWINC)\wx_privt.h - -wx_dc.obj: $(BASEINC)\wx_defs.h $(MSWINC)\wx_win.h $(BASEINC)\wx_obj.h \ -$(BASEINC)\wx_utils.h $(MSWINC)\wx_frame.h $(MSWINC)\wx_canvs.h wx_dc.$(SRCSUFF) \ -$(BASEINC)\wx_stdev.h $(MSWINC)\wx_gdi.h $(MSWINC)\wx_dc.h \ -$(MSWINC)/wx_dccan.h $(MSWINC)/wx_dcmem.h - -wx_mf.obj: $(BASEINC)\wx_defs.h $(MSWINC)\wx_win.h $(BASEINC)\wx_obj.h \ -wx_mf.$(SRCSUFF) $(BASEINC)\wx_stdev.h $(MSWINC)\wx_gdi.h $(MSWINC)\wx_mf.h - -wx_item.obj: $(BASEINC)\wx_defs.h $(MSWINC)\wx_win.h $(BASEINC)\wx_obj.h \ -$(BASEINC)\wx_utils.h $(MSWINC)\wx_frame.h $(MSWINC)\wx_item.h \ -wx_item.$(SRCSUFF) $(BASEINC)\wx_stdev.h $(MSWINC)\wx_privt.h - -wx_utils.obj: $(BASEINC)\wx_defs.h $(BASEINC)\wx_obj.h \ -$(BASEINC)\wx_utils.h wx_utils.$(SRCSUFF) - -wx_ipc.obj: $(BASEINC)\wx_defs.h $(BASEINC)\wx_obj.h \ -$(BASEINC)\wx_utils.h $(MSWINC)\wx_ipc.h wx_ipc.$(SRCSUFF) - -wx_gdi.obj: $(BASEINC)\wx_defs.h $(MSWINC)\wx_gdi.h $(BASEINC)\wx_utils.h \ -wx_gdi.$(SRCSUFF) - -wx_dialg.obj: $(BASEINC)\wx_defs.h wx_dialg.$(SRCSUFF) $(MSWINC)\wx_dialg.h \ -$(MSWINC)\wx_win.h $(BASEINC)\wx_utils.h $(MSWINC)\wx_panel.h \ -$(MSWINC)\wx_privt.h - -wx_timer.obj: $(BASEINC)\wx_defs.h wx_timer.$(SRCSUFF) $(MSWINC)\wx_timer.h - -wx_clipb.obj: $(BASEINC)\wx_defs.h wx_clipb.$(SRCSUFF) $(MSWINC)\wx_clipb.h - -wx_stat.obj: wx_stat.$(SRCSUFF) $(MSWINC)\wx_stat.h - -wx_scrol.obj: wx_scrol.$(SRCSUFF) $(MSWINC)\wx_scrol.h - -wx_vlbox.obj: wx_vlbox.$(SRCSUFF) $(MSWINC)\wx_vlbox.h - -wx_buttn.obj: wx_buttn.$(SRCSUFF) $(MSWINC)\wx_buttn.h - -wx_messg.obj: wx_messg.$(SRCSUFF) $(MSWINC)\wx_messg.h - -wx_check.obj: wx_check.$(SRCSUFF) $(MSWINC)\wx_check.h - -wx_choic.obj: wx_choic.$(SRCSUFF) $(MSWINC)\wx_choic.h - -wx_rbox.obj: wx_rbox.$(SRCSUFF) $(MSWINC)\wx_rbox.h - -wx_lbox.obj: wx_lbox.$(SRCSUFF) $(MSWINC)\wx_lbox.h - -wx_group.obj: wx_group.$(SRCSUFF) $(MSWINC)\wx_group.h - -wx_gauge.obj: wx_gauge.$(SRCSUFF) $(MSWINC)\wx_gauge.h - -wx_txt.obj: wx_txt.$(SRCSUFF) $(MSWINC)\wx_txt.h - -wx_mtxt.obj: wx_mtxt.$(SRCSUFF) $(MSWINC)\wx_mtxt.h - -wx_slidr.obj: wx_slidr.$(SRCSUFF) $(MSWINC)\wx_slidr.h - -wx_menu.obj: wx_menu.$(SRCSUFF) $(MSWINC)\wx_menu.h - -wx_db.obj: wx_db.$(SRCSUFF) $(MSWINC)\wx_db.h - -wx_cmdlg.obj: wx_cmdlg.$(SRCSUFF) $(MSWINC)\wx_cmdlg.h - -$(MSWINC)/wx_win.h: $(BASEINC)/wb_win.h -$(MSWINC)/wx_main.h: $(BASEINC)/wb_main.h -$(MSWINC)/wx_frame.h: $(BASEINC)/wb_frame.h -$(MSWINC)/wx_panel.h: $(BASEINC)/wb_panel.h -$(MSWINC)/wx_text.h: $(BASEINC)/wb_text.h -$(MSWINC)/wx_dialg.h: $(BASEINC)/wb_dialg.h -$(MSWINC)/wx_ipc.h: $(BASEINC)/wb_ipc.h -$(MSWINC)/wx_gdi.h: $(BASEINC)/wb_gdi.h -$(MSWINC)/wx_event.h: $(BASEINC)/wb_event.h -$(MSWINC)/wx_canvs.h: $(BASEINC)/wb_canvs.h -$(MSWINC)/wx_mf.h: $(BASEINC)/wb_mf.h -$(MSWINC)/wx_item.h: $(BASEINC)/wb_item.h -$(MSWINC)/wx_buttn.h: $(BASEINC)/wb_buttn.h -$(MSWINC)/wx_messg.h: $(BASEINC)/wb_messg.h -$(MSWINC)/wx_choic.h: $(BASEINC)/wb_choic.h -$(MSWINC)/wx_check.h: $(BASEINC)/wb_check.h -$(MSWINC)/wx_lbox.h: $(BASEINC)/wb_lbox.h -$(MSWINC)/wx_txt.h: $(BASEINC)/wb_txt.h -$(MSWINC)/wx_mtxt.h: $(BASEINC)/wb_mtxt.h -$(MSWINC)/wx_slidr.h: $(BASEINC)/wb_slidr.h -$(MSWINC)/wx_menu.h: $(BASEINC)/wb_menu.h - - -clean: - -del *.obj diff --git a/src/msw/makefile.wat b/src/msw/makefile.wat deleted file mode 100644 index 1dc75e669b..0000000000 --- a/src/msw/makefile.wat +++ /dev/null @@ -1,159 +0,0 @@ -#!/binb/wmake.exe -# -# File: makefile.wat -# Author: Edward C. Zimmermann -# Created: 1994 -# Updated: Dmitri Chubraev, Nov.1994 -# RCS_ID $Id$ -# -# Makefile : Builds wxWindows library for Windows 3.1 -# and Watcom C++ - -WXDIR = ..\.. - -!include $(WXDIR)\src\makewat.env - -WXLIB = $(WXDIR)\lib - -LIBTARGET = $(WXLIB)\wx$(LEVEL).lib -DUMMY=dummydll -#CTL3DOBJ = ..\..\contrib\ctl3d\ctl3d32.obj -#CTL3DLIB = ..\..\contrib\ctl3d\win32s\ctl3d32.lib -FAFALIB = ..\..\contrib\fafa\fafa.lib -#ODBCLIB = ..\..\contrib\odbc\odbc32.lib -GAUGELIB = ..\..\contrib\gauge\gauge.lib -ITSYLIB = ..\..\contrib\itsybits\itsy.lib -WXSTRINGLIB = ..\..\contrib\wxstring\wxstring.lib -WXXPMLIB = ..\..\contrib\wxxpm\wxxpm.lib -PROIOLIB = ..\..\utils\prologio\lib\prologio.lib -DIBLIB = ..\..\utils\dib\dib.lib -RCPARSERLIB = ..\..\utils\rcparser\lib\rcparser.lib - -EXTRAMODULES = $(GAUGELIB) $(ITSYLIB) $(PROIOLIB) $(DIBLIB) $(WXSTRINGLIB) $(RCPARSERLIB) $(FAFALIB) # $(WXXPMLIB) -EXTRATARGETS = fafa gauge itsy prologio dib rcparser wxstring # wxxpm -EXTRATARGETSCLEAN = clean_fafa clean_gauge clean_itsy clean_proio clean_dib clean_rcp clean_wxstring # clean_wxxpm - -OBJECTS = wx_win.obj wx_frame.obj wx_panel.obj wx_utils.obj & - wx_item.obj wx_text.obj wx_gdi.obj wx_dialg.obj wx_canvs.obj wx_dc.obj & - wx_mf.obj wx_ipc.obj wx_timer.obj wx_clipb.obj wx_vlbox.obj & - wx_stat.obj wx_scrol.obj wx_buttn.obj wx_messg.obj wx_check.obj wx_choic.obj & - wx_rbox.obj wx_lbox.obj wx_group.obj wx_gauge.obj wx_txt.obj wx_mtxt.obj & - wx_slidr.obj wx_menu.obj wx_db.obj wx_cmdlg.obj wx_main.obj wx_combo.obj - -BASEOBJECTS = ..\base\wb_win.obj ..\base\wb_frame.obj ..\base\wb_panel.obj & - ..\base\wb_utils.obj ..\base\wx_lay.obj ..\base\wx_doc.obj ..\base\wb_res.obj & - ..\base\wb_main.obj ..\base\wb_item.obj ..\base\wb_list.obj ..\base\wb_obj.obj & - ..\base\wb_text.obj ..\base\wb_gdi.obj ..\base\wb_dialg.obj ..\base\wb_canvs.obj & - ..\base\wb_dc.obj ..\base\wb_mf.obj ..\base\wb_ps.obj ..\base\wx_enhdg.obj & - ..\base\wb_hash.obj ..\base\wb_ipc.obj ..\base\wb_form.obj ..\base\wb_timer.obj & - ..\base\wb_help.obj ..\base\wb_sysev.obj ..\base\wb_stdev.obj ..\base\wb_types.obj & - ..\base\wb_mgstr.obj ..\base\wb_data.obj ..\base\wb_stat.obj & - ..\base\wb_scrol.obj ..\base\wb_vlbox.obj ..\base\wb_print.obj ..\base\wx_tbar.obj & - ..\base\wx_bbar.obj ..\base\wx_mem.obj ..\base\wx_date.obj ..\base\wb_cmdlg.obj & - ..\base\wx_time.obj ..\base\wx_frac.obj - -# This now replaced by contrib\wxstring -#..\base\wxstring.obj - -all: base $(EXTRATARGETS) erasepch $(LIBTARGET) - -base: .SYMBOLIC - cd ..\base - wmake -f makefile.wat all OPTIONS="$(OPTIONS)" DEBUG="$(DEBUG)" LEVEL=$(LEVEL) - cd ..\msw - -$(LIBTARGET) : $(OBJECTS) $(BASEOBJECTS) $(EXTRAMODULES) - %create tmp.lbc - @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i - @for %i in ( $(BASEOBJECTS) ) do @%append tmp.lbc +%i - @for %i in ( $(EXTRAMODULES) ) do @%append tmp.lbc +%i - wlib /b /c /n /p=512 $^@ @tmp.lbc - -clean: .SYMBOLIC - -erase *.obj *.bak *.err *.pch - cd ..\base - wmake -f makefile.wat clean - -erase $(LIBTARGET) - cd ..\msw - -cleanall: clean $(EXTRATARGETSCLEAN) - -fafa: .SYMBOLIC - cd $(WXDIR)\contrib\fafa - wmake -f makefile.wat all - cd $(WXDIR)\src\msw - -clean_fafa: .SYMBOLIC - cd $(WXDIR)\contrib\fafa - wmake -f makefile.wat clean - cd $(WXDIR)\src\msw - -itsy: .SYMBOLIC - cd $(WXDIR)\contrib\itsybits - wmake -f makefile.wat all - cd $(WXDIR)\src\msw - -clean_itsy: .SYMBOLIC - cd $(WXDIR)\contrib\itsybits - wmake -f makefile.wat clean - cd $(WXDIR)\src\msw - -gauge: .SYMBOLIC - cd $(WXDIR)\contrib\gauge - wmake -f makefile.wat all - cd $(WXDIR)\src\msw - -clean_gauge: .SYMBOLIC - cd $(WXDIR)\contrib\gauge - wmake -f makefile.wat clean - cd $(WXDIR)\src\msw - -wxxpm: .SYMBOLIC - cd $(WXDIR)\contrib\wxxpm - wmake -f makefile.wat all - cd $(WXDIR)\src\msw - -clean_wxxpm: .SYMBOLIC - cd $(WXDIR)\contrib\wxxpm - wmake -f makefile.wat clean - cd $(WXDIR)\src\msw - -dib: .SYMBOLIC - cd $(WXDIR)\utils\dib - wmake -f makefile.wat all - cd $(WXDIR)\src\msw - -clean_dib: .SYMBOLIC - cd $(WXDIR)\utils\dib - wmake -f makefile.wat clean - cd $(WXDIR)\src\msw - -prologio: .SYMBOLIC - cd $(WXDIR)\utils\prologio\src - wmake -f makefile.wat all - cd $(WXDIR)\src\msw - -clean_proio: .SYMBOLIC - cd $(WXDIR)\utils\prologio\src - wmake -f makefile.wat clean - cd $(WXDIR)\src\msw - -rcparser: .SYMBOLIC - cd $(WXDIR)\utils\rcparser\src - wmake -f makefile.wat all - cd $(WXDIR)\src\msw - -wxstring: .SYMBOLIC - cd $(WXDIR)\contrib\wxstring - wmake -f makefile.wat all OPTIONS="$(OPTIONS)" DEBUG="$(DEBUG)" - cd $(WXDIR)\src\msw - -clean_wxstring: .SYMBOLIC - cd $(WXDIR)\contrib\wxstring - wmake -f makefile.wat clean - cd $(WXDIR)\src\msw - -clean_rcp: .SYMBOLIC - cd $(WXDIR)\utils\rcparser\src - wmake -f makefile.wat clean - cd $(WXDIR)\src\msw diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp deleted file mode 100644 index fdb27c0822..0000000000 --- a/src/msw/mdi.cpp +++ /dev/null @@ -1,1253 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: mdi.cpp -// Purpose: MDI classes -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "mdi.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/setup.h" -#include "wx/frame.h" -#include "wx/menu.h" -#include "wx/app.h" -#include "wx/utils.h" -#include "wx/dialog.h" -#include "wx/statusbr.h" -#include "wx/settings.h" -#endif - -#include "wx/mdi.h" -#include "wx/msw/private.h" - -#if USE_NATIVE_STATUSBAR -#include -#endif - -#include - -extern wxList wxModelessWindows; -extern wxMenu *wxCurrentPopupMenu; - -#define IDM_WINDOWTILE 4001 -#define IDM_WINDOWCASCADE 4002 -#define IDM_WINDOWICONS 4003 -#define IDM_WINDOWNEXT 4004 -// This range gives a maximum of 500 -// MDI children. Should be enough :-) -#define wxFIRST_MDI_CHILD 4100 -#define wxLAST_MDI_CHILD 4600 - -// Status border dimensions -#define wxTHICK_LINE_BORDER 3 -#define wxTHICK_LINE_WIDTH 1 - -extern char wxMDIFrameClassName[]; -extern char wxMDIChildFrameClassName[]; -extern wxWindow *wxWndHook; - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame, wxFrame) -IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame, wxFrame) -IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxWindow) - -BEGIN_EVENT_TABLE(wxMDIParentFrame, wxFrame) - EVT_SIZE(wxMDIParentFrame::OnSize) - EVT_ACTIVATE(wxMDIParentFrame::OnActivate) - EVT_SYS_COLOUR_CHANGED(wxMDIParentFrame::OnSysColourChanged) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxMDIClientWindow, wxWindow) - EVT_SCROLL(wxMDIClientWindow::OnScroll) -END_EVENT_TABLE() - -#endif - -wxMDIParentFrame::wxMDIParentFrame(void) -{ - m_clientWindow = NULL; - m_currentChild = NULL; - m_windowMenu = 0; - m_parentFrameActive = TRUE; -} - -bool wxMDIParentFrame::Create(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - m_defaultIcon = (WXHICON) (wxSTD_MDIPARENTFRAME_ICON ? wxSTD_MDIPARENTFRAME_ICON : wxDEFAULT_MDIPARENTFRAME_ICON); - - m_clientWindow = NULL; - m_currentChild = NULL; - m_windowMenu = 0; - m_parentFrameActive = TRUE; - - if (!parent) - wxTopLevelWindows.Append(this); - - SetName(name); - m_windowStyle = style; - - if (parent) parent->AddChild(this); - - if ( id > -1 ) - m_windowId = id; - else - m_windowId = (int)NewControlId(); - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - m_windowMenu = (WXHMENU) ::LoadMenu(wxGetInstance(), "wxWindowMenu"); - -#if WXDEBUG > 1 - wxDebugMsg("Loaded m_windowMenu %d\n", m_windowMenu); -#endif - - DWORD msflags = WS_OVERLAPPED ; - if (style & wxMINIMIZE_BOX) - msflags |= WS_MINIMIZEBOX; - if (style & wxMAXIMIZE_BOX) - msflags |= WS_MAXIMIZEBOX; - if (style & wxTHICK_FRAME) - msflags |= WS_THICKFRAME; - if (style & wxSYSTEM_MENU) - msflags |= WS_SYSMENU; - if ((style & wxMINIMIZE) || (style & wxICONIZE)) - msflags |= WS_MINIMIZE; - if (style & wxMAXIMIZE) - msflags |= WS_MAXIMIZE; - if (style & wxCAPTION) - msflags |= WS_CAPTION; - - // Adding WS_CLIPCHILDREN causes children not to be properly - // drawn when first displaying them. -// if (style & wxCLIP_CHILDREN) -// msflags |= WS_CLIPCHILDREN; - - wxWindow::MSWCreate(m_windowId, parent, wxMDIFrameClassName, this, title, x, y, width, height, - msflags); - - wxModelessWindows.Append(this); - - return TRUE; -} - -wxMDIParentFrame::~wxMDIParentFrame(void) -{ - DestroyChildren(); - - DestroyMenu((HMENU) m_windowMenu); // Destroy dummy "Window" menu - m_windowMenu = 0; - - if (m_clientWindow->MSWGetOldWndProc()) - m_clientWindow->UnsubclassWin(); - - m_clientWindow->m_hWnd = 0; - delete m_clientWindow; -} - -// Get size *available for subwindows* i.e. excluding menu bar. -void wxMDIParentFrame::GetClientSize(int *x, int *y) const -{ - RECT rect; - GetClientRect((HWND) GetHWND(), &rect); - - int cwidth = rect.right; - int cheight = rect.bottom; - - if ( GetStatusBar() ) - { - int sw, sh; - GetStatusBar()->GetSize(&sw, &sh); - cheight -= sh; - } - - wxPoint pt(GetClientAreaOrigin()); - cheight -= pt.y; - cwidth -= pt.x; - - *x = cwidth; - *y = cheight; -} - -void wxMDIParentFrame::SetMenuBar(wxMenuBar *menu_bar) -{ - if (!menu_bar) - { - m_frameMenuBar = NULL; - return; - } - - if (menu_bar->m_menuBarFrame) - return; - - int i; - HMENU menu = CreateMenu(); - - for (i = 0; i < menu_bar->m_menuCount; i ++) - { - HMENU popup = (HMENU)menu_bar->m_menus[i]->m_hMenu; - // - // After looking Bounds Checker result, it seems that all - // menus must be individually destroyed. So, don't reset m_hMenu, - // to allow ~wxMenu to do the job. - // - menu_bar->m_menus[i]->m_savehMenu = (WXHMENU) popup; - // Uncommenting for the moment... JACS - menu_bar->m_menus[i]->m_hMenu = (WXHMENU) NULL; - AppendMenu(menu, MF_POPUP | MF_STRING, (UINT)popup, menu_bar->m_titles[i]); - } - - menu_bar->m_hMenu = (WXHMENU)menu; - if (m_frameMenuBar) - delete m_frameMenuBar; - - this->m_hMenu = (WXHMENU) menu; - - // MDI parent-specific code follows - - HMENU subMenu = GetSubMenu((HMENU) m_windowMenu, 0); - - // Try to insert Window menu in front of Help, otherwise append it. - int N = GetMenuItemCount(menu); - bool success = FALSE; - for (i = 0; i < N; i++) - { - char buf[100]; - int chars = GetMenuString(menu, i, buf, 100, MF_BYPOSITION); - if ((chars > 0) && (strcmp(buf, "&Help") == 0 || - strcmp(buf, "Help") == 0)) - { - success = TRUE; - InsertMenu(menu, i, MF_BYPOSITION | MF_POPUP | MF_STRING, - (UINT)subMenu, "&Window"); - break; - } - } - if (!success) - AppendMenu(menu, MF_POPUP, - (UINT)subMenu, - "&Window"); - m_parentFrameActive = TRUE; -#ifdef __WIN32__ - SendMessage((HWND) GetClientWindow()->GetHWND(), WM_MDISETMENU, - (WPARAM)menu, - (LPARAM)subMenu); -#else - SendMessage((HWND) GetClientWindow()->GetHWND(), WM_MDISETMENU, 0, - MAKELPARAM(menu, subMenu)); -#endif - DrawMenuBar((HWND) GetHWND()); - - m_frameMenuBar = menu_bar; - menu_bar->m_menuBarFrame = this; -} - -void wxMDIParentFrame::OnSize(wxSizeEvent& event) -{ -#if USE_CONSTRAINTS - if (GetAutoLayout()) - Layout(); -#endif - int x = 0; - int y = 0; - int width, height; - GetClientSize(&width, &height); - - if ( GetClientWindow() ) - GetClientWindow()->SetSize(x, y, width, height); - -/* Already done in MSWOnSize - // forward WM_SIZE to status bar control -#if USE_NATIVE_STATUSBAR - if (m_frameStatusBar && m_frameStatusBar->IsKindOf(CLASSINFO(wxStatusBar95))) - ((wxStatusBar95 *)m_frameStatusBar)->OnSize(event); -#endif -*/ - -} - -void wxMDIParentFrame::OnActivate(wxActivateEvent& event) -{ - // Do nothing -} - -#if WXWIN_COMPATIBILITY -/* -void wxMDIParentFrame::OldOnSize(int x, int y) -{ -#if WXWIN_COMPATIBILITY == 1 - wxSizeEvent event(wxSize(x, y), m_windowId); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); -#else - -#if USE_CONSTRAINTS - if (GetAutoLayout()) - Layout(); -#endif - int x = 0; - int y = 0; - int width, height; - GetClientSize(&width, &height); - if ( GetToolBar() ) - { - int wt, ht; - GetToolBar()->GetSize(&wt, &ht); - height -= ht; - y += ht; - } - - if ( GetClientWindow() ) - GetClientWindow()->SetSize(x, y, width, height); - -#endif -} - -// Default activation behaviour - nothing. -// Default activation behaviour - override dedault wxFrame behaviour -void wxMDIParentFrame::OldOnActivate(bool flag) -{ -#if WXWIN_COMPATIBILITY == 1 - wxActivateEvent event(wxEVT_ACTIVATE, flag, m_windowId); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); -#else -#endif -} -*/ - -#endif - -// Returns the active MDI child window -wxMDIChildFrame *wxMDIParentFrame::GetActiveChild(void) const -{ -// HWND hWnd = (HWND)LOWORD(SendMessage((HWND) GetClientWindow()->GetHWND(), WM_MDIGETACTIVE, 0, 0L)); - HWND hWnd = (HWND)SendMessage((HWND) GetClientWindow()->GetHWND(), WM_MDIGETACTIVE, 0, 0L); - if (hWnd == 0) - return NULL; - else - return (wxMDIChildFrame *)wxFindWinFromHandle((WXHWND) hWnd); -} - -// Create the client window class (don't Create the window, -// just return a new class) -wxMDIClientWindow *wxMDIParentFrame::OnCreateClient(void) -{ - return new wxMDIClientWindow ; -} - -// Responds to colour changes, and passes event on to children. -void wxMDIParentFrame::OnSysColourChanged(wxSysColourChangedEvent& event) -{ - if ( m_clientWindow ) - { - m_clientWindow->SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE)); - m_clientWindow->Refresh(); - } -/* - if ( m_frameToolBar ) - { - wxSysColourChangedEvent event2; - event2.eventObject = m_frameToolBar; - m_frameToolBar->GetEventHandler()->ProcessEvent(event2); - } -*/ - - // Propagate the event to the non-top-level children - wxFrame::OnSysColourChanged(event); -} - -// MDI operations -void wxMDIParentFrame::Cascade(void) -{ - ::SendMessage( (HWND) GetClientWindow()->GetHWND(), WM_MDICASCADE, 0, 0); -} - -void wxMDIParentFrame::Tile(void) -{ - ::SendMessage( (HWND) GetClientWindow()->GetHWND(), WM_MDITILE, MDITILE_HORIZONTAL, 0); -} - -void wxMDIParentFrame::ArrangeIcons(void) -{ - ::SendMessage( (HWND) GetClientWindow()->GetHWND(), WM_MDIICONARRANGE, 0, 0); -} - -void wxMDIParentFrame::ActivateNext(void) -{ - ::SendMessage( (HWND) GetClientWindow()->GetHWND(), WM_MDINEXT, 0, 0); -} - -void wxMDIParentFrame::ActivatePrevious(void) -{ - ::SendMessage( (HWND) GetClientWindow()->GetHWND(), WM_MDINEXT, 0, 1); -} - - -/* -// Returns a style for the client window - usually 0 -// or, for example, wxHSCROLL | wxVSCROLL -long wxMDIParentFrame::GetClientStyle(void) const -{ - return wxHSCROLL | wxVSCROLL ; -} -*/ - -bool wxMDIParentFrame::MSWOnDestroy(void) -{ - return FALSE; -} - -void wxMDIParentFrame::MSWOnCreate(WXLPCREATESTRUCT WXUNUSED(cs)) -{ - m_clientWindow = OnCreateClient(); - // Uses own style for client style - m_clientWindow->CreateClient(this, GetWindowStyleFlag()); -} - -void wxMDIParentFrame::MSWOnSize(int x, int y, WXUINT id) -{ - switch (id) - { - case SIZEFULLSCREEN: - case SIZENORMAL: - m_iconized = FALSE; - break; - case SIZEICONIC: - m_iconized = TRUE; - break; - } - - if (!m_iconized) - { - // forward WM_SIZE to status bar control -#if USE_NATIVE_STATUSBAR - if (m_frameStatusBar && m_frameStatusBar->IsKindOf(CLASSINFO(wxStatusBar95))) - { - wxSizeEvent event(wxSize(x, y), m_frameStatusBar->GetId()); - event.SetEventObject( m_frameStatusBar ); - - ((wxStatusBar95 *)m_frameStatusBar)->OnSize(event); - } -#endif - - PositionStatusBar(); - PositionToolBar(); - - wxSizeEvent event(wxSize(x, y), m_windowId); - event.SetEventObject( this ); - if (!GetEventHandler()->ProcessEvent(event)) - Default(); - } -} - -bool wxMDIParentFrame::MSWOnActivate(int state, bool minimized, WXHWND activate) -{ - wxWindow::MSWOnActivate(state, minimized, activate); - - // If this window is an MDI parent, we must also send an OnActivate message - // to the current child. - if ((m_currentChild != NULL) && ((state == WA_ACTIVE) || (state == WA_CLICKACTIVE))) - { - wxActivateEvent event(wxEVT_ACTIVATE, TRUE, m_currentChild->GetId()); - event.SetEventObject( m_currentChild ); - m_currentChild->GetEventHandler()->ProcessEvent(event); - } - return 0; -} - -bool wxMDIParentFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control) -{ -// if (cmd == 0) // Why did I do this test? - { - // In case it's e.g. a toolbar. - wxWindow *win = wxFindWinFromHandle(control); - if (win) - return win->MSWCommand(cmd, id); - - if (wxCurrentPopupMenu) - { - wxMenu *popupMenu = wxCurrentPopupMenu; - wxCurrentPopupMenu = NULL; - if (!popupMenu->MSWCommand(cmd, id)) - return TRUE; - } - - switch (id) - { - case IDM_WINDOWCASCADE: - SendMessage((HWND) GetClientWindow()->GetHWND(), WM_MDICASCADE, MDITILE_SKIPDISABLED, 0); - return TRUE; - case IDM_WINDOWTILE: - SendMessage((HWND) GetClientWindow()->GetHWND(), WM_MDITILE, MDITILE_HORIZONTAL, 0); - return TRUE; - case IDM_WINDOWICONS: - SendMessage((HWND) GetClientWindow()->GetHWND(), WM_MDIICONARRANGE, 0, 0); - return TRUE; - case IDM_WINDOWNEXT: - SendMessage((HWND) GetClientWindow()->GetHWND(), WM_MDINEXT, 0, 0); - return TRUE; - default: - break; - } - if (id >= 0xF000) - { -#if WXDEBUG > 1 - wxDebugMsg("wxMDIFrame::OnCommand %d: system command: calling default window proc\n", GetHWND()); -#endif - return FALSE; // Get WndProc to call default proc - } - - if (m_parentFrameActive && (id < wxFIRST_MDI_CHILD || id > wxLAST_MDI_CHILD)) - { - ProcessCommand(id); - return TRUE; - } - else if (m_currentChild && (id < wxFIRST_MDI_CHILD || id > wxLAST_MDI_CHILD)) - { -#if WXDEBUG > 1 - wxDebugMsg("wxMDIFrame::MSWOnCommand %d: calling child OnCommand\n", GetHWND()); -#endif - return m_currentChild->MSWOnCommand(id, cmd, control); - } - } - if (id >= wxFIRST_MDI_CHILD && id <= wxLAST_MDI_CHILD) - { - wxNode* node = GetChildren()->First(); - while (node) - { - wxWindow* child = (wxWindow*) node->Data(); - if (child->GetHWND()) - { -#ifdef __WIN32__ - long childId = GetWindowLong((HWND) child->GetHWND(), GWL_ID); -#else - long childId = GetWindowWord((HWND) child->GetHWND(), GWW_ID); -#endif - if (childId == id) - { - ::SendMessage( (HWND) GetClientWindow()->GetHWND(), WM_MDIACTIVATE, (WPARAM) (HWND) child->GetHWND(), 0); - return TRUE; - } - } - node = node->Next(); - } -/* - wxWindow* child = FindItem(id); - if (child) - { - ::SendMessage( (HWND) GetClientWindow()->GetHWND(), WM_MDIACTIVATE, (WPARAM) (HWND) child->GetHWND(), 0); - return TRUE; - } -*/ - } - - return FALSE; -} - -void wxMDIParentFrame::MSWOnMenuHighlight(WXWORD nItem, WXWORD nFlags, WXHMENU hSysMenu) -{ - if (m_parentFrameActive) - { - if (nFlags == 0xFFFF && hSysMenu == (WXHMENU) NULL) - { - wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, -1); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); - } - else if (nFlags != MF_SEPARATOR) - { - wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, nItem); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); - } - } - else if (m_currentChild) - { - m_currentChild->MSWOnMenuHighlight(nItem, nFlags, hSysMenu); - } -} - -long wxMDIParentFrame::MSWDefWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ - WXHWND clientWnd; - if ( GetClientWindow() ) - clientWnd = GetClientWindow()->GetHWND(); - else - clientWnd = 0; - - return DefFrameProc((HWND) GetHWND(), (HWND) clientWnd, message, wParam, lParam); -} - -bool wxMDIParentFrame::MSWProcessMessage(WXMSG* msg) -{ - MSG *pMsg = (MSG *)msg; - - if ((m_currentChild != (wxWindow *)NULL) && (m_currentChild->GetHWND() != (WXHWND) NULL) && m_currentChild->MSWProcessMessage(msg)) - return TRUE; - - return FALSE; -} - -bool wxMDIParentFrame::MSWTranslateMessage(WXMSG* msg) -{ - MSG *pMsg = (MSG *)msg; - - if ((m_currentChild != (wxWindow *)NULL) && (m_currentChild->GetHWND() != (WXHWND) NULL) && m_currentChild->MSWTranslateMessage(msg)) - return TRUE; - - if (m_acceleratorTable.Ok() && - ::TranslateAccelerator((HWND) GetHWND(), (HACCEL) m_acceleratorTable.GetHACCEL(), pMsg)) - return TRUE; - - if (pMsg->message == WM_KEYDOWN || pMsg->message == WM_SYSKEYDOWN) - { - if (::TranslateMDISysAccel((HWND) GetClientWindow()->GetHWND(), pMsg)) - return TRUE; - } - - return FALSE; -} - - -bool wxMDIParentFrame::MSWOnEraseBkgnd(WXHDC WXUNUSED(pDC)) -{ - return TRUE; -} - -extern wxWindow *wxWndHook; -extern wxList *wxWinHandleList; - -wxMDIChildFrame::wxMDIChildFrame(void) -{ -// m_active = FALSE; -} - -bool wxMDIChildFrame::Create(wxMDIParentFrame *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - m_defaultIcon = (WXHICON) (wxSTD_MDICHILDFRAME_ICON ? wxSTD_MDICHILDFRAME_ICON : wxDEFAULT_MDICHILDFRAME_ICON); - - SetName(name); - - if ( id > -1 ) - m_windowId = id; - else - m_windowId = (int)NewControlId(); - - if (parent) parent->AddChild(this); - - wxWndHook = this; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - MDICREATESTRUCT mcs; - - mcs.szClass = wxMDIChildFrameClassName; - mcs.szTitle = title; - mcs.hOwner = wxGetInstance(); - if (x > -1) mcs.x = x; - else mcs.x = CW_USEDEFAULT; - - if (y > -1) mcs.y = y; - else mcs.y = CW_USEDEFAULT; - - if (width > -1) mcs.cx = width; - else mcs.cx = CW_USEDEFAULT; - - if (height > -1) mcs.cy = height; - else mcs.cy = CW_USEDEFAULT; - - DWORD msflags = WS_OVERLAPPED | WS_CLIPCHILDREN ; - if (style & wxMINIMIZE_BOX) - msflags |= WS_MINIMIZEBOX; - if (style & wxMAXIMIZE_BOX) - msflags |= WS_MAXIMIZEBOX; - if (style & wxTHICK_FRAME) - msflags |= WS_THICKFRAME; - if (style & wxSYSTEM_MENU) - msflags |= WS_SYSMENU; - if ((style & wxMINIMIZE) || (style & wxICONIZE)) - msflags |= WS_MINIMIZE; - if (style & wxMAXIMIZE) - msflags |= WS_MAXIMIZE; - if (style & wxCAPTION) - msflags |= WS_CAPTION; - - mcs.style = msflags; - - mcs.lParam = 0; - - DWORD Return = SendMessage((HWND) parent->GetClientWindow()->GetHWND(), - WM_MDICREATE, 0, (LONG)(LPSTR)&mcs); - - //handle = (HWND)LOWORD(Return); - // Must be the DWORRD for WIN32. And in 16 bits, HIWORD=0 (says Microsoft) - m_hWnd = (WXHWND)Return; - - // This gets reassigned so can't be stored -// m_windowId = GetWindowLong((HWND) m_hWnd, GWL_ID); - - wxWndHook = NULL; - wxWinHandleList->Append((long)GetHWND(), this); - - SetWindowLong((HWND) GetHWND(), 0, (long)this); - - wxModelessWindows.Append(this); - return TRUE; -} - -wxMDIChildFrame::~wxMDIChildFrame(void) -{ - MSWDestroyWindow(); - - ResetWindowStyle(NULL); -} - -// Set the client size (i.e. leave the calculation of borders etc. -// to wxWindows) -void wxMDIChildFrame::SetClientSize(int width, int height) -{ - HWND hWnd = (HWND) GetHWND(); - - RECT rect; - GetClientRect(hWnd, &rect); - - RECT rect2; - GetWindowRect(hWnd, &rect2); - - // Find the difference between the entire window (title bar and all) - // and the client area; add this to the new client size to move the - // window - int actual_width = rect2.right - rect2.left - rect.right + width; - int actual_height = rect2.bottom - rect2.top - rect.bottom + height; - - if (GetStatusBar()) - { - int sx, sy; - GetStatusBar()->GetSize(&sx, &sy); - actual_height += sy; - } - - POINT point; - point.x = rect2.left; - point.y = rect2.top; - - // If there's an MDI parent, must subtract the parent's top left corner - // since MoveWindow moves relative to the parent - wxMDIParentFrame *mdiParent = (wxMDIParentFrame *)GetParent(); - ::ScreenToClient((HWND) mdiParent->GetClientWindow()->GetHWND(), &point); - - MoveWindow(hWnd, point.x, point.y, actual_width, actual_height, (BOOL)TRUE); - - wxSizeEvent event(wxSize(width, height), m_windowId); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); -} - -void wxMDIChildFrame::GetPosition(int *x, int *y) const -{ - RECT rect; - GetWindowRect((HWND) GetHWND(), &rect); - POINT point; - point.x = rect.left; - point.y = rect.top; - - // Since we now have the absolute screen coords, - // if there's a parent we must subtract its top left corner - wxMDIParentFrame *mdiParent = (wxMDIParentFrame *)GetParent(); - ::ScreenToClient((HWND) mdiParent->GetClientWindow()->GetHWND(), &point); - - *x = point.x; - *y = point.y; -} - -void wxMDIChildFrame::SetMenuBar(wxMenuBar *menu_bar) -{ - if (!menu_bar) - { - m_frameMenuBar = NULL; - return; - } - - if (menu_bar->m_menuBarFrame) - return; - - int i; - HMENU menu = CreateMenu(); - - for (i = 0; i < menu_bar->m_menuCount; i ++) - { - HMENU popup = (HMENU)menu_bar->m_menus[i]->m_hMenu; - // - // After looking Bounds Checker result, it seems that all - // menus must be individually destroyed. So, don't reset m_hMenu, - // to allow ~wxMenu to do the job. - // - menu_bar->m_menus[i]->m_savehMenu = (WXHMENU) popup; - // Uncommenting for the moment... JACS - menu_bar->m_menus[i]->m_hMenu = 0; - ::AppendMenu((HMENU) menu, MF_POPUP | MF_STRING, (UINT)popup, menu_bar->m_titles[i]); - } - - menu_bar->m_hMenu = (WXHMENU)menu; - if (m_frameMenuBar) - delete m_frameMenuBar; - - this->m_hMenu = (WXHMENU) menu; - - wxMDIParentFrame *parent = (wxMDIParentFrame *)GetParent(); - - parent->m_parentFrameActive = FALSE; - HMENU subMenu = GetSubMenu((HMENU) parent->GetWindowMenu(), 0); - - // Try to insert Window menu in front of Help, otherwise append it. - int N = GetMenuItemCount(menu); - bool success = FALSE; - for (i = 0; i < N; i++) - { - char buf[100]; - int chars = GetMenuString(menu, i, buf, 100, MF_BYPOSITION); - if ((chars > 0) && (strcmp(buf, "&Help") == 0 || - strcmp(buf, "Help") == 0)) - { - success = TRUE; - InsertMenu(menu, i, MF_BYPOSITION | MF_POPUP | MF_STRING, - (UINT)subMenu, "&Window"); - break; - } - } - if (!success) - AppendMenu(menu, MF_POPUP, - (UINT)subMenu, - "&Window"); -#ifdef __WIN32__ - SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDISETMENU, - (WPARAM)menu, - (LPARAM)subMenu); -#else - SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDISETMENU, 0, - MAKELPARAM(menu, subMenu)); -#endif - - DrawMenuBar((HWND) parent->GetHWND()); - m_frameMenuBar = menu_bar; - menu_bar->m_menuBarFrame = this; -} - -// MDI operations -void wxMDIChildFrame::Maximize(void) -{ - wxMDIParentFrame *parent = (wxMDIParentFrame *)GetParent(); - if ( parent && parent->GetClientWindow() ) - ::SendMessage( (HWND) parent->GetClientWindow()->GetHWND(), WM_MDIMAXIMIZE, (WPARAM) (HWND) GetHWND(), 0); -} - -void wxMDIChildFrame::Restore(void) -{ - wxMDIParentFrame *parent = (wxMDIParentFrame *)GetParent(); - if ( parent && parent->GetClientWindow() ) - ::SendMessage( (HWND) parent->GetClientWindow()->GetHWND(), WM_MDIRESTORE, (WPARAM) (HWND) GetHWND(), 0); -} - -void wxMDIChildFrame::Activate(void) -{ - wxMDIParentFrame *parent = (wxMDIParentFrame *)GetParent(); - if ( parent && parent->GetClientWindow() ) - ::SendMessage( (HWND) parent->GetClientWindow()->GetHWND(), WM_MDIACTIVATE, (WPARAM) (HWND) GetHWND(), 0); -} - -static HWND invalidHandle = 0; -void wxMDIChildFrame::MSWOnSize(int x, int y, WXUINT id) -{ - if (!GetHWND()) return; - - if (invalidHandle == (HWND) GetHWND()) - { -#if WXDEBUG > 1 - wxDebugMsg("wxMDIChildFrame::OnSize %d: invalid, so returning.\n", GetHWND()); -#endif - return; - } - - (void)MSWDefWindowProc(m_lastMsg, m_lastWParam, m_lastLParam); - - switch (id) - { - case SIZEFULLSCREEN: - case SIZENORMAL: - m_iconized = FALSE; - break; - case SIZEICONIC: - m_iconized = TRUE; - break; - } - - if (!m_iconized) - { - // forward WM_SIZE to status bar control -#if USE_NATIVE_STATUSBAR - if (m_frameStatusBar && m_frameStatusBar->IsKindOf(CLASSINFO(wxStatusBar95))) - { - wxSizeEvent event(wxSize(x, y), m_frameStatusBar->GetId()); - event.SetEventObject( m_frameStatusBar ); - - ((wxStatusBar95 *)m_frameStatusBar)->OnSize(event); - } -#endif - - PositionStatusBar(); - PositionToolBar(); - - wxWindow::MSWOnSize(x, y, id); - } -} - -bool wxMDIChildFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control) -{ -#if WXDEBUG > 1 - wxDebugMsg("wxMDIChildFrame::MSWOnCommand %d\n", GetHWND()); -#endif -// if ((cmd == 0) && GetHWND()) - if (GetHWND()) - { - // In case it's e.g. a toolbar. - wxWindow *win = wxFindWinFromHandle(control); - if (win) - return win->MSWCommand(cmd, id); - - if (wxCurrentPopupMenu) - { - wxMenu *popupMenu = wxCurrentPopupMenu; - wxCurrentPopupMenu = NULL; - if (popupMenu->MSWCommand(cmd, id)) - return TRUE; - } - - if (GetMenuBar() && GetMenuBar()->FindItemForId(id)) - { - ProcessCommand(id); - return TRUE; - } - else - return FALSE; - return TRUE; - } - else - return FALSE; -} - -long wxMDIChildFrame::MSWDefWindowProc(WXUINT message, WXUINT wParam, WXLPARAM lParam) -{ - if (GetHWND()) - return DefMDIChildProc((HWND) GetHWND(), (UINT) message, (WPARAM) wParam, (LPARAM) lParam); - else return 0; -} - -bool wxMDIChildFrame::MSWProcessMessage(WXMSG *msg) -{ - return FALSE; -} - -bool wxMDIChildFrame::MSWTranslateMessage(WXMSG* msg) -{ - MSG *pMsg = (MSG *)msg; - if (m_acceleratorTable.Ok()) - { - wxFrame *parent = (wxFrame *)GetParent(); - HWND parent_hwnd = (HWND) parent->GetHWND(); - return (::TranslateAccelerator(parent_hwnd, (HACCEL) m_acceleratorTable.GetHACCEL(), pMsg) != 0); - } - - return FALSE; -} - -long wxMDIChildFrame::MSWOnMDIActivate(long activate, WXHWND WXUNUSED(one), WXHWND WXUNUSED(two)) -{ - wxMDIParentFrame *parent = (wxMDIParentFrame *)GetParent(); - HMENU parent_menu = (HMENU) parent->GetWinMenu(); -#if WXDEBUG > 1 - wxDebugMsg("Parent menu is %d\n", parent_menu); -#endif - HMENU child_menu = (HMENU) GetWinMenu(); -#if WXDEBUG > 1 - wxDebugMsg("Child menu is %d\n", child_menu); -#endif - - if (activate) - { -// m_active = TRUE; - parent->m_currentChild = this; - if (child_menu) - { - parent->m_parentFrameActive = FALSE; - HMENU subMenu = GetSubMenu((HMENU) parent->GetWindowMenu(), 0); -#if WXDEBUG > 1 - wxDebugMsg("Window submenu is %d\n", subMenu); -#endif -// HMENU subMenu = 0; -#ifdef __WIN32__ - ::SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDISETMENU, - (WPARAM)child_menu, - (LPARAM)subMenu); -#else - ::SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDISETMENU, 0, - MAKELONG(child_menu, subMenu)); -#endif - - ::DrawMenuBar((HWND) parent->GetHWND()); - } - wxActivateEvent event(wxEVT_ACTIVATE, TRUE, m_windowId); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); - } - else - { - if (parent->m_currentChild == this) - parent->m_currentChild = NULL; - - wxActivateEvent event(wxEVT_ACTIVATE, FALSE, m_windowId); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); - -// m_active = FALSE; - if (parent_menu) - { - parent->m_parentFrameActive = TRUE; - HMENU subMenu = GetSubMenu((HMENU) parent->GetWindowMenu(), 0); -#if WXDEBUG > 1 - wxDebugMsg("Window submenu is %d\n", subMenu); -#endif -// HMENU subMenu = 0; -#ifdef __WIN32__ - ::SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDISETMENU, - (WPARAM)parent_menu, - (LPARAM)subMenu); -#else - ::SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDISETMENU, 0, - MAKELONG(parent_menu, subMenu)); -#endif - - ::DrawMenuBar((HWND) parent->GetHWND()); - } - } - bool flag = (activate != 0); - wxActivateEvent event(wxEVT_ACTIVATE, flag, m_windowId); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); - -#if WXDEBUG > 1 - wxDebugMsg("Finished (de)activating\n"); -#endif - return 0; -} - -void wxMDIChildFrame::MSWDestroyWindow(void) -{ - MSWDetachWindowMenu(); - invalidHandle = (HWND) GetHWND(); - - wxMDIParentFrame *parent = (wxMDIParentFrame *)GetParent(); - - // Must make sure this handle is invalidated (set to NULL) - // since all sorts of things could happen after the - // child client is destroyed, but before the wxFrame is - // destroyed. - - HWND oldHandle = (HWND)GetHWND(); -#if WXDEBUG > 1 - wxDebugMsg("*** About to DestroyWindow MDI child %d\n", oldHandle); -#endif -#ifdef __WIN32__ - SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDIDESTROY, (WPARAM)oldHandle, (LPARAM)0); -#else - SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDIDESTROY, (HWND)oldHandle, 0); -#endif -#if WXDEBUG > 1 - wxDebugMsg("*** Finished DestroyWindow MDI child %d\n", oldHandle); -#endif - invalidHandle = 0; - - if (m_hMenu) - { - ::DestroyMenu((HMENU) m_hMenu); - m_hMenu = 0; - } - m_hWnd = 0; -} - -// Change the client window's extended style so we don't -// get a client edge style when a child is maximised (a double -// border looks silly.) -bool wxMDIChildFrame::ResetWindowStyle(void *vrect) -{ -#if defined(__WIN95__) - RECT *rect = (RECT *)vrect; - wxMDIParentFrame* pFrameWnd = (wxMDIParentFrame *)GetParent(); - wxMDIChildFrame* pChild = pFrameWnd->GetActiveChild(); - if (!pChild || (pChild == this)) - { - DWORD dwStyle = ::GetWindowLong((HWND) pFrameWnd->GetClientWindow()->GetHWND(), GWL_EXSTYLE); - DWORD dwThisStyle = ::GetWindowLong((HWND) GetHWND(), GWL_STYLE); - DWORD dwNewStyle = dwStyle; - if (pChild != NULL && (dwThisStyle & WS_MAXIMIZE)) - dwNewStyle &= ~(WS_EX_CLIENTEDGE); - else - dwNewStyle |= WS_EX_CLIENTEDGE; - - if (dwStyle != dwNewStyle) - { - ::RedrawWindow((HWND) pFrameWnd->GetClientWindow()->GetHWND(), NULL, NULL, RDW_INVALIDATE | RDW_ALLCHILDREN); - ::SetWindowLong((HWND) pFrameWnd->GetClientWindow()->GetHWND(), GWL_EXSTYLE, dwNewStyle); - ::SetWindowPos((HWND) pFrameWnd->GetClientWindow()->GetHWND(), NULL, 0, 0, 0, 0, - SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOCOPYBITS); - if (rect) - ::GetClientRect((HWND) pFrameWnd->GetClientWindow()->GetHWND(), rect); - return TRUE; - } - } - return FALSE; -#else - return FALSE; -#endif -} - -void wxMDIChildFrame::MSWOnWindowPosChanging(void *pos) -{ - WINDOWPOS *lpPos = (WINDOWPOS *)pos; -#if defined(__WIN95__) - if (!(lpPos->flags & SWP_NOSIZE)) - { - RECT rectClient; - DWORD dwExStyle = ::GetWindowLong((HWND) GetHWND(), GWL_EXSTYLE); - DWORD dwStyle = ::GetWindowLong((HWND) GetHWND(), GWL_STYLE); - if (ResetWindowStyle((void *) & rectClient) && (dwStyle & WS_MAXIMIZE)) - { - ::AdjustWindowRectEx(&rectClient, dwStyle, FALSE, dwExStyle); - lpPos->x = rectClient.left; - lpPos->y = rectClient.top; - lpPos->cx = rectClient.right - rectClient.left; - lpPos->cy = rectClient.bottom - rectClient.top; - } - wxMDIParentFrame* pFrameWnd = (wxMDIParentFrame *)GetParent(); - if (pFrameWnd && pFrameWnd->GetToolBar()) - { - pFrameWnd->GetToolBar()->Refresh(); - } - } -#endif - Default(); -} - -// Client window -wxMDIClientWindow::wxMDIClientWindow(void) -{ - m_scrollX = 0; - m_scrollY = 0; -} - -wxMDIClientWindow::~wxMDIClientWindow(void) -{ -} - -bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style) -{ - m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE); - - CLIENTCREATESTRUCT ccs; - m_windowStyle = style; - m_windowParent = parent; - - ccs.hWindowMenu = (HMENU) parent->GetWindowMenu(); - ccs.idFirstChild = wxFIRST_MDI_CHILD; - - DWORD msStyle = WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN ; - if ( parent->GetWindowStyleFlag() & wxHSCROLL ) - msStyle |= WS_HSCROLL; - if ( parent->GetWindowStyleFlag() & wxVSCROLL ) - msStyle |= WS_VSCROLL ; - -#if defined(__WIN95__) - DWORD exStyle = WS_EX_CLIENTEDGE; -#else - DWORD exStyle = 0; -#endif - - wxWndHook = this; - m_hWnd = (WXHWND) ::CreateWindowEx(exStyle, "mdiclient", NULL, - msStyle, 0, 0, 0, 0, (HWND) parent->GetHWND(), NULL, - wxGetInstance(), (LPSTR)(LPCLIENTCREATESTRUCT)&ccs); - SubclassWin(m_hWnd); - wxWndHook = NULL; - - return (m_hWnd != 0) ; -} - -// Window procedure: here for debugging purposes -long wxMDIClientWindow::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) -{ - return wxWindow::MSWWindowProc(nMsg, wParam, lParam); -// return MSWDefWindowProc(nMsg, wParam, lParam); -} - -long wxMDIClientWindow::MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) -{ - if ( MSWGetOldWndProc() != 0) - return ::CallWindowProc(CASTWNDPROC MSWGetOldWndProc(), (HWND) GetHWND(), (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam); - else - return ::DefWindowProc((HWND) m_hWnd, (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam); -} - -// Explicitly call default scroll behaviour -void wxMDIClientWindow::OnScroll(wxScrollEvent& event) -{ - // Note: for client windows, the scroll position is not set in - // WM_HSCROLL, WM_VSCROLL, so we can't easily determine what - // scroll position we're at. - // This makes it hard to paint patterns or bitmaps in the background, - // and have the client area scrollable as well. - - if ( event.GetOrientation() == wxHORIZONTAL ) - m_scrollX = event.GetPosition(); // Always returns zero! - else - m_scrollY = event.GetPosition(); // Always returns zero! - - Default(); -} - -// Should hand the message to the default proc -long wxMDIClientWindow::MSWOnMDIActivate(long bActivate, WXHWND, WXHWND) -{ - return Default(); -} - diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp deleted file mode 100644 index 097a123854..0000000000 --- a/src/msw/menu.cpp +++ /dev/null @@ -1,902 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: menu.cpp -// Purpose: wxMenu, wxMenuBar, wxMenuItem -// Author: Julian Smart -// Modified by: Vadim Zeitlin -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - - -// ============================================================================ -// headers & declarations -// ============================================================================ - -// wxWindows headers -// ----------------- - -#ifdef __GNUG__ -#pragma implementation "menu.h" -#pragma implementation "menuitem.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/frame.h" -#include "wx/menu.h" -#include "wx/utils.h" -#endif - -#if USE_OWNER_DRAWN -#include "wx/ownerdrw.h" -#endif - -#include "wx/msw/private.h" -#include "wx/msw/menu.h" -#include "wx/menuitem.h" -#include "wx/log.h" - -// other standard headers -// ---------------------- -#include - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxMenu, wxEvtHandler) -IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxEvtHandler) -#endif - -// ============================================================================ -// implementation -// ============================================================================ - -// Menus - -// Construct a menu with optional title (then use append) -wxMenu::wxMenu(const wxString& Title, const wxFunction func) -{ - m_title = Title; - m_parent = NULL; - m_eventHandler = this; - m_pInvokingWindow = NULL; - m_doBreak = FALSE ; - m_noItems = 0; - m_menuBar = NULL; - m_hMenu = (WXHMENU) CreatePopupMenu(); - m_savehMenu = 0 ; - m_topLevelMenu = this; - if (m_title != "") - { - Append(-2, m_title) ; - AppendSeparator() ; - } - - Callback(func); -} - -// The wxWindow destructor will take care of deleting the submenus. -wxMenu::~wxMenu(void) -{ - if (m_hMenu) - DestroyMenu((HMENU) m_hMenu); - m_hMenu = 0; - - // Windows seems really bad on Menu de-allocation... - // After many try, here is what I do: RemoveMenu() will ensure - // that popup are "disconnected" from their parent; then call - // delete method on each child (which in turn do a recursive job), - // and finally, DestroyMenu() - // - // With that, BoundCheckers is happy, and no complaints... -/* - int N = 0 ; - if (m_hMenu) - N = GetMenuItemCount(m_hMenu); - int i; - for (i = N-1; i >= 0; i--) - RemoveMenu(m_hMenu, i, MF_BYPOSITION); -*/ - - // How is deleting submenus in this loop any different from deleting - // the submenus in the children list, via ~wxWindow ? - // I'll reinstate this deletion for now and remove addition - // from children list (which doesn't exist now) - // Julian 1/3/97 - wxNode *node = m_menuItems.First(); - while (node) - { - wxMenuItem *item = (wxMenuItem *)node->Data(); - - // Delete child menus. - // Beware: they must not be appended to children list!!! - // (because order of delete is significant) - if (item->GetSubMenu()) - item->DeleteSubMenu(); - - wxNode *next = node->Next(); - delete item; - delete node; - node = next; - } -/* - if (m_hMenu) - DestroyMenu(m_hMenu); - m_hMenu = 0; -*/ -} - -void wxMenu::Break(void) -{ - m_doBreak = TRUE ; -} - -// function appends a new item or submenu to the menu -void wxMenu::Append(wxMenuItem *pItem) -{ - wxCHECK_RET( pItem != NULL, "can't append NULL item to the menu" ); - - m_menuItems.Append(pItem); - - UINT flags = 0; - - if ( m_doBreak ) { - flags |= MF_MENUBREAK; - m_doBreak = FALSE; - } - - if ( pItem->IsSeparator() ) { - flags |= MF_SEPARATOR; - } - - // id is the numeric id for normal menu items and HMENU for submenus - UINT id; - wxMenu *SubMenu = pItem->GetSubMenu(); - if ( SubMenu != NULL ) { - wxASSERT( SubMenu->m_hMenu != (WXHMENU) NULL ); - - id = (UINT)SubMenu->m_hMenu; - - SubMenu->m_topLevelMenu = m_topLevelMenu; - SubMenu->m_parent = this; - SubMenu->m_savehMenu = (WXHMENU)id; - SubMenu->m_hMenu = 0; - - flags |= MF_POPUP; - } - else { - id = pItem->GetId(); - } - - LPCSTR pData; - wxString name(""); - -#if USE_OWNER_DRAWN - if ( pItem->IsOwnerDrawn() ) { // want to get {Measure|Draw}Item messages? - // item draws itself, pass pointer to it in data parameter - flags |= MF_OWNERDRAW; - pData = (LPCSTR)pItem; - } - else -#endif - { - // menu is just a normal string (passed in data parameter) - flags |= MF_STRING; - name = pItem->GetName(); - pData = (const char*) name; - } - - // VZ: what does this magic -2 mean? I just copied the code but have no idea - // about what it does... ### - if ( pItem->GetId() == -2 ) { - flags |= MF_DISABLED | MF_GRAYED; - } - - HMENU hMenu = (HMENU)((m_hMenu == 0) ? m_savehMenu : m_hMenu); - - if ( !AppendMenu(hMenu, flags, id, pData) ) - { - // wxLogLastError("AppendMenu"); - } - - m_noItems++; -} - -void wxMenu::AppendSeparator(void) -{ - Append(new wxMenuItem(this, ID_SEPARATOR)); -} - -// Pullright item -void wxMenu::Append(int Id, const wxString& label, wxMenu *SubMenu, - const wxString& helpString) -{ - Append(new wxMenuItem(this, Id, label, helpString, FALSE, SubMenu)); -} - -// Ordinary menu item -void wxMenu::Append(int Id, const wxString& label, - const wxString& helpString, bool checkable) -{ - // 'checkable' parameter is useless for Windows. - Append(new wxMenuItem(this, Id, label, helpString, checkable)); -} - -void wxMenu::Delete(int id) -{ - wxNode *node; - wxMenuItem *item; - int pos; - HMENU menu; - - for (pos = 0, node = m_menuItems.First(); node; node = node->Next(), pos++) { - item = (wxMenuItem *)node->Data(); - if (item->GetId() == id) - break; - } - - if (!node) - return; - - menu = (HMENU)(m_hMenu ? m_hMenu : m_savehMenu); - - wxMenu *pSubMenu = item->GetSubMenu(); - if ( pSubMenu != NULL ) { - RemoveMenu(menu, (UINT)pos, MF_BYPOSITION); - pSubMenu->m_hMenu = pSubMenu->m_savehMenu; - pSubMenu->m_savehMenu = 0; - pSubMenu->m_parent = NULL; - // RemoveChild(item->subMenu); - pSubMenu->m_topLevelMenu = NULL; - // TODO: Why isn't subMenu deleted here??? - // Will put this in for now. Assuming this is supposed - // to delete the menu, not just remove it. - item->DeleteSubMenu(); - } - else { - DeleteMenu(menu, (UINT)pos, MF_BYPOSITION); - } - - m_menuItems.DeleteNode(node); - delete item; -} - -void wxMenu::Enable(int Id, bool Flag) -{ - wxMenuItem *item = FindItemForId(Id); - wxCHECK_RET( item != NULL, "can't enable non-existing menu item" ); - - item->Enable(Flag); -} - -bool wxMenu::Enabled(int Id) const -{ - wxMenuItem *item = FindItemForId(Id); - wxCHECK( item != NULL, FALSE ); - - return item->IsEnabled(); -} - -void wxMenu::Check(int Id, bool Flag) -{ - wxMenuItem *item = FindItemForId(Id); - wxCHECK_RET( item != NULL, "can't get status of non-existing menu item" ); - - item->Check(Flag); -} - -bool wxMenu::Checked(int Id) const -{ - wxMenuItem *item = FindItemForId(Id); - wxCHECK( item != NULL, FALSE ); - - return item->IsChecked(); -} - -void wxMenu::SetTitle(const wxString& label) -{ - m_title = label ; - if (m_hMenu) - ModifyMenu((HMENU)m_hMenu, 0, - MF_BYPOSITION | MF_STRING | MF_DISABLED, - (UINT)-2, (const char *)m_title); - else if (m_savehMenu) - ModifyMenu((HMENU)m_savehMenu, 0, - MF_BYPOSITION | MF_STRING | MF_DISABLED, - (UINT)-2, (const char *)m_title); -} - -const wxString wxMenu::GetTitle() const -{ - return m_title; -} - -void wxMenu::SetLabel(int Id, const wxString& label) -{ - wxMenuItem *item = FindItemForId(Id) ; - if (item==NULL) - return; - - if (item->GetSubMenu()==NULL) - { - if (m_hMenu) - { - UINT was_flag = GetMenuState((HMENU)m_hMenu,Id,MF_BYCOMMAND) ; - ModifyMenu((HMENU)m_hMenu,Id,MF_BYCOMMAND|MF_STRING|was_flag,Id,(const char *)label) ; - } - else if (m_savehMenu) - { - UINT was_flag = GetMenuState((HMENU)m_savehMenu,Id,MF_BYCOMMAND) ; - ModifyMenu((HMENU)m_savehMenu,Id,MF_BYCOMMAND|MF_STRING|was_flag,Id,(const char *)label) ; - } - } - else - { - wxMenu *father = item->GetSubMenu()->m_topLevelMenu ; - wxNode *node = father->m_menuItems.First() ; - int i = 0 ; - while (node) - { - wxMenuItem *matched = (wxMenuItem*)node->Data() ; - if (matched==item) - break ; - i++ ; - node = node->Next() ; - } - // Here, we have the position. - ModifyMenu((HMENU)father->m_savehMenu,i, - MF_BYPOSITION|MF_STRING|MF_POPUP, - (UINT)item->GetSubMenu()->m_savehMenu,(const char *)label) ; - } - item->SetName(label); -} - -wxString wxMenu::GetLabel(int Id) const -{ - static char tmp[128] ; - int len; - if (m_hMenu) - len = GetMenuString((HMENU)m_hMenu,Id,tmp,WXSIZEOF(tmp) - 1,MF_BYCOMMAND); - else if (m_savehMenu) - len = GetMenuString((HMENU)m_savehMenu,Id,tmp,WXSIZEOF(tmp) - 1,MF_BYCOMMAND); - else - len = 0 ; - tmp[len] = '\0' ; - return wxString(tmp) ; -} - -bool wxMenu::MSWCommand(WXUINT WXUNUSED(param), WXWORD id) -{ - wxCommandEvent event(wxEVENT_TYPE_MENU_COMMAND); - event.SetEventObject( this ); - event.SetId( id ); - event.SetInt( id ); - ProcessCommand(event); - return TRUE; -} - -// Finds the item id matching the given string, -1 if not found. -int wxMenu::FindItem (const wxString& itemString) const -{ - char buf1[200]; - char buf2[200]; - wxStripMenuCodes ((char *)(const char *)itemString, buf1); - - for (wxNode * node = m_menuItems.First (); node; node = node->Next ()) - { - wxMenuItem *item = (wxMenuItem *) node->Data (); - if (item->GetSubMenu()) - { - int ans = item->GetSubMenu()->FindItem(itemString); - if (ans > -1) - return ans; - } - if ( !item->IsSeparator() ) - { - wxStripMenuCodes((char *)item->GetName().c_str(), buf2); - if (strcmp(buf1, buf2) == 0) - return item->GetId(); - } - } - - return -1; -} - -wxMenuItem *wxMenu::FindItemForId(int itemId, wxMenu ** itemMenu) const -{ - if (itemMenu) - *itemMenu = NULL; - for (wxNode * node = m_menuItems.First (); node; node = node->Next ()) - { - wxMenuItem *item = (wxMenuItem *) node->Data (); - - if (item->GetId() == itemId) - { - if (itemMenu) - *itemMenu = (wxMenu *) this; - return item; - } - - if (item->GetSubMenu()) - { - wxMenuItem *ans = item->GetSubMenu()->FindItemForId (itemId, itemMenu); - if (ans) - return ans; - } - } - - if (itemMenu) - *itemMenu = NULL; - return NULL; -} - -void wxMenu::SetHelpString(int itemId, const wxString& helpString) -{ - wxMenuItem *item = FindItemForId (itemId); - if (item) - item->SetHelp(helpString); -} - -wxString wxMenu::GetHelpString (int itemId) const -{ - wxMenuItem *item = FindItemForId (itemId); - wxString str(""); - return (item == NULL) ? str : item->GetHelp(); -} - -void wxMenu::ProcessCommand(wxCommandEvent & event) -{ - bool processed = FALSE; - - // Try a callback - if (m_callback) - { - (void) (*(m_callback)) (*this, event); - processed = TRUE; - } - - // Try the menu's event handler - if ( !processed && GetEventHandler()) - { - processed = GetEventHandler()->ProcessEvent(event); - } - - // Try the window the menu was popped up from (and up - // through the hierarchy) - if ( !processed && GetInvokingWindow()) - processed = GetInvokingWindow()->ProcessEvent(event); -} - -extern wxMenu *wxCurrentPopupMenu; -bool wxWindow::PopupMenu(wxMenu *menu, int x, int y) -{ - menu->SetInvokingWindow(this); - - HWND hWnd = (HWND) GetHWND(); - HMENU hMenu = (HMENU)menu->m_hMenu; - POINT point; - point.x = x; - point.y = y; - ::ClientToScreen(hWnd, &point); - wxCurrentPopupMenu = menu; - ::TrackPopupMenu(hMenu, TPM_RIGHTBUTTON, point.x, point.y, 0, hWnd, NULL); - wxYield(); - wxCurrentPopupMenu = NULL; - - menu->SetInvokingWindow(NULL); - - return TRUE; -} - -// Menu Bar -wxMenuBar::wxMenuBar(void) -{ - m_eventHandler = this; - - m_menuCount = 0; - m_menus = NULL; - m_titles = NULL; - m_menuBarFrame = NULL; - m_hMenu = 0; -} - -wxMenuBar::wxMenuBar(int N, wxMenu *Menus[], const wxString Titles[]) -{ - m_eventHandler = this; - m_menuCount = N; - m_menus = Menus; - m_titles = new wxString[N]; - int i; - for ( i = 0; i < N; i++ ) - m_titles[i] = Titles[i]; - m_menuBarFrame = NULL; - for (i = 0; i < N; i++) - m_menus[i]->m_menuBar = (wxMenuBar *) this; - - m_hMenu = 0; -} - -wxMenuBar::~wxMenuBar(void) -{ - // In fact, don't want menu to be destroyed before MDI - // shuffling has taken place. Let it be destroyed - // automatically when the window is destroyed. - -// DestroyMenu(menu); -// m_hMenu = NULL; - - int i; -/* - // See remarks in ::~wxMenu() method - // BEWARE - this may interfere with MDI fixes, so - // may need to remove - int N = 0 ; - - if (m_menuBarFrame && ((m_menuBarFrame->GetWindowStyleFlag() & wxSDI) == wxSDI)) - { - if (menu) - N = GetMenuItemCount(menu) ; - for (i = N-1; i >= 0; i--) - RemoveMenu(menu, i, MF_BYPOSITION); - } -*/ - for (i = 0; i < m_menuCount; i++) - { - delete m_menus[i]; - } - delete[] m_menus; - delete[] m_titles; - -/* Don't destroy menu here, in case we're MDI and - need to do some shuffling with VALID menu handles. - if (menu) - DestroyMenu(menu); - m_hMenu = 0; -*/ -} - -// Must only be used AFTER menu has been attached to frame, -// otherwise use individual menus to enable/disable items -void wxMenuBar::Enable(int Id, bool Flag) -{ - int ms_flag; - if (Flag) - ms_flag = MF_ENABLED; - else - ms_flag = MF_GRAYED; - - wxMenu *itemMenu = NULL; - wxMenuItem *item = FindItemForId(Id, &itemMenu) ; - if (!item) - return; - - if (itemMenu->m_hMenu) - EnableMenuItem((HMENU)itemMenu->m_hMenu, Id, MF_BYCOMMAND | ms_flag); - else if (itemMenu->m_savehMenu) - EnableMenuItem((HMENU)itemMenu->m_savehMenu, Id, MF_BYCOMMAND | ms_flag); - -} - -void wxMenuBar::EnableTop(int pos, bool flag) -{ - int ms_flag; - if (flag) - ms_flag = MF_ENABLED; - else - ms_flag = MF_GRAYED; - - EnableMenuItem((HMENU)m_hMenu, pos, MF_BYPOSITION | ms_flag); - DrawMenuBar((HWND) m_menuBarFrame->GetHWND()) ; -} - -// Must only be used AFTER menu has been attached to frame, -// otherwise use individual menus -void wxMenuBar::Check(int Id, bool Flag) -{ - wxMenu *itemMenu = NULL; - wxMenuItem *item = FindItemForId(Id, &itemMenu) ; - if (!item) - return; - - if (!item->IsCheckable()) - return ; - int ms_flag; - if (Flag) - ms_flag = MF_CHECKED; - else - ms_flag = MF_UNCHECKED; - - if (itemMenu->m_hMenu) - CheckMenuItem((HMENU)itemMenu->m_hMenu, Id, MF_BYCOMMAND | ms_flag); - else if (itemMenu->m_savehMenu) - CheckMenuItem((HMENU)itemMenu->m_savehMenu, Id, MF_BYCOMMAND | ms_flag); - -// CheckMenuItem((HMENU)m_hMenu, Id, MF_BYCOMMAND | ms_flag); -} - -bool wxMenuBar::Checked(int Id) const -{ - wxMenu *itemMenu = NULL; - wxMenuItem *item = FindItemForId(Id, &itemMenu) ; - if (!item) - return FALSE; - - int Flag ; - - if (itemMenu->m_hMenu) - Flag=GetMenuState((HMENU)itemMenu->m_hMenu, Id, MF_BYCOMMAND) ; - else if (itemMenu->m_savehMenu) - Flag=GetMenuState((HMENU)itemMenu->m_savehMenu, Id, MF_BYCOMMAND) ; - -// Flag=GetMenuState((HMENU)m_hMenu, Id, MF_BYCOMMAND) ; - - if (Flag&MF_CHECKED) - return TRUE ; - else - return FALSE ; -} - -bool wxMenuBar::Enabled(int Id) const -{ - wxMenu *itemMenu = NULL; - wxMenuItem *item = FindItemForId(Id, &itemMenu) ; - if (!item) - return FALSE; - - int Flag ; - - if (itemMenu->m_hMenu) - Flag=GetMenuState((HMENU)itemMenu->m_hMenu, Id, MF_BYCOMMAND) ; - else if (itemMenu->m_savehMenu) - Flag=GetMenuState((HMENU)itemMenu->m_savehMenu, Id, MF_BYCOMMAND) ; - - if (Flag&MF_ENABLED) - return TRUE ; - else - return FALSE ; -} - - -void wxMenuBar::SetLabel(int Id, const wxString& label) -{ - wxMenu *itemMenu = NULL; - wxMenuItem *item = FindItemForId(Id, &itemMenu) ; - - if (!item) - return; - - if (itemMenu->m_hMenu) - { - UINT was_flag = GetMenuState((HMENU)itemMenu->m_hMenu,Id,MF_BYCOMMAND) ; - ModifyMenu((HMENU)itemMenu->m_hMenu,Id,MF_BYCOMMAND|MF_STRING|was_flag,Id,(const char *)label) ; - } - else if (itemMenu->m_savehMenu) - { - UINT was_flag = GetMenuState((HMENU)itemMenu->m_savehMenu,Id,MF_BYCOMMAND) ; - ModifyMenu((HMENU)itemMenu->m_savehMenu,Id,MF_BYCOMMAND|MF_STRING|was_flag,Id,(const char *)label) ; - } -} - -wxString wxMenuBar::GetLabel(int Id) const -{ - wxMenu *itemMenu = NULL; - wxMenuItem *item = FindItemForId(Id, &itemMenu) ; - - if (!item) - return wxString(""); - - static char tmp[128] ; - int len = 0; - if (itemMenu->m_hMenu) - { - len = GetMenuString((HMENU)itemMenu->m_hMenu,Id,tmp,127,MF_BYCOMMAND) ; - } - else if (itemMenu->m_savehMenu) - { - len = GetMenuString((HMENU)itemMenu->m_savehMenu,Id,tmp,127,MF_BYCOMMAND) ; - } - -// int len = GetMenuString((HMENU)m_hMenu,Id,tmp,127,MF_BYCOMMAND) ; - tmp[len] = '\0' ; - return wxString(tmp) ; -} - -void wxMenuBar::SetLabelTop(int pos, const wxString& label) -{ - UINT was_flag = GetMenuState((HMENU)m_hMenu,pos,MF_BYPOSITION) ; - if (was_flag&MF_POPUP) - { - was_flag &= 0xff ; - HMENU popup = GetSubMenu((HMENU)m_hMenu,pos) ; - ModifyMenu((HMENU)m_hMenu,pos,MF_BYPOSITION|MF_STRING|was_flag,(UINT)popup,(const char *)label) ; - } - else - ModifyMenu((HMENU)m_hMenu,pos,MF_BYPOSITION|MF_STRING|was_flag,pos,(const char *)label) ; -} - -wxString wxMenuBar::GetLabelTop(int pos) const -{ - static char tmp[128] ; - int len = GetMenuString((HMENU)m_hMenu,pos,tmp,127,MF_BYPOSITION) ; - tmp[len] = '\0' ; - return wxString(tmp); -} - -bool wxMenuBar::OnDelete(wxMenu *a_menu, int pos) -{ - if (!m_menuBarFrame) - return TRUE; - - if (RemoveMenu((HMENU)m_hMenu, (UINT)pos, MF_BYPOSITION)) { - m_menus[pos]->m_hMenu = m_menus[pos]->m_savehMenu; - m_menus[pos]->m_savehMenu = 0; - - if (m_menuBarFrame) { - DrawMenuBar((HWND) m_menuBarFrame->GetHWND()) ; - } - - return TRUE; - } - - return FALSE; -} - -bool wxMenuBar::OnAppend(wxMenu *a_menu, const char *title) -{ - if (!a_menu->m_hMenu) - return FALSE; - - if (!m_menuBarFrame) - return TRUE; - - a_menu->m_savehMenu = a_menu->m_hMenu; - a_menu->m_hMenu = 0; - - AppendMenu((HMENU)m_hMenu, MF_POPUP | MF_STRING, (UINT)a_menu->m_savehMenu, title); - - DrawMenuBar((HWND) m_menuBarFrame->GetHWND()); - - return TRUE; -} - -void wxMenuBar::Append (wxMenu * menu, const wxString& title) -{ - if (!OnAppend(menu, title)) - return; - - m_menuCount ++; - wxMenu **new_menus = new wxMenu *[m_menuCount]; - wxString *new_titles = new wxString[m_menuCount]; - int i; - - for (i = 0; i < m_menuCount - 1; i++) - { - new_menus[i] = m_menus[i]; - m_menus[i] = NULL; - new_titles[i] = m_titles[i]; - m_titles[i] = ""; - } - if (m_menus) - { - delete[]m_menus; - delete[]m_titles; - } - m_menus = new_menus; - m_titles = new_titles; - - m_menus[m_menuCount - 1] = (wxMenu *)menu; - m_titles[m_menuCount - 1] = title; - - ((wxMenu *)menu)->m_menuBar = (wxMenuBar *) this; - ((wxMenu *)menu)->SetParent(this); -} - -void wxMenuBar::Delete(wxMenu * menu, int i) -{ - int j; - int ii = (int) i; - - if (menu != 0) { - for (ii = 0; ii < m_menuCount; ii++) { - if (m_menus[ii] == menu) - break; - } - if (ii >= m_menuCount) - return; - } else { - if (ii < 0 || ii >= m_menuCount) - return; - menu = m_menus[ii]; - } - - if (!OnDelete(menu, ii)) - return; - - menu->SetParent(NULL); - - -- m_menuCount; - for (j = ii; j < m_menuCount; j++) { - m_menus[j] = m_menus[j + 1]; - m_titles[j] = m_titles[j + 1]; - } -} - -// Find the menu menuString, item itemString, and return the item id. -// Returns -1 if none found. -int wxMenuBar::FindMenuItem (const wxString& menuString, const wxString& itemString) const -{ - char buf1[200]; - char buf2[200]; - wxStripMenuCodes ((char *)(const char *)menuString, buf1); - int i; - for (i = 0; i < m_menuCount; i++) - { - wxStripMenuCodes ((char *)(const char *)m_titles[i], buf2); - if (strcmp (buf1, buf2) == 0) - return m_menus[i]->FindItem (itemString); - } - return -1; -} - -wxMenuItem *wxMenuBar::FindItemForId (int Id, wxMenu ** itemMenu) const -{ - if (itemMenu) - *itemMenu = NULL; - - wxMenuItem *item = NULL; - int i; - for (i = 0; i < m_menuCount; i++) - if ((item = m_menus[i]->FindItemForId (Id, itemMenu))) - return item; - return NULL; -} - -void wxMenuBar::SetHelpString (int Id, const wxString& helpString) -{ - int i; - for (i = 0; i < m_menuCount; i++) - { - if (m_menus[i]->FindItemForId (Id)) - { - m_menus[i]->SetHelpString (Id, helpString); - return; - } - } -} - -wxString wxMenuBar::GetHelpString (int Id) const -{ - int i; - for (i = 0; i < m_menuCount; i++) - { - if (m_menus[i]->FindItemForId (Id)) - return wxString(m_menus[i]->GetHelpString (Id)); - } - return wxString(""); -} - -wxWindow *wxMenu::GetWindow() const -{ - if ( m_pInvokingWindow != NULL ) - return m_pInvokingWindow; - if ( m_menuBar != NULL) - return m_menuBar->m_menuBarFrame; - return NULL; -} - -WXHMENU wxMenu::GetHMenu() const -{ - if ( m_hMenu != 0 ) - return m_hMenu; - else if ( m_savehMenu != 0 ) - return m_savehMenu; - - return 0; -} - diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp deleted file mode 100644 index 46625d1a08..0000000000 --- a/src/msw/menuitem.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: menuitem.cpp -// Purpose: wxMenuItem implementation -// Author: Vadim Zeitlin -// Modified by: -// Created: 11.11.97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// headers & declarations -// ============================================================================ - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/menu.h" -#endif - -#include "wx/ownerdrw.h" -#include "wx/menuitem.h" - -#include - -// ============================================================================ -// implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// dynamic classes implementation -// ---------------------------------------------------------------------------- - -#if !defined(USE_SHARED_LIBRARY) || !USE_SHARED_LIBRARY -#if USE_OWNER_DRAWN - IMPLEMENT_DYNAMIC_CLASS2(wxMenuItem, wxObject, wxOwnerDrawn) -#else //!USE_OWNER_DRAWN - IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject) -#endif //USE_OWNER_DRAWN - -#endif //USE_SHARED_LIBRARY - -// ---------------------------------------------------------------------------- -// wxMenuItem -// ---------------------------------------------------------------------------- - -// ctor & dtor -// ----------- - -wxMenuItem::wxMenuItem(wxMenu *pParentMenu, int id, - const wxString& strName, const wxString& strHelp, - bool bCheckable, - wxMenu *pSubMenu) : -#if USE_OWNER_DRAWN - wxOwnerDrawn(strName, bCheckable), -#else //no owner drawn support - m_bCheckable(bCheckable), - m_strName(strName), -#endif //owner drawn - m_strHelp(strHelp) -{ - wxASSERT( pParentMenu != NULL ); - -#if USE_OWNER_DRAWN - // set default menu colors - #define SYS_COLOR(c) (wxSystemSettings::GetSystemColour(wxSYS_COLOUR_##c)) - - SetTextColour(SYS_COLOR(MENUTEXT)); - SetBackgroundColour(SYS_COLOR(MENU)); - - // we don't want normal items be owner-drawn - ResetOwnerDrawn(); - - #undef SYS_COLOR -#endif - - m_pParentMenu = pParentMenu; - m_pSubMenu = pSubMenu; - m_idItem = id; - m_bEnabled = TRUE; -} - -wxMenuItem::~wxMenuItem() -{ -} - -// misc -// ---- - -// delete the sub menu -void wxMenuItem::DeleteSubMenu() -{ - wxASSERT( m_pSubMenu != NULL ); - - delete m_pSubMenu; - m_pSubMenu = NULL; -} - -// change item state -// ----------------- - -void wxMenuItem::Enable(bool bDoEnable) -{ - if ( m_bEnabled != bDoEnable ) { - if ( m_pSubMenu == NULL ) { // normal menu item - EnableMenuItem((HMENU)m_pParentMenu->GetHMenu(), m_idItem, - MF_BYCOMMAND | (bDoEnable ? MF_ENABLED: MF_GRAYED)); - } - else // submenu - { - wxMenu *father = m_pSubMenu->m_topLevelMenu ; - wxNode *node = father->m_menuItems.First() ; - int i = 0 ; - while (node) { - wxMenuItem *matched = (wxMenuItem*)node->Data(); - if ( matched == this) - break; - i++; - node = node->Next(); - } - EnableMenuItem((HMENU)father->m_savehMenu, i, - MF_BYPOSITION | (bDoEnable ? MF_ENABLED: MF_GRAYED)); - } - - m_bEnabled = bDoEnable; - } -} - -void wxMenuItem::Check(bool bDoCheck) -{ - wxCHECK_RET( IsCheckable(), "only checkable items may be checked" ); - - if ( m_bChecked != bDoCheck ) { - CheckMenuItem((HMENU)m_pParentMenu->GetHMenu(), m_idItem, - MF_BYCOMMAND | (bDoCheck ? MF_CHECKED : MF_UNCHECKED)); - - m_bChecked = bDoCheck; - } -} \ No newline at end of file diff --git a/src/msw/metafile.cpp b/src/msw/metafile.cpp deleted file mode 100644 index ec79708311..0000000000 --- a/src/msw/metafile.cpp +++ /dev/null @@ -1,373 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: metafile.cpp -// Purpose: wxMetaFileDC etc. -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "metafile.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/setup.h" -#endif - -#if USE_METAFILE - -#ifndef WX_PRECOMP -#include "wx/utils.h" -#include "wx/app.h" -#endif - -#include "wx/metafile.h" -#include "wx/clipbrd.h" -#include "wx/msw/private.h" - -#include -#include - -extern bool wxClipboardIsOpen; - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxMetaFile, wxObject) -IMPLEMENT_ABSTRACT_CLASS(wxMetaFileDC, wxDC) -#endif - -/* - * Metafiles - Windows 3.1 only - * Currently, the only purpose for making a metafile is to put - * it on the clipboard. - */ - -wxMetaFile::wxMetaFile(const wxString& file) -{ - m_windowsMappingMode = MM_ANISOTROPIC; - m_metaFile = 0; - if (!file.IsNull() && file == "") - m_metaFile = (WXHANDLE) GetMetaFile(file); -} - -wxMetaFile::~wxMetaFile(void) -{ - if (m_metaFile) - { DeleteMetaFile((HMETAFILE) m_metaFile); m_metaFile = 0; } -} - -bool wxMetaFile::SetClipboard(int width, int height) -{ - bool alreadyOpen=wxClipboardOpen(); - if (!alreadyOpen) - { - wxOpenClipboard(); - if (!wxEmptyClipboard()) return FALSE; - } - bool success = wxSetClipboardData(wxDF_METAFILE,this, width,height); - if (!alreadyOpen) wxCloseClipboard(); - return (bool) success; -} - -bool wxMetaFile::Play(wxDC *dc) -{ - dc->BeginDrawing(); - - if (dc->GetHDC() && m_metaFile) - PlayMetaFile((HDC) dc->GetHDC(), (HMETAFILE) m_metaFile); - - dc->EndDrawing(); - - return TRUE; -} - -/* - * Metafile device context - * - */ - -// Original constructor that does not takes origin and extent. If you use this, -// *DO* give origin/extent arguments to wxMakeMetaFilePlaceable. -wxMetaFileDC::wxMetaFileDC(const wxString& file) -{ - m_metaFile = NULL; - m_minX = 10000; - m_minY = 10000; - m_maxX = -10000; - m_maxY = -10000; -// m_title = NULL; - - if (!file.IsNull() && wxFileExists(file)) - wxRemoveFile(file); - m_hDC = (WXHDC) CreateMetaFile(file); - - m_ok = TRUE; - - // Actual Windows mapping mode, for future reference. - m_windowsMappingMode = MM_TEXT; - - SetMapMode(MM_TEXT); // NOTE: does not set HDC mapmode (this is correct) -} - -// New constructor that takes origin and extent. If you use this, don't -// give origin/extent arguments to wxMakeMetaFilePlaceable. -wxMetaFileDC::wxMetaFileDC(const wxString& file, int xext, int yext, int xorg, int yorg) -{ - m_minX = 10000; - m_minY = 10000; - m_maxX = -10000; - m_maxY = -10000; - if (file != "" && wxFileExists(file)) wxRemoveFile(file); - m_hDC = (WXHDC) CreateMetaFile(file); - - m_ok = TRUE; - - ::SetWindowOrgEx((HDC) m_hDC,xorg,yorg, NULL); - ::SetWindowExtEx((HDC) m_hDC,xext,yext, NULL); - - // Actual Windows mapping mode, for future reference. - m_windowsMappingMode = MM_ANISOTROPIC; - - SetMapMode(MM_TEXT); // NOTE: does not set HDC mapmode (this is correct) -} - -wxMetaFileDC::~wxMetaFileDC(void) -{ - m_hDC = 0; -} - -void wxMetaFileDC::GetTextExtent(const wxString& string, float *x, float *y, - float *descent, float *externalLeading, wxFont *theFont, bool use16bit) -{ - wxFont *fontToUse = theFont; - if (!fontToUse) - fontToUse = &m_font; - - HDC dc = GetDC(NULL); - - SIZE sizeRect; - TEXTMETRIC tm; - GetTextExtentPoint(dc, (char *)(const char *) string, strlen((char *)(const char *) string), &sizeRect); - GetTextMetrics(dc, &tm); - - ReleaseDC(NULL, dc); - - *x = (float)XDEV2LOGREL(sizeRect.cx); - *y = (float)YDEV2LOGREL(sizeRect.cy); - if (descent) *descent = (float)tm.tmDescent; - if (externalLeading) *externalLeading = (float)tm.tmExternalLeading; -} - -wxMetaFile *wxMetaFileDC::Close(void) -{ - SelectOldObjects(m_hDC); - HANDLE mf = CloseMetaFile((HDC) m_hDC); - m_hDC = 0; - if (mf) - { - wxMetaFile *wx_mf = new wxMetaFile; - wx_mf->SetHMETAFILE((WXHANDLE) mf); - wx_mf->SetWindowsMappingMode(m_windowsMappingMode); - return wx_mf; - } - return NULL; -} - -void wxMetaFileDC::SetMapMode(int mode) -{ - m_mappingMode = mode; - -// int pixel_width = 0; -// int pixel_height = 0; -// int mm_width = 0; -// int mm_height = 0; - - float mm2pixelsX = 10.0; - float mm2pixelsY = 10.0; - - switch (mode) - { - case MM_TWIPS: - { - m_logicalScaleX = (float)(twips2mm * mm2pixelsX); - m_logicalScaleY = (float)(twips2mm * mm2pixelsY); - break; - } - case MM_POINTS: - { - m_logicalScaleX = (float)(pt2mm * mm2pixelsX); - m_logicalScaleY = (float)(pt2mm * mm2pixelsY); - break; - } - case MM_METRIC: - { - m_logicalScaleX = mm2pixelsX; - m_logicalScaleY = mm2pixelsY; - break; - } - case MM_LOMETRIC: - { - m_logicalScaleX = (float)(mm2pixelsX/10.0); - m_logicalScaleY = (float)(mm2pixelsY/10.0); - break; - } - default: - case MM_TEXT: - { - m_logicalScaleX = 1.0; - m_logicalScaleY = 1.0; - break; - } - } - m_windowExtX = 100; - m_windowExtY = 100; -} - -#ifdef __WIN32__ -struct RECT32 -{ - short left; - short top; - short right; - short bottom; -}; - -struct mfPLACEABLEHEADER { - DWORD key; - short hmf; - RECT32 bbox; - WORD inch; - DWORD reserved; - WORD checksum; -}; -#else -struct mfPLACEABLEHEADER { - DWORD key; - HANDLE hmf; - RECT bbox; - WORD inch; - DWORD reserved; - WORD checksum; -}; -#endif - -/* - * Pass filename of existing non-placeable metafile, and bounding box. - * Adds a placeable metafile header, sets the mapping mode to anisotropic, - * and sets the window origin and extent to mimic the MM_TEXT mapping mode. - * - */ - -bool wxMakeMetaFilePlaceable(const wxString& filename, float scale) -{ - return wxMakeMetaFilePlaceable(filename, 0, 0, 0, 0, scale, FALSE); -} - -bool wxMakeMetaFilePlaceable(const wxString& filename, int x1, int y1, int x2, int y2, float scale, bool useOriginAndExtent) -{ - // I'm not sure if this is the correct way of suggesting a scale - // to the client application, but it's the only way I can find. - int unitsPerInch = (int)(576/scale); - - mfPLACEABLEHEADER header; - header.key = 0x9AC6CDD7L; - header.hmf = 0; - header.bbox.left = (int)(x1); - header.bbox.top = (int)(y1); - header.bbox.right = (int)(x2); - header.bbox.bottom = (int)(y2); - header.inch = unitsPerInch; - header.reserved = 0; - - // Calculate checksum - WORD *p; - mfPLACEABLEHEADER *pMFHead = &header; - for (p =(WORD *)pMFHead,pMFHead -> checksum = 0; - p < (WORD *)&pMFHead ->checksum; ++p) - pMFHead ->checksum ^= *p; - - FILE *fd = fopen((char *)(const char *)filename, "rb"); - if (!fd) return FALSE; - - char tempFileBuf[256]; - wxGetTempFileName("mf", tempFileBuf); - FILE *fHandle = fopen(tempFileBuf, "wb"); - if (!fHandle) - return FALSE; - fwrite((void *)&header, sizeof(unsigned char), sizeof(mfPLACEABLEHEADER), fHandle); - - // Calculate origin and extent - int originX = x1; - int originY = y1; - int extentX = x2 - x1; - int extentY = (y2 - y1); - - // Read metafile header and write - METAHEADER metaHeader; - fread((void *)&metaHeader, sizeof(unsigned char), sizeof(metaHeader), fd); - - if (useOriginAndExtent) - metaHeader.mtSize += 15; - else - metaHeader.mtSize += 5; - - fwrite((void *)&metaHeader, sizeof(unsigned char), sizeof(metaHeader), fHandle); - - // Write SetMapMode, SetWindowOrigin and SetWindowExt records - char modeBuffer[8]; - char originBuffer[10]; - char extentBuffer[10]; - METARECORD *modeRecord = (METARECORD *)&modeBuffer; - - METARECORD *originRecord = (METARECORD *)&originBuffer; - METARECORD *extentRecord = (METARECORD *)&extentBuffer; - - modeRecord->rdSize = 4; - modeRecord->rdFunction = META_SETMAPMODE; - modeRecord->rdParm[0] = MM_ANISOTROPIC; - - originRecord->rdSize = 5; - originRecord->rdFunction = META_SETWINDOWORG; - originRecord->rdParm[0] = originY; - originRecord->rdParm[1] = originX; - - extentRecord->rdSize = 5; - extentRecord->rdFunction = META_SETWINDOWEXT; - extentRecord->rdParm[0] = extentY; - extentRecord->rdParm[1] = extentX; - - fwrite((void *)modeBuffer, sizeof(char), 8, fHandle); - - if (useOriginAndExtent) - { - fwrite((void *)originBuffer, sizeof(char), 10, fHandle); - fwrite((void *)extentBuffer, sizeof(char), 10, fHandle); - } - - int ch = -2; - while (ch != EOF) - { - ch = getc(fd); - if (ch != EOF) - { - putc(ch, fHandle); - } - } - fclose(fHandle); - fclose(fd); - wxRemoveFile(filename); - wxCopyFile(tempFileBuf, filename); - wxRemoveFile(tempFileBuf); - return TRUE; -} - -#endif // USE_METAFILE diff --git a/src/msw/minifram.cpp b/src/msw/minifram.cpp deleted file mode 100644 index 346e95d9b9..0000000000 --- a/src/msw/minifram.cpp +++ /dev/null @@ -1,1592 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: minifram.cpp -// Purpose: wxMiniFrame -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "minifram.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/setup.h" -#include "wx/app.h" -#include "wx/utils.h" -#endif - -#if USE_ITSY_BITSY - -#include "wx/minifram.h" -#include "wx/msw/private.h" - -#ifdef __GNUWIN32__ -#include "wx/msw/gnuwin32/extra.h" -#endif - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxMiniFrame, wxFrame) -#endif - -long wxMiniFrame::MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) -{ - if ((GetWindowStyleFlag() & wxTINY_CAPTION_HORIZ) || - (GetWindowStyleFlag() & wxTINY_CAPTION_VERT)) - return ::ibDefWindowProc((HWND) GetHWND(), nMsg, wParam, lParam); - else if ( m_oldWndProc ) - return ::CallWindowProc(CASTWNDPROC m_oldWndProc, (HWND) GetHWND(), (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam); - else - return ::DefWindowProc((HWND) GetHWND(), nMsg, wParam, lParam); -} - -wxMiniFrame::~wxMiniFrame(void) -{ -} - -///////////////////////////////////////////////////////////////////////// -// -// Project: ItsyBitsy window support module -// Module: itsybits.c -// -// -// ItsyBitsy is a support module that allows you to create windows -// that look and act very much like a popup window witha system -// menu and caption bar, except everything is scaled to about 2/3 -// scale. -// -// For documentation on how to use ItsyBits, read the document -// ITSYBITS.DOC. -// -// Revisions: -// 9/27/91 Charlie Kindel (cek/ckindel) -// Wrote and documented it. -// -// 1/14/93 cek -// 2/23/93 cek Added minimize/maximize buttons. -// 3/18/93 cek Fixed system menu bug where system menu -// popped back up if you clicked on the -// icon again while it was up. -// 3/24/93 cek More comments. Fixed DS_MODALDIALOG style -// problem. Use auto precompiled headers -// in MSVC. -// -////////////////////////////////////////////////////////////////////////// - -#include -#include - -#include - -#ifndef __WATCOMC__ -#include -#endif - -#include - -#ifndef _RGB_H_ -#define _RGB_H_ - - // Some mildly useful macros for the standard 16 colors - #define RGBBLACK RGB(0,0,0) - #define RGBRED RGB(128,0,0) - #define RGBGREEN RGB(0,128,0) - #define RGBBLUE RGB(0,0,128) - - #define RGBBROWN RGB(128,128,0) - #define RGBMAGENTA RGB(128,0,128) - #define RGBCYAN RGB(0,128,128) - #define RGBLTGRAY RGB(192,192,192) - - #define RGBGRAY RGB(128,128,128) - #define RGBLTRED RGB(255,0,0) - #define RGBLTGREEN RGB(0,255,0) - #define RGBLTBLUE RGB(0,0,255) - - #define RGBYELLOW RGB(255,255,0) - #define RGBLTMAGENTA RGB(255,0,255) - #define RGBLTCYAN RGB(0,255,255) - #define RGBWHITE RGB(255,255,255) -#endif - -#ifndef GlobalAllocPtr -#define GlobalPtrHandle(lp) \ - ((HGLOBAL)GlobalHandle(lp)) - -#define GlobalLockPtr(lp) \ - ((BOOL)GlobalLock(GlobalPtrHandle(lp))) -#define GlobalUnlockPtr(lp) \ - GlobalUnlock(GlobalPtrHandle(lp)) - -#define GlobalAllocPtr(flags, cb) \ - (GlobalLock(GlobalAlloc((flags), (cb)))) -#define GlobalReAllocPtr(lp, cbNew, flags) \ - (GlobalUnlockPtr(lp), GlobalLock(GlobalReAlloc(GlobalPtrHandle(lp) , (cbNew), (flags)))) -#define GlobalFreePtr(lp) \ - (GlobalUnlockPtr(lp), (BOOL)GlobalFree(GlobalPtrHandle(lp))) -#endif - -#if defined(__BORLANDC__) || defined(__WATCOMC__) -#define max(a,b) (((a) > (b)) ? (a) : (b)) -#define min(a,b) (((a) < (b)) ? (a) : (b)) -#endif - -// CAPTIONXY is the default size of the system menu icon. This -// determines the height/width of the caption. -// -// The value that results from the following formula works out -// nicely for the veritcal caption on VGA, 8514 (Large Fonts), -// 8514 (Small Fonts), XGA (Small Fonts), XGA (Large Fonts), -// and TIGA (Small Fonts). It may not be good on other displays. -// -// The problem is that TT fonts turn into bitmap fonts when they -// are sized below a certain threshold. The idea is to make the -// size of the caption just big enough to get the smallest TT -// (scalable) font to fit. -// -#define CAPTIONXY (GetSystemMetrics( SM_CYCAPTION ) / 2 + 1) - -#define TestWinStyle( hWnd, dwStyleBit ) \ - (((DWORD)GetWindowLong( hWnd, GWL_STYLE ) & (DWORD)dwStyleBit) ? TRUE : FALSE ) -#define HASCAPTION( hwnd ) (TestWinStyle( hwnd, IBS_VERTCAPTION ) ||\ - TestWinStyle( hwnd, IBS_HORZCAPTION )) - -#define SETCAPTIONSIZE(h,i) (UINT)SetProp(h,"ibSize",(HANDLE)i) -#define GETCAPTIONSIZE(h) (UINT)GetProp(h,"ibSize") -#define FREECAPTIONSIZE(h) RemoveProp(h,"ibSize") - -#define SETMENUWASUPFLAG(h,i) (UINT)SetProp(h,"ibFlag",(HANDLE)i) -#define GETMENUWASUPFLAG(h) (UINT)GetProp(h,"ibFlag") -#define FREEMENUWASUPFLAG(h) RemoveProp(h,"ibFlag") - -///////////////////////////////////////////////////////////////////// -// Little known fact: -// ExtTextOut() is the fastest way to draw a filled rectangle -// in Windows (if you don't want dithered colors or borders). -// -// Unfortunately there is a bug in the Windows 3.0 8514 driver -// in using ExtTextOut() to a memory DC. If you are drawing -// to an off screen bitmap, then blitting that bitmap to the -// display, do not #define USE_EXTTEXTOUT below. -// -// The following macro (DRAWFASTRECT) draws a filled rectangle -// with no border and a solid color. It uses the current back- -// ground color as the fill color. -////////////////////////////////////////////////////////////////////// -#define USE_EXTTEXTOUT -#ifdef USE_EXTTEXTOUT - #define DRAWFASTRECT(hdc,lprc) ExtTextOut(hdc,0,0,ETO_OPAQUE,lprc,NULL,0,NULL) -#else - #define DRAWFASTRECT(hdc,lprc) {\ - HBRUSH hbr = CreateSolidBrush( GetBkColor( hdc ) ) ;\ - hbr = SelectObject(hdc, hbr) ;\ - PatBlt(hdc,(lprc)->left,(lprc)->top,(lprc)->right-(lprc)->left,(lprc)->bottom-(lprc)->top,PATCOPY) ;\ - hbr = SelectObject(hdc, hbr) ;\ - DeleteObject( hbr ) ;\ - } -#endif - -// The DrawArrow function takes the following to indicate what -// kind of arrow to draw. -// -#define ARROW_UP 0 -#define ARROW_DOWN 1 -#define ARROW_RESTORE 2 - -BOOL PASCAL DepressMinMaxButton( HWND hWnd, UINT uiHT, LPRECT ) ; -BOOL PASCAL DoMenu( HWND hWnd ) ; -void PASCAL SetupSystemMenu( HWND hWnd, HMENU hMenu ) ; -BOOL PASCAL GetCaptionRect( HWND hWnd, LPRECT lprc ) ; -BOOL PASCAL GetIconRect( HWND hWnd, LPRECT lprc ) ; -BOOL PASCAL GetButtonRect( HWND hWnd, UINT nPos, LPRECT lprc ) ; -BOOL PASCAL GetMinButtonRect( HWND hWnd, LPRECT lprc ) ; -BOOL PASCAL GetMaxButtonRect( HWND hWnd, LPRECT lprc ) ; -BOOL PASCAL DrawCaption( HDC hDC, HWND hWnd, LPRECT lprc, - BOOL fVert, BOOL fSysMenu, - BOOL fMin, BOOL fMax, BOOL fActive ) ; -void PASCAL DrawSysMenu( HDC hDC, HWND hWnd, BOOL fInvert ) ; -void PASCAL DrawButton( HDC hDC, HWND hWnd, BOOL fMin, BOOL fDepressed ) ; -void PASCAL DrawArrow( HDC hdc, LPRECT lprc, UINT uiStyle ) ; - -// Global vars -// -static BOOL fWin31 ; - -/////////////////////////////////////////////////////////////////////// -// External/Public functions -/////////////////////////////////////////////////////////////////////// - -///////////////////////////////////////////////////////////////// -// UINT WINAPI ibGetCaptionSize( HWND hWnd ) -// -// Description: -// -// Gets the size of the caption (height if horz, width if -// vertical). -// -// Comments: -// -/////////////////////////////////////////////////////////////// -UINT WINAPI ibGetCaptionSize( HWND hWnd ) -{ - return GETCAPTIONSIZE( hWnd ) + 1 ; -} // ibSetCaptionSize() - -///////////////////////////////////////////////////////////////// -// UINT WINAPI ibSetCaptionSize( HWND hWnd, UINT nSize ) -// -// Description: -// -// Changes the size of the caption (height if horz, width if -// vertical). -// -// Comments: -// -////////////////////////////////////////////////////////////////// -UINT WINAPI ibSetCaptionSize( HWND hWnd, UINT nSize ) -{ - UINT ui ; - - if (nSize <= 0) - return 0 ; - - nSize-- ; - ui = SETCAPTIONSIZE( hWnd, nSize ) ; - - // Once we change the window style, we need a WM_NCCALCRECT - // to be generated. - // - // SWP_FRAMECHANGED is not documented in the 3.1 SDK docs, - // but *is* in WINDOWS.H. - // - SetWindowPos( hWnd, NULL, 0, 0, 0, 0, SWP_FRAMECHANGED | - SWP_NOSIZE | SWP_NOMOVE | - SWP_NOACTIVATE | SWP_NOZORDER) ; - - return ui ; - -} // ibSetCaptionSize() - -///////////////////////////////////////////////////////////////// -// LRESULT WINAPI ibDefWindowProc( HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam ) -// -// Description: -// -// This function should be called instead of DefWindowProc() for -// windows that want to have itsybitsy captions. -// -// Comments: -// -////////////////////////////////////////////////////////////////// -LRESULT WINAPI ibDefWindowProc( HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam ) -{ - LRESULT lRet ; - UINT nCapSize ; - - switch( uiMsg ) - { - case WM_SYSCHAR: - // If ALT-SPACE - // was hit then pop up the menu - // - if (HASCAPTION( hWnd ) && (wParam == VK_SPACE)) - { - DoMenu( hWnd ) ; - break ; - } - - // FALL THROUGH!!!! - // - - case WM_SYSKEYDOWN: - case WM_SYSKEYUP: - case WM_KEYDOWN: - case WM_KEYUP: - { - DWORD dw = GetWindowLong( hWnd, GWL_STYLE ) ; - - // Fool DefWindowProc into thinking we do not have - // a system menu. Otherwise it will try to - // pop up its own. - // - SetWindowLong( hWnd, GWL_STYLE, dw &~WS_SYSMENU ) ; - lRet = DefWindowProc( hWnd, uiMsg, wParam, lParam ) ; - SetWindowLong( hWnd, GWL_STYLE, dw ) ; - return lRet ; - } - break ; - - case WM_COMMAND: - // The menu that is poped up for the system menu with - // TrackPopupMenu() sends it's notifications as WM_COMMAND - // messages. We need to translate these into - // WM_SYSCOMMAND messages. All standard WM_SYSCOMMAND - // ids are greater than 0xF000. - // - // This could be a possible cause of confusion if the - // itsybitsy window had children that used SC_MOVE or SC_CLOSE - // as their IDs. Take note and be careful. - // - // Also, because ibDefWindowProc looks at WM_COMMAND messages, - // you will need to be careful to call ibDefWindowProc() for - // any wm_command messages that you would normally ignore. - // Otherwise the system menu won't work. - // - if (wParam >= 0xF000) - // Call PostMessage() here instead of SendMessage! - // Here's why: - // Our menu was created by TrackPopupMenu(). TPM() does - // not return until after the menu has been destroyed - // (and thus the command associated with the menu selection - // sent). Therefore when we get here, we are still - // *inside* TPM(). If we Send WM_SYSCOMMAND, SC_CLOSE - // to the window, the window will be destroyed before - // TPM() returns to our code within DoMenu() below. Wel... - // We do stuff with the window handle after DoMenu() - // returns (namely GetProp()). Since the window has - // been destroyed,this is bad. - PostMessage( hWnd, WM_SYSCOMMAND, wParam, lParam ) ; - - return DefWindowProc( hWnd, uiMsg, wParam, lParam ) ; - - case WM_GETMINMAXINFO: - { - nCapSize = GETCAPTIONSIZE( hWnd ) ; - if (HASCAPTION( hWnd ) && TestWinStyle( hWnd, WS_THICKFRAME )) - { - LPPOINT lppt = (LPPOINT)lParam ; - RECT rcMenu ; - RECT rcMin ; - RECT rcMax ; - int nX ; - int cx, cy ; // window frame/border width - - if (TestWinStyle( hWnd, WS_THICKFRAME )) - { - cx = GetSystemMetrics( SM_CXFRAME ) ; - cy = GetSystemMetrics( SM_CYFRAME ) ; - } - else - if (TestWinStyle(hWnd, WS_BORDER )) - { - cx = GetSystemMetrics( SM_CXBORDER ) ; - cy = GetSystemMetrics( SM_CYBORDER ) ; - } - - GetIconRect( hWnd, &rcMenu ) ; - GetMinButtonRect( hWnd, &rcMin ) ; - GetMaxButtonRect( hWnd, &rcMax ) ; - nX = (rcMenu.right-rcMenu.left) + - (rcMin.right-rcMin.left) + - (rcMin.right-rcMin.left) ; - - - if (TestWinStyle( hWnd, IBS_VERTCAPTION ) ) - { - lppt[3].x = nCapSize + cx * 2 - 1 ; - lppt[3].y = nX + (2* nCapSize) ; - } - else - { - lppt[3].x = nX + (2* nCapSize) ; - lppt[3].y = nCapSize + cy * 2 - 1 ; - } - } - return DefWindowProc( hWnd, uiMsg, wParam, lParam ) ; - } - break ; - - ///////////////////////////////////////////////////////////////////// - // Non-client area messages. These are used to allow the - // minature caption bar to be handled correctly. - // - case WM_NCCREATE: - { - DWORD dwStyle ; - - // We have two things that we need to store somewhere: - // 1) The caption height (width). - // and 2) A flag indicating whether the sysmenu was - // just up or not. - // - // CAPTIONXY is a macro that calls GetSystemMetrics. - // - SETCAPTIONSIZE( hWnd, CAPTIONXY ) ; - - // Set our flag that tells us whether the system menu was - // 'just up'. - // - SETMENUWASUPFLAG( hWnd, FALSE ) ; - - // Are we in 3.1? If so we have some neat features - // we can use like rotated TrueType fonts. - // - fWin31 = (BOOL)(LOWORD( GetVersion() ) >= 0x030A) ; - - // If IBS_????CAPTION was specified and the WS_DLGFRAME (or - // WS_DLGFRAME 'cause it == WS_CAPTION | WS_BORDER) - // was specified the creator made a mistake. Things get really - // ugly if DefWindowProc sees WS_DLGFRAME, so we strip - // the WS_DLGFRAME part off! - // - dwStyle = GetWindowLong( hWnd, GWL_STYLE ) ; - if ((dwStyle & IBS_VERTCAPTION || dwStyle & IBS_HORZCAPTION) && - dwStyle & WS_DLGFRAME) - { - dwStyle &= (DWORD)~WS_DLGFRAME ; - SetWindowLong( hWnd, GWL_STYLE, dwStyle ) ; - } - } - return DefWindowProc( hWnd, uiMsg, wParam, lParam ) ; - - case WM_NCDESTROY: - // We store the caption size in a window prop. so we - // must remove props. - // - FREECAPTIONSIZE( hWnd ) ; - FREEMENUWASUPFLAG( hWnd ) ; - return DefWindowProc( hWnd, uiMsg, wParam, lParam ) ; - - case WM_NCCALCSIZE: - // This is sent when the window manager wants to find out - // how big our client area is to be. If we have a mini-caption - // then we trap this message and calculate the cleint area rect, - // which is the client area rect calculated by DefWindowProc() - // minus the width/height of the mini-caption bar - // - lRet = DefWindowProc( hWnd, uiMsg, wParam, lParam ) ; - if (!IsIconic( hWnd ) && HASCAPTION( hWnd )) - { - nCapSize = GETCAPTIONSIZE( hWnd ) ; - - if (TestWinStyle( hWnd, IBS_VERTCAPTION ) ) - ((LPRECT)lParam)->left += nCapSize ; - else - ((LPRECT)lParam)->top += nCapSize ; - } - return lRet ; - - case WM_NCHITTEST: - // This message is sent whenever the mouse moves over us. - // We will depend on DefWindowProc for everything unless - // there is a mini-caption, in which case we will - // return HTCAPTION or HTSYSMENU. When the user clicks - // or double clicks, NC_LBUTTON/ message are sent with - // wParam equal to what we return here. - // This means that this is an ideal place to figure out - // where we are! - // - // let defwindowproc handle the standard borders etc... - // - lRet = DefWindowProc( hWnd, uiMsg, wParam, lParam ) ; - if (!IsIconic( hWnd ) && HASCAPTION( hWnd ) && lRet == HTNOWHERE) - { - RECT rc ; - RECT rcMenu ; - RECT rcMinButton ; - RECT rcMaxButton ; - POINT pt ; - - nCapSize = GETCAPTIONSIZE( hWnd ) ; - - // if DefWindowProc returned HTCAPTION then we have to - // refine the area and return HTSYSMENU if appropriate - // - pt.x = LOWORD( lParam ) ; - pt.y = HIWORD( lParam ) ; - - GetCaptionRect( hWnd, &rc ) ; // window coords - if (PtInRect( &rc, pt )) - { - lRet = HTCAPTION ; - - // rely on the fact that Get???Rect() return an invalid - // (empty) rectangle if the menu/buttons don't exist - // - GetIconRect( hWnd, &rcMenu ) ; - GetMinButtonRect( hWnd, &rcMinButton ) ; - GetMaxButtonRect( hWnd, &rcMaxButton ) ; - - if (PtInRect( &rcMenu, pt )) - lRet = HTSYSMENU ; - - if (PtInRect( &rcMinButton, pt )) - lRet = HTMINBUTTON ; - else - if (PtInRect( &rcMaxButton, pt )) - lRet = HTMAXBUTTON ; - } - } - if (lRet != HTSYSMENU) - SETMENUWASUPFLAG( hWnd, FALSE ) ; - return lRet ; - - case WM_NCLBUTTONDBLCLK: - // Windows recieve WM_NC?BUTTONDBLCLK messages whether they - // have CS_DBLCLKS or not. We watch for one of these - // to see if the user double clicked on the system menu (to - // close the window) or on the caption (to maximize the window). - // - if (!IsIconic( hWnd ) && HASCAPTION( hWnd ) && wParam == HTSYSMENU) - { - SendMessage( hWnd, WM_CLOSE, 0, 0L ) ; - break ; - } - return DefWindowProc( hWnd, uiMsg, wParam, lParam ) ; - - case WM_NCLBUTTONDOWN: - { - RECT rc ; - - // If we're iconic or we don't have a caption then - // DefWindowProc will do the job just fine. - // - if (IsIconic( hWnd ) || !HASCAPTION( hWnd )) - return DefWindowProc( hWnd, uiMsg, wParam, lParam ) ; - - // Here's were we handle the system menu, the min and max buttons. - // If you wanted to change the behavior of the min/max buttons - // do something like swap tool palettes or something, you - // would change the SendMessage() calls below. - // - switch (wParam) - { - case HTSYSMENU: - if (GETMENUWASUPFLAG( hWnd ) == FALSE && DoMenu( hWnd )) - SETMENUWASUPFLAG( hWnd, TRUE ) ; - else - SETMENUWASUPFLAG( hWnd, FALSE ) ; - break ; - - case HTMINBUTTON: - GetMinButtonRect( hWnd, &rc ) ; - // Note that DepressMinMaxButton() goes into - // a PeekMessage() loop waiting for the mouse - // to come back up. - // - if (DepressMinMaxButton( hWnd, wParam, &rc )) - SendMessage( hWnd, WM_SYSCOMMAND, SC_MINIMIZE, lParam ) ; - break ; - - case HTMAXBUTTON: - GetMaxButtonRect( hWnd, &rc ) ; - // Note that DepressMinMaxButton() goes into - // a PeekMessage() loop waiting for the mouse - // to come back up. - // - if (DepressMinMaxButton( hWnd, wParam, &rc )) - { - if (IsZoomed(hWnd)) - SendMessage( hWnd, WM_SYSCOMMAND, SC_RESTORE, lParam ) ; - else - SendMessage( hWnd, WM_SYSCOMMAND, SC_MAXIMIZE, lParam ) ; - } - break ; - - default: - // Well, it appears as though the user clicked somewhere other - // than the buttons. We let DefWindowProc do it's magic. - // This is where things like dragging and sizing the - // window happen. - // - return DefWindowProc( hWnd, uiMsg, wParam, lParam ) ; - } - } - break ; - - case WM_NCPAINT: - case WM_NCACTIVATE: - if (IsIconic( hWnd )) - return DefWindowProc( hWnd, uiMsg, wParam, lParam ) ; - - // Paint the non-client area here. We will call DefWindowProc - // after we are done so it can paint the borders and so - // forth... - // - lRet = DefWindowProc( hWnd, uiMsg, wParam, lParam ) ; - if (HASCAPTION( hWnd )) - { - RECT rcCap ; - RECT rc ; - HDC hDC = GetWindowDC( hWnd ) ; - BOOL fActive ; - - GetCaptionRect( hWnd, &rcCap ) ; // Convert to window coords - GetWindowRect( hWnd, &rc ) ; - OffsetRect( &rcCap, -rc.left, -rc.top ) ; - - if (uiMsg == WM_NCPAINT) - fActive = (hWnd == GetActiveWindow()) ; - else - fActive = wParam ; - - DrawCaption( hDC, hWnd, &rcCap, - TestWinStyle(hWnd, IBS_VERTCAPTION), - TestWinStyle(hWnd, WS_SYSMENU), - TestWinStyle(hWnd, WS_MINIMIZEBOX), - TestWinStyle(hWnd, WS_MAXIMIZEBOX), - fActive ) ; - - ReleaseDC( hWnd, hDC ) ; - } - return lRet; - break; - - default: - return DefWindowProc( hWnd, uiMsg, wParam, lParam ) ; - } - - return 0L ; - -} // ibDefWindowProc() - -// ibAdjustWindowRect( HWND hWnd, LPRECT lprc ) -// -// Does the same thing as the USER function AdjustWindowRect(), -// but knows about itsybitsy windows. AdjustWindowRect() is -// bogus for stuff like this. -// -void WINAPI ibAdjustWindowRect( HWND hWnd, LPRECT lprc ) -{ - short cx = 0, cy = 0 ; - UINT nCapSize ; - - nCapSize = GETCAPTIONSIZE( hWnd ) ; - - // First check Windows's styles, then our own. - // - if (TestWinStyle( hWnd, WS_THICKFRAME )) - { - cx = GetSystemMetrics( SM_CXFRAME ) ; - cy = GetSystemMetrics( SM_CYFRAME ) ; - } - else - if (TestWinStyle(hWnd, DS_MODALFRAME )) - { - cx = GetSystemMetrics( SM_CXDLGFRAME ) + GetSystemMetrics( SM_CXBORDER ) ; - cy = GetSystemMetrics( SM_CYDLGFRAME ) + GetSystemMetrics( SM_CYBORDER ) ; - } - else - if (TestWinStyle(hWnd, WS_BORDER )) - { - cx = GetSystemMetrics( SM_CXBORDER ) ; - cy = GetSystemMetrics( SM_CYBORDER ) ; - } - - InflateRect( lprc, cx, cy ) ; - - if (TestWinStyle( hWnd, IBS_VERTCAPTION )) - lprc->left -= nCapSize ; - else - if (TestWinStyle( hWnd, IBS_HORZCAPTION )) - lprc->top -= nCapSize ; - -} // ibAdjustWindowRect() - - -/////////////////////////////////////////////////////////////////////// -// Internal functions -/////////////////////////////////////////////////////////////////////// - -// DepressMinMaxButton() -// -// This function is called when the user has pressed either the min or -// max button (i.e. WM_NCLBUTTONDOWN). We go into a Peekmessage() loop, -// waiting for the mouse to come back up. This allows us to make the -// button change up/down state like a real button does. -// -// lprc points to the rectangle that describes the button the -// user has clicked on. -// -BOOL PASCAL DepressMinMaxButton( HWND hWnd, UINT uiHT, LPRECT lprc ) -{ - BOOL fDepressed = TRUE ; - MSG msg ; - - // Draw button in down state - DrawButton( NULL, hWnd, uiHT == HTMINBUTTON, fDepressed ) ; - SetCapture( hWnd ) ; - - while (TRUE) - { - if (PeekMessage((LPMSG)&msg, NULL, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE)) - { - switch (msg.message) - { - case WM_LBUTTONUP: - if (fDepressed) - DrawButton( NULL, hWnd, uiHT == HTMINBUTTON, !fDepressed ) ; - ReleaseCapture(); - return PtInRect( lprc, msg.pt ) ; - - case WM_MOUSEMOVE: - if (PtInRect( lprc, msg.pt )) - { - if (!fDepressed) - DrawButton( NULL, hWnd, uiHT == HTMINBUTTON, fDepressed = TRUE ) ; - } - else - { - if (fDepressed) - DrawButton( NULL, hWnd, uiHT == HTMINBUTTON, fDepressed = FALSE ) ; - } - break; - } - } - } - -} // DepressMinMaxButton() - -// DrawCaption( HDC hDC, HWND hWnd, LPRECT lprc, -// BOOL fVert, BOOL fSysMenu, BOOL fActive ) -// -// This function draws an itsy bitsy caption bar with or -// without system menu to the dc specified by hDC. The -// caption is drawn to fit within the lprc RECT and is -// drawn//withOut/ borders. -// -BOOL PASCAL DrawCaption( HDC hDC, HWND hWnd, LPRECT lprc, - BOOL fVert, BOOL fSysMenu, BOOL fMin, - BOOL fMax, BOOL fActive ) -{ - RECT rc ; - RECT rcCap ; - COLORREF rgbCaptionBG ; - COLORREF rgbText ; - COLORREF rgbWindowFrame ; - HBRUSH hbrCaption ; - UINT ui ; - UINT nCapSize ; - - nCapSize = GETCAPTIONSIZE( hWnd ) ; - - // Get the colors. - // - rgbWindowFrame = GetSysColor( COLOR_WINDOWFRAME ) ; - - // if we have focus use the active caption color - // otherwise use the inactive caption color - // - if (fActive) - { - rgbText = GetSysColor( COLOR_CAPTIONTEXT ) ; - rgbCaptionBG = GetSysColor( COLOR_ACTIVECAPTION ) ; - } - else - { - if (fWin31) - rgbText = GetSysColor( COLOR_INACTIVECAPTIONTEXT ) ; - else - rgbText = GetSysColor( COLOR_CAPTIONTEXT ) ; - - rgbCaptionBG = GetSysColor( COLOR_INACTIVECAPTION ) ; - } - - SetBkMode( hDC, TRANSPARENT ) ; - SelectObject( hDC, GetStockObject( NULL_BRUSH ) ) ; - SelectObject( hDC, GetStockObject( NULL_PEN ) ) ; - - rcCap = *lprc ; - - if (fSysMenu) - { - if (fVert) - rcCap.top += nCapSize ; - else - rcCap.left += nCapSize ; - } - - if (fMax) - { - if (fVert) - rcCap.bottom -= nCapSize ; - else - rcCap.right -= nCapSize ; - } - - if (fMin) - { - if (fVert) - rcCap.bottom -= nCapSize ; - else - rcCap.right -= nCapSize ; - } - - if (fVert) - { - rc.left = lprc->right - 1 ; - rc.right = lprc->right ; - rc.top = lprc->top ; - rc.bottom = lprc->bottom ; - } - else - { - rc.left = lprc->left ; - rc.right = lprc->right ; - rc.bottom = lprc->bottom ; - rc.top = rc.bottom - 1 ; - } - - SetBkColor( hDC, rgbWindowFrame ) ; - DRAWFASTRECT( hDC, &rc ) ; - - hbrCaption = CreateSolidBrush( rgbCaptionBG ) ; - hbrCaption = (HBRUSH) SelectObject( hDC, hbrCaption ) ; - SelectObject( hDC, (HPEN) GetStockObject( NULL_PEN ) ) ; - if (fVert) - Rectangle( hDC, rcCap.left, rcCap.top, rcCap.right, rcCap.bottom + 1 ) ; - else - Rectangle( hDC, rcCap.left, rcCap.top, rcCap.right+1, rcCap.bottom ) ; - hbrCaption = (HBRUSH) SelectObject( hDC, hbrCaption ) ; - DeleteObject( hbrCaption ) ; - - - // Draw caption text here. Only do it in 3.1 'cause 3.1 gives - // us 'small fonts'. - // - ui = GetWindowTextLength( hWnd ) ; - if (fWin31) - { - HFONT hFont ; - LPSTR lpsz ; - LOGFONT lf ; - TEXTMETRIC tm ; - int cx ; - int cy ; - SIZE Size ; - - if ((lpsz = (char*)GlobalAllocPtr( GHND, ui + 2 ))) - { - UINT nBkMode ; - - GetWindowText( hWnd, lpsz, ui + 1 ) ; - nBkMode = SetBkMode( hDC, TRANSPARENT ) ; - rgbText = SetTextColor( hDC, rgbText ) ; - - memset( &lf, '\0', sizeof(LOGFONT) ) ; - - lf.lfHeight = -(int)(nCapSize - 3) ; - lf.lfCharSet = ANSI_CHARSET ; - lf.lfQuality = DEFAULT_QUALITY ; - lf.lfClipPrecision = CLIP_LH_ANGLES | CLIP_STROKE_PRECIS ; - if (nCapSize >= 20) - { - lf.lfWeight = FW_BOLD ; - } - - if (fVert) - { - // Can only rotate true type fonts (well, ok, we could - // try and use "modern"). - strcpy( lf.lfFaceName, "Arial" ) ; - lf.lfPitchAndFamily = FF_SWISS | 0x04; - lf.lfEscapement = 900 ; - - // Note: The Win 3.1 documentation for CreateFont() say's - // that the lfOrientation member is ignored. It appears, - // that on Windows 16 3.1 this is true, but when running - // as a 16 bit WinApp on WindowsNT 3.1 the lfOrientation - // must be set or the text does not rotate! - // - lf.lfOrientation = 900 ; - - hFont = CreateFontIndirect( &lf ) ; - hFont = (HFONT) SelectObject( hDC, hFont ) ; - - GetTextExtentPoint( hDC, lpsz, ui, &Size ) ; - cx = rcCap.bottom - ((rcCap.bottom - rcCap.top - Size.cx) / 2) ; - cy = rcCap.left - 1 + ((rcCap.right - rcCap.left - Size.cy) / 2) ; - - // Make sure we got a rotatable font back. - // - GetTextMetrics( hDC, &tm ) ; - if (tm.tmPitchAndFamily & TMPF_VECTOR || - tm.tmPitchAndFamily & TMPF_TRUETYPE) - { - ExtTextOut( hDC, - cy, - min( (long)cx, rcCap.bottom), - ETO_CLIPPED, &rcCap, - lpsz, ui, NULL ) ; - } - - hFont = (HFONT) SelectObject( hDC, hFont ) ; - DeleteObject( hFont ) ; - } - else - { - // Use small fonts always for the horizontal. Cause it looks - // more like "System" than Arial. - // - lf.lfPitchAndFamily = FF_SWISS ; - - hFont = CreateFontIndirect( &lf ) ; - hFont = (HFONT) SelectObject( hDC, hFont ) ; - - GetTextExtentPoint( hDC, lpsz, ui, &Size ) ; - cx = rcCap.left + ((rcCap.right - rcCap.left - Size.cx) / 2) ; - cy = rcCap.top + ((rcCap.bottom - rcCap.top - Size.cy) / 2) ; - - // Figger out how big the string is - // - ExtTextOut( hDC, - max( (long)cx, rcCap.left ), - cy, - ETO_CLIPPED, &rcCap, - lpsz, ui, NULL ) ; - - hFont = (HFONT) SelectObject( hDC, hFont ) ; - DeleteObject( hFont ) ; - } - - // Unsetup the DC - // - rgbText = SetTextColor( hDC, rgbText ) ; - SetBkMode( hDC, nBkMode ) ; - - GlobalFreePtr( lpsz ) ; - } - } - - if (fSysMenu) - DrawSysMenu( hDC, hWnd, FALSE ) ; - - if (fMin) - DrawButton( hDC, hWnd, TRUE, FALSE ) ; - - if (fMax) - DrawButton( hDC, hWnd, FALSE, FALSE ) ; - - return TRUE ; - -} // DrawCaption() - - -// DrawSysMenu( HDC hDC, hWnd, BOOL fInvert ) -// -// Draws the little system menu icon. -// -void PASCAL DrawSysMenu( HDC hDC, HWND hWnd, BOOL fInvert ) -{ - RECT rcIcon ; - RECT rcTemp ; - RECT rc ; - COLORREF rgbIconFace ; - COLORREF rgbWindowFrame ; - BOOL fDC ; - UINT nCapSize ; - - nCapSize = GETCAPTIONSIZE( hWnd ) ; - - if (!hDC) - { - fDC = TRUE ; - hDC = GetWindowDC( hWnd ) ; - } - else - fDC = FALSE ; - - if (hDC) - { - rgbIconFace = GetNearestColor( hDC, RGBLTGRAY ) ; - rgbWindowFrame = GetSysColor( COLOR_WINDOWFRAME ) ; - - GetIconRect( hWnd, &rcIcon ) ; - GetWindowRect( hWnd, &rc ) ; - - OffsetRect( &rcIcon, -rc.left, -rc.top ) ; - - rcTemp = rcIcon ; - - if (TestWinStyle( hWnd, IBS_VERTCAPTION )) - { - rc = rcIcon ; // separator line - rc.top = ++rc.bottom - 1 ; - } - else - { - rc = rcIcon ; // separator line - rc.left = ++rc.right - 1 ; - } - - // Fill - SetBkColor( hDC, rgbIconFace ) ; - DRAWFASTRECT( hDC, &rcTemp ) ; - - // Draw separator line - SetBkColor( hDC, rgbWindowFrame ) ; - DRAWFASTRECT( hDC, &rc ) ; - - if (nCapSize > 4) - { - // Draw the little horizontal doo-hickey - // - rcTemp.top = rcIcon.top + ((nCapSize-1) / 2) ; - rcTemp.bottom = rcTemp.top + 3 ; - rcTemp.left = rcTemp.left + 3 ; - rcTemp.right = rcTemp.right - 1 ; - - SetBkColor( hDC, RGBGRAY ) ; - DRAWFASTRECT( hDC, &rcTemp ) ; - - rc = rcTemp ; - OffsetRect( &rc, -1, -1 ) ; - SetBkColor( hDC, RGBBLACK ) ; - DRAWFASTRECT( hDC, &rc ) ; - - InflateRect( &rc, -1, -1 ) ; - SetBkColor( hDC, RGBWHITE ) ; - DRAWFASTRECT( hDC, &rc ) ; - } - - if (fInvert) - InvertRect( hDC, &rcIcon ) ; - - if (fDC) - ReleaseDC( hWnd, hDC ) ; - } - -} // DrawSysMenu() - -// DoMenu( HWND hWnd ) -// -// Pops up the system menu. -// -BOOL PASCAL DoMenu( HWND hWnd ) -{ - HDC hDC ; - RECT rcIcon ; - RECT rc ; - POINT pt ; - HMENU hMenu ; - DWORD dw ; - - if (!TestWinStyle(hWnd, WS_SYSMENU)) - return FALSE ; - - if ((hDC = GetWindowDC( hWnd ))) - { - // Invert the icon - // - DrawSysMenu( hDC, hWnd, TRUE ) ; - - // Pop up the menu - // - if (TestWinStyle( hWnd, IBS_VERTCAPTION )) - { - pt.x = -1 ; - pt.y = 0 ; - } - else - { - pt.x = 0 ; - pt.y = -1 ; - } - - GetIconRect( hWnd, &rcIcon ) ; - GetWindowRect( hWnd, &rc ) ; - OffsetRect( &rcIcon, -rc.left, -rc.top ) ; - - ClientToScreen( hWnd, &pt ) ; - ClientToScreen( hWnd, (LPPOINT)&rc.right ) ; - - dw = GetWindowLong( hWnd, GWL_STYLE ) ; - SetWindowLong( hWnd, GWL_STYLE, dw | WS_SYSMENU ) ; - - hMenu = GetSystemMenu( hWnd, FALSE ) ; - SetupSystemMenu( hWnd, hMenu ) ; - - SetWindowLong( hWnd, GWL_STYLE, dw ) ; - - TrackPopupMenu( hMenu, 0, //TPM_LEFTALIGN, - pt.x, - pt.y, - 0, - hWnd, - &rc ) ; - - DrawSysMenu( hDC, hWnd, FALSE ) ; - ReleaseDC( hWnd, hDC ) ; - } - return TRUE ; - -} // DoMenu() - -// SetupSystemMenu( HWND hWnd, HMENU hMenu ) -// -// Enables/Disables the appropriate menu items on the -// menu passed for the window passed. -// -void PASCAL SetupSystemMenu( HWND hWnd, HMENU hMenu ) -{ - UINT wMove ; - UINT wSize ; - UINT wMinBox ; - UINT wMaxBox ; - UINT wRestore ; - - // Assume all should be grayed. - // - wSize = wMove = wMinBox = wMaxBox = wRestore = MF_GRAYED ; - - if (TestWinStyle( hWnd, WS_MAXIMIZEBOX ) || IsIconic( hWnd )) - wMaxBox = MF_ENABLED ; - - if (TestWinStyle( hWnd, WS_MINIMIZEBOX )) - wMinBox = MF_ENABLED ; - - if (IsZoomed( hWnd )) - wRestore = MF_ENABLED ; - - if (TestWinStyle( hWnd, WS_THICKFRAME ) && - !(IsIconic( hWnd ) || IsZoomed( hWnd ))) - wSize = MF_ENABLED ; - - if (!IsZoomed( hWnd ) && - !IsIconic( hWnd ) && - TestWinStyle( hWnd, WS_CAPTION ) ) - wMove = MF_ENABLED ; - - EnableMenuItem( hMenu, SC_MOVE, wMove ) ; - EnableMenuItem( hMenu, SC_SIZE, wSize ) ; - EnableMenuItem( hMenu, SC_MINIMIZE, wMinBox ) ; - EnableMenuItem( hMenu, SC_MAXIMIZE, wMaxBox ) ; - EnableMenuItem( hMenu, SC_RESTORE, wRestore ) ; - -} // SetupSystemMenu() - -// GetCaptionRect( HWND hWnd, LPRECT lprc ) -// -// calcluales the rectangle of the mini-caption in screen coords. -// -BOOL PASCAL GetCaptionRect( HWND hWnd, LPRECT lprc ) -{ - UINT nCapSize ; - - nCapSize = GETCAPTIONSIZE( hWnd ) ; - - if (!HASCAPTION( hWnd )) - { - SetRectEmpty( lprc ) ; - return FALSE ; - } - - GetWindowRect( hWnd, lprc ) ; - - // the window might have other non-client components like - // borders - // - if (TestWinStyle( hWnd, WS_THICKFRAME )) - { - lprc->left += GetSystemMetrics( SM_CXFRAME ) ; - lprc->top += GetSystemMetrics( SM_CYFRAME ) ; - lprc->right -= GetSystemMetrics( SM_CXFRAME ) ; - lprc->bottom -= GetSystemMetrics( SM_CYFRAME ) ; - } - else - if (TestWinStyle( hWnd, DS_MODALFRAME )) // if it's a dialog box - { - lprc->left += GetSystemMetrics( SM_CXDLGFRAME ) + GetSystemMetrics( SM_CXBORDER ) ; - lprc->top += GetSystemMetrics( SM_CYDLGFRAME ) + GetSystemMetrics( SM_CYBORDER ) ; - lprc->right -= GetSystemMetrics( SM_CXDLGFRAME ) + GetSystemMetrics( SM_CXBORDER ) ; - lprc->bottom -= GetSystemMetrics( SM_CYDLGFRAME ) + GetSystemMetrics( SM_CYBORDER ) ; - } - else - if (TestWinStyle( hWnd, WS_BORDER )) - { - lprc->left += GetSystemMetrics( SM_CXBORDER ) ; - lprc->top += GetSystemMetrics( SM_CYBORDER ) ; - lprc->right -= GetSystemMetrics( SM_CXBORDER ) ; - lprc->bottom -= GetSystemMetrics( SM_CYBORDER ) ; - } - - if (TestWinStyle( hWnd, IBS_VERTCAPTION )) - lprc->right = lprc->left + nCapSize ; - else - lprc->bottom = lprc->top + nCapSize ; - - return TRUE ; -} // GetCaptionRect() - -// GetIconRect( HWND hWnd, LPRECT lprc ) -// -// Calculates the rect of the icon in screen coordinates. -// -BOOL PASCAL GetIconRect( HWND hWnd, LPRECT lprc ) -{ - UINT nCapSize ; - BOOL fMenu, fVert ; - - fMenu= TestWinStyle( hWnd, WS_SYSMENU ) ; - fVert = TestWinStyle( hWnd, IBS_VERTCAPTION ) ; - - if (!GetCaptionRect( hWnd, lprc )) // window coords - return FALSE ; - - if (!fMenu) - { - SetRectEmpty( lprc ) ; - return FALSE ; - } - - nCapSize = GETCAPTIONSIZE( hWnd ) ; - - if (fVert) - lprc->bottom = lprc->top + nCapSize ; - else - lprc->right = lprc->left + nCapSize ; - - lprc->bottom-- ; - lprc->right-- ; - - return TRUE ; - -} // GetIconRect() - -// GetMinButtonRect() -// -// Calculates the rect of the minimize button in screen -// coordinates. -// -// For horizontal captions, we have the following situation ('Y' is minimize -// and '^' is maximize or restore): -// -// +---------------------------------+ -// | - | | Y | ^ | -// +---------------------------------+ -// | |.......| <-- This is the width (nSize) -// -// For vertical captions, we have the following: -// -// | | -// | | -// | | -// | | -// | | -// | | -// |--|-- -// | Y| . -// |--| . <-- This is the height of the rectangle (nSize) -// | ^| . -// +--+-- -// -// In order to figure out where the minimize button goes, we first need -// to know if there is a maximize button. If so, use GetMaxButtonRect() -// to place... -// -BOOL PASCAL GetMinButtonRect( HWND hWnd, LPRECT lprc ) -{ - if (!TestWinStyle( hWnd, WS_MINIMIZEBOX )) - { - SetRectEmpty( lprc ) ; - return FALSE ; - } - - // The minimize button can be in either position 1 or 2. If there - // is a maximize button, it's in position 2. - // - if (TestWinStyle( hWnd, WS_MAXIMIZEBOX )) - return GetButtonRect( hWnd, 2, lprc ) ; - else - return GetButtonRect( hWnd, 1, lprc ) ; -} - -// GetMaxButtonRect() -// -// Calculates the rect of the maximize button in screen -// coordinates. -// -// The maximize button, if present, is always to the far right -// or bottom. -// -BOOL PASCAL GetMaxButtonRect( HWND hWnd, LPRECT lprc ) -{ - //The maximize button can only be in position 1. - // - if (TestWinStyle( hWnd, WS_MAXIMIZEBOX )) - return GetButtonRect( hWnd, 1, lprc ) ; - else - { - SetRectEmpty( lprc ) ; - return FALSE ; - } -} - -// Get the rect where a button would go. -// -// This function does not care if it's a min or max, just whether -// it is the first from the right/bottom or second from the right/bottom -// and so on.. -// -BOOL PASCAL GetButtonRect( HWND hWnd, UINT nPos, LPRECT lprc ) -{ - UINT nSize = 0 ; - - if (!GetCaptionRect( hWnd, lprc )) //window coords - return FALSE ; - - nSize = GETCAPTIONSIZE( hWnd ) ; - - if (TestWinStyle( hWnd, IBS_VERTCAPTION )) - { - lprc->bottom -= nSize * (nPos-1) ; - lprc->top = lprc->bottom - nSize + 1 ; - } - else - { - lprc->right -= nSize * (nPos-1) ; - lprc->left = lprc->right - nSize + 1 ; - } - - return TRUE ; -} // GetButtonRect() - -// DrawButton( HDC hDC, HWND hWnd, BOOL fMin, BOOL fDepressed ) -// -// Draws either the min, max, or restore buttons. If fMin is FALSE then it -// will draw either the Max or Restore button. If fDepressed is TRUE it will -// draw the button in a down state. -// -void PASCAL DrawButton( HDC hDC, HWND hWnd, BOOL fMin, BOOL fDepressed) -{ - RECT rcButton ; - RECT rc ; - COLORREF rgbWindowFrame ; - BOOL fDC ; - UINT nCapSize ; - UINT nOffset ; - int n ; - - nCapSize = GETCAPTIONSIZE( hWnd ) ; - - // If you look at the standard Windows' min/max buttons, you will notice - // that they have two pixels of 'shadow' to the bottom and right. Since - // our buttons can be really, really small, we only want one pixel of - // shadow when they are small. I arbitrarily decided that if the - // caption size is greater than or equal to 20 we will use two - // pixels. That's what this THREASHOLD stuff does. - // - #define THRESHOLD 20 - nOffset = (nCapSize >= THRESHOLD) ? 2 : 1 ; - - if (!hDC) - { - fDC = TRUE ; - hDC = GetWindowDC( hWnd ) ; - } - else - fDC = FALSE ; - - if (hDC) - { - rgbWindowFrame = GetSysColor( COLOR_WINDOWFRAME ) ; - - if (fMin) - GetMinButtonRect( hWnd, &rcButton ) ; - else - GetMaxButtonRect( hWnd, &rcButton ) ; - - GetWindowRect( hWnd, &rc ) ; - OffsetRect( &rcButton, -rc.left, -rc.top ) ; - - rc = rcButton ; - if (TestWinStyle( hWnd, IBS_VERTCAPTION )) - { - rc = rcButton ; //separator line - rc.bottom = --rc.top + 1 ; - rcButton.right-- ; - } - else - { - rc = rcButton ; //separator line - rc.right = --rc.left + 1 ; - rcButton.bottom-- ; - } - - //Draw separator line - SetBkColor( hDC, rgbWindowFrame ) ; - DRAWFASTRECT( hDC, &rc ) ; - - //Fill - SetBkColor( hDC, RGBLTGRAY ) ; - DRAWFASTRECT( hDC, &rcButton ) ; - - if (!fDepressed) - { - //The normal min/max buttons have one pixel on the top and left - //sides for the highlight, and two pixels on the bottom and - //right side for the shadow. - // - //When our caption is 'small' we only use one pixel on all - //sides. - // - SetBkColor( hDC, RGBWHITE ) ; - //Draw left side - rc = rcButton ; - rc.right = rc.left + 1 ; - DRAWFASTRECT( hDC, &rc ) ; - - //Draw Top - rc = rcButton ; - rc.bottom = rc.top + 1 ; - DRAWFASTRECT( hDC, &rc ) ; - - SetBkColor( hDC, RGBGRAY ) ; - //Draw right side - rc = rcButton ; - rc.left = rc.right - 1 ; - DRAWFASTRECT( hDC, &rc ) ; - if (nCapSize > THRESHOLD) - { - rc.left-- ; - rc.top++ ; - DRAWFASTRECT( hDC, &rc ) ; - } - - //Draw bottom - rc = rcButton ; - rc.top = rc.bottom - 1 ; - DRAWFASTRECT( hDC, &rc ) ; - if (nCapSize > THRESHOLD) - { - rc.top-- ; - rc.left++ ; - DRAWFASTRECT( hDC, &rc ) ; - } - - rcButton.left++ ; - rcButton.top++ ; - rcButton.right -= nOffset ; - rcButton.bottom -= nOffset ; - } - else - { - //Draw depressed state - - SetBkColor( hDC, RGBGRAY ) ; - //Draw left side - rc = rcButton ; - rc.right = rc.left + nOffset ; - DRAWFASTRECT( hDC, &rc ) ; - - //Draw Top - rc = rcButton ; - rc.bottom = rc.top + nOffset ; - DRAWFASTRECT( hDC, &rc ) ; - - rcButton.left += 2 * nOffset ; - rcButton.top += 2 * nOffset ; - } - - // Now draw the arrows. We do not want the - // arrows to grow too large when we have a bigger than - // normal caption, so we restrict their size. - // - // rcButton now represents where we can place our - // arrows. - // - // The maximum size of our arrows (i.e. the width of rcButton) - // has been empirically determined to be SM_CYCAPTION / 2 - // - n = ((GetSystemMetrics( SM_CYCAPTION )) / 2) - - (rcButton.right - rcButton.left) ; - if (n < 1) - InflateRect( &rcButton, n/2-1, n/2-1 ) ; - - if (fMin) - DrawArrow( hDC, &rcButton, ARROW_DOWN ) ; - else - if (IsZoomed( hWnd )) - { - DrawArrow( hDC, &rcButton, ARROW_RESTORE ) ; - } - else - DrawArrow( hDC, &rcButton, ARROW_UP ) ; - - if (fDC) - ReleaseDC( hWnd, hDC ) ; - } - -} // DrawButton() - - -// DrawArrow -// -// Draws either a up or down arrow. The arrow is bound by the rectangle -// -void PASCAL DrawArrow( HDC hdc, LPRECT lprc, UINT uiStyle ) -{ - int row ; - int xTip ; - int yTip ; - RECT rc ; - int nMax = (lprc->bottom - lprc->top) >> 1 ; - - SetBkColor( hdc, RGBBLACK ) ; - - // We draw the arrow by drawing a series of horizontal lines - // - xTip = lprc->left + ((lprc->right - lprc->left+1) >> 1) ; - switch (uiStyle) - { - case ARROW_UP: - yTip = lprc->top + ((lprc->bottom - lprc->top-1) >> 2) ; - for (row = 1 ; row <= nMax ; row++ ) - { - rc.left = xTip - row ; - rc.right = xTip + row - 1 ; - rc.top = yTip + row ; - rc.bottom = rc.top + 1 ; - DRAWFASTRECT( hdc, &rc ) ; - } - break ; - - case ARROW_DOWN: - yTip = lprc->bottom - ((lprc->bottom - lprc->top-1) >> 2) ; - for ( row = nMax ; row > 0 ; row-- ) - { - rc.left = xTip - row ; - rc.right = xTip + row - 1 ; - rc.top = yTip - row ; - rc.bottom = rc.top + 1 ; - DRAWFASTRECT( hdc, &rc ) ; - } - break ; - - case ARROW_RESTORE: - default: - yTip = lprc->top + ((lprc->bottom - lprc->top-1) >> 3) - 2; - for (row = 1 ; row <= nMax ; row++ ) - { - rc.left = xTip - row ; - rc.right = xTip + row - 1 ; - rc.top = yTip + row ; - rc.bottom = rc.top + 1 ; - DRAWFASTRECT( hdc, &rc ) ; - } - - yTip += (nMax+1) * 2 ; - for ( row = nMax ; row > 0 ; row-- ) - { - rc.left = xTip - row ; - rc.right = xTip + row - 1 ; - rc.top = yTip - row ; - rc.bottom = rc.top + 1 ; - DRAWFASTRECT( hdc, &rc ) ; - } - break ; - } - -} // DrawArrow() - -#endif // USE_ITSY_BITSY diff --git a/src/msw/msgdlg.cpp b/src/msw/msgdlg.cpp deleted file mode 100644 index 5abe1042a5..0000000000 --- a/src/msw/msgdlg.cpp +++ /dev/null @@ -1,105 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: msgdlg.cpp -// Purpose: wxMessageDialog -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "msgdlg.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/defs.h" -#include "wx/utils.h" -#include "wx/dialog.h" -#include "wx/msgdlg.h" -#endif - -#include "wx/msw/private.h" - -#include -#include -#include - -#define wxDIALOG_DEFAULT_X 300 -#define wxDIALOG_DEFAULT_Y 300 - -#if !USE_SHARED_LIBRARY -IMPLEMENT_CLASS(wxMessageDialog, wxDialog) -#endif - -wxMessageDialog::wxMessageDialog(wxWindow *parent, const wxString& message, const wxString& caption, - long style, const wxPoint& pos) -{ - m_caption = caption; - m_message = message; - m_dialogStyle = style; - m_parent = parent; -} - -int wxMessageDialog::ShowModal(void) -{ - HWND hWnd = 0; - if (m_parent) hWnd = (HWND) m_parent->GetHWND(); - unsigned int msStyle = MB_OK; - if (m_dialogStyle & wxYES_NO) - { - if (m_dialogStyle & wxCANCEL) - msStyle = MB_YESNOCANCEL; - else - msStyle = MB_YESNO; - } - if (m_dialogStyle & wxOK) - { - if (m_dialogStyle & wxCANCEL) - msStyle = MB_OKCANCEL; - else - msStyle = MB_OK; - } - if (m_dialogStyle & wxICON_EXCLAMATION) - msStyle |= MB_ICONEXCLAMATION; - else if (m_dialogStyle & wxICON_HAND) - msStyle |= MB_ICONHAND; - else if (m_dialogStyle & wxICON_INFORMATION) - msStyle |= MB_ICONINFORMATION; - else if (m_dialogStyle & wxICON_QUESTION) - msStyle |= MB_ICONQUESTION; - - if (hWnd) - msStyle |= MB_APPLMODAL; - else - msStyle |= MB_TASKMODAL; - - int msAns = MessageBox(hWnd, (LPCSTR)(const char *)m_message, (LPCSTR)(const char *)m_caption, msStyle); - int ans = wxOK; - switch (msAns) - { - case IDCANCEL: - ans = wxID_CANCEL; - break; - case IDOK: - ans = wxID_OK; - break; - case IDYES: - ans = wxID_YES; - break; - case IDNO: - ans = wxID_NO; - break; - } - return ans; -} - diff --git a/src/msw/nativdlg.cpp b/src/msw/nativdlg.cpp deleted file mode 100644 index 9c3088c8bd..0000000000 --- a/src/msw/nativdlg.cpp +++ /dev/null @@ -1,289 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: nativdlg.cpp -// Purpose: Native dialog loading code (part of wxWindow) -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/wx.h" -#endif - -#include "wx/spinbutt.h" -#include "wx/msw/private.h" - -extern wxWindow *wxWndHook; -extern LONG APIENTRY _EXPORT wxDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); - -bool wxWindow::LoadNativeDialog(wxWindow* parent, wxWindowID& id) -{ - m_windowId = id; - wxWndHook = this; - m_hWnd = (WXHWND) ::CreateDialog((HINSTANCE) wxGetInstance(), MAKEINTRESOURCE(id), - (HWND) (parent ? parent->GetHWND() : (WXHWND) NULL), (DLGPROC) wxDlgProc); - wxWndHook = NULL; - - if ( !m_hWnd ) - return FALSE; - - SubclassWin(GetHWND()); - - if (!parent) - wxTopLevelWindows.Append(this); - - if ( parent ) - parent->AddChild(this); - - // Enumerate all children - HWND hWndNext; - hWndNext = ::GetWindow((HWND) m_hWnd, GW_CHILD); - - wxWindow* child = NULL; - if (hWndNext) - child = CreateWindowFromHWND(this, (WXHWND) hWndNext); - - while (hWndNext != NULL) - { - hWndNext = ::GetWindow(hWndNext, GW_HWNDNEXT); - if (hWndNext) - child = CreateWindowFromHWND(this, (WXHWND) hWndNext); - } - - return TRUE; -} - -bool wxWindow::LoadNativeDialog(wxWindow* parent, const wxString& name) -{ - SetName(name); - - wxWndHook = this; - m_hWnd = (WXHWND) ::CreateDialog((HINSTANCE) wxGetInstance(), (const char *) name, - (HWND) (parent ? parent->GetHWND() : (WXHWND) NULL), (DLGPROC) wxDlgProc); - wxWndHook = NULL; - - if ( !m_hWnd ) - return FALSE; - - SubclassWin(GetHWND()); - - if (!parent) - wxTopLevelWindows.Append(this); - - if ( parent ) - parent->AddChild(this); - - return TRUE; -} - -wxWindow* wxWindow::GetWindowChild1(wxWindowID& id) -{ - if ( m_windowId == id ) - return this; - - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow* child = (wxWindow*) node->Data(); - wxWindow* win = child->GetWindowChild1(id); - if ( win ) - return win; - node = node->Next(); - } - - return NULL; -} - -wxWindow* wxWindow::GetWindowChild(wxWindowID& id) -{ - wxWindow* win = GetWindowChild1(id); - if ( !win ) - { - HWND hWnd = ::GetDlgItem((HWND) GetHWND(), id); - - if (hWnd) - { - wxWindow* child = CreateWindowFromHWND(this, (WXHWND) hWnd); - if (child) - { - child->AddChild(this); - return child; - } - } - } - return NULL; -} - - -wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd) -{ - char buf[256]; - -#ifndef __WIN32__ - GetClassName((HWND) hWnd, buf, 256); -#else -#ifdef UNICODE - GetClassNameW((HWND) hWnd, buf, 256); -#else - GetClassNameA((HWND) hWnd, buf, 256); -#endif -#endif - - wxString str(buf); - str.UpperCase(); - -#ifndef __WIN32__ - long id = (long) GetWindowWord((HWND) hWnd, GWW_ID); -#else - long id = GetWindowLong((HWND) hWnd, GWL_ID); -#endif - - long style = GetWindowLong((HWND) hWnd, GWL_STYLE); - - wxWindow* win = NULL; - - if (str == "BUTTON") - { - int style1 = (style & 0xFF); - if ((style1 == BS_3STATE) || (style1 == BS_AUTO3STATE) || (style1 == BS_AUTOCHECKBOX) || - (style1 == BS_CHECKBOX)) - { - win = new wxCheckBox; - } - else if ((style1 == BS_AUTORADIOBUTTON) || (style1 == BS_RADIOBUTTON)) - { - win = new wxRadioButton; - } -#ifdef __WIN32__ - else if (style & BS_BITMAP) - { - // TODO: how to find the bitmap? - win = new wxBitmapButton; - wxMessageBox("Have not yet implemented bitmap button as BS_BITMAP button."); - } -#endif - else if (style1 == BS_OWNERDRAW) - { - // TODO: how to find the bitmap? - // TODO: can't distinguish between bitmap button and bitmap static. - // Change implementation of wxStaticBitmap to SS_BITMAP. - // PROBLEM: this assumes that we're using resource-based bitmaps. - // So maybe need 2 implementations of bitmap buttons/static controls, - // with a switch in the drawing code. Call default proc if BS_BITMAP. - win = new wxBitmapButton; - } - else if ((style1 == BS_PUSHBUTTON) || (style1 == BS_DEFPUSHBUTTON)) - { - win = new wxButton; - } - else if (style1 == BS_GROUPBOX) - { - win = new wxStaticBox; - } - else - { - char buf[256]; - sprintf(buf, "Don't know what kind of button this is: id = %d", (int) id); - wxMessageBox(buf); - } - } - else if (str == "COMBOBOX") - { - win = new wxComboBox; - } - // TODO: Problem if the user creates a multiline - but not rich text - text control, - // since wxWin assumes RichEdit control for this. Should have m_isRichText in - // wxTextCtrl. Also, convert as much of the window style as is necessary - // for correct functioning. - // Could have wxWindow::AdoptAttributesFromHWND(WXHWND) - // to be overridden by each control class. - else if (str == "EDIT") - { - win = new wxTextCtrl; - } - else if (str == "LISTBOX") - { - win = new wxListBox; - } - else if (str == "SCROLLBAR") - { - win = new wxScrollBar; - } -#if defined(__WIN95__) - else if (str == "MSCTLS_UPDOWN32") - { - win == new wxSpinButton; - } -#endif - else if (str == "MSCTLS_TRACKBAR32") - { - // Need to ascertain if it's horiz or vert - win = new wxSlider; - } - else if (str == "STATIC") - { - int style1 = (style & 0xFF); - - if ((style1 == SS_LEFT) || (style1 == SS_RIGHT) || (style1 == SS_SIMPLE)) - win = new wxStaticText; -#ifdef __WIN32__ - else if (style1 == SS_BITMAP) - { - win = new wxStaticBitmap; - - // Help! this doesn't correspond with the wxWin implementation. - wxMessageBox("Please make SS_BITMAP statics into owner-draw buttons."); - } -#endif - } - else - { - wxString msg("Don't know how to convert from Windows class "); - msg += str; - wxMessageBox(msg); - } - - if (win) - { - parent->AddChild(win); - win->SetEventHandler(win); - win->SetHWND(hWnd); - win->SetId(id); - win->SubclassWin(hWnd); - win->AdoptAttributesFromHWND(); - win->SetupColours(); - - return win; - } - else - return NULL; -} - -// Make sure the window style (etc.) reflects the HWND style (roughly) -void wxWindow::AdoptAttributesFromHWND(void) -{ - HWND hWnd = (HWND) GetHWND(); - long style = GetWindowLong((HWND) hWnd, GWL_STYLE); - - if (style & WS_VSCROLL) - m_windowStyle |= wxVSCROLL; - if (style & WS_HSCROLL) - m_windowStyle |= wxHSCROLL; -} - - diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp deleted file mode 100644 index 538c053be0..0000000000 --- a/src/msw/notebook.cpp +++ /dev/null @@ -1,484 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: msw/notebook.cpp -// Purpose: implementation of wxNotebook -// Author: Vadim Zeitlin -// Modified by: -// Created: 11.06.98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- -#ifdef __GNUG__ - #pragma implementation "notebook.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif - -// wxWindows -#ifndef WX_PRECOMP - #include -#endif // WX_PRECOMP - -#include -#include -#include - -#include - -// Windows standard headers -#ifndef __WIN95__ - #error "wxNotebook is not supported under Windows 3.1" -#endif //Win95 - -#include // for SetWindowFont - -#ifdef __GNUWIN32__ - #include "wx/msw/gnuwin32/extra.h" -#else //!GnuWin32 - #include -#endif - -// ---------------------------------------------------------------------------- -// macros -// ---------------------------------------------------------------------------- - -// check that the page index is valid -#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount())) - -// hide the ugly cast -#define m_hwnd (HWND)GetHWND() - -// ---------------------------------------------------------------------------- -// event table -// ---------------------------------------------------------------------------- - -#if !USE_SHARED_LIBRARIES - BEGIN_EVENT_TABLE(wxNotebook, wxControl) - EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange) - - EVT_SIZE(wxNotebook::OnSize) - EVT_SET_FOCUS(wxNotebook::OnSetFocus) - EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey) - END_EVENT_TABLE() - - IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) - IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent) -#endif - -// ============================================================================ -// implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// wxNotebook construction -// ---------------------------------------------------------------------------- - -// common part of all ctors -void wxNotebook::Init() -{ - m_pImageList = NULL; - m_nSelection = -1; -} - -// default for dynamic class -wxNotebook::wxNotebook() -{ - Init(); -} - -// the same arguments as for wxControl -wxNotebook::wxNotebook(wxWindow *parent, - wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - Init(); - - Create(parent, id, pos, size, style, name); -} - -// Create() function -bool wxNotebook::Create(wxWindow *parent, - wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - // base init - SetName(name); - SetParent(parent); - - m_windowId = id == -1 ? NewControlId() : id; - - // colors and font - m_backgroundColour = wxColour(GetSysColor(COLOR_BTNFACE)); - m_foregroundColour = *wxBLACK ; - - m_defaultForegroundColour = *wxBLACK ; - m_defaultBackgroundColour = wxColour(GetSysColor(COLOR_BTNFACE)); - - // style - m_windowStyle = style; - - long tabStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | TCS_TABS; - if ( m_windowStyle & wxTC_MULTILINE ) - tabStyle |= TCS_MULTILINE; - if ( m_windowStyle & wxBORDER ) - tabStyle &= WS_BORDER; - - // create the tab control. - m_hWnd = (WXHWND)CreateWindowEx - ( - 0, // extended style - WC_TABCONTROL, // class name for the tab control - "", // no caption - tabStyle, // style - pos.x, pos.y, size.x, size.y, // size and position - (HWND)parent->GetHWND(), // parent window - (HMENU)m_windowId, // child id - wxGetInstance(), // current instance - NULL // no class data - ); - - if ( m_hWnd == 0 ) { - wxLogSysError("Can't create the notebook control"); - return FALSE; - } - - SetWindowFont((HWND)m_hwnd, ::GetStockObject(DEFAULT_GUI_FONT), FALSE); - - if ( parent != NULL ) - parent->AddChild(this); - - SubclassWin(m_hWnd); - - return TRUE; -} - -// dtor -wxNotebook::~wxNotebook() -{ -} - -// ---------------------------------------------------------------------------- -// wxNotebook accessors -// ---------------------------------------------------------------------------- -int wxNotebook::GetPageCount() const -{ - // consistency check - wxASSERT( (int)m_aPages.Count() == TabCtrl_GetItemCount(m_hwnd) ); - - return m_aPages.Count(); -} - -int wxNotebook::GetRowCount() const -{ - return TabCtrl_GetRowCount(m_hwnd); -} - -int wxNotebook::SetSelection(int nPage) -{ - wxASSERT( IS_VALID_PAGE(nPage) ); - - ChangePage(m_nSelection, nPage); - - return TabCtrl_SetCurSel(m_hwnd, nPage); -} - -void wxNotebook::AdvanceSelection(bool bForward) -{ - int nSel = GetSelection(); - int nMax = GetPageCount() - 1; - if ( bForward ) - SetSelection(nSel == nMax ? 0 : nSel + 1); - else - SetSelection(nSel == 0 ? nMax : nSel - 1); -} - -bool wxNotebook::SetPageText(int nPage, const wxString& strText) -{ - wxASSERT( IS_VALID_PAGE(nPage) ); - - TC_ITEM tcItem; - tcItem.mask = TCIF_TEXT; - tcItem.pszText = (char *)strText.c_str(); - - return TabCtrl_SetItem(m_hwnd, nPage, &tcItem) != 0; -} - -wxString wxNotebook::GetPageText(int nPage) const -{ - wxASSERT( IS_VALID_PAGE(nPage) ); - - char buf[256]; - TC_ITEM tcItem; - tcItem.mask = TCIF_TEXT; - tcItem.pszText = buf; - tcItem.cchTextMax = WXSIZEOF(buf); - - wxString str; - if ( TabCtrl_GetItem(m_hwnd, nPage, &tcItem) ) - str = tcItem.pszText; - - return str; -} - -int wxNotebook::GetPageImage(int nPage) const -{ - wxASSERT( IS_VALID_PAGE(nPage) ); - - TC_ITEM tcItem; - tcItem.mask = TCIF_IMAGE; - - return TabCtrl_GetItem(m_hwnd, nPage, &tcItem) ? tcItem.iImage : -1; -} - -bool wxNotebook::SetPageImage(int nPage, int nImage) -{ - wxASSERT( IS_VALID_PAGE(nPage) ); - - TC_ITEM tcItem; - tcItem.mask = TCIF_IMAGE; - tcItem.iImage = nImage; - - return TabCtrl_SetItem(m_hwnd, nPage, &tcItem) != 0; -} - -void wxNotebook::SetImageList(wxImageList* imageList) -{ - m_pImageList = imageList; - TabCtrl_SetImageList(m_hwnd, (HIMAGELIST)imageList->GetHIMAGELIST()); -} - -// ---------------------------------------------------------------------------- -// wxNotebook operations -// ---------------------------------------------------------------------------- - -// remove one page from the notebook -bool wxNotebook::DeletePage(int nPage) -{ - wxCHECK( IS_VALID_PAGE(nPage), FALSE ); - - TabCtrl_DeleteItem(m_hwnd, nPage); - - delete m_aPages[nPage]; - m_aPages.Remove(nPage); - - return TRUE; -} - -// remove all pages -bool wxNotebook::DeleteAllPages() -{ - TabCtrl_DeleteAllItems(m_hwnd); - - int nPageCount = GetPageCount(); - int nPage; - for ( nPage = 0; nPage < nPageCount; nPage++ ) - delete m_aPages[nPage]; - - m_aPages.Clear(); - - return TRUE; -} - -// add a page to the notebook -bool wxNotebook::AddPage(wxNotebookPage *pPage, - const wxString& strText, - bool bSelect, - int imageId) -{ - return InsertPage(GetPageCount(), pPage, strText, bSelect, imageId); -} - -// same as AddPage() but does it at given position -bool wxNotebook::InsertPage(int nPage, - wxNotebookPage *pPage, - const wxString& strText, - bool bSelect, - int imageId) -{ - wxASSERT( pPage != NULL ); - wxCHECK( IS_VALID_PAGE(nPage) || nPage == GetPageCount(), FALSE ); - - // add the tab to the control - TC_ITEM tcItem; - tcItem.mask = TCIF_TEXT | TCIF_IMAGE; - tcItem.pszText = (char *)strText.c_str(); - tcItem.iImage = imageId; - - if ( TabCtrl_InsertItem(m_hwnd, nPage, &tcItem) == -1 ) { - wxLogError("Can't create the notebook page '%s'.", strText.c_str()); - return FALSE; - } - - // save the pointer to the page - m_aPages.Insert(pPage, nPage); - - // some page must be selected: either this one or the first one if there is - // still no selection - if ( bSelect ) - m_nSelection = nPage; - else if ( m_nSelection == -1 ) - m_nSelection = 0; - - // don't show pages by default (we'll need to adjust their size first) - HWND hwnd = (HWND)pPage->GetHWND(); - SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) & ~WS_VISIBLE); - - return TRUE; -} - -// ---------------------------------------------------------------------------- -// wxNotebook callbacks -// ---------------------------------------------------------------------------- - -void wxNotebook::OnSize(wxSizeEvent& event) -{ - // emulate page change (it's esp. important to do it first time because - // otherwise our page would stay invisible) - int nSel = m_nSelection; - m_nSelection = -1; - SetSelection(nSel); - - // fit the notebook page to the tab control's display area - RECT rc; - rc.left = rc.top = 0; - GetSize((int *)&rc.right, (int *)&rc.bottom); - - TabCtrl_AdjustRect(m_hwnd, FALSE, &rc); - size_t nCount = m_aPages.Count(); - for ( size_t nPage = 0; nPage < nCount; nPage++ ) { - wxNotebookPage *pPage = m_aPages[nPage]; - pPage->SetSize(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top); - if ( pPage->GetAutoLayout() ) - pPage->Layout(); - } - - event.Skip(); -} - -void wxNotebook::OnSelChange(wxNotebookEvent& event) -{ - // is it our tab control? - if ( event.GetEventObject() == this ) - ChangePage(event.GetOldSelection(), event.GetSelection()); - - // we want to give others a chance to process this message as well - event.Skip(); -} - -void wxNotebook::OnSetFocus(wxFocusEvent& event) -{ - // set focus to the currently selected page if any - if ( m_nSelection != -1 ) - m_aPages[m_nSelection]->SetFocus(); - - event.Skip(); -} - -void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event) -{ - if ( event.IsWindowChange() ) { - // change pages - AdvanceSelection(event.GetDirection()); - } - else { - // pass to the parent - if ( GetParent() ) { - event.SetCurrentFocus(this); - GetParent()->ProcessEvent(event); - } - } -} - -// ---------------------------------------------------------------------------- -// wxNotebook base class virtuals -// ---------------------------------------------------------------------------- - -// override these 2 functions to do nothing: everything is done in OnSize - -void wxNotebook::SetConstraintSizes(bool /* recurse */) -{ - // don't set the sizes of the pages - their correct size is not yet known - wxControl::SetConstraintSizes(FALSE); -} - -bool wxNotebook::DoPhase(int /* nPhase */) -{ - return TRUE; -} - -void wxNotebook::Command(wxCommandEvent& event) -{ - wxFAIL_MSG("wxNotebook::Command not implemented"); -} - -bool wxNotebook::MSWNotify(WXWPARAM wParam, WXLPARAM lParam) -{ - wxNotebookEvent event(wxEVT_NULL, m_windowId); - - NMHDR* hdr = (NMHDR *)lParam; - switch ( hdr->code ) { - case TCN_SELCHANGE: - event.SetEventType(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED); - break; - - case TCN_SELCHANGING: - event.SetEventType(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING); - break; - - // prevent this msg from being passed to wxControl::MSWNotify which would - // retrun FALSE disabling the change of page - case UDN_DELTAPOS: - return TRUE; - - default : - return wxControl::MSWNotify(wParam, lParam); - } - - event.SetSelection(TabCtrl_GetCurSel(m_hwnd)); - event.SetOldSelection(m_nSelection); - event.SetEventObject(this); - event.SetInt(LOWORD(wParam)); - - return ProcessEvent(event); -} - -// ---------------------------------------------------------------------------- -// wxNotebook helper functions -// ---------------------------------------------------------------------------- - -// hide the currently active panel and show the new one -void wxNotebook::ChangePage(int nOldSel, int nSel) -{ - // it's not an error (the message may be generated by the tab control itself) - // and it may happen - just do nothing - if ( nSel == nOldSel ) - return; - - if ( nOldSel != -1 ) - m_aPages[nOldSel]->Show(FALSE); - - wxNotebookPage *pPage = m_aPages[nSel]; - pPage->Show(TRUE); - pPage->SetFocus(); - - m_nSelection = nSel; -} diff --git a/src/msw/ole/dataobj.cpp b/src/msw/ole/dataobj.cpp deleted file mode 100644 index 944540a430..0000000000 --- a/src/msw/ole/dataobj.cpp +++ /dev/null @@ -1,409 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: msw/ole/dataobj.cpp -// Purpose: implementation of wx[I]DataObject class -// Author: Vadim Zeitlin -// Modified by: -// Created: 10.05.98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- - -#ifdef __GNUG__ - #pragma implementation "dataobj.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#if defined(__BORLANDC__) - #pragma hdrstop -#endif - -#include - -#if defined(__WIN32__) && !defined(__GNUWIN32__) - -#include -#include -#include - -#ifndef __WIN32__ - #include - #include -#endif - -// ---------------------------------------------------------------------------- -// functions -// ---------------------------------------------------------------------------- - -static const char *GetTymedName(DWORD tymed); - -// ---------------------------------------------------------------------------- -// wxIEnumFORMATETC interface implementation -// ---------------------------------------------------------------------------- -class wxIEnumFORMATETC : public IEnumFORMATETC -{ -public: - wxIEnumFORMATETC(CLIPFORMAT cf); - - DECLARE_IUNKNOWN_METHODS; - - // IEnumFORMATETC - STDMETHODIMP Next(ULONG celt, FORMATETC *rgelt, ULONG *pceltFetched); - STDMETHODIMP Skip(ULONG celt); - STDMETHODIMP Reset(); - STDMETHODIMP Clone(IEnumFORMATETC **ppenum); - -private: - FORMATETC m_format; // (unique @@@) format we can provide data in - ULONG m_nCurrent; // current enum position (currently either 0 or 1) -}; - -// ---------------------------------------------------------------------------- -// wxIDataObject implementation of IDataObject interface -// ---------------------------------------------------------------------------- -class wxIDataObject : public IDataObject -{ -public: - wxIDataObject(wxDataObject *pDataObject); - - DECLARE_IUNKNOWN_METHODS; - - // IDataObject - STDMETHODIMP GetData(FORMATETC *pformatetcIn, STGMEDIUM *pmedium); - STDMETHODIMP GetDataHere(FORMATETC *pformatetc, STGMEDIUM *pmedium); - STDMETHODIMP QueryGetData(FORMATETC *pformatetc); - STDMETHODIMP GetCanonicalFormatEtc(FORMATETC *In, FORMATETC *pOut); - STDMETHODIMP SetData(FORMATETC *pfetc, STGMEDIUM *pmedium, BOOL fRelease); - STDMETHODIMP EnumFormatEtc(DWORD dwDirection, IEnumFORMATETC **ppenumFEtc); - STDMETHODIMP DAdvise(FORMATETC *pfetc, DWORD ad, IAdviseSink *p, DWORD *pdw); - STDMETHODIMP DUnadvise(DWORD dwConnection); - STDMETHODIMP EnumDAdvise(IEnumSTATDATA **ppenumAdvise); - -private: - wxDataObject *m_pDataObject; // pointer to C++ class we belong to -}; - -// ============================================================================ -// implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// wxIEnumFORMATETC -// ---------------------------------------------------------------------------- - -BEGIN_IID_TABLE(wxIEnumFORMATETC) - ADD_IID(Unknown) - ADD_IID(EnumFORMATETC) -END_IID_TABLE; - -IMPLEMENT_IUNKNOWN_METHODS(wxIEnumFORMATETC) - -wxIEnumFORMATETC::wxIEnumFORMATETC(CLIPFORMAT cf) -{ - m_format.cfFormat = cf; - m_format.ptd = NULL; - m_format.dwAspect = DVASPECT_CONTENT; - m_format.lindex = -1; - m_format.tymed = TYMED_HGLOBAL; - m_cRef = 0; - m_nCurrent = 0; -} - -STDMETHODIMP wxIEnumFORMATETC::Next(ULONG celt, - FORMATETC *rgelt, - ULONG *pceltFetched) -{ - wxLogTrace("wxIEnumFORMATETC::Next"); - - if ( celt > 1 ) - return S_FALSE; - - if ( m_nCurrent == 0 ) { - *rgelt = m_format; - m_nCurrent++; - - return S_OK; - } - else - return S_FALSE; -} - -STDMETHODIMP wxIEnumFORMATETC::Skip(ULONG celt) -{ - wxLogTrace("wxIEnumFORMATETC::Skip"); - - if ( m_nCurrent == 0 ) - m_nCurrent++; - - return S_FALSE; -} - -STDMETHODIMP wxIEnumFORMATETC::Reset() -{ - wxLogTrace("wxIEnumFORMATETC::Reset"); - - m_nCurrent = 0; - - return S_OK; -} - -STDMETHODIMP wxIEnumFORMATETC::Clone(IEnumFORMATETC **ppenum) -{ - wxLogTrace("wxIEnumFORMATETC::Clone"); - - wxIEnumFORMATETC *pNew = new wxIEnumFORMATETC(m_format.cfFormat); - pNew->AddRef(); - *ppenum = pNew; - - return S_OK; -} - -// ---------------------------------------------------------------------------- -// wxIDataObject -// ---------------------------------------------------------------------------- - -BEGIN_IID_TABLE(wxIDataObject) - ADD_IID(Unknown) - ADD_IID(DataObject) -END_IID_TABLE; - -IMPLEMENT_IUNKNOWN_METHODS(wxIDataObject) - -wxIDataObject::wxIDataObject(wxDataObject *pDataObject) -{ - m_cRef = 0; - m_pDataObject = pDataObject; -} - -// get data functions -STDMETHODIMP wxIDataObject::GetData(FORMATETC *pformatetcIn, STGMEDIUM *pmedium) -{ - wxLogTrace("wxIDataObject::GetData"); - - // is data is in our format? - HRESULT hr = QueryGetData(pformatetcIn); - if ( FAILED(hr) ) - return hr; - - // alloc memory - HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, - m_pDataObject->GetDataSize()); - if ( hGlobal == NULL ) { - wxLogLastError("GlobalAlloc"); - return E_OUTOFMEMORY; - } - - // copy data - pmedium->tymed = TYMED_HGLOBAL; - pmedium->hGlobal = hGlobal; - pmedium->pUnkForRelease = NULL; - - hr = GetDataHere(pformatetcIn, pmedium); - if ( FAILED(hr) ) { - GlobalFree(hGlobal); - return hr; - } - - return S_OK; -} - -STDMETHODIMP wxIDataObject::GetDataHere(FORMATETC *pformatetc, - STGMEDIUM *pmedium) -{ - wxLogTrace("wxIDataObject::GetDataHere"); - - // put data in caller provided medium - if ( pmedium->tymed != TYMED_HGLOBAL ) - return DV_E_TYMED; - - // copy data - void *pBuf = GlobalLock(pmedium->hGlobal); - if ( pBuf == NULL ) { - wxLogLastError("GlobalLock"); - return E_OUTOFMEMORY; - } - - m_pDataObject->GetDataHere(pBuf); - - GlobalUnlock(pmedium->hGlobal); - - return S_OK; -} - -// set data functions (not implemented) -STDMETHODIMP wxIDataObject::SetData(FORMATETC *pformatetc, - STGMEDIUM *pmedium, - BOOL fRelease) -{ - wxLogTrace("wxIDataObject::SetData"); - return E_NOTIMPL; -} - -// information functions -STDMETHODIMP wxIDataObject::QueryGetData(FORMATETC *pformatetc) -{ - // do we accept data in this format? - if ( pformatetc == NULL ) { - wxLogTrace("wxIDataObject::QueryGetData: invalid ptr."); - return E_INVALIDARG; - } - - // the only one allowed by current COM implementation - if ( pformatetc->lindex != -1 ) { - wxLogTrace("wxIDataObject::QueryGetData: bad lindex %d", - pformatetc->lindex); - return DV_E_LINDEX; - } - - // we don't support anything other (THUMBNAIL, ICON, DOCPRINT...) - if ( pformatetc->dwAspect != DVASPECT_CONTENT ) { - wxLogTrace("wxIDataObject::QueryGetData: bad dwAspect %d", - pformatetc->dwAspect); - return DV_E_DVASPECT; - } - - // @@ we only transfer data by global memory (bad for large amounts of it!) - if ( !(pformatetc->tymed & TYMED_HGLOBAL) ) { - wxLogTrace("wxIDataObject::QueryGetData: %s != TYMED_HGLOBAL.", - GetTymedName(pformatetc->tymed)); - return DV_E_TYMED; - } - - // and now check the type of data requested - if ( m_pDataObject->IsSupportedFormat((wxDataFormat) pformatetc->cfFormat) ) { - wxLogTrace("wxIDataObject::QueryGetData: %s ok", - wxDataObject::GetFormatName((wxDataFormat) pformatetc->cfFormat)); - return S_OK; - } - else { - wxLogTrace("wxIDataObject::QueryGetData: %s unsupported", - wxDataObject::GetFormatName((wxDataFormat) pformatetc->cfFormat)); - return DV_E_FORMATETC; - } -} - -STDMETHODIMP wxIDataObject::GetCanonicalFormatEtc(FORMATETC *pFormatetcIn, - FORMATETC *pFormatetcOut) -{ - wxLogTrace("wxIDataObject::GetCanonicalFormatEtc"); - - // @@ implementation is trivial, we might want something better here - if ( pFormatetcOut != NULL ) - pFormatetcOut->ptd = NULL; - return DATA_S_SAMEFORMATETC; -} - -STDMETHODIMP wxIDataObject::EnumFormatEtc(DWORD dwDirection, - IEnumFORMATETC **ppenumFormatEtc) -{ - wxLogTrace("wxIDataObject::EnumFormatEtc"); - - if ( dwDirection == DATADIR_SET ) { - // we don't allow setting of data anyhow - return E_NOTIMPL; - } - - wxIEnumFORMATETC *pEnum = - new wxIEnumFORMATETC(m_pDataObject->GetPreferredFormat()); - pEnum->AddRef(); - *ppenumFormatEtc = pEnum; - - return S_OK; -} - -// advise sink functions (not implemented) -STDMETHODIMP wxIDataObject::DAdvise(FORMATETC *pformatetc, - DWORD advf, - IAdviseSink *pAdvSink, - DWORD *pdwConnection) -{ - return OLE_E_ADVISENOTSUPPORTED; -} - -STDMETHODIMP wxIDataObject::DUnadvise(DWORD dwConnection) -{ - return OLE_E_ADVISENOTSUPPORTED; -} - -STDMETHODIMP wxIDataObject::EnumDAdvise(IEnumSTATDATA **ppenumAdvise) -{ - return OLE_E_ADVISENOTSUPPORTED; -} - -// ---------------------------------------------------------------------------- -// wxDataObject -// ---------------------------------------------------------------------------- - -wxDataObject::wxDataObject() -{ - m_pIDataObject = new wxIDataObject(this); - m_pIDataObject->AddRef(); -} - -wxDataObject::~wxDataObject() -{ - m_pIDataObject->Release(); -} - -const char *wxDataObject::GetFormatName(wxDataFormat format) -{ -#ifdef __WXDEBUG__ - static char s_szBuf[128]; - switch ( format ) { - case CF_TEXT: return "CF_TEXT"; - case CF_BITMAP: return "CF_BITMAP"; - case CF_METAFILEPICT: return "CF_METAFILEPICT"; - case CF_SYLK: return "CF_SYLK"; - case CF_DIF: return "CF_DIF"; - case CF_TIFF: return "CF_TIFF"; - case CF_OEMTEXT: return "CF_OEMTEXT"; - case CF_DIB: return "CF_DIB"; - case CF_PALETTE: return "CF_PALETTE"; - case CF_PENDATA: return "CF_PENDATA"; - case CF_RIFF: return "CF_RIFF"; - case CF_WAVE: return "CF_WAVE"; - case CF_UNICODETEXT: return "CF_UNICODETEXT"; - case CF_ENHMETAFILE: return "CF_ENHMETAFILE"; - case CF_HDROP: return "CF_HDROP"; - case CF_LOCALE: return "CF_LOCALE"; - default: - sprintf(s_szBuf, "clipboard format %d (unknown)", format); - return s_szBuf; - } - #else - return ""; -#endif -} - -// ---------------------------------------------------------------------------- -// private functions -// ---------------------------------------------------------------------------- -static const char *GetTymedName(DWORD tymed) -{ - static char s_szBuf[128]; - switch ( tymed ) { - case TYMED_HGLOBAL: return "TYMED_HGLOBAL"; - case TYMED_FILE: return "TYMED_FILE"; - case TYMED_ISTREAM: return "TYMED_ISTREAM"; - case TYMED_ISTORAGE: return "TYMED_ISTORAGE"; - case TYMED_GDI: return "TYMED_GDI"; - case TYMED_MFPICT: return "TYMED_MFPICT"; - case TYMED_ENHMF: return "TYMED_ENHMF"; - default: - sprintf(s_szBuf, "type of media format %d (unknown)", tymed); - return s_szBuf; - } -} - -#endif - diff --git a/src/msw/ole/dropsrc.cpp b/src/msw/ole/dropsrc.cpp deleted file mode 100644 index 1f97088732..0000000000 --- a/src/msw/ole/dropsrc.cpp +++ /dev/null @@ -1,234 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: msw/ole/dropsrc.cpp -// Purpose: implementation of wxIDropSource and wxDropSource -// Author: Vadim Zeitlin -// Modified by: -// Created: 10.05.98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- - -#ifdef __GNUG__ - #pragma implementation "dropsrc.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#if defined(__BORLANDC__) - #pragma hdrstop -#endif - -#include - -#if USE_DRAG_AND_DROP - -#include -#include -#include -#include - -#ifndef __WIN32__ - #include - #include -#endif - -// ---------------------------------------------------------------------------- -// wxIDropSource implementation of IDropSource interface -// ---------------------------------------------------------------------------- - -class wxIDropSource : public IDropSource -{ -public: - wxIDropSource(wxDropSource *pDropSource); - - DECLARE_IUNKNOWN_METHODS; - - // IDropSource - STDMETHODIMP QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState); - STDMETHODIMP GiveFeedback(DWORD dwEffect); - -private: - DWORD m_grfInitKeyState; // button which started the d&d operation - wxDropSource *m_pDropSource; // pointer to C++ class we belong to -}; - -// ============================================================================ -// Implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// wxIDropSource implementation -// ---------------------------------------------------------------------------- -BEGIN_IID_TABLE(wxIDropSource) - ADD_IID(Unknown) - ADD_IID(DropSource) -END_IID_TABLE; - -IMPLEMENT_IUNKNOWN_METHODS(wxIDropSource) - -wxIDropSource::wxIDropSource(wxDropSource *pDropSource) -{ - wxASSERT( pDropSource != NULL ); - - m_pDropSource = pDropSource; - m_grfInitKeyState = 0; - m_cRef = 0; -} - -// Name : wxIDropSource::QueryContinueDrag -// Purpose : decide if drag operation must be continued or not -// Returns : HRESULT: S_OK if we should continue -// DRAGDROP_S_DROP to drop right now -// DRAGDROP_S_CANCEL to cancel everything -// Params : [in] BOOL fEscapePressed pressed since last call? -// [in] DWORD grfKeyState mask containing state of kbd keys -// Notes : as there is no reasonably simple portable way to implement this -// function, we currently don't give the possibility to override the -// default behaviour implemented here -STDMETHODIMP wxIDropSource::QueryContinueDrag(BOOL fEscapePressed, - DWORD grfKeyState) -{ - if ( fEscapePressed ) - return DRAGDROP_S_CANCEL; - - // initialize ourself with the drag begin button - if ( m_grfInitKeyState == 0 ) { - m_grfInitKeyState = grfKeyState & (MK_LBUTTON | MK_RBUTTON | MK_MBUTTON); - } - - if ( !(grfKeyState & m_grfInitKeyState) ) { - // button which started d&d released, go! - return DRAGDROP_S_DROP; - } - - return S_OK; -} - -// Name : wxIDropSource::GiveFeedback -// Purpose : give UI feedback according to current state of operation -// Returns : STDMETHODIMP -// Params : [in] DWORD dwEffect - what would happen if we dropped now -// Notes : default implementation is ok in more than 99% of cases -STDMETHODIMP wxIDropSource::GiveFeedback(DWORD dwEffect) -{ - wxDropSource::DragResult effect; - if ( dwEffect & DROPEFFECT_COPY ) - effect = wxDropSource::Copy; - else if ( dwEffect & DROPEFFECT_MOVE ) - effect = wxDropSource::Move; - else - effect = wxDropSource::None; - - if ( m_pDropSource->GiveFeedback(effect, - (dwEffect & DROPEFFECT_SCROLL) != 0 ) ) - return S_OK; - - return DRAGDROP_S_USEDEFAULTCURSORS; -} - -// ---------------------------------------------------------------------------- -// wxDropSource implementation -// ---------------------------------------------------------------------------- - -// ctors - -// common part of all ctors -void wxDropSource::Init() -{ - m_pIDropSource = new wxIDropSource(this); - m_pIDropSource->AddRef(); -} - -wxDropSource::wxDropSource(wxWindow* WXUNUSED(win)) -{ - Init(); - m_pData = NULL; -} - -wxDropSource::wxDropSource(wxDataObject& data, wxWindow* WXUNUSED(win)) -{ - Init(); - SetData(data); -} - -void wxDropSource::SetData(wxDataObject& data) -{ - m_pData = &data; -} - -wxDropSource::~wxDropSource() -{ - m_pIDropSource->Release(); -} - -// Name : DoDragDrop -// Purpose : start drag and drop operation -// Returns : DragResult - the code of performed operation -// Params : [in] bool bAllowMove: if false, only copy is allowed -// Notes : you must call SetData() before if you had used def ctor -wxDropSource::DragResult wxDropSource::DoDragDrop(bool bAllowMove) -{ - wxCHECK_MSG( m_pData != NULL, None, "No data in wxDropSource!" ); - - DWORD dwEffect; - HRESULT hr = ::DoDragDrop(m_pData->GetInterface(), - m_pIDropSource, - bAllowMove ? DROPEFFECT_COPY | DROPEFFECT_MOVE - : DROPEFFECT_COPY, - &dwEffect); - - if ( hr == DRAGDROP_S_CANCEL ) { - return Cancel; - } - else if ( hr == DRAGDROP_S_DROP ) { - if ( dwEffect & DROPEFFECT_COPY ) { - return Copy; - } - else if ( dwEffect & DROPEFFECT_MOVE ) { - // consistency check: normally, we shouldn't get "move" at all - // here if !bAllowMove, but in practice it does happen quite often - if ( bAllowMove ) - return Move; - else - return Copy; - } - else { - // not copy or move - return None; - } - } - else { - if ( FAILED(hr) ) { - wxLogApiError("DoDragDrop", hr); - wxLogError("Drag & drop operation failed."); - } - else { - wxLogDebug("Unexpected success return code %08lx from DoDragDrop.", hr); - } - - return Error; - } -} - -// Name : wxDropSource::GiveFeedback -// Purpose : visually inform the user about d&d operation state -// Returns : bool: true if we do all ourselves or false for default feedback -// Params : [in] DragResult effect - what would happen if we dropped now -// [in] bool bScrolling - true if target is scrolling -// Notes : here we just leave this stuff for default implementation -bool wxDropSource::GiveFeedback(DragResult effect, bool bScrolling) -{ - return FALSE; -} - -#endif //USE_DRAG_AND_DROP \ No newline at end of file diff --git a/src/msw/ole/droptgt.cpp b/src/msw/ole/droptgt.cpp deleted file mode 100644 index 777614b28e..0000000000 --- a/src/msw/ole/droptgt.cpp +++ /dev/null @@ -1,420 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: ole/droptgt.cpp -// Purpose: wxDropTarget implementation -// Author: Vadim Zeitlin -// Modified by: -// Created: -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// Declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- - -#ifdef __GNUG__ -#pragma implementation "droptgt.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#define IN_WX_MAIN_CPP -#include "wx/wxprec.h" - -#if defined(__BORLANDC__) -#pragma hdrstop -#endif - -#include - -#if USE_DRAG_AND_DROP - -#include - -#ifdef __WIN32__ -#ifndef __GNUWIN32__ -#include // for DROPFILES structure -#endif -#else -#include -#endif - -#include - -#ifndef __WIN32__ -#include -#include -#endif - -#include - -// ---------------------------------------------------------------------------- -// IDropTarget interface: forward all interesting things to wxDropTarget -// (the name is unfortunate, but wx_I_DropTarget is not at all the same thing -// as wxDropTarget which is 'public' class, while this one is private) -// ---------------------------------------------------------------------------- - -class wxIDropTarget : public IDropTarget -{ -public: - wxIDropTarget(wxDropTarget *p); - ~wxIDropTarget(); - - // IDropTarget methods - STDMETHODIMP DragEnter(LPDATAOBJECT, DWORD, POINTL, LPDWORD); - STDMETHODIMP DragOver(DWORD, POINTL, LPDWORD); - STDMETHODIMP DragLeave(void); - STDMETHODIMP Drop(LPDATAOBJECT, DWORD, POINTL, LPDWORD); - - // @@ we assume that if QueryGetData() returns S_OK, than we can really - // get data in this format, so we remember here the format for which - // QueryGetData() succeeded - void SetSupportedFormat(wxDataFormat cfFormat) { m_cfFormat = cfFormat; } - - DECLARE_IUNKNOWN_METHODS; - -protected: - IDataObject *m_pIDataObject; // !NULL between DragEnter and DragLeave/Drop - wxDropTarget *m_pTarget; // the real target (we're just a proxy) - - wxDataFormat m_cfFormat; // the format in which to ask for data - -private: - static inline DWORD GetDropEffect(DWORD flags); -}; - -// ============================================================================ -// wxIDropTarget implementation -// ============================================================================ - -// Name : static wxDropTarget::GetDropEffect -// Purpose : determine the drop operation from keyboard/mouse state. -// Returns : DWORD combined from DROPEFFECT_xxx constants -// Params : [in] DWORD flags kbd & mouse flags as passed to -// IDropTarget methods -// Notes : We do "move" normally and "copy" if is pressed, -// which is the standard behaviour (currently there is no -// way to redefine it) -DWORD wxIDropTarget::GetDropEffect(DWORD flags) -{ - return flags & MK_CONTROL ? DROPEFFECT_COPY : DROPEFFECT_MOVE; -} - -wxIDropTarget::wxIDropTarget(wxDropTarget *pTarget) -{ - m_cRef = 0; - m_pTarget = pTarget; - m_cfFormat = (wxDataFormat) 0; - m_pIDataObject = NULL; -} - -wxIDropTarget::~wxIDropTarget() -{ -} - -BEGIN_IID_TABLE(wxIDropTarget) - ADD_IID(Unknown) - ADD_IID(DropTarget) -END_IID_TABLE; - -IMPLEMENT_IUNKNOWN_METHODS(wxIDropTarget) - -// Name : wxIDropTarget::DragEnter -// Purpose : Called when the mouse enters the window (dragging something) -// Returns : S_OK -// Params : [in] IDataObject *pIDataSource : source data -// [in] DWORD grfKeyState : kbd & mouse state -// [in] POINTL pt : mouse coordinates -// [out]DWORD *pdwEffect : effect flag -// Notes : -STDMETHODIMP wxIDropTarget::DragEnter(IDataObject *pIDataSource, - DWORD grfKeyState, - POINTL pt, - DWORD *pdwEffect) -{ - wxLogDebug("IDropTarget::DragEnter"); - - wxASSERT( m_pIDataObject == NULL ); - - if ( !m_pTarget->IsAcceptedData(pIDataSource) ) { - // we don't accept this kind of data - *pdwEffect = DROPEFFECT_NONE; - - return S_OK; - } - - // @@ should check the point also? - - *pdwEffect = GetDropEffect(grfKeyState); - - // get hold of the data object - m_pIDataObject = pIDataSource; - m_pIDataObject->AddRef(); - - // give some visual feedback - m_pTarget->OnEnter(); - - return S_OK; -} - -// Name : wxIDropTarget::DragOver -// Purpose : Indicates that the mouse was moved inside the window represented -// by this drop target. -// Returns : S_OK -// Params : [in] DWORD grfKeyState kbd & mouse state -// [in] POINTL pt mouse coordinates -// [out]LPDWORD pdwEffect effect flag -// Notes : We're called on every WM_MOUSEMOVE, so this function should be -// very efficient. -STDMETHODIMP wxIDropTarget::DragOver(DWORD grfKeyState, - POINTL pt, - LPDWORD pdwEffect) -{ - // there are too many of them... wxLogDebug("IDropTarget::DragOver"); - - *pdwEffect = m_pIDataObject == NULL ? DROPEFFECT_NONE - : GetDropEffect(grfKeyState); - return S_OK; -} - -// Name : wxIDropTarget::DragLeave -// Purpose : Informs the drop target that the operation has left its window. -// Returns : S_OK -// Notes : good place to do any clean-up -STDMETHODIMP wxIDropTarget::DragLeave() -{ - wxLogDebug("IDropTarget::DragLeave"); - - // remove the UI feedback - m_pTarget->OnLeave(); - - // release the held object - RELEASE_AND_NULL(m_pIDataObject); - - return S_OK; -} - -// Name : wxIDropTarget::Drop -// Purpose : Instructs the drop target to paste data that was just now -// dropped on it. -// Returns : S_OK -// Params : [in] IDataObject *pIDataSource the data to paste -// [in] DWORD grfKeyState kbd & mouse state -// [in] POINTL pt where the drop occured? -// [ouy]DWORD *pdwEffect operation effect -// Notes : -STDMETHODIMP wxIDropTarget::Drop(IDataObject *pIDataSource, - DWORD grfKeyState, - POINTL pt, - DWORD *pdwEffect) -{ - wxLogDebug("IDropTarget::Drop"); - - // @@ I don't know why there is this parameter, but so far I assume - // that it's the same we've already got in DragEnter - wxASSERT( m_pIDataObject == pIDataSource ); - - STGMEDIUM stm; - *pdwEffect = DROPEFFECT_NONE; - - // should be set by SetSupportedFormat() call - wxASSERT( m_cfFormat != 0 ); - - FORMATETC fmtMemory; - fmtMemory.cfFormat = m_cfFormat; - fmtMemory.ptd = NULL; - fmtMemory.dwAspect = DVASPECT_CONTENT; - fmtMemory.lindex = -1; - fmtMemory.tymed = TYMED_HGLOBAL; // @@@@ to add other media - - HRESULT hr = pIDataSource->GetData(&fmtMemory, &stm); - if ( SUCCEEDED(hr) ) { - if ( stm.hGlobal != NULL ) { - if ( m_pTarget->OnDrop(pt.x, pt.y, GlobalLock(stm.hGlobal)) ) - *pdwEffect = GetDropEffect(grfKeyState); - //else: DROPEFFECT_NONE - - GlobalUnlock(stm.hGlobal); - ReleaseStgMedium(&stm); - } - } - else - { - // wxLogApiError("GetData", hr); - } - - // release the held object - RELEASE_AND_NULL(m_pIDataObject); - - return S_OK; -} - -// ============================================================================ -// wxDropTarget implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// ctor/dtor -// ---------------------------------------------------------------------------- - -wxDropTarget::wxDropTarget() -{ - // create an IDropTarget implementation which will notify us about - // d&d operations. - m_pIDropTarget = new wxIDropTarget(this); - m_pIDropTarget->AddRef(); -} - -wxDropTarget::~wxDropTarget() -{ - ReleaseInterface(m_pIDropTarget); -} - -// ---------------------------------------------------------------------------- -// [un]register drop handler -// ---------------------------------------------------------------------------- - -bool wxDropTarget::Register(WXHWND hwnd) -{ - HRESULT hr = ::CoLockObjectExternal(m_pIDropTarget, TRUE, FALSE); - if ( FAILED(hr) ) { - wxLogApiError("CoLockObjectExternal", hr); - return FALSE; - } - - hr = ::RegisterDragDrop((HWND) hwnd, m_pIDropTarget); - if ( FAILED(hr) ) { - ::CoLockObjectExternal(m_pIDropTarget, FALSE, FALSE); - - wxLogApiError("RegisterDragDrop", hr); - return FALSE; - } - - return TRUE; -} - -void wxDropTarget::Revoke(WXHWND hwnd) -{ - HRESULT hr = ::RevokeDragDrop((HWND) hwnd); - - if ( FAILED(hr) ) { - wxLogApiError("RevokeDragDrop", hr); - } - - ::CoLockObjectExternal(m_pIDropTarget, FALSE, TRUE); -} - -// ---------------------------------------------------------------------------- -// determine if we accept data of this type -// ---------------------------------------------------------------------------- -bool wxDropTarget::IsAcceptedData(IDataObject *pIDataSource) const -{ - // this strucutre describes a data of any type (first field will be - // changing) being passed through global memory block. - static FORMATETC s_fmtMemory = { - 0, - NULL, - DVASPECT_CONTENT, - -1, - TYMED_HGLOBAL - }; - - // cycle thorugh all supported formats - for ( size_t n = 0; n < GetFormatCount(); n++ ) { - s_fmtMemory.cfFormat = GetFormat(n); - // @ don't use SUCCEEDED macro here: QueryGetData returns 1 (whatever it - // means) for file drag and drop - if ( pIDataSource->QueryGetData(&s_fmtMemory) == S_OK ) { - // remember this format: we'll later ask for data in it - m_pIDropTarget->SetSupportedFormat((wxDataFormat) s_fmtMemory.cfFormat); - return TRUE; - } - } - - return FALSE; -} - -// ============================================================================ -// wxTextDropTarget -// ============================================================================ - -bool wxTextDropTarget::OnDrop(long x, long y, const void *pData) -{ - return OnDropText(x, y, (const char *)pData); -} - -size_t wxTextDropTarget::GetFormatCount() const -{ - return 1; -} - -wxDataFormat wxTextDropTarget::GetFormat(size_t WXUNUSED(n)) const -{ - return wxDF_TEXT; -} - -// ============================================================================ -// wxFileDropTarget -// ============================================================================ - -bool wxFileDropTarget::OnDrop(long x, long y, const void *pData) -{ - // the documentation states that the first member of DROPFILES structure - // is a "DWORD offset of double NUL terminated file list". What they mean by - // this (I wonder if you see it immediately) is that the list starts at - // ((char *)&(pDropFiles.pFiles)) + pDropFiles.pFiles. We're also advised to - // use DragQueryFile to work with this structure, but not told where and how - // to get HDROP. - HDROP hdrop = (HDROP)pData; // @@ it works, but I'm not sure about it - - // get number of files (magic value -1) - UINT nFiles = ::DragQueryFile(hdrop, -1, NULL, 0); - - // for each file get the length, allocate memory and then get the name - char **aszFiles = new char *[nFiles]; - UINT len, n; - for ( n = 0; n < nFiles; n++ ) { - // +1 for terminating NUL - len = ::DragQueryFile(hdrop, n, NULL, 0) + 1; - - aszFiles[n] = new char[len]; - - UINT len2 = ::DragQueryFile(hdrop, n, aszFiles[n], len); - if ( len2 != len - 1 ) { - wxLogDebug("In wxFileDropTarget::OnDrop DragQueryFile returned %d " - "characters, %d expected.", len2, len - 1); - } - } - - bool bResult = OnDropFiles(x, y, nFiles, (const char**) aszFiles); - - // free memory - for ( n = 0; n < nFiles; n++ ) { - delete [] aszFiles[n]; - } - delete [] aszFiles; - - return bResult; -} - -size_t wxFileDropTarget::GetFormatCount() const -{ - return 1; -} - -wxDataFormat wxFileDropTarget::GetFormat(size_t WXUNUSED(n)) const -{ -#ifdef __WIN32__ - return wxDF_FILENAME; -#else - // TODO: how to implement this in WIN16? - return wxDF_TEXT; -#endif -} - -#endif - // USE_DRAG_AND_DROP diff --git a/src/msw/ole/oleutils.cpp b/src/msw/ole/oleutils.cpp deleted file mode 100644 index efec456070..0000000000 --- a/src/msw/ole/oleutils.cpp +++ /dev/null @@ -1,192 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: ole/oleutils.cpp -// Purpose: implementation of OLE helper functions -// Author: Vadim Zeitlin -// Modified by: -// Created: 19.02.98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// Declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- - -#ifdef __GNUG__ -#pragma implementation "oleutils.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#define IN_WX_MAIN_CPP -#include "wx/wxprec.h" - -#if defined(__BORLANDC__) -#pragma hdrstop -#endif - -#include - -#if USE_DRAG_AND_DROP - -#include - -#include - -// OLE -#include -#include - -#if defined(_MSC_VER) && (_MSC_VER > 1000) -#include -#endif - -// ============================================================================ -// Implementation -// ============================================================================ - -// return TRUE if the iid is in the array -bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount) -{ - for ( size_t i = 0; i < nCount; i++ ) { - if ( riid == *aIids[i] ) - return TRUE; - } - - return FALSE; -} - -// ---------------------------------------------------------------------------- -// Debug support -// ---------------------------------------------------------------------------- - -#if defined(__WXDEBUG__) && defined(_MSC_VER) && (_MSC_VER > 1000) -const char *GetIidName(REFIID riid) -{ - // an association between symbolic name and numeric value of an IID - struct KNOWN_IID { - const IID *pIid; - const char *szName; - }; - - // construct the table containing all known interfaces - #define ADD_KNOWN_IID(name) { &IID_I##name, #name } - - static const KNOWN_IID aKnownIids[] = { - ADD_KNOWN_IID(AdviseSink), - ADD_KNOWN_IID(AdviseSink2), - ADD_KNOWN_IID(BindCtx), - ADD_KNOWN_IID(ClassFactory), - ADD_KNOWN_IID(ContinueCallback), - ADD_KNOWN_IID(EnumOleDocumentViews), - ADD_KNOWN_IID(OleCommandTarget), - ADD_KNOWN_IID(OleDocument), - ADD_KNOWN_IID(OleDocumentSite), - ADD_KNOWN_IID(OleDocumentView), - ADD_KNOWN_IID(Print), - ADD_KNOWN_IID(DataAdviseHolder), - ADD_KNOWN_IID(DataObject), - ADD_KNOWN_IID(Debug), - ADD_KNOWN_IID(DebugStream), - ADD_KNOWN_IID(DfReserved1), - ADD_KNOWN_IID(DfReserved2), - ADD_KNOWN_IID(DfReserved3), - ADD_KNOWN_IID(Dispatch), - ADD_KNOWN_IID(DropSource), - ADD_KNOWN_IID(DropTarget), - ADD_KNOWN_IID(EnumCallback), - ADD_KNOWN_IID(EnumFORMATETC), - ADD_KNOWN_IID(EnumGeneric), - ADD_KNOWN_IID(EnumHolder), - ADD_KNOWN_IID(EnumMoniker), - ADD_KNOWN_IID(EnumOLEVERB), - ADD_KNOWN_IID(EnumSTATDATA), - ADD_KNOWN_IID(EnumSTATSTG), - ADD_KNOWN_IID(EnumString), - ADD_KNOWN_IID(EnumUnknown), - ADD_KNOWN_IID(EnumVARIANT), - ADD_KNOWN_IID(ExternalConnection), - ADD_KNOWN_IID(InternalMoniker), - ADD_KNOWN_IID(LockBytes), - ADD_KNOWN_IID(Malloc), - ADD_KNOWN_IID(Marshal), - ADD_KNOWN_IID(MessageFilter), - ADD_KNOWN_IID(Moniker), - ADD_KNOWN_IID(OleAdviseHolder), - ADD_KNOWN_IID(OleCache), - ADD_KNOWN_IID(OleCache2), - ADD_KNOWN_IID(OleCacheControl), - ADD_KNOWN_IID(OleClientSite), - ADD_KNOWN_IID(OleContainer), - ADD_KNOWN_IID(OleInPlaceActiveObject), - ADD_KNOWN_IID(OleInPlaceFrame), - ADD_KNOWN_IID(OleInPlaceObject), - ADD_KNOWN_IID(OleInPlaceSite), - ADD_KNOWN_IID(OleInPlaceUIWindow), - ADD_KNOWN_IID(OleItemContainer), - ADD_KNOWN_IID(OleLink), - ADD_KNOWN_IID(OleManager), - ADD_KNOWN_IID(OleObject), - ADD_KNOWN_IID(OlePresObj), - ADD_KNOWN_IID(OleWindow), - ADD_KNOWN_IID(PSFactory), - ADD_KNOWN_IID(ParseDisplayName), - ADD_KNOWN_IID(Persist), - ADD_KNOWN_IID(PersistFile), - ADD_KNOWN_IID(PersistStorage), - ADD_KNOWN_IID(PersistStream), - ADD_KNOWN_IID(ProxyManager), - ADD_KNOWN_IID(RootStorage), - ADD_KNOWN_IID(RpcChannel), - ADD_KNOWN_IID(RpcProxy), - ADD_KNOWN_IID(RpcStub), - ADD_KNOWN_IID(RunnableObject), - ADD_KNOWN_IID(RunningObjectTable), - ADD_KNOWN_IID(StdMarshalInfo), - ADD_KNOWN_IID(Storage), - ADD_KNOWN_IID(Stream), - ADD_KNOWN_IID(StubManager), - ADD_KNOWN_IID(Unknown), - ADD_KNOWN_IID(ViewObject), - ADD_KNOWN_IID(ViewObject2), - }; - - // don't clobber preprocessor name space - #undef ADD_KNOWN_IID - - // try to find the interface in the table - for ( size_t ui = 0; ui < WXSIZEOF(aKnownIids); ui++ ) { - if ( riid == *aKnownIids[ui].pIid ) { - return aKnownIids[ui].szName; - } - } - - // unknown IID, just transform to string - static Uuid s_uuid; - s_uuid.Set(riid); - return s_uuid; -} - -void wxLogQueryInterface(const char *szInterface, REFIID riid) -{ - wxLogTrace("%s::QueryInterface (iid = %s)", szInterface, GetIidName(riid)); -} - -void wxLogAddRef(const char *szInterface, ULONG cRef) -{ - wxLogTrace("After %s::AddRef: m_cRef = %d", szInterface, cRef + 1); -} - -void wxLogRelease(const char *szInterface, ULONG cRef) -{ - wxLogTrace("After %s::Release: m_cRef = %d", szInterface, cRef - 1); -} - -#endif //WXDEBUG - -#endif - // USE_DRAG_AND_DROP diff --git a/src/msw/ole/uuid.cpp b/src/msw/ole/uuid.cpp deleted file mode 100644 index 31e73a27fd..0000000000 --- a/src/msw/ole/uuid.cpp +++ /dev/null @@ -1,153 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: ole/uuid.cpp -// Purpose: implements Uuid class, see uuid.h for details -// Author: Vadim Zeitlin -// Modified by: -// Created: 12.09.96 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// Declarations -// ============================================================================ - -#ifdef __GNUG__ -#pragma implementation "uuid.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#define IN_WX_MAIN_CPP -#include "wx/wxprec.h" - -#if defined(__BORLANDC__) -#pragma hdrstop -#endif - -#include - -#if USE_DRAG_AND_DROP - -// standard headers -#include // UUID related functions - -#include - - - -// ============================================================================ -// Implementation -// ============================================================================ - -// length of UUID in C format -#define UUID_CSTRLEN 100 // real length is 66 - -// copy ctor -Uuid::Uuid(const Uuid& uuid) -{ - // bitwise copy Ok for UUIDs - m_uuid = uuid.m_uuid; - - // force the string to be allocated by RPC - // (we free it later with RpcStringFree) - UuidToString(&m_uuid, &m_pszUuid); - - // allocate new buffer - m_pszCForm = new char[UUID_CSTRLEN]; - // and fill it - memcpy(m_pszCForm, uuid.m_pszCForm, UUID_CSTRLEN); -} - -// assignment operator -Uuid& Uuid::operator=(const Uuid& uuid) -{ - m_uuid = uuid.m_uuid; - - // force the string to be allocated by RPC - // (we free it later with RpcStringFree) - UuidToString(&m_uuid, &m_pszUuid); - - // allocate new buffer if not done yet - if ( !m_pszCForm ) - m_pszCForm = new char[UUID_CSTRLEN]; - - // and fill it - memcpy(m_pszCForm, uuid.m_pszCForm, UUID_CSTRLEN); - - return *this; -} - -// dtor -Uuid::~Uuid() -{ - // this string must be allocated by RPC! - // (otherwise you get a debug breakpoint deep inside RPC DLL) - if ( m_pszUuid ) - RpcStringFree(&m_pszUuid); - - // perhaps we should just use a static buffer and not bother - // with new and delete? - if ( m_pszCForm ) - delete [] m_pszCForm; -} - -// update string representation of new UUID -void Uuid::Set(const UUID &uuid) -{ - m_uuid = uuid; - - // get string representation - UuidToString(&m_uuid, &m_pszUuid); - - // cache UUID in C format - UuidToCForm(); -} - -// create a new UUID -void Uuid::Create() -{ - UUID uuid; - - // can't fail - UuidCreate(&uuid); - - Set(uuid); -} - -// set the value -bool Uuid::Set(const char *pc) -{ - // get UUID from string - if ( UuidFromString((uchar *)pc, &m_uuid) != RPC_S_OK) - // failed: probably invalid string - return FALSE; - - // transform it back to string to normalize it - UuidToString(&m_uuid, &m_pszUuid); - - // update m_pszCForm - UuidToCForm(); - - return TRUE; -} - -// stores m_uuid in m_pszCForm in a format required by -// DEFINE_GUID macro: i.e. something like -// 0x7D8A2281L,0x4C61,0x11D0,0xBA,0xBD,0x00,0x00,0xC0,0x18,0xBA,0x27 -// m_pszUuid is of the form (no, it's not quite the same UUID :-) -// 6aadc650-67b0-11d0-bac8-0000c018ba27 -void Uuid::UuidToCForm() -{ - if ( m_pszCForm == NULL ) - m_pszCForm = new char[UUID_CSTRLEN]; - - wsprintf(m_pszCForm, "0x%8.8X,0x%4.4X,0x%4.4X,0x%2.2X,0x2.2%X," - "0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X", - m_uuid.Data1, m_uuid.Data2, m_uuid.Data3, - m_uuid.Data4[1], m_uuid.Data4[2], m_uuid.Data4[3], m_uuid.Data4[4], - m_uuid.Data4[5], m_uuid.Data4[6], m_uuid.Data4[7], m_uuid.Data4[8]); -} - -#endif - // USE_DRAG_AND_DROP diff --git a/src/msw/ownerdrw.cpp b/src/msw/ownerdrw.cpp deleted file mode 100644 index a1dd82145f..0000000000 --- a/src/msw/ownerdrw.cpp +++ /dev/null @@ -1,230 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: msw/ownerdrw.cpp -// Purpose: implementation of wxOwnerDrawn class -// Author: Vadim Zeitlin -// Modified by: -// Created: 13.11.97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// headers & declarations -// ============================================================================ - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif - -#ifndef WX_PRECOMP - #include "wx/menu.h" -#endif - -#include "wx/ownerdrw.h" -#include "wx/menuitem.h" - -#include - -// ============================================================================ -// implementation of wxOwnerDrawn class -// ============================================================================ - -// ctor -// ---- -wxOwnerDrawn::wxOwnerDrawn(const wxString& str, - bool bCheckable, bool bMenuItem) - : m_strName(str) -{ - m_bCheckable = bCheckable; - m_bOwnerDrawn = FALSE; - m_nHeight = 0; - m_nMarginWidth = ms_nLastMarginWidth; -} - -#if defined(__WXMSW__) && defined(__WIN32__) - size_t wxOwnerDrawn::ms_nDefaultMarginWidth = GetSystemMetrics(SM_CXMENUCHECK); -#else // # what is the reasonable default? - size_t wxOwnerDrawn::ms_nDefaultMarginWidth = 15; -#endif - -size_t wxOwnerDrawn::ms_nLastMarginWidth = ms_nDefaultMarginWidth; - -// drawing -// ------- - -// get size of the item -bool wxOwnerDrawn::OnMeasureItem(size_t *pwidth, size_t *pheight) -{ - wxMemoryDC dc; - dc.SetFont(GetFont()); - - // ## ugly... - char *szStripped = new char[m_strName.Len()]; - wxStripMenuCodes((char *)m_strName.c_str(), szStripped); - wxString str = szStripped; - delete [] szStripped; - - // # without this menu items look too tightly packed (at least under Windows) - str += 'W'; // 'W' is typically the widest letter - - dc.GetTextExtent(str, (long *)pwidth, (long *)pheight); - m_nHeight = *pheight; // remember height for use in OnDrawItem - - return TRUE; -} - -// searching for this macro you'll find all the code where I'm using the native -// Win32 GDI functions and not wxWindows ones. Might help to whoever decides to -// port this code to X. (VZ) - -#ifdef __WIN32__ -#define O_DRAW_NATIVE_API // comments below explain why I use it -#endif - -// draw the item -bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODStatus st) -{ - // we do nothing on focus change - if ( act == wxODFocusChanged ) - return TRUE; - - // wxColor <-> RGB - #define ToRGB(col) RGB(col.Red(), col.Green(), col.Blue()) - #define UnRGB(col) GetRValue(col), GetGValue(col), GetBValue(col) - - // set the colors - // -------------- - DWORD colBack, colText; - if ( st & wxODSelected ) { - colBack = GetSysColor(COLOR_HIGHLIGHT); - colText = GetSysColor(COLOR_HIGHLIGHTTEXT); - } - else { - // fall back to default colors if none explicitly specified - colBack = m_colBack.Ok() ? ToRGB(m_colBack) : GetSysColor(COLOR_WINDOW); - colText = m_colText.Ok() ? ToRGB(m_colText) : GetSysColor(COLOR_WINDOWTEXT); - } - - #ifdef O_DRAW_NATIVE_API - #define hdc (HDC)dc.GetHDC() - COLORREF colOldText = ::SetTextColor(hdc, colText), - colOldBack = ::SetBkColor(hdc, colBack); - #else - dc.SetTextForeground(wxColor(UnRGB(colText))); - dc.SetTextBackground(wxColor(UnRGB(colBack))); - #endif - - // select the font and draw the text - // --------------------------------- - - // determine where to draw and leave space for a check-mark. - int x = rc.x + GetMarginWidth(); - - // using native API because it reckognizes '&' - #ifdef O_DRAW_NATIVE_API - int nPrevMode = SetBkMode(hdc, TRANSPARENT); - HBRUSH hbr = CreateSolidBrush(colBack), - hPrevBrush = (HBRUSH) SelectObject(hdc, hbr); - - RECT rectAll = { rc.GetLeft(), rc.GetTop(), rc.GetRight(), rc.GetBottom() }; - FillRect(hdc, &rectAll, hbr); - - // use default font if no font set - HFONT hfont; - if ( m_font.Ok() ) { - m_font.RealizeResource(); - hfont = (HFONT)m_font.GetResourceHandle(); - } - else { - hfont = (HFONT)::GetStockObject(SYSTEM_FONT); - } - - HFONT hPrevFont = (HFONT) ::SelectObject(hdc, hfont); - DrawState(hdc, NULL, NULL, - (LPARAM)(const char *)m_strName, m_strName.Length(), - x, rc.y, rc.GetWidth(), rc.GetHeight(), - DST_PREFIXTEXT | ( st & wxODDisabled ? DSS_DISABLED : 0) ); - - (void)SelectObject(hdc, hPrevBrush); - (void)SelectObject(hdc, hPrevFont); - (void)SetBkMode(hdc, nPrevMode); - #else - dc.SetFont(GetFont()); - dc.DrawText(m_strName, x, rc.y); - #endif //O_DRAW_NATIVE_API - - // draw the bitmap - // --------------- - if ( IsCheckable() && !m_bmpChecked.Ok() ) { - if ( st & wxODChecked ) { - // using native APIs for performance and simplicity -#ifdef O_DRAW_NATIVE_API - // what goes on: DrawFrameControl creates a b/w mask, - // then we copy it to screen to have right colors - - // first create a monochrome bitmap in a memory DC - HDC hdcMem = CreateCompatibleDC(hdc); - HBITMAP hbmpCheck = CreateBitmap(GetMarginWidth(), m_nHeight, 1, 1, 0); - SelectObject(hdcMem, hbmpCheck); - - // then draw a check mark into it - RECT rect = { 0, 0, GetMarginWidth(), m_nHeight }; - DrawFrameControl(hdcMem, &rect, DFC_MENU, DFCS_MENUCHECK); - - // finally copy it to screen DC and clean up - BitBlt(hdc, rc.x, rc.y, GetMarginWidth(), m_nHeight, - hdcMem, 0, 0, SRCCOPY); - DeleteDC(hdcMem); -#else - // #### to do: perhaps using Marlett font (create equiv. font under X) -// wxFAIL("not implemented"); -#endif //O_DRAW_NATIVE_API - } - } - else { - // for uncheckable item we use only the 'checked' bitmap - wxBitmap bmp(GetBitmap(IsCheckable() ? ((st & wxODChecked) != 0) : TRUE)); - if ( bmp.Ok() ) { - wxMemoryDC dcMem(&dc); - dcMem.SelectObject(bmp); - - // center bitmap - int nBmpWidth = bmp.GetWidth(), - nBmpHeight = bmp.GetHeight(); - - // there should be enough place! - wxASSERT((nBmpWidth <= rc.GetWidth()) && (nBmpHeight <= rc.GetHeight())); - - dc.Blit(rc.x + (GetMarginWidth() - nBmpWidth) / 2, - rc.y + (m_nHeight - nBmpHeight) /2, - nBmpWidth, nBmpHeight, - &dcMem, 0, 0, wxCOPY); - - if ( st & wxODSelected ) { - #ifdef O_DRAW_NATIVE_API - RECT rectBmp = { rc.GetLeft(), rc.GetTop(), - rc.GetLeft() + GetMarginWidth(), - rc.GetTop() + m_nHeight }; - SetBkColor(hdc, colBack); - DrawEdge(hdc, &rectBmp, EDGE_RAISED, BF_SOFT | BF_RECT); - #else - // ## to write portable DrawEdge - #endif //O_DRAW_NATIVE_API - } - } - } - - #ifdef O_DRAW_NATIVE_API - ::SetTextColor(hdc, colOldText); - ::SetBkColor(hdc, colOldBack); - - #undef hdc - #endif //O_DRAW_NATIVE_API - - return TRUE; -} - diff --git a/src/msw/palette.cpp b/src/msw/palette.cpp deleted file mode 100644 index 5da71182f1..0000000000 --- a/src/msw/palette.cpp +++ /dev/null @@ -1,137 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: palette.cpp -// Purpose: wxPalette -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "palette.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/setup.h" -#include "wx/palette.h" -#endif - -#include - -#include "assert.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject) -#endif - -/* - * Palette - * - */ - -wxPaletteRefData::wxPaletteRefData(void) -{ - m_hPalette = 0; -} - -wxPaletteRefData::~wxPaletteRefData(void) -{ - if ( m_hPalette ) - ::DeleteObject((HPALETTE) m_hPalette); -} - -wxPalette::wxPalette(void) -{ -} - -wxPalette::wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue) -{ - Create(n, red, green, blue); -} - -wxPalette::~wxPalette(void) -{ -// FreeResource(TRUE); -} - -bool wxPalette::FreeResource(bool force) -{ - if ( M_PALETTEDATA && M_PALETTEDATA->m_hPalette) - { - DeleteObject((HPALETTE)M_PALETTEDATA->m_hPalette); - } - return TRUE; -} - -bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue) -{ - UnRef(); - - m_refData = new wxPaletteRefData; - - NPLOGPALETTE npPal = (NPLOGPALETTE)LocalAlloc(LMEM_FIXED, sizeof(LOGPALETTE) + - (WORD)n * sizeof(PALETTEENTRY)); - if (!npPal) - return(FALSE); - - npPal->palVersion = 0x300; - npPal->palNumEntries = n; - - int i; - for (i = 0; i < n; i ++) - { - npPal->palPalEntry[i].peRed = red[i]; - npPal->palPalEntry[i].peGreen = green[i]; - npPal->palPalEntry[i].peBlue = blue[i]; - npPal->palPalEntry[i].peFlags = 0; - } - M_PALETTEDATA->m_hPalette = (WXHPALETTE) CreatePalette((LPLOGPALETTE)npPal); - LocalFree((HANDLE)npPal); - return TRUE; -} - -int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const -{ - if ( !m_refData ) - return FALSE; - - return ::GetNearestPaletteIndex((HPALETTE) M_PALETTEDATA->m_hPalette, PALETTERGB(red, green, blue)); -} - -bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsigned char *blue) const -{ - if ( !m_refData ) - return FALSE; - - if (index < 0 || index > 255) - return FALSE; - - PALETTEENTRY entry; - if (::GetPaletteEntries((HPALETTE) M_PALETTEDATA->m_hPalette, index, 1, &entry)) - { - *red = entry.peRed; - *green = entry.peGreen; - *blue = entry.peBlue; - return TRUE; - } else - return FALSE; -} - -void wxPalette::SetHPALETTE(WXHPALETTE pal) -{ - if ( !m_refData ) - m_refData = new wxPaletteRefData; - - M_PALETTEDATA->m_hPalette = pal; -} - diff --git a/src/msw/pen.cpp b/src/msw/pen.cpp deleted file mode 100644 index ea9b92d667..0000000000 --- a/src/msw/pen.cpp +++ /dev/null @@ -1,448 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: pen.cpp -// Purpose: wxPen -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "pen.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/setup.h" -#include "wx/list.h" -#include "wx/utils.h" -#include "wx/app.h" -#include "wx/pen.h" -#endif - -#include "wx/msw/private.h" -#include "assert.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject) -#endif - -wxPenRefData::wxPenRefData(void) -{ - m_style = wxSOLID; - m_width = 1; - m_join = wxJOIN_ROUND ; - m_cap = wxCAP_ROUND ; - m_nbDash = 0 ; - m_dash = 0 ; - m_hPen = 0; -} - -wxPenRefData::wxPenRefData(const wxPenRefData& data) -{ - m_style = data.m_style; - m_width = data.m_width; - m_join = data.m_join; - m_cap = data.m_cap; - m_nbDash = data.m_nbDash; - m_dash = data.m_dash; - m_colour = data.m_colour; - m_hPen = 0; -} - -wxPenRefData::~wxPenRefData(void) -{ - if ( m_hPen ) - ::DeleteObject((HPEN) m_hPen); -} - -// Pens - -wxPen::wxPen(void) -{ - if ( wxThePenList ) - wxThePenList->AddPen(this); -} - -wxPen::~wxPen() -{ - if (wxThePenList) - wxThePenList->RemovePen(this); -} - -// Should implement Create -wxPen::wxPen(const wxColour& col, int Width, int Style) -{ - m_refData = new wxPenRefData; - - M_PENDATA->m_colour = col; -// M_PENDATA->m_stipple = NULL; - M_PENDATA->m_width = Width; - M_PENDATA->m_style = Style; - M_PENDATA->m_join = wxJOIN_ROUND ; - M_PENDATA->m_cap = wxCAP_ROUND ; - M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; - M_PENDATA->m_hPen = 0 ; - -#ifndef __WIN32__ - // In Windows, only a pen of width = 1 can be dotted or dashed! - if ((Style == wxDOT) || (Style == wxLONG_DASH) || - (Style == wxSHORT_DASH) || (Style == wxDOT_DASH) || - (Style == wxUSER_DASH)) - M_PENDATA->m_width = 1; -#else -/*** - DWORD vers = GetVersion() ; - WORD high = HIWORD(vers) ; // high bit=0 for NT, 1 for Win32s - // Win32s doesn't support wide dashed pens - - if ((high&0x8000)!=0) -***/ - if (wxGetOsVersion()==wxWIN32S) - { - // In Windows, only a pen of width = 1 can be dotted or dashed! - if ((Style == wxDOT) || (Style == wxLONG_DASH) || - (Style == wxSHORT_DASH) || (Style == wxDOT_DASH) || - (Style == wxUSER_DASH)) - M_PENDATA->m_width = 1; - } -#endif - RealizeResource(); - - if ( wxThePenList ) - wxThePenList->AddPen(this); -} - -wxPen::wxPen(const wxBitmap& stipple, int Width) -{ - m_refData = new wxPenRefData; - -// M_PENDATA->m_colour = col; - M_PENDATA->m_stipple = stipple; - M_PENDATA->m_width = Width; - M_PENDATA->m_style = wxSTIPPLE; - M_PENDATA->m_join = wxJOIN_ROUND ; - M_PENDATA->m_cap = wxCAP_ROUND ; - M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; - M_PENDATA->m_hPen = 0 ; - - RealizeResource(); - - if ( wxThePenList ) - wxThePenList->AddPen(this); -} - -wxPen::wxPen(const wxString& col, int Width, int Style) -{ - m_refData = new wxPenRefData; - - M_PENDATA->m_colour = col; -// M_PENDATA->m_stipple = NULL ; - M_PENDATA->m_width = Width; - M_PENDATA->m_style = Style; - M_PENDATA->m_join = wxJOIN_ROUND ; - M_PENDATA->m_cap = wxCAP_ROUND ; - M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; - M_PENDATA->m_hPen = 0 ; - - RealizeResource(); - - if ( wxThePenList ) - wxThePenList->AddPen(this); -} - -bool wxPen::RealizeResource(void) -{ - if (M_PENDATA && (M_PENDATA->m_hPen == 0)) - { - if (M_PENDATA->m_style==wxTRANSPARENT) - { - M_PENDATA->m_hPen = (WXHPEN) ::GetStockObject(NULL_PEN); - return TRUE; - } - - COLORREF ms_colour = 0 ; - ms_colour = M_PENDATA->m_colour.GetPixel() ; - - // Join style, Cap style, Pen Stippling only on Win32. - // Currently no time to find equivalent on Win3.1, sorry - // [if such equiv exist!!] -#ifdef __WIN32__ - if (M_PENDATA->m_join==wxJOIN_ROUND && - M_PENDATA->m_cap==wxCAP_ROUND && - M_PENDATA->m_style!=wxUSER_DASH && - M_PENDATA->m_style!=wxSTIPPLE && - M_PENDATA->m_width <= 1 - ) - M_PENDATA->m_hPen = (WXHPEN) CreatePen(wx2msPenStyle(M_PENDATA->m_style), M_PENDATA->m_width, ms_colour); - else - { - DWORD ms_style = PS_GEOMETRIC|wx2msPenStyle(M_PENDATA->m_style) ; - - LOGBRUSH logb ; - - switch(M_PENDATA->m_join) - { - case wxJOIN_BEVEL: ms_style |= PS_JOIN_BEVEL ; break ; - case wxJOIN_MITER: ms_style |= PS_JOIN_MITER ; break ; - default: - case wxJOIN_ROUND: ms_style |= PS_JOIN_ROUND ; break ; - } - - switch(M_PENDATA->m_cap) - { - case wxCAP_PROJECTING: ms_style |= PS_ENDCAP_SQUARE ; break ; - case wxCAP_BUTT: ms_style |= PS_ENDCAP_FLAT ; break ; - default: - case wxCAP_ROUND: ms_style |= PS_ENDCAP_ROUND ; break ; - } - - switch(M_PENDATA->m_style) - { - case wxSTIPPLE: - logb.lbStyle = BS_PATTERN ; - if (M_PENDATA->m_stipple.Ok()) - logb.lbHatch = (LONG)M_PENDATA->m_stipple.GetHBITMAP() ; - else - logb.lbHatch = (LONG)0 ; - break ; - case wxBDIAGONAL_HATCH: - logb.lbStyle = BS_HATCHED ; - logb.lbHatch = HS_BDIAGONAL ; - break ; - case wxCROSSDIAG_HATCH: - logb.lbStyle = BS_HATCHED ; - logb.lbHatch = HS_DIAGCROSS ; - break ; - case wxFDIAGONAL_HATCH: - logb.lbStyle = BS_HATCHED ; - logb.lbHatch = HS_FDIAGONAL ; - break ; - case wxCROSS_HATCH: - logb.lbStyle = BS_HATCHED ; - logb.lbHatch = HS_CROSS ; - break ; - case wxHORIZONTAL_HATCH: - logb.lbStyle = BS_HATCHED ; - logb.lbHatch = HS_HORIZONTAL ; - break ; - case wxVERTICAL_HATCH: - logb.lbStyle = BS_HATCHED ; - logb.lbHatch = HS_VERTICAL ; - break ; - default: - logb.lbStyle = BS_SOLID ; - break ; - } - logb.lbColor = ms_colour ; - wxDash *real_dash ; - if (M_PENDATA->m_style==wxUSER_DASH && M_PENDATA->m_nbDash && M_PENDATA->m_dash) - { - real_dash = new wxDash[M_PENDATA->m_nbDash] ; - int i; - for (i=0;im_nbDash;i++) - real_dash[i] = M_PENDATA->m_dash[i] * M_PENDATA->m_width ; - } - else - real_dash = 0 ; - - // Win32s doesn't have ExtCreatePen function... - if (wxGetOsVersion()==wxWINDOWS_NT || wxGetOsVersion()==wxWIN95) - M_PENDATA->m_hPen = (WXHPEN) ExtCreatePen(ms_style,M_PENDATA->m_width,&logb, - M_PENDATA->m_style==wxUSER_DASH ? M_PENDATA->m_nbDash:0, (const DWORD *)real_dash); - else - M_PENDATA->m_hPen = (WXHPEN) CreatePen(wx2msPenStyle(M_PENDATA->m_style), M_PENDATA->m_width, ms_colour); - - if (real_dash) - delete [] real_dash ; - } -#else - M_PENDATA->m_hPen = (WXHPEN) CreatePen(wx2msPenStyle(M_PENDATA->m_style), M_PENDATA->m_width, ms_colour); -#endif -#ifdef WXDEBUG_CREATE - if (M_PENDATA->m_hPen==0) - wxError("Cannot create pen","Internal error") ; -#endif - return TRUE; - } - return FALSE; -} - -WXHANDLE wxPen::GetResourceHandle(void) -{ - if ( !M_PENDATA ) - return 0; - else - return (WXHANDLE)M_PENDATA->m_hPen; -} - -bool wxPen::FreeResource(bool force) -{ - if (M_PENDATA && (M_PENDATA->m_hPen != 0)) - { - DeleteObject((HPEN) M_PENDATA->m_hPen); - M_PENDATA->m_hPen = 0; - return TRUE; - } - else return FALSE; -} - -bool wxPen::IsFree(void) -{ - return (M_PENDATA && M_PENDATA->m_hPen == 0); -} - -void wxPen::Unshare() -{ - // Don't change shared data - if (!m_refData) - { - m_refData = new wxPenRefData(); - } - else - { - wxPenRefData* ref = new wxPenRefData(*(wxPenRefData*)m_refData); - UnRef(); - m_refData = ref; - } -} - -void wxPen::SetColour(const wxColour& col) -{ - Unshare(); - - M_PENDATA->m_colour = col; - - RealizeResource(); -} - -void wxPen::SetColour(const wxString& col) -{ - Unshare(); - - M_PENDATA->m_colour = col; - - RealizeResource(); -} - -void wxPen::SetColour(const unsigned char r, const unsigned char g, const unsigned char b) -{ - Unshare(); - - M_PENDATA->m_colour.Set(r, g, b); - - RealizeResource(); -} - -void wxPen::SetWidth(int Width) -{ - Unshare(); - - M_PENDATA->m_width = Width; - - RealizeResource(); -} - -void wxPen::SetStyle(int Style) -{ - Unshare(); - - M_PENDATA->m_style = Style; - - RealizeResource(); -} - -void wxPen::SetStipple(const wxBitmap& Stipple) -{ - Unshare(); - - M_PENDATA->m_stipple = Stipple; - M_PENDATA->m_style = wxSTIPPLE; - - RealizeResource(); -} - -void wxPen::SetDashes(int nb_dashes, const wxDash *Dash) -{ - Unshare(); - - M_PENDATA->m_nbDash = nb_dashes; - M_PENDATA->m_dash = (wxDash *)Dash; - - RealizeResource(); -} - -void wxPen::SetJoin(int Join) -{ - Unshare(); - - M_PENDATA->m_join = Join; - - RealizeResource(); -} - -void wxPen::SetCap(int Cap) -{ - Unshare(); - - M_PENDATA->m_cap = Cap; - - RealizeResource(); -} - -int wx2msPenStyle(int wx_style) -{ - int cstyle; -/*** -#ifdef __WIN32__ - DWORD vers = GetVersion() ; - WORD high = HIWORD(vers) ; // high bit=0 for NT, 1 for Win32s -#endif -***/ - switch (wx_style) - { - case wxDOT: - cstyle = PS_DOT; - break; - case wxSHORT_DASH: - case wxLONG_DASH: - cstyle = PS_DASH; - break; - case wxTRANSPARENT: - cstyle = PS_NULL; - break; - case wxUSER_DASH: - // User dash style not supported on Win3.1, sorry... -#ifdef __WIN32__ - // Win32s doesn't have PS_USERSTYLE -/*** - if ((high&0x8000)==0) -***/ - if (wxGetOsVersion()==wxWINDOWS_NT) - cstyle = PS_USERSTYLE ; - else - cstyle = PS_DOT ; // We must make a choice... This is mine! -#else - cstyle = PS_DASH ; -#endif - break ; - case wxSOLID: - default: - cstyle = PS_SOLID; - break; - } - return cstyle; -} - diff --git a/src/msw/penwin.cpp b/src/msw/penwin.cpp deleted file mode 100644 index db4e427e9f..0000000000 --- a/src/msw/penwin.cpp +++ /dev/null @@ -1,120 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: penwin.cpp -// Purpose: PenWindows code -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#endif - -// For compilers that support precompilation, includes "wx.h". -#define IN_WX_MAIN_CPP -#include "wx/wxprec.h" - -#if defined(__BORLANDC__) -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/setup.h" -#endif - -#include "wx/msw/private.h" - -#if USE_PENWINDOWS - -#ifdef __BORLANDC__ -#define RPA_DEFAULT 1 -#else -#include -#endif - -HANDLE g_hPenWin = (HANDLE)NULL; -typedef void (CALLBACK * PENREGPROC)(WORD,BOOL); - -// The routine below allows Windows applications (binaries) to -// support Pen input when running under Microsoft Windows for -// Pen Computing 1.0 without need of the PenPalete. -// -// Should masked edit functions be added to wxWindows we would -// be a new class of functions to support BEDIT controls. -// -// (The function is a NOOP for native Windows-NT) -#ifndef __WIN32__ -static void (CALLBACK * RegPenApp) (WORD, BOOL) = NULL; -#endif - -// Where is this called?? -void wxEnablePenAppHooks (bool hook) -{ -#ifndef __WIN32__ - if (hook) - { - if (g_hPenWin) - return; - - /////////////////////////////////////////////////////////////////////// - // If running on a Pen Windows system, register this app so all - // EDIT controls in dialogs are replaced by HEDIT controls. - if ((g_hPenWin = (HANDLE)GetSystemMetrics (SM_PENWINDOWS)) != (HANDLE) NULL) - { - // We do this fancy GetProcAddress simply because we don't - // know if we're running Pen Windows. - if ((RegPenApp = (PENREGPROC)GetProcAddress (g_hPenWin, "RegisterPenApp")) != NULL) - (*RegPenApp) (RPA_DEFAULT, TRUE); - } - } - else - { - /////////////////////////////////////////////////////////////////////// - // If running on a Pen Windows system, unregister - if (g_hPenWin) - { - // Unregister this app - if (RegPenApp != NULL) - (*RegPenApp) (RPA_DEFAULT, FALSE); - g_hPenWin = (HANDLE) NULL; - } - } -#endif /* ! Windows-NT */ -} - -#endif - // End USE_PENWINDOWS - -void wxRegisterPenWin(void) -{ -#if USE_PENWINDOWS -/////////////////////////////////////////////////////////////////////// -// If running on a Pen Windows system, register this app so all -// EDIT controls in dialogs are replaced by HEDIT controls. -// (Notice the CONTROL statement in the RC file is "EDIT", -// RegisterPenApp will automatically change that control to -// an HEDIT. - if ((g_hPenWin = (HANDLE)GetSystemMetrics(SM_PENWINDOWS)) != (HANDLE)NULL) { - // We do this fancy GetProcAddress simply because we don't - // know if we're running Pen Windows. - if ( (RegPenApp = (void (CALLBACK *)(WORD, BOOL))GetProcAddress(g_hPenWin, "RegisterPenApp"))!= NULL) - (*RegPenApp)(RPA_DEFAULT, TRUE); - } -/////////////////////////////////////////////////////////////////////// -#endif -} - -void wxCleanUpPenWin(void) -{ -#if USE_PENWINDOWS - if (g_hPenWin) { - // Unregister this app - if (RegPenApp != NULL) - (*RegPenApp)(RPA_DEFAULT, FALSE); - } -#endif -} - diff --git a/src/msw/pnghand.cpp b/src/msw/pnghand.cpp deleted file mode 100644 index 2fb019783b..0000000000 --- a/src/msw/pnghand.cpp +++ /dev/null @@ -1,769 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: pnghand.cpp -// Purpose: Implements a PNG reader class + handler -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "pngread.h" -#pragma implementation "pnghand.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include -#include -#include -#include -#include -#include -#include - -extern "C" { -#include "png.h" -} - -extern "C" void png_read_init PNGARG((png_structp png_ptr)); -extern "C" void png_write_init PNGARG((png_structp png_ptr)); - -#ifndef GlobalAllocPtr -#define GlobalPtrHandle(lp) \ - ((HGLOBAL)GlobalHandle(lp)) - -#define GlobalLockPtr(lp) \ - ((BOOL)GlobalLock(GlobalPtrHandle(lp))) -#define GlobalUnlockPtr(lp) \ - GlobalUnlock(GlobalPtrHandle(lp)) - -#define GlobalAllocPtr(flags, cb) \ - (GlobalLock(GlobalAlloc((flags), (cb)))) -#define GlobalReAllocPtr(lp, cbNew, flags) \ - (GlobalUnlockPtr(lp), GlobalLock(GlobalReAlloc(GlobalPtrHandle(lp) , (cbNew), (flags)))) -#define GlobalFreePtr(lp) \ - (GlobalUnlockPtr(lp), (BOOL)GlobalFree(GlobalPtrHandle(lp))) -#endif - - -void -ima_png_error(png_struct *png_ptr, char *message) -{ -// wxMessageBox(message, "PNG error"); - - longjmp(png_ptr->jmpbuf, 1); -} - - -// static wxGifReaderIter* iter; -wxPalette *wxCopyPalette(const wxPalette *cmap); - -wxPNGReader::wxPNGReader(void) -{ - filetype = 0; - RawImage = NULL; // Image data - - Width = 0; Height = 0; // Dimensions - Depth = 0; // (bits x pixel) - ColorType = 0; // Bit 1 = Palette used - // Bit 2 = Color used - // Bit 3 = Alpha used - - EfeWidth = 0; // Efective Width - - lpbi = NULL; - bgindex = -1; - Palette = 0; - imageOK = FALSE; -} - -wxPNGReader::wxPNGReader ( char* ImageFileName ) -{ - imageOK = FALSE; - filetype = 0; - RawImage = NULL; // Image data - - Width = 0; Height = 0; // Dimensions - Depth = 0; // (bits x pixel) - ColorType = 0; // Bit 1 = Palette used - // Bit 2 = Color used - // Bit 3 = Alpha used - - EfeWidth = 0; // Efective Width - - lpbi = NULL; - bgindex = -1; - Palette = 0; - - imageOK = ReadFile (ImageFileName); -} - -void -wxPNGReader::Create(int width, int height, int depth, int colortype) -{ - Width = width; Height = height; Depth = depth; - ColorType = (colortype>=0) ? colortype: ((Depth>8) ? COLORTYPE_COLOR: 0); - - if (lpbi) { - GlobalFreePtr(lpbi); -// delete Palette; - } - RawImage = 0; - Palette = 0; - if (lpbi = DibCreate(Depth, Width, Height)) { - RawImage = (ImagePointerType)DibPtr(lpbi); - EfeWidth = (long)(((long)Width*Depth + 31) / 32) * 4; - imageOK = TRUE; - } -} - -wxPNGReader::~wxPNGReader ( ) -{ - if (lpbi) { - GlobalFreePtr(lpbi); - delete Palette; - } -} - - -int wxPNGReader::GetIndex(int x, int y) -{ - if (!Inside(x, y) || (Depth>8)) return -1; - - ImagePointerType ImagePointer = RawImage + EfeWidth*y + (x*Depth >> 3); - int index = (int)(*ImagePointer); - return index; -} - -bool wxPNGReader::GetRGB(int x, int y, byte* r, byte* g, byte* b) -{ - if (!Inside(x, y)) return FALSE; - - if (Palette) { - return Palette->GetRGB(GetIndex(x, y), r, g, b); -/* PALETTEENTRY entry; - ::GetPaletteEntries((HPALETTE) Palette->GetHPALETTE(), GetIndex(x, y), 1, &entry); - *r = entry.peRed; - *g = entry.peGreen; - *b = entry.peBlue; */ - } else { - ImagePointerType ImagePointer = RawImage + EfeWidth*y + (x*Depth >> 3); - *b = ImagePointer[0]; - *g = ImagePointer[1]; - *r = ImagePointer[2]; - } - return TRUE; -} - - -bool wxPNGReader::SetIndex(int x, int y, int index) -{ - if (!Inside(x, y) || (Depth>8)) return FALSE; - - ImagePointerType ImagePointer = RawImage + EfeWidth*y + (x*Depth >> 3); - *ImagePointer = index; - - return TRUE; -} - -bool wxPNGReader::SetRGB(int x, int y, byte r, byte g, byte b) -{ - if (!Inside(x, y)) return FALSE; - - if (ColorType & COLORTYPE_PALETTE) - { - if (!Palette) return FALSE; - SetIndex(x, y, Palette->GetPixel(r, g, b)); - - } else { - ImagePointerType ImagePointer = RawImage + EfeWidth*y + (x*Depth >> 3); - ImagePointer[0] = b; - ImagePointer[1] = g; - ImagePointer[2] = r; - } - - return TRUE; -} - -bool wxPNGReader::SetPalette(wxPalette* colourmap) -{ - if (!colourmap) - return FALSE; - ColorType |= (COLORTYPE_PALETTE | COLORTYPE_COLOR); - Palette = colourmap; - return (DibSetUsage(lpbi, (HPALETTE) Palette->GetHPALETTE(), WXIMA_COLORS ) != 0); -} - -bool -wxPNGReader::SetPalette(int n, byte *r, byte *g, byte *b) -{ - Palette = new wxPalette(); - if (!Palette) - return FALSE; - - if (!g) g = r; - if (!b) b = g; - Palette->Create(n, r, g, b); - ColorType |= (COLORTYPE_PALETTE | COLORTYPE_COLOR); - return (DibSetUsage(lpbi, (HPALETTE) Palette->GetHPALETTE(), WXIMA_COLORS ) != 0); -} - -bool -wxPNGReader::SetPalette(int n, rgb_color_struct *rgb_struct) -{ - Palette = new wxPalette(); - if (!Palette) - return FALSE; - - byte r[256], g[256], b[256]; - - for(int i=0; iCreate(n, r, g, b); - ColorType |= (COLORTYPE_PALETTE | COLORTYPE_COLOR); - return (DibSetUsage(lpbi, (HPALETTE) Palette->GetHPALETTE(), WXIMA_COLORS ) != 0); -} - -void wxPNGReader::NullData() -{ - lpbi = NULL; - Palette = NULL; -} - -wxBitmap* wxPNGReader::GetBitmap(void) -{ - wxBitmap *bitmap = new wxBitmap; - if ( InstantiateBitmap(bitmap) ) - return bitmap; - else - { - delete bitmap; - return NULL; - } -} - -bool wxPNGReader::InstantiateBitmap(wxBitmap *bitmap) -{ - HDC dc = ::CreateCompatibleDC(NULL); - - if (dc) - { - // tmpBitmap is a dummy, to satisfy ::CreateCompatibleDC (it - // is a memory dc that must have a bitmap selected into it) - HDC dc2 = GetDC(NULL); - HBITMAP tmpBitmap = ::CreateCompatibleBitmap(dc2, GetWidth(), GetHeight()); - ReleaseDC(NULL, dc2); - HBITMAP oldBitmap = (HBITMAP) ::SelectObject(dc, tmpBitmap); - - if ( Palette ) - { - HPALETTE oldPal = ::SelectPalette(dc, (HPALETTE) Palette->GetHPALETTE(), FALSE); - ::RealizePalette(dc); - } - - HBITMAP hBitmap = ::CreateDIBitmap(dc, lpbi, - CBM_INIT, RawImage, (LPBITMAPINFO) lpbi, DIB_PAL_COLORS); - - ::SelectPalette(dc, NULL, TRUE); - ::SelectObject(dc, oldBitmap); - ::DeleteObject(tmpBitmap); - ::DeleteDC(dc); - - if ( hBitmap ) - { - bitmap->SetHBITMAP((WXHBITMAP) hBitmap); - bitmap->SetWidth(GetWidth()); - bitmap->SetHeight(GetHeight()); - bitmap->SetDepth(GetDepth()); - if ( GetDepth() > 1 && Palette ) - bitmap->SetPalette(*Palette); - bitmap->SetOk(TRUE); - - - // Make a mask if appropriate - if ( bgindex > -1 ) - { - wxMask *mask = CreateMask(); - bitmap->SetMask(mask); - } - return TRUE; - } - else - { - return FALSE; - } - } - else - { - return FALSE; - } -} - -wxPalette *wxCopyPalette(const wxPalette *cmap) -{ - // To get number of entries... - WORD count = 0; - ::GetObject((HPALETTE) cmap->GetHPALETTE(), sizeof(WORD), &count); - - LOGPALETTE* logPal = (LOGPALETTE*) - new BYTE[sizeof(LOGPALETTE) + count*sizeof(PALETTEENTRY)]; - logPal->palVersion = 0x300; - logPal->palNumEntries = count; - ::GetPaletteEntries((HPALETTE) cmap->GetHPALETTE(), 0, count, logPal->palPalEntry); - - HPALETTE hPalette = ::CreatePalette(logPal); - delete[] logPal; - - wxPalette *newCmap = new wxPalette; - newCmap->SetHPALETTE((WXHPALETTE) hPalette); - return newCmap; -} - -wxMask *wxPNGReader::CreateMask(void) -{ - HBITMAP hBitmap = ::CreateBitmap(GetWidth(), GetHeight(), 1, 1, NULL); - - HDC dc = ::CreateCompatibleDC(NULL); - HBITMAP oldBitmap = (HBITMAP) ::SelectObject(dc, hBitmap); - - int bgIndex = GetBGIndex(); - - int x,y; - - for (x=0; xSetMaskBitmap((WXHBITMAP) hBitmap); - return mask; -} - -bool wxPNGReader::ReadFile(char * ImageFileName) -{ - int number_passes; - - if (ImageFileName) - strcpy(filename, ImageFileName); - - FILE *fp; - png_struct *png_ptr; - png_info *info_ptr; - wxPNGReaderIter iter(this); - - /* open the file */ - fp = fopen(filename, "rb"); - if (!fp) - return FALSE; - - /* allocate the necessary structures */ - png_ptr = new (png_struct); - if (!png_ptr) - { - fclose(fp); - return FALSE; - } - - info_ptr = new (png_info); - if (!info_ptr) - { - fclose(fp); - delete(png_ptr); - return FALSE; - } - /* set error handling */ - if (setjmp(png_ptr->jmpbuf)) - { - png_read_destroy(png_ptr, info_ptr, (png_info *)0); - fclose(fp); - delete(png_ptr); - delete(info_ptr); - - /* If we get here, we had a problem reading the file */ - return FALSE; - } - //png_set_error(ima_png_error, NULL); - - /* initialize the structures, info first for error handling */ - png_info_init(info_ptr); - png_read_init(png_ptr); - - /* set up the input control */ - png_init_io(png_ptr, fp); - - /* read the file information */ - png_read_info(png_ptr, info_ptr); - - /* allocate the memory to hold the image using the fields - of png_info. */ - png_color_16 my_background={ 0, 31, 127, 255, 0 }; - - if (info_ptr->valid & PNG_INFO_bKGD) - { - png_set_background(png_ptr, &(info_ptr->background), - PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); - if ( info_ptr->num_palette > 0 ) - bgindex = info_ptr->background.index; - } - else { - png_set_background(png_ptr, &my_background, - PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); - - // Added by JACS: guesswork! - if ( info_ptr->num_trans != 0 ) - bgindex = info_ptr->num_trans - 1 ; - } - - /* tell libpng to strip 16 bit depth files down to 8 bits */ - if (info_ptr->bit_depth == 16) - png_set_strip_16(png_ptr); - - int pixel_depth=(info_ptr->pixel_depth<24) ? info_ptr->pixel_depth: 24; - Create(info_ptr->width, info_ptr->height, pixel_depth, - info_ptr->color_type); - - if (info_ptr->num_palette>0) - { - SetPalette((int)info_ptr->num_palette, (rgb_color_struct*)info_ptr->palette); - } - - int row_stride = info_ptr->width * ((pixel_depth+7)>>3); - // printf("P = %d D = %d RS= %d ", info_ptr->num_palette, info_ptr->pixel_depth,row_stride); -// printf("CT = %d TRS = %d BD= %d ", info_ptr->color_type, info_ptr->valid & PNG_INFO_tRNS,info_ptr->bit_depth); - - byte *row_pointers = new byte[row_stride]; - - /* turn on interlace handling */ - if (info_ptr->interlace_type) - number_passes = png_set_interlace_handling(png_ptr); - else - number_passes = 1; -// printf("NP = %d ", number_passes); - - for (int pass=0; pass< number_passes; pass++) { - iter.upset(); - int y=0; - do { -// (unsigned char *)iter.GetRow(); - if (info_ptr->interlace_type) { - if (pass>0) - iter.GetRow(row_pointers, row_stride); - png_read_row(png_ptr, row_pointers, NULL); - } - else - png_read_row(png_ptr, row_pointers, NULL); - - iter.SetRow(row_pointers, row_stride); - y++; - } while(iter.PrevRow()); -// printf("Y=%d ",y); - } - delete[] row_pointers; - - /* read the rest of the file, getting any additional chunks - in info_ptr */ - png_read_end(png_ptr, info_ptr); - - /* clean up after the read, and free any memory allocated */ - png_read_destroy(png_ptr, info_ptr, (png_info *)0); - - /* free the structures */ - delete(png_ptr); - delete(info_ptr); - - /* close the file */ - fclose(fp); - - /* that's it */ - return TRUE; -} - - -/* write a png file */ - -bool wxPNGReader::SaveFile(char * ImageFileName) -{ - if (ImageFileName) - strcpy(filename, ImageFileName); - - wxPNGReaderIter iter(this); - FILE *fp; - png_struct *png_ptr; - png_info *info_ptr; - - /* open the file */ - fp = fopen(filename, "wb"); - if (!fp) - return FALSE; - - /* allocate the necessary structures */ - png_ptr = new (png_struct); - if (!png_ptr) - { - fclose(fp); - return FALSE; - } - - info_ptr = new (png_info); - if (!info_ptr) - { - fclose(fp); - delete(png_ptr); - return FALSE; - } - - /* set error handling */ - if (setjmp(png_ptr->jmpbuf)) - { - png_write_destroy(png_ptr); - fclose(fp); - delete(png_ptr); - delete(info_ptr); - - /* If we get here, we had a problem reading the file */ - return FALSE; - } - //png_set_error(ima_png_error, NULL); - -// printf("writig pg %s ", filename); - /* initialize the structures */ - png_info_init(info_ptr); - png_write_init(png_ptr); - - int row_stride = GetWidth() * ((GetDepth()+7)>>3); - /* set up the output control */ - png_init_io(png_ptr, fp); - - /* set the file information here */ - info_ptr->width = GetWidth(); - info_ptr->height = GetHeight(); - info_ptr->pixel_depth = GetDepth(); - info_ptr->channels = (GetDepth()>8) ? 3: 1; - info_ptr->bit_depth = GetDepth()/info_ptr->channels; - info_ptr->color_type = GetColorType(); - info_ptr->compression_type = info_ptr->filter_type = info_ptr->interlace_type=0; - info_ptr->valid = 0; - info_ptr->rowbytes = row_stride; - - -// printf("P = %d D = %d RS= %d GD= %d CH= %d ", info_ptr->pixel_depth, info_ptr->bit_depth, row_stride, GetDepth(), info_ptr->channels); - /* set the palette if there is one */ - if ((GetColorType() & COLORTYPE_PALETTE) && GetPalette()) - { -// printf("writing paleta[%d %d %x]",GetColorType() ,COLORTYPE_PALETTE, GetPalette()); - info_ptr->valid |= PNG_INFO_PLTE; - info_ptr->palette = new png_color[256]; - info_ptr->num_palette = 256; - for (int i=0; i<256; i++) - GetPalette()->GetRGB(i, &info_ptr->palette[i].red, &info_ptr->palette[i].green, &info_ptr->palette[i].blue); - } -// printf("Paleta [%d %d %x]",GetColorType() ,COLORTYPE_PALETTE, GetPalette()); - - - /* optional significant bit chunk */ -// info_ptr->valid |= PNG_INFO_sBIT; -// info_ptr->sig_bit = true_bit_depth; - - /* optional gamma chunk */ -// info_ptr->valid |= PNG_INFO_gAMA; -// info_ptr->gamma = gamma; - - /* other optional chunks */ - - /* write the file information */ - png_write_info(png_ptr, info_ptr); - - /* set up the transformations you want. Note that these are - all optional. Only call them if you want them */ - - /* shift the pixels up to a legal bit depth and fill in - as appropriate to correctly scale the image */ -// png_set_shift(png_ptr, &(info_ptr->sig_bit)); - - /* pack pixels into bytes */ -// png_set_packing(png_ptr); - - /* flip bgr pixels to rgb */ -// png_set_bgr(png_ptr); - - /* swap bytes of 16 bit files to most significant bit first */ -// png_set_swap(png_ptr); - - /* get rid of filler bytes, pack rgb into 3 bytes */ -// png_set_rgbx(png_ptr); - -/* If you are only writing one row at a time, this works */ - - byte *row_pointers = new byte[row_stride]; - iter.upset(); - do { -// (unsigned char *)iter.GetRow(); - iter.GetRow(row_pointers, row_stride); - png_write_row(png_ptr, row_pointers); - } while(iter.PrevRow()); - - delete[] row_pointers; - -/* write the rest of the file */ - png_write_end(png_ptr, info_ptr); - - /* clean up after the write, and free any memory allocated */ - png_write_destroy(png_ptr); - - /* if you malloced the palette, free it here */ - if (info_ptr->palette) - delete[] (info_ptr->palette); - - /* free the structures */ - delete(png_ptr); - delete(info_ptr); - - /* close the file */ - fclose(fp); - - /* that's it */ - return TRUE; -} - -static int Power(int x, int y) -{ - int z = 1; - int i; - for ( i = 0; i < y; i++) - { - z *= x; - } - return z; -} - -static char hexArray[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', - 'C', 'D', 'E', 'F' }; - -static void DecToHex(int dec, char *buf) -{ - int firstDigit = (int)(dec/16.0); - int secondDigit = (int)(dec - (firstDigit*16.0)); - buf[0] = hexArray[firstDigit]; - buf[1] = hexArray[secondDigit]; - buf[2] = 0; -} - - -bool wxPNGReader::SaveXPM(char *filename, char *name) -{ - char nameStr[256]; - if ( name ) - strcpy(nameStr, name); - else - { - strcpy(nameStr, filename); - wxStripExtension(nameStr); - } - - if ( GetDepth() > 4 ) - { - // Only a depth of 4 and below allowed - return FALSE; - } - - if ( !GetPalette() ) - return FALSE; - - ofstream str(filename); - if ( str.bad() ) - return FALSE; - - int noColours = Power(2, GetDepth()); - - // Output header - str << "/* XPM */\n"; - str << "static char * " << nameStr << "_xpm[] = {\n"; - str << "\"" << GetWidth() << " " << GetHeight() << " " << noColours << " 1\",\n"; - - // Output colourmap - int base = 97 ; // start from 'a' - - unsigned char red, green, blue; - char hexBuf[4]; - int i; - for ( i = 0; i < noColours; i ++) - { - str << "\"" << (char)(base + i) << " c #"; - GetPalette()->GetRGB(i, &red, &green, &blue); - DecToHex(red, hexBuf); - str << hexBuf; - DecToHex(green, hexBuf); - str << hexBuf; - DecToHex(blue, hexBuf); - str << hexBuf; - str << "\",\n"; - } - - // Output the data - int x, y; - for ( y = 0; y < GetHeight(); y++) - { - str << "\""; - for ( x = 0; x < GetWidth(); x++) - { - int index = GetIndex(x, y); - str << (char)(base + index) ; - } - str << "\",\n"; - } - - str << "};\n"; - str.flush(); - - return TRUE; -} - -#include - -IMPLEMENT_DYNAMIC_CLASS(wxPNGFileHandler, wxBitmapHandler) - -bool wxPNGFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth, int desiredHeight) -{ - wxPNGReader reader; - if (reader.ReadFile((char*) (const char*) name)) - { - return reader.InstantiateBitmap(bitmap); - } - else - return FALSE; -} - -bool wxPNGFileHandler::SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *pal) -{ - return FALSE; -} - - diff --git a/src/msw/printdlg.cpp b/src/msw/printdlg.cpp deleted file mode 100644 index 143e0f1603..0000000000 --- a/src/msw/printdlg.cpp +++ /dev/null @@ -1,185 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: printdlg.cpp -// Purpose: wxPrintDialog, wxPageSetupDialog -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "printdlg.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#define IN_WX_MAIN_CPP -#include "wx/wxprec.h" - -#if defined(__BORLANDC__) -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#endif - -#include "wx/printdlg.h" -#include "wx/dcprint.h" - -// Have to emulate page setup dialog for Win16 -#if !defined(__WIN95__) -#include "wx/generic/prntdlgg.h" -#endif - -#include -#include -#include - -#ifndef __WIN32__ -#include -#endif - -// Clash with Windows header files -#ifdef StartDoc -#undef StartDoc -#endif - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog, wxDialog) -IMPLEMENT_CLASS(wxPageSetupDialog, wxDialog) -#endif - -wxPrintDialog::wxPrintDialog(void): - wxDialog() -{ - dialogParent = NULL; - printerDC = NULL; - destroyDC = TRUE; - deviceName = NULL; - driverName = NULL; - portName = NULL; -} - -wxPrintDialog::wxPrintDialog(wxWindow *p, wxPrintData* data): - wxDialog() -{ - Create(p, data); -} - -bool wxPrintDialog::Create(wxWindow *p, wxPrintData* data) -{ - dialogParent = p; - printerDC = NULL; - destroyDC = TRUE; - deviceName = NULL; - driverName = NULL; - portName = NULL; - - if ( data ) - printData = *data; - -#ifdef __WXMSW__ - printData.SetOwnerWindow(p); -#endif - - return TRUE; -} - -wxPrintDialog::~wxPrintDialog(void) -{ - if (destroyDC && printerDC) - delete printerDC; - if (deviceName) delete[] deviceName; - if (driverName) delete[] driverName; - if (portName) delete[] portName; -} - -int wxPrintDialog::ShowModal(void) -{ - printData.ConvertToNative(); - - bool ret = (PrintDlg( (PRINTDLG *)printData.printData ) != 0); - if ( ret != FALSE && ((PRINTDLG *)printData.printData)->hDC) - { - wxPrinterDC *pdc = new wxPrinterDC((WXHDC) ((PRINTDLG *)printData.printData)->hDC); - printerDC = pdc; - printData.ConvertFromNative(); - return wxID_OK; - } - else - { -/* - char buf[256]; - DWORD exError = CommDlgExtendedError(); - sprintf(buf, "ret = %d, ex error = %d", (int) ret, (int) exError); - wxMessageBox(buf); -*/ - return wxID_CANCEL; - } -} - -wxDC *wxPrintDialog::GetPrintDC(void) -{ - if (printerDC) - { - destroyDC = FALSE; - return printerDC; - } - else - return NULL; -} - -/* - * wxPageSetupDialog - */ - -wxPageSetupDialog::wxPageSetupDialog(void): - wxDialog() -{ - m_dialogParent = NULL; -} - -wxPageSetupDialog::wxPageSetupDialog(wxWindow *p, wxPageSetupData *data): - wxDialog() -{ - Create(p, data); -} - -bool wxPageSetupDialog::Create(wxWindow *p, wxPageSetupData *data) -{ - m_dialogParent = p; - - if (data) - m_pageSetupData = (*data); - -#if defined(__WIN95__) - m_pageSetupData.SetOwnerWindow(p); -#endif - return TRUE; -} - -wxPageSetupDialog::~wxPageSetupDialog(void) -{ -} - -int wxPageSetupDialog::ShowModal(void) -{ -#ifdef __WIN95__ - m_pageSetupData.ConvertToNative(); - if (PageSetupDlg( (PAGESETUPDLG *)m_pageSetupData.GetNativeData() )) - { - m_pageSetupData.ConvertFromNative(); - return wxID_OK; - } - else - return wxID_CANCEL; -#else - wxGenericPageSetupDialog *genericPageSetupDialog = new wxGenericPageSetupDialog(GetParent(), & m_pageSetupData); - int ret = genericPageSetupDialog->ShowModal(); - m_pageSetupData = genericPageSetupDialog->GetPageSetupData(); - genericPageSetupDialog->Close(TRUE); - return ret; -#endif -} - diff --git a/src/msw/printwin.cpp b/src/msw/printwin.cpp deleted file mode 100644 index 31cf9641ce..0000000000 --- a/src/msw/printwin.cpp +++ /dev/null @@ -1,363 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: printwin.cpp -// Purpose: wxWindowsPrinter framework -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "printwin.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include "wx/defs.h" - -#define WINDOWS_PRINTING (wxTheApp->GetPrintMode() == wxPRINT_WINDOWS) - -#ifndef WX_PRECOMP -#include "wx/utils.h" -#include "wx/dc.h" -#include "wx/app.h" -#include "wx/msgdlg.h" -#endif - -#include "wx/msw/printwin.h" -#include "wx/dcprint.h" -#include "wx/printdlg.h" -#include "wx/msw/private.h" - -#include -#include -#include - -// Clash with Windows header files -#ifdef StartDoc -#undef StartDoc -#endif - -#ifndef __WIN32__ -#include -#endif - -LONG APIENTRY _EXPORT wxAbortProc(HDC hPr, int Code); - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxWindowsPrinter, wxPrinterBase) -IMPLEMENT_CLASS(wxWindowsPrintPreview, wxPrintPreviewBase) -#endif - -/* - * Printer - */ - -wxWindowsPrinter::wxWindowsPrinter(wxPrintData *data): - wxPrinterBase(data) -{ - m_lpAbortProc = (WXFARPROC) MakeProcInstance((FARPROC) wxAbortProc, wxGetInstance()); -} - -wxWindowsPrinter::~wxWindowsPrinter(void) -{ - FreeProcInstance((FARPROC) m_lpAbortProc); -} - -bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt) -{ - sm_abortIt = FALSE; - sm_abortWindow = NULL; - - if (!printout) - return FALSE; - - printout->SetIsPreview(FALSE); - printout->OnPreparePrinting(); - - // Get some parameters from the printout, if defined - int fromPage, toPage; - int minPage, maxPage; - printout->GetPageInfo(&minPage, &maxPage, &fromPage, &toPage); - - if (maxPage == 0) - return FALSE; - - m_printData.SetMinPage(minPage); - m_printData.SetMaxPage(maxPage); - if (fromPage != 0) - m_printData.SetFromPage(fromPage); - if (toPage != 0) - m_printData.SetToPage(toPage); - - if (minPage != 0) - { - m_printData.EnablePageNumbers(TRUE); - if (m_printData.GetFromPage() < m_printData.GetMinPage()) - m_printData.SetFromPage(m_printData.GetMinPage()); - else if (m_printData.GetFromPage() > m_printData.GetMaxPage()) - m_printData.SetFromPage(m_printData.GetMaxPage()); - if (m_printData.GetToPage() > m_printData.GetMaxPage()) - m_printData.SetToPage(m_printData.GetMaxPage()); - else if (m_printData.GetToPage() < m_printData.GetMinPage()) - m_printData.SetToPage(m_printData.GetMinPage()); - } - else - m_printData.EnablePageNumbers(FALSE); - - // Create a suitable device context - wxDC *dc = NULL; - if (prompt) - { - wxPrintDialog dialog(parent, & m_printData); - if (dialog.ShowModal() == wxID_OK) - { - dc = dialog.GetPrintDC(); - m_printData = dialog.GetPrintData(); - } - } - else - { - dc = new wxPrinterDC("", "", "", FALSE, m_printData.GetOrientation()); - } - - // May have pressed cancel. - if (!dc || !dc->Ok()) - { - if (dc) delete dc; - return FALSE; - } - - int logPPIScreenX = 0; - int logPPIScreenY = 0; - int logPPIPrinterX = 0; - int logPPIPrinterY = 0; - - HDC hdc = ::GetDC(NULL); - logPPIScreenX = ::GetDeviceCaps(hdc, LOGPIXELSX); - logPPIScreenY = ::GetDeviceCaps(hdc, LOGPIXELSY); - ::ReleaseDC(NULL, hdc); - - logPPIPrinterX = ::GetDeviceCaps((HDC) dc->GetHDC(), LOGPIXELSX); - logPPIPrinterY = ::GetDeviceCaps((HDC) dc->GetHDC(), LOGPIXELSY); - if (logPPIPrinterX == 0 || logPPIPrinterY == 0) - { - delete dc; - return FALSE; - } - - printout->SetPPIScreen(logPPIScreenX, logPPIScreenY); - printout->SetPPIPrinter(logPPIPrinterX, logPPIPrinterY); - - // Set printout parameters - printout->SetDC(dc); - - int w, h; - long ww, hh; - dc->GetSize(&w, &h); - printout->SetPageSizePixels((int)w, (int)h); - dc->GetSizeMM(&ww, &hh); - printout->SetPageSizeMM((int)ww, (int)hh); - - // Create an abort window - wxBeginBusyCursor(); - - wxWindow *win = CreateAbortWindow(parent, printout); - wxYield(); - -#if defined(__BORLANDC__) || defined(__GNUWIN32__) || !defined(__WIN32__) - ::SetAbortProc((HDC) dc->GetHDC(), (FARPROC) m_lpAbortProc); -#else - ::SetAbortProc((HDC) dc->GetHDC(), (int (_stdcall *) - // cast it to right type only if required - // @@@ it's really cdecl and we're casting it to stdcall - either there is - // something I don't understand or it will crash at first usage - #ifdef STRICT - (HDC, int) - #else - () - #endif - )m_lpAbortProc); -#endif - - if (!win) - { - wxEndBusyCursor(); - wxMessageBox("Sorry, could not create an abort dialog.", "Print Error", wxOK, parent); - delete dc; - } - sm_abortWindow = win; - sm_abortWindow->Show(TRUE); - wxYield(); - - printout->OnBeginPrinting(); - - bool keepGoing = TRUE; - - int copyCount; - for (copyCount = 1; copyCount <= m_printData.GetNoCopies(); copyCount ++) - { - if (!printout->OnBeginDocument(m_printData.GetFromPage(), m_printData.GetToPage())) - { - wxEndBusyCursor(); - wxMessageBox("Could not start printing.", "Print Error", wxOK, parent); - break; - } - if (sm_abortIt) - break; - - int pn; - for (pn = m_printData.GetFromPage(); keepGoing && (pn <= m_printData.GetToPage()) && printout->HasPage(pn); - pn++) - { - if (sm_abortIt) - { - keepGoing = FALSE; - break; - } - else - { -// int dcID = ::SaveDC(dc->GetHDC()); - dc->StartPage(); - printout->OnPrintPage(pn); - dc->EndPage(); -// ::RestoreDC(dc->GetHDC(), dcID); - } - } - printout->OnEndDocument(); - } - - printout->OnEndPrinting(); - - if (sm_abortWindow) - { - sm_abortWindow->Show(FALSE); - delete sm_abortWindow; - sm_abortWindow = NULL; - } - - wxEndBusyCursor(); - - delete dc; - - return TRUE; -} - -bool wxWindowsPrinter::PrintDialog(wxWindow *parent) -{ - wxPrintDialog dialog(parent, & m_printData); - return (dialog.ShowModal() == wxID_OK); -} - -bool wxWindowsPrinter::Setup(wxWindow *parent) -{ - wxPrintDialog dialog(parent, & m_printData); - dialog.GetPrintData().SetSetupDialog(TRUE); - return (dialog.ShowModal() == wxID_OK); -} - -/* - * Print preview - */ - -wxWindowsPrintPreview::wxWindowsPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting, wxPrintData *data): - wxPrintPreviewBase(printout, printoutForPrinting, data) -{ - DetermineScaling(); -} - -wxWindowsPrintPreview::~wxWindowsPrintPreview(void) -{ -} - -bool wxWindowsPrintPreview::Print(bool interactive) -{ - if (!m_printPrintout) - return FALSE; - wxWindowsPrinter printer(&m_printData); - return printer.Print(m_previewFrame, m_printPrintout, interactive); -} - -void wxWindowsPrintPreview::DetermineScaling(void) -{ - HDC dc = ::GetDC(NULL); - int screenWidth = ::GetDeviceCaps(dc, HORZSIZE); -// int screenHeight = ::GetDeviceCaps(dc, VERTSIZE); - int screenXRes = ::GetDeviceCaps(dc, HORZRES); -// int screenYRes = ::GetDeviceCaps(dc, VERTRES); - int logPPIScreenX = ::GetDeviceCaps(dc, LOGPIXELSX); - int logPPIScreenY = ::GetDeviceCaps(dc, LOGPIXELSY); - m_previewPrintout->SetPPIScreen(logPPIScreenX, logPPIScreenY); - - ::ReleaseDC(NULL, dc); - - // Get a device context for the currently selected printer - wxPrinterDC printerDC("", "", "", FALSE, m_printData.GetOrientation()); - - int printerWidth = 150; - int printerHeight = 250; - int printerXRes = 1500; - int printerYRes = 2500; - - if (printerDC.GetHDC()) - { - printerWidth = ::GetDeviceCaps((HDC) printerDC.GetHDC(), HORZSIZE); - printerHeight = ::GetDeviceCaps((HDC) printerDC.GetHDC(), VERTSIZE); - printerXRes = ::GetDeviceCaps((HDC) printerDC.GetHDC(), HORZRES); - printerYRes = ::GetDeviceCaps((HDC) printerDC.GetHDC(), VERTRES); - - int logPPIPrinterX = ::GetDeviceCaps((HDC) printerDC.GetHDC(), LOGPIXELSX); - int logPPIPrinterY = ::GetDeviceCaps((HDC) printerDC.GetHDC(), LOGPIXELSY); - - m_previewPrintout->SetPPIPrinter(logPPIPrinterX, logPPIPrinterY); - m_previewPrintout->SetPageSizeMM(printerWidth, printerHeight); - - if (logPPIPrinterX == 0 || logPPIPrinterY == 0 || printerWidth == 0 || printerHeight == 0) - m_isOk = FALSE; - } - else - m_isOk = FALSE; - - m_pageWidth = printerXRes; - m_pageHeight = printerYRes; - - // At 100%, the page should look about page-size on the screen. - m_previewScale = (float)((float)screenWidth/(float)printerWidth); - m_previewScale = m_previewScale * (float)((float)screenXRes/(float)printerYRes); -} - -/**************************************************************************** - - FUNCTION: wxAbortProc() - - PURPOSE: Processes messages for the Abort Dialog box - -****************************************************************************/ - -LONG APIENTRY _EXPORT wxAbortProc(HDC WXUNUSED(hPr), int WXUNUSED(Code)) -{ - MSG msg; - - if (!wxPrinterBase::sm_abortWindow) /* If the abort dialog isn't up yet */ - return(TRUE); - - /* Process messages intended for the abort dialog box */ - - while (!wxPrinterBase::sm_abortIt && PeekMessage(&msg, 0, 0, 0, TRUE)) - if (!IsDialogMessage((HWND) wxPrinterBase::sm_abortWindow->GetHWND(), &msg)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - /* bAbort is TRUE (return is FALSE) if the user has aborted */ - - return (!wxPrinterBase::sm_abortIt); -} - diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp deleted file mode 100644 index 6f63ec57b4..0000000000 --- a/src/msw/radiobox.cpp +++ /dev/null @@ -1,734 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: radiobox.cpp -// Purpose: wxRadioBox -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "radiobox.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/setup.h" -#include "wx/radiobox.h" -#endif - -#include "wx/msw/private.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) -#endif - -bool wxRadioBox::MSWCommand(WXUINT param, WXWORD id) -{ - if (param == BN_CLICKED) - { -#ifdef __WIN32__ - int i; - for (i = 0; i < m_noItems; i++) - if (id == GetWindowLong((HWND) m_radioButtons[i], GWL_ID)) - m_selectedButton = i; -#else - int i; - for (i = 0; i < m_noItems; i++) - if (id == GetWindowWord((HWND) m_radioButtons[i], GWW_ID)) - m_selectedButton = i; -#endif - - wxCommandEvent event(wxEVT_COMMAND_RADIOBOX_SELECTED, m_windowId); - event.SetInt( m_selectedButton ); - event.SetEventObject( this ); - ProcessCommand(event); - return TRUE; - } - else return FALSE; -} - -#if WXWIN_COMPATIBILITY -wxRadioBox::wxRadioBox(wxWindow *parent, wxFunction func, const char *title, - int x, int y, int width, int height, - int n, char **choices, - int majorDim, long style, const char *name) -{ - wxString *choices2 = new wxString[n]; - for ( int i = 0; i < n; i ++) choices2[i] = choices[i]; - Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), n, choices2, majorDim, style, - wxDefaultValidator, name); - Callback(func); - delete choices2; -} - -#endif - -// Radio box item -wxRadioBox::wxRadioBox(void) -{ - m_selectedButton = -1; - m_noItems = 0; - m_noRowsOrCols = 0; - m_radioButtons = NULL; - m_majorDim = 0 ; - m_radioWidth = NULL ; - m_radioHeight = NULL ; -} - -bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, - int n, const wxString choices[], - int majorDim, long style, - const wxValidator& val, const wxString& name) -{ - m_selectedButton = -1; - m_noItems = n; - - SetName(name); - SetValidator(val); - - parent->AddChild(this); - m_backgroundColour = parent->GetDefaultBackgroundColour() ; - m_foregroundColour = parent->GetDefaultForegroundColour() ; - - m_windowStyle = (long&)style; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - if (id == -1) - m_windowId = NewControlId(); - else - m_windowId = id; - - m_noRowsOrCols = majorDim; - if (majorDim==0) - m_majorDim = n ; - else // Seemed to make sense to put this 'else' here... (RD) - m_majorDim = majorDim ; - - long msStyle = GROUP_FLAGS; - - bool want3D; - WXDWORD exStyle = Determine3DEffects(0, &want3D) ; - // Even with extended styles, need to combine with WS_BORDER - // for them to look right. - if (want3D && ((m_windowStyle & wxSIMPLE_BORDER) || (m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSUNKEN_BORDER) || (m_windowStyle & wxDOUBLE_BORDER))) - msStyle |= WS_BORDER; - - - m_hWnd = (WXHWND) CreateWindowEx((DWORD) exStyle, GROUP_CLASS, (title == "" ? NULL : (const char *)title), - msStyle, - 0,0,0,0, - (HWND) parent->GetHWND(), (HMENU) m_windowId, wxGetInstance(), NULL) ; - - HWND the_handle = (HWND) parent->GetHWND() ; - -#if CTL3D - if (want3D) - { - Ctl3dSubclassCtl((HWND) m_hWnd); - m_useCtl3D = TRUE; - } -#endif - - SetFont(* parent->GetFont()); - - SubclassWin((WXHWND)m_hWnd); - - // Some radio boxes test consecutive id. - (void)NewControlId() ; - m_radioButtons = new WXHWND[n]; - m_radioWidth = new int[n] ; - m_radioHeight = new int[n] ; - int i; - for (i = 0; i < n; i++) - { - m_radioWidth[i] = m_radioHeight[i] = -1 ; - long groupStyle = 0; - if (i == 0 && style==0) - groupStyle = WS_GROUP; - long newId = NewControlId(); - long msStyle = groupStyle | RADIO_FLAGS; - - m_radioButtons[i] = (WXHWND) CreateWindowEx(exStyle, RADIO_CLASS, choices[i], - msStyle,0,0,0,0, - the_handle, (HMENU)newId, wxGetInstance(), NULL); -#if CTL3D - if (want3D) - { - Ctl3dSubclassCtl((HWND) m_hWnd); - m_useCtl3D = TRUE; - } -#endif - if (GetFont()) - { - SendMessage((HWND)m_radioButtons[i],WM_SETFONT, - (WPARAM)GetFont()->GetResourceHandle(),0L); - } - m_subControls.Append((wxObject *)newId); - } - - // Create a dummy radio control to end the group. - (void)CreateWindowEx(0, RADIO_CLASS, "", WS_GROUP|RADIO_FLAGS, 0,0,0,0, the_handle, (HMENU)NewControlId(), wxGetInstance(), NULL); - - SetSelection(0); - - SetSize(x, y, width, height); - - return TRUE; -} - -#if 0 -bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, - int n, const wxBitmap *choices[], - int majorDim, long style, - const wxValidator& val, const wxString& name) -{ - m_selectedButton = -1; - m_noRowsOrCols = 0; - m_noItems = n; - - SetName(name); - SetValidator(val); - - parent->AddChild(this); - m_backgroundColour = parent->GetDefaultBackgroundColour() ; - m_foregroundColour = parent->GetDefaultForegroundColour() ; - - m_windowStyle = (long&)style; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - if (id == -1) - m_windowId = NewControlId(); - else - m_windowId = id; - - - m_noRowsOrCols = majorDim; - if (majorDim==0) - m_majorDim = n ; - m_majorDim = majorDim ; - HWND the_handle ; - - long msStyle = GROUP_FLAGS; - - bool want3D; - WXDWORD exStyle = Determine3DEffects(0, &want3D) ; - // Even with extended styles, need to combine with WS_BORDER - // for them to look right. - if (want3D && ((m_windowStyle & wxSIMPLE_BORDER) || (m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSUNKEN_BORDER) || (m_windowStyle & wxDOUBLE_BORDER))) - msStyle |= WS_BORDER; - - m_hWnd = (WXHWND) CreateWindowEx((DWORD) exStyle, GROUP_CLASS, (title == "" ? NULL : (const char *)title), - msStyle, - 0,0,0,0, - (HWND) parent->GetHWND(), (HMENU) m_windowId, wxGetInstance(), NULL) ; - - the_handle = (HWND) parent->GetHWND(); - -#if CTL3D - if (want3D) - { - Ctl3dSubclassCtl((HWND) m_hWnd); - m_useCtl3D = TRUE; - } -#endif - - SetFont(* parent->GetFont()); - - // Subclass again for purposes of dialog editing mode - SubclassWin((WXHWND)m_hWnd); - - (void)NewControlId() ; - m_radioButtons = new WXHWND[n]; - m_radioWidth = new int[n] ; - m_radioHeight = new int[n] ; - - int i; - for (i = 0; i < n; i++) - { - long groupStyle = 0; - if (i == 0 && style==0) - groupStyle = WS_GROUP; - long newId = NewControlId(); - m_radioWidth[i] = ((wxBitmap *)choices[i])->GetWidth(); - m_radioHeight[i] = ((wxBitmap *)choices[i])->GetHeight(); - char tmp[32] ; - sprintf(tmp,"Toggle%d",i) ; - long msStyle = groupStyle | RADIO_FLAGS; - m_radioButtons[i] = (WXHWND) CreateWindowEx(exStyle, RADIO_CLASS, tmp, - msStyle,0,0,0,0, - the_handle, (HMENU)newId, wxhInstance, NULL); -#if CTL3D - if (want3D) - { - Ctl3dSubclassCtl((HWND) m_hWnd); - m_useCtl3D = TRUE; - } -#endif - m_subControls.Append((wxObject *)newId); - } - // Create a dummy radio control to end the group. - (void)CreateWindowEx(0, RADIO_CLASS, "", WS_GROUP|RADIO_FLAGS, 0,0,0,0, the_handle, (HMENU)NewControlId(), wxGetInstance(), NULL); - - SetSelection(0); - - SetSize(x, y, width, height); - - return TRUE; -} -#endif - -wxRadioBox::~wxRadioBox(void) -{ - m_isBeingDeleted = TRUE; - - if (m_radioButtons) - { - int i; - for (i = 0; i < m_noItems; i++) - DestroyWindow((HWND) m_radioButtons[i]); - delete[] m_radioButtons; - } - if (m_radioWidth) - delete[] m_radioWidth ; - if (m_radioHeight) - delete[] m_radioHeight ; - if (m_hWnd) - ::DestroyWindow((HWND) m_hWnd) ; - m_hWnd = 0 ; - -} - -wxString wxRadioBox::GetLabel(int item) const -{ - GetWindowText((HWND)m_radioButtons[item], wxBuffer, 300); - return wxString(wxBuffer); -} - -void wxRadioBox::SetLabel(int item, const wxString& label) -{ - m_radioWidth[item] = m_radioHeight[item] = -1 ; - SetWindowText((HWND)m_radioButtons[item], (const char *)label); -} - -void wxRadioBox::SetLabel(int item, wxBitmap *bitmap) -{ -/* - m_radioWidth[item] = bitmap->GetWidth() + FB_MARGIN ; - m_radioHeight[item] = bitmap->GetHeight() + FB_MARGIN ; -*/ -} - -int wxRadioBox::FindString(const wxString& s) const -{ - int i; - for (i = 0; i < m_noItems; i++) - { - GetWindowText((HWND) m_radioButtons[i], wxBuffer, 1000); - if (s == wxBuffer) - return i; - } - return -1; -} - -void wxRadioBox::SetSelection(int N) -{ - if ((N < 0) || (N >= m_noItems)) - return; - -// Following necessary for Win32s, because Win32s translate BM_SETCHECK - if (m_selectedButton >= 0 && m_selectedButton < m_noItems) - SendMessage((HWND) m_radioButtons[m_selectedButton], BM_SETCHECK, 0, 0L); - - SendMessage((HWND) m_radioButtons[N], BM_SETCHECK, 1, 0L); - m_selectedButton = N; -} - -// Get single selection, for single choice list items -int wxRadioBox::GetSelection(void) const -{ - return m_selectedButton; -} - -// Find string for position -wxString wxRadioBox::GetString(int N) const -{ - GetWindowText((HWND) m_radioButtons[N], wxBuffer, 1000); - return wxString(wxBuffer); -} - -void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - int currentX, currentY; - GetPosition(¤tX, ¤tY); - int xx = x; - int yy = y; - - if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - xx = currentX; - if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - yy = currentY; - - AdjustForParentClientOrigin(xx, yy, sizeFlags); - - char buf[400]; - - int y_offset = yy; - int x_offset = xx; - int current_width, cyf; - - int cx1,cy1 ; - wxGetCharSize(m_hWnd, &cx1, &cy1, GetFont()); - // Attempt to have a look coherent with other platforms: - // We compute the biggest toggle dim, then we align all - // items according this value. - int maxWidth = -1; - int maxHeight = -1 ; - - int i; - for (i = 0 ; i < m_noItems; i++) - { - int eachWidth; - int eachHeight ; - if (m_radioWidth[i]<0) - { - // It's a labelled toggle - GetWindowText((HWND) m_radioButtons[i], buf, 300); - GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL, GetFont()); - eachWidth = (int)(current_width + RADIO_SIZE); - eachHeight = (int)((3*cyf)/2); - } - else - { - eachWidth = m_radioWidth[i] ; - eachHeight = m_radioHeight[i] ; - } - if (maxWidth0) - y_offset += cy1/2 ; - } - } - int eachWidth ; - int eachHeight ; - if (m_radioWidth[i]<0) - { - // It's a labeled item - GetWindowText((HWND) m_radioButtons[i], buf, 300); - GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL,GetFont()); - - // How do we find out radio button bitmap size!! - // By adjusting them carefully, manually :-) - eachWidth = (int)(current_width + RADIO_SIZE); - eachHeight = (int)((3*cyf)/2); - } - else - { - eachWidth = m_radioWidth[i] ; - eachHeight = m_radioHeight[i] ; - } - - MoveWindow((HWND) m_radioButtons[i],x_offset,y_offset,eachWidth,eachHeight,TRUE); - if (m_windowStyle & wxRA_HORIZONTAL) - { - y_offset += maxHeight; - if (m_radioWidth[0]>0) - y_offset += cy1/2 ; - } - else - x_offset += maxWidth + cx1; - } -} - -void wxRadioBox::GetSize(int *width, int *height) const -{ - RECT rect; - rect.left = -1; rect.right = -1; rect.top = -1; rect.bottom = -1; - - if (m_hWnd) - wxFindMaxSize(m_hWnd, &rect); - - int i; - for (i = 0; i < m_noItems; i++) - wxFindMaxSize(m_radioButtons[i], &rect); - - *width = rect.right - rect.left; - *height = rect.bottom - rect.top; -} - -void wxRadioBox::GetPosition(int *x, int *y) const -{ - wxWindow *parent = GetParent(); - RECT rect; - rect.left = -1; rect.right = -1; rect.top = -1; rect.bottom = -1; - - int i; - for (i = 0; i < m_noItems; i++) - wxFindMaxSize(m_radioButtons[i], &rect); - - if (m_hWnd) - wxFindMaxSize(m_hWnd, &rect); - - // Since we now have the absolute screen coords, - // if there's a parent we must subtract its top left corner - POINT point; - point.x = rect.left; - point.y = rect.top; - if (parent) - { - ::ScreenToClient((HWND) parent->GetHWND(), &point); - } - // We may be faking the client origin. - // So a window that's really at (0, 30) may appear - // (to wxWin apps) to be at (0, 0). - if (GetParent()) - { - wxPoint pt(GetParent()->GetClientAreaOrigin()); - point.x -= pt.x; - point.y -= pt.y; - } - - *x = point.x; - *y = point.y; -} - -wxString wxRadioBox::GetLabel(void) const -{ - if (m_hWnd) - { - GetWindowText((HWND) m_hWnd, wxBuffer, 300); - return wxString(wxBuffer); - } - else return wxString(""); -} - -void wxRadioBox::SetLabel(const wxString& label) -{ - if (m_hWnd && label) - SetWindowText((HWND) m_hWnd, label); -} - -void wxRadioBox::SetFocus(void) -{ - if (m_noItems > 0) - { - if (m_selectedButton == -1) - ::SetFocus((HWND) m_radioButtons[0]); - else - ::SetFocus((HWND) m_radioButtons[m_selectedButton]); - } - -} - -bool wxRadioBox::Show(bool show) -{ - int cshow; - if (show) - cshow = SW_SHOW; - else - cshow = SW_HIDE; - if (m_hWnd) - ShowWindow((HWND) m_hWnd, cshow); - int i; - for (i = 0; i < m_noItems; i++) - ShowWindow((HWND) m_radioButtons[i], cshow); - return TRUE; -} - -// Enable a specific button -void wxRadioBox::Enable(int item, bool enable) -{ - if (item<0) - wxWindow::Enable(enable) ; - else if (item < m_noItems) - ::EnableWindow((HWND) m_radioButtons[item], enable); -} - -// Enable all controls -void wxRadioBox::Enable(bool enable) -{ - wxControl::Enable(enable); - - int i; - for (i = 0; i < m_noItems; i++) - ::EnableWindow((HWND) m_radioButtons[i], enable); -} - -// Show a specific button -void wxRadioBox::Show(int item, bool show) -{ - if (item<0) - wxRadioBox::Show(show) ; - else if (item < m_noItems) - { - int cshow; - if (show) - cshow = SW_SHOW; - else - cshow = SW_HIDE; - ShowWindow((HWND) m_radioButtons[item], cshow); - } -} - -WXHBRUSH wxRadioBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ -#if CTL3D - if ( m_useCtl3D ) - { - HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam); - return (WXHBRUSH) hbrush; - } -#endif - - if (GetParent()->GetTransparentBackground()) - SetBkMode((HDC) pDC, TRANSPARENT); - else - SetBkMode((HDC) pDC, OPAQUE); - - ::SetBkColor((HDC) pDC, RGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue())); - ::SetTextColor((HDC) pDC, RGB(GetForegroundColour().Red(), GetForegroundColour().Green(), GetForegroundColour().Blue())); - - wxBrush *backgroundBrush = wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID); - - // Note that this will be cleaned up in wxApp::OnIdle, if backgroundBrush - // has a zero usage count. -// backgroundBrush->RealizeResource(); - return (WXHBRUSH) backgroundBrush->GetResourceHandle(); -} - -// For single selection items only -wxString wxRadioBox::GetStringSelection (void) const -{ - int sel = GetSelection (); - if (sel > -1) - return this->GetString (sel); - else - return wxString(""); -} - -bool wxRadioBox::SetStringSelection (const wxString& s) -{ - int sel = FindString (s); - if (sel > -1) - { - SetSelection (sel); - return TRUE; - } - else - return FALSE; -} - -bool wxRadioBox::ContainsHWND(WXHWND hWnd) const -{ - int i; - for (i = 0; i < Number(); i++) - if (GetRadioButtons()[i] == hWnd) - return TRUE; - return FALSE; -} - -void wxRadioBox::Command (wxCommandEvent & event) -{ - SetSelection (event.m_commandInt); - ProcessCommand (event); -} - -long wxRadioBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) -{ - if (nMsg == WM_NCHITTEST) - { - int xPos = LOWORD(lParam); // horizontal position of cursor - int yPos = HIWORD(lParam); // vertical position of cursor - - ScreenToClient(&xPos, &yPos); - - // Make sure you can drag by the top of the groupbox, but let - // other (enclosed) controls get mouse events also - if (yPos < 10) - return (long)HTCLIENT; - } - - return wxControl::MSWWindowProc(nMsg, wParam, lParam); -} - diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp deleted file mode 100644 index 47783bcd87..0000000000 --- a/src/msw/radiobut.cpp +++ /dev/null @@ -1,246 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: radiobut.cpp -// Purpose: wxRadioButton -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "radiobut.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/setup.h" -#include "wx/radiobut.h" -#endif - -#include "wx/msw/private.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl) -// IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton) -#endif - -bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - - if (parent) parent->AddChild(this); - - SetBackgroundColour(parent->GetDefaultBackgroundColour()); - SetForegroundColour(parent->GetDefaultForegroundColour()); - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - m_windowStyle = style ; - - long groupStyle = 0; - if (m_windowStyle & wxRB_GROUP) - groupStyle = WS_GROUP; - -// long msStyle = groupStyle | RADIO_FLAGS; - long msStyle = groupStyle | BS_RADIOBUTTON | WS_CHILD | WS_VISIBLE ; - - bool want3D; - WXDWORD exStyle = Determine3DEffects(0, &want3D) ; - - // Even with extended styles, need to combine with WS_BORDER - // for them to look right. - if (want3D && ((m_windowStyle & wxSIMPLE_BORDER) || (m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSUNKEN_BORDER) || (m_windowStyle & wxDOUBLE_BORDER))) - msStyle |= WS_BORDER; - - m_hWnd = (WXHWND) CreateWindowEx(exStyle, RADIO_CLASS, (const char *)label, - msStyle,0,0,0,0, - (HWND) parent->GetHWND(), (HMENU)m_windowId, wxGetInstance(), NULL); -#if CTL3D - if (want3D) - { - Ctl3dSubclassCtl((HWND) m_hWnd); - m_useCtl3D = TRUE; - } -#endif - - SetFont(* parent->GetFont()); - - // Subclass again for purposes of dialog editing mode - SubclassWin((WXHWND)m_hWnd); - -// SetValue(value); - - // start GRW fix - if (label != "") - { - int label_width, label_height; - GetTextExtent(label, &label_width, &label_height, NULL, NULL, GetFont()); - if (width < 0) - width = (int)(label_width + RADIO_SIZE); - if (height<0) - { - height = (int)(label_height); - if (height < RADIO_SIZE) - height = RADIO_SIZE; - } - } - else - { - if (width < 0) - width = RADIO_SIZE; - if (height < 0) - height = RADIO_SIZE; - } - // end GRW fix - - SetSize(x, y, width, height); - - return TRUE; -} - - -void wxRadioButton::SetLabel(const wxString& label) -{ - SetWindowText((HWND) GetHWND(), (const char *)label); -} - -void wxRadioButton::SetValue(bool value) -{ -// Following necessary for Win32s, because Win32s translate BM_SETCHECK - SendMessage((HWND) GetHWND(), BM_SETCHECK, (WPARAM)value, 0L); -} - -// Get single selection, for single choice list items -bool wxRadioButton::GetValue(void) const -{ - return (SendMessage((HWND) GetHWND(), BM_SETCHECK, 0, 0L) != 0); -} - -WXHBRUSH wxRadioButton::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ -#if CTL3D - if ( m_useCtl3D ) - { - HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam); - return (WXHBRUSH) hbrush; - } -#endif - - if (GetParent()->GetTransparentBackground()) - SetBkMode((HDC) pDC, TRANSPARENT); - else - SetBkMode((HDC) pDC, OPAQUE); - - ::SetBkColor((HDC) pDC, RGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue())); - ::SetTextColor((HDC) pDC, RGB(GetForegroundColour().Red(), GetForegroundColour().Green(), GetForegroundColour().Blue())); - - wxBrush *backgroundBrush = wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID); - - // Note that this will be cleaned up in wxApp::OnIdle, if backgroundBrush - // has a zero usage count. -// backgroundBrush->RealizeResource(); - return (WXHBRUSH) backgroundBrush->GetResourceHandle(); -} - -void wxRadioButton::Command (wxCommandEvent & event) -{ - SetValue ( (event.m_commandInt != 0) ); - ProcessCommand (event); -} - - -// Not implemented -#if 0 -bool wxBitmapRadioButton::Create(wxWindow *parent, wxWindowID id, - const wxBitmap *bitmap, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - - if (parent) parent->AddChild(this); - SetBackgroundColour(parent->GetDefaultBackgroundColour()); - SetForegroundColour(parent->GetDefaultForegroundColour()); - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - m_windowStyle = style ; - - long groupStyle = 0; - if (m_windowStyle & wxRB_GROUP) - groupStyle = WS_GROUP; - -// long msStyle = groupStyle | RADIO_FLAGS; - long msStyle = groupStyle | BS_RADIOBUTTON | WS_CHILD | WS_VISIBLE ; - - m_hWnd = (WXHWND) CreateWindowEx(MakeExtendedStyle(m_windowStyle), RADIO_CLASS, "toggle", - msStyle,0,0,0,0, - (HWND) parent->GetHWND(), (HMENU)m_windowId, wxGetInstance(), NULL); -#if CTL3D - if (!(GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS)) - { - Ctl3dSubclassCtl((HWND) GetHWND()); - m_useCtl3D = TRUE; - } -#endif - - // Subclass again for purposes of dialog editing mode - SubclassWin(GetHWND()); - - SetSize(x, y, width, height); - - return TRUE; -} - -void wxBitmapRadioButton::SetLabel(const wxBitmap *bitmap) -{ -} - -void wxBitmapRadioButton::SetValue(bool value) -{ -// Following necessary for Win32s, because Win32s translate BM_SETCHECK - SendMessage((HWND) GetHWND(), BM_SETCHECK, (WPARAM)value, 0L); -} - -// Get single selection, for single choice list items -bool wxBitmapRadioButton::GetValue(void) const -{ - return (bool)SendMessage((HWND) GetHWND(), BM_GETCHECK, 0, 0L); -} - -#endif diff --git a/src/msw/regconf.cpp b/src/msw/regconf.cpp deleted file mode 100644 index 22743d41a0..0000000000 --- a/src/msw/regconf.cpp +++ /dev/null @@ -1,481 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: msw/regconf.cpp -// Purpose: -// Author: Vadim Zeitlin -// Modified by: -// Created: 27.04.98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "regconf.h" -#endif - -// ============================================================================ -// declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- - -#ifdef __GNUG__ - #pragma implementation "regconf.h" -#endif - -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif //__BORLANDC__ - -#ifndef WX_PRECOMP - #include -#endif //WX_PRECOMP - -#include -#include -#include -#include -#include - -// ---------------------------------------------------------------------------- -// constants -// ---------------------------------------------------------------------------- - -// we put our data in HKLM\SOFTWARE_KEY\appname -#define SOFTWARE_KEY wxString("Software\\") - -// ---------------------------------------------------------------------------- -// global functions -// ---------------------------------------------------------------------------- - -// get the value if the key is opened and it exists -bool TryGetValue(const wxRegKey& key, const wxString& str, wxString& strVal) -{ - return key.IsOpened() && key.HasValue(str) && key.QueryValue(str, strVal); -} - -bool TryGetValue(const wxRegKey& key, const wxString& str, long *plVal) -{ - return key.IsOpened() && key.HasValue(str) && key.QueryValue(str, plVal); -} - -// ============================================================================ -// implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// ctor/dtor -// ---------------------------------------------------------------------------- - -#if 0 -wxRegConfig::wxRegConfig(const wxString& strRoot) - : m_keyLocalRoot(wxRegKey::HKCU, SOFTWARE_KEY + strRoot), - m_keyLocal(m_keyLocalRoot, ""), - m_keyGlobalRoot(wxRegKey::HKLM, SOFTWARE_KEY + strRoot), - m_keyGlobal(m_keyGlobalRoot, "") -{ - // Create() will Open() if key already exists - m_keyLocalRoot.Create(); - - // as it's the same key, Open() shouldn't fail (i.e. no need for Create()) - m_keyLocal.Open(); - - wxLogNull nolog; - m_keyGlobalRoot.Open(); -} -#endif - -// TODO: vendor name is ignored, because we can't yet do the test for optional vendor -// name in the constructor body. We need a wxRegKey::Set that takes the same -// args as the constructor. Then we'll set m_keyLocalRoot etc. in the constructor body. - -wxRegConfig::wxRegConfig(const wxString& appName, const wxString& vendorName, - const wxString& strLocal, const wxString& strGlobal, long style) - : wxConfigBase(appName, vendorName, strLocal, strGlobal, style), - - m_keyLocalRoot(wxRegKey::HKCU, SOFTWARE_KEY + appName), - m_keyLocal(m_keyLocalRoot, ""), - m_keyGlobalRoot(wxRegKey::HKLM, SOFTWARE_KEY + appName), - m_keyGlobal(m_keyGlobalRoot, "") -{ - // TODO: really, we should check and supply an app name if one isn't supplied. - // Unfortunately I don't know how to initialise the member wxRegKey - // variables from within the constructor body. -- JACS - // Vadim - we just need an implementation of wxRegKey::Set, - // and then we can uncomment this and remove the constructor lines above. -/* - wxString strRoot(appName); - if (appName.IsEmpty() && wxTheApp) - { - strRoot = wxTheApp->GetAppName(); - } - wxASSERT( !strRoot.IsEmpty() ); - - if (!vendorName.IsEmpty()) - { - strRoot += "\\"; - strRoot += vendorName; - } - - m_keyLocalRoot.Set(wxRegKey::HKCU, SOFTWARE_KEY + strRoot), - m_keyLocal.Set(m_keyLocalRoot, ""), - - m_keyGlobalRoot.Set(wxRegKey::HKLM, SOFTWARE_KEY + strRoot), - m_keyGlobal.Set(m_keyGlobalRoot, "") -*/ - - // Create() will Open() if key already exists - m_keyLocalRoot.Create(); - - // as it's the same key, Open() shouldn't fail (i.e. no need for Create()) - m_keyLocal.Open(); - - wxLogNull nolog; - m_keyGlobalRoot.Open(); - -} - -wxRegConfig::~wxRegConfig() -{ - // nothing to do - key will be closed in their dtors -} - -// ---------------------------------------------------------------------------- -// path management -// ---------------------------------------------------------------------------- -void wxRegConfig::SetPath(const wxString& strPath) -{ - wxArrayString aParts; - - // because GetPath() returns "" when we're at root, we must understand - // empty string as "/" - if ( strPath.IsEmpty() || (strPath[0] == wxCONFIG_PATH_SEPARATOR) ) { - // absolute path - wxSplitPath(aParts, strPath); - } - else { - // relative path, combine with current one - wxString strFullPath = GetPath(); - strFullPath << wxCONFIG_PATH_SEPARATOR << strPath; - wxSplitPath(aParts, strFullPath); - } - - // recombine path parts in one variable - wxString strRegPath; - m_strPath.Empty(); - for ( size_t n = 0; n < aParts.Count(); n++ ) { - strRegPath << '\\' << aParts[n]; - m_strPath << wxCONFIG_PATH_SEPARATOR << aParts[n]; - } - - // change current key(s) - m_keyLocal.SetName(m_keyLocalRoot, strRegPath); - m_keyGlobal.SetName(m_keyGlobalRoot, strRegPath); - m_keyLocal.Create(); - - wxLogNull nolog; - m_keyGlobal.Open(); -} - -// ---------------------------------------------------------------------------- -// enumeration (works only with current group) -// ---------------------------------------------------------------------------- - -/* - We want to enumerate all local keys/values after the global ones, but, of - course, we don't want to repeat a key which appears locally as well as - globally twice. - - We use the 15th bit of lIndex for distinction between global and local. - */ - -#define LOCAL_MASK 0x8000 -#define IS_LOCAL_INDEX(l) (((l) & LOCAL_MASK) != 0) - -bool wxRegConfig::GetFirstGroup(wxString& str, long& lIndex) const -{ - lIndex = 0; - return GetNextGroup(str, lIndex); -} - -bool wxRegConfig::GetNextGroup(wxString& str, long& lIndex) const -{ - // are we already enumerating local entries? - if ( m_keyGlobal.IsOpened() && !IS_LOCAL_INDEX(lIndex) ) { - // try to find a global entry which doesn't appear locally - do { - if ( !m_keyGlobal.GetNextKey(str, lIndex) ) { - // no more global entries - lIndex |= LOCAL_MASK; - break; - } - } while( m_keyLocal.HasSubKey(str) ); - } - - // much easier with local entries: get the next one we find - // (don't forget to clear our flag bit and set it again later) - lIndex &= ~LOCAL_MASK; - bool bOk = m_keyLocal.GetNextKey(str, lIndex); - lIndex |= LOCAL_MASK; - - return bOk; -} - -bool wxRegConfig::GetFirstEntry(wxString& str, long& lIndex) const -{ - lIndex = 0; - return GetNextEntry(str, lIndex); -} - -bool wxRegConfig::GetNextEntry(wxString& str, long& lIndex) const -{ - // are we already enumerating local entries? - if ( m_keyGlobal.IsOpened() && !IS_LOCAL_INDEX(lIndex) ) { - // try to find a global entry which doesn't appear locally - do { - if ( !m_keyGlobal.GetNextValue(str, lIndex) ) { - // no more global entries - lIndex |= LOCAL_MASK; - break; - } - } while( m_keyLocal.HasValue(str) ); - } - - // much easier with local entries: get the next one we find - // (don't forget to clear our flag bit and set it again later) - lIndex &= ~LOCAL_MASK; - bool bOk = m_keyLocal.GetNextValue(str, lIndex); - lIndex |= LOCAL_MASK; - - return bOk; -} - -size_t wxRegConfig::GetNumberOfEntries(bool bRecursive) const -{ - size_t nEntries = 0; - - // dummy vars - wxString str; - long l; - bool bCont = ((wxRegConfig*)this)->GetFirstEntry(str, l); - while ( bCont ) { - nEntries++; - - bCont = ((wxRegConfig*)this)->GetNextEntry(str, l); - } - - return nEntries; -} - -size_t wxRegConfig::GetNumberOfGroups(bool bRecursive) const -{ - size_t nGroups = 0; - - // dummy vars - wxString str; - long l; - bool bCont = ((wxRegConfig*)this)->GetFirstGroup(str, l); - while ( bCont ) { - nGroups++; - - bCont = ((wxRegConfig*)this)->GetNextGroup(str, l); - } - - return nGroups; -} - -// ---------------------------------------------------------------------------- -// tests for existence -// ---------------------------------------------------------------------------- - -bool wxRegConfig::HasGroup(const wxString& strName) const -{ - return m_keyLocal.HasSubKey(strName) || m_keyGlobal.HasSubKey(strName); -} - -bool wxRegConfig::HasEntry(const wxString& strName) const -{ - return m_keyLocal.HasValue(strName) || m_keyGlobal.HasValue(strName); -} - -// ---------------------------------------------------------------------------- -// reading/writing -// ---------------------------------------------------------------------------- - -bool wxRegConfig::Read(const wxString& key, wxString *pStr) const -{ - wxConfigPathChanger path(this, key); - - bool bQueryGlobal = TRUE; - - // if immutable key exists in global key we must check that it's not - // overriden by the local key with the same name - if ( IsImmutable(path.Name()) ) { - if ( TryGetValue(m_keyGlobal, path.Name(), *pStr) ) { - if ( m_keyLocal.HasValue(path.Name()) ) { - wxLogWarning("User value for immutable key '%s' ignored.", - path.Name().c_str()); - } - *pStr = wxConfigBase::ExpandEnvVars(*pStr); - return TRUE; - } - else { - // don't waste time - it's not there anyhow - bQueryGlobal = FALSE; - } - } - - // first try local key - if ( TryGetValue(m_keyLocal, path.Name(), *pStr) || - (bQueryGlobal && TryGetValue(m_keyGlobal, path.Name(), *pStr)) ) { - // nothing to do - - // TODO: do we return TRUE? Not in original implementation, - // but I don't see why not. -- JACS - *pStr = wxConfigBase::ExpandEnvVars(*pStr); - return TRUE; - } - - return FALSE; -} - -bool wxRegConfig::Read(const wxString& key, wxString *pStr, - const wxString& szDefault) const -{ - wxConfigPathChanger path(this, key); - - bool bQueryGlobal = TRUE; - - // if immutable key exists in global key we must check that it's not - // overriden by the local key with the same name - if ( IsImmutable(path.Name()) ) { - if ( TryGetValue(m_keyGlobal, path.Name(), *pStr) ) { - if ( m_keyLocal.HasValue(path.Name()) ) { - wxLogWarning("User value for immutable key '%s' ignored.", - path.Name().c_str()); - } - - return TRUE; - } - else { - // don't waste time - it's not there anyhow - bQueryGlobal = FALSE; - } - } - - // first try local key - if ( TryGetValue(m_keyLocal, path.Name(), *pStr) || - (bQueryGlobal && TryGetValue(m_keyGlobal, path.Name(), *pStr)) ) { - *pStr = wxConfigBase::ExpandEnvVars(*pStr); - return TRUE; - } - else { - if ( IsRecordingDefaults() ) { - ((wxRegConfig*)this)->Write(key, szDefault); - } - - // default value - *pStr = szDefault; - } - - *pStr = wxConfigBase::ExpandEnvVars(*pStr); - - return FALSE; -} - -bool wxRegConfig::Read(const wxString& key, long *plResult) const -{ - wxConfigPathChanger path(this, key); - - bool bQueryGlobal = TRUE; - - // if immutable key exists in global key we must check that it's not - // overriden by the local key with the same name - if ( IsImmutable(path.Name()) ) { - if ( TryGetValue(m_keyGlobal, path.Name(), plResult) ) { - if ( m_keyLocal.HasValue(path.Name()) ) { - wxLogWarning("User value for immutable key '%s' ignored.", - path.Name().c_str()); - } - - return TRUE; - } - else { - // don't waste time - it's not there anyhow - bQueryGlobal = FALSE; - } - } - - // first try local key - if ( TryGetValue(m_keyLocal, path.Name(), plResult) || - (bQueryGlobal && TryGetValue(m_keyGlobal, path.Name(), plResult)) ) { - return TRUE; - } - return FALSE; -} - -bool wxRegConfig::Write(const wxString& key, const wxString& szValue) -{ - wxConfigPathChanger path(this, key); - - if ( IsImmutable(path.Name()) ) { - wxLogError("Can't change immutable entry '%s'.", path.Name().c_str()); - return FALSE; - } - - return m_keyLocal.SetValue(path.Name(), szValue); -} - -bool wxRegConfig::Write(const wxString& key, long lValue) -{ - wxConfigPathChanger path(this, key); - - if ( IsImmutable(path.Name()) ) { - wxLogError("Can't change immutable entry '%s'.", path.Name().c_str()); - return FALSE; - } - - return m_keyLocal.SetValue(path.Name(), lValue); -} - -// ---------------------------------------------------------------------------- -// deleting -// ---------------------------------------------------------------------------- -bool wxRegConfig::DeleteEntry(const wxString& value, bool bGroupIfEmptyAlso) -{ - wxConfigPathChanger path(this, value); - - if ( !m_keyLocal.DeleteValue(path.Name()) ) - return FALSE; - - if ( !m_keyLocal.HasSubkeys() ) { - wxString strKey = GetPath().Right(wxCONFIG_PATH_SEPARATOR); - SetPath(".."); // changes m_keyLocal - return m_keyLocal.DeleteKey(strKey); - } - - return TRUE; -} - -bool wxRegConfig::DeleteGroup(const wxString& key) -{ - wxConfigPathChanger path(this, key); - - return m_keyLocal.DeleteKey(path.Name()); -} - -bool wxRegConfig::DeleteAll() -{ - m_keyLocal.Close(); - m_keyGlobal.Close(); - - bool bOk = m_keyLocalRoot.DeleteSelf(); - if ( bOk ) - bOk = m_keyGlobalRoot.DeleteSelf(); - - return bOk; -} diff --git a/src/msw/region.cpp b/src/msw/region.cpp deleted file mode 100644 index dc55e46bff..0000000000 --- a/src/msw/region.cpp +++ /dev/null @@ -1,417 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// File: region.cpp -// Purpose: Region handling for wxWindows/X11 -// Author: Markus Holzem -// Created: Fri Oct 24 10:46:34 MET 1997 -// RCS-ID: $Id$ -// Copyright: (c) 1997 Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "region.h" -#endif - -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include "wx/msw/region.h" -#include "wx/gdicmn.h" - -#include - -#if !USE_SHARED_LIBRARY - IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject) - IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator, wxObject) -#endif - -//----------------------------------------------------------------------------- -// wxRegionRefData implementation -//----------------------------------------------------------------------------- - -class WXDLLEXPORT wxRegionRefData : public wxGDIRefData { -public: - wxRegionRefData(void) - { - m_region = 0; - } - - wxRegionRefData(const wxRegionRefData& data) - { -#if defined(__WIN32__) - DWORD noBytes = ::GetRegionData(data.m_region, 0, NULL); - RGNDATA *rgnData = (RGNDATA*) new char[noBytes]; - ::GetRegionData(data.m_region, noBytes, rgnData); - m_region = ::ExtCreateRegion(NULL, noBytes, rgnData); - delete[] (char*) rgnData; -#else - RECT rect; - ::GetRgnBox(data.m_region, &rect); - m_region = ::CreateRectRgnIndirect(&rect); -#endif - } - - ~wxRegionRefData(void) - { - ::DeleteObject(m_region); - m_region = 0; - } - - HRGN m_region; -}; - -#define M_REGION (((wxRegionRefData*)m_refData)->m_region) - -//----------------------------------------------------------------------------- -// wxRegion -//----------------------------------------------------------------------------- - -/*! - * Create an empty region. - */ -wxRegion::wxRegion(void) -{ - m_refData = new wxRegionRefData; - M_REGION = ::CreateRectRgn(0, 0, 0, 0); -} - -wxRegion::wxRegion(WXHRGN hRegion) -{ - m_refData = new wxRegionRefData; - M_REGION = (HRGN) hRegion; -} - -wxRegion::wxRegion(long x, long y, long w, long h) -{ - m_refData = new wxRegionRefData; - M_REGION = ::CreateRectRgn(x, y, x + w, y + h); -} - -wxRegion::wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight) -{ - m_refData = new wxRegionRefData; - M_REGION = ::CreateRectRgn(topLeft.x, topLeft.y, bottomRight.x, bottomRight.y); -} - -wxRegion::wxRegion(const wxRect& rect) -{ - m_refData = new wxRegionRefData; - M_REGION = ::CreateRectRgn(rect.GetLeft(), rect.GetTop(), rect.GetRight(), rect.GetBottom()); -} - -/*! - * Destroy the region. - */ -wxRegion::~wxRegion(void) -{ - // m_refData unrefed in ~wxObject -} - -//----------------------------------------------------------------------------- -//# Modify region -//----------------------------------------------------------------------------- - -//! Clear current region -void wxRegion::Clear(void) -{ - UnRef(); -} - -//! Combine rectangle (x, y, w, h) with this. -bool wxRegion::Combine(long x, long y, long width, long height, wxRegionOp op) -{ - // Don't change shared data - if (!m_refData) { - m_refData = new wxRegionRefData(); - } else if (m_refData->GetRefCount() > 1) { - wxRegionRefData* ref = (wxRegionRefData*)m_refData; - UnRef(); - m_refData = new wxRegionRefData(*ref); - } - // If ref count is 1, that means it's 'ours' anyway so no action. - - HRGN rectRegion = ::CreateRectRgn(x, y, x + width, y + height); - - int mode = 0; - switch (op) - { - case wxRGN_AND: mode = RGN_AND; break ; - case wxRGN_OR: mode = RGN_OR; break ; - case wxRGN_XOR: mode = RGN_XOR; break ; - case wxRGN_DIFF: mode = RGN_DIFF; break ; - case wxRGN_COPY: - default: - mode = RGN_COPY; break ; - } - - bool success = (ERROR != ::CombineRgn(M_REGION, M_REGION, rectRegion, mode)); - - ::DeleteObject(rectRegion); - - return success; -} - -//! Union /e region with this. -bool wxRegion::Combine(const wxRegion& region, wxRegionOp op) -{ - if (region.Empty()) - return FALSE; - - // Don't change shared data - if (!m_refData) { - m_refData = new wxRegionRefData(); - } else if (m_refData->GetRefCount() > 1) { - wxRegionRefData* ref = (wxRegionRefData*)m_refData; - UnRef(); - m_refData = new wxRegionRefData(*ref); - } - - int mode = 0; - switch (op) - { - case wxRGN_AND: mode = RGN_AND; break ; - case wxRGN_OR: mode = RGN_OR; break ; - case wxRGN_XOR: mode = RGN_XOR; break ; - case wxRGN_DIFF: mode = RGN_DIFF; break ; - case wxRGN_COPY: - default: - mode = RGN_COPY; break ; - } - - return (ERROR != ::CombineRgn(M_REGION, M_REGION, ((wxRegionRefData*)region.m_refData)->m_region, mode)); -} - -bool wxRegion::Combine(const wxRect& rect, wxRegionOp op) -{ - return Combine(rect.GetLeft(), rect.GetTop(), rect.GetWidth(), rect.GetHeight(), op); -} - -//----------------------------------------------------------------------------- -//# Information on region -//----------------------------------------------------------------------------- - -// Outer bounds of region -void wxRegion::GetBox(long& x, long& y, long&w, long &h) const -{ - if (m_refData) { - RECT rect; - ::GetRgnBox(M_REGION, & rect); - x = rect.left; - y = rect.top; - w = rect.right - rect.left; - h = rect.bottom - rect.top; - } else { - x = y = w = h = 0; - } -} - -wxRect wxRegion::GetBox(void) const -{ - long x, y, w, h; - GetBox(x, y, w, h); - return wxRect(x, y, w, h); -} - -// Is region empty? -bool wxRegion::Empty(void) const -{ - if (M_REGION == 0) - return TRUE; - long x, y, w, h; - GetBox(x, y, w, h); - - return ((w == 0) && (h == 0)); -} - -//----------------------------------------------------------------------------- -//# Tests -//----------------------------------------------------------------------------- - -// Does the region contain the point (x,y)? -wxRegionContain wxRegion::Contains(long x, long y) const -{ - if (!m_refData) - return wxOutRegion; - - if (::PtInRegion(M_REGION, (int) x, (int) y)) - return wxInRegion; - else - return wxOutRegion; -} - -// Does the region contain the point pt? -wxRegionContain wxRegion::Contains(const wxPoint& pt) const -{ - if (!m_refData) - return wxOutRegion; - - if (::PtInRegion(M_REGION, (int) pt.x, (int) pt.y)) - return wxInRegion; - else - return wxOutRegion; -} - -// Does the region contain the rectangle (x, y, w, h)? -wxRegionContain wxRegion::Contains(long x, long y, long w, long h) const -{ - if (!m_refData) - return wxOutRegion; - - RECT rect; - rect.left = x; - rect.top = y; - rect.right = x + w; - rect.bottom = y + h; - - if (::RectInRegion(M_REGION, & rect)) - return wxInRegion; - else - return wxOutRegion; -} - -// Does the region contain the rectangle rect -wxRegionContain wxRegion::Contains(const wxRect& rect) const -{ - if (!m_refData) - return wxOutRegion; - - long x, y, w, h; - x = rect.x; - y = rect.y; - w = rect.GetWidth(); - h = rect.GetHeight(); - return Contains(x, y, w, h); -} - -/////////////////////////////////////////////////////////////////////////////// -// // -// wxRegionIterator // -// // -/////////////////////////////////////////////////////////////////////////////// - -/*! - * Initialize empty iterator - */ -wxRegionIterator::wxRegionIterator(void) : m_current(0), m_numRects(0), m_rects(NULL) -{ -} - -wxRegionIterator::~wxRegionIterator(void) -{ - if (m_rects) - delete[] m_rects; -} - -/*! - * Initialize iterator for region - */ -wxRegionIterator::wxRegionIterator(const wxRegion& region) -{ - m_rects = NULL; - - Reset(region); -} - -/*! - * Reset iterator for a new /e region. - */ -void wxRegionIterator::Reset(const wxRegion& region) -{ - m_current = 0; - m_region = region; - - if (m_rects) - delete[] m_rects; - - m_rects = NULL; - - if (m_region.Empty()) - m_numRects = 0; - else - { -#if defined(__WIN32__) - DWORD noBytes = ::GetRegionData(((wxRegionRefData*)region.m_refData)->m_region, 0, NULL); - RGNDATA *rgnData = (RGNDATA*) new char[noBytes]; - ::GetRegionData(((wxRegionRefData*)region.m_refData)->m_region, noBytes, rgnData); - - RGNDATAHEADER* header = (RGNDATAHEADER*) rgnData; - - m_rects = new wxRect[header->nCount]; - - RECT* rect = (RECT*) (rgnData + sizeof(RGNDATAHEADER)) ; - size_t i; - for (i = 0; i < header->nCount; i++) - { - m_rects[i] = wxRect(rect->left, rect->top, - rect->right - rect->left, rect->bottom - rect->top); - rect += sizeof(RECT); - } - - m_numRects = header->nCount; - - delete[] (char*) rgnData; -#else - RECT rect; - ::GetRgnBox(((wxRegionRefData*)region.m_refData)->m_region, &rect); - m_rects = new wxRect[1]; - m_rects[0].x = rect.left; - m_rects[0].y = rect.top; - m_rects[0].width = rect.right - rect.left; - m_rects[0].height = rect.bottom - rect.top; - - m_numRects = 1; -#endif - } -} - -/*! - * Increment iterator. The rectangle returned is the one after the - * incrementation. - */ -void wxRegionIterator::operator ++ (void) -{ - if (m_current < m_numRects) - ++m_current; -} - -/*! - * Increment iterator. The rectangle returned is the one before the - * incrementation. - */ -void wxRegionIterator::operator ++ (int) -{ - if (m_current < m_numRects) - ++m_current; -} - -long wxRegionIterator::GetX(void) const -{ - if (m_current < m_numRects) - return m_rects[m_current].x; - return 0; -} - -long wxRegionIterator::GetY(void) const -{ - if (m_current < m_numRects) - return m_rects[m_current].y; - return 0; -} - -long wxRegionIterator::GetW(void) const -{ - if (m_current < m_numRects) - return m_rects[m_current].width ; - return 0; -} - -long wxRegionIterator::GetH(void) const -{ - if (m_current < m_numRects) - return m_rects[m_current].height; - return 0; -} - diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp deleted file mode 100644 index b2650bcb6b..0000000000 --- a/src/msw/registry.cpp +++ /dev/null @@ -1,935 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: msw/registry.cpp -// Purpose: implementation of registry classes and functions -// Author: Vadim Zeitlin -// Modified by: -// Created: 03.04.98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -// TODO: - parsing of registry key names -// - support of other (than REG_SZ/REG_DWORD) registry types -// - add high level functions (RegisterOleServer, ...) -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- - -// for compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -// other wxWindows headers -#include "wx/string.h" -#include "wx/intl.h" -#include "wx/log.h" - -#include "wx/config.h" // for wxExpandEnvVars - -// Windows headers -/* -#define STRICT -#define WIN32_LEAN_AND_MEAN -*/ - -#include - -// other std headers -#include // for _MAX_PATH - -#ifndef _MAX_PATH - #define _MAX_PATH 512 -#endif - -// our header -#define HKEY_DEFINED // already defined in windows.h -#include "wx/msw/registry.h" - -// some registry functions don't like signed chars -typedef unsigned char *RegString; - -// ---------------------------------------------------------------------------- -// constants -// ---------------------------------------------------------------------------- - -// the standard key names, short names and handles all bundled together for -// convenient access -static struct -{ - HKEY hkey; - const char *szName; - const char *szShortName; -} -aStdKeys[] = -{ - { HKEY_CLASSES_ROOT, "HKEY_CLASSES_ROOT", "HKCR" }, -#ifdef __WIN32__ - { HKEY_CURRENT_USER, "HKEY_CURRENT_USER", "HKCU" }, - { HKEY_LOCAL_MACHINE, "HKEY_LOCAL_MACHINE", "HKLM" }, - { HKEY_USERS, "HKEY_USERS", "HKU" }, // short name? - { HKEY_PERFORMANCE_DATA, "HKEY_PERFORMANCE_DATA", "HKPD" }, -#if WINVER >= 0x0400 - { HKEY_CURRENT_CONFIG, "HKEY_CURRENT_CONFIG", "HKCC" }, -#ifndef __GNUWIN32__ - { HKEY_DYN_DATA, "HKEY_DYN_DATA", "HKDD" }, // short name? -#endif //GNUWIN32 -#endif //WINVER >= 4.0 -#endif //WIN32 -}; - -// the registry name separator (perhaps one day MS will change it to '/' ;-) -#define REG_SEPARATOR '\\' - -// useful for Windows programmers: makes somewhat more clear all these zeroes -// being passed to Windows APIs -#define RESERVED (NULL) - -// ---------------------------------------------------------------------------- -// macros -// ---------------------------------------------------------------------------- -// @ const_cast<> is not yet supported by all compilers -#define CONST_CAST ((wxRegKey *)this)-> - -#if !USE_MUTABLE - #define m_dwLastError CONST_CAST m_dwLastError -#endif - -// ---------------------------------------------------------------------------- -// non member functions -// ---------------------------------------------------------------------------- - -// removes the trailing backslash from the string if it has one -static inline void RemoveTrailingSeparator(wxString& str); - -// returns TRUE if given registry key exists -static bool KeyExists(WXHKEY hRootKey, const char *szKey); - -// combines value and key name (uses static buffer!) -static const char *GetFullName(const wxRegKey *pKey, - const char *szValue = NULL); - -// ============================================================================ -// implementation of wxRegKey class -// ============================================================================ - -// ---------------------------------------------------------------------------- -// static functions and variables -// ---------------------------------------------------------------------------- - -const size_t wxRegKey::nStdKeys = WXSIZEOF(aStdKeys); - -// @@ should take a `StdKey key', but as it's often going to be used in loops -// it would require casts in user code. -const char *wxRegKey::GetStdKeyName(size_t key) -{ - // return empty string if key is invalid - wxCHECK_MSG( key < nStdKeys, "", "invalid key in wxRegKey::GetStdKeyName" ); - - return aStdKeys[key].szName; -} - -const char *wxRegKey::GetStdKeyShortName(size_t key) -{ - // return empty string if key is invalid - wxCHECK( key < nStdKeys, "" ); - - return aStdKeys[key].szShortName; -} - -wxRegKey::StdKey wxRegKey::ExtractKeyName(wxString& strKey) -{ - wxString strRoot = strKey.Left(REG_SEPARATOR); - - HKEY hRootKey; - size_t ui; - for ( ui = 0; ui < nStdKeys; ui++ ) { - if ( strRoot.CmpNoCase(aStdKeys[ui].szName) == 0 || - strRoot.CmpNoCase(aStdKeys[ui].szShortName) == 0 ) { - hRootKey = aStdKeys[ui].hkey; - break; - } - } - - if ( ui == nStdKeys ) { - wxFAIL_MSG("invalid key prefix in wxRegKey::ExtractKeyName."); - - hRootKey = HKEY_CLASSES_ROOT; - } - else { - strKey = strKey.After(REG_SEPARATOR); - if ( !strKey.IsEmpty() && strKey.Last() == REG_SEPARATOR ) - strKey.Truncate(strKey.Len() - 1); - } - - return (wxRegKey::StdKey)(int)hRootKey; -} - -wxRegKey::StdKey wxRegKey::GetStdKeyFromHkey(WXHKEY hkey) -{ - for ( size_t ui = 0; ui < nStdKeys; ui++ ) { - if ( (int) aStdKeys[ui].hkey == (int) hkey ) - return (StdKey)ui; - } - - wxFAIL_MSG("non root hkey passed to wxRegKey::GetStdKeyFromHkey."); - - return HKCR; -} - -// ---------------------------------------------------------------------------- -// ctors and dtor -// ---------------------------------------------------------------------------- - -wxRegKey::wxRegKey() -{ - m_hKey = 0; - m_hRootKey = (WXHKEY) aStdKeys[HKCR].hkey; - m_dwLastError = 0; -} - -wxRegKey::wxRegKey(const wxString& strKey) : m_strKey(strKey) -{ - m_hRootKey = (WXHKEY) aStdKeys[ExtractKeyName(m_strKey)].hkey; - m_hKey = NULL; - m_dwLastError = 0; -} - -// parent is a predefined (and preopened) key -wxRegKey::wxRegKey(StdKey keyParent, const wxString& strKey) : m_strKey(strKey) -{ - RemoveTrailingSeparator(m_strKey); - m_hRootKey = (WXHKEY) aStdKeys[keyParent].hkey; - m_hKey = NULL; - m_dwLastError = 0; -} - -// parent is a normal regkey -wxRegKey::wxRegKey(const wxRegKey& keyParent, const wxString& strKey) - : m_strKey(keyParent.m_strKey) -{ - // combine our name with parent's to get the full name - if ( !m_strKey.IsEmpty() && - (strKey.IsEmpty() || strKey[0] != REG_SEPARATOR) ) { - m_strKey += REG_SEPARATOR; - } - - m_strKey += strKey; - RemoveTrailingSeparator(m_strKey); - - m_hRootKey = keyParent.m_hRootKey; - m_hKey = NULL; - m_dwLastError = 0; -} - -// dtor closes the key releasing system resource -wxRegKey::~wxRegKey() -{ - Close(); -} - -// ---------------------------------------------------------------------------- -// change the key name/hkey -// ---------------------------------------------------------------------------- - -// set the full key name -void wxRegKey::SetName(const wxString& strKey) -{ - Close(); - - m_strKey = strKey; - m_hRootKey = (WXHKEY) aStdKeys[ExtractKeyName(m_strKey)].hkey; -} - -// the name is relative to the parent key -void wxRegKey::SetName(StdKey keyParent, const wxString& strKey) -{ - Close(); - - m_strKey = strKey; - RemoveTrailingSeparator(m_strKey); - m_hRootKey = (WXHKEY) aStdKeys[keyParent].hkey; -} - -// the name is relative to the parent key -void wxRegKey::SetName(const wxRegKey& keyParent, const wxString& strKey) -{ - Close(); - - // combine our name with parent's to get the full name - m_strKey = keyParent.m_strKey; - if ( !strKey.IsEmpty() && strKey[0] != REG_SEPARATOR ) - m_strKey += REG_SEPARATOR; - m_strKey += strKey; - - RemoveTrailingSeparator(m_strKey); - - m_hRootKey = keyParent.m_hRootKey; -} - -// hKey should be opened and will be closed in wxRegKey dtor -void wxRegKey::SetHkey(WXHKEY hKey) -{ - Close(); - - m_hKey = hKey; -} - -// ---------------------------------------------------------------------------- -// info about the key -// ---------------------------------------------------------------------------- - -// returns TRUE if the key exists -bool wxRegKey::Exists() const -{ - // opened key has to exist, try to open it if not done yet - return IsOpened() ? TRUE : KeyExists(m_hRootKey, m_strKey); -} - -// returns the full name of the key (prefix is abbreviated if bShortPrefix) -wxString wxRegKey::GetName(bool bShortPrefix) const -{ - StdKey key = GetStdKeyFromHkey((StdKey) m_hRootKey); - wxString str = bShortPrefix ? aStdKeys[key].szShortName - : aStdKeys[key].szName; - if ( !m_strKey.IsEmpty() ) - str << "\\" << m_strKey; - - return str; -} - -#ifdef __GNUWIN32__ -bool wxRegKey::GetKeyInfo(size_t* pnSubKeys, - size_t* pnMaxKeyLen, - size_t* pnValues, - size_t* pnMaxValueLen) const -#else -bool wxRegKey::GetKeyInfo(ulong *pnSubKeys, - ulong *pnMaxKeyLen, - ulong *pnValues, - ulong *pnMaxValueLen) const -#endif -{ -#ifdef __WIN32__ - m_dwLastError = ::RegQueryInfoKey - ( - (HKEY) m_hKey, - NULL, // class name - NULL, // (ptr to) size of class name buffer - RESERVED, - pnSubKeys, // [out] number of subkeys - pnMaxKeyLen, // [out] max length of a subkey name - NULL, // longest subkey class name - pnValues, // [out] number of values - pnMaxValueLen, // [out] max length of a value name - NULL, // longest value data - NULL, // security descriptor - NULL // time of last modification - ); - - if ( m_dwLastError != ERROR_SUCCESS ) { - wxLogSysError(m_dwLastError, _("can't get info about registry key '%s'"), - GetName().c_str()); - return FALSE; - } - else - return TRUE; -#else // Win16 - wxFAIL_MSG("GetKeyInfo() not implemented"); - - return FALSE; -#endif -} - -// ---------------------------------------------------------------------------- -// operations -// ---------------------------------------------------------------------------- - -// opens key (it's not an error to call Open() on an already opened key) -bool wxRegKey::Open() -{ - if ( IsOpened() ) - return TRUE; - - HKEY tmpKey; - m_dwLastError = RegOpenKey((HKEY) m_hRootKey, m_strKey, &tmpKey); - if ( m_dwLastError != ERROR_SUCCESS ) { - wxLogSysError(m_dwLastError, _("can't open registry key '%s'"), - GetName().c_str()); - return FALSE; - } - else - { - m_hKey = (WXHKEY) tmpKey; - return TRUE; - } -} - -// creates key, failing if it exists and !bOkIfExists -bool wxRegKey::Create(bool bOkIfExists) -{ - // check for existence only if asked (i.e. order is important!) - if ( !bOkIfExists && Exists() ) { - return FALSE; - } - - if ( IsOpened() ) - return TRUE; - - HKEY tmpKey; - m_dwLastError = RegCreateKey((HKEY) m_hRootKey, m_strKey, &tmpKey); - if ( m_dwLastError != ERROR_SUCCESS ) { - wxLogSysError(m_dwLastError, _("can't create registry key '%s'"), - GetName().c_str()); - return FALSE; - } - else - { - m_hKey = (WXHKEY) tmpKey; - return TRUE; - } -} - -// close the key, it's not an error to call it when not opened -bool wxRegKey::Close() -{ - if ( IsOpened() ) { - m_dwLastError = RegCloseKey((HKEY) m_hKey); - if ( m_dwLastError != ERROR_SUCCESS ) { - wxLogSysError(m_dwLastError, _("can't close registry key '%s'"), - GetName().c_str()); - - m_hKey = 0; - return FALSE; - } - else { - m_hKey = 0; - } - } - - return TRUE; -} - -// ---------------------------------------------------------------------------- -// delete keys/values -// ---------------------------------------------------------------------------- -bool wxRegKey::DeleteSelf() -{ - { - wxLogNull nolog; - if ( !Open() ) { - // it already doesn't exist - ok! - return TRUE; - } - } - - // we can't delete keys while enumerating because it confuses GetNextKey, so - // we first save the key names and then delete them all - wxArrayString astrSubkeys; - - wxString strKey; - long lIndex; - bool bCont = GetFirstKey(strKey, lIndex); - while ( bCont ) { - astrSubkeys.Add(strKey); - - bCont = GetNextKey(strKey, lIndex); - } - - size_t nKeyCount = astrSubkeys.Count(); - for ( size_t nKey = 0; nKey < nKeyCount; nKey++ ) { - wxRegKey key(*this, astrSubkeys[nKey]); - if ( !key.DeleteSelf() ) - return FALSE; - } - - // now delete this key itself - Close(); - - m_dwLastError = RegDeleteKey((HKEY) m_hRootKey, m_strKey); - if ( m_dwLastError != ERROR_SUCCESS ) { - wxLogSysError(m_dwLastError, _("can't delete key '%s'"), - GetName().c_str()); - return FALSE; - } - - return TRUE; -} - -bool wxRegKey::DeleteKey(const char *szKey) -{ - if ( !Open() ) - return FALSE; - - wxRegKey key(*this, szKey); - return key.DeleteSelf(); -} - -bool wxRegKey::DeleteValue(const char *szValue) -{ - if ( !Open() ) - return FALSE; - - #ifdef __WIN32__ - m_dwLastError = RegDeleteValue((HKEY) m_hKey, szValue); - if ( m_dwLastError != ERROR_SUCCESS ) { - wxLogSysError(m_dwLastError, _("can't delete value '%s' from key '%s'"), - szValue, GetName().c_str()); - return FALSE; - } - #else //WIN16 - // named registry values don't exist in Win16 world - wxASSERT( IsEmpty(szValue) ); - - // just set the (default and unique) value of the key to "" - m_dwLastError = RegSetValue((HKEY) m_hKey, NULL, REG_SZ, "", RESERVED); - if ( m_dwLastError != ERROR_SUCCESS ) { - wxLogSysError(m_dwLastError, _("can't delete value of key '%s'"), - GetName().c_str()); - return FALSE; - } - #endif //WIN16/32 - - return TRUE; -} - -// ---------------------------------------------------------------------------- -// access to values and subkeys -// ---------------------------------------------------------------------------- - -// return TRUE if value exists -bool wxRegKey::HasValue(const char *szValue) const -{ - // this function should be silent, so suppress possible messages from Open() - wxLogNull nolog; - - #ifdef __WIN32__ - if ( CONST_CAST Open() ) { - return RegQueryValueEx((HKEY) m_hKey, szValue, RESERVED, - NULL, NULL, NULL) == ERROR_SUCCESS; - } - else - return FALSE; - #else // WIN16 - // only unnamed value exists - return IsEmpty(szValue); - #endif // WIN16/32 -} - -// returns TRUE if this key has any subkeys -bool wxRegKey::HasSubkeys() const -{ - // just call GetFirstKey with dummy parameters - wxString str; - long l; - return CONST_CAST GetFirstKey(str, l); -} - -// returns TRUE if given subkey exists -bool wxRegKey::HasSubKey(const char *szKey) const -{ - if ( CONST_CAST Open() ) - return KeyExists(m_hKey, szKey); - else - return FALSE; -} - -wxRegKey::ValueType wxRegKey::GetValueType(const char *szValue) -{ - #ifdef __WIN32__ - if ( !Open() ) - return Type_None; - - DWORD dwType; - m_dwLastError = RegQueryValueEx((HKEY) m_hKey, szValue, RESERVED, - &dwType, NULL, NULL); - if ( m_dwLastError != ERROR_SUCCESS ) { - wxLogSysError(m_dwLastError, _("can't read value of key '%s'"), - GetName().c_str()); - return Type_None; - } - - return (ValueType)dwType; - #else //WIN16 - return IsEmpty(szValue) ? Type_String : Type_None; - #endif //WIN16/32 -} - -#ifdef __WIN32__ -bool wxRegKey::SetValue(const char *szValue, long lValue) -{ - if ( CONST_CAST Open() ) { - m_dwLastError = RegSetValueEx((HKEY) m_hKey, szValue, RESERVED, REG_DWORD, - (RegString)&lValue, sizeof(lValue)); - if ( m_dwLastError == ERROR_SUCCESS ) - return TRUE; - } - - wxLogSysError(m_dwLastError, _("can't set value of '%s'"), - GetFullName(this, szValue)); - return FALSE; -} - -bool wxRegKey::QueryValue(const char *szValue, long *plValue) const -{ - if ( CONST_CAST Open() ) { - DWORD dwType, dwSize = sizeof(DWORD); - RegString pBuf = (RegString)plValue; - m_dwLastError = RegQueryValueEx((HKEY) m_hKey, szValue, RESERVED, - &dwType, pBuf, &dwSize); - if ( m_dwLastError != ERROR_SUCCESS ) { - wxLogSysError(m_dwLastError, _("can't read value of key '%s'"), - GetName().c_str()); - return FALSE; - } - else { - // check that we read the value of right type - wxASSERT_MSG( dwType == REG_DWORD, - "Type mismatch in wxRegKey::QueryValue()." ); - - return TRUE; - } - } - else - return FALSE; -} - -#endif //Win32 - -bool wxRegKey::QueryValue(const char *szValue, wxString& strValue) const -{ - if ( CONST_CAST Open() ) { - #ifdef __WIN32__ - // first get the type and size of the data - DWORD dwType, dwSize; - m_dwLastError = RegQueryValueEx((HKEY) m_hKey, szValue, RESERVED, - &dwType, NULL, &dwSize); - if ( m_dwLastError == ERROR_SUCCESS ) { - RegString pBuf = (RegString)strValue.GetWriteBuf(dwSize); - m_dwLastError = RegQueryValueEx((HKEY) m_hKey, szValue, RESERVED, - &dwType, pBuf, &dwSize); - strValue.UngetWriteBuf(); - if ( m_dwLastError == ERROR_SUCCESS ) { - // check that it was the right type - wxASSERT_MSG( dwType == REG_SZ, - "Type mismatch in wxRegKey::QueryValue()." ); - - return TRUE; - } - } - #else //WIN16 - // named registry values don't exist in Win16 - wxASSERT( IsEmpty(szValue) ); - - m_dwLastError = RegQueryValue((HKEY) m_hKey, 0, strValue.GetWriteBuf(256), &l); - strValue.UngetWriteBuf(); - if ( m_dwLastError == ERROR_SUCCESS ) - return TRUE; - #endif //WIN16/32 - } - - wxLogSysError(m_dwLastError, _("can't read value of '%s'"), - GetFullName(this, szValue)); - return FALSE; -} - -bool wxRegKey::SetValue(const char *szValue, const wxString& strValue) -{ - if ( CONST_CAST Open() ) { - #ifdef __WIN32__ - m_dwLastError = RegSetValueEx((HKEY) m_hKey, szValue, RESERVED, REG_SZ, - (RegString)strValue.c_str(), - strValue.Len() + 1); - if ( m_dwLastError == ERROR_SUCCESS ) - return TRUE; - #else //WIN16 - // named registry values don't exist in Win16 - wxASSERT( IsEmpty(szValue) ); - - m_dwLastError = RegSetValue((HKEY) m_hKey, NULL, REG_SZ, strValue, NULL); - if ( m_dwLastError == ERROR_SUCCESS ) - return TRUE; - #endif //WIN16/32 - } - - wxLogSysError(m_dwLastError, _("can't set value of '%s'"), - GetFullName(this, szValue)); - return FALSE; -} - -wxRegKey::operator wxString() const -{ - wxString str; - QueryValue(NULL, str); - return str; -} - -// ---------------------------------------------------------------------------- -// enumeration -// NB: all these functions require an index variable which allows to have -// several concurrently running indexations on the same key -// ---------------------------------------------------------------------------- - -bool wxRegKey::GetFirstValue(wxString& strValueName, long& lIndex) -{ - if ( !Open() ) - return FALSE; - - lIndex = 0; - return GetNextValue(strValueName, lIndex); -} - -bool wxRegKey::GetNextValue(wxString& strValueName, long& lIndex) const -{ - wxASSERT( IsOpened() ); - - // are we already at the end of enumeration? - if ( lIndex == -1 ) - return FALSE; - - #ifdef __WIN32__ - char szValueName[1024]; // @@ use RegQueryInfoKey... - DWORD dwValueLen = WXSIZEOF(szValueName); - - lIndex++; - m_dwLastError = RegEnumValue((HKEY) m_hKey, lIndex, - szValueName, &dwValueLen, - RESERVED, - NULL, // [out] type - NULL, // [out] buffer for value - NULL); // [i/o] it's length - - if ( m_dwLastError != ERROR_SUCCESS ) { - if ( m_dwLastError == ERROR_NO_MORE_ITEMS ) { - m_dwLastError = ERROR_SUCCESS; - lIndex = -1; - } - else { - wxLogSysError(m_dwLastError, _("can't enumerate values of key '%s'"), - GetName().c_str()); - } - - return FALSE; - } - - strValueName = szValueName; - #else //WIN16 - // only one unnamed value - wxASSERT( lIndex == 0 ); - - lIndex = -1; - strValueName.Empty(); - #endif - - return TRUE; -} - -bool wxRegKey::GetFirstKey(wxString& strKeyName, long& lIndex) -{ - if ( !Open() ) - return FALSE; - - lIndex = 0; - return GetNextKey(strKeyName, lIndex); -} - -bool wxRegKey::GetNextKey(wxString& strKeyName, long& lIndex) const -{ - wxASSERT( IsOpened() ); - - // are we already at the end of enumeration? - if ( lIndex == -1 ) - return FALSE; - - char szKeyName[_MAX_PATH + 1]; - m_dwLastError = RegEnumKey((HKEY) m_hKey, lIndex++, szKeyName, WXSIZEOF(szKeyName)); - - if ( m_dwLastError != ERROR_SUCCESS ) { - if ( m_dwLastError == ERROR_NO_MORE_ITEMS ) { - m_dwLastError = ERROR_SUCCESS; - lIndex = -1; - } - else { - wxLogSysError(m_dwLastError, _("can't enumerate subkeys of key '%s'"), - GetName().c_str()); - } - - return FALSE; - } - - strKeyName = szKeyName; - return TRUE; -} - -// ============================================================================ -// implementation of global private functions -// ============================================================================ -bool KeyExists(WXHKEY hRootKey, const char *szKey) -{ - HKEY hkeyDummy; - if ( RegOpenKey( (HKEY) hRootKey, szKey, &hkeyDummy) == ERROR_SUCCESS ) { - RegCloseKey(hkeyDummy); - return TRUE; - } - else - return FALSE; -} - -const char *GetFullName(const wxRegKey *pKey, const char *szValue) -{ - static wxString s_str; - s_str = pKey->GetName(); - if ( !IsEmpty(szValue) ) - s_str << "\\" << szValue; - - return s_str.c_str(); -} - -void RemoveTrailingSeparator(wxString& str) -{ - if ( !str.IsEmpty() && str.Last() == REG_SEPARATOR ) - str.Truncate(str.Len() - 1); -} - -// ============================================================================ -// global public functions -// ============================================================================ - -bool GetExtensionFromMimeType(wxString *pExt, const wxString& strMimeType) -{ - // @@@ VZ: I don't know of any official documentation which mentions this - // location, but as a matter of fact IE uses it, so why not we? - static const char *szMimeDbase = "MIME\\Database\\Content Type\\"; - - wxString strKey = szMimeDbase; - strKey << strMimeType; - - // suppress possible error messages - wxLogNull nolog; - wxRegKey key(wxRegKey::HKCR, strKey); - if ( key.Open() ) { - if ( key.QueryValue("Extension", *pExt) ) - return TRUE; - } - - // no such MIME type or no extension for it - return FALSE; -} - -bool GetMimeTypeFromExtension(wxString *pMimeType, const wxString& strExt) -{ - wxCHECK( !strExt.IsEmpty(), FALSE ); - - // add the leading point if necessary - wxString str; - if ( strExt[0] != '.' ) { - str = '.'; - } - str << strExt; - - // suppress possible error messages - wxLogNull nolog; - wxRegKey key(wxRegKey::HKCR, str); - if ( key.Open() ) { - if ( key.QueryValue("Content Type", *pMimeType) ) - return TRUE; - } - - // no such extension or no content-type - return FALSE; -} - -bool GetFileTypeFromExtension(wxString *pFileType, const wxString& strExt) -{ - wxCHECK( !strExt.IsEmpty(), FALSE ); - - // add the leading point if necessary - wxString str; - if ( strExt[0] != '.' ) { - str = '.'; - } - str << strExt; - - // suppress possible error messages - wxLogNull nolog; - wxRegKey key(wxRegKey::HKCR, str); - if ( key.Open() ) { - if ( key.QueryValue("", *pFileType) ) // it's the default value of the key - return TRUE; - } - - // no such extension or no value - return FALSE; -} - -bool GetFileTypeIcon(wxIcon *pIcon, const wxString& strFileType) -{ - wxCHECK( !strFileType.IsEmpty(), FALSE ); - - wxString strIconKey; - strIconKey << strFileType << REG_SEPARATOR << "DefaultIcon"; - - // suppress possible error messages - wxLogNull nolog; - wxRegKey key(wxRegKey::HKCR, strIconKey); - - if ( key.Open() ) { - wxString strIcon; - if ( key.QueryValue("", strIcon) ) { // it's the default value of the key - // the format is the following: , - // NB: icon index may be negative as well as positive and the full path - // may contain the environment variables inside '%' - wxString strFullPath = strIcon.Before(','), - strIndex = strIcon.After(','); - - // unless I misunderstand the format (may be index may be ommited, I - // don't know) - wxASSERT( !(strFullPath.IsEmpty() || strIndex.IsEmpty()) ); - - wxString strExpPath = wxExpandEnvVars(strFullPath); - int nIndex = atoi(strIndex); - - HICON hIcon = ExtractIcon(GetModuleHandle(NULL), strExpPath, nIndex); - switch ( (int)hIcon ) { - case 0: // means no icons were found - case 1: // means no such file or it wasn't a DLL/EXE/OCX/ICO/... - wxLogDebug("incorrect registry entry '%s': no such icon.", - GetFullName(&key)); - break; - - default: - pIcon->SetHICON((WXHICON)hIcon); - return TRUE; - } - } - } - - // no such file type or no value or incorrect icon entry - return FALSE; -} - -bool GetFileTypeDescription(wxString *pDesc, const wxString& strFileType) -{ - wxCHECK( !strFileType.IsEmpty(), FALSE ); - - // suppress possible error messages - wxLogNull nolog; - wxRegKey key(wxRegKey::HKCR, strFileType); - - if ( key.Open() ) { - if ( key.QueryValue("", *pDesc) ) // it's the default value of the key - return TRUE; - } - - // no such file type or no value - return FALSE; -} - - diff --git a/src/msw/scrolbar.cpp b/src/msw/scrolbar.cpp deleted file mode 100644 index 87c52ca273..0000000000 --- a/src/msw/scrolbar.cpp +++ /dev/null @@ -1,351 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: scrolbar.cpp -// Purpose: wxScrollBar -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "scrolbar.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#include "wx/utils.h" -#endif - -#include "wx/scrolbar.h" -#include "wx/msw/private.h" - -// extern wxList wxScrollBarList; -extern void wxFindMaxSize(HWND hwnd, RECT *rect); - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl) - -#if WXWIN_COMPATIBILITY -BEGIN_EVENT_TABLE(wxScrollBar, wxControl) - EVT_SCROLL(wxScrollBar::OnScroll) -END_EVENT_TABLE() -#endif - -#endif - -// Scrollbar -bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - if (!parent) - return FALSE; - parent->AddChild(this); - SetName(name); - SetValidator(validator); - - SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; - SetForegroundColour(parent->GetDefaultForegroundColour()) ; - m_windowStyle = style; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - if (width == -1) - { - if (style & wxHORIZONTAL) - width = 140; - else - width = 14; - } - if (height == -1) - { - if (style & wxVERTICAL) - height = 140; - else - height = 14; - } - - // Now create scrollbar - DWORD _direction = (style & wxHORIZONTAL) ? - SBS_HORZ: SBS_VERT; - HWND scroll_bar = CreateWindowEx(MakeExtendedStyle(style), "SCROLLBAR", "scrollbar", - _direction | WS_CHILD | WS_VISIBLE, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, - wxGetInstance(), NULL); - - m_pageSize = 1; - m_viewSize = 1; - m_objectSize = 1; - - ::SetScrollRange(scroll_bar, SB_CTL, 0, 1, FALSE); - ::SetScrollPos(scroll_bar, SB_CTL, 0, FALSE); - ShowWindow(scroll_bar, SW_SHOW); - - SetFont(* parent->GetFont()); - - m_hWnd = (WXHWND)scroll_bar; - - // Subclass again for purposes of dialog editing mode - SubclassWin((WXHWND) scroll_bar); - - SetSize(x, y, width, height); - - return TRUE; -} - -wxScrollBar::~wxScrollBar(void) -{ -} - -void wxScrollBar::MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control) -{ - int position = ::GetScrollPos((HWND) control, SB_CTL); - int minPos, maxPos; - ::GetScrollRange((HWND) control, SB_CTL, &minPos, &maxPos); -#if defined(__WIN95__) - // A page size greater than one has the effect of reducing the - // effective range, therefore the range has already been - // boosted artificially - so reduce it again. - if ( m_pageSize > 1 ) - maxPos -= (m_pageSize - 1); -#endif - - wxEventType scrollEvent = wxEVT_NULL; - - int nScrollInc; - switch ( wParam ) - { - case SB_TOP: - nScrollInc = maxPos - position; - scrollEvent = wxEVT_SCROLL_TOP; - break; - - case SB_BOTTOM: - nScrollInc = - position; - scrollEvent = wxEVT_SCROLL_BOTTOM; - break; - - case SB_LINEUP: - nScrollInc = -1; - scrollEvent = wxEVT_SCROLL_LINEUP; - break; - - case SB_LINEDOWN: - nScrollInc = 1; - scrollEvent = wxEVT_SCROLL_LINEDOWN; - break; - - case SB_PAGEUP: - nScrollInc = -GetPageSize(); - scrollEvent = wxEVT_SCROLL_PAGEUP; - break; - - case SB_PAGEDOWN: - nScrollInc = GetPageSize(); - scrollEvent = wxEVT_SCROLL_PAGEDOWN; - break; - - case SB_THUMBTRACK: - case SB_THUMBPOSITION: - nScrollInc = pos - position; - scrollEvent = wxEVT_SCROLL_THUMBTRACK; - break; - - default: - nScrollInc = 0; - } - - if (nScrollInc != 0) - { - int new_pos = position + nScrollInc; - - if (new_pos < 0) - new_pos = 0; - if (new_pos > maxPos) - new_pos = maxPos; - - SetValue(new_pos); - wxScrollEvent event(scrollEvent, m_windowId); - event.SetPosition(new_pos); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); - } -} - -void wxScrollBar::MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control) -{ - MSWOnVScroll(wParam, pos, control); -} - -void wxScrollBar::SetPosition(int viewStart) -{ -#if defined(__WIN95__) - SCROLLINFO info; - info.cbSize = sizeof(SCROLLINFO); - info.nPage = 0; - info.nMin = 0; - info.nPos = viewStart; - info.fMask = SIF_POS ; - - ::SetScrollInfo((HWND) GetHWND(), SB_CTL, &info, TRUE); -#else - ::SetScrollPos((HWND) GetHWND(), SB_CTL, viewStart, TRUE); -#endif -} - -int wxScrollBar::GetPosition(void) const -{ - return ::GetScrollPos((HWND)m_hWnd, SB_CTL); -} - -void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageSize, - bool refresh) -{ - m_viewSize = pageSize; - m_pageSize = thumbSize; - m_objectSize = range; - - // The range (number of scroll steps) is the - // object length minus the page size. - int range1 = wxMax((m_objectSize - m_pageSize), 0) ; - -#if defined(__WIN95__) - // Try to adjust the range to cope with page size > 1 - // (see comment for SetPageLength) - if ( m_pageSize > 1 ) - { - range1 += (m_pageSize - 1); - } - - SCROLLINFO info; - info.cbSize = sizeof(SCROLLINFO); - info.nPage = m_pageSize; - info.nMin = 0; - info.nMax = range1; - info.nPos = position; - - info.fMask = SIF_PAGE | SIF_RANGE | SIF_POS; - - ::SetScrollInfo((HWND) GetHWND(), SB_CTL, &info, refresh); -#else - ::SetScrollPos((HWND)m_hWnd, SB_CTL, position, TRUE); - ::SetScrollRange((HWND)m_hWnd, SB_CTL, 0, range1, TRUE); -#endif -} - - -/* From the WIN32 documentation: -In version 4.0 or later, the maximum value that a scroll bar can report -(that is, the maximum scrolling position) depends on the page size. -If the scroll bar has a page size greater than one, the maximum scrolling position -is less than the maximum range value. You can use the following formula to calculate -the maximum scrolling position: - -MaxScrollPos = MaxRangeValue - (PageSize - 1) -*/ - -#if WXWIN_COMPATIBILITY -void wxScrollBar::SetPageSize(int pageLength) -{ - m_pageSize = pageLength; - -#if defined(__WIN95__) - SCROLLINFO info; - info.cbSize = sizeof(SCROLLINFO); - info.nPage = pageLength; - info.fMask = SIF_PAGE ; - - ::SetScrollInfo((HWND) GetHWND(), SB_CTL, &info, TRUE); -#endif -} - -void wxScrollBar::SetObjectLength(int objectLength) -{ - m_objectSize = objectLength; - - // The range (number of scroll steps) is the - // object length minus the view size. - int range = wxMax((objectLength - m_viewSize), 0) ; - -#if defined(__WIN95__) - // Try to adjust the range to cope with page size > 1 - // (see comment for SetPageLength) - if ( m_pageSize > 1 ) - { - range += (m_pageSize - 1); - } - - SCROLLINFO info; - info.cbSize = sizeof(SCROLLINFO); - info.nPage = 0; - info.nMin = 0; - info.nMax = range; - info.nPos = 0; - info.fMask = SIF_RANGE ; - - ::SetScrollInfo((HWND) GetHWND(), SB_CTL, &info, TRUE); -#else - ::SetScrollRange((HWND)m_hWnd, SB_CTL, 0, range, TRUE); -#endif -} - -void wxScrollBar::SetViewLength(int viewLength) -{ - m_viewSize = viewLength; -} - -void wxScrollBar::GetValues(int *viewStart, int *viewLength, int *objectLength, - int *pageLength) const -{ - *viewStart = ::GetScrollPos((HWND)m_hWnd, SB_CTL); - *viewLength = m_viewSize; - *objectLength = m_objectSize; - *pageLength = m_pageSize; -} -#endif - -WXHBRUSH wxScrollBar::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ - return 0; -} - -void wxScrollBar::Command(wxCommandEvent& event) -{ - SetValue(event.m_commandInt); - ProcessCommand(event); -} - -#if WXWIN_COMPATIBILITY -// Backward compatibility -void wxScrollBar::OnScroll(wxScrollEvent& event) -{ - wxEventType oldEvent = event.GetEventType(); - event.SetEventType( wxEVT_COMMAND_SCROLLBAR_UPDATED ); - if ( !GetEventHandler()->ProcessEvent(event) ) - { - event.SetEventType( oldEvent ); - if (!GetParent()->GetEventHandler()->ProcessEvent(event)) - event.Skip(); - } -} -#endif diff --git a/src/msw/settings.cpp b/src/msw/settings.cpp deleted file mode 100644 index 1de9962cee..0000000000 --- a/src/msw/settings.cpp +++ /dev/null @@ -1,166 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: settings.cpp -// Purpose: wxSettings -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "settings.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/defs.h" -#include "wx/pen.h" -#include "wx/brush.h" -#include "wx/gdicmn.h" -#endif - -#include "wx/settings.h" -#include "wx/window.h" -#include "wx/msw/private.h" - -// TODO: see ::SystemParametersInfo for all sorts of Windows settings. -// Different args are required depending on the id. How does this differ -// from GetSystemMetric, and should it? Perhaps call it GetSystemParameter -// and pass an optional void* arg to get further info. -// Should also have SetSystemParameter. -// Also implement WM_WININICHANGE (NT) / WM_SETTINGCHANGE (Win95) - -wxColour wxSystemSettings::GetSystemColour(int index) -{ - COLORREF ref = ::GetSysColor(index); - wxColour col(GetRValue(ref), GetGValue(ref), GetBValue(ref)); - return col; -} - -wxFont wxSystemSettings::GetSystemFont(int index) -{ - HFONT hFont = (HFONT) ::GetStockObject(index); - if ( hFont != NULL ) - { - LOGFONT lf; - if ( ::GetObject(hFont, sizeof(LOGFONT), &lf) != 0 ) - { - // In fontdlg.cpp - return wxCreateFontFromLogFont(&lf); - } - else - { - return wxNullFont; - } - } - else - { - return wxNullFont; - } -} - -// Get a system metric, e.g. scrollbar size -int wxSystemSettings::GetSystemMetric(int index) -{ - switch ( index) - { -#ifdef __WIN32__ - case wxSYS_MOUSE_BUTTONS: - return ::GetSystemMetrics(SM_CMOUSEBUTTONS); -#endif - - case wxSYS_BORDER_X: - return ::GetSystemMetrics(SM_CXBORDER); - case wxSYS_BORDER_Y: - return ::GetSystemMetrics(SM_CYBORDER); - case wxSYS_CURSOR_X: - return ::GetSystemMetrics(SM_CXCURSOR); - case wxSYS_CURSOR_Y: - return ::GetSystemMetrics(SM_CYCURSOR); - case wxSYS_DCLICK_X: - return ::GetSystemMetrics(SM_CXDOUBLECLK); - case wxSYS_DCLICK_Y: - return ::GetSystemMetrics(SM_CYDOUBLECLK); -#ifdef __WIN32__ - case wxSYS_DRAG_X: - return ::GetSystemMetrics(SM_CXDRAG); - case wxSYS_DRAG_Y: - return ::GetSystemMetrics(SM_CYDRAG); - case wxSYS_EDGE_X: - return ::GetSystemMetrics(SM_CXEDGE); - case wxSYS_EDGE_Y: - return ::GetSystemMetrics(SM_CYEDGE); -#endif - case wxSYS_HSCROLL_ARROW_X: - return ::GetSystemMetrics(SM_CXHSCROLL); - case wxSYS_HSCROLL_ARROW_Y: - return ::GetSystemMetrics(SM_CYHSCROLL); - case wxSYS_HTHUMB_X: - return ::GetSystemMetrics(SM_CXHTHUMB); - case wxSYS_ICON_X: - return ::GetSystemMetrics(SM_CXICON); - case wxSYS_ICON_Y: - return ::GetSystemMetrics(SM_CYICON); - case wxSYS_ICONSPACING_X: - return ::GetSystemMetrics(SM_CXICONSPACING); - case wxSYS_ICONSPACING_Y: - return ::GetSystemMetrics(SM_CYICONSPACING); - case wxSYS_WINDOWMIN_X: - return ::GetSystemMetrics(SM_CXMIN); - case wxSYS_WINDOWMIN_Y: - return ::GetSystemMetrics(SM_CYMIN); - case wxSYS_SCREEN_X: - return ::GetSystemMetrics(SM_CXSCREEN); - case wxSYS_SCREEN_Y: - return ::GetSystemMetrics(SM_CYSCREEN); -#ifdef __WIN32__ - case wxSYS_FRAMESIZE_X: - return ::GetSystemMetrics(SM_CXSIZEFRAME); - case wxSYS_FRAMESIZE_Y: - return ::GetSystemMetrics(SM_CYSIZEFRAME); - case wxSYS_SMALLICON_X: - return ::GetSystemMetrics(SM_CXSMICON); - case wxSYS_SMALLICON_Y: - return ::GetSystemMetrics(SM_CYSMICON); -#endif - case wxSYS_HSCROLL_Y: - return ::GetSystemMetrics(SM_CYHSCROLL); - case wxSYS_VSCROLL_X: - return ::GetSystemMetrics(SM_CXVSCROLL); - case wxSYS_VSCROLL_ARROW_X: - return ::GetSystemMetrics(SM_CXVSCROLL); - case wxSYS_VSCROLL_ARROW_Y: - return ::GetSystemMetrics(SM_CYVSCROLL); - case wxSYS_VTHUMB_Y: - return ::GetSystemMetrics(SM_CYVTHUMB); - case wxSYS_CAPTION_Y: - return ::GetSystemMetrics(SM_CYCAPTION); - case wxSYS_MENU_Y: - return ::GetSystemMetrics(SM_CYMENU); -#ifdef __WIN32__ - case wxSYS_NETWORK_PRESENT: - return ::GetSystemMetrics(SM_NETWORK) & 0x0001; -#endif - case wxSYS_PENWINDOWS_PRESENT: - return ::GetSystemMetrics(SM_PENWINDOWS); -#ifdef __WIN32__ - case wxSYS_SHOW_SOUNDS: - return ::GetSystemMetrics(SM_SHOWSOUNDS); -#endif - case wxSYS_SWAP_BUTTONS: - return ::GetSystemMetrics(SM_SWAPBUTTON); - default: - return 0; - } - return 0; -} - diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp deleted file mode 100644 index 2197868d25..0000000000 --- a/src/msw/slider95.cpp +++ /dev/null @@ -1,660 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: slider95.cpp -// Purpose: wxSlider95, using the Win95 trackbar control -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "slider95.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#ifdef __WIN95__ - -#include "wx/msw/slider95.h" -#include "wx/msw/private.h" - -#if defined(__WIN95__) && !defined(__GNUWIN32__) -#include -#endif - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxSlider95, wxControl) - -#if WXWIN_COMPATIBILITY -BEGIN_EVENT_TABLE(wxSlider95, wxControl) - EVT_SCROLL(wxSlider95::OnScroll) -END_EVENT_TABLE() -#endif - -#endif - -// Slider -wxSlider95::wxSlider95(void) -{ - m_staticValue = 0; - m_staticMin = 0; - m_staticMax = 0; - m_pageSize = 1; - m_lineSize = 1; - m_rangeMax = 0; - m_rangeMin = 0; - m_tickFreq = 0; -} - -bool wxSlider95::Create(wxWindow *parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - - if (parent) parent->AddChild(this); - SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; - SetForegroundColour(parent->GetDefaultForegroundColour()) ; - - m_staticValue = 0; - m_staticMin = 0; - m_staticMax = 0; - m_pageSize = 1; - m_lineSize = 1; - m_windowStyle = style; - m_tickFreq = 0; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - long msStyle ; - - if ( m_windowStyle & wxSL_LABELS ) - { - msStyle = WS_CHILD | WS_VISIBLE | WS_BORDER | SS_CENTER; - - bool want3D; - WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D) ; - - m_staticValue = (WXHWND) CreateWindowEx(exStyle, "STATIC", NULL, - msStyle, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)NewControlId(), - wxGetInstance(), NULL); - - // Now create min static control - sprintf(wxBuffer, "%d", minValue); - m_staticMin = (WXHWND) CreateWindowEx(0, "STATIC", wxBuffer, - STATIC_FLAGS, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)NewControlId(), - wxGetInstance(), NULL); - } - - msStyle = 0; - if (m_windowStyle & wxSL_VERTICAL) - msStyle = TBS_VERT | WS_CHILD | WS_VISIBLE | WS_TABSTOP ; - else - msStyle = TBS_HORZ | WS_CHILD | WS_VISIBLE | WS_TABSTOP ; - - if ( m_windowStyle & wxSL_AUTOTICKS ) - msStyle |= TBS_AUTOTICKS ; - - if ( m_windowStyle & wxSL_LEFT ) - msStyle |= TBS_LEFT; - else if ( m_windowStyle & wxSL_RIGHT ) - msStyle |= TBS_RIGHT; - else if ( m_windowStyle & wxSL_TOP ) - msStyle |= TBS_TOP; - else if ( m_windowStyle & wxSL_BOTTOM ) - msStyle |= TBS_BOTTOM; - else if ( m_windowStyle & wxSL_BOTH ) - msStyle |= TBS_BOTH; - else if ( ! (m_windowStyle & wxSL_AUTOTICKS) ) - msStyle |= TBS_NOTICKS; - - if ( m_windowStyle & wxSL_SELRANGE ) - msStyle |= TBS_ENABLESELRANGE ; - - HWND scroll_bar = CreateWindowEx(MakeExtendedStyle(m_windowStyle), TRACKBAR_CLASS, wxBuffer, - msStyle, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, - wxGetInstance(), NULL); - - m_rangeMax = maxValue; - m_rangeMin = minValue; - - m_pageSize = (int)((maxValue-minValue)/10); - - ::SendMessage(scroll_bar, TBM_SETRANGE, TRUE, MAKELONG(minValue, maxValue)); - ::SendMessage(scroll_bar, TBM_SETPOS, TRUE, (LPARAM)value); - ::SendMessage(scroll_bar, TBM_SETPAGESIZE, 0, (LPARAM)m_pageSize); - - m_hWnd = (WXHWND)scroll_bar; - - SubclassWin(GetHWND()); - - SetWindowText((HWND) m_hWnd, ""); - - SetFont(* parent->GetFont()); - - if ( m_windowStyle & wxSL_LABELS ) - { - // Finally, create max value static item - sprintf(wxBuffer, "%d", maxValue); - m_staticMax = (WXHWND) CreateWindowEx(0, "STATIC", wxBuffer, - STATIC_FLAGS, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)NewControlId(), - wxGetInstance(), NULL); - - - if (GetFont()) - { -// GetFont()->RealizeResource(); - if (GetFont()->GetResourceHandle()) - { - if ( m_staticMin ) - SendMessage((HWND)m_staticMin,WM_SETFONT, - (WPARAM)GetFont()->GetResourceHandle(),0L); - if ( m_staticMax ) - SendMessage((HWND)m_staticMax,WM_SETFONT, - (WPARAM)GetFont()->GetResourceHandle(),0L); - if (m_staticValue) - SendMessage((HWND)m_staticValue,WM_SETFONT, - (WPARAM)GetFont()->GetResourceHandle(),0L); - } - } - } - - SetSize(x, y, width, height); - SetValue(value); - - return TRUE; -} - -void wxSlider95::MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control) -{ - int position = 0; // Dummy - not used in this mode - - int nScrollInc; - wxEventType scrollEvent = wxEVT_NULL; - switch ( wParam ) - { - case SB_TOP: - nScrollInc = m_rangeMax - position; - scrollEvent = wxEVT_SCROLL_TOP; - break; - - case SB_BOTTOM: - nScrollInc = - position; - scrollEvent = wxEVT_SCROLL_BOTTOM; - break; - - case SB_LINEUP: - nScrollInc = - GetLineSize(); - scrollEvent = wxEVT_SCROLL_LINEUP; - break; - - case SB_LINEDOWN: - nScrollInc = GetLineSize(); - scrollEvent = wxEVT_SCROLL_LINEDOWN; - break; - - case SB_PAGEUP: - nScrollInc = -GetPageSize(); - scrollEvent = wxEVT_SCROLL_PAGEUP; - break; - - case SB_PAGEDOWN: - nScrollInc = GetPageSize(); - scrollEvent = wxEVT_SCROLL_PAGEDOWN; - break; - - case SB_THUMBTRACK: - case SB_THUMBPOSITION: -#ifdef __WIN32__ - nScrollInc = (signed short)pos - position; -#else - nScrollInc = pos - position; -#endif - scrollEvent = wxEVT_SCROLL_THUMBTRACK; - break; - - default: - nScrollInc = 0; - return; - } - - { - - int newPos = (int)::SendMessage((HWND) control, TBM_GETPOS, 0, 0); - if (!(newPos < GetMin() || newPos > GetMax())) - { - SetValue(newPos); - - wxScrollEvent event(scrollEvent, m_windowId); - event.SetPosition(newPos); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); - } - } -} - -void wxSlider95::MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control) -{ - MSWOnVScroll(wParam, pos, control); -} - -wxSlider95::~wxSlider95(void) -{ - if (m_staticMin) - DestroyWindow((HWND) m_staticMin); - if (m_staticMax) - DestroyWindow((HWND) m_staticMax); - if (m_staticValue) - DestroyWindow((HWND) m_staticValue); -} - -int wxSlider95::GetValue(void) const -{ - return ::SendMessage((HWND) GetHWND(), TBM_GETPOS, 0, 0); -} - -void wxSlider95::SetValue(int value) -{ - ::SendMessage((HWND) GetHWND(), TBM_SETPOS, (WPARAM)TRUE, (LPARAM)value); - if (m_staticValue) - { - sprintf(wxBuffer, "%d", value); - SetWindowText((HWND) m_staticValue, wxBuffer); - } -} - -void wxSlider95::GetSize(int *width, int *height) const -{ - RECT rect; - rect.left = -1; rect.right = -1; rect.top = -1; rect.bottom = -1; - - wxFindMaxSize(GetHWND(), &rect); - - if (m_staticMin) - wxFindMaxSize(m_staticMin, &rect); - if (m_staticMax) - wxFindMaxSize(m_staticMax, &rect); - if (m_staticValue) - wxFindMaxSize(m_staticValue, &rect); - - *width = rect.right - rect.left; - *height = rect.bottom - rect.top; -} - -void wxSlider95::GetPosition(int *x, int *y) const -{ - wxWindow *parent = GetParent(); - RECT rect; - rect.left = -1; rect.right = -1; rect.top = -1; rect.bottom = -1; - - wxFindMaxSize(GetHWND(), &rect); - - if (m_staticMin) - wxFindMaxSize(m_staticMin, &rect); - if (m_staticMax) - wxFindMaxSize(m_staticMax, &rect); - if (m_staticValue) - wxFindMaxSize(m_staticValue, &rect); - - // Since we now have the absolute screen coords, - // if there's a parent we must subtract its top left corner - POINT point; - point.x = rect.left; - point.y = rect.top; - if (parent) - ::ScreenToClient((HWND) parent->GetHWND(), &point); - - // We may be faking the client origin. - // So a window that's really at (0, 30) may appear - // (to wxWin apps) to be at (0, 0). - if (GetParent()) - { - wxPoint pt(GetParent()->GetClientAreaOrigin()); - point.x -= pt.x; - point.y -= pt.y; - } - *x = point.x; - *y = point.y; -} - -void wxSlider95::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - int x1 = x; - int y1 = y; - int w1 = width; - int h1 = height; - - int currentX, currentY; - GetPosition(¤tX, ¤tY); - if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - x1 = currentX; - if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - y1 = currentY; - - AdjustForParentClientOrigin(x1, y1, sizeFlags); - - char buf[300]; - - int x_offset = x; - int y_offset = y; - - int cx; // slider,min,max sizes - int cy; - int cyf; - - wxGetCharSize(GetHWND(), &cx, &cy,GetFont()); - - if ((m_windowStyle & wxSL_VERTICAL) != wxSL_VERTICAL) - { - if ( m_windowStyle & wxSL_LABELS ) - { - int min_len = 0; - - GetWindowText((HWND) m_staticMin, buf, 300); - GetTextExtent(buf, &min_len, &cyf,NULL,NULL, GetFont()); - - int max_len = 0; - - GetWindowText((HWND) m_staticMax, buf, 300); - GetTextExtent(buf, &max_len, &cyf,NULL,NULL, GetFont()); - if (m_staticValue) - { - int new_width = (int)(wxMax(min_len, max_len)); - int valueHeight = (int)cyf; -#ifdef __WIN32__ - // For some reason, under Win95, the text edit control has - // a lot of space before the first character - new_width += 3*cx; -#endif - // The height needs to be a bit bigger under Win95 if using native - // 3D effects. - valueHeight = (int) (valueHeight * 1.5) ; - MoveWindow((HWND) m_staticValue, x_offset, y_offset, new_width, valueHeight, TRUE); - x_offset += new_width + cx; - } - - MoveWindow((HWND) m_staticMin, x_offset, y_offset, (int)min_len, cy, TRUE); - x_offset += (int)(min_len + cx); - - int slider_length = (int)(w1 - x_offset - max_len - cx); - - int slider_height = h1; - if (slider_height < 0 ) - slider_height = 20; - - // Slider must have a minimum/default length/height - if (slider_length < 100) - slider_length = 100; - - MoveWindow((HWND) GetHWND(), x_offset, y_offset, slider_length, slider_height, TRUE); - x_offset += slider_length + cx; - - MoveWindow((HWND) m_staticMax, x_offset, y_offset, (int)max_len, cy, TRUE); - } - else - { - // No labels - // If we're prepared to use the existing size, then... - if (width == -1 && height == -1 && ((sizeFlags & wxSIZE_AUTO) != wxSIZE_AUTO)) - { - GetSize(&w1, &h1); - } - if ( w1 < 0 ) - w1 = 200; - if ( h1 < 0 ) - h1 = 20; - MoveWindow((HWND) GetHWND(), x1, y1, w1, h1, TRUE); - } - } - else - { - if ( m_windowStyle & wxSL_LABELS ) - { - int min_len; - GetWindowText((HWND) m_staticMin, buf, 300); - GetTextExtent(buf, &min_len, &cyf,NULL,NULL,GetFont()); - - int max_len; - GetWindowText((HWND) m_staticMax, buf, 300); - GetTextExtent(buf, &max_len, &cyf,NULL,NULL, GetFont()); - - if (m_staticValue) - { - int new_width = (int)(wxMax(min_len, max_len)); - int valueHeight = (int)cyf; -/*** Suggested change by George Tasker - remove this block... -#ifdef __WIN32__ - // For some reason, under Win95, the text edit control has - // a lot of space before the first character - new_width += 3*cx; -#endif - ... and replace with following line: */ - new_width += cx; - - // The height needs to be a bit bigger under Win95 if using native - // 3D effects. - valueHeight = (int) (valueHeight * 1.5) ; - - MoveWindow((HWND) m_staticValue, x_offset, y_offset, new_width, valueHeight, TRUE); - y_offset += valueHeight; - } - - MoveWindow((HWND) m_staticMin, x_offset, y_offset, (int)min_len, cy, TRUE); - y_offset += cy; - - int slider_length = (int)(h1 - y_offset - cy - cy); - - int slider_width = w1; - if (slider_width < 0 ) - slider_width = 20; - - // Slider must have a minimum/default length - if (slider_length < 100) - slider_length = 100; - - MoveWindow((HWND) GetHWND(), x_offset, y_offset, slider_width, slider_length, TRUE); - y_offset += slider_length; - - MoveWindow((HWND) m_staticMax, x_offset, y_offset, (int)max_len, cy, TRUE); - } - else - { - // No labels - // If we're prepared to use the existing size, then... - if (width == -1 && height == -1 && ((sizeFlags & wxSIZE_AUTO) != wxSIZE_AUTO)) - { - GetSize(&w1, &h1); - } - if ( w1 < 0 ) - w1 = 20; - if ( h1 < 0 ) - h1 = 200; - MoveWindow((HWND) GetHWND(), x1, y1, w1, h1, TRUE); - } - } -} - -void wxSlider95::SetRange(int minValue, int maxValue) -{ - m_rangeMin = minValue; - m_rangeMax = maxValue; - - ::SendMessage((HWND) GetHWND(), TBM_SETRANGE, TRUE, MAKELONG(minValue, maxValue)); - - char buf[40]; - if ( m_staticMin ) - { - sprintf(buf, "%d", m_rangeMin); - SetWindowText((HWND) m_staticMin, buf); - } - - if ( m_staticMax ) - { - sprintf(buf, "%d", m_rangeMax); - SetWindowText((HWND) m_staticMax, buf); - } -} - -WXHBRUSH wxSlider95::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ - if ( nCtlColor == CTLCOLOR_SCROLLBAR ) - return 0; - - // Otherwise, it's a static - if (GetParent()->GetTransparentBackground()) - SetBkMode((HDC) pDC, TRANSPARENT); - else - SetBkMode((HDC) pDC, OPAQUE); - - ::SetBkColor((HDC) pDC, RGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue())); - ::SetTextColor((HDC) pDC, RGB(GetForegroundColour().Red(), GetForegroundColour().Green(), GetForegroundColour().Blue())); - - wxBrush *backgroundBrush = wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID); - return (WXHBRUSH) backgroundBrush->GetResourceHandle(); -} - -// For trackbars only -void wxSlider95::SetTickFreq(int n, int pos) -{ - m_tickFreq = n; - ::SendMessage( (HWND) GetHWND(), TBM_SETTICFREQ, (WPARAM) n, (LPARAM) pos ); -} - -void wxSlider95::SetPageSize(int pageSize) -{ - ::SendMessage( (HWND) GetHWND(), TBM_SETPAGESIZE, (WPARAM) 0, (LPARAM) pageSize ); - m_pageSize = pageSize; -} - -int wxSlider95::GetPageSize(void) const -{ - return m_pageSize; -} - -void wxSlider95::ClearSel(void) -{ - ::SendMessage( (HWND) GetHWND(), TBM_CLEARSEL, (WPARAM) TRUE, (LPARAM) 0 ); -} - -void wxSlider95::ClearTicks(void) -{ - ::SendMessage( (HWND) GetHWND(), TBM_CLEARTICS, (WPARAM) TRUE, (LPARAM) 0 ); -} - -void wxSlider95::SetLineSize(int lineSize) -{ - m_lineSize = lineSize; - ::SendMessage( (HWND) GetHWND(), TBM_SETLINESIZE, (WPARAM) 0, (LPARAM) lineSize ); -} - -int wxSlider95::GetLineSize(void) const -{ - return (int) ::SendMessage( (HWND) GetHWND(), TBM_GETLINESIZE, (WPARAM) 0, (LPARAM) 0 ); -} - -int wxSlider95::GetSelEnd(void) const -{ - return (int) ::SendMessage( (HWND) GetHWND(), TBM_SETSELEND, (WPARAM) 0, (LPARAM) 0 ); -} - -int wxSlider95::GetSelStart(void) const -{ - return (int) ::SendMessage( (HWND) GetHWND(), TBM_GETSELSTART, (WPARAM) 0, (LPARAM) 0 ); -} - -void wxSlider95::SetSelection(int minPos, int maxPos) -{ - ::SendMessage( (HWND) GetHWND(), TBM_SETSEL, (WPARAM) TRUE, (LPARAM) MAKELONG( minPos, maxPos) ); -} - -void wxSlider95::SetThumbLength(int len) -{ - ::SendMessage( (HWND) GetHWND(), TBM_SETTHUMBLENGTH, (WPARAM) len, (LPARAM) 0 ); -} - -int wxSlider95::GetThumbLength(void) const -{ - return (int) ::SendMessage( (HWND) GetHWND(), TBM_GETTHUMBLENGTH, (WPARAM) 0, (LPARAM) 0 ); -} - -void wxSlider95::SetTick(int tickPos) -{ - ::SendMessage( (HWND) GetHWND(), TBM_SETTIC, (WPARAM) 0, (LPARAM) tickPos ); -} - -bool wxSlider95::ContainsHWND(WXHWND hWnd) const -{ - return ( hWnd == GetStaticMin() || hWnd == GetStaticMax() || hWnd == GetEditValue() ); -} - -#if WXWIN_COMPATIBILITY -// Backward compatibility -void wxSlider95::OnScroll(wxScrollEvent& event) -{ - wxEventType oldEvent = event.GetEventType(); - event.SetEventType( wxEVT_COMMAND_SLIDER_UPDATED ); - if ( !GetEventHandler()->ProcessEvent(event) ) - { - event.SetEventType( oldEvent ); - if (!GetParent()->GetEventHandler()->ProcessEvent(event)) - event.Skip(); - } -} -#endif - -void wxSlider95::Command (wxCommandEvent & event) -{ - SetValue (event.GetInt()); - ProcessCommand (event); -} - -bool wxSlider95::Show(bool show) -{ - wxWindow::Show(show); - - int cshow; - if (show) - cshow = SW_SHOW; - else - cshow = SW_HIDE; - - if(m_staticValue) - ShowWindow((HWND) m_staticValue, (BOOL)cshow); - if(m_staticMin) - ShowWindow((HWND) m_staticMin, (BOOL)cshow); - if(m_staticMax) - ShowWindow((HWND) m_staticMax, (BOOL)cshow); - return TRUE; -} - -#endif - // __WIN95__ - diff --git a/src/msw/slidrmsw.cpp b/src/msw/slidrmsw.cpp deleted file mode 100644 index f8a6f33e2a..0000000000 --- a/src/msw/slidrmsw.cpp +++ /dev/null @@ -1,600 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: slidermsw.cpp -// Purpose: wxSliderMSW -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "slidrmsw.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#include "wx/msw/slidrmsw.h" -#include "wx/msw/private.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxSliderMSW, wxControl) - -#if WXWIN_COMPATIBILITY -BEGIN_EVENT_TABLE(wxSliderMSW, wxControl) - EVT_SCROLL(wxSliderMSW::OnScroll) -END_EVENT_TABLE() -#endif - -#endif - -// Slider -wxSliderMSW::wxSliderMSW(void) -{ - m_staticValue = 0; - m_staticMin = 0; - m_staticMax = 0; - m_pageSize = 1; - m_lineSize = 1; - m_rangeMax = 0; - m_rangeMin = 0; - m_tickFreq = 0; -} - -bool wxSliderMSW::Create(wxWindow *parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - - if (parent) parent->AddChild(this); - SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; - SetForegroundColour(parent->GetDefaultForegroundColour()) ; - - m_staticValue = 0; - m_staticMin = 0; - m_staticMax = 0; - m_pageSize = 1; - m_lineSize = 1; - m_windowStyle = style; - m_tickFreq = 0; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - // non-Win95 implementation - - long msStyle = WS_CHILD | WS_VISIBLE | WS_BORDER | SS_CENTER; - - bool want3D; - WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D) ; - - m_staticValue = (WXHWND) CreateWindowEx(exStyle, "STATIC", NULL, - msStyle, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)NewControlId(), - wxGetInstance(), NULL); - - // Now create min static control - sprintf(wxBuffer, "%d", minValue); - m_staticMin = (WXHWND) CreateWindowEx(0, "STATIC", wxBuffer, - STATIC_FLAGS, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)NewControlId(), - wxGetInstance(), NULL); - - // Now create slider - m_windowId = (int)NewControlId(); - - msStyle = 0; - if (m_windowStyle & wxSL_VERTICAL) - msStyle = SBS_VERT | WS_CHILD | WS_VISIBLE | WS_TABSTOP ; - else - msStyle = SBS_HORZ | WS_CHILD | WS_VISIBLE | WS_TABSTOP ; - - HWND scroll_bar = CreateWindowEx(MakeExtendedStyle(m_windowStyle), "SCROLLBAR", wxBuffer, - msStyle, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, - wxGetInstance(), NULL); - - m_pageSize = (int)((maxValue-minValue)/10); - m_rangeMax = maxValue; - m_rangeMin = minValue; - - ::SetScrollRange(scroll_bar, SB_CTL, minValue, maxValue, FALSE); - ::SetScrollPos(scroll_bar, SB_CTL, value, FALSE); - ShowWindow(scroll_bar, SW_SHOW); - - m_hWnd = (WXHWND)scroll_bar; - - // Subclass again for purposes of dialog editing mode - SubclassWin(GetHWND()); - - // Finally, create max value static item - sprintf(wxBuffer, "%d", maxValue); - m_staticMax = (WXHWND) CreateWindowEx(0, "STATIC", wxBuffer, - STATIC_FLAGS, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)NewControlId(), - wxGetInstance(), NULL); - - SetFont(* parent->GetFont()); - - if (GetFont()) - { -// GetFont()->RealizeResource(); - if (GetFont()->GetResourceHandle()) - { - if ( m_staticMin ) - SendMessage((HWND)m_staticMin,WM_SETFONT, - (WPARAM)GetFont()->GetResourceHandle(),0L); - if ( m_staticMax ) - SendMessage((HWND)m_staticMax,WM_SETFONT, - (WPARAM)GetFont()->GetResourceHandle(),0L); - if (m_staticValue) - SendMessage((HWND)m_staticValue,WM_SETFONT, - (WPARAM)GetFont()->GetResourceHandle(),0L); - } - } - - SetSize(x, y, width, height); - SetValue(value); - - return TRUE; -} - -void wxSliderMSW::MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control) -{ - int position = ::GetScrollPos((HWND)control, SB_CTL); - - int nScrollInc; - wxEventType scrollEvent = wxEVT_NULL; - switch ( wParam ) - { - case SB_TOP: - nScrollInc = m_rangeMax - position; - scrollEvent = wxEVT_SCROLL_TOP; - break; - - case SB_BOTTOM: - nScrollInc = - position; - scrollEvent = wxEVT_SCROLL_BOTTOM; - break; - - case SB_LINEUP: - nScrollInc = - GetLineSize(); - scrollEvent = wxEVT_SCROLL_LINEUP; - break; - - case SB_LINEDOWN: - nScrollInc = GetLineSize(); - scrollEvent = wxEVT_SCROLL_LINEDOWN; - break; - - case SB_PAGEUP: - nScrollInc = -GetPageSize(); - scrollEvent = wxEVT_SCROLL_PAGEUP; - break; - - case SB_PAGEDOWN: - nScrollInc = GetPageSize(); - scrollEvent = wxEVT_SCROLL_PAGEDOWN; - break; - - case SB_THUMBTRACK: - case SB_THUMBPOSITION: -#ifdef __WIN32__ - nScrollInc = (signed short)pos - position; -#else - nScrollInc = pos - position; -#endif - scrollEvent = wxEVT_SCROLL_THUMBTRACK; - break; - - default: - nScrollInc = 0; - return; - } - - if (nScrollInc != 0) - { - - int newPos = position + nScrollInc; - - if (!(newPos < GetMin() || newPos > GetMax())) - { - SetValue(newPos); - - wxScrollEvent event(scrollEvent, m_windowId); - event.SetPosition(newPos); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); - } - } -} - -void wxSliderMSW::MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control) -{ - MSWOnVScroll(wParam, pos, control); -} - -wxSliderMSW::~wxSliderMSW(void) -{ - if (m_staticMin) - DestroyWindow((HWND) m_staticMin); - if (m_staticMax) - DestroyWindow((HWND) m_staticMax); - if (m_staticValue) - DestroyWindow((HWND) m_staticValue); -} - -int wxSliderMSW::GetValue(void) const -{ - return ::GetScrollPos((HWND) GetHWND(), SB_CTL); -} - -void wxSliderMSW::SetValue(int value) -{ - ::SetScrollPos((HWND) GetHWND(), SB_CTL, value, TRUE); - if (m_staticValue) - { - sprintf(wxBuffer, "%d", value); - SetWindowText((HWND) m_staticValue, wxBuffer); - } -} - -void wxSliderMSW::GetSize(int *width, int *height) const -{ - RECT rect; - rect.left = -1; rect.right = -1; rect.top = -1; rect.bottom = -1; - - wxFindMaxSize(GetHWND(), &rect); - - if (m_staticMin) - wxFindMaxSize(m_staticMin, &rect); - if (m_staticMax) - wxFindMaxSize(m_staticMax, &rect); - if (m_staticValue) - wxFindMaxSize(m_staticValue, &rect); - - *width = rect.right - rect.left; - *height = rect.bottom - rect.top; -} - -void wxSliderMSW::GetPosition(int *x, int *y) const -{ - wxWindow *parent = GetParent(); - RECT rect; - rect.left = -1; rect.right = -1; rect.top = -1; rect.bottom = -1; - - wxFindMaxSize(GetHWND(), &rect); - - if (m_staticMin) - wxFindMaxSize(m_staticMin, &rect); - if (m_staticMax) - wxFindMaxSize(m_staticMax, &rect); - if (m_staticValue) - wxFindMaxSize(m_staticValue, &rect); - - // Since we now have the absolute screen coords, - // if there's a parent we must subtract its top left corner - POINT point; - point.x = rect.left; - point.y = rect.top; - if (parent) - ::ScreenToClient((HWND) parent->GetHWND(), &point); - - // We may be faking the client origin. - // So a window that's really at (0, 30) may appear - // (to wxWin apps) to be at (0, 0). - if (GetParent()) - { - wxPoint pt(GetParent()->GetClientAreaOrigin()); - point.x -= pt.x; - point.y -= pt.y; - } - *x = point.x; - *y = point.y; -} - -void wxSliderMSW::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - int x1 = x; - int y1 = y; - int w1 = width; - int h1 = height; - - int currentX, currentY; - GetPosition(¤tX, ¤tY); - if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - x1 = currentX; - if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - y1 = currentY; - - AdjustForParentClientOrigin(x1, y1, sizeFlags); - - char buf[300]; - - int x_offset = x; - int y_offset = y; - - int cx; // slider,min,max sizes - int cy; - int cyf; - - wxGetCharSize(GetHWND(), &cx, &cy,GetFont()); - - if ((m_windowStyle & wxSL_VERTICAL) != wxSL_VERTICAL) - { - if ( m_windowStyle & wxSL_LABELS ) - { - int min_len = 0; - - GetWindowText((HWND) m_staticMin, buf, 300); - GetTextExtent(buf, &min_len, &cyf,NULL,NULL, GetFont()); - - int max_len = 0; - - GetWindowText((HWND) m_staticMax, buf, 300); - GetTextExtent(buf, &max_len, &cyf,NULL,NULL, GetFont()); - if (m_staticValue) - { - int new_width = (int)(wxMax(min_len, max_len)); - int valueHeight = (int)cyf; -#ifdef __WIN32__ - // For some reason, under Win95, the text edit control has - // a lot of space before the first character - new_width += 3*cx; -#endif - MoveWindow((HWND) m_staticValue, x_offset, y_offset, new_width, valueHeight, TRUE); - x_offset += new_width + cx; - } - - MoveWindow((HWND) m_staticMin, x_offset, y_offset, (int)min_len, cy, TRUE); - x_offset += (int)(min_len + cx); - - int slider_length = (int)(w1 - x_offset - max_len - cx); - - int slider_height = cy; - - // Slider must have a minimum/default length/height - if (slider_length < 100) - slider_length = 100; - - MoveWindow((HWND) GetHWND(), x_offset, y_offset, slider_length, slider_height, TRUE); - x_offset += slider_length + cx; - - MoveWindow((HWND) m_staticMax, x_offset, y_offset, (int)max_len, cy, TRUE); - } - else - { - // No labels - if ( w1 < 0 ) - w1 = 200; - if ( h1 < 0 ) - h1 = 20; - MoveWindow((HWND) GetHWND(), x1, y1, w1, h1, TRUE); - } - } - else - { - if ( m_windowStyle & wxSL_LABELS ) - { - int min_len; - GetWindowText((HWND) m_staticMin, buf, 300); - GetTextExtent(buf, &min_len, &cyf,NULL,NULL,GetFont()); - - int max_len; - GetWindowText((HWND) m_staticMax, buf, 300); - GetTextExtent(buf, &max_len, &cyf,NULL,NULL, GetFont()); - - if (m_staticValue) - { - int new_width = (int)(wxMax(min_len, max_len)); - int valueHeight = (int)cyf; -/*** Suggested change by George Tasker - remove this block... -#ifdef __WIN32__ - // For some reason, under Win95, the text edit control has - // a lot of space before the first character - new_width += 3*cx; -#endif - ... and replace with following line: */ - new_width += cx; - - MoveWindow((HWND) m_staticValue, x_offset, y_offset, new_width, valueHeight, TRUE); - y_offset += valueHeight; - } - - MoveWindow((HWND) m_staticMin, x_offset, y_offset, (int)min_len, cy, TRUE); - y_offset += cy; - - int slider_length = (int)(h1 - y_offset - cy - cy); - - // Use character height as an estimate of slider width (yes, width) - int slider_width = cy; - - // Slider must have a minimum/default length - if (slider_length < 100) - slider_length = 100; - - MoveWindow((HWND) GetHWND(), x_offset, y_offset, slider_width, slider_length, TRUE); - y_offset += slider_length; - - MoveWindow((HWND) m_staticMax, x_offset, y_offset, (int)max_len, cy, TRUE); - } - else - { - // No labels - if ( w1 < 0 ) - w1 = 20; - if ( h1 < 0 ) - h1 = 200; - MoveWindow((HWND) GetHWND(), x1, y1, w1, h1, TRUE); - } - } -} - -void wxSliderMSW::SetRange(int minValue, int maxValue) -{ - m_rangeMin = minValue; - m_rangeMax = maxValue; - - ::SetScrollRange((HWND) GetHWND(), SB_CTL, m_rangeMin, m_rangeMax, TRUE); - char buf[40]; - if ( m_staticMin ) - { - sprintf(buf, "%d", m_rangeMin); - SetWindowText((HWND) m_staticMin, buf); - } - - if ( m_staticMax ) - { - sprintf(buf, "%d", m_rangeMax); - SetWindowText((HWND) m_staticMax, buf); - } -} - -WXHBRUSH wxSliderMSW::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ - if ( nCtlColor == CTLCOLOR_SCROLLBAR ) - return 0; - - // Otherwise, it's a static - if (GetParent()->GetTransparentBackground()) - SetBkMode((HDC) pDC, TRANSPARENT); - else - SetBkMode((HDC) pDC, OPAQUE); - - ::SetBkColor((HDC) pDC, RGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue())); - ::SetTextColor((HDC) pDC, RGB(GetForegroundColour().Red(), GetForegroundColour().Green(), GetForegroundColour().Blue())); - - wxBrush *backgroundBrush = wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID); - - return (WXHBRUSH) backgroundBrush->GetResourceHandle(); -} - -// For trackbars only -void wxSliderMSW::SetTickFreq(int n, int pos) -{ -} - -void wxSliderMSW::SetPageSize(int pageSize) -{ - m_pageSize = pageSize; -} - -int wxSliderMSW::GetPageSize(void) const -{ - return m_pageSize; -} - -void wxSliderMSW::ClearSel(void) -{ -} - -void wxSliderMSW::ClearTicks(void) -{ -} - -void wxSliderMSW::SetLineSize(int lineSize) -{ - m_lineSize = lineSize; -} - -int wxSliderMSW::GetLineSize(void) const -{ - return m_lineSize; -} - -int wxSliderMSW::GetSelEnd(void) const -{ - return 0; -} - -int wxSliderMSW::GetSelStart(void) const -{ - return 0; -} - -void wxSliderMSW::SetSelection(int minPos, int maxPos) -{ -} - -void wxSliderMSW::SetThumbLength(int len) -{ -} - -int wxSliderMSW::GetThumbLength(void) const -{ - return 0; -} - -void wxSliderMSW::SetTick(int tickPos) -{ -} - -bool wxSliderMSW::ContainsHWND(WXHWND hWnd) const -{ - return ( hWnd == GetStaticMin() || hWnd == GetStaticMax() || hWnd == GetEditValue() ); -} - -#if WXWIN_COMPATIBILITY -// Backward compatibility -void wxSliderMSW::OnScroll(wxScrollEvent& event) -{ - wxEventType oldEvent = event.GetEventType(); - event.SetEventType( wxEVT_COMMAND_SLIDER_UPDATED ); - if ( !GetEventHandler()->ProcessEvent(event) ) - { - event.SetEventType( oldEvent ); - if (!GetParent()->GetEventHandler()->ProcessEvent(event)) - event.Skip(); - } -} -#endif - -void wxSliderMSW::Command (wxCommandEvent & event) -{ - SetValue (event.GetInt()); - ProcessCommand (event); -} - -bool wxSliderMSW::Show(bool show) -{ - wxWindow::Show(show); - - int cshow; - if (show) - cshow = SW_SHOW; - else - cshow = SW_HIDE; - - if(m_staticValue) - ShowWindow((HWND) m_staticValue, (BOOL)cshow); - if(m_staticMin) - ShowWindow((HWND) m_staticMin, (BOOL)cshow); - if(m_staticMax) - ShowWindow((HWND) m_staticMax, (BOOL)cshow); - return TRUE; -} - - diff --git a/src/msw/spinbutt.cpp b/src/msw/spinbutt.cpp deleted file mode 100644 index a34bd654c4..0000000000 --- a/src/msw/spinbutt.cpp +++ /dev/null @@ -1,269 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: spinbutt.cpp -// Purpose: wxSpinButton -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "spinbutt.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx.h" -#endif - -#if defined(__WIN95__) - -#include "wx/spinbutt.h" -#include "wx/msw/private.h" - -#ifndef __GNUWIN32__ -#include -#endif - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl) -#endif - -wxSpinButton::wxSpinButton(void) -{ - m_min = 0; - m_max = 100; -} - -bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style, const wxString& name) -{ - wxSystemSettings settings; - m_backgroundColour = parent->GetDefaultBackgroundColour() ; - m_foregroundColour = parent->GetDefaultForegroundColour() ; - - SetName(name); - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - m_windowStyle = style; - - SetParent(parent); - - if (width <= 0) - width = 100; - if (height <= 0) - height = 30; - if (x < 0) - x = 0; - if (y < 0) - y = 0; - - m_min = 0; - m_max = 100; - - m_windowId = (id == -1) ? NewControlId() : id; - - DWORD wstyle = WS_VISIBLE | WS_CHILD | WS_TABSTOP; - - if ( m_windowStyle & wxSP_HORIZONTAL ) - wstyle |= UDS_HORZ; - if ( m_windowStyle & wxSP_ARROW_KEYS ) - wstyle |= UDS_ARROWKEYS; - if ( m_windowStyle & wxSP_WRAP ) - wstyle |= UDS_WRAP; - - // Create the ListView control. - HWND hWndListControl = CreateUpDownControl(wstyle, - x, y, width, height, - (HWND) parent->GetHWND(), - m_windowId, - wxGetInstance(), - 0, - m_min, m_max, 0); - - m_hWnd = (WXHWND) hWndListControl; - if (parent) parent->AddChild(this); - - // TODO: have this for all controls. - if ( !m_hWnd ) - return FALSE; - - SubclassWin((WXHWND) m_hWnd); - - return TRUE; -} - -wxSpinButton::~wxSpinButton(void) -{ -} - -// Attributes -//////////////////////////////////////////////////////////////////////////// - -int wxSpinButton::GetValue(void) const -{ - return (int) ::SendMessage((HWND) GetHWND(), UDM_GETPOS, 0, 0); -} - -void wxSpinButton::SetValue(int val) -{ - ::SendMessage((HWND) GetHWND(), UDM_SETPOS, 0, (LPARAM) MAKELONG((short) val, 0)); -} - -void wxSpinButton::SetRange(int minVal, int maxVal) -{ - m_min = minVal; - m_max = maxVal; - ::SendMessage((HWND) GetHWND(), UDM_SETRANGE, 0, (LPARAM) MAKELONG((short) minVal, (short) maxVal)); -} - -void wxSpinButton::MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control) -{ - if (control) - { - wxSpinEvent event(wxEVT_NULL, m_windowId); - event.SetPosition(pos); - event.SetOrientation(wxVERTICAL); - event.SetEventObject( this ); - - switch ( wParam ) - { - case SB_TOP: - event.m_eventType = wxEVT_SCROLL_TOP; - break; - - case SB_BOTTOM: - event.m_eventType = wxEVT_SCROLL_BOTTOM; - break; - - case SB_LINEUP: - event.m_eventType = wxEVT_SCROLL_LINEUP; - break; - - case SB_LINEDOWN: - event.m_eventType = wxEVT_SCROLL_LINEDOWN; - break; - - case SB_PAGEUP: - event.m_eventType = wxEVT_SCROLL_PAGEUP; - break; - - case SB_PAGEDOWN: - event.m_eventType = wxEVT_SCROLL_PAGEDOWN; - break; - - case SB_THUMBTRACK: - case SB_THUMBPOSITION: - event.m_eventType = wxEVT_SCROLL_THUMBTRACK; - break; - - default: - return; - break; - } - if (!GetEventHandler()->ProcessEvent(event)) - Default(); - } -} - -void wxSpinButton::MSWOnHScroll( WXWORD wParam, WXWORD pos, WXHWND control) -{ - if (control) - { - wxSpinEvent event(wxEVT_NULL, m_windowId); - event.SetPosition(pos); - event.SetOrientation(wxHORIZONTAL); - event.SetEventObject( this ); - - switch ( wParam ) - { - case SB_TOP: - event.m_eventType = wxEVT_SCROLL_TOP; - break; - - case SB_BOTTOM: - event.m_eventType = wxEVT_SCROLL_BOTTOM; - break; - - case SB_LINEUP: - event.m_eventType = wxEVT_SCROLL_LINEUP; - break; - - case SB_LINEDOWN: - event.m_eventType = wxEVT_SCROLL_LINEDOWN; - break; - - case SB_PAGEUP: - event.m_eventType = wxEVT_SCROLL_PAGEUP; - break; - - case SB_PAGEDOWN: - event.m_eventType = wxEVT_SCROLL_PAGEDOWN; - break; - - case SB_THUMBTRACK: - case SB_THUMBPOSITION: - event.m_eventType = wxEVT_SCROLL_THUMBTRACK; - break; - - default: - return; - break; - } - if (!GetEventHandler()->ProcessEvent(event)) - Default(); - } -} - -bool wxSpinButton::MSWCommand(WXUINT cmd, WXWORD id) -{ - // No command messages - return FALSE; -} - -bool wxSpinButton::MSWNotify(WXWPARAM wParam, WXLPARAM lParam) -{ - NMHDR* hdr1 = (NMHDR*) lParam; - switch ( hdr1->code ) - { -/* We don't process this message, currently */ - case UDN_DELTAPOS: - { - return wxControl::MSWNotify(wParam, lParam); - break; - } - default : - return wxControl::MSWNotify(wParam, lParam); - break; - } -/* - event.eventObject = this; - event.SetEventType(eventType); - - if ( !ProcessEvent(event) ) - return FALSE; -*/ - return TRUE; -} - -// Spin event -IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent) - -wxSpinEvent::wxSpinEvent(wxEventType commandType, int id): - wxScrollEvent(commandType, id) -{ -} - -#endif diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp deleted file mode 100644 index 5c56d88f69..0000000000 --- a/src/msw/statbmp.cpp +++ /dev/null @@ -1,202 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: statbmp.cpp -// Purpose: wxStaticBitmap -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "statbmp.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/statbmp.h" -#endif - -#include -#include "wx/msw/private.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl) -#endif - -/* - * wxStaticBitmap - */ - -bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id, - const wxBitmap& bitmap, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - m_messageBitmap = bitmap; - SetName(name); - if (parent) parent->AddChild(this); - - m_backgroundColour = parent->GetDefaultBackgroundColour() ; - m_foregroundColour = parent->GetDefaultForegroundColour() ; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - if ( width < 0 && bitmap.Ok() ) - width = bitmap.GetWidth(); - if ( height < 0 && bitmap.Ok() ) - height = bitmap.GetHeight(); - - m_windowStyle = style; - - // Use an ownerdraw button to produce a static bitmap, since there's - // no ownerdraw static. - // TODO: perhaps this should be a static item, with style SS_BITMAP. - m_hWnd = (WXHWND)CreateWindow - ( - "BUTTON", - "", - BS_OWNERDRAW | WS_TABSTOP | WS_CHILD | WS_VISIBLE, - 0, 0, 0, 0, - (HWND)parent->GetHWND(), - (HMENU)m_windowId, - wxGetInstance(), - NULL - ); - - // Subclass again for purposes of dialog editing mode - SubclassWin(m_hWnd); - - SetFont(* GetParent()->GetFont()); - - SetSize(x, y, width, height); - return TRUE; -} - -void wxStaticBitmap::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - int currentX, currentY; - GetPosition(¤tX, ¤tY); - int x1 = x; - int y1 = y; - - if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - x1 = currentX; - if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - y1 = currentY; - - AdjustForParentClientOrigin(x1, y1, sizeFlags); - - int actualWidth = width; - int actualHeight = height; - - int ww, hh; - GetSize(&ww, &hh); - - // If we're prepared to use the existing width, then... - if (width == -1 && ((sizeFlags & wxSIZE_AUTO_WIDTH) != wxSIZE_AUTO_WIDTH)) - actualWidth = ww; - else actualWidth = width; - - // If we're prepared to use the existing height, then... - if (height == -1 && ((sizeFlags & wxSIZE_AUTO_HEIGHT) != wxSIZE_AUTO_HEIGHT)) - actualHeight = hh; - else actualHeight = height; - - MoveWindow((HWND) GetHWND(), x1, y1, actualWidth, actualHeight, TRUE); -} - -void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap) -{ - m_messageBitmap = bitmap; - - int x, y; - int w, h; - GetPosition(&x, &y); - GetSize(&w, &h); - RECT rect; - rect.left = x; rect.top = y; rect.right = x + w; rect.bottom = y + h; - - if ( bitmap.Ok() ) - MoveWindow((HWND) GetHWND(), x, y, bitmap.GetWidth(), bitmap.GetHeight(), - FALSE); - - InvalidateRect((HWND) GetParent()->GetHWND(), &rect, TRUE); -} - -bool wxStaticBitmap::MSWOnDraw(WXDRAWITEMSTRUCT *item) -{ - long style = GetWindowLong((HWND) GetHWND(), GWL_STYLE); -#ifdef __WIN32__ - if ((style & 0xFF) == SS_BITMAP) - { - // Should we call Default() here? -// Default(); - - // Let default procedure draw the bitmap, which is defined - // in the Windows resource. - return FALSE; - } -#endif - - LPDRAWITEMSTRUCT lpDIS = (LPDRAWITEMSTRUCT) item; - - wxBitmap* bitmap = &m_messageBitmap; - if ( !bitmap->Ok() ) - return FALSE; - - HDC hDC = lpDIS->hDC; - HDC memDC = ::CreateCompatibleDC(hDC); - - HBITMAP old = (HBITMAP) ::SelectObject(memDC, (HBITMAP) bitmap->GetHBITMAP()); - - if (!old) - return FALSE; - - RECT rect = lpDIS->rcItem; - - int x = lpDIS->rcItem.left; - int y = lpDIS->rcItem.top; - int width = lpDIS->rcItem.right - x; - int height = lpDIS->rcItem.bottom - y; - - // Centre the bitmap in the control area - int x1 = (int) (x + ((width - bitmap->GetWidth()) / 2)); - int y1 = (int) (y + ((height - bitmap->GetHeight()) / 2)); - - ::BitBlt(hDC, x1, y1, bitmap->GetWidth(), bitmap->GetHeight(), memDC, 0, 0, SRCCOPY); - - ::SelectObject(memDC, old); - - ::DeleteDC(memDC); - - return TRUE; -} - -long wxStaticBitmap::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) -{ - // Ensure that static items get messages. Some controls don't like this - // message to be intercepted (e.g. RichEdit), hence the tests. - if (nMsg == WM_NCHITTEST) - return (long)HTCLIENT; - - return wxWindow::MSWWindowProc(nMsg, wParam, lParam); -} - diff --git a/src/msw/statbox.cpp b/src/msw/statbox.cpp deleted file mode 100644 index 15bbd1c5f7..0000000000 --- a/src/msw/statbox.cpp +++ /dev/null @@ -1,231 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: statbox.cpp -// Purpose: wxStaticBox -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "statbox.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/dcclient.h" -#include "wx/app.h" -#endif - -#include "wx/statbox.h" -#include "wx/msw/private.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl) - -BEGIN_EVENT_TABLE(wxStaticBox, wxControl) - EVT_ERASE_BACKGROUND(wxStaticBox::OnEraseBackground) -END_EVENT_TABLE() - -#endif - -/* - * Group box - */ - -bool wxStaticBox::Create(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - SetName(name); - - if (parent) parent->AddChild(this); - - SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; - SetForegroundColour(parent->GetDefaultForegroundColour()) ; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - m_windowStyle = style; - - long msStyle = BS_GROUPBOX | WS_CHILD | WS_VISIBLE ; // GROUP_FLAGS; - - bool want3D; - WXDWORD exStyle = Determine3DEffects(0, &want3D) ; - - HWND wx_button = - CreateWindowEx(exStyle, "BUTTON", (const char *)label, msStyle, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, - wxGetInstance(), NULL); -#if CTL3D - if (want3D) - { - Ctl3dSubclassCtl(wx_button); - m_useCtl3D = TRUE; - } -#endif - - m_hWnd = (WXHWND)wx_button; - - // Subclass again for purposes of dialog editing mode - SubclassWin(GetHWND()); - - SetFont(* parent->GetFont()); - - SetSize(x, y, width, height); - ShowWindow(wx_button, SW_SHOW); - - return TRUE; -} - -void wxStaticBox::SetLabel(const wxString& label) -{ - SetWindowText((HWND)m_hWnd, (const char *)label); -} - -void wxStaticBox::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - int currentX, currentY; - GetPosition(¤tX, ¤tY); - - int x1 = x; - int y1 = y; - int w1 = width; - int h1 = height; - - if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - x1 = currentX; - if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - y1 = currentY; - - AdjustForParentClientOrigin(x1, y1, sizeFlags); - - // If we're prepared to use the existing size, then... - if (width == -1 && height == -1 && ((sizeFlags & wxSIZE_AUTO) != wxSIZE_AUTO)) - { - GetSize(&w1, &h1); - } - - char buf[300]; - - int current_width; - - int cx; - int cy; - int cyf; - - HWND button = (HWND)m_hWnd; - wxGetCharSize(GetHWND(), &cx, &cy,GetFont()); - - GetWindowText(button, buf, 300); - GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL,GetFont()); - if (w1 < 0) - w1 = (int)(current_width + 3*cx) ; - if (h1<0) - h1 = (int)(cyf*EDIT_CONTROL_FACTOR) ; - MoveWindow(button, x1, y1, w1, h1, TRUE); -} - -WXHBRUSH wxStaticBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ -#if CTL3D - if ( m_useCtl3D ) - { - HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam); - return (WXHBRUSH) hbrush; - } -#endif - - if (GetParent()->GetTransparentBackground()) - SetBkMode((HDC) pDC, TRANSPARENT); - else - SetBkMode((HDC) pDC, OPAQUE); - - ::SetBkColor((HDC) pDC, RGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue())); - ::SetTextColor((HDC) pDC, RGB(GetForegroundColour().Red(), GetForegroundColour().Green(), GetForegroundColour().Blue())); - - wxBrush *backgroundBrush = wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID); - - // Note that this will be cleaned up in wxApp::OnIdle, if backgroundBrush - // has a zero usage count. -// backgroundBrush->RealizeResource(); - return (WXHBRUSH) backgroundBrush->GetResourceHandle(); -} - -// Shouldn't erase the whole window, since the static box must only paint its -// outline. -void wxStaticBox::OnEraseBackground(wxEraseEvent& event) -{ - // If we don't have this (call Default()), we don't paint the background properly. - // If we do have this, we seem to overwrite enclosed controls. - // Is it the WS_CLIPCHILDREN style that's causing the problems? - // Probably - without this style, the background of the window will show through, - // so the control doesn't have to paint it. The window background will always be - // painted before all other controls, therefore there are no problems with - // controls being hidden by the static box. - // So, if we could specify wxCLIP_CHILDREN in window, or not, we could optimise painting better. - // We would assume wxCLIP_CHILDREN in a frame and a scrolled window, but not in a panel. - // Is this too platform-specific?? What else can we do? Not a lot, since we have to pass - // this information from arbitrary wxWindow derivatives, and it depends on what you wish to - // do with the windows. - // Alternatively, just make sure that wxStaticBox is always at the back! There are probably - // few other circumstances where it matters about child clipping. But what about painting onto - // to panel, inside a groupbox? Doesn't appear, because the box wipes it out. - wxWindow *parent = GetParent(); - if ( parent && parent->GetHWND() && (::GetWindowLong((HWND) parent->GetHWND(), GWL_STYLE) & WS_CLIPCHILDREN) ) - { - // TODO: May in fact need to generate a paint event for inside this - // control's rectangle, otherwise all controls are going to be clipped - - // ugh. - HBRUSH hBrush = ::CreateSolidBrush(PALETTERGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue())); - int mode = ::SetMapMode((HDC) event.GetDC()->GetHDC(), MM_TEXT); - - RECT rect; - - ::GetClientRect((HWND) GetHWND(), &rect); - ::FillRect ((HDC) event.GetDC()->GetHDC(), &rect, hBrush); - ::DeleteObject(hBrush); - ::SetMapMode((HDC) event.GetDC()->GetHDC(), mode); - } - else - Default(); -} - -long wxStaticBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) -{ - if (nMsg == WM_NCHITTEST) - { - int xPos = LOWORD(lParam); // horizontal position of cursor - int yPos = HIWORD(lParam); // vertical position of cursor - - ScreenToClient(&xPos, &yPos); - - // Make sure you can drag by the top of the groupbox, but let - // other (enclosed) controls get mouse events also - if (yPos < 10) - return (long)HTCLIENT; - } - - return wxControl::MSWWindowProc(nMsg, wParam, lParam); -} - diff --git a/src/msw/statbr95.cpp b/src/msw/statbr95.cpp deleted file mode 100644 index 8cc90dee02..0000000000 --- a/src/msw/statbr95.cpp +++ /dev/null @@ -1,238 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: msw/statbr95.cpp -// Purpose: native implementation of wxStatusBar -// Author: Vadim Zeitlin -// Modified by: -// Created: 04.04.98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license -/////////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "statbr95.h" -#endif - -// ============================================================================ -// declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- - -// for compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif - -#ifndef WX_PRECOMP - #include "wx/setup.h" - #include "wx/frame.h" - #include "wx/settings.h" - #include "wx/dcclient.h" -#endif - -#include "wx/log.h" - -#include "wx/generic/statusbr.h" -#include "wx/msw/statbr95.h" - -#include -#include - -#ifndef __GNUWIN32__ -#include -#endif - -#if USE_NATIVE_STATUSBAR - -#if !USE_SHARED_LIBRARY - IMPLEMENT_DYNAMIC_CLASS(wxStatusBar95, wxStatusBar); - - BEGIN_EVENT_TABLE(wxStatusBar95, wxStatusBar) - EVT_PAINT(wxWindow::OnPaint) - EVT_SIZE(wxStatusBar95::OnSize) - END_EVENT_TABLE() -#endif //USE_SHARED_LIBRARY - - -// ---------------------------------------------------------------------------- -// macros -// ---------------------------------------------------------------------------- - -// windowsx.h and commctrl.h don't define those, so we do it here -#define StatusBar_SetParts(h, n, w) SendMessage(h, SB_SETPARTS, (WPARAM)n, (LPARAM)w) -#define StatusBar_SetText(h, n, t) SendMessage(h, SB_SETTEXT, (WPARAM)n, (LPARAM)(LPCSTR)t) -#define StatusBar_GetTextLen(h, n) LOWORD(SendMessage(h, SB_GETTEXTLENGTH, (WPARAM)n, 0)) -#define StatusBar_GetText(h, n, s) LOWORD(SendMessage(h, SB_GETTEXT, (WPARAM)n, (LPARAM)(LPSTR)s)) - -#define hwnd ((HWND)m_hWnd) - -// ============================================================================ -// implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// wxStatusBar95 class -// ---------------------------------------------------------------------------- - -wxStatusBar95::wxStatusBar95() -{ - SetParent(NULL); - m_hWnd = 0; - m_windowId = 0; -} - -wxStatusBar95::wxStatusBar95(wxWindow *parent, wxWindowID id, long style) -{ - Create(parent, id, style); -} - -bool wxStatusBar95::Create(wxWindow *parent, wxWindowID id, long style) -{ - SetParent(parent); - - if (id == -1) - m_windowId = NewControlId(); - else - m_windowId = id; - - DWORD wstyle = WS_CHILD | WS_VISIBLE; - if ( style & wxST_SIZEGRIP ) - wstyle |= SBARS_SIZEGRIP; - - m_hWnd = (WXHWND)CreateStatusWindow(wstyle, - "", - (HWND)parent->GetHWND(), - m_windowId); - if ( m_hWnd == 0 ) { - wxLogSysError("can't create status bar window"); - return FALSE; - } - - // this doesn't work: display problems (white 1-2 pixel borders...) - // SubclassWin(m_hWnd); - - return TRUE; -} - -void wxStatusBar95::CopyFieldsWidth(const int widths[]) -{ - if (widths && !m_statusWidths) - m_statusWidths = new int[m_nFields]; - - if ( widths != NULL ) { - for ( int i = 0; i < m_nFields; i++ ) - m_statusWidths[i] = widths[i]; - } - else { - delete [] m_statusWidths; - m_statusWidths = NULL; - } -} - -void wxStatusBar95::SetFieldsCount(int nFields, const int widths[]) -{ - wxASSERT( (nFields > 0) && (nFields < 255) ); - - m_nFields = nFields; - - CopyFieldsWidth(widths); - SetFieldsWidth(); -} - -void wxStatusBar95::SetStatusWidths(int n, const int widths[]) -{ - // @@ I don't understand what this function is for... - wxASSERT( n == m_nFields ); - - CopyFieldsWidth(widths); - SetFieldsWidth(); -} - -void wxStatusBar95::SetFieldsWidth() -{ - int *pWidths = new int[m_nFields]; - - int nWindowWidth, y; - GetClientSize(&nWindowWidth, &y); - - if ( m_statusWidths == NULL ) { - // default: all fields have the same width - int nWidth = nWindowWidth / m_nFields; - for ( int i = 0; i < m_nFields; i++ ) - pWidths[i] = (i + 1) * nWidth; - } - else { - // -1 doesn't mean the same thing for wxWindows and Win32, recalc - int nTotalWidth = 0, - nVarCount = 0, - i; - for ( i = 0; i < m_nFields; i++ ) { - if ( m_statusWidths[i] == -1 ) - nVarCount++; - else - nTotalWidth += m_statusWidths[i]; - } - - if ( nVarCount == 0 ) { - // wrong! at least one field must be of variable width - wxFAIL; - - nVarCount++; - } - - int nVarWidth = (nWindowWidth - nTotalWidth) / nVarCount; - - // do fill the array - int nCurPos = 0; - for ( i = 0; i < m_nFields; i++ ) { - if ( m_statusWidths[i] == -1 ) - nCurPos += nVarWidth; - else - nCurPos += m_statusWidths[i]; - pWidths[i] = nCurPos; - } - } - - if ( !StatusBar_SetParts(hwnd, m_nFields, pWidths) ) { - wxLogDebug("StatusBar_SetParts failed."); - } - - delete [] pWidths; -} - -void wxStatusBar95::SetStatusText(const wxString& strText, int nField) -{ - if ( !StatusBar_SetText(hwnd, nField, strText) ) { - wxLogDebug("StatusBar_SetText failed"); - } -} - -wxString wxStatusBar95::GetStatusText(int nField) const -{ - wxASSERT( (nField > -1) && (nField < m_nFields) ); - - wxString str(""); - int len = StatusBar_GetTextLen(hwnd, nField); - if (len > 0) - { - StatusBar_GetText(hwnd, nField, str.GetWriteBuf(len)); - str.UngetWriteBuf(); - } - return str; -} - -void wxStatusBar95::OnSize(wxSizeEvent& event) -{ - FORWARD_WM_SIZE(hwnd, SIZE_RESTORED, event.GetSize().x, event.GetSize().y, - SendMessage); - - // adjust fields widths to the new size - SetFieldsWidth(); -} - -#endif //USE_NATIVE_STATUSBAR \ No newline at end of file diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp deleted file mode 100644 index e203b5ebd7..0000000000 --- a/src/msw/stattext.cpp +++ /dev/null @@ -1,211 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: stattext.cpp -// Purpose: wxStaticText -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "stattext.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/app.h" -#endif - -#include "wx/stattext.h" -#include "wx/msw/private.h" -#include - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl) -#endif - -bool wxStaticText::Create(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - SetName(name); - if (parent) parent->AddChild(this); - - SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; - SetForegroundColour(parent->GetDefaultForegroundColour()) ; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - m_windowStyle = style; - - long msStyle = WS_CHILD|WS_VISIBLE; - if (m_windowStyle & wxALIGN_CENTRE) - msStyle |= SS_CENTER; - else if (m_windowStyle & wxALIGN_RIGHT) - msStyle |= SS_RIGHT; - else - msStyle |= SS_LEFT; - - // Even with extended styles, need to combine with WS_BORDER - // for them to look right. - if ((m_windowStyle & wxSIMPLE_BORDER) || (m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSUNKEN_BORDER) || (m_windowStyle & wxDOUBLE_BORDER)) - msStyle |= WS_BORDER; - - HWND static_item = CreateWindowEx(MakeExtendedStyle(m_windowStyle), "STATIC", (const char *)label, - msStyle, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, - wxGetInstance(), NULL); - -#if CTL3D -/* - if (!(GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS)) - Ctl3dSubclassCtl(static_item); -*/ -#endif - - m_hWnd = (WXHWND)static_item; - - SubclassWin((WXHWND)static_item); - - SetFont(* parent->GetFont()); - SetSize(x, y, width, height); - return TRUE; -} - -void wxStaticText::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - int currentX, currentY; - GetPosition(¤tX, ¤tY); - int x1 = x; - int y1 = y; - - if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - x1 = currentX; - if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - y1 = currentY; - - AdjustForParentClientOrigin(x1, y1, sizeFlags); - - int actualWidth = width; - int actualHeight = height; - - char buf[300]; - int current_width; - int cyf; - - ::GetWindowText((HWND) GetHWND(), buf, 300); - GetTextExtent(buf, ¤t_width, &cyf, NULL, NULL,GetFont()); - - int ww, hh; - GetSize(&ww, &hh); - - // If we're prepared to use the existing width, then... - if (width == -1 && ((sizeFlags & wxSIZE_AUTO_WIDTH) != wxSIZE_AUTO_WIDTH)) - actualWidth = ww; - else if (width == -1) - { - int cx; - int cy; - wxGetCharSize(GetHWND(), &cx, &cy,GetFont()); - actualWidth = (int)(current_width + cx) ; - } - - // If we're prepared to use the existing height, then... - if (height == -1 && ((sizeFlags & wxSIZE_AUTO_HEIGHT) != wxSIZE_AUTO_HEIGHT)) - actualHeight = hh; - else if (height == -1) - { - actualHeight = (int)(cyf) ; - } - - MoveWindow((HWND) GetHWND(), x1, y1, actualWidth, actualHeight, TRUE); -} - -void wxStaticText::SetLabel(const wxString& label) -{ - int w, h; - RECT rect; - - wxWindow *parent = GetParent(); - GetWindowRect((HWND) GetHWND(), &rect); - - // Since we now have the absolute screen coords, - // if there's a parent we must subtract its top left corner - POINT point; - point.x = rect.left; - point.y = rect.top; - if (parent) - { - ::ScreenToClient((HWND) parent->GetHWND(), &point); - } - - GetTextExtent(label, &w, &h, NULL, NULL, GetFont()); - MoveWindow((HWND) GetHWND(), point.x, point.y, (int)(w + 10), (int)h, - TRUE); - SetWindowText((HWND) GetHWND(), (const char *)label); -} - -WXHBRUSH wxStaticText::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ -/* -#if CTL3D - if ( m_useCtl3D ) - { - HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam); - - if (hbrush != (HBRUSH) 0) - return hbrush; - else - return (HBRUSH)MSWDefWindowProc(message, wParam, lParam); - } -#endif -*/ - - if (GetParent()->GetTransparentBackground()) - SetBkMode((HDC) pDC, TRANSPARENT); - else - SetBkMode((HDC) pDC, OPAQUE); - - ::SetBkColor((HDC) pDC, RGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue())); - ::SetTextColor((HDC) pDC, RGB(GetForegroundColour().Red(), GetForegroundColour().Green(), GetForegroundColour().Blue())); - - wxBrush *backgroundBrush = wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID); - - // Note that this will be cleaned up in wxApp::OnIdle, if backgroundBrush - // has a zero usage count. -// backgroundBrush->RealizeResource(); - return (WXHBRUSH) backgroundBrush->GetResourceHandle(); -} - -long wxStaticText::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) -{ - // Ensure that static items get messages. Some controls don't like this - // message to be intercepted (e.g. RichEdit), hence the tests. - if (nMsg == WM_NCHITTEST) - return (long)HTCLIENT; - - return wxWindow::MSWWindowProc(nMsg, wParam, lParam); -} - - diff --git a/src/msw/tabctrl.cpp b/src/msw/tabctrl.cpp deleted file mode 100644 index cec9af4086..0000000000 --- a/src/msw/tabctrl.cpp +++ /dev/null @@ -1,487 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tabctrl.cpp -// Purpose: wxTabCtrl -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "tabctrl.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx.h" -#endif - -#if defined(__WIN95__) - -#ifndef __GNUWIN32__ -#include "malloc.h" -#endif - -#include - -#ifndef __GNUWIN32__ -#include -#endif - -#ifdef __GNUWIN32__ -#include "wx/msw/gnuwin32/extra.h" -#endif - -#include "wx/msw/dib.h" -#include "wx/msw/tabctrl.h" -#include "wx/app.h" -#include "wx/msw/private.h" -#include "wx/msw/imaglist.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl, wxControl) - -BEGIN_EVENT_TABLE(wxTabCtrl, wxControl) - EVT_SIZE(wxTabCtrl::OnSize) - EVT_PAINT(wxTabCtrl::OnPaint) - EVT_KILL_FOCUS(wxTabCtrl::OnKillFocus) - EVT_MOUSE_EVENTS(wxTabCtrl::OnMouseEvent) - EVT_SYS_COLOUR_CHANGED(wxTabCtrl::OnSysColourChanged) -END_EVENT_TABLE() -#endif - -wxTabCtrl::wxTabCtrl() -{ - m_imageList = NULL; -} - -bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style, const wxString& name) -{ - m_imageList = NULL; - - m_backgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)), - GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE))); - m_foregroundColour = *wxBLACK ; - - m_defaultForegroundColour = *wxBLACK ; - m_defaultBackgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)), - GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE))); - - SetName(name); - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - m_windowStyle = style; - - SetFont(* (wxTheFontList->FindOrCreateFont(11, wxSWISS, wxNORMAL, wxNORMAL))); - - SetParent(parent); - - DWORD msflags = 0; - if (style & wxBORDER) - msflags |= WS_BORDER; - msflags |= WS_CHILD | WS_VISIBLE; - - if (width <= 0) - width = 100; - if (height <= 0) - height = 30; - if (x < 0) - x = 0; - if (y < 0) - y = 0; - - m_windowId = (id < 0 ? NewControlId() : id); - - long tabStyle = 0; - if (m_windowStyle & wxTC_MULTILINE) - tabStyle |= TCS_MULTILINE; - if (m_windowStyle & wxTC_RIGHTJUSTIFY) - tabStyle |= TCS_RIGHTJUSTIFY; - if (m_windowStyle & wxTC_FIXEDWIDTH) - tabStyle |= TCS_FIXEDWIDTH; - if (m_windowStyle & wxTC_OWNERDRAW) - tabStyle |= TCS_OWNERDRAWFIXED; - - tabStyle |= TCS_TOOLTIPS; - - // Create the toolbar control. - HWND hWndTabCtrl = CreateWindowEx(0L, // No extended styles. - WC_TABCONTROL, // Class name for the tab control - "", // No default text. - WS_CHILD | WS_BORDER | WS_VISIBLE | tabStyle, // Styles and defaults. - x, y, width, height, // Standard size and position. - (HWND) parent->GetHWND(), // Parent window - (HMENU)m_windowId, // ID. - wxGetInstance(), // Current instance. - NULL ); // No class data. - - m_hWnd = (WXHWND) hWndTabCtrl; - if (parent) parent->AddChild(this); - - SubclassWin((WXHWND) hWndTabCtrl); - - return TRUE; -} - -wxTabCtrl::~wxTabCtrl() -{ - UnsubclassWin(); -} - -void wxTabCtrl::Command(wxCommandEvent& event) -{ -} - -bool wxTabCtrl::MSWCommand(WXUINT cmd, WXWORD id) -{ - return FALSE; -} - -bool wxTabCtrl::MSWNotify(WXWPARAM wParam, WXLPARAM lParam) -{ - wxTabEvent event(wxEVT_NULL, m_windowId); - wxEventType eventType = wxEVT_NULL; - NMHDR* hdr1 = (NMHDR*) lParam; - switch ( hdr1->code ) - { - case TCN_SELCHANGE: - { - eventType = wxEVT_COMMAND_TAB_SEL_CHANGED; - event.SetInt( (int) LOWORD(wParam) ) ; - break; - } - case TCN_SELCHANGING: - { - eventType = wxEVT_COMMAND_TAB_SEL_CHANGING; - event.SetInt( (int) LOWORD(wParam) ) ; - break; - } - case TTN_NEEDTEXT: - { - // TODO -// if (tool->m_shortHelpString != "") -// ttText->lpszText = (char *) (const char *)tool->m_shortHelpString; - return wxControl::MSWNotify(wParam, lParam); - break; - } - - default : - return wxControl::MSWNotify(wParam, lParam); - break; - } - - event.SetEventObject( this ); - event.SetEventType(eventType); - - if ( !ProcessEvent(event) ) - return FALSE; - return TRUE; -} - -// Responds to colour changes, and passes event on to children. -void wxTabCtrl::OnSysColourChanged(wxSysColourChangedEvent& event) -{ - m_backgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)), - GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE))); - m_defaultBackgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)), - GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE))); - - // Remap the buttons -// CreateTools(); - - Default(); - - Refresh(); - - // Propagate the event to the non-top-level children - wxWindow::OnSysColourChanged(event); -} - -// Delete all items -bool wxTabCtrl::DeleteAllItems() -{ - return ( TabCtrl_DeleteAllItems( (HWND) GetHWND() ) != FALSE ); -} - -// Delete an item -bool wxTabCtrl::DeleteItem(int item) -{ - return ( TabCtrl_DeleteItem( (HWND) GetHWND(), item) != FALSE ); -} - -// Get the selection -int wxTabCtrl::GetSelection() const -{ - return (int) TabCtrl_GetCurSel( (HWND) GetHWND() ); -} - -// Get the tab with the current keyboard focus -int wxTabCtrl::GetCurFocus() const -{ - return (int) TabCtrl_GetCurFocus( (HWND) GetHWND() ); -} - -// Get the associated image list -wxImageList* wxTabCtrl::GetImageList() const -{ - return m_imageList; -} - -// Get the number of items -int wxTabCtrl::GetItemCount() const -{ - return (int) TabCtrl_GetItemCount( (HWND) GetHWND() ); -} - -// Get the rect corresponding to the tab -bool wxTabCtrl::GetItemRect(int item, wxRect& wxrect) const -{ - RECT rect; - if ( !TabCtrl_GetItemRect( (HWND) GetHWND(), item, & rect) ) - return FALSE; - else - { - wxrect.x = rect.left; wxrect.y = rect.top; - wxrect.width = rect.right - rect.left; - wxrect.height = rect.bottom - rect.top; - return TRUE; - } -} - -// Get the number of rows -int wxTabCtrl::GetRowCount() const -{ - return (int) TabCtrl_GetRowCount( (HWND) GetHWND() ); -} - -// Get the item text -wxString wxTabCtrl::GetItemText(int item) const -{ - char buf[256]; - wxString str(""); - TC_ITEM tcItem; - tcItem.mask = TCIF_TEXT; - tcItem.pszText = buf; - tcItem.cchTextMax = 256; - - if (TabCtrl_GetItem( (HWND) GetHWND(), item, & tcItem) ) - str = tcItem.pszText; - - return str; -} - -// Get the item image -int wxTabCtrl::GetItemImage(int item) const -{ - TC_ITEM tcItem; - tcItem.mask = TCIF_IMAGE; - - if (TabCtrl_GetItem( (HWND) GetHWND(), item, & tcItem) ) - return tcItem.iImage; - else - return -1; -} - -// Get the item data -void* wxTabCtrl::GetItemData(int item) const -{ - TC_ITEM tcItem; - tcItem.mask = TCIF_PARAM; - - if (TabCtrl_GetItem( (HWND) GetHWND(), item, & tcItem) ) - return (void*) tcItem.lParam; - else - return 0; -} - -// Hit test -int wxTabCtrl::HitTest(const wxPoint& pt, long& flags) -{ - TC_HITTESTINFO hitTestInfo; - hitTestInfo.pt.x = pt.x; - hitTestInfo.pt.y = pt.y; - int item = TabCtrl_HitTest( (HWND) GetHWND(), & hitTestInfo ) ; - flags = 0; - - if ((hitTestInfo.flags & TCHT_NOWHERE) == TCHT_NOWHERE) - flags |= wxTAB_HITTEST_NOWHERE; - if ((hitTestInfo.flags & TCHT_ONITEMICON) == TCHT_ONITEMICON) - flags |= wxTAB_HITTEST_ONICON; - if ((hitTestInfo.flags & TCHT_ONITEMLABEL) == TCHT_ONITEMLABEL) - flags |= wxTAB_HITTEST_ONLABEL; - - return item; -} - -// Insert an item -bool wxTabCtrl::InsertItem(int item, const wxString& text, int imageId, void* data) -{ - char buf[256]; - TC_ITEM tcItem; - tcItem.mask = TCIF_PARAM; - tcItem.lParam = (long) data; - if (text != "") - { - tcItem.mask |= TCIF_TEXT; - strcpy(buf, (const char*) text); - tcItem.pszText = buf; - tcItem.cchTextMax = 256; - } - if (imageId != -1) - { - tcItem.mask |= TCIF_IMAGE; - tcItem.iImage = imageId; - } - - return (TabCtrl_InsertItem( (HWND) GetHWND(), item, & tcItem) != -1); -} - -// Set the selection -int wxTabCtrl::SetSelection(int item) -{ - return (int) TabCtrl_SetCurSel( (HWND) GetHWND(), item ); -} - -// Set the image list -void wxTabCtrl::SetImageList(wxImageList* imageList) -{ - m_imageList = imageList; - TabCtrl_SetImageList( (HWND) GetHWND(), (HIMAGELIST) imageList->GetHIMAGELIST() ); -} - -// Set the text for an item -bool wxTabCtrl::SetItemText(int item, const wxString& text) -{ - char buf[256]; - TC_ITEM tcItem; - tcItem.mask = TCIF_TEXT; - strcpy(buf, (const char*) text); - tcItem.pszText = buf; - tcItem.cchTextMax = 256; - - return ( TabCtrl_SetItem( (HWND) GetHWND(), item, & tcItem) != 0 ); -} - -// Set the image for an item -bool wxTabCtrl::SetItemImage(int item, int image) -{ - TC_ITEM tcItem; - tcItem.mask = TCIF_IMAGE; - tcItem.iImage = image; - - return ( TabCtrl_SetItem( (HWND) GetHWND(), item, & tcItem) != 0 ); -} - -// Set the data for an item -bool wxTabCtrl::SetItemData(int item, void* data) -{ - TC_ITEM tcItem; - tcItem.mask = TCIF_PARAM; - tcItem.lParam = (long) data; - - return ( TabCtrl_SetItem( (HWND) GetHWND(), item, & tcItem) != 0 ); -} - -// Set the size for a fixed-width tab control -void wxTabCtrl::SetItemSize(const wxSize& size) -{ - TabCtrl_SetItemSize( (HWND) GetHWND(), size.x, size.y ); -} - -// Set the padding between tabs -void wxTabCtrl::SetPadding(const wxSize& padding) -{ - TabCtrl_SetPadding( (HWND) GetHWND(), padding.x, padding.y ); -} - -#if 0 -// These are the default colors used to map the bitmap colors -// to the current system colors - -#define BGR_BUTTONTEXT (RGB(000,000,000)) // black -#define BGR_BUTTONSHADOW (RGB(128,128,128)) // dark grey -#define BGR_BUTTONFACE (RGB(192,192,192)) // bright grey -#define BGR_BUTTONHILIGHT (RGB(255,255,255)) // white -#define BGR_BACKGROUNDSEL (RGB(255,000,000)) // blue -#define BGR_BACKGROUND (RGB(255,000,255)) // magenta - -void wxMapBitmap(HBITMAP hBitmap, int width, int height) -{ - COLORMAP ColorMap[] = { - {BGR_BUTTONTEXT, COLOR_BTNTEXT}, // black - {BGR_BUTTONSHADOW, COLOR_BTNSHADOW}, // dark grey - {BGR_BUTTONFACE, COLOR_BTNFACE}, // bright grey - {BGR_BUTTONHILIGHT, COLOR_BTNHIGHLIGHT},// white - {BGR_BACKGROUNDSEL, COLOR_HIGHLIGHT}, // blue - {BGR_BACKGROUND, COLOR_WINDOW} // magenta - }; - - int NUM_MAPS = (sizeof(ColorMap)/sizeof(COLORMAP)); - int n; - for ( n = 0; n < NUM_MAPS; n++) - { - ColorMap[n].to = ::GetSysColor(ColorMap[n].to); - } - - HBITMAP hbmOld; - HDC hdcMem = CreateCompatibleDC(NULL); - - if (hdcMem) - { - hbmOld = SelectObject(hdcMem, hBitmap); - - int i, j, k; - for ( i = 0; i < width; i++) - { - for ( j = 0; j < height; j++) - { - COLORREF pixel = ::GetPixel(hdcMem, i, j); -/* - BYTE red = GetRValue(pixel); - BYTE green = GetGValue(pixel); - BYTE blue = GetBValue(pixel); -*/ - - for ( k = 0; k < NUM_MAPS; k ++) - { - if ( ColorMap[k].from == pixel ) - { - /* COLORREF actualPixel = */ ::SetPixel(hdcMem, i, j, ColorMap[k].to); - break; - } - } - } - } - - - SelectObject(hdcMem, hbmOld); - DeleteObject(hdcMem); - } - -} -#endif - -// Tab event -IMPLEMENT_DYNAMIC_CLASS(wxTabEvent, wxCommandEvent) - -wxTabEvent::wxTabEvent(wxEventType commandType, int id): - wxCommandEvent(commandType, id) -{ -} - - -#endif - // __WIN95__ diff --git a/src/msw/taskbar.cpp b/src/msw/taskbar.cpp deleted file mode 100644 index be8f8cd3c7..0000000000 --- a/src/msw/taskbar.cpp +++ /dev/null @@ -1,286 +0,0 @@ -///////////////////////////////////////////////////////////////////////// -// File: taskbar.cpp -// Purpose: Implements wxTaskBarIcon class for manipulating icons on -// the Windows task bar. -// Author: Julian Smart -// Modified by: -// Created: 24/3/98 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "taskbar.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" -#endif - -#ifdef __WIN95__ - -#include -#include -#include -#include - -#ifdef __GNUWIN32__ -#include -#endif - -LRESULT APIENTRY _EXPORT wxTaskBarIconWindowProc( HWND hWnd, unsigned msg, - UINT wParam, LONG lParam ); - -char *wxTaskBarWindowClass = "wxTaskBarWindowClass"; - -wxList wxTaskBarIcon::sm_taskBarIcons; -bool wxTaskBarIcon::sm_registeredClass = FALSE; -UINT wxTaskBarIcon::sm_taskbarMsg = 0; - -wxTaskBarIcon::wxTaskBarIcon(void) -{ - m_hWnd = 0; - m_iconAdded = FALSE; - - AddObject(this); - - if (RegisterWindowClass()) - m_hWnd = CreateTaskBarWindow(); -} - -wxTaskBarIcon::~wxTaskBarIcon(void) -{ - RemoveObject(this); - - if (m_iconAdded) - { - RemoveIcon(); - } - - if (m_hWnd) - { - ::DestroyWindow((HWND) m_hWnd); - m_hWnd = 0; - } -} - -// Operations -bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip) -{ - if (!IsOK()) - return FALSE; - - NOTIFYICONDATA notifyData; - - memset(¬ifyData, 0, sizeof(notifyData)); - notifyData.cbSize = sizeof(notifyData); - notifyData.hWnd = (HWND) m_hWnd; - notifyData.uCallbackMessage = sm_taskbarMsg; - notifyData.uFlags = NIF_MESSAGE ; - if (icon.Ok()) - { - notifyData.uFlags |= NIF_ICON; - notifyData.hIcon = (HICON) icon.GetHICON(); - } - - if (((const char*) tooltip != NULL) && (tooltip != "")) - { - notifyData.uFlags |= NIF_TIP ; - lstrcpyn(notifyData.szTip, (char*) (const char*) tooltip, sizeof(notifyData.szTip)); - } - - notifyData.uID = 99; - - if (m_iconAdded) - return (Shell_NotifyIcon(NIM_MODIFY, & notifyData) != 0); - else - { - m_iconAdded = (Shell_NotifyIcon(NIM_ADD, & notifyData) != 0); - return m_iconAdded; - } -} - -bool wxTaskBarIcon::RemoveIcon(void) -{ - if (!m_iconAdded) - return FALSE; - - NOTIFYICONDATA notifyData; - - memset(¬ifyData, 0, sizeof(notifyData)); - notifyData.cbSize = sizeof(notifyData); - notifyData.hWnd = (HWND) m_hWnd; - notifyData.uCallbackMessage = sm_taskbarMsg; - notifyData.uFlags = NIF_MESSAGE; - notifyData.hIcon = 0 ; // hIcon; - notifyData.uID = 99; - m_iconAdded = FALSE; - - return (Shell_NotifyIcon(NIM_DELETE, & notifyData) != 0); -} - -// Overridables -void wxTaskBarIcon::OnMouseMove(void) -{ -} - -void wxTaskBarIcon::OnLButtonDown(void) -{ -} - -void wxTaskBarIcon::OnLButtonUp(void) -{ -} - -void wxTaskBarIcon::OnRButtonDown(void) -{ -} - -void wxTaskBarIcon::OnRButtonUp(void) -{ -} - -void wxTaskBarIcon::OnLButtonDClick(void) -{ -} - -void wxTaskBarIcon::OnRButtonDClick(void) -{ -} - -wxTaskBarIcon* wxTaskBarIcon::FindObjectForHWND(WXHWND hWnd) -{ - wxNode*node = sm_taskBarIcons.First(); - while (node) - { - wxTaskBarIcon* obj = (wxTaskBarIcon*) node->Data(); - if (obj->GetHWND() == hWnd) - return obj; - node = node->Next(); - } - return NULL; -} - -void wxTaskBarIcon::AddObject(wxTaskBarIcon* obj) -{ - sm_taskBarIcons.Append(obj); -} - -void wxTaskBarIcon::RemoveObject(wxTaskBarIcon* obj) -{ - sm_taskBarIcons.DeleteObject(obj); -} - -bool wxTaskBarIcon::RegisterWindowClass() -{ - if (sm_registeredClass) - return TRUE; - - // Also register the taskbar message here - sm_taskbarMsg = ::RegisterWindowMessage("wxTaskBarIconMessage"); - - WNDCLASS wc; - bool rc; - - HINSTANCE hInstance = GetModuleHandle(NULL); - - /* - * set up and register window class - */ - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.lpfnWndProc = (WNDPROC) wxTaskBarIconWindowProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = hInstance; - wc.hIcon = 0; - wc.hCursor = 0; - wc.hbrBackground = 0; - wc.lpszMenuName = NULL; - wc.lpszClassName = wxTaskBarWindowClass ; - rc = (::RegisterClass( &wc ) != 0); - - sm_registeredClass = (rc != 0); - - return( (rc != 0) ); -} - -WXHWND wxTaskBarIcon::CreateTaskBarWindow() -{ - HINSTANCE hInstance = GetModuleHandle(NULL); - - HWND hWnd = CreateWindowEx (0, wxTaskBarWindowClass, - "wxTaskBarWindow", - WS_OVERLAPPED, - 0, - 0, - 10, - 10, - NULL, - (HMENU) 0, - hInstance, - NULL); - - return (WXHWND) hWnd; -} - -long wxTaskBarIcon::WindowProc( WXHWND hWnd, unsigned int msg, unsigned int wParam, long lParam ) -{ - if (msg != sm_taskbarMsg) - return DefWindowProc((HWND) hWnd, msg, wParam, lParam); - - switch (lParam) - { - case WM_LBUTTONDOWN: - OnLButtonDown(); - break; - - case WM_LBUTTONUP: - OnLButtonUp(); - break; - - case WM_RBUTTONDOWN: - OnRButtonDown(); - break; - - case WM_RBUTTONUP: - OnRButtonUp(); - break; - - case WM_LBUTTONDBLCLK: - OnLButtonDClick(); - break; - - case WM_RBUTTONDBLCLK: - OnRButtonDClick(); - break; - - case WM_MOUSEMOVE: - OnMouseMove(); - break; - - default: - break; - } - return 0; -} - -LRESULT APIENTRY _EXPORT wxTaskBarIconWindowProc( HWND hWnd, unsigned msg, - UINT wParam, LONG lParam ) -{ - wxTaskBarIcon* obj = wxTaskBarIcon::FindObjectForHWND((WXHWND) hWnd); - if (obj) - return obj->WindowProc((WXHWND) hWnd, msg, wParam, lParam); - else - return DefWindowProc(hWnd, msg, wParam, lParam); -} - -#endif - // __WIN95__ diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp deleted file mode 100644 index 12b4f41ba8..0000000000 --- a/src/msw/tbar95.cpp +++ /dev/null @@ -1,588 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tbar95.cpp -// Purpose: wxToolBar95 -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "tbar95.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx.h" -#endif - -#if USE_BUTTONBAR && USE_TOOLBAR && defined(__WIN95__) - -#ifndef __GNUWIN32__ -#include "malloc.h" -#endif - -#include - -#ifndef __GNUWIN32__ -#include -#endif - -#ifdef __GNUWIN32__ -#include "wx/msw/gnuwin32/extra.h" -#endif - -#include "wx/msw/dib.h" -#include "wx/tbar95.h" -#include "wx/app.h" -#include "wx/msw/private.h" - -// Styles -#ifndef TBSTYLE_FLAT -#define TBSTYLE_LIST 0x1000 -#define TBSTYLE_FLAT 0x0800 -#define TBSTYLE_TRANSPARENT 0x8000 -#endif - // use TBSTYLE_TRANSPARENT if you use TBSTYLE_FLAT - -// Messages -#ifndef TB_GETSTYLE -#define TB_GETSTYLE (WM_USER + 57) -#define TB_SETSTYLE (WM_USER + 56) -#endif - -/* Hint from a newsgroup for custom flatbar drawing: -Set the TBSTYLE_CUSTOMERASE style, then handle the -NM_CUSTOMDRAW message and do your custom drawing. -*/ - -#define DEFAULTBITMAPX 16 -#define DEFAULTBITMAPY 15 -#define DEFAULTBUTTONX 24 -#define DEFAULTBUTTONY 24 -#define DEFAULTBARHEIGHT 27 - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxToolBar95, wxToolBarBase) - -BEGIN_EVENT_TABLE(wxToolBar95, wxToolBarBase) - EVT_SIZE(wxToolBar95::OnSize) - EVT_PAINT(wxToolBar95::OnPaint) - EVT_KILL_FOCUS(wxToolBar95::OnKillFocus) - EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent) - EVT_SYS_COLOUR_CHANGED(wxToolBar95::OnSysColourChanged) -END_EVENT_TABLE() -#endif - -void wxMapBitmap(HBITMAP hBitmap, int width, int height); - -wxToolBar95::wxToolBar95(void) -{ - m_maxWidth = -1; - m_maxHeight = -1; - m_hBitmap = 0; - m_defaultWidth = DEFAULTBITMAPX; - m_defaultHeight = DEFAULTBITMAPY; -} - -bool wxToolBar95::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style, const wxString& name) -{ - m_backgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)), - GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE))); - m_foregroundColour = *wxBLACK ; - - m_defaultForegroundColour = *wxBLACK ; - m_defaultBackgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)), - GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE))); - - if (style & wxTB_VERTICAL) - wxMessageBox("Sorry, wxToolBar95 under Windows 95 only supports horizontal orientation.", "wxToolBar95 usage", wxOK); - m_maxWidth = -1; - m_maxHeight = -1; - - m_hBitmap = 0; - - m_defaultWidth = DEFAULTBITMAPX; - m_defaultHeight = DEFAULTBITMAPY; - SetName(name); - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - m_windowStyle = style; - - SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT)); - - SetParent(parent); - - DWORD msflags = 0; - if (style & wxBORDER) - msflags |= WS_BORDER; - msflags |= WS_CHILD | WS_VISIBLE; - - if (width <= 0) - width = 100; - if (height <= 0) - height = 30; - if (x < 0) - x = 0; - if (y < 0) - y = 0; - - m_windowId = (id < 0 ? NewControlId() : id); - DWORD msStyle = WS_CHILD | WS_BORDER | WS_VISIBLE | TBSTYLE_TOOLTIPS; - - if (style & wxTB_FLAT) - { - if (wxTheApp->GetComCtl32Version() > 400) - msStyle |= TBSTYLE_FLAT; - } - - // Create the toolbar control. - HWND hWndToolbar = CreateWindowEx(0L, // No extended styles. - TOOLBARCLASSNAME, // Class name for the toolbar. - "", // No default text. - msStyle, // Styles and defaults. - x, y, width, height, // Standard toolbar size and position. - (HWND) parent->GetHWND(), // Parent window of the toolbar. - (HMENU)m_windowId, // Toolbar ID. - wxGetInstance(), // Current instance. - NULL ); // No class data. - - // Toolbar-specific initialisation - ::SendMessage(hWndToolbar, TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), (LPARAM)0); - - m_hWnd = (WXHWND) hWndToolbar; - if (parent) parent->AddChild(this); - - SubclassWin((WXHWND) hWndToolbar); - - return TRUE; -} - -wxToolBar95::~wxToolBar95(void) -{ - UnsubclassWin(); - - if (m_hBitmap) - { - ::DeleteObject((HBITMAP) m_hBitmap); - m_hBitmap = 0; - } -} - -bool wxToolBar95::CreateTools(void) -{ - if (m_tools.Number() == 0) - return FALSE; - - HBITMAP oldToolBarBitmap = (HBITMAP) m_hBitmap; - - int totalBitmapWidth = (int)(m_defaultWidth * m_tools.Number()); - int totalBitmapHeight = (int)m_defaultHeight; - - // Create a bitmap for all the tool bitmaps - HDC dc = ::GetDC(NULL); - m_hBitmap = (WXHBITMAP) ::CreateCompatibleBitmap(dc, totalBitmapWidth, totalBitmapHeight); - ::ReleaseDC(NULL, dc); - - // Now blit all the tools onto this bitmap - HDC memoryDC = ::CreateCompatibleDC(NULL); - HBITMAP oldBitmap = (HBITMAP) ::SelectObject(memoryDC, (HBITMAP) m_hBitmap); - - HDC memoryDC2 = ::CreateCompatibleDC(NULL); - int x = 0; - wxNode *node = m_tools.First(); - int noButtons = 0; - while (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - if ((tool->m_toolStyle != wxTOOL_STYLE_SEPARATOR) && tool->m_bitmap1.Ok() && tool->m_bitmap1.GetHBITMAP()) - { -// wxPalette *palette = tool->m_bitmap1->GetPalette(); - - HBITMAP oldBitmap2 = (HBITMAP) ::SelectObject(memoryDC2, (HBITMAP) tool->m_bitmap1.GetHBITMAP()); - /* int bltResult = */ - BitBlt(memoryDC, x, 0, (int) m_defaultWidth, (int) m_defaultHeight, memoryDC2, - 0, 0, SRCCOPY); - ::SelectObject(memoryDC2, oldBitmap2); - x += (int)m_defaultWidth; - noButtons ++; - } - node = node->Next(); - } - ::SelectObject(memoryDC, oldBitmap); - ::DeleteDC(memoryDC); - ::DeleteDC(memoryDC2); - - // Map to system colours - wxMapBitmap((HBITMAP) m_hBitmap, totalBitmapWidth, totalBitmapHeight); - - if ( oldToolBarBitmap ) - { - TBREPLACEBITMAP replaceBitmap; - replaceBitmap.hInstOld = NULL; - replaceBitmap.hInstNew = NULL; - replaceBitmap.nIDOld = (UINT) oldToolBarBitmap; - replaceBitmap.nIDNew = (UINT) (HBITMAP) m_hBitmap; - replaceBitmap.nButtons = noButtons; - if (::SendMessage((HWND) GetHWND(), TB_REPLACEBITMAP, (WPARAM) 0, (LPARAM) &replaceBitmap) == -1) - wxMessageBox("Could not add bitmap to toolbar"); - - ::DeleteObject((HBITMAP) oldToolBarBitmap); - - // Now delete all the buttons - int i = 0; - while ( TRUE ) - { - // TODO: What about separators???? They don't have an id! - if ( ! ::SendMessage( (HWND) GetHWND(), TB_DELETEBUTTON, i, 0 ) ) - break; - } - } - else - { - TBADDBITMAP addBitmap; - addBitmap.hInst = 0; - addBitmap.nID = (UINT)m_hBitmap; - if (::SendMessage((HWND) GetHWND(), TB_ADDBITMAP, (WPARAM) noButtons, (LPARAM) &addBitmap) == -1) - wxMessageBox("Could not add bitmap to toolbar"); - } - - // Now add the buttons. - TBBUTTON buttons[50]; - - node = m_tools.First(); - int i = 0; - int bitmapId = 0; - while (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - if (tool->m_toolStyle == wxTOOL_STYLE_SEPARATOR) - { - buttons[i].iBitmap = 0; - buttons[i].idCommand = 0; - - buttons[i].fsState = TBSTATE_ENABLED; - buttons[i].fsStyle = TBSTYLE_SEP; - buttons[i].dwData = 0L; - buttons[i].iString = 0; - } - else - { - buttons[i].iBitmap = bitmapId; - buttons[i].idCommand = tool->m_index; - - buttons[i].fsState = 0; - if (tool->m_enabled) - buttons[i].fsState |= TBSTATE_ENABLED; - if (tool->m_toggleState) - buttons[i].fsState |= TBSTATE_CHECKED; - buttons[i].fsStyle = tool->m_isToggle ? TBSTYLE_CHECK : TBSTYLE_BUTTON; - buttons[i].dwData = 0L; - buttons[i].iString = 0; - - bitmapId ++; - } - - i ++; - node = node->Next(); - } - - int ans = (int)::SendMessage((HWND) GetHWND(), TB_ADDBUTTONS, (WPARAM)i, (LPARAM)& buttons); - ans = (int)::SendMessage((HWND) GetHWND(), TB_AUTOSIZE, (WPARAM)0, (LPARAM) 0); - - RECT rect; - ::SendMessage((HWND) GetHWND(), TB_SETROWS, MAKEWPARAM(m_maxRows, TRUE), (LPARAM) & rect); - m_maxWidth = (rect.right - rect.left + 2); - m_maxHeight = (rect.bottom - rect.top + 2); - - return TRUE; -} - -bool wxToolBar95::MSWCommand(WXUINT cmd, WXWORD id) -{ - wxNode *node = m_tools.Find((long)id); - if (!node) - return FALSE; - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - if (tool->m_isToggle) - tool->m_toggleState = (1 == (1 & (int)::SendMessage((HWND) GetHWND(), TB_GETSTATE, (WPARAM) id, (LPARAM) 0))); - - BOOL ret = OnLeftClick((int)id, tool->m_toggleState); - if (ret == FALSE && tool->m_isToggle) - { - tool->m_toggleState = !tool->m_toggleState; - ::SendMessage((HWND) GetHWND(), TB_CHECKBUTTON, (WPARAM)id, (LPARAM)MAKELONG(tool->m_toggleState, 0)); - } - return TRUE; -} - -bool wxToolBar95::MSWNotify(WXWPARAM WXUNUSED(wParam), WXLPARAM lParam) -{ - // First check if this applies to us - NMHDR *hdr = (NMHDR *)lParam; - if (hdr->code != TTN_NEEDTEXT) - return FALSE; - - HWND toolTipWnd = (HWND) ::SendMessage((HWND) GetHWND(), TB_GETTOOLTIPS, 0, 0); - if ( toolTipWnd != hdr->hwndFrom ) - return FALSE; - - LPTOOLTIPTEXT ttText = (LPTOOLTIPTEXT) lParam; - int id = (int)ttText->hdr.idFrom; - wxNode *node = m_tools.Find((long)id); - if (!node) - return FALSE; - - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - - switch (ttText->hdr.code) - { - case TTN_NEEDTEXT: - { - if (tool->m_shortHelpString != "") - ttText->lpszText = (char *) (const char *)tool->m_shortHelpString; - - // For backward compatibility... - OnMouseEnter(tool->m_index); - break; - } - default: - return FALSE; - break; - } - - return TRUE; -} - -void wxToolBar95::SetToolBitmapSize(const wxSize& size) -{ - m_defaultWidth = size.x; m_defaultHeight = size.y; - ::SendMessage((HWND) GetHWND(), TB_SETBITMAPSIZE, 0, (LPARAM) MAKELONG ((int)size.x, (int)size.y)); -} - -void wxToolBar95::SetRows(int nRows) -{ - RECT rect; - ::SendMessage((HWND) GetHWND(), TB_SETROWS, MAKEWPARAM(nRows, TRUE), (LPARAM) & rect); - m_maxWidth = (rect.right - rect.left + 2); - m_maxHeight = (rect.bottom - rect.top + 2); -} - -wxSize wxToolBar95::GetMaxSize(void) const -{ - if (m_maxWidth == -1 | m_maxHeight == -1) - { - RECT rect; - ::SendMessage((HWND) GetHWND(), TB_SETROWS, MAKEWPARAM(m_maxRows, TRUE), (LPARAM) & rect); - ((wxToolBar95 *)this)->m_maxWidth = (rect.right - rect.left + 2); // ??? - ((wxToolBar95 *)this)->m_maxHeight = (rect.bottom - rect.top + 2); // ??? - } - return wxSize(m_maxWidth, m_maxHeight); -} - -void wxToolBar95::GetSize(int *w, int *h) const -{ - wxWindow::GetSize(w, h); - // For some reason, the returned height is several pixels bigger than that - // displayed! - *h -= 2; -} - -// The button size is bigger than the bitmap size -wxSize wxToolBar95::GetToolSize(void) const -{ - return wxSize(m_defaultWidth + 8, m_defaultHeight + 7); -} - -void wxToolBar95::EnableTool(int toolIndex, bool enable) -{ - wxNode *node = m_tools.Find((long)toolIndex); - if (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - tool->m_enabled = enable; - ::SendMessage((HWND) GetHWND(), TB_ENABLEBUTTON, (WPARAM)toolIndex, (LPARAM)MAKELONG(enable, 0)); - } -} - -void wxToolBar95::ToggleTool(int toolIndex, bool toggle) -{ - wxNode *node = m_tools.Find((long)toolIndex); - if (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - if (tool->m_isToggle) - { - tool->m_toggleState = toggle; - ::SendMessage((HWND) GetHWND(), TB_CHECKBUTTON, (WPARAM)toolIndex, (LPARAM)MAKELONG(toggle, 0)); - } - } -} - -bool wxToolBar95::GetToolState(int toolIndex) const -{ - return (::SendMessage((HWND) GetHWND(), TB_ISBUTTONCHECKED, (WPARAM)toolIndex, (LPARAM)0) != 0); -} - -void wxToolBar95::ClearTools(void) -{ - // TODO: Don't know how to reset the toolbar bitmap, as yet. - // But adding tools and calling CreateTools should probably - // recreate a buttonbar OK. - wxToolBarBase::ClearTools(); -} - -// If pushedBitmap is NULL, a reversed version of bitmap is -// created and used as the pushed/toggled image. -// If toggle is TRUE, the button toggles between the two states. -wxToolBarTool *wxToolBar95::AddTool(int index, const wxBitmap& bitmap, const wxBitmap& pushedBitmap, - bool toggle, long xPos, long yPos, wxObject *clientData, const wxString& helpString1, const wxString& helpString2) -{ - wxToolBarTool *tool = new wxToolBarTool(index, bitmap, (wxBitmap *)NULL, toggle, xPos, yPos, helpString1, helpString2); - tool->m_clientData = clientData; - - if (xPos > -1) - tool->m_x = xPos; - else - tool->m_x = m_xMargin; - - if (yPos > -1) - tool->m_y = yPos; - else - tool->m_y = m_yMargin; - - tool->SetSize(GetDefaultButtonWidth(), GetDefaultButtonHeight()); - - m_tools.Append((long)index, tool); - return tool; -} - -// Responds to colour changes, and passes event on to children. -void wxToolBar95::OnSysColourChanged(wxSysColourChangedEvent& event) -{ - m_backgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)), - GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE))); - m_defaultBackgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)), - GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE))); - - // Remap the buttons - CreateTools(); - - Default(); - - Refresh(); - - // Propagate the event to the non-top-level children - wxWindow::OnSysColourChanged(event); -} - -// These are the default colors used to map the bitmap colors -// to the current system colors - -#define BGR_BUTTONTEXT (RGB(000,000,000)) // black -#define BGR_BUTTONSHADOW (RGB(128,128,128)) // dark grey -#define BGR_BUTTONFACE (RGB(192,192,192)) // bright grey -#define BGR_BUTTONHILIGHT (RGB(255,255,255)) // white -#define BGR_BACKGROUNDSEL (RGB(255,000,000)) // blue -#define BGR_BACKGROUND (RGB(255,000,255)) // magenta - -void wxMapBitmap(HBITMAP hBitmap, int width, int height) -{ - COLORMAP ColorMap[] = { - {BGR_BUTTONTEXT, COLOR_BTNTEXT}, // black - {BGR_BUTTONSHADOW, COLOR_BTNSHADOW}, // dark grey - {BGR_BUTTONFACE, COLOR_BTNFACE}, // bright grey - {BGR_BUTTONHILIGHT, COLOR_BTNHIGHLIGHT},// white - {BGR_BACKGROUNDSEL, COLOR_HIGHLIGHT}, // blue - {BGR_BACKGROUND, COLOR_WINDOW} // magenta - }; - - int NUM_MAPS = (sizeof(ColorMap)/sizeof(COLORMAP)); - int n; - for ( n = 0; n < NUM_MAPS; n++) - { - ColorMap[n].to = ::GetSysColor(ColorMap[n].to); - } - - HBITMAP hbmOld; - HDC hdcMem = CreateCompatibleDC(NULL); - - if (hdcMem) - { - hbmOld = (HBITMAP) SelectObject(hdcMem, hBitmap); - - int i, j, k; - for ( i = 0; i < width; i++) - { - for ( j = 0; j < height; j++) - { - COLORREF pixel = ::GetPixel(hdcMem, i, j); -/* - BYTE red = GetRValue(pixel); - BYTE green = GetGValue(pixel); - BYTE blue = GetBValue(pixel); -*/ - - for ( k = 0; k < NUM_MAPS; k ++) - { - if ( ColorMap[k].from == pixel ) - { - /* COLORREF actualPixel = */ ::SetPixel(hdcMem, i, j, ColorMap[k].to); - break; - } - } - } - } - - - SelectObject(hdcMem, hbmOld); - DeleteObject(hdcMem); - } - -} - -// Some experiments... -#if 0 - // What we want to do is create another bitmap which has a depth of 4, - // and set the bits. So probably we want to convert this HBITMAP into a - // DIB, then call SetDIBits. - // AAAGH. The stupid thing is that if newBitmap has a depth of 4 (less than that of - // the screen), then SetDIBits fails. - HBITMAP newBitmap = ::CreateBitmap(totalBitmapWidth, totalBitmapHeight, 1, 4, NULL); - HANDLE newDIB = ::BitmapToDIB((HBITMAP) m_hBitmap, NULL); - LPBITMAPINFOHEADER lpbmi = (LPBITMAPINFOHEADER) GlobalLock(newDIB); - - dc = ::GetDC(NULL); -// LPBITMAPINFOHEADER lpbmi = (LPBITMAPINFOHEADER) newDIB; - - int result = ::SetDIBits(dc, newBitmap, 0, lpbmi->biHeight, FindDIBBits((LPSTR)lpbmi), (LPBITMAPINFO)lpbmi, - DIB_PAL_COLORS); - DWORD err = GetLastError(); - - ::ReleaseDC(NULL, dc); - - // Delete the DIB - GlobalUnlock (newDIB); - GlobalFree (newDIB); - -// WXHBITMAP hBitmap2 = wxCreateMappedBitmap((WXHINSTANCE) wxGetInstance(), (WXHBITMAP) m_hBitmap); - // Substitute our new bitmap for the old one - ::DeleteObject((HBITMAP) m_hBitmap); - m_hBitmap = (WXHBITMAP) newBitmap; -#endif - - -#endif diff --git a/src/msw/tbarmsw.cpp b/src/msw/tbarmsw.cpp deleted file mode 100644 index e891c5e436..0000000000 --- a/src/msw/tbarmsw.cpp +++ /dev/null @@ -1,951 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tbarmsw.cpp -// Purpose: wxToolBarMSW -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "tbarmsw.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx.h" -#endif - -#if USE_BUTTONBAR && USE_TOOLBAR - -#ifndef __GNUWIN32__ -#include "malloc.h" -#endif - -#include -#include - -#include "wx/tbarmsw.h" -#include "wx/app.h" -#include "wx/msw/private.h" -#include "wx/msw/dib.h" - -#define DEFAULTBITMAPX 16 -#define DEFAULTBITMAPY 15 -#define DEFAULTBUTTONX 24 -#define DEFAULTBUTTONY 22 -#define DEFAULTBARHEIGHT 27 - -/////// Non-Windows 95 implementation - -#if !USE_IMAGE_LOADING_IN_MSW -#error If USE_IMAGE_LOADING_IN_MSW is set to 0, then USE_BUTTONBAR must be set to 0 too. -#endif - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxToolBarMSW, wxToolBarBase) - -BEGIN_EVENT_TABLE(wxToolBarMSW, wxToolBarBase) - EVT_SIZE(wxToolBarMSW::OnSize) - EVT_PAINT(wxToolBarMSW::OnPaint) - EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent) -END_EVENT_TABLE() -#endif - -wxToolBarMSW::wxToolBarMSW(void) -{ - m_hbrDither = 0; - m_rgbFace = 0; - m_rgbShadow = 0; - m_rgbHilight = 0; - m_rgbFrame = 0; - m_hdcMono = 0; - m_hbmMono = 0; - m_hbmDefault = 0; - m_defaultWidth = DEFAULTBITMAPX; - m_defaultHeight = DEFAULTBITMAPY; -} - -bool wxToolBarMSW::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style, const wxString& name) -{ - if ( ! wxWindow::Create(parent, id, pos, size, style, name) ) - return FALSE; - - if ( style & wxTB_HORIZONTAL ) - { m_lastX = 3; m_lastY = 7; } - else - { m_lastX = 7; m_lastY = 3; } - m_maxWidth = m_maxHeight = 0; - m_pressedTool = m_currentTool = -1; - m_xMargin = 0; - m_yMargin = 0; - m_toolPacking = 1; - m_toolSeparation = 5; - - // Set it to grey - SetBackgroundColour(wxColour(192, 192, 192)); - - m_hbrDither = 0; - m_rgbFace = 0; - m_rgbShadow = 0; - m_rgbHilight = 0; - m_rgbFrame = 0; - m_hdcMono = 0; - m_hbmMono = 0; - m_hbmDefault = 0; - m_defaultWidth = DEFAULTBITMAPX; - m_defaultHeight = DEFAULTBITMAPY; - - InitGlobalObjects(); - - return TRUE; -} - -wxToolBarMSW::~wxToolBarMSW(void) -{ - FreeGlobalObjects(); -} - -void wxToolBarMSW::SetToolBitmapSize(const wxSize& size) -{ - m_defaultWidth = size.x; m_defaultHeight = size.y; - FreeGlobalObjects(); - InitGlobalObjects(); -} - -// The button size is bigger than the bitmap size -wxSize wxToolBarMSW::GetToolSize(void) const -{ - return wxSize(m_defaultWidth + 8, m_defaultHeight + 7); -} - -void wxToolBarMSW::OnPaint(wxPaintEvent& event) -{ - wxPaintDC dc(this); - - static int wxOnPaintCount = 0; - - // Prevent reentry of OnPaint which would cause - // wxMemoryDC errors. - if (wxOnPaintCount > 0) - return; - wxOnPaintCount ++; - - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - if (tool->m_toolStyle != wxTOOL_STYLE_SEPARATOR) - { - int state = wxTBSTATE_ENABLED; - if (!tool->m_enabled) - state = 0; - if (tool->m_isToggle && tool->m_toggleState) - state |= wxTBSTATE_CHECKED; - DrawTool(dc, tool, state); - } - node = node->Next(); - } - wxOnPaintCount --; -} - -void wxToolBarMSW::OnSize(wxSizeEvent& event) -{ - wxToolBarBase::OnSize(event); -} - -// If a Button is disabled, then NO function (besides leaving -// or entering) should be carried out. Therefore the additions -// of 'enabled' testing (Stefan Hammes). -void wxToolBarMSW::OnMouseEvent(wxMouseEvent& event) -{ - static wxToolBarTool *eventCurrentTool = NULL; - wxClientDC dc(this); - - if (event.Leaving()) - { - m_currentTool = -1; - if (eventCurrentTool && eventCurrentTool->m_enabled) - { - ::ReleaseCapture(); - int state = wxTBSTATE_ENABLED; - if (eventCurrentTool->m_toggleState) - state |= wxTBSTATE_CHECKED; - DrawTool(dc, eventCurrentTool, state); - eventCurrentTool = NULL; - } - OnMouseEnter(-1); - return; - } - - long x, y; - event.Position(&x, &y); - wxToolBarTool *tool = FindToolForPosition(x, y); - - if (!tool) - { - if (eventCurrentTool && eventCurrentTool->m_enabled) - { - ::ReleaseCapture(); - - int state = wxTBSTATE_ENABLED; - if (eventCurrentTool->m_toggleState) - state |= wxTBSTATE_CHECKED; - DrawTool(dc, eventCurrentTool, state); - eventCurrentTool = NULL; - } - if (m_currentTool > -1) - { - m_currentTool = -1; - OnMouseEnter(-1); - } - return; - } - - if (!event.Dragging() && !event.IsButton()) - { - if (tool->m_index != m_currentTool) - { - OnMouseEnter(tool->m_index); - m_currentTool = tool->m_index; - return; - } - } - if (event.Dragging() && tool->m_enabled) - { - if (eventCurrentTool) - { - // Might have dragged outside tool - if (eventCurrentTool != tool) - { - int state = wxTBSTATE_ENABLED; - if (tool->m_toggleState) - state |= wxTBSTATE_CHECKED; - DrawTool(dc, tool, state); - eventCurrentTool = NULL; - return; - } - } - else - { - if (tool && event.LeftIsDown() && tool->m_enabled) - { - eventCurrentTool = tool; - ::SetCapture((HWND) GetHWND()); - int state = wxTBSTATE_ENABLED|wxTBSTATE_PRESSED; - if (tool->m_toggleState) - state |= wxTBSTATE_CHECKED; - DrawTool(dc, tool, state); - } - } - } - if (event.LeftDown() && tool->m_enabled) - { - eventCurrentTool = tool; - ::SetCapture((HWND) GetHWND()); - int state = wxTBSTATE_ENABLED|wxTBSTATE_PRESSED; - if (tool->m_toggleState) - state |= wxTBSTATE_CHECKED; - DrawTool(dc, tool, state); - } - else if (event.LeftUp() && tool->m_enabled) - { - if (eventCurrentTool) - ::ReleaseCapture(); - if (eventCurrentTool == tool) - { - if (tool->m_isToggle) - { - tool->m_toggleState = !tool->m_toggleState; - if (!OnLeftClick(tool->m_index, tool->m_toggleState)) - { - tool->m_toggleState = !tool->m_toggleState; - } - int state = wxTBSTATE_ENABLED; - if (tool->m_toggleState) - state |= wxTBSTATE_CHECKED; - DrawTool(dc, tool, state); - } - else - { - int state = wxTBSTATE_ENABLED; - if (tool->m_toggleState) - state |= wxTBSTATE_CHECKED; - DrawTool(dc, tool, state); - OnLeftClick(tool->m_index, tool->m_toggleState); - } - } - eventCurrentTool = NULL; - } - else if (event.RightDown() && tool->m_enabled) - { - OnRightClick(tool->m_index, x, y); - } -} - -// This function enables/disables a toolbar tool and redraws it. -// If that would not be done, the enabling/disabling wouldn't be -// visible on the screen. -void wxToolBarMSW::EnableTool(int toolIndex, bool enable) -{ - wxNode *node = m_tools.Find((long)toolIndex); - if (node) - { - wxClientDC dc(this); - - // at first do the enabling/disabling in the base class - wxToolBarBase::EnableTool(toolIndex,enable); - // then calculate the state of the tool and draw it - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - int state = 0; - if(tool->m_toggleState) state |= wxTBSTATE_CHECKED; - if(tool->m_enabled) state |= wxTBSTATE_ENABLED; - // how can i access the PRESSED state??? - DrawTool(dc, tool,state); - } -} - -void wxToolBarMSW::DrawTool(wxDC& dc, wxToolBarTool *tool, int state) -{ - DrawButton(dc.GetHDC(), (int)tool->m_x, (int)tool->m_y, (int)tool->GetWidth(), (int)tool->GetHeight(), tool, state); -} - -void wxToolBarMSW::DrawTool(wxDC& dc, wxMemoryDC& , wxToolBarTool *tool) -{ - int state = wxTBSTATE_ENABLED; - if (!tool->m_enabled) - state = 0; - if (tool->m_toggleState) - state |= wxTBSTATE_CHECKED; - DrawTool(dc, tool, state); -} - -// If pushedBitmap is NULL, a reversed version of bitmap is -// created and used as the pushed/toggled image. -// If toggle is TRUE, the button toggles between the two states. -wxToolBarTool *wxToolBarMSW::AddTool(int index, const wxBitmap& bitmap, const wxBitmap& pushedBitmap, - bool toggle, long xPos, long yPos, wxObject *clientData, const wxString& helpString1, const wxString& helpString2) -{ - // Using bitmap2 can cause problems (don't know why!) - - // TODO: use the mapping code from wxToolBar95 to get it right in this class -#if !defined(__WIN32__) && !defined(__WIN386__) - wxBitmap *bitmap2 = NULL; - if (toggle) - { - bitmap2 = new wxBitmap; - bitmap2->SetHBITMAP( (WXHBITMAP) CreateMappedBitmap(wxGetInstance(), (HBITMAP) ((wxBitmap& )bitmap).GetHBITMAP())); - } - - wxToolBarTool *tool = new wxToolBarTool(index, bitmap, *bitmap2, toggle, xPos, yPos, helpString1, helpString2); -#else - wxToolBarTool *tool = new wxToolBarTool(index, bitmap, (wxBitmap *)NULL, toggle, xPos, yPos, helpString1, helpString2); -#endif - - tool->m_clientData = clientData; - - if (xPos > -1) - tool->m_x = xPos; - else - tool->m_x = m_xMargin; - - if (yPos > -1) - tool->m_y = yPos; - else - tool->m_y = m_yMargin; - - tool->m_deleteSecondBitmap = TRUE; - tool->SetSize(GetToolSize().x, GetToolSize().y); - - // Calculate reasonable max size in case Layout() not called - if ((tool->m_x + bitmap.GetWidth() + m_xMargin) > m_maxWidth) - m_maxWidth = (tool->m_x + tool->GetWidth() + m_xMargin); - - if ((tool->m_y + bitmap.GetHeight() + m_yMargin) > m_maxHeight) - m_maxHeight = (tool->m_y + tool->GetHeight() + m_yMargin); - - m_tools.Append((long)index, tool); - return tool; -} - -void wxToolBarMSW::Layout(void) -{ - m_currentRowsOrColumns = 0; - m_lastX = m_xMargin; - m_lastY = m_yMargin; - int maxToolWidth = 0; - int maxToolHeight = 0; - m_maxWidth = 0; - m_maxHeight = 0; - - // Find the maximum tool width and height - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - if (tool->GetWidth() > maxToolWidth) - maxToolWidth = (int)tool->GetWidth(); - if (tool->GetHeight() > maxToolHeight) - maxToolHeight = (int)tool->GetHeight(); - node = node->Next(); - } - - int separatorSize = m_toolSeparation; - - node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - if (tool->m_toolStyle == wxTOOL_STYLE_SEPARATOR) - { - if ( GetWindowStyleFlag() & wxTB_HORIZONTAL ) - { - if (m_currentRowsOrColumns >= m_maxCols) - m_lastY += separatorSize; - else - m_lastX += separatorSize; - } - else - { - if (m_currentRowsOrColumns >= m_maxRows) - m_lastX += separatorSize; - else - m_lastY += separatorSize; - } - } - else if (tool->m_toolStyle == wxTOOL_STYLE_BUTTON) - { - if ( GetWindowStyleFlag() & wxTB_HORIZONTAL ) - { - if (m_currentRowsOrColumns >= m_maxCols) - { - m_currentRowsOrColumns = 0; - m_lastX = m_xMargin; - m_lastY += maxToolHeight + m_toolPacking; - } - tool->m_x = (long) (m_lastX + (maxToolWidth - tool->GetWidth())/2.0); - tool->m_y = (long) (m_lastY + (maxToolHeight - tool->GetHeight())/2.0); - - m_lastX += maxToolWidth + m_toolPacking; - } - else - { - if (m_currentRowsOrColumns >= m_maxRows) - { - m_currentRowsOrColumns = 0; - m_lastX += (maxToolWidth + m_toolPacking); - m_lastY = m_yMargin; - } - tool->m_x = (long) (m_lastX + (maxToolWidth - tool->GetWidth())/2.0); - tool->m_y = (long) (m_lastY + (maxToolHeight - tool->GetHeight())/2.0); - - m_lastY += maxToolHeight + m_toolPacking; - } - m_currentRowsOrColumns ++; - } - - if (m_lastX > m_maxWidth) - m_maxWidth = m_lastX; - if (m_lastY > m_maxHeight) - m_maxHeight = m_lastY; - - node = node->Next(); - } - if ( GetWindowStyleFlag() & wxTB_HORIZONTAL ) - m_maxWidth += maxToolWidth; - else - m_maxHeight += maxToolHeight; - - m_maxWidth += m_xMargin; - m_maxHeight += m_yMargin; -} - - -bool wxToolBarMSW::InitGlobalObjects(void) -{ - GetSysColors(); - if (!CreateDitherBrush()) - return FALSE; - - m_hdcMono = (WXHDC) CreateCompatibleDC(NULL); - if (!m_hdcMono) - return FALSE; - - m_hbmMono = (WXHBITMAP) CreateBitmap((int)GetToolSize().x, (int)GetToolSize().y, 1, 1, NULL); - if (!m_hbmMono) - return FALSE; - - m_hbmDefault = (WXHBITMAP) SelectObject((HDC) m_hdcMono, (HBITMAP) m_hbmMono); - return TRUE; -} - -void wxToolBarMSW::FreeGlobalObjects(void) -{ - FreeDitherBrush(); - - if (m_hdcMono) { - if (m_hbmDefault) - { - SelectObject((HDC) m_hdcMono, (HBITMAP) m_hbmDefault); - m_hbmDefault = 0; - } - DeleteDC((HDC) m_hdcMono); // toast the DCs - } - m_hdcMono = 0; - - if (m_hbmMono) - DeleteObject((HBITMAP) m_hbmMono); - m_hbmMono = 0; -} - - -void wxToolBarMSW::PatB(WXHDC hdc,int x,int y,int dx,int dy, long rgb) -{ - RECT rc; - - rc.left = x; - rc.top = y; - rc.right = x + dx; - rc.bottom = y + dy; - - SetBkColor((HDC) hdc,rgb); - ExtTextOut((HDC) hdc,0,0,ETO_OPAQUE,&rc,NULL,0,NULL); -} - - -// create a mono bitmap mask: -// 1's where color == COLOR_BTNFACE || COLOR_HILIGHT -// 0's everywhere else - -void wxToolBarMSW::CreateMask(WXHDC hdc, int xoffset, int yoffset, int dx, int dy) -{ - HDC globalDC = ::GetDC(NULL); - HDC hdcGlyphs = CreateCompatibleDC((HDC) globalDC); - ReleaseDC(NULL, (HDC) globalDC); - - // krj - create a new bitmap and copy the image from hdc. - //HBITMAP bitmapOld = SelectObject(hdcGlyphs, hBitmap); - HBITMAP hBitmap = CreateCompatibleBitmap((HDC) hdc, dx, dy); - HBITMAP bitmapOld = (HBITMAP) SelectObject(hdcGlyphs, hBitmap); - BitBlt(hdcGlyphs, 0,0, dx, dy, (HDC) hdc, 0, 0, SRCCOPY); - - // initalize whole area with 1's - PatBlt((HDC) m_hdcMono, 0, 0, dx, dy, WHITENESS); - - // create mask based on color bitmap - // convert this to 1's - SetBkColor(hdcGlyphs, m_rgbFace); - BitBlt((HDC) m_hdcMono, xoffset, yoffset, (int)GetToolBitmapSize().x, (int)GetToolBitmapSize().y, - hdcGlyphs, 0, 0, SRCCOPY); - // convert this to 1's - SetBkColor(hdcGlyphs, m_rgbHilight); - // OR in the new 1's - BitBlt((HDC) m_hdcMono, xoffset, yoffset, (int)GetToolBitmapSize().x, (int)GetToolBitmapSize().y, - hdcGlyphs, 0, 0, SRCPAINT); - - SelectObject(hdcGlyphs, bitmapOld); - DeleteObject(hBitmap); - DeleteDC(hdcGlyphs); -} - -void wxToolBarMSW::DrawBlankButton(WXHDC hdc, int x, int y, int dx, int dy, int state) -{ - // face color - PatB(hdc, x, y, dx, dy, m_rgbFace); - - if (state & wxTBSTATE_PRESSED) { - PatB(hdc, x + 1, y, dx - 2, 1, m_rgbFrame); - PatB(hdc, x + 1, y + dy - 1, dx - 2, 1, m_rgbFrame); - PatB(hdc, x, y + 1, 1, dy - 2, m_rgbFrame); - PatB(hdc, x + dx - 1, y +1, 1, dy - 2, m_rgbFrame); - PatB(hdc, x + 1, y + 1, 1, dy-2, m_rgbShadow); - PatB(hdc, x + 1, y + 1, dx-2, 1, m_rgbShadow); - } - else { - PatB(hdc, x + 1, y, dx - 2, 1, m_rgbFrame); - PatB(hdc, x + 1, y + dy - 1, dx - 2, 1, m_rgbFrame); - PatB(hdc, x, y + 1, 1, dy - 2, m_rgbFrame); - PatB(hdc, x + dx - 1, y + 1, 1, dy - 2, m_rgbFrame); - dx -= 2; - dy -= 2; - PatB(hdc, x + 1, y + 1, 1, dy - 1, m_rgbHilight); - PatB(hdc, x + 1, y + 1, dx - 1, 1, m_rgbHilight); - PatB(hdc, x + dx, y + 1, 1, dy, m_rgbShadow); - PatB(hdc, x + 1, y + dy, dx, 1, m_rgbShadow); - PatB(hdc, x + dx - 1, y + 2, 1, dy - 2, m_rgbShadow); - PatB(hdc, x + 2, y + dy - 1, dx - 2, 1, m_rgbShadow); - } -} - -void wxToolBarMSW::DrawButton(WXHDC hdc, int x, int y, int dx, int dy, wxToolBarTool *tool, int state) -{ - int yOffset; - HBRUSH hbrOld, hbr; - BOOL bMaskCreated = FALSE; - int xButton = 0; // assume button is down - int dxFace, dyFace; - int xCenterOffset; - - dxFace = dx; - dyFace = dy; - -// HBITMAP hBitmap = (HBITMAP) tool->m_bitmap1.GetHBITMAP(); - HDC globalDC = ::GetDC(NULL); - HDC hdcGlyphs = CreateCompatibleDC(globalDC); - ReleaseDC(NULL, globalDC); - - // get the proper button look - up or down. - if (!(state & (wxTBSTATE_PRESSED | wxTBSTATE_CHECKED))) { - xButton = dx; // use 'up' version of button - dxFace -= 2; - dyFace -= 2; // extents to ignore button highlight - } - - DrawBlankButton(hdc, x, y, dx, dy, state); - - - // move coordinates inside border and away from upper left highlight. - // the extents change accordingly. - x += 2; - y += 2; - dxFace -= 3; - dyFace -= 3; - - // Using bitmap2 can cause problems (don't know why!) -#if !defined(__WIN32__) && !defined(__WIN386__) - HBITMAP bitmapOld; - if (tool->m_bitmap2.Ok()) - bitmapOld = (HBITMAP) SelectObject(hdcGlyphs, (HBITMAP) tool->m_bitmap2.GetHBITMAP()); - else - bitmapOld = (HBITMAP) SelectObject(hdcGlyphs, (HBITMAP) tool->m_bitmap1.GetHBITMAP()); -#else - HBITMAP bitmapOld = (HBITMAP) SelectObject(hdcGlyphs, (HBITMAP) tool->m_bitmap1.GetHBITMAP()); -#endif - - // calculate offset of face from (x,y). y is always from the top, - // so the offset is easy. x needs to be centered in face. - yOffset = 1; - xCenterOffset = (dxFace - (int)GetToolBitmapSize().x)/2; - if (state & (wxTBSTATE_PRESSED | wxTBSTATE_CHECKED)) - { - // pressed state moves down and to the right - // (x moves automatically as face size grows) - yOffset++; - } - - // now put on the face - if (state & wxTBSTATE_ENABLED) { - // regular version - BitBlt((HDC) hdc, x+xCenterOffset, y + yOffset, (int)GetToolBitmapSize().x, (int)GetToolBitmapSize().y, - hdcGlyphs, 0, 0, SRCCOPY); - } else { - // disabled version (or indeterminate) - bMaskCreated = TRUE; - CreateMask((WXHDC) hdcGlyphs, xCenterOffset, yOffset, dxFace, dyFace); -// CreateMask(hBitmap, xCenterOffset, yOffset, dxFace, dyFace); - - SetTextColor((HDC) hdc, 0L); // 0's in mono -> 0 (for ROP) - SetBkColor((HDC) hdc, 0x00FFFFFF); // 1's in mono -> 1 - - // draw glyph's white understrike - if (!(state & wxTBSTATE_INDETERMINATE)) { - hbr = CreateSolidBrush(m_rgbHilight); - if (hbr) { - hbrOld = (HBRUSH) SelectObject((HDC) hdc, hbr); - if (hbrOld) { - // draw hilight color where we have 0's in the mask - BitBlt((HDC) hdc, x + 1, y + 1, dxFace, dyFace, (HDC) m_hdcMono, 0, 0, 0x00B8074A); - SelectObject((HDC) hdc, hbrOld); - } - DeleteObject(hbr); - } - } - - // gray out glyph - hbr = CreateSolidBrush(m_rgbShadow); - if (hbr) { - hbrOld = (HBRUSH) SelectObject((HDC) hdc, hbr); - if (hbrOld) { - // draw the shadow color where we have 0's in the mask - BitBlt((HDC) hdc, x, y, dxFace, dyFace, (HDC) m_hdcMono, 0, 0, 0x00B8074A); - SelectObject((HDC) hdc, hbrOld); - } - DeleteObject(hbr); - } - - if (state & wxTBSTATE_CHECKED) { - BitBlt((HDC) m_hdcMono, 1, 1, dxFace - 1, dyFace - 1, (HDC) m_hdcMono, 0, 0, SRCAND); - } - } - - if (state & (wxTBSTATE_CHECKED | wxTBSTATE_INDETERMINATE)) { - - hbrOld = (HBRUSH) SelectObject((HDC) hdc, (HBRUSH) m_hbrDither); - if (hbrOld) { - - if (!bMaskCreated) - CreateMask((WXHDC) hdcGlyphs, xCenterOffset, yOffset, dxFace, dyFace); -// CreateMask(hBitmap, xCenterOffset, yOffset, dxFace, dyFace); - - SetTextColor((HDC) hdc, 0L); // 0 -> 0 - SetBkColor((HDC) hdc, 0x00FFFFFF); // 1 -> 1 - - // only draw the dither brush where the mask is 1's - BitBlt((HDC) hdc, x, y, dxFace, dyFace, (HDC) m_hdcMono, 0, 0, 0x00E20746); - - SelectObject((HDC) hdc, hbrOld); - } - } - SelectObject(hdcGlyphs, bitmapOld); - DeleteDC(hdcGlyphs); -} - -void wxToolBarMSW::GetSysColors(void) -{ - static COLORREF rgbSaveFace = 0xffffffffL, - rgbSaveShadow = 0xffffffffL, - rgbSaveHilight = 0xffffffffL, - rgbSaveFrame = 0xffffffffL; - - // For now, override these because the colour replacement isn't working, - // and we get inconsistent colours. Assume all buttons are grey for the moment. - -// m_rgbFace = GetSysColor(COLOR_BTNFACE); - m_rgbFace = RGB(192,192,192); -// m_rgbShadow = GetSysColor(COLOR_BTNSHADOW); - m_rgbShadow = RGB(128,128,128); -// m_rgbHilight = GetSysColor(COLOR_BTNHIGHLIGHT); - m_rgbHilight = RGB(255, 255, 255); - - m_rgbFrame = GetSysColor(COLOR_WINDOWFRAME); - - if (rgbSaveFace!=m_rgbFace || rgbSaveShadow!=m_rgbShadow - || rgbSaveHilight!=m_rgbHilight || rgbSaveFrame!=m_rgbFrame) - { - rgbSaveFace = m_rgbFace; - rgbSaveShadow = m_rgbShadow; - rgbSaveHilight = m_rgbHilight; - rgbSaveFrame = m_rgbFrame; - - // Update the brush for pushed-in buttons - CreateDitherBrush(); - } -} - -WXHBITMAP wxToolBarMSW::CreateDitherBitmap() -{ - BITMAPINFO* pbmi; - HBITMAP hbm; - HDC hdc; - int i; - long patGray[8]; - DWORD rgb; - - pbmi = (BITMAPINFO *)malloc(sizeof(BITMAPINFOHEADER) + 16*sizeof(RGBQUAD)); - memset(pbmi, 0, (sizeof(BITMAPINFOHEADER) + 16*sizeof(RGBQUAD))); - - pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - pbmi->bmiHeader.biWidth = 8; - pbmi->bmiHeader.biHeight = 8; - pbmi->bmiHeader.biPlanes = 1; - pbmi->bmiHeader.biBitCount = 1; - pbmi->bmiHeader.biCompression = BI_RGB; - -// rgb = GetSysColor(COLOR_BTNFACE); - rgb = RGB(192,192,192); - - pbmi->bmiColors[0].rgbBlue = GetBValue(rgb); - pbmi->bmiColors[0].rgbGreen = GetGValue(rgb); - pbmi->bmiColors[0].rgbRed = GetRValue(rgb); - pbmi->bmiColors[0].rgbReserved = 0; - -// rgb = GetSysColor(COLOR_BTNHIGHLIGHT); - rgb = RGB(255, 255, 255); - - pbmi->bmiColors[1].rgbBlue = GetBValue(rgb); - pbmi->bmiColors[1].rgbGreen = GetGValue(rgb); - pbmi->bmiColors[1].rgbRed = GetRValue(rgb); - pbmi->bmiColors[1].rgbReserved = 0; - - /* initialize the brushes */ - - for (i = 0; i < 8; i++) - if (i & 1) - patGray[i] = 0xAAAA5555L; // 0x11114444L; // lighter gray - else - patGray[i] = 0x5555AAAAL; // 0x11114444L; // lighter gray - - hdc = ::GetDC(NULL); - - hbm = CreateDIBitmap(hdc, &pbmi->bmiHeader, CBM_INIT, patGray, pbmi, DIB_RGB_COLORS); - - ReleaseDC(NULL, hdc); - free(pbmi); - - return (WXHBITMAP)hbm; -} - -bool wxToolBarMSW::CreateDitherBrush(void) -{ - HBITMAP hbmGray; - HBRUSH hbrSave; - if (m_hbrDither) - return TRUE; - hbmGray = (HBITMAP) CreateDitherBitmap(); - - if (hbmGray) - { - hbrSave = (HBRUSH) m_hbrDither; - m_hbrDither = (WXHBRUSH) CreatePatternBrush(hbmGray); - DeleteObject(hbmGray); - if (m_hbrDither) - { - if (hbrSave) - { - DeleteObject(hbrSave); - } - return TRUE; - } - else - { - m_hbrDither = (WXHBRUSH) hbrSave; - } - } - - return FALSE; -} - -bool wxToolBarMSW::FreeDitherBrush(void) -{ - if (m_hbrDither) - DeleteObject((HBRUSH) m_hbrDither); - m_hbrDither = 0; - return TRUE; -} - -typedef struct tagCOLORMAP2 -{ - COLORREF bgrfrom; - COLORREF bgrto; - COLORREF sysColor; -} COLORMAP2; - -// these are the default colors used to map the dib colors -// to the current system colors - -#define BGR_BUTTONTEXT (RGB(000,000,000)) // black -#define BGR_BUTTONSHADOW (RGB(128,128,128)) // dark grey -#define BGR_BUTTONFACE (RGB(192,192,192)) // bright grey -#define BGR_BUTTONHILIGHT (RGB(255,255,255)) // white -#define BGR_BACKGROUNDSEL (RGB(255,000,000)) // blue -#define BGR_BACKGROUND (RGB(255,000,255)) // magenta -#define FlipColor(rgb) (RGB(GetBValue(rgb), GetGValue(rgb), GetRValue(rgb))) - -WXHBITMAP wxToolBarMSW::CreateMappedBitmap(WXHINSTANCE WXUNUSED(hInstance), void *info) -{ - LPBITMAPINFOHEADER lpBitmapInfo = (LPBITMAPINFOHEADER)info; - HDC hdc, hdcMem = NULL; - - DWORD FAR *p; - LPSTR lpBits; - HBITMAP hbm = NULL, hbmOld; - int numcolors, i; - int wid, hgt; - static COLORMAP2 ColorMap[] = { - {BGR_BUTTONTEXT, BGR_BUTTONTEXT, COLOR_BTNTEXT}, // black - {BGR_BUTTONSHADOW, BGR_BUTTONSHADOW, COLOR_BTNSHADOW}, // dark grey - {BGR_BUTTONFACE, BGR_BUTTONFACE, COLOR_BTNFACE}, // bright grey - {BGR_BUTTONHILIGHT, BGR_BUTTONHILIGHT, COLOR_BTNHIGHLIGHT},// white - {BGR_BACKGROUNDSEL, BGR_BACKGROUNDSEL, COLOR_HIGHLIGHT}, // blue - {BGR_BACKGROUND, BGR_BACKGROUND, COLOR_WINDOW} // magenta - }; - - #define NUM_MAPS (sizeof(ColorMap)/sizeof(COLORMAP2)) - - if (!lpBitmapInfo) - return 0; - - // - // So what are the new colors anyway ? - // - for (i=0; i < (int) NUM_MAPS; i++) { - ColorMap[i].bgrto = (long unsigned int) FlipColor(GetSysColor((int)ColorMap[i].sysColor)); - } - - p = (DWORD FAR *)(((LPSTR)lpBitmapInfo) + lpBitmapInfo->biSize); - - /* Replace button-face and button-shadow colors with the current values - */ - numcolors = 16; - - while (numcolors-- > 0) { - for (i = 0; i < (int) NUM_MAPS; i++) { - if (*p == ColorMap[i].bgrfrom) { - *p = ColorMap[i].bgrto; - break; - } - } - p++; - } - - /* First skip over the header structure */ - lpBits = (LPSTR)(lpBitmapInfo + 1); - - /* Skip the color table entries, if any */ - lpBits += (1 << (lpBitmapInfo->biBitCount)) * sizeof(RGBQUAD); - - /* Create a color bitmap compatible with the display device */ - i = wid = (int)lpBitmapInfo->biWidth; - hgt = (int)lpBitmapInfo->biHeight; - hdc = ::GetDC(NULL); - - hdcMem = CreateCompatibleDC(hdc); - if (hdcMem) { -// hbm = CreateDiscardableBitmap(hdc, i, hgt); - hbm = CreateCompatibleBitmap(hdc, i, hgt); - if (hbm) { - hbmOld = (HBITMAP) SelectObject(hdcMem, hbm); - - // set the main image - StretchDIBits(hdcMem, 0, 0, wid, hgt, 0, 0, wid, hgt, lpBits, - (LPBITMAPINFO)lpBitmapInfo, DIB_RGB_COLORS, SRCCOPY); - - SelectObject(hdcMem, hbmOld); - } - - DeleteObject(hdcMem); - } - - ReleaseDC(NULL, hdc); - - return (WXHBITMAP) hbm; -} - -WXHBITMAP wxToolBarMSW::CreateMappedBitmap(WXHINSTANCE hInstance, WXHBITMAP hBitmap) -{ - HANDLE hDIB = BitmapToDIB((HBITMAP) hBitmap, 0); - if (hDIB) - { -#ifdef __WINDOWS_386__ - LPBITMAPINFOHEADER lpbmInfoHdr = (LPBITMAPINFOHEADER)MK_FP32(GlobalLock(hDIB)); -#else - LPBITMAPINFOHEADER lpbmInfoHdr = (LPBITMAPINFOHEADER)GlobalLock(hDIB); -#endif - HBITMAP newBitmap = (HBITMAP) CreateMappedBitmap((WXHINSTANCE) wxGetInstance(), lpbmInfoHdr); - GlobalUnlock(hDIB); - GlobalFree(hDIB); - return (WXHBITMAP) newBitmap; - } - return 0; -} - -#endif diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp deleted file mode 100644 index 3def23203d..0000000000 --- a/src/msw/textctrl.cpp +++ /dev/null @@ -1,1074 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: textctrl.cpp -// Purpose: wxTextCtrl -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "textctrl.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/textctrl.h" -#include "wx/settings.h" -#endif - -#if USE_CLIPBOARD -#include "wx/app.h" -#include "wx/clipbrd.h" -#endif - -#include "wx/msw/private.h" - -#include -#include -#include "fstream.h" - -#include -#include -#if defined(__BORLANDC__) && !defined(__WIN32__) -#include -#else -#ifndef __GNUWIN32__ -#include -#endif -#define farmalloc malloc -#define farfree free -#endif -#include - -#include - -#if defined(__WIN95__) && !defined(__GNUWIN32__) -#include -#endif - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) - -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) - EVT_CHAR(wxTextCtrl::OnChar) - EVT_DROP_FILES(wxTextCtrl::OnDropFiles) - EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground) -END_EVENT_TABLE() - -#endif - -// Text item -wxTextCtrl::wxTextCtrl(void) -#ifndef NO_TEXT_WINDOW_STREAM - :streambuf() -#endif -{ - m_fileName = ""; - m_isRich = FALSE; -} - -bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, - const wxString& value, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - m_fileName = ""; - SetName(name); - SetValidator(validator); - if (parent) parent->AddChild(this); - - m_windowStyle = style; - - // Should this be taken from the system colours? -// SetBackgroundColour(wxColour(255, 255, 255)); - - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW)); - - SetForegroundColour(parent->GetDefaultForegroundColour()) ; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - -#ifdef __WIN32__ - WXHGLOBAL m_globalHandle = 0; -#else - // Obscure method from the MS Developer's Network Disk for - // using global memory instead of the local heap, which - // runs out far too soon. Solves the problem with - // failing to appear. - - // Doesn't seem to work for Win95, so removing. - m_globalHandle=0; -// if ((wxGetOsVersion() != wxWINDOWS_NT) && (wxGetOsVersion() != wxWIN95)) -// m_globalHandle = (WXHGLOBAL) GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, -// 256L); -#endif - long msStyle = ES_LEFT | WS_VISIBLE | WS_CHILD | WS_TABSTOP; - if (m_windowStyle & wxTE_MULTILINE) - msStyle |= ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL ; // WS_BORDER - else - msStyle |= ES_AUTOHSCROLL ; - - if (m_windowStyle & wxTE_READONLY) - msStyle |= ES_READONLY; - - if (m_windowStyle & wxHSCROLL) - msStyle |= (WS_HSCROLL | ES_AUTOHSCROLL) ; - if (m_windowStyle & wxTE_PASSWORD) // hidden input - msStyle |= ES_PASSWORD; - - char *windowClass = "EDIT"; -#if defined(__WIN95__) - if ( m_windowStyle & wxTE_MULTILINE ) -#else - if ( FALSE ) -#endif - { - msStyle |= ES_AUTOVSCROLL; - m_isRich = TRUE; - windowClass = "RichEdit" ; - } - else - m_isRich = FALSE; - - bool want3D; - WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D) ; - - // If we're in Win95, and we want a simple 2D border, - // then make it an EDIT control instead. -#if defined(__WIN95__) - if (m_windowStyle & wxSIMPLE_BORDER) - { - windowClass = "EDIT"; - m_isRich = FALSE; - } -#endif - - // Even with extended styles, need to combine with WS_BORDER - // for them to look right. - if (want3D || (m_windowStyle & wxSIMPLE_BORDER) || (m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSUNKEN_BORDER) || (m_windowStyle & wxDOUBLE_BORDER)) - msStyle |= WS_BORDER; - - HWND edit = CreateWindowEx(exStyle, windowClass, NULL, - msStyle, - 0, 0, 0, 0, (HWND) ((wxWindow*)parent)->GetHWND(), (HMENU)m_windowId, - m_globalHandle ? (HINSTANCE) m_globalHandle : wxGetInstance(), NULL); - -#if CTL3D - if ( want3D ) - { - Ctl3dSubclassCtl(edit); - m_useCtl3D = TRUE; - } -#endif - - m_hWnd = (WXHWND)edit; - -#if defined(__WIN95__) - if (m_isRich) - { - // Have to enable events - ::SendMessage(edit, EM_SETEVENTMASK, 0, ENM_CHANGE | ENM_DROPFILES | ENM_SELCHANGE | ENM_UPDATE); - } -#endif - - SubclassWin(GetHWND()); - - if ( parent->GetFont() && parent->GetFont()->Ok() ) - { - SetFont(* parent->GetFont()); - } - else - { - SetFont(wxSystemSettings::GetSystemFont(wxSYS_SYSTEM_FONT)); - } - - SetSize(x, y, width, height); - - // Causes a crash for Symantec C++ and WIN32 for some reason -#if !(defined(__SC__) && defined(__WIN32__)) - if (value != "") - SetWindowText(edit, (const char *)value); -#endif - - return TRUE; -} - -// Make sure the window style (etc.) reflects the HWND style (roughly) -void wxTextCtrl::AdoptAttributesFromHWND(void) -{ - wxWindow::AdoptAttributesFromHWND(); - - HWND hWnd = (HWND) GetHWND(); - long style = GetWindowLong((HWND) hWnd, GWL_STYLE); - - char buf[256]; - -#ifndef __WIN32__ - GetClassName((HWND) hWnd, buf, 256); -#else -#ifdef UNICODE - GetClassNameW((HWND) hWnd, buf, 256); -#else - GetClassNameA((HWND) hWnd, buf, 256); -#endif -#endif - - wxString str(buf); - str.UpperCase(); - - if (str == "EDIT") - m_isRich = FALSE; - else - m_isRich = TRUE; - - if (style & ES_MULTILINE) - m_windowStyle |= wxTE_MULTILINE; - if (style & ES_PASSWORD) - m_windowStyle |= wxTE_PASSWORD; - if (style & ES_READONLY) - m_windowStyle |= wxTE_READONLY; - if (style & ES_WANTRETURN) - m_windowStyle |= wxTE_PROCESS_ENTER; -} - -void wxTextCtrl::SetupColours(void) -{ - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW)); - SetForegroundColour(GetParent()->GetDefaultForegroundColour()); -} - -wxString wxTextCtrl::GetValue(void) const -{ - int length = GetWindowTextLength((HWND) GetHWND()); - char *s = new char[length+1]; - GetWindowText((HWND) GetHWND(), s, length+1); - wxString str(s); - delete[] s; - return str; -} - -void wxTextCtrl::SetValue(const wxString& value) -{ - // If newlines are denoted by just 10, must stick 13 in front. - int singletons = 0; - int len = value.Length(); - int i; - for (i = 0; i < len; i ++) - { - if ((i > 0) && (value[i] == 10) && (value[i-1] != 13)) - singletons ++; - } - if (singletons > 0) - { - char *tmp = new char[len + singletons + 1]; - int j = 0; - for (i = 0; i < len; i ++) - { - if ((i > 0) && (value[i] == 10) && (value[i-1] != 13)) - { - tmp[j] = 13; - j ++; - } - tmp[j] = value[i]; - j ++; - } - tmp[j] = 0; - SetWindowText((HWND) GetHWND(), tmp); - delete[] tmp; - } - else - SetWindowText((HWND) GetHWND(), (const char *)value); -} - -void wxTextCtrl::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - int currentX, currentY; - GetPosition(¤tX, ¤tY); - int x1 = x; - int y1 = y; - int w1 = width; - int h1 = height; - - if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - x1 = currentX; - if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - y1 = currentY; - - AdjustForParentClientOrigin(x1, y1, sizeFlags); - - int cx; // button font dimensions - int cy; - - wxGetCharSize(GetHWND(), &cx, &cy,GetFont()); - - float control_width, control_height, control_x, control_y; - - // If we're prepared to use the existing size, then... - if (width == -1 && height == -1 && ((sizeFlags & wxSIZE_AUTO) != wxSIZE_AUTO)) - { - GetSize(&w1, &h1); - } - - // Deal with default size (using -1 values) - if (w1<=0) - w1 = DEFAULT_ITEM_WIDTH; - - control_x = (float)x1; - control_y = (float)y1; - control_width = (float)w1; - control_height = (float)h1; - - // Calculations may have made text size too small - if (control_height <= 0) - control_height = (float)(int)(cy*EDIT_CONTROL_FACTOR) ; - - if (control_width <= 0) - control_width = (float)DEFAULT_ITEM_WIDTH; - - MoveWindow((HWND) GetHWND(), (int)control_x, (int)control_y, - (int)control_width, (int)control_height, TRUE); -} - -// Clipboard operations -void wxTextCtrl::Copy(void) -{ - HWND hWnd = (HWND) GetHWND(); - SendMessage(hWnd, WM_COPY, 0, 0L); -} - -void wxTextCtrl::Cut(void) -{ - HWND hWnd = (HWND) GetHWND(); - SendMessage(hWnd, WM_CUT, 0, 0L); -} - -void wxTextCtrl::Paste(void) -{ - HWND hWnd = (HWND) GetHWND(); - SendMessage(hWnd, WM_PASTE, 0, 0L); -} - -void wxTextCtrl::SetEditable(bool editable) -{ - HWND hWnd = (HWND) GetHWND(); - SendMessage(hWnd, EM_SETREADONLY, (WPARAM)!editable, (LPARAM)0L); -} - -void wxTextCtrl::SetInsertionPoint(long pos) -{ - HWND hWnd = (HWND) GetHWND(); -#ifdef __WIN32__ -#if defined(__WIN95__) - if ( m_isRich) - { - CHARRANGE range; - range.cpMin = pos; - range.cpMax = pos; - SendMessage(hWnd, EM_EXSETSEL, 0, (LPARAM) &range); - SendMessage(hWnd, EM_SCROLLCARET, (WPARAM)0, (LPARAM)0); - } - else -#endif - { - SendMessage(hWnd, EM_SETSEL, pos, pos); - SendMessage(hWnd, EM_SCROLLCARET, (WPARAM)0, (LPARAM)0); - } -#else - SendMessage(hWnd, EM_SETSEL, 0, MAKELPARAM(pos, pos)); -#endif - char *nothing = ""; - SendMessage(hWnd, EM_REPLACESEL, 0, (LPARAM)nothing); -} - -void wxTextCtrl::SetInsertionPointEnd(void) -{ - long pos = GetLastPosition(); - SetInsertionPoint(pos); -} - -long wxTextCtrl::GetInsertionPoint(void) const -{ -#if defined(__WIN95__) - if (m_isRich) - { - CHARRANGE range; - range.cpMin = 0; - range.cpMax = 0; - SendMessage((HWND) GetHWND(), EM_EXGETSEL, 0, (LPARAM) &range); - return range.cpMin; - } -#endif - - DWORD Pos=(DWORD)SendMessage((HWND) GetHWND(), EM_GETSEL, 0, 0L); - return Pos&0xFFFF; -} - -long wxTextCtrl::GetLastPosition(void) const -{ - HWND hWnd = (HWND) GetHWND(); - - // Will always return a number > 0 (according to docs) - int noLines = (int)SendMessage(hWnd, EM_GETLINECOUNT, (WPARAM)0, (LPARAM)0L); - - // This gets the char index for the _beginning_ of the last line - int charIndex = (int)SendMessage(hWnd, EM_LINEINDEX, (WPARAM)(noLines-1), (LPARAM)0L); - - // Get number of characters in the last line. We'll add this to the character - // index for the last line, 1st position. - int lineLength = (int)SendMessage(hWnd, EM_LINELENGTH, (WPARAM)charIndex, (LPARAM)0L); - - return (long)(charIndex + lineLength); -} - -void wxTextCtrl::Replace(long from, long to, const wxString& value) -{ - HWND hWnd = (HWND) GetHWND(); - long fromChar = from; - long toChar = to; - - // Set selection and remove it -#ifdef __WIN32__ - SendMessage(hWnd, EM_SETSEL, fromChar, toChar); -#else - SendMessage(hWnd, EM_SETSEL, (WPARAM)0, (LPARAM)MAKELONG(fromChar, toChar)); -#endif - SendMessage(hWnd, WM_CUT, (WPARAM)0, (LPARAM)0); - - // Now replace with 'value', by pasting. - wxSetClipboardData(wxDF_TEXT, (wxObject *) (const char *)value, 0, 0); - - // Paste into edit control - SendMessage(hWnd, WM_PASTE, (WPARAM)0, (LPARAM)0L); -} - -void wxTextCtrl::Remove(long from, long to) -{ - HWND hWnd = (HWND) GetHWND(); - long fromChar = from; - long toChar = to; - - // Cut all selected text -#ifdef __WIN32__ - SendMessage(hWnd, EM_SETSEL, fromChar, toChar); -#else - SendMessage(hWnd, EM_SETSEL, (WPARAM)0, (LPARAM)MAKELONG(fromChar, toChar)); -#endif - SendMessage(hWnd, WM_CUT, (WPARAM)0, (LPARAM)0); -} - -void wxTextCtrl::SetSelection(long from, long to) -{ - HWND hWnd = (HWND) GetHWND(); - long fromChar = from; - long toChar = to; - // if from and to are both -1, it means - // (in wxWindows) that all text should be selected. - // This translates into Windows convention - if ((from == -1) && (to == -1)) - { - fromChar = 0; - toChar = -1; - } - -#ifdef __WIN32__ - SendMessage(hWnd, EM_SETSEL, (WPARAM)fromChar, (LPARAM)toChar); - SendMessage(hWnd, EM_SCROLLCARET, (WPARAM)0, (LPARAM)0); -#else - // WPARAM is 0: selection is scrolled into view - SendMessage(hWnd, EM_SETSEL, (WPARAM)0, (LPARAM)MAKELONG(fromChar, toChar)); -#endif -} - -bool wxTextCtrl::LoadFile(const wxString& file) -{ - if (!FileExists(WXSTRINGCAST file)) - return FALSE; - - m_fileName = file; - - Clear(); - - ifstream input(WXSTRINGCAST file, ios::nocreate | ios::in); - - if (!input.bad()) - { - // Previously a SETSEL/REPLACESEL call-pair were done to insert - // line by line into the control. Apart from being very slow this - // was limited to 32K of text by the external interface presenting - // positions as signed shorts. Now load in one chunk... - // Note use of 'farmalloc' as in Borland 3.1 'size_t' is 16-bits... - - struct stat stat_buf; - if (stat(file, &stat_buf) < 0) - return FALSE; -// char *tmp_buffer = (char*)farmalloc(stat_buf.st_size+1); - // This may need to be a bigger buffer than the file size suggests, - // if it's a UNIX file. Give it an extra 1000 just in case. - char *tmp_buffer = (char*)farmalloc((size_t)(stat_buf.st_size+1+1000)); - long no_lines = 0; - long pos = 0; - while (!input.eof() && input.peek() != EOF) - { - input.getline(wxBuffer, 500); - int len = strlen(wxBuffer); - wxBuffer[len] = 13; - wxBuffer[len+1] = 10; - wxBuffer[len+2] = 0; - strcpy(tmp_buffer+pos, wxBuffer); - pos += strlen(wxBuffer); - no_lines++; - } - -// SendMessage((HWND) GetHWND(), WM_SETTEXT, 0, (LPARAM)tmp_buffer); - SetWindowText((HWND) GetHWND(), tmp_buffer); - SendMessage((HWND) GetHWND(), EM_SETMODIFY, FALSE, 0L); - farfree(tmp_buffer); - - return TRUE; - } - return FALSE; -} - -// If file is null, try saved file name first -// Returns TRUE if succeeds. -bool wxTextCtrl::SaveFile(const wxString& file) -{ - wxString theFile(file); - if (theFile == "") - theFile = m_fileName; - if (theFile == "") - return FALSE; - m_fileName = theFile; - - ofstream output((char*) (const char*) theFile); - if (output.bad()) - return FALSE; - - // This will only save 64K max - unsigned long nbytes = SendMessage((HWND) GetHWND(), WM_GETTEXTLENGTH, 0, 0); - char *tmp_buffer = (char*)farmalloc((size_t)(nbytes+1)); - SendMessage((HWND) GetHWND(), WM_GETTEXT, (WPARAM)(nbytes+1), (LPARAM)tmp_buffer); - char *pstr = tmp_buffer; - - // Convert \r\n to just \n - while (*pstr) - { - if (*pstr != '\r') - output << *pstr; - pstr++; - } - - farfree(tmp_buffer); - SendMessage((HWND) GetHWND(), EM_SETMODIFY, FALSE, 0L); - - return TRUE; -} - -void wxTextCtrl::WriteText(const wxString& text) -{ - // Covert \n to \r\n - int len = text.Length(); - char *newtext = new char[(len*2)+1]; - int i = 0; - int j = 0; - while (i < len) - { - if (text[i] == '\n') - { - newtext[j] = '\r'; - j ++; - } - newtext[j] = text[i]; - i ++; - j ++; - } - newtext[j] = 0; - SendMessage((HWND) GetHWND(), EM_REPLACESEL, 0, (LPARAM)newtext); - delete[] newtext; -} - -void wxTextCtrl::Clear(void) -{ -// SendMessage((HWND) GetHWND(), WM_SETTEXT, 0, (LPARAM)""); - SetWindowText((HWND) GetHWND(), ""); -} - -bool wxTextCtrl::IsModified(void) const -{ - return (SendMessage((HWND) GetHWND(), EM_GETMODIFY, 0, 0) != 0); -} - -// Makes 'unmodified' -void wxTextCtrl::DiscardEdits(void) -{ - SendMessage((HWND) GetHWND(), EM_SETMODIFY, FALSE, 0L); -} - -/* - * Some of the following functions are yet to be implemented - * - */ - -int wxTextCtrl::GetNumberOfLines(void) const -{ - return (int)SendMessage((HWND) GetHWND(), EM_GETLINECOUNT, (WPARAM)0, (LPARAM)0); -} - -long wxTextCtrl::XYToPosition(long x, long y) const -{ - HWND hWnd = (HWND) GetHWND(); - - // This gets the char index for the _beginning_ of this line - int charIndex = (int)SendMessage(hWnd, EM_LINEINDEX, (WPARAM)y, (LPARAM)0); - return (long)(x + charIndex); -} - -void wxTextCtrl::PositionToXY(long pos, long *x, long *y) const -{ - HWND hWnd = (HWND) GetHWND(); - - // This gets the line number containing the character - int lineNo = (int)SendMessage(hWnd, EM_LINEFROMCHAR, (WPARAM)pos, (LPARAM)0); - // This gets the char index for the _beginning_ of this line - int charIndex = (int)SendMessage(hWnd, EM_LINEINDEX, (WPARAM)lineNo, (LPARAM)0); - // The X position must therefore be the different between pos and charIndex - *x = (long)(pos - charIndex); - *y = (long)lineNo; -} - -void wxTextCtrl::ShowPosition(long pos) -{ - HWND hWnd = (HWND) GetHWND(); - - // To scroll to a position, we pass the number of lines and characters - // to scroll *by*. This means that we need to: - // (1) Find the line position of the current line. - // (2) Find the line position of pos. - // (3) Scroll by (pos - current). - // For now, ignore the horizontal scrolling. - - // Is this where scrolling is relative to - the line containing the caret? - // Or is the first visible line??? Try first visible line. -// int currentLineLineNo1 = (int)SendMessage(hWnd, EM_LINEFROMCHAR, (WPARAM)-1, (LPARAM)0L); - - int currentLineLineNo = (int)SendMessage(hWnd, EM_GETFIRSTVISIBLELINE, (WPARAM)0, (LPARAM)0L); - - int specifiedLineLineNo = (int)SendMessage(hWnd, EM_LINEFROMCHAR, (WPARAM)pos, (LPARAM)0L); - - int linesToScroll = specifiedLineLineNo - currentLineLineNo; - -/* - wxDebugMsg("Caret line: %d; Current visible line: %d; Specified line: %d; lines to scroll: %d\n", - currentLineLineNo1, currentLineLineNo, specifiedLineLineNo, linesToScroll); -*/ - - if (linesToScroll != 0) - (void)SendMessage(hWnd, EM_LINESCROLL, (WPARAM)0, (LPARAM)MAKELPARAM(linesToScroll, 0)); -} - -int wxTextCtrl::GetLineLength(long lineNo) const -{ - long charIndex = XYToPosition(0, lineNo); - HWND hWnd = (HWND) GetHWND(); - int len = (int)SendMessage(hWnd, EM_LINELENGTH, (WPARAM)charIndex, (LPARAM)0); - return len; -} - -wxString wxTextCtrl::GetLineText(long lineNo) const -{ - HWND hWnd = (HWND) GetHWND(); - *(WORD *)wxBuffer = 512; - int noChars = (int)SendMessage(hWnd, EM_GETLINE, (WPARAM)lineNo, (LPARAM)wxBuffer); - wxBuffer[noChars] = 0; - return wxString(wxBuffer); -} - -/* - * Text item - */ - -void wxTextCtrl::Command(wxCommandEvent & event) -{ - SetValue (event.GetString()); - ProcessCommand (event); -} - -void wxTextCtrl::OnDropFiles(wxDropFilesEvent& event) -{ - // By default, load the first file into the text window. - if (event.GetNumberOfFiles() > 0) - { - LoadFile(event.GetFiles()[0]); - } -} - -// The streambuf code was partly taken from chapter 3 by Jerry Schwarz of -// AT&T's "C++ Lanuage System Release 3.0 Library Manual" - Stein Somers - -//========================================================================= -// Called then the buffer is full (gcc 2.6.3) -// or when "endl" is output (Borland 4.5) -//========================================================================= -// Class declaration using multiple inheritance doesn't work properly for -// Borland. See note in wb_text.h. -#ifndef NO_TEXT_WINDOW_STREAM -int wxTextCtrl::overflow(int c) -{ - // Make sure there is a holding area - if ( allocate()==EOF ) - { - wxError("Streambuf allocation failed","Internal error"); - return EOF; - } - - // Verify that there are no characters in get area - if ( gptr() && gptr() < egptr() ) - { - wxError("Who's trespassing my get area?","Internal error"); - return EOF; - } - - // Reset get area - setg(0,0,0); - - // Make sure there is a put area - if ( ! pptr() ) - { -/* This doesn't seem to be fatal so comment out error message */ -// wxError("Put area not opened","Internal error"); - setp( base(), base() ); - } - - // Determine how many characters have been inserted but no consumed - int plen = pptr() - pbase(); - - // Now Jerry relies on the fact that the buffer is at least 2 chars - // long, but the holding area "may be as small as 1" ??? - // And we need an additional \0, so let's keep this inefficient but - // safe copy. - - // If c!=EOF, it is a character that must also be comsumed - int xtra = c==EOF? 0 : 1; - - // Write temporary C-string to wxTextWindow - { - char *txt = new char[plen+xtra+1]; - memcpy(txt, pbase(), plen); - txt[plen] = (char)c; // append c - txt[plen+xtra] = '\0'; // append '\0' or overwrite c - // If the put area already contained \0, output will be truncated there - WriteText(txt); - delete[] txt; - } - - // Reset put area - setp(pbase(), epptr()); - -#if defined(__WATCOMC__) - return __NOT_EOF; -#elif defined(zapeof) // HP-UX (all cfront based?) - return zapeof(c); -#else - return c!=EOF ? c : 0; // this should make everybody happy -#endif - -/* OLD CODE - int len = pptr() - pbase(); - char *txt = new char[len+1]; - strncpy(txt, pbase(), len); - txt[len] = '\0'; - (*this) << txt; - setp(pbase(), epptr()); - delete[] txt; - return EOF; -*/ -} - -//========================================================================= -// called then "endl" is output (gcc) or then explicit sync is done (Borland) -//========================================================================= -int wxTextCtrl::sync(void) -{ - // Verify that there are no characters in get area - if ( gptr() && gptr() < egptr() ) - { - wxError("Who's trespassing my get area?","Internal error"); - return EOF; - } - - if ( pptr() && pptr() > pbase() ) return overflow(EOF); - - return 0; -/* OLD CODE - int len = pptr() - pbase(); - char *txt = new char[len+1]; - strncpy(txt, pbase(), len); - txt[len] = '\0'; - (*this) << txt; - setp(pbase(), epptr()); - delete[] txt; - return 0; -*/ -} - -//========================================================================= -// Should not be called by a "ostream". Used by a "istream" -//========================================================================= -int wxTextCtrl::underflow(void) -{ - return EOF; -} -#endif - -wxTextCtrl& wxTextCtrl::operator<<(const wxString& s) -{ - WriteText(s); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(float f) -{ - wxString str; - str.Printf("%.2f", f); - WriteText(str); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(double d) -{ - wxString str; - str.Printf("%.2f", d); - WriteText(str); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(int i) -{ - wxString str; - str.Printf("%d", i); - WriteText(str); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(long i) -{ - wxString str; - str.Printf("%ld", i); - WriteText(str); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(const char c) -{ - char buf[2]; - - buf[0] = c; - buf[1] = 0; - WriteText(buf); - return *this; -} - -WXHBRUSH wxTextCtrl::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ -#if CTL3D - if ( m_useCtl3D ) - { - HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam); - return (WXHBRUSH) hbrush; - } -#endif - - if (GetParent()->GetTransparentBackground()) - SetBkMode((HDC) pDC, TRANSPARENT); - else - SetBkMode((HDC) pDC, OPAQUE); - - ::SetBkColor((HDC) pDC, RGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue())); - ::SetTextColor((HDC) pDC, RGB(GetForegroundColour().Red(), GetForegroundColour().Green(), GetForegroundColour().Blue())); - - wxBrush *backgroundBrush = wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID); - - // Note that this will be cleaned up in wxApp::OnIdle, if backgroundBrush - // has a zero usage count. - // NOT NOW - will be cleaned up at end of app. -// backgroundBrush->RealizeResource(); - return (WXHBRUSH) backgroundBrush->GetResourceHandle(); -} - -void wxTextCtrl::OnChar(wxKeyEvent& event) -{ - if ( (event.KeyCode() == WXK_RETURN) && (m_windowStyle & wxPROCESS_ENTER)) - { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); - event.SetEventObject( this ); - if ( GetEventHandler()->ProcessEvent(event) ) - return; - } - else if ( event.KeyCode() == WXK_TAB ) { - wxNavigationKeyEvent event; - event.SetDirection(!(::GetKeyState(VK_SHIFT) & 0x100)); - event.SetWindowChange(FALSE); - event.SetEventObject(this); - - if ( GetEventHandler()->ProcessEvent(event) ) - return; - } - - event.Skip(); -} - -long wxTextCtrl::MSWGetDlgCode() -{ - long lRc = DLGC_WANTCHARS | DLGC_WANTARROWS; - if ( m_windowStyle & wxPROCESS_ENTER ) - lRc |= DLGC_WANTMESSAGE; - else if ( m_windowStyle & wxTE_MULTILINE ) - lRc |= DLGC_WANTMESSAGE; - - return lRc; -} - -void wxTextCtrl::OnEraseBackground(wxEraseEvent& event) -{ - if ( m_windowStyle & wxTE_MULTILINE ) - { - // No flicker - only problem is we probably can't change the background - Default(); -/* - RECT rect; - ::GetClientRect((HWND) GetHWND(), &rect); - - HBRUSH hBrush = ::CreateSolidBrush(PALETTERGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue())); - int mode = ::SetMapMode((HDC) event.GetDC()->GetHDC(), MM_TEXT); - - ::FillRect ((HDC) event.GetDC()->GetHDC(), &rect, hBrush); - ::DeleteObject(hBrush); - ::SetMapMode((HDC) event.GetDC()->GetHDC(), mode); -*/ - } -// wxWindow::OnEraseBackground(event); -} - -bool wxTextCtrl::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) -{ -/* - // Debugging - wxDebugMsg("Edit control %d: ", (int)id); - switch (param) - { - case EN_SETFOCUS: - wxDebugMsg("EN_SETFOCUS\n"); - break; - case EN_KILLFOCUS: - wxDebugMsg("EN_KILLFOCUS\n"); - break; - case EN_CHANGE: - wxDebugMsg("EN_CHANGE\n"); - break; - case EN_UPDATE: - wxDebugMsg("EN_UPDATE\n"); - break; - case EN_ERRSPACE: - wxDebugMsg("EN_ERRSPACE\n"); - break; - case EN_MAXTEXT: - wxDebugMsg("EN_MAXTEXT\n"); - break; - case EN_HSCROLL: - wxDebugMsg("EN_HSCROLL\n"); - break; - case EN_VSCROLL: - wxDebugMsg("EN_VSCROLL\n"); - break; - default: - wxDebugMsg("Unknown EDIT notification\n"); - break; - } -*/ - switch (param) - { - case EN_SETFOCUS: - case EN_KILLFOCUS: - { - wxFocusEvent event(param == EN_KILLFOCUS ? wxEVT_KILL_FOCUS - : wxEVT_SET_FOCUS, - m_windowId); - event.SetEventObject( this ); - ProcessEvent(event); - } - break; - - case EN_CHANGE: - { - wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId); - wxString val(GetValue()); - if ( !val.IsNull() ) - event.m_commandString = WXSTRINGCAST val; - event.SetEventObject( this ); - ProcessCommand(event); - } - break; - - // the other notification messages are not processed - case EN_UPDATE: - case EN_ERRSPACE: - case EN_MAXTEXT: - case EN_HSCROLL: - case EN_VSCROLL: - default: - return FALSE; - } - - // processed - return TRUE; -} - - -// For Rich Edit controls. Do we need it? -#if 0 -#if defined(__WIN95__) -bool wxTextCtrl::MSWNotify(WXWPARAM wParam, WXLPARAM lParam) -{ - wxCommandEvent event(0, m_windowId); - int eventType = 0; - NMHDR *hdr1 = (NMHDR *) lParam; - switch ( hdr1->code ) - { - // Insert case code here - default : - return wxControl::MSWNotify(wParam, lParam); - break; - } - - event.SetEventObject( this ); - event.SetEventType(eventType); - - if ( !ProcessEvent(event) ) - return FALSE; - - return TRUE; -} -#endif -#endif - diff --git a/src/msw/thread.cpp b/src/msw/thread.cpp deleted file mode 100644 index 4cd91e87c0..0000000000 --- a/src/msw/thread.cpp +++ /dev/null @@ -1,322 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: thread.cpp -// Purpose: wxThread Implementation -// Author: Original from Wolfram Gloger/Guilhem Lavaux -// Modified by: -// Created: 04/22/98 -// RCS-ID: $Id$ -// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "thread.h" -#endif - -#include "wx/wxprec.h" - -#if defined(__BORLANDC__) -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include - -#include -#include "wx/module.h" -#include "wx/thread.h" - -enum thread_state { - STATE_IDLE = 0, - STATE_RUNNING, - STATE_CANCELED, - STATE_EXITED -}; - -///////////////////////////////////////////////////////////////////////////// -// Static variables -///////////////////////////////////////////////////////////////////////////// - -static HANDLE p_mainid; -wxMutex wxMainMutex; // controls access to all GUI functions - -///////////////////////////////////////////////////////////////////////////// -// Windows implementation -///////////////////////////////////////////////////////////////////////////// - -class wxMutexInternal { -public: - HANDLE p_mutex; -}; - -wxMutex::wxMutex() -{ - p_internal = new wxMutexInternal; - p_internal->p_mutex = CreateMutex(NULL, FALSE, NULL); - m_locked = 0; -} - -wxMutex::~wxMutex() -{ - if (m_locked > 0) - wxDebugMsg("wxMutex warning: freeing a locked mutex (%d locks)\n", m_locked); - CloseHandle(p_internal->p_mutex); -} - -wxMutexError wxMutex::Lock() -{ - DWORD ret; - - ret = WaitForSingleObject(p_internal->p_mutex, INFINITE); - if (ret == WAIT_ABANDONED) - return MUTEX_BUSY; - - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::TryLock() -{ - DWORD ret; - - ret = WaitForSingleObject(p_internal->p_mutex, 0); - if (ret == WAIT_TIMEOUT || ret == WAIT_ABANDONED) - return MUTEX_BUSY; - - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::Unlock() -{ - BOOL ret; - - if (m_locked > 0) - m_locked--; - - // Why does this have 3 args? The redundant ones removed by JACS -// ret = ReleaseMutex(p_internal->p_mutex, 1, NULL); - ret = ReleaseMutex(p_internal->p_mutex); - return MUTEX_NO_ERROR; -} - -class wxConditionInternal { -public: - HANDLE event; - int waiters; -}; - -wxCondition::wxCondition() -{ - p_internal = new wxConditionInternal; - p_internal->event = CreateEvent(NULL, FALSE, FALSE, NULL); - p_internal->waiters = 0; -} - -wxCondition::~wxCondition() -{ - CloseHandle(p_internal->event); -} - -void wxCondition::Wait(wxMutex& mutex) -{ - mutex.Unlock(); - p_internal->waiters++; - WaitForSingleObject(p_internal->event, INFINITE); - p_internal->waiters--; - mutex.Lock(); -} - -bool wxCondition::Wait(wxMutex& mutex, unsigned long sec, - unsigned long nsec) -{ - DWORD ret; - - mutex.Unlock(); - p_internal->waiters++; - ret = WaitForSingleObject(p_internal->event, (sec*1000)+(nsec/1000000)); - p_internal->waiters--; - mutex.Lock(); - - return (ret != WAIT_TIMEOUT); -} - -void wxCondition::Signal() -{ - SetEvent(p_internal->event); -} - -void wxCondition::Broadcast() -{ - int i; - - for (i=0;iwaiters;i++) - SetEvent(p_internal->event); -} - -class wxThreadInternal { -public: - static DWORD WinThreadStart(LPVOID arg); - - HANDLE thread_id; - int state; - int prio, defer; - DWORD tid; -}; - -DWORD wxThreadInternal::WinThreadStart(LPVOID arg) -{ - wxThread *ptr = (wxThread *)arg; - DWORD ret; - - ret = (DWORD)ptr->Entry(); - ptr->p_internal->state = STATE_EXITED; - - return ret; -} - -wxThreadError wxThread::Create() -{ - int win_prio, prio = p_internal->prio; - - p_internal->thread_id = CreateThread(NULL, 0, - (LPTHREAD_START_ROUTINE)wxThreadInternal::WinThreadStart, - (void *)this, CREATE_SUSPENDED, &p_internal->tid); - if (p_internal->thread_id == NULL) { - printf("Error = %d\n", GetLastError()); - return THREAD_NO_RESOURCE; - } - - if (prio <= 20) - win_prio = THREAD_PRIORITY_LOWEST; - else if (prio <= 40) - win_prio = THREAD_PRIORITY_BELOW_NORMAL; - else if (prio <= 60) - win_prio = THREAD_PRIORITY_NORMAL; - else if (prio <= 80) - win_prio = THREAD_PRIORITY_ABOVE_NORMAL; - else if (prio <= 100) - win_prio = THREAD_PRIORITY_HIGHEST; - - SetThreadPriority(p_internal->thread_id, win_prio); - - ResumeThread(p_internal->thread_id); - p_internal->state = STATE_RUNNING; - - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Destroy() -{ - if (p_internal->state != STATE_RUNNING) - return THREAD_NOT_RUNNING; - - if (p_internal->defer == FALSE) - TerminateThread(p_internal->thread_id, 0); - else - p_internal->state = STATE_CANCELED; - - return THREAD_NO_ERROR; -} - -void wxThread::Exit(void *status) -{ - p_internal->state = STATE_EXITED; - ExitThread((DWORD)status); -} - -void wxThread::SetPriority(int prio) -{ - p_internal->prio = prio; -} - -int wxThread::GetPriority() const -{ - return p_internal->prio; -} - -void wxThread::DeferDestroy(bool on) -{ - p_internal->defer = on; -} - -void wxThread::TestDestroy() -{ - if (p_internal->state == STATE_CANCELED) - ExitThread(0); -} - -void *wxThread::Join() -{ - DWORD exit_code; - - if (p_internal->state == STATE_IDLE) - return NULL; - - if (wxThread::IsMain()) - wxMainMutex.Unlock(); - WaitForSingleObject(p_internal->thread_id, INFINITE); - if (wxThread::IsMain()) - wxMainMutex.Lock(); - - GetExitCodeThread(p_internal->thread_id, &exit_code); - CloseHandle(p_internal->thread_id); - - p_internal->state = STATE_IDLE; - - return (void *)exit_code; -} - -unsigned long wxThread::GetID() const -{ - return (unsigned long)p_internal->tid; -} - -bool wxThread::IsMain() -{ - return (GetCurrentThread() == p_mainid); -} - -wxThread::wxThread() -{ - p_internal = new wxThreadInternal(); - - p_internal->defer = FALSE; - p_internal->prio = WXTHREAD_DEFAULT_PRIORITY; - p_internal->state = STATE_IDLE; -} - -wxThread::~wxThread() -{ - Destroy(); - Join(); - delete p_internal; -} - -// The default callback just joins the thread and throws away the result. -void wxThread::OnExit() -{ - Join(); -} - -// Automatic initialization -class wxThreadModule : public wxModule { - DECLARE_DYNAMIC_CLASS(wxThreadModule) -public: - virtual bool OnInit() { - p_mainid = GetCurrentThread(); - wxMainMutex.Lock(); - return TRUE; - } - - // Global cleanup - virtual void OnExit() { - wxMainMutex.Unlock(); - } -}; - -IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule) - diff --git a/src/msw/timer.cpp b/src/msw/timer.cpp deleted file mode 100644 index 0896d3648d..0000000000 --- a/src/msw/timer.cpp +++ /dev/null @@ -1,115 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: timer.cpp -// Purpose: wxTimer implementation -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "timer.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/setup.h" -#include "wx/list.h" -#include "wx/app.h" -#endif - -#include "wx/timer.h" -#include "wx/msw/private.h" - -#include -#include - -#if !defined(__SC__) && !defined(__GNUWIN32__) -#include -#endif -#ifdef __WIN32__ -#define _EXPORT /**/ -#else -#define _EXPORT _export -#endif - -#include - -wxList wxTimerList(wxKEY_INTEGER); -UINT WINAPI _EXPORT wxTimerProc(HWND hwnd, WORD, int idTimer, DWORD); - -#if !USE_SHARED_LIBRARY -IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject) -#endif - -wxTimer::wxTimer(void) -{ - milli = 0 ; - lastMilli = -1 ; - id = 0; -} - -wxTimer::~wxTimer(void) -{ - Stop(); - - wxTimerList.DeleteObject(this); -} - -bool wxTimer::Start(int milliseconds,bool mode) -{ - oneShot = mode ; - if (milliseconds < 0) - milliseconds = lastMilli; - - if (milliseconds <= 0) - return FALSE; - - lastMilli = milli = milliseconds; - - wxTimerList.DeleteObject(this); - TIMERPROC wxTimerProcInst = (TIMERPROC) MakeProcInstance((FARPROC)wxTimerProc, - wxGetInstance()); - - id = SetTimer(NULL, (UINT)(id ? id : 1), (UINT)milliseconds, wxTimerProcInst); - if (id > 0) - { - wxTimerList.Append(id, this); - return TRUE; - } - else return FALSE; -} - -void wxTimer::Stop(void) -{ - if (id) { - KillTimer(NULL, (UINT)id); - wxTimerList.DeleteObject(this); /* @@@@ */ - } - id = 0 ; - milli = 0 ; -} - -UINT WINAPI _EXPORT wxTimerProc(HWND WXUNUSED(hwnd), WORD, int idTimer, DWORD) -{ - wxNode *node = wxTimerList.Find((long)idTimer); - if (node) - { - wxTimer *timer = (wxTimer *)node->Data(); - if (timer->id==0) - return(0) ; // Avoid to process spurious timer events - if (timer->oneShot) - timer->Stop() ; - timer->Notify(); - } - return 0; -} - diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp deleted file mode 100644 index 549b53236f..0000000000 --- a/src/msw/treectrl.cpp +++ /dev/null @@ -1,1005 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: treectrl.cpp -// Purpose: wxTreeCtrl -// Author: Julian Smart -// Modified by: -// Created: 1997 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "treectrl.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx.h" -#endif - -#include "wx/log.h" - -#if defined(__WIN95__) - -#include "wx/treectrl.h" -#include "wx/msw/private.h" - -#ifndef __GNUWIN32__ -#include -#endif - -// Bug in headers, sometimes -#ifndef TVIS_FOCUSED -#define TVIS_FOCUSED 0x0001 -#endif - -static void wxConvertToMSWTreeItem(wxTreeItem& info, TV_ITEM& tvItem); -static void wxConvertFromMSWTreeItem(wxTreeItem& info, TV_ITEM& tvItem, HWND getFullInfo = 0); - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxTreeCtrl, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxTreeItem, wxObject) - -#endif - -wxTreeCtrl::wxTreeCtrl(void) -{ - m_imageListNormal = NULL; - m_imageListState = NULL; - m_textCtrl = NULL; -} - -bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style, const wxValidator& validator, const wxString& name) -{ - wxSystemSettings settings; - SetBackgroundColour(settings.GetSystemColour(wxSYS_COLOUR_WINDOW)); - SetForegroundColour(parent->GetDefaultForegroundColour()); - - SetName(name); - SetValidator(validator); - - m_imageListNormal = NULL; - m_imageListState = NULL; - m_textCtrl = NULL; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - m_windowStyle = style; - -// SetFont(wxTheFontList->FindOrCreateFont(11, wxSWISS, wxNORMAL, wxNORMAL)); - - SetParent(parent); - - if (width <= 0) - width = 100; - if (height <= 0) - height = 30; - if (x < 0) - x = 0; - if (y < 0) - y = 0; - - m_windowId = (id == -1) ? NewControlId() : id; - - DWORD wstyle = WS_VISIBLE | WS_CHILD | WS_TABSTOP | TVS_HASLINES; - - bool want3D; - WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D) ; - - // Even with extended styles, need to combine with WS_BORDER - // for them to look right. - if (want3D || (m_windowStyle & wxSIMPLE_BORDER) || (m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSUNKEN_BORDER) || (m_windowStyle & wxDOUBLE_BORDER)) - wstyle |= WS_BORDER; - - if ( m_windowStyle & wxTR_HAS_BUTTONS ) - wstyle |= TVS_HASBUTTONS; - - if ( m_windowStyle & wxTR_EDIT_LABELS ) - wstyle |= TVS_EDITLABELS; - - if ( m_windowStyle & wxTR_LINES_AT_ROOT ) - wstyle |= TVS_LINESATROOT; - - // Create the toolbar control. - HWND hWndTreeControl = CreateWindowEx(exStyle, - WC_TREEVIEW, - "", - wstyle, - x, y, width, height, - (HWND) parent->GetHWND(), - (HMENU)m_windowId, - wxGetInstance(), - NULL ); - - m_hWnd = (WXHWND) hWndTreeControl; - if (parent) parent->AddChild(this); - - SubclassWin((WXHWND) m_hWnd); - - return TRUE; -} - -wxTreeCtrl::~wxTreeCtrl(void) -{ - if (m_textCtrl) - { - m_textCtrl->UnsubclassWin(); - m_textCtrl->SetHWND((WXHWND) 0); - delete m_textCtrl; - } -} - -// Attributes -int wxTreeCtrl::GetCount(void) const -{ - return (int) TreeView_GetCount((HWND) GetHWND()); -} - -int wxTreeCtrl::GetIndent(void) const -{ - return (int) TreeView_GetIndent((HWND) GetHWND()); -} - -void wxTreeCtrl::SetIndent(int indent) -{ - TreeView_SetIndent((HWND) GetHWND(), indent); -} - -wxImageList *wxTreeCtrl::GetImageList(int which) const -{ - if ( which == wxIMAGE_LIST_NORMAL ) - { - return m_imageListNormal; - } - else if ( which == wxIMAGE_LIST_STATE ) - { - return m_imageListState; - } - return NULL; -} - -void wxTreeCtrl::SetImageList(wxImageList *imageList, int which) -{ - int flags = 0; - if ( which == wxIMAGE_LIST_NORMAL ) - { - flags = TVSIL_NORMAL; - m_imageListNormal = imageList; - } - else if ( which == wxIMAGE_LIST_STATE ) - { - flags = TVSIL_STATE; - m_imageListState = imageList; - } - TreeView_SetImageList((HWND) GetHWND(), (HIMAGELIST) imageList ? imageList->GetHIMAGELIST() : 0, flags); -} - -long wxTreeCtrl::GetNextItem(long item, int code) const -{ - UINT flag = 0; - switch ( code ) - { - case wxTREE_NEXT_CARET: - flag = TVGN_CARET; - break; - case wxTREE_NEXT_CHILD: - flag = TVGN_CHILD; - break; - case wxTREE_NEXT_DROPHILITE: - flag = TVGN_DROPHILITE; - break; - case wxTREE_NEXT_FIRSTVISIBLE: - flag = TVGN_FIRSTVISIBLE; - break; - case wxTREE_NEXT_NEXT: - flag = TVGN_NEXT; - break; - case wxTREE_NEXT_NEXTVISIBLE: - flag = TVGN_NEXTVISIBLE; - break; - case wxTREE_NEXT_PARENT: - flag = TVGN_PARENT; - break; - case wxTREE_NEXT_PREVIOUS: - flag = TVGN_PREVIOUS; - break; - case wxTREE_NEXT_PREVIOUSVISIBLE: - flag = TVGN_PREVIOUSVISIBLE; - break; - case wxTREE_NEXT_ROOT: - flag = TVGN_ROOT; - break; - - default : - break; - } - return (long) TreeView_GetNextItem( (HWND) GetHWND(), (HTREEITEM) item, flag); -} - -bool wxTreeCtrl::ItemHasChildren(long item) const -{ - TV_ITEM item2; - item2.hItem = (HTREEITEM) item; - item2.mask = TVIF_CHILDREN; - TreeView_GetItem((HWND) GetHWND(), &item2); - return (item2.cChildren != 0); -} - -long wxTreeCtrl::GetChild(long item) const -{ - return (long) ::SendMessage((HWND) GetHWND(), TVM_GETNEXTITEM, TVGN_CHILD, (LPARAM)item); -} - -long wxTreeCtrl::GetParent(long item) const -{ - return (long) ::SendMessage((HWND) GetHWND(), TVM_GETNEXTITEM, TVGN_PARENT, (LPARAM)item); -} - -long wxTreeCtrl::GetFirstVisibleItem(void) const -{ - return (long) ::SendMessage((HWND) GetHWND(), TVM_GETNEXTITEM, TVGN_FIRSTVISIBLE, 0); -} - -long wxTreeCtrl::GetNextVisibleItem(long item) const -{ - return (long) ::SendMessage((HWND) GetHWND(), TVM_GETNEXTITEM, TVGN_NEXTVISIBLE, (LPARAM)item); -} - -long wxTreeCtrl::GetSelection(void) const -{ - return (long) ::SendMessage((HWND) GetHWND(), TVM_GETNEXTITEM, TVGN_CARET, 0); -} - -long wxTreeCtrl::GetRootItem(void) const -{ - return (long) ::SendMessage((HWND) GetHWND(), TVM_GETNEXTITEM, TVGN_ROOT, 0); -} - -bool wxTreeCtrl::GetItem(wxTreeItem& info) const -{ - TV_ITEM tvItem; - tvItem.hItem = (HTREEITEM)info.m_itemId; - tvItem.pszText = NULL; - tvItem.mask = - tvItem.stateMask = 0; - - // TODO: convert other bits in the mask - if ( info.m_mask & wxTREE_MASK_TEXT ) - { - tvItem.mask |= TVIF_TEXT; - tvItem.pszText = new char[513]; - tvItem.cchTextMax = 512; - } - if ( info.m_mask & wxTREE_MASK_DATA ) - tvItem.mask |= TVIF_PARAM; - if ( info.m_stateMask & wxTREE_STATE_EXPANDED ) { - tvItem.mask |= TVIF_STATE; - tvItem.stateMask |= TVIS_EXPANDED; - } - - bool success = TreeView_GetItem((HWND)GetHWND(), &tvItem) != 0; - - if ( !success ) - { - wxLogSysError("TreeView_GetItem failed"); - - if (tvItem.pszText) - delete[] tvItem.pszText; - - return FALSE; - } - - wxConvertFromMSWTreeItem(info, tvItem); - - if (tvItem.pszText) - delete[] tvItem.pszText; - - return success; -} - -bool wxTreeCtrl::SetItem(wxTreeItem& info) -{ - TV_ITEM item; - wxConvertToMSWTreeItem(info, item); - return (::SendMessage((HWND) GetHWND(), TVM_SETITEM, 0, (LPARAM)&item) != 0); -} - -int wxTreeCtrl::GetItemState(long item, long stateMask) const -{ - wxTreeItem info; - - info.m_mask = wxTREE_MASK_STATE ; - info.m_stateMask = stateMask; - info.m_itemId = item; - - if (!GetItem(info)) - return 0; - - return info.m_state; -} - -bool wxTreeCtrl::SetItemState(long item, long state, long stateMask) -{ - wxTreeItem info; - - info.m_mask = wxTREE_MASK_STATE ; - info.m_state = state; - info.m_stateMask = stateMask; - info.m_itemId = item; - - return SetItem(info); -} - -bool wxTreeCtrl::SetItemImage(long item, int image, int selImage) -{ - wxTreeItem info; - - info.m_mask = wxTREE_MASK_IMAGE ; - info.m_image = image; - if ( selImage > -1) - { - info.m_selectedImage = selImage; - info.m_mask |= wxTREE_MASK_SELECTED_IMAGE; - } - info.m_itemId = item; - - return SetItem(info); -} - -wxString wxTreeCtrl::GetItemText(long item) const -{ - wxTreeItem info; - - info.m_mask = wxTREE_MASK_TEXT ; - info.m_itemId = item; - - if (!GetItem(info)) - return wxString(""); - return info.m_text; -} - -void wxTreeCtrl::SetItemText(long item, const wxString& str) -{ - wxTreeItem info; - - info.m_mask = wxTREE_MASK_TEXT ; - info.m_itemId = item; - info.m_text = str; - - SetItem(info); -} - -long wxTreeCtrl::GetItemData(long item) const -{ - wxTreeItem info; - - info.m_mask = wxTREE_MASK_DATA ; - info.m_itemId = item; - - if (!GetItem(info)) - return 0; - return info.m_data; -} - -bool wxTreeCtrl::SetItemData(long item, long data) -{ - wxTreeItem info; - - info.m_mask = wxTREE_MASK_DATA ; - info.m_itemId = item; - info.m_data = data; - - return SetItem(info); -} - -bool wxTreeCtrl::GetItemRect(long item, wxRectangle& rect, bool textOnly) const -{ - RECT rect2; - - *(HTREEITEM*)& rect2 = (HTREEITEM) item; - bool success = (::SendMessage((HWND) GetHWND(), TVM_GETITEMRECT, (WPARAM)textOnly, - (LPARAM)&rect2) != 0); - - rect.x = rect2.left; - rect.y = rect2.top; - rect.width = rect2.right - rect2.left; - rect.height = rect2.bottom - rect2.left; - return success; -} - -wxTextCtrl* wxTreeCtrl::GetEditControl(void) const -{ - return m_textCtrl; -} - -// Operations -bool wxTreeCtrl::DeleteItem(long item) -{ - return (TreeView_DeleteItem((HWND) GetHWND(), (HTREEITEM) item) != 0); -} - -bool wxTreeCtrl::ExpandItem(long item, int action) -{ - UINT mswAction = TVE_EXPAND; - switch ( action ) - { - case wxTREE_EXPAND_EXPAND: - mswAction = TVE_EXPAND; - break; - - case wxTREE_EXPAND_COLLAPSE: - mswAction = TVE_COLLAPSE; - break; - - case wxTREE_EXPAND_COLLAPSE_RESET: - // @@@ it should also delete all the items! currently, if you do use this - // code your program will probaly crash. Feel free to remove this if - // it does work - wxFAIL_MSG("wxTREE_EXPAND_COLLAPSE_RESET probably doesn't work."); - mswAction = TVE_COLLAPSERESET; - break; - - case wxTREE_EXPAND_TOGGLE: - mswAction = TVE_TOGGLE; - break; - - default: - wxFAIL_MSG("unknown action in wxTreeCtrl::ExpandItem"); - } - - bool bOk = TreeView_Expand((HWND)GetHWND(), (HTREEITEM)item, mswAction) != 0; - - // TreeView_Expand doesn't send TVN_EXPAND(ING) messages, so emulate them - if ( bOk ) { - wxTreeEvent event(wxEVT_NULL, m_windowId); - event.m_item.m_itemId = item; - event.m_item.m_mask = - event.m_item.m_stateMask = 0xffff; // get all - GetItem(event.m_item); - - bool bIsExpanded = (event.m_item.m_state & wxTREE_STATE_EXPANDED) != 0; - - event.m_code = action; - event.SetEventObject(this); - - // @@@ return values of {EXPAND|COLLAPS}ING event handler is discarded - event.SetEventType(bIsExpanded ? wxEVT_COMMAND_TREE_ITEM_EXPANDING - : wxEVT_COMMAND_TREE_ITEM_COLLAPSING); - GetEventHandler()->ProcessEvent(event); - - event.SetEventType(bIsExpanded ? wxEVT_COMMAND_TREE_ITEM_EXPANDED - : wxEVT_COMMAND_TREE_ITEM_COLLAPSED); - GetEventHandler()->ProcessEvent(event); - } - - return bOk; -} - -long wxTreeCtrl::InsertItem(long parent, wxTreeItem& info, long insertAfter) -{ - TV_INSERTSTRUCT tvInsertStruct; - tvInsertStruct.hParent = (HTREEITEM) parent ; - tvInsertStruct.hInsertAfter = (HTREEITEM) insertAfter ; - - wxConvertToMSWTreeItem(info, tvInsertStruct.item); - - return (long) TreeView_InsertItem((HWND) GetHWND(), & tvInsertStruct); -} - -long wxTreeCtrl::InsertItem(long parent, const wxString& label, int image, int selImage, - long insertAfter) -{ - wxTreeItem info; - info.m_text = label; - info.m_mask = wxTREE_MASK_TEXT; - if ( image > -1 ) - { - info.m_mask |= wxTREE_MASK_IMAGE | wxTREE_MASK_SELECTED_IMAGE; - info.m_image = image; - if ( selImage == -1 ) - info.m_selectedImage = image; - else - info.m_selectedImage = selImage; - } - - return InsertItem(parent, info, insertAfter); -} - -bool wxTreeCtrl::SelectItem(long item) -{ - return (TreeView_SelectItem((HWND) GetHWND(), (HTREEITEM) item) != 0); -} - -bool wxTreeCtrl::ScrollTo(long item) -{ - return (TreeView_SelectSetFirstVisible((HWND) GetHWND(), (HTREEITEM) item) != 0); -} - -bool wxTreeCtrl::DeleteAllItems(void) -{ - return (TreeView_DeleteAllItems((HWND) GetHWND()) != 0); -} - -wxTextCtrl* wxTreeCtrl::EditLabel(long item, wxClassInfo* textControlClass) -{ - wxASSERT( (textControlClass->IsKindOf(CLASSINFO(wxTextCtrl))) ); - - HWND hWnd = (HWND) TreeView_EditLabel((HWND) GetHWND(), item); - - if (m_textCtrl) - { - m_textCtrl->UnsubclassWin(); - m_textCtrl->SetHWND(0); - delete m_textCtrl; - m_textCtrl = NULL; - } - - m_textCtrl = (wxTextCtrl*) textControlClass->CreateObject(); - m_textCtrl->SetHWND((WXHWND) hWnd); - m_textCtrl->SubclassWin((WXHWND) hWnd); - - return m_textCtrl; -} - -// End label editing, optionally cancelling the edit -bool wxTreeCtrl::EndEditLabel(bool cancel) -{ - bool success = (TreeView_EndEditLabelNow((HWND) GetHWND(), cancel) != 0); - - if (m_textCtrl) - { - m_textCtrl->UnsubclassWin(); - m_textCtrl->SetHWND(0); - delete m_textCtrl; - m_textCtrl = NULL; - } - return success; -} - -long wxTreeCtrl::HitTest(const wxPoint& point, int& flags) -{ - TV_HITTESTINFO hitTestInfo; - hitTestInfo.pt.x = (int) point.x; - hitTestInfo.pt.y = (int) point.y; - - TreeView_HitTest((HWND) GetHWND(), & hitTestInfo); - - flags = 0; - if ( hitTestInfo.flags & TVHT_ABOVE ) - flags |= wxTREE_HITTEST_ABOVE; - if ( hitTestInfo.flags & TVHT_BELOW ) - flags |= wxTREE_HITTEST_BELOW; - if ( hitTestInfo.flags & TVHT_NOWHERE ) - flags |= wxTREE_HITTEST_NOWHERE; - if ( hitTestInfo.flags & TVHT_ONITEMBUTTON ) - flags |= wxTREE_HITTEST_ONITEMBUTTON; - if ( hitTestInfo.flags & TVHT_ONITEMICON ) - flags |= wxTREE_HITTEST_ONITEMICON; - if ( hitTestInfo.flags & TVHT_ONITEMINDENT ) - flags |= wxTREE_HITTEST_ONITEMINDENT; - if ( hitTestInfo.flags & TVHT_ONITEMLABEL ) - flags |= wxTREE_HITTEST_ONITEMLABEL; - if ( hitTestInfo.flags & TVHT_ONITEMRIGHT ) - flags |= wxTREE_HITTEST_ONITEMRIGHT; - if ( hitTestInfo.flags & TVHT_ONITEMSTATEICON ) - flags |= wxTREE_HITTEST_ONITEMSTATEICON; - if ( hitTestInfo.flags & TVHT_TOLEFT ) - flags |= wxTREE_HITTEST_TOLEFT; - if ( hitTestInfo.flags & TVHT_TORIGHT ) - flags |= wxTREE_HITTEST_TORIGHT; - - return (long) hitTestInfo.hItem ; -} - -/* -wxImageList *wxTreeCtrl::CreateDragImage(long item) -{ -} -*/ - -bool wxTreeCtrl::SortChildren(long item) -{ - return (TreeView_SortChildren((HWND) GetHWND(), (HTREEITEM) item, 0) != 0); -} - -bool wxTreeCtrl::EnsureVisible(long item) -{ - return (TreeView_EnsureVisible((HWND) GetHWND(), (HTREEITEM) item) != 0); -} - -bool wxTreeCtrl::MSWCommand(WXUINT cmd, WXWORD id) -{ - if (cmd == EN_UPDATE) - { - wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, id); - event.SetEventObject( this ); - ProcessCommand(event); - return TRUE; - } - else if (cmd == EN_KILLFOCUS) - { - wxCommandEvent event(wxEVT_KILL_FOCUS, id); - event.SetEventObject( this ); - ProcessCommand(event); - return TRUE; - } - else return FALSE; -} - -bool wxTreeCtrl::MSWNotify(WXWPARAM wParam, WXLPARAM lParam) -{ - wxTreeEvent event(wxEVT_NULL, m_windowId); - wxEventType eventType = wxEVT_NULL; - NMHDR* hdr1 = (NMHDR*) lParam; - switch ( hdr1->code ) - { - case TVN_BEGINDRAG: - { - eventType = wxEVT_COMMAND_TREE_BEGIN_DRAG; - NM_TREEVIEW* hdr = (NM_TREEVIEW*)lParam; - wxConvertFromMSWTreeItem(event.m_item, hdr->itemNew, (HWND) GetHWND()); - event.m_pointDrag.x = hdr->ptDrag.x; - event.m_pointDrag.y = hdr->ptDrag.y; - break; - } - case TVN_BEGINLABELEDIT: - { - eventType = wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT; - TV_DISPINFO *info = (TV_DISPINFO *)lParam; - wxConvertFromMSWTreeItem(event.m_item, info->item, (HWND) GetHWND()); - break; - } - case TVN_BEGINRDRAG: - { - eventType = wxEVT_COMMAND_TREE_BEGIN_RDRAG; - NM_TREEVIEW* hdr = (NM_TREEVIEW*)lParam; - wxConvertFromMSWTreeItem(event.m_item, hdr->itemNew, (HWND) GetHWND()); - event.m_pointDrag.x = hdr->ptDrag.x; - event.m_pointDrag.y = hdr->ptDrag.y; - break; - } - case TVN_DELETEITEM: - { - eventType = wxEVT_COMMAND_TREE_DELETE_ITEM; - NM_TREEVIEW* hdr = (NM_TREEVIEW*)lParam; - wxConvertFromMSWTreeItem(event.m_item, hdr->itemOld, (HWND) GetHWND()); - event.m_pointDrag.x = hdr->ptDrag.x; - event.m_pointDrag.y = hdr->ptDrag.y; - break; - } - case TVN_ENDLABELEDIT: - { - eventType = wxEVT_COMMAND_TREE_END_LABEL_EDIT; - TV_DISPINFO *info = (TV_DISPINFO *)lParam; - wxConvertFromMSWTreeItem(event.m_item, info->item, (HWND) GetHWND()); - break; - } - case TVN_GETDISPINFO: - { - eventType = wxEVT_COMMAND_TREE_GET_INFO; - TV_DISPINFO *info = (TV_DISPINFO *)lParam; - wxConvertFromMSWTreeItem(event.m_item, info->item, (HWND) GetHWND()); - break; - } - case TVN_ITEMEXPANDING: - { - NM_TREEVIEW* hdr = (NM_TREEVIEW*)lParam; - wxConvertFromMSWTreeItem(event.m_item, hdr->itemNew, (HWND) GetHWND()); - - switch ( hdr->action ) - { - case TVE_EXPAND: - eventType = wxEVT_COMMAND_TREE_ITEM_EXPANDING; - break; - - case TVE_COLLAPSE: - eventType = wxEVT_COMMAND_TREE_ITEM_COLLAPSING; - break; - - case TVE_COLLAPSERESET: - case TVE_TOGGLE: - wxLogDebug("unexpected code in TVN_ITEMEXPANDING message"); - break; - } - break; - } - - case TVN_ITEMEXPANDED: - { - NM_TREEVIEW* hdr = (NM_TREEVIEW*)lParam; - wxConvertFromMSWTreeItem(event.m_item, hdr->itemNew, (HWND) GetHWND()); - switch ( hdr->action ) - { - case TVE_EXPAND: - eventType = wxEVT_COMMAND_TREE_ITEM_EXPANDED; - break; - - case TVE_COLLAPSE: - eventType = wxEVT_COMMAND_TREE_ITEM_COLLAPSED; - break; - - case TVE_COLLAPSERESET: - case TVE_TOGGLE: - wxLogDebug("unexpected code in TVN_ITEMEXPANDED message"); - break; - } - break; - } - case TVN_KEYDOWN: - { - eventType = wxEVT_COMMAND_TREE_KEY_DOWN; - TV_KEYDOWN *info = (TV_KEYDOWN *)lParam; - event.m_code = wxCharCodeMSWToWX(info->wVKey); - break; - } - case TVN_SELCHANGED: - { - eventType = wxEVT_COMMAND_TREE_SEL_CHANGED; - NM_TREEVIEW* hdr = (NM_TREEVIEW*)lParam; - wxConvertFromMSWTreeItem(event.m_item, hdr->itemNew, (HWND) GetHWND()); - event.m_oldItem = (long) hdr->itemNew.hItem; - - break; - } - case TVN_SELCHANGING: - { - eventType = wxEVT_COMMAND_TREE_SEL_CHANGING; - NM_TREEVIEW* hdr = (NM_TREEVIEW*)lParam; - wxConvertFromMSWTreeItem(event.m_item, hdr->itemNew, (HWND) GetHWND()); - event.m_oldItem = (long) hdr->itemNew.hItem; - break; - } - case TVN_SETDISPINFO: - { - eventType = wxEVT_COMMAND_TREE_SET_INFO; - TV_DISPINFO *info = (TV_DISPINFO *)lParam; - wxConvertFromMSWTreeItem(event.m_item, info->item, (HWND) GetHWND()); - break; - } - - default : - return wxControl::MSWNotify(wParam, lParam); - break; - } - - event.SetEventObject(this); - event.SetEventType(eventType); - - if ( !GetEventHandler()->ProcessEvent(event) ) - return FALSE; - - if (hdr1->code == TVN_GETDISPINFO) - { - TV_DISPINFO *info = (TV_DISPINFO *)lParam; - wxConvertToMSWTreeItem(event.m_item, info->item); - } - - return TRUE; -} - -// Tree item structure -wxTreeItem::wxTreeItem(void) -{ - m_mask = 0; - m_itemId = 0; - m_state = 0; - m_stateMask = 0; - m_image = -1; - m_selectedImage = -1; - m_children = 0; - m_data = 0; -} - -// If getFullInfo is TRUE, we explicitly query for more info if we haven't got it all. -static void wxConvertFromMSWTreeItem(wxTreeItem& info, TV_ITEM& tvItem, HWND getFullInfo) -{ - info.m_data = tvItem.lParam; - info.m_mask = 0; - info.m_state = 0; - info.m_stateMask = 0; - - long oldMask = tvItem.mask; - - bool needText = FALSE; - if (getFullInfo != 0) - { - if ( tvItem.mask & TVIF_TEXT ) - needText = FALSE; - else - needText = TRUE; - - if ( needText ) - { - tvItem.pszText = new char[513]; - tvItem.cchTextMax = 512; - } - tvItem.mask |= TVIF_HANDLE | TVIF_STATE | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN | TVIF_PARAM ; - ::SendMessage(getFullInfo, TVM_GETITEM, 0, (LPARAM)& tvItem) ; - } - - if ( tvItem.mask & TVIF_HANDLE ) - { - info.m_mask |= wxTREE_MASK_HANDLE; - info.m_itemId = (long) tvItem.hItem; - } - if ( tvItem.mask & TVIF_STATE ) - { - info.m_mask |= wxTREE_MASK_STATE; - if ( tvItem.stateMask & TVIS_BOLD) - { - info.m_stateMask |= wxTREE_STATE_BOLD ; - if ( tvItem.state & TVIS_BOLD ) - info.m_state |= wxTREE_STATE_BOLD ; - } - - if ( tvItem.stateMask & TVIS_CUT) - { - info.m_stateMask |= wxTREE_STATE_CUT ; - if ( tvItem.state & TVIS_CUT ) - info.m_state |= wxTREE_STATE_CUT ; - } - - if ( tvItem.stateMask & TVIS_DROPHILITED) - { - info.m_stateMask |= wxTREE_STATE_DROPHILITED ; - if ( tvItem.state & TVIS_DROPHILITED ) - info.m_state |= wxTREE_STATE_DROPHILITED ; - } - if ( tvItem.stateMask & TVIS_EXPANDED) - { - info.m_stateMask |= wxTREE_STATE_EXPANDED ; - if ( tvItem.state & TVIS_EXPANDED ) - info.m_state |= wxTREE_STATE_EXPANDED ; - } - if ( tvItem.stateMask & TVIS_EXPANDEDONCE) - { - info.m_stateMask |= wxTREE_STATE_EXPANDEDONCE ; - if ( tvItem.state & TVIS_EXPANDEDONCE ) - info.m_state |= wxTREE_STATE_EXPANDEDONCE ; - } - if ( tvItem.stateMask & TVIS_FOCUSED) - { - info.m_stateMask |= wxTREE_STATE_FOCUSED ; - if ( tvItem.state & TVIS_FOCUSED ) - info.m_state |= wxTREE_STATE_FOCUSED ; - } - if ( tvItem.stateMask & TVIS_SELECTED) - { - info.m_stateMask |= wxTREE_STATE_SELECTED ; - if ( tvItem.state & TVIS_SELECTED ) - info.m_state |= wxTREE_STATE_SELECTED ; - } - } - - if ( tvItem.mask & TVIF_TEXT ) - { - info.m_mask |= wxTREE_MASK_TEXT; - info.m_text = tvItem.pszText; - } - if ( tvItem.mask & TVIF_IMAGE ) - { - info.m_mask |= wxTREE_MASK_IMAGE; - info.m_image = tvItem.iImage; - } - if ( tvItem.mask & TVIF_SELECTEDIMAGE ) - { - info.m_mask |= wxTREE_MASK_SELECTED_IMAGE; - info.m_selectedImage = tvItem.iSelectedImage; - } - if ( tvItem.mask & TVIF_CHILDREN ) - { - info.m_mask |= wxTREE_MASK_CHILDREN; - info.m_children = tvItem.cChildren; - } - if ( tvItem.mask & TVIF_PARAM ) - info.m_mask |= wxTREE_MASK_DATA; - - if (needText) - { - if (tvItem.pszText) - delete[] tvItem.pszText; - } - tvItem.mask = oldMask ; -} - -static void wxConvertToMSWTreeItem(wxTreeItem& info, TV_ITEM& tvItem) -{ - tvItem.hItem = (HTREEITEM) info.m_itemId ; - - tvItem.iImage = info.m_image ; - tvItem.iSelectedImage = info.m_selectedImage; - tvItem.cChildren = info.m_children; - tvItem.lParam = info.m_data; - tvItem.mask = 0; - tvItem.stateMask = 0; - tvItem.state = 0; - - if (info.m_mask & wxTREE_MASK_HANDLE) - tvItem.mask |= TVIF_HANDLE ; - if (info.m_mask & wxTREE_MASK_STATE) - tvItem.mask |= TVIF_STATE ; - if (info.m_mask & wxTREE_MASK_TEXT) - { - tvItem.mask |= TVIF_TEXT ; - tvItem.pszText = (char *) (const char *)info.m_text ; - if ( tvItem.pszText ) - tvItem.cchTextMax = info.m_text.Length(); - else - tvItem.cchTextMax = 0; - } - if (info.m_mask & wxTREE_MASK_IMAGE) - tvItem.mask |= TVIF_IMAGE ; - if (info.m_mask & wxTREE_MASK_SELECTED_IMAGE) - tvItem.mask |= TVIF_SELECTEDIMAGE ; - if (info.m_mask & wxTREE_MASK_CHILDREN) - tvItem.mask |= TVIF_CHILDREN ; - if (info.m_mask & wxTREE_MASK_DATA) - tvItem.mask |= TVIF_PARAM ; - - if (info.m_stateMask & wxTREE_STATE_BOLD) - { - tvItem.stateMask |= TVIS_BOLD ; - tvItem.state |= TVIS_BOLD; - } - if (info.m_stateMask & wxTREE_STATE_CUT) - { - tvItem.stateMask |= TVIS_CUT ; - if ( info.m_state & wxTREE_STATE_CUT ) - tvItem.state |= TVIS_CUT; - } - if (info.m_stateMask & wxTREE_STATE_DROPHILITED) - { - tvItem.stateMask |= TVIS_DROPHILITED; - if ( info.m_state & wxTREE_STATE_DROPHILITED ) - tvItem.state |= TVIS_DROPHILITED; - } - if (info.m_stateMask & wxTREE_STATE_EXPANDED) - { - tvItem.stateMask |= TVIS_EXPANDED; - if ( info.m_state & wxTREE_STATE_EXPANDED ) - tvItem.state |= TVIS_EXPANDED; - } - if (info.m_stateMask & wxTREE_STATE_EXPANDEDONCE) - { - tvItem.stateMask |= TVIS_EXPANDEDONCE; - if ( info.m_state & wxTREE_STATE_EXPANDEDONCE ) - tvItem.state |= TVIS_EXPANDEDONCE; - } - if (info.m_stateMask & wxTREE_STATE_FOCUSED) - { - tvItem.stateMask |= TVIS_FOCUSED; - if ( info.m_state & wxTREE_STATE_FOCUSED ) - tvItem.state |= TVIS_FOCUSED; - } - if (info.m_stateMask & wxTREE_STATE_SELECTED) - { - tvItem.stateMask |= TVIS_SELECTED; - if ( info.m_state & wxTREE_STATE_SELECTED ) - tvItem.state |= TVIS_SELECTED; - } -} - -// Tree event -IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent, wxCommandEvent) - -wxTreeEvent::wxTreeEvent(wxEventType commandType, int id): - wxCommandEvent(commandType, id) -{ - m_code = 0; - m_oldItem = 0; -} - -#endif - diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp deleted file mode 100644 index b97c5f8575..0000000000 --- a/src/msw/utils.cpp +++ /dev/null @@ -1,640 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: utils.cpp -// Purpose: Various utilities -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// Note: this is done in utilscmn.cpp now. -// #pragma implementation -// #pragma implementation "utils.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/setup.h" -#include "wx/utils.h" -#include "wx/app.h" -#include "wx/cursor.h" -#endif - -#include "wx/msw/private.h" -#include "wx/timer.h" - -#include - -#ifndef __GNUWIN32__ -#include -#include -#endif - -#ifdef __GNUWIN32__ -#include -#include -#ifndef __MINGW32__ -#include -#endif - -#define stricmp strcasecmp -#endif - -#ifdef __BORLANDC__ // Please someone tell me which version of Borland needs - // this (3.1 I believe) and how to test for it. - // If this works for Borland 4.0 as well, then no worries. -#include -#endif - -#ifdef __WIN32__ -#include - -#ifndef __GNUWIN32__ -#include -#endif -#endif - -#include -#include -#include -#ifndef __WATCOMC__ -#if !(defined(_MSC_VER) && (_MSC_VER > 800)) -#include -#endif -#endif -#include - -// In the WIN.INI file -static const char WX_SECTION[] = "wxWindows"; -static const char eHOSTNAME[] = "HostName"; -static const char eUSERID[] = "UserId"; -static const char eUSERNAME[] = "UserName"; - -// For the following functions we SHOULD fill in support -// for Windows-NT (which I don't know) as I assume it begin -// a POSIX Unix (so claims MS) that it has some special -// functions beyond those provided by WinSock - -// Get full hostname (eg. DoDo.BSn-Germany.crg.de) -bool wxGetHostName(char *buf, int maxSize) -{ -#ifdef __WIN32__ - DWORD nSize = maxSize; - return (::GetComputerName(buf, &nSize) != 0); -#else - char *sysname; - const char *default_host = "noname"; - - if ((sysname = getenv("SYSTEM_NAME")) == NULL) { - GetProfileString(WX_SECTION, eHOSTNAME, default_host, buf, maxSize - 1); - } else - strncpy(buf, sysname, maxSize - 1); - buf[maxSize] = '\0'; - return *buf ? TRUE : FALSE; -#endif -} - -// Get user ID e.g. jacs -bool wxGetUserId(char *buf, int maxSize) -{ -#if defined(__WIN32__) && !defined(__win32s__) && 0 - // Gets the current user's full name according to the MS article PSS ID - // Number: Q119670 - // Seems to be the same as the login name for me? - char *UserName = new char[256]; - char *Domain = new char[256]; - DWORD maxCharacters = 255; - GetUserName( UserName, &maxCharacters ); - GetComputerName( Domain, &maxCharacters ); - - WCHAR wszUserName[256]; // Unicode user name - WCHAR wszDomain[256]; - LPBYTE ComputerName; - - struct _SERVER_INFO_100 *si100; // Server structure - struct _USER_INFO_2 *ui; // User structure - - // Convert ASCII user name and domain to Unicode. - - MultiByteToWideChar( CP_ACP, 0, UserName, - strlen(UserName)+1, wszUserName, sizeof(wszUserName) ); - MultiByteToWideChar( CP_ACP, 0, Domain, - strlen(Domain)+1, wszDomain, sizeof(wszDomain) ); - - // Get the computer name of a DC for the specified domain. - // >If you get a link error on this, include netapi32.lib< - - NetGetDCName( NULL, wszDomain, &ComputerName ); - - // Look up the user on the DC. - - if(NetUserGetInfo( (LPWSTR) ComputerName, - (LPWSTR) &wszUserName, 2, (LPBYTE *) &ui)) - { - printf( "Error getting user information.\n" ); - return( FALSE ); - } - - // Convert the Unicode full name to ASCII. - - WideCharToMultiByte( CP_ACP, 0, ui->usri2_full_name, - -1, buf, 256, NULL, NULL ); - } - return( TRUE ); -/* - DWORD nSize = maxSize; - return ::GetUserName(buf, &nSize); -*/ -#else - char *user; - const char *default_id = "anonymous"; - - // Can't assume we have NIS (PC-NFS) or some other ID daemon - // So we ... - if ( (user = getenv("USER")) == NULL && - (user = getenv("LOGNAME")) == NULL ) { - // Use wxWindows configuration data (comming soon) - GetProfileString(WX_SECTION, eUSERID, default_id, buf, maxSize - 1); - } else - strncpy(buf, user, maxSize - 1); - return *buf ? TRUE : FALSE; -#endif -} - -// Get user name e.g. Julian Smart -bool wxGetUserName(char *buf, int maxSize) -{ - const char *default_name = "Unknown User"; -#if defined(__WIN32__) -/* - DWORD nSize = maxSize; - In VC++ 4.0, results in unresolved symbol __imp__GetUserNameA - if (GetUserName(buf, &nSize)) - return TRUE; - else -*/ - // Could use NIS, MS-Mail or other site specific programs - // Use wxWindows configuration data - GetProfileString(WX_SECTION, eUSERNAME, default_name, buf, maxSize - 1); - return *buf ? TRUE : FALSE; -// } -#else -#if !defined(__WATCOMC__) && !defined(__GNUWIN32__) && USE_PENWINDOWS - extern HANDLE g_hPenWin; // PenWindows Running? - if (g_hPenWin) - { - // PenWindows Does have a user concept! - // Get the current owner of the recognizer - GetPrivateProfileString("Current", "User", default_name, wxBuffer, maxSize - 1, "PENWIN.INI"); - strncpy(buf, wxBuffer, maxSize - 1); - } - else -#endif - { - // Could use NIS, MS-Mail or other site specific programs - // Use wxWindows configuration data - GetProfileString(WX_SECTION, eUSERNAME, default_name, buf, maxSize - 1); - } - return *buf ? TRUE : FALSE; -#endif -} - -int wxKill(long pid, int sig) -{ - return 0; -} - -// -// Execute a program in an Interactive Shell -// -bool -wxShell(const wxString& command) -{ - char *shell; - if ((shell = getenv("COMSPEC")) == NULL) - shell = "\\COMMAND.COM"; - - char tmp[255]; - if (command != "") - sprintf(tmp, "%s /c %s", shell, WXSTRINGCAST command); - else - strcpy(tmp, shell); - - return (wxExecute((char *)tmp, FALSE) != 0); -} - -// Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX) -long wxGetFreeMemory(void) -{ -#if defined(__WIN32__) && !defined(__BORLANDC__) - MEMORYSTATUS memStatus; - memStatus.dwLength = sizeof(MEMORYSTATUS); - GlobalMemoryStatus(&memStatus); - return memStatus.dwAvailPhys; -#else - return (long)GetFreeSpace(0); -#endif -} - -// Sleep for nSecs seconds. Attempt a Windows implementation using timers. -static bool inTimer = FALSE; -class wxSleepTimer: public wxTimer -{ - public: - inline void Notify(void) - { - inTimer = FALSE; - Stop(); - } -}; - -static wxTimer *wxTheSleepTimer = NULL; - -void wxSleep(int nSecs) -{ -#if 0 // WIN32 hangs app - Sleep( 1000*nSecs ); -#else - if (inTimer) - return; - - wxTheSleepTimer = new wxSleepTimer; - inTimer = TRUE; - wxTheSleepTimer->Start(nSecs*1000); - while (inTimer) - { - if (wxTheApp->Pending()) - wxTheApp->Dispatch(); - } - delete wxTheSleepTimer; - wxTheSleepTimer = NULL; -#endif -} - -// Consume all events until no more left -void wxFlushEvents(void) -{ -// wxYield(); -} - -// Output a debug mess., in a system dependent fashion. -void wxDebugMsg(const char *fmt ...) -{ - va_list ap; - static char buffer[512]; - - if (!wxTheApp->GetWantDebugOutput()) - return ; - - va_start(ap, fmt); - - wvsprintf(buffer,fmt,ap) ; - OutputDebugString((LPCSTR)buffer) ; - - va_end(ap); -} - -// Non-fatal error: pop up message box and (possibly) continue -void wxError(const wxString& msg, const wxString& title) -{ - sprintf(wxBuffer, "%s\nContinue?", WXSTRINGCAST msg); - if (MessageBox(NULL, (LPCSTR)wxBuffer, (LPCSTR)WXSTRINGCAST title, - MB_ICONSTOP | MB_YESNO) == IDNO) - wxExit(); -} - -// Fatal error: pop up message box and abort -void wxFatalError(const wxString& msg, const wxString& title) -{ - sprintf(wxBuffer, "%s: %s", WXSTRINGCAST title, WXSTRINGCAST msg); - FatalAppExit(0, (LPCSTR)wxBuffer); -} - -// Emit a beeeeeep -void wxBell(void) -{ -#ifdef __WIN32__ - Beep(1000,1000) ; // 1kHz during 1 sec. -#else - MessageBeep(-1) ; -#endif -} - -// Chris Breeze 27/5/98: revised WIN32 code to -// detect WindowsNT correctly -int wxGetOsVersion(int *majorVsn, int *minorVsn) -{ - extern char *wxOsVersion; - if (majorVsn) *majorVsn = 0; - if (minorVsn) *minorVsn = 0; - -#ifdef WIN32 - OSVERSIONINFO info; - memset(&info, 0, sizeof(OSVERSIONINFO)); - info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - if (GetVersionEx(&info)) - { - if (majorVsn) *majorVsn = info.dwMajorVersion; - if (minorVsn) *minorVsn = info.dwMinorVersion; - switch (info.dwPlatformId) - { - case VER_PLATFORM_WIN32s: - return wxWIN32S; - break; - case VER_PLATFORM_WIN32_WINDOWS: - return wxWIN95; - break; - case VER_PLATFORM_WIN32_NT: - return wxWINDOWS_NT; - break; - } - } - return wxWINDOWS; // error if we get here, return generic value -#else - // Win16 code... - int retValue ; -# ifdef __WINDOWS_386__ - retValue = wxWIN386; -# else -# if !defined(__WATCOMC__) && !defined(GNUWIN32) && USE_PENWINDOWS - extern HANDLE g_hPenWin; - retValue = g_hPenWin ? wxPENWINDOWS : wxWINDOWS ; -# endif -# endif - // @@@@ To be completed. I don't have the manual here... - if (majorVsn) *majorVsn = 3 ; - if (minorVsn) *minorVsn = 1 ; - return retValue ; -#endif -} - -// Reading and writing resources (eg WIN.INI, .Xdefaults) -#if USE_RESOURCES -bool wxWriteResource(const wxString& section, const wxString& entry, const wxString& value, const wxString& file) -{ - if (file != "") - return (WritePrivateProfileString((LPCSTR)WXSTRINGCAST section, (LPCSTR)WXSTRINGCAST entry, (LPCSTR)value, (LPCSTR)WXSTRINGCAST file) != 0); - else - return (WriteProfileString((LPCSTR)WXSTRINGCAST section, (LPCSTR)WXSTRINGCAST entry, (LPCSTR)WXSTRINGCAST value) != 0); -} - -bool wxWriteResource(const wxString& section, const wxString& entry, float value, const wxString& file) -{ - char buf[50]; - sprintf(buf, "%.4f", value); - return wxWriteResource(section, entry, buf, file); -} - -bool wxWriteResource(const wxString& section, const wxString& entry, long value, const wxString& file) -{ - char buf[50]; - sprintf(buf, "%ld", value); - return wxWriteResource(section, entry, buf, file); -} - -bool wxWriteResource(const wxString& section, const wxString& entry, int value, const wxString& file) -{ - char buf[50]; - sprintf(buf, "%d", value); - return wxWriteResource(section, entry, buf, file); -} - -bool wxGetResource(const wxString& section, const wxString& entry, char **value, const wxString& file) -{ - static const char defunkt[] = "$$default"; - if (file != "") - { - int n = GetPrivateProfileString((LPCSTR)WXSTRINGCAST section, (LPCSTR)WXSTRINGCAST entry, (LPCSTR)defunkt, - (LPSTR)wxBuffer, 1000, (LPCSTR)WXSTRINGCAST file); - if (n == 0 || strcmp(wxBuffer, defunkt) == 0) - return FALSE; - } - else - { - int n = GetProfileString((LPCSTR)WXSTRINGCAST section, (LPCSTR)WXSTRINGCAST entry, (LPCSTR)defunkt, - (LPSTR)wxBuffer, 1000); - if (n == 0 || strcmp(wxBuffer, defunkt) == 0) - return FALSE; - } - if (*value) delete[] (*value); - *value = copystring(wxBuffer); - return TRUE; - } - -bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file) -{ - char *s = NULL; - bool succ = wxGetResource(section, entry, (char **)&s, file); - if (succ) - { - *value = (float)strtod(s, NULL); - delete[] s; - return TRUE; - } - else return FALSE; -} - -bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file) -{ - char *s = NULL; - bool succ = wxGetResource(section, entry, (char **)&s, file); - if (succ) - { - *value = strtol(s, NULL, 10); - delete[] s; - return TRUE; - } - else return FALSE; -} - -bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file) -{ - char *s = NULL; - bool succ = wxGetResource(section, entry, (char **)&s, file); - if (succ) - { - *value = (int)strtol(s, NULL, 10); - delete[] s; - return TRUE; - } - else return FALSE; -} -#endif // USE_RESOURCES - -// Old cursor -static HCURSOR wxBusyCursorOld = 0; -static int wxBusyCursorCount = 0; - -// Set the cursor to the busy cursor for all windows -void wxBeginBusyCursor(wxCursor *cursor) -{ - wxBusyCursorCount ++; - if (wxBusyCursorCount == 1) - { - wxBusyCursorOld = ::SetCursor((HCURSOR) cursor->GetHCURSOR()); - } - else - { - (void)::SetCursor((HCURSOR) cursor->GetHCURSOR()); - } -} - -// Restore cursor to normal -void wxEndBusyCursor(void) -{ - if (wxBusyCursorCount == 0) - return; - - wxBusyCursorCount --; - if (wxBusyCursorCount == 0) - { - ::SetCursor(wxBusyCursorOld); - wxBusyCursorOld = 0; - } -} - -// TRUE if we're between the above two calls -bool wxIsBusy(void) -{ - return (wxBusyCursorCount > 0); -} - -// Hack for MS-DOS -char *wxGetUserHome (const wxString& user) -{ - char *home; - wxString user1(user); - - if (user1 != "") { - char tmp[64]; - if (wxGetUserId(tmp, sizeof(tmp)/sizeof(char))) { - // Guests belong in the temp dir - if (stricmp(tmp, "annonymous") == 0) { - if ((home = getenv("TMP")) != NULL || - (home = getenv("TMPDIR")) != NULL || - (home = getenv("TEMP")) != NULL) - return *home ? home : "\\"; - } - if (stricmp(tmp, WXSTRINGCAST user1) == 0) - user1 = ""; - } - } - if (user1 == "") - if ((home = getenv("HOME")) != NULL) - { - strcpy(wxBuffer, home); - Unix2DosFilename(wxBuffer); - return wxBuffer; - } - return NULL; // No home known! -} - -// Check whether this window wants to process messages, e.g. Stop button -// in long calculations. -bool wxCheckForInterrupt(wxWindow *wnd) -{ - if(wnd){ - MSG msg; - HWND win= (HWND) wnd->GetHWND(); - while(PeekMessage(&msg,win,0,0,PM_REMOVE)){ - TranslateMessage(&msg); - DispatchMessage(&msg); - } - return TRUE;//*** temporary? - } - else{ - wxError("wnd==NULL !!!"); - return FALSE;//*** temporary? - } -} - -// MSW only: get user-defined resource from the .res file. -// Returns NULL or newly-allocated memory, so use delete[] to clean up. - -#ifdef __WXMSW__ -char *wxLoadUserResource(const wxString& resourceName, const wxString& resourceType) -{ - char *s = NULL; -#ifndef __WIN32__ - HRSRC hResource = ::FindResource(wxGetInstance(), WXSTRINGCAST resourceName, WXSTRINGCAST resourceType); -#else -#ifdef UNICODE - HRSRC hResource = ::FindResourceW(wxGetInstance(), WXSTRINGCAST resourceName, WXSTRINGCAST resourceType); -#else - HRSRC hResource = ::FindResourceA(wxGetInstance(), WXSTRINGCAST resourceName, WXSTRINGCAST resourceType); -#endif -#endif - - if (hResource == 0) - return NULL; - HGLOBAL hData = ::LoadResource(wxGetInstance(), hResource); - if (hData == 0) - return NULL; - char *theText = (char *)LockResource(hData); - if (!theText) - return NULL; - - s = copystring(theText); - - // Obsolete in WIN32 -#ifndef __WIN32__ - UnlockResource(hData); -#endif - - // No need?? -// GlobalFree(hData); - - return s; -} -#endif - -void wxGetMousePosition( int* x, int* y ) -{ - POINT pt; - GetCursorPos( & pt ); - *x = pt.x; - *y = pt.y; -}; - -// Return TRUE if we have a colour display -bool wxColourDisplay(void) -{ - HDC dc = ::GetDC(NULL); - bool flag; - int noCols = GetDeviceCaps(dc, NUMCOLORS); - if ((noCols == -1) || (noCols > 2)) - flag = TRUE; - else - flag = FALSE; - ReleaseDC(NULL, dc); - return flag; -} - -// Returns depth of screen -int wxDisplayDepth(void) -{ - HDC dc = ::GetDC(NULL); - int planes = GetDeviceCaps(dc, PLANES); - int bitsPerPixel = GetDeviceCaps(dc, BITSPIXEL); - int depth = planes*bitsPerPixel; - ReleaseDC(NULL, dc); - return depth; -} - -// Get size of display -void wxDisplaySize(int *width, int *height) -{ - HDC dc = ::GetDC(NULL); - *width = GetDeviceCaps(dc, HORZRES); *height = GetDeviceCaps(dc, VERTRES); - ReleaseDC(NULL, dc); -} - diff --git a/src/msw/utilsexc.cpp b/src/msw/utilsexc.cpp deleted file mode 100644 index 6ff8518ec4..0000000000 --- a/src/msw/utilsexc.cpp +++ /dev/null @@ -1,202 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: utilsexec.cpp -// Purpose: Various utilities -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/setup.h" -#include "wx/utils.h" -#include "wx/app.h" -#endif - -#include "wx/msw/private.h" -#include - -#include - -#ifndef __GNUWIN32__ -#include -#include -#endif - -#ifdef __GNUWIN32__ -#include -#include -#ifndef __MINGW32__ -#include -#endif - -#endif - -#ifdef __WIN32__ -#include - -#ifndef __GNUWIN32__ -#include -#endif -#endif - -#include -#include -#include -#ifndef __WATCOMC__ -#if !(defined(_MSC_VER) && (_MSC_VER > 800)) -#include -#endif -#endif -#include - -#define wxEXECUTE_WIN_MESSAGE 10000 - -struct wxExecuteData { - HWND window; - HINSTANCE process; - wxProcess *handler; - char state; -}; - - -#ifdef __WIN32__ -static DWORD wxExecuteThread(wxExecuteData *data) -{ - WaitForSingleObject(data->process, INFINITE); - - // Send an implicit message to the window - SendMessage(data->window, wxEXECUTE_WIN_MESSAGE, 0, (LPARAM)data); - - return 0; -} -#endif - - -LRESULT APIENTRY _EXPORT wxExecuteWindowCbk(HWND hWnd, UINT message, - WPARAM wParam, LPARAM lParam) -{ - wxExecuteData *data = (wxExecuteData *)lParam; - - if (message == wxEXECUTE_WIN_MESSAGE) { - DestroyWindow(hWnd); - if (data->handler) - data->handler->OnTerminate((int)data->process); - - if (data->state) - data->state = 0; - else - delete data; - } - return 0; -} - -extern char wxPanelClassName[]; - -long wxExecute(const wxString& command, bool sync, wxProcess *handler) -{ - if (command == "") - return 0; - -#ifdef __WIN32__ - char * cl; - char * argp; - int clen; - HINSTANCE result; - DWORD dresult; - HWND window; - wxExecuteData *data; - DWORD tid; - - // copy the command line - clen = command.Length(); - if (!clen) return -1; - cl = (char *) calloc( 1, 256); - if (!cl) return -1; - strcpy( cl, WXSTRINGCAST command); - - // isolate command and arguments - argp = strchr( cl, ' '); - if (argp) - *argp++ = '\0'; - -#ifdef __GNUWIN32__ - result = ShellExecute((HWND) (wxTheApp->GetTopWindow() ? (HWND) wxTheApp->GetTopWindow()->GetHWND() : NULL), - (const wchar_t) "open", (const wchar_t) cl, (const wchar_t) argp, - (const wchar_t) NULL, SW_SHOWNORMAL); -#else - result = ShellExecute( (HWND) (wxTheApp->GetTopWindow() ? wxTheApp->GetTopWindow()->GetHWND() : NULL), - "open", cl, argp, NULL, SW_SHOWNORMAL); -#endif - - if (((long)result) <= 32) { - free(cl); - return 0; - } - - // Alloc data - data = new wxExecuteData; - - // Create window - window = CreateWindow(wxPanelClassName, NULL, 0, 0, 0, 0, 0, NULL, - (HMENU) NULL, wxGetInstance(), 0); - - FARPROC ExecuteWindowInstance = MakeProcInstance((FARPROC) wxExecuteWindowCbk, - wxGetInstance()); - - SetWindowLong(window, GWL_WNDPROC, (LONG) ExecuteWindowInstance); - SetWindowLong(window, GWL_USERDATA, (LONG) data); - - data->process = result; - data->window = window; - data->state = sync; - data->handler = (sync) ? NULL : handler; - - dresult = (DWORD)CreateThread(NULL, 0, - (LPTHREAD_START_ROUTINE)wxExecuteThread, - (void *)data, 0, &tid); - if (dresult == 0) { - wxDebugMsg("wxExecute PANIC: I can't create the waiting thread !"); - DestroyWindow(window); - return (long)result; - } - - if (!sync) - { - free(cl); - return (long)result; - } - - // waiting until command executed - while (data->state) - wxYield(); - - free(cl); - return 0; -#else - long instanceID = WinExec((LPCSTR) WXSTRINGCAST command, SW_SHOW); - if (instanceID < 32) return(0); - - if (sync) { - int running; - do { - wxYield(); - running = GetModuleUsage((HANDLE)instanceID); - } while (running); - } - return(instanceID); -#endif -} diff --git a/src/msw/wave.cpp b/src/msw/wave.cpp deleted file mode 100644 index 6486eec941..0000000000 --- a/src/msw/wave.cpp +++ /dev/null @@ -1,148 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: wave.cpp -// Purpose: wxWave -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "wave.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#if defined(__BORLANDC__) -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "wx/file.h" -#include "wx/msw/wave.h" -#include "wx/msw/private.h" - -#include -#include - -#ifndef __GNUWIN32__ -#include -#endif - -#ifdef __GNUWIN32__ -#include "wx/msw/gnuwin32/extra.h" -#endif - -wxWave::wxWave() - : m_waveLength(0), m_isResource(FALSE), m_waveData(NULL) -{ -} - -wxWave::wxWave(const wxString& sFileName, bool isResource) - : m_waveLength(0), m_isResource(isResource), m_waveData(NULL) -{ - Create(sFileName, isResource); -} - - -wxWave::~wxWave() -{ - Free(); -} - -bool wxWave::Create(const wxString& fileName, bool isResource) -{ - Free(); - - if (isResource) - { - m_isResource = TRUE; - - HRSRC hresInfo; -#ifdef __WIN32__ - hresInfo = ::FindResourceA((HMODULE) wxhInstance, fileName, "WAVE"); -#else - hresInfo = ::FindResource((HMODULE) wxhInstance, fileName, "WAVE"); -#endif - if (!hresInfo) - return FALSE; - - HGLOBAL waveData = ::LoadResource((HMODULE) wxhInstance, hresInfo); - - if (waveData) - { - m_waveData= (byte*)::LockResource(waveData); - m_waveLength = (int) ::SizeofResource((HMODULE) wxhInstance, hresInfo); - } - - return (m_waveData ? TRUE : FALSE); - } - else - { - m_isResource = FALSE; - - wxFile fileWave; - if (!fileWave.Open(fileName, wxFile::read)) - return FALSE; - - m_waveLength = (int) fileWave.Length(); - - m_waveData = (byte*)::GlobalLock(::GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, m_waveLength)); - if (!m_waveData) - return FALSE; - - fileWave.Read(m_waveData, m_waveLength); - - return TRUE; - } -} - -bool wxWave::Play(bool async, bool looped) const -{ - if (!IsOk()) - return FALSE; - -#ifdef __WIN32__ - return ( ::PlaySound((LPCSTR)m_waveData, NULL, SND_MEMORY | - SND_NODEFAULT | (async ? SND_ASYNC : SND_SYNC) | (looped ? (SND_LOOP | SND_ASYNC) : 0)) != 0 ); -#else - return ( ::sndPlaySound((LPCSTR)m_waveData, SND_MEMORY | - SND_NODEFAULT | (async ? SND_ASYNC : SND_SYNC) | (looped ? (SND_LOOP | SND_ASYNC) : 0)) != 0 ); -#endif -} - -bool wxWave::Free() -{ - if (m_waveData) - { -#ifdef __WIN32__ - HGLOBAL waveData = ::GlobalHandle(m_waveData); -#else - HGLOBAL waveData = GlobalPtrHandle(m_waveData); -#endif - - if (waveData) - { - if (m_isResource) - ::FreeResource(waveData); - else - { - ::GlobalUnlock(waveData); - ::GlobalFree(waveData); - } - - m_waveData = NULL; - m_waveLength = 0; - return TRUE; - } - } - return FALSE; -} - - diff --git a/src/msw/window.cpp b/src/msw/window.cpp deleted file mode 100644 index bae3392e2b..0000000000 --- a/src/msw/window.cpp +++ /dev/null @@ -1,4861 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: windows.cpp -// Purpose: wxWindow -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "window.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#include "wx/setup.h" -#include "wx/menu.h" -#include "wx/dc.h" -#include "wx/dcclient.h" -#include "wx/utils.h" -#include "wx/app.h" -#include "wx/panel.h" -#include "wx/layout.h" -#include "wx/dialog.h" -#include "wx/listbox.h" -#include "wx/button.h" -#include "wx/settings.h" -#include "wx/msgdlg.h" -#endif - -#if USE_OWNER_DRAWN -#include "wx/ownerdrw.h" -#endif - -#if USE_DRAG_AND_DROP -#include "wx/msw/ole/droptgt.h" -#endif - -#include "wx/menuitem.h" -#include "wx/log.h" -#include "wx/msw/private.h" - -#include - -#ifndef __GNUWIN32__ -#include -#include -#endif - -#ifdef __WIN32__ -#include -#endif - -#ifdef __GNUWIN32__ -#include -#endif - -#ifdef GetCharWidth -#undef GetCharWidth -#endif - -#ifdef FindWindow -#undef FindWindow -#endif - -#ifdef GetClassName -#undef GetClassName -#endif - -#ifdef GetClassInfo -#undef GetClassInfo -#endif - -#ifdef __WXDEBUG__ -const char *wxGetMessageName(int message); -#endif //WXDEBUG - -#define WINDOW_MARGIN 3 // This defines sensitivity of Leave events - -wxMenu *wxCurrentPopupMenu = NULL; -extern wxList wxPendingDelete; - -void wxRemoveHandleAssociation(wxWindow *win); -void wxAssociateWinWithHandle(HWND hWnd, wxWindow *win); -wxWindow *wxFindWinFromHandle(WXHWND hWnd); - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxEvtHandler) - -BEGIN_EVENT_TABLE(wxWindow, wxEvtHandler) - EVT_CHAR(wxWindow::OnChar) - EVT_ERASE_BACKGROUND(wxWindow::OnEraseBackground) - EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged) - EVT_INIT_DIALOG(wxWindow::OnInitDialog) - EVT_IDLE(wxWindow::OnIdle) -END_EVENT_TABLE() - -#endif - -// Find an item given the MS Windows id -wxWindow *wxWindow::FindItem(int id) const -{ - if (!GetChildren()) - return NULL; - wxNode *current = GetChildren()->First(); - while (current) - { - wxWindow *childWin = (wxWindow *)current->Data(); - - wxWindow *wnd = childWin->FindItem(id) ; - if (wnd) - return wnd ; - - if (childWin->IsKindOf(CLASSINFO(wxControl))) - { - wxControl *item = (wxControl *)childWin; - if (item->m_windowId == id) - return item; - else - { - // In case it's a 'virtual' control (e.g. radiobox) - if (item->GetSubcontrols().Member((wxObject *)id)) - return item; - } - } - current = current->Next(); - } - return NULL; -} - -// Find an item given the MS Windows handle -wxWindow *wxWindow::FindItemByHWND(WXHWND hWnd, bool controlOnly) const -{ - if (!GetChildren()) - return NULL; - wxNode *current = GetChildren()->First(); - while (current) - { - wxObject *obj = (wxObject *)current->Data() ; - // Do a recursive search. - wxWindow *parent = (wxWindow *)obj ; - wxWindow *wnd = parent->FindItemByHWND(hWnd) ; - if (wnd) - return wnd ; - - if ((!controlOnly) || obj->IsKindOf(CLASSINFO(wxControl))) - { - wxWindow *item = (wxWindow *)current->Data(); - if ((HWND)(item->GetHWND()) == (HWND) hWnd) - return item; - else - { - if ( item->ContainsHWND(hWnd) ) - return item; - } - } - current = current->Next(); - } - return NULL; -} - -// Default command handler -bool wxWindow::MSWCommand(WXUINT WXUNUSED(param), WXWORD WXUNUSED(id)) -{ - return FALSE; -} - -bool wxWindow::MSWNotify(WXWPARAM WXUNUSED(wParam), WXLPARAM WXUNUSED(lParam)) -{ - return FALSE; -} - -void wxWindow::PreDelete(WXHDC WXUNUSED(dc)) -{ -} - -WXHWND wxWindow::GetHWND(void) const -{ - return (WXHWND) m_hWnd; -} - -void wxWindow::SetHWND(WXHWND hWnd) -{ - m_hWnd = hWnd; -} - -// Constructor -wxWindow::wxWindow(void) -{ - // Generic - m_windowId = 0; - m_isShown = TRUE; - m_windowStyle = 0; - m_windowParent = NULL; - m_windowEventHandler = this; - m_windowName = ""; - m_windowCursor = *wxSTANDARD_CURSOR; - m_children = new wxList; - m_doubleClickAllowed = 0 ; - m_winCaptured = FALSE; - m_constraints = NULL; - m_constraintsInvolvedIn = NULL; - m_windowSizer = NULL; - m_sizerParent = NULL; - m_autoLayout = FALSE; - m_windowValidator = NULL; - - // MSW-specific - m_hWnd = 0; - m_winEnabled = TRUE; - m_caretWidth = 0; m_caretHeight = 0; - m_caretEnabled = FALSE; - m_caretShown = FALSE; - m_inOnSize = FALSE; - m_minSizeX = -1; - m_minSizeY = -1; - m_maxSizeX = -1; - m_maxSizeY = -1; -// m_paintHDC = 0; -// m_tempHDC = 0; - m_isBeingDeleted = FALSE; - m_oldWndProc = 0; -#ifndef __WIN32__ - m_globalHandle = 0; -#endif - m_useCtl3D = FALSE; - - m_defaultItem = NULL; - - wxSystemSettings settings; - - m_backgroundColour = settings.GetSystemColour(wxSYS_COLOUR_WINDOW) ; ; - m_foregroundColour = *wxBLACK; - m_defaultForegroundColour = *wxBLACK ; - m_defaultBackgroundColour = settings.GetSystemColour(wxSYS_COLOUR_3DFACE) ; - -/* - wxColour(GetRValue(GetSysColor(COLOR_WINDOW)), - GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE))); -*/ - - // wxWnd - m_lastMsg = 0; - m_lastWParam = 0; - m_lastLParam = 0; -// m_acceleratorTable = 0; - m_hMenu = 0; - - m_xThumbSize = 0; - m_yThumbSize = 0; - m_backgroundTransparent = FALSE; - - m_lastXPos = (float)-1.0; - m_lastYPos = (float)-1.0; - m_lastEvent = -1; - m_returnCode = 0; - -#if USE_DRAG_AND_DROP - m_pDropTarget = NULL; -#endif -} - -// Destructor -wxWindow::~wxWindow(void) -{ - m_isBeingDeleted = TRUE; - - // JACS - if behaviour is odd, restore this - // to the start of ~wxWindow. Vadim has changed - // it to nearer the end. Unsure of side-effects - // e.g. when deleting associated global data. - // Restore old Window proc, if required -// UnsubclassWin(); - - // Have to delete constraints/sizer FIRST otherwise - // sizers may try to look at deleted windows as they - // delete themselves. -#if USE_CONSTRAINTS - DeleteRelatedConstraints(); - if (m_constraints) - { - // This removes any dangling pointers to this window - // in other windows' constraintsInvolvedIn lists. - UnsetConstraints(m_constraints); - delete m_constraints; - m_constraints = NULL; - } - if (m_windowSizer) - { - delete m_windowSizer; - m_windowSizer = NULL; - } - // If this is a child of a sizer, remove self from parent - if (m_sizerParent) - m_sizerParent->RemoveChild((wxWindow *)this); -#endif - - // wxWnd - MSWDetachWindowMenu(); - - if (m_windowParent) - m_windowParent->RemoveChild(this); - - DestroyChildren(); - - if (m_hWnd) - ::DestroyWindow((HWND)m_hWnd); - - wxRemoveHandleAssociation(this); - m_hWnd = 0; -#ifndef __WIN32__ - if (m_globalHandle) - { - GlobalFree((HGLOBAL) m_globalHandle); - m_globalHandle = 0; - } -#endif - - delete m_children; - m_children = NULL; - - // Just in case the window has been Closed, but - // we're then deleting immediately: don't leave - // dangling pointers. - wxPendingDelete.DeleteObject(this); - - // Just in case we've loaded a top-level window via - // wxWindow::LoadNativeDialog but we weren't a dialog - // class - wxTopLevelWindows.DeleteObject(this); - - if ( m_windowValidator ) - delete m_windowValidator; - - // Restore old Window proc, if required - // and remove hWnd <-> wxWindow association - UnsubclassWin(); -} - -// Destroy the window (delayed, if a managed window) -bool wxWindow::Destroy(void) -{ - delete this; - return TRUE; -} - -extern char wxCanvasClassName[]; - -// Constructor -bool wxWindow::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - // Generic - m_isBeingDeleted = FALSE; - m_windowId = 0; - m_isShown = TRUE; - m_windowStyle = 0; - m_windowParent = NULL; - m_windowEventHandler = this; - m_windowName = ""; - m_windowCursor = *wxSTANDARD_CURSOR; - m_doubleClickAllowed = 0 ; - m_winCaptured = FALSE; - m_constraints = NULL; - m_constraintsInvolvedIn = NULL; - m_windowSizer = NULL; - m_sizerParent = NULL; - m_autoLayout = FALSE; - m_windowValidator = NULL; -#if USE_DRAG_AND_DROP - m_pDropTarget = NULL; -#endif - - // MSW-specific - m_hWnd = 0; - m_winEnabled = TRUE; - m_caretWidth = 0; m_caretHeight = 0; - m_caretEnabled = FALSE; - m_caretShown = FALSE; - m_inOnSize = FALSE; - m_minSizeX = -1; - m_minSizeY = -1; - m_maxSizeX = -1; - m_maxSizeY = -1; - m_oldWndProc = 0; -#ifndef __WIN32__ - m_globalHandle = 0; -#endif - m_useCtl3D = FALSE; - m_defaultItem = NULL; - m_windowParent = NULL; - m_mouseInWindow = FALSE; - if (!parent) - return FALSE; - - if (parent) parent->AddChild(this); - - // wxWnd - m_lastMsg = 0; - m_lastWParam = 0; - m_lastLParam = 0; - m_hMenu = 0; - - m_xThumbSize = 0; - m_yThumbSize = 0; - m_backgroundTransparent = FALSE; - - m_lastXPos = (float)-1.0; - m_lastYPos = (float)-1.0; - m_lastEvent = -1; - m_returnCode = 0; - - SetName(name); - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - wxSystemSettings settings; - - m_backgroundColour = settings.GetSystemColour(wxSYS_COLOUR_WINDOW) ; ; - m_foregroundColour = *wxBLACK; - m_defaultForegroundColour = *wxBLACK ; - m_defaultBackgroundColour = settings.GetSystemColour(wxSYS_COLOUR_3DFACE) ; - - m_windowStyle = style; - - DWORD msflags = 0; - if (style & wxBORDER) - msflags |= WS_BORDER; - if (style & wxTHICK_FRAME) - msflags |= WS_THICKFRAME; - - msflags |= WS_CHILD | WS_VISIBLE; - if (style & wxCLIP_CHILDREN) - msflags |= WS_CLIPCHILDREN; - - bool want3D; - WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D) ; - - // Even with extended styles, need to combine with WS_BORDER - // for them to look right. - if (want3D || (m_windowStyle & wxSIMPLE_BORDER) || (m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSUNKEN_BORDER) || (m_windowStyle & wxDOUBLE_BORDER)) - msflags |= WS_BORDER; - - m_mouseInWindow = FALSE ; - - MSWCreate(m_windowId, parent, wxCanvasClassName, this, NULL, - x, y, width, height, msflags, NULL, exStyle); - - return TRUE; -} - -void wxWindow::SetFocus(void) -{ - HWND hWnd = (HWND) GetHWND(); - if (hWnd) - ::SetFocus(hWnd); -} - -void wxWindow::Enable(bool enable) -{ - m_winEnabled = enable; - HWND hWnd = (HWND) GetHWND(); - if (hWnd) - ::EnableWindow(hWnd, (BOOL)enable); -} - -void wxWindow::CaptureMouse(void) -{ - HWND hWnd = (HWND) GetHWND(); - if (hWnd && !m_winCaptured) - { - SetCapture(hWnd); - m_winCaptured = TRUE; - } -} - -void wxWindow::ReleaseMouse(void) -{ - if (m_winCaptured) - { - ReleaseCapture(); - m_winCaptured = FALSE; - } -} - -void wxWindow::SetAcceleratorTable(const wxAcceleratorTable& accel) -{ - m_acceleratorTable = accel; -} - - -// Push/pop event handler (i.e. allow a chain of event handlers -// be searched) -void wxWindow::PushEventHandler(wxEvtHandler *handler) -{ - handler->SetNextHandler(GetEventHandler()); - SetEventHandler(handler); -} - -wxEvtHandler *wxWindow::PopEventHandler(bool deleteHandler) -{ - if ( GetEventHandler() ) - { - wxEvtHandler *handlerA = GetEventHandler(); - wxEvtHandler *handlerB = handlerA->GetNextHandler(); - handlerA->SetNextHandler(NULL); - SetEventHandler(handlerB); - if ( deleteHandler ) - { - delete handlerA; - return NULL; - } - else - return handlerA; - } - else - return NULL; -} - -#if USE_DRAG_AND_DROP - -void wxWindow::SetDropTarget(wxDropTarget *pDropTarget) -{ - if ( m_pDropTarget != 0 ) { - m_pDropTarget->Revoke(m_hWnd); - delete m_pDropTarget; - } - - m_pDropTarget = pDropTarget; - if ( m_pDropTarget != 0 ) - m_pDropTarget->Register(m_hWnd); -} - -#endif - -//old style file-manager drag&drop support -// I think we should retain the old-style -// DragAcceptFiles in parallel with SetDropTarget. -// JACS -void wxWindow::DragAcceptFiles(bool accept) -{ - HWND hWnd = (HWND) GetHWND(); - if (hWnd) - ::DragAcceptFiles(hWnd, (BOOL)accept); -} - -// Get total size -void wxWindow::GetSize(int *x, int *y) const -{ - HWND hWnd = (HWND) GetHWND(); - RECT rect; - GetWindowRect(hWnd, &rect); - *x = rect.right - rect.left; - *y = rect.bottom - rect.top; -} - -void wxWindow::GetPosition(int *x, int *y) const -{ - HWND hWnd = (HWND) GetHWND(); - HWND hParentWnd = 0; - if (GetParent()) - hParentWnd = (HWND) GetParent()->GetHWND(); - - RECT rect; - GetWindowRect(hWnd, &rect); - - // Since we now have the absolute screen coords, - // if there's a parent we must subtract its top left corner - POINT point; - point.x = rect.left; - point.y = rect.top; - if (hParentWnd) - { - ::ScreenToClient(hParentWnd, &point); - } - - // We may be faking the client origin. - // So a window that's really at (0, 30) may appear - // (to wxWin apps) to be at (0, 0). - if (GetParent()) - { - wxPoint pt(GetParent()->GetClientAreaOrigin()); - point.x -= pt.x; - point.y -= pt.y; - } - *x = point.x; - *y = point.y; -} - -void wxWindow::ScreenToClient(int *x, int *y) const -{ - HWND hWnd = (HWND) GetHWND(); - POINT pt; - pt.x = *x; - pt.y = *y; - ::ScreenToClient(hWnd, &pt); - -/* - // We may be faking the client origin. - // So a window that's really at (0, 30) may appear - // (to wxWin apps) to be at (0, 0). - if (GetParent()) - { - wxPoint pt1(GetParent()->GetClientAreaOrigin()); - pt.x -= pt1.x; - pt.y -= pt1.y; - } -*/ - - *x = pt.x; - *y = pt.y; -} - -void wxWindow::ClientToScreen(int *x, int *y) const -{ - HWND hWnd = (HWND) GetHWND(); - POINT pt; - pt.x = *x; - pt.y = *y; - -/* - // We may be faking the client origin. - // So a window that's really at (0, 30) may appear - // (to wxWin apps) to be at (0, 0). - if (GetParent()) - { - wxPoint pt1(GetParent()->GetClientAreaOrigin()); - pt.x += pt1.x; - pt.y += pt1.y; - } -*/ - - ::ClientToScreen(hWnd, &pt); - - *x = pt.x; - *y = pt.y; -} - -void wxWindow::SetCursor(const wxCursor& cursor) -{ - m_windowCursor = cursor; - if (m_windowCursor.Ok()) - { - HWND hWnd = (HWND) GetHWND(); - - // Change the cursor NOW if we're within the correct window - POINT point; - ::GetCursorPos(&point); - - RECT rect; - ::GetWindowRect(hWnd, &rect); - - if (::PtInRect(&rect, point) && !wxIsBusy()) - ::SetCursor((HCURSOR) m_windowCursor.GetHCURSOR()); - } - - // This will cause big reentrancy problems if wxFlushEvents is implemented. -// wxFlushEvents(); -// return old_cursor; -} - - -// Get size *available for subwindows* i.e. excluding menu bar etc. -void wxWindow::GetClientSize(int *x, int *y) const -{ - HWND hWnd = (HWND) GetHWND(); - RECT rect; - GetClientRect(hWnd, &rect); - *x = rect.right; - *y = rect.bottom; -} - -void wxWindow::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - int currentX, currentY; - GetPosition(¤tX, ¤tY); - int actualWidth = width; - int actualHeight = height; - int actualX = x; - int actualY = y; - if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - actualX = currentX; - if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - actualY = currentY; - - AdjustForParentClientOrigin(actualX, actualY, sizeFlags); - - int currentW,currentH; - GetSize(¤tW, ¤tH); - if (width == -1) - actualWidth = currentW ; - if (height == -1) - actualHeight = currentH ; - - HWND hWnd = (HWND) GetHWND(); - if (hWnd) - MoveWindow(hWnd, actualX, actualY, actualWidth, actualHeight, (BOOL)TRUE); -} - -void wxWindow::SetClientSize(int width, int height) -{ - wxWindow *parent = GetParent(); - HWND hWnd = (HWND) GetHWND(); - HWND hParentWnd = (HWND) (HWND) parent->GetHWND(); - - RECT rect; - GetClientRect(hWnd, &rect); - - RECT rect2; - GetWindowRect(hWnd, &rect2); - - // Find the difference between the entire window (title bar and all) - // and the client area; add this to the new client size to move the - // window - int actual_width = rect2.right - rect2.left - rect.right + width; - int actual_height = rect2.bottom - rect2.top - rect.bottom + height; - - // If there's a parent, must subtract the parent's top left corner - // since MoveWindow moves relative to the parent - - POINT point; - point.x = rect2.left; - point.y = rect2.top; - if (parent) - { - ::ScreenToClient(hParentWnd, &point); - } - - MoveWindow(hWnd, point.x, point.y, actual_width, actual_height, (BOOL)TRUE); - - wxSizeEvent event(wxSize(width, height), m_windowId); - event.SetEventObject(this); - GetEventHandler()->ProcessEvent(event); -} - -// For implementation purposes - sometimes decorations make the client area -// smaller -wxPoint wxWindow::GetClientAreaOrigin() const -{ - return wxPoint(0, 0); -} - -// Makes an adjustment to the window position (for example, a frame that has -// a toolbar that it manages itself). -void wxWindow::AdjustForParentClientOrigin(int& x, int& y, int sizeFlags) -{ - if (((sizeFlags & wxSIZE_NO_ADJUSTMENTS) == 0) && GetParent()) - { - wxPoint pt(GetParent()->GetClientAreaOrigin()); - x += pt.x; y += pt.y; - } -} - -bool wxWindow::Show(bool show) -{ - HWND hWnd = (HWND) GetHWND(); - int cshow; - if (show) - cshow = SW_SHOW; - else - cshow = SW_HIDE; - ShowWindow(hWnd, (BOOL)cshow); - if (show) - { - BringWindowToTop(hWnd); - // Next line causes a crash on NT, apparently. -// UpdateWindow(hWnd); // Should this be here or will it cause inefficiency? - } - return TRUE; -} - -bool wxWindow::IsShown(void) const -{ - return (::IsWindowVisible((HWND) GetHWND()) != 0); -} - -int wxWindow::GetCharHeight(void) const -{ - TEXTMETRIC lpTextMetric; - HWND hWnd = (HWND) GetHWND(); - HDC dc = ::GetDC(hWnd); - - GetTextMetrics(dc, &lpTextMetric); - ::ReleaseDC(hWnd, dc); - - return lpTextMetric.tmHeight; -} - -int wxWindow::GetCharWidth(void) const -{ - TEXTMETRIC lpTextMetric; - HWND hWnd = (HWND) GetHWND(); - HDC dc = ::GetDC(hWnd); - - GetTextMetrics(dc, &lpTextMetric); - ::ReleaseDC(hWnd, dc); - - return lpTextMetric.tmAveCharWidth; -} - -void wxWindow::GetTextExtent(const wxString& string, int *x, int *y, - int *descent, int *externalLeading, const wxFont *theFont, bool) const -{ - wxFont *fontToUse = (wxFont *)theFont; - if (!fontToUse) - fontToUse = (wxFont *) & m_windowFont; - - HWND hWnd = (HWND) GetHWND(); - HDC dc = ::GetDC(hWnd); - - HFONT fnt = 0; - HFONT was = 0; - if (fontToUse && fontToUse->Ok()) - { - if ((fnt=(HFONT) fontToUse->GetResourceHandle())) - was = (HFONT) SelectObject(dc,fnt) ; - } - - SIZE sizeRect; - TEXTMETRIC tm; - GetTextExtentPoint(dc, (const char *)string, (int)string.Length(), &sizeRect); - GetTextMetrics(dc, &tm); - - if (fontToUse && fnt && was) - SelectObject(dc,was) ; - - ReleaseDC(hWnd, dc); - - *x = sizeRect.cx; - *y = sizeRect.cy; - if (descent) *descent = tm.tmDescent; - if (externalLeading) *externalLeading = tm.tmExternalLeading; - -// if (fontToUse) -// fontToUse->ReleaseResource(); -} - -void wxWindow::Refresh(bool eraseBack, const wxRectangle *rect) -{ - HWND hWnd = (HWND) GetHWND(); - if (hWnd) - { - if (rect) - { - RECT mswRect; - mswRect.left = rect->x; - mswRect.top = rect->y; - mswRect.right = rect->x + rect->width; - mswRect.bottom = rect->y + rect->height; - - ::InvalidateRect(hWnd, &mswRect, eraseBack); - } - else - ::InvalidateRect(hWnd, NULL, eraseBack); - } -} - -bool wxWindow::ProcessEvent(wxEvent& event) -{ - // we save here the information about the last message because it might be - // overwritten if the event handler sends any messages to our window (case - // in point: wxNotebook::OnSize) - and then if we call Default() later - // (which is done quite often if the message is not processed) it will use - // incorrect values for m_lastXXX variables - WXUINT lastMsg = m_lastMsg; - WXWPARAM lastWParam = m_lastWParam; - WXLPARAM lastLParam = m_lastLParam; - - // call the base version - bool bProcessed = wxEvtHandler::ProcessEvent(event); - - // restore - m_lastMsg = lastMsg; - m_lastWParam = lastWParam; - m_lastLParam = lastLParam; - - return bProcessed; -} - -// Hook for new window just as it's being created, -// when the window isn't yet associated with the handle -wxWindow *wxWndHook = NULL; - -// Main window proc -LRESULT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - wxWindow *wnd = wxFindWinFromHandle((WXHWND) hWnd); - - if (!wnd && wxWndHook) - { - wxAssociateWinWithHandle(hWnd, wxWndHook); - wnd = wxWndHook; - wxWndHook = NULL; - wnd->m_hWnd = (WXHWND) hWnd; - } -#if (WXDEBUG > 1) - wxDebugMsg("hWnd = %d, m_hWnd = %d, msg = %d\n", hWnd, m_hWnd, message); -#endif - // Stop right here if we don't have a valid handle - // in our wxWnd object. - if (wnd && !wnd->m_hWnd) { -// wxDebugMsg("Warning: could not find a valid handle, wx_win.cc/wxWndProc.\n"); - wnd->m_hWnd = (WXHWND) hWnd; - long res = wnd->MSWDefWindowProc(message, wParam, lParam ); - wnd->m_hWnd = 0; - return res; - } - - if (wnd) { - wnd->m_lastMsg = message; - wnd->m_lastWParam = wParam; - wnd->m_lastLParam = lParam; - } - if (wnd) - return wnd->MSWWindowProc(message, wParam, lParam); - else - return DefWindowProc( hWnd, message, wParam, lParam ); -} - -// Should probably have a test for 'genuine' NT -#if defined(__WIN32__) -#define DIMENSION_TYPE short -#else -#define DIMENSION_TYPE int -#endif - -// Main Windows 3 window proc -long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ - wxASSERT( m_lastMsg == message && - m_lastWParam == wParam && - m_lastLParam == lParam ); - - #ifdef __WXDEBUG__ - wxLogTrace(wxTraceMessages, "Processing %s(%lx, %lx)", - wxGetMessageName(message), wParam, lParam); - #endif // WXDEBUG - - HWND hWnd = (HWND)m_hWnd; - - switch (message) - { - case WM_ACTIVATE: - { -#ifdef __WIN32__ - WORD state = LOWORD(wParam); - WORD minimized = HIWORD(wParam); - HWND hwnd = (HWND)lParam; -#else - WORD state = (WORD)wParam; - WORD minimized = LOWORD(lParam); - HWND hwnd = (HWND)HIWORD(lParam); -#endif - MSWOnActivate(state, (minimized != 0), (WXHWND) hwnd); - return 0; - break; - } - case WM_SETFOCUS: - { - HWND hwnd = (HWND)wParam; -// return OnSetFocus(hwnd); - - if (MSWOnSetFocus((WXHWND) hwnd)) - return 0; - else return MSWDefWindowProc(message, wParam, lParam ); - break; - } - case WM_KILLFOCUS: - { - HWND hwnd = (HWND)lParam; -// return OnKillFocus(hwnd); - if (MSWOnKillFocus((WXHWND) hwnd)) - return 0; - else - return MSWDefWindowProc(message, wParam, lParam ); - break; - } - case WM_CREATE: - { - MSWOnCreate((WXLPCREATESTRUCT) (LPCREATESTRUCT)lParam); - return 0; - break; - } - case WM_SHOWWINDOW: - { - MSWOnShow((wParam != 0), (int) lParam); - break; - } - case WM_PAINT: - { - if (MSWOnPaint()) - return 0; - else return MSWDefWindowProc(message, wParam, lParam ); - break; - } - case WM_QUERYDRAGICON: - { - HICON hIcon = 0; - if ((hIcon = (HICON) MSWOnQueryDragIcon())) - return (long)hIcon; - else return MSWDefWindowProc(message, wParam, lParam ); - break; - } - - case WM_SIZE: - { - int width = LOWORD(lParam); - int height = HIWORD(lParam); - MSWOnSize(width, height, wParam); - break; - } - - case WM_MOVE: - { - wxMoveEvent event(wxPoint(LOWORD(lParam), HIWORD(lParam)), - m_windowId); - event.SetEventObject(this); - if ( !GetEventHandler()->ProcessEvent(event) ) - Default(); - } - break; - - case WM_WINDOWPOSCHANGING: - { - MSWOnWindowPosChanging((void *)lParam); - break; - } - - case WM_RBUTTONDOWN: - { - int x = (DIMENSION_TYPE) LOWORD(lParam); - int y = (DIMENSION_TYPE) HIWORD(lParam); - MSWOnRButtonDown(x, y, wParam); - break; - } - case WM_RBUTTONUP: - { - int x = (DIMENSION_TYPE) LOWORD(lParam); - int y = (DIMENSION_TYPE) HIWORD(lParam); - MSWOnRButtonUp(x, y, wParam); - break; - } - case WM_RBUTTONDBLCLK: - { - int x = (DIMENSION_TYPE) LOWORD(lParam); - int y = (DIMENSION_TYPE) HIWORD(lParam); - MSWOnRButtonDClick(x, y, wParam); - break; - } - case WM_MBUTTONDOWN: - { - int x = (DIMENSION_TYPE) LOWORD(lParam); - int y = (DIMENSION_TYPE) HIWORD(lParam); - MSWOnMButtonDown(x, y, wParam); - break; - } - case WM_MBUTTONUP: - { - int x = (DIMENSION_TYPE) LOWORD(lParam); - int y = (DIMENSION_TYPE) HIWORD(lParam); - MSWOnMButtonUp(x, y, wParam); - break; - } - case WM_MBUTTONDBLCLK: - { - int x = (DIMENSION_TYPE) LOWORD(lParam); - int y = (DIMENSION_TYPE) HIWORD(lParam); - MSWOnMButtonDClick(x, y, wParam); - break; - } - case WM_LBUTTONDOWN: - { - int x = (DIMENSION_TYPE) LOWORD(lParam); - int y = (DIMENSION_TYPE) HIWORD(lParam); - MSWOnLButtonDown(x, y, wParam); - break; - } - case WM_LBUTTONUP: - { - int x = (DIMENSION_TYPE) LOWORD(lParam); - int y = (DIMENSION_TYPE) HIWORD(lParam); - MSWOnLButtonUp(x, y, wParam); - break; - } - case WM_LBUTTONDBLCLK: - { - int x = (DIMENSION_TYPE) LOWORD(lParam); - int y = (DIMENSION_TYPE) HIWORD(lParam); - MSWOnLButtonDClick(x, y, wParam); - break; - } - case WM_MOUSEMOVE: - { - int x = (DIMENSION_TYPE) LOWORD(lParam); - int y = (DIMENSION_TYPE) HIWORD(lParam); - MSWOnMouseMove(x, y, wParam); - break; - } - case MM_JOY1BUTTONDOWN: - { - int x = LOWORD(lParam); - int y = HIWORD(lParam); - MSWOnJoyDown(wxJOYSTICK1, x, y, wParam); - break; - } - case MM_JOY2BUTTONDOWN: - { - int x = LOWORD(lParam); - int y = HIWORD(lParam); - MSWOnJoyDown(wxJOYSTICK2, x, y, wParam); - break; - } - case MM_JOY1BUTTONUP: - { - int x = LOWORD(lParam); - int y = HIWORD(lParam); - MSWOnJoyUp(wxJOYSTICK1, x, y, wParam); - break; - } - case MM_JOY2BUTTONUP: - { - int x = LOWORD(lParam); - int y = HIWORD(lParam); - MSWOnJoyUp(wxJOYSTICK2, x, y, wParam); - break; - } - case MM_JOY1MOVE: - { - int x = LOWORD(lParam); - int y = HIWORD(lParam); - MSWOnJoyMove(wxJOYSTICK1, x, y, wParam); - break; - } - case MM_JOY2MOVE: - { - int x = LOWORD(lParam); - int y = HIWORD(lParam); - MSWOnJoyMove(wxJOYSTICK2, x, y, wParam); - break; - } - case MM_JOY1ZMOVE: - { - int z = LOWORD(lParam); - MSWOnJoyZMove(wxJOYSTICK1, z, wParam); - break; - } - case MM_JOY2ZMOVE: - { - int z = LOWORD(lParam); - MSWOnJoyZMove(wxJOYSTICK2, z, wParam); - break; - } - case WM_DESTROY: - { - if (MSWOnDestroy()) - return 0; - else return MSWDefWindowProc(message, wParam, lParam ); - break; - } - case WM_SYSCOMMAND: - { - return MSWOnSysCommand(wParam, lParam); - break; - } - case WM_COMMAND: - { -#ifdef __WIN32__ - WORD id = LOWORD(wParam); - HWND hwnd = (HWND)lParam; - WORD cmd = HIWORD(wParam); -#else - WORD id = (WORD)wParam; - HWND hwnd = (HWND)LOWORD(lParam) ; - WORD cmd = HIWORD(lParam); -#endif - if (!MSWOnCommand(id, cmd, (WXHWND) hwnd)) - return MSWDefWindowProc(message, wParam, lParam ); - break; - } -#if defined(__WIN95__) - case WM_NOTIFY: - { - if (!MSWOnNotify(wParam, lParam)) - return MSWDefWindowProc(message, wParam, lParam ); - break; - } -#endif - case WM_MENUSELECT: - { -#ifdef __WIN32__ - WORD flags = HIWORD(wParam); - HMENU sysmenu = (HMENU)lParam; -#else - WORD flags = LOWORD(lParam); - HMENU sysmenu = (HMENU)HIWORD(lParam); -#endif - MSWOnMenuHighlight((WORD)wParam, flags, (WXHMENU) sysmenu); - break; - } - case WM_INITMENUPOPUP: - { - MSWOnInitMenuPopup((WXHMENU) (HMENU)wParam, (int)LOWORD(lParam), (HIWORD(lParam) != 0)); - break; - } - case WM_DRAWITEM: - { - return MSWOnDrawItem((int)wParam, (WXDRAWITEMSTRUCT *)lParam); - break; - } - case WM_MEASUREITEM: - { - return MSWOnMeasureItem((int)wParam, (WXMEASUREITEMSTRUCT *)lParam); - break; - } - - case WM_KEYDOWN: - // we consider these message "not interesting" - if ( wParam == VK_SHIFT || wParam == VK_CONTROL ) - return Default(); - - // Avoid duplicate messages to OnChar - if ( (wParam != VK_ESCAPE) && (wParam != VK_SPACE) && - (wParam != VK_RETURN) && (wParam != VK_BACK) && - (wParam != VK_TAB) ) - { - MSWOnChar((WORD)wParam, lParam); - if ( ::GetKeyState(VK_CONTROL) & 0x100 ) - return Default(); - } - else if ( ::GetKeyState(VK_CONTROL) & 0x100 ) - MSWOnChar((WORD)wParam, lParam); - else - return Default(); - break; - - case WM_CHAR: // Always an ASCII character - { - MSWOnChar((WORD)wParam, lParam, TRUE); - break; - } - - case WM_HSCROLL: - { -#ifdef __WIN32__ - WORD code = LOWORD(wParam); - WORD pos = HIWORD(wParam); - HWND control = (HWND)lParam; -#else - WORD code = (WORD)wParam; - WORD pos = LOWORD(lParam); - HWND control = (HWND)HIWORD(lParam); -#endif - MSWOnHScroll(code, pos, (WXHWND) control); - break; - } - case WM_VSCROLL: - { -#ifdef __WIN32__ - WORD code = LOWORD(wParam); - WORD pos = HIWORD(wParam); - HWND control = (HWND)lParam; -#else - WORD code = (WORD)wParam; - WORD pos = LOWORD(lParam); - HWND control = (HWND)HIWORD(lParam); -#endif - MSWOnVScroll(code, pos, (WXHWND) control); - break; - } -#ifdef __WIN32__ - case WM_CTLCOLORBTN: - { - int nCtlColor = CTLCOLOR_BTN; - HWND control = (HWND)lParam; - HDC pDC = (HDC)wParam; - return (DWORD)MSWOnCtlColor((WXHDC) pDC, (WXHWND) control, nCtlColor, - message, wParam, lParam); - break; - } - case WM_CTLCOLORDLG: - { - int nCtlColor = CTLCOLOR_DLG; - HWND control = (HWND)lParam; - HDC pDC = (HDC)wParam; - return (DWORD)MSWOnCtlColor((WXHDC) pDC, (WXHWND) control, nCtlColor, - message, wParam, lParam);\ - break; - } - case WM_CTLCOLORLISTBOX: - { - int nCtlColor = CTLCOLOR_LISTBOX; - HWND control = (HWND)lParam; - HDC pDC = (HDC)wParam; - return (DWORD)MSWOnCtlColor((WXHDC) pDC, (WXHWND) control, nCtlColor, - message, wParam, lParam); - break; - } - case WM_CTLCOLORMSGBOX: - { - int nCtlColor = CTLCOLOR_MSGBOX; - HWND control = (HWND)lParam; - HDC pDC = (HDC)wParam; - return (DWORD)MSWOnCtlColor((WXHDC) pDC, (WXHWND) control, nCtlColor, - message, wParam, lParam); - break; - } - case WM_CTLCOLORSCROLLBAR: - { - int nCtlColor = CTLCOLOR_SCROLLBAR; - HWND control = (HWND)lParam; - HDC pDC = (HDC)wParam; - return (DWORD)MSWOnCtlColor((WXHDC) pDC, (WXHWND) control, nCtlColor, - message, wParam, lParam); - break; - } - case WM_CTLCOLORSTATIC: - { - int nCtlColor = CTLCOLOR_STATIC; - HWND control = (HWND)lParam; - HDC pDC = (HDC)wParam; - return (DWORD)MSWOnCtlColor((WXHDC) pDC, (WXHWND) control, nCtlColor, - message, wParam, lParam); - break; - } - case WM_CTLCOLOREDIT: - { - int nCtlColor = CTLCOLOR_EDIT; - HWND control = (HWND)lParam; - HDC pDC = (HDC)wParam; - return (DWORD)MSWOnCtlColor((WXHDC) pDC, (WXHWND) control, nCtlColor, - message, wParam, lParam); - break; - } -#else - case WM_CTLCOLOR: - { - HWND control = (HWND)LOWORD(lParam); - int nCtlColor = (int)HIWORD(lParam); - HDC pDC = (HDC)wParam; - return (DWORD)MSWOnCtlColor((WXHDC) pDC, (WXHWND) control, nCtlColor, - message, wParam, lParam); - break; - } -#endif - case WM_SYSCOLORCHANGE: - { - // Return value of 0 means, we processed it. - if (MSWOnColorChange((WXHWND) hWnd, message, wParam, lParam) == 0) - return 0; - else - return MSWDefWindowProc(message, wParam, lParam ); - break; - } - case WM_PALETTECHANGED: - { - return MSWOnPaletteChanged((WXHWND) (HWND) wParam); - break; - } - case WM_QUERYNEWPALETTE: - { - return MSWOnQueryNewPalette(); - break; - } - case WM_ERASEBKGND: - { - // Prevents flicker when dragging - if (IsIconic(hWnd)) return 1; - - if (!MSWOnEraseBkgnd((WXHDC) (HDC)wParam)) - return 0; // Default(); MSWDefWindowProc(message, wParam, lParam ); - else return 1; - break; - } - case WM_MDIACTIVATE: - { -#ifdef __WIN32__ - HWND hWndActivate = GET_WM_MDIACTIVATE_HWNDACTIVATE(wParam,lParam); - HWND hWndDeactivate = GET_WM_MDIACTIVATE_HWNDDEACT(wParam,lParam); - BOOL activate = GET_WM_MDIACTIVATE_FACTIVATE(hWnd,wParam,lParam); - return MSWOnMDIActivate((long) activate, (WXHWND) hWndActivate, (WXHWND) hWndDeactivate); -#else - return MSWOnMDIActivate((BOOL)wParam, (HWND)LOWORD(lParam), - (HWND)HIWORD(lParam)); -#endif - } - case WM_DROPFILES: - { - MSWOnDropFiles(wParam); - break; - } - case WM_INITDIALOG: - { - return 0; // MSWOnInitDialog((WXHWND)(HWND)wParam); - break; - } - case WM_QUERYENDSESSION: - { - // Same as WM_CLOSE, but inverted results. Thx Microsoft :-) - return MSWOnClose(); - break; - } - case WM_CLOSE: - { - if (MSWOnClose()) - return 0L; - else - return 1L; - break; - } - - case WM_GETMINMAXINFO: - { - MINMAXINFO *info = (MINMAXINFO *)lParam; - if (m_minSizeX != -1) - info->ptMinTrackSize.x = (int)m_minSizeX; - if (m_minSizeY != -1) - info->ptMinTrackSize.y = (int)m_minSizeY; - if (m_maxSizeX != -1) - info->ptMaxTrackSize.x = (int)m_maxSizeX; - if (m_maxSizeY != -1) - info->ptMaxTrackSize.y = (int)m_maxSizeY; - return MSWDefWindowProc(message, wParam, lParam ); - break; - } - - case WM_GETDLGCODE: - return MSWGetDlgCode(); - - default: - return MSWDefWindowProc(message, wParam, lParam ); - } - return 0; // Success: we processed this command. -} - -// Dialog window proc -LONG APIENTRY _EXPORT - wxDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - return 0; -} - -wxList *wxWinHandleList = NULL; -wxWindow *wxFindWinFromHandle(WXHWND hWnd) -{ - wxNode *node = wxWinHandleList->Find((long)hWnd); - if (!node) - return NULL; - return (wxWindow *)node->Data(); -} - -void wxAssociateWinWithHandle(HWND hWnd, wxWindow *win) -{ - // adding NULL hWnd is (first) surely a result of an error and - // (secondly) breaks menu command processing - wxCHECK_RET( hWnd != NULL, "attempt to add a NULL hWnd to window list" ); - - if ( !wxWinHandleList->Find((long)hWnd) ) - wxWinHandleList->Append((long)hWnd, win); -} - -void wxRemoveHandleAssociation(wxWindow *win) -{ - wxWinHandleList->DeleteObject(win); -} - -// Default destroyer - override if you destroy it in some other way -// (e.g. with MDI child windows) -void wxWindow::MSWDestroyWindow(void) -{ -} - -void wxWindow::MSWCreate(int id, wxWindow *parent, const char *wclass, wxWindow *wx_win, const char *title, - int x, int y, int width, int height, - WXDWORD style, const char *dialog_template, WXDWORD extendedStyle) -{ - bool is_dialog = (dialog_template != NULL); - int x1 = CW_USEDEFAULT; - int y1 = 0; - int width1 = CW_USEDEFAULT; - int height1 = 100; - - // Find parent's size, if it exists, to set up a possible default - // panel size the size of the parent window - RECT parent_rect; - if (parent) - { - // Was GetWindowRect: JACS 5/5/95 - ::GetClientRect((HWND) parent->GetHWND(), &parent_rect); - - width1 = parent_rect.right - parent_rect.left; - height1 = parent_rect.bottom - parent_rect.top; - } - - if (x > -1) x1 = x; - if (y > -1) y1 = y; - if (width > -1) width1 = width; - if (height > -1) height1 = height; - - HWND hParent = NULL; - if (parent) - hParent = (HWND) parent->GetHWND(); - - wxWndHook = this; - - if (is_dialog) - { - // MakeProcInstance doesn't seem to be needed in C7. Is it needed for - // other compilers??? - // VZ: it's always needed for Win16 and never for Win32 -#ifdef __WIN32__ - m_hWnd = (WXHWND) ::CreateDialog(wxGetInstance(), dialog_template, hParent, - (DLGPROC)wxDlgProc); -#else - DLGPROC dlgproc = (DLGPROC)MakeProcInstance((DLGPROC)wxWndProc, wxGetInstance()); - - m_hWnd = (WXHWND) ::CreateDialog(wxGetInstance(), dialog_template, hParent, - (DLGPROC)dlgproc); -#endif - - if (m_hWnd == 0) - MessageBox(NULL, "Can't find dummy dialog template!\nCheck resource include path for finding wx.rc.", - "wxWindows Error", MB_ICONEXCLAMATION | MB_OK); - else MoveWindow((HWND) m_hWnd, x1, y1, width1, height1, FALSE); - } - else - { - int controlId = 0; - if (style & WS_CHILD) - controlId = id; - if (!title) - title = ""; - - m_hWnd = (WXHWND)CreateWindowEx(extendedStyle, wclass, - title, - style, - x1, y1, - width1, height1, - hParent, (HMENU)controlId, wxGetInstance(), - NULL); - - if ( !m_hWnd ) { - wxLogError("Can't create window of class %s!\n" - "Possible Windows 3.x compatibility problem?", wclass); - } - } - - wxWndHook = NULL; - wxWinHandleList->Append((long)m_hWnd, this); - -#if WXDEBUG > 1 - wxDebugMsg("wxWindow::MSWCreate %d\n", m_hWnd); -#endif -} - -void wxWindow::MSWOnCreate(WXLPCREATESTRUCT WXUNUSED(cs)) -{ -} - -bool wxWindow::MSWOnClose(void) -{ -#if WXDEBUG > 1 - wxDebugMsg("wxWindow::MSWOnClose %d\n", handle); -#endif - return FALSE; -} - -bool wxWindow::MSWOnDestroy(void) -{ -#if WXDEBUG > 1 - wxDebugMsg("wxWindow::MSWOnDestroy %d\n", handle); -#endif - // delete our drop target if we've got one - #if USE_DRAG_AND_DROP - if ( m_pDropTarget != NULL ) { - m_pDropTarget->Revoke(m_hWnd); - - delete m_pDropTarget; - m_pDropTarget = NULL; - } - #endif - - return TRUE; -} - -// Deal with child commands from buttons etc. - -bool wxWindow::MSWOnNotify(WXWPARAM wParam, WXLPARAM lParam) -{ -#if defined(__WIN95__) - // Find a child window to send the notification to, e.g. a toolbar. - // There's a problem here. NMHDR::hwndFrom doesn't give us the - // handle of the toolbar; it's probably the handle of the tooltip - // window (anyway, it's parent is also the toolbar's parent). - // So, since we don't know which hWnd or wxWindow originated the - // WM_NOTIFY, we'll need to go through all the children of this window - // trying out MSWNotify. - // This won't work now, though, because any number of controls - // could respond to the same generic messages :-( - -/* This doesn't work for toolbars, but try for other controls first. - */ - NMHDR *hdr = (NMHDR *)lParam; - HWND hWnd = (HWND)hdr->hwndFrom; - wxWindow *win = wxFindWinFromHandle((WXHWND) hWnd); - - if ( win ) - return win->MSWNotify(wParam, lParam); - else - { - // Rely on MSWNotify to check whether the message - // belongs to the window or not - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow *)node->Data(); - if ( child->MSWNotify(wParam, lParam) ) - return TRUE; - node = node->Next(); - } - } - - return FALSE; - -#endif - return FALSE; -} - -void wxWindow::MSWOnMenuHighlight(WXWORD WXUNUSED(item), WXWORD WXUNUSED(flags), WXHMENU WXUNUSED(sysmenu)) -{ -#if WXDEBUG > 1 - wxDebugMsg("wxWindow::MSWOnMenuHighlight %d\n", handle); -#endif -} - -void wxWindow::MSWOnInitMenuPopup(WXHMENU menu, int pos, bool isSystem) -{ -} - -bool wxWindow::MSWOnActivate(int state, bool WXUNUSED(minimized), WXHWND WXUNUSED(activate)) -{ -#if WXDEBUG > 1 - wxDebugMsg("wxWindow::MSWOnActivate %d\n", handle); -#endif - - wxActivateEvent event(wxEVT_ACTIVATE, ((state == WA_ACTIVE) || (state == WA_CLICKACTIVE)), - m_windowId); - event.SetEventObject(this); - GetEventHandler()->ProcessEvent(event); - return 0; -} - -bool wxWindow::MSWOnSetFocus(WXHWND WXUNUSED(hwnd)) -{ -#if WXDEBUG > 1 - wxDebugMsg("wxWindow::MSWOnSetFocus %d\n", m_hWnd); -#endif - // Deal with caret - if (m_caretEnabled && (m_caretWidth > 0) && (m_caretHeight > 0)) - { - ::CreateCaret((HWND) GetHWND(), NULL, m_caretWidth, m_caretHeight); - if (m_caretShown) - ::ShowCaret((HWND) GetHWND()); - } - - wxFocusEvent event(wxEVT_SET_FOCUS, m_windowId); - event.SetEventObject(this); - if (!GetEventHandler()->ProcessEvent(event)) - Default(); - return TRUE; -} - -bool wxWindow::MSWOnKillFocus(WXHWND WXUNUSED(hwnd)) -{ -#if WXDEBUG > 1 - wxDebugMsg("wxWindow::MSWOnKillFocus %d\n", m_hWnd); -#endif - // Deal with caret - if (m_caretEnabled) - { - ::DestroyCaret(); - } - - wxFocusEvent event(wxEVT_KILL_FOCUS, m_windowId); - event.SetEventObject(this); - if (!GetEventHandler()->ProcessEvent(event)) - Default(); - return TRUE; -} - -void wxWindow::MSWOnDropFiles(WXWPARAM wParam) -{ -#if WXDEBUG > 1 - wxDebugMsg("wxWindow::MSWOnDropFiles %d\n", m_hWnd); -#endif - - HDROP hFilesInfo = (HDROP) wParam; - POINT dropPoint; - DragQueryPoint(hFilesInfo, (LPPOINT) &dropPoint); - - // Get the total number of files dropped - WORD gwFilesDropped = (WORD)DragQueryFile ((HDROP)hFilesInfo, - (UINT)-1, - (LPSTR)0, - (UINT)0); - - wxString *files = new wxString[gwFilesDropped]; - int wIndex; - for (wIndex=0; wIndex < (int)gwFilesDropped; wIndex++) - { - DragQueryFile (hFilesInfo, wIndex, (LPSTR) wxBuffer, 1000); - files[wIndex] = wxBuffer; - } - DragFinish (hFilesInfo); - - wxDropFilesEvent event(wxEVT_DROP_FILES, gwFilesDropped, files); - event.m_eventObject = this; - event.m_pos.x = dropPoint.x; event.m_pos.x = dropPoint.y; - - if (!GetEventHandler()->ProcessEvent(event)) - Default(); - - delete[] files; -} - -bool wxWindow::MSWOnDrawItem(int id, WXDRAWITEMSTRUCT *itemStruct) -{ -#if USE_OWNER_DRAWN - if ( id == 0 ) { // is it a menu item? - DRAWITEMSTRUCT *pDrawStruct = (DRAWITEMSTRUCT *)itemStruct; - wxMenuItem *pMenuItem = (wxMenuItem *)(pDrawStruct->itemData); - wxCHECK( pMenuItem->IsKindOf(CLASSINFO(wxMenuItem)), FALSE ); - - // prepare to call OnDrawItem() - wxDC dc; - dc.SetHDC((WXHDC)pDrawStruct->hDC, FALSE); - wxRect rect(pDrawStruct->rcItem.left, pDrawStruct->rcItem.top, - pDrawStruct->rcItem.right - pDrawStruct->rcItem.left, - pDrawStruct->rcItem.bottom - pDrawStruct->rcItem.top); - return pMenuItem->OnDrawItem( - dc, rect, - (wxOwnerDrawn::wxODAction)pDrawStruct->itemAction, - (wxOwnerDrawn::wxODStatus)pDrawStruct->itemState - ); - } -#endif // owner-drawn menus - - wxWindow *item = FindItem(id); -#if USE_DYNAMIC_CLASSES - if (item && item->IsKindOf(CLASSINFO(wxControl))) - { - return ((wxControl *)item)->MSWOnDraw(itemStruct); - } - else -#endif - return FALSE; -} - -bool wxWindow::MSWOnMeasureItem(int id, WXMEASUREITEMSTRUCT *itemStruct) -{ -#if USE_OWNER_DRAWN - if ( id == 0 ) { // is it a menu item? - MEASUREITEMSTRUCT *pMeasureStruct = (MEASUREITEMSTRUCT *)itemStruct; - wxMenuItem *pMenuItem = (wxMenuItem *)(pMeasureStruct->itemData); - wxCHECK( pMenuItem->IsKindOf(CLASSINFO(wxMenuItem)), FALSE ); - - return pMenuItem->OnMeasureItem(&pMeasureStruct->itemWidth, - &pMeasureStruct->itemHeight); - } -#endif // owner-drawn menus - - wxWindow *item = FindItem(id); -#if USE_DYNAMIC_CLASSES - if (item && item->IsKindOf(CLASSINFO(wxControl))) - { - return ((wxControl *)item)->MSWOnMeasure(itemStruct); - } - else -#endif - return FALSE; -} - -WXHBRUSH wxWindow::MSWOnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ -#if WXDEBUG > 1 - wxDebugMsg("wxWindow::MSWOnCtlColour %d\n", m_hWnd); -#endif - if (nCtlColor == CTLCOLOR_DLG) - { - return OnCtlColor(pDC, pWnd, nCtlColor, message, wParam, lParam); - } - - wxControl *item = (wxControl *)FindItemByHWND(pWnd, TRUE); - - WXHBRUSH hBrush = 0; - - if ( item ) - hBrush = item->OnCtlColor(pDC, pWnd, nCtlColor, message, wParam, lParam); - - // I think that even for dialogs, we may need to call DefWindowProc (?) - // Or maybe just rely on the usual default behaviour. - if ( !hBrush ) - hBrush = (WXHBRUSH) MSWDefWindowProc(message, wParam, lParam); - - return hBrush ; -} - -// Define for each class of dialog and control -WXHBRUSH wxWindow::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ - return (WXHBRUSH) MSWDefWindowProc(message, wParam, lParam); -} - -bool wxWindow::MSWOnColorChange(WXHWND hWnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ - wxSysColourChangedEvent event; - event.SetEventObject(this); - - // Check if app handles this. - if (GetEventHandler()->ProcessEvent(event)) - return 0; - - // We didn't process it - return 1; -} - -long wxWindow::MSWOnPaletteChanged(WXHWND hWndPalChange) -{ - wxPaletteChangedEvent event(GetId()); - event.SetEventObject(this); - event.SetChangedWindow(wxFindWinFromHandle(hWndPalChange)); - GetEventHandler()->ProcessEvent(event); - return 0; -} - -long wxWindow::MSWOnQueryNewPalette() -{ - wxQueryNewPaletteEvent event(GetId()); - event.SetEventObject(this); - if (!GetEventHandler()->ProcessEvent(event) || !event.GetPaletteRealized()) - { - return (long) FALSE; - } - else - return (long) TRUE; -} - -// Responds to colour changes: passes event on to children. -void wxWindow::OnSysColourChanged(wxSysColourChangedEvent& event) -{ - wxNode *node = GetChildren()->First(); - while ( node ) - { - // Only propagate to non-top-level windows - wxWindow *win = (wxWindow *)node->Data(); - if ( win->GetParent() ) - { - wxSysColourChangedEvent event2; - event.m_eventObject = win; - win->GetEventHandler()->ProcessEvent(event2); - } - - node = node->Next(); - } -} - -long wxWindow::MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) -{ - if ( m_oldWndProc ) - return ::CallWindowProc(CASTWNDPROC m_oldWndProc, (HWND) GetHWND(), (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam); - else - return ::DefWindowProc((HWND) GetHWND(), nMsg, wParam, lParam); -} - -long wxWindow::Default() -{ - // Ignore 'fake' events (perhaps generated as a result of a separate real event) - if (m_lastMsg == 0) - return 0; - - #ifdef __WXDEBUG__ - wxLogTrace(wxTraceMessages, "Forwarding %s to DefWindowProc.", - wxGetMessageName(m_lastMsg)); - #endif // WXDEBUG - - return this->MSWDefWindowProc(m_lastMsg, m_lastWParam, m_lastLParam); -} - -bool wxWindow::MSWProcessMessage(WXMSG* pMsg) -{ - if ( m_hWnd != 0 && (GetWindowStyleFlag() & wxTAB_TRAVERSAL) ) { - // intercept dialog navigation keys - MSG *msg = (MSG *)pMsg; - bool bProcess = TRUE; - if ( msg->message != WM_KEYDOWN ) - bProcess = FALSE; - - if ( (HIWORD(msg->lParam) & KF_ALTDOWN) == KF_ALTDOWN ) - bProcess = FALSE; - - bool bCtrlDown = (::GetKeyState(VK_CONTROL) & 0x100) != 0; - - // WM_GETDLGCODE: if the control wants it for itself, don't process it - // (except for Ctrl-Tab combination which is always processed) - LONG lDlgCode; - if ( bProcess && !bCtrlDown ) { - lDlgCode = ::SendMessage(msg->hwnd, WM_GETDLGCODE, 0, 0); - } - - bool bForward; - if ( bProcess ) { - switch ( msg->wParam ) { - case VK_TAB: - if ( lDlgCode & DLGC_WANTTAB ) - bProcess = FALSE; - else - bForward = !(::GetKeyState(VK_SHIFT) & 0x100); - break; - - case VK_UP: - case VK_LEFT: - if ( (lDlgCode & DLGC_WANTARROWS) || bCtrlDown ) - bProcess = FALSE; - else - bForward = FALSE; - break; - - case VK_DOWN: - case VK_RIGHT: - if ( (lDlgCode & DLGC_WANTARROWS) || bCtrlDown ) - bProcess = FALSE; - else - bForward = TRUE; - break; - - default: - bProcess = FALSE; - } - } - - if ( bProcess ) { - wxNavigationKeyEvent event; - event.SetDirection(bForward); - event.SetWindowChange(bCtrlDown); - event.SetEventObject(this); - - if ( GetEventHandler()->ProcessEvent(event) ) - return TRUE; - } - - return ::IsDialogMessage((HWND)GetHWND(), msg) != 0; - } - - return FALSE; -} - -bool wxWindow::MSWTranslateMessage(WXMSG* pMsg) -{ - if (m_acceleratorTable.Ok() && - ::TranslateAccelerator((HWND) GetHWND(), (HACCEL) m_acceleratorTable.GetHACCEL(), (MSG *)pMsg)) - return TRUE; - else - return FALSE; -} - -long wxWindow::MSWOnMDIActivate(long WXUNUSED(flag), WXHWND WXUNUSED(activate), WXHWND WXUNUSED(deactivate)) -{ -#if WXDEBUG > 1 - wxDebugMsg("wxWindow::MSWOnMDIActivate %d\n", m_hWnd); -#endif - return 1; -} - -void wxWindow::MSWDetachWindowMenu(void) -{ - if (m_hMenu) - { - int N = GetMenuItemCount((HMENU) m_hMenu); - int i; - for (i = 0; i < N; i++) - { - char buf[100]; - int chars = GetMenuString((HMENU) m_hMenu, i, buf, 100, MF_BYPOSITION); - if ((chars > 0) && (strcmp(buf, "&Window") == 0)) - { - RemoveMenu((HMENU) m_hMenu, i, MF_BYPOSITION); - break; - } - } - } -} - -bool wxWindow::MSWOnPaint(void) -{ -#ifdef __WIN32__ - HRGN hRegion = ::CreateRectRgn(0, 0, 0, 0); // Dummy call to get a handle - ::GetUpdateRgn((HWND) GetHWND(), hRegion, FALSE); - - m_updateRegion = wxRegion((WXHRGN) hRegion); -#else - RECT updateRect; - ::GetUpdateRect((HWND) GetHWND(), & updateRect, FALSE); - - m_updateRegion = wxRegion(updateRect.left, updateRect.top, - updateRect.right - updateRect.left, updateRect.bottom - updateRect.top); -#endif - - wxPaintEvent event(m_windowId); - event.SetEventObject(this); - if (!GetEventHandler()->ProcessEvent(event)) - Default(); - return TRUE; -} - -void wxWindow::MSWOnSize(int w, int h, WXUINT WXUNUSED(flag)) -{ - if (m_inOnSize) - return; - -#if WXDEBUG > 1 - wxDebugMsg("wxWindow::MSWOnSize %d\n", m_hWnd); -#endif - if (!m_hWnd) - return; - - m_inOnSize = TRUE; - - wxSizeEvent event(wxSize(w, h), m_windowId); - event.SetEventObject(this); - if (!GetEventHandler()->ProcessEvent(event)) - Default(); - - m_inOnSize = FALSE; -} - -void wxWindow::MSWOnWindowPosChanging(void *WXUNUSED(lpPos)) -{ - Default(); -} - -// Deal with child commands from buttons etc. -bool wxWindow::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control) -{ -#if WXDEBUG > 1 - wxDebugMsg("wxWindow::MSWOnCommand\n"); -#endif - if (wxCurrentPopupMenu) - { - wxMenu *popupMenu = wxCurrentPopupMenu; - wxCurrentPopupMenu = NULL; - bool succ = popupMenu->MSWCommand(cmd, id); - return succ; - } -#if WXDEBUG > 1 - char buf[80]; - sprintf(buf, "Looking for item %d...\n", id); - wxDebugMsg(buf); -#endif - - wxWindow *item = FindItem(id); - if (item) - { - bool value = item->MSWCommand(cmd, id); -#if WXDEBUG > 1 - if (value) - wxDebugMsg("MSWCommand succeeded\n"); - else - wxDebugMsg("MSWCommand failed\n"); -#endif - return value; - } - else - { - wxWindow *win = wxFindWinFromHandle(control); - if (win) - return win->MSWCommand(cmd, id); - } - return FALSE; -} - -long wxWindow::MSWOnSysCommand(WXWPARAM wParam, WXLPARAM lParam) -{ - switch (wParam) - { - case SC_MAXIMIZE: - { - wxMaximizeEvent event(m_windowId); - event.SetEventObject(this); - if (!GetEventHandler()->ProcessEvent(event)) - return Default(); - else - return 0; - break; - } - case SC_MINIMIZE: - { - wxIconizeEvent event(m_windowId); - event.SetEventObject(this); - if (!GetEventHandler()->ProcessEvent(event)) - return Default(); - else - return 0; - break; - } - default: - return Default(); - } - return 0; -} - -void wxWindow::MSWOnLButtonDown(int x, int y, WXUINT flags) -{ - wxMouseEvent event(wxEVT_LEFT_DOWN); - - event.m_x = x; event.m_y = y; - event.m_shiftDown = ((flags & MK_SHIFT) != 0); - event.m_controlDown = ((flags & MK_CONTROL) != 0); - event.m_leftDown = ((flags & MK_LBUTTON) != 0); - event.m_middleDown = ((flags & MK_MBUTTON) != 0); - event.m_rightDown = ((flags & MK_RBUTTON) != 0); - event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ - event.m_eventObject = this; - - m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVENT_TYPE_LEFT_DOWN; - - if (!GetEventHandler()->ProcessEvent(event)) - Default(); -} - -void wxWindow::MSWOnLButtonUp(int x, int y, WXUINT flags) -{ - wxMouseEvent event(wxEVT_LEFT_UP); - - event.m_x = x; event.m_y = y; - event.m_shiftDown = ((flags & MK_SHIFT) != 0); - event.m_controlDown = ((flags & MK_CONTROL) != 0); - event.m_leftDown = ((flags & MK_LBUTTON) != 0); - event.m_middleDown = ((flags & MK_MBUTTON) != 0); - event.m_rightDown = ((flags & MK_RBUTTON) != 0); - event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ - event.m_eventObject = this; - - m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_LEFT_UP; - - if (!GetEventHandler()->ProcessEvent(event)) - Default(); -} - -void wxWindow::MSWOnLButtonDClick(int x, int y, WXUINT flags) -{ - wxMouseEvent event(wxEVT_LEFT_DCLICK); - - event.m_x = x; event.m_y = y; - event.m_shiftDown = ((flags & MK_SHIFT) != 0); - event.m_controlDown = ((flags & MK_CONTROL) != 0); - event.m_leftDown = ((flags & MK_LBUTTON != 0)); - event.m_middleDown = ((flags & MK_MBUTTON) != 0); - event.m_rightDown = ((flags & MK_RBUTTON) != 0); - event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ - event.m_eventObject = this; - - m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_LEFT_DCLICK; - - if (!GetEventHandler()->ProcessEvent(event)) - Default(); -} - -void wxWindow::MSWOnMButtonDown(int x, int y, WXUINT flags) -{ - wxMouseEvent event(wxEVT_MIDDLE_DOWN); - - event.m_x = x; event.m_y = y; - event.m_shiftDown = ((flags & MK_SHIFT) != 0); - event.m_controlDown = ((flags & MK_CONTROL) != 0); - event.m_leftDown = ((flags & MK_LBUTTON) != 0); - event.m_middleDown = ((flags & MK_MBUTTON) != 0); - event.m_rightDown = ((flags & MK_RBUTTON) != 0); - event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ - event.m_eventObject = this; - - m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_MIDDLE_DOWN; - - if (!GetEventHandler()->ProcessEvent(event)) - Default(); -} - -void wxWindow::MSWOnMButtonUp(int x, int y, WXUINT flags) -{ -//wxDebugMsg("MButtonUp\n") ; - wxMouseEvent event(wxEVT_MIDDLE_UP); - - event.m_x = x; event.m_y = y; - event.m_shiftDown = ((flags & MK_SHIFT) != 0); - event.m_controlDown = ((flags & MK_CONTROL) != 0); - event.m_leftDown = ((flags & MK_LBUTTON) != 0); - event.m_middleDown = ((flags & MK_MBUTTON) != 0); - event.m_rightDown = ((flags & MK_RBUTTON) != 0); - event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ - event.m_eventObject = this; - - m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_MIDDLE_UP; - - if (!GetEventHandler()->ProcessEvent(event)) - Default(); -} - -void wxWindow::MSWOnMButtonDClick(int x, int y, WXUINT flags) -{ - wxMouseEvent event(wxEVT_MIDDLE_DCLICK); - - event.m_x = x; event.m_y = y; - event.m_shiftDown = ((flags & MK_SHIFT) != 0); - event.m_controlDown = ((flags & MK_CONTROL) != 0); - event.m_leftDown = ((flags & MK_LBUTTON) != 0); - event.m_middleDown = ((flags & MK_MBUTTON) != 0); - event.m_rightDown = ((flags & MK_RBUTTON) != 0); - event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ - event.m_eventObject = this; - - m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_MIDDLE_DCLICK; - - if (!GetEventHandler()->ProcessEvent(event)) - Default(); -} - -void wxWindow::MSWOnRButtonDown(int x, int y, WXUINT flags) -{ - wxMouseEvent event(wxEVT_RIGHT_DOWN); - - event.m_x = x; event.m_y = y; - event.m_shiftDown = ((flags & MK_SHIFT) != 0); - event.m_controlDown = ((flags & MK_CONTROL) != 0); - event.m_leftDown = ((flags & MK_LBUTTON) != 0); - event.m_middleDown = ((flags & MK_MBUTTON) != 0); - event.m_rightDown = ((flags & MK_RBUTTON) != 0); - event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ - event.m_eventObject = this; - - m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_RIGHT_DOWN; - - if (!GetEventHandler()->ProcessEvent(event)) - Default(); -} - -void wxWindow::MSWOnRButtonUp(int x, int y, WXUINT flags) -{ - wxMouseEvent event(wxEVT_RIGHT_UP); - - event.m_x = x; event.m_y = y; - event.m_shiftDown = ((flags & MK_SHIFT) != 0); - event.m_controlDown = ((flags & MK_CONTROL) != 0); - event.m_leftDown = ((flags & MK_LBUTTON) != 0); - event.m_middleDown = ((flags & MK_MBUTTON) != 0); - event.m_rightDown = ((flags & MK_RBUTTON) != 0); - event.m_eventObject = this; - event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ - - m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_RIGHT_UP; - - if (!GetEventHandler()->ProcessEvent(event)) - Default(); -} - -void wxWindow::MSWOnRButtonDClick(int x, int y, WXUINT flags) -{ - wxMouseEvent event(wxEVT_RIGHT_DCLICK); - - event.m_x = x; event.m_y = y; - event.m_shiftDown = ((flags & MK_SHIFT) != 0); - event.m_controlDown = ((flags & MK_CONTROL) != 0); - event.m_leftDown = ((flags & MK_LBUTTON) != 0); - event.m_middleDown = ((flags & MK_MBUTTON) != 0); - event.m_rightDown = ((flags & MK_RBUTTON) != 0); - event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ - event.m_eventObject = this; - - m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_RIGHT_DCLICK; - - if (!GetEventHandler()->ProcessEvent(event)) - Default(); -} - -void wxWindow::MSWOnMouseMove(int x, int y, WXUINT flags) -{ - // 'normal' move event... - // Set cursor, but only if we're not in 'busy' mode - - // Trouble with this is that it sets the cursor for controls too :-( - if (m_windowCursor.Ok() && !wxIsBusy()) - ::SetCursor((HCURSOR) m_windowCursor.GetHCURSOR()); - - if (!m_mouseInWindow) - { - // Generate an ENTER event - m_mouseInWindow = TRUE; - MSWOnMouseEnter(x, y, flags); - } - - wxMouseEvent event(wxEVT_MOTION); - - event.m_x = x; event.m_y = y; - event.m_shiftDown = ((flags & MK_SHIFT) != 0); - event.m_controlDown = ((flags & MK_CONTROL) != 0); - event.m_leftDown = ((flags & MK_LBUTTON) != 0); - event.m_middleDown = ((flags & MK_MBUTTON) != 0); - event.m_rightDown = ((flags & MK_RBUTTON) != 0); - event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ - event.m_eventObject = this; - - // Window gets a click down message followed by a mouse move - // message even if position isn't changed! We want to discard - // the trailing move event if x and y are the same. - if ((m_lastEvent == wxEVT_RIGHT_DOWN || m_lastEvent == wxEVT_LEFT_DOWN || - m_lastEvent == wxEVT_MIDDLE_DOWN) && - (m_lastXPos == event.m_x && m_lastYPos == event.m_y)) - { - m_lastXPos = event.m_x; m_lastYPos = event.m_y; - m_lastEvent = wxEVT_MOTION; - return; - } - - m_lastEvent = wxEVT_MOTION; - m_lastXPos = event.m_x; m_lastYPos = event.m_y; - - if (!GetEventHandler()->ProcessEvent(event)) - Default(); -} - -void wxWindow::MSWOnMouseEnter(int x, int y, WXUINT flags) -{ - wxMouseEvent event(wxEVT_ENTER_WINDOW); - - event.m_x = x; event.m_y = y; - event.m_shiftDown = ((flags & MK_SHIFT) != 0); - event.m_controlDown = ((flags & MK_CONTROL) != 0); - event.m_leftDown = ((flags & MK_LBUTTON) != 0); - event.m_middleDown = ((flags & MK_MBUTTON) != 0); - event.m_rightDown = ((flags & MK_RBUTTON) != 0); - event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ - event.m_eventObject = this; - - m_lastEvent = wxEVT_ENTER_WINDOW; - m_lastXPos = event.m_x; m_lastYPos = event.m_y; - // No message - ensure we don't try to call the default behaviour accidentally. - m_lastMsg = 0; - GetEventHandler()->ProcessEvent(event); -} - -void wxWindow::MSWOnMouseLeave(int x, int y, WXUINT flags) -{ - wxMouseEvent event(wxEVT_LEAVE_WINDOW); - - event.m_x = x; event.m_y = y; - event.m_shiftDown = ((flags & MK_SHIFT) != 0); - event.m_controlDown = ((flags & MK_CONTROL) != 0); - event.m_leftDown = ((flags & MK_LBUTTON) != 0); - event.m_middleDown = ((flags & MK_MBUTTON) != 0); - event.m_rightDown = ((flags & MK_RBUTTON) != 0); - event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ - event.m_eventObject = this; - - m_lastEvent = wxEVT_LEAVE_WINDOW; - m_lastXPos = event.m_x; m_lastYPos = event.m_y; - // No message - ensure we don't try to call the default behaviour accidentally. - m_lastMsg = 0; - GetEventHandler()->ProcessEvent(event); -} - -void wxWindow::MSWOnChar(WXWORD wParam, WXLPARAM lParam, bool isASCII) -{ - int id; - bool tempControlDown = FALSE; - if (isASCII) - { - // If 1 -> 26, translate to CTRL plus a letter. - id = wParam; - if ((id > 0) && (id < 27)) - { - switch (id) - { - case 13: - { - id = WXK_RETURN; - break; - } - case 8: - { - id = WXK_BACK; - break; - } - case 9: - { - id = WXK_TAB; - break; - } - default: - { - tempControlDown = TRUE; - id = id + 96; - } - } - } - } - else if ((id = wxCharCodeMSWToWX(wParam)) == 0) { - // it's ASCII and will be processed here only when called from - // WM_CHAR (i.e. when isASCII = TRUE) - id = -1; - } - - if (id != -1) - { - wxKeyEvent event(wxEVT_CHAR); - event.m_shiftDown = (::GetKeyState(VK_SHIFT)&0x100?TRUE:FALSE); - event.m_controlDown = (::GetKeyState(VK_CONTROL)&0x100?TRUE:FALSE); - if ((HIWORD(lParam) & KF_ALTDOWN) == KF_ALTDOWN) - event.m_altDown = TRUE; - - event.m_eventObject = this; - event.m_keyCode = id; - event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ - - POINT pt ; - GetCursorPos(&pt) ; - RECT rect ; - GetWindowRect((HWND) GetHWND(),&rect) ; - pt.x -= rect.left ; - pt.y -= rect.top ; - - event.m_x = pt.x; event.m_y = pt.y; - - if (!GetEventHandler()->ProcessEvent(event)) - Default(); - } -} - -void wxWindow::MSWOnJoyDown(int joystick, int x, int y, WXUINT flags) -{ - int buttons = 0; - int change = 0; - if (flags & JOY_BUTTON1CHG) - change = wxJOY_BUTTON1; - if (flags & JOY_BUTTON2CHG) - change = wxJOY_BUTTON2; - if (flags & JOY_BUTTON3CHG) - change = wxJOY_BUTTON3; - if (flags & JOY_BUTTON4CHG) - change = wxJOY_BUTTON4; - - if (flags & JOY_BUTTON1) - buttons |= wxJOY_BUTTON1; - if (flags & JOY_BUTTON2) - buttons |= wxJOY_BUTTON2; - if (flags & JOY_BUTTON3) - buttons |= wxJOY_BUTTON3; - if (flags & JOY_BUTTON4) - buttons |= wxJOY_BUTTON4; - - wxJoystickEvent event(wxEVT_JOY_BUTTON_DOWN, buttons, joystick, change); - event.SetPosition(wxPoint(x, y)); - event.SetEventObject(this); - - GetEventHandler()->ProcessEvent(event); -} - -void wxWindow::MSWOnJoyUp(int joystick, int x, int y, WXUINT flags) -{ - int buttons = 0; - int change = 0; - if (flags & JOY_BUTTON1CHG) - change = wxJOY_BUTTON1; - if (flags & JOY_BUTTON2CHG) - change = wxJOY_BUTTON2; - if (flags & JOY_BUTTON3CHG) - change = wxJOY_BUTTON3; - if (flags & JOY_BUTTON4CHG) - change = wxJOY_BUTTON4; - - if (flags & JOY_BUTTON1) - buttons |= wxJOY_BUTTON1; - if (flags & JOY_BUTTON2) - buttons |= wxJOY_BUTTON2; - if (flags & JOY_BUTTON3) - buttons |= wxJOY_BUTTON3; - if (flags & JOY_BUTTON4) - buttons |= wxJOY_BUTTON4; - - wxJoystickEvent event(wxEVT_JOY_BUTTON_UP, buttons, joystick, change); - event.SetPosition(wxPoint(x, y)); - event.SetEventObject(this); - - GetEventHandler()->ProcessEvent(event); -} - -void wxWindow::MSWOnJoyMove(int joystick, int x, int y, WXUINT flags) -{ - int buttons = 0; - if (flags & JOY_BUTTON1) - buttons |= wxJOY_BUTTON1; - if (flags & JOY_BUTTON2) - buttons |= wxJOY_BUTTON2; - if (flags & JOY_BUTTON3) - buttons |= wxJOY_BUTTON3; - if (flags & JOY_BUTTON4) - buttons |= wxJOY_BUTTON4; - - wxJoystickEvent event(wxEVT_JOY_MOVE, buttons, joystick, 0); - event.SetPosition(wxPoint(x, y)); - event.SetEventObject(this); - - GetEventHandler()->ProcessEvent(event); -} - -void wxWindow::MSWOnJoyZMove(int joystick, int z, WXUINT flags) -{ - int buttons = 0; - if (flags & JOY_BUTTON1) - buttons |= wxJOY_BUTTON1; - if (flags & JOY_BUTTON2) - buttons |= wxJOY_BUTTON2; - if (flags & JOY_BUTTON3) - buttons |= wxJOY_BUTTON3; - if (flags & JOY_BUTTON4) - buttons |= wxJOY_BUTTON4; - - wxJoystickEvent event(wxEVT_JOY_ZMOVE, buttons, joystick, 0); - event.SetZPosition(z); - event.SetEventObject(this); - - GetEventHandler()->ProcessEvent(event); -} - -void wxWindow::MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control) -{ - if (control) - { - wxWindow *child = wxFindWinFromHandle(control); - if ( child ) - child->MSWOnVScroll(wParam, pos, control); - return; - } - - wxScrollEvent event; - event.SetPosition(pos); - event.SetOrientation(wxVERTICAL); - event.m_eventObject = this; - - switch ( wParam ) - { - case SB_TOP: - event.m_eventType = wxEVT_SCROLL_TOP; - break; - - case SB_BOTTOM: - event.m_eventType = wxEVT_SCROLL_BOTTOM; - break; - - case SB_LINEUP: - event.m_eventType = wxEVT_SCROLL_LINEUP; - break; - - case SB_LINEDOWN: - event.m_eventType = wxEVT_SCROLL_LINEDOWN; - break; - - case SB_PAGEUP: - event.m_eventType = wxEVT_SCROLL_PAGEUP; - break; - - case SB_PAGEDOWN: - event.m_eventType = wxEVT_SCROLL_PAGEDOWN; - break; - - case SB_THUMBTRACK: - case SB_THUMBPOSITION: - event.m_eventType = wxEVT_SCROLL_THUMBTRACK; - break; - - default: - return; - break; - } - - if (!GetEventHandler()->ProcessEvent(event)) - Default(); -} - -void wxWindow::MSWOnHScroll( WXWORD wParam, WXWORD pos, WXHWND control) -{ - if (control) - { - wxWindow *child = wxFindWinFromHandle(control); - if ( child ) { - child->MSWOnHScroll(wParam, pos, control); - - return; - } - } - else { - wxScrollEvent event; - event.SetPosition(pos); - event.SetOrientation(wxHORIZONTAL); - event.m_eventObject = this; - - switch ( wParam ) - { - case SB_TOP: - event.m_eventType = wxEVT_SCROLL_TOP; - break; - - case SB_BOTTOM: - event.m_eventType = wxEVT_SCROLL_BOTTOM; - break; - - case SB_LINEUP: - event.m_eventType = wxEVT_SCROLL_LINEUP; - break; - - case SB_LINEDOWN: - event.m_eventType = wxEVT_SCROLL_LINEDOWN; - break; - - case SB_PAGEUP: - event.m_eventType = wxEVT_SCROLL_PAGEUP; - break; - - case SB_PAGEDOWN: - event.m_eventType = wxEVT_SCROLL_PAGEDOWN; - break; - - case SB_THUMBTRACK: - case SB_THUMBPOSITION: - event.m_eventType = wxEVT_SCROLL_THUMBTRACK; - break; - - default: - return; - } - - if ( GetEventHandler()->ProcessEvent(event) ) - return; - } - - // call the default WM_HSCROLL handler: it's non trivial in some common - // controls (up-down control for example) - Default(); -} - -void wxWindow::MSWOnShow(bool show, int status) -{ - wxShowEvent event(GetId(), show); - event.m_eventObject = this; - GetEventHandler()->ProcessEvent(event); -} - -bool wxWindow::MSWOnInitDialog(WXHWND WXUNUSED(hWndFocus)) -{ - wxInitDialogEvent event(GetId()); - event.m_eventObject = this; - GetEventHandler()->ProcessEvent(event); - return TRUE; -} - -void wxWindow::InitDialog(void) -{ - wxInitDialogEvent event(GetId()); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); -} - -// Default init dialog behaviour is to transfer data to window -void wxWindow::OnInitDialog(wxInitDialogEvent& event) -{ - TransferDataToWindow(); -} - -void wxGetCharSize(WXHWND wnd, int *x, int *y,wxFont *the_font) -{ - TEXTMETRIC tm; - HDC dc = ::GetDC((HWND) wnd); - HFONT fnt =0; - HFONT was = 0; - if (the_font) - { -#if WXDEBUG > 1 - wxDebugMsg("wxGetCharSize: Selecting HFONT %X\n", fnt); -#endif -// the_font->UseResource(); -// the_font->RealizeResource(); - if ((fnt=(HFONT) the_font->GetResourceHandle())) - was = (HFONT) SelectObject(dc,fnt) ; - } - GetTextMetrics(dc, &tm); - if (the_font && fnt && was) - { -#if WXDEBUG > 1 - wxDebugMsg("wxGetCharSize: Selecting old HFONT %X\n", was); -#endif - SelectObject(dc,was) ; - } - ReleaseDC((HWND)wnd, dc); - *x = tm.tmAveCharWidth; - *y = tm.tmHeight + tm.tmExternalLeading; - -// if (the_font) -// the_font->ReleaseResource(); -} - -// Returns 0 if was a normal ASCII value, not a special key. This indicates that -// the key should be ignored by WM_KEYDOWN and processed by WM_CHAR instead. -int wxCharCodeMSWToWX(int keySym) -{ - int id = 0; - switch (keySym) - { - case VK_CANCEL: id = WXK_CANCEL; break; - case VK_BACK: id = WXK_BACK; break; - case VK_TAB: id = WXK_TAB; break; - case VK_CLEAR: id = WXK_CLEAR; break; - case VK_RETURN: id = WXK_RETURN; break; - case VK_SHIFT: id = WXK_SHIFT; break; - case VK_CONTROL: id = WXK_CONTROL; break; - case VK_MENU : id = WXK_MENU; break; - case VK_PAUSE: id = WXK_PAUSE; break; - case VK_SPACE: id = WXK_SPACE; break; - case VK_ESCAPE: id = WXK_ESCAPE; break; - case VK_PRIOR: id = WXK_PRIOR; break; - case VK_NEXT : id = WXK_NEXT; break; - case VK_END: id = WXK_END; break; - case VK_HOME : id = WXK_HOME; break; - case VK_LEFT : id = WXK_LEFT; break; - case VK_UP: id = WXK_UP; break; - case VK_RIGHT: id = WXK_RIGHT; break; - case VK_DOWN : id = WXK_DOWN; break; - case VK_SELECT: id = WXK_SELECT; break; - case VK_PRINT: id = WXK_PRINT; break; - case VK_EXECUTE: id = WXK_EXECUTE; break; - case VK_INSERT: id = WXK_INSERT; break; - case VK_DELETE: id = WXK_DELETE; break; - case VK_HELP : id = WXK_HELP; break; - case VK_NUMPAD0: id = WXK_NUMPAD0; break; - case VK_NUMPAD1: id = WXK_NUMPAD1; break; - case VK_NUMPAD2: id = WXK_NUMPAD2; break; - case VK_NUMPAD3: id = WXK_NUMPAD3; break; - case VK_NUMPAD4: id = WXK_NUMPAD4; break; - case VK_NUMPAD5: id = WXK_NUMPAD5; break; - case VK_NUMPAD6: id = WXK_NUMPAD6; break; - case VK_NUMPAD7: id = WXK_NUMPAD7; break; - case VK_NUMPAD8: id = WXK_NUMPAD8; break; - case VK_NUMPAD9: id = WXK_NUMPAD9; break; - case VK_MULTIPLY: id = WXK_MULTIPLY; break; - case VK_ADD: id = WXK_ADD; break; - case VK_SUBTRACT: id = WXK_SUBTRACT; break; - case VK_DECIMAL: id = WXK_DECIMAL; break; - case VK_DIVIDE: id = WXK_DIVIDE; break; - case VK_F1: id = WXK_F1; break; - case VK_F2: id = WXK_F2; break; - case VK_F3: id = WXK_F3; break; - case VK_F4: id = WXK_F4; break; - case VK_F5: id = WXK_F5; break; - case VK_F6: id = WXK_F6; break; - case VK_F7: id = WXK_F7; break; - case VK_F8: id = WXK_F8; break; - case VK_F9: id = WXK_F9; break; - case VK_F10: id = WXK_F10; break; - case VK_F11: id = WXK_F11; break; - case VK_F12: id = WXK_F12; break; - case VK_F13: id = WXK_F13; break; - case VK_F14: id = WXK_F14; break; - case VK_F15: id = WXK_F15; break; - case VK_F16: id = WXK_F16; break; - case VK_F17: id = WXK_F17; break; - case VK_F18: id = WXK_F18; break; - case VK_F19: id = WXK_F19; break; - case VK_F20: id = WXK_F20; break; - case VK_F21: id = WXK_F21; break; - case VK_F22: id = WXK_F22; break; - case VK_F23: id = WXK_F23; break; - case VK_F24: id = WXK_F24; break; - case VK_NUMLOCK: id = WXK_NUMLOCK; break; - case VK_SCROLL: id = WXK_SCROLL; break; - default: - { - return 0; - } - } - return id; -} - -int wxCharCodeWXToMSW(int id, bool *isVirtual) -{ - *isVirtual = TRUE; - int keySym = 0; - switch (id) - { - case WXK_CANCEL: keySym = VK_CANCEL; break; - case WXK_CLEAR: keySym = VK_CLEAR; break; - case WXK_SHIFT: keySym = VK_SHIFT; break; - case WXK_CONTROL: keySym = VK_CONTROL; break; - case WXK_MENU : keySym = VK_MENU; break; - case WXK_PAUSE: keySym = VK_PAUSE; break; - case WXK_PRIOR: keySym = VK_PRIOR; break; - case WXK_NEXT : keySym = VK_NEXT; break; - case WXK_END: keySym = VK_END; break; - case WXK_HOME : keySym = VK_HOME; break; - case WXK_LEFT : keySym = VK_LEFT; break; - case WXK_UP: keySym = VK_UP; break; - case WXK_RIGHT: keySym = VK_RIGHT; break; - case WXK_DOWN : keySym = VK_DOWN; break; - case WXK_SELECT: keySym = VK_SELECT; break; - case WXK_PRINT: keySym = VK_PRINT; break; - case WXK_EXECUTE: keySym = VK_EXECUTE; break; - case WXK_INSERT: keySym = VK_INSERT; break; - case WXK_DELETE: keySym = VK_DELETE; break; - case WXK_HELP : keySym = VK_HELP; break; - case WXK_NUMPAD0: keySym = VK_NUMPAD0; break; - case WXK_NUMPAD1: keySym = VK_NUMPAD1; break; - case WXK_NUMPAD2: keySym = VK_NUMPAD2; break; - case WXK_NUMPAD3: keySym = VK_NUMPAD3; break; - case WXK_NUMPAD4: keySym = VK_NUMPAD4; break; - case WXK_NUMPAD5: keySym = VK_NUMPAD5; break; - case WXK_NUMPAD6: keySym = VK_NUMPAD6; break; - case WXK_NUMPAD7: keySym = VK_NUMPAD7; break; - case WXK_NUMPAD8: keySym = VK_NUMPAD8; break; - case WXK_NUMPAD9: keySym = VK_NUMPAD9; break; - case WXK_MULTIPLY: keySym = VK_MULTIPLY; break; - case WXK_ADD: keySym = VK_ADD; break; - case WXK_SUBTRACT: keySym = VK_SUBTRACT; break; - case WXK_DECIMAL: keySym = VK_DECIMAL; break; - case WXK_DIVIDE: keySym = VK_DIVIDE; break; - case WXK_F1: keySym = VK_F1; break; - case WXK_F2: keySym = VK_F2; break; - case WXK_F3: keySym = VK_F3; break; - case WXK_F4: keySym = VK_F4; break; - case WXK_F5: keySym = VK_F5; break; - case WXK_F6: keySym = VK_F6; break; - case WXK_F7: keySym = VK_F7; break; - case WXK_F8: keySym = VK_F8; break; - case WXK_F9: keySym = VK_F9; break; - case WXK_F10: keySym = VK_F10; break; - case WXK_F11: keySym = VK_F11; break; - case WXK_F12: keySym = VK_F12; break; - case WXK_F13: keySym = VK_F13; break; - case WXK_F14: keySym = VK_F14; break; - case WXK_F15: keySym = VK_F15; break; - case WXK_F16: keySym = VK_F16; break; - case WXK_F17: keySym = VK_F17; break; - case WXK_F18: keySym = VK_F18; break; - case WXK_F19: keySym = VK_F19; break; - case WXK_F20: keySym = VK_F20; break; - case WXK_F21: keySym = VK_F21; break; - case WXK_F22: keySym = VK_F22; break; - case WXK_F23: keySym = VK_F23; break; - case WXK_F24: keySym = VK_F24; break; - case WXK_NUMLOCK: keySym = VK_NUMLOCK; break; - case WXK_SCROLL: keySym = VK_SCROLL; break; - default: - { - *isVirtual = FALSE; - keySym = id; - break; - } - } - return keySym; -} - -// Caret manipulation -void wxWindow::CreateCaret(int w, int h) -{ - m_caretWidth = w; - m_caretHeight = h; - m_caretEnabled = TRUE; -} - -void wxWindow::CreateCaret(const wxBitmap *WXUNUSED(bitmap)) -{ - // Not implemented -} - -void wxWindow::ShowCaret(bool show) -{ - if (m_caretEnabled) - { - if (show) - ::ShowCaret((HWND) GetHWND()); - else - ::HideCaret((HWND) GetHWND()); - m_caretShown = show; - } -} - -void wxWindow::DestroyCaret(void) -{ - m_caretEnabled = FALSE; -} - -void wxWindow::SetCaretPos(int x, int y) -{ - ::SetCaretPos(x, y); -} - -void wxWindow::GetCaretPos(int *x, int *y) const -{ - POINT point; - ::GetCaretPos(&point); - *x = point.x; - *y = point.y; -} - -wxWindow *wxGetActiveWindow(void) -{ - HWND hWnd = GetActiveWindow(); - if (hWnd != 0) - { - return wxFindWinFromHandle((WXHWND) hWnd); - } - return NULL; -} - -// Windows keyboard hook. Allows interception of e.g. F1, ESCAPE -// in active frames and dialogs, regardless of where the focus is. -static HHOOK wxTheKeyboardHook = 0; -static FARPROC wxTheKeyboardHookProc = 0; -int APIENTRY _EXPORT - wxKeyboardHook(int nCode, WORD wParam, DWORD lParam); - -void wxSetKeyboardHook(bool doIt) -{ - if (doIt) - { - wxTheKeyboardHookProc = MakeProcInstance((FARPROC) wxKeyboardHook, wxGetInstance()); - wxTheKeyboardHook = SetWindowsHookEx(WH_KEYBOARD, (HOOKPROC) wxTheKeyboardHookProc, wxGetInstance(), -#ifdef __WIN32__ - GetCurrentThreadId()); -// (DWORD)GetCurrentProcess()); // This is another possibility. Which is right? -#else - GetCurrentTask()); -#endif - } - else - { - UnhookWindowsHookEx(wxTheKeyboardHook); - FreeProcInstance(wxTheKeyboardHookProc); - } -} - -int APIENTRY _EXPORT - wxKeyboardHook(int nCode, WORD wParam, DWORD lParam) -{ - DWORD hiWord = HIWORD(lParam); - if (nCode != HC_NOREMOVE && ((hiWord & KF_UP) == 0)) - { - int id; - if ((id = wxCharCodeMSWToWX(wParam)) != 0) - { - wxKeyEvent event(wxEVT_CHAR_HOOK); - if ((HIWORD(lParam) & KF_ALTDOWN) == KF_ALTDOWN) - event.m_altDown = TRUE; - - event.m_eventObject = NULL; - event.m_keyCode = id; -/* begin Albert's fix for control and shift key 26.5 */ - event.m_shiftDown = (::GetKeyState(VK_SHIFT)&0x100?TRUE:FALSE); - event.m_controlDown = (::GetKeyState(VK_CONTROL)&0x100?TRUE:FALSE); -/* end Albert's fix for control and shift key 26.5 */ - event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ - - wxWindow *win = wxGetActiveWindow(); - if (win) - { - if (win->GetEventHandler()->ProcessEvent(event)) - return 1; - } - else - { - if ( wxTheApp && wxTheApp->ProcessEvent(event) ) - return 1; - } - } - } - return (int)CallNextHookEx(wxTheKeyboardHook, nCode, wParam, lParam); -} - -void wxWindow::SetSizeHints(int minW, int minH, int maxW, int maxH, int WXUNUSED(incW), int WXUNUSED(incH)) -{ - m_minSizeX = minW; - m_minSizeY = minH; - m_maxSizeX = maxW; - m_maxSizeY = maxH; -} - -void wxWindow::Centre(int direction) -{ - int x, y, width, height, panel_width, panel_height, new_x, new_y; - - wxWindow *father = (wxWindow *)GetParent(); - if (!father) - return; - - father->GetClientSize(&panel_width, &panel_height); - GetSize(&width, &height); - GetPosition(&x, &y); - - new_x = -1; - new_y = -1; - - if (direction & wxHORIZONTAL) - new_x = (int)((panel_width - width)/2); - - if (direction & wxVERTICAL) - new_y = (int)((panel_height - height)/2); - - SetSize(new_x, new_y, -1, -1); - -} - -/* TODO (maybe) -void wxWindow::OnPaint(void) -{ - PaintSelectionHandles(); -} -*/ - -void wxWindow::WarpPointer (int x_pos, int y_pos) -{ - // Move the pointer to (x_pos,y_pos) coordinates. They are expressed in - // pixel coordinates, relatives to the canvas -- So, we first need to - // substract origin of the window, then convert to screen position - - int x = x_pos; int y = y_pos; - RECT rect; - GetWindowRect ((HWND) GetHWND(), &rect); - - x += rect.left; - y += rect.top; - - SetCursorPos (x, y); -} - -void wxWindow::MSWDeviceToLogical (float *x, float *y) const -{ -} - -bool wxWindow::MSWOnEraseBkgnd (WXHDC pDC) -{ - wxDC dc ; - - dc.SetHDC(pDC); - dc.SetWindow(this); - dc.BeginDrawing(); - - wxEraseEvent event(m_windowId, &dc); - event.m_eventObject = this; - if (!GetEventHandler()->ProcessEvent(event)) - { - dc.EndDrawing(); - dc.SelectOldObjects(pDC); - return FALSE; - } - else - { - dc.EndDrawing(); - dc.SelectOldObjects(pDC); - } - - dc.SetHDC((WXHDC) NULL); - return TRUE; -} - -void wxWindow::OnEraseBackground(wxEraseEvent& event) -{ - RECT rect; - ::GetClientRect((HWND) GetHWND(), &rect); - - HBRUSH hBrush = ::CreateSolidBrush(PALETTERGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue())); - int mode = ::SetMapMode((HDC) event.GetDC()->GetHDC(), MM_TEXT); - -// ::GetClipBox((HDC) event.GetDC()->GetHDC(), &rect); - ::FillRect ((HDC) event.GetDC()->GetHDC(), &rect, hBrush); - ::DeleteObject(hBrush); - ::SetMapMode((HDC) event.GetDC()->GetHDC(), mode); -/* - // Less efficient version (and doesn't account for scrolling) - int w, h; - GetClientSize(& w, & h); - wxBrush *brush = wxTheBrushList->FindOrCreateBrush(& GetBackgroundColour(), wxSOLID); - event.GetDC()->SetBrush(brush); - event.GetDC()->SetPen(wxTRANSPARENT_PEN); - - event.GetDC()->DrawRectangle(0, 0, w+1, h+1); -*/ -} - -#if WXWIN_COMPATIBILITY -void wxWindow::SetScrollRange(int orient, int range, bool refresh) -{ -#if defined(__WIN95__) - - int range1 = range; - - // Try to adjust the range to cope with page size > 1 - // - a Windows API quirk - int pageSize = GetScrollPage(orient); - if ( pageSize > 1 && range > 0) - { - range1 += (pageSize - 1); - } - - SCROLLINFO info; - int dir; - - if (orient == wxHORIZONTAL) { - dir = SB_HORZ; - } else { - dir = SB_VERT; - } - - info.cbSize = sizeof(SCROLLINFO); - info.nPage = pageSize; // Have to set this, or scrollbar goes awry - info.nMin = 0; - info.nMax = range1; - info.nPos = 0; - info.fMask = SIF_RANGE | SIF_PAGE; - - HWND hWnd = (HWND) GetHWND(); - if (hWnd) - ::SetScrollInfo(hWnd, dir, &info, refresh); -#else - int wOrient ; - if (orient == wxHORIZONTAL) - wOrient = SB_HORZ; - else - wOrient = SB_VERT; - - HWND hWnd = (HWND) GetHWND(); - if (hWnd) - ::SetScrollRange(hWnd, wOrient, 0, range, refresh); -#endif -} - -void wxWindow::SetScrollPage(int orient, int page, bool refresh) -{ -#if defined(__WIN95__) - SCROLLINFO info; - int dir; - - if (orient == wxHORIZONTAL) { - dir = SB_HORZ; - m_xThumbSize = page; - } else { - dir = SB_VERT; - m_yThumbSize = page; - } - - info.cbSize = sizeof(SCROLLINFO); - info.nPage = page; - info.nMin = 0; - info.fMask = SIF_PAGE ; - - HWND hWnd = (HWND) GetHWND(); - if (hWnd) - ::SetScrollInfo(hWnd, dir, &info, refresh); -#else - if (orient == wxHORIZONTAL) - m_xThumbSize = page; - else - m_yThumbSize = page; -#endif -} - -int wxWindow::OldGetScrollRange(int orient) const -{ - int wOrient ; - if (orient == wxHORIZONTAL) - wOrient = SB_HORZ; - else - wOrient = SB_VERT; - -#if __WATCOMC__ && defined(__WINDOWS_386__) - short minPos, maxPos; -#else - int minPos, maxPos; -#endif - HWND hWnd = (HWND) GetHWND(); - if (hWnd) - { - ::GetScrollRange(hWnd, wOrient, &minPos, &maxPos); -#if defined(__WIN95__) - // Try to adjust the range to cope with page size > 1 - // - a Windows API quirk - int pageSize = GetScrollPage(orient); - if ( pageSize > 1 ) - { - maxPos -= (pageSize - 1); - } -#endif - return maxPos; - } - else - return 0; -} - -int wxWindow::GetScrollPage(int orient) const -{ - if (orient == wxHORIZONTAL) - return m_xThumbSize; - else - return m_yThumbSize; -} -#endif - -int wxWindow::GetScrollPos(int orient) const -{ - int wOrient ; - if (orient == wxHORIZONTAL) - wOrient = SB_HORZ; - else - wOrient = SB_VERT; - HWND hWnd = (HWND) GetHWND(); - if (hWnd) - { - return ::GetScrollPos(hWnd, wOrient); - } - else - return 0; -} - -// This now returns the whole range, not just the number -// of positions that we can scroll. -int wxWindow::GetScrollRange(int orient) const -{ - int wOrient ; - if (orient == wxHORIZONTAL) - wOrient = SB_HORZ; - else - wOrient = SB_VERT; - -#if __WATCOMC__ && defined(__WINDOWS_386__) - short minPos, maxPos; -#else - int minPos, maxPos; -#endif - HWND hWnd = (HWND) GetHWND(); - if (hWnd) - { - ::GetScrollRange(hWnd, wOrient, &minPos, &maxPos); -#if defined(__WIN95__) - // Try to adjust the range to cope with page size > 1 - // - a Windows API quirk - int pageSize = GetScrollPage(orient); - if ( pageSize > 1 ) - { - maxPos -= (pageSize - 1); - } - // October 10th: new range concept. - maxPos += pageSize; -#endif - - return maxPos; - } - else - return 0; -} - -int wxWindow::GetScrollThumb(int orient) const -{ - if (orient == wxHORIZONTAL) - return m_xThumbSize; - else - return m_yThumbSize; -} - -void wxWindow::SetScrollPos(int orient, int pos, bool refresh) -{ -#if defined(__WIN95__) - SCROLLINFO info; - int dir; - - if (orient == wxHORIZONTAL) { - dir = SB_HORZ; - } else { - dir = SB_VERT; - } - - info.cbSize = sizeof(SCROLLINFO); - info.nPage = 0; - info.nMin = 0; - info.nPos = pos; - info.fMask = SIF_POS ; - - HWND hWnd = (HWND) GetHWND(); - if (hWnd) - ::SetScrollInfo(hWnd, dir, &info, refresh); -#else - int wOrient ; - if (orient == wxHORIZONTAL) - wOrient = SB_HORZ; - else - wOrient = SB_VERT; - - HWND hWnd = (HWND) GetHWND(); - if (hWnd) - ::SetScrollPos(hWnd, wOrient, pos, refresh); -#endif -} - -// New function that will replace some of the above. -void wxWindow::SetScrollbar(int orient, int pos, int thumbVisible, - int range, bool refresh) -{ -/* - SetScrollPage(orient, thumbVisible, FALSE); - - int oldRange = range - thumbVisible ; - SetScrollRange(orient, oldRange, FALSE); - - SetScrollPos(orient, pos, refresh); -*/ -#if defined(__WIN95__) - int oldRange = range - thumbVisible ; - - int range1 = oldRange; - - // Try to adjust the range to cope with page size > 1 - // - a Windows API quirk - int pageSize = thumbVisible; - if ( pageSize > 1 && range > 0) - { - range1 += (pageSize - 1); - } - - SCROLLINFO info; - int dir; - - if (orient == wxHORIZONTAL) { - dir = SB_HORZ; - } else { - dir = SB_VERT; - } - - info.cbSize = sizeof(SCROLLINFO); - info.nPage = pageSize; // Have to set this, or scrollbar goes awry - info.nMin = 0; - info.nMax = range1; - info.nPos = pos; - info.fMask = SIF_RANGE | SIF_PAGE | SIF_POS; - - HWND hWnd = (HWND) GetHWND(); - if (hWnd) - ::SetScrollInfo(hWnd, dir, &info, refresh); -#else - int wOrient ; - if (orient == wxHORIZONTAL) - wOrient = SB_HORZ; - else - wOrient = SB_VERT; - - HWND hWnd = (HWND) GetHWND(); - if (hWnd) - { - ::SetScrollRange(hWnd, wOrient, 0, range, FALSE); - ::SetScrollPos(hWnd, wOrient, pos, refresh); - } -#endif - if (orient == wxHORIZONTAL) { - m_xThumbSize = thumbVisible; - } else { - m_yThumbSize = thumbVisible; - } -} - -void wxWindow::ScrollWindow(int dx, int dy, const wxRectangle *rect) -{ - RECT rect2; - if ( rect ) - { - rect2.left = rect->x; - rect2.top = rect->y; - rect2.right = rect->x + rect->width; - rect2.bottom = rect->y + rect->height; - } - - if ( rect ) - ::ScrollWindow((HWND) GetHWND(), dx, dy, &rect2, NULL); - else - ::ScrollWindow((HWND) GetHWND(), dx, dy, NULL, NULL); -} - -void wxWindow::SetFont(const wxFont& font) -{ - m_windowFont = font; - - if (!m_windowFont.Ok()) - return; - - HWND hWnd = (HWND) GetHWND(); - if (hWnd != 0) - { - if (m_windowFont.GetResourceHandle()) - SendMessage(hWnd, WM_SETFONT, - (WPARAM)m_windowFont.GetResourceHandle(),TRUE); - } -} - -void wxWindow::SubclassWin(WXHWND hWnd) -{ - wxASSERT_MSG( !m_oldWndProc, "subclassing window twice?" ); - - wxAssociateWinWithHandle((HWND)hWnd, this); - - m_oldWndProc = (WXFARPROC) GetWindowLong((HWND) hWnd, GWL_WNDPROC); - SetWindowLong((HWND) hWnd, GWL_WNDPROC, (LONG) wxWndProc); -} - -void wxWindow::UnsubclassWin(void) -{ - wxRemoveHandleAssociation(this); - - // Restore old Window proc - if ((HWND) GetHWND()) - { - FARPROC farProc = (FARPROC) GetWindowLong((HWND) GetHWND(), GWL_WNDPROC); - if ((m_oldWndProc != 0) && (farProc != (FARPROC) m_oldWndProc)) - { - SetWindowLong((HWND) GetHWND(), GWL_WNDPROC, (LONG) m_oldWndProc); - m_oldWndProc = 0; - } - } -} - -// Make a Windows extended style from the given wxWindows window style -WXDWORD wxWindow::MakeExtendedStyle(long style, bool eliminateBorders) -{ - WXDWORD exStyle = 0; - if ( style & wxTRANSPARENT_WINDOW ) - exStyle |= WS_EX_TRANSPARENT ; - - if ( !eliminateBorders ) - { - if ( style & wxSUNKEN_BORDER ) - exStyle |= WS_EX_CLIENTEDGE ; - if ( style & wxDOUBLE_BORDER ) - exStyle |= WS_EX_DLGMODALFRAME ; -#if defined(__WIN95__) - if ( style & wxRAISED_BORDER ) - exStyle |= WS_EX_WINDOWEDGE ; - if ( style & wxSTATIC_BORDER ) - exStyle |= WS_EX_STATICEDGE ; -#endif - } - return exStyle; -} - -// Determines whether native 3D effects or CTL3D should be used, -// applying a default border style if required, and returning an extended -// style to pass to CreateWindowEx. -WXDWORD wxWindow::Determine3DEffects(WXDWORD defaultBorderStyle, bool *want3D) -{ - // If matches certain criteria, then assume no 3D effects - // unless specifically requested (dealt with in MakeExtendedStyle) - if ( !GetParent() || !IsKindOf(CLASSINFO(wxControl)) || (m_windowStyle & wxNO_BORDER) ) - { - *want3D = FALSE; - return MakeExtendedStyle(m_windowStyle, FALSE); - } - - // Determine whether we should be using 3D effects or not. - bool nativeBorder = FALSE; // by default, we don't want a Win95 effect - - // 1) App can specify global 3D effects - *want3D = wxTheApp->GetAuto3D(); - - // 2) If the parent is being drawn with user colours, or simple border specified, - // switch effects off. TODO: replace wxUSER_COLOURS with wxNO_3D - if (GetParent() && (GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS) || (m_windowStyle & wxSIMPLE_BORDER)) - *want3D = FALSE; - - // 3) Control can override this global setting by defining - // a border style, e.g. wxSUNKEN_BORDER - if (m_windowStyle & wxSUNKEN_BORDER ) - *want3D = TRUE; - - // 4) If it's a special border, CTL3D can't cope so we want a native border - if ( (m_windowStyle & wxDOUBLE_BORDER) || (m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSTATIC_BORDER) ) - { - *want3D = TRUE; - nativeBorder = TRUE; - } - - // 5) If this isn't a Win95 app, and we are using CTL3D, remove border - // effects from extended style -#if CTL3D - if ( *want3D ) - nativeBorder = FALSE; -#endif - - DWORD exStyle = MakeExtendedStyle(m_windowStyle, !nativeBorder); - - // If we want 3D, but haven't specified a border here, - // apply the default border style specified. - // TODO what about non-Win95 WIN32? Does it have borders? -#if defined(__WIN95__) && !CTL3D - if (defaultBorderStyle && (*want3D) && ! ((m_windowStyle & wxDOUBLE_BORDER) || (m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSTATIC_BORDER) || (m_windowStyle & wxSIMPLE_BORDER) )) - exStyle |= defaultBorderStyle; // WS_EX_CLIENTEDGE ; -#endif - - return exStyle; -} - -void wxWindow::OnChar(wxKeyEvent& event) -{ - if ( event.KeyCode() == WXK_TAB ) { - // propagate the TABs to the parent - it's up to it to decide what - // to do with it - if ( GetParent() ) { - if ( GetParent()->ProcessEvent(event) ) - return; - } - } - - bool isVirtual; - int id = wxCharCodeWXToMSW((int)event.KeyCode(), &isVirtual); - - if ( id == -1 ) - id= m_lastWParam; - - if ( !event.ControlDown() ) - (void) MSWDefWindowProc(m_lastMsg, (WPARAM) id, m_lastLParam); -} - -void wxWindow::OnPaint(wxPaintEvent& event) -{ - Default(); -} - -bool wxWindow::IsEnabled(void) const -{ - return (::IsWindowEnabled((HWND) GetHWND()) != 0); -} - -// Dialog support: override these and call -// base class members to add functionality -// that can't be done using validators. -// NOTE: these functions assume that controls -// are direct children of this window, not grandchildren -// or other levels of descendant. - -// Transfer values to controls. If returns FALSE, -// it's an application error (pops up a dialog) -bool wxWindow::TransferDataToWindow(void) -{ - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow *child = (wxWindow *)node->Data(); - if ( child->GetValidator() && /* child->GetValidator()->Ok() && */ - !child->GetValidator()->TransferToWindow() ) - { - wxMessageBox("Application Error", "Could not transfer data to window", wxOK|wxICON_EXCLAMATION); - return FALSE; - } - - node = node->Next(); - } - return TRUE; -} - -// Transfer values from controls. If returns FALSE, -// validation failed: don't quit -bool wxWindow::TransferDataFromWindow(void) -{ - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow *child = (wxWindow *)node->Data(); - if ( child->GetValidator() && /* child->GetValidator()->Ok() && */ !child->GetValidator()->TransferFromWindow() ) - { - return FALSE; - } - - node = node->Next(); - } - return TRUE; -} - -bool wxWindow::Validate(void) -{ - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow *child = (wxWindow *)node->Data(); - if ( child->GetValidator() && /* child->GetValidator()->Ok() && */ !child->GetValidator()->Validate(this) ) - { - return FALSE; - } - - node = node->Next(); - } - return TRUE; -} - -// Get the window with the focus -wxWindow *wxWindow::FindFocus(void) -{ - HWND hWnd = ::GetFocus(); - if ( hWnd ) - { - return wxFindWinFromHandle((WXHWND) hWnd); - } - return NULL; -} - -void wxWindow::AddChild(wxWindow *child) -{ - GetChildren()->Append(child); - child->m_windowParent = this; -} - -void wxWindow::RemoveChild(wxWindow *child) -{ - if (GetChildren()) - GetChildren()->DeleteObject(child); - child->m_windowParent = NULL; -} - -void wxWindow::DestroyChildren(void) -{ - if (GetChildren()) { - wxNode *node; - while ((node = GetChildren()->First()) != (wxNode *)NULL) { - wxWindow *child; - if ((child = (wxWindow *)node->Data()) != (wxWindow *)NULL) { - delete child; - if ( GetChildren()->Member(child) ) - delete node; - } - } /* while */ - } -} - -void wxWindow::MakeModal(bool modal) -{ - // Disable all other windows - if (this->IsKindOf(CLASSINFO(wxDialog)) || this->IsKindOf(CLASSINFO(wxFrame))) - { - wxNode *node = wxTopLevelWindows.First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (win != this) - win->Enable(!modal); - - node = node->Next(); - } - } -} - -// If nothing defined for this, try the parent. -// E.g. we may be a button loaded from a resource, with no callback function -// defined. -void wxWindow::OnCommand(wxWindow& win, wxCommandEvent& event) -{ - if (GetEventHandler()->ProcessEvent(event) ) - return; - if (m_windowParent) - m_windowParent->GetEventHandler()->OnCommand(win, event); -} - -void wxWindow::SetConstraints(wxLayoutConstraints *c) -{ - if (m_constraints) - { - UnsetConstraints(m_constraints); - delete m_constraints; - } - m_constraints = c; - if (m_constraints) - { - // Make sure other windows know they're part of a 'meaningful relationship' - if (m_constraints->left.GetOtherWindow() && (m_constraints->left.GetOtherWindow() != this)) - m_constraints->left.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->top.GetOtherWindow() && (m_constraints->top.GetOtherWindow() != this)) - m_constraints->top.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->right.GetOtherWindow() && (m_constraints->right.GetOtherWindow() != this)) - m_constraints->right.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->bottom.GetOtherWindow() && (m_constraints->bottom.GetOtherWindow() != this)) - m_constraints->bottom.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->width.GetOtherWindow() && (m_constraints->width.GetOtherWindow() != this)) - m_constraints->width.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->height.GetOtherWindow() && (m_constraints->height.GetOtherWindow() != this)) - m_constraints->height.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->centreX.GetOtherWindow() && (m_constraints->centreX.GetOtherWindow() != this)) - m_constraints->centreX.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->centreY.GetOtherWindow() && (m_constraints->centreY.GetOtherWindow() != this)) - m_constraints->centreY.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - } -} - -// This removes any dangling pointers to this window -// in other windows' constraintsInvolvedIn lists. -void wxWindow::UnsetConstraints(wxLayoutConstraints *c) -{ - if (c) - { - if (c->left.GetOtherWindow() && (c->top.GetOtherWindow() != this)) - c->left.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->top.GetOtherWindow() && (c->top.GetOtherWindow() != this)) - c->top.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->right.GetOtherWindow() && (c->right.GetOtherWindow() != this)) - c->right.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->bottom.GetOtherWindow() && (c->bottom.GetOtherWindow() != this)) - c->bottom.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->width.GetOtherWindow() && (c->width.GetOtherWindow() != this)) - c->width.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->height.GetOtherWindow() && (c->height.GetOtherWindow() != this)) - c->height.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->centreX.GetOtherWindow() && (c->centreX.GetOtherWindow() != this)) - c->centreX.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->centreY.GetOtherWindow() && (c->centreY.GetOtherWindow() != this)) - c->centreY.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - } -} - -// Back-pointer to other windows we're involved with, so if we delete -// this window, we must delete any constraints we're involved with. -void wxWindow::AddConstraintReference(wxWindow *otherWin) -{ - if (!m_constraintsInvolvedIn) - m_constraintsInvolvedIn = new wxList; - if (!m_constraintsInvolvedIn->Member(otherWin)) - m_constraintsInvolvedIn->Append(otherWin); -} - -// REMOVE back-pointer to other windows we're involved with. -void wxWindow::RemoveConstraintReference(wxWindow *otherWin) -{ - if (m_constraintsInvolvedIn) - m_constraintsInvolvedIn->DeleteObject(otherWin); -} - -// Reset any constraints that mention this window -void wxWindow::DeleteRelatedConstraints(void) -{ - if (m_constraintsInvolvedIn) - { - wxNode *node = m_constraintsInvolvedIn->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - wxNode *next = node->Next(); - wxLayoutConstraints *constr = win->GetConstraints(); - - // Reset any constraints involving this window - if (constr) - { - constr->left.ResetIfWin((wxWindow *)this); - constr->top.ResetIfWin((wxWindow *)this); - constr->right.ResetIfWin((wxWindow *)this); - constr->bottom.ResetIfWin((wxWindow *)this); - constr->width.ResetIfWin((wxWindow *)this); - constr->height.ResetIfWin((wxWindow *)this); - constr->centreX.ResetIfWin((wxWindow *)this); - constr->centreY.ResetIfWin((wxWindow *)this); - } - delete node; - node = next; - } - delete m_constraintsInvolvedIn; - m_constraintsInvolvedIn = NULL; - } -} - -void wxWindow::SetSizer(wxSizer *sizer) -{ - m_windowSizer = sizer; - if (sizer) - sizer->SetSizerParent((wxWindow *)this); -} - -/* - * New version - */ - -bool wxWindow::Layout(void) -{ - if (GetConstraints()) - { - int w, h; - GetClientSize(&w, &h); - GetConstraints()->width.SetValue(w); - GetConstraints()->height.SetValue(h); - } - - // If top level (one sizer), evaluate the sizer's constraints. - if (GetSizer()) - { - int noChanges; - GetSizer()->ResetConstraints(); // Mark all constraints as unevaluated - GetSizer()->LayoutPhase1(&noChanges); - GetSizer()->LayoutPhase2(&noChanges); - GetSizer()->SetConstraintSizes(); // Recursively set the real window sizes - return TRUE; - } - else - { - // Otherwise, evaluate child constraints - ResetConstraints(); // Mark all constraints as unevaluated - DoPhase(1); // Just one phase need if no sizers involved - DoPhase(2); - SetConstraintSizes(); // Recursively set the real window sizes - } - return TRUE; -} - - -// Do a phase of evaluating constraints: -// the default behaviour. wxSizers may do a similar -// thing, but also impose their own 'constraints' -// and order the evaluation differently. -bool wxWindow::LayoutPhase1(int *noChanges) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - return constr->SatisfyConstraints((wxWindow *)this, noChanges); - } - else - return TRUE; -} - -bool wxWindow::LayoutPhase2(int *noChanges) -{ - *noChanges = 0; - - // Layout children - DoPhase(1); - DoPhase(2); - return TRUE; -} - -// Do a phase of evaluating child constraints -bool wxWindow::DoPhase(int phase) -{ - int noIterations = 0; - int maxIterations = 500; - int noChanges = 1; - int noFailures = 0; - wxList succeeded; - while ((noChanges > 0) && (noIterations < maxIterations)) - { - noChanges = 0; - noFailures = 0; - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow *)node->Data(); - if (!child->IsKindOf(CLASSINFO(wxFrame)) && !child->IsKindOf(CLASSINFO(wxDialog))) - { - wxLayoutConstraints *constr = child->GetConstraints(); - if (constr) - { - if (succeeded.Member(child)) - { - } - else - { - int tempNoChanges = 0; - bool success = ( (phase == 1) ? child->LayoutPhase1(&tempNoChanges) : child->LayoutPhase2(&tempNoChanges) ) ; - noChanges += tempNoChanges; - if (success) - { - succeeded.Append(child); - } - } - } - } - node = node->Next(); - } - noIterations ++; - } - return TRUE; -} - -void wxWindow::ResetConstraints(void) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - constr->left.SetDone(FALSE); - constr->top.SetDone(FALSE); - constr->right.SetDone(FALSE); - constr->bottom.SetDone(FALSE); - constr->width.SetDone(FALSE); - constr->height.SetDone(FALSE); - constr->centreX.SetDone(FALSE); - constr->centreY.SetDone(FALSE); - } - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (!win->IsKindOf(CLASSINFO(wxFrame)) && !win->IsKindOf(CLASSINFO(wxDialog))) - win->ResetConstraints(); - node = node->Next(); - } -} - -// Need to distinguish between setting the 'fake' size for -// windows and sizers, and setting the real values. -void wxWindow::SetConstraintSizes(bool recurse) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr && constr->left.GetDone() && constr->right.GetDone() && - constr->width.GetDone() && constr->height.GetDone()) - { - int x = constr->left.GetValue(); - int y = constr->top.GetValue(); - int w = constr->width.GetValue(); - int h = constr->height.GetValue(); - - // If we don't want to resize this window, just move it... - if ((constr->width.GetRelationship() != wxAsIs) || - (constr->height.GetRelationship() != wxAsIs)) - { - // Calls Layout() recursively. AAAGH. How can we stop that. - // Simply take Layout() out of non-top level OnSizes. - SizerSetSize(x, y, w, h); - } - else - { - SizerMove(x, y); - } - } - else if (constr) - { - char *windowClass = this->GetClassInfo()->GetClassName(); - - wxString winName; - if (GetName() == "") - winName = "unnamed"; - else - winName = GetName(); - wxDebugMsg("Constraint(s) not satisfied for window of type %s, name %s:\n", (const char *)windowClass, (const char *)winName); - if (!constr->left.GetDone()) - wxDebugMsg(" unsatisfied 'left' constraint.\n"); - if (!constr->right.GetDone()) - wxDebugMsg(" unsatisfied 'right' constraint.\n"); - if (!constr->width.GetDone()) - wxDebugMsg(" unsatisfied 'width' constraint.\n"); - if (!constr->height.GetDone()) - wxDebugMsg(" unsatisfied 'height' constraint.\n"); - wxDebugMsg("Please check constraints: try adding AsIs() constraints.\n"); - } - - if (recurse) - { - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (!win->IsKindOf(CLASSINFO(wxFrame)) && !win->IsKindOf(CLASSINFO(wxDialog))) - win->SetConstraintSizes(); - node = node->Next(); - } - } -} - -// This assumes that all sizers are 'on' the same -// window, i.e. the parent of this window. -void wxWindow::TransformSizerToActual(int *x, int *y) const -{ - if (!m_sizerParent || m_sizerParent->IsKindOf(CLASSINFO(wxDialog)) || - m_sizerParent->IsKindOf(CLASSINFO(wxFrame)) ) - return; - - int xp, yp; - m_sizerParent->GetPosition(&xp, &yp); - m_sizerParent->TransformSizerToActual(&xp, &yp); - *x += xp; - *y += yp; -} - -void wxWindow::SizerSetSize(int x, int y, int w, int h) -{ - int xx = x; - int yy = y; - TransformSizerToActual(&xx, &yy); - SetSize(xx, yy, w, h); -} - -void wxWindow::SizerMove(int x, int y) -{ - int xx = x; - int yy = y; - TransformSizerToActual(&xx, &yy); - Move(xx, yy); -} - -// Only set the size/position of the constraint (if any) -void wxWindow::SetSizeConstraint(int x, int y, int w, int h) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - if (x != -1) - { - constr->left.SetValue(x); - constr->left.SetDone(TRUE); - } - if (y != -1) - { - constr->top.SetValue(y); - constr->top.SetDone(TRUE); - } - if (w != -1) - { - constr->width.SetValue(w); - constr->width.SetDone(TRUE); - } - if (h != -1) - { - constr->height.SetValue(h); - constr->height.SetDone(TRUE); - } - } -} - -void wxWindow::MoveConstraint(int x, int y) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - if (x != -1) - { - constr->left.SetValue(x); - constr->left.SetDone(TRUE); - } - if (y != -1) - { - constr->top.SetValue(y); - constr->top.SetDone(TRUE); - } - } -} - -void wxWindow::GetSizeConstraint(int *w, int *h) const -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - *w = constr->width.GetValue(); - *h = constr->height.GetValue(); - } - else - GetSize(w, h); -} - -void wxWindow::GetClientSizeConstraint(int *w, int *h) const -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - *w = constr->width.GetValue(); - *h = constr->height.GetValue(); - } - else - GetClientSize(w, h); -} - -void wxWindow::GetPositionConstraint(int *x, int *y) const -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - *x = constr->left.GetValue(); - *y = constr->top.GetValue(); - } - else - GetPosition(x, y); -} - -bool wxWindow::Close(bool force) -{ - // Let's generalise it to work the same for any window. -/* - if (!IsKindOf(CLASSINFO(wxDialog)) && !IsKindOf(CLASSINFO(wxFrame))) - { - this->Destroy(); - return TRUE; - } -*/ - - wxCloseEvent event(wxEVT_CLOSE_WINDOW, m_windowId); - event.SetEventObject(this); - event.SetForce(force); - - return GetEventHandler()->ProcessEvent(event); - -/* - if ( !force && event.GetVeto() ) - return FALSE; - - Show(FALSE); - - if (!wxPendingDelete.Member(this)) - wxPendingDelete.Append(this); - - return TRUE; -*/ -} - -wxObject* wxWindow::GetChild(int number) const -{ - // Return a pointer to the Nth object in the Panel - if (!GetChildren()) - return(NULL) ; - wxNode *node = GetChildren()->First(); - int n = number; - while (node && n--) - node = node->Next() ; - if (node) - { - wxObject *obj = (wxObject *)node->Data(); - return(obj) ; - } - else - return NULL ; -} - -void wxWindow::OnDefaultAction(wxControl *initiatingItem) -{ -/* This is obsolete now; if we wish to intercept listbox double-clicks, - * we explicitly intercept the wxEVT_COMMAND_LISTBOX_DOUBLECLICKED - * event. - - if (initiatingItem->IsKindOf(CLASSINFO(wxListBox))) - { - wxListBox *lbox = (wxListBox *)initiatingItem; - wxCommandEvent event(wxEVT_COMMAND_LEFT_DCLICK); - event.m_commandInt = -1; - if ((lbox->GetWindowStyleFlag() & wxLB_MULTIPLE) == 0) - { - event.m_commandString = copystring(lbox->GetStringSelection()); - event.m_commandInt = lbox->GetSelection(); - event.m_clientData = lbox->wxListBox::GetClientData(event.m_commandInt); - } - event.m_eventObject = lbox; - - lbox->ProcessCommand(event); - - if (event.m_commandString) - delete[] event.m_commandString; - return; - } - - wxButton *but = GetDefaultItem(); - if (but) - { - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED); - event.SetEventObject(but); - but->Command(event); - } -*/ -} - -void wxWindow::Clear(void) -{ - wxClientDC dc(this); - wxBrush brush(GetBackgroundColour(), wxSOLID); - dc.SetBackground(brush); - dc.Clear(); -} - -// Fits the panel around the items -void wxWindow::Fit(void) -{ - int maxX = 0; - int maxY = 0; - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow *win = (wxWindow *)node->Data(); - int wx, wy, ww, wh; - win->GetPosition(&wx, &wy); - win->GetSize(&ww, &wh); - if ( wx + ww > maxX ) - maxX = wx + ww; - if ( wy + wh > maxY ) - maxY = wy + wh; - - node = node->Next(); - } - SetClientSize(maxX + 5, maxY + 5); -} - -void wxWindow::SetValidator(const wxValidator& validator) -{ - if ( m_windowValidator ) - delete m_windowValidator; - m_windowValidator = validator.Clone(); - - if ( m_windowValidator ) - m_windowValidator->SetWindow(this) ; -} - -// Find a window by id or name -wxWindow *wxWindow::FindWindow(long id) -{ - if ( GetId() == id) - return this; - - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow *child = (wxWindow *)node->Data(); - wxWindow *found = child->FindWindow(id); - if ( found ) - return found; - node = node->Next(); - } - return NULL; -} - -wxWindow *wxWindow::FindWindow(const wxString& name) -{ - if ( GetName() == name) - return this; - - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow *child = (wxWindow *)node->Data(); - wxWindow *found = child->FindWindow(name); - if ( found ) - return found; - node = node->Next(); - } - return NULL; -} - -/* TODO -// Default input behaviour for a scrolling canvas should be to scroll -// according to the cursor keys pressed -void wxWindow::OnChar(wxKeyEvent& event) -{ - int x_page = 0; - int y_page = 0; - int start_x = 0; - int start_y = 0; - // Bugfix Begin - int v_width = 0; - int v_height = 0; - int y_pages = 0; - // Bugfix End - - GetScrollUnitsPerPage(&x_page, &y_page); - // Bugfix Begin - GetVirtualSize(&v_width,&v_height); - // Bugfix End - ViewStart(&start_x, &start_y); - // Bugfix begin - if (vert_units) - y_pages = (int)(v_height/vert_units) - y_page; - -#ifdef __WXMSW__ - int y = 0; -#else - int y = y_page-1; -#endif - // Bugfix End - switch (event.keyCode) - { - case WXK_PRIOR: - { - // BugFix Begin - if (y_page > 0) - { - if (start_y - y_page > 0) - Scroll(start_x, start_y - y_page); - else - Scroll(start_x, 0); - } - // Bugfix End - break; - } - case WXK_NEXT: - { - // Bugfix Begin - if ((y_page > 0) && (start_y <= y_pages-y-1)) - { - if (y_pages + y < start_y + y_page) - Scroll(start_x, y_pages + y); - else - Scroll(start_x, start_y + y_page); - } - // Bugfix End - break; - } - case WXK_UP: - { - if ((y_page > 0) && (start_y >= 1)) - Scroll(start_x, start_y - 1); - break; - } - case WXK_DOWN: - { - // Bugfix Begin - if ((y_page > 0) && (start_y <= y_pages-y-1)) - // Bugfix End - { - Scroll(start_x, start_y + 1); - } - break; - } - case WXK_LEFT: - { - if ((x_page > 0) && (start_x >= 1)) - Scroll(start_x - 1, start_y); - break; - } - case WXK_RIGHT: - { - if (x_page > 0) - Scroll(start_x + 1, start_y); - break; - } - case WXK_HOME: - { - Scroll(0, 0); - break; - } - // This is new - case WXK_END: - { - Scroll(start_x, y_pages+y); - break; - } - // end - } -} -*/ - -// Setup background and foreground colours correctly -void wxWindow::SetupColours(void) -{ - if (GetParent()) - SetBackgroundColour(GetParent()->GetBackgroundColour()); -} - -void wxWindow::OnIdle(wxIdleEvent& event) -{ - // Check if we need to send a LEAVE event - if (m_mouseInWindow) - { - POINT pt; - ::GetCursorPos(&pt); - if (::WindowFromPoint(pt) != (HWND) GetHWND()) - { - // Generate a LEAVE event - m_mouseInWindow = FALSE; - - int state; - if (::GetKeyState(VK_SHIFT) != 0) - state |= MK_SHIFT; - if (::GetKeyState(VK_CONTROL) != 0) - state |= MK_CONTROL; - - // Unfortunately the mouse button and keyboard state may have changed - // by the time the OnIdle function is called, so 'state' may be - // meaningless. - - MSWOnMouseLeave(pt.x, pt.y, state); - } - } - UpdateWindowUI(); -} - -// Raise the window to the top of the Z order -void wxWindow::Raise(void) -{ - ::BringWindowToTop((HWND) GetHWND()); -} - -// Lower the window to the bottom of the Z order -void wxWindow::Lower(void) -{ - ::SetWindowPos((HWND) GetHWND(), HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE); -} - -long wxWindow::MSWGetDlgCode() -{ - // default: just forward to def window proc (the msg has no parameters) - return MSWDefWindowProc(WM_GETDLGCODE, 0, 0); -} - -bool wxWindow::AcceptsFocus() const -{ - return IsShown() && IsEnabled(); -} - -// Update region access -wxRegion wxWindow::GetUpdateRegion() const -{ - return m_updateRegion; -} - -bool wxWindow::IsExposed(int x, int y, int w, int h) const -{ - return (m_updateRegion.Contains(x, y, w, h) != wxOutRegion); -} - -bool wxWindow::IsExposed(const wxPoint& pt) const -{ - return (m_updateRegion.Contains(pt) != wxOutRegion); -} - -bool wxWindow::IsExposed(const wxRect& rect) const -{ - return (m_updateRegion.Contains(rect) != wxOutRegion); -} - -#ifdef __WXDEBUG__ -const char *wxGetMessageName(int message) -{ - switch ( message ) { - case 0x0000: return "WM_NULL"; - case 0x0001: return "WM_CREATE"; - case 0x0002: return "WM_DESTROY"; - case 0x0003: return "WM_MOVE"; - case 0x0005: return "WM_SIZE"; - case 0x0006: return "WM_ACTIVATE"; - case 0x0007: return "WM_SETFOCUS"; - case 0x0008: return "WM_KILLFOCUS"; - case 0x000A: return "WM_ENABLE"; - case 0x000B: return "WM_SETREDRAW"; - case 0x000C: return "WM_SETTEXT"; - case 0x000D: return "WM_GETTEXT"; - case 0x000E: return "WM_GETTEXTLENGTH"; - case 0x000F: return "WM_PAINT"; - case 0x0010: return "WM_CLOSE"; - case 0x0011: return "WM_QUERYENDSESSION"; - case 0x0012: return "WM_QUIT"; - case 0x0013: return "WM_QUERYOPEN"; - case 0x0014: return "WM_ERASEBKGND"; - case 0x0015: return "WM_SYSCOLORCHANGE"; - case 0x0016: return "WM_ENDSESSION"; - case 0x0017: return "WM_SYSTEMERROR"; - case 0x0018: return "WM_SHOWWINDOW"; - case 0x0019: return "WM_CTLCOLOR"; - case 0x001A: return "WM_WININICHANGE"; - case 0x001B: return "WM_DEVMODECHANGE"; - case 0x001C: return "WM_ACTIVATEAPP"; - case 0x001D: return "WM_FONTCHANGE"; - case 0x001E: return "WM_TIMECHANGE"; - case 0x001F: return "WM_CANCELMODE"; - case 0x0020: return "WM_SETCURSOR"; - case 0x0021: return "WM_MOUSEACTIVATE"; - case 0x0022: return "WM_CHILDACTIVATE"; - case 0x0023: return "WM_QUEUESYNC"; - case 0x0024: return "WM_GETMINMAXINFO"; - case 0x0026: return "WM_PAINTICON"; - case 0x0027: return "WM_ICONERASEBKGND"; - case 0x0028: return "WM_NEXTDLGCTL"; - case 0x002A: return "WM_SPOOLERSTATUS"; - case 0x002B: return "WM_DRAWITEM"; - case 0x002C: return "WM_MEASUREITEM"; - case 0x002D: return "WM_DELETEITEM"; - case 0x002E: return "WM_VKEYTOITEM"; - case 0x002F: return "WM_CHARTOITEM"; - case 0x0030: return "WM_SETFONT"; - case 0x0031: return "WM_GETFONT"; - case 0x0037: return "WM_QUERYDRAGICON"; - case 0x0039: return "WM_COMPAREITEM"; - case 0x0041: return "WM_COMPACTING"; - case 0x0044: return "WM_COMMNOTIFY"; - case 0x0046: return "WM_WINDOWPOSCHANGING"; - case 0x0047: return "WM_WINDOWPOSCHANGED"; - case 0x0048: return "WM_POWER"; - -#ifdef __WIN32__ - case 0x004A: return "WM_COPYDATA"; - case 0x004B: return "WM_CANCELJOURNAL"; - case 0x004E: return "WM_NOTIFY"; - case 0x0050: return "WM_INPUTLANGCHANGEREQUEST"; - case 0x0051: return "WM_INPUTLANGCHANGE"; - case 0x0052: return "WM_TCARD"; - case 0x0053: return "WM_HELP"; - case 0x0054: return "WM_USERCHANGED"; - case 0x0055: return "WM_NOTIFYFORMAT"; - case 0x007B: return "WM_CONTEXTMENU"; - case 0x007C: return "WM_STYLECHANGING"; - case 0x007D: return "WM_STYLECHANGED"; - case 0x007E: return "WM_DISPLAYCHANGE"; - case 0x007F: return "WM_GETICON"; - case 0x0080: return "WM_SETICON"; -#endif //WIN32 - - case 0x0081: return "WM_NCCREATE"; - case 0x0082: return "WM_NCDESTROY"; - case 0x0083: return "WM_NCCALCSIZE"; - case 0x0084: return "WM_NCHITTEST"; - case 0x0085: return "WM_NCPAINT"; - case 0x0086: return "WM_NCACTIVATE"; - case 0x0087: return "WM_GETDLGCODE"; - case 0x00A0: return "WM_NCMOUSEMOVE"; - case 0x00A1: return "WM_NCLBUTTONDOWN"; - case 0x00A2: return "WM_NCLBUTTONUP"; - case 0x00A3: return "WM_NCLBUTTONDBLCLK"; - case 0x00A4: return "WM_NCRBUTTONDOWN"; - case 0x00A5: return "WM_NCRBUTTONUP"; - case 0x00A6: return "WM_NCRBUTTONDBLCLK"; - case 0x00A7: return "WM_NCMBUTTONDOWN"; - case 0x00A8: return "WM_NCMBUTTONUP"; - case 0x00A9: return "WM_NCMBUTTONDBLCLK"; - case 0x0100: return "WM_KEYDOWN"; - case 0x0101: return "WM_KEYUP"; - case 0x0102: return "WM_CHAR"; - case 0x0103: return "WM_DEADCHAR"; - case 0x0104: return "WM_SYSKEYDOWN"; - case 0x0105: return "WM_SYSKEYUP"; - case 0x0106: return "WM_SYSCHAR"; - case 0x0107: return "WM_SYSDEADCHAR"; - case 0x0108: return "WM_KEYLAST"; - -#ifdef __WIN32__ - case 0x010D: return "WM_IME_STARTCOMPOSITION"; - case 0x010E: return "WM_IME_ENDCOMPOSITION"; - case 0x010F: return "WM_IME_COMPOSITION"; -#endif //WIN32 - - case 0x0110: return "WM_INITDIALOG"; - case 0x0111: return "WM_COMMAND"; - case 0x0112: return "WM_SYSCOMMAND"; - case 0x0113: return "WM_TIMER"; - case 0x0114: return "WM_HSCROLL"; - case 0x0115: return "WM_VSCROLL"; - case 0x0116: return "WM_INITMENU"; - case 0x0117: return "WM_INITMENUPOPUP"; - case 0x011F: return "WM_MENUSELECT"; - case 0x0120: return "WM_MENUCHAR"; - case 0x0121: return "WM_ENTERIDLE"; - case 0x0200: return "WM_MOUSEMOVE"; - case 0x0201: return "WM_LBUTTONDOWN"; - case 0x0202: return "WM_LBUTTONUP"; - case 0x0203: return "WM_LBUTTONDBLCLK"; - case 0x0204: return "WM_RBUTTONDOWN"; - case 0x0205: return "WM_RBUTTONUP"; - case 0x0206: return "WM_RBUTTONDBLCLK"; - case 0x0207: return "WM_MBUTTONDOWN"; - case 0x0208: return "WM_MBUTTONUP"; - case 0x0209: return "WM_MBUTTONDBLCLK"; - case 0x0210: return "WM_PARENTNOTIFY"; - case 0x0211: return "WM_ENTERMENULOOP"; - case 0x0212: return "WM_EXITMENULOOP"; - -#ifdef __WIN32__ - case 0x0213: return "WM_NEXTMENU"; - case 0x0214: return "WM_SIZING"; - case 0x0215: return "WM_CAPTURECHANGED"; - case 0x0216: return "WM_MOVING"; - case 0x0218: return "WM_POWERBROADCAST"; - case 0x0219: return "WM_DEVICECHANGE"; -#endif //WIN32 - - case 0x0220: return "WM_MDICREATE"; - case 0x0221: return "WM_MDIDESTROY"; - case 0x0222: return "WM_MDIACTIVATE"; - case 0x0223: return "WM_MDIRESTORE"; - case 0x0224: return "WM_MDINEXT"; - case 0x0225: return "WM_MDIMAXIMIZE"; - case 0x0226: return "WM_MDITILE"; - case 0x0227: return "WM_MDICASCADE"; - case 0x0228: return "WM_MDIICONARRANGE"; - case 0x0229: return "WM_MDIGETACTIVE"; - case 0x0230: return "WM_MDISETMENU"; - case 0x0233: return "WM_DROPFILES"; - -#ifdef __WIN32__ - case 0x0281: return "WM_IME_SETCONTEXT"; - case 0x0282: return "WM_IME_NOTIFY"; - case 0x0283: return "WM_IME_CONTROL"; - case 0x0284: return "WM_IME_COMPOSITIONFULL"; - case 0x0285: return "WM_IME_SELECT"; - case 0x0286: return "WM_IME_CHAR"; - case 0x0290: return "WM_IME_KEYDOWN"; - case 0x0291: return "WM_IME_KEYUP"; -#endif //WIN32 - - case 0x0300: return "WM_CUT"; - case 0x0301: return "WM_COPY"; - case 0x0302: return "WM_PASTE"; - case 0x0303: return "WM_CLEAR"; - case 0x0304: return "WM_UNDO"; - case 0x0305: return "WM_RENDERFORMAT"; - case 0x0306: return "WM_RENDERALLFORMATS"; - case 0x0307: return "WM_DESTROYCLIPBOARD"; - case 0x0308: return "WM_DRAWCLIPBOARD"; - case 0x0309: return "WM_PAINTCLIPBOARD"; - case 0x030A: return "WM_VSCROLLCLIPBOARD"; - case 0x030B: return "WM_SIZECLIPBOARD"; - case 0x030C: return "WM_ASKCBFORMATNAME"; - case 0x030D: return "WM_CHANGECBCHAIN"; - case 0x030E: return "WM_HSCROLLCLIPBOARD"; - case 0x030F: return "WM_QUERYNEWPALETTE"; - case 0x0310: return "WM_PALETTEISCHANGING"; - case 0x0311: return "WM_PALETTECHANGED"; - -#ifdef __WIN32__ - // common controls messages - although they're not strictly speaking - // standard, it's nice to decode them nevertheless - - // listview - case 0x1000 + 0: return "LVM_GETBKCOLOR"; - case 0x1000 + 1: return "LVM_SETBKCOLOR"; - case 0x1000 + 2: return "LVM_GETIMAGELIST"; - case 0x1000 + 3: return "LVM_SETIMAGELIST"; - case 0x1000 + 4: return "LVM_GETITEMCOUNT"; - case 0x1000 + 5: return "LVM_GETITEMA"; - case 0x1000 + 75: return "LVM_GETITEMW"; - case 0x1000 + 6: return "LVM_SETITEMA"; - case 0x1000 + 76: return "LVM_SETITEMW"; - case 0x1000 + 7: return "LVM_INSERTITEMA"; - case 0x1000 + 77: return "LVM_INSERTITEMW"; - case 0x1000 + 8: return "LVM_DELETEITEM"; - case 0x1000 + 9: return "LVM_DELETEALLITEMS"; - case 0x1000 + 10: return "LVM_GETCALLBACKMASK"; - case 0x1000 + 11: return "LVM_SETCALLBACKMASK"; - case 0x1000 + 12: return "LVM_GETNEXTITEM"; - case 0x1000 + 13: return "LVM_FINDITEMA"; - case 0x1000 + 83: return "LVM_FINDITEMW"; - case 0x1000 + 14: return "LVM_GETITEMRECT"; - case 0x1000 + 15: return "LVM_SETITEMPOSITION"; - case 0x1000 + 16: return "LVM_GETITEMPOSITION"; - case 0x1000 + 17: return "LVM_GETSTRINGWIDTHA"; - case 0x1000 + 87: return "LVM_GETSTRINGWIDTHW"; - case 0x1000 + 18: return "LVM_HITTEST"; - case 0x1000 + 19: return "LVM_ENSUREVISIBLE"; - case 0x1000 + 20: return "LVM_SCROLL"; - case 0x1000 + 21: return "LVM_REDRAWITEMS"; - case 0x1000 + 22: return "LVM_ARRANGE"; - case 0x1000 + 23: return "LVM_EDITLABELA"; - case 0x1000 + 118: return "LVM_EDITLABELW"; - case 0x1000 + 24: return "LVM_GETEDITCONTROL"; - case 0x1000 + 25: return "LVM_GETCOLUMNA"; - case 0x1000 + 95: return "LVM_GETCOLUMNW"; - case 0x1000 + 26: return "LVM_SETCOLUMNA"; - case 0x1000 + 96: return "LVM_SETCOLUMNW"; - case 0x1000 + 27: return "LVM_INSERTCOLUMNA"; - case 0x1000 + 97: return "LVM_INSERTCOLUMNW"; - case 0x1000 + 28: return "LVM_DELETECOLUMN"; - case 0x1000 + 29: return "LVM_GETCOLUMNWIDTH"; - case 0x1000 + 30: return "LVM_SETCOLUMNWIDTH"; - case 0x1000 + 31: return "LVM_GETHEADER"; - case 0x1000 + 33: return "LVM_CREATEDRAGIMAGE"; - case 0x1000 + 34: return "LVM_GETVIEWRECT"; - case 0x1000 + 35: return "LVM_GETTEXTCOLOR"; - case 0x1000 + 36: return "LVM_SETTEXTCOLOR"; - case 0x1000 + 37: return "LVM_GETTEXTBKCOLOR"; - case 0x1000 + 38: return "LVM_SETTEXTBKCOLOR"; - case 0x1000 + 39: return "LVM_GETTOPINDEX"; - case 0x1000 + 40: return "LVM_GETCOUNTPERPAGE"; - case 0x1000 + 41: return "LVM_GETORIGIN"; - case 0x1000 + 42: return "LVM_UPDATE"; - case 0x1000 + 43: return "LVM_SETITEMSTATE"; - case 0x1000 + 44: return "LVM_GETITEMSTATE"; - case 0x1000 + 45: return "LVM_GETITEMTEXTA"; - case 0x1000 + 115: return "LVM_GETITEMTEXTW"; - case 0x1000 + 46: return "LVM_SETITEMTEXTA"; - case 0x1000 + 116: return "LVM_SETITEMTEXTW"; - case 0x1000 + 47: return "LVM_SETITEMCOUNT"; - case 0x1000 + 48: return "LVM_SORTITEMS"; - case 0x1000 + 49: return "LVM_SETITEMPOSITION32"; - case 0x1000 + 50: return "LVM_GETSELECTEDCOUNT"; - case 0x1000 + 51: return "LVM_GETITEMSPACING"; - case 0x1000 + 52: return "LVM_GETISEARCHSTRINGA"; - case 0x1000 + 117: return "LVM_GETISEARCHSTRINGW"; - case 0x1000 + 53: return "LVM_SETICONSPACING"; - case 0x1000 + 54: return "LVM_SETEXTENDEDLISTVIEWSTYLE"; - case 0x1000 + 55: return "LVM_GETEXTENDEDLISTVIEWSTYLE"; - case 0x1000 + 56: return "LVM_GETSUBITEMRECT"; - case 0x1000 + 57: return "LVM_SUBITEMHITTEST"; - case 0x1000 + 58: return "LVM_SETCOLUMNORDERARRAY"; - case 0x1000 + 59: return "LVM_GETCOLUMNORDERARRAY"; - case 0x1000 + 60: return "LVM_SETHOTITEM"; - case 0x1000 + 61: return "LVM_GETHOTITEM"; - case 0x1000 + 62: return "LVM_SETHOTCURSOR"; - case 0x1000 + 63: return "LVM_GETHOTCURSOR"; - case 0x1000 + 64: return "LVM_APPROXIMATEVIEWRECT"; - case 0x1000 + 65: return "LVM_SETWORKAREA"; - - // tree view - case 0x1100 + 0: return "TVM_INSERTITEMA"; - case 0x1100 + 50: return "TVM_INSERTITEMW"; - case 0x1100 + 1: return "TVM_DELETEITEM"; - case 0x1100 + 2: return "TVM_EXPAND"; - case 0x1100 + 4: return "TVM_GETITEMRECT"; - case 0x1100 + 5: return "TVM_GETCOUNT"; - case 0x1100 + 6: return "TVM_GETINDENT"; - case 0x1100 + 7: return "TVM_SETINDENT"; - case 0x1100 + 8: return "TVM_GETIMAGELIST"; - case 0x1100 + 9: return "TVM_SETIMAGELIST"; - case 0x1100 + 10: return "TVM_GETNEXTITEM"; - case 0x1100 + 11: return "TVM_SELECTITEM"; - case 0x1100 + 12: return "TVM_GETITEMA"; - case 0x1100 + 62: return "TVM_GETITEMW"; - case 0x1100 + 13: return "TVM_SETITEMA"; - case 0x1100 + 63: return "TVM_SETITEMW"; - case 0x1100 + 14: return "TVM_EDITLABELA"; - case 0x1100 + 65: return "TVM_EDITLABELW"; - case 0x1100 + 15: return "TVM_GETEDITCONTROL"; - case 0x1100 + 16: return "TVM_GETVISIBLECOUNT"; - case 0x1100 + 17: return "TVM_HITTEST"; - case 0x1100 + 18: return "TVM_CREATEDRAGIMAGE"; - case 0x1100 + 19: return "TVM_SORTCHILDREN"; - case 0x1100 + 20: return "TVM_ENSUREVISIBLE"; - case 0x1100 + 21: return "TVM_SORTCHILDRENCB"; - case 0x1100 + 22: return "TVM_ENDEDITLABELNOW"; - case 0x1100 + 23: return "TVM_GETISEARCHSTRINGA"; - case 0x1100 + 64: return "TVM_GETISEARCHSTRINGW"; - case 0x1100 + 24: return "TVM_SETTOOLTIPS"; - case 0x1100 + 25: return "TVM_GETTOOLTIPS"; - - // header - case 0x1200 + 0: return "HDM_GETITEMCOUNT"; - case 0x1200 + 1: return "HDM_INSERTITEMA"; - case 0x1200 + 10: return "HDM_INSERTITEMW"; - case 0x1200 + 2: return "HDM_DELETEITEM"; - case 0x1200 + 3: return "HDM_GETITEMA"; - case 0x1200 + 11: return "HDM_GETITEMW"; - case 0x1200 + 4: return "HDM_SETITEMA"; - case 0x1200 + 12: return "HDM_SETITEMW"; - case 0x1200 + 5: return "HDM_LAYOUT"; - case 0x1200 + 6: return "HDM_HITTEST"; - case 0x1200 + 7: return "HDM_GETITEMRECT"; - case 0x1200 + 8: return "HDM_SETIMAGELIST"; - case 0x1200 + 9: return "HDM_GETIMAGELIST"; - case 0x1200 + 15: return "HDM_ORDERTOINDEX"; - case 0x1200 + 16: return "HDM_CREATEDRAGIMAGE"; - case 0x1200 + 17: return "HDM_GETORDERARRAY"; - case 0x1200 + 18: return "HDM_SETORDERARRAY"; - case 0x1200 + 19: return "HDM_SETHOTDIVIDER"; - - // tab control - case 0x1300 + 2: return "TCM_GETIMAGELIST"; - case 0x1300 + 3: return "TCM_SETIMAGELIST"; - case 0x1300 + 4: return "TCM_GETITEMCOUNT"; - case 0x1300 + 5: return "TCM_GETITEMA"; - case 0x1300 + 60: return "TCM_GETITEMW"; - case 0x1300 + 6: return "TCM_SETITEMA"; - case 0x1300 + 61: return "TCM_SETITEMW"; - case 0x1300 + 7: return "TCM_INSERTITEMA"; - case 0x1300 + 62: return "TCM_INSERTITEMW"; - case 0x1300 + 8: return "TCM_DELETEITEM"; - case 0x1300 + 9: return "TCM_DELETEALLITEMS"; - case 0x1300 + 10: return "TCM_GETITEMRECT"; - case 0x1300 + 11: return "TCM_GETCURSEL"; - case 0x1300 + 12: return "TCM_SETCURSEL"; - case 0x1300 + 13: return "TCM_HITTEST"; - case 0x1300 + 14: return "TCM_SETITEMEXTRA"; - case 0x1300 + 40: return "TCM_ADJUSTRECT"; - case 0x1300 + 41: return "TCM_SETITEMSIZE"; - case 0x1300 + 42: return "TCM_REMOVEIMAGE"; - case 0x1300 + 43: return "TCM_SETPADDING"; - case 0x1300 + 44: return "TCM_GETROWCOUNT"; - case 0x1300 + 45: return "TCM_GETTOOLTIPS"; - case 0x1300 + 46: return "TCM_SETTOOLTIPS"; - case 0x1300 + 47: return "TCM_GETCURFOCUS"; - case 0x1300 + 48: return "TCM_SETCURFOCUS"; - case 0x1300 + 49: return "TCM_SETMINTABWIDTH"; - case 0x1300 + 50: return "TCM_DESELECTALL"; - - // toolbar - case WM_USER+1: return "TB_ENABLEBUTTON"; - case WM_USER+2: return "TB_CHECKBUTTON"; - case WM_USER+3: return "TB_PRESSBUTTON"; - case WM_USER+4: return "TB_HIDEBUTTON"; - case WM_USER+5: return "TB_INDETERMINATE"; - case WM_USER+9: return "TB_ISBUTTONENABLED"; - case WM_USER+10: return "TB_ISBUTTONCHECKED"; - case WM_USER+11: return "TB_ISBUTTONPRESSED"; - case WM_USER+12: return "TB_ISBUTTONHIDDEN"; - case WM_USER+13: return "TB_ISBUTTONINDETERMINATE"; - case WM_USER+17: return "TB_SETSTATE"; - case WM_USER+18: return "TB_GETSTATE"; - case WM_USER+19: return "TB_ADDBITMAP"; - case WM_USER+20: return "TB_ADDBUTTONS"; - case WM_USER+21: return "TB_INSERTBUTTON"; - case WM_USER+22: return "TB_DELETEBUTTON"; - case WM_USER+23: return "TB_GETBUTTON"; - case WM_USER+24: return "TB_BUTTONCOUNT"; - case WM_USER+25: return "TB_COMMANDTOINDEX"; - case WM_USER+26: return "TB_SAVERESTOREA"; - case WM_USER+76: return "TB_SAVERESTOREW"; - case WM_USER+27: return "TB_CUSTOMIZE"; - case WM_USER+28: return "TB_ADDSTRINGA"; - case WM_USER+77: return "TB_ADDSTRINGW"; - case WM_USER+29: return "TB_GETITEMRECT"; - case WM_USER+30: return "TB_BUTTONSTRUCTSIZE"; - case WM_USER+31: return "TB_SETBUTTONSIZE"; - case WM_USER+32: return "TB_SETBITMAPSIZE"; - case WM_USER+33: return "TB_AUTOSIZE"; - case WM_USER+35: return "TB_GETTOOLTIPS"; - case WM_USER+36: return "TB_SETTOOLTIPS"; - case WM_USER+37: return "TB_SETPARENT"; - case WM_USER+39: return "TB_SETROWS"; - case WM_USER+40: return "TB_GETROWS"; - case WM_USER+42: return "TB_SETCMDID"; - case WM_USER+43: return "TB_CHANGEBITMAP"; - case WM_USER+44: return "TB_GETBITMAP"; - case WM_USER+45: return "TB_GETBUTTONTEXTA"; - case WM_USER+75: return "TB_GETBUTTONTEXTW"; - case WM_USER+46: return "TB_REPLACEBITMAP"; - case WM_USER+47: return "TB_SETINDENT"; - case WM_USER+48: return "TB_SETIMAGELIST"; - case WM_USER+49: return "TB_GETIMAGELIST"; - case WM_USER+50: return "TB_LOADIMAGES"; - case WM_USER+51: return "TB_GETRECT"; - case WM_USER+52: return "TB_SETHOTIMAGELIST"; - case WM_USER+53: return "TB_GETHOTIMAGELIST"; - case WM_USER+54: return "TB_SETDISABLEDIMAGELIST"; - case WM_USER+55: return "TB_GETDISABLEDIMAGELIST"; - case WM_USER+56: return "TB_SETSTYLE"; - case WM_USER+57: return "TB_GETSTYLE"; - case WM_USER+58: return "TB_GETBUTTONSIZE"; - case WM_USER+59: return "TB_SETBUTTONWIDTH"; - case WM_USER+60: return "TB_SETMAXTEXTROWS"; - case WM_USER+61: return "TB_GETTEXTROWS"; - case WM_USER+41: return "TB_GETBITMAPFLAGS"; - -#endif //WIN32 - - default: - static char s_szBuf[128]; - sprintf(s_szBuf, "", message); - return s_szBuf; - } -} -#endif //WXDEBUG \ No newline at end of file diff --git a/src/msw/wx.def b/src/msw/wx.def deleted file mode 100644 index 28df1caa12..0000000000 --- a/src/msw/wx.def +++ /dev/null @@ -1,11 +0,0 @@ -LIBRARY WX - -DESCRIPTION "wxWindows DLL" - -VERSION 1.0 - -CODE READ SHARED EXECUTE -DATA READ WRITE - - - diff --git a/src/msw/xfspline.inc b/src/msw/xfspline.inc deleted file mode 100644 index 792cf3e23f..0000000000 --- a/src/msw/xfspline.inc +++ /dev/null @@ -1,355 +0,0 @@ -/* - * File: xfspline.cc - * Purpose: - * Author: Julian Smart - * Created: 1993 - * Updated: August 1994 - * RCS_ID: $Id$ - * Copyright: (c) 1993, AIAI, University of Edinburgh - */ - -// Must be a comment as this file is #include\'d by wb_dc.cc -/* static const char sccsid[] = "@(#)xfspline.cc 1.3 5/9/94"; */ - -/* - * FIG : Facility for Interactive Generation of figures - * Copyright (c) 1985 by Supoj Sutanthavibul - */ - - -#if USE_SPLINES - -////#define wx_round(a) (int)((a)+.5) -//#define wx_round(a) (a) - -class wxSpline: public wxObject -{ - public: - int type; - wxList *points; - - wxSpline(wxList *list); - void DeletePoints(void); - - // Doesn't delete points - ~wxSpline(void); -}; - -void wx_draw_open_spline(wxDC *dc, wxSpline *spline); - -#if USE_POSTSCRIPT -void wx_draw_open_spline_ps(wxPostScriptDC *dc, wxSpline *s); -#endif - -void wx_quadratic_spline(double a1, double b1, double a2, double b2, - double a3, double b3, double a4, double b4); -void wx_clear_stack(void); -int wx_spline_pop(double *x1, double *y1, double *x2, double *y2, double *x3, - double *y3, double *x4, double *y4); -void wx_spline_push(double x1, double y1, double x2, double y2, double x3, double y3, - double x4, double y4); -static bool wx_spline_add_point(double x, double y); -static void wx_spline_draw_point_array(wxDC *dc); -wxSpline *wx_make_spline(int x1, int y1, int x2, int y2, int x3, int y3); - -void wxDC::DrawSpline(int n, wxPoint points[]) -{ - wxList list; - int i; - for (i =0; i < n; i++) - list.Append((wxObject*)&points[i]); - DrawSpline((wxList *)&list); -} - -void wxDC::DrawSpline(wxList *list) -{ - wxSpline spline(list); - - wx_draw_open_spline(this, &spline); -} - - -wxList wx_spline_point_list; - -void wx_draw_open_spline(wxDC *dc, wxSpline *spline) -{ - wxPoint *p; - double cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4; - double x1, y1, x2, y2; - - wxNode *node = spline->points->First(); - p = (wxPoint *)node->Data(); - - x1 = p->x; - y1 = p->y; - - node = node->Next(); - p = (wxPoint *)node->Data(); - - x2 = p->x; - y2 = p->y; - cx1 = (double)((x1 + x2) / 2); - cy1 = (double)((y1 + y2) / 2); - cx2 = (double)((cx1 + x2) / 2); - cy2 = (double)((cy1 + y2) / 2); - - wx_spline_add_point(x1, y1); - - while ((node = node->Next()) != NULL) - { - p = (wxPoint *)node->Data(); - x1 = x2; - y1 = y2; - x2 = p->x; - y2 = p->y; - cx4 = (double)(x1 + x2) / 2; - cy4 = (double)(y1 + y2) / 2; - cx3 = (double)(x1 + cx4) / 2; - cy3 = (double)(y1 + cy4) / 2; - - wx_quadratic_spline(cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4); - - cx1 = cx4; - cy1 = cy4; - cx2 = (double)(cx1 + x2) / 2; - cy2 = (double)(cy1 + y2) / 2; - } - - wx_spline_add_point((double)wx_round(cx1), (double)wx_round(cy1)); - wx_spline_add_point(x2, y2); - - wx_spline_draw_point_array(dc); - -} - -#if USE_POSTSCRIPT -void wx_draw_open_spline_ps(wxPostScriptDC *dc, wxSpline *s) -{ - double a, b, c, d, x1, y1, x2, y2, x3, y3; - wxPoint *p, *q; - wxNode *node = s->points->First(); - p = (wxPoint *)node->Data(); - - x1 = p->x; y1 = p->y; - - node = node->Next(); - p = (wxPoint *)node->Data(); - c = p->x; d = p->y; - x3 = a = (double)(x1 + c) / 2; - y3 = b = (double)(y1 + d) / 2; - - *(dc->GetStream()) << "newpath " << x1 << " " << dc->GetYOrigin() - y1 << " moveto " << x3 << " " << dc->GetYOrigin() - y3; - *(dc->GetStream()) << " lineto\n"; - dc->CalcBoundingBox((double)x1, (double)(dc->GetYOrigin() - y1)); - dc->CalcBoundingBox((double)x3, (double)(dc->GetYOrigin() - y3)); - - while ((node = node->Next()) != NULL) - { - q = (wxPoint *)node->Data(); - - x1 = x3; y1 = y3; - x2 = c; y2 = d; - c = q->x; d = q->y; - x3 = (double)(x2 + c) / 2; - y3 = (double)(y2 + d) / 2; - *(dc->GetStream()) << x1 << " " << dc->GetYOrigin() - y1 << " " << x2 << " " << dc->GetYOrigin() - y2 << " "; - *(dc->GetStream()) << x3 << " " << dc->GetYOrigin() - y3 << " DrawSplineSection\n"; - - dc->CalcBoundingBox((double)x1, (double)(dc->GetYOrigin() - y1)); - dc->CalcBoundingBox((double)x3, (double)(dc->GetYOrigin() - y3)); - } - /* - * At this point, (x2,y2) and (c,d) are the position of the - * next-to-last and last point respectively, in the point list - */ - *(dc->GetStream()) << c << " " << dc->GetYOrigin() - d << " lineto stroke\n"; -} -#endif - -/********************* CURVES FOR SPLINES ***************************** - - The following spline drawing routine is from - - "An Algorithm for High-Speed Curve Generation" - by George Merrill Chaikin, - Computer Graphics and Image Processing, 3, Academic Press, - 1974, 346-349. - - and - - "On Chaikin's Algorithm" by R. F. Riesenfeld, - Computer Graphics and Image Processing, 4, Academic Press, - 1975, 304-310. - -***********************************************************************/ - -#define half(z1, z2) ((z1+z2)/2.0) -#define THRESHOLD 5 - -/* iterative version */ - -void wx_quadratic_spline(double a1, double b1, double a2, double b2, double a3, double b3, double a4, - double b4) -{ - register double xmid, ymid; - double x1, y1, x2, y2, x3, y3, x4, y4; - - wx_clear_stack(); - wx_spline_push(a1, b1, a2, b2, a3, b3, a4, b4); - - while (wx_spline_pop(&x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4)) { - xmid = (double)half(x2, x3); - ymid = (double)half(y2, y3); - if (fabs(x1 - xmid) < THRESHOLD && fabs(y1 - ymid) < THRESHOLD && - fabs(xmid - x4) < THRESHOLD && fabs(ymid - y4) < THRESHOLD) { - wx_spline_add_point((double)wx_round(x1), (double)wx_round(y1)); - wx_spline_add_point((double)wx_round(xmid), (double)wx_round(ymid)); - } else { - wx_spline_push(xmid, ymid, (double)half(xmid, x3), (double)half(ymid, y3), - (double)half(x3, x4), (double)half(y3, y4), x4, y4); - wx_spline_push(x1, y1, (double)half(x1, x2), (double)half(y1, y2), - (double)half(x2, xmid), (double)half(y2, ymid), xmid, ymid); - } - } -} - - -/* utilities used by spline drawing routines */ - - -typedef struct wx_spline_stack_struct { - double x1, y1, x2, y2, x3, y3, x4, y4; -} - Stack; - -#define SPLINE_STACK_DEPTH 20 -static Stack wx_spline_stack[SPLINE_STACK_DEPTH]; -static Stack *wx_stack_top; -static int wx_stack_count; - -void wx_clear_stack(void) -{ - wx_stack_top = wx_spline_stack; - wx_stack_count = 0; -} - -void wx_spline_push(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) -{ - wx_stack_top->x1 = x1; - wx_stack_top->y1 = y1; - wx_stack_top->x2 = x2; - wx_stack_top->y2 = y2; - wx_stack_top->x3 = x3; - wx_stack_top->y3 = y3; - wx_stack_top->x4 = x4; - wx_stack_top->y4 = y4; - wx_stack_top++; - wx_stack_count++; -} - -int wx_spline_pop(double *x1, double *y1, double *x2, double *y2, - double *x3, double *y3, double *x4, double *y4) -{ - if (wx_stack_count == 0) - return (0); - wx_stack_top--; - wx_stack_count--; - *x1 = wx_stack_top->x1; - *y1 = wx_stack_top->y1; - *x2 = wx_stack_top->x2; - *y2 = wx_stack_top->y2; - *x3 = wx_stack_top->x3; - *y3 = wx_stack_top->y3; - *x4 = wx_stack_top->x4; - *y4 = wx_stack_top->y4; - return (1); -} - -static bool wx_spline_add_point(double x, double y) -{ - wxPoint *point = new wxPoint ; - point->x = (int) x; - point->y = (int) y; - wx_spline_point_list.Append((wxObject*)point); - return TRUE; -} - -static void wx_spline_draw_point_array(wxDC *dc) -{ - dc->DrawLines(&wx_spline_point_list, (double)0.0, (double)0.0); - wxNode *node = wx_spline_point_list.First(); - while (node) - { - wxPoint *point = (wxPoint *)node->Data(); - delete point; - delete node; - node = wx_spline_point_list.First(); - } -} - -wxSpline::wxSpline(wxList *list) -{ - points = list; -} - -wxSpline::~wxSpline(void) -{ -} - -void wxSpline::DeletePoints(void) -{ - for(wxNode *node = points->First(); node; node = points->First()) - { - wxPoint *point = (wxPoint *)node->Data(); - delete point; - delete node; - } - delete points; -} - -#if USE_POSTSCRIPT - -// Make a 3-point spline -void wxPostScriptDC::DrawSpline(long x1, long y1, long x2, long y2, long x3, long y3) -{ - wxList *point_list = new wxList; - - wxPoint *point1 = new wxPoint; - point1->x = x1; point1->y = y1; - point_list->Append((wxObject*)point1); - - wxPoint *point2 = new wxPoint; - point2->x = x2; point2->y = y2; - point_list->Append((wxObject*)point2); - - wxPoint *point3 = new wxPoint; - point3->x = x3; point3->y = y3; - point_list->Append((wxObject*)point3); - - wxSpline spline(point_list); - - wx_draw_open_spline_ps(this, &spline); - spline.DeletePoints(); -} - -void wxPostScriptDC::DrawSpline(wxList *list) -{ - wxSpline spline(list); - - wx_draw_open_spline_ps(this, &spline); -} - -void wxPostScriptDC::DrawSpline(int n, wxPoint points[]) -{ - wxList list; - int i; - for (i =0; i < n; i++) - list.Append((wxObject*)&points[i]); - DrawSpline((wxList *)&list); -} - - -#endif // USE_POSTSCRIPT - -#endif // USE_SPLINES - diff --git a/src/ntwxwin.mak b/src/ntwxwin.mak deleted file mode 100644 index 39bc88294f..0000000000 --- a/src/ntwxwin.mak +++ /dev/null @@ -1,175 +0,0 @@ -# -# File: ntwxwin.env -# Author: Ulrich Leodolter -# Created: Wed May 17 08:36:42 1995 -# Updated: -# -# MSVC++ 32-bit makefile include file -# -!include - -WIN95=1 - -!if "$(WIN95)" == "0" -# With 3.50, Win95 will use your existing icons to show smaller ones. -# With 4.0, you'll have to follow Win95 procedures for icons or you'll get the -# default Windows icon. -APPVER=3.50 -WINVERSION=-DWINVER=0x0350 # Generic WIN32 -!else -APPVER=3.50 # 4.0 -# This means 'enable Windows 95 features' (in wxWindows and in VC++ 4.0). -WINVERSION=-DWINVER=0x0400 /D__WIN95__ -!endif - -# On Alpha machines, change to CPU=ALPHA -CPU=i386 - -# Suffixes -OBJSUFF=obj -SRCSUFF=cpp - -WINFLAGS=-c -W3 -Dtry=__try -Dexcept=__except -Dleave=__leave -Dfinally=__finally -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -D_X86_=1 -DWIN32 -D__WIN32__ $(WINVERSION) -#WINLINKFLAGS=/NODEFAULTLIB /INCREMENTAL:NO /NOLOGO -align:0x1000 -machine:$(CPU) -subsystem:windows,$(APPVER) -WINLINKFLAGS=/INCREMENTAL:NO /NOLOGO -align:0x1000 -machine:$(CPU) -subsystem:windows,$(APPVER) -#WINLIBS=kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib libc.lib oldnames.lib\ -# comctl32.lib ctl3d32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib # libci.lib # libci.lib required for VC++ 4.2 -WINLIBS=kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib oldnames.lib\ - comctl32.lib ctl3d32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib # libci.lib # libci.lib required for VC++ 4.2 - -# Change this to your WXWIN directory -WXDIR=$(WXWIN) - -WXSRC=$(WXDIR)\src\msw -WXINC=$(WXDIR)\include -WXBASESRC=$(WXDIR)\src\common - -##################################################################### -# These are the possible DLL/non-DLL usages: -# -# Type _DLL/_WINDLL WXUSINGDLL WXMAKINGDLL Library -#-------------------------------------------------------------------- -# Normal application - - - wx.lib -# -# wxWin as DLL Defined - Defined wx200.lib -# -# App using wxWin DLL - Defined - wx200.lib -# -# App built as one DLL Defined - - wx.lib -# -###################################################################### -# -# Compiling your app: -#-------------------- -# when compiling an app to use the DLL version of wxWindows -# (but not to be a DLL itself), set WXUSINGDLL to 1 in your -# makefile just before including ntwxwin.mak. -# To compile wxWin _and_ app itself as a DLL, set DLL to 1 -# in ntwxwin.mak, and do not set WXUSINGDLL. -# -# Compiling wxWindows: -#--------------------- -# Use the dll target to compile wxWindows as DLL; then make 'pch' -# to generate a precompiled header for your apps to use. BUG: must compile without -# wxExpr (USE_WX_RESOURCES = 0) for this to link properly. Don't know why yet. -# Use the dllapp target to compile wxWindows for making a DLL app (not implemented yet) - -#DLL=0 - -!if "$(WXUSINGDLL)" == "1" || "$(WXMAKINGDLL)" == "1" -WXLIB=$(WXDIR)\lib\wx200.lib -!else -WXLIB=$(WXDIR)\lib\wx.lib -!endif - -!if "$(WXUSINGDLL)" == "1" -EXTRADLLFLAGS=/DWXUSINGDLL=1 -!endif - -!if "$(WXMAKINGDLL)" == "1" -EXTRADLLFLAGS=/DWXMAKINGDLL=1 -!endif - -!if "$(WXMAKINGDLL)" == "0" && "$(DLL)" == "1" -EXTRADLLFLAGS= -!endif - -!if "$(NOMAIN)" == "1" -EXTRADLLFLAGS=$(EXTRADLLFLAGS) /DNOMAIN -!endif - -INC=-I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(EXTRAINC) -LIBS = $(EXTRALIBS) $(WXLIB) $(WINLIBS) - -!ifndef FINAL -FINAL=0 -DEBUG=1 -!endif - -!ifndef DLL -DLL=0 -!endif - -# Set this to 1 if you don't want to use precompiled headers -!ifndef NOPCH -NOPCH=0 -!endif - -MAKEPRECOMP=/YcWX/WXPREC.H -OPTIONS= - -!if "$(FINAL)" == "0" -OPT = /Od /Gy -# ***N.B.*** to save space/time, comment out /FR to avoid browse info (.sbr files) being generated -DEBUG_FLAGS= /Zi # /FR -LINK_DEBUG_FLAGS=-debug:full -debugtype:cv # /PDB:NONE -CRTFLAG=/MD -!else -# /O1 - smallest code -# /O2 - fastest code -OPT = /O1 # /O2 # /Od -DEBUG_FLAGS= -LINK_DEBUG_FLAGS=/RELEASE -CRTFLAG=/MD -!endif - -!if "$(DLL)" == "0" - -!if "$(NOPCH)" == "1" -PCH= -PRECOMP= -MAKEPRECOMP= -!else -PCH=WX.PCH -PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\src\msw\$(PCH) /Fd$(WXDIR)\lib\wx.pdb -MAKEPRECOMP=/YcWX/WXPREC.H -!endif - -CPPFLAGS=$(WINFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) /D__WXMSW__ /DDEBUG=1 $(INC) $(OPT) $(EXTRADLLFLAGS) $(CRTFLAG) /D__WINDOWS__ /GX /D__WXDEBUG__ /DWXDEBUG=1 /DSTRICT -# If you don't include wxprec.h, use CPPFLAGS2 -CPPFLAGS2=$(WINFLAGS) $(DEBUG_FLAGS) /D__WXMSW__ /DDEBUG=1 $(INC) $(EXTRAFLAGS) $(OPT) $(EXTRADLLFLAGS) $(CRTFLAG) /D__WINDOWS__ /GX /D__WXDEBUG__ /DWXDEBUG=1 /DSTRICT -LINKFLAGS=$(LINK_DEBUG_FLAGS) $(WINLINKFLAGS) -entry:WinMainCRTStartup -DUMMY=dummy - -!else - -!if "$(WXMAKINGDLL)" == "1" -PCH=WXDLL.PCH -DUMMY=dummydll -!else -PCH=WX.PCH -DUMMY=dummy -!endif - -PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\src\msw\$(PCH) /Fd$(WXDIR)\lib\wx.pdb -CPPFLAGS=$(WINFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) /D__WXMSW__ $(INC) $(OPT) /D_DLL $(CRTFLAG) $(EXTRADLLFLAGS) /D_WINDOWS /D__WINDOWS__ /D_WINDLL -CPPFLAGS2=$(WINFLAGS) $(DEBUG_FLAGS) /D__WXMSW__ $(INC) $(EXTRAFLAGS) $(OPT) /D_DLL $(CRTFLAG) $(EXTRADLLFLAGS) /D_WINDOWS /D__WINDOWS__ /D_WINDLL -LINKFLAGS=$(LINK_DEBUG_FLAGS) -machine:i386 -subsystem:windows,$(APPVER) -dll # -entry:_DllMainCRTStartup$(DLLENTRY) -!endif - -DUMMYOBJ=$(WXDIR)\src\msw\$(DUMMY).obj - - - - - diff --git a/src/png/CHANGES b/src/png/CHANGES deleted file mode 100644 index 9cb33a1e89..0000000000 --- a/src/png/CHANGES +++ /dev/null @@ -1,288 +0,0 @@ -CHANGES - changes for libpng - -version 0.2 - added reader into png.h - fixed small problems in stub file -version 0.3 - added pull reader - split up pngwrite.c to several files - added pnglib.txt - added example.c - cleaned up writer, adding a few new tranformations - fixed some bugs in writer - interfaced with zlib 0.5 - added K&R support - added check for 64 KB blocks for 16 bit machines -version 0.4 - cleaned up code and commented code - simplified time handling into png_time - created png_color_16 and png_color_8 to handle color needs - cleaned up color type defines - fixed various bugs - made various names more consistant - interfaced with zlib 0.71 - cleaned up zTXt reader and writer (using zlib's Reset functions) - split transformations into pngrtran.c and pngwtran.c -version 0.5 - interfaced with zlib 0.8 - fixed many reading and writing bugs - saved using 3 spaces instead of tabs -version 0.6 - added png_large_malloc() and png_large_free() - added png_size_t - cleaned up some compiler warnings - added png_start_read_image() -version 0.7 - cleaned up lots of bugs - finished dithering and other stuff - added test program - changed name from pnglib to libpng -version 0.71 [June, 1995] - changed pngtest.png for zlib 0.93 - fixed error in libpng.txt and example.c -version 0.8 - cleaned up some bugs - added png_set_filler() - split up pngstub.c into pngmem.c, pngio.c, and pngerror.c - added #define's to remove unwanted code - moved png_info_init() to png.c - added old_size into png_realloc() - added functions to manually set filtering and compression info - changed compression parameters based on image type - optimized filter selection code - added version info - changed external functions passing floats to doubles (k&r problems?) - put all the configurable stuff in pngconf.h - enabled png_set_shift to work with paletted images on read - added png_read_update_info() - updates info structure with - transformations -version 0.81 [August, 1995] - incorporated Tim Wegner's medium model code (thanks, Tim) -version 0.82 [September, 1995] - [unspecified changes] -version 0.85 [December, 1995] - added more medium model code (almost everything's a far) - added i/o, error, and memory callback functions - fixed some bugs (16 bit, 4 bit interlaced, etc.) - added first run progressive reader (barely tested) -version 0.86 [January, 1996] - fixed bugs - improved documentation -version 0.87 [January, 1996] - fixed medium model bugs - fixed other bugs introduced in 0.85 and 0.86 - added some minor documentation -version 0.88 [January, 1996] - fixed progressive bugs - replaced tabs with spaces - cleaned up documentation - added callbacks for read/write and warning/error functions -version 0.89 [July, 1996] - added new initialization API to make libpng work better with shared libs - we now have png_create_read_struct(), png_create_write_struct(), - png_create_info_struct(), png_destroy_read_struct(), and - png_destroy_write_struct() instead of the separate calls to - malloc and png_read_init(), png_info_init(), and png_write_init() - changed warning/error callback functions to fix bug - this means you - should use the new initialization API if you were using the old - png_set_message_fn() calls, and that the old API no longer exists - so that people are aware that they need to change their code - changed filter selection API to allow selection of multiple filters - since it didn't work in previous versions of libpng anyways - optimized filter selection code - fixed png_set_background() to allow using an arbitrary RGB color for - paletted images - fixed gamma and background correction for paletted images, so - png_correct_palette is not needed unless you are correcting an - external palette (you will need to #define PNG_CORRECT_PALETTE_SUPPORTED - in pngconf.h) - if nobody uses this, it may disappear in the future. - fixed bug with Borland 64K memory allocation (Alexander Lehmann) - fixed bug in interlace handling (Smarasderagd, I think) - added more error checking for writing and image to reduce invalid files - separated read and write functions so that they won't both be linked - into a binary when only reading or writing functionality is used - new pngtest image also has interlacing and zTXt - updated documentation to reflect new API -version 0.90 [January, 1997] - made CRC errors/warnings on critical and ancillary chunks configurable - libpng will use the zlib CRC routines by (compile-time) default - changed DOS small/medium model memory support - needs zlib 1.04 (Tim Wegner) - added external C++ wrapper statements to png.h (Gilles Dauphin) - allow PNG file to be read when some or all of file signature has already - been read from the beginning of the stream. ****This affects the size - of info_struct and invalidates all programs that use a shared libpng**** - fixed png_filler() declarations - fixed? background color conversions - fixed order of error function pointers to match documentation - current chunk name is now available in png_struct to reduce the number - of nearly identical error messages (will simplify multi-lingual - support when available) - try to get ready for unknown-chunk callback functions: - - previously read critical chunks are flagged, so the chunk handling - routines can determine if the chunk is in the right place - - all chunk handling routines have the same prototypes, so we will - be able to handle all chunks via a callback mechanism - try to fix Linux "setjmp" buffer size problems -version 0.95 [March, 1997] - fixed bug in pngwutil.c allocating "up_row" twice and "avg_row" never - fixed bug in PNG file signature compares when start != 0 - changed parameter type of png_set_filler(...filler...) from png_byte - to png_uint_32 - added test for MACOS to ensure that both math.h and fp.h are not #included - added macros for libpng to be compiled as a Windows DLL (Andreas Kupries) - added "packswap" transformation, which changes the endianness of - packed-pixel bytes (Kevin Bracey) - added "strip_alpha" transformation, which removes the alpha channel of - input images without using it (not neccesarily a good idea) - added "swap_alpha" transformation, which puts the alpha channel in front - of the color bytes instead of after - removed all implicit variable tests which assume NULL == 0 (I think) - changed several variables to "png_size_t" to show 16/32-bit limitations - added new pCAL chunk read/write support - added experimental filter selection weighting (Greg Roelofs) - removed old png_set_rgbx() and png_set_xrgb() functions that have been - obsolete for about 2 years now (use png_set_filler() instead) - added macros to read 16- and 32-bit ints directly from buffer, to be - used only on those systems that support it (namely PowerPC and 680x0) - With some testing, this may become the default for MACOS/PPC systems. - only calculate CRC on data if we are going to use it - added macros for zTXt compression type PNG_zTXt_COMPRESSION_??? - added macros for simple libpng debugging output selectable at compile time - removed PNG_READ_END_MODE in progressive reader (Smarasderagd) - more description of info_struct in libpng.txt and png.h - more instructions in example.c - more chunk types tested in pngtest.c - renamed pngrcb.c to pngset.c, and all png_read_ functions to be - png_set_. We now have corresponding png_get_ - functions in pngget.c to get infomation in info_ptr. This isolates - the application from the internal organization of png_info_struct - (good for shared library implementations). -version 0.96 [May, 1997] - fixed serious bug with < 8bpp images introduced in 0.95 - fixed 256-color transparency bug (Greg Roelofs) - fixed up documentation (Greg Roelofs, Laszlo Nyul) - fixed "error" in pngconf.h for Linux setjmp() behaviour - fixed DOS medium model support (Tim Wegner) - fixed png_check_keyword() for case with error in static string text - added read of CRC after IEND chunk for embedded PNGs (Laszlo Nyul) - added typecasts to quiet compiler errors - added more debugging info -version 0.97 [January, 1998] - removed PNG_USE_OWN_CRC capability - relocated png_set_crc_action from pngrutil.c to pngrtran.c - fixed typecasts of "new_key", etc. (Andreas Dilger) - added RFC 1152 [sic] date support - fixed bug in gamma handling of 4-bit grayscale - added 2-bit grayscale gamma handling (Glenn R-P) - added more typecasts. 65536L becomes (png_uint_32)65536L, etc. (Glenn R-P) - minor corrections in libpng.txt - added simple sRGB support (Glenn R-P) - easier conditional compiling, e.g. define PNG_READ/WRITE_NOT_FULLY_SUPPORTED; - all configurable options can be selected from command-line instead - of having to edit pngconf.h (Glenn R-P) - fixed memory leak in pngwrite.c (free info_ptr->text) (Glenn R-P) - added more conditions for png_do_background, to avoid changing - black pixels to background when a background is supplied and - no pixels are transparent - repaired PNG_NO_STDIO behaviour - tested NODIV support and made it default behaviour (Greg Roelofs) - added "-m" option and PNGTEST_DEBUG_MEMORY to pngtest (John Bowler) - regularized version numbering scheme and bumped shared-library major - version number to 2 to avoid problems with libpng 0.89 apps (Greg Roelofs) -version 0.98 [January, 1998] - cleaned up some typos in libpng.txt and in code documentation - fixed memory leaks in pCAL chunk processing (Glenn R-P and John Bowler) - cosmetic change "display_gamma" to "screen_gamma" in pngrtran.c - changed recommendation about file_gamma for PC images to .51 from .45, - in example.c and libpng.txt, added comments to distinguish between - screen_gamma, viewing_gamma, and display_gamma. - changed all references to RFC1152 to read RFC1123 and changed the - PNG_TIME_RFC1152_SUPPORTED macro to PNG_TIME_RFC1123_SUPPORTED - added png_invert_alpha capability (Glenn R-P -- suggestion by Jon Vincent) - changed srgb_intent from png_byte to int to avoid compiler bugs -version 0.99 [January 30, 1998] - free info_ptr->text instead of end_info_ptr->text in pngread.c (John Bowler) - fixed a longstanding "packswap" bug in pngtrans.c - fixed some inconsistencies in pngconf.h that prevented compiling with - PNG_READ_GAMMA_SUPPORTED and PNG_READ_hIST_SUPPORTED undefined - fixed some typos and made other minor rearrangement of libpng.txt (Andreas) - changed recommendation about file_gamma for PC images to .50 from .51 in - example.c and libpng.txt, and changed file_gamma for sRGB images to .45 - added a number of functions to access information from the png structure - png_get_image_height(), etc. (Glenn R-P, suggestion by Brad Pettit) - added TARGET_MACOS similar to zlib-1.0.8 - define PNG_ALWAYS_EXTERN when __MWERKS__ && WIN32 are defined - added type casting to all png_malloc() function calls -version 0.99a [January 31, 1998] - Added type casts and parentheses to all returns that return a value.(Tim W.) -version 0.99b [February 4, 1998] - Added type cast png_uint_32 on malloc function calls where needed. - Changed type of num_hist from png_uint_32 to int (same as num_palette). - Added checks for rowbytes overflow, in case png_size_t is less than 32 bits. - Renamed makefile.elf to makefile.lnx. -version 0.99c [February 7, 1998] - More type casting. Removed erroneous overflow test in pngmem.c. - Added png_buffered_memcpy() and png_buffered_memset(), apply them to rowbytes. - Added UNIX manual pages libpng.3 (incorporating libpng.txt) and png.5. -version 0.99d [February 11, 1998] - Renamed "far_to_near()" "png_far_to_near()" - Revised libpng.3 - Version 99c "buffered" operations didn't work as intended. Replaced them - with png_memcpy_check() and png_memset_check(). - Added many "if (png_ptr == NULL) return" to quell compiler warnings about - unused png_ptr, mostly in pngget.c and pngset.c. - Check for overlength tRNS chunk present when indexed-color PLTE is read. - Cleaned up spelling errors in libpng.3/libpng.txt - Corrected a problem with png_get_tRNS() which returned undefined trans array -version 0.99e [February 28, 1998] - Corrected png_get_tRNS() again. - Add parentheses for easier reading of pngget.c, fixed "||" should be "&&". - Touched up example.c to make more of it compileable, although the entire - file still can't be compiled (Willem van Schaik) - Fixed a bug in png_do_shift() (Bryan Tsai) - Added a space in png.h prototype for png_write_chunk_start() - Replaced pngtest.png with one created with zlib 1.1.1 - Changed pngtest to report PASS even when file size is different (Jean-loup G.) - Corrected some logic errors in png_do_invert_alpha() (Chris Patterson) -version 0.99f [March 5, 1998] - Corrected a bug in pngpread() introduced in version 99c (Kevin Bracey) - Moved makefiles into a "scripts" directory, and added INSTALL instruction file - Added makefile.os2 and pngos2.def (A. Zabolotny) and makefile.s2x (W. Sebok) - Added pointers to "note on libpng versions" in makefile.lnx and README - Added row callback feature when reading and writing nonprogressive rows - and added a test of this feature in pngtest.c - Added user transform callbacks, with test of the feature in pngtest.c -version 0.99g [March 6, 1998, morning] - Minor changes to pngtest.c to suppress compiler warnings. - Removed "beta" language from documentation. -version 0.99h [March 6, 1998, evening] - Minor changes to previous minor changes to pngtest.c - Changed PNG_READ_NOT_FULLY_SUPPORTED to PNG_READ_TRANSFORMS_NOT_SUPPORTED - and added PNG_PROGRESSIVE_READ_NOT_SUPPORTED macro -version 1.00 [March 7, 1998] - Changed several typedefs in pngrutil.c - Added makefile.wat (Pawel Mrochen), updated makefile.tc3 (Willem van Schaik) - replaced "while(1)" with "for(;;)" - added PNGARG() to prototypes in pngtest.c and removed some prototypes - updated some of the makefiles (Tom Lane) - changed some typedefs (s_start, etc.) in pngrutil.c - fixed dimensions of "short_months" array in pngwrite.c - Replaced ansi2knr.c with the one from jpeg-v6 -version 1.0.0 [March 8, 1998] - Changed name from 1.00 to 1.0.0 (Adam Costello) - Added smakefile.ppc (with SCOPTIONS.ppc) for Amiga PPC (Andreas Kleinert) -version 1.0.0a [March 9, 1998] - Fixed three bugs in pngrtran.c to make gamma+background handling consistent - (Greg Roelofs) - Changed format of the PNG_LIBPNG_VER integer to xyyzz instead of xyz - for major, minor, and bugfix releases. This is 10001. (Adam Costello, - Tom Lane) - Make months range from 1-12 in png_convert_to_rfc1123 -version 1.0.0b [March 13, 1998] - Quieted compiler complaints about two empty "for" loops in pngrutil.c - Minor changes to makefile.s2x - Removed #ifdef/#endif around a png_free() in pngread.c -version 1.0.1 [March 14, 1998] - Changes makefile.s2x to reduce security risk of using a relative pathname - Fixed some typos in the documentation (Greg). - Fixed a problem with value of "channels" returned by png_read_update_info() diff --git a/src/png/INSTALL b/src/png/INSTALL deleted file mode 100644 index 4978740993..0000000000 --- a/src/png/INSTALL +++ /dev/null @@ -1,87 +0,0 @@ - -Installing libpng version 1.0.1 March 15, 1998 - -Before installing libpng, you must first install zlib. zlib -can usually be found wherever you got libpng. zlib can be -placed in another directory, at the same level as libpng. -Note that your system might already have a preinstalled -zlib, but you will still need to have access to the -zlib.h and zconf.h include files that correspond to the -version of zlib that's installed. - -You can rename the directories that you downloaded (they -might be called "libpng-1.0.1 or "lpng100" and "zlib-1.1.1" -or "zlib111") so that you have directories called "zlib" and "libpng". - -Your directory structure should look like this: - - .. (the parent directory) - libpng (this directory) - INSTALL (this file) - README - *.h - *.c - scripts - makefile.* - pngtest.png - etc. - zlib - README - *.h - *.c - contrib - etc. - -First enter the zlib directory and follow the instructions -in zlib/README. Then come back here and choose the -appropriate makefile.sys in the scripts directory. -The files that are presently available in the scripts directory -include - - descrip.mms => VMS makefile for MMS or MMK - makefile.std => Generic UNIX makefile - makefile.knr => Archaic UNIX Makefile that converts files with ansi2knr - makefile.dec => DEC Alpha UNIX makefile - makefile.sgi => Silicon Graphics IRIX makefile - makefile.sun => Sun makefile - makefile.s2x => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0) - makefile.lnx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0) - makefile.mip => MIPS makefile - makefile.aco => Acorn makefile - makefile.ama => Amiga makefile - smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC compiler - (Requires SCOPTIONS, copied from scripts/SCOPTIONS.ppc) - makefile.atr => Atari makefile - makefile.bor => Borland makefile - build.bat => MS-DOS batch file for Borland compiler - makefile.dj2 => DJGPP 2 makefile - makefile.msc => Microsoft C makefile - makefile.tc3 => Turbo C 3.0 makefile - makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def) - pngos2.def => OS/2 module definition file used by makefile.os2 - makefile.wat => Watcom 10a+ Makefile, 32-bit flat memory model - makevms.com => VMS build script - -Copy the file (or files) that you need from the -scripts directory into this directory, for example - - MSDOS example: copy scripts\makefile.msd makefile - UNIX example: cp scripts/makefile.std makefile - -Read the makefile to see if you need to change any source or -target directories to match your preferences. - -Then read pngconf.h to see if you want to make any configuration -changes. - -Then just run "make test" which will create the libpng library in -this directory and run a quick test that reads the "pngtest.png" -file and writes a "pngout.png" file that should be identical to it. - -Most of the makefiles will allow you to run "make install" to -put the library in its final resting place (if you want to -do that, run "make install" in the zlib directory first if necessary). - -Further information can be found in the README and libpng.txt -files, in the individual makefiles, and in png.h, and the manual -pages libpng.3 and png.5. diff --git a/src/png/README b/src/png/README deleted file mode 100644 index ea463cd9c5..0000000000 --- a/src/png/README +++ /dev/null @@ -1,194 +0,0 @@ -README for libpng 1.0.1 (shared library 2.1) -See the note about version numbers near the top of png.h - -See INSTALL for instructions on how to install libpng. - -This is the first official release of libpng. Don't let the fact that -it's the first release fool you. The libpng library has been in -extensive use and testing for about two and a half years. However, it's -finally gotten to the stage where there haven't been significant -changes to the API in some time, and people have a bad feeling about -libraries with versions < 1.0. - -**** -Note that some of the changes to the png_info structure render this -version of the library binary incompatible with libpng-0.89 or -earlier versions if you are using a shared library. The type of the -"filler" parameter for png_set_filler() has changed from png_byte to -png_uint_32, which will affect shared-library applications that use -this function. - -To avoid problems with changes to the internals of png_info_struct, -new APIs have been made available in 0.95 to avoid direct application -access to info_ptr. These functions are the png_set_ and -png_get_ functions. These functions should be used when -accessing/storing the info_struct data, rather than manipulating it -directly, to avoid such problems in the future. - -It is important to note that the APIs do not make current programs -that access the info struct directly incompatible with the new -library. However, it is strongly suggested that new programs use -the new APIs (as shown in example.c), and older programs be converted -to the new format, to facilitate upgrades in the future. -**** - -Additions since 0.90 include the ability to compile libpng as a -Windows DLL, and new APIs for accessing data in the info struct. -Experimental functions include the ability to set weighting and cost -factors for row filter selection, direct reads of integers from buffers -on big-endian processors that support misaligned data access, faster -methods of doing alpha composition, and more accurate 16->8 bit color -conversion. - -The additions since 0.89 include the ability to read from a PNG stream -which has had some (or all) of the signature bytes read by the calling -application. This also allows the reading of embedded PNG streams that -do not have the PNG file signature. As well, it is now possible to set -the library action on the detection of chunk CRC errors. It is possible -to set different actions based on whether the CRC error occurred in a -critical or an ancillary chunk. - -The changes made to the library, and bugs fixed are based on discussions -on the PNG implementation mailing list -and not on material submitted to Guy. - -For a detailed description on using libpng, read libpng.txt. For -examples of libpng in a program, see example.c and pngtest.c. For usage -information and restrictions (what little they are) on libpng, see -png.h. For a description on using zlib (the compression library used by -libpng) and zlib's restrictions, see zlib.h - -I have included a general makefile, as well as several machine and -compiler specific ones, but you may have to modify one for your own needs. - -You should use zlib 1.0.4 or later to run this, but it MAY work with -versions as old as zlib 0.95. Even so, there are bugs in older zlib -versions which can cause the output of invalid compression streams for -some images. You will definitely need zlib 1.0.4 or later if you are -taking advantage of the MS-DOS "far" structure allocation for the small -and medium memory models. You should also note that zlib is a -compression library that is useful for more things than just PNG files. -You can use zlib as a drop-in replacement for fread() and fwrite() if -you are so inclined. - -zlib should be available at the same place that libpng is. -If not, it should be at ftp.uu.net in /graphics/png -Eventually, it will be at ftp.uu.net in /pub/archiving/zip/zlib - -You may also want a copy of the PNG specification. It is available -as an RFC and a W3C Recommendation. Failing -these resources you can try ftp.uu.net in the /graphics/png directory. - -This code is currently being archived at ftp.uu.net in the -/graphics/png directory, and on CompuServe, Lib 20 (PNG SUPPORT) -at GO GRAPHSUP. If you can't find it in any of those places, -e-mail me, and I'll help you find it. - -If you have any code changes, requests, problems, etc., please e-mail -them to me. Also, I'd appreciate any make files or project files, -and any modifications you needed to make to get libpng to compile, -along with a #define variable to tell what compiler/system you are on. -If you needed to add transformations to libpng, or wish libpng would -provide the image in a different way, drop me a note (and code, if -possible), so I can consider supporting the transformation. -Finally, if you get any warning messages when compiling libpng -(note: not zlib), and they are easy to fix, I'd appreciate the -fix. Please mention "libpng" somewhere in the subject line. Thanks. - -This release was created and will be supported by myself (of course -based in a large way on Guy's and Andreas' earlier work), and the PNG group. - -randeg@alumni.rpi.edu -png-implement@dworkin.wustl.edu - -You can't reach Guy, the original libpng author, at the addresses -given in previous versions of this document. He and Andreas will read mail -addressed to the png-implement list, however. - -Please do not send general questions about PNG. Send them to -the address in the specification (png-group@w3.org). At the same -time, please do not send libpng questions to that address, send them to me -or to png-implement@dworkin.wustl.edu. I'll -get them in the end anyway. If you have a question about something -in the PNG specification that is related to using libpng, send it -to me. Send me any questions that start with "I was using libpng, -and ...". If in doubt, send questions to me. I'll bounce them -to others, if necessary. - -Please do not send suggestions on how to change PNG. We have -been discussing PNG for three years now, and it is official and -finished. If you have suggestions for libpng, however, I'll -gladly listen. Even if your suggestion is not used for version -1.0, it may be used later. - -Files in this distribution: - - CHANGES => Description of changes between libpng versions - README => This file - TODO => Things not implemented in the current library - ansi2knr.1 => Manual page for ansi2knr - ansi2knr.c => Converts files to K&R style function declarations - build.bat => MS-DOS batch file for Borland compiler - descrip.mms => VMS project file - example.c => Example code for using libpng functions - libpng.3 => manual page for libpng - libpng.txt => Description of libpng and its functions - libpngpf.3 => manual page for libpng's private functions - png.5 => manual page for the PNG format - png.c => Basic interface functions common to library - png.h => Library function and interface declarations - pngconf.h => System specific library configuration - pngerror.c => Error/warning message I/O functions - pngget.c => Functions for retrieving info from struct - pngmem.c => Memory handling functions - pngpread.c => Progressive reading functions - pngread.c => Read data/helper high-level functions - pngrio.c => Lowest-level data read I/O functions - pngrtran.c => Read data transformation functions - pngrutil.c => Read data utility functions - pngset.c => Functions for storing data into the info_struct - pngtest.c => Library test program - pngtest.png => Library test sample image - pngtrans.c => Common data transformation functions - pngwio.c => Lowest-level write I/O functions - pngwrite.c => High-level write functions - pngwtran.c => Write data transformations - pngwutil.c => Write utility functions - scripts => Directory containing scripts for building libpng: - descrip.mms => VMS makefile for MMS or MMK - makefile.std => Generic UNIX makefile - makefile.knr => Archaic UNIX Makefile that converts files with ansi2knr - makefile.dec => DEC Alpha UNIX makefile - makefile.sgi => Silicon Graphics IRIX makefile - makefile.sun => Sun makefile - makefile.s2x => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0) - makefile.lnx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0) - makefile.mip => MIPS makefile - makefile.aco => Acorn makefile - makefile.ama => Amiga makefile - smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC compiler - (Requires SCOPTIONS, copied from scripts/SCOPTIONS.ppc) - makefile.atr => Atari makefile - makefile.bor => Borland makefile - build.bat => MS-DOS batch file for Borland compiler - makefile.dj2 => DJGPP 2 makefile - makefile.msc => Microsoft C makefile - makefile.tc3 => Turbo C 3.0 makefile - makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def) - makefile.wat => Watcom 10a+ Makefile, 32-bit flat memory model - pngos2.def => OS/2 module definition file used by makefile.os2 - makevms.com => VMS build script - -Good luck, and happy coding. - --Glenn Randers-Pehrson - Internet: randeg@alumni.rpi.edu - Web: http://www.rpi.edu/~randeg/index.html - --Andreas Eric Dilger - Internet: adilger@enel.ucalgary.ca - Web: http://www-mddsp.enel.ucalgary.ca/People/adilger/ - --Guy Eric Schalnat - (formerly of Group 42, Inc) - Internet: gschal@infinet.com diff --git a/src/png/TODO b/src/png/TODO deleted file mode 100644 index 562859a22f..0000000000 --- a/src/png/TODO +++ /dev/null @@ -1,22 +0,0 @@ -TODO - list of things to do for libpng - -fix problem with C++ and EXTERN "C" -add "grayscale->palette" transformation and "palette->grayscale" detection -add "grayscale" -> "grayscale+alpha" and "grayscale+FILLER" transformations -improved dithering -multi-lingual error and warning message support -sPLT chunk handling -cHRM transformation -complete sRGB transformation (presently it simply uses gamma=0.45) -man pages for function calls -high-level API for reading images -final bug fixes -better documentation -better filter selection - (counting huffman bits/precompression? filter inertia? filter costs?) -optional palette creation -histogram creation -support for application-defined chunk handlers -keep up with public chunks -better C++ wrapper/full C++ implementation? -text conversion between different code pages (Latin-1 -> Mac and DOS) diff --git a/src/png/ansi2knr.1 b/src/png/ansi2knr.1 deleted file mode 100644 index f9ee5a631c..0000000000 --- a/src/png/ansi2knr.1 +++ /dev/null @@ -1,36 +0,0 @@ -.TH ANSI2KNR 1 "19 Jan 1996" -.SH NAME -ansi2knr \- convert ANSI C to Kernighan & Ritchie C -.SH SYNOPSIS -.I ansi2knr -[--varargs] input_file [output_file] -.SH DESCRIPTION -If no output_file is supplied, output goes to stdout. -.br -There are no error messages. -.sp -.I ansi2knr -recognizes function definitions by seeing a non-keyword identifier at the left -margin, followed by a left parenthesis, with a right parenthesis as the last -character on the line, and with a left brace as the first token on the -following line (ignoring possible intervening comments). It will recognize a -multi-line header provided that no intervening line ends with a left or right -brace or a semicolon. These algorithms ignore whitespace and comments, except -that the function name must be the first thing on the line. -.sp -The following constructs will confuse it: -.br - - Any other construct that starts at the left margin and follows the -above syntax (such as a macro or function call). -.br - - Some macros that tinker with the syntax of the function header. -.sp -The --varargs switch is obsolete, and is recognized only for -backwards compatibility. The present version of -.I ansi2knr -will always attempt to convert a ... argument to va_alist and va_dcl. -.SH AUTHOR -L. Peter Deutsch wrote the original ansi2knr and -continues to maintain the current version; most of the code in the current -version is his work. ansi2knr also includes contributions by Francois -Pinard and Jim Avera . diff --git a/src/png/ansi2knr.c b/src/png/ansi2knr.c deleted file mode 100644 index 4e05fc2d32..0000000000 --- a/src/png/ansi2knr.c +++ /dev/null @@ -1,693 +0,0 @@ -/* ansi2knr.c */ -/* Convert ANSI C function definitions to K&R ("traditional C") syntax */ - -/* -ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY. No author or distributor accepts responsibility to anyone for the -consequences of using it or for whether it serves any particular purpose or -works at all, unless he says so in writing. Refer to the GNU General Public -License (the "GPL") for full details. - -Everyone is granted permission to copy, modify and redistribute ansi2knr, -but only under the conditions described in the GPL. A copy of this license -is supposed to have been given to you along with ansi2knr so you can know -your rights and responsibilities. It should be in a file named COPYLEFT. -[In the IJG distribution, the GPL appears below, not in a separate file.] -Among other things, the copyright notice and this notice must be preserved -on all copies. - -We explicitly state here what we believe is already implied by the GPL: if -the ansi2knr program is distributed as a separate set of sources and a -separate executable file which are aggregated on a storage medium together -with another program, this in itself does not bring the other program under -the GPL, nor does the mere fact that such a program or the procedures for -constructing it invoke the ansi2knr executable bring any other part of the -program under the GPL. -*/ - -/* ----------- Here is the GNU GPL file COPYLEFT, referred to above ---------- ------ These terms do NOT apply to the JPEG software itself; see README ------ - - GHOSTSCRIPT GENERAL PUBLIC LICENSE - (Clarified 11 Feb 1988) - - Copyright (C) 1988 Richard M. Stallman - Everyone is permitted to copy and distribute verbatim copies of this - license, but changing it is not allowed. You can also use this wording - to make the terms for other programs. - - The license agreements of most software companies keep you at the -mercy of those companies. By contrast, our general public license is -intended to give everyone the right to share Ghostscript. To make sure -that you get the rights we want you to have, we need to make -restrictions that forbid anyone to deny you these rights or to ask you -to surrender the rights. Hence this license agreement. - - Specifically, we want to make sure that you have the right to give -away copies of Ghostscript, that you receive source code or else can get -it if you want it, that you can change Ghostscript or use pieces of it -in new free programs, and that you know you can do these things. - - To make sure that everyone has such rights, we have to forbid you to -deprive anyone else of these rights. For example, if you distribute -copies of Ghostscript, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must tell them their rights. - - Also, for our own protection, we must make certain that everyone finds -out that there is no warranty for Ghostscript. If Ghostscript is -modified by someone else and passed on, we want its recipients to know -that what they have is not what we distributed, so that any problems -introduced by others will not reflect on our reputation. - - Therefore we (Richard M. Stallman and the Free Software Foundation, -Inc.) make the following terms which say what you must do to be allowed -to distribute or change Ghostscript. - - - COPYING POLICIES - - 1. You may copy and distribute verbatim copies of Ghostscript source -code as you receive it, in any medium, provided that you conspicuously -and appropriately publish on each copy a valid copyright and license -notice "Copyright (C) 1989 Aladdin Enterprises. All rights reserved. -Distributed by Free Software Foundation, Inc." (or with whatever year is -appropriate); keep intact the notices on all files that refer to this -License Agreement and to the absence of any warranty; and give any other -recipients of the Ghostscript program a copy of this License Agreement -along with the program. You may charge a distribution fee for the -physical act of transferring a copy. - - 2. You may modify your copy or copies of Ghostscript or any portion of -it, and copy and distribute such modifications under the terms of -Paragraph 1 above, provided that you also do the following: - - a) cause the modified files to carry prominent notices stating - that you changed the files and the date of any change; and - - b) cause the whole of any work that you distribute or publish, - that in whole or in part contains or is a derivative of Ghostscript - or any part thereof, to be licensed at no charge to all third - parties on terms identical to those contained in this License - Agreement (except that you may choose to grant more extensive - warranty protection to some or all third parties, at your option). - - c) You may charge a distribution fee for the physical act of - transferring a copy, and you may at your option offer warranty - protection in exchange for a fee. - -Mere aggregation of another unrelated program with this program (or its -derivative) on a volume of a storage or distribution medium does not bring -the other program under the scope of these terms. - - 3. You may copy and distribute Ghostscript (or a portion or derivative -of it, under Paragraph 2) in object code or executable form under the -terms of Paragraphs 1 and 2 above provided that you also do one of the -following: - - a) accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of - Paragraphs 1 and 2 above; or, - - b) accompany it with a written offer, valid for at least three - years, to give any third party free (except for a nominal - shipping charge) a complete machine-readable copy of the - corresponding source code, to be distributed under the terms of - Paragraphs 1 and 2 above; or, - - c) accompany it with the information you received as to where the - corresponding source code may be obtained. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form alone.) - -For an executable file, complete source code means all the source code for -all modules it contains; but, as a special exception, it need not include -source code for modules which are standard libraries that accompany the -operating system on which the executable file runs. - - 4. You may not copy, sublicense, distribute or transfer Ghostscript -except as expressly provided under this License Agreement. Any attempt -otherwise to copy, sublicense, distribute or transfer Ghostscript is -void and your rights to use the program under this License agreement -shall be automatically terminated. However, parties who have received -computer software programs from you with this License Agreement will not -have their licenses terminated so long as such parties remain in full -compliance. - - 5. If you wish to incorporate parts of Ghostscript into other free -programs whose distribution conditions are different, write to the Free -Software Foundation at 675 Mass Ave, Cambridge, MA 02139. We have not -yet worked out a simple rule that can be stated here, but we will often -permit this. We will be guided by the two goals of preserving the free -status of all derivatives of our free software and of promoting the -sharing and reuse of software. - -Your comments and suggestions about our licensing policies and our -software are welcome! Please contact the Free Software Foundation, -Inc., 675 Mass Ave, Cambridge, MA 02139, or call (617) 876-3296. - - NO WARRANTY - - BECAUSE GHOSTSCRIPT IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY -NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT -WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC, RICHARD -M. STALLMAN, ALADDIN ENTERPRISES, L. PETER DEUTSCH, AND/OR OTHER PARTIES -PROVIDE GHOSTSCRIPT "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE -ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF GHOSTSCRIPT IS WITH -YOU. SHOULD GHOSTSCRIPT PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL -NECESSARY SERVICING, REPAIR OR CORRECTION. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M. -STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., L. PETER DEUTSCH, ALADDIN -ENTERPRISES, AND/OR ANY OTHER PARTY WHO MAY MODIFY AND REDISTRIBUTE -GHOSTSCRIPT AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING -ANY LOST PROFITS, LOST MONIES, OR OTHER SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE -(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED -INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A FAILURE OF THE -PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) GHOSTSCRIPT, EVEN IF YOU -HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM -BY ANY OTHER PARTY. - --------------------- End of file COPYLEFT ------------------------------ -*/ - -/* - * Usage: - ansi2knr input_file [output_file] - * If no output_file is supplied, output goes to stdout. - * There are no error messages. - * - * ansi2knr recognizes function definitions by seeing a non-keyword - * identifier at the left margin, followed by a left parenthesis, - * with a right parenthesis as the last character on the line, - * and with a left brace as the first token on the following line - * (ignoring possible intervening comments). - * It will recognize a multi-line header provided that no intervening - * line ends with a left or right brace or a semicolon. - * These algorithms ignore whitespace and comments, except that - * the function name must be the first thing on the line. - * The following constructs will confuse it: - * - Any other construct that starts at the left margin and - * follows the above syntax (such as a macro or function call). - * - Some macros that tinker with the syntax of the function header. - */ - -/* - * The original and principal author of ansi2knr is L. Peter Deutsch - * . Other authors are noted in the change history - * that follows (in reverse chronological order): - lpd 96-01-21 added code to cope with not HAVE_CONFIG_H and with - compilers that don't understand void, as suggested by - Tom Lane - lpd 96-01-15 changed to require that the first non-comment token - on the line following a function header be a left brace, - to reduce sensitivity to macros, as suggested by Tom Lane - - lpd 95-06-22 removed #ifndefs whose sole purpose was to define - undefined preprocessor symbols as 0; changed all #ifdefs - for configuration symbols to #ifs - lpd 95-04-05 changed copyright notice to make it clear that - including ansi2knr in a program does not bring the entire - program under the GPL - lpd 94-12-18 added conditionals for systems where ctype macros - don't handle 8-bit characters properly, suggested by - Francois Pinard ; - removed --varargs switch (this is now the default) - lpd 94-10-10 removed CONFIG_BROKETS conditional - lpd 94-07-16 added some conditionals to help GNU `configure', - suggested by Francois Pinard ; - properly erase prototype args in function parameters, - contributed by Jim Avera ; - correct error in writeblanks (it shouldn't erase EOLs) - lpd 89-xx-xx original version - */ - -/* Most of the conditionals here are to make ansi2knr work with */ -/* or without the GNU configure machinery. */ - -#if HAVE_CONFIG_H -# include -#endif - -#include -#include - -#if HAVE_CONFIG_H - -/* - For properly autoconfiguring ansi2knr, use AC_CONFIG_HEADER(config.h). - This will define HAVE_CONFIG_H and so, activate the following lines. - */ - -# if STDC_HEADERS || HAVE_STRING_H -# include -# else -# include -# endif - -#else /* not HAVE_CONFIG_H */ - -/* Otherwise do it the hard way */ - -# ifdef BSD -# include -# else -# ifdef VMS - extern int strlen(), strncmp(); -# else -# include -# endif -# endif - -#endif /* not HAVE_CONFIG_H */ - -#if STDC_HEADERS -# include -#else -/* - malloc and free should be declared in stdlib.h, - but if you've got a K&R compiler, they probably aren't. - */ -# ifdef MSDOS -# include -# else -# ifdef VMS - extern char *malloc(); - extern void free(); -# else - extern char *malloc(); - extern int free(); -# endif -# endif - -#endif - -/* - * The ctype macros don't always handle 8-bit characters correctly. - * Compensate for this here. - */ -#ifdef isascii -# undef HAVE_ISASCII /* just in case */ -# define HAVE_ISASCII 1 -#else -#endif -#if STDC_HEADERS || !HAVE_ISASCII -# define is_ascii(c) 1 -#else -# define is_ascii(c) isascii(c) -#endif - -#define is_space(c) (is_ascii(c) && isspace(c)) -#define is_alpha(c) (is_ascii(c) && isalpha(c)) -#define is_alnum(c) (is_ascii(c) && isalnum(c)) - -/* Scanning macros */ -#define isidchar(ch) (is_alnum(ch) || (ch) == '_') -#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_') - -/* Forward references */ -char *skipspace(); -int writeblanks(); -int test1(); -int convert1(); - -/* The main program */ -int -main(argc, argv) - int argc; - char *argv[]; -{ FILE *in, *out; -#define bufsize 5000 /* arbitrary size */ - char *buf; - char *line; - char *more; - /* - * In previous versions, ansi2knr recognized a --varargs switch. - * If this switch was supplied, ansi2knr would attempt to convert - * a ... argument to va_alist and va_dcl; if this switch was not - * supplied, ansi2knr would simply drop any such arguments. - * Now, ansi2knr always does this conversion, and we only - * check for this switch for backward compatibility. - */ - int convert_varargs = 1; - - if ( argc > 1 && argv[1][0] == '-' ) - { if ( !strcmp(argv[1], "--varargs") ) - { convert_varargs = 1; - argc--; - argv++; - } - else - { fprintf(stderr, "Unrecognized switch: %s\n", argv[1]); - exit(1); - } - } - switch ( argc ) - { - default: - printf("Usage: ansi2knr input_file [output_file]\n"); - exit(0); - case 2: - out = stdout; - break; - case 3: - out = fopen(argv[2], "w"); - if ( out == NULL ) - { fprintf(stderr, "Cannot open output file %s\n", argv[2]); - exit(1); - } - } - in = fopen(argv[1], "r"); - if ( in == NULL ) - { fprintf(stderr, "Cannot open input file %s\n", argv[1]); - exit(1); - } - fprintf(out, "#line 1 \"%s\"\n", argv[1]); - buf = malloc(bufsize); - line = buf; - while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL ) - { -test: line += strlen(line); - switch ( test1(buf) ) - { - case 2: /* a function header */ - convert1(buf, out, 1, convert_varargs); - break; - case 1: /* a function */ - /* Check for a { at the start of the next line. */ - more = ++line; -f: if ( line >= buf + (bufsize - 1) ) /* overflow check */ - goto wl; - if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL ) - goto wl; - switch ( *skipspace(more, 1) ) - { - case '{': - /* Definitely a function header. */ - convert1(buf, out, 0, convert_varargs); - fputs(more, out); - break; - case 0: - /* The next line was blank or a comment: */ - /* keep scanning for a non-comment. */ - line += strlen(line); - goto f; - default: - /* buf isn't a function header, but */ - /* more might be. */ - fputs(buf, out); - strcpy(buf, more); - line = buf; - goto test; - } - break; - case -1: /* maybe the start of a function */ - if ( line != buf + (bufsize - 1) ) /* overflow check */ - continue; - /* falls through */ - default: /* not a function */ -wl: fputs(buf, out); - break; - } - line = buf; - } - if ( line != buf ) - fputs(buf, out); - free(buf); - fclose(out); - fclose(in); - return 0; -} - -/* Skip over space and comments, in either direction. */ -char * -skipspace(p, dir) - register char *p; - register int dir; /* 1 for forward, -1 for backward */ -{ for ( ; ; ) - { while ( is_space(*p) ) - p += dir; - if ( !(*p == '/' && p[dir] == '*') ) - break; - p += dir; p += dir; - while ( !(*p == '*' && p[dir] == '/') ) - { if ( *p == 0 ) - return p; /* multi-line comment?? */ - p += dir; - } - p += dir; p += dir; - } - return p; -} - -/* - * Write blanks over part of a string. - * Don't overwrite end-of-line characters. - */ -int -writeblanks(start, end) - char *start; - char *end; -{ char *p; - for ( p = start; p < end; p++ ) - if ( *p != '\r' && *p != '\n' ) - *p = ' '; - return 0; -} - -/* - * Test whether the string in buf is a function definition. - * The string may contain and/or end with a newline. - * Return as follows: - * 0 - definitely not a function definition; - * 1 - definitely a function definition; - * 2 - definitely a function prototype (NOT USED); - * -1 - may be the beginning of a function definition, - * append another line and look again. - * The reason we don't attempt to convert function prototypes is that - * Ghostscript's declaration-generating macros look too much like - * prototypes, and confuse the algorithms. - */ -int -test1(buf) - char *buf; -{ register char *p = buf; - char *bend; - char *endfn; - int contin; - - if ( !isidfirstchar(*p) ) - return 0; /* no name at left margin */ - bend = skipspace(buf + strlen(buf) - 1, -1); - switch ( *bend ) - { - case ';': contin = 0 /*2*/; break; - case ')': contin = 1; break; - case '{': return 0; /* not a function */ - case '}': return 0; /* not a function */ - default: contin = -1; - } - while ( isidchar(*p) ) - p++; - endfn = p; - p = skipspace(p, 1); - if ( *p++ != '(' ) - return 0; /* not a function */ - p = skipspace(p, 1); - if ( *p == ')' ) - return 0; /* no parameters */ - /* Check that the apparent function name isn't a keyword. */ - /* We only need to check for keywords that could be followed */ - /* by a left parenthesis (which, unfortunately, is most of them). */ - { static char *words[] = - { "asm", "auto", "case", "char", "const", "double", - "extern", "float", "for", "if", "int", "long", - "register", "return", "short", "signed", "sizeof", - "static", "switch", "typedef", "unsigned", - "void", "volatile", "while", 0 - }; - char **key = words; - char *kp; - int len = endfn - buf; - - while ( (kp = *key) != 0 ) - { if ( strlen(kp) == len && !strncmp(kp, buf, len) ) - return 0; /* name is a keyword */ - key++; - } - } - return contin; -} - -/* Convert a recognized function definition or header to K&R syntax. */ -int -convert1(buf, out, header, convert_varargs) - char *buf; - FILE *out; - int header; /* Boolean */ - int convert_varargs; /* Boolean */ -{ char *endfn; - register char *p; - char **breaks; - unsigned num_breaks = 2; /* for testing */ - char **btop; - char **bp; - char **ap; - char *vararg = 0; - - /* Pre-ANSI implementations don't agree on whether strchr */ - /* is called strchr or index, so we open-code it here. */ - for ( endfn = buf; *(endfn++) != '('; ) - ; -top: p = endfn; - breaks = (char **)malloc(sizeof(char *) * num_breaks * 2); - if ( breaks == 0 ) - { /* Couldn't allocate break table, give up */ - fprintf(stderr, "Unable to allocate break table!\n"); - fputs(buf, out); - return -1; - } - btop = breaks + num_breaks * 2 - 2; - bp = breaks; - /* Parse the argument list */ - do - { int level = 0; - char *lp = NULL; - char *rp; - char *end = NULL; - - if ( bp >= btop ) - { /* Filled up break table. */ - /* Allocate a bigger one and start over. */ - free((char *)breaks); - num_breaks <<= 1; - goto top; - } - *bp++ = p; - /* Find the end of the argument */ - for ( ; end == NULL; p++ ) - { switch(*p) - { - case ',': - if ( !level ) end = p; - break; - case '(': - if ( !level ) lp = p; - level++; - break; - case ')': - if ( --level < 0 ) end = p; - else rp = p; - break; - case '/': - p = skipspace(p, 1) - 1; - break; - default: - ; - } - } - /* Erase any embedded prototype parameters. */ - if ( lp ) - writeblanks(lp + 1, rp); - p--; /* back up over terminator */ - /* Find the name being declared. */ - /* This is complicated because of procedure and */ - /* array modifiers. */ - for ( ; ; ) - { p = skipspace(p - 1, -1); - switch ( *p ) - { - case ']': /* skip array dimension(s) */ - case ')': /* skip procedure args OR name */ - { int level = 1; - while ( level ) - switch ( *--p ) - { - case ']': case ')': level++; break; - case '[': case '(': level--; break; - case '/': p = skipspace(p, -1) + 1; break; - default: ; - } - } - if ( *p == '(' && *skipspace(p + 1, 1) == '*' ) - { /* We found the name being declared */ - while ( !isidfirstchar(*p) ) - p = skipspace(p, 1) + 1; - goto found; - } - break; - default: - goto found; - } - } -found: if ( *p == '.' && p[-1] == '.' && p[-2] == '.' ) - { if ( convert_varargs ) - { *bp++ = "va_alist"; - vararg = p-2; - } - else - { p++; - if ( bp == breaks + 1 ) /* sole argument */ - writeblanks(breaks[0], p); - else - writeblanks(bp[-1] - 1, p); - bp--; - } - } - else - { while ( isidchar(*p) ) p--; - *bp++ = p+1; - } - p = end; - } - while ( *p++ == ',' ); - *bp = p; - /* Make a special check for 'void' arglist */ - if ( bp == breaks+2 ) - { p = skipspace(breaks[0], 1); - if ( !strncmp(p, "void", 4) ) - { p = skipspace(p+4, 1); - if ( p == breaks[2] - 1 ) - { bp = breaks; /* yup, pretend arglist is empty */ - writeblanks(breaks[0], p + 1); - } - } - } - /* Put out the function name and left parenthesis. */ - p = buf; - while ( p != endfn ) putc(*p, out), p++; - /* Put out the declaration. */ - if ( header ) - { fputs(");", out); - for ( p = breaks[0]; *p; p++ ) - if ( *p == '\r' || *p == '\n' ) - putc(*p, out); - } - else - { for ( ap = breaks+1; ap < bp; ap += 2 ) - { p = *ap; - while ( isidchar(*p) ) - putc(*p, out), p++; - if ( ap < bp - 1 ) - fputs(", ", out); - } - fputs(") ", out); - /* Put out the argument declarations */ - for ( ap = breaks+2; ap <= bp; ap += 2 ) - (*ap)[-1] = ';'; - if ( vararg != 0 ) - { *vararg = 0; - fputs(breaks[0], out); /* any prior args */ - fputs("va_dcl", out); /* the final arg */ - fputs(bp[0], out); - } - else - fputs(breaks[0], out); - } - free((char *)breaks); - return 0; -} diff --git a/src/png/example.c b/src/png/example.c deleted file mode 100644 index 4b22852ee2..0000000000 --- a/src/png/example.c +++ /dev/null @@ -1,688 +0,0 @@ - -/* example.c - an example of using libpng */ - -/* This is an example of how to use libpng to read and write PNG files. - * The file libpng.txt is much more verbose then this. If you have not - * read it, do so first. This was designed to be a starting point of an - * implementation. This is not officially part of libpng, and therefore - * does not require a copyright notice. - * - * This file does not currently compile, because it is missing certain - * parts, like allocating memory to hold an image. You will have to - * supply these parts to get it to compile. For an example of a minimal - * working PNG reader/writer, see pngtest.c, included in this distribution. - */ - -#include "../png/png.h" - -/* Check to see if a file is a PNG file using png_sig_cmp(). Returns - * non-zero if the image is a PNG, and 0 if it isn't a PNG. - * - * If this call is successful, and you are going to keep the file open, - * you should call png_set_sig_bytes(png_ptr, PNG_BYTES_TO_CHECK); once - * you have created the png_ptr, so that libpng knows your application - * has read that many bytes from the start of the file. Make sure you - * don't call png_set_sig_bytes() with more than 8 bytes read or give it - * an incorrect number of bytes read, or you will either have read too - * many bytes (your fault), or you are telling libpng to read the wrong - * number of magic bytes (also your fault). - * - * Many applications already read the first 2 or 4 bytes from the start - * of the image to determine the file type, so it would be easiest just - * to pass the bytes to png_sig_cmp() or even skip that if you know - * you have a PNG file, and call png_set_sig_bytes(). - */ -#define PNG_BYTES_TO_CHECK 4 -int check_if_png(char *file_name, FILE **fp) -{ - char buf[PNG_BYTES_TO_CHECK]; - - /* Open the prospective PNG file. */ - if ((*fp = fopen(file_name, "rb")) != NULL); - return 0; - - /* Read in the signature bytes */ - if (fread(buf, 1, PNG_BYTES_TO_CHECK, *fp) != PNG_BYTES_TO_CHECK) - return 0; - - /* Compare the first PNG_BYTES_TO_CHECK bytes of the signature. */ - return(png_sig_cmp(buf, (png_size_t)0, PNG_BYTES_TO_CHECK)); -} - -/* Read a PNG file. You may want to return an error code if the read - * fails (depending upon the failure). There are two "prototypes" given - * here - one where we are given the filename, and we need to open the - * file, and the other where we are given an open file (possibly with - * some or all of the magic bytes read - see comments above). - */ -#ifdef open_file /* prototype 1 */ -void read_png(char *file_name) /* We need to open the file */ -{ - png_structp png_ptr; - png_infop info_ptr; - unsigned int sig_read = 0; - png_uint_32 width, height; - int bit_depth, color_type, interlace_type; - FILE *fp; - - if ((fp = fopen(file_name, "rb")) == NULL) - return; -#else no_open_file /* prototype 2 */ -void read_png(FILE *fp, unsigned int sig_read) /* file is already open */ -{ - png_structp png_ptr; - png_infop info_ptr; - png_uint_32 width, height; - int bit_depth, color_type, interlace_type; -#endif no_open_file /* only use one prototype! */ - - /* Create and initialize the png_struct with the desired error handler - * functions. If you want to use the default stderr and longjump method, - * you can supply NULL for the last three parameters. We also supply the - * the compiler header file version, so that we know if the application - * was compiled with a compatible version of the library. REQUIRED - */ - png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, - (void *)user_error_ptr, user_error_fn, user_warning_fn); - - if (png_ptr == NULL) - { - fclose(fp); - return; - } - - /* Allocate/initialize the memory for image information. REQUIRED. */ - info_ptr = png_create_info_struct(png_ptr); - if (info_ptr == NULL) - { - fclose(fp); - png_destroy_read_struct(&png_ptr, (png_infopp)NULL, (png_infopp)NULL); - return; - } - - /* Set error handling if you are using the setjmp/longjmp method (this is - * the normal method of doing things with libpng). REQUIRED unless you - * set up your own error handlers in the png_create_read_struct() earlier. - */ - if (setjmp(png_ptr->jmpbuf)) - { - /* Free all of the memory associated with the png_ptr and info_ptr */ - png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); - fclose(fp); - /* If we get here, we had a problem reading the file */ - return; - } - - /* One of the following I/O initialization methods is REQUIRED */ -#ifdef streams /* PNG file I/O method 1 */ - /* Set up the input control if you are using standard C streams */ - png_init_io(png_ptr, fp); - -#else no_streams /* PNG file I/O method 2 */ - /* If you are using replacement read functions, instead of calling - * png_init_io() here you would call: - */ - png_set_read_fn(png_ptr, (void *)user_io_ptr, user_read_fn); - /* where user_io_ptr is a structure you want available to the callbacks */ -#endif no_streams /* Use only one I/O method! */ - - /* If we have already read some of the signature */ - png_set_sig_bytes(png_ptr, sig_read); - - /* The call to png_read_info() gives us all of the information from the - * PNG file before the first IDAT (image data chunk). REQUIRED - */ - png_read_info(png_ptr, info_ptr); - - png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - &interlace_type, NULL, NULL); - -/**** Set up the data transformations you want. Note that these are all - **** optional. Only call them if you want/need them. Many of the - **** transformations only work on specific types of images, and many - **** are mutually exclusive. - ****/ - - /* tell libpng to strip 16 bit/color files down to 8 bits/color */ - png_set_strip_16(png_ptr); - - /* Strip alpha bytes from the input data without combining with th - * background (not recommended). - */ - png_set_strip_alpha(png_ptr); - - /* Extract multiple pixels with bit depths of 1, 2, and 4 from a single - * byte into separate bytes (useful for paletted and grayscale images). - */ - png_set_packing(png_ptr); - - /* Change the order of packed pixels to least significant bit first - * (not useful if you are using png_set_packing). */ - png_set_packswap(png_ptr); - - /* Expand paletted colors into true RGB triplets */ - if (color_type == PNG_COLOR_TYPE_PALETTE) - png_set_expand(png_ptr); - - /* Expand grayscale images to the full 8 bits from 1, 2, or 4 bits/pixel */ - if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) - png_set_expand(png_ptr); - - /* Expand paletted or RGB images with transparency to full alpha channels - * so the data will be available as RGBA quartets. - */ - if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) - png_set_expand(png_ptr); - - /* Set the background color to draw transparent and alpha images over. - * It is possible to set the red, green, and blue components directly - * for paletted images instead of supplying a palette index. Note that - * even if the PNG file supplies a background, you are not required to - * use it - you should use the (solid) application background if it has one. - */ - - png_color_16 my_background, *image_background; - - if (png_get_bKGD(png_ptr, info_ptr, &image_background)) - png_set_background(png_ptr, image_background, - PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); - else - png_set_background(png_ptr, &my_background, - PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); - - /* Some suggestions as to how to get a screen gamma value */ - - /* Note that screen gamma is (display_gamma/viewing_gamma) */ - if (/* We have a user-defined screen gamma value */) - { - screen_gamma = user-defined screen_gamma; - } - /* This is one way that applications share the same screen gamma value */ - else if ((gamma_str = getenv("SCREEN_GAMMA")) != NULL) - { - screen_gamma = atof(gamma_str); - } - /* If we don't have another value */ - else - { - screen_gamma = 2.2; /* A good guess for a PC monitors in a dimly - lit room */ - screen_gamma = 1.7 or 1.0; /* A good guess for Mac systems */ - } - - /* Tell libpng to handle the gamma conversion for you. The second call - * is a good guess for PC generated images, but it should be configurable - * by the user at run time by the user. It is strongly suggested that - * your application support gamma correction. - */ - - int intent; - - if (png_get_sRGB(png_ptr, info_ptr, &intent)) - png_set_sRGB(png_ptr, intent, 0); - else - if (png_get_gAMA(png_ptr, info_ptr, &image_gamma)) - png_set_gamma(png_ptr, screen_gamma, image_gamma); - else - png_set_gamma(png_ptr, screen_gamma, 0.50); - - /* Dither RGB files down to 8 bit palette or reduce palettes - * to the number of colors available on your screen. - */ - if (color_type & PNG_COLOR_MASK_COLOR) - { - png_uint_32 num_palette; - png_colorp palette; - - /* This reduces the image to the application supplied palette */ - if (/* we have our own palette */) - { - /* An array of colors to which the image should be dithered */ - png_color std_color_cube[MAX_SCREEN_COLORS]; - - png_set_dither(png_ptr, std_color_cube, MAX_SCREEN_COLORS, - MAX_SCREEN_COLORS, NULL, 0); - } - /* This reduces the image to the palette supplied in the file */ - else if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette)) - { - png_color16p histogram; - - png_get_hIST(png_ptr, info_ptr, &histogram); - - png_set_dither(png_ptr, palette, num_palette, - max_screen_colors, histogram, 0); - } - } - - /* invert monocrome files to have 0 as white and 1 as black */ - png_set_invert_mono(png_ptr); - - /* If you want to shift the pixel values from the range [0,255] or - * [0,65535] to the original [0,7] or [0,31], or whatever range the - * colors were originally in: - */ - if (png_get_valid(png_ptr, info_ptr, PNG_INFO_sBIT)) - { - png_color8p sig_bit; - - png_get_sBIT(png_ptr, info_ptr, &sig_bit); - png_set_shift(png_ptr, sig_bit); - } - - /* flip the RGB pixels to BGR (or RGBA to BGRA) */ - png_set_bgr(png_ptr); - - /* swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */ - png_set_swap_alpha(png_ptr); - - /* swap bytes of 16 bit files to least significant byte first */ - png_set_swap(png_ptr); - - /* Add filler (or alpha) byte (before/after each RGB triplet) */ - png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER); - - /* Turn on interlace handling. REQUIRED if you are not using - * png_read_image(). To see how to handle interlacing passes, - * see the png_read_row() method below: - */ - number_passes = png_set_interlace_handling(png_ptr); - - /* Optional call to gamma correct and add the background to the palette - * and update info structure. REQUIRED if you are expecting libpng to - * update the palette for you (ie you selected such a transform above). - */ - png_read_update_info(png_ptr, info_ptr); - - /* Allocate the memory to hold the image using the fields of info_ptr. */ - - /* The easiest way to read the image: */ - png_bytep row_pointers[height]; - - for (row = 0; row < height; row++) - { - row_pointers[row] = malloc(png_get_rowbytes(png_ptr, info_ptr)); - } - - /* Now it's time to read the image. One of these methods is REQUIRED */ -#ifdef entire /* Read the entire image in one go */ - png_read_image(png_ptr, row_pointers); - -#else no_entire /* Read the image one or more scanlines at a time */ - /* The other way to read images - deal with interlacing: */ - - for (pass = 0; pass < number_passes; pass++) - { -#ifdef single /* Read the image a single row at a time */ - for (y = 0; y < height; y++) - { - png_bytep row_pointers = row[y]; - png_read_rows(png_ptr, &row_pointers, NULL, 1); - } - -#else no_single /* Read the image several rows at a time */ - for (y = 0; y < height; y += number_of_rows) - { -#ifdef sparkle /* Read the image using the "sparkle" effect. */ - png_read_rows(png_ptr, row_pointers, NULL, number_of_rows); - -#else no_sparkle /* Read the image using the "rectangle" effect */ - png_read_rows(png_ptr, NULL, row_pointers, number_of_rows); -#endif no_sparkle /* use only one of these two methods */ - } - - /* if you want to display the image after every pass, do - so here */ -#endif no_single /* use only one of these two methods */ - } -#endif no_entire /* use only one of these two methods */ - - /* read rest of file, and get additional chunks in info_ptr - REQUIRED */ - png_read_end(png_ptr, info_ptr); - - /* clean up after the read, and free any memory allocated - REQUIRED */ - png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); - - /* close the file */ - fclose(fp); - - /* that's it */ - return; -} - -/* progressively read a file */ - -int -initialize_png_reader(png_structp *png_ptr, png_infop *info_ptr) -{ - /* Create and initialize the png_struct with the desired error handler - * functions. If you want to use the default stderr and longjump method, - * you can supply NULL for the last three parameters. We also check that - * the library version is compatible in case we are using dynamically - * linked libraries. - */ - *png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, - (void *)user_error_ptr, user_error_fn, user_warning_fn); - - if (*png_ptr == NULL) - { - *info_ptr = NULL; - return ERROR; - } - - *info_ptr = png_create_info_struct(png_ptr); - - if (*info_ptr == NULL) - { - png_destroy_read_struct(png_ptr, info_ptr, (png_infopp)NULL); - return ERROR; - } - - if (setjmp((*png_ptr)->jmpbuf)) - { - png_destroy_read_struct(png_ptr, info_ptr, (png_infopp)NULL); - return ERROR; - } - - /* this one's new. You will need to provide all three - * function callbacks, even if you aren't using them all. - * These functions shouldn't be dependent on global or - * static variables if you are decoding several images - * simultaneously. You should store stream specific data - * in a separate struct, given as the second parameter, - * and retrieve the pointer from inside the callbacks using - * the function png_get_progressive_ptr(png_ptr). - */ - png_set_progressive_read_fn(*png_ptr, (void *)stream_data, - info_callback, row_callback, end_callback); - - return OK; -} - -int -process_data(png_structp *png_ptr, png_infop *info_ptr, - png_bytep buffer, png_uint_32 length) -{ - if (setjmp((*png_ptr)->jmpbuf)) - { - /* Free the png_ptr and info_ptr memory on error */ - png_destroy_read_struct(png_ptr, info_ptr, (png_infopp)NULL); - return ERROR; - } - - /* This one's new also. Simply give it chunks of data as - * they arrive from the data stream (in order, of course). - * On Segmented machines, don't give it any more than 64K. - * The library seems to run fine with sizes of 4K, although - * you can give it much less if necessary (I assume you can - * give it chunks of 1 byte, but I haven't tried with less - * than 256 bytes yet). When this function returns, you may - * want to display any rows that were generated in the row - * callback, if you aren't already displaying them there. - */ - png_process_data(*png_ptr, *info_ptr, buffer, length); - return OK; -} - -info_callback(png_structp png_ptr, png_infop info) -{ -/* do any setup here, including setting any of the transformations - * mentioned in the Reading PNG files section. For now, you _must_ - * call either png_start_read_image() or png_read_update_info() - * after all the transformations are set (even if you don't set - * any). You may start getting rows before png_process_data() - * returns, so this is your last chance to prepare for that. - */ -} - -row_callback(png_structp png_ptr, png_bytep new_row, - png_uint_32 row_num, int pass) -{ -/* this function is called for every row in the image. If the - * image is interlacing, and you turned on the interlace handler, - * this function will be called for every row in every pass. - * Some of these rows will not be changed from the previous pass. - * When the row is not changed, the new_row variable will be NULL. - * The rows and passes are called in order, so you don't really - * need the row_num and pass, but I'm supplying them because it - * may make your life easier. - * - * For the non-NULL rows of interlaced images, you must call - * png_progressive_combine_row() passing in the row and the - * old row. You can call this function for NULL rows (it will - * just return) and for non-interlaced images (it just does the - * memcpy for you) if it will make the code easier. Thus, you - * can just do this for all cases: - */ - - png_progressive_combine_row(png_ptr, old_row, new_row); - -/* where old_row is what was displayed for previous rows. Note - * that the first pass (pass == 0 really) will completely cover - * the old row, so the rows do not have to be initialized. After - * the first pass (and only for interlaced images), you will have - * to pass the current row, and the function will combine the - * old row and the new row. - */ -} - -end_callback(png_structp png_ptr, png_infop info) -{ -/* this function is called when the whole image has been read, - * including any chunks after the image (up to and including - * the IEND). You will usually have the same info chunk as you - * had in the header, although some data may have been added - * to the comments and time fields. - * - * Most people won't do much here, perhaps setting a flag that - * marks the image as finished. - */ -} - -/* write a png file */ -void write_png(char *file_name /* , ... other image information ... */) -{ - FILE *fp; - png_structp png_ptr; - png_infop info_ptr; - - /* open the file */ - fp = fopen(file_name, "wb"); - if (fp == NULL) - return; - - /* Create and initialize the png_struct with the desired error handler - * functions. If you want to use the default stderr and longjump method, - * you can supply NULL for the last three parameters. We also check that - * the library version is compatible with the one used at compile time, - * in case we are using dynamically linked libraries. REQUIRED. - */ - png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, - (void *)user_error_ptr, user_error_fn, user_warning_fn); - - if (png_ptr == NULL) - { - fclose(fp); - return; - } - - /* Allocate/initialize the image information data. REQUIRED */ - info_ptr = png_create_info_struct(png_ptr); - if (info_ptr == NULL) - { - fclose(fp); - png_destroy_write_struct(&png_ptr, (png_infopp)NULL); - return; - } - - /* Set error handling. REQUIRED if you aren't supplying your own - * error hadnling functions in the png_create_write_struct() call. - */ - if (setjmp(png_ptr->jmpbuf)) - { - /* If we get here, we had a problem reading the file */ - fclose(fp); - png_destroy_write_struct(&png_ptr, (png_infopp)NULL); - return; - } - - /* One of the following I/O initialization functions is REQUIRED */ -#ifdef streams /* I/O initialization method 1 */ - /* set up the output control if you are using standard C streams */ - png_init_io(png_ptr, fp); -#else no_streams /* I/O initialization method 2 */ - /* If you are using replacement read functions, instead of calling - * png_init_io() here you would call */ - png_set_write_fn(png_ptr, (void *)user_io_ptr, user_write_fn, - user_IO_flush_function); - /* where user_io_ptr is a structure you want available to the callbacks */ -#endif no_streams /* only use one initialization method */ - - /* Set the image information here. Width and height are up to 2^31, - * bit_depth is one of 1, 2, 4, 8, or 16, but valid values also depend on - * the color_type selected. color_type is one of PNG_COLOR_TYPE_GRAY, - * PNG_COLOR_TYPE_GRAY_ALPHA, PNG_COLOR_TYPE_PALETTE, PNG_COLOR_TYPE_RGB, - * or PNG_COLOR_TYPE_RGB_ALPHA. interlace is either PNG_INTERLACE_NONE or - * PNG_INTERLACE_ADAM7, and the compression_type and filter_type MUST - * currently be PNG_COMPRESSION_TYPE_BASE and PNG_FILTER_TYPE_BASE. REQUIRED - */ - png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, PNG_COLOR_TYPE_???, - PNG_INTERLACE_????, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); - - /* set the palette if there is one. REQUIRED for indexed-color images */ - palette = (png_colorp)png_malloc(png_ptr, 256 * sizeof (png_color)); - /* ... set palette colors ... */ - png_set_PLTE(png_ptr, info_ptr, palette, 256); - - /* optional significant bit chunk */ - /* if we are dealing with a grayscale image then */ - sig_bit.gray = true_bit_depth; - /* otherwise, if we are dealing with a color image then */ - sig_bit.red = true_red_bit_depth; - sig_bit.green = true_green_bit_depth; - sig_bit.blue = true_blue_bit_depth; - /* if the image has an alpha channel then */ - sig_bit.alpha = true_alpha_bit_depth; - png_set_sBIT(png_ptr, info_ptr, sig_bit); - - - /* Optional gamma chunk is strongly suggested if you have any guess - * as to the correct gamma of the image. - */ - png_set_gAMA(png_ptr, info_ptr, gamma); - - /* Optionally write comments into the image */ - text_ptr[0].key = "Title"; - text_ptr[0].text = "Mona Lisa"; - text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE; - text_ptr[1].key = "Author"; - text_ptr[1].text = "Leonardo DaVinci"; - text_ptr[1].compression = PNG_TEXT_COMPRESSION_NONE; - text_ptr[2].key = "Description"; - text_ptr[2].text = ""; - text_ptr[2].compression = PNG_TEXT_COMPRESSION_zTXt; - png_set_text(png_ptr, info_ptr, text_ptr, 2); - - /* other optional chunks like cHRM, bKGD, tRNS, tIME, oFFs, pHYs, */ - /* note that if sRGB is present the cHRM chunk must be ignored - * on read and must be written in accordance with the sRGB profile */ - - /* Write the file header information. REQUIRED */ - png_write_info(png_ptr, info_ptr); - - /* Once we write out the header, the compression type on the text - * chunks gets changed to PNG_TEXT_COMPRESSION_NONE_WR or - * PNG_TEXT_COMPRESSION_zTXt_WR, so it doesn't get written out again - * at the end. - */ - - /* set up the transformations you want. Note that these are - * all optional. Only call them if you want them. - */ - - /* invert monocrome pixels */ - png_set_invert_mono(png_ptr); - - /* Shift the pixels up to a legal bit depth and fill in - * as appropriate to correctly scale the image. - */ - png_set_shift(png_ptr, &sig_bit); - - /* pack pixels into bytes */ - png_set_packing(png_ptr); - - /* swap location of alpha bytes from ARGB to RGBA */ - png_set_swap_alpha(png_ptr); - - /* Get rid of filler (OR ALPHA) bytes, pack XRGB/RGBX/ARGB/RGBA into - * RGB (4 channels -> 3 channels). The second parameter is not used. - */ - png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); - - /* flip BGR pixels to RGB */ - png_set_bgr(png_ptr); - - /* swap bytes of 16-bit files to most significant byte first */ - png_set_swap(png_ptr); - - /* swap bits of 1, 2, 4 bit packed pixel formats */ - png_set_packswap(png_ptr); - - /* turn on interlace handling if you are not using png_write_image() */ - if (interlacing) - number_passes = png_set_interlace_handling(png_ptr); - else - number_passes = 1; - - /* The easiest way to write the image (you may have a different memory - * layout, however, so choose what fits your needs best). You need to - * use the first method if you aren't handling interlacing yourself. - */ - png_byte row_pointers[height][width]; - - /* One of the following output methods is REQUIRED */ -#ifdef entire /* write out the entire image data in one call */ - png_write_image(png_ptr, row_pointers); - - /* the other way to write the image - deal with interlacing */ - -#else no_entire /* write out the image data by one or more scanlines */ - /* The number of passes is either 1 for non-interlaced images, - * or 7 for interlaced images. - */ - for (pass = 0; pass < number_passes; pass++) - { - /* Write a few rows at a time. */ - png_write_rows(png_ptr, row_pointers, number_of_rows); - - /* If you are only writing one row at a time, this works */ - for (y = 0; y < height; y++) - { - png_bytep row_pointers = row[y]; - png_write_rows(png_ptr, &row_pointers, 1); - } - } -#endif no_entire /* use only one output method */ - - /* You can write optional chunks like tEXt, zTXt, and tIME at the end - * as well. - */ - - /* It is REQUIRED to call this to finish writing the rest of the file */ - png_write_end(png_ptr, info_ptr); - - /* if you malloced the palette, free it here */ - free(info_ptr->palette); - - /* if you allocated any text comments, free them here */ - - /* clean up after the write, and free any memory allocated */ - png_destroy_write_struct(&png_ptr, (png_infopp)NULL); - - /* close the file */ - fclose(fp); - - /* that's it */ - return; -} - diff --git a/src/png/libpng.3 b/src/png/libpng.3 deleted file mode 100644 index 88d8c9642c..0000000000 --- a/src/png/libpng.3 +++ /dev/null @@ -1,2409 +0,0 @@ -.TH LIBPNG 3 "March 15, 1998" -.SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library -.SH SYNOPSIS - -#include - -int png_check_sig (png_bytep sig, int num); - -void png_chunk_error (png_structp png_ptr, png_const_charp -error); - -void png_chunk_warning (png_structp png_ptr, png_const_charp -message); - -void png_convert_from_struct_tm (png_timep ptime, struct tm FAR -* ttime); - -void png_convert_from_time_t (png_timep ptime, time_t ttime); - -png_charp png_convert_to_rfc1123 (png_structp png_ptr, -png_timep ptime); - -png_infop png_create_info_struct (png_structp png_ptr); - -png_structp png_create_read_struct (png_const_charp -user_png_ver, voidp error_ptr, png_error_ptr error_fn, -png_error_ptr warn_fn); - -png_structp png_create_write_struct (png_const_charp -user_png_ver, voidp error_ptr, png_error_ptr error_fn, -png_error_ptr warn_fn); - -void png_debug_free (png_structp png_ptr, png_voidp ptr); - -png_voidp png_debug_malloc (png_structp png_ptr, png_uint_32 -size); - -void png_destroy_info_struct (png_structp png_ptr, png_infopp -info_ptr_ptr); - -void png_destroy_read_struct (png_structpp png_ptr_ptr, -png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr); - -void png_destroy_write_struct (png_structpp png_ptr_ptr, -png_infopp info_ptr_ptr); - -void png_error (png_structp png_ptr, png_const_charp error); - -void png_free (png_structp png_ptr, png_voidp ptr); - -png_byte png_get_bit_depth (png_structp png_ptr, png_infop -info_ptr); - -png_uint_32 png_get_bKGD (png_structp png_ptr, png_infop -info_ptr, png_color_16p *background); - -png_byte png_get_channels (png_structp png_ptr, png_infop -info_ptr); - -png_uint_32 png_get_cHRM (png_structp png_ptr, png_infop -info_ptr, double *white_x, double *white_y, double *red_x, -double *red_y, double *green_x, double *green_y, double -*blue_x, double *blue_y); - -png_byte png_get_color_type (png_structp png_ptr, png_infop -info_ptr); - -png_byte png_get_compression_type (png_structp png_ptr, -png_infop info_ptr); - -png_voidp png_get_error_ptr (png_structp png_ptr); - -png_byte png_get_filter_type (png_structp png_ptr, png_infop -info_ptr); - -png_uint_32 png_get_gAMA (png_structp png_ptr, png_infop -info_ptr, double *file_gamma); - -png_uint_32 png_get_hIST (png_structp png_ptr, png_infop -info_ptr, png_uint_16p *hist); - -png_uint_32 png_get_image_height (png_structp png_ptr, -png_infop info_ptr); - -png_uint_32 png_get_image_width (png_structp png_ptr, png_infop -info_ptr); - -png_byte png_get_interlace_type (png_structp png_ptr, png_infop -info_ptr); - -png_voidp png_get_io_ptr (png_structp png_ptr); - -png_uint_32 png_get_IHDR (png_structp png_ptr, png_infop -info_ptr, png_uint_32 *width, png_uint_32 *height, int -*bit_depth, int *color_type, int *interlace_type, int -*compression_type, int *filter_type); - -png_uint_32 png_get_oFFs (png_structp png_ptr, png_infop -info_ptr, png_uint_32 *offset_x, png_uint_32 *offset_y, int -*unit_type); - -png_uint_32 png_get_pCAL (png_structp png_ptr, png_infop -info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1, -int *type, int *nparams, png_charp *units, png_charpp *params); - -png_uint_32 png_get_pHYs (png_structp png_ptr, png_infop -info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int -*unit_type); - -float png_get_pixel_aspect_ratio (png_structp png_ptr, -png_infop info_ptr); - -png_uint_32 png_get_pixels_per_meter (png_structp png_ptr, -png_infop info_ptr); - -png_voidp png_get_progressive_ptr (png_structp png_ptr); - -png_uint_32 png_get_PLTE (png_structp png_ptr, png_infop -info_ptr, png_colorp *palette, int *num_palette); - -png_uint_32 png_get_rowbytes (png_structp png_ptr, png_infop -info_ptr); - -png_uint_32 png_get_sBIT (png_structp png_ptr, png_infop -info_ptr, png_color_8p *sig_bit); - -png_bytep png_get_signature (png_structp png_ptr, png_infop -info_ptr); - -png_uint_32 png_get_sRGB (png_structp png_ptr, png_infop -info_ptr, int *intent); - -png_uint_32 png_get_text (png_structp png_ptr, png_infop -info_ptr, png_textp *text_ptr, int *num_text); - -png_uint_32 png_get_tIME (png_structp png_ptr, png_infop -info_ptr, png_timep *mod_time); - -png_uint_32 png_get_tRNS (png_structp png_ptr, png_infop -info_ptr, png_bytep *trans, int *num_trans, png_color_16p -*trans_values); - -png_uint_32 png_get_valid (png_structp png_ptr, png_infop -info_ptr, png_uint_32 flag); - -png_uint_32 png_get_x_offset_microns (png_structp png_ptr, -png_infop info_ptr); - -png_uint_32 png_get_x_offset_pixels (png_structp png_ptr, -png_infop info_ptr); - -png_uint_32 png_get_x_pixels_per_meter (png_structp png_ptr, -png_infop info_ptr); - -png_uint_32 png_get_y_offset_microns (png_structp png_ptr, -png_infop info_ptr); - -png_uint_32 png_get_y_offset_pixels (png_structp png_ptr, -png_infop info_ptr); - -png_uint_32 png_get_y_pixels_per_meter (png_structp png_ptr, -png_infop info_ptr); - -void png_info_init (png_infop info_ptr); - -void png_init_io (png_structp png_ptr, FILE *fp); - -png_voidp png_malloc (png_structp png_ptr, png_uint_32 size); - -voidp png_memcpy (png_voidp s1, png_voidp s2, png_size_t size); - -png_voidp png_memcpy_check (png_structp png_ptr, png_voidp s1, -png_voidp s2, png_uint_32 size); - -voidp png_memset (png_voidp s1, int value, png_size_t size); - -png_voidp png_memset_check (png_structp png_ptr, png_voidp -s1, int value, png_uint_32 size); - -void png_process_data (png_structp png_ptr, png_infop info_ptr, -png_bytep buffer, png_size_t buffer_size); - -void png_progressive_combine_row (png_structp png_ptr, -png_bytep old_row, png_bytep new_row); - -void png_read_destroy (png_structp png_ptr, png_infop info_ptr, -png_infop end_info_ptr); - -void png_read_end (png_structp png_ptr, png_infop info_ptr); - -void png_read_image (png_structp png_ptr, png_bytepp image); - -void png_read_info (png_structp png_ptr, png_infop info_ptr); - -void png_read_row (png_structp png_ptr, png_bytep row, -png_bytep display_row); - -void png_read_rows (png_structp png_ptr, png_bytepp row, -png_bytepp display_row, png_uint_32 num_rows); - -void png_read_update_info (png_structp png_ptr, png_infop -info_ptr); - -void png_set_background (png_structp png_ptr, png_color_16p -background_color, int background_gamma_code, int need_expand, -double background_gamma); - -void png_set_bgr (png_structp png_ptr); - -void png_set_bKGD (png_structp png_ptr, png_infop info_ptr, -png_color_16p background); - -void png_set_cHRM (png_structp png_ptr, png_infop info_ptr, -double white_x, double white_y, double red_x, double red_y, -double green_x, double green_y, double blue_x, double blue_y); - -void png_set_compression_level (png_structp png_ptr, int -level); - -void png_set_compression_mem_level (png_structp png_ptr, int -mem_level); - -void png_set_compression_method (png_structp png_ptr, int -method); - -void png_set_compression_strategy (png_structp png_ptr, int -strategy); - -void png_set_compression_window_bits (png_structp png_ptr, int -window_bits); - -void png_set_crc_action (png_structp png_ptr, int crit_action, -int ancil_action); - -void png_set_dither (png_structp png_ptr, png_colorp palette, -int num_palette, int maximum_colors, png_uint_16p histogram, -int full_dither); - -void png_set_error_fn (png_structp png_ptr, png_voidp -error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn); - -void png_set_expand (png_structp png_ptr); - -void png_set_filler (png_structp png_ptr, png_uint_32 filler, -int flags); - -void png_set_filter (png_structp png_ptr, int method, int -filters); - -void png_set_filter_heuristics (png_structp png_ptr, int -heuristic_method, int num_weights, png_doublep filter_weights, -png_doublep filter_costs); - -void png_set_flush (png_structp png_ptr, int nrows); - -void png_set_gamma (png_structp png_ptr, double screen_gamma, -double default_file_gamma); - -void png_set_gAMA (png_structp png_ptr, png_infop info_ptr, -double file_gamma); - -void png_set_gray_to_rgb (png_structp png_ptr); - -void png_set_hIST (png_structp png_ptr, png_infop info_ptr, -png_uint_16p hist); - -int png_set_interlace_handling (png_structp png_ptr); - -void png_set_invert_alpha (png_structp png_ptr); - -void png_set_invert_mono (png_structp png_ptr); - -void png_set_IHDR (png_structp png_ptr, png_infop info_ptr, -png_uint_32 width, png_uint_32 height, int bit_depth, int -color_type, int interlace_type, int compression_type, int -filter_type); - -void png_set_oFFs (png_structp png_ptr, png_infop info_ptr, -png_uint_32 offset_x, png_uint_32 offset_y, int unit_type); - -void png_set_packing (png_structp png_ptr); - -void png_set_packswap (png_structp png_ptr); - -void png_set_pCAL (png_structp png_ptr, png_infop info_ptr, -png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int -nparams, png_charp units, png_charpp params); - -void png_set_pHYs (png_structp png_ptr, png_infop info_ptr, -png_uint_32 res_x, png_uint_32 res_y, int unit_type); - -void png_set_progressive_read_fn (png_structp png_ptr, -png_voidp progressive_ptr, png_progressive_info_ptr info_fn, -png_progressive_row_ptr row_fn, png_progressive_end_ptr -end_fn); - -void png_set_PLTE (png_structp png_ptr, png_infop info_ptr, -png_colorp palette, int num_palette); - -void png_set_read_fn (png_structp png_ptr, png_voidp io_ptr, -png_rw_ptr read_data_fn); - -void png_set_read_status_fn (png_structp png_ptr, png_read_status_ptr - read_row_fn); - -void png_set_read_user_transform_fn (png_structp png_ptr, - png_user_transform_ptr read_user_transform_fn); - -void png_set_rgb_to_gray (png_structp png_ptr); - -void png_set_sBIT (png_structp png_ptr, png_infop info_ptr, -png_color_8p sig_bit); - -void png_set_shift (png_structp png_ptr, png_color_8p -true_bits); - -void png_set_sig_bytes (png_structp png_ptr, int num_bytes); - -void png_set_sRGB (png_structp png_ptr, png_infop info_ptr, int -intent); - -void png_set_sRGB_gAMA_and_cHRM (png_structp png_ptr, png_infop -info_ptr, int intent); - -void png_set_strip_16 (png_structp png_ptr); - -void png_set_strip_alpha (png_structp png_ptr); - -void png_set_swap (png_structp png_ptr); - -void png_set_swap_alpha (png_structp png_ptr); - -void png_set_text (png_structp png_ptr, png_infop info_ptr, -png_textp text_ptr, int num_text); - -void png_set_tIME (png_structp png_ptr, png_infop info_ptr, -png_timep mod_time); - -void png_set_tRNS (png_structp png_ptr, png_infop info_ptr, -png_bytep trans, int num_trans, png_color_16p trans_values); - -void png_set_write_fn (png_structp png_ptr, png_voidp io_ptr, -png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn); - -void png_set_write_status_fn (png_structp png_ptr, png_write_status_ptr - write_row_fn); - -void png_set_write_user_transform_fn (png_structp png_ptr, - png_user_transform_ptr write_user_transform_fn); - -int png_sig_cmp (png_bytep sig, png_size_t start, png_size_t -num_to_check); - -void png_start_read_image (png_structp png_ptr); - -void png_warning (png_structp png_ptr, png_const_charp -message); - -void png_write_chunk (png_structp png_ptr, png_bytep -chunk_name, png_bytep data, png_size_t length); - -void png_write_chunk_data (png_structp png_ptr, png_bytep data, -png_size_t length); - -void png_write_chunk_end (png_structp png_ptr); - -void png_write_chunk_start (png_structp png_ptr, png_bytep -chunk_name, png_uint_32 length); - -void png_write_destroy (png_structp png_ptr); - -void png_write_destroy_info (png_infop info_ptr); - -void png_write_end (png_structp png_ptr, png_infop info_ptr); - -void png_write_flush (png_structp png_ptr); - -void png_write_image (png_structp png_ptr, png_bytepp image); - -void png_write_info (png_structp png_ptr, png_infop info_ptr); - -void png_write_row (png_structp png_ptr, png_bytep row); - -void png_write_rows (png_structp png_ptr, png_bytepp row, -png_uint_32 num_rows); - -.SH DESCRIPTION -The -.I libpng -library supports encoding, decoding, and various manipulations of -the Portable Network Graphics (PNG) format image files. It uses the -.IR zlib(3) -compression library. -Following is a copy of the libpng.txt file that accompanies libpng. -.SH LIBPNG.TXT -libpng.txt - A description on how to use and modify libpng - - libpng version 1.0.1 March 15, 1998 - Updated and distributed by Glenn Randers-Pehrson - - Copyright (c) 1998, Glenn Randers-Pehrson - For conditions of distribution and use, see copyright - notice in png.h. - - based on: - - libpng 1.0 beta 6 version 0.96 May 28, 1997 - Updated and distributed by Andreas Dilger - Copyright (c) 1996, 1997 Andreas Dilger - - libpng 1.0 beta 2 - version 0.88 January 26, 1996 - For conditions of distribution and use, see copyright - notice in png.h. Copyright (c) 1995, 1996 Guy Eric - Schalnat, Group 42, Inc. - - Updated/rewritten per request in the libpng FAQ - Copyright (c) 1995 Frank J. T. Wojcik - December 18, 1995 && January 20, 1996 - -.SH I. Introduction - -This file describes how to use and modify the PNG reference library -(known as libpng) for your own use. There are five sections to this -file: introduction, structures, reading, writing, and modification and -configuration notes for various special platforms. In addition to this -file, example.c is a good starting point for using the library, as -it is heavily commented and should include everything most people -will need. We assume that libpng is already installed; see the -INSTALL file for instructions on how to install libpng. - -Libpng was written as a companion to the PNG specification, as a way -of reducing the amount of time and effort it takes to support the PNG -file format in application programs. The PNG specification is available -as RFC 2083 and as a -W3C Recommendation . Some -additional chunks are described in the special-purpose public chunks -documents at . Other information -about PNG can be found at the PNG home page, . - -Most users will not have to modify the library significantly; advanced -users may want to modify it more. All attempts were made to make it as -complete as possible, while keeping the code easy to understand. -Currently, this library only supports C. Support for other languages -is being considered. - -Libpng has been designed to handle multiple sessions at one time, -to be easily modifiable, to be portable to the vast majority of -machines (ANSI, K&R, 16-, 32-, and 64-bit) available, and to be easy -to use. The ultimate goal of libpng is to promote the acceptance of -the PNG file format in whatever way possible. While there is still -work to be done (see the TODO file), libpng should cover the -majority of the needs of its users. - -Libpng uses zlib for its compression and decompression of PNG files. -The zlib compression utility is a general purpose utility that is -useful for more than PNG files, and can be used without libpng. -See the documentation delivered with zlib for more details. -You can usually find the source files for the zlib utility wherever you -find the libpng source files. - -Libpng is thread safe, provided the threads are using different -instances of the structures. Each thread should have its own -png_struct and png_info instances, and thus its own image. -Libpng does not protect itself against two threads using the -same instance of a structure. - - -.SH II. Structures - -There are two main structures that are important to libpng, png_struct -and png_info. The first, png_struct, is an internal structure that -will not, for the most part, be used by a user except as the first -variable passed to every libpng function call. - -The png_info structure is designed to provide information about the -PNG file. At one time, the fields of png_info were intended to be -directly accessible to the user. However, this tended to cause problems -with applications using dynamically loaded libraries, and as a result -a set of interface functions for png_info was developed. The fields -of png_info are still available for older applications, but it is -suggested that applications use the new interfaces if at all possible. - -The png.h header file is an invaluable reference for programming with libpng. -And while I'm on the topic, make sure you include the libpng header file: - -#include - -.SH III. Reading - -Reading PNG files: - -We'll now walk you through the possible functions to call when reading -in a PNG file, briefly explaining the syntax and purpose of each one. -See example.c and png.h for more detail. While Progressive reading -is covered in the next section, you will still need some of the -functions discussed in this section to read a PNG file. - -You will want to do the I/O initialization(*) before you get into libpng, -so if it doesn't work, you don't have much to undo. Of course, you -will also want to insure that you are, in fact, dealing with a PNG -file. Libpng provides a simple check to see if a file is a PNG file. -To use it, pass in the first 1 to 8 bytes of the file, and it will -return true or false (1 or 0) depending on whether the bytes could be -part of a PNG file. Of course, the more bytes you pass in, the -greater the accuracy of the prediction. - -If you are intending to keep the file pointer open for use in libpng, -you must ensure you don't read more than 8 bytes from the beginning -of the file, and you also have to make a call to png_set_sig_bytes_read() -with the number of bytes you read from the beginning. Libpng will -then only check the bytes (if any) that your program didn't read. - -(*): If you are not using the standard I/O functions, you will need -to replace them with custom functions. See the discussion under -Customizing libpng. - - - FILE *fp = fopen(file_name, "rb"); - if (!fp) - { - return; - } - fread(header, 1, number, fp); - is_png = png_check_sig(header, 0, number); - if (!is_png) - { - return; - } - - -Next, png_struct and png_info need to be allocated and initialized. In -order to ensure that the size of these structures is correct even with a -dynamically linked libpng, there are functions to initialize and -allocate the structures. We also pass the library version, optional -pointers to error handling functions, and a pointer to a data struct for -use by the error functions, if necessary (the pointer and functions can -be NULL if the default error handlers are to be used). See the section -on Changes to Libpng below regarding the old initialization functions. - - png_structp png_ptr = png_create_read_struct - (PNG_LIBPNG_VER_STRING, (void *)user_error_ptr, - user_error_fn, user_warning_fn); - if (!png_ptr) - return; - - png_infop info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) - { - png_destroy_read_struct(&png_ptr, - (png_infopp)NULL, (png_infopp)NULL); - return; - } - - png_infop end_info = png_create_info_struct(png_ptr); - if (!end_info) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)NULL); - return; - } - - -The error handling routines passed to png_create_read_struct() are only -necessary if you are not using the libpng supplied error handling -functions. When libpng encounters an error, it expects to longjmp back -to your routine. Therefore, you will need to call setjmp and pass the -jmpbuf field of your png_struct. If you read the file from different -routines, you will need to update the jmpbuf field every time you enter -a new routine that will call a png_ function. - -See your documentation of setjmp/longjmp for your compiler for more -handling in the Customizing Libpng section below for more information on -the libpng error handling. If an error occurs, and libpng longjmp's -back to your setjmp, you will want to call png_destroy_read_struct() to -free any memory. - - if (setjmp(png_ptr->jmpbuf)) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - &end_info); - fclose(fp); - return; - } - -Now you need to set up the input code. The default for libpng is to -use the C function fread(). If you use this, you will need to pass a -valid FILE * in the function png_init_io(). Be sure that the file is -opened in binary mode. If you wish to handle reading data in another -way, you need not call the png_init_io() function, but you must then -implement the libpng I/O methods discussed in the Customizing Libpng -section below. - - png_init_io(png_ptr, fp); - -If you had previously opened the file and read any of the signature from -the beginning in order to see if this was a PNG file, you need to let -libpng know that there are some bytes missing from the start of the file. - - png_set_sig_bytes(png_ptr, number); - -At this point, you can set up a callback function that will be -called after each row has been read, which you can use to control -a progress meter or the like. It's demonstrated in pngtest.c. -You must supply a function - - void read_row_callback(png_ptr, png_uint_32 row, int pass); - { - /* put your code here */ - } - -(You can give it another name that you like instead of "read_row_callback") - -To inform libpng about your function, use - - png_set_read_status_fn(png_ptr, read_row_callback); - -In PNG files, the alpha channel in an image is the level of opacity. -If you need the alpha channel in an image to be the level of transparency -instead of opacity, you can invert the alpha channel (or the tRNS chunk -data) after it's read, so that 0 is fully opaque and 255 (in 8-bit or -paletted images) or 65535 (in 16-bit images) is fully transparent, with - - png_set_invert_alpha(png_ptr); - -This has to appear here rather than later with the other transformations -because the tRNS chunk data must be modified in the case of paletted images. -If your image is not a paletted image, the tRNS data (which in such cases -represents a single color to be rendered as transparent) won't be changed. - -Finally, you can write your own transformation function if none of -the existing ones meets your needs. This is done by setting a callback -with - - png_set_read_user_transform_fn(png_ptr, - read_transform_fn); - -You must supply the function - - void read_transform_fn(png_ptr ptr, row_info_ptr - row_info, png_bytep data) - -See pngtest.c for a working example. Your function will be called -after all of the other transformations have been processed. - -You are now ready to read all the file information up to the actual -image data. You do this with a call to png_read_info(). - - png_read_info(png_ptr, info_ptr); - -Functions are used to get the information from the info_ptr: - - png_get_IHDR(png_ptr, info_ptr, &width, &height, - &bit_depth, &color_type, &interlace_type, - &compression_type, &filter_type); - - width - holds the width of the image - in pixels (up to 2^31). - height - holds the height of the image - in pixels (up to 2^31). - bit_depth - holds the bit depth of one of the - image channels. (valid values are - 1, 2, 4, 8, 16 and depend also on - the color_type. See also - significant bits (sBIT) below). - color_type - describes which color/alpha channels - are present. - PNG_COLOR_TYPE_GRAY - (bit depths 1, 2, 4, 8, 16) - PNG_COLOR_TYPE_GRAY_ALPHA - (bit depths 8, 16) - PNG_COLOR_TYPE_PALETTE - (bit depths 1, 2, 4, 8) - PNG_COLOR_TYPE_RGB - (bit_depths 8, 16) - PNG_COLOR_TYPE_RGB_ALPHA - (bit_depths 8, 16) - - PNG_COLOR_MASK_PALETTE - PNG_COLOR_MASK_COLOR - PNG_COLOR_MASK_ALPHA - - filter_type - (must be PNG_FILTER_TYPE_BASE - for PNG 1.0) - compression_type - (must be PNG_COMPRESSION_TYPE_BASE - for PNG 1.0) - interlace_type - (PNG_INTERLACE_NONE or - PNG_INTERLACE_ADAM7) - Any or all of interlace_type, compression_type, of - filter_type can be - NULL if you are not interested in their values. - - channels = png_get_channels(png_ptr, info_ptr); - channels - number of channels of info for the - color type (valid values are 1 (GRAY, - PALETTE), 2 (GRAY_ALPHA), 3 (RGB), - 4 (RGB_ALPHA or RGB + filler byte)) - rowbytes = png_get_rowbytes(png_ptr, info_ptr); - rowbytes - number of bytes needed to hold a row - - signature = png_get_signature(png_ptr, info_ptr); - signature - holds the signature read from the - file (if any). The data is kept in - the same offset it would be if the - whole signature were read (i.e. if an - application had already read in 4 - bytes of signature before starting - libpng, the remaining 4 bytes would - be in signature[4] through signature[7] - (see png_set_sig_bytes())). - - - width = png_get_image_width(png_ptr, - info_ptr); - height = png_get_image_height(png_ptr, - info_ptr); - bit_depth = png_get_bit_depth(png_ptr, - info_ptr); - color_type = png_get_color_type(png_ptr, - info_ptr); - filter_type = png_get_filter_type(png_ptr, - info_ptr); - compression_type = png_get_compression_type(png_ptr, - info_ptr); - interlace_type = png_get_interlace_type(png_ptr, - info_ptr); - - -These are also important, but their validity depends on whether the chunk -has been read. The png_get_valid(png_ptr, info_ptr, PNG_INFO_) and -png_get_(png_ptr, info_ptr, ...) functions return non-zero if the -data has been read, or zero if it is missing. The parameters to the -png_get_ are set directly if they are simple data types, or a pointer -into the info_ptr is returned for any complex types. - - png_get_PLTE(png_ptr, info_ptr, &palette, - &num_palette); - palette - the palette for the file - (array of png_color) - num_palette - number of entries in the palette - - png_get_gAMA(png_ptr, info_ptr, &gamma); - gamma - the gamma the file is written - at (PNG_INFO_gAMA) - - png_get_sRGB(png_ptr, info_ptr, &srgb_intent); - srgb_intent - the rendering intent (PNG_INFO_sRGB) - The presence of the sRGB chunk - means that the pixel data is in the - sRGB color space. This chunk also - implies specific values of gAMA and - cHRM. - - png_get_sBIT(png_ptr, info_ptr, &sig_bit); - sig_bit - the number of significant bits for - (PNG_INFO_sBIT) each of the gray, - red, green, and blue channels, - whichever are appropriate for the - given color type (png_color_16) - - png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, - &trans_values); - trans - array of transparent entries for - palette (PNG_INFO_tRNS) - trans_values - transparent pixel for non-paletted - images (PNG_INFO_tRNS) - num_trans - number of transparent entries - (PNG_INFO_tRNS) - - png_get_hIST(png_ptr, info_ptr, &hist); - (PNG_INFO_hIST) - hist - histogram of palette (array of - png_color_16) - - png_get_tIME(png_ptr, info_ptr, &mod_time); - mod_time - time image was last modified - (PNG_VALID_tIME) - - png_get_bKGD(png_ptr, info_ptr, &background); - background - background color (PNG_VALID_bKGD) - - num_text = png_get_text(png_ptr, info_ptr, &text_ptr); - text_ptr - array of png_text holding image - comments - text_ptr[i]->key - keyword for comment. - text_ptr[i]->text - text comments for current - keyword. - text_ptr[i]->compression - type of compression used - on "text" PNG_TEXT_COMPRESSION_NONE - or PNG_TEXT_COMPRESSION_zTXt - num_text - number of comments - - png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y, - &unit_type); - offset_x - positive offset from the left edge - of the screen - offset_y - positive offset from the top edge - of the screen - unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER - - png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y, - &unit_type); - res_x - pixels/unit physical resolution in - x direction - res_y - pixels/unit physical resolution in - x direction - unit_type - PNG_RESOLUTION_UNKNOWN, - PNG_RESOLUTION_METER - -The data from the pHYs chunk can be retrieved in several convenient -forms: - - res_x = png_get_x_pixels_per_meter(png_ptr, - info_ptr) - res_y = png_get_y_pixels_per_meter(png_ptr, - info_ptr) - res_x_and_y = png_get_pixels_per_meter(png_ptr, - info_ptr) - aspect_ratio = png_get_pixel_aspect_ratio(png_ptr, - info_ptr) - - (Each of these returns 0 [signifying "unknown"] if - the data is not present or if res_x is 0; - res_x_and_y is 0 if res_x != res_y) - -For more information, see the png_info definition in png.h and the -PNG specification for chunk contents. Be careful with trusting -rowbytes, as some of the transformations could increase the space -needed to hold a row (expand, filler, gray_to_rgb, etc.). -See png_read_update_info(), below. - -A quick word about text_ptr and num_text. PNG stores comments in -keyword/text pairs, one pair per chunk, with no limit on the number -of text chunks, and a 2^31 byte limit on their size. While there are -suggested keywords, there is no requirement to restrict the use to these -strings. It is strongly suggested that keywords and text be sensible -to humans (that's the point), so don't use abbreviations. Non-printing -symbols are not allowed. See the PNG specification for more details. -There is also no requirement to have text after the keyword. - -Keywords should be limited to 79 Latin-1 characters without leading or -trailing spaces, but non-consecutive spaces are allowed within the -keyword. It is possible to have the same keyword any number of times. -The text_ptr is an array of png_text structures, each holding pointer -to a keyword and a pointer to a text string. Only the text string may -be null. The keyword/text pairs are put into the array in the order -that they are received. However, some or all of the text chunks may be -after the image, so, to make sure you have read all the text chunks, -don't mess with these until after you read the stuff after the image. -This will be mentioned again below in the discussion that goes with -png_read_end(). - -After you've read the header information, you can set up the library -to handle any special transformations of the image data. The various -ways to transform the data will be described in the order that they -should occur. This is important, as some of these change the color -type and/or bit depth of the data, and some others only work on -certain color types and bit depths. Even though each transformation -checks to see if it has data that it can do something with, you should -make sure to only enable a transformation if it will be valid for the -data. For example, don't swap red and blue on grayscale data. - -The colors used for the background and transparency values should be -supplied in the same format/depth as the current image data. They -are stored in the same format/depth as the image data in a bKGD or tRNS -chunk, so this is what libpng expects for this data. The colors are -transformed to keep in sync with the image data when an application -calls the png_read_update_info() routine (see below). - -Data will be decoded into the supplied row buffers packed into bytes -unless the library has been told to transform it into another format. -For example, 4 bit/pixel paletted or grayscale data will be returned -2 pixels/byte with the leftmost pixel in the high-order bits of the -byte, unless png_set_packing() is called. 8-bit RGB data will be stored -in RGBRGBRGB format unless png_set_filler() is called to insert filler -bytes, either before or after each RGB triplet. 16-bit RGB data will -be returned RRGGBBRRGGBB, with the most significant byte of the color -value first, unless png_set_strip_16() is called to transform it to -regular RGBRGB triplets. - -The following code transforms grayscale images of less than 8 to 8 bits, -changes paletted images to RGB, and adds a full alpha channel if there is -transparency information in a tRNS chunk. This is most useful on -grayscale images with bit depths of 2 or 4 or if there is a multiple-image -viewing application that wishes to treat all images in the same way. - - if (color_type == PNG_COLOR_TYPE_PALETTE && - bit_depth <= 8) png_set_expand(png_ptr); - - if (color_type == PNG_COLOR_TYPE_GRAY && - bit_depth < 8) png_set_expand(png_ptr); - - if (png_get_valid(png_ptr, info_ptr, - PNG_INFO_tRNS)) png_set_expand(png_ptr); - -PNG can have files with 16 bits per channel. If you only can handle -8 bits per channel, this will strip the pixels down to 8 bit. - - if (bit_depth == 16) - png_set_strip_16(png_ptr); - -The png_set_background() function tells libpng to composite images -with alpha or simple transparency against the supplied background -color. If the PNG file contains a bKGD chunk (PNG_INFO_bKGD valid), -you may use this color, or supply another color more suitable for -the current display (e.g., the background color from a web page). You -need to tell libpng whether the color is in the gamma space of the -display (PNG_BACKGROUND_GAMMA_SCREEN for colors you supply), the file -(PNG_BACKGROUND_GAMMA_FILE for colors from the bKGD chunk), or one -that is neither of these gammas (PNG_BACKGROUND_GAMMA_UNIQUE - I don't -know why anyone would use this, but it's here). - -If, for some reason, you don't need the alpha channel on an image, -and you want to remove it rather than combining it with the background -(but the image author certainly had in mind that you *would* combine -it with the background, so that's what you should probably do): - - if (color_type & PNG_COLOR_MASK_ALPHA) - png_set_strip_alpha(png_ptr); - -PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as -they can, resulting in, for example, 8 pixels per byte for 1 bit -files. This code expands to 1 pixel per byte without changing the -values of the pixels: - - if (bit_depth < 8) - png_set_packing(png_ptr); - -PNG files have possible bit depths of 1, 2, 4, 8, and 16. All pixels -stored in a PNG image have been "scaled" or "shifted" up to the next -higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] to -8 bits/sample in the range [0, 255]). However, it is also possible to -convert the PNG pixel data back to the original bit depth of the image. -This call reduces the pixels back down to the original bit depth: - - png_color_16p sig_bit; - - if (png_get_sBIT(png_ptr, info_ptr, &sig_bit)) - png_set_shift(png_ptr, sig_bit); - -PNG files store 3-color pixels in red, green, blue order. This code -changes the storage of the pixels to blue, green, red: - - if (color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_RGB_ALPHA) - png_set_bgr(png_ptr); - -PNG files store RGB pixels packed into 3 bytes. This code expands them -into 4 bytes for windowing systems that need them in this format: - - if (bit_depth == 8 && color_type == - PNG_COLOR_TYPE_RGB) png_set_filler(png_ptr, - filler, PNG_FILLER_BEFORE); - -where "filler" is the number to fill with, and the location is -either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether -you want the filler before the RGB or after. This transformation -does not affect images that already have full alpha channels. - -If you are reading an image with an alpha channel, and you need the -data as ARGB instead of the normal PNG format RGBA: - - if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) - png_set_swap_alpha(png_ptr); - -For some uses, you may want a grayscale image to be represented as -RGB. This code will do that conversion: - - if (color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - png_set_gray_to_rgb(png_ptr); - -If you have a grayscale and you are using png_set_expand() to change to -a higher bit-depth you must indicate if the supplied background gray -is supplied in the original file bit depth (need_expand = 1) or in the -expanded bit depth (need_expand = 0). Similarly, if you are reading -a paletted image, you must indicate if you have supplied the background -as a palette index that needs to be expanded (need_expand = 1). You can -also specify an RGB triplet that isn't in the palette when setting your -background for a paletted image. - - png_color_16 my_background; - png_color_16p image_background; - - if (png_get_bKGD(png_ptr, info_ptr, - &image_background)) - png_set_background(png_ptr, image_background), - PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); - else - png_set_background(png_ptr, &my_background, - PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); - -To properly display PNG images on any kind of system, the application needs -to know what the display gamma is. Ideally, the user will know this, and -the application will allow them to set it. One method of allowing the user -to set the display gamma separately for each system is to check for the -DISPLAY_GAMMA and VIEWING_GAMMA environment variables or for a SCREEN_GAMMA -environment variable, which will hopefully be correctly set. - -Note that display_gamma is the gamma of your display, while screen_gamma is -the overall gamma correction required to produce pleasing results, -which depends on the lighting conditions in the surrounding environment. -Screen_gamma is display_gamma/viewing_gamma, where viewing_gamma is -the amount of additional gamma correction needed to compensate for -a (viewing_gamma=1.25) environment. In a dim or brightly lit room, no -compensation other than the display_gamma is needed (viewing_gamma=1.0). - - if (/* We have a user-defined screen - gamma value */) - { - screen_gamma = user_defined_screen_gamma; - } - /* One way that applications can share the same - screen gamma value */ - else if ((gamma_str = getenv("SCREEN_GAMMA")) - != NULL) - { - screen_gamma = atof(gamma_str); - } - /* If we don't have another value */ - else - { - screen_gamma = 2.2; /* A good guess for a - PC monitor in a bright office or a dim room */ - screen_gamma = 2.0; /* A good guess for a - PC monitor in a dark room */ - screen_gamma = 1.7 or 1.0; /* A good - guess for Mac systems */ - } - -The png_set_gamma() function handles gamma transformations of the data. -Pass both the file gamma and the current screen_gamma. If the file does -not have a gamma value, you can pass one anyway if you have an idea what -it is (usually 0.50 is a good guess for GIF images on PCs). Note -that file gammas are inverted from screen gammas. See the discussions -on gamma in the PNG specification for an excellent description of what -gamma is, and why all applications should support it. It is strongly -recommended that PNG viewers support gamma correction. - - if (png_get_gAMA(png_ptr, info_ptr, &gamma)) - png_set_gamma(png_ptr, screen_gamma, gamma); - else - png_set_gamma(png_ptr, screen_gamma, 0.50); - -If you need to reduce an RGB file to a paletted file, or if a paletted -file has more entries then will fit on your screen, png_set_dither() -will do that. Note that this is a simple match dither that merely -finds the closest color available. This should work fairly well with -optimized palettes, and fairly badly with linear color cubes. If you -pass a palette that is larger then maximum_colors, the file will -reduce the number of colors in the palette so it will fit into -maximum_colors. If there is a histogram, it will use it to make -more intelligent choices when reducing the palette. If there is no -histogram, it may not do as good a job. - - if (color_type & PNG_COLOR_MASK_COLOR) - { - if (png_get_valid(png_ptr, info_ptr, - PNG_INFO_PLTE)) - { - png_color_16p histogram; - - png_get_hIST(png_ptr, info_ptr, - &histogram); - png_set_dither(png_ptr, palette, num_palette, - max_screen_colors, histogram, 1); - } - else - { - png_color std_color_cube[MAX_SCREEN_COLORS] = - { ... colors ... }; - - png_set_dither(png_ptr, std_color_cube, - MAX_SCREEN_COLORS, MAX_SCREEN_COLORS, - NULL,0); - } - } - -PNG files describe monochrome as black being zero and white being one. -The following code will reverse this (make black be one and white be -zero): - - if (bit_depth == 1 && color_type == PNG_COLOR_GRAY) - png_set_invert_mono(png_ptr); - -PNG files store 16 bit pixels in network byte order (big-endian, -ie. most significant bits first). This code changes the storage to the -other way (little-endian, i.e. least significant bits first, the -way PCs store them): - - if (bit_depth == 16) - png_set_swap(png_ptr); - -If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you -need to change the order the pixels are packed into bytes, you can use: - - if (bit_depth < 8) - png_set_packswap(png_ptr); - -The last thing to handle is interlacing; this is covered in detail below, -but you must call the function here if you want libpng to handle expansion -of the interlaced image. - - number_of_passes = png_set_interlace_handling(png_ptr); - -After setting the transformations, libpng can update your png_info -structure to reflect any transformations you've requested with this -call. This is most useful to update the info structure's rowbytes -field so you can use it to allocate your image memory. This function -will also update your palette with the correct screen_gamma and -background if these have been given with the calls above. - - png_read_update_info(png_ptr, info_ptr); - -After you call png_read_update_info(), you can allocate any -memory you need to hold the image. The row data is simply -raw byte data for all forms of images. As the actual allocation -varies among applications, no example will be given. If you -are allocating one large chunk, you will need to build an -array of pointers to each row, as it will be needed for some -of the functions below. - -After you've allocated memory, you can read the image data. -The simplest way to do this is in one function call. If you are -allocating enough memory to hold the whole image, you can just -call png_read_image() and libpng will read in all the image data -and put it in the memory area supplied. You will need to pass in -an array of pointers to each row. - -This function automatically handles interlacing, so you don't need -to call png_set_interlace_handling() or call this function multiple -times, or any of that other stuff necessary with png_read_rows(). - - png_read_image(png_ptr, row_pointers); - -where row_pointers is: - - png_bytep row_pointers[height]; - -You can point to void or char or whatever you use for pixels. - -If you don't want to read in the whole image at once, you can -use png_read_rows() instead. If there is no interlacing (check -interlace_type == PNG_INTERLACE_NONE), this is simple: - - png_read_rows(png_ptr, row_pointers, NULL, - number_of_rows); - -where row_pointers is the same as in the png_read_image() call. - -If you are doing this just one row at a time, you can do this with -row_pointers: - - png_bytep row_pointers = row; - png_read_row(png_ptr, &row_pointers, NULL); - -If the file is interlaced (info_ptr->interlace_type != 0), things get -somewhat harder. The only current (PNG Specification version 1.0) -interlacing type for PNG is (interlace_type == PNG_INTERLACE_ADAM7) -is a somewhat complicated 2D interlace scheme, known as Adam7, that -breaks down an image into seven smaller images of varying size, based -on an 8x8 grid. - -libpng can fill out those images or it can give them to you "as is". -If you want them filled out, there are two ways to do that. The one -mentioned in the PNG specification is to expand each pixel to cover -those pixels that have not been read yet (the "rectangle" method). -This results in a blocky image for the first pass, which gradually -smooths out as more pixels are read. The other method is the "sparkle" -method, where pixels are drawn only in their final locations, with the -rest of the image remaining whatever colors they were initialized to -before the start of the read. The first method usually looks better, -but tends to be slower, as there are more pixels to put in the rows. - -If you don't want libpng to handle the interlacing details, just call -png_read_rows() seven times to read in all seven images. Each of the -images is a valid image by itself, or they can all be combined on an -8x8 grid to form a single image (although if you intend to combine them -you would be far better off using the libpng interlace handling). - -The first pass will return an image 1/8 as wide as the entire image -(every 8th column starting in column 0) and 1/8 as high as the original -(every 8th row starting in row 0), the second will be 1/8 as wide -(starting in column 4) and 1/8 as high (also starting in row 0). The -third pass will be 1/4 as wide (every 4th pixel starting in column 0) and -1/8 as high (every 8th row starting in row 4), and the fourth pass will -be 1/4 as wide and 1/4 as high (every 4th column starting in column 2, -and every 4th row starting in row 0). The fifth pass will return an -image 1/2 as wide, and 1/4 as high (starting at column 0 and row 2), -while the sixth pass will be 1/2 as wide and 1/2 as high as the original -(starting in column 1 and row 0). The seventh and final pass will be as -wide as the original, and 1/2 as high, containing all of the odd -numbered scanlines. Phew! - -If you want libpng to expand the images, call this before calling -png_start_read_image() or png_read_update_info(): - - if (interlace_type == PNG_INTERLACE_ADAM7) - number_of_passes - = png_set_interlace_handling(png_ptr); - -This will return the number of passes needed. Currently, this -is seven, but may change if another interlace type is added. -This function can be called even if the file is not interlaced, -where it will return one pass. - -If you are not going to display the image after each pass, but are -going to wait until the entire image is read in, use the sparkle -effect. This effect is faster and the end result of either method -is exactly the same. If you are planning on displaying the image -after each pass, the "rectangle" effect is generally considered the -better looking one. - -If you only want the "sparkle" effect, just call png_read_rows() as -normal, with the third parameter NULL. Make sure you make pass over -the image number_of_passes times, and you don't change the data in the -rows between calls. You can change the locations of the data, just -not the data. Each pass only writes the pixels appropriate for that -pass, and assumes the data from previous passes is still valid. - - png_read_rows(png_ptr, row_pointers, NULL, - number_of_rows); - -If you only want the first effect (the rectangles), do the same as -before except pass the row buffer in the third parameter, and leave -the second parameter NULL. - - png_read_rows(png_ptr, NULL, row_pointers, - number_of_rows); - -After you are finished reading the image, you can finish reading -the file. If you are interested in comments or time, which may be -stored either before or after the image data, you should pass the -separate png_info struct if you want to keep the comments from -before and after the image separate. If you are not interested, you -can pass NULL. - - png_read_end(png_ptr, end_info); - -When you are done, you can free all memory allocated by libpng like this: - - png_destroy_read_struct(&png_ptr, &info_ptr, - &end_info); - -For a more compact example of reading a PNG image, see the file example.c. - - -Reading PNG files progressively: - -The progressive reader is slightly different then the non-progressive -reader. Instead of calling png_read_info(), png_read_rows(), and -png_read_end(), you make one call to png_process_data(), which calls -callbacks when it has the info, a row, or the end of the image. You -set up these callbacks with png_set_progressive_read_fn(). You don't -have to worry about the input/output functions of libpng, as you are -giving the library the data directly in png_process_data(). I will -assume that you have read the section on reading PNG files above, -so I will only highlight the differences (although I will show -all of the code). - -png_structp png_ptr; -png_infop info_ptr; - - /* An example code fragment of how you would - initialize the progressive reader in your - application. */ - int - initialize_png_reader() - { - png_ptr = png_create_read_struct - (PNG_LIBPNG_VER_STRING, (void *)user_error_ptr, - user_error_fn, user_warning_fn); - if (!png_ptr) - return -1; - info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) - { - png_destroy_read_struct(&png_ptr, (png_infopp)NULL, - (png_infopp)NULL); - return -1; - } - - if (setjmp(png_ptr->jmpbuf)) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)NULL); - return -1; - } - - /* This one's new. You can provide functions - to be called when the header info is valid, - when each row is completed, and when the image - is finished. If you aren't using all functions, - you can specify a NULL parameter. You can use - any struct as the user_ptr (cast to a void pointer - for the function call), and retrieve the pointer - from inside the callbacks using the function - - png_get_progressive_ptr(png_ptr); - - which will return a void pointer, which you have - to cast appropriately. - */ - png_set_progressive_read_fn(png_ptr, (void *)user_ptr, - info_callback, row_callback, end_callback); - - return 0; - } - - /* A code fragment that you call as you receive blocks - of data */ - int - process_data(png_bytep buffer, png_uint_32 length) - { - if (setjmp(png_ptr->jmpbuf)) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)NULL); - return -1; - } - - /* This one's new also. Simply give it a chunk - of data from the file stream (in order, of - course). On machines with segmented memory - models machines, don't give it any more than - 64K. The library seems to run fine with sizes - of 4K. Although you can give it much less if - necessary (I assume you can give it chunks of - 1 byte, I haven't tried less then 256 bytes - yet). When this function returns, you may - want to display any rows that were generated - in the row callback if you don't already do - so there. - */ - png_process_data(png_ptr, info_ptr, buffer, length); - return 0; - } - - /* This function is called (as set by - png_set_progressive_fn() above) when enough data - has been supplied so all of the header has been - read. - */ - void - info_callback(png_structp png_ptr, png_infop info) - { - /* Do any setup here, including setting any of - the transformations mentioned in the Reading - PNG files section. For now, you _must_ call - either png_start_read_image() or - png_read_update_info() after all the - transformations are set (even if you don't set - any). You may start getting rows before - png_process_data() returns, so this is your - last chance to prepare for that. - */ - } - - /* This function is called when each row of image - data is complete */ - void - row_callback(png_structp png_ptr, png_bytep new_row, - png_uint_32 row_num, int pass) - { - /* If the image is interlaced, and you turned - on the interlace handler, this function will - be called for every row in every pass. Some - of these rows will not be changed from the - previous pass. When the row is not changed, - the new_row variable will be NULL. The rows - and passes are called in order, so you don't - really need the row_num and pass, but I'm - supplying them because it may make your life - easier. - - For the non-NULL rows of interlaced images, - you must call png_progressive_combine_row() - passing in the row and the old row. You can - call this function for NULL rows (it will just - return) and for non-interlaced images (it just - does the memcpy for you) if it will make the - code easier. Thus, you can just do this for - all cases: - */ - - png_progressive_combine_row(png_ptr, old_row, - new_row); - - /* where old_row is what was displayed for - previous rows. Note that the first pass - (pass == 0, really) will completely cover - the old row, so the rows do not have to be - initialized. After the first pass (and only - for interlaced images), you will have to pass - the current row, and the function will combine - the old row and the new row. - */ - } - - void - end_callback(png_structp png_ptr, png_infop info) - { - /* This function is called after the whole image - has been read, including any chunks after the - image (up to and including the IEND). You - will usually have the same info chunk as you - had in the header, although some data may have - been added to the comments and time fields. - - Most people won't do much here, perhaps setting - a flag that marks the image as finished. - */ - } - -.SH IV. Writing - -Much of this is very similar to reading. However, everything of -importance is repeated here, so you won't have to constantly look -back up in the reading section to understand writing. - -You will want to do the I/O initialization before you get into libpng, -so if it doesn't work, you don't have anything to undo. If you are not -using the standard I/O functions, you will need to replace them with -custom writing functions. See the discussion under Customizing libpng. - - FILE *fp = fopen(file_name, "wb"); - if (!fp) - { - return; - } - -Next, png_struct and png_info need to be allocated and initialized. -As these can be both relatively large, you may not want to store these -on the stack, unless you have stack space to spare. Of course, you -will want to check if they return NULL. If you are also reading, -you won't want to name your read structure and your write structure -both "png_ptr"; you can call them anything you like, such as -"read_ptr" and "write_ptr". Look at pngtest.c, for example. - - png_structp png_ptr = png_create_write_struct - (PNG_LIBPNG_VER_STRING, (void *)user_error_ptr, - user_error_fn, user_warning_fn); - if (!png_ptr) - return; - - png_infop info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) - { - png_destroy_write_struct(&png_ptr, - (png_infopp)NULL); - return; - } - -After you have these structures, you will need to set up the -error handling. When libpng encounters an error, it expects to -longjmp() back to your routine. Therefore, you will need to call -setjmp and pass the jmpbuf field of your png_struct. If you -write the file from different routines, you will need to update -the jmpbuf field every time you enter a new routine that will -call a png_ function. See your documentation of setjmp/longjmp -for your compiler for more information on setjmp/longjmp. See -the discussion on libpng error handling in the Customizing Libpng -section below for more information on the libpng error handling. - - if (setjmp(png_ptr->jmpbuf)) - { - png_destroy_write_struct(&png_ptr, &info_ptr); - fclose(fp); - return; - } - -Now you need to set up the output code. The default for libpng is to -use the C function fwrite(). If you use this, you will need to pass a -valid FILE * in the function png_init_io(). Be sure that the file is -opened in binary mode. Again, if you wish to handle writing data in -another way, see the discussion on libpng I/O handling in the Customizing -Libpng section below. - - png_init_io(png_ptr, fp); - -At this point, you can set up a callback function that will be -called after each row has been written, which you can use to control -a progress meter or the like. It's demonstrated in pngtest.c. -You must supply a function - - void write_row_callback(png_ptr, png_uint_32 row, int pass); - { - /* put your code here */ - } - -(You can give it another name that you like instead of "write_row_callback") - -To inform libpng about your function, use - - png_set_write_status_fn(png_ptr, write_row_callback); - -You now have the option of modifying how the compression library will -run. The following functions are mainly for testing, but may be useful -in some cases, like if you need to write PNG files extremely fast and -are willing to give up some compression, or if you want to get the -maximum possible compression at the expense of slower writing. If you -have no special needs in this area, let the library do what it wants by -not calling this function at all, as it has been tuned to deliver a good -speed/compression ratio. The second parameter to png_set_filter() is -the filter method, for which the only valid value is '0' (as of the -October 1996 PNG specification, version 1.0). The third parameter is a -flag that indicates -which filter type(s) are to be tested for each scanline. See the -Compression Library for details on the specific filter types. - - - /* turn on or off filtering, and/or choose - specific filters */ - png_set_filter(png_ptr, 0, - PNG_FILTER_NONE | PNG_FILTER_SUB | - PNG_FILTER_PAETH); - -The png_set_compression_???() functions interface to the zlib compression -library, and should mostly be ignored unless you really know what you are -doing. The only generally useful call is png_set_compression_level() -which changes how much time zlib spends on trying to compress the image -data. See the Compression Library for details on the compression levels. - - /* set the zlib compression level */ - png_set_compression_level(png_ptr, - Z_BEST_COMPRESSION); - - /* set other zlib parameters */ - png_set_compression_mem_level(png_ptr, 8); - png_set_compression_strategy(png_ptr, - Z_DEFAULT_STRATEGY); - png_set_compression_window_bits(png_ptr, 15); - png_set_compression_method(png_ptr, 8); - -You now need to fill in the png_info structure with all the data you -wish to write before the actual image. Note that the only thing you -are allowed to write after the image is the text chunks and the time -chunk (as of PNG Specification 1.0, anyway). See png_write_end() and -the latest PNG specification for more information on that. If you -wish to write them before the image, fill them in now, and flag that -data as being valid. If you want to wait until after the data, don't -fill them until png_write_end(). For all the fields in png_info and -their data types, see png.h. For explanations of what the fields -contain, see the PNG specification. - -Some of the more important parts of the png_info are: - - png_set_IHDR(png_ptr, info_ptr, width, height, - bit_depth, color_type, interlace_type, - compression_type, filter_type) - width - holds the width of the image - in pixels (up to 2^31). - height - holds the height of the image - in pixels (up to 2^31). - bit_depth - holds the bit depth of one of the - image channels. - (valid values are 1, 2, 4, 8, 16 - and depend also on the - color_type. See also significant - bits (sBIT) below). - color_type - describes which color/alpha - channels are present. - PNG_COLOR_TYPE_GRAY - (bit depths 1, 2, 4, 8, 16) - PNG_COLOR_TYPE_GRAY_ALPHA - (bit depths 8, 16) - PNG_COLOR_TYPE_PALETTE - (bit depths 1, 2, 4, 8) - PNG_COLOR_TYPE_RGB - (bit_depths 8, 16) - PNG_COLOR_TYPE_RGB_ALPHA - (bit_depths 8, 16) - - PNG_COLOR_MASK_PALETTE - PNG_COLOR_MASK_COLOR - PNG_COLOR_MASK_ALPHA - - interlace_type - PNG_INTERLACE_NONE or - PNG_INTERLACE_ADAM7 - compression_type - (must be - PNG_COMPRESSION_TYPE_DEFAULT) - filter_type - (must be PNG_FILTER_TYPE_DEFAULT) - - png_set_PLTE(png_ptr, info_ptr, palette, - num_palette); - palette - the palette for the file - (array of png_color) - num_palette - number of entries in the palette - - png_set_gAMA(png_ptr, info_ptr, gamma); - gamma - the gamma the image was created - at (PNG_INFO_gAMA) - - png_set_sRGB(png_ptr, info_ptr, srgb_intent); - srgb_intent - the rendering intent - (PNG_INFO_sRGB) The presence of - the sRGB chunk means that the pixel - data is in the sRGB color space. - This chunk also implies specific - values of gAMA and cHRM. Rendering - intent is the CSS-1 property that - has been defined by the International - Color Consortium - (http://www.color.org). - It can be one of - PNG_SRGB_INTENT_SATURATION, - PNG_SRGB_INTENT_PERCEPTUAL, - PNG_SRGB_INTENT_ABSOLUTE, or - PNG_SRGB_INTENT_RELATIVE. - - - png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, - srgb_intent); - srgb_intent - the rendering intent - (PNG_INFO_sRGB) The presence of the - sRGB chunk means that the pixel - data is in the sRGB color space. - This function also causes gAMA and - cHRM chunks with the specific values - that are consistent with sRGB to be - written. - - png_set_sBIT(png_ptr, info_ptr, sig_bit); - sig_bit - the number of significant bits for - (PNG_INFO_sBIT) each of the gray, red, - green, and blue channels, whichever are - appropriate for the given color type - (png_color_16) - - png_set_tRNS(png_ptr, info_ptr, trans, num_trans, - trans_values); - trans - array of transparent entries for - palette (PNG_INFO_tRNS) - trans_values - transparent pixel for non-paletted - images (PNG_INFO_tRNS) - num_trans - number of transparent entries - (PNG_INFO_tRNS) - - png_set_hIST(png_ptr, info_ptr, hist); - (PNG_INFO_hIST) - hist - histogram of palette (array of - png_color_16) - - png_set_tIME(png_ptr, info_ptr, mod_time); - mod_time - time image was last modified - (PNG_VALID_tIME) - - png_set_bKGD(png_ptr, info_ptr, background); - background - background color (PNG_VALID_bKGD) - - png_set_text(png_ptr, info_ptr, text_ptr, num_text); - text_ptr - array of png_text holding image - comments - text_ptr[i]->key - keyword for comment. - text_ptr[i]->text - text comments for current - keyword. - text_ptr[i]->compression - type of compression used - on "text" PNG_TEXT_COMPRESSION_NONE or - PNG_TEXT_COMPRESSION_zTXt - num_text - number of comments in text_ptr - - png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y, - unit_type); - offset_x - positive offset from the left - edge of the screen - offset_y - positive offset from the top - edge of the screen - unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER - - png_set_pHYs(png_ptr, info_ptr, res_x, res_y, - unit_type); - res_x - pixels/unit physical resolution - in x direction - res_y - pixels/unit physical resolution - in y direction - unit_type - PNG_RESOLUTION_UNKNOWN, - PNG_RESOLUTION_METER - -In PNG files, the alpha channel in an image is the level of opacity. -If your data is supplied as a level of transparency, you can invert the -alpha channel before you write it, so that 0 is fully transparent and 255 -(in 8-bit or paletted images) or 65535 (in 16-bit images) is fully opaque, -with - - png_set_invert_alpha(png_ptr); - -This must appear here instead of later with the other transformations -because in the case of paletted images the tRNS chunk data has to -be inverted before the tRNS chunk is written. If your image is not a -paletted image, the tRNS data (which in such cases represents a single -color to be rendered as transparent) won't be changed. - -A quick word about text and num_text. text is an array of png_text -structures. num_text is the number of valid structures in the array. -If you want, you can use max_text to hold the size of the array, but -libpng ignores it for writing (it does use it for reading). Each -png_text structure holds a keyword-text value, and a compression type. -The compression types have the same valid numbers as the compression -types of the image data. Currently, the only valid number is zero. -However, you can store text either compressed or uncompressed, unlike -images which always have to be compressed. So if you don't want the -text compressed, set the compression type to PNG_TEXT_COMPRESSION_NONE. -Until text gets around 1000 bytes, it is not worth compressing it. -After the text has been written out to the file, the compression type -is set to PNG_TEXT_COMPRESSION_NONE_WR or PNG_TEXT_COMPRESSION_zTXt_WR, -so that it isn't written out again at the end (in case you are calling -png_write_end() with the same struct. - -The keywords that are given in the PNG Specification are: - - Title Short (one line) title or - caption for image - Author Name of image's creator - Description Description of image (possibly long) - Copyright Copyright notice - Creation Time Time of original image creation - (usually RFC 1123 format, see below) - Software Software used to create the image - Disclaimer Legal disclaimer - Warning Warning of nature of content - Source Device used to create the image - Comment Miscellaneous comment; conversion - from other image format - -The keyword-text pairs work like this. Keywords should be short -simple descriptions of what the comment is about. Some typical -keywords are found in the PNG specification, as is some recommendations -on keywords. You can repeat keywords in a file. You can even write -some text before the image and some after. For example, you may want -to put a description of the image before the image, but leave the -disclaimer until after, so viewers working over modem connections -don't have to wait for the disclaimer to go over the modem before -they start seeing the image. Finally, keywords should be full -words, not abbreviations. Keywords and text are in the ISO 8859-1 -(Latin-1) character set (a superset of regular ASCII) and can not -contain NUL characters, and should not contain control or other -unprintable characters. To make the comments widely readable, stick -with basic ASCII, and avoid machine specific character set extensions -like the IBM-PC character set. The keyword must be present, but -you can leave off the text string on non-compressed pairs. -Compressed pairs must have a text string, as only the text string -is compressed anyway, so the compression would be meaningless. - -PNG supports modification time via the png_time structure. Two -conversion routines are proved, png_convert_from_time_t() for -time_t and png_convert_from_struct_tm() for struct tm. The -time_t routine uses gmtime(). You don't have to use either of -these, but if you wish to fill in the png_time structure directly, -you should provide the time in universal time (GMT) if possible -instead of your local time. Note that the year number is the full -year (e.g. 1998, rather than 98 - PNG is year 2000 compliant!), and -that months start with 1. - -If you want to store the time of the original image creation, you should -use a plain tEXt chunk with the "Creation Time" keyword. This is -necessary because the "creation time" of a PNG image is somewhat vague, -depending on whether you mean the PNG file, the time the image was -created in a non-PNG format, a still photo from which the image was -scanned, or possibly the subject matter itself. In order to facilitate -machine-readable dates, it is recommended that the "Creation Time" -tEXt chunk use RFC 1123 format dates (e.g. 22 May 1997 18:07:10 GMT"), -although this isn't a requirement. Unlike the tIME chunk, the -"Creation Time" tEXt chunk is not expected to be automatically changed -by the software. To facilitate the use of RFC 1123 dates, a function -png_convert_to_rfc1123(png_timep) is provided to convert from PNG -time to an RFC 1123 format string. - -You are now ready to write all the file information up to the actual -image data. You do this with a call to png_write_info(). - - png_write_info(png_ptr, info_ptr); - -After you've written the file information, you can set up the library -to handle any special transformations of the image data. The various -ways to transform the data will be described in the order that they -should occur. This is important, as some of these change the color -type and/or bit depth of the data, and some others only work on -certain color types and bit depths. Even though each transformation -checks to see if it has data that it can do something with, you should -make sure to only enable a transformation if it will be valid for the -data. For example, don't swap red and blue on grayscale data. - -PNG files store RGB pixels packed into 3 bytes. This code tells -the library to expect input data with 4 bytes per pixel - - png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); - -where the 0 is the value that will be put in the 4th byte, and the -location is either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending -upon whether the filler byte is stored XRGB or RGBX. - -PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as -they can, resulting in, for example, 8 pixels per byte for 1 bit files. -If the data is supplied at 1 pixel per byte, use this code, which will -correctly pack the pixels into a single byte: - - png_set_packing(png_ptr); - -PNG files reduce possible bit depths to 1, 2, 4, 8, and 16. If your -data is of another bit depth, you can write an sBIT chunk into the -file so that decoders can get the original data if desired. - - /* Set the true bit depth of the image data */ - if (color_type & PNG_COLOR_MASK_COLOR) - { - sig_bit.red = true_bit_depth; - sig_bit.green = true_bit_depth; - sig_bit.blue = true_bit_depth; - } - else - { - sig_bit.gray = true_bit_depth; - } - if (color_type & PNG_COLOR_MASK_ALPHA) - { - sig_bit.alpha = true_bit_depth; - } - - png_set_sBIT(png_ptr, info_ptr, &sig_bit); - -If the data is stored in the row buffer in a bit depth other than -one supported by PNG (e.g. 3 bit data in the range 0-7 for a 4-bit PNG), -this will scale the values to appear to be the correct bit depth as -is required by PNG. - - png_set_shift(png_ptr, &sig_bit); - -PNG files store 16 bit pixels in network byte order (big-endian, -ie. most significant bits first). This code would be used if they are -supplied the other way (little-endian, i.e. least significant bits -first, the way PCs store them): - - if (bit_depth > 8) - png_set_swap(png_ptr); - -If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you -need to change the order the pixels are packed into bytes, you can use: - - if (bit_depth < 8) - png_set_packswap(png_ptr); - -PNG files store 3 color pixels in red, green, blue order. This code -would be used if they are supplied as blue, green, red: - - png_set_bgr(png_ptr); - -PNG files describe monochrome as black being zero and white being -one. This code would be used if the pixels are supplied with this reversed -(black being one and white being zero): - - png_set_invert_mono(png_ptr); - -Finally, you can write your own transformation function if none of -the existing ones meets your needs. This is done by setting a callback -with - - png_set_write_user_transform_fn(png_ptr, - write_transform_fn); - -You must supply the function - - void write_transform_fn(png_ptr ptr, row_info_ptr - row_info, png_bytep data) - -See pngtest.c for a working example. Your function will be called -before any of the other transformations have been processed. - -It is possible to have libpng flush any pending output, either manually, -or automatically after a certain number of lines have been written. To -flush the output stream a single time call: - - png_write_flush(png_ptr); - -and to have libpng flush the output stream periodically after a certain -number of scanlines have been written, call: - - png_set_flush(png_ptr, nrows); - -Note that the distance between rows is from the last time png_write_flush() -was called, or the first row of the image if it has never been called. -So if you write 50 lines, and then png_set_flush 25, it will flush the -output on the next scanline, and every 25 lines thereafter, unless -png_write_flush() is called before 25 more lines have been written. -If nrows is too small (less than about 10 lines for a 640 pixel wide -RGB image) the image compression may decrease noticeably (although this -may be acceptable for real-time applications). Infrequent flushing will -only degrade the compression performance by a few percent over images -that do not use flushing. - -That's it for the transformations. Now you can write the image data. -The simplest way to do this is in one function call. If have the -whole image in memory, you can just call png_write_image() and libpng -will write the image. You will need to pass in an array of pointers to -each row. This function automatically handles interlacing, so you don't -need to call png_set_interlace_handling() or call this function multiple -times, or any of that other stuff necessary with png_write_rows(). - - png_write_image(png_ptr, row_pointers); - -where row_pointers is: - - png_bytef *row_pointers[height]; - -You can point to void or char or whatever you use for pixels. - -If you can't want to write the whole image at once, you can -use png_write_rows() instead. If the file is not interlaced, -this is simple: - - png_write_rows(png_ptr, row_pointers, - number_of_rows); - -row_pointers is the same as in the png_write_image() call. - -If you are just writing one row at a time, you can do this with -row_pointers: - - png_bytep row_pointer = row; - - png_write_row(png_ptr, &row_pointer); - -When the file is interlaced, things can get a good deal more -complicated. The only currently (as of February 1998 -- PNG Specification -version 1.0, dated October 1996) defined interlacing scheme for PNG files -is the "Adam7" interlace scheme, that breaks down an -image into seven smaller images of varying size. libpng will build -these images for you, or you can do them yourself. If you want to -build them yourself, see the PNG specification for details of which -pixels to write when. - -If you don't want libpng to handle the interlacing details, just -use png_set_interlace_handling() and call png_write_rows() the -correct number of times to write all seven sub-images. - -If you want libpng to build the sub-images, call this before you start -writing any rows: - - number_of_passes = - png_set_interlace_handling(png_ptr); - -This will return the number of passes needed. Currently, this -is seven, but may change if another interlace type is added. - -Then write the complete image number_of_passes times. - - png_write_rows(png_ptr, row_pointers, - number_of_rows); - -As some of these rows are not used, and thus return immediately, -you may want to read about interlacing in the PNG specification, -and only update the rows that are actually used. - -After you are finished writing the image, you should finish writing -the file. If you are interested in writing comments or time, you should -pass an appropriately filled png_info pointer. If you are not interested, -you can pass NULL. - - png_write_end(png_ptr, info_ptr); - -When you are done, you can free all memory used by libpng like this: - - png_destroy_write_struct(&png_ptr, &info_ptr); - -You must free any data you allocated for info_ptr, such as comments, -palette, or histogram, before the call to png_destroy_write_struct(); - -For a more compact example of writing a PNG image, see the file example.c. - - -.SH V. Modifying/Customizing libpng: - -There are two issues here. The first is changing how libpng does -standard things like memory allocation, input/output, and error handling. -The second deals with more complicated things like adding new chunks, -adding new transformations, and generally changing how libpng works. - -All of the memory allocation, input/output, and error handling in libpng -goes through callbacks which are user settable. The default routines are -in pngmem.c, pngrio.c, pngwio.c, and pngerror.c respectively. To change -these functions, call the appropriate png_set_???_fn() function. - -Memory allocation is done through the functions png_large_malloc(), -png_malloc(), png_realloc(), png_large_free(), and png_free(). These -currently just call the standard C functions. The large functions must -handle exactly 64K, but they don't have to handle more than that. If -your pointers can't access more then 64K at a time, you will want to set -MAXSEG_64K in zlib.h. Since it is unlikely that the method of handling -memory allocation on a platform will change between applications, these -functions must be modified in the library at compile time. - -Input/Output in libpng is done through png_read() and png_write(), -which currently just call fread() and fwrite(). The FILE * is stored in -png_struct and is initialized via png_init_io(). If you wish to change -the method of I/O, the library supplies callbacks that you can set -through the function png_set_read_fn() and png_set_write_fn() at run -time, instead of calling the png_init_io() function. These functions -also provide a void pointer that can be retrieved via the function -png_get_io_ptr(). For example: - - png_set_read_fn(png_structp png_ptr, - voidp io_ptr, png_rw_ptr read_data_fn) - - png_set_write_fn(png_structp png_ptr, - voidp io_ptr, png_rw_ptr write_data_fn, - png_flush_ptr output_flush_fn); - - voidp io_ptr = png_get_io_ptr(png_ptr); - -The replacement I/O functions should have prototypes as follows: - - void user_read_data(png_structp png_ptr, - png_bytep data, png_uint_32 length); - void user_write_data(png_structp png_ptr, - png_bytep data, png_uint_32 length); - void user_flush_data(png_structp png_ptr); - -Supplying NULL for the read, write, or flush functions sets them back -to using the default C stream functions. It is an error to read from -a write stream, and vice versa. - -Error handling in libpng is done through png_error() and png_warning(). -Errors handled through png_error() are fatal, meaning that png_error() -should never return to its caller. Currently, this is handled via -setjmp() and longjmp(), but you could change this to do things like -exit() if you should wish. On non-fatal errors, png_warning() is called -to print a warning message, and then control returns to the calling code. -By default png_error() and png_warning() print a message on stderr via -fprintf() unless the library is compiled with PNG_NO_STDIO defined. If -you wish to change the behavior of the error functions, you will need to -set up your own message callbacks. These functions are normally supplied -at the time that the png_struct is created. It is also possible to change -these functions after png_create_???_struct() has been called by calling: - - png_set_error_fn(png_structp png_ptr, - png_voidp error_ptr, png_error_ptr error_fn, - png_error_ptr warning_fn); - - png_voidp error_ptr = png_get_error_ptr(png_ptr); - -If NULL is supplied for either error_fn or warning_fn, then the libpng -default function will be used, calling fprintf() and/or longjmp() if a -problem is encountered. The replacement error functions should have -parameters as follows: - - void user_error_fn(png_structp png_ptr, - png_const_charp error_msg); - void user_warning_fn(png_structp png_ptr, - png_const_charp warning_msg); - -The motivation behind using setjmp() and longjmp() is the C++ throw and -catch exception handling methods. This makes the code much easier to write, -as there is no need to check every return code of every function call. -However, there are some uncertainties about the status of local variables -after a longjmp, so the user may want to be careful about doing anything after -setjmp returns non-zero besides returning itself. Consult your compiler -documentation for more details. - -If you need to read or write custom chunks, you will need to get deeper -into the libpng code, as a mechanism has not yet been supplied for user -callbacks with custom chunks. First, read the PNG specification, and have -a first level of understanding of how it works. Pay particular attention -to the sections that describe chunk names, and look at how other chunks -were designed, so you can do things similarly. Second, check out the -sections of libpng that read and write chunks. Try to find a chunk that -is similar to yours and copy off of it. More details can be found in the -comments inside the code. A way of handling unknown chunks in a generic -method, potentially via callback functions, would be best. - -If you wish to write your own transformation for the data, look through -the part of the code that does the transformations, and check out some of -the simpler ones to get an idea of how they work. Try to find a similar -transformation to the one you want to add and copy off of it. More details -can be found in the comments inside the code itself. - -Configuring for 16 bit platforms: - -You may need to change the png_large_malloc() and png_large_free() -routines in pngmem.c, as these are required to allocate 64K, although -there is already support for many of the common DOS compilers. Also, -you will want to look into zconf.h to tell zlib (and thus libpng) that -it cannot allocate more then 64K at a time. Even if you can, the memory -won't be accessible. So limit zlib and libpng to 64K by defining MAXSEG_64K. - -Configuring for DOS: - -For DOS users which only have access to the lower 640K, you will -have to limit zlib's memory usage via a png_set_compression_mem_level() -call. See zlib.h or zconf.h in the zlib library for more information. - -Configuring for Medium Model: - -Libpng's support for medium model has been tested on most of the popular -compilers. Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets -defined, and FAR gets defined to far in pngconf.h, and you should be -all set. Everything in the library (except for zlib's structure) is -expecting far data. You must use the typedefs with the p or pp on -the end for pointers (or at least look at them and be careful). Make -note that the row's of data are defined as png_bytepp which is a -unsigned char far * far *. - -Configuring for gui/windowing platforms: - -You will need to write new error and warning functions that use the GUI -interface, as described previously, and set them to be the error and -warning functions at the time that png_create_???_struct() is called, -in order to have them available during the structure initialization. -They can be changed later via png_set_error_fn(). On some compilers, -you may also have to change the memory allocators (png_malloc, etc.). - -Configuring for compiler xxx: - -All includes for libpng are in pngconf.h. If you need to add/change/delete -an include, this is the place to do it. The includes that are not -needed outside libpng are protected by the PNG_INTERNAL definition, -which is only defined for those routines inside libpng itself. The -files in libpng proper only include png.h, which includes pngconf.h. - -Configuring zlib: - -There are special functions to configure the compression. Perhaps the -most useful one changes the compression level, which currently uses -input compression values in the range 0 - 9. The library normally -uses the default compression level (Z_DEFAULT_COMPRESSION = 6). Tests -have shown that for a large majority of images, compression values in -the range 3-6 compress nearly as well as higher levels, and do so much -faster. For online applications it may be desirable to have maximum speed -(Z_BEST_SPEED = 1). With versions of zlib after v0.99, you can also -specify no compression (Z_NO_COMPRESSION = 0), but this would create -files larger than just storing the raw bitmap. You can specify the -compression level by calling: - - png_set_compression_level(png_ptr, level); - -Another useful one is to reduce the memory level used by the library. -The memory level defaults to 8, but it can be lowered if you are -short on memory (running DOS, for example, where you only have 640K). - - png_set_compression_mem_level(png_ptr, level); - -The other functions are for configuring zlib. They are not recommended -for normal use and may result in writing an invalid PNG file. See -zlib.h for more information on what these mean. - - png_set_compression_strategy(png_ptr, - strategy); - png_set_compression_window_bits(png_ptr, - window_bits); - png_set_compression_method(png_ptr, method); - -Controlling row filtering: - -If you want to control whether libpng uses filtering or not, which -filters are used, and how it goes about picking row filters, you -can call one of these functions. The selection and configuration -of row filters can have a significant impact on the size and -encoding speed and a somewhat lesser impact on the decoding speed -of an image. Filtering is enabled by default for RGB and grayscale -images (with and without alpha), and for 8-bit paletted images, but -not for paletted images with bit depths less than 8 bits/pixel. - -The 'method' parameter sets the main filtering method, which is -currently only '0' in the PNG 1.0 specification. The 'filters' -parameter sets which filter(s), if any, should be used for each -scanline. Possible values are PNG_ALL_FILTERS and PNG_NO_FILTERS -to turn filtering on and off, respectively. - -Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB, -PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise -ORed together '|' to specify one or more filters to use. These -filters are described in more detail in the PNG specification. If -you intend to change the filter type during the course of writing -the image, you should start with flags set for all of the filters -you intend to use so that libpng can initialize its internal -structures appropriately for all of the filter types. - - filters = PNG_FILTER_NONE | PNG_FILTER_SUB - | PNG_FILTER_UP; - png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, - filters); - -It is also possible to influence how libpng chooses from among the -available filters. This is done in two ways - by telling it how -important it is to keep the same filter for successive rows, and -by telling it the relative computational costs of the filters. - - double weights[3] = {1.5, 1.3, 1.1}, - costs[PNG_FILTER_VALUE_LAST] = - {1.0, 1.3, 1.3, 1.5, 1.7}; - - png_set_filter_selection(png_ptr, - PNG_FILTER_SELECTION_WEIGHTED, 3, - weights, costs); - -The weights are multiplying factors which indicate to libpng that row -should be the same for successive rows unless another row filter is that -many times better than the previous filter. In the above example, if -the previous 3 filters were SUB, SUB, NONE, the SUB filter could have a -"sum of absolute differences" 1.5 x 1.3 times higher than other filters -and still be chosen, while the NONE filter could have a sum 1.1 times -higher than other filters and still be chosen. Unspecified weights are -taken to be 1.0, and the specified weights should probably be declining -like those above in order to emphasize recent filters over older filters. - -The filter costs specify for each filter type a relative decoding cost -to be considered when selecting row filters. This means that filters -with higher costs are less likely to be chosen over filters with lower -costs, unless their "sum of absolute differences" is that much smaller. -The costs do not necessarily reflect the exact computational speeds of -the various filters, since this would unduly influence the final image -size. - -Note that the numbers above were invented purely for this example and -are given only to help explain the function usage. Little testing has -been done to find optimum values for either the costs or the weights. - -Removing unwanted object code: - -There are a bunch of #define's in pngconf.h that control what parts of -libpng are compiled. All the defines end in _SUPPORTED. If you are -never going to use an ability, you can change the #define to #undef -before recompiling libpng and save yourself code and data space. -You can also turn a number of them off en masse with a compiler directive -that defines PNG_READ[or WRITE]_TRANSFORMS_NOT_SUPPORTED, or -PNG_READ[or WRITE]_ANCILLARY_CHUNKS_NOT_SUPPORTED, or all four, -along with directives to turn on any of the capabilities that you do -want. The PNG_READ[or WRITE]_TRANSFORMS_NOT_SUPPORTED directives disable -the extra transformations but still leave the library fully capable of reading -and writing PNG files with all known public chunks [except for sPLT]. -Use of the PNG_READ[or WRITE]_ANCILLARY_CHUNKS_NOT_SUPPORTED directive -produces a library that is incapable of reading or writing ancillary chunks. -If you are not using the progressive reading capability, you can -turn that off with PNG_PROGRESSIVE_READ_NOT_SUPPORTED (don't confuse -this with the INTERLACING capability, which you'll still have). - -All the reading and writing specific code are in separate files, so the -linker should only grab the files it needs. However, if you want to -make sure, or if you are building a stand alone library, all the -reading files start with pngr and all the writing files start with -pngw. The files that don't match either (like png.c, pngtrans.c, etc.) -are used for both reading and writing, and always need to be included. -The progressive reader is in pngpread.c - -If you are creating or distributing a dynamically linked library (a .so -or DLL file), you should not remove or disable any parts of the library, -as this will cause applications linked with different versions of the -library to fail if they call functions not available in your library. -The size of the library itself should not be an issue, because only -those sections which are actually used will be loaded into memory. - - -Changes to Libpng from version 0.88 - -It should be noted that versions of libpng later than 0.96 are not -distributed by the original libpng author, Guy Schalnat, nor by -Andreas Dilger, who had taken over from Guy during 1996 and 1997, and -distributed versions 0.89 through 0.96, but rather by another member -of the original PNG Group, Glenn Randers-Pehrson. Guy and Andreas are -still alive and well, but they have moved on to other things. - -The old libpng functions png_read_init(), png_write_init(), -png_info_init(), png_read_destroy(), and png_write_destory() have been -moved to PNG_INTERNAL in version 0.95 to discourage their use. The -preferred method of creating and initializing the libpng structures is -via the png_create_read_struct(), png_create_write_struct(), and -png_create_info_struct() because they isolate the size of the structures -from the application, allow version error checking, and also allow the -use of custom error handling routines during the initialization, which -the old functions do not. The functions png_read_destroy() and -png_write_destroy() do not actually free the memory that libpng -allocated for these structs, but just reset the data structures, so they -can be used instead of png_destroy_read_struct() and -png_destroy_write_struct() if you feel there is too much system overhead -allocating and freeing the png_struct for each image read. - -Setting the error callbacks via png_set_message_fn() before -png_read_init() as was suggested in libpng-0.88 is no longer supported -because this caused applications which do not use custom error functions -to fail if the png_ptr was not initialized to zero. It is still possible -to set the error callbacks AFTER png_read_init(), or to change them with -png_set_error_fn(), which is essentially the same function, but with a -new name to force compilation errors with applications that try to use -the old method. - -.SH NOTE - -Note about libpng version numbers: - -Due to various miscommunications, unforeseen code incompatibilities -and occasional factors outside the authors' control, version numbering -on the library has not always been consistent and straightforward. -The following table summarizes matters since version 0.89c, which was -the first widely used release: - - source png.h png.h shared-lib - version string int version - ------- ------ ------ ---------- - 0.89c 0.89 89 1.0.89 - 0.90 0.90 90 0.90 [should be 2.0.90] - 0.95 0.95 95 0.95 [should be 2.0.95] - 0.96 0.96 96 0.96 [should be 2.0.96] - 0.97b 1.00.97 97 1.0.1 [should be 2.0.97] - 0.97c 0.97 97 2.0.97 - 0.98 0.98 98 2.0.98 - 0.99 0.99 98 2.0.99 - 0.99a-m 0.99 99 2.0.99 - 1.00 1.00 100 2.1.0 [int should be 10000] - 1.0.0 1.0.0 100 2.1.0 [int should be 10000] - 1.0.1 1.0.1 10001 2.1.0 - -Henceforth the source version will match the shared-library -minor and patch numbers; the shared-library major version number will be -used for changes in backward compatibility, as it is intended. -The PNG_PNGLIB_VER macro, which is not used within libpng but -is available for applications, is an unsigned integer of the form -xyyzz corresponding to the source version x.y.z (leading zeros in y and z). - -.SH "SEE ALSO" -libpngpf(3), png(5) -.LP -.IR libpng : -.IP -ftp://ftp.uu.net/graphics/png -http://www.cdrom.com/pub/png - -.LP -.IR zlib : -.IP -(generally) at the same location as -.I libpng -or at -.br -ftp://ftp.uu.net/pub/archiving/zip/zlib -.br -http://www.cdrom.com/pub/infozip/zlib - -.LP -.IR PNG specification: RFC 2083 -.IP -(generally) at the same location as -.I libpng -or at -.br -ftp://ds.internic.net/rfc/rfc2083.txt -.br -or (as a W3C Recommendation) at -.br -http://www.w3.org/TR/REC-png.html - -.LP -In the case of any inconsistency between the PNG specification -and this library, the specification takes precedence. - -.SH AUTHORS -This man page: Glenn Randers-Pehrson - - -Contributing Authors: John Bowler, Kevin Bracey, Sam Bushell, Andreas Dilger, -Magnus Holmgren, Tom Lane, Dave Martindale, Glenn Randers-Pehrson, -Greg Roelofs, Guy Eric Schalnat, Paul Schmidt, Tom Tanner, Willem van -Schaik, Tim Wegner. - - -The contributing authors would like to thank all those who helped -with testing, bug fixes, and patience. This wouldn't have been -possible without all of you. - -Thanks to Frank J. T. Wojcik for helping with the documentation. - -Libpng version 1.0.1 March 15, 1998: -Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. -Currently maintained by Glenn Randers-Pehrson (randeg@alumni.rpi.edu). - -Supported by the PNG development group -.br -(png-implement@dworkin.wustl.edu). - -.SH COPYRIGHT NOTICE: - -The PNG Reference Library (libpng) is supplied "AS IS". The Contributing -Authors and Group 42, Inc. disclaim all warranties, expressed or implied, -including, without limitation, the warranties of merchantability and of -fitness for any purpose. The Contributing Authors and Group 42, Inc. -assume no liability for direct, indirect, incidental, special, exemplary, -or consequential damages, which may result from the use of the PNG -Reference Library, even if advised of the possibility of such damage. - -Permission is hereby granted to use, copy, modify, and distribute this -source code, or portions hereof, for any purpose, without fee, subject -to the following restrictions: - - 1. The origin of this source code must not be - misrepresented. - - 2. Altered versions must be plainly marked as such - and must not be misrepresented as being the - original source. - - 3. This Copyright notice may not be removed or - altered from any source or altered source - distribution. - -The Contributing Authors and Group 42, Inc. specifically permit, without -fee, and encourage the use of this source code as a component to -supporting the PNG file format in commercial products. If you use this -source code in a product, acknowledgment is not required but would be -appreciated. - -.\" end of man page - diff --git a/src/png/libpngpf.3 b/src/png/libpngpf.3 deleted file mode 100644 index 7ba582ebe2..0000000000 --- a/src/png/libpngpf.3 +++ /dev/null @@ -1,342 +0,0 @@ -.TH LIBPNGPF 3 "March 15, 1998" -.SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library -(private functions) -.SH SYNOPSIS -#include - -void png_build_gamma_table (png_structp png_ptr); - -void png_build_grayscale_palette (int bit_depth, png_colorp -palette); - -void png_calculate_crc (png_structp png_ptr, png_bytep ptr, -png_size_t length); -void png_check_chunk_name (png_structp png_ptr, png_bytep -chunk_name); - -png_size_t png_check_keyword (png_structp png_ptr, png_charp -key, png_charpp new_key); - -void png_combine_row (png_structp png_ptr, png_bytep row, int -mask); - -void png_correct_palette (png_structp png_ptr, png_colorp -palette, int num_palette); - -int png_crc_error (png_structp png_ptr); - -int png_crc_finish (png_structp png_ptr, png_uint_32 skip); - -void png_crc_read (png_structp png_ptr, png_bytep buf, -png_size_t length); - -png_voidp png_create_struct (int type); - -void png_destroy_struct (png_voidp struct_ptr); - -void png_do_background (png_row_infop row_info, png_bytep row, -png_color_16p trans_values, png_color_16p background, -png_color_16p background_1, png_bytep gamma_table, png_bytep -gamma_from_1, png_bytep gamma_to_1, png_uint_16pp gamma_16, -png_uint_16pp gamma_16_from_1, png_uint_16pp gamma_16_to_1, int -gamma_shift); - -void png_do_bgr (png_row_infop row_info, png_bytep row); - -void png_do_chop (png_row_infop row_info, png_bytep row); - -void png_do_dither (png_row_infop row_info, png_bytep row, -png_bytep palette_lookup, png_bytep dither_lookup); - -void png_do_expand (png_row_infop row_info, png_bytep row, -png_color_16p trans_value); - -void png_do_expand_palette (png_row_infop row_info, png_bytep -row, png_colorp palette, png_bytep trans, int num_trans); - -void png_do_gamma (png_row_infop row_info, png_bytep row, -png_bytep gamma_table, png_uint_16pp gamma_16_table, int -gamma_shift); - -void png_do_gray_to_rgb (png_row_infop row_info, png_bytep -row); - -void png_do_invert (png_row_infop row_info, png_bytep row); - -void png_do_pack (png_row_infop row_info, png_bytep row, -png_uint_32 bit_depth); - -void png_do_packswap (png_row_infop row_info, png_bytep row); - -void png_do_read_filler (png_row_infop row_info, png_bytep row, -png_uint_32 filler, png_uint_32 flags); - -void png_do_read_interlace (png_row_infop row_info, png_bytep -row, int pass, png_uint_32 transformations); - -void png_do_read_invert_alpha (png_row_infop row_info, -png_bytep row); - -void png_do_read_swap_alpha (png_row_infop row_info, png_bytep -row); - -void png_do_read_transformations (png_structp png_ptr); - -void png_do_rgb_to_gray (png_row_infop row_info, png_bytep -row); - -void png_do_shift (png_row_infop row_info, png_bytep row, -png_color_8p bit_depth); - -void png_do_strip_filler (png_row_infop row_info, png_bytep -row, png_uint_32 flags); - -void png_do_swap (png_row_infop row_info, png_bytep row); - -void png_do_unpack (png_row_infop row_info, png_bytep row); - -void png_do_unshift (png_row_infop row_info, png_bytep row, -png_color_8p sig_bits); - -void png_do_write_interlace (png_row_infop row_info, png_bytep -row, int pass); - -void png_do_write_invert_alpha (png_row_infop row_info, -png_bytep row); - -void png_do_write_swap_alpha (png_row_infop row_info, png_bytep -row); - -void png_do_write_transformations (png_structp png_ptr); - -void *png_far_to_near (png_structp png_ptr,png_voidp ptr, -int check); - -void png_flush (png_structp png_ptr); - -png_int_32 png_get_int_32 (png_bytep buf); - -png_uint_16 png_get_uint_16 (png_bytep buf); - -png_uint_32 png_get_uint_32 (png_bytep buf); - -void png_handle_bKGD (png_structp png_ptr, png_infop info_ptr, -png_uint_32 length); - -void png_handle_cHRM (png_structp png_ptr, png_infop info_ptr, -png_uint_32 length); - -void png_handle_gAMA (png_structp png_ptr, png_infop info_ptr, -png_uint_32 length); - -void png_handle_hIST (png_structp png_ptr, png_infop info_ptr, -png_uint_32 length); - -void png_handle_IEND (png_structp png_ptr, png_infop info_ptr, -png_uint_32 length); - -void png_handle_IHDR (png_structp png_ptr, png_infop info_ptr, -png_uint_32 length); - -void png_handle_oFFs (png_structp png_ptr, png_infop info_ptr, -png_uint_32 length); - -void png_handle_pCAL (png_structp png_ptr, png_infop info_ptr, -png_uint_32 length); - -void png_handle_pHYs (png_structp png_ptr, png_infop info_ptr, -png_uint_32 length); - -void png_handle_PLTE (png_structp png_ptr, png_infop info_ptr, -png_uint_32 length); - -void png_handle_sBIT (png_structp png_ptr, png_infop info_ptr, -png_uint_32 length); - -void png_handle_sRGB (png_structp png_ptr, png_infop info_ptr, -png_uint_32 length); - -void png_handle_tEXt (png_structp png_ptr, png_infop info_ptr, -png_uint_32 length); - -void png_handle_tIME (png_structp png_ptr, png_infop info_ptr, -png_uint_32 length); - -void png_handle_tRNS (png_structp png_ptr, png_infop info_ptr, -png_uint_32 length); - -void png_handle_unknown (png_structp png_ptr, png_infop -info_ptr, png_uint_32 length); - -void png_handle_zTXt (png_structp png_ptr, png_infop info_ptr, -png_uint_32 length); - -void png_info_destroy (png_structp png_ptr, png_infop -info_ptr); - -void png_init_read_transformations (png_structp png_ptr); - -void png_process_IDAT_data (png_structp png_ptr, png_bytep -buffer, png_size_t buffer_length); - -void png_process_some_data (png_structp png_ptr, png_infop -info_ptr); - -void png_push_check_crc (png_structp png_ptr); - -void png_push_crc_finish (png_structp png_ptr); - -void png_push_crc_skip (png_structp png_ptr, png_uint_32 -length); - -void png_push_fill_buffer (png_structp png_ptr, png_bytep -buffer, png_size_t length); - -void png_push_handle_tEXt (png_structp png_ptr, png_infop -info_ptr, png_uint_32 length); - -void png_push_handle_unknown (png_structp png_ptr, png_infop -info_ptr, png_uint_32 length); - -void png_push_handle_zTXt (png_structp png_ptr, png_infop -info_ptr, png_uint_32 length); - -void png_push_have_end (png_structp png_ptr, png_infop -info_ptr); - -void png_push_have_info (png_structp png_ptr, png_infop -info_ptr); - -void png_push_have_row (png_structp png_ptr, png_bytep row); - -void png_push_process_row (png_structp png_ptr); - -void png_push_read_chunk (png_structp png_ptr, png_infop -info_ptr); - -void png_push_read_end (png_structp png_ptr, png_infop -info_ptr); - -void png_push_read_IDAT (png_structp png_ptr); - -void png_push_read_sig (png_structp png_ptr, png_infop -info_ptr); - -void png_push_read_tEXt (png_structp png_ptr, png_infop -info_ptr); - -void png_push_read_zTXt (png_structp png_ptr, png_infop -info_ptr); - -void png_push_restore_buffer (png_structp png_ptr, png_bytep -buffer, png_size_t buffer_length); - -void png_push_save_buffer (png_structp png_ptr); - -void png_read_data (png_structp png_ptr, png_bytep data, -png_size_t length); - -void png_read_filter_row (png_structp png_ptr, png_row_infop -row_info, png_bytep row, png_bytep prev_row, int filter); - -void png_read_finish_row (png_structp png_ptr); - -void png_read_init (png_structp png_ptr); - -void png_read_push_finish_row (png_structp png_ptr); - -void png_read_start_row (png_structp png_ptr); - -void png_read_transform_info (png_structp png_ptr, png_infop -info_ptr); - -void png_reset_crc (png_structp png_ptr); - -void png_save_int_32 (png_bytep buf, png_int_32 i); - -void png_save_uint_16 (png_bytep buf, unsigned int i); - -void png_save_uint_32 (png_bytep buf, png_uint_32 i); - -void png_write_bKGD (png_structp png_ptr, png_color_16p values, -int color_type); - -void png_write_cHRM (png_structp png_ptr, double white_x, -double white_y, double red_x, double red_y, double green_x, -double green_y, double blue_x, double blue_y); - -void png_write_data (png_structp png_ptr, png_bytep data, -png_size_t length); -void png_write_filtered_row (png_structp png_ptr, png_bytep -filtered_row); - -void png_write_find_filter (png_structp png_ptr, png_row_infop -row_info); - -void png_write_finish_row (png_structp png_ptr); - -void png_write_gAMA (png_structp png_ptr, double file_gamma); - -void png_write_hIST (png_structp png_ptr, png_uint_16p hist, -int num_hist); - -void png_write_init (png_structp png_ptr); - -void png_write_IDAT (png_structp png_ptr, png_bytep data, -png_size_t length); - -void png_write_IEND (png_structp png_ptr); - -void png_write_IHDR (png_structp png_ptr, png_uint_32 width, -png_uint_32 height, int bit_depth, int color_type, int -compression_type, int filter_type, int interlace_type); - -void png_write_oFFs (png_structp png_ptr, png_uint_32 x_offset, -png_uint_32 y_offset, int unit_type); - -void png_write_pCAL (png_structp png_ptr, png_charp purpose, -png_int_32 X0, png_int_32 X1, int type, int nparams, png_charp -units, png_charpp params); - -void png_write_pHYs (png_structp png_ptr, png_uint_32 -x_pixels_per_unit, png_uint_32 y_pixels_per_unit, int -unit_type); - -void png_write_PLTE (png_structp png_ptr, png_colorp palette, -png_uint_32 num_pal); - -void png_write_sBIT (png_structp png_ptr, png_color_8p sbit, -int color_type); - -void png_write_sig (png_structp png_ptr); - -void png_write_sRGB (png_structp png_ptr, int intent); - -void png_write_start_row (png_structp png_ptr); - -void png_write_tEXt (png_structp png_ptr, png_charp key, -png_charp text, png_size_t text_len); - -void png_write_tIME (png_structp png_ptr, png_timep mod_time); - -void png_write_tRNS (png_structp png_ptr, png_bytep trans, -png_color_16p values, int number, int color_type); - -void png_write_zTXt (png_structp png_ptr, png_charp key, -png_charp text, png_size_t text_len, int compression); - -voidpf png_zalloc (voidpf png_ptr, uInt items, uInt size); - -void png_zfree (voidpf png_ptr, voidpf ptr); - -.SH DESCRIPTION -The functions listed above are used privately by libpng -and are not recommended for use by applications. They -are listed alphabetically here as an aid to libpng maintainers. -See png.h for more information on these functions. - -.SH SEE ALSO -libpng(3), png(5) -.SH AUTHOR -Glenn Randers-Pehrson diff --git a/src/png/makefile.bcc b/src/png/makefile.bcc deleted file mode 100644 index efd3c07795..0000000000 --- a/src/png/makefile.bcc +++ /dev/null @@ -1,107 +0,0 @@ -# This file is special for Widows because setjmp -# is incompatible with the DOS version. -# Alejandro Aguilar, 1995 - -# -# Borland C++ tools -# -IMPLIB = Implib -BCC = Bcc +BccW16.cfg -TLINK = TLink -TLIB = TLib -BRC = Brc -TASM = Tasm - - -# -# Options -# -IDE_LFLAGS = -LC:\BC4\LIB -IDE_RFLAGS = -IC:\BC4\INCLUDE;..\zlib; -LLATW16_winpngdlib = -Twe -RLATW16_winpngdlib = -31 -BLATW16_winpngdlib = -LEAT_winpngdlib = $(LLATW16_winpngdlib) -REAT_winpngdlib = $(RLATW16_winpngdlib) -BEAT_winpngdlib = $(BLATW16_winpngdlib) -ZLIB=..\..\lib\zlib.lib -LOBJECTS = png.obj pngrcb.obj pngread.obj pngrtran.obj pngrutil.obj pngstub.obj\ - pngtrans.obj pngwrite.obj pngwtran.obj pngwutil.obj - -# -# Dependency List -# -Dep_winpng = \ - ..\..\lib\winpng.lib - -winpng : BccW16.cfg $(Dep_winpng) - echo MakeNode winpng - -Dep_winpngdlib = \ - png.obj\ - pngrcb.obj\ - pngread.obj\ - pngrtran.obj\ - pngrutil.obj\ - pngstub.obj\ - pngtrans.obj\ - pngwrite.obj\ - pngwtran.obj\ - pngwutil.obj - -$(ZLIB): - cd ..\zlib - make -fmakefile.bcc - cd ..\png - -winpng.lib : $(Dep_winpngdlib) $(ZLIB) - copy /b $(ZLIB) winpng.lib - $(TLIB) $< $(IDE_BFLAGS) $(BEAT_winpngdlib) @&&| -+$(LOBJECTS:.obj =.obj +) -| - -png.obj : png.c - $(BCC) -P- -c $(CEAT_winpngdlib) -o$@ png.c - -pngrcb.obj : pngrcb.c - $(BCC) -P- -c $(CEAT_winpngdlib) -o$@ pngrcb.c - -pngread.obj : pngread.c - $(BCC) -P- -c $(CEAT_winpngdlib) -o$@ pngread.c - -pngrtran.obj : pngrtran.c - $(BCC) -P- -c $(CEAT_winpngdlib) -o$@ pngrtran.c - -pngrutil.obj : pngrutil.c - $(BCC) -P- -c $(CEAT_winpngdlib) -o$@ pngrutil.c - -pngstub.obj : pngstub.c - $(BCC) -P- -c $(CEAT_winpngdlib) -o$@ pngstub.c - -pngtrans.obj : pngtrans.c - $(BCC) -P- -c $(CEAT_winpngdlib) -o$@ pngtrans.c - -pngwrite.obj : pngwrite.c - $(BCC) -P- -c $(CEAT_winpngdlib) -o$@ pngwrite.c - -pngwtran.obj : pngwtran.c - $(BCC) -P- -c $(CEAT_winpngdlib) -o$@ pngwtran.c - -pngwutil.obj : pngwutil.c - $(BCC) -P- -c $(CEAT_winpngdlib) -o$@ pngwutil.c - -# Compiler configuration file -BccW16.cfg : - Copy &&| --v --vi --X- --H --IC:\BC4\INCLUDE --H=winpng.csm --ml --WS --3 --Ff -| $@ - diff --git a/src/png/makefile.dos b/src/png/makefile.dos deleted file mode 100644 index bbea801c4d..0000000000 --- a/src/png/makefile.dos +++ /dev/null @@ -1,76 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds winpng.lib library for Windows 3.1 - -# Change WXDIR or WXWIN to wherever wxWindows is found -WXDIR = $(WXWIN) -WXLIB = $(WXDIR)\lib\wx.lib -WXINC = $(WXDIR)\include - -WINPNGDIR = $(WXDIR)\utils\imatest\png -WINPNGINC = $(WINPNGDIR) -WINPNGLIB = ..\..\lib\winpng.lib - -INC = /I..\zlib - -LIBS=$(WXLIB) $(WINPNGLIB) libw llibcew commdlg ddeml shell # ctl3d - -# Set this to nothing if your compiler is MS C++ 7 -ZOPTION= - -!ifndef FINAL -FINAL=0 -!endif - -PRECOMP=/YuWX.H - -!if "$(FINAL)" == "0" -OPT = /Od -CPPFLAGS= /AL /W4 /Gt4 /Zi $(ZOPTION) /G2sw $(OPT) /Dwx_msw $(INC) # $(PRECOMP) /Fp$(WXDIR)\src\msw\wx.pch -CFLAGS= /AL /W4 /Gt4 /Zi /G2sw /Od /Dwx_msw $(INC) -LINKFLAGS=/NOD /CO /ONERROR:NOEXE -!else -# /Ox for real FINAL version -OPT = /Ox -CPPFLAGS= /AL /W4 /Gt4 /Zi /Os /G2sw $(OPT) /Dwx_msw $(INC) # $(PRECOMP) /Fp$(WXDIR)\src\msw\wx.pch -CFLAGS= /AL /W4 /Gt4 /Zi /Os /G2sw /Dwx_msw $(INC) -LINKFLAGS=/NOD /ONERROR:NOEXE -!endif - -OBJECTS = png.obj pngrcb.obj pngread.obj pngrtran.obj pngrutil.obj pngstub.obj \ - pngtrans.obj pngwrite.obj pngwtran.obj pngwutil.obj - -all: $(WINPNGLIB) - -wx: - cd $(WXDIR)\src - nmake -f makefile.dos $(WXLIB) FINAL=$(FINAL) - -$(WINPNGLIB): $(OBJECTS) - erase $(WINPNGLIB) - lib /PAGESIZE:128 @<< -$(WINPNGLIB) -y -$(OBJECTS) -nul -; -<< - -.c.obj: - cl $(CFLAGS) /c $*.c - -clean: - -erase *.obj - -erase *.exe - -erase *.lib - -erase *.sbr - -erase *.pdb - -cleanall: clean diff --git a/src/png/makefile.nt b/src/png/makefile.nt deleted file mode 100644 index 4973db4f38..0000000000 --- a/src/png/makefile.nt +++ /dev/null @@ -1,64 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds winpng.lib library for Windows 3.1 - -# Change WXDIR or WXWIN to wherever wxWindows is found -WXDIR = $(WXWIN) -WXLIB = $(WXDIR)\lib\wx.lib -WXINC = $(WXDIR)\include - -WINPNGDIR = ..\png -WINPNGINC = $(WINPNGDIR) -WINPNGLIB = ..\..\lib\winpng.lib - -INC = /I..\zlib - -# Set this to nothing if your compiler is MS C++ 7 -ZOPTION= - -!ifndef FINAL -FINAL=0 -!endif - -PRECOMP=/YuWX.H - -!if "$(FINAL)" == "0" -OPT = /Od -CPPFLAGS= /W4 /Zi /MDd /GX $(ZOPTION) $(OPT) /Dwx_msw $(INC) # $(PRECOMP) /Fp$(WXDIR)\src\msw\wx.pch -CFLAGS= /W4 /Zi /MDd /GX /Od /Dwx_msw $(INC) -LINKFLAGS=/NOD /CO /ONERROR:NOEXE -!else -# /Ox for real FINAL version -OPT = /O2 -CPPFLAGS= /W4 /MDd /GX /Dwx_msw $(INC) # $(PRECOMP) /Fp$(WXDIR)\src\msw\wx.pch -CFLAGS= /W4 /MDd /GX /Dwx_msw $(INC) -LINKFLAGS=/NOD /ONERROR:NOEXE -!endif - -OBJECTS = png.obj pngread.obj pngrtran.obj pngrutil.obj \ - pngpread.obj pngtrans.obj pngwrite.obj pngwtran.obj pngwutil.obj \ - pngerror.obj pngmem.obj pngwio.obj pngrio.obj pngget.obj pngset.obj - -all: $(WINPNGLIB) - -$(WINPNGLIB): $(OBJECTS) - erase $(WINPNGLIB) - lib @<< --out:$(WINPNGLIB) -$(OBJECTS) -<< - -.c.obj: - cl -DWIN32 $(OPT) $(CFLAGS) /c $*.c - -clean: - erase *.obj *.exe *.lib - -cleanall: clean diff --git a/src/png/png.5 b/src/png/png.5 deleted file mode 100644 index 30244aabb8..0000000000 --- a/src/png/png.5 +++ /dev/null @@ -1,44 +0,0 @@ -.TH PNG 5 "March 15, 1998" -.SH NAME -png \- Portable Network Graphics (PNG) format -.SH DESCRIPTION -PNG (Portable Network Graphics) is an extensible file format for the -lossless, portable, well-compressed storage of raster images. PNG provides -a patent-free replacement for GIF and can also replace many -common uses of TIFF. Indexed-color, grayscale, and truecolor images are -supported, plus an optional alpha channel. Sample depths range from -1 to 16 bits. -.br - -PNG is designed to work well in online viewing applications, such as the -World Wide Web, so it is fully streamable with a progressive display -option. PNG is robust, providing both full file integrity checking and -fast, simple detection of common transmission errors. Also, PNG can store -gamma and chromaticity data for improved color matching on heterogeneous -platforms. - -.SH "SEE ALSO" -.IR libpng(3), zlib(3), deflate(5), and zlib(5) -.LP -PNG specification: -RFC 2083 -.IP -.br -ftp://ds.internic.net/rfc/rfc2083.txt -.br -or (as a W3C Recommendation) at -.br -http://www.w3.org/TR/REC-png.html -.SH AUTHORS -This man page: Glenn Randers-Pehrson -.LP -Portable Network Graphics (PNG) Specification Version 1.0 (October 1, 1996): -Thomas Boutell and others (png-list@dworkin.wustl.edu). -.LP - -.SH COPYRIGHT NOTICE -The PNG specification is copyright (c) 1996 Massachussets Institute of -Technology. See the specification for conditions of use and distribution. -.LP -.\" end of man page - diff --git a/src/png/png.c b/src/png/png.c deleted file mode 100644 index 33009674d6..0000000000 --- a/src/png/png.c +++ /dev/null @@ -1,304 +0,0 @@ - -/* png.c - location for general purpose libpng functions - * - * libpng 1.0.1 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - * Copyright (c) 1996, 1997 Andreas Dilger - * Copyright (c) 1998, Glenn Randers-Pehrson - * March 15, 1998 - */ - -#define PNG_INTERNAL -#define PNG_NO_EXTERN -#include "../png/png.h" - -/* Version information for C files. This had better match the version - * string defined in png.h. - */ -char png_libpng_ver[12] = "1.0.1"; - -/* Place to hold the signature string for a PNG file. */ -png_byte FARDATA png_sig[8] = {137, 80, 78, 71, 13, 10, 26, 10}; - -/* Constant strings for known chunk types. If you need to add a chunk, - * add a string holding the name here. If you want to make the code - * portable to EBCDIC machines, use ASCII numbers, not characters. - */ -png_byte FARDATA png_IHDR[5] = { 73, 72, 68, 82, '\0'}; -png_byte FARDATA png_IDAT[5] = { 73, 68, 65, 84, '\0'}; -png_byte FARDATA png_IEND[5] = { 73, 69, 78, 68, '\0'}; -png_byte FARDATA png_PLTE[5] = { 80, 76, 84, 69, '\0'}; -png_byte FARDATA png_bKGD[5] = { 98, 75, 71, 68, '\0'}; -png_byte FARDATA png_cHRM[5] = { 99, 72, 82, 77, '\0'}; -png_byte FARDATA png_gAMA[5] = {103, 65, 77, 65, '\0'}; -png_byte FARDATA png_hIST[5] = {104, 73, 83, 84, '\0'}; -png_byte FARDATA png_oFFs[5] = {111, 70, 70, 115, '\0'}; -png_byte FARDATA png_pCAL[5] = {112, 67, 65, 76, '\0'}; -png_byte FARDATA png_pHYs[5] = {112, 72, 89, 115, '\0'}; -png_byte FARDATA png_sBIT[5] = {115, 66, 73, 84, '\0'}; -png_byte FARDATA png_sRGB[5] = {115, 82, 71, 66, '\0'}; -png_byte FARDATA png_tEXt[5] = {116, 69, 88, 116, '\0'}; -png_byte FARDATA png_tIME[5] = {116, 73, 77, 69, '\0'}; -png_byte FARDATA png_tRNS[5] = {116, 82, 78, 83, '\0'}; -png_byte FARDATA png_zTXt[5] = {122, 84, 88, 116, '\0'}; - -/* arrays to facilitate easy interlacing - use pass (0 - 6) as index */ - -/* start of interlace block */ -int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; - -/* offset to next interlace block */ -int FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; - -/* start of interlace block in the y direction */ -int FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1}; - -/* offset to next interlace block in the y direction */ -int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2}; - -/* Width of interlace block. This is not currently used - if you need - * it, uncomment it here and in png.h -int FARDATA png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; -*/ - -/* Height of interlace block. This is not currently used - if you need - * it, uncomment it here and in png.h -int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1}; -*/ - -/* Mask to determine which pixels are valid in a pass */ -int FARDATA png_pass_mask[] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff}; - -/* Mask to determine which pixels to overwrite while displaying */ -int FARDATA png_pass_dsp_mask[] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff}; - - -/* Tells libpng that we have already handled the first "num_bytes" bytes - * of the PNG file signature. If the PNG data is embedded into another - * stream we can set num_bytes = 8 so that libpng will not attempt to read - * or write any of the magic bytes before it starts on the IHDR. - */ -void -png_set_sig_bytes(png_structp png_ptr, int num_bytes) -{ - png_debug(1, "in png_set_sig_bytes\n"); - if (num_bytes > 8) - png_error(png_ptr, "Too many bytes for PNG signature."); - - png_ptr->sig_bytes = num_bytes < 0 ? 0 : num_bytes; -} - -/* Checks whether the supplied bytes match the PNG signature. We allow - * checking less than the full 8-byte signature so that those apps that - * already read the first few bytes of a file to determine the file type - * can simply check the remaining bytes for extra assurance. Returns - * an integer less than, equal to, or greater than zero if sig is found, - * respectively, to be less than, to match, or be greater than the correct - * PNG signature (this is the same behaviour as strcmp, memcmp, etc). - */ -int -png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check) -{ - if (num_to_check > 8) - num_to_check = 8; - else if (num_to_check < 1) - return (0); - - if (start > 7) - return (0); - - if (start + num_to_check > 8) - num_to_check = 8 - start; - - return ((int)(png_memcmp(&sig[start], &png_sig[start], num_to_check))); -} - -/* (Obsolete) function to check signature bytes. It does not allow one - * to check a partial signature. This function will be removed in the - * future - use png_sig_cmp(). - */ -int -png_check_sig(png_bytep sig, int num) -{ - return ((int)!png_sig_cmp(sig, (png_size_t)0, (png_size_t)num)); -} - -/* Function to allocate memory for zlib. */ -voidpf -png_zalloc(voidpf png_ptr, uInt items, uInt size) -{ - png_voidp ptr; - png_uint_32 num_bytes; - - num_bytes = (png_uint_32)items * size; - ptr = (png_voidp)png_malloc((png_structp)png_ptr, num_bytes); - if (num_bytes > (png_uint_32)0x8000) - { - png_memset(ptr, 0, (png_size_t)0x8000L); - png_memset((png_bytep)ptr + (png_size_t)0x8000L, 0, - (png_size_t)(num_bytes - (png_uint_32)0x8000L)); - } - else - { - png_memset(ptr, 0, (png_size_t)num_bytes); - } - return ((voidpf)ptr); -} - -/* function to free memory for zlib */ -void -png_zfree(voidpf png_ptr, voidpf ptr) -{ - png_free((png_structp)png_ptr, (png_voidp)ptr); -} - -/* Reset the CRC variable to 32 bits of 1's. Care must be taken - * in case CRC is > 32 bits to leave the top bits 0. - */ -void -png_reset_crc(png_structp png_ptr) -{ - png_ptr->crc = crc32(0, Z_NULL, 0); -} - -/* Calculate the CRC over a section of data. We can only pass as - * much data to this routine as the largest single buffer size. We - * also check that this data will actually be used before going to the - * trouble of calculating it. - */ -void -png_calculate_crc(png_structp png_ptr, png_bytep ptr, png_size_t length) -{ - int need_crc = 1; - - if (png_ptr->chunk_name[0] & 0x20) /* ancillary */ - { - if ((png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_MASK) == - (PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN)) - need_crc = 0; - } - else /* critical */ - { - if (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE) - need_crc = 0; - } - - if (need_crc) - png_ptr->crc = crc32(png_ptr->crc, ptr, (uInt)length); -} - -/* Allocate the memory for an info_struct for the application. We don't - * really need the png_ptr, but it could potentially be useful in the - * future. This should be used in favour of malloc(sizeof(png_info)) - * and png_info_init() so that applications that want to use a shared - * libpng don't have to be recompiled if png_info changes size. - */ -png_infop -png_create_info_struct(png_structp png_ptr) -{ - png_infop info_ptr; - - png_debug(1, "in png_create_info_struct\n"); - if(png_ptr == NULL) return (NULL); - if ((info_ptr = (png_infop)png_create_struct(PNG_STRUCT_INFO)) != NULL) - { - png_info_init(info_ptr); - } - - return (info_ptr); -} - -/* This function frees the memory associated with a single info struct. - * Normally, one would use either png_destroy_read_struct() or - * png_destroy_write_struct() to free an info struct, but this may be - * useful for some applications. - */ -void -png_destroy_info_struct(png_structp png_ptr, png_infopp info_ptr_ptr) -{ - png_infop info_ptr = NULL; - - png_debug(1, "in png_destroy_info_struct\n"); - if (info_ptr_ptr != NULL) - info_ptr = *info_ptr_ptr; - - if (info_ptr != NULL) - { - png_info_destroy(png_ptr, info_ptr); - - png_destroy_struct((png_voidp)info_ptr); - *info_ptr_ptr = (png_infop)NULL; - } -} - -/* Initialize the info structure. This is now an internal function (0.89) - * and applications using it are urged to use png_create_info_struct() - * instead. - */ -void -png_info_init(png_infop info_ptr) -{ - png_debug(1, "in png_info_init\n"); - /* set everything to 0 */ - png_memset(info_ptr, 0, sizeof (png_info)); -} - -/* This is an internal routine to free any memory that the info struct is - * pointing to before re-using it or freeing the struct itself. Recall - * that png_free() checks for NULL pointers for us. - */ -void -png_info_destroy(png_structp png_ptr, png_infop info_ptr) -{ -#if defined(PNG_READ_tEXt_SUPPORTED) || defined(PNG_READ_zTXt_SUPPORTED) - int i; - - png_debug(1, "in png_info_destroy\n"); - if (info_ptr->text != NULL) - { - for (i = 0; i < info_ptr->num_text; i++) - { - png_free(png_ptr, info_ptr->text[i].key); - } - png_free(png_ptr, info_ptr->text); - } -#endif -#if defined(PNG_READ_pCAL_SUPPORTED) - png_free(png_ptr, info_ptr->pcal_purpose); - png_free(png_ptr, info_ptr->pcal_units); - if (info_ptr->pcal_params != NULL) - { - for (i = 0; i < (int)info_ptr->pcal_nparams; i++) - { - png_free(png_ptr, info_ptr->pcal_params[i]); - } - png_free(png_ptr, info_ptr->pcal_params); - } -#endif - - png_info_init(info_ptr); -} - -/* This function returns a pointer to the io_ptr associated with the user - * functions. The application should free any memory associated with this - * pointer before png_write_destroy() or png_read_destroy() are called. - */ -png_voidp -png_get_io_ptr(png_structp png_ptr) -{ - return (png_ptr->io_ptr); -} - -#if !defined(PNG_NO_STDIO) -/* Initialize the default input/output functions for the PNG file. If you - * use your own read or write routines, you can call either png_set_read_fn() - * or png_set_write_fn() instead of png_init_io(). - */ -void -png_init_io(png_structp png_ptr, FILE *fp) -{ - png_debug(1, "in png_init_io\n"); - png_ptr->io_ptr = (png_voidp)fp; -} -#endif diff --git a/src/png/png.h b/src/png/png.h deleted file mode 100644 index 3c5ad6007e..0000000000 --- a/src/png/png.h +++ /dev/null @@ -1,2063 +0,0 @@ - -/* png.h - header file for PNG reference library - * - * libpng 1.0.1 - * For conditions of distribution and use, see the COPYRIGHT NOTICE below. - * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - * Copyright (c) 1996, 1997 Andreas Dilger - * Copyright (c) 1998 Glenn Randers-Pehrson - * March 15, 1998 - * - * Note about libpng version numbers: - * - * Due to various miscommunications, unforeseen code incompatibilities - * and occasional factors outside the authors' control, version numbering - * on the library has not always been consistent and straightforward. - * The following table summarizes matters since version 0.89c, which was - * the first widely used release: - * - * source png.h png.h shared-lib - * version string int version - * ------- ------ ------ ---------- - * 0.89c ("1.0 beta 3") 0.89 89 1.0.89 - * 0.90 ("1.0 beta 4") 0.90 90 0.90 [should have been 2.0.90] - * 0.95 ("1.0 beta 5") 0.95 95 0.95 [should have been 2.0.95] - * 0.96 ("1.0 beta 6") 0.96 96 0.96 [should have been 2.0.96] - * 0.97b ("1.00.97 beta 7") 1.00.97 97 1.0.1 [should have been 2.0.97] - * 0.97c 0.97 97 2.0.97 - * 0.98 0.98 98 2.0.98 - * 0.99 0.99 98 2.0.99 - * 0.99a-m 0.99 99 2.0.99 - * 1.00 1.00 100 2.1.0 [int should be 10000] - * 1.0.0 1.0.0 100 2.1.0 [int should be 10000] - * 1.0.1 1.0.1 10001 2.1.0 - * - * Henceforth the source version will match the shared-library minor - * and patch numbers; the shared-library major version number will be - * used for changes in backward compatibility, as it is intended. - * The PNG_PNGLIB_VER macro, which is not used within libpng but - * is available for applications, is an unsigned integer of the form - * xyyzz corresponding to the source version x.y.z (leading zeros in y and z). - * - * - * See libpng.txt for more information. The PNG specification is available - * as RFC 2083 - * and as a W3C Recommendation - * - * Contributing Authors: - * John Bowler - * Kevin Bracey - * Sam Bushell - * Andreas Dilger - * Magnus Holmgren - * Tom Lane - * Dave Martindale - * Glenn Randers-Pehrson - * Greg Roelofs - * Guy Eric Schalnat - * Paul Schmidt - * Tom Tanner - * Willem van Schaik - * Tim Wegner - * - * The contributing authors would like to thank all those who helped - * with testing, bug fixes, and patience. This wouldn't have been - * possible without all of you. - * - * Thanks to Frank J. T. Wojcik for helping with the documentation. - * - * COPYRIGHT NOTICE: - * - * The PNG Reference Library is supplied "AS IS". The Contributing Authors - * and Group 42, Inc. disclaim all warranties, expressed or implied, - * including, without limitation, the warranties of merchantability and of - * fitness for any purpose. The Contributing Authors and Group 42, Inc. - * assume no liability for direct, indirect, incidental, special, exemplary, - * or consequential damages, which may result from the use of the PNG - * Reference Library, even if advised of the possibility of such damage. - * - * Permission is hereby granted to use, copy, modify, and distribute this - * source code, or portions hereof, for any purpose, without fee, subject - * to the following restrictions: - * 1. The origin of this source code must not be misrepresented. - * 2. Altered versions must be plainly marked as such and must not be - * misrepresented as being the original source. - * 3. This Copyright notice may not be removed or altered from any source or - * altered source distribution. - * - * The Contributing Authors and Group 42, Inc. specifically permit, without - * fee, and encourage the use of this source code as a component to - * supporting the PNG file format in commercial products. If you use this - * source code in a product, acknowledgment is not required but would be - * appreciated. - */ - -#ifndef _PNG_H -#define _PNG_H - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* This is not the place to learn how to use libpng. The file libpng.txt - * describes how to use libpng, and the file example.c summarizes it - * with some code on which to build. This file is useful for looking - * at the actual function definitions and structure components. - */ - -/* include the compression library's header */ -#include "../zlib/zlib.h" - -/* include all user configurable info */ -#include "../png/pngconf.h" - -/* This file is arranged in several sections. The first section contains - * structure and type definitions. The second section contains the external - * library functions, while the third has the internal library functions, - * which applications aren't expected to use directly. - */ - -/* Version information for png.h - this should match the version in png.c */ -#define PNG_LIBPNG_VER_STRING "1.0.1" - -/* Careful here. At one time, Guy wanted to use 082, but that would be octal. - * We must not include leading zeros. - * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only - * version 1.0.0 was mis-numbered 100 instead of 10000). From - * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=bugfix */ -#define PNG_LIBPNG_VER 10001 /* 1.0.1 */ - -/* variables declared in png.c - only it needs to define PNG_NO_EXTERN */ -#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN) -/* Version information for C files, stored in png.c. This had better match - * the version above. - */ -extern char png_libpng_ver[12]; /* need room for 99.99.99aa */ - -/* Structures to facilitate easy interlacing. See png.c for more details */ -extern int FARDATA png_pass_start[7]; -extern int FARDATA png_pass_inc[7]; -extern int FARDATA png_pass_ystart[7]; -extern int FARDATA png_pass_yinc[7]; -extern int FARDATA png_pass_mask[7]; -extern int FARDATA png_pass_dsp_mask[7]; -/* These aren't currently used. If you need them, see png.c for more details -extern int FARDATA png_pass_width[7]; -extern int FARDATA png_pass_height[7]; -*/ -#endif /* PNG_NO_EXTERN */ - -/* Three color definitions. The order of the red, green, and blue, (and the - * exact size) is not important, although the size of the fields need to - * be png_byte or png_uint_16 (as defined below). - */ -typedef struct png_color_struct -{ - png_byte red; - png_byte green; - png_byte blue; -} png_color; -typedef png_color FAR * png_colorp; -typedef png_color FAR * FAR * png_colorpp; - -typedef struct png_color_16_struct -{ - png_byte index; /* used for palette files */ - png_uint_16 red; /* for use in red green blue files */ - png_uint_16 green; - png_uint_16 blue; - png_uint_16 gray; /* for use in grayscale files */ -} png_color_16; -typedef png_color_16 FAR * png_color_16p; -typedef png_color_16 FAR * FAR * png_color_16pp; - -typedef struct png_color_8_struct -{ - png_byte red; /* for use in red green blue files */ - png_byte green; - png_byte blue; - png_byte gray; /* for use in grayscale files */ - png_byte alpha; /* for alpha channel files */ -} png_color_8; -typedef png_color_8 FAR * png_color_8p; -typedef png_color_8 FAR * FAR * png_color_8pp; - -/* png_text holds the text in a PNG file, and whether they are compressed - in the PNG file or not. The "text" field points to a regular C string. */ -typedef struct png_text_struct -{ - int compression; /* compression value, see PNG_TEXT_COMPRESSION_ */ - png_charp key; /* keyword, 1-79 character description of "text" */ - png_charp text; /* comment, may be an empty string (ie "") */ - png_size_t text_length; /* length of "text" field */ -} png_text; -typedef png_text FAR * png_textp; -typedef png_text FAR * FAR * png_textpp; - -/* Supported compression types for text in PNG files (tEXt, and zTXt). - * The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed. */ -#define PNG_TEXT_COMPRESSION_NONE_WR -3 -#define PNG_TEXT_COMPRESSION_zTXt_WR -2 -#define PNG_TEXT_COMPRESSION_NONE -1 -#define PNG_TEXT_COMPRESSION_zTXt 0 -#define PNG_TEXT_COMPRESSION_LAST 1 /* Not a valid value */ - -/* png_time is a way to hold the time in an machine independent way. - * Two conversions are provided, both from time_t and struct tm. There - * is no portable way to convert to either of these structures, as far - * as I know. If you know of a portable way, send it to me. As a side - * note - PNG is Year 2000 compliant! - */ -typedef struct png_time_struct -{ - png_uint_16 year; /* full year, as in, 1995 */ - png_byte month; /* month of year, 1 - 12 */ - png_byte day; /* day of month, 1 - 31 */ - png_byte hour; /* hour of day, 0 - 23 */ - png_byte minute; /* minute of hour, 0 - 59 */ - png_byte second; /* second of minute, 0 - 60 (for leap seconds) */ -} png_time; -typedef png_time FAR * png_timep; -typedef png_time FAR * FAR * png_timepp; - -/* png_info is a structure that holds the information in a PNG file so - * that the application can find out the characteristics of the image. - * If you are reading the file, this structure will tell you what is - * in the PNG file. If you are writing the file, fill in the information - * you want to put into the PNG file, then call png_write_info(). - * The names chosen should be very close to the PNG specification, so - * consult that document for information about the meaning of each field. - * - * With libpng < 0.95, it was only possible to directly set and read the - * the values in the png_info_struct, which meant that the contents and - * order of the values had to remain fixed. With libpng 0.95 and later, - * however, * there are now functions which abstract the contents of - * png_info_struct from the application, so this makes it easier to use - * libpng with dynamic libraries, and even makes it possible to use - * libraries that don't have all of the libpng ancillary chunk-handing - * functionality. - * - * In any case, the order of the parameters in png_info_struct should NOT - * be changed for as long as possible to keep compatibility with applications - * that use the old direct-access method with png_info_struct. - */ -typedef struct png_info_struct -{ - /* the following are necessary for every PNG file */ - png_uint_32 width; /* width of image in pixels (from IHDR) */ - png_uint_32 height; /* height of image in pixels (from IHDR) */ - png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */ - png_uint_32 rowbytes; /* bytes needed to hold an untransformed row */ - png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */ - png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */ - png_uint_16 num_trans; /* number of transparent palette color (tRNS) */ - png_byte bit_depth; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */ - png_byte color_type; /* see PNG_COLOR_TYPE_ below (from IHDR) */ - png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */ - png_byte filter_type; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */ - png_byte interlace_type; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ - - /* The following is informational only on read, and not used on writes. */ - png_byte channels; /* number of data channels per pixel (1, 3, 4)*/ - png_byte pixel_depth; /* number of bits per pixel */ - png_byte spare_byte; /* to align the data, and for future use */ - png_byte signature[8]; /* magic bytes read by libpng from start of file */ - - /* The rest of the data is optional. If you are reading, check the - * valid field to see if the information in these are valid. If you - * are writing, set the valid field to those chunks you want written, - * and initialize the appropriate fields below. - */ - -#if defined(PNG_READ_gAMA_SUPPORTED) || defined(PNG_WRITE_gAMA_SUPPORTED) || \ - defined(PNG_READ_GAMMA_SUPPORTED) - /* The gAMA chunk describes the gamma characteristics of the system - * on which the image was created, normally in the range [1.0, 2.5]. - * Data is valid if (valid & PNG_INFO_gAMA) is non-zero. - */ - float gamma; /* gamma value of image, if (valid & PNG_INFO_gAMA) */ -#endif /* PNG_READ_gAMA_SUPPORTED || PNG_WRITE_gAMA_SUPPORTED */ - -#if defined(PNG_READ_sRGB_SUPPORTED) || defined(PNG_WRITE_sRGB_SUPPORTED) - /* GR-P, 0.96a */ - /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */ - png_byte srgb_intent; /* sRGB rendering intent [0, 1, 2, or 3] */ -#endif /* PNG_READ_sRGB_SUPPORTED || PNG_WRITE_sRGB_SUPPORTED */ - -#if defined(PNG_READ_tEXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \ - defined(PNG_READ_zTXt_SUPPORTED) || defined(PNG_WRITE_zTXt_SUPPORTED) - /* The tEXt and zTXt chunks contain human-readable textual data in - * uncompressed and compressed forms, respectively. The data in "text" - * is an array of pointers to uncompressed, null-terminated C strings. - * Each chunk has a keyword which describes the textual data contained - * in that chunk. Keywords are not required to be unique, and the text - * string may be empty. Any number of text chunks may be in an image. - */ - int num_text; /* number of comments read/to write */ - int max_text; /* current size of text array */ - png_textp text; /* array of comments read/to write */ -#endif /* PNG_READ_tEXt/zTXt_SUPPORTED || PNG_WRITE_tEXt/zTXt_SUPPORTED */ -#if defined(PNG_READ_tIME_SUPPORTED) || defined(PNG_WRITE_tIME_SUPPORTED) - /* The tIME chunk holds the last time the displayed image data was - * modified. See the png_time struct for the contents of this struct. - */ - png_time mod_time; -#endif /* PNG_READ_tIME_SUPPORTED || PNG_WRITE_tIME_SUPPORTED */ -#if defined(PNG_READ_sBIT_SUPPORTED) || defined(PNG_WRITE_sBIT_SUPPORTED) - /* The sBIT chunk specifies the number of significant high-order bits - * in the pixel data. Values are in the range [1, bit_depth], and are - * only specified for the channels in the pixel data. The contents of - * the low-order bits is not specified. Data is valid if - * (valid & PNG_INFO_sBIT) is non-zero. - */ - png_color_8 sig_bit; /* significant bits in color channels */ -#endif /* PNG_READ_sBIT_SUPPORTED || PNG_WRITE_sBIT_SUPPORTED */ -#if defined(PNG_READ_tRNS_SUPPORTED) || defined(PNG_WRITE_tRNS_SUPPORTED) - /* The tRNS chunk supplies transparency data for paletted images and - * other image types that don't need a full alpha channel. There are - * "num_trans" transparency values for a paletted image, stored in the - * same order as the palette colors, starting from index 0. Values - * for the data are in the range [0, 255], ranging from fully transparent - * to fully opaque, respectively. For non-paletted images, there is a - * single color specified which should be treated as fully transparent. - * Data is valid if (valid & PNG_INFO_tRNS) is non-zero. - */ - png_bytep trans; /* transparent values for paletted image */ - png_color_16 trans_values; /* transparent color for non-palette image */ -#endif /* PNG_READ_tRNS_SUPPORTED || PNG_WRITE_tRNS_SUPPORTED */ -#if defined(PNG_READ_bKGD_SUPPORTED) || defined(PNG_WRITE_bKGD_SUPPORTED) || \ - defined(PNG_READ_BACKGROUND_SUPPORTED) - /* The bKGD chunk gives the suggested image background color if the - * display program does not have its own background color and the image - * is needs to composited onto a background before display. The colors - * in "background" are normally in the same color space/depth as the - * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero. - */ - png_color_16 background; -#endif /* PNG_READ_bKGD_SUPPORTED || PNG_WRITE_bKGD_SUPPORTED */ -#if defined(PNG_READ_oFFs_SUPPORTED) || defined(PNG_WRITE_oFFs_SUPPORTED) - /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards - * and downwards from the top-left corner of the display, page, or other - * application-specific co-ordinate space. See the PNG_OFFSET_ defines - * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero. - */ - png_uint_32 x_offset; /* x offset on page */ - png_uint_32 y_offset; /* y offset on page */ - png_byte offset_unit_type; /* offset units type */ -#endif /* PNG_READ_oFFs_SUPPORTED || PNG_WRITE_oFFs_SUPPORTED */ -#if defined(PNG_READ_pHYs_SUPPORTED) || defined(PNG_WRITE_pHYs_SUPPORTED) - /* The pHYs chunk gives the physical pixel density of the image for - * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_ - * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero. - */ - png_uint_32 x_pixels_per_unit; /* horizontal pixel density */ - png_uint_32 y_pixels_per_unit; /* vertical pixel density */ - png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */ -#endif /* PNG_READ_pHYs_SUPPORTED || PNG_WRITE_pHYs_SUPPORTED */ -#if defined(PNG_READ_hIST_SUPPORTED) || defined(PNG_WRITE_hIST_SUPPORTED) - /* The hIST chunk contains the relative frequency or importance of the - * various palette entries, so that a viewer can intelligently select a - * reduced-color palette, if required. Data is an array of "num_palette" - * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST) - * is non-zero. - */ - png_uint_16p hist; -#endif /* PNG_READ_hIST_SUPPORTED || PNG_WRITE_hIST_SUPPORTED */ -#if defined(PNG_READ_cHRM_SUPPORTED) || defined(PNG_WRITE_cHRM_SUPPORTED) - /* The cHRM chunk describes the CIE color characteristics of the monitor - * on which the PNG was created. This data allows the viewer to do gamut - * mapping of the input image to ensure that the viewer sees the same - * colors in the image as the creator. Values are in the range - * [0.0, 0.8]. Data valid if (valid & PNG_INFO_cHRM) non-zero. - */ - float x_white; - float y_white; - float x_red; - float y_red; - float x_green; - float y_green; - float x_blue; - float y_blue; -#endif /* PNG_READ_cHRM_SUPPORTED || PNG_WRITE_cHRM_SUPPORTED */ -#if defined(PNG_READ_pCAL_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) - /* The pCAL chunk describes a transformation between the stored pixel - * values and original physcical data values used to create the image. - * The integer range [0, 2^bit_depth - 1] maps to the floating-point - * range given by [pcal_X0, pcal_X1], and are further transformed by a - * (possibly non-linear) transformation function given by "pcal_type" - * and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_ - * defines below, and the PNG-Group's Scientific Visualization extension - * chunks document png-scivis-19970203 for a complete description of the - * transformations and how they should be implemented, as well as the - * png-extensions document for a description of the ASCII parameter - * strings. Data values are valid if (valid & PNG_INFO_pCAL) non-zero. - */ - png_charp pcal_purpose; /* pCAL chunk description string */ - png_int_32 pcal_X0; /* minimum value */ - png_int_32 pcal_X1; /* maximum value */ - png_charp pcal_units; /* Latin-1 string giving physical units */ - png_charpp pcal_params; /* ASCII strings containing parameter values */ - png_byte pcal_type; /* equation type (see PNG_EQUATION_ below) */ - png_byte pcal_nparams; /* number of parameters given in pcal_params */ -#endif /* PNG_READ_pCAL_SUPPORTED || PNG_WRITE_pCAL_SUPPORTED */ -} png_info; -typedef png_info FAR * png_infop; -typedef png_info FAR * FAR * png_infopp; - -/* These describe the color_type field in png_info. */ -/* color type masks */ -#define PNG_COLOR_MASK_PALETTE 1 -#define PNG_COLOR_MASK_COLOR 2 -#define PNG_COLOR_MASK_ALPHA 4 - -/* color types. Note that not all combinations are legal */ -#define PNG_COLOR_TYPE_GRAY 0 -#define PNG_COLOR_TYPE_PALETTE (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_PALETTE) -#define PNG_COLOR_TYPE_RGB (PNG_COLOR_MASK_COLOR) -#define PNG_COLOR_TYPE_RGB_ALPHA (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA) -#define PNG_COLOR_TYPE_GRAY_ALPHA (PNG_COLOR_MASK_ALPHA) - -/* This is for compression type. PNG 1.0 only defines the single type. */ -#define PNG_COMPRESSION_TYPE_BASE 0 /* Deflate method 8, 32K window */ -#define PNG_COMPRESSION_TYPE_DEFAULT PNG_COMPRESSION_TYPE_BASE - -/* This is for filter type. PNG 1.0 only defines the single type. */ -#define PNG_FILTER_TYPE_BASE 0 /* Single row per-byte filtering */ -#define PNG_FILTER_TYPE_DEFAULT PNG_FILTER_TYPE_BASE - -/* These are for the interlacing type. These values should NOT be changed. */ -#define PNG_INTERLACE_NONE 0 /* Non-interlaced image */ -#define PNG_INTERLACE_ADAM7 1 /* Adam7 interlacing */ -#define PNG_INTERLACE_LAST 2 /* Not a valid value */ - -/* These are for the oFFs chunk. These values should NOT be changed. */ -#define PNG_OFFSET_PIXEL 0 /* Offset in pixels */ -#define PNG_OFFSET_MICROMETER 1 /* Offset in micrometers (1/10^6 meter) */ -#define PNG_OFFSET_LAST 2 /* Not a valid value */ - -/* These are for the pCAL chunk. These values should NOT be changed. */ -#define PNG_EQUATION_LINEAR 0 /* Linear transformation */ -#define PNG_EQUATION_BASE_E 1 /* Exponential base e transform */ -#define PNG_EQUATION_ARBITRARY 2 /* Arbitrary base exponential transform */ -#define PNG_EQUATION_HYPERBOLIC 3 /* Hyperbolic sine transformation */ -#define PNG_EQUATION_LAST 4 /* Not a valid value */ - -/* These are for the pHYs chunk. These values should NOT be changed. */ -#define PNG_RESOLUTION_UNKNOWN 0 /* pixels/unknown unit (aspect ratio) */ -#define PNG_RESOLUTION_METER 1 /* pixels/meter */ -#define PNG_RESOLUTION_LAST 2 /* Not a valid value */ - -/* These are for the sRGB chunk. These values should NOT be changed. */ -#define PNG_sRGB_INTENT_SATURATION 0 -#define PNG_sRGB_INTENT_PERCEPTUAL 1 -#define PNG_sRGB_INTENT_ABSOLUTE 2 -#define PNG_sRGB_INTENT_RELATIVE 3 -#define PNG_sRGB_INTENT_LAST 4 /* Not a valid value */ - - - -/* These determine if an ancillary chunk's data has been successfully read - * from the PNG header, or if the application has filled in the corresponding - * data in the info_struct to be written into the output file. The values - * of the PNG_INFO_ defines should NOT be changed. - */ -#define PNG_INFO_gAMA 0x0001 -#define PNG_INFO_sBIT 0x0002 -#define PNG_INFO_cHRM 0x0004 -#define PNG_INFO_PLTE 0x0008 -#define PNG_INFO_tRNS 0x0010 -#define PNG_INFO_bKGD 0x0020 -#define PNG_INFO_hIST 0x0040 -#define PNG_INFO_pHYs 0x0080 -#define PNG_INFO_oFFs 0x0100 -#define PNG_INFO_tIME 0x0200 -#define PNG_INFO_pCAL 0x0400 -#define PNG_INFO_sRGB 0x0800 /* GR-P, 0.96a */ - -/* This is used for the transformation routines, as some of them - * change these values for the row. It also should enable using - * the routines for other purposes. - */ -typedef struct png_row_info_struct -{ - png_uint_32 width; /* width of row */ - png_uint_32 rowbytes; /* number of bytes in row */ - png_byte color_type; /* color type of row */ - png_byte bit_depth; /* bit depth of row */ - png_byte channels; /* number of channels (1, 2, 3, or 4) */ - png_byte pixel_depth; /* bits per pixel (depth * channels) */ -} png_row_info; - -typedef png_row_info FAR * png_row_infop; -typedef png_row_info FAR * FAR * png_row_infopp; - -/* These are the function types for the I/O functions, and the functions which - * modify the default I/O functions to user I/O functions. The png_error_ptr - * type should match that of user supplied warning and error functions, while - * the png_rw_ptr type should match that of the user read/write data functions. - */ -typedef struct png_struct_def png_struct; -typedef png_struct FAR * png_structp; - -typedef void (*png_error_ptr) PNGARG((png_structp, png_const_charp)); -typedef void (*png_rw_ptr) PNGARG((png_structp, png_bytep, png_size_t)); -typedef void (*png_flush_ptr) PNGARG((png_structp)); -typedef void (*png_read_status_ptr) PNGARG((png_structp, png_uint_32, int)); -typedef void (*png_write_status_ptr) PNGARG((png_structp, png_uint_32, int)); -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED -typedef void (*png_progressive_info_ptr) PNGARG((png_structp, png_infop)); -typedef void (*png_progressive_end_ptr) PNGARG((png_structp, png_infop)); -typedef void (*png_progressive_row_ptr) PNGARG((png_structp, png_bytep, - png_uint_32, int)); -#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ - -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) -typedef void (*png_user_transform_ptr) PNGARG((png_structp, - png_row_infop, png_bytep)); -#endif /* PNG_READ|WRITE_USER_TRANSFORM_SUPPORTED */ - -/* The structure that holds the information to read and write PNG files. - * The only people who need to care about what is inside of this are the - * people who will be modifying the library for their own special needs. - * It should NOT be accessed directly by an application, except to store - * the jmp_buf. - */ - -struct png_struct_def -{ - jmp_buf jmpbuf; /* used in png_error */ - - png_error_ptr error_fn; /* function for printing errors and aborting */ - png_error_ptr warning_fn; /* function for printing warnings */ - png_voidp error_ptr; /* user supplied struct for error functions */ - png_rw_ptr write_data_fn; /* function for writing output data */ - png_rw_ptr read_data_fn; /* function for reading input data */ -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) - png_user_transform_ptr read_user_transform_fn; /* user read transform */ - png_user_transform_ptr write_user_transform_fn; /* user write transform */ -#endif - png_voidp io_ptr; /* ptr to application struct for I/O functions*/ - - png_uint_32 mode; /* tells us where we are in the PNG file */ - png_uint_32 flags; /* flags indicating various things to libpng */ - png_uint_32 transformations; /* which transformations to perform */ - - z_stream zstream; /* pointer to decompression structure (below) */ - png_bytep zbuf; /* buffer for zlib */ - png_size_t zbuf_size; /* size of zbuf */ - int zlib_level; /* holds zlib compression level */ - int zlib_method; /* holds zlib compression method */ - int zlib_window_bits; /* holds zlib compression window bits */ - int zlib_mem_level; /* holds zlib compression memory level */ - int zlib_strategy; /* holds zlib compression strategy */ - - png_uint_32 width; /* width of image in pixels */ - png_uint_32 height; /* height of image in pixels */ - png_uint_32 num_rows; /* number of rows in current pass */ - png_uint_32 usr_width; /* width of row at start of write */ - png_uint_32 rowbytes; /* size of row in bytes */ - png_uint_32 irowbytes; /* size of current interlaced row in bytes */ - png_uint_32 iwidth; /* width of current interlaced row in pixels */ - png_uint_32 row_number; /* current row in interlace pass */ - png_bytep prev_row; /* buffer to save previous (unfiltered) row */ - png_bytep row_buf; /* buffer to save current (unfiltered) row */ - png_bytep sub_row; /* buffer to save "sub" row when filtering */ - png_bytep up_row; /* buffer to save "up" row when filtering */ - png_bytep avg_row; /* buffer to save "avg" row when filtering */ - png_bytep paeth_row; /* buffer to save "Paeth" row when filtering */ - png_row_info row_info; /* used for transformation routines */ - - png_uint_32 idat_size; /* current IDAT size for read */ - png_uint_32 crc; /* current chunk CRC value */ - png_colorp palette; /* palette from the input file */ - png_uint_16 num_palette; /* number of color entries in palette */ - png_uint_16 num_trans; /* number of transparency values */ - png_byte chunk_name[5]; /* null-terminated name of current chunk */ - png_byte compression; /* file compression type (always 0) */ - png_byte filter; /* file filter type (always 0) */ - png_byte interlaced; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ - png_byte pass; /* current interlace pass (0 - 6) */ - png_byte do_filter; /* row filter flags (see PNG_FILTER_ below ) */ - png_byte color_type; /* color type of file */ - png_byte bit_depth; /* bit depth of file */ - png_byte usr_bit_depth; /* bit depth of users row */ - png_byte pixel_depth; /* number of bits per pixel */ - png_byte channels; /* number of channels in file */ - png_byte usr_channels; /* channels at start of write */ - png_byte sig_bytes; /* magic bytes read/written from start of file */ - -#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) - png_byte filler; /* filler byte for 24->32-bit pixel expansion */ -#endif /* PNG_READ_FILLER_SUPPORTED */ -#if defined(PNG_READ_bKGD_SUPPORTED) - png_byte background_gamma_type; - float background_gamma; - png_color_16 background; /* background color in screen gamma space */ -#if defined(PNG_READ_GAMMA_SUPPORTED) - png_color_16 background_1; /* background normalized to gamma 1.0 */ -#endif /* PNG_READ_GAMMA && PNG_READ_bKGD_SUPPORTED */ -#endif /* PNG_READ_bKGD_SUPPORTED */ -#if defined(PNG_WRITE_FLUSH_SUPPORTED) - png_flush_ptr output_flush_fn;/* Function for flushing output */ - png_uint_32 flush_dist; /* how many rows apart to flush, 0 - no flush */ - png_uint_32 flush_rows; /* number of rows written since last flush */ -#endif /* PNG_WRITE_FLUSH_SUPPORTED */ -#if defined(PNG_READ_GAMMA_SUPPORTED) - int gamma_shift; /* number of "insignificant" bits 16-bit gamma */ - float gamma; /* file gamma value */ - float screen_gamma; /* screen gamma value (display_gamma/viewing_gamma */ -#endif /* PNG_READ_GAMMA_SUPPORTED */ -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - png_bytep gamma_table; /* gamma table for 8 bit depth files */ - png_bytep gamma_from_1; /* converts from 1.0 to screen */ - png_bytep gamma_to_1; /* converts from file to 1.0 */ - png_uint_16pp gamma_16_table; /* gamma table for 16 bit depth files */ - png_uint_16pp gamma_16_from_1; /* converts from 1.0 to screen */ - png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */ -#endif /* PNG_READ_GAMMA_SUPPORTED || PNG_WRITE_GAMMA_SUPPORTED */ -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined (PNG_READ_sBIT_SUPPORTED) - png_color_8 sig_bit; /* significant bits in each available channel */ -#endif /* PNG_READ_GAMMA_SUPPORTED || PNG_READ_sBIT_SUPPORTED */ -#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) - png_color_8 shift; /* shift for significant bit tranformation */ -#endif /* PNG_READ_SHIFT_SUPPORTED || PNG_WRITE_SHIFT_SUPPORTED */ -#if defined(PNG_READ_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - png_bytep trans; /* transparency values for paletted files */ - png_color_16 trans_values; /* transparency values for non-paletted files */ -#endif /* PNG_READ_tRNS_SUPPORTED || PNG_READ_BACKGROUND_SUPPORTED */ - png_read_status_ptr read_row_fn; /* called after each row is decoded */ - png_write_status_ptr write_row_fn; /* called after each row is encoded */ -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED - png_progressive_info_ptr info_fn; /* called after header data fully read */ - png_progressive_row_ptr row_fn; /* called after each prog. row is decoded */ - png_progressive_end_ptr end_fn; /* called after image is complete */ - png_bytep save_buffer_ptr; /* current location in save_buffer */ - png_bytep save_buffer; /* buffer for previously read data */ - png_bytep current_buffer_ptr; /* current location in current_buffer */ - png_bytep current_buffer; /* buffer for recently used data */ - png_uint_32 push_length; /* size of current input chunk */ - png_uint_32 skip_length; /* bytes to skip in input data */ - png_size_t save_buffer_size; /* amount of data now in save_buffer */ - png_size_t save_buffer_max; /* total size of save_buffer */ - png_size_t buffer_size; /* total amount of available input data */ - png_size_t current_buffer_size; /* amount of data now in current_buffer */ - int process_mode; /* what push library is currently doing */ - int cur_palette; /* current push library palette index */ -#if defined(PNG_READ_tEXt_SUPPORTED) || defined(PNG_READ_zTXt_SUPPORTED) - png_size_t current_text_size; /* current size of text input data */ - png_size_t current_text_left; /* how much text left to read in input */ - png_charp current_text; /* current text chunk buffer */ - png_charp current_text_ptr; /* current location in current_text */ -#endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_READ_tEXt/zTXt_SUPPORTED */ -#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ -#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) -/* for the Borland special 64K segment handler */ - png_bytepp offset_table_ptr; - png_bytep offset_table; - png_uint_16 offset_table_number; - png_uint_16 offset_table_count; - png_uint_16 offset_table_count_free; -#endif /* __TURBOC__&&!_Windows&&!__FLAT__ */ -#if defined(PNG_READ_DITHER_SUPPORTED) - png_bytep palette_lookup; /* lookup table for dithering */ - png_bytep dither_index; /* index translation for palette files */ -#endif /* PNG_READ_DITHER_SUPPORTED */ -#if defined(PNG_READ_DITHER_SUPPORTED) || defined(PNG_READ_hIST_SUPPORTED) - png_uint_16p hist; /* histogram */ -#endif -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - png_byte heuristic_method; /* heuristic for row filter selection */ - png_byte num_prev_filters; /* number of weights for previous rows */ - png_bytep prev_filters; /* filter type(s) of previous row(s) */ - png_uint_16p filter_weights; /* weight(s) for previous line(s) */ - png_uint_16p inv_filter_weights; /* 1/weight(s) for previous line(s) */ - png_uint_16p filter_costs; /* relative filter calculation cost */ - png_uint_16p inv_filter_costs; /* 1/relative filter calculation cost */ -#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */ -#if defined(PNG_TIME_RFC1123_SUPPORTED) - png_charp time_buffer; /* String to hold RFC 1123 time text */ -#endif /* PNG_TIME_RFC1123_SUPPORTED */ -}; - -typedef png_struct FAR * FAR * png_structpp; - -/* Here are the function definitions most commonly used. This is not - * the place to find out how to use libpng. See libpng.txt for the - * full explanation, see example.c for the summary. This just provides - * a simple one line of the use of each function. - */ - -/* Tell lib we have already handled the first magic bytes. - * Handling more than 8 bytes from the beginning of the file is an error. - */ -extern PNG_EXPORT(void,png_set_sig_bytes) PNGARG((png_structp png_ptr, - int num_bytes)); - -/* Check sig[start] through sig[start + num_to_check - 1] to see if it's a - * PNG file. Returns zero if the supplied bytes match the 8-byte PNG - * signature, and non-zero otherwise. Having num_to_check == 0 or - * start > 7 will always fail (ie return non-zero). - */ -extern PNG_EXPORT(int,png_sig_cmp) PNGARG((png_bytep sig, png_size_t start, - png_size_t num_to_check)); - -/* Simple signature checking function. This is the same as calling - * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n). - */ -extern PNG_EXPORT(int,png_check_sig) PNGARG((png_bytep sig, int num)); - -/* Allocate and initialize png_ptr struct for reading, and any other memory. */ -extern PNG_EXPORT(png_structp,png_create_read_struct) - PNGARG((png_const_charp user_png_ver, voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn)); - -/* Allocate and initialize png_ptr struct for reading, and any other memory */ -extern PNG_EXPORT(png_structp,png_create_write_struct) - PNGARG((png_const_charp user_png_ver, voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn)); - -/* Write a PNG chunk - size, type, (optional) data, CRC. */ -extern PNG_EXPORT(void,png_write_chunk) PNGARG((png_structp png_ptr, - png_bytep chunk_name, png_bytep data, png_size_t length)); - -/* Write the start of a PNG chunk - length and chunk name. */ -extern PNG_EXPORT(void,png_write_chunk_start) PNGARG((png_structp png_ptr, - png_bytep chunk_name, png_uint_32 length)); - -/* Write the data of a PNG chunk started with png_write_chunk_start(). */ -extern PNG_EXPORT(void,png_write_chunk_data) PNGARG((png_structp png_ptr, - png_bytep data, png_size_t length)); - -/* Finish a chunk started with png_write_chunk_start() (includes CRC). */ -extern PNG_EXPORT(void,png_write_chunk_end) PNGARG((png_structp png_ptr)); - -/* Allocate and initialize the info structure */ -extern PNG_EXPORT(png_infop,png_create_info_struct) - PNGARG((png_structp png_ptr)); - -/* Initialize the info structure (old interface - NOT DLL EXPORTED) */ -extern void png_info_init PNGARG((png_infop info_ptr)); - -/* Writes all the PNG information before the image. */ -extern PNG_EXPORT(void,png_write_info) PNGARG((png_structp png_ptr, - png_infop info_ptr)); - -/* read the information before the actual image data. */ -extern PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr, - png_infop info_ptr)); - -#if defined(PNG_TIME_RFC1123_SUPPORTED) -extern PNG_EXPORT(png_charp,png_convert_to_rfc1123) - PNGARG((png_structp png_ptr, png_timep ptime)); -#endif /* PNG_TIME_RFC1123_SUPPORTED */ - -#if defined(PNG_WRITE_tIME_SUPPORTED) -/* convert from a struct tm to png_time */ -extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime, - struct tm FAR * ttime)); - -/* convert from time_t to png_time. Uses gmtime() */ -extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime, - time_t ttime)); -#endif /* PNG_WRITE_tIME_SUPPORTED */ - -#if defined(PNG_READ_EXPAND_SUPPORTED) -/* Expand data to 24 bit RGB, or 8 bit grayscale, with alpha if available. */ -extern PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr)); -#endif /* PNG_READ_EXPAND_SUPPORTED */ - -#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) -/* Use blue, green, red order for pixels. */ -extern PNG_EXPORT(void,png_set_bgr) PNGARG((png_structp png_ptr)); -#endif /* PNG_READ_BGR_SUPPORTED || PNG_WRITE_BGR_SUPPORTED */ - -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) -/* Expand the grayscale to 24 bit RGB if necessary. */ -extern PNG_EXPORT(void,png_set_gray_to_rgb) PNGARG((png_structp png_ptr)); -#endif /* PNG_READ_GRAY_TO_RGB_SUPPORTED */ - -#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) -/* Reduce RGB to grayscale. (Not yet implemented) */ -extern PNG_EXPORT(void,png_set_rgb_to_gray) PNGARG((png_structp png_ptr)); -#endif /* PNG_READ_RGB_TO_GRAY_SUPPORTED */ - -extern PNG_EXPORT(void,png_build_grayscale_palette) PNGARG((int bit_depth, - png_colorp palette)); - -#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) -extern PNG_EXPORT(void,png_set_strip_alpha) PNGARG((png_structp png_ptr)); -#endif /* PNG_READ_STRIP_ALPHA_SUPPORTED */ - -#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \ - defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) -extern PNG_EXPORT(void,png_set_swap_alpha) PNGARG((png_structp png_ptr)); -#endif /* PNG_READ_SWAP_ALPHA_SUPPORTED || PNG_WRITE_SWAP_ALPHA_SUPPORTED */ - -#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \ - defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) -extern PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr)); -#endif /* PNG_READ_INVERT_ALPHA_SUPPORTED || PNG_WRITE_INVERT_ALPHA_SUPPORTED */ - -#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) -/* Add a filler byte to 24-bit RGB images. */ -extern PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr, - png_uint_32 filler, int flags)); - -/* The values of the PNG_FILLER_ defines should NOT be changed */ -#define PNG_FILLER_BEFORE 0 -#define PNG_FILLER_AFTER 1 -#endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */ - -#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) -/* Swap bytes in 16 bit depth files. */ -extern PNG_EXPORT(void,png_set_swap) PNGARG((png_structp png_ptr)); -#endif /* PNG_READ_SWAP_SUPPORTED || PNG_WRITE_SWAP_SUPPORTED */ - -#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) -/* Use 1 byte per pixel in 1, 2, or 4 bit depth files. */ -extern PNG_EXPORT(void,png_set_packing) PNGARG((png_structp png_ptr)); -#endif /* PNG_READ_PACK_SUPPORTED || PNG_WRITE_PACK_SUPPORTED */ - -#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED) -/* Swap packing order of pixels in bytes. */ -extern PNG_EXPORT(void,png_set_packswap) PNGARG((png_structp png_ptr)); -#endif /* PNG_READ_PACKSWAP_SUPPORTED || PNG_WRITE_PACKSWAP_SUPPOR */ - -#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) -/* Converts files to legal bit depths. */ -extern PNG_EXPORT(void,png_set_shift) PNGARG((png_structp png_ptr, - png_color_8p true_bits)); -#endif /* PNG_READ_SHIFT_SUPPORTED || PNG_WRITE_SHIFT_SUPPORTED */ - -#if defined(PNG_READ_INTERLACING_SUPPORTED) || \ - defined(PNG_WRITE_INTERLACING_SUPPORTED) -/* Have the code handle the interlacing. Returns the number of passes. */ -extern PNG_EXPORT(int,png_set_interlace_handling) PNGARG((png_structp png_ptr)); -#endif /* PNG_READ_INTERLACING_SUPPORTED || PNG_WRITE_INTERLACING_SUPPORTED */ - -#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) -/* Invert monocrome files */ -extern PNG_EXPORT(void,png_set_invert_mono) PNGARG((png_structp png_ptr)); -#endif /* PNG_READ_INVERT_SUPPORTED || PNG_WRITE_INVERT_SUPPORTED */ - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) -/* Handle alpha and tRNS by replacing with a background color. */ -extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr, - png_color_16p background_color, int background_gamma_code, - int need_expand, double background_gamma)); -#define PNG_BACKGROUND_GAMMA_UNKNOWN 0 -#define PNG_BACKGROUND_GAMMA_SCREEN 1 -#define PNG_BACKGROUND_GAMMA_FILE 2 -#define PNG_BACKGROUND_GAMMA_UNIQUE 3 -#endif /* PNG_READ_BACKGROUND_SUPPORTED */ - -#if defined(PNG_READ_16_TO_8_SUPPORTED) -/* strip the second byte of information from a 16 bit depth file. */ -extern PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr)); -#endif /* PNG_READ_16_TO_8_SUPPORTED */ - -#if defined(PNG_READ_DITHER_SUPPORTED) -/* Turn on dithering, and reduce the palette to the number of colors available. */ -extern PNG_EXPORT(void,png_set_dither) PNGARG((png_structp png_ptr, - png_colorp palette, int num_palette, int maximum_colors, - png_uint_16p histogram, int full_dither)); -#endif /* PNG_READ_DITHER_SUPPORTED */ - -#if defined(PNG_READ_GAMMA_SUPPORTED) -/* Handle gamma correction. Screen_gamma=(display_gamma/viewing_gamma) */ -extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr, - double screen_gamma, double default_file_gamma)); -#endif /* PNG_READ_GAMMA_SUPPORTED */ - -#if defined(PNG_WRITE_FLUSH_SUPPORTED) -/* Set how many lines between output flushes - 0 for no flushing */ -extern PNG_EXPORT(void,png_set_flush) PNGARG((png_structp png_ptr, int nrows)); - -/* Flush the current PNG output buffer */ -extern PNG_EXPORT(void,png_write_flush) PNGARG((png_structp png_ptr)); -#endif /* PNG_WRITE_FLUSH_SUPPORTED */ - -/* optional update palette with requested transformations */ -extern PNG_EXPORT(void,png_start_read_image) PNGARG((png_structp png_ptr)); - -/* optional call to update the users info structure */ -extern PNG_EXPORT(void,png_read_update_info) PNGARG((png_structp png_ptr, - png_infop info_ptr)); - -/* read a one or more rows of image data.*/ -extern PNG_EXPORT(void,png_read_rows) PNGARG((png_structp png_ptr, - png_bytepp row, png_bytepp display_row, png_uint_32 num_rows)); - -/* read a row of data.*/ -extern PNG_EXPORT(void,png_read_row) PNGARG((png_structp png_ptr, - png_bytep row, - png_bytep display_row)); - -/* read the whole image into memory at once. */ -extern PNG_EXPORT(void,png_read_image) PNGARG((png_structp png_ptr, - png_bytepp image)); - -/* write a row of image data */ -extern PNG_EXPORT(void,png_write_row) PNGARG((png_structp png_ptr, - png_bytep row)); - -/* write a few rows of image data */ -extern PNG_EXPORT(void,png_write_rows) PNGARG((png_structp png_ptr, - png_bytepp row, png_uint_32 num_rows)); - -/* write the image data */ -extern PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr, - png_bytepp image)); - -/* writes the end of the PNG file. */ -extern PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr, - png_infop info_ptr)); - -/* read the end of the PNG file. */ -extern PNG_EXPORT(void,png_read_end) PNGARG((png_structp png_ptr, - png_infop info_ptr)); - -/* free any memory associated with the png_info_struct */ -extern PNG_EXPORT(void,png_destroy_info_struct) PNGARG((png_structp png_ptr, - png_infopp info_ptr_ptr)); - -/* free any memory associated with the png_struct and the png_info_structs */ -extern PNG_EXPORT(void,png_destroy_read_struct) PNGARG((png_structpp - png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)); - -/* free all memory used by the read (old method - NOT DLL EXPORTED) */ -extern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr, - png_infop end_info_ptr)); - -/* free any memory associated with the png_struct and the png_info_structs */ -extern PNG_EXPORT(void,png_destroy_write_struct) - PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)); - -/* free any memory used in info_ptr struct (old method - NOT DLL EXPORTED) */ -extern void png_write_destroy_info PNGARG((png_infop info_ptr)); - -/* free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */ -extern void png_write_destroy PNGARG((png_structp png_ptr)); - -/* set the libpng method of handling chunk CRC errors */ -extern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr, - int crit_action, int ancil_action)); - -/* Values for png_set_crc_action() to say how to handle CRC errors in - * ancillary and critical chunks, and whether to use the data contained - * therein. Note that it is impossible to "discard" data in a critical - * chunk. For versions prior to 0.90, the action was always error/quit, - * whereas in version 0.90 and later, the action for CRC errors in ancillary - * chunks is warn/discard. These values should NOT be changed. - * - * value action:critical action:ancillary - */ -#define PNG_CRC_DEFAULT 0 /* error/quit warn/discard data */ -#define PNG_CRC_ERROR_QUIT 1 /* error/quit error/quit */ -#define PNG_CRC_WARN_DISCARD 2 /* (INVALID) warn/discard data */ -#define PNG_CRC_WARN_USE 3 /* warn/use data warn/use data */ -#define PNG_CRC_QUIET_USE 4 /* quiet/use data quiet/use data */ -#define PNG_CRC_NO_CHANGE 5 /* use current value use current value */ - -/* These functions give the user control over the scan-line filtering in - * libpng and the compression methods used by zlib. These functions are - * mainly useful for testing, as the defaults should work with most users. - * Those users who are tight on memory or want faster performance at the - * expense of compression can modify them. See the compression library - * header file (zlib.h) for an explination of the compression functions. - */ - -/* set the filtering method(s) used by libpng. Currently, the only valid - * value for "method" is 0. - */ -extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method, - int filters)); - -/* Flags for png_set_filter() to say which filters to use. The flags - * are chosen so that they don't conflict with real filter types - * below, in case they are supplied instead of the #defined constants. - * These values should NOT be changed. - */ -#define PNG_NO_FILTERS 0x00 -#define PNG_FILTER_NONE 0x08 -#define PNG_FILTER_SUB 0x10 -#define PNG_FILTER_UP 0x20 -#define PNG_FILTER_AVG 0x40 -#define PNG_FILTER_PAETH 0x80 -#define PNG_ALL_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | \ - PNG_FILTER_AVG | PNG_FILTER_PAETH) - -/* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now. - * These defines should NOT be changed. - */ -#define PNG_FILTER_VALUE_NONE 0 -#define PNG_FILTER_VALUE_SUB 1 -#define PNG_FILTER_VALUE_UP 2 -#define PNG_FILTER_VALUE_AVG 3 -#define PNG_FILTER_VALUE_PAETH 4 -#define PNG_FILTER_VALUE_LAST 5 - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) /* EXPERIMENTAL */ -/* The "heuristic_method" is given by one of the PNG_FILTER_HEURISTIC_ - * defines, either the default (minimum-sum-of-absolute-differences), or - * the experimental method (weighted-minimum-sum-of-absolute-differences). - * - * Weights are factors >= 1.0, indicating how important it is to keep the - * filter type consistent between rows. Larger numbers mean the current - * filter is that many times as likely to be the same as the "num_weights" - * previous filters. This is cumulative for each previous row with a weight. - * There needs to be "num_weights" values in "filter_weights", or it can be - * NULL if the weights aren't being specified. Weights have no influence on - * the selection of the first row filter. Well chosen weights can (in theory) - * improve the compression for a given image. - * - * Costs are factors >= 1.0 indicating the relative decoding costs of a - * filter type. Higher costs indicate more decoding expense, and are - * therefore less likely to be selected over a filter with lower computational - * costs. There needs to be a value in "filter_costs" for each valid filter - * type (given by PNG_FILTER_VALUE_LAST), or it can be NULL if you aren't - * setting the costs. Costs try to improve the speed of decompression without - * unduly increasing the compressed image size. - * - * A negative weight or cost indicates the default value is to be used, and - * values in the range [0.0, 1.0) indicate the value is to remain unchanged. - * The default values for both weights and costs are currently 1.0, but may - * change if good general weighting/cost heuristics can be found. If both - * the weights and costs are set to 1.0, this degenerates the WEIGHTED method - * to the UNWEIGHTED method, but with added encoding time/computation. - */ -extern PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr, - int heuristic_method, int num_weights, png_doublep filter_weights, - png_doublep filter_costs)); -#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */ - -/* Heuristic used for row filter selection. These defines should NOT be - * changed. - */ -#define PNG_FILTER_HEURISTIC_DEFAULT 0 /* Currently "UNWEIGHTED" */ -#define PNG_FILTER_HEURISTIC_UNWEIGHTED 1 /* Used by libpng < 0.95 */ -#define PNG_FILTER_HEURISTIC_WEIGHTED 2 /* Experimental feature */ -#define PNG_FILTER_HEURISTIC_LAST 3 /* Not a valid value */ - -/* Set the library compression level. Currently, valid values range from - * 0 - 9, corresponding directly to the zlib compression levels 0 - 9 - * (0 - no compression, 9 - "maximal" compression). Note that tests have - * shown that zlib compression levels 3-6 usually perform as well as level 9 - * for PNG images, and do considerably fewer caclulations. In the future, - * these values may not correspond directly to the zlib compression levels. - */ -extern PNG_EXPORT(void,png_set_compression_level) PNGARG((png_structp png_ptr, - int level)); - -extern PNG_EXPORT(void,png_set_compression_mem_level) - PNGARG((png_structp png_ptr, int mem_level)); - -extern PNG_EXPORT(void,png_set_compression_strategy) - PNGARG((png_structp png_ptr, int strategy)); - -extern PNG_EXPORT(void,png_set_compression_window_bits) - PNGARG((png_structp png_ptr, int window_bits)); - -extern PNG_EXPORT(void,png_set_compression_method) PNGARG((png_structp png_ptr, - int method)); - -/* These next functions are called for input/output, memory, and error - * handling. They are in the file pngrio.c, pngwio.c, and pngerror.c, - * and call standard C I/O routines such as fread(), fwrite(), and - * fprintf(). These functions can be made to use other I/O routines - * at run time for those applications that need to handle I/O in a - * different manner by calling png_set_???_fn(). See libpng.txt for - * more information. - */ - -#if !defined(PNG_NO_STDIO) -/* Initialize the input/output for the PNG file to the default functions. */ -extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, FILE *fp)); -#endif - -/* Replace the (error and abort), and warning functions with user - * supplied functions. If no messages are to be printed you must still - * write and use replacement functions. The replacement error_fn should - * still do a longjmp to the last setjmp location if you are using this - * method of error handling. If error_fn or warning_fn is NULL, the - * default function will be used. - */ -extern PNG_EXPORT(void,png_set_error_fn) PNGARG((png_structp png_ptr, - png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn)); - -/* Return the user pointer associated with the error functions */ -extern PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr)); - -/* Replace the default data output functions with a user supplied one(s). - * If buffered output is not used, then output_flush_fn can be set to NULL. - * If PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time - * output_flush_fn will be ignored (and thus can be NULL). - */ -extern PNG_EXPORT(void,png_set_write_fn) PNGARG((png_structp png_ptr, - png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)); - -/* Replace the default data input function with a user supplied one. */ -extern PNG_EXPORT(void,png_set_read_fn) PNGARG((png_structp png_ptr, - png_voidp io_ptr, png_rw_ptr read_data_fn)); - -/* Return the user pointer associated with the I/O functions */ -extern PNG_EXPORT(png_voidp,png_get_io_ptr) PNGARG((png_structp png_ptr)); - -extern PNG_EXPORT(void,png_set_read_status_fn) PNGARG((png_structp png_ptr, - png_read_status_ptr read_row_fn)); - -extern PNG_EXPORT(void,png_set_write_status_fn) PNGARG((png_structp png_ptr, - png_write_status_ptr write_row_fn)); - -#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED -extern PNG_EXPORT(void,png_set_read_user_transform_fn) PNGARG((png_structp - png_ptr, png_user_transform_ptr read_user_transform_fn)); -#endif - -#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED -extern PNG_EXPORT(void,png_set_write_user_transform_fn) PNGARG((png_structp - png_ptr, png_user_transform_ptr write_user_transform_fn)); -#endif - -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED -/* Sets the function callbacks for the push reader, and a pointer to a - * user-defined structure available to the callback functions. - */ -extern PNG_EXPORT(void,png_set_progressive_read_fn) PNGARG((png_structp png_ptr, - png_voidp progressive_ptr, - png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, - png_progressive_end_ptr end_fn)); - -/* returns the user pointer associated with the push read functions */ -extern PNG_EXPORT(png_voidp,png_get_progressive_ptr) - PNGARG((png_structp png_ptr)); - -/* function to be called when data becomes available */ -extern PNG_EXPORT(void,png_process_data) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_bytep buffer, png_size_t buffer_size)); - -/* function which combines rows. Not very much different than the - * png_combine_row() call. Is this even used????? - */ -extern PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr, - png_bytep old_row, png_bytep new_row)); -#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ - -extern PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr, - png_uint_32 size)); - -/* frees a pointer allocated by png_malloc() */ -extern PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr)); - -extern PNG_EXPORT(png_voidp,png_memcpy_check) PNGARG((png_structp png_ptr, - png_voidp s1, png_voidp s2, png_uint_32 size)); - -extern PNG_EXPORT(png_voidp,png_memset_check) PNGARG((png_structp png_ptr, - png_voidp s1, int value, png_uint_32 size)); - -#ifdef PNGTEST_MEMORY_DEBUG -/* debugging versions of png_malloc() and png_free() */ -extern PNG_EXPORT(png_voidp,png_debug_malloc) PNGARG((png_structp png_ptr, - png_uint_32 size)); -extern PNG_EXPORT(void,png_debug_free) PNGARG((png_structp png_ptr, - png_voidp ptr)); -#endif -#if defined(USE_FAR_KEYWORD) /* memory model conversion function */ -extern void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr, - int check)); -#endif /* USE_FAR_KEYWORD */ - -/* Fatal error in PNG image of libpng - can't continue */ -extern PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr, - png_const_charp error)); - -/* The same, but the chunk name is prepended to the error string. */ -extern PNG_EXPORT(void,png_chunk_error) PNGARG((png_structp png_ptr, - png_const_charp error)); - -/* Non-fatal error in libpng. Can continue, but may have a problem. */ -extern PNG_EXPORT(void,png_warning) PNGARG((png_structp png_ptr, - png_const_charp message)); - -/* Non-fatal error in libpng, chunk name is prepended to message. */ -extern PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr, - png_const_charp message)); - -/* The png_set_ functions are for storing values in the png_info_struct. - * Similarly, the png_get_ calls are used to read values from the - * png_info_struct, either storing the parameters in the passed variables, or - * setting pointers into the png_info_struct where the data is stored. The - * png_get_ functions return a non-zero value if the data was available - * in info_ptr, or return zero and do not change any of the parameters if the - * data was not available. - * - * These functions should be used instead of directly accessing png_info - * to avoid problems with future changes in the size and internal layout of - * png_info_struct. - */ -/* Returns "flag" if chunk data is valid in info_ptr. */ -extern PNG_EXPORT(png_uint_32,png_get_valid) PNGARG((png_structp png_ptr, -png_infop info_ptr, png_uint_32 flag)); - -/* Returns number of bytes needed to hold a transformed row. */ -extern PNG_EXPORT(png_uint_32,png_get_rowbytes) PNGARG((png_structp png_ptr, -png_infop info_ptr)); - -/* Returns number of color channels in image. */ -extern PNG_EXPORT(png_byte,png_get_channels) PNGARG((png_structp png_ptr, -png_infop info_ptr)); - -#ifdef PNG_EASY_ACCESS_SUPPORTED -/* Returns image width in pixels. */ -extern PNG_EXPORT(png_uint_32, png_get_image_width) PNGARG((png_structp -png_ptr, png_infop info_ptr)); - -/* Returns image height in pixels. */ -extern PNG_EXPORT(png_uint_32, png_get_image_height) PNGARG((png_structp -png_ptr, png_infop info_ptr)); - -/* Returns image bit_depth. */ -extern PNG_EXPORT(png_byte, png_get_bit_depth) PNGARG((png_structp -png_ptr, png_infop info_ptr)); - -/* Returns image color_type. */ -extern PNG_EXPORT(png_byte, png_get_color_type) PNGARG((png_structp -png_ptr, png_infop info_ptr)); - -/* Returns image filter_type. */ -extern PNG_EXPORT(png_byte, png_get_filter_type) PNGARG((png_structp -png_ptr, png_infop info_ptr)); - -/* Returns image interlace_type. */ -extern PNG_EXPORT(png_byte, png_get_interlace_type) PNGARG((png_structp -png_ptr, png_infop info_ptr)); - -/* Returns image compression_type. */ -extern PNG_EXPORT(png_byte, png_get_compression_type) PNGARG((png_structp -png_ptr, png_infop info_ptr)); - -/* Returns image resolution in pixels per meter, from pHYs chunk data. */ -extern PNG_EXPORT(png_uint_32, png_get_pixels_per_meter) PNGARG((png_structp -png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(png_uint_32, png_get_x_pixels_per_meter) PNGARG((png_structp -png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(png_uint_32, png_get_y_pixels_per_meter) PNGARG((png_structp -png_ptr, png_infop info_ptr)); - -/* Returns pixel aspect ratio, computed from pHYs chunk data. */ -extern PNG_EXPORT(float, png_get_pixel_aspect_ratio) PNGARG((png_structp -png_ptr, png_infop info_ptr)); - -/* Returns image x, y offset in pixels or microns, from oFFs chunk data. */ -extern PNG_EXPORT(png_uint_32, png_get_x_offset_pixels) PNGARG((png_structp -png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(png_uint_32, png_get_y_offset_pixels) PNGARG((png_structp -png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(png_uint_32, png_get_x_offset_microns) PNGARG((png_structp -png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(png_uint_32, png_get_y_offset_microns) PNGARG((png_structp -png_ptr, png_infop info_ptr)); - -#endif /* PNG_EASY_ACCESS_SUPPORTED */ - -/* Returns pointer to signature string read from PNG header */ -extern PNG_EXPORT(png_bytep,png_get_signature) PNGARG((png_structp png_ptr, -png_infop info_ptr)); - -#if defined(PNG_READ_bKGD_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_color_16p *background)); -#endif /* PNG_READ_bKGD_SUPPORTED */ - -#if defined(PNG_READ_bKGD_SUPPORTED) || defined(PNG_WRITE_bKGD_SUPPORTED) -extern PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_color_16p background)); -#endif /* PNG_READ_bKGD_SUPPORTED || PNG_WRITE_bKGD_SUPPORTED */ - -#if defined(PNG_READ_cHRM_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_structp png_ptr, - png_infop info_ptr, double *white_x, double *white_y, double *red_x, - double *red_y, double *green_x, double *green_y, double *blue_x, - double *blue_y)); -#endif /* PNG_READ_cHRM_SUPPORTED */ - -#if defined(PNG_READ_cHRM_SUPPORTED) || defined(PNG_WRITE_cHRM_SUPPORTED) -extern PNG_EXPORT(void,png_set_cHRM) PNGARG((png_structp png_ptr, - png_infop info_ptr, double white_x, double white_y, double red_x, - double red_y, double green_x, double green_y, double blue_x, double blue_y)); -#endif /* PNG_READ_cHRM_SUPPORTED || PNG_WRITE_cHRM_SUPPORTED */ - -#if defined(PNG_READ_gAMA_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_structp png_ptr, - png_infop info_ptr, double *file_gamma)); -#endif /* PNG_READ_gAMA_SUPPORTED */ - -#if defined(PNG_READ_gAMA_SUPPORTED) || defined(PNG_WRITE_gAMA_SUPPORTED) -extern PNG_EXPORT(void,png_set_gAMA) PNGARG((png_structp png_ptr, - png_infop info_ptr, double file_gamma)); -#endif /* PNG_READ_gAMA_SUPPORTED || PNG_WRITE_gAMA_SUPPORTED */ - -#if defined(PNG_READ_hIST_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_16p *hist)); -#endif /* PNG_READ_hIST_SUPPORTED */ - -#if defined(PNG_READ_hIST_SUPPORTED) || defined(PNG_WRITE_hIST_SUPPORTED) -extern PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_16p hist)); -#endif /* PNG_READ_hIST_SUPPORTED || PNG_WRITE_hIST_SUPPORTED */ - -extern PNG_EXPORT(png_uint_32,png_get_IHDR) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, - int *bit_depth, int *color_type, int *interlace_type, - int *compression_type, int *filter_type)); - -extern PNG_EXPORT(void,png_set_IHDR) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, - int color_type, int interlace_type, int compression_type, int filter_type)); - -#if defined(PNG_READ_oFFs_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 *offset_x, png_uint_32 *offset_y, - int *unit_type)); -#endif /* PNG_READ_oFFs_SUPPORTED */ - -#if defined(PNG_READ_oFFs_SUPPORTED) || defined(PNG_WRITE_oFFs_SUPPORTED) -extern PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 offset_x, png_uint_32 offset_y, - int unit_type)); -#endif /* PNG_READ_oFFs_SUPPORTED || PNG_WRITE_oFFs_SUPPORTED */ - -#if defined(PNG_READ_pCAL_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1, - int *type, int *nparams, png_charp *units, png_charpp *params)); -#endif /* PNG_READ_pCAL_SUPPORTED */ - -#if defined(PNG_READ_pCAL_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) -extern PNG_EXPORT(void,png_set_pCAL) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, - int type, int nparams, png_charp units, png_charpp params)); -#endif /* PNG_READ_pCAL_SUPPORTED || PNG_WRITE_pCAL_SUPPORTED */ - -#if defined(PNG_READ_pHYs_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); -#endif /* PNG_READ_pHYs_SUPPORTED */ - -#if defined(PNG_READ_pHYs_SUPPORTED) || defined(PNG_WRITE_pHYs_SUPPORTED) -extern PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)); -#endif /* PNG_READ_pHYs_SUPPORTED || PNG_WRITE_pHYs_SUPPORTED */ - -extern PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_colorp *palette, int *num_palette)); - -extern PNG_EXPORT(void,png_set_PLTE) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_colorp palette, int num_palette)); - -#if defined(PNG_READ_sBIT_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_color_8p *sig_bit)); -#endif /* PNG_READ_sBIT_SUPPORTED */ - -#if defined(PNG_READ_sBIT_SUPPORTED) || defined(PNG_WRITE_sBIT_SUPPORTED) -extern PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_color_8p sig_bit)); -#endif /* PNG_READ_sBIT_SUPPORTED || PNG_WRITE_sBIT_SUPPORTED */ - -#if defined(PNG_READ_sRGB_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_structp png_ptr, - png_infop info_ptr, int *intent)); -#endif /* PNG_READ_sRGB_SUPPORTED */ - -#if defined(PNG_READ_sRGB_SUPPORTED) || defined(PNG_WRITE_sRGB_SUPPORTED) -extern PNG_EXPORT(void,png_set_sRGB) PNGARG((png_structp png_ptr, - png_infop info_ptr, int intent)); -extern PNG_EXPORT(void,png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr, - png_infop info_ptr, int intent)); -#endif /* PNG_READ_sRGB_SUPPORTED || PNG_WRITE_sRGB_SUPPORTED */ - -#if defined(PNG_READ_tEXt_SUPPORTED) || defined(PNG_READ_zTXt_SUPPORTED) -/* png_get_text also returns the number of text chunks in text_ptr */ -extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_textp *text_ptr, int *num_text)); -#endif /* PNG_READ_tEXt_SUPPORTED || PNG_READ_zTXt_SUPPORTED */ - -#if defined(PNG_READ_tEXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \ - defined(PNG_READ_zTXt_SUPPORTED) || defined(PNG_WRITE_zTXt_SUPPORTED) -extern PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_textp text_ptr, int num_text)); -#endif /* PNG_READ_tEXt_SUPPORTED || PNG_WRITE_tEXt_SUPPORTED || - PNG_READ_zTXt_SUPPORTED || PNG_WRITE_zTXt_SUPPORTED */ - -#if defined(PNG_READ_tIME_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_timep *mod_time)); -#endif /* PNG_READ_tIME_SUPPORTED */ - -#if defined(PNG_READ_tIME_SUPPORTED) || defined(PNG_WRITE_tIME_SUPPORTED) -extern PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_timep mod_time)); -#endif /* PNG_READ_tIME_SUPPORTED || PNG_WRITE_tIME_SUPPORTED */ - -#if defined(PNG_READ_tRNS_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_bytep *trans, int *num_trans, - png_color_16p *trans_values)); -#endif /* PNG_READ_tRNS_SUPPORTED */ - -#if defined(PNG_READ_tRNS_SUPPORTED) || defined(PNG_WRITE_tRNS_SUPPORTED) -extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_bytep trans, int num_trans, - png_color_16p trans_values)); -#endif /* PNG_READ_tRNS_SUPPORTED || PNG_WRITE_tRNS_SUPPORTED */ - -/* Define PNG_DEBUG at compile time for debugging information. Higher - * numbers for PNG_DEBUG mean more debugging information. This has - * only been added since version 0.95 so it is not implemented throughout - * libpng yet, but more support will be added as needed. - */ -#if (PNG_DEBUG > 0) -#ifdef PNG_NO_STDIO -#include -#endif -#ifndef PNG_DEBUG_FILE -#define PNG_DEBUG_FILE stderr -#endif /* PNG_DEBUG_FILE */ - -#define png_debug(l,m) if (PNG_DEBUG > l) \ - fprintf(PNG_DEBUG_FILE,"%s"m,(l==1 ? "\t" : \ - (l==2 ? "\t\t":(l==3 ? "\t\t\t":"")))) -#define png_debug1(l,m,p1) if (PNG_DEBUG > l) \ - fprintf(PNG_DEBUG_FILE,"%s"m,(l==1 ? "\t" : \ - (l==2 ? "\t\t":(l==3 ? "\t\t\t":""))),p1) -#define png_debug2(l,m,p1,p2) if (PNG_DEBUG > l) \ - fprintf(PNG_DEBUG_FILE,"%s"m,(l==1 ? "\t" : \ - (l==2 ? "\t\t":(l==3 ? "\t\t\t":""))),p1,p2) -#else -#define png_debug(l, m) -#define png_debug1(l, m, p1) -#define png_debug2(l, m, p1, p2) -#endif /* (PNG_DEBUG > 0) */ - -/* These next functions are used internally in the code. They generally - * shouldn't be used unless you are writing code to add or replace some - * functionality in libpng. More information about most functions can - * be found in the files where the functions are located. - */ - -#if defined(PNG_INTERNAL) - -/* Various modes of operation. Note that after an init, mode is set to - * zero automatically when the structure is created. - */ -#define PNG_BEFORE_IHDR 0x00 -#define PNG_HAVE_IHDR 0x01 -#define PNG_HAVE_PLTE 0x02 -#define PNG_HAVE_IDAT 0x04 -#define PNG_AFTER_IDAT 0x08 -#define PNG_HAVE_IEND 0x10 -#define PNG_HAVE_gAMA 0x20 -#define PNG_HAVE_cHRM 0x40 -#define PNG_HAVE_sRGB 0x80 - -/* push model modes */ -#define PNG_READ_SIG_MODE 0 -#define PNG_READ_CHUNK_MODE 1 -#define PNG_READ_IDAT_MODE 2 -#define PNG_SKIP_MODE 3 -#define PNG_READ_tEXt_MODE 4 -#define PNG_READ_zTXt_MODE 5 -#define PNG_READ_DONE_MODE 6 -#define PNG_ERROR_MODE 7 - -/* flags for the transformations the PNG library does on the image data */ -#define PNG_BGR 0x0001 -#define PNG_INTERLACE 0x0002 -#define PNG_PACK 0x0004 -#define PNG_SHIFT 0x0008 -#define PNG_SWAP_BYTES 0x0010 -#define PNG_INVERT_MONO 0x0020 -#define PNG_DITHER 0x0040 -#define PNG_BACKGROUND 0x0080 -#define PNG_BACKGROUND_EXPAND 0x0100 -#define PNG_RGB_TO_GRAY 0x0200 /* Not currently implemented */ -#define PNG_16_TO_8 0x0400 -#define PNG_RGBA 0x0800 -#define PNG_EXPAND 0x1000 -#define PNG_GAMMA 0x2000 -#define PNG_GRAY_TO_RGB 0x4000 -#define PNG_FILLER 0x8000 -#define PNG_PACKSWAP 0x10000L -#define PNG_SWAP_ALPHA 0x20000L -#define PNG_STRIP_ALPHA 0x40000L -#define PNG_INVERT_ALPHA 0x80000L -#define PNG_USER_TRANSFORM 0x100000L - -/* flags for png_create_struct */ -#define PNG_STRUCT_PNG 0x0001 -#define PNG_STRUCT_INFO 0x0002 - -/* Scaling factor for filter heuristic weighting calculations */ -#define PNG_WEIGHT_SHIFT 8 -#define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT)) -#define PNG_COST_SHIFT 3 -#define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT)) - -/* flags for the png_ptr->flags rather than declaring a byte for each one */ -#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY 0x0001 -#define PNG_FLAG_ZLIB_CUSTOM_LEVEL 0x0002 -#define PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL 0x0004 -#define PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS 0x0008 -#define PNG_FLAG_ZLIB_CUSTOM_METHOD 0x0010 -#define PNG_FLAG_ZLIB_FINISHED 0x0020 -#define PNG_FLAG_ROW_INIT 0x0040 -#define PNG_FLAG_FILLER_AFTER 0x0080 -#define PNG_FLAG_CRC_ANCILLARY_USE 0x0100 -#define PNG_FLAG_CRC_ANCILLARY_NOWARN 0x0200 -#define PNG_FLAG_CRC_CRITICAL_USE 0x0400 -#define PNG_FLAG_CRC_CRITICAL_IGNORE 0x0800 -#define PNG_FLAG_FREE_PALETTE 0x1000 -#define PNG_FLAG_FREE_TRANS 0x2000 -#define PNG_FLAG_FREE_HIST 0x4000 -#define PNG_FLAG_HAVE_CHUNK_HEADER 0x8000L -#define PNG_FLAG_WROTE_tIME 0x10000L - -#define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \ - PNG_FLAG_CRC_ANCILLARY_NOWARN) - -#define PNG_FLAG_CRC_CRITICAL_MASK (PNG_FLAG_CRC_CRITICAL_USE | \ - PNG_FLAG_CRC_CRITICAL_IGNORE) - -#define PNG_FLAG_CRC_MASK (PNG_FLAG_CRC_ANCILLARY_MASK | \ - PNG_FLAG_CRC_CRITICAL_MASK) - -/* save typing and make code easier to understand */ -#define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \ - abs((int)((c1).green) - (int)((c2).green)) + \ - abs((int)((c1).blue) - (int)((c2).blue))) - -/* variables declared in png.c - only it needs to define PNG_NO_EXTERN */ -#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN) -/* place to hold the signature string for a PNG file. */ -extern png_byte FARDATA png_sig[8]; - -/* Constant strings for known chunk types. If you need to add a chunk, - * add a string holding the name here. See png.c for more details. We - * can't selectively include these, since we still check for chunk in the - * wrong locations with these labels. - */ -extern png_byte FARDATA png_IHDR[5]; -extern png_byte FARDATA png_IDAT[5]; -extern png_byte FARDATA png_IEND[5]; -extern png_byte FARDATA png_PLTE[5]; -extern png_byte FARDATA png_bKGD[5]; -extern png_byte FARDATA png_cHRM[5]; -extern png_byte FARDATA png_gAMA[5]; -extern png_byte FARDATA png_hIST[5]; -extern png_byte FARDATA png_oFFs[5]; -extern png_byte FARDATA png_pCAL[5]; -extern png_byte FARDATA png_pHYs[5]; -extern png_byte FARDATA png_sBIT[5]; -extern png_byte FARDATA png_sRGB[5]; -extern png_byte FARDATA png_tEXt[5]; -extern png_byte FARDATA png_tIME[5]; -extern png_byte FARDATA png_tRNS[5]; -extern png_byte FARDATA png_zTXt[5]; - -#endif /* PNG_NO_EXTERN */ - -/* Inline macros to do direct reads of bytes from the input buffer. These - * require that you are using an architecture that uses PNG byte ordering - * (MSB first) and supports unaligned data storage. I think that PowerPC - * in big-endian mode and 680x0 are the only ones that will support this. - * The x86 line of processors definitely do not. The png_get_int_32() - * routine also assumes we are using two's complement format for negative - * values, which is almost certainly true. - */ -#if defined(PNG_READ_BIG_ENDIAN_SUPPORTED) -#if defined(PNG_READ_pCAL_SUPPORTED) -#define png_get_int_32(buf) ( *((png_int_32p) (buf))) -#endif /* PNG_READ_pCAL_SUPPORTED */ -#define png_get_uint_32(buf) ( *((png_uint_32p) (buf))) -#define png_get_uint_16(buf) ( *((png_uint_16p) (buf))) -#else -#if defined(PNG_READ_pCAL_SUPPORTED) -PNG_EXTERN png_int_32 png_get_int_32 PNGARG((png_bytep buf)); -#endif /* PNG_READ_pCAL_SUPPORTED */ -PNG_EXTERN png_uint_32 png_get_uint_32 PNGARG((png_bytep buf)); -PNG_EXTERN png_uint_16 png_get_uint_16 PNGARG((png_bytep buf)); -#endif /* PNG_BIG_ENDIAN_GET_SUPPORTED */ - -/* Initialize png_ptr struct for reading, and allocate any other memory. - * (old interface - NOT DLL EXPORTED). - */ -extern void png_read_init PNGARG((png_structp png_ptr)); - -/* Initialize png_ptr struct for writing, and allocate any other memory. - * (old interface - NOT DLL EXPORTED). - */ -extern void png_write_init PNGARG((png_structp png_ptr)); - -/* allocate memory for an internal libpng struct */ -PNG_EXTERN png_voidp png_create_struct PNGARG((int type)); - -/* free memory from internal libpng struct */ -PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr)); - -/* free any memory that info_ptr points to and reset struct. */ -PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr, - png_infop info_ptr)); - -/* Function to allocate memory for zlib. */ -PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, uInt size)); - -/* function to free memory for zlib */ -PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr)); - -/* reset the CRC variable */ -PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr)); - -/* Write the "data" buffer to whatever output you are using. */ -PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, png_bytep data, - png_size_t length)); - -/* Read data from whatever input you are using into the "data" buffer */ -PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data, - png_size_t length)); - -/* read bytes into buf, and update png_ptr->crc */ -PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf, - png_size_t length)); - -/* read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */ -PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip)); - -/* read the CRC from the file and compare it to the libpng calculated CRC */ -PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr)); - -/* Calculate the CRC over a section of data. Note that we are only - * passing a maximum of 64K on systems that have this as a memory limit, - * since this is the maximum buffer size we can specify. - */ -PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr, - png_size_t length)); - -#if defined(PNG_WRITE_FLUSH_SUPPORTED) -PNG_EXTERN void png_flush PNGARG((png_structp png_ptr)); -#endif - -/* Place a 32-bit number into a buffer in PNG byte order (big-endian). - * The only currently known PNG chunk that uses signed numbers is - * the ancillary extension chunk, pCAL. - */ -PNG_EXTERN void png_save_uint_32 PNGARG((png_bytep buf, png_uint_32 i)); - -#if defined(PNG_WRITE_pCAL_SUPPORTED) -PNG_EXTERN void png_save_int_32 PNGARG((png_bytep buf, png_int_32 i)); -#endif - -/* Place a 16 bit number into a buffer in PNG byte order. - * The parameter is declared unsigned int, not png_uint_16, - * just to avoid potential problems on pre-ANSI C compilers. - */ -PNG_EXTERN void png_save_uint_16 PNGARG((png_bytep buf, unsigned int i)); - -/* simple function to write the signature */ -PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr)); - -/* write various chunks */ - -/* Write the IHDR chunk, and update the png_struct with the necessary - * information. - */ -PNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width, - png_uint_32 height, - int bit_depth, int color_type, int compression_type, int filter_type, - int interlace_type)); - -PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, png_colorp palette, - png_uint_32 num_pal)); - -PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data, - png_size_t length)); - -PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr)); - -#if defined(PNG_WRITE_gAMA_SUPPORTED) -PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma)); -#endif - -#if defined(PNG_WRITE_sBIT_SUPPORTED) -PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit, - int color_type)); -#endif - -#if defined(PNG_WRITE_cHRM_SUPPORTED) -PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr, - double white_x, double white_y, - double red_x, double red_y, double green_x, double green_y, - double blue_x, double blue_y)); -#endif - -#if defined(PNG_WRITE_sRGB_SUPPORTED) -PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr, - int intent)); -#endif - -#if defined(PNG_WRITE_tRNS_SUPPORTED) -PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans, - png_color_16p values, int number, int color_type)); -#endif - -#if defined(PNG_WRITE_bKGD_SUPPORTED) -PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr, - png_color_16p values, int color_type)); -#endif - -#if defined(PNG_WRITE_hIST_SUPPORTED) -PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist, - int num_hist)); -#endif - -#if defined(PNG_WRITE_tEXt_SUPPORTED) || defined(PNG_WRITE_zTXt_SUPPORTED) -PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr, - png_charp key, png_charpp new_key)); -#endif - -#if defined(PNG_WRITE_tEXt_SUPPORTED) -PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key, - png_charp text, png_size_t text_len)); -#endif - -#if defined(PNG_WRITE_zTXt_SUPPORTED) -PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key, - png_charp text, png_size_t text_len, int compression)); -#endif - -#if defined(PNG_WRITE_oFFs_SUPPORTED) -PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr, - png_uint_32 x_offset, png_uint_32 y_offset, int unit_type)); -#endif - -#if defined(PNG_WRITE_pCAL_SUPPORTED) -PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose, - png_int_32 X0, png_int_32 X1, int type, int nparams, - png_charp units, png_charpp params)); -#endif - -#if defined(PNG_WRITE_pHYs_SUPPORTED) -PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr, - png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, - int unit_type)); -#endif - -#if defined(PNG_WRITE_tIME_SUPPORTED) -PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr, - png_timep mod_time)); -#endif - -/* Called when finished processing a row of data */ -PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr)); - -/* Internal use only. Called before first row of data */ -PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr)); - -#if defined(PNG_READ_GAMMA_SUPPORTED) -PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr)); -#endif - -/* combine a row of data, dealing with alpha, etc. if requested */ -PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row, - int mask)); - -#if defined(PNG_READ_INTERLACING_SUPPORTED) -/* expand an interlaced row */ -PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info, - png_bytep row, int pass, png_uint_32 transformations)); -#endif - -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) -/* grab pixels out of a row for an interlaced pass */ -PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info, - png_bytep row, int pass)); -#endif - -/* unfilter a row */ -PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr, - png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter)); - -/* Choose the best filter to use and filter the row data */ -PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr, - png_row_infop row_info)); - -/* Write out the filtered row. */ -PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr, - png_bytep filtered_row)); -/* finish a row while reading, dealing with interlacing passes, etc. */ -PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr)); - -/* initialize the row buffers, etc. */ -PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr)); -/* optional call to update the users info structure */ -PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr, - png_infop info_ptr)); - -/* these are the functions that do the transformations */ -#if defined(PNG_READ_FILLER_SUPPORTED) -PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info, - png_bytep row, png_uint_32 filler, png_uint_32 flags)); -#endif - -#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) -PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) -PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) -PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) -PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#if defined(PNG_WRITE_FILLER_SUPPORTED) || \ - defined(PNG_READ_STRIP_ALPHA_SUPPORTED) -PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info, - png_bytep row, png_uint_32 flags)); -#endif - -#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) -PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row)); -#endif - -#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED) -PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row)); -#endif - -#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) -PNG_EXTERN void png_do_rgb_to_gray PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) -PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#if defined(PNG_READ_PACK_SUPPORTED) -PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, png_bytep row)); -#endif - -#if defined(PNG_READ_SHIFT_SUPPORTED) -PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row, - png_color_8p sig_bits)); -#endif - -#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) -PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, png_bytep row)); -#endif - -#if defined(PNG_READ_16_TO_8_SUPPORTED) -PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, png_bytep row)); -#endif - -#if defined(PNG_READ_DITHER_SUPPORTED) -PNG_EXTERN void png_do_dither PNGARG((png_row_infop row_info, - png_bytep row, png_bytep palette_lookup, png_bytep dither_lookup)); - -# if defined(PNG_CORRECT_PALETTE_SUPPORTED) -PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr, - png_colorp palette, int num_palette)); -# endif -#endif - -#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) -PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, png_bytep row)); -#endif - -#if defined(PNG_WRITE_PACK_SUPPORTED) -PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info, - png_bytep row, png_uint_32 bit_depth)); -#endif - -#if defined(PNG_WRITE_SHIFT_SUPPORTED) -PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row, - png_color_8p bit_depth)); -#endif - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) -PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, - png_color_16p trans_values, png_color_16p background, - png_color_16p background_1, - png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1, - png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1, - png_uint_16pp gamma_16_to_1, int gamma_shift)); -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) -PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row, - png_bytep gamma_table, png_uint_16pp gamma_16_table, - int gamma_shift)); -#endif - -#if defined(PNG_READ_EXPAND_SUPPORTED) -PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info, - png_bytep row, png_colorp palette, png_bytep trans, int num_trans)); -PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info, - png_bytep row, png_color_16p trans_value)); -#endif - -/* The following decodes the appropriate chunks, and does error correction, - * then calls the appropriate callback for the chunk if it is valid. - */ - -/* decode the IHDR chunk */ -PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); - -#if defined(PNG_READ_gAMA_SUPPORTED) -PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_sBIT_SUPPORTED) -PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_cHRM_SUPPORTED) -PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_sRGB_SUPPORTED) -PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_tRNS_SUPPORTED) -PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_bKGD_SUPPORTED) -PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_hIST_SUPPORTED) -PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_oFFs_SUPPORTED) -PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_pCAL_SUPPORTED) -PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_pHYs_SUPPORTED) -PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_tIME_SUPPORTED) -PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_tEXt_SUPPORTED) -PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_zTXt_SUPPORTED) -PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); - -PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr, - png_bytep chunk_name)); - -/* handle the transformations for reading and writing */ -PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_do_write_transformations PNGARG((png_structp png_ptr)); - -PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr)); - -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED -PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr, - png_uint_32 length)); -PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_push_fill_buffer PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t length)); -PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t buffer_length)); -PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t buffer_length)); -PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); -PNG_EXTERN void png_push_have_info PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, png_bytep row)); -PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr)); -#if defined(PNG_READ_tEXt_SUPPORTED) -PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); -PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr, - png_infop info_ptr)); -#endif -#if defined(PNG_READ_zTXt_SUPPORTED) -PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); -PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr, - png_infop info_ptr)); -#endif - -#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ - -#endif /* PNG_INTERNAL */ - -#ifdef __cplusplus -} -#endif - -/* do not put anything past this line */ -#endif /* _PNG_H */ diff --git a/src/png/pngconf.h b/src/png/pngconf.h deleted file mode 100644 index 675f292bab..0000000000 --- a/src/png/pngconf.h +++ /dev/null @@ -1,565 +0,0 @@ - -/* pngconf.h - machine configurable file for libpng - * - * libpng 1.0.1 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - * Copyright (c) 1996, 1997 Andreas Dilger - * Copyright (c) 1998, Glenn Randers-Pehrson - * March 15, 1998 - */ - -/* Any machine specific code is near the front of this file, so if you - * are configuring libpng for a machine, you may want to read the section - * starting here down to where it starts to typedef png_color, png_text, - * and png_info. - */ - -#ifndef PNGCONF_H -#define PNGCONF_H - -/* This is the size of the compression buffer, and thus the size of - * an IDAT chunk. Make this whatever size you feel is best for your - * machine. One of these will be allocated per png_struct. When this - * is full, it writes the data to the disk, and does some other - * calculations. Making this an extremely small size will slow - * the library down, but you may want to experiment to determine - * where it becomes significant, if you are concerned with memory - * usage. Note that zlib allocates at least 32Kb also. For readers, - * this describes the size of the buffer available to read the data in. - * Unless this gets smaller than the size of a row (compressed), - * it should not make much difference how big this is. - */ - -#ifndef PNG_ZBUF_SIZE -#define PNG_ZBUF_SIZE 8192 -#endif - -/* If you are running on a machine where you cannot allocate more - * than 64K of memory at once, uncomment this. While libpng will not - * normally need that much memory in a chunk (unless you load up a very - * large file), zlib needs to know how big of a chunk it can use, and - * libpng thus makes sure to check any memory allocation to verify it - * will fit into memory. -#define PNG_MAX_MALLOC_64K - */ -#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K) -#define PNG_MAX_MALLOC_64K -#endif - -/* This protects us against compilers which run on a windowing system - * and thus don't have or would rather us not use the stdio types: - * stdin, stdout, and stderr. The only one currently used is stderr - * in png_error() and png_warning(). #defining PNG_NO_STDIO will - * prevent these from being compiled and used. - * #define PNG_NO_STDIO - */ - -#ifndef PNG_NO_STDIO -#include -#endif - -/* This macro protects us against machines that don't have function - * prototypes (ie K&R style headers). If your compiler does not handle - * function prototypes, define this macro and use the included ansi2knr. - * I've always been able to use _NO_PROTO as the indicator, but you may - * need to drag the empty declaration out in front of here, or change the - * ifdef to suit your own needs. - */ -#ifndef PNGARG - -#ifdef OF /* zlib prototype munger */ -#define PNGARG(arglist) OF(arglist) -#else - -#ifdef _NO_PROTO -#define PNGARG(arglist) () -#else -#define PNGARG(arglist) arglist -#endif /* _NO_PROTO */ - -#endif /* OF */ - -#endif /* PNGARG */ - -/* Try to determine if we are compiling on a Mac. Note that testing for - * just __MWERKS__ is not good enough, because the Codewarrior is now used - * on non-Mac platforms. - */ -#ifndef MACOS -#if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \ - defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC) -#define MACOS -#endif -#endif - -/* enough people need this for various reasons to include it here */ -#if !defined(MACOS) && !defined(RISCOS) -#include -#endif - -/* This is an attempt to force a single setjmp behaviour on Linux. If - * the X config stuff didn't define _BSD_SOURCE we wouldn't need this. - */ -#ifdef __linux__ -#ifdef _BSD_SOURCE -#define _PNG_SAVE_BSD_SOURCE -#undef _BSD_SOURCE -#endif -#ifdef _SETJMP_H -__png.h__ already includes setjmp.h -__dont__ include it again -#endif -#endif /* __linux__ */ - -/* include setjmp.h for error handling */ -#include - -#ifdef __linux__ -#ifdef _PNG_SAVE_BSD_SOURCE -#define _BSD_SOURCE -#undef _PNG_SAVE_BSD_SOURCE -#endif -#endif /* __linux__ */ - -#ifdef BSD -#include -#else -#include -#endif - -/* Other defines for things like memory and the like can go here. */ -#ifdef PNG_INTERNAL -#include - -/* The functions exported by PNG_EXTERN are PNG_INTERNAL functions, which - * aren't usually used outside the library (as far as I know), so it is - * debatable if they should be exported at all. In the future, when it is - * possible to have run-time registry of chunk-handling functions, some of - * these will be made available again. -#define PNG_EXTERN extern - */ -#define PNG_EXTERN - -/* Other defines specific to compilers can go here. Try to keep - * them inside an appropriate ifdef/endif pair for portability. - */ - -#if defined(MACOS) -/* We need to check that hasn't already been included earlier - * as it seems it doesn't agree with , yet we should really use - * if possible. - */ -#if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__) -#include -#endif -#else -#include -#endif - -/* Codewarrior on NT has linking problems without this. */ -#if defined(__MWERKS__) && defined(WIN32) -#define PNG_ALWAYS_EXTERN -#endif - -/* For some reason, Borland C++ defines memcmp, etc. in mem.h, not - * stdlib.h like it should (I think). Or perhaps this is a C++ - * "feature"? - */ -#ifdef __TURBOC__ -#include -#include "alloc.h" -#endif - -#ifdef _MSC_VER -#include -#endif - -/* This controls how fine the dithering gets. As this allocates - * a largish chunk of memory (32K), those who are not as concerned - * with dithering quality can decrease some or all of these. - */ -#ifndef PNG_DITHER_RED_BITS -#define PNG_DITHER_RED_BITS 5 -#endif -#ifndef PNG_DITHER_GREEN_BITS -#define PNG_DITHER_GREEN_BITS 5 -#endif -#ifndef PNG_DITHER_BLUE_BITS -#define PNG_DITHER_BLUE_BITS 5 -#endif - -/* This controls how fine the gamma correction becomes when you - * are only interested in 8 bits anyway. Increasing this value - * results in more memory being used, and more pow() functions - * being called to fill in the gamma tables. Don't set this value - * less then 8, and even that may not work (I haven't tested it). - */ - -#ifndef PNG_MAX_GAMMA_8 -#define PNG_MAX_GAMMA_8 11 -#endif - -/* This controls how much a difference in gamma we can tolerate before - * we actually start doing gamma conversion. - */ -#ifndef PNG_GAMMA_THRESHOLD -#define PNG_GAMMA_THRESHOLD 0.05 -#endif - -#endif /* PNG_INTERNAL */ - -/* The following uses const char * instead of char * for error - * and warning message functions, so some compilers won't complain. - * If you do not want to use const, define PNG_NO_CONST here. - */ - -#ifndef PNG_NO_CONST -# define PNG_CONST const -#else -# define PNG_CONST -#endif - -/* The following defines give you the ability to remove code from the - * library that you will not be using. I wish I could figure out how to - * automate this, but I can't do that without making it seriously hard - * on the users. So if you are not using an ability, change the #define - * to and #undef, and that part of the library will not be compiled. If - * your linker can't find a function, you may want to make sure the - * ability is defined here. Some of these depend upon some others being - * defined. I haven't figured out all the interactions here, so you may - * have to experiment awhile to get everything to compile. If you are - * creating or using a shared library, you probably shouldn't touch this, - * as it will affect the size of the structures, and this will cause bad - * things to happen if the library and/or application ever change. - */ - -/* Any transformations you will not be using can be undef'ed here */ - -/* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user - to turn it off with "*TRANSFORMS_NOT_SUPPORTED" on the compile line, - then pick and choose which ones to define without having to edit - this file. It is safe to use the *TRANSFORMS_NOT_SUPPORTED if you - only want to have a png-compliant reader/writer but don't need - any of the extra transformations. This saves about 80 kbytes in a - typical installation of the library. - */ - - -#ifndef PNG_READ_TRANSFORMS_NOT_SUPPORTED -#define PNG_READ_TRANSFORMS_SUPPORTED -#endif -#ifndef PNG_WRITE_TRANSFORMS_NOT_SUPPORTED -#define PNG_WRITE_TRANSFORMS_SUPPORTED -#endif - -#ifdef PNG_READ_TRANSFORMS_SUPPORTED -#define PNG_READ_EXPAND_SUPPORTED -#define PNG_READ_SHIFT_SUPPORTED -#define PNG_READ_PACK_SUPPORTED -#define PNG_READ_BGR_SUPPORTED -#define PNG_READ_SWAP_SUPPORTED -#define PNG_READ_PACKSWAP_SUPPORTED -#define PNG_READ_INVERT_SUPPORTED -#define PNG_READ_DITHER_SUPPORTED -#define PNG_READ_BACKGROUND_SUPPORTED -#define PNG_READ_16_TO_8_SUPPORTED -#define PNG_READ_FILLER_SUPPORTED -#define PNG_READ_GAMMA_SUPPORTED -#define PNG_READ_GRAY_TO_RGB_SUPPORTED -#define PNG_READ_SWAP_ALPHA_SUPPORTED -#define PNG_READ_INVERT_ALPHA_SUPPORTED -#define PNG_READ_STRIP_ALPHA_SUPPORTED -#define PNG_READ_USER_TRANSFORM_SUPPORTED -/* the following aren't implemented yet -#define PNG_READ_RGB_TO_GRAY_SUPPORTED - */ -#endif /* PNG_READ_TRANSFORMS_SUPPORTED */ - -#ifndef PNG_PROGRESSIVE_READ_NOT_SUPPORTED /* if you don't do progressive */ -#define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */ -#endif /* about interlacing capability! You'll */ - /* still have interlacing unless you change the following line: */ -#define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */ -#define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel and SGI */ - -#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED -#define PNG_WRITE_SHIFT_SUPPORTED -#define PNG_WRITE_PACK_SUPPORTED -#define PNG_WRITE_BGR_SUPPORTED -#define PNG_WRITE_SWAP_SUPPORTED -#define PNG_WRITE_PACKSWAP_SUPPORTED -#define PNG_WRITE_INVERT_SUPPORTED -#define PNG_WRITE_FILLER_SUPPORTED /* This is the same as WRITE_STRIP_ALPHA */ -#define PNG_WRITE_FLUSH_SUPPORTED -#define PNG_WRITE_SWAP_ALPHA_SUPPORTED -#define PNG_WRITE_INVERT_ALPHA_SUPPORTED -#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED -#define PNG_WRITE_USER_TRANSFORM_SUPPORTED -#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */ - -#define PNG_WRITE_INTERLACING_SUPPORTED /* not required for PNG-compliant - encoders, but can cause trouble - if left undefined */ - -#if !defined(PNG_NO_STDIO) -#define PNG_TIME_RFC1123_SUPPORTED -#endif - -/* This adds extra functions in pngget.c for accessing data from the - * info pointer (added in version 0.99) - * png_get_image_width() - * png_get_image_height() - * png_get_bit_depth() - * png_get_color_type() - * png_get_compression_type() - * png_get_filter_type() - * png_get_interlace_type() - * png_get_pixel_aspect_ratio() - * png_get_pixels_per_meter() - * png_get_x_offset_pixels() - * png_get_y_offset_pixels() - * png_get_x_offset_microns() - * png_get_y_offset_microns() - */ -#if !defined(PNG_NO_EASY_ACCESS) -#define PNG_EASY_ACCESS_SUPPORTED -#endif - -/* These are currently experimental features, define them if you want */ - -/* very little testing */ -/* -#define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED -*/ - -/* This is only for PowerPC big-endian and 680x0 systems */ -/* some testing */ -/* -#define PNG_READ_BIG_ENDIAN_SUPPORTED -*/ - -/* These functions are turned off by default, as they will be phased out. */ -/* -#define PNG_USELESS_TESTS_SUPPORTED -#define PNG_CORRECT_PALETTE_SUPPORTED -*/ - -/* Any chunks you are not interested in, you can undef here. The - * ones that allocate memory may be expecially important (hIST, - * tEXt, zTXt, tRNS, pCAL). Others will just save time and make png_info - * a bit smaller. - */ - -#ifndef PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED -#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED -#endif -#ifndef PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED -#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED -#endif - -#ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED -#define PNG_READ_bKGD_SUPPORTED -#define PNG_READ_cHRM_SUPPORTED -#define PNG_READ_gAMA_SUPPORTED -#define PNG_READ_hIST_SUPPORTED -#define PNG_READ_oFFs_SUPPORTED -#define PNG_READ_pCAL_SUPPORTED -#define PNG_READ_pHYs_SUPPORTED -#define PNG_READ_sBIT_SUPPORTED -#define PNG_READ_sRGB_SUPPORTED -#define PNG_READ_tEXt_SUPPORTED -#define PNG_READ_tIME_SUPPORTED -#define PNG_READ_tRNS_SUPPORTED -#define PNG_READ_zTXt_SUPPORTED -#define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the optional */ - /* PLTE chunk in RGB and RGBA images */ -#endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */ - -#ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED -#define PNG_WRITE_bKGD_SUPPORTED -#define PNG_WRITE_cHRM_SUPPORTED -#define PNG_WRITE_gAMA_SUPPORTED -#define PNG_WRITE_hIST_SUPPORTED -#define PNG_WRITE_oFFs_SUPPORTED -#define PNG_WRITE_pCAL_SUPPORTED -#define PNG_WRITE_pHYs_SUPPORTED -#define PNG_WRITE_sBIT_SUPPORTED -#define PNG_WRITE_sRGB_SUPPORTED -#define PNG_WRITE_tEXt_SUPPORTED -#define PNG_WRITE_tIME_SUPPORTED -#define PNG_WRITE_tRNS_SUPPORTED -#define PNG_WRITE_zTXt_SUPPORTED -#endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */ - -/* need the time information for reading tIME chunks */ -#if defined(PNG_READ_tIME_SUPPORTED) || defined(PNG_WRITE_tIME_SUPPORTED) -#include -#endif - -/* Some typedefs to get us started. These should be safe on most of the - * common platforms. The typedefs should be at least as large as the - * numbers suggest (a png_uint_32 must be at least 32 bits long), but they - * don't have to be exactly that size. Some compilers dislike passing - * unsigned shorts as function parameters, so you may be better off using - * unsigned int for png_uint_16. Likewise, for 64-bit systems, you may - * want to have unsigned int for png_uint_32 instead of unsigned long. - */ - -typedef unsigned long png_uint_32; -typedef long png_int_32; -typedef unsigned short png_uint_16; -typedef short png_int_16; -typedef unsigned char png_byte; - -/* This is usually size_t. It is typedef'ed just in case you need it to - change (I'm not sure if you will or not, so I thought I'd be safe) */ -typedef size_t png_size_t; - -/* The following is needed for medium model support. It cannot be in the - * PNG_INTERNAL section. Needs modification for other compilers besides - * MSC. Model independent support declares all arrays and pointers to be - * large using the far keyword. The zlib version used must also support - * model independent data. As of version zlib 1.0.4, the necessary changes - * have been made in zlib. The USE_FAR_KEYWORD define triggers other - * changes that are needed. (Tim Wegner) - */ - -/* Separate compiler dependencies (problem here is that zlib.h always - defines FAR. (SJT) */ -#ifdef __BORLANDC__ -#if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__) -#define LDATA 1 -#else -#define LDATA 0 -#endif - -#if !defined(__WIN32__) && !defined(__FLAT__) -#define PNG_MAX_MALLOC_64K -#if (LDATA != 1) -#ifndef FAR -#define FAR __far -#endif -#define USE_FAR_KEYWORD -#endif /* LDATA != 1 */ - -/* Possibly useful for moving data out of default segment. - * Uncomment it if you want. Could also define FARDATA as - * const if your compiler supports it. (SJT) -# define FARDATA FAR - */ -#endif /* __WIN32__, __FLAT__ */ - -#endif /* __BORLANDC__ */ - - -/* Suggest testing for specific compiler first before testing for - * FAR. The Watcom compiler defines both __MEDIUM__ and M_I86MM, - * making reliance oncertain keywords suspect. (SJT) - */ - -/* MSC Medium model */ -#if defined(FAR) -# if defined(M_I86MM) -# define USE_FAR_KEYWORD -# define FARDATA FAR -# include -# endif -#endif - -/* SJT: default case */ -#ifndef FAR -# define FAR -#endif - -/* At this point FAR is always defined */ -#ifndef FARDATA -#define FARDATA -#endif - -/* Add typedefs for pointers */ -typedef void FAR * png_voidp; -typedef png_byte FAR * png_bytep; -typedef png_uint_32 FAR * png_uint_32p; -typedef png_int_32 FAR * png_int_32p; -typedef png_uint_16 FAR * png_uint_16p; -typedef png_int_16 FAR * png_int_16p; -typedef PNG_CONST char FAR * png_const_charp; -typedef char FAR * png_charp; -typedef double FAR * png_doublep; - -/* Pointers to pointers; i.e. arrays */ -typedef png_byte FAR * FAR * png_bytepp; -typedef png_uint_32 FAR * FAR * png_uint_32pp; -typedef png_int_32 FAR * FAR * png_int_32pp; -typedef png_uint_16 FAR * FAR * png_uint_16pp; -typedef png_int_16 FAR * FAR * png_int_16pp; -typedef PNG_CONST char FAR * FAR * png_const_charpp; -typedef char FAR * FAR * png_charpp; -typedef double FAR * FAR * png_doublepp; - -/* Pointers to pointers to pointers; i.e. pointer to array */ -typedef char FAR * FAR * FAR * png_charppp; - -/* libpng typedefs for types in zlib. If zlib changes - * or another compression library is used, then change these. - * Eliminates need to change all the source files. - */ -typedef charf * png_zcharp; -typedef charf * FAR * png_zcharpp; -typedef z_stream FAR * png_zstreamp; - -/* allow for compilation as dll under MS Windows */ -#ifdef __WIN32DLL__ -#define PNG_EXPORT(type,symbol) __declspec(dllexport) type symbol -#endif - -/* allow for compilation as dll with BORLAND C++ 5.0 */ -#if defined(__BORLANDC__) && defined(_Windows) && defined(__DLL__) -# define PNG_EXPORT(type,symbol) type _export symbol -#endif - -/* allow for compilation as shared lib under BeOS */ -#ifdef __BEOSDLL__ -#define PNG_EXPORT(type,symbol) __declspec(export) type symbol -#endif - -#ifndef PNG_EXPORT -#define PNG_EXPORT(type,symbol) type symbol -#endif - - -/* User may want to use these so not in PNG_INTERNAL. Any library functions - * that are passed far data must be model independent. - */ - -#if defined(USE_FAR_KEYWORD) /* memory model independent fns */ -/* use this to make far-to-near assignments */ -# define CHECK 1 -# define NOCHECK 0 -# define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK)) -# define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK)) -# define png_strlen _fstrlen -# define png_memcmp _fmemcmp /* SJT: added */ -# define png_memcpy _fmemcpy -# define png_memset _fmemset -#else /* use the usual functions */ -# define CVT_PTR(ptr) (ptr) -# define CVT_PTR_NOCHECK(ptr) (ptr) -# define png_strlen strlen -# define png_memcmp memcmp /* SJT: added */ -# define png_memcpy memcpy -# define png_memset memset -#endif -/* End of memory model independent support */ - -/* Just a double check that someone hasn't tried to define something - * contradictory. - */ -#if (PNG_ZBUF_SIZE > 65536) && defined(PNG_MAX_MALLOC_64K) -#undef PNG_ZBUF_SIZE -#define PNG_ZBUF_SIZE 65536 -#endif - -#endif /* PNGCONF_H */ - diff --git a/src/png/pngerror.c b/src/png/pngerror.c deleted file mode 100644 index c31201bdf4..0000000000 --- a/src/png/pngerror.c +++ /dev/null @@ -1,174 +0,0 @@ - -/* pngerror.c - stub functions for i/o and memory allocation - * - * libpng 1.0.1 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - * Copyright (c) 1996, 1997 Andreas Dilger - * Copyright (c) 1998, Glenn Randers-Pehrson - * March 15, 1998 - * - * This file provides a location for all error handling. Users which - * need special error handling are expected to write replacement functions - * and use png_set_error_fn() to use those functions. See the instructions - * at each function. - */ - -#define PNG_INTERNAL -#include "../png/png.h" - -static void png_default_error PNGARG((png_structp png_ptr, - png_const_charp message)); -static void png_default_warning PNGARG((png_structp png_ptr, - png_const_charp message)); - -/* This function is called whenever there is a fatal error. This function - * should not be changed. If there is a need to handle errors differently, - * you should supply a replacement error function and use png_set_error_fn() - * to replace the error function at run-time. - */ -void -png_error(png_structp png_ptr, png_const_charp message) -{ - if (png_ptr->error_fn != NULL) - (*(png_ptr->error_fn))(png_ptr, message); - - /* if the following returns or doesn't exist, use the default function, - which will not return */ - png_default_error(png_ptr, message); -} - -/* This function is called whenever there is a non-fatal error. This function - * should not be changed. If there is a need to handle warnings differently, - * you should supply a replacement warning function and use - * png_set_error_fn() to replace the warning function at run-time. - */ -void -png_warning(png_structp png_ptr, png_const_charp message) -{ - if (png_ptr->warning_fn != NULL) - (*(png_ptr->warning_fn))(png_ptr, message); - else - png_default_warning(png_ptr, message); -} - -/* These utilities are used internally to build an error message which relates - * to the current chunk. The chunk name comes from png_ptr->chunk_name, - * this is used to prefix the message. The message is limited in length - * to 63 bytes, the name characters are output as hex digits wrapped in [] - * if the character is invalid. - */ -#define isnonalpha(c) ((c) < 41 || (c) > 122 || ((c) > 90 && (c) < 97)) -static PNG_CONST char png_digit[16] = { - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' -}; - -static void -png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp message) -{ - int iout = 0, iin = 0; - - while (iin < 4) { - int c = png_ptr->chunk_name[iin++]; - if (isnonalpha(c)) { - buffer[iout++] = '['; - buffer[iout++] = png_digit[(c & 0xf0) >> 4]; - buffer[iout++] = png_digit[c & 0xf]; - buffer[iout++] = ']'; - } else { - buffer[iout++] = c; - } - } - - if (message == NULL) - buffer[iout] = 0; - else { - buffer[iout++] = ':'; - buffer[iout++] = ' '; - png_memcpy(buffer+iout, message, 64); - buffer[iout+63] = 0; - } -} - -void -png_chunk_error(png_structp png_ptr, png_const_charp message) -{ - char msg[16+64]; - png_format_buffer(png_ptr, msg, message); - png_error(png_ptr, msg); -} - -void -png_chunk_warning(png_structp png_ptr, png_const_charp message) -{ - char msg[16+64]; - png_format_buffer(png_ptr, msg, message); - png_warning(png_ptr, msg); -} - -/* This is the default error handling function. Note that replacements for - * this function MUST NOT RETURN, or the program will likely crash. This - * function is used by default, or if the program supplies NULL for the - * error function pointer in png_set_error_fn(). - */ -static void -png_default_error(png_structp png_ptr, png_const_charp message) -{ -#ifndef PNG_NO_STDIO - fprintf(stderr, "libpng error: %s\n", message); -#endif - -#ifdef USE_FAR_KEYWORD - { - jmp_buf jmpbuf; - png_memcpy(jmpbuf,png_ptr->jmpbuf,sizeof(jmp_buf)); - longjmp(jmpbuf, 1); - } -#else - longjmp(png_ptr->jmpbuf, 1); -#endif -} - -/* This function is called when there is a warning, but the library thinks - * it can continue anyway. Replacement functions don't have to do anything - * here if you don't want to. In the default configuration, png_ptr is - * not used, but it is passed in case it may be useful. - */ -static void -png_default_warning(png_structp png_ptr, png_const_charp message) -{ - if (png_ptr == NULL) - return; - -#ifndef PNG_NO_STDIO - fprintf(stderr, "libpng warning: %s\n", message); -#endif -} - -/* This function is called when the application wants to use another method - * of handling errors and warnings. Note that the error function MUST NOT - * return to the calling routine or serious problems will occur. The return - * method used in the default routine calls longjmp(png_ptr->jmpbuf, 1) - */ -void -png_set_error_fn(png_structp png_ptr, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warning_fn) -{ - png_ptr->error_ptr = error_ptr; - png_ptr->error_fn = error_fn; - png_ptr->warning_fn = warning_fn; -} - - -/* This function returns a pointer to the error_ptr associated with the user - * functions. The application should free any memory associated with this - * pointer before png_write_destroy and png_read_destroy are called. - */ -png_voidp -png_get_error_ptr(png_structp png_ptr) -{ - return ((png_voidp)png_ptr->error_ptr); -} - - - diff --git a/src/png/pngget.c b/src/png/pngget.c deleted file mode 100644 index f45fa418aa..0000000000 --- a/src/png/pngget.c +++ /dev/null @@ -1,644 +0,0 @@ - -/* pngget.c - retrieval of values from info struct - * - * libpng 1.0.1 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - * Copyright (c) 1996, 1997 Andreas Dilger - * Copyright (c) 1998, Glenn Randers-Pehrson - * March 15, 1998 - */ - -#define PNG_INTERNAL -#include "../png/png.h" - -png_uint_32 -png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag) -{ - if (png_ptr != NULL && info_ptr != NULL) - return(info_ptr->valid & flag); - else - return(0); -} - -png_uint_32 -png_get_rowbytes(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - return(info_ptr->rowbytes); - else - return(0); -} - -#ifdef PNG_EASY_ACCESS_SUPPORTED -/* easy access to info, added in libpng-0.99 */ -png_uint_32 -png_get_image_width(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - { - return info_ptr->width; - } - return (0); -} - -png_uint_32 -png_get_image_height(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - { - return info_ptr->height; - } - return (0); -} - -png_byte -png_get_bit_depth(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - { - return info_ptr->bit_depth; - } - return (0); -} - -png_byte -png_get_color_type(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - { - return info_ptr->color_type; - } - return (0); -} - -png_byte -png_get_filter_type(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - { - return info_ptr->filter_type; - } - return (0); -} - -png_byte -png_get_interlace_type(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - { - return info_ptr->interlace_type; - } - return (0); -} - -png_byte -png_get_compression_type(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - { - return info_ptr->compression_type; - } - return (0); -} - -png_uint_32 -png_get_x_pixels_per_meter(png_structp png_ptr, png_infop info_ptr) -{ -#if defined(PNG_READ_pHYs_SUPPORTED) || defined(PNG_WRITE_pHYs_SUPPORTED) - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) - { - png_debug1(1, "in %s retrieval function\n", "png_get_x_pixels_per_meter"); - if(info_ptr->phys_unit_type != PNG_RESOLUTION_METER) - return (0); - else return (info_ptr->x_pixels_per_unit); - } - else -#endif - return (0); -} - -png_uint_32 -png_get_y_pixels_per_meter(png_structp png_ptr, png_infop info_ptr) -{ -#if defined(PNG_READ_pHYs_SUPPORTED) || defined(PNG_WRITE_pHYs_SUPPORTED) - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) - { - png_debug1(1, "in %s retrieval function\n", "png_get_y_pixels_per_meter"); - if(info_ptr->phys_unit_type != PNG_RESOLUTION_METER) - return (0); - else return (info_ptr->y_pixels_per_unit); - } - else -#endif - return (0); -} - -png_uint_32 -png_get_pixels_per_meter(png_structp png_ptr, png_infop info_ptr) -{ -#if defined(PNG_READ_pHYs_SUPPORTED) || defined(PNG_WRITE_pHYs_SUPPORTED) - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) - { - png_debug1(1, "in %s retrieval function\n", "png_get_pixels_per_meter"); - if(info_ptr->phys_unit_type != PNG_RESOLUTION_METER || - info_ptr->x_pixels_per_unit != info_ptr->y_pixels_per_unit) - return (0); - else return (info_ptr->x_pixels_per_unit); - } - else -#endif - return (0); -} - -float -png_get_pixel_aspect_ratio(png_structp png_ptr, png_infop info_ptr) - { -#if defined(PNG_READ_pHYs_SUPPORTED) || defined(PNG_WRITE_pHYs_SUPPORTED) - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) - { - png_debug1(1, "in %s retrieval function\n", "png_get_aspect_ratio"); - if (info_ptr->x_pixels_per_unit == 0) - return ((float)0.0); - else - return ((float)info_ptr->y_pixels_per_unit - /(float)info_ptr->x_pixels_per_unit); - } - else -#endif - return ((float)0.0); -} - -png_uint_32 -png_get_x_offset_microns(png_structp png_ptr, png_infop info_ptr) -{ -#if defined(PNG_READ_oFFs_SUPPORTED) || defined(PNG_WRITE_oFFs_SUPPORTED) - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) - { - png_debug1(1, "in %s retrieval function\n", "png_get_x_offset_microns"); - if(info_ptr->offset_unit_type != PNG_OFFSET_MICROMETER) - return (0); - else return (info_ptr->x_offset); - } - else -#endif - return (0); -} - -png_uint_32 -png_get_y_offset_microns(png_structp png_ptr, png_infop info_ptr) -{ -#if defined(PNG_READ_oFFs_SUPPORTED) || defined(PNG_WRITE_oFFs_SUPPORTED) - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) - { - png_debug1(1, "in %s retrieval function\n", "png_get_y_offset_microns"); - if(info_ptr->offset_unit_type != PNG_OFFSET_MICROMETER) - return (0); - else return (info_ptr->y_offset); - } - else -#endif - return (0); -} - -png_uint_32 -png_get_x_offset_pixels(png_structp png_ptr, png_infop info_ptr) -{ -#if defined(PNG_READ_oFFs_SUPPORTED) || defined(PNG_WRITE_oFFs_SUPPORTED) - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) - { - png_debug1(1, "in %s retrieval function\n", "png_get_x_offset_microns"); - if(info_ptr->offset_unit_type != PNG_OFFSET_PIXEL) - return (0); - else return (info_ptr->x_offset); - } - else -#endif - return (0); -} - -png_uint_32 -png_get_y_offset_pixels(png_structp png_ptr, png_infop info_ptr) -{ -#if defined(PNG_READ_oFFs_SUPPORTED) || defined(PNG_WRITE_oFFs_SUPPORTED) - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) - { - png_debug1(1, "in %s retrieval function\n", "png_get_y_offset_microns"); - if(info_ptr->offset_unit_type != PNG_OFFSET_PIXEL) - return (0); - else return (info_ptr->y_offset); - } - else -#endif - return (0); -} - -#ifdef PNG_INCH_CONVERSIONS -png_uint_32 -png_get_pixels_per_inch(png_structp png_ptr, png_infop info_ptr) -{ - return ((png_uint_32)((float)png_get_pixels_per_meter(png_ptr, info_ptr) - *.03937 +.5) -} - -png_uint_32 -png_get_x_pixels_per_inch(png_structp png_ptr, png_infop info_ptr) -{ - return ((png_uint_32)((float)png_get_x_pixels_per_meter(png_ptr, info_ptr) - *.03937 +.5) -} - -png_uint_32 -png_get_y_pixels_per_inch(png_structp png_ptr, png_infop info_ptr) -{ - return ((png_uint_32)((float)png_get_y_pixels_per_meter(png_ptr, info_ptr) - *.03937 +.5) -} - -float -png_get_x_offset_inches(png_structp png_ptr, png_infop info_ptr) -{ - return ((float)png_get_x_offset_microns(png_ptr, info_ptr) - *.03937/1000000. +.5) -} - -float -png_get_y_offset_inches(png_structp png_ptr, png_infop info_ptr) -{ - return ((float)png_get_y_offset_microns(png_ptr, info_ptr) - *.03937/1000000. +.5) -} - -#if defined(PNG_READ_pHYs_SUPPORTED) -png_uint_32 -png_get_pHYs_dpi(png_structp png_ptr, png_infop info_ptr, - png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type) -{ - png_uint_32 retval = 0; - - if (png_ptr != NULL && info_ptr != NULL && info_ptr->valid & PNG_INFO_pHYs) - { - png_debug1(1, "in %s retrieval function\n", "pHYs"); - if (res_x != NULL) - { - *res_x = info_ptr->x_pixels_per_unit; - retval |= PNG_INFO_pHYs; - } - if (res_y != NULL) - { - *res_y = info_ptr->y_pixels_per_unit; - retval |= PNG_INFO_pHYs; - } - if (unit_type != NULL) - { - *unit_type = (int)info_ptr->phys_unit_type; - retval |= PNG_INFO_pHYs; - if(unit_type == 1) - { - if (res_x != NULL) *res_x = (png_uint_32)(*res_x * 39.37 + .50); - if (res_y != NULL) *res_y = (png_uint_32)(*res_y * 39.37 + .50); - } - } - } - return (retval); -} -#endif - -#endif /* PNG_INCH_CONVERSIONS */ - -/* png_get_channels really belongs in here, too, but it's been around longer */ -#endif /* PNG_EASY_ACCESS_SUPPORTED */ - -png_byte -png_get_channels(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - return(info_ptr->channels); - else - return (0); -} - -png_bytep -png_get_signature(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - return(info_ptr->signature); - else - return (NULL); -} - -#if defined(PNG_READ_bKGD_SUPPORTED) -png_uint_32 -png_get_bKGD(png_structp png_ptr, png_infop info_ptr, - png_color_16p *background) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD) - && background != NULL) - { - png_debug1(1, "in %s retrieval function\n", "bKGD"); - *background = &(info_ptr->background); - return (PNG_INFO_bKGD); - } - return (0); -} -#endif - -#if defined(PNG_READ_cHRM_SUPPORTED) -png_uint_32 -png_get_cHRM(png_structp png_ptr, png_infop info_ptr, - double *white_x, double *white_y, double *red_x, double *red_y, - double *green_x, double *green_y, double *blue_x, double *blue_y) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM)) - { - png_debug1(1, "in %s retrieval function\n", "cHRM"); - if (white_x != NULL) - *white_x = (double)info_ptr->x_white; - if (white_y != NULL) - *white_y = (double)info_ptr->y_white; - if (red_x != NULL) - *red_x = (double)info_ptr->x_red; - if (red_y != NULL) - *red_y = (double)info_ptr->y_red; - if (green_x != NULL) - *green_x = (double)info_ptr->x_green; - if (green_y != NULL) - *green_y = (double)info_ptr->y_green; - if (blue_x != NULL) - *blue_x = (double)info_ptr->x_blue; - if (blue_y != NULL) - *blue_y = (double)info_ptr->y_blue; - return (PNG_INFO_cHRM); - } - return (0); -} -#endif - -#if defined(PNG_READ_gAMA_SUPPORTED) -png_uint_32 -png_get_gAMA(png_structp png_ptr, png_infop info_ptr, double *file_gamma) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA) - && file_gamma != NULL) - { - png_debug1(1, "in %s retrieval function\n", "gAMA"); - *file_gamma = (double)info_ptr->gamma; - return (PNG_INFO_gAMA); - } - return (0); -} -#endif - -#if defined(PNG_READ_sRGB_SUPPORTED) -png_uint_32 -png_get_sRGB(png_structp png_ptr, png_infop info_ptr, int *file_srgb_intent) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB) - && file_srgb_intent != NULL) - { - png_debug1(1, "in %s retrieval function\n", "sRGB"); - *file_srgb_intent = (int)info_ptr->srgb_intent; - return (PNG_INFO_sRGB); - } - return (0); -} -#endif - -#if defined(PNG_READ_hIST_SUPPORTED) -png_uint_32 -png_get_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p *hist) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST) - && hist != NULL) - { - png_debug1(1, "in %s retrieval function\n", "hIST"); - *hist = info_ptr->hist; - return (PNG_INFO_hIST); - } - return (0); -} -#endif - -png_uint_32 -png_get_IHDR(png_structp png_ptr, png_infop info_ptr, - png_uint_32 *width, png_uint_32 *height, int *bit_depth, - int *color_type, int *interlace_type, int *compression_type, - int *filter_type) - -{ - if (png_ptr != NULL && info_ptr != NULL && width != NULL && height != NULL && - bit_depth != NULL && color_type != NULL) - { - int pixel_depth, channels; - png_uint_32 rowbytes_per_pixel; - - png_debug1(1, "in %s retrieval function\n", "IHDR"); - *width = info_ptr->width; - *height = info_ptr->height; - *bit_depth = info_ptr->bit_depth; - *color_type = info_ptr->color_type; - if (compression_type != NULL) - *compression_type = info_ptr->compression_type; - if (filter_type != NULL) - *filter_type = info_ptr->filter_type; - if (interlace_type != NULL) - *interlace_type = info_ptr->interlace_type; - - /* check for potential overflow of rowbytes */ - if (*color_type == PNG_COLOR_TYPE_PALETTE) - channels = 1; - else if (*color_type & PNG_COLOR_MASK_COLOR) - channels = 3; - else - channels = 1; - if (*color_type & PNG_COLOR_MASK_ALPHA) - channels++; - pixel_depth = *bit_depth * channels; - rowbytes_per_pixel = (pixel_depth + 7) >> 3; - if ((*width > (png_uint_32)2147483647L/rowbytes_per_pixel)) - { - png_warning(png_ptr, - "Width too large for libpng to process image data."); - } - return (1); - } - return (0); -} - -#if defined(PNG_READ_oFFs_SUPPORTED) -png_uint_32 -png_get_oFFs(png_structp png_ptr, png_infop info_ptr, - png_uint_32 *offset_x, png_uint_32 *offset_y, int *unit_type) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs) - && offset_x != NULL && offset_y != NULL && unit_type != NULL) - { - png_debug1(1, "in %s retrieval function\n", "oFFs"); - *offset_x = info_ptr->x_offset; - *offset_y = info_ptr->y_offset; - *unit_type = (int)info_ptr->offset_unit_type; - return (PNG_INFO_oFFs); - } - return (0); -} -#endif - -#if defined(PNG_READ_pCAL_SUPPORTED) -png_uint_32 -png_get_pCAL(png_structp png_ptr, png_infop info_ptr, - png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams, - png_charp *units, png_charpp *params) -{ - if (png_ptr != NULL && info_ptr != NULL && info_ptr->valid & PNG_INFO_pCAL && - purpose != NULL && X0 != NULL && X1 != NULL && type != NULL && - nparams != NULL && units != NULL && params != NULL) - { - png_debug1(1, "in %s retrieval function\n", "pCAL"); - *purpose = info_ptr->pcal_purpose; - *X0 = info_ptr->pcal_X0; - *X1 = info_ptr->pcal_X1; - *type = (int)info_ptr->pcal_type; - *nparams = (int)info_ptr->pcal_nparams; - *units = info_ptr->pcal_units; - *params = info_ptr->pcal_params; - return (PNG_INFO_pCAL); - } - return (0); -} -#endif - -#if defined(PNG_READ_pHYs_SUPPORTED) -png_uint_32 -png_get_pHYs(png_structp png_ptr, png_infop info_ptr, - png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type) -{ - png_uint_32 retval = 0; - - if (png_ptr != NULL && info_ptr != NULL && info_ptr->valid & PNG_INFO_pHYs) - { - png_debug1(1, "in %s retrieval function\n", "pHYs"); - if (res_x != NULL) - { - *res_x = info_ptr->x_pixels_per_unit; - retval |= PNG_INFO_pHYs; - } - if (res_y != NULL) - { - *res_y = info_ptr->y_pixels_per_unit; - retval |= PNG_INFO_pHYs; - } - if (unit_type != NULL) - { - *unit_type = (int)info_ptr->phys_unit_type; - retval |= PNG_INFO_pHYs; - } - } - return (retval); -} -#endif - -png_uint_32 -png_get_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp *palette, - int *num_palette) -{ - if (png_ptr != NULL && info_ptr != NULL && info_ptr->valid & PNG_INFO_PLTE && - palette != NULL) - { - png_debug1(1, "in %s retrieval function\n", "PLTE"); - *palette = info_ptr->palette; - *num_palette = info_ptr->num_palette; - png_debug1(3, "num_palette = %d\n", *num_palette); - return (PNG_INFO_PLTE); - } - return (0); -} - -#if defined(PNG_READ_sBIT_SUPPORTED) -png_uint_32 -png_get_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit) -{ - if (png_ptr != NULL && info_ptr != NULL && info_ptr->valid & PNG_INFO_sBIT && - sig_bit != NULL) - { - png_debug1(1, "in %s retrieval function\n", "sBIT"); - *sig_bit = &(info_ptr->sig_bit); - return (PNG_INFO_sBIT); - } - return (0); -} -#endif - -#if defined(PNG_READ_tEXt_SUPPORTED) || defined(PNG_READ_zTXt_SUPPORTED) -png_uint_32 -png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr, - int *num_text) -{ - if (png_ptr != NULL && info_ptr != NULL && info_ptr->num_text > 0) - { - png_debug1(1, "in %s retrieval function\n", - (png_ptr->chunk_name[0] == '\0' ? "text" - : (png_const_charp)png_ptr->chunk_name)); - if (text_ptr != NULL) - *text_ptr = info_ptr->text; - if (num_text != NULL) - *num_text = info_ptr->num_text; - return ((png_uint_32)info_ptr->num_text); - } - return(0); -} -#endif - -#if defined(PNG_READ_tIME_SUPPORTED) -png_uint_32 -png_get_tIME(png_structp png_ptr, png_infop info_ptr, png_timep *mod_time) -{ - if (png_ptr != NULL && info_ptr != NULL && info_ptr->valid & PNG_INFO_tIME && - mod_time != NULL) - { - png_debug1(1, "in %s retrieval function\n", "tIME"); - *mod_time = &(info_ptr->mod_time); - return (PNG_INFO_tIME); - } - return (0); -} -#endif - -#if defined(PNG_READ_tRNS_SUPPORTED) -png_uint_32 -png_get_tRNS(png_structp png_ptr, png_infop info_ptr, - png_bytep *trans, int *num_trans, png_color_16p *trans_values) -{ - png_uint_32 retval = 0; - if (png_ptr != NULL && info_ptr != NULL && info_ptr->valid & PNG_INFO_tRNS) - { - png_debug1(1, "in %s retrieval function\n", "tRNS"); - if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - if (trans != NULL) - { - *trans = info_ptr->trans; - retval |= PNG_INFO_tRNS; - } - if (trans_values != NULL) - *trans_values = &(info_ptr->trans_values); - } - else /* if (info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) */ - { - if (trans_values != NULL) - { - *trans_values = &(info_ptr->trans_values); - retval |= PNG_INFO_tRNS; - } - if(trans != NULL) - *trans = NULL; - } - if(num_trans != NULL) - { - *num_trans = info_ptr->num_trans; - retval |= PNG_INFO_tRNS; - } - } - return (retval); -} -#endif - diff --git a/src/png/pngmem.c b/src/png/pngmem.c deleted file mode 100644 index b92fcc8ae0..0000000000 --- a/src/png/pngmem.c +++ /dev/null @@ -1,360 +0,0 @@ - -/* pngmem.c - stub functions for memory allocation - * - * libpng 1.0.1 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - * Copyright (c) 1996, 1997 Andreas Dilger - * Copyright (c) 1998, Glenn Randers-Pehrson - * March 15, 1998 - * - * This file provides a location for all memory allocation. Users which - * need special memory handling are expected to modify the code in this file - * to meet their needs. See the instructions at each function. - */ - -#define PNG_INTERNAL -#include "../png/png.h" - -/* The following "hides" PNG_MALLOC and PNG_FREE thus allowing the pngtest - application to put a wrapper on top of them. */ -#ifdef PNGTEST_MEMORY_DEBUG -#define PNG_MALLOC png_debug_malloc -#define PNG_FREE png_debug_free -#else -#define PNG_MALLOC png_malloc -#define PNG_FREE png_free -#endif - -/* Borland DOS special memory handler */ -#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) -/* if you change this, be sure to change the one in png.h also */ - -/* Allocate memory for a png_struct. The malloc and memset can be replaced - by a single call to calloc() if this is thought to improve performance. */ -png_voidp -png_create_struct(int type) -{ - png_size_t size; - png_voidp struct_ptr; - - if (type == PNG_STRUCT_INFO) - size = sizeof(png_info); - else if (type == PNG_STRUCT_PNG) - size = sizeof(png_struct); - else - return ((png_voidp)NULL); - - if ((struct_ptr = (png_voidp)farmalloc(size)) != NULL) - { - png_memset(struct_ptr, 0, size); - } - - return (struct_ptr); -} - - -/* Free memory allocated by a png_create_struct() call */ -void -png_destroy_struct(png_voidp struct_ptr) -{ - if (struct_ptr != NULL) - { - farfree (struct_ptr); - struct_ptr = NULL; - } -} - -/* Allocate memory. For reasonable files, size should never exceed - * 64K. However, zlib may allocate more then 64K if you don't tell - * it not to. See zconf.h and png.h for more information. zlib does - * need to allocate exactly 64K, so whatever you call here must - * have the ability to do that. - * - * Borland seems to have a problem in DOS mode for exactly 64K. - * It gives you a segment with an offset of 8 (perhaps to store it's - * memory stuff). zlib doesn't like this at all, so we have to - * detect and deal with it. This code should not be needed in - * Windows or OS/2 modes, and only in 16 bit mode. This code has - * been updated by Alexander Lehmann for version 0.89 to waste less - * memory. - * - * Note that we can't use png_size_t for the "size" declaration, - * since on some systems a png_size_t is a 16-bit quantity, and as a - * result, we would be truncating potentially larger memory requests - * (which should cause a fatal error) and introducing major problems. - */ -png_voidp -PNG_MALLOC(png_structp png_ptr, png_uint_32 size) -{ - png_voidp ret; - if (png_ptr == NULL || size == 0) - return ((png_voidp)NULL); - -#ifdef PNG_MAX_MALLOC_64K - if (size > (png_uint_32)65536L) - png_error(png_ptr, "Cannot Allocate > 64K"); -#endif - - if (size == (png_uint_32)65536L) - { - if (png_ptr->offset_table == NULL) - { - /* try to see if we need to do any of this fancy stuff */ - ret = farmalloc(size); - if (ret == NULL || ((png_size_t)ret & 0xffff)) - { - int num_blocks; - png_uint_32 total_size; - png_bytep table; - int i; - png_byte huge * hptr; - - if (ret != NULL) - { - farfree(ret); - ret = NULL; - } - - num_blocks = (int)(1 << (png_ptr->zlib_window_bits - 14)); - if (num_blocks < 1) - num_blocks = 1; - if (png_ptr->zlib_mem_level >= 7) - num_blocks += (int)(1 << (png_ptr->zlib_mem_level - 7)); - else - num_blocks++; - - total_size = ((png_uint_32)65536L) * (png_uint_32)num_blocks+16; - - table = farmalloc(total_size); - - if (table == NULL) - { - png_error(png_ptr, "Out Of Memory."); /* Note "O" and "M" */ - } - - if ((png_size_t)table & 0xfff0) - { - png_error(png_ptr, "Farmalloc didn't return normalized pointer"); - } - - png_ptr->offset_table = table; - png_ptr->offset_table_ptr = farmalloc(num_blocks * - sizeof (png_bytep)); - - if (png_ptr->offset_table_ptr == NULL) - { - png_error(png_ptr, "Out Of memory."); - } - - hptr = (png_byte huge *)table; - if ((png_size_t)hptr & 0xf) - { - hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L); - hptr += 16L; - } - for (i = 0; i < num_blocks; i++) - { - png_ptr->offset_table_ptr[i] = (png_bytep)hptr; - hptr += (png_uint_32)65536L; - } - - png_ptr->offset_table_number = num_blocks; - png_ptr->offset_table_count = 0; - png_ptr->offset_table_count_free = 0; - } - } - - if (png_ptr->offset_table_count >= png_ptr->offset_table_number) - png_error(png_ptr, "Out of Memory."); - - ret = png_ptr->offset_table_ptr[png_ptr->offset_table_count++]; - } - else - ret = farmalloc(size); - - if (ret == NULL) - { - png_error(png_ptr, "Out of memory."); /* Note "o" and "m" */ - } - - return (ret); -} - -/* free a pointer allocated by PNG_MALLOC(). In the default - configuration, png_ptr is not used, but is passed in case it - is needed. If ptr is NULL, return without taking any action. */ -void -PNG_FREE(png_structp png_ptr, png_voidp ptr) -{ - if (png_ptr == NULL || ptr == NULL) - return; - - if (png_ptr->offset_table != NULL) - { - int i; - - for (i = 0; i < png_ptr->offset_table_count; i++) - { - if (ptr == png_ptr->offset_table_ptr[i]) - { - ptr = NULL; - png_ptr->offset_table_count_free++; - break; - } - } - if (png_ptr->offset_table_count_free == png_ptr->offset_table_count) - { - farfree(png_ptr->offset_table); - farfree(png_ptr->offset_table_ptr); - png_ptr->offset_table = NULL; - png_ptr->offset_table_ptr = NULL; - } - } - - if (ptr != NULL) - { - farfree(ptr); - ptr = NULL; - } -} - -#else /* Not the Borland DOS special memory handler */ - -/* Allocate memory for a png_struct or a png_info. The malloc and - memset can be replaced by a single call to calloc() if this is thought - to improve performance noticably.*/ -png_voidp -png_create_struct(int type) -{ - png_size_t size; - png_voidp struct_ptr; - - if (type == PNG_STRUCT_INFO) - size = sizeof(png_info); - else if (type == PNG_STRUCT_PNG) - size = sizeof(png_struct); - else - return ((png_voidp)NULL); - -#if defined(__TURBOC__) && !defined(__FLAT__) - if ((struct_ptr = (png_voidp)farmalloc(size)) != NULL) -#else -# if defined(_MSC_VER) && defined(MAXSEG_64K) - if ((struct_ptr = (png_voidp)halloc(size,1)) != NULL) -# else - if ((struct_ptr = (png_voidp)malloc(size)) != NULL) -# endif -#endif - { - png_memset(struct_ptr, 0, size); - } - - return (struct_ptr); -} - - -/* Free memory allocated by a png_create_struct() call */ -void -png_destroy_struct(png_voidp struct_ptr) -{ - if (struct_ptr != NULL) - { -#if defined(__TURBOC__) && !defined(__FLAT__) - farfree(struct_ptr); -#else -# if defined(_MSC_VER) && defined(MAXSEG_64K) - hfree(struct_ptr); -# else - free(struct_ptr); -# endif -#endif - } -} - - -/* Allocate memory. For reasonable files, size should never exceed - 64K. However, zlib may allocate more then 64K if you don't tell - it not to. See zconf.h and png.h for more information. zlib does - need to allocate exactly 64K, so whatever you call here must - have the ability to do that. */ - -png_voidp -PNG_MALLOC(png_structp png_ptr, png_uint_32 size) -{ - png_voidp ret; - - if (png_ptr == NULL || size == 0) - return ((png_voidp)NULL); - -#ifdef PNG_MAX_MALLOC_64K - if (size > (png_uint_32)65536L) - png_error(png_ptr, "Cannot Allocate > 64K"); -#endif - -#if defined(__TURBOC__) && !defined(__FLAT__) - ret = farmalloc(size); -#else -# if defined(_MSC_VER) && defined(MAXSEG_64K) - ret = halloc(size, 1); -# else - ret = malloc((size_t)size); -# endif -#endif - - if (ret == NULL) - { - png_error(png_ptr, "Out of Memory"); - } - - return (ret); -} - -/* Free a pointer allocated by PNG_MALLOC(). In the default - configuration, png_ptr is not used, but is passed in case it - is needed. If ptr is NULL, return without taking any action. */ -void -PNG_FREE(png_structp png_ptr, png_voidp ptr) -{ - if (png_ptr == NULL || ptr == NULL) - return; - -#if defined(__TURBOC__) && !defined(__FLAT__) - farfree(ptr); -#else -# if defined(_MSC_VER) && defined(MAXSEG_64K) - hfree(ptr); -# else - free(ptr); -# endif -#endif -} - -#endif /* Not Borland DOS special memory handler */ - -png_voidp -png_memcpy_check (png_structp png_ptr, png_voidp s1, png_voidp s2, - png_uint_32 length) -{ - png_size_t size; - - size = (png_size_t)length; - if ((png_uint_32)size != length) - png_error(png_ptr,"Overflow in png_memcpy_check."); - - return(png_memcpy (s1, s2, size)); -} - -png_voidp -png_memset_check (png_structp png_ptr, png_voidp s1, int value, - png_uint_32 length) -{ - png_size_t size; - - size = (png_size_t)length; - if ((png_uint_32)size != length) - png_error(png_ptr,"Overflow in png_memset_check."); - - return (png_memset (s1, value, size)); - -} diff --git a/src/png/pngpread.c b/src/png/pngpread.c deleted file mode 100644 index 897140d9dc..0000000000 --- a/src/png/pngpread.c +++ /dev/null @@ -1,1143 +0,0 @@ - -/* pngpread.c - read a png file in push mode - * - * libpng 1.0.1 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - * Copyright (c) 1996, 1997 Andreas Dilger - * Copyright (c) 1998, Glenn Randers-Pehrson - * March 15, 1998 - */ - -#define PNG_INTERNAL -#include "../png/png.h" - -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED - -void -png_process_data(png_structp png_ptr, png_infop info_ptr, - png_bytep buffer, png_size_t buffer_size) -{ - png_push_restore_buffer(png_ptr, buffer, buffer_size); - - while (png_ptr->buffer_size) - { - png_process_some_data(png_ptr, info_ptr); - } -} - -/* What we do with the incoming data depends on what we were previously - * doing before we ran out of data... - */ -void -png_process_some_data(png_structp png_ptr, png_infop info_ptr) -{ - switch (png_ptr->process_mode) - { - case PNG_READ_SIG_MODE: - { - png_push_read_sig(png_ptr, info_ptr); - break; - } - case PNG_READ_CHUNK_MODE: - { - png_push_read_chunk(png_ptr, info_ptr); - break; - } - case PNG_READ_IDAT_MODE: - { - png_push_read_IDAT(png_ptr); - break; - } -#if defined(PNG_READ_tEXt_SUPPORTED) - case PNG_READ_tEXt_MODE: - { - png_push_read_tEXt(png_ptr, info_ptr); - break; - } -#endif -#if defined(PNG_READ_zTXt_SUPPORTED) - case PNG_READ_zTXt_MODE: - { - png_push_read_zTXt(png_ptr, info_ptr); - break; - } -#endif - case PNG_SKIP_MODE: - { - png_push_crc_finish(png_ptr); - break; - } - default: - { - png_ptr->buffer_size = 0; - break; - } - } -} - -/* Read any remaining signature bytes from the stream and compare them with - * the correct PNG signature. It is possible that this routine is called - * with bytes already read from the signature, whether because they have been - * checked by the calling application, or from multiple calls to this routine. - */ -void -png_push_read_sig(png_structp png_ptr, png_infop info_ptr) -{ - png_size_t num_checked = png_ptr->sig_bytes, - num_to_check = 8 - num_checked; - - if (png_ptr->buffer_size < num_to_check) - { - num_to_check = png_ptr->buffer_size; - } - - png_push_fill_buffer(png_ptr, &(info_ptr->signature[num_checked]), - num_to_check); - png_ptr->sig_bytes += num_to_check; - - if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check)) - { - if (num_checked < 4 && - png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4)) - png_error(png_ptr, "Not a PNG file"); - else - png_error(png_ptr, "PNG file corrupted by ASCII conversion"); - } - else - { - if (png_ptr->sig_bytes >= 8) - { - png_ptr->process_mode = PNG_READ_CHUNK_MODE; - } - } -} - -void -png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) -{ - /* First we make sure we have enough data for the 4 byte chunk name - * and the 4 byte chunk length before proceeding with decoding the - * chunk data. To fully decode each of these chunks, we also make - * sure we have enough data in the buffer for the 4 byte CRC at the - * end of every chunk (except IDAT, which is handled separately). - */ - if (!(png_ptr->flags & PNG_FLAG_HAVE_CHUNK_HEADER)) - { - png_byte chunk_length[4]; - - if (png_ptr->buffer_size < 8) - { - png_push_save_buffer(png_ptr); - return; - } - - png_push_fill_buffer(png_ptr, chunk_length, 4); - png_ptr->push_length = png_get_uint_32(chunk_length); - png_reset_crc(png_ptr); - png_crc_read(png_ptr, png_ptr->chunk_name, 4); - png_ptr->flags |= PNG_FLAG_HAVE_CHUNK_HEADER; - } - - if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_IHDR(png_ptr, info_ptr, png_ptr->push_length); - } - else if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_PLTE(png_ptr, info_ptr, png_ptr->push_length); - } - else if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) - { - /* If we reach an IDAT chunk, this means we have read all of the - * header chunks, and we can start reading the image (or if this - * is called after the image has been read - we have an error). - */ - if (png_ptr->mode & PNG_HAVE_IDAT) - { - if (png_ptr->push_length == 0) - return; - - if (png_ptr->mode & PNG_AFTER_IDAT) - png_error(png_ptr, "Too many IDAT's found"); - } - - png_ptr->idat_size = png_ptr->push_length; - png_ptr->mode |= PNG_HAVE_IDAT; - png_ptr->process_mode = PNG_READ_IDAT_MODE; - png_push_have_info(png_ptr, info_ptr); - png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes; - png_ptr->zstream.next_out = png_ptr->row_buf; - return; - } - else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_IEND(png_ptr, info_ptr, png_ptr->push_length); - png_ptr->process_mode = PNG_READ_DONE_MODE; - png_push_have_end(png_ptr, info_ptr); - } -#if defined(PNG_READ_gAMA_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_gAMA, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_gAMA(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_sBIT_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_sBIT, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_sBIT(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_cHRM_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_cHRM, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_cHRM(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_sRGB_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_sRGB, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_sRGB(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_tRNS_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_tRNS, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_tRNS(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_bKGD_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_bKGD, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_bKGD(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_hIST_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_hIST, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_hIST(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_pHYs_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_pHYs, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_pHYs(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_oFFs_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_oFFs, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_oFFs(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_pCAL_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_pCAL, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_pCAL(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_tIME_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_tIME, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - - png_handle_tIME(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_tEXt_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_tEXt, 4)) - { - png_push_handle_tEXt(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_zTXt_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_zTXt, 4)) - { - png_push_handle_zTXt(png_ptr, info_ptr, png_ptr->push_length); - } -#endif - else - { - png_push_handle_unknown(png_ptr, info_ptr, png_ptr->push_length); - } - - png_ptr->flags &= ~PNG_FLAG_HAVE_CHUNK_HEADER; -} - -void -png_push_crc_skip(png_structp png_ptr, png_uint_32 skip) -{ - png_ptr->process_mode = PNG_SKIP_MODE; - png_ptr->skip_length = skip; -} - -void -png_push_crc_finish(png_structp png_ptr) -{ - if (png_ptr->skip_length && png_ptr->save_buffer_size) - { - png_size_t save_size; - - if (png_ptr->skip_length < (png_uint_32)png_ptr->save_buffer_size) - save_size = (png_size_t)png_ptr->skip_length; - else - save_size = png_ptr->save_buffer_size; - - png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size); - - png_ptr->skip_length -= save_size; - png_ptr->buffer_size -= save_size; - png_ptr->save_buffer_size -= save_size; - png_ptr->save_buffer_ptr += save_size; - } - if (png_ptr->skip_length && png_ptr->current_buffer_size) - { - png_size_t save_size; - - if (png_ptr->skip_length < (png_uint_32)png_ptr->current_buffer_size) - save_size = (png_size_t)png_ptr->skip_length; - else - save_size = png_ptr->current_buffer_size; - - png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size); - - png_ptr->skip_length -= save_size; - png_ptr->buffer_size -= save_size; - png_ptr->current_buffer_size -= save_size; - png_ptr->current_buffer_ptr += save_size; - } - if (!png_ptr->skip_length) - { - if (png_ptr->buffer_size < 4) - { - png_push_save_buffer(png_ptr); - return; - } - - png_crc_finish(png_ptr, 0); - png_ptr->process_mode = PNG_READ_CHUNK_MODE; - } -} - -void -png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length) -{ - png_bytep ptr; - - ptr = buffer; - if (png_ptr->save_buffer_size) - { - png_size_t save_size; - - if (length < png_ptr->save_buffer_size) - save_size = length; - else - save_size = png_ptr->save_buffer_size; - - png_memcpy(ptr, png_ptr->save_buffer_ptr, save_size); - length -= save_size; - ptr += save_size; - png_ptr->buffer_size -= save_size; - png_ptr->save_buffer_size -= save_size; - png_ptr->save_buffer_ptr += save_size; - } - if (length && png_ptr->current_buffer_size) - { - png_size_t save_size; - - if (length < png_ptr->current_buffer_size) - save_size = length; - else - save_size = png_ptr->current_buffer_size; - - png_memcpy(ptr, png_ptr->current_buffer_ptr, save_size); - png_ptr->buffer_size -= save_size; - png_ptr->current_buffer_size -= save_size; - png_ptr->current_buffer_ptr += save_size; - } -} - -void -png_push_save_buffer(png_structp png_ptr) -{ - if (png_ptr->save_buffer_size) - { - if (png_ptr->save_buffer_ptr != png_ptr->save_buffer) - { - png_size_t i; - png_bytep sp; - png_bytep dp; - - for (i = 0, sp = png_ptr->save_buffer_ptr, dp = png_ptr->save_buffer; - i < png_ptr->save_buffer_size; - i++, sp++, dp++) - { - *dp = *sp; - } - } - } - if (png_ptr->save_buffer_size + png_ptr->current_buffer_size > - png_ptr->save_buffer_max) - { - png_size_t new_max; - png_bytep old_buffer; - - new_max = png_ptr->save_buffer_size + png_ptr->current_buffer_size + 256; - old_buffer = png_ptr->save_buffer; - png_ptr->save_buffer = (png_bytep)png_malloc(png_ptr, - (png_uint_32)new_max); - png_memcpy(png_ptr->save_buffer, old_buffer, png_ptr->save_buffer_size); - png_free(png_ptr, old_buffer); - png_ptr->save_buffer_max = new_max; - } - if (png_ptr->current_buffer_size) - { - png_memcpy(png_ptr->save_buffer + png_ptr->save_buffer_size, - png_ptr->current_buffer_ptr, png_ptr->current_buffer_size); - png_ptr->save_buffer_size += png_ptr->current_buffer_size; - png_ptr->current_buffer_size = 0; - } - png_ptr->save_buffer_ptr = png_ptr->save_buffer; - png_ptr->buffer_size = 0; -} - -void -png_push_restore_buffer(png_structp png_ptr, png_bytep buffer, - png_size_t buffer_length) -{ - png_ptr->current_buffer = buffer; - png_ptr->current_buffer_size = buffer_length; - png_ptr->buffer_size = buffer_length + png_ptr->save_buffer_size; - png_ptr->current_buffer_ptr = png_ptr->current_buffer; -} - -void -png_push_read_IDAT(png_structp png_ptr) -{ - if (!(png_ptr->flags & PNG_FLAG_HAVE_CHUNK_HEADER)) - { - png_byte chunk_length[4]; - - if (png_ptr->buffer_size < 8) - { - png_push_save_buffer(png_ptr); - return; - } - - png_push_fill_buffer(png_ptr, chunk_length, 4); - png_ptr->push_length = png_get_uint_32(chunk_length); - - png_reset_crc(png_ptr); - png_crc_read(png_ptr, png_ptr->chunk_name, 4); - png_ptr->flags |= PNG_FLAG_HAVE_CHUNK_HEADER; - - if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) - { - png_ptr->process_mode = PNG_READ_CHUNK_MODE; - if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) - png_error(png_ptr, "Not enough compressed data"); - return; - } - - png_ptr->idat_size = png_ptr->push_length; - } - if (png_ptr->idat_size && png_ptr->save_buffer_size) - { - png_size_t save_size; - - if (png_ptr->idat_size < (png_uint_32)png_ptr->save_buffer_size) - { - save_size = (png_size_t)png_ptr->idat_size; - /* check for overflow */ - if((png_uint_32)save_size != png_ptr->idat_size) - png_error(png_ptr, "save_size overflowed in pngpread"); - } - else - save_size = png_ptr->save_buffer_size; - - png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size); - png_process_IDAT_data(png_ptr, png_ptr->save_buffer_ptr, save_size); - - png_ptr->idat_size -= save_size; - png_ptr->buffer_size -= save_size; - png_ptr->save_buffer_size -= save_size; - png_ptr->save_buffer_ptr += save_size; - } - if (png_ptr->idat_size && png_ptr->current_buffer_size) - { - png_size_t save_size; - - if (png_ptr->idat_size < (png_uint_32)png_ptr->current_buffer_size) - { - save_size = (png_size_t)png_ptr->idat_size; - /* check for overflow */ - if((png_uint_32)save_size != png_ptr->idat_size) - png_error(png_ptr, "save_size overflowed in pngpread"); - } - else - save_size = png_ptr->current_buffer_size; - - png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size); - png_process_IDAT_data(png_ptr, png_ptr->current_buffer_ptr, save_size); - - png_ptr->idat_size -= save_size; - png_ptr->buffer_size -= save_size; - png_ptr->current_buffer_size -= save_size; - png_ptr->current_buffer_ptr += save_size; - } - if (!png_ptr->idat_size) - { - if (png_ptr->buffer_size < 4) - { - png_push_save_buffer(png_ptr); - return; - } - - png_crc_finish(png_ptr, 0); - png_ptr->flags &= ~PNG_FLAG_HAVE_CHUNK_HEADER; - } -} - -void -png_process_IDAT_data(png_structp png_ptr, png_bytep buffer, - png_size_t buffer_length) -{ - int ret; - - if ((png_ptr->flags & PNG_FLAG_ZLIB_FINISHED) && buffer_length) - png_error(png_ptr, "Extra compression data"); - - png_ptr->zstream.next_in = buffer; - png_ptr->zstream.avail_in = (uInt)buffer_length; - for(;;) - { - ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); - if (ret == Z_STREAM_END) - { - if (png_ptr->zstream.avail_in) - png_error(png_ptr, "Extra compressed data"); - if (!(png_ptr->zstream.avail_out)) - { - png_push_process_row(png_ptr); - } - - png_ptr->mode |= PNG_AFTER_IDAT; - png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; - break; - } - else if (ret == Z_BUF_ERROR) - break; - else if (ret != Z_OK) - png_error(png_ptr, "Decompression Error"); - if (!(png_ptr->zstream.avail_out)) - { - png_push_process_row(png_ptr); - png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes; - png_ptr->zstream.next_out = png_ptr->row_buf; - } - else - break; - } -} - -void -png_push_process_row(png_structp png_ptr) -{ - png_ptr->row_info.color_type = png_ptr->color_type; - png_ptr->row_info.width = png_ptr->iwidth; - png_ptr->row_info.channels = png_ptr->channels; - png_ptr->row_info.bit_depth = png_ptr->bit_depth; - png_ptr->row_info.pixel_depth = png_ptr->pixel_depth; - - png_ptr->row_info.rowbytes = ((png_ptr->row_info.width * - (png_uint_32)png_ptr->row_info.pixel_depth + 7) >> 3); - - png_read_filter_row(png_ptr, &(png_ptr->row_info), - png_ptr->row_buf + 1, png_ptr->prev_row + 1, - (int)(png_ptr->row_buf[0])); - - png_memcpy_check(png_ptr, png_ptr->prev_row, png_ptr->row_buf, - png_ptr->rowbytes + 1); - - if (png_ptr->transformations) - png_do_read_transformations(png_ptr); - -#if defined(PNG_READ_INTERLACING_SUPPORTED) - /* blow up interlaced rows to full size */ - if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) - { - if (png_ptr->pass < 6) - png_do_read_interlace(&(png_ptr->row_info), - png_ptr->row_buf + 1, png_ptr->pass, png_ptr->transformations); - - switch (png_ptr->pass) - { - case 0: - { - int i; - for (i = 0; i < 8 && png_ptr->pass == 0; i++) - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - } - break; - } - case 1: - { - int i; - for (i = 0; i < 8 && png_ptr->pass == 1; i++) - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - } - if (png_ptr->pass == 2) - { - for (i = 0; i < 4 && png_ptr->pass == 2; i++) - { - png_push_have_row(png_ptr, NULL); - png_read_push_finish_row(png_ptr); - } - } - break; - } - case 2: - { - int i; - for (i = 0; i < 4 && png_ptr->pass == 2; i++) - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - } - for (i = 0; i < 4 && png_ptr->pass == 2; i++) - { - png_push_have_row(png_ptr, NULL); - png_read_push_finish_row(png_ptr); - } - break; - } - case 3: - { - int i; - for (i = 0; i < 4 && png_ptr->pass == 3; i++) - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - } - if (png_ptr->pass == 4) - { - for (i = 0; i < 2 && png_ptr->pass == 4; i++) - { - png_push_have_row(png_ptr, NULL); - png_read_push_finish_row(png_ptr); - } - } - break; - } - case 4: - { - int i; - for (i = 0; i < 2 && png_ptr->pass == 4; i++) - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - } - for (i = 0; i < 2 && png_ptr->pass == 4; i++) - { - png_push_have_row(png_ptr, NULL); - png_read_push_finish_row(png_ptr); - } - break; - } - case 5: - { - int i; - for (i = 0; i < 2 && png_ptr->pass == 5; i++) - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - } - if (png_ptr->pass == 6) - { - png_push_have_row(png_ptr, NULL); - png_read_push_finish_row(png_ptr); - } - break; - } - case 6: - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - if (png_ptr->pass != 6) - break; - png_push_have_row(png_ptr, NULL); - png_read_push_finish_row(png_ptr); - } - } - } - else -#endif - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - } -} - -void -png_read_push_finish_row(png_structp png_ptr) -{ - png_ptr->row_number++; - if (png_ptr->row_number < png_ptr->num_rows) - return; - - if (png_ptr->interlaced) - { - png_ptr->row_number = 0; - png_memset_check(png_ptr, png_ptr->prev_row, 0, - png_ptr->rowbytes + 1); - do - { - png_ptr->pass++; - if (png_ptr->pass >= 7) - break; - png_ptr->iwidth = (png_ptr->width + - png_pass_inc[png_ptr->pass] - 1 - - png_pass_start[png_ptr->pass]) / - png_pass_inc[png_ptr->pass]; - - png_ptr->irowbytes = ((png_ptr->iwidth * - png_ptr->pixel_depth + 7) >> 3) + 1; - - if (!(png_ptr->transformations & PNG_INTERLACE)) - { - png_ptr->num_rows = (png_ptr->height + - png_pass_yinc[png_ptr->pass] - 1 - - png_pass_ystart[png_ptr->pass]) / - png_pass_yinc[png_ptr->pass]; - if (!(png_ptr->num_rows)) - continue; - } - if (png_ptr->transformations & PNG_INTERLACE) - break; - } while (png_ptr->iwidth == 0); - } -} - -#if defined(PNG_READ_tEXt_SUPPORTED) -void -png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - if (png_ptr->mode == PNG_BEFORE_IHDR || png_ptr->mode & PNG_HAVE_IEND) - { - png_error(png_ptr, "Out of place tEXt"); - /* to quiet some compiler warnings */ - if(info_ptr == NULL) return; - } - -#ifdef PNG_MAX_MALLOC_64K - png_ptr->skip_length = 0; /* This may not be necessary */ - - if (length > (png_uint_32)65535L) /* Can't hold the entire string in memory */ - { - png_warning(png_ptr, "tEXt chunk too large to fit in memory"); - png_ptr->skip_length = length - (png_uint_32)65535L; - length = (png_uint_32)65535L; - } -#endif - - png_ptr->current_text = (png_charp)png_malloc(png_ptr, - (png_uint_32)(length+1)); - png_ptr->current_text[length] = '\0'; - png_ptr->current_text_ptr = png_ptr->current_text; - png_ptr->current_text_size = (png_size_t)length; - png_ptr->current_text_left = (png_size_t)length; - png_ptr->process_mode = PNG_READ_tEXt_MODE; -} - -void -png_push_read_tEXt(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr->buffer_size && png_ptr->current_text_left) - { - png_size_t text_size; - - if (png_ptr->buffer_size < png_ptr->current_text_left) - text_size = png_ptr->buffer_size; - else - text_size = png_ptr->current_text_left; - png_crc_read(png_ptr, (png_bytep)png_ptr->current_text_ptr, text_size); - png_ptr->current_text_left -= text_size; - png_ptr->current_text_ptr += text_size; - } - if (!(png_ptr->current_text_left)) - { - png_textp text_ptr; - png_charp text; - png_charp key; - - if (png_ptr->buffer_size < 4) - { - png_push_save_buffer(png_ptr); - return; - } - - png_push_crc_finish(png_ptr); - -#if defined(PNG_MAX_MALLOC_64K) - if (png_ptr->skip_length) - return; -#endif - - key = png_ptr->current_text; - png_ptr->current_text = 0; - - for (text = key; *text; text++) - /* empty loop */ ; - - if (text != key + png_ptr->current_text_size) - text++; - - text_ptr = (png_textp)png_malloc(png_ptr, (png_uint_32)sizeof(png_text)); - text_ptr->compression = PNG_TEXT_COMPRESSION_NONE; - text_ptr->key = key; - text_ptr->text = text; - - png_set_text(png_ptr, info_ptr, text_ptr, 1); - - png_free(png_ptr, text_ptr); - } -} -#endif - -#if defined(PNG_READ_zTXt_SUPPORTED) -void -png_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - if (png_ptr->mode == PNG_BEFORE_IHDR || png_ptr->mode & PNG_HAVE_IEND) - { - png_error(png_ptr, "Out of place zTXt"); - /* to quiet some compiler warnings */ - if(info_ptr == NULL) return; - } - -#ifdef PNG_MAX_MALLOC_64K - /* We can't handle zTXt chunks > 64K, since we don't have enough space - * to be able to store the uncompressed data. Actually, the threshold - * is probably around 32K, but it isn't as definite as 64K is. - */ - if (length > (png_uint_32)65535L) - { - png_warning(png_ptr, "zTXt chunk too large to fit in memory"); - png_push_crc_skip(png_ptr, length); - return; - } -#endif - - png_ptr->current_text = (png_charp)png_malloc(png_ptr, - (png_uint_32)(length+1)); - png_ptr->current_text[length] = '\0'; - png_ptr->current_text_ptr = png_ptr->current_text; - png_ptr->current_text_size = (png_size_t)length; - png_ptr->current_text_left = (png_size_t)length; - png_ptr->process_mode = PNG_READ_zTXt_MODE; -} - -void -png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr->buffer_size && png_ptr->current_text_left) - { - png_size_t text_size; - - if (png_ptr->buffer_size < (png_uint_32)png_ptr->current_text_left) - text_size = png_ptr->buffer_size; - else - text_size = png_ptr->current_text_left; - png_crc_read(png_ptr, (png_bytep)png_ptr->current_text_ptr, text_size); - png_ptr->current_text_left -= text_size; - png_ptr->current_text_ptr += text_size; - } - if (!(png_ptr->current_text_left)) - { - png_textp text_ptr; - png_charp text; - png_charp key; - int ret; - png_size_t text_size, key_size; - - if (png_ptr->buffer_size < 4) - { - png_push_save_buffer(png_ptr); - return; - } - - png_push_crc_finish(png_ptr); - - key = png_ptr->current_text; - png_ptr->current_text = 0; - - for (text = key; *text; text++) - /* empty loop */ ; - - /* zTXt can't have zero text */ - if (text == key + png_ptr->current_text_size) - { - png_free(png_ptr, key); - return; - } - - text++; - - if (*text != PNG_TEXT_COMPRESSION_zTXt) /* check compression byte */ - { - png_free(png_ptr, key); - return; - } - - text++; - - png_ptr->zstream.next_in = (png_bytep )text; - png_ptr->zstream.avail_in = (uInt)(png_ptr->current_text_size - - (text - key)); - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - - key_size = text - key; - text_size = 0; - text = NULL; - ret = Z_STREAM_END; - - while (png_ptr->zstream.avail_in) - { - ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); - if (ret != Z_OK && ret != Z_STREAM_END) - { - inflateReset(&png_ptr->zstream); - png_ptr->zstream.avail_in = 0; - png_free(png_ptr, key); - png_free(png_ptr, text); - return; - } - if (!(png_ptr->zstream.avail_out) || ret == Z_STREAM_END) - { - if (text == NULL) - { - text = (png_charp)png_malloc(png_ptr, - (png_uint_32)(png_ptr->zbuf_size - png_ptr->zstream.avail_out + - key_size + 1)); - png_memcpy(text + key_size, png_ptr->zbuf, - png_ptr->zbuf_size - png_ptr->zstream.avail_out); - png_memcpy(text, key, key_size); - text_size = key_size + png_ptr->zbuf_size - - png_ptr->zstream.avail_out; - *(text + text_size) = '\0'; - } - else - { - png_charp tmp; - - tmp = text; - text = (png_charp)png_malloc(png_ptr, text_size + - (png_uint_32)(png_ptr->zbuf_size - png_ptr->zstream.avail_out - + 1)); - png_memcpy(text, tmp, text_size); - png_free(png_ptr, tmp); - png_memcpy(text + text_size, png_ptr->zbuf, - png_ptr->zbuf_size - png_ptr->zstream.avail_out); - text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out; - *(text + text_size) = '\0'; - } - if (ret != Z_STREAM_END) - { - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - } - } - else - { - break; - } - - if (ret == Z_STREAM_END) - break; - } - - inflateReset(&png_ptr->zstream); - png_ptr->zstream.avail_in = 0; - - if (ret != Z_STREAM_END) - { - png_free(png_ptr, key); - png_free(png_ptr, text); - return; - } - - png_free(png_ptr, key); - key = text; - text += key_size; - - text_ptr = (png_textp)png_malloc(png_ptr, (png_uint_32)sizeof(png_text)); - text_ptr->compression = PNG_TEXT_COMPRESSION_zTXt; - text_ptr->key = key; - text_ptr->text = text; - - png_set_text(png_ptr, info_ptr, text_ptr, 1); - - png_free(png_ptr, text_ptr); - } -} -#endif - -/* This function is called when we haven't found a handler for this - * chunk. In the future we will have code here which can handle - * user-defined callback functions for unknown chunks before they are - * ignored or cause an error. If there isn't a problem with the - * chunk itself (ie a bad chunk name or a critical chunk), the chunk - * is (currently) silently ignored. - */ -void -png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_check_chunk_name(png_ptr, png_ptr->chunk_name); - - if (!(png_ptr->chunk_name[0] & 0x20)) - { - png_chunk_error(png_ptr, "unknown critical chunk"); - /* to quiet some compiler warnings */ - if(info_ptr == NULL) return; - } - - png_push_crc_skip(png_ptr, length); -} - -void -png_push_have_info(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr->info_fn != NULL) - (*(png_ptr->info_fn))(png_ptr, info_ptr); -} - -void -png_push_have_end(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr->end_fn != NULL) - (*(png_ptr->end_fn))(png_ptr, info_ptr); -} - -void -png_push_have_row(png_structp png_ptr, png_bytep row) -{ - if (png_ptr->row_fn != NULL) - (*(png_ptr->row_fn))(png_ptr, row, png_ptr->row_number, - (int)png_ptr->pass); -} - -void -png_progressive_combine_row (png_structp png_ptr, - png_bytep old_row, png_bytep new_row) -{ - if (new_row != NULL) - png_combine_row(png_ptr, old_row, png_pass_dsp_mask[png_ptr->pass]); -} - -void -png_set_progressive_read_fn(png_structp png_ptr, png_voidp progressive_ptr, - png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, - png_progressive_end_ptr end_fn) -{ - png_ptr->info_fn = info_fn; - png_ptr->row_fn = row_fn; - png_ptr->end_fn = end_fn; - - png_set_read_fn(png_ptr, progressive_ptr, png_push_fill_buffer); -} - -png_voidp -png_get_progressive_ptr(png_structp png_ptr) -{ - return png_ptr->io_ptr; -} - -#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ - diff --git a/src/png/pngread.c b/src/png/pngread.c deleted file mode 100644 index 714f5f1429..0000000000 --- a/src/png/pngread.c +++ /dev/null @@ -1,787 +0,0 @@ - -/* pngread.c - read a PNG file - * - * libpng 1.0.1 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - * Copyright (c) 1996, 1997 Andreas Dilger - * Copyright (c) 1998, Glenn Randers-Pehrson - * March 15, 1998 - * - * This file contains routines that an application calls directly to - * read a PNG file or stream. - */ - -#define PNG_INTERNAL -#include "../png/png.h" - -/* Create a PNG structure for reading, and allocate any memory needed. */ -png_structp -png_create_read_struct(png_const_charp user_png_ver, voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn) -{ - png_structp png_ptr; -#ifdef USE_FAR_KEYWORD - jmp_buf jmpbuf; -#endif - png_debug(1, "in png_create_read_struct\n"); - if ((png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG)) == NULL) - { - return (png_structp)NULL; - } -#ifdef USE_FAR_KEYWORD - if (setjmp(jmpbuf)) -#else - if (setjmp(png_ptr->jmpbuf)) -#endif - { - png_free(png_ptr, png_ptr->zbuf); - png_destroy_struct(png_ptr); - return (png_structp)NULL; - } -#ifdef USE_FAR_KEYWORD - png_memcpy(png_ptr->jmpbuf,jmpbuf,sizeof(jmp_buf)); -#endif - png_set_error_fn(png_ptr, error_ptr, error_fn, warn_fn); - - /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so - * we must recompile any applications that use any older library version. - * For versions after libpng 1.0, we will be compatible, so we need - * only check the first digit. - */ - if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] || - (user_png_ver[0] == '0' && user_png_ver[2] < '9')) - { - png_error(png_ptr, - "Incompatible libpng version in application and library"); - } - - /* initialize zbuf - compression buffer */ - png_ptr->zbuf_size = PNG_ZBUF_SIZE; - png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, - (png_uint_32)png_ptr->zbuf_size); - png_ptr->zstream.zalloc = png_zalloc; - png_ptr->zstream.zfree = png_zfree; - png_ptr->zstream.opaque = (voidpf)png_ptr; - - switch (inflateInit(&png_ptr->zstream)) - { - case Z_OK: /* Do nothing */ break; - case Z_MEM_ERROR: - case Z_STREAM_ERROR: png_error(png_ptr, "zlib memory error"); break; - case Z_VERSION_ERROR: png_error(png_ptr, "zlib version error"); break; - default: png_error(png_ptr, "Unknown zlib error"); - } - - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - - png_set_read_fn(png_ptr, NULL, NULL); - - return (png_ptr); -} - -/* Initialize PNG structure for reading, and allocate any memory needed. - This interface is depreciated in favour of the png_create_read_struct(), - and it will eventually disappear. */ -void -png_read_init(png_structp png_ptr) -{ - jmp_buf tmp_jmp; /* to save current jump buffer */ - - png_debug(1, "in png_read_init\n"); - /* save jump buffer and error functions */ - png_memcpy(tmp_jmp, png_ptr->jmpbuf, sizeof (jmp_buf)); - - /* reset all variables to 0 */ - png_memset(png_ptr, 0, sizeof (png_struct)); - - /* restore jump buffer */ - png_memcpy(png_ptr->jmpbuf, tmp_jmp, sizeof (jmp_buf)); - - /* initialize zbuf - compression buffer */ - png_ptr->zbuf_size = PNG_ZBUF_SIZE; - png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, - (png_uint_32)png_ptr->zbuf_size); - png_ptr->zstream.zalloc = png_zalloc; - png_ptr->zstream.zfree = png_zfree; - png_ptr->zstream.opaque = (voidpf)png_ptr; - - switch (inflateInit(&png_ptr->zstream)) - { - case Z_OK: /* Do nothing */ break; - case Z_MEM_ERROR: - case Z_STREAM_ERROR: png_error(png_ptr, "zlib memory"); break; - case Z_VERSION_ERROR: png_error(png_ptr, "zlib version"); break; - default: png_error(png_ptr, "Unknown zlib error"); - } - - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - - png_set_read_fn(png_ptr, NULL, NULL); -} - -/* Read the information before the actual image data. This has been - * changed in v0.90 to allow reading a file that already has the magic - * bytes read from the stream. You can tell libpng how many bytes have - * been read from the beginning of the stream (up to the maxumum of 8) - * via png_set_sig_bytes(), and we will only check the remaining bytes - * here. The application can then have access to the signature bytes we - * read if it is determined that this isn't a valid PNG file. - */ -void -png_read_info(png_structp png_ptr, png_infop info_ptr) -{ - png_debug(1, "in png_read_info\n"); - /* save jump buffer and error functions */ - /* If we haven't checked all of the PNG signature bytes, do so now. */ - if (png_ptr->sig_bytes < 8) - { - png_size_t num_checked = png_ptr->sig_bytes, - num_to_check = 8 - num_checked; - - png_read_data(png_ptr, &(info_ptr->signature[num_checked]), num_to_check); - png_ptr->sig_bytes = 8; - - if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check)) - { - if (num_checked < 4 && - png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4)) - png_error(png_ptr, "Not a PNG file"); - else - png_error(png_ptr, "PNG file corrupted by ASCII conversion"); - } - } - - for(;;) - { - png_byte chunk_length[4]; - png_uint_32 length; - - png_read_data(png_ptr, chunk_length, 4); - length = png_get_uint_32(chunk_length); - - png_reset_crc(png_ptr); - png_crc_read(png_ptr, png_ptr->chunk_name, 4); - - png_debug1(0, "Reading %s chunk.\n", png_ptr->chunk_name); - - /* This should be a binary subdivision search or a hash for - * matching the chunk name rather than a linear search. - */ - if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4)) - png_handle_IHDR(png_ptr, info_ptr, length); - else if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4)) - png_handle_PLTE(png_ptr, info_ptr, length); - else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4)) - png_handle_IEND(png_ptr, info_ptr, length); - else if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) - { - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before IDAT"); - else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && - !(png_ptr->mode & PNG_HAVE_PLTE)) - png_error(png_ptr, "Missing PLTE before IDAT"); - - png_ptr->idat_size = length; - png_ptr->mode |= PNG_HAVE_IDAT; - break; - } -#if defined(PNG_READ_bKGD_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_bKGD, 4)) - png_handle_bKGD(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_cHRM_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_cHRM, 4)) - png_handle_cHRM(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_gAMA_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_gAMA, 4)) - png_handle_gAMA(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_hIST_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_hIST, 4)) - png_handle_hIST(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_oFFs_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_oFFs, 4)) - png_handle_oFFs(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_pCAL_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_pCAL, 4)) - png_handle_pCAL(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_pHYs_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_pHYs, 4)) - png_handle_pHYs(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_sBIT_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_sBIT, 4)) - png_handle_sBIT(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_sRGB_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_sRGB, 4)) - png_handle_sRGB(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_tEXt_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_tEXt, 4)) - png_handle_tEXt(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_tIME_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_tIME, 4)) - png_handle_tIME(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_tRNS_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_tRNS, 4)) - png_handle_tRNS(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_zTXt_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_zTXt, 4)) - png_handle_zTXt(png_ptr, info_ptr, length); -#endif - else - png_handle_unknown(png_ptr, info_ptr, length); - } -} - -/* optional call to update the users info_ptr structure */ -void -png_read_update_info(png_structp png_ptr, png_infop info_ptr) -{ - png_debug(1, "in png_read_update_info\n"); - /* save jump buffer and error functions */ - if (!(png_ptr->flags & PNG_FLAG_ROW_INIT)) - png_read_start_row(png_ptr); - png_read_transform_info(png_ptr, info_ptr); -} - -/* Initialize palette, background, etc, after transformations - * are set, but before any reading takes place. This allows - * the user to obtail a gamma corrected palette, for example. - * If the user doesn't call this, we will do it ourselves. - */ -void -png_start_read_image(png_structp png_ptr) -{ - png_debug(1, "in png_start_read_image\n"); - /* save jump buffer and error functions */ - if (!(png_ptr->flags & PNG_FLAG_ROW_INIT)) - png_read_start_row(png_ptr); -} - -void -png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) -{ - int ret; - png_debug2(1, "in png_read_row (row %d, pass %d)\n", - png_ptr->row_number, png_ptr->pass); - /* save jump buffer and error functions */ - if (!(png_ptr->flags & PNG_FLAG_ROW_INIT)) - png_read_start_row(png_ptr); - -#if defined(PNG_READ_INTERLACING_SUPPORTED) - /* if interlaced and we do not need a new row, combine row and return */ - if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) - { - switch (png_ptr->pass) - { - case 0: - if (png_ptr->row_number & 7) - { - if (dsp_row != NULL) - png_combine_row(png_ptr, dsp_row, - png_pass_dsp_mask[png_ptr->pass]); - png_read_finish_row(png_ptr); - return; - } - break; - case 1: - if ((png_ptr->row_number & 7) || png_ptr->width < 5) - { - if (dsp_row != NULL) - png_combine_row(png_ptr, dsp_row, - png_pass_dsp_mask[png_ptr->pass]); - png_read_finish_row(png_ptr); - return; - } - break; - case 2: - if ((png_ptr->row_number & 7) != 4) - { - if (dsp_row != NULL && (png_ptr->row_number & 4)) - png_combine_row(png_ptr, dsp_row, - png_pass_dsp_mask[png_ptr->pass]); - png_read_finish_row(png_ptr); - return; - } - break; - case 3: - if ((png_ptr->row_number & 3) || png_ptr->width < 3) - { - if (dsp_row != NULL) - png_combine_row(png_ptr, dsp_row, - png_pass_dsp_mask[png_ptr->pass]); - png_read_finish_row(png_ptr); - return; - } - break; - case 4: - if ((png_ptr->row_number & 3) != 2) - { - if (dsp_row != NULL && (png_ptr->row_number & 2)) - png_combine_row(png_ptr, dsp_row, - png_pass_dsp_mask[png_ptr->pass]); - png_read_finish_row(png_ptr); - return; - } - break; - case 5: - if ((png_ptr->row_number & 1) || png_ptr->width < 2) - { - if (dsp_row != NULL) - png_combine_row(png_ptr, dsp_row, - png_pass_dsp_mask[png_ptr->pass]); - png_read_finish_row(png_ptr); - return; - } - break; - case 6: - if (!(png_ptr->row_number & 1)) - { - png_read_finish_row(png_ptr); - return; - } - break; - } - } -#endif - - if (!(png_ptr->mode & PNG_HAVE_IDAT)) - png_error(png_ptr, "Invalid attempt to read row data"); - - png_ptr->zstream.next_out = png_ptr->row_buf; - png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes; - do - { - if (!(png_ptr->zstream.avail_in)) - { - while (!png_ptr->idat_size) - { - png_byte chunk_length[4]; - - png_crc_finish(png_ptr, 0); - - png_read_data(png_ptr, chunk_length, 4); - png_ptr->idat_size = png_get_uint_32(chunk_length); - - png_reset_crc(png_ptr); - png_crc_read(png_ptr, png_ptr->chunk_name, 4); - if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) - png_error(png_ptr, "Not enough image data"); - } - png_ptr->zstream.avail_in = (uInt)png_ptr->zbuf_size; - png_ptr->zstream.next_in = png_ptr->zbuf; - if (png_ptr->zbuf_size > png_ptr->idat_size) - png_ptr->zstream.avail_in = (uInt)png_ptr->idat_size; - png_crc_read(png_ptr, png_ptr->zbuf, - (png_size_t)png_ptr->zstream.avail_in); - png_ptr->idat_size -= png_ptr->zstream.avail_in; - } - ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); - if (ret == Z_STREAM_END) - { - if (png_ptr->zstream.avail_out || png_ptr->zstream.avail_in || - png_ptr->idat_size) - png_error(png_ptr, "Extra compressed data"); - png_ptr->mode |= PNG_AFTER_IDAT; - png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; - break; - } - if (ret != Z_OK) - png_error(png_ptr, png_ptr->zstream.msg ? png_ptr->zstream.msg : - "Decompression error"); - - } while (png_ptr->zstream.avail_out); - - png_ptr->row_info.color_type = png_ptr->color_type; - png_ptr->row_info.width = png_ptr->iwidth; - png_ptr->row_info.channels = png_ptr->channels; - png_ptr->row_info.bit_depth = png_ptr->bit_depth; - png_ptr->row_info.pixel_depth = png_ptr->pixel_depth; - { - png_ptr->row_info.rowbytes = ((png_ptr->row_info.width * - (png_uint_32)png_ptr->row_info.pixel_depth + 7) >> 3); - } - - png_read_filter_row(png_ptr, &(png_ptr->row_info), - png_ptr->row_buf + 1, png_ptr->prev_row + 1, - (int)(png_ptr->row_buf[0])); - - png_memcpy_check(png_ptr, png_ptr->prev_row, png_ptr->row_buf, - png_ptr->rowbytes + 1); - - if (png_ptr->transformations) - png_do_read_transformations(png_ptr); - -#if defined(PNG_READ_INTERLACING_SUPPORTED) - /* blow up interlaced rows to full size */ - if (png_ptr->interlaced && - (png_ptr->transformations & PNG_INTERLACE)) - { - if (png_ptr->pass < 6) - png_do_read_interlace(&(png_ptr->row_info), - png_ptr->row_buf + 1, png_ptr->pass, png_ptr->transformations); - - if (dsp_row != NULL) - png_combine_row(png_ptr, dsp_row, - png_pass_dsp_mask[png_ptr->pass]); - if (row != NULL) - png_combine_row(png_ptr, row, - png_pass_mask[png_ptr->pass]); - } - else -#endif - { - if (row != NULL) - png_combine_row(png_ptr, row, 0xff); - if (dsp_row != NULL) - png_combine_row(png_ptr, dsp_row, 0xff); - } - png_read_finish_row(png_ptr); - - if (png_ptr->read_row_fn != NULL) - (*(png_ptr->read_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass); -} - -/* Read one or more rows of image data. If the image is interlaced, - * and png_set_interlace_handling() has been called, the rows need to - * contain the contents of the rows from the previous pass. If the - * image has alpha or transparency, and png_handle_alpha() has been - * called, the rows contents must be initialized to the contents of the - * screen. - * - * "row" holds the actual image, and pixels are placed in it - * as they arrive. If the image is displayed after each pass, it will - * appear to "sparkle" in. "display_row" can be used to display a - * "chunky" progressive image, with finer detail added as it becomes - * available. If you do not want this "chunky" display, you may pass - * NULL for display_row. If you do not want the sparkle display, and - * you have not called png_handle_alpha(), you may pass NULL for rows. - * If you have called png_handle_alpha(), and the image has either an - * alpha channel or a transparency chunk, you must provide a buffer for - * rows. In this case, you do not have to provide a display_row buffer - * also, but you may. If the image is not interlaced, or if you have - * not called png_set_interlace_handling(), the display_row buffer will - * be ignored, so pass NULL to it. - */ - -void -png_read_rows(png_structp png_ptr, png_bytepp row, - png_bytepp display_row, png_uint_32 num_rows) -{ - png_uint_32 i; - png_bytepp rp; - png_bytepp dp; - - png_debug(1, "in png_read_rows\n"); - /* save jump buffer and error functions */ - rp = row; - dp = display_row; - for (i = 0; i < num_rows; i++) - { - png_bytep rptr; - png_bytep dptr; - - if (rp != NULL) - rptr = *rp; - else - rptr = NULL; - if (dp != NULL) - dptr = *dp; - else - dptr = NULL; - png_read_row(png_ptr, rptr, dptr); - if (row != NULL) - rp++; - if (display_row != NULL) - dp++; - } -} - -/* Read the entire image. If the image has an alpha channel or a tRNS - * chunk, and you have called png_handle_alpha(), you will need to - * initialize the image to the current image that PNG will be overlaying. - * We set the num_rows again here, in case it was incorrectly set in - * png_read_start_row() by a call to png_read_update_info() or - * png_start_read_image() if png_set_interlace_handling() wasn't called - * prior to either of these functions like it should have been. You can - * only call this function once. If you desire to have an image for - * each pass of a interlaced image, use png_read_rows() instead. - */ -void -png_read_image(png_structp png_ptr, png_bytepp image) -{ - png_uint_32 i; - int pass, j; - png_bytepp rp; - - png_debug(1, "in png_read_image\n"); - /* save jump buffer and error functions */ - pass = png_set_interlace_handling(png_ptr); - - png_ptr->num_rows = png_ptr->height; /* Make sure this is set correctly */ - - for (j = 0; j < pass; j++) - { - rp = image; - for (i = 0; i < png_ptr->height; i++) - { - png_read_row(png_ptr, *rp, NULL); - rp++; - } - } -} - -/* Read the end of the PNG file. Will not read past the end of the - * file, will verify the end is accurate, and will read any comments - * or time information at the end of the file, if info is not NULL. - */ -void -png_read_end(png_structp png_ptr, png_infop info_ptr) -{ - png_byte chunk_length[4]; - png_uint_32 length; - - png_debug(1, "in png_read_end\n"); - /* save jump buffer and error functions */ - png_crc_finish(png_ptr, 0); /* Finish off CRC from last IDAT chunk */ - - do - { - png_read_data(png_ptr, chunk_length, 4); - length = png_get_uint_32(chunk_length); - - png_reset_crc(png_ptr); - png_crc_read(png_ptr, png_ptr->chunk_name, 4); - - png_debug1(0, "Reading %s chunk.\n", png_ptr->chunk_name); - - if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4)) - png_handle_IHDR(png_ptr, info_ptr, length); - else if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) - { - /* Zero length IDATs are legal after the last IDAT has been - * read, but not after other chunks have been read. - */ - if (length > 0 || png_ptr->mode & PNG_AFTER_IDAT) - png_error(png_ptr, "Too many IDAT's found"); - else - png_crc_finish(png_ptr, 0); - } - else if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4)) - png_handle_PLTE(png_ptr, info_ptr, length); - else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4)) - png_handle_IEND(png_ptr, info_ptr, length); -#if defined(PNG_READ_bKGD_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_bKGD, 4)) - png_handle_bKGD(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_cHRM_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_cHRM, 4)) - png_handle_cHRM(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_gAMA_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_gAMA, 4)) - png_handle_gAMA(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_hIST_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_hIST, 4)) - png_handle_hIST(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_oFFs_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_oFFs, 4)) - png_handle_oFFs(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_pCAL_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_pCAL, 4)) - png_handle_pCAL(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_pHYs_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_pHYs, 4)) - png_handle_pHYs(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_sBIT_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_sBIT, 4)) - png_handle_sBIT(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_sRGB_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_sRGB, 4)) - png_handle_sRGB(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_tEXt_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_tEXt, 4)) - png_handle_tEXt(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_tIME_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_tIME, 4)) - png_handle_tIME(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_tRNS_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_tRNS, 4)) - png_handle_tRNS(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_zTXt_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_zTXt, 4)) - png_handle_zTXt(png_ptr, info_ptr, length); -#endif - else - png_handle_unknown(png_ptr, info_ptr, length); - } while (!(png_ptr->mode & PNG_HAVE_IEND)); -} - -/* free all memory used by the read */ -void -png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, - png_infopp end_info_ptr_ptr) -{ - png_structp png_ptr = NULL; - png_infop info_ptr = NULL, end_info_ptr = NULL; - - png_debug(1, "in png_destroy_read_struct\n"); - /* save jump buffer and error functions */ - if (png_ptr_ptr != NULL) - png_ptr = *png_ptr_ptr; - - if (info_ptr_ptr != NULL) - info_ptr = *info_ptr_ptr; - - if (end_info_ptr_ptr != NULL) - end_info_ptr = *end_info_ptr_ptr; - - png_read_destroy(png_ptr, info_ptr, end_info_ptr); - - if (info_ptr != NULL) - { -#if defined(PNG_READ_tEXt_SUPPORTED) || defined(PNG_READ_zTXt_SUPPORTED) - png_free(png_ptr, info_ptr->text); -#endif - png_destroy_struct((png_voidp)info_ptr); - *info_ptr_ptr = (png_infop)NULL; - } - - if (end_info_ptr != NULL) - { -#if defined(PNG_READ_tEXt_SUPPORTED) || defined(PNG_READ_zTXt_SUPPORTED) - png_free(png_ptr, end_info_ptr->text); -#endif - png_destroy_struct((png_voidp)end_info_ptr); - *end_info_ptr_ptr = (png_infop)NULL; - } - - if (png_ptr != NULL) - { - png_destroy_struct((png_voidp)png_ptr); - *png_ptr_ptr = (png_structp)NULL; - } -} - -/* free all memory used by the read (old method) */ -void -png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr) -{ - jmp_buf tmp_jmp; - png_error_ptr error_fn; - png_error_ptr warning_fn; - png_voidp error_ptr; - - png_debug(1, "in png_read_destroy\n"); - /* save jump buffer and error functions */ - if (info_ptr != NULL) - png_info_destroy(png_ptr, info_ptr); - - if (end_info_ptr != NULL) - png_info_destroy(png_ptr, end_info_ptr); - - png_free(png_ptr, png_ptr->zbuf); - png_free(png_ptr, png_ptr->row_buf); - png_free(png_ptr, png_ptr->prev_row); -#if defined(PNG_READ_DITHER_SUPPORTED) - png_free(png_ptr, png_ptr->palette_lookup); - png_free(png_ptr, png_ptr->dither_index); -#endif -#if defined(PNG_READ_GAMMA_SUPPORTED) - png_free(png_ptr, png_ptr->gamma_table); -#endif -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - png_free(png_ptr, png_ptr->gamma_from_1); - png_free(png_ptr, png_ptr->gamma_to_1); -#endif - if (png_ptr->flags & PNG_FLAG_FREE_PALETTE) - png_zfree(png_ptr, png_ptr->palette); - if (png_ptr->flags & PNG_FLAG_FREE_TRANS) - png_free(png_ptr, png_ptr->trans); -#if defined(PNG_READ_hIST_SUPPORTED) - if (png_ptr->flags & PNG_FLAG_FREE_HIST) - png_free(png_ptr, png_ptr->hist); -#endif -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (png_ptr->gamma_16_table != NULL) - { - int i; - for (i = 0; i < (1 << (8 - png_ptr->gamma_shift)); i++) - { - png_free(png_ptr, png_ptr->gamma_16_table[i]); - } - } -#endif -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - png_free(png_ptr, png_ptr->gamma_16_table); - if (png_ptr->gamma_16_from_1 != NULL) - { - int i; - for (i = 0; i < (1 << (8 - png_ptr->gamma_shift)); i++) - { - png_free(png_ptr, png_ptr->gamma_16_from_1[i]); - } - } - png_free(png_ptr, png_ptr->gamma_16_from_1); - if (png_ptr->gamma_16_to_1 != NULL) - { - int i; - for (i = 0; i < (1 << (8 - png_ptr->gamma_shift)); i++) - { - png_free(png_ptr, png_ptr->gamma_16_to_1[i]); - } - } - png_free(png_ptr, png_ptr->gamma_16_to_1); -#endif - - inflateEnd(&png_ptr->zstream); -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED - png_free(png_ptr, png_ptr->save_buffer); -#endif - - /* Save the important info out of the png_struct, in case it is - * being used again. - */ - png_memcpy(tmp_jmp, png_ptr->jmpbuf, sizeof (jmp_buf)); - - error_fn = png_ptr->error_fn; - warning_fn = png_ptr->warning_fn; - error_ptr = png_ptr->error_ptr; - - png_memset(png_ptr, 0, sizeof (png_struct)); - - png_ptr->error_fn = error_fn; - png_ptr->warning_fn = warning_fn; - png_ptr->error_ptr = error_ptr; - - png_memcpy(png_ptr->jmpbuf, tmp_jmp, sizeof (jmp_buf)); -} - -void -png_set_read_status_fn(png_structp png_ptr, png_read_status_ptr read_row_fn) -{ - png_ptr->read_row_fn = read_row_fn; -} diff --git a/src/png/pngrio.c b/src/png/pngrio.c deleted file mode 100644 index 6c6710a46f..0000000000 --- a/src/png/pngrio.c +++ /dev/null @@ -1,145 +0,0 @@ - -/* pngrio.c - functions for data input - * - * libpng 1.0.1 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - * Copyright (c) 1996, 1997 Andreas Dilger - * Copyright (c) 1998, Glenn Randers-Pehrson - * March 15, 1998 - * - * This file provides a location for all input. Users which need - * special handling are expected to write a function which has the same - * arguments as this, and perform a similar function, but possibly has - * a different input method. Note that you shouldn't change this - * function, but rather write a replacement function and then make - * libpng use it at run time with png_set_read_fn(...). - */ - -#define PNG_INTERNAL -#include "../png/png.h" - -/* Read the data from whatever input you are using. The default routine - reads from a file pointer. Note that this routine sometimes gets called - with very small lengths, so you should implement some kind of simple - buffering if you are using unbuffered reads. This should never be asked - to read more then 64K on a 16 bit machine. */ -void -png_read_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_debug1(4,"reading %d bytes\n", length); - if (png_ptr->read_data_fn != NULL) - (*(png_ptr->read_data_fn))(png_ptr, data, length); - else - png_error(png_ptr, "Call to NULL read function"); -} - -#if !defined(PNG_NO_STDIO) -/* This is the function which does the actual reading of data. If you are - not reading from a standard C stream, you should create a replacement - read_data function and use it at run time with png_set_read_fn(), rather - than changing the library. */ -#ifndef USE_FAR_KEYWORD -static void -png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_size_t check; - - /* fread() returns 0 on error, so it is OK to store this in a png_size_t - * instead of an int, which is what fread() actually returns. - */ - check = (png_size_t)fread(data, (png_size_t)1, length, - (FILE *)png_ptr->io_ptr); - - if (check != length) - { - png_error(png_ptr, "Read Error"); - } -} -#else -/* this is the model-independent version. Since the standard I/O library - can't handle far buffers in the medium and small models, we have to copy - the data. -*/ - -#define NEAR_BUF_SIZE 1024 -#define MIN(a,b) (a <= b ? a : b) - -static void -png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - int check; - png_byte *n_data; - FILE *io_ptr; - - /* Check if data really is near. If so, use usual code. */ - n_data = (png_byte *)CVT_PTR_NOCHECK(data); - io_ptr = (FILE *)CVT_PTR(png_ptr->io_ptr); - if ((png_bytep)n_data == data) - { - check = fread(n_data, 1, length, io_ptr); - } - else - { - png_byte buf[NEAR_BUF_SIZE]; - png_size_t read, remaining, err; - check = 0; - remaining = length; - do - { - read = MIN(NEAR_BUF_SIZE, remaining); - err = fread(buf, (png_size_t)1, read, io_ptr); - png_memcpy(data, buf, read); /* copy far buffer to near buffer */ - if(err != read) - break; - else - check += err; - data += read; - remaining -= read; - } - while (remaining != 0); - } - if ((png_uint_32)check != (png_uint_32)length) - { - png_error(png_ptr, "read Error"); - } -} -#endif -#endif - -/* This function allows the application to supply a new input function - for libpng if standard C streams aren't being used. - - This function takes as its arguments: - png_ptr - pointer to a png input data structure - io_ptr - pointer to user supplied structure containing info about - the input functions. May be NULL. - read_data_fn - pointer to a new input function which takes as it's - arguments a pointer to a png_struct, a pointer to - a location where input data can be stored, and a 32-bit - unsigned int which is the number of bytes to be read. - To exit and output any fatal error messages the new write - function should call png_error(png_ptr, "Error msg"). */ -void -png_set_read_fn(png_structp png_ptr, png_voidp io_ptr, - png_rw_ptr read_data_fn) -{ - png_ptr->io_ptr = io_ptr; - -#if !defined(PNG_NO_STDIO) - if (read_data_fn != NULL) - png_ptr->read_data_fn = read_data_fn; - else - png_ptr->read_data_fn = png_default_read_data; -#else - png_ptr->read_data_fn = read_data_fn; -#endif - - /* It is an error to write to a read device */ - png_ptr->write_data_fn = NULL; - -#if defined(PNG_WRITE_FLUSH_SUPPORTED) - png_ptr->output_flush_fn = NULL; -#endif /* PNG_WRITE_FLUSH_SUPPORTED */ -} - diff --git a/src/png/pngrtran.c b/src/png/pngrtran.c deleted file mode 100644 index 684bf5f253..0000000000 --- a/src/png/pngrtran.c +++ /dev/null @@ -1,3409 +0,0 @@ - -/* pngrtran.c - transforms the data in a row for PNG readers - * - * libpng 1.0.1 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - * Copyright (c) 1996, 1997 Andreas Dilger - * Copyright (c) 1998, Glenn Randers-Pehrson - * March 15, 1998 - * - * This file contains functions optionally called by an application - * in order to tell libpng how to handle data when reading a PNG. - * Transformations which are used in both reading and writing are - * in pngtrans.c. - */ - -#define PNG_INTERNAL -#include "../png/png.h" - -#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED -/* With these routines, we avoid an integer divide, which will be slower on - * many machines. However, it does take more operations than the corresponding - * divide method, so it may be slower on some RISC systems. There are two - * shifts (by 8 or 16 bits) and an addition, versus a single integer divide. - * - * Note that the rounding factors are NOT supposed to be the same! 128 and - * 32768 are correct for the NODIV code; 127 and 32767 are correct for the - * standard method. - * - * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ] - */ - - /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */ -# define png_composite(composite, fg, alpha, bg) \ - { png_uint_16 temp = ((png_uint_16)(fg) * (png_uint_16)(alpha) + \ - (png_uint_16)(bg)*(png_uint_16)(255 - \ - (png_uint_16)(alpha)) + (png_uint_16)128); \ - (composite) = (png_byte)((temp + (temp >> 8)) >> 8); } -# define png_composite_16(composite, fg, alpha, bg) \ - { png_uint_32 temp = ((png_uint_32)(fg) * (png_uint_32)(alpha) + \ - (png_uint_32)(bg)*(png_uint_32)(65535L - \ - (png_uint_32)(alpha)) + (png_uint_32)32768L); \ - (composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); } - -#else /* standard method using integer division */ - - /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */ -# define png_composite(composite, fg, alpha, bg) \ - (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) + \ - (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \ - (png_uint_16)127) / 255) -# define png_composite_16(composite, fg, alpha, bg) \ - (composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \ - (png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) + \ - (png_uint_32)32767) / (png_uint_32)65535L) - -#endif /* ?PNG_READ_COMPOSITE_NODIV_SUPPORTED */ - - -/* Set the action on getting a CRC error for an ancillary or critical chunk. */ -void -png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action) -{ - png_debug(1, "in png_set_crc_action\n"); - /* Tell libpng how we react to CRC errors in critical chunks */ - switch (crit_action) - { - case PNG_CRC_NO_CHANGE: /* leave setting as is */ - break; - case PNG_CRC_WARN_USE: /* warn/use data */ - png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; - png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE; - break; - case PNG_CRC_QUIET_USE: /* quiet/use data */ - png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; - png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE | - PNG_FLAG_CRC_CRITICAL_IGNORE; - break; - case PNG_CRC_WARN_DISCARD: /* not a valid action for critical data */ - png_warning(png_ptr, "Can't discard critical data on CRC error."); - case PNG_CRC_ERROR_QUIT: /* error/quit */ - case PNG_CRC_DEFAULT: - default: - png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; - break; - } - - switch (ancil_action) - { - case PNG_CRC_NO_CHANGE: /* leave setting as is */ - break; - case PNG_CRC_WARN_USE: /* warn/use data */ - png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; - png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_USE; - break; - case PNG_CRC_QUIET_USE: /* quiet/use data */ - png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; - png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_USE | - PNG_FLAG_CRC_ANCILLARY_NOWARN; - break; - case PNG_CRC_ERROR_QUIT: /* error/quit */ - png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; - png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_NOWARN; - break; - case PNG_CRC_WARN_DISCARD: /* warn/discard data */ - case PNG_CRC_DEFAULT: - default: - png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; - break; - } -} - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) -/* handle alpha and tRNS via a background color */ -void -png_set_background(png_structp png_ptr, - png_color_16p background_color, int background_gamma_code, - int need_expand, double background_gamma) -{ - png_debug(1, "in png_set_background\n"); - if (background_gamma_code == PNG_BACKGROUND_GAMMA_UNKNOWN) - { - png_warning(png_ptr, "Application must supply a known background gamma"); - return; - } - - png_ptr->transformations |= PNG_BACKGROUND; - png_memcpy(&(png_ptr->background), background_color, - sizeof(png_color_16)); - png_ptr->background_gamma = (float)background_gamma; - png_ptr->background_gamma_type = (png_byte)(background_gamma_code); - png_ptr->transformations |= (need_expand ? PNG_BACKGROUND_EXPAND : 0); -} -#endif - -#if defined(PNG_READ_16_TO_8_SUPPORTED) -/* strip 16 bit depth files to 8 bit depth */ -void -png_set_strip_16(png_structp png_ptr) -{ - png_debug(1, "in png_set_strip_16\n"); - png_ptr->transformations |= PNG_16_TO_8; -} -#endif - -#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) -void -png_set_strip_alpha(png_structp png_ptr) -{ - png_debug(1, "in png_set_strip_alpha\n"); - png_ptr->transformations |= PNG_STRIP_ALPHA; -} -#endif - -#if defined(PNG_READ_DITHER_SUPPORTED) -/* Dither file to 8 bit. Supply a palette, the current number - * of elements in the palette, the maximum number of elements - * allowed, and a histogram if possible. If the current number - * of colors is greater then the maximum number, the palette will be - * modified to fit in the maximum number. "full_dither" indicates - * whether we need a dithering cube set up for RGB images, or if we - * simply are reducing the number of colors in a paletted image. - */ - -typedef struct png_dsort_struct -{ - struct png_dsort_struct FAR * next; - png_byte left; - png_byte right; -} png_dsort; -typedef png_dsort FAR * png_dsortp; -typedef png_dsort FAR * FAR * png_dsortpp; - -void -png_set_dither(png_structp png_ptr, png_colorp palette, - int num_palette, int maximum_colors, png_uint_16p histogram, - int full_dither) -{ - png_debug(1, "in png_set_dither\n"); - png_ptr->transformations |= PNG_DITHER; - - if (!full_dither) - { - int i; - - png_ptr->dither_index = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(num_palette * sizeof (png_byte))); - for (i = 0; i < num_palette; i++) - png_ptr->dither_index[i] = (png_byte)i; - } - - if (num_palette > maximum_colors) - { - if (histogram != NULL) - { - /* This is easy enough, just throw out the least used colors. - Perhaps not the best solution, but good enough. */ - - int i; - png_bytep sort; - - /* initialize an array to sort colors */ - sort = (png_bytep)png_malloc(png_ptr, (png_uint_32)(num_palette - * sizeof (png_byte))); - - /* initialize the sort array */ - for (i = 0; i < num_palette; i++) - sort[i] = (png_byte)i; - - /* Find the least used palette entries by starting a - bubble sort, and running it until we have sorted - out enough colors. Note that we don't care about - sorting all the colors, just finding which are - least used. */ - - for (i = num_palette - 1; i >= maximum_colors; i--) - { - int done; /* to stop early if the list is pre-sorted */ - int j; - - done = 1; - for (j = 0; j < i; j++) - { - if (histogram[sort[j]] < histogram[sort[j + 1]]) - { - png_byte t; - - t = sort[j]; - sort[j] = sort[j + 1]; - sort[j + 1] = t; - done = 0; - } - } - if (done) - break; - } - - /* swap the palette around, and set up a table, if necessary */ - if (full_dither) - { - int j; - - /* put all the useful colors within the max, but don't - move the others */ - for (i = 0, j = num_palette; i < maximum_colors; i++) - { - if ((int)sort[i] >= maximum_colors) - { - do - j--; - while ((int)sort[j] >= maximum_colors); - palette[i] = palette[j]; - } - } - } - else - { - int j; - - /* move all the used colors inside the max limit, and - develop a translation table */ - for (i = 0, j = num_palette; i < maximum_colors; i++) - { - /* only move the colors we need to */ - if ((int)sort[i] >= maximum_colors) - { - png_color tmp_color; - - do - j--; - while ((int)sort[j] >= maximum_colors); - - tmp_color = palette[j]; - palette[j] = palette[i]; - palette[i] = tmp_color; - /* indicate where the color went */ - png_ptr->dither_index[j] = (png_byte)i; - png_ptr->dither_index[i] = (png_byte)j; - } - } - - /* find closest color for those colors we are not using */ - for (i = 0; i < num_palette; i++) - { - if ((int)png_ptr->dither_index[i] >= maximum_colors) - { - int min_d, k, min_k, d_index; - - /* find the closest color to one we threw out */ - d_index = png_ptr->dither_index[i]; - min_d = PNG_COLOR_DIST(palette[d_index], palette[0]); - for (k = 1, min_k = 0; k < maximum_colors; k++) - { - int d; - - d = PNG_COLOR_DIST(palette[d_index], palette[k]); - - if (d < min_d) - { - min_d = d; - min_k = k; - } - } - /* point to closest color */ - png_ptr->dither_index[i] = (png_byte)min_k; - } - } - } - png_free(png_ptr, sort); - } - else - { - /* This is much harder to do simply (and quickly). Perhaps - we need to go through a median cut routine, but those - don't always behave themselves with only a few colors - as input. So we will just find the closest two colors, - and throw out one of them (chosen somewhat randomly). - [I don't understand this at all, so if someone wants to - work on improving it, be my guest - AED] - */ - int i; - int max_d; - int num_new_palette; - png_dsortpp hash; - png_bytep index_to_palette; - /* where the original index currently is in the palette */ - png_bytep palette_to_index; - /* which original index points to this palette color */ - - /* initialize palette index arrays */ - index_to_palette = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(num_palette * sizeof (png_byte))); - palette_to_index = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(num_palette * sizeof (png_byte))); - - /* initialize the sort array */ - for (i = 0; i < num_palette; i++) - { - index_to_palette[i] = (png_byte)i; - palette_to_index[i] = (png_byte)i; - } - - hash = (png_dsortpp)png_malloc(png_ptr, (png_uint_32)(769 * - sizeof (png_dsortp))); - for (i = 0; i < 769; i++) - hash[i] = NULL; -/* png_memset(hash, 0, 769 * sizeof (png_dsortp)); */ - - num_new_palette = num_palette; - - /* initial wild guess at how far apart the farthest pixel - pair we will be eliminating will be. Larger - numbers mean more areas will be allocated, Smaller - numbers run the risk of not saving enough data, and - having to do this all over again. - - I have not done extensive checking on this number. - */ - max_d = 96; - - while (num_new_palette > maximum_colors) - { - for (i = 0; i < num_new_palette - 1; i++) - { - int j; - - for (j = i + 1; j < num_new_palette; j++) - { - int d; - - d = PNG_COLOR_DIST(palette[i], palette[j]); - - if (d <= max_d) - { - png_dsortp t; - - t = (png_dsortp)png_malloc(png_ptr, (png_uint_32)(sizeof - (png_dsort))); - t->next = hash[d]; - t->left = (png_byte)i; - t->right = (png_byte)j; - hash[d] = t; - } - } - } - - for (i = 0; i <= max_d; i++) - { - if (hash[i] != NULL) - { - png_dsortp p; - - for (p = hash[i]; p; p = p->next) - { - if ((int)index_to_palette[p->left] < num_new_palette && - (int)index_to_palette[p->right] < num_new_palette) - { - int j, next_j; - - if (num_new_palette & 1) - { - j = p->left; - next_j = p->right; - } - else - { - j = p->right; - next_j = p->left; - } - - num_new_palette--; - palette[index_to_palette[j]] = palette[num_new_palette]; - if (!full_dither) - { - int k; - - for (k = 0; k < num_palette; k++) - { - if (png_ptr->dither_index[k] == - index_to_palette[j]) - png_ptr->dither_index[k] = - index_to_palette[next_j]; - if ((int)png_ptr->dither_index[k] == - num_new_palette) - png_ptr->dither_index[k] = - index_to_palette[j]; - } - } - - index_to_palette[palette_to_index[num_new_palette]] = - index_to_palette[j]; - palette_to_index[index_to_palette[j]] = - palette_to_index[num_new_palette]; - - index_to_palette[j] = (png_byte)num_new_palette; - palette_to_index[num_new_palette] = (png_byte)j; - } - if (num_new_palette <= maximum_colors) - break; - } - if (num_new_palette <= maximum_colors) - break; - } - } - - for (i = 0; i < 769; i++) - { - if (hash[i] != NULL) - { - png_dsortp p; - - p = hash[i]; - while (p) - { - png_dsortp t; - - t = p->next; - png_free(png_ptr, p); - p = t; - } - } - hash[i] = 0; - } - max_d += 96; - } - png_free(png_ptr, hash); - png_free(png_ptr, palette_to_index); - png_free(png_ptr, index_to_palette); - } - num_palette = maximum_colors; - } - if (png_ptr->palette == NULL) - { - png_ptr->palette = palette; - } - png_ptr->num_palette = (png_uint_16)num_palette; - - if (full_dither) - { - int i; - int total_bits, num_red, num_green, num_blue; - png_size_t num_entries; - png_bytep distance; - - total_bits = PNG_DITHER_RED_BITS + PNG_DITHER_GREEN_BITS + - PNG_DITHER_BLUE_BITS; - - num_red = (1 << PNG_DITHER_RED_BITS); - num_green = (1 << PNG_DITHER_GREEN_BITS); - num_blue = (1 << PNG_DITHER_BLUE_BITS); - num_entries = ((png_size_t)1 << total_bits); - - png_ptr->palette_lookup = (png_bytep )png_malloc(png_ptr, - (png_uint_32)(num_entries * sizeof (png_byte))); - - png_memset(png_ptr->palette_lookup, 0, num_entries * sizeof (png_byte)); - - distance = (png_bytep)png_malloc(png_ptr, (png_uint_32)(num_entries * - sizeof(png_byte))); - - png_memset(distance, 0xff, num_entries * sizeof(png_byte)); - - for (i = 0; i < num_palette; i++) - { - int r, g, b, ir, ig, ib; - - r = (palette[i].red >> (8 - PNG_DITHER_RED_BITS)); - g = (palette[i].green >> (8 - PNG_DITHER_GREEN_BITS)); - b = (palette[i].blue >> (8 - PNG_DITHER_BLUE_BITS)); - - for (ir = 0; ir < num_red; ir++) - { - int dr, index_r; - - dr = abs(ir - r); - index_r = (ir << (PNG_DITHER_BLUE_BITS + PNG_DITHER_GREEN_BITS)); - for (ig = 0; ig < num_green; ig++) - { - int dg, dt, dm, index_g; - - dg = abs(ig - g); - dt = dr + dg; - dm = ((dr > dg) ? dr : dg); - index_g = index_r | (ig << PNG_DITHER_BLUE_BITS); - for (ib = 0; ib < num_blue; ib++) - { - int d_index, db, dmax, d; - - d_index = index_g | ib; - db = abs(ib - b); - dmax = ((dm > db) ? dm : db); - d = dmax + dt + db; - - if (d < (int)distance[d_index]) - { - distance[d_index] = (png_byte)d; - png_ptr->palette_lookup[d_index] = (png_byte)i; - } - } - } - } - } - - png_free(png_ptr, distance); - } -} -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) -/* Transform the image from the file_gamma to the screen_gamma. We - * only do transformations on images where the file_gamma and screen_gamma - * are not close reciprocals, otherwise it slows things down slightly, and - * also needlessly introduces small errors. - */ -void -png_set_gamma(png_structp png_ptr, double scrn_gamma, double file_gamma) -{ - png_debug(1, "in png_set_gamma\n"); - if (fabs(scrn_gamma * file_gamma - 1.0) > PNG_GAMMA_THRESHOLD) - png_ptr->transformations |= PNG_GAMMA; - png_ptr->gamma = (float)file_gamma; - png_ptr->screen_gamma = (float)scrn_gamma; -} -#endif - -#if defined(PNG_READ_EXPAND_SUPPORTED) -/* Expand paletted images to rgb, expand grayscale images of - * less then 8 bit depth to 8 bit depth, and expand tRNS chunks - * to alpha channels. - */ -void -png_set_expand(png_structp png_ptr) -{ - png_debug(1, "in png_set_expand\n"); - png_ptr->transformations |= PNG_EXPAND; -} -#endif - -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) -void -png_set_gray_to_rgb(png_structp png_ptr) -{ - png_debug(1, "in png_set_gray_to_rgb\n"); - png_ptr->transformations |= PNG_GRAY_TO_RGB; -} -#endif - -#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) -/* Convert a RGB image to a grayscale of the given width. This would - * allow us, for example, to convert a 24 bpp RGB image into an 8 or - * 16 bpp grayscale image. (Not yet implemented.) - */ -void -png_set_rgb_to_gray(png_structp png_ptr, int gray_bits) -{ - png_debug(1, "in png_set_rgb_to_gray\n"); - png_ptr->transformations |= PNG_RGB_TO_GRAY; - /* Need to do something with gray_bits here. */ - png_warning(png_ptr, "RGB to GRAY transformation is not yet implemented."); -} -#endif - -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) -void -png_set_read_user_transform_fn(png_structp png_ptr, png_user_transform_ptr - read_user_transform_fn) -{ - png_debug(1, "in png_set_read_user_transform_fn\n"); - png_ptr->transformations |= PNG_USER_TRANSFORM; - png_ptr->read_user_transform_fn = read_user_transform_fn; -} -#endif - -/* Initialize everything needed for the read. This includes modifying - * the palette. - */ -void -png_init_read_transformations(png_structp png_ptr) -{ - int color_type; - - png_debug(1, "in png_init_read_transformations\n"); - color_type = png_ptr->color_type; - -#if defined(PNG_READ_EXPAND_SUPPORTED) && defined(PNG_READ_BACKGROUND_SUPPORTED) - if (png_ptr->transformations & PNG_BACKGROUND_EXPAND) - { - if (color_type == PNG_COLOR_TYPE_GRAY) - { - /* expand background chunk. */ - switch (png_ptr->bit_depth) - { - case 1: - png_ptr->background.gray *= (png_uint_16)0xff; - png_ptr->background.red = png_ptr->background.green = - png_ptr->background.blue = png_ptr->background.gray; - break; - case 2: - png_ptr->background.gray *= (png_uint_16)0x55; - png_ptr->background.red = png_ptr->background.green = - png_ptr->background.blue = png_ptr->background.gray; - break; - case 4: - png_ptr->background.gray *= (png_uint_16)0x11; - png_ptr->background.red = png_ptr->background.green = - png_ptr->background.blue = png_ptr->background.gray; - break; - case 8: - case 16: - png_ptr->background.red = png_ptr->background.green = - png_ptr->background.blue = png_ptr->background.gray; - break; - } - } - else if (color_type == PNG_COLOR_TYPE_PALETTE) - { - png_ptr->background.red = - png_ptr->palette[png_ptr->background.index].red; - png_ptr->background.green = - png_ptr->palette[png_ptr->background.index].green; - png_ptr->background.blue = - png_ptr->palette[png_ptr->background.index].blue; - -#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) - if (png_ptr->transformations & PNG_INVERT_ALPHA) - { -#if defined(PNG_READ_EXPAND_SUPPORTED) - if (!(png_ptr->transformations & PNG_EXPAND)) -#endif - { - /* invert the alpha channel (in tRNS) unless the pixels are - going to be expanded, in which case leave it for later */ - int i; - for (i=0; i<(int)png_ptr->num_trans; i++) - png_ptr->trans[i] = 255 - png_ptr->trans[i]; - } - } -#endif - - } - } -#endif - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - png_ptr->background_1 = png_ptr->background; -#endif -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (png_ptr->transformations & PNG_GAMMA) - { - png_build_gamma_table(png_ptr); -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - if (png_ptr->transformations & PNG_BACKGROUND) - { - if (color_type == PNG_COLOR_TYPE_PALETTE) - { - int num_palette, i; - png_color back, back_1; - png_colorp palette; - - palette = png_ptr->palette; - num_palette = png_ptr->num_palette; - - if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_FILE) - { - back.red = png_ptr->gamma_table[png_ptr->background.red]; - back.green = png_ptr->gamma_table[png_ptr->background.green]; - back.blue = png_ptr->gamma_table[png_ptr->background.blue]; - - back_1.red = png_ptr->gamma_to_1[png_ptr->background.red]; - back_1.green = png_ptr->gamma_to_1[png_ptr->background.green]; - back_1.blue = png_ptr->gamma_to_1[png_ptr->background.blue]; - } - else - { - double g, gs; - - switch (png_ptr->background_gamma_type) - { - case PNG_BACKGROUND_GAMMA_SCREEN: - g = (png_ptr->screen_gamma); - gs = 1.0; - break; - case PNG_BACKGROUND_GAMMA_FILE: - g = 1.0 / (png_ptr->gamma); - gs = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); - break; - case PNG_BACKGROUND_GAMMA_UNIQUE: - g = 1.0 / (png_ptr->background_gamma); - gs = 1.0 / (png_ptr->background_gamma * - png_ptr->screen_gamma); - break; - default: - g = 1.0; /* back_1 */ - gs = 1.0; /* back */ - } - - if ( fabs(gs - 1.0) < PNG_GAMMA_THRESHOLD) - { - back.red = (png_byte)png_ptr->background.red; - back.green = (png_byte)png_ptr->background.green; - back.blue = (png_byte)png_ptr->background.blue; - } - else - { - back.red = (png_byte)(pow( - (double)png_ptr->background.red/255, gs) * 255.0 + .5); - back.green = (png_byte)(pow( - (double)png_ptr->background.green/255, gs) * 255.0 + .5); - back.blue = (png_byte)(pow( - (double)png_ptr->background.blue/255, gs) * 255.0 + .5); - } - - back_1.red = (png_byte)(pow( - (double)png_ptr->background.red/255, g) * 255.0 + .5); - back_1.green = (png_byte)(pow( - (double)png_ptr->background.green/255, g) * 255.0 + .5); - back_1.blue = (png_byte)(pow( - (double)png_ptr->background.blue/255, g) * 255.0 + .5); - } - - for (i = 0; i < num_palette; i++) - { - if (i < (int)png_ptr->num_trans && png_ptr->trans[i] != 0xff) - { - if (png_ptr->trans[i] == 0) - { - palette[i] = back; - } - else /* if (png_ptr->trans[i] != 0xff) */ - { - png_byte v, w; - - v = png_ptr->gamma_to_1[palette[i].red]; - png_composite(w, v, png_ptr->trans[i], back_1.red); - palette[i].red = png_ptr->gamma_from_1[w]; - - v = png_ptr->gamma_to_1[palette[i].green]; - png_composite(w, v, png_ptr->trans[i], back_1.green); - palette[i].green = png_ptr->gamma_from_1[w]; - - v = png_ptr->gamma_to_1[palette[i].blue]; - png_composite(w, v, png_ptr->trans[i], back_1.blue); - palette[i].blue = png_ptr->gamma_from_1[w]; - } - } - else - { - palette[i].red = png_ptr->gamma_table[palette[i].red]; - palette[i].green = png_ptr->gamma_table[palette[i].green]; - palette[i].blue = png_ptr->gamma_table[palette[i].blue]; - } - } - } - /* if (png_ptr->background_gamma_type!=PNG_BACKGROUND_GAMMA_UNKNOWN)*/ - else - /* color_type != PNG_COLOR_TYPE_PALETTE */ - { - double g, gs, m; - - m = (double)(((png_uint_32)1 << png_ptr->bit_depth) - 1); - g = 1.0; - gs = 1.0; - - switch (png_ptr->background_gamma_type) - { - case PNG_BACKGROUND_GAMMA_SCREEN: - g = (png_ptr->screen_gamma); - gs = 1.0; - break; - case PNG_BACKGROUND_GAMMA_FILE: - g = 1.0 / (png_ptr->gamma); - gs = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); - break; - case PNG_BACKGROUND_GAMMA_UNIQUE: - g = 1.0 / (png_ptr->background_gamma); - gs = 1.0 / (png_ptr->background_gamma * - png_ptr->screen_gamma); - break; - } - - if (color_type & PNG_COLOR_MASK_COLOR) - { - /* RGB or RGBA */ - png_ptr->background_1.red = (png_uint_16)(pow( - (double)png_ptr->background.red / m, g) * m + .5); - png_ptr->background_1.green = (png_uint_16)(pow( - (double)png_ptr->background.green / m, g) * m + .5); - png_ptr->background_1.blue = (png_uint_16)(pow( - (double)png_ptr->background.blue / m, g) * m + .5); - png_ptr->background.red = (png_uint_16)(pow( - (double)png_ptr->background.red / m, gs) * m + .5); - png_ptr->background.green = (png_uint_16)(pow( - (double)png_ptr->background.green / m, gs) * m + .5); - png_ptr->background.blue = (png_uint_16)(pow( - (double)png_ptr->background.blue / m, gs) * m + .5); - } - else - { - /* GRAY or GRAY ALPHA */ - png_ptr->background_1.gray = (png_uint_16)(pow( - (double)png_ptr->background.gray / m, g) * m + .5); - png_ptr->background.gray = (png_uint_16)(pow( - (double)png_ptr->background.gray / m, gs) * m + .5); - } - } - } - else - /* transformation does not include PNG_BACKGROUND */ -#endif - if (color_type == PNG_COLOR_TYPE_PALETTE) - { - int num_palette, i; - png_colorp palette; - - palette = png_ptr->palette; - num_palette = png_ptr->num_palette; - - for (i = 0; i < num_palette; i++) - { - palette[i].red = png_ptr->gamma_table[palette[i].red]; - palette[i].green = png_ptr->gamma_table[palette[i].green]; - palette[i].blue = png_ptr->gamma_table[palette[i].blue]; - } - } - } -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - else -#endif -#endif -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - /* No GAMMA transformation */ - if (png_ptr->transformations & PNG_BACKGROUND && - color_type == PNG_COLOR_TYPE_PALETTE) - { - int i; - png_color back; - png_colorp palette; - - palette = png_ptr->palette; - back.red = (png_byte)png_ptr->background.red; - back.green = (png_byte)png_ptr->background.green; - back.blue = (png_byte)png_ptr->background.blue; - - for (i = 0; i < (int)png_ptr->num_trans; i++) - { - if (png_ptr->trans[i] == 0) - { - palette[i] = back; - } - else if (png_ptr->trans[i] != 0xff) - { - png_composite(palette[i].red, palette[i].red, - png_ptr->trans[i], back.red); - png_composite(palette[i].green, palette[i].green, - png_ptr->trans[i], back.green); - png_composite(palette[i].blue, palette[i].blue, - png_ptr->trans[i], back.blue); - } - } - } -#endif - -#if defined(PNG_READ_SHIFT_SUPPORTED) - if ((png_ptr->transformations & PNG_SHIFT) && - color_type == PNG_COLOR_TYPE_PALETTE) - { - png_uint_16 i; - int sr, sg, sb; - - sr = 8 - png_ptr->sig_bit.red; - if (sr < 0 || sr > 8) - sr = 0; - sg = 8 - png_ptr->sig_bit.green; - if (sg < 0 || sg > 8) - sg = 0; - sb = 8 - png_ptr->sig_bit.blue; - if (sb < 0 || sb > 8) - sb = 0; - for (i = 0; i < png_ptr->num_palette; i++) - { - png_ptr->palette[i].red >>= sr; - png_ptr->palette[i].green >>= sg; - png_ptr->palette[i].blue >>= sb; - } - } -#endif -} - -/* Modify the info structure to reflect the transformations. The - * info should be updated so a PNG file could be written with it, - * assuming the transformations result in valid PNG data. - */ -void -png_read_transform_info(png_structp png_ptr, png_infop info_ptr) -{ - png_debug(1, "in png_read_transform_info\n"); -#if defined(PNG_READ_EXPAND_SUPPORTED) - if (png_ptr->transformations & PNG_EXPAND) - { - if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - if (png_ptr->num_trans) - info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA; - else - info_ptr->color_type = PNG_COLOR_TYPE_RGB; - info_ptr->bit_depth = 8; - info_ptr->num_trans = 0; - } - else - { - if (png_ptr->num_trans) - info_ptr->color_type |= PNG_COLOR_MASK_ALPHA; - if (info_ptr->bit_depth < 8) - info_ptr->bit_depth = 8; - info_ptr->num_trans = 0; - } - } -#endif - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - if (png_ptr->transformations & PNG_BACKGROUND) - { - info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA; - info_ptr->num_trans = 0; - info_ptr->background = png_ptr->background; - } -#endif - -#if defined(PNG_READ_16_TO_8_SUPPORTED) - if ((png_ptr->transformations & PNG_16_TO_8) && info_ptr->bit_depth == 16) - info_ptr->bit_depth = 8; -#endif - -#if defined(PNG_READ_DITHER_SUPPORTED) - if (png_ptr->transformations & PNG_DITHER) - { - if (((info_ptr->color_type == PNG_COLOR_TYPE_RGB) || - (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)) && - png_ptr->palette_lookup && info_ptr->bit_depth == 8) - { - info_ptr->color_type = PNG_COLOR_TYPE_PALETTE; - } - } -#endif - -#if defined(PNG_READ_PACK_SUPPORTED) - if ((png_ptr->transformations & PNG_PACK) && info_ptr->bit_depth < 8) - info_ptr->bit_depth = 8; -#endif - -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) - if (png_ptr->transformations & PNG_GRAY_TO_RGB) - info_ptr->color_type |= PNG_COLOR_MASK_COLOR; -#endif - - if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - info_ptr->channels = 1; - else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR) - info_ptr->channels = 3; - else - info_ptr->channels = 1; - -#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) - if (png_ptr->transformations & PNG_STRIP_ALPHA) - info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA; -#endif - -#if defined(PNG_READ_FILLER_SUPPORTED) - if ((png_ptr->transformations & PNG_FILLER) && - info_ptr->color_type & PNG_COLOR_TYPE_RGB && - info_ptr->channels == 3) - { - info_ptr->channels = 4; - } -#endif - - if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) - info_ptr->channels++; - info_ptr->pixel_depth = (png_byte)(info_ptr->channels * - info_ptr->bit_depth); - - info_ptr->rowbytes = ((info_ptr->width * info_ptr->pixel_depth + 7) >> 3); -} - -/* Transform the row. The order of transformations is significant, - * and is very touchy. If you add a transformation, take care to - * decide how it fits in with the other transformations here. - */ -void -png_do_read_transformations(png_structp png_ptr) -{ - png_debug(1, "in png_do_read_transformations\n"); -#if !defined(PNG_USELESS_TESTS_SUPPORTED) - if (png_ptr->row_buf == NULL) - { -#if !defined(PNG_NO_STDIO) - char msg[50]; - - sprintf(msg, "NULL row buffer for row %ld, pass %d", png_ptr->row_number, - png_ptr->pass); - png_error(png_ptr, msg); -#else - png_error(png_ptr, "NULL row buffer"); -#endif - } -#endif - -#if defined(PNG_READ_EXPAND_SUPPORTED) - if (png_ptr->transformations & PNG_EXPAND) - { - if (png_ptr->row_info.color_type == PNG_COLOR_TYPE_PALETTE) - { - png_do_expand_palette(&(png_ptr->row_info), png_ptr->row_buf + 1, - png_ptr->palette, png_ptr->trans, png_ptr->num_trans); - } - else if (png_ptr->transformations & PNG_EXPAND) - { - if (png_ptr->num_trans) - png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1, - &(png_ptr->trans_values)); - else - png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1, - NULL); - } - } -#endif - -#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) - if (png_ptr->transformations & PNG_STRIP_ALPHA) - png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1, - PNG_FLAG_FILLER_AFTER); -#endif - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - if ((png_ptr->transformations & PNG_BACKGROUND) && - ((png_ptr->num_trans != 0 ) || - (png_ptr->color_type & PNG_COLOR_MASK_ALPHA))) - png_do_background(&(png_ptr->row_info), png_ptr->row_buf + 1, - &(png_ptr->trans_values), &(png_ptr->background), - &(png_ptr->background_1), - png_ptr->gamma_table, png_ptr->gamma_from_1, - png_ptr->gamma_to_1, png_ptr->gamma_16_table, - png_ptr->gamma_16_from_1, png_ptr->gamma_16_to_1, - png_ptr->gamma_shift); -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) - if ((png_ptr->transformations & PNG_GAMMA) && - !(png_ptr->transformations & PNG_BACKGROUND) && - (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE)) - png_do_gamma(&(png_ptr->row_info), png_ptr->row_buf + 1, - png_ptr->gamma_table, png_ptr->gamma_16_table, - png_ptr->gamma_shift); -#endif - -#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) - if (png_ptr->transformations & PNG_RGB_TO_GRAY) - png_do_rgb_to_gray(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - -#if defined(PNG_READ_16_TO_8_SUPPORTED) - if (png_ptr->transformations & PNG_16_TO_8) - png_do_chop(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - -#if defined(PNG_READ_DITHER_SUPPORTED) - if (png_ptr->transformations & PNG_DITHER) - { - png_do_dither((png_row_infop)&(png_ptr->row_info), png_ptr->row_buf + 1, - png_ptr->palette_lookup, png_ptr->dither_index); - if(png_ptr->row_info.rowbytes == (png_uint_32)0) - png_error(png_ptr, "png_do_dither returned rowbytes=0"); - } -#endif - -#if defined(PNG_READ_INVERT_SUPPORTED) - if (png_ptr->transformations & PNG_INVERT_MONO) - png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - -#if defined(PNG_READ_SHIFT_SUPPORTED) - if (png_ptr->transformations & PNG_SHIFT) - png_do_unshift(&(png_ptr->row_info), png_ptr->row_buf + 1, - &(png_ptr->shift)); -#endif - -#if defined(PNG_READ_PACK_SUPPORTED) - if (png_ptr->transformations & PNG_PACK) - png_do_unpack(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - -#if defined(PNG_READ_BGR_SUPPORTED) - if (png_ptr->transformations & PNG_BGR) - png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (png_ptr->transformations & PNG_PACKSWAP) - png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) - if (png_ptr->transformations & PNG_GRAY_TO_RGB) - png_do_gray_to_rgb(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - -#if defined(PNG_READ_FILLER_SUPPORTED) - if (png_ptr->transformations & PNG_FILLER) - png_do_read_filler(&(png_ptr->row_info), png_ptr->row_buf + 1, - (png_uint_32)png_ptr->filler, png_ptr->flags); -#endif - -#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) - if (png_ptr->transformations & PNG_INVERT_ALPHA) - png_do_read_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - -#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) - if (png_ptr->transformations & PNG_SWAP_ALPHA) - png_do_read_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - -#if defined(PNG_READ_SWAP_SUPPORTED) - if (png_ptr->transformations & PNG_SWAP_BYTES) - png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) - if (png_ptr->transformations & PNG_USER_TRANSFORM) - if(png_ptr->read_user_transform_fn != NULL) - (*(png_ptr->read_user_transform_fn)) /* user read transform function */ - (png_ptr, /* png_ptr */ - &(png_ptr->row_info), /* row_info: */ - /* png_uint_32 width; width of row */ - /* png_uint_32 rowbytes; number of bytes in row */ - /* png_byte color_type; color type of pixels */ - /* png_byte bit_depth; bit depth of samples */ - /* png_byte channels; number of channels (1-4) */ - /* png_byte pixel_depth; bits per pixel (depth*channels) */ - png_ptr->row_buf + 1); /* start of pixel data for row */ -#endif - -} - -#if defined(PNG_READ_PACK_SUPPORTED) -/* Unpack pixels of 1, 2, or 4 bits per pixel into 1 byte per pixel, - * without changing the actual values. Thus, if you had a row with - * a bit depth of 1, you would end up with bytes that only contained - * the numbers 0 or 1. If you would rather they contain 0 and 255, use - * png_do_shift() after this. - */ -void -png_do_unpack(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_unpack\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL && row_info->bit_depth < 8) -#else - if (row_info->bit_depth < 8) -#endif - { - png_uint_32 shift, i; - png_bytep sp, dp; - - switch (row_info->bit_depth) - { - case 1: - { - sp = row + (png_size_t)((row_info->width - 1) >> 3); - dp = row + (png_size_t)row_info->width - 1; - shift = 7 - (int)((row_info->width + 7) & 7); - for (i = 0; i < row_info->width; i++) - { - *dp = (png_byte)((*sp >> shift) & 0x1); - if (shift == 7) - { - shift = 0; - sp--; - } - else - shift++; - - dp--; - } - break; - } - case 2: - { - - sp = row + (png_size_t)((row_info->width - 1) >> 2); - dp = row + (png_size_t)row_info->width - 1; - shift = (int)((3 - ((row_info->width + 3) & 3)) << 1); - for (i = 0; i < row_info->width; i++) - { - *dp = (png_byte)((*sp >> shift) & 0x3); - if (shift == 6) - { - shift = 0; - sp--; - } - else - shift += 2; - - dp--; - } - break; - } - case 4: - { - sp = row + (png_size_t)((row_info->width - 1) >> 1); - dp = row + (png_size_t)row_info->width - 1; - shift = (int)((1 - ((row_info->width + 1) & 1)) << 2); - for (i = 0; i < row_info->width; i++) - { - *dp = (png_byte)((*sp >> shift) & 0xf); - if (shift == 4) - { - shift = 0; - sp--; - } - else - shift = 4; - - dp--; - } - break; - } - } - row_info->bit_depth = 8; - row_info->pixel_depth = (png_byte)(8 * row_info->channels); - row_info->rowbytes = row_info->width * row_info->channels; - } -} -#endif - -#if defined(PNG_READ_SHIFT_SUPPORTED) -/* Reverse the effects of png_do_shift. This routine merely shifts the - * pixels back to their significant bits values. Thus, if you have - * a row of bit depth 8, but only 5 are significant, this will shift - * the values back to 0 through 31. - */ -void -png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits) -{ - png_debug(1, "in png_do_unshift\n"); - if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && sig_bits != NULL && -#endif - row_info->color_type != PNG_COLOR_TYPE_PALETTE) - { - int shift[4]; - int channels, c; - png_uint_16 value; - - channels = 0; - if (row_info->color_type & PNG_COLOR_MASK_COLOR) - { - shift[channels++] = row_info->bit_depth - sig_bits->red; - shift[channels++] = row_info->bit_depth - sig_bits->green; - shift[channels++] = row_info->bit_depth - sig_bits->blue; - } - else - { - shift[channels++] = row_info->bit_depth - sig_bits->gray; - } - if (row_info->color_type & PNG_COLOR_MASK_ALPHA) - { - shift[channels++] = row_info->bit_depth - sig_bits->alpha; - } - - value = 0; - - for (c = 0; c < channels; c++) - { - if (shift[c] <= 0) - shift[c] = 0; - else - value = 1; - } - - if (!value) - return; - - switch (row_info->bit_depth) - { - case 2: - { - png_bytep bp; - png_uint_32 i; - - for (bp = row, i = 0; i < row_info->rowbytes; i++, bp++) - { - *bp >>= 1; - *bp &= 0x55; - } - break; - } - case 4: - { - png_bytep bp; - png_byte mask; - png_uint_32 i; - - mask = (png_byte)(((int)0xf0 >> shift[0]) & (int)0xf0) | - (png_byte)((int)0xf >> shift[0]); - for (bp = row, i = 0; i < row_info->rowbytes; i++, bp++) - { - *bp >>= shift[0]; - *bp &= mask; - } - break; - } - case 8: - { - png_bytep bp; - png_uint_32 i; - - for (bp = row, i = 0; i < row_info->width; i++) - { - for (c = 0; c < (int)row_info->channels; c++, bp++) - { - *bp >>= shift[c]; - } - } - break; - } - case 16: - { - png_bytep bp; - png_size_t i; - - for (bp = row, i = 0; i < row_info->width; i++) - { - for (c = 0; c < (int)row_info->channels; c++, bp += 2) - { - value = (png_uint_16)((*bp << 8) + *(bp + 1)); - value >>= shift[c]; - *bp = (png_byte)(value >> 8); - *(bp + 1) = (png_byte)(value & 0xff); - } - } - break; - } - } - } -} -#endif - -#if defined(PNG_READ_16_TO_8_SUPPORTED) -/* chop rows of bit depth 16 down to 8 */ -void -png_do_chop(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_chop\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL && row_info->bit_depth == 16) -#else - if (row_info->bit_depth == 16) -#endif - { - png_bytep sp, dp; - png_uint_32 i; - - sp = row; - dp = row; - for (i = 0; i < row_info->width * row_info->channels; i++, sp += 2, dp++) - { -#if defined(PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED) - /* This does a more accurate scaling of the 16-bit color - * value, rather than a simple low-byte truncation. - * - * What the ideal calculation should be: - *dp = (((((png_uint_32)(*sp) << 8) | - (png_uint_32)(*(sp + 1))) * 255 + 127) / (png_uint_32)65535L; - - - * GRR: no, I think this is what it really should be: - *dp = (((((png_uint_32)(*sp) << 8) | - (png_uint_32)(*(sp + 1))) + 128L) / (png_uint_32)257L; - - * GRR: here's the exact calculation with shifts: - temp = (((png_uint_32)(*sp) << 8) | (png_uint_32)(*(sp + 1))) + 128L; - *dp = (temp - (temp >> 8)) >> 8; - - - * Approximate calculation with shift/add instead of multiply/divide: - *dp = ((((png_uint_32)(*sp) << 8) | - (png_uint_32)((int)(*(sp + 1)) - *sp)) + 128) >> 8; - - * What we actually do to avoid extra shifting and conversion: */ - *dp = *sp + ((((int)(*(sp + 1)) - *sp) > 128) ? 1 : 0); -#else - *dp = *sp; -#endif - } - row_info->bit_depth = 8; - row_info->pixel_depth = (png_byte)(8 * row_info->channels); - row_info->rowbytes = row_info->width * row_info->channels; - } -} -#endif - -#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) -void -png_do_read_swap_alpha(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_read_swap_alpha\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL) -#endif - { - if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) - { - /* This converts from RGBA to ARGB */ - if (row_info->bit_depth == 8) - { - png_bytep sp, dp; - png_byte save; - png_uint_32 i; - - for (i = 0, sp = dp = row + row_info->rowbytes; - i < row_info->width; i++) - { - save = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = save; - } - } - /* This converts from RRGGBBAA to AARRGGBB */ - else - { - png_bytep sp, dp; - png_byte save[2]; - png_uint_32 i; - - for (i = 0, sp = dp = row + row_info->rowbytes; - i < row_info->width; i++) - { - save[0] = *(--sp); - save[1] = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = save[0]; - *(--dp) = save[1]; - } - } - } - else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - { - /* This converts from GA to AG */ - if (row_info->bit_depth == 8) - { - png_bytep sp, dp; - png_byte save; - png_uint_32 i; - - for (i = 0, sp = dp = row + row_info->rowbytes; - i < row_info->width; i++) - { - save = *(--sp); - *(--dp) = *(--sp); - *(--dp) = save; - } - } - /* This converts from GGAA to AAGG */ - else - { - png_bytep sp, dp; - png_byte save[2]; - png_uint_32 i; - - for (i = 0, sp = dp = row + row_info->rowbytes; - i < row_info->width; i++) - { - save[0] = *(--sp); - save[1] = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = save[0]; - *(--dp) = save[1]; - } - } - } - } -} -#endif - -#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) -void -png_do_read_invert_alpha(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_read_invert_alpha\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL) -#endif - { - if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) - { - /* This inverts the alpha channel in RGBA */ - if (row_info->bit_depth == 8) - { - png_bytep sp, dp; - png_uint_32 i; - - for (i = 0, sp = dp = row + row_info->rowbytes; - i < row_info->width; i++) - { - *(--dp) = 255 - *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - } - } - /* This inverts the alpha channel in RRGGBBAA */ - else - { - png_bytep sp, dp; - png_uint_32 i; - - for (i = 0, sp = dp = row + row_info->rowbytes; - i < row_info->width; i++) - { - *(--dp) = 255 - *(--sp); - *(--dp) = 255 - *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - } - } - } - else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - { - /* This inverts the alpha channel in GA */ - if (row_info->bit_depth == 8) - { - png_bytep sp, dp; - png_uint_32 i; - - for (i = 0, sp = dp = row + row_info->rowbytes; - i < row_info->width; i++) - { - *(--dp) = 255 - *(--sp); - *(--dp) = *(--sp); - } - } - /* This inverts the alpha channel in GGAA */ - else - { - png_bytep sp, dp; - png_uint_32 i; - - for (i = 0, sp = dp = row + row_info->rowbytes; - i < row_info->width; i++) - { - *(--dp) = 255 - *(--sp); - *(--dp) = 255 - *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - } - } - } - } -} -#endif - -#if defined(PNG_READ_FILLER_SUPPORTED) -/* Add filler channel if we have RGB color */ -void -png_do_read_filler(png_row_infop row_info, png_bytep row, - png_uint_32 filler, png_uint_32 flags) -{ - png_bytep sp, dp; - png_uint_32 i; - - png_debug(1, "in png_do_read_filler\n"); - if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - row_info->color_type == PNG_COLOR_TYPE_RGB && row_info->bit_depth == 8) - { - /* This changes the data from RGB to RGBX */ - if (flags & PNG_FLAG_FILLER_AFTER) - { - for (i = 1, sp = row + (png_size_t)row_info->width * 3, - dp = row + (png_size_t)row_info->width * 4; - i < row_info->width; - i++) - { - *(--dp) = (png_byte)filler; - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - } - *(--dp) = (png_byte)filler; - row_info->channels = 4; - row_info->pixel_depth = 32; - row_info->rowbytes = row_info->width * 4; - } - /* This changes the data from RGB to XRGB */ - else - { - for (i = 0, sp = row + (png_size_t)row_info->width * 3, - dp = row + (png_size_t)row_info->width * 4; - i < row_info->width; - i++) - { - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = (png_byte)filler; - } - row_info->channels = 4; - row_info->pixel_depth = 32; - row_info->rowbytes = row_info->width * 4; - } - } -} -#endif - -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) -/* expand grayscale files to RGB, with or without alpha */ -void -png_do_gray_to_rgb(png_row_infop row_info, png_bytep row) -{ - png_bytep sp, dp; - png_uint_32 i; - - png_debug(1, "in png_do_gray_to_rgb\n"); - if (row_info->bit_depth >= 8 && -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - !(row_info->color_type & PNG_COLOR_MASK_COLOR)) - { - if (row_info->color_type == PNG_COLOR_TYPE_GRAY) - { - if (row_info->bit_depth == 8) - { - for (i = 0, sp = row + (png_size_t)row_info->width - 1, - dp = row + (png_size_t)row_info->width * 3 - 1; - i < row_info->width; - i++) - { - *(dp--) = *sp; - *(dp--) = *sp; - *(dp--) = *sp; - sp--; - } - } - else - { - for (i = 0, sp = row + (png_size_t)row_info->width * 2 - 1, - dp = row + (png_size_t)row_info->width * 6 - 1; - i < row_info->width; - i++) - { - *(dp--) = *sp; - *(dp--) = *(sp - 1); - *(dp--) = *sp; - *(dp--) = *(sp - 1); - *(dp--) = *sp; - *(dp--) = *(sp - 1); - sp--; - sp--; - } - } - } - else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - { - if (row_info->bit_depth == 8) - { - for (i = 0, sp = row + (png_size_t)row_info->width * 2 - 1, - dp = row + (png_size_t)row_info->width * 4 - 1; - i < row_info->width; - i++) - { - *(dp--) = *(sp--); - *(dp--) = *sp; - *(dp--) = *sp; - *(dp--) = *sp; - sp--; - } - } - else - { - for (i = 0, sp = row + (png_size_t)row_info->width * 4 - 1, - dp = row + (png_size_t)row_info->width * 8 - 1; - i < row_info->width; - i++) - { - *(dp--) = *(sp--); - *(dp--) = *(sp--); - *(dp--) = *sp; - *(dp--) = *(sp - 1); - *(dp--) = *sp; - *(dp--) = *(sp - 1); - *(dp--) = *sp; - *(dp--) = *(sp - 1); - sp--; - sp--; - } - } - } - row_info->channels += (png_byte)2; - row_info->color_type |= PNG_COLOR_MASK_COLOR; - row_info->pixel_depth = (png_byte)(row_info->channels * - row_info->bit_depth); - row_info->rowbytes = ((row_info->width * - row_info->pixel_depth + 7) >> 3); - } -} -#endif - -/* Build a grayscale palette. Palette is assumed to be 1 << bit_depth - * large of png_color. This lets grayscale images be treated as - * paletted. Most useful for gamma correction and simplification - * of code. - */ -void -png_build_grayscale_palette(int bit_depth, png_colorp palette) -{ - int num_palette; - int color_inc; - int i; - int v; - - png_debug(1, "in png_do_build_grayscale_palette\n"); - if (palette == NULL) - return; - - switch (bit_depth) - { - case 1: - num_palette = 2; - color_inc = 0xff; - break; - case 2: - num_palette = 4; - color_inc = 0x55; - break; - case 4: - num_palette = 16; - color_inc = 0x11; - break; - case 8: - num_palette = 256; - color_inc = 1; - break; - default: - num_palette = 0; - color_inc = 0; - break; - } - - for (i = 0, v = 0; i < num_palette; i++, v += color_inc) - { - palette[i].red = (png_byte)v; - palette[i].green = (png_byte)v; - palette[i].blue = (png_byte)v; - } -} - -/* This function is currently unused. Do we really need it? */ -#if defined(PNG_READ_DITHER_SUPPORTED) && defined(PNG_CORRECT_PALETTE_SUPPORTED) -void -png_correct_palette(png_structp png_ptr, png_colorp palette, - int num_palette) -{ - png_debug(1, "in png_correct_palette\n"); -#if defined(PNG_READ_BACKGROUND_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED) - if ((png_ptr->transformations & (PNG_GAMMA)) && - (png_ptr->transformations & (PNG_BACKGROUND))) - { - png_color back, back_1; - - if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_FILE) - { - back.red = png_ptr->gamma_table[png_ptr->background.red]; - back.green = png_ptr->gamma_table[png_ptr->background.green]; - back.blue = png_ptr->gamma_table[png_ptr->background.blue]; - - back_1.red = png_ptr->gamma_to_1[png_ptr->background.red]; - back_1.green = png_ptr->gamma_to_1[png_ptr->background.green]; - back_1.blue = png_ptr->gamma_to_1[png_ptr->background.blue]; - } - else - { - double g; - - g = 1.0 / (png_ptr->background_gamma * png_ptr->screen_gamma); - - if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_SCREEN || - fabs(g - 1.0) < PNG_GAMMA_THRESHOLD) - { - back.red = png_ptr->background.red; - back.green = png_ptr->background.green; - back.blue = png_ptr->background.blue; - } - else - { - back.red = - (png_byte)(pow((double)png_ptr->background.red/255, g) * - 255.0 + 0.5); - back.green = - (png_byte)(pow((double)png_ptr->background.green/255, g) * - 255.0 + 0.5); - back.blue = - (png_byte)(pow((double)png_ptr->background.blue/255, g) * - 255.0 + 0.5); - } - - g = 1.0 / png_ptr->background_gamma; - - back_1.red = - (png_byte)(pow((double)png_ptr->background.red/255, g) * - 255.0 + 0.5); - back_1.green = - (png_byte)(pow((double)png_ptr->background.green/255, g) * - 255.0 + 0.5); - back_1.blue = - (png_byte)(pow((double)png_ptr->background.blue/255, g) * - 255.0 + 0.5); - } - - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - png_uint_32 i; - - for (i = 0; i < (png_uint_32)num_palette; i++) - { - if (i < png_ptr->num_trans && png_ptr->trans[i] == 0) - { - palette[i] = back; - } - else if (i < png_ptr->num_trans && png_ptr->trans[i] != 0xff) - { - png_byte v, w; - - v = png_ptr->gamma_to_1[png_ptr->palette[i].red]; - png_composite(w, v, png_ptr->trans[i], back_1.red); - palette[i].red = png_ptr->gamma_from_1[w]; - - v = png_ptr->gamma_to_1[png_ptr->palette[i].green]; - png_composite(w, v, png_ptr->trans[i], back_1.green); - palette[i].green = png_ptr->gamma_from_1[w]; - - v = png_ptr->gamma_to_1[png_ptr->palette[i].blue]; - png_composite(w, v, png_ptr->trans[i], back_1.blue); - palette[i].blue = png_ptr->gamma_from_1[w]; - } - else - { - palette[i].red = png_ptr->gamma_table[palette[i].red]; - palette[i].green = png_ptr->gamma_table[palette[i].green]; - palette[i].blue = png_ptr->gamma_table[palette[i].blue]; - } - } - } - else - { - int i; - - for (i = 0; i < num_palette; i++) - { - if (palette[i].red == (png_byte)png_ptr->trans_values.gray) - { - palette[i] = back; - } - else - { - palette[i].red = png_ptr->gamma_table[palette[i].red]; - palette[i].green = png_ptr->gamma_table[palette[i].green]; - palette[i].blue = png_ptr->gamma_table[palette[i].blue]; - } - } - } - } - else -#endif -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (png_ptr->transformations & PNG_GAMMA) - { - int i; - - for (i = 0; i < num_palette; i++) - { - palette[i].red = png_ptr->gamma_table[palette[i].red]; - palette[i].green = png_ptr->gamma_table[palette[i].green]; - palette[i].blue = png_ptr->gamma_table[palette[i].blue]; - } - } -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - else -#endif -#endif -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - if (png_ptr->transformations & PNG_BACKGROUND) - { - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - png_color back; - - back.red = (png_byte)png_ptr->background.red; - back.green = (png_byte)png_ptr->background.green; - back.blue = (png_byte)png_ptr->background.blue; - - for (i = 0; i < (int)png_ptr->num_trans; i++) - { - if (png_ptr->trans[i] == 0) - { - palette[i].red = back.red; - palette[i].green = back.green; - palette[i].blue = back.blue; - } - else if (png_ptr->trans[i] != 0xff) - { - png_composite(palette[i].red, png_ptr->palette[i].red, - png_ptr->trans[i], back.red); - png_composite(palette[i].green, png_ptr->palette[i].green, - png_ptr->trans[i], back.green); - png_composite(palette[i].blue, png_ptr->palette[i].blue, - png_ptr->trans[i], back.blue); - } - } - } - else /* assume grayscale palette (what else could it be?) */ - { - int i; - - for (i = 0; i < num_palette; i++) - { - if (i == (png_byte)png_ptr->trans_values.gray) - { - palette[i].red = (png_byte)png_ptr->background.red; - palette[i].green = (png_byte)png_ptr->background.green; - palette[i].blue = (png_byte)png_ptr->background.blue; - } - } - } - } -#endif -} -#endif - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) -/* Replace any alpha or transparency with the supplied background color. - * "background" is already in the screen gamma, while "background_1" is - * at a gamma of 1.0. Paletted files have already been taken care of. - */ -void -png_do_background(png_row_infop row_info, png_bytep row, - png_color_16p trans_values, png_color_16p background, - png_color_16p background_1, - png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1, - png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1, - png_uint_16pp gamma_16_to_1, int gamma_shift) -{ - png_bytep sp, dp; - png_uint_32 i; - int shift; - - png_debug(1, "in png_do_background\n"); - if (background != NULL && -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - (!(row_info->color_type & PNG_COLOR_MASK_ALPHA) || - (row_info->color_type != PNG_COLOR_TYPE_PALETTE && trans_values))) - { - switch (row_info->color_type) - { - case PNG_COLOR_TYPE_GRAY: - { - switch (row_info->bit_depth) - { - case 1: - { - sp = row; - shift = 7; - for (i = 0; i < row_info->width; i++) - { - if ((png_uint_16)((*sp >> shift) & 0x1) - == trans_values->gray) - { - *sp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff); - *sp |= (png_byte)(background->gray << shift); - } - if (!shift) - { - shift = 7; - sp++; - } - else - shift--; - } - break; - } - case 2: - { - sp = row; - shift = 6; - for (i = 0; i < row_info->width; i++) - { - if ((png_uint_16)((*sp >> shift) & 0x3) - == trans_values->gray) - { - *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); - *sp |= (png_byte)(background->gray << shift); - } - if (!shift) - { - shift = 6; - sp++; - } - else - shift -= 2; - } - break; - } - case 4: - { - sp = row; - shift = 4; - for (i = 0; i < row_info->width; i++) - { - if ((png_uint_16)((*sp >> shift) & 0xf) - == trans_values->gray) - { - *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); - *sp |= (png_byte)(background->gray << shift); - } - if (!shift) - { - shift = 4; - sp++; - } - else - shift -= 4; - } - break; - } - case 8: - { -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (gamma_table != NULL) - { - for (i = 0, sp = row; i < row_info->width; i++, sp++) - { - if (*sp == trans_values->gray) - { - *sp = (png_byte)background->gray; - } - else - { - *sp = gamma_table[*sp]; - } - } - } - else -#endif - { - for (i = 0, sp = row; i < row_info->width; i++, sp++) - { - if (*sp == trans_values->gray) - { - *sp = (png_byte)background->gray; - } - } - } - break; - } - case 16: - { -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (gamma_16 != NULL) - { - for (i = 0, sp = row; i < row_info->width; i++, sp += 2) - { - png_uint_16 v; - - v = ((png_uint_16)(*sp) << 8) + *(sp + 1); - if (v == trans_values->gray) - { - /* background is already in screen gamma */ - *sp = (png_byte)((background->gray >> 8) & 0xff); - *(sp + 1) = (png_byte)(background->gray & 0xff); - } - else - { - v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; - *sp = (png_byte)((v >> 8) & 0xff); - *(sp + 1) = (png_byte)(v & 0xff); - } - } - } - else -#endif - { - for (i = 0, sp = row; i < row_info->width; i++, sp += 2) - { - png_uint_16 v; - - v = ((png_uint_16)(*sp) << 8) + *(sp + 1); - if (v == trans_values->gray) - { - *sp = (png_byte)((background->gray >> 8) & 0xff); - *(sp + 1) = (png_byte)(background->gray & 0xff); - } - } - } - break; - } - } - break; - } - case PNG_COLOR_TYPE_RGB: - { - if (row_info->bit_depth == 8) - { -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (gamma_table != NULL) - { - for (i = 0, sp = row; i < row_info->width; i++, sp += 3) - { - if (*sp == trans_values->red && - *(sp + 1) == trans_values->green && - *(sp + 2) == trans_values->blue) - { - *sp = (png_byte)background->red; - *(sp + 1) = (png_byte)background->green; - *(sp + 2) = (png_byte)background->blue; - } - else - { - *sp = gamma_table[*sp]; - *(sp + 1) = gamma_table[*(sp + 1)]; - *(sp + 2) = gamma_table[*(sp + 2)]; - } - } - } - else -#endif - { - for (i = 0, sp = row; i < row_info->width; i++, sp += 3) - { - if (*sp == trans_values->red && - *(sp + 1) == trans_values->green && - *(sp + 2) == trans_values->blue) - { - *sp = (png_byte)background->red; - *(sp + 1) = (png_byte)background->green; - *(sp + 2) = (png_byte)background->blue; - } - } - } - } - else /* if (row_info->bit_depth == 16) */ - { -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (gamma_16 != NULL) - { - for (i = 0, sp = row; i < row_info->width; i++, sp += 6) - { - png_uint_16 r, g, b; - - r = ((png_uint_16)(*sp) << 8) + *(sp + 1); - g = ((png_uint_16)(*(sp + 2)) << 8) + *(sp + 3); - b = ((png_uint_16)(*(sp + 4)) << 8) + *(sp + 5); - if (r == trans_values->red && g == trans_values->green && - b == trans_values->blue) - { - /* background is already in screen gamma */ - *sp = (png_byte)((background->red >> 8) & 0xff); - *(sp + 1) = (png_byte)(background->red & 0xff); - *(sp + 2) = (png_byte)((background->green >> 8) & 0xff); - *(sp + 3) = (png_byte)(background->green & 0xff); - *(sp + 4) = (png_byte)((background->blue >> 8) & 0xff); - *(sp + 5) = (png_byte)(background->blue & 0xff); - } - else - { - png_uint_16 v; - v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; - *sp = (png_byte)((v >> 8) & 0xff); - *(sp + 1) = (png_byte)(v & 0xff); - v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)]; - *(sp + 2) = (png_byte)((v >> 8) & 0xff); - *(sp + 3) = (png_byte)(v & 0xff); - v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)]; - *(sp + 4) = (png_byte)((v >> 8) & 0xff); - *(sp + 5) = (png_byte)(v & 0xff); - } - } - } - else -#endif - { - for (i = 0, sp = row; i < row_info->width; i++, sp += 6) - { - png_uint_16 r, g, b; - - r = ((png_uint_16)(*sp) << 8) + *(sp + 1); - g = ((png_uint_16)(*(sp + 2)) << 8) + *(sp + 3); - b = ((png_uint_16)(*(sp + 4)) << 8) + *(sp + 5); - if (r == trans_values->red && g == trans_values->green && - b == trans_values->blue) - { - *sp = (png_byte)((background->red >> 8) & 0xff); - *(sp + 1) = (png_byte)(background->red & 0xff); - *(sp + 2) = (png_byte)((background->green >> 8) & 0xff); - *(sp + 3) = (png_byte)(background->green & 0xff); - *(sp + 4) = (png_byte)((background->blue >> 8) & 0xff); - *(sp + 5) = (png_byte)(background->blue & 0xff); - } - } - } - } - break; - } - case PNG_COLOR_TYPE_GRAY_ALPHA: - { - if (row_info->bit_depth == 8) - { -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (gamma_to_1 != NULL && gamma_from_1 != NULL && - gamma_table != NULL) - { - for (i = 0, sp = row, dp = row; - i < row_info->width; i++, sp += 2, dp++) - { - png_uint_16 a; - - a = *(sp + 1); - if (a == 0xff) - { - *dp = gamma_table[*sp]; - } - else if (a == 0) - { - /* background is already in screen gamma */ - *dp = (png_byte)background->gray; - } - else - { - png_byte v, w; - - v = gamma_to_1[*sp]; - png_composite(w, v, a, background_1->gray); - *dp = gamma_from_1[w]; - } - } - } - else -#endif - { - for (i = 0, sp = row, dp = row; - i < row_info->width; i++, sp += 2, dp++) - { - png_byte a; - - a = *(sp + 1); - if (a == 0xff) - { - *dp = *sp; - } - else if (a == 0) - { - *dp = (png_byte)background->gray; - } - else - { - png_composite(*dp, *sp, a, background_1->gray); - } - } - } - } - else /* if (png_ptr->bit_depth == 16) */ - { -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (gamma_16 != NULL && gamma_16_from_1 != NULL && - gamma_16_to_1 != NULL) - { - for (i = 0, sp = row, dp = row; - i < row_info->width; i++, sp += 4, dp += 2) - { - png_uint_16 a; - - a = ((png_uint_16)(*(sp + 2)) << 8) + *(sp + 3); - if (a == (png_uint_16)0xffff) - { - png_uint_16 v; - - v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; - *dp = (png_byte)((v >> 8) & 0xff); - *(dp + 1) = (png_byte)(v & 0xff); - } - else if (a == 0) - { - /* background is already in screen gamma */ - *dp = (png_byte)((background->gray >> 8) & 0xff); - *(dp + 1) = (png_byte)(background->gray & 0xff); - } - else - { - png_uint_16 g, v, w; - - g = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp]; - png_composite_16(v, g, a, background_1->gray); - w = gamma_16_from_1[(v&0xff) >> gamma_shift][v >> 8]; - *dp = (png_byte)((w >> 8) & 0xff); - *(dp + 1) = (png_byte)(w & 0xff); - } - } - } - else -#endif - { - for (i = 0, sp = row, dp = row; - i < row_info->width; i++, sp += 4, dp += 2) - { - png_uint_16 a; - - a = ((png_uint_16)(*(sp + 2)) << 8) + *(sp + 3); - if (a == (png_uint_16)0xffff) - { - png_memcpy(dp, sp, 2); - } - else if (a == 0) - { - *dp = (png_byte)((background->gray >> 8) & 0xff); - *(dp + 1) = (png_byte)(background->gray & 0xff); - } - else - { - png_uint_16 g, v; - - g = ((png_uint_16)(*sp) << 8) + *(sp + 1); - png_composite_16(v, g, a, background_1->gray); - *dp = (png_byte)((v >> 8) & 0xff); - *(dp + 1) = (png_byte)(v & 0xff); - } - } - } - } - break; - } - case PNG_COLOR_TYPE_RGB_ALPHA: - { - if (row_info->bit_depth == 8) - { -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (gamma_to_1 != NULL && gamma_from_1 != NULL && - gamma_table != NULL) - { - for (i = 0, sp = row, dp = row; - i < row_info->width; i++, sp += 4, dp += 3) - { - png_byte a; - - a = *(sp + 3); - if (a == 0xff) - { - *dp = gamma_table[*sp]; - *(dp + 1) = gamma_table[*(sp + 1)]; - *(dp + 2) = gamma_table[*(sp + 2)]; - } - else if (a == 0) - { - /* background is already in screen gamma */ - *dp = (png_byte)background->red; - *(dp + 1) = (png_byte)background->green; - *(dp + 2) = (png_byte)background->blue; - } - else - { - png_byte v, w; - - v = gamma_to_1[*sp]; - png_composite(w, v, a, background_1->red); - *dp = gamma_from_1[w]; - v = gamma_to_1[*(sp + 1)]; - png_composite(w, v, a, background_1->green); - *(dp + 1) = gamma_from_1[w]; - v = gamma_to_1[*(sp + 2)]; - png_composite(w, v, a, background_1->blue); - *(dp + 2) = gamma_from_1[w]; - } - } - } - else -#endif - { - for (i = 0, sp = row, dp = row; - i < row_info->width; i++, sp += 4, dp += 3) - { - png_byte a; - - a = *(sp + 3); - if (a == 0xff) - { - *dp = *sp; - *(dp + 1) = *(sp + 1); - *(dp + 2) = *(sp + 2); - } - else if (a == 0) - { - *dp = (png_byte)background->red; - *(dp + 1) = (png_byte)background->green; - *(dp + 2) = (png_byte)background->blue; - } - else - { - png_composite(*dp, *sp, a, background->red); - png_composite(*(dp + 1), *(sp + 1), a, - background->green); - png_composite(*(dp + 2), *(sp + 2), a, - background->blue); - } - } - } - } - else /* if (row_info->bit_depth == 16) */ - { -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (gamma_16 != NULL && gamma_16_from_1 != NULL && - gamma_16_to_1 != NULL) - { - for (i = 0, sp = row, dp = row; - i < row_info->width; i++, sp += 8, dp += 6) - { - png_uint_16 a; - - a = (png_uint_16)(((png_uint_16)(*(sp + 6)) << 8) + - (png_uint_16)(*(sp + 7))); - if (a == (png_uint_16)0xffff) - { - png_uint_16 v; - - v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; - *dp = (png_byte)((v >> 8) & 0xff); - *(dp + 1) = (png_byte)(v & 0xff); - v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)]; - *(dp + 2) = (png_byte)((v >> 8) & 0xff); - *(dp + 3) = (png_byte)(v & 0xff); - v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)]; - *(dp + 4) = (png_byte)((v >> 8) & 0xff); - *(dp + 5) = (png_byte)(v & 0xff); - } - else if (a == 0) - { - /* background is already in screen gamma */ - *dp = (png_byte)((background->red >> 8) & 0xff); - *(dp + 1) = (png_byte)(background->red & 0xff); - *(dp + 2) = (png_byte)((background->green >> 8) & 0xff); - *(dp + 3) = (png_byte)(background->green & 0xff); - *(dp + 4) = (png_byte)((background->blue >> 8) & 0xff); - *(dp + 5) = (png_byte)(background->blue & 0xff); - } - else - { - png_uint_16 v, w, x; - - v = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp]; - png_composite_16(w, v, a, background->red); - x = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8]; - *dp = (png_byte)((x >> 8) & 0xff); - *(dp + 1) = (png_byte)(x & 0xff); - v = gamma_16_to_1[*(sp + 3) >> gamma_shift][*(sp + 2)]; - png_composite_16(w, v, a, background->green); - x = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8]; - *(dp + 2) = (png_byte)((x >> 8) & 0xff); - *(dp + 3) = (png_byte)(x & 0xff); - v = gamma_16_to_1[*(sp + 5) >> gamma_shift][*(sp + 4)]; - png_composite_16(w, v, a, background->blue); - x = gamma_16_from_1[(w & 0xff) >> gamma_shift][w >> 8]; - *(dp + 4) = (png_byte)((x >> 8) & 0xff); - *(dp + 5) = (png_byte)(x & 0xff); - } - } - } - else -#endif - { - for (i = 0, sp = row, dp = row; - i < row_info->width; i++, sp += 8, dp += 6) - { - png_uint_16 a; - - a = (png_uint_16)(((png_uint_16)(*(sp + 6)) << 8) + - (png_uint_16)(*(sp + 7))); - if (a == (png_uint_16)0xffff) - { - png_memcpy(dp, sp, 6); - } - else if (a == 0) - { - *dp = (png_byte)((background->red >> 8) & 0xff); - *(dp + 1) = (png_byte)(background->red & 0xff); - *(dp + 2) = (png_byte)((background->green >> 8) & 0xff); - *(dp + 3) = (png_byte)(background->green & 0xff); - *(dp + 4) = (png_byte)((background->blue >> 8) & 0xff); - *(dp + 5) = (png_byte)(background->blue & 0xff); - } - else - { - png_uint_16 r, g, b, v; - - r = ((png_uint_16)(*sp) << 8) + *(sp + 1); - g = ((png_uint_16)(*(sp + 2)) << 8) + *(sp + 3); - b = ((png_uint_16)(*(sp + 4)) << 8) + *(sp + 5); - - png_composite_16(v, r, a, background->red); - *dp = (png_byte)((v >> 8) & 0xff); - *(dp + 1) = (png_byte)(v & 0xff); - png_composite_16(v, g, a, background->green); - *(dp + 2) = (png_byte)((v >> 8) & 0xff); - *(dp + 3) = (png_byte)(v & 0xff); - png_composite_16(v, b, a, background->blue); - *(dp + 4) = (png_byte)((v >> 8) & 0xff); - *(dp + 5) = (png_byte)(v & 0xff); - } - } - } - } - break; - } - } - - if (row_info->color_type & PNG_COLOR_MASK_ALPHA) - { - row_info->color_type &= ~PNG_COLOR_MASK_ALPHA; - row_info->channels--; - row_info->pixel_depth = (png_byte)(row_info->channels * - row_info->bit_depth); - row_info->rowbytes = ((row_info->width * - row_info->pixel_depth + 7) >> 3); - } - } -} -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) -/* Gamma correct the image, avoiding the alpha channel. Make sure - * you do this after you deal with the trasparency issue on grayscale - * or rgb images. If your bit depth is 8, use gamma_table, if it - * is 16, use gamma_16_table and gamma_shift. Build these with - * build_gamma_table(). - */ -void -png_do_gamma(png_row_infop row_info, png_bytep row, - png_bytep gamma_table, png_uint_16pp gamma_16_table, - int gamma_shift) -{ - png_bytep sp; - png_uint_32 i; - - png_debug(1, "in png_do_gamma\n"); - if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - ((row_info->bit_depth <= 8 && gamma_table != NULL) || - (row_info->bit_depth == 16 && gamma_16_table != NULL))) - { - switch (row_info->color_type) - { - case PNG_COLOR_TYPE_RGB: - { - if (row_info->bit_depth == 8) - { - for (i = 0, sp = row; i < row_info->width; i++) - { - *sp = gamma_table[*sp]; - sp++; - *sp = gamma_table[*sp]; - sp++; - *sp = gamma_table[*sp]; - sp++; - } - } - else /* if (row_info->bit_depth == 16) */ - { - for (i = 0, sp = row; i < row_info->width; i++) - { - png_uint_16 v; - - v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; - *sp = (png_byte)((v >> 8) & 0xff); - *(sp + 1) = (png_byte)(v & 0xff); - sp += 2; - v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; - *sp = (png_byte)((v >> 8) & 0xff); - *(sp + 1) = (png_byte)(v & 0xff); - sp += 2; - v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; - *sp = (png_byte)((v >> 8) & 0xff); - *(sp + 1) = (png_byte)(v & 0xff); - sp += 2; - } - } - break; - } - case PNG_COLOR_TYPE_RGB_ALPHA: - { - if (row_info->bit_depth == 8) - { - for (i = 0, sp = row; - i < row_info->width; i++) - { - *sp = gamma_table[*sp]; - sp++; - *sp = gamma_table[*sp]; - sp++; - *sp = gamma_table[*sp]; - sp++; - sp++; - } - } - else /* if (row_info->bit_depth == 16) */ - { - for (i = 0, sp = row; - i < row_info->width; i++) - { - png_uint_16 v; - - v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; - *sp = (png_byte)((v >> 8) & 0xff); - *(sp + 1) = (png_byte)(v & 0xff); - sp += 2; - v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; - *sp = (png_byte)((v >> 8) & 0xff); - *(sp + 1) = (png_byte)(v & 0xff); - sp += 2; - v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; - *sp = (png_byte)((v >> 8) & 0xff); - *(sp + 1) = (png_byte)(v & 0xff); - sp += 4; - } - } - break; - } - case PNG_COLOR_TYPE_GRAY_ALPHA: - { - if (row_info->bit_depth == 8) - { - for (i = 0, sp = row; - i < row_info->width; i++) - { - *sp = gamma_table[*sp]; - sp += 2; - } - } - else /* if (row_info->bit_depth == 16) */ - { - for (i = 0, sp = row; - i < row_info->width; i++) - { - png_uint_16 v; - - v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; - *sp = (png_byte)((v >> 8) & 0xff); - *(sp + 1) = (png_byte)(v & 0xff); - sp += 4; - } - } - break; - } - case PNG_COLOR_TYPE_GRAY: - { - if (row_info->bit_depth == 2) - { - for (i = 0, sp = row; i < row_info->width; i += 4) - { - int a = *sp & 0xc0; - int b = *sp & 0x30; - int c = *sp & 0x0c; - int d = *sp & 0x03; - - *sp = ((((int)gamma_table[a|(a>>2)|(a>>4)|(a>>6)]) ) & 0xc0)| - ((((int)gamma_table[(b<<2)|b|(b>>2)|(b>>4)])>>2) & 0x30)| - ((((int)gamma_table[(c<<4)|(c<<2)|c|(c>>2)])>>4) & 0x0c)| - ((((int)gamma_table[(d<<6)|(d<<4)|(d<<2)|d])>>6) ); - sp++; - } - } - if (row_info->bit_depth == 4) - { - for (i = 0, sp = row; i < row_info->width; i += 2) - { - int msb = *sp & 0xf0; - int lsb = *sp & 0x0f; - - *sp = (((int)gamma_table[msb | (msb >> 4)]) & 0xf0) | - (((int)gamma_table[(lsb << 4) | lsb]) >> 4); - sp++; - } - } - else if (row_info->bit_depth == 8) - { - for (i = 0, sp = row; i < row_info->width; i++) - { - *sp = gamma_table[*sp]; - sp++; - } - } - else if (row_info->bit_depth == 16) - { - for (i = 0, sp = row; i < row_info->width; i++) - { - png_uint_16 v; - - v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; - *sp = (png_byte)((v >> 8) & 0xff); - *(sp + 1) = (png_byte)(v & 0xff); - sp += 2; - } - } - break; - } - } - } -} -#endif - -#if defined(PNG_READ_EXPAND_SUPPORTED) -/* Expands a palette row to an rgb or rgba row depending - * upon whether you supply trans and num_trans. - */ -void -png_do_expand_palette(png_row_infop row_info, png_bytep row, - png_colorp palette, png_bytep trans, int num_trans) -{ - int shift, value; - png_bytep sp, dp; - png_uint_32 i; - - png_debug(1, "in png_do_expand_palette\n"); - if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - row_info->color_type == PNG_COLOR_TYPE_PALETTE) - { - if (row_info->bit_depth < 8) - { - switch (row_info->bit_depth) - { - case 1: - { - sp = row + (png_size_t)((row_info->width - 1) >> 3); - dp = row + (png_size_t)row_info->width - 1; - shift = 7 - (int)((row_info->width + 7) & 7); - for (i = 0; i < row_info->width; i++) - { - if ((*sp >> shift) & 0x1) - *dp = 1; - else - *dp = 0; - if (shift == 7) - { - shift = 0; - sp--; - } - else - shift++; - - dp--; - } - break; - } - case 2: - { - sp = row + (png_size_t)((row_info->width - 1) >> 2); - dp = row + (png_size_t)row_info->width - 1; - shift = (int)((3 - ((row_info->width + 3) & 3)) << 1); - for (i = 0; i < row_info->width; i++) - { - value = (*sp >> shift) & 0x3; - *dp = (png_byte)value; - if (shift == 6) - { - shift = 0; - sp--; - } - else - shift += 2; - - dp--; - } - break; - } - case 4: - { - sp = row + (png_size_t)((row_info->width - 1) >> 1); - dp = row + (png_size_t)row_info->width - 1; - shift = (int)((row_info->width & 1) << 2); - for (i = 0; i < row_info->width; i++) - { - value = (*sp >> shift) & 0xf; - *dp = (png_byte)value; - if (shift == 4) - { - shift = 0; - sp--; - } - else - shift += 4; - - dp--; - } - break; - } - } - row_info->bit_depth = 8; - row_info->pixel_depth = 8; - row_info->rowbytes = row_info->width; - } - switch (row_info->bit_depth) - { - case 8: - { - if (trans != NULL) - { - sp = row + (png_size_t)row_info->width - 1; - dp = row + (png_size_t)(row_info->width << 2) - 1; - - for (i = 0; i < row_info->width; i++) - { - if ((int)(*sp) >= num_trans) - *dp-- = 0xff; - else - *dp-- = trans[*sp]; - *dp-- = palette[*sp].blue; - *dp-- = palette[*sp].green; - *dp-- = palette[*sp].red; - sp--; - } - row_info->bit_depth = 8; - row_info->pixel_depth = 32; - row_info->rowbytes = row_info->width * 4; - row_info->color_type = 6; - row_info->channels = 4; - } - else - { - sp = row + (png_size_t)row_info->width - 1; - dp = row + (png_size_t)(row_info->width * 3) - 1; - - for (i = 0; i < row_info->width; i++) - { - *dp-- = palette[*sp].blue; - *dp-- = palette[*sp].green; - *dp-- = palette[*sp].red; - sp--; - } - row_info->bit_depth = 8; - row_info->pixel_depth = 24; - row_info->rowbytes = row_info->width * 3; - row_info->color_type = 2; - row_info->channels = 3; - } - break; - } - } - } -} - -/* If the bit depth < 8, it is expanded to 8. Also, if the - * transparency value is supplied, an alpha channel is built. - */ -void -png_do_expand(png_row_infop row_info, png_bytep row, - png_color_16p trans_value) -{ - int shift, value; - png_bytep sp, dp; - png_uint_32 i; - - png_debug(1, "in png_do_expand\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL) -#endif - { - if (row_info->color_type == PNG_COLOR_TYPE_GRAY) - { - png_uint_16 gray = trans_value ? trans_value->gray : 0; - - if (row_info->bit_depth < 8) - { - switch (row_info->bit_depth) - { - case 1: - { - gray *= 0xff; - sp = row + (png_size_t)((row_info->width - 1) >> 3); - dp = row + (png_size_t)row_info->width - 1; - shift = 7 - (int)((row_info->width + 7) & 7); - for (i = 0; i < row_info->width; i++) - { - if ((*sp >> shift) & 0x1) - *dp = 0xff; - else - *dp = 0; - if (shift == 7) - { - shift = 0; - sp--; - } - else - shift++; - - dp--; - } - break; - } - case 2: - { - gray *= 0x55; - sp = row + (png_size_t)((row_info->width - 1) >> 2); - dp = row + (png_size_t)row_info->width - 1; - shift = (int)((3 - ((row_info->width + 3) & 3)) << 1); - for (i = 0; i < row_info->width; i++) - { - value = (*sp >> shift) & 0x3; - *dp = (png_byte)(value | (value << 2) | (value << 4) | - (value << 6)); - if (shift == 6) - { - shift = 0; - sp--; - } - else - shift += 2; - - dp--; - } - break; - } - case 4: - { - gray *= 0x11; - sp = row + (png_size_t)((row_info->width - 1) >> 1); - dp = row + (png_size_t)row_info->width - 1; - shift = (int)((1 - ((row_info->width + 1) & 1)) << 2); - for (i = 0; i < row_info->width; i++) - { - value = (*sp >> shift) & 0xf; - *dp = (png_byte)(value | (value << 4)); - if (shift == 4) - { - shift = 0; - sp--; - } - else - shift = 4; - - dp--; - } - break; - } - } - row_info->bit_depth = 8; - row_info->pixel_depth = 8; - row_info->rowbytes = row_info->width; - } - - if (trans_value != NULL) - { - if (row_info->bit_depth == 8) - { - sp = row + (png_size_t)row_info->width - 1; - dp = row + (png_size_t)(row_info->width << 1) - 1; - for (i = 0; i < row_info->width; i++) - { - if (*sp == gray) - *dp-- = 0; - else - *dp-- = 0xff; - *dp-- = *sp--; - } - } - else if (row_info->bit_depth == 16) - { - sp = row + row_info->rowbytes - 1; - dp = row + (row_info->rowbytes << 1) - 1; - for (i = 0; i < row_info->width; i++) - { - if (((png_uint_16)*(sp) | - ((png_uint_16)*(sp - 1) << 8)) == gray) - { - *dp-- = 0; - *dp-- = 0; - } - else - { - *dp-- = 0xff; - *dp-- = 0xff; - } - *dp-- = *sp--; - *dp-- = *sp--; - } - } - row_info->color_type = PNG_COLOR_TYPE_GRAY_ALPHA; - row_info->channels = 2; - row_info->pixel_depth = (png_byte)(row_info->bit_depth << 1); - row_info->rowbytes = - ((row_info->width * row_info->pixel_depth) >> 3); - } - } - else if (row_info->color_type == PNG_COLOR_TYPE_RGB && trans_value) - { - if (row_info->bit_depth == 8) - { - sp = row + (png_size_t)row_info->rowbytes - 1; - dp = row + (png_size_t)(row_info->width << 2) - 1; - for (i = 0; i < row_info->width; i++) - { - if (*(sp - 2) == trans_value->red && - *(sp - 1) == trans_value->green && - *(sp - 0) == trans_value->blue) - *dp-- = 0; - else - *dp-- = 0xff; - *dp-- = *sp--; - *dp-- = *sp--; - *dp-- = *sp--; - } - } - else if (row_info->bit_depth == 16) - { - sp = row + row_info->rowbytes - 1; - dp = row + (png_size_t)(row_info->width << 3) - 1; - for (i = 0; i < row_info->width; i++) - { - if ((((png_uint_16)*(sp - 4) | - ((png_uint_16)*(sp - 5) << 8)) == trans_value->red) && - (((png_uint_16)*(sp - 2) | - ((png_uint_16)*(sp - 3) << 8)) == trans_value->green) && - (((png_uint_16)*(sp - 0) | - ((png_uint_16)*(sp - 1) << 8)) == trans_value->blue)) - { - *dp-- = 0; - *dp-- = 0; - } - else - { - *dp-- = 0xff; - *dp-- = 0xff; - } - *dp-- = *sp--; - *dp-- = *sp--; - *dp-- = *sp--; - *dp-- = *sp--; - *dp-- = *sp--; - *dp-- = *sp--; - } - } - row_info->color_type = PNG_COLOR_TYPE_RGB_ALPHA; - row_info->channels = 4; - row_info->pixel_depth = (png_byte)(row_info->bit_depth << 2); - row_info->rowbytes = - ((row_info->width * row_info->pixel_depth) >> 3); - } - } -} -#endif - -#if defined(PNG_READ_DITHER_SUPPORTED) -void -png_do_dither(png_row_infop row_info, png_bytep row, - png_bytep palette_lookup, png_bytep dither_lookup) -{ - png_bytep sp, dp; - png_uint_32 i; - - png_debug(1, "in png_do_dither\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL) -#endif - { - if (row_info->color_type == PNG_COLOR_TYPE_RGB && - palette_lookup && row_info->bit_depth == 8) - { - int r, g, b, p; - sp = row; - dp = row; - for (i = 0; i < row_info->width; i++) - { - r = *sp++; - g = *sp++; - b = *sp++; - - /* this looks real messy, but the compiler will reduce - it down to a reasonable formula. For example, with - 5 bits per color, we get: - p = (((r >> 3) & 0x1f) << 10) | - (((g >> 3) & 0x1f) << 5) | - ((b >> 3) & 0x1f); - */ - p = (((r >> (8 - PNG_DITHER_RED_BITS)) & - ((1 << PNG_DITHER_RED_BITS) - 1)) << - (PNG_DITHER_GREEN_BITS + PNG_DITHER_BLUE_BITS)) | - (((g >> (8 - PNG_DITHER_GREEN_BITS)) & - ((1 << PNG_DITHER_GREEN_BITS) - 1)) << - (PNG_DITHER_BLUE_BITS)) | - ((b >> (8 - PNG_DITHER_BLUE_BITS)) & - ((1 << PNG_DITHER_BLUE_BITS) - 1)); - - *dp++ = palette_lookup[p]; - } - row_info->color_type = PNG_COLOR_TYPE_PALETTE; - row_info->channels = 1; - row_info->pixel_depth = row_info->bit_depth; - row_info->rowbytes = - ((row_info->width * row_info->pixel_depth + 7) >> 3); - } - else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA && - palette_lookup != NULL && row_info->bit_depth == 8) - { - int r, g, b, p; - sp = row; - dp = row; - for (i = 0; i < row_info->width; i++) - { - r = *sp++; - g = *sp++; - b = *sp++; - sp++; - - p = (((r >> (8 - PNG_DITHER_RED_BITS)) & - ((1 << PNG_DITHER_RED_BITS) - 1)) << - (PNG_DITHER_GREEN_BITS + PNG_DITHER_BLUE_BITS)) | - (((g >> (8 - PNG_DITHER_GREEN_BITS)) & - ((1 << PNG_DITHER_GREEN_BITS) - 1)) << - (PNG_DITHER_BLUE_BITS)) | - ((b >> (8 - PNG_DITHER_BLUE_BITS)) & - ((1 << PNG_DITHER_BLUE_BITS) - 1)); - - *dp++ = palette_lookup[p]; - } - row_info->color_type = PNG_COLOR_TYPE_PALETTE; - row_info->channels = 1; - row_info->pixel_depth = row_info->bit_depth; - row_info->rowbytes = - ((row_info->width * row_info->pixel_depth + 7) >> 3); - } - else if (row_info->color_type == PNG_COLOR_TYPE_PALETTE && - dither_lookup && row_info->bit_depth == 8) - { - sp = row; - for (i = 0; i < row_info->width; i++, sp++) - { - *sp = dither_lookup[*sp]; - } - } - } -} -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) -static int png_gamma_shift[] = - {0x10, 0x21, 0x42, 0x84, 0x110, 0x248, 0x550, 0xff0}; - -/* We build the 8- or 16-bit gamma tables here. Note that for 16-bit - * tables, we don't make a full table if we are reducing to 8-bit in - * the future. Note also how the gamma_16 tables are segmented so that - * we don't need to allocate > 64K chunks for a full 16-bit table. - */ -void -png_build_gamma_table(png_structp png_ptr) -{ - png_debug(1, "in png_build_gamma_table\n"); - if (png_ptr->bit_depth <= 8) - { - int i; - double g; - - g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); - - png_ptr->gamma_table = (png_bytep)png_malloc(png_ptr, - (png_uint_32)256); - - for (i = 0; i < 256; i++) - { - png_ptr->gamma_table[i] = (png_byte)(pow((double)i / 255.0, - g) * 255.0 + .5); - } - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - if (png_ptr->transformations & PNG_BACKGROUND) - { - g = 1.0 / (png_ptr->gamma); - - png_ptr->gamma_to_1 = (png_bytep)png_malloc(png_ptr, - (png_uint_32)256); - - for (i = 0; i < 256; i++) - { - png_ptr->gamma_to_1[i] = (png_byte)(pow((double)i / 255.0, - g) * 255.0 + .5); - } - - g = 1.0 / (png_ptr->screen_gamma); - - png_ptr->gamma_from_1 = (png_bytep)png_malloc(png_ptr, - (png_uint_32)256); - - for (i = 0; i < 256; i++) - { - png_ptr->gamma_from_1[i] = (png_byte)(pow((double)i / 255.0, - g) * 255.0 + .5); - } - } -#endif /* PNG_BACKGROUND_SUPPORTED */ - } - else - { - double g; - int i, j, shift, num; - int sig_bit; - png_uint_32 ig; - - if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) - { - sig_bit = (int)png_ptr->sig_bit.red; - if ((int)png_ptr->sig_bit.green > sig_bit) - sig_bit = png_ptr->sig_bit.green; - if ((int)png_ptr->sig_bit.blue > sig_bit) - sig_bit = png_ptr->sig_bit.blue; - } - else - { - sig_bit = (int)png_ptr->sig_bit.gray; - } - - if (sig_bit > 0) - shift = 16 - sig_bit; - else - shift = 0; - - if (png_ptr->transformations & PNG_16_TO_8) - { - if (shift < (16 - PNG_MAX_GAMMA_8)) - shift = (16 - PNG_MAX_GAMMA_8); - } - - if (shift > 8) - shift = 8; - if (shift < 0) - shift = 0; - - png_ptr->gamma_shift = (png_byte)shift; - - num = (1 << (8 - shift)); - - g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); - - png_ptr->gamma_16_table = (png_uint_16pp)png_malloc(png_ptr, - (png_uint_32)(num * sizeof (png_uint_16p))); - - if ((png_ptr->transformations & PNG_16_TO_8) && - !(png_ptr->transformations & PNG_BACKGROUND)) - { - double fin, fout; - png_uint_32 last, max; - - for (i = 0; i < num; i++) - { - png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(256 * sizeof (png_uint_16))); - } - - g = 1.0 / g; - last = 0; - for (i = 0; i < 256; i++) - { - fout = ((double)i + 0.5) / 256.0; - fin = pow(fout, g); - max = (png_uint_32)(fin * (double)((png_uint_32)num << 8)); - while (last <= max) - { - png_ptr->gamma_16_table[(int)(last & (0xff >> shift))] - [(int)(last >> (8 - shift))] = (png_uint_16)( - (png_uint_16)i | ((png_uint_16)i << 8)); - last++; - } - } - while (last < ((png_uint_32)num << 8)) - { - png_ptr->gamma_16_table[(int)(last & (0xff >> shift))] - [(int)(last >> (8 - shift))] = (png_uint_16)65535L; - last++; - } - } - else - { - for (i = 0; i < num; i++) - { - png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(256 * sizeof (png_uint_16))); - - ig = (((png_uint_32)i * (png_uint_32)png_gamma_shift[shift]) >> 4); - for (j = 0; j < 256; j++) - { - png_ptr->gamma_16_table[i][j] = - (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / - 65535.0, g) * 65535.0 + .5); - } - } - } - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - if (png_ptr->transformations & PNG_BACKGROUND) - { - g = 1.0 / (png_ptr->gamma); - - png_ptr->gamma_16_to_1 = (png_uint_16pp)png_malloc(png_ptr, - (png_uint_32)(num * sizeof (png_uint_16p ))); - - for (i = 0; i < num; i++) - { - png_ptr->gamma_16_to_1[i] = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(256 * sizeof (png_uint_16))); - - ig = (((png_uint_32)i * - (png_uint_32)png_gamma_shift[shift]) >> 4); - for (j = 0; j < 256; j++) - { - png_ptr->gamma_16_to_1[i][j] = - (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / - 65535.0, g) * 65535.0 + .5); - } - } - g = 1.0 / (png_ptr->screen_gamma); - - png_ptr->gamma_16_from_1 = (png_uint_16pp)png_malloc(png_ptr, - (png_uint_32)(num * sizeof (png_uint_16p))); - - for (i = 0; i < num; i++) - { - png_ptr->gamma_16_from_1[i] = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(256 * sizeof (png_uint_16))); - - ig = (((png_uint_32)i * - (png_uint_32)png_gamma_shift[shift]) >> 4); - for (j = 0; j < 256; j++) - { - png_ptr->gamma_16_from_1[i][j] = - (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / - 65535.0, g) * 65535.0 + .5); - } - } - } -#endif /* PNG_BACKGROUND_SUPPORTED */ - } -} -#endif - diff --git a/src/png/pngrutil.c b/src/png/pngrutil.c deleted file mode 100644 index e127c87995..0000000000 --- a/src/png/pngrutil.c +++ /dev/null @@ -1,2245 +0,0 @@ - -/* pngrutil.c - utilities to read a PNG file - * - * libpng 1.0.1 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - * Copyright (c) 1996, 1997 Andreas Dilger - * Copyright (c) 1998, Glenn Randers-Pehrson - * March 15, 1998 - * - * This file contains routines which are only called from within - * libpng itself during the course of reading an image. - */ - -#define PNG_INTERNAL -#include "../png/png.h" - -#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED -/* Grab an unsigned 32-bit integer from a buffer in big endian format. */ -png_uint_32 -png_get_uint_32(png_bytep buf) -{ - png_uint_32 i; - - i = ((png_uint_32)(*buf) << 24) + - ((png_uint_32)(*(buf + 1)) << 16) + - ((png_uint_32)(*(buf + 2)) << 8) + - (png_uint_32)(*(buf + 3)); - - return (i); -} - -#if defined(PNG_READ_pCAL_SUPPORTED) -/* Grab a signed 32-bit integer from a buffer in big endian format. The - * data is stored in the PNG file in two's complement format, and it is - * assumed that the machine format for signed integers is the same. */ -png_int_32 -png_get_int_32(png_bytep buf) -{ - png_int_32 i; - - i = ((png_int_32)(*buf) << 24) + - ((png_int_32)(*(buf + 1)) << 16) + - ((png_int_32)(*(buf + 2)) << 8) + - (png_int_32)(*(buf + 3)); - - return (i); -} -#endif /* PNG_READ_pCAL_SUPPORTED */ - -/* Grab an unsigned 16-bit integer from a buffer in big endian format. */ -png_uint_16 -png_get_uint_16(png_bytep buf) -{ - png_uint_16 i; - - i = (png_uint_16)(((png_uint_16)(*buf) << 8) + - (png_uint_16)(*(buf + 1))); - - return (i); -} -#endif /* PNG_READ_BIG_ENDIAN_SUPPORTED */ - -/* Read data, and (optionally) run it through the CRC. */ -void -png_crc_read(png_structp png_ptr, png_bytep buf, png_size_t length) -{ - png_read_data(png_ptr, buf, length); - png_calculate_crc(png_ptr, buf, length); -} - -/* Optionally skip data and then check the CRC. Depending on whether we - are reading a ancillary or critical chunk, and how the program has set - things up, we may calculate the CRC on the data and print a message. - Returns '1' if there was a CRC error, '0' otherwise. */ -int -png_crc_finish(png_structp png_ptr, png_uint_32 skip) -{ - png_uint_32 i; - - for (i = skip; i > (png_uint_32)png_ptr->zbuf_size; i -= png_ptr->zbuf_size) - { - png_crc_read(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size); - } - if (i) - { - png_crc_read(png_ptr, png_ptr->zbuf, (png_size_t)i); - } - - if (png_crc_error(png_ptr)) - { - if ((png_ptr->chunk_name[0] & 0x20 && /* Ancillary */ - !(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN)) || - (!(png_ptr->chunk_name[0] & 0x20) && /* Critical */ - png_ptr->flags & PNG_FLAG_CRC_CRITICAL_USE)) - { - png_chunk_warning(png_ptr, "CRC error"); - } - else - { - png_chunk_error(png_ptr, "CRC error"); - } - return (1); - } - - return (0); -} - -/* Compare the CRC stored in the PNG file with that calculated by libpng from - the data it has read thus far. */ -int -png_crc_error(png_structp png_ptr) -{ - png_byte crc_bytes[4]; - png_uint_32 crc; - int need_crc = 1; - - if (png_ptr->chunk_name[0] & 0x20) /* ancillary */ - { - if ((png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_MASK) == - (PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN)) - need_crc = 0; - } - else /* critical */ - { - if (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE) - need_crc = 0; - } - - png_read_data(png_ptr, crc_bytes, 4); - - if (need_crc) - { - crc = png_get_uint_32(crc_bytes); - return ((int)(crc != png_ptr->crc)); - } - else - return (0); -} - - -/* read and check the IDHR chunk */ -void -png_handle_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_byte buf[13]; - png_uint_32 width, height; - int bit_depth, color_type, compression_type, filter_type; - int interlace_type; - - png_debug(1, "in png_handle_IHDR\n"); - - if (png_ptr->mode != PNG_BEFORE_IHDR) - png_error(png_ptr, "Out of place IHDR"); - - /* check the length */ - if (length != 13) - png_error(png_ptr, "Invalid IHDR chunk"); - - png_ptr->mode |= PNG_HAVE_IHDR; - - png_crc_read(png_ptr, buf, 13); - png_crc_finish(png_ptr, 0); - - width = png_get_uint_32(buf); - height = png_get_uint_32(buf + 4); - bit_depth = buf[8]; - color_type = buf[9]; - compression_type = buf[10]; - filter_type = buf[11]; - interlace_type = buf[12]; - - /* check for width and height valid values */ - if (width == 0 || width > (png_uint_32)2147483647L || height == 0 || - height > (png_uint_32)2147483647L) - png_error(png_ptr, "Invalid image size in IHDR"); - - /* check other values */ - if (bit_depth != 1 && bit_depth != 2 && bit_depth != 4 && - bit_depth != 8 && bit_depth != 16) - png_error(png_ptr, "Invalid bit depth in IHDR"); - - if (color_type < 0 || color_type == 1 || - color_type == 5 || color_type > 6) - png_error(png_ptr, "Invalid color type in IHDR"); - - if ((color_type == PNG_COLOR_TYPE_PALETTE && bit_depth) > 8 || - ((color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA || - color_type == PNG_COLOR_TYPE_RGB_ALPHA) && bit_depth < 8)) - png_error(png_ptr, "Invalid color type/bit depth combination in IHDR"); - - if (interlace_type >= PNG_INTERLACE_LAST) - png_error(png_ptr, "Unknown interlace method in IHDR"); - - if (compression_type != PNG_COMPRESSION_TYPE_BASE) - png_error(png_ptr, "Unknown compression method in IHDR"); - - if (filter_type != PNG_FILTER_TYPE_BASE) - png_error(png_ptr, "Unknown filter method in IHDR"); - - /* set internal variables */ - png_ptr->width = width; - png_ptr->height = height; - png_ptr->bit_depth = (png_byte)bit_depth; - png_ptr->interlaced = (png_byte)interlace_type; - png_ptr->color_type = (png_byte)color_type; - - /* find number of channels */ - switch (png_ptr->color_type) - { - case PNG_COLOR_TYPE_GRAY: - case PNG_COLOR_TYPE_PALETTE: - png_ptr->channels = 1; - break; - case PNG_COLOR_TYPE_RGB: - png_ptr->channels = 3; - break; - case PNG_COLOR_TYPE_GRAY_ALPHA: - png_ptr->channels = 2; - break; - case PNG_COLOR_TYPE_RGB_ALPHA: - png_ptr->channels = 4; - break; - } - - /* set up other useful info */ - png_ptr->pixel_depth = (png_byte)(png_ptr->bit_depth * - png_ptr->channels); - png_ptr->rowbytes = ((png_ptr->width * - (png_uint_32)png_ptr->pixel_depth + 7) >> 3); - png_debug1(3,"bit_depth = %d\n", png_ptr->bit_depth); - png_debug1(3,"channels = %d\n", png_ptr->channels); - png_debug1(3,"rowbytes = %d\n", png_ptr->rowbytes); - png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, - color_type, interlace_type, compression_type, filter_type); -} - -/* read and check the palette */ -void -png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_colorp palette; - int num, i; - - png_debug(1, "in png_handle_PLTE\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before PLTE"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid PLTE after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (png_ptr->mode & PNG_HAVE_PLTE) - png_error(png_ptr, "Duplicate PLTE chunk"); - - png_ptr->mode |= PNG_HAVE_PLTE; - -#if defined (PNG_READ_tRNS_SUPPORTED) - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - if (info_ptr != NULL && info_ptr->valid & PNG_INFO_tRNS) - { - if (png_ptr->num_trans > png_ptr->num_palette) - { - png_warning(png_ptr, "Truncating incorrect tRNS chunk length"); - png_ptr->num_trans = png_ptr->num_palette; - } - } - } -#endif - -#if !defined(PNG_READ_OPT_PLTE_SUPPORTED) - if (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE) - { - png_crc_finish(png_ptr, length); - return; - } -#endif - - if (length % 3) - { - if (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE) - { - png_warning(png_ptr, "Invalid palette chunk"); - png_crc_finish(png_ptr, length); - return; - } - else - { - png_error(png_ptr, "Invalid palette chunk"); - } - } - - num = (int)length / 3; - palette = (png_colorp)png_zalloc(png_ptr, (uInt)num, sizeof (png_color)); - png_ptr->flags |= PNG_FLAG_FREE_PALETTE; - for (i = 0; i < num; i++) - { - png_byte buf[3]; - - png_crc_read(png_ptr, buf, 3); - /* don't depend upon png_color being any order */ - palette[i].red = buf[0]; - palette[i].green = buf[1]; - palette[i].blue = buf[2]; - } - - /* If we actually NEED the PLTE chunk (ie for a paletted image), we do - whatever the normal CRC configuration tells us. However, if we - have an RGB image, the PLTE can be considered ancillary, so - we will act as though it is. */ -#if !defined(PNG_READ_OPT_PLTE_SUPPORTED) - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) -#endif - { - png_crc_finish(png_ptr, 0); - } -#if !defined(PNG_READ_OPT_PLTE_SUPPORTED) - else if (png_crc_error(png_ptr)) /* Only if we have a CRC error */ - { - /* If we don't want to use the data from an ancillary chunk, - we have two options: an error abort, or a warning and we - ignore the data in this chunk (which should be OK, since - it's considered ancillary for a RGB or RGBA image). */ - if (!(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_USE)) - { - if (png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN) - { - png_chunk_error(png_ptr, "CRC error"); - } - else - { - png_chunk_warning(png_ptr, "CRC error"); - png_ptr->flags &= ~PNG_FLAG_FREE_PALETTE; - png_zfree(png_ptr, palette); - return; - } - } - /* Otherwise, we (optionally) emit a warning and use the chunk. */ - else if (!(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN)) - { - png_chunk_warning(png_ptr, "CRC error"); - } - } -#endif - png_ptr->palette = palette; - png_ptr->num_palette = (png_uint_16)num; - png_set_PLTE(png_ptr, info_ptr, palette, num); -} - -void -png_handle_IEND(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_debug(1, "in png_handle_IEND\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR) || !(png_ptr->mode & PNG_HAVE_IDAT)) - { - png_error(png_ptr, "No image in file"); - - /* to quiet compiler warnings about unused info_ptr */ - if (info_ptr == NULL) - return; - } - - png_ptr->mode |= PNG_AFTER_IDAT | PNG_HAVE_IEND; - - if (length != 0) - { - png_warning(png_ptr, "Incorrect IEND chunk length"); - } - png_crc_finish(png_ptr, length); -} - -#if defined(PNG_READ_gAMA_SUPPORTED) -void -png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_uint_32 igamma; - float file_gamma; - png_byte buf[4]; - - png_debug(1, "in png_handle_gAMA\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before gAMA"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid gAMA after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (png_ptr->mode & PNG_HAVE_PLTE) - /* Should be an error, but we can cope with it */ - png_warning(png_ptr, "Out of place gAMA chunk"); - - else if (info_ptr != NULL && info_ptr->valid & PNG_INFO_gAMA -#if defined(PNG_READ_sRGB_SUPPORTED) - && !(info_ptr->valid & PNG_INFO_sRGB) -#endif - ) - { - png_warning(png_ptr, "Duplicate gAMA chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (length != 4) - { - png_warning(png_ptr, "Incorrect gAMA chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, 4); - if (png_crc_finish(png_ptr, 0)) - return; - - igamma = png_get_uint_32(buf); - /* check for zero gamma */ - if (igamma == 0) - return; - -#if defined(PNG_READ_sRGB_SUPPORTED) - if (info_ptr->valid & PNG_INFO_sRGB) - if(igamma != (png_uint_32)45000L) - { - png_warning(png_ptr, - "Ignoring incorrect gAMA value when sRGB is also present"); -#ifndef PNG_NO_STDIO - fprintf(stderr, "igamma = %lu\n", igamma); -#endif - return; - } -#endif /* PNG_READ_sRGB_SUPPORTED */ - - file_gamma = (float)igamma / (float)100000.0; -#ifdef PNG_READ_GAMMA_SUPPORTED - png_ptr->gamma = file_gamma; -#endif - png_set_gAMA(png_ptr, info_ptr, file_gamma); -} -#endif - -#if defined(PNG_READ_sBIT_SUPPORTED) -void -png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_size_t truelen; - png_byte buf[4]; - - png_debug(1, "in png_handle_sBIT\n"); - - buf[0] = buf[1] = buf[2] = buf[3] = 0; - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before sBIT"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid sBIT after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (png_ptr->mode & PNG_HAVE_PLTE) - { - /* Should be an error, but we can cope with it */ - png_warning(png_ptr, "Out of place sBIT chunk"); - } - else if (info_ptr != NULL && info_ptr->valid & PNG_INFO_sBIT) - { - png_warning(png_ptr, "Duplicate sBIT chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - truelen = 3; - else - truelen = (png_size_t)png_ptr->channels; - - if (length != truelen) - { - png_warning(png_ptr, "Incorrect sBIT chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, truelen); - if (png_crc_finish(png_ptr, 0)) - return; - - if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) - { - png_ptr->sig_bit.red = buf[0]; - png_ptr->sig_bit.green = buf[1]; - png_ptr->sig_bit.blue = buf[2]; - png_ptr->sig_bit.alpha = buf[3]; - } - else - { - png_ptr->sig_bit.gray = buf[0]; - png_ptr->sig_bit.alpha = buf[1]; - } - png_set_sBIT(png_ptr, info_ptr, &(png_ptr->sig_bit)); -} -#endif - -#if defined(PNG_READ_cHRM_SUPPORTED) -void -png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_byte buf[4]; - png_uint_32 val; - float white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y; - - png_debug(1, "in png_handle_cHRM\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before sBIT"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid cHRM after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (png_ptr->mode & PNG_HAVE_PLTE) - /* Should be an error, but we can cope with it */ - png_warning(png_ptr, "Missing PLTE before cHRM"); - - else if (info_ptr != NULL && info_ptr->valid & PNG_INFO_cHRM -#if defined(PNG_READ_sRGB_SUPPORTED) - && !(info_ptr->valid & PNG_INFO_sRGB) -#endif - ) - { - png_warning(png_ptr, "Duplicate cHRM chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (length != 32) - { - png_warning(png_ptr, "Incorrect cHRM chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, 4); - val = png_get_uint_32(buf); - white_x = (float)val / (float)100000.0; - - png_crc_read(png_ptr, buf, 4); - val = png_get_uint_32(buf); - white_y = (float)val / (float)100000.0; - - if (white_x < 0 || white_x > 0.8 || white_y < 0 || white_y > 0.8 || - white_x + white_y > 1.0) - { - png_warning(png_ptr, "Invalid cHRM white point"); - png_crc_finish(png_ptr, 24); - return; - } - - png_crc_read(png_ptr, buf, 4); - val = png_get_uint_32(buf); - red_x = (float)val / (float)100000.0; - - png_crc_read(png_ptr, buf, 4); - val = png_get_uint_32(buf); - red_y = (float)val / (float)100000.0; - - if (red_x < 0 || red_x > 0.8 || red_y < 0 || red_y > 0.8 || - red_x + red_y > 1.0) - { - png_warning(png_ptr, "Invalid cHRM red point"); - png_crc_finish(png_ptr, 16); - return; - } - - png_crc_read(png_ptr, buf, 4); - val = png_get_uint_32(buf); - green_x = (float)val / (float)100000.0; - - png_crc_read(png_ptr, buf, 4); - val = png_get_uint_32(buf); - green_y = (float)val / (float)100000.0; - - if (green_x < 0 || green_x > 0.8 || green_y < 0 || green_y > 0.8 || - green_x + green_y > 1.0) - { - png_warning(png_ptr, "Invalid cHRM green point"); - png_crc_finish(png_ptr, 8); - return; - } - - png_crc_read(png_ptr, buf, 4); - val = png_get_uint_32(buf); - blue_x = (float)val / (float)100000.0; - - png_crc_read(png_ptr, buf, 4); - val = png_get_uint_32(buf); - blue_y = (float)val / (float)100000.0; - - if (blue_x < (float)0 || blue_x > (float)0.8 || blue_y < (float)0 || - blue_y > (float)0.8 || blue_x + blue_y > (float)1.0) - { - png_warning(png_ptr, "Invalid cHRM blue point"); - png_crc_finish(png_ptr, 0); - return; - } - - if (png_crc_finish(png_ptr, 0)) - return; - -#if defined(PNG_READ_sRGB_SUPPORTED) - if (info_ptr->valid & PNG_INFO_sRGB) - { - if (fabs(white_x - (float).3127) > (float).001 || - fabs(white_y - (float).3290) > (float).001 || - fabs( red_x - (float).6400) > (float).001 || - fabs( red_y - (float).3300) > (float).001 || - fabs(green_x - (float).3000) > (float).001 || - fabs(green_y - (float).6000) > (float).001 || - fabs( blue_x - (float).1500) > (float).001 || - fabs( blue_y - (float).0600) > (float).001) - { - - png_warning(png_ptr, - "Ignoring incorrect cHRM value when sRGB is also present"); -#ifndef PNG_NO_STDIO - fprintf(stderr,"wx=%f, wy=%f, rx=%f, ry=%f\n", - white_x, white_y, red_x, red_y); - fprintf(stderr,"gx=%f, gy=%f, bx=%f, by=%f\n", - green_x, green_y, blue_x, blue_y); -#endif - } - return; - } -#endif /* PNG_READ_sRGB_SUPPORTED */ - - png_set_cHRM(png_ptr, info_ptr, - white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y); -} -#endif - -#if defined(PNG_READ_sRGB_SUPPORTED) -void -png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - int intent; - png_byte buf[1]; - - png_debug(1, "in png_handle_sRGB\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before sRGB"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid sRGB after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (png_ptr->mode & PNG_HAVE_PLTE) - /* Should be an error, but we can cope with it */ - png_warning(png_ptr, "Out of place sRGB chunk"); - - else if (info_ptr != NULL && info_ptr->valid & PNG_INFO_sRGB) - { - png_warning(png_ptr, "Duplicate sRGB chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (length != 1) - { - png_warning(png_ptr, "Incorrect sRGB chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, 1); - if (png_crc_finish(png_ptr, 0)) - return; - - intent = buf[0]; - /* check for bad intent */ - if (intent >= PNG_sRGB_INTENT_LAST) - { - png_warning(png_ptr, "Unknown sRGB intent"); - return; - } - -#if defined(PNG_READ_gAMA_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED) - if ((info_ptr->valid & PNG_INFO_gAMA)) - if((png_uint_32)(png_ptr->gamma*(float)100000.+.5) != (png_uint_32)45000L) - { - png_warning(png_ptr, - "Ignoring incorrect gAMA value when sRGB is also present"); -#ifndef PNG_NO_STDIO - fprintf(stderr,"gamma=%f\n",png_ptr->gamma); -#endif - } -#endif /* PNG_READ_gAMA_SUPPORTED */ - -#ifdef PNG_READ_cHRM_SUPPORTED - if (info_ptr->valid & PNG_INFO_cHRM) - if (fabs(info_ptr->x_white - (float).3127) > (float).001 || - fabs(info_ptr->y_white - (float).3290) > (float).001 || - fabs( info_ptr->x_red - (float).6400) > (float).001 || - fabs( info_ptr->y_red - (float).3300) > (float).001 || - fabs(info_ptr->x_green - (float).3000) > (float).001 || - fabs(info_ptr->y_green - (float).6000) > (float).001 || - fabs( info_ptr->x_blue - (float).1500) > (float).001 || - fabs( info_ptr->y_blue - (float).0600) > (float).001) - { - png_warning(png_ptr, - "Ignoring incorrect cHRM value when sRGB is also present"); - } -#endif /* PNG_READ_cHRM_SUPPORTED */ - - png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, intent); -} -#endif /* PNG_READ_sRGB_SUPPORTED */ - -#if defined(PNG_READ_tRNS_SUPPORTED) -void -png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_debug(1, "in png_handle_tRNS\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before tRNS"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid tRNS after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (info_ptr != NULL && info_ptr->valid & PNG_INFO_tRNS) - { - png_warning(png_ptr, "Duplicate tRNS chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - if (!(png_ptr->mode & PNG_HAVE_PLTE)) - { - /* Should be an error, but we can cope with it */ - png_warning(png_ptr, "Missing PLTE before tRNS"); - } - else if (length > png_ptr->num_palette) - { - png_warning(png_ptr, "Incorrect tRNS chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_ptr->trans = (png_bytep)png_malloc(png_ptr, length); - png_ptr->flags |= PNG_FLAG_FREE_TRANS; - png_crc_read(png_ptr, png_ptr->trans, (png_size_t)length); - png_ptr->num_trans = (png_uint_16)length; - } - else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) - { - png_byte buf[6]; - - if (length != 6) - { - png_warning(png_ptr, "Incorrect tRNS chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, (png_size_t)length); - png_ptr->num_trans = 1; - png_ptr->trans_values.red = png_get_uint_16(buf); - png_ptr->trans_values.green = png_get_uint_16(buf + 2); - png_ptr->trans_values.blue = png_get_uint_16(buf + 4); - } - else if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY) - { - png_byte buf[6]; - - if (length != 2) - { - png_warning(png_ptr, "Incorrect tRNS chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, 2); - png_ptr->num_trans = 1; - png_ptr->trans_values.gray = png_get_uint_16(buf); - } - else - { - png_warning(png_ptr, "tRNS chunk not allowed with alpha channel"); - png_crc_finish(png_ptr, length); - return; - } - - if (png_crc_finish(png_ptr, 0)) - return; - - png_set_tRNS(png_ptr, info_ptr, png_ptr->trans, png_ptr->num_trans, - &(png_ptr->trans_values)); -} -#endif - -#if defined(PNG_READ_bKGD_SUPPORTED) -void -png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_size_t truelen; - png_byte buf[6]; - - png_debug(1, "in png_handle_bKGD\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before bKGD"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid bKGD after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && - !(png_ptr->mode & PNG_HAVE_PLTE)) - { - png_warning(png_ptr, "Missing PLTE before bKGD"); - png_crc_finish(png_ptr, length); - return; - } - else if (info_ptr != NULL && info_ptr->valid & PNG_INFO_bKGD) - { - png_warning(png_ptr, "Duplicate bKGD chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - truelen = 1; - else if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) - truelen = 6; - else - truelen = 2; - - if (length != truelen) - { - png_warning(png_ptr, "Incorrect bKGD chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, truelen); - if (png_crc_finish(png_ptr, 0)) - return; - - /* We convert the index value into RGB components so that we can allow - * arbitrary RGB values for background when we have transparency, and - * so it is easy to determine the RGB values of the background color - * from the info_ptr struct. */ - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - png_ptr->background.index = buf[0]; - png_ptr->background.red = (png_uint_16)png_ptr->palette[buf[0]].red; - png_ptr->background.green = (png_uint_16)png_ptr->palette[buf[0]].green; - png_ptr->background.blue = (png_uint_16)png_ptr->palette[buf[0]].blue; - } - else if (!(png_ptr->color_type & PNG_COLOR_MASK_COLOR)) /* GRAY */ - { - png_ptr->background.red = - png_ptr->background.green = - png_ptr->background.blue = - png_ptr->background.gray = png_get_uint_16(buf); - } - else - { - png_ptr->background.red = png_get_uint_16(buf); - png_ptr->background.green = png_get_uint_16(buf + 2); - png_ptr->background.blue = png_get_uint_16(buf + 4); - } - - png_set_bKGD(png_ptr, info_ptr, &(png_ptr->background)); -} -#endif - -#if defined(PNG_READ_hIST_SUPPORTED) -void -png_handle_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - int num, i; - - png_debug(1, "in png_handle_hIST\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before hIST"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid hIST after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (!(png_ptr->mode & PNG_HAVE_PLTE)) - { - png_warning(png_ptr, "Missing PLTE before hIST"); - png_crc_finish(png_ptr, length); - return; - } - else if (info_ptr != NULL && info_ptr->valid & PNG_INFO_hIST) - { - png_warning(png_ptr, "Duplicate hIST chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (length != (png_uint_32)(2 * png_ptr->num_palette)) - { - png_warning(png_ptr, "Incorrect hIST chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - num = (int)length / 2; - png_ptr->hist = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(num * sizeof (png_uint_16))); - png_ptr->flags |= PNG_FLAG_FREE_HIST; - for (i = 0; i < num; i++) - { - png_byte buf[2]; - - png_crc_read(png_ptr, buf, 2); - png_ptr->hist[i] = png_get_uint_16(buf); - } - - if (png_crc_finish(png_ptr, 0)) - return; - - png_set_hIST(png_ptr, info_ptr, png_ptr->hist); -} -#endif - -#if defined(PNG_READ_pHYs_SUPPORTED) -void -png_handle_pHYs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_byte buf[9]; - png_uint_32 res_x, res_y; - int unit_type; - - png_debug(1, "in png_handle_pHYs\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before pHYS"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid pHYS after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (info_ptr != NULL && info_ptr->valid & PNG_INFO_pHYs) - { - png_warning(png_ptr, "Duplicate pHYS chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (length != 9) - { - png_warning(png_ptr, "Incorrect pHYs chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, 9); - if (png_crc_finish(png_ptr, 0)) - return; - - res_x = png_get_uint_32(buf); - res_y = png_get_uint_32(buf + 4); - unit_type = buf[8]; - png_set_pHYs(png_ptr, info_ptr, res_x, res_y, unit_type); -} -#endif - -#if defined(PNG_READ_oFFs_SUPPORTED) -void -png_handle_oFFs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_byte buf[9]; - png_uint_32 offset_x, offset_y; - int unit_type; - - png_debug(1, "in png_handle_oFFs\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before oFFs"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid oFFs after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (info_ptr != NULL && info_ptr->valid & PNG_INFO_oFFs) - { - png_warning(png_ptr, "Duplicate oFFs chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (length != 9) - { - png_warning(png_ptr, "Incorrect oFFs chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, 9); - if (png_crc_finish(png_ptr, 0)) - return; - - offset_x = png_get_uint_32(buf); - offset_y = png_get_uint_32(buf + 4); - unit_type = buf[8]; - png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y, unit_type); -} -#endif - -#if defined(PNG_READ_pCAL_SUPPORTED) -/* read the pCAL chunk (png-scivis-19970203) */ -void -png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_charp purpose; - png_int_32 X0, X1; - png_byte type, nparams; - png_charp buf, units, endptr; - png_charpp params; - png_size_t slength; - int i; - - png_debug(1, "in png_handle_pCAL\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before pCAL"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid pCAL after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (info_ptr != NULL && info_ptr->valid & PNG_INFO_pCAL) - { - png_warning(png_ptr, "Duplicate pCAL chunk"); - png_crc_finish(png_ptr, length); - return; - } - - png_debug1(2, "Allocating and reading pCAL chunk data (%d bytes)\n", - length + 1); - purpose = (png_charp)png_malloc(png_ptr, length + 1); - slength = (png_size_t)length; - png_crc_read(png_ptr, (png_bytep)purpose, slength); - - if (png_crc_finish(png_ptr, 0)) - { - png_free(png_ptr, purpose); - return; - } - - purpose[slength] = 0x00; /* null terminate the last string */ - - png_debug(3, "Finding end of pCAL purpose string\n"); - for (buf = purpose; *buf != '\0'; buf++) - /* empty loop */ ; - - endptr = purpose + slength; - - /* We need to have at least 12 bytes after the purpose string - in order to get the parameter information. */ - if (endptr <= buf + 12) - { - png_warning(png_ptr, "Invalid pCAL data"); - png_free(png_ptr, purpose); - return; - } - - png_debug(3, "Reading pCAL X0, X1, type, nparams, and units\n"); - X0 = png_get_int_32((png_bytep)buf+1); - X1 = png_get_int_32((png_bytep)buf+5); - type = buf[9]; - nparams = buf[10]; - units = buf + 11; - - png_debug(3, "Checking pCAL equation type and number of parameters\n"); - /* Check that we have the right number of parameters for known - equation types. */ - if ((type == PNG_EQUATION_LINEAR && nparams != 2) || - (type == PNG_EQUATION_BASE_E && nparams != 3) || - (type == PNG_EQUATION_ARBITRARY && nparams != 3) || - (type == PNG_EQUATION_HYPERBOLIC && nparams != 4)) - { - png_warning(png_ptr, "Invalid pCAL parameters for equation type"); - png_free(png_ptr, purpose); - return; - } - else if (type >= PNG_EQUATION_LAST) - { - png_warning(png_ptr, "Unrecognized equation type for pCAL chunk"); - } - - for (buf = units; *buf != 0x00; buf++) - /* Empty loop to move past the units string. */ ; - - png_debug(3, "Allocating pCAL parameters array\n"); - params = (png_charpp)png_malloc(png_ptr, (png_uint_32)(nparams - *sizeof(png_charp))) ; - - /* Get pointers to the start of each parameter string. */ - for (i = 0; i < (int)nparams; i++) - { - buf++; /* Skip the null string terminator from previous parameter. */ - - png_debug1(3, "Reading pCAL parameter %d\n", i); - for (params[i] = buf; *buf != 0x00 && buf <= endptr; buf++) - /* Empty loop to move past each parameter string */ ; - - /* Make sure we haven't run out of data yet */ - if (buf > endptr) - { - png_warning(png_ptr, "Invalid pCAL data"); - png_free(png_ptr, purpose); - png_free(png_ptr, params); - return; - } - } - - png_set_pCAL(png_ptr, info_ptr, purpose, X0, X1, type, nparams, - units, params); - - png_free(png_ptr, purpose); - png_free(png_ptr, params); -} -#endif - -#if defined(PNG_READ_tIME_SUPPORTED) -void -png_handle_tIME(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_byte buf[7]; - png_time mod_time; - - png_debug(1, "in png_handle_tIME\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Out of place tIME chunk"); - else if (info_ptr != NULL && info_ptr->valid & PNG_INFO_tIME) - { - png_warning(png_ptr, "Duplicate tIME chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (png_ptr->mode & PNG_HAVE_IDAT) - png_ptr->mode |= PNG_AFTER_IDAT; - - if (length != 7) - { - png_warning(png_ptr, "Incorrect tIME chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, 7); - if (png_crc_finish(png_ptr, 0)) - return; - - mod_time.second = buf[6]; - mod_time.minute = buf[5]; - mod_time.hour = buf[4]; - mod_time.day = buf[3]; - mod_time.month = buf[2]; - mod_time.year = png_get_uint_16(buf); - - png_set_tIME(png_ptr, info_ptr, &mod_time); -} -#endif - -#if defined(PNG_READ_tEXt_SUPPORTED) -/* Note: this does not properly handle chunks that are > 64K under DOS */ -void -png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_textp text_ptr; - png_charp key; - png_charp text; - png_uint_32 skip = 0; - png_size_t slength; - - png_debug(1, "in png_handle_tEXt\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before tEXt"); - - if (png_ptr->mode & PNG_HAVE_IDAT) - png_ptr->mode |= PNG_AFTER_IDAT; - -#ifdef PNG_MAX_MALLOC_64K - if (length > (png_uint_32)65535L) - { - png_warning(png_ptr, "tEXt chunk too large to fit in memory"); - skip = length - (png_uint_32)65535L; - length = (png_uint_32)65535L; - } -#endif - - key = (png_charp)png_malloc(png_ptr, length + 1); - slength = (png_size_t)length; - png_crc_read(png_ptr, (png_bytep)key, slength); - - if (png_crc_finish(png_ptr, skip)) - { - png_free(png_ptr, key); - return; - } - - key[slength] = 0x00; - - for (text = key; *text; text++) - /* empty loop to find end of key */ ; - - if (text != key + slength) - text++; - - text_ptr = (png_textp)png_malloc(png_ptr, (png_uint_32)sizeof(png_text)); - text_ptr->compression = PNG_TEXT_COMPRESSION_NONE; - text_ptr->key = key; - text_ptr->text = text; - - png_set_text(png_ptr, info_ptr, text_ptr, 1); - - png_free(png_ptr, text_ptr); -} -#endif - -#if defined(PNG_READ_zTXt_SUPPORTED) -/* note: this does not correctly handle chunks that are > 64K under DOS */ -void -png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - static char msg[] = "Error decoding zTXt chunk"; - png_textp text_ptr; - png_charp key; - png_charp text; - int comp_type = PNG_TEXT_COMPRESSION_NONE; - png_size_t slength; - - png_debug(1, "in png_handle_zTXt\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before zTXt"); - - if (png_ptr->mode & PNG_HAVE_IDAT) - png_ptr->mode |= PNG_AFTER_IDAT; - -#ifdef PNG_MAX_MALLOC_64K - /* We will no doubt have problems with chunks even half this size, but - there is no hard and fast rule to tell us where to stop. */ - if (length > (png_uint_32)65535L) - { - png_warning(png_ptr,"zTXt chunk too large to fit in memory"); - png_crc_finish(png_ptr, length); - return; - } -#endif - - key = (png_charp)png_malloc(png_ptr, length + 1); - slength = (png_size_t)length; - png_crc_read(png_ptr, (png_bytep)key, slength); - if (png_crc_finish(png_ptr, 0)) - { - png_free(png_ptr, key); - return; - } - - key[slength] = 0x00; - - for (text = key; *text; text++) - /* empty loop */ ; - - /* zTXt must have some text after the keyword */ - if (text == key + slength) - { - png_warning(png_ptr, "Zero length zTXt chunk"); - } - else if ((comp_type = *(++text)) == PNG_TEXT_COMPRESSION_zTXt) - { - png_size_t text_size, key_size; - text++; - - png_ptr->zstream.next_in = (png_bytep)text; - png_ptr->zstream.avail_in = (uInt)(length - (text - key)); - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - - key_size = (png_size_t)(text - key); - text_size = 0; - text = NULL; - - while (png_ptr->zstream.avail_in) - { - int ret; - - ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); - if (ret != Z_OK && ret != Z_STREAM_END) - { - if (png_ptr->zstream.msg != NULL) - png_warning(png_ptr, png_ptr->zstream.msg); - else - png_warning(png_ptr, msg); - inflateReset(&png_ptr->zstream); - png_ptr->zstream.avail_in = 0; - - if (text == NULL) - { - text_size = key_size + sizeof(msg) + 1; - text = (png_charp)png_malloc(png_ptr, (png_uint_32)text_size); - png_memcpy(text, key, key_size); - } - - text[text_size - 1] = 0x00; - - /* Copy what we can of the error message into the text chunk */ - text_size = (png_size_t)(slength - (text - key) - 1); - text_size = sizeof(msg) > text_size ? text_size : sizeof(msg); - png_memcpy(text + key_size, msg, text_size + 1); - break; - } - if (!png_ptr->zstream.avail_out || ret == Z_STREAM_END) - { - if (text == NULL) - { - text = (png_charp)png_malloc(png_ptr, - (png_uint_32)(png_ptr->zbuf_size - png_ptr->zstream.avail_out - + key_size + 1)); - png_memcpy(text + key_size, png_ptr->zbuf, - png_ptr->zbuf_size - png_ptr->zstream.avail_out); - png_memcpy(text, key, key_size); - text_size = key_size + png_ptr->zbuf_size - - png_ptr->zstream.avail_out; - *(text + text_size) = 0x00; - } - else - { - png_charp tmp; - - tmp = text; - text = (png_charp)png_malloc(png_ptr, (png_uint_32)(text_size + - png_ptr->zbuf_size - png_ptr->zstream.avail_out + 1)); - png_memcpy(text, tmp, text_size); - png_free(png_ptr, tmp); - png_memcpy(text + text_size, png_ptr->zbuf, - (png_ptr->zbuf_size - png_ptr->zstream.avail_out)); - text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out; - *(text + text_size) = 0x00; - } - if (ret != Z_STREAM_END) - { - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - } - else - { - break; - } - } - } - - inflateReset(&png_ptr->zstream); - png_ptr->zstream.avail_in = 0; - - png_free(png_ptr, key); - key = text; - text += key_size; - } - else /* if (comp_type >= PNG_TEXT_COMPRESSION_LAST) */ - { - png_size_t text_size; -#if !defined(PNG_NO_STDIO) - char umsg[50]; - - sprintf(umsg, "Unknown zTXt compression type %d", comp_type); - png_warning(png_ptr, umsg); -#else - png_warning(png_ptr, "Unknown zTXt compression type"); -#endif - - /* Copy what we can of the error message into the text chunk */ - text_size = (png_size_t)(slength - (text - key) - 1); - text_size = sizeof(msg) > text_size ? text_size : sizeof(msg); - png_memcpy(text, msg, text_size + 1); - } - - text_ptr = (png_textp)png_malloc(png_ptr, (png_uint_32)sizeof(png_text)); - text_ptr->compression = comp_type; - text_ptr->key = key; - text_ptr->text = text; - - png_set_text(png_ptr, info_ptr, text_ptr, 1); - - png_free(png_ptr, text_ptr); -} -#endif - -/* This function is called when we haven't found a handler for a - chunk. If there isn't a problem with the chunk itself (ie bad - chunk name, CRC, or a critical chunk), the chunk is silently ignored. */ -void -png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_debug(1, "in png_handle_unknown\n"); - - /* In the future we can have code here that calls user-supplied - * callback functions for unknown chunks before they are ignored or - * cause an error. - */ - png_check_chunk_name(png_ptr, png_ptr->chunk_name); - - if (!(png_ptr->chunk_name[0] & 0x20)) - { - png_chunk_error(png_ptr, "unknown critical chunk"); - - /* to quiet compiler warnings about unused info_ptr */ - if (info_ptr == NULL) - return; - } - - if (png_ptr->mode & PNG_HAVE_IDAT) - png_ptr->mode |= PNG_AFTER_IDAT; - - png_crc_finish(png_ptr, length); - -} - -/* This function is called to verify that a chunk name is valid. - This function can't have the "critical chunk check" incorporated - into it, since in the future we will need to be able to call user - functions to handle unknown critical chunks after we check that - the chunk name itself is valid. */ - -#define isnonalpha(c) ((c) < 41 || (c) > 122 || ((c) > 90 && (c) < 97)) - -void -png_check_chunk_name(png_structp png_ptr, png_bytep chunk_name) -{ - png_debug(1, "in png_check_chunk_name\n"); - if (isnonalpha(chunk_name[0]) || isnonalpha(chunk_name[1]) || - isnonalpha(chunk_name[2]) || isnonalpha(chunk_name[3])) - { - png_chunk_error(png_ptr, "invalid chunk type"); - } -} - -/* Combines the row recently read in with the previous row. - This routine takes care of alpha and transparency if requested. - This routine also handles the two methods of progressive display - of interlaced images, depending on the mask value. - The mask value describes which pixels are to be combined with - the row. The pattern always repeats every 8 pixels, so just 8 - bits are needed. A one indicates the pixels is to be combined, - a zero indicates the pixel is to be skipped. This is in addition - to any alpha or transparency value associated with the pixel. If - you want all pixels to be combined, pass 0xff (255) in mask. */ -void -png_combine_row(png_structp png_ptr, png_bytep row, - int mask) -{ - png_debug(1,"in png_combine_row\n"); - if (mask == 0xff) - { - png_memcpy(row, png_ptr->row_buf + 1, - (png_size_t)((png_ptr->width * - png_ptr->row_info.pixel_depth + 7) >> 3)); - } - else - { - switch (png_ptr->row_info.pixel_depth) - { - case 1: - { - png_bytep sp; - png_bytep dp; - int s_inc, s_start, s_end; - int m; - int shift; - png_uint_32 i; - - sp = png_ptr->row_buf + 1; - dp = row; - m = 0x80; -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (png_ptr->transformations & PNG_PACKSWAP) - { - s_start = 0; - s_end = 7; - s_inc = 1; - } - else -#endif - { - s_start = 7; - s_end = 0; - s_inc = -1; - } - - shift = s_start; - - for (i = 0; i < png_ptr->width; i++) - { - if (m & mask) - { - int value; - - value = (*sp >> shift) & 0x1; - *dp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff); - *dp |= (png_byte)(value << shift); - } - - if (shift == s_end) - { - shift = s_start; - sp++; - dp++; - } - else - shift += s_inc; - - if (m == 1) - m = 0x80; - else - m >>= 1; - } - break; - } - case 2: - { - png_bytep sp; - png_bytep dp; - int s_start, s_end, s_inc; - int m; - int shift; - png_uint_32 i; - int value; - - sp = png_ptr->row_buf + 1; - dp = row; - m = 0x80; -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (png_ptr->transformations & PNG_PACKSWAP) - { - s_start = 0; - s_end = 6; - s_inc = 2; - } - else -#endif - { - s_start = 6; - s_end = 0; - s_inc = -2; - } - - shift = s_start; - - for (i = 0; i < png_ptr->width; i++) - { - if (m & mask) - { - value = (*sp >> shift) & 0x3; - *dp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); - *dp |= (png_byte)(value << shift); - } - - if (shift == s_end) - { - shift = s_start; - sp++; - dp++; - } - else - shift += s_inc; - if (m == 1) - m = 0x80; - else - m >>= 1; - } - break; - } - case 4: - { - png_bytep sp; - png_bytep dp; - int s_start, s_end, s_inc; - int m; - int shift; - png_uint_32 i; - int value; - - sp = png_ptr->row_buf + 1; - dp = row; - m = 0x80; -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (png_ptr->transformations & PNG_PACKSWAP) - { - s_start = 0; - s_end = 4; - s_inc = 4; - } - else -#endif - { - s_start = 4; - s_end = 0; - s_inc = -4; - } - shift = s_start; - - for (i = 0; i < png_ptr->width; i++) - { - if (m & mask) - { - value = (*sp >> shift) & 0xf; - *dp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); - *dp |= (png_byte)(value << shift); - } - - if (shift == s_end) - { - shift = s_start; - sp++; - dp++; - } - else - shift += s_inc; - if (m == 1) - m = 0x80; - else - m >>= 1; - } - break; - } - default: - { - png_bytep sp; - png_bytep dp; - png_size_t pixel_bytes; - png_uint_32 i; - png_byte m; - - pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); - - sp = png_ptr->row_buf + 1; - dp = row; - m = 0x80; - for (i = 0; i < png_ptr->width; i++) - { - if (m & mask) - { - png_memcpy(dp, sp, pixel_bytes); - } - - sp += pixel_bytes; - dp += pixel_bytes; - - if (m == 1) - m = 0x80; - else - m >>= 1; - } - break; - } - } - } -} - -#if defined(PNG_READ_INTERLACING_SUPPORTED) -void -png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass, - png_uint_32 transformations) -{ - png_debug(1,"in png_do_read_interlace\n"); - if (row != NULL && row_info != NULL) - { - png_uint_32 final_width; - - final_width = row_info->width * png_pass_inc[pass]; - - switch (row_info->pixel_depth) - { - case 1: - { - png_bytep sp, dp; - int sshift, dshift; - int s_start, s_end, s_inc; - png_byte v; - png_uint_32 i; - int j; - - sp = row + (png_size_t)((row_info->width - 1) >> 3); - dp = row + (png_size_t)((final_width - 1) >> 3); -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (transformations & PNG_PACKSWAP) - { - sshift = (int)((row_info->width + 7) & 7); - dshift = (int)((final_width + 7) & 7); - s_start = 7; - s_end = 0; - s_inc = -1; - } - else -#endif - { - sshift = 7 - (int)((row_info->width + 7) & 7); - dshift = 7 - (int)((final_width + 7) & 7); - s_start = 0; - s_end = 7; - s_inc = 1; - } - - for (i = row_info->width; i; i--) - { - v = (png_byte)((*sp >> sshift) & 0x1); - for (j = 0; j < png_pass_inc[pass]; j++) - { - *dp &= (png_byte)((0x7f7f >> (7 - dshift)) & 0xff); - *dp |= (png_byte)(v << dshift); - if (dshift == s_end) - { - dshift = s_start; - dp--; - } - else - dshift += s_inc; - } - if (sshift == s_end) - { - sshift = s_start; - sp--; - } - else - sshift += s_inc; - } - break; - } - case 2: - { - png_bytep sp, dp; - int sshift, dshift; - int s_start, s_end, s_inc; - png_uint_32 i; - - sp = row + (png_uint_32)((row_info->width - 1) >> 2); - dp = row + (png_uint_32)((final_width - 1) >> 2); -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (transformations & PNG_PACKSWAP) - { - sshift = (int)(((row_info->width + 3) & 3) << 1); - dshift = (int)(((final_width + 3) & 3) << 1); - s_start = 6; - s_end = 0; - s_inc = -2; - } - else -#endif - { - sshift = (int)((3 - ((row_info->width + 3) & 3)) << 1); - dshift = (int)((3 - ((final_width + 3) & 3)) << 1); - s_start = 0; - s_end = 6; - s_inc = 2; - } - - for (i = row_info->width; i; i--) - { - png_byte v; - int j; - - v = (png_byte)((*sp >> sshift) & 0x3); - for (j = 0; j < png_pass_inc[pass]; j++) - { - *dp &= (png_byte)((0x3f3f >> (6 - dshift)) & 0xff); - *dp |= (png_byte)(v << dshift); - if (dshift == s_end) - { - dshift = s_start; - dp--; - } - else - dshift += s_inc; - } - if (sshift == s_end) - { - sshift = s_start; - sp--; - } - else - sshift += s_inc; - } - break; - } - case 4: - { - png_bytep sp, dp; - int sshift, dshift; - int s_start, s_end, s_inc; - png_uint_32 i; - - sp = row + (png_size_t)((row_info->width - 1) >> 1); - dp = row + (png_size_t)((final_width - 1) >> 1); -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (transformations & PNG_PACKSWAP) - { - sshift = (int)(((row_info->width + 1) & 1) << 2); - dshift = (int)(((final_width + 1) & 1) << 2); - s_start = 4; - s_end = 0; - s_inc = -4; - } - else -#endif - { - sshift = (int)((1 - ((row_info->width + 1) & 1)) << 2); - dshift = (int)((1 - ((final_width + 1) & 1)) << 2); - s_start = 0; - s_end = 4; - s_inc = 4; - } - - for (i = row_info->width; i; i--) - { - png_byte v; - int j; - - v = (png_byte)((*sp >> sshift) & 0xf); - for (j = 0; j < png_pass_inc[pass]; j++) - { - *dp &= (png_byte)((0xf0f >> (4 - dshift)) & 0xff); - *dp |= (png_byte)(v << dshift); - if (dshift == s_end) - { - dshift = s_start; - dp--; - } - else - dshift += s_inc; - } - if (sshift == s_end) - { - sshift = s_start; - sp--; - } - else - sshift += s_inc; - } - break; - } - default: - { - png_bytep sp, dp; - png_uint_32 i; - png_size_t pixel_bytes; - - pixel_bytes = (row_info->pixel_depth >> 3); - - sp = row + (png_size_t)(row_info->width - 1) * pixel_bytes; - dp = row + (png_size_t)(final_width - 1) * pixel_bytes; - for (i = row_info->width; i; i--) - { - png_byte v[8]; - int j; - - png_memcpy(v, sp, pixel_bytes); - for (j = 0; j < png_pass_inc[pass]; j++) - { - png_memcpy(dp, v, pixel_bytes); - dp -= pixel_bytes; - } - sp -= pixel_bytes; - } - break; - } - } - row_info->width = final_width; - row_info->rowbytes = ((final_width * - (png_uint_32)row_info->pixel_depth + 7) >> 3); - } -} -#endif - -void -png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row, - png_bytep prev_row, int filter) -{ - png_debug(1, "in png_read_filter_row\n"); - png_debug2(2,"row = %d, filter = %d\n", png_ptr->row_number, filter); - - - switch (filter) - { - case PNG_FILTER_VALUE_NONE: - break; - case PNG_FILTER_VALUE_SUB: - { - png_uint_32 i; - int bpp; - png_bytep rp; - png_bytep lp; - - bpp = (row_info->pixel_depth + 7) / 8; - for (i = (png_uint_32)bpp, rp = row + bpp, lp = row; - i < row_info->rowbytes; i++, rp++, lp++) - { - *rp = (png_byte)(((int)(*rp) + (int)(*lp)) & 0xff); - } - break; - } - case PNG_FILTER_VALUE_UP: - { - png_uint_32 i; - png_bytep rp; - png_bytep pp; - - for (i = 0, rp = row, pp = prev_row; - i < row_info->rowbytes; i++, rp++, pp++) - { - *rp = (png_byte)(((int)(*rp) + (int)(*pp)) & 0xff); - } - break; - } - case PNG_FILTER_VALUE_AVG: - { - png_uint_32 i; - int bpp; - png_bytep rp; - png_bytep pp; - png_bytep lp; - - bpp = (row_info->pixel_depth + 7) / 8; - for (i = 0, rp = row, pp = prev_row; - i < (png_uint_32)bpp; i++, rp++, pp++) - { - *rp = (png_byte)(((int)(*rp) + - ((int)(*pp) / 2)) & 0xff); - } - for (lp = row; i < row_info->rowbytes; i++, rp++, lp++, pp++) - { - *rp = (png_byte)(((int)(*rp) + - (int)(*pp + *lp) / 2) & 0xff); - } - break; - } - case PNG_FILTER_VALUE_PAETH: - { - int bpp; - png_uint_32 i; - png_bytep rp; - png_bytep pp; - png_bytep lp; - png_bytep cp; - - bpp = (row_info->pixel_depth + 7) / 8; - for (i = 0, rp = row, pp = prev_row, - lp = row - bpp, cp = prev_row - bpp; - i < row_info->rowbytes; i++, rp++, pp++, lp++, cp++) - { - int a, b, c, pa, pb, pc, p; - - b = *pp; - if (i >= (png_uint_32)bpp) - { - c = *cp; - a = *lp; - } - else - { - a = c = 0; - } - p = a + b - c; - pa = abs(p - a); - pb = abs(p - b); - pc = abs(p - c); - - if (pa <= pb && pa <= pc) - p = a; - else if (pb <= pc) - p = b; - else - p = c; - - *rp = (png_byte)(((int)(*rp) + p) & 0xff); - } - break; - } - default: - png_error(png_ptr, "Bad adaptive filter type"); - break; - } -} - -void -png_read_finish_row(png_structp png_ptr) -{ - png_debug(1, "in png_read_finish_row\n"); - png_ptr->row_number++; - if (png_ptr->row_number < png_ptr->num_rows) - return; - - if (png_ptr->interlaced) - { - png_ptr->row_number = 0; - png_memset_check(png_ptr, png_ptr->prev_row, 0, png_ptr->rowbytes + 1); - do - { - png_ptr->pass++; - if (png_ptr->pass >= 7) - break; - png_ptr->iwidth = (png_ptr->width + - png_pass_inc[png_ptr->pass] - 1 - - png_pass_start[png_ptr->pass]) / - png_pass_inc[png_ptr->pass]; - png_ptr->irowbytes = ((png_ptr->iwidth * - (png_uint_32)png_ptr->pixel_depth + 7) >> 3) +1; - - if (!(png_ptr->transformations & PNG_INTERLACE)) - { - png_ptr->num_rows = (png_ptr->height + - png_pass_yinc[png_ptr->pass] - 1 - - png_pass_ystart[png_ptr->pass]) / - png_pass_yinc[png_ptr->pass]; - if (!(png_ptr->num_rows)) - continue; - } - if (png_ptr->transformations & PNG_INTERLACE) - break; - } while (png_ptr->iwidth == 0); - - if (png_ptr->pass < 7) - return; - } - - if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) - { - char extra; - int ret; - - png_ptr->zstream.next_out = (Byte *)&extra; - png_ptr->zstream.avail_out = (uInt)1; - for(;;) - { - if (!(png_ptr->zstream.avail_in)) - { - while (!png_ptr->idat_size) - { - png_byte chunk_length[4]; - - png_crc_finish(png_ptr, 0); - - png_read_data(png_ptr, chunk_length, 4); - png_ptr->idat_size = png_get_uint_32(chunk_length); - - png_reset_crc(png_ptr); - png_crc_read(png_ptr, png_ptr->chunk_name, 4); - if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) - png_error(png_ptr, "Not enough image data"); - - } - png_ptr->zstream.avail_in = (uInt)png_ptr->zbuf_size; - png_ptr->zstream.next_in = png_ptr->zbuf; - if (png_ptr->zbuf_size > png_ptr->idat_size) - png_ptr->zstream.avail_in = (uInt)png_ptr->idat_size; - png_crc_read(png_ptr, png_ptr->zbuf, png_ptr->zstream.avail_in); - png_ptr->idat_size -= png_ptr->zstream.avail_in; - } - ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); - if (ret == Z_STREAM_END) - { - if (!(png_ptr->zstream.avail_out) || png_ptr->zstream.avail_in || - png_ptr->idat_size) - png_error(png_ptr, "Extra compressed data"); - png_ptr->mode |= PNG_AFTER_IDAT; - png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; - break; - } - if (ret != Z_OK) - png_error(png_ptr, png_ptr->zstream.msg ? png_ptr->zstream.msg : - "Decompression Error"); - - if (!(png_ptr->zstream.avail_out)) - png_error(png_ptr, "Extra compressed data"); - - } - png_ptr->zstream.avail_out = 0; - } - - if (png_ptr->idat_size || png_ptr->zstream.avail_in) - png_error(png_ptr, "Extra compression data"); - - inflateReset(&png_ptr->zstream); - - png_ptr->mode |= PNG_AFTER_IDAT; -} - -void -png_read_start_row(png_structp png_ptr) -{ - int max_pixel_depth; - png_uint_32 rowbytes; - - png_debug(1, "in png_read_start_row\n"); - png_ptr->zstream.avail_in = 0; - png_init_read_transformations(png_ptr); - if (png_ptr->interlaced) - { - if (!(png_ptr->transformations & PNG_INTERLACE)) - png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 - - png_pass_ystart[0]) / png_pass_yinc[0]; - else - png_ptr->num_rows = png_ptr->height; - - png_ptr->iwidth = (png_ptr->width + - png_pass_inc[png_ptr->pass] - 1 - - png_pass_start[png_ptr->pass]) / - png_pass_inc[png_ptr->pass]; - - rowbytes = ((png_ptr->iwidth * - (png_uint_32)png_ptr->pixel_depth + 7) >> 3) +1; - png_ptr->irowbytes = (png_size_t)rowbytes; - if((png_uint_32)png_ptr->irowbytes != rowbytes) - png_error(png_ptr, "Rowbytes overflow in png_read_start_row"); - } - else - { - png_ptr->num_rows = png_ptr->height; - png_ptr->iwidth = png_ptr->width; - png_ptr->irowbytes = png_ptr->rowbytes + 1; - } - max_pixel_depth = png_ptr->pixel_depth; - -#if defined(PNG_READ_PACK_SUPPORTED) - if ((png_ptr->transformations & PNG_PACK) && png_ptr->bit_depth < 8) - max_pixel_depth = 8; -#endif - -#if defined(PNG_READ_EXPAND_SUPPORTED) - if (png_ptr->transformations & PNG_EXPAND) - { - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - if (png_ptr->num_trans) - max_pixel_depth = 32; - else - max_pixel_depth = 24; - } - else if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY) - { - if (max_pixel_depth < 8) - max_pixel_depth = 8; - if (png_ptr->num_trans) - max_pixel_depth *= 2; - } - else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) - { - if (png_ptr->num_trans) - { - max_pixel_depth *= 4; - max_pixel_depth /= 3; - } - } - } -#endif - -#if defined(PNG_READ_FILLER_SUPPORTED) - if (png_ptr->transformations & (PNG_FILLER)) - { - if (max_pixel_depth < 32) - max_pixel_depth = 32; - } -#endif - -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) - if (png_ptr->transformations & PNG_GRAY_TO_RGB) - { - if ((png_ptr->num_trans && (png_ptr->transformations & PNG_EXPAND)) || - png_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - { - if (max_pixel_depth <= 16) - max_pixel_depth = 32; - else if (max_pixel_depth <= 32) - max_pixel_depth = 64; - } - else - { - if (max_pixel_depth <= 8) - max_pixel_depth = 24; - else if (max_pixel_depth <= 16) - max_pixel_depth = 48; - } - } -#endif - - /* align the width on the next larger 8 pixels. Mainly used - for interlacing */ - rowbytes = ((png_ptr->width + 7) & ~((png_uint_32)7)); - /* calculate the maximum bytes needed, adding a byte and a pixel - for safety sake */ - rowbytes = ((rowbytes * (png_uint_32)max_pixel_depth + 7) >> 3) + - 1 + ((max_pixel_depth + 7) >> 3); -#ifdef PNG_MAX_MALLOC_64K - if (rowbytes > (png_uint_32)65536L) - png_error(png_ptr, "This image requires a row greater than 64KB"); -#endif - png_ptr->row_buf = (png_bytep)png_malloc(png_ptr, rowbytes); - -#ifdef PNG_MAX_MALLOC_64K - if ((png_uint_32)png_ptr->rowbytes + 1 > (png_uint_32)65536L) - png_error(png_ptr, "This image requires a row greater than 64KB"); -#endif - png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, (png_uint_32)( - png_ptr->rowbytes + 1)); - - png_memset_check(png_ptr, png_ptr->prev_row, 0, png_ptr->rowbytes + 1); - - png_debug1(3, "width = %d,\n", png_ptr->width); - png_debug1(3, "height = %d,\n", png_ptr->height); - png_debug1(3, "iwidth = %d,\n", png_ptr->iwidth); - png_debug1(3, "num_rows = %d\n", png_ptr->num_rows); - png_debug1(3, "rowbytes = %d,\n", png_ptr->rowbytes); - png_debug1(3, "irowbytes = %d,\n", png_ptr->irowbytes); - - png_ptr->flags |= PNG_FLAG_ROW_INIT; -} diff --git a/src/png/pngset.c b/src/png/pngset.c deleted file mode 100644 index cb3fbe27b6..0000000000 --- a/src/png/pngset.c +++ /dev/null @@ -1,380 +0,0 @@ - -/* pngset.c - storage of image information into info struct - * - * libpng 1.0.1 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - * Copyright (c) 1996, 1997 Andreas Dilger - * Copyright (c) 1998, Glenn Randers-Pehrson - * March 15, 1998 - * - * The functions here are used during reads to store data from the file - * into the info struct, and during writes to store application data - * into the info struct for writing into the file. This abstracts the - * info struct and allows us to change the structure in the future. - */ - -#define PNG_INTERNAL -#include "../png/png.h" - -#if defined(PNG_READ_bKGD_SUPPORTED) || defined(PNG_WRITE_bKGD_SUPPORTED) -void -png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background) -{ - png_debug1(1, "in %s storage function\n", "bKGD"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - png_memcpy(&(info_ptr->background), background, sizeof(png_color_16)); - info_ptr->valid |= PNG_INFO_bKGD; -} -#endif - -#if defined(PNG_READ_cHRM_SUPPORTED) || defined(PNG_WRITE_cHRM_SUPPORTED) -void -png_set_cHRM(png_structp png_ptr, png_infop info_ptr, - double white_x, double white_y, double red_x, double red_y, - double green_x, double green_y, double blue_x, double blue_y) -{ - png_debug1(1, "in %s storage function\n", "cHRM"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - info_ptr->x_white = (float)white_x; - info_ptr->y_white = (float)white_y; - info_ptr->x_red = (float)red_x; - info_ptr->y_red = (float)red_y; - info_ptr->x_green = (float)green_x; - info_ptr->y_green = (float)green_y; - info_ptr->x_blue = (float)blue_x; - info_ptr->y_blue = (float)blue_y; - info_ptr->valid |= PNG_INFO_cHRM; -} -#endif - -#if defined(PNG_READ_gAMA_SUPPORTED) || defined(PNG_WRITE_gAMA_SUPPORTED) -void -png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma) -{ - png_debug1(1, "in %s storage function\n", "gAMA"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - info_ptr->gamma = (float)file_gamma; - info_ptr->valid |= PNG_INFO_gAMA; -} -#endif - -#if defined(PNG_READ_hIST_SUPPORTED) || defined(PNG_WRITE_hIST_SUPPORTED) -void -png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist) -{ - png_debug1(1, "in %s storage function\n", "hIST"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - info_ptr->hist = hist; - info_ptr->valid |= PNG_INFO_hIST; -} -#endif - -void -png_set_IHDR(png_structp png_ptr, png_infop info_ptr, - png_uint_32 width, png_uint_32 height, int bit_depth, - int color_type, int interlace_type, int compression_type, - int filter_type) -{ - int rowbytes_per_pixel; - png_debug1(1, "in %s storage function\n", "IHDR"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - info_ptr->width = width; - info_ptr->height = height; - info_ptr->bit_depth = (png_byte)bit_depth; - info_ptr->color_type =(png_byte) color_type; - info_ptr->compression_type = (png_byte)compression_type; - info_ptr->filter_type = (png_byte)filter_type; - info_ptr->interlace_type = (png_byte)interlace_type; - if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - info_ptr->channels = 1; - else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR) - info_ptr->channels = 3; - else - info_ptr->channels = 1; - if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) - info_ptr->channels++; - info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth); - - /* check for overflow */ - rowbytes_per_pixel = (info_ptr->pixel_depth + 7) >> 3; - info_ptr->rowbytes = info_ptr->width * rowbytes_per_pixel; - if (( width > (png_uint_32)2147483647L/rowbytes_per_pixel)) - { - png_warning(png_ptr, - "Width too large to process image data; rowbytes will overflow."); - info_ptr->rowbytes = (png_size_t)0; - } -} - -#if defined(PNG_READ_oFFs_SUPPORTED) || defined(PNG_WRITE_oFFs_SUPPORTED) -void -png_set_oFFs(png_structp png_ptr, png_infop info_ptr, - png_uint_32 offset_x, png_uint_32 offset_y, int unit_type) -{ - png_debug1(1, "in %s storage function\n", "oFFs"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - info_ptr->x_offset = offset_x; - info_ptr->y_offset = offset_y; - info_ptr->offset_unit_type = (png_byte)unit_type; - info_ptr->valid |= PNG_INFO_oFFs; -} -#endif - -#if defined(PNG_READ_pCAL_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) -void -png_set_pCAL(png_structp png_ptr, png_infop info_ptr, - png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, - png_charp units, png_charpp params) -{ - png_uint_32 length; - int i; - - png_debug1(1, "in %s storage function\n", "pCAL"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - length = png_strlen(purpose) + 1; - png_debug1(3, "allocating purpose for info (%d bytes)\n", length); - info_ptr->pcal_purpose = (png_charp)png_malloc(png_ptr, length); - png_memcpy(info_ptr->pcal_purpose, purpose, (png_size_t)length); - - png_debug(3, "storing X0, X1, type, and nparams in info\n"); - info_ptr->pcal_X0 = X0; - info_ptr->pcal_X1 = X1; - info_ptr->pcal_type = (png_byte)type; - info_ptr->pcal_nparams = (png_byte)nparams; - - length = png_strlen(units) + 1; - png_debug1(3, "allocating units for info (%d bytes)\n", length); - info_ptr->pcal_units = (png_charp)png_malloc(png_ptr, length); - png_memcpy(info_ptr->pcal_units, units, (png_size_t)length); - - info_ptr->pcal_params = (png_charpp)png_malloc(png_ptr, - (png_uint_32)((nparams + 1) * sizeof(png_charp))); - info_ptr->pcal_params[nparams] = NULL; - - for (i = 0; i < nparams; i++) - { - length = png_strlen(params[i]) + 1; - png_debug2(3, "allocating parameter %d for info (%d bytes)\n", i, length); - info_ptr->pcal_params[i] = (png_charp)png_malloc(png_ptr, length); - png_memcpy(info_ptr->pcal_params[i], params[i], (png_size_t)length); - } - - info_ptr->valid |= PNG_INFO_pCAL; -} -#endif - -#if defined(PNG_READ_pHYs_SUPPORTED) || defined(PNG_WRITE_pHYs_SUPPORTED) -void -png_set_pHYs(png_structp png_ptr, png_infop info_ptr, - png_uint_32 res_x, png_uint_32 res_y, int unit_type) -{ - png_debug1(1, "in %s storage function\n", "pHYs"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - info_ptr->x_pixels_per_unit = res_x; - info_ptr->y_pixels_per_unit = res_y; - info_ptr->phys_unit_type = (png_byte)unit_type; - info_ptr->valid |= PNG_INFO_pHYs; -} -#endif - -void -png_set_PLTE(png_structp png_ptr, png_infop info_ptr, - png_colorp palette, int num_palette) -{ - png_debug1(1, "in %s storage function\n", "PLTE"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - info_ptr->palette = palette; - info_ptr->num_palette = (png_uint_16)num_palette; - info_ptr->valid |= PNG_INFO_PLTE; -} - -#if defined(PNG_READ_sBIT_SUPPORTED) || defined(PNG_WRITE_sBIT_SUPPORTED) -void -png_set_sBIT(png_structp png_ptr, png_infop info_ptr, - png_color_8p sig_bit) -{ - png_debug1(1, "in %s storage function\n", "sBIT"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - png_memcpy(&(info_ptr->sig_bit), sig_bit, sizeof (png_color_8)); - info_ptr->valid |= PNG_INFO_sBIT; -} -#endif - -#if defined(PNG_READ_sRGB_SUPPORTED) || defined(PNG_WRITE_sRGB_SUPPORTED) -void -png_set_sRGB(png_structp png_ptr, png_infop info_ptr, int intent) -{ - png_debug1(1, "in %s storage function\n", "sRGB"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - info_ptr->srgb_intent = (png_byte)intent; - info_ptr->valid |= PNG_INFO_sRGB; -} -void -png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr, - int intent) -{ -#if defined(PNG_READ_gAMA_SUPPORTED) || defined(PNG_WRITE_gAMA_SUPPORTED) - float file_gamma; -#endif -#if defined(PNG_READ_cHRM_SUPPORTED) || defined(PNG_WRITE_cHRM_SUPPORTED) - float white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y; -#endif - png_debug1(1, "in %s storage function\n", "sRGB_gAMA_and_cHRM"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - png_set_sRGB(png_ptr, info_ptr, intent); - -#if defined(PNG_READ_gAMA_SUPPORTED) || defined(PNG_WRITE_gAMA_SUPPORTED) - file_gamma = (float).45; - png_set_gAMA(png_ptr, info_ptr, file_gamma); -#endif - -#if defined(PNG_READ_cHRM_SUPPORTED) || defined(PNG_WRITE_cHRM_SUPPORTED) - white_x = (float).3127; - white_y = (float).3290; - red_x = (float).64; - red_y = (float).33; - green_x = (float).30; - green_y = (float).60; - blue_x = (float).15; - blue_y = (float).06; - - png_set_cHRM(png_ptr, info_ptr, - white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y); - -#endif -} -#endif - -#if defined(PNG_READ_tEXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \ - defined(PNG_READ_zTXt_SUPPORTED) || defined(PNG_WRITE_zTXt_SUPPORTED) -void -png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, - int num_text) -{ - int i; - - png_debug1(1, "in %s storage function\n", (png_ptr->chunk_name[0] == '\0' ? - "text" : (png_const_charp)png_ptr->chunk_name)); - - if (png_ptr == NULL || info_ptr == NULL || num_text == 0) - return; - - /* Make sure we have enough space in the "text" array in info_struct - * to hold all of the incoming text_ptr objects. - */ - if (info_ptr->num_text + num_text > info_ptr->max_text) - { - if (info_ptr->text != NULL) - { - png_textp old_text; - int old_max; - - old_max = info_ptr->max_text; - info_ptr->max_text = info_ptr->num_text + num_text + 8; - old_text = info_ptr->text; - info_ptr->text = (png_textp)png_malloc(png_ptr, - (png_uint_32)(info_ptr->max_text * sizeof (png_text))); - png_memcpy(info_ptr->text, old_text, (png_size_t)(old_max * - sizeof(png_text))); - png_free(png_ptr, old_text); - } - else - { - info_ptr->max_text = num_text + 8; - info_ptr->num_text = 0; - info_ptr->text = (png_textp)png_malloc(png_ptr, - (png_uint_32)(info_ptr->max_text * sizeof (png_text))); - } - png_debug1(3, "allocated %d entries for info_ptr->text\n", - info_ptr->max_text); - } - - for (i = 0; i < num_text; i++) - { - png_textp textp = &(info_ptr->text[info_ptr->num_text]); - - if (text_ptr[i].text == NULL) - text_ptr[i].text = (png_charp)""; - - if (text_ptr[i].text[0] == '\0') - { - textp->text_length = 0; - textp->compression = PNG_TEXT_COMPRESSION_NONE; - } - else - { - textp->text_length = png_strlen(text_ptr[i].text); - textp->compression = text_ptr[i].compression; - } - textp->text = text_ptr[i].text; - textp->key = text_ptr[i].key; - info_ptr->num_text++; - png_debug1(3, "transferred text chunk %d\n", info_ptr->num_text); - } -} -#endif - -#if defined(PNG_READ_tIME_SUPPORTED) || defined(PNG_WRITE_tIME_SUPPORTED) -void -png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time) -{ - png_debug1(1, "in %s storage function\n", "tIME"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - png_memcpy(&(info_ptr->mod_time), mod_time, sizeof (png_time)); - info_ptr->valid |= PNG_INFO_tIME; -} -#endif - -#if defined(PNG_READ_tRNS_SUPPORTED) || defined(PNG_WRITE_tRNS_SUPPORTED) -void -png_set_tRNS(png_structp png_ptr, png_infop info_ptr, - png_bytep trans, int num_trans, png_color_16p trans_values) -{ - png_debug1(1, "in %s storage function\n", "tRNS"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - if (trans != NULL) - { - info_ptr->trans = trans; - } - - if (trans_values != NULL) - { - png_memcpy(&(info_ptr->trans_values), trans_values, - sizeof(png_color_16)); - if (num_trans == 0) - num_trans = 1; - } - info_ptr->num_trans = (png_uint_16)num_trans; - info_ptr->valid |= PNG_INFO_tRNS; -} -#endif - diff --git a/src/png/pngtest.c b/src/png/pngtest.c deleted file mode 100644 index 9eae4795ea..0000000000 --- a/src/png/pngtest.c +++ /dev/null @@ -1,1036 +0,0 @@ - -/* pngtest.c - a simple test program to test libpng - * - * libpng 1.0.1 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - * Copyright (c) 1996, 1997 Andreas Dilger - * Copyright (c) 1998, Glenn Randers-Pehrson - * March 15, 1998 - * - * This program reads in a PNG image, writes it out again, and then - * compares the two files. If the files are identical, this shows that - * the basic chunk handling, filtering, and (de)compression code is working - * properly. It does not currently test all of the transforms, although - * it probably should. - * - * The program will fail in certain legitimate cases: - * 1) when the compression level or filter selection method is changed. - * 2) when the chunk size is smaller than 8K. - * 3) unknown ancillary chunks exist in the input file. - * 4) others not listed here... - * In these cases, it is best to check with another tool such as "pngcheck" - * to see what the differences between the two images are. - * - * If a filename is given on the command-line, then this file is used - * for the input, rather than the default "pngtest.png". This allows - * testing a wide variety of files easily. - */ - -#include -#include - -/* Makes pngtest verbose so we can find problems (needs to be before png.h) */ -#ifndef PNG_DEBUG -#define PNG_DEBUG 0 -#endif - -#include "../png/png.h" - -int test_one_file PNGARG((PNG_CONST char *inname, PNG_CONST char *outname)); - -#ifdef __TURBOC__ -#include -#endif - -/* defined so I can write to a file on gui/windowing platforms */ -/* #define STDERR stderr */ -#define STDERR stdout /* for DOS */ - -/* example of using row callbacks to make a simple progress meter */ -static int status_pass=1; -static int status_dots_requested=0; -static int status_dots=1; - -void -read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) -{ - if(png_ptr == NULL || row_number > 0x3fffffffL) return; - if(status_pass != pass) - { - fprintf(stdout,"\n Pass %d: ",pass); - status_pass = pass; - status_dots = 30; - } - status_dots--; - if(status_dots == 0) - { - fprintf(stdout, "\n "); - status_dots=30; - } - fprintf(stdout, "r"); -} - -void -write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) -{ - if(png_ptr == NULL || row_number > 0x3fffffffL || pass > 7) return; - fprintf(stdout, "w"); -} - - -#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) -/* example of using user transform callback (we don't transform anything, - but merely count the black pixels) */ - -static png_uint_32 black_pixels; - -void -count_black_pixels(png_structp png_ptr, png_row_infop row_info, png_bytep data) -{ - png_bytep dp = data; - if(png_ptr == NULL)return; - - /* contents of row_info: - * png_uint_32 width width of row - * png_uint_32 rowbytes number of bytes in row - * png_byte color_type color type of pixels - * png_byte bit_depth bit depth of samples - * png_byte channels number of channels (1-4) - * png_byte pixel_depth bits per pixel (depth*channels) - */ - - /* counts the number of black pixels (or zero pixels if color_type is 3 */ - - if(row_info->color_type == 0 || row_info->color_type == 3) - { - int pos=0; - png_uint_32 n; - for (n=0; nwidth; n++) - { - if(row_info->bit_depth == 1) - if(((*dp << pos++ )& 0x80) == 0) black_pixels++; - if(pos == 8) - { - pos=0; - dp++; - } - if(row_info->bit_depth == 2) - if(((*dp << (pos+=2))& 0xc0) == 0) black_pixels++; - if(pos == 8) - { - pos=0; - dp++; - } - if(row_info->bit_depth == 4) - if(((*dp << (pos+=4))& 0xf0) == 0) black_pixels++; - if(pos == 8) - { - pos=0; - dp++; - } - if(row_info->bit_depth == 8) - if(*dp++ == 0) black_pixels++; - if(row_info->bit_depth == 16) - { - if((*dp | *(dp+1)) == 0) black_pixels++; - dp+=2; - } - } - } - else /* other color types */ - { - png_uint_32 n; - int channel; - int color_channels = row_info->channels; - if(row_info->color_type > 3)color_channels--; - - for (n=0; nwidth; n++) - { - for (channel = 0; channel < color_channels; channel++) - { - if(row_info->bit_depth == 8) - if(*dp++ == 0) black_pixels++; - if(row_info->bit_depth == 16) - { - if((*dp | *(dp+1)) == 0) black_pixels++; - dp+=2; - } - } - if(row_info->color_type > 3) - { - dp++; - if(row_info->bit_depth == 16)dp++; - } - } - } -} -#endif /* PNG_WRITE_USER_TRANSFORM_SUPPORTED */ - -static int verbose = 0; -static int wrote_question = 0; - -#if defined(PNG_NO_STDIO) -/* START of code to validate stdio-free compilation */ -/* These copies of the default read/write functions come from pngrio.c and */ -/* pngwio.c. They allow "don't include stdio" testing of the library. */ -/* This is the function which does the actual reading of data. If you are - not reading from a standard C stream, you should create a replacement - read_data function and use it at run time with png_set_read_fn(), rather - than changing the library. */ -#ifndef USE_FAR_KEYWORD -static void -png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_size_t check; - - /* fread() returns 0 on error, so it is OK to store this in a png_size_t - * instead of an int, which is what fread() actually returns. - */ - check = (png_size_t)fread(data, (png_size_t)1, length, - (FILE *)png_ptr->io_ptr); - - if (check != length) - { - png_error(png_ptr, "Read Error"); - } -} -#else -/* this is the model-independent version. Since the standard I/O library - can't handle far buffers in the medium and small models, we have to copy - the data. -*/ - -#define NEAR_BUF_SIZE 1024 -#define MIN(a,b) (a <= b ? a : b) - -static void -png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - int check; - png_byte *n_data; - FILE *io_ptr; - - /* Check if data really is near. If so, use usual code. */ - n_data = (png_byte *)CVT_PTR_NOCHECK(data); - io_ptr = (FILE *)CVT_PTR(png_ptr->io_ptr); - if ((png_bytep)n_data == data) - { - check = fread(n_data, 1, length, io_ptr); - } - else - { - png_byte buf[NEAR_BUF_SIZE]; - png_size_t read, remaining, err; - check = 0; - remaining = length; - do - { - read = MIN(NEAR_BUF_SIZE, remaining); - err = fread(buf, (png_size_t)1, read, io_ptr); - png_memcpy(data, buf, read); /* copy far buffer to near buffer */ - if(err != read) - break; - else - check += err; - data += read; - remaining -= read; - } - while (remaining != 0); - } - if (check != length) - { - png_error(png_ptr, "read Error"); - } -} -#endif /* USE_FAR_KEYWORD */ - -#if defined(PNG_WRITE_FLUSH_SUPPORTED) -static void -png_default_flush(png_structp png_ptr) -{ - FILE *io_ptr; - io_ptr = (FILE *)CVT_PTR((png_ptr->io_ptr)); - if (io_ptr != NULL) - fflush(io_ptr); -} -#endif - -/* This is the function which does the actual writing of data. If you are - not writing to a standard C stream, you should create a replacement - write_data function and use it at run time with png_set_write_fn(), rather - than changing the library. */ -#ifndef USE_FAR_KEYWORD -static void -png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_uint_32 check; - - check = fwrite(data, 1, length, (FILE *)(png_ptr->io_ptr)); - if (check != length) - { - png_error(png_ptr, "Write Error"); - } -} -#else -/* this is the model-independent version. Since the standard I/O library - can't handle far buffers in the medium and small models, we have to copy - the data. -*/ - -#define NEAR_BUF_SIZE 1024 -#define MIN(a,b) (a <= b ? a : b) - -static void -png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_uint_32 check; - png_byte *near_data; /* Needs to be "png_byte *" instead of "png_bytep" */ - FILE *io_ptr; - - /* Check if data really is near. If so, use usual code. */ - near_data = (png_byte *)CVT_PTR_NOCHECK(data); - io_ptr = (FILE *)CVT_PTR(png_ptr->io_ptr); - if ((png_bytep)near_data == data) - { - check = fwrite(near_data, 1, length, io_ptr); - } - else - { - png_byte buf[NEAR_BUF_SIZE]; - png_size_t written, remaining, err; - check = 0; - remaining = length; - do - { - written = MIN(NEAR_BUF_SIZE, remaining); - png_memcpy(buf, data, written); /* copy far buffer to near buffer */ - err = fwrite(buf, 1, written, io_ptr); - if (err != written) - break; - else - check += err; - data += written; - remaining -= written; - } - while (remaining != 0); - } - if (check != length) - { - png_error(png_ptr, "Write Error"); - } -} - -#endif /* USE_FAR_KEYWORD */ - -/* This function is called when there is a warning, but the library thinks - * it can continue anyway. Replacement functions don't have to do anything - * here if you don't want to. In the default configuration, png_ptr is - * not used, but it is passed in case it may be useful. - */ -static void -png_default_warning(png_structp png_ptr, png_const_charp message) -{ - PNG_CONST char *name = "UNKNOWN (ERROR!)"; - if (png_ptr != NULL && png_ptr->error_ptr != NULL) - name = png_ptr->error_ptr; - fprintf(STDERR, "%s: libpng warning: %s\n", name, message); -} - -/* This is the default error handling function. Note that replacements for - * this function MUST NOT RETURN, or the program will likely crash. This - * function is used by default, or if the program supplies NULL for the - * error function pointer in png_set_error_fn(). - */ -static void -png_default_error(png_structp png_ptr, png_const_charp message) -{ - png_default_warning(png_ptr, message); - /* We can return because png_error calls the default handler which is - * actually ok in this case. */ -} -#endif /* PNG_NO_STDIO */ -/* END of code to validate stdio-free compilation */ - -/* START of code to validate memory allocation and deallocation */ -#ifdef PNGTEST_MEMORY_DEBUG -/* Borland DOS special memory handler */ -#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) -ERROR - memory debugging is not supported on this platform -#else - -/* Allocate memory. For reasonable files, size should never exceed - 64K. However, zlib may allocate more then 64K if you don't tell - it not to. See zconf.h and png.h for more information. zlib does - need to allocate exactly 64K, so whatever you call here must - have the ability to do that. - - This piece of code can be compiled to validate max 64K allocations - by setting MAXSEG_64K in zlib zconf.h *or* PNG_MAX_MALLOC_64K. */ -typedef struct memory_information { - png_uint_32 size; - png_voidp pointer; - struct memory_information FAR *next; -} memory_information; -typedef memory_information FAR *memory_infop; - -static memory_infop pinformation = NULL; -static int current_allocation = 0; -static int maximum_allocation = 0; - -extern PNG_EXPORT(png_voidp,png_debug_malloc) PNGARG((png_structp png_ptr, - png_uint_32 size)); -extern PNG_EXPORT(void,png_debug_free) PNGARG((png_structp png_ptr, - png_voidp ptr)); - -png_voidp -png_malloc(png_structp png_ptr, png_uint_32 size) { - if (png_ptr == NULL) { - fprintf(STDERR, "NULL pointer to memory allocator\n"); - return (NULL); - } - if (size == 0) - return (png_voidp)(NULL); - - /* This calls the library allocator twice, once to get the requested - buffer and once to get a new free list entry. */ - { - memory_infop pinfo = png_debug_malloc(png_ptr, sizeof *pinfo); - pinfo->size = size; - current_allocation += size; - if (current_allocation > maximum_allocation) - maximum_allocation = current_allocation; - pinfo->pointer = png_debug_malloc(png_ptr, size); - pinfo->next = pinformation; - pinformation = pinfo; - /* Make sure the caller isn't assuming zeroed memory. */ - png_memset(pinfo->pointer, 0xdd, pinfo->size); - return (png_voidp)(pinfo->pointer); - } -} - -/* Free a pointer. It is removed from the list at the same time. */ -void -png_free(png_structp png_ptr, png_voidp ptr) -{ - if (png_ptr == NULL) - fprintf(STDERR, "NULL pointer to memory allocator\n"); - if (ptr == 0) { -#if 0 /* This happens all the time. */ - fprintf(STDERR, "WARNING: freeing NULL pointer\n"); -#endif - return; - } - - /* Unlink the element from the list. */ - { - memory_infop FAR *ppinfo = &pinformation; - for (;;) { - memory_infop pinfo = *ppinfo; - if (pinfo->pointer == ptr) { - *ppinfo = pinfo->next; - current_allocation -= pinfo->size; - if (current_allocation < 0) - fprintf(STDERR, "Duplicate free of memory\n"); - /* We must free the list element too, but first kill - the memory which is to be freed. */ - memset(ptr, 0x55, pinfo->size); - png_debug_free(png_ptr, pinfo); - break; - } - if (pinfo->next == NULL) { - fprintf(STDERR, "Pointer %x not found\n", ptr); - break; - } - ppinfo = &pinfo->next; - } - } - - /* Finally free the data. */ - png_debug_free(png_ptr, ptr); -} -#endif /* Not Borland DOS special memory handler */ -#endif -/* END of code to test memory allocation/deallocation */ - -/* Test one file */ -int -test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) -{ - static FILE *fpin, *fpout; /* "static" prevents setjmp corruption */ - png_structp read_ptr, write_ptr; - png_infop read_info_ptr, write_info_ptr, end_info_ptr; - png_bytep row_buf; - png_uint_32 y; - png_uint_32 width, height; - int num_pass, pass; - int bit_depth, color_type; -#ifdef USE_FAR_KEYWORD - jmp_buf jmpbuf; -#endif - - char inbuf[256], outbuf[256]; - - row_buf = (png_bytep)NULL; - - if ((fpin = fopen(inname, "rb")) == NULL) - { - fprintf(STDERR, "Could not find input file %s\n", inname); - return (1); - } - - if ((fpout = fopen(outname, "wb")) == NULL) - { - fprintf(STDERR, "Could not open output file %s\n", outname); - fclose(fpin); - return (1); - } - - png_debug(0, "Allocating read and write structures\n"); - read_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, (png_voidp)NULL, - (png_error_ptr)NULL, (png_error_ptr)NULL); -#if defined(PNG_NO_STDIO) - png_set_error_fn(read_ptr, (png_voidp)inname, png_default_error, - png_default_warning); -#endif - write_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, (png_voidp)NULL, - (png_error_ptr)NULL, (png_error_ptr)NULL); -#if defined(PNG_NO_STDIO) - png_set_error_fn(write_ptr, (png_voidp)inname, png_default_error, - png_default_warning); -#endif - png_debug(0, "Allocating read_info, write_info and end_info structures\n"); - read_info_ptr = png_create_info_struct(read_ptr); - write_info_ptr = png_create_info_struct(write_ptr); - end_info_ptr = png_create_info_struct(read_ptr); - - png_debug(0, "Setting jmpbuf for read struct\n"); -#ifdef USE_FAR_KEYWORD - if (setjmp(jmpbuf)) -#else - if (setjmp(read_ptr->jmpbuf)) -#endif - { - fprintf(STDERR, "%s -> %s: libpng read error\n", inname, outname); - png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr); - png_destroy_write_struct(&write_ptr, &write_info_ptr); - fclose(fpin); - fclose(fpout); - return (1); - } - - png_debug(0, "Setting jmpbuf for write struct\n"); -#ifdef USE_FAR_KEYWORD - png_memcpy(read_ptr->jmpbuf,jmpbuf,sizeof(jmp_buf)); - if (setjmp(jmpbuf)) -#else - if (setjmp(write_ptr->jmpbuf)) -#endif - { - fprintf(STDERR, "%s -> %s: libpng write error\n", inname, outname); - png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr); - png_destroy_write_struct(&write_ptr, &write_info_ptr); - fclose(fpin); - fclose(fpout); - return (1); - } - -#ifdef USE_FAR_KEYWORD - png_memcpy(write_ptr->jmpbuf,jmpbuf,sizeof(jmp_buf)); -#endif - png_debug(0, "Initializing input and output streams\n"); -#if !defined(PNG_NO_STDIO) - png_init_io(read_ptr, fpin); - png_init_io(write_ptr, fpout); -#else - png_set_read_fn(read_ptr, (png_voidp)fpin, png_default_read_data); - png_set_write_fn(write_ptr, (png_voidp)fpout, png_default_write_data, -#if defined(PNG_WRITE_FLUSH_SUPPORTED) - png_default_flush); -#else - NULL); -#endif -#endif - if(status_dots_requested == 1) - { - png_set_write_status_fn(write_ptr, write_row_callback); - png_set_read_status_fn(read_ptr, read_row_callback); - } - else - { - png_set_write_status_fn(write_ptr, NULL); - png_set_read_status_fn(read_ptr, NULL); - } - -# if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) - black_pixels=0; - png_set_write_user_transform_fn(write_ptr, count_black_pixels); -# endif - - png_debug(0, "Reading info struct\n"); - png_read_info(read_ptr, read_info_ptr); - - png_debug(0, "Transferring info struct\n"); - { - int interlace_type, compression_type, filter_type; - - if (png_get_IHDR(read_ptr, read_info_ptr, &width, &height, &bit_depth, - &color_type, &interlace_type, &compression_type, &filter_type)) - { - png_set_IHDR(write_ptr, write_info_ptr, width, height, bit_depth, -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) - color_type, interlace_type, compression_type, filter_type); -#else - color_type, PNG_INTERLACE_NONE, compression_type, filter_type); -#endif - } - } -#if defined(PNG_READ_bKGD_SUPPORTED) && defined(PNG_WRITE_bKGD_SUPPORTED) - { - png_color_16p background; - - if (png_get_bKGD(read_ptr, read_info_ptr, &background)) - { - png_set_bKGD(write_ptr, write_info_ptr, background); - } - } -#endif -#if defined(PNG_READ_cHRM_SUPPORTED) && defined(PNG_WRITE_cHRM_SUPPORTED) - { - double white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y; - - if (png_get_cHRM(read_ptr, read_info_ptr, &white_x, &white_y, &red_x, - &red_y, &green_x, &green_y, &blue_x, &blue_y)) - { - png_set_cHRM(write_ptr, write_info_ptr, white_x, white_y, red_x, - red_y, green_x, green_y, blue_x, blue_y); - } - } -#endif -#if defined(PNG_READ_gAMA_SUPPORTED) && defined(PNG_WRITE_gAMA_SUPPORTED) - { - double gamma; - - if (png_get_gAMA(read_ptr, read_info_ptr, &gamma)) - { - png_set_gAMA(write_ptr, write_info_ptr, gamma); - } - } -#endif -#if defined(PNG_READ_sRGB_SUPPORTED) && defined(PNG_WRITE_sRGB_SUPPORTED) - { - int intent; - - if (png_get_sRGB(read_ptr, read_info_ptr, &intent)) - { - png_set_sRGB(write_ptr, write_info_ptr, intent); - } - } -#endif -#if defined(PNG_READ_hIST_SUPPORTED) && defined(PNG_WRITE_hIST_SUPPORTED) - { - png_uint_16p hist; - - if (png_get_hIST(read_ptr, read_info_ptr, &hist)) - { - png_set_hIST(write_ptr, write_info_ptr, hist); - } - } -#endif -#if defined(PNG_READ_oFFs_SUPPORTED) && defined(PNG_WRITE_oFFs_SUPPORTED) - { - png_uint_32 offset_x, offset_y; - int unit_type; - - if (png_get_oFFs(read_ptr, read_info_ptr,&offset_x,&offset_y,&unit_type)) - { - png_set_oFFs(write_ptr, write_info_ptr, offset_x, offset_y, unit_type); - } - } -#endif -#if defined(PNG_READ_pCAL_SUPPORTED) && defined(PNG_WRITE_pCAL_SUPPORTED) - { - png_charp purpose, units; - png_charpp params; - png_int_32 X0, X1; - int type, nparams; - - if (png_get_pCAL(read_ptr, read_info_ptr, &purpose, &X0, &X1, &type, - &nparams, &units, ¶ms)) - { - png_set_pCAL(write_ptr, write_info_ptr, purpose, X0, X1, type, - nparams, units, params); - } - } -#endif -#if defined(PNG_READ_pHYs_SUPPORTED) && defined(PNG_WRITE_pHYs_SUPPORTED) - { - png_uint_32 res_x, res_y; - int unit_type; - - if (png_get_pHYs(read_ptr, read_info_ptr, &res_x, &res_y, &unit_type)) - { - png_set_pHYs(write_ptr, write_info_ptr, res_x, res_y, unit_type); - } - } -#endif - { - png_colorp palette; - int num_palette; - - if (png_get_PLTE(read_ptr, read_info_ptr, &palette, &num_palette)) - { - png_set_PLTE(write_ptr, write_info_ptr, palette, num_palette); - } - } -#if defined(PNG_READ_sBIT_SUPPORTED) && defined(PNG_WRITE_sBIT_SUPPORTED) - { - png_color_8p sig_bit; - - if (png_get_sBIT(read_ptr, read_info_ptr, &sig_bit)) - { - png_set_sBIT(write_ptr, write_info_ptr, sig_bit); - } - } -#endif -#if (defined(PNG_READ_tEXt_SUPPORTED) && defined(PNG_WRITE_tEXt_SUPPORTED)) || \ - (defined(PNG_READ_zTXt_SUPPORTED) && defined(PNG_WRITE_zTXt_SUPPORTED)) - { - png_textp text_ptr; - int num_text; - - if (png_get_text(read_ptr, read_info_ptr, &text_ptr, &num_text) > 0) - { - png_debug1(0, "Handling %d tEXt/zTXt chunks\n", num_text); - png_set_text(write_ptr, write_info_ptr, text_ptr, num_text); - } - } -#endif -#if defined(PNG_READ_tIME_SUPPORTED) && defined(PNG_WRITE_tIME_SUPPORTED) - { - png_timep mod_time; - - if (png_get_tIME(read_ptr, read_info_ptr, &mod_time)) - { - png_set_tIME(write_ptr, write_info_ptr, mod_time); - } - } -#endif -#if defined(PNG_READ_tRNS_SUPPORTED) && defined(PNG_WRITE_tRNS_SUPPORTED) - { - png_bytep trans; - int num_trans; - png_color_16p trans_values; - - if (png_get_tRNS(read_ptr, read_info_ptr, &trans, &num_trans, - &trans_values)) - { - png_set_tRNS(write_ptr, write_info_ptr, trans, num_trans, - trans_values); - } - } -#endif - - png_debug(0, "\nWriting info struct\n"); - png_write_info(write_ptr, write_info_ptr); - - png_debug(0, "\nAllocating row buffer \n"); - row_buf = (png_bytep)png_malloc(read_ptr, - png_get_rowbytes(read_ptr, read_info_ptr)); - if (row_buf == NULL) - { - fprintf(STDERR, "No memory to allocate row buffer\n"); - png_destroy_read_struct(&read_ptr, &read_info_ptr, (png_infopp)NULL); - png_destroy_write_struct(&write_ptr, &write_info_ptr); - fclose(fpin); - fclose(fpout); - return (1); - } - png_debug(0, "Writing row data\n"); - - num_pass = png_set_interlace_handling(read_ptr); - png_set_interlace_handling(write_ptr); - - for (pass = 0; pass < num_pass; pass++) - { - png_debug1(0, "Writing row data for pass %d\n",pass); - for (y = 0; y < height; y++) - { - png_read_rows(read_ptr, (png_bytepp)&row_buf, (png_bytepp)NULL, 1); - png_write_rows(write_ptr, (png_bytepp)&row_buf, 1); - } - } - - png_debug(0, "Reading and writing end_info data\n"); - png_read_end(read_ptr, end_info_ptr); - png_write_end(write_ptr, end_info_ptr); - -#ifdef PNG_EASY_ACCESS_SUPPORTED - if(verbose) - { - png_uint_32 iwidth, iheight; - iwidth = png_get_image_width(write_ptr, write_info_ptr); - iheight = png_get_image_height(write_ptr, write_info_ptr); - fprintf(STDERR, "Image width = %lu, height = %lu\n", - iwidth, iheight); - } -#endif - - png_debug(0, "Destroying data structs\n"); - png_free(read_ptr, row_buf); - png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr); - png_destroy_write_struct(&write_ptr, &write_info_ptr); - - fclose(fpin); - fclose(fpout); - - png_debug(0, "Opening files for comparison\n"); - if ((fpin = fopen(inname, "rb")) == NULL) - { - fprintf(STDERR, "Could not find file %s\n", inname); - return (1); - } - - if ((fpout = fopen(outname, "rb")) == NULL) - { - fprintf(STDERR, "Could not find file %s\n", outname); - fclose(fpin); - return (1); - } - - for(;;) - { - png_size_t num_in, num_out; - - num_in = fread(inbuf, 1, 1, fpin); - num_out = fread(outbuf, 1, 1, fpout); - - if (num_in != num_out) - { - fprintf(STDERR, "Files %s and %s are of a different size\n", - inname, outname); - if(wrote_question == 0) - { - fprintf(STDERR, - " Was %s written with the same chunk size (8k),",inname); - fprintf(STDERR, - " filtering\n heuristic (libpng default), compression"); - fprintf(STDERR, - " level (zlib default)\n and zlib version (%s)?\n\n", - ZLIB_VERSION); - wrote_question=1; - } - fclose(fpin); - fclose(fpout); - return (0); - } - - if (!num_in) - break; - - if (png_memcmp(inbuf, outbuf, num_in)) - { - fprintf(STDERR, "Files %s and %s are different\n", inname, outname); - if(wrote_question == 0) - { - fprintf(STDERR, - " Was %s written with the same chunk size (8k),",inname); - fprintf(STDERR, - " filtering\n heuristic (libpng default), compression"); - fprintf(STDERR, - " level (zlib default)\n and zlib version (%s)?\n\n", - ZLIB_VERSION); - wrote_question=1; - } - fclose(fpin); - fclose(fpout); - return (0); - } - } - - fclose(fpin); - fclose(fpout); - - return (0); -} - -/* input and output filenames */ -#ifdef RISCOS -PNG_CONST char *inname = "pngtest/png"; -PNG_CONST char *outname = "pngout/png"; -#else -static PNG_CONST char *inname = "pngtest.png"; -static PNG_CONST char *outname = "pngout.png"; -#endif - -int -main(int argc, char *argv[]) -{ - int multiple = 0; - int ierror = 0; - - fprintf(STDERR, "Testing libpng version %s\n", PNG_LIBPNG_VER_STRING); - fprintf(STDERR, " with zlib version %s\n", ZLIB_VERSION); - - /* Do some consistency checking on the memory allocation settings, I'm - not sure this matters, but it is nice to know, the first of these - tests should be impossible because of the way the macros are set - in pngconf.h */ -#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K) - fprintf(STDERR, " NOTE: Zlib compiled for max 64k, libpng not\n"); -#endif - /* I think the following can happen. */ -#if !defined(MAXSEG_64K) && defined(PNG_MAX_MALLOC_64K) - fprintf(STDERR, " NOTE: libpng compiled for max 64k, zlib not\n"); -#endif - - if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING)) - { - fprintf(STDERR, - "Warning: versions are different between png.h and png.c\n"); - fprintf(STDERR, " png.h version: %s\n", PNG_LIBPNG_VER_STRING); - fprintf(STDERR, " png.c version: %s\n\n", png_libpng_ver); - ++ierror; - } - - if (argc > 1) - { - if (strcmp(argv[1], "-m") == 0) - { - multiple = 1; - status_dots_requested = 0; - } - else if (strcmp(argv[1], "-mv") == 0 || - strcmp(argv[1], "-vm") == 0 ) - { - multiple = 1; - verbose = 1; - status_dots_requested = 1; - } - else if (strcmp(argv[1], "-v") == 0) - { - verbose = 1; - status_dots_requested = 1; - inname = argv[2]; - } - else - { - inname = argv[1]; - status_dots_requested = 0; - } - } - - if (!multiple && argc == 3+verbose) - outname = argv[2+verbose]; - - if ((!multiple && argc > 3+verbose) || (multiple && argc < 2)) - { - fprintf(STDERR, - "usage: %s [infile.png] [outfile.png]\n\t%s -m {infile.png}\n", - argv[0], argv[0]); - fprintf(STDERR, - " reads/writes one PNG file (without -m) or multiple files (-m)\n"); - fprintf(STDERR, - " with -m %s is used as a temporary file\n", outname); - exit(1); - } - - if (multiple) - { - int i; -#ifdef PNGTEST_MEMORY_DEBUG - int allocation_now = current_allocation; -#endif - for (i=2; isize, pinfo->pointer); - pinfo = pinfo->next; - } - } -#endif - } -#ifdef PNGTEST_MEMORY_DEBUG - fprintf(STDERR, "Maximum memory allocation: %d bytes\n", - maximum_allocation); -#endif - } - else - { - int i; - for (i=0; i<3; ++i) { - int kerror; -#ifdef PNGTEST_MEMORY_DEBUG - int allocation_now = current_allocation; -#endif - if (i == 1) status_dots_requested = 1; - else if(verbose == 0)status_dots_requested = 0; - if (i == 0 || verbose == 1 || ierror != 0) - fprintf(STDERR, "Testing %s:",inname); - kerror = test_one_file(inname, outname); - if(kerror == 0) - { - if(verbose == 1 || i == 2) -#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) - fprintf(STDERR, " PASS (%lu black pixels)\n",black_pixels); -#else - fprintf(STDERR, " PASS\n"); -#endif - } - else - { - if(verbose == 0 && i != 2) - fprintf(STDERR, "Testing %s:",inname); - fprintf(STDERR, " FAIL\n"); - ierror += kerror; - } -#ifdef PNGTEST_MEMORY_DEBUG - if (allocation_now != current_allocation) - fprintf(STDERR, "MEMORY ERROR: %d bytes lost\n", - current_allocation-allocation_now); - if (current_allocation != 0) { - memory_infop pinfo = pinformation; - - fprintf(STDERR, "MEMORY ERROR: %d bytes still allocated\n", - current_allocation); - while (pinfo != NULL) { - fprintf(STDERR, " %d bytes at %x\n", pinfo->size, pinfo->pointer); - pinfo = pinfo->next; - } - } -#endif - } -#ifdef PNGTEST_MEMORY_DEBUG - fprintf(STDERR, "Maximum memory allocation: %d bytes\n", - maximum_allocation); -#endif - } - - if (ierror == 0) - fprintf(STDERR, "libpng passes test\n"); - else - fprintf(STDERR, "libpng FAILS test\n"); - return (int)(ierror != 0); -} diff --git a/src/png/pngtrans.c b/src/png/pngtrans.c deleted file mode 100644 index b28464acb2..0000000000 --- a/src/png/pngtrans.c +++ /dev/null @@ -1,577 +0,0 @@ - -/* pngtrans.c - transforms the data in a row (used by both readers and writers) - * - * libpng 1.0.1 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - * Copyright (c) 1996, 1997 Andreas Dilger - * Copyright (c) 1998, Glenn Randers-Pehrson - * March 15, 1998 - */ - -#define PNG_INTERNAL -#include "../png/png.h" - -#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) -/* turn on bgr to rgb mapping */ -void -png_set_bgr(png_structp png_ptr) -{ - png_debug(1, "in png_set_bgr\n"); - png_ptr->transformations |= PNG_BGR; -} -#endif - -#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) -/* turn on 16 bit byte swapping */ -void -png_set_swap(png_structp png_ptr) -{ - png_debug(1, "in png_set_swap\n"); - if (png_ptr->bit_depth == 16) - png_ptr->transformations |= PNG_SWAP_BYTES; -} -#endif - -#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) -/* turn on pixel packing */ -void -png_set_packing(png_structp png_ptr) -{ - png_debug(1, "in png_set_packing\n"); - if (png_ptr->bit_depth < 8) - { - png_ptr->transformations |= PNG_PACK; - png_ptr->usr_bit_depth = 8; - } -} -#endif - -#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED) -/* turn on packed pixel swapping */ -void -png_set_packswap(png_structp png_ptr) -{ - png_debug(1, "in png_set_packswap\n"); - if (png_ptr->bit_depth < 8) - png_ptr->transformations |= PNG_PACKSWAP; -} -#endif - -#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) -void -png_set_shift(png_structp png_ptr, png_color_8p true_bits) -{ - png_debug(1, "in png_set_shift\n"); - png_ptr->transformations |= PNG_SHIFT; - png_ptr->shift = *true_bits; -} -#endif - -#if defined(PNG_READ_INTERLACING_SUPPORTED) || \ - defined(PNG_WRITE_INTERLACING_SUPPORTED) -int -png_set_interlace_handling(png_structp png_ptr) -{ - png_debug(1, "in png_set_interlace handling\n"); - if (png_ptr->interlaced) - { - png_ptr->transformations |= PNG_INTERLACE; - return (7); - } - - return (1); -} -#endif - -#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) -/* Add a filler byte on read, or remove a filler or alpha byte on write. - * The filler type has changed in v0.95 to allow future 2-byte fillers - * for 48-bit input data, as well as avoiding problems with some compilers - * which don't like bytes as parameters. - */ -void -png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc) -{ - png_debug(1, "in png_set_filler\n"); - png_ptr->transformations |= PNG_FILLER; - png_ptr->filler = (png_byte)filler; - if (filler_loc == PNG_FILLER_AFTER) - png_ptr->flags |= PNG_FLAG_FILLER_AFTER; - else - png_ptr->flags &= ~PNG_FLAG_FILLER_AFTER; - - /* This should probably go in the "do_filler" routine */ - if (png_ptr->color_type == PNG_COLOR_TYPE_RGB && png_ptr->bit_depth == 8) - { - png_ptr->usr_channels = 4; - } -} -#endif - -#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \ - defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) -void -png_set_swap_alpha(png_structp png_ptr) -{ - png_debug(1, "in png_set_swap_alpha\n"); - png_ptr->transformations |= PNG_SWAP_ALPHA; -} -#endif - -#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \ - defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) -void -png_set_invert_alpha(png_structp png_ptr) -{ - png_debug(1, "in png_set_invert_alpha\n"); - png_ptr->transformations |= PNG_INVERT_ALPHA; -} -#endif - -#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) -void -png_set_invert_mono(png_structp png_ptr) -{ - png_debug(1, "in png_set_invert_mono\n"); - png_ptr->transformations |= PNG_INVERT_MONO; -} - -/* invert monocrome grayscale data */ -void -png_do_invert(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_invert\n"); - if (row_info->bit_depth == 1 && -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - row_info->color_type == PNG_COLOR_TYPE_GRAY) - { - png_bytep rp; - png_uint_32 i; - - for (i = 0, rp = row; i < row_info->rowbytes; i++, rp++) - { - *rp = (png_byte)(~(*rp)); - } - } -} -#endif - -#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) -/* swaps byte order on 16 bit depth images */ -void -png_do_swap(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_swap\n"); - if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - row_info->bit_depth == 16) - { - png_bytep rp; - png_byte t; - png_uint_32 i; - - for (i = 0, rp = row; - i < row_info->width * row_info->channels; - i++, rp += 2) - { - t = *rp; - *rp = *(rp + 1); - *(rp + 1) = t; - } - } -} -#endif - -#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED) -static png_byte onebppswaptable[256] = { - 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, - 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0, - 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, - 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, - 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4, - 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4, - 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, - 0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC, - 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, - 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2, - 0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA, - 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA, - 0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6, - 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6, - 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE, - 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE, - 0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1, - 0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1, - 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, - 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9, - 0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5, - 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5, - 0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED, - 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD, - 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3, - 0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3, - 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, - 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB, - 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, - 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7, - 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, - 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF -}; - -static png_byte twobppswaptable[256] = { - 0x00, 0x40, 0x80, 0xC0, 0x10, 0x50, 0x90, 0xD0, - 0x20, 0x60, 0xA0, 0xE0, 0x30, 0x70, 0xB0, 0xF0, - 0x04, 0x44, 0x84, 0xC4, 0x14, 0x54, 0x94, 0xD4, - 0x24, 0x64, 0xA4, 0xE4, 0x34, 0x74, 0xB4, 0xF4, - 0x08, 0x48, 0x88, 0xC8, 0x18, 0x58, 0x98, 0xD8, - 0x28, 0x68, 0xA8, 0xE8, 0x38, 0x78, 0xB8, 0xF8, - 0x0C, 0x4C, 0x8C, 0xCC, 0x1C, 0x5C, 0x9C, 0xDC, - 0x2C, 0x6C, 0xAC, 0xEC, 0x3C, 0x7C, 0xBC, 0xFC, - 0x01, 0x41, 0x81, 0xC1, 0x11, 0x51, 0x91, 0xD1, - 0x21, 0x61, 0xA1, 0xE1, 0x31, 0x71, 0xB1, 0xF1, - 0x05, 0x45, 0x85, 0xC5, 0x15, 0x55, 0x95, 0xD5, - 0x25, 0x65, 0xA5, 0xE5, 0x35, 0x75, 0xB5, 0xF5, - 0x09, 0x49, 0x89, 0xC9, 0x19, 0x59, 0x99, 0xD9, - 0x29, 0x69, 0xA9, 0xE9, 0x39, 0x79, 0xB9, 0xF9, - 0x0D, 0x4D, 0x8D, 0xCD, 0x1D, 0x5D, 0x9D, 0xDD, - 0x2D, 0x6D, 0xAD, 0xED, 0x3D, 0x7D, 0xBD, 0xFD, - 0x02, 0x42, 0x82, 0xC2, 0x12, 0x52, 0x92, 0xD2, - 0x22, 0x62, 0xA2, 0xE2, 0x32, 0x72, 0xB2, 0xF2, - 0x06, 0x46, 0x86, 0xC6, 0x16, 0x56, 0x96, 0xD6, - 0x26, 0x66, 0xA6, 0xE6, 0x36, 0x76, 0xB6, 0xF6, - 0x0A, 0x4A, 0x8A, 0xCA, 0x1A, 0x5A, 0x9A, 0xDA, - 0x2A, 0x6A, 0xAA, 0xEA, 0x3A, 0x7A, 0xBA, 0xFA, - 0x0E, 0x4E, 0x8E, 0xCE, 0x1E, 0x5E, 0x9E, 0xDE, - 0x2E, 0x6E, 0xAE, 0xEE, 0x3E, 0x7E, 0xBE, 0xFE, - 0x03, 0x43, 0x83, 0xC3, 0x13, 0x53, 0x93, 0xD3, - 0x23, 0x63, 0xA3, 0xE3, 0x33, 0x73, 0xB3, 0xF3, - 0x07, 0x47, 0x87, 0xC7, 0x17, 0x57, 0x97, 0xD7, - 0x27, 0x67, 0xA7, 0xE7, 0x37, 0x77, 0xB7, 0xF7, - 0x0B, 0x4B, 0x8B, 0xCB, 0x1B, 0x5B, 0x9B, 0xDB, - 0x2B, 0x6B, 0xAB, 0xEB, 0x3B, 0x7B, 0xBB, 0xFB, - 0x0F, 0x4F, 0x8F, 0xCF, 0x1F, 0x5F, 0x9F, 0xDF, - 0x2F, 0x6F, 0xAF, 0xEF, 0x3F, 0x7F, 0xBF, 0xFF -}; - -static png_byte fourbppswaptable[256] = { - 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, - 0x80, 0x90, 0xA0, 0xB0, 0xC0, 0xD0, 0xE0, 0xF0, - 0x01, 0x11, 0x21, 0x31, 0x41, 0x51, 0x61, 0x71, - 0x81, 0x91, 0xA1, 0xB1, 0xC1, 0xD1, 0xE1, 0xF1, - 0x02, 0x12, 0x22, 0x32, 0x42, 0x52, 0x62, 0x72, - 0x82, 0x92, 0xA2, 0xB2, 0xC2, 0xD2, 0xE2, 0xF2, - 0x03, 0x13, 0x23, 0x33, 0x43, 0x53, 0x63, 0x73, - 0x83, 0x93, 0xA3, 0xB3, 0xC3, 0xD3, 0xE3, 0xF3, - 0x04, 0x14, 0x24, 0x34, 0x44, 0x54, 0x64, 0x74, - 0x84, 0x94, 0xA4, 0xB4, 0xC4, 0xD4, 0xE4, 0xF4, - 0x05, 0x15, 0x25, 0x35, 0x45, 0x55, 0x65, 0x75, - 0x85, 0x95, 0xA5, 0xB5, 0xC5, 0xD5, 0xE5, 0xF5, - 0x06, 0x16, 0x26, 0x36, 0x46, 0x56, 0x66, 0x76, - 0x86, 0x96, 0xA6, 0xB6, 0xC6, 0xD6, 0xE6, 0xF6, - 0x07, 0x17, 0x27, 0x37, 0x47, 0x57, 0x67, 0x77, - 0x87, 0x97, 0xA7, 0xB7, 0xC7, 0xD7, 0xE7, 0xF7, - 0x08, 0x18, 0x28, 0x38, 0x48, 0x58, 0x68, 0x78, - 0x88, 0x98, 0xA8, 0xB8, 0xC8, 0xD8, 0xE8, 0xF8, - 0x09, 0x19, 0x29, 0x39, 0x49, 0x59, 0x69, 0x79, - 0x89, 0x99, 0xA9, 0xB9, 0xC9, 0xD9, 0xE9, 0xF9, - 0x0A, 0x1A, 0x2A, 0x3A, 0x4A, 0x5A, 0x6A, 0x7A, - 0x8A, 0x9A, 0xAA, 0xBA, 0xCA, 0xDA, 0xEA, 0xFA, - 0x0B, 0x1B, 0x2B, 0x3B, 0x4B, 0x5B, 0x6B, 0x7B, - 0x8B, 0x9B, 0xAB, 0xBB, 0xCB, 0xDB, 0xEB, 0xFB, - 0x0C, 0x1C, 0x2C, 0x3C, 0x4C, 0x5C, 0x6C, 0x7C, - 0x8C, 0x9C, 0xAC, 0xBC, 0xCC, 0xDC, 0xEC, 0xFC, - 0x0D, 0x1D, 0x2D, 0x3D, 0x4D, 0x5D, 0x6D, 0x7D, - 0x8D, 0x9D, 0xAD, 0xBD, 0xCD, 0xDD, 0xED, 0xFD, - 0x0E, 0x1E, 0x2E, 0x3E, 0x4E, 0x5E, 0x6E, 0x7E, - 0x8E, 0x9E, 0xAE, 0xBE, 0xCE, 0xDE, 0xEE, 0xFE, - 0x0F, 0x1F, 0x2F, 0x3F, 0x4F, 0x5F, 0x6F, 0x7F, - 0x8F, 0x9F, 0xAF, 0xBF, 0xCF, 0xDF, 0xEF, 0xFF -}; - -/* swaps pixel packing order within bytes */ -void -png_do_packswap(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_packswap\n"); - if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - row_info->bit_depth < 8) - { - png_bytep rp, end, table; - - end = row + row_info->rowbytes; - - if (row_info->bit_depth == 1) - table = onebppswaptable; - else if (row_info->bit_depth == 2) - table = twobppswaptable; - else if (row_info->bit_depth == 4) - table = fourbppswaptable; - else - return; - - for (rp = row; rp < end; rp++) - *rp = table[*rp]; - } -} -#endif /* PNG_READ_PACKSWAP_SUPPORTED or PNG_WRITE_PACKSWAP_SUPPORTED */ - -#if defined(PNG_WRITE_FILLER_SUPPORTED) || \ - defined(PNG_READ_STRIP_ALPHA_SUPPORTED) -/* remove filler or alpha byte(s) */ -void -png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags) -{ - png_debug(1, "in png_do_strip_filler\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL) -#endif - { -/* - if (row_info->color_type == PNG_COLOR_TYPE_RGB || - row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) -*/ - if (row_info->channels == 4) - { - if (row_info->bit_depth == 8) - { - /* This converts from RGBX or RGBA to RGB */ - if (flags & PNG_FLAG_FILLER_AFTER) - { - png_bytep sp, dp; - png_uint_32 i; - - for (i = 1, sp = row + 4, dp = row + 3; i < row_info->width; i++) - { - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - sp++; - } - } - /* This converts from XRGB or ARGB to RGB */ - else - { - png_bytep sp, dp; - png_uint_32 i; - - for (i = 0, sp = row, dp = row; i < row_info->width; i++) - { - sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - } - } - row_info->pixel_depth = 24; - row_info->rowbytes = row_info->width * 3; - } - else /* if (row_info->bit_depth == 16) */ - { - if (flags & PNG_FLAG_FILLER_AFTER) - { - png_bytep sp, dp; - png_uint_32 i; - - /* This converts from RRGGBBXX or RRGGBBAA to RRGGBB */ - for (i = 1, sp = row + 8, dp = row + 6; i < row_info->width; i++) - { - /* This could be (although memcpy is probably slower): - png_memcpy(dp, sp, 6); - sp += 8; - dp += 6; - */ - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - sp += 2; - } - } - else - { - png_bytep sp, dp; - png_uint_32 i; - - /* This converts from XXRRGGBB or AARRGGBB to RRGGBB */ - for (i = 0, sp = row + 2, dp = row; i < row_info->width; i++) - { - /* This could be (although memcpy is probably slower): - png_memcpy(dp, sp, 6); - sp += 8; - dp += 6; - */ - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - } - } - row_info->pixel_depth = 48; - row_info->rowbytes = row_info->width * 6; - } - row_info->channels = 3; - } -/* - else if (row_info->color_type == PNG_COLOR_TYPE_GRAY || - row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) -*/ - else if (row_info->channels == 2) - { - if (row_info->bit_depth == 8) - { - /* This converts from GX or GA to G */ - if (flags & PNG_FLAG_FILLER_AFTER) - { - png_bytep sp, dp; - png_uint_32 i; - - for (i = 1, sp = row + 2, dp = row + 1; i < row_info->width; i++) - { - *dp++ = *sp++; - sp++; - } - } - /* This converts from XG or AG to G */ - else - { - png_bytep sp, dp; - png_uint_32 i; - - for (i = 0, sp = row, dp = row; i < row_info->width; i++) - { - sp++; - *dp++ = *sp++; - } - } - row_info->pixel_depth = 8; - row_info->rowbytes = row_info->width; - } - else /* if (row_info->bit_depth == 16) */ - { - if (flags & PNG_FLAG_FILLER_AFTER) - { - png_bytep sp, dp; - png_uint_32 i; - - /* This converts from GGXX or GGAA to GG */ - for (i = 1, sp = row + 4, dp = row + 2; i < row_info->width; i++) - { - *dp++ = *sp++; - *dp++ = *sp++; - sp += 2; - } - } - else - { - png_bytep sp, dp; - png_uint_32 i; - - /* This converts from XXGG or AAGG to GG */ - for (i = 0, sp = row, dp = row; i < row_info->width; i++) - { - sp += 2; - *dp++ = *sp++; - *dp++ = *sp++; - } - } - row_info->pixel_depth = 16; - row_info->rowbytes = row_info->width * 2; - } - row_info->channels = 1; - } - } -} -#endif - -#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) -/* swaps red and blue bytes within a pixel */ -void -png_do_bgr(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_bgr\n"); - if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - (row_info->color_type & PNG_COLOR_MASK_COLOR)) - { - if (row_info->bit_depth == 8) - { - if (row_info->color_type == PNG_COLOR_TYPE_RGB) - { - png_bytep rp; - png_byte save; - png_uint_32 i; - - for (i = 0, rp = row; i < row_info->width; i++, rp += 3) - { - save = *rp; - *rp = *(rp + 2); - *(rp + 2) = save; - } - } - else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) - { - png_bytep rp; - png_byte save; - png_uint_32 i; - - for (i = 0, rp = row; i < row_info->width; i++, rp += 4) - { - save = *rp; - *rp = *(rp + 2); - *(rp + 2) = save; - } - } - } - else if (row_info->bit_depth == 16) - { - if (row_info->color_type == PNG_COLOR_TYPE_RGB) - { - png_bytep rp; - png_byte save[2]; - png_uint_32 i; - - for (i = 0, rp = row; i < row_info->width; i++, rp += 6) - { - save[0] = *rp; - save[1] = *(rp + 1); - *rp = *(rp + 4); - *(rp + 1) = *(rp + 5); - *(rp + 4) = save[0]; - *(rp + 5) = save[1]; - } - } - else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) - { - png_bytep rp; - png_byte save[2]; - png_uint_32 i; - - for (i = 0, rp = row; i < row_info->width; i++, rp += 8) - { - save[0] = *rp; - save[1] = *(rp + 1); - *rp = *(rp + 4); - *(rp + 1) = *(rp + 5); - *(rp + 4) = save[0]; - *(rp + 5) = save[1]; - } - } - } - } -} -#endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */ - diff --git a/src/png/pngwio.c b/src/png/pngwio.c deleted file mode 100644 index 6982504691..0000000000 --- a/src/png/pngwio.c +++ /dev/null @@ -1,207 +0,0 @@ - -/* pngwio.c - functions for data output - * - * libpng 1.0.1 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - * Copyright (c) 1996, 1997 Andreas Dilger - * Copyright (c) 1998, Glenn Randers-Pehrson - * March 15, 1998 - * - * This file provides a location for all output. Users which need - * special handling are expected to write functions which have the same - * arguments as these, and perform similar functions, but possibly use - * different output methods. Note that you shouldn't change these - * functions, but rather write replacement functions and then change - * them at run time with png_set_write_fn(...). - */ - -#define PNG_INTERNAL -#include "../png/png.h" - -/* Write the data to whatever output you are using. The default routine - writes to a file pointer. Note that this routine sometimes gets called - with very small lengths, so you should implement some kind of simple - buffering if you are using unbuffered writes. This should never be asked - to write more then 64K on a 16 bit machine. */ - -void -png_write_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - if (png_ptr->write_data_fn != NULL ) - (*(png_ptr->write_data_fn))(png_ptr, data, length); - else - png_error(png_ptr, "Call to NULL write function"); -} - -#if !defined(PNG_NO_STDIO) -/* This is the function which does the actual writing of data. If you are - not writing to a standard C stream, you should create a replacement - write_data function and use it at run time with png_set_write_fn(), rather - than changing the library. */ -#ifndef USE_FAR_KEYWORD -static void -png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_uint_32 check; - - check = fwrite(data, 1, length, (FILE *)(png_ptr->io_ptr)); - if (check != length) - { - png_error(png_ptr, "Write Error"); - } -} -#else -/* this is the model-independent version. Since the standard I/O library - can't handle far buffers in the medium and small models, we have to copy - the data. -*/ - -#define NEAR_BUF_SIZE 1024 -#define MIN(a,b) (a <= b ? a : b) - -static void -png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_uint_32 check; - png_byte *near_data; /* Needs to be "png_byte *" instead of "png_bytep" */ - FILE *io_ptr; - - /* Check if data really is near. If so, use usual code. */ - near_data = (png_byte *)CVT_PTR_NOCHECK(data); - io_ptr = (FILE *)CVT_PTR(png_ptr->io_ptr); - if ((png_bytep)near_data == data) - { - check = fwrite(near_data, 1, length, io_ptr); - } - else - { - png_byte buf[NEAR_BUF_SIZE]; - png_size_t written, remaining, err; - check = 0; - remaining = length; - do - { - written = MIN(NEAR_BUF_SIZE, remaining); - png_memcpy(buf, data, written); /* copy far buffer to near buffer */ - err = fwrite(buf, 1, written, io_ptr); - if (err != written) - break; - else - check += err; - data += written; - remaining -= written; - } - while (remaining != 0); - } - if (check != length) - { - png_error(png_ptr, "Write Error"); - } -} - -#endif -#endif - -/* This function is called to output any data pending writing (normally - to disk). After png_flush is called, there should be no data pending - writing in any buffers. */ -#if defined(PNG_WRITE_FLUSH_SUPPORTED) -void -png_flush(png_structp png_ptr) -{ - if (png_ptr->output_flush_fn != NULL) - (*(png_ptr->output_flush_fn))(png_ptr); -} - -#if !defined(PNG_NO_STDIO) -static void -png_default_flush(png_structp png_ptr) -{ - FILE *io_ptr; - io_ptr = (FILE *)CVT_PTR((png_ptr->io_ptr)); - if (io_ptr != NULL) - fflush(io_ptr); -} -#endif -#endif - -/* This function allows the application to supply new output functions for - libpng if standard C streams aren't being used. - - This function takes as its arguments: - png_ptr - pointer to a png output data structure - io_ptr - pointer to user supplied structure containing info about - the output functions. May be NULL. - write_data_fn - pointer to a new output function which takes as its - arguments a pointer to a png_struct, a pointer to - data to be written, and a 32-bit unsigned int which is - the number of bytes to be written. The new write - function should call png_error(png_ptr, "Error msg") - to exit and output any fatal error messages. - flush_data_fn - pointer to a new flush function which takes as its - arguments a pointer to a png_struct. After a call to - the flush function, there should be no data in any buffers - or pending transmission. If the output method doesn't do - any buffering of ouput, a function prototype must still be - supplied although it doesn't have to do anything. If - PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile - time, output_flush_fn will be ignored, although it must be - supplied for compatibility. */ -void -png_set_write_fn(png_structp png_ptr, png_voidp io_ptr, - png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn) -{ - png_ptr->io_ptr = io_ptr; - -#if !defined(PNG_NO_STDIO) - if (write_data_fn != NULL) - png_ptr->write_data_fn = write_data_fn; - else - png_ptr->write_data_fn = png_default_write_data; -#else - png_ptr->write_data_fn = write_data_fn; -#endif - -#if defined(PNG_WRITE_FLUSH_SUPPORTED) -#if !defined(PNG_NO_STDIO) - if (output_flush_fn != NULL) - png_ptr->output_flush_fn = output_flush_fn; - else - png_ptr->output_flush_fn = png_default_flush; -#else - png_ptr->output_flush_fn = output_flush_fn; -#endif -#endif /* PNG_WRITE_FLUSH_SUPPORTED */ - - /* It is an error to read while writing a png file */ - png_ptr->read_data_fn = NULL; -} - -#if defined(USE_FAR_KEYWORD) -#if defined(_MSC_VER) -void *png_far_to_near(png_structp png_ptr,png_voidp ptr, int check) -{ - void *near_ptr; - void FAR *far_ptr; - FP_OFF(near_ptr) = FP_OFF(ptr); - far_ptr = (void FAR *)near_ptr; - if(check != 0) - if(FP_SEG(ptr) != FP_SEG(far_ptr)) - png_error(png_ptr,"segment lost in conversion"); - return(near_ptr); -} -# else -void *png_far_to_near(png_structp png_ptr,png_voidp ptr, int check) -{ - void *near_ptr; - void FAR *far_ptr; - near_ptr = (void FAR *)ptr; - far_ptr = (void FAR *)near_ptr; - if(check != 0) - if(far_ptr != ptr) - png_error(png_ptr,"segment lost in conversion"); - return(near_ptr); -} -# endif -# endif diff --git a/src/png/pngwrite.c b/src/png/pngwrite.c deleted file mode 100644 index 699207c04a..0000000000 --- a/src/png/pngwrite.c +++ /dev/null @@ -1,970 +0,0 @@ - -/* pngwrite.c - general routines to write a PNG file - * - * libpng 1.0.1 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - * Copyright (c) 1996, 1997 Andreas Dilger - * Copyright (c) 1998, Glenn Randers-Pehrson - * March 15, 1998 - */ - -/* get internal access to png.h */ -#define PNG_INTERNAL -#include "../png/png.h" - -/* Writes all the PNG information. This is the suggested way to use the - * library. If you have a new chunk to add, make a function to write it, - * and put it in the correct location here. If you want the chunk written - * after the image data, put it in png_write_end(). I strongly encurage - * you to supply a PNG_INFO_ flag, and check info_ptr->valid before writing - * the chunk, as that will keep the code from breaking if you want to just - * write a plain PNG file. If you have long comments, I suggest writing - * them in png_write_end(), and compressing them. - */ -void -png_write_info(png_structp png_ptr, png_infop info_ptr) -{ -#if defined(PNG_WRITE_tEXt_SUPPORTED) || defined(PNG_WRITE_zTXt_SUPPORTED) - int i; -#endif - - png_debug(1, "in png_write_info\n"); - png_write_sig(png_ptr); /* write PNG signature */ - /* write IHDR information. */ - png_write_IHDR(png_ptr, info_ptr->width, info_ptr->height, - info_ptr->bit_depth, info_ptr->color_type, info_ptr->compression_type, - info_ptr->filter_type, -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) - info_ptr->interlace_type); -#else - 0); -#endif - /* the rest of these check to see if the valid field has the appropriate - flag set, and if it does, writes the chunk. */ -#if defined(PNG_WRITE_gAMA_SUPPORTED) - if (info_ptr->valid & PNG_INFO_gAMA) - png_write_gAMA(png_ptr, info_ptr->gamma); -#endif -#if defined(PNG_WRITE_sRGB_SUPPORTED) - if (info_ptr->valid & PNG_INFO_sRGB) - png_write_sRGB(png_ptr, (int)info_ptr->srgb_intent); -#endif -#if defined(PNG_WRITE_sBIT_SUPPORTED) - if (info_ptr->valid & PNG_INFO_sBIT) - png_write_sBIT(png_ptr, &(info_ptr->sig_bit), info_ptr->color_type); -#endif -#if defined(PNG_WRITE_cHRM_SUPPORTED) - if (info_ptr->valid & PNG_INFO_cHRM) - png_write_cHRM(png_ptr, - info_ptr->x_white, info_ptr->y_white, - info_ptr->x_red, info_ptr->y_red, - info_ptr->x_green, info_ptr->y_green, - info_ptr->x_blue, info_ptr->y_blue); -#endif - if (info_ptr->valid & PNG_INFO_PLTE) - png_write_PLTE(png_ptr, info_ptr->palette, - (png_uint_32)info_ptr->num_palette); - else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - png_error(png_ptr, "Valid palette required for paletted images\n"); - -#if defined(PNG_WRITE_tRNS_SUPPORTED) - if (info_ptr->valid & PNG_INFO_tRNS) - { -#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) - /* invert the alpha channel (in tRNS) */ - if (png_ptr->transformations & PNG_INVERT_ALPHA && - info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - int j; - for (j=0; j<(int)info_ptr->num_trans; j++) - info_ptr->trans[j] = 255 - info_ptr->trans[j]; - } -#endif - png_write_tRNS(png_ptr, info_ptr->trans, &(info_ptr->trans_values), - info_ptr->num_trans, info_ptr->color_type); - } -#endif -#if defined(PNG_WRITE_bKGD_SUPPORTED) - if (info_ptr->valid & PNG_INFO_bKGD) - png_write_bKGD(png_ptr, &(info_ptr->background), info_ptr->color_type); -#endif -#if defined(PNG_WRITE_hIST_SUPPORTED) - if (info_ptr->valid & PNG_INFO_hIST) - png_write_hIST(png_ptr, info_ptr->hist, info_ptr->num_palette); -#endif -#if defined(PNG_WRITE_oFFs_SUPPORTED) - if (info_ptr->valid & PNG_INFO_oFFs) - png_write_oFFs(png_ptr, info_ptr->x_offset, info_ptr->y_offset, - info_ptr->offset_unit_type); -#endif -#if defined(PNG_WRITE_pCAL_SUPPORTED) - if (info_ptr->valid & PNG_INFO_pCAL) - png_write_pCAL(png_ptr, info_ptr->pcal_purpose, info_ptr->pcal_X0, - info_ptr->pcal_X1, info_ptr->pcal_type, info_ptr->pcal_nparams, - info_ptr->pcal_units, info_ptr->pcal_params); -#endif -#if defined(PNG_WRITE_pHYs_SUPPORTED) - if (info_ptr->valid & PNG_INFO_pHYs) - png_write_pHYs(png_ptr, info_ptr->x_pixels_per_unit, - info_ptr->y_pixels_per_unit, info_ptr->phys_unit_type); -#endif -#if defined(PNG_WRITE_tIME_SUPPORTED) - if (info_ptr->valid & PNG_INFO_tIME) - { - png_write_tIME(png_ptr, &(info_ptr->mod_time)); - png_ptr->flags |= PNG_FLAG_WROTE_tIME; - } -#endif -#if defined(PNG_WRITE_tEXt_SUPPORTED) || defined(PNG_WRITE_zTXt_SUPPORTED) - /* Check to see if we need to write text chunks */ - for (i = 0; i < info_ptr->num_text; i++) - { - png_debug2(2, "Writing header text chunk %d, type %d\n", i, - info_ptr->text[i].compression); - /* If we want a compressed text chunk */ - if (info_ptr->text[i].compression >= PNG_TEXT_COMPRESSION_zTXt) - { -#if defined(PNG_WRITE_zTXt_SUPPORTED) - /* write compressed chunk */ - png_write_zTXt(png_ptr, info_ptr->text[i].key, - info_ptr->text[i].text, info_ptr->text[i].text_length, - info_ptr->text[i].compression); -#else - png_warning(png_ptr, "Unable to write compressed text\n"); -#endif - /* Mark this chunk as written */ - info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR; - } - else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE) - { -#if defined(PNG_WRITE_tEXt_SUPPORTED) - /* write uncompressed chunk */ - png_write_tEXt(png_ptr, info_ptr->text[i].key, - info_ptr->text[i].text, info_ptr->text[i].text_length); -#else - png_warning(png_ptr, "Unable to write uncompressed text\n"); -#endif - /* Mark this chunk as written */ - info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; - } - } -#endif -} - -/* Writes the end of the PNG file. If you don't want to write comments or - * time information, you can pass NULL for info. If you already wrote these - * in png_write_info(), do not write them again here. If you have long - * comments, I suggest writing them here, and compressing them. - */ -void -png_write_end(png_structp png_ptr, png_infop info_ptr) -{ - png_debug(1, "in png_write_end\n"); - if (!(png_ptr->mode & PNG_HAVE_IDAT)) - png_error(png_ptr, "No IDATs written into file"); - - /* see if user wants us to write information chunks */ - if (info_ptr != NULL) - { -#if defined(PNG_WRITE_tEXt_SUPPORTED) || defined(PNG_WRITE_zTXt_SUPPORTED) - int i; /* local index variable */ -#endif -#if defined(PNG_WRITE_tIME_SUPPORTED) - /* check to see if user has supplied a time chunk */ - if (info_ptr->valid & PNG_INFO_tIME && - !(png_ptr->flags & PNG_FLAG_WROTE_tIME)) - png_write_tIME(png_ptr, &(info_ptr->mod_time)); -#endif -#if defined(PNG_WRITE_tEXt_SUPPORTED) || defined(PNG_WRITE_zTXt_SUPPORTED) - /* loop through comment chunks */ - for (i = 0; i < info_ptr->num_text; i++) - { - png_debug2(2, "Writing trailer text chunk %d, type %d\n", i, - info_ptr->text[i].compression); - if (info_ptr->text[i].compression >= PNG_TEXT_COMPRESSION_zTXt) - { -#if defined(PNG_WRITE_zTXt_SUPPORTED) - /* write compressed chunk */ - png_write_zTXt(png_ptr, info_ptr->text[i].key, - info_ptr->text[i].text, info_ptr->text[i].text_length, - info_ptr->text[i].compression); -#else - png_warning(png_ptr, "Unable to write compressed text\n"); -#endif - /* Mark this chunk as written */ - info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR; - } - else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE) - { -#if defined(PNG_WRITE_tEXt_SUPPORTED) - /* write uncompressed chunk */ - png_write_tEXt(png_ptr, info_ptr->text[i].key, - info_ptr->text[i].text, info_ptr->text[i].text_length); -#else - png_warning(png_ptr, "Unable to write uncompressed text\n"); -#endif - - /* Mark this chunk as written */ - info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; - } - } -#endif - } - - png_ptr->mode |= PNG_AFTER_IDAT; - - /* write end of PNG file */ - png_write_IEND(png_ptr); -} - -#if defined(PNG_TIME_RFC1123_SUPPORTED) -/* Convert the supplied time into an RFC 1123 string suitable for use in - * a "Creation Time" or other text-based time string. - */ -png_charp -png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime) -{ - static PNG_CONST char short_months[12][4] = - {"Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; - - if (png_ptr->time_buffer == NULL) - { - png_ptr->time_buffer = (png_charp)png_malloc(png_ptr, (png_uint_32)(29* - sizeof(char))); - } - -#ifdef USE_FAR_KEYWORD - { - char near_time_buf[29]; - sprintf(near_time_buf, "%d %s %d %02d:%02d:%02d +0000", - ptime->day % 31, short_months[ptime->month - 1], - ptime->year, ptime->hour % 24, ptime->minute % 60, - ptime->second % 61); - png_memcpy(png_ptr->time_buffer, near_time_buf, - 29*sizeof(char)); - } -#else - sprintf(png_ptr->time_buffer, "%d %s %d %02d:%02d:%02d +0000", - ptime->day % 31, short_months[ptime->month - 1], - ptime->year, ptime->hour % 24, ptime->minute % 60, - ptime->second % 61); -#endif - return ((png_charp)png_ptr->time_buffer); -} -#endif /* PNG_TIME_RFC1123_SUPPORTED */ - -#if defined(PNG_WRITE_tIME_SUPPORTED) -void -png_convert_from_struct_tm(png_timep ptime, struct tm FAR * ttime) -{ - png_debug(1, "in png_convert_from_struct_tm\n"); - ptime->year = (png_uint_16)(1900 + ttime->tm_year); - ptime->month = (png_byte)(ttime->tm_mon + 1); - ptime->day = (png_byte)ttime->tm_mday; - ptime->hour = (png_byte)ttime->tm_hour; - ptime->minute = (png_byte)ttime->tm_min; - ptime->second = (png_byte)ttime->tm_sec; -} - -void -png_convert_from_time_t(png_timep ptime, time_t ttime) -{ - struct tm *tbuf; - - png_debug(1, "in png_convert_from_time_t\n"); - tbuf = gmtime(&ttime); - png_convert_from_struct_tm(ptime, tbuf); -} -#endif - -/* Initialize png_ptr structure, and allocate any memory needed */ -png_structp -png_create_write_struct(png_const_charp user_png_ver, voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn) -{ - png_structp png_ptr; -#ifdef USE_FAR_KEYWORD - jmp_buf jmpbuf; -#endif - png_debug(1, "in png_create_write_struct\n"); - if ((png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG)) == NULL) - { - return ((png_structp)NULL); - } -#ifdef USE_FAR_KEYWORD - if (setjmp(jmpbuf)) -#else - if (setjmp(png_ptr->jmpbuf)) -#endif - { - png_free(png_ptr, png_ptr->zbuf); - png_destroy_struct(png_ptr); - return ((png_structp)NULL); - } -#ifdef USE_FAR_KEYWORD - png_memcpy(png_ptr->jmpbuf,jmpbuf,sizeof(jmp_buf)); -#endif - png_set_error_fn(png_ptr, error_ptr, error_fn, warn_fn); - - /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so - * we must recompile any applications that use any older library version. - * For versions after libpng 1.0, we will be compatible, so we need - * only check the first digit. - */ - if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] || - (png_libpng_ver[0] == '0' && user_png_ver[2] < '9')) - { - png_error(png_ptr, - "Incompatible libpng version in application and library"); - } - - /* initialize zbuf - compression buffer */ - png_ptr->zbuf_size = PNG_ZBUF_SIZE; - png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, - (png_uint_32)png_ptr->zbuf_size); - - png_set_write_fn(png_ptr, NULL, NULL, NULL); - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - png_set_filter_heuristics(png_ptr, PNG_FILTER_HEURISTIC_DEFAULT, - 1, NULL, NULL); -#endif - - return ((png_structp)png_ptr); -} - - -/* Initialize png_ptr structure, and allocate any memory needed */ -void -png_write_init(png_structp png_ptr) -{ - jmp_buf tmp_jmp; /* to save current jump buffer */ - - png_debug(1, "in png_write_init\n"); - /* save jump buffer and error functions */ - png_memcpy(tmp_jmp, png_ptr->jmpbuf, sizeof (jmp_buf)); - - /* reset all variables to 0 */ - png_memset(png_ptr, 0, sizeof (png_struct)); - - /* restore jump buffer */ - png_memcpy(png_ptr->jmpbuf, tmp_jmp, sizeof (jmp_buf)); - - /* initialize zbuf - compression buffer */ - png_ptr->zbuf_size = PNG_ZBUF_SIZE; - png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, - (png_uint_32)png_ptr->zbuf_size); - png_set_write_fn(png_ptr, NULL, NULL, NULL); - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - png_set_filter_heuristics(png_ptr, PNG_FILTER_HEURISTIC_DEFAULT, - 1, NULL, NULL); -#endif -} - -/* Write a few rows of image data. If the image is interlaced, - * either you will have to write the 7 sub images, or, if you - * have called png_set_interlace_handling(), you will have to - * "write" the image seven times. - */ -void -png_write_rows(png_structp png_ptr, png_bytepp row, - png_uint_32 num_rows) -{ - png_uint_32 i; /* row counter */ - png_bytepp rp; /* row pointer */ - - png_debug(1, "in png_write_rows\n"); - /* loop through the rows */ - for (i = 0, rp = row; i < num_rows; i++, rp++) - { - png_write_row(png_ptr, *rp); - } -} - -/* Write the image. You only need to call this function once, even - * if you are writing an interlaced image. - */ -void -png_write_image(png_structp png_ptr, png_bytepp image) -{ - png_uint_32 i; /* row index */ - int pass, num_pass; /* pass variables */ - png_bytepp rp; /* points to current row */ - - png_debug(1, "in png_write_image\n"); -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) - /* intialize interlace handling. If image is not interlaced, - this will set pass to 1 */ - num_pass = png_set_interlace_handling(png_ptr); -#else - num_pass = 1; -#endif - /* loop through passes */ - for (pass = 0; pass < num_pass; pass++) - { - /* loop through image */ - for (i = 0, rp = image; i < png_ptr->height; i++, rp++) - { - png_write_row(png_ptr, *rp); - } - } -} - -/* called by user to write a row of image data */ -void -png_write_row(png_structp png_ptr, png_bytep row) -{ - png_debug2(1, "in png_write_row (row %ld, pass %d)\n", - png_ptr->row_number, png_ptr->pass); - /* initialize transformations and other stuff if first time */ - if (png_ptr->row_number == 0 && png_ptr->pass == 0) - { - png_write_start_row(png_ptr); - } - -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) - /* if interlaced and not interested in row, return */ - if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) - { - switch (png_ptr->pass) - { - case 0: - if (png_ptr->row_number & 7) - { - png_write_finish_row(png_ptr); - return; - } - break; - case 1: - if ((png_ptr->row_number & 7) || png_ptr->width < 5) - { - png_write_finish_row(png_ptr); - return; - } - break; - case 2: - if ((png_ptr->row_number & 7) != 4) - { - png_write_finish_row(png_ptr); - return; - } - break; - case 3: - if ((png_ptr->row_number & 3) || png_ptr->width < 3) - { - png_write_finish_row(png_ptr); - return; - } - break; - case 4: - if ((png_ptr->row_number & 3) != 2) - { - png_write_finish_row(png_ptr); - return; - } - break; - case 5: - if ((png_ptr->row_number & 1) || png_ptr->width < 2) - { - png_write_finish_row(png_ptr); - return; - } - break; - case 6: - if (!(png_ptr->row_number & 1)) - { - png_write_finish_row(png_ptr); - return; - } - break; - } - } -#endif - - /* set up row info for transformations */ - png_ptr->row_info.color_type = png_ptr->color_type; - png_ptr->row_info.width = png_ptr->usr_width; - png_ptr->row_info.channels = png_ptr->usr_channels; - png_ptr->row_info.bit_depth = png_ptr->usr_bit_depth; - png_ptr->row_info.pixel_depth = (png_byte)(png_ptr->row_info.bit_depth * - png_ptr->row_info.channels); - - png_ptr->row_info.rowbytes = ((png_ptr->row_info.width * - (png_uint_32)png_ptr->row_info.pixel_depth + 7) >> 3); - - png_debug1(3, "row_info->color_type = %d\n", png_ptr->row_info.color_type); - png_debug1(3, "row_info->width = %d\n", png_ptr->row_info.width); - png_debug1(3, "row_info->channels = %d\n", png_ptr->row_info.channels); - png_debug1(3, "row_info->bit_depth = %d\n", png_ptr->row_info.bit_depth); - png_debug1(3, "row_info->pixel_depth = %d\n", png_ptr->row_info.pixel_depth); - png_debug1(3, "row_info->rowbytes = %d\n", png_ptr->row_info.rowbytes); - - /* Copy user's row into buffer, leaving room for filter byte. */ - png_memcpy_check(png_ptr, png_ptr->row_buf + 1, row, - png_ptr->row_info.rowbytes); - -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) - /* handle interlacing */ - if (png_ptr->interlaced && png_ptr->pass < 6 && - (png_ptr->transformations & PNG_INTERLACE)) - { - png_do_write_interlace(&(png_ptr->row_info), - png_ptr->row_buf + 1, png_ptr->pass); - /* this should always get caught above, but still ... */ - if (!(png_ptr->row_info.width)) - { - png_write_finish_row(png_ptr); - return; - } - } -#endif - - /* handle other transformations */ - if (png_ptr->transformations) - png_do_write_transformations(png_ptr); - - /* Find a filter if necessary, filter the row and write it out. */ - png_write_find_filter(png_ptr, &(png_ptr->row_info)); - - if (png_ptr->write_row_fn != NULL) - (*(png_ptr->write_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass); -} - -#if defined(PNG_WRITE_FLUSH_SUPPORTED) -/* Set the automatic flush interval or 0 to turn flushing off */ -void -png_set_flush(png_structp png_ptr, int nrows) -{ - png_debug(1, "in png_set_flush\n"); - png_ptr->flush_dist = (nrows < 0 ? 0 : nrows); -} - -/* flush the current output buffers now */ -void -png_write_flush(png_structp png_ptr) -{ - int wrote_IDAT; - - png_debug(1, "in png_write_flush\n"); - /* We have already written out all of the data */ - if (png_ptr->row_number >= png_ptr->num_rows) - return; - - do - { - int ret; - - /* compress the data */ - ret = deflate(&png_ptr->zstream, Z_SYNC_FLUSH); - wrote_IDAT = 0; - - /* check for compression errors */ - if (ret != Z_OK) - { - if (png_ptr->zstream.msg != NULL) - png_error(png_ptr, png_ptr->zstream.msg); - else - png_error(png_ptr, "zlib error"); - } - - if (!(png_ptr->zstream.avail_out)) - { - /* write the IDAT and reset the zlib output buffer */ - png_write_IDAT(png_ptr, png_ptr->zbuf, - png_ptr->zbuf_size); - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - wrote_IDAT = 1; - } - } while(wrote_IDAT == 1); - - /* If there is any data left to be output, write it into a new IDAT */ - if (png_ptr->zbuf_size != png_ptr->zstream.avail_out) - { - /* write the IDAT and reset the zlib output buffer */ - png_write_IDAT(png_ptr, png_ptr->zbuf, - png_ptr->zbuf_size - png_ptr->zstream.avail_out); - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - } - png_ptr->flush_rows = 0; - png_flush(png_ptr); -} -#endif /* PNG_WRITE_FLUSH_SUPPORTED */ - -/* free all memory used by the write */ -void -png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr) -{ - png_structp png_ptr = NULL; - png_infop info_ptr = NULL; - - png_debug(1, "in png_destroy_write_struct\n"); - if (png_ptr_ptr != NULL) - png_ptr = *png_ptr_ptr; - - if (info_ptr_ptr != NULL) - info_ptr = *info_ptr_ptr; - - if (info_ptr != NULL) - { -#ifdef PNG_WRITE_tEXt_SUPPORTED - png_free(png_ptr, info_ptr->text); -#endif -#if defined(PNG_READ_pCAL_SUPPORTED) - png_free(png_ptr, info_ptr->pcal_purpose); - png_free(png_ptr, info_ptr->pcal_units); - if (info_ptr->pcal_params != NULL) - { - int i; - for (i = 0; i < (int)info_ptr->pcal_nparams; i++) - { - png_free(png_ptr, info_ptr->pcal_params[i]); - } - png_free(png_ptr, info_ptr->pcal_params); - } -#endif - png_destroy_struct((png_voidp)info_ptr); - *info_ptr_ptr = (png_infop)NULL; - } - - if (png_ptr != NULL) - { - png_write_destroy(png_ptr); - png_destroy_struct((png_voidp)png_ptr); - *png_ptr_ptr = (png_structp)NULL; - } -} - - -/* Free any memory used in png_ptr struct (old method) */ -void -png_write_destroy(png_structp png_ptr) -{ - jmp_buf tmp_jmp; /* save jump buffer */ - png_error_ptr error_fn; - png_error_ptr warning_fn; - png_voidp error_ptr; - - png_debug(1, "in png_write_destroy\n"); - /* free any memory zlib uses */ - deflateEnd(&png_ptr->zstream); - - /* free our memory. png_free checks NULL for us. */ - png_free(png_ptr, png_ptr->zbuf); - png_free(png_ptr, png_ptr->row_buf); - png_free(png_ptr, png_ptr->prev_row); - png_free(png_ptr, png_ptr->sub_row); - png_free(png_ptr, png_ptr->up_row); - png_free(png_ptr, png_ptr->avg_row); - png_free(png_ptr, png_ptr->paeth_row); -#if defined(PNG_TIME_RFC1123_SUPPORTED) - png_free(png_ptr, png_ptr->time_buffer); -#endif /* PNG_TIME_RFC1123_SUPPORTED */ -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - png_free(png_ptr, png_ptr->prev_filters); - png_free(png_ptr, png_ptr->filter_weights); - png_free(png_ptr, png_ptr->inv_filter_weights); - png_free(png_ptr, png_ptr->filter_costs); - png_free(png_ptr, png_ptr->inv_filter_costs); -#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */ - - /* reset structure */ - png_memcpy(tmp_jmp, png_ptr->jmpbuf, sizeof (jmp_buf)); - - error_fn = png_ptr->error_fn; - warning_fn = png_ptr->warning_fn; - error_ptr = png_ptr->error_ptr; - - png_memset(png_ptr, 0, sizeof (png_struct)); - - png_ptr->error_fn = error_fn; - png_ptr->warning_fn = warning_fn; - png_ptr->error_ptr = error_ptr; - - png_memcpy(png_ptr->jmpbuf, tmp_jmp, sizeof (jmp_buf)); -} - -/* Allow the application to select one or more row filters to use. */ -void -png_set_filter(png_structp png_ptr, int method, int filters) -{ - png_debug(1, "in png_set_filter\n"); - /* We allow 'method' only for future expansion of the base filter method. */ - if (method == PNG_FILTER_TYPE_BASE) - { - switch (filters & (PNG_ALL_FILTERS | 0x07)) - { - case 5: - case 6: - case 7: png_warning(png_ptr, "Unknown row filter for method 0"); - case PNG_FILTER_VALUE_NONE: png_ptr->do_filter=PNG_FILTER_NONE; break; - case PNG_FILTER_VALUE_SUB: png_ptr->do_filter=PNG_FILTER_SUB; break; - case PNG_FILTER_VALUE_UP: png_ptr->do_filter=PNG_FILTER_UP; break; - case PNG_FILTER_VALUE_AVG: png_ptr->do_filter=PNG_FILTER_AVG; break; - case PNG_FILTER_VALUE_PAETH: png_ptr->do_filter=PNG_FILTER_PAETH;break; - default: png_ptr->do_filter = (png_byte)filters; break; - } - - /* If we have allocated the row_buf, this means we have already started - * with the image and we should have allocated all of the filter buffers - * that have been selected. If prev_row isn't already allocated, then - * it is too late to start using the filters that need it, since we - * will be missing the data in the previous row. If an application - * wants to start and stop using particular filters during compression, - * it should start out with all of the filters, and then add and - * remove them after the start of compression. - */ - if (png_ptr->row_buf != NULL) - { - if (png_ptr->do_filter & PNG_FILTER_SUB && png_ptr->sub_row == NULL) - { - png_ptr->sub_row = (png_bytep)png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); - png_ptr->sub_row[0] = PNG_FILTER_VALUE_SUB; - } - - if (png_ptr->do_filter & PNG_FILTER_UP && png_ptr->up_row == NULL) - { - if (png_ptr->prev_row == NULL) - { - png_warning(png_ptr, "Can't add Up filter after starting"); - png_ptr->do_filter &= ~PNG_FILTER_UP; - } - else - { - png_ptr->up_row = (png_bytep)png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); - png_ptr->up_row[0] = PNG_FILTER_VALUE_UP; - } - } - - if (png_ptr->do_filter & PNG_FILTER_AVG && png_ptr->avg_row == NULL) - { - if (png_ptr->prev_row == NULL) - { - png_warning(png_ptr, "Can't add Average filter after starting"); - png_ptr->do_filter &= ~PNG_FILTER_AVG; - } - else - { - png_ptr->avg_row = (png_bytep)png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); - png_ptr->avg_row[0] = PNG_FILTER_VALUE_AVG; - } - } - - if (png_ptr->do_filter & PNG_FILTER_PAETH && - png_ptr->paeth_row == NULL) - { - if (png_ptr->prev_row == NULL) - { - png_warning(png_ptr, "Can't add Paeth filter after starting"); - png_ptr->do_filter &= ~PNG_FILTER_PAETH; - } - else - { - png_ptr->paeth_row = (png_bytep)png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); - png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH; - } - } - - if (png_ptr->do_filter == PNG_NO_FILTERS) - png_ptr->do_filter = PNG_FILTER_NONE; - } - } - else - png_error(png_ptr, "Unknown custom filter method"); -} - -/* This allows us to influence the way in which libpng chooses the "best" - * filter for the current scanline. While the "minimum-sum-of-absolute- - * differences metric is relatively fast and effective, there is some - * question as to whether it can be improved upon by trying to keep the - * filtered data going to zlib more consistent, hopefully resulting in - * better compression. - */ -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) /* GRR 970116 */ -void -png_set_filter_heuristics(png_structp png_ptr, int heuristic_method, - int num_weights, png_doublep filter_weights, - png_doublep filter_costs) -{ -#if defined(PNG_WRITE_tEXt_SUPPORTED) || defined(PNG_WRITE_zTXt_SUPPORTED) - int i; -#endif - - png_debug(1, "in png_set_filter_heuristics\n"); - if (heuristic_method >= PNG_FILTER_HEURISTIC_LAST) - { - png_warning(png_ptr, "Unknown filter heuristic method"); - return; - } - - if (heuristic_method == PNG_FILTER_HEURISTIC_DEFAULT) - { - heuristic_method = PNG_FILTER_HEURISTIC_UNWEIGHTED; - } - - if (num_weights < 0 || filter_weights == NULL || - heuristic_method == PNG_FILTER_HEURISTIC_UNWEIGHTED) - { - num_weights = 0; - } - - png_ptr->num_prev_filters = num_weights; - png_ptr->heuristic_method = heuristic_method; - - if (num_weights > 0) - { - if (png_ptr->prev_filters == NULL) - { - png_ptr->prev_filters = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(sizeof(png_byte) * num_weights)); - - /* To make sure that the weighting starts out fairly */ - for (i = 0; i < num_weights; i++) - { - png_ptr->prev_filters[i] = 255; - } - } - - if (png_ptr->filter_weights == NULL) - { - png_ptr->filter_weights = (png_uint_16p) png_malloc(png_ptr, - (png_uint_32)(sizeof(png_uint_16) * num_weights)); - - png_ptr->inv_filter_weights = (png_uint_16p) png_malloc(png_ptr, - (png_uint_32)(sizeof(png_uint_16) * num_weights)); - - for (i = 0; i < num_weights; i++) - { - png_ptr->inv_filter_weights[i] = - png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR; - } - } - - for (i = 0; i < num_weights; i++) - { - if (filter_weights[i] < 0.0) - { - png_ptr->inv_filter_weights[i] = - png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR; - } - else - { - png_ptr->inv_filter_weights[i] = - (png_uint_16)((double)PNG_WEIGHT_FACTOR*filter_weights[i]+0.5); - png_ptr->filter_weights[i] = - (png_uint_16)((double)PNG_WEIGHT_FACTOR/filter_weights[i]+0.5); - } - } - } - - /* If, in the future, there are other filter methods, this would - * need to be based on png_ptr->filter. - */ - if (png_ptr->filter_costs == NULL) - { - png_ptr->filter_costs = (png_uint_16p) png_malloc(png_ptr, - (png_uint_32)(sizeof(png_uint_16) * PNG_FILTER_VALUE_LAST)); - - png_ptr->inv_filter_costs = (png_uint_16p) png_malloc(png_ptr, - (png_uint_32)(sizeof(png_uint_16) * PNG_FILTER_VALUE_LAST)); - - for (i = 0; i < PNG_FILTER_VALUE_LAST; i++) - { - png_ptr->inv_filter_costs[i] = - png_ptr->filter_costs[i] = PNG_COST_FACTOR; - } - } - - /* Here is where we set the relative costs of the different filters. We - * should take the desired compression level into account when setting - * the costs, so that Paeth, for instance, has a high relative cost at low - * compression levels, while it has a lower relative cost at higher - * compression settings. The filter types are in order of increasing - * relative cost, so it would be possible to do this with an algorithm. - */ - for (i = 0; i < PNG_FILTER_VALUE_LAST; i++) - { - if (filter_costs == NULL || filter_costs[i] < 0.0) - { - png_ptr->inv_filter_costs[i] = - png_ptr->filter_costs[i] = PNG_COST_FACTOR; - } - else if (filter_costs[i] >= 1.0) - { - png_ptr->inv_filter_costs[i] = - (png_uint_16)((double)PNG_COST_FACTOR / filter_costs[i] + 0.5); - png_ptr->filter_costs[i] = - (png_uint_16)((double)PNG_COST_FACTOR * filter_costs[i] + 0.5); - } - } -} -#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */ - -void -png_set_compression_level(png_structp png_ptr, int level) -{ - png_debug(1, "in png_set_compression_level\n"); - png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_LEVEL; - png_ptr->zlib_level = level; -} - -void -png_set_compression_mem_level(png_structp png_ptr, int mem_level) -{ - png_debug(1, "in png_set_compression_mem_level\n"); - png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL; - png_ptr->zlib_mem_level = mem_level; -} - -void -png_set_compression_strategy(png_structp png_ptr, int strategy) -{ - png_debug(1, "in png_set_compression_strategy\n"); - png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_STRATEGY; - png_ptr->zlib_strategy = strategy; -} - -void -png_set_compression_window_bits(png_structp png_ptr, int window_bits) -{ - if (window_bits > 15) - png_warning(png_ptr, "Only compression windows <= 32k supported by PNG"); - png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS; - png_ptr->zlib_window_bits = window_bits; -} - -void -png_set_compression_method(png_structp png_ptr, int method) -{ - png_debug(1, "in png_set_compression_method\n"); - if (method != 8) - png_warning(png_ptr, "Only compression method 8 is supported by PNG"); - png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_METHOD; - png_ptr->zlib_method = method; -} - -void -png_set_write_status_fn(png_structp png_ptr, png_write_status_ptr write_row_fn) -{ - png_ptr->write_row_fn = write_row_fn; -} - -#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) -void -png_set_write_user_transform_fn(png_structp png_ptr, png_user_transform_ptr - write_user_transform_fn) -{ - png_debug(1, "in png_set_write_user_transform_fn\n"); - png_ptr->transformations |= PNG_USER_TRANSFORM; - png_ptr->write_user_transform_fn = write_user_transform_fn; -} -#endif - diff --git a/src/png/pngwtran.c b/src/png/pngwtran.c deleted file mode 100644 index df224c88ee..0000000000 --- a/src/png/pngwtran.c +++ /dev/null @@ -1,495 +0,0 @@ - -/* pngwtran.c - transforms the data in a row for PNG writers - * - * libpng 1.0.1 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - * Copyright (c) 1996, 1997 Andreas Dilger - * Copyright (c) 1998, Glenn Randers-Pehrson - * March 15, 1998 - */ - -#define PNG_INTERNAL -#include "../png/png.h" - -/* Transform the data according to the users wishes. The order of - * transformations is significant. - */ -void -png_do_write_transformations(png_structp png_ptr) -{ - png_debug(1, "in png_do_write_transformations\n"); - -#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) - if (png_ptr->transformations & PNG_USER_TRANSFORM) - if(png_ptr->write_user_transform_fn != NULL) - (*(png_ptr->write_user_transform_fn)) /* user write transform function */ - (png_ptr, /* png_ptr */ - &(png_ptr->row_info), /* row_info: */ - /* png_uint_32 width; width of row */ - /* png_uint_32 rowbytes; number of bytes in row */ - /* png_byte color_type; color type of pixels */ - /* png_byte bit_depth; bit depth of samples */ - /* png_byte channels; number of channels (1-4) */ - /* png_byte pixel_depth; bits per pixel (depth*channels) */ - png_ptr->row_buf + 1); /* start of pixel data for row */ -#endif -#if defined(PNG_WRITE_FILLER_SUPPORTED) - if (png_ptr->transformations & PNG_FILLER) - png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1, - png_ptr->flags); -#endif -#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) - if (png_ptr->transformations & PNG_PACKSWAP) - png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif -#if defined(PNG_WRITE_PACK_SUPPORTED) - if (png_ptr->transformations & PNG_PACK) - png_do_pack(&(png_ptr->row_info), png_ptr->row_buf + 1, - (png_uint_32)png_ptr->bit_depth); -#endif -#if defined(PNG_WRITE_SHIFT_SUPPORTED) - if (png_ptr->transformations & PNG_SHIFT) - png_do_shift(&(png_ptr->row_info), png_ptr->row_buf + 1, - &(png_ptr->shift)); -#endif -#if defined(PNG_WRITE_SWAP_SUPPORTED) - if (png_ptr->transformations & PNG_SWAP_BYTES) - png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif -#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) - if (png_ptr->transformations & PNG_INVERT_ALPHA) - png_do_write_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif -#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) - if (png_ptr->transformations & PNG_SWAP_ALPHA) - png_do_write_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif -#if defined(PNG_WRITE_BGR_SUPPORTED) - if (png_ptr->transformations & PNG_BGR) - png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif -#if defined(PNG_WRITE_INVERT_SUPPORTED) - if (png_ptr->transformations & PNG_INVERT_MONO) - png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif -} - -#if defined(PNG_WRITE_PACK_SUPPORTED) -/* Pack pixels into bytes. Pass the true bit depth in bit_depth. The - * row_info bit depth should be 8 (one pixel per byte). The channels - * should be 1 (this only happens on grayscale and paletted images). - */ -void -png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth) -{ - png_debug(1, "in png_do_pack\n"); - if (row_info->bit_depth == 8 && -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - row_info->channels == 1) - { - switch ((int)bit_depth) - { - case 1: - { - png_bytep sp, dp; - int mask, v; - png_uint_32 i; - - sp = row; - dp = row; - mask = 0x80; - v = 0; - for (i = 0; i < row_info->width; i++) - { - if (*sp != 0) - v |= mask; - sp++; - if (mask > 1) - mask >>= 1; - else - { - mask = 0x80; - *dp = (png_byte)v; - dp++; - v = 0; - } - } - if (mask != 0x80) - *dp = (png_byte)v; - break; - } - case 2: - { - png_bytep sp, dp; - int shift, v; - png_uint_32 i; - - sp = row; - dp = row; - shift = 6; - v = 0; - for (i = 0; i < row_info->width; i++) - { - png_byte value; - - value = (png_byte)(*sp & 0x3); - v |= (value << shift); - if (shift == 0) - { - shift = 6; - *dp = (png_byte)v; - dp++; - v = 0; - } - else - shift -= 2; - sp++; - } - if (shift != 6) - *dp = (png_byte)v; - break; - } - case 4: - { - png_bytep sp, dp; - int shift, v; - png_uint_32 i; - - sp = row; - dp = row; - shift = 4; - v = 0; - for (i = 0; i < row_info->width; i++) - { - png_byte value; - - value = (png_byte)(*sp & 0xf); - v |= (value << shift); - - if (shift == 0) - { - shift = 4; - *dp = (png_byte)v; - dp++; - v = 0; - } - else - shift -= 4; - - sp++; - } - if (shift != 4) - *dp = (png_byte)v; - break; - } - } - row_info->bit_depth = (png_byte)bit_depth; - row_info->pixel_depth = (png_byte)(bit_depth * row_info->channels); - row_info->rowbytes = - ((row_info->width * row_info->pixel_depth + 7) >> 3); - } -} -#endif - -#if defined(PNG_WRITE_SHIFT_SUPPORTED) -/* Shift pixel values to take advantage of whole range. Pass the - * true number of bits in bit_depth. The row should be packed - * according to row_info->bit_depth. Thus, if you had a row of - * bit depth 4, but the pixels only had values from 0 to 7, you - * would pass 3 as bit_depth, and this routine would translate the - * data to 0 to 15. - */ -void -png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth) -{ - png_debug(1, "in png_do_shift\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL && -#else - if ( -#endif - row_info->color_type != PNG_COLOR_TYPE_PALETTE) - { - int shift_start[4], shift_dec[4]; - png_uint_32 channels; - - channels = 0; - if (row_info->color_type & PNG_COLOR_MASK_COLOR) - { - shift_start[channels] = row_info->bit_depth - bit_depth->red; - shift_dec[channels] = bit_depth->red; - channels++; - shift_start[channels] = row_info->bit_depth - bit_depth->green; - shift_dec[channels] = bit_depth->green; - channels++; - shift_start[channels] = row_info->bit_depth - bit_depth->blue; - shift_dec[channels] = bit_depth->blue; - channels++; - } - else - { - shift_start[channels] = row_info->bit_depth - bit_depth->gray; - shift_dec[channels] = bit_depth->gray; - channels++; - } - if (row_info->color_type & PNG_COLOR_MASK_ALPHA) - { - shift_start[channels] = row_info->bit_depth - bit_depth->alpha; - shift_dec[channels] = bit_depth->alpha; - channels++; - } - - /* with low row depths, could only be grayscale, so one channel */ - if (row_info->bit_depth < 8) - { - png_bytep bp; - png_uint_32 i; - png_byte mask; - - if (bit_depth->gray == 1 && row_info->bit_depth == 2) - mask = 0x55; - else if (row_info->bit_depth == 4 && bit_depth->gray == 3) - mask = 0x11; - else - mask = 0xff; - - for (bp = row, i = 0; i < row_info->rowbytes; i++, bp++) - { - png_uint_16 v; - int j; - - v = *bp; - *bp = 0; - for (j = shift_start[0]; j > -shift_dec[0]; j -= shift_dec[0]) - { - if (j > 0) - *bp |= (png_byte)((v << j) & 0xff); - else - *bp |= (png_byte)((v >> (-j)) & mask); - } - } - } - else if (row_info->bit_depth == 8) - { - png_bytep bp; - png_uint_32 i; - - for (bp = row, i = 0; i < row_info->width; i++) - { - png_uint_32 c; - - for (c = 0; c < channels; c++, bp++) - { - png_uint_16 v; - int j; - - v = *bp; - *bp = 0; - for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c]) - { - if (j > 0) - *bp |= (png_byte)((v << j) & 0xff); - else - *bp |= (png_byte)((v >> (-j)) & 0xff); - } - } - } - } - else - { - png_bytep bp; - png_uint_32 i; - - for (bp = row, i = 0; i < row_info->width * row_info->channels; i++) - { - png_uint_32 c; - - for (c = 0; c < channels; c++, bp += 2) - { - png_uint_16 value, v; - int j; - - v = ((png_uint_16)(*bp) << 8) + *(bp + 1); - value = 0; - for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c]) - { - if (j > 0) - value |= (png_uint_16)((v << j) & (png_uint_16)0xffff); - else - value |= (png_uint_16)((v >> (-j)) & (png_uint_16)0xffff); - } - *bp = (png_byte)(value >> 8); - *(bp + 1) = (png_byte)(value & 0xff); - } - } - } - } -} -#endif - -#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) -void -png_do_write_swap_alpha(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_write_swap_alpha\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL) -#endif - { - if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) - { - /* This converts from ARGB to RGBA */ - if (row_info->bit_depth == 8) - { - png_bytep sp, dp; - png_byte save; - png_uint_32 i; - - for (i = 0, sp = dp = row; i < row_info->width; i++) - { - save = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = save; - } - } - /* This converts from AARRGGBB to RRGGBBAA */ - else - { - png_bytep sp, dp; - png_byte save[2]; - png_uint_32 i; - - for (i = 0, sp = dp = row; i < row_info->width; i++) - { - save[0] = *(sp++); - save[1] = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = save[0]; - *(dp++) = save[1]; - } - } - } - else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - { - /* This converts from AG to GA */ - if (row_info->bit_depth == 8) - { - png_bytep sp, dp; - png_byte save; - png_uint_32 i; - - for (i = 0, sp = dp = row; i < row_info->width; i++) - { - save = *(sp++); - *(dp++) = *(sp++); - *(dp++) = save; - } - } - /* This converts from AAGG to GGAA */ - else - { - png_bytep sp, dp; - png_byte save[2]; - png_uint_32 i; - - for (i = 0, sp = dp = row; i < row_info->width; i++) - { - save[0] = *(sp++); - save[1] = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = save[0]; - *(dp++) = save[1]; - } - } - } - } -} -#endif - -#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) -void -png_do_write_invert_alpha(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_write_invert_alpha\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL) -#endif - { - if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) - { - /* This inverts the alpha channel in RGBA */ - if (row_info->bit_depth == 8) - { - png_bytep sp, dp; - png_uint_32 i; - - for (i = 0, sp = dp = row; i < row_info->width; i++) - { - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = 255 - *(sp++); - } - } - /* This inverts the alpha channel in RRGGBBAA */ - else - { - png_bytep sp, dp; - png_uint_32 i; - - for (i = 0, sp = dp = row; i < row_info->width; i++) - { - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = 255 - *(sp++); - *(dp++) = 255 - *(sp++); - } - } - } - else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - { - /* This inverts the alpha channel in GA */ - if (row_info->bit_depth == 8) - { - png_bytep sp, dp; - png_uint_32 i; - - for (i = 0, sp = dp = row; i < row_info->width; i++) - { - *(dp++) = *(sp++); - *(dp++) = 255 - *(sp++); - } - } - /* This inverts the alpha channel in GGAA */ - else - { - png_bytep sp, dp; - png_uint_32 i; - - for (i = 0, sp = dp = row; i < row_info->width; i++) - { - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = 255 - *(sp++); - *(dp++) = 255 - *(sp++); - } - } - } - } -} -#endif diff --git a/src/png/pngwutil.c b/src/png/pngwutil.c deleted file mode 100644 index c6ae1a677e..0000000000 --- a/src/png/pngwutil.c +++ /dev/null @@ -1,1934 +0,0 @@ - -/* pngwutil.c - utilities to write a PNG file - * - * libpng 1.0.1 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - * Copyright (c) 1996, 1997 Andreas Dilger - * Copyright (c) 1998, Glenn Randers-Pehrson - * March 15, 1998 - */ - -#define PNG_INTERNAL -#include "../png/png.h" - -/* Place a 32-bit number into a buffer in PNG byte order. We work - * with unsigned numbers for convenience, although one supported - * ancillary chunk uses signed (two's complement) numbers. - */ -void -png_save_uint_32(png_bytep buf, png_uint_32 i) -{ - buf[0] = (png_byte)((i >> 24) & 0xff); - buf[1] = (png_byte)((i >> 16) & 0xff); - buf[2] = (png_byte)((i >> 8) & 0xff); - buf[3] = (png_byte)(i & 0xff); -} - -#if defined(PNG_WRITE_pCAL_SUPPORTED) -/* The png_save_int_32 function assumes integers are stored in two's - * complement format. If this isn't the case, then this routine needs to - * be modified to write data in two's complement format. - */ -void -png_save_int_32(png_bytep buf, png_int_32 i) -{ - buf[0] = (png_byte)((i >> 24) & 0xff); - buf[1] = (png_byte)((i >> 16) & 0xff); - buf[2] = (png_byte)((i >> 8) & 0xff); - buf[3] = (png_byte)(i & 0xff); -} -#endif - -/* Place a 16-bit number into a buffer in PNG byte order. - * The parameter is declared unsigned int, not png_uint_16, - * just to avoid potential problems on pre-ANSI C compilers. - */ -void -png_save_uint_16(png_bytep buf, unsigned int i) -{ - buf[0] = (png_byte)((i >> 8) & 0xff); - buf[1] = (png_byte)(i & 0xff); -} - -/* Write a PNG chunk all at once. The type is an array of ASCII characters - * representing the chunk name. The array must be at least 4 bytes in - * length, and does not need to be null terminated. To be safe, pass the - * pre-defined chunk names here, and if you need a new one, define it - * where the others are defined. The length is the length of the data. - * All the data must be present. If that is not possible, use the - * png_write_chunk_start(), png_write_chunk_data(), and png_write_chunk_end() - * functions instead. - */ -void -png_write_chunk(png_structp png_ptr, png_bytep chunk_name, - png_bytep data, png_size_t length) -{ - png_write_chunk_start(png_ptr, chunk_name, (png_uint_32)length); - png_write_chunk_data(png_ptr, data, length); - png_write_chunk_end(png_ptr); -} - -/* Write the start of a PNG chunk. The type is the chunk type. - * The total_length is the sum of the lengths of all the data you will be - * passing in png_write_chunk_data(). - */ -void -png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name, - png_uint_32 length) -{ - png_byte buf[4]; - png_debug2(0, "Writing %s chunk (%d bytes)\n", chunk_name, length); - - /* write the length */ - png_save_uint_32(buf, length); - png_write_data(png_ptr, buf, (png_size_t)4); - - /* write the chunk name */ - png_write_data(png_ptr, chunk_name, (png_size_t)4); - /* reset the crc and run it over the chunk name */ - png_reset_crc(png_ptr); - png_calculate_crc(png_ptr, chunk_name, (png_size_t)4); -} - -/* Write the data of a PNG chunk started with png_write_chunk_start(). - * Note that multiple calls to this function are allowed, and that the - * sum of the lengths from these calls *must* add up to the total_length - * given to png_write_chunk_start(). - */ -void -png_write_chunk_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - /* write the data, and run the CRC over it */ - if (data != NULL && length > 0) - { - png_calculate_crc(png_ptr, data, length); - png_write_data(png_ptr, data, length); - } -} - -/* Finish a chunk started with png_write_chunk_start(). */ -void -png_write_chunk_end(png_structp png_ptr) -{ - png_byte buf[4]; - - /* write the crc */ - png_save_uint_32(buf, png_ptr->crc); - - png_write_data(png_ptr, buf, (png_size_t)4); -} - -/* Simple function to write the signature. If we have already written - * the magic bytes of the signature, or more likely, the PNG stream is - * being embedded into another stream and doesn't need its own signature, - * we should call png_set_sig_bytes() to tell libpng how many of the - * bytes have already been written. - */ -void -png_write_sig(png_structp png_ptr) -{ - /* write the rest of the 8 byte signature */ - png_write_data(png_ptr, &png_sig[png_ptr->sig_bytes], - (png_size_t)8 - png_ptr->sig_bytes); -} - -/* Write the IHDR chunk, and update the png_struct with the necessary - * information. Note that the rest of this code depends upon this - * information being correct. - */ -void -png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height, - int bit_depth, int color_type, int compression_type, int filter_type, - int interlace_type) -{ - png_byte buf[13]; /* buffer to store the IHDR info */ - - png_debug(1, "in png_write_IHDR\n"); - /* Check that we have valid input data from the application info */ - switch (color_type) - { - case PNG_COLOR_TYPE_GRAY: - switch (bit_depth) - { - case 1: - case 2: - case 4: - case 8: - case 16: png_ptr->channels = 1; break; - default: png_error(png_ptr,"Invalid bit depth for grayscale image"); - } - break; - case PNG_COLOR_TYPE_RGB: - if (bit_depth != 8 && bit_depth != 16) - png_error(png_ptr, "Invalid bit depth for RGB image"); - png_ptr->channels = 3; - break; - case PNG_COLOR_TYPE_PALETTE: - switch (bit_depth) - { - case 1: - case 2: - case 4: - case 8: png_ptr->channels = 1; break; - default: png_error(png_ptr, "Invalid bit depth for paletted image"); - } - break; - case PNG_COLOR_TYPE_GRAY_ALPHA: - if (bit_depth != 8 && bit_depth != 16) - png_error(png_ptr, "Invalid bit depth for grayscale+alpha image"); - png_ptr->channels = 2; - break; - case PNG_COLOR_TYPE_RGB_ALPHA: - if (bit_depth != 8 && bit_depth != 16) - png_error(png_ptr, "Invalid bit depth for RGBA image"); - png_ptr->channels = 4; - break; - default: - png_error(png_ptr, "Invalid image color type specified"); - } - - if (compression_type != PNG_COMPRESSION_TYPE_BASE) - { - png_warning(png_ptr, "Invalid compression type specified"); - compression_type = PNG_COMPRESSION_TYPE_BASE; - } - - if (filter_type != PNG_FILTER_TYPE_BASE) - { - png_warning(png_ptr, "Invalid filter type specified"); - filter_type = PNG_FILTER_TYPE_BASE; - } - -#ifdef PNG_WRITE_INTERLACING_SUPPORTED - if (interlace_type != PNG_INTERLACE_NONE && - interlace_type != PNG_INTERLACE_ADAM7) - { - png_warning(png_ptr, "Invalid interlace type specified"); - interlace_type = PNG_INTERLACE_ADAM7; - } -#else - interlace_type=PNG_INTERLACE_NONE; -#endif - - /* save off the relevent information */ - png_ptr->bit_depth = (png_byte)bit_depth; - png_ptr->color_type = (png_byte)color_type; - png_ptr->interlaced = (png_byte)interlace_type; - png_ptr->width = width; - png_ptr->height = height; - - png_ptr->pixel_depth = (png_byte)(bit_depth * png_ptr->channels); - png_ptr->rowbytes = ((width * (png_size_t)png_ptr->pixel_depth + 7) >> 3); - /* set the usr info, so any transformations can modify it */ - png_ptr->usr_width = png_ptr->width; - png_ptr->usr_bit_depth = png_ptr->bit_depth; - png_ptr->usr_channels = png_ptr->channels; - - /* pack the header information into the buffer */ - png_save_uint_32(buf, width); - png_save_uint_32(buf + 4, height); - buf[8] = (png_byte)bit_depth; - buf[9] = (png_byte)color_type; - buf[10] = (png_byte)compression_type; - buf[11] = (png_byte)filter_type; - buf[12] = (png_byte)interlace_type; - - /* write the chunk */ - png_write_chunk(png_ptr, png_IHDR, buf, (png_size_t)13); - - /* initialize zlib with PNG info */ - png_ptr->zstream.zalloc = png_zalloc; - png_ptr->zstream.zfree = png_zfree; - png_ptr->zstream.opaque = (voidpf)png_ptr; - if (!(png_ptr->do_filter)) - { - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE || - png_ptr->bit_depth < 8) - png_ptr->do_filter = PNG_FILTER_NONE; - else - png_ptr->do_filter = PNG_ALL_FILTERS; - } - if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_STRATEGY)) - { - if (png_ptr->do_filter != PNG_FILTER_NONE) - png_ptr->zlib_strategy = Z_FILTERED; - else - png_ptr->zlib_strategy = Z_DEFAULT_STRATEGY; - } - if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_LEVEL)) - png_ptr->zlib_level = Z_DEFAULT_COMPRESSION; - if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL)) - png_ptr->zlib_mem_level = 8; - if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS)) - png_ptr->zlib_window_bits = 15; - if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_METHOD)) - png_ptr->zlib_method = 8; - deflateInit2(&png_ptr->zstream, png_ptr->zlib_level, - png_ptr->zlib_method, png_ptr->zlib_window_bits, - png_ptr->zlib_mem_level, png_ptr->zlib_strategy); - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - - png_ptr->mode = PNG_HAVE_IHDR; -} - -/* write the palette. We are careful not to trust png_color to be in the - * correct order for PNG, so people can redefine it to any convient - * structure. - */ -void -png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal) -{ - png_uint_32 i; - png_colorp pal_ptr; - png_byte buf[3]; - - png_debug(1, "in png_write_PLTE\n"); - if (num_pal == 0 || num_pal > 256) - { - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - png_error(png_ptr, "Invalid number of colors in palette"); - } - else - { - png_warning(png_ptr, "Invalid number of colors in palette"); - return; - } - } - - png_ptr->num_palette = (png_uint_16)num_pal; - png_debug1(3, "num_palette = %d\n", png_ptr->num_palette); - - png_write_chunk_start(png_ptr, png_PLTE, num_pal * 3); - for (i = 0, pal_ptr = palette; i < num_pal; i++, pal_ptr++) - { - buf[0] = pal_ptr->red; - buf[1] = pal_ptr->green; - buf[2] = pal_ptr->blue; - png_write_chunk_data(png_ptr, buf, (png_size_t)3); - } - png_write_chunk_end(png_ptr); - png_ptr->mode |= PNG_HAVE_PLTE; -} - -/* write an IDAT chunk */ -void -png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_debug(1, "in png_write_IDAT\n"); - png_write_chunk(png_ptr, png_IDAT, data, length); - png_ptr->mode |= PNG_HAVE_IDAT; -} - -/* write an IEND chunk */ -void -png_write_IEND(png_structp png_ptr) -{ - png_debug(1, "in png_write_IEND\n"); - png_write_chunk(png_ptr, png_IEND, NULL, (png_size_t)0); - png_ptr->mode |= PNG_HAVE_IEND; -} - -#if defined(PNG_WRITE_gAMA_SUPPORTED) -/* write a gAMA chunk */ -void -png_write_gAMA(png_structp png_ptr, double file_gamma) -{ - png_uint_32 igamma; - png_byte buf[4]; - - png_debug(1, "in png_write_gAMA\n"); - /* file_gamma is saved in 1/1000000ths */ - igamma = (png_uint_32)(file_gamma * 100000.0 + 0.5); - png_save_uint_32(buf, igamma); - png_write_chunk(png_ptr, png_gAMA, buf, (png_size_t)4); -} -#endif - -#if defined(PNG_WRITE_sRGB_SUPPORTED) -/* write a sRGB chunk */ -void -png_write_sRGB(png_structp png_ptr, int srgb_intent) -{ - png_byte buf[1]; - - png_debug(1, "in png_write_sRGB\n"); - if(srgb_intent >= PNG_sRGB_INTENT_LAST) - png_warning(png_ptr, - "Invalid sRGB rendering intent specified"); - buf[0]=(png_byte)srgb_intent; - png_write_chunk(png_ptr, png_sRGB, buf, (png_size_t)1); -} -#endif - -#if defined(PNG_WRITE_sBIT_SUPPORTED) -/* write the sBIT chunk */ -void -png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type) -{ - png_byte buf[4]; - png_size_t size; - - png_debug(1, "in png_write_sBIT\n"); - /* make sure we don't depend upon the order of PNG_COLOR_8 */ - if (color_type & PNG_COLOR_MASK_COLOR) - { - png_byte maxbits; - - maxbits = color_type==PNG_COLOR_TYPE_PALETTE ? 8:png_ptr->usr_bit_depth; - if (sbit->red == 0 || sbit->red > maxbits || - sbit->green == 0 || sbit->green > maxbits || - sbit->blue == 0 || sbit->blue > maxbits) - { - png_warning(png_ptr, "Invalid sBIT depth specified"); - return; - } - buf[0] = sbit->red; - buf[1] = sbit->green; - buf[2] = sbit->blue; - size = 3; - } - else - { - if (sbit->gray == 0 || sbit->gray > png_ptr->usr_bit_depth) - { - png_warning(png_ptr, "Invalid sBIT depth specified"); - return; - } - buf[0] = sbit->gray; - size = 1; - } - - if (color_type & PNG_COLOR_MASK_ALPHA) - { - if (sbit->alpha == 0 || sbit->alpha > png_ptr->usr_bit_depth) - { - png_warning(png_ptr, "Invalid sBIT depth specified"); - return; - } - buf[size++] = sbit->alpha; - } - - png_write_chunk(png_ptr, png_sBIT, buf, size); -} -#endif - -#if defined(PNG_WRITE_cHRM_SUPPORTED) -/* write the cHRM chunk */ -void -png_write_cHRM(png_structp png_ptr, double white_x, double white_y, - double red_x, double red_y, double green_x, double green_y, - double blue_x, double blue_y) -{ - png_uint_32 itemp; - png_byte buf[32]; - - png_debug(1, "in png_write_cHRM\n"); - /* each value is saved int 1/1000000ths */ - if (white_x < 0 || white_x > 0.8 || white_y < 0 || white_y > 0.8 || - white_x + white_y > 1.0) - { - png_warning(png_ptr, "Invalid cHRM white point specified"); - return; - } - itemp = (png_uint_32)(white_x * 100000.0 + 0.5); - png_save_uint_32(buf, itemp); - itemp = (png_uint_32)(white_y * 100000.0 + 0.5); - png_save_uint_32(buf + 4, itemp); - - if (red_x < 0 || red_x > 0.8 || red_y < 0 || red_y > 0.8 || - red_x + red_y > 1.0) - { - png_warning(png_ptr, "Invalid cHRM red point specified"); - return; - } - itemp = (png_uint_32)(red_x * 100000.0 + 0.5); - png_save_uint_32(buf + 8, itemp); - itemp = (png_uint_32)(red_y * 100000.0 + 0.5); - png_save_uint_32(buf + 12, itemp); - - if (green_x < 0 || green_x > 0.8 || green_y < 0 || green_y > 0.8 || - green_x + green_y > 1.0) - { - png_warning(png_ptr, "Invalid cHRM green point specified"); - return; - } - itemp = (png_uint_32)(green_x * 100000.0 + 0.5); - png_save_uint_32(buf + 16, itemp); - itemp = (png_uint_32)(green_y * 100000.0 + 0.5); - png_save_uint_32(buf + 20, itemp); - - if (blue_x < 0 || blue_x > 0.8 || blue_y < 0 || blue_y > 0.8 || - blue_x + blue_y > 1.0) - { - png_warning(png_ptr, "Invalid cHRM blue point specified"); - return; - } - itemp = (png_uint_32)(blue_x * 100000.0 + 0.5); - png_save_uint_32(buf + 24, itemp); - itemp = (png_uint_32)(blue_y * 100000.0 + 0.5); - png_save_uint_32(buf + 28, itemp); - - png_write_chunk(png_ptr, png_cHRM, buf, (png_size_t)32); -} -#endif - -#if defined(PNG_WRITE_tRNS_SUPPORTED) -/* write the tRNS chunk */ -void -png_write_tRNS(png_structp png_ptr, png_bytep trans, png_color_16p tran, - int num_trans, int color_type) -{ - png_byte buf[6]; - - png_debug(1, "in png_write_tRNS\n"); - if (color_type == PNG_COLOR_TYPE_PALETTE) - { - if (num_trans <= 0 || num_trans > (int)png_ptr->num_palette) - { - png_warning(png_ptr,"Invalid number of transparent colors specified"); - return; - } - /* write the chunk out as it is */ - png_write_chunk(png_ptr, png_tRNS, trans, (png_size_t)num_trans); - } - else if (color_type == PNG_COLOR_TYPE_GRAY) - { - /* one 16 bit value */ - png_save_uint_16(buf, tran->gray); - png_write_chunk(png_ptr, png_tRNS, buf, (png_size_t)2); - } - else if (color_type == PNG_COLOR_TYPE_RGB) - { - /* three 16 bit values */ - png_save_uint_16(buf, tran->red); - png_save_uint_16(buf + 2, tran->green); - png_save_uint_16(buf + 4, tran->blue); - png_write_chunk(png_ptr, png_tRNS, buf, (png_size_t)6); - } - else - { - png_warning(png_ptr, "Can't write tRNS with an alpha channel"); - } -} -#endif - -#if defined(PNG_WRITE_bKGD_SUPPORTED) -/* write the background chunk */ -void -png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type) -{ - png_byte buf[6]; - - png_debug(1, "in png_write_bKGD\n"); - if (color_type == PNG_COLOR_TYPE_PALETTE) - { - if (back->index > png_ptr->num_palette) - { - png_warning(png_ptr, "Invalid background palette index"); - return; - } - buf[0] = back->index; - png_write_chunk(png_ptr, png_bKGD, buf, (png_size_t)1); - } - else if (color_type & PNG_COLOR_MASK_COLOR) - { - png_save_uint_16(buf, back->red); - png_save_uint_16(buf + 2, back->green); - png_save_uint_16(buf + 4, back->blue); - png_write_chunk(png_ptr, png_bKGD, buf, (png_size_t)6); - } - else - { - png_save_uint_16(buf, back->gray); - png_write_chunk(png_ptr, png_bKGD, buf, (png_size_t)2); - } -} -#endif - -#if defined(PNG_WRITE_hIST_SUPPORTED) -/* write the histogram */ -void -png_write_hIST(png_structp png_ptr, png_uint_16p hist, int num_hist) -{ - int i; - png_byte buf[3]; - - png_debug(1, "in png_write_hIST\n"); - if (num_hist > (int)png_ptr->num_palette) - { - png_debug2(3, "num_hist = %d, num_palette = %d\n", num_hist, - png_ptr->num_palette); - png_warning(png_ptr, "Invalid number of histogram entries specified"); - return; - } - - png_write_chunk_start(png_ptr, png_hIST, (png_uint_32)(num_hist * 2)); - for (i = 0; i < num_hist; i++) - { - png_save_uint_16(buf, hist[i]); - png_write_chunk_data(png_ptr, buf, (png_size_t)2); - } - png_write_chunk_end(png_ptr); -} -#endif - -#if defined(PNG_WRITE_tEXt_SUPPORTED) || defined(PNG_WRITE_zTXt_SUPPORTED) -/* Check that the tEXt or zTXt keyword is valid per PNG 1.0 specification, - * and if invalid, correct the keyword rather than discarding the entire - * chunk. The PNG 1.0 specification requires keywords 1-79 characters in - * length, forbids leading or trailing whitespace, multiple internal spaces, - * and the non-break space (0x80) from ISO 8859-1. Returns keyword length. - * - * The new_key is allocated to hold the corrected keyword and must be freed - * by the calling routine. This avoids problems with trying to write to - * static keywords without having to have duplicate copies of the strings. - */ -png_size_t -png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key) -{ - png_size_t key_len; - png_charp kp, dp; - int kflag; - - png_debug(1, "in png_check_keyword\n"); - *new_key = NULL; - - if (key == NULL || (key_len = png_strlen(key)) == 0) - { - png_chunk_warning(png_ptr, "zero length keyword"); - return ((png_size_t)0); - } - - png_debug1(2, "Keyword to be checked is '%s'\n", key); - - *new_key = (png_charp)png_malloc(png_ptr, (png_uint_32)(key_len + 1)); - - /* Replace non-printing characters with a blank and print a warning */ - for (kp = key, dp = *new_key; *kp != '\0'; kp++, dp++) - { - if (*kp < 0x20 || (*kp > 0x7E && (png_byte)*kp < 0xA1)) - { -#if !defined(PNG_NO_STDIO) - char msg[40]; - - sprintf(msg, "invalid keyword character 0x%02X", *kp); - png_chunk_warning(png_ptr, msg); -#else - png_chunk_warning(png_ptr, "invalid character in keyword"); -#endif - *dp = ' '; - } - else - { - *dp = *kp; - } - } - *dp = '\0'; - - /* Remove any trailing white space. */ - kp = *new_key + key_len - 1; - if (*kp == ' ') - { - png_chunk_warning(png_ptr, "trailing spaces removed from keyword"); - - while (*kp == ' ') - { - *(kp--) = '\0'; - key_len--; - } - } - - /* Remove any leading white space. */ - kp = *new_key; - if (*kp == ' ') - { - png_chunk_warning(png_ptr, "leading spaces removed from keyword"); - - while (*kp == ' ') - { - kp++; - key_len--; - } - } - - png_debug1(2, "Checking for multiple internal spaces in '%s'\n", kp); - - /* Remove multiple internal spaces. */ - for (kflag = 0, dp = *new_key; *kp != '\0'; kp++) - { - if (*kp == ' ' && kflag == 0) - { - *(dp++) = *kp; - kflag = 1; - } - else if (*kp == ' ') - { - key_len--; - } - else - { - *(dp++) = *kp; - kflag = 0; - } - } - *dp = '\0'; - - if (key_len == 0) - { - png_chunk_warning(png_ptr, "zero length keyword"); - } - - if (key_len > 79) - { - png_chunk_warning(png_ptr, "keyword length must be 1 - 79 characters"); - new_key[79] = '\0'; - key_len = 79; - } - - return (key_len); -} -#endif - -#if defined(PNG_WRITE_tEXt_SUPPORTED) -/* write a tEXt chunk */ -void -png_write_tEXt(png_structp png_ptr, png_charp key, png_charp text, - png_size_t text_len) -{ - png_size_t key_len; - png_charp new_key; - - png_debug(1, "in png_write_tEXt\n"); - if (key == NULL || (key_len = png_check_keyword(png_ptr, key, &new_key))==0) - { - png_warning(png_ptr, "Empty keyword in tEXt chunk"); - return; - } - - if (text == NULL || *text == '\0') - text_len = 0; - - /* make sure we include the 0 after the key */ - png_write_chunk_start(png_ptr, png_tEXt, (png_uint_32)key_len+text_len+1); - png_write_chunk_data(png_ptr, (png_bytep)new_key, key_len + 1); - if (text_len) - png_write_chunk_data(png_ptr, (png_bytep)text, text_len); - - png_write_chunk_end(png_ptr); - png_free(png_ptr, new_key); -} -#endif - -#if defined(PNG_WRITE_zTXt_SUPPORTED) -/* write a compressed text chunk */ -void -png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text, - png_size_t text_len, int compression) -{ - png_size_t key_len; - char buf[1]; - png_charp new_key; - int i, ret; - png_charpp output_ptr = NULL; /* array of pointers to output */ - int num_output_ptr = 0; /* number of output pointers used */ - int max_output_ptr = 0; /* size of output_ptr */ - - png_debug(1, "in png_write_zTXt\n"); - - if (key == NULL || (key_len = png_check_keyword(png_ptr, key, &new_key))==0) - { - png_warning(png_ptr, "Empty keyword in zTXt chunk"); - return; - } - - if (text == NULL || *text == '\0' || compression==PNG_TEXT_COMPRESSION_NONE) - { - png_write_tEXt(png_ptr, new_key, text, (png_size_t)0); - png_free(png_ptr, new_key); - return; - } - - png_free(png_ptr, new_key); - - if (compression >= PNG_TEXT_COMPRESSION_LAST) - { -#if !defined(PNG_NO_STDIO) - char msg[50]; - sprintf(msg, "Unknown zTXt compression type %d", compression); - png_warning(png_ptr, msg); -#else - png_warning(png_ptr, "Unknown zTXt compression type"); -#endif - compression = PNG_TEXT_COMPRESSION_zTXt; - } - - /* We can't write the chunk until we find out how much data we have, - * which means we need to run the compressor first, and save the - * output. This shouldn't be a problem, as the vast majority of - * comments should be reasonable, but we will set up an array of - * malloc'd pointers to be sure. - * - * If we knew the application was well behaved, we could simplify this - * greatly by assuming we can always malloc an output buffer large - * enough to hold the compressed text ((1001 * text_len / 1000) + 12) - * and malloc this directly. The only time this would be a bad idea is - * if we can't malloc more than 64K and we have 64K of random input - * data, or if the input string is incredibly large (although this - * wouldn't cause a failure, just a slowdown due to swapping). - */ - - /* set up the compression buffers */ - png_ptr->zstream.avail_in = (uInt)text_len; - png_ptr->zstream.next_in = (Bytef *)text; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - png_ptr->zstream.next_out = (Bytef *)png_ptr->zbuf; - - /* this is the same compression loop as in png_write_row() */ - do - { - /* compress the data */ - ret = deflate(&png_ptr->zstream, Z_NO_FLUSH); - if (ret != Z_OK) - { - /* error */ - if (png_ptr->zstream.msg != NULL) - png_error(png_ptr, png_ptr->zstream.msg); - else - png_error(png_ptr, "zlib error"); - } - /* check to see if we need more room */ - if (!png_ptr->zstream.avail_out && png_ptr->zstream.avail_in) - { - /* make sure the output array has room */ - if (num_output_ptr >= max_output_ptr) - { - int old_max; - - old_max = max_output_ptr; - max_output_ptr = num_output_ptr + 4; - if (output_ptr != NULL) - { - png_charpp old_ptr; - - old_ptr = output_ptr; - output_ptr = (png_charpp)png_malloc(png_ptr, - (png_uint_32)(max_output_ptr * sizeof (png_charpp))); - png_memcpy(output_ptr, old_ptr, old_max * sizeof (png_charp)); - png_free(png_ptr, old_ptr); - } - else - output_ptr = (png_charpp)png_malloc(png_ptr, - (png_uint_32)(max_output_ptr * sizeof (png_charp))); - } - - /* save the data */ - output_ptr[num_output_ptr] = (png_charp)png_malloc(png_ptr, - (png_uint_32)png_ptr->zbuf_size); - png_memcpy(output_ptr[num_output_ptr], png_ptr->zbuf, - png_ptr->zbuf_size); - num_output_ptr++; - - /* and reset the buffer */ - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - png_ptr->zstream.next_out = png_ptr->zbuf; - } - /* continue until we don't have anymore to compress */ - } while (png_ptr->zstream.avail_in); - - /* finish the compression */ - do - { - /* tell zlib we are finished */ - ret = deflate(&png_ptr->zstream, Z_FINISH); - if (ret != Z_OK && ret != Z_STREAM_END) - { - /* we got an error */ - if (png_ptr->zstream.msg != NULL) - png_error(png_ptr, png_ptr->zstream.msg); - else - png_error(png_ptr, "zlib error"); - } - - /* check to see if we need more room */ - if (!(png_ptr->zstream.avail_out) && ret == Z_OK) - { - /* check to make sure our output array has room */ - if (num_output_ptr >= max_output_ptr) - { - int old_max; - - old_max = max_output_ptr; - max_output_ptr = num_output_ptr + 4; - if (output_ptr != NULL) - { - png_charpp old_ptr; - - old_ptr = output_ptr; - /* This could be optimized to realloc() */ - output_ptr = (png_charpp)png_malloc(png_ptr, - (png_uint_32)(max_output_ptr * sizeof (png_charpp))); - png_memcpy(output_ptr, old_ptr, old_max * sizeof (png_charp)); - png_free(png_ptr, old_ptr); - } - else - output_ptr = (png_charpp)png_malloc(png_ptr, - (png_uint_32)(max_output_ptr * sizeof (png_charp))); - } - - /* save off the data */ - output_ptr[num_output_ptr] = (png_charp)png_malloc(png_ptr, - (png_uint_32)png_ptr->zbuf_size); - png_memcpy(output_ptr[num_output_ptr], png_ptr->zbuf, - png_ptr->zbuf_size); - num_output_ptr++; - - /* and reset the buffer pointers */ - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - png_ptr->zstream.next_out = png_ptr->zbuf; - } - } while (ret != Z_STREAM_END); - - /* text length is number of buffers plus last buffer */ - text_len = png_ptr->zbuf_size * num_output_ptr; - if (png_ptr->zstream.avail_out < png_ptr->zbuf_size) - text_len += png_ptr->zbuf_size - (png_size_t)png_ptr->zstream.avail_out; - - /* write start of chunk */ - png_write_chunk_start(png_ptr, png_zTXt, (png_uint_32)(key_len+text_len+2)); - /* write key */ - png_write_chunk_data(png_ptr, (png_bytep)key, key_len + 1); - buf[0] = (png_byte)compression; - /* write compression */ - png_write_chunk_data(png_ptr, (png_bytep)buf, (png_size_t)1); - - /* write saved output buffers, if any */ - for (i = 0; i < num_output_ptr; i++) - { - png_write_chunk_data(png_ptr,(png_bytep)output_ptr[i],png_ptr->zbuf_size); - png_free(png_ptr, output_ptr[i]); - } - if (max_output_ptr != 0) - png_free(png_ptr, output_ptr); - /* write anything left in zbuf */ - if (png_ptr->zstream.avail_out < (png_uint_32)png_ptr->zbuf_size) - png_write_chunk_data(png_ptr, png_ptr->zbuf, - png_ptr->zbuf_size - png_ptr->zstream.avail_out); - /* close the chunk */ - png_write_chunk_end(png_ptr); - - /* reset zlib for another zTXt or the image data */ - deflateReset(&png_ptr->zstream); -} -#endif - - -#if defined(PNG_WRITE_oFFs_SUPPORTED) -/* write the oFFs chunk */ -void -png_write_oFFs(png_structp png_ptr, png_uint_32 x_offset, - png_uint_32 y_offset, - int unit_type) -{ - png_byte buf[9]; - - png_debug(1, "in png_write_oFFs\n"); - if (unit_type >= PNG_OFFSET_LAST) - png_warning(png_ptr, "Unrecognized unit type for oFFs chunk"); - - png_save_uint_32(buf, x_offset); - png_save_uint_32(buf + 4, y_offset); - buf[8] = (png_byte)unit_type; - - png_write_chunk(png_ptr, png_oFFs, buf, (png_size_t)9); -} -#endif - -#if defined(PNG_WRITE_pCAL_SUPPORTED) -/* write the pCAL chunk (png-scivis-19970203) */ -void -png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0, - png_int_32 X1, int type, int nparams, png_charp units, png_charpp params) -{ - png_size_t purpose_len, units_len, total_len; - png_uint_32p params_len; - png_byte buf[10]; - png_charp new_purpose; - int i; - - png_debug1(1, "in png_write_pCAL (%d parameters)\n", nparams); - if (type >= PNG_EQUATION_LAST) - png_warning(png_ptr, "Unrecognized equation type for pCAL chunk"); - - purpose_len = png_check_keyword(png_ptr, purpose, &new_purpose) + 1; - png_debug1(3, "pCAL purpose length = %d\n", purpose_len); - units_len = png_strlen(units) + (nparams == 0 ? 0 : 1); - png_debug1(3, "pCAL units length = %d\n", units_len); - total_len = purpose_len + units_len + 10; - - params_len = (png_uint_32p)png_malloc(png_ptr, (png_uint_32)(nparams - *sizeof(png_uint_32))); - - /* Find the length of each parameter, making sure we don't count the - null terminator for the last parameter. */ - for (i = 0; i < nparams; i++) - { - params_len[i] = png_strlen(params[i]) + (i == nparams - 1 ? 0 : 1); - png_debug2(3, "pCAL parameter %d length = %d\n", i, params_len[i]); - total_len += (png_size_t)params_len[i]; - } - - png_debug1(3, "pCAL total length = %d\n", total_len); - png_write_chunk_start(png_ptr, png_pCAL, (png_uint_32)total_len); - png_write_chunk_data(png_ptr, (png_bytep)new_purpose, purpose_len); - png_save_int_32(buf, X0); - png_save_int_32(buf + 4, X1); - buf[8] = (png_byte)type; - buf[9] = (png_byte)nparams; - png_write_chunk_data(png_ptr, buf, (png_size_t)10); - png_write_chunk_data(png_ptr, (png_bytep)units, (png_size_t)units_len); - - png_free(png_ptr, new_purpose); - - for (i = 0; i < nparams; i++) - { - png_write_chunk_data(png_ptr, (png_bytep)params[i], - (png_size_t)params_len[i]); - } - - png_free(png_ptr, params_len); - png_write_chunk_end(png_ptr); -} -#endif - -#if defined(PNG_WRITE_pHYs_SUPPORTED) -/* write the pHYs chunk */ -void -png_write_pHYs(png_structp png_ptr, png_uint_32 x_pixels_per_unit, - png_uint_32 y_pixels_per_unit, - int unit_type) -{ - png_byte buf[9]; - - png_debug(1, "in png_write_pHYs\n"); - if (unit_type >= PNG_RESOLUTION_LAST) - png_warning(png_ptr, "Unrecognized unit type for pHYs chunk"); - - png_save_uint_32(buf, x_pixels_per_unit); - png_save_uint_32(buf + 4, y_pixels_per_unit); - buf[8] = (png_byte)unit_type; - - png_write_chunk(png_ptr, png_pHYs, buf, (png_size_t)9); -} -#endif - -#if defined(PNG_WRITE_tIME_SUPPORTED) -/* Write the tIME chunk. Use either png_convert_from_struct_tm() - * or png_convert_from_time_t(), or fill in the structure yourself. - */ -void -png_write_tIME(png_structp png_ptr, png_timep mod_time) -{ - png_byte buf[7]; - - png_debug(1, "in png_write_tIME\n"); - if (mod_time->month > 12 || mod_time->month < 1 || - mod_time->day > 31 || mod_time->day < 1 || - mod_time->hour > 23 || mod_time->second > 60) - { - png_warning(png_ptr, "Invalid time specified for tIME chunk"); - return; - } - - png_save_uint_16(buf, mod_time->year); - buf[2] = mod_time->month; - buf[3] = mod_time->day; - buf[4] = mod_time->hour; - buf[5] = mod_time->minute; - buf[6] = mod_time->second; - - png_write_chunk(png_ptr, png_tIME, buf, (png_size_t)7); -} -#endif - -/* initializes the row writing capability of libpng */ -void -png_write_start_row(png_structp png_ptr) -{ - png_size_t buf_size; - - png_debug(1, "in png_write_start_row\n"); - buf_size = (png_size_t)(((png_ptr->width * png_ptr->usr_channels * - png_ptr->usr_bit_depth + 7) >> 3) + 1); - - /* set up row buffer */ - png_ptr->row_buf = (png_bytep)png_malloc(png_ptr, (png_uint_32)buf_size); - png_ptr->row_buf[0] = PNG_FILTER_VALUE_NONE; - - /* set up filtering buffer, if using this filter */ - if (png_ptr->do_filter & PNG_FILTER_SUB) - { - png_ptr->sub_row = (png_bytep)png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); - png_ptr->sub_row[0] = PNG_FILTER_VALUE_SUB; - } - - /* We only need to keep the previous row if we are using one of these. */ - if (png_ptr->do_filter & (PNG_FILTER_AVG | PNG_FILTER_UP | PNG_FILTER_PAETH)) - { - /* set up previous row buffer */ - png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, (png_uint_32)buf_size); - png_memset(png_ptr->prev_row, 0, buf_size); - - if (png_ptr->do_filter & PNG_FILTER_UP) - { - png_ptr->up_row = (png_bytep )png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); - png_ptr->up_row[0] = PNG_FILTER_VALUE_UP; - } - - if (png_ptr->do_filter & PNG_FILTER_AVG) - { - png_ptr->avg_row = (png_bytep)png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); - png_ptr->avg_row[0] = PNG_FILTER_VALUE_AVG; - } - - if (png_ptr->do_filter & PNG_FILTER_PAETH) - { - png_ptr->paeth_row = (png_bytep )png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); - png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH; - } - } - -#ifdef PNG_WRITE_INTERLACING_SUPPORTED - /* if interlaced, we need to set up width and height of pass */ - if (png_ptr->interlaced) - { - if (!(png_ptr->transformations & PNG_INTERLACE)) - { - png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 - - png_pass_ystart[0]) / png_pass_yinc[0]; - png_ptr->usr_width = (png_ptr->width + png_pass_inc[0] - 1 - - png_pass_start[0]) / png_pass_inc[0]; - } - else - { - png_ptr->num_rows = png_ptr->height; - png_ptr->usr_width = png_ptr->width; - } - } - else -#endif - { - png_ptr->num_rows = png_ptr->height; - png_ptr->usr_width = png_ptr->width; - } - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - png_ptr->zstream.next_out = png_ptr->zbuf; -} - -/* Internal use only. Called when finished processing a row of data. */ -void -png_write_finish_row(png_structp png_ptr) -{ - int ret; - - png_debug(1, "in png_write_finish_row\n"); - /* next row */ - png_ptr->row_number++; - - /* see if we are done */ - if (png_ptr->row_number < png_ptr->num_rows) - return; - -#ifdef PNG_WRITE_INTERLACING_SUPPORTED - /* if interlaced, go to next pass */ - if (png_ptr->interlaced) - { - png_ptr->row_number = 0; - if (png_ptr->transformations & PNG_INTERLACE) - { - png_ptr->pass++; - } - else - { - /* loop until we find a non-zero width or height pass */ - do - { - png_ptr->pass++; - if (png_ptr->pass >= 7) - break; - png_ptr->usr_width = (png_ptr->width + - png_pass_inc[png_ptr->pass] - 1 - - png_pass_start[png_ptr->pass]) / - png_pass_inc[png_ptr->pass]; - png_ptr->num_rows = (png_ptr->height + - png_pass_yinc[png_ptr->pass] - 1 - - png_pass_ystart[png_ptr->pass]) / - png_pass_yinc[png_ptr->pass]; - if (png_ptr->transformations & PNG_INTERLACE) - break; - } while (png_ptr->usr_width == 0 || png_ptr->num_rows == 0); - - } - - /* reset the row above the image for the next pass */ - if (png_ptr->pass < 7) - { - if (png_ptr->prev_row != NULL) - png_memset(png_ptr->prev_row, 0, - (png_size_t) (((png_uint_32)png_ptr->usr_channels * - (png_uint_32)png_ptr->usr_bit_depth * - png_ptr->width + 7) >> 3) + 1); - return; - } - } -#endif - - /* if we get here, we've just written the last row, so we need - to flush the compressor */ - do - { - /* tell the compressor we are done */ - ret = deflate(&png_ptr->zstream, Z_FINISH); - /* check for an error */ - if (ret != Z_OK && ret != Z_STREAM_END) - { - if (png_ptr->zstream.msg != NULL) - png_error(png_ptr, png_ptr->zstream.msg); - else - png_error(png_ptr, "zlib error"); - } - /* check to see if we need more room */ - if (!(png_ptr->zstream.avail_out) && ret == Z_OK) - { - png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size); - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - } - } while (ret != Z_STREAM_END); - - /* write any extra space */ - if (png_ptr->zstream.avail_out < png_ptr->zbuf_size) - { - png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size - - png_ptr->zstream.avail_out); - } - - deflateReset(&png_ptr->zstream); -} - -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) -/* Pick out the correct pixels for the interlace pass. - * The basic idea here is to go through the row with a source - * pointer and a destination pointer (sp and dp), and copy the - * correct pixels for the pass. As the row gets compacted, - * sp will always be >= dp, so we should never overwrite anything. - * See the default: case for the easiest code to understand. - */ -void -png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass) -{ - png_debug(1, "in png_do_write_interlace\n"); - /* we don't have to do anything on the last pass (6) */ -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL && pass < 6) -#else - if (pass < 6) -#endif - { - /* each pixel depth is handled seperately */ - switch (row_info->pixel_depth) - { - case 1: - { - png_bytep sp; - png_bytep dp; - int shift; - int d; - int value; - png_uint_32 i; - - dp = row; - d = 0; - shift = 7; - for (i = png_pass_start[pass]; i < row_info->width; - i += png_pass_inc[pass]) - { - sp = row + (png_size_t)(i >> 3); - value = (int)(*sp >> (7 - (int)(i & 7))) & 0x1; - d |= (value << shift); - - if (shift == 0) - { - shift = 7; - *dp++ = (png_byte)d; - d = 0; - } - else - shift--; - - } - if (shift != 7) - *dp = (png_byte)d; - break; - } - case 2: - { - png_bytep sp; - png_bytep dp; - int shift; - int d; - int value; - png_uint_32 i; - - dp = row; - shift = 6; - d = 0; - for (i = png_pass_start[pass]; i < row_info->width; - i += png_pass_inc[pass]) - { - sp = row + (png_size_t)(i >> 2); - value = (*sp >> ((3 - (int)(i & 3)) << 1)) & 0x3; - d |= (value << shift); - - if (shift == 0) - { - shift = 6; - *dp++ = (png_byte)d; - d = 0; - } - else - shift -= 2; - } - if (shift != 6) - *dp = (png_byte)d; - break; - } - case 4: - { - png_bytep sp; - png_bytep dp; - int shift; - int d; - int value; - png_uint_32 i; - - dp = row; - shift = 4; - d = 0; - for (i = png_pass_start[pass]; i < row_info->width; - i += png_pass_inc[pass]) - { - sp = row + (png_size_t)(i >> 1); - value = (*sp >> ((1 - (int)(i & 1)) << 2)) & 0xf; - d |= (value << shift); - - if (shift == 0) - { - shift = 4; - *dp++ = (png_byte)d; - d = 0; - } - else - shift -= 4; - } - if (shift != 4) - *dp = (png_byte)d; - break; - } - default: - { - png_bytep sp; - png_bytep dp; - png_uint_32 i; - png_size_t pixel_bytes; - - /* start at the beginning */ - dp = row; - /* find out how many bytes each pixel takes up */ - pixel_bytes = (row_info->pixel_depth >> 3); - /* loop through the row, only looking at the pixels that - matter */ - for (i = png_pass_start[pass]; i < row_info->width; - i += png_pass_inc[pass]) - { - /* find out where the original pixel is */ - sp = row + (png_size_t)i * pixel_bytes; - /* move the pixel */ - if (dp != sp) - png_memcpy(dp, sp, pixel_bytes); - /* next pixel */ - dp += pixel_bytes; - } - break; - } - } - /* set new row width */ - row_info->width = (row_info->width + - png_pass_inc[pass] - 1 - - png_pass_start[pass]) / - png_pass_inc[pass]; - row_info->rowbytes = ((row_info->width * - row_info->pixel_depth + 7) >> 3); - } -} -#endif - -/* This filters the row, chooses which filter to use, if it has not already - * been specified by the application, and then writes the row out with the - * chosen filter. - */ -#define PNG_MAXSUM (~((png_uint_32)0) >> 1) -#define PNG_HISHIFT 10 -#define PNG_LOMASK ((png_uint_32)0xffffL) -#define PNG_HIMASK ((png_uint_32)(~PNG_LOMASK >> PNG_HISHIFT)) -void -png_write_find_filter(png_structp png_ptr, png_row_infop row_info) -{ - png_bytep prev_row, best_row, row_buf; - png_uint_32 mins, bpp; - - png_debug(1, "in png_write_find_filter\n"); - /* find out how many bytes offset each pixel is */ - bpp = (row_info->pixel_depth + 7) / 8; - - prev_row = png_ptr->prev_row; - best_row = row_buf = png_ptr->row_buf; - mins = PNG_MAXSUM; - - /* The prediction method we use is to find which method provides the - * smallest value when summing the absolute values of the distances - * from zero using anything >= 128 as negative numbers. This is known - * as the "minimum sum of absolute differences" heuristic. Other - * heuristics are the "weighted minumum sum of absolute differences" - * (experimental and can in theory improve compression), and the "zlib - * predictive" method (not implemented in libpng 0.95), which does test - * compressions of lines using different filter methods, and then chooses - * the (series of) filter(s) which give minimum compressed data size (VERY - * computationally expensive). - */ - - /* We don't need to test the 'no filter' case if this is the only filter - * that has been chosen, as it doesn't actually do anything to the data. - */ - if (png_ptr->do_filter & PNG_FILTER_NONE && - png_ptr->do_filter != PNG_FILTER_NONE) - { - png_bytep rp; - png_uint_32 sum = 0; - png_uint_32 i; - int v; - - for (i = 0, rp = row_buf + 1; i < row_info->rowbytes; i++, rp++) - { - v = *rp; - sum += (v < 128) ? v : 256 - v; - } - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - png_uint_32 sumhi, sumlo; - sumlo = sum & PNG_LOMASK; - sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; /* Gives us some footroom */ - - /* Reduce the sum if we match any of the previous rows */ - for (i = 0; i < (png_uint_32)png_ptr->num_prev_filters; i++) - { - if (png_ptr->prev_filters[i] == PNG_FILTER_NONE) - { - sumlo = (sumlo * png_ptr->filter_weights[i]) >> - PNG_WEIGHT_SHIFT; - sumhi = (sumhi * png_ptr->filter_weights[i]) >> - PNG_WEIGHT_SHIFT; - } - } - - /* Factor in the cost of this filter (this is here for completeness, - * but it makes no sense to have a "cost" for the NONE filter, as - * it has the minimum possible computational cost - none). - */ - sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_NONE]) >> - PNG_COST_SHIFT; - sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_NONE]) >> - PNG_COST_SHIFT; - - if (sumhi > PNG_HIMASK) - sum = PNG_MAXSUM; - else - sum = (sumhi << PNG_HISHIFT) + sumlo; - } -#endif - mins = sum; - } - - /* sub filter */ - if (png_ptr->do_filter & PNG_FILTER_SUB) - { - png_bytep rp, dp, lp; - png_uint_32 sum = 0, lmins = mins; - png_uint_32 i; - int v; - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - /* We temporarily increase the "minumum sum" by the factor we - * would reduce the sum of this filter, so that we can do the - * early exit comparison without scaling the sum each time. - */ - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - png_uint_32 lmhi, lmlo; - lmlo = lmins & PNG_LOMASK; - lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK; - - for (i = 0; i < (png_uint_32)png_ptr->num_prev_filters; i++) - { - if (png_ptr->prev_filters[i] == PNG_FILTER_VALUE_SUB) - { - lmlo = (lmlo * png_ptr->inv_filter_weights[i]) >> - PNG_WEIGHT_SHIFT; - lmhi = (lmhi * png_ptr->inv_filter_weights[i]) >> - PNG_WEIGHT_SHIFT; - } - } - - lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> - PNG_COST_SHIFT; - lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> - PNG_COST_SHIFT; - - if (lmhi > PNG_HIMASK) - lmins = PNG_MAXSUM; - else - lmins = (lmhi << PNG_HISHIFT) + lmlo; - } -#endif - - for (i = 0, rp = row_buf + 1, dp = png_ptr->sub_row + 1; i < bpp; - i++, rp++, dp++) - { - v = *dp = *rp; - - sum += (v < 128) ? v : 256 - v; - } - for (lp = row_buf + 1; i < row_info->rowbytes; - i++, rp++, lp++, dp++) - { - v = *dp = (png_byte)(((int)*rp - (int)*lp) & 0xff); - - sum += (v < 128) ? v : 256 - v; - - if (sum > lmins) /* We are already worse, don't continue. */ - break; - } - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - png_uint_32 sumhi, sumlo; - sumlo = sum & PNG_LOMASK; - sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; - - for (i = 0; i < (png_uint_32)png_ptr->num_prev_filters; i++) - { - if (png_ptr->prev_filters[i] == PNG_FILTER_VALUE_SUB) - { - sumlo = (sumlo * png_ptr->inv_filter_weights[i]) >> - PNG_WEIGHT_SHIFT; - sumhi = (sumhi * png_ptr->inv_filter_weights[i]) >> - PNG_WEIGHT_SHIFT; - } - } - - sumlo = (sumlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> - PNG_COST_SHIFT; - sumhi = (sumhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> - PNG_COST_SHIFT; - - if (sumhi > PNG_HIMASK) - sum = PNG_MAXSUM; - else - sum = (sumhi << PNG_HISHIFT) + sumlo; - } -#endif - - if (sum < mins) - { - mins = sum; - best_row = png_ptr->sub_row; - } - } - - /* up filter */ - if (png_ptr->do_filter & PNG_FILTER_UP) - { - png_bytep rp, dp, pp; - png_uint_32 sum = 0, lmins = mins; - png_uint_32 i; - int v; - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - png_uint_32 lmhi, lmlo; - lmlo = lmins & PNG_LOMASK; - lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK; - - for (i = 0; i < (png_uint_32)png_ptr->num_prev_filters; i++) - { - if (png_ptr->prev_filters[i] == PNG_FILTER_VALUE_UP) - { - lmlo = (lmlo * png_ptr->inv_filter_weights[i]) >> - PNG_WEIGHT_SHIFT; - lmhi = (lmhi * png_ptr->inv_filter_weights[i]) >> - PNG_WEIGHT_SHIFT; - } - } - - lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_UP]) >> - PNG_COST_SHIFT; - lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_UP]) >> - PNG_COST_SHIFT; - - if (lmhi > PNG_HIMASK) - lmins = PNG_MAXSUM; - else - lmins = (lmhi << PNG_HISHIFT) + lmlo; - } -#endif - - for (i = 0, rp = row_buf + 1, dp = png_ptr->up_row + 1, - pp = prev_row + 1; i < row_info->rowbytes; - i++, rp++, pp++, dp++) - { - v = *dp = (png_byte)(((int)*rp - (int)*pp) & 0xff); - - sum += (v < 128) ? v : 256 - v; - - if (sum > lmins) /* We are already worse, don't continue. */ - break; - } - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - png_uint_32 sumhi, sumlo; - sumlo = sum & PNG_LOMASK; - sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; - - for (i = 0; i < (png_uint_32)png_ptr->num_prev_filters; i++) - { - if (png_ptr->prev_filters[i] == PNG_FILTER_UP) - { - sumlo = (sumlo * png_ptr->filter_weights[i]) >> - PNG_WEIGHT_SHIFT; - sumhi = (sumhi * png_ptr->filter_weights[i]) >> - PNG_WEIGHT_SHIFT; - } - } - - sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_UP]) >> - PNG_COST_SHIFT; - sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_UP]) >> - PNG_COST_SHIFT; - - if (sumhi > PNG_HIMASK) - sum = PNG_MAXSUM; - else - sum = (sumhi << PNG_HISHIFT) + sumlo; - } -#endif - - if (sum < mins) - { - mins = sum; - best_row = png_ptr->up_row; - } - } - - /* avg filter */ - if (png_ptr->do_filter & PNG_FILTER_AVG) - { - png_bytep rp, dp, pp, lp; - png_uint_32 sum = 0, lmins = mins; - png_uint_32 i; - int v; - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - png_uint_32 lmhi, lmlo; - lmlo = lmins & PNG_LOMASK; - lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK; - - for (i = 0; i < (png_uint_32)png_ptr->num_prev_filters; i++) - { - if (png_ptr->prev_filters[i] == PNG_FILTER_VALUE_AVG) - { - lmlo = (lmlo * png_ptr->inv_filter_weights[i]) >> - PNG_WEIGHT_SHIFT; - lmhi = (lmhi * png_ptr->inv_filter_weights[i]) >> - PNG_WEIGHT_SHIFT; - } - } - - lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_AVG]) >> - PNG_COST_SHIFT; - lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_AVG]) >> - PNG_COST_SHIFT; - - if (lmhi > PNG_HIMASK) - lmins = PNG_MAXSUM; - else - lmins = (lmhi << PNG_HISHIFT) + lmlo; - } -#endif - - for (i = 0, rp = row_buf + 1, dp = png_ptr->avg_row + 1, - pp = prev_row + 1; i < bpp; i++, rp++, pp++, dp++) - { - v = *dp = (png_byte)(((int)*rp - ((int)*pp / 2)) & 0xff); - - sum += (v < 128) ? v : 256 - v; - } - for (lp = row_buf + 1; i < row_info->rowbytes; - i++, rp++, pp++, lp++, dp++) - { - v = *dp = (png_byte)(((int)*rp - (((int)*pp + (int)*lp) / 2)) & 0xff); - - sum += (v < 128) ? v : 256 - v; - - if (sum > lmins) /* We are already worse, don't continue. */ - break; - } - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - png_uint_32 sumhi, sumlo; - sumlo = sum & PNG_LOMASK; - sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; - - for (i = 0; i < png_ptr->num_prev_filters; i++) - { - if (png_ptr->prev_filters[i] == PNG_FILTER_NONE) - { - sumlo = (sumlo * png_ptr->filter_weights[i]) >> - PNG_WEIGHT_SHIFT; - sumhi = (sumhi * png_ptr->filter_weights[i]) >> - PNG_WEIGHT_SHIFT; - } - } - - sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_AVG]) >> - PNG_COST_SHIFT; - sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_AVG]) >> - PNG_COST_SHIFT; - - if (sumhi > PNG_HIMASK) - sum = PNG_MAXSUM; - else - sum = (sumhi << PNG_HISHIFT) + sumlo; - } -#endif - - if (sum < mins) - { - mins = sum; - best_row = png_ptr->avg_row; - } - } - - /* Paeth filter */ - if (png_ptr->do_filter & PNG_FILTER_PAETH) - { - png_bytep rp, dp, pp, cp, lp; - png_uint_32 sum = 0, lmins = mins; - png_uint_32 i; - int v; - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - png_uint_32 lmhi, lmlo; - lmlo = lmins & PNG_LOMASK; - lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK; - - for (i = 0; i < png_ptr->num_prev_filters; i++) - { - if (png_ptr->prev_filters[i] == PNG_FILTER_VALUE_PAETH) - { - lmlo = (lmlo * png_ptr->inv_filter_weights[i]) >> - PNG_WEIGHT_SHIFT; - lmhi = (lmhi * png_ptr->inv_filter_weights[i]) >> - PNG_WEIGHT_SHIFT; - } - } - - lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_PAETH]) >> - PNG_COST_SHIFT; - lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_PAETH]) >> - PNG_COST_SHIFT; - - if (lmhi > PNG_HIMASK) - lmins = PNG_MAXSUM; - else - lmins = (lmhi << PNG_HISHIFT) + lmlo; - } -#endif - - for (i = 0, rp = row_buf + 1, dp = png_ptr->paeth_row + 1, - pp = prev_row + 1; (unsigned)i < bpp; i++, rp++, pp++, dp++) - { - v = *dp = (png_byte)(((int)*rp - (int)*pp) & 0xff); - - sum += (v < 128) ? v : 256 - v; - } - for (lp = row_buf + 1, cp = prev_row + 1; i < row_info->rowbytes; - i++, rp++, pp++, lp++, dp++, cp++) - { - int a, b, c, pa, pb, pc, p; - - b = *pp; - c = *cp; - a = *lp; - - p = a + b - c; - pa = abs(p - a); - pb = abs(p - b); - pc = abs(p - c); - - if (pa <= pb && pa <= pc) - p = a; - else if (pb <= pc) - p = b; - else - p = c; - - v = *dp = (png_byte)(((int)*rp - p) & 0xff); - - sum += (v < 128) ? v : 256 - v; - - if (sum > lmins) /* We are already worse, don't continue. */ - break; - } - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - png_uint_32 sumhi, sumlo; - sumlo = sum & PNG_LOMASK; - sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; - - for (i = 0; i < png_ptr->num_prev_filters; i++) - { - if (png_ptr->prev_filters[i] == PNG_FILTER_PAETH) - { - sumlo = (sumlo * png_ptr->filter_weights[i]) >> - PNG_WEIGHT_SHIFT; - sumhi = (sumhi * png_ptr->filter_weights[i]) >> - PNG_WEIGHT_SHIFT; - } - } - - sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_PAETH]) >> - PNG_COST_SHIFT; - sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_PAETH]) >> - PNG_COST_SHIFT; - - if (sumhi > PNG_HIMASK) - sum = PNG_MAXSUM; - else - sum = (sumhi << PNG_HISHIFT) + sumlo; - } -#endif - - if (sum < mins) - { - best_row = png_ptr->paeth_row; - } - } - - /* Do the actual writing of the filtered row data from the chosen filter. */ - png_write_filtered_row(png_ptr, best_row); - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - /* Save the type of filter we picked this time for future calculations */ - if (png_ptr->num_prev_filters > 0) - { - int i; - - for (i = 1; i < (int)png_ptr->num_prev_filters; i++) - { - png_ptr->prev_filters[i] = png_ptr->prev_filters[i - 1]; - } - png_ptr->prev_filters[i] = best_row[0]; - } -#endif -} - - -/* Do the actual writing of a previously filtered row. */ -void -png_write_filtered_row(png_structp png_ptr, png_bytep filtered_row) -{ - png_debug(1, "in png_write_filtered_row\n"); - png_debug1(2, "filter = %d\n", filtered_row[0]); - /* set up the zlib input buffer */ - png_ptr->zstream.next_in = filtered_row; - png_ptr->zstream.avail_in = (uInt)png_ptr->row_info.rowbytes + 1; - /* repeat until we have compressed all the data */ - do - { - int ret; /* return of zlib */ - - /* compress the data */ - ret = deflate(&png_ptr->zstream, Z_NO_FLUSH); - /* check for compression errors */ - if (ret != Z_OK) - { - if (png_ptr->zstream.msg != NULL) - png_error(png_ptr, png_ptr->zstream.msg); - else - png_error(png_ptr, "zlib error"); - } - - /* see if it is time to write another IDAT */ - if (!(png_ptr->zstream.avail_out)) - { - /* write the IDAT and reset the zlib output buffer */ - png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size); - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - } - /* repeat until all data has been compressed */ - } while (png_ptr->zstream.avail_in); - - /* swap the current and previous rows */ - if (png_ptr->prev_row != NULL) - { - png_bytep tptr; - - tptr = png_ptr->prev_row; - png_ptr->prev_row = png_ptr->row_buf; - png_ptr->row_buf = tptr; - } - - /* finish row - updates counters and flushes zlib if last row */ - png_write_finish_row(png_ptr); - -#if defined(PNG_WRITE_FLUSH_SUPPORTED) - png_ptr->flush_rows++; - - if (png_ptr->flush_dist > 0 && - png_ptr->flush_rows >= png_ptr->flush_dist) - { - png_write_flush(png_ptr); - } -#endif /* PNG_WRITE_FLUSH_SUPPORTED */ -} diff --git a/src/png/scripts/SCOPTIONS.ppc b/src/png/scripts/SCOPTIONS.ppc deleted file mode 100644 index 2c3503e9eb..0000000000 --- a/src/png/scripts/SCOPTIONS.ppc +++ /dev/null @@ -1,7 +0,0 @@ -OPTIMIZE -OPTPEEP -OPTTIME -OPTSCHED -AUTOREGISTER -PARMS=REGISTERS -INCLUDEDIR=hlp:ppc/include diff --git a/src/png/scripts/build.bat b/src/png/scripts/build.bat deleted file mode 100644 index ec34b6f035..0000000000 --- a/src/png/scripts/build.bat +++ /dev/null @@ -1,2 +0,0 @@ -make -fmakefile.bor -B -DMODEL=m %1 %2 %3 libpng >buildm.out -make -fmakefile.bor -B -DMODEL=l %1 %2 %3 libpng >buildl.out diff --git a/src/png/scripts/descrip.mms b/src/png/scripts/descrip.mms deleted file mode 100644 index 3584b0d782..0000000000 --- a/src/png/scripts/descrip.mms +++ /dev/null @@ -1,52 +0,0 @@ - -cc_defs = /inc=$(ZLIBSRC) -c_deb = - -.ifdef __DECC__ -pref = /prefix=all -.endif - - - -OBJS = png.obj, pngset.obj, pngget.obj, pngrutil.obj, pngtrans.obj,\ - pngwutil.obj, pngread.obj, pngmem.obj, pngwrite.obj, pngrtran.obj,\ - pngwtran.obj, pngrio.obj, pngwio.obj, pngerror.obj, pngpread.obj - - -CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF) - -all : pngtest.exe libpng.olb - @ write sys$output " pngtest available" - -libpng.olb : libpng.olb($(OBJS)) - @ write sys$output " Libpng available" - - -pngtest.exe : pngtest.obj libpng.olb - link pngtest,libpng.olb/lib,$(ZLIBSRC)libz.olb/lib - -test : pngtest.exe - run pngtest - -clean : - delete *.obj;*,*.exe;* - - -# Other dependencies. -png.obj : png.h, pngconf.h -pngpread.obj : png.h, pngconf.h -pngset.obj : png.h, pngconf.h -pngget.obj : png.h, pngconf.h -pngread.obj : png.h, pngconf.h -pngrtran.obj : png.h, pngconf.h -pngrutil.obj : png.h, pngconf.h -pngerror.obj : png.h, pngconf.h -pngmem.obj : png.h, pngconf.h -pngrio.obj : png.h, pngconf.h -pngwio.obj : png.h, pngconf.h -pngtest.obj : png.h, pngconf.h -pngtrans.obj : png.h, pngconf.h -pngwrite.obj : png.h, pngconf.h -pngwtran.obj : png.h, pngconf.h -pngwutil.obj : png.h, pngconf.h - diff --git a/src/png/scripts/makefile.aco b/src/png/scripts/makefile.aco deleted file mode 100644 index 2cb089879b..0000000000 --- a/src/png/scripts/makefile.aco +++ /dev/null @@ -1,221 +0,0 @@ -# Project: libpng - - -# Toolflags: -CCflags = -c -depend !Depend -IC:,Zlib: -g -throwback -DRISCOS -fnah -C++flags = -c -depend !Depend -IC: -throwback -Linkflags = -aif -c++ -o $@ -ObjAsmflags = -throwback -NoCache -depend !Depend -CMHGflags = -LibFileflags = -c -l -o $@ -Squeezeflags = -o $@ - - -# Final targets: -@.libpng-lib: @.o.png @.o.pngerror @.o.pngrio @.o.pngwio @.o.pngmem \ - @.o.pngpread @.o.pngset @.o.pngget @.o.pngread @.o.pngrtran \ - @.o.pngrutil @.o.pngtrans @.o.pngwrite @.o.pngwtran @.o.pngwutil - LibFile $(LibFileflags) @.o.png @.o.pngerror @.o.pngrio @.o.pngrtran \ - @.o.pngmem @.o.pngpread @.o.pngset @.o.pngget @.o.pngread @.o.pngwio \ - @.o.pngrutil @.o.pngtrans @.o.pngwrite @.o.pngwtran @.o.pngwutil -@.mm-libpng-lib: @.mm.png @.mm.pngerror @.mm.pngrio @.mm.pngwio @.mm.pngmem \ - @.mm.pngpread @.mm.pngset @.mm.pngget @.mm.pngread @.mm.pngrtran \ - @.mm.pngrutil @.mm.pngtrans @.mm.pngwrite @.mm.pngwtran @.mm.pngwutil - LibFile $(LibFileflags) @.mm.png @.mm.pngerror @.mm.pngrio \ - @.mm.pngwio @.mm.pngmem @.mm.pngpread @.mm.pngset @.mm.pngget \ - @.mm.pngread @.mm.pngrtran @.mm.pngrutil @.mm.pngtrans @.mm.pngwrite \ - @.mm.pngwtran @.mm.pngwutil - - -# User-editable dependencies: -# (C) Copyright 1997 Tom Tanner -Test: @.pngtest - .pngtest - @remove .pngtest - -#It would be nice if you could stop "make" listing from here on! -@.pngtest: @.o.pngtest @.libpng-lib C:o.Stubs Zlib:zlib_lib - Link $(Linkflags) @.o.pngtest @.libpng-lib C:o.Stubs Zlib:zlib_lib - -.SUFFIXES: .o .mm .c - -.c.mm: - MemCheck.CC cc $(ccflags) -o $@ LibPng:$< -.c.o: - cc $(ccflags) -o $@ $< - - -# Static dependencies: - - -# Dynamic dependencies: -o.pngtest: c.pngtest -o.pngtest: h.png -o.pngtest: Zlib:h.zlib -o.pngtest: Zlib:h.zconf -o.pngtest: h.pngconf -mm.png: LibPng:c.png -mm.png: LibPng:h.png -mm.png: Zlib:h.zlib -mm.png: Zlib:h.zconf -mm.png: LibPng:h.pngconf -mm.png: MemCheck:ANSI.h.stdio -mm.pngerror: LibPng:c.pngerror -mm.pngerror: LibPng:h.png -mm.pngerror: Zlib:h.zlib -mm.pngerror: Zlib:h.zconf -mm.pngerror: LibPng:h.pngconf -mm.pngerror: MemCheck:ANSI.h.stdio -mm.pngrio: LibPng:c.pngrio -mm.pngrio: LibPng:h.png -mm.pngrio: Zlib:h.zlib -mm.pngrio: Zlib:h.zconf -mm.pngrio: LibPng:h.pngconf -mm.pngrio: MemCheck:ANSI.h.stdio -mm.pngwio: LibPng:c.pngwio -mm.pngwio: LibPng:h.png -mm.pngwio: Zlib:h.zlib -mm.pngwio: Zlib:h.zconf -mm.pngwio: LibPng:h.pngconf -mm.pngwio: MemCheck:ANSI.h.stdio -mm.pngmem: LibPng:c.pngmem -mm.pngmem: LibPng:h.png -mm.pngmem: Zlib:h.zlib -mm.pngmem: Zlib:h.zconf -mm.pngmem: LibPng:h.pngconf -mm.pngmem: MemCheck:ANSI.h.stdio -mm.pngpread: LibPng:c.pngpread -mm.pngpread: LibPng:h.png -mm.pngpread: Zlib:h.zlib -mm.pngpread: Zlib:h.zconf -mm.pngpread: LibPng:h.pngconf -mm.pngpread: MemCheck:ANSI.h.stdio -mm.pngset: LibPng:c.pngset -mm.pngset: LibPng:h.png -mm.pngset: Zlib:h.zlib -mm.pngset: Zlib:h.zconf -mm.pngset: LibPng:h.pngconf -mm.pngset: MemCheck:ANSI.h.stdio -mm.pngget: LibPng:c.pngget -mm.pngget: LibPng:h.png -mm.pngget: Zlib:h.zlib -mm.pngget: Zlib:h.zconf -mm.pngget: LibPng:h.pngconf -mm.pngget: MemCheck:ANSI.h.stdio -mm.pngread: LibPng:c.pngread -mm.pngread: LibPng:h.png -mm.pngread: Zlib:h.zlib -mm.pngread: Zlib:h.zconf -mm.pngread: LibPng:h.pngconf -mm.pngread: MemCheck:ANSI.h.stdio -mm.pngrtran: LibPng:c.pngrtran -mm.pngrtran: LibPng:h.png -mm.pngrtran: Zlib:h.zlib -mm.pngrtran: Zlib:h.zconf -mm.pngrtran: LibPng:h.pngconf -mm.pngrtran: MemCheck:ANSI.h.stdio -mm.pngrutil: LibPng:c.pngrutil -mm.pngrutil: LibPng:h.png -mm.pngrutil: Zlib:h.zlib -mm.pngrutil: Zlib:h.zconf -mm.pngrutil: LibPng:h.pngconf -mm.pngrutil: MemCheck:ANSI.h.stdio -mm.pngtrans: LibPng:c.pngtrans -mm.pngtrans: LibPng:h.png -mm.pngtrans: Zlib:h.zlib -mm.pngtrans: Zlib:h.zconf -mm.pngtrans: LibPng:h.pngconf -mm.pngtrans: MemCheck:ANSI.h.stdio -mm.pngwrite: LibPng:c.pngwrite -mm.pngwrite: LibPng:h.png -mm.pngwrite: Zlib:h.zlib -mm.pngwrite: Zlib:h.zconf -mm.pngwrite: LibPng:h.pngconf -mm.pngwrite: MemCheck:ANSI.h.stdio -mm.pngwtran: LibPng:c.pngwtran -mm.pngwtran: LibPng:h.png -mm.pngwtran: Zlib:h.zlib -mm.pngwtran: Zlib:h.zconf -mm.pngwtran: LibPng:h.pngconf -mm.pngwtran: MemCheck:ANSI.h.stdio -mm.pngwutil: LibPng:c.pngwutil -mm.pngwutil: LibPng:h.png -mm.pngwutil: Zlib:h.zlib -mm.pngwutil: Zlib:h.zconf -mm.pngwutil: LibPng:h.pngconf -mm.pngwutil: MemCheck:ANSI.h.stdio -o.png: c.png -o.png: h.png -o.png: Zlib:h.zlib -o.png: Zlib:h.zconf -o.png: h.pngconf -o.pngerror: c.pngerror -o.pngerror: h.png -o.pngerror: Zlib:h.zlib -o.pngerror: Zlib:h.zconf -o.pngerror: h.pngconf -o.pngrio: c.pngrio -o.pngrio: h.png -o.pngrio: Zlib:h.zlib -o.pngrio: Zlib:h.zconf -o.pngrio: h.pngconf -o.pngwio: c.pngwio -o.pngwio: h.png -o.pngwio: Zlib:h.zlib -o.pngwio: Zlib:h.zconf -o.pngwio: h.pngconf -o.pngmem: c.pngmem -o.pngmem: h.png -o.pngmem: Zlib:h.zlib -o.pngmem: Zlib:h.zconf -o.pngmem: h.pngconf -o.pngpread: c.pngpread -o.pngpread: h.png -o.pngpread: Zlib:h.zlib -o.pngpread: Zlib:h.zconf -o.pngpread: h.pngconf -o.pngset: c.pngset -o.pngset: h.png -o.pngset: Zlib:h.zlib -o.pngset: Zlib:h.zconf -o.pngset: h.pngconf -o.pngget: c.pngget -o.pngget: h.png -o.pngget: Zlib:h.zlib -o.pngget: Zlib:h.zconf -o.pngget: h.pngconf -o.pngread: c.pngread -o.pngread: h.png -o.pngread: Zlib:h.zlib -o.pngread: Zlib:h.zconf -o.pngread: h.pngconf -o.pngrtran: c.pngrtran -o.pngrtran: h.png -o.pngrtran: Zlib:h.zlib -o.pngrtran: Zlib:h.zconf -o.pngrtran: h.pngconf -o.pngrutil: c.pngrutil -o.pngrutil: h.png -o.pngrutil: Zlib:h.zlib -o.pngrutil: Zlib:h.zconf -o.pngrutil: h.pngconf -o.pngtrans: c.pngtrans -o.pngtrans: h.png -o.pngtrans: Zlib:h.zlib -o.pngtrans: Zlib:h.zconf -o.pngtrans: h.pngconf -o.pngwrite: c.pngwrite -o.pngwrite: h.png -o.pngwrite: Zlib:h.zlib -o.pngwrite: Zlib:h.zconf -o.pngwrite: h.pngconf -o.pngwtran: c.pngwtran -o.pngwtran: h.png -o.pngwtran: Zlib:h.zlib -o.pngwtran: Zlib:h.zconf -o.pngwtran: h.pngconf -o.pngwutil: c.pngwutil -o.pngwutil: h.png -o.pngwutil: Zlib:h.zlib -o.pngwutil: Zlib:h.zconf -o.pngwutil: h.pngconf diff --git a/src/png/scripts/makefile.ama b/src/png/scripts/makefile.ama deleted file mode 100644 index 366524d5c8..0000000000 --- a/src/png/scripts/makefile.ama +++ /dev/null @@ -1,42 +0,0 @@ -# Commodore Amiga Makefile -# makefile for libpng and SAS C V6.55 compiler -# Copyright (C) 1995 Wolf Faust - -#compiler -CC=sc -#compiler flags -# WARNING: a bug in V6.51 causes bad code with OPTGO -# So use V6.55 or set NOOPTGO!!!!!!!!! -CFLAGS= NOSTKCHK PARMS=REG OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL\ - OPTLOOP OPTRDEP=4 OPTDEP=4 OPTCOMP=4 DEFINE=PNG_INTERNAL -#linker flags -LDFLAGS= SD ND BATCH -#link libs -LDLIBS= libpng.lib libgz.lib LIB:scm.lib LIB:sc.lib Lib:amiga.lib -# linker -LN= slink -# file deletion command -RM= delete quiet -# library (.lib) file creation command -AR= oml -# make directory command -MKDIR= makedir - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o pngpread.o \ -pngread.o pngerror.o pngwrite.o pngrtran.o pngwtran.o pngrio.o pngwio.o pngmem.o - -all: libpng.lib pngtest - -libpng.lib: $(OBJS) --$(RM) libpng.lib -$(AR) libpng.lib r $(OBJS) - -pngtest: pngtest.o libpng.lib -$(LN) > pngerrs - -# variables -OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) -OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) -OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) - -all: libpng.lib - -png$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngset$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngget$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngread$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngpread$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngrtran$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngrutil$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngerror$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngmem$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngrio$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngwio$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngtest$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngtrans$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngwrite$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngwtran$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngwutil$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) - del libpng.lib - lib libpng $(OBJS1); - lib libpng $(OBJS2); - lib libpng $(OBJS3); - -pngtest.exe: pngtest.obj libpng.lib - $(LD) $(LDFLAGS) pngtest.obj,,,libpng.lib ..\zlib\zlib.lib ; - -test: pngtest.exe - pngtest - -# End of makefile for libpng - diff --git a/src/png/scripts/makefile.os2 b/src/png/scripts/makefile.os2 deleted file mode 100644 index a3ff2dcac6..0000000000 --- a/src/png/scripts/makefile.os2 +++ /dev/null @@ -1,69 +0,0 @@ -# makefile for libpng on OS/2 with gcc -# For conditions of distribution and use, see copyright notice in png.h - -# Related files: pngos2.def - -CC=gcc -Zomf -s - -# Where the zlib library and include files are located -ZLIBLIB=../zlib -ZLIBINC=../zlib - -WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ - -Wmissing-declarations -Wtraditional -Wcast-align \ - -Wstrict-prototypes -Wmissing-prototypes #-Wconversion -CFLAGS=-I$(ZLIBINC) -Wall -O6 -funroll-loops -malign-loops=2 \ - -malign-functions=2 #$(WARNMORE) -g -DPNG_DEBUG=5 -LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lzdll -Zcrtdll -AR=emxomfar - -PNGLIB=png.lib -IMPLIB=emximp -SHAREDLIB=png.dll -SHAREDLIBIMP=pngdll.lib - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -.SUFFIXES: .c .o - -all: $(PNGLIB) $(SHAREDLIB) $(SHAREDLIBIMP) - -$(PNGLIB): $(OBJS) - $(AR) rc $@ $(OBJS) - -$(SHAREDLIB): $(OBJS) pngos2.def - $(CC) $(LDFLAGS) -Zdll -o $@ $^ - -$(SHAREDLIBIMP): pngos2.def - $(IMPLIB) -o $@ $^ - -pngtest.exe: pngtest.o png.dll pngdll.lib - $(CC) -o $@ $(CFLAGS) $< $(LDFLAGS) - -test: pngtest.exe - ./pngtest.exe - -clean: - rm -f *.o $(PNGLIB) png.dll pngdll.lib pngtest.exe pngout.png - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h - -pngtest.o: png.h pngconf.h diff --git a/src/png/scripts/makefile.s2x b/src/png/scripts/makefile.s2x deleted file mode 100644 index 163f363826..0000000000 --- a/src/png/scripts/makefile.s2x +++ /dev/null @@ -1,104 +0,0 @@ -# makefile for libpng on Solaris 2.x with gcc -# Contributed by William L. Sebok, based on makefile.lnx -# Copyright (C) 1996, 1997 Andreas Dilger -# Copyright (C) 1998 Greg Roelofs -# For conditions of distribution and use, see copyright notice in png.h - -CC=gcc - -# Where the zlib library and include files are located -# Changing these to ../zlib poses a security risk. If you want -# to have zlib in an adjacent directory, specify the full path instead of "..". -#ZLIBLIB=../zlib -#ZLIBINC=../zlib - -ZLIBLIB=/usr/local/lib -ZLIBINC=/usr/local/include - - -WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ - -Wmissing-declarations -Wtraditional -Wcast-align \ - -Wstrict-prototypes -Wmissing-prototypes #-Wconversion -CFLAGS=-I$(ZLIBINC) -Wall -O3 \ - #$(WARNMORE) -g -DPNG_DEBUG=5 -LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng -lz -lm - -#RANLIB=ranlib -RANLIB=echo - -# read libpng.txt or png.h to see why PNGMAJ is 2. You should not -# have to change it. -PNGMAJ = 2 -PNGMIN = 1.0 -PNGVER = $(PNGMAJ).$(PNGMIN) - -# where make install puts libpng.a, libpng.so*, and png.h -prefix=/usr/local -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -OBJSDLL = $(OBJS:.o=.pic.o) - -.SUFFIXES: .c .o .pic.o - -.c.pic.o: - $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c - -all: libpng.a libpng.so pngtest - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -libpng.so: libpng.so.$(PNGMAJ) - ln -sf libpng.so.$(PNGMAJ) libpng.so - -libpng.so.$(PNGMAJ): libpng.so.$(PNGVER) - ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ) - -libpng.so.$(PNGVER): $(OBJSDLL) - $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.$(PNGMAJ) \ - -o libpng.so.$(PNGVER) $(OBJSDLL) -lz - -pngtest: pngtest.o libpng.so - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - ./pngtest - -install: libpng.a libpng.so.$(PNGVER) - -@mkdir $(INCPATH) $(LIBPATH) - cp png.h pngconf.h $(INCPATH) - chmod 644 $(INCPATH)/png.h $(INCPATH)/pngconf.h - cp libpng.a libpng.so.$(PNGVER) $(LIBPATH) - chmod 755 $(LIBPATH)/libpng.so.$(PNGVER) - -@/bin/rm -f $(LIBPATH)/libpng.so.$(PNGMAJ) $(LIBPATH)/libpng.so - (cd $(LIBPATH); ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ); \ - ln -sf libpng.so.$(PNGMAJ) libpng.so) - -clean: - /bin/rm -f *.o libpng.a libpng.so* pngtest pngout.png - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h - -pngtest.o: png.h pngconf.h diff --git a/src/png/scripts/makefile.sgi b/src/png/scripts/makefile.sgi deleted file mode 100644 index 965cf91fd0..0000000000 --- a/src/png/scripts/makefile.sgi +++ /dev/null @@ -1,69 +0,0 @@ -# makefile for libpng -# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. -# For conditions of distribution and use, see copyright notice in png.h - -# Where the zlib library and include files are located -#ZLIBLIB=/usr/local/lib -#ZLIBINC=/usr/local/include -ZLIBLIB=../zlib -ZLIBINC=../zlib - -CC=cc - -CFLAGS=-I$(ZLIBINC) -O -fullwarn # -g -DPNG_DEBUG=1 -LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm - -RANLIB=echo -#RANLIB=ranlib - -# where make install puts libpng.a and png.h -prefix=/usr/local - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -all: libpng.a pngtest - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -pngtest: pngtest.o libpng.a - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - ./pngtest - -install: libpng.a - -@mkdir $(prefix)/include - -@mkdir $(prefix)/lib - cp png.h $(prefix)/include - cp pngconf.h $(prefix)/include - chmod 644 $(prefix)/include/png.h - chmod 644 $(prefix)/include/pngconf.h - cp libpng.a $(prefix)/lib - chmod 644 $(prefix)/lib/libpng.a - -clean: - rm -f *.o libpng.a pngtest pngout.png - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtest.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h -pngpread.o: png.h pngconf.h - diff --git a/src/png/scripts/makefile.std b/src/png/scripts/makefile.std deleted file mode 100644 index 7cc605990a..0000000000 --- a/src/png/scripts/makefile.std +++ /dev/null @@ -1,68 +0,0 @@ -# makefile for libpng -# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. -# For conditions of distribution and use, see copyright notice in png.h - -# Where the zlib library and include files are located -#ZLIBLIB=/usr/local/lib -#ZLIBINC=/usr/local/include -ZLIBLIB=../zlib -ZLIBINC=../zlib - -CC=cc -CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=1 -LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm - -#RANLIB=echo -RANLIB=ranlib - -# where make install puts libpng.a and png.h -prefix=/usr/local - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -all: libpng.a pngtest - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -pngtest: pngtest.o libpng.a - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - ./pngtest - -install: libpng.a - -@mkdir $(prefix)/include - -@mkdir $(prefix)/lib - cp png.h $(prefix)/include - cp pngconf.h $(prefix)/include - chmod 644 $(prefix)/include/png.h - chmod 644 $(prefix)/include/pngconf.h - cp libpng.a $(prefix)/lib - chmod 644 $(prefix)/lib/libpng.a - -clean: - rm -f *.o libpng.a pngtest pngout.png - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtest.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h -pngpread.o: png.h pngconf.h - diff --git a/src/png/scripts/makefile.sun b/src/png/scripts/makefile.sun deleted file mode 100644 index 975ca17232..0000000000 --- a/src/png/scripts/makefile.sun +++ /dev/null @@ -1,72 +0,0 @@ -# makefile for libpng -# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. -# For conditions of distribution and use, see copyright notice in png.h - -# Where the zlib library and include files are located -#ZLIBLIB=/usr/local/lib -#ZLIBINC=/usr/local/include -ZLIBLIB=../zlib -ZLIBINC=../zlib - - -WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow -Wconversion \ - -Wmissing-declarations -Wtraditional -Wcast-align \ - -Wstrict-prototypes -Wmissing-prototypes -CC=gcc -CFLAGS=-I$(ZLIBINC) -O $(WARNMORE) -DPNG_DEBUG=4 -LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm - -RANLIB=ranlib -#RANLIB=echo - -# where make install puts libpng.a and png.h -prefix=/usr/local - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -all: libpng.a pngtest - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -pngtest: pngtest.o libpng.a - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - ./pngtest - -install: libpng.a - -@mkdir $(prefix)/include - -@mkdir $(prefix)/lib - cp png.h $(prefix)/include - cp pngconf.h $(prefix)/include - chmod 644 $(prefix)/include/png.h - chmod 644 $(prefix)/include/pngconf.h - cp libpng.a $(prefix)/lib - chmod 644 $(prefix)/lib/libpng.a - -clean: - rm -f *.o libpng.a pngtest pngout.png - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtest.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h -pngpread.o: png.h pngconf.h - diff --git a/src/png/scripts/makefile.tc3 b/src/png/scripts/makefile.tc3 deleted file mode 100644 index 6f8f36667f..0000000000 --- a/src/png/scripts/makefile.tc3 +++ /dev/null @@ -1,82 +0,0 @@ -# Makefile for libpng -# TurboC++ 3.0 (Note: All modules are compiled in C mode) - -# To use, do "make -fmakefile.tc3" - -# ------------- Turbo C++ 3.0 ------------- -MODEL=-ml -CFLAGS=-O2 -Z $(MODEL) -I..\zlib -CC=tcc -LD=tcc -LIB=tlib -LDFLAGS=$(MODEL) -L..\zlib -O=.obj -E=.exe - -# variables -OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) -OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) -OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) -OBJSL1 = +png$(O) +pngset$(O) +pngget$(O) +pngrutil$(O) +pngtrans$(O) -OBJSL2 = +pngwutil$(O) +pngmem$(O) +pngpread$(O) +pngread$(O) +pngerror$(O) -OBJSL3 = +pngwrite$(O) +pngrtran$(O) +pngwtran$(O) +pngrio$(O) +pngwio$(O) - -all: libpng.lib pngtest.exe - -png$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngset$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngget$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngread$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngpread$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngrtran$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngrutil$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngerror$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngmem$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngrio$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngwio$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngtest$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngtrans$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngwrite$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngwtran$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngwutil$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) - $(LIB) libpng +$(OBJSL1) - $(LIB) libpng +$(OBJSL2) - $(LIB) libpng +$(OBJSL3) - -pngtest$(E): pngtest$(O) libpng.lib - $(CC) $(LDFLAGS) pngtest.obj libpng.lib zlib.lib - -# End of makefile for libpng diff --git a/src/png/scripts/makefile.wat b/src/png/scripts/makefile.wat deleted file mode 100644 index a715acbcdc..0000000000 --- a/src/png/scripts/makefile.wat +++ /dev/null @@ -1,88 +0,0 @@ -# Makefile for libpng -# Watcom 10a and later 32-bit protected mode flat memory model - -# Adapted by Pawel Mrochen, based on makefile.msc -# For conditions of distribution and use, see copyright notice in png.h -# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib - -# To use, do "wmake -f makefile.wat" - -# ------------- Watcom 10a and later ------------- -MODEL=-mf -CFLAGS= $(MODEL) -fpi87 -fp5 -5r -oaeilmnrt -s -zp4 -i=..\zlib -CC=wcc386 -LD=wcl386 -LIB=wlib -b -c -LDFLAGS= -O=.obj - -#uncomment next to put error messages in a file -#ERRFILE= >> pngerrs - -# variables -OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) -OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) -OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) - -all: test - -png$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngset$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngget$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngread$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngpread$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngrtran$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngrutil$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngerror$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngmem$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngrio$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngwio$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngtest$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngtrans$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngwrite$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngwtran$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngwutil$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) - $(LIB) -n libpng.lib +$(OBJS1) - $(LIB) libpng.lib +$(OBJS2) - $(LIB) libpng.lib +$(OBJS3) - -pngtest.exe: pngtest.obj libpng.lib - $(LD) $(LDFLAGS) pngtest.obj libpng.lib ..\zlib\zlib.lib - -test: pngtest.exe - pngtest - -# End of makefile for libpng diff --git a/src/png/scripts/makevms.com b/src/png/scripts/makevms.com deleted file mode 100644 index 15f305a606..0000000000 --- a/src/png/scripts/makevms.com +++ /dev/null @@ -1,125 +0,0 @@ -$! make libpng under VMS -$! -$! -$! Look for the compiler used -$! -$ zlibsrc = "[-.zlib]" -$ ccopt="/include=''zlibsrc'" -$ if f$getsyi("HW_MODEL").ge.1024 -$ then -$ ccopt = "/prefix=all"+ccopt -$ comp = "__decc__=1" -$ if f$trnlnm("SYS").eqs."" then define sys sys$library: -$ else -$ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs."" -$ then -$ if f$trnlnm("SYS").eqs."" then define sys sys$library: -$ if f$search("SYS$SYSTEM:VAXC.EXE").eqs."" -$ then -$ comp = "__gcc__=1" -$ CC :== GCC -$ else -$ comp = "__vaxc__=1" -$ endif -$ else -$ if f$trnlnm("SYS").eqs."" then define sys decc$library_include: -$ ccopt = "/decc/prefix=all"+ccopt -$ comp = "__decc__=1" -$ endif -$ endif -$! -$! Build the thing plain or with mms -$! -$ write sys$output "Compiling Libpng sources ..." -$ if f$search("SYS$SYSTEM:MMS.EXE").eqs."" -$ then -$ dele pngtest.obj;* -$ CALL MAKE png.OBJ "cc ''CCOPT' png" - - png.c png.h pngconf.h -$ CALL MAKE pngpread.OBJ "cc ''CCOPT' pngpread" - - pngpread.c png.h pngconf.h -$ CALL MAKE pngset.OBJ "cc ''CCOPT' pngset" - - pngset.c png.h pngconf.h -$ CALL MAKE pngget.OBJ "cc ''CCOPT' pngget" - - pngget.c png.h pngconf.h -$ CALL MAKE pngread.OBJ "cc ''CCOPT' pngread" - - pngread.c png.h pngconf.h -$ CALL MAKE pngpread.OBJ "cc ''CCOPT' pngpread" - - pngpread.c png.h pngconf.h -$ CALL MAKE pngrtran.OBJ "cc ''CCOPT' pngrtran" - - pngrtran.c png.h pngconf.h -$ CALL MAKE pngrutil.OBJ "cc ''CCOPT' pngrutil" - - pngrutil.c png.h pngconf.h -$ CALL MAKE pngerror.OBJ "cc ''CCOPT' pngerror" - - pngerror.c png.h pngconf.h -$ CALL MAKE pngmem.OBJ "cc ''CCOPT' pngmem" - - pngmem.c png.h pngconf.h -$ CALL MAKE pngrio.OBJ "cc ''CCOPT' pngrio" - - pngrio.c png.h pngconf.h -$ CALL MAKE pngwio.OBJ "cc ''CCOPT' pngwio" - - pngwio.c png.h pngconf.h -$ CALL MAKE pngtrans.OBJ "cc ''CCOPT' pngtrans" - - pngtrans.c png.h pngconf.h -$ CALL MAKE pngwrite.OBJ "cc ''CCOPT' pngwrite" - - pngwrite.c png.h pngconf.h -$ CALL MAKE pngwtran.OBJ "cc ''CCOPT' pngwtran" - - pngwtran.c png.h pngconf.h -$ CALL MAKE pngwutil.OBJ "cc ''CCOPT' pngwutil" - - pngwutil.c png.h pngconf.h -$ write sys$output "Building Libpng ..." -$ CALL MAKE libpng.OLB "lib/crea libpng.olb *.obj" *.OBJ -$ write sys$output "Building pngtest..." -$ CALL MAKE pngtest.OBJ "cc ''CCOPT' pngtest" - - pngtest.c png.h pngconf.h -$ call make pngtest.exe - - "LINK pngtest,libpng.olb/lib,''zlibsrc'libgz.olb/lib" - - pngtest.obj libpng.olb -$ write sys$output "Testing Libpng..." -$ run pngtest -$ else -$ mms/macro=('comp',zlibsrc='zlibsrc') -$ endif -$ write sys$output "Libpng build completed" -$ exit -$! -$! -$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES -$ V = 'F$Verify(0) -$! P1 = What we are trying to make -$! P2 = Command to make it -$! P3 - P8 What it depends on -$ -$ If F$Search(P1) .Eqs. "" Then Goto Makeit -$ Time = F$CvTime(F$File(P1,"RDT")) -$arg=3 -$Loop: -$ Argument = P'arg -$ If Argument .Eqs. "" Then Goto Exit -$ El=0 -$Loop2: -$ File = F$Element(El," ",Argument) -$ If File .Eqs. " " Then Goto Endl -$ AFile = "" -$Loop3: -$ OFile = AFile -$ AFile = F$Search(File) -$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl -$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit -$ Goto Loop3 -$NextEL: -$ El = El + 1 -$ Goto Loop2 -$EndL: -$ arg=arg+1 -$ If arg .Le. 8 Then Goto Loop -$ Goto Exit -$ -$Makeit: -$ VV=F$VERIFY(0) -$ write sys$output P2 -$ 'P2 -$ VV='F$Verify(VV) -$Exit: -$ If V Then Set Verify -$ENDSUBROUTINE - diff --git a/src/png/scripts/pngos2.def b/src/png/scripts/pngos2.def deleted file mode 100644 index ba2d3e3d38..0000000000 --- a/src/png/scripts/pngos2.def +++ /dev/null @@ -1,286 +0,0 @@ -;---------------------------------------- -; PNGLIB module definition file for OS/2 -;---------------------------------------- - -LIBRARY PNG -DESCRIPTION "PNG image compression library for OS/2" -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE - -EXPORTS - png_set_sig_bytes - png_sig_cmp - png_check_sig - png_create_read_struct - png_create_write_struct - png_write_chunk - png_write_chunk_start - png_write_chunk_data - png_write_chunk_end - png_create_info_struct - png_info_init - png_write_info - png_read_info - png_convert_to_rfc1123 - png_convert_from_struct_tm - png_convert_from_time_t - png_set_expand - png_set_bgr - png_set_gray_to_rgb -; png_set_rgb_to_gray - png_build_grayscale_palette - png_set_strip_alpha - png_set_swap_alpha - png_set_invert_alpha - png_set_filler - png_set_swap - png_set_packing - png_set_packswap - png_set_shift - png_set_interlace_handling - png_set_invert_mono - png_set_background - png_set_strip_16 - png_set_dither - png_set_gamma - png_set_flush - png_write_flush - png_start_read_image - png_read_update_info - png_read_rows - png_read_row - png_read_image - png_write_row - png_write_rows - png_write_image - png_write_end - png_read_end - png_destroy_info_struct - png_destroy_read_struct - png_read_destroy - png_destroy_write_struct -; png_write_destroy_info - png_write_destroy - png_set_crc_action - png_set_filter - png_set_filter_heuristics - png_set_compression_level - png_set_compression_mem_level - png_set_compression_strategy - png_set_compression_window_bits - png_set_compression_method - png_init_io - png_set_error_fn - png_get_error_ptr - png_set_write_fn - png_set_read_fn - png_set_write_status_fn - png_set_read_status_fn - png_get_io_ptr - png_set_progressive_read_fn - png_set_read_status_fn - png_set_read_user_transform_fn - png_set_write_status_fn - png_set_write_user_transform_fn - png_get_progressive_ptr - png_process_data - png_progressive_combine_row - png_malloc - png_free - png_memcpy_check - png_memset_check -; png_debug_malloc -; png_debug_free -; png_far_to_near - png_error - png_chunk_error - png_warning - png_chunk_warning - png_get_valid - png_get_rowbytes - png_get_channels - png_get_image_width - png_get_image_height - png_get_bit_depth - png_get_color_type - png_get_filter_type - png_get_interlace_type - png_get_compression_type - png_get_pixels_per_meter - png_get_pixel_aspect_ratio - png_get_x_offset_pixels - png_get_y_offset_pixels - png_get_x_offset_microns - png_get_y_offset_microns - png_get_signature - png_get_bKGD - png_set_bKGD - png_get_cHRM - png_set_cHRM - png_get_gAMA - png_set_gAMA - png_get_hIST - png_set_hIST - png_get_IHDR - png_set_IHDR - png_get_oFFs - png_set_oFFs - png_get_pCAL - png_set_pCAL - png_get_pHYs - png_set_pHYs - png_get_PLTE - png_set_PLTE - png_get_sBIT - png_set_sBIT - png_get_sRGB - png_set_sRGB - png_set_sRGB_gAMA_and_cHRM - png_get_text - png_set_text - png_get_tIME - png_set_tIME - png_get_tRNS - png_set_tRNS - - png_create_struct - png_destroy_struct - png_info_destroy - png_zalloc - png_zfree - png_reset_crc - png_write_data - png_read_data - png_crc_read - png_crc_finish - png_crc_error - png_calculate_crc - png_flush - png_save_uint_32 - png_save_int_32 - png_save_uint_16 - png_write_sig - png_write_IHDR - png_write_PLTE - png_write_IDAT - png_write_IEND - png_write_gAMA - png_write_sBIT - png_write_cHRM - png_write_sRGB - png_write_tRNS - png_write_bKGD - png_write_hIST - png_check_keyword - png_write_tEXt - png_write_zTXt - png_write_oFFs - png_write_pCAL - png_write_pHYs - png_write_tIME - png_write_finish_row - png_write_start_row - png_build_gamma_table - png_combine_row - png_do_read_interlace - png_do_write_interlace - png_read_filter_row - png_write_find_filter - png_write_filtered_row - png_read_finish_row - png_read_start_row - png_read_transform_info - png_do_read_filler - png_do_read_swap_alpha - png_do_write_swap_alpha - png_do_read_invert_alpha - png_do_write_invert_alpha - png_do_strip_filler - png_do_swap - png_do_packswap -; png_do_rgb_to_gray - png_do_gray_to_rgb - png_do_unpack - png_do_unshift - png_do_invert - png_do_chop - png_do_dither -; png_correct_palette - png_do_bgr - png_do_pack - png_do_shift - png_do_background - png_do_gamma - png_do_expand_palette - png_do_expand - png_handle_IHDR - png_handle_PLTE - png_handle_IEND - png_handle_gAMA - png_handle_sBIT - png_handle_cHRM - png_handle_sRGB - png_handle_tRNS - png_handle_bKGD - png_handle_hIST - png_handle_oFFs - png_handle_pCAL - png_handle_pHYs - png_handle_tIME - png_handle_tEXt - png_handle_zTXt - png_handle_unknown - png_check_chunk_name - png_do_read_transformations - png_do_write_transformations - png_init_read_transformations - png_push_read_chunk - png_push_read_sig -; png_push_check_crc - png_push_crc_skip - png_push_crc_finish - png_push_fill_buffer - png_push_save_buffer - png_push_restore_buffer - png_push_read_IDAT - png_process_IDAT_data - png_push_process_row - png_push_handle_unknown - png_push_have_info - png_push_have_end - png_push_have_row -; png_push_read_end - png_process_some_data - png_read_push_finish_row - png_push_handle_tEXt - png_push_read_tEXt - png_push_handle_zTXt - png_push_read_zTXt - - png_libpng_ver - png_pass_start - png_pass_inc - png_pass_ystart - png_pass_yinc - png_pass_mask - png_pass_dsp_mask -; png_pass_width -; png_pass_height - - png_IHDR - png_IDAT - png_IEND - png_PLTE - png_bKGD - png_cHRM - png_gAMA - png_hIST - png_oFFs - png_pCAL - png_pHYs - png_sBIT - png_sRGB - png_tEXt - png_tIME - png_tRNS - png_zTXt diff --git a/src/png/scripts/smakefile.ppc b/src/png/scripts/smakefile.ppc deleted file mode 100644 index fa3cad44b1..0000000000 --- a/src/png/scripts/smakefile.ppc +++ /dev/null @@ -1,29 +0,0 @@ -# Amiga powerUP (TM) Makefile -# makefile for libpng and SAS C V6.58/7.00 PPC compiler -# Copyright (C) 1998 by Andreas R. Kleinert - -CC = scppc -CFLAGS = NOSTKCHK NOSINT OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL IDIR /zlib \ - OPTLOOP OPTRDEP=8 OPTDEP=8 OPTCOMP=8 -LIBNAME = libpng.a -AR = ppc-amigaos-ar -AR_FLAGS = cr -RANLIB = ppc-amigaos-ranlib -LDFLAGS = -r -o -LDLIBS = ../zlib/libzip.a LIB:scppc.a -LN = ppc-amigaos-ld -RM = delete quiet -MKDIR = makedir - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o pngread.o \ -pngerror.o pngpread.o pngwrite.o pngrtran.o pngwtran.o pngrio.o pngwio.o pngmem.o - -all: $(LIBNAME) pngtest - -$(LIBNAME): $(OBJS) - $(AR) $(AR_FLAGS) $@ $(OBJS) - $(RANLIB) $@ - -pngtest: pngtest.o $(LIBNAME) - $(LN) $(LDFLAGS) pngtest LIB:c_ppc.o pngtest.o $(LIBNAME) $(LDLIBS) \ -LIB:end.o diff --git a/src/qt.inc b/src/qt.inc deleted file mode 100644 index f25c0048b6..0000000000 --- a/src/qt.inc +++ /dev/null @@ -1,106 +0,0 @@ -# needed for unactivated -NONE = - -# define library name -LIB_TARGET=wx_qt -LIB_MAJOR=0 -LIB_MINOR=1 - -# define library sources - -LIB_CPP_SRC=\ -\ - qt/app.cpp \ - qt/bitmap.cpp \ - qt/brush.cpp \ - qt/button.cpp \ - qt/checkbox.cpp \ - qt/choice.cpp \ - qt/colour.cpp \ - qt/control.cpp \ - qt/combobox.cpp \ - qt/cursor.cpp \ - qt/data.cpp \ - qt/dc.cpp \ - qt/dcclient.cpp \ - qt/dcmemory.cpp \ - qt/dcscreen.cpp \ - qt/dnd.cpp \ - qt/dialog.cpp \ - qt/filedlg.cpp \ - qt/font.cpp \ - qt/frame.cpp \ - qt/gauge.cpp \ - qt/gdiobj.cpp \ - qt/icon.cpp \ - qt/listbox.cpp \ - qt/mdi.cpp \ - qt/menu.cpp \ - qt/notebook.cpp \ - qt/palette.cpp \ - qt/pen.cpp \ - qt/radiobox.cpp \ - qt/radiobut.cpp \ - qt/region.cpp \ - qt/scrolbar.cpp \ - qt/settings.cpp \ - qt/slider.cpp \ - qt/statbox.cpp \ - qt/stattext.cpp \ - qt/tbargtk.cpp \ - qt/textctrl.cpp \ - qt/timer.cpp \ - qt/utilsgtk.cpp \ - qt/utilsres.cpp \ - qt/window.cpp \ -\ - - -LIB_C_SRC=\ -\ - png/png.c \ - png/pngset.c \ - png/pngget.c \ - png/pngrutil.c \ - png/pngtrans.c \ - png/pngwutil.c \ - png/pngread.c \ - png/pngrio.c \ - png/pngwio.c \ - png/pngwrite.c \ - png/pngrtran.c \ - png/pngwtran.c \ - png/pngmem.c \ - png/pngerror.c \ - png/pngpread.c \ -\ - zlib/adler32.c \ - zlib/compress.c \ - zlib/crc32.c \ - zlib/gzio.c \ - zlib/uncompr.c \ - zlib/deflate.c \ - zlib/trees.c \ - zlib/zutil.c \ - zlib/inflate.c \ - zlib/infblock.c \ - zlib/inftrees.c \ - zlib/infcodes.c \ - zlib/infutil.c \ - zlib/inffast.c \ -\ - iodbc/dlf.c \ - iodbc/dlproc.c \ - iodbc/herr.c \ - iodbc/henv.c \ - iodbc/hdbc.c \ - iodbc/hstmt.c \ - iodbc/connect.c \ - iodbc/prepare.c \ - iodbc/result.c \ - iodbc/execute.c \ - iodbc/fetch.c \ - iodbc/info.c \ - iodbc/catalog.c \ - iodbc/misc.c \ - iodbc/itrace.c diff --git a/src/qt/app.cpp b/src/qt/app.cpp deleted file mode 100644 index f54a6806e2..0000000000 --- a/src/qt/app.cpp +++ /dev/null @@ -1,395 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: app.cpp -// Purpose: wxApp -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "app.h" -#endif - -#include "wx/frame.h" -#include "wx/app.h" -#include "wx/utils.h" -#include "wx/gdicmn.h" -#include "wx/pen.h" -#include "wx/brush.h" -#include "wx/cursor.h" -#include "wx/icon.h" -#include "wx/palette.h" -#include "wx/dc.h" -#include "wx/dialog.h" -#include "wx/msgdlg.h" -#include "wx/log.h" -#include "wx/module.h" - -#if USE_WX_RESOURCES -#include "wx/resource.h" -#endif - -#include - -#if defined(__WIN95__) && !defined(__GNUWIN32__) -extern char *wxBuffer; -extern wxList wxPendingDelete; - -wxApp *wxTheApp = NULL; - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler) -BEGIN_EVENT_TABLE(wxApp, wxEvtHandler) - EVT_IDLE(wxApp::OnIdle) -END_EVENT_TABLE() -#endif - -long wxApp::sm_lastMessageTime = 0; - -void wxApp::CommonInit() -{ -#ifdef __WXMSW__ - wxBuffer = new char[1500]; -#else - wxBuffer = new char[BUFSIZ + 512]; -#endif - - wxClassInfo::InitializeClasses(); - - wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING); - wxTheColourDatabase->Initialize(); - wxInitializeStockObjects(); - -#if USE_WX_RESOURCES - wxInitializeResourceSystem(); -#endif - - // For PostScript printing -#if USE_POSTSCRIPT - wxInitializePrintSetupData(); - wxThePrintPaperDatabase = new wxPrintPaperDatabase; - wxThePrintPaperDatabase->CreateDatabase(); -#endif - - wxBitmap::InitStandardHandlers(); - - wxModule::RegisterModules(); - wxASSERT( wxModule::InitializeModules() == TRUE ); -} - -void wxApp::CommonCleanUp() -{ - wxModule::CleanUpModules(); - -#if USE_WX_RESOURCES - wxCleanUpResourceSystem(); -#endif - - wxDeleteStockObjects() ; - - // Destroy all GDI lists, etc. - delete wxTheBrushList; - wxTheBrushList = NULL; - - delete wxThePenList; - wxThePenList = NULL; - - delete wxTheFontList; - wxTheFontList = NULL; - - delete wxTheBitmapList; - wxTheBitmapList = NULL; - - delete wxTheColourDatabase; - wxTheColourDatabase = NULL; - -#if USE_POSTSCRIPT - wxInitializePrintSetupData(FALSE); - delete wxThePrintPaperDatabase; - wxThePrintPaperDatabase = NULL; -#endif - - wxBitmap::CleanUpHandlers(); - - delete[] wxBuffer; - wxBuffer = NULL; - - // do it as the very last thing because everything else can log messages - delete wxLog::SetActiveTarget(NULL); -} - -int wxEntry( int argc, char *argv[] ) -{ - wxClassInfo::InitializeClasses(); - -#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT - -#if !defined(_WINDLL) - streambuf* sBuf = new wxDebugStreamBuf; -#else - streambuf* sBuf = NULL; -#endif - ostream* oStr = new ostream(sBuf) ; - wxDebugContext::SetStream(oStr, sBuf); - -#endif - - if (!wxTheApp) - { - if (!wxApp::GetInitializerFunction()) - { - printf( "wxWindows error: No initializer - use IMPLEMENT_APP macro.\n" ); - return 0; - }; - - wxTheApp = (* wxApp::GetInitializerFunction()) (); - }; - - if (!wxTheApp) - { - printf( "wxWindows error: wxTheApp == NULL\n" ); - return 0; - }; - - wxTheApp->argc = argc; - wxTheApp->argv = argv; - - // TODO: your platform-specific initialization. - - wxApp::CommonInit(); - - // GUI-specific initialization, such as creating an app context. - wxTheApp->OnInitGui(); - - // Here frames insert themselves automatically - // into wxTopLevelWindows by getting created - // in OnInit(). - - if (!wxTheApp->OnInit()) return 0; - - wxTheApp->m_initialized = (wxTopLevelWindows.Number() > 0); - - int retValue = 0; - - if (wxTheApp->Initialized()) retValue = wxTheApp->OnRun(); - - wxTheApp->DeletePendingObjects(); - - wxTheApp->OnExit(); - - wxApp::CommonCleanUp(); - -#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT - // At this point we want to check if there are any memory - // blocks that aren't part of the wxDebugContext itself, - // as a special case. Then when dumping we need to ignore - // wxDebugContext, too. - if (wxDebugContext::CountObjectsLeft() > 0) - { - wxTrace("There were memory leaks.\n"); - wxDebugContext::Dump(); - wxDebugContext::PrintStatistics(); - } - wxDebugContext::SetStream(NULL, NULL); -#endif - - return retValue; -}; - -// Static member initialization -wxAppInitializerFunction wxApp::m_appInitFn = (wxAppInitializerFunction) NULL; - -wxApp::wxApp() -{ - m_topWindow = NULL; - wxTheApp = this; - m_className = ""; - m_wantDebugOutput = TRUE ; - m_appName = ""; - argc = 0; - argv = NULL; -#ifdef __WXMSW__ - m_printMode = wxPRINT_WINDOWS; -#else - m_printMode = wxPRINT_POSTSCRIPT; -#endif - m_exitOnFrameDelete = TRUE; - m_auto3D = TRUE; -} - -bool wxApp::Initialized() -{ - if (GetTopWindow()) - return TRUE; - else - return FALSE; -} - -int wxApp::MainLoop() -{ - m_keepGoing = TRUE; - -/* TODO: implement your main loop here, calling ProcessIdle in idle time. - while (m_keepGoing) - { - while (!::PeekMessage(&s_currentMsg, 0, 0, 0, PM_NOREMOVE) && - ProcessIdle()) {} - if (!DoMessage()) - m_keepGoing = FALSE; - } -*/ - - return 0; -} - -// Returns TRUE if more time is needed. -bool wxApp::ProcessIdle() -{ - wxIdleEvent event; - event.SetEventObject(this); - ProcessEvent(event); - - return event.MoreRequested(); -} - -void wxApp::ExitMainLoop() -{ - m_keepGoing = FALSE; -} - -// Is a message/event pending? -bool wxApp::Pending() -{ -/* TODO. - */ - return FALSE; -} - -// Dispatch a message. -void wxApp::Dispatch() -{ -/* TODO. - */ -} - -void wxApp::OnIdle(wxIdleEvent& event) -{ - static bool inOnIdle = FALSE; - - // Avoid recursion (via ProcessEvent default case) - if (inOnIdle) - return; - - inOnIdle = TRUE; - - // 'Garbage' collection of windows deleted with Close(). - DeletePendingObjects(); - - // flush the logged messages if any - wxLog *pLog = wxLog::GetActiveTarget(); - if ( pLog != NULL && pLog->HasPendingMessages() ) - pLog->Flush(); - - // Send OnIdle events to all windows - bool needMore = SendIdleEvents(); - - if (needMore) - event.RequestMore(TRUE); - - inOnIdle = FALSE; -} - -// Send idle event to all top-level windows -bool wxApp::SendIdleEvents() -{ - bool needMore = FALSE; - wxNode* node = wxTopLevelWindows.First(); - while (node) - { - wxWindow* win = (wxWindow*) node->Data(); - if (SendIdleEvents(win)) - needMore = TRUE; - - node = node->Next(); - } - return needMore; -} - -// Send idle event to window and all subwindows -bool wxApp::SendIdleEvents(wxWindow* win) -{ - bool needMore = FALSE; - - wxIdleEvent event; - event.SetEventObject(win); - win->ProcessEvent(event); - - if (event.MoreRequested()) - needMore = TRUE; - - wxNode* node = win->GetChildren()->First(); - while (node) - { - wxWindow* win = (wxWindow*) node->Data(); - if (SendIdleEvents(win)) - needMore = TRUE; - - node = node->Next(); - } - return needMore ; -} - -void wxApp::DeletePendingObjects() -{ - wxNode *node = wxPendingDelete.First(); - while (node) - { - wxObject *obj = (wxObject *)node->Data(); - - delete obj; - - if (wxPendingDelete.Member(obj)) - delete node; - - // Deleting one object may have deleted other pending - // objects, so start from beginning of list again. - node = wxPendingDelete.First(); - } -} - -wxLog* wxApp::CreateLogTarget() -{ - return new wxLogGui; -} - -wxWindow* wxApp::GetTopWindow() const -{ - if (m_topWindow) - return m_topWindow; - else if (wxTopLevelWindows.Number() > 0) - return (wxWindow*) wxTopLevelWindows.First()->Data(); - else - return NULL; -} - -void wxExit() -{ - wxApp::CommonCleanUp(); -/* - * TODO: Exit in some platform-specific way. Not recommended that the app calls this: - * only for emergencies. - */ -} - -// Yield to other processes -bool wxYield() -{ - /* - * TODO - */ - return TRUE; -} - diff --git a/src/qt/bdiag.xbm b/src/qt/bdiag.xbm deleted file mode 100644 index 9ff0a1822f..0000000000 --- a/src/qt/bdiag.xbm +++ /dev/null @@ -1,6 +0,0 @@ -#define bdiag_width 16 -#define bdiag_height 16 -static char bdiag_bits[] = { - 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x04, - 0x02, 0x02, 0x01, 0x01, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, - 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01}; diff --git a/src/qt/bitmap.cpp b/src/qt/bitmap.cpp deleted file mode 100644 index 1e6255f551..0000000000 --- a/src/qt/bitmap.cpp +++ /dev/null @@ -1,430 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bitmap.cpp -// Purpose: wxBitmap -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "bitmap.h" -#endif - -#include "wx/setup.h" -#include "wx/utils.h" -#include "wx/palette.h" -#include "wx/bitmap.h" -#include "wx/icon.h" -#include "wx/log.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject) -IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject) -#endif - -wxBitmapRefData::wxBitmapRefData() -{ - m_ok = FALSE; - m_width = 0; - m_height = 0; - m_depth = 0; - m_quality = 0; - m_numColors = 0; - m_bitmapMask = NULL; -} - -wxBitmapRefData::~wxBitmapRefData() -{ - /* - * TODO: delete the bitmap data here. - */ - - if (m_bitmapMask) - delete m_bitmapMask; - m_bitmapMask = NULL; -} - -wxList wxBitmap::sm_handlers; - -wxBitmap::wxBitmap() -{ - m_refData = NULL; - - if ( wxTheBitmapList ) - wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::~wxBitmap() -{ - if (wxTheBitmapList) - wxTheBitmapList->DeleteObject(this); -} - -wxBitmap::wxBitmap(const char bits[], int the_width, int the_height, int no_bits) -{ - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_width = the_width ; - M_BITMAPDATA->m_height = the_height ; - M_BITMAPDATA->m_depth = no_bits ; - M_BITMAPDATA->m_numColors = 0; - - /* TODO: create the bitmap from data */ - - if ( wxTheBitmapList ) - wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::wxBitmap(int w, int h, int d) -{ - (void)Create(w, h, d); - - if ( wxTheBitmapList ) - wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::wxBitmap(void *data, long type, int width, int height, int depth) -{ - (void) Create(data, type, width, height, depth); - - if ( wxTheBitmapList ) - wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::wxBitmap(const wxString& filename, long type) -{ - LoadFile(filename, (int)type); - - if ( wxTheBitmapList ) - wxTheBitmapList->AddBitmap(this); -} - -/* TODO: maybe allow creation from XPM -// Create from data -wxBitmap::wxBitmap(const char **data) -{ - (void) Create((void *)data, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0); -} -*/ - -bool wxBitmap::Create(int w, int h, int d) -{ - UnRef(); - - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_width = w; - M_BITMAPDATA->m_height = h; - M_BITMAPDATA->m_depth = d; - - /* TODO: create new bitmap */ - - return M_BITMAPDATA->m_ok; -} - -bool wxBitmap::LoadFile(const wxString& filename, long type) -{ - UnRef(); - - m_refData = new wxBitmapRefData; - - wxBitmapHandler *handler = FindHandler(type); - - if ( handler == NULL ) { - wxLogWarning("no bitmap handler for type %d defined.", type); - - return FALSE; - } - - return handler->LoadFile(this, filename, type, -1, -1); -} - -bool wxBitmap::Create(void *data, long type, int width, int height, int depth) -{ - UnRef(); - - m_refData = new wxBitmapRefData; - - wxBitmapHandler *handler = FindHandler(type); - - if ( handler == NULL ) { - wxLogWarning("no bitmap handler for type %d defined.", type); - - return FALSE; - } - - return handler->Create(this, data, type, width, height, depth); -} - -bool wxBitmap::SaveFile(const wxString& filename, int type, const wxPalette *palette) -{ - wxBitmapHandler *handler = FindHandler(type); - - if ( handler == NULL ) { - wxLogWarning("no bitmap handler for type %d defined.", type); - - return FALSE; - } - - return handler->SaveFile(this, filename, type, palette); -} - -void wxBitmap::SetWidth(int w) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_width = w; -} - -void wxBitmap::SetHeight(int h) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_height = h; -} - -void wxBitmap::SetDepth(int d) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_depth = d; -} - -void wxBitmap::SetQuality(int q) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_quality = q; -} - -void wxBitmap::SetOk(bool isOk) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_ok = isOk; -} - -void wxBitmap::SetPalette(const wxPalette& palette) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_bitmapPalette = palette ; -} - -void wxBitmap::SetMask(wxMask *mask) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_bitmapMask = mask ; -} - -void wxBitmap::AddHandler(wxBitmapHandler *handler) -{ - sm_handlers.Append(handler); -} - -void wxBitmap::InsertHandler(wxBitmapHandler *handler) -{ - sm_handlers.Insert(handler); -} - -bool wxBitmap::RemoveHandler(const wxString& name) -{ - wxBitmapHandler *handler = FindHandler(name); - if ( handler ) - { - sm_handlers.DeleteObject(handler); - return TRUE; - } - else - return FALSE; -} - -wxBitmapHandler *wxBitmap::FindHandler(const wxString& name) -{ - wxNode *node = sm_handlers.First(); - while ( node ) - { - wxBitmapHandler *handler = (wxBitmapHandler *)node->Data(); - if ( handler->GetName() == name ) - return handler; - node = node->Next(); - } - return NULL; -} - -wxBitmapHandler *wxBitmap::FindHandler(const wxString& extension, long bitmapType) -{ - wxNode *node = sm_handlers.First(); - while ( node ) - { - wxBitmapHandler *handler = (wxBitmapHandler *)node->Data(); - if ( handler->GetExtension() == extension && - (bitmapType == -1 || handler->GetType() == bitmapType) ) - return handler; - node = node->Next(); - } - return NULL; -} - -wxBitmapHandler *wxBitmap::FindHandler(long bitmapType) -{ - wxNode *node = sm_handlers.First(); - while ( node ) - { - wxBitmapHandler *handler = (wxBitmapHandler *)node->Data(); - if (handler->GetType() == bitmapType) - return handler; - node = node->Next(); - } - return NULL; -} - -/* - * wxMask - */ - -wxMask::wxMask() -{ -/* TODO - m_maskBitmap = 0; -*/ -} - -// Construct a mask from a bitmap and a colour indicating -// the transparent area -wxMask::wxMask(const wxBitmap& bitmap, const wxColour& colour) -{ -/* TODO - m_maskBitmap = 0; -*/ - Create(bitmap, colour); -} - -// Construct a mask from a bitmap and a palette index indicating -// the transparent area -wxMask::wxMask(const wxBitmap& bitmap, int paletteIndex) -{ -/* TODO - m_maskBitmap = 0; -*/ - - Create(bitmap, paletteIndex); -} - -// Construct a mask from a mono bitmap (copies the bitmap). -wxMask::wxMask(const wxBitmap& bitmap) -{ -/* TODO - m_maskBitmap = 0; -*/ - - Create(bitmap); -} - -wxMask::~wxMask() -{ -// TODO: delete mask bitmap -} - -// Create a mask from a mono bitmap (copies the bitmap). -bool wxMask::Create(const wxBitmap& bitmap) -{ -// TODO - return FALSE; -} - -// Create a mask from a bitmap and a palette index indicating -// the transparent area -bool wxMask::Create(const wxBitmap& bitmap, int paletteIndex) -{ -// TODO - return FALSE; -} - -// Create a mask from a bitmap and a colour indicating -// the transparent area -bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) -{ -// TODO - return FALSE; -} - -/* - * wxBitmapHandler - */ - -IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject) - -bool wxBitmapHandler::Create(wxBitmap *bitmap, void *data, long type, int width, int height, int depth) -{ - return FALSE; -} - -bool wxBitmapHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long type, - int desiredWidth, int desiredHeight) -{ - return FALSE; -} - -bool wxBitmapHandler::SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette) -{ - return FALSE; -} - -/* - * Standard handlers - */ - -/* TODO: bitmap handlers, a bit like this: -class WXDLLEXPORT wxBMPResourceHandler: public wxBitmapHandler -{ - DECLARE_DYNAMIC_CLASS(wxBMPResourceHandler) -public: - inline wxBMPResourceHandler() - { - m_name = "Windows bitmap resource"; - m_extension = ""; - m_type = wxBITMAP_TYPE_BMP_RESOURCE; - }; - - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth, int desiredHeight); -}; -IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler, wxBitmapHandler) -*/ - -void wxBitmap::CleanUpHandlers() -{ - wxNode *node = sm_handlers.First(); - while ( node ) - { - wxBitmapHandler *handler = (wxBitmapHandler *)node->Data(); - wxNode *next = node->Next(); - delete handler; - delete node; - node = next; - } -} - -void wxBitmap::InitStandardHandlers() -{ -/* TODO: initialize all standard bitmap or derive class handlers here. - AddHandler(new wxBMPResourceHandler); - AddHandler(new wxBMPFileHandler); - AddHandler(new wxXPMFileHandler); - AddHandler(new wxXPMDataHandler); - AddHandler(new wxICOResourceHandler); - AddHandler(new wxICOFileHandler); -*/ -} diff --git a/src/qt/bmpbuttn.cpp b/src/qt/bmpbuttn.cpp deleted file mode 100644 index 9e46c22b2b..0000000000 --- a/src/qt/bmpbuttn.cpp +++ /dev/null @@ -1,65 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bmpbuttn.cpp -// Purpose: wxBitmapButton -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "bmpbuttn.h" -#endif - -#include "wx/bmpbuttn.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton) -#endif - -bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - m_buttonBitmap = bitmap; - SetName(name); - SetValidator(validator); - parent->AddChild(this); - - m_backgroundColour = parent->GetDefaultBackgroundColour() ; - m_foregroundColour = parent->GetDefaultForegroundColour() ; - m_windowStyle = style; - m_marginX = 0; - m_marginY = 0; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - if (id == -1) - m_windowId = NewControlId(); - else - m_windowId = id; - - if ( width == -1 && bitmap.Ok()) - width = bitmap.GetWidth() + 2*m_marginX; - - if ( height == -1 && bitmap.Ok()) - height = bitmap.GetHeight() + 2*m_marginY; - - /* TODO: create bitmap button - */ - - return FALSE; -} - -void wxBitmapButton::SetBitmapLabel(const wxBitmap& bitmap) -{ - m_buttonBitmap = bitmap; -} - diff --git a/src/qt/brush.cpp b/src/qt/brush.cpp deleted file mode 100644 index 72c12935ff..0000000000 --- a/src/qt/brush.cpp +++ /dev/null @@ -1,162 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: brush.cpp -// Purpose: wxBrush -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "brush.h" -#endif - -#include "wx/setup.h" -#include "wx/utils.h" -#include "wx/brush.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject) -#endif - -wxBrushRefData::wxBrushRefData() -{ - m_style = wxSOLID; -// TODO: null data -} - -wxBrushRefData::wxBrushRefData(const wxBrushRefData& data) -{ - m_style = data.m_style; - m_stipple = data.m_stipple; - m_colour = data.m_colour; -/* TODO: null data - m_hBrush = 0; -*/ -} - -wxBrushRefData::~wxBrushRefData() -{ -// TODO: delete data -} - -// Brushes -wxBrush::wxBrush() -{ - if ( wxTheBrushList ) - wxTheBrushList->AddBrush(this); -} - -wxBrush::~wxBrush() -{ - if ( wxTheBrushList ) - wxTheBrushList->RemoveBrush(this); -} - -wxBrush::wxBrush(const wxColour& col, int Style) -{ - m_refData = new wxBrushRefData; - - M_BRUSHDATA->m_colour = col; - M_BRUSHDATA->m_style = Style; - - RealizeResource(); - - if ( wxTheBrushList ) - wxTheBrushList->AddBrush(this); -} - -wxBrush::wxBrush(const wxString& col, int Style) -{ - m_refData = new wxBrushRefData; - - // Implicit conversion from string to wxColour via colour database - M_BRUSHDATA->m_colour = col; - M_BRUSHDATA->m_style = Style; - - RealizeResource(); - - if ( wxTheBrushList ) - wxTheBrushList->AddBrush(this); -} - -wxBrush::wxBrush(const wxBitmap& stipple) -{ - m_refData = new wxBrushRefData; - - M_BRUSHDATA->m_style = wxSTIPPLE; - M_BRUSHDATA->m_stipple = stipple; - - RealizeResource(); - - if ( wxTheBrushList ) - wxTheBrushList->AddBrush(this); -} - -void wxBrush::Unshare() -{ - // Don't change shared data - if (!m_refData) - { - m_refData = new wxBrushRefData(); - } - else - { - wxBrushRefData* ref = new wxBrushRefData(*(wxBrushRefData*)m_refData); - UnRef(); - m_refData = ref; - } -} - -void wxBrush::SetColour(const wxColour& col) -{ - Unshare(); - - M_BRUSHDATA->m_colour = col; - - RealizeResource(); -} - -void wxBrush::SetColour(const wxString& col) -{ - Unshare(); - - M_BRUSHDATA->m_colour = col; - - RealizeResource(); -} - -void wxBrush::SetColour(const unsigned char r, const unsigned char g, const unsigned char b) -{ - Unshare(); - - M_BRUSHDATA->m_colour.Set(r, g, b); - - RealizeResource(); -} - -void wxBrush::SetStyle(int Style) -{ - Unshare(); - - M_BRUSHDATA->m_style = Style; - - RealizeResource(); -} - -void wxBrush::SetStipple(const wxBitmap& Stipple) -{ - Unshare(); - - M_BRUSHDATA->m_stipple = Stipple; - - RealizeResource(); -} - -void wxBrush::RealizeResource() -{ -// TODO: create the brush -} - diff --git a/src/qt/button.cpp b/src/qt/button.cpp deleted file mode 100644 index befd0d7156..0000000000 --- a/src/qt/button.cpp +++ /dev/null @@ -1,75 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: button.cpp -// Purpose: wxButton -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "button.h" -#endif - -#include "wx/button.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) -#endif - -// Button - -bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - m_windowStyle = style; - - parent->AddChild((wxButton *)this); - - if (id == -1) - m_windowId = NewControlId(); - else - m_windowId = id; - - // TODO: create button - - return FALSE; -} - -void wxButton::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -void wxButton::SetDefault() -{ - wxWindow *parent = (wxWindow *)GetParent(); - if (parent) - parent->SetDefaultItem(this); - - // TODO: make button the default -} - -wxString wxButton::GetLabel() const -{ - // TODO - return wxString(""); -} - -void wxButton::SetLabel(const wxString& label) -{ - // TODO -} - -void wxButton::Command (wxCommandEvent & event) -{ - ProcessCommand (event); -} - diff --git a/src/qt/cdiag.xbm b/src/qt/cdiag.xbm deleted file mode 100644 index 15dc7ba86d..0000000000 --- a/src/qt/cdiag.xbm +++ /dev/null @@ -1,6 +0,0 @@ -#define cdiag_width 16 -#define cdiag_height 16 -static char cdiag_bits[] = { - 0x81, 0x81, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, 0x18, 0x18, 0x24, 0x24, - 0x42, 0x42, 0x81, 0x81, 0x81, 0x81, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, - 0x18, 0x18, 0x24, 0x24, 0x42, 0x42, 0x81, 0x81}; diff --git a/src/qt/checkbox.cpp b/src/qt/checkbox.cpp deleted file mode 100644 index dd2e2abe7a..0000000000 --- a/src/qt/checkbox.cpp +++ /dev/null @@ -1,117 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: checkbox.cpp -// Purpose: wxCheckBox -// Author: AUTHOR -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "checkbox.h" -#endif - -#include "wx/checkbox.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox) -#endif - -// Single check box item -bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - m_windowStyle = style; - - if (parent) parent->AddChild(this); - - if ( id == -1 ) - m_windowId = NewControlId(); - else - m_windowId = id; - - // TODO: create checkbox - - return FALSE; -} - -void wxCheckBox::SetLabel(const wxString& label) -{ - // TODO -} - -void wxCheckBox::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -void wxCheckBox::SetValue(bool val) -{ - // TODO -} - -bool wxCheckBox::GetValue() const -{ - // TODO - return FALSE; -} - -void wxCheckBox::Command (wxCommandEvent & event) -{ - SetValue ((event.GetInt() != 0)); - ProcessCommand (event); -} - -// Bitmap checkbox -bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *label, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - m_windowStyle = style; - - if (parent) parent->AddChild(this); - - if ( id == -1 ) - m_windowId = NewControlId(); - else - m_windowId = id; - - // TODO: Create the bitmap checkbox - - return FALSE; -} - -void wxBitmapCheckBox::SetLabel(const wxBitmap *bitmap) -{ - // TODO -} - -void wxBitmapCheckBox::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -void wxBitmapCheckBox::SetValue(bool val) -{ - // TODO -} - -bool wxBitmapCheckBox::GetValue() const -{ - // TODOD - return FALSE; -} - - diff --git a/src/qt/choice.cpp b/src/qt/choice.cpp deleted file mode 100644 index a584d5303f..0000000000 --- a/src/qt/choice.cpp +++ /dev/null @@ -1,119 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: choice.cpp -// Purpose: wxChoice -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "choice.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/choice.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl) -#endif - -bool wxChoice::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, - const wxSize& size, - int n, const wxString choices[], - long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - m_noStrings = n; - m_windowStyle = style; - - if (parent) parent->AddChild(this); - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - // TODO: create choice control - return FALSE; -} - -void wxChoice::Append(const wxString& item) -{ - // TODO - m_noStrings ++; -} - -void wxChoice::Delete(int n) -{ - // TODO - m_noStrings --; -} - -void wxChoice::Clear() -{ - // TODO - m_noStrings = 0; -} - -int wxChoice::GetSelection() const -{ - // TODO - return 0; -} - -void wxChoice::SetSelection(int n) -{ - // TODO -} - -int wxChoice::FindString(const wxString& s) const -{ - // TODO - return 0; -} - -wxString wxChoice::GetString(int n) const -{ - // TODO - return wxString(""); -} - -void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -wxString wxChoice::GetStringSelection () const -{ - int sel = GetSelection (); - if (sel > -1) - return wxString(this->GetString (sel)); - else - return wxString(""); -} - -bool wxChoice::SetStringSelection (const wxString& s) -{ - int sel = FindString (s); - if (sel > -1) - { - SetSelection (sel); - return TRUE; - } - else - return FALSE; -} - -void wxChoice::Command(wxCommandEvent & event) -{ - SetSelection (event.GetInt()); - ProcessCommand (event); -} - diff --git a/src/qt/colour.cpp b/src/qt/colour.cpp deleted file mode 100644 index d342d516de..0000000000 --- a/src/qt/colour.cpp +++ /dev/null @@ -1,126 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: colour.cpp -// Purpose: wxColour class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "colour.h" -#endif - -#include "wx/gdicmn.h" -#include "wx/colour.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject) -#endif - -// Colour - -wxColour::wxColour () -{ - m_isInit = FALSE; - m_red = m_blue = m_green = 0; -/* TODO - m_pixel = 0; -*/ -} - -wxColour::wxColour (unsigned char r, unsigned char g, unsigned char b) -{ - m_red = r; - m_green = g; - m_blue = b; - m_isInit = TRUE; -/* TODO - m_pixel = PALETTERGB (m_red, m_green, m_blue); -*/ -} - -wxColour::wxColour (const wxColour& col) -{ - m_red = col.m_red; - m_green = col.m_green; - m_blue = col.m_blue; - m_isInit = col.m_isInit; -/* TODO - m_pixel = col.m_pixel; -*/ -} - -wxColour& wxColour::operator =(const wxColour& col) -{ - m_red = col.m_red; - m_green = col.m_green; - m_blue = col.m_blue; - m_isInit = col.m_isInit; -/* TODO - m_pixel = col.m_pixel; -*/ - return *this; -} - -wxColour::wxColour (const wxString& col) -{ - wxColour *the_colour = wxTheColourDatabase->FindColour (col); - if (the_colour) - { - m_red = the_colour->Red (); - m_green = the_colour->Green (); - m_blue = the_colour->Blue (); - m_isInit = TRUE; - } - else - { - m_red = 0; - m_green = 0; - m_blue = 0; - m_isInit = FALSE; - } -/* TODO - m_pixel = PALETTERGB (m_red, m_green, m_blue); -*/ -} - -wxColour::~wxColour () -{ -} - -wxColour& wxColour::operator = (const wxString& col) -{ - wxColour *the_colour = wxTheColourDatabase->FindColour (col); - if (the_colour) - { - m_red = the_colour->Red (); - m_green = the_colour->Green (); - m_blue = the_colour->Blue (); - m_isInit = TRUE; - } - else - { - m_red = 0; - m_green = 0; - m_blue = 0; - m_isInit = FALSE; - } -/* TODO - m_pixel = PALETTERGB (m_red, m_green, m_blue); -*/ - return (*this); -} - -void wxColour::Set (unsigned char r, unsigned char g, unsigned char b) -{ - m_red = r; - m_green = g; - m_blue = b; - m_isInit = TRUE; -/* TODO - m_pixel = PALETTERGB (m_red, m_green, m_blue); -*/ -} diff --git a/src/qt/combobox.cpp b/src/qt/combobox.cpp deleted file mode 100644 index f1bbccaeb0..0000000000 --- a/src/qt/combobox.cpp +++ /dev/null @@ -1,116 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: combobox.cpp -// Purpose: wxComboBox class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "combobox.h" -#endif - -#include "wx/combobox.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl) -#endif - -bool wxComboBox::Create(wxWindow *parent, wxWindowID id, - const wxString& value, - const wxPoint& pos, - const wxSize& size, - int n, const wxString choices[], - long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - m_noStrings = n; - m_windowStyle = style; - - if (parent) parent->AddChild(this); - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - // TODO: create combobox control - - return TRUE; -} - -wxString wxComboBox::GetValue() const -{ - // TODO - return wxString(""); -} - -void wxComboBox::SetValue(const wxString& value) -{ - // TODO -} - -// Clipboard operations -void wxComboBox::Copy() -{ - // TODO -} - -void wxComboBox::Cut() -{ - // TODO -} - -void wxComboBox::Paste() -{ - // TODO -} - -void wxComboBox::SetEditable(bool editable) -{ - // TODO -} - -void wxComboBox::SetInsertionPoint(long pos) -{ - // TODO -} - -void wxComboBox::SetInsertionPointEnd() -{ - // TODO -} - -long wxComboBox::GetInsertionPoint() const -{ - // TODO - return 0; -} - -long wxComboBox::GetLastPosition() const -{ - // TODO - return 0; -} - -void wxComboBox::Replace(long from, long to, const wxString& value) -{ - // TODO -} - -void wxComboBox::Remove(long from, long to) -{ - // TODO -} - -void wxComboBox::SetSelection(long from, long to) -{ - // TODO -} - diff --git a/src/qt/control.cpp b/src/qt/control.cpp deleted file mode 100644 index 651b272953..0000000000 --- a/src/qt/control.cpp +++ /dev/null @@ -1,111 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: control.cpp -// Purpose: wxControl class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "control.h" -#endif - -#include "wx/control.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow) - -BEGIN_EVENT_TABLE(wxControl, wxWindow) -END_EVENT_TABLE() -#endif - -// Item members -wxControl::wxControl() -{ - m_backgroundColour = *wxWHITE; - m_foregroundColour = *wxBLACK; - m_callback = 0; -} - -wxControl::~wxControl() -{ - // If we delete an item, we should initialize the parent panel, - // because it could now be invalid. - wxWindow *parent = (wxWindow *)GetParent(); - if (parent) - { - if (parent->GetDefaultItem() == this) - parent->SetDefaultItem(NULL); - } -} - -void wxControl::SetLabel(const wxString& label) -{ - // TODO -} - -wxString wxControl::GetLabel() const -{ - // TODO - return wxString(""); -} - -/* - * Allocates control IDs within the appropriate range - */ - -int NewControlId() -{ - static int s_controlId = 0; - s_controlId ++; - return s_controlId; -} - -void wxControl::ProcessCommand (wxCommandEvent & event) -{ - // Tries: - // 1) A callback function (to become obsolete) - // 2) OnCommand, starting at this window and working up parent hierarchy - // 3) OnCommand then calls ProcessEvent to search the event tables. - if (m_callback) - { - (void) (*(m_callback)) (*this, event); - } - else - { - GetEventHandler()->OnCommand(*this, event); - } -} - -void wxControl::SetClientSize (int width, int height) -{ - SetSize (-1, -1, width, height); -} - -void wxControl::Centre (int direction) -{ - int x, y, width, height, panel_width, panel_height, new_x, new_y; - - wxWindow *parent = (wxWindow *) GetParent (); - if (!parent) - return; - - parent->GetClientSize (&panel_width, &panel_height); - GetSize (&width, &height); - GetPosition (&x, &y); - - new_x = x; - new_y = y; - - if (direction & wxHORIZONTAL) - new_x = (int) ((panel_width - width) / 2); - - if (direction & wxVERTICAL) - new_y = (int) ((panel_height - height) / 2); - - SetSize (new_x, new_y, width, height); -} - diff --git a/src/qt/cross.xbm b/src/qt/cross.xbm deleted file mode 100644 index b07cbe7fcd..0000000000 --- a/src/qt/cross.xbm +++ /dev/null @@ -1,6 +0,0 @@ -#define cross_width 15 -#define cross_height 15 -static char cross_bits[] = { - 0x84, 0x10, 0x84, 0x10, 0xff, 0x7f, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, - 0x84, 0x10, 0xff, 0x7f, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, - 0xff, 0x7f, 0x84, 0x10, 0x84, 0x10}; diff --git a/src/qt/cursor.cpp b/src/qt/cursor.cpp deleted file mode 100644 index c856f5e9e0..0000000000 --- a/src/qt/cursor.cpp +++ /dev/null @@ -1,186 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: cursor.cpp -// Purpose: wxCursor class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "cursor.h" -#endif - -#include "wx/cursor.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxBitmap) -#endif - -wxCursorRefData::wxCursorRefData() -{ - m_width = 32; m_height = 32; - -/* TODO - m_hCursor = 0 ; -*/ -} - -wxCursorRefData::~wxCursorRefData() -{ - // TODO: destroy cursor -} - -// Cursors -wxCursor::wxCursor() -{ -} - -wxCursor::wxCursor(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSED(height), - int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY), const char WXUNUSED(maskBits)[]) -{ -} - -wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int hotSpotY) -{ - m_refData = new wxIconRefData; - - // TODO: create cursor from a file -} - -// Cursors by stock number -wxCursor::wxCursor(int cursor_type) -{ - m_refData = new wxIconRefData; - -/* TODO - switch (cursor_type) - { - case wxCURSOR_WAIT: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_WAIT); - break; - case wxCURSOR_IBEAM: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_IBEAM); - break; - case wxCURSOR_CROSS: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_CROSS); - break; - case wxCURSOR_SIZENWSE: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_SIZENWSE); - break; - case wxCURSOR_SIZENESW: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_SIZENESW); - break; - case wxCURSOR_SIZEWE: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_SIZEWE); - break; - case wxCURSOR_SIZENS: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_SIZENS); - break; - case wxCURSOR_CHAR: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_ARROW); - break; - } - case wxCURSOR_HAND: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_HAND"); - break; - } - case wxCURSOR_BULLSEYE: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_BULLSEYE"); - break; - } - case wxCURSOR_PENCIL: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_PENCIL"); - break; - } - case wxCURSOR_MAGNIFIER: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_MAGNIFIER"); - break; - } - case wxCURSOR_NO_ENTRY: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_NO_ENTRY"); - break; - } - case wxCURSOR_LEFT_BUTTON: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_ARROW); - break; - } - case wxCURSOR_RIGHT_BUTTON: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_ARROW); - break; - } - case wxCURSOR_MIDDLE_BUTTON: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_ARROW); - break; - } - case wxCURSOR_SIZING: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_SIZING"); - break; - } - case wxCURSOR_WATCH: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_WATCH"); - break; - } - case wxCURSOR_SPRAYCAN: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_ROLLER"); - break; - } - case wxCURSOR_PAINT_BRUSH: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_PBRUSH"); - break; - } - case wxCURSOR_POINT_LEFT: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_PLEFT"); - break; - } - case wxCURSOR_POINT_RIGHT: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_PRIGHT"); - break; - } - case wxCURSOR_QUESTION_ARROW: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_QARROW"); - break; - } - case wxCURSOR_BLANK: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_BLANK"); - break; - } - default: - case wxCURSOR_ARROW: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_ARROW); - break; - } -*/ - -} - -wxCursor::~wxCursor() -{ -} - -// Global cursor setting -void wxSetCursor(const wxCursor& cursor) -{ - // TODO (optional on platforms with no global cursor) -} - - diff --git a/src/qt/data.cpp b/src/qt/data.cpp deleted file mode 100644 index d706f82334..0000000000 --- a/src/qt/data.cpp +++ /dev/null @@ -1,145 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: data.cpp -// Purpose: Various data -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#endif - -#include "wx/wx.h" - -#define _MAXPATHLEN 500 - -// Useful buffer, initialized in CommonInit -char *wxBuffer = NULL; - -// Windows List -wxList wxTopLevelWindows; - -// List of windows pending deletion -wxList wxPendingDelete; - -int wxPageNumber; - -// GDI Object Lists -wxBrushList *wxTheBrushList = NULL; -wxPenList *wxThePenList = NULL; -wxFontList *wxTheFontList = NULL; -wxBitmapList *wxTheBitmapList = NULL; - -wxColourDatabase *wxTheColourDatabase = NULL; - -// Stock objects -wxFont *wxNORMAL_FONT; -wxFont *wxSMALL_FONT; -wxFont *wxITALIC_FONT; -wxFont *wxSWISS_FONT; -wxPen *wxRED_PEN; - -wxPen *wxCYAN_PEN; -wxPen *wxGREEN_PEN; -wxPen *wxBLACK_PEN; -wxPen *wxWHITE_PEN; -wxPen *wxTRANSPARENT_PEN; -wxPen *wxBLACK_DASHED_PEN; -wxPen *wxGREY_PEN; -wxPen *wxMEDIUM_GREY_PEN; -wxPen *wxLIGHT_GREY_PEN; - -wxBrush *wxBLUE_BRUSH; -wxBrush *wxGREEN_BRUSH; -wxBrush *wxWHITE_BRUSH; -wxBrush *wxBLACK_BRUSH; -wxBrush *wxTRANSPARENT_BRUSH; -wxBrush *wxCYAN_BRUSH; -wxBrush *wxRED_BRUSH; -wxBrush *wxGREY_BRUSH; -wxBrush *wxMEDIUM_GREY_BRUSH; -wxBrush *wxLIGHT_GREY_BRUSH; - -wxColour *wxBLACK; -wxColour *wxWHITE; -wxColour *wxRED; -wxColour *wxBLUE; -wxColour *wxGREEN; -wxColour *wxCYAN; -wxColour *wxLIGHT_GREY; - -wxCursor *wxSTANDARD_CURSOR = NULL; -wxCursor *wxHOURGLASS_CURSOR = NULL; -wxCursor *wxCROSS_CURSOR = NULL; - -// 'Null' objects -wxAcceleratorTable wxNullAcceleratorTable; -wxBitmap wxNullBitmap; -wxIcon wxNullIcon; -wxCursor wxNullCursor; -wxPen wxNullPen; -wxBrush wxNullBrush; -wxPalette wxNullPalette; -wxFont wxNullFont; -wxColour wxNullColour; - -// Default window names -const char *wxButtonNameStr = "button"; -const char *wxCanvasNameStr = "canvas"; -const char *wxCheckBoxNameStr = "check"; -const char *wxChoiceNameStr = "choice"; -const char *wxComboBoxNameStr = "comboBox"; -const char *wxDialogNameStr = "dialog"; -const char *wxFrameNameStr = "frame"; -const char *wxGaugeNameStr = "gauge"; -const char *wxStaticBoxNameStr = "groupBox"; -const char *wxListBoxNameStr = "listBox"; -const char *wxStaticTextNameStr = "message"; -const char *wxStaticBitmapNameStr = "message"; -const char *wxMultiTextNameStr = "multitext"; -const char *wxPanelNameStr = "panel"; -const char *wxRadioBoxNameStr = "radioBox"; -const char *wxRadioButtonNameStr = "radioButton"; -const char *wxBitmapRadioButtonNameStr = "radioButton"; -const char *wxScrollBarNameStr = "scrollBar"; -const char *wxSliderNameStr = "slider"; -const char *wxStaticNameStr = "static"; -const char *wxTextCtrlWindowNameStr = "textWindow"; -const char *wxTextCtrlNameStr = "text"; -const char *wxVirtListBoxNameStr = "virtListBox"; -const char *wxButtonBarNameStr = "buttonbar"; -const char *wxEnhDialogNameStr = "Shell"; -const char *wxToolBarNameStr = "toolbar"; -const char *wxStatusLineNameStr = "status_line"; -const char *wxEmptyString = ""; -const char *wxGetTextFromUserPromptStr = "Input Text"; -const char *wxMessageBoxCaptionStr = "Message"; -const char *wxFileSelectorPromptStr = "Select a file"; -const char *wxFileSelectorDefaultWildcardStr = "*.*"; -const char *wxInternalErrorStr = "wxWindows Internal Error"; -const char *wxFatalErrorStr = "wxWindows Fatal Error"; - -// See wx/utils.h -const char *wxFloatToStringStr = "%.2f"; -const char *wxDoubleToStringStr = "%.2f"; - -#if USE_POSTSCRIPT -wxPrintPaperDatabase* wxThePrintPaperDatabase = NULL; -#endif - -///// Event tables (also must be in one, statically-linked file for shared libraries) - -// This is the base, wxEvtHandler 'bootstrap' code which is expanded manually here -const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable; } - -const wxEventTable wxEvtHandler::sm_eventTable = - { NULL, &wxEvtHandler::sm_eventTableEntries[0] }; - -const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, NULL } }; - -const wxSize wxDefaultSize(-1, -1); -const wxPoint wxDefaultPosition(-1, -1); diff --git a/src/qt/dc.cpp b/src/qt/dc.cpp deleted file mode 100644 index 4cfe7305cc..0000000000 --- a/src/qt/dc.cpp +++ /dev/null @@ -1,392 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dc.cpp -// Purpose: wxDC class -// Author: AUTHOR -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dc.h" -#endif - -#include "wx/dc.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) -#endif - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -#define mm2inches 0.0393700787402 -#define inches2mm 25.4 -#define mm2twips 56.6929133859 -#define twips2mm 0.0176388888889 -#define mm2pt 2.83464566929 -#define pt2mm 0.352777777778 - -//----------------------------------------------------------------------------- -// wxDC -//----------------------------------------------------------------------------- - -IMPLEMENT_ABSTRACT_CLASS(wxDC,wxObject) - -wxDC::wxDC(void) -{ - m_ok = FALSE; - m_optimize = FALSE; - m_autoSetting = FALSE; - m_colour = TRUE; - m_clipping = FALSE; - - m_mm_to_pix_x = 1.0; - m_mm_to_pix_y = 1.0; - - m_logicalOriginX = 0; - m_logicalOriginY = 0; - m_deviceOriginX = 0; - m_deviceOriginY = 0; - m_internalDeviceOriginX = 0; - m_internalDeviceOriginY = 0; - m_externalDeviceOriginX = 0; - m_externalDeviceOriginY = 0; - - m_logicalScaleX = 1.0; - m_logicalScaleY = 1.0; - m_userScaleX = 1.0; - m_userScaleY = 1.0; - m_scaleX = 1.0; - m_scaleY = 1.0; - - m_mappingMode = MM_TEXT; - m_needComputeScaleX = FALSE; - m_needComputeScaleY = FALSE; - - m_signX = 1; // default x-axis left to right - m_signY = 1; // default y-axis top down - - m_maxX = m_maxY = -100000; - m_minY = m_minY = 100000; - - m_logicalFunction = wxCOPY; -// m_textAlignment = wxALIGN_TOP_LEFT; - m_backgroundMode = wxTRANSPARENT; - - m_textForegroundColour = *wxBLACK; - m_textBackgroundColour = *wxWHITE; - m_pen = *wxBLACK_PEN; - m_font = *wxNORMAL_FONT; - m_brush = *wxTRANSPARENT_BRUSH; - m_backgroundBrush = *wxWHITE_BRUSH; - -// m_palette = wxAPP_COLOURMAP; -}; - -wxDC::~wxDC(void) -{ -}; - -void wxDC::DrawIcon( const wxIcon &WXUNUSED(icon), long WXUNUSED(x), long WXUNUSED(y), bool WXUNUSED(useMask) ) -{ -}; - -void wxDC::DrawPoint( wxPoint& point ) -{ - DrawPoint( point.x, point.y ); -}; - -void wxDC::DrawPolygon( wxList *list, long xoffset, long yoffset, int fillStyle ) -{ - int n = list->Number(); - wxPoint *points = new wxPoint[n]; - - int i = 0; - for( wxNode *node = list->First(); node; node = node->Next() ) - { - wxPoint *point = (wxPoint *)node->Data(); - points[i].x = point->x; - points[i++].y = point->y; - }; - DrawPolygon( n, points, xoffset, yoffset, fillStyle ); - delete[] points; -}; - -void wxDC::DrawLines( wxList *list, long xoffset, long yoffset ) -{ - int n = list->Number(); - wxPoint *points = new wxPoint[n]; - - int i = 0; - for( wxNode *node = list->First(); node; node = node->Next() ) - { - wxPoint *point = (wxPoint *)node->Data(); - points[i].x = point->x; - points[i++].y = point->y; - }; - DrawLines( n, points, xoffset, yoffset ); - delete []points; -}; - -void wxDC::DrawSpline( long x1, long y1, long x2, long y2, long x3, long y3 ) -{ - wxList list; - list.Append( (wxObject*)new wxPoint(x1, y1) ); - list.Append( (wxObject*)new wxPoint(x2, y2) ); - list.Append( (wxObject*)new wxPoint(x3, y3) ); - DrawSpline(&list); - wxNode *node = list.First(); - while (node) - { - wxPoint *p = (wxPoint*)node->Data(); - delete p; - node = node->Next(); - }; -}; - -void wxDC::DrawSpline( wxList *points ) -{ - DrawOpenSpline( points ); -}; - -void wxDC::DrawSpline( int n, wxPoint points[] ) -{ - wxList list; - for (int i = 0; i < n; i++) list.Append( (wxObject*)&points[i] ); - DrawSpline( &list ); -}; - -void wxDC::SetClippingRegion( long x, long y, long width, long height ) -{ - m_clipping = TRUE; - m_clipX1 = x; - m_clipY1 = y; - m_clipX2 = x + width; - m_clipY2 = y + height; -}; - -void wxDC::DestroyClippingRegion(void) -{ - m_clipping = FALSE; -}; - -void wxDC::GetClippingBox( long *x, long *y, long *width, long *height ) const -{ - if (m_clipping) - { - if (x) *x = m_clipX1; - if (y) *y = m_clipY1; - if (width) *width = (m_clipX2 - m_clipX1); - if (height) *height = (m_clipY2 - m_clipY1); - } - else - *x = *y = *width = *height = 0; -}; - -void wxDC::GetSize( int* width, int* height ) const -{ - *width = m_maxX-m_minX; - *height = m_maxY-m_minY; -}; - -void wxDC::GetSizeMM( long* width, long* height ) const -{ - int w = 0; - int h = 0; - GetSize( &w, &h ); - *width = long( double(w) / (m_scaleX*m_mm_to_pix_x) ); - *height = long( double(h) / (m_scaleY*m_mm_to_pix_y) ); -}; - -void wxDC::SetTextForeground( const wxColour &col ) -{ - if (!Ok()) return; - m_textForegroundColour = col; -}; - -void wxDC::SetTextBackground( const wxColour &col ) -{ - if (!Ok()) return; - m_textBackgroundColour = col; -}; - -void wxDC::SetMapMode( int mode ) -{ - switch (mode) - { - case MM_TWIPS: - SetLogicalScale( twips2mm*m_mm_to_pix_x, twips2mm*m_mm_to_pix_y ); - break; - case MM_POINTS: - SetLogicalScale( pt2mm*m_mm_to_pix_x, pt2mm*m_mm_to_pix_y ); - break; - case MM_METRIC: - SetLogicalScale( m_mm_to_pix_x, m_mm_to_pix_y ); - break; - case MM_LOMETRIC: - SetLogicalScale( m_mm_to_pix_x/10.0, m_mm_to_pix_y/10.0 ); - break; - default: - case MM_TEXT: - SetLogicalScale( 1.0, 1.0 ); - break; - }; - if (mode != MM_TEXT) - { - m_needComputeScaleX = TRUE; - m_needComputeScaleY = TRUE; - }; -}; - -void wxDC::SetUserScale( double x, double y ) -{ - // allow negative ? -> no - m_userScaleX = x; - m_userScaleY = y; - ComputeScaleAndOrigin(); -}; - -void wxDC::GetUserScale( double *x, double *y ) -{ - if (x) *x = m_userScaleX; - if (y) *y = m_userScaleY; -}; - -void wxDC::SetLogicalScale( double x, double y ) -{ - // allow negative ? - m_logicalScaleX = x; - m_logicalScaleY = y; - ComputeScaleAndOrigin(); -}; - -void wxDC::GetLogicalScale( double *x, double *y ) -{ - if (x) *x = m_logicalScaleX; - if (y) *y = m_logicalScaleY; -}; - -void wxDC::SetLogicalOrigin( long x, long y ) -{ - m_logicalOriginX = x * m_signX; // is this still correct ? - m_logicalOriginY = y * m_signY; - ComputeScaleAndOrigin(); -}; - -void wxDC::GetLogicalOrigin( long *x, long *y ) -{ - if (x) *x = m_logicalOriginX; - if (y) *y = m_logicalOriginY; -}; - -void wxDC::SetDeviceOrigin( long x, long y ) -{ - m_externalDeviceOriginX = x; - m_externalDeviceOriginY = y; - ComputeScaleAndOrigin(); -}; - -void wxDC::GetDeviceOrigin( long *x, long *y ) -{ -// if (x) *x = m_externalDeviceOriginX; -// if (y) *y = m_externalDeviceOriginY; - if (x) *x = m_deviceOriginX; - if (y) *y = m_deviceOriginY; -}; - -void wxDC::SetInternalDeviceOrigin( long x, long y ) -{ - m_internalDeviceOriginX = x; - m_internalDeviceOriginY = y; - ComputeScaleAndOrigin(); -}; - -void wxDC::GetInternalDeviceOrigin( long *x, long *y ) -{ - if (x) *x = m_internalDeviceOriginX; - if (y) *y = m_internalDeviceOriginY; -}; - -void wxDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp ) -{ - m_signX = (xLeftRight ? 1 : -1); - m_signY = (yBottomUp ? -1 : 1); - ComputeScaleAndOrigin(); -}; - -long wxDC::DeviceToLogicalX(long x) const -{ - return XDEV2LOG(x); -}; - -long wxDC::DeviceToLogicalY(long y) const -{ - return YDEV2LOG(y); -}; - -long wxDC::DeviceToLogicalXRel(long x) const -{ - return XDEV2LOGREL(x); -}; - -long wxDC::DeviceToLogicalYRel(long y) const -{ - return YDEV2LOGREL(y); -}; - -long wxDC::LogicalToDeviceX(long x) const -{ - return XLOG2DEV(x); -}; - -long wxDC::LogicalToDeviceY(long y) const -{ - return YLOG2DEV(y); -}; - -long wxDC::LogicalToDeviceXRel(long x) const -{ - return XLOG2DEVREL(x); -}; - -long wxDC::LogicalToDeviceYRel(long y) const -{ - return YLOG2DEVREL(y); -}; - -void wxDC::CalcBoundingBox( long x, long y ) -{ - if (x < m_minX) m_minX = x; - if (y < m_minY) m_minY = y; - if (x > m_maxX) m_maxX = x; - if (y > m_maxY) m_maxY = y; -}; - -void wxDC::ComputeScaleAndOrigin(void) -{ - // CMB: copy scale to see if it changes - double origScaleX = m_scaleX; - double origScaleY = m_scaleY; - - m_scaleX = m_logicalScaleX * m_userScaleX; - m_scaleY = m_logicalScaleY * m_userScaleY; - - m_deviceOriginX = m_internalDeviceOriginX + m_externalDeviceOriginX; - m_deviceOriginY = m_internalDeviceOriginY + m_externalDeviceOriginY; - - // CMB: if scale has changed call SetPen to recalulate the line width - if (m_scaleX != origScaleX || m_scaleY != origScaleY) - { - // this is a bit artificial, but we need to force wxDC to think - // the pen has changed - wxPen* pen = GetPen(); - wxPen tempPen; - m_pen = tempPen; - SetPen(pen); - } -}; - diff --git a/src/qt/dcclient.cpp b/src/qt/dcclient.cpp deleted file mode 100644 index e25920d94f..0000000000 --- a/src/qt/dcclient.cpp +++ /dev/null @@ -1,620 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcclient.cpp -// Purpose: wxClientDC class -// Author: AUTHOR -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dcclient.h" -#endif - -#include "wx/dcclient.h" -#include "wx/dcmemory.h" -#include - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -#define RAD2DEG 57.2957795131 - -//----------------------------------------------------------------------------- -// wxPaintDC -//----------------------------------------------------------------------------- - -#if !USE_SHARED_LIBRARY -//IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxDC) -//IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxDC) -#endif - - -wxPaintDC::wxPaintDC(void) -{ -}; - -wxPaintDC::wxPaintDC( wxWindow *window ) -{ -}; - -wxPaintDC::~wxPaintDC(void) -{ -}; - -void wxPaintDC::FloodFill( long WXUNUSED(x1), long WXUNUSED(y1), - wxColour *WXUNUSED(col), int WXUNUSED(style) ) -{ -}; - -bool wxPaintDC::GetPixel( long WXUNUSED(x1), long WXUNUSED(y1), wxColour *WXUNUSED(col) ) const -{ - return FALSE; -}; - -void wxPaintDC::DrawLine( long x1, long y1, long x2, long y2 ) -{ - if (!Ok()) return; - -}; - -void wxPaintDC::CrossHair( long x, long y ) -{ - if (!Ok()) return; - -}; - -void wxPaintDC::DrawArc( long x1, long y1, long x2, long y2, double xc, double yc ) -{ - if (!Ok()) return; - - long xx1 = XLOG2DEV(x1); - long yy1 = YLOG2DEV(y1); - long xx2 = XLOG2DEV(x2); - long yy2 = YLOG2DEV(y2); - long xxc = XLOG2DEV((long)xc); - long yyc = YLOG2DEV((long)yc); - double dx = xx1 - xxc; - double dy = yy1 - yyc; - double radius = sqrt(dx*dx+dy*dy); - long r = (long)radius; - double radius1, radius2; - - if (xx1 == xx2 && yy1 == yy2) - { - radius1 = 0.0; - radius2 = 360.0; - } - else - if (radius == 0.0) - { - radius1 = radius2 = 0.0; - } - else - { - radius1 = (xx1 - xxc == 0) ? - (yy1 - yyc < 0) ? 90.0 : -90.0 : - -atan2(double(yy1-yyc), double(xx1-xxc)) * RAD2DEG; - radius2 = (xx2 - xxc == 0) ? - (yy2 - yyc < 0) ? 90.0 : -90.0 : - -atan2(double(yy2-yyc), double(xx2-xxc)) * RAD2DEG; - }; - long alpha1 = long(radius1 * 64.0); - long alpha2 = long((radius2 - radius1) * 64.0); - while (alpha2 <= 0) alpha2 += 360*64; - while (alpha1 > 360*64) alpha1 -= 360*64; - - if (m_brush.GetStyle() != wxTRANSPARENT) {}; - - if (m_pen.GetStyle() != wxTRANSPARENT) {}; - -}; - -void wxPaintDC::DrawEllipticArc( long x, long y, long width, long height, double sa, double ea ) -{ - if (!Ok()) return; - - long xx = XLOG2DEV(x); - long yy = YLOG2DEV(y); - long ww = m_signX * XLOG2DEVREL(width); - long hh = m_signY * YLOG2DEVREL(height); - - // CMB: handle -ve width and/or height - if (ww < 0) { ww = -ww; xx = xx - ww; } - if (hh < 0) { hh = -hh; yy = yy - hh; } - - long start = long(sa * 64.0); - long end = long(ea * 64.0); - if (m_brush.GetStyle() != wxTRANSPARENT) {}; - - if (m_pen.GetStyle() != wxTRANSPARENT) {}; -}; - -void wxPaintDC::DrawPoint( long x, long y ) -{ - if (!Ok()) return; - - if (m_pen.GetStyle() != wxTRANSPARENT) {}; -}; - -void wxPaintDC::DrawLines( int n, wxPoint points[], long xoffset, long yoffset ) -{ - if (!Ok()) return; - - if (m_pen.GetStyle() == wxTRANSPARENT) return; - - for (int i = 0; i < n-1; i++) - { - long x1 = XLOG2DEV(points[i].x + xoffset); - long x2 = XLOG2DEV(points[i+1].x + xoffset); - long y1 = YLOG2DEV(points[i].y + yoffset); // oh, what a waste - long y2 = YLOG2DEV(points[i+1].y + yoffset); - }; -}; - -void wxPaintDC::DrawLines( wxList *points, long xoffset, long yoffset ) -{ - if (!Ok()) return; - - if (m_pen.GetStyle() == wxTRANSPARENT) return; - - wxNode *node = points->First(); - while (node->Next()) - { - wxPoint *point = (wxPoint*)node->Data(); - wxPoint *npoint = (wxPoint*)node->Next()->Data(); - long x1 = XLOG2DEV(point->x + xoffset); - long x2 = XLOG2DEV(npoint->x + xoffset); - long y1 = YLOG2DEV(point->y + yoffset); // and again... - long y2 = YLOG2DEV(npoint->y + yoffset); - node = node->Next(); - }; -}; - -void wxPaintDC::DrawPolygon( int WXUNUSED(n), wxPoint WXUNUSED(points)[], - long WXUNUSED(xoffset), long WXUNUSED(yoffset), int WXUNUSED(fillStyle) ) -{ - if (!Ok()) return; -}; - -void wxPaintDC::DrawPolygon( wxList *WXUNUSED(lines), long WXUNUSED(xoffset), - long WXUNUSED(yoffset), int WXUNUSED(fillStyle) ) -{ - if (!Ok()) return; -}; - -void wxPaintDC::DrawRectangle( long x, long y, long width, long height ) -{ - if (!Ok()) return; - - long xx = XLOG2DEV(x); - long yy = YLOG2DEV(y); - long ww = m_signX * XLOG2DEVREL(width); - long hh = m_signY * YLOG2DEVREL(height); - - // CMB: draw nothing if transformed w or h is 0 - if (ww == 0 || hh == 0) return; - - // CMB: handle -ve width and/or height - if (ww < 0) { ww = -ww; xx = xx - ww; } - if (hh < 0) { hh = -hh; yy = yy - hh; } - - if (m_brush.GetStyle() != wxTRANSPARENT) {}; - - if (m_pen.GetStyle() != wxTRANSPARENT) {}; -}; - -void wxPaintDC::DrawRoundedRectangle( long x, long y, long width, long height, double radius ) -{ - if (!Ok()) return; - - if (radius < 0.0) radius = - radius * ((width < height) ? width : height); - - long xx = XLOG2DEV(x); - long yy = YLOG2DEV(y); - long ww = m_signX * XLOG2DEVREL(width); - long hh = m_signY * YLOG2DEVREL(height); - long rr = XLOG2DEVREL((long)radius); - - // CMB: handle -ve width and/or height - if (ww < 0) { ww = -ww; xx = xx - ww; } - if (hh < 0) { hh = -hh; yy = yy - hh; } - - // CMB: if radius is zero use DrawRectangle() instead to avoid - // X drawing errors with small radii - if (rr == 0) - { - DrawRectangle( x, y, width, height ); - return; - } - - // CMB: draw nothing if transformed w or h is 0 - if (ww == 0 || hh == 0) return; - - // CMB: adjust size if outline is drawn otherwise the result is - // 1 pixel too wide and high - if (m_pen.GetStyle() != wxTRANSPARENT) - { - ww--; - hh--; - } - - // CMB: ensure dd is not larger than rectangle otherwise we - // get an hour glass shape - long dd = 2 * rr; - if (dd > ww) dd = ww; - if (dd > hh) dd = hh; - rr = dd / 2; - - if (m_brush.GetStyle() != wxTRANSPARENT) - { - }; - - if (m_pen.GetStyle() != wxTRANSPARENT) - { - }; -}; - -void wxPaintDC::DrawEllipse( long x, long y, long width, long height ) -{ - if (!Ok()) return; - - long xx = XLOG2DEV(x); - long yy = YLOG2DEV(y); - long ww = m_signX * XLOG2DEVREL(width); - long hh = m_signY * YLOG2DEVREL(height); - - // CMB: handle -ve width and/or height - if (ww < 0) { ww = -ww; xx = xx - ww; } - if (hh < 0) { hh = -hh; yy = yy - hh; } - - if (m_brush.GetStyle() != wxTRANSPARENT) {}; - - if (m_pen.GetStyle() != wxTRANSPARENT) {}; -}; - -bool wxPaintDC::CanDrawBitmap(void) const -{ - return TRUE; -}; - -void wxPaintDC::DrawIcon( const wxIcon &icon, long x, long y, bool useMask ) -{ - if (!Ok()) return; - - if (!icon.Ok()) return; - - int xx = XLOG2DEV(x); - int yy = YLOG2DEV(y); - -}; - -bool wxPaintDC::Blit( long xdest, long ydest, long width, long height, - wxDC *source, long xsrc, long ysrc, int WXUNUSED(logical_func), bool WXUNUSED(useMask) ) -{ - if (!Ok()) return FALSE; - - // CMB 20/5/98: add blitting of bitmaps - if (source->IsKindOf(CLASSINFO(wxMemoryDC))) - { - wxMemoryDC* srcDC = (wxMemoryDC*)source; - /* - GdkBitmap* bmap = srcDC->m_selected.GetBitmap(); - if (bmap) - { - gdk_draw_bitmap ( - m_window, - m_textGC, - bmap, - source->DeviceToLogicalX(xsrc), source->DeviceToLogicalY(ysrc), - XLOG2DEV(xdest), YLOG2DEV(ydest), - source->DeviceToLogicalXRel(width), source->DeviceToLogicalYRel(height) - ); - return TRUE; - } - */ - } - - return TRUE; -}; - -void wxPaintDC::DrawText( const wxString &text, long x, long y, bool -WXUNUSED(use16) ) -{ - if (!Ok()) return; - -}; - - - -bool wxPaintDC::CanGetTextExtent(void) const -{ - return TRUE; -}; - -void wxPaintDC::GetTextExtent( const wxString &string, long *width, long *height, - long *WXUNUSED(descent), long *WXUNUSED(externalLeading), - wxFont *WXUNUSED(theFont), bool WXUNUSED(use16) ) -{ - if (!Ok()) return; - -}; - -long wxPaintDC::GetCharWidth(void) -{ - if (!Ok()) return 0; - -}; - -long wxPaintDC::GetCharHeight(void) -{ - if (!Ok()) return 0; - -}; - -void wxPaintDC::Clear(void) -{ - if (!Ok()) return; - -}; - -void wxPaintDC::SetFont( const wxFont &font ) -{ - if (!Ok()) return; - - m_font = font; -}; - -void wxPaintDC::SetPen( const wxPen &pen ) -{ - if (!Ok()) return; - - if (m_pen == pen) return; - - m_pen = pen; - - if (!m_pen.Ok()) return; -}; - -void wxPaintDC::SetBrush( const wxBrush &brush ) -{ - if (!Ok()) return; - - if (m_brush == brush) return; - - m_brush = brush; - - if (!m_brush.Ok()) return; - -}; - -void wxPaintDC::SetBackground( const wxBrush &brush ) -{ - if (!Ok()) return; - - if (m_backgroundBrush == brush) return; - - m_backgroundBrush = brush; - - if (!m_backgroundBrush.Ok()) return; - -}; - -void wxPaintDC::SetLogicalFunction( int function ) -{ - if (m_logicalFunction == function) return; -}; - -void wxPaintDC::SetTextForeground( const wxColour &col ) -{ - if (!Ok()) return; - - if (m_textForegroundColour == col) return; - - m_textForegroundColour = col; - if (!m_textForegroundColour.Ok()) return; -}; - -void wxPaintDC::SetTextBackground( const wxColour &col ) -{ - if (!Ok()) return; - - if (m_textBackgroundColour == col) return; - - m_textBackgroundColour = col; - if (!m_textBackgroundColour.Ok()) return; -}; - -void wxPaintDC::SetBackgroundMode( int mode ) -{ - m_backgroundMode = mode; - - if (m_brush.GetStyle() != wxSOLID && m_brush.GetStyle() != wxTRANSPARENT) - { - } -}; - -void wxPaintDC::SetPalette( const wxPalette& WXUNUSED(palette) ) -{ -}; - -void wxPaintDC::SetClippingRegion( long x, long y, long width, long height ) -{ - wxDC::SetClippingRegion( x, y, width, height ); - -}; - -void wxPaintDC::DestroyClippingRegion(void) -{ - wxDC::DestroyClippingRegion(); - -}; - -// ----------------------------------- spline code ---------------------------------------- - -void wx_quadratic_spline(double a1, double b1, double a2, double b2, - double a3, double b3, double a4, double b4); -void wx_clear_stack(void); -int wx_spline_pop(double *x1, double *y1, double *x2, double *y2, double *x3, - double *y3, double *x4, double *y4); -void wx_spline_push(double x1, double y1, double x2, double y2, double x3, double y3, - double x4, double y4); -static bool wx_spline_add_point(double x, double y); -static void wx_spline_draw_point_array(wxDC *dc); - -wxList wx_spline_point_list; - -#define half(z1, z2) ((z1+z2)/2.0) -#define THRESHOLD 5 - -/* iterative version */ - -void wx_quadratic_spline(double a1, double b1, double a2, double b2, double a3, double b3, double a4, - double b4) -{ - register double xmid, ymid; - double x1, y1, x2, y2, x3, y3, x4, y4; - - wx_clear_stack(); - wx_spline_push(a1, b1, a2, b2, a3, b3, a4, b4); - - while (wx_spline_pop(&x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4)) { - xmid = (double)half(x2, x3); - ymid = (double)half(y2, y3); - if (fabs(x1 - xmid) < THRESHOLD && fabs(y1 - ymid) < THRESHOLD && - fabs(xmid - x4) < THRESHOLD && fabs(ymid - y4) < THRESHOLD) { - wx_spline_add_point( x1, y1 ); - wx_spline_add_point( xmid, ymid ); - } else { - wx_spline_push(xmid, ymid, (double)half(xmid, x3), (double)half(ymid, y3), - (double)half(x3, x4), (double)half(y3, y4), x4, y4); - wx_spline_push(x1, y1, (double)half(x1, x2), (double)half(y1, y2), - (double)half(x2, xmid), (double)half(y2, ymid), xmid, ymid); - } - } -} - -/* utilities used by spline drawing routines */ - -typedef struct wx_spline_stack_struct { - double x1, y1, x2, y2, x3, y3, x4, y4; -} Stack; - -#define SPLINE_STACK_DEPTH 20 -static Stack wx_spline_stack[SPLINE_STACK_DEPTH]; -static Stack *wx_stack_top; -static int wx_stack_count; - -void wx_clear_stack(void) -{ - wx_stack_top = wx_spline_stack; - wx_stack_count = 0; -} - -void wx_spline_push(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) -{ - wx_stack_top->x1 = x1; - wx_stack_top->y1 = y1; - wx_stack_top->x2 = x2; - wx_stack_top->y2 = y2; - wx_stack_top->x3 = x3; - wx_stack_top->y3 = y3; - wx_stack_top->x4 = x4; - wx_stack_top->y4 = y4; - wx_stack_top++; - wx_stack_count++; -} - -int wx_spline_pop(double *x1, double *y1, double *x2, double *y2, - double *x3, double *y3, double *x4, double *y4) -{ - if (wx_stack_count == 0) - return (0); - wx_stack_top--; - wx_stack_count--; - *x1 = wx_stack_top->x1; - *y1 = wx_stack_top->y1; - *x2 = wx_stack_top->x2; - *y2 = wx_stack_top->y2; - *x3 = wx_stack_top->x3; - *y3 = wx_stack_top->y3; - *x4 = wx_stack_top->x4; - *y4 = wx_stack_top->y4; - return (1); -} - -static bool wx_spline_add_point(double x, double y) -{ - wxPoint *point = new wxPoint ; - point->x = (int) x; - point->y = (int) y; - wx_spline_point_list.Append((wxObject*)point); - return TRUE; -} - -static void wx_spline_draw_point_array(wxDC *dc) -{ - dc->DrawLines(&wx_spline_point_list, 0, 0 ); - wxNode *node = wx_spline_point_list.First(); - while (node) - { - wxPoint *point = (wxPoint *)node->Data(); - delete point; - delete node; - node = wx_spline_point_list.First(); - } -} - -void wxPaintDC::DrawOpenSpline( wxList *points ) -{ - wxPoint *p; - double cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4; - double x1, y1, x2, y2; - - wxNode *node = points->First(); - p = (wxPoint *)node->Data(); - - x1 = p->x; - y1 = p->y; - - node = node->Next(); - p = (wxPoint *)node->Data(); - - x2 = p->x; - y2 = p->y; - cx1 = (double)((x1 + x2) / 2); - cy1 = (double)((y1 + y2) / 2); - cx2 = (double)((cx1 + x2) / 2); - cy2 = (double)((cy1 + y2) / 2); - - wx_spline_add_point(x1, y1); - - while ((node = node->Next()) != NULL) - { - p = (wxPoint *)node->Data(); - x1 = x2; - y1 = y2; - x2 = p->x; - y2 = p->y; - cx4 = (double)(x1 + x2) / 2; - cy4 = (double)(y1 + y2) / 2; - cx3 = (double)(x1 + cx4) / 2; - cy3 = (double)(y1 + cy4) / 2; - - wx_quadratic_spline(cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4); - - cx1 = cx4; - cy1 = cy4; - cx2 = (double)(cx1 + x2) / 2; - cy2 = (double)(cy1 + y2) / 2; - } - - wx_spline_add_point( cx1, cy1 ); - wx_spline_add_point( x2, y2 ); - - wx_spline_draw_point_array( this ); -}; diff --git a/src/qt/dcmemory.cpp b/src/qt/dcmemory.cpp deleted file mode 100644 index c6066bb1ab..0000000000 --- a/src/qt/dcmemory.cpp +++ /dev/null @@ -1,68 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcmemory.cpp -// Purpose: wxMemoryDC class -// Author: AUTHOR -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dcmemory.h" -#endif - -#include "wx/dcmemory.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC) -#endif - -//----------------------------------------------------------------------------- -// wxMemoryDC -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxPaintDC) - -wxMemoryDC::wxMemoryDC(void) -{ - m_ok = FALSE; -}; - -wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) ) -{ - m_ok = FALSE; -}; - -wxMemoryDC::~wxMemoryDC(void) -{ -}; - -void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) -{ - m_selected = bitmap; - if (m_selected.Ok()) - { - } - else - { - m_ok = FALSE; - }; -}; - -void wxMemoryDC::GetSize( int *width, int *height ) const -{ - if (m_selected.Ok()) - { - if (width) (*width) = m_selected.GetWidth(); - if (height) (*height) = m_selected.GetHeight(); - } - else - { - if (width) (*width) = 0; - if (height) (*height) = 0; - }; -}; - - diff --git a/src/qt/dcscreen.cpp b/src/qt/dcscreen.cpp deleted file mode 100644 index 04bbf4f353..0000000000 --- a/src/qt/dcscreen.cpp +++ /dev/null @@ -1,32 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcscreen.cpp -// Purpose: wxScreenDC class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dcscreen.h" -#endif - -#include "wx/dcscreen.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxPaintDC) -#endif - -// Create a DC representing the whole screen -wxScreenDC::wxScreenDC() -{ - // TODO -} - -wxScreenDC::~wxScreenDC() -{ - // TODO -} - diff --git a/src/qt/dialog.cpp b/src/qt/dialog.cpp deleted file mode 100644 index 9b72fb0f69..0000000000 --- a/src/qt/dialog.cpp +++ /dev/null @@ -1,294 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dialog.cpp -// Purpose: wxDialog class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dialog.h" -#endif - -#include "wx/dialog.h" -#include "wx/utils.h" -#include "wx/frame.h" -#include "wx/app.h" -#include "wx/settings.h" - -// Lists to keep track of windows, so we can disable/enable them -// for modal dialogs -wxList wxModalDialogs; -wxList wxModelessWindows; // Frames and modeless dialogs -extern wxList wxPendingDelete; - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxPanel) - -BEGIN_EVENT_TABLE(wxDialog, wxPanel) - EVT_BUTTON(wxID_OK, wxDialog::OnOK) - EVT_BUTTON(wxID_APPLY, wxDialog::OnApply) - EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel) - EVT_CHAR_HOOK(wxDialog::OnCharHook) - EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged) - EVT_CLOSE(wxDialog::OnCloseWindow) -END_EVENT_TABLE() - -#endif - -wxDialog::wxDialog() -{ - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); -} - -bool wxDialog::Create(wxWindow *parent, wxWindowID id, - const wxString& title, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - m_windowStyle = style; - - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); - SetName(name); - - if (!parent) - wxTopLevelWindows.Append(this); - - if (parent) parent->AddChild(this); - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - // TODO: create dialog - - return FALSE; -} - -void wxDialog::SetModal(bool flag) -{ - if ( flag ) - m_windowStyle |= wxDIALOG_MODAL ; - else - if ( m_windowStyle & wxDIALOG_MODAL ) - m_windowStyle -= wxDIALOG_MODAL ; - - wxModelessWindows.DeleteObject(this); - if (!flag) - wxModelessWindows.Append(this); -} - -wxDialog::~wxDialog() -{ - // TODO - wxTopLevelWindows.DeleteObject(this); - - if ( (GetWindowStyleFlag() & wxDIALOG_MODAL) != wxDIALOG_MODAL ) - wxModelessWindows.DeleteObject(this); - - // If this is the last top-level window, exit. - if (wxTheApp && (wxTopLevelWindows.Number() == 0)) - { - wxTheApp->SetTopWindow(NULL); - - if (wxTheApp->GetExitOnFrameDelete()) - { - // TODO: exit - } - } -} - -// By default, pressing escape cancels the dialog -void wxDialog::OnCharHook(wxKeyEvent& event) -{ - if (GetHWND()) - { - if (event.m_keyCode == WXK_ESCAPE) - { - // Behaviour changed in 2.0: we'll send a Cancel message - // to the dialog instead of Close. - wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL); - cancelEvent.SetEventObject( this ); - GetEventHandler()->ProcessEvent(cancelEvent); - - return; - } - } - // We didn't process this event. - event.Skip(); -} - -void wxDialog::Iconize(bool WXUNUSED(iconize)) -{ - // TODO -} - -bool wxDialog::IsIconized() const -{ - // TODO - return FALSE; -} - -void wxDialog::SetClientSize(int width, int height) -{ - // TODO -} - -void wxDialog::GetPosition(int *x, int *y) const -{ - // TODO -} - -bool wxDialog::Show(bool show) -{ - // TODO - return FALSE; -} - -void wxDialog::SetTitle(const wxString& title) -{ - // TODO -} - -wxString wxDialog::GetTitle() const -{ - // TODO - return wxString(""); -} - -void wxDialog::Centre(int direction) -{ - int x_offset,y_offset ; - int display_width, display_height; - int width, height, x, y; - wxFrame *frame ; - if (direction & wxCENTER_FRAME) - { - frame = (wxFrame*)GetParent() ; - if (frame) - { - frame->GetPosition(&x_offset,&y_offset) ; - frame->GetSize(&display_width,&display_height) ; - } - } - else - frame = NULL ; - - if (frame==NULL) - { - wxDisplaySize(&display_width, &display_height); - x_offset = 0 ; - y_offset = 0 ; - } - - GetSize(&width, &height); - GetPosition(&x, &y); - - if (direction & wxHORIZONTAL) - x = (int)((display_width - width)/2); - if (direction & wxVERTICAL) - y = (int)((display_height - height)/2); - - SetSize(x+x_offset, y+y_offset, width, height); -} - -// Replacement for Show(TRUE) for modal dialogs - returns return code -int wxDialog::ShowModal() -{ - m_windowStyle |= wxDIALOG_MODAL; - // TODO: modal showing - Show(TRUE); - return GetReturnCode(); -} - -void wxDialog::EndModal(int retCode) -{ - SetReturnCode(retCode); - // TODO modal un-showing - Show(FALSE); -} - -// Standard buttons -void wxDialog::OnOK(wxCommandEvent& event) -{ - if ( Validate() && TransferDataFromWindow() ) - { - if ( IsModal() ) - EndModal(wxID_OK); - else - { - SetReturnCode(wxID_OK); - this->Show(FALSE); - } - } -} - -void wxDialog::OnApply(wxCommandEvent& event) -{ - if (Validate()) - TransferDataFromWindow(); - // TODO probably need to disable the Apply button until things change again -} - -void wxDialog::OnCancel(wxCommandEvent& event) -{ - if ( IsModal() ) - EndModal(wxID_CANCEL); - else - { - SetReturnCode(wxID_CANCEL); - this->Show(FALSE); - } -} - -bool wxDialog::OnClose() -{ - // Behaviour changed in 2.0: we'll send a Cancel message by default, - // which may close the dialog. - // Check for looping if the Cancel event handler calls Close() - - static wxList closing; - - if ( closing.Member(this) ) - return FALSE; - - closing.Append(this); - - wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL); - cancelEvent.SetEventObject( this ); - GetEventHandler()->ProcessEvent(cancelEvent); - - closing.DeleteObject(this); - - return FALSE; -} - -void wxDialog::OnCloseWindow(wxCloseEvent& event) -{ - // Compatibility - if ( GetEventHandler()->OnClose() || event.GetForce()) - { - this->Destroy(); - } -} - -// Destroy the window (delayed, if a managed window) -bool wxDialog::Destroy() -{ - if (!wxPendingDelete.Member(this)) - wxPendingDelete.Append(this); - return TRUE; -} - -void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& event) -{ - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); - Refresh(); -} - diff --git a/src/qt/dnd.cpp b/src/qt/dnd.cpp deleted file mode 100644 index ec82cb6dc1..0000000000 --- a/src/qt/dnd.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: dnd.cpp -// Purpose: wxDropTarget, wxDropSource, wxDataObject implementation -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 AUTHOR -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dnd.h" -#endif - -#include "wx/dnd.h" -#include "wx/window.h" -#include "wx/app.h" -#include "wx/gdicmn.h" - -// ---------------------------------------------------------------------------- -// global -// ---------------------------------------------------------------------------- - -// ---------------------------------------------------------------------------- -// wxDropTarget -// ---------------------------------------------------------------------------- - -wxDropTarget::wxDropTarget() -{ -}; - -wxDropTarget::~wxDropTarget() -{ -}; - -// ---------------------------------------------------------------------------- -// wxTextDropTarget -// ---------------------------------------------------------------------------- - -bool wxTextDropTarget::OnDrop( long x, long y, const void *pData ) -{ - OnDropText( x, y, (const char*)pData ); - return TRUE; -}; - -bool wxTextDropTarget::OnDropText( long x, long y, const char *psz ) -{ - printf( "Got dropped text: %s.\n", psz ); - printf( "At x: %d, y: %d.\n", (int)x, (int)y ); - return TRUE; -}; - -size_t wxTextDropTarget::GetFormatCount() const -{ - return 1; -} - -wxDataFormat wxTextDropTarget::GetFormat(size_t WXUNUSED(n)) const -{ - return wxDF_TEXT; -} - -// ---------------------------------------------------------------------------- -// wxFileDropTarget -// ---------------------------------------------------------------------------- - -bool wxFileDropTarget::OnDropFiles( long x, long y, size_t nFiles, const char * const WXUNUSED(aszFiles)[] ) -{ - printf( "Got %d dropped files.\n", (int)nFiles ); - printf( "At x: %d, y: %d.\n", (int)x, (int)y ); - return TRUE; -} - -bool wxFileDropTarget::OnDrop(long x, long y, const void *WXUNUSED(pData) ) -{ - char *str = "/this/is/a/path.txt"; - - return OnDropFiles(x, y, 1, &str ); -} - -size_t wxFileDropTarget::GetFormatCount() const -{ - return 1; -} - -wxDataFormat wxFileDropTarget::GetFormat(size_t WXUNUSED(n)) const -{ - return wxDF_FILENAME; -} - -//------------------------------------------------------------------------- -// wxDropSource -//------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// drag request - -wxDropSource::wxDropSource( wxWindow *win ) -{ - // TODO - m_window = win; - m_data = NULL; - - m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY ); - m_goaheadCursor = wxCursor( wxCURSOR_HAND ); -}; - -wxDropSource::wxDropSource( wxDataObject &data, wxWindow *win ) -{ - // TODO - m_window = win; - m_data = &data; - - m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY ); - m_goaheadCursor = wxCursor( wxCURSOR_HAND ); -}; - -void wxDropSource::SetData( wxDataObject &data ) -{ - m_data = &data; -}; - -wxDropSource::~wxDropSource(void) -{ -}; - -wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) ) -{ - // TODO - return Error; -}; - diff --git a/src/qt/fdiag.xbm b/src/qt/fdiag.xbm deleted file mode 100644 index 67d3b4732a..0000000000 --- a/src/qt/fdiag.xbm +++ /dev/null @@ -1,6 +0,0 @@ -#define fdiag_width 16 -#define fdiag_height 16 -static char fdiag_bits[] = { - 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, - 0x40, 0x40, 0x80, 0x80, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, - 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80}; diff --git a/src/qt/filedlg.cpp b/src/qt/filedlg.cpp deleted file mode 100644 index cf096037d6..0000000000 --- a/src/qt/filedlg.cpp +++ /dev/null @@ -1,142 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: filedlg.cpp -// Purpose: wxFileDialog -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "filedlg.h" -#endif - -#include "wx/defs.h" -#include "wx/utils.h" -#include "wx/dialog.h" -#include "wx/filedlg.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_CLASS(wxFileDialog, wxDialog) -#endif - -char *wxFileSelector(const char *title, - const char *defaultDir, const char *defaultFileName, - const char *defaultExtension, const char *filter, int flags, - wxWindow *parent, int x, int y) -{ - // If there's a default extension specified but no filter, we create a suitable - // filter. - - wxString filter2(""); - if ( defaultExtension && !filter ) - filter2 = wxString("*.") + wxString(defaultExtension) ; - else if ( filter ) - filter2 = filter; - - wxString defaultDirString; - if (defaultDir) - defaultDirString = defaultDir; - else - defaultDirString = ""; - - wxString defaultFilenameString; - if (defaultFileName) - defaultFilenameString = defaultFileName; - else - defaultFilenameString = ""; - - wxFileDialog fileDialog(parent, title, defaultDirString, defaultFilenameString, filter2, flags, wxPoint(x, y)); - - if ( fileDialog.ShowModal() == wxID_OK ) - { - strcpy(wxBuffer, (const char *)fileDialog.GetPath()); - return wxBuffer; - } - else - return NULL; -} - -char *wxFileSelectorEx(const char *title, - const char *defaultDir, - const char *defaultFileName, - int* defaultFilterIndex, - const char *filter, - int flags, - wxWindow* parent, - int x, - int y) - -{ - wxFileDialog fileDialog(parent, title ? title : "", defaultDir ? defaultDir : "", - defaultFileName ? defaultFileName : "", filter ? filter : "", flags, wxPoint(x, y)); - - if ( fileDialog.ShowModal() == wxID_OK ) - { - *defaultFilterIndex = fileDialog.GetFilterIndex(); - strcpy(wxBuffer, (const char *)fileDialog.GetPath()); - return wxBuffer; - } - else - return NULL; -} - -wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, - const wxString& defaultDir, const wxString& defaultFileName, const wxString& wildCard, - long style, const wxPoint& pos) -{ - m_message = message; - m_dialogStyle = style; - m_parent = parent; - m_path = ""; - m_fileName = defaultFileName; - m_dir = defaultDir; - m_wildCard = wildCard; - m_filterIndex = 1; -} - -int wxFileDialog::ShowModal() -{ - // TODO - wxID_CANCEL; -} - -// Generic file load/save dialog -static char * -wxDefaultFileSelector(bool load, const char *what, const char *extension, const char *default_name, wxWindow *parent) -{ - char *ext = (char *)extension; - - char prompt[50]; - wxString str; - if (load) - str = "Load %s file"; - else - str = "Save %s file"; - sprintf(prompt, wxGetTranslation(str), what); - - if (*ext == '.') ext++; - char wild[60]; - sprintf(wild, "*.%s", ext); - - return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent); -} - -// Generic file load dialog -char * -wxLoadFileSelector(const char *what, const char *extension, const char *default_name, wxWindow *parent) -{ - return wxDefaultFileSelector(TRUE, what, extension, default_name, parent); -} - - -// Generic file save dialog -char * -wxSaveFileSelector(const char *what, const char *extension, const char *default_name, wxWindow *parent) -{ - return wxDefaultFileSelector(FALSE, what, extension, default_name, parent); -} - - diff --git a/src/qt/font.cpp b/src/qt/font.cpp deleted file mode 100644 index 5835259696..0000000000 --- a/src/qt/font.cpp +++ /dev/null @@ -1,241 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: font.cpp -// Purpose: wxFont class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "font.h" -#endif - -#include "wx/font.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) -#endif - -wxFontRefData::wxFontRefData() -{ - m_style = 0; - m_pointSize = 0; - m_family = 0; - m_style = 0; - m_weight = 0; - m_underlined = 0; - m_faceName = ""; -/* TODO - m_hFont = 0; -*/ -} - -wxFontRefData::wxFontRefData(const wxFontRefData& data) -{ - m_style = data.m_style; - m_pointSize = data.m_pointSize; - m_family = data.m_family; - m_style = data.m_style; - m_weight = data.m_weight; - m_underlined = data.m_underlined; - m_faceName = data.m_faceName; -/* TODO - m_hFont = 0; -*/ -} - -wxFontRefData::~wxFontRefData() -{ - // TODO: delete font data -} - -wxFont::wxFont() -{ - if ( wxTheFontList ) - wxTheFontList->Append(this); -} - -wxFont::wxFont(int pointSize, int family, int style, int weight, bool underlined, const wxString& faceName) -{ - Create(pointSize, family, style, weight, underlined, faceName); - - if ( wxTheFontList ) - wxTheFontList->Append(this); -} - -bool wxFont::Create(int pointSize, int family, int style, int weight, bool underlined, const wxString& faceName) -{ - UnRef(); - m_refData = new wxFontRefData; - - M_FONTDATA->m_family = family; - M_FONTDATA->m_style = style; - M_FONTDATA->m_weight = weight; - M_FONTDATA->m_pointSize = pointSize; - M_FONTDATA->m_underlined = underlined; - M_FONTDATA->m_faceName = faceName; - - RealizeResource(); - - return TRUE; -} - -wxFont::~wxFont() -{ - if (wxTheFontList) - wxTheFontList->DeleteObject(this); -} - -bool wxFont::RealizeResource() -{ - // TODO: create the font (if there is a native font object) - return FALSE; -} - -void wxFont::Unshare() -{ - // Don't change shared data - if (!m_refData) - { - m_refData = new wxFontRefData(); - } - else - { - wxFontRefData* ref = new wxFontRefData(*(wxFontRefData*)m_refData); - UnRef(); - m_refData = ref; - } -} - -void wxFont::SetPointSize(int pointSize) -{ - Unshare(); - - M_FONTDATA->m_pointSize = pointSize; - - RealizeResource(); -} - -void wxFont::SetFamily(int family) -{ - Unshare(); - - M_FONTDATA->m_family = family; - - RealizeResource(); -} - -void wxFont::SetStyle(int style) -{ - Unshare(); - - M_FONTDATA->m_style = style; - - RealizeResource(); -} - -void wxFont::SetWeight(int weight) -{ - Unshare(); - - M_FONTDATA->m_weight = weight; - - RealizeResource(); -} - -void wxFont::SetFaceName(const wxString& faceName) -{ - Unshare(); - - M_FONTDATA->m_faceName = faceName; - - RealizeResource(); -} - -void wxFont::SetUnderlined(bool underlined) -{ - Unshare(); - - M_FONTDATA->m_underlined = underlined; - - RealizeResource(); -} - -wxString wxFont::GetFamilyString() const -{ - wxString fam(""); - switch (GetFamily()) - { - case wxDECORATIVE: - fam = "wxDECORATIVE"; - break; - case wxROMAN: - fam = "wxROMAN"; - break; - case wxSCRIPT: - fam = "wxSCRIPT"; - break; - case wxSWISS: - fam = "wxSWISS"; - break; - case wxMODERN: - fam = "wxMODERN"; - break; - case wxTELETYPE: - fam = "wxTELETYPE"; - break; - default: - fam = "wxDEFAULT"; - break; - } - return fam; -} - -/* New font system */ -wxString wxFont::GetFaceName() const -{ - wxString str(""); - if (M_FONTDATA) - str = M_FONTDATA->m_faceName ; - return str; -} - -wxString wxFont::GetStyleString() const -{ - wxString styl(""); - switch (GetStyle()) - { - case wxITALIC: - styl = "wxITALIC"; - break; - case wxSLANT: - styl = "wxSLANT"; - break; - default: - styl = "wxNORMAL"; - break; - } - return styl; -} - -wxString wxFont::GetWeightString() const -{ - wxString w(""); - switch (GetWeight()) - { - case wxBOLD: - w = "wxBOLD"; - break; - case wxLIGHT: - w = "wxLIGHT"; - break; - default: - w = "wxNORMAL"; - break; - } - return w; -} - diff --git a/src/qt/frame.cpp b/src/qt/frame.cpp deleted file mode 100644 index 3d9b5b0004..0000000000 --- a/src/qt/frame.cpp +++ /dev/null @@ -1,546 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: frame.cpp -// Purpose: wxFrame -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "frame.h" -#endif - -#include "wx/frame.h" -#include "wx/statusbr.h" -#include "wx/toolbar.h" -#include "wx/menuitem.h" - -extern wxList wxModelessWindows; -extern wxList wxPendingDelete; - -#if !USE_SHARED_LIBRARY -BEGIN_EVENT_TABLE(wxFrame, wxWindow) - EVT_SIZE(wxFrame::OnSize) - EVT_ACTIVATE(wxFrame::OnActivate) - EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight) - EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged) - EVT_IDLE(wxFrame::OnIdle) - EVT_CLOSE(wxFrame::OnCloseWindow) -END_EVENT_TABLE() - -IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow) -#endif - -#if USE_NATIVE_STATUSBAR -bool wxFrame::m_useNativeStatusBar = TRUE; -#else -bool wxFrame::m_useNativeStatusBar = FALSE; -#endif - -wxFrame::wxFrame() -{ - m_frameToolBar = NULL ; - m_frameMenuBar = NULL; - m_frameStatusBar = NULL; - - m_windowParent = NULL; - m_iconized = FALSE; -} - -bool wxFrame::Create(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - if (!parent) - wxTopLevelWindows.Append(this); - - SetName(name); - m_windowStyle = style; - m_frameMenuBar = NULL; - m_frameToolBar = NULL ; - m_frameStatusBar = NULL; - - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE)); - - if ( id > -1 ) - m_windowId = id; - else - m_windowId = (int)NewControlId(); - - if (parent) parent->AddChild(this); - - wxModelessWindows.Append(this); - - // TODO: create frame. - - return FALSE; -} - -wxFrame::~wxFrame() -{ - wxTopLevelWindows.DeleteObject(this); - - if (m_frameStatusBar) - delete m_frameStatusBar; - if (m_frameMenuBar) - delete m_frameMenuBar; - -/* Check if it's the last top-level window */ - - if (wxTheApp && (wxTopLevelWindows.Number() == 0)) - { - wxTheApp->SetTopWindow(NULL); - - if (wxTheApp->GetExitOnFrameDelete()) - { - // TODO signal to the app that we're going to close - } - } - - wxModelessWindows.DeleteObject(this); -} - -// Get size *available for subwindows* i.e. excluding menu bar, toolbar etc. -void wxFrame::GetClientSize(int *x, int *y) const -{ - // TODO -} - -// Set the client size (i.e. leave the calculation of borders etc. -// to wxWindows) -void wxFrame::SetClientSize(int width, int height) -{ - // TODO -} - -void wxFrame::GetSize(int *width, int *height) const -{ - // TODO -} - -void wxFrame::GetPosition(int *x, int *y) const -{ - // TODO -} - -void wxFrame::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -bool wxFrame::Show(bool show) -{ - // TODO - return FALSE; -} - -void wxFrame::Iconize(bool iconize) -{ - // TODO -} - -// Equivalent to maximize/restore in Windows -void wxFrame::Maximize(bool maximize) -{ - // TODO -} - -bool wxFrame::IsIconized() const -{ - // TODO - return FALSE; -} - -void wxFrame::SetTitle(const wxString& title) -{ - // TODO -} - -wxString wxFrame::GetTitle() const -{ - // TODO - return wxString(""); -} - -void wxFrame::SetIcon(const wxIcon& icon) -{ - m_icon = icon; - // TODO -} - -void wxFrame::SetAcceleratorTable(const wxAcceleratorTable& accel) -{ - m_acceleratorTable = accel; -} - -wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id, - const wxString& name) -{ - wxStatusBar *statusBar = NULL; - - statusBar = new wxStatusBar(this, id, wxPoint(0, 0), wxSize(100, 20), - style, name); - - // Set the height according to the font and the border size - wxClientDC dc(statusBar); - dc.SetFont(* statusBar->GetFont()); - - long x, y; - dc.GetTextExtent("X", &x, &y); - - int height = (int)( (y * 1.1) + 2* statusBar->GetBorderY()); - - statusBar->SetSize(-1, -1, 100, height); - - statusBar->SetFieldsCount(number); - return statusBar; -} - -wxStatusBar* wxFrame::CreateStatusBar(int number, long style, wxWindowID id, - const wxString& name) -{ - // Calling CreateStatusBar twice is an error. - wxCHECK_MSG( m_frameStatusBar == NULL, FALSE, - "recreating status bar in wxFrame" ); - - m_frameStatusBar = OnCreateStatusBar(number, style, id, - name); - if ( m_frameStatusBar ) - { - PositionStatusBar(); - return m_frameStatusBar; - } - else - return NULL; -} - -void wxFrame::SetStatusText(const wxString& text, int number) -{ - wxCHECK_RET( m_frameStatusBar != NULL, "no statusbar to set text for" ); - - m_frameStatusBar->SetStatusText(text, number); -} - -void wxFrame::SetStatusWidths(int n, const int widths_field[]) -{ - wxCHECK_RET( m_frameStatusBar != NULL, "no statusbar to set widths for" ); - - m_frameStatusBar->SetStatusWidths(n, widths_field); - PositionStatusBar(); -} - -void wxFrame::PositionStatusBar() -{ - int w, h; - GetClientSize(&w, &h); - int sw, sh; - m_frameStatusBar->GetSize(&sw, &sh); - - // Since we wish the status bar to be directly under the client area, - // we use the adjusted sizes without using wxSIZE_NO_ADJUSTMENTS. - m_frameStatusBar->SetSize(0, h, w, sh); -} - -void wxFrame::SetMenuBar(wxMenuBar *menuBar) -{ - if (!menuBar) - { - m_frameMenuBar = NULL; - return; - } - - m_frameMenuBar = menuBar; - - // TODO -} - -void wxFrame::Fit() -{ - // Work out max. size - wxNode *node = GetChildren()->First(); - int max_width = 0; - int max_height = 0; - while (node) - { - // Find a child that's a subwindow, but not a dialog box. - wxWindow *win = (wxWindow *)node->Data(); - - if (!win->IsKindOf(CLASSINFO(wxFrame)) && - !win->IsKindOf(CLASSINFO(wxDialog))) - { - int width, height; - int x, y; - win->GetSize(&width, &height); - win->GetPosition(&x, &y); - - if ((x + width) > max_width) - max_width = x + width; - if ((y + height) > max_height) - max_height = y + height; - } - node = node->Next(); - } - SetClientSize(max_width, max_height); -} - -// Responds to colour changes, and passes event on to children. -void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event) -{ - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE)); - Refresh(); - - if ( m_frameStatusBar ) - { - wxSysColourChangedEvent event2; - event2.SetEventObject( m_frameStatusBar ); - m_frameStatusBar->ProcessEvent(event2); - } - - // Propagate the event to the non-top-level children - wxWindow::OnSysColourChanged(event); -} - -// Default resizing behaviour - if only ONE subwindow, -// resize to client rectangle size -void wxFrame::OnSize(wxSizeEvent& event) -{ - // if we're using constraints - do use them - #if USE_CONSTRAINTS - if ( GetAutoLayout() ) { - Layout(); - return; - } - #endif - - // do we have _exactly_ one child? - wxWindow *child = NULL; - for ( wxNode *node = GetChildren()->First(); node; node = node->Next() ) - { - wxWindow *win = (wxWindow *)node->Data(); - if ( !win->IsKindOf(CLASSINFO(wxFrame)) && - !win->IsKindOf(CLASSINFO(wxDialog)) && - (win != GetStatusBar()) && - (win != GetToolBar()) ) - { - if ( child ) - return; // it's our second subwindow - nothing to do - child = win; - } - } - - if ( child ) { - // we have exactly one child - set it's size to fill the whole frame - int clientW, clientH; - GetClientSize(&clientW, &clientH); - - int x = 0; - int y = 0; - - child->SetSize(x, y, clientW, clientH); - } -} - -// Default activation behaviour - set the focus for the first child -// subwindow found. -void wxFrame::OnActivate(wxActivateEvent& event) -{ - for(wxNode *node = GetChildren()->First(); node; node = node->Next()) - { - // Find a child that's a subwindow, but not a dialog box. - wxWindow *child = (wxWindow *)node->Data(); - if (!child->IsKindOf(CLASSINFO(wxFrame)) && - !child->IsKindOf(CLASSINFO(wxDialog))) - { -#if WXDEBUG > 1 - wxDebugMsg("wxFrame::OnActivate: about to set the child's focus.\n"); -#endif - child->SetFocus(); - return; - } - } -} - -// The default implementation for the close window event - calls -// OnClose for backward compatibility. - -void wxFrame::OnCloseWindow(wxCloseEvent& event) -{ - // Compatibility - if ( GetEventHandler()->OnClose() || event.GetForce()) - { - this->Destroy(); - } -} - -bool wxFrame::OnClose() -{ - return TRUE; -} - -// Destroy the window (delayed, if a managed window) -bool wxFrame::Destroy() -{ - if (!wxPendingDelete.Member(this)) - wxPendingDelete.Append(this); - return TRUE; -} - -// Default menu selection behaviour - display a help string -void wxFrame::OnMenuHighlight(wxMenuEvent& event) -{ - if (GetStatusBar()) - { - if (event.GetMenuId() == -1) - SetStatusText(""); - else - { - wxMenuBar *menuBar = GetMenuBar(); - if (menuBar) - { - wxString helpString(menuBar->GetHelpString(event.GetMenuId())); - if (helpString != "") - SetStatusText(helpString); - } - } - } -} - -wxMenuBar *wxFrame::GetMenuBar() const -{ - return m_frameMenuBar; -} - -void wxFrame::Centre(int direction) -{ - int display_width, display_height, width, height, x, y; - wxDisplaySize(&display_width, &display_height); - - GetSize(&width, &height); - GetPosition(&x, &y); - - if (direction & wxHORIZONTAL) - x = (int)((display_width - width)/2); - if (direction & wxVERTICAL) - y = (int)((display_height - height)/2); - - SetSize(x, y, width, height); -} - -// Call this to simulate a menu command -void wxFrame::Command(int id) -{ - ProcessCommand(id); -} - -void wxFrame::ProcessCommand(int id) -{ - wxCommandEvent commandEvent(wxEVENT_TYPE_MENU_COMMAND, id); - commandEvent.SetInt( id ); - commandEvent.SetEventObject( this ); - - wxMenuBar *bar = GetMenuBar() ; - if (!bar) - return; - -/* TODO: check the menu item if required - wxMenuItem *item = bar->FindItemForId(id) ; - if (item && item->IsCheckable()) - { - bar->Check(id,!bar->Checked(id)) ; - } -*/ - - GetEventHandler()->ProcessEvent(commandEvent); -} - -// Checks if there is a toolbar, and returns the first free client position -wxPoint wxFrame::GetClientAreaOrigin() const -{ - wxPoint pt(0, 0); - if (GetToolBar()) - { - int w, h; - GetToolBar()->GetSize(& w, & h); - - if (GetToolBar()->GetWindowStyleFlag() & wxTB_VERTICAL) - { - pt.x += w; - } - else - { - pt.y += h; - } - } - return pt; -} - -wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& name) -{ - wxCHECK_MSG( m_frameToolBar == NULL, FALSE, - "recreating toolbar in wxFrame" ); - - wxToolBar* toolBar = OnCreateToolBar(style, id, name); - if (toolBar) - { - SetToolBar(toolBar); - PositionToolBar(); - return toolBar; - } - else - { - return NULL; - } -} - -wxToolBar* wxFrame::OnCreateToolBar(long style, wxWindowID id, const wxString& name) -{ - return new wxToolBar(this, id, wxDefaultPosition, wxDefaultSize, style, name); -} - -void wxFrame::PositionToolBar() -{ - int cw, ch; - - // TODO: we actually need to use the low-level client size, before - // the toolbar/status bar were added. - // So DEFINITELY replace the line below with something appropriate. - - wxCHECK_MSG( TRUE, FALSE, - "PositionToolBar not implemented properly, see frame.cpp" ); - - GetClientSize(& cw, &ch); - - if ( GetStatusBar() ) - { - int statusX, statusY; - GetStatusBar()->GetClientSize(&statusX, &statusY); - ch -= statusY; - } - - if (GetToolBar()) - { - int tw, th; - GetToolBar()->GetSize(& tw, & th); - - if (GetToolBar()->GetWindowStyleFlag() & wxTB_VERTICAL) - { - // Use the 'real' position. wxSIZE_NO_ADJUSTMENTS - // means, pretend we don't have toolbar/status bar, so we - // have the original client size. - GetToolBar()->SetSize(0, 0, tw, ch, wxSIZE_NO_ADJUSTMENTS); - } - else - { - // Use the 'real' position - GetToolBar()->SetSize(0, 0, cw, th, wxSIZE_NO_ADJUSTMENTS); - } - } -} - diff --git a/src/qt/gauge.cpp b/src/qt/gauge.cpp deleted file mode 100644 index 8e11c5001b..0000000000 --- a/src/qt/gauge.cpp +++ /dev/null @@ -1,105 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gauge.cpp -// Purpose: wxGauge class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "gauge.h" -#endif - -#include "wx/gauge.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl) -#endif - -bool wxGauge::Create(wxWindow *parent, wxWindowID id, - int range, - const wxPoint& pos, - const wxSize& size, - long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - m_rangeMax = range; - m_windowStyle = style; - - if (parent) parent->AddChild(this); - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - - // TODO - return FALSE; -} - -void wxGauge::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -void wxGauge::SetShadowWidth(int w) -{ - // TODO optional -} - -void wxGauge::SetBezelFace(int w) -{ - // TODO optional -} - -void wxGauge::SetRange(int r) -{ - m_rangeMax = r; - // TODO -} - -void wxGauge::SetValue(int pos) -{ - m_gaugePos = pos; - // TODO -} - -int wxGauge::GetShadowWidth() const -{ - // TODO optional - return 0; -} - -int wxGauge::GetBezelFace() const -{ - // TODO optional - return 0; -} - -int wxGauge::GetRange() const -{ - return m_rangeMax; -} - -int wxGauge::GetValue() const -{ - return m_gaugePos; -} - -void wxGauge::SetForegroundColour(const wxColour& col) -{ - m_foregroundColour = col ; -} - -void wxGauge::SetBackgroundColour(const wxColour& col) -{ - m_backgroundColour = col ; -} - diff --git a/src/qt/gdiobj.cpp b/src/qt/gdiobj.cpp deleted file mode 100644 index 63697c8354..0000000000 --- a/src/qt/gdiobj.cpp +++ /dev/null @@ -1,22 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gdiobj.cpp -// Purpose: wxGDIObject class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "gdiobj.h" -#endif - -#include "wx/gdiobj.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxGDIObject, wxObject) -#endif - -// TODO: Nothing to do, unless you want to. diff --git a/src/qt/horiz.xbm b/src/qt/horiz.xbm deleted file mode 100644 index ff3309bcc4..0000000000 --- a/src/qt/horiz.xbm +++ /dev/null @@ -1,6 +0,0 @@ -#define horiz_width 15 -#define horiz_height 15 -static char horiz_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00}; diff --git a/src/qt/icon.cpp b/src/qt/icon.cpp deleted file mode 100644 index 6deee7dbdc..0000000000 --- a/src/qt/icon.cpp +++ /dev/null @@ -1,70 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: icon.cpp -// Purpose: wxIcon class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "icon.h" -#endif - -#include "wx/icon.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap) -#endif - -/* - * Icons - */ - - -wxIconRefData::wxIconRefData() -{ - // TODO: init icon handle -} - -wxIconRefData::~wxIconRefData() -{ - // TODO: destroy icon handle -} - -wxIcon::wxIcon() -{ -} - -wxIcon::wxIcon(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSED(height)) -{ -} - -wxIcon::wxIcon(const wxString& icon_file, long flags, - int desiredWidth, int desiredHeight) - -{ - LoadFile(icon_file, flags, desiredWidth, desiredHeight); -} - -wxIcon::~wxIcon() -{ -} - -bool wxIcon::LoadFile(const wxString& filename, long type, - int desiredWidth, int desiredHeight) -{ - UnRef(); - - m_refData = new wxIconRefData; - - wxBitmapHandler *handler = FindHandler(type); - - if ( handler ) - return handler->LoadFile(this, filename, type, desiredWidth, desiredHeight); - else - return FALSE; -} - diff --git a/src/qt/joystick.cpp b/src/qt/joystick.cpp deleted file mode 100644 index 6677277f48..0000000000 --- a/src/qt/joystick.cpp +++ /dev/null @@ -1,279 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: joystick.cpp -// Purpose: wxJoystick class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "joystick.h" -#endif - -#include - -IMPLEMENT_DYNAMIC_CLASS(wxJoystick, wxObject) - -// Attributes -//////////////////////////////////////////////////////////////////////////// - -wxPoint wxJoystick::GetPosition() const -{ - // TODO - return wxPoint(0, 0); -} - -int wxJoystick::GetZPosition() const -{ - // TODO - return 0; -} - -int wxJoystick::GetButtonState() const -{ - // TODO - return 0; -} - -int wxJoystick::GetPOVPosition() const -{ - // TODO - return 0; -} - -int wxJoystick::GetPOVCTSPosition() const -{ - // TODO - return 0; -} - -int wxJoystick::GetRudderPosition() const -{ - // TODO - return 0; -} - -int wxJoystick::GetUPosition() const -{ - // TODO - return 0; -} - -int wxJoystick::GetVPosition() const -{ - // TODO - return 0; -} - -int wxJoystick::GetMovementThreshold() const -{ - // TODO - return 0; -} - -void wxJoystick::SetMovementThreshold(int threshold) -{ - // TODO -} - -// Capabilities -//////////////////////////////////////////////////////////////////////////// - -bool wxJoystick::IsOk() const -{ - // TODO - return FALSE; -} - -int wxJoystick::GetNumberJoysticks() const -{ - // TODO - return 0; -} - -int wxJoystick::GetManufacturerId() const -{ - // TODO - return 0; -} - -int wxJoystick::GetProductId() const -{ - // TODO - return 0; -} - -wxString wxJoystick::GetProductName() const -{ - // TODO - return wxString(""); -} - -int wxJoystick::GetXMin() const -{ - // TODO - return 0; -} - -int wxJoystick::GetYMin() const -{ - // TODO - return 0; -} - -int wxJoystick::GetZMin() const -{ - // TODO - return 0; -} - -int wxJoystick::GetXMax() const -{ - // TODO - return 0; -} - -int wxJoystick::GetYMax() const -{ - // TODO - return 0; -} - -int wxJoystick::GetZMax() const -{ - // TODO - return 0; -} - -int wxJoystick::GetNumberButtons() const -{ - // TODO - return 0; -} - -int wxJoystick::GetNumberAxes() const -{ - // TODO - return 0; -} - -int wxJoystick::GetMaxButtons() const -{ - // TODO - return 0; -} - -int wxJoystick::GetMaxAxes() const -{ - // TODO - return 0; -} - -int wxJoystick::GetPollingMin() const -{ - // TODO - return 0; -} - -int wxJoystick::GetPollingMax() const -{ - // TODO - return 0; -} - -int wxJoystick::GetRudderMin() const -{ - // TODO - return 0; -} - -int wxJoystick::GetRudderMax() const -{ - // TODO - return 0; -} - -int wxJoystick::GetUMin() const -{ - // TODO - return 0; -} - -int wxJoystick::GetUMax() const -{ - // TODO - return 0; -} - -int wxJoystick::GetVMin() const -{ - // TODO - return 0; -} - -int wxJoystick::GetVMax() const -{ - // TODO - return 0; -} - -bool wxJoystick::HasRudder() const -{ - // TODO - return FALSE; -} - -bool wxJoystick::HasZ() const -{ - // TODO - return FALSE; -} - -bool wxJoystick::HasU() const -{ - // TODO - return FALSE; -} - -bool wxJoystick::HasV() const -{ - // TODO - return FALSE; -} - -bool wxJoystick::HasPOV() const -{ - // TODO - return FALSE; -} - -bool wxJoystick::HasPOV4Dir() const -{ - // TODO - return FALSE; -} - -bool wxJoystick::HasPOVCTS() const -{ - // TODO - return FALSE; -} - -// Operations -//////////////////////////////////////////////////////////////////////////// - -bool wxJoystick::SetCapture(wxWindow* win, int pollingFreq) -{ - // TODO - return FALSE; -} - -bool wxJoystick::ReleaseCapture() -{ - // TODO - return FALSE; -} - diff --git a/src/qt/listbox.cpp b/src/qt/listbox.cpp deleted file mode 100644 index a54523ab3d..0000000000 --- a/src/qt/listbox.cpp +++ /dev/null @@ -1,240 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: listbox.cpp -// Purpose: wxListBox -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "listbox.h" -#endif - -#include "wx/listbox.h" - -#include "wx/dynarray.h" -#include "wx/log.h" - -#if !USE_SHARED_LIBRARY - IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl) -#endif - -// ============================================================================ -// list box control implementation -// ============================================================================ - -// Listbox item -wxListBox::wxListBox() -{ - m_noItems = 0; - m_selected = 0; -} - -bool wxListBox::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, - const wxSize& size, - int n, const wxString choices[], - long style, - const wxValidator& validator, - const wxString& name) -{ - m_noItems = n; - m_selected = 0; - - SetName(name); - SetValidator(validator); - - if (parent) parent->AddChild(this); - - wxSystemSettings settings; - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW)); - - m_windowId = ( id == -1 ) ? (int)NewControlId() : id; - - // TODO create listbox - - return FALSE; -} - -wxListBox::~wxListBox() -{ -} - -void wxListBox::SetupColours() -{ - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW)); -} - -void wxListBox::SetFirstItem(int N) -{ - // TODO -} - -void wxListBox::SetFirstItem(const wxString& s) -{ - // TODO -} - -void wxListBox::Delete(int N) -{ - m_noItems --; - // TODO -} - -void wxListBox::Append(const wxString& item) -{ - m_noItems ++; - - // TODO -} - -void wxListBox::Append(const wxString& item, char *Client_data) -{ - m_noItems ++; - - // TODO -} - -void wxListBox::Set(int n, const wxString *choices, char** clientData) -{ - m_noItems = n; - - // TODO -} - -int wxListBox::FindString(const wxString& s) const -{ - // TODO - return -1; -} - -void wxListBox::Clear() -{ - m_noItems = 0; - // TODO -} - -void wxListBox::SetSelection(int N, bool select) -{ - // TODO -} - -bool wxListBox::Selected(int N) const -{ - // TODO - return FALSE; -} - -void wxListBox::Deselect(int N) -{ - // TODO -} - -char *wxListBox::GetClientData(int N) const -{ - // TODO - return (char *)NULL; -} - -void wxListBox::SetClientData(int N, char *Client_data) -{ - // TODO -} - -// Return number of selections and an array of selected integers -int wxListBox::GetSelections(wxArrayInt& aSelections) const -{ - aSelections.Empty(); - -/* TODO - if ((m_windowStyle & wxLB_MULTIPLE) || (m_windowStyle & wxLB_EXTENDED)) - { - int no_sel = ?? - for ( int n = 0; n < no_sel; n++ ) - aSelections.Add(??); - - return no_sel; - } - else // single-selection listbox - { - aSelections.Add(??); - - return 1; - } -*/ - return 0; -} - -// Get single selection, for single choice list items -int wxListBox::GetSelection() const -{ - // TODO - return -1; -} - -// Find string for position -wxString wxListBox::GetString(int N) const -{ - // TODO - return wxString(""); -} - -void wxListBox::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -void wxListBox::InsertItems(int nItems, const wxString items[], int pos) -{ - m_noItems += nItems; - - // TODO -} - -void wxListBox::SetString(int N, const wxString& s) -{ - // TODO -} - -int wxListBox::Number () const -{ - return m_noItems; -} - -// For single selection items only -wxString wxListBox::GetStringSelection () const -{ - int sel = GetSelection (); - if (sel > -1) - return this->GetString (sel); - else - return wxString(""); -} - -bool wxListBox::SetStringSelection (const wxString& s, bool flag) -{ - int sel = FindString (s); - if (sel > -1) - { - SetSelection (sel, flag); - return TRUE; - } - else - return FALSE; -} - -void wxListBox::Command (wxCommandEvent & event) -{ - if (event.m_extraLong) - SetSelection (event.m_commandInt); - else - { - Deselect (event.m_commandInt); - return; - } - ProcessCommand (event); -} - diff --git a/src/qt/mdi.cpp b/src/qt/mdi.cpp deleted file mode 100644 index bcd7785c0d..0000000000 --- a/src/qt/mdi.cpp +++ /dev/null @@ -1,263 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: mdi.cpp -// Purpose: MDI classes -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "mdi.h" -#endif - -#include "wx/mdi.h" - -extern wxList wxModelessWindows; - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame, wxFrame) -IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame, wxFrame) -IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxWindow) - -BEGIN_EVENT_TABLE(wxMDIParentFrame, wxFrame) - EVT_SIZE(wxMDIParentFrame::OnSize) - EVT_ACTIVATE(wxMDIParentFrame::OnActivate) - EVT_SYS_COLOUR_CHANGED(wxMDIParentFrame::OnSysColourChanged) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxMDIClientWindow, wxWindow) - EVT_SCROLL(wxMDIClientWindow::OnScroll) -END_EVENT_TABLE() - -#endif - -// Parent frame - -wxMDIParentFrame::wxMDIParentFrame() -{ -} - -bool wxMDIParentFrame::Create(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - if (!parent) - wxTopLevelWindows.Append(this); - - SetName(name); - m_windowStyle = style; - - if (parent) parent->AddChild(this); - - if ( id > -1 ) - m_windowId = id; - else - m_windowId = (int)NewControlId(); - - // TODO: create MDI parent frame - - wxModelessWindows.Append(this); - - return TRUE; -} - -wxMDIParentFrame::~wxMDIParentFrame() -{ -} - -// Get size *available for subwindows* i.e. excluding menu bar. -void wxMDIParentFrame::GetClientSize(int *x, int *y) const -{ - // TODO -} - -void wxMDIParentFrame::SetMenuBar(wxMenuBar *menu_bar) -{ - // TODO - if (!menu_bar) - { - m_frameMenuBar = NULL; - return; - } - - if (menu_bar->m_menuBarFrame) - return; - - m_frameMenuBar = menu_bar; -} - -void wxMDIParentFrame::OnSize(wxSizeEvent& event) -{ -#if USE_CONSTRAINTS - if (GetAutoLayout()) - Layout(); -#endif - int x = 0; - int y = 0; - int width, height; - GetClientSize(&width, &height); - - if ( GetClientWindow() ) - GetClientWindow()->SetSize(x, y, width, height); -} - -void wxMDIParentFrame::OnActivate(wxActivateEvent& event) -{ - // Do nothing -} - -// Returns the active MDI child window -wxMDIChildFrame *wxMDIParentFrame::GetActiveChild() const -{ - // TODO - return NULL; -} - -// Create the client window class (don't Create the window, -// just return a new class) -wxMDIClientWindow *wxMDIParentFrame::OnCreateClient() -{ - return new wxMDIClientWindow ; -} - -// Responds to colour changes, and passes event on to children. -void wxMDIParentFrame::OnSysColourChanged(wxSysColourChangedEvent& event) -{ - // TODO - - // Propagate the event to the non-top-level children - wxFrame::OnSysColourChanged(event); -} - -// MDI operations -void wxMDIParentFrame::Cascade() -{ - // TODO -} - -void wxMDIParentFrame::Tile() -{ - // TODO -} - -void wxMDIParentFrame::ArrangeIcons() -{ - // TODO -} - -void wxMDIParentFrame::ActivateNext() -{ - // TODO -} - -void wxMDIParentFrame::ActivatePrevious() -{ - // TODO -} - -// Child frame - -wxMDIChildFrame::wxMDIChildFrame() -{ -} - -bool wxMDIChildFrame::Create(wxMDIParentFrame *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - SetName(name); - - if ( id > -1 ) - m_windowId = id; - else - m_windowId = (int)NewControlId(); - - if (parent) parent->AddChild(this); - - // TODO: create child frame - - wxModelessWindows.Append(this); - return FALSE; -} - -wxMDIChildFrame::~wxMDIChildFrame() -{ -} - -// Set the client size (i.e. leave the calculation of borders etc. -// to wxWindows) -void wxMDIChildFrame::SetClientSize(int width, int height) -{ - // TODO -} - -void wxMDIChildFrame::GetPosition(int *x, int *y) const -{ - // TODO -} - -void wxMDIChildFrame::SetMenuBar(wxMenuBar *menu_bar) -{ - // TODO - if (!menu_bar) - { - m_frameMenuBar = NULL; - return; - } - - if (menu_bar->m_menuBarFrame) - return; - m_frameMenuBar = menu_bar; -} - -// MDI operations -void wxMDIChildFrame::Maximize() -{ - // TODO -} - -void wxMDIChildFrame::Restore() -{ - // TODO -} - -void wxMDIChildFrame::Activate() -{ - // TODO -} - -// Client window - -wxMDIClientWindow::wxMDIClientWindow() -{ -} - -wxMDIClientWindow::~wxMDIClientWindow() -{ -} - -bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style) -{ - // TODO create client window - m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE); - - return FALSE; -} - -// Explicitly call default scroll behaviour -void wxMDIClientWindow::OnScroll(wxScrollEvent& event) -{ - Default(); // Default processing -} - diff --git a/src/qt/menu.cpp b/src/qt/menu.cpp deleted file mode 100644 index 217e6c8b88..0000000000 --- a/src/qt/menu.cpp +++ /dev/null @@ -1,568 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: menu.cpp -// Purpose: wxMenu, wxMenuBar, wxMenuItem -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -// ============================================================================ -// headers & declarations -// ============================================================================ - -// wxWindows headers -// ----------------- - -#ifdef __GNUG__ -#pragma implementation "menu.h" -#pragma implementation "menuitem.h" -#endif - -#include "wx/menu.h" -#include "wx/menuitem.h" -#include "wx/log.h" - -// other standard headers -// ---------------------- -#include - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxMenu, wxEvtHandler) -IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxEvtHandler) -#endif - -// ============================================================================ -// implementation -// ============================================================================ - -// Menus - -// Construct a menu with optional title (then use append) -wxMenu::wxMenu(const wxString& title, const wxFunction func) -{ - m_title = title; - m_parent = NULL; - m_eventHandler = this; - m_noItems = 0; - m_menuBar = NULL; - if (m_title != "") - { - Append(-2, m_title) ; - AppendSeparator() ; - } - - Callback(func); - - // TODO create menu -} - -// The wxWindow destructor will take care of deleting the submenus. -wxMenu::~wxMenu() -{ - // TODO destroy menu and children - - wxNode *node = m_menuItems.First(); - while (node) - { - wxMenuItem *item = (wxMenuItem *)node->Data(); - - // Delete child menus. - // Beware: they must not be appended to children list!!! - // (because order of delete is significant) - if (item->GetSubMenu()) - item->DeleteSubMenu(); - - wxNode *next = node->Next(); - delete item; - delete node; - node = next; - } -} - -void wxMenu::Break() -{ - // TODO -} - -// function appends a new item or submenu to the menu -void wxMenu::Append(wxMenuItem *pItem) -{ - // TODO - - wxCHECK_RET( pItem != NULL, "can't append NULL item to the menu" ); - - m_menuItems.Append(pItem); - - m_noItems++; -} - -void wxMenu::AppendSeparator() -{ - // TODO - Append(new wxMenuItem(this, ID_SEPARATOR)); -} - -// Pullright item -void wxMenu::Append(int Id, const wxString& label, wxMenu *SubMenu, - const wxString& helpString) -{ - Append(new wxMenuItem(this, Id, label, helpString, FALSE, SubMenu)); -} - -// Ordinary menu item -void wxMenu::Append(int Id, const wxString& label, - const wxString& helpString, bool checkable) -{ - // 'checkable' parameter is useless for Windows. - Append(new wxMenuItem(this, Id, label, helpString, checkable)); -} - -void wxMenu::Delete(int id) -{ - wxNode *node; - wxMenuItem *item; - int pos; - - for (pos = 0, node = m_menuItems.First(); node; node = node->Next(), pos++) { - item = (wxMenuItem *)node->Data(); - if (item->GetId() == id) - break; - } - - if (!node) - return; - - m_menuItems.DeleteNode(node); - delete item; - - // TODO -} - -void wxMenu::Enable(int Id, bool Flag) -{ - wxMenuItem *item = FindItemForId(Id); - wxCHECK_RET( item != NULL, "can't enable non-existing menu item" ); - - item->Enable(Flag); -} - -bool wxMenu::Enabled(int Id) const -{ - wxMenuItem *item = FindItemForId(Id); - wxCHECK( item != NULL, FALSE ); - - return item->IsEnabled(); -} - -void wxMenu::Check(int Id, bool Flag) -{ - wxMenuItem *item = FindItemForId(Id); - wxCHECK_RET( item != NULL, "can't get status of non-existing menu item" ); - - item->Check(Flag); -} - -bool wxMenu::Checked(int Id) const -{ - wxMenuItem *item = FindItemForId(Id); - wxCHECK( item != NULL, FALSE ); - - return item->IsChecked(); -} - -void wxMenu::SetTitle(const wxString& label) -{ - m_title = label ; - // TODO -} - -const wxString& wxMenu::GetTitle() const -{ - return m_title; -} - -void wxMenu::SetLabel(int id, const wxString& label) -{ - wxMenuItem *item = FindItemForId(id) ; - if (item==NULL) - return; - - if (item->GetSubMenu()==NULL) - { - // TODO - } - else - { - // TODO - } - item->SetName(label); -} - -wxString wxMenu::GetLabel(int Id) const -{ - // TODO - return wxString("") ; -} - -// Finds the item id matching the given string, -1 if not found. -int wxMenu::FindItem (const wxString& itemString) const -{ - char buf1[200]; - char buf2[200]; - wxStripMenuCodes ((char *)(const char *)itemString, buf1); - - for (wxNode * node = m_menuItems.First (); node; node = node->Next ()) - { - wxMenuItem *item = (wxMenuItem *) node->Data (); - if (item->GetSubMenu()) - { - int ans = item->GetSubMenu()->FindItem(itemString); - if (ans > -1) - return ans; - } - if ( !item->IsSeparator() ) - { - wxStripMenuCodes((char *)item->GetName().c_str(), buf2); - if (strcmp(buf1, buf2) == 0) - return item->GetId(); - } - } - - return -1; -} - -wxMenuItem *wxMenu::FindItemForId(int itemId, wxMenu ** itemMenu) const -{ - if (itemMenu) - *itemMenu = NULL; - for (wxNode * node = m_menuItems.First (); node; node = node->Next ()) - { - wxMenuItem *item = (wxMenuItem *) node->Data (); - - if (item->GetId() == itemId) - { - if (itemMenu) - *itemMenu = (wxMenu *) this; - return item; - } - - if (item->GetSubMenu()) - { - wxMenuItem *ans = item->GetSubMenu()->FindItemForId (itemId, itemMenu); - if (ans) - return ans; - } - } - - if (itemMenu) - *itemMenu = NULL; - return NULL; -} - -void wxMenu::SetHelpString(int itemId, const wxString& helpString) -{ - wxMenuItem *item = FindItemForId (itemId); - if (item) - item->SetHelp(helpString); -} - -wxString wxMenu::GetHelpString (int itemId) const -{ - wxMenuItem *item = FindItemForId (itemId); - wxString str(""); - return (item == NULL) ? str : item->GetHelp(); -} - -void wxMenu::ProcessCommand(wxCommandEvent & event) -{ - bool processed = FALSE; - - // Try a callback - if (m_callback) - { - (void) (*(m_callback)) (*this, event); - processed = TRUE; - } - - // Try the menu's event handler - if ( !processed && GetEventHandler()) - { - processed = GetEventHandler()->ProcessEvent(event); - } - - // Try the window the menu was popped up from (and up - // through the hierarchy) - if ( !processed && GetInvokingWindow()) - processed = GetInvokingWindow()->ProcessEvent(event); -} - -bool wxWindow::PopupMenu(wxMenu *menu, int x, int y) -{ - // TODO - return FALSE; -} - -// Menu Bar -wxMenuBar::wxMenuBar() -{ - m_eventHandler = this; - m_menuCount = 0; - m_menus = NULL; - m_titles = NULL; - m_menuBarFrame = NULL; - - // TODO -} - -wxMenuBar::wxMenuBar(int n, wxMenu *Mmnus[], const wxString titles[]) -{ - m_eventHandler = this; - m_menuCount = n; - m_menus = menus; - m_titles = new wxString[n]; - int i; - for ( i = 0; i < n; i++ ) - m_titles[i] = titles[i]; - m_menuBarFrame = NULL; - - // TODO -} - -wxMenuBar::~wxMenuBar() -{ - int i; - for (i = 0; i < m_menuCount; i++) - { - delete m_menus[i]; - } - delete[] m_menus; - delete[] m_titles; - - // TODO -} - -// Must only be used AFTER menu has been attached to frame, -// otherwise use individual menus to enable/disable items -void wxMenuBar::Enable(int id, bool flag) -{ - wxMenu *itemMenu = NULL; - wxMenuItem *item = FindItemForId(id, &itemMenu) ; - if (!item) - return; - - // TODO -} - -void wxMenuBar::EnableTop(int pos, bool flag) -{ - // TODO -} - -// Must only be used AFTER menu has been attached to frame, -// otherwise use individual menus -void wxMenuBar::Check(int id, bool flag) -{ - wxMenu *itemMenu = NULL; - wxMenuItem *item = FindItemForId(id, &itemMenu) ; - if (!item) - return; - - if (!item->IsCheckable()) - return ; - - // TODO -} - -bool wxMenuBar::Checked(int id) const -{ - wxMenu *itemMenu = NULL; - wxMenuItem *item = FindItemForId(id, &itemMenu) ; - if (!item) - return FALSE; - - // TODO - return FALSE; -} - -bool wxMenuBar::Enabled(int id) const -{ - wxMenu *itemMenu = NULL; - wxMenuItem *item = FindItemForId(id, &itemMenu) ; - if (!item) - return FALSE; - - // TODO - return FALSE ; -} - - -void wxMenuBar::SetLabel(int id, const wxString& label) -{ - wxMenu *itemMenu = NULL; - wxMenuItem *item = FindItemForId(id, &itemMenu) ; - - if (!item) - return; - - // TODO -} - -wxString wxMenuBar::GetLabel(int id) const -{ - wxMenu *itemMenu = NULL; - wxMenuItem *item = FindItemForId(id, &itemMenu) ; - - if (!item) - return wxString(""); - - // TODO - return wxString("") ; -} - -void wxMenuBar::SetLabelTop(int pos, const wxString& label) -{ - // TODO -} - -wxString wxMenuBar::GetLabelTop(int pos) const -{ - // TODO - return wxString(""); -} - -bool wxMenuBar::OnDelete(wxMenu *a_menu, int pos) -{ - // TODO - return FALSE; -} - -bool wxMenuBar::OnAppend(wxMenu *a_menu, const char *title) -{ - // TODO - return FALSE; -} - -void wxMenuBar::Append (wxMenu * menu, const wxString& title) -{ - if (!OnAppend(menu, title)) - return; - - m_menuCount ++; - wxMenu **new_menus = new wxMenu *[m_menuCount]; - wxString *new_titles = new wxString[m_menuCount]; - int i; - - for (i = 0; i < m_menuCount - 1; i++) - { - new_menus[i] = m_menus[i]; - m_menus[i] = NULL; - new_titles[i] = m_titles[i]; - m_titles[i] = ""; - } - if (m_menus) - { - delete[]m_menus; - delete[]m_titles; - } - m_menus = new_menus; - m_titles = new_titles; - - m_menus[m_menuCount - 1] = (wxMenu *)menu; - m_titles[m_menuCount - 1] = title; - - // TODO -} - -void wxMenuBar::Delete(wxMenu * menu, int i) -{ - int j; - int ii = (int) i; - - if (menu != 0) - { - for (ii = 0; ii < m_menuCount; ii++) - { - if (m_menus[ii] == menu) - break; - } - if (ii >= m_menuCount) - return; - } else - { - if (ii < 0 || ii >= m_menuCount) - return; - menu = m_menus[ii]; - } - - if (!OnDelete(menu, ii)) - return; - - menu->SetParent(NULL); - - -- m_menuCount; - for (j = ii; j < m_menuCount; j++) - { - m_menus[j] = m_menus[j + 1]; - m_titles[j] = m_titles[j + 1]; - } -} - -// Find the menu menuString, item itemString, and return the item id. -// Returns -1 if none found. -int wxMenuBar::FindMenuItem (const wxString& menuString, const wxString& itemString) const -{ - char buf1[200]; - char buf2[200]; - wxStripMenuCodes ((char *)(const char *)menuString, buf1); - int i; - for (i = 0; i < m_menuCount; i++) - { - wxStripMenuCodes ((char *)(const char *)m_titles[i], buf2); - if (strcmp (buf1, buf2) == 0) - return m_menus[i]->FindItem (itemString); - } - return -1; -} - -wxMenuItem *wxMenuBar::FindItemForId (int Id, wxMenu ** itemMenu) const -{ - if (itemMenu) - *itemMenu = NULL; - - wxMenuItem *item = NULL; - int i; - for (i = 0; i < m_menuCount; i++) - if ((item = m_menus[i]->FindItemForId (Id, itemMenu))) - return item; - return NULL; -} - -void wxMenuBar::SetHelpString (int Id, const wxString& helpString) -{ - int i; - for (i = 0; i < m_menuCount; i++) - { - if (m_menus[i]->FindItemForId (Id)) - { - m_menus[i]->SetHelpString (Id, helpString); - return; - } - } -} - -wxString wxMenuBar::GetHelpString (int Id) const -{ - int i; - for (i = 0; i < m_menuCount; i++) - { - if (m_menus[i]->FindItemForId (Id)) - eturn wxString(m_menus[i]->GetHelpString (Id)); - } - return wxString(""); -} - - diff --git a/src/qt/notebook.cpp b/src/qt/notebook.cpp deleted file mode 100644 index aecb879f4b..0000000000 --- a/src/qt/notebook.cpp +++ /dev/null @@ -1,371 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: notebook.cpp -// Purpose: implementation of wxNotebook -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- -#ifdef __GNUG__ -#pragma implementation "notebook.h" -#endif - -#include -#include -#include -#include - -// ---------------------------------------------------------------------------- -// macros -// ---------------------------------------------------------------------------- - -// check that the page index is valid -#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount())) - -// ---------------------------------------------------------------------------- -// event table -// ---------------------------------------------------------------------------- - -#if !USE_SHARED_LIBRARIES -BEGIN_EVENT_TABLE(wxNotebook, wxControl) - EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange) - - EVT_SIZE(wxNotebook::OnSize) - EVT_SET_FOCUS(wxNotebook::OnSetFocus) - EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey) -END_EVENT_TABLE() - -IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent) -#endif - -// ============================================================================ -// implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// wxNotebook construction -// ---------------------------------------------------------------------------- - -// common part of all ctors -void wxNotebook::Init() -{ - m_pImageList = NULL; - m_nSelection = -1; -} - -// default for dynamic class -wxNotebook::wxNotebook() -{ - Init(); -} - -// the same arguments as for wxControl -wxNotebook::wxNotebook(wxWindow *parent, - wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - Init(); - - Create(parent, id, pos, size, style, name); -} - -// Create() function -bool wxNotebook::Create(wxWindow *parent, - wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - // base init - SetName(name); - SetParent(parent); - - m_windowId = id == -1 ? NewControlId() : id; - - // colors and font - m_backgroundColour = wxColour(GetSysColor(COLOR_BTNFACE)); - m_foregroundColour = *wxBLACK ; - - // style - m_windowStyle = style; - - if ( parent != NULL ) - parent->AddChild(this); - - // TODO - - return FALSE; -} - -// dtor -wxNotebook::~wxNotebook() -{ -} - -// ---------------------------------------------------------------------------- -// wxNotebook accessors -// ---------------------------------------------------------------------------- -int wxNotebook::GetPageCount() const -{ - return m_aPages.Count(); -} - -int wxNotebook::GetRowCount() const -{ - // TODO - return 0; -} - -int wxNotebook::SetSelection(int nPage) -{ - wxASSERT( IS_VALID_PAGE(nPage) ); - - ChangePage(m_nSelection, nPage); - - // TODO - return 0; -} - -void wxNotebook::AdvanceSelection(bool bForward) -{ - int nSel = GetSelection(); - int nMax = GetPageCount() - 1; - if ( bForward ) - SetSelection(nSel == nMax ? 0 : nSel + 1); - else - SetSelection(nSel == 0 ? nMax : nSel - 1); -} - -bool wxNotebook::SetPageText(int nPage, const wxString& strText) -{ - wxASSERT( IS_VALID_PAGE(nPage) ); - - // TODO - return FALSE; -} - -wxString wxNotebook::GetPageText(int nPage) const -{ - wxASSERT( IS_VALID_PAGE(nPage) ); - - // TODO - return wxString(""); -} - -int wxNotebook::GetPageImage(int nPage) const -{ - wxASSERT( IS_VALID_PAGE(nPage) ); - - // TODO - return 0; -} - -bool wxNotebook::SetPageImage(int nPage, int nImage) -{ - wxASSERT( IS_VALID_PAGE(nPage) ); - - // TODO - return FALSE; -} - -void wxNotebook::SetImageList(wxImageList* imageList) -{ - m_pImageList = imageList; - // TODO -} - -// ---------------------------------------------------------------------------- -// wxNotebook operations -// ---------------------------------------------------------------------------- - -// remove one page from the notebook -bool wxNotebook::DeletePage(int nPage) -{ - wxCHECK( IS_VALID_PAGE(nPage), FALSE ); - - // TODO: delete native widget page - - delete m_aPages[nPage]; - m_aPages.Remove(nPage); - - return TRUE; -} - -// remove all pages -bool wxNotebook::DeleteAllPages() -{ - // TODO: delete native widget pages - - int nPageCount = GetPageCount(); - int nPage; - for ( nPage = 0; nPage < nPageCount; nPage++ ) - delete m_aPages[nPage]; - - m_aPages.Clear(); - - return TRUE; -} - -// add a page to the notebook -bool wxNotebook::AddPage(wxNotebookPage *pPage, - const wxString& strText, - bool bSelect, - int imageId) -{ - return InsertPage(GetPageCount(), pPage, strText, bSelect, imageId); -} - -// same as AddPage() but does it at given position -bool wxNotebook::InsertPage(int nPage, - wxNotebookPage *pPage, - const wxString& strText, - bool bSelect, - int imageId) -{ - wxASSERT( pPage != NULL ); - wxCHECK( IS_VALID_PAGE(nPage) || nPage == GetPageCount(), FALSE ); - - // TODO: insert native widget page - - // save the pointer to the page - m_aPages.Insert(pPage, nPage); - - // some page must be selected: either this one or the first one if there is - // still no selection - if ( bSelect ) - m_nSelection = nPage; - else if ( m_nSelection == -1 ) - m_nSelection = 0; - - return TRUE; -} - -// ---------------------------------------------------------------------------- -// wxNotebook callbacks -// ---------------------------------------------------------------------------- - -// @@@ OnSize() is used for setting the font when it's called for the first -// time because doing it in ::Create() doesn't work (for unknown reasons) -void wxNotebook::OnSize(wxSizeEvent& event) -{ - static bool s_bFirstTime = TRUE; - if ( s_bFirstTime ) { - // TODO: any first-time-size processing. - s_bFirstTime = FALSE; - } - - // TODO: all this may or may not be necessary for your platform - - // emulate page change (it's esp. important to do it first time because - // otherwise our page would stay invisible) - int nSel = m_nSelection; - m_nSelection = -1; - SetSelection(nSel); - - // fit the notebook page to the tab control's display area - int w, hl - GetSize(&w, &h); - - uint nCount = m_aPages.Count(); - for ( uint nPage = 0; nPage < nCount; nPage++ ) { - wxNotebookPage *pPage = m_aPages[nPage]; - pPage->SetSize(0, 0, w, h); - if ( pPage->GetAutoLayout() ) - pPage->Layout(); - } - - // Processing continues to next OnSize - event.Skip(); -} - -void wxNotebook::OnSelChange(wxNotebookEvent& event) -{ - // is it our tab control? - if ( event.GetEventObject() == this ) - ChangePage(event.GetOldSelection(), event.GetSelection()); - - // we want to give others a chance to process this message as well - event.Skip(); -} - -void wxNotebook::OnSetFocus(wxFocusEvent& event) -{ - // set focus to the currently selected page if any - if ( m_nSelection != -1 ) - m_aPages[m_nSelection]->SetFocus(); - - event.Skip(); -} - -void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event) -{ - if ( event.IsWindowChange() ) { - // change pages - AdvanceSelection(event.GetDirection()); - } - else { - // pass to the parent - if ( GetParent() ) { - event.SetCurrentFocus(this); - GetParent()->ProcessEvent(event); - } - } -} - -// ---------------------------------------------------------------------------- -// wxNotebook base class virtuals -// ---------------------------------------------------------------------------- - -// override these 2 functions to do nothing: everything is done in OnSize - -void wxNotebook::SetConstraintSizes(bool /* recurse */) -{ - // don't set the sizes of the pages - their correct size is not yet known - wxControl::SetConstraintSizes(FALSE); -} - -bool wxNotebook::DoPhase(int /* nPhase */) -{ - return TRUE; -} - -void wxNotebook::Command(wxCommandEvent& event) -{ - wxFAIL_MSG("wxNotebook::Command not implemented"); -} - -// ---------------------------------------------------------------------------- -// wxNotebook helper functions -// ---------------------------------------------------------------------------- - -// hide the currently active panel and show the new one -void wxNotebook::ChangePage(int nOldSel, int nSel) -{ - wxASSERT( nOldSel != nSel ); // impossible - - if ( nOldSel != -1 ) { - m_aPages[nOldSel]->Show(FALSE); - } - - wxNotebookPage *pPage = m_aPages[nSel]; - pPage->Show(TRUE); - pPage->SetFocus(); - - m_nSelection = nSel; -} - diff --git a/src/qt/palette.cpp b/src/qt/palette.cpp deleted file mode 100644 index 445b545f0c..0000000000 --- a/src/qt/palette.cpp +++ /dev/null @@ -1,91 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: palette.cpp -// Purpose: wxPalette -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "palette.h" -#endif - -#include "wx/palette.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject) -#endif - -/* - * Palette - * - */ - -wxPaletteRefData::wxPaletteRefData() -{ - // TODO -} - -wxPaletteRefData::~wxPaletteRefData() -{ - // TODO -} - -wxPalette::wxPalette() -{ -} - -wxPalette::wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue) -{ - Create(n, red, green, blue); -} - -wxPalette::~wxPalette() -{ -} - -bool wxPalette::FreeResource(bool force) -{ - if ( M_PALETTEDATA && M_PALETTEDATA->m_hPalette) - { - DeleteObject((HPALETTE)M_PALETTEDATA->m_hPalette); - } - return TRUE; -} - -bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue) -{ - UnRef(); - - m_refData = new wxPaletteRefData; - - // TODO - - return FALSE; -} - -int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const -{ - if ( !m_refData ) - return FALSE; - - // TODO - return FALSE; -} - -bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsigned char *blue) const -{ - if ( !m_refData ) - return FALSE; - - if (index < 0 || index > 255) - return FALSE; - - // TODO - return FALSE; -} - - diff --git a/src/qt/pen.cpp b/src/qt/pen.cpp deleted file mode 100644 index d7b2ce264c..0000000000 --- a/src/qt/pen.cpp +++ /dev/null @@ -1,229 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: pen.cpp -// Purpose: wxPen -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "pen.h" -#endif - -#include "wx/setup.h" -#include "wx/utils.h" -#include "wx/pen.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject) -#endif - -wxPenRefData::wxPenRefData() -{ - m_style = wxSOLID; - m_width = 1; - m_join = wxJOIN_ROUND ; - m_cap = wxCAP_ROUND ; - m_nbDash = 0 ; - m_dash = 0 ; -/* TODO: null data - m_hPen = 0; -*/ -} - -wxPenRefData::wxPenRefData(const wxPenRefData& data) -{ - m_style = data.m_style; - m_width = data.m_width; - m_join = data.m_join; - m_cap = data.m_cap; - m_nbDash = data.m_nbDash; - m_dash = data.m_dash; - m_colour = data.m_colour; -/* TODO: null data - m_hPen = 0; -*/ -} - -wxPenRefData::~wxPenRefData() -{ - // TODO: delete data -} - -// Pens - -wxPen::wxPen() -{ - if ( wxThePenList ) - wxThePenList->AddPen(this); -} - -wxPen::~wxPen() -{ - if (wxThePenList) - wxThePenList->RemovePen(this); -} - -// Should implement Create -wxPen::wxPen(const wxColour& col, int Width, int Style) -{ - m_refData = new wxPenRefData; - - M_PENDATA->m_colour = col; - M_PENDATA->m_width = Width; - M_PENDATA->m_style = Style; - M_PENDATA->m_join = wxJOIN_ROUND ; - M_PENDATA->m_cap = wxCAP_ROUND ; - M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; - - RealizeResource(); - - if ( wxThePenList ) - wxThePenList->AddPen(this); -} - -wxPen::wxPen(const wxBitmap& stipple, int Width) -{ - m_refData = new wxPenRefData; - - M_PENDATA->m_stipple = stipple; - M_PENDATA->m_width = Width; - M_PENDATA->m_style = wxSTIPPLE; - M_PENDATA->m_join = wxJOIN_ROUND ; - M_PENDATA->m_cap = wxCAP_ROUND ; - M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; - - RealizeResource(); - - if ( wxThePenList ) - wxThePenList->AddPen(this); -} - -wxPen::wxPen(const wxString& col, int Width, int Style) -{ - m_refData = new wxPenRefData; - - M_PENDATA->m_colour = col; - M_PENDATA->m_width = Width; - M_PENDATA->m_style = Style; - M_PENDATA->m_join = wxJOIN_ROUND ; - M_PENDATA->m_cap = wxCAP_ROUND ; - M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; - - RealizeResource(); - - if ( wxThePenList ) - wxThePenList->AddPen(this); -} - -void wxPen::Unshare() -{ - // Don't change shared data - if (!m_refData) - { - m_refData = new wxPenRefData(); - } - else - { - wxPenRefData* ref = new wxPenRefData(*(wxPenRefData*)m_refData); - UnRef(); - m_refData = ref; - } -} - -void wxPen::SetColour(const wxColour& col) -{ - Unshare(); - - M_PENDATA->m_colour = col; - - RealizeResource(); -} - -void wxPen::SetColour(const wxString& col) -{ - Unshare(); - - M_PENDATA->m_colour = col; - - RealizeResource(); -} - -void wxPen::SetColour(const unsigned char r, const unsigned char g, const unsigned char b) -{ - Unshare(); - - M_PENDATA->m_colour.Set(r, g, b); - - RealizeResource(); -} - -void wxPen::SetWidth(int Width) -{ - Unshare(); - - M_PENDATA->m_width = Width; - - RealizeResource(); -} - -void wxPen::SetStyle(int Style) -{ - Unshare(); - - M_PENDATA->m_style = Style; - - RealizeResource(); -} - -void wxPen::SetStipple(const wxBitmap& Stipple) -{ - Unshare(); - - M_PENDATA->m_stipple = Stipple; - M_PENDATA->m_style = wxSTIPPLE; - - RealizeResource(); -} - -void wxPen::SetDashes(int nb_dashes, const wxDash *Dash) -{ - Unshare(); - - M_PENDATA->m_nbDash = nb_dashes; - M_PENDATA->m_dash = (wxDash *)Dash; - - RealizeResource(); -} - -void wxPen::SetJoin(int Join) -{ - Unshare(); - - M_PENDATA->m_join = Join; - - RealizeResource(); -} - -void wxPen::SetCap(int Cap) -{ - Unshare(); - - M_PENDATA->m_cap = Cap; - - RealizeResource(); -} - -bool wxPen::RealizeResource() -{ - // TODO: create actual pen - return FALSE; -} - - diff --git a/src/qt/radiobox.cpp b/src/qt/radiobox.cpp deleted file mode 100644 index da582d0e52..0000000000 --- a/src/qt/radiobox.cpp +++ /dev/null @@ -1,194 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: radiobox.cpp -// Purpose: wxRadioBox -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "radiobox.h" -#endif - -#include "wx/radiobox.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) -#endif - -// Radio box item -wxRadioBox::wxRadioBox() -{ - m_selectedButton = -1; - m_noItems = 0; - m_noRowsOrCols = 0; - m_majorDim = 0 ; -} - -bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, - int n, const wxString choices[], - int majorDim, long style, - const wxValidator& val, const wxString& name) -{ - m_selectedButton = -1; - m_noItems = n; - - SetName(name); - SetValidator(val); - - parent->AddChild(this); - - m_windowStyle = (long&)style; - - if (id == -1) - m_windowId = NewControlId(); - else - m_windowId = id; - - m_noRowsOrCols = majorDim; - - if (majorDim==0) - m_majorDim = n ; - else - m_majorDim = majorDim ; - - - // TODO create radiobox - return FALSE; -} - - -wxRadioBox::~wxRadioBox() -{ - // TODO -} - -wxString wxRadioBox::GetLabel(int item) const -{ - // TODO - return wxString(""); -} - -void wxRadioBox::SetLabel(int item, const wxString& label) -{ - // TODO -} - -int wxRadioBox::FindString(const wxString& s) const -{ - // TODO - return -1; -} - -void wxRadioBox::SetSelection(int n) -{ - if ((n < 0) || (n >= m_noItems)) - return; - // TODO - - m_selectedButton = n; -} - -// Get single selection, for single choice list items -int wxRadioBox::GetSelection() const -{ - return m_selectedButton; -} - -// Find string for position -wxString wxRadioBox::GetString(int n) const -{ - // TODO - return wxString(""); -} - -void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -void wxRadioBox::GetSize(int *width, int *height) const -{ - // TODO -} - -void wxRadioBox::GetPosition(int *x, int *y) const -{ - // TODO -} - -wxString wxRadioBox::GetLabel() const -{ - // TODO - return wxString(""); -} - -void wxRadioBox::SetLabel(const wxString& label) -{ - // TODO -} - -void wxRadioBox::SetFocus() -{ - // TODO -} - -bool wxRadioBox::Show(bool show) -{ - // TODO - return FALSE; -} - -// Enable a specific button -void wxRadioBox::Enable(int item, bool enable) -{ - // TODO -} - -// Enable all controls -void wxRadioBox::Enable(bool enable) -{ - wxControl::Enable(enable); - - // TODO -} - -// Show a specific button -void wxRadioBox::Show(int item, bool show) -{ - // TODO -} - -// For single selection items only -wxString wxRadioBox::GetStringSelection () const -{ - int sel = GetSelection (); - if (sel > -1) - return this->GetString (sel); - else - return wxString(""); -} - -bool wxRadioBox::SetStringSelection (const wxString& s) -{ - int sel = FindString (s); - if (sel > -1) - { - SetSelection (sel); - return TRUE; - } - else - return FALSE; -} - -void wxRadioBox::Command (wxCommandEvent & event) -{ - SetSelection (event.m_commandInt); - ProcessCommand (event); -} - - diff --git a/src/qt/radiobut.cpp b/src/qt/radiobut.cpp deleted file mode 100644 index 65baab38b6..0000000000 --- a/src/qt/radiobut.cpp +++ /dev/null @@ -1,68 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: radiobut.cpp -// Purpose: wxRadioButton -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "radiobut.h" -#endif - -#include "wx/radiobut.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl) -#endif - -bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - - if (parent) parent->AddChild(this); - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - m_windowStyle = style ; - - // TODO create radiobutton - return FALSE; -} - -void wxRadioButton::SetLabel(const wxString& label) -{ - // TODO -} - -void wxRadioButton::SetValue(bool value) -{ - // TODO -} - -// Get single selection, for single choice list items -bool wxRadioButton::GetValue() const -{ - // TODO - return FALSE; -} - -void wxRadioButton::Command (wxCommandEvent & event) -{ - SetValue ( (event.m_commandInt != 0) ); - ProcessCommand (event); -} - - diff --git a/src/qt/region.cpp b/src/qt/region.cpp deleted file mode 100644 index d03d8e8020..0000000000 --- a/src/qt/region.cpp +++ /dev/null @@ -1,373 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// File: region.cpp -// Purpose: Region class -// Author: Markus Holzem/Julian Smart/AUTHOR -// Created: Fri Oct 24 10:46:34 MET 1997 -// RCS-ID: $Id$ -// Copyright: (c) 1997 Markus Holzem/Julian Smart/AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "region.h" -#endif - -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include "wx/msw/region.h" -#include "wx/gdicmn.h" - -#include - -#if !USE_SHARED_LIBRARY - IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject) - IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator, wxObject) -#endif - -//----------------------------------------------------------------------------- -// wxRegionRefData implementation -//----------------------------------------------------------------------------- - -class WXDLLEXPORT wxRegionRefData : public wxGDIRefData { -public: - wxRegionRefData() - { - } - - wxRegionRefData(const wxRegionRefData& data) - { - // TODO - } - - ~wxRegionRefData() - { - // TODO - } - - HRGN m_region; -}; - - -//----------------------------------------------------------------------------- -// wxRegion -//----------------------------------------------------------------------------- - -/*! - * Create an empty region. - */ -wxRegion::wxRegion() -{ - m_refData = new wxRegionRefData; - // TODO create empty region -} - -wxRegion::wxRegion(long x, long y, long w, long h) -{ - m_refData = new wxRegionRefData; - // TODO create rect region -} - -wxRegion::wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight) -{ - m_refData = new wxRegionRefData; - // TODO create rect region -} - -wxRegion::wxRegion(const wxRect& rect) -{ - m_refData = new wxRegionRefData; - // TODO create rect region -} - -/*! - * Destroy the region. - */ -wxRegion::~wxRegion() -{ - // m_refData unrefed in ~wxObject -} - -//----------------------------------------------------------------------------- -//# Modify region -//----------------------------------------------------------------------------- - -//! Clear current region -void wxRegion::Clear() -{ - UnRef(); -} - -//! Combine rectangle (x, y, w, h) with this. -bool wxRegion::Combine(long x, long y, long width, long height, wxRegionOp op) -{ - // Don't change shared data - if (!m_refData) { - m_refData = new wxRegionRefData(); - } else if (m_refData->GetRefCount() > 1) { - wxRegionRefData* ref = (wxRegionRefData*)m_refData; - UnRef(); - m_refData = new wxRegionRefData(*ref); - } - // If ref count is 1, that means it's 'ours' anyway so no action. - - // TODO create rect region - - int mode = 0; // TODO platform-specific code - switch (op) - { - case wxRGN_AND: - // TODO - break ; - case wxRGN_OR: - // TODO - break ; - case wxRGN_XOR: - // TODO - break ; - case wxRGN_DIFF: - // TODO - break ; - case wxRGN_COPY: - default: - // TODO - break ; - } - - // TODO do combine region - - return FALSE; -} - -//! Union /e region with this. -bool wxRegion::Combine(const wxRegion& region, wxRegionOp op) -{ - if (region.Empty()) - return FALSE; - - // Don't change shared data - if (!m_refData) { - m_refData = new wxRegionRefData(); - } else if (m_refData->GetRefCount() > 1) { - wxRegionRefData* ref = (wxRegionRefData*)m_refData; - UnRef(); - m_refData = new wxRegionRefData(*ref); - } - - int mode = 0; // TODO platform-specific code - switch (op) - { - case wxRGN_AND: - // TODO - break ; - case wxRGN_OR: - // TODO - break ; - case wxRGN_XOR: - // TODO - break ; - case wxRGN_DIFF: - // TODO - break ; - case wxRGN_COPY: - default: - // TODO - break ; - } - - // TODO combine region - - return FALSE; -} - -bool wxRegion::Combine(const wxRect& rect, wxRegionOp op) -{ - return Combine(rect.GetLeft(), rect.GetTop(), rect.GetWidth(), rect.GetHeight(), op); -} - -//----------------------------------------------------------------------------- -//# Information on region -//----------------------------------------------------------------------------- - -// Outer bounds of region -void wxRegion::GetBox(long& x, long& y, long&w, long &h) const -{ - if (m_refData) { - // TODO get box - } else { - x = y = w = h = 0; - } -} - -wxRect wxRegion::GetBox() const -{ - long x, y, w, h; - GetBox(x, y, w, h); - return wxRect(x, y, w, h); -} - -// Is region empty? -bool wxRegion::Empty() const -{ - // TODO - return FALSE; -} - -//----------------------------------------------------------------------------- -//# Tests -//----------------------------------------------------------------------------- - -// Does the region contain the point (x,y)? -wxRegionContain wxRegion::Contains(long x, long y) const -{ - if (!m_refData) - return wxOutRegion; - - // TODO. Return wxInRegion if within region. - if (0) - return wxInRegion; - return wxOutRegion; -} - -// Does the region contain the point pt? -wxRegionContain wxRegion::Contains(const wxPoint& pt) const -{ - if (!m_refData) - return wxOutRegion; - - // TODO. Return wxInRegion if within region. - if (0) - return wxInRegion; - else - return wxOutRegion; -} - -// Does the region contain the rectangle (x, y, w, h)? -wxRegionContain wxRegion::Contains(long x, long y, long w, long h) const -{ - if (!m_refData) - return wxOutRegion; - - // TODO. Return wxInRegion if within region. - if (0) - return wxInRegion; - else - return wxOutRegion; -} - -// Does the region contain the rectangle rect -wxRegionContain wxRegion::Contains(const wxRect& rect) const -{ - if (!m_refData) - return wxOutRegion; - - long x, y, w, h; - x = rect.x; - y = rect.y; - w = rect.GetWidth(); - h = rect.GetHeight(); - return Contains(x, y, w, h); -} - -/////////////////////////////////////////////////////////////////////////////// -// // -// wxRegionIterator // -// // -/////////////////////////////////////////////////////////////////////////////// - -/*! - * Initialize empty iterator - */ -wxRegionIterator::wxRegionIterator() : m_current(0), m_numRects(0), m_rects(NULL) -{ -} - -wxRegionIterator::~wxRegionIterator() -{ - if (m_rects) - delete[] m_rects; -} - -/*! - * Initialize iterator for region - */ -wxRegionIterator::wxRegionIterator(const wxRegion& region) -{ - m_rects = NULL; - - Reset(region); -} - -/*! - * Reset iterator for a new /e region. - */ -void wxRegionIterator::Reset(const wxRegion& region) -{ - m_current = 0; - m_region = region; - - if (m_rects) - delete[] m_rects; - - m_rects = NULL; - - if (m_region.Empty()) - m_numRects = 0; - else - { - // TODO create m_rects and fill with rectangles for this region - m_numRects = 0; - } -} - -/*! - * Increment iterator. The rectangle returned is the one after the - * incrementation. - */ -void wxRegionIterator::operator ++ () -{ - if (m_current < m_numRects) - ++m_current; -} - -/*! - * Increment iterator. The rectangle returned is the one before the - * incrementation. - */ -void wxRegionIterator::operator ++ (int) -{ - if (m_current < m_numRects) - ++m_current; -} - -long wxRegionIterator::GetX() const -{ - if (m_current < m_numRects) - return m_rects[m_current].x; - return 0; -} - -long wxRegionIterator::GetY() const -{ - if (m_current < m_numRects) - return m_rects[m_current].y; - return 0; -} - -long wxRegionIterator::GetW() const -{ - if (m_current < m_numRects) - return m_rects[m_current].width ; - return 0; -} - -long wxRegionIterator::GetH() const -{ - if (m_current < m_numRects) - return m_rects[m_current].height; - return 0; -} - diff --git a/src/qt/scrolbar.cpp b/src/qt/scrolbar.cpp deleted file mode 100644 index 0058a14f53..0000000000 --- a/src/qt/scrolbar.cpp +++ /dev/null @@ -1,78 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: scrolbar.cpp -// Purpose: wxScrollBar -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "scrolbar.h" -#endif - -#include "wx/scrolbar.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl) - -#endif - -// Scrollbar -bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - if (!parent) - return FALSE; - parent->AddChild(this); - SetName(name); - SetValidator(validator); - - m_windowStyle = style; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - // TODO create scrollbar - return TRUE; -} - -wxScrollBar::~wxScrollBar() -{ -} - -void wxScrollBar::SetPosition(int viewStart) -{ - // TODO -} - -int wxScrollBar::GetPosition() const -{ - // TODO - return 0; -} - -void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageSize, - bool refresh) -{ - m_viewSize = pageSize; - m_pageSize = thumbSize; - m_objectSize = range; - - // TODO -} - - -void wxScrollBar::Command(wxCommandEvent& event) -{ - SetValue(event.m_commandInt); - ProcessCommand(event); -} - diff --git a/src/qt/settings.cpp b/src/qt/settings.cpp deleted file mode 100644 index 0450dbc8e4..0000000000 --- a/src/qt/settings.cpp +++ /dev/null @@ -1,151 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: settings.cpp -// Purpose: wxSettings -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "settings.h" -#endif - -#include "wx/settings.h" - -wxColour wxSystemSettings::GetSystemColour(int index) -{ - // TODO - return col; -} - -wxFont wxSystemSettings::GetSystemFont(int index) -{ - // TODO - return wxFont; -} - -// Get a system metric, e.g. scrollbar size -int wxSystemSettings::GetSystemMetric(int index) -{ - switch ( index) - { - case wxSYS_MOUSE_BUTTONS: - // TODO - return 0; - case wxSYS_BORDER_X: - // TODO - return 0; - case wxSYS_BORDER_Y: - // TODO - return 0; - case wxSYS_CURSOR_X: - // TODO - return 0; - case wxSYS_CURSOR_Y: - // TODO - return 0; - case wxSYS_DCLICK_X: - // TODO - return 0; - case wxSYS_DCLICK_Y: - // TODO - return 0; - case wxSYS_DRAG_X: - // TODO - return 0; - case wxSYS_DRAG_Y: - // TODO - return 0; - case wxSYS_EDGE_X: - // TODO - return 0; - case wxSYS_EDGE_Y: - // TODO - return 0; - case wxSYS_HSCROLL_ARROW_X: - // TODO - return 0; - case wxSYS_HSCROLL_ARROW_Y: - // TODO - return 0; - case wxSYS_HTHUMB_X: - // TODO - return 0; - case wxSYS_ICON_X: - // TODO - return 0; - case wxSYS_ICON_Y: - // TODO - return 0; - case wxSYS_ICONSPACING_X: - // TODO - return 0; - case wxSYS_ICONSPACING_Y: - // TODO - return 0; - case wxSYS_WINDOWMIN_X: - // TODO - return 0; - case wxSYS_WINDOWMIN_Y: - // TODO - return 0; - case wxSYS_SCREEN_X: - // TODO - return 0; - case wxSYS_SCREEN_Y: - // TODO - return 0; - case wxSYS_FRAMESIZE_X: - // TODO - return 0; - case wxSYS_FRAMESIZE_Y: - // TODO - return 0; - case wxSYS_SMALLICON_X: - // TODO - return 0; - case wxSYS_SMALLICON_Y: - // TODO - return 0; - case wxSYS_HSCROLL_Y: - // TODO - return 0; - case wxSYS_VSCROLL_X: - // TODO - return 0; - case wxSYS_VSCROLL_ARROW_X: - // TODO - return 0; - case wxSYS_VSCROLL_ARROW_Y: - // TODO - return 0; - case wxSYS_VTHUMB_Y: - // TODO - return 0; - case wxSYS_CAPTION_Y: - // TODO - return 0; - case wxSYS_MENU_Y: - // TODO - return 0; - case wxSYS_NETWORK_PRESENT: - // TODO - return 0; - case wxSYS_PENWINDOWS_PRESENT: - // TODO - return 0; - case wxSYS_SHOW_SOUNDS: - // TODO - return 0; - case wxSYS_SWAP_BUTTONS: - // TODO - return 0; - default: - return 0; - } - return 0; -} - diff --git a/src/qt/slider.cpp b/src/qt/slider.cpp deleted file mode 100644 index 97c453b989..0000000000 --- a/src/qt/slider.cpp +++ /dev/null @@ -1,185 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: slider.cpp -// Purpose: wxSlider -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "slider.h" -#endif - -#include "wx/msw/slider.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl) -#endif - -// Slider -wxSlider::wxSlider() -{ - m_pageSize = 1; - m_lineSize = 1; - m_rangeMax = 0; - m_rangeMin = 0; - m_tickFreq = 0; -} - -bool wxSlider::Create(wxWindow *parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - - if (parent) parent->AddChild(this); - - m_lineSize = 1; - m_windowStyle = style; - m_tickFreq = 0; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - m_rangeMax = maxValue; - m_rangeMin = minValue; - - m_pageSize = (int)((maxValue-minValue)/10); - - // TODO create slider - - return FALSE; -} - -wxSlider::~wxSlider() -{ -} - -int wxSlider::GetValue() const -{ - // TODO - return 0; -} - -void wxSlider::SetValue(int value) -{ - // TODO -} - -void wxSlider::GetSize(int *width, int *height) const -{ - // TODO -} - -void wxSlider::GetPosition(int *x, int *y) const -{ - // TODO -} - -void wxSlider::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -void wxSlider::SetRange(int minValue, int maxValue) -{ - m_rangeMin = minValue; - m_rangeMax = maxValue; - - // TODO -} - -// For trackbars only -void wxSlider::SetTickFreq(int n, int pos) -{ - // TODO - m_tickFreq = n; -} - -void wxSlider::SetPageSize(int pageSize) -{ - // TODO - m_pageSize = pageSize; -} - -int wxSlider::GetPageSize() const -{ - return m_pageSize; -} - -void wxSlider::ClearSel() -{ - // TODO -} - -void wxSlider::ClearTicks() -{ - // TODO -} - -void wxSlider::SetLineSize(int lineSize) -{ - m_lineSize = lineSize; - // TODO -} - -int wxSlider::GetLineSize() const -{ - // TODO - return 0; -} - -int wxSlider::GetSelEnd() const -{ - // TODO - return 0; -} - -int wxSlider::GetSelStart() const -{ - // TODO - return 0; -} - -void wxSlider::SetSelection(int minPos, int maxPos) -{ - // TODO -} - -void wxSlider::SetThumbLength(int len) -{ - // TODO -} - -int wxSlider::GetThumbLength() const -{ - // TODO - return 0; -} - -void wxSlider::SetTick(int tickPos) -{ - // TODO -} - -void wxSlider::Command (wxCommandEvent & event) -{ - SetValue (event.GetInt()); - ProcessCommand (event); -} - -bool wxSlider::Show(bool show) -{ - // TODO - return TRUE; -} - diff --git a/src/qt/statbmp.cpp b/src/qt/statbmp.cpp deleted file mode 100644 index a67c558465..0000000000 --- a/src/qt/statbmp.cpp +++ /dev/null @@ -1,59 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: statbmp.cpp -// Purpose: wxStaticBitmap -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "statbmp.h" -#endif - -#include "wx/statbmp.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl) -#endif - -/* - * wxStaticBitmap - */ - -bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id, - const wxBitmap& bitmap, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - m_messageBitmap = bitmap; - SetName(name); - if (parent) parent->AddChild(this); - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - m_windowStyle = style; - - // TODO: create static bitmap control - return FALSE; -} - -void wxStaticBitmap::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap) -{ - m_messageBitmap = bitmap; - - // TODO: redraw bitmap -} - diff --git a/src/qt/statbox.cpp b/src/qt/statbox.cpp deleted file mode 100644 index b239dc738c..0000000000 --- a/src/qt/statbox.cpp +++ /dev/null @@ -1,62 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: statbox.cpp -// Purpose: wxStaticBox -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "statbox.h" -#endif - -#include "wx/statbox.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl) - -BEGIN_EVENT_TABLE(wxStaticBox, wxControl) - EVT_ERASE_BACKGROUND(wxStaticBox::OnEraseBackground) -END_EVENT_TABLE() - -#endif - -/* - * Static box - */ - -bool wxStaticBox::Create(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - SetName(name); - - if (parent) parent->AddChild(this); - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - m_windowStyle = style; - - // TODO: create static box - return FALSE; -} - -void wxStaticBox::SetLabel(const wxString& label) -{ - // TODO -} - -void wxStaticBox::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - diff --git a/src/qt/stattext.cpp b/src/qt/stattext.cpp deleted file mode 100644 index 1958826916..0000000000 --- a/src/qt/stattext.cpp +++ /dev/null @@ -1,211 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: stattext.cpp -// Purpose: wxStaticText -// Author: AUTHOR -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "stattext.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/app.h" -#endif - -#include "wx/stattext.h" -#include "wx/msw/private.h" -#include - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl) -#endif - -bool wxStaticText::Create(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - SetName(name); - if (parent) parent->AddChild(this); - - SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; - SetForegroundColour(parent->GetDefaultForegroundColour()) ; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - m_windowStyle = style; - - long msStyle = WS_CHILD|WS_VISIBLE; - if (m_windowStyle & wxALIGN_CENTRE) - msStyle |= SS_CENTER; - else if (m_windowStyle & wxALIGN_RIGHT) - msStyle |= SS_RIGHT; - else - msStyle |= SS_LEFT; - - // Even with extended styles, need to combine with WS_BORDER - // for them to look right. - if ((m_windowStyle & wxSIMPLE_BORDER) || (m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSUNKEN_BORDER) || (m_windowStyle & wxDOUBLE_BORDER)) - msStyle |= WS_BORDER; - - HWND static_item = CreateWindowEx(MakeExtendedStyle(m_windowStyle), "STATIC", (const char *)label, - msStyle, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, - wxGetInstance(), NULL); - -#if CTL3D -/* - if (!(GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS)) - Ctl3dSubclassCtl(static_item); -*/ -#endif - - m_hWnd = (WXHWND)static_item; - - SubclassWin((WXHWND)static_item); - - SetFont(* parent->GetFont()); - SetSize(x, y, width, height); - return TRUE; -} - -void wxStaticText::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - int currentX, currentY; - GetPosition(¤tX, ¤tY); - int x1 = x; - int y1 = y; - - if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - x1 = currentX; - if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - y1 = currentY; - - AdjustForParentClientOrigin(x1, y1, sizeFlags); - - int actualWidth = width; - int actualHeight = height; - - char buf[300]; - int current_width; - int cyf; - - ::GetWindowText((HWND) GetHWND(), buf, 300); - GetTextExtent(buf, ¤t_width, &cyf, NULL, NULL,GetFont()); - - int ww, hh; - GetSize(&ww, &hh); - - // If we're prepared to use the existing width, then... - if (width == -1 && ((sizeFlags & wxSIZE_AUTO_WIDTH) != wxSIZE_AUTO_WIDTH)) - actualWidth = ww; - else if (width == -1) - { - int cx; - int cy; - wxGetCharSize(GetHWND(), &cx, &cy,GetFont()); - actualWidth = (int)(current_width + cx) ; - } - - // If we're prepared to use the existing height, then... - if (height == -1 && ((sizeFlags & wxSIZE_AUTO_HEIGHT) != wxSIZE_AUTO_HEIGHT)) - actualHeight = hh; - else if (height == -1) - { - actualHeight = (int)(cyf) ; - } - - MoveWindow((HWND) GetHWND(), x1, y1, actualWidth, actualHeight, TRUE); -} - -void wxStaticText::SetLabel(const wxString& label) -{ - int w, h; - RECT rect; - - wxWindow *parent = GetParent(); - GetWindowRect((HWND) GetHWND(), &rect); - - // Since we now have the absolute screen coords, - // if there's a parent we must subtract its top left corner - POINT point; - point.x = rect.left; - point.y = rect.top; - if (parent) - { - ::ScreenToClient((HWND) parent->GetHWND(), &point); - } - - GetTextExtent(label, &w, &h, NULL, NULL, GetFont()); - MoveWindow((HWND) GetHWND(), point.x, point.y, (int)(w + 10), (int)h, - TRUE); - SetWindowText((HWND) GetHWND(), (const char *)label); -} - -WXHBRUSH wxStaticText::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ -/* -#if CTL3D - if ( m_useCtl3D ) - { - HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam); - - if (hbrush != (HBRUSH) 0) - return hbrush; - else - return (HBRUSH)MSWDefWindowProc(message, wParam, lParam); - } -#endif -*/ - - if (GetParent()->GetTransparentBackground()) - SetBkMode((HDC) pDC, TRANSPARENT); - else - SetBkMode((HDC) pDC, OPAQUE); - - ::SetBkColor((HDC) pDC, RGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue())); - ::SetTextColor((HDC) pDC, RGB(GetForegroundColour().Red(), GetForegroundColour().Green(), GetForegroundColour().Blue())); - - wxBrush *backgroundBrush = wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID); - - // Note that this will be cleaned up in wxApp::OnIdle, if backgroundBrush - // has a zero usage count. -// backgroundBrush->RealizeResource(); - return (WXHBRUSH) backgroundBrush->GetResourceHandle(); -} - -long wxStaticText::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) -{ - // Ensure that static items get messages. Some controls don't like this - // message to be intercepted (e.g. RichEdit), hence the tests. - if (nMsg == WM_NCHITTEST) - return (long)HTCLIENT; - - return wxWindow::MSWWindowProc(nMsg, wParam, lParam); -} - - diff --git a/src/qt/tbargtk.cpp b/src/qt/tbargtk.cpp deleted file mode 100644 index f2c8dfcd74..0000000000 --- a/src/qt/tbargtk.cpp +++ /dev/null @@ -1,193 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tbargtk.cpp -// Purpose: GTK toolbar -// Author: Robert Roebling -// Modified by: -// Created: 01/02/97 -// RCS-ID: -// Copyright: (c) Robert Roebling -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "tbargtk.h" -#endif - -#include "wx/toolbar.h" - -//----------------------------------------------------------------------------- -// wxToolBarTool -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool,wxObject) - -wxToolBarTool::wxToolBarTool( wxToolBar *owner, int theIndex, - const wxBitmap& bitmap1, const wxBitmap& bitmap2, - bool toggle, wxObject *clientData, - const wxString& shortHelpString, const wxString& longHelpString ) -{ - m_owner = owner; - m_index = theIndex; - m_bitmap1 = bitmap1; - m_bitmap2 = bitmap2; - m_isToggle = toggle; - m_enabled = TRUE; - m_toggleState = FALSE; - m_shortHelpString = shortHelpString; - m_longHelpString = longHelpString; - m_isMenuCommand = TRUE; - m_clientData = clientData; - m_deleteSecondBitmap = FALSE; -}; - -wxToolBarTool::~wxToolBarTool(void) -{ -}; - -//----------------------------------------------------------------------------- -// wxToolBar -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxToolBar,wxControl) - -BEGIN_EVENT_TABLE(wxToolBar, wxControl) -END_EVENT_TABLE() - -wxToolBar::wxToolBar(void) -{ -}; - -wxToolBar::wxToolBar( wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) -{ - Create( parent, id, pos, size, style, name ); -}; - -wxToolBar::~wxToolBar(void) -{ -}; - -bool wxToolBar::Create( wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) -{ - return TRUE; -}; - -bool wxToolBar::OnLeftClick( int toolIndex, bool toggleDown ) -{ - wxCommandEvent event( wxEVT_COMMAND_TOOL_CLICKED, toolIndex ); - event.SetEventObject(this); - event.SetInt( toolIndex ); - event.SetExtraLong((long) toggleDown); - - GetEventHandler()->ProcessEvent(event); - - return TRUE; -}; - -void wxToolBar::OnRightClick( int toolIndex, float WXUNUSED(x), float WXUNUSED(y) ) -{ - wxCommandEvent event( wxEVT_COMMAND_TOOL_RCLICKED, toolIndex ); - event.SetEventObject( this ); - event.SetInt( toolIndex ); - - GetEventHandler()->ProcessEvent(event); -}; - -void wxToolBar::OnMouseEnter( int toolIndex ) -{ - wxCommandEvent event( wxEVT_COMMAND_TOOL_ENTER, toolIndex ); - event.SetEventObject(this); - event.SetInt( toolIndex ); - - GetEventHandler()->ProcessEvent(event); -}; - -wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap, - const wxBitmap& pushedBitmap, bool toggle, - float WXUNUSED(xPos), float WXUNUSED(yPos), wxObject *clientData, - const wxString& helpString1, const wxString& helpString2 ) -{ -}; - -void wxToolBar::AddSeparator(void) -{ -}; - -void wxToolBar::ClearTools(void) -{ -}; - -void wxToolBar::Realize(void) -{ -}; - -void wxToolBar::EnableTool(int toolIndex, bool enable) -{ - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool*)node->Data(); - if (tool->m_index == toolIndex) - { - tool->m_enabled = enable; - return; - } - node = node->Next(); - }; -}; - -void wxToolBar::ToggleTool(int WXUNUSED(toolIndex), bool WXUNUSED(toggle) ) -{ -}; - -wxObject *wxToolBar::GetToolClientData(int index) const -{ - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool*)node->Data(); - if (tool->m_index == index) return tool->m_clientData;; - node = node->Next(); - }; - return (wxObject*)NULL; -}; - -bool wxToolBar::GetToolState(int toolIndex) const -{ - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool*)node->Data(); - if (tool->m_index == toolIndex) return tool->m_toggleState; - node = node->Next(); - }; - return FALSE; -}; - -bool wxToolBar::GetToolEnabled(int toolIndex) const -{ - wxNode *node = m_tools.First(); - while (node) - { - wxToolBarTool *tool = (wxToolBarTool*)node->Data(); - if (tool->m_index == toolIndex) return tool->m_enabled; - node = node->Next(); - }; - return FALSE; -}; - -void wxToolBar::SetMargins( int WXUNUSED(x), int WXUNUSED(y) ) -{ -}; - -void wxToolBar::SetToolPacking( int WXUNUSED(packing) ) -{ -}; - -void wxToolBar::SetToolSeparation( int separation ) -{ -}; - diff --git a/src/qt/textctrl.cpp b/src/qt/textctrl.cpp deleted file mode 100644 index fb522df053..0000000000 --- a/src/qt/textctrl.cpp +++ /dev/null @@ -1,439 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: textctrl.cpp -// Purpose: wxTextCtrl -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "textctrl.h" -#endif - -#include -#include -#include - -#include "wx/textctrl.h" -#include "wx/settings.h" - -#if defined(__BORLANDC__) && !defined(__WIN32__) -#include -#else -#ifndef __GNUWIN32__ -#include -#endif -#endif - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) - -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) - EVT_CHAR(wxTextCtrl::OnChar) - EVT_DROP_FILES(wxTextCtrl::OnDropFiles) - EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground) -END_EVENT_TABLE() -#endif - -// Text item -wxTextCtrl::wxTextCtrl() -#ifndef NO_TEXT_WINDOW_STREAM - :streambuf() -#endif -{ - m_fileName = ""; -} - -bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, - const wxString& value, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - m_fileName = ""; - SetName(name); - SetValidator(validator); - if (parent) parent->AddChild(this); - - m_windowStyle = style; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - return TRUE; -} - -wxString wxTextCtrl::GetValue() const -{ - // TODO - return wxString(""); -} - -void wxTextCtrl::SetValue(const wxString& value) -{ - // TODO -} - -void wxTextCtrl::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -// Clipboard operations -void wxTextCtrl::Copy() -{ - // TODO -} - -void wxTextCtrl::Cut() -{ - // TODO -} - -void wxTextCtrl::Paste() -{ - // TODO -} - -void wxTextCtrl::SetEditable(bool editable) -{ - // TODO -} - -void wxTextCtrl::SetInsertionPoint(long pos) -{ - // TODO -} - -void wxTextCtrl::SetInsertionPointEnd() -{ - long pos = GetLastPosition(); - SetInsertionPoint(pos); -} - -long wxTextCtrl::GetInsertionPoint() const -{ - // TODO - return 0; -} - -long wxTextCtrl::GetLastPosition() const -{ - // TODO - return 0; -} - -void wxTextCtrl::Replace(long from, long to, const wxString& value) -{ - // TODO - return 0; -} - -void wxTextCtrl::Remove(long from, long to) -{ - // TODO -} - -void wxTextCtrl::SetSelection(long from, long to) -{ - // TODO -} - -bool wxTextCtrl::LoadFile(const wxString& file) -{ - if (!wxFileExists(file)) - return FALSE; - - m_fileName = file; - - Clear(); - - ifstream input((char*) (const char*) file, ios::nocreate | ios::in); - - if (!input.bad()) - { - struct stat stat_buf; - if (stat(file, &stat_buf) < 0) - return FALSE; - // This may need to be a bigger buffer than the file size suggests, - // if it's a UNIX file. Give it an extra 1000 just in case. - char *tmp_buffer = (char*)malloc((size_t)(stat_buf.st_size+1+1000)); - long no_lines = 0; - long pos = 0; - while (!input.eof() && input.peek() != EOF) - { - input.getline(wxBuffer, 500); - int len = strlen(wxBuffer); - wxBuffer[len] = 13; - wxBuffer[len+1] = 10; - wxBuffer[len+2] = 0; - strcpy(tmp_buffer+pos, wxBuffer); - pos += strlen(wxBuffer); - no_lines++; - } - - // TODO add line - - free(tmp_buffer); - - return TRUE; - } - return FALSE; -} - -// If file is null, try saved file name first -// Returns TRUE if succeeds. -bool wxTextCtrl::SaveFile(const wxString& file) -{ - wxString theFile(file); - if (theFile == "") - theFile = m_fileName; - if (theFile == "") - return FALSE; - m_fileName = theFile; - - ofstream output((char*) (const char*) theFile); - if (output.bad()) - return FALSE; - - // TODO get and save text - - return FALSE; -} - -void wxTextCtrl::WriteText(const wxString& text) -{ - // TODO write text to control -} - -void wxTextCtrl::Clear() -{ - // TODO -} - -bool wxTextCtrl::IsModified() const -{ - // TODO - return FALSE; -} - -// Makes 'unmodified' -void wxTextCtrl::DiscardEdits() -{ - // TODO -} - -int wxTextCtrl::GetNumberOfLines() const -{ - // TODO - return 0; -} - -long wxTextCtrl::XYToPosition(long x, long y) const -{ - // TODO - return 0; -} - -void wxTextCtrl::PositionToXY(long pos, long *x, long *y) const -{ - // TODO -} - -void wxTextCtrl::ShowPosition(long pos) -{ - // TODO -} - -int wxTextCtrl::GetLineLength(long lineNo) const -{ - // TODO - return 0; -} - -wxString wxTextCtrl::GetLineText(long lineNo) const -{ - // TODO - return wxString(""); -} - -/* - * Text item - */ - -void wxTextCtrl::Command(wxCommandEvent & event) -{ - SetValue (event.GetString()); - ProcessCommand (event); -} - -void wxTextCtrl::OnDropFiles(wxDropFilesEvent& event) -{ - // By default, load the first file into the text window. - if (event.GetNumberOfFiles() > 0) - { - LoadFile(event.GetFiles()[0]); - } -} - -// The streambuf code was partly taken from chapter 3 by Jerry Schwarz of -// AT&T's "C++ Lanuage System Release 3.0 Library Manual" - Stein Somers - -//========================================================================= -// Called then the buffer is full (gcc 2.6.3) -// or when "endl" is output (Borland 4.5) -//========================================================================= -// Class declaration using multiple inheritance doesn't work properly for -// Borland. See note in wb_text.h. -#ifndef NO_TEXT_WINDOW_STREAM -int wxTextCtrl::overflow(int c) -{ - // Make sure there is a holding area - if ( allocate()==EOF ) - { - wxError("Streambuf allocation failed","Internal error"); - return EOF; - } - - // Verify that there are no characters in get area - if ( gptr() && gptr() < egptr() ) - { - wxError("Who's trespassing my get area?","Internal error"); - return EOF; - } - - // Reset get area - setg(0,0,0); - - // Make sure there is a put area - if ( ! pptr() ) - { -/* This doesn't seem to be fatal so comment out error message */ -// wxError("Put area not opened","Internal error"); - setp( base(), base() ); - } - - // Determine how many characters have been inserted but no consumed - int plen = pptr() - pbase(); - - // Now Jerry relies on the fact that the buffer is at least 2 chars - // long, but the holding area "may be as small as 1" ??? - // And we need an additional \0, so let's keep this inefficient but - // safe copy. - - // If c!=EOF, it is a character that must also be comsumed - int xtra = c==EOF? 0 : 1; - - // Write temporary C-string to wxTextWindow - { - char *txt = new char[plen+xtra+1]; - memcpy(txt, pbase(), plen); - txt[plen] = (char)c; // append c - txt[plen+xtra] = '\0'; // append '\0' or overwrite c - // If the put area already contained \0, output will be truncated there - WriteText(txt); - delete[] txt; - } - - // Reset put area - setp(pbase(), epptr()); - -#if defined(__WATCOMC__) - return __NOT_EOF; -#elif defined(zapeof) // HP-UX (all cfront based?) - return zapeof(c); -#else - return c!=EOF ? c : 0; // this should make everybody happy -#endif -} - -//========================================================================= -// called then "endl" is output (gcc) or then explicit sync is done (Borland) -//========================================================================= -int wxTextCtrl::sync() -{ - // Verify that there are no characters in get area - if ( gptr() && gptr() < egptr() ) - { - wxError("Who's trespassing my get area?","Internal error"); - return EOF; - } - - if ( pptr() && pptr() > pbase() ) return overflow(EOF); - - return 0; -/* OLD CODE - int len = pptr() - pbase(); - char *txt = new char[len+1]; - strncpy(txt, pbase(), len); - txt[len] = '\0'; - (*this) << txt; - setp(pbase(), epptr()); - delete[] txt; - return 0; -*/ -} - -//========================================================================= -// Should not be called by a "ostream". Used by a "istream" -//========================================================================= -int wxTextCtrl::underflow() -{ - return EOF; -} -#endif - -wxTextCtrl& wxTextCtrl::operator<<(const wxString& s) -{ - WriteText(s); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(float f) -{ - wxString str; - str.Printf("%.2f", f); - WriteText(str); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(double d) -{ - wxString str; - str.Printf("%.2f", d); - WriteText(str); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(int i) -{ - wxString str; - str.Printf("%d", i); - WriteText(str); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(long i) -{ - wxString str; - str.Printf("%ld", i); - WriteText(str); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(const char c) -{ - char buf[2]; - - buf[0] = c; - buf[1] = 0; - WriteText(buf); - return *this; -} - diff --git a/src/qt/threadgui.inc b/src/qt/threadgui.inc deleted file mode 100644 index 165fef3c01..0000000000 --- a/src/qt/threadgui.inc +++ /dev/null @@ -1,65 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: threadgui.inc -// Purpose: GUI thread manager for GTK -// Author: Original from Wolfram Gloger/Guilhem Lavaux -// Modified by: -// Created: 04/22/98 -// RCS-ID: $Id$ -// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#include -#include - -// for select() -#include -#include -#ifdef __sgi -#include -#endif - -#include - - -///////////////////////////////////////////////////////////////////////////// -// Static variables -///////////////////////////////////////////////////////////////////////////// - -static int p_thrd_pipe[2] = { -1, -1 }; -// WorkProc in GTK -static gint p_thrd_inid; - -#define THREAD_SEND_EXIT_MSG(ptr) write(p_thrd_pipe[1], &ptr, sizeof(ptr)); - -static void -ThreadExitProc(gpointer WXUNUSED(client), gint fid, - GdkInputCondition WXUNUSED(cond)) -{ - wxThread* ptr; - - if (fid != p_thrd_pipe[0]) - return; - if (read(fid, &ptr, sizeof(ptr)) == sizeof(ptr)) { - //fprintf(stderr, "calling OnExit %p\n", ptr); - ptr->OnExit(); - } else { - //fprintf(stderr, "this should never happen\n"); - } -} - -// Global initialization -static void wxThreadGuiInit() -{ - pipe(p_thrd_pipe); - p_thrd_inid = gdk_input_add(p_thrd_pipe[0], GDK_INPUT_READ, - ThreadExitProc, 0); -} - -// Global cleanup -static void wxThreadGuiExit() -{ - gdk_input_remove(p_thrd_inid); - close(p_thrd_pipe[0]); - close(p_thrd_pipe[1]); -} diff --git a/src/qt/threadno.cpp b/src/qt/threadno.cpp deleted file mode 100644 index b0db0f426a..0000000000 --- a/src/qt/threadno.cpp +++ /dev/null @@ -1,185 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: thread.cpp -// Purpose: No thread support -// Author: Original from Wolfram Gloger/Guilhem Lavaux -// Modified by: -// Created: 04/22/98 -// RCS-ID: $Id$ -// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "thread.h" -#endif - -#include "wx/wx.h" -#include "wx/module.h" -#include "wx/thread.h" - -wxMutex::wxMutex() -{ - m_locked = 0; -} - -wxMutex::~wxMutex() -{ - if (m_locked) - wxDebugMsg("wxMutex warning: destroying a locked mutex (%d locks)\n", m_locked); -} - -wxMutexError wxMutex::Lock() -{ - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::TryLock() -{ - if (m_locked > 0) - return MUTEX_BUSY; - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::Unlock() -{ - if (m_locked == 0) - return MUTEX_UNLOCKED; - m_locked--; - return MUTEX_NO_ERROR; -} - -wxCondition::wxCondition() -{ -} - -wxCondition::~wxCondition() -{ -} - -void wxCondition::Wait(wxMutex& WXUNUSED(mutex)) -{ -} - -bool wxCondition::Wait(wxMutex& WXUNUSED(mutex), unsigned long WXUNUSED(sec), - unsigned long WXUNUSED(nsec)) -{ - return FALSE; -} - -void wxCondition::Signal() -{ -} - -void wxCondition::Broadcast() -{ -} - -struct wxThreadInternal { - int thread_id; - void* exit_status; -}; - -wxThreadError wxThread::Create() -{ - p_internal->exit_status = Entry(); - OnExit(); - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Destroy() -{ - return THREAD_NOT_RUNNING; -} - -wxThreadError wxThread::Pause() -{ - return THREAD_NOT_RUNNING; -} - -wxThreadError wxThread::Resume() -{ - return THREAD_NOT_RUNNING; -} - -void wxThread::DeferDestroy( bool WXUNUSED(on) ) -{ -} - -void wxThread::TestDestroy() -{ -} - -void *wxThread::Join() -{ - return p_internal->exit_status; -} - -unsigned long wxThread::GetID() const -{ - return 0; -} - -wxThread *wxThread::GetThreadFromID(unsigned long WXUNUSED(id)) const -{ - return NULL; -} - -bool wxThread::IsMain() -{ - return TRUE; -} - -bool wxThread::IsRunning() const -{ - return FALSE; -} - -bool wxThread::IsAlive() const -{ - return FALSE; -} - -void wxThread::SetPriority(int WXUNUSED(prio)) { } -int wxThread::GetPriority() const { return 0; } - -wxMutex wxMainMutex; // controls access to all GUI functions - -wxThread::wxThread() -{ - p_internal = new wxThreadInternal(); -} - -wxThread::~wxThread() -{ - Destroy(); - Join(); - delete p_internal; -} - -// The default callback just joins the thread and throws away the result. -void wxThread::OnExit() -{ - Join(); -} - - -// Automatic initialization -class wxThreadModule : public wxModule { - DECLARE_DYNAMIC_CLASS(wxThreadModule) -public: - bool OnInit(); - void OnExit(); -}; - -bool wxThreadModule::OnInit() { - wxMainMutex.Lock(); - return TRUE; -} - -void wxThreadModule::OnExit() -{ - wxMainMutex.Unlock(); -} - -IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule) diff --git a/src/qt/threadpsx.cpp b/src/qt/threadpsx.cpp deleted file mode 100644 index 9623b91c30..0000000000 --- a/src/qt/threadpsx.cpp +++ /dev/null @@ -1,394 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: threadpsx.cpp -// Purpose: wxThread (Posix) Implementation -// Author: Original from Wolfram Gloger/Guilhem Lavaux -// Modified by: -// Created: 04/22/98 -// RCS-ID: $Id$ -// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "thread.h" -#endif - -#include -#include -#include -#include -#include "wx/thread.h" -#include "wx/module.h" -#include "wx/utils.h" - -enum thread_state { - STATE_IDLE = 0, - STATE_RUNNING, - STATE_PAUSING, - STATE_PAUSED, - STATE_CANCELED, - STATE_EXITED -}; - -///////////////////////////////////////////////////////////////////////////// -// Static variables -///////////////////////////////////////////////////////////////////////////// - -static pthread_t p_mainid; -static wxMutex p_list_mutex; -static wxList p_threads_list; - -wxMutex wxMainMutex; // controls access to all GUI functions - -///////////////////////////////////////////////////////////////////////////// -// GUI thread manager -///////////////////////////////////////////////////////////////////////////// -#include "threadgui.inc" - -///////////////////////////////////////////////////////////////////////////// -// wxThread: Posix Thread implementation (Mutex) -///////////////////////////////////////////////////////////////////////////// - -class wxMutexInternal { -public: - pthread_mutex_t p_mutex; -}; - -wxMutex::wxMutex() -{ - p_internal = new wxMutexInternal; - pthread_mutex_init(&(p_internal->p_mutex), NULL); - m_locked = 0; -} - -wxMutex::~wxMutex() -{ - if (m_locked > 0) - wxDebugMsg("wxMutex warning: freeing a locked mutex (%d locks)\n", - m_locked); - - pthread_mutex_destroy(&(p_internal->p_mutex)); - delete p_internal; -} - -wxMutexError wxMutex::Lock() -{ - int err; - - err = pthread_mutex_lock(&(p_internal->p_mutex)); - if (err == EDEADLK) - return MUTEX_DEAD_LOCK; - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::TryLock() -{ - int err; - - if (m_locked) - return MUTEX_BUSY; - err = pthread_mutex_trylock(&(p_internal->p_mutex)); - switch (err) { - case EBUSY: return MUTEX_BUSY; - } - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::Unlock() -{ - if (m_locked > 0) - m_locked--; - else - return MUTEX_UNLOCKED; - pthread_mutex_unlock(&(p_internal->p_mutex)); - return MUTEX_NO_ERROR; -} - -///////////////////////////////////////////////////////////////////////////// -// wxThread: Posix Thread implementation (Condition) -///////////////////////////////////////////////////////////////////////////// - -class wxConditionInternal { -public: - pthread_cond_t p_condition; -}; - -wxCondition::wxCondition() -{ - p_internal = new wxConditionInternal; - pthread_cond_init(&(p_internal->p_condition), NULL); -} - -wxCondition::~wxCondition() -{ - pthread_cond_destroy(&(p_internal->p_condition)); - delete p_internal; -} - -void wxCondition::Wait(wxMutex& mutex) -{ - pthread_cond_wait(&(p_internal->p_condition), &(mutex.p_internal->p_mutex)); -} - -bool wxCondition::Wait(wxMutex& mutex, unsigned long sec, unsigned long nsec) -{ - struct timespec tspec; - - tspec.tv_sec = time(NULL)+sec; - tspec.tv_nsec = nsec; - return (pthread_cond_timedwait(&(p_internal->p_condition), &(mutex.p_internal->p_mutex), &tspec) != ETIMEDOUT); -} - -void wxCondition::Signal() -{ - pthread_cond_signal(&(p_internal->p_condition)); -} - -void wxCondition::Broadcast() -{ - pthread_cond_broadcast(&(p_internal->p_condition)); -} - -///////////////////////////////////////////////////////////////////////////// -// wxThread: Posix Thread implementation (Thread) -///////////////////////////////////////////////////////////////////////////// - -class wxThreadInternal { -public: - wxThreadInternal() { state = STATE_IDLE; } - ~wxThreadInternal() {} - static void *PthreadStart(void *ptr); - pthread_t thread_id; - int state; - int prio; - int defer_destroy; - int id; -}; - -void *wxThreadInternal::PthreadStart(void *ptr) -{ - wxThread *thread = (wxThread *)ptr; - - // Add the current thread to the list - p_list_mutex.Lock(); - thread->p_internal->id = p_threads_list.Number(); - p_threads_list.Append((wxObject *)thread); - p_list_mutex.Unlock(); - - // Call the main entry - pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); - void* status = thread->Entry(); - - thread->Exit(status); - - return NULL; -} - -wxThreadError wxThread::Create() -{ - pthread_attr_t a; - int min_prio, max_prio, p; - struct sched_param sp; - - if (p_internal->state != STATE_IDLE) - return THREAD_RUNNING; - - // Change thread priority - pthread_attr_init(&a); - pthread_attr_getschedpolicy(&a, &p); - - min_prio = sched_get_priority_min(p); - max_prio = sched_get_priority_max(p); - - pthread_attr_getschedparam(&a, &sp); - sp.sched_priority = min_prio + - (p_internal->prio*(max_prio-min_prio))/100; - pthread_attr_setschedparam(&a, &sp); - - // this is the point of no return - p_internal->state = STATE_RUNNING; - if (pthread_create(&p_internal->thread_id, &a, - wxThreadInternal::PthreadStart, (void *)this) != 0) { - p_internal->state = STATE_IDLE; - pthread_attr_destroy(&a); - return THREAD_NO_RESOURCE; - } - pthread_attr_destroy(&a); - - return THREAD_NO_ERROR; -} - -void wxThread::SetPriority(int prio) -{ - if (p_internal->state == STATE_RUNNING) - return; - - if (prio > 100) - prio = 100; - if (prio < 0) - prio = 0; - p_internal->prio = prio; -} - -int wxThread::GetPriority() const -{ - return p_internal->prio; -} - -void wxThread::DeferDestroy(bool on) -{ - if (on) - pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL); - else - pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); -} - -wxThreadError wxThread::Destroy() -{ - int res = 0; - - if (p_internal->state == STATE_RUNNING) { - res = pthread_cancel(p_internal->thread_id); - if (res == 0) - p_internal->state = STATE_CANCELED; - } - - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Pause() -{ - if (p_internal->state != STATE_RUNNING) - return THREAD_NOT_RUNNING; - - if (!p_internal->defer_destroy) - return THREAD_MISC_ERROR; - - p_internal->state = STATE_PAUSING; - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Resume() -{ - if (p_internal->state == STATE_PAUSING || p_internal->state == STATE_PAUSED) - p_internal->state = STATE_RUNNING; - - return THREAD_NO_ERROR; -} - -void *wxThread::Join() -{ - void* status = 0; - - if (p_internal->state != STATE_IDLE) { - bool do_unlock = wxThread::IsMain(); - - while (p_internal->state == STATE_RUNNING) - wxYield(); - - if (do_unlock) - wxMainMutex.Unlock(); - pthread_join(p_internal->thread_id, &status); - if (do_unlock) - wxMainMutex.Lock(); - - p_list_mutex.Lock(); - delete p_threads_list.Nth(p_internal->id); - p_list_mutex.Unlock(); - - p_internal->state = STATE_IDLE; - } - return status; -} - -unsigned long wxThread::GetID() const -{ - return p_internal->id; -} - -wxThread *wxThread::GetThreadFromID(unsigned long id) -{ - wxNode *node = p_threads_list.Nth(id); - - if (!node) - return NULL; - return (wxThread *)node->Data(); -} - -void wxThread::Exit(void *status) -{ - wxThread* ptr = this; - - THREAD_SEND_EXIT_MSG(ptr); - p_internal->state = STATE_EXITED; - pthread_exit(status); -} - -void wxThread::TestDestroy() -{ - if (p_internal->state == STATE_PAUSING) { - p_internal->state = STATE_PAUSED; - while (p_internal->state == STATE_PAUSED) { - pthread_testcancel(); - usleep(1); - } - } - pthread_testcancel(); -} - -bool wxThread::IsMain() -{ - return (bool)pthread_equal(pthread_self(), p_mainid); -} - -bool wxThread::IsRunning() const -{ - return (p_internal->state == STATE_RUNNING); -} - -bool wxThread::IsAlive() const -{ - return (p_internal->state == STATE_RUNNING) || - (p_internal->state == STATE_PAUSING) || - (p_internal->state == STATE_PAUSED); -} - -wxThread::wxThread() -{ - p_internal = new wxThreadInternal(); -} - -wxThread::~wxThread() -{ - Destroy(); - Join(); - delete p_internal; -} - -// The default callback just joins the thread and throws away the result. -void wxThread::OnExit() -{ - Join(); -} - -// Automatic initialization -class wxThreadModule : public wxModule { - DECLARE_DYNAMIC_CLASS(wxThreadModule) -public: - virtual bool OnInit() { - wxThreadGuiInit(); - p_mainid = pthread_self(); - p_threads_list = wxList(wxKEY_INTEGER); - wxMainMutex.Lock(); - - return TRUE; - } - - virtual void OnExit() { - wxMainMutex.Unlock(); - wxThreadGuiExit(); - } -}; - -IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule) diff --git a/src/qt/threadsgi.cpp b/src/qt/threadsgi.cpp deleted file mode 100644 index 3503e79616..0000000000 --- a/src/qt/threadsgi.cpp +++ /dev/null @@ -1,252 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: threadsgi.cpp -// Purpose: wxThread (SGI) Implementation -// Author: Original from Wolfram Gloger/Guilhem Lavaux -// Modified by: -// Created: 04/22/98 -// RCS-ID: $Id$ -// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "thread.h" -#endif - -#include -#include - -#include -#include -#include -#include "wx/thread.h" -#include "wx/module.h" -#include "wx/utils.h" - -enum thread_state { - STATE_IDLE = 0, - STATE_RUNNING, - STATE_CANCELED, - STATE_EXITED -}; - -///////////////////////////////////////////////////////////////////////////// -// Static variables -///////////////////////////////////////////////////////////////////////////// - -static int p_mainid; -wxMutex wxMainMutex; - -#include "threadgui.inc" - -///////////////////////////////////////////////////////////////////////////// -// Unix implementations (SGI threads) -///////////////////////////////////////////////////////////////////////////// - -class wxMutexInternal { -public: - abilock_t p_mutex; -}; - -wxMutex::wxMutex() -{ - m_locked = 0; - p_internal = new wxMutexInternal; - init_lock(&(p_internal->p_mutex)); -} - -wxMutex::~wxMutex() -{ - if (m_locked > 0) - wxDebugMsg("wxMutex warning: freeing a locked mutex (%d locks)\n", - m_locked); - delete p_internal; -} - -wxMutexError wxMutex::Lock() -{ - spin_lock(&(p_internal->p_mutex)); - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::TryLock() -{ - if (acquire_lock(&(p_internal->p_mutex)) != 0) - return MUTEX_BUSY; - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::Unlock() -{ - if (m_locked == 0) - return MUTEX_UNLOCKED; - release_lock(&(p_internal->p_mutex)); - m_locked--; - return MUTEX_NO_ERROR; -} - -// GL: Don't know how it works on SGI. Wolfram ? - -wxCondition::wxCondition() {} -wxCondition::~wxCondition() {} -int wxCondition::Wait(wxMutex& WXUNUSED(mutex)) { return 0;} -int wxCondition::Wait(wxMutex& WXUNUSED(mutex), unsigned long WXUNUSED(sec), - unsigned long WXUNUSED(nsec)) { return 0; } -int wxCondition::Signal() { return 0; } -int wxCondition::Broadcast() { return 0; } - -class -wxThreadPrivate { -public: - wxThreadPrivate() { thread_id = 0; state = STATE_IDLE; } - ~wxThreadPrivate() {} - static void SprocStart(void *ptr); - static void SignalHandler(int sig); -public: - int state, thread_id; - void* exit_status; -}; - -void wxThreadPrivate::SprocStart(void *ptr) -{ - void* status; - - wxThread *thr = (wxThread *)ptr; - - thr->p_internal->thread_id = getpid(); - thr->p_internal->exit_status = 0; - status = thr->Entry(); - thr->Exit(status); -} - -void wxThread::Exit(void* status) -{ - wxThread* ptr = this; - THREAD_SEND_EXIT_MSG(ptr); - p_internal->state = STATE_EXITED; - p_internal->exit_status = status; - _exit(0); -} - -wxThreadError wxThread::Create() -{ - if (p_internal->state != STATE_IDLE) - return THREAD_RUNNING; - p_internal->state = STATE_RUNNING; - if (sproc(p_internal->SprocStart, PR_SALL, this) < 0) { - p_internal->state = STATE_IDLE; - return THREAD_NO_RESOURCE; - } - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Destroy() -{ - if (p_internal->state == STATE_RUNNING) - p_internal->state = STATE_CANCELED; - - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Pause() -{ - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Resume() -{ - return THREAD_NO_ERROR; -} - -void *wxThread::Join() -{ - if (p_internal->state != STATE_IDLE) { - bool do_unlock = wxThread::IsMain(); - int stat; - - if (do_unlock) - wxMainMutex.Unlock(); - waitpid(p_internal->thread_id, &stat, 0); - if (do_unlock) - wxMainMutex.Lock(); - if (!WIFEXITED(stat) && !WIFSIGNALED(stat)) - return 0; - p_internal->state = STATE_IDLE; - return p_internal->exit_status; - } - return 0; -} - -unsigned long wxThread::GetID() const -{ - return (unsigned long)p_internal->thread_id; -} - -void wxThread::TestDestroy() -{ - if (p_internal->state == STATE_CANCELED) { - p_internal->exit_status = 0; - _exit(0); - } -} - -void wxThread::SetPriority(int prio) -{ -} - -int wxThread::GetPriority() const -{ - return 0; -} - -bool wxThread::IsMain() -{ - return (int)getpid() == main_id; -} - -bool wxThread::IsAlive() const -{ - return (p_internal->state == STATE_RUNNING); -} - -bool wxThread::IsRunning() const -{ - return (p_internal->state == STATE_RUNNING); -} - -wxThread::wxThread() -{ - p_internal = new wxThreadPrivate(); -} - -wxThread::~wxThread() -{ - Cancel(); - Join(); - delete p_internal; -} - -// The default callback just joins the thread and throws away the result. -void wxThread::OnExit() -{ - Join(); -} - -// Global initialization -class wxThreadModule : public wxModule { - DECLARE_DYNAMIC_CLASS(wxThreadModule) -public: - virtual bool OnInit() { - wxThreadGuiInit(); - p_mainid = (int)getpid(); - wxMainMutex.Lock(); - } - - virtual void OnExit() { - wxMainMutex.Unlock(); - wxThreadGuiExit(); - } -}; - -IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule) diff --git a/src/qt/timer.cpp b/src/qt/timer.cpp deleted file mode 100644 index f976056c77..0000000000 --- a/src/qt/timer.cpp +++ /dev/null @@ -1,56 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: timer.cpp -// Purpose: wxTimer implementation -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "timer.h" -#endif - -#include "wx/timer.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject) -#endif - -wxTimer::wxTimer() -{ - m_milli = 0 ; - m_lastMilli = -1 ; - m_id = 0; - m_oneShot = FALSE; -} - -wxTimer::~wxTimer() -{ - Stop(); -} - -bool wxTimer::Start(int milliseconds,bool mode) -{ - m_oneShot = mode ; - if (m_milliseconds < 0) - m_milliseconds = lastMilli; - - if (m_milliseconds <= 0) - return FALSE; - - m_lastMilli = m_milli = m_milliseconds; - - // TODO: set the timer going. - return FALSE; -} - -void wxTimer::Stop() -{ - m_id = 0 ; - m_milli = 0 ; -} - - diff --git a/src/qt/utilsgtk.cpp b/src/qt/utilsgtk.cpp deleted file mode 100644 index bf6669325c..0000000000 --- a/src/qt/utilsgtk.cpp +++ /dev/null @@ -1,367 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: utils.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -//#ifdef __GNUG__ -//#pragma implementation "utils.h" -//#endif - -#include "wx/utils.h" -#include "wx/string.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef __SVR4__ -#include -#endif - -//------------------------------------------------------------------------ -// misc. -//------------------------------------------------------------------------ - -void wxBell(void) -{ - gdk_beep(); -}; - -void wxSleep(int nSecs) -{ - sleep(nSecs); -}; - -int wxKill(long pid, int sig) -{ - return kill(pid, sig); -}; - -void wxDisplaySize( int *width, int *height ) -{ - if (width) *width = gdk_screen_width(); - if (height) *height = gdk_screen_height(); -} - -//------------------------------------------------------------------------ -// user and home routines -//------------------------------------------------------------------------ - -char* wxGetHomeDir( char *dest ) -{ - wxString tmp = wxGetUserHome( wxString() ); - if (tmp.IsNull()) - strcpy( wxBuffer, "/" ); - else - strcpy( wxBuffer, tmp ); - if (dest) strcpy( dest, WXSTRINGCAST tmp ); - return wxBuffer; -}; - -char *wxGetUserHome( const wxString &user ) -{ - struct passwd *who = NULL; - - if (user.IsNull() || (user== "")) - { - register char *ptr; - - if ((ptr = getenv("HOME")) != NULL) - return ptr; - if ((ptr = getenv("USER")) != NULL - || (ptr = getenv("LOGNAME")) != NULL) { - who = getpwnam(ptr); - } - // We now make sure the the user exists! - if (who == NULL) - who = getpwuid(getuid()); - } - else - who = getpwnam (user); - - return who ? who->pw_dir : (char*)NULL; -}; - -//------------------------------------------------------------------------ -// id routines -//------------------------------------------------------------------------ - -bool wxGetHostName(char *buf, int sz) -{ - *buf = '\0'; -#if defined(__SVR4__) && !defined(__sgi) - return (sysinfo(SI_HOSTNAME, buf, sz) != -1); -#else /* BSD Sockets */ - char name[255]; - struct hostent *h; - // Get hostname - if (gethostname(name, sizeof(name)/sizeof(char)-1) == -1) - return FALSE; - // Get official full name of host - strncpy(buf, (h=gethostbyname(name))!=NULL ? h->h_name : name, sz-1); - return TRUE; -#endif -} - -bool wxGetUserId(char *buf, int sz) -{ - struct passwd *who; - - *buf = '\0'; - if ((who = getpwuid(getuid ())) != NULL) { - strncpy (buf, who->pw_name, sz-1); - return TRUE; - } - return FALSE; -} - -bool wxGetUserName(char *buf, int sz) -{ - struct passwd *who; - - *buf = '\0'; - if ((who = getpwuid (getuid ())) != NULL) { - strncpy (buf, who->pw_gecos, sz - 1); - return TRUE; - } - return FALSE; -} - -//------------------------------------------------------------------------ -// error and debug output routines -//------------------------------------------------------------------------ - -void wxDebugMsg( const char *format, ... ) -{ - va_list ap; - va_start( ap, format ); - vfprintf( stderr, format, ap ); - fflush( stderr ); - va_end(ap); -}; - -void wxError( const wxString &msg, const wxString &title ) -{ - fprintf( stderr, "Error " ); - if (!title.IsNull()) fprintf( stderr, "%s ", WXSTRINGCAST(title) ); - if (!msg.IsNull()) fprintf( stderr, ": %s", WXSTRINGCAST(msg) ); - fprintf( stderr, ".\n" ); -}; - -void wxFatalError( const wxString &msg, const wxString &title ) -{ - fprintf( stderr, "Error " ); - if (!title.IsNull()) fprintf( stderr, "%s ", WXSTRINGCAST(title) ); - if (!msg.IsNull()) fprintf( stderr, ": %s", WXSTRINGCAST(msg) ); - fprintf( stderr, ".\n" ); - exit(1); -}; - -//------------------------------------------------------------------------ -// directory routines -//------------------------------------------------------------------------ - -bool wxDirExists( const wxString& dir ) -{ - char buf[500]; - strcpy( buf, WXSTRINGCAST(dir) ); - struct stat sbuf; - return ((stat(buf, &sbuf) != -1) && S_ISDIR(sbuf.st_mode) ? TRUE : FALSE); -}; - -//------------------------------------------------------------------------ -// wild character routines -//------------------------------------------------------------------------ - -bool wxIsWild( const wxString& pattern ) -{ - wxString tmp = pattern; - char *pat = WXSTRINGCAST(tmp); - while (*pat) { - switch (*pat++) { - case '?': case '*': case '[': case '{': - return TRUE; - case '\\': - if (!*pat++) - return FALSE; - } - } - return FALSE; -}; - - -bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special ) -{ - wxString tmp1 = pat; - char *pattern = WXSTRINGCAST(tmp1); - wxString tmp2 = text; - char *str = WXSTRINGCAST(tmp2); - char c; - char *cp; - bool done = FALSE, ret_code, ok; - // Below is for vi fans - const char OB = '{', CB = '}'; - - // dot_special means '.' only matches '.' - if (dot_special && *str == '.' && *pattern != *str) - return FALSE; - - while ((*pattern != '\0') && (!done) - && (((*str=='\0')&&((*pattern==OB)||(*pattern=='*')))||(*str!='\0'))) { - switch (*pattern) { - case '\\': - pattern++; - if (*pattern != '\0') - pattern++; - break; - case '*': - pattern++; - ret_code = FALSE; - while ((*str!='\0') - && (!(ret_code=wxMatchWild(pattern, str++, FALSE)))) - /*loop*/; - if (ret_code) { - while (*str != '\0') - str++; - while (*pattern != '\0') - pattern++; - } - break; - case '[': - pattern++; - repeat: - if ((*pattern == '\0') || (*pattern == ']')) { - done = TRUE; - break; - } - if (*pattern == '\\') { - pattern++; - if (*pattern == '\0') { - done = TRUE; - break; - } - } - if (*(pattern + 1) == '-') { - c = *pattern; - pattern += 2; - if (*pattern == ']') { - done = TRUE; - break; - } - if (*pattern == '\\') { - pattern++; - if (*pattern == '\0') { - done = TRUE; - break; - } - } - if ((*str < c) || (*str > *pattern)) { - pattern++; - goto repeat; - } - } else if (*pattern != *str) { - pattern++; - goto repeat; - } - pattern++; - while ((*pattern != ']') && (*pattern != '\0')) { - if ((*pattern == '\\') && (*(pattern + 1) != '\0')) - pattern++; - pattern++; - } - if (*pattern != '\0') { - pattern++, str++; - } - break; - case '?': - pattern++; - str++; - break; - case OB: - pattern++; - while ((*pattern != CB) && (*pattern != '\0')) { - cp = str; - ok = TRUE; - while (ok && (*cp != '\0') && (*pattern != '\0') - && (*pattern != ',') && (*pattern != CB)) { - if (*pattern == '\\') - pattern++; - ok = (*pattern++ == *cp++); - } - if (*pattern == '\0') { - ok = FALSE; - done = TRUE; - break; - } else if (ok) { - str = cp; - while ((*pattern != CB) && (*pattern != '\0')) { - if (*++pattern == '\\') { - if (*++pattern == CB) - pattern++; - } - } - } else { - while (*pattern!=CB && *pattern!=',' && *pattern!='\0') { - if (*++pattern == '\\') { - if (*++pattern == CB || *pattern == ',') - pattern++; - } - } - } - if (*pattern != '\0') - pattern++; - } - break; - default: - if (*str == *pattern) { - str++, pattern++; - } else { - done = TRUE; - } - } - } - while (*pattern == '*') - pattern++; - return ((*str == '\0') && (*pattern == '\0')); -}; - -//------------------------------------------------------------------------ -// subprocess routines -//------------------------------------------------------------------------ - -long wxExecute( char **argv, bool sync, wxProcess *process ) -{ -}; - -long wxExecute( const wxString& command, bool sync, wxProcess *process ) -{ - if (command.IsNull() || command == "") return FALSE; - - int argc = 0; - char *argv[127]; - char tmp[1024]; - const char *IFS = " \t\n"; - - strncpy (tmp, command, sizeof(tmp) / sizeof(char) - 1); - tmp[sizeof (tmp) / sizeof (char) - 1] = '\0'; - argv[argc++] = strtok (tmp, IFS); - while ((argv[argc++] = strtok(NULL, IFS)) != NULL) - /* loop */ ; - return wxExecute(argv, sync, process); -}; - - diff --git a/src/qt/utilsres.cpp b/src/qt/utilsres.cpp deleted file mode 100644 index 562f0f31ca..0000000000 --- a/src/qt/utilsres.cpp +++ /dev/null @@ -1,332 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: utils.cpp -// Purpose: -// Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -//#ifdef __GNUG__ -//#pragma implementation "utils.h" -//#endif - -#include "wx/utils.h" -#include "wx/string.h" -#include "wx/list.h" - -#include -#include -#include -#ifdef __SVR4__ -#include -#endif - -#include -#include -#include - - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -// Yuck this is really BOTH site and platform dependent -// so we should use some other strategy! -#ifdef __SUN__ - #define DEFAULT_XRESOURCE_DIR "/usr/openwin/lib/app-defaults" -#else - #define DEFAULT_XRESOURCE_DIR "/usr/lib/X11/app-defaults" -#endif - -//----------------------------------------------------------------------------- -// glabal data (data.cpp) -//----------------------------------------------------------------------------- - -extern wxList wxResourceCache; -extern XrmDatabase wxResourceDatabase; - -//----------------------------------------------------------------------------- -// utility functions for get/write resources -//----------------------------------------------------------------------------- - -static char *GetResourcePath(char *buf, char *name, bool create) -{ - if (create && FileExists(name)) { - strcpy(buf, name); - return buf; // Exists so ... - } - if (*name == '/') - strcpy(buf, name); - else { - // Put in standard place for resource files if not absolute - strcpy(buf, DEFAULT_XRESOURCE_DIR); - strcat(buf, "/"); - strcat(buf, FileNameFromPath(name)); - } - if (create) { - // Touch the file to create it - FILE *fd = fopen(buf, "w"); - if (fd) fclose(fd); - } - return buf; -} - -// Read $HOME for what it says is home, if not -// read $USER or $LOGNAME for user name else determine -// the Real User, then determine the Real home dir. -static char *GetIniFile(char *dest, const char *filename) -{ - char *home = NULL; - if (filename && wxIsAbsolutePath(filename)) - { - strcpy(dest, filename); - } - else - { - if ((home = wxGetUserHome(wxString())) != NULL) - { - strcpy(dest, home); - if (dest[strlen(dest) - 1] != '/') strcat(dest, "/"); - if (filename == NULL) - { - if ((filename = getenv("XENVIRONMENT")) == NULL) filename = ".Xdefaults"; - } - else - if (*filename != '.') strcat(dest, "."); - strcat(dest, filename); - } - else - { - dest[0] = '\0'; - } - } - return dest; -} - -static void wxXMergeDatabases(void) -{ - XrmDatabase homeDB, serverDB, applicationDB; - char filenamebuf[1024]; - - char *filename = &filenamebuf[0]; - char *environment; -// char *classname = gdk_progclass; // Robert Roebling ?? - printf( "Fixme.\n"); - char name[256]; - (void)strcpy(name, "/usr/lib/X11/app-defaults/"); - (void)strcat(name, classname ? classname : "wxWindows"); - - // Get application defaults file, if any - if ((applicationDB = XrmGetFileDatabase(name))) - (void)XrmMergeDatabases(applicationDB, &wxResourceDatabase); - - // Merge server defaults, created by xrdb, loaded as a property of the root - // window when the server initializes and loaded into the display - // structure on XOpenDisplay; - // if not defined, use .Xdefaults - printf( "Fixme.\n"); -/* if (XResourceManagerString(GDK_DISPLAY()) != NULL) { - serverDB = XrmGetStringDatabase(XResourceManagerString(GDK_DISPLAY())); - } else { - (void)GetIniFile(filename, NULL); - serverDB = XrmGetFileDatabase(filename); - } -*/ - if (serverDB) - XrmMergeDatabases(serverDB, &wxResourceDatabase); - - // Open XENVIRONMENT file, or if not defined, the .Xdefaults, - // and merge into existing database - - if ((environment = getenv("XENVIRONMENT")) == NULL) { - size_t len; - environment = GetIniFile(filename, NULL); - len = strlen(environment); -#if !defined(SVR4) || defined(__sgi) - (void)gethostname(environment + len, 1024 - len); -#else - (void)sysinfo(SI_HOSTNAME, environment + len, 1024 - len); -#endif - } - if ((homeDB = XrmGetFileDatabase(environment))) - XrmMergeDatabases(homeDB, &wxResourceDatabase); -} - -//----------------------------------------------------------------------------- -// called on application exit -//----------------------------------------------------------------------------- - -void wxFlushResources(void) -{ - char nameBuffer[512]; - - wxNode *node = wxResourceCache.First(); - while (node) { - char *file = node->key.string; - // If file doesn't exist, create it first. - (void)GetResourcePath(nameBuffer, file, TRUE); - - XrmDatabase database = (XrmDatabase)node->Data(); - XrmPutFileDatabase(database, nameBuffer); - XrmDestroyDatabase(database); - wxNode *next = node->Next(); - delete node; - node = next; - } -} - -void wxDeleteResources(const char *file) -{ - char buffer[500]; - (void)GetIniFile(buffer, file); - - wxNode *node = wxResourceCache.Find(buffer); - if (node) { - XrmDatabase database = (XrmDatabase)node->Data(); - XrmDestroyDatabase(database); - delete node; - } -} - -//----------------------------------------------------------------------------- -// resource functions -//----------------------------------------------------------------------------- - -bool wxWriteResource(const wxString& section, const wxString& entry, const wxString& value, const wxString& file ) -{ - char buffer[500]; - - if (!entry) return FALSE; - - (void)GetIniFile(buffer, file); - - XrmDatabase database; - wxNode *node = wxResourceCache.Find(buffer); - if (node) - database = (XrmDatabase)node->Data(); - else { - database = XrmGetFileDatabase(buffer); - wxResourceCache.Append(buffer, (wxObject *)database); - } - char resName[300]; - strcpy(resName, !section.IsNull() ? WXSTRINGCAST section : "wxWindows"); - strcat(resName, "."); - strcat(resName, entry); - XrmPutStringResource(&database, resName, value); - return TRUE; -}; - -bool wxWriteResource(const wxString& section, const wxString& entry, float value, const wxString& file ) -{ - char buf[50]; - sprintf(buf, "%.4f", value); - return wxWriteResource(section, entry, buf, file); -}; - -bool wxWriteResource(const wxString& section, const wxString& entry, long value, const wxString& file ) -{ - char buf[50]; - sprintf(buf, "%ld", value); - return wxWriteResource(section, entry, buf, file); -}; - -bool wxWriteResource(const wxString& section, const wxString& entry, int value, const wxString& file ) -{ - char buf[50]; - sprintf(buf, "%d", value); - return wxWriteResource(section, entry, buf, file); -}; - -bool wxGetResource(const wxString& section, const wxString& entry, char **value, const wxString& file ) -{ - if (!wxResourceDatabase) - wxXMergeDatabases(); - - XrmDatabase database; - if (file) { - char buffer[500]; - // Is this right? Trying to get it to look in the user's - // home directory instead of current directory -- JACS - (void)GetIniFile(buffer, file); - - wxNode *node = wxResourceCache.Find(buffer); - if (node) - database = (XrmDatabase)node->Data(); - else { - database = XrmGetFileDatabase(buffer); - wxResourceCache.Append(buffer, (wxObject *)database); - } - } else - database = wxResourceDatabase; - - XrmValue xvalue; - char *str_type[20]; - char buf[150]; - strcpy(buf, section); - strcat(buf, "."); - strcat(buf, entry); - - bool success = XrmGetResource(database, buf, "*", str_type, &xvalue); - // Try different combinations of upper/lower case, just in case... - if (!success) { - buf[0] = (isupper(buf[0]) ? tolower(buf[0]) : toupper(buf[0])); - success = XrmGetResource(database, buf, "*", str_type, &xvalue); - } - if (success) { - if (*value) - delete[] *value; - *value = new char[xvalue.size + 1]; - strncpy(*value, xvalue.addr, (int)xvalue.size); - return TRUE; - } - return FALSE; -}; - -bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file ) -{ - char *s = NULL; - bool succ = wxGetResource(section, entry, &s, file); - if (succ) { - *value = (float)strtod(s, NULL); - delete[]s; - return TRUE; - } else - return FALSE; -}; - -bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file ) -{ - char *s = NULL; - bool succ = wxGetResource(section, entry, &s, file); - if (succ) { - *value = strtol(s, NULL, 10); - delete[]s; - return TRUE; - } else - return FALSE; -}; - -bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file ) -{ - char *s = NULL; - bool succ = wxGetResource(section, entry, &s, file); - if (succ) { - // Handle True, False here - // True, Yes, Enables, Set or Activated - if (*s == 'T' || *s == 'Y' || *s == 'E' || *s == 'S' || *s == 'A') - *value = TRUE; - // False, No, Disabled, Reset, Cleared, Deactivated - else if (*s == 'F' || *s == 'N' || *s == 'D' || *s == 'R' || *s == 'C') - *value = FALSE; - // Handle as Integer - else - *value = (int)strtol(s, NULL, 10); - delete[]s; - return TRUE; - } else - return FALSE; -}; - diff --git a/src/qt/verti.xbm b/src/qt/verti.xbm deleted file mode 100644 index 2dd9dc4c05..0000000000 --- a/src/qt/verti.xbm +++ /dev/null @@ -1,6 +0,0 @@ -#define verti_width 15 -#define verti_height 15 -static char verti_bits[] = { - 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, - 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, - 0x84, 0x10, 0x84, 0x10, 0x84, 0x10}; diff --git a/src/qt/window.cpp b/src/qt/window.cpp deleted file mode 100644 index 341ad00e51..0000000000 --- a/src/qt/window.cpp +++ /dev/null @@ -1,1281 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: windows.cpp -// Purpose: wxWindow -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "window.h" -#endif - -#include "wx/setup.h" -#include "wx/menu.h" -#include "wx/dc.h" -#include "wx/dcclient.h" -#include "wx/utils.h" -#include "wx/app.h" -#include "wx/panel.h" -#include "wx/layout.h" -#include "wx/dialog.h" -#include "wx/listbox.h" -#include "wx/button.h" -#include "wx/settings.h" -#include "wx/msgdlg.h" - -#include "wx/menuitem.h" -#include "wx/log.h" - -#if USE_DRAG_AND_DROP -#include "wx/dnd.h" -#endif - -#include - -extern wxList wxPendingDelete; - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxEvtHandler) - -BEGIN_EVENT_TABLE(wxWindow, wxEvtHandler) - EVT_CHAR(wxWindow::OnChar) - EVT_ERASE_BACKGROUND(wxWindow::OnEraseBackground) - EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged) - EVT_INIT_DIALOG(wxWindow::OnInitDialog) - EVT_IDLE(wxWindow::OnIdle) -END_EVENT_TABLE() - -#endif - - -// Constructor -wxWindow::wxWindow() -{ - // Generic - m_windowId = 0; - m_windowStyle = 0; - m_windowParent = NULL; - m_windowEventHandler = this; - m_windowName = ""; - m_windowCursor = *wxSTANDARD_CURSOR; - m_children = new wxList; - m_constraints = NULL; - m_constraintsInvolvedIn = NULL; - m_windowSizer = NULL; - m_sizerParent = NULL; - m_autoLayout = FALSE; - m_windowValidator = NULL; - m_defaultItem = NULL; - m_returnCode = 0; - m_caretWidth = 0; m_caretHeight = 0; - m_caretEnabled = FALSE; - m_caretShown = FALSE; - m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) ; ; - m_foregroundColour = *wxBLACK; - m_defaultForegroundColour = *wxBLACK ; - m_defaultBackgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE) ; - -#if USE_DRAG_AND_DROP - m_pDropTarget = NULL; -#endif -} - -// Destructor -wxWindow::~wxWindow() -{ - // Have to delete constraints/sizer FIRST otherwise - // sizers may try to look at deleted windows as they - // delete themselves. -#if USE_CONSTRAINTS - DeleteRelatedConstraints(); - if (m_constraints) - { - // This removes any dangling pointers to this window - // in other windows' constraintsInvolvedIn lists. - UnsetConstraints(m_constraints); - delete m_constraints; - m_constraints = NULL; - } - if (m_windowSizer) - { - delete m_windowSizer; - m_windowSizer = NULL; - } - // If this is a child of a sizer, remove self from parent - if (m_sizerParent) - m_sizerParent->RemoveChild((wxWindow *)this); -#endif - - if (m_windowParent) - m_windowParent->RemoveChild(this); - - DestroyChildren(); - - // TODO: destroy the window - - delete m_children; - m_children = NULL; - - // Just in case the window has been Closed, but - // we're then deleting immediately: don't leave - // dangling pointers. - wxPendingDelete.DeleteObject(this); - - if ( m_windowValidator ) - delete m_windowValidator; -} - -// Destroy the window (delayed, if a managed window) -bool wxWindow::Destroy() -{ - delete this; - return TRUE; -} - -// Constructor -bool wxWindow::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - // Generic - m_windowId = 0; - m_windowStyle = 0; - m_windowParent = NULL; - m_windowEventHandler = this; - m_windowName = ""; - m_windowCursor = *wxSTANDARD_CURSOR; - m_constraints = NULL; - m_constraintsInvolvedIn = NULL; - m_windowSizer = NULL; - m_sizerParent = NULL; - m_autoLayout = FALSE; - m_windowValidator = NULL; - -#if USE_DRAG_AND_DROP - m_pDropTarget = NULL; -#endif - - m_caretWidth = 0; m_caretHeight = 0; - m_caretEnabled = FALSE; - m_caretShown = FALSE; - m_minSizeX = -1; - m_minSizeY = -1; - m_maxSizeX = -1; - m_maxSizeY = -1; - m_defaultItem = NULL; - m_windowParent = NULL; - if (!parent) - return FALSE; - - if (parent) parent->AddChild(this); - - m_returnCode = 0; - - SetName(name); - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) ; ; - m_foregroundColour = *wxBLACK; - m_defaultForegroundColour = *wxBLACK ; - m_defaultBackgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE) ; - - m_windowStyle = style; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - // TODO: create the window - - return TRUE; -} - -void wxWindow::SetFocus() -{ - // TODO -} - -void wxWindow::Enable(bool enable) -{ - // TODO -} - -void wxWindow::CaptureMouse() -{ - // TODO -} - -void wxWindow::ReleaseMouse() -{ - // TODO -} - -// Push/pop event handler (i.e. allow a chain of event handlers -// be searched) -void wxWindow::PushEventHandler(wxEvtHandler *handler) -{ - handler->SetNextHandler(GetEventHandler()); - SetEventHandler(handler); -} - -wxEvtHandler *wxWindow::PopEventHandler(bool deleteHandler) -{ - if ( GetEventHandler() ) - { - wxEvtHandler *handlerA = GetEventHandler(); - wxEvtHandler *handlerB = handlerA->GetNextHandler(); - handlerA->SetNextHandler(NULL); - SetEventHandler(handlerB); - if ( deleteHandler ) - { - delete handlerA; - return NULL; - } - else - return handlerA; - } - else - return NULL; -} - -#if USE_DRAG_AND_DROP - -void wxWindow::SetDropTarget(wxDropTarget *pDropTarget) -{ - if ( m_pDropTarget != 0 ) { - m_pDropTarget->Revoke(m_hWnd); - delete m_pDropTarget; - } - - m_pDropTarget = pDropTarget; - if ( m_pDropTarget != 0 ) - m_pDropTarget->Register(m_hWnd); -} - -#endif - -// Old style file-manager drag&drop -void wxWindow::DragAcceptFiles(bool accept) -{ - // TODO -} - -// Get total size -void wxWindow::GetSize(int *x, int *y) const -{ - // TODO -} - -void wxWindow::GetPosition(int *x, int *y) const -{ - // TODO -} - -void wxWindow::ScreenToClient(int *x, int *y) const -{ - // TODO -} - -void wxWindow::ClientToScreen(int *x, int *y) const -{ - // TODO -} - -void wxWindow::SetCursor(const wxCursor& cursor) -{ - m_windowCursor = cursor; - if (m_windowCursor.Ok()) - { - // TODO - } -} - - -// Get size *available for subwindows* i.e. excluding menu bar etc. -void wxWindow::GetClientSize(int *x, int *y) const -{ - // TODO -} - -void wxWindow::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -void wxWindow::SetClientSize(int width, int height) -{ - // TODO -} - -// For implementation purposes - sometimes decorations make the client area -// smaller -wxPoint wxWindow::GetClientAreaOrigin() const -{ - return wxPoint(0, 0); -} - -// Makes an adjustment to the window position (for example, a frame that has -// a toolbar that it manages itself). -void wxWindow::AdjustForParentClientOrigin(int& x, int& y, int sizeFlags) -{ - if (((sizeFlags & wxSIZE_NO_ADJUSTMENTS) == 0) && GetParent()) - { - wxPoint pt(GetParent()->GetClientAreaOrigin()); - x += pt.x; y += pt.y; - } -} - -bool wxWindow::Show(bool show) -{ - // TODO - return FALSE; -} - -bool wxWindow::IsShown() const -{ - // TODO - return FALSE; -} - -int wxWindow::GetCharHeight() const -{ - // TODO - return 0; -} - -int wxWindow::GetCharWidth() const -{ - // TODO - return 0; -} - -void wxWindow::GetTextExtent(const wxString& string, int *x, int *y, - int *descent, int *externalLeading, const wxFont *theFont, bool) const -{ - wxFont *fontToUse = (wxFont *)theFont; - if (!fontToUse) - fontToUse = (wxFont *) & m_windowFont; - - // TODO -} - -void wxWindow::Refresh(bool eraseBack, const wxRectangle *rect) -{ - // TODO -} - -// Responds to colour changes: passes event on to children. -void wxWindow::OnSysColourChanged(wxSysColourChangedEvent& event) -{ - wxNode *node = GetChildren()->First(); - while ( node ) - { - // Only propagate to non-top-level windows - wxWindow *win = (wxWindow *)node->Data(); - if ( win->GetParent() ) - { - wxSysColourChangedEvent event2; - event.m_eventObject = win; - win->GetEventHandler()->ProcessEvent(event2); - } - - node = node->Next(); - } -} - -// This can be called by the app (or wxWindows) to do default processing for the current -// event. Save message/event info in wxWindow so they can be used in this function. -long wxWindow::Default() -{ - // TODO - return 0; -} - -void wxWindow::InitDialog() -{ - wxInitDialogEvent event(GetId()); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); -} - -// Default init dialog behaviour is to transfer data to window -void wxWindow::OnInitDialog(wxInitDialogEvent& event) -{ - TransferDataToWindow(); -} - -// Caret manipulation -void wxWindow::CreateCaret(int w, int h) -{ - m_caretWidth = w; - m_caretHeight = h; - m_caretEnabled = TRUE; -} - -void wxWindow::CreateCaret(const wxBitmap *WXUNUSED(bitmap)) -{ - // TODO -} - -void wxWindow::ShowCaret(bool show) -{ - // TODO -} - -void wxWindow::DestroyCaret() -{ - // TODO - m_caretEnabled = FALSE; -} - -void wxWindow::SetCaretPos(int x, int y) -{ - // TODO -} - -void wxWindow::GetCaretPos(int *x, int *y) const -{ - // TODO -} - -wxWindow *wxGetActiveWindow() -{ - // TODO - return NULL; -} - -void wxWindow::SetSizeHints(int minW, int minH, int maxW, int maxH, int WXUNUSED(incW), int WXUNUSED(incH)) -{ - m_minSizeX = minW; - m_minSizeY = minH; - m_maxSizeX = maxW; - m_maxSizeY = maxH; -} - -void wxWindow::Centre(int direction) -{ - int x, y, width, height, panel_width, panel_height, new_x, new_y; - - wxWindow *father = (wxWindow *)GetParent(); - if (!father) - return; - - father->GetClientSize(&panel_width, &panel_height); - GetSize(&width, &height); - GetPosition(&x, &y); - - new_x = -1; - new_y = -1; - - if (direction & wxHORIZONTAL) - new_x = (int)((panel_width - width)/2); - - if (direction & wxVERTICAL) - new_y = (int)((panel_height - height)/2); - - SetSize(new_x, new_y, -1, -1); - -} - -// Coordinates relative to the window -void wxWindow::WarpPointer (int x_pos, int y_pos) -{ - // TODO -} - -void wxWindow::OnEraseBackground(wxEraseEvent& event) -{ - // TODO - Default(); -} - -int wxWindow::GetScrollPos(int orient) const -{ - // TODO - return 0; -} - -// This now returns the whole range, not just the number -// of positions that we can scroll. -int wxWindow::GetScrollRange(int orient) const -{ - // TODO - return 0; -} - -int wxWindow::GetScrollThumb(int orient) const -{ - // TODO - return 0; -} - -void wxWindow::SetScrollPos(int orient, int pos, bool refresh) -{ - // TODO - return 0; -} - -// New function that will replace some of the above. -void wxWindow::SetScrollbar(int orient, int pos, int thumbVisible, - int range, bool refresh) -{ - // TODO -} - -// Does a physical scroll -void wxWindow::ScrollWindow(int dx, int dy, const wxRectangle *rect) -{ - // TODO - return 0; -} - -void wxWindow::SetFont(const wxFont& font) -{ - m_windowFont = font; - - if (!m_windowFont.Ok()) - return; - // TODO -} - -void wxWindow::OnChar(wxKeyEvent& event) -{ - if ( event.KeyCode() == WXK_TAB ) { - // propagate the TABs to the parent - it's up to it to decide what - // to do with it - if ( GetParent() ) { - if ( GetParent()->ProcessEvent(event) ) - return; - } - } -} - -void wxWindow::OnPaint(wxPaintEvent& event) -{ - Default(); -} - -bool wxWindow::IsEnabled() const -{ - // TODO - return FALSE; -} - -// Dialog support: override these and call -// base class members to add functionality -// that can't be done using validators. -// NOTE: these functions assume that controls -// are direct children of this window, not grandchildren -// or other levels of descendant. - -// Transfer values to controls. If returns FALSE, -// it's an application error (pops up a dialog) -bool wxWindow::TransferDataToWindow() -{ - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow *child = (wxWindow *)node->Data(); - if ( child->GetValidator() && - !child->GetValidator()->TransferToWindow() ) - { - wxMessageBox("Application Error", "Could not transfer data to window", wxOK|wxICON_EXCLAMATION); - return FALSE; - } - - node = node->Next(); - } - return TRUE; -} - -// Transfer values from controls. If returns FALSE, -// validation failed: don't quit -bool wxWindow::TransferDataFromWindow() -{ - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow *child = (wxWindow *)node->Data(); - if ( child->GetValidator() && !child->GetValidator()->TransferFromWindow() ) - { - return FALSE; - } - - node = node->Next(); - } - return TRUE; -} - -bool wxWindow::Validate() -{ - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow *child = (wxWindow *)node->Data(); - if ( child->GetValidator() && /* child->GetValidator()->Ok() && */ !child->GetValidator()->Validate(this) ) - { - return FALSE; - } - - node = node->Next(); - } - return TRUE; -} - -// Get the window with the focus -wxWindow *wxWindow::FindFocus() -{ - // TODO - return NULL; -} - -void wxWindow::AddChild(wxWindow *child) -{ - GetChildren()->Append(child); - child->m_windowParent = this; -} - -void wxWindow::RemoveChild(wxWindow *child) -{ - if (GetChildren()) - GetChildren()->DeleteObject(child); - child->m_windowParent = NULL; -} - -void wxWindow::DestroyChildren() -{ - if (GetChildren()) { - wxNode *node; - while ((node = GetChildren()->First()) != (wxNode *)NULL) { - wxWindow *child; - if ((child = (wxWindow *)node->Data()) != (wxWindow *)NULL) { - delete child; - if ( GetChildren()->Member(child) ) - delete node; - } - } /* while */ - } -} - -void wxWindow::MakeModal(bool modal) -{ - // Disable all other windows - if (this->IsKindOf(CLASSINFO(wxDialog)) || this->IsKindOf(CLASSINFO(wxFrame))) - { - wxNode *node = wxTopLevelWindows.First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (win != this) - win->Enable(!modal); - - node = node->Next(); - } - } -} - -// If nothing defined for this, try the parent. -// E.g. we may be a button loaded from a resource, with no callback function -// defined. -void wxWindow::OnCommand(wxWindow& win, wxCommandEvent& event) -{ - if (GetEventHandler()->ProcessEvent(event) ) - return; - if (m_windowParent) - m_windowParent->GetEventHandler()->OnCommand(win, event); -} - -void wxWindow::SetConstraints(wxLayoutConstraints *c) -{ - if (m_constraints) - { - UnsetConstraints(m_constraints); - delete m_constraints; - } - m_constraints = c; - if (m_constraints) - { - // Make sure other windows know they're part of a 'meaningful relationship' - if (m_constraints->left.GetOtherWindow() && (m_constraints->left.GetOtherWindow() != this)) - m_constraints->left.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->top.GetOtherWindow() && (m_constraints->top.GetOtherWindow() != this)) - m_constraints->top.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->right.GetOtherWindow() && (m_constraints->right.GetOtherWindow() != this)) - m_constraints->right.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->bottom.GetOtherWindow() && (m_constraints->bottom.GetOtherWindow() != this)) - m_constraints->bottom.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->width.GetOtherWindow() && (m_constraints->width.GetOtherWindow() != this)) - m_constraints->width.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->height.GetOtherWindow() && (m_constraints->height.GetOtherWindow() != this)) - m_constraints->height.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->centreX.GetOtherWindow() && (m_constraints->centreX.GetOtherWindow() != this)) - m_constraints->centreX.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->centreY.GetOtherWindow() && (m_constraints->centreY.GetOtherWindow() != this)) - m_constraints->centreY.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - } -} - -// This removes any dangling pointers to this window -// in other windows' constraintsInvolvedIn lists. -void wxWindow::UnsetConstraints(wxLayoutConstraints *c) -{ - if (c) - { - if (c->left.GetOtherWindow() && (c->top.GetOtherWindow() != this)) - c->left.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->top.GetOtherWindow() && (c->top.GetOtherWindow() != this)) - c->top.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->right.GetOtherWindow() && (c->right.GetOtherWindow() != this)) - c->right.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->bottom.GetOtherWindow() && (c->bottom.GetOtherWindow() != this)) - c->bottom.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->width.GetOtherWindow() && (c->width.GetOtherWindow() != this)) - c->width.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->height.GetOtherWindow() && (c->height.GetOtherWindow() != this)) - c->height.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->centreX.GetOtherWindow() && (c->centreX.GetOtherWindow() != this)) - c->centreX.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->centreY.GetOtherWindow() && (c->centreY.GetOtherWindow() != this)) - c->centreY.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - } -} - -// Back-pointer to other windows we're involved with, so if we delete -// this window, we must delete any constraints we're involved with. -void wxWindow::AddConstraintReference(wxWindow *otherWin) -{ - if (!m_constraintsInvolvedIn) - m_constraintsInvolvedIn = new wxList; - if (!m_constraintsInvolvedIn->Member(otherWin)) - m_constraintsInvolvedIn->Append(otherWin); -} - -// REMOVE back-pointer to other windows we're involved with. -void wxWindow::RemoveConstraintReference(wxWindow *otherWin) -{ - if (m_constraintsInvolvedIn) - m_constraintsInvolvedIn->DeleteObject(otherWin); -} - -// Reset any constraints that mention this window -void wxWindow::DeleteRelatedConstraints() -{ - if (m_constraintsInvolvedIn) - { - wxNode *node = m_constraintsInvolvedIn->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - wxNode *next = node->Next(); - wxLayoutConstraints *constr = win->GetConstraints(); - - // Reset any constraints involving this window - if (constr) - { - constr->left.ResetIfWin((wxWindow *)this); - constr->top.ResetIfWin((wxWindow *)this); - constr->right.ResetIfWin((wxWindow *)this); - constr->bottom.ResetIfWin((wxWindow *)this); - constr->width.ResetIfWin((wxWindow *)this); - constr->height.ResetIfWin((wxWindow *)this); - constr->centreX.ResetIfWin((wxWindow *)this); - constr->centreY.ResetIfWin((wxWindow *)this); - } - delete node; - node = next; - } - delete m_constraintsInvolvedIn; - m_constraintsInvolvedIn = NULL; - } -} - -void wxWindow::SetSizer(wxSizer *sizer) -{ - m_windowSizer = sizer; - if (sizer) - sizer->SetSizerParent((wxWindow *)this); -} - -/* - * New version - */ - -bool wxWindow::Layout() -{ - if (GetConstraints()) - { - int w, h; - GetClientSize(&w, &h); - GetConstraints()->width.SetValue(w); - GetConstraints()->height.SetValue(h); - } - - // If top level (one sizer), evaluate the sizer's constraints. - if (GetSizer()) - { - int noChanges; - GetSizer()->ResetConstraints(); // Mark all constraints as unevaluated - GetSizer()->LayoutPhase1(&noChanges); - GetSizer()->LayoutPhase2(&noChanges); - GetSizer()->SetConstraintSizes(); // Recursively set the real window sizes - return TRUE; - } - else - { - // Otherwise, evaluate child constraints - ResetConstraints(); // Mark all constraints as unevaluated - DoPhase(1); // Just one phase need if no sizers involved - DoPhase(2); - SetConstraintSizes(); // Recursively set the real window sizes - } - return TRUE; -} - - -// Do a phase of evaluating constraints: -// the default behaviour. wxSizers may do a similar -// thing, but also impose their own 'constraints' -// and order the evaluation differently. -bool wxWindow::LayoutPhase1(int *noChanges) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - return constr->SatisfyConstraints((wxWindow *)this, noChanges); - } - else - return TRUE; -} - -bool wxWindow::LayoutPhase2(int *noChanges) -{ - *noChanges = 0; - - // Layout children - DoPhase(1); - DoPhase(2); - return TRUE; -} - -// Do a phase of evaluating child constraints -bool wxWindow::DoPhase(int phase) -{ - int noIterations = 0; - int maxIterations = 500; - int noChanges = 1; - int noFailures = 0; - wxList succeeded; - while ((noChanges > 0) && (noIterations < maxIterations)) - { - noChanges = 0; - noFailures = 0; - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow *)node->Data(); - if (!child->IsKindOf(CLASSINFO(wxFrame)) && !child->IsKindOf(CLASSINFO(wxDialog))) - { - wxLayoutConstraints *constr = child->GetConstraints(); - if (constr) - { - if (succeeded.Member(child)) - { - } - else - { - int tempNoChanges = 0; - bool success = ( (phase == 1) ? child->LayoutPhase1(&tempNoChanges) : child->LayoutPhase2(&tempNoChanges) ) ; - noChanges += tempNoChanges; - if (success) - { - succeeded.Append(child); - } - } - } - } - node = node->Next(); - } - noIterations ++; - } - return TRUE; -} - -void wxWindow::ResetConstraints() -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - constr->left.SetDone(FALSE); - constr->top.SetDone(FALSE); - constr->right.SetDone(FALSE); - constr->bottom.SetDone(FALSE); - constr->width.SetDone(FALSE); - constr->height.SetDone(FALSE); - constr->centreX.SetDone(FALSE); - constr->centreY.SetDone(FALSE); - } - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (!win->IsKindOf(CLASSINFO(wxFrame)) && !win->IsKindOf(CLASSINFO(wxDialog))) - win->ResetConstraints(); - node = node->Next(); - } -} - -// Need to distinguish between setting the 'fake' size for -// windows and sizers, and setting the real values. -void wxWindow::SetConstraintSizes(bool recurse) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr && constr->left.GetDone() && constr->right.GetDone() && - constr->width.GetDone() && constr->height.GetDone()) - { - int x = constr->left.GetValue(); - int y = constr->top.GetValue(); - int w = constr->width.GetValue(); - int h = constr->height.GetValue(); - - // If we don't want to resize this window, just move it... - if ((constr->width.GetRelationship() != wxAsIs) || - (constr->height.GetRelationship() != wxAsIs)) - { - // Calls Layout() recursively. AAAGH. How can we stop that. - // Simply take Layout() out of non-top level OnSizes. - SizerSetSize(x, y, w, h); - } - else - { - SizerMove(x, y); - } - } - else if (constr) - { - char *windowClass = this->GetClassInfo()->GetClassName(); - - wxString winName; - if (GetName() == "") - winName = "unnamed"; - else - winName = GetName(); - wxDebugMsg("Constraint(s) not satisfied for window of type %s, name %s:\n", (const char *)windowClass, (const char *)winName); - if (!constr->left.GetDone()) - wxDebugMsg(" unsatisfied 'left' constraint.\n"); - if (!constr->right.GetDone()) - wxDebugMsg(" unsatisfied 'right' constraint.\n"); - if (!constr->width.GetDone()) - wxDebugMsg(" unsatisfied 'width' constraint.\n"); - if (!constr->height.GetDone()) - wxDebugMsg(" unsatisfied 'height' constraint.\n"); - wxDebugMsg("Please check constraints: try adding AsIs() constraints.\n"); - } - - if (recurse) - { - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (!win->IsKindOf(CLASSINFO(wxFrame)) && !win->IsKindOf(CLASSINFO(wxDialog))) - win->SetConstraintSizes(); - node = node->Next(); - } - } -} - -// This assumes that all sizers are 'on' the same -// window, i.e. the parent of this window. -void wxWindow::TransformSizerToActual(int *x, int *y) const -{ - if (!m_sizerParent || m_sizerParent->IsKindOf(CLASSINFO(wxDialog)) || - m_sizerParent->IsKindOf(CLASSINFO(wxFrame)) ) - return; - - int xp, yp; - m_sizerParent->GetPosition(&xp, &yp); - m_sizerParent->TransformSizerToActual(&xp, &yp); - *x += xp; - *y += yp; -} - -void wxWindow::SizerSetSize(int x, int y, int w, int h) -{ - int xx = x; - int yy = y; - TransformSizerToActual(&xx, &yy); - SetSize(xx, yy, w, h); -} - -void wxWindow::SizerMove(int x, int y) -{ - int xx = x; - int yy = y; - TransformSizerToActual(&xx, &yy); - Move(xx, yy); -} - -// Only set the size/position of the constraint (if any) -void wxWindow::SetSizeConstraint(int x, int y, int w, int h) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - if (x != -1) - { - constr->left.SetValue(x); - constr->left.SetDone(TRUE); - } - if (y != -1) - { - constr->top.SetValue(y); - constr->top.SetDone(TRUE); - } - if (w != -1) - { - constr->width.SetValue(w); - constr->width.SetDone(TRUE); - } - if (h != -1) - { - constr->height.SetValue(h); - constr->height.SetDone(TRUE); - } - } -} - -void wxWindow::MoveConstraint(int x, int y) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - if (x != -1) - { - constr->left.SetValue(x); - constr->left.SetDone(TRUE); - } - if (y != -1) - { - constr->top.SetValue(y); - constr->top.SetDone(TRUE); - } - } -} - -void wxWindow::GetSizeConstraint(int *w, int *h) const -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - *w = constr->width.GetValue(); - *h = constr->height.GetValue(); - } - else - GetSize(w, h); -} - -void wxWindow::GetClientSizeConstraint(int *w, int *h) const -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - *w = constr->width.GetValue(); - *h = constr->height.GetValue(); - } - else - GetClientSize(w, h); -} - -void wxWindow::GetPositionConstraint(int *x, int *y) const -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - *x = constr->left.GetValue(); - *y = constr->top.GetValue(); - } - else - GetPosition(x, y); -} - -bool wxWindow::Close(bool force) -{ - wxCloseEvent event(wxEVT_CLOSE_WINDOW, m_windowId); - event.SetEventObject(this); - event.SetForce(force); - - return GetEventHandler()->ProcessEvent(event); -} - -wxObject* wxWindow::GetChild(int number) const -{ - // Return a pointer to the Nth object in the window - if (!GetChildren()) - return(NULL) ; - wxNode *node = GetChildren()->First(); - int n = number; - while (node && n--) - node = node->Next() ; - if (node) - { - wxObject *obj = (wxObject *)node->Data(); - return(obj) ; - } - else - return NULL ; -} - -void wxWindow::OnDefaultAction(wxControl *initiatingItem) -{ - // Obsolete function -} - -void wxWindow::Clear() -{ - wxClientDC dc(this); - wxBrush brush(GetBackgroundColour(), wxSOLID); - dc.SetBackground(brush); - dc.Clear(); -} - -// Fits the panel around the items -void wxWindow::Fit() -{ - int maxX = 0; - int maxY = 0; - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow *win = (wxWindow *)node->Data(); - int wx, wy, ww, wh; - win->GetPosition(&wx, &wy); - win->GetSize(&ww, &wh); - if ( wx + ww > maxX ) - maxX = wx + ww; - if ( wy + wh > maxY ) - maxY = wy + wh; - - node = node->Next(); - } - SetClientSize(maxX + 5, maxY + 5); -} - -void wxWindow::SetValidator(const wxValidator& validator) -{ - if ( m_windowValidator ) - delete m_windowValidator; - m_windowValidator = validator.Clone(); - - if ( m_windowValidator ) - m_windowValidator->SetWindow(this) ; -} - -// Find a window by id or name -wxWindow *wxWindow::FindWindow(long id) -{ - if ( GetId() == id) - return this; - - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow *child = (wxWindow *)node->Data(); - wxWindow *found = child->FindWindow(id); - if ( found ) - return found; - node = node->Next(); - } - return NULL; -} - -wxWindow *wxWindow::FindWindow(const wxString& name) -{ - if ( GetName() == name) - return this; - - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow *child = (wxWindow *)node->Data(); - wxWindow *found = child->FindWindow(name); - if ( found ) - return found; - node = node->Next(); - } - return NULL; -} - -void wxWindow::OnIdle(wxIdleEvent& event) -{ -/* TODO: you may need to do something like this - * if your GUI doesn't generate enter/leave events - - // Check if we need to send a LEAVE event - if (m_mouseInWindow) - { - POINT pt; - ::GetCursorPos(&pt); - if (::WindowFromPoint(pt) != (HWND) GetHWND()) - { - // Generate a LEAVE event - m_mouseInWindow = FALSE; - MSWOnMouseLeave(pt.x, pt.y, 0); - } - } -*/ - - // This calls the UI-update mechanism (querying windows for - // menu/toolbar/control state information) - UpdateWindowUI(); -} - -// Raise the window to the top of the Z order -void wxWindow::Raise() -{ - // TODO -} - -// Lower the window to the bottom of the Z order -void wxWindow::Lower() -{ - // TODO -} - -bool wxWindow::AcceptsFocus() const -{ - return IsShown() && IsEnabled(); -} - -// Update region access -wxRegion wxWindow::GetUpdateRegion() const -{ - return m_updateRegion; -} - -bool wxWindow::IsExposed(int x, int y, int w, int h) const -{ - return (m_updateRegion.Contains(x, y, w, h) != wxOutRegion); -} - -bool wxWindow::IsExposed(const wxPoint& pt) const -{ - return (m_updateRegion.Contains(pt) != wxOutRegion); -} - -bool wxWindow::IsExposed(const wxRect& rect) const -{ - return (m_updateRegion.Contains(rect) != wxOutRegion); -} - - diff --git a/src/stubs/accel.cpp b/src/stubs/accel.cpp deleted file mode 100644 index b0b8734d55..0000000000 --- a/src/stubs/accel.cpp +++ /dev/null @@ -1,93 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: accel.cpp -// Purpose: wxAcceleratorTable -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "accel.h" -#endif - -#include "wx/setup.h" -#include "wx/accel.h" -#include "wx/string.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject) -#endif - -class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData -{ - friend class WXDLLEXPORT wxAcceleratorTable; -public: - wxAcceleratorRefData(); - ~wxAcceleratorRefData(); - -/* TODO: implementation - inline HACCEL GetHACCEL() const { return m_hAccel; } -protected: - HACCEL m_hAccel; -*/ -}; - -#define M_ACCELDATA ((wxAcceleratorRefData *)m_refData) - -wxAcceleratorRefData::wxAcceleratorRefData() -{ - // TODO -/* - HACCEL m_hAccel; -*/ -} - -wxAcceleratorRefData::~wxAcceleratorRefData() -{ -/* - if (m_hAccel) - { - DestroyAcceleratorTable((HACCEL) m_hAccel); - } - m_hAccel = 0 ; -*/ -} - -wxAcceleratorTable::wxAcceleratorTable() -{ - m_refData = NULL; -} - -wxAcceleratorTable::~wxAcceleratorTable() -{ -} - -// Load from .rc resource -wxAcceleratorTable::wxAcceleratorTable(const wxString& resource) -{ - m_refData = new wxAcceleratorRefData; - -/* TODO: load acelerator from resource, if appropriate for your platform - M_ACCELDATA->m_hAccel = hAccel; - M_ACCELDATA->m_ok = (hAccel != 0); -*/ -} - -// Create from an array -wxAcceleratorTable::wxAcceleratorTable(int n, wxAcceleratorEntry entries[]) -{ - m_refData = new wxAcceleratorRefData; - -/* TODO: create table from entries - */ -} - -bool wxAcceleratorTable::Ok() const -{ - // TODO - return FALSE; -} - diff --git a/src/stubs/app.cpp b/src/stubs/app.cpp deleted file mode 100644 index d879be6712..0000000000 --- a/src/stubs/app.cpp +++ /dev/null @@ -1,397 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: app.cpp -// Purpose: wxApp -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "app.h" -#endif - -#include "wx/frame.h" -#include "wx/app.h" -#include "wx/utils.h" -#include "wx/gdicmn.h" -#include "wx/pen.h" -#include "wx/brush.h" -#include "wx/cursor.h" -#include "wx/icon.h" -#include "wx/palette.h" -#include "wx/dc.h" -#include "wx/dialog.h" -#include "wx/msgdlg.h" -#include "wx/log.h" -#include "wx/module.h" -#include "wx/memory.h" - -#if USE_WX_RESOURCES -#include "wx/resource.h" -#endif - -#if USE_POSTSCRIPT -#include "wx/postscrp.h" -#endif - -#include - -extern char *wxBuffer; -extern wxList wxPendingDelete; - -wxApp *wxTheApp = NULL; - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler) -BEGIN_EVENT_TABLE(wxApp, wxEvtHandler) - EVT_IDLE(wxApp::OnIdle) -END_EVENT_TABLE() -#endif - -long wxApp::sm_lastMessageTime = 0; - -void wxApp::CommonInit() -{ -#ifdef __WXMSW__ - wxBuffer = new char[1500]; -#else - wxBuffer = new char[BUFSIZ + 512]; -#endif - - wxClassInfo::InitializeClasses(); - - wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING); - wxTheColourDatabase->Initialize(); - wxInitializeStockObjects(); - -#if USE_WX_RESOURCES - wxInitializeResourceSystem(); -#endif - - // For PostScript printing -#if USE_POSTSCRIPT - wxInitializePrintSetupData(); - wxThePrintPaperDatabase = new wxPrintPaperDatabase; - wxThePrintPaperDatabase->CreateDatabase(); -#endif - - wxBitmap::InitStandardHandlers(); - - wxModule::RegisterModules(); - wxASSERT( wxModule::InitializeModules() == TRUE ); -} - -void wxApp::CommonCleanUp() -{ - wxModule::CleanUpModules(); - -#if USE_WX_RESOURCES - wxCleanUpResourceSystem(); -#endif - - wxDeleteStockObjects() ; - - // Destroy all GDI lists, etc. - delete wxTheBrushList; - wxTheBrushList = NULL; - - delete wxThePenList; - wxThePenList = NULL; - - delete wxTheFontList; - wxTheFontList = NULL; - - delete wxTheBitmapList; - wxTheBitmapList = NULL; - - delete wxTheColourDatabase; - wxTheColourDatabase = NULL; - -#if USE_POSTSCRIPT - wxInitializePrintSetupData(FALSE); - delete wxThePrintPaperDatabase; - wxThePrintPaperDatabase = NULL; -#endif - - wxBitmap::CleanUpHandlers(); - - delete[] wxBuffer; - wxBuffer = NULL; - - // do it as the very last thing because everything else can log messages - delete wxLog::SetActiveTarget(NULL); -} - -int wxEntry( int argc, char *argv[] ) -{ - wxClassInfo::InitializeClasses(); - -#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT - -#if !defined(_WINDLL) - streambuf* sBuf = new wxDebugStreamBuf; -#else - streambuf* sBuf = NULL; -#endif - ostream* oStr = new ostream(sBuf) ; - wxDebugContext::SetStream(oStr, sBuf); - -#endif - - if (!wxTheApp) - { - if (!wxApp::GetInitializerFunction()) - { - printf( "wxWindows error: No initializer - use IMPLEMENT_APP macro.\n" ); - return 0; - }; - - wxTheApp = (wxApp*) (* wxApp::GetInitializerFunction()) (); - }; - - if (!wxTheApp) - { - printf( "wxWindows error: wxTheApp == NULL\n" ); - return 0; - }; - - wxTheApp->argc = argc; - wxTheApp->argv = argv; - - // TODO: your platform-specific initialization. - - wxApp::CommonInit(); - - // GUI-specific initialization, such as creating an app context. - wxTheApp->OnInitGui(); - - // Here frames insert themselves automatically - // into wxTopLevelWindows by getting created - // in OnInit(). - - if (!wxTheApp->OnInit()) return 0; - - int retValue = 0; - - if (wxTheApp->Initialized()) retValue = wxTheApp->OnRun(); - - wxTheApp->DeletePendingObjects(); - - wxTheApp->OnExit(); - - wxApp::CommonCleanUp(); - -#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT - // At this point we want to check if there are any memory - // blocks that aren't part of the wxDebugContext itself, - // as a special case. Then when dumping we need to ignore - // wxDebugContext, too. - if (wxDebugContext::CountObjectsLeft() > 0) - { - wxTrace("There were memory leaks.\n"); - wxDebugContext::Dump(); - wxDebugContext::PrintStatistics(); - } - wxDebugContext::SetStream(NULL, NULL); -#endif - - return retValue; -}; - -// Static member initialization -wxAppInitializerFunction wxApp::m_appInitFn = (wxAppInitializerFunction) NULL; - -wxApp::wxApp() -{ - m_topWindow = NULL; - wxTheApp = this; - m_className = ""; - m_wantDebugOutput = TRUE ; - m_appName = ""; - argc = 0; - argv = NULL; -#ifdef __WXMSW__ - m_printMode = wxPRINT_WINDOWS; -#else - m_printMode = wxPRINT_POSTSCRIPT; -#endif - m_exitOnFrameDelete = TRUE; - m_auto3D = TRUE; -} - -bool wxApp::Initialized() -{ - if (GetTopWindow()) - return TRUE; - else - return FALSE; -} - -int wxApp::MainLoop() -{ - m_keepGoing = TRUE; - -/* TODO: implement your main loop here, calling ProcessIdle in idle time. - while (m_keepGoing) - { - while (!::PeekMessage(&s_currentMsg, 0, 0, 0, PM_NOREMOVE) && - ProcessIdle()) {} - if (!DoMessage()) - m_keepGoing = FALSE; - } -*/ - - return 0; -} - -// Returns TRUE if more time is needed. -bool wxApp::ProcessIdle() -{ - wxIdleEvent event; - event.SetEventObject(this); - ProcessEvent(event); - - return event.MoreRequested(); -} - -void wxApp::ExitMainLoop() -{ - m_keepGoing = FALSE; -} - -// Is a message/event pending? -bool wxApp::Pending() -{ -/* TODO. - */ - return FALSE; -} - -// Dispatch a message. -void wxApp::Dispatch() -{ -/* TODO. - */ -} - -void wxApp::OnIdle(wxIdleEvent& event) -{ - static bool inOnIdle = FALSE; - - // Avoid recursion (via ProcessEvent default case) - if (inOnIdle) - return; - - inOnIdle = TRUE; - - // 'Garbage' collection of windows deleted with Close(). - DeletePendingObjects(); - - // flush the logged messages if any - wxLog *pLog = wxLog::GetActiveTarget(); - if ( pLog != NULL && pLog->HasPendingMessages() ) - pLog->Flush(); - - // Send OnIdle events to all windows - bool needMore = SendIdleEvents(); - - if (needMore) - event.RequestMore(TRUE); - - inOnIdle = FALSE; -} - -// Send idle event to all top-level windows -bool wxApp::SendIdleEvents() -{ - bool needMore = FALSE; - wxNode* node = wxTopLevelWindows.First(); - while (node) - { - wxWindow* win = (wxWindow*) node->Data(); - if (SendIdleEvents(win)) - needMore = TRUE; - - node = node->Next(); - } - return needMore; -} - -// Send idle event to window and all subwindows -bool wxApp::SendIdleEvents(wxWindow* win) -{ - bool needMore = FALSE; - - wxIdleEvent event; - event.SetEventObject(win); - win->ProcessEvent(event); - - if (event.MoreRequested()) - needMore = TRUE; - - wxNode* node = win->GetChildren()->First(); - while (node) - { - wxWindow* win = (wxWindow*) node->Data(); - if (SendIdleEvents(win)) - needMore = TRUE; - - node = node->Next(); - } - return needMore ; -} - -void wxApp::DeletePendingObjects() -{ - wxNode *node = wxPendingDelete.First(); - while (node) - { - wxObject *obj = (wxObject *)node->Data(); - - delete obj; - - if (wxPendingDelete.Member(obj)) - delete node; - - // Deleting one object may have deleted other pending - // objects, so start from beginning of list again. - node = wxPendingDelete.First(); - } -} - -wxLog* wxApp::CreateLogTarget() -{ - return new wxLogGui; -} - -wxWindow* wxApp::GetTopWindow() const -{ - if (m_topWindow) - return m_topWindow; - else if (wxTopLevelWindows.Number() > 0) - return (wxWindow*) wxTopLevelWindows.First()->Data(); - else - return NULL; -} - -void wxExit() -{ - wxApp::CommonCleanUp(); -/* - * TODO: Exit in some platform-specific way. Not recommended that the app calls this: - * only for emergencies. - */ -} - -// Yield to other processes -bool wxYield() -{ - /* - * TODO - */ - return TRUE; -} - diff --git a/src/stubs/bitmap.cpp b/src/stubs/bitmap.cpp deleted file mode 100644 index 1e6255f551..0000000000 --- a/src/stubs/bitmap.cpp +++ /dev/null @@ -1,430 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bitmap.cpp -// Purpose: wxBitmap -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "bitmap.h" -#endif - -#include "wx/setup.h" -#include "wx/utils.h" -#include "wx/palette.h" -#include "wx/bitmap.h" -#include "wx/icon.h" -#include "wx/log.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject) -IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject) -#endif - -wxBitmapRefData::wxBitmapRefData() -{ - m_ok = FALSE; - m_width = 0; - m_height = 0; - m_depth = 0; - m_quality = 0; - m_numColors = 0; - m_bitmapMask = NULL; -} - -wxBitmapRefData::~wxBitmapRefData() -{ - /* - * TODO: delete the bitmap data here. - */ - - if (m_bitmapMask) - delete m_bitmapMask; - m_bitmapMask = NULL; -} - -wxList wxBitmap::sm_handlers; - -wxBitmap::wxBitmap() -{ - m_refData = NULL; - - if ( wxTheBitmapList ) - wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::~wxBitmap() -{ - if (wxTheBitmapList) - wxTheBitmapList->DeleteObject(this); -} - -wxBitmap::wxBitmap(const char bits[], int the_width, int the_height, int no_bits) -{ - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_width = the_width ; - M_BITMAPDATA->m_height = the_height ; - M_BITMAPDATA->m_depth = no_bits ; - M_BITMAPDATA->m_numColors = 0; - - /* TODO: create the bitmap from data */ - - if ( wxTheBitmapList ) - wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::wxBitmap(int w, int h, int d) -{ - (void)Create(w, h, d); - - if ( wxTheBitmapList ) - wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::wxBitmap(void *data, long type, int width, int height, int depth) -{ - (void) Create(data, type, width, height, depth); - - if ( wxTheBitmapList ) - wxTheBitmapList->AddBitmap(this); -} - -wxBitmap::wxBitmap(const wxString& filename, long type) -{ - LoadFile(filename, (int)type); - - if ( wxTheBitmapList ) - wxTheBitmapList->AddBitmap(this); -} - -/* TODO: maybe allow creation from XPM -// Create from data -wxBitmap::wxBitmap(const char **data) -{ - (void) Create((void *)data, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0); -} -*/ - -bool wxBitmap::Create(int w, int h, int d) -{ - UnRef(); - - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_width = w; - M_BITMAPDATA->m_height = h; - M_BITMAPDATA->m_depth = d; - - /* TODO: create new bitmap */ - - return M_BITMAPDATA->m_ok; -} - -bool wxBitmap::LoadFile(const wxString& filename, long type) -{ - UnRef(); - - m_refData = new wxBitmapRefData; - - wxBitmapHandler *handler = FindHandler(type); - - if ( handler == NULL ) { - wxLogWarning("no bitmap handler for type %d defined.", type); - - return FALSE; - } - - return handler->LoadFile(this, filename, type, -1, -1); -} - -bool wxBitmap::Create(void *data, long type, int width, int height, int depth) -{ - UnRef(); - - m_refData = new wxBitmapRefData; - - wxBitmapHandler *handler = FindHandler(type); - - if ( handler == NULL ) { - wxLogWarning("no bitmap handler for type %d defined.", type); - - return FALSE; - } - - return handler->Create(this, data, type, width, height, depth); -} - -bool wxBitmap::SaveFile(const wxString& filename, int type, const wxPalette *palette) -{ - wxBitmapHandler *handler = FindHandler(type); - - if ( handler == NULL ) { - wxLogWarning("no bitmap handler for type %d defined.", type); - - return FALSE; - } - - return handler->SaveFile(this, filename, type, palette); -} - -void wxBitmap::SetWidth(int w) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_width = w; -} - -void wxBitmap::SetHeight(int h) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_height = h; -} - -void wxBitmap::SetDepth(int d) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_depth = d; -} - -void wxBitmap::SetQuality(int q) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_quality = q; -} - -void wxBitmap::SetOk(bool isOk) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_ok = isOk; -} - -void wxBitmap::SetPalette(const wxPalette& palette) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_bitmapPalette = palette ; -} - -void wxBitmap::SetMask(wxMask *mask) -{ - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - - M_BITMAPDATA->m_bitmapMask = mask ; -} - -void wxBitmap::AddHandler(wxBitmapHandler *handler) -{ - sm_handlers.Append(handler); -} - -void wxBitmap::InsertHandler(wxBitmapHandler *handler) -{ - sm_handlers.Insert(handler); -} - -bool wxBitmap::RemoveHandler(const wxString& name) -{ - wxBitmapHandler *handler = FindHandler(name); - if ( handler ) - { - sm_handlers.DeleteObject(handler); - return TRUE; - } - else - return FALSE; -} - -wxBitmapHandler *wxBitmap::FindHandler(const wxString& name) -{ - wxNode *node = sm_handlers.First(); - while ( node ) - { - wxBitmapHandler *handler = (wxBitmapHandler *)node->Data(); - if ( handler->GetName() == name ) - return handler; - node = node->Next(); - } - return NULL; -} - -wxBitmapHandler *wxBitmap::FindHandler(const wxString& extension, long bitmapType) -{ - wxNode *node = sm_handlers.First(); - while ( node ) - { - wxBitmapHandler *handler = (wxBitmapHandler *)node->Data(); - if ( handler->GetExtension() == extension && - (bitmapType == -1 || handler->GetType() == bitmapType) ) - return handler; - node = node->Next(); - } - return NULL; -} - -wxBitmapHandler *wxBitmap::FindHandler(long bitmapType) -{ - wxNode *node = sm_handlers.First(); - while ( node ) - { - wxBitmapHandler *handler = (wxBitmapHandler *)node->Data(); - if (handler->GetType() == bitmapType) - return handler; - node = node->Next(); - } - return NULL; -} - -/* - * wxMask - */ - -wxMask::wxMask() -{ -/* TODO - m_maskBitmap = 0; -*/ -} - -// Construct a mask from a bitmap and a colour indicating -// the transparent area -wxMask::wxMask(const wxBitmap& bitmap, const wxColour& colour) -{ -/* TODO - m_maskBitmap = 0; -*/ - Create(bitmap, colour); -} - -// Construct a mask from a bitmap and a palette index indicating -// the transparent area -wxMask::wxMask(const wxBitmap& bitmap, int paletteIndex) -{ -/* TODO - m_maskBitmap = 0; -*/ - - Create(bitmap, paletteIndex); -} - -// Construct a mask from a mono bitmap (copies the bitmap). -wxMask::wxMask(const wxBitmap& bitmap) -{ -/* TODO - m_maskBitmap = 0; -*/ - - Create(bitmap); -} - -wxMask::~wxMask() -{ -// TODO: delete mask bitmap -} - -// Create a mask from a mono bitmap (copies the bitmap). -bool wxMask::Create(const wxBitmap& bitmap) -{ -// TODO - return FALSE; -} - -// Create a mask from a bitmap and a palette index indicating -// the transparent area -bool wxMask::Create(const wxBitmap& bitmap, int paletteIndex) -{ -// TODO - return FALSE; -} - -// Create a mask from a bitmap and a colour indicating -// the transparent area -bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) -{ -// TODO - return FALSE; -} - -/* - * wxBitmapHandler - */ - -IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject) - -bool wxBitmapHandler::Create(wxBitmap *bitmap, void *data, long type, int width, int height, int depth) -{ - return FALSE; -} - -bool wxBitmapHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long type, - int desiredWidth, int desiredHeight) -{ - return FALSE; -} - -bool wxBitmapHandler::SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette) -{ - return FALSE; -} - -/* - * Standard handlers - */ - -/* TODO: bitmap handlers, a bit like this: -class WXDLLEXPORT wxBMPResourceHandler: public wxBitmapHandler -{ - DECLARE_DYNAMIC_CLASS(wxBMPResourceHandler) -public: - inline wxBMPResourceHandler() - { - m_name = "Windows bitmap resource"; - m_extension = ""; - m_type = wxBITMAP_TYPE_BMP_RESOURCE; - }; - - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth, int desiredHeight); -}; -IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler, wxBitmapHandler) -*/ - -void wxBitmap::CleanUpHandlers() -{ - wxNode *node = sm_handlers.First(); - while ( node ) - { - wxBitmapHandler *handler = (wxBitmapHandler *)node->Data(); - wxNode *next = node->Next(); - delete handler; - delete node; - node = next; - } -} - -void wxBitmap::InitStandardHandlers() -{ -/* TODO: initialize all standard bitmap or derive class handlers here. - AddHandler(new wxBMPResourceHandler); - AddHandler(new wxBMPFileHandler); - AddHandler(new wxXPMFileHandler); - AddHandler(new wxXPMDataHandler); - AddHandler(new wxICOResourceHandler); - AddHandler(new wxICOFileHandler); -*/ -} diff --git a/src/stubs/bmpbuttn.cpp b/src/stubs/bmpbuttn.cpp deleted file mode 100644 index 9e46c22b2b..0000000000 --- a/src/stubs/bmpbuttn.cpp +++ /dev/null @@ -1,65 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bmpbuttn.cpp -// Purpose: wxBitmapButton -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "bmpbuttn.h" -#endif - -#include "wx/bmpbuttn.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton) -#endif - -bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - m_buttonBitmap = bitmap; - SetName(name); - SetValidator(validator); - parent->AddChild(this); - - m_backgroundColour = parent->GetDefaultBackgroundColour() ; - m_foregroundColour = parent->GetDefaultForegroundColour() ; - m_windowStyle = style; - m_marginX = 0; - m_marginY = 0; - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - - if (id == -1) - m_windowId = NewControlId(); - else - m_windowId = id; - - if ( width == -1 && bitmap.Ok()) - width = bitmap.GetWidth() + 2*m_marginX; - - if ( height == -1 && bitmap.Ok()) - height = bitmap.GetHeight() + 2*m_marginY; - - /* TODO: create bitmap button - */ - - return FALSE; -} - -void wxBitmapButton::SetBitmapLabel(const wxBitmap& bitmap) -{ - m_buttonBitmap = bitmap; -} - diff --git a/src/stubs/brush.cpp b/src/stubs/brush.cpp deleted file mode 100644 index 72c12935ff..0000000000 --- a/src/stubs/brush.cpp +++ /dev/null @@ -1,162 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: brush.cpp -// Purpose: wxBrush -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "brush.h" -#endif - -#include "wx/setup.h" -#include "wx/utils.h" -#include "wx/brush.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject) -#endif - -wxBrushRefData::wxBrushRefData() -{ - m_style = wxSOLID; -// TODO: null data -} - -wxBrushRefData::wxBrushRefData(const wxBrushRefData& data) -{ - m_style = data.m_style; - m_stipple = data.m_stipple; - m_colour = data.m_colour; -/* TODO: null data - m_hBrush = 0; -*/ -} - -wxBrushRefData::~wxBrushRefData() -{ -// TODO: delete data -} - -// Brushes -wxBrush::wxBrush() -{ - if ( wxTheBrushList ) - wxTheBrushList->AddBrush(this); -} - -wxBrush::~wxBrush() -{ - if ( wxTheBrushList ) - wxTheBrushList->RemoveBrush(this); -} - -wxBrush::wxBrush(const wxColour& col, int Style) -{ - m_refData = new wxBrushRefData; - - M_BRUSHDATA->m_colour = col; - M_BRUSHDATA->m_style = Style; - - RealizeResource(); - - if ( wxTheBrushList ) - wxTheBrushList->AddBrush(this); -} - -wxBrush::wxBrush(const wxString& col, int Style) -{ - m_refData = new wxBrushRefData; - - // Implicit conversion from string to wxColour via colour database - M_BRUSHDATA->m_colour = col; - M_BRUSHDATA->m_style = Style; - - RealizeResource(); - - if ( wxTheBrushList ) - wxTheBrushList->AddBrush(this); -} - -wxBrush::wxBrush(const wxBitmap& stipple) -{ - m_refData = new wxBrushRefData; - - M_BRUSHDATA->m_style = wxSTIPPLE; - M_BRUSHDATA->m_stipple = stipple; - - RealizeResource(); - - if ( wxTheBrushList ) - wxTheBrushList->AddBrush(this); -} - -void wxBrush::Unshare() -{ - // Don't change shared data - if (!m_refData) - { - m_refData = new wxBrushRefData(); - } - else - { - wxBrushRefData* ref = new wxBrushRefData(*(wxBrushRefData*)m_refData); - UnRef(); - m_refData = ref; - } -} - -void wxBrush::SetColour(const wxColour& col) -{ - Unshare(); - - M_BRUSHDATA->m_colour = col; - - RealizeResource(); -} - -void wxBrush::SetColour(const wxString& col) -{ - Unshare(); - - M_BRUSHDATA->m_colour = col; - - RealizeResource(); -} - -void wxBrush::SetColour(const unsigned char r, const unsigned char g, const unsigned char b) -{ - Unshare(); - - M_BRUSHDATA->m_colour.Set(r, g, b); - - RealizeResource(); -} - -void wxBrush::SetStyle(int Style) -{ - Unshare(); - - M_BRUSHDATA->m_style = Style; - - RealizeResource(); -} - -void wxBrush::SetStipple(const wxBitmap& Stipple) -{ - Unshare(); - - M_BRUSHDATA->m_stipple = Stipple; - - RealizeResource(); -} - -void wxBrush::RealizeResource() -{ -// TODO: create the brush -} - diff --git a/src/stubs/button.cpp b/src/stubs/button.cpp deleted file mode 100644 index befd0d7156..0000000000 --- a/src/stubs/button.cpp +++ /dev/null @@ -1,75 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: button.cpp -// Purpose: wxButton -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "button.h" -#endif - -#include "wx/button.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) -#endif - -// Button - -bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - m_windowStyle = style; - - parent->AddChild((wxButton *)this); - - if (id == -1) - m_windowId = NewControlId(); - else - m_windowId = id; - - // TODO: create button - - return FALSE; -} - -void wxButton::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -void wxButton::SetDefault() -{ - wxWindow *parent = (wxWindow *)GetParent(); - if (parent) - parent->SetDefaultItem(this); - - // TODO: make button the default -} - -wxString wxButton::GetLabel() const -{ - // TODO - return wxString(""); -} - -void wxButton::SetLabel(const wxString& label) -{ - // TODO -} - -void wxButton::Command (wxCommandEvent & event) -{ - ProcessCommand (event); -} - diff --git a/src/stubs/checkbox.cpp b/src/stubs/checkbox.cpp deleted file mode 100644 index dd2e2abe7a..0000000000 --- a/src/stubs/checkbox.cpp +++ /dev/null @@ -1,117 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: checkbox.cpp -// Purpose: wxCheckBox -// Author: AUTHOR -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "checkbox.h" -#endif - -#include "wx/checkbox.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox) -#endif - -// Single check box item -bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - m_windowStyle = style; - - if (parent) parent->AddChild(this); - - if ( id == -1 ) - m_windowId = NewControlId(); - else - m_windowId = id; - - // TODO: create checkbox - - return FALSE; -} - -void wxCheckBox::SetLabel(const wxString& label) -{ - // TODO -} - -void wxCheckBox::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -void wxCheckBox::SetValue(bool val) -{ - // TODO -} - -bool wxCheckBox::GetValue() const -{ - // TODO - return FALSE; -} - -void wxCheckBox::Command (wxCommandEvent & event) -{ - SetValue ((event.GetInt() != 0)); - ProcessCommand (event); -} - -// Bitmap checkbox -bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *label, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - m_windowStyle = style; - - if (parent) parent->AddChild(this); - - if ( id == -1 ) - m_windowId = NewControlId(); - else - m_windowId = id; - - // TODO: Create the bitmap checkbox - - return FALSE; -} - -void wxBitmapCheckBox::SetLabel(const wxBitmap *bitmap) -{ - // TODO -} - -void wxBitmapCheckBox::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -void wxBitmapCheckBox::SetValue(bool val) -{ - // TODO -} - -bool wxBitmapCheckBox::GetValue() const -{ - // TODOD - return FALSE; -} - - diff --git a/src/stubs/checklst.cpp b/src/stubs/checklst.cpp deleted file mode 100644 index ecabf5408e..0000000000 --- a/src/stubs/checklst.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: checklst.cpp -// Purpose: implementation of wxCheckListBox class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// headers & declarations -// ============================================================================ - -#ifdef __GNUG__ -#pragma implementation "checklst.h" -#endif - -#include "wx/checklst.h" - -// ============================================================================ -// implementation -// ============================================================================ - -#if !USE_SHARED_LIBRARY - IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox, wxListBox) -#endif - -// ---------------------------------------------------------------------------- -// implementation of wxCheckListBox class -// ---------------------------------------------------------------------------- - -// define event table -// ------------------ -BEGIN_EVENT_TABLE(wxCheckListBox, wxListBox) -END_EVENT_TABLE() - -// control creation -// ---------------- - -// def ctor: use Create() to really create the control -wxCheckListBox::wxCheckListBox() : wxListBox() -{ -} - -// ctor which creates the associated control -wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - int nStrings, const wxString choices[], - long style, const wxValidator& val, - const wxString& name) - : wxListBox() -{ - // TODO: you'll probably need a separate Create instead of using - // the wxListBox one as here. - Create(parent, id, pos, size, nStrings, choices, style|wxLB_OWNERDRAW, val, name); -} - -// check items -// ----------- - -bool wxCheckListBox::IsChecked(uint uiIndex) const -{ - // TODO - return FALSE; -} - -void wxCheckListBox::Check(uint uiIndex, bool bCheck) -{ - // TODO -} - - diff --git a/src/stubs/choice.cpp b/src/stubs/choice.cpp deleted file mode 100644 index a584d5303f..0000000000 --- a/src/stubs/choice.cpp +++ /dev/null @@ -1,119 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: choice.cpp -// Purpose: wxChoice -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "choice.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/choice.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl) -#endif - -bool wxChoice::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, - const wxSize& size, - int n, const wxString choices[], - long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - m_noStrings = n; - m_windowStyle = style; - - if (parent) parent->AddChild(this); - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - // TODO: create choice control - return FALSE; -} - -void wxChoice::Append(const wxString& item) -{ - // TODO - m_noStrings ++; -} - -void wxChoice::Delete(int n) -{ - // TODO - m_noStrings --; -} - -void wxChoice::Clear() -{ - // TODO - m_noStrings = 0; -} - -int wxChoice::GetSelection() const -{ - // TODO - return 0; -} - -void wxChoice::SetSelection(int n) -{ - // TODO -} - -int wxChoice::FindString(const wxString& s) const -{ - // TODO - return 0; -} - -wxString wxChoice::GetString(int n) const -{ - // TODO - return wxString(""); -} - -void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -wxString wxChoice::GetStringSelection () const -{ - int sel = GetSelection (); - if (sel > -1) - return wxString(this->GetString (sel)); - else - return wxString(""); -} - -bool wxChoice::SetStringSelection (const wxString& s) -{ - int sel = FindString (s); - if (sel > -1) - { - SetSelection (sel); - return TRUE; - } - else - return FALSE; -} - -void wxChoice::Command(wxCommandEvent & event) -{ - SetSelection (event.GetInt()); - ProcessCommand (event); -} - diff --git a/src/stubs/clipbrd.cpp b/src/stubs/clipbrd.cpp deleted file mode 100644 index 3fe9ebfb72..0000000000 --- a/src/stubs/clipbrd.cpp +++ /dev/null @@ -1,237 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: clipbrd.cpp -// Purpose: Clipboard functionality -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#pragma implementation "clipbrd.h" -#endif - -#include "wx/app.h" -#include "wx/frame.h" -#include "wx/bitmap.h" -#include "wx/utils.h" -#include "wx/metafile.h" -#include "wx/clipbrd.h" - -#include - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject) -IMPLEMENT_ABSTRACT_CLASS(wxClipboardClient, wxObject) -#endif - -bool wxOpenClipboard() -{ - // TODO - return FALSE; -} - -bool wxCloseClipboard() -{ - // TODO - return FALSE; -} - -bool wxEmptyClipboard() -{ - // TODO - return FALSE; -} - -bool wxClipboardOpen() -{ - // TODO - return FALSE; -} - -bool wxIsClipboardFormatAvailable(int dataFormat) -{ - // TODO - return FALSE; -} - -bool wxSetClipboardData(int dataFormat, wxObject *obj, int width, int height) -{ - // TODO - return FALSE; -} - -wxObject *wxGetClipboardData(int dataFormat, long *len) -{ - // TODO - return NULL; -} - -int wxEnumClipboardFormats(int dataFormat) -{ - // TODO - return 0; -} - -int wxRegisterClipboardFormat(char *formatName) -{ - // TODO - return 0; -} - -bool wxGetClipboardFormatName(int dataFormat, char *formatName, int maxCount) -{ - // TODO - return FALSE; -} - -/* - * Generalized clipboard implementation by Matthew Flatt - */ - -wxClipboard *wxTheClipboard = NULL; - -void wxInitClipboard() -{ - if (!wxTheClipboard) - wxTheClipboard = new wxClipboard; -} - -wxClipboard::wxClipboard() -{ - clipOwner = NULL; - cbString = NULL; -} - -wxClipboard::~wxClipboard() -{ - if (clipOwner) - clipOwner->BeingReplaced(); - if (cbString) - delete[] cbString; -} - -static int FormatStringToID(char *str) -{ - if (!strcmp(str, "TEXT")) - return wxDF_TEXT; - - return wxRegisterClipboardFormat(str); -} - -void wxClipboard::SetClipboardClient(wxClipboardClient *client, long time) -{ - bool got_selection; - - if (clipOwner) - clipOwner->BeingReplaced(); - clipOwner = client; - if (cbString) { - delete[] cbString; - cbString = NULL; - } - - if (wxOpenClipboard()) { - char **formats, *data; - int i; - int ftype; - long size; - - formats = clipOwner->formats.ListToArray(FALSE); - for (i = clipOwner->formats.Number(); i--; ) { - ftype = FormatStringToID(formats[i]); - data = clipOwner->GetData(formats[i], &size); - if (!wxSetClipboardData(ftype, (wxObject *)data, size, 1)) { - got_selection = FALSE; - break; - } - } - - if (i < 0) - got_selection = wxCloseClipboard(); - } else - got_selection = FALSE; - - got_selection = FALSE; // Assume another process takes over - - if (!got_selection) { - clipOwner->BeingReplaced(); - clipOwner = NULL; - } -} - -wxClipboardClient *wxClipboard::GetClipboardClient() -{ - return clipOwner; -} - -void wxClipboard::SetClipboardString(char *str, long time) -{ - bool got_selection; - - if (clipOwner) { - clipOwner->BeingReplaced(); - clipOwner = NULL; - } - if (cbString) - delete[] cbString; - - cbString = str; - - if (wxOpenClipboard()) { - if (!wxSetClipboardData(wxDF_TEXT, (wxObject *)str)) - got_selection = FALSE; - else - got_selection = wxCloseClipboard(); - } else - got_selection = FALSE; - - got_selection = FALSE; // Assume another process takes over - - if (!got_selection) { - delete[] cbString; - cbString = NULL; - } -} - -char *wxClipboard::GetClipboardString(long time) -{ - char *str; - long length; - - str = GetClipboardData("TEXT", &length, time); - if (!str) { - str = new char[1]; - *str = 0; - } - - return str; -} - -char *wxClipboard::GetClipboardData(char *format, long *length, long time) -{ - if (clipOwner) { - if (clipOwner->formats.Member(format)) - return clipOwner->GetData(format, length); - else - return NULL; - } else if (cbString) { - if (!strcmp(format, "TEXT")) - return copystring(cbString); - else - return NULL; - } else { - if (wxOpenClipboard()) { - receivedString = (char *)wxGetClipboardData(FormatStringToID(format), - length); - wxCloseClipboard(); - } else - receivedString = NULL; - - return receivedString; - } -} - diff --git a/src/stubs/colordlg.cpp b/src/stubs/colordlg.cpp deleted file mode 100644 index 2275a9a39d..0000000000 --- a/src/stubs/colordlg.cpp +++ /dev/null @@ -1,53 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: colordlg.cpp -// Purpose: wxColourDialog class. NOTE: you can use the generic class -// if you wish, instead of implementing this. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "colordlg.h" -#endif - -#include "wx/stubs/colordlg.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog) -#endif - -/* - * wxColourDialog - */ - -wxColourDialog::wxColourDialog() -{ - m_dialogParent = NULL; -} - -wxColourDialog::wxColourDialog(wxWindow *parent, wxColourData *data) -{ - Create(parent, data); -} - -bool wxColourDialog::Create(wxWindow *parent, wxColourData *data) -{ - m_dialogParent = parent; - - if (data) - m_colourData = *data; - return TRUE; -} - -int wxColourDialog::ShowModal() -{ - /* TODO: implement dialog - */ - - return wxID_CANCEL; -} - diff --git a/src/stubs/colour.cpp b/src/stubs/colour.cpp deleted file mode 100644 index d342d516de..0000000000 --- a/src/stubs/colour.cpp +++ /dev/null @@ -1,126 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: colour.cpp -// Purpose: wxColour class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "colour.h" -#endif - -#include "wx/gdicmn.h" -#include "wx/colour.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject) -#endif - -// Colour - -wxColour::wxColour () -{ - m_isInit = FALSE; - m_red = m_blue = m_green = 0; -/* TODO - m_pixel = 0; -*/ -} - -wxColour::wxColour (unsigned char r, unsigned char g, unsigned char b) -{ - m_red = r; - m_green = g; - m_blue = b; - m_isInit = TRUE; -/* TODO - m_pixel = PALETTERGB (m_red, m_green, m_blue); -*/ -} - -wxColour::wxColour (const wxColour& col) -{ - m_red = col.m_red; - m_green = col.m_green; - m_blue = col.m_blue; - m_isInit = col.m_isInit; -/* TODO - m_pixel = col.m_pixel; -*/ -} - -wxColour& wxColour::operator =(const wxColour& col) -{ - m_red = col.m_red; - m_green = col.m_green; - m_blue = col.m_blue; - m_isInit = col.m_isInit; -/* TODO - m_pixel = col.m_pixel; -*/ - return *this; -} - -wxColour::wxColour (const wxString& col) -{ - wxColour *the_colour = wxTheColourDatabase->FindColour (col); - if (the_colour) - { - m_red = the_colour->Red (); - m_green = the_colour->Green (); - m_blue = the_colour->Blue (); - m_isInit = TRUE; - } - else - { - m_red = 0; - m_green = 0; - m_blue = 0; - m_isInit = FALSE; - } -/* TODO - m_pixel = PALETTERGB (m_red, m_green, m_blue); -*/ -} - -wxColour::~wxColour () -{ -} - -wxColour& wxColour::operator = (const wxString& col) -{ - wxColour *the_colour = wxTheColourDatabase->FindColour (col); - if (the_colour) - { - m_red = the_colour->Red (); - m_green = the_colour->Green (); - m_blue = the_colour->Blue (); - m_isInit = TRUE; - } - else - { - m_red = 0; - m_green = 0; - m_blue = 0; - m_isInit = FALSE; - } -/* TODO - m_pixel = PALETTERGB (m_red, m_green, m_blue); -*/ - return (*this); -} - -void wxColour::Set (unsigned char r, unsigned char g, unsigned char b) -{ - m_red = r; - m_green = g; - m_blue = b; - m_isInit = TRUE; -/* TODO - m_pixel = PALETTERGB (m_red, m_green, m_blue); -*/ -} diff --git a/src/stubs/combobox.cpp b/src/stubs/combobox.cpp deleted file mode 100644 index f1bbccaeb0..0000000000 --- a/src/stubs/combobox.cpp +++ /dev/null @@ -1,116 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: combobox.cpp -// Purpose: wxComboBox class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "combobox.h" -#endif - -#include "wx/combobox.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl) -#endif - -bool wxComboBox::Create(wxWindow *parent, wxWindowID id, - const wxString& value, - const wxPoint& pos, - const wxSize& size, - int n, const wxString choices[], - long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - m_noStrings = n; - m_windowStyle = style; - - if (parent) parent->AddChild(this); - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - // TODO: create combobox control - - return TRUE; -} - -wxString wxComboBox::GetValue() const -{ - // TODO - return wxString(""); -} - -void wxComboBox::SetValue(const wxString& value) -{ - // TODO -} - -// Clipboard operations -void wxComboBox::Copy() -{ - // TODO -} - -void wxComboBox::Cut() -{ - // TODO -} - -void wxComboBox::Paste() -{ - // TODO -} - -void wxComboBox::SetEditable(bool editable) -{ - // TODO -} - -void wxComboBox::SetInsertionPoint(long pos) -{ - // TODO -} - -void wxComboBox::SetInsertionPointEnd() -{ - // TODO -} - -long wxComboBox::GetInsertionPoint() const -{ - // TODO - return 0; -} - -long wxComboBox::GetLastPosition() const -{ - // TODO - return 0; -} - -void wxComboBox::Replace(long from, long to, const wxString& value) -{ - // TODO -} - -void wxComboBox::Remove(long from, long to) -{ - // TODO -} - -void wxComboBox::SetSelection(long from, long to) -{ - // TODO -} - diff --git a/src/stubs/control.cpp b/src/stubs/control.cpp deleted file mode 100644 index b141a80ff1..0000000000 --- a/src/stubs/control.cpp +++ /dev/null @@ -1,95 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: control.cpp -// Purpose: wxControl class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "control.h" -#endif - -#include "wx/control.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow) - -BEGIN_EVENT_TABLE(wxControl, wxWindow) -END_EVENT_TABLE() -#endif - -// Item members -wxControl::wxControl() -{ - m_backgroundColour = *wxWHITE; - m_foregroundColour = *wxBLACK; - m_callback = 0; -} - -wxControl::~wxControl() -{ - // If we delete an item, we should initialize the parent panel, - // because it could now be invalid. - wxWindow *parent = (wxWindow *)GetParent(); - if (parent) - { - if (parent->GetDefaultItem() == (wxButton*) this) - parent->SetDefaultItem(NULL); - } -} - -void wxControl::SetLabel(const wxString& label) -{ - // TODO -} - -wxString wxControl::GetLabel() const -{ - // TODO - return wxString(""); -} - -void wxControl::ProcessCommand (wxCommandEvent & event) -{ - // Tries: - // 1) A callback function (to become obsolete) - // 2) OnCommand, starting at this window and working up parent hierarchy - // 3) OnCommand then calls ProcessEvent to search the event tables. - if (m_callback) - { - (void) (*(m_callback)) (*this, event); - } - else - { - GetEventHandler()->OnCommand(*this, event); - } -} - -void wxControl::Centre (int direction) -{ - int x, y, width, height, panel_width, panel_height, new_x, new_y; - - wxWindow *parent = (wxWindow *) GetParent (); - if (!parent) - return; - - parent->GetClientSize (&panel_width, &panel_height); - GetSize (&width, &height); - GetPosition (&x, &y); - - new_x = x; - new_y = y; - - if (direction & wxHORIZONTAL) - new_x = (int) ((panel_width - width) / 2); - - if (direction & wxVERTICAL) - new_y = (int) ((panel_height - height) / 2); - - SetSize (new_x, new_y, width, height); -} - diff --git a/src/stubs/cursor.cpp b/src/stubs/cursor.cpp deleted file mode 100644 index f5cc609f7e..0000000000 --- a/src/stubs/cursor.cpp +++ /dev/null @@ -1,187 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: cursor.cpp -// Purpose: wxCursor class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "cursor.h" -#endif - -#include "wx/cursor.h" -#include "wx/icon.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxBitmap) -#endif - -wxCursorRefData::wxCursorRefData() -{ - m_width = 32; m_height = 32; - -/* TODO - m_hCursor = 0 ; -*/ -} - -wxCursorRefData::~wxCursorRefData() -{ - // TODO: destroy cursor -} - -// Cursors -wxCursor::wxCursor() -{ -} - -wxCursor::wxCursor(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSED(height), - int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY), const char WXUNUSED(maskBits)[]) -{ -} - -wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int hotSpotY) -{ - m_refData = new wxIconRefData; - - // TODO: create cursor from a file -} - -// Cursors by stock number -wxCursor::wxCursor(int cursor_type) -{ - m_refData = new wxIconRefData; - -/* TODO - switch (cursor_type) - { - case wxCURSOR_WAIT: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_WAIT); - break; - case wxCURSOR_IBEAM: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_IBEAM); - break; - case wxCURSOR_CROSS: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_CROSS); - break; - case wxCURSOR_SIZENWSE: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_SIZENWSE); - break; - case wxCURSOR_SIZENESW: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_SIZENESW); - break; - case wxCURSOR_SIZEWE: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_SIZEWE); - break; - case wxCURSOR_SIZENS: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_SIZENS); - break; - case wxCURSOR_CHAR: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_ARROW); - break; - } - case wxCURSOR_HAND: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_HAND"); - break; - } - case wxCURSOR_BULLSEYE: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_BULLSEYE"); - break; - } - case wxCURSOR_PENCIL: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_PENCIL"); - break; - } - case wxCURSOR_MAGNIFIER: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_MAGNIFIER"); - break; - } - case wxCURSOR_NO_ENTRY: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_NO_ENTRY"); - break; - } - case wxCURSOR_LEFT_BUTTON: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_ARROW); - break; - } - case wxCURSOR_RIGHT_BUTTON: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_ARROW); - break; - } - case wxCURSOR_MIDDLE_BUTTON: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_ARROW); - break; - } - case wxCURSOR_SIZING: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_SIZING"); - break; - } - case wxCURSOR_WATCH: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_WATCH"); - break; - } - case wxCURSOR_SPRAYCAN: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_ROLLER"); - break; - } - case wxCURSOR_PAINT_BRUSH: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_PBRUSH"); - break; - } - case wxCURSOR_POINT_LEFT: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_PLEFT"); - break; - } - case wxCURSOR_POINT_RIGHT: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_PRIGHT"); - break; - } - case wxCURSOR_QUESTION_ARROW: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_QARROW"); - break; - } - case wxCURSOR_BLANK: - { - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), "wxCURSOR_BLANK"); - break; - } - default: - case wxCURSOR_ARROW: - M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(NULL, IDC_ARROW); - break; - } -*/ - -} - -wxCursor::~wxCursor() -{ -} - -// Global cursor setting -void wxSetCursor(const wxCursor& cursor) -{ - // TODO (optional on platforms with no global cursor) -} - - diff --git a/src/stubs/data.cpp b/src/stubs/data.cpp deleted file mode 100644 index ae2895408b..0000000000 --- a/src/stubs/data.cpp +++ /dev/null @@ -1,147 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: data.cpp -// Purpose: Various data -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#endif - -#include "wx/wx.h" - -#define _MAXPATHLEN 500 - -// Useful buffer, initialized in CommonInit -char *wxBuffer = NULL; - -// Windows List -wxList wxTopLevelWindows; - -// List of windows pending deletion -wxList wxPendingDelete; - -int wxPageNumber; - -// GDI Object Lists -wxBrushList *wxTheBrushList = NULL; -wxPenList *wxThePenList = NULL; -wxFontList *wxTheFontList = NULL; -wxBitmapList *wxTheBitmapList = NULL; - -wxColourDatabase *wxTheColourDatabase = NULL; - -// Stock objects -wxFont *wxNORMAL_FONT; -wxFont *wxSMALL_FONT; -wxFont *wxITALIC_FONT; -wxFont *wxSWISS_FONT; -wxPen *wxRED_PEN; - -wxPen *wxCYAN_PEN; -wxPen *wxGREEN_PEN; -wxPen *wxBLACK_PEN; -wxPen *wxWHITE_PEN; -wxPen *wxTRANSPARENT_PEN; -wxPen *wxBLACK_DASHED_PEN; -wxPen *wxGREY_PEN; -wxPen *wxMEDIUM_GREY_PEN; -wxPen *wxLIGHT_GREY_PEN; - -wxBrush *wxBLUE_BRUSH; -wxBrush *wxGREEN_BRUSH; -wxBrush *wxWHITE_BRUSH; -wxBrush *wxBLACK_BRUSH; -wxBrush *wxTRANSPARENT_BRUSH; -wxBrush *wxCYAN_BRUSH; -wxBrush *wxRED_BRUSH; -wxBrush *wxGREY_BRUSH; -wxBrush *wxMEDIUM_GREY_BRUSH; -wxBrush *wxLIGHT_GREY_BRUSH; - -wxColour *wxBLACK; -wxColour *wxWHITE; -wxColour *wxRED; -wxColour *wxBLUE; -wxColour *wxGREEN; -wxColour *wxCYAN; -wxColour *wxLIGHT_GREY; - -wxCursor *wxSTANDARD_CURSOR = NULL; -wxCursor *wxHOURGLASS_CURSOR = NULL; -wxCursor *wxCROSS_CURSOR = NULL; - -// 'Null' objects -wxAcceleratorTable wxNullAcceleratorTable; -wxBitmap wxNullBitmap; -wxIcon wxNullIcon; -wxCursor wxNullCursor; -wxPen wxNullPen; -wxBrush wxNullBrush; -wxPalette wxNullPalette; -wxFont wxNullFont; -wxColour wxNullColour; - -// Default window names -const char *wxButtonNameStr = "button"; -const char *wxCanvasNameStr = "canvas"; -const char *wxCheckBoxNameStr = "check"; -const char *wxChoiceNameStr = "choice"; -const char *wxComboBoxNameStr = "comboBox"; -const char *wxDialogNameStr = "dialog"; -const char *wxFrameNameStr = "frame"; -const char *wxGaugeNameStr = "gauge"; -const char *wxStaticBoxNameStr = "groupBox"; -const char *wxListBoxNameStr = "listBox"; -const char *wxStaticTextNameStr = "message"; -const char *wxStaticBitmapNameStr = "message"; -const char *wxMultiTextNameStr = "multitext"; -const char *wxPanelNameStr = "panel"; -const char *wxRadioBoxNameStr = "radioBox"; -const char *wxRadioButtonNameStr = "radioButton"; -const char *wxBitmapRadioButtonNameStr = "radioButton"; -const char *wxScrollBarNameStr = "scrollBar"; -const char *wxSliderNameStr = "slider"; -const char *wxStaticNameStr = "static"; -const char *wxTextCtrlWindowNameStr = "textWindow"; -const char *wxTextCtrlNameStr = "text"; -const char *wxVirtListBoxNameStr = "virtListBox"; -const char *wxButtonBarNameStr = "buttonbar"; -const char *wxEnhDialogNameStr = "Shell"; -const char *wxToolBarNameStr = "toolbar"; -const char *wxStatusLineNameStr = "status_line"; -const char *wxEmptyString = ""; -const char *wxGetTextFromUserPromptStr = "Input Text"; -const char *wxMessageBoxCaptionStr = "Message"; -const char *wxFileSelectorPromptStr = "Select a file"; -const char *wxFileSelectorDefaultWildcardStr = "*.*"; -const char *wxInternalErrorStr = "wxWindows Internal Error"; -const char *wxFatalErrorStr = "wxWindows Fatal Error"; - -// See wx/utils.h -const char *wxFloatToStringStr = "%.2f"; -const char *wxDoubleToStringStr = "%.2f"; - -#if USE_POSTSCRIPT -wxPrintPaperDatabase* wxThePrintPaperDatabase = NULL; -#endif - -#if USE_SHARED_LIBRARY -///// Event tables (also must be in one, statically-linked file for shared libraries) - -// This is the base, wxEvtHandler 'bootstrap' code which is expanded manually here -const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable; } - -const wxEventTable wxEvtHandler::sm_eventTable = - { NULL, &wxEvtHandler::sm_eventTableEntries[0] }; - -const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, NULL } }; -#endif - -const wxSize wxDefaultSize(-1, -1); -const wxPoint wxDefaultPosition(-1, -1); diff --git a/src/stubs/dc.cpp b/src/stubs/dc.cpp deleted file mode 100644 index 466c670c91..0000000000 --- a/src/stubs/dc.cpp +++ /dev/null @@ -1,390 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dc.cpp -// Purpose: wxDC class -// Author: AUTHOR -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dc.h" -#endif - -#include "wx/dc.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) -#endif - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -#define mm2inches 0.0393700787402 -#define inches2mm 25.4 -#define mm2twips 56.6929133859 -#define twips2mm 0.0176388888889 -#define mm2pt 2.83464566929 -#define pt2mm 0.352777777778 - -//----------------------------------------------------------------------------- -// wxDC -//----------------------------------------------------------------------------- - -wxDC::wxDC(void) -{ - m_ok = FALSE; - m_optimize = FALSE; - m_autoSetting = FALSE; - m_colour = TRUE; - m_clipping = FALSE; - - m_mm_to_pix_x = 1.0; - m_mm_to_pix_y = 1.0; - - m_logicalOriginX = 0; - m_logicalOriginY = 0; - m_deviceOriginX = 0; - m_deviceOriginY = 0; - m_internalDeviceOriginX = 0; - m_internalDeviceOriginY = 0; - m_externalDeviceOriginX = 0; - m_externalDeviceOriginY = 0; - - m_logicalScaleX = 1.0; - m_logicalScaleY = 1.0; - m_userScaleX = 1.0; - m_userScaleY = 1.0; - m_scaleX = 1.0; - m_scaleY = 1.0; - - m_mappingMode = MM_TEXT; - m_needComputeScaleX = FALSE; - m_needComputeScaleY = FALSE; - - m_signX = 1; // default x-axis left to right - m_signY = 1; // default y-axis top down - - m_maxX = m_maxY = -100000; - m_minY = m_minY = 100000; - - m_logicalFunction = wxCOPY; -// m_textAlignment = wxALIGN_TOP_LEFT; - m_backgroundMode = wxTRANSPARENT; - - m_textForegroundColour = *wxBLACK; - m_textBackgroundColour = *wxWHITE; - m_pen = *wxBLACK_PEN; - m_font = *wxNORMAL_FONT; - m_brush = *wxTRANSPARENT_BRUSH; - m_backgroundBrush = *wxWHITE_BRUSH; - -// m_palette = wxAPP_COLOURMAP; -}; - -wxDC::~wxDC(void) -{ -}; - -void wxDC::DrawIcon( const wxIcon &WXUNUSED(icon), long WXUNUSED(x), long WXUNUSED(y), bool WXUNUSED(useMask) ) -{ -}; - -void wxDC::DrawPoint( wxPoint& point ) -{ - DrawPoint( point.x, point.y ); -}; - -void wxDC::DrawPolygon( wxList *list, long xoffset, long yoffset, int fillStyle ) -{ - int n = list->Number(); - wxPoint *points = new wxPoint[n]; - - int i = 0; - for( wxNode *node = list->First(); node; node = node->Next() ) - { - wxPoint *point = (wxPoint *)node->Data(); - points[i].x = point->x; - points[i++].y = point->y; - }; - DrawPolygon( n, points, xoffset, yoffset, fillStyle ); - delete[] points; -}; - -void wxDC::DrawLines( wxList *list, long xoffset, long yoffset ) -{ - int n = list->Number(); - wxPoint *points = new wxPoint[n]; - - int i = 0; - for( wxNode *node = list->First(); node; node = node->Next() ) - { - wxPoint *point = (wxPoint *)node->Data(); - points[i].x = point->x; - points[i++].y = point->y; - }; - DrawLines( n, points, xoffset, yoffset ); - delete []points; -}; - -void wxDC::DrawSpline( long x1, long y1, long x2, long y2, long x3, long y3 ) -{ - wxList list; - list.Append( (wxObject*)new wxPoint(x1, y1) ); - list.Append( (wxObject*)new wxPoint(x2, y2) ); - list.Append( (wxObject*)new wxPoint(x3, y3) ); - DrawSpline(&list); - wxNode *node = list.First(); - while (node) - { - wxPoint *p = (wxPoint*)node->Data(); - delete p; - node = node->Next(); - }; -}; - -void wxDC::DrawSpline( wxList *points ) -{ - DrawOpenSpline( points ); -}; - -void wxDC::DrawSpline( int n, wxPoint points[] ) -{ - wxList list; - for (int i = 0; i < n; i++) list.Append( (wxObject*)&points[i] ); - DrawSpline( &list ); -}; - -void wxDC::SetClippingRegion( long x, long y, long width, long height ) -{ - m_clipping = TRUE; - m_clipX1 = x; - m_clipY1 = y; - m_clipX2 = x + width; - m_clipY2 = y + height; -}; - -void wxDC::DestroyClippingRegion(void) -{ - m_clipping = FALSE; -}; - -void wxDC::GetClippingBox( long *x, long *y, long *width, long *height ) const -{ - if (m_clipping) - { - if (x) *x = m_clipX1; - if (y) *y = m_clipY1; - if (width) *width = (m_clipX2 - m_clipX1); - if (height) *height = (m_clipY2 - m_clipY1); - } - else - *x = *y = *width = *height = 0; -}; - -void wxDC::GetSize( int* width, int* height ) const -{ - *width = m_maxX-m_minX; - *height = m_maxY-m_minY; -}; - -void wxDC::GetSizeMM( long* width, long* height ) const -{ - int w = 0; - int h = 0; - GetSize( &w, &h ); - *width = long( double(w) / (m_scaleX*m_mm_to_pix_x) ); - *height = long( double(h) / (m_scaleY*m_mm_to_pix_y) ); -}; - -void wxDC::SetTextForeground( const wxColour &col ) -{ - if (!Ok()) return; - m_textForegroundColour = col; -}; - -void wxDC::SetTextBackground( const wxColour &col ) -{ - if (!Ok()) return; - m_textBackgroundColour = col; -}; - -void wxDC::SetMapMode( int mode ) -{ - switch (mode) - { - case MM_TWIPS: - SetLogicalScale( twips2mm*m_mm_to_pix_x, twips2mm*m_mm_to_pix_y ); - break; - case MM_POINTS: - SetLogicalScale( pt2mm*m_mm_to_pix_x, pt2mm*m_mm_to_pix_y ); - break; - case MM_METRIC: - SetLogicalScale( m_mm_to_pix_x, m_mm_to_pix_y ); - break; - case MM_LOMETRIC: - SetLogicalScale( m_mm_to_pix_x/10.0, m_mm_to_pix_y/10.0 ); - break; - default: - case MM_TEXT: - SetLogicalScale( 1.0, 1.0 ); - break; - }; - if (mode != MM_TEXT) - { - m_needComputeScaleX = TRUE; - m_needComputeScaleY = TRUE; - }; -}; - -void wxDC::SetUserScale( double x, double y ) -{ - // allow negative ? -> no - m_userScaleX = x; - m_userScaleY = y; - ComputeScaleAndOrigin(); -}; - -void wxDC::GetUserScale( double *x, double *y ) -{ - if (x) *x = m_userScaleX; - if (y) *y = m_userScaleY; -}; - -void wxDC::SetLogicalScale( double x, double y ) -{ - // allow negative ? - m_logicalScaleX = x; - m_logicalScaleY = y; - ComputeScaleAndOrigin(); -}; - -void wxDC::GetLogicalScale( double *x, double *y ) -{ - if (x) *x = m_logicalScaleX; - if (y) *y = m_logicalScaleY; -}; - -void wxDC::SetLogicalOrigin( long x, long y ) -{ - m_logicalOriginX = x * m_signX; // is this still correct ? - m_logicalOriginY = y * m_signY; - ComputeScaleAndOrigin(); -}; - -void wxDC::GetLogicalOrigin( long *x, long *y ) -{ - if (x) *x = m_logicalOriginX; - if (y) *y = m_logicalOriginY; -}; - -void wxDC::SetDeviceOrigin( long x, long y ) -{ - m_externalDeviceOriginX = x; - m_externalDeviceOriginY = y; - ComputeScaleAndOrigin(); -}; - -void wxDC::GetDeviceOrigin( long *x, long *y ) -{ -// if (x) *x = m_externalDeviceOriginX; -// if (y) *y = m_externalDeviceOriginY; - if (x) *x = m_deviceOriginX; - if (y) *y = m_deviceOriginY; -}; - -void wxDC::SetInternalDeviceOrigin( long x, long y ) -{ - m_internalDeviceOriginX = x; - m_internalDeviceOriginY = y; - ComputeScaleAndOrigin(); -}; - -void wxDC::GetInternalDeviceOrigin( long *x, long *y ) -{ - if (x) *x = m_internalDeviceOriginX; - if (y) *y = m_internalDeviceOriginY; -}; - -void wxDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp ) -{ - m_signX = (xLeftRight ? 1 : -1); - m_signY = (yBottomUp ? -1 : 1); - ComputeScaleAndOrigin(); -}; - -long wxDC::DeviceToLogicalX(long x) const -{ - return XDEV2LOG(x); -}; - -long wxDC::DeviceToLogicalY(long y) const -{ - return YDEV2LOG(y); -}; - -long wxDC::DeviceToLogicalXRel(long x) const -{ - return XDEV2LOGREL(x); -}; - -long wxDC::DeviceToLogicalYRel(long y) const -{ - return YDEV2LOGREL(y); -}; - -long wxDC::LogicalToDeviceX(long x) const -{ - return XLOG2DEV(x); -}; - -long wxDC::LogicalToDeviceY(long y) const -{ - return YLOG2DEV(y); -}; - -long wxDC::LogicalToDeviceXRel(long x) const -{ - return XLOG2DEVREL(x); -}; - -long wxDC::LogicalToDeviceYRel(long y) const -{ - return YLOG2DEVREL(y); -}; - -void wxDC::CalcBoundingBox( long x, long y ) -{ - if (x < m_minX) m_minX = x; - if (y < m_minY) m_minY = y; - if (x > m_maxX) m_maxX = x; - if (y > m_maxY) m_maxY = y; -}; - -void wxDC::ComputeScaleAndOrigin(void) -{ - // CMB: copy scale to see if it changes - double origScaleX = m_scaleX; - double origScaleY = m_scaleY; - - m_scaleX = m_logicalScaleX * m_userScaleX; - m_scaleY = m_logicalScaleY * m_userScaleY; - - m_deviceOriginX = m_internalDeviceOriginX + m_externalDeviceOriginX; - m_deviceOriginY = m_internalDeviceOriginY + m_externalDeviceOriginY; - - // CMB: if scale has changed call SetPen to recalulate the line width - if (m_scaleX != origScaleX || m_scaleY != origScaleY) - { - // this is a bit artificial, but we need to force wxDC to think - // the pen has changed - wxPen* pen = GetPen(); - wxPen tempPen; - m_pen = tempPen; - SetPen(pen); - } -}; - diff --git a/src/stubs/dcclient.cpp b/src/stubs/dcclient.cpp deleted file mode 100644 index 53a84e6928..0000000000 --- a/src/stubs/dcclient.cpp +++ /dev/null @@ -1,620 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcclient.cpp -// Purpose: wxClientDC class -// Author: AUTHOR -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dcclient.h" -#endif - -#include "wx/dcclient.h" -#include "wx/dcmemory.h" -#include - -//----------------------------------------------------------------------------- -// constants -//----------------------------------------------------------------------------- - -#define RAD2DEG 57.2957795131 - -//----------------------------------------------------------------------------- -// wxPaintDC -//----------------------------------------------------------------------------- - -#if !USE_SHARED_LIBRARY -//IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxDC) -//IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxDC) -#endif - - -wxPaintDC::wxPaintDC(void) -{ -}; - -wxPaintDC::wxPaintDC( wxWindow *window ) -{ -}; - -wxPaintDC::~wxPaintDC(void) -{ -}; - -void wxPaintDC::FloodFill( long WXUNUSED(x1), long WXUNUSED(y1), - wxColour* WXUNUSED(col), int WXUNUSED(style) ) -{ -}; - -bool wxPaintDC::GetPixel( long WXUNUSED(x1), long WXUNUSED(y1), wxColour *WXUNUSED(col) ) const -{ - return FALSE; -}; - -void wxPaintDC::DrawLine( long x1, long y1, long x2, long y2 ) -{ - if (!Ok()) return; - -}; - -void wxPaintDC::CrossHair( long x, long y ) -{ - if (!Ok()) return; - -}; - -void wxPaintDC::DrawArc( long x1, long y1, long x2, long y2, long xc, long yc ) -{ - if (!Ok()) return; - - long xx1 = XLOG2DEV(x1); - long yy1 = YLOG2DEV(y1); - long xx2 = XLOG2DEV(x2); - long yy2 = YLOG2DEV(y2); - long xxc = XLOG2DEV((long)xc); - long yyc = YLOG2DEV((long)yc); - double dx = xx1 - xxc; - double dy = yy1 - yyc; - double radius = sqrt(dx*dx+dy*dy); - long r = (long)radius; - double radius1, radius2; - - if (xx1 == xx2 && yy1 == yy2) - { - radius1 = 0.0; - radius2 = 360.0; - } - else - if (radius == 0.0) - { - radius1 = radius2 = 0.0; - } - else - { - radius1 = (xx1 - xxc == 0) ? - (yy1 - yyc < 0) ? 90.0 : -90.0 : - -atan2(double(yy1-yyc), double(xx1-xxc)) * RAD2DEG; - radius2 = (xx2 - xxc == 0) ? - (yy2 - yyc < 0) ? 90.0 : -90.0 : - -atan2(double(yy2-yyc), double(xx2-xxc)) * RAD2DEG; - }; - long alpha1 = long(radius1 * 64.0); - long alpha2 = long((radius2 - radius1) * 64.0); - while (alpha2 <= 0) alpha2 += 360*64; - while (alpha1 > 360*64) alpha1 -= 360*64; - - if (m_brush.GetStyle() != wxTRANSPARENT) {}; - - if (m_pen.GetStyle() != wxTRANSPARENT) {}; - -}; - -void wxPaintDC::DrawEllipticArc( long x, long y, long width, long height, double sa, double ea ) -{ - if (!Ok()) return; - - long xx = XLOG2DEV(x); - long yy = YLOG2DEV(y); - long ww = m_signX * XLOG2DEVREL(width); - long hh = m_signY * YLOG2DEVREL(height); - - // CMB: handle -ve width and/or height - if (ww < 0) { ww = -ww; xx = xx - ww; } - if (hh < 0) { hh = -hh; yy = yy - hh; } - - long start = long(sa * 64.0); - long end = long(ea * 64.0); - if (m_brush.GetStyle() != wxTRANSPARENT) {}; - - if (m_pen.GetStyle() != wxTRANSPARENT) {}; -}; - -void wxPaintDC::DrawPoint( long x, long y ) -{ - if (!Ok()) return; - - if (m_pen.GetStyle() != wxTRANSPARENT) {}; -}; - -void wxPaintDC::DrawLines( int n, wxPoint points[], long xoffset, long yoffset ) -{ - if (!Ok()) return; - - if (m_pen.GetStyle() == wxTRANSPARENT) return; - - for (int i = 0; i < n-1; i++) - { - long x1 = XLOG2DEV(points[i].x + xoffset); - long x2 = XLOG2DEV(points[i+1].x + xoffset); - long y1 = YLOG2DEV(points[i].y + yoffset); // oh, what a waste - long y2 = YLOG2DEV(points[i+1].y + yoffset); - }; -}; - -void wxPaintDC::DrawLines( wxList *points, long xoffset, long yoffset ) -{ - if (!Ok()) return; - - if (m_pen.GetStyle() == wxTRANSPARENT) return; - - wxNode *node = points->First(); - while (node->Next()) - { - wxPoint *point = (wxPoint*)node->Data(); - wxPoint *npoint = (wxPoint*)node->Next()->Data(); - long x1 = XLOG2DEV(point->x + xoffset); - long x2 = XLOG2DEV(npoint->x + xoffset); - long y1 = YLOG2DEV(point->y + yoffset); // and again... - long y2 = YLOG2DEV(npoint->y + yoffset); - node = node->Next(); - }; -}; - -void wxPaintDC::DrawPolygon( int WXUNUSED(n), wxPoint WXUNUSED(points)[], - long WXUNUSED(xoffset), long WXUNUSED(yoffset), int WXUNUSED(fillStyle) ) -{ - if (!Ok()) return; -}; - -void wxPaintDC::DrawPolygon( wxList *WXUNUSED(lines), long WXUNUSED(xoffset), - long WXUNUSED(yoffset), int WXUNUSED(fillStyle) ) -{ - if (!Ok()) return; -}; - -void wxPaintDC::DrawRectangle( long x, long y, long width, long height ) -{ - if (!Ok()) return; - - long xx = XLOG2DEV(x); - long yy = YLOG2DEV(y); - long ww = m_signX * XLOG2DEVREL(width); - long hh = m_signY * YLOG2DEVREL(height); - - // CMB: draw nothing if transformed w or h is 0 - if (ww == 0 || hh == 0) return; - - // CMB: handle -ve width and/or height - if (ww < 0) { ww = -ww; xx = xx - ww; } - if (hh < 0) { hh = -hh; yy = yy - hh; } - - if (m_brush.GetStyle() != wxTRANSPARENT) {}; - - if (m_pen.GetStyle() != wxTRANSPARENT) {}; -}; - -void wxPaintDC::DrawRoundedRectangle( long x, long y, long width, long height, double radius ) -{ - if (!Ok()) return; - - if (radius < 0.0) radius = - radius * ((width < height) ? width : height); - - long xx = XLOG2DEV(x); - long yy = YLOG2DEV(y); - long ww = m_signX * XLOG2DEVREL(width); - long hh = m_signY * YLOG2DEVREL(height); - long rr = XLOG2DEVREL((long)radius); - - // CMB: handle -ve width and/or height - if (ww < 0) { ww = -ww; xx = xx - ww; } - if (hh < 0) { hh = -hh; yy = yy - hh; } - - // CMB: if radius is zero use DrawRectangle() instead to avoid - // X drawing errors with small radii - if (rr == 0) - { - DrawRectangle( x, y, width, height ); - return; - } - - // CMB: draw nothing if transformed w or h is 0 - if (ww == 0 || hh == 0) return; - - // CMB: adjust size if outline is drawn otherwise the result is - // 1 pixel too wide and high - if (m_pen.GetStyle() != wxTRANSPARENT) - { - ww--; - hh--; - } - - // CMB: ensure dd is not larger than rectangle otherwise we - // get an hour glass shape - long dd = 2 * rr; - if (dd > ww) dd = ww; - if (dd > hh) dd = hh; - rr = dd / 2; - - if (m_brush.GetStyle() != wxTRANSPARENT) - { - }; - - if (m_pen.GetStyle() != wxTRANSPARENT) - { - }; -}; - -void wxPaintDC::DrawEllipse( long x, long y, long width, long height ) -{ - if (!Ok()) return; - - long xx = XLOG2DEV(x); - long yy = YLOG2DEV(y); - long ww = m_signX * XLOG2DEVREL(width); - long hh = m_signY * YLOG2DEVREL(height); - - // CMB: handle -ve width and/or height - if (ww < 0) { ww = -ww; xx = xx - ww; } - if (hh < 0) { hh = -hh; yy = yy - hh; } - - if (m_brush.GetStyle() != wxTRANSPARENT) {}; - - if (m_pen.GetStyle() != wxTRANSPARENT) {}; -}; - -bool wxPaintDC::CanDrawBitmap(void) const -{ - return TRUE; -}; - -void wxPaintDC::DrawIcon( const wxIcon &icon, long x, long y, bool useMask ) -{ - if (!Ok()) return; - - if (!icon.Ok()) return; - - int xx = XLOG2DEV(x); - int yy = YLOG2DEV(y); - -}; - -bool wxPaintDC::Blit( long xdest, long ydest, long width, long height, - wxDC *source, long xsrc, long ysrc, int WXUNUSED(logical_func), bool WXUNUSED(useMask) ) -{ - if (!Ok()) return FALSE; - - // CMB 20/5/98: add blitting of bitmaps - if (source->IsKindOf(CLASSINFO(wxMemoryDC))) - { - wxMemoryDC* srcDC = (wxMemoryDC*)source; - /* - GdkBitmap* bmap = srcDC->m_selected.GetBitmap(); - if (bmap) - { - gdk_draw_bitmap ( - m_window, - m_textGC, - bmap, - source->DeviceToLogicalX(xsrc), source->DeviceToLogicalY(ysrc), - XLOG2DEV(xdest), YLOG2DEV(ydest), - source->DeviceToLogicalXRel(width), source->DeviceToLogicalYRel(height) - ); - return TRUE; - } - */ - } - - return TRUE; -}; - -void wxPaintDC::DrawText( const wxString &text, long x, long y, bool -WXUNUSED(use16) ) -{ - if (!Ok()) return; - -}; - - - -bool wxPaintDC::CanGetTextExtent(void) const -{ - return TRUE; -}; - -void wxPaintDC::GetTextExtent( const wxString &string, long *width, long *height, - long *WXUNUSED(descent), long *WXUNUSED(externalLeading), - wxFont *WXUNUSED(theFont), bool WXUNUSED(use16) ) -{ - if (!Ok()) return; - -}; - -long wxPaintDC::GetCharWidth(void) -{ - if (!Ok()) return 0; - return 0; -}; - -long wxPaintDC::GetCharHeight(void) -{ - if (!Ok()) return 0; - return 0; -}; - -void wxPaintDC::Clear(void) -{ - if (!Ok()) return; - -}; - -void wxPaintDC::SetFont( const wxFont &font ) -{ - if (!Ok()) return; - - m_font = font; -}; - -void wxPaintDC::SetPen( const wxPen &pen ) -{ - if (!Ok()) return; - - if (m_pen == pen) return; - - m_pen = pen; - - if (!m_pen.Ok()) return; -}; - -void wxPaintDC::SetBrush( const wxBrush &brush ) -{ - if (!Ok()) return; - - if (m_brush == brush) return; - - m_brush = brush; - - if (!m_brush.Ok()) return; - -}; - -void wxPaintDC::SetBackground( const wxBrush &brush ) -{ - if (!Ok()) return; - - if (m_backgroundBrush == brush) return; - - m_backgroundBrush = brush; - - if (!m_backgroundBrush.Ok()) return; - -}; - -void wxPaintDC::SetLogicalFunction( int function ) -{ - if (m_logicalFunction == function) return; -}; - -void wxPaintDC::SetTextForeground( const wxColour &col ) -{ - if (!Ok()) return; - - if (m_textForegroundColour == col) return; - - m_textForegroundColour = col; - if (!m_textForegroundColour.Ok()) return; -}; - -void wxPaintDC::SetTextBackground( const wxColour &col ) -{ - if (!Ok()) return; - - if (m_textBackgroundColour == col) return; - - m_textBackgroundColour = col; - if (!m_textBackgroundColour.Ok()) return; -}; - -void wxPaintDC::SetBackgroundMode( int mode ) -{ - m_backgroundMode = mode; - - if (m_brush.GetStyle() != wxSOLID && m_brush.GetStyle() != wxTRANSPARENT) - { - } -}; - -void wxPaintDC::SetPalette( const wxPalette& WXUNUSED(palette) ) -{ -}; - -void wxPaintDC::SetClippingRegion( long x, long y, long width, long height ) -{ - wxDC::SetClippingRegion( x, y, width, height ); - -}; - -void wxPaintDC::DestroyClippingRegion(void) -{ - wxDC::DestroyClippingRegion(); - -}; - -// ----------------------------------- spline code ---------------------------------------- - -void wx_quadratic_spline(double a1, double b1, double a2, double b2, - double a3, double b3, double a4, double b4); -void wx_clear_stack(void); -int wx_spline_pop(double *x1, double *y1, double *x2, double *y2, double *x3, - double *y3, double *x4, double *y4); -void wx_spline_push(double x1, double y1, double x2, double y2, double x3, double y3, - double x4, double y4); -static bool wx_spline_add_point(double x, double y); -static void wx_spline_draw_point_array(wxDC *dc); - -wxList wx_spline_point_list; - -#define half(z1, z2) ((z1+z2)/2.0) -#define THRESHOLD 5 - -/* iterative version */ - -void wx_quadratic_spline(double a1, double b1, double a2, double b2, double a3, double b3, double a4, - double b4) -{ - register double xmid, ymid; - double x1, y1, x2, y2, x3, y3, x4, y4; - - wx_clear_stack(); - wx_spline_push(a1, b1, a2, b2, a3, b3, a4, b4); - - while (wx_spline_pop(&x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4)) { - xmid = (double)half(x2, x3); - ymid = (double)half(y2, y3); - if (fabs(x1 - xmid) < THRESHOLD && fabs(y1 - ymid) < THRESHOLD && - fabs(xmid - x4) < THRESHOLD && fabs(ymid - y4) < THRESHOLD) { - wx_spline_add_point( x1, y1 ); - wx_spline_add_point( xmid, ymid ); - } else { - wx_spline_push(xmid, ymid, (double)half(xmid, x3), (double)half(ymid, y3), - (double)half(x3, x4), (double)half(y3, y4), x4, y4); - wx_spline_push(x1, y1, (double)half(x1, x2), (double)half(y1, y2), - (double)half(x2, xmid), (double)half(y2, ymid), xmid, ymid); - } - } -} - -/* utilities used by spline drawing routines */ - -typedef struct wx_spline_stack_struct { - double x1, y1, x2, y2, x3, y3, x4, y4; -} Stack; - -#define SPLINE_STACK_DEPTH 20 -static Stack wx_spline_stack[SPLINE_STACK_DEPTH]; -static Stack *wx_stack_top; -static int wx_stack_count; - -void wx_clear_stack(void) -{ - wx_stack_top = wx_spline_stack; - wx_stack_count = 0; -} - -void wx_spline_push(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) -{ - wx_stack_top->x1 = x1; - wx_stack_top->y1 = y1; - wx_stack_top->x2 = x2; - wx_stack_top->y2 = y2; - wx_stack_top->x3 = x3; - wx_stack_top->y3 = y3; - wx_stack_top->x4 = x4; - wx_stack_top->y4 = y4; - wx_stack_top++; - wx_stack_count++; -} - -int wx_spline_pop(double *x1, double *y1, double *x2, double *y2, - double *x3, double *y3, double *x4, double *y4) -{ - if (wx_stack_count == 0) - return (0); - wx_stack_top--; - wx_stack_count--; - *x1 = wx_stack_top->x1; - *y1 = wx_stack_top->y1; - *x2 = wx_stack_top->x2; - *y2 = wx_stack_top->y2; - *x3 = wx_stack_top->x3; - *y3 = wx_stack_top->y3; - *x4 = wx_stack_top->x4; - *y4 = wx_stack_top->y4; - return (1); -} - -static bool wx_spline_add_point(double x, double y) -{ - wxPoint *point = new wxPoint ; - point->x = (int) x; - point->y = (int) y; - wx_spline_point_list.Append((wxObject*)point); - return TRUE; -} - -static void wx_spline_draw_point_array(wxDC *dc) -{ - dc->DrawLines(&wx_spline_point_list, 0, 0 ); - wxNode *node = wx_spline_point_list.First(); - while (node) - { - wxPoint *point = (wxPoint *)node->Data(); - delete point; - delete node; - node = wx_spline_point_list.First(); - } -} - -void wxPaintDC::DrawOpenSpline( wxList *points ) -{ - wxPoint *p; - double cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4; - double x1, y1, x2, y2; - - wxNode *node = points->First(); - p = (wxPoint *)node->Data(); - - x1 = p->x; - y1 = p->y; - - node = node->Next(); - p = (wxPoint *)node->Data(); - - x2 = p->x; - y2 = p->y; - cx1 = (double)((x1 + x2) / 2); - cy1 = (double)((y1 + y2) / 2); - cx2 = (double)((cx1 + x2) / 2); - cy2 = (double)((cy1 + y2) / 2); - - wx_spline_add_point(x1, y1); - - while ((node = node->Next()) != NULL) - { - p = (wxPoint *)node->Data(); - x1 = x2; - y1 = y2; - x2 = p->x; - y2 = p->y; - cx4 = (double)(x1 + x2) / 2; - cy4 = (double)(y1 + y2) / 2; - cx3 = (double)(x1 + cx4) / 2; - cy3 = (double)(y1 + cy4) / 2; - - wx_quadratic_spline(cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4); - - cx1 = cx4; - cy1 = cy4; - cx2 = (double)(cx1 + x2) / 2; - cy2 = (double)(cy1 + y2) / 2; - } - - wx_spline_add_point( cx1, cy1 ); - wx_spline_add_point( x2, y2 ); - - wx_spline_draw_point_array( this ); -}; diff --git a/src/stubs/dcmemory.cpp b/src/stubs/dcmemory.cpp deleted file mode 100644 index 7cbd330821..0000000000 --- a/src/stubs/dcmemory.cpp +++ /dev/null @@ -1,64 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcmemory.cpp -// Purpose: wxMemoryDC class -// Author: AUTHOR -// Modified by: -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dcmemory.h" -#endif - -#include "wx/dcmemory.h" - -//----------------------------------------------------------------------------- -// wxMemoryDC -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxPaintDC) - -wxMemoryDC::wxMemoryDC(void) -{ - m_ok = FALSE; -}; - -wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) ) -{ - m_ok = FALSE; -}; - -wxMemoryDC::~wxMemoryDC(void) -{ -}; - -void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) -{ - m_selected = bitmap; - if (m_selected.Ok()) - { - } - else - { - m_ok = FALSE; - }; -}; - -void wxMemoryDC::GetSize( int *width, int *height ) const -{ - if (m_selected.Ok()) - { - if (width) (*width) = m_selected.GetWidth(); - if (height) (*height) = m_selected.GetHeight(); - } - else - { - if (width) (*width) = 0; - if (height) (*height) = 0; - }; -}; - - diff --git a/src/stubs/dcscreen.cpp b/src/stubs/dcscreen.cpp deleted file mode 100644 index 04bbf4f353..0000000000 --- a/src/stubs/dcscreen.cpp +++ /dev/null @@ -1,32 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dcscreen.cpp -// Purpose: wxScreenDC class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dcscreen.h" -#endif - -#include "wx/dcscreen.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxPaintDC) -#endif - -// Create a DC representing the whole screen -wxScreenDC::wxScreenDC() -{ - // TODO -} - -wxScreenDC::~wxScreenDC() -{ - // TODO -} - diff --git a/src/stubs/dialog.cpp b/src/stubs/dialog.cpp deleted file mode 100644 index c278536c60..0000000000 --- a/src/stubs/dialog.cpp +++ /dev/null @@ -1,291 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dialog.cpp -// Purpose: wxDialog class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dialog.h" -#endif - -#include "wx/dialog.h" -#include "wx/utils.h" -#include "wx/frame.h" -#include "wx/app.h" -#include "wx/settings.h" - -// Lists to keep track of windows, so we can disable/enable them -// for modal dialogs -wxList wxModalDialogs; -wxList wxModelessWindows; // Frames and modeless dialogs -extern wxList wxPendingDelete; - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxPanel) - -BEGIN_EVENT_TABLE(wxDialog, wxPanel) - EVT_BUTTON(wxID_OK, wxDialog::OnOK) - EVT_BUTTON(wxID_APPLY, wxDialog::OnApply) - EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel) - EVT_CHAR_HOOK(wxDialog::OnCharHook) - EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged) - EVT_CLOSE(wxDialog::OnCloseWindow) -END_EVENT_TABLE() - -#endif - -wxDialog::wxDialog() -{ - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); -} - -bool wxDialog::Create(wxWindow *parent, wxWindowID id, - const wxString& title, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - m_windowStyle = style; - - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); - SetName(name); - - if (!parent) - wxTopLevelWindows.Append(this); - - if (parent) parent->AddChild(this); - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - // TODO: create dialog - - return FALSE; -} - -void wxDialog::SetModal(bool flag) -{ - if ( flag ) - m_windowStyle |= wxDIALOG_MODAL ; - else - if ( m_windowStyle & wxDIALOG_MODAL ) - m_windowStyle -= wxDIALOG_MODAL ; - - wxModelessWindows.DeleteObject(this); - if (!flag) - wxModelessWindows.Append(this); -} - -wxDialog::~wxDialog() -{ - // TODO - wxTopLevelWindows.DeleteObject(this); - - if ( (GetWindowStyleFlag() & wxDIALOG_MODAL) != wxDIALOG_MODAL ) - wxModelessWindows.DeleteObject(this); - - // If this is the last top-level window, exit. - if (wxTheApp && (wxTopLevelWindows.Number() == 0)) - { - wxTheApp->SetTopWindow(NULL); - - if (wxTheApp->GetExitOnFrameDelete()) - { - // TODO: exit - } - } -} - -// By default, pressing escape cancels the dialog -void wxDialog::OnCharHook(wxKeyEvent& event) -{ - if (event.m_keyCode == WXK_ESCAPE) - { - // Behaviour changed in 2.0: we'll send a Cancel message - // to the dialog instead of Close. - wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL); - cancelEvent.SetEventObject( this ); - GetEventHandler()->ProcessEvent(cancelEvent); - - return; - } - // We didn't process this event. - event.Skip(); -} - -void wxDialog::Iconize(bool WXUNUSED(iconize)) -{ - // TODO -} - -bool wxDialog::IsIconized() const -{ - // TODO - return FALSE; -} - -void wxDialog::SetClientSize(int width, int height) -{ - // TODO -} - -void wxDialog::GetPosition(int *x, int *y) const -{ - // TODO -} - -bool wxDialog::Show(bool show) -{ - // TODO - return FALSE; -} - -void wxDialog::SetTitle(const wxString& title) -{ - // TODO -} - -wxString wxDialog::GetTitle() const -{ - // TODO - return wxString(""); -} - -void wxDialog::Centre(int direction) -{ - int x_offset,y_offset ; - int display_width, display_height; - int width, height, x, y; - wxFrame *frame ; - if (direction & wxCENTER_FRAME) - { - frame = (wxFrame*)GetParent() ; - if (frame) - { - frame->GetPosition(&x_offset,&y_offset) ; - frame->GetSize(&display_width,&display_height) ; - } - } - else - frame = NULL ; - - if (frame==NULL) - { - wxDisplaySize(&display_width, &display_height); - x_offset = 0 ; - y_offset = 0 ; - } - - GetSize(&width, &height); - GetPosition(&x, &y); - - if (direction & wxHORIZONTAL) - x = (int)((display_width - width)/2); - if (direction & wxVERTICAL) - y = (int)((display_height - height)/2); - - SetSize(x+x_offset, y+y_offset, width, height); -} - -// Replacement for Show(TRUE) for modal dialogs - returns return code -int wxDialog::ShowModal() -{ - m_windowStyle |= wxDIALOG_MODAL; - // TODO: modal showing - Show(TRUE); - return GetReturnCode(); -} - -void wxDialog::EndModal(int retCode) -{ - SetReturnCode(retCode); - // TODO modal un-showing - Show(FALSE); -} - -// Standard buttons -void wxDialog::OnOK(wxCommandEvent& event) -{ - if ( Validate() && TransferDataFromWindow() ) - { - if ( IsModal() ) - EndModal(wxID_OK); - else - { - SetReturnCode(wxID_OK); - this->Show(FALSE); - } - } -} - -void wxDialog::OnApply(wxCommandEvent& event) -{ - if (Validate()) - TransferDataFromWindow(); - // TODO probably need to disable the Apply button until things change again -} - -void wxDialog::OnCancel(wxCommandEvent& event) -{ - if ( IsModal() ) - EndModal(wxID_CANCEL); - else - { - SetReturnCode(wxID_CANCEL); - this->Show(FALSE); - } -} - -bool wxDialog::OnClose() -{ - // Behaviour changed in 2.0: we'll send a Cancel message by default, - // which may close the dialog. - // Check for looping if the Cancel event handler calls Close() - - static wxList closing; - - if ( closing.Member(this) ) - return FALSE; - - closing.Append(this); - - wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL); - cancelEvent.SetEventObject( this ); - GetEventHandler()->ProcessEvent(cancelEvent); - - closing.DeleteObject(this); - - return FALSE; -} - -void wxDialog::OnCloseWindow(wxCloseEvent& event) -{ - // Compatibility - if ( GetEventHandler()->OnClose() || event.GetForce()) - { - this->Destroy(); - } -} - -// Destroy the window (delayed, if a managed window) -bool wxDialog::Destroy() -{ - if (!wxPendingDelete.Member(this)) - wxPendingDelete.Append(this); - return TRUE; -} - -void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& event) -{ - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); - Refresh(); -} - diff --git a/src/stubs/dirdlg.cpp b/src/stubs/dirdlg.cpp deleted file mode 100644 index 095621b978..0000000000 --- a/src/stubs/dirdlg.cpp +++ /dev/null @@ -1,42 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dirdlg.cpp -// Purpose: wxDirDialog -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dirdlg.h" -#endif - -#include "wx/defs.h" -#include "wx/utils.h" -#include "wx/dialog.h" -#include "wx/dirdlg.h" - -#include "wx/cmndata.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_CLASS(wxDirDialog, wxDialog) -#endif - -wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message, - const wxString& defaultPath, - long style, const wxPoint& pos) -{ - m_message = message; - m_dialogStyle = style; - m_parent = parent; - m_path = defaultPath; -} - -int wxDirDialog::ShowModal() -{ - // TODO - return wxID_CANCEL; -} - diff --git a/src/stubs/dnd.cpp b/src/stubs/dnd.cpp deleted file mode 100644 index ec82cb6dc1..0000000000 --- a/src/stubs/dnd.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: dnd.cpp -// Purpose: wxDropTarget, wxDropSource, wxDataObject implementation -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 AUTHOR -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dnd.h" -#endif - -#include "wx/dnd.h" -#include "wx/window.h" -#include "wx/app.h" -#include "wx/gdicmn.h" - -// ---------------------------------------------------------------------------- -// global -// ---------------------------------------------------------------------------- - -// ---------------------------------------------------------------------------- -// wxDropTarget -// ---------------------------------------------------------------------------- - -wxDropTarget::wxDropTarget() -{ -}; - -wxDropTarget::~wxDropTarget() -{ -}; - -// ---------------------------------------------------------------------------- -// wxTextDropTarget -// ---------------------------------------------------------------------------- - -bool wxTextDropTarget::OnDrop( long x, long y, const void *pData ) -{ - OnDropText( x, y, (const char*)pData ); - return TRUE; -}; - -bool wxTextDropTarget::OnDropText( long x, long y, const char *psz ) -{ - printf( "Got dropped text: %s.\n", psz ); - printf( "At x: %d, y: %d.\n", (int)x, (int)y ); - return TRUE; -}; - -size_t wxTextDropTarget::GetFormatCount() const -{ - return 1; -} - -wxDataFormat wxTextDropTarget::GetFormat(size_t WXUNUSED(n)) const -{ - return wxDF_TEXT; -} - -// ---------------------------------------------------------------------------- -// wxFileDropTarget -// ---------------------------------------------------------------------------- - -bool wxFileDropTarget::OnDropFiles( long x, long y, size_t nFiles, const char * const WXUNUSED(aszFiles)[] ) -{ - printf( "Got %d dropped files.\n", (int)nFiles ); - printf( "At x: %d, y: %d.\n", (int)x, (int)y ); - return TRUE; -} - -bool wxFileDropTarget::OnDrop(long x, long y, const void *WXUNUSED(pData) ) -{ - char *str = "/this/is/a/path.txt"; - - return OnDropFiles(x, y, 1, &str ); -} - -size_t wxFileDropTarget::GetFormatCount() const -{ - return 1; -} - -wxDataFormat wxFileDropTarget::GetFormat(size_t WXUNUSED(n)) const -{ - return wxDF_FILENAME; -} - -//------------------------------------------------------------------------- -// wxDropSource -//------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// drag request - -wxDropSource::wxDropSource( wxWindow *win ) -{ - // TODO - m_window = win; - m_data = NULL; - - m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY ); - m_goaheadCursor = wxCursor( wxCURSOR_HAND ); -}; - -wxDropSource::wxDropSource( wxDataObject &data, wxWindow *win ) -{ - // TODO - m_window = win; - m_data = &data; - - m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY ); - m_goaheadCursor = wxCursor( wxCURSOR_HAND ); -}; - -void wxDropSource::SetData( wxDataObject &data ) -{ - m_data = &data; -}; - -wxDropSource::~wxDropSource(void) -{ -}; - -wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) ) -{ - // TODO - return Error; -}; - diff --git a/src/stubs/filedlg.cpp b/src/stubs/filedlg.cpp deleted file mode 100644 index 2aeffdf926..0000000000 --- a/src/stubs/filedlg.cpp +++ /dev/null @@ -1,143 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: filedlg.cpp -// Purpose: wxFileDialog -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "filedlg.h" -#endif - -#include "wx/defs.h" -#include "wx/utils.h" -#include "wx/dialog.h" -#include "wx/filedlg.h" -#include "wx/intl.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_CLASS(wxFileDialog, wxDialog) -#endif - -char *wxFileSelector(const char *title, - const char *defaultDir, const char *defaultFileName, - const char *defaultExtension, const char *filter, int flags, - wxWindow *parent, int x, int y) -{ - // If there's a default extension specified but no filter, we create a suitable - // filter. - - wxString filter2(""); - if ( defaultExtension && !filter ) - filter2 = wxString("*.") + wxString(defaultExtension) ; - else if ( filter ) - filter2 = filter; - - wxString defaultDirString; - if (defaultDir) - defaultDirString = defaultDir; - else - defaultDirString = ""; - - wxString defaultFilenameString; - if (defaultFileName) - defaultFilenameString = defaultFileName; - else - defaultFilenameString = ""; - - wxFileDialog fileDialog(parent, title, defaultDirString, defaultFilenameString, filter2, flags, wxPoint(x, y)); - - if ( fileDialog.ShowModal() == wxID_OK ) - { - strcpy(wxBuffer, (const char *)fileDialog.GetPath()); - return wxBuffer; - } - else - return NULL; -} - -char *wxFileSelectorEx(const char *title, - const char *defaultDir, - const char *defaultFileName, - int* defaultFilterIndex, - const char *filter, - int flags, - wxWindow* parent, - int x, - int y) - -{ - wxFileDialog fileDialog(parent, title ? title : "", defaultDir ? defaultDir : "", - defaultFileName ? defaultFileName : "", filter ? filter : "", flags, wxPoint(x, y)); - - if ( fileDialog.ShowModal() == wxID_OK ) - { - *defaultFilterIndex = fileDialog.GetFilterIndex(); - strcpy(wxBuffer, (const char *)fileDialog.GetPath()); - return wxBuffer; - } - else - return NULL; -} - -wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, - const wxString& defaultDir, const wxString& defaultFileName, const wxString& wildCard, - long style, const wxPoint& pos) -{ - m_message = message; - m_dialogStyle = style; - m_parent = parent; - m_path = ""; - m_fileName = defaultFileName; - m_dir = defaultDir; - m_wildCard = wildCard; - m_filterIndex = 1; -} - -int wxFileDialog::ShowModal() -{ - // TODO - return wxID_CANCEL; -} - -// Generic file load/save dialog -static char * -wxDefaultFileSelector(bool load, const char *what, const char *extension, const char *default_name, wxWindow *parent) -{ - char *ext = (char *)extension; - - char prompt[50]; - wxString str; - if (load) - str = "Load %s file"; - else - str = "Save %s file"; - sprintf(prompt, wxGetTranslation(str), what); - - if (*ext == '.') ext++; - char wild[60]; - sprintf(wild, "*.%s", ext); - - return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent); -} - -// Generic file load dialog -char * -wxLoadFileSelector(const char *what, const char *extension, const char *default_name, wxWindow *parent) -{ - return wxDefaultFileSelector(TRUE, what, extension, default_name, parent); -} - - -// Generic file save dialog -char * -wxSaveFileSelector(const char *what, const char *extension, const char *default_name, wxWindow *parent) -{ - return wxDefaultFileSelector(FALSE, what, extension, default_name, parent); -} - - diff --git a/src/stubs/font.cpp b/src/stubs/font.cpp deleted file mode 100644 index 493a6a25ba..0000000000 --- a/src/stubs/font.cpp +++ /dev/null @@ -1,244 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: font.cpp -// Purpose: wxFont class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "font.h" -#endif - -#include "wx/defs.h" -#include "wx/string.h" -#include "wx/font.h" -#include "wx/gdicmn.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) -#endif - -wxFontRefData::wxFontRefData() -{ - m_style = 0; - m_pointSize = 0; - m_family = 0; - m_style = 0; - m_weight = 0; - m_underlined = 0; - m_faceName = ""; -/* TODO - m_hFont = 0; -*/ -} - -wxFontRefData::wxFontRefData(const wxFontRefData& data) -{ - m_style = data.m_style; - m_pointSize = data.m_pointSize; - m_family = data.m_family; - m_style = data.m_style; - m_weight = data.m_weight; - m_underlined = data.m_underlined; - m_faceName = data.m_faceName; -/* TODO - m_hFont = 0; -*/ -} - -wxFontRefData::~wxFontRefData() -{ - // TODO: delete font data -} - -wxFont::wxFont() -{ - if ( wxTheFontList ) - wxTheFontList->Append(this); -} - -wxFont::wxFont(int pointSize, int family, int style, int weight, bool underlined, const wxString& faceName) -{ - Create(pointSize, family, style, weight, underlined, faceName); - - if ( wxTheFontList ) - wxTheFontList->Append(this); -} - -bool wxFont::Create(int pointSize, int family, int style, int weight, bool underlined, const wxString& faceName) -{ - UnRef(); - m_refData = new wxFontRefData; - - M_FONTDATA->m_family = family; - M_FONTDATA->m_style = style; - M_FONTDATA->m_weight = weight; - M_FONTDATA->m_pointSize = pointSize; - M_FONTDATA->m_underlined = underlined; - M_FONTDATA->m_faceName = faceName; - - RealizeResource(); - - return TRUE; -} - -wxFont::~wxFont() -{ - if (wxTheFontList) - wxTheFontList->DeleteObject(this); -} - -bool wxFont::RealizeResource() -{ - // TODO: create the font (if there is a native font object) - return FALSE; -} - -void wxFont::Unshare() -{ - // Don't change shared data - if (!m_refData) - { - m_refData = new wxFontRefData(); - } - else - { - wxFontRefData* ref = new wxFontRefData(*(wxFontRefData*)m_refData); - UnRef(); - m_refData = ref; - } -} - -void wxFont::SetPointSize(int pointSize) -{ - Unshare(); - - M_FONTDATA->m_pointSize = pointSize; - - RealizeResource(); -} - -void wxFont::SetFamily(int family) -{ - Unshare(); - - M_FONTDATA->m_family = family; - - RealizeResource(); -} - -void wxFont::SetStyle(int style) -{ - Unshare(); - - M_FONTDATA->m_style = style; - - RealizeResource(); -} - -void wxFont::SetWeight(int weight) -{ - Unshare(); - - M_FONTDATA->m_weight = weight; - - RealizeResource(); -} - -void wxFont::SetFaceName(const wxString& faceName) -{ - Unshare(); - - M_FONTDATA->m_faceName = faceName; - - RealizeResource(); -} - -void wxFont::SetUnderlined(bool underlined) -{ - Unshare(); - - M_FONTDATA->m_underlined = underlined; - - RealizeResource(); -} - -wxString wxFont::GetFamilyString() const -{ - wxString fam(""); - switch (GetFamily()) - { - case wxDECORATIVE: - fam = "wxDECORATIVE"; - break; - case wxROMAN: - fam = "wxROMAN"; - break; - case wxSCRIPT: - fam = "wxSCRIPT"; - break; - case wxSWISS: - fam = "wxSWISS"; - break; - case wxMODERN: - fam = "wxMODERN"; - break; - case wxTELETYPE: - fam = "wxTELETYPE"; - break; - default: - fam = "wxDEFAULT"; - break; - } - return fam; -} - -/* New font system */ -wxString wxFont::GetFaceName() const -{ - wxString str(""); - if (M_FONTDATA) - str = M_FONTDATA->m_faceName ; - return str; -} - -wxString wxFont::GetStyleString() const -{ - wxString styl(""); - switch (GetStyle()) - { - case wxITALIC: - styl = "wxITALIC"; - break; - case wxSLANT: - styl = "wxSLANT"; - break; - default: - styl = "wxNORMAL"; - break; - } - return styl; -} - -wxString wxFont::GetWeightString() const -{ - wxString w(""); - switch (GetWeight()) - { - case wxBOLD: - w = "wxBOLD"; - break; - case wxLIGHT: - w = "wxLIGHT"; - break; - default: - w = "wxNORMAL"; - break; - } - return w; -} - diff --git a/src/stubs/fontdlg.cpp b/src/stubs/fontdlg.cpp deleted file mode 100644 index 60e8e9b987..0000000000 --- a/src/stubs/fontdlg.cpp +++ /dev/null @@ -1,55 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: fontdlg.cpp -// Purpose: wxFontDialog class. NOTE: you can use the generic class -// if you wish, instead of implementing this. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "fontdlg.h" -#endif - -#include "wx/stubs/fontdlg.h" -#include "wx/cmndata.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog) -#endif - -/* - * wxFontDialog - */ - -wxFontDialog::wxFontDialog() -{ - m_dialogParent = NULL; -} - -wxFontDialog::wxFontDialog(wxWindow *parent, wxFontData *data) -{ - Create(parent, data); -} - -bool wxFontDialog::Create(wxWindow *parent, wxFontData *data) -{ - m_dialogParent = parent; - - if (data) - m_fontData = *data; - - // TODO: you may need to do dialog creation here, unless it's - // done in ShowModal. - return TRUE; -} - -int wxFontDialog::ShowModal() -{ - // TODO: show (maybe create) the dialog - return wxID_CANCEL; -} - diff --git a/src/stubs/frame.cpp b/src/stubs/frame.cpp deleted file mode 100644 index 5c22818c61..0000000000 --- a/src/stubs/frame.cpp +++ /dev/null @@ -1,548 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: frame.cpp -// Purpose: wxFrame -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "frame.h" -#endif - -#include "wx/frame.h" -#include "wx/statusbr.h" -#include "wx/toolbar.h" -#include "wx/menuitem.h" -#include "wx/menu.h" -#include "wx/dcclient.h" -#include "wx/dialog.h" -#include "wx/settings.h" -#include "wx/app.h" - -extern wxList wxModelessWindows; -extern wxList wxPendingDelete; - -#if !USE_SHARED_LIBRARY -BEGIN_EVENT_TABLE(wxFrame, wxWindow) - EVT_SIZE(wxFrame::OnSize) - EVT_ACTIVATE(wxFrame::OnActivate) - EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight) - EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged) - EVT_IDLE(wxFrame::OnIdle) - EVT_CLOSE(wxFrame::OnCloseWindow) -END_EVENT_TABLE() - -IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow) -#endif - -#if USE_NATIVE_STATUSBAR -bool wxFrame::m_useNativeStatusBar = TRUE; -#else -bool wxFrame::m_useNativeStatusBar = FALSE; -#endif - -wxFrame::wxFrame() -{ - m_frameToolBar = NULL ; - m_frameMenuBar = NULL; - m_frameStatusBar = NULL; - - m_windowParent = NULL; - m_iconized = FALSE; -} - -bool wxFrame::Create(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - if (!parent) - wxTopLevelWindows.Append(this); - - SetName(name); - m_windowStyle = style; - m_frameMenuBar = NULL; - m_frameToolBar = NULL ; - m_frameStatusBar = NULL; - - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE)); - - if ( id > -1 ) - m_windowId = id; - else - m_windowId = (int)NewControlId(); - - if (parent) parent->AddChild(this); - - wxModelessWindows.Append(this); - - // TODO: create frame. - - return FALSE; -} - -wxFrame::~wxFrame() -{ - wxTopLevelWindows.DeleteObject(this); - - if (m_frameStatusBar) - delete m_frameStatusBar; - if (m_frameMenuBar) - delete m_frameMenuBar; - -/* Check if it's the last top-level window */ - - if (wxTheApp && (wxTopLevelWindows.Number() == 0)) - { - wxTheApp->SetTopWindow(NULL); - - if (wxTheApp->GetExitOnFrameDelete()) - { - // TODO signal to the app that we're going to close - } - } - - wxModelessWindows.DeleteObject(this); -} - -// Get size *available for subwindows* i.e. excluding menu bar, toolbar etc. -void wxFrame::GetClientSize(int *x, int *y) const -{ - // TODO -} - -// Set the client size (i.e. leave the calculation of borders etc. -// to wxWindows) -void wxFrame::SetClientSize(int width, int height) -{ - // TODO -} - -void wxFrame::GetSize(int *width, int *height) const -{ - // TODO -} - -void wxFrame::GetPosition(int *x, int *y) const -{ - // TODO -} - -void wxFrame::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -bool wxFrame::Show(bool show) -{ - // TODO - return FALSE; -} - -void wxFrame::Iconize(bool iconize) -{ - // TODO -} - -// Equivalent to maximize/restore in Windows -void wxFrame::Maximize(bool maximize) -{ - // TODO -} - -bool wxFrame::IsIconized() const -{ - // TODO - return FALSE; -} - -void wxFrame::SetTitle(const wxString& title) -{ - // TODO -} - -wxString wxFrame::GetTitle() const -{ - // TODO - return wxString(""); -} - -void wxFrame::SetIcon(const wxIcon& icon) -{ - m_icon = icon; - // TODO -} - -void wxFrame::SetAcceleratorTable(const wxAcceleratorTable& accel) -{ - m_acceleratorTable = accel; -} - -wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id, - const wxString& name) -{ - wxStatusBar *statusBar = NULL; - - statusBar = new wxStatusBar(this, id, wxPoint(0, 0), wxSize(100, 20), - style, name); - - // Set the height according to the font and the border size - wxClientDC dc(statusBar); - dc.SetFont(* statusBar->GetFont()); - - long x, y; - dc.GetTextExtent("X", &x, &y); - - int height = (int)( (y * 1.1) + 2* statusBar->GetBorderY()); - - statusBar->SetSize(-1, -1, 100, height); - - statusBar->SetFieldsCount(number); - return statusBar; -} - -wxStatusBar* wxFrame::CreateStatusBar(int number, long style, wxWindowID id, - const wxString& name) -{ - // Calling CreateStatusBar twice is an error. - wxCHECK_MSG( m_frameStatusBar == NULL, FALSE, - "recreating status bar in wxFrame" ); - - m_frameStatusBar = OnCreateStatusBar(number, style, id, - name); - if ( m_frameStatusBar ) - { - PositionStatusBar(); - return m_frameStatusBar; - } - else - return NULL; -} - -void wxFrame::SetStatusText(const wxString& text, int number) -{ - wxCHECK_RET( m_frameStatusBar != NULL, "no statusbar to set text for" ); - - m_frameStatusBar->SetStatusText(text, number); -} - -void wxFrame::SetStatusWidths(int n, const int widths_field[]) -{ - wxCHECK_RET( m_frameStatusBar != NULL, "no statusbar to set widths for" ); - - m_frameStatusBar->SetStatusWidths(n, widths_field); - PositionStatusBar(); -} - -void wxFrame::PositionStatusBar() -{ - int w, h; - GetClientSize(&w, &h); - int sw, sh; - m_frameStatusBar->GetSize(&sw, &sh); - - // Since we wish the status bar to be directly under the client area, - // we use the adjusted sizes without using wxSIZE_NO_ADJUSTMENTS. - m_frameStatusBar->SetSize(0, h, w, sh); -} - -void wxFrame::SetMenuBar(wxMenuBar *menuBar) -{ - if (!menuBar) - { - m_frameMenuBar = NULL; - return; - } - - m_frameMenuBar = menuBar; - - // TODO -} - -void wxFrame::Fit() -{ - // Work out max. size - wxNode *node = GetChildren()->First(); - int max_width = 0; - int max_height = 0; - while (node) - { - // Find a child that's a subwindow, but not a dialog box. - wxWindow *win = (wxWindow *)node->Data(); - - if (!win->IsKindOf(CLASSINFO(wxFrame)) && - !win->IsKindOf(CLASSINFO(wxDialog))) - { - int width, height; - int x, y; - win->GetSize(&width, &height); - win->GetPosition(&x, &y); - - if ((x + width) > max_width) - max_width = x + width; - if ((y + height) > max_height) - max_height = y + height; - } - node = node->Next(); - } - SetClientSize(max_width, max_height); -} - -// Responds to colour changes, and passes event on to children. -void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event) -{ - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE)); - Refresh(); - - if ( m_frameStatusBar ) - { - wxSysColourChangedEvent event2; - event2.SetEventObject( m_frameStatusBar ); - m_frameStatusBar->ProcessEvent(event2); - } - - // Propagate the event to the non-top-level children - wxWindow::OnSysColourChanged(event); -} - -// Default resizing behaviour - if only ONE subwindow, -// resize to client rectangle size -void wxFrame::OnSize(wxSizeEvent& event) -{ - // if we're using constraints - do use them - #if USE_CONSTRAINTS - if ( GetAutoLayout() ) { - Layout(); - return; - } - #endif - - // do we have _exactly_ one child? - wxWindow *child = NULL; - for ( wxNode *node = GetChildren()->First(); node; node = node->Next() ) - { - wxWindow *win = (wxWindow *)node->Data(); - if ( !win->IsKindOf(CLASSINFO(wxFrame)) && - !win->IsKindOf(CLASSINFO(wxDialog)) && - (win != GetStatusBar()) && - (win != GetToolBar()) ) - { - if ( child ) - return; // it's our second subwindow - nothing to do - child = win; - } - } - - if ( child ) { - // we have exactly one child - set it's size to fill the whole frame - int clientW, clientH; - GetClientSize(&clientW, &clientH); - - int x = 0; - int y = 0; - - child->SetSize(x, y, clientW, clientH); - } -} - -// Default activation behaviour - set the focus for the first child -// subwindow found. -void wxFrame::OnActivate(wxActivateEvent& event) -{ - for(wxNode *node = GetChildren()->First(); node; node = node->Next()) - { - // Find a child that's a subwindow, but not a dialog box. - wxWindow *child = (wxWindow *)node->Data(); - if (!child->IsKindOf(CLASSINFO(wxFrame)) && - !child->IsKindOf(CLASSINFO(wxDialog))) - { -#if WXDEBUG > 1 - wxDebugMsg("wxFrame::OnActivate: about to set the child's focus.\n"); -#endif - child->SetFocus(); - return; - } - } -} - -// The default implementation for the close window event - calls -// OnClose for backward compatibility. - -void wxFrame::OnCloseWindow(wxCloseEvent& event) -{ - // Compatibility - if ( GetEventHandler()->OnClose() || event.GetForce()) - { - this->Destroy(); - } -} - -bool wxFrame::OnClose() -{ - return TRUE; -} - -// Destroy the window (delayed, if a managed window) -bool wxFrame::Destroy() -{ - if (!wxPendingDelete.Member(this)) - wxPendingDelete.Append(this); - return TRUE; -} - -// Default menu selection behaviour - display a help string -void wxFrame::OnMenuHighlight(wxMenuEvent& event) -{ - if (GetStatusBar()) - { - if (event.GetMenuId() == -1) - SetStatusText(""); - else - { - wxMenuBar *menuBar = GetMenuBar(); - if (menuBar) - { - wxString helpString(menuBar->GetHelpString(event.GetMenuId())); - if (helpString != "") - SetStatusText(helpString); - } - } - } -} - -wxMenuBar *wxFrame::GetMenuBar() const -{ - return m_frameMenuBar; -} - -void wxFrame::Centre(int direction) -{ - int display_width, display_height, width, height, x, y; - wxDisplaySize(&display_width, &display_height); - - GetSize(&width, &height); - GetPosition(&x, &y); - - if (direction & wxHORIZONTAL) - x = (int)((display_width - width)/2); - if (direction & wxVERTICAL) - y = (int)((display_height - height)/2); - - SetSize(x, y, width, height); -} - -// Call this to simulate a menu command -void wxFrame::Command(int id) -{ - ProcessCommand(id); -} - -void wxFrame::ProcessCommand(int id) -{ - wxCommandEvent commandEvent(wxEVENT_TYPE_MENU_COMMAND, id); - commandEvent.SetInt( id ); - commandEvent.SetEventObject( this ); - - wxMenuBar *bar = GetMenuBar() ; - if (!bar) - return; - -/* TODO: check the menu item if required - wxMenuItem *item = bar->FindItemForId(id) ; - if (item && item->IsCheckable()) - { - bar->Check(id,!bar->Checked(id)) ; - } -*/ - - GetEventHandler()->ProcessEvent(commandEvent); -} - -// Checks if there is a toolbar, and returns the first free client position -wxPoint wxFrame::GetClientAreaOrigin() const -{ - wxPoint pt(0, 0); - if (GetToolBar()) - { - int w, h; - GetToolBar()->GetSize(& w, & h); - - if (GetToolBar()->GetWindowStyleFlag() & wxTB_VERTICAL) - { - pt.x += w; - } - else - { - pt.y += h; - } - } - return pt; -} - -wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& name) -{ - wxCHECK_MSG( m_frameToolBar == NULL, FALSE, - "recreating toolbar in wxFrame" ); - - wxToolBar* toolBar = OnCreateToolBar(style, id, name); - if (toolBar) - { - SetToolBar(toolBar); - PositionToolBar(); - return toolBar; - } - else - { - return NULL; - } -} - -wxToolBar* wxFrame::OnCreateToolBar(long style, wxWindowID id, const wxString& name) -{ - return new wxToolBar(this, id, wxDefaultPosition, wxDefaultSize, style, name); -} - -void wxFrame::PositionToolBar() -{ - int cw, ch; - - // TODO: we actually need to use the low-level client size, before - // the toolbar/status bar were added. - // So DEFINITELY replace the line below with something appropriate. - - GetClientSize(& cw, &ch); - - if ( GetStatusBar() ) - { - int statusX, statusY; - GetStatusBar()->GetClientSize(&statusX, &statusY); - ch -= statusY; - } - - if (GetToolBar()) - { - int tw, th; - GetToolBar()->GetSize(& tw, & th); - - if (GetToolBar()->GetWindowStyleFlag() & wxTB_VERTICAL) - { - // Use the 'real' position. wxSIZE_NO_ADJUSTMENTS - // means, pretend we don't have toolbar/status bar, so we - // have the original client size. - GetToolBar()->SetSize(0, 0, tw, ch, wxSIZE_NO_ADJUSTMENTS); - } - else - { - // Use the 'real' position - GetToolBar()->SetSize(0, 0, cw, th, wxSIZE_NO_ADJUSTMENTS); - } - } -} - diff --git a/src/stubs/gauge.cpp b/src/stubs/gauge.cpp deleted file mode 100644 index a85fbc498f..0000000000 --- a/src/stubs/gauge.cpp +++ /dev/null @@ -1,95 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gauge.cpp -// Purpose: wxGauge class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "gauge.h" -#endif - -#include "wx/gauge.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl) -#endif - -bool wxGauge::Create(wxWindow *parent, wxWindowID id, - int range, - const wxPoint& pos, - const wxSize& size, - long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - m_rangeMax = range; - m_windowStyle = style; - - if (parent) parent->AddChild(this); - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - - // TODO - return FALSE; -} - -void wxGauge::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -void wxGauge::SetShadowWidth(int w) -{ - // TODO optional -} - -void wxGauge::SetBezelFace(int w) -{ - // TODO optional -} - -void wxGauge::SetRange(int r) -{ - m_rangeMax = r; - // TODO -} - -void wxGauge::SetValue(int pos) -{ - m_gaugePos = pos; - // TODO -} - -int wxGauge::GetShadowWidth() const -{ - // TODO optional - return 0; -} - -int wxGauge::GetBezelFace() const -{ - // TODO optional - return 0; -} - -int wxGauge::GetRange() const -{ - return m_rangeMax; -} - -int wxGauge::GetValue() const -{ - return m_gaugePos; -} - diff --git a/src/stubs/gdiobj.cpp b/src/stubs/gdiobj.cpp deleted file mode 100644 index 63697c8354..0000000000 --- a/src/stubs/gdiobj.cpp +++ /dev/null @@ -1,22 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: gdiobj.cpp -// Purpose: wxGDIObject class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "gdiobj.h" -#endif - -#include "wx/gdiobj.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxGDIObject, wxObject) -#endif - -// TODO: Nothing to do, unless you want to. diff --git a/src/stubs/helpxxxx.cpp b/src/stubs/helpxxxx.cpp deleted file mode 100644 index 086762c646..0000000000 --- a/src/stubs/helpxxxx.cpp +++ /dev/null @@ -1,83 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: helpxxxx.cpp -// Purpose: Help system: native implementation -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "helpxxxx.h" -#endif - -#include "wx/stubs/helpxxxx.h" - -#include - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxXXXXHelpController, wxHelpControllerBase) -#endif - -wxXXXXHelpController::wxXXXXHelpController() -{ - m_helpFile = ""; -} - -wxXXXXHelpController::~wxXXXXHelpController() -{ -} - -bool wxXXXXHelpController::Initialize(const wxString& filename) -{ - m_helpFile = filename; - // TODO any other inits - return TRUE; -} - -bool wxXXXXHelpController::LoadFile(const wxString& file) -{ - m_helpFile = file; - // TODO - return TRUE; -} - -bool wxXXXXHelpController::DisplayContents() -{ - // TODO - return FALSE; -} - -bool wxXXXXHelpController::DisplaySection(int section) -{ - // TODO - return FALSE; -} - -bool wxXXXXHelpController::DisplayBlock(long block) -{ - // TODO - return FALSE; -} - -bool wxXXXXHelpController::KeywordSearch(const wxString& k) -{ - if (m_helpFile == "") return FALSE; - - // TODO - return FALSE; -} - -// Can't close the help window explicitly in WinHelp -bool wxXXXXHelpController::Quit() -{ - // TODO - return FALSE; -} - -void wxXXXXHelpController::OnQuit() -{ -} - diff --git a/src/stubs/icon.cpp b/src/stubs/icon.cpp deleted file mode 100644 index 6deee7dbdc..0000000000 --- a/src/stubs/icon.cpp +++ /dev/null @@ -1,70 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: icon.cpp -// Purpose: wxIcon class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "icon.h" -#endif - -#include "wx/icon.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap) -#endif - -/* - * Icons - */ - - -wxIconRefData::wxIconRefData() -{ - // TODO: init icon handle -} - -wxIconRefData::~wxIconRefData() -{ - // TODO: destroy icon handle -} - -wxIcon::wxIcon() -{ -} - -wxIcon::wxIcon(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSED(height)) -{ -} - -wxIcon::wxIcon(const wxString& icon_file, long flags, - int desiredWidth, int desiredHeight) - -{ - LoadFile(icon_file, flags, desiredWidth, desiredHeight); -} - -wxIcon::~wxIcon() -{ -} - -bool wxIcon::LoadFile(const wxString& filename, long type, - int desiredWidth, int desiredHeight) -{ - UnRef(); - - m_refData = new wxIconRefData; - - wxBitmapHandler *handler = FindHandler(type); - - if ( handler ) - return handler->LoadFile(this, filename, type, desiredWidth, desiredHeight); - else - return FALSE; -} - diff --git a/src/stubs/imaglist.cpp b/src/stubs/imaglist.cpp deleted file mode 100644 index 4cb47b4e69..0000000000 --- a/src/stubs/imaglist.cpp +++ /dev/null @@ -1,118 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: imaglist.cpp -// Purpose: wxImageList. You may wish to use the generic version. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "imaglist.h" -#endif - -#include "wx/stubs/imaglist.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxImageList, wxObject) -#endif - -wxImageList::wxImageList() -{ - // TODO: init image list handle, if any -} - -wxImageList::~wxImageList() -{ - // TODO: destroy image list handle, if any -} - - -// Attributes -//////////////////////////////////////////////////////////////////////////// - -// Returns the number of images in the image list. -int wxImageList::GetImageCount() const -{ - // TODO - return 0; -} - -// Operations -//////////////////////////////////////////////////////////////////////////// - -// Creates an image list -bool wxImageList::Create(int width, int height, bool mask, int initial) -{ - // TODO - return FALSE; -} - -// Adds a bitmap, and optionally a mask bitmap. -// Note that wxImageList creates new bitmaps, so you may delete -// 'bitmap' and 'mask'. -int wxImageList::Add(const wxBitmap& bitmap, const wxBitmap& mask) -{ - // TODO - return 0; -} - -// Adds a bitmap, using the specified colour to create the mask bitmap -// Note that wxImageList creates new bitmaps, so you may delete -// 'bitmap'. -int wxImageList::Add(const wxBitmap& bitmap, const wxColour& maskColour) -{ - // TODO - return 0; -} - -// Adds a bitmap and mask from an icon. -int wxImageList::Add(const wxIcon& icon) -{ - // TODO - return 0; -} - -// Replaces a bitmap, optionally passing a mask bitmap. -// Note that wxImageList creates new bitmaps, so you may delete -// 'bitmap' and 'mask'. -bool wxImageList::Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask) -{ - // TODO - return 0; -} - -// Replaces a bitmap and mask from an icon. -bool wxImageList::Replace(int index, const wxIcon& icon) -{ - // TODO - return 0; -} - -// Removes the image at the given index. -bool wxImageList::Remove(int index) -{ - // TODO - return FALSE; -} - -// Remove all images -bool wxImageList::RemoveAll() -{ - // TODO - return FALSE; -} - -// Draws the given image on a dc at the specified position. -// If 'solidBackground' is TRUE, Draw sets the image list background -// colour to the background colour of the wxDC, to speed up -// drawing by eliminating masked drawing where possible. -bool wxImageList::Draw(int index, wxDC& dc, int x, int y, - int flags, bool solidBackground) -{ - // TODO - return FALSE; -} - diff --git a/src/stubs/joystick.cpp b/src/stubs/joystick.cpp deleted file mode 100644 index 6677277f48..0000000000 --- a/src/stubs/joystick.cpp +++ /dev/null @@ -1,279 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: joystick.cpp -// Purpose: wxJoystick class -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "joystick.h" -#endif - -#include - -IMPLEMENT_DYNAMIC_CLASS(wxJoystick, wxObject) - -// Attributes -//////////////////////////////////////////////////////////////////////////// - -wxPoint wxJoystick::GetPosition() const -{ - // TODO - return wxPoint(0, 0); -} - -int wxJoystick::GetZPosition() const -{ - // TODO - return 0; -} - -int wxJoystick::GetButtonState() const -{ - // TODO - return 0; -} - -int wxJoystick::GetPOVPosition() const -{ - // TODO - return 0; -} - -int wxJoystick::GetPOVCTSPosition() const -{ - // TODO - return 0; -} - -int wxJoystick::GetRudderPosition() const -{ - // TODO - return 0; -} - -int wxJoystick::GetUPosition() const -{ - // TODO - return 0; -} - -int wxJoystick::GetVPosition() const -{ - // TODO - return 0; -} - -int wxJoystick::GetMovementThreshold() const -{ - // TODO - return 0; -} - -void wxJoystick::SetMovementThreshold(int threshold) -{ - // TODO -} - -// Capabilities -//////////////////////////////////////////////////////////////////////////// - -bool wxJoystick::IsOk() const -{ - // TODO - return FALSE; -} - -int wxJoystick::GetNumberJoysticks() const -{ - // TODO - return 0; -} - -int wxJoystick::GetManufacturerId() const -{ - // TODO - return 0; -} - -int wxJoystick::GetProductId() const -{ - // TODO - return 0; -} - -wxString wxJoystick::GetProductName() const -{ - // TODO - return wxString(""); -} - -int wxJoystick::GetXMin() const -{ - // TODO - return 0; -} - -int wxJoystick::GetYMin() const -{ - // TODO - return 0; -} - -int wxJoystick::GetZMin() const -{ - // TODO - return 0; -} - -int wxJoystick::GetXMax() const -{ - // TODO - return 0; -} - -int wxJoystick::GetYMax() const -{ - // TODO - return 0; -} - -int wxJoystick::GetZMax() const -{ - // TODO - return 0; -} - -int wxJoystick::GetNumberButtons() const -{ - // TODO - return 0; -} - -int wxJoystick::GetNumberAxes() const -{ - // TODO - return 0; -} - -int wxJoystick::GetMaxButtons() const -{ - // TODO - return 0; -} - -int wxJoystick::GetMaxAxes() const -{ - // TODO - return 0; -} - -int wxJoystick::GetPollingMin() const -{ - // TODO - return 0; -} - -int wxJoystick::GetPollingMax() const -{ - // TODO - return 0; -} - -int wxJoystick::GetRudderMin() const -{ - // TODO - return 0; -} - -int wxJoystick::GetRudderMax() const -{ - // TODO - return 0; -} - -int wxJoystick::GetUMin() const -{ - // TODO - return 0; -} - -int wxJoystick::GetUMax() const -{ - // TODO - return 0; -} - -int wxJoystick::GetVMin() const -{ - // TODO - return 0; -} - -int wxJoystick::GetVMax() const -{ - // TODO - return 0; -} - -bool wxJoystick::HasRudder() const -{ - // TODO - return FALSE; -} - -bool wxJoystick::HasZ() const -{ - // TODO - return FALSE; -} - -bool wxJoystick::HasU() const -{ - // TODO - return FALSE; -} - -bool wxJoystick::HasV() const -{ - // TODO - return FALSE; -} - -bool wxJoystick::HasPOV() const -{ - // TODO - return FALSE; -} - -bool wxJoystick::HasPOV4Dir() const -{ - // TODO - return FALSE; -} - -bool wxJoystick::HasPOVCTS() const -{ - // TODO - return FALSE; -} - -// Operations -//////////////////////////////////////////////////////////////////////////// - -bool wxJoystick::SetCapture(wxWindow* win, int pollingFreq) -{ - // TODO - return FALSE; -} - -bool wxJoystick::ReleaseCapture() -{ - // TODO - return FALSE; -} - diff --git a/src/stubs/listbox.cpp b/src/stubs/listbox.cpp deleted file mode 100644 index 1dad21e12c..0000000000 --- a/src/stubs/listbox.cpp +++ /dev/null @@ -1,235 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: listbox.cpp -// Purpose: wxListBox -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "listbox.h" -#endif - -#include "wx/listbox.h" -#include "wx/settings.h" -#include "wx/dynarray.h" -#include "wx/log.h" - -#if !USE_SHARED_LIBRARY - IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl) -#endif - -// ============================================================================ -// list box control implementation -// ============================================================================ - -// Listbox item -wxListBox::wxListBox() -{ - m_noItems = 0; - m_selected = 0; -} - -bool wxListBox::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, - const wxSize& size, - int n, const wxString choices[], - long style, - const wxValidator& validator, - const wxString& name) -{ - m_noItems = n; - m_selected = 0; - - SetName(name); - SetValidator(validator); - - if (parent) parent->AddChild(this); - - wxSystemSettings settings; - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW)); - - m_windowId = ( id == -1 ) ? (int)NewControlId() : id; - - // TODO create listbox - - return FALSE; -} - -wxListBox::~wxListBox() -{ -} - -void wxListBox::SetFirstItem(int N) -{ - // TODO -} - -void wxListBox::SetFirstItem(const wxString& s) -{ - // TODO -} - -void wxListBox::Delete(int N) -{ - m_noItems --; - // TODO -} - -void wxListBox::Append(const wxString& item) -{ - m_noItems ++; - - // TODO -} - -void wxListBox::Append(const wxString& item, char *Client_data) -{ - m_noItems ++; - - // TODO -} - -void wxListBox::Set(int n, const wxString *choices, char** clientData) -{ - m_noItems = n; - - // TODO -} - -int wxListBox::FindString(const wxString& s) const -{ - // TODO - return -1; -} - -void wxListBox::Clear() -{ - m_noItems = 0; - // TODO -} - -void wxListBox::SetSelection(int N, bool select) -{ - // TODO -} - -bool wxListBox::Selected(int N) const -{ - // TODO - return FALSE; -} - -void wxListBox::Deselect(int N) -{ - // TODO -} - -char *wxListBox::GetClientData(int N) const -{ - // TODO - return (char *)NULL; -} - -void wxListBox::SetClientData(int N, char *Client_data) -{ - // TODO -} - -// Return number of selections and an array of selected integers -int wxListBox::GetSelections(wxArrayInt& aSelections) const -{ - aSelections.Empty(); - -/* TODO - if ((m_windowStyle & wxLB_MULTIPLE) || (m_windowStyle & wxLB_EXTENDED)) - { - int no_sel = ?? - for ( int n = 0; n < no_sel; n++ ) - aSelections.Add(??); - - return no_sel; - } - else // single-selection listbox - { - aSelections.Add(??); - - return 1; - } -*/ - return 0; -} - -// Get single selection, for single choice list items -int wxListBox::GetSelection() const -{ - // TODO - return -1; -} - -// Find string for position -wxString wxListBox::GetString(int N) const -{ - // TODO - return wxString(""); -} - -void wxListBox::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -void wxListBox::InsertItems(int nItems, const wxString items[], int pos) -{ - m_noItems += nItems; - - // TODO -} - -void wxListBox::SetString(int N, const wxString& s) -{ - // TODO -} - -int wxListBox::Number () const -{ - return m_noItems; -} - -// For single selection items only -wxString wxListBox::GetStringSelection () const -{ - int sel = GetSelection (); - if (sel > -1) - return this->GetString (sel); - else - return wxString(""); -} - -bool wxListBox::SetStringSelection (const wxString& s, bool flag) -{ - int sel = FindString (s); - if (sel > -1) - { - SetSelection (sel, flag); - return TRUE; - } - else - return FALSE; -} - -void wxListBox::Command (wxCommandEvent & event) -{ - if (event.m_extraLong) - SetSelection (event.m_commandInt); - else - { - Deselect (event.m_commandInt); - return; - } - ProcessCommand (event); -} - diff --git a/src/stubs/listctrl.cpp b/src/stubs/listctrl.cpp deleted file mode 100644 index 0f4ed673a5..0000000000 --- a/src/stubs/listctrl.cpp +++ /dev/null @@ -1,596 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: listctrl.cpp -// Purpose: wxListCtrl. See also Robert's generic wxListCtrl -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "listctrl.h" -#endif - -#include "wx/stubs/textctrl.h" -#include "wx/stubs/listctrl.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxListCtrl, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxListItem, wxObject) - -#endif - -wxListCtrl::wxListCtrl() -{ - m_imageListNormal = NULL; - m_imageListSmall = NULL; - m_imageListState = NULL; - m_baseStyle = 0; - m_colCount = 0; -} - -bool wxListCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style, const wxValidator& validator, const wxString& name) -{ - m_imageListNormal = NULL; - m_imageListSmall = NULL; - m_imageListState = NULL; - m_colCount = 0; - - SetValidator(validator); - SetName(name); - - m_windowStyle = style; - - SetParent(parent); - - m_windowId = (id == -1) ? NewControlId() : id; - - if (parent) parent->AddChild(this); - - // TODO create list control - return TRUE; -} - -wxListCtrl::~wxListCtrl() -{ -} - -// Add or remove a single window style -void wxListCtrl::SetSingleStyle(long style, bool add) -{ - long flag = GetWindowStyleFlag(); - - // Get rid of conflicting styles - if ( add ) - { - if ( style & wxLC_MASK_TYPE) - flag = flag & ~wxLC_MASK_TYPE ; - if ( style & wxLC_MASK_ALIGN ) - flag = flag & ~wxLC_MASK_ALIGN ; - if ( style & wxLC_MASK_SORT ) - flag = flag & ~wxLC_MASK_SORT ; - } - - if ( flag & style ) - { - if ( !add ) - flag -= style; - } - else - { - if ( add ) - { - flag |= style; - } - } - - m_windowStyle = flag; - - /* TODO RecreateWindow(); */ -} - -// Set the whole window style -void wxListCtrl::SetWindowStyleFlag(long flag) -{ - m_windowStyle = flag; - - /* TODO RecreateWindow(); */ -} - - -// Gets information about this column -bool wxListCtrl::GetColumn(int col, wxListItem& item) const -{ - // TODO - return FALSE; -} - -// Sets information about this column -bool wxListCtrl::SetColumn(int col, wxListItem& item) -{ - // TODO - return FALSE; -} - -// Gets the column width -int wxListCtrl::GetColumnWidth(int col) const -{ - // TODO - return 0; -} - -// Sets the column width -bool wxListCtrl::SetColumnWidth(int col, int width) -{ - // TODO - return FALSE; -} - -// Gets the number of items that can fit vertically in the -// visible area of the list control (list or report view) -// or the total number of items in the list control (icon -// or small icon view) -int wxListCtrl::GetCountPerPage() const -{ - // TODO - return 0; -} - -// Gets the edit control for editing labels. -wxTextCtrl* wxListCtrl::GetEditControl() const -{ - return m_textCtrl; -} - -// Gets information about the item -bool wxListCtrl::GetItem(wxListItem& info) const -{ - // TODO - return FALSE; -} - -// Sets information about the item -bool wxListCtrl::SetItem(wxListItem& info) -{ - // TODO - return FALSE; -} - -long wxListCtrl::SetItem(long index, int col, const wxString& label, int imageId) -{ - wxListItem info; - info.m_text = label; - info.m_mask = wxLIST_MASK_TEXT; - info.m_itemId = index; - info.m_col = col; - if ( imageId > -1 ) - { - info.m_image = imageId; - info.m_mask |= wxLIST_MASK_IMAGE; - } - return SetItem(info); -} - - -// Gets the item state -int wxListCtrl::GetItemState(long item, long stateMask) const -{ - wxListItem info; - - info.m_mask = wxLIST_MASK_STATE ; - info.m_stateMask = stateMask; - info.m_itemId = item; - - if (!GetItem(info)) - return 0; - - return info.m_state; -} - -// Sets the item state -bool wxListCtrl::SetItemState(long item, long state, long stateMask) -{ - wxListItem info; - - info.m_mask = wxLIST_MASK_STATE ; - info.m_state = state; - info.m_stateMask = stateMask; - info.m_itemId = item; - - return SetItem(info); -} - -// Sets the item image -bool wxListCtrl::SetItemImage(long item, int image, int selImage) -{ - wxListItem info; - - info.m_mask = wxLIST_MASK_IMAGE ; - info.m_image = image; - info.m_itemId = item; - - return SetItem(info); -} - -// Gets the item text -wxString wxListCtrl::GetItemText(long item) const -{ - wxListItem info; - - info.m_mask = wxLIST_MASK_TEXT ; - info.m_itemId = item; - - if (!GetItem(info)) - return wxString(""); - return info.m_text; -} - -// Sets the item text -void wxListCtrl::SetItemText(long item, const wxString& str) -{ - wxListItem info; - - info.m_mask = wxLIST_MASK_TEXT ; - info.m_itemId = item; - info.m_text = str; - - SetItem(info); -} - -// Gets the item data -long wxListCtrl::GetItemData(long item) const -{ - wxListItem info; - - info.m_mask = wxLIST_MASK_DATA ; - info.m_itemId = item; - - if (!GetItem(info)) - return 0; - return info.m_data; -} - -// Sets the item data -bool wxListCtrl::SetItemData(long item, long data) -{ - wxListItem info; - - info.m_mask = wxLIST_MASK_DATA ; - info.m_itemId = item; - info.m_data = data; - - return SetItem(info); -} - -// Gets the item rectangle -bool wxListCtrl::GetItemRect(long item, wxRectangle& rect, int code) const -{ - // TODO - return FALSE; -} - -// Gets the item position -bool wxListCtrl::GetItemPosition(long item, wxPoint& pos) const -{ - // TODO - return FALSE; -} - -// Sets the item position. -bool wxListCtrl::SetItemPosition(long item, const wxPoint& pos) -{ - // TODO - return FALSE; -} - -// Gets the number of items in the list control -int wxListCtrl::GetItemCount() const -{ - // TODO - return FALSE; -} - -// Retrieves the spacing between icons in pixels. -// If small is TRUE, gets the spacing for the small icon -// view, otherwise the large icon view. -int wxListCtrl::GetItemSpacing(bool isSmall) const -{ - // TODO - return FALSE; -} - -// Gets the number of selected items in the list control -int wxListCtrl::GetSelectedItemCount() const -{ - // TODO - return FALSE; -} - -// Gets the text colour of the listview -wxColour wxListCtrl::GetTextColour() const -{ - // TODO - return wxColour(); -} - -// Sets the text colour of the listview -void wxListCtrl::SetTextColour(const wxColour& col) -{ - // TODO -} - -// Gets the index of the topmost visible item when in -// list or report view -long wxListCtrl::GetTopItem() const -{ - // TODO - return 0; -} - -// Searches for an item, starting from 'item'. -// 'geometry' is one of -// wxLIST_NEXT_ABOVE/ALL/BELOW/LEFT/RIGHT. -// 'state' is a state bit flag, one or more of -// wxLIST_STATE_DROPHILITED/FOCUSED/SELECTED/CUT. -// item can be -1 to find the first item that matches the -// specified flags. -// Returns the item or -1 if unsuccessful. -long wxListCtrl::GetNextItem(long item, int geom, int state) const -{ - // TODO - return 0; -} - -wxImageList *wxListCtrl::GetImageList(int which) const -{ - if ( which == wxIMAGE_LIST_NORMAL ) - { - return m_imageListNormal; - } - else if ( which == wxIMAGE_LIST_SMALL ) - { - return m_imageListSmall; - } - else if ( which == wxIMAGE_LIST_STATE ) - { - return m_imageListState; - } - return NULL; -} - -void wxListCtrl::SetImageList(wxImageList *imageList, int which) -{ - int flags = 0; - if ( which == wxIMAGE_LIST_NORMAL ) - { - m_imageListNormal = imageList; - } - else if ( which == wxIMAGE_LIST_SMALL ) - { - m_imageListSmall = imageList; - } - else if ( which == wxIMAGE_LIST_STATE ) - { - m_imageListState = imageList; - } - // TODO set image list -} - -// Operations -//////////////////////////////////////////////////////////////////////////// - -// Arranges the items -bool wxListCtrl::Arrange(int flag) -{ - // TODO - return FALSE; -} - -// Deletes an item -bool wxListCtrl::DeleteItem(long item) -{ - // TODO - return FALSE; -} - -// Deletes all items -bool wxListCtrl::DeleteAllItems() -{ - // TODO - return FALSE; -} - -// Deletes all items -bool wxListCtrl::DeleteAllColumns() -{ - // TODO - return FALSE; -} - -// Deletes a column -bool wxListCtrl::DeleteColumn(int col) -{ - // TODO - return FALSE; -} - -// Clears items, and columns if there are any. -void wxListCtrl::ClearAll() -{ - DeleteAllItems(); - if ( m_colCount > 0 ) - DeleteAllColumns(); -} - -// Edit the label -wxTextCtrl* wxListCtrl::EditLabel(long item, wxClassInfo* textControlClass) -{ - // TODO - return NULL; -} - -// End label editing, optionally cancelling the edit -bool wxListCtrl::EndEditLabel(bool cancel) -{ - // TODO - return FALSE; -} - -// Ensures this item is visible -bool wxListCtrl::EnsureVisible(long item) -{ - // TODO - return FALSE; -} - -// Find an item whose label matches this string, starting from the item after 'start' -// or the beginning if 'start' is -1. -long wxListCtrl::FindItem(long start, const wxString& str, bool partial) -{ - // TODO - return FALSE; -} - -// Find an item whose data matches this data, starting from the item after 'start' -// or the beginning if 'start' is -1. -long wxListCtrl::FindItem(long start, long data) -{ - // TODO - return 0; -} - -// Find an item nearest this position in the specified direction, starting from -// the item after 'start' or the beginning if 'start' is -1. -long wxListCtrl::FindItem(long start, const wxPoint& pt, int direction) -{ - // TODO - return 0; -} - -// Determines which item (if any) is at the specified point, -// giving details in 'flags' (see wxLIST_HITTEST_... flags above) -long wxListCtrl::HitTest(const wxPoint& point, int& flags) -{ - // TODO - return 0; -} - -// Inserts an item, returning the index of the new item if successful, -// -1 otherwise. -long wxListCtrl::InsertItem(wxListItem& info) -{ - // TODO - return 0; -} - -long wxListCtrl::InsertItem(long index, const wxString& label) -{ - wxListItem info; - info.m_text = label; - info.m_mask = wxLIST_MASK_TEXT; - info.m_itemId = index; - return InsertItem(info); -} - -// Inserts an image item -long wxListCtrl::InsertItem(long index, int imageIndex) -{ - wxListItem info; - info.m_image = imageIndex; - info.m_mask = wxLIST_MASK_IMAGE; - info.m_itemId = index; - return InsertItem(info); -} - -// Inserts an image/string item -long wxListCtrl::InsertItem(long index, const wxString& label, int imageIndex) -{ - wxListItem info; - info.m_image = imageIndex; - info.m_text = label; - info.m_mask = wxLIST_MASK_IMAGE | wxLIST_MASK_TEXT; - info.m_itemId = index; - return InsertItem(info); -} - -// For list view mode (only), inserts a column. -long wxListCtrl::InsertColumn(long col, wxListItem& item) -{ - // TODO - return 0; -} - -long wxListCtrl::InsertColumn(long col, const wxString& heading, int format, - int width) -{ - wxListItem item; - item.m_mask = wxLIST_MASK_TEXT | wxLIST_MASK_FORMAT; - item.m_text = heading; - if ( width > -1 ) - { - item.m_mask |= wxLIST_MASK_WIDTH; - item.m_width = width; - } - item.m_format = format; - - return InsertColumn(col, item); -} - -// Scrolls the list control. If in icon, small icon or report view mode, -// x specifies the number of pixels to scroll. If in list view mode, x -// specifies the number of columns to scroll. -// If in icon, small icon or list view mode, y specifies the number of pixels -// to scroll. If in report view mode, y specifies the number of lines to scroll. -bool wxListCtrl::ScrollList(int dx, int dy) -{ - // TODO - return FALSE; -} - -// Sort items. - -// fn is a function which takes 3 long arguments: item1, item2, data. -// item1 is the long data associated with a first item (NOT the index). -// item2 is the long data associated with a second item (NOT the index). -// data is the same value as passed to SortItems. -// The return value is a negative number if the first item should precede the second -// item, a positive number of the second item should precede the first, -// or zero if the two items are equivalent. - -// data is arbitrary data to be passed to the sort function. -bool wxListCtrl::SortItems(wxListCtrlCompare fn, long data) -{ - // TODO - return FALSE; -} - -// List item structure -wxListItem::wxListItem() -{ - m_mask = 0; - m_itemId = 0; - m_col = 0; - m_state = 0; - m_stateMask = 0; - m_image = 0; - m_data = 0; - - m_format = wxLIST_FORMAT_CENTRE; - m_width = 0; -} - -// List event -IMPLEMENT_DYNAMIC_CLASS(wxListEvent, wxCommandEvent) - -wxListEvent::wxListEvent(wxEventType commandType, int id): - wxCommandEvent(commandType, id) -{ - m_code = 0; - m_itemIndex = 0; - m_col = 0; - m_cancelled = FALSE; -} - diff --git a/src/stubs/main.cpp b/src/stubs/main.cpp deleted file mode 100644 index 47a9924bae..0000000000 --- a/src/stubs/main.cpp +++ /dev/null @@ -1,18 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: main.cpp -// Purpose: Entry point -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#include "wx/app.h" - -int main(int argc, char* argv[]) -{ - return wxEntry(argc, argv); -} - diff --git a/src/stubs/makefile.nt b/src/stubs/makefile.nt deleted file mode 100644 index 2865fbcec3..0000000000 --- a/src/stubs/makefile.nt +++ /dev/null @@ -1,955 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1997 -# Updated: -# Copyright: (c) 1997, Julian Smart -# -# "%W% %G%" -# -# Makefile : Builds wxWindows stubs library wxstubs.lib for VC++ (32-bit) -# Arguments: -# -# FINAL=1 argument to nmake to build version with no debugging info. -# - -!include - -APPVER=3.50 # 4.0 -# This means 'enable Windows 95 features' (in wxWindows and in VC++ 4.0). -WINVERSION=-DWINVER=0x0400 - -# On Alpha machines, change to CPU=ALPHA -CPU=i386 - -# Suffixes -OBJSUFF=obj -SRCSUFF=cpp - -WINFLAGS=-c -W3 -Dtry=__try -Dexcept=__except -Dleave=__leave -Dfinally=__finally -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -D_X86_=1 $(WINVERSION) -D__WIN32__ -D__WINDOWS__ -WINLINKFLAGS=/INCREMENTAL:NO /NOLOGO -align:0x1000 -machine:$(CPU) -subsystem:windows,$(APPVER) -WINLIBS=kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib oldnames.lib\ - comctl32.lib ctl3d32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib # libci.lib # libci.lib required for VC++ 4.2 - -# Change this to your WXWIN directory -WXDIR=$(WXWIN) - -WXSRC=$(WXDIR)\src\stubs -WXINC=$(WXDIR)\include -WXBASESRC=$(WXDIR)\src\common - -WXLIB=$(WXDIR)\lib\wxstubs.lib - -EXTRADLLFLAGS= - -INC=-I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(EXTRAINC) -LIBS = $(EXTRALIBS) $(WXLIB) $(WINLIBS) - -!ifndef FINAL -FINAL=0 -DEBUG=1 -!endif - -# Set this to 1 if you don't want to use precompiled headers -NOPCH=1 - -OPTIONS= - -!if "$(FINAL)" == "0" -OPT = /Od /Gy -# ***N.B.*** to save space/time, comment out /FR to avoid browse info (.sbr files) being generated -DEBUG_FLAGS= /Zi # /FR -LINK_DEBUG_FLAGS=-debug:full -debugtype:cv # /PDB:NONE -CRTFLAG=/MD -!else -# /O1 - smallest code -# /O2 - fastest code -OPT = /O1 # /O2 # /Od -DEBUG_FLAGS= -LINK_DEBUG_FLAGS=/RELEASE -CRTFLAG=/MD -!endif - -PCH= -PRECOMP= -MAKEPRECOMP= - -CPPFLAGS=$(WINFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) /D__WXSTUBS__ /DDEBUG=1 $(INC) $(OPT) $(CRTFLAG) /GX /D__WXDEBUG__ /DWXDEBUG=1 -# If you don't include wxprec.h, use CPPFLAGS2 -CPPFLAGS2=$(WINFLAGS) $(DEBUG_FLAGS) /D__WXSTUBS__ /DDEBUG=1 $(INC) $(EXTRAFLAGS) $(OPT) $(CRTFLAG) /GX /D__WXDEBUG__ /DWXDEBUG=1 -LINKFLAGS=$(LINK_DEBUG_FLAGS) $(WINLINKFLAGS) -entry:WinMainCRTStartup - -THISDIR=$(WXWIN)\src\stubs - -LIBTARGET=$(WXLIB) - -# Please set these according to the settings in wx_setup.h, so we can include -# the appropriate libraries in wx.lib - -PERIPH_LIBS= -PERIPH_TARGET= -PERIPH_CLEAN_TARGET= - -GENDIR=..\generic -COMMDIR=..\common -STUBSDIR=. - -DOCDIR = $(WXDIR)\docs - -GENERICOBJS= \ - $(GENDIR)\choicdgg.obj \ - $(GENDIR)\colrdlgg.obj \ - $(GENDIR)\fontdlgg.obj \ - $(GENDIR)\gridg.obj \ - $(GENDIR)\msgdlgg.obj \ - $(GENDIR)\panelg.obj \ - $(GENDIR)\printps.obj \ - $(GENDIR)\prntdlgg.obj \ - $(GENDIR)\scrolwin.obj \ - $(GENDIR)\splitter.obj \ - $(GENDIR)\statusbr.obj \ - $(GENDIR)\tabg.obj \ - $(GENDIR)\textdlgg.obj - -# $(GENDIR)\helpxlp.obj \ - -COMMONOBJS = \ - $(COMMDIR)\cmndata.obj \ - $(COMMDIR)\config.obj \ - $(COMMDIR)\docview.obj \ - $(COMMDIR)\docmdi.obj \ - $(COMMDIR)\dynarray.obj \ - $(COMMDIR)\event.obj \ - $(COMMDIR)\file.obj \ - $(COMMDIR)\filefn.obj \ - $(COMMDIR)\fileconf.obj \ - $(COMMDIR)\framecmn.obj \ - $(COMMDIR)\gdicmn.obj \ - $(COMMDIR)\intl.obj \ - $(COMMDIR)\ipcbase.obj \ - $(COMMDIR)\helpbase.obj \ - $(COMMDIR)\layout.obj \ - $(COMMDIR)\log.obj \ - $(COMMDIR)\memory.obj \ - $(COMMDIR)\module.obj \ - $(COMMDIR)\object.obj \ - $(COMMDIR)\postscrp.obj \ - $(COMMDIR)\prntbase.obj \ - $(COMMDIR)\resource.obj \ - $(COMMDIR)\tbarbase.obj \ - $(COMMDIR)\tbarsmpl.obj \ - $(COMMDIR)\textfile.obj \ - $(COMMDIR)\timercmn.obj \ - $(COMMDIR)\utilscmn.obj \ - $(COMMDIR)\validate.obj \ - $(COMMDIR)\valtext.obj \ - $(COMMDIR)\date.obj \ - $(COMMDIR)\hash.obj \ - $(COMMDIR)\list.obj \ - $(COMMDIR)\string.obj \ - $(COMMDIR)\time.obj \ - $(COMMDIR)\wxexpr.obj \ - $(COMMDIR)\y_tab.obj \ - $(COMMDIR)\extended.obj \ - $(COMMDIR)\process.obj \ - $(COMMDIR)\fstream.obj \ - $(COMMDIR)\mstream.obj \ - $(COMMDIR)\zstream.obj \ - $(COMMDIR)\stream.obj \ - $(COMMDIR)\datstrm.obj \ - $(COMMDIR)\wincmn.obj - -# $(COMMDIR)\odbc.obj \ - -STUBSOBJS = \ - $(STUBSDIR)\accel.obj \ - $(STUBSDIR)\app.obj \ - $(STUBSDIR)\bitmap.obj \ - $(STUBSDIR)\bmpbuttn.obj \ - $(STUBSDIR)\brush.obj \ - $(STUBSDIR)\button.obj \ - $(STUBSDIR)\checkbox.obj \ - $(STUBSDIR)\checklst.obj \ - $(STUBSDIR)\choice.obj \ - $(STUBSDIR)\clipbrd.obj \ - $(STUBSDIR)\colordlg.obj \ - $(STUBSDIR)\colour.obj \ - $(STUBSDIR)\combobox.obj \ - $(STUBSDIR)\control.obj \ - $(STUBSDIR)\cursor.obj \ - $(STUBSDIR)\data.obj \ - $(STUBSDIR)\dc.obj \ - $(STUBSDIR)\dcmemory.obj \ - $(STUBSDIR)\dcclient.obj \ - $(STUBSDIR)\dcscreen.obj \ - $(STUBSDIR)\dialog.obj \ - $(STUBSDIR)\dirdlg.obj \ - $(STUBSDIR)\filedlg.obj \ - $(STUBSDIR)\font.obj \ - $(STUBSDIR)\fontdlg.obj \ - $(STUBSDIR)\frame.obj \ - $(STUBSDIR)\gauge.obj \ - $(STUBSDIR)\gdiobj.obj \ - $(STUBSDIR)\helpxxxx.obj \ - $(STUBSDIR)\icon.obj \ - $(STUBSDIR)\imaglist.obj \ - $(STUBSDIR)\joystick.obj \ - $(STUBSDIR)\listbox.obj \ - $(STUBSDIR)\listctrl.obj \ - $(STUBSDIR)\main.obj \ - $(STUBSDIR)\mdi.obj \ - $(STUBSDIR)\menu.obj \ - $(STUBSDIR)\menuitem.obj \ - $(STUBSDIR)\metafile.obj \ - $(STUBSDIR)\minifram.obj \ - $(STUBSDIR)\msgdlg.obj \ - $(STUBSDIR)\notebook.obj \ - $(STUBSDIR)\palette.obj \ - $(STUBSDIR)\pen.obj \ - $(STUBSDIR)\printdlg.obj \ - $(STUBSDIR)\print.obj \ - $(STUBSDIR)\radiobox.obj \ - $(STUBSDIR)\radiobut.obj \ - $(STUBSDIR)\region.obj \ - $(STUBSDIR)\scrolbar.obj \ - $(STUBSDIR)\settings.obj \ - $(STUBSDIR)\slider.obj \ - $(STUBSDIR)\spinbutt.obj \ - $(STUBSDIR)\statbmp.obj \ - $(STUBSDIR)\statbox.obj \ - $(STUBSDIR)\statusbr.obj \ - $(STUBSDIR)\stattext.obj \ - $(STUBSDIR)\tabctrl.obj \ - $(STUBSDIR)\taskbar.obj \ - $(STUBSDIR)\toolbar.obj \ - $(STUBSDIR)\textctrl.obj \ - $(STUBSDIR)\thread.obj \ - $(STUBSDIR)\timer.obj \ - $(STUBSDIR)\treectrl.obj \ - $(STUBSDIR)\utils.obj \ - $(STUBSDIR)\utilsexc.obj \ - $(STUBSDIR)\wave.obj \ - $(STUBSDIR)\window.obj - - -OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(STUBSOBJS) - -# Normal, static library -all: $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET) - -$(WXDIR)\lib\wxstubs.lib: $(OBJECTS) $(PERIPH_LIBS) - -erase $(LIBTARGET) - $(implib) @<< --out:$@ --machine:$(CPU) -$(OBJECTS) $(PERIPH_LIBS) -<< - -######################################################## -# Windows-specific objects - -$(STUBSDIR)/accel.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/app.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/bitmap.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/bmpbuttn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/brush.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/button.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/choice.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/checkbox.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/checklst.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/clipbrd.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/colordlg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/colour.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/combobox.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/control.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/cursor.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/data.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/dc.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/dcmemory.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/dcclient.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/dcprint.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/dcscreen.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/dialog.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/dirdlg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/filedlg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/font.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/fontdlg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/frame.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/gauge.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/gdiobj.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/icon.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/imaglist.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/joystick.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/listbox.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(STUBSDIR)/listctrl.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - -$(STUBSDIR)/main.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/mdi.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/menu.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/menuitem.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/metafile.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/minifram.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/msgdlg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/notebook.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/palette.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/pen.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/printdlg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/print.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/radiobox.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/radiobut.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/region.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/scrolbar.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/settings.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/slider.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/spinbutt.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/statbmp.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/statbox.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/statusbr.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/stattext.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/tabctrl.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/taskbar.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/toolbar.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/textctrl.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/thread.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/timer.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/treectrl.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/utils.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/utilsexc.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/wave.obj: $*.$(SRCSUFF) - echo $(CPPFLAGS) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(STUBSDIR)/window.obj: $*.$(SRCSUFF) - echo $(CPPFLAGS) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -######################################################## -# Common objects (always compiled) - -$(COMMDIR)/cmndata.obj: $*.$(SRCSUFF) - echo $(CPPFLAGS) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/config.obj: $*.$(SRCSUFF) - echo $(CPPFLAGS) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/db.obj: $*.$(SRCSUFF) - echo $(CPPFLAGS) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/dbtable.obj: $*.$(SRCSUFF) - echo $(CPPFLAGS) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/docview.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/docmdi.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/dynarray.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/event.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/file.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/fileconf.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/filefn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/framecmn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/gdicmn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/intl.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/ipcbase.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/helpbase.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/layout.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/log.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/memory.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/module.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/object.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/odbc.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/postscrp.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/prntbase.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/resource.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/tbarbase.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/tbarsmpl.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/textfile.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/timercmn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/utilscmn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/validate.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/valtext.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/date.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/wxexpr.obj: $*.$(SRCSUFF) - echo $(CPPFLAGS) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/hash.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/list.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/string.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/matrix.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -#$(COMMDIR)/wxstrgnu/wxstrgnu.obj: $*.$(SRCSUFF) -# cl @<< -#$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF) /Fo$@ -#<< - -#$(COMMDIR)/wxstrgnu/wxregex.obj: $*.$(SRCSUFF) -# cl @<< -#$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF) /Fo$@ -#<< - -$(COMMDIR)/time.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)\stream.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)\fstream.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)\mstream.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)\zstream.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)\datstrm.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/extended.obj: $*.c - cl @<< -$(CPPFLAGS2) /c /Tp $*.c /Fo$@ -<< - -$(COMMDIR)/process.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/wincmn.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(COMMDIR)/y_tab.obj: $*.c $(COMMDIR)/lex_yy.c - cl @<< -$(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@ -<< - -$(COMMDIR)/y_tab.c: $(COMMDIR)/dosyacc.c - copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c - -$(COMMDIR)/lex_yy.c: $(COMMDIR)/doslex.c - copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c - -######################################################## -# Generic objects (not always compiled, depending on -# whether platforms have native implementations) - -$(GENDIR)/choicdgg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/colrdlgg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/fontdlgg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/gridg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/helpxlp.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/msgdlgg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/panelg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/printps.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/prntdlgg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/scrolwin.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/splitter.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/statusbr.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/tabg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(GENDIR)/textdlgg.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ -<< - -$(OBJECTS): $(WXDIR)/include/wx/stubs/setup.h - -clean: $(PERIPH_CLEAN_TARGET) - -erase *.obj - -erase $(LIBTARGET) - -erase $(WXDIR)\lib\*.pdb - -erase *.pdb - -erase *.sbr - -erase *.pch - cd $(WXDIR)\src\stubs - cd $(GENDIR) - -erase *.pdb - -erase *.sbr - -erase *.obj - cd $(WXDIR)\src\stubs - cd $(COMMDIR) - -erase *.pdb - -erase *.sbr - -erase *.obj - -erase y_tab.c - -erase lex_yy.c - cd $(WXDIR)\src\stubs - -cleanall: clean - diff --git a/src/stubs/mdi.cpp b/src/stubs/mdi.cpp deleted file mode 100644 index 95e05263a0..0000000000 --- a/src/stubs/mdi.cpp +++ /dev/null @@ -1,265 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: mdi.cpp -// Purpose: MDI classes -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "mdi.h" -#endif - -#include "wx/mdi.h" -#include "wx/menu.h" -#include "wx/settings.h" - -extern wxList wxModelessWindows; - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame, wxFrame) -IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame, wxFrame) -IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxWindow) - -BEGIN_EVENT_TABLE(wxMDIParentFrame, wxFrame) - EVT_SIZE(wxMDIParentFrame::OnSize) - EVT_ACTIVATE(wxMDIParentFrame::OnActivate) - EVT_SYS_COLOUR_CHANGED(wxMDIParentFrame::OnSysColourChanged) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxMDIClientWindow, wxWindow) - EVT_SCROLL(wxMDIClientWindow::OnScroll) -END_EVENT_TABLE() - -#endif - -// Parent frame - -wxMDIParentFrame::wxMDIParentFrame() -{ -} - -bool wxMDIParentFrame::Create(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - if (!parent) - wxTopLevelWindows.Append(this); - - SetName(name); - m_windowStyle = style; - - if (parent) parent->AddChild(this); - - if ( id > -1 ) - m_windowId = id; - else - m_windowId = (int)NewControlId(); - - // TODO: create MDI parent frame - - wxModelessWindows.Append(this); - - return TRUE; -} - -wxMDIParentFrame::~wxMDIParentFrame() -{ -} - -// Get size *available for subwindows* i.e. excluding menu bar. -void wxMDIParentFrame::GetClientSize(int *x, int *y) const -{ - // TODO -} - -void wxMDIParentFrame::SetMenuBar(wxMenuBar *menu_bar) -{ - // TODO - if (!menu_bar) - { - m_frameMenuBar = NULL; - return; - } - - if (menu_bar->m_menuBarFrame) - return; - - m_frameMenuBar = menu_bar; -} - -void wxMDIParentFrame::OnSize(wxSizeEvent& event) -{ -#if USE_CONSTRAINTS - if (GetAutoLayout()) - Layout(); -#endif - int x = 0; - int y = 0; - int width, height; - GetClientSize(&width, &height); - - if ( GetClientWindow() ) - GetClientWindow()->SetSize(x, y, width, height); -} - -void wxMDIParentFrame::OnActivate(wxActivateEvent& event) -{ - // Do nothing -} - -// Returns the active MDI child window -wxMDIChildFrame *wxMDIParentFrame::GetActiveChild() const -{ - // TODO - return NULL; -} - -// Create the client window class (don't Create the window, -// just return a new class) -wxMDIClientWindow *wxMDIParentFrame::OnCreateClient() -{ - return new wxMDIClientWindow ; -} - -// Responds to colour changes, and passes event on to children. -void wxMDIParentFrame::OnSysColourChanged(wxSysColourChangedEvent& event) -{ - // TODO - - // Propagate the event to the non-top-level children - wxFrame::OnSysColourChanged(event); -} - -// MDI operations -void wxMDIParentFrame::Cascade() -{ - // TODO -} - -void wxMDIParentFrame::Tile() -{ - // TODO -} - -void wxMDIParentFrame::ArrangeIcons() -{ - // TODO -} - -void wxMDIParentFrame::ActivateNext() -{ - // TODO -} - -void wxMDIParentFrame::ActivatePrevious() -{ - // TODO -} - -// Child frame - -wxMDIChildFrame::wxMDIChildFrame() -{ -} - -bool wxMDIChildFrame::Create(wxMDIParentFrame *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - SetName(name); - - if ( id > -1 ) - m_windowId = id; - else - m_windowId = (int)NewControlId(); - - if (parent) parent->AddChild(this); - - // TODO: create child frame - - wxModelessWindows.Append(this); - return FALSE; -} - -wxMDIChildFrame::~wxMDIChildFrame() -{ -} - -// Set the client size (i.e. leave the calculation of borders etc. -// to wxWindows) -void wxMDIChildFrame::SetClientSize(int width, int height) -{ - // TODO -} - -void wxMDIChildFrame::GetPosition(int *x, int *y) const -{ - // TODO -} - -void wxMDIChildFrame::SetMenuBar(wxMenuBar *menu_bar) -{ - // TODO - if (!menu_bar) - { - m_frameMenuBar = NULL; - return; - } - - if (menu_bar->m_menuBarFrame) - return; - m_frameMenuBar = menu_bar; -} - -// MDI operations -void wxMDIChildFrame::Maximize() -{ - // TODO -} - -void wxMDIChildFrame::Restore() -{ - // TODO -} - -void wxMDIChildFrame::Activate() -{ - // TODO -} - -// Client window - -wxMDIClientWindow::wxMDIClientWindow() -{ -} - -wxMDIClientWindow::~wxMDIClientWindow() -{ -} - -bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style) -{ - // TODO create client window - m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE); - - return FALSE; -} - -// Explicitly call default scroll behaviour -void wxMDIClientWindow::OnScroll(wxScrollEvent& event) -{ - Default(); // Default processing -} - diff --git a/src/stubs/menu.cpp b/src/stubs/menu.cpp deleted file mode 100644 index be4e10eba7..0000000000 --- a/src/stubs/menu.cpp +++ /dev/null @@ -1,570 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: menu.cpp -// Purpose: wxMenu, wxMenuBar, wxMenuItem -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - - -// ============================================================================ -// headers & declarations -// ============================================================================ - -// wxWindows headers -// ----------------- - -#ifdef __GNUG__ -#pragma implementation "menu.h" -#pragma implementation "menuitem.h" -#endif - -#include "wx/menu.h" -#include "wx/menuitem.h" -#include "wx/log.h" -#include "wx/utils.h" - -// other standard headers -// ---------------------- -#include - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxMenu, wxEvtHandler) -IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxEvtHandler) -#endif - -// ============================================================================ -// implementation -// ============================================================================ - -// Menus - -// Construct a menu with optional title (then use append) -wxMenu::wxMenu(const wxString& title, const wxFunction func) -{ - m_title = title; - m_parent = NULL; - m_eventHandler = this; - m_noItems = 0; - m_menuBar = NULL; - if (m_title != "") - { - Append(-2, m_title) ; - AppendSeparator() ; - } - - Callback(func); - - // TODO create menu -} - -// The wxWindow destructor will take care of deleting the submenus. -wxMenu::~wxMenu() -{ - // TODO destroy menu and children - - wxNode *node = m_menuItems.First(); - while (node) - { - wxMenuItem *item = (wxMenuItem *)node->Data(); - - // Delete child menus. - // Beware: they must not be appended to children list!!! - // (because order of delete is significant) - if (item->GetSubMenu()) - item->DeleteSubMenu(); - - wxNode *next = node->Next(); - delete item; - delete node; - node = next; - } -} - -void wxMenu::Break() -{ - // TODO -} - -// function appends a new item or submenu to the menu -void wxMenu::Append(wxMenuItem *pItem) -{ - // TODO - - wxCHECK_RET( pItem != NULL, "can't append NULL item to the menu" ); - - m_menuItems.Append(pItem); - - m_noItems++; -} - -void wxMenu::AppendSeparator() -{ - // TODO - Append(new wxMenuItem(this, ID_SEPARATOR)); -} - -// Pullright item -void wxMenu::Append(int Id, const wxString& label, wxMenu *SubMenu, - const wxString& helpString) -{ - Append(new wxMenuItem(this, Id, label, helpString, FALSE, SubMenu)); -} - -// Ordinary menu item -void wxMenu::Append(int Id, const wxString& label, - const wxString& helpString, bool checkable) -{ - // 'checkable' parameter is useless for Windows. - Append(new wxMenuItem(this, Id, label, helpString, checkable)); -} - -void wxMenu::Delete(int id) -{ - wxNode *node; - wxMenuItem *item; - int pos; - - for (pos = 0, node = m_menuItems.First(); node; node = node->Next(), pos++) { - item = (wxMenuItem *)node->Data(); - if (item->GetId() == id) - break; - } - - if (!node) - return; - - m_menuItems.DeleteNode(node); - delete item; - - // TODO -} - -void wxMenu::Enable(int Id, bool Flag) -{ - wxMenuItem *item = FindItemForId(Id); - wxCHECK_RET( item != NULL, "can't enable non-existing menu item" ); - - item->Enable(Flag); -} - -bool wxMenu::Enabled(int Id) const -{ - wxMenuItem *item = FindItemForId(Id); - wxCHECK( item != NULL, FALSE ); - - return item->IsEnabled(); -} - -void wxMenu::Check(int Id, bool Flag) -{ - wxMenuItem *item = FindItemForId(Id); - wxCHECK_RET( item != NULL, "can't get status of non-existing menu item" ); - - item->Check(Flag); -} - -bool wxMenu::Checked(int Id) const -{ - wxMenuItem *item = FindItemForId(Id); - wxCHECK( item != NULL, FALSE ); - - return item->IsChecked(); -} - -void wxMenu::SetTitle(const wxString& label) -{ - m_title = label ; - // TODO -} - -const wxString wxMenu::GetTitle() const -{ - return m_title; -} - -void wxMenu::SetLabel(int id, const wxString& label) -{ - wxMenuItem *item = FindItemForId(id) ; - if (item==NULL) - return; - - if (item->GetSubMenu()==NULL) - { - // TODO - } - else - { - // TODO - } - item->SetName(label); -} - -wxString wxMenu::GetLabel(int Id) const -{ - // TODO - return wxString("") ; -} - -// Finds the item id matching the given string, -1 if not found. -int wxMenu::FindItem (const wxString& itemString) const -{ - char buf1[200]; - char buf2[200]; - wxStripMenuCodes ((char *)(const char *)itemString, buf1); - - for (wxNode * node = m_menuItems.First (); node; node = node->Next ()) - { - wxMenuItem *item = (wxMenuItem *) node->Data (); - if (item->GetSubMenu()) - { - int ans = item->GetSubMenu()->FindItem(itemString); - if (ans > -1) - return ans; - } - if ( !item->IsSeparator() ) - { - wxStripMenuCodes((char *)item->GetName().c_str(), buf2); - if (strcmp(buf1, buf2) == 0) - return item->GetId(); - } - } - - return -1; -} - -wxMenuItem *wxMenu::FindItemForId(int itemId, wxMenu ** itemMenu) const -{ - if (itemMenu) - *itemMenu = NULL; - for (wxNode * node = m_menuItems.First (); node; node = node->Next ()) - { - wxMenuItem *item = (wxMenuItem *) node->Data (); - - if (item->GetId() == itemId) - { - if (itemMenu) - *itemMenu = (wxMenu *) this; - return item; - } - - if (item->GetSubMenu()) - { - wxMenuItem *ans = item->GetSubMenu()->FindItemForId (itemId, itemMenu); - if (ans) - return ans; - } - } - - if (itemMenu) - *itemMenu = NULL; - return NULL; -} - -void wxMenu::SetHelpString(int itemId, const wxString& helpString) -{ - wxMenuItem *item = FindItemForId (itemId); - if (item) - item->SetHelp(helpString); -} - -wxString wxMenu::GetHelpString (int itemId) const -{ - wxMenuItem *item = FindItemForId (itemId); - wxString str(""); - return (item == NULL) ? str : item->GetHelp(); -} - -void wxMenu::ProcessCommand(wxCommandEvent & event) -{ - bool processed = FALSE; - - // Try a callback - if (m_callback) - { - (void) (*(m_callback)) (*this, event); - processed = TRUE; - } - - // Try the menu's event handler - if ( !processed && GetEventHandler()) - { - processed = GetEventHandler()->ProcessEvent(event); - } -/* TODO - // Try the window the menu was popped up from (and up - // through the hierarchy) - if ( !processed && GetInvokingWindow()) - processed = GetInvokingWindow()->ProcessEvent(event); -*/ -} - -bool wxWindow::PopupMenu(wxMenu *menu, int x, int y) -{ - // TODO - return FALSE; -} - -// Menu Bar -wxMenuBar::wxMenuBar() -{ - m_eventHandler = this; - m_menuCount = 0; - m_menus = NULL; - m_titles = NULL; - m_menuBarFrame = NULL; - - // TODO -} - -wxMenuBar::wxMenuBar(int n, wxMenu *menus[], const wxString titles[]) -{ - m_eventHandler = this; - m_menuCount = n; - m_menus = menus; - m_titles = new wxString[n]; - int i; - for ( i = 0; i < n; i++ ) - m_titles[i] = titles[i]; - m_menuBarFrame = NULL; - - // TODO -} - -wxMenuBar::~wxMenuBar() -{ - int i; - for (i = 0; i < m_menuCount; i++) - { - delete m_menus[i]; - } - delete[] m_menus; - delete[] m_titles; - - // TODO -} - -// Must only be used AFTER menu has been attached to frame, -// otherwise use individual menus to enable/disable items -void wxMenuBar::Enable(int id, bool flag) -{ - wxMenu *itemMenu = NULL; - wxMenuItem *item = FindItemForId(id, &itemMenu) ; - if (!item) - return; - - // TODO -} - -void wxMenuBar::EnableTop(int pos, bool flag) -{ - // TODO -} - -// Must only be used AFTER menu has been attached to frame, -// otherwise use individual menus -void wxMenuBar::Check(int id, bool flag) -{ - wxMenu *itemMenu = NULL; - wxMenuItem *item = FindItemForId(id, &itemMenu) ; - if (!item) - return; - - if (!item->IsCheckable()) - return ; - - // TODO -} - -bool wxMenuBar::Checked(int id) const -{ - wxMenu *itemMenu = NULL; - wxMenuItem *item = FindItemForId(id, &itemMenu) ; - if (!item) - return FALSE; - - // TODO - return FALSE; -} - -bool wxMenuBar::Enabled(int id) const -{ - wxMenu *itemMenu = NULL; - wxMenuItem *item = FindItemForId(id, &itemMenu) ; - if (!item) - return FALSE; - - // TODO - return FALSE ; -} - - -void wxMenuBar::SetLabel(int id, const wxString& label) -{ - wxMenu *itemMenu = NULL; - wxMenuItem *item = FindItemForId(id, &itemMenu) ; - - if (!item) - return; - - // TODO -} - -wxString wxMenuBar::GetLabel(int id) const -{ - wxMenu *itemMenu = NULL; - wxMenuItem *item = FindItemForId(id, &itemMenu) ; - - if (!item) - return wxString(""); - - // TODO - return wxString("") ; -} - -void wxMenuBar::SetLabelTop(int pos, const wxString& label) -{ - // TODO -} - -wxString wxMenuBar::GetLabelTop(int pos) const -{ - // TODO - return wxString(""); -} - -bool wxMenuBar::OnDelete(wxMenu *a_menu, int pos) -{ - // TODO - return FALSE; -} - -bool wxMenuBar::OnAppend(wxMenu *a_menu, const char *title) -{ - // TODO - return FALSE; -} - -void wxMenuBar::Append (wxMenu * menu, const wxString& title) -{ - if (!OnAppend(menu, title)) - return; - - m_menuCount ++; - wxMenu **new_menus = new wxMenu *[m_menuCount]; - wxString *new_titles = new wxString[m_menuCount]; - int i; - - for (i = 0; i < m_menuCount - 1; i++) - { - new_menus[i] = m_menus[i]; - m_menus[i] = NULL; - new_titles[i] = m_titles[i]; - m_titles[i] = ""; - } - if (m_menus) - { - delete[]m_menus; - delete[]m_titles; - } - m_menus = new_menus; - m_titles = new_titles; - - m_menus[m_menuCount - 1] = (wxMenu *)menu; - m_titles[m_menuCount - 1] = title; - - // TODO -} - -void wxMenuBar::Delete(wxMenu * menu, int i) -{ - int j; - int ii = (int) i; - - if (menu != 0) - { - for (ii = 0; ii < m_menuCount; ii++) - { - if (m_menus[ii] == menu) - break; - } - if (ii >= m_menuCount) - return; - } else - { - if (ii < 0 || ii >= m_menuCount) - return; - menu = m_menus[ii]; - } - - if (!OnDelete(menu, ii)) - return; - - menu->SetParent(NULL); - - -- m_menuCount; - for (j = ii; j < m_menuCount; j++) - { - m_menus[j] = m_menus[j + 1]; - m_titles[j] = m_titles[j + 1]; - } -} - -// Find the menu menuString, item itemString, and return the item id. -// Returns -1 if none found. -int wxMenuBar::FindMenuItem (const wxString& menuString, const wxString& itemString) const -{ - char buf1[200]; - char buf2[200]; - wxStripMenuCodes ((char *)(const char *)menuString, buf1); - int i; - for (i = 0; i < m_menuCount; i++) - { - wxStripMenuCodes ((char *)(const char *)m_titles[i], buf2); - if (strcmp (buf1, buf2) == 0) - return m_menus[i]->FindItem (itemString); - } - return -1; -} - -wxMenuItem *wxMenuBar::FindItemForId (int Id, wxMenu ** itemMenu) const -{ - if (itemMenu) - *itemMenu = NULL; - - wxMenuItem *item = NULL; - int i; - for (i = 0; i < m_menuCount; i++) - if ((item = m_menus[i]->FindItemForId (Id, itemMenu))) - return item; - return NULL; -} - -void wxMenuBar::SetHelpString (int Id, const wxString& helpString) -{ - int i; - for (i = 0; i < m_menuCount; i++) - { - if (m_menus[i]->FindItemForId (Id)) - { - m_menus[i]->SetHelpString (Id, helpString); - return; - } - } -} - -wxString wxMenuBar::GetHelpString (int Id) const -{ - int i; - for (i = 0; i < m_menuCount; i++) - { - if (m_menus[i]->FindItemForId (Id)) - return wxString(m_menus[i]->GetHelpString (Id)); - } - return wxString(""); -} - - diff --git a/src/stubs/menuitem.cpp b/src/stubs/menuitem.cpp deleted file mode 100644 index bd2f876a38..0000000000 --- a/src/stubs/menuitem.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: menuitem.cpp -// Purpose: wxMenuItem implementation -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// headers & declarations -// ============================================================================ - -#include "wx/menu.h" -#include "wx/menuitem.h" - -// ============================================================================ -// implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// dynamic classes implementation -// ---------------------------------------------------------------------------- - -#if !USE_SHARED_LIBRARY - IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject) -#endif //USE_SHARED_LIBRARY - -// ---------------------------------------------------------------------------- -// wxMenuItem -// ---------------------------------------------------------------------------- - -// ctor & dtor -// ----------- - -wxMenuItem::wxMenuItem(wxMenu *pParentMenu, int id, - const wxString& strName, const wxString& strHelp, - bool bCheckable, - wxMenu *pSubMenu) : - m_bCheckable(bCheckable), - m_strName(strName), - m_strHelp(strHelp) -{ - wxASSERT( pParentMenu != NULL ); - - m_pParentMenu = pParentMenu; - m_pSubMenu = pSubMenu; - m_idItem = id; - m_bEnabled = TRUE; -} - -wxMenuItem::~wxMenuItem() -{ -} - -// misc -// ---- - -// delete the sub menu -void wxMenuItem::DeleteSubMenu() -{ - wxASSERT( m_pSubMenu != NULL ); - - delete m_pSubMenu; - m_pSubMenu = NULL; -} - -// change item state -// ----------------- - -void wxMenuItem::Enable(bool bDoEnable) -{ - if ( m_bEnabled != bDoEnable ) { - if ( m_pSubMenu == NULL ) { // normal menu item - // TODO - } - else // submenu - { - // TODO - } - - m_bEnabled = bDoEnable; - } -} - -void wxMenuItem::Check(bool bDoCheck) -{ - wxCHECK_RET( IsCheckable(), "only checkable items may be checked" ); - - if ( m_bChecked != bDoCheck ) { - // TODO - m_bChecked = bDoCheck; - } -} \ No newline at end of file diff --git a/src/stubs/metafile.cpp b/src/stubs/metafile.cpp deleted file mode 100644 index 251c855970..0000000000 --- a/src/stubs/metafile.cpp +++ /dev/null @@ -1,239 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: metafile.cpp -// Purpose: wxMetaFile, wxMetaFileDC etc. These classes are optional. -// Author: AUTHOR -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "metafile.h" -#endif - -#include "wx/object.h" -#include "wx/string.h" -#include "wx/dc.h" -#include "wx/stubs/metafile.h" -#include "wx/clipbrd.h" - -extern bool wxClipboardIsOpen; - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxMetaFile, wxObject) -IMPLEMENT_ABSTRACT_CLASS(wxMetaFileDC, wxDC) -#endif - -wxMetaFile::wxMetaFile(const wxString& file) -{ - // TODO -} - -wxMetaFile::~wxMetaFile() -{ - // TODO -} - -bool wxMetaFile::SetClipboard(int width, int height) -{ - bool alreadyOpen=wxClipboardOpen(); - if (!alreadyOpen) - { - wxOpenClipboard(); - if (!wxEmptyClipboard()) return FALSE; - } - bool success = wxSetClipboardData(wxDF_METAFILE,this, width,height); - if (!alreadyOpen) wxCloseClipboard(); - return (bool) success; -} - -bool wxMetaFile::Play(wxDC *dc) -{ - // TODO - return false; -} - -/* - * Metafile device context - * - */ - -// Original constructor that does not takes origin and extent. If you use this, -// *DO* give origin/extent arguments to wxMakeMetaFilePlaceable. -wxMetaFileDC::wxMetaFileDC(const wxString& file) -{ - // TODO -} - -// New constructor that takes origin and extent. If you use this, don't -// give origin/extent arguments to wxMakeMetaFilePlaceable. -wxMetaFileDC::wxMetaFileDC(const wxString& file, int xext, int yext, int xorg, int yorg) -{ - // TODO -} - -wxMetaFileDC::~wxMetaFileDC() -{ -} - -void wxMetaFileDC::GetTextExtent(const wxString& string, float *x, float *y, - float *descent, float *externalLeading, wxFont *theFont, bool use16bit) -{ - // TODO -} - -wxMetaFile *wxMetaFileDC::Close() -{ - // TODO - return NULL; -} - -void wxMetaFileDC::SetMapMode(int mode) -{ - // TODO -} - -#if 0 - -#ifdef __WIN32__ -struct RECT32 -{ - short left; - short top; - short right; - short bottom; -}; - -struct mfPLACEABLEHEADER { - DWORD key; - short hmf; - RECT32 bbox; - WORD inch; - DWORD reserved; - WORD checksum; -}; -#else -struct mfPLACEABLEHEADER { - DWORD key; - HANDLE hmf; - RECT bbox; - WORD inch; - DWORD reserved; - WORD checksum; -}; -#endif - -/* - * Pass filename of existing non-placeable metafile, and bounding box. - * Adds a placeable metafile header, sets the mapping mode to anisotropic, - * and sets the window origin and extent to mimic the MM_TEXT mapping mode. - * - */ - -bool wxMakeMetaFilePlaceable(const wxString& filename, float scale) -{ - return wxMakeMetaFilePlaceable(filename, 0, 0, 0, 0, scale, FALSE); -} - -bool wxMakeMetaFilePlaceable(const wxString& filename, int x1, int y1, int x2, int y2, float scale, bool useOriginAndExtent) -{ - // I'm not sure if this is the correct way of suggesting a scale - // to the client application, but it's the only way I can find. - int unitsPerInch = (int)(576/scale); - - mfPLACEABLEHEADER header; - header.key = 0x9AC6CDD7L; - header.hmf = 0; - header.bbox.left = (int)(x1); - header.bbox.top = (int)(y1); - header.bbox.right = (int)(x2); - header.bbox.bottom = (int)(y2); - header.inch = unitsPerInch; - header.reserved = 0; - - // Calculate checksum - WORD *p; - mfPLACEABLEHEADER *pMFHead = &header; - for (p =(WORD *)pMFHead,pMFHead -> checksum = 0; - p < (WORD *)&pMFHead ->checksum; ++p) - pMFHead ->checksum ^= *p; - - FILE *fd = fopen((char *)(const char *)filename, "rb"); - if (!fd) return FALSE; - - char tempFileBuf[256]; - wxGetTempFileName("mf", tempFileBuf); - FILE *fHandle = fopen(tempFileBuf, "wb"); - if (!fHandle) - return FALSE; - fwrite((void *)&header, sizeof(unsigned char), sizeof(mfPLACEABLEHEADER), fHandle); - - // Calculate origin and extent - int originX = x1; - int originY = y1; - int extentX = x2 - x1; - int extentY = (y2 - y1); - - // Read metafile header and write - METAHEADER metaHeader; - fread((void *)&metaHeader, sizeof(unsigned char), sizeof(metaHeader), fd); - - if (useOriginAndExtent) - metaHeader.mtSize += 15; - else - metaHeader.mtSize += 5; - - fwrite((void *)&metaHeader, sizeof(unsigned char), sizeof(metaHeader), fHandle); - - // Write SetMapMode, SetWindowOrigin and SetWindowExt records - char modeBuffer[8]; - char originBuffer[10]; - char extentBuffer[10]; - METARECORD *modeRecord = (METARECORD *)&modeBuffer; - - METARECORD *originRecord = (METARECORD *)&originBuffer; - METARECORD *extentRecord = (METARECORD *)&extentBuffer; - - modeRecord->rdSize = 4; - modeRecord->rdFunction = META_SETMAPMODE; - modeRecord->rdParm[0] = MM_ANISOTROPIC; - - originRecord->rdSize = 5; - originRecord->rdFunction = META_SETWINDOWORG; - originRecord->rdParm[0] = originY; - originRecord->rdParm[1] = originX; - - extentRecord->rdSize = 5; - extentRecord->rdFunction = META_SETWINDOWEXT; - extentRecord->rdParm[0] = extentY; - extentRecord->rdParm[1] = extentX; - - fwrite((void *)modeBuffer, sizeof(char), 8, fHandle); - - if (useOriginAndExtent) - { - fwrite((void *)originBuffer, sizeof(char), 10, fHandle); - fwrite((void *)extentBuffer, sizeof(char), 10, fHandle); - } - - int ch = -2; - while (ch != EOF) - { - ch = getc(fd); - if (ch != EOF) - { - putc(ch, fHandle); - } - } - fclose(fHandle); - fclose(fd); - wxRemoveFile(filename); - wxCopyFile(tempFileBuf, filename); - wxRemoveFile(tempFileBuf); - return TRUE; -} - -#endif - diff --git a/src/stubs/minifram.cpp b/src/stubs/minifram.cpp deleted file mode 100644 index 4f6f5e5fcb..0000000000 --- a/src/stubs/minifram.cpp +++ /dev/null @@ -1,22 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: minifram.cpp -// Purpose: wxMiniFrame. Optional; identical to wxFrame if not supported. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "minifram.h" -#endif - -#include "wx/minifram.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxMiniFrame, wxFrame) -#endif - - diff --git a/src/stubs/msgdlg.cpp b/src/stubs/msgdlg.cpp deleted file mode 100644 index aeaa9bac7a..0000000000 --- a/src/stubs/msgdlg.cpp +++ /dev/null @@ -1,36 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: msgdlg.cpp -// Purpose: wxMessageDialog -// Author: AUTHOR -// Modified by: -// Created: 04/01/98 -// RCS-ID: $$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "msgdlg.h" -#endif - -#include "wx/stubs/msgdlg.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_CLASS(wxMessageDialog, wxDialog) -#endif - -wxMessageDialog::wxMessageDialog(wxWindow *parent, const wxString& message, const wxString& caption, - long style, const wxPoint& pos) -{ - m_caption = caption; - m_message = message; - m_dialogStyle = style; - m_parent = parent; -} - -int wxMessageDialog::ShowModal() -{ - // TODO - return wxID_CANCEL; -} - diff --git a/src/stubs/notebook.cpp b/src/stubs/notebook.cpp deleted file mode 100644 index cd85a27ad7..0000000000 --- a/src/stubs/notebook.cpp +++ /dev/null @@ -1,367 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: notebook.cpp -// Purpose: implementation of wxNotebook -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- -#ifdef __GNUG__ -#pragma implementation "notebook.h" -#endif - -#include -#include -#include -#include - -// ---------------------------------------------------------------------------- -// macros -// ---------------------------------------------------------------------------- - -// check that the page index is valid -#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount())) - -// ---------------------------------------------------------------------------- -// event table -// ---------------------------------------------------------------------------- - -#if !USE_SHARED_LIBRARIES -BEGIN_EVENT_TABLE(wxNotebook, wxControl) - EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange) - - EVT_SIZE(wxNotebook::OnSize) - EVT_SET_FOCUS(wxNotebook::OnSetFocus) - EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey) -END_EVENT_TABLE() - -IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent) -#endif - -// ============================================================================ -// implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// wxNotebook construction -// ---------------------------------------------------------------------------- - -// common part of all ctors -void wxNotebook::Init() -{ - m_pImageList = NULL; - m_nSelection = -1; -} - -// default for dynamic class -wxNotebook::wxNotebook() -{ - Init(); -} - -// the same arguments as for wxControl -wxNotebook::wxNotebook(wxWindow *parent, - wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - Init(); - - Create(parent, id, pos, size, style, name); -} - -// Create() function -bool wxNotebook::Create(wxWindow *parent, - wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - // base init - SetName(name); - SetParent(parent); - - m_windowId = id == -1 ? NewControlId() : id; - - // style - m_windowStyle = style; - - if ( parent != NULL ) - parent->AddChild(this); - - // TODO - - return FALSE; -} - -// dtor -wxNotebook::~wxNotebook() -{ -} - -// ---------------------------------------------------------------------------- -// wxNotebook accessors -// ---------------------------------------------------------------------------- -int wxNotebook::GetPageCount() const -{ - return m_aPages.Count(); -} - -int wxNotebook::GetRowCount() const -{ - // TODO - return 0; -} - -int wxNotebook::SetSelection(int nPage) -{ - wxASSERT( IS_VALID_PAGE(nPage) ); - - ChangePage(m_nSelection, nPage); - - // TODO - return 0; -} - -void wxNotebook::AdvanceSelection(bool bForward) -{ - int nSel = GetSelection(); - int nMax = GetPageCount() - 1; - if ( bForward ) - SetSelection(nSel == nMax ? 0 : nSel + 1); - else - SetSelection(nSel == 0 ? nMax : nSel - 1); -} - -bool wxNotebook::SetPageText(int nPage, const wxString& strText) -{ - wxASSERT( IS_VALID_PAGE(nPage) ); - - // TODO - return FALSE; -} - -wxString wxNotebook::GetPageText(int nPage) const -{ - wxASSERT( IS_VALID_PAGE(nPage) ); - - // TODO - return wxString(""); -} - -int wxNotebook::GetPageImage(int nPage) const -{ - wxASSERT( IS_VALID_PAGE(nPage) ); - - // TODO - return 0; -} - -bool wxNotebook::SetPageImage(int nPage, int nImage) -{ - wxASSERT( IS_VALID_PAGE(nPage) ); - - // TODO - return FALSE; -} - -void wxNotebook::SetImageList(wxImageList* imageList) -{ - m_pImageList = imageList; - // TODO -} - -// ---------------------------------------------------------------------------- -// wxNotebook operations -// ---------------------------------------------------------------------------- - -// remove one page from the notebook -bool wxNotebook::DeletePage(int nPage) -{ - wxCHECK( IS_VALID_PAGE(nPage), FALSE ); - - // TODO: delete native widget page - - delete m_aPages[nPage]; - m_aPages.Remove(nPage); - - return TRUE; -} - -// remove all pages -bool wxNotebook::DeleteAllPages() -{ - // TODO: delete native widget pages - - int nPageCount = GetPageCount(); - int nPage; - for ( nPage = 0; nPage < nPageCount; nPage++ ) - delete m_aPages[nPage]; - - m_aPages.Clear(); - - return TRUE; -} - -// add a page to the notebook -bool wxNotebook::AddPage(wxNotebookPage *pPage, - const wxString& strText, - bool bSelect, - int imageId) -{ - return InsertPage(GetPageCount(), pPage, strText, bSelect, imageId); -} - -// same as AddPage() but does it at given position -bool wxNotebook::InsertPage(int nPage, - wxNotebookPage *pPage, - const wxString& strText, - bool bSelect, - int imageId) -{ - wxASSERT( pPage != NULL ); - wxCHECK( IS_VALID_PAGE(nPage) || nPage == GetPageCount(), FALSE ); - - // TODO: insert native widget page - - // save the pointer to the page - m_aPages.Insert(pPage, nPage); - - // some page must be selected: either this one or the first one if there is - // still no selection - if ( bSelect ) - m_nSelection = nPage; - else if ( m_nSelection == -1 ) - m_nSelection = 0; - - return TRUE; -} - -// ---------------------------------------------------------------------------- -// wxNotebook callbacks -// ---------------------------------------------------------------------------- - -// @@@ OnSize() is used for setting the font when it's called for the first -// time because doing it in ::Create() doesn't work (for unknown reasons) -void wxNotebook::OnSize(wxSizeEvent& event) -{ - static bool s_bFirstTime = TRUE; - if ( s_bFirstTime ) { - // TODO: any first-time-size processing. - s_bFirstTime = FALSE; - } - - // TODO: all this may or may not be necessary for your platform - - // emulate page change (it's esp. important to do it first time because - // otherwise our page would stay invisible) - int nSel = m_nSelection; - m_nSelection = -1; - SetSelection(nSel); - - // fit the notebook page to the tab control's display area - int w, h; - GetSize(&w, &h); - - uint nCount = m_aPages.Count(); - for ( uint nPage = 0; nPage < nCount; nPage++ ) { - wxNotebookPage *pPage = m_aPages[nPage]; - pPage->SetSize(0, 0, w, h); - if ( pPage->GetAutoLayout() ) - pPage->Layout(); - } - - // Processing continues to next OnSize - event.Skip(); -} - -void wxNotebook::OnSelChange(wxNotebookEvent& event) -{ - // is it our tab control? - if ( event.GetEventObject() == this ) - ChangePage(event.GetOldSelection(), event.GetSelection()); - - // we want to give others a chance to process this message as well - event.Skip(); -} - -void wxNotebook::OnSetFocus(wxFocusEvent& event) -{ - // set focus to the currently selected page if any - if ( m_nSelection != -1 ) - m_aPages[m_nSelection]->SetFocus(); - - event.Skip(); -} - -void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event) -{ - if ( event.IsWindowChange() ) { - // change pages - AdvanceSelection(event.GetDirection()); - } - else { - // pass to the parent - if ( GetParent() ) { - event.SetCurrentFocus(this); - GetParent()->ProcessEvent(event); - } - } -} - -// ---------------------------------------------------------------------------- -// wxNotebook base class virtuals -// ---------------------------------------------------------------------------- - -// override these 2 functions to do nothing: everything is done in OnSize - -void wxNotebook::SetConstraintSizes(bool /* recurse */) -{ - // don't set the sizes of the pages - their correct size is not yet known - wxControl::SetConstraintSizes(FALSE); -} - -bool wxNotebook::DoPhase(int /* nPhase */) -{ - return TRUE; -} - -void wxNotebook::Command(wxCommandEvent& event) -{ - wxFAIL_MSG("wxNotebook::Command not implemented"); -} - -// ---------------------------------------------------------------------------- -// wxNotebook helper functions -// ---------------------------------------------------------------------------- - -// hide the currently active panel and show the new one -void wxNotebook::ChangePage(int nOldSel, int nSel) -{ - wxASSERT( nOldSel != nSel ); // impossible - - if ( nOldSel != -1 ) { - m_aPages[nOldSel]->Show(FALSE); - } - - wxNotebookPage *pPage = m_aPages[nSel]; - pPage->Show(TRUE); - pPage->SetFocus(); - - m_nSelection = nSel; -} - diff --git a/src/stubs/palette.cpp b/src/stubs/palette.cpp deleted file mode 100644 index f8db96f8d0..0000000000 --- a/src/stubs/palette.cpp +++ /dev/null @@ -1,82 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: palette.cpp -// Purpose: wxPalette -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "palette.h" -#endif - -#include "wx/palette.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject) -#endif - -/* - * Palette - * - */ - -wxPaletteRefData::wxPaletteRefData() -{ - // TODO -} - -wxPaletteRefData::~wxPaletteRefData() -{ - // TODO -} - -wxPalette::wxPalette() -{ -} - -wxPalette::wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue) -{ - Create(n, red, green, blue); -} - -wxPalette::~wxPalette() -{ -} - -bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue) -{ - UnRef(); - - m_refData = new wxPaletteRefData; - - // TODO - - return FALSE; -} - -int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const -{ - if ( !m_refData ) - return FALSE; - - // TODO - return FALSE; -} - -bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsigned char *blue) const -{ - if ( !m_refData ) - return FALSE; - - if (index < 0 || index > 255) - return FALSE; - - // TODO - return FALSE; -} - - diff --git a/src/stubs/pen.cpp b/src/stubs/pen.cpp deleted file mode 100644 index d7b2ce264c..0000000000 --- a/src/stubs/pen.cpp +++ /dev/null @@ -1,229 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: pen.cpp -// Purpose: wxPen -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "pen.h" -#endif - -#include "wx/setup.h" -#include "wx/utils.h" -#include "wx/pen.h" - -#if !USE_SHARED_LIBRARIES -IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject) -#endif - -wxPenRefData::wxPenRefData() -{ - m_style = wxSOLID; - m_width = 1; - m_join = wxJOIN_ROUND ; - m_cap = wxCAP_ROUND ; - m_nbDash = 0 ; - m_dash = 0 ; -/* TODO: null data - m_hPen = 0; -*/ -} - -wxPenRefData::wxPenRefData(const wxPenRefData& data) -{ - m_style = data.m_style; - m_width = data.m_width; - m_join = data.m_join; - m_cap = data.m_cap; - m_nbDash = data.m_nbDash; - m_dash = data.m_dash; - m_colour = data.m_colour; -/* TODO: null data - m_hPen = 0; -*/ -} - -wxPenRefData::~wxPenRefData() -{ - // TODO: delete data -} - -// Pens - -wxPen::wxPen() -{ - if ( wxThePenList ) - wxThePenList->AddPen(this); -} - -wxPen::~wxPen() -{ - if (wxThePenList) - wxThePenList->RemovePen(this); -} - -// Should implement Create -wxPen::wxPen(const wxColour& col, int Width, int Style) -{ - m_refData = new wxPenRefData; - - M_PENDATA->m_colour = col; - M_PENDATA->m_width = Width; - M_PENDATA->m_style = Style; - M_PENDATA->m_join = wxJOIN_ROUND ; - M_PENDATA->m_cap = wxCAP_ROUND ; - M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; - - RealizeResource(); - - if ( wxThePenList ) - wxThePenList->AddPen(this); -} - -wxPen::wxPen(const wxBitmap& stipple, int Width) -{ - m_refData = new wxPenRefData; - - M_PENDATA->m_stipple = stipple; - M_PENDATA->m_width = Width; - M_PENDATA->m_style = wxSTIPPLE; - M_PENDATA->m_join = wxJOIN_ROUND ; - M_PENDATA->m_cap = wxCAP_ROUND ; - M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; - - RealizeResource(); - - if ( wxThePenList ) - wxThePenList->AddPen(this); -} - -wxPen::wxPen(const wxString& col, int Width, int Style) -{ - m_refData = new wxPenRefData; - - M_PENDATA->m_colour = col; - M_PENDATA->m_width = Width; - M_PENDATA->m_style = Style; - M_PENDATA->m_join = wxJOIN_ROUND ; - M_PENDATA->m_cap = wxCAP_ROUND ; - M_PENDATA->m_nbDash = 0 ; - M_PENDATA->m_dash = 0 ; - - RealizeResource(); - - if ( wxThePenList ) - wxThePenList->AddPen(this); -} - -void wxPen::Unshare() -{ - // Don't change shared data - if (!m_refData) - { - m_refData = new wxPenRefData(); - } - else - { - wxPenRefData* ref = new wxPenRefData(*(wxPenRefData*)m_refData); - UnRef(); - m_refData = ref; - } -} - -void wxPen::SetColour(const wxColour& col) -{ - Unshare(); - - M_PENDATA->m_colour = col; - - RealizeResource(); -} - -void wxPen::SetColour(const wxString& col) -{ - Unshare(); - - M_PENDATA->m_colour = col; - - RealizeResource(); -} - -void wxPen::SetColour(const unsigned char r, const unsigned char g, const unsigned char b) -{ - Unshare(); - - M_PENDATA->m_colour.Set(r, g, b); - - RealizeResource(); -} - -void wxPen::SetWidth(int Width) -{ - Unshare(); - - M_PENDATA->m_width = Width; - - RealizeResource(); -} - -void wxPen::SetStyle(int Style) -{ - Unshare(); - - M_PENDATA->m_style = Style; - - RealizeResource(); -} - -void wxPen::SetStipple(const wxBitmap& Stipple) -{ - Unshare(); - - M_PENDATA->m_stipple = Stipple; - M_PENDATA->m_style = wxSTIPPLE; - - RealizeResource(); -} - -void wxPen::SetDashes(int nb_dashes, const wxDash *Dash) -{ - Unshare(); - - M_PENDATA->m_nbDash = nb_dashes; - M_PENDATA->m_dash = (wxDash *)Dash; - - RealizeResource(); -} - -void wxPen::SetJoin(int Join) -{ - Unshare(); - - M_PENDATA->m_join = Join; - - RealizeResource(); -} - -void wxPen::SetCap(int Cap) -{ - Unshare(); - - M_PENDATA->m_cap = Cap; - - RealizeResource(); -} - -bool wxPen::RealizeResource() -{ - // TODO: create actual pen - return FALSE; -} - - diff --git a/src/stubs/print.cpp b/src/stubs/print.cpp deleted file mode 100644 index 1939136855..0000000000 --- a/src/stubs/print.cpp +++ /dev/null @@ -1,82 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: print.cpp -// Purpose: Print framework -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "print.h" -#endif - -#include "wx/stubs/print.h" -#include "wx/stubs/printdlg.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxPrinter, wxPrinterBase) -IMPLEMENT_CLASS(wxPrintPreview, wxPrintPreviewBase) -#endif - -/* - * Printer - */ - -wxPrinter::wxPrinter(wxPrintData *data): - wxPrinterBase(data) -{ -} - -wxPrinter::~wxPrinter() -{ -} - -bool wxPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt) -{ - // TODO. See wxPostScriptPrinter::Print for hints. - return FALSE; -} - -bool wxPrinter::PrintDialog(wxWindow *parent) -{ - wxPrintDialog dialog(parent, & printData); - return (dialog.ShowModal() == wxID_OK); -} - -bool wxPrinter::Setup(wxWindow *parent) -{ - wxPrintDialog dialog(parent, & printData); - dialog.GetPrintData().SetSetupDialog(TRUE); - return (dialog.ShowModal() == wxID_OK); -} - -/* - * Print preview - */ - -wxPrintPreview::wxPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting, wxPrintData *data): - wxPrintPreviewBase(printout, printoutForPrinting, data) -{ - DetermineScaling(); -} - -wxPrintPreview::~wxPrintPreview() -{ -} - -bool wxPrintPreview::Print(bool interactive) -{ - if (!printPrintout) - return FALSE; - wxPrinter printer(&printData); - return printer.Print(previewFrame, printPrintout, interactive); -} - -void wxPrintPreview::DetermineScaling() -{ - // TODO -} - diff --git a/src/stubs/printdlg.cpp b/src/stubs/printdlg.cpp deleted file mode 100644 index eae3b95568..0000000000 --- a/src/stubs/printdlg.cpp +++ /dev/null @@ -1,115 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: printdlg.cpp -// Purpose: wxPrintDialog, wxPageSetupDialog -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "printdlg.h" -#endif - -#include "wx/object.h" -#include "wx/stubs/printdlg.h" -#include "wx/dcprint.h" - -// Use generic page setup dialog: use your own native one if one exists. -#include "wx/generic/prntdlgg.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog, wxDialog) -IMPLEMENT_CLASS(wxPageSetupDialog, wxDialog) -#endif - -wxPrintDialog::wxPrintDialog(): - wxDialog() -{ - m_dialogParent = NULL; - m_printerDC = NULL; -} - -wxPrintDialog::wxPrintDialog(wxWindow *p, wxPrintData* data): - wxDialog() -{ - Create(p, data); -} - -bool wxPrintDialog::Create(wxWindow *p, wxPrintData* data) -{ - m_dialogParent = p; - m_printerDC = NULL; - - if ( data ) - m_printData = *data; - - return TRUE; -} - -wxPrintDialog::~wxPrintDialog() -{ - if (m_printerDC) - delete m_printerDC; -} - -int wxPrintDialog::ShowModal() -{ - // TODO - return wxID_CANCEL; -} - -wxDC *wxPrintDialog::GetPrintDC() -{ - if (m_printerDC) - { - wxDC* dc = m_printerDC; - m_printerDC = NULL; - return dc; - } - else - return NULL; -} - -/* - * wxPageSetupDialog - */ - -wxPageSetupDialog::wxPageSetupDialog(): - wxDialog() -{ - m_dialogParent = NULL; -} - -wxPageSetupDialog::wxPageSetupDialog(wxWindow *p, wxPageSetupData *data): - wxDialog() -{ - Create(p, data); -} - -bool wxPageSetupDialog::Create(wxWindow *p, wxPageSetupData *data) -{ - m_dialogParent = p; - - if (data) - m_pageSetupData = (*data); - - return TRUE; -} - -wxPageSetupDialog::~wxPageSetupDialog() -{ -} - -int wxPageSetupDialog::ShowModal() -{ - // Uses generic page setup dialog - wxGenericPageSetupDialog *genericPageSetupDialog = new wxGenericPageSetupDialog(GetParent(), & m_pageSetupData); - int ret = genericPageSetupDialog->ShowModal(); - m_pageSetupData = genericPageSetupDialog->GetPageSetupData(); - genericPageSetupDialog->Close(TRUE); - return ret; -} - diff --git a/src/stubs/radiobox.cpp b/src/stubs/radiobox.cpp deleted file mode 100644 index da582d0e52..0000000000 --- a/src/stubs/radiobox.cpp +++ /dev/null @@ -1,194 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: radiobox.cpp -// Purpose: wxRadioBox -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "radiobox.h" -#endif - -#include "wx/radiobox.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) -#endif - -// Radio box item -wxRadioBox::wxRadioBox() -{ - m_selectedButton = -1; - m_noItems = 0; - m_noRowsOrCols = 0; - m_majorDim = 0 ; -} - -bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, - int n, const wxString choices[], - int majorDim, long style, - const wxValidator& val, const wxString& name) -{ - m_selectedButton = -1; - m_noItems = n; - - SetName(name); - SetValidator(val); - - parent->AddChild(this); - - m_windowStyle = (long&)style; - - if (id == -1) - m_windowId = NewControlId(); - else - m_windowId = id; - - m_noRowsOrCols = majorDim; - - if (majorDim==0) - m_majorDim = n ; - else - m_majorDim = majorDim ; - - - // TODO create radiobox - return FALSE; -} - - -wxRadioBox::~wxRadioBox() -{ - // TODO -} - -wxString wxRadioBox::GetLabel(int item) const -{ - // TODO - return wxString(""); -} - -void wxRadioBox::SetLabel(int item, const wxString& label) -{ - // TODO -} - -int wxRadioBox::FindString(const wxString& s) const -{ - // TODO - return -1; -} - -void wxRadioBox::SetSelection(int n) -{ - if ((n < 0) || (n >= m_noItems)) - return; - // TODO - - m_selectedButton = n; -} - -// Get single selection, for single choice list items -int wxRadioBox::GetSelection() const -{ - return m_selectedButton; -} - -// Find string for position -wxString wxRadioBox::GetString(int n) const -{ - // TODO - return wxString(""); -} - -void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -void wxRadioBox::GetSize(int *width, int *height) const -{ - // TODO -} - -void wxRadioBox::GetPosition(int *x, int *y) const -{ - // TODO -} - -wxString wxRadioBox::GetLabel() const -{ - // TODO - return wxString(""); -} - -void wxRadioBox::SetLabel(const wxString& label) -{ - // TODO -} - -void wxRadioBox::SetFocus() -{ - // TODO -} - -bool wxRadioBox::Show(bool show) -{ - // TODO - return FALSE; -} - -// Enable a specific button -void wxRadioBox::Enable(int item, bool enable) -{ - // TODO -} - -// Enable all controls -void wxRadioBox::Enable(bool enable) -{ - wxControl::Enable(enable); - - // TODO -} - -// Show a specific button -void wxRadioBox::Show(int item, bool show) -{ - // TODO -} - -// For single selection items only -wxString wxRadioBox::GetStringSelection () const -{ - int sel = GetSelection (); - if (sel > -1) - return this->GetString (sel); - else - return wxString(""); -} - -bool wxRadioBox::SetStringSelection (const wxString& s) -{ - int sel = FindString (s); - if (sel > -1) - { - SetSelection (sel); - return TRUE; - } - else - return FALSE; -} - -void wxRadioBox::Command (wxCommandEvent & event) -{ - SetSelection (event.m_commandInt); - ProcessCommand (event); -} - - diff --git a/src/stubs/radiobut.cpp b/src/stubs/radiobut.cpp deleted file mode 100644 index 65baab38b6..0000000000 --- a/src/stubs/radiobut.cpp +++ /dev/null @@ -1,68 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: radiobut.cpp -// Purpose: wxRadioButton -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "radiobut.h" -#endif - -#include "wx/radiobut.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl) -#endif - -bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - - if (parent) parent->AddChild(this); - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - m_windowStyle = style ; - - // TODO create radiobutton - return FALSE; -} - -void wxRadioButton::SetLabel(const wxString& label) -{ - // TODO -} - -void wxRadioButton::SetValue(bool value) -{ - // TODO -} - -// Get single selection, for single choice list items -bool wxRadioButton::GetValue() const -{ - // TODO - return FALSE; -} - -void wxRadioButton::Command (wxCommandEvent & event) -{ - SetValue ( (event.m_commandInt != 0) ); - ProcessCommand (event); -} - - diff --git a/src/stubs/region.cpp b/src/stubs/region.cpp deleted file mode 100644 index c71d4c605a..0000000000 --- a/src/stubs/region.cpp +++ /dev/null @@ -1,363 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// File: region.cpp -// Purpose: Region class -// Author: Markus Holzem/Julian Smart/AUTHOR -// Created: Fri Oct 24 10:46:34 MET 1997 -// RCS-ID: $Id$ -// Copyright: (c) 1997 Markus Holzem/Julian Smart/AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "region.h" -#endif - -#include "wx/region.h" -#include "wx/gdicmn.h" - -#if !USE_SHARED_LIBRARY - IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject) - IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator, wxObject) -#endif - -//----------------------------------------------------------------------------- -// wxRegionRefData implementation -//----------------------------------------------------------------------------- - -class WXDLLEXPORT wxRegionRefData : public wxGDIRefData { -public: - wxRegionRefData() - { - } - - wxRegionRefData(const wxRegionRefData& data) - { - // TODO - } - - ~wxRegionRefData() - { - // TODO - } -}; - - -//----------------------------------------------------------------------------- -// wxRegion -//----------------------------------------------------------------------------- - -/*! - * Create an empty region. - */ -wxRegion::wxRegion() -{ - m_refData = new wxRegionRefData; - // TODO create empty region -} - -wxRegion::wxRegion(long x, long y, long w, long h) -{ - m_refData = new wxRegionRefData; - // TODO create rect region -} - -wxRegion::wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight) -{ - m_refData = new wxRegionRefData; - // TODO create rect region -} - -wxRegion::wxRegion(const wxRect& rect) -{ - m_refData = new wxRegionRefData; - // TODO create rect region -} - -/*! - * Destroy the region. - */ -wxRegion::~wxRegion() -{ - // m_refData unrefed in ~wxObject -} - -//----------------------------------------------------------------------------- -//# Modify region -//----------------------------------------------------------------------------- - -//! Clear current region -void wxRegion::Clear() -{ - UnRef(); -} - -//! Combine rectangle (x, y, w, h) with this. -bool wxRegion::Combine(long x, long y, long width, long height, wxRegionOp op) -{ - // Don't change shared data - if (!m_refData) { - m_refData = new wxRegionRefData(); - } else if (m_refData->GetRefCount() > 1) { - wxRegionRefData* ref = (wxRegionRefData*)m_refData; - UnRef(); - m_refData = new wxRegionRefData(*ref); - } - // If ref count is 1, that means it's 'ours' anyway so no action. - - // TODO create rect region - - int mode = 0; // TODO platform-specific code - switch (op) - { - case wxRGN_AND: - // TODO - break ; - case wxRGN_OR: - // TODO - break ; - case wxRGN_XOR: - // TODO - break ; - case wxRGN_DIFF: - // TODO - break ; - case wxRGN_COPY: - default: - // TODO - break ; - } - - // TODO do combine region - - return FALSE; -} - -//! Union /e region with this. -bool wxRegion::Combine(const wxRegion& region, wxRegionOp op) -{ - if (region.Empty()) - return FALSE; - - // Don't change shared data - if (!m_refData) { - m_refData = new wxRegionRefData(); - } else if (m_refData->GetRefCount() > 1) { - wxRegionRefData* ref = (wxRegionRefData*)m_refData; - UnRef(); - m_refData = new wxRegionRefData(*ref); - } - - int mode = 0; // TODO platform-specific code - switch (op) - { - case wxRGN_AND: - // TODO - break ; - case wxRGN_OR: - // TODO - break ; - case wxRGN_XOR: - // TODO - break ; - case wxRGN_DIFF: - // TODO - break ; - case wxRGN_COPY: - default: - // TODO - break ; - } - - // TODO combine region - - return FALSE; -} - -bool wxRegion::Combine(const wxRect& rect, wxRegionOp op) -{ - return Combine(rect.GetLeft(), rect.GetTop(), rect.GetWidth(), rect.GetHeight(), op); -} - -//----------------------------------------------------------------------------- -//# Information on region -//----------------------------------------------------------------------------- - -// Outer bounds of region -void wxRegion::GetBox(long& x, long& y, long&w, long &h) const -{ - if (m_refData) { - // TODO get box - } else { - x = y = w = h = 0; - } -} - -wxRect wxRegion::GetBox() const -{ - long x, y, w, h; - GetBox(x, y, w, h); - return wxRect(x, y, w, h); -} - -// Is region empty? -bool wxRegion::Empty() const -{ - // TODO - return FALSE; -} - -//----------------------------------------------------------------------------- -//# Tests -//----------------------------------------------------------------------------- - -// Does the region contain the point (x,y)? -wxRegionContain wxRegion::Contains(long x, long y) const -{ - if (!m_refData) - return wxOutRegion; - - // TODO. Return wxInRegion if within region. - if (0) - return wxInRegion; - return wxOutRegion; -} - -// Does the region contain the point pt? -wxRegionContain wxRegion::Contains(const wxPoint& pt) const -{ - if (!m_refData) - return wxOutRegion; - - // TODO. Return wxInRegion if within region. - if (0) - return wxInRegion; - else - return wxOutRegion; -} - -// Does the region contain the rectangle (x, y, w, h)? -wxRegionContain wxRegion::Contains(long x, long y, long w, long h) const -{ - if (!m_refData) - return wxOutRegion; - - // TODO. Return wxInRegion if within region. - if (0) - return wxInRegion; - else - return wxOutRegion; -} - -// Does the region contain the rectangle rect -wxRegionContain wxRegion::Contains(const wxRect& rect) const -{ - if (!m_refData) - return wxOutRegion; - - long x, y, w, h; - x = rect.x; - y = rect.y; - w = rect.GetWidth(); - h = rect.GetHeight(); - return Contains(x, y, w, h); -} - -/////////////////////////////////////////////////////////////////////////////// -// // -// wxRegionIterator // -// // -/////////////////////////////////////////////////////////////////////////////// - -/*! - * Initialize empty iterator - */ -wxRegionIterator::wxRegionIterator() : m_current(0), m_numRects(0), m_rects(NULL) -{ -} - -wxRegionIterator::~wxRegionIterator() -{ - if (m_rects) - delete[] m_rects; -} - -/*! - * Initialize iterator for region - */ -wxRegionIterator::wxRegionIterator(const wxRegion& region) -{ - m_rects = NULL; - - Reset(region); -} - -/*! - * Reset iterator for a new /e region. - */ -void wxRegionIterator::Reset(const wxRegion& region) -{ - m_current = 0; - m_region = region; - - if (m_rects) - delete[] m_rects; - - m_rects = NULL; - - if (m_region.Empty()) - m_numRects = 0; - else - { - // TODO create m_rects and fill with rectangles for this region - m_numRects = 0; - } -} - -/*! - * Increment iterator. The rectangle returned is the one after the - * incrementation. - */ -void wxRegionIterator::operator ++ () -{ - if (m_current < m_numRects) - ++m_current; -} - -/*! - * Increment iterator. The rectangle returned is the one before the - * incrementation. - */ -void wxRegionIterator::operator ++ (int) -{ - if (m_current < m_numRects) - ++m_current; -} - -long wxRegionIterator::GetX() const -{ - if (m_current < m_numRects) - return m_rects[m_current].x; - return 0; -} - -long wxRegionIterator::GetY() const -{ - if (m_current < m_numRects) - return m_rects[m_current].y; - return 0; -} - -long wxRegionIterator::GetW() const -{ - if (m_current < m_numRects) - return m_rects[m_current].width ; - return 0; -} - -long wxRegionIterator::GetH() const -{ - if (m_current < m_numRects) - return m_rects[m_current].height; - return 0; -} - diff --git a/src/stubs/scrolbar.cpp b/src/stubs/scrolbar.cpp deleted file mode 100644 index 307cdefc13..0000000000 --- a/src/stubs/scrolbar.cpp +++ /dev/null @@ -1,78 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: scrolbar.cpp -// Purpose: wxScrollBar -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "scrolbar.h" -#endif - -#include "wx/scrolbar.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl) - -#endif - -// Scrollbar -bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - if (!parent) - return FALSE; - parent->AddChild(this); - SetName(name); - SetValidator(validator); - - m_windowStyle = style; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - // TODO create scrollbar - return TRUE; -} - -wxScrollBar::~wxScrollBar() -{ -} - -void wxScrollBar::SetPosition(int viewStart) -{ - // TODO -} - -int wxScrollBar::GetPosition() const -{ - // TODO - return 0; -} - -void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageSize, - bool refresh) -{ - m_viewSize = pageSize; - m_pageSize = thumbSize; - m_objectSize = range; - - // TODO -} - - -void wxScrollBar::Command(wxCommandEvent& event) -{ - SetPosition(event.m_commandInt); - ProcessCommand(event); -} - diff --git a/src/stubs/settings.cpp b/src/stubs/settings.cpp deleted file mode 100644 index d831092aa4..0000000000 --- a/src/stubs/settings.cpp +++ /dev/null @@ -1,151 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: settings.cpp -// Purpose: wxSettings -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "settings.h" -#endif - -#include "wx/settings.h" - -wxColour wxSystemSettings::GetSystemColour(int index) -{ - // TODO - return wxColour(); -} - -wxFont wxSystemSettings::GetSystemFont(int index) -{ - // TODO - return wxFont(); -} - -// Get a system metric, e.g. scrollbar size -int wxSystemSettings::GetSystemMetric(int index) -{ - switch ( index) - { - case wxSYS_MOUSE_BUTTONS: - // TODO - return 0; - case wxSYS_BORDER_X: - // TODO - return 0; - case wxSYS_BORDER_Y: - // TODO - return 0; - case wxSYS_CURSOR_X: - // TODO - return 0; - case wxSYS_CURSOR_Y: - // TODO - return 0; - case wxSYS_DCLICK_X: - // TODO - return 0; - case wxSYS_DCLICK_Y: - // TODO - return 0; - case wxSYS_DRAG_X: - // TODO - return 0; - case wxSYS_DRAG_Y: - // TODO - return 0; - case wxSYS_EDGE_X: - // TODO - return 0; - case wxSYS_EDGE_Y: - // TODO - return 0; - case wxSYS_HSCROLL_ARROW_X: - // TODO - return 0; - case wxSYS_HSCROLL_ARROW_Y: - // TODO - return 0; - case wxSYS_HTHUMB_X: - // TODO - return 0; - case wxSYS_ICON_X: - // TODO - return 0; - case wxSYS_ICON_Y: - // TODO - return 0; - case wxSYS_ICONSPACING_X: - // TODO - return 0; - case wxSYS_ICONSPACING_Y: - // TODO - return 0; - case wxSYS_WINDOWMIN_X: - // TODO - return 0; - case wxSYS_WINDOWMIN_Y: - // TODO - return 0; - case wxSYS_SCREEN_X: - // TODO - return 0; - case wxSYS_SCREEN_Y: - // TODO - return 0; - case wxSYS_FRAMESIZE_X: - // TODO - return 0; - case wxSYS_FRAMESIZE_Y: - // TODO - return 0; - case wxSYS_SMALLICON_X: - // TODO - return 0; - case wxSYS_SMALLICON_Y: - // TODO - return 0; - case wxSYS_HSCROLL_Y: - // TODO - return 0; - case wxSYS_VSCROLL_X: - // TODO - return 0; - case wxSYS_VSCROLL_ARROW_X: - // TODO - return 0; - case wxSYS_VSCROLL_ARROW_Y: - // TODO - return 0; - case wxSYS_VTHUMB_Y: - // TODO - return 0; - case wxSYS_CAPTION_Y: - // TODO - return 0; - case wxSYS_MENU_Y: - // TODO - return 0; - case wxSYS_NETWORK_PRESENT: - // TODO - return 0; - case wxSYS_PENWINDOWS_PRESENT: - // TODO - return 0; - case wxSYS_SHOW_SOUNDS: - // TODO - return 0; - case wxSYS_SWAP_BUTTONS: - // TODO - return 0; - default: - return 0; - } - return 0; -} - diff --git a/src/stubs/slider.cpp b/src/stubs/slider.cpp deleted file mode 100644 index 0be5a60de7..0000000000 --- a/src/stubs/slider.cpp +++ /dev/null @@ -1,185 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: slider.cpp -// Purpose: wxSlider -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "slider.h" -#endif - -#include "wx/slider.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl) -#endif - -// Slider -wxSlider::wxSlider() -{ - m_pageSize = 1; - m_lineSize = 1; - m_rangeMax = 0; - m_rangeMin = 0; - m_tickFreq = 0; -} - -bool wxSlider::Create(wxWindow *parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - SetName(name); - SetValidator(validator); - - if (parent) parent->AddChild(this); - - m_lineSize = 1; - m_windowStyle = style; - m_tickFreq = 0; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - m_rangeMax = maxValue; - m_rangeMin = minValue; - - m_pageSize = (int)((maxValue-minValue)/10); - - // TODO create slider - - return FALSE; -} - -wxSlider::~wxSlider() -{ -} - -int wxSlider::GetValue() const -{ - // TODO - return 0; -} - -void wxSlider::SetValue(int value) -{ - // TODO -} - -void wxSlider::GetSize(int *width, int *height) const -{ - // TODO -} - -void wxSlider::GetPosition(int *x, int *y) const -{ - // TODO -} - -void wxSlider::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -void wxSlider::SetRange(int minValue, int maxValue) -{ - m_rangeMin = minValue; - m_rangeMax = maxValue; - - // TODO -} - -// For trackbars only -void wxSlider::SetTickFreq(int n, int pos) -{ - // TODO - m_tickFreq = n; -} - -void wxSlider::SetPageSize(int pageSize) -{ - // TODO - m_pageSize = pageSize; -} - -int wxSlider::GetPageSize() const -{ - return m_pageSize; -} - -void wxSlider::ClearSel() -{ - // TODO -} - -void wxSlider::ClearTicks() -{ - // TODO -} - -void wxSlider::SetLineSize(int lineSize) -{ - m_lineSize = lineSize; - // TODO -} - -int wxSlider::GetLineSize() const -{ - // TODO - return 0; -} - -int wxSlider::GetSelEnd() const -{ - // TODO - return 0; -} - -int wxSlider::GetSelStart() const -{ - // TODO - return 0; -} - -void wxSlider::SetSelection(int minPos, int maxPos) -{ - // TODO -} - -void wxSlider::SetThumbLength(int len) -{ - // TODO -} - -int wxSlider::GetThumbLength() const -{ - // TODO - return 0; -} - -void wxSlider::SetTick(int tickPos) -{ - // TODO -} - -void wxSlider::Command (wxCommandEvent & event) -{ - SetValue (event.GetInt()); - ProcessCommand (event); -} - -bool wxSlider::Show(bool show) -{ - // TODO - return TRUE; -} - diff --git a/src/stubs/spinbutt.cpp b/src/stubs/spinbutt.cpp deleted file mode 100644 index cbea725592..0000000000 --- a/src/stubs/spinbutt.cpp +++ /dev/null @@ -1,78 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: spinbutt.cpp -// Purpose: wxSpinButton -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "spinbutt.h" -#endif - -#include "wx/spinbutt.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl) -#endif - -wxSpinButton::wxSpinButton() -{ - m_min = 0; - m_max = 100; -} - -bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style, const wxString& name) -{ - SetName(name); - - m_windowStyle = style; - - SetParent(parent); - - m_min = 0; - m_max = 100; - - m_windowId = (id == -1) ? NewControlId() : id; - - // TODO create spin button - return FALSE; -} - -wxSpinButton::~wxSpinButton() -{ -} - -// Attributes -//////////////////////////////////////////////////////////////////////////// - -int wxSpinButton::GetValue() const -{ - // TODO - return 0; -} - -void wxSpinButton::SetValue(int val) -{ - // TODO -} - -void wxSpinButton::SetRange(int minVal, int maxVal) -{ - m_min = minVal; - m_max = maxVal; - // TODO -} - -// Spin event -IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent) - -wxSpinEvent::wxSpinEvent(wxEventType commandType, int id): - wxScrollEvent(commandType, id) -{ -} - diff --git a/src/stubs/statbmp.cpp b/src/stubs/statbmp.cpp deleted file mode 100644 index a67c558465..0000000000 --- a/src/stubs/statbmp.cpp +++ /dev/null @@ -1,59 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: statbmp.cpp -// Purpose: wxStaticBitmap -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "statbmp.h" -#endif - -#include "wx/statbmp.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl) -#endif - -/* - * wxStaticBitmap - */ - -bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id, - const wxBitmap& bitmap, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - m_messageBitmap = bitmap; - SetName(name); - if (parent) parent->AddChild(this); - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - m_windowStyle = style; - - // TODO: create static bitmap control - return FALSE; -} - -void wxStaticBitmap::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap) -{ - m_messageBitmap = bitmap; - - // TODO: redraw bitmap -} - diff --git a/src/stubs/statbox.cpp b/src/stubs/statbox.cpp deleted file mode 100644 index b239dc738c..0000000000 --- a/src/stubs/statbox.cpp +++ /dev/null @@ -1,62 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: statbox.cpp -// Purpose: wxStaticBox -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "statbox.h" -#endif - -#include "wx/statbox.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl) - -BEGIN_EVENT_TABLE(wxStaticBox, wxControl) - EVT_ERASE_BACKGROUND(wxStaticBox::OnEraseBackground) -END_EVENT_TABLE() - -#endif - -/* - * Static box - */ - -bool wxStaticBox::Create(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - SetName(name); - - if (parent) parent->AddChild(this); - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - m_windowStyle = style; - - // TODO: create static box - return FALSE; -} - -void wxStaticBox::SetLabel(const wxString& label) -{ - // TODO -} - -void wxStaticBox::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - diff --git a/src/stubs/stattext.cpp b/src/stubs/stattext.cpp deleted file mode 100644 index a1275b8bdc..0000000000 --- a/src/stubs/stattext.cpp +++ /dev/null @@ -1,60 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: stattext.cpp -// Purpose: wxStaticText -// Author: AUTHOR -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "stattext.h" -#endif - -#include "wx/app.h" -#include "wx/stattext.h" - -#include - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl) -#endif - -bool wxStaticText::Create(wxWindow *parent, wxWindowID id, - const wxString& label, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - SetName(name); - if (parent) parent->AddChild(this); - - SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; - SetForegroundColour(parent->GetDefaultForegroundColour()) ; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - m_windowStyle = style; - - SetFont(* parent->GetFont()); - - // TODO - return FALSE; -} - -void wxStaticText::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -void wxStaticText::SetLabel(const wxString& label) -{ - // TODO -} - diff --git a/src/stubs/statusbr.cpp b/src/stubs/statusbr.cpp deleted file mode 100644 index dff1ddec34..0000000000 --- a/src/stubs/statusbr.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: statbar.cpp -// Purpose: native implementation of wxStatusBar (optional) -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 AUTHOR -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "statusbr.h" -#endif - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- - -#include "wx/stubs/statusbr.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxStatusBarXX, wxStatusBar); - -BEGIN_EVENT_TABLE(wxStatusBarXX, wxStatusBar) - EVT_SIZE(wxStatusBarXX::OnSize) -END_EVENT_TABLE() -#endif //USE_SHARED_LIBRARY - - -// ============================================================================ -// implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// wxStatusBarXX class -// ---------------------------------------------------------------------------- - -wxStatusBarXX::wxStatusBarXX() -{ - SetParent(NULL); -} - -wxStatusBarXX::wxStatusBarXX(wxWindow *parent, wxWindowID id, long style) -{ - Create(parent, id, style); -} - -bool wxStatusBarXX::Create(wxWindow *parent, wxWindowID id, long style) -{ - SetParent(parent); - - if (id == -1) - m_windowId = NewControlId(); - else - m_windowId = id; - - // TODO: create status bar - return FALSE; -} - -void wxStatusBarXX::SetFieldsCount(int nFields, const int widths[]) -{ - wxASSERT( (nFields > 0) && (nFields < 255) ); - - m_nFields = nFields; - - CopyFieldsWidth(widths); - SetFieldsWidth(); -} - -void wxStatusBarXX::SetStatusWidths(int n, const int widths[]) -{ - wxASSERT( n == m_nFields ); - - CopyFieldsWidth(widths); - SetFieldsWidth(); -} - -void wxStatusBarXX::CopyFieldsWidth(const int widths[]) -{ - if (widths && !m_statusWidths) - m_statusWidths = new int[m_nFields]; - - if ( widths != NULL ) { - for ( int i = 0; i < m_nFields; i++ ) - m_statusWidths[i] = widths[i]; - } - else { - delete [] m_statusWidths; - m_statusWidths = NULL; - } -} - -void wxStatusBarXX::SetFieldsWidth() -{ - int *pWidths = new int[m_nFields]; - - int nWindowWidth, y; - GetClientSize(&nWindowWidth, &y); - - if ( m_statusWidths == NULL ) { - // default: all fields have the same width - int nWidth = nWindowWidth / m_nFields; - for ( int i = 0; i < m_nFields; i++ ) - pWidths[i] = (i + 1) * nWidth; - } - else { - // -1 doesn't mean the same thing for wxWindows and Win32, recalc - int nTotalWidth = 0, - nVarCount = 0, - i; - for ( i = 0; i < m_nFields; i++ ) { - if ( m_statusWidths[i] == -1 ) - nVarCount++; - else - nTotalWidth += m_statusWidths[i]; - } - - if ( nVarCount == 0 ) { - // wrong! at least one field must be of variable width - wxFAIL; - - nVarCount++; - } - - int nVarWidth = (nWindowWidth - nTotalWidth) / nVarCount; - - // do fill the array - int nCurPos = 0; - for ( i = 0; i < m_nFields; i++ ) { - if ( m_statusWidths[i] == -1 ) - nCurPos += nVarWidth; - else - nCurPos += m_statusWidths[i]; - pWidths[i] = nCurPos; - } - } - - // TODO: set widths - - delete [] pWidths; -} - -void wxStatusBarXX::SetStatusText(const wxString& strText, int nField) -{ - // TODO -} - -wxString wxStatusBarXX::GetStatusText(int nField) const -{ - wxASSERT( (nField > -1) && (nField < m_nFields) ); - - // TODO - return wxString(""); -} - -void wxStatusBarXX::OnSize(wxSizeEvent& event) -{ - // adjust fields widths to the new size - SetFieldsWidth(); -} diff --git a/src/stubs/tabctrl.cpp b/src/stubs/tabctrl.cpp deleted file mode 100644 index b3b45a72d1..0000000000 --- a/src/stubs/tabctrl.cpp +++ /dev/null @@ -1,201 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: tabctrl.cpp -// Purpose: wxTabCtrl -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "tabctrl.h" -#endif - -#include "wx/control.h" -#include "wx/tabctrl.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl, wxControl) - -BEGIN_EVENT_TABLE(wxTabCtrl, wxControl) -END_EVENT_TABLE() -#endif - -wxTabCtrl::wxTabCtrl() -{ - m_imageList = NULL; -} - -bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style, const wxString& name) -{ - m_imageList = NULL; - - SetName(name); - - m_windowStyle = style; - - SetParent(parent); - - m_windowId = (id < 0 ? NewControlId() : id); - - if (parent) parent->AddChild(this); - - // TODO: create tab control - return FALSE; -} - -wxTabCtrl::~wxTabCtrl() -{ -} - -void wxTabCtrl::Command(wxCommandEvent& event) -{ -} - -// Delete all items -bool wxTabCtrl::DeleteAllItems() -{ - // TODO - return FALSE; -} - -// Delete an item -bool wxTabCtrl::DeleteItem(int item) -{ - // TODO - return FALSE; -} - -// Get the selection -int wxTabCtrl::GetSelection() const -{ - // TODO - return 0; -} - -// Get the tab with the current keyboard focus -int wxTabCtrl::GetCurFocus() const -{ - // TODO - return 0; -} - -// Get the associated image list -wxImageList* wxTabCtrl::GetImageList() const -{ - return m_imageList; -} - -// Get the number of items -int wxTabCtrl::GetItemCount() const -{ - // TODO - return 0; -} - -// Get the rect corresponding to the tab -bool wxTabCtrl::GetItemRect(int item, wxRect& wxrect) const -{ - // TODO - return FALSE; -} - -// Get the number of rows -int wxTabCtrl::GetRowCount() const -{ - // TODO - return 0; -} - -// Get the item text -wxString wxTabCtrl::GetItemText(int item) const -{ - // TODO - return wxString(""); -} - -// Get the item image -int wxTabCtrl::GetItemImage(int item) const -{ - // TODO - return 0; -} - -// Get the item data -void* wxTabCtrl::GetItemData(int item) const -{ - // TODO - return NULL; -} - -// Hit test -int wxTabCtrl::HitTest(const wxPoint& pt, long& flags) -{ - // TODO - return 0; -} - -// Insert an item -bool wxTabCtrl::InsertItem(int item, const wxString& text, int imageId, void* data) -{ - // TODO - return FALSE; -} - -// Set the selection -int wxTabCtrl::SetSelection(int item) -{ - // TODO - return 0; -} - -// Set the image list -void wxTabCtrl::SetImageList(wxImageList* imageList) -{ - // TODO -} - -// Set the text for an item -bool wxTabCtrl::SetItemText(int item, const wxString& text) -{ - // TODO - return FALSE; -} - -// Set the image for an item -bool wxTabCtrl::SetItemImage(int item, int image) -{ - // TODO - return FALSE; -} - -// Set the data for an item -bool wxTabCtrl::SetItemData(int item, void* data) -{ - // TODO - return FALSE; -} - -// Set the size for a fixed-width tab control -void wxTabCtrl::SetItemSize(const wxSize& size) -{ - // TODO -} - -// Set the padding between tabs -void wxTabCtrl::SetPadding(const wxSize& padding) -{ - // TODO -} - -// Tab event -IMPLEMENT_DYNAMIC_CLASS(wxTabEvent, wxCommandEvent) - -wxTabEvent::wxTabEvent(wxEventType commandType, int id): - wxCommandEvent(commandType, id) -{ -} - diff --git a/src/stubs/taskbar.cpp b/src/stubs/taskbar.cpp deleted file mode 100644 index 5c91250cf0..0000000000 --- a/src/stubs/taskbar.cpp +++ /dev/null @@ -1,70 +0,0 @@ -///////////////////////////////////////////////////////////////////////// -// File: taskbar.cpp -// Purpose: Implements wxTaskBarIcon class for manipulating icons on -// the task bar. Optional. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "taskbar.h" -#endif - -#include - -wxTaskBarIcon::wxTaskBarIcon() -{ - // TODO -} - -wxTaskBarIcon::~wxTaskBarIcon() -{ - // TODO -} - -// Operations -bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip) -{ - // TODO - return FALSE; -} - -bool wxTaskBarIcon::RemoveIcon() -{ - // TODO - return FALSE; -} - -// Overridables -void wxTaskBarIcon::OnMouseMove() -{ -} - -void wxTaskBarIcon::OnLButtonDown() -{ -} - -void wxTaskBarIcon::OnLButtonUp() -{ -} - -void wxTaskBarIcon::OnRButtonDown() -{ -} - -void wxTaskBarIcon::OnRButtonUp() -{ -} - -void wxTaskBarIcon::OnLButtonDClick() -{ -} - -void wxTaskBarIcon::OnRButtonDClick() -{ -} - diff --git a/src/stubs/textctrl.cpp b/src/stubs/textctrl.cpp deleted file mode 100644 index f4fbdd3bbb..0000000000 --- a/src/stubs/textctrl.cpp +++ /dev/null @@ -1,440 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: textctrl.cpp -// Purpose: wxTextCtrl -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "textctrl.h" -#endif - -#include -#include -#include - -#include "wx/textctrl.h" -#include "wx/settings.h" -#include "wx/filefn.h" -#include "wx/utils.h" - -#if defined(__BORLANDC__) && !defined(__WIN32__) -#include -#else -#ifndef __GNUWIN32__ -#include -#endif -#endif - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) - -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) - EVT_CHAR(wxTextCtrl::OnChar) - EVT_DROP_FILES(wxTextCtrl::OnDropFiles) - EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground) -END_EVENT_TABLE() -#endif - -// Text item -wxTextCtrl::wxTextCtrl() -#ifndef NO_TEXT_WINDOW_STREAM - :streambuf() -#endif -{ - m_fileName = ""; -} - -bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, - const wxString& value, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) -{ - m_fileName = ""; - SetName(name); - SetValidator(validator); - if (parent) parent->AddChild(this); - - m_windowStyle = style; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - return TRUE; -} - -wxString wxTextCtrl::GetValue() const -{ - // TODO - return wxString(""); -} - -void wxTextCtrl::SetValue(const wxString& value) -{ - // TODO -} - -void wxTextCtrl::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -// Clipboard operations -void wxTextCtrl::Copy() -{ - // TODO -} - -void wxTextCtrl::Cut() -{ - // TODO -} - -void wxTextCtrl::Paste() -{ - // TODO -} - -void wxTextCtrl::SetEditable(bool editable) -{ - // TODO -} - -void wxTextCtrl::SetInsertionPoint(long pos) -{ - // TODO -} - -void wxTextCtrl::SetInsertionPointEnd() -{ - long pos = GetLastPosition(); - SetInsertionPoint(pos); -} - -long wxTextCtrl::GetInsertionPoint() const -{ - // TODO - return 0; -} - -long wxTextCtrl::GetLastPosition() const -{ - // TODO - return 0; -} - -void wxTextCtrl::Replace(long from, long to, const wxString& value) -{ - // TODO -} - -void wxTextCtrl::Remove(long from, long to) -{ - // TODO -} - -void wxTextCtrl::SetSelection(long from, long to) -{ - // TODO -} - -bool wxTextCtrl::LoadFile(const wxString& file) -{ - if (!wxFileExists(file)) - return FALSE; - - m_fileName = file; - - Clear(); - - ifstream input((char*) (const char*) file, ios::nocreate | ios::in); - - if (!input.bad()) - { - struct stat stat_buf; - if (stat(file, &stat_buf) < 0) - return FALSE; - // This may need to be a bigger buffer than the file size suggests, - // if it's a UNIX file. Give it an extra 1000 just in case. - char *tmp_buffer = (char*)malloc((size_t)(stat_buf.st_size+1+1000)); - long no_lines = 0; - long pos = 0; - while (!input.eof() && input.peek() != EOF) - { - input.getline(wxBuffer, 500); - int len = strlen(wxBuffer); - wxBuffer[len] = 13; - wxBuffer[len+1] = 10; - wxBuffer[len+2] = 0; - strcpy(tmp_buffer+pos, wxBuffer); - pos += strlen(wxBuffer); - no_lines++; - } - - // TODO add line - - free(tmp_buffer); - - return TRUE; - } - return FALSE; -} - -// If file is null, try saved file name first -// Returns TRUE if succeeds. -bool wxTextCtrl::SaveFile(const wxString& file) -{ - wxString theFile(file); - if (theFile == "") - theFile = m_fileName; - if (theFile == "") - return FALSE; - m_fileName = theFile; - - ofstream output((char*) (const char*) theFile); - if (output.bad()) - return FALSE; - - // TODO get and save text - - return FALSE; -} - -void wxTextCtrl::WriteText(const wxString& text) -{ - // TODO write text to control -} - -void wxTextCtrl::Clear() -{ - // TODO -} - -bool wxTextCtrl::IsModified() const -{ - // TODO - return FALSE; -} - -// Makes 'unmodified' -void wxTextCtrl::DiscardEdits() -{ - // TODO -} - -int wxTextCtrl::GetNumberOfLines() const -{ - // TODO - return 0; -} - -long wxTextCtrl::XYToPosition(long x, long y) const -{ - // TODO - return 0; -} - -void wxTextCtrl::PositionToXY(long pos, long *x, long *y) const -{ - // TODO -} - -void wxTextCtrl::ShowPosition(long pos) -{ - // TODO -} - -int wxTextCtrl::GetLineLength(long lineNo) const -{ - // TODO - return 0; -} - -wxString wxTextCtrl::GetLineText(long lineNo) const -{ - // TODO - return wxString(""); -} - -/* - * Text item - */ - -void wxTextCtrl::Command(wxCommandEvent & event) -{ - SetValue (event.GetString()); - ProcessCommand (event); -} - -void wxTextCtrl::OnDropFiles(wxDropFilesEvent& event) -{ - // By default, load the first file into the text window. - if (event.GetNumberOfFiles() > 0) - { - LoadFile(event.GetFiles()[0]); - } -} - -// The streambuf code was partly taken from chapter 3 by Jerry Schwarz of -// AT&T's "C++ Lanuage System Release 3.0 Library Manual" - Stein Somers - -//========================================================================= -// Called then the buffer is full (gcc 2.6.3) -// or when "endl" is output (Borland 4.5) -//========================================================================= -// Class declaration using multiple inheritance doesn't work properly for -// Borland. See note in wb_text.h. -#ifndef NO_TEXT_WINDOW_STREAM -int wxTextCtrl::overflow(int c) -{ - // Make sure there is a holding area - if ( allocate()==EOF ) - { - wxError("Streambuf allocation failed","Internal error"); - return EOF; - } - - // Verify that there are no characters in get area - if ( gptr() && gptr() < egptr() ) - { - wxError("Who's trespassing my get area?","Internal error"); - return EOF; - } - - // Reset get area - setg(0,0,0); - - // Make sure there is a put area - if ( ! pptr() ) - { -/* This doesn't seem to be fatal so comment out error message */ -// wxError("Put area not opened","Internal error"); - setp( base(), base() ); - } - - // Determine how many characters have been inserted but no consumed - int plen = pptr() - pbase(); - - // Now Jerry relies on the fact that the buffer is at least 2 chars - // long, but the holding area "may be as small as 1" ??? - // And we need an additional \0, so let's keep this inefficient but - // safe copy. - - // If c!=EOF, it is a character that must also be comsumed - int xtra = c==EOF? 0 : 1; - - // Write temporary C-string to wxTextWindow - { - char *txt = new char[plen+xtra+1]; - memcpy(txt, pbase(), plen); - txt[plen] = (char)c; // append c - txt[plen+xtra] = '\0'; // append '\0' or overwrite c - // If the put area already contained \0, output will be truncated there - WriteText(txt); - delete[] txt; - } - - // Reset put area - setp(pbase(), epptr()); - -#if defined(__WATCOMC__) - return __NOT_EOF; -#elif defined(zapeof) // HP-UX (all cfront based?) - return zapeof(c); -#else - return c!=EOF ? c : 0; // this should make everybody happy -#endif -} - -//========================================================================= -// called then "endl" is output (gcc) or then explicit sync is done (Borland) -//========================================================================= -int wxTextCtrl::sync() -{ - // Verify that there are no characters in get area - if ( gptr() && gptr() < egptr() ) - { - wxError("Who's trespassing my get area?","Internal error"); - return EOF; - } - - if ( pptr() && pptr() > pbase() ) return overflow(EOF); - - return 0; -/* OLD CODE - int len = pptr() - pbase(); - char *txt = new char[len+1]; - strncpy(txt, pbase(), len); - txt[len] = '\0'; - (*this) << txt; - setp(pbase(), epptr()); - delete[] txt; - return 0; -*/ -} - -//========================================================================= -// Should not be called by a "ostream". Used by a "istream" -//========================================================================= -int wxTextCtrl::underflow() -{ - return EOF; -} -#endif - -wxTextCtrl& wxTextCtrl::operator<<(const wxString& s) -{ - WriteText(s); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(float f) -{ - wxString str; - str.Printf("%.2f", f); - WriteText(str); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(double d) -{ - wxString str; - str.Printf("%.2f", d); - WriteText(str); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(int i) -{ - wxString str; - str.Printf("%d", i); - WriteText(str); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(long i) -{ - wxString str; - str.Printf("%ld", i); - WriteText(str); - return *this; -} - -wxTextCtrl& wxTextCtrl::operator<<(const char c) -{ - char buf[2]; - - buf[0] = c; - buf[1] = 0; - WriteText(buf); - return *this; -} - diff --git a/src/stubs/thread.cpp b/src/stubs/thread.cpp deleted file mode 100644 index c197787003..0000000000 --- a/src/stubs/thread.cpp +++ /dev/null @@ -1,257 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: thread.cpp -// Purpose: wxThread Implementation. For Unix ports, see e.g. src/gtk -// Author: Original from Wolfram Gloger/Guilhem Lavaux -// Modified by: -// Created: 04/22/98 -// RCS-ID: $Id$ -// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "thread.h" -#endif - -#include "wx/module.h" -#include "wx/thread.h" -#include "wx/utils.h" - -enum thread_state { - STATE_IDLE = 0, - STATE_RUNNING, - STATE_CANCELED, - STATE_EXITED -}; - -///////////////////////////////////////////////////////////////////////////// -// Static variables -///////////////////////////////////////////////////////////////////////////// - -wxMutex wxMainMutex; // controls access to all GUI functions - -///////////////////////////////////////////////////////////////////////////// -// Windows implementation -///////////////////////////////////////////////////////////////////////////// - -class wxMutexInternal { -public: - // TODO: internal mutex handle -}; - -wxMutex::wxMutex() -{ - p_internal = new wxMutexInternal; - // TODO: create internal mutext handle - m_locked = 0; -} - -wxMutex::~wxMutex() -{ - if (m_locked > 0) - wxDebugMsg("wxMutex warning: freeing a locked mutex (%d locks)\n", m_locked); - // TODO: free internal mutext handle -} - -wxMutexError wxMutex::Lock() -{ - // TODO - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::TryLock() -{ - // TODO - m_locked++; - return MUTEX_NO_ERROR; -} - -wxMutexError wxMutex::Unlock() -{ - if (m_locked > 0) - m_locked--; - - // TODO - return MUTEX_NO_ERROR; -} - -class wxConditionInternal { -public: - // TODO: internal handle - int waiters; -}; - -wxCondition::wxCondition() -{ - p_internal = new wxConditionInternal; - // TODO: create internal handle - p_internal->waiters = 0; -} - -wxCondition::~wxCondition() -{ - // TODO: destroy internal handle -} - -void wxCondition::Wait(wxMutex& mutex) -{ - mutex.Unlock(); - p_internal->waiters++; - // TODO wait here - p_internal->waiters--; - mutex.Lock(); -} - -bool wxCondition::Wait(wxMutex& mutex, unsigned long sec, - unsigned long nsec) -{ - mutex.Unlock(); - p_internal->waiters++; - - // TODO wait here - p_internal->waiters--; - mutex.Lock(); - - return FALSE; -} - -void wxCondition::Signal() -{ - // TODO -} - -void wxCondition::Broadcast() -{ - // TODO -} - -class wxThreadInternal { -public: - // TODO -}; - -wxThreadError wxThread::Create() -{ - // TODO - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Destroy() -{ - // TODO - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Pause() -{ - // TODO - return THREAD_NO_ERROR; -} - -wxThreadError wxThread::Resume() -{ - // TODO - return THREAD_NO_ERROR; -} - -void wxThread::Exit(void *status) -{ - // TODO -} - -void wxThread::SetPriority(int prio) -{ - // TODO -} - -int wxThread::GetPriority() const -{ - // TODO - return 0; -} - -void wxThread::DeferDestroy(bool on) -{ - // TODO -} - -void wxThread::TestDestroy() -{ - // TODO -} - -void *wxThread::Join() -{ - // TODO - return (void*) NULL; -} - -unsigned long wxThread::GetID() const -{ - // TODO - return 0; -} - -wxThread *wxThread::GetThreadFromID(unsigned long id) -{ - // TODO - return NULL; -} - -bool wxThread::IsAlive() const -{ - // TODO - return FALSE; -} - -bool wxThread::IsRunning() const -{ - // TODO - return FALSE; -} - -bool wxThread::IsMain() -{ - // TODO - return FALSE; -} - -wxThread::wxThread() -{ - p_internal = new wxThreadInternal(); - - // TODO -} - -wxThread::~wxThread() -{ - Destroy(); - Join(); - delete p_internal; -} - -// The default callback just joins the thread and throws away the result. -void wxThread::OnExit() -{ - Join(); -} - -// Automatic initialization -class wxThreadModule : public wxModule { - DECLARE_DYNAMIC_CLASS(wxThreadModule) -public: - virtual bool OnInit() { - /* TODO p_mainid = GetCurrentThread(); */ - wxMainMutex.Lock(); - return TRUE; - } - - // Global cleanup - virtual void OnExit() { - wxMainMutex.Unlock(); - } -}; - -IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule) - diff --git a/src/stubs/timer.cpp b/src/stubs/timer.cpp deleted file mode 100644 index 5262040cf6..0000000000 --- a/src/stubs/timer.cpp +++ /dev/null @@ -1,52 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: timer.cpp -// Purpose: wxTimer implementation -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "timer.h" -#endif - -#include "wx/timer.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject) -#endif - -wxTimer::wxTimer() -{ - m_milli = 0 ; - m_id = 0; - m_oneShot = FALSE; -} - -wxTimer::~wxTimer() -{ - Stop(); -} - -bool wxTimer::Start(int milliseconds,bool mode) -{ - m_oneShot = mode ; - if (milliseconds <= 0) - return FALSE; - - m_milli = milliseconds; - - // TODO: set the timer going. - return FALSE; -} - -void wxTimer::Stop() -{ - m_id = 0 ; - m_milli = 0 ; -} - - diff --git a/src/stubs/toolbar.cpp b/src/stubs/toolbar.cpp deleted file mode 100644 index ab0ace8901..0000000000 --- a/src/stubs/toolbar.cpp +++ /dev/null @@ -1,145 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: toolbar.cpp -// Purpose: wxToolBar -// Author: AUTHOR -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "toolbar.h" -#endif - -#include "wx/wx.h" -#include "wx/toolbar.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxToolBarBase) - -BEGIN_EVENT_TABLE(wxToolBar, wxToolBarBase) -END_EVENT_TABLE() -#endif - -wxToolBar::wxToolBar() -{ - m_maxWidth = -1; - m_maxHeight = -1; - m_defaultWidth = 24; - m_defaultHeight = 22; - // TODO -} - -bool wxToolBar::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style, const wxString& name) -{ - m_maxWidth = -1; - m_maxHeight = -1; - - m_defaultWidth = 24; - m_defaultHeight = 22; - SetName(name); - - m_windowStyle = style; - - SetParent(parent); - - if (parent) parent->AddChild(this); - - // TODO create toolbar - - return FALSE; -} - -wxToolBar::~wxToolBar() -{ - // TODO -} - -bool wxToolBar::CreateTools() -{ - if (m_tools.Number() == 0) - return FALSE; - - // TODO - return FALSE; -} - -void wxToolBar::SetToolBitmapSize(const wxSize& size) -{ - m_defaultWidth = size.x; m_defaultHeight = size.y; - // TODO -} - -wxSize wxToolBar::GetMaxSize() const -{ - // TODO - return wxSize(0, 0); -} - -// The button size is bigger than the bitmap size -wxSize wxToolBar::GetToolSize() const -{ - // TODO - return wxSize(m_defaultWidth + 8, m_defaultHeight + 7); -} - -void wxToolBar::EnableTool(int toolIndex, bool enable) -{ - wxNode *node = m_tools.Find((long)toolIndex); - if (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - tool->m_enabled = enable; - // TODO enable button - } -} - -void wxToolBar::ToggleTool(int toolIndex, bool toggle) -{ - wxNode *node = m_tools.Find((long)toolIndex); - if (node) - { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - if (tool->m_isToggle) - { - tool->m_toggleState = toggle; - // TODO: set toggle state - } - } -} - -void wxToolBar::ClearTools() -{ - // TODO - wxToolBarBase::ClearTools(); -} - -// If pushedBitmap is NULL, a reversed version of bitmap is -// created and used as the pushed/toggled image. -// If toggle is TRUE, the button toggles between the two states. - -wxToolBarTool *wxToolBar::AddTool(int index, const wxBitmap& bitmap, const wxBitmap& pushedBitmap, - bool toggle, long xPos, long yPos, wxObject *clientData, const wxString& helpString1, const wxString& helpString2) -{ - wxToolBarTool *tool = new wxToolBarTool(index, bitmap, (wxBitmap *)NULL, toggle, xPos, yPos, helpString1, helpString2); - tool->m_clientData = clientData; - - if (xPos > -1) - tool->m_x = xPos; - else - tool->m_x = m_xMargin; - - if (yPos > -1) - tool->m_y = yPos; - else - tool->m_y = m_yMargin; - - tool->SetSize(GetDefaultButtonWidth(), GetDefaultButtonHeight()); - - m_tools.Append((long)index, tool); - return tool; -} - diff --git a/src/stubs/treectrl.cpp b/src/stubs/treectrl.cpp deleted file mode 100644 index 5f346b38bc..0000000000 --- a/src/stubs/treectrl.cpp +++ /dev/null @@ -1,418 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: treectrl.cpp -// Purpose: wxTreeCtrl. See also Robert's generic wxTreeCtrl. -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "treectrl.h" -#endif - -#include "wx/stubs/textctrl.h" -#include "wx/stubs/treectrl.h" - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxTreeCtrl, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxTreeItem, wxObject) - -#endif - -wxTreeCtrl::wxTreeCtrl() -{ - m_imageListNormal = NULL; - m_imageListState = NULL; - m_textCtrl = NULL; -} - -bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style, const wxValidator& validator, const wxString& name) -{ - SetName(name); - SetValidator(validator); - - m_imageListNormal = NULL; - m_imageListState = NULL; - m_textCtrl = NULL; - - m_windowStyle = style; - - SetParent(parent); - - m_windowId = (id == -1) ? NewControlId() : id; - - if (parent) parent->AddChild(this); - - // TODO create tree control - - return FALSE; -} - -wxTreeCtrl::~wxTreeCtrl() -{ - if (m_textCtrl) - { - delete m_textCtrl; - } -} - -// Attributes -int wxTreeCtrl::GetCount() const -{ - // TODO - return 0; -} - -int wxTreeCtrl::GetIndent() const -{ - // TODO - return 0; -} - -void wxTreeCtrl::SetIndent(int indent) -{ - // TODO -} - -wxImageList *wxTreeCtrl::GetImageList(int which) const -{ - if ( which == wxIMAGE_LIST_NORMAL ) - { - return m_imageListNormal; - } - else if ( which == wxIMAGE_LIST_STATE ) - { - return m_imageListState; - } - return NULL; -} - -void wxTreeCtrl::SetImageList(wxImageList *imageList, int which) -{ - if ( which == wxIMAGE_LIST_NORMAL ) - { - m_imageListNormal = imageList; - } - else if ( which == wxIMAGE_LIST_STATE ) - { - m_imageListState = imageList; - } - // TODO -} - -long wxTreeCtrl::GetNextItem(long item, int code) const -{ - // TODO - return 0; -} - -bool wxTreeCtrl::ItemHasChildren(long item) const -{ - // TODO - return FALSE; -} - -long wxTreeCtrl::GetChild(long item) const -{ - // TODO - return 0; -} - -long wxTreeCtrl::GetParent(long item) const -{ - // TODO - return 0; -} - -long wxTreeCtrl::GetFirstVisibleItem() const -{ - // TODO - return 0; -} - -long wxTreeCtrl::GetNextVisibleItem(long item) const -{ - // TODO - return 0; -} - -long wxTreeCtrl::GetSelection() const -{ - // TODO - return 0; -} - -long wxTreeCtrl::GetRootItem() const -{ - // TODO - return 0; -} - -bool wxTreeCtrl::GetItem(wxTreeItem& info) const -{ - // TODO - return FALSE; -} - -bool wxTreeCtrl::SetItem(wxTreeItem& info) -{ - // TODO - return FALSE; -} - -int wxTreeCtrl::GetItemState(long item, long stateMask) const -{ - wxTreeItem info; - - info.m_mask = wxTREE_MASK_STATE ; - info.m_stateMask = stateMask; - info.m_itemId = item; - - if (!GetItem(info)) - return 0; - - return info.m_state; -} - -bool wxTreeCtrl::SetItemState(long item, long state, long stateMask) -{ - wxTreeItem info; - - info.m_mask = wxTREE_MASK_STATE ; - info.m_state = state; - info.m_stateMask = stateMask; - info.m_itemId = item; - - return SetItem(info); -} - -bool wxTreeCtrl::SetItemImage(long item, int image, int selImage) -{ - wxTreeItem info; - - info.m_mask = wxTREE_MASK_IMAGE ; - info.m_image = image; - if ( selImage > -1) - { - info.m_selectedImage = selImage; - info.m_mask |= wxTREE_MASK_SELECTED_IMAGE; - } - info.m_itemId = item; - - return SetItem(info); -} - -wxString wxTreeCtrl::GetItemText(long item) const -{ - wxTreeItem info; - - info.m_mask = wxTREE_MASK_TEXT ; - info.m_itemId = item; - - if (!GetItem(info)) - return wxString(""); - return info.m_text; -} - -void wxTreeCtrl::SetItemText(long item, const wxString& str) -{ - wxTreeItem info; - - info.m_mask = wxTREE_MASK_TEXT ; - info.m_itemId = item; - info.m_text = str; - - SetItem(info); -} - -long wxTreeCtrl::GetItemData(long item) const -{ - wxTreeItem info; - - info.m_mask = wxTREE_MASK_DATA ; - info.m_itemId = item; - - if (!GetItem(info)) - return 0; - return info.m_data; -} - -bool wxTreeCtrl::SetItemData(long item, long data) -{ - wxTreeItem info; - - info.m_mask = wxTREE_MASK_DATA ; - info.m_itemId = item; - info.m_data = data; - - return SetItem(info); -} - -bool wxTreeCtrl::GetItemRect(long item, wxRectangle& rect, bool textOnly) const -{ - // TODO - return FALSE; -} - -wxTextCtrl* wxTreeCtrl::GetEditControl() const -{ - return m_textCtrl; -} - -// Operations -bool wxTreeCtrl::DeleteItem(long item) -{ - // TODO - return FALSE; -} - -bool wxTreeCtrl::ExpandItem(long item, int action) -{ - // TODO - switch ( action ) - { - case wxTREE_EXPAND_EXPAND: - break; - - case wxTREE_EXPAND_COLLAPSE: - break; - - case wxTREE_EXPAND_COLLAPSE_RESET: - break; - - case wxTREE_EXPAND_TOGGLE: - break; - - default: - wxFAIL_MSG("unknown action in wxTreeCtrl::ExpandItem"); - } - - bool bOk = FALSE; // TODO expand item - - // May not send messages, so emulate them - if ( bOk ) { - wxTreeEvent event(wxEVT_NULL, m_windowId); - event.m_item.m_itemId = item; - event.m_item.m_mask = - event.m_item.m_stateMask = 0xffff; // get all - GetItem(event.m_item); - - bool bIsExpanded = (event.m_item.m_state & wxTREE_STATE_EXPANDED) != 0; - - event.m_code = action; - event.SetEventObject(this); - - // @@@ return values of {EXPAND|COLLAPS}ING event handler is discarded - event.SetEventType(bIsExpanded ? wxEVT_COMMAND_TREE_ITEM_EXPANDING - : wxEVT_COMMAND_TREE_ITEM_COLLAPSING); - GetEventHandler()->ProcessEvent(event); - - event.SetEventType(bIsExpanded ? wxEVT_COMMAND_TREE_ITEM_EXPANDED - : wxEVT_COMMAND_TREE_ITEM_COLLAPSED); - GetEventHandler()->ProcessEvent(event); - } - - return bOk; -} - -long wxTreeCtrl::InsertItem(long parent, wxTreeItem& info, long insertAfter) -{ - // TODO - return 0; -} - -long wxTreeCtrl::InsertItem(long parent, const wxString& label, int image, int selImage, - long insertAfter) -{ - wxTreeItem info; - info.m_text = label; - info.m_mask = wxTREE_MASK_TEXT; - if ( image > -1 ) - { - info.m_mask |= wxTREE_MASK_IMAGE | wxTREE_MASK_SELECTED_IMAGE; - info.m_image = image; - if ( selImage == -1 ) - info.m_selectedImage = image; - else - info.m_selectedImage = selImage; - } - - return InsertItem(parent, info, insertAfter); -} - -bool wxTreeCtrl::SelectItem(long item) -{ - // TODO - return FALSE; -} - -bool wxTreeCtrl::ScrollTo(long item) -{ - // TODO - return FALSE; -} - -bool wxTreeCtrl::DeleteAllItems() -{ - // TODO - return FALSE; -} - -wxTextCtrl* wxTreeCtrl::EditLabel(long item, wxClassInfo* textControlClass) -{ - // TODO - return NULL; -} - -// End label editing, optionally cancelling the edit -bool wxTreeCtrl::EndEditLabel(bool cancel) -{ - // TODO - return FALSE; -} - -long wxTreeCtrl::HitTest(const wxPoint& point, int& flags) -{ - // TODO - return 0; -} - -bool wxTreeCtrl::SortChildren(long item) -{ - // TODO - return FALSE; -} - -bool wxTreeCtrl::EnsureVisible(long item) -{ - // TODO - return FALSE; -} - -// Tree item structure -wxTreeItem::wxTreeItem() -{ - m_mask = 0; - m_itemId = 0; - m_state = 0; - m_stateMask = 0; - m_image = -1; - m_selectedImage = -1; - m_children = 0; - m_data = 0; -} - -// Tree event -IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent, wxCommandEvent) - -wxTreeEvent::wxTreeEvent(wxEventType commandType, int id): - wxCommandEvent(commandType, id) -{ - m_code = 0; - m_oldItem = 0; -} - diff --git a/src/stubs/utils.cpp b/src/stubs/utils.cpp deleted file mode 100644 index 8d9cbf0387..0000000000 --- a/src/stubs/utils.cpp +++ /dev/null @@ -1,272 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: utils.cpp -// Purpose: Various utilities -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// Note: this is done in utilscmn.cpp now. -// #pragma implementation -// #pragma implementation "utils.h" -#endif - -#include "wx/setup.h" -#include "wx/utils.h" -#include "wx/app.h" - -#include - -#include -#include -#include -#include - -// Get full hostname (eg. DoDo.BSn-Germany.crg.de) -bool wxGetHostName(char *buf, int maxSize) -{ - // TODO - return FALSE; -} - -// Get user ID e.g. jacs -bool wxGetUserId(char *buf, int maxSize) -{ - // TODO - return FALSE; -} - -// Get user name e.g. AUTHOR -bool wxGetUserName(char *buf, int maxSize) -{ - // TODO - return FALSE; -} - -int wxKill(long pid, int sig) -{ - // TODO - return 0; -} - -// -// Execute a program in an Interactive Shell -// -bool wxShell(const wxString& command) -{ - // TODO - return FALSE; -} - -// Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX) -long wxGetFreeMemory() -{ - // TODO - return 0; -} - -void wxSleep(int nSecs) -{ - // TODO -} - -// Consume all events until no more left -void wxFlushEvents() -{ -} - -// Output a debug message, in a system dependent fashion. -void wxDebugMsg(const char *fmt ...) -{ - va_list ap; - static char buffer[512]; - - if (!wxTheApp->GetWantDebugOutput()) - return ; - - va_start(ap, fmt); - - // wvsprintf(buffer,fmt,ap) ; - // TODO: output buffer - - va_end(ap); -} - -// Non-fatal error: pop up message box and (possibly) continue -void wxError(const wxString& msg, const wxString& title) -{ - // TODO - wxExit(); -} - -// Fatal error: pop up message box and abort -void wxFatalError(const wxString& msg, const wxString& title) -{ - // TODO -} - -// Emit a beeeeeep -void wxBell() -{ - // TODO -} - -int wxGetOsVersion(int *majorVsn, int *minorVsn) -{ - // TODO - return 0; -} - -// Reading and writing resources (eg WIN.INI, .Xdefaults) -#if USE_RESOURCES -bool wxWriteResource(const wxString& section, const wxString& entry, const wxString& value, const wxString& file) -{ - // TODO - return FALSE; -} - -bool wxWriteResource(const wxString& section, const wxString& entry, float value, const wxString& file) -{ - char buf[50]; - sprintf(buf, "%.4f", value); - return wxWriteResource(section, entry, buf, file); -} - -bool wxWriteResource(const wxString& section, const wxString& entry, long value, const wxString& file) -{ - char buf[50]; - sprintf(buf, "%ld", value); - return wxWriteResource(section, entry, buf, file); -} - -bool wxWriteResource(const wxString& section, const wxString& entry, int value, const wxString& file) -{ - char buf[50]; - sprintf(buf, "%d", value); - return wxWriteResource(section, entry, buf, file); -} - -bool wxGetResource(const wxString& section, const wxString& entry, char **value, const wxString& file) -{ - // TODO - return FALSE; -} - -bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file) -{ - char *s = NULL; - bool succ = wxGetResource(section, entry, (char **)&s, file); - if (succ) - { - *value = (float)strtod(s, NULL); - delete[] s; - return TRUE; - } - else return FALSE; -} - -bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file) -{ - char *s = NULL; - bool succ = wxGetResource(section, entry, (char **)&s, file); - if (succ) - { - *value = strtol(s, NULL, 10); - delete[] s; - return TRUE; - } - else return FALSE; -} - -bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file) -{ - char *s = NULL; - bool succ = wxGetResource(section, entry, (char **)&s, file); - if (succ) - { - *value = (int)strtol(s, NULL, 10); - delete[] s; - return TRUE; - } - else return FALSE; -} -#endif // USE_RESOURCES - -static int wxBusyCursorCount = 0; - -// Set the cursor to the busy cursor for all windows -void wxBeginBusyCursor(wxCursor *cursor) -{ - wxBusyCursorCount ++; - if (wxBusyCursorCount == 1) - { - // TODO - } - else - { - // TODO - } -} - -// Restore cursor to normal -void wxEndBusyCursor() -{ - if (wxBusyCursorCount == 0) - return; - - wxBusyCursorCount --; - if (wxBusyCursorCount == 0) - { - // TODO - } -} - -// TRUE if we're between the above two calls -bool wxIsBusy() -{ - return (wxBusyCursorCount > 0); -} - -char *wxGetUserHome (const wxString& user) -{ - // TODO - return NULL; -} - -// Check whether this window wants to process messages, e.g. Stop button -// in long calculations. -bool wxCheckForInterrupt(wxWindow *wnd) -{ - // TODO - return FALSE; -} - -void wxGetMousePosition( int* x, int* y ) -{ - // TODO -}; - -// Return TRUE if we have a colour display -bool wxColourDisplay() -{ - // TODO - return TRUE; -} - -// Returns depth of screen -int wxDisplayDepth() -{ - // TODO - return 0; -} - -// Get size of display -void wxDisplaySize(int *width, int *height) -{ - // TODO -} - diff --git a/src/stubs/utilsexc.cpp b/src/stubs/utilsexc.cpp deleted file mode 100644 index b842d08e90..0000000000 --- a/src/stubs/utilsexc.cpp +++ /dev/null @@ -1,28 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: utilsexec.cpp -// Purpose: Execution-related utilities -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#endif - -#include "wx/utils.h" - -#include -#include -#include - -#define wxEXECUTE_WIN_MESSAGE 10000 - -long wxExecute(const wxString& command, bool sync, wxProcess *handler) -{ - // TODO - return 0; -} diff --git a/src/stubs/wave.cpp b/src/stubs/wave.cpp deleted file mode 100644 index eb3a2603ad..0000000000 --- a/src/stubs/wave.cpp +++ /dev/null @@ -1,61 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: wave.cpp -// Purpose: wxWave class implementation: optional -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "wave.h" -#endif - -#include "wx/object.h" -#include "wx/string.h" -#include "wx/stubs/wave.h" - -wxWave::wxWave() - : m_waveLength(0), m_isResource(FALSE), m_waveData(NULL) -{ -} - -wxWave::wxWave(const wxString& sFileName, bool isResource) - : m_waveLength(0), m_isResource(isResource), m_waveData(NULL) -{ - Create(sFileName, isResource); -} - - -wxWave::~wxWave() -{ - Free(); -} - -bool wxWave::Create(const wxString& fileName, bool isResource) -{ - Free(); - - // TODO - - return FALSE; -} - -bool wxWave::Play(bool async, bool looped) const -{ - if (!IsOk()) - return FALSE; - - // TODO - return FALSE; -} - -bool wxWave::Free() -{ - // TODO - return FALSE; -} - - diff --git a/src/stubs/window.cpp b/src/stubs/window.cpp deleted file mode 100644 index 22f44f8b8d..0000000000 --- a/src/stubs/window.cpp +++ /dev/null @@ -1,1283 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: windows.cpp -// Purpose: wxWindow -// Author: AUTHOR -// Modified by: -// Created: ??/??/98 -// RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "window.h" -#endif - -#include "wx/setup.h" -#include "wx/menu.h" -#include "wx/dc.h" -#include "wx/dcclient.h" -#include "wx/utils.h" -#include "wx/app.h" -#include "wx/panel.h" -#include "wx/layout.h" -#include "wx/dialog.h" -#include "wx/listbox.h" -#include "wx/button.h" -#include "wx/settings.h" -#include "wx/msgdlg.h" -#include "wx/frame.h" - -#include "wx/menuitem.h" -#include "wx/log.h" - -#if USE_DRAG_AND_DROP -#include "wx/dnd.h" -#endif - -#include - -extern wxList wxPendingDelete; - -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxEvtHandler) - -BEGIN_EVENT_TABLE(wxWindow, wxEvtHandler) - EVT_CHAR(wxWindow::OnChar) - EVT_ERASE_BACKGROUND(wxWindow::OnEraseBackground) - EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged) - EVT_INIT_DIALOG(wxWindow::OnInitDialog) - EVT_IDLE(wxWindow::OnIdle) -END_EVENT_TABLE() - -#endif - - -// Constructor -wxWindow::wxWindow() -{ - // Generic - m_windowId = 0; - m_windowStyle = 0; - m_windowParent = NULL; - m_windowEventHandler = this; - m_windowName = ""; - m_windowCursor = *wxSTANDARD_CURSOR; - m_children = new wxList; - m_constraints = NULL; - m_constraintsInvolvedIn = NULL; - m_windowSizer = NULL; - m_sizerParent = NULL; - m_autoLayout = FALSE; - m_windowValidator = NULL; - m_defaultItem = NULL; - m_returnCode = 0; - m_caretWidth = 0; m_caretHeight = 0; - m_caretEnabled = FALSE; - m_caretShown = FALSE; - m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) ; ; - m_foregroundColour = *wxBLACK; - m_defaultForegroundColour = *wxBLACK ; - m_defaultBackgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE) ; - -#if USE_DRAG_AND_DROP - m_pDropTarget = NULL; -#endif -} - -// Destructor -wxWindow::~wxWindow() -{ - // Have to delete constraints/sizer FIRST otherwise - // sizers may try to look at deleted windows as they - // delete themselves. -#if USE_CONSTRAINTS - DeleteRelatedConstraints(); - if (m_constraints) - { - // This removes any dangling pointers to this window - // in other windows' constraintsInvolvedIn lists. - UnsetConstraints(m_constraints); - delete m_constraints; - m_constraints = NULL; - } - if (m_windowSizer) - { - delete m_windowSizer; - m_windowSizer = NULL; - } - // If this is a child of a sizer, remove self from parent - if (m_sizerParent) - m_sizerParent->RemoveChild((wxWindow *)this); -#endif - - if (m_windowParent) - m_windowParent->RemoveChild(this); - - DestroyChildren(); - - // TODO: destroy the window - - delete m_children; - m_children = NULL; - - // Just in case the window has been Closed, but - // we're then deleting immediately: don't leave - // dangling pointers. - wxPendingDelete.DeleteObject(this); - - if ( m_windowValidator ) - delete m_windowValidator; -} - -// Destroy the window (delayed, if a managed window) -bool wxWindow::Destroy() -{ - delete this; - return TRUE; -} - -// Constructor -bool wxWindow::Create(wxWindow *parent, wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - // Generic - m_windowId = 0; - m_windowStyle = 0; - m_windowParent = NULL; - m_windowEventHandler = this; - m_windowName = ""; - m_windowCursor = *wxSTANDARD_CURSOR; - m_constraints = NULL; - m_constraintsInvolvedIn = NULL; - m_windowSizer = NULL; - m_sizerParent = NULL; - m_autoLayout = FALSE; - m_windowValidator = NULL; - -#if USE_DRAG_AND_DROP - m_pDropTarget = NULL; -#endif - - m_caretWidth = 0; m_caretHeight = 0; - m_caretEnabled = FALSE; - m_caretShown = FALSE; - m_minSizeX = -1; - m_minSizeY = -1; - m_maxSizeX = -1; - m_maxSizeY = -1; - m_defaultItem = NULL; - m_windowParent = NULL; - if (!parent) - return FALSE; - - if (parent) parent->AddChild(this); - - m_returnCode = 0; - - SetName(name); - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) ; ; - m_foregroundColour = *wxBLACK; - m_defaultForegroundColour = *wxBLACK ; - m_defaultBackgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE) ; - - m_windowStyle = style; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - // TODO: create the window - - return TRUE; -} - -void wxWindow::SetFocus() -{ - // TODO -} - -void wxWindow::Enable(bool enable) -{ - // TODO -} - -void wxWindow::CaptureMouse() -{ - // TODO -} - -void wxWindow::ReleaseMouse() -{ - // TODO -} - -// Push/pop event handler (i.e. allow a chain of event handlers -// be searched) -void wxWindow::PushEventHandler(wxEvtHandler *handler) -{ - handler->SetNextHandler(GetEventHandler()); - SetEventHandler(handler); -} - -wxEvtHandler *wxWindow::PopEventHandler(bool deleteHandler) -{ - if ( GetEventHandler() ) - { - wxEvtHandler *handlerA = GetEventHandler(); - wxEvtHandler *handlerB = handlerA->GetNextHandler(); - handlerA->SetNextHandler(NULL); - SetEventHandler(handlerB); - if ( deleteHandler ) - { - delete handlerA; - return NULL; - } - else - return handlerA; - } - else - return NULL; -} - -#if USE_DRAG_AND_DROP - -void wxWindow::SetDropTarget(wxDropTarget *pDropTarget) -{ - if ( m_pDropTarget != 0 ) { - delete m_pDropTarget; - } - - m_pDropTarget = pDropTarget; - if ( m_pDropTarget != 0 ) - { - // TODO - } -} - -#endif - -// Old style file-manager drag&drop -void wxWindow::DragAcceptFiles(bool accept) -{ - // TODO -} - -// Get total size -void wxWindow::GetSize(int *x, int *y) const -{ - // TODO -} - -void wxWindow::GetPosition(int *x, int *y) const -{ - // TODO -} - -void wxWindow::ScreenToClient(int *x, int *y) const -{ - // TODO -} - -void wxWindow::ClientToScreen(int *x, int *y) const -{ - // TODO -} - -void wxWindow::SetCursor(const wxCursor& cursor) -{ - m_windowCursor = cursor; - if (m_windowCursor.Ok()) - { - // TODO - } -} - - -// Get size *available for subwindows* i.e. excluding menu bar etc. -void wxWindow::GetClientSize(int *x, int *y) const -{ - // TODO -} - -void wxWindow::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - // TODO -} - -void wxWindow::SetClientSize(int width, int height) -{ - // TODO -} - -// For implementation purposes - sometimes decorations make the client area -// smaller -wxPoint wxWindow::GetClientAreaOrigin() const -{ - return wxPoint(0, 0); -} - -// Makes an adjustment to the window position (for example, a frame that has -// a toolbar that it manages itself). -void wxWindow::AdjustForParentClientOrigin(int& x, int& y, int sizeFlags) -{ - if (((sizeFlags & wxSIZE_NO_ADJUSTMENTS) == 0) && GetParent()) - { - wxPoint pt(GetParent()->GetClientAreaOrigin()); - x += pt.x; y += pt.y; - } -} - -bool wxWindow::Show(bool show) -{ - // TODO - return FALSE; -} - -bool wxWindow::IsShown() const -{ - // TODO - return FALSE; -} - -int wxWindow::GetCharHeight() const -{ - // TODO - return 0; -} - -int wxWindow::GetCharWidth() const -{ - // TODO - return 0; -} - -void wxWindow::GetTextExtent(const wxString& string, int *x, int *y, - int *descent, int *externalLeading, const wxFont *theFont, bool) const -{ - wxFont *fontToUse = (wxFont *)theFont; - if (!fontToUse) - fontToUse = (wxFont *) & m_windowFont; - - // TODO -} - -void wxWindow::Refresh(bool eraseBack, const wxRectangle *rect) -{ - // TODO -} - -// Responds to colour changes: passes event on to children. -void wxWindow::OnSysColourChanged(wxSysColourChangedEvent& event) -{ - wxNode *node = GetChildren()->First(); - while ( node ) - { - // Only propagate to non-top-level windows - wxWindow *win = (wxWindow *)node->Data(); - if ( win->GetParent() ) - { - wxSysColourChangedEvent event2; - event.m_eventObject = win; - win->GetEventHandler()->ProcessEvent(event2); - } - - node = node->Next(); - } -} - -// This can be called by the app (or wxWindows) to do default processing for the current -// event. Save message/event info in wxWindow so they can be used in this function. -long wxWindow::Default() -{ - // TODO - return 0; -} - -void wxWindow::InitDialog() -{ - wxInitDialogEvent event(GetId()); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); -} - -// Default init dialog behaviour is to transfer data to window -void wxWindow::OnInitDialog(wxInitDialogEvent& event) -{ - TransferDataToWindow(); -} - -// Caret manipulation -void wxWindow::CreateCaret(int w, int h) -{ - m_caretWidth = w; - m_caretHeight = h; - m_caretEnabled = TRUE; -} - -void wxWindow::CreateCaret(const wxBitmap *WXUNUSED(bitmap)) -{ - // TODO -} - -void wxWindow::ShowCaret(bool show) -{ - // TODO -} - -void wxWindow::DestroyCaret() -{ - // TODO - m_caretEnabled = FALSE; -} - -void wxWindow::SetCaretPos(int x, int y) -{ - // TODO -} - -void wxWindow::GetCaretPos(int *x, int *y) const -{ - // TODO -} - -wxWindow *wxGetActiveWindow() -{ - // TODO - return NULL; -} - -void wxWindow::SetSizeHints(int minW, int minH, int maxW, int maxH, int WXUNUSED(incW), int WXUNUSED(incH)) -{ - m_minSizeX = minW; - m_minSizeY = minH; - m_maxSizeX = maxW; - m_maxSizeY = maxH; -} - -void wxWindow::Centre(int direction) -{ - int x, y, width, height, panel_width, panel_height, new_x, new_y; - - wxWindow *father = (wxWindow *)GetParent(); - if (!father) - return; - - father->GetClientSize(&panel_width, &panel_height); - GetSize(&width, &height); - GetPosition(&x, &y); - - new_x = -1; - new_y = -1; - - if (direction & wxHORIZONTAL) - new_x = (int)((panel_width - width)/2); - - if (direction & wxVERTICAL) - new_y = (int)((panel_height - height)/2); - - SetSize(new_x, new_y, -1, -1); - -} - -// Coordinates relative to the window -void wxWindow::WarpPointer (int x_pos, int y_pos) -{ - // TODO -} - -void wxWindow::OnEraseBackground(wxEraseEvent& event) -{ - // TODO - Default(); -} - -int wxWindow::GetScrollPos(int orient) const -{ - // TODO - return 0; -} - -// This now returns the whole range, not just the number -// of positions that we can scroll. -int wxWindow::GetScrollRange(int orient) const -{ - // TODO - return 0; -} - -int wxWindow::GetScrollThumb(int orient) const -{ - // TODO - return 0; -} - -void wxWindow::SetScrollPos(int orient, int pos, bool refresh) -{ - // TODO - return; -} - -// New function that will replace some of the above. -void wxWindow::SetScrollbar(int orient, int pos, int thumbVisible, - int range, bool refresh) -{ - // TODO -} - -// Does a physical scroll -void wxWindow::ScrollWindow(int dx, int dy, const wxRectangle *rect) -{ - // TODO - return; -} - -void wxWindow::SetFont(const wxFont& font) -{ - m_windowFont = font; - - if (!m_windowFont.Ok()) - return; - // TODO -} - -void wxWindow::OnChar(wxKeyEvent& event) -{ - if ( event.KeyCode() == WXK_TAB ) { - // propagate the TABs to the parent - it's up to it to decide what - // to do with it - if ( GetParent() ) { - if ( GetParent()->ProcessEvent(event) ) - return; - } - } -} - -void wxWindow::OnPaint(wxPaintEvent& event) -{ - Default(); -} - -bool wxWindow::IsEnabled() const -{ - // TODO - return FALSE; -} - -// Dialog support: override these and call -// base class members to add functionality -// that can't be done using validators. -// NOTE: these functions assume that controls -// are direct children of this window, not grandchildren -// or other levels of descendant. - -// Transfer values to controls. If returns FALSE, -// it's an application error (pops up a dialog) -bool wxWindow::TransferDataToWindow() -{ - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow *child = (wxWindow *)node->Data(); - if ( child->GetValidator() && - !child->GetValidator()->TransferToWindow() ) - { - wxMessageBox("Application Error", "Could not transfer data to window", wxOK|wxICON_EXCLAMATION); - return FALSE; - } - - node = node->Next(); - } - return TRUE; -} - -// Transfer values from controls. If returns FALSE, -// validation failed: don't quit -bool wxWindow::TransferDataFromWindow() -{ - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow *child = (wxWindow *)node->Data(); - if ( child->GetValidator() && !child->GetValidator()->TransferFromWindow() ) - { - return FALSE; - } - - node = node->Next(); - } - return TRUE; -} - -bool wxWindow::Validate() -{ - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow *child = (wxWindow *)node->Data(); - if ( child->GetValidator() && /* child->GetValidator()->Ok() && */ !child->GetValidator()->Validate(this) ) - { - return FALSE; - } - - node = node->Next(); - } - return TRUE; -} - -// Get the window with the focus -wxWindow *wxWindow::FindFocus() -{ - // TODO - return NULL; -} - -void wxWindow::AddChild(wxWindow *child) -{ - GetChildren()->Append(child); - child->m_windowParent = this; -} - -void wxWindow::RemoveChild(wxWindow *child) -{ - if (GetChildren()) - GetChildren()->DeleteObject(child); - child->m_windowParent = NULL; -} - -void wxWindow::DestroyChildren() -{ - if (GetChildren()) { - wxNode *node; - while ((node = GetChildren()->First()) != (wxNode *)NULL) { - wxWindow *child; - if ((child = (wxWindow *)node->Data()) != (wxWindow *)NULL) { - delete child; - if ( GetChildren()->Member(child) ) - delete node; - } - } /* while */ - } -} - -void wxWindow::MakeModal(bool modal) -{ - // Disable all other windows - if (this->IsKindOf(CLASSINFO(wxDialog)) || this->IsKindOf(CLASSINFO(wxFrame))) - { - wxNode *node = wxTopLevelWindows.First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (win != this) - win->Enable(!modal); - - node = node->Next(); - } - } -} - -void wxWindow::SetConstraints(wxLayoutConstraints *c) -{ - if (m_constraints) - { - UnsetConstraints(m_constraints); - delete m_constraints; - } - m_constraints = c; - if (m_constraints) - { - // Make sure other windows know they're part of a 'meaningful relationship' - if (m_constraints->left.GetOtherWindow() && (m_constraints->left.GetOtherWindow() != this)) - m_constraints->left.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->top.GetOtherWindow() && (m_constraints->top.GetOtherWindow() != this)) - m_constraints->top.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->right.GetOtherWindow() && (m_constraints->right.GetOtherWindow() != this)) - m_constraints->right.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->bottom.GetOtherWindow() && (m_constraints->bottom.GetOtherWindow() != this)) - m_constraints->bottom.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->width.GetOtherWindow() && (m_constraints->width.GetOtherWindow() != this)) - m_constraints->width.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->height.GetOtherWindow() && (m_constraints->height.GetOtherWindow() != this)) - m_constraints->height.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->centreX.GetOtherWindow() && (m_constraints->centreX.GetOtherWindow() != this)) - m_constraints->centreX.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - if (m_constraints->centreY.GetOtherWindow() && (m_constraints->centreY.GetOtherWindow() != this)) - m_constraints->centreY.GetOtherWindow()->AddConstraintReference((wxWindow *)this); - } -} - -// This removes any dangling pointers to this window -// in other windows' constraintsInvolvedIn lists. -void wxWindow::UnsetConstraints(wxLayoutConstraints *c) -{ - if (c) - { - if (c->left.GetOtherWindow() && (c->top.GetOtherWindow() != this)) - c->left.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->top.GetOtherWindow() && (c->top.GetOtherWindow() != this)) - c->top.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->right.GetOtherWindow() && (c->right.GetOtherWindow() != this)) - c->right.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->bottom.GetOtherWindow() && (c->bottom.GetOtherWindow() != this)) - c->bottom.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->width.GetOtherWindow() && (c->width.GetOtherWindow() != this)) - c->width.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->height.GetOtherWindow() && (c->height.GetOtherWindow() != this)) - c->height.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->centreX.GetOtherWindow() && (c->centreX.GetOtherWindow() != this)) - c->centreX.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - if (c->centreY.GetOtherWindow() && (c->centreY.GetOtherWindow() != this)) - c->centreY.GetOtherWindow()->RemoveConstraintReference((wxWindow *)this); - } -} - -// Back-pointer to other windows we're involved with, so if we delete -// this window, we must delete any constraints we're involved with. -void wxWindow::AddConstraintReference(wxWindow *otherWin) -{ - if (!m_constraintsInvolvedIn) - m_constraintsInvolvedIn = new wxList; - if (!m_constraintsInvolvedIn->Member(otherWin)) - m_constraintsInvolvedIn->Append(otherWin); -} - -// REMOVE back-pointer to other windows we're involved with. -void wxWindow::RemoveConstraintReference(wxWindow *otherWin) -{ - if (m_constraintsInvolvedIn) - m_constraintsInvolvedIn->DeleteObject(otherWin); -} - -// Reset any constraints that mention this window -void wxWindow::DeleteRelatedConstraints() -{ - if (m_constraintsInvolvedIn) - { - wxNode *node = m_constraintsInvolvedIn->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - wxNode *next = node->Next(); - wxLayoutConstraints *constr = win->GetConstraints(); - - // Reset any constraints involving this window - if (constr) - { - constr->left.ResetIfWin((wxWindow *)this); - constr->top.ResetIfWin((wxWindow *)this); - constr->right.ResetIfWin((wxWindow *)this); - constr->bottom.ResetIfWin((wxWindow *)this); - constr->width.ResetIfWin((wxWindow *)this); - constr->height.ResetIfWin((wxWindow *)this); - constr->centreX.ResetIfWin((wxWindow *)this); - constr->centreY.ResetIfWin((wxWindow *)this); - } - delete node; - node = next; - } - delete m_constraintsInvolvedIn; - m_constraintsInvolvedIn = NULL; - } -} - -void wxWindow::SetSizer(wxSizer *sizer) -{ - m_windowSizer = sizer; - if (sizer) - sizer->SetSizerParent((wxWindow *)this); -} - -/* - * New version - */ - -bool wxWindow::Layout() -{ - if (GetConstraints()) - { - int w, h; - GetClientSize(&w, &h); - GetConstraints()->width.SetValue(w); - GetConstraints()->height.SetValue(h); - } - - // If top level (one sizer), evaluate the sizer's constraints. - if (GetSizer()) - { - int noChanges; - GetSizer()->ResetConstraints(); // Mark all constraints as unevaluated - GetSizer()->LayoutPhase1(&noChanges); - GetSizer()->LayoutPhase2(&noChanges); - GetSizer()->SetConstraintSizes(); // Recursively set the real window sizes - return TRUE; - } - else - { - // Otherwise, evaluate child constraints - ResetConstraints(); // Mark all constraints as unevaluated - DoPhase(1); // Just one phase need if no sizers involved - DoPhase(2); - SetConstraintSizes(); // Recursively set the real window sizes - } - return TRUE; -} - - -// Do a phase of evaluating constraints: -// the default behaviour. wxSizers may do a similar -// thing, but also impose their own 'constraints' -// and order the evaluation differently. -bool wxWindow::LayoutPhase1(int *noChanges) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - return constr->SatisfyConstraints((wxWindow *)this, noChanges); - } - else - return TRUE; -} - -bool wxWindow::LayoutPhase2(int *noChanges) -{ - *noChanges = 0; - - // Layout children - DoPhase(1); - DoPhase(2); - return TRUE; -} - -// Do a phase of evaluating child constraints -bool wxWindow::DoPhase(int phase) -{ - int noIterations = 0; - int maxIterations = 500; - int noChanges = 1; - int noFailures = 0; - wxList succeeded; - while ((noChanges > 0) && (noIterations < maxIterations)) - { - noChanges = 0; - noFailures = 0; - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow *)node->Data(); - if (!child->IsKindOf(CLASSINFO(wxFrame)) && !child->IsKindOf(CLASSINFO(wxDialog))) - { - wxLayoutConstraints *constr = child->GetConstraints(); - if (constr) - { - if (succeeded.Member(child)) - { - } - else - { - int tempNoChanges = 0; - bool success = ( (phase == 1) ? child->LayoutPhase1(&tempNoChanges) : child->LayoutPhase2(&tempNoChanges) ) ; - noChanges += tempNoChanges; - if (success) - { - succeeded.Append(child); - } - } - } - } - node = node->Next(); - } - noIterations ++; - } - return TRUE; -} - -void wxWindow::ResetConstraints() -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - constr->left.SetDone(FALSE); - constr->top.SetDone(FALSE); - constr->right.SetDone(FALSE); - constr->bottom.SetDone(FALSE); - constr->width.SetDone(FALSE); - constr->height.SetDone(FALSE); - constr->centreX.SetDone(FALSE); - constr->centreY.SetDone(FALSE); - } - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (!win->IsKindOf(CLASSINFO(wxFrame)) && !win->IsKindOf(CLASSINFO(wxDialog))) - win->ResetConstraints(); - node = node->Next(); - } -} - -// Need to distinguish between setting the 'fake' size for -// windows and sizers, and setting the real values. -void wxWindow::SetConstraintSizes(bool recurse) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr && constr->left.GetDone() && constr->right.GetDone() && - constr->width.GetDone() && constr->height.GetDone()) - { - int x = constr->left.GetValue(); - int y = constr->top.GetValue(); - int w = constr->width.GetValue(); - int h = constr->height.GetValue(); - - // If we don't want to resize this window, just move it... - if ((constr->width.GetRelationship() != wxAsIs) || - (constr->height.GetRelationship() != wxAsIs)) - { - // Calls Layout() recursively. AAAGH. How can we stop that. - // Simply take Layout() out of non-top level OnSizes. - SizerSetSize(x, y, w, h); - } - else - { - SizerMove(x, y); - } - } - else if (constr) - { - char *windowClass = this->GetClassInfo()->GetClassName(); - - wxString winName; - if (GetName() == "") - winName = "unnamed"; - else - winName = GetName(); - wxDebugMsg("Constraint(s) not satisfied for window of type %s, name %s:\n", (const char *)windowClass, (const char *)winName); - if (!constr->left.GetDone()) - wxDebugMsg(" unsatisfied 'left' constraint.\n"); - if (!constr->right.GetDone()) - wxDebugMsg(" unsatisfied 'right' constraint.\n"); - if (!constr->width.GetDone()) - wxDebugMsg(" unsatisfied 'width' constraint.\n"); - if (!constr->height.GetDone()) - wxDebugMsg(" unsatisfied 'height' constraint.\n"); - wxDebugMsg("Please check constraints: try adding AsIs() constraints.\n"); - } - - if (recurse) - { - wxNode *node = GetChildren()->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (!win->IsKindOf(CLASSINFO(wxFrame)) && !win->IsKindOf(CLASSINFO(wxDialog))) - win->SetConstraintSizes(); - node = node->Next(); - } - } -} - -// This assumes that all sizers are 'on' the same -// window, i.e. the parent of this window. -void wxWindow::TransformSizerToActual(int *x, int *y) const -{ - if (!m_sizerParent || m_sizerParent->IsKindOf(CLASSINFO(wxDialog)) || - m_sizerParent->IsKindOf(CLASSINFO(wxFrame)) ) - return; - - int xp, yp; - m_sizerParent->GetPosition(&xp, &yp); - m_sizerParent->TransformSizerToActual(&xp, &yp); - *x += xp; - *y += yp; -} - -void wxWindow::SizerSetSize(int x, int y, int w, int h) -{ - int xx = x; - int yy = y; - TransformSizerToActual(&xx, &yy); - SetSize(xx, yy, w, h); -} - -void wxWindow::SizerMove(int x, int y) -{ - int xx = x; - int yy = y; - TransformSizerToActual(&xx, &yy); - Move(xx, yy); -} - -// Only set the size/position of the constraint (if any) -void wxWindow::SetSizeConstraint(int x, int y, int w, int h) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - if (x != -1) - { - constr->left.SetValue(x); - constr->left.SetDone(TRUE); - } - if (y != -1) - { - constr->top.SetValue(y); - constr->top.SetDone(TRUE); - } - if (w != -1) - { - constr->width.SetValue(w); - constr->width.SetDone(TRUE); - } - if (h != -1) - { - constr->height.SetValue(h); - constr->height.SetDone(TRUE); - } - } -} - -void wxWindow::MoveConstraint(int x, int y) -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - if (x != -1) - { - constr->left.SetValue(x); - constr->left.SetDone(TRUE); - } - if (y != -1) - { - constr->top.SetValue(y); - constr->top.SetDone(TRUE); - } - } -} - -void wxWindow::GetSizeConstraint(int *w, int *h) const -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - *w = constr->width.GetValue(); - *h = constr->height.GetValue(); - } - else - GetSize(w, h); -} - -void wxWindow::GetClientSizeConstraint(int *w, int *h) const -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - *w = constr->width.GetValue(); - *h = constr->height.GetValue(); - } - else - GetClientSize(w, h); -} - -void wxWindow::GetPositionConstraint(int *x, int *y) const -{ - wxLayoutConstraints *constr = GetConstraints(); - if (constr) - { - *x = constr->left.GetValue(); - *y = constr->top.GetValue(); - } - else - GetPosition(x, y); -} - -bool wxWindow::Close(bool force) -{ - wxCloseEvent event(wxEVT_CLOSE_WINDOW, m_windowId); - event.SetEventObject(this); - event.SetForce(force); - - return GetEventHandler()->ProcessEvent(event); -} - -wxObject* wxWindow::GetChild(int number) const -{ - // Return a pointer to the Nth object in the window - if (!GetChildren()) - return(NULL) ; - wxNode *node = GetChildren()->First(); - int n = number; - while (node && n--) - node = node->Next() ; - if (node) - { - wxObject *obj = (wxObject *)node->Data(); - return(obj) ; - } - else - return NULL ; -} - -void wxWindow::OnDefaultAction(wxControl *initiatingItem) -{ - // Obsolete function -} - -void wxWindow::Clear() -{ - wxClientDC dc(this); - wxBrush brush(GetBackgroundColour(), wxSOLID); - dc.SetBackground(brush); - dc.Clear(); -} - -// Fits the panel around the items -void wxWindow::Fit() -{ - int maxX = 0; - int maxY = 0; - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow *win = (wxWindow *)node->Data(); - int wx, wy, ww, wh; - win->GetPosition(&wx, &wy); - win->GetSize(&ww, &wh); - if ( wx + ww > maxX ) - maxX = wx + ww; - if ( wy + wh > maxY ) - maxY = wy + wh; - - node = node->Next(); - } - SetClientSize(maxX + 5, maxY + 5); -} - -void wxWindow::SetValidator(const wxValidator& validator) -{ - if ( m_windowValidator ) - delete m_windowValidator; - m_windowValidator = validator.Clone(); - - if ( m_windowValidator ) - m_windowValidator->SetWindow(this) ; -} - -// Find a window by id or name -wxWindow *wxWindow::FindWindow(long id) -{ - if ( GetId() == id) - return this; - - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow *child = (wxWindow *)node->Data(); - wxWindow *found = child->FindWindow(id); - if ( found ) - return found; - node = node->Next(); - } - return NULL; -} - -wxWindow *wxWindow::FindWindow(const wxString& name) -{ - if ( GetName() == name) - return this; - - wxNode *node = GetChildren()->First(); - while ( node ) - { - wxWindow *child = (wxWindow *)node->Data(); - wxWindow *found = child->FindWindow(name); - if ( found ) - return found; - node = node->Next(); - } - return NULL; -} - -void wxWindow::OnIdle(wxIdleEvent& event) -{ -/* TODO: you may need to do something like this - * if your GUI doesn't generate enter/leave events - - // Check if we need to send a LEAVE event - if (m_mouseInWindow) - { - POINT pt; - ::GetCursorPos(&pt); - if (::WindowFromPoint(pt) != (HWND) GetHWND()) - { - // Generate a LEAVE event - m_mouseInWindow = FALSE; - MSWOnMouseLeave(pt.x, pt.y, 0); - } - } -*/ - - // This calls the UI-update mechanism (querying windows for - // menu/toolbar/control state information) - UpdateWindowUI(); -} - -// Raise the window to the top of the Z order -void wxWindow::Raise() -{ - // TODO -} - -// Lower the window to the bottom of the Z order -void wxWindow::Lower() -{ - // TODO -} - -bool wxWindow::AcceptsFocus() const -{ - return IsShown() && IsEnabled(); -} - -// Update region access -wxRegion wxWindow::GetUpdateRegion() const -{ - return m_updateRegion; -} - -bool wxWindow::IsExposed(int x, int y, int w, int h) const -{ - return (m_updateRegion.Contains(x, y, w, h) != wxOutRegion); -} - -bool wxWindow::IsExposed(const wxPoint& pt) const -{ - return (m_updateRegion.Contains(pt) != wxOutRegion); -} - -bool wxWindow::IsExposed(const wxRect& rect) const -{ - return (m_updateRegion.Contains(rect) != wxOutRegion); -} - -/* - * Allocates control IDs - */ - -int wxWindow::NewControlId() -{ - static int s_controlId = 0; - s_controlId ++; - return s_controlId; -} - - diff --git a/src/zlib/ChangeLog b/src/zlib/ChangeLog deleted file mode 100644 index ae49267ddc..0000000000 --- a/src/zlib/ChangeLog +++ /dev/null @@ -1,423 +0,0 @@ - - ChangeLog file for zlib - -Changes in 1.1.2 (19 March 98) -- added contrib/minzip, mini zip and unzip based on zlib (Gilles Vollant) - See http://www.winimage.com/zLibDll/unzip.html -- preinitialize the inflate tables for fixed codes, to make the code - completely thread safe (Mark) -- some simplifications and slight speed-up to the inflate code (Mark) -- fix gzeof on non-compressed files (Allan Schrum) -- add -std1 option in configure for OSF1 to fix gzprintf (Martin Mokrejs) -- use default value of 4K for Z_BUFSIZE for 16-bit MSDOS (Tim Wegner + Glenn) -- added os2/Makefile.def and os2/zlib.def (Andrew Zabolotny) -- add shared lib support for UNIX_SV4.2MP (MATSUURA Takanori) -- do not wrap extern "C" around system includes (Tom Lane) -- mention zlib binding for TCL in README (Andreas Kupries) -- added amiga/Makefile.pup for Amiga powerUP SAS/C PPC (Andreas Kleinert) -- allow "make install prefix=..." even after configure (Glenn Randers-Pehrson) -- allow "configure --prefix $HOME" (Tim Mooney) -- remove warnings in example.c and gzio.c (Glenn Randers-Pehrson) -- move Makefile.sas to amiga/Makefile.sas - -Changes in 1.1.1 (27 Feb 98) -- fix macros _tr_tally_* in deflate.h for debug mode (Glenn Randers-Pehrson) -- remove block truncation heuristic which had very marginal effect for zlib - (smaller lit_bufsize than in gzip 1.2.4) and degraded a little the - compression ratio on some files. This also allows inlining _tr_tally for - matches in deflate_slow. -- added msdos/Makefile.w32 for WIN32 Microsoft Visual C++ (Bob Frazier) - -Changes in 1.1.0 (24 Feb 98) -- do not return STREAM_END prematurely in inflate (John Bowler) -- revert to the zlib 1.0.8 inflate to avoid the gcc 2.8.0 bug (Jeremy Buhler) -- compile with -DFASTEST to get compression code optimized for speed only -- in minigzip, try mmap'ing the input file first (Miguel Albrecht) -- increase size of I/O buffers in minigzip.c and gzio.c (not a big gain - on Sun but significant on HP) - -- add a pointer to experimental unzip library in README (Gilles Vollant) -- initialize variable gcc in configure (Chris Herborth) - -Changes in 1.0.9 (17 Feb 1998) -- added gzputs and gzgets functions -- do not clear eof flag in gzseek (Mark Diekhans) -- fix gzseek for files in transparent mode (Mark Diekhans) -- do not assume that vsprintf returns the number of bytes written (Jens Krinke) -- replace EXPORT with ZEXPORT to avoid conflict with other programs -- added compress2 in zconf.h, zlib.def, zlib.dnt -- new asm code from Gilles Vollant in contrib/asm386 -- simplify the inflate code (Mark): - . Replace ZALLOC's in huft_build() with single ZALLOC in inflate_blocks_new() - . ZALLOC the length list in inflate_trees_fixed() instead of using stack - . ZALLOC the value area for huft_build() instead of using stack - . Simplify Z_FINISH check in inflate() - -- Avoid gcc 2.8.0 comparison bug a little differently than zlib 1.0.8 -- in inftrees.c, avoid cc -O bug on HP (Farshid Elahi) -- in zconf.h move the ZLIB_DLL stuff earlier to avoid problems with - the declaration of FAR (Gilles VOllant) -- install libz.so* with mode 755 (executable) instead of 644 (Marc Lehmann) -- read_buf buf parameter of type Bytef* instead of charf* -- zmemcpy parameters are of type Bytef*, not charf* (Joseph Strout) -- do not redeclare unlink in minigzip.c for WIN32 (John Bowler) -- fix check for presence of directories in "make install" (Ian Willis) - -Changes in 1.0.8 (27 Jan 1998) -- fixed offsets in contrib/asm386/gvmat32.asm (Gilles Vollant) -- fix gzgetc and gzputc for big endian systems (Markus Oberhumer) -- added compress2() to allow setting the compression level -- include sys/types.h to get off_t on some systems (Marc Lehmann & QingLong) -- use constant arrays for the static trees in trees.c instead of computing - them at run time (thanks to Ken Raeburn for this suggestion). To create - trees.h, compile with GEN_TREES_H and run "make test". -- check return code of example in "make test" and display result -- pass minigzip command line options to file_compress -- simplifying code of inflateSync to avoid gcc 2.8 bug - -- support CC="gcc -Wall" in configure -s (QingLong) -- avoid a flush caused by ftell in gzopen for write mode (Ken Raeburn) -- fix test for shared library support to avoid compiler warnings -- zlib.lib -> zlib.dll in msdos/zlib.rc (Gilles Vollant) -- check for TARGET_OS_MAC in addition to MACOS (Brad Pettit) -- do not use fdopen for Metrowerks on Mac (Brad Pettit)) -- add checks for gzputc and gzputc in example.c -- avoid warnings in gzio.c and deflate.c (Andreas Kleinert) -- use const for the CRC table (Ken Raeburn) -- fixed "make uninstall" for shared libraries -- use Tracev instead of Trace in infblock.c -- in example.c use correct compressed length for test_sync -- suppress +vnocompatwarnings in configure for HPUX (not always supported) - -Changes in 1.0.7 (20 Jan 1998) -- fix gzseek which was broken in write mode -- return error for gzseek to negative absolute position -- fix configure for Linux (Chun-Chung Chen) -- increase stack space for MSC (Tim Wegner) -- get_crc_table and inflateSyncPoint are EXPORTed (Gilles Vollant) -- define EXPORTVA for gzprintf (Gilles Vollant) -- added man page zlib.3 (Rick Rodgers) -- for contrib/untgz, fix makedir() and improve Makefile - -- check gzseek in write mode in example.c -- allocate extra buffer for seeks only if gzseek is actually called -- avoid signed/unsigned comparisons (Tim Wegner, Gilles Vollant) -- add inflateSyncPoint in zconf.h -- fix list of exported functions in nt/zlib.dnt and mdsos/zlib.def - -Changes in 1.0.6 (19 Jan 1998) -- add functions gzprintf, gzputc, gzgetc, gztell, gzeof, gzseek, gzrewind and - gzsetparams (thanks to Roland Giersig and Kevin Ruland for some of this code) -- Fix a deflate bug occuring only with compression level 0 (thanks to - Andy Buckler for finding this one). -- In minigzip, pass transparently also the first byte for .Z files. -- return Z_BUF_ERROR instead of Z_OK if output buffer full in uncompress() -- check Z_FINISH in inflate (thanks to Marc Schluper) -- Implement deflateCopy (thanks to Adam Costello) -- make static libraries by default in configure, add --shared option. -- move MSDOS or Windows specific files to directory msdos -- suppress the notion of partial flush to simplify the interface - (but the symbol Z_PARTIAL_FLUSH is kept for compatibility with 1.0.4) -- suppress history buffer provided by application to simplify the interface - (this feature was not implemented anyway in 1.0.4) -- next_in and avail_in must be initialized before calling inflateInit or - inflateInit2 -- add EXPORT in all exported functions (for Windows DLL) -- added Makefile.nt (thanks to Stephen Williams) -- added the unsupported "contrib" directory: - contrib/asm386/ by Gilles Vollant - 386 asm code replacing longest_match(). - contrib/iostream/ by Kevin Ruland - A C++ I/O streams interface to the zlib gz* functions - contrib/iostream2/ by Tyge Løvset - Another C++ I/O streams interface - contrib/untgz/ by "Pedro A. Aranda Guti\irrez" - A very simple tar.gz file extractor using zlib - contrib/visual-basic.txt by Carlos Rios - How to use compress(), uncompress() and the gz* functions from VB. -- pass params -f (filtered data), -h (huffman only), -1 to -9 (compression - level) in minigzip (thanks to Tom Lane) - -- use const for rommable constants in deflate -- added test for gzseek and gztell in example.c -- add undocumented function inflateSyncPoint() (hack for Paul Mackerras) -- add undocumented function zError to convert error code to string - (for Tim Smithers) -- Allow compilation of gzio with -DNO_DEFLATE to avoid the compression code. -- Use default memcpy for Symantec MSDOS compiler. -- Add EXPORT keyword for check_func (needed for Windows DLL) -- add current directory to LD_LIBRARY_PATH for "make test" -- create also a link for libz.so.1 -- added support for FUJITSU UXP/DS (thanks to Toshiaki Nomura) -- use $(SHAREDLIB) instead of libz.so in Makefile.in (for HPUX) -- added -soname for Linux in configure (Chun-Chung Chen, -- assign numbers to the exported functions in zlib.def (for Windows DLL) -- add advice in zlib.h for best usage of deflateSetDictionary -- work around compiler bug on Atari (cast Z_NULL in call of s->checkfn) -- allow compilation with ANSI keywords only enabled for TurboC in large model -- avoid "versionString"[0] (Borland bug) -- add NEED_DUMMY_RETURN for Borland -- use variable z_verbose for tracing in debug mode (L. Peter Deutsch). -- allow compilation with CC -- defined STDC for OS/2 (David Charlap) -- limit external names to 8 chars for MVS (Thomas Lund) -- in minigzip.c, use static buffers only for 16-bit systems -- fix suffix check for "minigzip -d foo.gz" -- do not return an error for the 2nd of two consecutive gzflush() (Felix Lee) -- use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau) -- added makelcc.bat for lcc-win32 (Tom St Denis) -- in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe) -- Avoid expanded $Id$. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion. -- check for unistd.h in configure (for off_t) -- remove useless check parameter in inflate_blocks_free -- avoid useless assignment of s->check to itself in inflate_blocks_new -- do not flush twice in gzclose (thanks to Ken Raeburn) -- rename FOPEN as F_OPEN to avoid clash with /usr/include/sys/file.h -- use NO_ERRNO_H instead of enumeration of operating systems with errno.h -- work around buggy fclose on pipes for HP/UX -- support zlib DLL with BORLAND C++ 5.0 (thanks to Glenn Randers-Pehrson) -- fix configure if CC is already equal to gcc - -Changes in 1.0.5 (3 Jan 98) -- Fix inflate to terminate gracefully when fed corrupted or invalid data -- Use const for rommable constants in inflate -- Eliminate memory leaks on error conditions in inflate -- Removed some vestigial code in inflate -- Update web address in README - -Changes in 1.0.4 (24 Jul 96) -- In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF - bit, so the decompressor could decompress all the correct data but went - on to attempt decompressing extra garbage data. This affected minigzip too. -- zlibVersion and gzerror return const char* (needed for DLL) -- port to RISCOS (no fdopen, no multiple dots, no unlink, no fileno) -- use z_error only for DEBUG (avoid problem with DLLs) - -Changes in 1.0.3 (2 Jul 96) -- use z_streamp instead of z_stream *, which is now a far pointer in MSDOS - small and medium models; this makes the library incompatible with previous - versions for these models. (No effect in large model or on other systems.) -- return OK instead of BUF_ERROR if previous deflate call returned with - avail_out as zero but there is nothing to do -- added memcmp for non STDC compilers -- define NO_DUMMY_DECL for more Mac compilers (.h files merged incorrectly) -- define __32BIT__ if __386__ or i386 is defined (pb. with Watcom and SCO) -- better check for 16-bit mode MSC (avoids problem with Symantec) - -Changes in 1.0.2 (23 May 96) -- added Windows DLL support -- added a function zlibVersion (for the DLL support) -- fixed declarations using Bytef in infutil.c (pb with MSDOS medium model) -- Bytef is define's instead of typedef'd only for Borland C -- avoid reading uninitialized memory in example.c -- mention in README that the zlib format is now RFC1950 -- updated Makefile.dj2 -- added algorithm.doc - -Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion] -- fix array overlay in deflate.c which sometimes caused bad compressed data -- fix inflate bug with empty stored block -- fix MSDOS medium model which was broken in 0.99 -- fix deflateParams() which could generated bad compressed data. -- Bytef is define'd instead of typedef'ed (work around Borland bug) -- added an INDEX file -- new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32), - Watcom (Makefile.wat), Amiga SAS/C (Makefile.sas) -- speed up adler32 for modern machines without auto-increment -- added -ansi for IRIX in configure -- static_init_done in trees.c is an int -- define unlink as delete for VMS -- fix configure for QNX -- add configure branch for SCO and HPUX -- avoid many warnings (unused variables, dead assignments, etc...) -- no fdopen for BeOS -- fix the Watcom fix for 32 bit mode (define FAR as empty) -- removed redefinition of Byte for MKWERKS -- work around an MWKERKS bug (incorrect merge of all .h files) - -Changes in 0.99 (27 Jan 96) -- allow preset dictionary shared between compressor and decompressor -- allow compression level 0 (no compression) -- add deflateParams in zlib.h: allow dynamic change of compression level - and compression strategy. -- test large buffers and deflateParams in example.c -- add optional "configure" to build zlib as a shared library -- suppress Makefile.qnx, use configure instead -- fixed deflate for 64-bit systems (detected on Cray) -- fixed inflate_blocks for 64-bit systems (detected on Alpha) -- declare Z_DEFLATED in zlib.h (possible parameter for deflateInit2) -- always return Z_BUF_ERROR when deflate() has nothing to do -- deflateInit and inflateInit are now macros to allow version checking -- prefix all global functions and types with z_ with -DZ_PREFIX -- make falloc completely reentrant (inftrees.c) -- fixed very unlikely race condition in ct_static_init -- free in reverse order of allocation to help memory manager -- use zlib-1.0/* instead of zlib/* inside the tar.gz -- make zlib warning-free with "gcc -O3 -Wall -Wwrite-strings -Wpointer-arith - -Wconversion -Wstrict-prototypes -Wmissing-prototypes" -- allow gzread on concatenated .gz files -- deflateEnd now returns Z_DATA_ERROR if it was premature -- deflate is finally (?) fully deterministic (no matches beyond end of input) -- Document Z_SYNC_FLUSH -- add uninstall in Makefile -- Check for __cpluplus in zlib.h -- Better test in ct_align for partial flush -- avoid harmless warnings for Borland C++ -- initialize hash_head in deflate.c -- avoid warning on fdopen (gzio.c) for HP cc -Aa -- include stdlib.h for STDC compilers -- include errno.h for Cray -- ignore error if ranlib doesn't exist -- call ranlib twice for NeXTSTEP -- use exec_prefix instead of prefix for libz.a -- renamed ct_* as _tr_* to avoid conflict with applications -- clear z->msg in inflateInit2 before any error return -- initialize opaque in example.c, gzio.c, deflate.c and inflate.c -- fixed typo in zconf.h (_GNUC__ => __GNUC__) -- check for WIN32 in zconf.h and zutil.c (avoid farmalloc in 32-bit mode) -- fix typo in Make_vms.com (f$trnlnm -> f$getsyi) -- in fcalloc, normalize pointer if size > 65520 bytes -- don't use special fcalloc for 32 bit Borland C++ -- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc... -- use Z_BINARY instead of BINARY -- document that gzclose after gzdopen will close the file -- allow "a" as mode in gzopen. -- fix error checking in gzread -- allow skipping .gz extra-field on pipes -- added reference to Perl interface in README -- put the crc table in FAR data (I dislike more and more the medium model :) -- added get_crc_table -- added a dimension to all arrays (Borland C can't count). -- workaround Borland C bug in declaration of inflate_codes_new & inflate_fast -- guard against multiple inclusion of *.h (for precompiled header on Mac) -- Watcom C pretends to be Microsoft C small model even in 32 bit mode. -- don't use unsized arrays to avoid silly warnings by Visual C++: - warning C4746: 'inflate_mask' : unsized array treated as '__far' - (what's wrong with far data in far model?). -- define enum out of inflate_blocks_state to allow compilation with C++ - -Changes in 0.95 (16 Aug 95) -- fix MSDOS small and medium model (now easier to adapt to any compiler) -- inlined send_bits -- fix the final (:-) bug for deflate with flush (output was correct but - not completely flushed in rare occasions). -- default window size is same for compression and decompression - (it's now sufficient to set MAX_WBITS in zconf.h). -- voidp -> voidpf and voidnp -> voidp (for consistency with other - typedefs and because voidnp was not near in large model). - -Changes in 0.94 (13 Aug 95) -- support MSDOS medium model -- fix deflate with flush (could sometimes generate bad output) -- fix deflateReset (zlib header was incorrectly suppressed) -- added support for VMS -- allow a compression level in gzopen() -- gzflush now calls fflush -- For deflate with flush, flush even if no more input is provided. -- rename libgz.a as libz.a -- avoid complex expression in infcodes.c triggering Turbo C bug -- work around a problem with gcc on Alpha (in INSERT_STRING) -- don't use inline functions (problem with some gcc versions) -- allow renaming of Byte, uInt, etc... with #define. -- avoid warning about (unused) pointer before start of array in deflate.c -- avoid various warnings in gzio.c, example.c, infblock.c, adler32.c, zutil.c -- avoid reserved word 'new' in trees.c - -Changes in 0.93 (25 June 95) -- temporarily disable inline functions -- make deflate deterministic -- give enough lookahead for PARTIAL_FLUSH -- Set binary mode for stdin/stdout in minigzip.c for OS/2 -- don't even use signed char in inflate (not portable enough) -- fix inflate memory leak for segmented architectures - -Changes in 0.92 (3 May 95) -- don't assume that char is signed (problem on SGI) -- Clear bit buffer when starting a stored block -- no memcpy on Pyramid -- suppressed inftest.c -- optimized fill_window, put longest_match inline for gcc -- optimized inflate on stored blocks. -- untabify all sources to simplify patches - -Changes in 0.91 (2 May 95) -- Default MEM_LEVEL is 8 (not 9 for Unix) as documented in zlib.h -- Document the memory requirements in zconf.h -- added "make install" -- fix sync search logic in inflateSync -- deflate(Z_FULL_FLUSH) now works even if output buffer too short -- after inflateSync, don't scare people with just "lo world" -- added support for DJGPP - -Changes in 0.9 (1 May 95) -- don't assume that zalloc clears the allocated memory (the TurboC bug - was Mark's bug after all :) -- let again gzread copy uncompressed data unchanged (was working in 0.71) -- deflate(Z_FULL_FLUSH), inflateReset and inflateSync are now fully implemented -- added a test of inflateSync in example.c -- moved MAX_WBITS to zconf.h because users might want to change that. -- document explicitly that zalloc(64K) on MSDOS must return a normalized - pointer (zero offset) -- added Makefiles for Microsoft C, Turbo C, Borland C++ -- faster crc32() - -Changes in 0.8 (29 April 95) -- added fast inflate (inffast.c) -- deflate(Z_FINISH) now returns Z_STREAM_END when done. Warning: this - is incompatible with previous versions of zlib which returned Z_OK. -- work around a TurboC compiler bug (bad code for b << 0, see infutil.h) - (actually that was not a compiler bug, see 0.81 above) -- gzread no longer reads one extra byte in certain cases -- In gzio destroy(), don't reference a freed structure -- avoid many warnings for MSDOS -- avoid the ERROR symbol which is used by MS Windows - -Changes in 0.71 (14 April 95) -- Fixed more MSDOS compilation problems :( There is still a bug with - TurboC large model. - -Changes in 0.7 (14 April 95) -- Added full inflate support. -- Simplified the crc32() interface. The pre- and post-conditioning - (one's complement) is now done inside crc32(). WARNING: this is - incompatible with previous versions; see zlib.h for the new usage. - -Changes in 0.61 (12 April 95) -- workaround for a bug in TurboC. example and minigzip now work on MSDOS. - -Changes in 0.6 (11 April 95) -- added minigzip.c -- added gzdopen to reopen a file descriptor as gzFile -- added transparent reading of non-gziped files in gzread. -- fixed bug in gzread (don't read crc as data) -- fixed bug in destroy (gzio.c) (don't return Z_STREAM_END for gzclose). -- don't allocate big arrays in the stack (for MSDOS) -- fix some MSDOS compilation problems - -Changes in 0.5: -- do real compression in deflate.c. Z_PARTIAL_FLUSH is supported but - not yet Z_FULL_FLUSH. -- support decompression but only in a single step (forced Z_FINISH) -- added opaque object for zalloc and zfree. -- added deflateReset and inflateReset -- added a variable zlib_version for consistency checking. -- renamed the 'filter' parameter of deflateInit2 as 'strategy'. - Added Z_FILTERED and Z_HUFFMAN_ONLY constants. - -Changes in 0.4: -- avoid "zip" everywhere, use zlib instead of ziplib. -- suppress Z_BLOCK_FLUSH, interpret Z_PARTIAL_FLUSH as block flush - if compression method == 8. -- added adler32 and crc32 -- renamed deflateOptions as deflateInit2, call one or the other but not both -- added the method parameter for deflateInit2. -- added inflateInit2 -- simplied considerably deflateInit and inflateInit by not supporting - user-provided history buffer. This is supported only in deflateInit2 - and inflateInit2. - -Changes in 0.3: -- prefix all macro names with Z_ -- use Z_FINISH instead of deflateEnd to finish compression. -- added Z_HUFFMAN_ONLY -- added gzerror() diff --git a/src/zlib/INDEX b/src/zlib/INDEX deleted file mode 100644 index c405328b49..0000000000 --- a/src/zlib/INDEX +++ /dev/null @@ -1,82 +0,0 @@ -ChangeLog history of changes -INDEX this file -Make_vms.com script for Vax/VMS -Makefile makefile for Unix (generated by configure) -Makefile.in makefile for Unix (template for configure) -Makefile.msc makefile for Microsoft C 16-bit -Makefile.riscos makefile for RISCOS -README guess what -algorithm.txt description of the (de)compression algorithm -configure configure script for Unix -descrip.mms makefile for Vax/VMS -zlib.3 mini man page for zlib (volunteers to write full - man pages from zlib.h welcome. write to jloup@gzip.org) - -amiga/Makefile.sas makefile for Amiga SAS/C -amiga/Makefile.pup makefile for Amiga powerUP SAS/C PPC - -msdos/Makefile.w32 makefile for Microsoft Visual C++ 32-bit -msdos/Makefile.b32 makefile for Borland C++ 32-bit -msdos/Makefile.bor makefile for Borland C/C++ 16-bit -msdos/Makefile.dj2 makefile for DJGPP 2.x -msdos/Makefile.tc makefile for Turbo C -msdos/Makefile.wat makefile for Watcom C -msdos/zlib.def definition file for Windows DLL -msdos/zlib.rc definition file for Windows DLL - -nt/Makefile.nt makefile for Windows NT -nt/zlib.dnt definition file for Windows NT DLL - - - zlib public header files (must be kept): -zconf.h -zlib.h - - private source files used to build the zlib library: -adler32.c -compress.c -crc32.c -deflate.c -deflate.h -gzio.c -infblock.c -infblock.h -infcodes.c -infcodes.h -inffast.c -inffast.h -inflate.c -inftrees.c -inftrees.h -infutil.c -infutil.h -maketree.c -trees.c -uncompr.c -zutil.c -zutil.h - - source files for sample programs: -example.c -minigzip.c - - unsupported contribution by third parties - -contrib/asm386/ by Gilles Vollant - 386 asm code replacing longest_match(). - -contrib/minizip/ by Gilles Vollant - Mini zip and unzip based on zlib - See http://www.winimage.com/zLibDll/unzip.html - -contrib/iostream/ by Kevin Ruland - A C++ I/O streams interface to the zlib gz* functions - -contrib/iostream2/ by Tyge Løvset - Another C++ I/O streams interface - -contrib/untgz/ by "Pedro A. Aranda Guti\irrez" - A very simple tar.gz extractor using zlib - -contrib/visual-basic.txt by Carlos Rios - How to use compress(), uncompress() and the gz* functions from VB. diff --git a/src/zlib/Make_vms.com b/src/zlib/Make_vms.com deleted file mode 100644 index 0008d00bb6..0000000000 --- a/src/zlib/Make_vms.com +++ /dev/null @@ -1,115 +0,0 @@ -$! make libz under VMS -$! written by Martin P.J. Zinser -$! -$! Look for the compiler used -$! -$ ccopt = "" -$ if f$getsyi("HW_MODEL").ge.1024 -$ then -$ ccopt = "/prefix=all"+ccopt -$ comp = "__decc__=1" -$ if f$trnlnm("SYS").eqs."" then define sys sys$library: -$ else -$ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs."" -$ then -$ comp = "__vaxc__=1" -$ if f$trnlnm("SYS").eqs."" then define sys sys$library: -$ else -$ if f$trnlnm("SYS").eqs."" then define sys decc$library_include: -$ ccopt = "/decc/prefix=all"+ccopt -$ comp = "__decc__=1" -$ endif -$ endif -$! -$! Build the thing plain or with mms -$! -$ write sys$output "Compiling Zlib sources ..." -$ if f$search("SYS$SYSTEM:MMS.EXE").eqs."" -$ then -$ dele example.obj;*,minigzip.obj;* -$ CALL MAKE adler32.OBJ "CC ''CCOPT' adler32" - - adler32.c zutil.h zlib.h zconf.h -$ CALL MAKE compress.OBJ "CC ''CCOPT' compress" - - compress.c zlib.h zconf.h -$ CALL MAKE crc32.OBJ "CC ''CCOPT' crc32" - - crc32.c zutil.h zlib.h zconf.h -$ CALL MAKE deflate.OBJ "CC ''CCOPT' deflate" - - deflatec.c deflate.h zutil.h zlib.h zconf.h -$ CALL MAKE gzio.OBJ "CC ''CCOPT' gzio" - - gsio.c zutil.h zlib.h zconf.h -$ CALL MAKE infblock.OBJ "CC ''CCOPT' infblock" - - infblock.c zutil.h zlib.h zconf.h infblock.h -$ CALL MAKE infcodes.OBJ "CC ''CCOPT' infcodes" - - infcodes.c zutil.h zlib.h zconf.h inftrees.h -$ CALL MAKE inffast.OBJ "CC ''CCOPT' inffast" - - inffast.c zutil.h zlib.h zconf.h inffast.h -$ CALL MAKE inflate.OBJ "CC ''CCOPT' inflate" - - inflate.c zutil.h zlib.h zconf.h infblock.h -$ CALL MAKE inftrees.OBJ "CC ''CCOPT' inftrees" - - inftrees.c zutil.h zlib.h zconf.h inftrees.h -$ CALL MAKE infutil.OBJ "CC ''CCOPT' infutil" - - infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h -$ CALL MAKE trees.OBJ "CC ''CCOPT' trees" - - trees.c deflate.h zutil.h zlib.h zconf.h -$ CALL MAKE uncompr.OBJ "CC ''CCOPT' uncompr" - - uncompr.c zlib.h zconf.h -$ CALL MAKE zutil.OBJ "CC ''CCOPT' zutil" - - zutil.c zutil.h zlib.h zconf.h -$ write sys$output "Building Zlib ..." -$ CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ -$ write sys$output "Building example..." -$ CALL MAKE example.OBJ "CC ''CCOPT' example" - - example.c zlib.h zconf.h -$ call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb -$ write sys$output "Building minigzip..." -$ CALL MAKE minigzip.OBJ "CC ''CCOPT' minigzip" - - minigzip.c zlib.h zconf.h -$ call make minigzip.exe - - "LINK minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib" - - minigzip.obj libz.olb -$ else -$ mms/macro=('comp') -$ endif -$ write sys$output "Zlib build completed" -$ exit -$! -$! -$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES -$ V = 'F$Verify(0) -$! P1 = What we are trying to make -$! P2 = Command to make it -$! P3 - P8 What it depends on -$ -$ If F$Search(P1) .Eqs. "" Then Goto Makeit -$ Time = F$CvTime(F$File(P1,"RDT")) -$arg=3 -$Loop: -$ Argument = P'arg -$ If Argument .Eqs. "" Then Goto Exit -$ El=0 -$Loop2: -$ File = F$Element(El," ",Argument) -$ If File .Eqs. " " Then Goto Endl -$ AFile = "" -$Loop3: -$ OFile = AFile -$ AFile = F$Search(File) -$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl -$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit -$ Goto Loop3 -$NextEL: -$ El = El + 1 -$ Goto Loop2 -$EndL: -$ arg=arg+1 -$ If arg .Le. 8 Then Goto Loop -$ Goto Exit -$ -$Makeit: -$ VV=F$VERIFY(0) -$ write sys$output P2 -$ 'P2 -$ VV='F$Verify(VV) -$Exit: -$ If V Then Set Verify -$ENDSUBROUTINE diff --git a/src/zlib/Makefile.in2 b/src/zlib/Makefile.in2 deleted file mode 100644 index c8bb6e9578..0000000000 --- a/src/zlib/Makefile.in2 +++ /dev/null @@ -1,160 +0,0 @@ -# Makefile for zlib -# Copyright (C) 1995-1998 Jean-loup Gailly. -# For conditions of distribution and use, see copyright notice in zlib.h - -# To compile and test, type: -# ./configure; make test -# The call of configure is optional if you don't have special requirements -# If you wish to build zlib as a shared library, use: ./configure -s - -# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type: -# make install -# To install in $HOME instead of /usr/local, use: -# make install prefix=$HOME - -CC=cc - -CFLAGS=-O -#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 -#CFLAGS=-g -DDEBUG -#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ -# -Wstrict-prototypes -Wmissing-prototypes - -LDFLAGS=-L. -lz -LDSHARED=$(CC) - -VER=1.1.2 -LIBS=libz.a -SHAREDLIB=libz.so - -AR=ar rc -RANLIB=ranlib -TAR=tar -SHELL=/bin/sh - -prefix = /usr/local -exec_prefix = ${prefix} - -OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ - zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o - -TEST_OBJS = example.o minigzip.o - -DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] *.[ch] descrip.mms \ - algorithm.txt zlib.3 msdos/Make*[a-z0-9] msdos/zlib.def msdos/zlib.rc \ - nt/Makefile.nt nt/zlib.dnt amiga/Make*.??? contrib/README.contrib \ - contrib/*.txt contrib/asm386/*.asm contrib/asm386/*.c \ - contrib/asm386/*.bat contrib/asm386/zlibvc.d?? contrib/iostream/*.cpp \ - contrib/iostream/*.h contrib/iostream2/*.h contrib/iostream2/*.cpp \ - contrib/untgz/Makefile contrib/untgz/*.c contrib/untgz/*.w32 \ - contrib/minizip/[CM]*[pe] contrib/minizip/*.[ch] contrib/minizip/*.[td]?? - - -all: example minigzip - -test: all - @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ - echo hello world | ./minigzip | ./minigzip -d || \ - echo ' *** minigzip test FAILED ***' ; \ - if ./example; then \ - echo ' *** zlib test OK ***'; \ - else \ - echo ' *** zlib test FAILED ***'; \ - fi - -libz.a: $(OBJS) - $(AR) $@ $(OBJS) - -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 - -$(SHAREDLIB).$(VER): $(OBJS) - $(LDSHARED) -o $@ $(OBJS) - rm -f $(SHAREDLIB) $(SHAREDLIB).1 - ln -s $@ $(SHAREDLIB) - ln -s $@ $(SHAREDLIB).1 - -example: example.o $(LIBS) - $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) - -minigzip: minigzip.o $(LIBS) - $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) - -install: $(LIBS) - -@if [ ! -d $(prefix)/include ]; then mkdir $(prefix)/include; fi - -@if [ ! -d $(exec_prefix)/lib ]; then mkdir $(exec_prefix)/lib; fi - cp zlib.h zconf.h $(prefix)/include - chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h - cp $(LIBS) $(exec_prefix)/lib - cd $(exec_prefix)/lib; chmod 755 $(LIBS) - -@(cd $(exec_prefix)/lib; $(RANLIB) libz.a || true) >/dev/null 2>&1 - cd $(exec_prefix)/lib; if test -f $(SHAREDLIB).$(VER); then \ - rm -f $(SHAREDLIB) $(SHAREDLIB).1; \ - ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB); \ - ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB).1; \ - (ldconfig || true) >/dev/null 2>&1; \ - fi -# The ranlib in install is needed on NeXTSTEP which checks file times -# ldconfig is for Linux - -uninstall: - cd $(prefix)/include; \ - v=$(VER); \ - if test -f zlib.h; then \ - v=`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`; \ - rm -f zlib.h zconf.h; \ - fi; \ - cd $(exec_prefix)/lib; rm -f libz.a; \ - if test -f $(SHAREDLIB).$$v; then \ - rm -f $(SHAREDLIB).$$v $(SHAREDLIB) $(SHAREDLIB).1; \ - fi - -clean: - rm -f *.o *~ example minigzip libz.a libz.so* foo.gz - -distclean: clean - -zip: - mv Makefile Makefile~; cp -p Makefile.in Makefile - rm -f test.c ztest*.c contrib/minizip/test.zip - v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ - zip -ul9 zlib$$v $(DISTFILES) - mv Makefile~ Makefile - -dist: - mv Makefile Makefile~; cp -p Makefile.in Makefile - rm -f test.c ztest*.c contrib/minizip/test.zip - d=zlib-`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ - rm -f $$d.tar.gz; \ - if test ! -d ../$$d; then rm -f ../$$d; ln -s `pwd` ../$$d; fi; \ - files=""; \ - for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \ - cd ..; \ - GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \ - if test ! -d $$d; then rm -f $$d; fi - mv Makefile~ Makefile - -tags: - etags *.[ch] - -depend: - makedepend -- $(CFLAGS) -- *.[ch] - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -adler32.o: zlib.h zconf.h -compress.o: zlib.h zconf.h -crc32.o: zlib.h zconf.h -deflate.o: deflate.h zutil.h zlib.h zconf.h -example.o: zlib.h zconf.h -gzio.o: zutil.h zlib.h zconf.h -infblock.o: infblock.h inftrees.h infcodes.h infutil.h zutil.h zlib.h zconf.h -infcodes.o: zutil.h zlib.h zconf.h -infcodes.o: inftrees.h infblock.h infcodes.h infutil.h inffast.h -inffast.o: zutil.h zlib.h zconf.h inftrees.h -inffast.o: infblock.h infcodes.h infutil.h inffast.h -inflate.o: zutil.h zlib.h zconf.h infblock.h -inftrees.o: zutil.h zlib.h zconf.h inftrees.h -infutil.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h -minigzip.o: zlib.h zconf.h -trees.o: deflate.h zutil.h zlib.h zconf.h trees.h -uncompr.o: zlib.h zconf.h -zutil.o: zutil.h zlib.h zconf.h diff --git a/src/zlib/Makefile.riscos b/src/zlib/Makefile.riscos deleted file mode 100644 index 0f10aa8918..0000000000 --- a/src/zlib/Makefile.riscos +++ /dev/null @@ -1,46 +0,0 @@ -# Project: zlib_1_03 - - -# Toolflags: -CCflags = -c -depend !Depend -IC: -g -throwback -DRISCOS -fnah -C++flags = -c -depend !Depend -IC: -throwback -Linkflags = -aif -c++ -o $@ -ObjAsmflags = -throwback -NoCache -depend !Depend -CMHGflags = -LibFileflags = -c -l -o $@ -Squeezeflags = -o $@ - - -# Final targets: -@.zlib_lib: @.o.adler32 @.o.compress @.o.crc32 @.o.deflate @.o.gzio \ - @.o.infblock @.o.infcodes @.o.inffast @.o.inflate @.o.inftrees @.o.infutil @.o.trees \ - @.o.uncompress @.o.zutil - LibFile $(LibFileflags) @.o.adler32 @.o.compress @.o.crc32 @.o.deflate \ - @.o.gzio @.o.infblock @.o.infcodes @.o.inffast @.o.inflate @.o.inftrees @.o.infutil \ - @.o.trees @.o.uncompress @.o.zutil -@.test: @.tests.minigzip @.tests.example - echo Please run "Test" in directory tests -@.tests.minigzip: @.o.minigzip @.zlib_lib C:o.Stubs - Link $(Linkflags) @.o.minigzip @.zlib_lib C:o.Stubs -@.tests.example: @.o.example @.zlib_lib C:o.Stubs - Link $(Linkflags) @.o.example @.zlib_lib C:o.Stubs - - -# User-editable dependencies: -.c.o: - cc $(ccflags) -o $@ $< - -# Static dependencies: -@.o.example: @.tests.c.example - cc $(ccflags) -o @.o.example @.tests.c.example -@.o.minigzip: @.tests.c.minigzip - cc $(ccflags) -o @.o.minigzip @.tests.c.minigzip - - -# Dynamic dependencies: -o.minigzip: tests.c.minigzip -o.minigzip: h.zlib -o.minigzip: h.zconf -o.example: tests.c.example -o.example: h.zlib -o.example: h.zconf diff --git a/src/zlib/README b/src/zlib/README deleted file mode 100644 index 2471d5ca93..0000000000 --- a/src/zlib/README +++ /dev/null @@ -1,143 +0,0 @@ -zlib 1.1.2 is a general purpose data compression library. All the code -is thread safe. The data format used by the zlib library -is described by RFCs (Request for Comments) 1950 to 1952 in the files -ftp://ds.internic.net/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate -format) and rfc1952.txt (gzip format). These documents are also available in -other formats from ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html - -All functions of the compression library are documented in the file zlib.h -(volunteer to write man pages welcome, contact jloup@gzip.org). A usage -example of the library is given in the file example.c which also tests that -the library is working correctly. Another example is given in the file -minigzip.c. The compression library itself is composed of all source files -except example.c and minigzip.c. - -To compile all files and run the test program, follow the instructions -given at the top of Makefile. In short "make test; make install" -should work for most machines. For MSDOS, use one of the special -makefiles such as Makefile.msc; for VMS, use Make_vms.com or descrip.mms. - -Questions about zlib should be sent to or, -if this fails, to the addresses given below in the Copyright section. -The zlib home page is http://www.cdrom.com/pub/infozip/zlib/ -The official zlib ftp site is ftp://ftp.cdrom.com/pub/infozip/zlib/ -Mark Nelson wrote an article about zlib for the Jan. 1997 -issue of Dr. Dobb's Journal; a copy of the article is available in -http://web2.airmail.net/markn/articles/zlibtool/zlibtool.htm - -The changes made in version 1.1.2 are documented in the file ChangeLog. -The main changes since 1.1.1 are: - -- added contrib/minzip, mini zip and unzip based on zlib (Gilles Vollant) - See http://www.winimage.com/zLibDll/unzip.html -- preinitialize the inflate tables for fixed codes, to make the code - completely thread safe (Mark) -- some simplifications and slight speed-up to the inflate code (Mark) -- fix gzeof on non-compressed files (Allan Schrum) -- add -std1 option in configure for OSF1 to fix gzprintf (Martin Mokrejs) -- use default value of 4K for Z_BUFSIZE for 16-bit MSDOS (Tim Wegner + Glenn) -- added os2/Makefile.def and os2/zlib.def (Andrew Zabolotny) -- add shared lib support for UNIX_SV4.2MP (MATSUURA Takanori) -- do not wrap extern "C" around system includes (Tom Lane) -- added amiga/Makefile.pup for Amiga powerUP SAS/C PPC (Andreas Kleinert) -- allow "make install prefix=..." even after configure (Glenn Randers-Pehrson) -- allow "configure --prefix $HOME" (Tim Mooney) - - -Unsupported third party contributions are provided in directory "contrib". - -A Java implementation of zlib is available in the Java Development Kit 1.1 -http://www.javasoft.com/products/JDK/1.1/docs/api/Package-java.util.zip.html -See the zlib home page http://www.cdrom.com/pub/infozip/zlib/ for details. - -A Perl interface to zlib written by Paul Marquess -is in the CPAN (Comprehensive Perl Archive Network) sites, such as: -ftp://ftp.cis.ufl.edu/pub/perl/CPAN/modules/by-module/Compress/Compress-Zlib* - -A Python interface to zlib written by A.M. Kuchling -is available from the Python Software Association sites, such as: -ftp://ftp.python.org/pub/python/contrib/Encoding/zlib*.tar.gz - -A zlib binding for TCL written by Andreas Kupries -is availlable at http://www.westend.com/~kupries/doc/trf/man/man.html - -An experimental package to read and write files in .zip format, -written on top of zlib by Gilles Vollant , is -available at http://www.winimage.com/zLibDll/unzip.html -and also in the contrib/minizip directory of zlib. - - -Notes for some targets: - -- To build a Windows DLL version, include in a DLL project zlib.def, zlib.rc - and all .c files except example.c and minigzip.c; compile with -DZLIB_DLL - The zlib DLL support was initially done by Alessandro Iacopetti and is - now maintained by Gilles Vollant . Check the zlib DLL - home page at http://www.winimage.com/zLibDll - - From Visual Basic, you can call the DLL functions which do not take - a structure as argument: compress, uncompress and all gz* functions. - See contrib/visual-basic.txt for more information. - I don't know how to handle structures in Visual Basic, sorry. - -- For 64-bit Irix, deflate.c must be compiled without any optimization. - With -O, one libpng test fails. The test works in 32 bit mode (with - the -n32 compiler flag). The compiler bug has been reported to SGI. - -- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 - it works when compiled with cc. - -- on Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1 - is necessary to get gzprintf working correctly. This is done by configure. - -- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works - with other compilers. Use "make test" to check your compiler. - -- For shared memory multiprocessors, the decompression code assumes that - writes to pointers are atomic. Also the functions zalloc and zfree passed - to deflateInit must be multi-threaded in this case. - -- gzdopen is not supported on RISCOS, BEOS and by some Mac compilers. - -- For Turbo C the small model is supported only with reduced performance to - avoid any far allocation; it was tested with -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3 - - -Acknowledgments: - - The deflate format used by zlib was defined by Phil Katz. The deflate - and zlib specifications were written by L. Peter Deutsch. Thanks to all the - people who reported problems and suggested various improvements in zlib; - they are too numerous to cite here. - -Copyright notice: - - (C) 1995-1998 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - -If you use the zlib library in a product, we would appreciate *not* -receiving lengthy legal documents to sign. The sources are provided -for free but without warranty of any kind. The library has been -entirely written by Jean-loup Gailly and Mark Adler; it does not -include third-party code. - -If you redistribute modified sources, we would appreciate that you include -in the file ChangeLog history information documenting your changes. diff --git a/src/zlib/adler32.c b/src/zlib/adler32.c deleted file mode 100644 index ef4b2ebdc8..0000000000 --- a/src/zlib/adler32.c +++ /dev/null @@ -1,48 +0,0 @@ -/* adler32.c -- compute the Adler-32 checksum of a data stream - * Copyright (C) 1995-1998 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#include "../zlib/zlib.h" - -#define BASE 65521L /* largest prime smaller than 65536 */ -#define NMAX 5552 -/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ - -#define DO1(buf,i) {s1 += buf[i]; s2 += s1;} -#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); -#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); -#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); -#define DO16(buf) DO8(buf,0); DO8(buf,8); - -/* ========================================================================= */ -uLong ZEXPORT adler32(adler, buf, len) - uLong adler; - const Bytef *buf; - uInt len; -{ - unsigned long s1 = adler & 0xffff; - unsigned long s2 = (adler >> 16) & 0xffff; - int k; - - if (buf == Z_NULL) return 1L; - - while (len > 0) { - k = len < NMAX ? len : NMAX; - len -= k; - while (k >= 16) { - DO16(buf); - buf += 16; - k -= 16; - } - if (k != 0) do { - s1 += *buf++; - s2 += s1; - } while (--k); - s1 %= BASE; - s2 %= BASE; - } - return (s2 << 16) | s1; -} diff --git a/src/zlib/algorithm.txt b/src/zlib/algorithm.txt deleted file mode 100644 index cdc830b5de..0000000000 --- a/src/zlib/algorithm.txt +++ /dev/null @@ -1,213 +0,0 @@ -1. Compression algorithm (deflate) - -The deflation algorithm used by gzip (also zip and zlib) is a variation of -LZ77 (Lempel-Ziv 1977, see reference below). It finds duplicated strings in -the input data. The second occurrence of a string is replaced by a -pointer to the previous string, in the form of a pair (distance, -length). Distances are limited to 32K bytes, and lengths are limited -to 258 bytes. When a string does not occur anywhere in the previous -32K bytes, it is emitted as a sequence of literal bytes. (In this -description, `string' must be taken as an arbitrary sequence of bytes, -and is not restricted to printable characters.) - -Literals or match lengths are compressed with one Huffman tree, and -match distances are compressed with another tree. The trees are stored -in a compact form at the start of each block. The blocks can have any -size (except that the compressed data for one block must fit in -available memory). A block is terminated when deflate() determines that -it would be useful to start another block with fresh trees. (This is -somewhat similar to the behavior of LZW-based _compress_.) - -Duplicated strings are found using a hash table. All input strings of -length 3 are inserted in the hash table. A hash index is computed for -the next 3 bytes. If the hash chain for this index is not empty, all -strings in the chain are compared with the current input string, and -the longest match is selected. - -The hash chains are searched starting with the most recent strings, to -favor small distances and thus take advantage of the Huffman encoding. -The hash chains are singly linked. There are no deletions from the -hash chains, the algorithm simply discards matches that are too old. - -To avoid a worst-case situation, very long hash chains are arbitrarily -truncated at a certain length, determined by a runtime option (level -parameter of deflateInit). So deflate() does not always find the longest -possible match but generally finds a match which is long enough. - -deflate() also defers the selection of matches with a lazy evaluation -mechanism. After a match of length N has been found, deflate() searches for -a longer match at the next input byte. If a longer match is found, the -previous match is truncated to a length of one (thus producing a single -literal byte) and the process of lazy evaluation begins again. Otherwise, -the original match is kept, and the next match search is attempted only N -steps later. - -The lazy match evaluation is also subject to a runtime parameter. If -the current match is long enough, deflate() reduces the search for a longer -match, thus speeding up the whole process. If compression ratio is more -important than speed, deflate() attempts a complete second search even if -the first match is already long enough. - -The lazy match evaluation is not performed for the fastest compression -modes (level parameter 1 to 3). For these fast modes, new strings -are inserted in the hash table only when no match was found, or -when the match is not too long. This degrades the compression ratio -but saves time since there are both fewer insertions and fewer searches. - - -2. Decompression algorithm (inflate) - -2.1 Introduction - -The real question is, given a Huffman tree, how to decode fast. The most -important realization is that shorter codes are much more common than -longer codes, so pay attention to decoding the short codes fast, and let -the long codes take longer to decode. - -inflate() sets up a first level table that covers some number of bits of -input less than the length of longest code. It gets that many bits from the -stream, and looks it up in the table. The table will tell if the next -code is that many bits or less and how many, and if it is, it will tell -the value, else it will point to the next level table for which inflate() -grabs more bits and tries to decode a longer code. - -How many bits to make the first lookup is a tradeoff between the time it -takes to decode and the time it takes to build the table. If building the -table took no time (and if you had infinite memory), then there would only -be a first level table to cover all the way to the longest code. However, -building the table ends up taking a lot longer for more bits since short -codes are replicated many times in such a table. What inflate() does is -simply to make the number of bits in the first table a variable, and set it -for the maximum speed. - -inflate() sends new trees relatively often, so it is possibly set for a -smaller first level table than an application that has only one tree for -all the data. For inflate, which has 286 possible codes for the -literal/length tree, the size of the first table is nine bits. Also the -distance trees have 30 possible values, and the size of the first table is -six bits. Note that for each of those cases, the table ended up one bit -longer than the ``average'' code length, i.e. the code length of an -approximately flat code which would be a little more than eight bits for -286 symbols and a little less than five bits for 30 symbols. It would be -interesting to see if optimizing the first level table for other -applications gave values within a bit or two of the flat code size. - - -2.2 More details on the inflate table lookup - -Ok, you want to know what this cleverly obfuscated inflate tree actually -looks like. You are correct that it's not a Huffman tree. It is simply a -lookup table for the first, let's say, nine bits of a Huffman symbol. The -symbol could be as short as one bit or as long as 15 bits. If a particular -symbol is shorter than nine bits, then that symbol's translation is duplicated -in all those entries that start with that symbol's bits. For example, if the -symbol is four bits, then it's duplicated 32 times in a nine-bit table. If a -symbol is nine bits long, it appears in the table once. - -If the symbol is longer than nine bits, then that entry in the table points -to another similar table for the remaining bits. Again, there are duplicated -entries as needed. The idea is that most of the time the symbol will be short -and there will only be one table look up. (That's whole idea behind data -compression in the first place.) For the less frequent long symbols, there -will be two lookups. If you had a compression method with really long -symbols, you could have as many levels of lookups as is efficient. For -inflate, two is enough. - -So a table entry either points to another table (in which case nine bits in -the above example are gobbled), or it contains the translation for the symbol -and the number of bits to gobble. Then you start again with the next -ungobbled bit. - -You may wonder: why not just have one lookup table for how ever many bits the -longest symbol is? The reason is that if you do that, you end up spending -more time filling in duplicate symbol entries than you do actually decoding. -At least for deflate's output that generates new trees every several 10's of -kbytes. You can imagine that filling in a 2^15 entry table for a 15-bit code -would take too long if you're only decoding several thousand symbols. At the -other extreme, you could make a new table for every bit in the code. In fact, -that's essentially a Huffman tree. But then you spend two much time -traversing the tree while decoding, even for short symbols. - -So the number of bits for the first lookup table is a trade of the time to -fill out the table vs. the time spent looking at the second level and above of -the table. - -Here is an example, scaled down: - -The code being decoded, with 10 symbols, from 1 to 6 bits long: - -A: 0 -B: 10 -C: 1100 -D: 11010 -E: 11011 -F: 11100 -G: 11101 -H: 11110 -I: 111110 -J: 111111 - -Let's make the first table three bits long (eight entries): - -000: A,1 -001: A,1 -010: A,1 -011: A,1 -100: B,2 -101: B,2 -110: -> table X (gobble 3 bits) -111: -> table Y (gobble 3 bits) - -Each entry is what the bits decode to and how many bits that is, i.e. how -many bits to gobble. Or the entry points to another table, with the number of -bits to gobble implicit in the size of the table. - -Table X is two bits long since the longest code starting with 110 is five bits -long: - -00: C,1 -01: C,1 -10: D,2 -11: E,2 - -Table Y is three bits long since the longest code starting with 111 is six -bits long: - -000: F,2 -001: F,2 -010: G,2 -011: G,2 -100: H,2 -101: H,2 -110: I,3 -111: J,3 - -So what we have here are three tables with a total of 20 entries that had to -be constructed. That's compared to 64 entries for a single table. Or -compared to 16 entries for a Huffman tree (six two entry tables and one four -entry table). Assuming that the code ideally represents the probability of -the symbols, it takes on the average 1.25 lookups per symbol. That's compared -to one lookup for the single table, or 1.66 lookups per symbol for the -Huffman tree. - -There, I think that gives you a picture of what's going on. For inflate, the -meaning of a particular symbol is often more than just a letter. It can be a -byte (a "literal"), or it can be either a length or a distance which -indicates a base value and a number of bits to fetch after the code that is -added to the base value. Or it might be the special end-of-block code. The -data structures created in inftrees.c try to encode all that information -compactly in the tables. - - -Jean-loup Gailly Mark Adler -jloup@gzip.org madler@alumni.caltech.edu - - -References: - -[LZ77] Ziv J., Lempel A., ``A Universal Algorithm for Sequential Data -Compression,'' IEEE Transactions on Information Theory, Vol. 23, No. 3, -pp. 337-343. - -``DEFLATE Compressed Data Format Specification'' available in -ftp://ds.internic.net/rfc/rfc1951.txt diff --git a/src/zlib/compress.c b/src/zlib/compress.c deleted file mode 100644 index 51761b105e..0000000000 --- a/src/zlib/compress.c +++ /dev/null @@ -1,68 +0,0 @@ -/* compress.c -- compress a memory buffer - * Copyright (C) 1995-1998 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#include "../zlib/zlib.h" - -/* =========================================================================== - Compresses the source buffer into the destination buffer. The level - parameter has the same meaning as in deflateInit. sourceLen is the byte - length of the source buffer. Upon entry, destLen is the total size of the - destination buffer, which must be at least 0.1% larger than sourceLen plus - 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. - - compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_BUF_ERROR if there was not enough room in the output buffer, - Z_STREAM_ERROR if the level parameter is invalid. -*/ -int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) - Bytef *dest; - uLongf *destLen; - const Bytef *source; - uLong sourceLen; - int level; -{ - z_stream stream; - int err; - - stream.next_in = (Bytef*)source; - stream.avail_in = (uInt)sourceLen; -#ifdef MAXSEG_64K - /* Check for source > 64K on 16-bit machine: */ - if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; -#endif - stream.next_out = dest; - stream.avail_out = (uInt)*destLen; - if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; - - stream.zalloc = (alloc_func)0; - stream.zfree = (free_func)0; - stream.opaque = (voidpf)0; - - err = deflateInit(&stream, level); - if (err != Z_OK) return err; - - err = deflate(&stream, Z_FINISH); - if (err != Z_STREAM_END) { - deflateEnd(&stream); - return err == Z_OK ? Z_BUF_ERROR : err; - } - *destLen = stream.total_out; - - err = deflateEnd(&stream); - return err; -} - -/* =========================================================================== - */ -int ZEXPORT compress (dest, destLen, source, sourceLen) - Bytef *dest; - uLongf *destLen; - const Bytef *source; - uLong sourceLen; -{ - return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); -} diff --git a/src/zlib/configure b/src/zlib/configure deleted file mode 100644 index d188e6f02d..0000000000 --- a/src/zlib/configure +++ /dev/null @@ -1,163 +0,0 @@ -#!/bin/sh -# configure script for zlib. This script is needed only if -# you wish to build a shared library and your system supports them, -# of if you need special compiler, flags or install directory. -# Otherwise, you can just use directly "make test; make install" -# -# To create a shared library, use "configure --shared"; by default a static -# library is created. If the primitive shared library support provided here -# does not work, use ftp://prep.ai.mit.edu/pub/gnu/libtool-*.tar.gz -# -# To impose specific compiler or flags or install directory, use for example: -# prefix=$HOME CC=cc CFLAGS="-O4" ./configure -# or for csh/tcsh users: -# (setenv prefix $HOME; setenv CC cc; setenv CFLAGS "-O4"; ./configure) -# LDSHARED is the command to be used to create a shared library - -# Incorrect settings of CC or CFLAGS may prevent creating a shared library. -# If you have problems, try without defining CC and CFLAGS before reporting -# an error. - -LIBS=libz.a -SHAREDLIB=libz.so -VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h` -AR=${AR-"ar rc"} -RANLIB=${RANLIB-"ranlib"} -prefix=${prefix-/usr/local} -shared_ext='.so' -shared=0 -gcc=0 -old_cc="$CC" -old_cflags="$CFLAGS" - -case "$1" in - -h* | --h*) echo 'syntax: configure [ --shared ] [--prefix PREFIX]'; exit 0;; - -p*=* | --p*=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; - -p* | --p*) prefix="$2"; shift; shift;; - -s* | --s*) shared=1; shift;; -esac - -test=ztest$$ -cat > $test.c </dev/null; then - CC="$cc" - SFLAGS=${CFLAGS-"-fPIC -O3"} - CFLAGS="$cflags" - case `(uname -s || echo unknown) 2>/dev/null` in - Linux | linux) LDSHARED=${LDSHARED-"gcc -shared -Wl,-soname,libz.so.1"};; - *) LDSHARED=${LDSHARED-"gcc -shared"};; - esac -else - # find system name and corresponding cc options - CC=${CC-cc} - case `(uname -sr || echo unknown) 2>/dev/null` in - HP-UX*) SFLAGS=${CFLAGS-"-O +z"} - CFLAGS=${CFLAGS-"-O"} -# LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"} - LDSHARED=${LDSHARED-"ld -b"} - shared_ext='.sl' - SHAREDLIB='libz.sl';; - IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."} - CFLAGS=${CFLAGS-"-ansi -O2"} - LDSHARED=${LDSHARED-"cc -shared"};; - OSF1) SFLAGS=${CFLAGS-"-O -std1"} - CFLAGS=${CFLAGS-"-O -std1"} - LDSHARED=${LDSHARED-"cc -shared"};; - QNX*) SFLAGS=${CFLAGS-"-4 -O"} - CFLAGS=${CFLAGS-"-4 -O"} - LDSHARED=${LDSHARED-"cc"} - RANLIB=${RANLIB-"true"} - AR="cc -A";; - SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "} - CFLAGS=${CFLAGS-"-O3"} - LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};; - SunOS\ 5*) SFLAGS=${CFLAGS-"-fast -xcg89 -KPIC -R."} - CFLAGS=${CFLAGS-"-fast -xcg89"} - LDSHARED=${LDSHARED-"cc -G"};; - SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"} - CFLAGS=${CFLAGS-"-O2"} - LDSHARED=${LDSHARED-"ld"};; - UNIX_System_V\ 4.2.0) - SFLAGS=${CFLAGS-"-KPIC -O"} - CFLAGS=${CFLAGS-"-O"} - LDSHARED=${LDSHARED-"cc -G"};; - UNIX_SV\ 4.2MP) - SFLAGS=${CFLAGS-"-Kconform_pic -O"} - CFLAGS=${CFLAGS-"-O"} - LDSHARED=${LDSHARED-"cc -G"};; - # send working options for other systems to support@gzip.org - *) SFLAGS=${CFLAGS-"-O"} - CFLAGS=${CFLAGS-"-O"} - LDSHARED=${LDSHARED-"cc -shared"};; - esac -fi - -if test $shared -eq 1; then - echo Checking for shared library support... - # we must test in two steps (cc then ld), required at least on SunOS 4.x - if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" && - test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then - CFLAGS="$SFLAGS" - LIBS="$SHAREDLIB.$VER" - echo Building shared library $SHAREDLIB.$VER with $CC. - elif test -z "$old_cc" -a -z "$old_cflags"; then - echo No shared library suppport. - shared=0; - else - echo 'No shared library suppport; try without defining CC and CFLAGS' - shared=0; - fi -fi -if test $shared -eq 0; then - LDSHARED="$CC" - echo Building static library $LIBS version $VER with $CC. -fi - -if test -f /usr/include/unistd.h; then - CFLAGS="$CFLAGS -DHAVE_UNISTD_H" -fi - -if test ! -f /usr/include/errno.h; then - CFLAGS="$CFLAGS -DNO_ERRNO_H" -fi - -cat > $test.c < -#include -#include -caddr_t hello() { - return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0); -} -EOF -if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then - CFLAGS="$CFLAGS -DUSE_MMAP" - echo Checking for mmap support... Yes. -else - echo Checking for mmap support... No. -fi - -rm -f $test.[co] $test$shared_ext - -# udpate Makefile -sed < Makefile.in " -/^CC *=/s%=.*%=$CC% -/^CFLAGS *=/s%=.*%=$CFLAGS% -/^LDSHARED *=/s%=.*%=$LDSHARED% -/^LIBS *=/s%=.*%=$LIBS% -/^SHAREDLIB *=/s%=.*%=$SHAREDLIB% -/^AR *=/s%=.*%=$AR% -/^RANLIB *=/s%=.*%=$RANLIB% -/^VER *=/s%=.*%=$VER% -/^prefix *=/s%=.*%=$prefix% -" > Makefile diff --git a/src/zlib/crc32.c b/src/zlib/crc32.c deleted file mode 100644 index 52d9cb1f44..0000000000 --- a/src/zlib/crc32.c +++ /dev/null @@ -1,162 +0,0 @@ -/* crc32.c -- compute the CRC-32 of a data stream - * Copyright (C) 1995-1998 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#include "../zlib/zlib.h" - -#define local static - -#ifdef DYNAMIC_CRC_TABLE - -local int crc_table_empty = 1; -local uLongf crc_table[256]; -local void make_crc_table OF((void)); - -/* - Generate a table for a byte-wise 32-bit CRC calculation on the polynomial: - x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1. - - Polynomials over GF(2) are represented in binary, one bit per coefficient, - with the lowest powers in the most significant bit. Then adding polynomials - is just exclusive-or, and multiplying a polynomial by x is a right shift by - one. If we call the above polynomial p, and represent a byte as the - polynomial q, also with the lowest power in the most significant bit (so the - byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p, - where a mod b means the remainder after dividing a by b. - - This calculation is done using the shift-register method of multiplying and - taking the remainder. The register is initialized to zero, and for each - incoming bit, x^32 is added mod p to the register if the bit is a one (where - x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by - x (which is shifting right by one and adding x^32 mod p if the bit shifted - out is a one). We start with the highest power (least significant bit) of - q and repeat for all eight bits of q. - - The table is simply the CRC of all possible eight bit values. This is all - the information needed to generate CRC's on data a byte at a time for all - combinations of CRC register values and incoming bytes. -*/ -local void make_crc_table() -{ - uLong c; - int n, k; - uLong poly; /* polynomial exclusive-or pattern */ - /* terms of polynomial defining this crc (except x^32): */ - static const Byte p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26}; - - /* make exclusive-or pattern from polynomial (0xedb88320L) */ - poly = 0L; - for (n = 0; n < sizeof(p)/sizeof(Byte); n++) - poly |= 1L << (31 - p[n]); - - for (n = 0; n < 256; n++) - { - c = (uLong)n; - for (k = 0; k < 8; k++) - c = c & 1 ? poly ^ (c >> 1) : c >> 1; - crc_table[n] = c; - } - crc_table_empty = 0; -} -#else -/* ======================================================================== - * Table of CRC-32's of all single-byte values (made by make_crc_table) - */ -local const uLongf crc_table[256] = { - 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, - 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, - 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, - 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, - 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L, - 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, - 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, - 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL, - 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L, - 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL, - 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, - 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L, - 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L, - 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL, - 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, - 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L, - 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL, - 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L, - 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, - 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L, - 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL, - 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L, - 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L, - 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL, - 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L, - 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L, - 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L, - 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L, - 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L, - 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL, - 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, - 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L, - 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L, - 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL, - 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL, - 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L, - 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL, - 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L, - 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, - 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L, - 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL, - 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L, - 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, - 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL, - 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L, - 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L, - 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, - 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, - 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L, - 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L, - 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, - 0x2d02ef8dL -}; -#endif - -/* ========================================================================= - * This function can be used by asm versions of crc32() - */ -const uLongf * ZEXPORT get_crc_table() -{ -#ifdef DYNAMIC_CRC_TABLE - if (crc_table_empty) make_crc_table(); -#endif - return (const uLongf *)crc_table; -} - -/* ========================================================================= */ -#define DO1(buf) crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8); -#define DO2(buf) DO1(buf); DO1(buf); -#define DO4(buf) DO2(buf); DO2(buf); -#define DO8(buf) DO4(buf); DO4(buf); - -/* ========================================================================= */ -uLong ZEXPORT crc32(crc, buf, len) - uLong crc; - const Bytef *buf; - uInt len; -{ - if (buf == Z_NULL) return 0L; -#ifdef DYNAMIC_CRC_TABLE - if (crc_table_empty) - make_crc_table(); -#endif - crc = crc ^ 0xffffffffL; - while (len >= 8) - { - DO8(buf); - len -= 8; - } - if (len) do { - DO1(buf); - } while (--len); - return crc ^ 0xffffffffL; -} diff --git a/src/zlib/deflate.c b/src/zlib/deflate.c deleted file mode 100644 index 490813fe90..0000000000 --- a/src/zlib/deflate.c +++ /dev/null @@ -1,1348 +0,0 @@ -/* deflate.c -- compress data using the deflation algorithm - * Copyright (C) 1995-1998 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* - * ALGORITHM - * - * The "deflation" process depends on being able to identify portions - * of the input text which are identical to earlier input (within a - * sliding window trailing behind the input currently being processed). - * - * The most straightforward technique turns out to be the fastest for - * most input files: try all possible matches and select the longest. - * The key feature of this algorithm is that insertions into the string - * dictionary are very simple and thus fast, and deletions are avoided - * completely. Insertions are performed at each input character, whereas - * string matches are performed only when the previous match ends. So it - * is preferable to spend more time in matches to allow very fast string - * insertions and avoid deletions. The matching algorithm for small - * strings is inspired from that of Rabin & Karp. A brute force approach - * is used to find longer strings when a small match has been found. - * A similar algorithm is used in comic (by Jan-Mark Wams) and freeze - * (by Leonid Broukhis). - * A previous version of this file used a more sophisticated algorithm - * (by Fiala and Greene) which is guaranteed to run in linear amortized - * time, but has a larger average cost, uses more memory and is patented. - * However the F&G algorithm may be faster for some highly redundant - * files if the parameter max_chain_length (described below) is too large. - * - * ACKNOWLEDGEMENTS - * - * The idea of lazy evaluation of matches is due to Jan-Mark Wams, and - * I found it in 'freeze' written by Leonid Broukhis. - * Thanks to many people for bug reports and testing. - * - * REFERENCES - * - * Deutsch, L.P.,"DEFLATE Compressed Data Format Specification". - * Available in ftp://ds.internic.net/rfc/rfc1951.txt - * - * A description of the Rabin and Karp algorithm is given in the book - * "Algorithms" by R. Sedgewick, Addison-Wesley, p252. - * - * Fiala,E.R., and Greene,D.H. - * Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595 - * - */ - -/* @(#) $Id$ */ - -#include "deflate.h" - -const char deflate_copyright[] = - " deflate 1.1.2 Copyright 1995-1998 Jean-loup Gailly "; -/* - If you use the zlib library in a product, an acknowledgment is welcome - in the documentation of your product. If for some reason you cannot - include such an acknowledgment, I would appreciate that you keep this - copyright string in the executable of your product. - */ - -/* =========================================================================== - * Function prototypes. - */ -typedef enum { - need_more, /* block not completed, need more input or more output */ - block_done, /* block flush performed */ - finish_started, /* finish started, need only more output at next deflate */ - finish_done /* finish done, accept no more input or output */ -} block_state; - -typedef block_state (*compress_func) OF((deflate_state *s, int flush)); -/* Compression function. Returns the block state after the call. */ - -local void fill_window OF((deflate_state *s)); -local block_state deflate_stored OF((deflate_state *s, int flush)); -local block_state deflate_fast OF((deflate_state *s, int flush)); -local block_state deflate_slow OF((deflate_state *s, int flush)); -local void lm_init OF((deflate_state *s)); -local void putShortMSB OF((deflate_state *s, uInt b)); -local void flush_pending OF((z_streamp strm)); -local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); -#ifdef ASMV - void match_init OF((void)); /* asm code initialization */ - uInt longest_match OF((deflate_state *s, IPos cur_match)); -#else -local uInt longest_match OF((deflate_state *s, IPos cur_match)); -#endif - -#ifdef DEBUG -local void check_match OF((deflate_state *s, IPos start, IPos match, - int length)); -#endif - -/* =========================================================================== - * Local data - */ - -#define NIL 0 -/* Tail of hash chains */ - -#ifndef TOO_FAR -# define TOO_FAR 4096 -#endif -/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */ - -#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) -/* Minimum amount of lookahead, except at the end of the input file. - * See deflate.c for comments about the MIN_MATCH+1. - */ - -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ -typedef struct config_s { - ush good_length; /* reduce lazy search above this match length */ - ush max_lazy; /* do not perform lazy search above this match length */ - ush nice_length; /* quit search above this match length */ - ush max_chain; - compress_func func; -} config; - -local const config configuration_table[10] = { -/* good lazy nice chain */ -/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */ -/* 1 */ {4, 4, 8, 4, deflate_fast}, /* maximum speed, no lazy matches */ -/* 2 */ {4, 5, 16, 8, deflate_fast}, -/* 3 */ {4, 6, 32, 32, deflate_fast}, - -/* 4 */ {4, 4, 16, 16, deflate_slow}, /* lazy matches */ -/* 5 */ {8, 16, 32, 32, deflate_slow}, -/* 6 */ {8, 16, 128, 128, deflate_slow}, -/* 7 */ {8, 32, 128, 256, deflate_slow}, -/* 8 */ {32, 128, 258, 1024, deflate_slow}, -/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* maximum compression */ - -/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 - * For deflate_fast() (levels <= 3) good is ignored and lazy has a different - * meaning. - */ - -#define EQUAL 0 -/* result of memcmp for equal strings */ - -struct static_tree_desc_s {int dummy;}; /* for buggy compilers */ - -/* =========================================================================== - * Update a hash value with the given input byte - * IN assertion: all calls to to UPDATE_HASH are made with consecutive - * input characters, so that a running hash key can be computed from the - * previous key instead of complete recalculation each time. - */ -#define UPDATE_HASH(s,h,c) (h = (((h)<hash_shift) ^ (c)) & s->hash_mask) - - -/* =========================================================================== - * Insert string str in the dictionary and set match_head to the previous head - * of the hash chain (the most recent string with same hash key). Return - * the previous length of the hash chain. - * If this file is compiled with -DFASTEST, the compression level is forced - * to 1, and no hash chains are maintained. - * IN assertion: all calls to to INSERT_STRING are made with consecutive - * input characters and the first MIN_MATCH bytes of str are valid - * (except for the last MIN_MATCH-1 bytes of the input file). - */ -#ifdef FASTEST -#define INSERT_STRING(s, str, match_head) \ - (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ - match_head = s->head[s->ins_h], \ - s->head[s->ins_h] = (Pos)(str)) -#else -#define INSERT_STRING(s, str, match_head) \ - (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ - s->prev[(str) & s->w_mask] = match_head = s->head[s->ins_h], \ - s->head[s->ins_h] = (Pos)(str)) -#endif - -/* =========================================================================== - * Initialize the hash table (avoiding 64K overflow for 16 bit systems). - * prev[] will be initialized on the fly. - */ -#define CLEAR_HASH(s) \ - s->head[s->hash_size-1] = NIL; \ - zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head)); - -/* ========================================================================= */ -int ZEXPORT deflateInit_(strm, level, version, stream_size) - z_streamp strm; - int level; - const char *version; - int stream_size; -{ - return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, - Z_DEFAULT_STRATEGY, version, stream_size); - /* To do: ignore strm->next_in if we use it as window */ -} - -/* ========================================================================= */ -int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, - version, stream_size) - z_streamp strm; - int level; - int method; - int windowBits; - int memLevel; - int strategy; - const char *version; - int stream_size; -{ - deflate_state *s; - int noheader = 0; - static const char* my_version = ZLIB_VERSION; - - ushf *overlay; - /* We overlay pending_buf and d_buf+l_buf. This works since the average - * output size for (length,distance) codes is <= 24 bits. - */ - - if (version == Z_NULL || version[0] != my_version[0] || - stream_size != sizeof(z_stream)) { - return Z_VERSION_ERROR; - } - if (strm == Z_NULL) return Z_STREAM_ERROR; - - strm->msg = Z_NULL; - if (strm->zalloc == Z_NULL) { - strm->zalloc = zcalloc; - strm->opaque = (voidpf)0; - } - if (strm->zfree == Z_NULL) strm->zfree = zcfree; - - if (level == Z_DEFAULT_COMPRESSION) level = 6; -#ifdef FASTEST - level = 1; -#endif - - if (windowBits < 0) { /* undocumented feature: suppress zlib header */ - noheader = 1; - windowBits = -windowBits; - } - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_HUFFMAN_ONLY) { - return Z_STREAM_ERROR; - } - s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state)); - if (s == Z_NULL) return Z_MEM_ERROR; - strm->state = (struct internal_state FAR *)s; - s->strm = strm; - - s->noheader = noheader; - s->w_bits = windowBits; - s->w_size = 1 << s->w_bits; - s->w_mask = s->w_size - 1; - - s->hash_bits = memLevel + 7; - s->hash_size = 1 << s->hash_bits; - s->hash_mask = s->hash_size - 1; - s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH); - - s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte)); - s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos)); - s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos)); - - s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - - overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); - s->pending_buf = (uchf *) overlay; - s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L); - - if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || - s->pending_buf == Z_NULL) { - strm->msg = (char*)ERR_MSG(Z_MEM_ERROR); - deflateEnd (strm); - return Z_MEM_ERROR; - } - s->d_buf = overlay + s->lit_bufsize/sizeof(ush); - s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; - - s->level = level; - s->strategy = strategy; - s->method = (Byte)method; - - return deflateReset(strm); -} - -/* ========================================================================= */ -int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) - z_streamp strm; - const Bytef *dictionary; - uInt dictLength; -{ - deflate_state *s; - uInt length = dictLength; - uInt n; - IPos hash_head = 0; - - if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL || - strm->state->status != INIT_STATE) return Z_STREAM_ERROR; - - s = strm->state; - strm->adler = adler32(strm->adler, dictionary, dictLength); - - if (length < MIN_MATCH) return Z_OK; - if (length > MAX_DIST(s)) { - length = MAX_DIST(s); -#ifndef USE_DICT_HEAD - dictionary += dictLength - length; /* use the tail of the dictionary */ -#endif - } - zmemcpy(s->window, dictionary, length); - s->strstart = length; - s->block_start = (long)length; - - /* Insert all strings in the hash table (except for the last two bytes). - * s->lookahead stays null, so s->ins_h will be recomputed at the next - * call of fill_window. - */ - s->ins_h = s->window[0]; - UPDATE_HASH(s, s->ins_h, s->window[1]); - for (n = 0; n <= length - MIN_MATCH; n++) { - INSERT_STRING(s, n, hash_head); - } - if (hash_head) hash_head = 0; /* to make compiler happy */ - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflateReset (strm) - z_streamp strm; -{ - deflate_state *s; - - if (strm == Z_NULL || strm->state == Z_NULL || - strm->zalloc == Z_NULL || strm->zfree == Z_NULL) return Z_STREAM_ERROR; - - strm->total_in = strm->total_out = 0; - strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */ - strm->data_type = Z_UNKNOWN; - - s = (deflate_state *)strm->state; - s->pending = 0; - s->pending_out = s->pending_buf; - - if (s->noheader < 0) { - s->noheader = 0; /* was set to -1 by deflate(..., Z_FINISH); */ - } - s->status = s->noheader ? BUSY_STATE : INIT_STATE; - strm->adler = 1; - s->last_flush = Z_NO_FLUSH; - - _tr_init(s); - lm_init(s); - - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflateParams(strm, level, strategy) - z_streamp strm; - int level; - int strategy; -{ - deflate_state *s; - compress_func func; - int err = Z_OK; - - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - s = strm->state; - - if (level == Z_DEFAULT_COMPRESSION) { - level = 6; - } - if (level < 0 || level > 9 || strategy < 0 || strategy > Z_HUFFMAN_ONLY) { - return Z_STREAM_ERROR; - } - func = configuration_table[s->level].func; - - if (func != configuration_table[level].func && strm->total_in != 0) { - /* Flush the last buffer: */ - err = deflate(strm, Z_PARTIAL_FLUSH); - } - if (s->level != level) { - s->level = level; - s->max_lazy_match = configuration_table[level].max_lazy; - s->good_match = configuration_table[level].good_length; - s->nice_match = configuration_table[level].nice_length; - s->max_chain_length = configuration_table[level].max_chain; - } - s->strategy = strategy; - return err; -} - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. - */ -local void putShortMSB (s, b) - deflate_state *s; - uInt b; -{ - put_byte(s, (Byte)(b >> 8)); - put_byte(s, (Byte)(b & 0xff)); -} - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->next_out buffer and copying into it. - * (See also read_buf()). - */ -local void flush_pending(strm) - z_streamp strm; -{ - unsigned len = strm->state->pending; - - if (len > strm->avail_out) len = strm->avail_out; - if (len == 0) return; - - zmemcpy(strm->next_out, strm->state->pending_out, len); - strm->next_out += len; - strm->state->pending_out += len; - strm->total_out += len; - strm->avail_out -= len; - strm->state->pending -= len; - if (strm->state->pending == 0) { - strm->state->pending_out = strm->state->pending_buf; - } -} - -/* ========================================================================= */ -int ZEXPORT deflate (strm, flush) - z_streamp strm; - int flush; -{ - int old_flush; /* value of flush param for previous deflate call */ - deflate_state *s; - - if (strm == Z_NULL || strm->state == Z_NULL || - flush > Z_FINISH || flush < 0) { - return Z_STREAM_ERROR; - } - s = strm->state; - - if (strm->next_out == Z_NULL || - (strm->next_in == Z_NULL && strm->avail_in != 0) || - (s->status == FINISH_STATE && flush != Z_FINISH)) { - ERR_RETURN(strm, Z_STREAM_ERROR); - } - if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR); - - s->strm = strm; /* just in case */ - old_flush = s->last_flush; - s->last_flush = flush; - - /* Write the zlib header */ - if (s->status == INIT_STATE) { - - uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8; - uInt level_flags = (s->level-1) >> 1; - - if (level_flags > 3) level_flags = 3; - header |= (level_flags << 6); - if (s->strstart != 0) header |= PRESET_DICT; - header += 31 - (header % 31); - - s->status = BUSY_STATE; - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s->strstart != 0) { - putShortMSB(s, (uInt)(strm->adler >> 16)); - putShortMSB(s, (uInt)(strm->adler & 0xffff)); - } - strm->adler = 1L; - } - - /* Flush as much pending output as possible */ - if (s->pending != 0) { - flush_pending(strm); - if (strm->avail_out == 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s->last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUFF_ERROR. - */ - } else if (strm->avail_in == 0 && flush <= old_flush && - flush != Z_FINISH) { - ERR_RETURN(strm, Z_BUF_ERROR); - } - - /* User must not provide more input after the first FINISH: */ - if (s->status == FINISH_STATE && strm->avail_in != 0) { - ERR_RETURN(strm, Z_BUF_ERROR); - } - - /* Start a new block or continue the current one. - */ - if (strm->avail_in != 0 || s->lookahead != 0 || - (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) { - block_state bstate; - - bstate = (*(configuration_table[s->level].func))(s, flush); - - if (bstate == finish_started || bstate == finish_done) { - s->status = FINISH_STATE; - } - if (bstate == need_more || bstate == finish_started) { - if (strm->avail_out == 0) { - s->last_flush = -1; /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate == block_done) { - if (flush == Z_PARTIAL_FLUSH) { - _tr_align(s); - } else { /* FULL_FLUSH or SYNC_FLUSH */ - _tr_stored_block(s, (char*)0, 0L, 0); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush == Z_FULL_FLUSH) { - CLEAR_HASH(s); /* forget history */ - } - } - flush_pending(strm); - if (strm->avail_out == 0) { - s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - Assert(strm->avail_out > 0, "bug2"); - - if (flush != Z_FINISH) return Z_OK; - if (s->noheader) return Z_STREAM_END; - - /* Write the zlib trailer (adler32) */ - putShortMSB(s, (uInt)(strm->adler >> 16)); - putShortMSB(s, (uInt)(strm->adler & 0xffff)); - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - s->noheader = -1; /* write the trailer only once! */ - return s->pending != 0 ? Z_OK : Z_STREAM_END; -} - -/* ========================================================================= */ -int ZEXPORT deflateEnd (strm) - z_streamp strm; -{ - int status; - - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - - status = strm->state->status; - if (status != INIT_STATE && status != BUSY_STATE && - status != FINISH_STATE) { - return Z_STREAM_ERROR; - } - - /* Deallocate in reverse order of allocations: */ - TRY_FREE(strm, strm->state->pending_buf); - TRY_FREE(strm, strm->state->head); - TRY_FREE(strm, strm->state->prev); - TRY_FREE(strm, strm->state->window); - - ZFREE(strm, strm->state); - strm->state = Z_NULL; - - return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK; -} - -/* ========================================================================= - * Copy the source state to the destination state. - * To simplify the source, this is not supported for 16-bit MSDOS (which - * doesn't have enough memory anyway to duplicate compression states). - */ -int ZEXPORT deflateCopy (dest, source) - z_streamp dest; - z_streamp source; -{ -#ifdef MAXSEG_64K - return Z_STREAM_ERROR; -#else - deflate_state *ds; - deflate_state *ss; - ushf *overlay; - - ss = source->state; - - if (source == Z_NULL || dest == Z_NULL || ss == Z_NULL) { - return Z_STREAM_ERROR; - } - *dest = *source; - - ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state)); - if (ds == Z_NULL) return Z_MEM_ERROR; - dest->state = (struct internal_state FAR *) ds; - *ds = *ss; - ds->strm = dest; - - ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte)); - ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos)); - ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos)); - overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2); - ds->pending_buf = (uchf *) overlay; - - if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL || - ds->pending_buf == Z_NULL) { - deflateEnd (dest); - return Z_MEM_ERROR; - } - /* following zmemcpy do not work for 16-bit MSDOS */ - zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte)); - zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos)); - zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos)); - zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size); - - ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf); - ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush); - ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize; - - ds->l_desc.dyn_tree = ds->dyn_ltree; - ds->d_desc.dyn_tree = ds->dyn_dtree; - ds->bl_desc.dyn_tree = ds->bl_tree; - - return Z_OK; -#endif -} - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->next_in buffer and copying from it. - * (See also flush_pending()). - */ -local int read_buf(strm, buf, size) - z_streamp strm; - Bytef *buf; - unsigned size; -{ - unsigned len = strm->avail_in; - - if (len > size) len = size; - if (len == 0) return 0; - - strm->avail_in -= len; - - if (!strm->state->noheader) { - strm->adler = adler32(strm->adler, strm->next_in, len); - } - zmemcpy(buf, strm->next_in, len); - strm->next_in += len; - strm->total_in += len; - - return (int)len; -} - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -local void lm_init (s) - deflate_state *s; -{ - s->window_size = (ulg)2L*s->w_size; - - CLEAR_HASH(s); - - /* Set the default configuration parameters: - */ - s->max_lazy_match = configuration_table[s->level].max_lazy; - s->good_match = configuration_table[s->level].good_length; - s->nice_match = configuration_table[s->level].nice_length; - s->max_chain_length = configuration_table[s->level].max_chain; - - s->strstart = 0; - s->block_start = 0L; - s->lookahead = 0; - s->match_length = s->prev_length = MIN_MATCH-1; - s->match_available = 0; - s->ins_h = 0; -#ifdef ASMV - match_init(); /* initialize the asm code */ -#endif -} - -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. - */ -#ifndef ASMV -/* For 80x86 and 680x0, an optimized version will be provided in match.asm or - * match.S. The code will be functionally equivalent. - */ -#ifndef FASTEST -local uInt longest_match(s, cur_match) - deflate_state *s; - IPos cur_match; /* current match */ -{ - unsigned chain_length = s->max_chain_length;/* max hash chain length */ - register Bytef *scan = s->window + s->strstart; /* current string */ - register Bytef *match; /* matched string */ - register int len; /* length of current match */ - int best_len = s->prev_length; /* best match length so far */ - int nice_match = s->nice_match; /* stop if match long enough */ - IPos limit = s->strstart > (IPos)MAX_DIST(s) ? - s->strstart - (IPos)MAX_DIST(s) : NIL; - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - Posf *prev = s->prev; - uInt wmask = s->w_mask; - -#ifdef UNALIGNED_OK - /* Compare two bytes at a time. Note: this is not always beneficial. - * Try with and without -DUNALIGNED_OK to check. - */ - register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; - register ush scan_start = *(ushf*)scan; - register ush scan_end = *(ushf*)(scan+best_len-1); -#else - register Bytef *strend = s->window + s->strstart + MAX_MATCH; - register Byte scan_end1 = scan[best_len-1]; - register Byte scan_end = scan[best_len]; -#endif - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s->prev_length >= s->good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; - - Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - do { - Assert(cur_match < s->strstart, "no future"); - match = s->window + cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2: - */ -#if (defined(UNALIGNED_OK) && MAX_MATCH == 258) - /* This code assumes sizeof(unsigned short) == 2. Do not use - * UNALIGNED_OK if your compiler uses a different size. - */ - if (*(ushf*)(match+best_len-1) != scan_end || - *(ushf*)match != scan_start) continue; - - /* It is not necessary to compare scan[2] and match[2] since they are - * always equal when the other bytes match, given that the hash keys - * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at - * strstart+3, +5, ... up to strstart+257. We check for insufficient - * lookahead only every 4th comparison; the 128th check will be made - * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is - * necessary to put more guard bytes at the end of the window, or - * to check more often for insufficient lookahead. - */ - Assert(scan[2] == match[2], "scan[2]?"); - scan++, match++; - do { - } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) && - *(ushf*)(scan+=2) == *(ushf*)(match+=2) && - *(ushf*)(scan+=2) == *(ushf*)(match+=2) && - *(ushf*)(scan+=2) == *(ushf*)(match+=2) && - scan < strend); - /* The funny "do {}" generates better code on most compilers */ - - /* Here, scan <= window+strstart+257 */ - Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - if (*scan == *match) scan++; - - len = (MAX_MATCH - 1) - (int)(strend-scan); - scan = strend - (MAX_MATCH-1); - -#else /* UNALIGNED_OK */ - - if (match[best_len] != scan_end || - match[best_len-1] != scan_end1 || - *match != *scan || - *++match != scan[1]) continue; - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2, match++; - Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - } while (*++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - scan < strend); - - Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (int)(strend - scan); - scan = strend - MAX_MATCH; - -#endif /* UNALIGNED_OK */ - - if (len > best_len) { - s->match_start = cur_match; - best_len = len; - if (len >= nice_match) break; -#ifdef UNALIGNED_OK - scan_end = *(ushf*)(scan+best_len-1); -#else - scan_end1 = scan[best_len-1]; - scan_end = scan[best_len]; -#endif - } - } while ((cur_match = prev[cur_match & wmask]) > limit - && --chain_length != 0); - - if ((uInt)best_len <= s->lookahead) return (uInt)best_len; - return s->lookahead; -} - -#else /* FASTEST */ -/* --------------------------------------------------------------------------- - * Optimized version for level == 1 only - */ -local uInt longest_match(s, cur_match) - deflate_state *s; - IPos cur_match; /* current match */ -{ - register Bytef *scan = s->window + s->strstart; /* current string */ - register Bytef *match; /* matched string */ - register int len; /* length of current match */ - register Bytef *strend = s->window + s->strstart + MAX_MATCH; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - Assert(cur_match < s->strstart, "no future"); - - match = s->window + cur_match; - - /* Return failure if the match length is less than 2: - */ - if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1; - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2, match += 2; - Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - } while (*++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - scan < strend); - - Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (int)(strend - scan); - - if (len < MIN_MATCH) return MIN_MATCH - 1; - - s->match_start = cur_match; - return len <= s->lookahead ? len : s->lookahead; -} -#endif /* FASTEST */ -#endif /* ASMV */ - -#ifdef DEBUG -/* =========================================================================== - * Check that the match at match_start is indeed a match. - */ -local void check_match(s, start, match, length) - deflate_state *s; - IPos start, match; - int length; -{ - /* check that the match is indeed a match */ - if (zmemcmp(s->window + match, - s->window + start, length) != EQUAL) { - fprintf(stderr, " start %u, match %u, length %d\n", - start, match, length); - do { - fprintf(stderr, "%c%c", s->window[match++], s->window[start++]); - } while (--length != 0); - z_error("invalid match"); - } - if (z_verbose > 1) { - fprintf(stderr,"\\[%d,%d]", start-match, length); - do { putc(s->window[start++], stderr); } while (--length != 0); - } -} -#else -# define check_match(s, start, match, length) -#endif - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -local void fill_window(s) - deflate_state *s; -{ - register unsigned n, m; - register Posf *p; - unsigned more; /* Amount of free space at the end of the window. */ - uInt wsize = s->w_size; - - do { - more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart); - - /* Deal with !@#$% 64K limit: */ - if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - more = wsize; - - } else if (more == (unsigned)(-1)) { - /* Very unlikely, but possible on 16 bit machine if strstart == 0 - * and lookahead == 1 (input done one byte at time) - */ - more--; - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - } else if (s->strstart >= wsize+MAX_DIST(s)) { - - zmemcpy(s->window, s->window+wsize, (unsigned)wsize); - s->match_start -= wsize; - s->strstart -= wsize; /* we now have strstart >= MAX_DIST */ - s->block_start -= (long) wsize; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - n = s->hash_size; - p = &s->head[n]; - do { - m = *--p; - *p = (Pos)(m >= wsize ? m-wsize : NIL); - } while (--n); - - n = wsize; -#ifndef FASTEST - p = &s->prev[n]; - do { - m = *--p; - *p = (Pos)(m >= wsize ? m-wsize : NIL); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); -#endif - more += wsize; - } - if (s->strm->avail_in == 0) return; - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - Assert(more >= 2, "more < 2"); - - n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more); - s->lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s->lookahead >= MIN_MATCH) { - s->ins_h = s->window[s->strstart]; - UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]); -#if MIN_MATCH != 3 - Call UPDATE_HASH() MIN_MATCH-3 more times -#endif - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0); -} - -/* =========================================================================== - * Flush the current block, with given end-of-file flag. - * IN assertion: strstart is set to the end of the current match. - */ -#define FLUSH_BLOCK_ONLY(s, eof) { \ - _tr_flush_block(s, (s->block_start >= 0L ? \ - (charf *)&s->window[(unsigned)s->block_start] : \ - (charf *)Z_NULL), \ - (ulg)((long)s->strstart - s->block_start), \ - (eof)); \ - s->block_start = s->strstart; \ - flush_pending(s->strm); \ - Tracev((stderr,"[FLUSH]")); \ -} - -/* Same but force premature exit if necessary. */ -#define FLUSH_BLOCK(s, eof) { \ - FLUSH_BLOCK_ONLY(s, eof); \ - if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \ -} - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. - */ -local block_state deflate_stored(s, flush) - deflate_state *s; - int flush; -{ - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: - */ - ulg max_block_size = 0xffff; - ulg max_start; - - if (max_block_size > s->pending_buf_size - 5) { - max_block_size = s->pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s->lookahead <= 1) { - - Assert(s->strstart < s->w_size+MAX_DIST(s) || - s->block_start >= (long)s->w_size, "slide too late"); - - fill_window(s); - if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more; - - if (s->lookahead == 0) break; /* flush the current block */ - } - Assert(s->block_start >= 0L, "block gone"); - - s->strstart += s->lookahead; - s->lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - max_start = s->block_start + max_block_size; - if (s->strstart == 0 || (ulg)s->strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s->lookahead = (uInt)(s->strstart - max_start); - s->strstart = (uInt)max_start; - FLUSH_BLOCK(s, 0); - } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: - */ - if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) { - FLUSH_BLOCK(s, 0); - } - } - FLUSH_BLOCK(s, flush == Z_FINISH); - return flush == Z_FINISH ? finish_done : block_done; -} - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ -local block_state deflate_fast(s, flush) - deflate_state *s; - int flush; -{ - IPos hash_head = NIL; /* head of the hash chain */ - int bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s->lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { - return need_more; - } - if (s->lookahead == 0) break; /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - if (s->lookahead >= MIN_MATCH) { - INSERT_STRING(s, s->strstart, hash_head); - } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - if (s->strategy != Z_HUFFMAN_ONLY) { - s->match_length = longest_match (s, hash_head); - } - /* longest_match() sets match_start */ - } - if (s->match_length >= MIN_MATCH) { - check_match(s, s->strstart, s->match_start, s->match_length); - - _tr_tally_dist(s, s->strstart - s->match_start, - s->match_length - MIN_MATCH, bflush); - - s->lookahead -= s->match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ -#ifndef FASTEST - if (s->match_length <= s->max_insert_length && - s->lookahead >= MIN_MATCH) { - s->match_length--; /* string at strstart already in hash table */ - do { - s->strstart++; - INSERT_STRING(s, s->strstart, hash_head); - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s->match_length != 0); - s->strstart++; - } else -#endif - { - s->strstart += s->match_length; - s->match_length = 0; - s->ins_h = s->window[s->strstart]; - UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]); -#if MIN_MATCH != 3 - Call UPDATE_HASH() MIN_MATCH-3 more times -#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - Tracevv((stderr,"%c", s->window[s->strstart])); - _tr_tally_lit (s, s->window[s->strstart], bflush); - s->lookahead--; - s->strstart++; - } - if (bflush) FLUSH_BLOCK(s, 0); - } - FLUSH_BLOCK(s, flush == Z_FINISH); - return flush == Z_FINISH ? finish_done : block_done; -} - -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ -local block_state deflate_slow(s, flush) - deflate_state *s; - int flush; -{ - IPos hash_head = NIL; /* head of hash chain */ - int bflush; /* set if current block must be flushed */ - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s->lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { - return need_more; - } - if (s->lookahead == 0) break; /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - if (s->lookahead >= MIN_MATCH) { - INSERT_STRING(s, s->strstart, hash_head); - } - - /* Find the longest match, discarding those <= prev_length. - */ - s->prev_length = s->match_length, s->prev_match = s->match_start; - s->match_length = MIN_MATCH-1; - - if (hash_head != NIL && s->prev_length < s->max_lazy_match && - s->strstart - hash_head <= MAX_DIST(s)) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - if (s->strategy != Z_HUFFMAN_ONLY) { - s->match_length = longest_match (s, hash_head); - } - /* longest_match() sets match_start */ - - if (s->match_length <= 5 && (s->strategy == Z_FILTERED || - (s->match_length == MIN_MATCH && - s->strstart - s->match_start > TOO_FAR))) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s->match_length = MIN_MATCH-1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) { - uInt max_insert = s->strstart + s->lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - check_match(s, s->strstart-1, s->prev_match, s->prev_length); - - _tr_tally_dist(s, s->strstart -1 - s->prev_match, - s->prev_length - MIN_MATCH, bflush); - - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s->lookahead -= s->prev_length-1; - s->prev_length -= 2; - do { - if (++s->strstart <= max_insert) { - INSERT_STRING(s, s->strstart, hash_head); - } - } while (--s->prev_length != 0); - s->match_available = 0; - s->match_length = MIN_MATCH-1; - s->strstart++; - - if (bflush) FLUSH_BLOCK(s, 0); - - } else if (s->match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - Tracevv((stderr,"%c", s->window[s->strstart-1])); - _tr_tally_lit(s, s->window[s->strstart-1], bflush); - if (bflush) { - FLUSH_BLOCK_ONLY(s, 0); - } - s->strstart++; - s->lookahead--; - if (s->strm->avail_out == 0) return need_more; - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s->match_available = 1; - s->strstart++; - s->lookahead--; - } - } - Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s->match_available) { - Tracevv((stderr,"%c", s->window[s->strstart-1])); - _tr_tally_lit(s, s->window[s->strstart-1], bflush); - s->match_available = 0; - } - FLUSH_BLOCK(s, flush == Z_FINISH); - return flush == Z_FINISH ? finish_done : block_done; -} diff --git a/src/zlib/deflate.h b/src/zlib/deflate.h deleted file mode 100644 index ef26c00c2a..0000000000 --- a/src/zlib/deflate.h +++ /dev/null @@ -1,318 +0,0 @@ -/* deflate.h -- internal compression state - * Copyright (C) 1995-1998 Jean-loup Gailly - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* @(#) $Id$ */ - -#ifndef _DEFLATE_H -#define _DEFLATE_H - -#include "zutil.h" - -/* =========================================================================== - * Internal compression state. - */ - -#define LENGTH_CODES 29 -/* number of length codes, not counting the special END_BLOCK code */ - -#define LITERALS 256 -/* number of literal bytes 0..255 */ - -#define L_CODES (LITERALS+1+LENGTH_CODES) -/* number of Literal or Length codes, including the END_BLOCK code */ - -#define D_CODES 30 -/* number of distance codes */ - -#define BL_CODES 19 -/* number of codes used to transfer the bit lengths */ - -#define HEAP_SIZE (2*L_CODES+1) -/* maximum heap size */ - -#define MAX_BITS 15 -/* All codes must not exceed MAX_BITS bits */ - -#define INIT_STATE 42 -#define BUSY_STATE 113 -#define FINISH_STATE 666 -/* Stream status */ - - -/* Data structure describing a single value and its code string. */ -typedef struct ct_data_s { - union { - ush freq; /* frequency count */ - ush code; /* bit string */ - } fc; - union { - ush dad; /* father node in Huffman tree */ - ush len; /* length of bit string */ - } dl; -} FAR ct_data; - -#define Freq fc.freq -#define Code fc.code -#define Dad dl.dad -#define Len dl.len - -typedef struct static_tree_desc_s static_tree_desc; - -typedef struct tree_desc_s { - ct_data *dyn_tree; /* the dynamic tree */ - int max_code; /* largest code with non zero frequency */ - static_tree_desc *stat_desc; /* the corresponding static tree */ -} FAR tree_desc; - -typedef ush Pos; -typedef Pos FAR Posf; -typedef unsigned IPos; - -/* A Pos is an index in the character window. We use short instead of int to - * save space in the various tables. IPos is used only for parameter passing. - */ - -typedef struct internal_state { - z_streamp strm; /* pointer back to this zlib stream */ - int status; /* as the name implies */ - Bytef *pending_buf; /* output still pending */ - ulg pending_buf_size; /* size of pending_buf */ - Bytef *pending_out; /* next pending byte to output to the stream */ - int pending; /* nb of bytes in the pending buffer */ - int noheader; /* suppress zlib header and adler32 */ - Byte data_type; /* UNKNOWN, BINARY or ASCII */ - Byte method; /* STORED (for zip only) or DEFLATED */ - int last_flush; /* value of flush param for previous deflate call */ - - /* used by deflate.c: */ - - uInt w_size; /* LZ77 window size (32K by default) */ - uInt w_bits; /* log2(w_size) (8..16) */ - uInt w_mask; /* w_size - 1 */ - - Bytef *window; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. Also, it limits - * the window size to 64K, which is quite useful on MSDOS. - * To do: use the user input buffer as sliding window. - */ - - ulg window_size; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - Posf *prev; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - Posf *head; /* Heads of the hash chains or NIL. */ - - uInt ins_h; /* hash index of string to be inserted */ - uInt hash_size; /* number of elements in hash table */ - uInt hash_bits; /* log2(hash_size) */ - uInt hash_mask; /* hash_size-1 */ - - uInt hash_shift; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - long block_start; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - uInt match_length; /* length of best match */ - IPos prev_match; /* previous match */ - int match_available; /* set if previous match exists */ - uInt strstart; /* start of string to insert */ - uInt match_start; /* start of matching string */ - uInt lookahead; /* number of valid bytes ahead in window */ - - uInt prev_length; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - uInt max_chain_length; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - uInt max_lazy_match; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ -# define max_insert_length max_lazy_match - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - int level; /* compression level (1..9) */ - int strategy; /* favor or force Huffman coding*/ - - uInt good_match; - /* Use a faster search when the previous match is longer than this */ - - int nice_match; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - /* Didn't use ct_data typedef below to supress compiler warning */ - struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - struct tree_desc_s l_desc; /* desc. for literal tree */ - struct tree_desc_s d_desc; /* desc. for distance tree */ - struct tree_desc_s bl_desc; /* desc. for bit length tree */ - - ush bl_count[MAX_BITS+1]; - /* number of codes at each bit length for an optimal tree */ - - int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - int heap_len; /* number of elements in the heap */ - int heap_max; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - uch depth[2*L_CODES+1]; - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - uchf *l_buf; /* buffer for literals or lengths */ - - uInt lit_bufsize; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - uInt last_lit; /* running index in l_buf */ - - ushf *d_buf; - /* Buffer for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - ulg opt_len; /* bit length of current block with optimal trees */ - ulg static_len; /* bit length of current block with static trees */ - ulg compressed_len; /* total bit length of compressed file */ - uInt matches; /* number of string matches in current block */ - int last_eob_len; /* bit length of EOB code for last block */ - -#ifdef __WXDEBUG__ - ulg bits_sent; /* bit length of the compressed data */ -#endif - - ush bi_buf; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - int bi_valid; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - -} FAR deflate_state; - -/* Output a byte on the stream. - * IN assertion: there is enough room in pending_buf. - */ -#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);} - - -#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) -/* Minimum amount of lookahead, except at the end of the input file. - * See deflate.c for comments about the MIN_MATCH+1. - */ - -#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD) -/* In order to simplify the code, particularly on 16 bit machines, match - * distances are limited to MAX_DIST instead of WSIZE. - */ - - /* in trees.c */ -void _tr_init OF((deflate_state *s)); -int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); -ulg _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len, - int eof)); -void _tr_align OF((deflate_state *s)); -void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len, - int eof)); - -#define d_code(dist) \ - ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)]) -/* Mapping from a distance to a distance code. dist is the distance - 1 and - * must not have side effects. _dist_code[256] and _dist_code[257] are never - * used. - */ - -#ifndef __WXDEBUG__ -/* Inline versions of _tr_tally for speed: */ - -#if defined(GEN_TREES_H) || !defined(STDC) - extern uch _length_code[]; - extern uch _dist_code[]; -#else - extern const uch _length_code[]; - extern const uch _dist_code[]; -#endif - -# define _tr_tally_lit(s, c, flush) \ - { uch cc = (c); \ - s->d_buf[s->last_lit] = 0; \ - s->l_buf[s->last_lit++] = cc; \ - s->dyn_ltree[cc].Freq++; \ - flush = (s->last_lit == s->lit_bufsize-1); \ - } -# define _tr_tally_dist(s, distance, length, flush) \ - { uch len = (length); \ - ush dist = (distance); \ - s->d_buf[s->last_lit] = dist; \ - s->l_buf[s->last_lit++] = len; \ - dist--; \ - s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ - s->dyn_dtree[d_code(dist)].Freq++; \ - flush = (s->last_lit == s->lit_bufsize-1); \ - } -#else -# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c) -# define _tr_tally_dist(s, distance, length, flush) \ - flush = _tr_tally(s, distance, length) -#endif - -#endif diff --git a/src/zlib/descrip.mms b/src/zlib/descrip.mms deleted file mode 100644 index 9d364598a2..0000000000 --- a/src/zlib/descrip.mms +++ /dev/null @@ -1,48 +0,0 @@ -# descrip.mms: MMS description file for building zlib on VMS -# written by Martin P.J. Zinser - -cc_defs = -c_deb = - -.ifdef __DECC__ -pref = /prefix=all -.endif - -OBJS = adler32.obj, compress.obj, crc32.obj, gzio.obj, uncompr.obj,\ - deflate.obj, trees.obj, zutil.obj, inflate.obj, infblock.obj,\ - inftrees.obj, infcodes.obj, infutil.obj, inffast.obj - -CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF) - -all : example.exe minigzip.exe - @ write sys$output " Example applications available" -libz.olb : libz.olb($(OBJS)) - @ write sys$output " libz available" - -example.exe : example.obj libz.olb - link example,libz.olb/lib - -minigzip.exe : minigzip.obj libz.olb - link minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib - -clean : - delete *.obj;*,libz.olb;* - - -# Other dependencies. -adler32.obj : zutil.h zlib.h zconf.h -compress.obj : zlib.h zconf.h -crc32.obj : zutil.h zlib.h zconf.h -deflate.obj : deflate.h zutil.h zlib.h zconf.h -example.obj : zlib.h zconf.h -gzio.obj : zutil.h zlib.h zconf.h -infblock.obj : zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h -infcodes.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h inffast.h -inffast.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h -inflate.obj : zutil.h zlib.h zconf.h infblock.h -inftrees.obj : zutil.h zlib.h zconf.h inftrees.h -infutil.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h -minigzip.obj : zlib.h zconf.h -trees.obj : deflate.h zutil.h zlib.h zconf.h -uncompr.obj : zlib.h zconf.h -zutil.obj : zutil.h zlib.h zconf.h diff --git a/src/zlib/example.c b/src/zlib/example.c deleted file mode 100644 index a9e6486cc0..0000000000 --- a/src/zlib/example.c +++ /dev/null @@ -1,550 +0,0 @@ -/* example.c -- usage example of the zlib compression library - * Copyright (C) 1995-1998 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#include -#include "../zlib/zlib.h" - -#ifdef STDC -# include -# include -#else - extern void exit OF((int)); -#endif - -#define CHECK_ERR(err, msg) { \ - if (err != Z_OK) { \ - fprintf(stderr, "%s error: %d\n", msg, err); \ - exit(1); \ - } \ -} - -const char hello[] = "hello, hello!"; -/* "hello world" would be more standard, but the repeated "hello" - * stresses the compression code better, sorry... - */ - -const char dictionary[] = "hello"; -uLong dictId; /* Adler32 value of the dictionary */ - -void test_compress OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -void test_gzio OF((const char *out, const char *in, - Byte *uncompr, int uncomprLen)); -void test_deflate OF((Byte *compr, uLong comprLen)); -void test_inflate OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -void test_large_deflate OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -void test_large_inflate OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -void test_flush OF((Byte *compr, uLong *comprLen)); -void test_sync OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -void test_dict_deflate OF((Byte *compr, uLong comprLen)); -void test_dict_inflate OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -int main OF((int argc, char *argv[])); - -/* =========================================================================== - * Test compress() and uncompress() - */ -void test_compress(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ - int err; - uLong len = strlen(hello)+1; - - err = compress(compr, &comprLen, (const Bytef*)hello, len); - CHECK_ERR(err, "compress"); - - strcpy((char*)uncompr, "garbage"); - - err = uncompress(uncompr, &uncomprLen, compr, comprLen); - CHECK_ERR(err, "uncompress"); - - if (strcmp((char*)uncompr, hello)) { - fprintf(stderr, "bad uncompress\n"); - exit(1); - } else { - printf("uncompress(): %s\n", (char *)uncompr); - } -} - -/* =========================================================================== - * Test read/write of .gz files - */ -void test_gzio(out, in, uncompr, uncomprLen) - const char *out; /* output file */ - const char *in; /* input file */ - Byte *uncompr; - int uncomprLen; -{ - int err; - int len = strlen(hello)+1; - gzFile file; - z_off_t pos; - - file = gzopen(out, "wb"); - if (file == NULL) { - fprintf(stderr, "gzopen error\n"); - exit(1); - } - gzputc(file, 'h'); - if (gzputs(file, "ello") != 4) { - fprintf(stderr, "gzputs err: %s\n", gzerror(file, &err)); - exit(1); - } - if (gzprintf(file, ", %s!", "hello") != 8) { - fprintf(stderr, "gzprintf err: %s\n", gzerror(file, &err)); - exit(1); - } - gzseek(file, 1L, SEEK_CUR); /* add one zero byte */ - gzclose(file); - - file = gzopen(in, "rb"); - if (file == NULL) { - fprintf(stderr, "gzopen error\n"); - } - strcpy((char*)uncompr, "garbage"); - - uncomprLen = gzread(file, uncompr, (unsigned)uncomprLen); - if (uncomprLen != len) { - fprintf(stderr, "gzread err: %s\n", gzerror(file, &err)); - exit(1); - } - if (strcmp((char*)uncompr, hello)) { - fprintf(stderr, "bad gzread: %s\n", (char*)uncompr); - exit(1); - } else { - printf("gzread(): %s\n", (char *)uncompr); - } - - pos = gzseek(file, -8L, SEEK_CUR); - if (pos != 6 || gztell(file) != pos) { - fprintf(stderr, "gzseek error, pos=%ld, gztell=%ld\n", - (long)pos, (long)gztell(file)); - exit(1); - } - - if (gzgetc(file) != ' ') { - fprintf(stderr, "gzgetc error\n"); - exit(1); - } - - gzgets(file, (char*)uncompr, uncomprLen); - uncomprLen = strlen((char*)uncompr); - if (uncomprLen != 6) { /* "hello!" */ - fprintf(stderr, "gzgets err after gzseek: %s\n", gzerror(file, &err)); - exit(1); - } - if (strcmp((char*)uncompr, hello+7)) { - fprintf(stderr, "bad gzgets after gzseek\n"); - exit(1); - } else { - printf("gzgets() after gzseek: %s\n", (char *)uncompr); - } - - gzclose(file); -} - -/* =========================================================================== - * Test deflate() with small buffers - */ -void test_deflate(compr, comprLen) - Byte *compr; - uLong comprLen; -{ - z_stream c_stream; /* compression stream */ - int err; - int len = strlen(hello)+1; - - c_stream.zalloc = (alloc_func)0; - c_stream.zfree = (free_func)0; - c_stream.opaque = (voidpf)0; - - err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION); - CHECK_ERR(err, "deflateInit"); - - c_stream.next_in = (Bytef*)hello; - c_stream.next_out = compr; - - while (c_stream.total_in != (uLong)len && c_stream.total_out < comprLen) { - c_stream.avail_in = c_stream.avail_out = 1; /* force small buffers */ - err = deflate(&c_stream, Z_NO_FLUSH); - CHECK_ERR(err, "deflate"); - } - /* Finish the stream, still forcing small buffers: */ - for (;;) { - c_stream.avail_out = 1; - err = deflate(&c_stream, Z_FINISH); - if (err == Z_STREAM_END) break; - CHECK_ERR(err, "deflate"); - } - - err = deflateEnd(&c_stream); - CHECK_ERR(err, "deflateEnd"); -} - -/* =========================================================================== - * Test inflate() with small buffers - */ -void test_inflate(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ - int err; - z_stream d_stream; /* decompression stream */ - - strcpy((char*)uncompr, "garbage"); - - d_stream.zalloc = (alloc_func)0; - d_stream.zfree = (free_func)0; - d_stream.opaque = (voidpf)0; - - d_stream.next_in = compr; - d_stream.avail_in = 0; - d_stream.next_out = uncompr; - - err = inflateInit(&d_stream); - CHECK_ERR(err, "inflateInit"); - - while (d_stream.total_out < uncomprLen && d_stream.total_in < comprLen) { - d_stream.avail_in = d_stream.avail_out = 1; /* force small buffers */ - err = inflate(&d_stream, Z_NO_FLUSH); - if (err == Z_STREAM_END) break; - CHECK_ERR(err, "inflate"); - } - - err = inflateEnd(&d_stream); - CHECK_ERR(err, "inflateEnd"); - - if (strcmp((char*)uncompr, hello)) { - fprintf(stderr, "bad inflate\n"); - exit(1); - } else { - printf("inflate(): %s\n", (char *)uncompr); - } -} - -/* =========================================================================== - * Test deflate() with large buffers and dynamic change of compression level - */ -void test_large_deflate(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ - z_stream c_stream; /* compression stream */ - int err; - - c_stream.zalloc = (alloc_func)0; - c_stream.zfree = (free_func)0; - c_stream.opaque = (voidpf)0; - - err = deflateInit(&c_stream, Z_BEST_SPEED); - CHECK_ERR(err, "deflateInit"); - - c_stream.next_out = compr; - c_stream.avail_out = (uInt)comprLen; - - /* At this point, uncompr is still mostly zeroes, so it should compress - * very well: - */ - c_stream.next_in = uncompr; - c_stream.avail_in = (uInt)uncomprLen; - err = deflate(&c_stream, Z_NO_FLUSH); - CHECK_ERR(err, "deflate"); - if (c_stream.avail_in != 0) { - fprintf(stderr, "deflate not greedy\n"); - exit(1); - } - - /* Feed in already compressed data and switch to no compression: */ - deflateParams(&c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY); - c_stream.next_in = compr; - c_stream.avail_in = (uInt)comprLen/2; - err = deflate(&c_stream, Z_NO_FLUSH); - CHECK_ERR(err, "deflate"); - - /* Switch back to compressing mode: */ - deflateParams(&c_stream, Z_BEST_COMPRESSION, Z_FILTERED); - c_stream.next_in = uncompr; - c_stream.avail_in = (uInt)uncomprLen; - err = deflate(&c_stream, Z_NO_FLUSH); - CHECK_ERR(err, "deflate"); - - err = deflate(&c_stream, Z_FINISH); - if (err != Z_STREAM_END) { - fprintf(stderr, "deflate should report Z_STREAM_END\n"); - exit(1); - } - err = deflateEnd(&c_stream); - CHECK_ERR(err, "deflateEnd"); -} - -/* =========================================================================== - * Test inflate() with large buffers - */ -void test_large_inflate(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ - int err; - z_stream d_stream; /* decompression stream */ - - strcpy((char*)uncompr, "garbage"); - - d_stream.zalloc = (alloc_func)0; - d_stream.zfree = (free_func)0; - d_stream.opaque = (voidpf)0; - - d_stream.next_in = compr; - d_stream.avail_in = (uInt)comprLen; - - err = inflateInit(&d_stream); - CHECK_ERR(err, "inflateInit"); - - for (;;) { - d_stream.next_out = uncompr; /* discard the output */ - d_stream.avail_out = (uInt)uncomprLen; - err = inflate(&d_stream, Z_NO_FLUSH); - if (err == Z_STREAM_END) break; - CHECK_ERR(err, "large inflate"); - } - - err = inflateEnd(&d_stream); - CHECK_ERR(err, "inflateEnd"); - - if (d_stream.total_out != 2*uncomprLen + comprLen/2) { - fprintf(stderr, "bad large inflate: %ld\n", d_stream.total_out); - exit(1); - } else { - printf("large_inflate(): OK\n"); - } -} - -/* =========================================================================== - * Test deflate() with full flush - */ -void test_flush(compr, comprLen) - Byte *compr; - uLong *comprLen; -{ - z_stream c_stream; /* compression stream */ - int err; - int len = strlen(hello)+1; - - c_stream.zalloc = (alloc_func)0; - c_stream.zfree = (free_func)0; - c_stream.opaque = (voidpf)0; - - err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION); - CHECK_ERR(err, "deflateInit"); - - c_stream.next_in = (Bytef*)hello; - c_stream.next_out = compr; - c_stream.avail_in = 3; - c_stream.avail_out = (uInt)*comprLen; - err = deflate(&c_stream, Z_FULL_FLUSH); - CHECK_ERR(err, "deflate"); - - compr[3]++; /* force an error in first compressed block */ - c_stream.avail_in = len - 3; - - err = deflate(&c_stream, Z_FINISH); - if (err != Z_STREAM_END) { - CHECK_ERR(err, "deflate"); - } - err = deflateEnd(&c_stream); - CHECK_ERR(err, "deflateEnd"); - - *comprLen = c_stream.total_out; -} - -/* =========================================================================== - * Test inflateSync() - */ -void test_sync(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ - int err; - z_stream d_stream; /* decompression stream */ - - strcpy((char*)uncompr, "garbage"); - - d_stream.zalloc = (alloc_func)0; - d_stream.zfree = (free_func)0; - d_stream.opaque = (voidpf)0; - - d_stream.next_in = compr; - d_stream.avail_in = 2; /* just read the zlib header */ - - err = inflateInit(&d_stream); - CHECK_ERR(err, "inflateInit"); - - d_stream.next_out = uncompr; - d_stream.avail_out = (uInt)uncomprLen; - - inflate(&d_stream, Z_NO_FLUSH); - CHECK_ERR(err, "inflate"); - - d_stream.avail_in = (uInt)comprLen-2; /* read all compressed data */ - err = inflateSync(&d_stream); /* but skip the damaged part */ - CHECK_ERR(err, "inflateSync"); - - err = inflate(&d_stream, Z_FINISH); - if (err != Z_DATA_ERROR) { - fprintf(stderr, "inflate should report DATA_ERROR\n"); - /* Because of incorrect adler32 */ - exit(1); - } - err = inflateEnd(&d_stream); - CHECK_ERR(err, "inflateEnd"); - - printf("after inflateSync(): hel%s\n", (char *)uncompr); -} - -/* =========================================================================== - * Test deflate() with preset dictionary - */ -void test_dict_deflate(compr, comprLen) - Byte *compr; - uLong comprLen; -{ - z_stream c_stream; /* compression stream */ - int err; - - c_stream.zalloc = (alloc_func)0; - c_stream.zfree = (free_func)0; - c_stream.opaque = (voidpf)0; - - err = deflateInit(&c_stream, Z_BEST_COMPRESSION); - CHECK_ERR(err, "deflateInit"); - - err = deflateSetDictionary(&c_stream, - (const Bytef*)dictionary, sizeof(dictionary)); - CHECK_ERR(err, "deflateSetDictionary"); - - dictId = c_stream.adler; - c_stream.next_out = compr; - c_stream.avail_out = (uInt)comprLen; - - c_stream.next_in = (Bytef*)hello; - c_stream.avail_in = (uInt)strlen(hello)+1; - - err = deflate(&c_stream, Z_FINISH); - if (err != Z_STREAM_END) { - fprintf(stderr, "deflate should report Z_STREAM_END\n"); - exit(1); - } - err = deflateEnd(&c_stream); - CHECK_ERR(err, "deflateEnd"); -} - -/* =========================================================================== - * Test inflate() with a preset dictionary - */ -void test_dict_inflate(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ - int err; - z_stream d_stream; /* decompression stream */ - - strcpy((char*)uncompr, "garbage"); - - d_stream.zalloc = (alloc_func)0; - d_stream.zfree = (free_func)0; - d_stream.opaque = (voidpf)0; - - d_stream.next_in = compr; - d_stream.avail_in = (uInt)comprLen; - - err = inflateInit(&d_stream); - CHECK_ERR(err, "inflateInit"); - - d_stream.next_out = uncompr; - d_stream.avail_out = (uInt)uncomprLen; - - for (;;) { - err = inflate(&d_stream, Z_NO_FLUSH); - if (err == Z_STREAM_END) break; - if (err == Z_NEED_DICT) { - if (d_stream.adler != dictId) { - fprintf(stderr, "unexpected dictionary"); - exit(1); - } - err = inflateSetDictionary(&d_stream, (const Bytef*)dictionary, - sizeof(dictionary)); - } - CHECK_ERR(err, "inflate with dict"); - } - - err = inflateEnd(&d_stream); - CHECK_ERR(err, "inflateEnd"); - - if (strcmp((char*)uncompr, hello)) { - fprintf(stderr, "bad inflate with dict\n"); - exit(1); - } else { - printf("inflate with dictionary: %s\n", (char *)uncompr); - } -} - -/* =========================================================================== - * Usage: example [output.gz [input.gz]] - */ - -int main(argc, argv) - int argc; - char *argv[]; -{ - Byte *compr, *uncompr; - uLong comprLen = 10000*sizeof(int); /* don't overflow on MSDOS */ - uLong uncomprLen = comprLen; - static const char* myVersion = ZLIB_VERSION; - - if (zlibVersion()[0] != myVersion[0]) { - fprintf(stderr, "incompatible zlib version\n"); - exit(1); - - } else if (strcmp(zlibVersion(), ZLIB_VERSION) != 0) { - fprintf(stderr, "warning: different zlib version\n"); - } - - compr = (Byte*)calloc((uInt)comprLen, 1); - uncompr = (Byte*)calloc((uInt)uncomprLen, 1); - /* compr and uncompr are cleared to avoid reading uninitialized - * data and to ensure that uncompr compresses well. - */ - if (compr == Z_NULL || uncompr == Z_NULL) { - printf("out of memory\n"); - exit(1); - } - test_compress(compr, comprLen, uncompr, uncomprLen); - - test_gzio((argc > 1 ? argv[1] : "foo.gz"), - (argc > 2 ? argv[2] : "foo.gz"), - uncompr, (int)uncomprLen); - - test_deflate(compr, comprLen); - test_inflate(compr, comprLen, uncompr, uncomprLen); - - test_large_deflate(compr, comprLen, uncompr, uncomprLen); - test_large_inflate(compr, comprLen, uncompr, uncomprLen); - - test_flush(compr, &comprLen); - test_sync(compr, comprLen, uncompr, uncomprLen); - comprLen = uncomprLen; - - test_dict_deflate(compr, comprLen); - test_dict_inflate(compr, comprLen, uncompr, uncomprLen); - - exit(0); - return 0; /* to avoid warning */ -} diff --git a/src/zlib/gzio.c b/src/zlib/gzio.c deleted file mode 100644 index e29198ac7a..0000000000 --- a/src/zlib/gzio.c +++ /dev/null @@ -1,869 +0,0 @@ -/* gzio.c -- IO on .gz files - * Copyright (C) 1995-1998 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - * - * Compile this file with -DNO_DEFLATE to avoid the compression code. - */ - -/* @(#) $Id$ */ - -#include - -#include "zutil.h" - -struct internal_state {int dummy;}; /* for buggy compilers */ - -#ifndef Z_BUFSIZE -# ifdef MAXSEG_64K -# define Z_BUFSIZE 4096 /* minimize memory usage for 16-bit DOS */ -# else -# define Z_BUFSIZE 16384 -# endif -#endif -#ifndef Z_PRINTF_BUFSIZE -# define Z_PRINTF_BUFSIZE 4096 -#endif - -#define ALLOC(size) malloc(size) -#define TRYFREE(p) {if (p) free(p);} - -static int gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */ - -/* gzip flag byte */ -#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */ -#define HEAD_CRC 0x02 /* bit 1 set: header CRC present */ -#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ -#define ORIG_NAME 0x08 /* bit 3 set: original file name present */ -#define COMMENT 0x10 /* bit 4 set: file comment present */ -#define RESERVED 0xE0 /* bits 5..7: reserved */ - -typedef struct gz_stream { - z_stream stream; - int z_err; /* error code for last stream operation */ - int z_eof; /* set if end of input file */ - FILE *file; /* .gz file */ - Byte *inbuf; /* input buffer */ - Byte *outbuf; /* output buffer */ - uLong crc; /* crc32 of uncompressed data */ - char *msg; /* error message */ - char *path; /* path name for debugging only */ - int transparent; /* 1 if input file is not a .gz file */ - char mode; /* 'w' or 'r' */ - long startpos; /* start of compressed data in file (header skipped) */ -} gz_stream; - - -local gzFile gz_open OF((const char *path, const char *mode, int fd)); -local int do_flush OF((gzFile file, int flush)); -local int get_byte OF((gz_stream *s)); -local void check_header OF((gz_stream *s)); -local int destroy OF((gz_stream *s)); -local void putLong OF((FILE *file, uLong x)); -local uLong getLong OF((gz_stream *s)); - -/* =========================================================================== - Opens a gzip (.gz) file for reading or writing. The mode parameter - is as in fopen ("rb" or "wb"). The file is given either by file descriptor - or path name (if fd == -1). - gz_open return NULL if the file could not be opened or if there was - insufficient memory to allocate the (de)compression state; errno - can be checked to distinguish the two cases (if errno is zero, the - zlib error is Z_MEM_ERROR). -*/ -local gzFile gz_open (path, mode, fd) - const char *path; - const char *mode; - int fd; -{ - int err; - int level = Z_DEFAULT_COMPRESSION; /* compression level */ - int strategy = Z_DEFAULT_STRATEGY; /* compression strategy */ - char *p = (char*)mode; - gz_stream *s; - char fmode[80]; /* copy of mode, without the compression level */ - char *m = fmode; - - if (!path || !mode) return Z_NULL; - - s = (gz_stream *)ALLOC(sizeof(gz_stream)); - if (!s) return Z_NULL; - - s->stream.zalloc = (alloc_func)0; - s->stream.zfree = (free_func)0; - s->stream.opaque = (voidpf)0; - s->stream.next_in = s->inbuf = Z_NULL; - s->stream.next_out = s->outbuf = Z_NULL; - s->stream.avail_in = s->stream.avail_out = 0; - s->file = NULL; - s->z_err = Z_OK; - s->z_eof = 0; - s->crc = crc32(0L, Z_NULL, 0); - s->msg = NULL; - s->transparent = 0; - - s->path = (char*)ALLOC(strlen(path)+1); - if (s->path == NULL) { - return destroy(s), (gzFile)Z_NULL; - } - strcpy(s->path, path); /* do this early for debugging */ - - s->mode = '\0'; - do { - if (*p == 'r') s->mode = 'r'; - if (*p == 'w' || *p == 'a') s->mode = 'w'; - if (*p >= '0' && *p <= '9') { - level = *p - '0'; - } else if (*p == 'f') { - strategy = Z_FILTERED; - } else if (*p == 'h') { - strategy = Z_HUFFMAN_ONLY; - } else { - *m++ = *p; /* copy the mode */ - } - } while (*p++ && m != fmode + sizeof(fmode)); - if (s->mode == '\0') return destroy(s), (gzFile)Z_NULL; - - if (s->mode == 'w') { -#ifdef NO_DEFLATE - err = Z_STREAM_ERROR; -#else - err = deflateInit2(&(s->stream), level, - Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, strategy); - /* windowBits is passed < 0 to suppress zlib header */ - - s->stream.next_out = s->outbuf = (Byte*)ALLOC(Z_BUFSIZE); -#endif - if (err != Z_OK || s->outbuf == Z_NULL) { - return destroy(s), (gzFile)Z_NULL; - } - } else { - s->stream.next_in = s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); - - err = inflateInit2(&(s->stream), -MAX_WBITS); - /* windowBits is passed < 0 to tell that there is no zlib header. - * Note that in this case inflate *requires* an extra "dummy" byte - * after the compressed stream in order to complete decompression and - * return Z_STREAM_END. Here the gzip CRC32 ensures that 4 bytes are - * present after the compressed stream. - */ - if (err != Z_OK || s->inbuf == Z_NULL) { - return destroy(s), (gzFile)Z_NULL; - } - } - s->stream.avail_out = Z_BUFSIZE; - - errno = 0; - s->file = fd < 0 ? F_OPEN(path, fmode) : (FILE*)fdopen(fd, fmode); - - if (s->file == NULL) { - return destroy(s), (gzFile)Z_NULL; - } - if (s->mode == 'w') { - /* Write a very simple .gz header: - */ - fprintf(s->file, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1], - Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, OS_CODE); - s->startpos = 10L; - /* We use 10L instead of ftell(s->file) to because ftell causes an - * fflush on some systems. This version of the library doesn't use - * startpos anyway in write mode, so this initialization is not - * necessary. - */ - } else { - check_header(s); /* skip the .gz header */ - s->startpos = (ftell(s->file) - s->stream.avail_in); - } - - return (gzFile)s; -} - -/* =========================================================================== - Opens a gzip (.gz) file for reading or writing. -*/ -gzFile ZEXPORT gzopen (path, mode) - const char *path; - const char *mode; -{ - return gz_open (path, mode, -1); -} - -/* =========================================================================== - Associate a gzFile with the file descriptor fd. fd is not dup'ed here - to mimic the behavio(u)r of fdopen. -*/ -gzFile ZEXPORT gzdopen (fd, mode) - int fd; - const char *mode; -{ - char name[20]; - - if (fd < 0) return (gzFile)Z_NULL; - sprintf(name, "", fd); /* for debugging */ - - return gz_open (name, mode, fd); -} - -/* =========================================================================== - * Update the compression level and strategy - */ -int ZEXPORT gzsetparams (file, level, strategy) - gzFile file; - int level; - int strategy; -{ - gz_stream *s = (gz_stream*)file; - - if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; - - /* Make room to allow flushing */ - if (s->stream.avail_out == 0) { - - s->stream.next_out = s->outbuf; - if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) { - s->z_err = Z_ERRNO; - } - s->stream.avail_out = Z_BUFSIZE; - } - - return deflateParams (&(s->stream), level, strategy); -} - -/* =========================================================================== - Read a byte from a gz_stream; update next_in and avail_in. Return EOF - for end of file. - IN assertion: the stream s has been sucessfully opened for reading. -*/ -local int get_byte(s) - gz_stream *s; -{ - if (s->z_eof) return EOF; - if (s->stream.avail_in == 0) { - errno = 0; - s->stream.avail_in = fread(s->inbuf, 1, Z_BUFSIZE, s->file); - if (s->stream.avail_in == 0) { - s->z_eof = 1; - if (ferror(s->file)) s->z_err = Z_ERRNO; - return EOF; - } - s->stream.next_in = s->inbuf; - } - s->stream.avail_in--; - return *(s->stream.next_in)++; -} - -/* =========================================================================== - Check the gzip header of a gz_stream opened for reading. Set the stream - mode to transparent if the gzip magic header is not present; set s->err - to Z_DATA_ERROR if the magic header is present but the rest of the header - is incorrect. - IN assertion: the stream s has already been created sucessfully; - s->stream.avail_in is zero for the first time, but may be non-zero - for concatenated .gz files. -*/ -local void check_header(s) - gz_stream *s; -{ - int method; /* method byte */ - int flags; /* flags byte */ - uInt len; - int c; - - /* Check the gzip magic header */ - for (len = 0; len < 2; len++) { - c = get_byte(s); - if (c != gz_magic[len]) { - if (len != 0) s->stream.avail_in++, s->stream.next_in--; - if (c != EOF) { - s->stream.avail_in++, s->stream.next_in--; - s->transparent = 1; - } - s->z_err = s->stream.avail_in != 0 ? Z_OK : Z_STREAM_END; - return; - } - } - method = get_byte(s); - flags = get_byte(s); - if (method != Z_DEFLATED || (flags & RESERVED) != 0) { - s->z_err = Z_DATA_ERROR; - return; - } - - /* Discard time, xflags and OS code: */ - for (len = 0; len < 6; len++) (void)get_byte(s); - - if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */ - len = (uInt)get_byte(s); - len += ((uInt)get_byte(s))<<8; - /* len is garbage if EOF but the loop below will quit anyway */ - while (len-- != 0 && get_byte(s) != EOF) ; - } - if ((flags & ORIG_NAME) != 0) { /* skip the original file name */ - while ((c = get_byte(s)) != 0 && c != EOF) ; - } - if ((flags & COMMENT) != 0) { /* skip the .gz file comment */ - while ((c = get_byte(s)) != 0 && c != EOF) ; - } - if ((flags & HEAD_CRC) != 0) { /* skip the header crc */ - for (len = 0; len < 2; len++) (void)get_byte(s); - } - s->z_err = s->z_eof ? Z_DATA_ERROR : Z_OK; -} - - /* =========================================================================== - * Cleanup then free the given gz_stream. Return a zlib error code. - Try freeing in the reverse order of allocations. - */ -local int destroy (s) - gz_stream *s; -{ - int err = Z_OK; - - if (!s) return Z_STREAM_ERROR; - - TRYFREE(s->msg); - - if (s->stream.state != NULL) { - if (s->mode == 'w') { -#ifdef NO_DEFLATE - err = Z_STREAM_ERROR; -#else - err = deflateEnd(&(s->stream)); -#endif - } else if (s->mode == 'r') { - err = inflateEnd(&(s->stream)); - } - } - if (s->file != NULL && fclose(s->file)) { -#ifdef ESPIPE - if (errno != ESPIPE) /* fclose is broken for pipes in HP/UX */ -#endif - err = Z_ERRNO; - } - if (s->z_err < 0) err = s->z_err; - - TRYFREE(s->inbuf); - TRYFREE(s->outbuf); - TRYFREE(s->path); - TRYFREE(s); - return err; -} - -/* =========================================================================== - Reads the given number of uncompressed bytes from the compressed file. - gzread returns the number of bytes actually read (0 for end of file). -*/ -int ZEXPORT gzread (file, buf, len) - gzFile file; - voidp buf; - unsigned len; -{ - gz_stream *s = (gz_stream*)file; - Bytef *start = (Bytef*)buf; /* starting point for crc computation */ - Byte *next_out; /* == stream.next_out but not forced far (for MSDOS) */ - - if (s == NULL || s->mode != 'r') return Z_STREAM_ERROR; - - if (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO) return -1; - if (s->z_err == Z_STREAM_END) return 0; /* EOF */ - - next_out = (Byte*)buf; - s->stream.next_out = (Bytef*)buf; - s->stream.avail_out = len; - - while (s->stream.avail_out != 0) { - - if (s->transparent) { - /* Copy first the lookahead bytes: */ - uInt n = s->stream.avail_in; - if (n > s->stream.avail_out) n = s->stream.avail_out; - if (n > 0) { - zmemcpy(s->stream.next_out, s->stream.next_in, n); - next_out += n; - s->stream.next_out = next_out; - s->stream.next_in += n; - s->stream.avail_out -= n; - s->stream.avail_in -= n; - } - if (s->stream.avail_out > 0) { - s->stream.avail_out -= fread(next_out, 1, s->stream.avail_out, - s->file); - } - len -= s->stream.avail_out; - s->stream.total_in += (uLong)len; - s->stream.total_out += (uLong)len; - if (len == 0) s->z_eof = 1; - return (int)len; - } - if (s->stream.avail_in == 0 && !s->z_eof) { - - errno = 0; - s->stream.avail_in = fread(s->inbuf, 1, Z_BUFSIZE, s->file); - if (s->stream.avail_in == 0) { - s->z_eof = 1; - if (ferror(s->file)) { - s->z_err = Z_ERRNO; - break; - } - } - s->stream.next_in = s->inbuf; - } - s->z_err = inflate(&(s->stream), Z_NO_FLUSH); - - if (s->z_err == Z_STREAM_END) { - /* Check CRC and original size */ - s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start)); - start = s->stream.next_out; - - if (getLong(s) != s->crc || getLong(s) != s->stream.total_out) { - s->z_err = Z_DATA_ERROR; - } else { - /* Check for concatenated .gz files: */ - check_header(s); - if (s->z_err == Z_OK) { - uLong total_in = s->stream.total_in; - uLong total_out = s->stream.total_out; - - inflateReset(&(s->stream)); - s->stream.total_in = total_in; - s->stream.total_out = total_out; - s->crc = crc32(0L, Z_NULL, 0); - } - } - } - if (s->z_err != Z_OK || s->z_eof) break; - } - s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start)); - - return (int)(len - s->stream.avail_out); -} - - -/* =========================================================================== - Reads one byte from the compressed file. gzgetc returns this byte - or -1 in case of end of file or error. -*/ -int ZEXPORT gzgetc(file) - gzFile file; -{ - unsigned char c; - - return gzread(file, &c, 1) == 1 ? c : -1; -} - - -/* =========================================================================== - Reads bytes from the compressed file until len-1 characters are - read, or a newline character is read and transferred to buf, or an - end-of-file condition is encountered. The string is then terminated - with a null character. - gzgets returns buf, or Z_NULL in case of error. - - The current implementation is not optimized at all. -*/ -char * ZEXPORT gzgets(file, buf, len) - gzFile file; - char *buf; - int len; -{ - char *b = buf; - if (buf == Z_NULL || len <= 0) return Z_NULL; - - while (--len > 0 && gzread(file, buf, 1) == 1 && *buf++ != '\n') ; - *buf = '\0'; - return b == buf && len > 0 ? Z_NULL : b; -} - - -#ifndef NO_DEFLATE -/* =========================================================================== - Writes the given number of uncompressed bytes into the compressed file. - gzwrite returns the number of bytes actually written (0 in case of error). -*/ -int ZEXPORT gzwrite (file, buf, len) - gzFile file; - const voidp buf; - unsigned len; -{ - gz_stream *s = (gz_stream*)file; - - if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; - - s->stream.next_in = (Bytef*)buf; - s->stream.avail_in = len; - - while (s->stream.avail_in != 0) { - - if (s->stream.avail_out == 0) { - - s->stream.next_out = s->outbuf; - if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) { - s->z_err = Z_ERRNO; - break; - } - s->stream.avail_out = Z_BUFSIZE; - } - s->z_err = deflate(&(s->stream), Z_NO_FLUSH); - if (s->z_err != Z_OK) break; - } - s->crc = crc32(s->crc, (const Bytef *)buf, len); - - return (int)(len - s->stream.avail_in); -} - -/* =========================================================================== - Converts, formats, and writes the args to the compressed file under - control of the format string, as in fprintf. gzprintf returns the number of - uncompressed bytes actually written (0 in case of error). -*/ -#ifdef STDC -#include - -int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...) -{ - char buf[Z_PRINTF_BUFSIZE]; - va_list va; - int len; - - va_start(va, format); -#ifdef HAS_vsnprintf - (void)vsnprintf(buf, sizeof(buf), format, va); -#else - (void)vsprintf(buf, format, va); -#endif - va_end(va); - len = strlen(buf); /* some *sprintf don't return the nb of bytes written */ - if (len <= 0) return 0; - - return gzwrite(file, buf, (unsigned)len); -} -#else /* not ANSI C */ - -int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, - a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) - gzFile file; - const char *format; - int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, - a11, a12, a13, a14, a15, a16, a17, a18, a19, a20; -{ - char buf[Z_PRINTF_BUFSIZE]; - int len; - -#ifdef HAS_snprintf - snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); -#else - sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); -#endif - len = strlen(buf); /* old sprintf doesn't return the nb of bytes written */ - if (len <= 0) return 0; - - return gzwrite(file, buf, len); -} -#endif - -/* =========================================================================== - Writes c, converted to an unsigned char, into the compressed file. - gzputc returns the value that was written, or -1 in case of error. -*/ -int ZEXPORT gzputc(file, c) - gzFile file; - int c; -{ - unsigned char cc = (unsigned char) c; /* required for big endian systems */ - - return gzwrite(file, &cc, 1) == 1 ? (int)cc : -1; -} - - -/* =========================================================================== - Writes the given null-terminated string to the compressed file, excluding - the terminating null character. - gzputs returns the number of characters written, or -1 in case of error. -*/ -int ZEXPORT gzputs(file, s) - gzFile file; - const char *s; -{ - return gzwrite(file, (char*)s, (unsigned)strlen(s)); -} - - -/* =========================================================================== - Flushes all pending output into the compressed file. The parameter - flush is as in the deflate() function. -*/ -local int do_flush (file, flush) - gzFile file; - int flush; -{ - uInt len; - int done = 0; - gz_stream *s = (gz_stream*)file; - - if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; - - s->stream.avail_in = 0; /* should be zero already anyway */ - - for (;;) { - len = Z_BUFSIZE - s->stream.avail_out; - - if (len != 0) { - if ((uInt)fwrite(s->outbuf, 1, len, s->file) != len) { - s->z_err = Z_ERRNO; - return Z_ERRNO; - } - s->stream.next_out = s->outbuf; - s->stream.avail_out = Z_BUFSIZE; - } - if (done) break; - s->z_err = deflate(&(s->stream), flush); - - /* Ignore the second of two consecutive flushes: */ - if (len == 0 && s->z_err == Z_BUF_ERROR) s->z_err = Z_OK; - - /* deflate has finished flushing only when it hasn't used up - * all the available space in the output buffer: - */ - done = (s->stream.avail_out != 0 || s->z_err == Z_STREAM_END); - - if (s->z_err != Z_OK && s->z_err != Z_STREAM_END) break; - } - return s->z_err == Z_STREAM_END ? Z_OK : s->z_err; -} - -int ZEXPORT gzflush (file, flush) - gzFile file; - int flush; -{ - gz_stream *s = (gz_stream*)file; - int err = do_flush (file, flush); - - if (err) return err; - fflush(s->file); - return s->z_err == Z_STREAM_END ? Z_OK : s->z_err; -} -#endif /* NO_DEFLATE */ - -/* =========================================================================== - Sets the starting position for the next gzread or gzwrite on the given - compressed file. The offset represents a number of bytes in the - gzseek returns the resulting offset location as measured in bytes from - the beginning of the uncompressed stream, or -1 in case of error. - SEEK_END is not implemented, returns error. - In this version of the library, gzseek can be extremely slow. -*/ -z_off_t ZEXPORT gzseek (file, offset, whence) - gzFile file; - z_off_t offset; - int whence; -{ - gz_stream *s = (gz_stream*)file; - - if (s == NULL || whence == SEEK_END || - s->z_err == Z_ERRNO || s->z_err == Z_DATA_ERROR) { - return -1L; - } - - if (s->mode == 'w') { -#ifdef NO_DEFLATE - return -1L; -#else - if (whence == SEEK_SET) { - offset -= s->stream.total_out; - } - if (offset < 0) return -1L; - - /* At this point, offset is the number of zero bytes to write. */ - if (s->inbuf == Z_NULL) { - s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); /* for seeking */ - zmemzero(s->inbuf, Z_BUFSIZE); - } - while (offset > 0) { - uInt size = Z_BUFSIZE; - if (offset < Z_BUFSIZE) size = (uInt)offset; - - size = gzwrite(file, s->inbuf, size); - if (size == 0) return -1L; - - offset -= size; - } - return (z_off_t)s->stream.total_in; -#endif - } - /* Rest of function is for reading only */ - - /* compute absolute position */ - if (whence == SEEK_CUR) { - offset += s->stream.total_out; - } - if (offset < 0) return -1L; - - if (s->transparent) { - /* map to fseek */ - s->stream.avail_in = 0; - s->stream.next_in = s->inbuf; - if (fseek(s->file, offset, SEEK_SET) < 0) return -1L; - - s->stream.total_in = s->stream.total_out = (uLong)offset; - return offset; - } - - /* For a negative seek, rewind and use positive seek */ - if ((uLong)offset >= s->stream.total_out) { - offset -= s->stream.total_out; - } else if (gzrewind(file) < 0) { - return -1L; - } - /* offset is now the number of bytes to skip. */ - - if (offset != 0 && s->outbuf == Z_NULL) { - s->outbuf = (Byte*)ALLOC(Z_BUFSIZE); - } - while (offset > 0) { - int size = Z_BUFSIZE; - if (offset < Z_BUFSIZE) size = (int)offset; - - size = gzread(file, s->outbuf, (uInt)size); - if (size <= 0) return -1L; - offset -= size; - } - return (z_off_t)s->stream.total_out; -} - -/* =========================================================================== - Rewinds input file. -*/ -int ZEXPORT gzrewind (file) - gzFile file; -{ - gz_stream *s = (gz_stream*)file; - - if (s == NULL || s->mode != 'r') return -1; - - s->z_err = Z_OK; - s->z_eof = 0; - s->stream.avail_in = 0; - s->stream.next_in = s->inbuf; - - if (s->startpos == 0) { /* not a compressed file */ - rewind(s->file); - return 0; - } - - (void) inflateReset(&s->stream); - return fseek(s->file, s->startpos, SEEK_SET); -} - -/* =========================================================================== - Returns the starting position for the next gzread or gzwrite on the - given compressed file. This position represents a number of bytes in the - uncompressed data stream. -*/ -z_off_t ZEXPORT gztell (file) - gzFile file; -{ - return gzseek(file, 0L, SEEK_CUR); -} - -/* =========================================================================== - Returns 1 when EOF has previously been detected reading the given - input stream, otherwise zero. -*/ -int ZEXPORT gzeof (file) - gzFile file; -{ - gz_stream *s = (gz_stream*)file; - - return (s == NULL || s->mode != 'r') ? 0 : s->z_eof; -} - -/* =========================================================================== - Outputs a long in LSB order to the given file -*/ -local void putLong (file, x) - FILE *file; - uLong x; -{ - int n; - for (n = 0; n < 4; n++) { - fputc((int)(x & 0xff), file); - x >>= 8; - } -} - -/* =========================================================================== - Reads a long in LSB order from the given gz_stream. Sets -*/ -local uLong getLong (s) - gz_stream *s; -{ - uLong x = (uLong)get_byte(s); - int c; - - x += ((uLong)get_byte(s))<<8; - x += ((uLong)get_byte(s))<<16; - c = get_byte(s); - if (c == EOF) s->z_err = Z_DATA_ERROR; - x += ((uLong)c)<<24; - return x; -} - -/* =========================================================================== - Flushes all pending output if necessary, closes the compressed file - and deallocates all the (de)compression state. -*/ -int ZEXPORT gzclose (file) - gzFile file; -{ - int err; - gz_stream *s = (gz_stream*)file; - - if (s == NULL) return Z_STREAM_ERROR; - - if (s->mode == 'w') { -#ifdef NO_DEFLATE - return Z_STREAM_ERROR; -#else - err = do_flush (file, Z_FINISH); - if (err != Z_OK) return destroy((gz_stream*)file); - - putLong (s->file, s->crc); - putLong (s->file, s->stream.total_in); -#endif - } - return destroy((gz_stream*)file); -} - -/* =========================================================================== - Returns the error message for the last error which occured on the - given compressed file. errnum is set to zlib error number. If an - error occured in the file system and not in the compression library, - errnum is set to Z_ERRNO and the application may consult errno - to get the exact error code. -*/ -const char* ZEXPORT gzerror (file, errnum) - gzFile file; - int *errnum; -{ - char *m; - gz_stream *s = (gz_stream*)file; - - if (s == NULL) { - *errnum = Z_STREAM_ERROR; - return (const char*)ERR_MSG(Z_STREAM_ERROR); - } - *errnum = s->z_err; - if (*errnum == Z_OK) return (const char*)""; - - m = (char*)(*errnum == Z_ERRNO ? zstrerror(errno) : s->stream.msg); - - if (m == NULL || *m == '\0') m = (char*)ERR_MSG(s->z_err); - - TRYFREE(s->msg); - s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3); - strcpy(s->msg, s->path); - strcat(s->msg, ": "); - strcat(s->msg, m); - return (const char*)s->msg; -} diff --git a/src/zlib/infblock.c b/src/zlib/infblock.c deleted file mode 100644 index f8940c7fab..0000000000 --- a/src/zlib/infblock.c +++ /dev/null @@ -1,405 +0,0 @@ -/* infblock.c -- interpret and process block types to last block - * Copyright (C) 1995-1998 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "zutil.h" -#include "infblock.h" -#include "inftrees.h" -#include "infcodes.h" -#include "infutil.h" - -struct inflate_codes_state {int dummy;}; /* for buggy compilers */ - -/* simplify the use of the inflate_huft type with some defines */ -#define exop word.what.Exop -#define bits word.what.Bits - -/* Table for deflate from PKZIP's appnote.txt. */ -local const uInt border[] = { /* Order of the bit length code lengths */ - 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; - -/* - Notes beyond the 1.93a appnote.txt: - - 1. Distance pointers never point before the beginning of the output - stream. - 2. Distance pointers can point back across blocks, up to 32k away. - 3. There is an implied maximum of 7 bits for the bit length table and - 15 bits for the actual data. - 4. If only one code exists, then it is encoded using one bit. (Zero - would be more efficient, but perhaps a little confusing.) If two - codes exist, they are coded using one bit each (0 and 1). - 5. There is no way of sending zero distance codes--a dummy must be - sent if there are none. (History: a pre 2.0 version of PKZIP would - store blocks with no distance codes, but this was discovered to be - too harsh a criterion.) Valid only for 1.93a. 2.04c does allow - zero distance codes, which is sent as one code of zero bits in - length. - 6. There are up to 286 literal/length codes. Code 256 represents the - end-of-block. Note however that the static length tree defines - 288 codes just to fill out the Huffman codes. Codes 286 and 287 - cannot be used though, since there is no length base or extra bits - defined for them. Similarily, there are up to 30 distance codes. - However, static trees define 32 codes (all 5 bits) to fill out the - Huffman codes, but the last two had better not show up in the data. - 7. Unzip can check dynamic Huffman blocks for complete code sets. - The exception is that a single code would not be complete (see #4). - 8. The five bits following the block type is really the number of - literal codes sent minus 257. - 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits - (1+6+6). Therefore, to output three times the length, you output - three codes (1+1+1), whereas to output four times the same length, - you only need two codes (1+3). Hmm. - 10. In the tree reconstruction algorithm, Code = Code + Increment - only if BitLength(i) is not zero. (Pretty obvious.) - 11. Correction: 4 Bits: # of Bit Length codes - 4 (4 - 19) - 12. Note: length code 284 can represent 227-258, but length code 285 - really is 258. The last length deserves its own, short code - since it gets used a lot in very redundant files. The length - 258 is special since 258 - 3 (the min match length) is 255. - 13. The literal/length and distance code bit lengths are read as a - single stream of lengths. It is possible (and advantageous) for - a repeat code (16, 17, or 18) to go across the boundary between - the two sets of lengths. - */ - - -void inflate_blocks_reset(s, z, c) -inflate_blocks_statef *s; -z_streamp z; -uLongf *c; -{ - if (c != Z_NULL) - *c = s->check; - if (s->mode == BTREE || s->mode == DTREE) - ZFREE(z, s->sub.trees.blens); - if (s->mode == CODES) - inflate_codes_free(s->sub.decode.codes, z); - s->mode = TYPE; - s->bitk = 0; - s->bitb = 0; - s->read = s->write = s->window; - if (s->checkfn != Z_NULL) - z->adler = s->check = (*s->checkfn)(0L, (const Bytef *)Z_NULL, 0); - Tracev((stderr, "inflate: blocks reset\n")); -} - - -inflate_blocks_statef *inflate_blocks_new(z, c, w) -z_streamp z; -check_func c; -uInt w; -{ - inflate_blocks_statef *s; - - if ((s = (inflate_blocks_statef *)ZALLOC - (z,1,sizeof(struct inflate_blocks_state))) == Z_NULL) - return s; - if ((s->hufts = - (inflate_huft *)ZALLOC(z, sizeof(inflate_huft), MANY)) == Z_NULL) - { - ZFREE(z, s); - return Z_NULL; - } - if ((s->window = (Bytef *)ZALLOC(z, 1, w)) == Z_NULL) - { - ZFREE(z, s->hufts); - ZFREE(z, s); - return Z_NULL; - } - s->end = s->window + w; - s->checkfn = c; - s->mode = TYPE; - Tracev((stderr, "inflate: blocks allocated\n")); - inflate_blocks_reset(s, z, Z_NULL); - return s; -} - - -int inflate_blocks(s, z, r) -inflate_blocks_statef *s; -z_streamp z; -int r; -{ - uInt t; /* temporary storage */ - uLong b; /* bit buffer */ - uInt k; /* bits in bit buffer */ - Bytef *p; /* input data pointer */ - uInt n; /* bytes available there */ - Bytef *q; /* output window write pointer */ - uInt m; /* bytes to end of window or read pointer */ - - /* copy input/output information to locals (UPDATE macro restores) */ - LOAD - - /* process input based on current state */ - while (1) switch (s->mode) - { - case TYPE: - NEEDBITS(3) - t = (uInt)b & 7; - s->last = t & 1; - switch (t >> 1) - { - case 0: /* stored */ - Tracev((stderr, "inflate: stored block%s\n", - s->last ? " (last)" : "")); - DUMPBITS(3) - t = k & 7; /* go to byte boundary */ - DUMPBITS(t) - s->mode = LENS; /* get length of stored block */ - break; - case 1: /* fixed */ - Tracev((stderr, "inflate: fixed codes block%s\n", - s->last ? " (last)" : "")); - { - uInt bl, bd; - inflate_huft *tl, *td; - - inflate_trees_fixed(&bl, &bd, &tl, &td, z); - s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z); - if (s->sub.decode.codes == Z_NULL) - { - r = Z_MEM_ERROR; - LEAVE - } - } - DUMPBITS(3) - s->mode = CODES; - break; - case 2: /* dynamic */ - Tracev((stderr, "inflate: dynamic codes block%s\n", - s->last ? " (last)" : "")); - DUMPBITS(3) - s->mode = TABLE; - break; - case 3: /* illegal */ - DUMPBITS(3) - s->mode = BAD; - z->msg = (char*)"invalid block type"; - r = Z_DATA_ERROR; - LEAVE - } - break; - case LENS: - NEEDBITS(32) - if ((((~b) >> 16) & 0xffff) != (b & 0xffff)) - { - s->mode = BAD; - z->msg = (char*)"invalid stored block lengths"; - r = Z_DATA_ERROR; - LEAVE - } - s->sub.left = (uInt)b & 0xffff; - b = k = 0; /* dump bits */ - Tracev((stderr, "inflate: stored length %u\n", s->sub.left)); - s->mode = s->sub.left ? STORED : (s->last ? DRY : TYPE); - break; - case STORED: - if (n == 0) - LEAVE - NEEDOUT - t = s->sub.left; - if (t > n) t = n; - if (t > m) t = m; - zmemcpy(q, p, t); - p += t; n -= t; - q += t; m -= t; - if ((s->sub.left -= t) != 0) - break; - Tracev((stderr, "inflate: stored end, %lu total out\n", - z->total_out + (q >= s->read ? q - s->read : - (s->end - s->read) + (q - s->window)))); - s->mode = s->last ? DRY : TYPE; - break; - case TABLE: - NEEDBITS(14) - s->sub.trees.table = t = (uInt)b & 0x3fff; -#ifndef PKZIP_BUG_WORKAROUND - if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) - { - s->mode = BAD; - z->msg = (char*)"too many length or distance symbols"; - r = Z_DATA_ERROR; - LEAVE - } -#endif - t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f); - if ((s->sub.trees.blens = (uIntf*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL) - { - r = Z_MEM_ERROR; - LEAVE - } - DUMPBITS(14) - s->sub.trees.index = 0; - Tracev((stderr, "inflate: table sizes ok\n")); - s->mode = BTREE; - case BTREE: - while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10)) - { - NEEDBITS(3) - s->sub.trees.blens[border[s->sub.trees.index++]] = (uInt)b & 7; - DUMPBITS(3) - } - while (s->sub.trees.index < 19) - s->sub.trees.blens[border[s->sub.trees.index++]] = 0; - s->sub.trees.bb = 7; - t = inflate_trees_bits(s->sub.trees.blens, &s->sub.trees.bb, - &s->sub.trees.tb, s->hufts, z); - if (t != Z_OK) - { - ZFREE(z, s->sub.trees.blens); - r = t; - if (r == Z_DATA_ERROR) - s->mode = BAD; - LEAVE - } - s->sub.trees.index = 0; - Tracev((stderr, "inflate: bits tree ok\n")); - s->mode = DTREE; - case DTREE: - while (t = s->sub.trees.table, - s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) - { - inflate_huft *h; - uInt i, j, c; - - t = s->sub.trees.bb; - NEEDBITS(t) - h = s->sub.trees.tb + ((uInt)b & inflate_mask[t]); - t = h->bits; - c = h->base; - if (c < 16) - { - DUMPBITS(t) - s->sub.trees.blens[s->sub.trees.index++] = c; - } - else /* c == 16..18 */ - { - i = c == 18 ? 7 : c - 14; - j = c == 18 ? 11 : 3; - NEEDBITS(t + i) - DUMPBITS(t) - j += (uInt)b & inflate_mask[i]; - DUMPBITS(i) - i = s->sub.trees.index; - t = s->sub.trees.table; - if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || - (c == 16 && i < 1)) - { - ZFREE(z, s->sub.trees.blens); - s->mode = BAD; - z->msg = (char*)"invalid bit length repeat"; - r = Z_DATA_ERROR; - LEAVE - } - c = c == 16 ? s->sub.trees.blens[i - 1] : 0; - do { - s->sub.trees.blens[i++] = c; - } while (--j); - s->sub.trees.index = i; - } - } - s->sub.trees.tb = Z_NULL; - { - uInt bl, bd; - inflate_huft *tl, *td; - inflate_codes_statef *c; - - bl = 9; /* must be <= 9 for lookahead assumptions */ - bd = 6; /* must be <= 9 for lookahead assumptions */ - t = s->sub.trees.table; - t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), - s->sub.trees.blens, &bl, &bd, &tl, &td, - s->hufts, z); - ZFREE(z, s->sub.trees.blens); - if (t != Z_OK) - { - if (t == (uInt)Z_DATA_ERROR) - s->mode = BAD; - r = t; - LEAVE - } - Tracev((stderr, "inflate: trees ok\n")); - if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL) - { - r = Z_MEM_ERROR; - LEAVE - } - s->sub.decode.codes = c; - } - s->mode = CODES; - case CODES: - UPDATE - if ((r = inflate_codes(s, z, r)) != Z_STREAM_END) - return inflate_flush(s, z, r); - r = Z_OK; - inflate_codes_free(s->sub.decode.codes, z); - LOAD - Tracev((stderr, "inflate: codes end, %lu total out\n", - z->total_out + (q >= s->read ? q - s->read : - (s->end - s->read) + (q - s->window)))); - if (!s->last) - { - s->mode = TYPE; - break; - } - if (k > 7) /* return unused byte, if any */ - { - Assert(k < 16, "inflate_codes grabbed too many bytes") - k -= 8; - n++; - p--; /* can always return one */ - } - s->mode = DRY; - case DRY: - FLUSH - if (s->read != s->write) - LEAVE - s->mode = DONE; - case DONE: - r = Z_STREAM_END; - LEAVE - case BAD: - r = Z_DATA_ERROR; - LEAVE - default: - r = Z_STREAM_ERROR; - LEAVE - } -} - - -int inflate_blocks_free(s, z) -inflate_blocks_statef *s; -z_streamp z; -{ - inflate_blocks_reset(s, z, Z_NULL); - ZFREE(z, s->window); - ZFREE(z, s->hufts); - ZFREE(z, s); - Tracev((stderr, "inflate: blocks freed\n")); - return Z_OK; -} - - -void inflate_set_dictionary(s, d, n) -inflate_blocks_statef *s; -const Bytef *d; -uInt n; -{ - zmemcpy(s->window, d, n); - s->read = s->write = s->window + n; -} - - -/* Returns true if inflate is currently at the end of a block generated - * by Z_SYNC_FLUSH or Z_FULL_FLUSH. - * IN assertion: s != Z_NULL - */ -int inflate_blocks_sync_point(s) -inflate_blocks_statef *s; -{ - return s->mode == LENS; -} diff --git a/src/zlib/infblock.h b/src/zlib/infblock.h deleted file mode 100644 index bd25c80753..0000000000 --- a/src/zlib/infblock.h +++ /dev/null @@ -1,39 +0,0 @@ -/* infblock.h -- header to use infblock.c - * Copyright (C) 1995-1998 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -struct inflate_blocks_state; -typedef struct inflate_blocks_state FAR inflate_blocks_statef; - -extern inflate_blocks_statef * inflate_blocks_new OF(( - z_streamp z, - check_func c, /* check function */ - uInt w)); /* window size */ - -extern int inflate_blocks OF(( - inflate_blocks_statef *, - z_streamp , - int)); /* initial return code */ - -extern void inflate_blocks_reset OF(( - inflate_blocks_statef *, - z_streamp , - uLongf *)); /* check value on output */ - -extern int inflate_blocks_free OF(( - inflate_blocks_statef *, - z_streamp)); - -extern void inflate_set_dictionary OF(( - inflate_blocks_statef *s, - const Bytef *d, /* dictionary */ - uInt n)); /* dictionary length */ - -extern int inflate_blocks_sync_point OF(( - inflate_blocks_statef *s)); diff --git a/src/zlib/infcodes.c b/src/zlib/infcodes.c deleted file mode 100644 index 1d3baa92eb..0000000000 --- a/src/zlib/infcodes.c +++ /dev/null @@ -1,250 +0,0 @@ -/* infcodes.c -- process literals and length/distance pairs - * Copyright (C) 1995-1998 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "zutil.h" -#include "inftrees.h" -#include "infblock.h" -#include "infcodes.h" -#include "infutil.h" -#include "inffast.h" - -/* simplify the use of the inflate_huft type with some defines */ -#define exop word.what.Exop -#define bits word.what.Bits - -typedef enum { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */ - START, /* x: set up for LEN */ - LEN, /* i: get length/literal/eob next */ - LENEXT, /* i: getting length extra (have base) */ - DIST, /* i: get distance next */ - DISTEXT, /* i: getting distance extra */ - COPY, /* o: copying bytes in window, waiting for space */ - LIT, /* o: got literal, waiting for output space */ - WASH, /* o: got eob, possibly still output waiting */ - END, /* x: got eob and all data flushed */ - BADCODE} /* x: got error */ -inflate_codes_mode; - -/* inflate codes private state */ -struct inflate_codes_state { - - /* mode */ - inflate_codes_mode mode; /* current inflate_codes mode */ - - /* mode dependent information */ - uInt len; - union { - struct { - inflate_huft *tree; /* pointer into tree */ - uInt need; /* bits needed */ - } code; /* if LEN or DIST, where in tree */ - uInt lit; /* if LIT, literal */ - struct { - uInt get; /* bits to get for extra */ - uInt dist; /* distance back to copy from */ - } copy; /* if EXT or COPY, where and how much */ - } sub; /* submode */ - - /* mode independent information */ - Byte lbits; /* ltree bits decoded per branch */ - Byte dbits; /* dtree bits decoder per branch */ - inflate_huft *ltree; /* literal/length/eob tree */ - inflate_huft *dtree; /* distance tree */ - -}; - - -inflate_codes_statef *inflate_codes_new(bl, bd, tl, td, z) -uInt bl, bd; -inflate_huft *tl; -inflate_huft *td; /* need separate declaration for Borland C++ */ -z_streamp z; -{ - inflate_codes_statef *c; - - if ((c = (inflate_codes_statef *) - ZALLOC(z,1,sizeof(struct inflate_codes_state))) != Z_NULL) - { - c->mode = START; - c->lbits = (Byte)bl; - c->dbits = (Byte)bd; - c->ltree = tl; - c->dtree = td; - Tracev((stderr, "inflate: codes new\n")); - } - return c; -} - - -int inflate_codes(s, z, r) -inflate_blocks_statef *s; -z_streamp z; -int r; -{ - uInt j; /* temporary storage */ - inflate_huft *t; /* temporary pointer */ - uInt e; /* extra bits or operation */ - uLong b; /* bit buffer */ - uInt k; /* bits in bit buffer */ - Bytef *p; /* input data pointer */ - uInt n; /* bytes available there */ - Bytef *q; /* output window write pointer */ - uInt m; /* bytes to end of window or read pointer */ - Bytef *f; /* pointer to copy strings from */ - inflate_codes_statef *c = s->sub.decode.codes; /* codes state */ - - /* copy input/output information to locals (UPDATE macro restores) */ - LOAD - - /* process input and output based on current state */ - while (1) switch (c->mode) - { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */ - case START: /* x: set up for LEN */ -#ifndef SLOW - if (m >= 258 && n >= 10) - { - UPDATE - r = inflate_fast(c->lbits, c->dbits, c->ltree, c->dtree, s, z); - LOAD - if (r != Z_OK) - { - c->mode = r == Z_STREAM_END ? WASH : BADCODE; - break; - } - } -#endif /* !SLOW */ - c->sub.code.need = c->lbits; - c->sub.code.tree = c->ltree; - c->mode = LEN; - case LEN: /* i: get length/literal/eob next */ - j = c->sub.code.need; - NEEDBITS(j) - t = c->sub.code.tree + ((uInt)b & inflate_mask[j]); - DUMPBITS(t->bits) - e = (uInt)(t->exop); - if (e == 0) /* literal */ - { - c->sub.lit = t->base; - Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ? - "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", t->base)); - c->mode = LIT; - break; - } - if (e & 16) /* length */ - { - c->sub.copy.get = e & 15; - c->len = t->base; - c->mode = LENEXT; - break; - } - if ((e & 64) == 0) /* next table */ - { - c->sub.code.need = e; - c->sub.code.tree = t + t->base; - break; - } - if (e & 32) /* end of block */ - { - Tracevv((stderr, "inflate: end of block\n")); - c->mode = WASH; - break; - } - c->mode = BADCODE; /* invalid code */ - z->msg = (char*)"invalid literal/length code"; - r = Z_DATA_ERROR; - LEAVE - case LENEXT: /* i: getting length extra (have base) */ - j = c->sub.copy.get; - NEEDBITS(j) - c->len += (uInt)b & inflate_mask[j]; - DUMPBITS(j) - c->sub.code.need = c->dbits; - c->sub.code.tree = c->dtree; - Tracevv((stderr, "inflate: length %u\n", c->len)); - c->mode = DIST; - case DIST: /* i: get distance next */ - j = c->sub.code.need; - NEEDBITS(j) - t = c->sub.code.tree + ((uInt)b & inflate_mask[j]); - DUMPBITS(t->bits) - e = (uInt)(t->exop); - if (e & 16) /* distance */ - { - c->sub.copy.get = e & 15; - c->sub.copy.dist = t->base; - c->mode = DISTEXT; - break; - } - if ((e & 64) == 0) /* next table */ - { - c->sub.code.need = e; - c->sub.code.tree = t + t->base; - break; - } - c->mode = BADCODE; /* invalid code */ - z->msg = (char*)"invalid distance code"; - r = Z_DATA_ERROR; - LEAVE - case DISTEXT: /* i: getting distance extra */ - j = c->sub.copy.get; - NEEDBITS(j) - c->sub.copy.dist += (uInt)b & inflate_mask[j]; - DUMPBITS(j) - Tracevv((stderr, "inflate: distance %u\n", c->sub.copy.dist)); - c->mode = COPY; - case COPY: /* o: copying bytes in window, waiting for space */ -#ifndef __TURBOC__ /* Turbo C bug for following expression */ - f = (uInt)(q - s->window) < c->sub.copy.dist ? - s->end - (c->sub.copy.dist - (q - s->window)) : - q - c->sub.copy.dist; -#else - f = q - c->sub.copy.dist; - if ((uInt)(q - s->window) < c->sub.copy.dist) - f = s->end - (c->sub.copy.dist - (uInt)(q - s->window)); -#endif - while (c->len) - { - NEEDOUT - OUTBYTE(*f++) - if (f == s->end) - f = s->window; - c->len--; - } - c->mode = START; - break; - case LIT: /* o: got literal, waiting for output space */ - NEEDOUT - OUTBYTE(c->sub.lit) - c->mode = START; - break; - case WASH: /* o: got eob, possibly more output */ - FLUSH - if (s->read != s->write) - LEAVE - c->mode = END; - case END: - r = Z_STREAM_END; - LEAVE - case BADCODE: /* x: got error */ - r = Z_DATA_ERROR; - LEAVE - default: - r = Z_STREAM_ERROR; - LEAVE - } -#ifdef NEED_DUMMY_RETURN - return Z_STREAM_ERROR; /* Some dumb compilers complain without this */ -#endif -} - - -void inflate_codes_free(c, z) -inflate_codes_statef *c; -z_streamp z; -{ - ZFREE(z, c); - Tracev((stderr, "inflate: codes free\n")); -} diff --git a/src/zlib/infcodes.h b/src/zlib/infcodes.h deleted file mode 100644 index 6c750d896f..0000000000 --- a/src/zlib/infcodes.h +++ /dev/null @@ -1,27 +0,0 @@ -/* infcodes.h -- header to use infcodes.c - * Copyright (C) 1995-1998 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -struct inflate_codes_state; -typedef struct inflate_codes_state FAR inflate_codes_statef; - -extern inflate_codes_statef *inflate_codes_new OF(( - uInt, uInt, - inflate_huft *, inflate_huft *, - z_streamp )); - -extern int inflate_codes OF(( - inflate_blocks_statef *, - z_streamp , - int)); - -extern void inflate_codes_free OF(( - inflate_codes_statef *, - z_streamp )); - diff --git a/src/zlib/inffast.c b/src/zlib/inffast.c deleted file mode 100644 index 61a78ee933..0000000000 --- a/src/zlib/inffast.c +++ /dev/null @@ -1,170 +0,0 @@ -/* inffast.c -- process literals and length/distance pairs fast - * Copyright (C) 1995-1998 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "zutil.h" -#include "inftrees.h" -#include "infblock.h" -#include "infcodes.h" -#include "infutil.h" -#include "inffast.h" - -struct inflate_codes_state {int dummy;}; /* for buggy compilers */ - -/* simplify the use of the inflate_huft type with some defines */ -#define exop word.what.Exop -#define bits word.what.Bits - -/* macros for bit input with no checking and for returning unused bytes */ -#define GRABBITS(j) {while(k<(j)){b|=((uLong)NEXTBYTE)<avail_in-n;c=(k>>3)>3:c;n+=c;p-=c;k-=c<<3;} - -/* Called with number of bytes left to write in window at least 258 - (the maximum string length) and number of input bytes available - at least ten. The ten bytes are six bytes for the longest length/ - distance pair plus four bytes for overloading the bit buffer. */ - -int inflate_fast(bl, bd, tl, td, s, z) -uInt bl, bd; -inflate_huft *tl; -inflate_huft *td; /* need separate declaration for Borland C++ */ -inflate_blocks_statef *s; -z_streamp z; -{ - inflate_huft *t; /* temporary pointer */ - uInt e; /* extra bits or operation */ - uLong b; /* bit buffer */ - uInt k; /* bits in bit buffer */ - Bytef *p; /* input data pointer */ - uInt n; /* bytes available there */ - Bytef *q; /* output window write pointer */ - uInt m; /* bytes to end of window or read pointer */ - uInt ml; /* mask for literal/length tree */ - uInt md; /* mask for distance tree */ - uInt c; /* bytes to copy */ - uInt d; /* distance back to copy from */ - Bytef *r; /* copy source pointer */ - - /* load input, output, bit values */ - LOAD - - /* initialize masks */ - ml = inflate_mask[bl]; - md = inflate_mask[bd]; - - /* do until not enough input or output space for fast loop */ - do { /* assume called with m >= 258 && n >= 10 */ - /* get literal/length code */ - GRABBITS(20) /* max bits for literal/length code */ - if ((e = (t = tl + ((uInt)b & ml))->exop) == 0) - { - DUMPBITS(t->bits) - Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ? - "inflate: * literal '%c'\n" : - "inflate: * literal 0x%02x\n", t->base)); - *q++ = (Byte)t->base; - m--; - continue; - } - do { - DUMPBITS(t->bits) - if (e & 16) - { - /* get extra bits for length */ - e &= 15; - c = t->base + ((uInt)b & inflate_mask[e]); - DUMPBITS(e) - Tracevv((stderr, "inflate: * length %u\n", c)); - - /* decode distance base of block to copy */ - GRABBITS(15); /* max bits for distance code */ - e = (t = td + ((uInt)b & md))->exop; - do { - DUMPBITS(t->bits) - if (e & 16) - { - /* get extra bits to add to distance base */ - e &= 15; - GRABBITS(e) /* get extra bits (up to 13) */ - d = t->base + ((uInt)b & inflate_mask[e]); - DUMPBITS(e) - Tracevv((stderr, "inflate: * distance %u\n", d)); - - /* do the copy */ - m -= c; - if ((uInt)(q - s->window) >= d) /* offset before dest */ - { /* just copy */ - r = q - d; - *q++ = *r++; c--; /* minimum count is three, */ - *q++ = *r++; c--; /* so unroll loop a little */ - } - else /* else offset after destination */ - { - e = d - (uInt)(q - s->window); /* bytes from offset to end */ - r = s->end - e; /* pointer to offset */ - if (c > e) /* if source crosses, */ - { - c -= e; /* copy to end of window */ - do { - *q++ = *r++; - } while (--e); - r = s->window; /* copy rest from start of window */ - } - } - do { /* copy all or what's left */ - *q++ = *r++; - } while (--c); - break; - } - else if ((e & 64) == 0) - { - t += t->base; - e = (t += ((uInt)b & inflate_mask[e]))->exop; - } - else - { - z->msg = (char*)"invalid distance code"; - UNGRAB - UPDATE - return Z_DATA_ERROR; - } - } while (1); - break; - } - if ((e & 64) == 0) - { - t += t->base; - if ((e = (t += ((uInt)b & inflate_mask[e]))->exop) == 0) - { - DUMPBITS(t->bits) - Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ? - "inflate: * literal '%c'\n" : - "inflate: * literal 0x%02x\n", t->base)); - *q++ = (Byte)t->base; - m--; - break; - } - } - else if (e & 32) - { - Tracevv((stderr, "inflate: * end of block\n")); - UNGRAB - UPDATE - return Z_STREAM_END; - } - else - { - z->msg = (char*)"invalid literal/length code"; - UNGRAB - UPDATE - return Z_DATA_ERROR; - } - } while (1); - } while (m >= 258 && n >= 10); - - /* not enough input or output--restore pointers and return */ - UNGRAB - UPDATE - return Z_OK; -} diff --git a/src/zlib/inffast.h b/src/zlib/inffast.h deleted file mode 100644 index 8facec5531..0000000000 --- a/src/zlib/inffast.h +++ /dev/null @@ -1,17 +0,0 @@ -/* inffast.h -- header to use inffast.c - * Copyright (C) 1995-1998 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -extern int inflate_fast OF(( - uInt, - uInt, - inflate_huft *, - inflate_huft *, - inflate_blocks_statef *, - z_streamp )); diff --git a/src/zlib/inffixed.h b/src/zlib/inffixed.h deleted file mode 100644 index 644ef6cd4a..0000000000 --- a/src/zlib/inffixed.h +++ /dev/null @@ -1,125 +0,0 @@ -/* inffixed.h -- table for decoding fixed codes - * Generated automatically by the maketree.c program - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -local uInt fixed_bl = 9; -local uInt fixed_bd = 5; -local inflate_huft fixed_tl[] = { - {{96,7},256}, {{0,8},80}, {{0,8},16}, {{84,8},115}, {{82,7},31}, - {{0,8},112}, {{0,8},48}, {{0,9},192}, {{80,7},10}, {{0,8},96}, - {{0,8},32}, {{0,9},160}, {{0,8},0}, {{0,8},128}, {{0,8},64}, - {{0,9},224}, {{80,7},6}, {{0,8},88}, {{0,8},24}, {{0,9},144}, - {{83,7},59}, {{0,8},120}, {{0,8},56}, {{0,9},208}, {{81,7},17}, - {{0,8},104}, {{0,8},40}, {{0,9},176}, {{0,8},8}, {{0,8},136}, - {{0,8},72}, {{0,9},240}, {{80,7},4}, {{0,8},84}, {{0,8},20}, - {{85,8},227}, {{83,7},43}, {{0,8},116}, {{0,8},52}, {{0,9},200}, - {{81,7},13}, {{0,8},100}, {{0,8},36}, {{0,9},168}, {{0,8},4}, - {{0,8},132}, {{0,8},68}, {{0,9},232}, {{80,7},8}, {{0,8},92}, - {{0,8},28}, {{0,9},152}, {{84,7},83}, {{0,8},124}, {{0,8},60}, - {{0,9},216}, {{82,7},23}, {{0,8},108}, {{0,8},44}, {{0,9},184}, - {{0,8},12}, {{0,8},140}, {{0,8},76}, {{0,9},248}, {{80,7},3}, - {{0,8},82}, {{0,8},18}, {{85,8},163}, {{83,7},35}, {{0,8},114}, - {{0,8},50}, {{0,9},196}, {{81,7},11}, {{0,8},98}, {{0,8},34}, - {{0,9},164}, {{0,8},2}, {{0,8},130}, {{0,8},66}, {{0,9},228}, - {{80,7},7}, {{0,8},90}, {{0,8},26}, {{0,9},148}, {{84,7},67}, - {{0,8},122}, {{0,8},58}, {{0,9},212}, {{82,7},19}, {{0,8},106}, - {{0,8},42}, {{0,9},180}, {{0,8},10}, {{0,8},138}, {{0,8},74}, - {{0,9},244}, {{80,7},5}, {{0,8},86}, {{0,8},22}, {{192,8},0}, - {{83,7},51}, {{0,8},118}, {{0,8},54}, {{0,9},204}, {{81,7},15}, - {{0,8},102}, {{0,8},38}, {{0,9},172}, {{0,8},6}, {{0,8},134}, - {{0,8},70}, {{0,9},236}, {{80,7},9}, {{0,8},94}, {{0,8},30}, - {{0,9},156}, {{84,7},99}, {{0,8},126}, {{0,8},62}, {{0,9},220}, - {{82,7},27}, {{0,8},110}, {{0,8},46}, {{0,9},188}, {{0,8},14}, - {{0,8},142}, {{0,8},78}, {{0,9},252}, {{96,7},256}, {{0,8},81}, - {{0,8},17}, {{85,8},131}, {{82,7},31}, {{0,8},113}, {{0,8},49}, - {{0,9},194}, {{80,7},10}, {{0,8},97}, {{0,8},33}, {{0,9},162}, - {{0,8},1}, {{0,8},129}, {{0,8},65}, {{0,9},226}, {{80,7},6}, - {{0,8},89}, {{0,8},25}, {{0,9},146}, {{83,7},59}, {{0,8},121}, - {{0,8},57}, {{0,9},210}, {{81,7},17}, {{0,8},105}, {{0,8},41}, - {{0,9},178}, {{0,8},9}, {{0,8},137}, {{0,8},73}, {{0,9},242}, - {{80,7},4}, {{0,8},85}, {{0,8},21}, {{80,8},258}, {{83,7},43}, - {{0,8},117}, {{0,8},53}, {{0,9},202}, {{81,7},13}, {{0,8},101}, - {{0,8},37}, {{0,9},170}, {{0,8},5}, {{0,8},133}, {{0,8},69}, - {{0,9},234}, {{80,7},8}, {{0,8},93}, {{0,8},29}, {{0,9},154}, - {{84,7},83}, {{0,8},125}, {{0,8},61}, {{0,9},218}, {{82,7},23}, - {{0,8},109}, {{0,8},45}, {{0,9},186}, {{0,8},13}, {{0,8},141}, - {{0,8},77}, {{0,9},250}, {{80,7},3}, {{0,8},83}, {{0,8},19}, - {{85,8},195}, {{83,7},35}, {{0,8},115}, {{0,8},51}, {{0,9},198}, - {{81,7},11}, {{0,8},99}, {{0,8},35}, {{0,9},166}, {{0,8},3}, - {{0,8},131}, {{0,8},67}, {{0,9},230}, {{80,7},7}, {{0,8},91}, - {{0,8},27}, {{0,9},150}, {{84,7},67}, {{0,8},123}, {{0,8},59}, - {{0,9},214}, {{82,7},19}, {{0,8},107}, {{0,8},43}, {{0,9},182}, - {{0,8},11}, {{0,8},139}, {{0,8},75}, {{0,9},246}, {{80,7},5}, - {{0,8},87}, {{0,8},23}, {{192,8},0}, {{83,7},51}, {{0,8},119}, - {{0,8},55}, {{0,9},206}, {{81,7},15}, {{0,8},103}, {{0,8},39}, - {{0,9},174}, {{0,8},7}, {{0,8},135}, {{0,8},71}, {{0,9},238}, - {{80,7},9}, {{0,8},95}, {{0,8},31}, {{0,9},158}, {{84,7},99}, - {{0,8},127}, {{0,8},63}, {{0,9},222}, {{82,7},27}, {{0,8},111}, - {{0,8},47}, {{0,9},190}, {{0,8},15}, {{0,8},143}, {{0,8},79}, - {{0,9},254}, {{96,7},256}, {{0,8},80}, {{0,8},16}, {{84,8},115}, - {{82,7},31}, {{0,8},112}, {{0,8},48}, {{0,9},193}, {{80,7},10}, - {{0,8},96}, {{0,8},32}, {{0,9},161}, {{0,8},0}, {{0,8},128}, - {{0,8},64}, {{0,9},225}, {{80,7},6}, {{0,8},88}, {{0,8},24}, - {{0,9},145}, {{83,7},59}, {{0,8},120}, {{0,8},56}, {{0,9},209}, - {{81,7},17}, {{0,8},104}, {{0,8},40}, {{0,9},177}, {{0,8},8}, - {{0,8},136}, {{0,8},72}, {{0,9},241}, {{80,7},4}, {{0,8},84}, - {{0,8},20}, {{85,8},227}, {{83,7},43}, {{0,8},116}, {{0,8},52}, - {{0,9},201}, {{81,7},13}, {{0,8},100}, {{0,8},36}, {{0,9},169}, - {{0,8},4}, {{0,8},132}, {{0,8},68}, {{0,9},233}, {{80,7},8}, - {{0,8},92}, {{0,8},28}, {{0,9},153}, {{84,7},83}, {{0,8},124}, - {{0,8},60}, {{0,9},217}, {{82,7},23}, {{0,8},108}, {{0,8},44}, - {{0,9},185}, {{0,8},12}, {{0,8},140}, {{0,8},76}, {{0,9},249}, - {{80,7},3}, {{0,8},82}, {{0,8},18}, {{85,8},163}, {{83,7},35}, - {{0,8},114}, {{0,8},50}, {{0,9},197}, {{81,7},11}, {{0,8},98}, - {{0,8},34}, {{0,9},165}, {{0,8},2}, {{0,8},130}, {{0,8},66}, - {{0,9},229}, {{80,7},7}, {{0,8},90}, {{0,8},26}, {{0,9},149}, - {{84,7},67}, {{0,8},122}, {{0,8},58}, {{0,9},213}, {{82,7},19}, - {{0,8},106}, {{0,8},42}, {{0,9},181}, {{0,8},10}, {{0,8},138}, - {{0,8},74}, {{0,9},245}, {{80,7},5}, {{0,8},86}, {{0,8},22}, - {{192,8},0}, {{83,7},51}, {{0,8},118}, {{0,8},54}, {{0,9},205}, - {{81,7},15}, {{0,8},102}, {{0,8},38}, {{0,9},173}, {{0,8},6}, - {{0,8},134}, {{0,8},70}, {{0,9},237}, {{80,7},9}, {{0,8},94}, - {{0,8},30}, {{0,9},157}, {{84,7},99}, {{0,8},126}, {{0,8},62}, - {{0,9},221}, {{82,7},27}, {{0,8},110}, {{0,8},46}, {{0,9},189}, - {{0,8},14}, {{0,8},142}, {{0,8},78}, {{0,9},253}, {{96,7},256}, - {{0,8},81}, {{0,8},17}, {{85,8},131}, {{82,7},31}, {{0,8},113}, - {{0,8},49}, {{0,9},195}, {{80,7},10}, {{0,8},97}, {{0,8},33}, - {{0,9},163}, {{0,8},1}, {{0,8},129}, {{0,8},65}, {{0,9},227}, - {{80,7},6}, {{0,8},89}, {{0,8},25}, {{0,9},147}, {{83,7},59}, - {{0,8},121}, {{0,8},57}, {{0,9},211}, {{81,7},17}, {{0,8},105}, - {{0,8},41}, {{0,9},179}, {{0,8},9}, {{0,8},137}, {{0,8},73}, - {{0,9},243}, {{80,7},4}, {{0,8},85}, {{0,8},21}, {{80,8},258}, - {{83,7},43}, {{0,8},117}, {{0,8},53}, {{0,9},203}, {{81,7},13}, - {{0,8},101}, {{0,8},37}, {{0,9},171}, {{0,8},5}, {{0,8},133}, - {{0,8},69}, {{0,9},235}, {{80,7},8}, {{0,8},93}, {{0,8},29}, - {{0,9},155}, {{84,7},83}, {{0,8},125}, {{0,8},61}, {{0,9},219}, - {{82,7},23}, {{0,8},109}, {{0,8},45}, {{0,9},187}, {{0,8},13}, - {{0,8},141}, {{0,8},77}, {{0,9},251}, {{80,7},3}, {{0,8},83}, - {{0,8},19}, {{85,8},195}, {{83,7},35}, {{0,8},115}, {{0,8},51}, - {{0,9},199}, {{81,7},11}, {{0,8},99}, {{0,8},35}, {{0,9},167}, - {{0,8},3}, {{0,8},131}, {{0,8},67}, {{0,9},231}, {{80,7},7}, - {{0,8},91}, {{0,8},27}, {{0,9},151}, {{84,7},67}, {{0,8},123}, - {{0,8},59}, {{0,9},215}, {{82,7},19}, {{0,8},107}, {{0,8},43}, - {{0,9},183}, {{0,8},11}, {{0,8},139}, {{0,8},75}, {{0,9},247}, - {{80,7},5}, {{0,8},87}, {{0,8},23}, {{192,8},0}, {{83,7},51}, - {{0,8},119}, {{0,8},55}, {{0,9},207}, {{81,7},15}, {{0,8},103}, - {{0,8},39}, {{0,9},175}, {{0,8},7}, {{0,8},135}, {{0,8},71}, - {{0,9},239}, {{80,7},9}, {{0,8},95}, {{0,8},31}, {{0,9},159}, - {{84,7},99}, {{0,8},127}, {{0,8},63}, {{0,9},223}, {{82,7},27}, - {{0,8},111}, {{0,8},47}, {{0,9},191}, {{0,8},15}, {{0,8},143}, - {{0,8},79}, {{0,9},255} - }; -local inflate_huft fixed_td[] = { - {{80,5},1}, {{87,5},257}, {{83,5},17}, {{91,5},4097}, {{81,5},5}, - {{89,5},1025}, {{85,5},65}, {{93,5},16385}, {{80,5},3}, {{88,5},513}, - {{84,5},33}, {{92,5},8193}, {{82,5},9}, {{90,5},2049}, {{86,5},129}, - {{192,5},24577}, {{80,5},2}, {{87,5},385}, {{83,5},25}, {{91,5},6145}, - {{81,5},7}, {{89,5},1537}, {{85,5},97}, {{93,5},24577}, {{80,5},4}, - {{88,5},769}, {{84,5},49}, {{92,5},12289}, {{82,5},13}, {{90,5},3073}, - {{86,5},193}, {{192,5},24577} - }; diff --git a/src/zlib/inflate.c b/src/zlib/inflate.c deleted file mode 100644 index 32e9b8de67..0000000000 --- a/src/zlib/inflate.c +++ /dev/null @@ -1,366 +0,0 @@ -/* inflate.c -- zlib interface to inflate modules - * Copyright (C) 1995-1998 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "zutil.h" -#include "infblock.h" - -struct inflate_blocks_state {int dummy;}; /* for buggy compilers */ - -typedef enum { - METHOD, /* waiting for method byte */ - FLAG, /* waiting for flag byte */ - DICT4, /* four dictionary check bytes to go */ - DICT3, /* three dictionary check bytes to go */ - DICT2, /* two dictionary check bytes to go */ - DICT1, /* one dictionary check byte to go */ - DICT0, /* waiting for inflateSetDictionary */ - BLOCKS, /* decompressing blocks */ - CHECK4, /* four check bytes to go */ - CHECK3, /* three check bytes to go */ - CHECK2, /* two check bytes to go */ - CHECK1, /* one check byte to go */ - DONE, /* finished check, done */ - BAD} /* got an error--stay here */ -inflate_mode; - -/* inflate private state */ -struct internal_state { - - /* mode */ - inflate_mode mode; /* current inflate mode */ - - /* mode dependent information */ - union { - uInt method; /* if FLAGS, method byte */ - struct { - uLong was; /* computed check value */ - uLong need; /* stream check value */ - } check; /* if CHECK, check values to compare */ - uInt marker; /* if BAD, inflateSync's marker bytes count */ - } sub; /* submode */ - - /* mode independent information */ - int nowrap; /* flag for no wrapper */ - uInt wbits; /* log2(window size) (8..15, defaults to 15) */ - inflate_blocks_statef - *blocks; /* current inflate_blocks state */ - -}; - - -int ZEXPORT inflateReset(z) -z_streamp z; -{ - if (z == Z_NULL || z->state == Z_NULL) - return Z_STREAM_ERROR; - z->total_in = z->total_out = 0; - z->msg = Z_NULL; - z->state->mode = z->state->nowrap ? BLOCKS : METHOD; - inflate_blocks_reset(z->state->blocks, z, Z_NULL); - Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - - -int ZEXPORT inflateEnd(z) -z_streamp z; -{ - if (z == Z_NULL || z->state == Z_NULL || z->zfree == Z_NULL) - return Z_STREAM_ERROR; - if (z->state->blocks != Z_NULL) - inflate_blocks_free(z->state->blocks, z); - ZFREE(z, z->state); - z->state = Z_NULL; - Tracev((stderr, "inflate: end\n")); - return Z_OK; -} - - -int ZEXPORT inflateInit2_(z, w, version, stream_size) -z_streamp z; -int w; -const char *version; -int stream_size; -{ - if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || - stream_size != sizeof(z_stream)) - return Z_VERSION_ERROR; - - /* initialize state */ - if (z == Z_NULL) - return Z_STREAM_ERROR; - z->msg = Z_NULL; - if (z->zalloc == Z_NULL) - { - z->zalloc = zcalloc; - z->opaque = (voidpf)0; - } - if (z->zfree == Z_NULL) z->zfree = zcfree; - if ((z->state = (struct internal_state FAR *) - ZALLOC(z,1,sizeof(struct internal_state))) == Z_NULL) - return Z_MEM_ERROR; - z->state->blocks = Z_NULL; - - /* handle undocumented nowrap option (no zlib header or check) */ - z->state->nowrap = 0; - if (w < 0) - { - w = - w; - z->state->nowrap = 1; - } - - /* set window size */ - if (w < 8 || w > 15) - { - inflateEnd(z); - return Z_STREAM_ERROR; - } - z->state->wbits = (uInt)w; - - /* create inflate_blocks state */ - if ((z->state->blocks = - inflate_blocks_new(z, z->state->nowrap ? Z_NULL : adler32, (uInt)1 << w)) - == Z_NULL) - { - inflateEnd(z); - return Z_MEM_ERROR; - } - Tracev((stderr, "inflate: allocated\n")); - - /* reset state */ - inflateReset(z); - return Z_OK; -} - - -int ZEXPORT inflateInit_(z, version, stream_size) -z_streamp z; -const char *version; -int stream_size; -{ - return inflateInit2_(z, DEF_WBITS, version, stream_size); -} - - -#define NEEDBYTE {if(z->avail_in==0)return r;r=f;} -#define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++) - -int ZEXPORT inflate(z, f) -z_streamp z; -int f; -{ - int r; - uInt b; - - if (z == Z_NULL || z->state == Z_NULL || z->next_in == Z_NULL) - return Z_STREAM_ERROR; - f = f == Z_FINISH ? Z_BUF_ERROR : Z_OK; - r = Z_BUF_ERROR; - while (1) switch (z->state->mode) - { - case METHOD: - NEEDBYTE - if (((z->state->sub.method = NEXTBYTE) & 0xf) != Z_DEFLATED) - { - z->state->mode = BAD; - z->msg = (char*)"unknown compression method"; - z->state->sub.marker = 5; /* can't try inflateSync */ - break; - } - if ((z->state->sub.method >> 4) + 8 > z->state->wbits) - { - z->state->mode = BAD; - z->msg = (char*)"invalid window size"; - z->state->sub.marker = 5; /* can't try inflateSync */ - break; - } - z->state->mode = FLAG; - case FLAG: - NEEDBYTE - b = NEXTBYTE; - if (((z->state->sub.method << 8) + b) % 31) - { - z->state->mode = BAD; - z->msg = (char*)"incorrect header check"; - z->state->sub.marker = 5; /* can't try inflateSync */ - break; - } - Tracev((stderr, "inflate: zlib header ok\n")); - if (!(b & PRESET_DICT)) - { - z->state->mode = BLOCKS; - break; - } - z->state->mode = DICT4; - case DICT4: - NEEDBYTE - z->state->sub.check.need = (uLong)NEXTBYTE << 24; - z->state->mode = DICT3; - case DICT3: - NEEDBYTE - z->state->sub.check.need += (uLong)NEXTBYTE << 16; - z->state->mode = DICT2; - case DICT2: - NEEDBYTE - z->state->sub.check.need += (uLong)NEXTBYTE << 8; - z->state->mode = DICT1; - case DICT1: - NEEDBYTE - z->state->sub.check.need += (uLong)NEXTBYTE; - z->adler = z->state->sub.check.need; - z->state->mode = DICT0; - return Z_NEED_DICT; - case DICT0: - z->state->mode = BAD; - z->msg = (char*)"need dictionary"; - z->state->sub.marker = 0; /* can try inflateSync */ - return Z_STREAM_ERROR; - case BLOCKS: - r = inflate_blocks(z->state->blocks, z, r); - if (r == Z_DATA_ERROR) - { - z->state->mode = BAD; - z->state->sub.marker = 0; /* can try inflateSync */ - break; - } - if (r == Z_OK) - r = f; - if (r != Z_STREAM_END) - return r; - r = f; - inflate_blocks_reset(z->state->blocks, z, &z->state->sub.check.was); - if (z->state->nowrap) - { - z->state->mode = DONE; - break; - } - z->state->mode = CHECK4; - case CHECK4: - NEEDBYTE - z->state->sub.check.need = (uLong)NEXTBYTE << 24; - z->state->mode = CHECK3; - case CHECK3: - NEEDBYTE - z->state->sub.check.need += (uLong)NEXTBYTE << 16; - z->state->mode = CHECK2; - case CHECK2: - NEEDBYTE - z->state->sub.check.need += (uLong)NEXTBYTE << 8; - z->state->mode = CHECK1; - case CHECK1: - NEEDBYTE - z->state->sub.check.need += (uLong)NEXTBYTE; - - if (z->state->sub.check.was != z->state->sub.check.need) - { - z->state->mode = BAD; - z->msg = (char*)"incorrect data check"; - z->state->sub.marker = 5; /* can't try inflateSync */ - break; - } - Tracev((stderr, "inflate: zlib check ok\n")); - z->state->mode = DONE; - case DONE: - return Z_STREAM_END; - case BAD: - return Z_DATA_ERROR; - default: - return Z_STREAM_ERROR; - } -#ifdef NEED_DUMMY_RETURN - return Z_STREAM_ERROR; /* Some dumb compilers complain without this */ -#endif -} - - -int ZEXPORT inflateSetDictionary(z, dictionary, dictLength) -z_streamp z; -const Bytef *dictionary; -uInt dictLength; -{ - uInt length = dictLength; - - if (z == Z_NULL || z->state == Z_NULL || z->state->mode != DICT0) - return Z_STREAM_ERROR; - - if (adler32(1L, dictionary, dictLength) != z->adler) return Z_DATA_ERROR; - z->adler = 1L; - - if (length >= ((uInt)1<state->wbits)) - { - length = (1<state->wbits)-1; - dictionary += dictLength - length; - } - inflate_set_dictionary(z->state->blocks, dictionary, length); - z->state->mode = BLOCKS; - return Z_OK; -} - - -int ZEXPORT inflateSync(z) -z_streamp z; -{ - uInt n; /* number of bytes to look at */ - Bytef *p; /* pointer to bytes */ - uInt m; /* number of marker bytes found in a row */ - uLong r, w; /* temporaries to save total_in and total_out */ - - /* set up */ - if (z == Z_NULL || z->state == Z_NULL) - return Z_STREAM_ERROR; - if (z->state->mode != BAD) - { - z->state->mode = BAD; - z->state->sub.marker = 0; - } - if ((n = z->avail_in) == 0) - return Z_BUF_ERROR; - p = z->next_in; - m = z->state->sub.marker; - - /* search */ - while (n && m < 4) - { - static const Byte mark[4] = {0, 0, 0xff, 0xff}; - if (*p == mark[m]) - m++; - else if (*p) - m = 0; - else - m = 4 - m; - p++, n--; - } - - /* restore */ - z->total_in += p - z->next_in; - z->next_in = p; - z->avail_in = n; - z->state->sub.marker = m; - - /* return no joy or set up to restart on a new block */ - if (m != 4) - return Z_DATA_ERROR; - r = z->total_in; w = z->total_out; - inflateReset(z); - z->total_in = r; z->total_out = w; - z->state->mode = BLOCKS; - return Z_OK; -} - - -/* Returns true if inflate is currently at the end of a block generated - * by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP - * implementation to provide an additional safety check. PPP uses Z_SYNC_FLUSH - * but removes the length bytes of the resulting empty stored block. When - * decompressing, PPP checks that at the end of input packet, inflate is - * waiting for these length bytes. - */ -int ZEXPORT inflateSyncPoint(z) -z_streamp z; -{ - if (z == Z_NULL || z->state == Z_NULL || z->state->blocks == Z_NULL) - return Z_STREAM_ERROR; - return inflate_blocks_sync_point(z->state->blocks); -} diff --git a/src/zlib/inftrees.c b/src/zlib/inftrees.c deleted file mode 100644 index 6876ab5a8d..0000000000 --- a/src/zlib/inftrees.c +++ /dev/null @@ -1,455 +0,0 @@ -/* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-1998 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "zutil.h" -#include "inftrees.h" - -#if !defined(BUILDFIXED) && !defined(STDC) -# define BUILDFIXED /* non ANSI compilers may not accept inffixed.h */ -#endif - -const char inflate_copyright[] = - " inflate 1.1.2 Copyright 1995-1998 Mark Adler "; -/* - If you use the zlib library in a product, an acknowledgment is welcome - in the documentation of your product. If for some reason you cannot - include such an acknowledgment, I would appreciate that you keep this - copyright string in the executable of your product. - */ -struct internal_state {int dummy;}; /* for buggy compilers */ - -/* simplify the use of the inflate_huft type with some defines */ -#define exop word.what.Exop -#define bits word.what.Bits - - -local int huft_build OF(( - uIntf *, /* code lengths in bits */ - uInt, /* number of codes */ - uInt, /* number of "simple" codes */ - const uIntf *, /* list of base values for non-simple codes */ - const uIntf *, /* list of extra bits for non-simple codes */ - inflate_huft * FAR*,/* result: starting table */ - uIntf *, /* maximum lookup bits (returns actual) */ - inflate_huft *, /* space for trees */ - uInt *, /* hufts used in space */ - uIntf * )); /* space for values */ - -/* Tables for deflate from PKZIP's appnote.txt. */ -local const uInt cplens[31] = { /* Copy lengths for literal codes 257..285 */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; - /* see note #13 above about 258 */ -local const uInt cplext[31] = { /* Extra bits for literal codes 257..285 */ - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, - 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112}; /* 112==invalid */ -local const uInt cpdist[30] = { /* Copy offsets for distance codes 0..29 */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577}; -local const uInt cpdext[30] = { /* Extra bits for distance codes */ - 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, - 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, - 12, 12, 13, 13}; - -/* - Huffman code decoding is performed using a multi-level table lookup. - The fastest way to decode is to simply build a lookup table whose - size is determined by the longest code. However, the time it takes - to build this table can also be a factor if the data being decoded - is not very long. The most common codes are necessarily the - shortest codes, so those codes dominate the decoding time, and hence - the speed. The idea is you can have a shorter table that decodes the - shorter, more probable codes, and then point to subsidiary tables for - the longer codes. The time it costs to decode the longer codes is - then traded against the time it takes to make longer tables. - - This results of this trade are in the variables lbits and dbits - below. lbits is the number of bits the first level table for literal/ - length codes can decode in one step, and dbits is the same thing for - the distance codes. Subsequent tables are also less than or equal to - those sizes. These values may be adjusted either when all of the - codes are shorter than that, in which case the longest code length in - bits is used, or when the shortest code is *longer* than the requested - table size, in which case the length of the shortest code in bits is - used. - - There are two different values for the two tables, since they code a - different number of possibilities each. The literal/length table - codes 286 possible values, or in a flat code, a little over eight - bits. The distance table codes 30 possible values, or a little less - than five bits, flat. The optimum values for speed end up being - about one bit more than those, so lbits is 8+1 and dbits is 5+1. - The optimum values may differ though from machine to machine, and - possibly even between compilers. Your mileage may vary. - */ - - -/* If BMAX needs to be larger than 16, then h and x[] should be uLong. */ -#define BMAX 15 /* maximum bit length of any code */ - -local int huft_build(b, n, s, d, e, t, m, hp, hn, v) -uIntf *b; /* code lengths in bits (all assumed <= BMAX) */ -uInt n; /* number of codes (assumed <= 288) */ -uInt s; /* number of simple-valued codes (0..s-1) */ -const uIntf *d; /* list of base values for non-simple codes */ -const uIntf *e; /* list of extra bits for non-simple codes */ -inflate_huft * FAR *t; /* result: starting table */ -uIntf *m; /* maximum lookup bits, returns actual */ -inflate_huft *hp; /* space for trees */ -uInt *hn; /* hufts used in space */ -uIntf *v; /* working area: values in order of bit length */ -/* Given a list of code lengths and a maximum table size, make a set of - tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR - if the given code set is incomplete (the tables are still built in this - case), Z_DATA_ERROR if the input is invalid (an over-subscribed set of - lengths), or Z_MEM_ERROR if not enough memory. */ -{ - - uInt a; /* counter for codes of length k */ - uInt c[BMAX+1]; /* bit length count table */ - uInt f; /* i repeats in table every f entries */ - int g; /* maximum code length */ - int h; /* table level */ - register uInt i; /* counter, current code */ - register uInt j; /* counter */ - register int k; /* number of bits in current code */ - int l; /* bits per table (returned in m) */ - uInt mask; /* (1 << w) - 1, to avoid cc -O bug on HP */ - register uIntf *p; /* pointer into c[], b[], or v[] */ - inflate_huft *q; /* points to current table */ - struct inflate_huft_s r; /* table entry for structure assignment */ - inflate_huft *u[BMAX]; /* table stack */ - register int w; /* bits before this table == (l * h) */ - uInt x[BMAX+1]; /* bit offsets, then code stack */ - uIntf *xp; /* pointer into x */ - int y; /* number of dummy codes added */ - uInt z; /* number of entries in current table */ - - - /* Generate counts for each bit length */ - p = c; -#define C0 *p++ = 0; -#define C2 C0 C0 C0 C0 -#define C4 C2 C2 C2 C2 - C4 /* clear c[]--assume BMAX+1 is 16 */ - p = b; i = n; - do { - c[*p++]++; /* assume all entries <= BMAX */ - } while (--i); - if (c[0] == n) /* null input--all zero length codes */ - { - *t = (inflate_huft *)Z_NULL; - *m = 0; - return Z_OK; - } - - - /* Find minimum and maximum length, bound *m by those */ - l = *m; - for (j = 1; j <= BMAX; j++) - if (c[j]) - break; - k = j; /* minimum code length */ - if ((uInt)l < j) - l = j; - for (i = BMAX; i; i--) - if (c[i]) - break; - g = i; /* maximum code length */ - if ((uInt)l > i) - l = i; - *m = l; - - - /* Adjust last length count to fill out codes, if needed */ - for (y = 1 << j; j < i; j++, y <<= 1) - if ((y -= c[j]) < 0) - return Z_DATA_ERROR; - if ((y -= c[i]) < 0) - return Z_DATA_ERROR; - c[i] += y; - - - /* Generate starting offsets into the value table for each length */ - x[1] = j = 0; - p = c + 1; xp = x + 2; - while (--i) { /* note that i == g from above */ - *xp++ = (j += *p++); - } - - - /* Make a table of values in order of bit lengths */ - p = b; i = 0; - do { - if ((j = *p++) != 0) - v[x[j]++] = i; - } while (++i < n); - n = x[g]; /* set n to length of v */ - - - /* Generate the Huffman codes and for each, make the table entries */ - x[0] = i = 0; /* first Huffman code is zero */ - p = v; /* grab values in bit order */ - h = -1; /* no tables yet--level -1 */ - w = -l; /* bits decoded == (l * h) */ - u[0] = (inflate_huft *)Z_NULL; /* just to keep compilers happy */ - q = (inflate_huft *)Z_NULL; /* ditto */ - z = 0; /* ditto */ - - /* go through the bit lengths (k already is bits in shortest code) */ - for (; k <= g; k++) - { - a = c[k]; - while (a--) - { - /* here i is the Huffman code of length k bits for value *p */ - /* make tables up to required level */ - while (k > w + l) - { - h++; - w += l; /* previous table always l bits */ - - /* compute minimum size table less than or equal to l bits */ - z = g - w; - z = z > (uInt)l ? l : z; /* table size upper limit */ - if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */ - { /* too few codes for k-w bit table */ - f -= a + 1; /* deduct codes from patterns left */ - xp = c + k; - if (j < z) - while (++j < z) /* try smaller tables up to z bits */ - { - if ((f <<= 1) <= *++xp) - break; /* enough codes to use up j bits */ - f -= *xp; /* else deduct codes from patterns */ - } - } - z = 1 << j; /* table entries for j-bit table */ - - /* allocate new table */ - if (*hn + z > MANY) /* (note: doesn't matter for fixed) */ - return Z_MEM_ERROR; /* not enough memory */ - u[h] = q = hp + *hn; - *hn += z; - - /* connect to last table, if there is one */ - if (h) - { - x[h] = i; /* save pattern for backing up */ - r.bits = (Byte)l; /* bits to dump before this table */ - r.exop = (Byte)j; /* bits in this table */ - j = i >> (w - l); - r.base = (uInt)(q - u[h-1] - j); /* offset to this table */ - u[h-1][j] = r; /* connect to last table */ - } - else - *t = q; /* first table is returned result */ - } - - /* set up table entry in r */ - r.bits = (Byte)(k - w); - if (p >= v + n) - r.exop = 128 + 64; /* out of values--invalid code */ - else if (*p < s) - { - r.exop = (Byte)(*p < 256 ? 0 : 32 + 64); /* 256 is end-of-block */ - r.base = *p++; /* simple code is just the value */ - } - else - { - r.exop = (Byte)(e[*p - s] + 16 + 64);/* non-simple--look up in lists */ - r.base = d[*p++ - s]; - } - - /* fill code-like entries with r */ - f = 1 << (k - w); - for (j = i >> w; j < z; j += f) - q[j] = r; - - /* backwards increment the k-bit code i */ - for (j = 1 << (k - 1); i & j; j >>= 1) - i ^= j; - i ^= j; - - /* backup over finished tables */ - mask = (1 << w) - 1; /* needed on HP, cc -O bug */ - while ((i & mask) != x[h]) - { - h--; /* don't need to update q */ - w -= l; - mask = (1 << w) - 1; - } - } - } - - - /* Return Z_BUF_ERROR if we were given an incomplete table */ - return y != 0 && g != 1 ? Z_BUF_ERROR : Z_OK; -} - - -int inflate_trees_bits(c, bb, tb, hp, z) -uIntf *c; /* 19 code lengths */ -uIntf *bb; /* bits tree desired/actual depth */ -inflate_huft * FAR *tb; /* bits tree result */ -inflate_huft *hp; /* space for trees */ -z_streamp z; /* for messages */ -{ - int r; - uInt hn = 0; /* hufts used in space */ - uIntf *v; /* work area for huft_build */ - - if ((v = (uIntf*)ZALLOC(z, 19, sizeof(uInt))) == Z_NULL) - return Z_MEM_ERROR; - r = huft_build(c, 19, 19, (uIntf*)Z_NULL, (uIntf*)Z_NULL, - tb, bb, hp, &hn, v); - if (r == Z_DATA_ERROR) - z->msg = (char*)"oversubscribed dynamic bit lengths tree"; - else if (r == Z_BUF_ERROR || *bb == 0) - { - z->msg = (char*)"incomplete dynamic bit lengths tree"; - r = Z_DATA_ERROR; - } - ZFREE(z, v); - return r; -} - - -int inflate_trees_dynamic(nl, nd, c, bl, bd, tl, td, hp, z) -uInt nl; /* number of literal/length codes */ -uInt nd; /* number of distance codes */ -uIntf *c; /* that many (total) code lengths */ -uIntf *bl; /* literal desired/actual bit depth */ -uIntf *bd; /* distance desired/actual bit depth */ -inflate_huft * FAR *tl; /* literal/length tree result */ -inflate_huft * FAR *td; /* distance tree result */ -inflate_huft *hp; /* space for trees */ -z_streamp z; /* for messages */ -{ - int r; - uInt hn = 0; /* hufts used in space */ - uIntf *v; /* work area for huft_build */ - - /* allocate work area */ - if ((v = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL) - return Z_MEM_ERROR; - - /* build literal/length tree */ - r = huft_build(c, nl, 257, cplens, cplext, tl, bl, hp, &hn, v); - if (r != Z_OK || *bl == 0) - { - if (r == Z_DATA_ERROR) - z->msg = (char*)"oversubscribed literal/length tree"; - else if (r != Z_MEM_ERROR) - { - z->msg = (char*)"incomplete literal/length tree"; - r = Z_DATA_ERROR; - } - ZFREE(z, v); - return r; - } - - /* build distance tree */ - r = huft_build(c + nl, nd, 0, cpdist, cpdext, td, bd, hp, &hn, v); - if (r != Z_OK || (*bd == 0 && nl > 257)) - { - if (r == Z_DATA_ERROR) - z->msg = (char*)"oversubscribed distance tree"; - else if (r == Z_BUF_ERROR) { -#ifdef PKZIP_BUG_WORKAROUND - r = Z_OK; - } -#else - z->msg = (char*)"incomplete distance tree"; - r = Z_DATA_ERROR; - } - else if (r != Z_MEM_ERROR) - { - z->msg = (char*)"empty distance tree with lengths"; - r = Z_DATA_ERROR; - } - ZFREE(z, v); - return r; -#endif - } - - /* done */ - ZFREE(z, v); - return Z_OK; -} - - -/* build fixed tables only once--keep them here */ -#ifdef BUILDFIXED -local int fixed_built = 0; -#define FIXEDH 544 /* number of hufts used by fixed tables */ -local inflate_huft fixed_mem[FIXEDH]; -local uInt fixed_bl; -local uInt fixed_bd; -local inflate_huft *fixed_tl; -local inflate_huft *fixed_td; -#else -#include "inffixed.h" -#endif - - -int inflate_trees_fixed(bl, bd, tl, td, z) -uIntf *bl; /* literal desired/actual bit depth */ -uIntf *bd; /* distance desired/actual bit depth */ -inflate_huft * FAR *tl; /* literal/length tree result */ -inflate_huft * FAR *td; /* distance tree result */ -z_streamp z; /* for memory allocation */ -{ -#ifdef BUILDFIXED - /* build fixed tables if not already */ - if (!fixed_built) - { - int k; /* temporary variable */ - uInt f = 0; /* number of hufts used in fixed_mem */ - uIntf *c; /* length list for huft_build */ - uIntf *v; /* work area for huft_build */ - - /* allocate memory */ - if ((c = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL) - return Z_MEM_ERROR; - if ((v = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL) - { - ZFREE(z, c); - return Z_MEM_ERROR; - } - - /* literal table */ - for (k = 0; k < 144; k++) - c[k] = 8; - for (; k < 256; k++) - c[k] = 9; - for (; k < 280; k++) - c[k] = 7; - for (; k < 288; k++) - c[k] = 8; - fixed_bl = 9; - huft_build(c, 288, 257, cplens, cplext, &fixed_tl, &fixed_bl, - fixed_mem, &f, v); - - /* distance table */ - for (k = 0; k < 30; k++) - c[k] = 5; - fixed_bd = 5; - huft_build(c, 30, 0, cpdist, cpdext, &fixed_td, &fixed_bd, - fixed_mem, &f, v); - - /* done */ - ZFREE(z, v); - ZFREE(z, c); - fixed_built = 1; - } -#endif - *bl = fixed_bl; - *bd = fixed_bd; - *tl = fixed_tl; - *td = fixed_td; - return Z_OK; -} diff --git a/src/zlib/inftrees.h b/src/zlib/inftrees.h deleted file mode 100644 index 85853e097b..0000000000 --- a/src/zlib/inftrees.h +++ /dev/null @@ -1,58 +0,0 @@ -/* inftrees.h -- header to use inftrees.c - * Copyright (C) 1995-1998 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* Huffman code lookup table entry--this entry is four bytes for machines - that have 16-bit pointers (e.g. PC's in the small or medium model). */ - -typedef struct inflate_huft_s FAR inflate_huft; - -struct inflate_huft_s { - union { - struct { - Byte Exop; /* number of extra bits or operation */ - Byte Bits; /* number of bits in this code or subcode */ - } what; - uInt pad; /* pad structure to a power of 2 (4 bytes for */ - } word; /* 16-bit, 8 bytes for 32-bit int's) */ - uInt base; /* literal, length base, distance base, - or table offset */ -}; - -/* Maximum size of dynamic tree. The maximum found in a long but non- - exhaustive search was 1004 huft structures (850 for length/literals - and 154 for distances, the latter actually the result of an - exhaustive search). The actual maximum is not known, but the - value below is more than safe. */ -#define MANY 1440 - -extern int inflate_trees_bits OF(( - uIntf *, /* 19 code lengths */ - uIntf *, /* bits tree desired/actual depth */ - inflate_huft * FAR *, /* bits tree result */ - inflate_huft *, /* space for trees */ - z_streamp)); /* for messages */ - -extern int inflate_trees_dynamic OF(( - uInt, /* number of literal/length codes */ - uInt, /* number of distance codes */ - uIntf *, /* that many (total) code lengths */ - uIntf *, /* literal desired/actual bit depth */ - uIntf *, /* distance desired/actual bit depth */ - inflate_huft * FAR *, /* literal/length tree result */ - inflate_huft * FAR *, /* distance tree result */ - inflate_huft *, /* space for trees */ - z_streamp)); /* for messages */ - -extern int inflate_trees_fixed OF(( - uIntf *, /* literal desired/actual bit depth */ - uIntf *, /* distance desired/actual bit depth */ - inflate_huft * FAR *, /* literal/length tree result */ - inflate_huft * FAR *, /* distance tree result */ - z_streamp)); /* for memory allocation */ diff --git a/src/zlib/infutil.c b/src/zlib/infutil.c deleted file mode 100644 index 824dab5712..0000000000 --- a/src/zlib/infutil.c +++ /dev/null @@ -1,87 +0,0 @@ -/* inflate_util.c -- data and routines common to blocks and codes - * Copyright (C) 1995-1998 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "zutil.h" -#include "infblock.h" -#include "inftrees.h" -#include "infcodes.h" -#include "infutil.h" - -struct inflate_codes_state {int dummy;}; /* for buggy compilers */ - -/* And'ing with mask[n] masks the lower n bits */ -uInt inflate_mask[17] = { - 0x0000, - 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, - 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff -}; - - -/* copy as much as possible from the sliding window to the output area */ -int inflate_flush(s, z, r) -inflate_blocks_statef *s; -z_streamp z; -int r; -{ - uInt n; - Bytef *p; - Bytef *q; - - /* local copies of source and destination pointers */ - p = z->next_out; - q = s->read; - - /* compute number of bytes to copy as far as end of window */ - n = (uInt)((q <= s->write ? s->write : s->end) - q); - if (n > z->avail_out) n = z->avail_out; - if (n && r == Z_BUF_ERROR) r = Z_OK; - - /* update counters */ - z->avail_out -= n; - z->total_out += n; - - /* update check information */ - if (s->checkfn != Z_NULL) - z->adler = s->check = (*s->checkfn)(s->check, q, n); - - /* copy as far as end of window */ - zmemcpy(p, q, n); - p += n; - q += n; - - /* see if more to copy at beginning of window */ - if (q == s->end) - { - /* wrap pointers */ - q = s->window; - if (s->write == s->end) - s->write = s->window; - - /* compute bytes to copy */ - n = (uInt)(s->write - q); - if (n > z->avail_out) n = z->avail_out; - if (n && r == Z_BUF_ERROR) r = Z_OK; - - /* update counters */ - z->avail_out -= n; - z->total_out += n; - - /* update check information */ - if (s->checkfn != Z_NULL) - z->adler = s->check = (*s->checkfn)(s->check, q, n); - - /* copy */ - zmemcpy(p, q, n); - p += n; - q += n; - } - - /* update pointers */ - z->next_out = p; - s->read = q; - - /* done */ - return r; -} diff --git a/src/zlib/infutil.h b/src/zlib/infutil.h deleted file mode 100644 index 99d1135d06..0000000000 --- a/src/zlib/infutil.h +++ /dev/null @@ -1,98 +0,0 @@ -/* infutil.h -- types and macros common to blocks and codes - * Copyright (C) 1995-1998 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -#ifndef _INFUTIL_H -#define _INFUTIL_H - -typedef enum { - TYPE, /* get type bits (3, including end bit) */ - LENS, /* get lengths for stored */ - STORED, /* processing stored block */ - TABLE, /* get table lengths */ - BTREE, /* get bit lengths tree for a dynamic block */ - DTREE, /* get length, distance trees for a dynamic block */ - CODES, /* processing fixed or dynamic block */ - DRY, /* output remaining window bytes */ - DONE, /* finished last block, done */ - BAD} /* got a data error--stuck here */ -inflate_block_mode; - -/* inflate blocks semi-private state */ -struct inflate_blocks_state { - - /* mode */ - inflate_block_mode mode; /* current inflate_block mode */ - - /* mode dependent information */ - union { - uInt left; /* if STORED, bytes left to copy */ - struct { - uInt table; /* table lengths (14 bits) */ - uInt index; /* index into blens (or border) */ - uIntf *blens; /* bit lengths of codes */ - uInt bb; /* bit length tree depth */ - inflate_huft *tb; /* bit length decoding tree */ - } trees; /* if DTREE, decoding info for trees */ - struct { - inflate_codes_statef - *codes; - } decode; /* if CODES, current state */ - } sub; /* submode */ - uInt last; /* true if this block is the last block */ - - /* mode independent information */ - uInt bitk; /* bits in bit buffer */ - uLong bitb; /* bit buffer */ - inflate_huft *hufts; /* single malloc for tree space */ - Bytef *window; /* sliding window */ - Bytef *end; /* one byte after sliding window */ - Bytef *read; /* window read pointer */ - Bytef *write; /* window write pointer */ - check_func checkfn; /* check function */ - uLong check; /* check on output */ - -}; - - -/* defines for inflate input/output */ -/* update pointers and return */ -#define UPDBITS {s->bitb=b;s->bitk=k;} -#define UPDIN {z->avail_in=n;z->total_in+=p-z->next_in;z->next_in=p;} -#define UPDOUT {s->write=q;} -#define UPDATE {UPDBITS UPDIN UPDOUT} -#define LEAVE {UPDATE return inflate_flush(s,z,r);} -/* get bytes and bits */ -#define LOADIN {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;} -#define NEEDBYTE {if(n)r=Z_OK;else LEAVE} -#define NEXTBYTE (n--,*p++) -#define NEEDBITS(j) {while(k<(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)<>=(j);k-=(j);} -/* output bytes */ -#define WAVAIL (uInt)(qread?s->read-q-1:s->end-q) -#define LOADOUT {q=s->write;m=(uInt)WAVAIL;} -#define WRAP {if(q==s->end&&s->read!=s->window){q=s->window;m=(uInt)WAVAIL;}} -#define FLUSH {UPDOUT r=inflate_flush(s,z,r); LOADOUT} -#define NEEDOUT {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE}}r=Z_OK;} -#define OUTBYTE(a) {*q++=(Byte)(a);m--;} -/* load local pointers */ -#define LOAD {LOADIN LOADOUT} - -/* masks for lower bits (size given to avoid silly warnings with Visual C++) */ -extern uInt inflate_mask[17]; - -/* copy as much as possible from the sliding window to the output area */ -extern int inflate_flush OF(( - inflate_blocks_statef *, - z_streamp , - int)); - -struct internal_state {int dummy;}; /* for buggy compilers */ - -#endif diff --git a/src/zlib/makefile.b32 b/src/zlib/makefile.b32 deleted file mode 100644 index e45999b188..0000000000 --- a/src/zlib/makefile.b32 +++ /dev/null @@ -1,107 +0,0 @@ -# Makefile for zlib -# Borland C++ - -# This version of the zlib makefile was adapted by Chris Young for use -# with Borland C 4.5x with the Dos Power Pack for a 32-bit protected mode -# flat memory model. It was created for use with POV-Ray ray tracer and -# you may choose to edit the CFLAGS to suit your needs but the -# switches -WX and -DMSDOS are required. -# -- Chris Young 76702.1655@compuserve.com - -# To use, do "make -fmakefile.b32" - -# See zconf.h for details about the memory requirements. - -# ------------- Borland C++ ------------- -MODEL=-WX -CFLAGS= $(MODEL) -P-C -K -N- -k- -d -3 -r- -v- -f -DMSDOS -CC=bcc32 -LD=bcc32 -LIB=tlib -LDFLAGS= $(MODEL) -O=.obj - -LIBTARGET=..\..\lib\zlib.lib - -# variables -OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \ - trees$(O) -OBJP1 = adler32$(O)+compress$(O)+crc32$(O)+gzio$(O)+uncompr$(O)+deflate$(O)+\ - trees$(O) -OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \ - infutil$(O) inffast$(O) -OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\ - infutil$(O)+inffast$(O) - -all: test - -adler32.obj: adler32.c zutil.h zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -compress.obj: compress.c zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -crc32.obj: crc32.c zutil.h zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -gzio.obj: gzio.c zutil.h zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\ - infcodes.h infutil.h - $(CC) -c $(CFLAGS) $*.c - -infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\ - infcodes.h inffast.h - $(CC) -c $(CFLAGS) $*.c - -inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h - $(CC) -c $(CFLAGS) $*.c - -inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h - $(CC) -c $(CFLAGS) $*.c - -infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h - $(CC) -c $(CFLAGS) $*.c - -inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h - $(CC) -c $(CFLAGS) $*.c - -trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -uncompr.obj: uncompr.c zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -zutil.obj: zutil.c zutil.h zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -example.obj: example.c zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -minigzip.obj: minigzip.c zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -# we must cut the command line to fit in the MS/DOS 128 byte limit: -$(LIBTARGET: $(OBJ1) $(OBJ2) - del $(LIBTARGET) - $(LIB) $(LIBTARGET) +$(OBJP1) - $(LIB) $(LIBTARGET) +$(OBJP2) - -example.exe: example.obj $(LIBTARGET) - $(LD) $(LDFLAGS) example.obj $(LIBTARGET) - -minigzip.exe: minigzip.obj $(LIBTARGET) - $(LD) $(LDFLAGS) minigzip.obj $(LIBTARGET) - -test: example.exe minigzip.exe - example - echo hello world | minigzip | minigzip -d - -clean: - del *.obj - del *.exe - del $(LIBTARGET) diff --git a/src/zlib/makefile.bcc b/src/zlib/makefile.bcc deleted file mode 100644 index 42d9d18e22..0000000000 --- a/src/zlib/makefile.bcc +++ /dev/null @@ -1,88 +0,0 @@ -# Makefile for zlib -# Borland C++ ************ UNTESTED *********** - -# To use, do "make -fmakefile.bor" - -# WARNING: the small model is supported but only for small values of -# MAX_WBITS and MAX_MEM_LEVEL. If you wish to reduce the memory -# requirements (default 256K for big objects plus a few K), you can add -# to CFLAGS below: -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 -# See zconf.h for details about the memory requirements. - -# ------------- Turbo C++, Borland C++ ------------- -MODEL=-ml -CFLAGS=-O2 -Z $(MODEL) -3 -Fs- -CC=bcc -LD=bcc -LIB=tlib -# replace bcc with tcc for Turbo C++ 1.0 -LDFLAGS=$(MODEL) -O=.obj - -LIBTARGET=..\..\lib\zlib.lib - -# variables -OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \ - trees$(O) -OBJP1 = adler32$(O)+compress$(O)+crc32$(O)+gzio$(O)+uncompr$(O)+deflate$(O)+\ - trees$(O) -OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \ - infutil$(O) inffast$(O) -OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\ - infutil$(O)+inffast$(O) - -all: $(LIBTARGET) - -adler32.obj: adler32.c zutil.h zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -compress.obj: compress.c zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -crc32.obj: crc32.c zutil.h zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -gzio.obj: gzio.c zutil.h zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\ - infcodes.h infutil.h - $(CC) -c $(CFLAGS) $*.c - -infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\ - infcodes.h inffast.h - $(CC) -c $(CFLAGS) $*.c - -inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h - $(CC) -c $(CFLAGS) $*.c - -inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h - $(CC) -c $(CFLAGS) $*.c - -infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h - $(CC) -c $(CFLAGS) $*.c - -inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h - $(CC) -c $(CFLAGS) $*.c - -trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -uncompr.obj: uncompr.c zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -zutil.obj: zutil.c zutil.h zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -# we must cut the command line to fit in the MS/DOS 128 byte limit: -$(LIBTARGET): $(OBJ1) $(OBJ2) - $(LIB) $(LIBTARGET) +$(OBJP1) - $(LIB) $(LIBTARGET) +$(OBJP2) - -clean: - -erase *.obj - -erase *.exe - -erase $(LIBTARGET) diff --git a/src/zlib/makefile.nt b/src/zlib/makefile.nt deleted file mode 100644 index ab0304c547..0000000000 --- a/src/zlib/makefile.nt +++ /dev/null @@ -1,88 +0,0 @@ -# Makefile for zlib -# Borland C++ ************ UNTESTED *********** - -# To use, do "make -fmakefile.bor" - -# WARNING: the small model is supported but only for small values of -# MAX_WBITS and MAX_MEM_LEVEL. If you wish to reduce the memory -# requirements (default 256K for big objects plus a few K), you can add -# to CFLAGS below: -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 -# See zconf.h for details about the memory requirements. - -# ------------- Turbo C++, Borland C++ ------------- -CFLAGS=-O2 /MDd /GX -CC=cl -LD=cl -LIB=tlib -# replace bcc with tcc for Turbo C++ 1.0 -LDFLAGS=$(MODEL) -O=.obj - -LIBTARGET=..\..\lib\zlib.lib - -# variables -OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \ - trees$(O) -OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \ - infutil$(O) inffast$(O) - -all: $(LIBTARGET) - -adler32.obj: adler32.c zutil.h zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -compress.obj: compress.c zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -crc32.obj: crc32.c zutil.h zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -gzio.obj: gzio.c zutil.h zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\ - infcodes.h infutil.h - $(CC) -c $(CFLAGS) $*.c - -infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\ - infcodes.h inffast.h - $(CC) -c $(CFLAGS) $*.c - -inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h - $(CC) -c $(CFLAGS) $*.c - -inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h - $(CC) -c $(CFLAGS) $*.c - -infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h - $(CC) -c $(CFLAGS) $*.c - -inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h - $(CC) -c $(CFLAGS) $*.c - -trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -uncompr.obj: uncompr.c zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -zutil.obj: zutil.c zutil.h zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -LIBOBJECTS = $(OBJ1) $(OBJ2) - -$(LIBTARGET): $(LIBOBJECTS) - del $(LIBTARGET) - lib @<< --out:$(LIBTARGET) -$(LIBOBJECTS) -<< - -clean: - -erase *.obj - -erase *.exe - -erase *.sbr - -erase $(LIBTARGET) diff --git a/src/zlib/makefile.unx b/src/zlib/makefile.unx deleted file mode 100644 index 7062ba8ec8..0000000000 --- a/src/zlib/makefile.unx +++ /dev/null @@ -1,133 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for tree library and example (UNIX). -# Change the WXDIR directory, and CPPFLAGS and LDFLAGS, for your system. - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/make.env - -ZLIBDIR = $(WXDIR)/utils/zlib -ZLIBLIB = $(WXDIR)/lib/libzlib$(GUISUFFIX).a - -SOURCES = adler32.c deflate.c infblock.c inflate.c zutil.c compress.c \ - infcodes.c inftrees.c trees.c \ - crc32.c gzio.c inffast.c infutil.c uncompr.c -OBJECTS = $(OBJDIR)/adler32.$(OBJSUFF) $(OBJDIR)/deflate.$(OBJSUFF) \ - $(OBJDIR)/infblock.$(OBJSUFF) $(OBJDIR)/inflate.$(OBJSUFF) \ - $(OBJDIR)/zutil.$(OBJSUFF) $(OBJDIR)/trees.$(OBJSUFF) \ - $(OBJDIR)/compress.$(OBJSUFF) $(OBJDIR)/infcodes.$(OBJSUFF) \ - $(OBJDIR)/inftrees.$(OBJSUFF) $(OBJDIR)/crc32.$(OBJSUFF) \ - $(OBJDIR)/gzio.$(OBJSUFF) $(OBJDIR)/inffast.$(OBJSUFF) \ - $(OBJDIR)/infutil.$(OBJSUFF) $(OBJDIR)/uncompr.$(OBJSUFF) - -# Default - -.SUFFIXES: - -all: $(OBJDIR) $(ZLIBLIB) - -demo: - -$(ZLIBLIB): $(OBJECTS) - rm -f $@ - ar $(AROPTIONS) $@ $(OBJECTS) - $(RANLIB) $@ - -motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif DEBUG='$(DEBUG)' OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' XVIEW_LINK= - -xview: - $(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol OPT='$(OPT)' DEBUG='$(DEBUG)' - -demo_motif: - $(MAKE) -f makefile.unx all test_motif GUI=-Dwx_motif GUISUFFIX=_motif DEBUG='$(DEBUG)' OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' XVIEW_LINK= - -demo_ol: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview OPT='$(OPT)' DEBUG='$(DEBUG)' - $(MAKE) -f makefile.unx all test_ol GUI=-Dwx_xview OPT='$(OPT)' DEBUG='$(DEBUG)' - -hp: - $(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' DEBUGFLAGS='-g' OPT='' WARN='-w' \ - XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' CCLEX='cc' \ - LDLIBS='$(HPLDLIBS)' - -demo_hp: - $(MAKE) -f makefile.unx all test_hp GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' DEBUGFLAGS='-g' OPT='' WARN='-w' \ - XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' CCLEX='cc' \ - LDLIBS='$(HPLDLIBS)' - -$(OBJDIR): - mkdir $(OBJDIR) - -$(OBJDIR)/adler32.$(OBJSUFF): adler32.c - $(CC) -c $(CPPFLAGS) -o $@ adler32.c - -$(OBJDIR)/deflate.$(OBJSUFF): deflate.c - $(CC) -c $(CPPFLAGS) -o $@ deflate.c - -$(OBJDIR)/infblock.$(OBJSUFF): infblock.c - $(CC) -c $(CPPFLAGS) -o $@ infblock.c - -$(OBJDIR)/inflate.$(OBJSUFF): inflate.c - $(CC) -c $(CPPFLAGS) -o $@ inflate.c - -$(OBJDIR)/zutil.$(OBJSUFF): zutil.c - $(CC) -c $(CPPFLAGS) -o $@ zutil.c - -$(OBJDIR)/compress.$(OBJSUFF): compress.c - $(CC) -c $(CPPFLAGS) -o $@ compress.c - -$(OBJDIR)/infcodes.$(OBJSUFF): infcodes.c - $(CC) -c $(CPPFLAGS) -o $@ infcodes.c - -$(OBJDIR)/inftrees.$(OBJSUFF): inftrees.c - $(CC) -c $(CPPFLAGS) -o $@ inftrees.c - -$(OBJDIR)/trees.$(OBJSUFF): trees.c - $(CC) -c $(CPPFLAGS) -o $@ trees.c - -$(OBJDIR)/crc32.$(OBJSUFF): crc32.c - $(CC) -c $(CPPFLAGS) -o $@ crc32.c - -$(OBJDIR)/gzio.$(OBJSUFF): gzio.c - $(CC) -c $(CPPFLAGS) -o $@ gzio.c - -$(OBJDIR)/inffast.$(OBJSUFF): inffast.c - $(CC) -c $(CPPFLAGS) -o $@ inffast.c - -$(OBJDIR)/infutil.$(OBJSUFF): infutil.c - $(CC) -c $(CPPFLAGS) -o $@ infutil.c - -$(OBJDIR)/uncompr.$(OBJSUFF): uncompr.c - $(CC) -c $(CPPFLAGS) -o $@ uncompr.c - -clean_motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany - -clean_ol: - $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany - -clean_hp: - $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany - -cleanany: - rm -f $(OBJECTS) $(OBJDIR)/*.$(OBJSUFF) $(ZLIBLIB) core - -wxclean_ol: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_ol - -wxclean_motif: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_motif - -wxclean_hp: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_hp diff --git a/src/zlib/makefile.wat b/src/zlib/makefile.wat deleted file mode 100644 index e8ee232db4..0000000000 --- a/src/zlib/makefile.wat +++ /dev/null @@ -1,105 +0,0 @@ -# Makefile for zlib -# Watcom 10a - -# This version of the zlib makefile was adapted by Chris Young for use -# with Watcom 10a 32-bit protected mode flat memory model. It was created -# for use with POV-Ray ray tracer and you may choose to edit the CFLAGS to -# suit your needs but the -DMSDOS is required. -# -- Chris Young 76702.1655@compuserve.com - -# To use, do "wmake -f makefile.wat" - -# See zconf.h for details about the memory requirements. - -# ------------- Watcom 10a ------------- -MODEL=-mf -CFLAGS= $(MODEL) -fpi87 -fp5 -zp4 -5r -w5 -oneatx -DMSDOS -CC=wcc386 -LD=wcl386 -LIB=wlib -b -c -LDFLAGS= -O=.obj -LIBTARGET=..\..\lib\zlib.lib - -# variables -OBJ1=adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) -OBJ2=trees$(O) zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) -OBJ3=infutil$(O) inffast$(O) -OBJP1=adler32$(O)+compress$(O)+crc32$(O)+gzio$(O)+uncompr$(O)+deflate$(O) -OBJP2=trees$(O)+zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O) -OBJP3=infutil$(O)+inffast$(O) - -all: test - -adler32.obj: adler32.c zutil.h zlib.h zconf.h - $(CC) $(CFLAGS) $*.c - -compress.obj: compress.c zlib.h zconf.h - $(CC) $(CFLAGS) $*.c - -crc32.obj: crc32.c zutil.h zlib.h zconf.h - $(CC) $(CFLAGS) $*.c - -deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h - $(CC) $(CFLAGS) $*.c - -gzio.obj: gzio.c zutil.h zlib.h zconf.h - $(CC) $(CFLAGS) $*.c - -infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h & - infcodes.h infutil.h - $(CC) $(CFLAGS) $*.c - -infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h & - infcodes.h inffast.h - $(CC) $(CFLAGS) $*.c - -inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h - $(CC) $(CFLAGS) $*.c - -inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h - $(CC) $(CFLAGS) $*.c - -infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h - $(CC) $(CFLAGS) $*.c - -inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h - $(CC) $(CFLAGS) $*.c - -trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h - $(CC) $(CFLAGS) $*.c - -uncompr.obj: uncompr.c zlib.h zconf.h - $(CC) $(CFLAGS) $*.c - -zutil.obj: zutil.c zutil.h zlib.h zconf.h - $(CC) $(CFLAGS) $*.c - -example.obj: example.c zlib.h zconf.h - $(CC) $(CFLAGS) $*.c - -minigzip.obj: minigzip.c zlib.h zconf.h - $(CC) $(CFLAGS) $*.c - -# we must cut the command line to fit in the MS/DOS 128 byte limit: -$(LIBTARGET): $(OBJ1) $(OBJ2) $(OBJ3) - del $(LIBTARGET) - $(LIB) $(LIBTARGET) +$(OBJP1) - $(LIB) $(LIBTARGET) +$(OBJP2) - $(LIB) $(LIBTARGET) +$(OBJP3) - -example.exe: example.obj $(LIBTARGET) - $(LD) $(LDFLAGS) example.obj $(LIBTARGET) - -minigzip.exe: minigzip.obj $(LIBTARGET) - $(LD) $(LDFLAGS) minigzip.obj $(LIBTARGET) - -test: minigzip.exe example.exe - example - echo hello world | minigzip | minigzip -d >test - type test - -clean: - -erase *.obj - -erase *.exe - -erase $(LIBTARGET) diff --git a/src/zlib/maketree.c b/src/zlib/maketree.c deleted file mode 100644 index 66dd828318..0000000000 --- a/src/zlib/maketree.c +++ /dev/null @@ -1,119 +0,0 @@ -/* maketree.c -- make inffixed.h table for decoding fixed codes - * Copyright (C) 1998 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* This program is included in the distribution for completeness. - You do not need to compile or run this program since inffixed.h - is already included in the distribution. To use this program - you need to compile zlib with BUILDFIXED defined and then compile - and link this program with the zlib library. Then the output of - this program can be piped to inffixed.h. */ - -#include -#include -#include "zutil.h" -#include "inftrees.h" - -/* simplify the use of the inflate_huft type with some defines */ -#define exop word.what.Exop -#define bits word.what.Bits - -/* showtree is only used for debugging purposes */ -void showtree(uInt b, inflate_huft *t, int d) -{ - int i, e; - char p[2*d+1]; - - for (i = 0; i < 2*d; i++) - p[i] = ' '; - p[i] = 0; - printf("%s[%d]\n", p, 1< -#include "../zlib/zlib.h" - -#ifdef STDC -# include -# include -#else - extern void exit OF((int)); -#endif - -#ifdef USE_MMAP -# include -# include -# include -#endif - -#if defined(MSDOS) || defined(OS2) || defined(WIN32) -# include -# include -# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) -#else -# define SET_BINARY_MODE(file) -#endif - -#ifdef VMS -# define unlink delete -# define GZ_SUFFIX "-gz" -#endif -#ifdef RISCOS -# define unlink remove -# define GZ_SUFFIX "-gz" -# define fileno(file) file->__file -#endif - -#ifndef WIN32 /* unlink already in stdio.h for WIN32 */ - extern int unlink OF((const char *)); -#endif - -#ifndef GZ_SUFFIX -# define GZ_SUFFIX ".gz" -#endif -#define SUFFIX_LEN (sizeof(GZ_SUFFIX)-1) - -#define BUFLEN 16384 -#define MAX_NAME_LEN 1024 - -#ifdef MAXSEG_64K -# define local static - /* Needed for systems with limitation on stack size. */ -#else -# define local -#endif - -char *prog; - -void error OF((const char *msg)); -void gz_compress OF((FILE *in, gzFile out)); -#ifdef USE_MMAP -int gz_compress_mmap OF((FILE *in, gzFile out)); -#endif -void gz_uncompress OF((gzFile in, FILE *out)); -void file_compress OF((char *file, char *mode)); -void file_uncompress OF((char *file)); -int main OF((int argc, char *argv[])); - -/* =========================================================================== - * Display error message and exit - */ -void error(msg) - const char *msg; -{ - fprintf(stderr, "%s: %s\n", prog, msg); - exit(1); -} - -/* =========================================================================== - * Compress input to output then close both files. - */ - -void gz_compress(in, out) - FILE *in; - gzFile out; -{ - local char buf[BUFLEN]; - int len; - int err; - -#ifdef USE_MMAP - /* Try first compressing with mmap. If mmap fails (minigzip used in a - * pipe), use the normal fread loop. - */ - if (gz_compress_mmap(in, out) == Z_OK) return; -#endif - for (;;) { - len = fread(buf, 1, sizeof(buf), in); - if (ferror(in)) { - perror("fread"); - exit(1); - } - if (len == 0) break; - - if (gzwrite(out, buf, (unsigned)len) != len) error(gzerror(out, &err)); - } - fclose(in); - if (gzclose(out) != Z_OK) error("failed gzclose"); -} - -#ifdef USE_MMAP /* MMAP version, Miguel Albrecht */ - -/* Try compressing the input file at once using mmap. Return Z_OK if - * if success, Z_ERRNO otherwise. - */ -int gz_compress_mmap(in, out) - FILE *in; - gzFile out; -{ - int len; - int err; - int ifd = fileno(in); - caddr_t buf; /* mmap'ed buffer for the entire input file */ - off_t buf_len; /* length of the input file */ - struct stat sb; - - /* Determine the size of the file, needed for mmap: */ - if (fstat(ifd, &sb) < 0) return Z_ERRNO; - buf_len = sb.st_size; - if (buf_len <= 0) return Z_ERRNO; - - /* Now do the actual mmap: */ - buf = mmap((caddr_t) 0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0); - if (buf == (caddr_t)(-1)) return Z_ERRNO; - - /* Compress the whole file at once: */ - len = gzwrite(out, (char *)buf, (unsigned)buf_len); - - if (len != (int)buf_len) error(gzerror(out, &err)); - - munmap(buf, buf_len); - fclose(in); - if (gzclose(out) != Z_OK) error("failed gzclose"); - return Z_OK; -} -#endif /* USE_MMAP */ - -/* =========================================================================== - * Uncompress input to output then close both files. - */ -void gz_uncompress(in, out) - gzFile in; - FILE *out; -{ - local char buf[BUFLEN]; - int len; - int err; - - for (;;) { - len = gzread(in, buf, sizeof(buf)); - if (len < 0) error (gzerror(in, &err)); - if (len == 0) break; - - if ((int)fwrite(buf, 1, (unsigned)len, out) != len) { - error("failed fwrite"); - } - } - if (fclose(out)) error("failed fclose"); - - if (gzclose(in) != Z_OK) error("failed gzclose"); -} - - -/* =========================================================================== - * Compress the given file: create a corresponding .gz file and remove the - * original. - */ -void file_compress(file, mode) - char *file; - char *mode; -{ - local char outfile[MAX_NAME_LEN]; - FILE *in; - gzFile out; - - strcpy(outfile, file); - strcat(outfile, GZ_SUFFIX); - - in = fopen(file, "rb"); - if (in == NULL) { - perror(file); - exit(1); - } - out = gzopen(outfile, mode); - if (out == NULL) { - fprintf(stderr, "%s: can't gzopen %s\n", prog, outfile); - exit(1); - } - gz_compress(in, out); - - unlink(file); -} - - -/* =========================================================================== - * Uncompress the given file and remove the original. - */ -void file_uncompress(file) - char *file; -{ - local char buf[MAX_NAME_LEN]; - char *infile, *outfile; - FILE *out; - gzFile in; - int len = strlen(file); - - strcpy(buf, file); - - if (len > SUFFIX_LEN && strcmp(file+len-SUFFIX_LEN, GZ_SUFFIX) == 0) { - infile = file; - outfile = buf; - outfile[len-3] = '\0'; - } else { - outfile = file; - infile = buf; - strcat(infile, GZ_SUFFIX); - } - in = gzopen(infile, "rb"); - if (in == NULL) { - fprintf(stderr, "%s: can't gzopen %s\n", prog, infile); - exit(1); - } - out = fopen(outfile, "wb"); - if (out == NULL) { - perror(file); - exit(1); - } - - gz_uncompress(in, out); - - unlink(infile); -} - - -/* =========================================================================== - * Usage: minigzip [-d] [-f] [-h] [-1 to -9] [files...] - * -d : decompress - * -f : compress with Z_FILTERED - * -h : compress with Z_HUFFMAN_ONLY - * -1 to -9 : compression level - */ - -int main(argc, argv) - int argc; - char *argv[]; -{ - int uncompr = 0; - gzFile file; - char outmode[20]; - - strcpy(outmode, "wb6 "); - - prog = argv[0]; - argc--, argv++; - - while (argc > 0) { - if (strcmp(*argv, "-d") == 0) - uncompr = 1; - else if (strcmp(*argv, "-f") == 0) - outmode[3] = 'f'; - else if (strcmp(*argv, "-h") == 0) - outmode[3] = 'h'; - else if ((*argv)[0] == '-' && (*argv)[1] >= '1' && (*argv)[1] <= '9' && - (*argv)[2] == 0) - outmode[2] = (*argv)[1]; - else - break; - argc--, argv++; - } - if (argc == 0) { - SET_BINARY_MODE(stdin); - SET_BINARY_MODE(stdout); - if (uncompr) { - file = gzdopen(fileno(stdin), "rb"); - if (file == NULL) error("can't gzdopen stdin"); - gz_uncompress(file, stdout); - } else { - file = gzdopen(fileno(stdout), outmode); - if (file == NULL) error("can't gzdopen stdout"); - gz_compress(stdin, file); - } - } else { - do { - if (uncompr) { - file_uncompress(*argv); - } else { - file_compress(*argv, outmode); - } - } while (argv++, --argc); - } - exit(0); - return 0; /* to avoid warning */ -} diff --git a/src/zlib/trees.c b/src/zlib/trees.c deleted file mode 100644 index 24c68cb580..0000000000 --- a/src/zlib/trees.c +++ /dev/null @@ -1,1216 +0,0 @@ -/* trees.c -- output deflated data using Huffman coding - * Copyright (C) 1995-1998 Jean-loup Gailly - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* - * ALGORITHM - * - * The "deflation" process uses several Huffman trees. The more - * common source values are represented by shorter bit sequences. - * - * Each code tree is stored in a compressed form which is itself - * a Huffman encoding of the lengths of all the code strings (in - * ascending order by source values). The actual code strings are - * reconstructed from the lengths in the inflate process, as described - * in the deflate specification. - * - * REFERENCES - * - * Deutsch, L.P.,"'Deflate' Compressed Data Format Specification". - * Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc - * - * Storer, James A. - * Data Compression: Methods and Theory, pp. 49-50. - * Computer Science Press, 1988. ISBN 0-7167-8156-5. - * - * Sedgewick, R. - * Algorithms, p290. - * Addison-Wesley, 1983. ISBN 0-201-06672-6. - */ - -/* @(#) $Id$ */ - -/* #define GEN_TREES_H */ - -#include "deflate.h" - -#ifdef __WXDEBUG__ -# include -#endif - -/* =========================================================================== - * Constants - */ - -#define MAX_BL_BITS 7 -/* Bit length codes must not exceed MAX_BL_BITS bits */ - -#define END_BLOCK 256 -/* end of block literal code */ - -#define REP_3_6 16 -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ - -#define REPZ_3_10 17 -/* repeat a zero length 3-10 times (3 bits of repeat count) */ - -#define REPZ_11_138 18 -/* repeat a zero length 11-138 times (7 bits of repeat count) */ - -local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */ - = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0}; - -local const int extra_dbits[D_CODES] /* extra bits for each distance code */ - = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; - -local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */ - = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7}; - -local const uch bl_order[BL_CODES] - = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15}; -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ - -#define Buf_size (8 * 2*sizeof(char)) -/* Number of bits used within bi_buf. (bi_buf might be implemented on - * more than 16 bits on some systems.) - */ - -/* =========================================================================== - * Local data. These are initialized only once. - */ - -#define DIST_CODE_LEN 512 /* see definition of array dist_code below */ - -#if defined(GEN_TREES_H) || !defined(STDC) -/* non ANSI compilers may not accept trees.h */ - -local ct_data static_ltree[L_CODES+2]; -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -local ct_data static_dtree[D_CODES]; -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -uch _dist_code[DIST_CODE_LEN]; -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -uch _length_code[MAX_MATCH-MIN_MATCH+1]; -/* length code for each normalized match length (0 == MIN_MATCH) */ - -local int base_length[LENGTH_CODES]; -/* First normalized length for each code (0 = MIN_MATCH) */ - -local int base_dist[D_CODES]; -/* First normalized distance for each code (0 = distance of 1) */ - -#else -# include "trees.h" -#endif /* GEN_TREES_H */ - -struct static_tree_desc_s { - const ct_data *static_tree; /* static tree or NULL */ - const intf *extra_bits; /* extra bits for each code or NULL */ - int extra_base; /* base index for extra_bits */ - int elems; /* max number of elements in the tree */ - int max_length; /* max bit length for the codes */ -}; - -local static_tree_desc static_l_desc = -{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS}; - -local static_tree_desc static_d_desc = -{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS}; - -local static_tree_desc static_bl_desc = -{(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS}; - -/* =========================================================================== - * Local (static) routines in this file. - */ - -local void tr_static_init OF((void)); -local void init_block OF((deflate_state *s)); -local void pqdownheap OF((deflate_state *s, ct_data *tree, int k)); -local void gen_bitlen OF((deflate_state *s, tree_desc *desc)); -local void gen_codes OF((ct_data *tree, int max_code, ushf *bl_count)); -local void build_tree OF((deflate_state *s, tree_desc *desc)); -local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code)); -local void send_tree OF((deflate_state *s, ct_data *tree, int max_code)); -local int build_bl_tree OF((deflate_state *s)); -local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes, - int blcodes)); -local void compress_block OF((deflate_state *s, ct_data *ltree, - ct_data *dtree)); -local void set_data_type OF((deflate_state *s)); -local unsigned bi_reverse OF((unsigned value, int length)); -local void bi_windup OF((deflate_state *s)); -local void bi_flush OF((deflate_state *s)); -local void copy_block OF((deflate_state *s, charf *buf, unsigned len, - int header)); - -#ifdef GEN_TREES_H -local void gen_trees_header OF((void)); -#endif - -#ifndef __WXDEBUG__ -# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len) - /* Send a code of the given tree. c and tree must not have side effects */ - -#else /* __WXDEBUG__ */ -# define send_code(s, c, tree) \ - { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \ - send_bits(s, tree[c].Code, tree[c].Len); } -#endif - -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -#define put_short(s, w) { \ - put_byte(s, (uch)((w) & 0xff)); \ - put_byte(s, (uch)((ush)(w) >> 8)); \ -} - -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -#ifdef __WXDEBUG__ -local void send_bits OF((deflate_state *s, int value, int length)); - -local void send_bits(s, value, length) - deflate_state *s; - int value; /* value to send */ - int length; /* number of bits */ -{ - Tracevv((stderr," l %2d v %4x ", length, value)); - Assert(length > 0 && length <= 15, "invalid length"); - s->bits_sent += (ulg)length; - - /* If not enough room in bi_buf, use (valid) bits from bi_buf and - * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid)) - * unused bits in value. - */ - if (s->bi_valid > (int)Buf_size - length) { - s->bi_buf |= (value << s->bi_valid); - put_short(s, s->bi_buf); - s->bi_buf = (ush)value >> (Buf_size - s->bi_valid); - s->bi_valid += length - Buf_size; - } else { - s->bi_buf |= value << s->bi_valid; - s->bi_valid += length; - } -} -#else /* !__WXDEBUG__ */ - -#define send_bits(s, value, length) \ -{ int len = length;\ - if (s->bi_valid > (int)Buf_size - len) {\ - int val = value;\ - s->bi_buf |= (val << s->bi_valid);\ - put_short(s, s->bi_buf);\ - s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\ - s->bi_valid += len - Buf_size;\ - } else {\ - s->bi_buf |= (value) << s->bi_valid;\ - s->bi_valid += len;\ - }\ -} -#endif /* __WXDEBUG__ */ - - -#define MAX(a,b) (a >= b ? a : b) -/* the arguments must not have side effects */ - -/* =========================================================================== - * Initialize the various 'constant' tables. - */ -local void tr_static_init() -{ -#if defined(GEN_TREES_H) || !defined(STDC) - static int static_init_done = 0; - int n; /* iterates over tree elements */ - int bits; /* bit counter */ - int length; /* length value */ - int code; /* code value */ - int dist; /* distance index */ - ush bl_count[MAX_BITS+1]; - /* number of codes at each bit length for an optimal tree */ - - if (static_init_done) return; - - /* Initialize the mapping length (0..255) -> length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES-1; code++) { - base_length[code] = length; - for (n = 0; n < (1< dist code (0..29) */ - dist = 0; - for (code = 0 ; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1<>= 7; /* from now on, all distances are divided by 128 */ - for ( ; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) { - _dist_code[256 + dist++] = (uch)code; - } - } - Assert (dist == 256, "tr_static_init: 256+dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0; - n = 0; - while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++; - while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++; - while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++; - while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++; - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n].Len = 5; - static_dtree[n].Code = bi_reverse((unsigned)n, 5); - } - static_init_done = 1; - -# ifdef GEN_TREES_H - gen_trees_header(); -# endif -#endif /* defined(GEN_TREES_H) || !defined(STDC) */ -} - -/* =========================================================================== - * Genererate the file trees.h describing the static trees. - */ -#ifdef GEN_TREES_H -# ifndef __WXDEBUG__ -# include -# endif - -# define SEPARATOR(i, last, width) \ - ((i) == (last)? "\n};\n\n" : \ - ((i) % (width) == (width)-1 ? ",\n" : ", ")) - -void gen_trees_header() -{ - FILE *header = fopen("trees.h", "w"); - int i; - - Assert (header != NULL, "Can't open trees.h"); - fprintf(header, - "/* header created automatically with -DGEN_TREES_H */\n\n"); - - fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n"); - for (i = 0; i < L_CODES+2; i++) { - fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code, - static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5)); - } - - fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n"); - for (i = 0; i < D_CODES; i++) { - fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code, - static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5)); - } - - fprintf(header, "const uch _dist_code[DIST_CODE_LEN] = {\n"); - for (i = 0; i < DIST_CODE_LEN; i++) { - fprintf(header, "%2u%s", _dist_code[i], - SEPARATOR(i, DIST_CODE_LEN-1, 20)); - } - - fprintf(header, "const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\n"); - for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) { - fprintf(header, "%2u%s", _length_code[i], - SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20)); - } - - fprintf(header, "local const int base_length[LENGTH_CODES] = {\n"); - for (i = 0; i < LENGTH_CODES; i++) { - fprintf(header, "%1u%s", base_length[i], - SEPARATOR(i, LENGTH_CODES-1, 20)); - } - - fprintf(header, "local const int base_dist[D_CODES] = {\n"); - for (i = 0; i < D_CODES; i++) { - fprintf(header, "%5u%s", base_dist[i], - SEPARATOR(i, D_CODES-1, 10)); - } - - fclose(header); -} -#endif /* GEN_TREES_H */ - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -void _tr_init(s) - deflate_state *s; -{ - tr_static_init(); - - s->compressed_len = 0L; - - s->l_desc.dyn_tree = s->dyn_ltree; - s->l_desc.stat_desc = &static_l_desc; - - s->d_desc.dyn_tree = s->dyn_dtree; - s->d_desc.stat_desc = &static_d_desc; - - s->bl_desc.dyn_tree = s->bl_tree; - s->bl_desc.stat_desc = &static_bl_desc; - - s->bi_buf = 0; - s->bi_valid = 0; - s->last_eob_len = 8; /* enough lookahead for inflate */ -#ifdef __WXDEBUG__ - s->bits_sent = 0L; -#endif - - /* Initialize the first block of the first file: */ - init_block(s); -} - -/* =========================================================================== - * Initialize a new block. - */ -local void init_block(s) - deflate_state *s; -{ - int n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0; - for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0; - for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0; - - s->dyn_ltree[END_BLOCK].Freq = 1; - s->opt_len = s->static_len = 0L; - s->last_lit = s->matches = 0; -} - -#define SMALLEST 1 -/* Index within the heap array of least frequent node in the Huffman tree */ - - -/* =========================================================================== - * Remove the smallest element from the heap and recreate the heap with - * one less element. Updates heap and heap_len. - */ -#define pqremove(s, tree, top) \ -{\ - top = s->heap[SMALLEST]; \ - s->heap[SMALLEST] = s->heap[s->heap_len--]; \ - pqdownheap(s, tree, SMALLEST); \ -} - -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -#define smaller(tree, n, m, depth) \ - (tree[n].Freq < tree[m].Freq || \ - (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m])) - -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -local void pqdownheap(s, tree, k) - deflate_state *s; - ct_data *tree; /* the tree to restore */ - int k; /* node to move down */ -{ - int v = s->heap[k]; - int j = k << 1; /* left son of k */ - while (j <= s->heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s->heap_len && - smaller(tree, s->heap[j+1], s->heap[j], s->depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s->heap[j], s->depth)) break; - - /* Exchange v with the smallest son */ - s->heap[k] = s->heap[j]; k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s->heap[k] = v; -} - -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ -local void gen_bitlen(s, desc) - deflate_state *s; - tree_desc *desc; /* the tree descriptor */ -{ - ct_data *tree = desc->dyn_tree; - int max_code = desc->max_code; - const ct_data *stree = desc->stat_desc->static_tree; - const intf *extra = desc->stat_desc->extra_bits; - int base = desc->stat_desc->extra_base; - int max_length = desc->stat_desc->max_length; - int h; /* heap index */ - int n, m; /* iterate over the tree elements */ - int bits; /* bit length */ - int xbits; /* extra bits */ - ush f; /* frequency */ - int overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0; - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */ - - for (h = s->heap_max+1; h < HEAP_SIZE; h++) { - n = s->heap[h]; - bits = tree[tree[n].Dad].Len + 1; - if (bits > max_length) bits = max_length, overflow++; - tree[n].Len = (ush)bits; - /* We overwrite tree[n].Dad which is no longer needed */ - - if (n > max_code) continue; /* not a leaf node */ - - s->bl_count[bits]++; - xbits = 0; - if (n >= base) xbits = extra[n-base]; - f = tree[n].Freq; - s->opt_len += (ulg)f * (bits + xbits); - if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits); - } - if (overflow == 0) return; - - Trace((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length-1; - while (s->bl_count[bits] == 0) bits--; - s->bl_count[bits]--; /* move one leaf down the tree */ - s->bl_count[bits+1] += 2; /* move one overflow item as its brother */ - s->bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits != 0; bits--) { - n = s->bl_count[bits]; - while (n != 0) { - m = s->heap[--h]; - if (m > max_code) continue; - if (tree[m].Len != (unsigned) bits) { - Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s->opt_len += ((long)bits - (long)tree[m].Len) - *(long)tree[m].Freq; - tree[m].Len = (ush)bits; - } - n--; - } - } -} - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -local void gen_codes (tree, max_code, bl_count) - ct_data *tree; /* the tree to decorate */ - int max_code; /* largest code with non zero frequency */ - ushf *bl_count; /* number of codes at each bit length */ -{ - ush next_code[MAX_BITS+1]; /* next code value for each bit length */ - ush code = 0; /* running code value */ - int bits; /* bit index */ - int n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = (code + bl_count[bits-1]) << 1; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - Assert (code + bl_count[MAX_BITS]-1 == (1<dyn_tree; - const ct_data *stree = desc->stat_desc->static_tree; - int elems = desc->stat_desc->elems; - int n, m; /* iterate over heap elements */ - int max_code = -1; /* largest code with non zero frequency */ - int node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - s->heap_len = 0, s->heap_max = HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n].Freq != 0) { - s->heap[++(s->heap_len)] = max_code = n; - s->depth[n] = 0; - } else { - tree[n].Len = 0; - } - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s->heap_len < 2) { - node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0); - tree[node].Freq = 1; - s->depth[node] = 0; - s->opt_len--; if (stree) s->static_len -= stree[node].Len; - /* node is 0 or 1 so it does not have extra bits */ - } - desc->max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n); - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - pqremove(s, tree, n); /* n = node of least frequency */ - m = s->heap[SMALLEST]; /* m = node of next least frequency */ - - s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */ - s->heap[--(s->heap_max)] = m; - - /* Create a new node father of n and m */ - tree[node].Freq = tree[n].Freq + tree[m].Freq; - s->depth[node] = (uch) (MAX(s->depth[n], s->depth[m]) + 1); - tree[n].Dad = tree[m].Dad = (ush)node; -#ifdef DUMP_BL_TREE - if (tree == s->bl_tree) { - fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)", - node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq); - } -#endif - /* and insert the new node in the heap */ - s->heap[SMALLEST] = node++; - pqdownheap(s, tree, SMALLEST); - - } while (s->heap_len >= 2); - - s->heap[--(s->heap_max)] = s->heap[SMALLEST]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, (tree_desc *)desc); - - /* The field len is now set, we can generate the bit codes */ - gen_codes ((ct_data *)tree, max_code, s->bl_count); -} - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. - */ -local void scan_tree (s, tree, max_code) - deflate_state *s; - ct_data *tree; /* the tree to be scanned */ - int max_code; /* and its largest code of non zero frequency */ -{ - int n; /* iterates over all tree elements */ - int prevlen = -1; /* last emitted length */ - int curlen; /* length of current code */ - int nextlen = tree[0].Len; /* length of next code */ - int count = 0; /* repeat count of the current code */ - int max_count = 7; /* max repeat count */ - int min_count = 4; /* min repeat count */ - - if (nextlen == 0) max_count = 138, min_count = 3; - tree[max_code+1].Len = (ush)0xffff; /* guard */ - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; nextlen = tree[n+1].Len; - if (++count < max_count && curlen == nextlen) { - continue; - } else if (count < min_count) { - s->bl_tree[curlen].Freq += count; - } else if (curlen != 0) { - if (curlen != prevlen) s->bl_tree[curlen].Freq++; - s->bl_tree[REP_3_6].Freq++; - } else if (count <= 10) { - s->bl_tree[REPZ_3_10].Freq++; - } else { - s->bl_tree[REPZ_11_138].Freq++; - } - count = 0; prevlen = curlen; - if (nextlen == 0) { - max_count = 138, min_count = 3; - } else if (curlen == nextlen) { - max_count = 6, min_count = 3; - } else { - max_count = 7, min_count = 4; - } - } -} - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ -local void send_tree (s, tree, max_code) - deflate_state *s; - ct_data *tree; /* the tree to be scanned */ - int max_code; /* and its largest code of non zero frequency */ -{ - int n; /* iterates over all tree elements */ - int prevlen = -1; /* last emitted length */ - int curlen; /* length of current code */ - int nextlen = tree[0].Len; /* length of next code */ - int count = 0; /* repeat count of the current code */ - int max_count = 7; /* max repeat count */ - int min_count = 4; /* min repeat count */ - - /* tree[max_code+1].Len = -1; */ /* guard already set */ - if (nextlen == 0) max_count = 138, min_count = 3; - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; nextlen = tree[n+1].Len; - if (++count < max_count && curlen == nextlen) { - continue; - } else if (count < min_count) { - do { send_code(s, curlen, s->bl_tree); } while (--count != 0); - - } else if (curlen != 0) { - if (curlen != prevlen) { - send_code(s, curlen, s->bl_tree); count--; - } - Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2); - - } else if (count <= 10) { - send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3); - - } else { - send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7); - } - count = 0; prevlen = curlen; - if (nextlen == 0) { - max_count = 138, min_count = 3; - } else if (curlen == nextlen) { - max_count = 6, min_count = 3; - } else { - max_count = 7, min_count = 4; - } - } -} - -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -local int build_bl_tree(s) - deflate_state *s; -{ - int max_blindex; /* index of last bit length code of non zero freq */ - - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code); - scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code); - - /* Build the bit length tree: */ - build_tree(s, (tree_desc *)(&(s->bl_desc))); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { - if (s->bl_tree[bl_order[max_blindex]].Len != 0) break; - } - /* Update opt_len to include the bit length tree and counts */ - s->opt_len += 3*(max_blindex+1) + 5+5+4; - Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - s->opt_len, s->static_len)); - - return max_blindex; -} - -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -local void send_all_trees(s, lcodes, dcodes, blcodes) - deflate_state *s; - int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - int rank; /* index in bl_order */ - - Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - "too many codes"); - Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes-1, 5); - send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s->bl_tree[bl_order[rank]].Len, 3); - } - Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); - - send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */ - Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); - - send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */ - Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} - -/* =========================================================================== - * Send a stored block - */ -void _tr_stored_block(s, buf, stored_len, eof) - deflate_state *s; - charf *buf; /* input block */ - ulg stored_len; /* length of input block */ - int eof; /* true if this is the last block for a file */ -{ - send_bits(s, (STORED_BLOCK<<1)+eof, 3); /* send block type */ - s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L; - s->compressed_len += (stored_len + 4) << 3; - - copy_block(s, buf, (unsigned)stored_len, 1); /* with header */ -} - -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - * The current inflate code requires 9 bits of lookahead. If the - * last two codes for the previous block (real code plus EOB) were coded - * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode - * the last real code. In this case we send two empty static blocks instead - * of one. (There are no problems if the previous block is stored or fixed.) - * To simplify the code, we assume the worst case of last real code encoded - * on one bit only. - */ -void _tr_align(s) - deflate_state *s; -{ - send_bits(s, STATIC_TREES<<1, 3); - send_code(s, END_BLOCK, static_ltree); - s->compressed_len += 10L; /* 3 for block type, 7 for EOB */ - bi_flush(s); - /* Of the 10 bits for the empty block, we have already sent - * (10 - bi_valid) bits. The lookahead for the last real code (before - * the EOB of the previous block) was thus at least one plus the length - * of the EOB plus what we have just sent of the empty static block. - */ - if (1 + s->last_eob_len + 10 - s->bi_valid < 9) { - send_bits(s, STATIC_TREES<<1, 3); - send_code(s, END_BLOCK, static_ltree); - s->compressed_len += 10L; - bi_flush(s); - } - s->last_eob_len = 7; -} - -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. This function - * returns the total compressed length for the file so far. - */ -ulg _tr_flush_block(s, buf, stored_len, eof) - deflate_state *s; - charf *buf; /* input block, or NULL if too old */ - ulg stored_len; /* length of input block */ - int eof; /* true if this is the last block for a file */ -{ - ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - int max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s->level > 0) { - - /* Check if the file is ascii or binary */ - if (s->data_type == Z_UNKNOWN) set_data_type(s); - - /* Construct the literal and distance trees */ - build_tree(s, (tree_desc *)(&(s->l_desc))); - Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - s->static_len)); - - build_tree(s, (tree_desc *)(&(s->d_desc))); - Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); - - /* Determine the best encoding. Compute first the block length in bytes*/ - opt_lenb = (s->opt_len+3+7)>>3; - static_lenb = (s->static_len+3+7)>>3; - - Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - s->last_lit)); - - if (static_lenb <= opt_lenb) opt_lenb = static_lenb; - - } else { - Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } - - /* If compression failed and this is the first and last block, - * and if the .zip file can be seeked (to rewrite the local header), - * the whole file is transformed into a stored file: - */ -#ifdef STORED_FILE_OK -# ifdef FORCE_STORED_FILE - if (eof && s->compressed_len == 0L) { /* force stored file */ -# else - if (stored_len <= opt_lenb && eof && s->compressed_len==0L && seekable()) { -# endif - /* Since LIT_BUFSIZE <= 2*WSIZE, the input data must be there: */ - if (buf == (charf*)0) error ("block vanished"); - - copy_block(buf, (unsigned)stored_len, 0); /* without header */ - s->compressed_len = stored_len << 3; - s->method = STORED; - } else -#endif /* STORED_FILE_OK */ - -#ifdef FORCE_STORED - if (buf != (char*)0) { /* force stored block */ -#else - if (stored_len+4 <= opt_lenb && buf != (char*)0) { - /* 4: two words for the lengths */ -#endif - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, eof); - -#ifdef FORCE_STATIC - } else if (static_lenb >= 0) { /* force static trees */ -#else - } else if (static_lenb == opt_lenb) { -#endif - send_bits(s, (STATIC_TREES<<1)+eof, 3); - compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree); - s->compressed_len += 3 + s->static_len; - } else { - send_bits(s, (DYN_TREES<<1)+eof, 3); - send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1, - max_blindex+1); - compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree); - s->compressed_len += 3 + s->opt_len; - } - Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - init_block(s); - - if (eof) { - bi_windup(s); - s->compressed_len += 7; /* align on byte boundary */ - } - Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - s->compressed_len-7*eof)); - - return s->compressed_len >> 3; -} - -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -int _tr_tally (s, dist, lc) - deflate_state *s; - unsigned dist; /* distance of matched string */ - unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - s->d_buf[s->last_lit] = (ush)dist; - s->l_buf[s->last_lit++] = (uch)lc; - if (dist == 0) { - /* lc is the unmatched char */ - s->dyn_ltree[lc].Freq++; - } else { - s->matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - Assert((ush)dist < (ush)MAX_DIST(s) && - (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++; - s->dyn_dtree[d_code(dist)].Freq++; - } - -#ifdef TRUNCATE_BLOCK - /* Try to guess if it is profitable to stop the current block here */ - if ((s->last_lit & 0x1fff) == 0 && s->level > 2) { - /* Compute an upper bound for the compressed length */ - ulg out_length = (ulg)s->last_lit*8L; - ulg in_length = (ulg)((long)s->strstart - s->block_start); - int dcode; - for (dcode = 0; dcode < D_CODES; dcode++) { - out_length += (ulg)s->dyn_dtree[dcode].Freq * - (5L+extra_dbits[dcode]); - } - out_length >>= 3; - Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", - s->last_lit, in_length, out_length, - 100L - out_length*100L/in_length)); - if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1; - } -#endif - return (s->last_lit == s->lit_bufsize-1); - /* We avoid equality with lit_bufsize because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ -} - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -local void compress_block(s, ltree, dtree) - deflate_state *s; - ct_data *ltree; /* literal tree */ - ct_data *dtree; /* distance tree */ -{ - unsigned dist; /* distance of matched string */ - int lc; /* match length or unmatched char (if dist == 0) */ - unsigned lx = 0; /* running index in l_buf */ - unsigned code; /* the code to send */ - int extra; /* number of extra bits to send */ - - if (s->last_lit != 0) do { - dist = s->d_buf[lx]; - lc = s->l_buf[lx++]; - if (dist == 0) { - send_code(s, lc, ltree); /* send a literal byte */ - Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code+LITERALS+1, ltree); /* send the length code */ - extra = extra_lbits[code]; - if (extra != 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra != 0) { - dist -= base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ - Assert(s->pending < s->lit_bufsize + 2*lx, "pendingBuf overflow"); - - } while (lx < s->last_lit); - - send_code(s, END_BLOCK, ltree); - s->last_eob_len = ltree[END_BLOCK].Len; -} - -/* =========================================================================== - * Set the data type to ASCII or BINARY, using a crude approximation: - * binary if more than 20% of the bytes are <= 6 or >= 128, ascii otherwise. - * IN assertion: the fields freq of dyn_ltree are set and the total of all - * frequencies does not exceed 64K (to fit in an int on 16 bit machines). - */ -local void set_data_type(s) - deflate_state *s; -{ - int n = 0; - unsigned ascii_freq = 0; - unsigned bin_freq = 0; - while (n < 7) bin_freq += s->dyn_ltree[n++].Freq; - while (n < 128) ascii_freq += s->dyn_ltree[n++].Freq; - while (n < LITERALS) bin_freq += s->dyn_ltree[n++].Freq; - s->data_type = (Byte)(bin_freq > (ascii_freq >> 2) ? Z_BINARY : Z_ASCII); -} - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -local unsigned bi_reverse(code, len) - unsigned code; /* the value to invert */ - int len; /* its bit length */ -{ - register unsigned res = 0; - do { - res |= code & 1; - code >>= 1, res <<= 1; - } while (--len > 0); - return res >> 1; -} - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -local void bi_flush(s) - deflate_state *s; -{ - if (s->bi_valid == 16) { - put_short(s, s->bi_buf); - s->bi_buf = 0; - s->bi_valid = 0; - } else if (s->bi_valid >= 8) { - put_byte(s, (Byte)s->bi_buf); - s->bi_buf >>= 8; - s->bi_valid -= 8; - } -} - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -local void bi_windup(s) - deflate_state *s; -{ - if (s->bi_valid > 8) { - put_short(s, s->bi_buf); - } else if (s->bi_valid > 0) { - put_byte(s, (Byte)s->bi_buf); - } - s->bi_buf = 0; - s->bi_valid = 0; -#ifdef __WXDEBUG__ - s->bits_sent = (s->bits_sent+7) & ~7; -#endif -} - -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -local void copy_block(s, buf, len, header) - deflate_state *s; - charf *buf; /* the input data */ - unsigned len; /* its length */ - int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - s->last_eob_len = 8; /* enough lookahead for inflate */ - - if (header) { - put_short(s, (ush)len); - put_short(s, (ush)~len); -#ifdef __WXDEBUG__ - s->bits_sent += 2*16; -#endif - } -#ifdef __WXDEBUG__ - s->bits_sent += (ulg)len<<3; -#endif - while (len--) { - put_byte(s, *buf++); - } -} diff --git a/src/zlib/trees.h b/src/zlib/trees.h deleted file mode 100644 index 72facf900f..0000000000 --- a/src/zlib/trees.h +++ /dev/null @@ -1,128 +0,0 @@ -/* header created automatically with -DGEN_TREES_H */ - -local const ct_data static_ltree[L_CODES+2] = { -{{ 12},{ 8}}, {{140},{ 8}}, {{ 76},{ 8}}, {{204},{ 8}}, {{ 44},{ 8}}, -{{172},{ 8}}, {{108},{ 8}}, {{236},{ 8}}, {{ 28},{ 8}}, {{156},{ 8}}, -{{ 92},{ 8}}, {{220},{ 8}}, {{ 60},{ 8}}, {{188},{ 8}}, {{124},{ 8}}, -{{252},{ 8}}, {{ 2},{ 8}}, {{130},{ 8}}, {{ 66},{ 8}}, {{194},{ 8}}, -{{ 34},{ 8}}, {{162},{ 8}}, {{ 98},{ 8}}, {{226},{ 8}}, {{ 18},{ 8}}, -{{146},{ 8}}, {{ 82},{ 8}}, {{210},{ 8}}, {{ 50},{ 8}}, {{178},{ 8}}, -{{114},{ 8}}, {{242},{ 8}}, {{ 10},{ 8}}, {{138},{ 8}}, {{ 74},{ 8}}, -{{202},{ 8}}, {{ 42},{ 8}}, {{170},{ 8}}, {{106},{ 8}}, {{234},{ 8}}, -{{ 26},{ 8}}, {{154},{ 8}}, {{ 90},{ 8}}, {{218},{ 8}}, {{ 58},{ 8}}, -{{186},{ 8}}, {{122},{ 8}}, {{250},{ 8}}, {{ 6},{ 8}}, {{134},{ 8}}, -{{ 70},{ 8}}, {{198},{ 8}}, {{ 38},{ 8}}, {{166},{ 8}}, {{102},{ 8}}, -{{230},{ 8}}, {{ 22},{ 8}}, {{150},{ 8}}, {{ 86},{ 8}}, {{214},{ 8}}, -{{ 54},{ 8}}, {{182},{ 8}}, {{118},{ 8}}, {{246},{ 8}}, {{ 14},{ 8}}, -{{142},{ 8}}, {{ 78},{ 8}}, {{206},{ 8}}, {{ 46},{ 8}}, {{174},{ 8}}, -{{110},{ 8}}, {{238},{ 8}}, {{ 30},{ 8}}, {{158},{ 8}}, {{ 94},{ 8}}, -{{222},{ 8}}, {{ 62},{ 8}}, {{190},{ 8}}, {{126},{ 8}}, {{254},{ 8}}, -{{ 1},{ 8}}, {{129},{ 8}}, {{ 65},{ 8}}, {{193},{ 8}}, {{ 33},{ 8}}, -{{161},{ 8}}, {{ 97},{ 8}}, {{225},{ 8}}, {{ 17},{ 8}}, {{145},{ 8}}, -{{ 81},{ 8}}, {{209},{ 8}}, {{ 49},{ 8}}, {{177},{ 8}}, {{113},{ 8}}, -{{241},{ 8}}, {{ 9},{ 8}}, {{137},{ 8}}, {{ 73},{ 8}}, {{201},{ 8}}, -{{ 41},{ 8}}, {{169},{ 8}}, {{105},{ 8}}, {{233},{ 8}}, {{ 25},{ 8}}, -{{153},{ 8}}, {{ 89},{ 8}}, {{217},{ 8}}, {{ 57},{ 8}}, {{185},{ 8}}, -{{121},{ 8}}, {{249},{ 8}}, {{ 5},{ 8}}, {{133},{ 8}}, {{ 69},{ 8}}, -{{197},{ 8}}, {{ 37},{ 8}}, {{165},{ 8}}, {{101},{ 8}}, {{229},{ 8}}, -{{ 21},{ 8}}, {{149},{ 8}}, {{ 85},{ 8}}, {{213},{ 8}}, {{ 53},{ 8}}, -{{181},{ 8}}, {{117},{ 8}}, {{245},{ 8}}, {{ 13},{ 8}}, {{141},{ 8}}, -{{ 77},{ 8}}, {{205},{ 8}}, {{ 45},{ 8}}, {{173},{ 8}}, {{109},{ 8}}, -{{237},{ 8}}, {{ 29},{ 8}}, {{157},{ 8}}, {{ 93},{ 8}}, {{221},{ 8}}, -{{ 61},{ 8}}, {{189},{ 8}}, {{125},{ 8}}, {{253},{ 8}}, {{ 19},{ 9}}, -{{275},{ 9}}, {{147},{ 9}}, {{403},{ 9}}, {{ 83},{ 9}}, {{339},{ 9}}, -{{211},{ 9}}, {{467},{ 9}}, {{ 51},{ 9}}, {{307},{ 9}}, {{179},{ 9}}, -{{435},{ 9}}, {{115},{ 9}}, {{371},{ 9}}, {{243},{ 9}}, {{499},{ 9}}, -{{ 11},{ 9}}, {{267},{ 9}}, {{139},{ 9}}, {{395},{ 9}}, {{ 75},{ 9}}, -{{331},{ 9}}, {{203},{ 9}}, {{459},{ 9}}, {{ 43},{ 9}}, {{299},{ 9}}, -{{171},{ 9}}, {{427},{ 9}}, {{107},{ 9}}, {{363},{ 9}}, {{235},{ 9}}, -{{491},{ 9}}, {{ 27},{ 9}}, {{283},{ 9}}, {{155},{ 9}}, {{411},{ 9}}, -{{ 91},{ 9}}, {{347},{ 9}}, {{219},{ 9}}, {{475},{ 9}}, {{ 59},{ 9}}, -{{315},{ 9}}, {{187},{ 9}}, {{443},{ 9}}, {{123},{ 9}}, {{379},{ 9}}, -{{251},{ 9}}, {{507},{ 9}}, {{ 7},{ 9}}, {{263},{ 9}}, {{135},{ 9}}, -{{391},{ 9}}, {{ 71},{ 9}}, {{327},{ 9}}, {{199},{ 9}}, {{455},{ 9}}, -{{ 39},{ 9}}, {{295},{ 9}}, {{167},{ 9}}, {{423},{ 9}}, {{103},{ 9}}, -{{359},{ 9}}, {{231},{ 9}}, {{487},{ 9}}, {{ 23},{ 9}}, {{279},{ 9}}, -{{151},{ 9}}, {{407},{ 9}}, {{ 87},{ 9}}, {{343},{ 9}}, {{215},{ 9}}, -{{471},{ 9}}, {{ 55},{ 9}}, {{311},{ 9}}, {{183},{ 9}}, {{439},{ 9}}, -{{119},{ 9}}, {{375},{ 9}}, {{247},{ 9}}, {{503},{ 9}}, {{ 15},{ 9}}, -{{271},{ 9}}, {{143},{ 9}}, {{399},{ 9}}, {{ 79},{ 9}}, {{335},{ 9}}, -{{207},{ 9}}, {{463},{ 9}}, {{ 47},{ 9}}, {{303},{ 9}}, {{175},{ 9}}, -{{431},{ 9}}, {{111},{ 9}}, {{367},{ 9}}, {{239},{ 9}}, {{495},{ 9}}, -{{ 31},{ 9}}, {{287},{ 9}}, {{159},{ 9}}, {{415},{ 9}}, {{ 95},{ 9}}, -{{351},{ 9}}, {{223},{ 9}}, {{479},{ 9}}, {{ 63},{ 9}}, {{319},{ 9}}, -{{191},{ 9}}, {{447},{ 9}}, {{127},{ 9}}, {{383},{ 9}}, {{255},{ 9}}, -{{511},{ 9}}, {{ 0},{ 7}}, {{ 64},{ 7}}, {{ 32},{ 7}}, {{ 96},{ 7}}, -{{ 16},{ 7}}, {{ 80},{ 7}}, {{ 48},{ 7}}, {{112},{ 7}}, {{ 8},{ 7}}, -{{ 72},{ 7}}, {{ 40},{ 7}}, {{104},{ 7}}, {{ 24},{ 7}}, {{ 88},{ 7}}, -{{ 56},{ 7}}, {{120},{ 7}}, {{ 4},{ 7}}, {{ 68},{ 7}}, {{ 36},{ 7}}, -{{100},{ 7}}, {{ 20},{ 7}}, {{ 84},{ 7}}, {{ 52},{ 7}}, {{116},{ 7}}, -{{ 3},{ 8}}, {{131},{ 8}}, {{ 67},{ 8}}, {{195},{ 8}}, {{ 35},{ 8}}, -{{163},{ 8}}, {{ 99},{ 8}}, {{227},{ 8}} -}; - -local const ct_data static_dtree[D_CODES] = { -{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}}, -{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}}, -{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}}, -{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}}, -{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}}, -{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}} -}; - -const uch _dist_code[DIST_CODE_LEN] = { - 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, - 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, -10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, -11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, -12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, -13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, -13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, -15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, -15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, -15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 16, 17, -18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, -23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, -24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, -26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, -26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, -27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, -27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29 -}; - -const uch _length_code[MAX_MATCH-MIN_MATCH+1]= { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, -13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, -17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, -19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, -21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, -22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, -23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, -24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, -25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, -25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, -26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, -26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, -27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28 -}; - -local const int base_length[LENGTH_CODES] = { -0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, -64, 80, 96, 112, 128, 160, 192, 224, 0 -}; - -local const int base_dist[D_CODES] = { - 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, - 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, - 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576 -}; - diff --git a/src/zlib/uncompr.c b/src/zlib/uncompr.c deleted file mode 100644 index f4d287b518..0000000000 --- a/src/zlib/uncompr.c +++ /dev/null @@ -1,58 +0,0 @@ -/* uncompr.c -- decompress a memory buffer - * Copyright (C) 1995-1998 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#include "../zlib/zlib.h" - -/* =========================================================================== - Decompresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total - size of the destination buffer, which must be large enough to hold the - entire uncompressed data. (The size of the uncompressed data must have - been saved previously by the compressor and transmitted to the decompressor - by some mechanism outside the scope of this compression library.) - Upon exit, destLen is the actual size of the compressed buffer. - This function can be used to decompress a whole file at once if the - input file is mmap'ed. - - uncompress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer, or Z_DATA_ERROR if the input data was corrupted. -*/ -int ZEXPORT uncompress (dest, destLen, source, sourceLen) - Bytef *dest; - uLongf *destLen; - const Bytef *source; - uLong sourceLen; -{ - z_stream stream; - int err; - - stream.next_in = (Bytef*)source; - stream.avail_in = (uInt)sourceLen; - /* Check for source > 64K on 16-bit machine: */ - if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; - - stream.next_out = dest; - stream.avail_out = (uInt)*destLen; - if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; - - stream.zalloc = (alloc_func)0; - stream.zfree = (free_func)0; - - err = inflateInit(&stream); - if (err != Z_OK) return err; - - err = inflate(&stream, Z_FINISH); - if (err != Z_STREAM_END) { - inflateEnd(&stream); - return err == Z_OK ? Z_BUF_ERROR : err; - } - *destLen = stream.total_out; - - err = inflateEnd(&stream); - return err; -} diff --git a/src/zlib/zconf.h b/src/zlib/zconf.h deleted file mode 100644 index 89e1a16c0d..0000000000 --- a/src/zlib/zconf.h +++ /dev/null @@ -1,252 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-1998 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#ifndef _ZCONF_H -#define _ZCONF_H - -/* - * If you *really* need a unique prefix for all types and library functions, - * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. - */ -#ifdef Z_PREFIX -# define deflateInit_ z_deflateInit_ -# define deflate z_deflate -# define deflateEnd z_deflateEnd -# define inflateInit_ z_inflateInit_ -# define inflate z_inflate -# define inflateEnd z_inflateEnd -# define deflateInit2_ z_deflateInit2_ -# define deflateSetDictionary z_deflateSetDictionary -# define deflateCopy z_deflateCopy -# define deflateReset z_deflateReset -# define deflateParams z_deflateParams -# define inflateInit2_ z_inflateInit2_ -# define inflateSetDictionary z_inflateSetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateReset z_inflateReset -# define compress z_compress -# define compress2 z_compress2 -# define uncompress z_uncompress -# define adler32 z_adler32 -# define crc32 z_crc32 -# define get_crc_table z_get_crc_table - -# define Byte z_Byte -# define uInt z_uInt -# define uLong z_uLong -# define Bytef z_Bytef -# define charf z_charf -# define intf z_intf -# define uIntf z_uIntf -# define uLongf z_uLongf -# define voidpf z_voidpf -# define voidp z_voidp -#endif - -#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) -# define WIN32 -#endif -#if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386) -# ifndef __32BIT__ -# define __32BIT__ -# endif -#endif -#if defined(__MSDOS__) && !defined(MSDOS) -# define MSDOS -#endif - -/* - * Compile with -DMAXSEG_64K if the alloc function cannot allocate more - * than 64k bytes at a time (needed on systems with 16-bit int). - */ -#if defined(MSDOS) && !defined(__32BIT__) -# define MAXSEG_64K -#endif -#ifdef MSDOS -# define UNALIGNED_OK -#endif - -#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC) -# define STDC -#endif -#if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__) -# ifndef STDC -# define STDC -# endif -#endif - -#ifndef STDC -# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ -# define const -# endif -#endif - -/* Some Mac compilers merge all .h files incorrectly: */ -#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__) -# define NO_DUMMY_DECL -#endif - -/* Borland C incorrectly complains about missing returns: */ -#if defined(__BORLANDC__) -# define NEED_DUMMY_RETURN -#endif - - -/* Maximum value for memLevel in deflateInit2 */ -#ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif -#endif - -/* Maximum value for windowBits in deflateInit2 and inflateInit2. - * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files - * created by gzip. (Files created by minigzip can still be extracted by - * gzip.) - */ -#ifndef MAX_WBITS -# define MAX_WBITS 15 /* 32K LZ77 window */ -#endif - -/* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - plus a few kilobytes for small objects. For example, if you want to reduce - the default memory requirements from 256K to 128K, compile with - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - Of course this will generally degrade compression (there's no free lunch). - - The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus a few kilobytes - for small objects. -*/ - - /* Type declarations */ - -#ifndef OF /* function prototypes */ -# ifdef STDC -# define OF(args) args -# else -# define OF(args) () -# endif -#endif - -/* The following definitions for FAR are needed only for MSDOS mixed - * model programming (small or medium model with some far allocations). - * This was tested only with MSC; for other MSDOS compilers you may have - * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, - * just define FAR to be empty. - */ -#if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__) - /* MSC small or medium model */ -# define SMALL_MEDIUM -# ifdef _MSC_VER -# define FAR __far -# else -# define FAR far -# endif -#endif -#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__)) -# ifndef __32BIT__ -# define SMALL_MEDIUM -# define FAR __far -# endif -#endif - -/* Compile with -DZLIB_DLL for Windows DLL support */ -#if (defined(_WINDOWS) || defined(WINDOWS)) && defined(ZLIB_DLL) -# ifdef FAR -# undef FAR -# endif -# include -# define ZEXPORT WINAPI -# ifdef WIN32 -# define ZEXPORTVA WINAPIV -# else -# define ZEXPORTVA FAR _cdecl _export -# endif -#else -# if defined (__BORLANDC__) && defined (_Windows) && defined (__DLL__) -# define ZEXPORT _export -# define ZEXPORTVA _export -# else -# define ZEXPORT -# define ZEXPORTVA -# endif -#endif - -#ifndef FAR -# define FAR -#endif - -typedef unsigned char Byte; /* 8 bits */ -typedef unsigned int uInt; /* 16 bits or more */ -typedef unsigned long uLong; /* 32 bits or more */ - -#if defined(__BORLANDC__) && defined(SMALL_MEDIUM) - /* Borland C/C++ ignores FAR inside typedef */ -# define Bytef Byte FAR -#else - typedef Byte FAR Bytef; -#endif -typedef char FAR charf; -typedef int FAR intf; -typedef uInt FAR uIntf; -typedef uLong FAR uLongf; - -#ifdef STDC - typedef void FAR *voidpf; - typedef void *voidp; -#else - typedef Byte FAR *voidpf; - typedef Byte *voidp; -#endif - -#ifdef HAVE_UNISTD_H -# include /* for off_t */ -# include /* for SEEK_* and off_t */ -# define z_off_t off_t -#endif -#ifndef SEEK_SET -# define SEEK_SET 0 /* Seek from beginning of file. */ -# define SEEK_CUR 1 /* Seek from current position. */ -#endif -#ifndef z_off_t -# define z_off_t long -#endif - -/* MVS linker does not support external names larger than 8 bytes */ -#if defined(__MVS__) -# pragma map(deflateInit_,"DEIN") -# pragma map(deflateInit2_,"DEIN2") -# pragma map(deflateEnd,"DEEND") -# pragma map(inflateInit_,"ININ") -# pragma map(inflateInit2_,"ININ2") -# pragma map(inflateEnd,"INEND") -# pragma map(inflateSync,"INSY") -# pragma map(inflateSetDictionary,"INSEDI") -# pragma map(inflate_blocks,"INBL") -# pragma map(inflate_blocks_new,"INBLNE") -# pragma map(inflate_blocks_free,"INBLFR") -# pragma map(inflate_blocks_reset,"INBLRE") -# pragma map(inflate_codes_free,"INCOFR") -# pragma map(inflate_codes,"INCO") -# pragma map(inflate_fast,"INFA") -# pragma map(inflate_flush,"INFLU") -# pragma map(inflate_mask,"INMA") -# pragma map(inflate_set_dictionary,"INSEDI2") -# pragma map(inflate_copyright,"INCOPY") -# pragma map(inflate_trees_bits,"INTRBI") -# pragma map(inflate_trees_dynamic,"INTRDY") -# pragma map(inflate_trees_fixed,"INTRFI") -# pragma map(inflate_trees_free,"INTRFR") -#endif - -#endif /* _ZCONF_H */ diff --git a/src/zlib/zlib.3 b/src/zlib/zlib.3 deleted file mode 100644 index d08d0e0d59..0000000000 --- a/src/zlib/zlib.3 +++ /dev/null @@ -1,107 +0,0 @@ -.TH ZLIB 3 "19 March 1998" -.SH NAME -zlib \- compression/decompression library -.SH SYNOPSIS -[see -.I zlib.h -for full description] -.SH DESCRIPTION -The -.I zlib -library is a general purpose data compression library. -The code is thread safe. -It provides in-memory compression and decompression functions, -including integrity checks of the uncompressed data. -This version of the library supports only one compression method (deflation) -but other algorithms will be added later and will have the same stream interface. -.LP -Compression can be done in a single step if the buffers are large enough -(for example if an input file is mmap'ed), -or can be done by repeated calls of the compression function. -In the latter case, -the application must provide more input and/or consume the output -(providing more output space) before each call. -.LP -The library also supports reading and writing files in -.I gzip -(.gz) format -with an interface similar to that of stdio. -.LP -The library does not install any signal handler. The decoder checks -the consistency of the compressed data, so the library should never -crash even in case of corrupted input. -.LP -All functions of the compression library are documented in the file -.IR zlib.h. -The distribution source includes examples of use of the library -the files -.I example.c -and -.IR minigzip.c . -.LP -A Java implementation of -.IR zlib -is available in the Java Development Kit 1.1 -.IP -http://www.javasoft.com/products/JDK/1.1/docs/api/Package-java.util.zip.html -.LP -A Perl interface to -.IR zlib , -written by Paul Marquess (pmarquess@bfsec.bt.co.uk) -is available at CPAN (Comprehensive Perl Archive Network) sites, -such as: -.IP -ftp://ftp.cis.ufl.edu/pub/perl/CPAN/modules/by-module/Compress/Compress-Zlib* -.LP -A Python interface to -.IR zlib -written by A.M. Kuchling -is available from the Python Software Association sites, such as: -.IP -ftp://ftp.python.org/pub/python/contrib/Encoding/zlib*.tar.gz -.SH "SEE ALSO" -Questions about zlib should be sent to: -.IP -zlib@quest.jpl.nasa.gov -or, if this fails, to the author addresses given below. -The zlib home page is: -.IP -http://www.cdrom.com/pub/infozip/zlib/ -.LP -The data format used by the zlib library is described by RFC -(Request for Comments) 1950 to 1952 in the files: -.IP -ftp://ds.internic.net/rfc/rfc1950.txt (zlib format) -.br -rfc1951.txt (deflate format) -.br -rfc1952.txt (gzip format) -.LP -These documents are also available in other formats from: -.IP -ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html -.SH AUTHORS -Version 1.1.2 -Copyright (C) 1995-1998 Jean-loup Gailly (jloup@gzip.org) -and Mark Adler (madler@alumni.caltech.edu). -.LP -This software is provided "as-is," -without any express or implied warranty. -In no event will the authors be held liable for any damages -arising from the use of this software. -See the distribution directory with respect to requirements -governing redistribution. -The deflate format used by -.I zlib -was defined by Phil Katz. -The deflate and -.I zlib -specifications were written by L. Peter Deutsch. -Thanks to all the people who reported problems and suggested various -improvements in -.IR zlib ; -who are too numerous to cite here. -.LP -UNIX manual page by R. P. C. Rodgers, -U.S. National Library of Medicine (rodgers@nlm.nih.gov). -.\" end of man page diff --git a/src/zlib/zlib.h b/src/zlib/zlib.h deleted file mode 100644 index 76775e7922..0000000000 --- a/src/zlib/zlib.h +++ /dev/null @@ -1,888 +0,0 @@ -/* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.1.2, March 19th, 1998 - - Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - - - The data format used by the zlib library is described by RFCs (Request for - Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt - (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). -*/ - -#ifndef _ZLIB_H -#define _ZLIB_H - -#include "../zlib/zconf.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define ZLIB_VERSION "1.1.2" - -/* - The 'zlib' compression library provides in-memory compression and - decompression functions, including integrity checks of the uncompressed - data. This version of the library supports only one compression method - (deflation) but other algorithms will be added later and will have the same - stream interface. - - Compression can be done in a single step if the buffers are large - enough (for example if an input file is mmap'ed), or can be done by - repeated calls of the compression function. In the latter case, the - application must provide more input and/or consume the output - (providing more output space) before each call. - - The library also supports reading and writing files in gzip (.gz) format - with an interface similar to that of stdio. - - The library does not install any signal handler. The decoder checks - the consistency of the compressed data, so the library should never - crash even in case of corrupted input. -*/ - -typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); -typedef void (*free_func) OF((voidpf opaque, voidpf address)); - -struct internal_state; - -typedef struct z_stream_s { - Bytef *next_in; /* next input byte */ - uInt avail_in; /* number of bytes available at next_in */ - uLong total_in; /* total nb of input bytes read so far */ - - Bytef *next_out; /* next output byte should be put there */ - uInt avail_out; /* remaining free space at next_out */ - uLong total_out; /* total nb of bytes output so far */ - - char *msg; /* last error message, NULL if no error */ - struct internal_state FAR *state; /* not visible by applications */ - - alloc_func zalloc; /* used to allocate the internal state */ - free_func zfree; /* used to free the internal state */ - voidpf opaque; /* private data object passed to zalloc and zfree */ - - int data_type; /* best guess about the data type: ascii or binary */ - uLong adler; /* adler32 value of the uncompressed data */ - uLong reserved; /* reserved for future use */ -} z_stream; - -typedef z_stream FAR *z_streamp; - -/* - The application must update next_in and avail_in when avail_in has - dropped to zero. It must update next_out and avail_out when avail_out - has dropped to zero. The application must initialize zalloc, zfree and - opaque before calling the init function. All other fields are set by the - compression library and must not be updated by the application. - - The opaque value provided by the application will be passed as the first - parameter for calls of zalloc and zfree. This can be useful for custom - memory management. The compression library attaches no meaning to the - opaque value. - - zalloc must return Z_NULL if there is not enough memory for the object. - If zlib is used in a multi-threaded application, zalloc and zfree must be - thread safe. - - On 16-bit systems, the functions zalloc and zfree must be able to allocate - exactly 65536 bytes, but will not be required to allocate more than this - if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, - pointers returned by zalloc for objects of exactly 65536 bytes *must* - have their offset normalized to zero. The default allocation function - provided by this library ensures this (see zutil.c). To reduce memory - requirements and avoid any allocation of 64K objects, at the expense of - compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h). - - The fields total_in and total_out can be used for statistics or - progress reports. After compression, total_in holds the total size of - the uncompressed data and may be saved for use in the decompressor - (particularly if the decompressor wants to decompress everything in - a single step). -*/ - - /* constants */ - -#define Z_NO_FLUSH 0 -#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */ -#define Z_SYNC_FLUSH 2 -#define Z_FULL_FLUSH 3 -#define Z_FINISH 4 -/* Allowed flush values; see deflate() below for details */ - -#define Z_OK 0 -#define Z_STREAM_END 1 -#define Z_NEED_DICT 2 -#define Z_ERRNO (-1) -#define Z_STREAM_ERROR (-2) -#define Z_DATA_ERROR (-3) -#define Z_MEM_ERROR (-4) -#define Z_BUF_ERROR (-5) -#define Z_VERSION_ERROR (-6) -/* Return codes for the compression/decompression functions. Negative - * values are errors, positive values are used for special but normal events. - */ - -#define Z_NO_COMPRESSION 0 -#define Z_BEST_SPEED 1 -#define Z_BEST_COMPRESSION 9 -#define Z_DEFAULT_COMPRESSION (-1) -/* compression levels */ - -#define Z_FILTERED 1 -#define Z_HUFFMAN_ONLY 2 -#define Z_DEFAULT_STRATEGY 0 -/* compression strategy; see deflateInit2() below for details */ - -#define Z_BINARY 0 -#define Z_ASCII 1 -#define Z_UNKNOWN 2 -/* Possible values of the data_type field */ - -#define Z_DEFLATED 8 -/* The deflate compression method (the only one supported in this version) */ - -#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ - -#define zlib_version zlibVersion() -/* for compatibility with versions < 1.0.2 */ - - /* basic functions */ - -extern const char * ZEXPORT zlibVersion OF((void)); -/* The application can compare zlibVersion and ZLIB_VERSION for consistency. - If the first character differs, the library code actually used is - not compatible with the zlib.h header file used by the application. - This check is automatically made by deflateInit and inflateInit. - */ - -/* -extern int ZEXPORT deflateInit OF((z_streamp strm, int level)); - - Initializes the internal stream state for compression. The fields - zalloc, zfree and opaque must be initialized before by the caller. - If zalloc and zfree are set to Z_NULL, deflateInit updates them to - use default allocation functions. - - The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: - 1 gives best speed, 9 gives best compression, 0 gives no compression at - all (the input data is simply copied a block at a time). - Z_DEFAULT_COMPRESSION requests a default compromise between speed and - compression (currently equivalent to level 6). - - deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if level is not a valid compression level, - Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible - with the version assumed by the caller (ZLIB_VERSION). - msg is set to null if there is no error message. deflateInit does not - perform any compression: this will be done by deflate(). -*/ - - -extern int ZEXPORT deflate OF((z_streamp strm, int flush)); -/* - deflate compresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce some - output latency (reading input without producing any output) except when - forced to flush. - - The detailed semantics are as follows. deflate performs one or both of the - following actions: - - - Compress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in and avail_in are updated and - processing will resume at this point for the next call of deflate(). - - - Provide more output starting at next_out and update next_out and avail_out - accordingly. This action is forced if the parameter flush is non zero. - Forcing flush frequently degrades the compression ratio, so this parameter - should be set only when necessary (in interactive applications). - Some output may be provided even if flush is not set. - - Before the call of deflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming - more output, and updating avail_in or avail_out accordingly; avail_out - should never be zero before the call. The application can consume the - compressed output when it wants, for example when the output buffer is full - (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK - and with zero avail_out, it must be called again after making room in the - output buffer because there might be more output pending. - - If the parameter flush is set to Z_SYNC_FLUSH, all pending output is - flushed to the output buffer and the output is aligned on a byte boundary, so - that the decompressor can get all input data available so far. (In particular - avail_in is zero after the call if enough output space has been provided - before the call.) Flushing may degrade compression for some compression - algorithms and so it should be used only when necessary. - - If flush is set to Z_FULL_FLUSH, all output is flushed as with - Z_SYNC_FLUSH, and the compression state is reset so that decompression can - restart from this point if previous compressed data has been damaged or if - random access is desired. Using Z_FULL_FLUSH too often can seriously degrade - the compression. - - If deflate returns with avail_out == 0, this function must be called again - with the same value of the flush parameter and more output space (updated - avail_out), until the flush is complete (deflate returns with non-zero - avail_out). - - If the parameter flush is set to Z_FINISH, pending input is processed, - pending output is flushed and deflate returns with Z_STREAM_END if there - was enough output space; if deflate returns with Z_OK, this function must be - called again with Z_FINISH and more output space (updated avail_out) but no - more input data, until it returns with Z_STREAM_END or an error. After - deflate has returned Z_STREAM_END, the only possible operations on the - stream are deflateReset or deflateEnd. - - Z_FINISH can be used immediately after deflateInit if all the compression - is to be done in a single step. In this case, avail_out must be at least - 0.1% larger than avail_in plus 12 bytes. If deflate does not return - Z_STREAM_END, then it must be called again as described above. - - deflate() sets strm->adler to the adler32 checksum of all input read - so far (that is, total_in bytes). - - deflate() may update data_type if it can make a good guess about - the input data type (Z_ASCII or Z_BINARY). In doubt, the data is considered - binary. This field is only for information purposes and does not affect - the compression algorithm in any manner. - - deflate() returns Z_OK if some progress has been made (more input - processed or more output produced), Z_STREAM_END if all input has been - consumed and all output has been produced (only when flush is set to - Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example - if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible. -*/ - - -extern int ZEXPORT deflateEnd OF((z_streamp strm)); -/* - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any - pending output. - - deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the - stream state was inconsistent, Z_DATA_ERROR if the stream was freed - prematurely (some input or output was discarded). In the error case, - msg may be set but then points to a static string (which must not be - deallocated). -*/ - - -/* -extern int ZEXPORT inflateInit OF((z_streamp strm)); - - Initializes the internal stream state for decompression. The fields - next_in, avail_in, zalloc, zfree and opaque must be initialized before by - the caller. If next_in is not Z_NULL and avail_in is large enough (the exact - value depends on the compression method), inflateInit determines the - compression method from the zlib header and allocates all data structures - accordingly; otherwise the allocation will be deferred to the first call of - inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to - use default allocation functions. - - inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller. msg is set to null if there is no error - message. inflateInit does not perform any decompression apart from reading - the zlib header if present: this will be done by inflate(). (So next_in and - avail_in may be modified, but next_out and avail_out are unchanged.) -*/ - - -extern int ZEXPORT inflate OF((z_streamp strm, int flush)); -/* - inflate decompresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may some - introduce some output latency (reading input without producing any output) - except when forced to flush. - - The detailed semantics are as follows. inflate performs one or both of the - following actions: - - - Decompress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in is updated and processing - will resume at this point for the next call of inflate(). - - - Provide more output starting at next_out and update next_out and avail_out - accordingly. inflate() provides as much output as possible, until there - is no more input data or no more space in the output buffer (see below - about the flush parameter). - - Before the call of inflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming - more output, and updating the next_* and avail_* values accordingly. - The application can consume the uncompressed output when it wants, for - example when the output buffer is full (avail_out == 0), or after each - call of inflate(). If inflate returns Z_OK and with zero avail_out, it - must be called again after making room in the output buffer because there - might be more output pending. - - If the parameter flush is set to Z_SYNC_FLUSH, inflate flushes as much - output as possible to the output buffer. The flushing behavior of inflate is - not specified for values of the flush parameter other than Z_SYNC_FLUSH - and Z_FINISH, but the current implementation actually flushes as much output - as possible anyway. - - inflate() should normally be called until it returns Z_STREAM_END or an - error. However if all decompression is to be performed in a single step - (a single call of inflate), the parameter flush should be set to - Z_FINISH. In this case all pending input is processed and all pending - output is flushed; avail_out must be large enough to hold all the - uncompressed data. (The size of the uncompressed data may have been saved - by the compressor for this purpose.) The next operation on this stream must - be inflateEnd to deallocate the decompression state. The use of Z_FINISH - is never required, but can be used to inform inflate that a faster routine - may be used for the single inflate() call. - - If a preset dictionary is needed at this point (see inflateSetDictionary - below), inflate sets strm-adler to the adler32 checksum of the - dictionary chosen by the compressor and returns Z_NEED_DICT; otherwise - it sets strm->adler to the adler32 checksum of all output produced - so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or - an error code as described below. At the end of the stream, inflate() - checks that its computed adler32 checksum is equal to that saved by the - compressor and returns Z_STREAM_END only if the checksum is correct. - - inflate() returns Z_OK if some progress has been made (more input processed - or more output produced), Z_STREAM_END if the end of the compressed data has - been reached and all uncompressed output has been produced, Z_NEED_DICT if a - preset dictionary is needed at this point, Z_DATA_ERROR if the input data was - corrupted (input stream not conforming to the zlib format or incorrect - adler32 checksum), Z_STREAM_ERROR if the stream structure was inconsistent - (for example if next_in or next_out was NULL), Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if no progress is possible or if there was not - enough room in the output buffer when Z_FINISH is used. In the Z_DATA_ERROR - case, the application may then call inflateSync to look for a good - compression block. -*/ - - -extern int ZEXPORT inflateEnd OF((z_streamp strm)); -/* - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any - pending output. - - inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state - was inconsistent. In the error case, msg may be set but then points to a - static string (which must not be deallocated). -*/ - - /* Advanced functions */ - -/* - The following functions are needed only in some special applications. -*/ - -/* -extern int ZEXPORT deflateInit2 OF((z_streamp strm, - int level, - int method, - int windowBits, - int memLevel, - int strategy)); - - This is another version of deflateInit with more compression options. The - fields next_in, zalloc, zfree and opaque must be initialized before by - the caller. - - The method parameter is the compression method. It must be Z_DEFLATED in - this version of the library. - - The windowBits parameter is the base two logarithm of the window size - (the size of the history buffer). It should be in the range 8..15 for this - version of the library. Larger values of this parameter result in better - compression at the expense of memory usage. The default value is 15 if - deflateInit is used instead. - - The memLevel parameter specifies how much memory should be allocated - for the internal compression state. memLevel=1 uses minimum memory but - is slow and reduces compression ratio; memLevel=9 uses maximum memory - for optimal speed. The default value is 8. See zconf.h for total memory - usage as a function of windowBits and memLevel. - - The strategy parameter is used to tune the compression algorithm. Use the - value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a - filter (or predictor), or Z_HUFFMAN_ONLY to force Huffman encoding only (no - string match). Filtered data consists mostly of small values with a - somewhat random distribution. In this case, the compression algorithm is - tuned to compress them better. The effect of Z_FILTERED is to force more - Huffman coding and less string matching; it is somewhat intermediate - between Z_DEFAULT and Z_HUFFMAN_ONLY. The strategy parameter only affects - the compression ratio but not the correctness of the compressed output even - if it is not set appropriately. - - deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid - method). msg is set to null if there is no error message. deflateInit2 does - not perform any compression: this will be done by deflate(). -*/ - -extern int ZEXPORT deflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); -/* - Initializes the compression dictionary from the given byte sequence - without producing any compressed output. This function must be called - immediately after deflateInit or deflateInit2, before any call of - deflate. The compressor and decompressor must use exactly the same - dictionary (see inflateSetDictionary). - - The dictionary should consist of strings (byte sequences) that are likely - to be encountered later in the data to be compressed, with the most commonly - used strings preferably put towards the end of the dictionary. Using a - dictionary is most useful when the data to be compressed is short and can be - predicted with good accuracy; the data can then be compressed better than - with the default empty dictionary. - - Depending on the size of the compression data structures selected by - deflateInit or deflateInit2, a part of the dictionary may in effect be - discarded, for example if the dictionary is larger than the window size in - deflate or deflate2. Thus the strings most likely to be useful should be - put at the end of the dictionary, not at the front. - - Upon return of this function, strm->adler is set to the Adler32 value - of the dictionary; the decompressor may later use this value to determine - which dictionary has been used by the compressor. (The Adler32 value - applies to the whole dictionary even if only a subset of the dictionary is - actually used by the compressor.) - - deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a - parameter is invalid (such as NULL dictionary) or the stream state is - inconsistent (for example if deflate has already been called for this stream - or if the compression method is bsort). deflateSetDictionary does not - perform any compression: this will be done by deflate(). -*/ - -extern int ZEXPORT deflateCopy OF((z_streamp dest, - z_streamp source)); -/* - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when several compression strategies will be - tried, for example when there are several ways of pre-processing the input - data with a filter. The streams that will be discarded should then be freed - by calling deflateEnd. Note that deflateCopy duplicates the internal - compression state which can be quite large, so this strategy is slow and - can consume lots of memory. - - deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being NULL). msg is left unchanged in both source and - destination. -*/ - -extern int ZEXPORT deflateReset OF((z_streamp strm)); -/* - This function is equivalent to deflateEnd followed by deflateInit, - but does not free and reallocate all the internal compression state. - The stream will keep the same compression level and any other attributes - that may have been set by deflateInit2. - - deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being NULL). -*/ - -extern int ZEXPORT deflateParams OF((z_streamp strm, int level, int strategy)); -/* - Dynamically update the compression level and compression strategy. The - interpretation of level and strategy is as in deflateInit2. This can be - used to switch between compression and straight copy of the input data, or - to switch to a different kind of input data requiring a different - strategy. If the compression level is changed, the input available so far - is compressed with the old level (and may be flushed); the new level will - take effect only at the next call of deflate(). - - Before the call of deflateParams, the stream state must be set as for - a call of deflate(), since the currently available input may have to - be compressed and flushed. In particular, strm->avail_out must be non-zero. - - deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source - stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR - if strm->avail_out was zero. -*/ - -/* -extern int ZEXPORT inflateInit2 OF((z_streamp strm, - int windowBits)); - - This is another version of inflateInit with an extra parameter. The - fields next_in, avail_in, zalloc, zfree and opaque must be initialized - before by the caller. - - The windowBits parameter is the base two logarithm of the maximum window - size (the size of the history buffer). It should be in the range 8..15 for - this version of the library. The default value is 15 if inflateInit is used - instead. If a compressed stream with a larger window size is given as - input, inflate() will return with the error code Z_DATA_ERROR instead of - trying to allocate a larger window. - - inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if a parameter is invalid (such as a negative - memLevel). msg is set to null if there is no error message. inflateInit2 - does not perform any decompression apart from reading the zlib header if - present: this will be done by inflate(). (So next_in and avail_in may be - modified, but next_out and avail_out are unchanged.) -*/ - -extern int ZEXPORT inflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); -/* - Initializes the decompression dictionary from the given uncompressed byte - sequence. This function must be called immediately after a call of inflate - if this call returned Z_NEED_DICT. The dictionary chosen by the compressor - can be determined from the Adler32 value returned by this call of - inflate. The compressor and decompressor must use exactly the same - dictionary (see deflateSetDictionary). - - inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a - parameter is invalid (such as NULL dictionary) or the stream state is - inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the - expected one (incorrect Adler32 value). inflateSetDictionary does not - perform any decompression: this will be done by subsequent calls of - inflate(). -*/ - -extern int ZEXPORT inflateSync OF((z_streamp strm)); -/* - Skips invalid compressed data until a full flush point (see above the - description of deflate with Z_FULL_FLUSH) can be found, or until all - available input is skipped. No output is provided. - - inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR - if no more input was provided, Z_DATA_ERROR if no flush point has been found, - or Z_STREAM_ERROR if the stream structure was inconsistent. In the success - case, the application may save the current current value of total_in which - indicates where valid compressed data was found. In the error case, the - application may repeatedly call inflateSync, providing more input each time, - until success or end of the input data. -*/ - -extern int ZEXPORT inflateReset OF((z_streamp strm)); -/* - This function is equivalent to inflateEnd followed by inflateInit, - but does not free and reallocate all the internal decompression state. - The stream will keep attributes that may have been set by inflateInit2. - - inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being NULL). -*/ - - - /* utility functions */ - -/* - The following utility functions are implemented on top of the - basic stream-oriented functions. To simplify the interface, some - default options are assumed (compression level and memory usage, - standard memory allocation functions). The source code of these - utility functions can easily be modified if you need special options. -*/ - -extern int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); -/* - Compresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total - size of the destination buffer, which must be at least 0.1% larger than - sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the - compressed buffer. - This function can be used to compress a whole file at once if the - input file is mmap'ed. - compress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer. -*/ - -extern int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen, - int level)); -/* - Compresses the source buffer into the destination buffer. The level - parameter has the same meaning as in deflateInit. sourceLen is the byte - length of the source buffer. Upon entry, destLen is the total size of the - destination buffer, which must be at least 0.1% larger than sourceLen plus - 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. - - compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_BUF_ERROR if there was not enough room in the output buffer, - Z_STREAM_ERROR if the level parameter is invalid. -*/ - -extern int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); -/* - Decompresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total - size of the destination buffer, which must be large enough to hold the - entire uncompressed data. (The size of the uncompressed data must have - been saved previously by the compressor and transmitted to the decompressor - by some mechanism outside the scope of this compression library.) - Upon exit, destLen is the actual size of the compressed buffer. - This function can be used to decompress a whole file at once if the - input file is mmap'ed. - - uncompress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer, or Z_DATA_ERROR if the input data was corrupted. -*/ - - -typedef voidp gzFile; - -extern gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); -/* - Opens a gzip (.gz) file for reading or writing. The mode parameter - is as in fopen ("rb" or "wb") but can also include a compression level - ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for - Huffman only compression as in "wb1h". (See the description - of deflateInit2 for more information about the strategy parameter.) - - gzopen can be used to read a file which is not in gzip format; in this - case gzread will directly read from the file without decompression. - - gzopen returns NULL if the file could not be opened or if there was - insufficient memory to allocate the (de)compression state; errno - can be checked to distinguish the two cases (if errno is zero, the - zlib error is Z_MEM_ERROR). */ - -extern gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); -/* - gzdopen() associates a gzFile with the file descriptor fd. File - descriptors are obtained from calls like open, dup, creat, pipe or - fileno (in the file has been previously opened with fopen). - The mode parameter is as in gzopen. - The next call of gzclose on the returned gzFile will also close the - file descriptor fd, just like fclose(fdopen(fd), mode) closes the file - descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode). - gzdopen returns NULL if there was insufficient memory to allocate - the (de)compression state. -*/ - -extern int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); -/* - Dynamically update the compression level or strategy. See the description - of deflateInit2 for the meaning of these parameters. - gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not - opened for writing. -*/ - -extern int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); -/* - Reads the given number of uncompressed bytes from the compressed file. - If the input file was not in gzip format, gzread copies the given number - of bytes into the buffer. - gzread returns the number of uncompressed bytes actually read (0 for - end of file, -1 for error). */ - -extern int ZEXPORT gzwrite OF((gzFile file, const voidp buf, unsigned len)); -/* - Writes the given number of uncompressed bytes into the compressed file. - gzwrite returns the number of uncompressed bytes actually written - (0 in case of error). -*/ - -extern int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); -/* - Converts, formats, and writes the args to the compressed file under - control of the format string, as in fprintf. gzprintf returns the number of - uncompressed bytes actually written (0 in case of error). -*/ - -extern int ZEXPORT gzputs OF((gzFile file, const char *s)); -/* - Writes the given null-terminated string to the compressed file, excluding - the terminating null character. - gzputs returns the number of characters written, or -1 in case of error. -*/ - -extern char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); -/* - Reads bytes from the compressed file until len-1 characters are read, or - a newline character is read and transferred to buf, or an end-of-file - condition is encountered. The string is then terminated with a null - character. - gzgets returns buf, or Z_NULL in case of error. -*/ - -extern int ZEXPORT gzputc OF((gzFile file, int c)); -/* - Writes c, converted to an unsigned char, into the compressed file. - gzputc returns the value that was written, or -1 in case of error. -*/ - -extern int ZEXPORT gzgetc OF((gzFile file)); -/* - Reads one byte from the compressed file. gzgetc returns this byte - or -1 in case of end of file or error. -*/ - -extern int ZEXPORT gzflush OF((gzFile file, int flush)); -/* - Flushes all pending output into the compressed file. The parameter - flush is as in the deflate() function. The return value is the zlib - error number (see function gzerror below). gzflush returns Z_OK if - the flush parameter is Z_FINISH and all output could be flushed. - gzflush should be called only when strictly necessary because it can - degrade compression. -*/ - -extern z_off_t ZEXPORT gzseek OF((gzFile file, z_off_t offset, int whence)); -/* - Sets the starting position for the next gzread or gzwrite on the given - compressed file. The offset represents a number of bytes in the - uncompressed data stream. The whence parameter is defined as in lseek(2); - the value SEEK_END is not supported. - If the file is opened for reading, this function is emulated but can be - extremely slow. If the file is opened for writing, only forward seeks are - supported; gzseek then compresses a sequence of zeroes up to the new - starting position. - - gzseek returns the resulting offset location as measured in bytes from - the beginning of the uncompressed stream, or -1 in case of error, in - particular if the file is opened for writing and the new starting position - would be before the current position. -*/ - -extern int ZEXPORT gzrewind OF((gzFile file)); -/* - Rewinds the given file. This function is supported only for reading. - - gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) -*/ - -extern z_off_t ZEXPORT gztell OF((gzFile file)); -/* - Returns the starting position for the next gzread or gzwrite on the - given compressed file. This position represents a number of bytes in the - uncompressed data stream. - - gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) -*/ - -extern int ZEXPORT gzeof OF((gzFile file)); -/* - Returns 1 when EOF has previously been detected reading the given - input stream, otherwise zero. -*/ - -extern int ZEXPORT gzclose OF((gzFile file)); -/* - Flushes all pending output if necessary, closes the compressed file - and deallocates all the (de)compression state. The return value is the zlib - error number (see function gzerror below). -*/ - -extern const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); -/* - Returns the error message for the last error which occurred on the - given compressed file. errnum is set to zlib error number. If an - error occurred in the file system and not in the compression library, - errnum is set to Z_ERRNO and the application may consult errno - to get the exact error code. -*/ - - /* checksum functions */ - -/* - These functions are not related to compression but are exported - anyway because they might be useful in applications using the - compression library. -*/ - -extern uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); - -/* - Update a running Adler-32 checksum with the bytes buf[0..len-1] and - return the updated checksum. If buf is NULL, this function returns - the required initial value for the checksum. - An Adler-32 checksum is almost as reliable as a CRC32 but can be computed - much faster. Usage example: - - uLong adler = adler32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - adler = adler32(adler, buffer, length); - } - if (adler != original_adler) error(); -*/ - -extern uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); -/* - Update a running crc with the bytes buf[0..len-1] and return the updated - crc. If buf is NULL, this function returns the required initial value - for the crc. Pre- and post-conditioning (one's complement) is performed - within this function so it shouldn't be done by the application. - Usage example: - - uLong crc = crc32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - crc = crc32(crc, buffer, length); - } - if (crc != original_crc) error(); -*/ - - - /* various hacks, don't look :) */ - -/* deflateInit and inflateInit are macros to allow checking the zlib version - * and the compiler's view of z_stream: - */ -extern int ZEXPORT deflateInit_ OF((z_streamp strm, int level, - const char *version, int stream_size)); -extern int ZEXPORT inflateInit_ OF((z_streamp strm, - const char *version, int stream_size)); -extern int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, - int windowBits, int memLevel, - int strategy, const char *version, - int stream_size)); -extern int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, - const char *version, int stream_size)); -#define deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) -#define inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream)) -#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ - deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, sizeof(z_stream)) -#define inflateInit2(strm, windowBits) \ - inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) - - -#if !defined(_Z_UTIL_H) && !defined(NO_DUMMY_DECL) - struct internal_state {int dummy;}; /* hack for buggy compilers */ -#endif - -extern const char * ZEXPORT zError OF((int err)); -extern int ZEXPORT inflateSyncPoint OF((z_streamp z)); -extern const uLongf * ZEXPORT get_crc_table OF((void)); - -#ifdef __cplusplus -} -#endif - -#endif /* _ZLIB_H */ diff --git a/src/zlib/zutil.c b/src/zlib/zutil.c deleted file mode 100644 index 199762bdbe..0000000000 --- a/src/zlib/zutil.c +++ /dev/null @@ -1,225 +0,0 @@ -/* zutil.c -- target dependent utility functions for the compression library - * Copyright (C) 1995-1998 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#include "zutil.h" - -struct internal_state {int dummy;}; /* for buggy compilers */ - -#ifndef STDC -extern void exit OF((int)); -#endif - -const char *z_errmsg[10] = { -"need dictionary", /* Z_NEED_DICT 2 */ -"stream end", /* Z_STREAM_END 1 */ -"", /* Z_OK 0 */ -"file error", /* Z_ERRNO (-1) */ -"stream error", /* Z_STREAM_ERROR (-2) */ -"data error", /* Z_DATA_ERROR (-3) */ -"insufficient memory", /* Z_MEM_ERROR (-4) */ -"buffer error", /* Z_BUF_ERROR (-5) */ -"incompatible version",/* Z_VERSION_ERROR (-6) */ -""}; - - -const char * ZEXPORT zlibVersion() -{ - return ZLIB_VERSION; -} - -#ifdef __WXDEBUG__ - -# ifndef verbose -# define verbose 0 -# endif -int z_verbose = verbose; - -void z_error (m) - char *m; -{ - fprintf(stderr, "%s\n", m); - exit(1); -} -#endif - -/* exported to allow conversion of error code to string for compress() and - * uncompress() - */ -const char * ZEXPORT zError(err) - int err; -{ - return ERR_MSG(err); -} - - -#ifndef HAVE_MEMCPY - -void zmemcpy(dest, source, len) - Bytef* dest; - Bytef* source; - uInt len; -{ - if (len == 0) return; - do { - *dest++ = *source++; /* ??? to be unrolled */ - } while (--len != 0); -} - -int zmemcmp(s1, s2, len) - Bytef* s1; - Bytef* s2; - uInt len; -{ - uInt j; - - for (j = 0; j < len; j++) { - if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1; - } - return 0; -} - -void zmemzero(dest, len) - Bytef* dest; - uInt len; -{ - if (len == 0) return; - do { - *dest++ = 0; /* ??? to be unrolled */ - } while (--len != 0); -} -#endif - -#ifdef __TURBOC__ -#if (defined( __BORLANDC__) || !defined(SMALL_MEDIUM)) && !defined(__32BIT__) -/* Small and medium model in Turbo C are for now limited to near allocation - * with reduced MAX_WBITS and MAX_MEM_LEVEL - */ -# define MY_ZCALLOC - -/* Turbo C malloc() does not allow dynamic allocation of 64K bytes - * and farmalloc(64K) returns a pointer with an offset of 8, so we - * must fix the pointer. Warning: the pointer must be put back to its - * original form in order to free it, use zcfree(). - */ - -#define MAX_PTR 10 -/* 10*64K = 640K */ - -local int next_ptr = 0; - -typedef struct ptr_table_s { - voidpf org_ptr; - voidpf new_ptr; -} ptr_table; - -local ptr_table table[MAX_PTR]; -/* This table is used to remember the original form of pointers - * to large buffers (64K). Such pointers are normalized with a zero offset. - * Since MSDOS is not a preemptive multitasking OS, this table is not - * protected from concurrent access. This hack doesn't work anyway on - * a protected system like OS/2. Use Microsoft C instead. - */ - -voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) -{ - voidpf buf = opaque; /* just to make some compilers happy */ - ulg bsize = (ulg)items*size; - - /* If we allocate less than 65520 bytes, we assume that farmalloc - * will return a usable pointer which doesn't have to be normalized. - */ - if (bsize < 65520L) { - buf = farmalloc(bsize); - if (*(ush*)&buf != 0) return buf; - } else { - buf = farmalloc(bsize + 16L); - } - if (buf == NULL || next_ptr >= MAX_PTR) return NULL; - table[next_ptr].org_ptr = buf; - - /* Normalize the pointer to seg:0 */ - *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4; - *(ush*)&buf = 0; - table[next_ptr++].new_ptr = buf; - return buf; -} - -void zcfree (voidpf opaque, voidpf ptr) -{ - int n; - if (*(ush*)&ptr != 0) { /* object < 64K */ - farfree(ptr); - return; - } - /* Find the original pointer */ - for (n = 0; n < next_ptr; n++) { - if (ptr != table[n].new_ptr) continue; - - farfree(table[n].org_ptr); - while (++n < next_ptr) { - table[n-1] = table[n]; - } - next_ptr--; - return; - } - ptr = opaque; /* just to make some compilers happy */ - Assert(0, "zcfree: ptr not found"); -} -#endif -#endif /* __TURBOC__ */ - - -#if defined(M_I86) && !defined(__32BIT__) -/* Microsoft C in 16-bit mode */ - -# define MY_ZCALLOC - -#if (!defined(_MSC_VER) || (_MSC_VER < 600)) -# define _halloc halloc -# define _hfree hfree -#endif - -voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) -{ - if (opaque) opaque = 0; /* to make compiler happy */ - return _halloc((long)items, size); -} - -void zcfree (voidpf opaque, voidpf ptr) -{ - if (opaque) opaque = 0; /* to make compiler happy */ - _hfree(ptr); -} - -#endif /* MSC */ - - -#ifndef MY_ZCALLOC /* Any system without a special alloc function */ - -#ifndef STDC -extern voidp calloc OF((uInt items, uInt size)); -extern void free OF((voidpf ptr)); -#endif - -voidpf zcalloc (opaque, items, size) - voidpf opaque; - unsigned items; - unsigned size; -{ - if (opaque) items += size - size; /* make compiler happy */ - return (voidpf)calloc(items, size); -} - -void zcfree (opaque, ptr) - voidpf opaque; - voidpf ptr; -{ - free(ptr); - if (opaque) return; /* make compiler happy */ -} - -#endif /* MY_ZCALLOC */ diff --git a/src/zlib/zutil.h b/src/zlib/zutil.h deleted file mode 100644 index 06543084cd..0000000000 --- a/src/zlib/zutil.h +++ /dev/null @@ -1,221 +0,0 @@ -/* zutil.h -- internal interface and configuration of the compression library - * Copyright (C) 1995-1998 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* @(#) $Id$ */ - -#ifndef _Z_UTIL_H -#define _Z_UTIL_H - -#include "../zlib/zlib.h" - -#ifdef STDC -# include -# include -# include -#endif -#ifdef NO_ERRNO_H - extern int errno; -#else -# include -#endif - -#ifndef local -# define local static -#endif -/* compile with -Dlocal if your __WXDEBUG__ger can't find static symbols */ - -typedef unsigned char uch; -typedef uch FAR uchf; -typedef unsigned short ush; -typedef ush FAR ushf; -typedef unsigned long ulg; - -extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ -/* (size given to avoid silly warnings with Visual C++) */ - -#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] - -#define ERR_RETURN(strm,err) \ - return (strm->msg = (char*)ERR_MSG(err), (err)) -/* To be used only when the state is known to be valid */ - - /* common constants */ - -#ifndef DEF_WBITS -# define DEF_WBITS MAX_WBITS -#endif -/* default windowBits for decompression. MAX_WBITS is for compression only */ - -#if MAX_MEM_LEVEL >= 8 -# define DEF_MEM_LEVEL 8 -#else -# define DEF_MEM_LEVEL MAX_MEM_LEVEL -#endif -/* default memLevel */ - -#define STORED_BLOCK 0 -#define STATIC_TREES 1 -#define DYN_TREES 2 -/* The three kinds of block type */ - -#define MIN_MATCH 3 -#define MAX_MATCH 258 -/* The minimum and maximum match lengths */ - -#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */ - - /* target dependencies */ - -#ifdef MSDOS -# define OS_CODE 0x00 -# ifdef __TURBOC__ -# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) - /* Allow compilation with ANSI keywords only enabled */ - void _Cdecl farfree( void *block ); - void *_Cdecl farmalloc( unsigned long nbytes ); -# else -# include -# endif -# else /* MSC or DJGPP */ -# include -# endif -#endif - -#ifdef OS2 -# define OS_CODE 0x06 -#endif - -#ifdef WIN32 /* Window 95 & Windows NT */ -# define OS_CODE 0x0b -#endif - -#if defined(VAXC) || defined(VMS) -# define OS_CODE 0x02 -# define F_OPEN(name, mode) \ - fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") -#endif - -#ifdef AMIGA -# define OS_CODE 0x01 -#endif - -#if defined(ATARI) || defined(atarist) -# define OS_CODE 0x05 -#endif - -#if defined(MACOS) || defined(TARGET_OS_MAC) -# define OS_CODE 0x07 -# ifndef fdopen -# define fdopen(fd,mode) NULL /* No fdopen() */ -# endif -#endif -#if defined(__MWERKS__) && !defined(fdopen) -# if __dest_os != __be_os && __dest_os != __win32_os -# define fdopen(fd,mode) NULL -# endif -#endif - -#ifdef __50SERIES /* Prime/PRIMOS */ -# define OS_CODE 0x0F -#endif - -#ifdef TOPS20 -# define OS_CODE 0x0a -#endif - -#if defined(_BEOS_) || defined(RISCOS) -# define fdopen(fd,mode) NULL /* No fdopen() */ -#endif - -#if (defined(_MSC_VER) && (_MSC_VER >= 600)) -# define fdopen(fd,type) _fdopen(fd,type) -#endif - - - /* Common defaults */ - -#ifndef OS_CODE -# define OS_CODE 0x03 /* assume Unix */ -#endif - -#ifndef F_OPEN -# define F_OPEN(name, mode) fopen((name), (mode)) -#endif - - /* functions */ - -#ifdef HAVE_STRERROR - extern char *strerror OF((int)); -# define zstrerror(errnum) strerror(errnum) -#else -# define zstrerror(errnum) "" -#endif - -#if defined(pyr) -# define NO_MEMCPY -#endif -#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__) - /* Use our own functions for small and medium model with MSC <= 5.0. - * You may have to use the same strategy for Borland C (untested). - * The __SC__ check is for Symantec. - */ -# define NO_MEMCPY -#endif -#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY) -# define HAVE_MEMCPY -#endif -#ifdef HAVE_MEMCPY -# ifdef SMALL_MEDIUM /* MSDOS small or medium model */ -# define zmemcpy _fmemcpy -# define zmemcmp _fmemcmp -# define zmemzero(dest, len) _fmemset(dest, 0, len) -# else -# define zmemcpy memcpy -# define zmemcmp memcmp -# define zmemzero(dest, len) memset(dest, 0, len) -# endif -#else - extern void zmemcpy OF((Bytef* dest, Bytef* source, uInt len)); - extern int zmemcmp OF((Bytef* s1, Bytef* s2, uInt len)); - extern void zmemzero OF((Bytef* dest, uInt len)); -#endif - -/* Diagnostic functions */ -#ifdef __WXDEBUG__ -# include - extern int z_verbose; - extern void z_error OF((char *m)); -# define Assert(cond,msg) {if(!(cond)) z_error(msg);} -# define Trace(x) {if (z_verbose>=0) fprintf x ;} -# define Tracev(x) {if (z_verbose>0) fprintf x ;} -# define Tracevv(x) {if (z_verbose>1) fprintf x ;} -# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} -# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} -#else -# define Assert(cond,msg) -# define Trace(x) -# define Tracev(x) -# define Tracevv(x) -# define Tracec(c,x) -# define Tracecv(c,x) -#endif - - -typedef uLong (ZEXPORT *check_func) OF((uLong check, const Bytef *buf, - uInt len)); -voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size)); -void zcfree OF((voidpf opaque, voidpf ptr)); - -#define ZALLOC(strm, items, size) \ - (*((strm)->zalloc))((strm)->opaque, (items), (size)) -#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr)) -#define TRY_FREE(s, p) {if (p) ZFREE(s, p);} - -#endif /* _Z_UTIL_H */ diff --git a/template.mak b/template.mak deleted file mode 100644 index 2e5ee951d7..0000000000 --- a/template.mak +++ /dev/null @@ -1,35 +0,0 @@ -#the calling Makefile MUST set OS and RULE -#RULE can be one of the following: -# bin for one local binary -# bin2 for two local binaries -# gbin for one global binary -# gbin2 for two global binaries -# lib for a local library -# libbin for a local library and one local binary -# libgbin for a local library and one global binary -# glib for a global library -# glibbin for a global library and one local binary -# glibgbin for a global library and one global binary -# gslib for a global shared library - -# no need to edit below this line !!!! - -RULES_DIR=$(WXBASEDIR)/setup/rules -RULES_GENERIC=$(RULES_DIR)/generic -SETUP_DIR=$(WXBASEDIR)/setup/$(OS) -SHARE_DIR=$(WXBASEDIR)/setup/shared - -SRCDIR=$(WXBASEDIR)/src -UTILS=$(WXBASEDIR)/utils -SAMPLES=$(WXBASEDIR)/samples -OTHER=$(WXBASEDIR)/other - -# now include the global setting -include $(SETUP_DIR)/maketmpl - -# now include the rule needed -include $(RULES_DIR)/$(RULE) - -# now include the global objects -include $(RULES_GENERIC)/globals - diff --git a/user/Makefile b/user/Makefile deleted file mode 100644 index 57ec5f3f82..0000000000 --- a/user/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../setup/general/makedirs diff --git a/user/wxConvert/.cvsignore b/user/wxConvert/.cvsignore deleted file mode 100644 index 4daa84b813..0000000000 --- a/user/wxConvert/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Linux -linux-gnu diff --git a/user/wxConvert/Makefile b/user/wxConvert/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/user/wxConvert/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/user/wxConvert/Makefile.in b/user/wxConvert/Makefile.in deleted file mode 100644 index 5f781538f6..0000000000 --- a/user/wxConvert/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# WXXT base directory -WXBASEDIR=@WXBASEDIR@ - -# set the OS type for compilation -OS=@OS@ -# compile a library only -RULE=bin - -# define library name -BIN_TARGET=wxConvert -# define library sources -BIN_SRC=\ -wxConvert.cpp - -#define library objects -BIN_OBJ=\ -wxConvert.o - -# additional things needed to link -BIN_LINK= - -# additional things needed to compile -ADD_COMPILE= - -# include the definitions now -include ../../../template.mak diff --git a/user/wxConvert/wxConvert.cpp b/user/wxConvert/wxConvert.cpp deleted file mode 100644 index 49e8a4f9d9..0000000000 --- a/user/wxConvert/wxConvert.cpp +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Program: wxConvert - * - * Author: Robert Roebling - * - * Copyright: (C) 1997, GNU (Robert Roebling) - * - * This program 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., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * You may not use this program without clapping twice at every - * full hour. - * - */ - -#ifdef __GNUG__ -#pragma implementation "wxConvert.h" -#endif - -#include "wxConvert.h" -#include "wx/textfile.h" - -//----------------------------------------------------------------------------- -// main program -//----------------------------------------------------------------------------- - -IMPLEMENT_APP(MyApp) - -//----------------------------------------------------------------------------- -// MyFrame -//----------------------------------------------------------------------------- - -const ID_QUIT = 100; -const ID_2UNIX = 101; -const ID_2DOS = 102; -const ID_2MAC = 103; - -IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame ) - -BEGIN_EVENT_TABLE(MyFrame,wxFrame) - EVT_BUTTON (ID_QUIT, MyFrame::OnCommand) - EVT_BUTTON (ID_2UNIX, MyFrame::OnCommand) - EVT_BUTTON (ID_2DOS, MyFrame::OnCommand) - EVT_BUTTON (ID_2MAC, MyFrame::OnCommand) -END_EVENT_TABLE() - -MyFrame::MyFrame(void) : - wxFrame( (wxFrame *) NULL, -1, (char *) "wxConvert", wxPoint(20,20), wxSize(400,160) ) -{ - CreateStatusBar( 1 ); - - SetStatusText( "wxConvert v0.1 by Robert Roebling." ); - - char buf[500]; - wxGetWorkingDirectory( buf, 500 ); - wxString s( "Dir: " ); - s += buf; - - m_text = new wxStaticText( this, -1, s, wxPoint(10,50), wxSize(380,-1) ); - - (void*)new wxButton( this, ID_QUIT, "Quit", wxPoint(10,100), wxSize(60,25) ); - - (void*)new wxButton( this, ID_2UNIX, "To Unix", wxPoint(180,100), wxSize(60,25) ); - - (void*)new wxButton( this, ID_2DOS, "To Dos", wxPoint(250,100), wxSize(60,25) ); - - (void*)new wxButton( this, ID_2MAC, "To Mac", wxPoint(320,100), wxSize(60,25) ); -}; - -void MyFrame::OnCommand( wxCommandEvent &event ) -{ - switch (event.GetId()) - { - case ID_QUIT: - Close( TRUE ); - break; - case ID_2UNIX: - case ID_2DOS: - case ID_2MAC: - char buf[500]; - wxGetWorkingDirectory( buf, 500 ); - wxString s( buf ); - Recurse( event.GetId(), s ); - break; - }; -}; - -void MyFrame::Convert( int id, const wxString &fname ) -{ - wxTextFile text(fname ); - text.Open(); - return; - - switch (id) - { - case ID_2UNIX: - text.Write( wxTextFile::Type_Unix ); - break; - case ID_2DOS: - text.Write( wxTextFile::Type_Dos ); - break; - case ID_2MAC: - text.Write( wxTextFile::Type_Mac ); - break; - }; - -}; - -void MyFrame::Recurse( int id, const wxString &curdir ) -{ - wxArrayString paths; - wxString search,path; - - search = curdir; - search += "/*"; - - path = wxFindFirstFile( search, wxDIR ); - while (!path.IsNull()) - { - paths.Add( path ); // ref counting in action ! - path = wxFindNextFile(); - }; - - - search = curdir; - search += "/*.cpp"; - - path = wxFindFirstFile( search, wxFILE ); - while (!path.IsNull()) - { - m_text->SetLabel( path ); - wxYield(); - Convert( id, path ); - path = wxFindNextFile(); - }; - - for (int i = 0; i < paths.Count(); i++) - { - search = paths[i]; - Recurse( id, search ); - }; -}; - -//----------------------------------------------------------------------------- -// MyApp -//----------------------------------------------------------------------------- - -MyApp::MyApp(void) : - wxApp( ) -{ -}; - -bool MyApp::OnInit(void) -{ - wxFrame *frame = new MyFrame(); - frame->Show( TRUE ); - - return TRUE; -}; - - - - - diff --git a/user/wxConvert/wxConvert.h b/user/wxConvert/wxConvert.h deleted file mode 100644 index a6de4a46ac..0000000000 --- a/user/wxConvert/wxConvert.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Program: wxConvert - * - * Author: Robert Roebling - * - * Copyright: (C) 1997, GNU (Robert Roebling) - * - * This program 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __WXCONVERTH__ -#define __WXCONVERTH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/wx.h" - -//----------------------------------------------------------------------------- -// derived classes -//----------------------------------------------------------------------------- - -class MyFrame; -class MyApp; - -//----------------------------------------------------------------------------- -// MyFrame -//----------------------------------------------------------------------------- - -class MyFrame: public wxFrame -{ - DECLARE_DYNAMIC_CLASS(MyFrame) - - public: - - MyFrame(void); - void OnCommand( wxCommandEvent &event ); - void Recurse( int id, const wxString &curdir ); - void Convert( int id, const wxString &fname ); - - wxStaticText *m_text; - - DECLARE_EVENT_TABLE() -}; - -//----------------------------------------------------------------------------- -// MyApp -//----------------------------------------------------------------------------- - -class MyApp: public wxApp -{ - public: - - MyApp(void); - virtual bool OnInit(void); -}; - -#endif // __WXCONVERTH__ diff --git a/user/wxFile/.cvsignore b/user/wxFile/.cvsignore deleted file mode 100644 index 4daa84b813..0000000000 --- a/user/wxFile/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Linux -linux-gnu diff --git a/user/wxFile/FMJobs.cpp b/user/wxFile/FMJobs.cpp deleted file mode 100644 index 14dd804ad6..0000000000 --- a/user/wxFile/FMJobs.cpp +++ /dev/null @@ -1,326 +0,0 @@ -/* - * Program: FMJobs.cpp - * - * Author: Robert Roebling - * - * Copyright: (C) 1997, GNU (Robert Roebling) - * - * This program 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifdef __GNUG__ -#pragma implementation "FMJobs.h" -#endif - -#include "FMJobs.h" -#include "wx/utils.h" -#include "wx/filefn.h" -#include "wx/msgdlg.h" - -//----------------------------------------------------------------------------- -// wxCopyStatusDia -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxCopyStatusDia,wxDialog); - -const ID_CANCEL_COPY = 1000; - -BEGIN_EVENT_TABLE(wxCopyStatusDia,wxDialog) - EVT_BUTTON (ID_CANCEL_COPY, wxCopyStatusDia::OnCommand) -END_EVENT_TABLE() - -wxCopyStatusDia::wxCopyStatusDia( wxFrame *parent, const wxString &dest, wxArrayString *files ) : - wxDialog( parent, -1, "FileMaker copy job control", wxPoint(180,180), wxSize(500,200) ) -{ - int w = 0; - int h = 0; - GetSize( &w, &h ); - - m_dest = dest; - m_files = files; - m_stop = FALSE; - - (void)new wxStaticText( this, -1, "Copying files", wxPoint(10,10) ); - (void)new wxStaticText( this, -1, "from:", wxPoint(30,40) ); - m_sourceMsg = new wxStaticText( this, -1, "", wxPoint(80,40), wxSize(200,-1) ); - (void)new wxStaticText( this, -1, " to:", wxPoint(30,70) ); - m_destMsg = new wxStaticText( this, -1, "", wxPoint(80,70), wxSize(200,-1) ); - (void)new wxStaticText( this, -1, " Kb copied:", wxPoint(30,100) ); - m_statusMsg = new wxStaticText( this, -1, "0", wxPoint(120,100), wxSize(100,-1) ); - - m_cancelButton = new wxButton( this, ID_CANCEL_COPY, "Return", wxPoint(w-130,h-50), wxSize(85,30) ); - - Centre( wxVERTICAL | wxHORIZONTAL ); - - m_timer = new wxCopyTimer( this ); - m_timer->Start( 300, TRUE ); - - Show( TRUE ); -}; - -wxCopyStatusDia::~wxCopyStatusDia() -{ - delete m_timer; -}; - -void wxCopyStatusDia::OnCommand( wxCommandEvent &WXUNUSED(event) ) -{ - if (m_stop) EndModal(wxID_CANCEL); - m_stop = TRUE; -}; - -void wxCopyStatusDia::DoCopy(void) -{ - wxYield(); - - if (!wxDirExists(m_dest)) - { - wxMessageBox( "Target is not a directory or it doesn`t exist. Can`t copy.", "FileMaker" ); - return; - }; - - for (uint i = 0; i < m_files->Count(); i++) - { - wxString src = (*m_files)[i]; - if (wxDirExists( src )) - CopyDir( src, m_dest ); - else - CopyFile( src, m_dest ); - if (m_stop) return; - }; - m_stop = TRUE; -}; - -void wxCopyStatusDia::CopyDir( wxString &srcDir, wxString &destDir ) -{ - wxString src = srcDir; - wxString dest = destDir; - dest += "/"; - dest += wxFileNameFromPath( src ); - if (!wxMkdir( dest )) - { - wxMessageBox( "Could not create target directory.", "FileMaker" ); - return; - }; - - wxArrayString list; - src += "/*"; - char *f = wxFindFirstFile( src, wxDIR ); - while (f) - { - list.Add( f ); - f = wxFindNextFile(); - }; - - for (uint i = 0; i < list.Count(); i++) - { - wxString filename = list[i]; - if (wxDirExists( filename )) - CopyDir( filename, dest ); - else - CopyFile( filename, dest ); - if (m_stop) return; - }; -}; - -void wxCopyStatusDia::CopyFile( wxString &src, wxString &destDir ) -{ - m_sourceMsg->SetLabel( src ); - wxString dest = destDir; - dest += "/"; - dest += wxFileNameFromPath( src ); - m_destMsg->SetLabel( dest ); - - wxYield(); - - if (wxFileExists(dest)) - { - wxString s = "Target file "; - s += dest; - s += " exists already. Overwrite?"; - int ret = wxMessageBox( s, "FileMaker", wxYES_NO ); - if (ret == wxNO) return; - }; - - FILE *fs = (FILE *) NULL, *fd = (FILE *) NULL; - if (!(fs = fopen(src, "rb"))) - { - wxString s = "Cannot open source file "; - s += src; - s += "."; - wxMessageBox( s, "FileMaker" ); - return; - } - else - if (!(fd = fopen(dest, "wb"))) - { - fclose(fs); - wxString s = "Cannot open target file "; - s += dest; - s += "."; - wxMessageBox( s, "FileMaker" ); - return; - }; - int ch; - long kcounter = 0; - while (!m_stop) - { - int counter = 0; - while ((ch = getc( fs )) != EOF) - { - putc( ch, fd ); - counter++; - if (counter == 1000) break; - }; - kcounter++; - m_statusMsg->SetLabel( IntToString( kcounter) ); - wxYield(); - if (ch == EOF) break; - }; - fclose( fs ); - fclose( fd ); -}; - - -//----------------------------------------------------------------------------- -// wxDeleteStatusDia -//----------------------------------------------------------------------------- - -/* - -IMPLEMENT_DYNAMIC_CLASS(wxDeleteStatusDia,wxDialogBox); - -wxDeleteStatusDia::wxDeleteStatusDia( wxFrame *parent, wxStringList *files ) : - wxDialogBox( parent, "FileMaker delete job control", TRUE, - 180, 180, 500, 200, wxCAPTION | wxTRANSIENT ) -{ - int w = 0; - int h = 0; - GetSize( &w, &h ); - - m_files = files; - m_stop = FALSE; - m_countFiles = 0; - m_countDirs = 0; - - wxFont *myFont = wxTheFontList->FindOrCreateFont( 12, wxROMAN, wxNORMAL, wxNORMAL ); - SetLabelFont( myFont ); - SetButtonFont( myFont ); - - wxStaticText *msg = new wxStaticText( this, "Deleting file or directory:", 10, 10 ); - m_targetMsg = new wxStaticText( this, "", 80, 40, 300 ); - msg = new wxStaticText( this, " Directories deleted:", 10, 80 ); - m_dirsMsg = new wxStaticText( this, "0", 120, 80, 80 ); - msg = new wxStaticText( this, " Files deleted:", 10, 110 ); - m_filesMsg = new wxStaticText( this, "0", 120, 110, 100 ); - - m_cancelButton = new wxButton( this, NULL, "Return", w-130, h-50, 85, 30 ); - - Centre( wxVERTICAL | wxHORIZONTAL ); - - m_timer = new wxDeleteTimer( this ); - m_timer->Start( 300, TRUE ); - - Show( TRUE ); -}; - -wxDeleteStatusDia::~wxDeleteStatusDia() -{ - delete m_timer; -}; - -void wxDeleteStatusDia::OnCommand( wxWindow &win, wxCommandEvent &WXUNUSED(event) ) -{ - if (&win == m_cancelButton) - { - if (m_stop) Show( FALSE ); - m_stop = TRUE; - return; - }; -}; - -void wxDeleteStatusDia::DoDelete(void) -{ - while (wxTheApp->Pending()) wxTheApp->Dispatch(); - wxNode *node = m_files->First(); - while (node) - { - char *target = (char*)node->Data(); - if (wxDirExists( target )) - DeleteDir( target ); - else - DeleteFile( target ); - if (m_stop) return; - node = node->Next(); - }; - m_stop = TRUE; -}; - -void wxDeleteStatusDia::DeleteDir( char *target ) -{ - wxString s = target; - s += "// *"; - wxStringList list; - char *f = wxFindFirstFile( s ); - while (f) - { - list.Add( f ); - f = wxFindNextFile(); - }; - wxNode *node = list.First(); - while (node) - { - f = (char*)node->Data(); - if (wxDirExists( f )) - DeleteDir( f ); - else - DeleteFile( f ); - if (m_stop) return; - node = node->Next(); - }; - if (!wxRmdir( target )) - { - s = "Could not remove directory "; - s += target; - s += "."; - wxMessageBox( s, "FileMaker" ); - return; - } - else - { - m_countDirs++; - m_dirsMsg->SetLabel( wxIntToString( m_countDirs) ); - }; -}; - -void wxDeleteStatusDia::DeleteFile( char *target ) -{ - m_targetMsg->SetLabel( target ); - while (wxTheApp->Pending()) wxTheApp->Dispatch(); - if (!wxRemoveFile( target )) - { - wxString s = "Could not delete file "; - s += target; - s += "."; - wxMessageBox( s, "FileMaker" ); - } - else - { - m_countFiles++; - m_filesMsg->SetLabel( wxIntToString( m_countFiles) ); - }; -}; - -*/ diff --git a/user/wxFile/FMJobs.h b/user/wxFile/FMJobs.h deleted file mode 100644 index 7d62e1539b..0000000000 --- a/user/wxFile/FMJobs.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * File: FMJobs.h - * - * Author: Robert Roebling - * - * Copyright: (C) 1997, GNU (Robert Roebling) - * - * This program 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef FMJobs_h -#define FMJobs_h - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/defs.h" -#include "wx/dialog.h" -#include "wx/frame.h" -#include "wx/button.h" -#include "wx/stattext.h" -#include "wx/timer.h" - -//----------------------------------------------------------------------------- -// derived classes -//----------------------------------------------------------------------------- - -class wxCopyStatusDia; -class wxDeleteStatusDia; -class wxCopyTimer; -class wxDeleteTimer; - -//----------------------------------------------------------------------------- -// wxCopyStatusDia -//----------------------------------------------------------------------------- - -class wxCopyStatusDia: public wxDialog -{ - DECLARE_DYNAMIC_CLASS( wxCopyStatusDia ); - - private: - - wxString m_dest; - wxArrayString *m_files; - wxButton *m_cancelButton; - wxStaticText *m_sourceMsg; - wxStaticText *m_destMsg; - wxStaticText *m_statusMsg; - bool m_stop; - wxTimer *m_timer; - - public: - - wxCopyStatusDia(void) : wxDialog() {}; - wxCopyStatusDia( wxFrame *parent, const wxString &dest, wxArrayString *files ); - ~wxCopyStatusDia(); - void OnCommand( wxCommandEvent &event ); - void DoCopy(void); - - private: - void CopyDir( wxString &srcDir, wxString &destDir ); - void CopyFile( wxString &src, wxString &destDir ); - - DECLARE_EVENT_TABLE(); -}; - -//----------------------------------------------------------------------------- -// wxDeleteStatusDia -//----------------------------------------------------------------------------- - -/* -class wxDeleteStatusDia: public wxDialog -{ - DECLARE_DYNAMIC_CLASS( wxDeleteStatusDia ); - - private: - - wxArrayString *m_files; - wxButton *m_cancelButton; - wxStaticText *m_targetMsg; - wxStaticText *m_filesMsg,*m_dirsMsg; - bool m_stop; - wxTimer *m_timer; - int m_countFiles,m_countDirs; - - public: - - wxDeleteStatusDia(void) : wxDialog() {}; - wxDeleteStatusDia( wxFrame *parent, wxArrayString *files ); - ~wxDeleteStatusDia(); - void OnCommand( wxCommandEvent &event ); - void DoDelete(void); - - private: - void DeleteDir( wxString &target ); - void DeleteFile( wxString &target ); - - DECLARE_EVENT_TABLE(); -}; -*/ - -//----------------------------------------------------------------------------- -// wxTimer -//----------------------------------------------------------------------------- - -class wxCopyTimer: public wxTimer -{ - private: - wxCopyStatusDia *m_owner; - - public: - wxCopyTimer( wxCopyStatusDia *owner ) { m_owner = owner; }; - void Notify() { m_owner->DoCopy(); }; -}; - -/* -class wxDeleteTimer: public wxTimer -{ - private: - wxDeleteStatusDia *m_owner; - - public: - wxDeleteTimer( wxDeleteStatusDia *owner ) { m_owner = owner; }; - void Notify() { m_owner->DoDelete(); }; -}; -*/ - -#endif // FMJobs_h - - diff --git a/user/wxFile/Makefile b/user/wxFile/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/user/wxFile/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/user/wxFile/Makefile.in b/user/wxFile/Makefile.in deleted file mode 100644 index d7eebc5f25..0000000000 --- a/user/wxFile/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# WXXT base directory -WXBASEDIR=@WXBASEDIR@ - -# set the OS type for compilation -OS=@OS@ -# compile a library only -RULE=bin - -# define library name -BIN_TARGET=wxFile -# define library sources -BIN_SRC=\ -wxFile.cpp filectrl.cpp dirctrl.cpp FMJobs.cpp - -#define library objects -BIN_OBJ=\ -wxFile.o filectrl.o dirctrl.o FMJobs.o - -# additional things needed to link -BIN_LINK= - -# additional things needed to compile -ADD_COMPILE= - -# include the definitions now -include ../../../template.mak diff --git a/user/wxFile/commanderview.xpm b/user/wxFile/commanderview.xpm deleted file mode 100644 index 1ed8d8d47d..0000000000 --- a/user/wxFile/commanderview.xpm +++ /dev/null @@ -1,31 +0,0 @@ -/* XPM */ -static char * commanderview_xpm[] = { -"22 22 3 1", -" c None", -". c #000000000000", -"X c #FFFFFFFFFFFF", -" ", -" ", -" ", -" ", -" ", -" ................. ", -" .XXXXXXX.XXXXXXX. ", -" .XX...XX.XX...XX. ", -" .XXXXXXX.XXXXXXX. ", -" .XX...XX.XX..XXX. ", -" .XXXXXXX.XXXXXXX. ", -" .XX..XXX.XX...XX. ", -" .XXXXXXX.XXXXXXX. ", -" .XX...XX.XX...XX. ", -" .XXXXXXX.XXXXXXX. ", -" .XX...XX.XX...XX. ", -" .XXXXXXX.XXXXXXX. ", -" ................. ", -" ", -" ", -" ", -" "}; - - - diff --git a/user/wxFile/delete.xpm b/user/wxFile/delete.xpm deleted file mode 100644 index 41d24d2778..0000000000 --- a/user/wxFile/delete.xpm +++ /dev/null @@ -1,31 +0,0 @@ -/* XPM */ -static char * delete_xpm[] = { -"22 22 6 1", -" s None c None", -". c black", -"X c red2", -"o c white", -"O c #DEF6DEF6DEF6", -"+ c grey70", -" ", -" ", -" ", -" ........ ", -" XXX .ooooooO. ", -" XXXXOoooooOo. X ", -" XXXOoooo Oo. XX ", -" .XXXOoo ...XX ", -" .+XXXOo OOXX ", -" .O++XXXOXXX. ", -" .ooO+XXXXX+. ", -" .oooOXXXX+o. ", -" .ooXXXX+XXo. ", -" .XXXX++OXXO. ", -" XXXX++Ooo+XX. ", -" XXXX++OooooO+XX ", -" XXX .OoooooooOXX ", -" .ooooooooo+XX ", -" ...........XX ", -" X ", -" ", -" "}; diff --git a/user/wxFile/dirctrl.cpp b/user/wxFile/dirctrl.cpp deleted file mode 100644 index 98b18d709c..0000000000 --- a/user/wxFile/dirctrl.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Author: Robert Roebling - * - * Copyright: (C) 1997,1998 Robert Roebling - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the wxWindows Licence, which - * you have received with this library (see Licence.htm). - * - */ - -#ifdef __GNUG__ -#pragma implementation "dirctrl.h" -#endif - -#include "dirctrl.h" -#include "wx/gdicmn.h" -#include "wx/utils.h" -#include "wx/dnd.h" - -//----------------------------------------------------------------------------- -// wxDirInfo -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxDirInfo,wxObject) - -wxDirInfo::wxDirInfo( const wxString &path ) -{ - m_showHidden = FALSE; - m_path = path; - if (m_path == "/") m_name ="The Computer"; - else - if (m_path == "/home") - { - m_name = "My Home"; - m_path += "/"; - char buf[300]; - wxGetHomeDir( buf ); - m_path = buf; - } - else - if (m_path == "/proc") m_name = "Info Filesystem"; - else - if (m_path == "/mnt") m_name = "Mounted Devices"; - else - if (m_path == "/usr/X11R6") m_name = "User X11"; - else - if (m_path == "/usr") m_name = "User"; - else - if (m_path == "/var") m_name = "Variables"; - else - if (m_path == "/usr/local") m_name = "User local"; - else - if (m_path == "/mnt") m_name = "Mounted Devices"; - else - m_name = wxFileNameFromPath( m_path ); -}; - -wxString wxDirInfo::GetName(void) const -{ - return m_name; -}; - -wxString wxDirInfo::GetPath(void) const -{ - return m_path; -}; - -//----------------------------------------------------------------------------- -// wxDirCtrl -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxDirCtrl,wxTreeCtrl) - -BEGIN_EVENT_TABLE(wxDirCtrl,wxTreeCtrl) - EVT_TREE_ITEM_EXPANDED (-1, wxDirCtrl::OnExpandItem) - EVT_TREE_ITEM_COLLAPSED (-1, wxDirCtrl::OnCollapseItem) - EVT_TREE_DELETE_ITEM (-1, wxDirCtrl::OnDeleteItem) -END_EVENT_TABLE() - -wxDirCtrl::wxDirCtrl(void) -{ - m_showHidden = FALSE; -}; - -wxDirCtrl::wxDirCtrl(wxWindow *parent, const wxWindowID id, const wxString &WXUNUSED(dir), - const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) - : - wxTreeCtrl( parent, id, pos, size, style, name ) -{ - m_showHidden = FALSE; - - wxTreeItem item; - item.m_mask = wxTREE_MASK_TEXT | wxTREE_MASK_CHILDREN | wxTREE_MASK_DATA; - item.m_text = "Sections"; - item.m_children = 1; - m_rootId = InsertItem( 0, item ); - - SetDropTarget( new wxFileDropTarget() ); -}; - -void wxDirCtrl::OnExpandItem( const wxTreeEvent &event ) -{ - if (event.m_item.m_itemId == m_rootId) - { - - wxTreeItem item; - item.m_mask = wxTREE_MASK_TEXT | wxTREE_MASK_CHILDREN | wxTREE_MASK_DATA; - item.m_children = 1; - - wxDirInfo *info = new wxDirInfo( "/" ); - item.m_text = info->GetName(); - item.m_data = (long)info; - InsertItem( m_rootId, item ); - - info = new wxDirInfo( "/home" ); - item.m_text = info->GetName(); - item.m_data = (long)info; - InsertItem( m_rootId, item ); - - info = new wxDirInfo( "/mnt" ); - item.m_text = info->GetName(); - item.m_data = (long)info; - InsertItem( m_rootId, item ); - - info = new wxDirInfo( "/usr" ); - item.m_text = info->GetName(); - item.m_data = (long)info; - InsertItem( m_rootId, item ); - - info = new wxDirInfo( "/usr/X11R6" ); - item.m_text = info->GetName(); - item.m_data = (long)info; - InsertItem( m_rootId, item ); - - info = new wxDirInfo( "/usr/local" ); - item.m_text = info->GetName(); - item.m_data = (long)info; - InsertItem( m_rootId, item ); - - info = new wxDirInfo( "/var" ); - item.m_text = info->GetName(); - item.m_data = (long)info; - InsertItem( m_rootId, item ); - - info = new wxDirInfo( "/proc" ); - item.m_text = info->GetName(); - item.m_data = (long)info; - InsertItem( m_rootId, item ); - - return; - }; - - wxDirInfo *info = (wxDirInfo *)event.m_item.m_data; - if (!info) return; - - wxArrayString slist; - wxString search,path,filename; - - search = info->GetPath(); - search += "/*"; - - path = wxFindFirstFile( search, wxDIR ); - while (!path.IsNull()) - { - filename = wxFileNameFromPath( path ); - if (m_showHidden || (filename[0] != '.')) - { - if ((filename != ".") && - (filename != "..") && - (path != "/home") && - (path != "/usr/X11R6") && - (path != "/usr/local") && - (path != "/usr") && - (path != "/var") && - (path != "/home") && - (path != "/proc") && - (path != "/mnt") - ) - - slist.Add( path ); // ref counting in action ! - }; - path = wxFindNextFile(); - }; - - for (uint i = 0; i < slist.Count(); i++) - { - search = slist[i]; - search += "/*"; - path = wxFindFirstFile( search, wxDIR ); - - wxDirInfo *child = new wxDirInfo( slist[i] ); - wxTreeItem item; - item.m_mask = wxTREE_MASK_TEXT | wxTREE_MASK_CHILDREN | wxTREE_MASK_DATA; - item.m_text = child->GetName(); - item.m_children = 0; - if (!path.IsNull()) item.m_children = 1; - item.m_data = (long)child; - InsertItem( event.m_item.m_itemId, item ); - }; -}; - -void wxDirCtrl::OnCollapseItem( const wxTreeEvent &event ) -{ - DeleteChildren( event.m_item.m_itemId ); -}; - -void wxDirCtrl::OnDeleteItem( const wxTreeEvent &event ) -{ - wxDirInfo *info = (wxDirInfo *)event.m_item.m_data; - if (info) delete info; -}; diff --git a/user/wxFile/dirctrl.h b/user/wxFile/dirctrl.h deleted file mode 100644 index d3ff13c9aa..0000000000 --- a/user/wxFile/dirctrl.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * File: DirCtrl.h - * Purpose: dir tree control - * Author: Robert Roebling - * Created: 1997 - * Updated: - * Copyright: - */ - -#ifndef __DIRCTRLH__ -#define __DIRCTRLH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/treectrl.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxDirInfo; -class wxDirCtrl; - -//----------------------------------------------------------------------------- -// wxDirInfo -//----------------------------------------------------------------------------- - -class wxDirInfo: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxDirInfo) - - public: - - wxString m_name; - wxString m_path; - bool m_showHidden; - - - wxDirInfo() {}; - wxDirInfo( const wxString &path ); - wxString GetName(void) const; - wxString GetPath(void) const; -}; - -//----------------------------------------------------------------------------- -// wxDirCtrl -//----------------------------------------------------------------------------- - -class wxDirCtrl: public wxTreeCtrl -{ - DECLARE_DYNAMIC_CLASS(wxDirCtrl) - - public: - - bool m_showHidden; - int m_dragX,m_dragY; - long m_rootId; - - wxDirCtrl(void); - wxDirCtrl(wxWindow *parent, const wxWindowID id = -1, const wxString &dir = "/", - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - const long style = wxTR_HAS_BUTTONS, - const wxString& name = "wxTreeCtrl" ); - void OnExpandItem( const wxTreeEvent &event ); - void OnCollapseItem( const wxTreeEvent &event ); - void OnDeleteItem( const wxTreeEvent &event ); - - DECLARE_EVENT_TABLE() -}; - -#endif diff --git a/user/wxFile/exit.xpm b/user/wxFile/exit.xpm deleted file mode 100644 index eecc0d3000..0000000000 --- a/user/wxFile/exit.xpm +++ /dev/null @@ -1,29 +0,0 @@ -/* XPM */ -static char * exit_xpm[] = { -"22 22 4 1", -" c None", -". c #000000000000", -"X c #820782078207", -"o c #FFFFFFFFFFFF", -" ", -" ", -" ", -" ", -" ", -" . ", -" ..X .o.X ", -" ..X .ooo.X ", -" .o..oo ..XX ", -" .oo .XXXX ", -" .o .XXX ", -" .o .XX ", -" .o.X.o.X ", -" .o.XX .o.X ", -" .o.XX ..X ", -" ..XX ..X ", -" .XX .X ", -" XX XX ", -" ", -" ", -" ", -" "}; diff --git a/user/wxFile/filectrl.cpp b/user/wxFile/filectrl.cpp deleted file mode 100644 index 5956e5ef42..0000000000 --- a/user/wxFile/filectrl.cpp +++ /dev/null @@ -1,544 +0,0 @@ -/* - * Author: Robert Roebling - * - * Copyright: (C) 1997,1998 Robert Roebling - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the wxWindows Licence, which - * you have received with this library (see Licence.htm). - * - */ - - -#ifdef __GNUG__ -#pragma implementation "filectrl.h" -#endif - -#include "filectrl.h" - -#include "wx/dnd.h" - -#include "sys/types.h" -#include "sys/stat.h" -#include "dirent.h" -#include "pwd.h" -#include "grp.h" -#include "time.h" - -#include "folder.xpm" -#include "txt.xpm" -#include "list.xpm" -#include "find.xpm" - -//----------------------------------------------------------------------------- -// wxFileData -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxFileData,wxObject); - -wxFileData::wxFileData( const wxString &name, const wxString &fname ) -{ - m_name = name; - m_fileName = fname; - - struct stat buff; - stat( m_fileName.GetData(), &buff ); - struct stat lbuff; - lstat( m_fileName.GetData(), &lbuff ); - - struct tm *t = localtime( &lbuff.st_mtime ); -// struct passwd *user = getpwuid( buff.st_uid ); -// struct group *grp = getgrgid( buff.st_gid ); - - m_isDir = S_ISDIR( buff.st_mode ); - m_isLink = S_ISLNK( lbuff.st_mode ); - m_isExe = ((buff.st_mode & S_IXUSR ) == S_IXUSR ); - - m_size = buff.st_size; - - m_hour = t->tm_hour; - m_minute = t->tm_min; - m_month = t->tm_mon+1; - m_day = t->tm_mday; - m_year = t->tm_year; - - m_permissions.sprintf( "%c%c%c", - ((( buff.st_mode & S_IRUSR ) == S_IRUSR ) ? 'r' : '-'), - ((( buff.st_mode & S_IWUSR ) == S_IWUSR ) ? 'w' : '-'), - ((( buff.st_mode & S_IXUSR ) == S_IXUSR ) ? 'x' : '-') ); -}; - -wxString wxFileData::GetName(void) const -{ - return m_name; -}; - -wxString wxFileData::GetFullName(void) const -{ - return m_fileName; -}; - -wxString wxFileData::GetHint(void) const -{ - wxString s = m_fileName; - s += " "; - if (m_isDir) s += " "; - else if (m_isLink) s += " "; - else - { - s += LongToString( m_size ); - s += " bytes "; - }; - s += IntToString( m_day ); - s += "."; - s += IntToString( m_month ); - s += "."; - s += IntToString( m_year ); - s += " "; - s += IntToString( m_hour ); - s += ":"; - s += IntToString( m_minute ); - s += " "; - s += m_permissions; - return s; -}; - -wxString wxFileData::GetEntry( const int num ) -{ - wxString s; - switch (num) - { - case 0: - s = m_name; - break; - case 1: - if (m_isDir) s = ""; - else if (m_isLink) s = ""; - else s = LongToString( m_size ); - break; - case 2: - if (m_day < 10) s = "0"; else s = ""; - s += IntToString( m_day ); - s += "."; - if (m_month < 10) s += "0"; - s += IntToString( m_month ); - s += "."; - if (m_year < 10) s += "0"; // this should happen real soon... - s += IntToString( m_year ); - break; - case 3: - if (m_hour < 10) s = "0"; else s = ""; - s += IntToString( m_hour ); - s += ":"; - if (m_minute < 10) s += "0"; - s += IntToString( m_minute ); - break; - case 4: - s = m_permissions; - break; - default: - s = "No entry"; - break; - }; - return s; -}; - -bool wxFileData::IsDir( void ) -{ - return m_isDir; -}; - -bool wxFileData::IsExe( void ) -{ - return m_isExe; -}; - -bool wxFileData::IsLink( void ) -{ - return m_isLink; -}; - -long wxFileData::GetSize( void ) -{ - return m_size; -}; - -bool wxFileData::NewNameIsLegal( const wxString &s ) -{ - wxString fileName = wxPathOnly( m_fileName ); - fileName += "/"; - fileName += s; - return (!wxFileExists( fileName )); -}; - -bool wxFileData::Rename( const wxString &s ) -{ - wxString fileName = wxPathOnly( m_fileName ); - fileName += "/"; - fileName += s; - bool ret = wxRenameFile( m_fileName, fileName ); - if (ret) - { - m_fileName = fileName; - m_name = s; - }; - return ret; -}; - -void wxFileData::MakeItem( wxListItem &item ) -{ - item.m_text = m_name; - item.m_colour = wxBLACK; - if (IsExe()) item.m_colour = wxRED; - if (IsDir()) item.m_colour = wxBLUE; - if (IsLink()) - { - wxColour *dg = wxTheColourDatabase->FindColour( "MEDIUM GREY" ); - item.m_colour = dg; - }; - item.m_data = (long)this; -}; - -//----------------------------------------------------------------------------- -// wxFileCtrl -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxFileCtrl,wxListCtrl); - -BEGIN_EVENT_TABLE(wxFileCtrl,wxListCtrl) - EVT_SET_FOCUS (wxFileCtrl::OnSetFocus) -END_EVENT_TABLE() - -wxFileCtrl *wxFileCtrl::m_lastFocus = (wxFileCtrl *) NULL; - -wxFileCtrl::wxFileCtrl( void ) -{ - m_dirName = "/"; - m_showHidden = FALSE; -}; - -wxFileCtrl::wxFileCtrl( wxWindow *win, const wxWindowID id, const wxString &dirName, - const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) : - wxListCtrl( win, id, pos, size, style, name ) -{ - SetItemSpacing( 40 ); - wxImageList *imageList = new wxImageList( 30, 30 ); - imageList->Add( wxBitmap( folder_xpm ) ); - imageList->Add( wxBitmap( txt_xpm ) ); - imageList->Add( wxBitmap( list_xpm ) ); - imageList->Add( wxBitmap( find_xpm ) ); - - SetImageList( imageList, wxIMAGE_LIST_NORMAL ); - - m_dirName = dirName; - m_showHidden = FALSE; - Update(); - - m_lastFocus = this; - - m_dragStartX = 0; - m_dragStartY = 0; - m_dragCount = 0; - - SetDropTarget( new wxFileDropTarget() ); -}; - -void wxFileCtrl::ChangeToListMode() -{ - SetSingleStyle( wxLC_LIST ); - Update(); -}; - -void wxFileCtrl::ChangeToReportMode() -{ - SetSingleStyle( wxLC_REPORT ); - Update(); -}; - -void wxFileCtrl::ChangeToIconMode() -{ - SetSingleStyle( wxLC_ICON ); - Update(); -}; - -void wxFileCtrl::ShowHidden( bool show ) -{ - m_showHidden = show; - Update(); -}; - -int ListCompare( const long data1, const long data2, const long WXUNUSED(data) ) -{ - wxFileData *fd1 = (wxFileData*)data1 ; - wxFileData *fd2 = (wxFileData*)data2 ; - if (fd1->IsDir() && !fd2->IsDir()) return -1; - if (fd2->IsDir() && !fd1->IsDir()) return 1; - return strcmp( fd1->GetName(), fd2->GetName() ); -}; - -void wxFileCtrl::Update( void ) -{ - DeleteAllItems(); - for (int i = 0; i < 5; i++) DeleteColumn( 0 ); - long my_style = GetWindowStyleFlag(); - if (my_style & wxLC_REPORT) - { - InsertColumn( 0, "Name", wxLIST_FORMAT_LEFT, 110 ); - InsertColumn( 1, "Size", wxLIST_FORMAT_LEFT, 60 ); - InsertColumn( 2, "Date", wxLIST_FORMAT_LEFT, 55 ); - InsertColumn( 3, "Time", wxLIST_FORMAT_LEFT, 50 ); - InsertColumn( 4, "Permissions", wxLIST_FORMAT_LEFT, 120 ); - }; - wxFileData *fd = (wxFileData *) NULL; - wxListItem item; - item.m_mask = wxLIST_MASK_TEXT + wxLIST_MASK_DATA; - if (my_style & wxLC_ICON) item.m_mask += wxLIST_MASK_IMAGE; - item.m_itemId = 0; - item.m_col = 0; - wxString s; - wxString res = m_dirName + "/*"; - char *f = wxFindFirstFile( res.GetData(), 0 ); - while (f) - { - res = wxFileNameFromPath( f ); - fd = new wxFileData( res, f ); - s = fd->GetName(); - if (m_showHidden || (s[0] != '.')) - { - fd->MakeItem( item ); - if (my_style & wxLC_REPORT) - { - InsertItem( item ); - for (int i = 1; i < 5; i++) SetItem( item.m_itemId, i, fd->GetEntry( i) ); - } - else if (my_style & wxLC_LIST) - { - InsertItem( item ); - } - else if (my_style & wxLC_ICON) - { - if (fd->IsDir()) item.m_image = 0; else item.m_image = 1; - InsertItem( item ); - }; - item.m_itemId++; - }; - f = wxFindNextFile(); - }; - SortItems( ListCompare, 0 ); -}; - - -int wxFileCtrl::FillList( wxStringList &list ) -{ - long index = -1; - int count = 0; - wxString s; - for (;;) - { - index = GetNextItem( index, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); - if (index == -1) break; - wxListItem item; - item.m_itemId = index; - GetItem( item ); - wxFileData *fd = (wxFileData*)item.m_data; - list.Add( fd->GetFullName() ); - index++; - count++; - }; - if (count == 0) - { - index = GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_FOCUSED ); - if (index == -1) return 0; - wxListItem item; - item.m_itemId = index; - GetItem( item ); - wxFileData *fd = (wxFileData*)item.m_data; - list.Add( fd->GetFullName() ); - count = 1; - }; - return count; -}; - -void wxFileCtrl::DeleteFiles(void) -{ -/* - wxStringList list; - int count = FillList( list ); - if (count > 0) - { - wxString s = "Delete "; - s += wxIntToString( count ); - s += " selected file"; - if (count > 1) s += "s"; - s += " or director"; - if (count > 1) s += "ies?"; else s+= "y?"; - if (wxYES == wxMessageBox( s, "Delete", wxYES_NO )) - wxDeleteStatusDia( NULL, &list ); - }; -*/ -}; - -void wxFileCtrl::CopyFiles( char *WXUNUSED(dest) ) -{ -/* - wxStringList list; - int count = FillList( list ); - wxString s = dest; - int ret = 0; // 0 = nix, 1 = copy, 2 = move - wxCopyMoveDia( (wxFrame*)GetParent(), count, &ret, &s ); - if (ret == 1) - wxCopyStatusDia( NULL, s, &list ); -*/ -}; - -void wxFileCtrl::MoveFiles( char *WXUNUSED(dest) ) -{ -}; - -void wxFileCtrl::RenameFile(void) -{ -}; - -void wxFileCtrl::MakeDir(void) -{ -/* - wxString s = wxGetTextFromUser( "Enter new directory name:", "Make directory" ); - if (s.IsNull()) return; - if (s == "") return; - if ((s == ".") || (s == "..")) - { - wxMessageBox( "This was obviously an invalid directory name.", "Go away." ); - return; - }; - wxString dir; - GetDir( dir ); - dir += "/"; - dir += s; - if (wxFileExists( dir )) - { - wxMessageBox( "Filename exists already. Cannot create directoy.", "Make directory" ); - return; - }; - wxMkdir( dir ); - Update(); -*/ -}; - -void wxFileCtrl::GoToParentDir(void) -{ - wxString s = m_dirName; - int pos = s.Last( '/' ); - if ((pos >= 0) && (s != "/")) - { - s.Remove( pos, s.Length()-pos ); - if (s.Length() == 0) s = "/"; - m_dirName = s; - Update(); - }; -}; - -void wxFileCtrl::GoToHomeDir(void) -{ - wxString s = wxGetUserHome( wxString() ); - m_dirName = s; - Update(); -}; - -void wxFileCtrl::GoToDir( const wxString &dir ) -{ - m_dirName = dir; - Update(); -}; - -void wxFileCtrl::GetDir( wxString &dir ) -{ - dir = m_dirName; -}; - -/* -void wxFileCtrl::OnDropFiles( int WXUNUSED(n), char **WXUNUSED(data), int WXUNUSED(x), int WXUNUSED(y) ) -{ - wxString destDir; - wxPoint pt( x, y ); - int flag = wxLIST_HITTEST_ONITEM; - long hit = HitTest( pt, flag ); - if (hit > -1) - { - wxListItem li; - li.m_itemId = hit; - GetItem( li ); - wxFileData *fd = (wxFileData*)li.m_data; - if (fd->IsDir()) fd->GetFullName( destDir ); - }; - if (destDir.IsNull()) destDir = m_dirName; - int ret = 0; // 0 = nix, 1 = copy, 2 = move - wxCopyMoveDia( (wxFrame*)GetParent(), n, &ret, &destDir ); - if (ret == 1) - { - wxStringList slist; - for (int i = 0; i < n; i++) slist.Add( data[i] ); - wxCopyStatusDia( NULL, destDir.GetData(), &slist ); - Update(); - }; -}; -*/ - -void wxFileCtrl::OnListDeleteItem( wxListEvent &event ) -{ - wxFileData *fd = (wxFileData*)event.m_item.m_data; - delete fd; -}; - -void wxFileCtrl::OnListKeyDown( wxListEvent &event ) -{ - wxFileData *fd = (wxFileData*)event.m_item.m_data; - if (fd->IsDir()) - { - m_dirName = fd->GetFullName(); - Update(); - Refresh(); - return; - }; - if (fd->IsExe()) - { - wxExecute( fd->GetFullName() ); - return; - }; -}; - -void wxFileCtrl::OnListEndLabelEdit( wxListEvent &event ) -{ - wxFileData *fd = (wxFileData*)event.m_item.m_data; - wxString newName = event.m_item.m_text; - if (fd->NewNameIsLegal( newName )) - { - if (fd->Rename( newName )) - { - Update(); - } - else - { - wxString s = "Could not rename file to "; - s += newName; - s += "."; - wxMessageBox( s, "FileMaker", wxOK ); - }; - } - else - { - wxString s = "File name "; - s += newName; - s += " exists already or is invalid.\n"; - s += "Could not rename file."; - wxMessageBox( s, "FileMaker", wxOK ); - }; - return; -}; - -void wxFileCtrl::OnSetFocus( wxFocusEvent &event ) -{ - m_lastFocus = this; - event.Skip(); -}; - diff --git a/user/wxFile/filectrl.h b/user/wxFile/filectrl.h deleted file mode 100644 index f2e202433b..0000000000 --- a/user/wxFile/filectrl.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Author: Robert Roebling - * - * Copyright: (C) 1997,1998 Robert Roebling - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the wxWindows Licence, which - * you have received with this library (see Licence.htm). - * - */ - -#ifndef FileList_h -#define FileList_h - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/wx.h" -#include "wx/listctrl.h" - -//----------------------------------------------------------------------------- -// derived classes -//----------------------------------------------------------------------------- - -class wxFileData; -class wxFileCtrl; - -//----------------------------------------------------------------------------- -// wxFileData -//----------------------------------------------------------------------------- - -class wxFileData : public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxFileData); - - private: - wxString m_name; - wxString m_fileName; - long m_size; - int m_hour; - int m_minute; - int m_year; - int m_month; - int m_day; - wxString m_permissions; - bool m_isDir; - bool m_isLink; - bool m_isExe; - - public: - wxFileData( void ) {}; - wxFileData( const wxString &name, const wxString &fname ); - wxString GetName(void) const; - wxString GetFullName(void) const; - wxString GetHint(void) const; - wxString GetEntry( const int num ); - bool IsDir( void ); - bool IsLink( void ); - bool IsExe( void ); - long GetSize( void ); - bool NewNameIsLegal( const wxString &s ); - bool Rename( const wxString &s ); - void MakeItem( wxListItem &item ); -}; - -//----------------------------------------------------------------------------- -// wxFileCtrl -//----------------------------------------------------------------------------- - -class wxFileCtrl : public wxListCtrl -{ - DECLARE_DYNAMIC_CLASS(wxFileCtrl); - - public: - - static wxFileCtrl* m_lastFocus; - - private: - wxString m_dirName; - bool m_showHidden; - int m_dragStartX; - int m_dragStartY; - int m_dragCount; - - public: - wxFileCtrl( void ); - wxFileCtrl( wxWindow *win, const wxWindowID id, const wxString &dirName, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const long style = wxLC_LIST, const wxString &name = "filelist" ); - void ChangeToListMode(); - void ChangeToReportMode(); - void ChangeToIconMode(); - void ShowHidden( bool show = TRUE ); - void Update( void ); - virtual void StatusbarText( char *WXUNUSED(text) ) {}; - int FillList( wxStringList &list ); - void DeleteFiles(void); - void CopyFiles( char *dest ); - void MoveFiles( char *dest ); - void RenameFile(void); - void MakeDir(void); - void GoToParentDir(void); - void GoToHomeDir(void); - void GoToDir( const wxString &dir ); - void GetDir( wxString &dir ); - void OnListDeleteItem( wxListEvent &event ); - void OnListKeyDown( wxListEvent &event ); - void OnListEndLabelEdit( wxListEvent &event ); - void OnSetFocus( wxFocusEvent &event ); - - DECLARE_EVENT_TABLE() -}; - -#endif // FileList_h diff --git a/user/wxFile/fileopen.xpm b/user/wxFile/fileopen.xpm deleted file mode 100644 index dd384cadaf..0000000000 --- a/user/wxFile/fileopen.xpm +++ /dev/null @@ -1,30 +0,0 @@ -/* XPM */ -static char * fileopen_xpm[] = { -"22 22 5 1", -" c None", -". c #000000000000", -"X c #D75CD75CD75C", -"o c #FFFFFFFFFFFF", -"O c #6DB66DB66DB6", -" ", -" ", -" .... ", -" .. . ", -" ... ", -" ... ", -" .... ", -" .... ", -" .XoX....... ", -" .oXoXoXoXo. ", -" .XoXoXoXoX. ", -" .oXoXo .......... ", -" .XoXo . O O O OO. ", -" .oXo . O O OOOO. ", -" .Xo .OO OOOOOO. ", -" .o . O OOOOOO. ", -" ... O OOOOOO. ", -" ..OOOOOOOOO. ", -" ........... ", -" ", -" ", -" "}; diff --git a/user/wxFile/find.xpm b/user/wxFile/find.xpm deleted file mode 100644 index 82e5ccbf61..0000000000 --- a/user/wxFile/find.xpm +++ /dev/null @@ -1,99 +0,0 @@ -/* XPM */ -static char * find_xpm[] = { -"32 32 64 1", -" s background c None", -". c black", -"X c #FFFFFBEEFFFF", -"o c #AEBAAAAAAEBA", -"O c #4924618579E7", -"+ c #AEBA8A286185", -"@ c #BEFB8A2871C6", -"# c #71C682078617", -"$ c #4924410330C2", -"% c #492451446185", -"& c #49243CF338E3", -"* c #EFBEAAAA8E38", -"= c #AEBA71C66185", -"- c #9E79820769A6", -"; c #5144410338E3", -": c #514434D338E3", -"> c #D75CA28971C6", -", c #514430C230C2", -"< c #618541034103", -"1 c #BEFB8A286185", -"2 c #B6DA7DF75965", -"3 c #410338E330C2", -"4 c #514441034103", -"5 c #AEBA9A696185", -"6 c #9E7971C65144", -"7 c #9E7971C66185", -"8 c #DF7DAEBA9E79", -"9 c #38E338E330C2", -"0 c #410330C22081", -"q c #A69961855144", -"w c #618549244924", -"e c #30C230C22081", -"r c #38E32CB230C2", -"t c #8E3851445144", -"y c #28A228A230C2", -"u c #79E759654924", -"i c #A69969A65965", -"p c #8E3861855144", -"a c #71C661854103", -"s c #208120812081", -"d c #596538E330C2", -"f c #8E3871C65144", -"g c #71C651445144", -"h c #186118611861", -"j c #8E3861854103", -"k c #71C651444103", -"l c #71C641034103", -"z c #514451445144", -"x c #5144514430C2", -"c c #104010401040", -"v c #410330C230C2", -"b c #30C220812081", -"n c #618551444103", -"m c #79E779E779E7", -"M c #6185410330C2", -"N c #38E330C22081", -"B c #6185514430C2", -"V c #38E324922081", -"C c #514400000000", -"Z c #E79DD34CD75C", -"A c #C71BC71BBEFB", -"S c #8E387DF769A6", -"D c #208128A228A2", -"F c #30C238E34103", -" ........ XXXo ", -" ..O......O..Xoo+@ ", -" .#..$.###%..&.@+*X=- ", -" ...;;;.%$:;;;...XX>XXXo ", -" ...$$,$+XXX.##<#..o111@2 ", -" .&.34&+XXoo5.XX#%.$.@@5*X=6 ", -" ..3378X+@@++@@++@@..XX>XXoo+2 ", -".9.0qXXX2++12+XXX.X.w.XXo11@@1 ", -"..erX66==66=11111.o1..1111*XX>>t", -"..yuXi76678X+@2++@@+..:+XXX>+ppa", -"..sdXpppXX=++@=++=8X..w+fqppupge", -"..h=76.....pganknwBMz ", -"XM.w.h..Xb0,*6..v..CC.kklkB<<;m ", -"ZMzX#..;......9..N.rC...lBM c #8E3886178617", -", c #410341038E38", -" ", -" .X ", -" Xoo. ", -" O.Xo ", -" ++ +X@O#o ", -" +$$++ +$$%%#o ", -" +$$$$$+$$$@%#o& ", -" +$$$$$+$$$$O%#o$&& ", -" +$$$$$+$$$$$@##o$$$&+ ", -" +$$**$+$$$$$$%O#o$$$$$& ", -" +$$$$$+$$**$$+@%#o$$$$$$=", -" +$$**$+$$$$$*&$O%-o$$$$$-+", -" +$$$$$+$$**$$+$$@%o;+$$$*+;", -" +$$**$+$$$$$*+$$$O##o$+$*+;+", -" +$$$$$+$$**$$+$$$$@#oo$$++;+ ", -" +$$**$+$$$$$*+$$$$$%%#;$$$$++ ", -" +$$$$$+$$**$$+$$*-$$%#oo$$$$$$*", -"+$$$$$+$$$$$*+$$$$$*-O##;$$$$$-+", -"*:X$$+oo+$$$+$$**$$$$%%;o$$$$*+;", -"+;-:X$$+oo:&$$$$$**$$ooo;$$$*+;+", -" +;*:X$$*+$$**$$$$*-X%o$$$*+;+ ", -" +;**++$$$$$**$$$$.#o$$*+;+ ", -" +*+$$=:$$$$*-$$$##$>Xo+ ", -" +$$$$$:*$$$$-*$;X-+-+ ", -" *+$$$$$$$:*$$$$$;,+;& ", -" +*:+$$$$$$$*:$$$=+;+ ", -" +;o:+$$$$$$$$$*+;+ ", -" +;o:+$$$$$$*+;+ ", -" +;o:+$$$*+;+ ", -" +;o:+*+;+ ", -" +;-+;+ ", -" +;+ "}; diff --git a/user/wxFile/wxFile.cpp b/user/wxFile/wxFile.cpp deleted file mode 100644 index 63c3ed03f6..0000000000 --- a/user/wxFile/wxFile.cpp +++ /dev/null @@ -1,356 +0,0 @@ -/* - * Program: wxFile - * - * Author: Robert Roebling - * - * Copyright: (C) 1997, GNU (Robert Roebling) - * - * This program 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifdef __GNUG__ -#pragma implementation "wxFile.h" -#endif - -#include "wxFile.h" -#include "wx/dnd.h" - -#include "delete.xpm" -#include "home.xpm" -#include "prev.xpm" -#include "fileopen.xpm" -#include "exit.xpm" -#include "listview.xpm" -#include "iconview.xpm" -#include "reportview.xpm" -#include "treeview.xpm" -#include "commanderview.xpm" -#include "singleview.xpm" -#include "save.xpm" -#include "search.xpm" -#include "help.xpm" - -//----------------------------------------------------------------------------- -// main program -//----------------------------------------------------------------------------- - -IMPLEMENT_APP(MyApp) - -//----------------------------------------------------------------------------- -// MyFrame -//----------------------------------------------------------------------------- - -const int ID_FILECTRL = 1000; -const int ID_DIRCTRL = 1001; -const int ID_TOOLBAR = 1002; - -const int ID_QUIT = 100; -const int ID_ABOUT = 101; - -const int ID_LIST = 200; -const int ID_REPORT = 201; -const int ID_ICON = 202; - -const int ID_SINGLE = 203; -const int ID_TREE = 204; -const int ID_COMMANDER = 205; - -const int ID_HOME = 400; -const int ID_PARENT = 401; -const int ID_MOUNT = 402; -const int ID_SEARCH = 403; - -const int ID_DELETE = 501; -const int ID_MD = 502; - - -IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame ) - -BEGIN_EVENT_TABLE(MyFrame,wxFrame) - EVT_MENU (ID_ABOUT, MyFrame::OnAbout) - EVT_MENU (ID_QUIT, MyFrame::OnCommand) - EVT_MENU (ID_HOME, MyFrame::OnCommand) - EVT_MENU (ID_PARENT, MyFrame::OnCommand) - EVT_MENU (ID_LIST, MyFrame::OnView) - EVT_MENU (ID_REPORT, MyFrame::OnView) - EVT_MENU (ID_ICON, MyFrame::OnView) - EVT_MENU (ID_TREE, MyFrame::OnView) - EVT_MENU (ID_SINGLE, MyFrame::OnView) - EVT_MENU (ID_COMMANDER, MyFrame::OnView) - EVT_LIST_KEY_DOWN (ID_FILECTRL, MyFrame::OnListKeyDown) - EVT_LIST_DELETE_ITEM (ID_FILECTRL, MyFrame::OnListDeleteItem) - EVT_LIST_END_LABEL_EDIT (ID_FILECTRL, MyFrame::OnListEndLabelEdit) - EVT_LIST_BEGIN_DRAG (ID_FILECTRL, MyFrame::OnListDrag) - EVT_TREE_KEY_DOWN (ID_DIRCTRL, MyFrame::OnTreeKeyDown) - EVT_TREE_SEL_CHANGED (ID_DIRCTRL, MyFrame::OnTreeSelected) -END_EVENT_TABLE() - -MyFrame::MyFrame(void) : - wxFrame( (wxFrame *) NULL, -1, (char *) "wxFile", wxPoint(20,20), wxSize(470,360) ) -{ - wxMenu *file_menu = new wxMenu( "Menu 1" ); - file_menu->Append( ID_ABOUT, "About.."); - file_menu->Append( ID_QUIT, "Exit"); - - wxMenu *view_menu = new wxMenu( "Menu 2" ); - view_menu->Append( ID_LIST, "List mode"); - view_menu->Append( ID_REPORT, "Report mode"); - view_menu->Append( ID_ICON, "Icon mode"); - - wxMenuBar *menu_bar = new wxMenuBar(); - menu_bar->Append(file_menu, "File" ); - menu_bar->Append(view_menu, "View" ); - menu_bar->Show( TRUE ); - - SetMenuBar( menu_bar ); - - CreateStatusBar( 2 ); - - SetStatusText( "Welcome", 0 ); - SetStatusText( "wxFile v0.2 by Robert Roebling.", 1 ); - - wxToolBar *m_tb = CreateToolBar(); - m_tb->SetMargins( 2, 2 ); - - m_tb->AddSeparator(); - m_tb->AddTool( ID_QUIT, wxBitmap( exit_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Exit wxFile" ); - m_tb->AddSeparator(); - m_tb->AddTool( ID_PARENT, wxBitmap( prev_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Go to parent directory" ); - m_tb->AddTool( ID_HOME, wxBitmap( home_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Go to home directory" ); - m_tb->AddSeparator(); - m_tb->AddTool( ID_DELETE, wxBitmap( delete_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Delete file" ); - m_tb->AddSeparator(); - m_tb->AddTool( ID_MD, wxBitmap( fileopen_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Create directory" ); - m_tb->AddSeparator(); - m_tb->AddTool( ID_LIST, wxBitmap( listview_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "List view" ); - m_tb->AddTool( ID_REPORT, wxBitmap( reportview_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Report view" ); - m_tb->AddTool( ID_ICON, wxBitmap( iconview_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Icon view" ); - m_tb->AddSeparator(); - m_tb->AddTool( ID_TREE, wxBitmap( treeview_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Tree view" ); - m_tb->AddTool( ID_COMMANDER, wxBitmap( commanderview_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Commander view" ); - m_tb->AddTool( ID_SINGLE, wxBitmap( singleview_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Single view" ); - m_tb->AddSeparator(); - m_tb->AddTool( ID_MOUNT, wxBitmap( search_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Mount devices" ); - m_tb->AddSeparator(); - m_tb->AddTool( ID_SEARCH, wxBitmap( save_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Find file(s)" ); - m_tb->AddSeparator(); - m_tb->AddTool( ID_ABOUT, wxBitmap( help_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "About wxFile" ); - - m_tb->Realize(); - - m_splitter = new wxSplitterWindow( this, -1, wxPoint(0,0), wxSize(400,300), wxSP_3D ); - - m_leftFile = (wxFileCtrl *) NULL; - m_dir = new wxDirCtrl( m_splitter, ID_DIRCTRL, "/", wxPoint(10,45), wxSize(200,330) ); - - wxString homepath( "/home" ); - char buf[300]; - wxGetHomeDir( buf ); - homepath = buf; - m_rightFile = new wxFileCtrl( m_splitter, ID_FILECTRL, homepath, wxPoint(220,5), wxSize(200,330) ); - - m_leftFile = new wxFileCtrl( m_splitter, ID_FILECTRL, homepath, wxPoint(0,5), wxSize(200,330) ); - m_leftFile->Show( FALSE ); - - m_leftFile->m_lastFocus = m_rightFile; - - int x = 0; - GetClientSize( &x, (int *) NULL ); - - m_splitter->SplitVertically( m_dir, m_rightFile, x / 3 ); - m_splitter->SetMinimumPaneSize( 10 ); -}; - -void MyFrame::OnView( wxCommandEvent &event ) -{ - int x = 0; - GetClientSize( &x, (int *) NULL ); - switch (event.GetId()) - { - case ID_LIST: - m_rightFile->ChangeToListMode(); - if (m_splitter->IsSplit() && (m_splitter->GetWindow1() == m_leftFile)) - m_leftFile->ChangeToListMode(); - break; - case ID_REPORT: - m_rightFile->ChangeToReportMode(); - if (m_splitter->IsSplit() && (m_splitter->GetWindow1() == m_leftFile)) - m_leftFile->ChangeToReportMode(); - break; - case ID_ICON: - m_rightFile->ChangeToIconMode(); - if (m_splitter->IsSplit() && (m_splitter->GetWindow1() == m_leftFile)) - m_leftFile->ChangeToIconMode(); - break; - case ID_TREE: - if (m_splitter->IsSplit()) - { - if (m_splitter->GetWindow1() != m_dir) - { - m_splitter->Unsplit( m_leftFile ); - m_dir->Show(TRUE); - m_splitter->SplitVertically( m_dir, m_rightFile, x/3 ); - }; - } - else - { - m_dir->Show(TRUE); - m_splitter->SplitVertically( m_dir, m_rightFile, x/3 ); - }; - break; - case ID_SINGLE: - if (m_splitter->IsSplit()) m_splitter->Unsplit( m_splitter->GetWindow1() ); - break; - case ID_COMMANDER: - if (m_splitter->IsSplit()) - { - if (m_splitter->GetWindow1() != m_leftFile) - { - m_splitter->Unsplit( m_dir ); - m_leftFile->ChangeToListMode(); - m_rightFile->ChangeToListMode(); - m_leftFile->Show(TRUE); - m_splitter->SplitVertically( m_leftFile, m_rightFile, x/2 ); - }; - } - else - { - m_leftFile->ChangeToListMode(); - m_rightFile->ChangeToListMode(); - m_leftFile->Show(TRUE); - m_splitter->SplitVertically( m_leftFile, m_rightFile, x/2 ); - }; - break; - default: - break; - }; -}; - -void MyFrame::OnCommand( wxCommandEvent &event ) -{ - switch (event.GetId()) - { - case ID_QUIT: - Close( TRUE ); - break; - case ID_HOME: - m_leftFile->m_lastFocus->GoToHomeDir(); - break; - case ID_PARENT: - m_leftFile->m_lastFocus->GoToParentDir(); - break; - default: - break; - }; -}; - -void MyFrame::OnAbout( wxCommandEvent &WXUNUSED(event) ) -{ - wxDialog dialog( this, -1, "About wxFile", wxPoint(100,100), wxSize(540,350), wxDIALOG_MODAL ); - - int w = 0; - int h = 0; - dialog.GetSize( &w, &h ); - - int x = 30; - int y = 20; - int step = 20; - - (void)new wxStaticBox( &dialog, -1, (const char*)NULL, wxPoint(10,10), wxSize(w-20,h-80) ); - - (void)new wxStaticText( &dialog, -1, "wxFile v0.1", wxPoint(240,y) ); - y += 2*step-10; - - (void)new wxStaticText( &dialog, -1, "Written by Robert Roebling, 1998.", wxPoint(x,y) ); - y += 2*step; - - (void)new wxStaticText( &dialog, -1, - "wxFile uses wxGTK, the GTK port of the wxWindows GUI-library.", wxPoint(x,y) ); - y += step; - (void)new wxStaticText( &dialog, -1, "http://www.freiburg.linux.de/~wxxt", wxPoint(x+50,y) ); - y += step; - (void)new wxStaticText( &dialog, -1, "http://web.ukonline.co.uk/julian.smart/wxwin", wxPoint(x+50,y) ); - y += 2*step; - - (void)new wxStaticText( &dialog, -1, "wxFile Copyright: GPL.", wxPoint(x,y) ); - y += 2*step; - (void)new wxStaticText( &dialog, -1, "For questions concerning wxGTK, you may mail to:", wxPoint(x,y) ); - y += step; - (void)new wxStaticText( &dialog, -1, "roebling@ruf.uni-freiburg.de", wxPoint(x+50,y) ); - - (void) new wxButton( &dialog, wxID_OK, "Return", wxPoint(w/2-40,h-50), wxSize(80,30) ); - - dialog.Fit(); - - dialog.ShowModal(); -}; - -void MyFrame::OnListKeyDown( wxListEvent &event ) -{ - m_rightFile->m_lastFocus->OnListKeyDown( event ); -}; - -void MyFrame::OnListDeleteItem( wxListEvent &event ) -{ - m_rightFile->m_lastFocus->OnListDeleteItem( event ); -}; - -void MyFrame::OnListEndLabelEdit( wxListEvent &event ) -{ - m_rightFile->m_lastFocus->OnListEndLabelEdit( event ); -}; - -void MyFrame::OnListDrag( wxListEvent &event ) -{ - wxFileDataObject data; - data.AddFile( "/home/karl/test.txt" ); - - wxDropSource drag( data, m_leftFile->m_lastFocus ); - drag.DoDragDrop(); -}; - -void MyFrame::OnTreeSelected( wxTreeEvent &event ) -{ - wxDirInfo *info = (wxDirInfo*) event.m_item.m_data; - if (info) SetStatusText( info->GetPath() ); -}; - -void MyFrame::OnTreeKeyDown( wxTreeEvent &event ) -{ - wxDirInfo *info = (wxDirInfo*) event.m_item.m_data; - if (info) m_rightFile->GoToDir( info->GetPath() ); -}; - -//----------------------------------------------------------------------------- -// MyApp -//----------------------------------------------------------------------------- - -MyApp::MyApp(void) : - wxApp( ) -{ -}; - -bool MyApp::OnInit(void) -{ - wxFrame *frame = new MyFrame(); - frame->Show( TRUE ); - - return TRUE; -}; - - - - - diff --git a/user/wxFile/wxFile.h b/user/wxFile/wxFile.h deleted file mode 100644 index 9337c77db1..0000000000 --- a/user/wxFile/wxFile.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Program: wxFile - * - * Author: Robert Roebling - * - * Copyright: (C) 1997, GNU (Robert Roebling) - * - * This program 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __WXFILEH__ -#define __WXFILEH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/wx.h" -#include "wx/dcscreen.h" -#include "wx/splitter.h" -#include "wx/toolbar.h" -#include "filectrl.h" -#include "dirctrl.h" - -//----------------------------------------------------------------------------- -// derived classes -//----------------------------------------------------------------------------- - -class MyFrame; -class MyApp; - -//----------------------------------------------------------------------------- -// MyFrame -//----------------------------------------------------------------------------- - -class MyFrame: public wxFrame -{ - DECLARE_DYNAMIC_CLASS(MyFrame) - - public: - - MyFrame(void); - void OnCommand( wxCommandEvent &event ); - void OnAbout( wxCommandEvent &event ); - void OnView( wxCommandEvent &event ); - void OnListKeyDown( wxListEvent &event ); - void OnListDeleteItem( wxListEvent &event ); - void OnListEndLabelEdit( wxListEvent &event ); - void OnListDrag( wxListEvent &event ); - void OnTreeSelected( wxTreeEvent &event ); - void OnTreeKeyDown( wxTreeEvent &event ); - - wxSplitterWindow *m_splitter; - wxFileCtrl *m_rightFile; - wxFileCtrl *m_leftFile; - wxDirCtrl *m_dir; - - DECLARE_EVENT_TABLE() -}; - -//----------------------------------------------------------------------------- -// MyApp -//----------------------------------------------------------------------------- - -class MyApp: public wxApp -{ - public: - - MyApp(void); - virtual bool OnInit(void); -}; - -#endif // __WXFILEH__ diff --git a/user/wxTest/.cvsignore b/user/wxTest/.cvsignore deleted file mode 100644 index 4daa84b813..0000000000 --- a/user/wxTest/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Linux -linux-gnu diff --git a/user/wxTest/Makefile b/user/wxTest/Makefile deleted file mode 100644 index bccce53f76..0000000000 --- a/user/wxTest/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makeapp diff --git a/user/wxTest/Makefile.in b/user/wxTest/Makefile.in deleted file mode 100644 index a962e10290..0000000000 --- a/user/wxTest/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# WXXT base directory -WXBASEDIR=@WXBASEDIR@ - -# set the OS type for compilation -OS=@OS@ -# compile a library only -RULE=bin - -# define library name -BIN_TARGET=wxTest -# define library sources -BIN_SRC=\ -wxTest.cpp - -#define library objects -BIN_OBJ=\ -wxTest.o - -# additional things needed to link -BIN_LINK= - -# additional things needed to compile -ADD_COMPILE= - -# include the definitions now -include ../../../template.mak diff --git a/user/wxTest/folder.xpm b/user/wxTest/folder.xpm deleted file mode 100644 index 7a36fa27f1..0000000000 --- a/user/wxTest/folder.xpm +++ /dev/null @@ -1,48 +0,0 @@ -/* XPM */ -static char * folder_xpm[] = { -"33 33 12 1", -" c None", -". c #D75CA69979E7", -"X c #208120812081", -"o c #FFFFFFFFFFFF", -"O c #B6DA79E74924", -"+ c #596559655965", -"@ c #410341034103", -"# c #514451445144", -"$ c #000000000820", -"% c #8E38596530C2", -"& c #8E3886178617", -"* c #492479E769A6", -" ", -" .. XXX ", -" .o.. X.XXX ", -" .ooo..OOOXXX ", -" .ooooo..OOOXXX ++ ", -"XXX .ooooooo..OOOXXX @#++@ ", -"XOX@X.ooooooooo...OOO@XX+X#+++ ", -"X...@@$.oooooooooo...OOXXX@X@+ ", -"O.....@XXOooooooooooo..OOOX@@X ", -"XO......@%X.ooooooooooo..%%OX@ ", -".O........@XX.oooooooooo.X%XX ", -" %O.........@@$.oooooooo.XX%X ", -" %O...........@@$.oooooo.X%X# ", -" %O.............@@X.oooo.XX%& ", -" .@...............@XX.oo.@XX ", -" %.................@X.o.XXX ", -" OO................O%X..XX@ ", -" +OO.......O..OOOOOOO@..@X& ", -" .%O....OOOOOOOOOOOOOX.+XX ", -" XOOOOOOOOOOOOOOOOOOX+*XX ", -" @OOOOO.OOOOOOOOOOOOX*+XX ", -" .%OOOOOOOOOOOOOOO%OXX#XX ", -" XOOOOOOOOOOO%O%O%%OX++& ", -" @O%O%OO%O%%O%%%%%%%XXX ", -" XXXO%%%%%%%%%%%%%%XXX ", -" OXXX%%%%%%%%%%%%@XX# ", -" OX@X%%%%%%%%%%%XXX ", -" OXXX%%%O%%%%%XXX ", -" OXXX%%%%%%%XX* ", -" OX@X%%%%X%X& ", -" OXXX%%%XX ", -" OXXX%%@ ", -" OXXX "}; diff --git a/user/wxTest/horse.png b/user/wxTest/horse.png deleted file mode 100644 index 326b7c7867..0000000000 Binary files a/user/wxTest/horse.png and /dev/null differ diff --git a/user/wxTest/list.xpm b/user/wxTest/list.xpm deleted file mode 100644 index b0162e2b07..0000000000 --- a/user/wxTest/list.xpm +++ /dev/null @@ -1,45 +0,0 @@ -/* XPM */ -static char * list_xpm[] = { -"32 32 10 1", -" c #DF7DDF7DDF7D", -". c #9E799E79A699", -"X c #AEBAAEBAAEBA", -"o c #FFFFFFFFFFFF", -"O c #514451445144", -"+ c #410341034103", -"@ c #596559655965", -"# c #000000000000", -"$ c #BEFBBEFBBEFB", -"% c #208120812081", -" ", -" . ", -" Xo.. ", -" Xoooo.X ", -" Xooooooo.X ", -" XooooO+ooooXX ", -" XoooooooO+ooo.. ", -" XooooOOoooo@@ooo.. ", -" XoooooooOOooooooooo.X ", -" Xoooo@Ooooo+@oooO+oooo.X", -" Xooooooo@OoooooooooO+oooo", -" XooooooooooO@oooOOoooo@@oo", -" XooooO+ooooooooooooOOoooooo", -" XoooooooO+oooooo@Ooooo+@oooX", -" XooooOOoooo@@oooooo@OooooooOX", -" XoooooooOOooooooooooooO@oooOX#", -" Xoooo@Ooooo+@oooO+oooooooooOX#X", -"Xooooooo@OoooooooooO+ooooooOX#XX", -"O@$oooooooO@oooOOoooo@@oooOX#XX ", -"X#+@$ooooooooooooOOooooooOX#XX ", -" XX#O@ooooooo@Ooooo+@oooOX#XX ", -" XX#OXooooooo@OooooooOX#X ", -" XXO@XoooooooO@oooOX#X ", -" XX#%@XoooooooooOX#X ", -" XX#%@XooooooOX#X ", -" XX#%@XoooOX#X ", -" XX#%@XOX#X ", -" XX#+X#X ", -" XXXX ", -" ", -" ", -" "}; diff --git a/user/wxTest/wxTest.cpp b/user/wxTest/wxTest.cpp deleted file mode 100644 index 5e78f73b23..0000000000 --- a/user/wxTest/wxTest.cpp +++ /dev/null @@ -1,580 +0,0 @@ -/* - * Program: wxTest - * - * Author: Robert Roebling - * - * Copyright: (C) 1997, GNU (Robert Roebling) - * - * This program 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifdef __GNUG__ -#pragma implementation "wxTest.h" -#endif - -#include "wxTest.h" - -#include "folder.xpm" -#include "list.xpm" - -//----------------------------------------------------------------------------- -// main program -//----------------------------------------------------------------------------- - -IMPLEMENT_APP(MyApp) - -//----------------------------------------------------------------------------- -// MyDialog -//----------------------------------------------------------------------------- - -const int ID_RETURN = 100; -const int ID_HELLO = 101; - -const int ID_CHECKBOX = 110; -const int ID_CHECKBOX_CHECK = 110; -const int ID_CHECKBOX_UNCHECK = 112; - -const int ID_TEXTCTRL = 115; -const int ID_TEXTCTRL_SET = 116; -const int ID_TEXTCTRL_DEL = 117; - -const int ID_CHOICE = 120; -const int ID_CHOICE_SEL_NUM = 121; -const int ID_CHOICE_SEL_STR = 122; -const int ID_CHOICE_CLEAR = 123; -const int ID_CHOICE_APPEND = 124; - -const int ID_LISTBOX = 130; -const int ID_LISTBOX_SEL_NUM = 131; -const int ID_LISTBOX_SEL_STR = 132; -const int ID_LISTBOX_CLEAR = 133; -const int ID_LISTBOX_APPEND = 134; - -const int ID_RADIOBOX = 130; -const int ID_RADIOBOX_SEL_NUM = 131; -const int ID_RADIOBOX_SEL_STR = 132; - -BEGIN_EVENT_TABLE(MyDialog,wxDialog) - EVT_BUTTON (ID_RETURN, MyDialog::OnReturnButton) - EVT_BUTTON (ID_HELLO, MyDialog::OnHelloButton) - EVT_CHECKBOX (ID_CHECKBOX, MyDialog::OnCheckBox) - EVT_BUTTON (ID_CHECKBOX_CHECK, MyDialog::OnCheckBoxButtons) - EVT_BUTTON (ID_CHECKBOX_UNCHECK, MyDialog::OnCheckBoxButtons) - EVT_TEXT (ID_TEXTCTRL, MyDialog::OnTextCtrl) - EVT_BUTTON (ID_TEXTCTRL_SET, MyDialog::OnTextCtrlButtons) - EVT_BUTTON (ID_TEXTCTRL_DEL, MyDialog::OnTextCtrlButtons) - EVT_CHOICE (ID_CHOICE, MyDialog::OnChoice) - EVT_BUTTON (ID_CHOICE_SEL_NUM, MyDialog::OnChoiceButtons) - EVT_BUTTON (ID_CHOICE_SEL_STR, MyDialog::OnChoiceButtons) - EVT_BUTTON (ID_CHOICE_CLEAR, MyDialog::OnChoiceButtons) - EVT_BUTTON (ID_CHOICE_APPEND, MyDialog::OnChoiceButtons) - EVT_LISTBOX (ID_LISTBOX, MyDialog::OnListBox) - EVT_BUTTON (ID_LISTBOX_SEL_NUM, MyDialog::OnListBoxButtons) - EVT_BUTTON (ID_LISTBOX_SEL_STR, MyDialog::OnListBoxButtons) - EVT_BUTTON (ID_LISTBOX_CLEAR, MyDialog::OnListBoxButtons) - EVT_BUTTON (ID_LISTBOX_APPEND, MyDialog::OnListBoxButtons) - EVT_RADIOBOX (ID_RADIOBOX, MyDialog::OnRadioBox) - EVT_BUTTON (ID_RADIOBOX_SEL_NUM, MyDialog::OnRadioBoxButtons) - EVT_BUTTON (ID_RADIOBOX_SEL_STR, MyDialog::OnRadioBoxButtons) -END_EVENT_TABLE() - -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(MyDialog, wxDialog) - -MyDialog::MyDialog( wxWindow *parent ) : - wxDialog( parent, -1, "TestDialog", wxPoint(20,100), wxSize(700,400), wxDIALOG_MODAL ) -{ - m_text1 = (wxStaticText *) NULL; - m_text2 = (wxStaticText *) NULL; - - (void)new wxStaticBox( this, -1, "CheckBox group", wxPoint(20,10), wxSize(140,180) ); - m_checkbox = new wxCheckBox( this, ID_CHECKBOX, "CheckBox", wxPoint(40,35), wxSize(100,30) ); - (void)new wxButton( this, ID_CHECKBOX_CHECK, "Check", wxPoint(40,85), wxSize(100,30) ); - (void)new wxButton( this, ID_CHECKBOX_UNCHECK, "Uncheck", wxPoint(40,135), wxSize(100,30) ); - - (void)new wxStaticBox( this, -1, "TextCtrl group", wxPoint(20,200), wxSize(140,180) ); - m_textctrl = new wxTextCtrl( this, ID_TEXTCTRL, "TextCtrl", wxPoint(40,35+190), wxSize(100,30) ); - (void)new wxButton( this, ID_TEXTCTRL_SET, "Set 'Hi!'", wxPoint(40,85+190), wxSize(100,30) ); - (void)new wxButton( this, ID_TEXTCTRL_DEL, "Delete", wxPoint(40,135+190), wxSize(100,30) ); - - wxString choices[4] = - { - "This", - "is", - "a", - "wonderfull example." - }; - - (void)new wxStaticBox( this, -1, "Choice group", wxPoint(180,10), wxSize(140,330) ); - m_choice = new wxChoice( this, ID_CHOICE, wxPoint(200,35), wxSize(100,30), 4, choices ); - (void)new wxButton( this, ID_CHOICE_SEL_NUM, "Select #2", wxPoint(200,130), wxSize(100,30) ); - (void)new wxButton( this, ID_CHOICE_SEL_STR, "Select 'This'", wxPoint(200,180), wxSize(100,30) ); - (void)new wxButton( this, ID_CHOICE_CLEAR, "Clear", wxPoint(200,230), wxSize(100,30) ); - (void)new wxButton( this, ID_CHOICE_APPEND, "Append 'Hi!'", wxPoint(200,280), wxSize(100,30) ); - - (void)new wxStaticBox( this, 100, "ListBox group", wxPoint(340,10), wxSize(140,330) ); - m_listbox = new wxListBox( this, ID_LISTBOX, wxPoint(360,35), wxSize(100,70), 4, choices ); - (void)new wxButton( this, ID_LISTBOX_SEL_NUM, "Select #2", wxPoint(360,130), wxSize(100,30) ); - (void)new wxButton( this, ID_LISTBOX_SEL_STR, "Select 'This'", wxPoint(360,180), wxSize(100,30) ); - (void)new wxButton( this, ID_LISTBOX_CLEAR, "Clear", wxPoint(360,230), wxSize(100,30) ); - (void)new wxButton( this, ID_LISTBOX_APPEND, "Append 'Hi!'", wxPoint(360,280), wxSize(100,30) ); - - (void)new wxStaticBox( this, -1, "RadioBox group", wxPoint(500,10), wxSize(180,230) ); - m_radiobox = new wxRadioBox( this, ID_RADIOBOX, "Test", wxPoint(520,35), wxSize(-1,-1), 4, choices, - 1, wxRA_VERTICAL ); - - (void)new wxButton( this, ID_HELLO, "wxScreenDC", wxPoint(540,280), wxSize(120,40) ); - (void)new wxButton( this, ID_RETURN, "Return", wxPoint(540,340), wxSize(120,40) ); - - m_text1 = new wxStaticText( this, -1, "No event.", wxPoint(170,350), wxSize(300,-1) ); - m_text2 = new wxStaticText( this, -1, "No information.", wxPoint(170,370), wxSize(300,-1) ); - - InitDialog(); -}; - -void MyDialog::OnTextCtrl( wxCommandEvent &WXUNUSED(event) ) -{ -}; - -void MyDialog::OnTextCtrlButtons( wxCommandEvent &event ) -{ - switch (event.GetId()) - { - case ID_TEXTCTRL_SET: - { - m_textctrl->SetValue( "Hi!" ); - break; - }; - case ID_TEXTCTRL_DEL: - { - m_textctrl->Delete(); - break; - }; - }; -}; - -void MyDialog::OnRadioBox( wxCommandEvent &event ) -{ - if (!m_text1) return; - m_text1->SetLabel( "RadioBox Event:"); - wxString tmp = "RadioBox selection string is: "; - tmp += event.GetString(); - m_text2->SetLabel( tmp ); -}; - -void MyDialog::OnRadioBoxButtons( wxCommandEvent &WXUNUSED(event) ) -{ -}; - -void MyDialog::OnListBox( wxCommandEvent &event ) -{ - if (!m_text1) return; - m_text1->SetLabel( "ListBox Event:"); - wxString tmp = "ListBox selection string is: "; - tmp += event.GetString(); - m_text2->SetLabel( tmp ); -}; - -void MyDialog::OnListBoxButtons( wxCommandEvent &event ) -{ - switch (event.GetId()) - { - case ID_LISTBOX_SEL_NUM: - { - m_listbox->SetSelection( 2 ); - break; - }; - case ID_LISTBOX_SEL_STR: - { - m_listbox->SetStringSelection( "This" ); - break; - }; - case ID_LISTBOX_CLEAR: - { - m_listbox->Clear(); - break; - }; - case ID_LISTBOX_APPEND: - { - m_listbox->Append( "Hi!" ); - break; - }; - }; -}; - -void MyDialog::OnCheckBox( wxCommandEvent &event ) -{ - if (!m_text1) return; - m_text1->SetLabel( "CheckBox Event:"); - wxString tmp = "Checkbox is "; - if (event.Checked()) - tmp += "checked."; - else - tmp += "unchecked."; - m_text2->SetLabel( tmp ); -}; - -void MyDialog::OnCheckBoxButtons( wxCommandEvent &event ) -{ - switch (event.GetId()) - { - case ID_CHECKBOX_CHECK: - { - m_checkbox->SetValue( TRUE ); - break; - }; - case ID_CHECKBOX_UNCHECK: - { - m_checkbox->SetValue( FALSE ); - break; - }; - }; -}; - -void MyDialog::OnChoice( wxCommandEvent &event ) -{ - if (!m_text1) return; - m_text1->SetLabel( "Choice Event:"); - wxString tmp = "Choice selection string is: "; - tmp += event.GetString(); - m_text2->SetLabel( tmp ); -}; - -void MyDialog::OnChoiceButtons( wxCommandEvent &event ) -{ - switch (event.GetId()) - { - case ID_CHOICE_SEL_NUM: - { - m_choice->SetSelection( 2 ); - break; - }; - case ID_CHOICE_SEL_STR: - { - m_choice->SetStringSelection( "This" ); - break; - }; - case ID_CHOICE_CLEAR: - { - m_choice->Clear(); - break; - }; - case ID_CHOICE_APPEND: - { - m_choice->Append( "Hi!" ); - break; - }; - }; -}; - -void MyDialog::OnReturnButton( wxCommandEvent &WXUNUSED(event) ) -{ - EndModal( 1 ); -}; - -void MyDialog::OnHelloButton( wxCommandEvent &WXUNUSED(event) ) -{ - wxMessageDialog *dialog; - dialog = new wxMessageDialog( this, "Now, I will paint on Screen.", "wxGTK" ); - dialog->ShowModal(); - delete dialog; - - wxScreenDC dc; - dc.StartDrawingOnTop(); - - int w = wxSystemSettings::GetSystemMetric( wxSYS_SCREEN_X ); - int h = wxSystemSettings::GetSystemMetric( wxSYS_SCREEN_Y ); - - dc.SetPen( *wxWHITE_PEN ); - dc.SetBrush( *wxTRANSPARENT_BRUSH ); - for (int i = 0; i < h; i += 3) dc.DrawLine( 0, i, w, i ); - - dialog = new wxMessageDialog( this, "Now, the stripes will disappear.", "wxGTK" ); - dialog->ShowModal(); - delete dialog; - - dc.EndDrawingOnTop(); -}; - -//----------------------------------------------------------------------------- -// MyCanvas -//----------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(MyCanvas, wxScrolledWindow) - -BEGIN_EVENT_TABLE(MyCanvas,wxScrolledWindow) - EVT_BUTTON (100, MyDialog::OnReturnButton) - EVT_PAINT (MyCanvas::OnPaint) -END_EVENT_TABLE() - -MyCanvas::MyCanvas( wxWindow *parent, const wxWindowID id, const wxPoint &pos, const wxSize &size ) - : wxScrolledWindow( parent, id, pos, size, wxSUNKEN_BORDER ) -{ - my_bitmap = new wxBitmap( folder_xpm ); - my_horse = new wxBitmap(); - my_horse->LoadFile( "horse.png", 0 ); - my_backstore = new wxBitmap( 150, 150 ); - my_font = new wxFont( 20, wxROMAN, wxNORMAL, wxNORMAL ); - m_isCreated = FALSE; - - SetBackgroundColour( wxColour("Wheat") ); -}; - -MyCanvas::~MyCanvas(void) -{ - delete my_bitmap; - delete my_backstore; - delete my_horse; - delete my_font; -}; - -void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) ) -{ - wxPaintDC dc( this ); - PrepareDC( dc ); - - wxMemoryDC memDC; - memDC.SelectObject( *my_backstore ); - memDC.Clear(); - memDC.SetBrush( *wxBLACK_BRUSH ); - memDC.SetPen( *wxWHITE_PEN ); - memDC.DrawRectangle( 0, 0, 150, 150 ); - memDC.SetTextForeground( *wxWHITE ); - memDC.DrawText( "This is a memory dc.", 10, 10 ); - - int vx = 0; - int vy = 0; - GetVirtualSize( &vx, &vy ); - dc.DrawLine( 5, 5, vx-10, vy-10 ); - dc.DrawLine( 10, 20, 100, 10 ); - dc.DrawLine( 10, 20, 100, 50 ); - dc.DrawLine( 10, 20, 100, 100 ); - - dc.SetPen( *wxWHITE_PEN ); - dc.DrawLine( 80, 50, 180, 50 ); - - dc.SetFont( *my_font ); - - long x = 0; - long y = 0; - dc.GetTextExtent( "Hej, ho, hej, ho.", &x, &y ); - - dc.SetBrush( *wxTRANSPARENT_BRUSH ); - dc.DrawRectangle( 80, 40, x, y ); - - dc.SetTextForeground( *wxGREEN ); - dc.DrawText( "Hej, ho, hej, ho.", 80, 40 ); - - dc.SetTextForeground( *wxBLACK ); - dc.SetFont( *wxNORMAL_FONT ); - dc.DrawText( "Hej, ho, hej, ho. (NormalFont)", 80, 60 ); - dc.SetFont( *wxSMALL_FONT ); - dc.DrawText( "Hej, ho, hej, ho. (SmallFont)", 80, 80 ); - dc.SetFont( *wxITALIC_FONT ); - dc.DrawText( "Hej, ho, hej, ho. (ItalicFont)", 80, 100 ); - - dc.DrawBitmap( *my_bitmap, 30, 80, TRUE ); - dc.DrawBitmap( *my_horse, 30, 120 ); - - dc.Blit( 200, 200, 150, 150, &memDC, 0, 0, 0 ); - - memDC.SelectObject( wxNullBitmap ); - -/* - dc.SetBrush( *wxBLACK_BRUSH ); - dc.DrawRectangle( 50, 50, 50, 50 ); - dc.SetPen( *wxWHITE_PEN ); - dc.DrawRectangle( 101, 50, 50, 50 ); - dc.DrawRectangle( 50, 101, 50, 50 ); - - dc.SetBrush( *wxWHITE_BRUSH ); - - dc.SetPen( *wxWHITE_PEN ); - dc.DrawRectangle( 70, 70, 2, 2 ); - - dc.SetPen( *wxRED_PEN ); - dc.DrawRectangle( 72, 70, 2, 2 ); - dc.DrawRectangle( 70, 72, 2, 2 ); - - - dc.SetPen( *wxRED_PEN ); - dc.DrawRectangle( 82, 80, 2, 2 ); - dc.DrawRectangle( 80, 82, 2, 2 ); - - dc.SetPen( *wxWHITE_PEN ); - dc.DrawRectangle( 80, 80, 2, 2 ); -*/ -}; - -//----------------------------------------------------------------------------- -// MyFrame -//----------------------------------------------------------------------------- - -const ID_OPEN = 101; -const ID_SAVE = 102; -const ID_MSG = 103; -const ID_FONT = 104; -const ID_DLG = 105; -const ID_QUIT = 108; -const ID_ABOUT = 109; - -IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame ) - -BEGIN_EVENT_TABLE(MyFrame,wxFrame) - EVT_MENU (ID_OPEN, MyFrame::OnOpenDialog) - EVT_MENU (ID_FONT, MyFrame::OnFontDialog) - EVT_MENU (ID_MSG, MyFrame::OnMsg) - EVT_MENU (ID_DLG, MyFrame::OnDialog) - EVT_MENU (ID_ABOUT, MyFrame::OnAbout) - EVT_MENU (ID_QUIT, MyFrame::OnQuit) -END_EVENT_TABLE() - -MyFrame::MyFrame(void) : - wxFrame( (wxFrame *) NULL, -1, (char *) "Robert's Test application", wxPoint(20,20), wxSize(470,360) ) -{ - wxMenu *file_menu = new wxMenu( "Test" ); - file_menu->Append( ID_OPEN, "Open.."); - file_menu->Append( ID_MSG, "MessageBox.."); - file_menu->Append( ID_FONT, "FontDialog.."); - file_menu->AppendSeparator(); - file_menu->Append( ID_DLG, "TestDialog.."); - file_menu->AppendSeparator(); - file_menu->Append( ID_ABOUT, "About.."); - file_menu->Append( ID_QUIT, "Exit"); - - wxMenuBar *menu_bar = new wxMenuBar(); - menu_bar->Append(file_menu, "File"); - menu_bar->Show( TRUE ); - - SetMenuBar( menu_bar ); - - CreateStatusBar( 2 ); - - SetStatusText( "wxGTK v0.12", 0 ); - SetStatusText( "Copyright 1998 Robert Roebling.", 1 ); - - m_canvas = new MyCanvas( this, -1, wxPoint(2,62), wxSize(300-4,120-4) ); - m_canvas->SetScrollbars( 10, 10, 50, 50 ); - - m_tb = CreateToolBar(); - m_tb->SetMargins( 2, 2 ); - m_tb->AddTool( 0, wxBitmap( list_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "This is a button" ); - m_tb->AddTool( 0, wxBitmap( folder_xpm ), wxNullBitmap, TRUE, -1, -1, (wxObject *) NULL, "This is a toggle" ); - m_tb->Realize(); - -// m_timer.Start( 1000, TRUE ); -}; - -void MyFrame::OnDialog( wxCommandEvent &WXUNUSED(event) ) -{ - MyDialog *dialog = new MyDialog( this ); - dialog->ShowModal(); - dialog->Close( TRUE ); -}; - -void MyFrame::OnFontDialog( wxCommandEvent &WXUNUSED(event) ) -{ - wxFontData data; - data.SetInitialFont( wxSMALL_FONT ); - data.SetColour( wxRED ); - wxGenericFontDialog dialog( this, &data ); - if (dialog.ShowModal() == wxID_OK) - { - wxFontData retData = dialog.GetFontData(); - // do something - }; -}; - -void MyFrame::OnOpenDialog( wxCommandEvent &WXUNUSED(event) ) -{ - wxFileDialog dialog(this, "Testing open file dialog", "", "", "*.txt", 0); - if (dialog.ShowModal() == wxID_OK) - { - wxMessageDialog dialog2(this, dialog.GetPath(), "Selected path"); - dialog2.ShowModal(); - }; -}; - -void MyFrame::OnMsg( wxCommandEvent &WXUNUSED(event) ) -{ - wxMessageBox( "There once was a lady from Riga.", "TestBox.", wxYES_NO ); -}; - -void MyFrame::OnQuit( wxCommandEvent &WXUNUSED(event) ) -{ - Close( TRUE ); -}; - -void MyFrame::OnAbout( wxCommandEvent &WXUNUSED(event) ) -{ - wxDialog dialog( this, -1, "About wxGTK", wxPoint(100,100), wxSize(540,350), wxDIALOG_MODAL ); - - int w = 0; - int h = 0; - dialog.GetSize( &w, &h ); - - int x = 30; - int y = 20; - int step = 20; - - (void)new wxStaticBox( &dialog, -1, (const char*)NULL, wxPoint(10,10), wxSize(w-20,h-80) ); - - (void)new wxStaticText( &dialog, -1, "wxGTK v0.12", wxPoint(240,y) ); - y += 2*step-10; - - (void)new wxStaticText( &dialog, -1, "Written by Robert Roebling, 1998. More information at:", wxPoint(x,y) ); - y += step; - (void)new wxStaticText( &dialog, -1, "http://www.freiburg.linux.de/~wxxt", wxPoint(x+50,y) ); - y += 2*step; - - (void)new wxStaticText( &dialog, -1, - "wxGTK is based on the wxWindows GUI-library written mainly by Julian Smart. See:", wxPoint(x,y) ); - y += step; - (void)new wxStaticText( &dialog, -1, "http://web.ukonline.co.uk/julian.smart/wxwin", wxPoint(x+50,y) ); - y += 2*step; - - (void)new wxStaticText( &dialog, -1, "wxWindows Copyright: Less restrictive version of LGPL.", wxPoint(x,y) ); - y += 2*step; - (void)new wxStaticText( &dialog, -1, "For questions concerning wxGTK, you may mail to:", wxPoint(x,y) ); - y += step; - (void)new wxStaticText( &dialog, -1, "roebling@ruf.uni-freiburg.de", wxPoint(x+50,y) ); - - (void) new wxButton( &dialog, wxID_OK, "Return", wxPoint(w/2-40,h-50), wxSize(80,30) ); - - dialog.ShowModal(); -}; - -//----------------------------------------------------------------------------- -// MyApp -//----------------------------------------------------------------------------- - -MyApp::MyApp(void) : - wxApp( ) -{ -}; - -bool MyApp::OnInit(void) -{ - wxFrame *frame = new MyFrame(); - frame->Show( TRUE ); - - return TRUE; -}; - - - - - diff --git a/user/wxTest/wxTest.h b/user/wxTest/wxTest.h deleted file mode 100644 index d439960a25..0000000000 --- a/user/wxTest/wxTest.h +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Program: wxTest - * - * Author: Robert Roebling - * - * Copyright: (C) 1997, GNU (Robert Roebling) - * - * This program 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __TESTH__ -#define __TESTH__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "wx/wx.h" -#include "wx/dcscreen.h" -#include "wx/splitter.h" -#include "wx/toolbar.h" -#include "wx/fontdlg.h" - -//----------------------------------------------------------------------------- -// derived classes -//----------------------------------------------------------------------------- - -class MyDialog; -class MyFrame; -class MyApp; - -//----------------------------------------------------------------------------- -// MyTimer -//----------------------------------------------------------------------------- - -class MyTimer: public wxTimer -{ - public: - - MyTimer(void) {}; - void Notify(void) - { - printf( "OnTimer.\n" ); - }; -}; - -//----------------------------------------------------------------------------- -// MyDialog -//----------------------------------------------------------------------------- - -class MyDialog: public wxDialog -{ - DECLARE_DYNAMIC_CLASS(MyDialog) - - public: - - MyDialog(void) {}; - MyDialog( wxWindow *parent ); - - void OnReturnButton( wxCommandEvent &event ); - void OnHelloButton( wxCommandEvent &event ); - - void OnCheckBox( wxCommandEvent &event ); - void OnCheckBoxButtons( wxCommandEvent &event ); - - void OnTextCtrl( wxCommandEvent &event ); - void OnTextCtrlButtons( wxCommandEvent &event ); - - void OnChoice( wxCommandEvent &event ); - void OnChoiceButtons( wxCommandEvent &event ); - - void OnListBox( wxCommandEvent &event ); - void OnListBoxButtons( wxCommandEvent &event ); - - void OnRadioBox( wxCommandEvent &event ); - void OnRadioBoxButtons( wxCommandEvent &event ); - - wxCheckBox *m_checkbox; - wxTextCtrl *m_textctrl; - wxChoice *m_choice; - wxListBox *m_listbox; - wxRadioBox *m_radiobox; - wxStaticText *m_text1; - wxStaticText *m_text2; - - DECLARE_EVENT_TABLE() -}; - -//----------------------------------------------------------------------------- -// MyCanvas -//----------------------------------------------------------------------------- - -class MyCanvas: public wxScrolledWindow -{ - DECLARE_DYNAMIC_CLASS(MyCanvas) - - public: - - MyCanvas(void) {}; - MyCanvas( wxWindow *parent, wxWindowID, const wxPoint &pos, const wxSize &size ); - ~MyCanvas(void); - void OnPaint( wxPaintEvent &event ); - - wxBitmap *my_bitmap; - wxBitmap *my_horse; - wxBitmap *my_backstore; - wxFont *my_font; - bool m_isCreated; - - DECLARE_EVENT_TABLE() -}; - -//----------------------------------------------------------------------------- -// MyFrame -//----------------------------------------------------------------------------- - -class MyFrame: public wxFrame -{ - DECLARE_DYNAMIC_CLASS(MyFrame) - - public: - - MyFrame(void); - void OnSize( wxSizeEvent &event ); - void OnOpenDialog( wxCommandEvent &event ); - void OnFontDialog( wxCommandEvent &event ); - void OnMsg( wxCommandEvent &event ); - void OnDialog( wxCommandEvent &event ); - void OnAbout( wxCommandEvent &event ); - void OnQuit( wxCommandEvent &event ); - - wxToolBar *m_tb; - MyCanvas *m_canvas; - - MyTimer m_timer; - - DECLARE_EVENT_TABLE() -}; - -//----------------------------------------------------------------------------- -// MyApp -//----------------------------------------------------------------------------- - -class MyApp: public wxApp -{ - public: - - MyApp(void); - virtual bool OnInit(void); -}; - -#endif // wxGTK_h diff --git a/utils/Makefile b/utils/Makefile deleted file mode 100644 index 57ec5f3f82..0000000000 --- a/utils/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../setup/general/makedirs diff --git a/utils/dialoged/Makefile b/utils/dialoged/Makefile deleted file mode 100644 index 3f7a4dce0d..0000000000 --- a/utils/dialoged/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makedirs diff --git a/utils/dialoged/docs/alignb.bmp b/utils/dialoged/docs/alignb.bmp deleted file mode 100644 index 6cc2e1dee4..0000000000 Binary files a/utils/dialoged/docs/alignb.bmp and /dev/null differ diff --git a/utils/dialoged/docs/alignb.eps b/utils/dialoged/docs/alignb.eps deleted file mode 100644 index 2909ad7631..0000000000 --- a/utils/dialoged/docs/alignb.eps +++ /dev/null @@ -1,161 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: alignb.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 298 389 314 404 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -298 389 translate - -% size of image (on paper, in 1/72inch coords) -16 15 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 9 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 ffff00 -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -16 15 8 % dimensions of data -[16 0 0 -15 0 15] % mapping matrix -rlecmapimage - -0f01 -07010700 -070181000204020000 -070181000204020000 -070181000204020000 -070181000204020000 -070181000204020000 -8101000300010181000204020000 -8201000201028100018201000204020000 -8201000201028100018201000204020000 -8201000201028100018201000204020000 -8201000201028100018201000204020000 -810100030001010700 -0f01 -0f01 - -% -% Compression made this file 3.12% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/alignb.gif b/utils/dialoged/docs/alignb.gif deleted file mode 100644 index 7aa46845c9..0000000000 Binary files a/utils/dialoged/docs/alignb.gif and /dev/null differ diff --git a/utils/dialoged/docs/alignl.bmp b/utils/dialoged/docs/alignl.bmp deleted file mode 100644 index 30471101b1..0000000000 Binary files a/utils/dialoged/docs/alignl.bmp and /dev/null differ diff --git a/utils/dialoged/docs/alignl.eps b/utils/dialoged/docs/alignl.eps deleted file mode 100644 index 41b75ede45..0000000000 --- a/utils/dialoged/docs/alignl.eps +++ /dev/null @@ -1,161 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: alignl.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 389 270 404 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 389 translate - -% size of image (on paper, in 1/72inch coords) -16 15 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 9 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 ffff00 -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -16 15 8 % dimensions of data -[16 0 0 -15 0 15] % mapping matrix -rlecmapimage - -0f01 -020105000601 -020181000202028100010501 -020181000202028100010501 -020181000202028100010501 -020105000601 -0f01 -0f01 -02010a000101 -020181000207028100010001 -020181000207028100010001 -020181000207028100010001 -020181000207028100010001 -02010a000101 -0f01 - -% -% Compression made this file 16.11% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/alignl.gif b/utils/dialoged/docs/alignl.gif deleted file mode 100644 index 650ce39749..0000000000 Binary files a/utils/dialoged/docs/alignl.gif and /dev/null differ diff --git a/utils/dialoged/docs/alignr.bmp b/utils/dialoged/docs/alignr.bmp deleted file mode 100644 index 14a2f85241..0000000000 Binary files a/utils/dialoged/docs/alignr.bmp and /dev/null differ diff --git a/utils/dialoged/docs/alignr.eps b/utils/dialoged/docs/alignr.eps deleted file mode 100644 index b3470a2290..0000000000 --- a/utils/dialoged/docs/alignr.eps +++ /dev/null @@ -1,161 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: alignr.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 389 270 404 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 389 translate - -% size of image (on paper, in 1/72inch coords) -16 15 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 9 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 ffff00 -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -16 15 8 % dimensions of data -[16 0 0 -15 0 15] % mapping matrix -rlecmapimage - -0f01 -070105000101 -070181000202028100010001 -070181000202028100010001 -070181000202028100010001 -070105000101 -0f01 -0f01 -02010a000101 -020181000207028100010001 -020181000207028100010001 -020181000207028100010001 -020181000207028100010001 -02010a000101 -0f01 - -% -% Compression made this file 16.11% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/alignr.gif b/utils/dialoged/docs/alignr.gif deleted file mode 100644 index 19f9a9207e..0000000000 Binary files a/utils/dialoged/docs/alignr.gif and /dev/null differ diff --git a/utils/dialoged/docs/alignt.bmp b/utils/dialoged/docs/alignt.bmp deleted file mode 100644 index 4505cbab56..0000000000 Binary files a/utils/dialoged/docs/alignt.bmp and /dev/null differ diff --git a/utils/dialoged/docs/alignt.eps b/utils/dialoged/docs/alignt.eps deleted file mode 100644 index 0770b5f842..0000000000 --- a/utils/dialoged/docs/alignt.eps +++ /dev/null @@ -1,161 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: alignt.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 389 270 404 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 389 translate - -% size of image (on paper, in 1/72inch coords) -16 15 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 9 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 ffff00 -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -16 15 8 % dimensions of data -[16 0 0 -15 0 15] % mapping matrix -rlecmapimage - -0f01 -810100030001010700 -8201000201028100018201000204020000 -8201000201028100018201000204020000 -8201000201028100018201000204020000 -8201000201028100018201000204020000 -8101000300010181000204020000 -070181000204020000 -070181000204020000 -070181000204020000 -070181000204020000 -070181000204020000 -07010700 -0f01 -0f01 - -% -% Compression made this file 20.28% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/alignt.gif b/utils/dialoged/docs/alignt.gif deleted file mode 100644 index 633f980bed..0000000000 Binary files a/utils/dialoged/docs/alignt.gif and /dev/null differ diff --git a/utils/dialoged/docs/arrow.bmp b/utils/dialoged/docs/arrow.bmp deleted file mode 100644 index a6b99c8991..0000000000 Binary files a/utils/dialoged/docs/arrow.bmp and /dev/null differ diff --git a/utils/dialoged/docs/arrow.eps b/utils/dialoged/docs/arrow.eps deleted file mode 100644 index 9bacc42a95..0000000000 --- a/utils/dialoged/docs/arrow.eps +++ /dev/null @@ -1,174 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: arrow.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 375 282 403 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 375 translate - -% size of image (on paper, in 1/72inch coords) -28 28 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 12 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 808080 ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -28 28 8 % dimensions of data -[28 0 0 -28 0 28] % mapping matrix -rlecmapimage - -8102001900 -8100031703810200 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -8200030106018100010c0101020000 -82000301060101000c0101020000 -82000301060102000b0101020000 -82000301060103000a0101020000 -8200030106010400090101020000 -8200030106010500080101020000 -8200030106010600070101020000 -8200030106010700060101020000 -8200030106010400090101020000 -8200030106010100810100810001080101020000 -82000301060181000101010100080101020000 -820003010a010100080101020000 -820003010b010100070101020000 -820003010b010100070101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -8200030217020000 -81000218020000 -1b00 - -% -% Compression made this file 13.95% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/arrow.gif b/utils/dialoged/docs/arrow.gif deleted file mode 100644 index aa2c4605cb..0000000000 Binary files a/utils/dialoged/docs/arrow.gif and /dev/null differ diff --git a/utils/dialoged/docs/back.gif b/utils/dialoged/docs/back.gif deleted file mode 100644 index 8a61076d3b..0000000000 Binary files a/utils/dialoged/docs/back.gif and /dev/null differ diff --git a/utils/dialoged/docs/bmpbuttn.bmp b/utils/dialoged/docs/bmpbuttn.bmp deleted file mode 100644 index 270cf634fe..0000000000 Binary files a/utils/dialoged/docs/bmpbuttn.bmp and /dev/null differ diff --git a/utils/dialoged/docs/bmpbuttn.eps b/utils/dialoged/docs/bmpbuttn.eps deleted file mode 100644 index 6c0f5c523c..0000000000 --- a/utils/dialoged/docs/bmpbuttn.eps +++ /dev/null @@ -1,174 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: bmpbuttn.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 375 282 403 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 375 translate - -% size of image (on paper, in 1/72inch coords) -28 28 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 12 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 808080 ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -28 28 8 % dimensions of data -[28 0 0 -28 0 28] % mapping matrix -rlecmapimage - -81020018000002 -8100031703810200 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -8200030103010c00040101020000 -8200030102018100010b01810001020101020000 -82000301020181000101018100010201010002010100020101020000 -8200030102018100010101810001010181000182010001810100810001010101020000 -82000301020185000100010001010181000182010001810100810001010101020000 -8200030102018400010001008100010101010002010100020101020000 -82000301020183000100018201000106010100020101020000 -82000301020182000100820001000900020101020000 -820003010201810001010181000107010100020101020000 -82000301020181000101018100010101010003010100020101020000 -8200030103010e00020101020000 -8200030104010c00030101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -8200030217020000 -81000218020000 -81020018000002 - -% -% Compression made this file 18.45% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/bmpbuttn.gif b/utils/dialoged/docs/bmpbuttn.gif deleted file mode 100644 index 220bddc623..0000000000 Binary files a/utils/dialoged/docs/bmpbuttn.gif and /dev/null differ diff --git a/utils/dialoged/docs/body.tex b/utils/dialoged/docs/body.tex deleted file mode 100644 index 7a2e89bb1d..0000000000 --- a/utils/dialoged/docs/body.tex +++ /dev/null @@ -1,197 +0,0 @@ -\chapter{Introduction}\label{introduction} -\pagenumbering{arabic}% -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -The wxWindows Dialog Editor is a tool for creating dialog resource files, in {\tt .wxr} format. -It differs from wxBuilder in the following respectes: - -\begin{enumerate}\itemsep=0pt -\item Scope. It is written for dialog editing only, and is therefore more convenient than wxBuilder for this purpose. -\item File format. Dialog editor reads and writes wxWindows resource files (extension {\tt .wxr}) and has -no independent file format. -\item Robustness. It is written in a more principled way than wxBuilder, and is less ambitious. -\item Ease of use. Windows are edited using the mouse or via consistent {\it property editors}, which -provide immediate visual feedback of changed properties. -\end{enumerate} - -Dialog Editor should be compiled and used with wxWindows 1.65 or later. - -\section{Current status} - -Dialog Editor currently runs under MS Windows. It has yet to -be tested under Motif and XView: see \helpref{Technical notes}{technotes} for a discussion -of what needs to be done. - -\section{Future developments} - -\begin{itemize}\itemsep=0pt -\item XView and Motif versions. -\item It would be nice to have a dialog browser, showing thumbnails of -all dialogs in a particular directory. -\item Maybe add a menubar editor (from wxBuilder). -\item Maybe convert Windows .rc files. -\end{itemize} - -\chapter{Commands}\label{commands} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -\section{Dialog editor menu bar} - -\subsection{File menu} - -\begin{twocollist}\itemsep=0pt -\twocolitem{New project}{Creates a new project (clears index and resets project name).} -\twocolitem{New dialog}{Creates a new dialog resource.} -\twocolitem{Open}{Opens an existing resource file.} -\twocolitem{Save}{Saves the current resources.} -\twocolitem{Save as}{Saves the current resources in a named file.} -\twocolitem{Clear}{Clears the current resources.} -\twocolitem{Exit}{Exit the program.} -\end{twocollist} - -\subsection{Edit menu} - -\begin{twocollist}\itemsep=0pt -\twocolitem{Recreate}{Recreates the currently selected panel item from the underlying resource. This may be necessary -to regenerate items that cannot be changed dynamically, and which have got out of sync with the displayed -item.} -\twocolitem{Delete}{Deletes the currently selected resource.} -\twocolitem{Toggle edit/test mode}{Toggles from edit to test mode, and vice versa. Edit mode is used for editing -dialogs, test mode allows panel items to be manipulated as they will appear to the user.} -\end{twocollist} - -\subsection{Help menu} - -\begin{twocollist}\itemsep=0pt -\twocolitem{Help topics}{Displays on-line help at the contents page.} -\twocolitem{About}{Displays an dialog showing the Dialog Editor version and author.} -\end{twocollist} - -\latexonly{\newpage} -\section{Command toolbar} - -The command toolbar consists of the following tools: - -\begin{twocollist}%\itemsep=0pt -\twocolitem{\icon{new.eps}{New}}{Clears the project.} -\twocolitem{\icon{open.eps}{Open}}{Opens an existing resource file.} -\twocolitem{\icon{save.eps}{Save}}{Saves the current resources.} -\twocolitem{\icon{vert.eps}{Horizontal align}}{Aligns the centre of the selected items horizontally.} -\twocolitem{\icon{alignt.eps}{Horizontal top-align}}{Aligns the top sides of the selected items horizontally.} -\twocolitem{\icon{alignb.eps}{Horizontal bottom-align}}{Aligns the bottom sides of the selected items horizontally.} -\twocolitem{\icon{horiz.eps}{Vertical align}}{Aligns the centre of the selected items vertically.} -\twocolitem{\icon{alignl.eps}{Vertical left-align}}{Aligns the left sides of the selected items vertically.} -\twocolitem{\icon{alignr.eps}{Vertical right-align}}{Aligns the right sides of the selected items vertically.} -\twocolitem{\icon{copysize.eps}{Copy size}}{Copies the size of the first selected item to the subsequently selected item(s).} -\twocolitem{\icon{tofront.eps}{To front}}{Puts the selected item(s) to the front of the display list.} -\twocolitem{\icon{toback.eps}{To back}}{Puts the selected item(s) to the back of the display list.} -\twocolitem{\icon{help.eps}{Help}}{Invokes Dialog Editor help.} -\end{twocollist} - -\latexonly{\newpage} -\section{Tool palette} - -The tool palette is used to select a type of panel item to create on the dialog. -To create a new panel item, select a tool with left-click, then left-click on the dialog to -window. Select the pointer tool to use left-click for selecting and deselecting -items. - -The tool palette consists of the following tools. - -\begin{twocollist}%\itemsep=0pt -\twocolitem{\icon{arrow.eps}{Pointer}}{Click this to select/deselect items on a dialog.} -\twocolitem{\icon{message.eps}{Message}}{Text message item.} -\twocolitem{\icon{picture.eps}{Bitmap message}}{Bitmap message item.} -\twocolitem{\icon{button.eps}{Button}}{Text button item.} -\twocolitem{\icon{bmpbuttn.eps}{Bitmap button}}{Bitmap button item.} -\twocolitem{\icon{check.eps}{Checkbox}}{Checkbox item.} -\twocolitem{\icon{radio.eps}{Radiobox}}{Radiobox item.} -\twocolitem{\icon{listbox.eps}{Listbox}}{Listbox item.} -\twocolitem{\icon{choice.eps}{Choice}}{Choice item.} -\twocolitem{\icon{text.eps}{Text}}{Single-line text item.} -\twocolitem{\icon{mtext.eps}{Multitext}}{Multi-line text item.} -\twocolitem{\icon{slider.eps}{Slider}}{Slider item.} -\twocolitem{\icon{group.eps}{Groupbpx}}{Groupbox item.} -\twocolitem{\icon{gauge.eps}{Gauge}}{Gauge item.} -\twocolitem{\icon{scroll.eps}{Scrollbar}}{Scrollbar item.} -\end{twocollist} - -\section{Resource list} - -The resource list shows a list of the dialogs, panel items and bitmaps currently loaded -in Dialog Editor. Double-clicking on a dialog item shows the associated dialog box. - -\chapter{Procedures}\label{procedures} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -\section{Running Dialog Editor} - -To run Dialog Editor under Windows, click on the Program Manager or Explorer icon. -Under UNIX, run from the command line. - -The main window shows a menu bar, command toolbar, tool palette, resource list, and -status line. - -\section{Creating a dialog} - -To create a new dialog, click on the {\bf File: New} menu item, or equivalent -toolbar button. A dialog will appear. To put a panel item on the dialog, left-click -on the appropriate palette icon and then left-click on the dialog. A new item -will appear at the place you clicked. - -You can edit any panel item or dialog by control-left clicking. A property editor -will appear, allowing any property to be selected and edited (see \helpref{Using property editors}{propeditors}). -You can also edit items by right-clicking to show a menu, and then selecting {\it Edit properties}. - -To move a panel item, drag the item with the left mouse button, or edit -the position values in the property editor. To resize a panel item, you -can either select it by left-clicking and then dragging on a selection -handle, or edit the size values in the property editor. - -You can delete items from the right-click menu, or by selecting the item and -choosing {\bf Edit: Delete} from the menu bar. - -\section{Using property editors}\label{propeditors} - -Property editors consist of a list of properties and current values, plus controls at the top of -the editor. If the property is of an appropriate type, you can edit the value directly in the -text field, and confirm or cancel the value using the two buttons to the left of it. -If the property has a predefined range of values, such as labelFontFamily, you can -see a list of permissable values by clicking on the button labelled with an ellipsis symbol ({\bf ...}). -This will show a listbox with possible values and current selection. You may also be able -to cycle through values by double-clicking the value in the listbox. - -Properties may have special editors appropriate to the type. Filename properties invoke -the file selector, and properties containing list of user-definable strings use a -string editor. - -When you change a property value, this value is immediately reflected in -the dialog or panel item. If the item allows this value to be changed -dynamically, the relevant wxWindows function will be called internally -to effect the change. If the value cannot be changed dynamically, the -item will be destroyed and re-created, which means that there will be -more flickering associated with some kinds of property changes than -others. - -\section{Saving and loading files} - -Use {\it File: Save} and {\it File: Save as} or the equivalent toolbar button -to save the current dialog(s) in a wxWindows resource file (extension {\tt .wxr}). - -The {\tt .wxr} file can be used directly in a wxWindows program, if -wxWindows resources have been enabled when building the wxWindows library. -These files can be loaded dynamically, or included directly into program source -with a \verb$#include$ directive. See the wxWindows user manual for further details. - -\section{Multi-platform development} - -{\tt .wxr} files generated on one environment (e.g. Windows) can be used in another (e.g. Motif). -However, because the same panel item can have different sizes on different GUIs, -the user should be cautious in assuming that one resource file will work for all -platforms. It may be better to plan to conditionally include or load different -resource files for different platforms, with spacing modified to suit each -environment. - diff --git a/utils/dialoged/docs/books.bmp b/utils/dialoged/docs/books.bmp deleted file mode 100644 index cf1e148734..0000000000 Binary files a/utils/dialoged/docs/books.bmp and /dev/null differ diff --git a/utils/dialoged/docs/books.gif b/utils/dialoged/docs/books.gif deleted file mode 100644 index a9a1e46844..0000000000 Binary files a/utils/dialoged/docs/books.gif and /dev/null differ diff --git a/utils/dialoged/docs/bugs.tex b/utils/dialoged/docs/bugs.tex deleted file mode 100644 index 8c963602ea..0000000000 --- a/utils/dialoged/docs/bugs.tex +++ /dev/null @@ -1,15 +0,0 @@ -\chapter{Bugs}\label{bugs} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -Version 1.0 - -\begin{itemize}\itemsep=0pt -\item No XView or Motif versions yet. -\item In Watcom-compiled 32-bit Windows version, bitmap buttons and messages -don't work properly. -\item Some panel item properties missing, e.g. wxPASSWORD, wxREADONLY. -\item When dragging a selected item, other selected items should follow (to be -consistent with convention), but don't. -\item wxSlider sizing a bit broken: a wxWindows problem. -\end{itemize} diff --git a/utils/dialoged/docs/bullet.bmp b/utils/dialoged/docs/bullet.bmp deleted file mode 100644 index aad8fc793e..0000000000 Binary files a/utils/dialoged/docs/bullet.bmp and /dev/null differ diff --git a/utils/dialoged/docs/button.bmp b/utils/dialoged/docs/button.bmp deleted file mode 100644 index e7e95d73f0..0000000000 Binary files a/utils/dialoged/docs/button.bmp and /dev/null differ diff --git a/utils/dialoged/docs/button.eps b/utils/dialoged/docs/button.eps deleted file mode 100644 index f9438398bd..0000000000 --- a/utils/dialoged/docs/button.eps +++ /dev/null @@ -1,174 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: button.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 375 282 403 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 375 translate - -% size of image (on paper, in 1/72inch coords) -28 28 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 12 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 808080 ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -28 28 8 % dimensions of data -[28 0 0 -28 0 28] % mapping matrix -rlecmapimage - -81020018000002 -8100031703810200 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -8200030103010c00040101020000 -8200030102018100010b01810001020101020000 -8200030102018100010b010100020101020000 -8200030102018100010b010100020101020000 -8200030102018100010b010100020101020000 -8200030102018100010b010100020101020000 -8200030102018100010b010100020101020000 -8200030102018100010b010100020101020000 -8200030102018100010b010100020101020000 -8200030102018100010b010100020101020000 -8200030103010e00020101020000 -8200030104010c00030101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -8200030217020000 -81000218020000 -81020018000002 - -% -% Compression made this file 15.35% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/button.gif b/utils/dialoged/docs/button.gif deleted file mode 100644 index cbbb8d485a..0000000000 Binary files a/utils/dialoged/docs/button.gif and /dev/null differ diff --git a/utils/dialoged/docs/changes.tex b/utils/dialoged/docs/changes.tex deleted file mode 100644 index 67ab0785d5..0000000000 --- a/utils/dialoged/docs/changes.tex +++ /dev/null @@ -1,63 +0,0 @@ -\chapter{Change log}\label{changes} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -March 15th 1997, Version 1.7 - -\begin{itemize}\itemsep=0pt -\item Added fix to wx\_rprop.cpp to avoid Fafa bitmap buttons growing every time the -button edited. -\item Added fix to wx\_resed.cpp, case wxID\_EXIT, to clean up properly on exit, avoiding double deletion of wxBitmap. -\end{itemize} - -May 6th 1996, Version 1.6 - -\begin{itemize}\itemsep=0pt -\item Added panel editing in addition to dialog box editing. -\item Cured some bugs with changing window styles such as wxUSER\_COLOURS and label position. -\item Now preserves syntax of bitmap resources in wxr files. -\end{itemize} - -March 1996, Version 1.5 - -\begin{itemize}\itemsep=0pt -\item Changed behaviour of New tool, and changed File menu to include New project and New dialog items. -Behaviour should be more standard now. -\end{itemize} - -March 1st 1996, Version 1.4 - -\begin{itemize}\itemsep=0pt -\item Items (but not dialogs) can now have duplicate names. -\item Can pass a filename to the program from the command line. -\item Cured bizarre error caused by a Windows combobox sending -a fake left-mouse-up error when losing the focus (switching to another -window). This fix will be in wxWindows 1.66. -\item Rewritten code to use only the new type system, and to take account of -of new window style partitioning (flags for different items may have the same value). -Again, wxWindows 1.66 will have the new style values, to make room for more window -styles. -\end{itemize} - -January 28th 1996, Version 1.2 - -\begin{itemize}\itemsep=0pt -\item Now starts off in non-user-colour mode under Windows -\item Dragging item drags other selected items -\item wxMessage saves size correctly, if used in conjunction with wxWin 1.66 -\end{itemize} - -January 19th 1996, Version 1.1 - -\begin{itemize}\itemsep=0pt -\item Cured crash bug when quitting dialog window -\item Added Clear menu item -\item Added window type name to property window -\end{itemize} - -December 19th 1995, Version 1.0 - -\begin{itemize}\itemsep=0pt -\item First release. -\end{itemize} - diff --git a/utils/dialoged/docs/check.bmp b/utils/dialoged/docs/check.bmp deleted file mode 100644 index 718f0a9f02..0000000000 Binary files a/utils/dialoged/docs/check.bmp and /dev/null differ diff --git a/utils/dialoged/docs/check.eps b/utils/dialoged/docs/check.eps deleted file mode 100644 index 0c085f3974..0000000000 --- a/utils/dialoged/docs/check.eps +++ /dev/null @@ -1,174 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: check.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 375 282 403 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 375 translate - -% size of image (on paper, in 1/72inch coords) -28 28 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 12 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 808080 ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -28 28 8 % dimensions of data -[28 0 0 -28 0 28] % mapping matrix -rlecmapimage - -81020018000002 -8100031703810200 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -8200030103010c00040101020000 -820003010301010008010100040101020000 -820003010301830001000105018300010001030101020000 -82000301030181000182010001030181000182010001030101020000 -820003010301810001010181000101018100010101810001030101020000 -820003010301810001020183000100010201810001030101020000 -82000301030181000103018100010301810001030101020000 -820003010301810001020183000100010201810001030101020000 -820003010301810001010181000101018100010101810001030101020000 -82000301030181000182010001030181000182010001030101020000 -820003010301830001000105018300010001030101020000 -820003010301010008010100040101020000 -8200030103010c00040101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -8200030217020000 -81000218020000 -81020018000002 - -% -% Compression made this file 18.88% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/check.gif b/utils/dialoged/docs/check.gif deleted file mode 100644 index d10100c03e..0000000000 Binary files a/utils/dialoged/docs/check.gif and /dev/null differ diff --git a/utils/dialoged/docs/choice.bmp b/utils/dialoged/docs/choice.bmp deleted file mode 100644 index 2f56ee55b0..0000000000 Binary files a/utils/dialoged/docs/choice.bmp and /dev/null differ diff --git a/utils/dialoged/docs/choice.eps b/utils/dialoged/docs/choice.eps deleted file mode 100644 index 43d29814fa..0000000000 --- a/utils/dialoged/docs/choice.eps +++ /dev/null @@ -1,174 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: choice.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 375 282 403 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 375 translate - -% size of image (on paper, in 1/72inch coords) -28 28 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 12 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 808080 ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -28 28 8 % dimensions of data -[28 0 0 -28 0 28] % mapping matrix -rlecmapimage - -81020018000002 -8100031703810200 -82000301150101020000 -82000301150101020000 -82000301150101020000 -820003018101001200810102810200 -82000301820100010a01010002010100810102810200 -82000301820100010a0102008101000100810102810200 -82000301820100010a010600810102810200 -820003018101001200810102810200 -8200030101018100010901810001030182000102810200 -8200030101018100010901810001820100018301000102810200 -82000301010182000100050002018200010001008301000102810200 -8200030101018100010901810001030182000102810200 -8200030101018100010901810001030182000102810200 -8200030101018200010007008101000500810102810200 -8200030101018100010901810001030182000102810200 -8200030101018100010901810001030182000102810200 -82000301010182000100060001018200010001008301000102810200 -8200030101018100010901810001820100018301000102810200 -8200030101018100010901810001030182000102810200 -8200030101011200810102810200 -82000301150101020000 -82000301150101020000 -82000301150101020000 -8200030217020000 -81000218020000 -81020018000002 - -% -% Compression made this file 20.11% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/choice.gif b/utils/dialoged/docs/choice.gif deleted file mode 100644 index a05ff4dee7..0000000000 Binary files a/utils/dialoged/docs/choice.gif and /dev/null differ diff --git a/utils/dialoged/docs/classes.tex b/utils/dialoged/docs/classes.tex deleted file mode 100644 index dbb9491d24..0000000000 --- a/utils/dialoged/docs/classes.tex +++ /dev/null @@ -1,1759 +0,0 @@ -\chapter{Alphabetical class reference}\label{classref} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -To be written. - -\begin{comment} - -\overview{Property classes overview}{propertyoverview} - - -\section{\class{wxBoolFormValidator}: wxPropertyFormValidator}\label{wxboolformvalidator} - -\overview{Validator classes}{validatorclasses} - -This class validates a boolean value for a form view. The associated panel item must be a wxCheckBox. - -\membersection{wxBoolFormValidator::wxBoolFormValidator} - -\func{void}{wxBoolFormValidator}{\param{long }{flags=0}} - -Constructor. - -\section{\class{wxBoolListValidator}: wxPropertyListValidator}\label{wxboollistvalidator} - -\overview{Validator classes}{validatorclasses} - -This class validates a boolean value for a list view. - -\membersection{wxBoolListValidator::wxBoolListValidator} - -\func{void}{wxBoolListValidator}{\param{long }{flags=0}} - -Constructor. - -\section{\class{wxIntegerFormValidator}: wxPropertyFormValidator}\label{wxintegerformvalidator} - -\overview{Validator classes}{validatorclasses} - -This class validates a range of integer values for a form view. The associated panel item must be a wxText -or wxSlider. - -\membersection{wxIntegerFormValidator::wxIntegerFormValidator} - -\func{void}{wxIntegerFormValidator}{\param{long }{min=0}, \param{long }{max=0}, - \param{long}{ flags=0}} - -Constructor. Assigning zero to minimum and maximum values indicates that there is no range to check. - - -\section{\class{wxIntegerListValidator}: wxPropertyListValidator}\label{wxintegerlistvalidator} - -\overview{Validator classes}{validatorclasses} - -This class validates a range of integer values for a list view. - -\membersection{wxIntegerListValidator::wxIntegerListValidator} - -\func{void}{wxIntegerListValidator}{\param{long }{min=0}, \param{long }{max=0}, - \param{long}{ flags=wxPROP\_ALLOW\_TEXT\_EDITING}} - -Constructor. Assigning zero to minimum and maximum values indicates that there is no range to check. - -\section{\class{wxFilenameListValidator}: wxPropertyListValidator}\label{wxfilenamelistvalidator} - -\overview{Validator classes}{validatorclasses} - -This class validates a filename for a list view, allowing the user to edit it textually and also popping up -a file selector in ``detailed editing" mode. - -\membersection{wxFilenameListValidator::wxFilenameListValidator} - -\func{void}{wxFilenameListValidator}{\param{wxString }{message = ``Select a file"}, \param{wxString }{wildcard = ``*.*"}, - \param{long}{ flags=0}} - -Constructor. Supply an optional message and wildcard. - -\section{\class{wxListOfStringsListValidator}: wxPropertyListValidator}\label{wxlistofstringslistvalidator} - -\overview{Validator classes}{validatorclasses} - -This class validates a list of strings for a list view. When editing the property, -a dialog box is presented for adding, deleting or editing entries in the list. -At present no constraints may be supplied. - -You can construct a string list property value by constructing a wxStringList object. - -For example: - -\begin{verbatim} - myListValidatorRegistry.RegisterValidator((wxString)"stringlist", - new wxListOfStringsListValidator); - - wxStringList *strings = new wxStringList("earth", "fire", "wind", "water", NULL); - - sheet->AddProperty(new wxProperty("fred", strings, "stringlist")); -\end{verbatim} - -\membersection{wxListOfStringsListValidator::wxListofStringsListValidator} - -\func{void}{wxListOfStringsListValidator}{\param{long}{ flags=0}} - -Constructor. - -\section{\class{wxProperty}: wxObject}\label{wxproperty} - -The {\bf wxProperty} class represents a property, with a \helpref{wxPropertyValue}{wxpropertyvalue}\rtfsp -containing the actual value, a name a role, an optional validator, and -an optional associated window. - -A property might correspond to an actual C++ data member, or it -might correspond to a conceptual property, such as the width of a window. -There is no explicit data member {\it wxWindow::width}, but it may be convenient -to invent such a property for the purposes of editing attributes of the window. -The properties in the property sheet can be mapped to ``reality" by -whatever means (in this case by calling wxWindow::SetSize when the user has -finished editing the property sheet). - -A validator may be associated with the property in order to ensure that this and -only this validator will be used for editing and validating the property. -An alternative method is to use the {\it role} parameter to specify what kind -of validator would be appropriate; for example, specifying ``filename" for the role -would allow the property view to find an appropriate validator at edit time. - - -\membersection{wxProperty::wxProperty} - -\func{void}{wxProperty}{\void} - -\func{void}{wxProperty}{\param{wxProperty\& }{prop}} - -\func{void}{wxProperty}{\param{wxString}{ name}, \param{wxString}{ role}, \param{wxPropertyValidator *}{validator=NULL}} - -\func{void}{wxProperty}{\param{wxString}{ name}, \param{const wxPropertyValue\&}{ val}, \param{wxString}{ role}, \param{wxPropertyValidator *}{validator=NULL}} - -Constructors. - -\membersection{wxProperty::\destruct{wxProperty}} - -\func{void}{\destruct{wxProperty}}{\void} - -Destructor. Destroys the wxPropertyValue, and the property validator if there is one. However, if the -actual C++ value in the wxPropertyValue is a pointer, the data in that variable is not destroyed. - -\membersection{wxProperty::GetValue} - -\func{wxPropertyValue\&}{GetValue}{\void} - -Returns a reference to the property value. - -\membersection{wxProperty::GetValidator} - -\func{wxPropertyValidator *}{GetValidator}{\void} - -Returns a pointer to the associated property validator (if any). - -\membersection{wxProperty::GetName} - -\func{wxString\&}{GetName}{\void} - -Returns the name of the property. - -\membersection{wxProperty::GetRole} - -\func{wxRole\&}{GetRole}{\void} - -Returns the role of the property, to be used when choosing an appropriate validator. - -\membersection{wxProperty::GetWindow} - -\func{wxWindow *}{GetWindow}{\void} - -Returns the window associated with the property (if any). - -\membersection{wxProperty::SetValue} - -\func{void}{SetValue}{\param{wxPropertyValue\&}{ val}} - -Sets the value of the property. - -\membersection{wxProperty::SetName} - -\func{void}{SetName}{\param{wxString\&}{ name}} - -Sets the name of the property. - -\membersection{wxProperty::SetRole} - -\func{void}{SetRole}{\param{wxString\&}{ role}} - -Sets the role of the property. - -\membersection{wxProperty::SetValidator} - -\func{void}{SetValidator}{\param{wxPropertyValidator *}{validator}} - -Sets the validator: this will be deleted when the property is deleted. - -\membersection{wxProperty::SetWindow} - -\func{void}{SetWindow}{\param{wxWindow *}{win}} - -Sets the window associated with the property. - -\membersection{wxProperty::operator $=$} - -\func{void}{operator $=$}{\param{const wxPropertyValue\&}{ val}} - -Assignment operator. - -\section{\class{wxPropertyFormValidator}: wxPropertyValidator}\label{wxpropertyformvalidator} - -The {\bf wxPropertyFormValidator} abstract class is the root of classes that define validation -for a wxPropertyFormView. - - -\section{\class{wxPropertyFormDialog}: wxDialogBox}\label{wxpropertyformdialog} - -The {\bf wxPropertyFormDialog} class is a prepackaged dialog which can -be used for viewing a form property sheet. Pass a property form view object, and the dialog -will pass OnClose and OnDefaultAction listbox messages to the view class for -processing. - -\membersection{wxPropertyFormDialog::wxPropertyFormDialog} - -\func{void}{wxPropertyFormDialog}{\param{wxPropertyFormView *}{view}, \param{wxWindow *}{parent}, \param{char *}{title}, - \param{Bool}{ modal=FALSE}, \param{int}{ x=-1}, \param{int}{ y=-1}, \param{int}{ width=-1}, \param{int}{height=-1}, - \param{long}{ style=wxDEFAULT\_DIALOG\_STYLE}, \param{char *}{name=``dialogBox"}} - -Constructor. - -\membersection{wxPropertyFormDialog::\destruct{wxPropertyFormDialog}} - -\func{void}{\destruct{wxPropertyFormDialog}}{\void} - -Destructor. - - -\section{\class{wxPropertyFormFrame}: wxFrame}\label{wxpropertyformframe} - -The {\bf wxPropertyFormFrame} class is a prepackaged frame which can -be used for viewing a property form. Pass a property form view object, and the frame -will pass OnClose messages to the view class for processing. - -Call Initialize to create the panel and associate the view; override OnCreatePanel -if you wish to use a panel class other than the default wxPropertyFormPanel. - -\membersection{wxPropertyFormFrame::wxPropertyFormFrame} - -\func{void}{wxPropertyFormFrame}{\param{wxPropertyFormView *}{view}, \param{wxFrame *}{parent}, \param{char *}{title}, - \param{int}{ x=-1}, \param{int}{ y=-1}, \param{int}{ width=-1}, \param{int}{height=-1}, - \param{long}{ style=wxSDI $\|$ wxDEFAULT\_FRAME}, \param{char *}{name=``frame"}} - -Constructor. - -\membersection{wxPropertyFormFrame::\destruct{wxPropertyFormFrame}} - -\func{void}{\destruct{wxPropertyFormFrame}}{\void} - -Destructor. - -\membersection{wxPropertyFormFrame::GetPropertyPanel} - -\func{wxPanel *}{GetPropertyPanel}{\void} - -Returns the panel associated with the frame. - -\membersection{wxPropertyFormFrame::Initialize} - -\func{Bool}{Initialize}{\void} - -Must be called to create the panel and associate the view with the panel and frame. - -\membersection{wxPropertyFormFrame::OnCreatePanel} - -\func{wxPanel *}{OnCreatePanel}{\param{wxFrame *}{parent}, \param{wxPropertyFormView *}{view}} - -Creates a panel. Override this to create a panel type other than wxPropertyFormPanel. - - -\section{\class{wxPropertyFormPanel}: wxPanel}\label{wxpropertyformpanel} - -The {\bf wxPropertyFormPanel} class is a prepackaged panel which can -be used for viewing a property form. Pass a property form view object, and the panel -will pass OnDefaultAction listbox messages to the view class for -processing. - -\membersection{wxPropertyFormPanel::wxPropertyFormPanel} - -\func{void}{wxPropertyFormPanel}{\param{wxPropertyFormView *}{view}, \param{wxWindow *}{parent}, - \param{int}{ x=-1}, \param{int}{ y=-1}, \param{int}{ width=-1}, \param{int}{height=-1}, - \param{long}{ style=0}, \param{char *}{name=``panel"}} - -Constructor. - -\membersection{wxPropertyFormPanel::\destruct{wxPropertyFormPanel}} - -\func{void}{\destruct{wxPropertyFormPanel}}{\void} - -Destructor. - - - -\section{\class{wxPropertyFormValidator}: wxPropertyValidator}\label{wxpropertyformvalidatir} - -\overview{wxPropertyFormValidator overview}{wxpropertyformvalidatoroverview} - -The {\bf wxPropertyFormValidator} class defines a base class for form validators. By overriding virtual functions, -the programmer can create custom behaviour for kinds of property. - -\membersection{wxPropertyFormValidator::wxPropertyFormValidator} - -\func{void}{wxPropertyFormValidator}{\param{long}{ flags = 0}} - -Constructor. - -\membersection{wxPropertyFormValidator::\destruct{wxPropertyFormValidator}} - -\func{void}{\destruct{wxPropertyFormValidator}}{\void} - -Destructor. - -\membersection{wxPropertyFormValidator::OnCommand} - -\func{Bool}{OnCommand}{\param{wxProperty *}{property}, \param{wxPropertyFormView *}{view}, - \param{wxWindow *}{parentWindow}, \param{wxCommandEvent\& }{event}} - -Called when the control corresponding to the property receives a command (if not intercepted -by a callback associated with the actual control). - -\membersection{wxPropertyFormValidator::OnCheckValue} - -\func{Bool}{OnCheckValue}{\param{wxProperty *}{property}, \param{wxPropertyFormView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called when the view checks the property value. The value checked by this validator should be taken from the -panel item corresponding to the property. - -\membersection{wxPropertyFormValidator::OnDisplayValue} - -\func{Bool}{OnDisplayValue}{\param{wxProperty *}{property}, \param{wxPropertyFormView *}{view}, - \param{wxWindow *}{parentWindow}} - -Should display the property value in the appropriate control. - -\membersection{wxPropertyFormValidator::OnDoubleClick} - -\func{Bool}{OnDoubleClick}{\param{wxProperty *}{property}, \param{wxPropertyFormView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called when the control corresponding to the property is double clicked (listboxes only). - -\membersection{wxPropertyFormValidator::OnRetrieveValue} - -\func{Bool}{OnRetrieveValue}{\param{wxProperty *}{property}, \param{wxPropertyFormView *}{view}, - \param{wxWindow *}{parentWindow}} - -Should do the transfer from the property editing area to the property itself. - - -\section{\class{wxPropertyFormView}: wxPropertyView}\label{wxpropertyformview} - -\overview{wxPropertyFormView overview}{wxpropertyformviewoverview} - -The {\bf wxPropertyFormView} class shows a wxPropertySheet as a view onto a panel or dialog -box which has already been created. - -\membersection{wxPropertyFormView::wxPropertyFormView} - -\func{void}{wxPropertyFormView}{\param{long}{ flags = 0}} - -Constructor. - -\membersection{wxPropertyFormView::\destruct{wxPropertyFormView}} - -\func{void}{\destruct{wxPropertyFormView}}{\void} - -Destructor. - -\membersection{wxPropertyFormView::AssociateNames}\label{wxpropertyformviewassociatenames} - -\func{void}{AssociateNames}{\void} - -Associates the properties with the controls on the panel. For each panel item, if the -panel item name is the same as a property name, the two objects will be associated. -This function should be called manually since the programmer may wish to do the -association manually. - -\membersection{wxPropertyFormView::Check}\label{wxpropertyformviewcheck} - -\func{Bool}{Check}{\void} - -Checks all properties by calling the appropriate validators; returns FALSE if a validation failed. - -\membersection{wxPropertyFormView::GetPanel}\label{wxpropertyformviewgetpanel} - -\func{wxPanel *}{GetPanel}{\void} - -Returns the panel associated with the view. - -\membersection{wxPropertyFormView::GetManagedWindow}\label{wxpropertyformviewgetmanagedwindow} - -\func{wxWindow *}{GetManagedWindow}{\void} - -Returns the managed window (a frame or dialog) associated with the view. - -\membersection{wxPropertyFormView::OnOk}\label{wxpropertyformviewonok} - -\func{void}{OnOk}{\void} - -Virtual function that will be called when the OK button on the physical window is pressed. -By default, checks and updates the form values, closes and deletes the frame or dialog, then deletes the view. - -\membersection{wxPropertyFormView::OnCancel}\label{wxpropertyformviewoncancel} - -\func{void}{OnCancel}{\void} - -Virtual function that will be called when the Cancel button on the physical window is pressed. -By default, closes and deletes the frame or dialog, then deletes the view. - -\membersection{wxPropertyFormView::OnHelp}\label{wxpropertyformviewonhelp} - -\func{void}{OnHelp}{\void} - -Virtual function that will be called when the Help button on the physical window is pressed. -This needs to be overridden by the application for anything interesting to happen. - -\membersection{wxPropertyFormView::OnRevert}\label{wxpropertyformviewonrevert} - -\func{void}{OnRevert}{\void} - -Virtual function that will be called when the Revert button on the physical window is pressed. -By default transfers the wxProperty values to the panel items (in effect -undoing any unsaved changes in the items). - -\membersection{wxPropertyFormView::OnUpdate}\label{wxpropertyformviewonupdate} - -\func{void}{OnUpdate}{\void} - -Virtual function that will be called when the Update button on the physical window is pressed. -By defaults transfers the displayed values to the wxProperty objects. - -\membersection{wxPropertyFormView::SetManagedWindow}\label{wxpropertyformviewsetmanagedwindow} - -\func{void}{SetManagedWindow}{\param{wxWindow *}{win}} - -Sets the managed window (a frame or dialog) associated with the view. - -\membersection{wxPropertyFormView::TransferToDialog}\label{wxpropertyformviewtransfertodialog} - -\func{Bool}{TransferToDialog}{\void} - -Transfers property values to the controls in the dialog. - -\membersection{wxPropertyFormView::TransferToPropertySheet}\label{wxpropertyformviewtransfertopropertysheet} - -\func{Bool}{TransferToPropertySheet}{\void} - -Transfers property values from the controls in the dialog to the property sheet. - - -\section{\class{wxPropertyListDialog}: wxDialogBox}\label{wxpropertylistdialog} - -The {\bf wxPropertyListDialog} class is a prepackaged dialog which can -be used for viewing a property list. Pass a property list view object, and the dialog -will pass OnClose and OnDefaultAction listbox messages to the view class for -processing. - -\membersection{wxPropertyListDialog::wxPropertyListDialog} - -\func{void}{wxPropertyListDialog}{\param{wxPropertyListView *}{view}, \param{wxWindow *}{parent}, \param{char *}{title}, - \param{Bool}{ modal=FALSE}, \param{int}{ x=-1}, \param{int}{ y=-1}, \param{int}{ width=-1}, \param{int}{height=-1}, - \param{long}{ style=wxDEFAULT\_DIALOG\_STYLE}, \param{char *}{name=``dialogBox"}} - -Constructor. - -\membersection{wxPropertyListDialog::\destruct{wxPropertyListDialog}} - -\func{void}{\destruct{wxPropertyListDialog}}{\void} - -Destructor. - - -\section{\class{wxPropertyListFrame}: wxFrame}\label{wxpropertylistframe} - -The {\bf wxPropertyListFrame} class is a prepackaged frame which can -be used for viewing a property list. Pass a property list view object, and the frame -will pass OnClose messages to the view class for processing. - -Call Initialize to create the panel and associate the view; override OnCreatePanel -if you wish to use a panel class other than the default wxPropertyListPanel. - -\membersection{wxPropertyListFrame::wxPropertyListFrame} - -\func{void}{wxPropertyListFrame}{\param{wxPropertyListView *}{view}, \param{wxFrame *}{parent}, \param{char *}{title}, - \param{int}{ x=-1}, \param{int}{ y=-1}, \param{int}{ width=-1}, \param{int}{height=-1}, - \param{long}{ style=wxSDI $\|$ wxDEFAULT\_FRAME}, \param{char *}{name=``frame"}} - -Constructor. - -\membersection{wxPropertyListFrame::\destruct{wxPropertyListFrame}} - -\func{void}{\destruct{wxPropertyListFrame}}{\void} - -Destructor. - -\membersection{wxPropertyListFrame::GetPropertyPanel} - -\func{wxPanel *}{GetPropertyPanel}{\void} - -Returns the panel associated with the frame. - -\membersection{wxPropertyListFrame::Initialize} - -\func{Bool}{Initialize}{\void} - -Must be called to create the panel and associate the view with the panel and frame. - -\membersection{wxPropertyListFrame::OnCreatePanel} - -\func{wxPanel *}{OnCreatePanel}{\param{wxFrame *}{parent}, \param{wxPropertyListView *}{view}} - -Creates a panel. Override this to create a panel type other than wxPropertyListPanel. - - -\section{\class{wxPropertyListPanel}: wxPanel}\label{wxpropertylistpanel} - -The {\bf wxPropertyListPanel} class is a prepackaged panel which can -be used for viewing a property list. Pass a property list view object, and the panel -will pass OnDefaultAction listbox messages to the view class for -processing. - -\membersection{wxPropertyListPanel::wxPropertyListPanel} - -\func{void}{wxPropertyListPanel}{\param{wxPropertyListView *}{view}, \param{wxWindow *}{parent}, - \param{int}{ x=-1}, \param{int}{ y=-1}, \param{int}{ width=-1}, \param{int}{height=-1}, - \param{long}{ style=0}, \param{char *}{name=``panel"}} - -Constructor. - -\membersection{wxPropertyListPanel::\destruct{wxPropertyListPanel}} - -\func{void}{\destruct{wxPropertyListPanel}}{\void} - -Destructor. - - - - -\section{\class{wxPropertyListValidator}: wxPropertyValidator}\label{wxpropertylistvalidator} - -\overview{wxPropertyListValidator overview}{wxpropertylistvalidatoroverview} - -The {\bf wxPropertyListValidator} abstract class is the base class for -deriving validators for property lists. - -\membersection{wxPropertyListValidator::wxPropertyListValidator} - -\func{void}{wxPropertyListValidator}{\param{long}{ flags = wxPROP\_ALLOW\_TEXT\_EDITING}} - -Constructor. - -\membersection{wxPropertyListValidator::\destruct{wxPropertyListValidator}} - -\func{void}{\destruct{wxPropertyListValidator}}{\void} - -Destructor. - -\membersection{wxPropertyListValidator::OnCheckValue} - -\func{Bool}{OnCheckValue}{\param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called when the Tick (Confirm) button is pressed or focus is list. Return FALSE if the value -was invalid, which is a signal restores the old value. Return TRUE if the value was valid. - -\membersection{wxPropertyListValidator::OnClearControls} - -\func{Bool}{OnClearControls}{\param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Allows the clearing (enabling, disabling) of property list controls, when the focus leaves the current property. - -\membersection{wxPropertyListValidator::OnClearDetailControls} - -\func{Bool}{OnClearDetailControls}{\param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called when the focus is lost, if the validator is in detailed editing mode. - -\membersection{wxPropertyListValidator::OnDisplayValue} - -\func{Bool}{OnDisplayValue}{\param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Should display the value in the appropriate controls. The default implementation gets the -textual value from the property and inserts it into the text edit control. - -\membersection{wxPropertyListValidator::OnDoubleClick} - -\func{Bool}{OnDoubleClick}{\param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called when the property is double clicked. Extra functionality can be provided, -such as cycling through possible values. - -\membersection{wxPropertyListValidator::OnEdit} - -\func{Bool}{OnEdit}{\param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called when the Edit (detailed editing) button is pressed. The default implementation -calls wxPropertyListView::BeginDetailedEditing; a filename validator (for example) overrides -this function to show the file selector. - -\membersection{wxPropertyListValidator::OnPrepareControls} - -\func{Bool}{OnPrepareControls}{\param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called to allow the validator to setup the display, such enabling or disabling buttons, and -setting the values and selection in the standard listbox control (the one optionally used for displaying -value options). - -\membersection{wxPropertyListValidator::OnPrepareDetailControls} - -\func{Bool}{OnPrepareDetailControls}{\param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called when the property is edited `in detail', i.e. when the Edit button is pressed. - -\membersection{wxPropertyListValidator::OnRetrieveValue} - -\func{Bool}{OnRetrieveValue}{\param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called when Tick (Confirm) is pressed or focus is lost or view wants to update -the property list. Should do the transfer from the property editing area to the property itself - -\membersection{wxPropertyListValidator::OnSelect} - -\func{Bool}{OnSelect}{\param{Bool}{ select}, \param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called when the property is selected or deselected: typically displays the value -in the edit control (having chosen a suitable control to display: (non)editable text or listbox). - -\membersection{wxPropertyListValidator::OnValueListSelect} - -\func{Bool}{OnValueListSelect}{\param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called when the value listbox is selected. The default behaviour is to copy -string to text control, and retrieve the value into the property. - - - -\section{\class{wxPropertyListView}: wxPropertyView}\label{wxpropertylistview} - -\overview{wxPropertyListView overview}{wxpropertylistviewoverview} - -The {\bf wxPropertyListView} class shows a wxPropertySheet as a Visual Basic-style property list. - -\membersection{wxPropertyListView::wxPropertyListView} - -\func{void}{wxPropertyListView}{\param{long}{ flags = wxPROP\_BUTTON\_DEFAULT}} - -Constructor. - -The {\it flags} argument can be a bit list of the following: - -\begin{itemize}\itemsep=0pt -\item wxPROP\_BUTTON\_CLOSE -\item wxPROP\_BUTTON\_OK -\item wxPROP\_BUTTON\_CANCEL -\item wxPROP\_BUTTON\_CHECK\_CROSS -\item wxPROP\_BUTTON\_HELP -\item wxPROP\_DYNAMIC\_VALUE\_FIELD -\item wxPROP\_PULLDOWN -\end{itemize} - -\membersection{wxPropertyListView::\destruct{wxPropertyListView}} - -\func{void}{\destruct{wxPropertyListView}}{\void} - -Destructor. - -\membersection{wxPropertyListView::AssociatePanel}\label{wxpropertylistviewassociatepanel} - -\func{void}{AssociatePanel}{\param{wxPanel *}{panel}} - -Associates the window on which the controls will be displayed, with the view (sets an internal pointer to the window). - -\membersection{wxPropertyListView::BeginShowingProperty}\label{wxpropertylistviewbeginshowingproperty} - -\func{Bool}{BeginShowingProperty}{\param{wxProperty *}{property}} - -Finds the appropriate validator and loads the property into the controls, by calling -wxPropertyValidator::OnPrepareControls and then wxPropertyListView::DisplayProperty. - -\membersection{wxPropertyListView::DisplayProperty}\label{wxpropertylistviewdisplayproperty} - -\func{Bool}{DisplayProperty}{\param{wxProperty *}{property}} - -Calls wxPropertyValidator::OnDisplayValue for the current property's validator. This function -gets called by wxPropertyListView::BeginShowingProperty, which is in turn called -from ShowProperty, called by OnPropertySelect, called by the listbox callback when selected. - -\membersection{wxPropertyListView::EndShowingProperty}\label{wxpropertylistviewendshowingproperty} - -\func{Bool}{EndShowingProperty}{\param{wxProperty *}{property}} - -Finds the appropriate validator and unloads the property from the controls, by calling -wxPropertyListView::RetrieveProperty, wxPropertyValidator::OnClearControls and (if we're in -detailed editing mdoe) wxPropertyValidator::OnClearDetailControls. - -\membersection{wxPropertyListView::GetPanel}\label{wxpropertylistviewgetpanel} - -\func{wxPanel *}{GetPanel}{\void} - -Returns the panel associated with the view. - -\membersection{wxPropertyListView::GetManagedWindow}\label{wxpropertylistviewgetmanagedwindow} - -\func{wxWindow *}{GetManagedWindow}{\void} - -Returns the managed window (a frame or dialog) associated with the view. - -\membersection{wxPropertyListView::GetWindowCancelButton}\label{wxpropertylistviewgetwindowcancelbutton} - -\func{wxButton *}{GetWindowCancelButton}{\void} - -Returns the window cancel button, if any. - -\membersection{wxPropertyListView::GetWindowCloseButton}\label{wxpropertylistviewgetwindowclosebutton} - -\func{wxButton *}{GetWindowCloseButton}{\void} - -Returns the window close or OK button, if any. - -\membersection{wxPropertyListView::GetWindowHelpButton}\label{wxpropertylistviewgetwindowhelpbutton} - -\func{wxButton *}{GetWindowHelpButton}{\void} - -Returns the window help button, if any. - -\membersection{wxPropertyListView::SetManagedWindow}\label{wxpropertylistviewsetmanagedwindow} - -\func{void}{SetManagedWindow}{\param{wxWindow *}{win}} - -Sets the managed window (a frame or dialog) associated with the view. - -\membersection{wxPropertyListView::UpdatePropertyDisplayInList}\label{wxpropertylistviewupdatepropdisplay} - -\func{Bool}{UpdatePropertyDisplayInList}{\param{wxProperty *}{property}} - -Updates the display for the given changed property. - -\membersection{wxPropertyListView::UpdatePropertyList}\label{wxpropertylistviewupdateproplist} - -\func{Bool}{UpdatePropertyList}{\param{Bool }{clearEditArea = TRUE}} - -Updates the whole property list display. - - -\section{\class{wxPropertySheet}: wxObject}\label{wxpropertysheet} - -\overview{wxPropertySheet overview}{wxpropertysheetoverview} - -The {\bf wxPropertySheet} class is used for storing a number of -wxProperty objects (essentially names and values). - -\membersection{wxPropertySheet::wxPropertySheet} - -\func{void}{wxPropertySheet}{\void} - -Constructor. - -\membersection{wxPropertySheet::\destruct{wxPropertySheet}} - -\func{void}{\destruct{wxPropertySheet}}{\void} - -Destructor. Destroys all contained properties. - -\membersection{wxPropertySheet::AddProperty}\label{wxpropertysheetaddproperty} - -\func{void}{AddProperty}{\param{wxProperty *}{property}} - -Adds a property to the sheet. - -\membersection{wxPropertySheet::Clear}\label{wxpropertysheetclear} - -\func{void}{Clear}{\void} - -Clears all the properties from the sheet (deleting them). - -\membersection{wxPropertySheet::GetProperties}\label{wxpropertysheetgetproperties} - -\func{wxList\&}{GetProperties}{\void} - -Returns a reference to the internal list of properties. - -\membersection{wxPropertySheet::GetProperty}\label{wxpropertysheetgetproperty} - -\func{wxProperty *}{GetProperty}{\param{char *}{name}} - -Gets a property by name. - -\membersection{wxPropertySheet::SetAllModified} - -\func{void}{SetAllModified}{\param{Bool}{ flag}} - -Sets the `modified' flag of each property value. - - - -\section{\class{wxPropertyValidator}: wxEvtHandler}\label{wxpropertyvalidator} - -\overview{wxPropertyValidator overview}{wxpropertyvalidatoroverview} - -The {\bf wxPropertyValidator} abstract class is the base class for deriving -validators for properties. - -\membersection{wxPropertyValidator::wxPropertyValidator} - -\func{void}{wxPropertyValidator}{\param{long}{ flags = 0}} - -Constructor. - -\membersection{wxPropertyValidator::\destruct{wxPropertyValidator}} - -\func{void}{\destruct{wxPropertyValidator}}{\void} - -Destructor. - -\membersection{wxPropertyValidator::GetFlags} - -\func{long}{GetFlags}{\void} - -Returns the flags for the validator. - -\membersection{wxPropertyValidator::GetValidatorProperty} - -\func{wxProperty *}{GetValidatorProperty}{\void} - -Gets the property for the validator. - -\membersection{wxPropertyValidator::SetValidatorProperty} - -\func{void}{SetValidatorProperty}{\param{wxProperty *}{property}} - -Sets the property for the validator. - - -\section{\class{wxPropertyValidatorRegistry}: wxHashTable}\label{wxpropertyvalidatorregistry} - -The {\bf wxPropertyValidatorRegistry} class is used for storing validators, -indexed by the `role name' of the property, by which groups of property -can be identified for the purpose of validation and editing. - -\membersection{wxPropertyValidatorRegistry::wxPropertyValidatorRegistry} - -\func{void}{wxPropertyValidatorRegistry}{\void} - -Constructor. - -\membersection{wxPropertyValidatorRegistry::\destruct{wxPropertyValidatorRegistry}} - -\func{void}{\destruct{wxPropertyValidatorRegistry}}{\void} - -Destructor. - -\membersection{wxPropertyValidatorRegistry::Clear} - -\func{void}{ClearRegistry}{\void} - -Clears the registry, deleting the validators. - -\membersection{wxPropertyValidatorRegistry::GetValidator} - -\func{wxPropertyValidator *}{GetValidator}{\param{wxString\& }{roleName}} - -Retrieve a validator by the property role name. - -\membersection{wxPropertyValidatorRegistry::RegisterValidator}\label{wxpropertyvalidatorregistervalidator} - -\func{void}{RegisterValidator}{\param{wxString\& }{roleName}, \param{wxPropertyValidator *}{validator}} - -Register a validator with the registry. {\it roleName} is a name indicating the -role of the property, such as ``filename''. Later, when a validator is chosen for -editing a property, this role name is matched against the class names of the property, -if the property does not already have a validator explicitly associated with it. - - -\section{\class{wxPropertyValue}: wxObject}\label{wxpropertyvalue} - -The {\bf wxPropertyValue} class represents the value of a property, -and is normally associated with a wxProperty object. - -A wxPropertyValue has one of the following types: - -\begin{itemize}\itemsep=0pt -\item wxPropertyValueNull -\item wxPropertyValueInteger -\item wxPropertyValueReal -\item wxPropertyValueBool -\item wxPropertyValueString -\item wxPropertyValueList -\item wxPropertyValueIntegerPtr -\item wxPropertyValueRealPtr -\item wxPropertyValueBoolPtr -\item wxPropertyValueStringPtr -\end{itemize} - -\membersection{wxPropertyValue::wxPropertyValue} - -\func{void}{wxPropertyValue}{\void} - -Default constructor. - -\func{void}{wxPropertyValue}{\param{const wxPropertyValue\& }{copyFrom}} - -Copy constructor. - -\func{void}{wxPropertyValue}{\param{char *}{val}} - -Construction from a string value. - -\func{void}{wxPropertyValue}{\param{long}{ val}} - -Construction from an integer value. You may need to cast to (long) to -avoid confusion with other constructors (such as the Bool constructor). - -\func{void}{wxPropertyValue}{\param{Bool}{ val}} - -Construction from a boolean value. - -\func{void}{wxPropertyValue}{\param{float}{ val}} - -Construction from a floating point value. - -\func{void}{wxPropertyValue}{\param{double}{ val}} - -Construction from a floating point value. - -\func{void}{wxPropertyValue}{\param{wxList *}{ val}} - -Construction from a list of wxPropertyValue objects. The -list, but not each contained wxPropertyValue, will be deleted -by the constructor. The wxPropertyValues will be assigned to -this wxPropertyValue list. In other words, so do not delete wxList or -its data after calling this constructor. - -\func{void}{wxPropertyValue}{\param{wxStringList *}{ val}} - -Construction from a list of strings. The list (including the strings -contained in it) will be deleted by the constructor, so do not -destroy {\it val} explicitly. - -\func{void}{wxPropertyValue}{\param{char **}{val}} - -Construction from a string pointer. - -\func{void}{wxPropertyValue}{\param{long *}{val}} - -Construction from an integer pointer. - -\func{void}{wxPropertyValue}{\param{Bool *}{val}} - -Construction from an boolean pointer. - -\func{void}{wxPropertyValue}{\param{float *}{val}} - -Construction from a floating point pointer. - -The last four constructors use pointers to various C++ types, and do not -store the types themselves; this allows the values to stand in for actual -data values defined elsewhere. - -\membersection{wxPropertyValue::\destruct{wxPropertyValue}} - -\func{void}{\destruct{wxPropertyValue}}{\void} - -Destructor. - -\membersection{wxPropertyValue::Append} - -\func{void}{Append}{\param{wxPropertyValue *}{expr}} - -Appends a property value to the list. - -\membersection{wxPropertyValue::BoolValue} - -\func{Bool}{BoolValue}{\void} - -Returns the boolean value. - -\membersection{wxPropertyValue::BoolValuePtr} - -\func{Bool *}{BoolValuePtr}{\void} - -Returns the pointer to the boolean value. - -\membersection{wxPropertyValue::ClearList} - -\func{void}{ClearList}{\void} - -Deletes the contents of the list. - -\membersection{wxPropertyValue::Delete} - -\func{void}{Delete}{\param{wxPropertyValue *}{expr}} - -Deletes {\it expr} from this list. - -\membersection{wxPropertyValue::GetFirst} - -\func{wxPropertyValue *}{GetFirst}{\void} - -Gets the first value in the list. - -\membersection{wxPropertyValue::GetLast} - -\func{wxPropertyValue *}{GetFirst}{\void} - -Gets the last value in the list. - -\membersection{wxPropertyValue::GetModified} - -\func{Bool}{GetModified}{\void} - -Returns TRUE if the value was modified since being created -(or since SetModified was called). - -\membersection{wxPropertyValue::GetNext} - -\func{wxPropertyValue *}{GetNext}{\void} - -Gets the next value in the list (the one after `this'). - -\membersection{wxPropertyValue::GetStringRepresentation} - -\func{wxString}{GetStringRepresentation}{\void} - -Gets a string representation of the value. - -\membersection{wxPropertyValue::IntegerValue} - -\func{long}{IntegerValue}{\void} - -Returns the integer value. - -\membersection{wxPropertyValue::Insert} - -\func{void}{Insert}{\param{wxPropertyValue *}{expr}} - -Inserts a property value at the front of a list. - -\membersection{wxPropertyValue::IntegerValuePtr} - -\func{long *}{IntegerValuePtr}{\void} - -Returns the pointer to the integer value. - -\membersection{wxPropertyValue::Nth} - -\func{wxPropertyValue *}{Nth}{\param{int}{ n}} - -Returns the nth value of a list expression (starting from zero). - -\membersection{wxPropertyValue::Number} - -\func{int}{Number}{\void} - -Returns the number of elements in a list expression. - -\membersection{wxPropertyValue::RealValue} - -\func{float}{RealValue}{\void} - -Returns the floating point value. - -\membersection{wxPropertyValue::RealValuePtr} - -\func{float *}{RealValuePtr}{\void} - -Returns the pointer to the floating point value. - -\membersection{wxPropertyValue::SetModified} - -\func{void}{SetModified}{\param{Bool}{ flag}} - -Sets the `modified' flag. - -\membersection{wxPropertyValue::StringValue} - -\func{char *}{StringValue}{\void} - -Returns the string value. - -\membersection{wxPropertyValue::StringValuePtr} - -\func{char **}{StringValuePtr}{\void} - -Returns the pointer to the string value. - -\membersection{wxPropertyValue::Type} - -\func{wxPropertyValueType}{Type}{\void} - -Returns the value type. - -\membersection{wxPropertyValue::operator $=$} - -\func{void}{operator $=$}{\param{const wxPropertyValue\& }{val}} - -\func{void}{operator $=$}{\param{const char *}{val}} - -\func{void}{operator $=$}{\param{const long }{val}} - -\func{void}{operator $=$}{\param{const Bool }{val}} - -\func{void}{operator $=$}{\param{const float }{val}} - -\func{void}{operator $=$}{\param{const char **}{val}} - -\func{void}{operator $=$}{\param{const long *}{val}} - -\func{void}{operator $=$}{\param{const Bool *}{val}} - -\func{void}{operator $=$}{\param{const float *}{val}} - -Assignment operators. - - - -\section{\class{wxPropertyView}: wxEvtHandler}\label{wxpropertyview} - -\overview{wxPropertyView overview}{wxpropertyviewoverview} - -The {\bf wxPropertyView} abstract class is the base class for views -of property sheets, acting as intermediaries between properties and -actual windows. - -\membersection{wxPropertyView::wxPropertyView} - -\func{void}{wxPropertyView}{\param{long}{ flags = wxPROP\_BUTTON\_DEFAULT}} - -Constructor. - -The {\it flags} argument can be a bit list of the following: - -\begin{itemize}\itemsep=0pt -\item wxPROP\_BUTTON\_CLOSE -\item wxPROP\_BUTTON\_OK -\item wxPROP\_BUTTON\_CANCEL -\item wxPROP\_BUTTON\_CHECK\_CROSS -\item wxPROP\_BUTTON\_HELP -\item wxPROP\_DYNAMIC\_VALUE\_FIELD -\item wxPROP\_PULLDOWN -\end{itemize} - -\membersection{wxPropertyView::\destruct{wxPropertyView}} - -\func{void}{\destruct{wxPropertyView}}{\void} - -Destructor. - -\membersection{wxPropertyView::AddRegistry}\label{wxpropertyviewaddregistry} - -\func{void}{AddRegistry}{\param{wxPropertyValidatorRegistry *}{registry}} - -Adds a registry (list of property validators) the view's list of registries, which is initially empty. - -\membersection{wxPropertyView::FindPropertyValidator}\label{wxpropertyviewfindpropertyvalidator} - -\func{wxPropertyValidator *}{FindPropertyValidator}{\param{wxProperty *}{property}} - -Finds the property validator that is most appropriate to this property. - -\membersection{wxPropertyView::GetPropertySheet}\label{wxpropertyviewgetpropertysheet} - -\func{wxPropertySheet *}{GetPropertySheet}{\void} - -Gets the property sheet for this view. - -\membersection{wxPropertyView::GetRegistryList}\label{wxpropertyviewgetregistrylist} - -\func{wxList\&}{GetRegistryList}{\void} - -Returns a reference to the list of property validator registries. - -\membersection{wxPropertyView::OnOk}\label{wxpropertyviewonok} - -\func{void}{OnOk}{\void} - -Virtual function that will be called when the OK button on the physical window is pressed (if it exists). - -\membersection{wxPropertyView::OnCancel}\label{wxpropertyviewoncancel} - -\func{void}{OnCancel}{\void} - -Virtual function that will be called when the Cancel button on the physical window is pressed (if it exists). - -\membersection{wxPropertyView::OnClose}\label{wxpropertyviewonclose} - -\func{Bool}{OnClose}{\void} - -Virtual function that will be called when the physical window is closed. The default implementation returns FALSE. - -\membersection{wxPropertyView::OnHelp}\label{wxpropertyviewonhelp} - -\func{void}{OnHelp}{\void} - -Virtual function that will be called when the Help button on the physical window is pressed (if it exists). - -\membersection{wxPropertyView::OnPropertyChanged}\label{wxpropertyviewonpropertychanged} - -\func{void}{OnPropertyChanged}{\param{wxProperty *}{property}} - -Virtual function called by a view or validator when a property's value changed. Validators -must be written correctly for this to be called. You can override this function -to respond immediately to property value changes. - -\membersection{wxPropertyView::OnUpdateView}\label{wxpropertyviewonupdateview} - -\func{Bool}{OnUpdateView}{\void} - -Called by the viewed object to update the view. The default implementation just returns -FALSE. - -\membersection{wxPropertyView::SetPropertySheet}\label{wxpropertyviewsetpropertysheet} - -\func{void}{SetPropertySheet}{\param{wxPropertySheet *}{sheet}} - -Sets the property sheet for this view. - -\membersection{wxPropertyView::ShowView}\label{wxpropertyviewshowview} - -\func{void}{ShowView}{\param{wxPropertySheet *}{sheet}, \param{wxPanel *}{panel}} - -Associates this view with the given panel, and shows the view. - -\section{\class{wxRealFormValidator}: wxPropertyFormValidator}\label{wxrealformvalidator} - -\overview{Validator classes}{validatorclasses} - -This class validates a range of real values for form views. The associated panel item must be a wxText. - -\membersection{wxRealFormValidator::wxRealFormValidator} - -\func{void}{wxRealFormValidator}{\param{float }{min=0.0}, \param{float }{max=0.0}, - \param{long}{ flags=0}} - -Constructor. Assigning zero to minimum and maximum values indicates that there is no range to check. - - -\section{\class{wxStringFormValidator}: wxPropertyFormValidator}\label{wxstringformvalidator} - -\overview{Validator classes}{validatorclasses} - -This class validates a string value for a form view, with an optional choice of possible values. -The associated panel item must be a wxText, wxListBox or wxChoice. For wxListBox and wxChoice items, -if the item is empty, the validator attempts to initialize the item from the strings in -the validator. Note that this does not happen for XView wxChoice items since XView cannot reinitialize a wxChoice. - -\membersection{wxStringFormValidator::wxStringFormValidator} - -\func{void}{wxStringFormValidator}{\param{wxStringList *}{list=NULL}, \param{long}{ flags=0}} - -Constructor. Supply a list of strings to indicate a choice, or no strings to allow the -user to freely edit the string. The string list will be deleted when the validator is deleted. - - -\section{\class{wxRealListValidator}: wxPropertyListValidator}\label{wxreallistvalidator} - -\overview{Validator classes}{validatorclasses} - -This class validates a range of real values for property lists. - -\membersection{wxRealListValidator::wxreallistvalidator} - -\func{void}{wxRealListValidator}{\param{float }{min=0.0}, \param{float }{max=0.0}, - \param{long}{ flags=wxPROP\_ALLOW\_TEXT\_EDITING}} - -Constructor. Assigning zero to minimum and maximum values indicates that there is no range to check. - - -\section{\class{wxStringListValidator}: wxPropertyListValidator}\label{wxstringlistvalidator} - -\overview{Validator classes}{validatorclasses} - -This class validates a string value, with an optional choice of possible values. - -\membersection{wxStringListValidator::wxStringListValidator} - -\func{void}{wxStringListValidator}{\param{wxStringList *}{list=NULL}, \param{long}{ flags=0}} - -Constructor. Supply a list of strings to indicate a choice, or no strings to allow the -user to freely edit the string. The string list will be deleted when the validator is deleted. - - -\chapter{Classes by category}\label{classesbycat} - -A classification of property sheet classes by category. - -\section{Data classes} - -\begin{itemize}\itemsep=0pt -\item \helpref{wxProperty}{wxproperty} -\item \helpref{wxPropertyValue}{wxpropertyvalue} -\item \helpref{wxPropertySheet}{wxpropertysheet} -\end{itemize} - - -\section{Validator classes}\label{validatorclasses} - -Validators check that the values the user has entered for a property are -valid. They can also define specific ways of entering data, such as a -file selector for a filename, and they are responsible for transferring -values between the wxProperty and the physical display. - -Base classes: - -\begin{itemize}\itemsep=0pt -\item \helpref{wxPropertyValidator}{wxproperty} -\item \helpref{wxPropertyListValidator}{wxpropertylistvalidator} -\item \helpref{wxPropertyFormValidator}{wxpropertyformvalidator} -\end{itemize} - -List view validators: - -\begin{itemize}\itemsep=0pt -\item \helpref{wxBoolListValidator}{wxboollistvalidator} -\item \helpref{wxFilenameListValidator}{wxfilenamelistvalidator} -\item \helpref{wxIntegerListValidator}{wxintegerlistvalidator} -\item \helpref{wxListOfStringsListValidator}{wxlistofstringslistvalidator} -\item \helpref{wxRealListValidator}{wxreallistvalidator} -\item \helpref{wxStringListValidator}{wxstringlistvalidator} -\end{itemize} - -Form view validators: - -\begin{itemize}\itemsep=0pt -\item \helpref{wxBoolFormValidator}{wxboolformvalidator} -\item \helpref{wxIntegerFormValidator}{wxintegerformvalidator} -\item \helpref{wxRealFormValidator}{wxrealformvalidator} -\item \helpref{wxStringFormValidator}{wxstringformvalidator} -\end{itemize} - -\section{View classes}\label{viewclasses} - -View classes mediate between a property sheet and a physical window. - -\begin{itemize}\itemsep=0pt -\item \helpref{wxPropertyView}{wxpropertyview} -\item \helpref{wxPropertyListView}{wxpropertylistview} -\item \helpref{wxPropertyFormView}{wxpropertyformview} -\end{itemize} - -\section{Window classes}\label{windowclasses} - -The class library defines some window classes that can be used as-is with a suitable -view class and property sheet. - -\begin{itemize}\itemsep=0pt -\item \helpref{wxPropertyFormFrame}{wxpropertyformframe} -\item \helpref{wxPropertyFormDialog}{wxpropertyformdialog} -\item \helpref{wxPropertyFormPanel}{wxpropertyformpanel} -\item \helpref{wxPropertyListFrame}{wxpropertylistframe} -\item \helpref{wxPropertyListDialog}{wxpropertylistdialog} -\item \helpref{wxPropertyListPanel}{wxpropertylistpanel} -\end{itemize} - -\section{Registry classes} - -A validator registry is a list of validators that can be applied to properties in a property sheet. -There may be one or more registries per property view. - -\begin{itemize}\itemsep=0pt -\item \helpref{wxPropertyValidatorRegistry}{wxpropertyvalidatorregistry} -\end{itemize} - - -\chapter{Topic overviews}\label{overviews} - -This chapter contains a selection of topic overviews. - -\section{Property classes overview}\label{propertyoverview} - -The property classes help a programmer to express relationships between -data and physical windows, in particular: - -\begin{itemize}\itemsep=0pt -\item the transfer of data to and from the physical controls; -\item the behaviour of various controls and custom windows for particular -types of data; -\item the validation of data, notifying the user when incorrect data is entered, -or even better, constraining the input so only valid data can be entered. -\end{itemize} - -With a consistent framework, the programmer should be able to use existing -components and design new ones in a principled manner, to solve many data entry -requirements. - -Each datum is represented in a \helpref{wxProperty}{wxproperty}, which has a name and a value. -Various C++ types are permitted in the value of a property, and the property can store a pointer -to the data instead of a copy of the data. A \helpref{wxPropertySheet}{wxpropertysheet} represents a number of these properties. - -These two classes are independent from the way in which the data is visually manipulated. To -mediate between property sheets and windows, the abstract class \helpref{wxPropertyView}{wxpropertyview} is -available for programmers to derive new kinds of view. One kind of view that is available is the \helpref{wxPropertyListView}{wxpropertylistview}, -which displays the data in a Visual Basic-style list, with a small number of controls for editing -the currently selected property. Another is \helpref{wxPropertyFormView}{wxpropertyformview} which -mediates between an existing dialog or panel and the property sheet. - -The hard work of mediation is actually performed by validators, which are instances of classes -derived from \helpref{wxPropertyValidator}{wxpropertyvalidator}. A validator is associated with -a particular property and is responsible for -responding to user interface events, and displaying, updating and checking the property value. -Because a validator's behaviour depends largely on the kind of view being used, there has to be -a separate hierarchy of validators for each class of view. So for wxPropertyListView, there is -an abstract class \helpref{wxPropertyListValidator}{wxpropertylistvalidator} from which concrete -classes are derived, such as \helpref{wxRealListValidator}{wxreallistvalidator} and -\rtfsp\helpref{wxStringListValidator}{wxstringlistvalidator}. - -A validator can be explicitly set for a property, so there is no doubt which validator -should be used to edit that property. However, it is also possible to define a registry -of validators, and have the validator chosen on the basis of the {\it role} of the property. -So a property with a ``filename" role would match the ``filename" validator, which pops -up a file selector when the user double clicks on the property. - -You don't have to define your own frame or window classes: there are some predefined -that will work with the property list view. See \helpref{Window classes}{windowclasses} for -further details. - -\subsection{Example 1: Property list view} - -The following code fragment shows the essentials of creating a registry of -standard validators, a property sheet containing some properties, and -a property list view and dialog or frame. RegisterValidators will be -called on program start, and PropertySheetTest is called in response to a -menu command. - -Note how some properties are created with an explicit reference to -a validator, and others are provided with a ``role'' which can be matched -against a validator in the registry. - -The interface generated by this test program is shown in the section \helpref{Appearance and -behaviour of a property list view}{appearance}. - -\begin{verbatim} -void RegisterValidators(void) -{ - myListValidatorRegistry.RegisterValidator((wxString)"real", new wxRealListValidator); - myListValidatorRegistry.RegisterValidator((wxString)"string", new wxStringListValidator); - myListValidatorRegistry.RegisterValidator((wxString)"integer", new wxIntegerListValidator); - myListValidatorRegistry.RegisterValidator((wxString)"bool", new wxBoolListValidator); -} - -void PropertyListTest(Bool useDialog) -{ - wxPropertySheet *sheet = new wxPropertySheet; - - sheet->AddProperty(new wxProperty("fred", 1.0, "real")); - sheet->AddProperty(new wxProperty("tough choice", (Bool)TRUE, "bool")); - sheet->AddProperty(new wxProperty("ian", (long)45, "integer", new wxIntegerListValidator(-50, 50))); - sheet->AddProperty(new wxProperty("bill", 25.0, "real", new wxRealListValidator(0.0, 100.0))); - sheet->AddProperty(new wxProperty("julian", "one", "string")); - sheet->AddProperty(new wxProperty("bitmap", "none", "string", new wxFilenameListValidator("Select a bitmap file", "*.bmp"))); - wxStringList *strings = new wxStringList("one", "two", "three", NULL); - sheet->AddProperty(new wxProperty("constrained", "one", "string", new wxStringListValidator(strings))); - - wxPropertyListView *view = - new wxPropertyListView(NULL, - wxPROP_BUTTON_CHECK_CROSS|wxPROP_DYNAMIC_VALUE_FIELD|wxPROP_PULLDOWN); - - wxDialogBox *propDialog = NULL; - wxPropertyListFrame *propFrame = NULL; - if (useDialog) - { - propDialog = new wxPropertyListDialog(view, NULL, "Property Sheet Test", TRUE, -1, -1, 400, 500); - } - else - { - propFrame = new wxPropertyListFrame(view, NULL, "Property Sheet Test", -1, -1, 400, 500); - } - - view->AddRegistry(&myListValidatorRegistry); - - if (useDialog) - { - view->ShowView(sheet, propDialog); - propDialog->Centre(wxBOTH); - propDialog->Show(TRUE); - } - else - { - propFrame->Initialize(); - view->ShowView(sheet, propFrame->GetPropertyPanel()); - propFrame->Centre(wxBOTH); - propFrame->Show(TRUE); - } -} -\end{verbatim} - -\subsection{Example 2: Property form view} - -This example is similar to Example 1, but uses a property form view to -edit a property sheet using a predefined dialog box. - -\begin{verbatim} -void RegisterValidators(void) -{ - myFormValidatorRegistry.RegisterValidator((wxString)"real", new wxRealFormValidator); - myFormValidatorRegistry.RegisterValidator((wxString)"string", new wxStringFormValidator); - myFormValidatorRegistry.RegisterValidator((wxString)"integer", new wxIntegerFormValidator); - myFormValidatorRegistry.RegisterValidator((wxString)"bool", new wxBoolFormValidator); -} - -void PropertyFormTest(Bool useDialog) -{ - wxPropertySheet *sheet = new wxPropertySheet; - - sheet->AddProperty(new wxProperty("fred", 25.0, "real", new wxRealFormValidator(0.0, 100.0))); - sheet->AddProperty(new wxProperty("tough choice", (Bool)TRUE, "bool")); - sheet->AddProperty(new wxProperty("ian", (long)45, "integer", new wxIntegerFormValidator(-50, 50))); - sheet->AddProperty(new wxProperty("julian", "one", "string")); - wxStringList *strings = new wxStringList("one", "two", "three", NULL); - sheet->AddProperty(new wxProperty("constrained", "one", "string", new wxStringFormValidator(strings))); - - wxPropertyFormView *view = new wxPropertyFormView(NULL); - - wxDialogBox *propDialog = NULL; - wxPropertyFormFrame *propFrame = NULL; - if (useDialog) - { - propDialog = new wxPropertyFormDialog(view, NULL, "Property Form Test", TRUE, -1, -1, 400, 300); - } - else - { - propFrame = new wxPropertyFormFrame(view, NULL, "Property Form Test", -1, -1, 400, 300); - propFrame->Initialize(); - } - - wxPanel *panel = propDialog ? propDialog : propFrame->GetPropertyPanel(); - panel->SetLabelPosition(wxVERTICAL); - - // Add items to the panel - - (void) new wxButton(panel, (wxFunction)NULL, "OK", -1, -1, -1, -1, 0, "ok"); - (void) new wxButton(panel, (wxFunction)NULL, "Cancel", -1, -1, 80, -1, 0, "cancel"); - (void) new wxButton(panel, (wxFunction)NULL, "Update", -1, -1, 80, -1, 0, "update"); - (void) new wxButton(panel, (wxFunction)NULL, "Revert", -1, -1, -1, -1, 0, "revert"); - panel->NewLine(); - - // The name of this text item matches the "fred" property - (void) new wxText(panel, (wxFunction)NULL, "Fred", "", -1, -1, 90, -1, 0, "fred"); - (void) new wxCheckBox(panel, (wxFunction)NULL, "Yes or no", -1, -1, -1, -1, 0, "tough choice"); - (void) new wxSlider(panel, (wxFunction)NULL, "Sliding scale", 0, -50, 50, 100, -1, -1, wxHORIZONTAL, "ian"); - panel->NewLine(); - (void) new wxListBox(panel, (wxFunction)NULL, "Constrained", wxSINGLE, -1, -1, 100, 90, 0, NULL, 0, "constrained"); - - view->AddRegistry(&myFormValidatorRegistry); - - if (useDialog) - { - view->ShowView(sheet, propDialog); - view->AssociateNames(); - view->TransferToDialog(); - propDialog->Centre(wxBOTH); - propDialog->Show(TRUE); - } - else - { - view->ShowView(sheet, propFrame->GetPropertyPanel()); - view->AssociateNames(); - view->TransferToDialog(); - propFrame->Centre(wxBOTH); - propFrame->Show(TRUE); - } -} -\end{verbatim} - -\section{Validator classes overview}\label{validatoroverview} - -Classes: \helpref{Validator classes}{validatorclasses} - -The validator classes provide functionality for mediating between a wxProperty and -the actual display. There is a separate family of validator classes for each -class of view, since the differences in user interface for these views implies -that little common functionality can be shared amongst validators. - -\subsection{wxPropertyValidator overview}\label{wxpropertyvalidatoroverview} - -Class: \helpref{wxPropertyValidator}{wxpropertyvalidator} - -This class is the root of all property validator classes. It contains a small -amount of common functionality, including functions to convert between -strings and C++ values. - -A validator is notionally an object which sits between a property and its displayed -value, and checks that the value the user enters is correct, giving an error message -if the validation fails. In fact, the validator does more than that, and is akin to -a view class but at a finer level of detail. It is also responsible for -loading the dialog box control with the value from the property, putting it back -into the property, preparing special controls for editing the value, and -may even invoke special dialogs for editing the value in a convenient way. - -In a property list dialog, there is quite a lot of scope for supplying custom dialogs, -such as file or colour selectors. For a form dialog, there is less scope because -there is no concept of `detailed editing' of a value: one control is associated with -one property, and there is no provision for invoking further dialogs. The reader -may like to work out how the form view could be extended to provide some of the -functionality of the property list! - -Validator objects may be associated explictly with a wxProperty, or they may be -indirectly associated by virtue of a property `kind' that matches validators having -that kind. In the latter case, such validators are stored in a validator registry -which is passed to the view before the dialog is shown. If the validator takes -arguments, such as minimum and maximum values in the case of a wxIntegerListValidator, -then the validator must be associated explicitly with the property. The validator -will be deleted when the property is deleted. - -\subsection{wxPropertyListValidator overview}\label{wxpropertylistvalidatoroverview} - -Class: \helpref{wxPropertyListValidator}{wxpropertylistvalidator} - -This class is the abstract base class for property list view validators. -The list view acts upon a user interface containing a list of properties, -a text item for direct property value editing, confirm/cancel buttons for the value, -a pulldown list for making a choice between values, and OK/Cancel/Help buttons -for the dialog (see \helpref{property list appearance}{appearance}). - -By overriding virtual functions, the programmer can create custom -behaviour for different kinds of property. Custom behaviour can use just the -available controls on the property list dialog, or the validator can -invoke custom editors with quite different controls, which pop up in -`detailed editing' mode. - -See the detailed class documentation for the members you should override -to give your validator appropriate behaviour. - -\subsection{wxPropertyFormValidator overview}\label{wxpropertyformvalidatoroverview} - -This class is the abstract base class for property form view validators. -The form view acts upon an existing dialog box or panel, where either the -panel item names correspond to property names, or the programmer has explicitly -associated the panel item with the property. - -By overriding virtual functions, the programmer determines how -values are displayed or retrieved, and the checking that the validator does. - -See the detailed class documentation for the members you should override -to give your validator appropriate behaviour. - -\section{View classes overview}\label{viewoverview} - -Classes: \helpref{View classes}{viewclasses} - -An instance of a view class relates a property sheet with an actual window. -Currently, there are two classes of view: wxPropertyListView and wxPropertyFormView. - -\subsection{wxPropertyView overview}\label{wxpropertyviewoverview} - -Class: \helpref{wxPropertyView}{wxpropertyview} - -This is the abstract base class for property views. - -\subsection{wxPropertyListView overview}\label{wxpropertylistviewoverview} - -Class: \helpref{wxPropertyListView}{wxpropertylistview} - -The property list view defines the relationship between a property sheet and -a property list dialog or panel. It manages user interface events such as -clicking on a property, pressing return in the text edit field, and clicking -on Confirm or Cancel. These events cause member functions of the -class to be called, and these in turn may call member functions of -the appropriate validator to be called, to prepare controls, check the property value, -invoke detailed editing, etc. - -\subsection{wxPropertyFormView overview}\label{wxpropertyformviewoverview} - -Class: \helpref{wxPropertyFormView}{wxpropertyformview} - -The property form view manages the relationship between a property sheet -and an existing dialog or panel. - -You must first create a panel or dialog box for the view to work on. -The panel should contain panel items with names that correspond to -properties in your property sheet; or you can explicitly set the -panel item for each property. - -Apart from any custom panel items that you wish to control independently -of the property-editing items, wxPropertyFormView takes over the -processing of item events. It can also control normal dialog behaviour such -as OK, Cancel, so you should also create some standard buttons that the property view -can recognise. Just create the buttons with standard names and the view -will do the rest. The following button names are recognised: - -\begin{itemize}\itemsep=0pt -\item {\bf ok}: indicates the OK button. Calls wxPropertyFormView::OnOk. By default, -checks and updates the form values, closes and deletes the frame or dialog, then deletes the view. -\item {\bf cancel}: indicates the Cancel button. Calls wxPropertyFormView::OnCancel. By default, -closes and deletes the frame or dialog, then deletes the view. -\item {\bf help}: indicates the Help button. Calls wxPropertyFormView::OnHelp. This needs -to be overridden by the application for anything interesting to happen. -\item {\bf revert}: indicates the Revert button. Calls wxPropertyFormView::OnRevert, -which by default transfers the wxProperty values to the panel items (in effect -undoing any unsaved changes in the items). -\item {\bf update}: indicates the Revert button. Calls wxPropertyFormView::OnUpdate, which -by defaults transfers the displayed values to the wxProperty objects. -\end{itemize} - -\section{wxPropertySheet overview}\label{wxpropertysheetoverview} - -Classes: \helpref{wxPropertySheet}{wxpropertysheet}, \helpref{wxProperty}{wxproperty}, \helpref{wxPropertyValue}{wxpropertyvalue} - -A property sheet defines zero or more properties. This is a bit like an explicit representation of -a C++ object. wxProperty objects can have values which are pointers to C++ values, or they -can allocate their own storage for values. - -Because the property sheet representation is explicit and can be manipulated by -a program, it is a convenient form to be used for a variety of -editing purposes. wxPropertyListView and wxPropertyFormView are two classes that -specify the relationship between a property sheet and a user interface. You could imagine -other uses for wxPropertySheet, for example to generate a form-like user interface without -the need for GUI programming. Or for storing the names and values of command-line switches, with the -option to subsequently edit these values using a wxPropertyListView. - -A typical use for a property sheet is to represent values of an object -which are only implicit in the current representation of it. For -example, in Visual Basic and similar programming environments, you can -`edit a button', or rather, edit the button's properties. One of the -properties you can edit is {\it width} - but there is no explicit -representation of width in a wxWindows button; instead, you call SetSize -and GetSize members. To translate this into a consisent, -property-oriented scheme, we could derive a new class -wxButtonWithProperties, which has two new functions: SetProperty and -GetProperty. SetProperty accepts a property name and a value, and calls -an appropriate function for the property that is being passed. -GetProperty accepts a property name, returning a property value. So -instead of having to use the usual arbitrary set of C++ member functions -to set or access attributes of a window, programmer deals merely with -SetValue/GetValue, and property names and values. -We now have a single point at which we can modify or query an object by specifying -names and values at run-time. (The implementation of SetProperty and GetProperty -is probably quite messy and involves a large if-then-else statement to -test the property name and act accordingly.) - -When the user invokes the property editor for a wxButtonWithProperties, the system -creates a wxPropertySheet with `imaginary' properties such as width, height, font size -and so on. For each property, wxButtonWithProperties::GetProperty is called, and the result is -passed to the corresponding wxProperty. The wxPropertySheet is passed to a wxPropertyListView -as described elsewhere, and the user edits away. When the user has finished editing, the system calls -wxButtonWithProperties::SetProperty to transfer the wxProperty value back into the button -by way of an appropriate call, wxWindow::SetSize in the case of width and height properties. - -\end{comment} \ No newline at end of file diff --git a/utils/dialoged/docs/contents.gif b/utils/dialoged/docs/contents.gif deleted file mode 100644 index 3dddfa3dd5..0000000000 Binary files a/utils/dialoged/docs/contents.gif and /dev/null differ diff --git a/utils/dialoged/docs/copysize.bmp b/utils/dialoged/docs/copysize.bmp deleted file mode 100644 index 36060ad72b..0000000000 Binary files a/utils/dialoged/docs/copysize.bmp and /dev/null differ diff --git a/utils/dialoged/docs/copysize.eps b/utils/dialoged/docs/copysize.eps deleted file mode 100644 index 9f084995a2..0000000000 --- a/utils/dialoged/docs/copysize.eps +++ /dev/null @@ -1,161 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: copysize.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 389 270 404 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 389 translate - -% size of image (on paper, in 1/72inch coords) -16 15 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 9 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 ffff00 -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -16 15 8 % dimensions of data -[16 0 0 -15 0 15] % mapping matrix -rlecmapimage - -0f01 -090081010001000101 -810002060281000101018100010001 -810002060281000101018100010001 -8100020602820001000300 -810002060281000181010001000001 -090002018100010001 -0f01 -03018b000100010001000100010001 -0f01 -0301810001810100040082010001 -060181000202028100010101 -0301810001810100040082010001 -0f01 -03018b000100010001000100010001 - -% -% Compression made this file 21.11% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/copysize.gif b/utils/dialoged/docs/copysize.gif deleted file mode 100644 index 72b6f08a39..0000000000 Binary files a/utils/dialoged/docs/copysize.gif and /dev/null differ diff --git a/utils/dialoged/docs/dialog.bmp b/utils/dialoged/docs/dialog.bmp deleted file mode 100644 index 889d6ad216..0000000000 Binary files a/utils/dialoged/docs/dialog.bmp and /dev/null differ diff --git a/utils/dialoged/docs/dialog.eps b/utils/dialoged/docs/dialog.eps deleted file mode 100644 index 63045c2465..0000000000 --- a/utils/dialoged/docs/dialog.eps +++ /dev/null @@ -1,174 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: dialog.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 375 282 403 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 375 translate - -% size of image (on paper, in 1/72inch coords) -28 28 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 15 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 bf0000 c0c0c0 808080 ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -28 28 8 % dimensions of data -[28 0 0 -28 0 28] % mapping matrix -rlecmapimage - -81030018000003 -8100041704810300 -82000402150201030000 -820004028102011101010201030000 -8200040294020100010001000100010001000100010001000102810203810300 -820004028102011001810002810203810300 -82000402820200020f02810002810203810300 -82000402820200020f02810002810203810300 -82000402820200028102000b000102810002810203810300 -820004028202000282020004090481000282020002810203810300 -820004028202000282020004090481000282020002810203810300 -820004028202000282020004090481000282020002810203810300 -82000402820200028102000b000102810002810203810300 -82000402820200020f02810002810203810300 -82000402820200020f02810002810203810300 -82000402820200020f02810002810203810300 -8200040283020002000500810200050082020002810203810300 -820004028402000200030303830002000303038300020002810203810300 -820004028402000200030303830002000303038300020002810203810300 -8200040283020002000500810200050082020002810203810300 -82000402820200020f02810002810203810300 -820004028102001100010201030000 -82000402150201030000 -82000402150201030000 -82000402150201030000 -8200040317030000 -81000318030000 -81030018000003 - -% -% Compression made this file 21.77% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/dialog.gif b/utils/dialoged/docs/dialog.gif deleted file mode 100644 index ae430e3345..0000000000 Binary files a/utils/dialoged/docs/dialog.gif and /dev/null differ diff --git a/utils/dialoged/docs/dialoged.hpj b/utils/dialoged/docs/dialoged.hpj deleted file mode 100644 index a212f12137..0000000000 --- a/utils/dialoged/docs/dialoged.hpj +++ /dev/null @@ -1,17 +0,0 @@ -[OPTIONS] -BMROOT=d:\wx2\utils\dialoged\docs ; Assume that bitmaps are where the source is -TITLE=Dialog Editor Manual -CONTENTS=Contents -COMPRESS=HIGH - -[FILES] -dialoged.rtf - -[CONFIG] -CreateButton("Up", "&Up", "JumpId(`dialoged.hlp', `Contents')") -BrowseButtons() - -[MAP] - -[BITMAPS] - diff --git a/utils/dialoged/docs/dialoged.tex b/utils/dialoged/docs/dialoged.tex deleted file mode 100644 index f750ddf9fa..0000000000 --- a/utils/dialoged/docs/dialoged.tex +++ /dev/null @@ -1,61 +0,0 @@ -\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report} -\latexonly{\newcommand{\icon}[2]{\image{1cm;0cm}{#1}}} -\input psbox.tex -% Remove this for processing with dvi2ps instead of dvips -%\special{!/@scaleunit 1 def} -\parskip=10pt -\parindent=0pt -\title{User Manual for wxWindows Dialog Editor Version 1.7} -\winhelponly{\author{by Julian Smart, A.I. Applications Institute, University of Edinburgh\\}} -\winhelpignore{\author{Julian Smart\\Artificial Intelligence Applications Institute\\ -University of Edinburgh\\EH1 1HN} -\date{March 1997} -} -\makeindex -\begin{document} -\maketitle -\pagestyle{fancyplain} -\bibliographystyle{plain} -\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}} -\setfooter{\thepage}{}{}{}{}{\thepage}% -\pagenumbering{roman} -\tableofcontents - -\chapter*{Copyright notice} -\setheader{{\it COPYRIGHT}}{}{}{}{}{{\it COPYRIGHT}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -\begin{center} -Copyright (c) 1996 Artificial Intelligence Applications Institute, -The University of Edinburgh\\ -\end{center} - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose is hereby granted without fee, provided that the -above copyright notice, author statement and this permission notice appear in -all copies of this software and related documentation. - -THE SOFTWARE IS PROVIDED ``AS-IS'' AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, -IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF -MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -IN NO EVENT SHALL THE ARTIFICIAL INTELLIGENCE APPLICATIONS INSTITUTE OR THE -UNIVERSITY OF EDINBURGH BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF -DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH -THE USE OR PERFORMANCE OF THIS SOFTWARE. - -\input{body.tex} -\input{classes.tex} -\input{changes.tex} -\input{bugs.tex} -\input{tech.tex} - -\newpage - -\addcontentsline{toc}{chapter}{Index} -\setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% -\printindex -\end{document} diff --git a/utils/dialoged/docs/forward.gif b/utils/dialoged/docs/forward.gif deleted file mode 100644 index 9c81e8c92f..0000000000 Binary files a/utils/dialoged/docs/forward.gif and /dev/null differ diff --git a/utils/dialoged/docs/gauge.bmp b/utils/dialoged/docs/gauge.bmp deleted file mode 100644 index fbb6259915..0000000000 Binary files a/utils/dialoged/docs/gauge.bmp and /dev/null differ diff --git a/utils/dialoged/docs/gauge.eps b/utils/dialoged/docs/gauge.eps deleted file mode 100644 index 6966f30b35..0000000000 --- a/utils/dialoged/docs/gauge.eps +++ /dev/null @@ -1,174 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: gauge.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 375 282 403 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 375 translate - -% size of image (on paper, in 1/72inch coords) -28 28 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 15 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 bf0000 c0c0c0 808080 ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -28 28 8 % dimensions of data -[28 0 0 -28 0 28] % mapping matrix -rlecmapimage - -81030018000003 -8100041704810300 -82000402150201030000 -82000402150201030000 -8200040204020a00050201030000 -8200040204028100020702810002040201030000 -8200040204028100020702810002040201030000 -8200040204028100020702810002040201030000 -8200040204028100020702810002040201030000 -8200040204028100020702810002040201030000 -8200040204028100020702810002040201030000 -8200040204028100010701810002040201030000 -8200040204028100010701810002040201030000 -8200040204028100010701810002040201030000 -8200040204028100010701810002040201030000 -8200040204028100010701810002040201030000 -8200040204028100010701810002040201030000 -8200040204028100010701810002040201030000 -8200040204028100010701810002040201030000 -8200040204028100010701810002040201030000 -8200040204028100010701810002040201030000 -8200040204028100010701810002040201030000 -8200040204020a00050201030000 -82000402150201030000 -82000402150201030000 -8200040317030000 -81000318030000 -81030018000003 - -% -% Compression made this file 18.92% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/gauge.gif b/utils/dialoged/docs/gauge.gif deleted file mode 100644 index af79fe1aef..0000000000 Binary files a/utils/dialoged/docs/gauge.gif and /dev/null differ diff --git a/utils/dialoged/docs/group.bmp b/utils/dialoged/docs/group.bmp deleted file mode 100644 index b202efd768..0000000000 Binary files a/utils/dialoged/docs/group.bmp and /dev/null differ diff --git a/utils/dialoged/docs/group.eps b/utils/dialoged/docs/group.eps deleted file mode 100644 index 6a33b2efbf..0000000000 --- a/utils/dialoged/docs/group.eps +++ /dev/null @@ -1,174 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: group.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 292 382 320 410 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -292 382 translate - -% size of image (on paper, in 1/72inch coords) -28 28 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 12 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 808080 ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -28 28 8 % dimensions of data -[28 0 0 -28 0 28] % mapping matrix -rlecmapimage - -81020018000002 -8100031703810200 -82000301150101020000 -82000301150101020000 -820003010301880001000100010001000100060101020000 -82000301040181000184010001000182010001060101020000 -820003018101008100018201000101018100018201000101010300010101020000 -82000301820100018401000100018201000181010001000301810001810102810200 -82000301820100010f01810001810102810200 -82000301820100010f01810001810102810200 -82000301820100010f01810001810102810200 -82000301820100010f01810001810102810200 -82000301820100010f01810001810102810200 -82000301820100010f01810001810102810200 -82000301820100010f01810001810102810200 -82000301820100010f01810001810102810200 -82000301820100010f01810001810102810200 -82000301820100010f01810001810102810200 -82000301820100010f01810001810102810200 -82000301820100010f01810001810102810200 -82000301820100010f01810001810102810200 -82000301820100010f01810001810102810200 -820003018101001100010101020000 -82000301150101020000 -82000301150101020000 -8200030217020000 -81000218020000 -81020018000002 - -% -% Compression made this file 20.15% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/group.gif b/utils/dialoged/docs/group.gif deleted file mode 100644 index 683efa8ce7..0000000000 Binary files a/utils/dialoged/docs/group.gif and /dev/null differ diff --git a/utils/dialoged/docs/help.bmp b/utils/dialoged/docs/help.bmp deleted file mode 100644 index 54d5aa4b56..0000000000 Binary files a/utils/dialoged/docs/help.bmp and /dev/null differ diff --git a/utils/dialoged/docs/help.eps b/utils/dialoged/docs/help.eps deleted file mode 100644 index 965ae88d6b..0000000000 --- a/utils/dialoged/docs/help.eps +++ /dev/null @@ -1,161 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: help.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 389 270 404 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 389 translate - -% size of image (on paper, in 1/72inch coords) -16 15 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 9 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 008080 c0c0c0 -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -16 15 8 % dimensions of data -[16 0 0 -15 0 15] % mapping matrix -rlecmapimage - -0f02 -040205000402 -0302810001030101000302 -02028100018101000100010101000202 -02028200010081000283020001008100020102 -02028200010083000200018101008100020102 -03020100820200018101008100020202 -05028100018101008100020302 -0502820001008100020402 -0502820001008100020402 -0502820001008100020402 -060201000602 -05028100018101008100020302 -05028100018101008100020302 -060202000502 - -% -% Compression made this file 24.03% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/help.gif b/utils/dialoged/docs/help.gif deleted file mode 100644 index ef1825ee19..0000000000 Binary files a/utils/dialoged/docs/help.gif and /dev/null differ diff --git a/utils/dialoged/docs/horiz.bmp b/utils/dialoged/docs/horiz.bmp deleted file mode 100644 index 58af34a727..0000000000 Binary files a/utils/dialoged/docs/horiz.bmp and /dev/null differ diff --git a/utils/dialoged/docs/horiz.eps b/utils/dialoged/docs/horiz.eps deleted file mode 100644 index 2c78311a5e..0000000000 --- a/utils/dialoged/docs/horiz.eps +++ /dev/null @@ -1,161 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: horiz.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 389 270 404 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 389 translate - -% size of image (on paper, in 1/72inch coords) -16 15 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 9 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 ffff00 -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -16 15 8 % dimensions of data -[16 0 0 -15 0 15] % mapping matrix -rlecmapimage - -0f01 -050104000401 -050181000201028100010301 -050181000201028100010301 -050181000201028100010301 -050104000401 -0f01 -0f01 -02010a000101 -020181000207028100010001 -020181000207028100010001 -020181000207028100010001 -020181000207028100010001 -02010a000101 -0f01 - -% -% Compression made this file 16.11% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/horiz.gif b/utils/dialoged/docs/horiz.gif deleted file mode 100644 index 12025ea84e..0000000000 Binary files a/utils/dialoged/docs/horiz.gif and /dev/null differ diff --git a/utils/dialoged/docs/listbox.bmp b/utils/dialoged/docs/listbox.bmp deleted file mode 100644 index 07091ea9e3..0000000000 Binary files a/utils/dialoged/docs/listbox.bmp and /dev/null differ diff --git a/utils/dialoged/docs/listbox.eps b/utils/dialoged/docs/listbox.eps deleted file mode 100644 index 97558a4cc0..0000000000 --- a/utils/dialoged/docs/listbox.eps +++ /dev/null @@ -1,174 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: listbox.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 292 382 320 410 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -292 382 translate - -% size of image (on paper, in 1/72inch coords) -28 28 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 12 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 808080 ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -28 28 8 % dimensions of data -[28 0 0 -28 0 28] % mapping matrix -rlecmapimage - -81020018000002 -8100031703810200 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -820003018101001100010101020000 -820003018201000109018100010301810001810102810200 -820003018201000109018100018201000182010001810102810200 -8200030183010001000500020182000100010082010001810102810200 -820003018201000109018100010301810001810102810200 -820003018201000109018100010301810001810102810200 -82000301830100010007008101000500010101020000 -820003018201000109018100010301810001810102810200 -820003018201000109018100010301810001810102810200 -8200030183010001000600010182000100010082010001810102810200 -820003018201000109018100018201000182010001810102810200 -820003018201000109018100010301810001810102810200 -820003018101001100010101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -8200030217020000 -81000218020000 -81020018000002 - -% -% Compression made this file 5.09% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/listbox.gif b/utils/dialoged/docs/listbox.gif deleted file mode 100644 index 04b4b2cc5b..0000000000 Binary files a/utils/dialoged/docs/listbox.gif and /dev/null differ diff --git a/utils/dialoged/docs/load.bmp b/utils/dialoged/docs/load.bmp deleted file mode 100644 index 1c38e97b59..0000000000 Binary files a/utils/dialoged/docs/load.bmp and /dev/null differ diff --git a/utils/dialoged/docs/load.eps b/utils/dialoged/docs/load.eps deleted file mode 100644 index b5cd5288df..0000000000 --- a/utils/dialoged/docs/load.eps +++ /dev/null @@ -1,161 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: load.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 389 270 404 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 389 translate - -% size of image (on paper, in 1/72inch coords) -16 15 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 15 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 808000 c0c0c0 ffff00 ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -16 15 8 % dimensions of data -[16 0 0 -15 0 15] % mapping matrix -rlecmapimage - -0f02 -090202000202 -0802810002010282000200 -0d020100 -0102020007020200 -8502000304030005000302 -8c020004030403040304030400020202 -8c020003040304030403040300020202 -86020004030403000800 -860200030403000107010000 -82020004820400010701810002 -84020003000107018100020002 -81020081000107018100020102 -81020009000302 -0f02 - -% -% Compression made this file 20.00% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/load.gif b/utils/dialoged/docs/load.gif deleted file mode 100644 index 1ae4cecc50..0000000000 Binary files a/utils/dialoged/docs/load.gif and /dev/null differ diff --git a/utils/dialoged/docs/message.bmp b/utils/dialoged/docs/message.bmp deleted file mode 100644 index 8861e7c3e1..0000000000 Binary files a/utils/dialoged/docs/message.bmp and /dev/null differ diff --git a/utils/dialoged/docs/message.eps b/utils/dialoged/docs/message.eps deleted file mode 100644 index bb4717a4c4..0000000000 --- a/utils/dialoged/docs/message.eps +++ /dev/null @@ -1,174 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: message.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 375 282 403 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 375 translate - -% size of image (on paper, in 1/72inch coords) -28 28 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 12 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 808080 ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -28 28 8 % dimensions of data -[28 0 0 -28 0 28] % mapping matrix -rlecmapimage - -81020018000002 -8100031703810200 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -820003010901810001090101020000 -8200030108010200090101020000 -8200030108010200090101020000 -820003010701820001000100080101020000 -820003010701820001000100080101020000 -82000301060181000101010200070101020000 -82000301060181000101010200070101020000 -82000301050181000103010200060101020000 -8200030105010800060101020000 -82000301040181000105010200050101020000 -82000301040181000105010200050101020000 -82000301030181000107010200040101020000 -820003010201010008010300030101020000 -820003010101030006010500020101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -8200030217020000 -81000218020000 -81020018000002 - -% -% Compression made this file 15.73% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/message.gif b/utils/dialoged/docs/message.gif deleted file mode 100644 index 54975c536b..0000000000 Binary files a/utils/dialoged/docs/message.gif and /dev/null differ diff --git a/utils/dialoged/docs/mtext.bmp b/utils/dialoged/docs/mtext.bmp deleted file mode 100644 index a7d0854737..0000000000 Binary files a/utils/dialoged/docs/mtext.bmp and /dev/null differ diff --git a/utils/dialoged/docs/mtext.eps b/utils/dialoged/docs/mtext.eps deleted file mode 100644 index 557442ae7a..0000000000 --- a/utils/dialoged/docs/mtext.eps +++ /dev/null @@ -1,174 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: mtext.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 375 282 403 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 375 translate - -% size of image (on paper, in 1/72inch coords) -28 28 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 12 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 808080 ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -28 28 8 % dimensions of data -[28 0 0 -28 0 28] % mapping matrix -rlecmapimage - -81020018000002 -8100031703810200 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -820003018101001200810102810200 -820003018201000105018100010601010382000102810200 -82000301820100010101010001018100010601010382000102810200 -8200030182010001020181000181010002000401010282000102810200 -820003018201000181010001000101810001820100010301010282000102810200 -820003018201000184010001000182010001820100010301010282000102810200 -8200030182010001810100010081010003000401010282000102810200 -82000301820100010e01010282000102810200 -820003018201000108018100010301010282000102810200 -820003018201000108018100010301010282000102810200 -82000301820100018101000100010103000401010282000102810200 -8200030182010001820100010201810001820100010301010282000102810200 -8200030182010001820100010201810001820100010301010282000102810200 -82000301820100018101000100010104000301010382000102810200 -82000301820100010e01010382000102810200 -820003018101001200810102810200 -82000301150101020000 -82000301150101020000 -82000301150101020000 -8200030217020000 -81000218020000 -81020018000002 - -% -% Compression made this file 22.07% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/mtext.gif b/utils/dialoged/docs/mtext.gif deleted file mode 100644 index c1be400816..0000000000 Binary files a/utils/dialoged/docs/mtext.gif and /dev/null differ diff --git a/utils/dialoged/docs/new.bmp b/utils/dialoged/docs/new.bmp deleted file mode 100644 index d66feb2384..0000000000 Binary files a/utils/dialoged/docs/new.bmp and /dev/null differ diff --git a/utils/dialoged/docs/new.eps b/utils/dialoged/docs/new.eps deleted file mode 100644 index 7c9a949c37..0000000000 --- a/utils/dialoged/docs/new.eps +++ /dev/null @@ -1,161 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: new.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 389 270 404 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 389 translate - -% size of image (on paper, in 1/72inch coords) -16 15 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 9 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -16 15 8 % dimensions of data -[16 0 0 -15 0 15] % mapping matrix -rlecmapimage - -0f01 -020107000401 -0201810002040201000301 -0201810002040283000200010101 -0201810002040203000101 -020181000207028100010001 -020181000207028100010001 -020181000207028100010001 -020181000207028100010001 -020181000207028100010001 -020181000207028100010001 -020181000207028100010001 -020181000207028100010001 -02010a000101 -0f01 - -% -% Compression made this file 20.56% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/new.gif b/utils/dialoged/docs/new.gif deleted file mode 100644 index 3b1fd4c6db..0000000000 Binary files a/utils/dialoged/docs/new.gif and /dev/null differ diff --git a/utils/dialoged/docs/notes.txt b/utils/dialoged/docs/notes.txt deleted file mode 100644 index 8ea471d280..0000000000 --- a/utils/dialoged/docs/notes.txt +++ /dev/null @@ -1,16 +0,0 @@ - -To do ------ - -Nov 26th 1995 - - - Add wxPropertyView::OnPropertyChange(wxProperty *property) member - so that when a property is changed, this can be immediately - reflected in the object. Derive a new wxPropertyListView - in dialoged. - - - Make the property list a modeless dialog or (preferably) resizeable - frame. Allow many property lists to be up at once. Associate - real window, resource and property list. When window is deleted, - delete property list. - \ No newline at end of file diff --git a/utils/dialoged/docs/open.bmp b/utils/dialoged/docs/open.bmp deleted file mode 100644 index 9d90ab6fd0..0000000000 Binary files a/utils/dialoged/docs/open.bmp and /dev/null differ diff --git a/utils/dialoged/docs/open.eps b/utils/dialoged/docs/open.eps deleted file mode 100644 index f8b500faaa..0000000000 --- a/utils/dialoged/docs/open.eps +++ /dev/null @@ -1,161 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: open.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 389 270 404 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 389 translate - -% size of image (on paper, in 1/72inch coords) -16 15 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 12 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 808080 ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -16 15 8 % dimensions of data -[16 0 0 -15 0 15] % mapping matrix -rlecmapimage - -0f01 -090102000201 -0801810001010182000100 -0d010100 -0101020007010200 -82010003010306000301 -8201000307038100010201 -8201000307038100010201 -8201000302030900 -82010003010381000207020000 -82010003820300020702810001 -84010003000281020081000203028100010001 -81010081000207028100010101 -81010009000301 -0f01 - -% -% Compression made this file 19.17% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/open.gif b/utils/dialoged/docs/open.gif deleted file mode 100644 index 9f2e6503db..0000000000 Binary files a/utils/dialoged/docs/open.gif and /dev/null differ diff --git a/utils/dialoged/docs/picture.bmp b/utils/dialoged/docs/picture.bmp deleted file mode 100644 index 00603f0280..0000000000 Binary files a/utils/dialoged/docs/picture.bmp and /dev/null differ diff --git a/utils/dialoged/docs/picture.eps b/utils/dialoged/docs/picture.eps deleted file mode 100644 index 981b2fe478..0000000000 --- a/utils/dialoged/docs/picture.eps +++ /dev/null @@ -1,176 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: picture.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 375 282 403 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 375 translate - -% size of image (on paper, in 1/72inch coords) -28 28 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 12 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 808080 ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -28 28 8 % dimensions of data -[28 0 0 -28 0 28] % mapping matrix -rlecmapimage - -81020018000002 -8100031703810200 -82000301150101020000 -82000301150101020000 -82000301150101020000 -820003018101001100010101020000 -82000301820100010f01810001810102810200 -82000301820100010201810001040102000201810001810102810200 -8200030182010001010183000100010201810001010181000182010001810102810200 -820003018201000181010083000100010201810001010181000182010001810102810200 - -82000301880100010001000100010201810001010181000182010001810102810200 -82000301870100010001000100810001020102000201810001810102810200 -820003018a01000100010001000100010701810001810102810200 -8200030182010001820100018401000100010701810001810102810200 -8200030181010002000101820001000900010101020000 -82000301820100010101810001820100010801810001810102810200 -820003018201000101018300010001810100810001810100810001010181000181010281 -0200 -8200030182010001010185000100010001820100010401810001810102810200 -8200030182010001810100020081010003000101010082010001810102810200 -82000301830100010001000c01810001810102810200 -820003018101001100010101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -8200030217020000 -81000218020000 -81020018000002 - -% -% Compression made this file 23.43% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/picture.gif b/utils/dialoged/docs/picture.gif deleted file mode 100644 index 05b19aef45..0000000000 Binary files a/utils/dialoged/docs/picture.gif and /dev/null differ diff --git a/utils/dialoged/docs/radio.bmp b/utils/dialoged/docs/radio.bmp deleted file mode 100644 index 9a8e93b554..0000000000 Binary files a/utils/dialoged/docs/radio.bmp and /dev/null differ diff --git a/utils/dialoged/docs/radio.eps b/utils/dialoged/docs/radio.eps deleted file mode 100644 index 8e8dcba556..0000000000 --- a/utils/dialoged/docs/radio.eps +++ /dev/null @@ -1,174 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: radio.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 375 282 403 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 375 translate - -% size of image (on paper, in 1/72inch coords) -28 28 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 12 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 808080 ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -28 28 8 % dimensions of data -[28 0 0 -28 0 28] % mapping matrix -rlecmapimage - -81020018000002 -8100031703810200 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -8200030107010400080101020000 -820003010501010004010100060101020000 -8200030104018100010701810001040101020000 -8200030103018100010901810001030101020000 -820003010301810001020102000301810001030101020000 -820003010201810001020104000301810001020101020000 -820003010201810001010106000201810001020101020000 -820003010201810001010106000201810001020101020000 -820003010201810001010106000201810001020101020000 -820003010201810001020104000301810001020101020000 -820003010301810001020102000301810001030101020000 -8200030103018100010901810001030101020000 -8200030104018100010701810001040101020000 -820003010501010004010100060101020000 -8200030107010400080101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -8200030217020000 -81000218020000 -81020018000002 - -% -% Compression made this file 18.24% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/radio.gif b/utils/dialoged/docs/radio.gif deleted file mode 100644 index 90ed06ce31..0000000000 Binary files a/utils/dialoged/docs/radio.gif and /dev/null differ diff --git a/utils/dialoged/docs/readme.txt b/utils/dialoged/docs/readme.txt deleted file mode 100644 index f54a18a687..0000000000 --- a/utils/dialoged/docs/readme.txt +++ /dev/null @@ -1,39 +0,0 @@ - -Prototype dialog editor and property sheet classes --------------------------------------------------- - -Julian Smart, October 4th 1995 ------------------------------- - -Here's what I've done so far on a lightweight dialog editor. The 16-bit -Windows binaries in the bin directory are dialoged.exe (the dialog -editor) and test.exe (a small property sheet demo). - -Main points: - - - You can create a new dialog box and add items to it. - - You can move items around, and right-click - to edit a few properties (very incomplete). - - Can't write out .wxr files yet. Loading code is in - wxWindows, but writing code is absent: should be put - into wxWindows. - - No attempt at resources other than dialogs yet. - Should have menu editor too. - - Should *somehow* have a protocol to allow - existing resources e.g. in wxCLIPS/wxPython - to be edited in situ. - This should be made simpler by the existance of - the plug-in event handler mechanism, which means you - can temporarily handle all the events yourself. - - See dialoged.cc: the main program is tiny because - it's meant to be embeddable. - - The wxPropertySheet (set of) classes are very - general and should be put into wxWin and documented. - -Comments, chivvying and help all appreciated. Maybe if -I documented what I had, it would be easier for others -to do some work on it. - -Regards, - -Julian \ No newline at end of file diff --git a/utils/dialoged/docs/save.bmp b/utils/dialoged/docs/save.bmp deleted file mode 100644 index 545671fa17..0000000000 Binary files a/utils/dialoged/docs/save.bmp and /dev/null differ diff --git a/utils/dialoged/docs/save.eps b/utils/dialoged/docs/save.eps deleted file mode 100644 index 1019aeb244..0000000000 --- a/utils/dialoged/docs/save.eps +++ /dev/null @@ -1,161 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: save.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 389 270 404 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 389 translate - -% size of image (on paper, in 1/72inch coords) -16 15 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 9 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 808080 -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -16 15 8 % dimensions of data -[16 0 0 -15 0 15] % mapping matrix -rlecmapimage - -0f01 -8101000c000001 -84010002000106018300010001 -840100020001060102000001 -84010002000106018300020001 -84010002000106018300020001 -84010002000106018300020001 -84010002000106018300020001 -8201000281020006000102810001 -820100020a02810001 -82010002810200070082020001 -82010002810200040001018300020001 -82010002810200040001018300020001 -82010002810200040001018300020001 -01010c000001 - -% -% Compression made this file 24.44% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/save.gif b/utils/dialoged/docs/save.gif deleted file mode 100644 index 3a031950e5..0000000000 Binary files a/utils/dialoged/docs/save.gif and /dev/null differ diff --git a/utils/dialoged/docs/scroll.bmp b/utils/dialoged/docs/scroll.bmp deleted file mode 100644 index 08f1a28f5c..0000000000 Binary files a/utils/dialoged/docs/scroll.bmp and /dev/null differ diff --git a/utils/dialoged/docs/scroll.eps b/utils/dialoged/docs/scroll.eps deleted file mode 100644 index cae1e34614..0000000000 --- a/utils/dialoged/docs/scroll.eps +++ /dev/null @@ -1,174 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: scroll.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 375 282 403 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 375 translate - -% size of image (on paper, in 1/72inch coords) -28 28 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 12 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 808080 ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -28 28 8 % dimensions of data -[28 0 0 -28 0 28] % mapping matrix -rlecmapimage - -81020018000002 -8100031703810200 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -83000301001300810102810200 -8400030100010701810001070182000102810200 -8400030100010701810001070182000102810200 -840003010001020181000102018100010201810001020182000102810200 -8400030100010101030001018100018101000200020182000102810200 -840003010001810100030001018100018101000300010182000102810200 -8400030100010101030001018100018101000200020182000102810200 -840003010001020181000102018100010201810001020182000102810200 -8400030100010701810001070182000102810200 -8400030100010701810001070182000102810200 -83000301001300810102810200 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -8200030217020000 -81000218020000 -81020018000002 - -% -% Compression made this file 17.47% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/scroll.gif b/utils/dialoged/docs/scroll.gif deleted file mode 100644 index fca1d06ccb..0000000000 Binary files a/utils/dialoged/docs/scroll.gif and /dev/null differ diff --git a/utils/dialoged/docs/slider.bmp b/utils/dialoged/docs/slider.bmp deleted file mode 100644 index 884166a2fc..0000000000 Binary files a/utils/dialoged/docs/slider.bmp and /dev/null differ diff --git a/utils/dialoged/docs/slider.eps b/utils/dialoged/docs/slider.eps deleted file mode 100644 index 02b1d5a608..0000000000 --- a/utils/dialoged/docs/slider.eps +++ /dev/null @@ -1,174 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: slider.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 375 282 403 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 375 translate - -% size of image (on paper, in 1/72inch coords) -28 28 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 12 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 808080 ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -28 28 8 % dimensions of data -[28 0 0 -28 0 28] % mapping matrix -rlecmapimage - -81020018000002 -8100031703810200 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -83000301008100010b0101008101000100810102810200 -82000301820100010c018600010001000102810200 -82000301820100010c018600010001000102810200 -830003010001000b010500810102810200 -82000301150101020000 -83000301001300810102810200 -840003010001020101020c0181000201020000 -840003010001020101000c0181000201020000 -840003010001020101000c0181000201020000 -840003010001020101020c0181000201020000 -8300030100130002020000 -8200030181010215020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -8200030217020000 -81000218020000 -81020018000002 - -% -% Compression made this file 14.88% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/slider.gif b/utils/dialoged/docs/slider.gif deleted file mode 100644 index 701aa1704f..0000000000 Binary files a/utils/dialoged/docs/slider.gif and /dev/null differ diff --git a/utils/dialoged/docs/tech.tex b/utils/dialoged/docs/tech.tex deleted file mode 100644 index 978d35527f..0000000000 --- a/utils/dialoged/docs/tech.tex +++ /dev/null @@ -1,97 +0,0 @@ -\chapter{Technical notes}\label{technotes} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -\section{Overview} - -The dialog editor is written as a library, to be invoked by other programs. As you can see, -dialoged.cc is a very small program which invokes the main window via a wxResourceManager -object. The wxResourceManager object controls the user interface and other aspects -of the dialog editor. - -There is wxResourceTable object in wxResourceManager: this contains a list of -all the wxItemResources currently being edited. wxResourceTable and wxItemResource -are classes already in wxWindows, defined in wx\_res.h. In order to edit a new -dialog box, the dialog is created, and the existing event handler is temporarily replaced -with a new one which defines editing functionality. This allows existing dialogs - even -instances of subclasses of wxDialogBox - to be edited, the application-specific functionality -being temporarily taken over by the dialog editor. - -In order to edit the properties of a dialog box or item, a property list editor is invoked. -This uses the property classes from utils/wxprop. In order to map between properties and the -actual window API, such as SetSize and GetSize, a `proxy' class called wxPropertyInfo -has been defined, with a subclass for each class of wxWindows window to be edited. -This class defines the main members SetProperty, GetProperty, GetPropertyNames, -which transform the normal API into `property' terms. - -Properties are mostly extracted directly from the window being edited. This is -in contrast with wxBuilder, where everything is stored in a set of parallel -data structures, and windows `properties' only only set. However, there -are exceptions to this rule in the dialog editor. There {\it is} in fact a set of -parallel objects, the wxItemResource objects which can be seen listed in -the main Dialog Editor window as a dialog is built up. These usually parallel -the properties in the windows, but occasionally this is not possible. For example, -all dialog boxes being edited must be modeless: or the user would not be -able to access other windows. However, the user must be able to specify that -when used in an application, that dialog box will be modal. In this case, -the value in the wxItemResource will not match that in the actual dialog box. - -There is a major problem with taking values directly from the windows: this -information sometimes does not match what went in. In Motif and XView, -size values returned are not the same as those given. This causes speedy -`degeneration' of window properties. Under Windows, properties are almost -always consistent. The other platforms will need to be catered for by -relying more on the wxItemResource objects, and not taking size -information directly from windows. - -\subsection{Dynamic setting versus recreation} - -The property editor scheme relies on being able to set window properties -dynamically: the user changes a value, and the window changes immediately -to reflect the new value. Unfortunately, not all properties can be -changed dynamically in wxWindows; for example, in Motif, the label position -must be given at panel item creation time, because the way the widgets -are laid out depend on the label position. The label position cannot then -be changed without deleting and recreating the item. - -Hence the dialog editor takes two approaches: where values are dynamically -settable, this is done. Where they are not, the item is deleted and recreated, -after all existing values have been transferred into the parallel wxItemResource -object. Therefore in wx\_rprop.cc, some of the SetProperty implementations have one or -more call to RecreateWindowFromResource. - -\section{Resource associations} - -wxItemResource objects (containing information about panel items and dialogs) are not visual -objects. However, they need to be associated with the visual objects when the latter -are created for editing purposes. Therefore there is a hash table called resourceAssociations -in wxResourceManager. When a window is created, the resource pointer and window pointer -are associated via the hash table. When the window is deleted, the association is removed. -Children of a dialog are associated with child wxItemResource objects by calling -wxFindWindowByName with the wxItemResource name. - -\section{What needs to be done for XView and Motif} - -The following areas need attention before Dialog Editor will run properly on these platforms. - -\begin{enumerate}\itemsep=0pt -\item For XView, the property editor needs to be made a modeless, not modal dialog, which has -implications for flow of control in wxPropertyInfo::Edit. -\item Properties which do not return the same value they are set to, such as width and height, -need to be stored directly in wxItemResource and {\it not} transferred from window to wxItemResource -in wxWindowPropertyInfo::InstantiateResource. -\item Properties which cannot be dynamically set in XView or Motif need to have the item recreated (e.g. labelOrientation). -\end{enumerate} - -\section{Files} - -The Dialog Editor source files are as follows: - -\begin{itemize}\itemsep=0pt -\item wx\_rprop.h, wx\_rprop.cc: handle property setting and getting through the `proxy' wxPropertyInfo -classes and using the property list editor from utils/wxprop. -\item wx\_resed.h, wx\_resed.cc: the main implementation, in particular the wxResourceManager class. -\item wx\_reswr.cc: resource writing code. -\item wx\_repal.cc: the dialog editor palette implementation. -\item dialoged.h, dialoged.cc: small `stub' for invoking the user interface via a wxResourceManager object. -\end{itemize} diff --git a/utils/dialoged/docs/tex2rtf.ini b/utils/dialoged/docs/tex2rtf.ini deleted file mode 100644 index 254296494c..0000000000 --- a/utils/dialoged/docs/tex2rtf.ini +++ /dev/null @@ -1,21 +0,0 @@ -runTwice = yes -titleFontSize = 12 -authorFontSize = 10 -chapterFontSize = 12 -sectionFontSize = 12 -subsectionFontSize = 12 -headerRule = yes -footerRule = yes -useHeadingStyles = yes -listItemIndent=40 -generateHPJ = yes -htmlBrowseButtons = bitmap -winHelpVersion = 3 -winHelpContents = yes -winHelpTitle = "Dialog Editor Manual" -truncateFilenames = yes -\overview [2] { \sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}} -\htmlonly{\image{}{books.gif}}\helpref{#1}{#2} -\sethotspotcolour{on}\sethotspotunderline{on}} -\icon [2] {\xlpignore{\image{2cm;0cm}{#1}}\xlponly{#2}} - diff --git a/utils/dialoged/docs/text.bmp b/utils/dialoged/docs/text.bmp deleted file mode 100644 index be169c6633..0000000000 Binary files a/utils/dialoged/docs/text.bmp and /dev/null differ diff --git a/utils/dialoged/docs/text.eps b/utils/dialoged/docs/text.eps deleted file mode 100644 index e79fe4d8e0..0000000000 --- a/utils/dialoged/docs/text.eps +++ /dev/null @@ -1,178 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: text.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 375 282 403 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 375 translate - -% size of image (on paper, in 1/72inch coords) -28 28 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 12 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 808080 ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -28 28 8 % dimensions of data -[28 0 0 -28 0 28] % mapping matrix -rlecmapimage - -81020018000002 -8100031703810200 -82000301150101020000 -82000301150101020000 -82000301150101020000 -82000301150101020000 -820003018101001200810102810200 -8200030182010001100182000102810200 -82000301820100010e01840001000102810200 -8200030182010001060101000501840001000102810200 -8200030182010001060101000501840001000102810200 -8200030182010001060101000501840001000102810200 -82000301820100018101000200010104000201840001000102810200 -820003018301000100810001810100820001008100018101008100018501000100010281 -0200 -82000301820100010101030081010081000181010081000185010001000102810200 -820003018201000181010082000100820001008100018101008100018501000100010281 -0200 -820003018301000100810001810100820001008100018101008100018501000100010281 -0200 -820003018301000100810001810100820001008100018101008100018501000100010281 -0200 -8200030182010001810100030081010003000201840001000102810200 -82000301820100010e01840001000102810200 -8200030182010001100182000102810200 -820003018101001200810102810200 -82000301150101020000 -82000301150101020000 -82000301150101020000 -8200030217020000 -81000218020000 -81020018000002 - -% -% Compression made this file 22.15% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/text.gif b/utils/dialoged/docs/text.gif deleted file mode 100644 index 58b51dd161..0000000000 Binary files a/utils/dialoged/docs/text.gif and /dev/null differ diff --git a/utils/dialoged/docs/toback.bmp b/utils/dialoged/docs/toback.bmp deleted file mode 100644 index d2e5efffce..0000000000 Binary files a/utils/dialoged/docs/toback.bmp and /dev/null differ diff --git a/utils/dialoged/docs/toback.eps b/utils/dialoged/docs/toback.eps deleted file mode 100644 index ac0382dee7..0000000000 --- a/utils/dialoged/docs/toback.eps +++ /dev/null @@ -1,161 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: toback.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 389 270 404 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 389 translate - -% size of image (on paper, in 1/72inch coords) -16 15 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 12 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 808080 ffff00 -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -16 15 8 % dimensions of data -[16 0 0 -15 0 15] % mapping matrix -rlecmapimage - -81010005000701 -8201000203028100010601 -82010002030205000201 -82010002030281000302038100010101 -82010002030281000302038100010101 -82010002030281000302038100010101 -810100050003038100010101 -030181000302030600 -0301810003020381000203020000 -0301810003020381000203020000 -0301050004020000 -080181000203020000 -080181000203020000 -08010600 -0f01 - -% -% Compression made this file 21.81% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/toback.gif b/utils/dialoged/docs/toback.gif deleted file mode 100644 index 82a4ad88ea..0000000000 Binary files a/utils/dialoged/docs/toback.gif and /dev/null differ diff --git a/utils/dialoged/docs/tofront.bmp b/utils/dialoged/docs/tofront.bmp deleted file mode 100644 index 5b17cc44c8..0000000000 Binary files a/utils/dialoged/docs/tofront.bmp and /dev/null differ diff --git a/utils/dialoged/docs/tofront.eps b/utils/dialoged/docs/tofront.eps deleted file mode 100644 index 89a0cfebce..0000000000 --- a/utils/dialoged/docs/tofront.eps +++ /dev/null @@ -1,161 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: tofront.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 389 270 404 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 389 translate - -% size of image (on paper, in 1/72inch coords) -16 15 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 12 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 808080 ffff00 -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -16 15 8 % dimensions of data -[16 0 0 -15 0 15] % mapping matrix -rlecmapimage - -81010005000701 -8201000203028100010601 -8201000281020007000201 -820100028202000305038100010101 -820100028202000305038100010101 -820100028202000305038100010101 -810100020006038100010101 -030181000305030300 -03018100030503810002810200 -03018100030503810002810200 -0301080001020000 -080181000203020000 -080181000203020000 -08010600 -0f01 - -% -% Compression made this file 21.25% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/tofront.gif b/utils/dialoged/docs/tofront.gif deleted file mode 100644 index ff09220da3..0000000000 Binary files a/utils/dialoged/docs/tofront.gif and /dev/null differ diff --git a/utils/dialoged/docs/up.gif b/utils/dialoged/docs/up.gif deleted file mode 100644 index 316d0d2a14..0000000000 Binary files a/utils/dialoged/docs/up.gif and /dev/null differ diff --git a/utils/dialoged/docs/vert.bmp b/utils/dialoged/docs/vert.bmp deleted file mode 100644 index dfd7b5cb53..0000000000 Binary files a/utils/dialoged/docs/vert.bmp and /dev/null differ diff --git a/utils/dialoged/docs/vert.eps b/utils/dialoged/docs/vert.eps deleted file mode 100644 index 0375e76e5e..0000000000 --- a/utils/dialoged/docs/vert.eps +++ /dev/null @@ -1,161 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: vert.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 254 389 270 404 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -254 389 translate - -% size of image (on paper, in 1/72inch coords) -16 15 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 9 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 c0c0c0 ffff00 -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -16 15 8 % dimensions of data -[16 0 0 -15 0 15] % mapping matrix -rlecmapimage - -0f01 -07010700 -070181000204020000 -070181000204020000 -8101000300010181000204020000 -8201000201028100018201000204020000 -8201000201028100018201000204020000 -8201000201028100018201000204020000 -8201000201028100018201000204020000 -8101000300010181000204020000 -070181000204020000 -070181000204020000 -07010700 -0f01 -0f01 - -% -% Compression made this file 20.28% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/dialoged/docs/vert.gif b/utils/dialoged/docs/vert.gif deleted file mode 100644 index 7992f4c40a..0000000000 Binary files a/utils/dialoged/docs/vert.gif and /dev/null differ diff --git a/utils/dialoged/src/.cvsignore b/utils/dialoged/src/.cvsignore deleted file mode 100644 index 4646a42c35..0000000000 --- a/utils/dialoged/src/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux diff --git a/utils/dialoged/src/Makefile b/utils/dialoged/src/Makefile deleted file mode 100644 index 35ce1069fd..0000000000 --- a/utils/dialoged/src/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../../setup/general/makedirs diff --git a/utils/dialoged/src/Makefile.in b/utils/dialoged/src/Makefile.in deleted file mode 100644 index c4bf48b578..0000000000 --- a/utils/dialoged/src/Makefile.in +++ /dev/null @@ -1,28 +0,0 @@ -# WXXT base directory -WXBASEDIR=@WXBASEDIR@ - -# set the OS type for compilation -OS=@OS@ -# compile a library only -RULE=bin - -# define library name -BIN_TARGET=dialoged -# define library sources -BIN_SRC=dialoged.cpp dlghndlr.cpp edlist.cpp edtree.cpp \ - reseditr.cpp reswrite.cpp symbtabl.cpp winprop.cpp winstyle.cpp - -#define library objects -BIN_OBJ=dialoged.o dlghndlr.o edlist.o edtree.o \ - reseditr.o reswrite.o symbtabl.o winprop.o winstyle.o - -# additional things needed to link -BIN_LINK= \ - -lwx_prop_gtk - -# additional things needed to compile -ADD_COMPILE= \ - -I../../../wxprop/src - -# include the definitions now -include ../../../../template.mak diff --git a/utils/dialoged/src/bitmaps/alignb.bmp b/utils/dialoged/src/bitmaps/alignb.bmp deleted file mode 100644 index 6cc2e1dee4..0000000000 Binary files a/utils/dialoged/src/bitmaps/alignb.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/alignb.xbm b/utils/dialoged/src/bitmaps/alignb.xbm deleted file mode 100644 index 6ffdcd94d9..0000000000 --- a/utils/dialoged/src/bitmaps/alignb.xbm +++ /dev/null @@ -1,9 +0,0 @@ -#define alignb_width 24 -#define alignb_height 24 -static char alignb_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xf8, 0x07, 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, - 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, 0xf0, 0x09, 0x04, 0x10, 0x09, 0x04, - 0x10, 0x09, 0x04, 0x10, 0x09, 0x04, 0x10, 0x09, 0x04, 0xf0, 0xf9, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/alignb.xpm b/utils/dialoged/src/bitmaps/alignb.xpm deleted file mode 100644 index c3b57a5869..0000000000 --- a/utils/dialoged/src/bitmaps/alignb.xpm +++ /dev/null @@ -1,24 +0,0 @@ -/* XPM */ -static char *alignb_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 3 1", -" c None", -". c Black", -"X c Yellow", -/* pixels */ -" ", -" ........", -" .XXXXXX.", -" .XXXXXX.", -" .XXXXXX.", -" .XXXXXX.", -" .XXXXXX.", -" ..... .XXXXXX.", -" .XXX. .XXXXXX.", -" .XXX. .XXXXXX.", -" .XXX. .XXXXXX.", -" .XXX. .XXXXXX.", -" ..... ........", -" ", -" " -}; diff --git a/utils/dialoged/src/bitmaps/alignl.bmp b/utils/dialoged/src/bitmaps/alignl.bmp deleted file mode 100644 index 30471101b1..0000000000 Binary files a/utils/dialoged/src/bitmaps/alignl.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/alignl.xbm b/utils/dialoged/src/bitmaps/alignl.xbm deleted file mode 100644 index 91e01e0150..0000000000 --- a/utils/dialoged/src/bitmaps/alignl.xbm +++ /dev/null @@ -1,9 +0,0 @@ -#define alignl_width 24 -#define alignl_height 24 -static char alignl_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0x0f, 0x00, 0x40, 0x08, 0x00, 0x40, 0x08, 0x00, 0x40, 0x08, 0x00, - 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01, - 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, - 0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/alignl.xpm b/utils/dialoged/src/bitmaps/alignl.xpm deleted file mode 100644 index 6d7def92fb..0000000000 --- a/utils/dialoged/src/bitmaps/alignl.xpm +++ /dev/null @@ -1,24 +0,0 @@ -/* XPM */ -static char *alignl_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 3 1", -" c None", -". c Black", -"X c Yellow", -/* pixels */ -" ", -" ...... ", -" .XXXX. ", -" .XXXX. ", -" .XXXX. ", -" ...... ", -" ", -" ", -" ........... ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" ........... ", -" " -}; diff --git a/utils/dialoged/src/bitmaps/alignr.bmp b/utils/dialoged/src/bitmaps/alignr.bmp deleted file mode 100644 index 14a2f85241..0000000000 Binary files a/utils/dialoged/src/bitmaps/alignr.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/alignr.xbm b/utils/dialoged/src/bitmaps/alignr.xbm deleted file mode 100644 index 337bbd762d..0000000000 --- a/utils/dialoged/src/bitmaps/alignr.xbm +++ /dev/null @@ -1,9 +0,0 @@ -#define alignr_width 24 -#define alignr_height 24 -static char alignr_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xf8, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, - 0x00, 0xf8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01, - 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, - 0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/alignr.xpm b/utils/dialoged/src/bitmaps/alignr.xpm deleted file mode 100644 index 3f873eed4e..0000000000 --- a/utils/dialoged/src/bitmaps/alignr.xpm +++ /dev/null @@ -1,24 +0,0 @@ -/* XPM */ -static char *alignr_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 3 1", -" c None", -". c Black", -"X c Yellow", -/* pixels */ -" ", -" ...... ", -" .XXXX. ", -" .XXXX. ", -" .XXXX. ", -" ...... ", -" ", -" ", -" ........... ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" ........... ", -" " -}; diff --git a/utils/dialoged/src/bitmaps/alignt.bmp b/utils/dialoged/src/bitmaps/alignt.bmp deleted file mode 100644 index 4505cbab56..0000000000 Binary files a/utils/dialoged/src/bitmaps/alignt.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/alignt.xbm b/utils/dialoged/src/bitmaps/alignt.xbm deleted file mode 100644 index 1cc90e390c..0000000000 --- a/utils/dialoged/src/bitmaps/alignt.xbm +++ /dev/null @@ -1,9 +0,0 @@ -#define alignt_width 24 -#define alignt_height 24 -static char alignt_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xf9, 0x07, 0x10, 0x09, 0x04, 0x10, 0x09, 0x04, 0x10, 0x09, 0x04, - 0x10, 0x09, 0x04, 0xf0, 0x09, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, - 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, 0x00, 0xf8, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/alignt.xpm b/utils/dialoged/src/bitmaps/alignt.xpm deleted file mode 100644 index 65fc1b5ccb..0000000000 --- a/utils/dialoged/src/bitmaps/alignt.xpm +++ /dev/null @@ -1,24 +0,0 @@ -/* XPM */ -static char *alignt_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 3 1", -" c None", -". c Black", -"X c Yellow", -/* pixels */ -" ", -" ..... ........", -" .XXX. .XXXXXX.", -" .XXX. .XXXXXX.", -" .XXX. .XXXXXX.", -" .XXX. .XXXXXX.", -" ..... .XXXXXX.", -" .XXXXXX.", -" .XXXXXX.", -" .XXXXXX.", -" .XXXXXX.", -" .XXXXXX.", -" ........", -" ", -" " -}; diff --git a/utils/dialoged/src/bitmaps/arrow.bmp b/utils/dialoged/src/bitmaps/arrow.bmp deleted file mode 100644 index d406ceb64f..0000000000 Binary files a/utils/dialoged/src/bitmaps/arrow.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/arrow.ico b/utils/dialoged/src/bitmaps/arrow.ico deleted file mode 100644 index 09ec640155..0000000000 Binary files a/utils/dialoged/src/bitmaps/arrow.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/arrow.xbm b/utils/dialoged/src/bitmaps/arrow.xbm deleted file mode 100644 index 17840c7aeb..0000000000 --- a/utils/dialoged/src/bitmaps/arrow.xbm +++ /dev/null @@ -1,13 +0,0 @@ -#define arrow_width 28 -#define arrow_height 28 -static char arrow_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, - 0x00, 0x7c, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, - 0x00, 0xfc, 0x03, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, - 0x00, 0xc4, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, - 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/arrow.xpm b/utils/dialoged/src/bitmaps/arrow.xpm deleted file mode 100644 index ad9d577585..0000000000 --- a/utils/dialoged/src/bitmaps/arrow.xpm +++ /dev/null @@ -1,24 +0,0 @@ -/* XPM */ -static char * arrow_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 2 1", -/* colors */ -" s None c None", -". c #000000", -/* pixels */ -" ", -" . ", -" .. ", -" ... ", -" .... ", -" ..... ", -" ...... ", -" ....... ", -" ........ ", -" ..... ", -" .. .. ", -" . .. ", -" .. ", -" .. ", -" .. ", -" "}; diff --git a/utils/dialoged/src/bitmaps/bmpbuttn.bmp b/utils/dialoged/src/bitmaps/bmpbuttn.bmp deleted file mode 100644 index 36278f425a..0000000000 Binary files a/utils/dialoged/src/bitmaps/bmpbuttn.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/bmpbuttn.ico b/utils/dialoged/src/bitmaps/bmpbuttn.ico deleted file mode 100644 index ef54c4c501..0000000000 Binary files a/utils/dialoged/src/bitmaps/bmpbuttn.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/bmpbuttn.xbm b/utils/dialoged/src/bitmaps/bmpbuttn.xbm deleted file mode 100644 index 3aea3e793b..0000000000 --- a/utils/dialoged/src/bitmaps/bmpbuttn.xbm +++ /dev/null @@ -1,11 +0,0 @@ -#define bmpbuttn_width 28 -#define bmpbuttn_height 28 -static char bmpbuttn_bits[] = { - 0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00, - 0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00, - 0x00,0xf0,0x80,0xff,0x0f,0xf0,0x40,0x00,0x10,0xf0,0x40,0x84,0x31,0xf0,0x40, - 0x44,0x32,0xf0,0x40,0x45,0x32,0xf0,0x40,0x8d,0x31,0xf0,0x40,0x09,0x30,0xf0, - 0x40,0xfb,0x3f,0xf0,0x40,0x04,0x30,0xf0,0x40,0xc4,0x30,0xf0,0x80,0xff,0x3f, - 0xf0,0x00,0xff,0x1f,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00, - 0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00, - 0x00,0x00,0xf0,0x00,0x00,0x00,0xf0}; diff --git a/utils/dialoged/src/bitmaps/bmpbuttn.xpm b/utils/dialoged/src/bitmaps/bmpbuttn.xpm deleted file mode 100644 index 669246ddad..0000000000 --- a/utils/dialoged/src/bitmaps/bmpbuttn.xpm +++ /dev/null @@ -1,30 +0,0 @@ -/* XPM */ -static char * bmpbuttn_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 8 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #ff0000", -"# c #00ff00", -"$ c #ffff00", -"% c #0000ff", -"& c #ffffff", -/* pixels */ -" ", -" ", -" ", -"+++++++++++++++.", -"+@@.&&&&&&&&&&&.", -"+@@.&&&&&&&&&&&.", -"+@@.&&&&&&&&&&&.", -"+...............", -"+&&.&&&&&&&.%%%.", -"+&&.&&&&&&&.%%%.", -"+&&.........%%%.", -"+&&.$$$$.##.%%%.", -"+&&.$$$$.##.%%%.", -"+...............", -" ", -" "}; diff --git a/utils/dialoged/src/bitmaps/button.bmp b/utils/dialoged/src/bitmaps/button.bmp deleted file mode 100644 index 14af485b29..0000000000 Binary files a/utils/dialoged/src/bitmaps/button.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/button.ico b/utils/dialoged/src/bitmaps/button.ico deleted file mode 100644 index 1f7253212a..0000000000 Binary files a/utils/dialoged/src/bitmaps/button.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/button.xbm b/utils/dialoged/src/bitmaps/button.xbm deleted file mode 100644 index 118f1661e8..0000000000 --- a/utils/dialoged/src/bitmaps/button.xbm +++ /dev/null @@ -1,13 +0,0 @@ -#define button_width 28 -#define button_height 28 -static char button_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x0f, 0x00, - 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x30, 0x00, 0x40, 0x00, 0x30, 0x00, - 0x40, 0x00, 0x30, 0x00, 0x40, 0x00, 0x30, 0x00, 0x40, 0x00, 0x30, 0x00, - 0x40, 0x00, 0x30, 0x00, 0x40, 0x00, 0x30, 0x00, 0x40, 0x00, 0x30, 0x00, - 0x80, 0xff, 0x3f, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/button.xpm b/utils/dialoged/src/bitmaps/button.xpm deleted file mode 100644 index 40ad7e29d0..0000000000 --- a/utils/dialoged/src/bitmaps/button.xpm +++ /dev/null @@ -1,26 +0,0 @@ -/* XPM */ -static char * button_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 4 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -/* pixels */ -" ", -" ", -" ", -"+++++++++++++++.", -"+@@@@@@@@@@@@@@.", -"+@@@@@@@@@@@@@@.", -"+@@@@@@@@@@@@@@.", -"+@@@@@@@@@@@@@@.", -"+@@@@@@@@@@@@@@.", -"+@@@@@@@@@@@@@@.", -"+@@@@@@@@@@@@@@.", -"+@@@@@@@@@@@@@@.", -"+@@@@@@@@@@@@@@.", -"+...............", -" ", -" "}; diff --git a/utils/dialoged/src/bitmaps/buttonsm.ico b/utils/dialoged/src/bitmaps/buttonsm.ico deleted file mode 100644 index 69d4aaf12f..0000000000 Binary files a/utils/dialoged/src/bitmaps/buttonsm.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/buttonsm.xpm b/utils/dialoged/src/bitmaps/buttonsm.xpm deleted file mode 100644 index 818fb50a73..0000000000 --- a/utils/dialoged/src/bitmaps/buttonsm.xpm +++ /dev/null @@ -1,26 +0,0 @@ -/* XPM */ -static char * buttonsm_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 4 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -/* pixels */ -" ", -" ", -" ", -" ", -" ", -" ++++++++++++ ", -" +@@@@@@@@@@. ", -" +@@@@@@@@@@. ", -" +@@@@@@@@@@. ", -" +........... ", -" ", -" ", -" ", -" ", -" ", -" "}; diff --git a/utils/dialoged/src/bitmaps/canvas.xbm b/utils/dialoged/src/bitmaps/canvas.xbm deleted file mode 100644 index 0dddd66253..0000000000 --- a/utils/dialoged/src/bitmaps/canvas.xbm +++ /dev/null @@ -1,13 +0,0 @@ -#define canvas_width 28 -#define canvas_height 28 -static char canvas_bits[] = { - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0xff, 0x1f, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, - 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, - 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, - 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, - 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0xc0, 0xff, 0x1f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/check.bmp b/utils/dialoged/src/bitmaps/check.bmp deleted file mode 100644 index 6d0f9cb77e..0000000000 Binary files a/utils/dialoged/src/bitmaps/check.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/check.xbm b/utils/dialoged/src/bitmaps/check.xbm deleted file mode 100644 index 0f7bbb513c..0000000000 --- a/utils/dialoged/src/bitmaps/check.xbm +++ /dev/null @@ -1,13 +0,0 @@ -#define check_width 28 -#define check_height 28 -static char check_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x0f, 0x00, 0x80, 0x01, 0x0c, 0x00, - 0x80, 0x02, 0x0a, 0x00, 0x80, 0x04, 0x09, 0x00, 0x80, 0x88, 0x08, 0x00, - 0x80, 0x50, 0x08, 0x00, 0x80, 0x20, 0x08, 0x00, 0x80, 0x50, 0x08, 0x00, - 0x80, 0x88, 0x08, 0x00, 0x80, 0x04, 0x09, 0x00, 0x80, 0x02, 0x0a, 0x00, - 0x80, 0x01, 0x0c, 0x00, 0x80, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/checkbox.ico b/utils/dialoged/src/bitmaps/checkbox.ico deleted file mode 100644 index ce62251232..0000000000 Binary files a/utils/dialoged/src/bitmaps/checkbox.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/checkbox.xpm b/utils/dialoged/src/bitmaps/checkbox.xpm deleted file mode 100644 index 5814e842ee..0000000000 --- a/utils/dialoged/src/bitmaps/checkbox.xpm +++ /dev/null @@ -1,27 +0,0 @@ -/* XPM */ -static char * checkbox_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 5 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -"# c #ffffff", -/* pixels */ -" ", -" @@@@@@@@@@@@@@ ", -" @............@ ", -" @.##########+@ ", -" @.#..####..#+@ ", -" @.#...##...#+@ ", -" @.##......##+@ ", -" @.###....###+@ ", -" @.###....###+@ ", -" @.##......##+@ ", -" @.#...##...#+@ ", -" @.#..####..#+@ ", -" @.##########+@ ", -" @.+++++++++++@ ", -" @@@@@@@@@@@@@@ ", -" "}; diff --git a/utils/dialoged/src/bitmaps/choice.bmp b/utils/dialoged/src/bitmaps/choice.bmp deleted file mode 100644 index 4562a12ee2..0000000000 Binary files a/utils/dialoged/src/bitmaps/choice.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/choice.ico b/utils/dialoged/src/bitmaps/choice.ico deleted file mode 100644 index 3a1f98d329..0000000000 Binary files a/utils/dialoged/src/bitmaps/choice.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/choice.xbm b/utils/dialoged/src/bitmaps/choice.xbm deleted file mode 100644 index 973f5c127d..0000000000 --- a/utils/dialoged/src/bitmaps/choice.xbm +++ /dev/null @@ -1,13 +0,0 @@ -#define choice_width 28 -#define choice_height 28 -static char choice_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x00, - 0x10, 0x00, 0xc6, 0x00, 0x10, 0x00, 0xee, 0x00, 0x10, 0x00, 0xfe, 0x00, - 0xf0, 0xff, 0xff, 0x00, 0x20, 0x00, 0x82, 0x00, 0x20, 0x00, 0x92, 0x00, - 0xa0, 0x3f, 0xba, 0x00, 0x20, 0x00, 0x82, 0x00, 0x20, 0x00, 0x82, 0x00, - 0xa0, 0xff, 0xfe, 0x00, 0x20, 0x00, 0x82, 0x00, 0x20, 0x00, 0x82, 0x00, - 0xa0, 0x7f, 0xba, 0x00, 0x20, 0x00, 0x92, 0x00, 0x20, 0x00, 0x82, 0x00, - 0xe0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/choice.xpm b/utils/dialoged/src/bitmaps/choice.xpm deleted file mode 100644 index c46aaf5dba..0000000000 --- a/utils/dialoged/src/bitmaps/choice.xpm +++ /dev/null @@ -1,27 +0,0 @@ -/* XPM */ -static char * choice_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 5 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -"# c #ffffff", -/* pixels */ -"@@@@@@@@@@@@@@@@", -"@..............@", -"@.########+++++@", -"@.########.....@", -"@.########+...+@", -"@.########++.++@", -"@.+++++++++++++@", -"@@@@@@@@@@@@@@@@", -" ##############", -" ..............", -" .#########+.+.", -" .#########....", -" .#########+++.", -" .#########....", -" .#########+.+.", -" .............."}; diff --git a/utils/dialoged/src/bitmaps/combobox.ico b/utils/dialoged/src/bitmaps/combobox.ico deleted file mode 100644 index ff2941bb29..0000000000 Binary files a/utils/dialoged/src/bitmaps/combobox.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/combobox.xpm b/utils/dialoged/src/bitmaps/combobox.xpm deleted file mode 100644 index e0d2aa8a96..0000000000 --- a/utils/dialoged/src/bitmaps/combobox.xpm +++ /dev/null @@ -1,27 +0,0 @@ -/* XPM */ -static char * combobox_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 5 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -"# c #ffffff", -/* pixels */ -"@@@@@@@@@@@@@@@@", -"@..............@", -"@....#####+++++@", -"@.#.######.....@", -"@.#.######+...+@", -"@....#####++.++@", -"@.+++++++++++++@", -"@@@@@@@@@@@@@@@@", -" ##############", -" ..............", -" .#########+.+.", -" .#########....", -" .#########+++.", -" .#########....", -" .#########+.+.", -" .............."}; diff --git a/utils/dialoged/src/bitmaps/copysize.bmp b/utils/dialoged/src/bitmaps/copysize.bmp deleted file mode 100644 index 36060ad72b..0000000000 Binary files a/utils/dialoged/src/bitmaps/copysize.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/copysize.xbm b/utils/dialoged/src/bitmaps/copysize.xbm deleted file mode 100644 index 6fcb9e6e95..0000000000 --- a/utils/dialoged/src/bitmaps/copysize.xbm +++ /dev/null @@ -1,8 +0,0 @@ -#define copysize_width 24 -#define copysize_height 24 -static char copysize_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0xf0,0xbf,0x03,0x10,0x20,0x02,0x10,0x20,0x02,0x10,0xa0,0x0f,0x10,0x20,0x07, - 0xf0,0x3f,0x02,0x00,0x00,0x00,0x00,0x55,0x05,0x00,0x00,0x00,0x00,0xf9,0x05, - 0x00,0x08,0x01,0x00,0xf9,0x05,0x00,0x00,0x00,0x00,0x55,0x05,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/utils/dialoged/src/bitmaps/copysize.xpm b/utils/dialoged/src/bitmaps/copysize.xpm deleted file mode 100644 index 4694bd4083..0000000000 --- a/utils/dialoged/src/bitmaps/copysize.xpm +++ /dev/null @@ -1,24 +0,0 @@ -/* XPM */ -static char *copysize_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 3 1", -" c None", -". c Black", -"X c Yellow", -/* pixels */ -" ", -".......... ... ", -".XXXXXXXX. . ", -".XXXXXXXX. . ", -".XXXXXXXX. .....", -".XXXXXXXX. ... ", -".......... . ", -" ", -" . . . . . . ", -" ", -" . ...... . ", -" .XXXX. ", -" . ...... . ", -" ", -" . . . . . . " -}; diff --git a/utils/dialoged/src/bitmaps/cpp.xbm b/utils/dialoged/src/bitmaps/cpp.xbm deleted file mode 100644 index a05d1d1686..0000000000 --- a/utils/dialoged/src/bitmaps/cpp.xbm +++ /dev/null @@ -1,9 +0,0 @@ -#define cpp_width 24 -#define cpp_height 24 -static char cpp_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x30, 0x34, 0x06, - 0x18, 0x30, 0x06, 0x18, 0x78, 0x0f, 0x18, 0x78, 0x0f, 0x18, 0x30, 0x06, - 0x30, 0x34, 0x06, 0xe0, 0x03, 0x00, 0x00, 0x40, 0x00, 0x00, 0xc0, 0x00, - 0x00, 0xff, 0x01, 0x00, 0xc0, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/cross.bmp b/utils/dialoged/src/bitmaps/cross.bmp deleted file mode 100644 index 079cb0dd58..0000000000 Binary files a/utils/dialoged/src/bitmaps/cross.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/dialog.bmp b/utils/dialoged/src/bitmaps/dialog.bmp deleted file mode 100644 index 889d6ad216..0000000000 Binary files a/utils/dialoged/src/bitmaps/dialog.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/dialog.ico b/utils/dialoged/src/bitmaps/dialog.ico deleted file mode 100644 index 6e8c9aab41..0000000000 Binary files a/utils/dialoged/src/bitmaps/dialog.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/dialog.xbm b/utils/dialoged/src/bitmaps/dialog.xbm deleted file mode 100644 index 409675024c..0000000000 --- a/utils/dialoged/src/bitmaps/dialog.xbm +++ /dev/null @@ -1,13 +0,0 @@ -#define dialog_width 28 -#define dialog_height 28 -static char dialog_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0x7f, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0xf0, 0xff, 0x7f, 0x00, - 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x90, 0xff, 0x4f, 0x00, - 0x90, 0x00, 0x48, 0x00, 0x90, 0x00, 0x48, 0x00, 0x90, 0x00, 0x48, 0x00, - 0x90, 0xff, 0x4f, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, - 0x10, 0x00, 0x40, 0x00, 0xd0, 0xdf, 0x5f, 0x00, 0x50, 0x50, 0x50, 0x00, - 0x50, 0x50, 0x50, 0x00, 0xd0, 0xdf, 0x5f, 0x00, 0x10, 0x00, 0x40, 0x00, - 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/dialog.xpm b/utils/dialoged/src/bitmaps/dialog.xpm deleted file mode 100644 index 24e227697a..0000000000 --- a/utils/dialoged/src/bitmaps/dialog.xpm +++ /dev/null @@ -1,28 +0,0 @@ -/* XPM */ -static char * dialog_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 6 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -"# c #0000ff", -"$ c #ffffff", -/* pixels */ -" ", -" $$$$$$$$$$$$$. ", -" $############. ", -" $############. ", -" $############. ", -" $++++++++++++. ", -" $+$$$$$+@@@@+. ", -" $+$$$$$+@@@@+. ", -" $+$$$$$++++++. ", -" $+$$$$$+@@@@+. ", -" $+++++++@@@@+. ", -" $++++++++++++. ", -" $++++++++++++. ", -" $++++++++++++. ", -" .............. ", -" "}; diff --git a/utils/dialoged/src/bitmaps/dialoged.ico b/utils/dialoged/src/bitmaps/dialoged.ico deleted file mode 100644 index cec6bac64e..0000000000 Binary files a/utils/dialoged/src/bitmaps/dialoged.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/dialoged.xpm b/utils/dialoged/src/bitmaps/dialoged.xpm deleted file mode 100644 index 4b94e8e5ef..0000000000 --- a/utils/dialoged/src/bitmaps/dialoged.xpm +++ /dev/null @@ -1,44 +0,0 @@ -/* XPM */ -static char * dialoged_xpm[] = { -/* width height ncolors chars_per_pixel */ -"32 32 6 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #800000", -"@ c #c0c0c0", -"# c #808080", -"$ c #ffffff", -/* pixels */ -" .. ", -" .. ", -" @@@@@@@@@@@@@@@@@@@@@@@@@@@. ", -" @++++++++++++++++++++++++++. ", -" @++++++++++++++++++++++++++. ", -" @++++++++++++++++++++++++++. ", -" @##########################. ", -" @##########################. ", -" @#.............##@@@@@@@@.#. ", -" @#.$$$$$$$$$$$.##@@@@@@@@.#. ", -" @#.$$$$$$$$$$$.##@@@@@@@@.#. ", -" @#.............##.........#. ", -" @##########################. ", -" @##########################. ", -" @#.............##@@@@@@@@.#. ", -" @#.$$$$$$$$$$$.##@@@@@@@@.#. ", -" @#.............##@@@@@@@@.#. ", -" @#.$$$$$$$$$$$.##.........#. ", -" @#.............############. ", -" @#.$$$$$$$$$$$.############. ", -" @#.............############. ", -" @#.$$$$$$$$$$$.############. ", -" @#.............############. ", -" @##########################. ", -" @##########################. ", -" ............................ ", -" .. .. ", -" .. .. ", -" .. .. ", -" .. .. ", -" .. .. ", -" .. .. "}; diff --git a/utils/dialoged/src/bitmaps/folder1.ico b/utils/dialoged/src/bitmaps/folder1.ico deleted file mode 100644 index ed3fb3863f..0000000000 Binary files a/utils/dialoged/src/bitmaps/folder1.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/folder1.xpm b/utils/dialoged/src/bitmaps/folder1.xpm deleted file mode 100644 index 03f6f03555..0000000000 --- a/utils/dialoged/src/bitmaps/folder1.xpm +++ /dev/null @@ -1,28 +0,0 @@ -/* XPM */ -static char * folder1_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 6 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -"# c #ffff00", -"$ c #ffffff", -/* pixels */ -" ", -" @@@@@ ", -" @#+#+#@ ", -" @#+#+#+#@@@@@@ ", -" @$$$$$$$$$$$$@.", -" @$#+#+#+#+#+#@.", -" @$+#+#+#+#+#+@.", -" @$#+#+#+#+#+#@.", -" @$+#+#+#+#+#+@.", -" @$#+#+#+#+#+#@.", -" @$+#+#+#+#+#+@.", -" @$#+#+#+#+#+#@.", -" @@@@@@@@@@@@@@.", -" ..............", -" ", -" "}; diff --git a/utils/dialoged/src/bitmaps/folder2.ico b/utils/dialoged/src/bitmaps/folder2.ico deleted file mode 100644 index 4ba582a2a0..0000000000 Binary files a/utils/dialoged/src/bitmaps/folder2.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/folder2.xpm b/utils/dialoged/src/bitmaps/folder2.xpm deleted file mode 100644 index 93f4610a42..0000000000 --- a/utils/dialoged/src/bitmaps/folder2.xpm +++ /dev/null @@ -1,28 +0,0 @@ -/* XPM */ -static char * folder2_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 6 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -"# c #ffff00", -"$ c #ffffff", -/* pixels */ -" ", -" @@@@@ ", -" @$$$$$@ ", -" @$#+#+#$@@@@@@ ", -" @$+#+#+$$$$$$@.", -" @$#+#+#+#+#+#@.", -"@@@@@@@@@@@@@#@.", -"@$$$$$$$$$$@@+@.", -"@$#+#+#+#+##.@@.", -" @$#+#+#+#+#+.@.", -" @$+#+#+#+#+#.@.", -" @$+#+#+#+##@..", -" @@@@@@@@@@@@@.", -" .............", -" ", -" "}; diff --git a/utils/dialoged/src/bitmaps/frame.xbm b/utils/dialoged/src/bitmaps/frame.xbm deleted file mode 100644 index f9d950c274..0000000000 --- a/utils/dialoged/src/bitmaps/frame.xbm +++ /dev/null @@ -1,13 +0,0 @@ -#define frame_width 28 -#define frame_height 28 -static char frame_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0x7f, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0x40, 0x00, - 0xd0, 0x36, 0x40, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0x40, 0x00, - 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, - 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, - 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, - 0x10, 0x00, 0x40, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0x40, 0x00, - 0x10, 0x00, 0x40, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/gauge.bmp b/utils/dialoged/src/bitmaps/gauge.bmp deleted file mode 100644 index 7803dd76c1..0000000000 Binary files a/utils/dialoged/src/bitmaps/gauge.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/gauge.ico b/utils/dialoged/src/bitmaps/gauge.ico deleted file mode 100644 index d369e41520..0000000000 Binary files a/utils/dialoged/src/bitmaps/gauge.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/gauge.xbm b/utils/dialoged/src/bitmaps/gauge.xbm deleted file mode 100644 index a4dbaa94cd..0000000000 --- a/utils/dialoged/src/bitmaps/gauge.xbm +++ /dev/null @@ -1,11 +0,0 @@ -#define gauge_width 28 -#define gauge_height 28 -static char gauge_bits[] = { - 0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00, - 0xf0,0x00,0xff,0x07,0xf0,0x00,0x01,0x04,0xf0,0x00,0x01,0x04,0xf0,0x00,0x01, - 0x04,0xf0,0x00,0x01,0x04,0xf0,0x00,0x01,0x04,0xf0,0x00,0x01,0x04,0xf0,0x00, - 0xff,0x07,0xf0,0x00,0xff,0x07,0xf0,0x00,0xff,0x07,0xf0,0x00,0xff,0x07,0xf0, - 0x00,0xff,0x07,0xf0,0x00,0xff,0x07,0xf0,0x00,0xff,0x07,0xf0,0x00,0xff,0x07, - 0xf0,0x00,0xff,0x07,0xf0,0x00,0xff,0x07,0xf0,0x00,0xff,0x07,0xf0,0x00,0xff, - 0x07,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00, - 0x00,0x00,0xf0,0x00,0x00,0x00,0xf0}; diff --git a/utils/dialoged/src/bitmaps/gauge.xpm b/utils/dialoged/src/bitmaps/gauge.xpm deleted file mode 100644 index 947bbdf024..0000000000 --- a/utils/dialoged/src/bitmaps/gauge.xpm +++ /dev/null @@ -1,27 +0,0 @@ -/* XPM */ -static char * gauge_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 5 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #000080", -"@ c #c0c0c0", -"# c #808080", -/* pixels */ -" ", -" ", -" ", -"################", -"#..............#", -"#.++++++++@@@@@#", -"#.++++++++@@@@@#", -"#.++++++++@@@@@#", -"#.++++++++@@@@@#", -"#.++++++++@@@@@#", -"#.++++++++@@@@@#", -"#.++++++++@@@@@#", -"################", -" ", -" ", -" "}; diff --git a/utils/dialoged/src/bitmaps/group.bmp b/utils/dialoged/src/bitmaps/group.bmp deleted file mode 100644 index 387a988b69..0000000000 Binary files a/utils/dialoged/src/bitmaps/group.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/group.xbm b/utils/dialoged/src/bitmaps/group.xbm deleted file mode 100644 index 0dc97eace6..0000000000 --- a/utils/dialoged/src/bitmaps/group.xbm +++ /dev/null @@ -1,13 +0,0 @@ -#define group_width 28 -#define group_height 28 -static char group_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0xaa, 0x03, 0x00, 0x00, 0x29, 0x01, 0x00, - 0x30, 0x91, 0x78, 0x00, 0x90, 0x92, 0x43, 0x00, 0x10, 0x00, 0x40, 0x00, - 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, - 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, - 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, - 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, - 0x10, 0x00, 0x40, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/help.bmp b/utils/dialoged/src/bitmaps/help.bmp deleted file mode 100644 index 54d5aa4b56..0000000000 Binary files a/utils/dialoged/src/bitmaps/help.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/help.xbm b/utils/dialoged/src/bitmaps/help.xbm deleted file mode 100644 index f382fd1f29..0000000000 --- a/utils/dialoged/src/bitmaps/help.xbm +++ /dev/null @@ -1,9 +0,0 @@ -#define help_width 24 -#define help_height 24 -static char help_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x10, 0xe0, 0x07, 0x30, 0x30, 0x0f, 0x70, 0x38, 0x0e, 0xf0, 0x38, 0x0e, - 0xf0, 0x39, 0x0f, 0xf0, 0x03, 0x07, 0xf0, 0x87, 0x01, 0xf0, 0xcf, 0x01, - 0xf0, 0xc1, 0x01, 0xb0, 0x01, 0x00, 0x10, 0xc3, 0x01, 0x00, 0xc3, 0x01, - 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/help.xpm b/utils/dialoged/src/bitmaps/help.xpm deleted file mode 100644 index 27a87ebb31..0000000000 --- a/utils/dialoged/src/bitmaps/help.xpm +++ /dev/null @@ -1,24 +0,0 @@ -/* XPM */ -static char *help_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 3 1", -" c None", -". c Black", -"X c #008080", -/* pixels */ -" ", -" ...... ", -" .XXXXX.. ", -" .XX...XX.. ", -" .X.. .X.. ", -" .X.. .XX.. ", -" .. .XX.. ", -" .XX.. ", -" .X.. ", -" .X.. ", -" .X.. ", -" .. ", -" .XX.. ", -" .XX.. ", -" ... " -}; diff --git a/utils/dialoged/src/bitmaps/horiz.bmp b/utils/dialoged/src/bitmaps/horiz.bmp deleted file mode 100644 index 58af34a727..0000000000 Binary files a/utils/dialoged/src/bitmaps/horiz.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/horiz.xbm b/utils/dialoged/src/bitmaps/horiz.xbm deleted file mode 100644 index e4a0e385a8..0000000000 --- a/utils/dialoged/src/bitmaps/horiz.xbm +++ /dev/null @@ -1,9 +0,0 @@ -#define horiz_width 24 -#define horiz_height 24 -static char horiz_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x3e, 0x00, 0x00, 0x22, 0x00, 0x00, 0x22, 0x00, 0x00, 0x22, 0x00, - 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01, - 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, - 0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/horiz.xpm b/utils/dialoged/src/bitmaps/horiz.xpm deleted file mode 100644 index 381e66fccf..0000000000 --- a/utils/dialoged/src/bitmaps/horiz.xpm +++ /dev/null @@ -1,24 +0,0 @@ -/* XPM */ -static char *horiz_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 3 1", -" c None", -". c Black", -"X c Yellow", -/* pixels */ -" ", -" ..... ", -" .XXX. ", -" .XXX. ", -" .XXX. ", -" ..... ", -" ", -" ", -" ........... ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" ........... ", -" " -}; diff --git a/utils/dialoged/src/bitmaps/listbox.bmp b/utils/dialoged/src/bitmaps/listbox.bmp deleted file mode 100644 index 4d5fb34779..0000000000 Binary files a/utils/dialoged/src/bitmaps/listbox.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/listbox.ico b/utils/dialoged/src/bitmaps/listbox.ico deleted file mode 100644 index 5dc9ac1667..0000000000 Binary files a/utils/dialoged/src/bitmaps/listbox.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/listbox.xbm b/utils/dialoged/src/bitmaps/listbox.xbm deleted file mode 100644 index fe08136a2d..0000000000 --- a/utils/dialoged/src/bitmaps/listbox.xbm +++ /dev/null @@ -1,13 +0,0 @@ -#define listbox_width 28 -#define listbox_height 28 -static char listbox_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x00, - 0x10, 0x00, 0x41, 0x00, 0x10, 0x00, 0x49, 0x00, 0xd0, 0x1f, 0x5d, 0x00, - 0x10, 0x00, 0x41, 0x00, 0x10, 0x00, 0x41, 0x00, 0xd0, 0x7f, 0x7f, 0x00, - 0x10, 0x00, 0x41, 0x00, 0x10, 0x00, 0x41, 0x00, 0xd0, 0x3f, 0x5d, 0x00, - 0x10, 0x00, 0x49, 0x00, 0x10, 0x00, 0x41, 0x00, 0xf0, 0xff, 0x7f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/listbox.xpm b/utils/dialoged/src/bitmaps/listbox.xpm deleted file mode 100644 index 3d6b7b0e82..0000000000 --- a/utils/dialoged/src/bitmaps/listbox.xpm +++ /dev/null @@ -1,27 +0,0 @@ -/* XPM */ -static char * listbox_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 5 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -"# c #ffffff", -/* pixels */ -"@@@@@@@@@@@@@@@@", -"@..............@", -"@.##########+++@", -"@.##########+.+@", -"@.++++++++++...@", -"@.##########+++@", -"@.##########+++@", -"@.+++++++++++++@", -"@.##########+++@", -"@.##########+++@", -"@.+++++++++++++@", -"@.##########+++@", -"@.##########...@", -"@.##########+.+@", -"@.+++++++++++++@", -"@@@@@@@@@@@@@@@@"}; diff --git a/utils/dialoged/src/bitmaps/load.bmp b/utils/dialoged/src/bitmaps/load.bmp deleted file mode 100644 index 1c38e97b59..0000000000 Binary files a/utils/dialoged/src/bitmaps/load.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/load.xbm b/utils/dialoged/src/bitmaps/load.xbm deleted file mode 100644 index 94c3ad5a9e..0000000000 --- a/utils/dialoged/src/bitmaps/load.xbm +++ /dev/null @@ -1,9 +0,0 @@ -#define load_width 24 -#define load_height 24 -static char load_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x00, 0x00, 0x10, 0x05, 0x00, 0x00, 0x06, 0xe0, 0x00, 0x07, - 0x10, 0x7f, 0x00, 0x10, 0x40, 0x00, 0x10, 0x40, 0x00, 0x10, 0xfe, 0x0f, - 0x10, 0x01, 0x04, 0x90, 0x00, 0x02, 0x50, 0x00, 0x01, 0x30, 0x80, 0x00, - 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/load.xpm b/utils/dialoged/src/bitmaps/load.xpm deleted file mode 100644 index c15a298f62..0000000000 --- a/utils/dialoged/src/bitmaps/load.xpm +++ /dev/null @@ -1,26 +0,0 @@ -/* XPM */ -static char *load_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 5 1", -" c None", -". c Black", -"X c Yellow", -"o c Gray100", -"O c #808000", -/* pixels */ -" ", -" ... ", -" . . .", -" ..", -" ... ...", -" .XoX....... ", -" .oXoXoXoXo. ", -" .XoXoXoXoX. ", -" .oXoX..........", -" .XoX.OOOOOOOOO.", -" .oo.OOOOOOOOO. ", -" .X.OOOOOOOOO. ", -" ..OOOOOOOOO. ", -" ........... ", -" " -}; diff --git a/utils/dialoged/src/bitmaps/message.bmp b/utils/dialoged/src/bitmaps/message.bmp deleted file mode 100644 index fb682e89e6..0000000000 Binary files a/utils/dialoged/src/bitmaps/message.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/message.xbm b/utils/dialoged/src/bitmaps/message.xbm deleted file mode 100644 index f0f5385486..0000000000 --- a/utils/dialoged/src/bitmaps/message.xbm +++ /dev/null @@ -1,13 +0,0 @@ -#define message_width 28 -#define message_height 28 -static char message_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x20, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, - 0x00, 0xe8, 0x00, 0x00, 0x00, 0xe8, 0x00, 0x00, 0x00, 0xc4, 0x01, 0x00, - 0x00, 0xc4, 0x01, 0x00, 0x00, 0x82, 0x03, 0x00, 0x00, 0xfe, 0x03, 0x00, - 0x00, 0x01, 0x07, 0x00, 0x00, 0x01, 0x07, 0x00, 0x80, 0x00, 0x0e, 0x00, - 0xc0, 0x00, 0x1e, 0x00, 0xe0, 0x01, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/mtext.bmp b/utils/dialoged/src/bitmaps/mtext.bmp deleted file mode 100644 index 5ab765b69a..0000000000 Binary files a/utils/dialoged/src/bitmaps/mtext.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/mtext.xbm b/utils/dialoged/src/bitmaps/mtext.xbm deleted file mode 100644 index e68cbd3841..0000000000 --- a/utils/dialoged/src/bitmaps/mtext.xbm +++ /dev/null @@ -1,13 +0,0 @@ -#define mtext_width 28 -#define mtext_height 28 -static char mtext_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0x00, 0x10, 0x10, 0x90, 0x00, 0x10, 0x13, 0x90, 0x00, - 0x10, 0xf2, 0xf0, 0x00, 0x90, 0x93, 0xf0, 0x00, 0x90, 0x92, 0xf0, 0x00, - 0x90, 0xfb, 0xf0, 0x00, 0x10, 0x00, 0xf0, 0x00, 0x10, 0x80, 0xf0, 0x00, - 0x10, 0x80, 0xf0, 0x00, 0x90, 0xf3, 0xf0, 0x00, 0x90, 0x90, 0xf0, 0x00, - 0x90, 0x90, 0xf0, 0x00, 0x90, 0xf3, 0x91, 0x00, 0x10, 0x00, 0x90, 0x00, - 0xf0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/new.bmp b/utils/dialoged/src/bitmaps/new.bmp deleted file mode 100644 index d66feb2384..0000000000 Binary files a/utils/dialoged/src/bitmaps/new.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/new.xbm b/utils/dialoged/src/bitmaps/new.xbm deleted file mode 100644 index 8b75207815..0000000000 --- a/utils/dialoged/src/bitmaps/new.xbm +++ /dev/null @@ -1,8 +0,0 @@ -#define new_width 24 -#define new_height 24 -static char new_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x80,0x7f,0x00,0x80,0xc0,0x00,0x80,0x40,0x01,0x80,0xc0,0x03,0x80,0x00,0x02, - 0x80,0x00,0x02,0x80,0x00,0x02,0x80,0x00,0x02,0x80,0x00,0x02,0x80,0x00,0x02, - 0x80,0x00,0x02,0x80,0x00,0x02,0x80,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/utils/dialoged/src/bitmaps/new.xpm b/utils/dialoged/src/bitmaps/new.xpm deleted file mode 100644 index 754d2d20a2..0000000000 --- a/utils/dialoged/src/bitmaps/new.xpm +++ /dev/null @@ -1,24 +0,0 @@ -/* XPM */ -static char *new_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 3 1", -" c None", -". c Black", -"X c Gray100", -/* pixels */ -" ", -" ........ ", -" .XXXXXX.. ", -" .XXXXXX.X. ", -" .XXXXXX.... ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" ........... ", -" " -}; diff --git a/utils/dialoged/src/bitmaps/open.bmp b/utils/dialoged/src/bitmaps/open.bmp deleted file mode 100644 index 9d90ab6fd0..0000000000 Binary files a/utils/dialoged/src/bitmaps/open.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/panel.xbm b/utils/dialoged/src/bitmaps/panel.xbm deleted file mode 100644 index db69e42fc3..0000000000 --- a/utils/dialoged/src/bitmaps/panel.xbm +++ /dev/null @@ -1,13 +0,0 @@ -#define panel_width 28 -#define panel_height 28 -static char panel_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0xff, 0x1f, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, - 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, - 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, - 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, - 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0xc0, 0xff, 0x1f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/picture.bmp b/utils/dialoged/src/bitmaps/picture.bmp deleted file mode 100644 index 60dde983ad..0000000000 Binary files a/utils/dialoged/src/bitmaps/picture.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/picture.xbm b/utils/dialoged/src/bitmaps/picture.xbm deleted file mode 100644 index f9c8faaf3a..0000000000 --- a/utils/dialoged/src/bitmaps/picture.xbm +++ /dev/null @@ -1,11 +0,0 @@ -#define picture_width 28 -#define picture_height 28 -static char picture_bits[] = { - 0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00, - 0xf0,0x00,0x00,0x00,0xf0,0xf0,0xff,0x7f,0xf0,0x10,0x00,0x40,0xf0,0x10,0x02, - 0x47,0xf0,0x10,0x85,0x48,0xf0,0x90,0x85,0x48,0xf0,0x50,0x85,0x48,0xf0,0x50, - 0x0d,0x47,0xf0,0x50,0x15,0x40,0xf0,0x90,0x14,0x40,0xf0,0xf0,0xf4,0x7f,0xf0, - 0x10,0x09,0x40,0xf0,0x10,0x65,0x46,0xf0,0x10,0x95,0x40,0xf0,0x90,0xf7,0x59, - 0xf0,0xd0,0x01,0x40,0xf0,0xf0,0xff,0x7f,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00, - 0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00, - 0x00,0x00,0xf0,0x00,0x00,0x00,0xf0}; diff --git a/utils/dialoged/src/bitmaps/radio.bmp b/utils/dialoged/src/bitmaps/radio.bmp deleted file mode 100644 index e843dc4359..0000000000 Binary files a/utils/dialoged/src/bitmaps/radio.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/radio.xbm b/utils/dialoged/src/bitmaps/radio.xbm deleted file mode 100644 index 13c7c118b0..0000000000 --- a/utils/dialoged/src/bitmaps/radio.xbm +++ /dev/null @@ -1,13 +0,0 @@ -#define radio_width 28 -#define radio_height 28 -static char radio_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xf8, 0x00, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x01, 0x04, 0x00, - 0x80, 0x00, 0x08, 0x00, 0x80, 0x70, 0x08, 0x00, 0x40, 0xf8, 0x10, 0x00, - 0x40, 0xfc, 0x11, 0x00, 0x40, 0xfc, 0x11, 0x00, 0x40, 0xfc, 0x11, 0x00, - 0x40, 0xf8, 0x10, 0x00, 0x80, 0x70, 0x08, 0x00, 0x80, 0x00, 0x08, 0x00, - 0x00, 0x01, 0x04, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0xf8, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/radiobox.ico b/utils/dialoged/src/bitmaps/radiobox.ico deleted file mode 100644 index a09e1491f7..0000000000 Binary files a/utils/dialoged/src/bitmaps/radiobox.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/radiobox.xpm b/utils/dialoged/src/bitmaps/radiobox.xpm deleted file mode 100644 index 8efbf842e8..0000000000 --- a/utils/dialoged/src/bitmaps/radiobox.xpm +++ /dev/null @@ -1,27 +0,0 @@ -/* XPM */ -static char * radiobox_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 5 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -"# c #ffffff", -/* pixels */ -" . ", -" .. .. ", -"+++.+.++...++++.", -"+@.@...@@..@@@@.", -"+@.+++.+....++@.", -"+@++++++++++++@.", -"+@++++++++++++@.", -"+@++++...+++++@.", -"+@+++.###@++++@.", -"+@+++.#.#@++++@.", -"+@+++.###@++++@.", -"+@++++@@@+++++@.", -"+@++++++++++++@.", -"+@++++++++++++@.", -"+@@@@@@@@@@@@@@.", -"................"}; diff --git a/utils/dialoged/src/bitmaps/radiobtn.ico b/utils/dialoged/src/bitmaps/radiobtn.ico deleted file mode 100644 index d38063e150..0000000000 Binary files a/utils/dialoged/src/bitmaps/radiobtn.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/radiobtn.xpm b/utils/dialoged/src/bitmaps/radiobtn.xpm deleted file mode 100644 index 30110a622c..0000000000 --- a/utils/dialoged/src/bitmaps/radiobtn.xpm +++ /dev/null @@ -1,26 +0,0 @@ -/* XPM */ -static char * radiobtn_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 4 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #ffffff", -/* pixels */ -" ", -" ", -" ", -" ", -" .... ", -" .@@@@+ ", -" .@@@@@@+ ", -" .@@@..@@@+ ", -" .@@....@@+ ", -" .@@@..@@@+ ", -" .@@@@@@+ ", -" .@@@@+ ", -" ++++ ", -" ", -" ", -" "}; diff --git a/utils/dialoged/src/bitmaps/report.xbm b/utils/dialoged/src/bitmaps/report.xbm deleted file mode 100644 index 601853aecb..0000000000 --- a/utils/dialoged/src/bitmaps/report.xbm +++ /dev/null @@ -1,9 +0,0 @@ -#define report_width 24 -#define report_height 24 -static char report_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x03, - 0x10, 0x00, 0x02, 0x90, 0x77, 0x02, 0x90, 0x7d, 0x02, 0x10, 0x00, 0x02, - 0x10, 0x37, 0x02, 0x10, 0x00, 0x02, 0x10, 0x00, 0x02, 0xd0, 0x03, 0x02, - 0x10, 0x00, 0x02, 0xd0, 0xbc, 0x02, 0x10, 0x00, 0x02, 0xd0, 0xbb, 0x02, - 0x10, 0x00, 0x02, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/save.bmp b/utils/dialoged/src/bitmaps/save.bmp deleted file mode 100644 index 545671fa17..0000000000 Binary files a/utils/dialoged/src/bitmaps/save.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/save.xbm b/utils/dialoged/src/bitmaps/save.xbm deleted file mode 100644 index 2f53311c36..0000000000 --- a/utils/dialoged/src/bitmaps/save.xbm +++ /dev/null @@ -1,9 +0,0 @@ -#define save_width 24 -#define save_height 24 -static char save_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe0, 0xff, 0x07, 0xa0, 0x00, 0x05, 0xa0, 0x00, 0x07, 0xa0, 0x00, 0x05, - 0xa0, 0x00, 0x05, 0xa0, 0x00, 0x05, 0xa0, 0x00, 0x05, 0x20, 0xff, 0x04, - 0x20, 0x00, 0x04, 0x20, 0xff, 0x05, 0x20, 0x3f, 0x05, 0x20, 0x3f, 0x05, - 0x20, 0x3f, 0x05, 0xc0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/save.xpm b/utils/dialoged/src/bitmaps/save.xpm deleted file mode 100644 index 01b18f9340..0000000000 --- a/utils/dialoged/src/bitmaps/save.xpm +++ /dev/null @@ -1,25 +0,0 @@ -/* XPM */ -static char *save_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 4 1", -" c None", -". c Black", -"X c #808000", -"o c #808080", -/* pixels */ -" ", -" .............. ", -" .X. . . ", -" .X. ... ", -" .X. .X. ", -" .X. .X. ", -" .X. .X. ", -" .X. .X. ", -" .XX........oX. ", -" .XXXXXXXXXXXX. ", -" .XX.........X. ", -" .XX...... .X. ", -" .XX...... .X. ", -" .XX...... .X. ", -" ............. " -}; diff --git a/utils/dialoged/src/bitmaps/scrolbar.ico b/utils/dialoged/src/bitmaps/scrolbar.ico deleted file mode 100644 index 29bcbc0708..0000000000 Binary files a/utils/dialoged/src/bitmaps/scrolbar.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/scrolbar.xpm b/utils/dialoged/src/bitmaps/scrolbar.xpm deleted file mode 100644 index 4ec940cb32..0000000000 --- a/utils/dialoged/src/bitmaps/scrolbar.xpm +++ /dev/null @@ -1,26 +0,0 @@ -/* XPM */ -static char * scrolbar_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 4 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -/* pixels */ -" ", -" ", -" ", -" ", -" ", -" ", -"++++.@@@@@@++++.", -"+@@@.@@@@@@+@@@.", -"+@@@.@@@@@@+@@@.", -"+....@@@@@@+....", -" ", -" ", -" ", -" ", -" ", -" "}; diff --git a/utils/dialoged/src/bitmaps/scroll.bmp b/utils/dialoged/src/bitmaps/scroll.bmp deleted file mode 100644 index 3f78964525..0000000000 Binary files a/utils/dialoged/src/bitmaps/scroll.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/scroll.xbm b/utils/dialoged/src/bitmaps/scroll.xbm deleted file mode 100644 index 68640bae6c..0000000000 --- a/utils/dialoged/src/bitmaps/scroll.xbm +++ /dev/null @@ -1,11 +0,0 @@ -#define scroll_width 28 -#define scroll_height 28 -static char scroll_bits[] = { - 0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00, - 0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00, - 0x00,0xf0,0xf8,0xff,0xff,0xf0,0x08,0x20,0x80,0xf0,0x08,0x20,0x80,0xf0,0x08, - 0x21,0x84,0xf0,0x88,0x27,0x8f,0xf0,0xc8,0x27,0x9f,0xf0,0x88,0x27,0x8f,0xf0, - 0x08,0x21,0x84,0xf0,0x08,0x20,0x80,0xf0,0x08,0x20,0x80,0xf0,0xf8,0xff,0xff, - 0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00, - 0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00, - 0x00,0x00,0xf0,0x00,0x00,0x00,0xf0}; diff --git a/utils/dialoged/src/bitmaps/slider.bmp b/utils/dialoged/src/bitmaps/slider.bmp deleted file mode 100644 index 59ce662e9b..0000000000 Binary files a/utils/dialoged/src/bitmaps/slider.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/slider.ico b/utils/dialoged/src/bitmaps/slider.ico deleted file mode 100644 index 060d9d72fe..0000000000 Binary files a/utils/dialoged/src/bitmaps/slider.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/slider.xbm b/utils/dialoged/src/bitmaps/slider.xbm deleted file mode 100644 index 789340fc41..0000000000 --- a/utils/dialoged/src/bitmaps/slider.xbm +++ /dev/null @@ -1,11 +0,0 @@ -#define slider_width 28 -#define slider_height 28 -static char slider_bits[] = { - 0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00, - 0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00, - 0x00,0xf0,0x18,0x00,0xec,0xf0,0x10,0x00,0xa8,0xf0,0x10,0x00,0xa8,0xf0,0x38, - 0x00,0xfc,0xf0,0x00,0x00,0x00,0xf0,0xf8,0xff,0xff,0xf0,0x08,0x00,0x80,0xf0, - 0x08,0x03,0x80,0xf0,0x08,0x03,0x80,0xf0,0x08,0x00,0x80,0xf0,0xf8,0xff,0xff, - 0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00, - 0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00, - 0x00,0x00,0xf0,0x00,0x00,0x00,0xf0}; diff --git a/utils/dialoged/src/bitmaps/slider.xpm b/utils/dialoged/src/bitmaps/slider.xpm deleted file mode 100644 index 9b6be672f4..0000000000 --- a/utils/dialoged/src/bitmaps/slider.xpm +++ /dev/null @@ -1,26 +0,0 @@ -/* XPM */ -static char * slider_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 4 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -/* pixels */ -" ", -" ", -" ", -"++++. ", -"+@@@. ", -"+@@@.@@@@@@@@@@@", -"+@@@............", -"+@@@.+++++++++++", -"+@@@. ", -"+@@@. ", -" +@. ", -" + ", -" ", -" ", -" ", -" "}; diff --git a/utils/dialoged/src/bitmaps/statbmp.ico b/utils/dialoged/src/bitmaps/statbmp.ico deleted file mode 100644 index ef54c4c501..0000000000 Binary files a/utils/dialoged/src/bitmaps/statbmp.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/statbmp.xpm b/utils/dialoged/src/bitmaps/statbmp.xpm deleted file mode 100644 index 573e42ee3f..0000000000 --- a/utils/dialoged/src/bitmaps/statbmp.xpm +++ /dev/null @@ -1,30 +0,0 @@ -/* XPM */ -static char * statbmp_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 8 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #ff0000", -"# c #00ff00", -"$ c #ffff00", -"% c #0000ff", -"& c #ffffff", -/* pixels */ -" ", -" ", -" ", -"+++++++++++++++.", -"+@@.&&&&&&&&&&&.", -"+@@.&&&&&&&&&&&.", -"+@@.&&&&&&&&&&&.", -"+...............", -"+&&.&&&&&&&.%%%.", -"+&&.&&&&&&&.%%%.", -"+&&.........%%%.", -"+&&.$$$$.##.%%%.", -"+&&.$$$$.##.%%%.", -"+...............", -" ", -" "}; diff --git a/utils/dialoged/src/bitmaps/statbox.ico b/utils/dialoged/src/bitmaps/statbox.ico deleted file mode 100644 index 74e132a0d9..0000000000 Binary files a/utils/dialoged/src/bitmaps/statbox.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/statbox.xpm b/utils/dialoged/src/bitmaps/statbox.xpm deleted file mode 100644 index 1c3efb2e14..0000000000 --- a/utils/dialoged/src/bitmaps/statbox.xpm +++ /dev/null @@ -1,26 +0,0 @@ -/* XPM */ -static char * statbox_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 4 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -/* pixels */ -" . ", -" .. .. ", -"+++.+.++...++++.", -"+@.@...@@..@@@@.", -"+@. . .... @.", -"+@ @.", -"+@ @.", -"+@ @.", -"+@ @.", -"+@ @.", -"+@ @.", -"+@ @.", -"+@ @.", -"+@ @.", -"+@@@@@@@@@@@@@@.", -"................"}; diff --git a/utils/dialoged/src/bitmaps/stattext.ico b/utils/dialoged/src/bitmaps/stattext.ico deleted file mode 100644 index ef2e0d4592..0000000000 Binary files a/utils/dialoged/src/bitmaps/stattext.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/stattext.xpm b/utils/dialoged/src/bitmaps/stattext.xpm deleted file mode 100644 index 1ff8e94d4e..0000000000 --- a/utils/dialoged/src/bitmaps/stattext.xpm +++ /dev/null @@ -1,24 +0,0 @@ -/* XPM */ -static char * stattext_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 2 1", -/* colors */ -" s None c None", -". c #000000", -/* pixels */ -" ", -" ", -" ", -" .. ", -" .. ", -" .... ", -" .... .... ", -" . . .. .. ", -" .. .. .... ", -" .. .. .. .. ", -" ...... .. .. ", -".. .. .. .. ", -".. .. ..... ", -" ", -" ", -" "}; diff --git a/utils/dialoged/src/bitmaps/text.bmp b/utils/dialoged/src/bitmaps/text.bmp deleted file mode 100644 index 6f4b7a8aa8..0000000000 Binary files a/utils/dialoged/src/bitmaps/text.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/text.xbm b/utils/dialoged/src/bitmaps/text.xbm deleted file mode 100644 index b823e479c5..0000000000 --- a/utils/dialoged/src/bitmaps/text.xbm +++ /dev/null @@ -1,13 +0,0 @@ -#define text_width 28 -#define text_height 28 -static char text_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0x00, 0x10, 0x00, 0x80, 0x00, 0x10, 0x00, 0xa0, 0x00, - 0x10, 0x60, 0xa0, 0x00, 0x10, 0x60, 0xa0, 0x00, 0x10, 0x60, 0xa0, 0x00, - 0x90, 0xe7, 0xa3, 0x00, 0xd0, 0x6c, 0xa6, 0x00, 0x10, 0x6f, 0xa6, 0x00, - 0x90, 0x6d, 0xa6, 0x00, 0xd0, 0x6c, 0xa6, 0x00, 0xd0, 0x6c, 0xa6, 0x00, - 0x90, 0xef, 0xa3, 0x00, 0x10, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x80, 0x00, - 0xf0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/textmult.ico b/utils/dialoged/src/bitmaps/textmult.ico deleted file mode 100644 index a03bf65051..0000000000 Binary files a/utils/dialoged/src/bitmaps/textmult.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/textmult.xpm b/utils/dialoged/src/bitmaps/textmult.xpm deleted file mode 100644 index ad9c5d7244..0000000000 --- a/utils/dialoged/src/bitmaps/textmult.xpm +++ /dev/null @@ -1,27 +0,0 @@ -/* XPM */ -static char * textmult_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 5 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -"# c #ffffff", -/* pixels */ -"@@@@@@@@@@@@@@@@", -"@..............@", -"@.##########+++@", -"@.#.#####.##+.+@", -"@.#.###.#.##...@", -"@.#.#.#.#.##+++@", -"@.##########+++@", -"@.##########+++@", -"@.#.#.######+++@", -"@.###.#.####+++@", -"@.#.#.#.####+++@", -"@.##########+++@", -"@.##########...@", -"@.##########+.+@", -"@.+++++++++++++@", -"@@@@@@@@@@@@@@@@"}; diff --git a/utils/dialoged/src/bitmaps/textsing.ico b/utils/dialoged/src/bitmaps/textsing.ico deleted file mode 100644 index 74cfd83d87..0000000000 Binary files a/utils/dialoged/src/bitmaps/textsing.ico and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/textsing.xpm b/utils/dialoged/src/bitmaps/textsing.xpm deleted file mode 100644 index 346ce3b0ae..0000000000 --- a/utils/dialoged/src/bitmaps/textsing.xpm +++ /dev/null @@ -1,27 +0,0 @@ -/* XPM */ -static char * textsing_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 5 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -"# c #ffffff", -/* pixels */ -" ", -" ", -" ", -"@@@@@@@@@@@@@@@@", -"@..............@", -"@.############+@", -"@.#...########+@", -"@.##.#########+@", -"@.##.#########+@", -"@.#...########+@", -"@.############+@", -"@.+++++++++++++@", -"@@@@@@@@@@@@@@@@", -" ", -" ", -" "}; diff --git a/utils/dialoged/src/bitmaps/textsw.xbm b/utils/dialoged/src/bitmaps/textsw.xbm deleted file mode 100644 index 686131701c..0000000000 --- a/utils/dialoged/src/bitmaps/textsw.xbm +++ /dev/null @@ -1,13 +0,0 @@ -#define textsw_width 28 -#define textsw_height 28 -static char textsw_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0xff, 0x1f, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, - 0x40, 0x9f, 0x11, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, - 0x40, 0x7f, 0x13, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, - 0x40, 0xeb, 0x13, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, - 0x40, 0xdf, 0x11, 0x00, 0x40, 0x00, 0x10, 0x00, 0xc0, 0xff, 0x1f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/tick.bmp b/utils/dialoged/src/bitmaps/tick.bmp deleted file mode 100644 index 3673eda5de..0000000000 Binary files a/utils/dialoged/src/bitmaps/tick.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/toback.bmp b/utils/dialoged/src/bitmaps/toback.bmp deleted file mode 100644 index d2e5efffce..0000000000 Binary files a/utils/dialoged/src/bitmaps/toback.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/toback.xbm b/utils/dialoged/src/bitmaps/toback.xbm deleted file mode 100644 index 71ed8c8a9f..0000000000 --- a/utils/dialoged/src/bitmaps/toback.xbm +++ /dev/null @@ -1,8 +0,0 @@ -#define toback_width 24 -#define toback_height 24 -static char toback_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x0f,0x00, - 0x20,0x08,0x00,0x20,0xf8,0x01,0x20,0xf8,0x01,0x20,0xf8,0x01,0x20,0xf8,0x01, - 0xe0,0xff,0x01,0x00,0xff,0x0f,0x00,0x3f,0x08,0x00,0x3f,0x08,0x00,0x3f,0x08, - 0x00,0x20,0x08,0x00,0x20,0x08,0x00,0xe0,0x0f,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/utils/dialoged/src/bitmaps/toback.xpm b/utils/dialoged/src/bitmaps/toback.xpm deleted file mode 100644 index f7a1c46ab8..0000000000 --- a/utils/dialoged/src/bitmaps/toback.xpm +++ /dev/null @@ -1,25 +0,0 @@ -/* XPM */ -static char *toback_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 4 1", -" c None", -". c Black", -"X c #808080", -"o c Yellow", -/* pixels */ -" ....... ", -" .XXXXX. ", -" .XXXXX...... ", -" .XXXXX.oooo. ", -" .XXXXX.oooo. ", -" .XXXXX.oooo. ", -" .......oooo. ", -" .oooo.......", -" .oooo.XXXXX.", -" .oooo.XXXXX.", -" ......XXXXX.", -" .XXXXX.", -" .XXXXX.", -" .......", -" " -}; diff --git a/utils/dialoged/src/bitmaps/tofront.bmp b/utils/dialoged/src/bitmaps/tofront.bmp deleted file mode 100644 index 5b17cc44c8..0000000000 Binary files a/utils/dialoged/src/bitmaps/tofront.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/tofront.xbm b/utils/dialoged/src/bitmaps/tofront.xbm deleted file mode 100644 index a6e801b9b8..0000000000 --- a/utils/dialoged/src/bitmaps/tofront.xbm +++ /dev/null @@ -1,8 +0,0 @@ -#define tofront_width 24 -#define tofront_height 24 -static char tofront_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x0f,0x00, - 0x20,0x08,0x00,0x20,0xff,0x01,0x20,0xff,0x01,0x20,0xff,0x01,0x20,0xff,0x01, - 0xe0,0xff,0x01,0x00,0xff,0x0f,0x00,0xff,0x09,0x00,0xff,0x09,0x00,0xff,0x09, - 0x00,0x20,0x08,0x00,0x20,0x08,0x00,0xe0,0x0f,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/utils/dialoged/src/bitmaps/tofront.xpm b/utils/dialoged/src/bitmaps/tofront.xpm deleted file mode 100644 index f5ce7652a2..0000000000 --- a/utils/dialoged/src/bitmaps/tofront.xpm +++ /dev/null @@ -1,25 +0,0 @@ -/* XPM */ -static char *tofront_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 4 1", -" c None", -". c Black", -"X c #808080", -"o c Yellow", -/* pixels */ -" ....... ", -" .XXXXX. ", -" .XX......... ", -" .XX.ooooooo. ", -" .XX.ooooooo. ", -" .XX.ooooooo. ", -" ....ooooooo. ", -" .ooooooo....", -" .ooooooo.XX.", -" .ooooooo.XX.", -" .........XX.", -" .XXXXX.", -" .XXXXX.", -" .......", -" " -}; diff --git a/utils/dialoged/src/bitmaps/tree.xbm b/utils/dialoged/src/bitmaps/tree.xbm deleted file mode 100644 index c9d496e38e..0000000000 --- a/utils/dialoged/src/bitmaps/tree.xbm +++ /dev/null @@ -1,9 +0,0 @@ -#define tree_width 24 -#define tree_height 24 -static char tree_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x07, - 0xc0, 0xff, 0x00, 0x20, 0x01, 0x07, 0x10, 0x02, 0x00, 0x08, 0x3c, 0x00, - 0x04, 0x00, 0x00, 0x18, 0x00, 0x00, 0x60, 0x1c, 0x00, 0x80, 0x83, 0x03, - 0x00, 0x7c, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/treeicn.xbm b/utils/dialoged/src/bitmaps/treeicn.xbm deleted file mode 100644 index 01b784ee4e..0000000000 --- a/utils/dialoged/src/bitmaps/treeicn.xbm +++ /dev/null @@ -1,46 +0,0 @@ -#define treeicn_width 64 -#define treeicn_height 64 -static char treeicn_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x70, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x1c, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x80, 0x7f, 0x00, 0x00, - 0x00, 0x00, 0xf0, 0x07, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x1c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x0f, 0x38, 0x00, 0xff, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x70, - 0x80, 0xff, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xe0, 0xc0, 0x00, 0x00, 0x00, - 0x00, 0x3f, 0x00, 0xc0, 0xe1, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x80, - 0xf3, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0xbf, 0xff, 0x00, 0x00, - 0xfc, 0x01, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, - 0x1c, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xfc, 0xff, 0x00, 0x00, - 0x00, 0x07, 0x00, 0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, - 0x38, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, - 0x00, 0x1c, 0xff, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x9c, 0xff, 0x03, - 0xc0, 0x01, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, - 0x00, 0xf8, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0xff, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x80, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x70, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xfe, 0x1f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, - 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x07, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/vert.bmp b/utils/dialoged/src/bitmaps/vert.bmp deleted file mode 100644 index dfd7b5cb53..0000000000 Binary files a/utils/dialoged/src/bitmaps/vert.bmp and /dev/null differ diff --git a/utils/dialoged/src/bitmaps/vert.xbm b/utils/dialoged/src/bitmaps/vert.xbm deleted file mode 100644 index e8ac230c3b..0000000000 --- a/utils/dialoged/src/bitmaps/vert.xbm +++ /dev/null @@ -1,9 +0,0 @@ -#define vert_width 24 -#define vert_height 24 -static char vert_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xf8, 0x07, 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, 0xf0, 0x09, 0x04, - 0x10, 0x09, 0x04, 0x10, 0x09, 0x04, 0x10, 0x09, 0x04, 0x10, 0x09, 0x04, - 0xf0, 0x09, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, 0x00, 0xf8, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/vert.xpm b/utils/dialoged/src/bitmaps/vert.xpm deleted file mode 100644 index 0f85e23920..0000000000 --- a/utils/dialoged/src/bitmaps/vert.xpm +++ /dev/null @@ -1,24 +0,0 @@ -/* XPM */ -static char *vert_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 3 1", -" c None", -". c Black", -"X c Yellow", -/* pixels */ -" ", -" ........", -" .XXXXXX.", -" .XXXXXX.", -" ..... .XXXXXX.", -" .XXX. .XXXXXX.", -" .XXX. .XXXXXX.", -" .XXX. .XXXXXX.", -" .XXX. .XXXXXX.", -" ..... .XXXXXX.", -" .XXXXXX.", -" .XXXXXX.", -" ........", -" ", -" " -}; diff --git a/utils/dialoged/src/bitmaps/wxbuild.xbm b/utils/dialoged/src/bitmaps/wxbuild.xbm deleted file mode 100644 index 8038c9110f..0000000000 --- a/utils/dialoged/src/bitmaps/wxbuild.xbm +++ /dev/null @@ -1,46 +0,0 @@ -#define wxbuild_width 64 -#define wxbuild_height 64 -static char wxbuild_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x33, 0x0c, 0xf0, 0xff, 0xff, 0xff, 0x3f, - 0x03, 0x33, 0x0c, 0xf0, 0xff, 0xff, 0xff, 0x3f, 0x33, 0xc3, 0x03, 0x30, - 0x00, 0x00, 0x00, 0x30, 0x33, 0xc3, 0x03, 0x30, 0x00, 0x00, 0x00, 0x30, - 0x33, 0xc3, 0x03, 0x30, 0x3f, 0xcf, 0xcc, 0x33, 0x33, 0xc3, 0x03, 0x30, - 0x3f, 0xcf, 0xcc, 0x33, 0xcc, 0x30, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x30, - 0xcc, 0x30, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, - 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, - 0x00, 0xc0, 0xff, 0xff, 0xff, 0xf3, 0x33, 0x33, 0x00, 0xc0, 0xff, 0xff, - 0xff, 0xf3, 0x33, 0x33, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30, - 0x00, 0xc0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, - 0x00, 0x03, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30, - 0x00, 0xc0, 0xfc, 0xf3, 0x0f, 0x33, 0xfc, 0x30, 0x00, 0xc0, 0xfc, 0xf3, - 0x0f, 0x33, 0xfc, 0x30, 0x00, 0xc0, 0x0c, 0x33, 0x0c, 0xf3, 0x00, 0x30, - 0x00, 0xc0, 0x0c, 0x33, 0x0c, 0xf3, 0x00, 0x30, 0x00, 0xc0, 0xfc, 0xf3, - 0x0f, 0xf3, 0x03, 0x30, 0x00, 0xc0, 0xfc, 0xf3, 0x0f, 0xf3, 0x03, 0x30, - 0x00, 0xc0, 0x00, 0x00, 0x00, 0xf3, 0x0f, 0x30, 0x00, 0xc0, 0x00, 0x00, - 0x00, 0xf3, 0x0f, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xf3, 0x3f, 0x30, - 0x00, 0xc0, 0x00, 0x00, 0x00, 0xf3, 0x3f, 0x30, 0xff, 0xff, 0x00, 0x00, - 0x00, 0xf3, 0xff, 0x30, 0xff, 0xff, 0x00, 0x00, 0x00, 0xf3, 0xff, 0x30, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xf3, 0xff, 0x33, 0xff, 0xff, 0x00, 0x00, - 0x00, 0xf3, 0xff, 0x33, 0x03, 0xc3, 0x00, 0x00, 0x00, 0xf3, 0xff, 0x3f, - 0x03, 0xc3, 0x00, 0x00, 0x00, 0xf3, 0xff, 0x3f, 0x03, 0xc3, 0x00, 0x00, - 0x00, 0xf3, 0x3f, 0x30, 0x03, 0xc3, 0x00, 0x00, 0x00, 0xf3, 0x3f, 0x30, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xf3, 0x3c, 0x30, 0xff, 0xff, 0x00, 0x00, - 0x00, 0xf3, 0x3c, 0x30, 0x03, 0xc0, 0xff, 0xff, 0xff, 0x33, 0xf0, 0x30, - 0x03, 0xc0, 0xff, 0xff, 0xff, 0x33, 0xf0, 0x30, 0x03, 0x00, 0x00, 0x33, - 0x00, 0x00, 0xf0, 0x30, 0x03, 0x00, 0x00, 0x33, 0x00, 0x00, 0xf0, 0x30, - 0x03, 0x00, 0x00, 0xf3, 0xfc, 0x00, 0xc0, 0x33, 0x03, 0x00, 0x00, 0xf3, - 0xfc, 0x00, 0xc0, 0x33, 0x03, 0xc0, 0x0c, 0x33, 0x00, 0x00, 0xc0, 0x33, - 0x03, 0xc0, 0x0c, 0x33, 0x00, 0x00, 0xc0, 0x33, 0xf3, 0xf3, 0x3f, 0x33, - 0xfc, 0xcc, 0x0f, 0x30, 0xf3, 0xf3, 0x3f, 0x33, 0xfc, 0xcc, 0x0f, 0x30, - 0x33, 0xc0, 0x0c, 0x33, 0x00, 0x00, 0x00, 0x30, 0x33, 0xc0, 0x0c, 0x33, - 0x00, 0x00, 0x00, 0x30, 0x33, 0x00, 0x00, 0xf3, 0xff, 0xff, 0xff, 0x3f, - 0x33, 0x00, 0x00, 0xf3, 0xff, 0xff, 0xff, 0x3f, 0x33, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, - 0xf3, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf3, 0x03, 0x00, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x03, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/utils/dialoged/src/bitmaps/wxwin.xbm b/utils/dialoged/src/bitmaps/wxwin.xbm deleted file mode 100644 index a0da1d2eea..0000000000 --- a/utils/dialoged/src/bitmaps/wxwin.xbm +++ /dev/null @@ -1,12 +0,0 @@ -#define wxwin_width 32 -#define wxwin_height 32 -static char wxwin_bits[] = { - 0x00,0x80,0x01,0x00,0x81,0x8f,0x1d,0xc0,0xc5,0x9a,0x25,0xa0,0x54,0x92,0x49, - 0x50,0x51,0x92,0x91,0x28,0xc5,0x9f,0x21,0x15,0xd4,0x9a,0x41,0x0a,0xd1,0x92, - 0x81,0x04,0x45,0x92,0x41,0x09,0x54,0x93,0xa1,0x12,0x51,0x9f,0x51,0x24,0xc5, - 0x99,0x29,0x48,0x54,0x80,0x15,0x90,0x10,0x80,0x0d,0xe0,0x00,0x80,0x01,0x00, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x80,0x01,0x00,0x00,0x83,0x01, - 0x00,0x80,0x81,0x01,0x08,0x80,0x80,0x01,0x18,0x38,0x87,0x31,0x30,0xfc,0x8f, - 0x31,0x20,0xfc,0x83,0x01,0x20,0xfc,0x83,0x81,0x23,0xfc,0x83,0x01,0x20,0xfc, - 0x8f,0x01,0x20,0xfc,0x8f,0x31,0x30,0xf8,0x8f,0x31,0x18,0x70,0x87,0x01,0x08, - 0x00,0x80,0x01,0x00,0x00,0x80,0x01,0x00}; diff --git a/utils/dialoged/src/bitmaps/wxwin.xpm b/utils/dialoged/src/bitmaps/wxwin.xpm deleted file mode 100644 index f3f11c2a9a..0000000000 --- a/utils/dialoged/src/bitmaps/wxwin.xpm +++ /dev/null @@ -1,46 +0,0 @@ -/* XPM */ -static char *wxwin_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 8 1", -" c Gray100", -". c Black", -"X c Green", -"o c Blue", -"O c Red", -"+ c #c0c0c0", -"@ c Yellow", -"# c Cyan", -/* pixels */ -" ..XXXXXXXXXXXXXXX", -"o ..... ..X...XXXXXXXXX..", -"o o ..O.X.. ..X.++.XXXXXXX.+.", -" o o .OO.XX. ..XX.++.XXXXX.+.X", -"O o .OO.XX. ..XXX.++.XXX.+.XX", -"O O ....... ..XXXX.++.X.+.XXX", -" O O ..o.@.. ..XXXXX.++.+.XXXX", -"o O ..o.@@. ..XXXXXX.++.XXXXX", -"o o .oo.@@. ..XXXXX.+.++.XXXX", -" o o .o..@@. ..XXXX.+.X.++.XXX", -". o .o..... ..XXX.+.XXX.++.XX", -". . ... .. ..XX.+.XXXXX.++.X", -" . . . ..X.+.XXXXXXX.++.", -" . ..X..XXXXXXXXX...", -" ..XXXXXXXXXXXXXXX", -"................................", -"................................", -"###############..@@@@@@@@@@@@@@@", -"########OO#####..@@@@@@@@@@@@@@@", -"#######OO######..@@@@@@@@@@.@@@@", -"#######O#######..@@@@@@@@@@..@@@", -"###OOO##OOO####..@@@..@@@@@@..@@", -"##OOOOOOOOOO###..@@@..@@@@@@@.@@", -"##OOOOOOOO#####..@@@@@@@@@@@@.@@", -"##OOOOOOOO#####..@@@@@@...@@@.@@", -"##OOOOOOOO#####..@@@@@@@@@@@@.@@", -"##OOOOOOOOOO###..@@@@@@@@@@@@.@@", -"##OOOOOOOOOO###..@@@..@@@@@@..@@", -"###OOOOOOOOO###..@@@..@@@@@..@@@", -"####OOO#OOO####..@@@@@@@@@@.@@@@", -"###############..@@@@@@@@@@@@@@@", -"###############..@@@@@@@@@@@@@@@" -}; diff --git a/utils/dialoged/src/dialoged.cpp b/utils/dialoged/src/dialoged.cpp deleted file mode 100644 index 2102995171..0000000000 --- a/utils/dialoged/src/dialoged.cpp +++ /dev/null @@ -1,58 +0,0 @@ -// Name: dialoged.cpp -// Purpose: Main Dialog Editor implementation file -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "dialoged.h" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "dialoged.h" - -IMPLEMENT_APP(MyApp) - -MyApp::MyApp(void) -{ -} - -wxResourceManager *theResourceManager = NULL; - -#include "symbtabl.h" - -bool MyApp::OnInit(void) -{ - theResourceManager = new wxResourceManager; - theResourceManager->Initialize(); - - theResourceManager->ShowResourceEditor(TRUE); - - if (argc > 1) - theResourceManager->Load(argv[1]); - - SetTopWindow(theResourceManager->GetEditorFrame()); - - return TRUE; -} - -int MyApp::OnExit(void) -{ - delete theResourceManager; - theResourceManager = NULL; - return 0; -} diff --git a/utils/dialoged/src/dialoged.def b/utils/dialoged/src/dialoged.def deleted file mode 100644 index a7c0fbbaa5..0000000000 --- a/utils/dialoged/src/dialoged.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME DialogEd -DESCRIPTION 'wxWindows Dialog Editor' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 8192 diff --git a/utils/dialoged/src/dialoged.h b/utils/dialoged/src/dialoged.h deleted file mode 100644 index 99442bdc25..0000000000 --- a/utils/dialoged/src/dialoged.h +++ /dev/null @@ -1,37 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dialoged.h -// Purpose: Dialog Editor application header file -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma interface "dialoged.h" -#endif - -#ifndef dialogedh -#define dialogedh - -#include "proplist.h" -#include "reseditr.h" - -class MyChild; - -// Define a new application -class MyApp: public wxApp -{ - public: - MyApp(void); - bool OnInit(void); - int OnExit(void); -}; - -DECLARE_APP(MyApp) - -extern wxFrame *GetMainFrame(void); - -#endif diff --git a/utils/dialoged/src/dialoged.ico b/utils/dialoged/src/dialoged.ico deleted file mode 100644 index cec6bac64e..0000000000 Binary files a/utils/dialoged/src/dialoged.ico and /dev/null differ diff --git a/utils/dialoged/src/dialoged.rc b/utils/dialoged/src/dialoged.rc deleted file mode 100644 index 97cd4d11d4..0000000000 --- a/utils/dialoged/src/dialoged.rc +++ /dev/null @@ -1,64 +0,0 @@ -aaa ICON "bitmaps/dialoged.ico" -DIALOGEDICON ICON "bitmaps/dialoged.ico" - -DIALOG_ICON ICON "bitmaps/dialog.ico" -FOLDER1_ICON ICON "bitmaps/folder1.ico" -FOLDER2_ICON ICON "bitmaps/folder2.ico" -BUTTONSM_ICON ICON "bitmaps/buttonsm.ico" - -/* For control list */ -ARROW_ICON ICON "bitmaps/arrow.ico" -BUTTON_ICON ICON "bitmaps/button.ico" -BMPBUTTON_ICON ICON "bitmaps/bmpbuttn.ico" -STATICTEXT_ICON ICON "bitmaps/stattext.ico" -STATICBMP_ICON ICON "bitmaps/statbmp.ico" -STATICBOX_ICON ICON "bitmaps/statbox.ico" -TEXTSING_ICON ICON "bitmaps/textsing.ico" -TEXTMULT_ICON ICON "bitmaps/textmult.ico" -LISTBOX_ICON ICON "bitmaps/listbox.ico" -CHOICE_ICON ICON "bitmaps/choice.ico" -COMBOBOX_ICON ICON "bitmaps/combobox.ico" -CHECKBOX_ICON ICON "bitmaps/checkbox.ico" -SLIDER_ICON ICON "bitmaps/slider.ico" -GAUGE_ICON ICON "bitmaps/gauge.ico" -RADIOBOX_ICON ICON "bitmaps/radiobox.ico" -RADIOBTN_ICON ICON "bitmaps/radiobtn.ico" -SCROLBAR_ICON ICON "bitmaps/scrolbar.ico" - -#include "wx/msw/wx.rc" - -DIALOGBOXTOOL BITMAP "bitmaps/dialog.bmp" -MESSAGETOOL BITMAP "bitmaps/message.bmp" -BUTTONTOOL BITMAP "bitmaps/button.bmp" -CHECKBOXTOOL BITMAP "bitmaps/check.bmp" -RADIOBOXTOOL BITMAP "bitmaps/radio.bmp" -LISTBOXTOOL BITMAP "bitmaps/listbox.bmp" -CHOICETOOL BITMAP "bitmaps/choice.bmp" -TEXTTOOL BITMAP "bitmaps/text.bmp" -MULTITEXTTOOL BITMAP "bitmaps/mtext.bmp" -SLIDERTOOL BITMAP "bitmaps/slider.bmp" -ARROWTOOL BITMAP "bitmaps/arrow.bmp" -GROUPTOOL BITMAP "bitmaps/group.bmp" -GAUGETOOL BITMAP "bitmaps/gauge.bmp" -PICTURETOOL BITMAP "bitmaps/picture.bmp" -BMPBUTTONTOOL BITMAP "bitmaps/bmpbuttn.bmp" -SCROLLBARTOOL BITMAP "bitmaps/scroll.bmp" - -NEWTOOL BITMAP "bitmaps/new.bmp" -LOADTOOL BITMAP "bitmaps/load.bmp" -SAVETOOL BITMAP "bitmaps/save.bmp" -VERTTOOL BITMAP "bitmaps/vert.bmp" -ALIGNTTOOL BITMAP "bitmaps/alignt.bmp" -ALIGNBTOOL BITMAP "bitmaps/alignb.bmp" -ALIGNLTOOL BITMAP "bitmaps/alignl.bmp" -ALIGNRTOOL BITMAP "bitmaps/alignr.bmp" -HORIZTOOL BITMAP "bitmaps/horiz.bmp" -HELPTOOL BITMAP "bitmaps/help.bmp" -COPYSIZETOOL BITMAP "bitmaps/copysize.bmp" -TOFRONTTOOL BITMAP "bitmaps/tofront.bmp" -TOBACKTOOL BITMAP "bitmaps/toback.bmp" - -WXWINBMP BITMAP "bitmaps/wxwin.bmp" - -tick_bmp BITMAP "bitmaps/tick.bmp" -cross_bmp BITMAP "bitmaps/cross.bmp" diff --git a/utils/dialoged/src/dlghndlr.cpp b/utils/dialoged/src/dlghndlr.cpp deleted file mode 100644 index aad48c3e3b..0000000000 --- a/utils/dialoged/src/dlghndlr.cpp +++ /dev/null @@ -1,1077 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dlghndlr.cpp -// Purpose: Dialog handler -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include -#include -#include -#include - -#if defined(__WXMSW__) && !defined(__GNUWIN32__) -#include -#else -#include -#endif - -#include "reseditr.h" -#include "winprop.h" -#include "dlghndlr.h" -#include "edlist.h" - -IMPLEMENT_CLASS(wxResourceEditorDialogHandler, wxEvtHandler) -IMPLEMENT_CLASS(wxResourceEditorControlHandler, wxEvtHandler) - -BEGIN_EVENT_TABLE(wxResourceEditorDialogHandler, wxEvtHandler) - EVT_PAINT(wxResourceEditorDialogHandler::OnPaint) - EVT_MOUSE_EVENTS(wxResourceEditorDialogHandler::OnMouseEvent) -END_EVENT_TABLE() - -BEGIN_EVENT_TABLE(wxResourceEditorControlHandler, wxEvtHandler) - EVT_MOUSE_EVENTS(wxResourceEditorControlHandler::OnMouseEvent) -END_EVENT_TABLE() - -/* - * Dialog box event handler - */ - -wxResourceEditorDialogHandler::wxResourceEditorDialogHandler(wxPanel *dialog, wxItemResource *resource, - wxEvtHandler *oldHandler, wxResourceManager *manager) -{ - handlerDialog = dialog; - handlerResource = resource; - handlerOldHandler = oldHandler; - resourceManager = manager; - - dragMode = wxDRAG_MODE_NONE; - dragType = wxDRAG_TYPE_NONE; - dragItem = NULL; - firstDragX = 0; - firstDragY = 0; - oldDragX = 0; - oldDragY = 0; - dragTolerance = 3; - checkTolerance = TRUE; - m_mouseCaptured = FALSE; -// m_treeItem = 0; -} - -wxResourceEditorDialogHandler::~wxResourceEditorDialogHandler(void) -{ -} - -void wxResourceEditorDialogHandler::OnItemSelect(wxControl *item, bool select) -{ - if (select) - resourceManager->AddSelection(item); - else - resourceManager->RemoveSelection(item); -} - -void wxResourceEditorDialogHandler::OnPaint(wxPaintEvent& WXUNUSED(event)) -{ - wxPaintDC dc(handlerDialog); - - PaintSelectionHandles(dc); -} - -// Add event handlers for all children -void wxResourceEditorDialogHandler::AddChildHandlers(void) -{ - wxNode *node = handlerDialog->GetChildren()->First(); - while ( node ) - { - wxControl *child = (wxControl *)node->Data(); - wxEvtHandler *childHandler = child->GetEventHandler(); - if ( child->IsKindOf(CLASSINFO(wxControl)) && childHandler == child ) - child->PushEventHandler(new wxResourceEditorControlHandler(child, childHandler)); - node = node->Next(); - } -} - -void wxResourceEditorDialogHandler::OnLeftClick(int x, int y, int keys) -{ - if (keys & wxKEY_CTRL) - { - wxResourceManager::GetCurrentResourceManager()->EditWindow(handlerDialog); - return; - } - - // Deselect all items if click on panel - if (wxResourceManager::GetCurrentResourceManager()->GetEditorControlList()->GetSelection() == RESED_POINTER) - { - int needsRefresh = 0; - wxNode *node = handlerDialog->GetChildren()->First(); - while (node) - { - wxControl *item = (wxControl *)node->Data(); - wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - if (item->IsKindOf(CLASSINFO(wxControl)) && childHandler->IsSelected()) - { - needsRefresh ++; - OnItemSelect(item, FALSE); - childHandler->SelectItem(FALSE); - } - node = node->Next(); - } - if (needsRefresh > 0) - { - wxClientDC dc(handlerDialog); - dc.Clear(); - handlerDialog->Refresh(); - } - return; - } - - wxResourceManager* manager = resourceManager; - - switch (wxResourceManager::GetCurrentResourceManager()->GetEditorControlList()->GetSelection()) - { - case RESED_BUTTON: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxButton", x, y); - break; - case RESED_BMPBUTTON: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxBitmapButton", x, y, TRUE); - break; - case RESED_STATICTEXT: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxStaticText", x, y); - break; - case RESED_STATICBMP: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxStaticBitmap", x, y, TRUE); - break; - case RESED_TEXTCTRL_SINGLE: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxTextCtrl (single-line)", x, y); - break; - case RESED_TEXTCTRL_MULTIPLE: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxTextCtrl (multi-line)", x, y); - break; - case RESED_CHOICE: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxChoice", x, y); - break; - case RESED_COMBOBOX: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxComboBox", x, y); - break; - case RESED_CHECKBOX: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxCheckBox", x, y); - break; - case RESED_RADIOBOX: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxRadioBox", x, y); - break; - case RESED_RADIOBUTTON: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxRadioButton", x, y); - break; - case RESED_LISTBOX: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxListBox", x, y); - break; - case RESED_SLIDER: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxSlider", x, y); - break; - case RESED_GAUGE: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxGauge", x, y); - break; - case RESED_STATICBOX: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxStaticBox", x, y); - break; - case RESED_SCROLLBAR: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxScrollBar", x, y); - break; - default: - break; - } - - // Now switch pointer on. - if (wxResourceManager::GetCurrentResourceManager()->GetEditorControlList()->GetSelection() != RESED_POINTER) - { - wxResourceManager::GetCurrentResourceManager()->GetEditorControlList()->SetItemState(RESED_POINTER, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); - } -} - -void wxResourceEditorDialogHandler::OnRightClick(int x, int y, int WXUNUSED(keys)) -{ - wxMenu *menu = resourceManager->GetPopupMenu(); - menu->SetClientData((char *)handlerDialog); - handlerDialog->PopupMenu(menu, x, y); -} - -void wxResourceEditorDialogHandler::OnItemLeftClick(wxControl *item, int x, int y, int keys) -{ - if (keys & wxKEY_CTRL) - { - wxResourceManager::GetCurrentResourceManager()->EditWindow(item); - return; - } - -/* - // If this is a wxStaticBox and the pointer isn't an arrow, chances - // are that we really meant to place an item on the panel. - // Fake this event. - if ((item->GetClassInfo() == CLASSINFO(wxStaticBox)) && resourceManager->GetEditorPalette()->currentlySelected != PALETTE_ARROW) - { - OnLeftClick(x, y, keys); - return; - } -*/ - - wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - - if (childHandler->IsSelected()) - { - childHandler->SelectItem(FALSE); - OnItemSelect(item, FALSE); - - wxClientDC dc(handlerDialog); - dc.Clear(); - handlerDialog->Refresh(); - } - else - { - childHandler->SelectItem(TRUE); - OnItemSelect(item, TRUE); - - // Deselect other items if shift is not pressed - int needsRefresh = 0; - if (!(keys & wxKEY_SHIFT)) - { - wxNode *node = item->GetParent()->GetChildren()->First(); - while (node) - { - wxControl *child = (wxControl *)node->Data(); - wxResourceEditorControlHandler *childHandler2 = (wxResourceEditorControlHandler *)child->GetEventHandler(); - if (child->IsKindOf(CLASSINFO(wxControl)) && childHandler2->IsSelected() && child != item) - { - childHandler2->SelectItem(FALSE); - OnItemSelect(child, FALSE); - needsRefresh ++; - } - node = node->Next(); - } - } - - wxClientDC dc(handlerDialog); - childHandler->DrawSelectionHandles(dc); - - if (needsRefresh > 0) - { - dc.Clear(); - handlerDialog->Refresh(); - } - } -} - -void wxResourceEditorDialogHandler::OnItemRightClick(wxControl *item, int x, int y, int WXUNUSED(keys)) -{ -/* - if (keys & wxKEY_CTRL) - { - wxDebugMsg("Item %s, selected = %d\n", item->GetName(), item->IsSelected()); - return; - } -*/ - - wxMenu *menu = resourceManager->GetPopupMenu(); - menu->SetClientData((char *)item); - handlerDialog->PopupMenu(menu, x, y); -} - -// An event outside any items: may be a drag event. -void wxResourceEditorDialogHandler::OnMouseEvent(wxMouseEvent& event) -{ - if (GetEvtHandlerEnabled()) - { - // If we're dragging an item or selection handle, - // continue dragging. - if (dragMode != wxDRAG_MODE_NONE) - { - ProcessItemEvent(dragItem, event, dragType); - return; - } - - long x, y; - event.Position(&x, &y); - - // Find which selection handle we're on, if any - wxNode *node = handlerDialog->GetChildren()->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (win->IsKindOf(CLASSINFO(wxControl))) - { - wxControl *item = (wxControl *)win; - wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - int selHandle = childHandler->SelectionHandleHitTest(x, y); - if (selHandle > 0) - { - ProcessItemEvent(item, event, selHandle); - return; - } - } - node = node->Next(); - } - - // We're not on an item or selection handle. - // so... check for a left or right click event - // to send to the application. - int keys = 0; - if (event.ShiftDown()) keys = keys | wxKEY_SHIFT; - if (event.ControlDown()) keys = keys | wxKEY_CTRL; - - if (event.LeftUp()) - { - if (m_mouseCaptured) - { - handlerDialog->ReleaseMouse(); - m_mouseCaptured = FALSE; - } - - OnLeftClick(x, y, keys); - } - else if (event.RightUp()) - { - if (m_mouseCaptured) - { - handlerDialog->ReleaseMouse(); - m_mouseCaptured = FALSE; - } - - OnRightClick(x, y, keys); - } - } - else - event.Skip(); -} - -void wxResourceEditorDialogHandler::OnItemEvent(wxControl *item, wxMouseEvent& event) -{ - if (!GetEvtHandlerEnabled()) - return; - - // Not a selection handle event: just a normal item event. - // Transform to panel coordinates. - int x, y; - item->GetPosition(&x, &y); - - event.m_x = event.m_x + x; - event.m_y = event.m_y + y; - ProcessItemEvent(item, event, dragType); -} - -void wxResourceEditorDialogHandler::ProcessItemEvent(wxControl *item, wxMouseEvent& event, int selectionHandle) -{ - wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - - long x, y; - event.Position(&x, &y); - int keys = 0; - if (event.ShiftDown()) keys = keys | wxKEY_SHIFT; - if (event.ControlDown()) keys = keys | wxKEY_CTRL; - bool dragging = event.Dragging(); - if (dragging) - { - int dx = (int)abs((x - firstDragX)); - int dy = (int)abs((y - firstDragY)); - if (checkTolerance && (dx <= dragTolerance) && (dy <= dragTolerance)) - { - return; - } - else - // If we've ignored the tolerance once, then ALWAYS ignore - // tolerance in this drag, even if we come back within - // the tolerance range. - { - checkTolerance = FALSE; - } - } - if (event.LeftDClick()) - { - if (m_mouseCaptured) - { - handlerDialog->ReleaseMouse(); - m_mouseCaptured = FALSE; - } - - wxResourceManager::GetCurrentResourceManager()->EditWindow(item); - } - else if (dragging && dragItem && dragMode == wxDRAG_MODE_START_LEFT) - { - dragMode = wxDRAG_MODE_CONTINUE_LEFT; - wxClientDC dc(handlerDialog); - childHandler->OnDragBegin(x, y, keys, dc, selectionHandle); - oldDragX = x; oldDragY = y; - if (!m_mouseCaptured) - { - handlerDialog->CaptureMouse(); - m_mouseCaptured = TRUE; - } - } - else if (dragging && dragItem && dragMode == wxDRAG_MODE_CONTINUE_LEFT) - { - wxClientDC dc(handlerDialog); - childHandler->OnDragContinue(FALSE, oldDragX, oldDragY, keys, dc, selectionHandle); - childHandler->OnDragContinue(TRUE, x, y, keys, dc, selectionHandle); - oldDragX = x; oldDragY = y; - } - else if (event.LeftUp() && dragItem && dragMode == wxDRAG_MODE_CONTINUE_LEFT) - { - wxClientDC dc(handlerDialog); - dragMode = wxDRAG_MODE_NONE; - checkTolerance = TRUE; - - childHandler->OnDragContinue(FALSE, oldDragX, oldDragY, keys, dc, selectionHandle); - childHandler->OnDragEnd(x, y, keys, dc, selectionHandle); - - dragItem = NULL; - dragType = wxDRAG_TYPE_NONE; - - if (m_mouseCaptured) - { - handlerDialog->ReleaseMouse(); - m_mouseCaptured = FALSE; - } - } - else if (dragging && dragItem && dragMode == wxDRAG_MODE_START_RIGHT) - { - wxClientDC dc(handlerDialog); - dragMode = wxDRAG_MODE_CONTINUE_RIGHT; - childHandler->OnDragBegin(x, y, keys, dc, selectionHandle); - oldDragX = x; oldDragY = y; - - if (!m_mouseCaptured) - { - handlerDialog->CaptureMouse(); - m_mouseCaptured = TRUE; - } - } - else if (dragging && dragItem && dragMode == wxDRAG_MODE_CONTINUE_RIGHT) - { - oldDragX = x; oldDragY = y; - } - else if (event.RightUp() && dragItem && dragMode == wxDRAG_MODE_CONTINUE_RIGHT) - { - dragMode = wxDRAG_MODE_NONE; - checkTolerance = TRUE; - dragItem = NULL; - dragType = wxDRAG_TYPE_NONE; - - if (m_mouseCaptured) - { - handlerDialog->ReleaseMouse(); - m_mouseCaptured = FALSE; - } - } - else if (event.IsButton()) - { - checkTolerance = TRUE; - - if (event.LeftDown()) - { - dragItem = item; - dragMode = wxDRAG_MODE_START_LEFT; - firstDragX = x; - firstDragY = y; - dragType = selectionHandle; - - if (!m_mouseCaptured) - { - handlerDialog->CaptureMouse(); - m_mouseCaptured = TRUE; - } - } - else if (event.RightDown()) - { - dragItem = item; - dragMode = wxDRAG_MODE_START_RIGHT; - firstDragX = x; - firstDragY = y; - dragType = selectionHandle; - - if (!m_mouseCaptured) - { - handlerDialog->CaptureMouse(); - m_mouseCaptured = TRUE; - } - } - else if (event.LeftUp()) - { - if (dragItem) - childHandler->OnLeftClick(x, y, keys); - else - OnLeftClick(x, y, keys); - - dragItem = NULL; dragMode = wxDRAG_MODE_NONE; dragType = wxDRAG_TYPE_NONE; - - if (m_mouseCaptured) - { - handlerDialog->ReleaseMouse(); - m_mouseCaptured = FALSE; - } - } - else if (event.RightUp()) - { - if (dragItem) - childHandler->OnRightClick(x, y, keys); - else - OnRightClick(x, y, keys); - - dragItem = NULL; dragMode = wxDRAG_MODE_NONE; dragType = wxDRAG_TYPE_NONE; - - if (m_mouseCaptured) - { - handlerDialog->ReleaseMouse(); - m_mouseCaptured = FALSE; - } - } - } -} - -// Calls DrawSelectionHandles for all items if -// edit mode is on. -void wxResourceEditorDialogHandler::PaintSelectionHandles(wxDC& dc) -{ - if (!GetEvtHandlerEnabled()) - return; - - dc.BeginDrawing(); - - wxNode *node = handlerDialog->GetChildren()->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (win->IsKindOf(CLASSINFO(wxControl))) - { - wxControl *item = (wxControl *)win; - wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - - // Don't draw handles for an item that's being moved: it'll - // smear. - if (childHandler->IsSelected() && (item != dragItem)) - childHandler->DrawSelectionHandles(dc); - } - node = node->Next(); - } - dc.EndDrawing(); -} - -/* - * Event handler for controls - */ - -int wxResourceEditorControlHandler::dragOffsetX = 0; -int wxResourceEditorControlHandler::dragOffsetY = 0; - -wxResourceEditorControlHandler::wxResourceEditorControlHandler(wxControl *control, - wxEvtHandler *oldHandler) -{ - handlerControl = control; - handlerOldHandler = oldHandler; - - handleSize = 6; - handleMargin = 1; - isSelected = FALSE; - dragOffsetX = 0; - dragOffsetY = 0; -// m_treeItem = 0; -} - -wxResourceEditorControlHandler::~wxResourceEditorControlHandler(void) -{ -} - -/* - * Manipulation and drawing of items in Edit Mode - */ - -void wxResourceEditorControlHandler::SelectItem(bool select) -{ - isSelected = select; -} - -// Returns TRUE or FALSE -bool wxResourceEditorControlHandler::HitTest(int x, int y) -{ - int xpos, ypos, width, height; - handlerControl->GetPosition(&xpos, &ypos); - handlerControl->GetSize(&width, &height); - - return ((x >= xpos) && (x <= (xpos + width)) && (y >= ypos) && (y <= (ypos + height))); -} - -// Calculate position of the 8 handles -void wxResourceEditorControlHandler::CalcSelectionHandles(int *hx, int *hy) -{ - int xpos, ypos, width, height; - handlerControl->GetPosition(&xpos, &ypos); - handlerControl->GetSize(&width, &height); - int middleX = (xpos + (width/2)); - int middleY = (ypos + (height/2)); - - // Start from top middle, clockwise. -/* - 7 0 1 - - 6 2 - - 5 4 3 -*/ - - hx[0] = (int)(middleX - (handleSize/2)); - hy[0] = ypos - handleSize - handleMargin; - - hx[1] = xpos + width + handleMargin; - hy[1] = ypos - handleSize - handleMargin; - - hx[2] = xpos + width + handleMargin; - hy[2] = (int)(middleY - (handleSize/2)); - - hx[3] = xpos + width + handleMargin; - hy[3] = ypos + height + handleMargin; - - hx[4] = (int)(middleX - (handleSize/2)); - hy[4] = ypos + height + handleMargin; - - hx[5] = xpos - handleSize - handleMargin; - hy[5] = ypos + height + handleMargin; - - hx[6] = xpos - handleSize - handleMargin; - hy[6] = (int)(middleY - (handleSize/2)); - - hx[7] = xpos - handleSize - handleMargin; - hy[7] = ypos - handleSize - handleMargin; -} - -// Returns 0 (no hit), 1 - 8 for which selection handle -// (clockwise from top middle) -int wxResourceEditorControlHandler::SelectionHandleHitTest(int x, int y) -{ - // Handle positions - int hx[8]; - int hy[8]; - CalcSelectionHandles(hx, hy); - - int i; - for (i = 0; i < 8; i++) - { - if ((x >= hx[i]) && (x <= (hx[i] + handleSize)) && (y >= hy[i]) && (y <= (hy[i] + handleSize))) - return (i + 1); - } - return 0; -} - -void wxResourceEditorControlHandler::DrawSelectionHandles(wxDC& dc, bool WXUNUSED(erase)) -{ - dc.SetOptimization(FALSE); - - dc.SetLogicalFunction(wxCOPY); - dc.SetPen(wxBLACK_PEN); - dc.SetBrush(wxBLACK_BRUSH); - - dc.SetOptimization(TRUE); - - // Handle positions - int hx[8]; - int hy[8]; - CalcSelectionHandles(hx, hy); - - int i; - for (i = 0; i < 8; i++) - { - dc.DrawRectangle(hx[i], hy[i], handleSize, handleSize); - } -} - -void wxResourceEditorControlHandler::DrawBoundingBox(wxDC& dc, int x, int y, int w, int h) -{ - dc.DrawRectangle(x, y, w, h); -} - -// If selectionHandle is zero, not dragging the selection handle. -void wxResourceEditorControlHandler::OnDragBegin(int x, int y, int WXUNUSED(keys), wxDC& dc, int selectionHandle) -{ - int xpos, ypos, width, height; - handlerControl->GetPosition(&xpos, &ypos); - handlerControl->GetSize(&width, &height); - - dc.BeginDrawing(); - -// dc.DestroyClippingRegion(); - - wxPanel *panel = (wxPanel *)handlerControl->GetParent(); - wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); - - // Erase selection handles -// DrawSelectionHandles(dc, TRUE); - - dc.SetOptimization(FALSE); - - dc.SetLogicalFunction(wxXOR); - - wxPen pen(wxColour(0, 0, 0), 1, wxDOT); - dc.SetPen(pen); - dc.SetBrush(wxTRANSPARENT_BRUSH); - - dc.SetOptimization(TRUE); - - if (selectionHandle > 0) - { - panel->Refresh(); - - DrawBoundingBox(dc, xpos, ypos, width, height); - } - else - { - panel->Refresh(); - - dragOffsetX = (x - xpos); - dragOffsetY = (y - ypos); - - DrawBoundingBox(dc, xpos, ypos, width, height); - - // Also draw bounding boxes for other selected items - wxNode *node = panel->GetChildren()->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (win->IsKindOf(CLASSINFO(wxControl))) - { - wxControl *item = (wxControl *)win; - wxResourceEditorControlHandler *handler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - if ((item != handlerControl) && handler->IsSelected()) - { - int x1, y1, w1, h1; - item->GetPosition(&x1, &y1); - item->GetSize(&w1, &h1); - handler->DrawBoundingBox(dc, x1, y1, w1, h1); - } - } - node = node->Next(); - } - } - dc.EndDrawing(); -} - -void wxResourceEditorControlHandler::OnDragContinue(bool paintIt, int x, int y, int WXUNUSED(keys), wxDC& dc, int selectionHandle) -{ - wxPanel *panel = (wxPanel *)handlerControl->GetParent(); - wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); - - int xpos, ypos, width, height; - handlerControl->GetPosition(&xpos, &ypos); - handlerControl->GetSize(&width, &height); - - if (selectionHandle > 0) - { -/* - 8 1 2 - - 7 3 - - 6 5 4 -*/ - - int x1, y1, width1, height1; - - switch (selectionHandle) - { - case 1: - x1 = xpos; - y1 = y; - width1 = width; - height1 = (ypos + height) - y; - break; - case 5: - x1 = xpos; - y1 = ypos; - width1 = width; - height1 = (y - ypos); - break; - case 3: - x1 = xpos; - y1 = ypos; - width1 = (x - xpos); - height1 = height; - break; - case 7: - x1 = x; - y1 = ypos; - width1 = (xpos + width) - x; - height1 = height; - break; - case 2: - x1 = xpos; - y1 = y; - width1 = (x - xpos); - height1 = (ypos + height) - y; - break; - case 4: - x1 = xpos; - y1 = ypos; - width1 = (x - xpos); - height1 = (y - ypos); - break; - case 6: - x1 = x; - y1 = ypos; - width1 = (xpos + width) - x; - height1 = y - ypos; - break; - case 8: - x1 = x; - y1 = y; - width1 = (xpos + width) - x; - height1 = (ypos + height) - y; - break; - } - dc.BeginDrawing(); - - dc.SetLogicalFunction(wxXOR); - wxPen pen(wxColour(0, 0, 0), 1, wxDOT); - dc.SetPen(pen); - dc.SetBrush(wxTRANSPARENT_BRUSH); - - DrawBoundingBox(dc, x1, y1, width1, height1); - - dc.EndDrawing(); - } - else - { - dc.BeginDrawing(); - dc.SetLogicalFunction(wxXOR); - wxPen pen(wxColour(0, 0, 0), 1, wxDOT); - dc.SetPen(pen); - dc.SetBrush(wxTRANSPARENT_BRUSH); - - DrawBoundingBox(dc, (int)(x - dragOffsetX), (int)(y - dragOffsetY), width, height); - - // Also draw bounding boxes for other selected items - wxNode *node = panel->GetChildren()->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (win->IsKindOf(CLASSINFO(wxControl))) - { - wxControl *item = (wxControl *)win; - wxResourceEditorControlHandler *handler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - if ((item != handlerControl) && handler->IsSelected()) - { - int x1, y1, w1, h1; - item->GetPosition(&x1, &y1); - item->GetSize(&w1, &h1); - int x2 = (int)(x1 + (x - dragOffsetX) - xpos); - int y2 = (int)(y1 + (y - dragOffsetY) - ypos); - handler->DrawBoundingBox(dc, x2, y2, w1, h1); - } - } - node = node->Next(); - } - dc.EndDrawing(); - } -} - -void wxResourceEditorControlHandler::OnDragEnd(int x, int y, int WXUNUSED(keys), wxDC& dc, int selectionHandle) -{ - wxPanel *panel = (wxPanel *)handlerControl->GetParent(); - wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); - - dc.BeginDrawing(); - - int xpos, ypos, width, height; - handlerControl->GetPosition(&xpos, &ypos); - handlerControl->GetSize(&width, &height); - - if (selectionHandle > 0) - { - int x1, y1, width1, height1; - - switch (selectionHandle) - { - case 1: - x1 = xpos; - y1 = y; - width1 = width; - height1 = (ypos + height) - y; - break; - case 5: - x1 = xpos; - y1 = ypos; - width1 = width; - height1 = (y - ypos); - break; - case 3: - x1 = xpos; - y1 = ypos; - width1 = (x - xpos); - height1 = height; - break; - case 7: - x1 = x; - y1 = ypos; - width1 = (xpos + width) - x; - height1 = height; - break; - case 2: - x1 = xpos; - y1 = y; - width1 = (x - xpos); - height1 = (ypos + height) - y; - break; - case 4: - x1 = xpos; - y1 = ypos; - width1 = (x - xpos); - height1 = (y - ypos); - break; - case 6: - x1 = x; - y1 = ypos; - width1 = (xpos + width) - x; - height1 = y - ypos; - break; - case 8: - x1 = x; - y1 = y; - width1 = (xpos + width) - x; - height1 = (ypos + height) - y; - break; - } - handlerControl->SetSize(x1, y1, width1, height1); - } - else - { - handlerControl->Move((int)(x - dragOffsetX), (int)(y - dragOffsetY)); - OldOnMove((int)(x - dragOffsetX), (int)(y - dragOffsetY)); - - // Also move other selected items - wxNode *node = panel->GetChildren()->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (win->IsKindOf(CLASSINFO(wxControl))) - { - wxControl *item = (wxControl *)win; - wxResourceEditorControlHandler *handler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - if ((item != handlerControl) && handler->IsSelected()) - { - int x1, y1; - item->GetPosition(&x1, &y1); - int x2 = (int)(x1 + (x - dragOffsetX) - xpos); - int y2 = (int)(y1 + (y - dragOffsetY) - ypos); - item->Move(x2, y2); - ((wxResourceEditorControlHandler *)item->GetEventHandler())->OldOnMove(x2, y2); - ((wxResourceEditorControlHandler *)item->GetEventHandler())->DrawSelectionHandles(dc); - } - } - node = node->Next(); - } - } - dc.SetOptimization(FALSE); - - dc.SetLogicalFunction(wxCOPY); - dc.SetPen(wxBLACK_PEN); - dc.SetBrush(wxBLACK_BRUSH); - - dc.SetOptimization(TRUE); - - // Force it to repaint the selection handles (if any) - // since the panel thinks we're still within a drag and - // won't paint the handles. - if (IsSelected()) - DrawSelectionHandles(dc); - - dc.EndDrawing(); - - panel->Refresh(); -} - -// These functions call OnItemEvent, OnItemMove and OnItemSize -// by default. -void wxResourceEditorControlHandler::OnMouseEvent(wxMouseEvent& event) -{ -/* - if ((event.m_eventType == wxEVENT_TYPE_LEFT_DCLICK) || - (event.m_eventType == wxEVENT_TYPE_RIGHT_DCLICK)) - return; -*/ - wxWindow *panel = handlerControl->GetParent(); - if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) ) - return; - wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); - if ( !panelHandler->GetEvtHandlerEnabled() ) - { - event.Skip(); - return; - } - - panelHandler->OnItemEvent(handlerControl, event); -} - -void wxResourceEditorControlHandler::OldOnMove(int x, int y) -{ - wxWindow *panel = handlerControl->GetParent(); - if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) ) - return; - - wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); - panelHandler->OnItemMove(handlerControl, x, y); -} - -void wxResourceEditorControlHandler::OldOnSize(int w, int h) -{ - wxWindow *panel = handlerControl->GetParent(); - if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) ) - return; - - wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); - panelHandler->OnItemSize(handlerControl, w, h); -} - -void wxResourceEditorControlHandler::OnSelect(bool select) -{ - wxWindow *panel = handlerControl->GetParent(); - if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) ) - return; - - wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); - panelHandler->OnItemSelect(handlerControl, select); -} - -void wxResourceEditorControlHandler::OnLeftClick(int x, int y, int keys) -{ - wxWindow *panel = handlerControl->GetParent(); - if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) ) - return; - - wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); - panelHandler->OnItemLeftClick(handlerControl, x, y, keys); -} - -void wxResourceEditorControlHandler::OnRightClick(int x, int y, int keys) -{ - wxWindow *panel = handlerControl->GetParent(); - if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) ) - return; - - wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); - panelHandler->OnItemRightClick(handlerControl, x, y, keys); -} - - diff --git a/utils/dialoged/src/dlghndlr.h b/utils/dialoged/src/dlghndlr.h deleted file mode 100644 index 948261a22e..0000000000 --- a/utils/dialoged/src/dlghndlr.h +++ /dev/null @@ -1,138 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dlghndlr.h -// Purpose: Dialog handler -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _DLGHNDLR_H_ -#define _DLGHNDLR_H_ - -#define wxDRAG_MODE_NONE 0 -#define wxDRAG_MODE_START_LEFT 1 -#define wxDRAG_MODE_CONTINUE_LEFT 2 -#define wxDRAG_MODE_START_RIGHT 3 -#define wxDRAG_MODE_CONTINUE_RIGHT 4 -#define wxDRAG_TYPE_NONE 0 -#define wxDRAG_TYPE_ITEM 100 - -#define wxKEY_SHIFT 1 -#define wxKEY_CTRL 2 - -class wxResourceEditorDialogHandler: public wxEvtHandler -{ -DECLARE_CLASS(wxResourceEditorDialogHandler) - public: - wxResourceManager *resourceManager; - wxPanel *handlerDialog; - wxItemResource *handlerResource; - wxEvtHandler *handlerOldHandler; - - wxControl *dragItem; - int dragMode; - int dragType; - int dragTolerance; - bool checkTolerance; - int firstDragX; - int firstDragY; - int oldDragX; - int oldDragY; - bool m_mouseCaptured; -// long m_treeItem; - - wxResourceEditorDialogHandler(wxPanel *dialog, wxItemResource *resource, wxEvtHandler *oldHandler, - wxResourceManager *manager); - ~wxResourceEditorDialogHandler(void); - - void OnPaint(wxPaintEvent& event); - void OnMouseEvent(wxMouseEvent& event); - - virtual void OnItemEvent(wxControl *win, wxMouseEvent& event); - virtual void OnLeftClick(int x, int y, int keys); - virtual void OnRightClick(int x, int y, int keys); - virtual void OnItemLeftClick(wxControl *item, int x, int y, int keys); - virtual void OnItemRightClick(wxControl *item, int x, int y, int keys); - virtual void OnItemSelect(wxControl *item, bool select); - virtual void OnItemMove( - wxControl *WXUNUSED(item), int WXUNUSED(x), int WXUNUSED(y) ) {}; - virtual void OnItemSize( - wxControl *WXUNUSED(item), int WXUNUSED(w), int WXUNUSED(h) ) {}; - - void AddChildHandlers(void); - void PaintSelectionHandles(wxDC& dc); - void ProcessItemEvent(wxControl *item, wxMouseEvent& event, int selectionHandle); - -// Accessors -/* - inline long GetTreeItem() const { return m_treeItem; } - inline void SetTreeItem(long item) { m_treeItem = item; } -*/ - -DECLARE_EVENT_TABLE() -}; - -class wxResourceEditorControlHandler: public wxEvtHandler -{ -DECLARE_CLASS(wxResourceEditorControlHandler) - public: -// wxResourceManager *resourceManager; - wxControl *handlerControl; -// wxItemResource *handlerResource; - wxEvtHandler *handlerOldHandler; - - bool isSelected; - int handleSize; // selection handle size - int handleMargin; // Distance between item edge and handle edge - long m_treeItem; - static int dragOffsetX; // Distance between pointer at start of drag and - static int dragOffsetY; // top-left of item - - wxResourceEditorControlHandler(wxControl *control, wxEvtHandler *oldHandler); - ~wxResourceEditorControlHandler(void); - - void OnMouseEvent(wxMouseEvent& event); - - // Manipulation and drawing of items in Edit Mode - - // Calculate position of the 8 handles - virtual void CalcSelectionHandles(int *hx, int *hy); - virtual void DrawSelectionHandles(wxDC& dc, bool erase = FALSE); - virtual void DrawBoundingBox(wxDC& dc, int x, int y, int w, int h); - virtual void SelectItem(bool select); - virtual inline bool IsSelected(void) { return isSelected; } - - // Returns TRUE or FALSE - virtual bool HitTest(int x, int y); - - // Returns 0 (no hit), 1 - 8 for which selection handle - // (clockwise from top middle) - virtual int SelectionHandleHitTest(int x, int y); - - // If selectionHandle is zero, not dragging the selection handle. - virtual void OnDragBegin(int x, int y, int keys, wxDC& dc, int selectionHandle); - virtual void OnDragContinue(bool paintIt, int x, int y, int keys, wxDC& dc, int selectionHandle); - virtual void OnDragEnd(int x, int y, int keys, wxDC& dc, int selectionHandle); - - // These functions call panel functions - // by default. - virtual void OldOnMove(int x, int y); - virtual void OldOnSize(int w, int h); - virtual void OnLeftClick(int x, int y, int keys); - virtual void OnRightClick(int x, int y, int keys); - virtual void OnSelect(bool select); - -// Accessors -/* - inline long GetTreeItem() const { return m_treeItem; } - inline void SetTreeItem(long item) { m_treeItem = item; } -*/ - -DECLARE_EVENT_TABLE() -}; - -#endif - diff --git a/utils/dialoged/src/edlist.cpp b/utils/dialoged/src/edlist.cpp deleted file mode 100644 index 087736aaf4..0000000000 --- a/utils/dialoged/src/edlist.cpp +++ /dev/null @@ -1,167 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: edlist.cpp -// Purpose: Resource editor project management tree -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "edlist.h" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" - -#include "wx/checkbox.h" -#include "wx/button.h" -#include "wx/choice.h" -#include "wx/listbox.h" -#include "wx/radiobox.h" -#include "wx/statbox.h" -#include "wx/gauge.h" -#include "wx/slider.h" -#include "wx/textctrl.h" -#endif - -#include "edlist.h" -#include "reseditr.h" - -BEGIN_EVENT_TABLE(wxResourceEditorControlList, wxListCtrl) -END_EVENT_TABLE() - -wxResourceEditorControlList::wxResourceEditorControlList(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style): - wxListCtrl(parent, id, pos, size, style), m_imageList(16, 16, TRUE) -{ - Initialize(); -} - -wxResourceEditorControlList::~wxResourceEditorControlList() -{ - SetImageList(NULL, wxIMAGE_LIST_SMALL); -} - -// Load icons and add to the list -void wxResourceEditorControlList::Initialize() -{ -#ifdef __WXMSW__ - wxIcon icon1("ARROW_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon2("BUTTON_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon3("BMPBUTTON_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon4("STATICTEXT_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon5("STATICBMP_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon6("STATICBOX_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon7("TEXTSING_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon8("TEXTMULT_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon9("LISTBOX_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon10("CHOICE_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon11("COMBOBOX_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon12("CHECKBOX_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon13("SLIDER_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon14("GAUGE_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon15("RADIOBOX_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon16("RADIOBTN_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon17("SCROLBAR_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); -#else - -#include "bitmaps/arrow.xpm" - wxIcon icon1( arrow_xpm ); -#include "bitmaps/button.xpm" - wxIcon icon2( button_xpm ); -#include "bitmaps/bmpbuttn.xpm" - wxIcon icon3( bmpbuttn_xpm ); -#include "bitmaps/stattext.xpm" - wxIcon icon4( stattext_xpm ); -#include "bitmaps/statbmp.xpm" - wxIcon icon5( statbmp_xpm ); -#include "bitmaps/statbox.xpm" - wxIcon icon6( statbox_xpm ); -#include "bitmaps/textsing.xpm" - wxIcon icon7( textsing_xpm ); -#include "bitmaps/textmult.xpm" - wxIcon icon8( textmult_xpm ); -#include "bitmaps/listbox.xpm" - wxIcon icon9( listbox_xpm ); -#include "bitmaps/choice.xpm" - wxIcon icon10( choice_xpm ); -#include "bitmaps/combobox.xpm" - wxIcon icon11( combobox_xpm ); -#include "bitmaps/checkbox.xpm" - wxIcon icon12( checkbox_xpm ); -#include "bitmaps/slider.xpm" - wxIcon icon13( slider_xpm ); -#include "bitmaps/gauge.xpm" - wxIcon icon14( gauge_xpm ); -#include "bitmaps/radiobox.xpm" - wxIcon icon15( radiobox_xpm ); -#include "bitmaps/radiobtn.xpm" - wxIcon icon16( radiobtn_xpm ); -#include "bitmaps/scrolbar.xpm" - wxIcon icon17( scrolbar_xpm ); -#endif - - m_imageList.Add(icon1); - m_imageList.Add(icon2); - m_imageList.Add(icon3); - m_imageList.Add(icon4); - m_imageList.Add(icon5); - m_imageList.Add(icon6); - m_imageList.Add(icon7); - m_imageList.Add(icon8); - m_imageList.Add(icon9); - m_imageList.Add(icon10); - m_imageList.Add(icon11); - m_imageList.Add(icon12); - m_imageList.Add(icon13); - m_imageList.Add(icon14); - m_imageList.Add(icon15); - m_imageList.Add(icon16); - m_imageList.Add(icon17); - - SetImageList(& m_imageList, wxIMAGE_LIST_SMALL); - - long id = InsertItem(0, "Pointer", 0); - id = InsertItem(1, "wxButton", 1); - id = InsertItem(2, "wxBitmapButton", 2); - id = InsertItem(3, "wxStaticText", 3); - id = InsertItem(4, "wxStaticBitmap", 4); - id = InsertItem(5, "wxStaticBox", 5); - id = InsertItem(6, "wxTextCtrl", 6); - id = InsertItem(7, "wxTextCtrl", 7); - id = InsertItem(8, "wxListBox", 8); - id = InsertItem(9, "wxChoice", 9); - id = InsertItem(10, "wxComboBox", 10); - id = InsertItem(11, "wxCheckBox", 11); - id = InsertItem(12, "wxSlider", 12); - id = InsertItem(13, "wxGauge", 13); - id = InsertItem(14, "wxRadioBox", 14); - id = InsertItem(15, "wxRadioButton", 15); - id = InsertItem(16, "wxScrollBar", 16); - -/* - InsertItem(RESED_TREECTRL, "wxTreeCtrl", 16); - InsertItem(RESED_LISTCTRL, "wxListCtrl", 17); - InsertItem(RESED_SPINBUTTON, "wxSpinButton", 18); -*/ - -// SetColumnWidth(-1, 80); -} - -// Get selection, or -1 -long wxResourceEditorControlList::GetSelection() const -{ - return GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); -} - - diff --git a/utils/dialoged/src/edlist.h b/utils/dialoged/src/edlist.h deleted file mode 100644 index 9777c01355..0000000000 --- a/utils/dialoged/src/edlist.h +++ /dev/null @@ -1,38 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: edlist.h -// Purpose: Resource editor list of controls -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _EDLIST_H_ -#define _EDLIST_H_ - -#include -#include - -class wxResourceEditorControlList: public wxListCtrl -{ -public: - wxResourceEditorControlList(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style = wxLC_SMALL_ICON|wxLC_AUTOARRANGE|wxLC_SINGLE_SEL); - ~wxResourceEditorControlList(); - - // Load icons and add to the list - void Initialize(); - - // Get selection, or -1 - long GetSelection() const; - -DECLARE_EVENT_TABLE() - -protected: - wxImageList m_imageList; -}; - -#endif - diff --git a/utils/dialoged/src/edtree.cpp b/utils/dialoged/src/edtree.cpp deleted file mode 100644 index a445963b7d..0000000000 --- a/utils/dialoged/src/edtree.cpp +++ /dev/null @@ -1,92 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: edtree.cpp -// Purpose: Resource editor project management tree -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "edtree.h" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" - -#include "wx/checkbox.h" -#include "wx/button.h" -#include "wx/choice.h" -#include "wx/listbox.h" -#include "wx/radiobox.h" -#include "wx/statbox.h" -#include "wx/gauge.h" -#include "wx/slider.h" -#include "wx/textctrl.h" -#endif - -#include "edtree.h" -#include "reseditr.h" - -BEGIN_EVENT_TABLE(wxResourceEditorProjectTree, wxTreeCtrl) - EVT_LEFT_DCLICK(wxResourceEditorProjectTree::LeftDClick) - EVT_TREE_SEL_CHANGED(IDC_TREECTRL, wxResourceEditorProjectTree::OnSelChanged) -END_EVENT_TABLE() - -wxResourceEditorProjectTree::wxResourceEditorProjectTree(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style): - wxTreeCtrl(parent, id, pos, size, style) -{ -} - -void wxResourceEditorProjectTree::LeftDClick(wxMouseEvent& event) -{ -#if 0 - long sel = GetSelection(); - if (sel == -1) - return; - - if (GetItemData(sel) == 0) - return; - - wxItemResource* res = (wxItemResource*) GetItemData(sel); - wxString resType(res->GetType()); - if (resType != "wxDialog" && resType != "wxDialogBox" && resType != "wxPanel") - return; - - wxResourceEditorFrame *frame = (wxResourceEditorFrame *)wxWindow::GetParent(); - wxResourceManager *manager = frame->manager; - - manager->EditSelectedResource(); -#endif -} - -void wxResourceEditorProjectTree::OnSelChanged(wxTreeEvent& event) -{ - long sel = GetSelection(); - if (sel == -1) - return; - - if (GetItemData(sel) == 0) - return; - - if (m_invalid) - return; - - wxItemResource* res = (wxItemResource*) GetItemData(sel); - wxString resType(res->GetType()); - if (resType != "wxDialog" && resType != "wxDialogBox" && resType != "wxPanel") - return; - - wxResourceManager::GetCurrentResourceManager()->Edit(res); -} - diff --git a/utils/dialoged/src/edtree.h b/utils/dialoged/src/edtree.h deleted file mode 100644 index 3928c5aa7d..0000000000 --- a/utils/dialoged/src/edtree.h +++ /dev/null @@ -1,36 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: edtree.h -// Purpose: Resource editor project management tree control -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _EDTREE_H_ -#define _EDTREE_H_ - -#include - -class wxResourceEditorProjectTree: public wxTreeCtrl -{ -public: - wxResourceEditorProjectTree(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style = wxTR_HAS_BUTTONS); - - void LeftDClick(wxMouseEvent& event); - void OnSelChanged(wxTreeEvent& event); - - inline void SetInvalid(bool invalid) { m_invalid = invalid; } - -protected: - bool m_invalid; // While TRUE, don't respond to selections etc. - -DECLARE_EVENT_TABLE() - -}; - -#endif - diff --git a/utils/dialoged/src/makefile.b32 b/utils/dialoged/src/makefile.b32 deleted file mode 100644 index 775201c4ae..0000000000 --- a/utils/dialoged/src/makefile.b32 +++ /dev/null @@ -1,69 +0,0 @@ -# -# File: makefile.b32 -# Author: Patrick Halke -# Created: 1995 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds Dialog Editor (32-bit Borland) - -# WXWIN and BCCDIR are set by parent make - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIBDIR = $(WXDIR)\lib -WXINC = $(WXDIR)\include\msw -WXBASESRC = $(WXDIR)\src\base -WXBASEINC = $(WXDIR)\include\base -WXLIB = $(WXLIBDIR)\wx32.lib -WXPROPDIR = $(WXDIR)\utils\wxprop -WXPROPINC = $(WXPROPDIR)\src -WXPROPLIB = $(WXDIR)\lib\wxprop.lib -LIBS=$(WXLIB) $(WXPROPLIB) cw32 import32 -INCFILE = includes.cfg - -TARGET=dialoged - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) @$(INCFILE) - -OBJECTS = dialoged.obj reseditr.obj dlghndlr.obj reswrite.obj winprop.obj edtree.obj edlist.obj symbtable.obj winstyle.obj - -$(TARGET).exe: wxprop $(INCFILE) $(OBJECTS) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -$(TARGET) -nul -$(LIBS) -$(TARGET).def -! - brc32 -K $(TARGET).res - -$(INCFILE): $(MAKEFILENAME) - copy &&! --I..\..\wxprop\src -! $(INCFILE) - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa $(TARGET) - -wxprop: - cd $(WXPROPDIR)\src - make -f makefile.b32 - cd $(WXDIR)\utils\dialoged\src - -clean: - -erase *.obj *.exe *.res *.map *.rws - - diff --git a/utils/dialoged/src/makefile.bcc b/utils/dialoged/src/makefile.bcc deleted file mode 100644 index 0214c54986..0000000000 --- a/utils/dialoged/src/makefile.bcc +++ /dev/null @@ -1,87 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds Dialog Editor (Borland, 16-bit) - -!if "$(BCCDIR)" == "" -!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 -!endif - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -!ifndef FINAL -FINAL=0 -!endif - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makebcc.env - -THISDIR = $(WXDIR)\utils\dialoged\src -WXLIB = $(WXDIR)\lib\wx.lib -WXPROPDIR = $(WXDIR)\utils\wxprop -WXPROPINC = $(WXPROPDIR)\src -WXPROPLIB = $(WXPROPDIR)\lib\wxprop.lib - -LIBS=$(WXLIB) $(WXPROPLIB) mathwl cwl import -INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw -CFG=$(WXDIR)\src\wxwin.cfg -INCFILE = includes.cfg - - -!if "$(FINAL)" == "0" -LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -O2 -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) @$(INCFILE) - -OBJECTS = wx_resed.obj wx_rdlg.obj wx_reswr.obj wx_repal.obj wx_rprop.obj dialoged.obj - -all: dialoged.exe - -dialoged.exe: $(INCFILE) $(WXLIB) $(OBJECTS) dialoged.def dialoged.res - tlink $(LINKFLAGS) @&&! -c0wl.obj $(OBJECTS) -dialoged -nul -$(LIBS) $(WXPROPLIB) -dialoged.def -! - rc -30 -K dialoged.res - -.$(SRCSUFF).obj: - bcc $(CPPFLAGS) -c {$< } - -dialoged.obj: dialoged.$(SRCSUFF) wx_resed.h -wx_resed.obj: wx_resed.$(SRCSUFF) wx_resed.h wx_rprop.h -wx_resed.obj: wx_rdlg.$(SRCSUFF) wx_resed.h wx_rprop.h -wx_rprop.obj: wx_rprop.$(SRCSUFF) wx_resed.h wx_rprop.h -wx_reswr.obj: wx_reswr.$(SRCSUFF) wx_resed.h -wx_repal.obj: wx_repal.$(SRCSUFF) wx_repal.h - -dialoged.res : dialoged.rc $(WXDIR)\include\msw\wx.rc - rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa dialoged - -$(INCFILE): $(MAKEFILENAME) - copy &&! --I..\..\wxprop\src -! $(INCFILE) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws diff --git a/utils/dialoged/src/makefile.dos b/utils/dialoged/src/makefile.dos deleted file mode 100644 index e32a94e8dd..0000000000 --- a/utils/dialoged/src/makefile.dos +++ /dev/null @@ -1,193 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1995 -# Updated: -# Copyright: (c) 1995, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds docview example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\utils\dialoged\src -WXLIB = $(WXDIR)\lib\wx.lib - -DOCDIR = $(WXDIR)\utils\dialoged\docs - -PROPDIR = $(WXDIR)\utils\wxprop -PROPINC = $(PROPDIR)\src -PROPLIB = $(PROPDIR)\lib\wxprop.lib - -TREEDIR = $(WXDIR)\utils\wxtree -TREEINC = $(TREEDIR)\src -TREELIB = $(TREEDIR)\lib\wxtree.lib - -DIBDIR = $(WXDIR)\utils\dib -DIBLIB = $(DIBDIR)\dib.lib -DIBINC = $(DIBDIR) - -RCDIR = $(WXDIR)\utils\rcparser -RCLIB = $(RCDIR)\lib\rcparser.lib -RCINC = $(RCDIR)\src - -LIBS=$(WXLIB) $(PROPLIB) oldnames libw llibcew commdlg shell ddeml -INC=/I$(WXDIR)\include\base /I$(WXDIR)\include\msw /I$(PROPINC) - -!ifndef FINAL -FINAL=0 -!endif - -# Default is to output RTF for WinHelp -!ifndef RTFSTYLE -RTFSTYLE=-winhelp -!endif - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!if "$(FINAL)" == "0" -CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od /DDEBUG=$(DEBUG) /YuWX_PREC.H $(INC) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch -LINKFLAGS=/NOD /CO /SEG:512 /ONERROR:NOEXE -!else -CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H $(INC) /DDEBUG=$(DEBUG) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch -LINKFLAGS=/NOD /SEG:512 /ONERROR:NOEXE -!endif - -OBJECTS = dialoged.obj wx_resed.obj wx_rdlg.obj wx_reswr.obj wx_repal.obj wx_rprop.obj - -all: prop dialoged.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -dialoged.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) $(PROPLIB) dialoged.def dialoged.res - link $(LINKFLAGS) @<< -$(WXDIR)\src\msw\dummy.obj $(OBJECTS), -dialoged, -NUL, -$(LIBS), -dialoged.def -; -<< - rc -30 -K dialoged.res - -dialoged.obj: dialoged.h $(PROPINC)\wx_prop.h wx_resed.h wx_rprop.h dialoged.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -wx_resed.obj: wx_resed.h $(PROPINC)\wx_prop.h wx_resed.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -wx_rdlg.obj: wx_resed.h $(PROPINC)\wx_prop.h wx_rdlg.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -wx_reswr.obj: wx_resed.h wx_reswr.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -wx_rprop.obj: wx_resed.h $(PROPINC)\wx_prop.h wx_rprop.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -wx_repal.obj: wx_resed.h $(PROPINC)\wx_prop.h wx_repal.h wx_repal.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -dialoged.res : dialoged.rc $(WXDIR)\include\msw\wx.rc - rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw dialoged - -wxtree: - cd $(TREEDIR)\src - nmake -f makefile.dos FINAL="$(FINAL)" OPT="$(OPT)" - cd $(THISDIR) - -dib: - cd $(DIBDIR) - nmake -f makefile.dos FINAL="$(FINAL)" OPT="$(OPT)" - cd $(THISDIR) - -prop: - cd $(PROPDIR)\src - nmake -f makefile.dos FINAL="$(FINAL)" OPT="$(OPT)" - cd $(THISDIR) - -# Making documents -docs: hlp -hlp: $(DOCDIR)/dialoged.hlp -hlp32: $(DOCDIR)/hlp32/dialoged.hlp -rtf: $(DOCDIR)/dialoged.rtf - -$(DOCDIR)/dialoged.hlp: $(DOCDIR)/dialoged.rtf $(DOCDIR)/dialoged.hpj - cd $(DOCDIR) - -erase dialoged.ph - hc dialoged - cd $(THISDIR) - -$(DOCDIR)/hlp32/dialoged.hlp: $(DOCDIR)/hlp32/dialoged.rtf $(DOCDIR)/hlp32/dialoged.hpj - cd $(DOCDIR)/hlp32 - -erase dialoged.ph - -wx /W hcw /c /e clockwrk.hpj - cd $(THISDIR) - -$(DOCDIR)/dialoged.rtf: $(DOCDIR)/body.tex $(DOCDIR)/classes.tex $(DOCDIR)/tech.tex $(DOCDIR)/dialoged.tex - cd $(DOCDIR) - -wx /W tex2rtf $(DOCDIR)/dialoged.tex $(DOCDIR)/dialoged.rtf -twice $(RTFSTYLE) - cd $(THISDIR) - -$(DOCDIR)/hlp32/dialoged.rtf: $(DOCDIR)/body.tex $(DOCDIR)/classes.tex $(DOCDIR)/body.tex $(DOCDIR)/dialoged.tex - cd $(DOCDIR) - -wx /W tex2rtf $(DOCDIR)/dialoged.tex $(DOCDIR)/hlp32/dialoged.rtf -twice $(RTFSTYLE) -macros $(DOCDIR)/t2rtf32.ini - cd $(THISDIR) - -wordrtf: - cd $(DOCDIR) - -wx /W tex2rtf $(DOCDIR)/dialoged.tex $(DOCDIR)/dialoged.rtf -twice -rtf - cd $(THISDIR) - -cleanprop: - cd $(PROPDIR)\src - nmake -f makefile.dos clean - cd $(THISDIR) - -rcparser: - cd $(RCDIR)\src - nmake -f makefile.dos FINAL=$(FINAL) OPT=$(OPT) - cd $(THISDIR) - -cleanrtf: - cd $(DOCDIR) - -erase *.rtf - cd $(THISDIR) - -cleanutils: cleanprop - -erase *.obj - -erase *.sbr - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb - -clean: - -erase *.obj *.exe *.res *.map *.rws diff --git a/utils/dialoged/src/makefile.g95 b/utils/dialoged/src/makefile.g95 deleted file mode 100644 index 06db47a2fb..0000000000 --- a/utils/dialoged/src/makefile.g95 +++ /dev/null @@ -1,71 +0,0 @@ -# -# File: makefile.g95 -# Author: Julian Smart -# Created: 1996 -# Updated: -# -# "%W% %G%" -# -# Makefile for Dialog Editor (GNU-WIN32) - -WXDIR = ../../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/dialoged.$(OBJSUFF) $(OBJDIR)/reseditr.$(OBJSUFF)\ - $(OBJDIR)/dlghndlr.$(OBJSUFF) $(OBJDIR)/reswrite.$(OBJSUFF) $(OBJDIR)/winprop.$(OBJSUFF)\ - $(OBJDIR)/edlist.$(OBJSUFF) $(OBJDIR)/edtree.$(OBJSUFF) $(OBJDIR)/winstyle.$(OBJSUFF) $(OBJDIR)/symbtabl.$(OBJSUFF)\ - $(OBJDIR)/dialoged_resources.$(OBJSUFF) - -EXTRAINC = -I../../wxprop/src - -LDFLAGS = -Wl,--subsystem,windows -mwindows -L$(WXDIR)/lib -L../../wxprop/lib -LDLIBS=-lwxprop $(LIBS) - -CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(WARN) $(OPT) $(EXTRAINC) - -all: $(OBJDIR) wxprop dialoged$(GUISUFFIX)$(EXESUFF) - -wxprop: - cd ../../wxprop/src; $(MAKE) -f makefile.g95 - -$(OBJDIR): - mkdir $(OBJDIR) - -dialoged$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o dialoged$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(XVIEW_LINK) $(LDLIBS) - -$(OBJDIR)/dialoged.$(OBJSUFF): dialoged.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ dialoged.$(SRCSUFF) - -$(OBJDIR)/winprop.$(OBJSUFF): winprop.h reseditr.h editrpal.h winprop.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ winprop.$(SRCSUFF) - -$(OBJDIR)/reswrite.$(OBJSUFF): winprop.h reseditr.h editrpal.h reswrite.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ reswrite.$(SRCSUFF) - -$(OBJDIR)/reseditr.$(OBJSUFF): winprop.h reseditr.h editrpal.h reseditr.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ reseditr.$(SRCSUFF) - -$(OBJDIR)/dlghndlr.$(OBJSUFF): winprop.h reseditr.h editrpal.h dlghndlr.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ dlghndlr.$(SRCSUFF) - -$(OBJDIR)/edlist.$(OBJSUFF): winprop.h edlist.h edlist.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ edlist.$(SRCSUFF) - -$(OBJDIR)/edtree.$(OBJSUFF): winprop.h edtree.h edtree.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ edtree.$(SRCSUFF) - -$(OBJDIR)/winstyle.$(OBJSUFF): winstyle.h winstyle.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ edtree.$(SRCSUFF) - -$(OBJDIR)/symbtabl.$(OBJSUFF): symbtabl.h symbtabl.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ edtree.$(SRCSUFF) - -$(OBJDIR)/dialoged_resources.o: dialoged.rc - $(RESCOMP) -i dialoged.rc -o $(OBJDIR)/dialoged_resources.o $(RESFLAGS) - -clean: - rm -f $(OBJECTS) dialoged$(GUISUFFIX).exe core *.rsc *.res diff --git a/utils/dialoged/src/makefile.nt b/utils/dialoged/src/makefile.nt deleted file mode 100644 index 0dddc41986..0000000000 --- a/utils/dialoged/src/makefile.nt +++ /dev/null @@ -1,171 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds wxProperty classes library (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) -THISDIR = $(WXDIR)\utils\dialoged\src -PROPDIR = $(WXDIR)\utils\wxprop -PROPLIB=$(PROPDIR)\lib\wxprop.lib -EXTRALIBS=$(PROPDIR)\lib\wxprop.lib -EXTRAINC=/I$(PROPDIR)\src -DOCDIR=$(WXDIR)\docs -LOCALDOCDIR=$(WXDIR)\utils\dialoged\docs - -!include $(WXDIR)\src\ntwxwin.mak - -PROGRAM=dialoged - -OBJECTS = dialoged.obj reseditr.obj dlghndlr.obj reswrite.obj\ - winprop.obj edtree.obj edlist.obj symbtabl.obj winstyle.obj - -all: wxprop dialoged.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROPLIB) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - -dialoged.obj: winprop.h reseditr.h dialoged.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -winprop.obj: winprop.h reseditr.h winprop.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -reswrite.obj: winprop.h reseditr.h reswrite.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -reseditr.obj: winprop.h reseditr.h reseditr.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -edtree.obj: winprop.h reseditr.h edtree.h edtree.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -edlist.obj: winprop.h reseditr.h edlist.h edlist.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -dlghndlr.obj: winprop.h reseditr.h dlghndlr.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -symbtabl.obj: symbtabl.h symbtabl.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -winstyle.obj: winstyle.h winstyle.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - -wxprop: - cd $(PROPDIR)\src - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -clean_wxprop: - cd $(PROPDIR)\src - nmake -f makefile.nt clean - cd $(THISDIR) - -clean: - -erase *.obj - -erase *.sbr - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb - -cleanutils: clean clean_wxprop - -DOCSOURCES=$(LOCALDOCDIR)\dialoged.tex $(LOCALDOCDIR)\body.tex\ - $(LOCALDOCDIR)\bugs.tex $(LOCALDOCDIR)\changes.tex\ - $(LOCALDOCDIR)\classes.tex $(LOCALDOCDIR)\tech.tex - -html: $(DOCDIR)\html\dialoged\dlged.htm -hlp: $(DOCDIR)\winhelp\dialoged.hlp -pdfrtf: $(DOCDIR)\pdf\dialoged.rtf -ps: $(DOCDIR)\ps\dialoged.ps - -$(DOCDIR)\winhelp\dialoged.hlp: $(LOCALDOCDIR)\dialoged.rtf $(LOCALDOCDIR)\dialoged.hpj - cd $(LOCALDOCDIR) - -erase dialoged.ph - hc dialoged - move dialoged.hlp $(DOCDIR)\winhelp\dialoged.hlp - move dialoged.cnt $(DOCDIR)\winhelp\dialoged.cnt - cd $(THISDIR) - -$(LOCALDOCDIR)\dialoged.rtf: $(DOCSOURCES) - cd $(LOCALDOCDIR) - -start /w tex2rtf $(LOCALDOCDIR)\dialoged.tex $(LOCALDOCDIR)\dialoged.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)\pdf\dialoged.rtf: $(DOCSOURCES) - cd $(LOCALDOCDIR) - -copy *.bmp *.wmf $(DOCDIR)\pdf - -start /w tex2rtf $(LOCALDOCDIR)\dialoged.tex $(DOCDIR)\pdf\dialoged.rtf -twice -rtf - cd $(THISDIR) - -$(DOCDIR)\html\dialoged\dlged.htm: $(DOCSOURCES) - cd $(LOCALDOCDIR) - -mkdir $(DOCDIR)\html\dialoged - -start /w tex2rtf $(LOCALDOCDIR)\dialoged.tex $(DOCDIR)\html\dialoged\dlged.htm -twice -html - -erase $(DOCDIR)\html\dialoged\*.con - -erase $(DOCDIR)\html\dialoged\*.ref - cd $(THISDIR) - -$(LOCALDOCDIR)\dialoged.dvi: $(DOCSOURCES) - cd $(LOCALDOCDIR) - -latex dialoged - -latex dialoged - -makeindx dialoged - -bibtex dialoged - -latex dialoged - -latex dialoged - cd $(THISDIR) - -$(WXDIR)\docs\ps\dialoged.ps: $(LOCALDOCDIR)\dialoged.dvi - cd $(LOCALDOCDIR) - -dvips32 -o dialoged.ps dialoged - move dialoged.ps $(WXDIR)\docs\ps\dialoged.ps - cd $(THISDIR) - - diff --git a/utils/dialoged/src/makefile.sc b/utils/dialoged/src/makefile.sc deleted file mode 100644 index 5099033cae..0000000000 --- a/utils/dialoged/src/makefile.sc +++ /dev/null @@ -1,36 +0,0 @@ -# Symantec C++ makefile for Dialog Editor - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makesc.env - -WXLIB = $(WXDIR)\lib\wx.lib -INCDIR = $(WXDIR)\include -MSWINC = $(INCDIR)\msw -BASEINC = $(INCDIR)\base - -CC=sc -RC=rc -CFLAGS = -o -ml -W -Dwx_msw -LDFLAGS = -ml -W - -INCLUDE=$(BASEINC);$(MSWINC) -OBJECTS = wx_resed.obj wx_rdlg.obj wx_reswr.obj wx_repal.obj wx_rprop.obj dialoged.obj - -LIBS=$(WXLIB) libw.lib commdlg.lib shell.lib - -.$(SRCSUFF).obj: - *$(CC) -c $(CFLAGS) -I$(INCLUDE) $< - -.rc.res: - *$(RC) -r -I$(INCLUDE) $< - -dialoged.exe: $(OBJECTS) dialoged.def dialoged.res - *$(CC) $(LDFLAGS) -o$@ $(OBJECTS) dialoged.def $(LIBS) - *$(RC) -k dialoged.res - -clean: - -del *.obj - -del *.exe - -del *.res - -del *.map - -del *.rws diff --git a/utils/dialoged/src/makefile.unx b/utils/dialoged/src/makefile.unx deleted file mode 100644 index f87d66aab0..0000000000 --- a/utils/dialoged/src/makefile.unx +++ /dev/null @@ -1,123 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for dialoged example (UNIX). - -WXDIR = ../../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/make.env - -WXPROPDIR = $(WXDIR)/utils/wxprop -WXPROPINC = $(WXDIR)/utils/wxprop/src -WXPROPLIB = $(WXDIR)/utils/wxprop/lib - -DIALOGEDDIR = $(WXDIR)/utils/dialoged - -OBJECTS = $(OBJDIR)/dialoged.o $(OBJDIR)/wx_repal.o $(OBJDIR)/wx_resed.o $(OBJDIR)/wx_rdlg.o $(OBJDIR)/wx_reswr.o $(OBJDIR)/wx_rprop.o - - -INC = $(COMPPATHS) -I$(WXDIR)/include/x -I$(WXDIR)/include/base -I$(WXPROPINC) - -XVIEWLDLIBS = -lwxprop_ol -lwx_ol -lxview -lolgx -lX11 -lm $(COMPLIBS) -MOTIFLDLIBS = -lwxprop_motif -lwx_motif -lXm -lXt -lX11 -lm $(COMPLIBS) -HPLDLIBS = -lwxprop_hp -lwx_hp -lXm -lXt -lX11 -lm $(HPCOMPLIBS) -# Default -LDLIBS=$(XVIEWLDLIBS) - -CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) -DDEBUG='$(DEBUG)' $(DEBUGFLAGS) $(WARN) $(OPT) -LDFLAGS = $(XLIB) -L$(WXDIR)/lib -L$(WXPROPLIB) - -.SUFFIXES: - -all: $(OBJDIR) dialoged$(GUISUFFIX) - -wx_ol: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview - -wx_motif: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif - -motif: - $(MAKE) -f makefile.unx dialoged_motif GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)'\ - OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' DEBUGFLAGS='$(DEBUGFLAGS)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK= - -xview: - $(MAKE) -f makefile.unx dialoged_ol GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)'\ - DEBUG='$(DEBUG)' DEBUGFLAGS='$(DEBUGFLAGS)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' - -hp: - $(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' DEBUGFLAGS='$(DEBUGFLAGS)' WARN='-w' \ - XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' LDLIBS='$(HPLDLIBS)' - -$(OBJDIR): - mkdir $(OBJDIR) - -dialoged$(GUISUFFIX): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o dialoged$(GUISUFFIX) $(OBJECTS) $(XVIEW_LINK) $(LDLIBS) - -$(OBJDIR)/dialoged.o: dialoged.$(SRCSUFF) dialoged.h - $(CC) -c $(CPPFLAGS) -o $@ dialoged.$(SRCSUFF) - -$(OBJDIR)/wx_rprop.o: wx_rprop.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ wx_rprop.$(SRCSUFF) - -$(OBJDIR)/wx_resed.o: wx_resed.$(SRCSUFF) wx_resed.h - $(CC) -c $(CPPFLAGS) -o $@ wx_resed.$(SRCSUFF) - -$(OBJDIR)/wx_rdlg.o: wx_rdlg.$(SRCSUFF) wx_resed.h - $(CC) -c $(CPPFLAGS) -o $@ wx_rdlg.$(SRCSUFF) - -$(OBJDIR)/wx_repal.o: wx_repal.$(SRCSUFF) wx_repal.h - $(CC) -c $(CPPFLAGS) -o $@ wx_repal.$(SRCSUFF) - -$(OBJDIR)/wx_reswr.o: wx_reswr.$(SRCSUFF) wx_resed.h - $(CC) -c $(CPPFLAGS) -o $@ wx_reswr.$(SRCSUFF) - -wxprop_motif: - cd $(WXPROPDIR)/src; $(MAKE) -f makefile.unx motif OPT='$(OPT)' - -wxprop_ol: - cd $(WXPROPDIR)/src - $(MAKE) -f makefile.unx xview OPT='$(OPT)' - -clean_motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany - -clean_ol: - $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany - -clean_hp: - $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany - -cleanany: - rm -f $(OBJECTS) $(TESTOBJECTS) test$(GUISUFFIX) dialoged$(GUISUFFIX) core - -HTMLDIR=/home/hardy/html/wx/manuals -docs: ps xlp -ps: $(DIALOGEDDIR)/docs/dialoged.ps -xlp: $(DIALOGEDDIR)/docs/dialoged.xlp -html: $(HTMLDIR)/dialoged/dialoged_contents.html - -$(DIALOGEDDIR)/docs/dialoged.xlp: $(DIALOGEDDIR)/docs/dialoged.tex $(DIALOGEDDIR)/docs/classes.tex $(DIALOGEDDIR)/docs/body.tex $(DIALOGEDDIR)/docs/tech.tex - cd ../docs; tex2rtf dialoged.tex tmp.xlp -xlp -twice - sed -e "s/WXHELPCONTENTS/wxChart Manual/g" < $(DIALOGEDDIR)/docs/tmp.xlp > $(DIALOGEDDIR)/docs/dialoged.xlp - /bin/rm -f $(DIALOGEDDIR)/docs/tmp.xlp - -$(HTMLDIR)/dialoged/dialoged_contents.html: $(DIALOGEDDIR)/docs/dialoged.tex $(DIALOGEDDIR)/docs/body.tex $(DIALOGEDDIR)/docs/tech.tex - cd ../docs; tex2rtf dialoged.tex $(HTMLDIR)/dialoged/dialoged.html -html -twice - -$(DIALOGEDDIR)/docs/dialoged.dvi: $(DIALOGEDDIR)/docs/dialoged.tex $(DIALOGEDDIR)/docs/classes.tex - cd $(DIALOGEDDIR)/docs; latex dialoged; latex dialoged; makeindex dialoged; latex dialoged; latex dialoged - -# makeindex dialoged; bibtex dialoged; latex dialoged; latex dialoged - -$(DIALOGEDDIR)/docs/dialoged.ps: $(DIALOGEDDIR)/docs/dialoged.dvi - cd $(DIALOGEDDIR)/docs; dvips -f -r < dialoged.dvi > dialoged.ps diff --git a/utils/dialoged/src/makefile.wat b/utils/dialoged/src/makefile.wat deleted file mode 100644 index 8aa0fcc046..0000000000 --- a/utils/dialoged/src/makefile.wat +++ /dev/null @@ -1,62 +0,0 @@ -# Dialog Editor makefile for Watcom - -WXDIR = ..\..\.. - -# EXTRACPPFLAGS = $(CLIPSFLAGS) - -!include $(WXDIR)\src\makewat.env - -WXPROPDIR = $(WXDIR)\utils\wxprop -WXPROPLIB = $(WXPROPDIR)\lib\wxprop.lib -WXPROPINC = $(WXPROPDIR)\src - -THISDIR = $(WXDIR)\utils\dialoged\src - -NAME = dialoged -LNK = $(name).lnk - -IFLAGS = -i=$(WXINC) -i=$(WXBASEINC) -i=$(WXPROPINC) - -PROGOBJECTS = dialoged.obj wx_resed.obj wx_rdlg.obj wx_reswr.obj wx_repal.obj wx_rprop.obj - -all: wx wxprop erasepch $(PROGOBJECTS) dialoged.exe - -wx: .SYMBOLIC - cd $(WXDIR)\src\msw - wmake -f makefile.wat all - cd $(THISDIR) - -wxprop: .SYMBOLIC - cd $(WXPROPDIR)\src - wmake -f makefile.wat all - cd $(THISDIR) - -$(name).exe : $(PROGOBJECTS) $(name).res $(LNK) $(WXDIR)\lib\wx$(LEVEL).lib $(WXPROPLIB) - wlink @$(LNK) - $(BINDCOMMAND) $(name).res - -$(name).res : $(name).rc $(WXDIR)\include\msw\wx.rc - $(RC) $(RESFLAGS1) /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa $(name).rc - -$(LNK) : makefile.wat - %create $(LNK) - @%append $(LNK) $(DEBUGINFO) - @%append $(LNK) system $(LINKOPTION) - @%append $(LNK) $(MINDATA) - @%append $(LNK) $(MAXDATA) - @%append $(LNK) $(STACK) - @%append $(LNK) name $(name) - @%append $(LNK) file $(WXDIR)\lib\wx$(LEVEL).lib - @%append $(LNK) file $(WXPROPLIB) - @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i - @for %i in ($(PROGOBJECTS)) do @%append $(LNK) file %i - -cleanutils: .SYMBOLIC - cd $(WXPROPDIR)\src - wmake -f makefile.wat clean - cd $(THISDIR) - -clean: .SYMBOLIC - -erase *.obj *.bak *.err *.pch *.lbc *.res - - diff --git a/utils/dialoged/src/reseditr.cpp b/utils/dialoged/src/reseditr.cpp deleted file mode 100644 index cf9467e0d4..0000000000 --- a/utils/dialoged/src/reseditr.cpp +++ /dev/null @@ -1,2346 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: reseditr.cpp -// Purpose: Resource editor class -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "reseditr.h" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" - -#include "wx/checkbox.h" -#include "wx/button.h" -#include "wx/choice.h" -#include "wx/listbox.h" -#include "wx/radiobox.h" -#include "wx/statbox.h" -#include "wx/gauge.h" -#include "wx/slider.h" -#include "wx/textctrl.h" -#include "wx/menu.h" -#include "wx/toolbar.h" -#endif - -#include "wx/scrolbar.h" - -#include -#include -#include -#include - -#if defined(__WXMSW__) && !defined(__GNUWIN32__) -#include -#else -#include -#endif - -#ifdef __WXMSW__ -#include -#endif - -#ifdef __WXMSW__ -#include "wx/help.h" -#endif - -#include "reseditr.h" -#include "winprop.h" -#include "dlghndlr.h" -#include "edtree.h" -#include "edlist.h" - -static void ObjectMenuProc(wxMenu& menu, wxCommandEvent& event); -wxResourceManager *wxResourceManager::sm_currentResourceManager = NULL; - -#ifdef __WXGTK__ -#include "bitmaps/load.xpm" -#include "bitmaps/save.xpm" -#include "bitmaps/new.xpm" -#include "bitmaps/vert.xpm" -#include "bitmaps/alignt.xpm" -#include "bitmaps/alignb.xpm" -#include "bitmaps/horiz.xpm" -#include "bitmaps/alignl.xpm" -#include "bitmaps/alignr.xpm" -#include "bitmaps/copysize.xpm" -#include "bitmaps/tofront.xpm" -#include "bitmaps/toback.xpm" -#include "bitmaps/help.xpm" -#include "bitmaps/wxwin.xpm" -#endif - -/* - * Resource manager - */ - -wxResourceManager::wxResourceManager(): - m_imageList(16, 16, TRUE) -{ - sm_currentResourceManager = this; - m_editorFrame = NULL; - m_editorPanel = NULL; - m_popupMenu = NULL; - m_editorResourceTree = NULL; - m_editorControlList = NULL; - m_nameCounter = 1; - m_symbolIdCounter = 99; - m_modified = FALSE; - m_currentFilename = ""; - m_symbolFilename = ""; - m_editorToolBar = NULL; - - // Default window positions - m_resourceEditorWindowSize.width = 470; - m_resourceEditorWindowSize.height = 300; - - m_resourceEditorWindowSize.x = 0; - m_resourceEditorWindowSize.y = 0; - - m_propertyWindowSize.width = 300; - m_propertyWindowSize.height = 300; - -#ifdef __WXMSW__ - m_helpController = NULL; -#endif - - m_bitmapImage = NULL; - m_rootDialogItem = 0; -} - -wxResourceManager::~wxResourceManager() -{ - sm_currentResourceManager = NULL; - SaveOptions(); - -#ifdef __WXMSW__ - if (m_helpController) - { - m_helpController->Quit(); - delete m_helpController; - m_helpController = NULL; - } -#endif - - delete m_bitmapImage; - delete m_popupMenu; -} - -bool wxResourceManager::Initialize() -{ - // Set up the resource filename for each platform. -#ifdef __WXMSW__ - // dialoged.ini in the Windows directory - char buf[256]; - GetWindowsDirectory(buf, 256); - strcat(buf, "\\dialoged.ini"); - m_optionsResourceFilename = buf; -#elif defined(__WXGTK__) - char buf[500]; - wxGetHomeDir(buf); - strcat(buf, "/.dialogedrc"); - m_optionsResourceFilename = buf; -#else -#error "Unsupported platform." -#endif - - LoadOptions(); - -#ifdef __WXMSW__ - m_helpController = new wxHelpController; - m_helpController->Initialize("dialoged"); -#endif - - m_popupMenu = new wxMenu("", (wxFunction)ObjectMenuProc); - m_popupMenu->Append(OBJECT_MENU_EDIT, "Edit properties"); - m_popupMenu->Append(OBJECT_MENU_DELETE, "Delete object"); - - if (!m_bitmapImage) - { -#ifdef __WXMSW__ - m_bitmapImage = new wxBitmap("WXWINBMP", wxBITMAP_TYPE_BMP_RESOURCE); -#endif -#ifdef __WXGTK__ - m_bitmapImage = new wxBitmap( wxwin_xpm ); -#endif - } - - // Initialize the image list icons -#ifdef __WXMSW__ - wxIcon icon1("DIALOG_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon2("FOLDER1_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon3("FOLDER2_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon4("BUTTONSM_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - m_imageList.Add(icon1); - m_imageList.Add(icon2); - m_imageList.Add(icon3); - m_imageList.Add(icon4); -#endif - - m_symbolTable.AddStandardSymbols(); - - return TRUE; -} - -bool wxResourceManager::LoadOptions() -{ - wxGetResource("DialogEd", "editorWindowX", &m_resourceEditorWindowSize.x, m_optionsResourceFilename.GetData()); - wxGetResource("DialogEd", "editorWindowY", &m_resourceEditorWindowSize.y, m_optionsResourceFilename.GetData()); - wxGetResource("DialogEd", "editorWindowWidth", &m_resourceEditorWindowSize.width, m_optionsResourceFilename.GetData()); - wxGetResource("DialogEd", "editorWindowHeight", &m_resourceEditorWindowSize.height, m_optionsResourceFilename.GetData()); - wxGetResource("DialogEd", "propertyWindowX", &m_propertyWindowSize.x, m_optionsResourceFilename.GetData()); - wxGetResource("DialogEd", "propertyWindowY", &m_propertyWindowSize.y, m_optionsResourceFilename.GetData()); - wxGetResource("DialogEd", "propertyWindowWidth", &m_propertyWindowSize.width, m_optionsResourceFilename.GetData()); - wxGetResource("DialogEd", "propertyWindowHeight", &m_propertyWindowSize.height, m_optionsResourceFilename.GetData()); - return TRUE; -} - -bool wxResourceManager::SaveOptions() -{ - wxWriteResource("DialogEd", "editorWindowX", m_resourceEditorWindowSize.x, m_optionsResourceFilename.GetData()); - wxWriteResource("DialogEd", "editorWindowY", m_resourceEditorWindowSize.y, m_optionsResourceFilename.GetData()); - wxWriteResource("DialogEd", "editorWindowWidth", m_resourceEditorWindowSize.width, m_optionsResourceFilename.GetData()); - wxWriteResource("DialogEd", "editorWindowHeight", m_resourceEditorWindowSize.height, m_optionsResourceFilename.GetData()); - - wxWriteResource("DialogEd", "propertyWindowX", m_propertyWindowSize.x, m_optionsResourceFilename.GetData()); - wxWriteResource("DialogEd", "propertyWindowY", m_propertyWindowSize.y, m_optionsResourceFilename.GetData()); - wxWriteResource("DialogEd", "propertyWindowWidth", m_propertyWindowSize.width, m_optionsResourceFilename.GetData()); - wxWriteResource("DialogEd", "propertyWindowHeight", m_propertyWindowSize.height, m_optionsResourceFilename.GetData()); - - return TRUE; -} - -// Show or hide the resource editor frame, which displays a list -// of resources with ability to edit them. -bool wxResourceManager::ShowResourceEditor(bool show, wxWindow *WXUNUSED(parent), const char *title) -{ - if (show) - { - if (m_editorFrame) - { - m_editorFrame->Iconize(FALSE); - m_editorFrame->Show(TRUE); - return TRUE; - } - m_editorFrame = OnCreateEditorFrame(title); - SetFrameTitle(""); - wxMenuBar *menuBar = OnCreateEditorMenuBar(m_editorFrame); - m_editorFrame->SetMenuBar(menuBar); - - m_editorToolBar = (EditorToolBar *)OnCreateToolBar(m_editorFrame); - m_editorControlList = new wxResourceEditorControlList(m_editorFrame, IDC_LISTCTRL, wxPoint(0, 0), wxSize(-1, -1)); - m_editorResourceTree = new wxResourceEditorProjectTree(m_editorFrame, IDC_TREECTRL, wxPoint(0, 0), wxSize(-1, -1), - wxTR_HAS_BUTTONS); - m_editorPanel = OnCreateEditorPanel(m_editorFrame); - - m_editorResourceTree->SetImageList(& m_imageList); - - // Constraints for toolbar - wxLayoutConstraints *c = new wxLayoutConstraints; - c->left.SameAs (m_editorFrame, wxLeft, 0); - c->top.SameAs (m_editorFrame, wxTop, 0); - c->right.SameAs (m_editorFrame, wxRight, 0); - c->bottom.Unconstrained(); - c->width.Unconstrained(); - c->height.Absolute(28); - m_editorToolBar->SetConstraints(c); - - // Constraints for listbox - c = new wxLayoutConstraints; - c->left.SameAs (m_editorFrame, wxLeft, 0); - c->top.SameAs (m_editorToolBar, wxBottom, 0); - c->right.Absolute (150); - c->bottom.SameAs (m_editorControlList, wxTop, 0); - c->width.Unconstrained(); - c->height.Unconstrained(); - m_editorResourceTree->SetConstraints(c); - - // Constraints for panel - c = new wxLayoutConstraints; - c->left.SameAs (m_editorResourceTree, wxRight, 0); - c->top.SameAs (m_editorToolBar, wxBottom, 0); - c->right.SameAs (m_editorFrame, wxRight, 0); - c->bottom.SameAs (m_editorControlList, wxTop, 0); - c->width.Unconstrained(); - c->height.Unconstrained(); - m_editorPanel->SetConstraints(c); - - // Constraints for control list (bottom window) - c = new wxLayoutConstraints; - c->left.SameAs (m_editorFrame, wxLeft, 0); - c->right.SameAs (m_editorFrame, wxRight, 0); - c->bottom.SameAs (m_editorFrame, wxBottom, 0); - c->width.Unconstrained(); -#ifdef __WXGTK__ - c->height.Absolute(70); -#else - c->height.Absolute(60); -#endif - - m_editorControlList->SetConstraints(c); - - m_editorFrame->SetAutoLayout(TRUE); - - UpdateResourceList(); - - m_editorFrame->Show(TRUE); - return TRUE; - } - else - { - wxFrame *fr = m_editorFrame; - if (m_editorFrame->OnClose()) - { - fr->Show(FALSE); - delete fr; - m_editorFrame = NULL; - m_editorPanel = NULL; - } - } - return TRUE; -} - -void wxResourceManager::SetFrameTitle(const wxString& filename) -{ - if (m_editorFrame) - { - if (filename == wxString("")) - m_editorFrame->SetTitle("wxWindows Dialog Editor - untitled"); - else - { - wxString str("wxWindows Dialog Editor - "); - wxString str2(wxFileNameFromPath(WXSTRINGCAST filename)); - str += str2; - m_editorFrame->SetTitle(str); - } - } -} - -bool wxResourceManager::Save() -{ - if (m_currentFilename == wxString("")) - return SaveAs(); - else - return Save(m_currentFilename); -} - -bool wxResourceManager::Save(const wxString& filename) -{ - // Ensure all visible windows are saved to their resources - m_currentFilename = filename; - SetFrameTitle(m_currentFilename); - InstantiateAllResourcesFromWindows(); - if (m_resourceTable.Save(filename)) - { - m_symbolTable.WriteIncludeFile(m_symbolFilename); - Modify(FALSE); - return TRUE; - } - else - return FALSE; -} - -bool wxResourceManager::SaveAs() -{ - wxString s(wxFileSelector("Save resource file", wxPathOnly(WXSTRINGCAST m_currentFilename), wxFileNameFromPath(WXSTRINGCAST m_currentFilename), - "wxr", "*.wxr", wxSAVE | wxOVERWRITE_PROMPT)); - - if (s.IsNull() || s == "") - return FALSE; - - m_currentFilename = s; - wxStripExtension(m_currentFilename); - m_currentFilename += ".wxr"; - - // Construct include filename from this file - m_symbolFilename = m_currentFilename; - - wxStripExtension(m_symbolFilename); - m_symbolFilename += ".h"; - - Save(m_currentFilename); - return TRUE; -} - -bool wxResourceManager::SaveIfModified() -{ - if (Modified()) - return Save(); - else return TRUE; -} - -bool wxResourceManager::Load(const wxString& filename) -{ - return New(TRUE, filename); -} - -bool wxResourceManager::New(bool loadFromFile, const wxString& filename) -{ - if (!Clear(TRUE, FALSE)) - return FALSE; - - m_symbolTable.AddStandardSymbols(); - - if (loadFromFile) - { - wxString str = filename; - if (str == wxString("")) - { - wxString f(wxFileSelector("Open resource file", NULL, NULL, "wxr", "*.wxr", 0, NULL)); - if (!f.IsNull() && f != "") - str = f; - else - return FALSE; - } - - if (!m_resourceTable.ParseResourceFile(WXSTRINGCAST str)) - { - wxMessageBox("Could not read file.", "Resource file load error", wxOK | wxICON_EXCLAMATION); - return FALSE; - } - m_currentFilename = str; - - SetFrameTitle(m_currentFilename); - - UpdateResourceList(); - - // Construct include filename from this file - m_symbolFilename = m_currentFilename; - - wxStripExtension(m_symbolFilename); - m_symbolFilename += ".h"; - - if (!m_symbolTable.ReadIncludeFile(m_symbolFilename)) - { - wxString str("Could not find include file "); - str += m_symbolFilename; - str += ".\nDialog Editor maintains a header file containing id symbols to be used in the application.\n"; - str += "The next time this .wxr file is saved, a header file will be saved also."; - wxMessageBox(str, "Dialog Editor Warning", wxOK ); - - m_symbolIdCounter = 99; - } - else - { - // Set the id counter to the last known id - m_symbolIdCounter = m_symbolTable.FindHighestId(); - } - - // Now check in case some (or all) resources don't have resource ids, or they - // don't match the .h file, or something of that nature. - bool altered = RepairResourceIds(); - if (altered) - { - wxMessageBox("Some resources have had new identifiers associated with them, since they were missing.", - "Dialog Editor Warning", wxOK ); - Modify(TRUE); - } - else - Modify(FALSE); - - return TRUE; - } - else - { - SetFrameTitle(""); - m_currentFilename = ""; - } - Modify(FALSE); - - return TRUE; -} - -bool wxResourceManager::Clear(bool WXUNUSED(deleteWindows), bool force) -{ - if (!force && Modified()) - { - int ans = wxMessageBox("Save modified resource file?", "Dialog Editor", wxYES_NO | wxCANCEL); - if (ans == wxCANCEL) - return FALSE; - if (ans == wxYES) - if (!SaveIfModified()) - return FALSE; - if (ans == wxNO) - Modify(FALSE); - } - - ClearCurrentDialog(); - DisassociateWindows(); - - m_symbolTable.Clear(); - m_resourceTable.ClearTable(); - UpdateResourceList(); - - return TRUE; -} - -bool wxResourceManager::DisassociateWindows() -{ - m_resourceTable.BeginFind(); - wxNode *node; - while (node = m_resourceTable.Next()) - { - wxItemResource *res = (wxItemResource *)node->Data(); - DisassociateResource(res); - } - - return TRUE; -} - -void wxResourceManager::AssociateResource(wxItemResource *resource, wxWindow *win) -{ - if (!m_resourceAssociations.Get((long)resource)) - m_resourceAssociations.Put((long)resource, win); - - wxNode *node = resource->GetChildren().First(); - while (node) - { - wxItemResource *child = (wxItemResource *)node->Data(); - wxWindow *childWindow = (wxWindow *)m_resourceAssociations.Get((long)child); - if (!childWindow) - childWindow = win->FindWindow(child->GetName()); - if (childWindow) - AssociateResource(child, childWindow); - else - { - char buf[200]; - sprintf(buf, "AssociateResource: cannot find child window %s", child->GetName() ? child->GetName() : "(unnamed)"); - wxMessageBox(buf, "Dialog Editor problem", wxOK); - } - - node = node->Next(); - } -} - -bool wxResourceManager::DisassociateResource(wxItemResource *resource) -{ - wxWindow *win = FindWindowForResource(resource); - if (!win) - return FALSE; - - // Disassociate children of window - if (win->GetChildren()) - { - wxNode *node = win->GetChildren()->First(); - while (node) - { - wxWindow *child = (wxWindow *)node->Data(); - if (child->IsKindOf(CLASSINFO(wxControl))) - DisassociateResource(child); - node = node->Next(); - } - } - - RemoveSelection(win); - m_resourceAssociations.Delete((long)resource); - return TRUE; -} - -bool wxResourceManager::DisassociateResource(wxWindow *win) -{ - wxItemResource *res = FindResourceForWindow(win); - if (res) - return DisassociateResource(res); - else - return FALSE; -} - -// Saves the window info into the resource, and deletes the -// handler. Doesn't actually disassociate the window from -// the resources. Replaces OnClose. -bool wxResourceManager::SaveInfoAndDeleteHandler(wxWindow* win) -{ - wxItemResource *res = FindResourceForWindow(win); - - if (win->IsKindOf(CLASSINFO(wxPanel))) - { - wxResourceEditorDialogHandler* handler = (wxResourceEditorDialogHandler*) win->GetEventHandler(); - win->PopEventHandler(); - - // Now reset all child event handlers - wxNode *node = win->GetChildren()->First(); - while ( node ) - { - wxWindow *child = (wxWindow *)node->Data(); - wxEvtHandler *childHandler = child->GetEventHandler(); - if ( child->IsKindOf(CLASSINFO(wxControl)) && childHandler != child ) - { - child->PopEventHandler(TRUE); - } - node = node->Next(); - } - delete handler; - } - else - { - win->PopEventHandler(TRUE); - } - - // Save the information - InstantiateResourceFromWindow(res, win, TRUE); - -// DisassociateResource(win); - - return TRUE; -} - -// Destroys the window. If this is the 'current' panel, NULLs the -// variable. -bool wxResourceManager::DeleteWindow(wxWindow* win) -{ - bool clearDisplay = FALSE; - if (m_editorPanel->m_childWindow == win) - { - m_editorPanel->m_childWindow = NULL; - clearDisplay = TRUE; - } - - win->Destroy(); - - if (clearDisplay) - m_editorPanel->Clear(); - - return TRUE; -} - -wxItemResource *wxResourceManager::FindResourceForWindow(wxWindow *win) -{ - m_resourceAssociations.BeginFind(); - wxNode *node; - while (node = m_resourceAssociations.Next()) - { - wxWindow *w = (wxWindow *)node->Data(); - if (w == win) - { - return (wxItemResource *)node->key.integer; - } - } - return NULL; -} - -wxWindow *wxResourceManager::FindWindowForResource(wxItemResource *resource) -{ - return (wxWindow *)m_resourceAssociations.Get((long)resource); -} - - -void wxResourceManager::MakeUniqueName(char *prefix, char *buf) -{ - while (TRUE) - { - sprintf(buf, "%s%d", prefix, m_nameCounter); - m_nameCounter ++; - - if (!m_resourceTable.FindResource(buf)) - return; - } -} - -wxFrame *wxResourceManager::OnCreateEditorFrame(const char *title) -{ - int frameWidth = 420; - int frameHeight = 300; - - wxResourceEditorFrame *frame = new wxResourceEditorFrame(this, NULL, title, - wxPoint(m_resourceEditorWindowSize.x, m_resourceEditorWindowSize.y), - wxSize(m_resourceEditorWindowSize.width, m_resourceEditorWindowSize.height), - wxDEFAULT_FRAME_STYLE); - - frame->CreateStatusBar(1); - - frame->SetAutoLayout(TRUE); -#ifdef __WXMSW__ - wxIcon *icon = new wxIcon("DIALOGEDICON"); - frame->SetIcon(icon); -#endif - return frame; -} - -wxMenuBar *wxResourceManager::OnCreateEditorMenuBar(wxFrame *WXUNUSED(parent)) -{ - wxMenuBar *menuBar = new wxMenuBar; - - wxMenu *fileMenu = new wxMenu; - fileMenu->Append(RESED_NEW_DIALOG, "New &dialog", "Create a new dialog"); - fileMenu->AppendSeparator(); - fileMenu->Append(wxID_NEW, "&New project", "Clear the current project"); - fileMenu->Append(wxID_OPEN, "&Open...", "Load a resource file"); - fileMenu->Append(wxID_SAVE, "&Save", "Save a resource file"); - fileMenu->Append(wxID_SAVEAS, "Save &As...", "Save a resource file as..."); - fileMenu->Append(RESED_CLEAR, "&Clear", "Clear current resources"); - fileMenu->AppendSeparator(); - fileMenu->Append(wxID_EXIT, "E&xit", "Exit resource editor"); - - wxMenu *editMenu = new wxMenu; - editMenu->Append(RESED_TEST, "&Test Dialog", "Test dialog"); - editMenu->Append(RESED_RECREATE, "&Recreate", "Recreate the selected resource(s)"); - editMenu->Append(RESED_DELETE, "&Delete", "Delete the selected resource(s)"); - - wxMenu *helpMenu = new wxMenu; - helpMenu->Append(RESED_CONTENTS, "&Help topics", "Invokes the on-line help"); - helpMenu->AppendSeparator(); - helpMenu->Append(wxID_ABOUT, "&About", "About wxWindows Dialog Editor"); - - menuBar->Append(fileMenu, "&File"); - menuBar->Append(editMenu, "&Edit"); - menuBar->Append(helpMenu, "&Help"); - - return menuBar; -} - -wxResourceEditorScrolledWindow *wxResourceManager::OnCreateEditorPanel(wxFrame *parent) -{ - wxResourceEditorScrolledWindow *panel = new wxResourceEditorScrolledWindow(parent, wxDefaultPosition, wxDefaultSize, -// wxSUNKEN_BORDER|wxCLIP_CHILDREN); - wxSUNKEN_BORDER); - - panel->SetScrollbars(10, 10, 100, 100); - - return panel; -} - -wxToolBar *wxResourceManager::OnCreateToolBar(wxFrame *parent) -{ - // Load palette bitmaps -#ifdef __WXMSW__ - wxBitmap ToolbarLoadBitmap("LOADTOOL"); - wxBitmap ToolbarSaveBitmap("SAVETOOL"); - wxBitmap ToolbarNewBitmap("NEWTOOL"); - wxBitmap ToolbarVertBitmap("VERTTOOL"); - wxBitmap ToolbarAlignTBitmap("ALIGNTTOOL"); - wxBitmap ToolbarAlignBBitmap("ALIGNBTOOL"); - wxBitmap ToolbarHorizBitmap("HORIZTOOL"); - wxBitmap ToolbarAlignLBitmap("ALIGNLTOOL"); - wxBitmap ToolbarAlignRBitmap("ALIGNRTOOL"); - wxBitmap ToolbarCopySizeBitmap("COPYSIZETOOL"); - wxBitmap ToolbarToBackBitmap("TOBACKTOOL"); - wxBitmap ToolbarToFrontBitmap("TOFRONTTOOL"); - wxBitmap ToolbarHelpBitmap("HELPTOOL"); -#endif -#ifdef __WXGTK__ - wxBitmap ToolbarLoadBitmap( load_xpm ); - wxBitmap ToolbarSaveBitmap( save_xpm); - wxBitmap ToolbarNewBitmap( new_xpm ); - wxBitmap ToolbarVertBitmap( vert_xpm ); - wxBitmap ToolbarAlignTBitmap( alignt_xpm ); - wxBitmap ToolbarAlignBBitmap( alignb_xpm ); - wxBitmap ToolbarHorizBitmap( horiz_xpm ); - wxBitmap ToolbarAlignLBitmap( alignl_xpm ); - wxBitmap ToolbarAlignRBitmap( alignr_xpm ); - wxBitmap ToolbarCopySizeBitmap( copysize_xpm ); - wxBitmap ToolbarToBackBitmap( toback_xpm ); - wxBitmap ToolbarToFrontBitmap( tofront_xpm ); - wxBitmap ToolbarHelpBitmap( help_xpm ); -#endif - - // Create the toolbar - EditorToolBar *toolbar = new EditorToolBar(parent, wxPoint(0, 0), wxSize(-1, -1), wxNO_BORDER|wxTB_HORIZONTAL); - toolbar->SetMargins(2, 2); - -#ifdef __WXMSW__ - int width = 24; - int dx = 2; - int gap = 6; -#else - int width = 24; // ToolbarLoadBitmap->GetWidth(); ??? - int dx = 2; - int gap = 6; -#endif - int currentX = gap; - toolbar->AddSeparator(); - toolbar->AddTool(TOOLBAR_NEW, ToolbarNewBitmap, (wxBitmap *)NULL, - FALSE, (float)currentX, -1, NULL, "New dialog"); - currentX += width + dx; - toolbar->AddTool(TOOLBAR_LOAD_FILE, ToolbarLoadBitmap, (wxBitmap *)NULL, - FALSE, (float)currentX, -1, NULL, "Load"); - currentX += width + dx; - toolbar->AddTool(TOOLBAR_SAVE_FILE, ToolbarSaveBitmap, (wxBitmap *)NULL, - FALSE, (float)currentX, -1, NULL, "Save"); - currentX += width + dx + gap; - toolbar->AddSeparator(); - toolbar->AddTool(TOOLBAR_FORMAT_HORIZ, ToolbarVertBitmap, (wxBitmap *)NULL, - FALSE, (float)currentX, -1, NULL, "Horizontal align"); - currentX += width + dx; - toolbar->AddTool(TOOLBAR_FORMAT_VERT_TOP_ALIGN, ToolbarAlignTBitmap, (wxBitmap *)NULL, - FALSE, (float)currentX, -1, NULL, "Top align"); - currentX += width + dx; - toolbar->AddTool(TOOLBAR_FORMAT_VERT_BOT_ALIGN, ToolbarAlignBBitmap, (wxBitmap *)NULL, - FALSE, (float)currentX, -1, NULL, "Bottom align"); - currentX += width + dx; - toolbar->AddTool(TOOLBAR_FORMAT_VERT, ToolbarHorizBitmap, (wxBitmap *)NULL, - FALSE, (float)currentX, -1, NULL, "Vertical align"); - currentX += width + dx; - toolbar->AddTool(TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN, ToolbarAlignLBitmap, (wxBitmap *)NULL, - FALSE, (float)currentX, -1, NULL, "Left align"); - currentX += width + dx; - toolbar->AddTool(TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN, ToolbarAlignRBitmap, (wxBitmap *)NULL, - FALSE, (float)currentX, -1, NULL, "Right align"); - currentX += width + dx; - toolbar->AddTool(TOOLBAR_COPY_SIZE, ToolbarCopySizeBitmap, (wxBitmap *)NULL, - FALSE, (float)currentX, -1, NULL, "Copy size"); - currentX += width + dx + gap; - toolbar->AddSeparator(); - toolbar->AddTool(TOOLBAR_TO_FRONT, ToolbarToFrontBitmap, (wxBitmap *)NULL, - FALSE, (float)currentX, -1, NULL, "To front"); - currentX += width + dx; - toolbar->AddTool(TOOLBAR_TO_BACK, ToolbarToBackBitmap, (wxBitmap *)NULL, - FALSE, (float)currentX, -1, NULL, "To back"); - currentX += width + dx + gap; - - toolbar->AddSeparator(); - toolbar->AddTool(TOOLBAR_HELP, ToolbarHelpBitmap, (wxBitmap *)NULL, - FALSE, (float)currentX, -1, NULL, "Help"); - currentX += width + dx; - - toolbar->Realize(); - - return toolbar; -} - -void wxResourceManager::UpdateResourceList() -{ - if (!m_editorResourceTree) - return; - - m_editorResourceTree->SetInvalid(TRUE); - m_editorResourceTree->DeleteAllItems(); - - long id = m_editorResourceTree->InsertItem(0, "Dialogs" -#ifdef __WXMSW__ - , 1, 2 -#endif - ); - - m_resourceTable.BeginFind(); - wxNode *node; - while (node = m_resourceTable.Next()) - { - wxItemResource *res = (wxItemResource *)node->Data(); - wxString resType(res->GetType()); - if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel" || resType == "wxBitmap") - { - AddItemsRecursively(id, res); - } - } - m_editorResourceTree->ExpandItem(id, wxTREE_EXPAND_EXPAND); - m_editorResourceTree->SetInvalid(FALSE); -} - -void wxResourceManager::AddItemsRecursively(long parent, wxItemResource *resource) -{ - wxString theString(""); - theString = resource->GetName(); - - int imageId = 0; - wxString resType(resource->GetType()); - if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel") - imageId = 0; - else - imageId = 3; - - long id = m_editorResourceTree->InsertItem(parent, theString -#ifdef __WXMSW__ - , imageId -#endif - ); - - m_editorResourceTree->SetItemData(id, (long) resource); - - if (strcmp(resource->GetType(), "wxBitmap") != 0) - { - wxNode *node = resource->GetChildren().First(); - while (node) - { - wxItemResource *res = (wxItemResource *)node->Data(); - AddItemsRecursively(id, res); - node = node->Next(); - } - } - m_editorResourceTree->ExpandItem(id, wxTREE_EXPAND_EXPAND); -} - -bool wxResourceManager::EditSelectedResource() -{ - int sel = m_editorResourceTree->GetSelection(); - if (sel != 0) - { - wxItemResource *res = (wxItemResource *)m_editorResourceTree->GetItemData(sel); - return Edit(res); - } - return FALSE; -} - -bool wxResourceManager::Edit(wxItemResource *res) -{ - ClearCurrentDialog(); - - wxString resType(res->GetType()); - wxPanel *panel = (wxPanel *)FindWindowForResource(res); - - if (panel) - { - wxMessageBox("Should not find panel in wxResourceManager::Edit"); - return FALSE; - } - else - { - long style = res->GetStyle(); - res->SetStyle(style|wxRAISED_BORDER); - panel = new wxPanel; - wxResourceEditorDialogHandler *handler = new wxResourceEditorDialogHandler(panel, res, panel->GetEventHandler(), - this); - - panel->LoadFromResource(m_editorPanel, res->GetName(), &m_resourceTable); - - panel->PushEventHandler(handler); - - res->SetStyle(style); - handler->AddChildHandlers(); // Add event handlers for all controls - AssociateResource(res, panel); - - m_editorPanel->m_childWindow = panel; - panel->Move(m_editorPanel->GetMarginX(), m_editorPanel->GetMarginY()); - panel->Show(TRUE); - panel->Refresh(); - - wxClientDC dc(m_editorPanel); - m_editorPanel->DrawTitle(dc); - } - return FALSE; -} - -bool wxResourceManager::CreateNewPanel() -{ - ClearCurrentDialog(); - - char buf[256]; - MakeUniqueName("dialog", buf); - - wxItemResource *resource = new wxItemResource; - resource->SetType("wxDialog"); - resource->SetName(buf); - resource->SetTitle(buf); - - wxString newIdName; - int id = GenerateWindowId("ID_DIALOG", newIdName); - resource->SetId(id); - - // This is now guaranteed to be unique, so just add to symbol table - m_symbolTable.AddSymbol(newIdName, id); - - m_resourceTable.AddResource(resource); - - wxPanel *panel = new wxPanel(m_editorPanel, -1, - wxPoint(m_editorPanel->GetMarginX(), m_editorPanel->GetMarginY()), - wxSize(400, 300), wxRAISED_BORDER|wxDEFAULT_DIALOG_STYLE, buf); - m_editorPanel->m_childWindow = panel; - - resource->SetStyle(panel->GetWindowStyleFlag()); - resource->SetSize(10, 10, 400, 300); - - // For editing in situ we will need to use the hash table to ensure - // we don't dereference invalid pointers. -// resourceWindowTable.Put((long)resource, panel); - - wxResourceEditorDialogHandler *handler = new wxResourceEditorDialogHandler(panel, resource, panel->GetEventHandler(), - this); - panel->PushEventHandler(handler); - - AssociateResource(resource, panel); - UpdateResourceList(); - - Modify(TRUE); - m_editorPanel->m_childWindow->Refresh(); - -// panel->Refresh(); - - wxClientDC dc(m_editorPanel); - m_editorPanel->DrawTitle(dc); - - return TRUE; -} - -bool wxResourceManager::CreatePanelItem(wxItemResource *panelResource, wxPanel *panel, char *iType, int x, int y, bool isBitmap) -{ - char buf[256]; - if (!panel->IsKindOf(CLASSINFO(wxPanel)) && !panel->IsKindOf(CLASSINFO(wxDialog))) - return FALSE; - - Modify(TRUE); - - wxItemResource *res = new wxItemResource; - wxControl *newItem = NULL; - res->SetSize(x, y, -1, -1); - res->SetType(iType); - - wxString prefix; - - wxString itemType(iType); - - if (itemType == "wxButton") - { - prefix = "ID_BUTTON"; - MakeUniqueName("button", buf); - res->SetName(buf); - if (isBitmap) - newItem = new wxBitmapButton(panel, -1, m_bitmapImage, wxPoint(x, y), wxSize(-1, -1), 0, wxDefaultValidator, buf); - else - newItem = new wxButton(panel, -1, "Button", wxPoint(x, y), wxSize(-1, -1), 0, wxDefaultValidator, buf); - } - if (itemType == "wxBitmapButton") - { - prefix = "ID_BITMAPBUTTON"; - MakeUniqueName("button", buf); - res->SetName(buf); - newItem = new wxBitmapButton(panel, -1, m_bitmapImage, wxPoint(x, y), wxSize(-1, -1), 0, wxDefaultValidator, buf); - } - else if (itemType == "wxMessage" || itemType == "wxStaticText") - { - prefix = "ID_STATIC"; - MakeUniqueName("statictext", buf); - res->SetName(buf); - if (isBitmap) - newItem = new wxStaticBitmap(panel, -1, m_bitmapImage, wxPoint(x, y), wxSize(0, 0), 0, buf); - else - newItem = new wxStaticText(panel, -1, "Static", wxPoint(x, y), wxSize(-1, -1), 0, buf); - } - else if (itemType == "wxStaticBitmap") - { - prefix = "ID_STATICBITMAP"; - MakeUniqueName("static", buf); - res->SetName(buf); - newItem = new wxStaticBitmap(panel, -1, m_bitmapImage, wxPoint(x, y), wxSize(-1, -1), 0, buf); - } - else if (itemType == "wxCheckBox") - { - prefix = "ID_CHECKBOX"; - MakeUniqueName("checkbox", buf); - res->SetName(buf); - newItem = new wxCheckBox(panel, -1, "Checkbox", wxPoint(x, y), wxSize(-1, -1), 0, wxDefaultValidator, buf); - } - else if (itemType == "wxListBox") - { - prefix = "ID_LISTBOX"; - MakeUniqueName("listbox", buf); - res->SetName(buf); - newItem = new wxListBox(panel, -1, wxPoint(x, y), wxSize(-1, -1), 0, NULL, 0, wxDefaultValidator, buf); - } - else if (itemType == "wxRadioBox") - { - prefix = "ID_RADIOBOX"; - MakeUniqueName("radiobox", buf); - res->SetName(buf); - wxString names[] = { "One", "Two" }; - newItem = new wxRadioBox(panel, -1, "Radiobox", wxPoint(x, y), wxSize(-1, -1), 2, names, 2, - wxHORIZONTAL, wxDefaultValidator, buf); - res->SetStringValues(new wxStringList("One", "Two", NULL)); - } - else if (itemType == "wxRadioButton") - { - prefix = "ID_RADIOBUTTON"; - MakeUniqueName("radiobutton", buf); - res->SetName(buf); - wxString names[] = { "One", "Two" }; - newItem = new wxRadioButton(panel, -1, "Radiobutton", wxPoint(x, y), wxSize(-1, -1), - 0, wxDefaultValidator, buf); - } - else if (itemType == "wxChoice") - { - prefix = "ID_CHOICE"; - MakeUniqueName("choice", buf); - res->SetName(buf); - newItem = new wxChoice(panel, -1, wxPoint(x, y), wxSize(-1, -1), 0, NULL, 0, wxDefaultValidator, buf); - } - else if (itemType == "wxComboBox") - { - prefix = "ID_COMBOBOX"; - MakeUniqueName("combobox", buf); - res->SetName(buf); - newItem = new wxComboBox(panel, -1, "", wxPoint(x, y), wxSize(-1, -1), 0, NULL, wxCB_DROPDOWN, wxDefaultValidator, buf); - } - else if (itemType == "wxGroupBox" || itemType == "wxStaticBox") - { - prefix = "ID_STATICBOX"; - MakeUniqueName("staticbox", buf); - res->SetName(buf); - newItem = new wxStaticBox(panel, -1, "Static", wxPoint(x, y), wxSize(200, 200), 0, buf); - } - else if (itemType == "wxGauge") - { - prefix = "ID_GAUGE"; - MakeUniqueName("gauge", buf); - res->SetName(buf); - newItem = new wxGauge(panel, -1, 10, wxPoint(x, y), wxSize(80, 30), wxHORIZONTAL, wxDefaultValidator, buf); - } - else if (itemType == "wxSlider") - { - prefix = "ID_SLIDER"; - MakeUniqueName("slider", buf); - res->SetName(buf); - newItem = new wxSlider(panel, -1, 1, 1, 10, wxPoint(x, y), wxSize(120, -1), wxHORIZONTAL, wxDefaultValidator, buf); - } - else if (itemType == "wxText" || itemType == "wxTextCtrl (single-line)") - { - prefix = "ID_TEXTCTRL"; - MakeUniqueName("textctrl", buf); - res->SetName(buf); - res->SetType("wxTextCtrl"); - newItem = new wxTextCtrl(panel, -1, "", wxPoint(x, y), wxSize(120, -1), 0, wxDefaultValidator, buf); - } - else if (itemType == "wxMultiText" || itemType == "wxTextCtrl (multi-line)") - { - prefix = "ID_TEXTCTRL"; - MakeUniqueName("textctrl", buf); - res->SetName(buf); - res->SetType("wxTextCtrl"); - newItem = new wxTextCtrl(panel, -1, "", wxPoint(x, y), wxSize(120, 100), wxTE_MULTILINE, wxDefaultValidator, buf); - } - else if (itemType == "wxScrollBar") - { - prefix = "ID_SCROLLBAR"; - MakeUniqueName("scrollbar", buf); - res->SetName(buf); - newItem = new wxScrollBar(panel, -1, wxPoint(x, y), wxSize(140, -1), wxHORIZONTAL, wxDefaultValidator, buf); - } - if (!newItem) - return FALSE; - - wxString newIdName; - int id = GenerateWindowId(prefix, newIdName); - res->SetId(id); - - // This is now guaranteed to be unique, so just add to symbol table - m_symbolTable.AddSymbol(newIdName, id); - - newItem->PushEventHandler(new wxResourceEditorControlHandler(newItem, newItem)); - - res->SetStyle(newItem->GetWindowStyleFlag()); - AssociateResource(res, newItem); - panelResource->GetChildren().Append(res); - - UpdateResourceList(); - - return TRUE; -} - -void wxResourceManager::ClearCurrentDialog() -{ - if (m_editorPanel->m_childWindow) - { - SaveInfoAndDeleteHandler(m_editorPanel->m_childWindow); - DisassociateResource(m_editorPanel->m_childWindow); - DeleteWindow(m_editorPanel->m_childWindow); - m_editorPanel->m_childWindow = NULL; - m_editorPanel->Clear(); - } -} - -bool wxResourceManager::TestCurrentDialog(wxWindow* parent) -{ - if (m_editorPanel->m_childWindow) - { - wxItemResource* item = FindResourceForWindow(m_editorPanel->m_childWindow); - if (!item) - return FALSE; - - // Make sure the resources are up-to-date w.r.t. the window - InstantiateResourceFromWindow(item, m_editorPanel->m_childWindow, TRUE); - - wxDialog* dialog = new wxDialog; - long oldStyle = item->GetStyle(); - bool success = FALSE; -// item->SetStyle(wxDEFAULT_DIALOG_STYLE); - if (dialog->LoadFromResource(parent, item->GetName(), & m_resourceTable)) - { - dialog->Centre(); - dialog->ShowModal(); - success = TRUE; - } -// item->SetStyle(oldStyle); - return success; - } - return FALSE; -} - -// Find the first dialog or panel for which -// there is a selected panel item. -wxWindow *wxResourceManager::FindParentOfSelection() -{ - m_resourceTable.BeginFind(); - wxNode *node; - while (node = m_resourceTable.Next()) - { - wxItemResource *res = (wxItemResource *)node->Data(); - wxWindow *win = FindWindowForResource(res); - if (win) - { - wxNode *node1 = win->GetChildren()->First(); - while (node1) - { - wxControl *item = (wxControl *)node1->Data(); - wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - if (item->IsKindOf(CLASSINFO(wxControl)) && childHandler->IsSelected()) - return win; - node1 = node1->Next(); - } - } - } - return NULL; -} - -// Format the panel items according to 'flag' -void wxResourceManager::AlignItems(int flag) -{ - wxWindow *win = FindParentOfSelection(); - if (!win) - return; - - wxNode *node = GetSelections().First(); - if (!node) - return; - - wxControl *firstSelection = (wxControl *)node->Data(); - if (firstSelection->GetParent() != win) - return; - - int firstX, firstY; - int firstW, firstH; - firstSelection->GetPosition(&firstX, &firstY); - firstSelection->GetSize(&firstW, &firstH); - int centreX = (int)(firstX + (firstW / 2)); - int centreY = (int)(firstY + (firstH / 2)); - - while (node = node->Next()) - { - wxControl *item = (wxControl *)node->Data(); - if (item->GetParent() == win) - { - int x, y, w, h; - item->GetPosition(&x, &y); - item->GetSize(&w, &h); - - int newX, newY; - - switch (flag) - { - case TOOLBAR_FORMAT_HORIZ: - { - newX = x; - newY = (int)(centreY - (h/2.0)); - break; - } - case TOOLBAR_FORMAT_VERT: - { - newX = (int)(centreX - (w/2.0)); - newY = y; - break; - } - case TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN: - { - newX = firstX; - newY = y; - break; - } - case TOOLBAR_FORMAT_VERT_TOP_ALIGN: - { - newX = x; - newY = firstY; - break; - } - case TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN: - { - newX = firstX + firstW - w; - newY = y; - break; - } - case TOOLBAR_FORMAT_VERT_BOT_ALIGN: - { - newX = x; - newY = firstY + firstH - h; - break; - } - default: - newX = x; newY = y; - break; - } - - item->SetSize(newX, newY, w, h); - } - } - win->Refresh(); -} - -// Copy the first image's size to subsequent images -void wxResourceManager::CopySize() -{ - wxWindow *win = FindParentOfSelection(); - if (!win) - return; - - wxNode *node = GetSelections().First(); - if (!node) - return; - - wxControl *firstSelection = (wxControl *)node->Data(); - if (firstSelection->GetParent() != win) - return; - - int firstX, firstY; - int firstW, firstH; - firstSelection->GetPosition(&firstX, &firstY); - firstSelection->GetSize(&firstW, &firstH); - int centreX = (int)(firstX + (firstW / 2)); - int centreY = (int)(firstY + (firstH / 2)); - - while (node = node->Next()) - { - wxControl *item = (wxControl *)node->Data(); - if (item->GetParent() == win) - item->SetSize(-1, -1, firstW, firstH); - } - win->Refresh(); -} - -void wxResourceManager::ToBackOrFront(bool toBack) -{ - wxWindow *win = FindParentOfSelection(); - if (!win) - return; - wxItemResource *winResource = FindResourceForWindow(win); - - wxNode *node = GetSelections().First(); - while (node) - { - wxControl *item = (wxControl *)node->Data(); - wxItemResource *itemResource = FindResourceForWindow(item); - if (item->GetParent() == win) - { - win->GetChildren()->DeleteObject(item); - if (winResource) - winResource->GetChildren().DeleteObject(itemResource); - if (toBack) - { - win->GetChildren()->Insert(item); - if (winResource) - winResource->GetChildren().Insert(itemResource); - } - else - { - win->GetChildren()->Append(item); - if (winResource) - winResource->GetChildren().Append(itemResource); - } - } - node = node->Next(); - } -// win->Refresh(); -} - -void wxResourceManager::AddSelection(wxWindow *win) -{ - if (!m_selections.Member(win)) - m_selections.Append(win); -} - -void wxResourceManager::RemoveSelection(wxWindow *win) -{ - m_selections.DeleteObject(win); -} - -// Need to search through resource table removing this from -// any resource which has this as a parent. -bool wxResourceManager::RemoveResourceFromParent(wxItemResource *res) -{ - m_resourceTable.BeginFind(); - wxNode *node; - while (node = m_resourceTable.Next()) - { - wxItemResource *thisRes = (wxItemResource *)node->Data(); - if (thisRes->GetChildren().Member(res)) - { - thisRes->GetChildren().DeleteObject(res); - return TRUE; - } - } - return FALSE; -} - -bool wxResourceManager::DeleteResource(wxItemResource *res) -{ - if (!res) - return FALSE; - - RemoveResourceFromParent(res); - - wxNode *node = res->GetChildren().First(); - while (node) - { - wxNode *next = node->Next(); - wxItemResource *child = (wxItemResource *)node->Data(); - DeleteResource(child); - node = next; - } - - // If this is a button or message resource, delete the - // associate bitmap resource if not being used. - wxString resType(res->GetType()); - - if ((resType == "wxMessage" || resType == "wxStaticBitmap" || resType == "wxButton" || resType == "wxBitmapButton") && res->GetValue4()) - { - PossiblyDeleteBitmapResource(res->GetValue4()); - } - - // Remove symbol from table if appropriate - if (!IsSymbolUsed(res, res->GetId())) - { - m_symbolTable.RemoveSymbol(res->GetId()); - } - - m_resourceTable.Delete(res->GetName()); - delete res; - Modify(TRUE); - return TRUE; -} - -bool wxResourceManager::DeleteResource(wxWindow *win) -{ - if (win->IsKindOf(CLASSINFO(wxControl))) - { - // Deselect and refresh window in case we leave selection - // handles behind - wxControl *item = (wxControl *)win; - wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - if (childHandler->IsSelected()) - { - RemoveSelection(item); - childHandler->SelectItem(FALSE); - item->GetParent()->Refresh(); - } - } - - wxItemResource *res = FindResourceForWindow(win); - - DisassociateResource(res); - DeleteResource(res); - UpdateResourceList(); - - return TRUE; -} - -// Will eventually have bitmap type information, for different -// kinds of bitmap. -char *wxResourceManager::AddBitmapResource(char *filename) -{ - wxItemResource *resource = FindBitmapResourceByFilename(filename); - if (!resource) - { - char buf[256]; - MakeUniqueName("bitmap", buf); - resource = new wxItemResource; - resource->SetType("wxBitmap"); - resource->SetName(buf); - - // A bitmap resource has one or more children, specifying - // alternative bitmaps. - wxItemResource *child = new wxItemResource; - child->SetType("wxBitmap"); - child->SetName(filename); - child->SetValue1(wxBITMAP_TYPE_BMP); - child->SetValue2(RESOURCE_PLATFORM_ANY); - child->SetValue3(0); // Depth - child->SetSize(0,0,0,0); - resource->GetChildren().Append(child); - - m_resourceTable.AddResource(resource); - - UpdateResourceList(); - } - if (resource) - return resource->GetName(); - else - return NULL; -} - - // Delete the bitmap resource if it isn't being used by another resource. -void wxResourceManager::PossiblyDeleteBitmapResource(char *resourceName) -{ - if (!IsBitmapResourceUsed(resourceName)) - { - wxItemResource *res = m_resourceTable.FindResource(resourceName); - DeleteResource(res); - UpdateResourceList(); - } -} - -bool wxResourceManager::IsBitmapResourceUsed(char *resourceName) -{ - m_resourceTable.BeginFind(); - wxNode *node; - while (node = m_resourceTable.Next()) - { - wxItemResource *res = (wxItemResource *)node->Data(); - wxString resType(res->GetType()); - if (resType == "wxDialog") - { - wxNode *node1 = res->GetChildren().First(); - while (node1) - { - wxItemResource *child = (wxItemResource *)node1->Data(); - wxString childResType(child->GetType()); - - if ((childResType == "wxMessage" || childResType == "wxButton") && - child->GetValue4() && - (strcmp(child->GetValue4(), resourceName) == 0)) - return TRUE; - node1 = node1->Next(); - } - } - } - return FALSE; -} - -// Given a wxButton or wxMessage, find the corresponding bitmap filename. -char *wxResourceManager::FindBitmapFilenameForResource(wxItemResource *resource) -{ - if (!resource || !resource->GetValue4()) - return NULL; - wxItemResource *bitmapResource = m_resourceTable.FindResource(resource->GetValue4()); - if (!bitmapResource) - return NULL; - - wxNode *node = bitmapResource->GetChildren().First(); - while (node) - { - // Eventually augment this to return a bitmap of the right kind or something... - // Maybe the root of the filename remains the same, so it doesn't matter which we - // pick up. Otherwise how do we specify multiple filenames... too boring... - wxItemResource *child = (wxItemResource *)node->Data(); - return child->GetName(); - - node = node->Next(); - } - return NULL; -} - -wxItemResource *wxResourceManager::FindBitmapResourceByFilename(char *filename) -{ - m_resourceTable.BeginFind(); - wxNode *node; - while (node = m_resourceTable.Next()) - { - wxItemResource *res = (wxItemResource *)node->Data(); - wxString resType(res->GetType()); - if (resType == "wxBitmap") - { - wxNode *node1 = res->GetChildren().First(); - while (node1) - { - wxItemResource *child = (wxItemResource *)node1->Data(); - if (child->GetName() && (strcmp(child->GetName(), filename) == 0)) - return res; - node1 = node1->Next(); - } - } - } - return NULL; -} - -// Is this window identifier symbol in use? -// Let's assume that we can't have 2 names for the same integer id. -// Therefore we can tell by the integer id whether the symbol is -// in use. -bool wxResourceManager::IsSymbolUsed(wxItemResource* thisResource, wxWindowID id) -{ - m_resourceTable.BeginFind(); - wxNode *node; - while (node = m_resourceTable.Next()) - { - wxItemResource *res = (wxItemResource *)node->Data(); - - wxString resType(res->GetType()); - if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel") - { - if ((res != thisResource) && (res->GetId() == id)) - return TRUE; - - wxNode *node1 = res->GetChildren().First(); - while (node1) - { - wxItemResource *child = (wxItemResource *)node1->Data(); - if ((child != thisResource) && (child->GetId() == id)) - return TRUE; - node1 = node1->Next(); - } - } - } - return FALSE; -} - -// Is this window identifier compatible with the given name? (i.e. -// does it already exist under a different name) -bool wxResourceManager::IsIdentifierOK(const wxString& name, wxWindowID id) -{ - if (m_symbolTable.SymbolExists(name)) - { - int foundId = m_symbolTable.GetIdForSymbol(name); - if (foundId != id) - return FALSE; - } - return TRUE; -} - -// Change all integer ids that match oldId, to newId. -// This is necessary if an id is changed for one resource - all resources -// must be changed. -void wxResourceManager::ChangeIds(int oldId, int newId) -{ - m_resourceTable.BeginFind(); - wxNode *node; - while (node = m_resourceTable.Next()) - { - wxItemResource *res = (wxItemResource *)node->Data(); - - wxString resType(res->GetType()); - if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel") - { - if (res->GetId() == oldId) - res->SetId(newId); - - wxNode *node1 = res->GetChildren().First(); - while (node1) - { - wxItemResource *child = (wxItemResource *)node1->Data(); - if (child->GetId() == oldId) - child->SetId(newId); - - node1 = node1->Next(); - } - } - } -} - -// If any resource ids were missing (or their symbol was missing), -// repair them i.e. give them new ids. Returns TRUE if any resource -// needed repairing. -bool wxResourceManager::RepairResourceIds() -{ - bool repaired = FALSE; - - m_resourceTable.BeginFind(); - wxNode *node; - while (node = m_resourceTable.Next()) - { - wxItemResource *res = (wxItemResource *)node->Data(); - wxString resType(res->GetType()); - if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel") - { - - if ( (res->GetId() == 0) || ((res->GetId() > 0) && !m_symbolTable.IdExists(res->GetId())) ) - { - wxString newSymbolName; - int newId = GenerateWindowId("ID_DIALOG", newSymbolName) ; - - if (res->GetId() == 0) - { - res->SetId(newId); - m_symbolTable.AddSymbol(newSymbolName, newId); - } - else - { - m_symbolTable.AddSymbol(newSymbolName, res->GetId()); - } - - repaired = TRUE; - } - - wxNode *node1 = res->GetChildren().First(); - while (node1) - { - wxItemResource *child = (wxItemResource *)node1->Data(); - - if ( (child->GetId() == 0) || ((child->GetId() > 0) && !m_symbolTable.IdExists(child->GetId())) ) - { - wxString newSymbolName; - int newId = GenerateWindowId("ID_CONTROL", newSymbolName) ; - - if (child->GetId() == 0) - { - child->SetId(newId); - m_symbolTable.AddSymbol(newSymbolName, newId); - } - else - { - m_symbolTable.AddSymbol(newSymbolName, child->GetId()); - } - - repaired = TRUE; - } - - node1 = node1->Next(); - } - } - } - return repaired; -} - - - // Deletes 'win' and creates a new window from the resource that - // was associated with it. E.g. if you can't change properties on the - // fly, you'll need to delete the window and create it again. -wxWindow *wxResourceManager::RecreateWindowFromResource(wxWindow *win, wxWindowPropertyInfo *info) -{ - wxItemResource *resource = FindResourceForWindow(win); - - // Put the current window properties into the wxItemResource object - - wxWindowPropertyInfo *newInfo = NULL; - if (!info) - { - newInfo = CreatePropertyInfoForWindow(win); - info = newInfo; - } - - info->InstantiateResource(resource); - - wxWindow *newWin = NULL; - wxWindow *parent = win->GetParent(); - - if (win->IsKindOf(CLASSINFO(wxPanel))) - { - Edit(resource); - newWin = FindWindowForResource(resource); - } - else - { - DisassociateResource(resource); - if (win->GetEventHandler() != win) - win->PopEventHandler(TRUE); - - DeleteWindow(win); - newWin = m_resourceTable.CreateItem((wxPanel *)parent, resource); - newWin->PushEventHandler(new wxResourceEditorControlHandler((wxControl*) newWin, (wxControl*) newWin)); - AssociateResource(resource, newWin); - UpdateResourceList(); - } - - if (info) - info->SetPropertyWindow(newWin); - - if (newInfo) - delete newInfo; - - return newWin; -} - -// Delete resource highlighted in the listbox -bool wxResourceManager::DeleteSelection() -{ - int sel = m_editorResourceTree->GetSelection(); - if (sel != 0) - { - wxItemResource *res = (wxItemResource *)m_editorResourceTree->GetItemData(sel); - wxWindow *win = FindWindowForResource(res); - if (win) - { - DeleteResource(win); - DeleteWindow(win); - UpdateResourceList(); - Modify(TRUE); - } - return TRUE; - } - - return FALSE; -} - -// Delete resource highlighted in the listbox -bool wxResourceManager::RecreateSelection() -{ - wxNode *node = GetSelections().First(); - while (node) - { - wxControl *item = (wxControl *)node->Data(); - wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - wxNode *next = node->Next(); - childHandler->SelectItem(FALSE); - - RemoveSelection(item); - - RecreateWindowFromResource(item); - - node = next; - } - return TRUE; -} - -bool wxResourceManager::EditDialog(wxDialog *dialog, wxWindow *parent) -{ - return FALSE; -} - -// Ensures that all currently shown windows are saved to resources, -// e.g. just before writing to a .wxr file. -bool wxResourceManager::InstantiateAllResourcesFromWindows() -{ - m_resourceTable.BeginFind(); - wxNode *node; - while (node = m_resourceTable.Next()) - { - wxItemResource *res = (wxItemResource *)node->Data(); - wxString resType(res->GetType()); - - if (resType == "wxDialog") - { - wxWindow *win = (wxWindow *)FindWindowForResource(res); - if (win) - InstantiateResourceFromWindow(res, win, TRUE); - } - else if (resType == "wxPanel") - { - wxWindow *win = (wxWindow *)FindWindowForResource(res); - if (win) - InstantiateResourceFromWindow(res, win, TRUE); - } - } - return TRUE; -} - -bool wxResourceManager::InstantiateResourceFromWindow(wxItemResource *resource, wxWindow *window, bool recurse) -{ - wxWindowPropertyInfo *info = CreatePropertyInfoForWindow(window); - info->SetResource(resource); - info->InstantiateResource(resource); - delete info; - - if (recurse) - { - wxNode *node = resource->GetChildren().First(); - while (node) - { - wxItemResource *child = (wxItemResource *)node->Data(); - wxWindow *childWindow = FindWindowForResource(child); - - if (!childWindow) - { - char buf[200]; - sprintf(buf, "Could not find window %s", child->GetName()); - wxMessageBox(buf, "Dialog Editor problem", wxOK); - } - else - InstantiateResourceFromWindow(child, childWindow, recurse); - node = node->Next(); - } - } - - return TRUE; -} - -// Create a window information object for the give window -wxWindowPropertyInfo *wxResourceManager::CreatePropertyInfoForWindow(wxWindow *win) -{ - wxWindowPropertyInfo *info = NULL; - if (win->IsKindOf(CLASSINFO(wxScrollBar))) - { - info = new wxScrollBarPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxStaticBox))) - { - info = new wxGroupBoxPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxCheckBox))) - { - info = new wxCheckBoxPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxSlider))) - { - info = new wxSliderPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxGauge))) - { - info = new wxGaugePropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxListBox))) - { - info = new wxListBoxPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxRadioBox))) - { - info = new wxRadioBoxPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxRadioButton))) - { - info = new wxRadioButtonPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxChoice))) - { - info = new wxChoicePropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxComboBox))) - { - info = new wxComboBoxPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxButton))) - { - info = new wxButtonPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxBitmapButton))) - { - info = new wxBitmapButtonPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxStaticText))) - { - info = new wxStaticTextPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxStaticBitmap))) - { - info = new wxStaticBitmapPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxTextCtrl))) - { - info = new wxTextPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxPanel))) - { - info = new wxPanelPropertyInfo(win); - } - else - { - info = new wxWindowPropertyInfo(win); - } - return info; -} - -// Edit the given window -void wxResourceManager::EditWindow(wxWindow *win) -{ - wxWindowPropertyInfo *info = CreatePropertyInfoForWindow(win); - if (info) - { - info->SetResource(FindResourceForWindow(win)); - wxString str("Editing "); - str += win->GetClassInfo()->GetClassName(); - str += ": "; - if (win->GetName() != "") - str += win->GetName(); - else - str += "properties"; - info->Edit(NULL, str); - } -} - -// Generate a window id and a first stab at a name -int wxResourceManager::GenerateWindowId(const wxString& prefix, wxString& idName) -{ - m_symbolIdCounter ++; - while (m_symbolTable.IdExists(m_symbolIdCounter)) - m_symbolIdCounter ++; - - int nameId = m_symbolIdCounter; - - wxString str; - str.Printf("%d", nameId); - idName = prefix + str; - - while (m_symbolTable.SymbolExists(idName)) - { - nameId ++; - str.Printf("%d", nameId); - idName = prefix + str; - } - - return m_symbolIdCounter; -} - - -/* - * Resource editor frame - */ - -IMPLEMENT_CLASS(wxResourceEditorFrame, wxFrame) - -BEGIN_EVENT_TABLE(wxResourceEditorFrame, wxFrame) - EVT_MENU(wxID_NEW, wxResourceEditorFrame::OnNew) - EVT_MENU(RESED_NEW_DIALOG, wxResourceEditorFrame::OnNewDialog) - EVT_MENU(wxID_OPEN, wxResourceEditorFrame::OnOpen) - EVT_MENU(RESED_CLEAR, wxResourceEditorFrame::OnClear) - EVT_MENU(wxID_SAVE, wxResourceEditorFrame::OnSave) - EVT_MENU(wxID_SAVEAS, wxResourceEditorFrame::OnSaveAs) - EVT_MENU(wxID_EXIT, wxResourceEditorFrame::OnExit) - EVT_MENU(wxID_ABOUT, wxResourceEditorFrame::OnAbout) - EVT_MENU(RESED_CONTENTS, wxResourceEditorFrame::OnContents) - EVT_MENU(RESED_DELETE, wxResourceEditorFrame::OnDeleteSelection) - EVT_MENU(RESED_RECREATE, wxResourceEditorFrame::OnRecreateSelection) - EVT_MENU(RESED_TEST, wxResourceEditorFrame::OnTest) -END_EVENT_TABLE() - -wxResourceEditorFrame::wxResourceEditorFrame(wxResourceManager *resMan, wxFrame *parent, const wxString& title, - const wxPoint& pos, const wxSize& size, long style, const wxString& name): - wxFrame(parent, -1, title, pos, size, style, name) -{ - manager = resMan; -} - -wxResourceEditorFrame::~wxResourceEditorFrame() -{ -} - -void wxResourceEditorFrame::OnNew(wxCommandEvent& WXUNUSED(event)) -{ - manager->New(FALSE); -} - -void wxResourceEditorFrame::OnNewDialog(wxCommandEvent& WXUNUSED(event)) -{ - manager->CreateNewPanel(); -} - -void wxResourceEditorFrame::OnOpen(wxCommandEvent& WXUNUSED(event)) -{ - manager->New(TRUE); -} - -void wxResourceEditorFrame::OnClear(wxCommandEvent& WXUNUSED(event)) -{ - manager->Clear(TRUE, FALSE); -} - -void wxResourceEditorFrame::OnSave(wxCommandEvent& WXUNUSED(event)) -{ - manager->Save(); -} - -void wxResourceEditorFrame::OnSaveAs(wxCommandEvent& WXUNUSED(event)) -{ - manager->SaveAs(); -} - -void wxResourceEditorFrame::OnExit(wxCommandEvent& WXUNUSED(event)) -{ - manager->Clear(TRUE, FALSE) ; - this->Close(); -} - -void wxResourceEditorFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) -{ - char buf[300]; - sprintf(buf, "wxWindows Dialog Editor %.1f\nAuthor: Julian Smart J.Smart@ed.ac.uk\nJulian Smart (c) 1996", wxDIALOG_EDITOR_VERSION); - wxMessageBox(buf, "About Dialog Editor", wxOK|wxCENTRE); -} - -void wxResourceEditorFrame::OnTest(wxCommandEvent& WXUNUSED(event)) -{ - manager->TestCurrentDialog(this); -} - -void wxResourceEditorFrame::OnContents(wxCommandEvent& WXUNUSED(event)) -{ -#ifdef __WXMSW__ - wxBeginBusyCursor(); - manager->GetHelpController()->LoadFile(); - manager->GetHelpController()->DisplayContents(); - wxEndBusyCursor(); -#endif -} - -void wxResourceEditorFrame::OnDeleteSelection(wxCommandEvent& WXUNUSED(event)) -{ - manager->DeleteSelection(); -} - -void wxResourceEditorFrame::OnRecreateSelection(wxCommandEvent& WXUNUSED(event)) -{ - manager->RecreateSelection(); -} - -bool wxResourceEditorFrame::OnClose() -{ - if (manager->Modified()) - { - if (!manager->Clear(TRUE, FALSE)) - return FALSE; - } - - if (!Iconized()) - { - int w, h; - GetSize(&w, &h); - manager->m_resourceEditorWindowSize.width = w; - manager->m_resourceEditorWindowSize.height = h; - - int x, y; - GetPosition(&x, &y); - - manager->m_resourceEditorWindowSize.x = x; - manager->m_resourceEditorWindowSize.y = y; - } - manager->SetEditorFrame(NULL); - manager->SetEditorToolBar(NULL); - - return TRUE; -} - -/* - * Resource editor window that contains the dialog/panel being edited - */ - -BEGIN_EVENT_TABLE(wxResourceEditorScrolledWindow, wxScrolledWindow) - EVT_SCROLL(wxResourceEditorScrolledWindow::OnScroll) - EVT_PAINT(wxResourceEditorScrolledWindow::OnPaint) -END_EVENT_TABLE() - -wxResourceEditorScrolledWindow::wxResourceEditorScrolledWindow(wxWindow *parent, const wxPoint& pos, const wxSize& size, - long style): - wxScrolledWindow(parent, -1, pos, size, style) -{ - m_marginX = 10; - m_marginY = 40; - m_childWindow = NULL; -} - -wxResourceEditorScrolledWindow::~wxResourceEditorScrolledWindow() -{ -} - -void wxResourceEditorScrolledWindow::OnScroll(wxScrollEvent& event) -{ - wxScrolledWindow::OnScroll(event); - - int x, y; - ViewStart(& x, & y); - - if (m_childWindow) - m_childWindow->Move(m_marginX + (- x * 10), m_marginY + (- y * 10)); -} - -void wxResourceEditorScrolledWindow::OnPaint(wxPaintEvent& WXUNUSED(event)) -{ - wxPaintDC dc(this); - - DrawTitle(dc); -} - -void wxResourceEditorScrolledWindow::DrawTitle(wxDC& dc) -{ - if (m_childWindow) - { - wxItemResource* res = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_childWindow); - if (res) - { - wxString str(res->GetTitle()); - int x, y; - ViewStart(& x, & y); - - wxFont font(10, wxSWISS, wxNORMAL, wxBOLD); - dc.SetFont(font); - dc.SetBackgroundMode(wxTRANSPARENT); - dc.SetTextForeground(wxColour(0, 0, 0)); - - long w, h; - dc.GetTextExtent(str, & w, & h); - - dc.DrawText(str, m_marginX + (- x * 10), m_marginY + (- y * 10) - h - 5); - } - } -} - -// Popup menu callback -void ObjectMenuProc(wxMenu& menu, wxCommandEvent& event) -{ - wxWindow *data = (wxWindow *)menu.GetClientData(); - if (!data) - return; - - switch (event.GetInt()) - { - case OBJECT_MENU_EDIT: - { - wxResourceManager::GetCurrentResourceManager()->EditWindow(data); - break; - } - case OBJECT_MENU_DELETE: - { - wxResourceManager::GetCurrentResourceManager()->SaveInfoAndDeleteHandler(data); - wxResourceManager::GetCurrentResourceManager()->DeleteResource(data); - wxResourceManager::GetCurrentResourceManager()->DeleteWindow(data); - break; - } - default: - break; - } -} - -/* - * Main toolbar - * - */ - -#ifdef __WXGTK__ // I don't dare to delete it... - -BEGIN_EVENT_TABLE(EditorToolBar, wxToolBar) -END_EVENT_TABLE() - -#else - -BEGIN_EVENT_TABLE(EditorToolBar, wxToolBar) - EVT_PAINT(EditorToolBar::OnPaint) -END_EVENT_TABLE() - -#endif - -EditorToolBar::EditorToolBar(wxFrame *frame, const wxPoint& pos, const wxSize& size, - long style): - wxToolBar(frame, -1, pos, size, style) -{ -} - -bool EditorToolBar::OnLeftClick(int toolIndex, bool toggled) -{ - wxResourceManager *manager = wxResourceManager::GetCurrentResourceManager(); - - switch (toolIndex) - { - case TOOLBAR_LOAD_FILE: - { - manager->New(TRUE); - break; - } - case TOOLBAR_NEW: - { - manager->CreateNewPanel(); - break; - } - case TOOLBAR_SAVE_FILE: - { - manager->Save(); - break; - } - case TOOLBAR_HELP: - { -#ifdef __WXMSW__ - wxBeginBusyCursor(); - manager->GetHelpController()->LoadFile(); - manager->GetHelpController()->DisplayContents(); - wxEndBusyCursor(); -#endif - break; - } - case TOOLBAR_FORMAT_HORIZ: - { - manager->AlignItems(TOOLBAR_FORMAT_HORIZ); - break; - } - case TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN: - { - manager->AlignItems(TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN); - break; - } - case TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN: - { - manager->AlignItems(TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN); - break; - } - case TOOLBAR_FORMAT_VERT: - { - manager->AlignItems(TOOLBAR_FORMAT_VERT); - break; - } - case TOOLBAR_FORMAT_VERT_TOP_ALIGN: - { - manager->AlignItems(TOOLBAR_FORMAT_VERT_TOP_ALIGN); - break; - } - case TOOLBAR_FORMAT_VERT_BOT_ALIGN: - { - manager->AlignItems(TOOLBAR_FORMAT_VERT_BOT_ALIGN); - break; - } - case TOOLBAR_COPY_SIZE: - { - manager->CopySize(); - break; - } - case TOOLBAR_TO_BACK: - { - manager->ToBackOrFront(TRUE); - break; - } - case TOOLBAR_TO_FRONT: - { - manager->ToBackOrFront(FALSE); - break; - } - default: - break; - } - return TRUE; -} - -void EditorToolBar::OnMouseEnter(int toolIndex) -{ - wxFrame *frame = (wxFrame *)GetParent(); - - if (!frame) return; - - if (toolIndex > -1) - { - switch (toolIndex) - { - case TOOLBAR_LOAD_FILE: - frame->SetStatusText("Load project file"); - break; - case TOOLBAR_SAVE_FILE: - frame->SetStatusText("Save project file"); - break; - case TOOLBAR_NEW: - frame->SetStatusText("Create a new resource"); - break; - case TOOLBAR_FORMAT_HORIZ: - frame->SetStatusText("Align items horizontally"); - break; - case TOOLBAR_FORMAT_VERT: - frame->SetStatusText("Align items vertically"); - break; - case TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN: - frame->SetStatusText("Left-align items"); - break; - case TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN: - frame->SetStatusText("Right-align items"); - break; - case TOOLBAR_FORMAT_VERT_TOP_ALIGN: - frame->SetStatusText("Top-align items"); - break; - case TOOLBAR_FORMAT_VERT_BOT_ALIGN: - frame->SetStatusText("Bottom-align items"); - break; - case TOOLBAR_COPY_SIZE: - frame->SetStatusText("Copy size from first selection"); - break; - case TOOLBAR_TO_FRONT: - frame->SetStatusText("Put image to front"); - break; - case TOOLBAR_TO_BACK: - frame->SetStatusText("Put image to back"); - break; - case TOOLBAR_HELP: - frame->SetStatusText("Display help contents"); - break; - default: - break; - } - } - else frame->SetStatusText(""); -} - diff --git a/utils/dialoged/src/reseditr.h b/utils/dialoged/src/reseditr.h deleted file mode 100644 index 8b8af13ad2..0000000000 --- a/utils/dialoged/src/reseditr.h +++ /dev/null @@ -1,441 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: reseditr.h -// Purpose: Resource editor class -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _RESEDITR_H_ -#define _RESEDITR_H_ - -#define wxDIALOG_EDITOR_VERSION 1.6 - -#ifdef __GNUG__ -#pragma interface "reseditr.h" -#endif - -#include "wx/wx.h" -#include "wx/string.h" -#include "wx/layout.h" -#include "wx/resource.h" -#include "wx/toolbar.h" -#include "wx/imaglist.h" - -#include "proplist.h" -#include "symbtabl.h" -#include "winstyle.h" - -#define RESED_DELETE 1 -#define RESED_RECREATE 3 -#define RESED_CLEAR 4 -#define RESED_NEW_DIALOG 5 -#define RESED_NEW_PANEL 6 -#define RESED_TEST 10 - -#define RESED_CONTENTS 20 - -#define IDC_TREECTRL 100 -#define IDC_LISTCTRL 101 - -// For control list ('palette') -#define RESED_POINTER 0 -#define RESED_BUTTON 1 -#define RESED_BMPBUTTON 2 -#define RESED_STATICTEXT 3 -#define RESED_STATICBMP 4 -#define RESED_STATICBOX 5 -#define RESED_TEXTCTRL_SINGLE 6 -#define RESED_TEXTCTRL_MULTIPLE 7 -#define RESED_LISTBOX 8 -#define RESED_CHOICE 9 -#define RESED_COMBOBOX 10 -#define RESED_CHECKBOX 11 -#define RESED_SLIDER 12 -#define RESED_GAUGE 13 -#define RESED_RADIOBOX 14 -#define RESED_RADIOBUTTON 15 -#define RESED_SCROLLBAR 16 -#define RESED_TREECTRL 17 -#define RESED_LISTCTRL 18 -#define RESED_SPINBUTTON 19 - -/* - * Controls loading, saving, user interface of resource editor(s). - */ - -class wxResourceEditorFrame; -class EditorToolBar; -class wxWindowPropertyInfo; -class wxResourceEditorProjectTree; -class wxResourceEditorControlList; - -#ifdef __WXMSW__ -#define wxHelpController wxWinHelpController -#else -#define wxHelpController wxHTMLHelpController; -#endif - -class wxHelpController; - -/* - * The resourceTable contains a list of wxItemResources (which each may - * have further children, defining e.g. a dialog box with controls). - * - * We need to associate actual windows with each wxItemResource, - * instead of the current 'one current window' scheme. - * - * - We create a new dialog, create a wxItemResource, - * associate the dialog with wxItemResource via a hash table. - * Must be a hash table in case dialog is deleted without - * telling the resource manager. - * - When we save the resource after editing/closing the dialog, - * we check the wxItemResource/wxDialog and children for - * consistency (throw away items no longer in the wxDialog, - * create any new wxItemResources). - * - We save the wxItemResources via the wxPropertyInfo classes, - * so devolve the code to the appropriate class. - * This involves creating a new temporary wxPropertyInfo for - * the purpose. - * - * We currently assume we only create one instance of a window for - * each wxItemResource. We will need to relax this when we're editing - * in situ. - * - * - */ - -class wxResourceTableWithSaving: public wxResourceTable -{ - public: - wxResourceTableWithSaving():wxResourceTable() - { - // Add all known window styles - m_styleTable.Init(); - } - virtual bool Save(const wxString& filename); - virtual bool SaveResource(ostream& stream, wxItemResource *item); - - void GeneratePanelStyleString(long windowStyle, char *buf); - void GenerateDialogStyleString(long windowStyle, char *buf); - -/* - void GenerateRadioBoxStyleString(long windowStyle, char *buf); - void GenerateMessageStyleString(long windowStyle, char *buf); - void GenerateTextStyleString(long windowStyle, char *buf); - void GenerateButtonStyleString(long windowStyle, char *buf); - void GenerateCheckBoxStyleString(long windowStyle, char *buf); - void GenerateRadioButtonStyleString(long windowStyle, char *buf); - void GenerateListBoxStyleString(long windowStyle, char *buf); - void GenerateSliderStyleString(long windowStyle, char *buf); - void GenerateGroupBoxStyleString(long windowStyle, char *buf); - void GenerateGaugeStyleString(long windowStyle, char *buf); - void GenerateChoiceStyleString(long windowStyle, char *buf); - void GenerateComboBoxStyleString(long windowStyle, char *buf); - void GenerateScrollBarStyleString(long windowStyle, char *buf); -*/ - - void GenerateControlStyleString(const wxString& windowClass, long windowStyle, char *buf); - -/* - bool GenerateStyle(char *buf, long windowStyle, long flag, char *strStyle); -*/ - - void OutputFont(ostream& stream, wxFont *font); - wxControl *CreateItem(wxPanel *panel, wxItemResource *childResource); - -protected: - wxWindowStyleTable m_styleTable; -}; - -class wxResourceEditorScrolledWindow; - -class wxResourceManager: public wxObject -{ - friend class wxResourceEditorFrame; - -public: - wxResourceManager(); - ~wxResourceManager(); - -// Operations - - // Initializes the resource manager - bool Initialize(); - - // Load/save window size etc. - bool LoadOptions(); - bool SaveOptions(); - - // Show or hide the resource editor frame, which displays a list - // of resources with ability to edit them. - virtual bool ShowResourceEditor(bool show, wxWindow *parent = NULL, const char *title = "wxWindows Dialog Editor"); - - virtual bool Save(); - virtual bool SaveAs(); - virtual bool Save(const wxString& filename); - virtual bool Load(const wxString& filename); - virtual bool Clear(bool deleteWindows = TRUE, bool force = TRUE); - virtual void SetFrameTitle(const wxString& filename); - virtual void ClearCurrentDialog(); - virtual bool New(bool loadFromFile = TRUE, const wxString& filename = ""); - virtual bool SaveIfModified(); - virtual void AlignItems(int flag); - virtual void CopySize(); - virtual void ToBackOrFront(bool toBack); - virtual wxWindow *FindParentOfSelection(); - - virtual wxFrame *OnCreateEditorFrame(const char *title); - virtual wxMenuBar *OnCreateEditorMenuBar(wxFrame *parent); - virtual wxResourceEditorScrolledWindow *OnCreateEditorPanel(wxFrame *parent); - virtual wxToolBar *OnCreateToolBar(wxFrame *parent); - - // Create a window information object for the give window - wxWindowPropertyInfo* CreatePropertyInfoForWindow(wxWindow *win); - // Edit the given window - void EditWindow(wxWindow *win); - - virtual void UpdateResourceList(); - virtual void AddItemsRecursively(long parent, wxItemResource *resource); - virtual bool EditSelectedResource(); - virtual bool Edit(wxItemResource *res); - virtual bool CreateNewPanel(); - virtual bool CreatePanelItem(wxItemResource *panelResource, wxPanel *panel, char *itemType, int x = 10, int y = 10, bool isBitmap = FALSE); - virtual bool DeleteSelection(); - virtual bool TestCurrentDialog(wxWindow* parent); - - // Saves the window info into the resource, and deletes the - // handler. Doesn't actually disassociate the window from - // the resources. Replaces OnClose. - virtual bool SaveInfoAndDeleteHandler(wxWindow* win); - - // Destroys the window. If this is the 'current' panel, NULLs the - // variable. - virtual bool DeleteWindow(wxWindow* win); - virtual bool DeleteResource(wxItemResource *res); - virtual bool DeleteResource(wxWindow *win); - - // Add bitmap resource if there isn't already one with this filename. - virtual char *AddBitmapResource(char *filename); - - // Delete the bitmap resource if it isn't being used by another resource. - virtual void PossiblyDeleteBitmapResource(char *resourceName); - - // Helper function for above - virtual bool IsBitmapResourceUsed(char *resourceName); - - wxItemResource *FindBitmapResourceByFilename(char *filename); - - char *FindBitmapFilenameForResource(wxItemResource *resource); - - // Is this window identifier in use? - bool IsSymbolUsed(wxItemResource* thisResource, wxWindowID id) ; - - // Is this window identifier compatible with the given name? (i.e. - // does it already exist under a different name) - bool IsIdentifierOK(const wxString& name, wxWindowID id); - - // Change all integer ids that match oldId, to newId. - // This is necessary if an id is changed for one resource - all resources - // must be changed. - void ChangeIds(int oldId, int newId); - - // If any resource ids were missing (or their symbol was missing), - // repair them i.e. give them new ids. Returns TRUE if any resource - // needed repairing. - bool RepairResourceIds(); - - // Deletes 'win' and creates a new window from the resource that - // was associated with it. E.g. if you can't change properties on the - // fly, you'll need to delete the window and create it again. - virtual wxWindow *RecreateWindowFromResource(wxWindow *win, wxWindowPropertyInfo *info = NULL); - - virtual bool RecreateSelection(); - - // Need to search through resource table removing this from - // any resource which has this as a parent. - virtual bool RemoveResourceFromParent(wxItemResource *res); - - virtual bool EditDialog(wxDialog *dialog, wxWindow *parent); - - void AddSelection(wxWindow *win); - void RemoveSelection(wxWindow *win); - - virtual void MakeUniqueName(char *prefix, char *buf); - - // (Dis)associate resource<->physical window - // Doesn't delete any windows. - virtual void AssociateResource(wxItemResource *resource, wxWindow *win); - virtual bool DisassociateResource(wxItemResource *resource); - virtual bool DisassociateResource(wxWindow *win); - virtual bool DisassociateWindows(); - virtual wxItemResource *FindResourceForWindow(wxWindow *win); - virtual wxWindow *FindWindowForResource(wxItemResource *resource); - - virtual bool InstantiateAllResourcesFromWindows(); - virtual bool InstantiateResourceFromWindow(wxItemResource *resource, wxWindow *window, bool recurse = FALSE); - -// Accessors - inline void SetEditorFrame(wxFrame *fr) { m_editorFrame = fr; } - inline void SetEditorToolBar(EditorToolBar *tb) { m_editorToolBar = tb; } - inline wxFrame *GetEditorFrame() const { return m_editorFrame; } - inline wxResourceEditorProjectTree *GetEditorResourceTree() const { return m_editorResourceTree; } - inline wxResourceEditorControlList *GetEditorControlList() const { return m_editorControlList; } - inline wxList& GetSelections() { return m_selections; } - inline wxMenu *GetPopupMenu() const { return m_popupMenu; } -#ifdef __WXMSW__ - inline wxHelpController *GetHelpController() const { return m_helpController; } -#endif - - inline void Modify(bool mod = TRUE) { m_modified = mod; } - inline bool Modified() const { return m_modified; } - - inline wxResourceTable& GetResourceTable() { return m_resourceTable; } - inline wxHashTable& GetResourceAssociations() { return m_resourceAssociations; } - - inline wxString GetCurrentFilename() const { return m_currentFilename; } - static wxResourceManager* GetCurrentResourceManager() { return sm_currentResourceManager; } - - inline void SetSymbolFilename(const wxString& s) { m_symbolFilename = s; } - inline wxString GetSymbolFilename() const { return m_symbolFilename; } - - inline wxRect& GetPropertyWindowSize() { return m_propertyWindowSize; } - inline wxRect& GetResourceEditorWindowSize() { return m_resourceEditorWindowSize; } - - wxResourceSymbolTable& GetSymbolTable() { return m_symbolTable; } - - // Generate a window id and a first stab at a name - int GenerateWindowId(const wxString& prefix, wxString& idName) ; - -// Member variables - protected: -#ifdef __WXMSW__ - wxHelpController* m_helpController; -#endif - wxResourceTableWithSaving m_resourceTable; - wxFrame* m_editorFrame; - wxResourceEditorScrolledWindow* m_editorPanel; - wxMenu* m_popupMenu; - wxResourceEditorProjectTree* m_editorResourceTree; - wxResourceEditorControlList* m_editorControlList; - EditorToolBar* m_editorToolBar; - int m_nameCounter; - int m_symbolIdCounter; // For generating window ids - bool m_modified; - wxHashTable m_resourceAssociations; - wxList m_selections; - wxString m_currentFilename; - wxBitmap* m_bitmapImage; // Default for static bitmaps/buttons - - wxImageList m_imageList; - long m_rootDialogItem; // Root of dialog hierarchy in tree (unused) - - // Options to be saved/restored - wxString m_optionsResourceFilename; // e.g. dialoged.ini, .dialogrc - wxRect m_propertyWindowSize; - wxRect m_resourceEditorWindowSize; - static wxResourceManager* sm_currentResourceManager; - - // Symbol table with identifiers for controls - wxResourceSymbolTable m_symbolTable; - // Filename for include file, e.g. resource.h - wxString m_symbolFilename; -}; - - -class wxResourceEditorFrame: public wxFrame -{ - public: - DECLARE_CLASS(wxResourceEditorFrame) - - wxResourceManager *manager; - wxResourceEditorFrame(wxResourceManager *resMan, wxFrame *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(600, 400), - long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"); - ~wxResourceEditorFrame(); - - bool OnClose(); - - void OnNew(wxCommandEvent& event); - void OnOpen(wxCommandEvent& event); - void OnNewDialog(wxCommandEvent& event); - void OnClear(wxCommandEvent& event); - void OnSave(wxCommandEvent& event); - void OnSaveAs(wxCommandEvent& event); - void OnExit(wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); - void OnContents(wxCommandEvent& event); - void OnDeleteSelection(wxCommandEvent& event); - void OnRecreateSelection(wxCommandEvent& event); - void OnTest(wxCommandEvent& event); - - DECLARE_EVENT_TABLE() -}; - -class wxResourceEditorScrolledWindow: public wxScrolledWindow -{ - public: - wxResourceEditorScrolledWindow(wxWindow *parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0); - ~wxResourceEditorScrolledWindow(); - - void OnScroll(wxScrollEvent& event); - void OnPaint(wxPaintEvent& event); - - void DrawTitle(wxDC& dc); - -// Accessors - inline int GetMarginX() { return m_marginX; } - inline int GetMarginY() { return m_marginY; } - - public: - wxWindow* m_childWindow; - private: - int m_marginX, m_marginY; - - DECLARE_EVENT_TABLE() -}; - -#define OBJECT_MENU_EDIT 1 -#define OBJECT_MENU_DELETE 2 - -/* - * Main toolbar - * - */ - -class EditorToolBar: public wxToolBar -{ -public: - EditorToolBar(wxFrame *frame, const wxPoint& pos = wxPoint(0, 0), const wxSize& size = wxSize(0, 0), - long style = wxTB_HORIZONTAL); - bool OnLeftClick(int toolIndex, bool toggled); - void OnMouseEnter(int toolIndex); - -DECLARE_EVENT_TABLE() -}; - -// Toolbar ids -#define TOOLBAR_LOAD_FILE 1 -#define TOOLBAR_SAVE_FILE 2 -#define TOOLBAR_NEW 3 -#define TOOLBAR_TREE 5 -#define TOOLBAR_HELP 6 - -// Formatting tools -#define TOOLBAR_FORMAT_HORIZ 10 -#define TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN 11 -#define TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN 12 -#define TOOLBAR_FORMAT_VERT 13 -#define TOOLBAR_FORMAT_VERT_TOP_ALIGN 14 -#define TOOLBAR_FORMAT_VERT_BOT_ALIGN 15 - -#define TOOLBAR_TO_FRONT 16 -#define TOOLBAR_TO_BACK 17 -#define TOOLBAR_COPY_SIZE 18 - -#endif - diff --git a/utils/dialoged/src/reswrite.cpp b/utils/dialoged/src/reswrite.cpp deleted file mode 100644 index dec8278fa8..0000000000 --- a/utils/dialoged/src/reswrite.cpp +++ /dev/null @@ -1,581 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: reswrite.cpp -// Purpose: Resource writing functionality -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include -#include -#include -#include - -#if defined(__WXMSW__) && !defined(__GNUWIN32__) -#include -#else -#include -#endif - -#include - -#include "wx/scrolbar.h" -#include "wx/string.h" - -#include "reseditr.h" - -char *SafeString(char *s); -char *SafeWord(char *s); - -// Save an association between the child resource and the panel item, to allow -// us not to require unique window names. -wxControl *wxResourceTableWithSaving::CreateItem(wxPanel *panel, wxItemResource *childResource) -{ - wxControl *item = wxResourceTable::CreateItem(panel, childResource); - if (item) - wxResourceManager::GetCurrentResourceManager()->GetResourceAssociations().Put((long)childResource, item); - return item; -} - -void wxResourceTableWithSaving::OutputFont(ostream& stream, wxFont *font) -{ - stream << "[" << font->GetPointSize() << ", '"; - stream << font->GetFamilyString() << "', '"; - stream << font->GetStyleString() << "', '"; - stream << font->GetWeightString() << "', "; - stream << (int)font->GetUnderlined(); - if (font->GetFaceName() != "") - stream << ", '" << font->GetFaceName() << "'"; - stream << "]"; -} - -/* - * Resource table with saving (basic one only has loading) - */ - -bool wxResourceTableWithSaving::Save(const wxString& filename) -{ - ofstream stream(((wxString &) filename).GetData()); - if (stream.bad()) - return FALSE; - - BeginFind(); - wxNode *node = NULL; - while (node = Next()) - { - wxItemResource *item = (wxItemResource *)node->Data(); - wxString resType(item->GetType()); - - if (resType == "wxDialogBox" || resType == "wxDialog" || resType == "wxPanel" || resType == "wxBitmap") - { - if (!SaveResource(stream, item)) - return FALSE; - } - } - return TRUE; -} - -bool wxResourceTableWithSaving::SaveResource(ostream& stream, wxItemResource *item) -{ - char styleBuf[400]; - wxString itemType(item->GetType()); - - if (itemType == "wxDialogBox" || itemType == "wxDialog" || itemType == "wxPanel") - { - if (itemType == "wxDialogBox" || itemType == "wxDialog") - { - stream << "static char *" << item->GetName() << " = \"dialog(name = '" << item->GetName() << "',\\\n"; - GenerateDialogStyleString(item->GetStyle(), styleBuf); - } - else - { - stream << "static char *" << item->GetName() << " = \"panel(name = '" << item->GetName() << "',\\\n"; - GenerateDialogStyleString(item->GetStyle(), styleBuf); - } - stream << " style = '" << styleBuf << "',\\\n"; - stream << " title = '" << item->GetTitle() << "',\\\n"; - stream << " id = " << item->GetId() << ",\\\n"; - stream << " x = " << item->GetX() << ", y = " << item->GetY(); - stream << ", width = " << item->GetWidth() << ", height = " << item->GetHeight(); - - if (1) // item->GetStyle() & wxNO_3D) - { - if (item->GetBackgroundColour()) - { - char buf[7]; - wxDecToHex(item->GetBackgroundColour()->Red(), buf); - wxDecToHex(item->GetBackgroundColour()->Green(), buf+2); - wxDecToHex(item->GetBackgroundColour()->Blue(), buf+4); - buf[6] = 0; - - stream << ",\\\n " << "background_colour = '" << buf << "'"; - } - } - - if (item->GetFont() && item->GetFont()->Ok()) - { - stream << ",\\\n font = "; - OutputFont(stream, item->GetFont()); - } - - if (item->GetChildren().Number() > 0) - stream << ",\\\n"; - else - stream << "\\\n"; - wxNode *node = item->GetChildren().First(); - while (node) - { - wxItemResource *child = (wxItemResource *)node->Data(); - - stream << " control = ["; - - SaveResource(stream, child); - - stream << "]"; - - if (node->Next()) - stream << ",\\\n"; - node = node->Next(); - } - stream << ").\";\n\n"; - } - else if (itemType == "wxButton" || itemType == "wxBitmapButton") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << itemType << ", " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - if (item->GetValue4()) - stream << ", '" << item->GetValue4() << "'"; - if (item->GetFont()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxStaticText" || itemType == "wxStaticBitmap") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << itemType << ", " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - if (item->GetValue4()) - stream << ", '" << item->GetValue4() << "'"; - if (item->GetFont()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxCheckBox") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << "wxCheckBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - stream << ", " << item->GetValue1(); - if (item->GetFont()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxRadioButton") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << "wxRadioButton, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - stream << ", " << item->GetValue1(); - if (item->GetFont()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxStaticBox") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << "wxStaticBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - if (item->GetFont()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxText" || itemType == "wxMultiText" || itemType == "wxTextCtrl") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << "wxTextCtrl, "; - stream << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - stream << ", " << SafeWord(item->GetValue4()); - if (item->GetFont()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxGauge") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << "wxGauge, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - stream << ", " << item->GetValue1() << ", " << item->GetValue2(); - if (item->GetFont()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxSlider") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << "wxSlider, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - stream << ", " << item->GetValue1() << ", " << item->GetValue2() << ", " << item->GetValue3(); - if (item->GetFont()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxScrollBar") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << "wxScrollBar, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - stream << ", " << item->GetValue1() << ", " << item->GetValue2() << ", " << item->GetValue3() << ", "; - stream << item->GetValue5(); - } - else if (itemType == "wxListBox") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << "wxListBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - - // Default list of values - - stream << ", ["; - if (item->GetStringValues()) - { - wxNode *node = item->GetStringValues()->First(); - while (node) - { - char *s = (char *)node->Data(); - stream << SafeWord(s); - if (node->Next()) - stream << ", "; - node = node->Next(); - } - } - stream << "], "; - switch (item->GetValue1()) - { - case wxLB_MULTIPLE: - { - stream << "'wxLB_MULTIPLE'"; - break; - } - case wxLB_EXTENDED: - { - stream << "'wxLB_EXTENDED'"; - break; - } - case wxLB_SINGLE: - default: - { - stream << "'wxLB_SINGLE'"; - break; - } - } - if (item->GetFont()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxChoice" || itemType == "wxComboBox") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - - stream << item->GetId() << ", " << itemType << ", " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - - if (itemType == "wxComboBox") - stream << ", " << SafeWord(item->GetValue4()); - - // Default list of values - - stream << ", ["; - if (item->GetStringValues()) - { - wxNode *node = item->GetStringValues()->First(); - while (node) - { - char *s = (char *)node->Data(); - stream << SafeWord(s); - if (node->Next()) - stream << ", "; - node = node->Next(); - } - } - stream << "]"; - if (item->GetFont()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxRadioBox") - { - // Must write out the orientation and number of rows/cols!! - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << "wxRadioBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - - // Default list of values - - stream << ", ["; - if (item->GetStringValues()) - { - wxNode *node = item->GetStringValues()->First(); - while (node) - { - char *s = (char *)node->Data(); - stream << SafeWord(s); - if (node->Next()) - stream << ", "; - node = node->Next(); - } - } - stream << "], " << item->GetValue1(); - if (item->GetFont()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxBitmap") - { - stream << "static char *" << item->GetName() << " = \"bitmap(name = '" << item->GetName() << "',\\\n"; - - wxNode *node = item->GetChildren().First(); - while (node) - { - wxItemResource *child = (wxItemResource *)node->Data(); - stream << " bitmap = ["; - - char buf[400]; - strcpy(buf, child->GetName()); -#ifdef __WXMSW__ - wxDos2UnixFilename(buf); -#endif - - stream << "'" << buf << "', "; - - int bitmapType = (int)child->GetValue1(); - switch (bitmapType) - { - case wxBITMAP_TYPE_XBM_DATA: - { - stream << "wxBITMAP_TYPE_XBM_DATA"; - break; - } - case wxBITMAP_TYPE_XPM_DATA: - { - stream << "wxBITMAP_TYPE_XPM_DATA"; - break; - } - case wxBITMAP_TYPE_XBM: - { - stream << "wxBITMAP_TYPE_XBM"; - break; - } - case wxBITMAP_TYPE_XPM: - { - stream << "wxBITMAP_TYPE_XPM"; - break; - } - case wxBITMAP_TYPE_BMP: - { - stream << "wxBITMAP_TYPE_BMP"; - break; - } - case wxBITMAP_TYPE_BMP_RESOURCE: - { - stream << "wxBITMAP_TYPE_BMP_RESOURCE"; - break; - } - case wxBITMAP_TYPE_GIF: - { - stream << "wxBITMAP_TYPE_GIF"; - break; - } - case wxBITMAP_TYPE_TIF: - { - stream << "wxBITMAP_TYPE_TIF"; - break; - } - case wxBITMAP_TYPE_ICO: - { - stream << "wxBITMAP_TYPE_ICO"; - break; - } - case wxBITMAP_TYPE_ICO_RESOURCE: - { - stream << "wxBITMAP_TYPE_ICO_RESOURCE"; - break; - } - case wxBITMAP_TYPE_CUR: - { - stream << "wxBITMAP_TYPE_CUR"; - break; - } - case wxBITMAP_TYPE_CUR_RESOURCE: - { - stream << "wxBITMAP_TYPE_CUR_RESOURCE"; - break; - } - default: - case wxBITMAP_TYPE_ANY: - { - stream << "wxBITMAP_TYPE_ANY"; - break; - } - } - stream << ", "; - int platform = child->GetValue2(); - switch (platform) - { - case RESOURCE_PLATFORM_WINDOWS: - { - stream << "'WINDOWS'"; - break; - } - case RESOURCE_PLATFORM_X: - { - stream << "'X'"; - break; - } - case RESOURCE_PLATFORM_MAC: - { - stream << "'MAC'"; - break; - } - case RESOURCE_PLATFORM_ANY: - { - stream << "'ANY'"; - break; - } - } - int noColours = (int)child->GetValue3(); - if (noColours > 0) - stream << ", " << noColours; - - stream << "]"; - - if (node->Next()) - stream << ",\\\n"; - - node = node->Next(); - } - stream << ").\";\n\n"; - } - else - { - wxString str("Unimplemented resource type: "); - str += itemType; - wxMessageBox(str); - } - return TRUE; -} - -void wxResourceTableWithSaving::GenerateDialogStyleString(long windowStyle, char *buf) -{ - buf[0] = 0; - m_styleTable.GenerateStyleStrings("wxWindow", windowStyle, buf); - m_styleTable.GenerateStyleStrings("wxPanel", windowStyle, buf); - m_styleTable.GenerateStyleStrings("wxDialog", windowStyle, buf); - - if (strlen(buf) == 0) - strcat(buf, "0"); -} - -void wxResourceTableWithSaving::GeneratePanelStyleString(long windowStyle, char *buf) -{ - buf[0] = 0; - m_styleTable.GenerateStyleStrings("wxWindow", windowStyle, buf); - m_styleTable.GenerateStyleStrings("wxPanel", windowStyle, buf); - - if (strlen(buf) == 0) - strcat(buf, "0"); -} - - -void wxResourceTableWithSaving::GenerateControlStyleString(const wxString& windowClass, long windowStyle, char *buf) -{ - buf[0] = 0; - m_styleTable.GenerateStyleStrings("wxWindow", windowStyle, buf); - m_styleTable.GenerateStyleStrings("wxControl", windowStyle, buf); - m_styleTable.GenerateStyleStrings(windowClass, windowStyle, buf); - - if (strlen(buf) == 0) - strcat(buf, "0"); -} - -// Returns quoted string or "NULL" -char *SafeString(char *s) -{ - if (!s) - return "NULL"; - else - { - strcpy(wxBuffer, "\""); - strcat(wxBuffer, s); - strcat(wxBuffer, "\""); - return wxBuffer; - } -} - -// Returns quoted string or '' -char *SafeWord(char *s) -{ - if (!s) - return "''"; - else - { - strcpy(wxBuffer, "'"); - strcat(wxBuffer, s); - strcat(wxBuffer, "'"); - return wxBuffer; - } -} - diff --git a/utils/dialoged/src/symbtabl.cpp b/utils/dialoged/src/symbtabl.cpp deleted file mode 100644 index a85aefcf83..0000000000 --- a/utils/dialoged/src/symbtabl.cpp +++ /dev/null @@ -1,292 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: symbtabl.cpp -// Purpose: wxResourceSymbolTable -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "symbtabl.h" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include - -#include -#include - -#include "symbtabl.h" - -wxResourceSymbolTable::wxResourceSymbolTable(): - m_hashTable(wxKEY_STRING) -{ -} - -wxResourceSymbolTable::~wxResourceSymbolTable() -{ - Clear(); -} - -// Operations - -bool wxResourceSymbolTable::ReadIncludeFile(const wxString& filename) -{ - wxFile file; - if (!wxFileExists(filename)) - return FALSE; - - if (!file.Open(filename, wxFile::read)) - return FALSE; - - off_t len = file.Length(); - if (len == -1) - return FALSE; - - Clear(); - AddStandardSymbols(); - - wxString str; - char* p = str.GetWriteBuf(len + 1); - - if (file.Read(p, len) == wxFile::fd_invalid) - { - str.UngetWriteBuf(); - return FALSE; - } - str.UngetWriteBuf(); - - // Look for #define occurrences - size_t pos = str.Find("#define"); - while (pos != -1) - { - size_t len = str.Length(); - - size_t i = pos + 8; - - // Eat whitespace until symbol - while ((str[i] == ' ' || str[i] == '\t') && (i < len)) - i ++; - - size_t start = i; - - // Eat symbol - while (str[i] != ' ' && str[i] != '\t' && (i < len)) - i ++; - size_t end = i-1; - - wxString symbol(str.Mid(start, (end - start + 1))); - - // Eat whitespace until number - while ((str[i] == ' ' || str[i] == '\t') && (i < len)) - i ++; - - size_t startNum = i; - - // Eat number - while (str[i] != ' ' && str[i] != '\t' && str[i] != '\n' && (i < len)) - i ++; - - size_t endNum = i-1; - - wxString numStr(str.Mid(startNum, (endNum - startNum + 1))); - - int id = atol(numStr); - - AddSymbol(symbol, id); - - str = str.Right(len - i); - pos = str.Find("#define"); - } - - return TRUE; -} - -bool wxResourceSymbolTable::WriteIncludeFile(const wxString& filename) -{ - wxFile file; - if (!file.Open(filename, wxFile::write)) - return FALSE; - - wxString fileOnly(wxFileNameFromPath(filename)); - wxString line; - line.Printf("/*\n * %s\n * Window identifiers file written by Dialog Editor\n */\n\n", - (const char*) fileOnly); - - file.Write(line, line.Length()); - - m_hashTable.BeginFind(); - - wxNode* node = m_hashTable.Next(); - while (node) - { - char* str = node->key.string; - int id = (int) node->Data() ; - - if (!IsStandardSymbol(str)) - { - wxString line; - line.Printf("#define %s %ld\n", str, id); - - file.Write(line, line.Length()); - } - - node = m_hashTable.Next(); - } - return TRUE; -} - -void wxResourceSymbolTable::Clear() -{ - m_hashTable.Clear(); -} - -bool wxResourceSymbolTable::AddSymbol(const wxString& symbol, int id) -{ - m_hashTable.Put(symbol, (wxObject*) id); - return TRUE; -} - -bool wxResourceSymbolTable::RemoveSymbol(const wxString& symbol) -{ - m_hashTable.Delete(symbol); - return TRUE; -} - -bool wxResourceSymbolTable::RemoveSymbol(int id) -{ - wxString symbol(GetSymbolForId(id)); - m_hashTable.Delete(symbol); - return TRUE; -} - -// Accessors -wxString wxResourceSymbolTable::GetSymbolForId(int id) -{ - m_hashTable.BeginFind(); - - wxNode* node = m_hashTable.Next(); - while (node) - { - char* str = node->key.string; - if (str && ( ((int) node->Data()) == id) ) - return wxString(str); - - node = m_hashTable.Next(); - } - return wxString(""); -} - -int wxResourceSymbolTable::GetIdForSymbol(const wxString& symbol) -{ - return (int) m_hashTable.Get(symbol); -} - -bool wxResourceSymbolTable::SymbolExists(const wxString& symbol) const -{ - return (m_hashTable.Get(symbol) != NULL); -} - -bool wxResourceSymbolTable::IdExists(int id) -{ - m_hashTable.BeginFind(); - - wxNode* node = m_hashTable.Next(); - while (node) - { - if ( (((int) node->Data()) == id) ) - return TRUE; - - node = m_hashTable.Next(); - } - return FALSE; -} - -int wxResourceSymbolTable::FindHighestId() -{ - int highest = 0; - - m_hashTable.BeginFind(); - - wxNode* node = m_hashTable.Next(); - while (node) - { - int id = ((int) node->Data()); - if (id > highest) - highest = id; - - node = m_hashTable.Next(); - } - return highest; -} - -/* - * A table of the standard identifiers - */ - -struct wxStandardSymbolStruct -{ - char* m_name; - int m_id; -}; - -static wxStandardSymbolStruct sg_StandardSymbols[] = -{ - { "wxID_OK", wxID_OK }, - { "wxID_CANCEL", wxID_CANCEL }, - { "wxID_APPLY", wxID_APPLY }, -// { "wxID_STATIC", wxID_STATIC }, - { "wxID_YES", wxID_YES }, - { "wxID_NO", wxID_NO } -}; - -static int sg_StandardSymbolSize = (sizeof(sg_StandardSymbols)/sizeof(wxStandardSymbolStruct)); - -void wxResourceSymbolTable::AddStandardSymbols() -{ - int i; - for (i = 0; i < sg_StandardSymbolSize; i++) - { - AddSymbol(sg_StandardSymbols[i].m_name, sg_StandardSymbols[i].m_id); - } -} - -bool wxResourceSymbolTable::IsStandardSymbol(const wxString& symbol) const -{ - int i; - for (i = 0; i < sg_StandardSymbolSize; i++) - { - if (symbol == sg_StandardSymbols[i].m_name) - return TRUE; - } - return FALSE; -} - -bool wxResourceSymbolTable::FillComboBox(wxComboBox* comboBox) -{ - m_hashTable.BeginFind(); - - wxNode* node = m_hashTable.Next(); - while (node) - { - char* str = node->key.string; - - comboBox->Append(str); - node = m_hashTable.Next(); - } - return TRUE; -} - diff --git a/utils/dialoged/src/symbtabl.h b/utils/dialoged/src/symbtabl.h deleted file mode 100644 index 440b14b222..0000000000 --- a/utils/dialoged/src/symbtabl.h +++ /dev/null @@ -1,52 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: symbtabl.h -// Purpose: wxResourceSymbolTable class for storing/reading #defines -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _SYMBTABL_H_ -#define _SYMBTABL_H_ - -#ifdef __GNUG__ -#pragma interface "symbtabl.h" -#endif - -class wxResourceSymbolTable: public wxObject -{ -public: - wxResourceSymbolTable(); - ~wxResourceSymbolTable(); - -// Operations - bool ReadIncludeFile(const wxString& filename); - bool WriteIncludeFile(const wxString& filename); - void Clear(); - bool AddSymbol(const wxString& symbol, int id); - bool RemoveSymbol(const wxString& symbol); - bool RemoveSymbol(int id); - void AddStandardSymbols(); - bool FillComboBox(wxComboBox* comboBox); - -// Accessors - wxString GetSymbolForId(int id); - int GetIdForSymbol(const wxString& symbol); - bool SymbolExists(const wxString& symbol) const; - bool IdExists(int id) ; - bool IsStandardSymbol(const wxString& symbol) const; - int FindHighestId() ; - -// Implementation - -// Member variables -protected: - wxHashTable m_hashTable; -}; - -#endif - // _SYMBTABL_H_ - diff --git a/utils/dialoged/src/winprop.cpp b/utils/dialoged/src/winprop.cpp deleted file mode 100644 index d8b34a18ac..0000000000 --- a/utils/dialoged/src/winprop.cpp +++ /dev/null @@ -1,2270 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: winprop.cpp -// Purpose: Window properties -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "winprop.h" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include -#include -#include -#include - -#if defined(__WXMSW__) && !defined(__GNUWIN32__) -#include -#else -#include -#endif - -#ifdef __WXMSW__ -#include -#endif - -#include "reseditr.h" -#include "winprop.h" - -// Causes immediate feedback. -void wxResourcePropertyListView::OnPropertyChanged(wxProperty *property) -{ - // Sets the value of the property back into the actual object, - // IF the property value was modified. - if (property->GetValue().GetModified()) - { - propertyInfo->SetProperty(property->GetName(), property); - property->GetValue().SetModified(FALSE); - } -} - -bool wxResourcePropertyListView::OnClose(void) -{ - int w, h, x, y; - GetManagedWindow()->GetSize(& w, & h); - GetManagedWindow()->GetPosition(& x, & y); - - wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().width = w; - wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().height = h; - wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().x = x; - wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().y = y; - - return wxPropertyListView::OnClose(); -} - -wxWindow *wxPropertyInfo::sm_propertyWindow; - -/* - * wxDialogEditorPropertyListDialog - */ - - /* -wxDialogEditorPropertyListDialog::wxDialogEditorPropertyListDialog(wxPropertyListView *v, wxWindow *parent, const wxString& title, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name): - wxPropertyListDialog(v, parent, title, pos, size, style, name) -{ - m_propSheet = NULL; - m_propInfo = NULL; -} - -wxDialogEditorPropertyListDialog::~wxDialogEditorPropertyListDialog() -{ - delete m_propSheet; - delete m_propInfo; - wxPropertyInfo::sm_propertyWindow = NULL; -} -*/ - -wxDialogEditorPropertyListFrame::wxDialogEditorPropertyListFrame(wxPropertyListView *v, wxFrame *parent, const wxString& title, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name): - wxPropertyListFrame(v, parent, title, pos, size, style, name) -{ - m_propSheet = NULL; - m_propInfo = NULL; -} - -wxDialogEditorPropertyListFrame::~wxDialogEditorPropertyListFrame() -{ - delete m_propSheet; - delete m_propInfo; - wxPropertyInfo::sm_propertyWindow = NULL; -} - -/* - * wxPropertyInfo - */ - -// Edit the information represented by this object, whatever that -// might be. -bool wxPropertyInfo::Edit(wxWindow *parent, const wxString& title) -{ - if (sm_propertyWindow) - return FALSE; - - int width = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().width; - int height = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().height; - int x = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().x; - int y = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().y; - - wxPropertySheet *propSheet = new wxPropertySheet; - - wxStringList propNames; - GetPropertyNames(propNames); - - wxNode *node = propNames.First(); - while (node) - { - wxString name((char *)node->Data()); - wxProperty *prop = GetProperty(name); - if (prop) - { - propSheet->AddProperty(prop); - } - node = node->Next(); - } - - // Reset 'modified' flags for all property values - propSheet->SetAllModified(FALSE); - - wxResourcePropertyListView *view = new wxResourcePropertyListView(this, NULL, - wxPROP_BUTTON_OK | wxPROP_BUTTON_CANCEL | - wxPROP_BUTTON_CHECK_CROSS|wxPROP_DYNAMIC_VALUE_FIELD|wxPROP_PULLDOWN|wxPROP_SHOWVALUES); - - wxDialogEditorPropertyListFrame *propWin = new wxDialogEditorPropertyListFrame(view, - wxResourceManager::GetCurrentResourceManager()->GetEditorFrame(), title, wxPoint(x, y), - wxSize(width, height), wxDEFAULT_FRAME_STYLE); - sm_propertyWindow = propWin; - - propWin->m_registry.RegisterValidator((wxString)"real", new wxRealListValidator); - propWin->m_registry.RegisterValidator((wxString)"string", new wxStringListValidator); - propWin->m_registry.RegisterValidator((wxString)"integer", new wxIntegerListValidator); - propWin->m_registry.RegisterValidator((wxString)"bool", new wxBoolListValidator); - propWin->m_registry.RegisterValidator((wxString)"filename", new wxFilenameListValidator); - propWin->m_registry.RegisterValidator((wxString)"stringlist", new wxListOfStringsListValidator); - propWin->m_registry.RegisterValidator((wxString)"window_id", new wxResourceSymbolValidator); - - propWin->m_propInfo = this; - propWin->m_propSheet = propSheet; - -// view->propertyWindow = propWin; - view->AddRegistry(&(propWin->m_registry)); - - propWin->Initialize(); - view->ShowView(propSheet, propWin->GetPropertyPanel()); - - propWin->Show(TRUE); - return TRUE; -} - -/* - * wxWindowPropertyInfo - */ - -wxWindowPropertyInfo::wxWindowPropertyInfo(wxWindow *win, wxItemResource *res) -{ - propertyWindow = win; - propertyResource = res; -} - -wxWindowPropertyInfo::~wxWindowPropertyInfo(void) -{ -} - -wxProperty *wxWindowPropertyInfo::GetFontProperty(wxString& name, wxFont *font) -{ - if (!font) - return NULL; - - if (name.Contains("Points")) - return new wxProperty(name, (long)font->GetPointSize(), "integer", new wxIntegerListValidator(1, 100)); - else if (name.Contains("Family")) - return new wxProperty(name, font->GetFamilyString(), "string", - new wxStringListValidator(new wxStringList("wxDECORATIVE", "wxROMAN", "wxSCRIPT", "wxSWISS", "wxMODERN", - NULL))); - else if (name.Contains("Style")) - return new wxProperty(name, font->GetStyleString(), "string", - new wxStringListValidator(new wxStringList("wxNORMAL", "wxITALIC", "wxSLANT", NULL))); - else if (name.Contains("Weight")) - return new wxProperty(name, font->GetWeightString(), "string", - new wxStringListValidator(new wxStringList("wxNORMAL", "wxBOLD", "wxLIGHT", NULL))); - else if (name.Contains("Underlined")) - return new wxProperty(name, (bool)font->GetUnderlined(), "bool"); - else - return NULL; -} - -wxFont *wxWindowPropertyInfo::SetFontProperty(wxString& name, wxProperty *property, wxFont *font) -{ - int pointSize = 12; - int fontFamily = wxMODERN; - int fontStyle = wxNORMAL; - int fontWeight = wxNORMAL; - bool fontUnderlined = FALSE; - - if (name.Contains("Points")) - { - pointSize = (int)property->GetValue().IntegerValue(); - if (font && (pointSize == font->GetPointSize())) - return NULL; // No change - } - else if (font) pointSize = font->GetPointSize(); - - if (name.Contains("Family")) - { - wxString val = property->GetValue().StringValue(); - fontFamily = wxStringToFontFamily(val); - - if (font && (fontFamily == font->GetFamily())) - return NULL; // No change - } - else if (font) fontFamily = font->GetFamily(); - - if (name.Contains("Style")) - { - wxString val = property->GetValue().StringValue(); - fontStyle = wxStringToFontStyle(val); - - if (font && (fontStyle == font->GetStyle())) - return NULL; // No change - } - else if (font) fontStyle = font->GetStyle(); - if (name.Contains("Weight")) - { - wxString val = property->GetValue().StringValue(); - fontWeight = wxStringToFontWeight(val); - - if (font && (fontWeight == font->GetWeight())) - return NULL; // No change - } - else if (font) fontWeight = font->GetWeight(); - - if (name.Contains("Underlined")) - { - fontUnderlined = property->GetValue().BoolValue(); - - if (font && (fontUnderlined == font->GetUnderlined())) - return NULL; // No change - } - else if (font) fontUnderlined = font->GetUnderlined(); - - wxFont *newFont = wxTheFontList->FindOrCreateFont(pointSize, fontFamily, fontStyle, fontWeight, fontUnderlined); - if (newFont) - { - return newFont; - } - else - return NULL; -} - -wxProperty *wxWindowPropertyInfo::GetProperty(wxString& name) -{ - wxFont *font = propertyWindow->GetFont(); - if (name == "fontPoints" || name == "fontFamily" || name == "fontStyle" || name == "fontWeight" || - name == "fontUnderlined") - return GetFontProperty(name, font); - else if (name == "name") - return new wxProperty("name", propertyWindow->GetName(), "string"); - else if (name == "title") - return new wxProperty("title", propertyWindow->GetTitle(), "string"); - else if (name == "x") - { - int x, y; - propertyWindow->GetPosition(&x, &y); - return new wxProperty("x", (long)x, "integer"); - } - else if (name == "y") - { - int x, y; - propertyWindow->GetPosition(&x, &y); - return new wxProperty("y", (long)y, "integer"); - } - else if (name == "width") - { - int width, height; - propertyWindow->GetSize(&width, &height); - return new wxProperty("width", (long)width, "integer"); - } - else if (name == "height") - { - int width, height; - propertyWindow->GetSize(&width, &height); - return new wxProperty("height", (long)height, "integer"); - } - else if (name == "id") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(propertyWindow); - if (resource) - { - int id = resource->GetId(); - wxString idStr; - idStr.Printf("%d", id); - wxString symbolName = wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().GetSymbolForId(id); - symbolName += "="; - symbolName += idStr; - // symbolName is now e.g. "ID_PANEL21=105" - return new wxProperty("id", symbolName, "window_id"); - } - else - return NULL; - } - else - return NULL; -} - -bool wxWindowPropertyInfo::SetProperty(wxString& name, wxProperty *property) -{ - wxFont *font = propertyWindow->GetFont(); - if (font && (name == "fontPoints" || name == "fontFamily" || name == "fontStyle" || name == "fontWeight" || name == "fontUnderlined" )) - { - wxFont *newFont = SetFontProperty(name, property, font); - if (newFont) - propertyWindow->SetFont(newFont); - return TRUE; - } - else if (name == "name") - { - // Remove old name from resource table, if it's there. - wxItemResource *oldResource = (wxItemResource *)wxResourceManager::GetCurrentResourceManager()->GetResourceTable().Delete(propertyWindow->GetName()); - if (oldResource) - { - // It's a top-level resource - propertyWindow->SetName(property->GetValue().StringValue()); - oldResource->SetName(property->GetValue().StringValue()); - wxResourceManager::GetCurrentResourceManager()->GetResourceTable().Put(propertyWindow->GetName(), oldResource); - } - else - { - // It's a child of something; just set the name of the resource and the window. - propertyWindow->SetName(property->GetValue().StringValue()); - propertyResource->SetName(property->GetValue().StringValue()); - } - // Refresh the resource manager list, because the name changed. - wxResourceManager::GetCurrentResourceManager()->UpdateResourceList(); - return TRUE; - } - else if (name == "title") - { - propertyWindow->SetTitle(property->GetValue().StringValue()); - return TRUE; - } - else if (name == "x") - { - int x, y; - propertyWindow->GetPosition(&x, &y); - int newX = (int)property->GetValue().IntegerValue(); - if (x != newX) - propertyWindow->Move(newX, y); - return TRUE; - } - else if (name == "y") - { - int x, y; - propertyWindow->GetPosition(&x, &y); - int newY = (int)property->GetValue().IntegerValue(); - if (y != newY) - propertyWindow->Move(x, newY); - return TRUE; - } - else if (name == "width") - { - int width, height; - propertyWindow->GetSize(&width, &height); - int newWidth = (int)property->GetValue().IntegerValue(); - if (width != newWidth) - { - propertyWindow->SetSize(newWidth, height); -/* - if (propertyWindow->IsKindOf(CLASSINFO(wxPanel)) && !propertyWindow->IsKindOf(CLASSINFO(wxDialog))) - { - propertyWindow->GetParent()->SetClientSize(newWidth, height); - } -*/ - } - return TRUE; - } - else if (name == "height") - { - int width, height; - propertyWindow->GetSize(&width, &height); - int newHeight = (int)property->GetValue().IntegerValue(); - if (height != newHeight) - { - propertyWindow->SetSize(width, newHeight); -/* - if (propertyWindow->IsKindOf(CLASSINFO(wxPanel)) && !propertyWindow->IsKindOf(CLASSINFO(wxDialog))) - { - propertyWindow->GetParent()->SetClientSize(width, newHeight); - } -*/ - } - return TRUE; - } - else if (name == "id") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(propertyWindow); - if (resource) - { - wxString value = property->GetValue().StringValue(); - - wxString strName = value.Before('='); - wxString strId = value.After('='); - int id = atoi(strId); - - wxString oldSymbolName = wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().GetSymbolForId(resource->GetId()); - int oldSymbolId = resource->GetId(); - - if (strName != "") - { - // If we change the id for an existing symbol, we need to: - // 1) Check if there are any other resources currently using the original id. - // If so, will need to change their id to the new id. - // 2) Remove the old symbol, add the new symbol. - // In this check, we don't have to do this, but we need to do it in SetProperty. - - if (strName == oldSymbolName && id != oldSymbolId) - { - wxASSERT( (!wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().IsStandardSymbol(oldSymbolName)) ); - - // It's OK to change just the id. But we'll need to change all matching ids in all resources, - // because ids are unique and changing one resource's id must change all identical ones. - wxResourceManager::GetCurrentResourceManager()->ChangeIds(oldSymbolId, id); - - wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().RemoveSymbol(oldSymbolName); - wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().AddSymbol(strName, id); - } - - // If we change the name but not the id, we'll just need to remove and - // re-add the symbol/id pair. - if (strName != oldSymbolName && id == oldSymbolId) - { - wxASSERT( (!wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().IsStandardSymbol(oldSymbolName)) ); - - wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().RemoveSymbol(oldSymbolName); - - if (!wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().SymbolExists(strName)) - { - wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().AddSymbol(strName, id); - } - } - - // What if we're changing both the name and the id? - // - if there's no symbol of that name, just remove the old, add the new (in SetProperty) - // - if there is a symbol of that name, if id matches, do nothing. If not, veto. - - if (strName != oldSymbolName && id != oldSymbolId) - { - // Remove old symbol if it's not being used - if (!wxResourceManager::GetCurrentResourceManager()->IsSymbolUsed(resource, oldSymbolId) && - !wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().IsStandardSymbol(oldSymbolName)) - { - wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().RemoveSymbol(oldSymbolName); - } - - if (!wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().SymbolExists(strName)) - { - wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().AddSymbol(strName, id); - } - } - resource->SetId(id); - } - - return TRUE; - } - else - return FALSE; - } - else - return FALSE; -} - -void wxWindowPropertyInfo::GetPropertyNames(wxStringList& names) -{ - names.Add("id"); - names.Add("name"); - names.Add("x"); - names.Add("y"); - names.Add("width"); - names.Add("height"); - if (!propertyWindow->IsKindOf(CLASSINFO(wxControl))) - { - names.Add("fontPoints"); - names.Add("fontFamily"); - names.Add("fontStyle"); - names.Add("fontWeight"); - names.Add("fontUnderlined"); - } -} - -// Fill in the wxItemResource members to mirror the current window settings -bool wxWindowPropertyInfo::InstantiateResource(wxItemResource *resource) -{ -// resource->SetType(propertyWindow->GetClassInfo()->GetClassName()); - -// resource->SetStyle(propertyWindow->GetWindowStyleFlag()); - wxString str(propertyWindow->GetName()); - resource->SetName(WXSTRINGCAST str); - int x, y, w, h; - propertyWindow->GetSize(&w, &h); - - propertyWindow->GetPosition(&x, &y); - resource->SetSize(x, y, w, h); - return TRUE; -} - -// Set the window style -void wxWindowPropertyInfo::SetWindowStyle(wxWindow* win, long style, bool set) -{ - if (style == 0) - return; - - if ((win->GetWindowStyleFlag() & style) == style) - { - if (!set) - { - win->SetWindowStyleFlag(win->GetWindowStyleFlag() - style); - } - } - else - { - if (set) - { - win->SetWindowStyleFlag(win->GetWindowStyleFlag() | style); - } - } -} - -/* - * Controls - */ - -wxProperty *wxItemPropertyInfo::GetProperty(wxString& name) -{ - wxControl *itemWindow = (wxControl *)propertyWindow; - wxFont *font = itemWindow->GetFont(); - - if (name == "fontPoints" || name == "fontFamily" || name == "fontStyle" || name == "fontWeight" || - name == "fontUnderlined") - return GetFontProperty(name, font); - else if (name == "label" && itemWindow->GetLabel()) - return new wxProperty("label", propertyWindow->GetLabel(), "string"); - else - return wxWindowPropertyInfo::GetProperty(name); -} - -bool wxItemPropertyInfo::SetProperty(wxString& name, wxProperty *property) -{ - wxControl *itemWindow = (wxControl *)propertyWindow; - wxFont *font = itemWindow->GetFont(); - - if (font && (name == "fontPoints" || name == "fontFamily" || name == "fontStyle" || name == "fontWeight" || name == "fontUnderlined" )) - { - wxFont *newFont = SetFontProperty(name, property, font); - if (newFont) - itemWindow->SetLabelFont(newFont); - return TRUE; - } - else if (name == "label") - { - itemWindow->SetLabel(property->GetValue().StringValue()); - return TRUE; - } - else - return wxWindowPropertyInfo::SetProperty(name, property); -} - -void wxItemPropertyInfo::GetPropertyNames(wxStringList& names) -{ - wxWindowPropertyInfo::GetPropertyNames(names); - - names.Add("fontPoints"); - names.Add("fontFamily"); - names.Add("fontStyle"); - names.Add("fontWeight"); - names.Add("fontUnderlined"); -} - -bool wxItemPropertyInfo::InstantiateResource(wxItemResource *resource) -{ - wxWindowPropertyInfo::InstantiateResource(resource); - - wxControl *item = (wxControl *)propertyWindow; - wxString str(item->GetLabel()); - resource->SetTitle(WXSTRINGCAST str); - if (item->GetFont() && item->GetFont()->Ok()) - resource->SetFont(wxTheFontList->FindOrCreateFont(item->GetFont()->GetPointSize(), - item->GetFont()->GetFamily(), item->GetFont()->GetStyle(), item->GetFont()->GetWeight(), - item->GetFont()->GetUnderlined(), item->GetFont()->GetFaceName())); - return TRUE; -} - -/* - * Button - */ - -wxProperty *wxButtonPropertyInfo::GetProperty(wxString& name) -{ - wxButton *button = (wxButton *)propertyWindow; - return wxItemPropertyInfo::GetProperty(name); -} - -bool wxButtonPropertyInfo::SetProperty(wxString& name, wxProperty *property) -{ - wxButton *button = (wxButton *)propertyWindow; - return wxItemPropertyInfo::SetProperty(name, property); -} - -void wxButtonPropertyInfo::GetPropertyNames(wxStringList& names) -{ - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("label"); -} - -bool wxButtonPropertyInfo::InstantiateResource(wxItemResource *resource) -{ - return wxItemPropertyInfo::InstantiateResource(resource); -} - -/* - * wxBitmapButton - */ - -wxProperty *wxBitmapButtonPropertyInfo::GetProperty(wxString& name) -{ - wxBitmapButton *button = (wxBitmapButton *)propertyWindow; - if (name == "label") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(button); - wxString str("none.bmp"); - - if (resource) - { - char *filename = wxResourceManager::GetCurrentResourceManager()->FindBitmapFilenameForResource(resource); - if (filename) - str = filename; - } - return new wxProperty("label", str.GetData(), "string", new wxFilenameListValidator("Select a bitmap file", "*.bmp")); - } - else - return wxButtonPropertyInfo::GetProperty(name); -} - -bool wxBitmapButtonPropertyInfo::SetProperty(wxString& name, wxProperty *property) -{ - wxBitmapButton *button = (wxBitmapButton *)propertyWindow; - if (name == "label") - { - char *s = property->GetValue().StringValue(); - if (s && wxFileExists(s)) - { - s = copystring(s); - wxBitmap *bitmap = new wxBitmap(s, wxBITMAP_TYPE_BMP); - if (!bitmap->Ok()) - { - delete bitmap; - delete[] s; - return FALSE; - } - else - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(button); - if (resource) - { - wxString oldResource(resource->GetValue4()); - char *resName = wxResourceManager::GetCurrentResourceManager()->AddBitmapResource(s); - resource->SetValue4(resName); - - if (!oldResource.IsNull()) - wxResourceManager::GetCurrentResourceManager()->PossiblyDeleteBitmapResource(WXSTRINGCAST oldResource); - } - - button->SetLabel(bitmap); - delete[] s; - return TRUE; - } - } - return FALSE; - } - else - return wxButtonPropertyInfo::SetProperty(name, property); -} - -void wxBitmapButtonPropertyInfo::GetPropertyNames(wxStringList& names) -{ -// names.Add("label"); - wxButtonPropertyInfo::GetPropertyNames(names); -} - -bool wxBitmapButtonPropertyInfo::InstantiateResource(wxItemResource *resource) -{ - return wxItemPropertyInfo::InstantiateResource(resource); -} - -/* - * wxStaticText - */ - -wxProperty *wxStaticTextPropertyInfo::GetProperty(wxString& name) -{ - wxStaticText *message = (wxStaticText *)propertyWindow; - return wxItemPropertyInfo::GetProperty(name); -} - -bool wxStaticTextPropertyInfo::SetProperty(wxString& name, wxProperty *property) -{ - wxStaticText *message = (wxStaticText *)propertyWindow; - return wxItemPropertyInfo::SetProperty(name, property); -} - -void wxStaticTextPropertyInfo::GetPropertyNames(wxStringList& names) -{ - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("label"); -} - -bool wxStaticTextPropertyInfo::InstantiateResource(wxItemResource *resource) -{ - return wxItemPropertyInfo::InstantiateResource(resource); -} - -/* - * wxStaticBitmap - */ - -wxProperty *wxStaticBitmapPropertyInfo::GetProperty(wxString& name) -{ - wxStaticBitmap *message = (wxStaticBitmap *)propertyWindow; - if (name == "label") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(message); - wxString str("none.bmp"); - - if (resource) - { - char *filename = wxResourceManager::GetCurrentResourceManager()->FindBitmapFilenameForResource(resource); - if (filename) - str = filename; - } - return new wxProperty("label", str.GetData(), "string", new wxFilenameListValidator("Select a bitmap file", "*.bmp")); - } - else - return wxItemPropertyInfo::GetProperty(name); -} - -bool wxStaticBitmapPropertyInfo::SetProperty(wxString& name, wxProperty *property) -{ - wxStaticBitmap *message = (wxStaticBitmap *)propertyWindow; - if (name == "label") - { - char *s = property->GetValue().StringValue(); - if (s && wxFileExists(s)) - { - s = copystring(s); - - wxBitmap *bitmap = new wxBitmap(s, wxBITMAP_TYPE_BMP); - if (!bitmap->Ok()) - { - delete bitmap; - delete[] s; - return FALSE; - } - else - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(message); - if (resource) - { - wxString oldResource(resource->GetValue4()); - char *resName = wxResourceManager::GetCurrentResourceManager()->AddBitmapResource(s); - resource->SetValue4(resName); - - if (!oldResource.IsNull()) - wxResourceManager::GetCurrentResourceManager()->PossiblyDeleteBitmapResource(WXSTRINGCAST oldResource); - } - - message->SetBitmap(bitmap); - delete[] s; - return TRUE; - } - } - return FALSE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); -} - -void wxStaticBitmapPropertyInfo::GetPropertyNames(wxStringList& names) -{ - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("label"); -} - -bool wxStaticBitmapPropertyInfo::InstantiateResource(wxItemResource *resource) -{ - return wxItemPropertyInfo::InstantiateResource(resource); -} - -/* - * Text item - */ - -wxProperty *wxTextPropertyInfo::GetProperty(wxString& name) -{ - wxTextCtrl *text = (wxTextCtrl *)propertyWindow; - if (name == "value") - return new wxProperty("value", text->GetValue(), "string"); - else if (name == "password") - { - bool isPassword = ((text->GetWindowStyleFlag() & wxTE_PASSWORD) == wxTE_PASSWORD); - return new wxProperty("password", isPassword, "bool"); - } - else if (name == "readonly") - { - bool isReadOnly = ((text->GetWindowStyleFlag() & wxTE_READONLY) == wxTE_READONLY); - return new wxProperty("readonly", isReadOnly, "bool"); - } - else - return wxItemPropertyInfo::GetProperty(name); -} - -bool wxTextPropertyInfo::SetProperty(wxString& name, wxProperty *property) -{ - wxTextCtrl *text = (wxTextCtrl *)propertyWindow; - if (name == "value") - { - text->SetValue(property->GetValue().StringValue()); - return TRUE; - } - else if (name == "password") - { - long flag = text->GetWindowStyleFlag(); - if (property->GetValue().BoolValue()) - { - if ((flag & wxTE_PASSWORD) != wxTE_PASSWORD) - flag |= wxTE_PASSWORD; - } - else - { - if ((flag & wxTE_PASSWORD) == wxTE_PASSWORD) - flag -= wxTE_PASSWORD; - } - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(text); - resource->SetStyle(flag); - - wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(text, this); - return TRUE; - } - else if (name == "readonly") - { - long flag = text->GetWindowStyleFlag(); - if (property->GetValue().BoolValue()) - { - if ((flag & wxTE_READONLY) != wxTE_READONLY) - flag |= wxTE_READONLY; - } - else - { - if ((flag & wxTE_READONLY) == wxTE_READONLY) - flag -= wxTE_READONLY; - } - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(text); - resource->SetStyle(flag); - - wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(text, this); - return TRUE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); -} - -void wxTextPropertyInfo::GetPropertyNames(wxStringList& names) -{ - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("value"); - names.Add("readonly"); - names.Add("password"); -} - -bool wxTextPropertyInfo::InstantiateResource(wxItemResource *resource) -{ - wxTextCtrl *text = (wxTextCtrl *)propertyWindow; - wxString str(text->GetValue()); - resource->SetValue4(WXSTRINGCAST str); - - return wxItemPropertyInfo::InstantiateResource(resource); -} - -/* - * Listbox item - */ - -wxProperty *wxListBoxPropertyInfo::GetProperty(wxString& name) -{ - wxListBox *listBox = (wxListBox *)propertyWindow; - if (name == "values") - { - wxStringList *stringList = new wxStringList; - int i; - for (i = 0; i < listBox->Number(); i++) - stringList->Add(listBox->GetString(i)); - - return new wxProperty(name, stringList, "stringlist"); - } - else if (name == "multiple") - { - char *pos = NULL; - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(listBox); - if (!resource) - return NULL; - - char *mult = "wxSINGLE"; - - switch (resource->GetValue1()) - { - case wxLB_MULTIPLE: - mult = "wxLB_MULTIPLE"; - break; - case wxLB_EXTENDED: - mult = "wxLB_EXTENDED"; - break; - default: - case wxLB_SINGLE: - mult = "wxLB_SINGLE"; - break; - } - return new wxProperty("multiple", mult, "string", - new wxStringListValidator(new wxStringList("wxLB_SINGLE", "wxLB_MULTIPLE", "wxLB_EXTENDED", - NULL))); - } - else - return wxItemPropertyInfo::GetProperty(name); -} - -bool wxListBoxPropertyInfo::SetProperty(wxString& name, wxProperty *property) -{ - wxListBox *listBox = (wxListBox *)propertyWindow; - if (name == "values") - { - listBox->Clear(); - wxPropertyValue *expr = property->GetValue().GetFirst(); - while (expr) - { - char *s = expr->StringValue(); - if (s) - listBox->Append(s); - expr = expr->GetNext(); - } - return TRUE; - } - else if (name == "multiple") - { - int mult = wxLB_SINGLE; - wxString str(property->GetValue().StringValue()); - if (str == "wxLB_MULTIPLE") - mult = wxLB_MULTIPLE; - else if (str == "wxLB_EXTENDED") - mult = wxLB_EXTENDED; - else - mult = wxLB_SINGLE; - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(listBox); - if (resource) - resource->SetValue1(mult); - wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(listBox, this); - return TRUE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); -} - -void wxListBoxPropertyInfo::GetPropertyNames(wxStringList& names) -{ - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("values"); - names.Add("multiple"); -} - -bool wxListBoxPropertyInfo::InstantiateResource(wxItemResource *resource) -{ - wxListBox *lbox = (wxListBox *)propertyWindow; - // This will be set for the wxItemResource on reading or in SetProperty -// resource->SetValue1(lbox->GetSelectionMode()); - int i; - if (lbox->Number() == 0) - resource->SetStringValues(NULL); - else - { - wxStringList *slist = new wxStringList; - - for (i = 0; i < lbox->Number(); i++) - slist->Add(lbox->GetString(i)); - - resource->SetStringValues(slist); - } - return wxItemPropertyInfo::InstantiateResource(resource); -} - -/* - * Choice item - */ - -wxProperty *wxChoicePropertyInfo::GetProperty(wxString& name) -{ - wxChoice *choice = (wxChoice *)propertyWindow; - if (name == "values") - { - wxStringList *stringList = new wxStringList; - int i; - for (i = 0; i < choice->Number(); i++) - stringList->Add(choice->GetString(i)); - - return new wxProperty(name, stringList, "stringlist"); - } - else - return wxItemPropertyInfo::GetProperty(name); -} - -bool wxChoicePropertyInfo::SetProperty(wxString& name, wxProperty *property) -{ - wxChoice *choice = (wxChoice *)propertyWindow; - if (name == "values") - { - choice->Clear(); - wxPropertyValue *expr = property->GetValue().GetFirst(); - while (expr) - { - char *s = expr->StringValue(); - if (s) - choice->Append(s); - expr = expr->GetNext(); - } - if (choice->Number() > 0) - choice->SetSelection(0); - return TRUE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); -} - -void wxChoicePropertyInfo::GetPropertyNames(wxStringList& names) -{ - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("values"); -} - -bool wxChoicePropertyInfo::InstantiateResource(wxItemResource *resource) -{ - wxChoice *choice = (wxChoice *)propertyWindow; - int i; - if (choice->Number() == 0) - resource->SetStringValues(NULL); - else - { - wxStringList *slist = new wxStringList; - - for (i = 0; i < choice->Number(); i++) - slist->Add(choice->GetString(i)); - - resource->SetStringValues(slist); - } - return wxItemPropertyInfo::InstantiateResource(resource); -} - -/* - * Choice item - */ - -wxProperty *wxComboBoxPropertyInfo::GetProperty(wxString& name) -{ - wxComboBox *choice = (wxComboBox *)propertyWindow; - if (name == "values") - { - wxStringList *stringList = new wxStringList; - int i; - for (i = 0; i < choice->Number(); i++) - stringList->Add(choice->GetString(i)); - - return new wxProperty(name, stringList, "stringlist"); - } - else if (name == "sort") - { - bool sort = ((propertyWindow->GetWindowStyleFlag() & wxCB_SORT) == wxCB_SORT); - return new wxProperty(name, sort, "bool"); - } - else if (name == "style") - { - wxString styleStr("dropdown"); - if (propertyWindow->GetWindowStyleFlag() & wxCB_SIMPLE) - styleStr = "simple"; - else if (propertyWindow->GetWindowStyleFlag() & wxCB_READONLY) - styleStr = "readonly"; - else - styleStr = "dropdown"; - - return new wxProperty(name, styleStr, "string", - new wxStringListValidator(new wxStringList("simple", "dropdown", "readonly", - NULL))); - } - else - return wxItemPropertyInfo::GetProperty(name); -} - -bool wxComboBoxPropertyInfo::SetProperty(wxString& name, wxProperty *property) -{ - wxComboBox *choice = (wxComboBox *)propertyWindow; - if (name == "values") - { - choice->Clear(); - wxPropertyValue *expr = property->GetValue().GetFirst(); - while (expr) - { - char *s = expr->StringValue(); - if (s) - choice->Append(s); - expr = expr->GetNext(); - } - if (choice->Number() > 0) - choice->SetSelection(0); - return TRUE; - } - else if (name == "sort") - { - SetWindowStyle(propertyWindow, wxCB_SORT, property->GetValue().BoolValue()); - - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(propertyWindow); - resource->SetStyle(propertyWindow->GetWindowStyleFlag()); - - wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(propertyWindow, this); - return TRUE; - } - else if (name == "style") - { - SetWindowStyle(propertyWindow, wxCB_SIMPLE, FALSE); - SetWindowStyle(propertyWindow, wxCB_DROPDOWN, FALSE); - SetWindowStyle(propertyWindow, wxCB_READONLY, FALSE); - - wxString styleStr(property->GetValue().StringValue()); - if (styleStr == "simple") - SetWindowStyle(propertyWindow, wxCB_SIMPLE, TRUE); - else if (styleStr == "dropdown") - SetWindowStyle(propertyWindow, wxCB_DROPDOWN, TRUE); - else if (styleStr == "readonly") - SetWindowStyle(propertyWindow, wxCB_READONLY, TRUE); - - // Necesary? - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(propertyWindow); - resource->SetStyle(propertyWindow->GetWindowStyleFlag()); - - wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(propertyWindow, this); - - return TRUE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); -} - -void wxComboBoxPropertyInfo::GetPropertyNames(wxStringList& names) -{ - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("values"); - names.Add("style"); - names.Add("sort"); -} - -bool wxComboBoxPropertyInfo::InstantiateResource(wxItemResource *resource) -{ - wxComboBox *choice = (wxComboBox *)propertyWindow; - int i; - if (choice->Number() == 0) - resource->SetStringValues(NULL); - else - { - wxStringList *slist = new wxStringList; - - for (i = 0; i < choice->Number(); i++) - slist->Add(choice->GetString(i)); - - resource->SetStringValues(slist); - } - return wxItemPropertyInfo::InstantiateResource(resource); -} - -/* - * Radiobox item - */ - -wxProperty *wxRadioBoxPropertyInfo::GetProperty(wxString& name) -{ - wxRadioBox *radioBox = (wxRadioBox *)propertyWindow; - if (name == "numberRowsOrCols") - { - return new wxProperty("numberRowsOrCols", (long)radioBox->GetNumberOfRowsOrCols(), "integer"); - } - if (name == "orientation") - { - char *pos = NULL; - if (propertyWindow->GetWindowStyleFlag() & wxHORIZONTAL) - pos = "wxHORIZONTAL"; - else - pos = "wxVERTICAL"; - - return new wxProperty("orientation", pos, "string", - new wxStringListValidator(new wxStringList("wxHORIZONTAL", "wxVERTICAL", - NULL))); - } - else if (name == "values") - { - wxStringList *stringList = new wxStringList; - int i; - for (i = 0; i < radioBox->Number(); i++) - stringList->Add(radioBox->GetString(i)); - - return new wxProperty(name, stringList, "stringlist"); - } - return wxItemPropertyInfo::GetProperty(name); -} - -bool wxRadioBoxPropertyInfo::SetProperty(wxString& name, wxProperty *property) -{ - wxRadioBox *radioBox = (wxRadioBox *)propertyWindow; - if (name == "numberRowsOrCols") - { - radioBox->SetNumberOfRowsOrCols((int)property->GetValue().IntegerValue()); - wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(radioBox, this); - return TRUE; - } - else if (name == "orientation") - { - long windowStyle = radioBox->GetWindowStyleFlag(); - wxString val(property->GetValue().StringValue()); - if (val == "wxHORIZONTAL") - { - if (windowStyle & wxVERTICAL) - windowStyle -= wxVERTICAL; - windowStyle |= wxHORIZONTAL; - } - else - { - if (windowStyle & wxHORIZONTAL) - windowStyle -= wxHORIZONTAL; - windowStyle |= wxVERTICAL; - } - radioBox->SetWindowStyleFlag(windowStyle); - - wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(radioBox, this); - return TRUE; - } - else if (name == "values") - { - // Set property into *resource*, not wxRadioBox, and then recreate - // the wxRadioBox. This is because we can't dynamically set the strings - // of a wxRadioBox. - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(propertyWindow); - if (!resource) - return FALSE; - - wxStringList *stringList = resource->GetStringValues(); - if (!stringList) - { - stringList = new wxStringList; - resource->SetStringValues(stringList); - } - stringList->Clear(); - - wxPropertyValue *expr = property->GetValue().GetFirst(); - while (expr) - { - char *s = expr->StringValue(); - if (s) - stringList->Add(s); - expr = expr->GetNext(); - } - wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(radioBox, this); - return TRUE; - } - return wxItemPropertyInfo::SetProperty(name, property); -} - -void wxRadioBoxPropertyInfo::GetPropertyNames(wxStringList& names) -{ - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("label"); - names.Add("values"); - names.Add("orientation"); - names.Add("numberRowsOrCols"); -} - -bool wxRadioBoxPropertyInfo::InstantiateResource(wxItemResource *resource) -{ - wxRadioBox *rbox = (wxRadioBox *)propertyWindow; - // Take strings from resource instead -/* - int i; - if (rbox->Number() == 0) - resource->SetStringValues(NULL); - else - { - wxStringList *slist = new wxStringList; - - for (i = 0; i < rbox->Number(); i++) - slist->Add(rbox->GetString(i)); - - resource->SetStringValues(slist); - } -*/ - resource->SetValue1(rbox->GetNumberOfRowsOrCols()); - return wxItemPropertyInfo::InstantiateResource(resource); -} - -/* - * Groupbox item - */ - -wxProperty *wxGroupBoxPropertyInfo::GetProperty(wxString& name) -{ - wxStaticBox *groupBox = (wxStaticBox *)propertyWindow; - return wxItemPropertyInfo::GetProperty(name); -} - -bool wxGroupBoxPropertyInfo::SetProperty(wxString& name, wxProperty *property) -{ - return wxItemPropertyInfo::SetProperty(name, property); -} - -void wxGroupBoxPropertyInfo::GetPropertyNames(wxStringList& names) -{ - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("label"); -} - -bool wxGroupBoxPropertyInfo::InstantiateResource(wxItemResource *resource) -{ - wxStaticBox *gbox = (wxStaticBox *)propertyWindow; - return wxItemPropertyInfo::InstantiateResource(resource); -} - -/* - * Checkbox item - */ - -wxProperty *wxCheckBoxPropertyInfo::GetProperty(wxString& name) -{ - wxCheckBox *checkBox = (wxCheckBox *)propertyWindow; - if (name == "value") - return new wxProperty("value", checkBox->GetValue(), "bool"); - else - return wxItemPropertyInfo::GetProperty(name); -} - -bool wxCheckBoxPropertyInfo::SetProperty(wxString& name, wxProperty *property) -{ - wxCheckBox *checkBox = (wxCheckBox *)propertyWindow; - if (name == "value") - { - checkBox->SetValue((bool)property->GetValue().BoolValue()); - return TRUE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); -} - -void wxCheckBoxPropertyInfo::GetPropertyNames(wxStringList& names) -{ - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("label"); - names.Add("value"); -} - -bool wxCheckBoxPropertyInfo::InstantiateResource(wxItemResource *resource) -{ - wxCheckBox *cbox = (wxCheckBox *)propertyWindow; - resource->SetValue1(cbox->GetValue()); - return wxItemPropertyInfo::InstantiateResource(resource); -} - -/* - * Radiobutton item - */ - -wxProperty *wxRadioButtonPropertyInfo::GetProperty(wxString& name) -{ - wxRadioButton *checkBox = (wxRadioButton *)propertyWindow; - if (name == "value") - return new wxProperty("value", checkBox->GetValue(), "bool"); - else - return wxItemPropertyInfo::GetProperty(name); -} - -bool wxRadioButtonPropertyInfo::SetProperty(wxString& name, wxProperty *property) -{ - wxRadioButton *checkBox = (wxRadioButton *)propertyWindow; - if (name == "value") - { - checkBox->SetValue((bool)property->GetValue().BoolValue()); - return TRUE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); -} - -void wxRadioButtonPropertyInfo::GetPropertyNames(wxStringList& names) -{ - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("label"); - names.Add("value"); -} - -bool wxRadioButtonPropertyInfo::InstantiateResource(wxItemResource *resource) -{ - wxRadioButton *cbox = (wxRadioButton *)propertyWindow; - resource->SetValue1(cbox->GetValue()); - return wxItemPropertyInfo::InstantiateResource(resource); -} - -/* - * Slider item - */ - -wxProperty *wxSliderPropertyInfo::GetProperty(wxString& name) -{ - wxSlider *slider = (wxSlider *)propertyWindow; - if (name == "value") - return new wxProperty("value", (long)slider->GetValue(), "integer"); - else if (name == "orientation") - { - char *pos = NULL; - if (propertyWindow->GetWindowStyleFlag() & wxHORIZONTAL) - pos = "wxHORIZONTAL"; - else - pos = "wxVERTICAL"; - - return new wxProperty("orientation", pos, "string", - new wxStringListValidator(new wxStringList("wxHORIZONTAL", "wxVERTICAL", - NULL))); - } - else if (name == "minValue") - return new wxProperty("minValue", (long)slider->GetMin(), "integer"); - else if (name == "maxValue") - return new wxProperty("maxValue", (long)slider->GetMax(), "integer"); - else - return wxItemPropertyInfo::GetProperty(name); -} - -bool wxSliderPropertyInfo::SetProperty(wxString& name, wxProperty *property) -{ - wxSlider *slider = (wxSlider *)propertyWindow; - if (name == "value") - { - slider->SetValue((int)property->GetValue().IntegerValue()); - return TRUE; - } - else if (name == "orientation") - { - long windowStyle = slider->GetWindowStyleFlag(); - long oldWindowStyle = windowStyle; - wxString val(property->GetValue().StringValue()); - if (val == "wxHORIZONTAL") - { - if (windowStyle & wxVERTICAL) - windowStyle -= wxVERTICAL; - windowStyle |= wxHORIZONTAL; - } - else - { - if (windowStyle & wxHORIZONTAL) - windowStyle -= wxHORIZONTAL; - windowStyle |= wxVERTICAL; - } - - if (oldWindowStyle == windowStyle) - return TRUE; - - slider->SetWindowStyleFlag(windowStyle); - - // If the window style has changed, we swap the width and height parameters. - int w, h; - slider->GetSize(&w, &h); - - slider = (wxSlider *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(slider, this); - slider->SetSize(-1, -1, h, w); - - return TRUE; - } - else if (name == "minValue") - { - slider->SetRange((int)property->GetValue().IntegerValue(), slider->GetMax()); - return TRUE; - } - else if (name == "maxValue") - { - slider->SetRange(slider->GetMin(), (int)property->GetValue().IntegerValue()); - return TRUE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); -} - -void wxSliderPropertyInfo::GetPropertyNames(wxStringList& names) -{ - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("value"); - names.Add("orientation"); - names.Add("minValue"); - names.Add("maxValue"); -} - -bool wxSliderPropertyInfo::InstantiateResource(wxItemResource *resource) -{ - wxSlider *slider = (wxSlider *)propertyWindow; - resource->SetValue1(slider->GetValue()); - resource->SetValue2(slider->GetMin()); - resource->SetValue3(slider->GetMax()); - return wxItemPropertyInfo::InstantiateResource(resource); -} - -/* - * Gauge item - */ - -wxProperty *wxGaugePropertyInfo::GetProperty(wxString& name) -{ - wxGauge *gauge = (wxGauge *)propertyWindow; - if (name == "value") - return new wxProperty("value", (long)gauge->GetValue(), "integer"); - else if (name == "maxValue") - return new wxProperty("maxValue", (long)gauge->GetRange(), "integer"); - else - return wxItemPropertyInfo::GetProperty(name); -} - -bool wxGaugePropertyInfo::SetProperty(wxString& name, wxProperty *property) -{ - wxGauge *gauge = (wxGauge *)propertyWindow; - if (name == "value") - { - gauge->SetValue((int)property->GetValue().IntegerValue()); - return TRUE; - } - else if (name == "maxValue") - { - gauge->SetRange((int)property->GetValue().IntegerValue()); - return TRUE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); -} - -void wxGaugePropertyInfo::GetPropertyNames(wxStringList& names) -{ - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("value"); - names.Add("maxValue"); -} - -bool wxGaugePropertyInfo::InstantiateResource(wxItemResource *resource) -{ - wxGauge *gauge = (wxGauge *)propertyWindow; - resource->SetValue1(gauge->GetValue()); - resource->SetValue2(gauge->GetRange()); - return wxItemPropertyInfo::InstantiateResource(resource); -} - -/* - * Scrollbar item - */ - -wxProperty *wxScrollBarPropertyInfo::GetProperty(wxString& name) -{ - wxScrollBar *scrollBar = (wxScrollBar *)propertyWindow; - if (name == "value") - return new wxProperty("value", (long)scrollBar->GetValue(), "integer"); - else if (name == "orientation") - { - char *pos = NULL; - if (propertyWindow->GetWindowStyleFlag() & wxHORIZONTAL) - pos = "wxHORIZONTAL"; - else - pos = "wxVERTICAL"; - - return new wxProperty("orientation", pos, "string", - new wxStringListValidator(new wxStringList("wxHORIZONTAL", "wxVERTICAL", - NULL))); - } - else if (name == "pageSize") - { - int viewStart, pageLength, objectLength, viewLength; - scrollBar->GetValues(&viewStart, &viewLength, &objectLength, &pageLength); - - return new wxProperty("pageSize", (long)pageLength, "integer"); - } - else if (name == "viewLength") - { - int viewStart, pageLength, objectLength, viewLength; - scrollBar->GetValues(&viewStart, &viewLength, &objectLength, &pageLength); - - return new wxProperty("viewLength", (long)viewLength, "integer"); - } - else if (name == "objectLength") - { - int viewStart, pageLength, objectLength, viewLength; - scrollBar->GetValues(&viewStart, &viewLength, &objectLength, &pageLength); - - return new wxProperty("objectLength", (long)objectLength, "integer"); - } - else - return wxItemPropertyInfo::GetProperty(name); -} - -bool wxScrollBarPropertyInfo::SetProperty(wxString& name, wxProperty *property) -{ - wxScrollBar *scrollBar = (wxScrollBar *)propertyWindow; - if (name == "value") - { - scrollBar->SetValue((int)property->GetValue().IntegerValue()); - return TRUE; - } - else if (name == "orientation") - { - long windowStyle = scrollBar->GetWindowStyleFlag(); - long oldWindowStyle = windowStyle; - wxString val(property->GetValue().StringValue()); - if (val == "wxHORIZONTAL") - { - if (windowStyle & wxVERTICAL) - windowStyle -= wxVERTICAL; - windowStyle |= wxHORIZONTAL; - } - else - { - if (windowStyle & wxHORIZONTAL) - windowStyle -= wxHORIZONTAL; - windowStyle |= wxVERTICAL; - } - - if (oldWindowStyle == windowStyle) - return TRUE; - - scrollBar->SetWindowStyleFlag(windowStyle); - - // If the window style has changed, we swap the width and height parameters. - int w, h; - scrollBar->GetSize(&w, &h); - - scrollBar = (wxScrollBar *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(scrollBar, this); - scrollBar->SetSize(-1, -1, h, w); - - return TRUE; - } - else if (name == "pageSize") - { - scrollBar->SetPageSize((int)property->GetValue().IntegerValue()); - return TRUE; - } - else if (name == "viewLength") - { - scrollBar->SetViewLength((int)property->GetValue().IntegerValue()); - return TRUE; - } - else if (name == "objectLength") - { - scrollBar->SetObjectLength((int)property->GetValue().IntegerValue()); - return TRUE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); -} - -void wxScrollBarPropertyInfo::GetPropertyNames(wxStringList& names) -{ - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("orientation"); - names.Add("value"); - names.Add("pageSize"); - names.Add("viewLength"); - names.Add("objectLength"); - - // Remove some properties we don't inherit - names.Delete("fontPoints"); - names.Delete("fontFamily"); - names.Delete("fontStyle"); - names.Delete("fontWeight"); - names.Delete("fontUnderlined"); -} - -bool wxScrollBarPropertyInfo::InstantiateResource(wxItemResource *resource) -{ - wxScrollBar *sbar = (wxScrollBar *)propertyWindow; - - resource->SetValue1(sbar->GetValue()); - - int viewStart, pageLength, objectLength, viewLength; - sbar->GetValues(&viewStart, &viewLength, &objectLength, &pageLength); - - resource->SetValue2(pageLength); - resource->SetValue3(objectLength); - resource->SetValue5(viewLength); - - return wxItemPropertyInfo::InstantiateResource(resource); -} - -/* - * Panels - */ - -wxProperty *wxPanelPropertyInfo::GetProperty(wxString& name) -{ - wxPanel *panelWindow = (wxPanel *)propertyWindow; - wxFont *labelFont = panelWindow->GetLabelFont(); - wxFont *buttonFont = panelWindow->GetButtonFont(); - - if (name == "labelFontPoints" || name == "labelFontFamily" || name == "labelFontStyle" || name == "labelFontWeight" || - name == "labelFontUnderlined") - return GetFontProperty(name, labelFont); - else if (name == "buttonFontPoints" || name == "buttonFontFamily" || name == "buttonFontStyle" || name == "buttonFontWeight" || - name == "buttonFontUnderlined") - return GetFontProperty(name, buttonFont); - else if (name == "no3D") - { - bool userColours; - if (panelWindow->GetWindowStyleFlag() & wxNO_3D) - userColours = TRUE; - else - userColours = FALSE; - - return new wxProperty(name, (bool)userColours, "bool"); - } - else if (name == "backgroundColour") - { - wxColour col(panelWindow->GetBackgroundColour()); - char buf[7]; - wxDecToHex(col.Red(), buf); - wxDecToHex(col.Green(), buf+2); - wxDecToHex(col.Blue(), buf+4); - - return new wxProperty(name, buf, "string", new wxColourListValidator); - } - else if (name == "title") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); - if (resource) - return new wxProperty(name, resource->GetTitle(), "string"); - else - return new wxProperty(name, "Could not get title", "string"); - } - else if (name == "caption") - { - return new wxProperty(name, ((panelWindow->GetWindowStyleFlag() & wxCAPTION) == wxCAPTION), - "bool"); - } - else if (name == "systemMenu") - { - return new wxProperty(name, ((panelWindow->GetWindowStyleFlag() & wxSYSTEM_MENU) == wxSYSTEM_MENU), - "bool"); - } - else if (name == "thickFrame") - { - return new wxProperty(name, ((panelWindow->GetWindowStyleFlag() & wxTHICK_FRAME) == wxTHICK_FRAME), - "bool"); - } - else - return wxWindowPropertyInfo::GetProperty(name); -} - -bool wxPanelPropertyInfo::SetProperty(wxString& name, wxProperty *property) -{ - wxPanel *panelWindow = (wxPanel *)propertyWindow; - wxFont *labelFont = panelWindow->GetLabelFont(); - wxFont *buttonFont = panelWindow->GetButtonFont(); - - if (labelFont && (name == "labelFontPoints" || name == "labelFontFamily" || name == "labelFontStyle" || name == "labelFontWeight" || name == "labelFontUnderlined" )) - { - wxFont *newFont = SetFontProperty(name, property, labelFont); - if (newFont) - panelWindow->SetLabelFont(newFont); - return TRUE; - } - else if (buttonFont && (name == "buttonFontPoints" || name == "buttonFontFamily" || name == "buttonFontStyle" || name == "buttonFontWeight" || name == "buttonFontUnderlined" )) - { - wxFont *newFont = SetFontProperty(name, property, buttonFont); - if (newFont) - panelWindow->SetButtonFont(newFont); - return TRUE; - } - else if (name == "no3D") - { - bool userColours = property->GetValue().BoolValue(); - long flag = panelWindow->GetWindowStyleFlag(); - - if (userColours) - { - if ((panelWindow->GetWindowStyleFlag() & wxNO_3D) != wxNO_3D) - panelWindow->SetWindowStyleFlag(panelWindow->GetWindowStyleFlag() | wxNO_3D); - } - else - { - if ((panelWindow->GetWindowStyleFlag() & wxNO_3D) == wxNO_3D) - panelWindow->SetWindowStyleFlag(panelWindow->GetWindowStyleFlag() - wxNO_3D); - } - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); - resource->SetStyle(panelWindow->GetWindowStyleFlag()); - - panelWindow = (wxPanel *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(panelWindow, this); - return TRUE; - } - else if (name == "backgroundColour") - { - char *hex = property->GetValue().StringValue(); - int r = wxHexToDec(hex); - int g = wxHexToDec(hex+2); - int b = wxHexToDec(hex+4); - - wxColour col(r,g,b); - panelWindow->SetBackgroundColour(col); - panelWindow = (wxPanel *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(panelWindow, this); - return TRUE; - } - else if (name == "title") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); - if (resource) - { - resource->SetTitle(property->GetValue().StringValue()); - return TRUE; - } - else - return FALSE; - } - else if (name == "caption") - { - SetWindowStyle(panelWindow, wxCAPTION, property->GetValue().BoolValue()); - - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); - resource->SetStyle(panelWindow->GetWindowStyleFlag()); - return TRUE; - } - else if (name == "thickFrame") - { - SetWindowStyle(panelWindow, wxTHICK_FRAME, property->GetValue().BoolValue()); - - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); - resource->SetStyle(panelWindow->GetWindowStyleFlag()); - return TRUE; - } - else if (name == "systemMenu") - { - SetWindowStyle(panelWindow, wxSYSTEM_MENU, property->GetValue().BoolValue()); - - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); - resource->SetStyle(panelWindow->GetWindowStyleFlag()); - return TRUE; - } - else - return wxWindowPropertyInfo::SetProperty(name, property); -} - -void wxPanelPropertyInfo::GetPropertyNames(wxStringList& names) -{ - wxWindowPropertyInfo::GetPropertyNames(names); - - names.Add("title"); - names.Add("no3D"); - names.Add("backgroundColour"); - names.Add("caption"); - names.Add("systemMenu"); - names.Add("thickFrame"); -} - -bool wxPanelPropertyInfo::InstantiateResource(wxItemResource *resource) -{ - wxPanel *panel = (wxPanel *)propertyWindow; - if (panel->GetFont()) - resource->SetFont(wxTheFontList->FindOrCreateFont(panel->GetFont()->GetPointSize(), - panel->GetFont()->GetFamily(), panel->GetFont()->GetStyle(), panel->GetFont()->GetWeight(), - panel->GetFont()->GetUnderlined(), panel->GetFont()->GetFaceName())); - - resource->SetBackgroundColour(new wxColour(panel->GetBackgroundColour())); - - return wxWindowPropertyInfo::InstantiateResource(resource); -} - -#if 0 -/* - * Dialog boxes - */ - -wxProperty *wxDialogPropertyInfo::GetProperty(wxString& name) -{ - wxDialog *dialogWindow = (wxDialog *)propertyWindow; - if (name == "modal") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(dialogWindow); - if (!resource) - return NULL; - - bool modal = (resource->GetValue1() != 0); - return new wxProperty(name, modal, "bool"); - } - else - return wxPanelPropertyInfo::GetProperty(name); -} - -bool wxDialogPropertyInfo::SetProperty(wxString& name, wxProperty *property) -{ - wxDialog *dialogWindow = (wxDialog *)propertyWindow; - - if (name == "modal") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(dialogWindow); - if (!resource) - return FALSE; - - resource->SetValue1(property->GetValue().BoolValue()); - return TRUE; - } - else - return wxPanelPropertyInfo::SetProperty(name, property); -} - -void wxDialogPropertyInfo::GetPropertyNames(wxStringList& names) -{ - wxPanelPropertyInfo::GetPropertyNames(names); - names.Add("title"); - names.Add("modal"); -} - -bool wxDialogPropertyInfo::InstantiateResource(wxItemResource *resource) -{ - wxDialog *dialog = (wxDialog *)propertyWindow; - wxString str(dialog->GetTitle()); - resource->SetTitle(WXSTRINGCAST str); - - return wxPanelPropertyInfo::InstantiateResource(resource); -} -#endif - -/* - * Utilities - */ - -int wxStringToFontWeight(wxString& val) -{ - if (val == "wxBOLD") return wxBOLD; - else if (val == "wxLIGHT") return wxLIGHT; - else return wxNORMAL; -} - -int wxStringToFontStyle(wxString& val) -{ - if (val == "wxITALIC") return wxITALIC; - else if (val == "wxSLANT") return wxSLANT; - else return wxNORMAL; -} - -int wxStringToFontFamily(wxString& val) -{ - if (val == "wxDECORATIVE") return wxDECORATIVE; - else if (val == "wxROMAN") return wxROMAN; - else if (val == "wxSCRIPT") return wxSCRIPT; - else if (val == "wxMODERN") return wxMODERN; - else if (val == "wxTELETYPE") return wxTELETYPE; - else return wxSWISS; -} - -/// -/// Resource symbol validator -/// -IMPLEMENT_DYNAMIC_CLASS(wxResourceSymbolValidator, wxPropertyListValidator) - -wxResourceSymbolValidator::wxResourceSymbolValidator(long flags): - wxPropertyListValidator(flags) -{ -} - -wxResourceSymbolValidator::~wxResourceSymbolValidator(void) -{ -} - -bool wxResourceSymbolValidator::OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - return TRUE; -} - -// Called when TICK is pressed or focus is lost or view wants to update -// the property list. -// Does the transferance from the property editing area to the property itself -bool wxResourceSymbolValidator::OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return FALSE; - wxString value(view->GetValueText()->GetValue()); - property->GetValue() = value ; - return TRUE; -} - -// Called when TICK is pressed or focus is lost or view wants to update -// the property list. -// Does the transferance from the property editing area to the property itself -bool wxResourceSymbolValidator::OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return FALSE; - wxString str(property->GetValue().GetStringRepresentation()); - view->GetValueText()->SetValue(str); - return TRUE; -} - -// Called when the property is double clicked. Extra functionality can be provided, -// cycling through possible values. -bool wxResourceSymbolValidator::OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return FALSE; - OnEdit(property, view, parentWindow); - return TRUE; -} - -bool wxResourceSymbolValidator::OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (view->GetConfirmButton()) - view->GetConfirmButton()->Enable(TRUE); - if (view->GetCancelButton()) - view->GetCancelButton()->Enable(TRUE); - if (view->GetEditButton()) - view->GetEditButton()->Enable(TRUE); - if (view->GetValueText()) - view->GetValueText()->Enable((GetFlags() & wxPROP_ALLOW_TEXT_EDITING) == wxPROP_ALLOW_TEXT_EDITING); - return TRUE; -} - -void wxResourceSymbolValidator::OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return; - - wxResourceSymbolDialog* dialog = new wxResourceSymbolDialog(parentWindow, -1, "Edit Symbol"); - - // Split name/id pair e.g. "IDC_TEXT=123" - wxString value(property->GetValue().StringValue()); - - wxString strName = value.Before('='); - wxString strId = value.After('='); - - dialog->SetSymbol(strName); - dialog->SetId(atoi(strId)); - - dialog->Init(); - - if (dialog->ShowModal() == wxID_OK) - { - wxString symbolName(dialog->GetSymbol()); - long id = dialog->GetId(); - dialog->Destroy(); - - wxString str; - str.Printf("%d", id); - property->GetValue() = symbolName + wxString("=") + str; - - view->DisplayProperty(property); - view->UpdatePropertyDisplayInList(property); - view->OnPropertyChanged(property); - } -} - -BEGIN_EVENT_TABLE(wxResourceSymbolDialog, wxDialog) - EVT_BUTTON(wxID_OK, wxResourceSymbolDialog::OnOK) - EVT_COMBOBOX(ID_SYMBOLNAME_COMBOBOX, wxResourceSymbolDialog::OnComboBoxSelect) - EVT_TEXT(ID_SYMBOLNAME_COMBOBOX, wxResourceSymbolDialog::OnSymbolNameUpdate) -END_EVENT_TABLE() - -wxResourceSymbolDialog::wxResourceSymbolDialog(wxWindow* parent, const wxWindowID id, const wxString& title, const wxPoint& pos, - const wxSize& size, long style): - wxDialog(parent, id, title, pos, size, style) -{ - int x = 5; - int y = 5; - - (void) new wxStaticText(this, -1, "Name: ", wxPoint(x, y)); - - x += 80; - - m_nameCtrl = new wxComboBox(this, ID_SYMBOLNAME_COMBOBOX, "", - wxPoint(x, y), wxSize(200, -1), 0, NULL, wxCB_DROPDOWN|wxCB_SORT); - - y += 30; - x = 5; - - (void) new wxStaticText(this, -1, "Id: ", wxPoint(x, y)); - - x += 80; - - m_idCtrl = new wxTextCtrl(this, ID_SYMBOLID_TEXTCTRL, "", - wxPoint(x, y), wxSize(200, -1)); - - y += 30; - x = 5; - (void) new wxButton(this, wxID_OK, "OK", wxPoint(x, y), wxSize(80, -1)); - - x += 100; - (void) new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(x, y), wxSize(80, -1)); - - Fit(); - Centre(); -} - -void wxResourceSymbolDialog::Init() -{ - wxString defaultId; - defaultId.Printf("%ld", m_symbolId); - - m_nameCtrl->SetValue(m_symbolName); - m_idCtrl->SetValue(defaultId); - - wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().FillComboBox(m_nameCtrl); -} - -void wxResourceSymbolDialog::OnOK(wxCommandEvent& event) -{ - if (CheckValues()) - { - wxDialog::OnOK(event); - } -} - -bool wxResourceSymbolDialog::CheckValues() -{ - wxString nameStr(m_nameCtrl->GetValue()); - wxString idStr(m_idCtrl->GetValue()); - int id = atoi(idStr); - - if (id <= 0 ) - { - wxMessageBox("Identifier cannot be missing or zero", "Dialog Editor", wxOK|wxICON_EXCLAMATION, this); - return FALSE; - } - if (nameStr == "") - { - wxMessageBox("Please enter a symbol name", "Dialog Editor", wxOK|wxICON_EXCLAMATION, this); - return FALSE; - } - if (nameStr.Contains(" ")) - { - wxMessageBox("Symbol name cannot contain spaces.", "Dialog Editor", wxOK|wxICON_EXCLAMATION, this); - return FALSE; - } - if (nameStr.Contains("=")) - { - wxMessageBox("Symbol name cannot contain =.", "Dialog Editor", wxOK|wxICON_EXCLAMATION, this); - return FALSE; - } - if (nameStr.IsNumber()) - { - wxMessageBox("Symbol name cannot be a number.", "Dialog Editor", wxOK|wxICON_EXCLAMATION, this); - return FALSE; - } - // TODO: other checks on the name syntax. - - if (!wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().IsStandardSymbol(nameStr)) - { - // If we change the id for an existing symbol, we need to: - // 1) Check if there are any other resources currently using the original id. - // If so, will need to change their id to the new id, in SetProperty. - // 2) Remove the old symbol, add the new symbol. - // In this check, we don't have to do this, but we need to do it in SetProperty. - - if (nameStr == GetSymbol() && id != GetId()) - { - // It's OK to change the id. But we'll need to change all matching ids in all resources, - // in SetProperty. - } - - // If we change the name but not the id... we'll just need to remove and - // re-add the symbol/id pair, in SetProperty. - if (nameStr != GetSymbol() && id == GetId()) - { - } - - // What if we're changing both the name and the id? - // - if there's no symbol of that name, just remove the old, add the new (in SetProperty) - // - if there is a symbol of that name, if id matches, do nothing. If not, veto. - - if (nameStr != GetSymbol() && id != GetId()) - { - if (!wxResourceManager::GetCurrentResourceManager()->IsIdentifierOK(nameStr, id)) - { - wxMessageBox("This integer id is already being used under a different name.\nPlease choose another.", - "Dialog Editor", wxOK|wxICON_EXCLAMATION, this); - return FALSE; - } - } - - } - - SetSymbol(nameStr); - SetId(id); - - return TRUE; -} - -void wxResourceSymbolDialog::OnComboBoxSelect(wxCommandEvent& event) -{ - wxString str(m_nameCtrl->GetStringSelection()); - if (wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().IsStandardSymbol(str)) - { - int id = wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().GetIdForSymbol(str); - wxString str2; - str2.Printf("%d", id); - m_idCtrl->SetValue(str2); - m_idCtrl->Enable(FALSE); - } - else - { - if (wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().SymbolExists(str)) - { - int id = wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().GetIdForSymbol(str); - wxString str2; - str2.Printf("%d", id); - m_idCtrl->SetValue(str2); - } - m_idCtrl->Enable(TRUE); - } -} - -void wxResourceSymbolDialog::OnSymbolNameUpdate(wxCommandEvent& event) -{ - wxString str(m_nameCtrl->GetValue()); - if (wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().IsStandardSymbol(str)) - { - int id = wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().GetIdForSymbol(str); - wxString str2; - str2.Printf("%d", id); - m_idCtrl->SetValue(str2); - m_idCtrl->Enable(FALSE); - } - else - { - if (wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().SymbolExists(str)) - { - int id = wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().GetIdForSymbol(str); - wxString str2; - str2.Printf("%d", id); - m_idCtrl->SetValue(str2); - } - m_idCtrl->Enable(TRUE); - } -} - diff --git a/utils/dialoged/src/winprop.h b/utils/dialoged/src/winprop.h deleted file mode 100644 index 8b4032a8a0..0000000000 --- a/utils/dialoged/src/winprop.h +++ /dev/null @@ -1,415 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: winprop.h -// Purpose: Window properties -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WINPROP_H_ -#define _WINPROP_H_ - -#ifdef __GNUG__ -#pragma interface "winprop.h" -#endif - -#include "reseditr.h" - -class wxPropertyInfo; - -class wxDialogEditorPropertyListFrame: public wxPropertyListFrame -{ - friend class wxPropertyInfo; -public: - wxDialogEditorPropertyListFrame(wxPropertyListView *v, wxFrame *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"); - ~wxDialogEditorPropertyListFrame(); - -private: - wxPropertySheet* m_propSheet; - wxPropertyValidatorRegistry m_registry; - wxPropertyInfo* m_propInfo; -}; - -// A kind of property list view that intercepts OnPropertyChanged -// feedback. -class wxResourcePropertyListView: public wxPropertyListView -{ - public: - wxPropertyInfo *propertyInfo; - - wxResourcePropertyListView(wxPropertyInfo *info, wxPanel *propPanel = NULL, long flags = wxPROP_BUTTON_DEFAULT): - wxPropertyListView(propPanel, flags) - { - propertyInfo = info; - } - void OnPropertyChanged(wxProperty *property); - bool OnClose(void); -}; - -// Generic class for relating an object to a collection of properties. -// Instead of defining new functions like wxButton::GetProperty, wxButton::SetProperty, -// we take these functions out into of the wxWindows library and associate -// them with separate classes. -class wxPropertyInfo: public wxObject -{ - friend class wxDialogEditorPropertyListFrame; - protected: - static wxWindow *sm_propertyWindow; - wxPropertyInfo(void) - { - } - ~wxPropertyInfo(void) - { - } - public: - virtual wxProperty *GetProperty(wxString& propName) = 0; - virtual bool SetProperty(wxString& propName, wxProperty *property) = 0; - virtual void GetPropertyNames(wxStringList& names) = 0; - virtual bool Edit(wxWindow *parent, const wxString& title); -}; - -// For all windows -class wxWindowPropertyInfo: public wxPropertyInfo -{ - protected: - wxWindow *propertyWindow; - wxItemResource *propertyResource; - public: - wxWindowPropertyInfo(wxWindow *win, wxItemResource *res = NULL); - ~wxWindowPropertyInfo(void); - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - - inline void SetPropertyWindow(wxWindow *win) { propertyWindow = win; } - - inline void SetResource(wxItemResource *res) { propertyResource = res; } - - // Helper functions for font properties - - wxProperty *GetFontProperty(wxString& name, wxFont *font); - wxFont *SetFontProperty(wxString& name, wxProperty *property, wxFont *oldFont); - - // Fill in the wxItemResource members to mirror the current window settings - virtual bool InstantiateResource(wxItemResource *resource); - - // Set the window style - void SetWindowStyle(wxWindow* win, long style, bool set); -}; - -// For panel items -class wxItemPropertyInfo: public wxWindowPropertyInfo -{ - protected: - public: - wxItemPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxWindowPropertyInfo(win, res) {} - ~wxItemPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); -}; - -// For buttons -class wxButtonPropertyInfo: public wxItemPropertyInfo -{ - protected: - public: - wxButtonPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) { } - ~wxButtonPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); -}; - -// For bitmap buttons -class wxBitmapButtonPropertyInfo: public wxButtonPropertyInfo -{ - protected: - public: - wxBitmapButtonPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxButtonPropertyInfo(win, res) { } - ~wxBitmapButtonPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); -}; - -// For static text controls -class wxStaticTextPropertyInfo: public wxItemPropertyInfo -{ - protected: - public: - wxStaticTextPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) { } - ~wxStaticTextPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); -}; - -// For static bitmap controls -class wxStaticBitmapPropertyInfo: public wxItemPropertyInfo -{ - protected: - public: - wxStaticBitmapPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) { } - ~wxStaticBitmapPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); -}; - -// For text/multitext items -class wxTextPropertyInfo: public wxItemPropertyInfo -{ - protected: - public: - wxTextPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) {} - ~wxTextPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); -}; - -// For list boxes -class wxListBoxPropertyInfo: public wxItemPropertyInfo -{ - protected: - public: - wxListBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) {} - ~wxListBoxPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); -}; - -// For choice items -class wxChoicePropertyInfo: public wxItemPropertyInfo -{ - protected: - public: - wxChoicePropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) {} - ~wxChoicePropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); -}; - -// For choice items -class wxComboBoxPropertyInfo: public wxChoicePropertyInfo -{ - protected: - public: - wxComboBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxChoicePropertyInfo(win, res) {} - ~wxComboBoxPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); -}; - -// For radiobox items -class wxRadioBoxPropertyInfo: public wxItemPropertyInfo -{ - protected: - public: - wxRadioBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) {} - ~wxRadioBoxPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); -}; - -// For groupbox items -class wxGroupBoxPropertyInfo: public wxItemPropertyInfo -{ - protected: - public: - wxGroupBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) {} - ~wxGroupBoxPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); -}; - -// For checkbox items -class wxCheckBoxPropertyInfo: public wxItemPropertyInfo -{ - protected: - public: - wxCheckBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) {} - ~wxCheckBoxPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); -}; - -// For radiobutton items -class wxRadioButtonPropertyInfo: public wxItemPropertyInfo -{ - protected: - public: - wxRadioButtonPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) {} - ~wxRadioButtonPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); -}; - -// For gauge items -class wxGaugePropertyInfo: public wxItemPropertyInfo -{ - protected: - public: - wxGaugePropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) {} - ~wxGaugePropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); -}; - -// For scrollbar items -class wxScrollBarPropertyInfo: public wxItemPropertyInfo -{ - protected: - public: - wxScrollBarPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) {} - ~wxScrollBarPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); -}; - -// For slider items -class wxSliderPropertyInfo: public wxItemPropertyInfo -{ - protected: - public: - wxSliderPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) {} - ~wxSliderPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); -}; - -// For panels -class wxPanelPropertyInfo: public wxWindowPropertyInfo -{ - protected: - public: - wxPanelPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxWindowPropertyInfo(win, res) {} - ~wxPanelPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); -}; - -int wxStringToFontWeight(wxString& val); -int wxStringToFontStyle(wxString& val); -int wxStringToFontFamily(wxString& val); - -/* - * A validator to allow editing symbol/id pairs - */ - -class wxResourceSymbolValidator: public wxPropertyListValidator -{ - DECLARE_DYNAMIC_CLASS(wxResourceSymbolValidator) - protected: - public: - wxResourceSymbolValidator(long flags = 0); - - ~wxResourceSymbolValidator(void); - - // Called when TICK is pressed or focus is lost. - // Return FALSE if value didn't check out; signal to restore old value. - bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when TICK is pressed or focus is lost or view wants to update - // the property list. - // Does the transferance from the property editing area to the property itself - bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when the edit (...) button is pressed. - void OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); -}; - -/* - * A dialog for editing symbol/id pairs - */ - -class wxResourceSymbolDialog: public wxDialog -{ -public: - wxResourceSymbolDialog(wxWindow* parent, const wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL); - - void Init(); - - inline void SetSymbol(const wxString& symbol) { m_symbolName = symbol; } - inline void SetId(long id) { m_symbolId = id; } - - inline wxString GetSymbol() const { return m_symbolName; } - inline long GetId() const { return m_symbolId; } - - bool CheckValues(); - void OnOK(wxCommandEvent& event); - void OnComboBoxSelect(wxCommandEvent& event); - void OnSymbolNameUpdate(wxCommandEvent& event); - -protected: - wxString m_symbolName; - long m_symbolId; - wxComboBox* m_nameCtrl; - wxTextCtrl* m_idCtrl; - -DECLARE_EVENT_TABLE() -}; - -#define ID_SYMBOLNAME_COMBOBOX 100 -#define ID_SYMBOLID_TEXTCTRL 101 - -#endif - // _WINPROP_H_ diff --git a/utils/dialoged/src/winstyle.cpp b/utils/dialoged/src/winstyle.cpp deleted file mode 100644 index efc4fad4a1..0000000000 --- a/utils/dialoged/src/winstyle.cpp +++ /dev/null @@ -1,380 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: winstyle.cpp -// Purpose: Window styles -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "winstyle.h" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include -#include -#include -#include - -#include "winstyle.h" - -/* - * Styles - */ - - /* wxListBox */ -static wxWindowStylePair g_WindowStylesListBox[] = { - { "wxLB_SINGLE", wxLB_SINGLE }, - { "wxLB_MULTIPLE", wxLB_MULTIPLE }, - { "wxLB_EXTENDED", wxLB_EXTENDED }, - { "wxLB_NEEDED_SB", wxLB_NEEDED_SB }, - { "wxLB_ALWAYS_SB", wxLB_ALWAYS_SB }, - { "wxLB_SORT", wxLB_SORT }, - { "wxLB_OWNERDRAW", wxLB_OWNERDRAW }, - { "wxLB_HSCROLL", wxLB_HSCROLL } -}; - -int g_WindowStylesListBoxCount = sizeof(g_WindowStylesListBox)/sizeof(wxWindowStylePair) ; - - /* wxComboxBox */ -static wxWindowStylePair g_WindowStylesComboBox[] = { - { "wxCB_SIMPLE", wxCB_SIMPLE }, - { "wxCB_DROPDOWN", wxCB_DROPDOWN }, - { "wxCB_READONLY", wxCB_READONLY }, - { "wxCB_SORT", wxCB_SORT } -}; - -int g_WindowStylesComboBoxCount = sizeof(g_WindowStylesComboBox)/sizeof(wxWindowStylePair) ; - -#if 0 - /* wxChoice */ -static wxWindowStylePair g_WindowStylesChoice[] = { -}; - -int g_WindowStylesChoiceCount = sizeof(g_WindowStylesChoice)/sizeof(wxWindowStylePair) ; -#endif - - /* wxGauge */ -static wxWindowStylePair g_WindowStylesGauge[] = { - { "wxGA_PROGRESSBAR", wxGA_PROGRESSBAR }, - { "wxGA_HORIZONTAL", wxGA_HORIZONTAL }, - { "wxGA_VERTICAL", wxGA_VERTICAL } -}; - -int g_WindowStylesGaugeCount = sizeof(g_WindowStylesGauge)/sizeof(wxWindowStylePair) ; - - /* wxTextCtrl */ -static wxWindowStylePair g_WindowStylesTextCtrl[] = { - { "wxPASSWORD", wxPASSWORD}, - { "wxPROCESS_ENTER", wxPROCESS_ENTER}, - { "wxTE_PASSWORD", wxTE_PASSWORD}, - { "wxTE_READONLY", wxTE_READONLY}, - { "wxTE_PROCESS_ENTER", wxTE_PROCESS_ENTER}, - { "wxTE_MULTILINE", wxTE_MULTILINE} -}; - -int g_WindowStylesTextCtrlCount = sizeof(g_WindowStylesTextCtrl)/sizeof(wxWindowStylePair) ; - - /* wxRadioButton */ -static wxWindowStylePair g_WindowStylesRadioButton[] = { - { "wxRB_GROUP", wxRB_GROUP } -}; - -int g_WindowStylesRadioButtonCount = sizeof(g_WindowStylesRadioButton)/sizeof(wxWindowStylePair) ; - - /* wxRadioBox */ -static wxWindowStylePair g_WindowStylesRadioBox[] = { - { "wxRA_HORIZONTAL", wxRA_HORIZONTAL }, - { "wxRA_VERTICAL", wxRA_VERTICAL } -}; - -int g_WindowStylesRadioBoxCount = sizeof(g_WindowStylesRadioBox)/sizeof(wxWindowStylePair) ; - - /* wxSlider */ -static wxWindowStylePair g_WindowStylesSlider[] = { - { "wxSL_HORIZONTAL", wxSL_HORIZONTAL }, - { "wxSL_VERTICAL", wxSL_VERTICAL }, - { "wxSL_AUTOTICKS", wxSL_AUTOTICKS }, - { "wxSL_LABELS", wxSL_LABELS }, - { "wxSL_LEFT", wxSL_LEFT }, - { "wxSL_TOP", wxSL_TOP }, - { "wxSL_RIGHT", wxSL_RIGHT }, - { "wxSL_BOTTOM", wxSL_BOTTOM }, - { "wxSL_BOTH", wxSL_BOTH }, - { "wxSL_SELRANGE", wxSL_SELRANGE } -}; - -int g_WindowStylesSliderCount = sizeof(g_WindowStylesSlider)/sizeof(wxWindowStylePair) ; - - /* wxScrollBar */ -static wxWindowStylePair g_WindowStylesScrollBar[] = { - { "wxSB_HORIZONTAL", wxSB_HORIZONTAL }, - { "wxSB_VERTICAL", wxSB_VERTICAL } -}; - -int g_WindowStylesScrollBarCount = sizeof(g_WindowStylesScrollBar)/sizeof(wxWindowStylePair) ; - - /* wxButton */ -static wxWindowStylePair g_WindowStylesButton[] = { - { "wxBU_AUTODRAW", wxBU_AUTODRAW }, - { "wxBU_NOAUTODRAW", wxBU_NOAUTODRAW } -}; - -int g_WindowStylesButtonCount = sizeof(g_WindowStylesButton)/sizeof(wxWindowStylePair) ; - - /* wxTreeCtrl */ -static wxWindowStylePair g_WindowStylesTreeCtrl[] = { - { "wxTR_HAS_BUTTONS", wxTR_HAS_BUTTONS }, - { "wxTR_EDIT_LABELS", wxTR_EDIT_LABELS }, - { "wxTR_LINES_AT_ROOT", wxTR_LINES_AT_ROOT } -}; - -int g_WindowStylesTreeCtrlCount = sizeof(g_WindowStylesTreeCtrl)/sizeof(wxWindowStylePair) ; - - /* wxListCtrl */ -static wxWindowStylePair g_WindowStylesListCtrl[] = { - { "wxLC_ICON", wxLC_ICON }, - { "wxLC_SMALL_ICON", wxLC_SMALL_ICON }, - { "wxLC_LIST", wxLC_LIST }, - { "wxLC_REPORT", wxLC_REPORT }, - { "wxLC_ALIGN_TOP", wxLC_ALIGN_TOP }, - { "wxLC_ALIGN_LEFT", wxLC_ALIGN_LEFT }, - { "wxLC_AUTOARRANGE", wxLC_AUTOARRANGE }, - { "wxLC_USER_TEXT", wxLC_USER_TEXT }, - { "wxLC_EDIT_LABELS", wxLC_EDIT_LABELS }, - { "wxLC_NO_HEADER", wxLC_NO_HEADER }, - { "wxLC_NO_SORT_HEADER", wxLC_NO_SORT_HEADER }, - { "wxLC_SINGLE_SEL", wxLC_SINGLE_SEL }, - { "wxLC_SORT_ASCENDING", wxLC_SORT_ASCENDING }, - { "wxLC_SORT_DESCENDING", wxLC_SORT_DESCENDING } -}; - -int g_WindowStylesListCtrlCount = sizeof(g_WindowStylesListCtrl)/sizeof(wxWindowStylePair) ; - - /* wxSpinButton */ -static wxWindowStylePair g_WindowStylesSpinButton[] = { - { "wxSP_VERTICAL", wxSP_VERTICAL}, - { "wxSP_HORIZONTAL", wxSP_HORIZONTAL}, - { "wxSP_ARROW_KEYS", wxSP_ARROW_KEYS}, - { "wxSP_WRAP", wxSP_WRAP} -}; - -int g_WindowStylesSpinButtonCount = sizeof(g_WindowStylesSpinButton)/sizeof(wxWindowStylePair) ; - - /* wxSplitterWindow */ -static wxWindowStylePair g_WindowStylesSplitterWindow[] = { - { "wxSP_NOBORDER", wxSP_NOBORDER}, - { "wxSP_3D", wxSP_3D}, - { "wxSP_BORDER", wxSP_BORDER} -}; - -int g_WindowStylesSplitterWindowCount = sizeof(g_WindowStylesSplitterWindow)/sizeof(wxWindowStylePair) ; - - /* wxTabCtrl */ -static wxWindowStylePair g_WindowStylesTabCtrl[] = { - { "wxTC_MULTILINE", wxTC_MULTILINE}, - { "wxTC_RIGHTJUSTIFY", wxTC_RIGHTJUSTIFY}, - { "wxTC_FIXEDWIDTH", wxTC_FIXEDWIDTH}, - { "wxTC_OWNERDRAW", wxTC_OWNERDRAW} -}; - -int g_WindowStylesTabCtrlCount = sizeof(g_WindowStylesTabCtrl)/sizeof(wxWindowStylePair) ; - - /* wxStatusBar95 */ -static wxWindowStylePair g_WindowStylesStatusBar[] = { - { "wxST_SIZEGRIP", wxST_SIZEGRIP} -}; - -int g_WindowStylesStatusBarCount = sizeof(g_WindowStylesStatusBar)/sizeof(wxWindowStylePair) ; - - /* wxControl */ -static wxWindowStylePair g_WindowStylesControl[] = { - { "wxFIXED_LENGTH", wxFIXED_LENGTH}, - { "wxALIGN_LEFT", wxALIGN_LEFT}, - { "wxALIGN_CENTRE", wxALIGN_CENTRE}, - { "wxALIGN_RIGHT", wxALIGN_RIGHT}, - { "wxCOLOURED", wxCOLOURED} -}; - -int g_WindowStylesControlCount = sizeof(g_WindowStylesControl)/sizeof(wxWindowStylePair) ; - - /* wxToolBar */ -static wxWindowStylePair g_WindowStylesToolBar[] = { - { "wxTB_3DBUTTONS", wxTB_3DBUTTONS}, - { "wxTB_HORIZONTAL", wxTB_HORIZONTAL}, - { "wxTB_VERTICAL", wxTB_VERTICAL}, - { "wxTB_FLAT", wxTB_FLAT} -}; - -int g_WindowStylesToolBarCount = sizeof(g_WindowStylesToolBar)/sizeof(wxWindowStylePair) ; - - /* Frame/dialog */ -static wxWindowStylePair g_WindowStylesDialog[] = { - { "wxSTAY_ON_TOP", wxSTAY_ON_TOP}, - { "wxCAPTION", wxCAPTION}, - { "wxICONIZE", wxICONIZE}, - { "wxMINIMIZE", wxICONIZE}, - { "wxMAXIMIZE", wxMAXIMIZE}, - { "wxTHICK_FRAME", wxTHICK_FRAME}, - { "wxRESIZE_BORDER", wxRESIZE_BORDER}, - { "wxSYSTEM_MENU", wxSYSTEM_MENU}, - { "wxMINIMIZE_BOX", wxMINIMIZE_BOX}, - { "wxMAXIMIZE_BOX", wxMAXIMIZE_BOX}, - { "wxRESIZE_BOX", wxRESIZE_BOX} -}; - -int g_WindowStylesDialogCount = sizeof(g_WindowStylesDialog)/sizeof(wxWindowStylePair) ; - - /* Generic */ -static wxWindowStylePair g_WindowStylesWindow[] = { - { "wxBORDER", wxBORDER}, - { "wxDOUBLE_BORDER", wxDOUBLE_BORDER}, - { "wxSUNKEN_BORDER", wxSUNKEN_BORDER}, - { "wxRAISED_BORDER", wxRAISED_BORDER}, - { "wxSIMPLE_BORDER", wxSIMPLE_BORDER}, - { "wxSTATIC_BORDER", wxSTATIC_BORDER}, - { "wxTRANSPARENT_WINDOW", wxTRANSPARENT_WINDOW}, - { "wxNO_BORDER", wxNO_BORDER}, - { "wxCLIP_CHILDREN", wxCLIP_CHILDREN} - -/* Would be duplicated with e.g. wxLB_HSCROLL - { "wxVSCROLL", wxVSCROLL }, - { "wxHSCROLL", wxHSCROLL } -*/ -}; - -int g_WindowStylesWindowCount = sizeof(g_WindowStylesWindow)/sizeof(wxWindowStylePair) ; - -/* - * A table holding all class style objects - */ - - -wxWindowStyleTable::wxWindowStyleTable(): - m_classes(wxKEY_STRING) -{ -} - -wxWindowStyleTable::~wxWindowStyleTable() -{ - ClearTable(); -} - -void wxWindowStyleTable::Init() -{ - AddStyles("wxWindow", g_WindowStylesWindowCount, g_WindowStylesWindow); - AddStyles("wxDialog", g_WindowStylesDialogCount, g_WindowStylesDialog); - AddStyles("wxButton", g_WindowStylesButtonCount, g_WindowStylesButton); - AddStyles("wxTextCtrl", g_WindowStylesTextCtrlCount, g_WindowStylesTextCtrl); - AddStyles("wxSpinButton", g_WindowStylesSpinButtonCount, g_WindowStylesSpinButton); - AddStyles("wxListBox", g_WindowStylesListBoxCount, g_WindowStylesListBox); - AddStyles("wxRadioButton", g_WindowStylesRadioButtonCount, g_WindowStylesRadioButton); - AddStyles("wxRadioBox", g_WindowStylesRadioBoxCount, g_WindowStylesRadioBox); - AddStyles("wxControl", g_WindowStylesControlCount, g_WindowStylesControl); - AddStyles("wxListCtrl", g_WindowStylesListCtrlCount, g_WindowStylesListCtrl); - AddStyles("wxTreeCtrl", g_WindowStylesTreeCtrlCount, g_WindowStylesTreeCtrl); - AddStyles("wxSlider", g_WindowStylesSliderCount, g_WindowStylesSlider); - AddStyles("wxGauge", g_WindowStylesGaugeCount, g_WindowStylesGauge); - AddStyles("wxComboBox", g_WindowStylesComboBoxCount, g_WindowStylesComboBox); -// AddStyles("wxChoice", g_WindowStylesChoice, g_WindowStylesChoice); - AddStyles("wxScrollBar", g_WindowStylesScrollBarCount, g_WindowStylesScrollBar); -} - -// Operations -void wxWindowStyleTable::ClearTable() -{ - wxNode* node = m_classes.First(); - while (node) - { - wxWindowStyleClass* styleClass = (wxWindowStyleClass*) node->Data(); - delete styleClass; - node = node->Next(); - } - m_classes.Clear(); -} - -void wxWindowStyleTable::AddStyles(const wxString& className, int n, wxWindowStylePair *styles) -{ - wxWindowStyleClass* styleClass = new wxWindowStyleClass(n, styles); - m_classes.Append(className, styleClass); -} - -wxWindowStyleClass* wxWindowStyleTable::FindClass(const wxString& className) -{ - wxNode* node = m_classes.Find(className); - if (node) - { - wxWindowStyleClass* styleClass = (wxWindowStyleClass*) node->Data(); - return styleClass; - } - else - return NULL; -} - -bool wxWindowStyleTable::GenerateStyleStrings(const wxString& className, long windowStyle, char *buf) -{ - wxWindowStyleClass* styleClass = FindClass(className); - if (!styleClass) - return FALSE; - - styleClass->GenerateStyleStrings(windowStyle, buf); - return TRUE; -} - -/* - * Holds all the styles for a particular class - */ - -wxWindowStyleClass::wxWindowStyleClass(int n, wxWindowStylePair *styles) -{ - m_styleCount = n; - m_styles = styles; -/* - m_styles = new wxWindowStylePair[n]; - int i; - for (i = 0; i < n; i++) - m_styles[i] = styles[i]; -*/ -} - -wxWindowStyleClass::~wxWindowStyleClass() -{ -} - -void wxWindowStyleClass::GenerateStyleStrings(long windowStyle, char *buf) -{ - int i; - for (i = 0; i < m_styleCount; i++) - GenerateStyle(buf, windowStyle, m_styles[i].m_styleId, m_styles[i].m_styleName); -} - -bool wxWindowStyleClass::GenerateStyle(char *buf, long windowStyle, long flag, const wxString& strStyle) -{ - // Ignore zero flags - if (flag == 0) - return TRUE; - - if ((windowStyle & flag) == flag) - { - if (strlen(buf) > 0) - strcat(buf, " | "); - strcat(buf, (const char*) strStyle); - return TRUE; - } - else - return FALSE; -} - diff --git a/utils/dialoged/src/winstyle.h b/utils/dialoged/src/winstyle.h deleted file mode 100644 index d7aaf063f4..0000000000 --- a/utils/dialoged/src/winstyle.h +++ /dev/null @@ -1,77 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: winstyle.h -// Purpose: Window styles -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _DE_WINSTYLE_H_ -#define _DE_WINSTYLE_H_ - -#ifdef __GNUG__ -#pragma interface "winstyle.h" -#endif - -#include "wx/wx.h" - -/* - * A class for storing/generating window styles. - */ - -class wxWindowStyleClass; - -class wxWindowStylePair -{ - friend class wxWindowStyleClass; -public: - char* m_styleName; - long m_styleId; -}; - -class wxWindowStyleTable: public wxObject -{ -public: - wxWindowStyleTable(); - ~wxWindowStyleTable(); - -// Operations - void ClearTable(); - void AddStyles(const wxString& className, int n, wxWindowStylePair *styles); - wxWindowStyleClass* FindClass(const wxString& className) ; - bool GenerateStyleStrings(const wxString& className, long windowStyle, char *buf); - - // Initialise with all possible styles - void Init(); - -// Members -protected: - wxList m_classes; // A list of wxWindowStyleClass objects, indexed by class name - -}; - -/* - * Classes for storing all the window style identifiers associated with a particular class - */ - -class wxWindowStyleClass: public wxObject -{ -public: - wxWindowStyleClass(int n, wxWindowStylePair *styles); - ~wxWindowStyleClass(); - -// Operations - void GenerateStyleStrings(long windowStyle, char *buf); - bool GenerateStyle(char *buf, long windowStyle, long flag, const wxString& strStyle); - -// Members -protected: - wxWindowStylePair* m_styles; // An array of wxWindowStylePair objects - int m_styleCount; -}; - -#endif - // _DE_WINSTYLE_H_ diff --git a/utils/glcanvas/Makefile b/utils/glcanvas/Makefile deleted file mode 100644 index 3f7a4dce0d..0000000000 --- a/utils/glcanvas/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makedirs diff --git a/utils/glcanvas/distrib/glcanvas.rsp b/utils/glcanvas/distrib/glcanvas.rsp deleted file mode 100644 index 8467e21712..0000000000 --- a/utils/glcanvas/distrib/glcanvas.rsp +++ /dev/null @@ -1,19 +0,0 @@ -docs/*.* -win/*.cpp -win/*.h -win/make*.* -samples/cube/*.cpp -samples/cube/*.h -samples/cube/*.rc -samples/cube/*.ico -samples/cube/*.xbm -samples/cube/make*.* -samples/isosurf/*.cpp -samples/isosurf/*.h -samples/isosurf/*.rc -samples/isosurf/*.ico -samples/isosurf/*.xbm -samples/isosurf/*.dat -samples/isosurf/*.dat.gz -samples/isosurf/make*.* - diff --git a/utils/glcanvas/distrib/zipsrc.bat b/utils/glcanvas/distrib/zipsrc.bat deleted file mode 100755 index 74029e3967..0000000000 --- a/utils/glcanvas/distrib/zipsrc.bat +++ /dev/null @@ -1,27 +0,0 @@ -@echo off -rem Zip up an external source distribution of GLCanvas -set src=%1 -set dest=%2 -if "%src" == "" set src=%WXWIN\utils\glcanvas -if "%dest" == "" set dest=%WXWIN\utils\glcanvas\deliver -echo About to archive an external GLCanvas distribution: -echo From %src -echo To %dest\glcanvas.zip -echo CTRL-C if this is not correct. -inkey /W10 `Press any key to continue...` %%input - -erase %dest\glcanvas.zip -cd %src - -zip32 -@ %dest\glcanvas.zip < %src\distrib\glcanvas.rsp - -echo GLCanvas archived. -goto end - -:usage -echo GLCanvas distribution. -echo Usage: zipsrc source destination - -:end - - diff --git a/utils/glcanvas/docs/notes.txt b/utils/glcanvas/docs/notes.txt deleted file mode 100644 index d7c392cc87..0000000000 --- a/utils/glcanvas/docs/notes.txt +++ /dev/null @@ -1,15 +0,0 @@ -Problems with wxGLCanvas, 29/8/98 - -Only the cube example compiles under wxWin 2 so far. - -Major problem: OpenGL seems to do something strange to the -event loop, because wxApp::OnIdle never gets a chance to be -called, and therefore delayed deletion (and all other -idle-related processing) doesn't get done. This is why closing -the app doesn't work. - -What does OpenGL do to message processing, and what can be done -about it? Why did it work OK for wxWin 1.xx? It's as if -there's _always_ a message in the queue (PeekMessage always -returns non-zero). Perhaps we need to discover what the message -is it's always returning. diff --git a/utils/glcanvas/samples/cube/cube.cpp b/utils/glcanvas/samples/cube/cube.cpp deleted file mode 100644 index 6a756b2893..0000000000 --- a/utils/glcanvas/samples/cube/cube.cpp +++ /dev/null @@ -1,180 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: cube.cpp -// Purpose: wxGLCanvas demo program -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#pragma interface -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "wx/log.h" - -#include "cube.h" - -IMPLEMENT_APP(MyApp) - -// `Main program' equivalent, creating windows and returning main app frame -bool MyApp::OnInit(void) -{ - wxLog::SetTraceMask(wxTraceMessages); - - // Create the main frame window - MyFrame *frame = new MyFrame(NULL, "Cube OpenGL Demo", wxPoint(50, 50), wxSize(400, 300)); - - // Give it an icon -#ifdef wx_msw - frame->SetIcon(wxIcon("mondrian")); -#endif - - // Make a menubar - wxMenu *fileMenu = new wxMenu; - - fileMenu->Append(wxID_EXIT, "E&xit"); - wxMenuBar *menuBar = new wxMenuBar; - menuBar->Append(fileMenu, "&File"); - frame->SetMenuBar(menuBar); - - frame->m_canvas = new TestGLCanvas(frame, -1, wxPoint(0, 0), wxSize(200, 200)); - - InitGL(); - - // Show the frame - frame->Show(TRUE); - - return TRUE; -} - -void MyApp::InitGL(void) -{ - /* set viewing projection */ - glMatrixMode(GL_PROJECTION); - glFrustum(-0.5F, 0.5F, -0.5F, 0.5F, 1.0F, 3.0F); - - /* position viewer */ - glMatrixMode(GL_MODELVIEW); - glTranslatef(0.0F, 0.0F, -2.0F); - - /* position object */ - glRotatef(30.0F, 1.0F, 0.0F, 0.0F); - glRotatef(30.0F, 0.0F, 1.0F, 0.0F); - - glEnable(GL_DEPTH_TEST); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); -} - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(wxID_EXIT, MyFrame::OnExit) -END_EVENT_TABLE() - -// My frame constructor -MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, - const wxSize& size, long style): - wxFrame(frame, -1, title, pos, size, style) -{ - m_canvas = NULL; -} - -// Intercept menu commands -void MyFrame::OnExit(wxCommandEvent& event) -{ - Destroy(); -} - -bool MyFrame::OnClose(void) -{ - return TRUE; -} - -BEGIN_EVENT_TABLE(TestGLCanvas, wxGLCanvas) - EVT_SIZE(TestGLCanvas::OnSize) - EVT_PAINT(TestGLCanvas::OnPaint) - EVT_ERASE_BACKGROUND(TestGLCanvas::OnEraseBackground) -END_EVENT_TABLE() - -TestGLCanvas::TestGLCanvas(wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, long style, const wxString& name): - wxGLCanvas(parent, id, pos, size, style, name) -{ -} - -TestGLCanvas::~TestGLCanvas(void) -{ -} - -void TestGLCanvas::OnPaint( wxPaintEvent& event ) -{ - // This is a dummy, to avoid an endless succession of paint messages. - // OnPaint handlers must always create a wxPaintDC. - wxPaintDC dc(this); - - if ( !GetContext() ) - return; - - SetCurrent(); - - /* clear color and depth buffers */ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - /* draw six faces of a cube */ - glBegin(GL_QUADS); - glNormal3f( 0.0F, 0.0F, 1.0F); - glVertex3f( 0.5F, 0.5F, 0.5F); glVertex3f(-0.5F, 0.5F, 0.5F); - glVertex3f(-0.5F,-0.5F, 0.5F); glVertex3f( 0.5F,-0.5F, 0.5F); - - glNormal3f( 0.0F, 0.0F,-1.0F); - glVertex3f(-0.5F,-0.5F,-0.5F); glVertex3f(-0.5F, 0.5F,-0.5F); - glVertex3f( 0.5F, 0.5F,-0.5F); glVertex3f( 0.5F,-0.5F,-0.5F); - - glNormal3f( 0.0F, 1.0F, 0.0F); - glVertex3f( 0.5F, 0.5F, 0.5F); glVertex3f( 0.5F, 0.5F,-0.5F); - glVertex3f(-0.5F, 0.5F,-0.5F); glVertex3f(-0.5F, 0.5F, 0.5F); - - glNormal3f( 0.0F,-1.0F, 0.0F); - glVertex3f(-0.5F,-0.5F,-0.5F); glVertex3f( 0.5F,-0.5F,-0.5F); - glVertex3f( 0.5F,-0.5F, 0.5F); glVertex3f(-0.5F,-0.5F, 0.5F); - - glNormal3f( 1.0F, 0.0F, 0.0F); - glVertex3f( 0.5F, 0.5F, 0.5F); glVertex3f( 0.5F,-0.5F, 0.5F); - glVertex3f( 0.5F,-0.5F,-0.5F); glVertex3f( 0.5F, 0.5F,-0.5F); - - glNormal3f(-1.0F, 0.0F, 0.0F); - glVertex3f(-0.5F,-0.5F,-0.5F); glVertex3f(-0.5F,-0.5F, 0.5F); - glVertex3f(-0.5F, 0.5F, 0.5F); glVertex3f(-0.5F, 0.5F,-0.5F); - glEnd(); - - SwapBuffers(); -} - -void TestGLCanvas::OnSize(wxSizeEvent& event) -{ - int width, height; - GetClientSize(& width, & height); - - if ( GetContext() ) - glViewport(0, 0, width, height); -} - -void TestGLCanvas::OnEraseBackground(wxEraseEvent& event) -{ - // Do nothing, to avoid flashing. -} - diff --git a/utils/glcanvas/samples/cube/cube.h b/utils/glcanvas/samples/cube/cube.h deleted file mode 100644 index f3dc44ac49..0000000000 --- a/utils/glcanvas/samples/cube/cube.h +++ /dev/null @@ -1,56 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: cube.h -// Purpose: wxGLCanvas demo program -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_CUBE_H_ -#define _WX_CUBE_H_ - -#include "glcanvas.h" - -// Define a new application type -class MyApp: public wxApp -{ -public: - bool OnInit(void); - void InitGL(void); -}; - -// Define a new frame type -class TestGLCanvas; -class MyFrame: public wxFrame -{ -public: - MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, - long style = wxDEFAULT_FRAME_STYLE); - - void OnExit(wxCommandEvent& event); - bool OnClose(void); -public: - TestGLCanvas* m_canvas; - -DECLARE_EVENT_TABLE() -}; - -class TestGLCanvas: public wxGLCanvas -{ - public: - TestGLCanvas(wxWindow *parent, const wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "TestGLCanvas"); - ~TestGLCanvas(void); - - void OnPaint(wxPaintEvent& event); - void OnSize(wxSizeEvent& event); - void OnEraseBackground(wxEraseEvent& event); - -DECLARE_EVENT_TABLE() -}; - -#endif - diff --git a/utils/glcanvas/samples/cube/cube.rc b/utils/glcanvas/samples/cube/cube.rc deleted file mode 100644 index 7655c62a4c..0000000000 --- a/utils/glcanvas/samples/cube/cube.rc +++ /dev/null @@ -1,3 +0,0 @@ -mondrian ICON "mondrian.ico" -#include "wx/msw/wx.rc" - diff --git a/utils/glcanvas/samples/cube/makefile.g95 b/utils/glcanvas/samples/cube/makefile.g95 deleted file mode 100644 index 88d34c180f..0000000000 --- a/utils/glcanvas/samples/cube/makefile.g95 +++ /dev/null @@ -1,37 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for cube example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/makeg95.env - -OBJECTS = $(OBJDIR)/cube.$(OBJSUFF) - -all: $(OBJDIR) cube$(GUISUFFIX)$(EXESUFF) - -wx: - -$(OBJDIR): - mkdir $(OBJDIR) - -cube$(GUISUFFIX)$(EXESUFF): $(OBJDIR)/cube.$(OBJSUFF) cube.res $(WXLIB) - $(CC) $(LDFLAGS) -o cube$(GUISUFFIX)$(EXESUFF) $(OBJDIR)/cube.$(OBJSUFF) $(LDLIBS) - $(RSRC) cube.$(RESSUFF) cube.exe - -$(OBJDIR)/cube.$(OBJSUFF): cube.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ cube.$(SRCSUFF) - -cube.res: cube.rc - -clean: - rm -f $(OBJECTS) cube$(GUISUFFIX).exe core *.rsc *.res diff --git a/utils/glcanvas/samples/cube/makefile.nt b/utils/glcanvas/samples/cube/makefile.nt deleted file mode 100644 index f1d9e289a2..0000000000 --- a/utils/glcanvas/samples/cube/makefile.nt +++ /dev/null @@ -1,66 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1997 -# Updated: -# -# "%W% %G%" -# -# Makefile : Builds cube example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -EXTRAINC=-I..\..\win -EXTRALIBS=$(WXDIR)\lib\glcanvas.lib glu.lib opengl.lib - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\utils\glcanvas\samples\cube -PROGRAM=cube - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(PROGRAM).h $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/utils/glcanvas/samples/cube/mondrian.ico b/utils/glcanvas/samples/cube/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/utils/glcanvas/samples/cube/mondrian.ico and /dev/null differ diff --git a/utils/glcanvas/samples/isosurf/isosurf.cpp b/utils/glcanvas/samples/isosurf/isosurf.cpp deleted file mode 100644 index 31b49e3b51..0000000000 --- a/utils/glcanvas/samples/isosurf/isosurf.cpp +++ /dev/null @@ -1,417 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: isosurf.cpp -// Purpose: wxGLCanvas demo program -// Author: Brian Paul (original gltk version), Wolfram Gloger -// Modified by: Julian Smart -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation -#pragma interface -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "wx/timer.h" -#include "glcanvas.h" - -#include -#include - -#include "isosurf.h" - -// The following part is taken largely unchanged from the original C Version - -#include - -GLboolean speed_test = GL_FALSE; -GLboolean use_vertex_arrays = GL_FALSE; - -GLboolean doubleBuffer = GL_TRUE; - -GLboolean smooth = GL_TRUE; -GLboolean lighting = GL_TRUE; - - -#define MAXVERTS 10000 - -static GLfloat verts[MAXVERTS][3]; -static GLfloat norms[MAXVERTS][3]; -static GLint numverts; - -static GLfloat xrot; -static GLfloat yrot; - - -static void read_surface( char *filename ) -{ - FILE *f; - - f = fopen(filename,"r"); - if (!f) { - wxString msg("Couldn't read "); - msg += filename; - wxMessageBox(msg); - return; - } - - numverts = 0; - while (!feof(f) && numvertsSetIcon(wxIcon("mondrian")); - - // Make a menubar - wxMenu *fileMenu = new wxMenu; - - fileMenu->Append(wxID_EXIT, "E&xit"); - wxMenuBar *menuBar = new wxMenuBar; - menuBar->Append(fileMenu, "&File"); - frame->SetMenuBar(menuBar); - - // Make a TestGLCanvas - - // JACS -#ifdef __WXMSW__ - int *gl_attrib = NULL; -#else - int gl_attrib[20] = { GLX_RGBA, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, GLX_DEPTH_SIZE, 1, - GLX_DOUBLEBUFFER, None }; -#endif - - if(!doubleBuffer -#ifdef __X__ // JACS - || !wxGLCanvas::HaveVisual(gl_attrib) -#endif - ) - { - printf("don't have double buffer, disabling\n"); -#ifndef __WXMSW__ - gl_attrib[9] = None; -#endif - doubleBuffer = GL_FALSE; - } - frame->m_canvas = new TestGLCanvas(frame, -1, wxPoint(0, 0), wxSize(200, 200), 0, "TestGLCanvas", - gl_attrib); - - // Show the frame - frame->Show(TRUE); - - frame->m_canvas->SetCurrent(); - read_surface( "isosurf.dat" ); - - Init(); - - return TRUE; -} - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(wxID_EXIT, MyFrame::OnExit) -END_EVENT_TABLE() - -// My frame constructor -MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, - const wxSize& size, long style): - wxFrame(frame, -1, title, pos, size, style) -{ - m_canvas = NULL; -} - -// Intercept menu commands -void MyFrame::OnExit(wxCommandEvent& event) -{ - Destroy(); -} - -bool MyFrame::OnClose(void) -{ - return TRUE; -} - - -/* - * TestGLCanvas implementation - */ - -BEGIN_EVENT_TABLE(TestGLCanvas, wxGLCanvas) - EVT_SIZE(TestGLCanvas::OnSize) - EVT_PAINT(TestGLCanvas::OnPaint) - EVT_CHAR(TestGLCanvas::OnChar) - EVT_MOUSE_EVENTS(TestGLCanvas::OnMouseEvent) - EVT_ERASE_BACKGROUND(TestGLCanvas::OnEraseBackground) -END_EVENT_TABLE() - -TestGLCanvas::TestGLCanvas(wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, long style, const wxString& name, int* gl_attrib): - wxGLCanvas(parent, id, pos, size, style, name, gl_attrib) -{ - parent->Show(TRUE); - SetCurrent(); - /* Make sure server supports the vertex array extension */ - char* extensions = (char *) glGetString( GL_EXTENSIONS ); - if (!extensions || !strstr( extensions, "GL_EXT_vertex_array" )) { - use_vertex_arrays = GL_FALSE; - } -} - - -TestGLCanvas::~TestGLCanvas(void) -{ -} - -void TestGLCanvas::OnPaint( wxPaintEvent& event ) -{ - // This is a dummy, to avoid an endless succession of paint messages. - // OnPaint handlers must always create a wxPaintDC. - wxPaintDC dc(this); - - draw1(); - SwapBuffers(); -} - -void TestGLCanvas::OnSize(wxSizeEvent& event) -{ - SetCurrent(); - int width, height; - GetClientSize(& width, & height); - Reshape(width, height); -} - -void TestGLCanvas::OnChar(wxKeyEvent& event) -{ - switch(event.KeyCode()) { - case WXK_ESCAPE: - exit(0); - case WXK_LEFT: - yrot -= 15.0; - break; - case WXK_RIGHT: - yrot += 15.0; - break; - case WXK_UP: - xrot += 15.0; - break; - case WXK_DOWN: - xrot -= 15.0; - break; - case 's': case 'S': - smooth = !smooth; - if (smooth) { - glShadeModel(GL_SMOOTH); - } else { - glShadeModel(GL_FLAT); - } - break; - case 'l': case 'L': - lighting = !lighting; - if (lighting) { - glEnable(GL_LIGHTING); - } else { - glDisable(GL_LIGHTING); - } - break; - } - - Refresh(); -} - -void TestGLCanvas::OnMouseEvent(wxMouseEvent& event) -{ - static int dragging = 0; - static float last_x, last_y; - - //printf("%f %f %d\n", event.GetX(), event.GetY(), (int)event.LeftIsDown()); - if(event.LeftIsDown()) { - if(!dragging) { - dragging = 1; - } else { - yrot += (event.GetX() - last_x)*1.0; - xrot += (event.GetY() - last_y)*1.0; - Refresh(); - } - last_x = event.GetX(); - last_y = event.GetY(); - } else - dragging = 0; -} - -void TestGLCanvas::OnEraseBackground(wxEraseEvent& event) -{ - // Do nothing, to avoid flashing. -} - diff --git a/utils/glcanvas/samples/isosurf/isosurf.dat.gz b/utils/glcanvas/samples/isosurf/isosurf.dat.gz deleted file mode 100644 index b2b9e007d7..0000000000 Binary files a/utils/glcanvas/samples/isosurf/isosurf.dat.gz and /dev/null differ diff --git a/utils/glcanvas/samples/isosurf/isosurf.h b/utils/glcanvas/samples/isosurf/isosurf.h deleted file mode 100644 index 0a747deb74..0000000000 --- a/utils/glcanvas/samples/isosurf/isosurf.h +++ /dev/null @@ -1,53 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: isosurf.h -// Purpose: wxGLCanvas demo program -// Author: Brian Paul (original gltk version), Wolfram Gloger -// Modified by: Julian Smart -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_ISOSURF_H_ -#define _WX_ISOSURF_H_ - -// Define a new application type -class MyApp: public wxApp -{ public: - bool OnInit(void); -}; - -class TestGLCanvas: public wxGLCanvas -{ - public: - TestGLCanvas(wxWindow *parent, const wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "TestGLCanvas", - int* gl_attrib = NULL); - ~TestGLCanvas(void); - - void OnPaint(wxPaintEvent& event); - void OnSize(wxSizeEvent& event); - void OnEraseBackground(wxEraseEvent& event); - void OnChar(wxKeyEvent& event); - void OnMouseEvent(wxMouseEvent& event); - -DECLARE_EVENT_TABLE() -}; - -class MyFrame: public wxFrame -{ -public: - MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, - long style = wxDEFAULT_FRAME_STYLE); - - void OnExit(wxCommandEvent& event); - bool OnClose(void); -public: - TestGLCanvas* m_canvas; - -DECLARE_EVENT_TABLE() -}; - -#endif - diff --git a/utils/glcanvas/samples/isosurf/isosurf.rc b/utils/glcanvas/samples/isosurf/isosurf.rc deleted file mode 100644 index 7655c62a4c..0000000000 --- a/utils/glcanvas/samples/isosurf/isosurf.rc +++ /dev/null @@ -1,3 +0,0 @@ -mondrian ICON "mondrian.ico" -#include "wx/msw/wx.rc" - diff --git a/utils/glcanvas/samples/isosurf/makefile.nt b/utils/glcanvas/samples/isosurf/makefile.nt deleted file mode 100644 index 2a1f6070b7..0000000000 --- a/utils/glcanvas/samples/isosurf/makefile.nt +++ /dev/null @@ -1,66 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1997 -# Updated: -# -# "%W% %G%" -# -# Makefile : Builds isosurf example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -WXUSINGDLL=0 - -EXTRAINC=-I..\..\win -EXTRALIBS=$(WXDIR)\lib\glcanvas.lib glu.lib opengl.lib - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\utils\glcanvas\samples\isosurf -PROGRAM=isosurf - -OBJECTS = $(PROGRAM).obj - -$(PROGRAM): $(PROGRAM).exe - -all: wx $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - - -$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(PROGRAM).h $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/utils/glcanvas/samples/isosurf/mondrian.ico b/utils/glcanvas/samples/isosurf/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/utils/glcanvas/samples/isosurf/mondrian.ico and /dev/null differ diff --git a/utils/glcanvas/src/.cvsignore b/utils/glcanvas/src/.cvsignore deleted file mode 100644 index 4646a42c35..0000000000 --- a/utils/glcanvas/src/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux diff --git a/utils/glcanvas/src/Makefile b/utils/glcanvas/src/Makefile deleted file mode 100644 index 35ce1069fd..0000000000 --- a/utils/glcanvas/src/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../../setup/general/makedirs diff --git a/utils/glcanvas/src/Makefile.in b/utils/glcanvas/src/Makefile.in deleted file mode 100644 index 2bed8a867e..0000000000 --- a/utils/glcanvas/src/Makefile.in +++ /dev/null @@ -1,67 +0,0 @@ -# -# wGLCanvas source makefile for Unix -# -# Copyright 1998, Robert Roebling -# - -# wxWindows base directory -WXBASEDIR=@WXBASEDIR@ - -# set the OS type for compilation -OS=@OS@ - -# compile a library only -RULE=gslib - -# needed for unactivated -NONE= - -# define library name -LIB_TARGET=wx_opengl_gtk -LIB_MAJOR=0 -LIB_MINOR=1 - -# define library sources - -LIB_CPP_SRC= \ -\ - glcanvas.cpp - -#define library objects -LIB_OBJ= \ -\ - $(LIB_CPP_SRC:.cpp=.o) - -all:: - -clean:: - -#additional things needed for compile -ADD_COMPILE= - -# include the definitions now -include ../../../../template.mak - -install:: - @echo "Installing library files and headers for libwx_opengl_gtk.." - @echo " Creating directory.." - @$(WXBASEDIR)/mkinstalldirs /usr/local/include/wx_opengl - @echo " Copying headers from /include/wx" - @cd $(WXBASEDIR)/utils/glcanvas/src ; \ - for f in *.h ; do \ - rm -f /usr/local/include/wx_opengl/$$f ; \ - $(INSTALL_DATA) $$f /usr/local/include/wx_opengl/$$f ; \ - done - @echo " Copying static library files to /usr/local/lib" - @cd $(WXBASEDIR)/lib/$(OS) ; \ - for f in libwx_opengl_gtk.a ; do \ - rm -f /usr/local/lib/$$f ; \ - $(INSTALL_DATA) $$f /usr/local/lib/$$f ; \ - done - @echo " Copying shared libraries to /usr/local/lib" - @cd $(WXBASEDIR)/lib/$(OS) ; \ - for f in libwx_opengl_gtk.so* ; do \ - rm -f /usr/local/lib/$$f ; \ - $(INSTALL_PROGRAM) $$f /usr/local/lib/$$f ; \ - done - diff --git a/utils/glcanvas/src/glcanvas.cpp b/utils/glcanvas/src/glcanvas.cpp deleted file mode 100644 index 44f28e7e0b..0000000000 --- a/utils/glcanvas/src/glcanvas.cpp +++ /dev/null @@ -1,161 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: glcanvas.cpp -// Purpose: wxGLCanvas, for using OpenGL/Mesa with wxWindows and GTK -// Author: Robert Roebling -// Modified by: -// Created: 17/08/98 -// RCS-ID: $Id$ -// Copyright: (c) Robert Roebling -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "glcanvas.h" -#endif - -#include "wx/wxprec.h" - -#include "wx/frame.h" -#include "wx/colour.h" -#include "glcanvas.h" -#include - -//--------------------------------------------------------------------------- -// wxGLContext -//--------------------------------------------------------------------------- - -IMPLEMENT_CLASS(wxGLContext,wxObject) - -wxGLContext::wxGLContext( bool WXUNUSED(isRGB), wxWindow *win, const wxPalette& WXUNUSED(palette) ) -{ - m_window = win; - m_widget = win->m_wxwindow; - - int data[] = {GLX_RGBA,GLX_RED_SIZE,1,GLX_GREEN_SIZE,1, - GLX_BLUE_SIZE,1,GLX_DOUBLEBUFFER,None}; - - Display *display = GDK_WINDOW_XDISPLAY( m_widget->window ); - XVisualInfo *visual_info = glXChooseVisual( display, DefaultScreen(display), data ); - - wxCHECK_RET( visual_info != NULL, "Couldn't choose visual for OpenGl" ); - - m_glContext = glXCreateContext( display, visual_info, None, GL_TRUE ); - - wxCHECK_RET( m_glContext != NULL, "Couldn't create OpenGl context" ); - - glXMakeCurrent( display, GDK_WINDOW_XWINDOW(m_widget->window), m_glContext ); -} - -wxGLContext::~wxGLContext() -{ - if (m_glContext) - { - Display *display = GDK_WINDOW_XDISPLAY( m_widget->window ); - glXMakeCurrent( display, GDK_WINDOW_XWINDOW(m_widget->window), m_glContext ); - - glXDestroyContext( display, m_glContext ); - } -} - -void wxGLContext::SwapBuffers() -{ - if (m_glContext) - { - Display *display = GDK_WINDOW_XDISPLAY( m_widget->window ); - glXSwapBuffers( display, GDK_WINDOW_XWINDOW( m_widget->window ) ); - } -} - -void wxGLContext::SetCurrent() -{ - if (m_glContext) - { - Display *display = GDK_WINDOW_XDISPLAY( m_widget->window ); - glXMakeCurrent( display, GDK_WINDOW_XWINDOW(m_widget->window), m_glContext ); - } -} - -void wxGLContext::SetColour(const char *colour) -{ - float r = 0.0; - float g = 0.0; - float b = 0.0; - wxColour *col = wxTheColourDatabase->FindColour(colour); - if (col) - { - r = (float)(col->Red()/256.0); - g = (float)(col->Green()/256.0); - b = (float)(col->Blue()/256.0); - glColor3f( r, g, b); - } -} - -void wxGLContext::SetupPixelFormat() -{ -} - -void wxGLContext::SetupPalette( const wxPalette& WXUNUSED(palette) ) -{ -} - -wxPalette wxGLContext::CreateDefaultPalette() -{ - return wxNullPalette; -} - -//--------------------------------------------------------------------------- -// wxGlCanvas -//--------------------------------------------------------------------------- - -IMPLEMENT_CLASS(wxGLCanvas, wxScrolledWindow) - -BEGIN_EVENT_TABLE(wxGLCanvas, wxScrolledWindow) - EVT_SIZE(wxGLCanvas::OnSize) -END_EVENT_TABLE() - -wxGLCanvas::wxGLCanvas(wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, long style, const wxString& name, - int *WXUNUSED(attribList), const wxPalette& palette): - wxScrolledWindow(parent, id, pos, size, style, name) -{ - m_glContext = new wxGLContext( TRUE, this, palette ); -} - -wxGLCanvas::~wxGLCanvas() -{ - if (m_glContext) delete m_glContext; -} - -void wxGLCanvas::SwapBuffers() -{ - if (m_glContext) m_glContext->SwapBuffers(); -} - -void wxGLCanvas::OnSize(wxSizeEvent& WXUNUSED(event)) -{ - int width, height; - GetClientSize(& width, & height); - - if (m_glContext) - { - m_glContext->SetCurrent(); - - glViewport(0, 0, (GLint)width, (GLint)height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 15.0 ); - glMatrixMode(GL_MODELVIEW); - } -} - -void wxGLCanvas::SetCurrent() -{ - if (m_glContext) m_glContext->SetCurrent(); -} - -void wxGLCanvas::SetColour( const char *colour ) -{ - if (m_glContext) m_glContext->SetColour( colour ); -} - - diff --git a/utils/glcanvas/src/glcanvas.h b/utils/glcanvas/src/glcanvas.h deleted file mode 100644 index f277c771c9..0000000000 --- a/utils/glcanvas/src/glcanvas.h +++ /dev/null @@ -1,98 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: glcanvas.h -// Purpose: wxGLCanvas, for using OpenGL/Mesa with wxWindows and GTK -// Author: Robert Roebling -// Modified by: -// Created: 17/8/98 -// RCS-ID: $Id$ -// Copyright: (c) Robert Roebling -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma interface "glcanvas.h" -#endif - -#ifndef _WX_GLCANVAS_H_ -#define _WX_GLCANVAS_H_ - -#include "wx/defs.h" -#include "wx/scrolwin.h" - -#include "GL/gl.h" -#include "GL/glx.h" -#include "GL/glu.h" - -//--------------------------------------------------------------------------- -// classes -//--------------------------------------------------------------------------- - -class wxGLContext; -class wxGLCanvas; - -//--------------------------------------------------------------------------- -// wxGLContext -//--------------------------------------------------------------------------- - - -class wxGLContext: public wxObject -{ - DECLARE_CLASS(wxGLContext) - - public: - - wxGLContext( bool isRGB, wxWindow *win, const wxPalette& palette = wxNullPalette ); - ~wxGLContext(); - - void SetCurrent(); - void SetColour(const char *colour); - void SwapBuffers(); - - void SetupPixelFormat(); - void SetupPalette(const wxPalette& palette); - wxPalette CreateDefaultPalette(); - - inline wxPalette* GetPalette() const { return (wxPalette*) & m_palette; } - inline wxWindow* GetWindow() const { return m_window; } - inline GtkWidget* GetWidget() const { return m_widget; } - inline GLXContext GetContext() const { return m_glContext; } - - public: - - GLXContext m_glContext; - - GtkWidget *m_widget; - wxPalette m_palette; - wxWindow* m_window; -}; - -//--------------------------------------------------------------------------- -// wxGLContext -//--------------------------------------------------------------------------- - -class wxGLCanvas: public wxScrolledWindow -{ - DECLARE_CLASS(wxGLCanvas) - - public: - wxGLCanvas(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = "GLCanvas", int *attribList = 0, const wxPalette& palette = wxNullPalette); - ~wxGLCanvas(); - - void SetCurrent(); - void SetColour(const char *colour); - void SwapBuffers(); - - void OnSize(wxSizeEvent& event); - - inline wxGLContext* GetContext() const { return m_glContext; } - - protected: - - wxGLContext* m_glContext; // this is typedef-ed ptr, in fact - - DECLARE_EVENT_TABLE() -}; - -#endif diff --git a/utils/glcanvas/win/glcanvas.cpp b/utils/glcanvas/win/glcanvas.cpp deleted file mode 100644 index 252bcb8c0c..0000000000 --- a/utils/glcanvas/win/glcanvas.cpp +++ /dev/null @@ -1,430 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: glcanvas.cpp -// Purpose: wxGLCanvas, for using OpenGL with wxWindows under MS Windows -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "glcanvas.h" -#endif - -#include "wx/wxprec.h" - -#if defined(__BORLANDC__) -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#include "GL/gl.h" - -#include "glcanvas.h" - -/* - * GLContext implementation - */ - -wxGLContext::wxGLContext(bool isRGB, wxWindow *win, const wxPalette& palette) -{ - m_window = win; - - m_hDC = (WXHDC) ::GetDC((HWND) win->GetHWND()); - - SetupPixelFormat(); - SetupPalette(palette); - - m_glContext = wglCreateContext((HDC) m_hDC); - wglMakeCurrent((HDC) m_hDC, m_glContext); -} - -wxGLContext::~wxGLContext() -{ - if (m_glContext) - { - wglMakeCurrent(NULL, NULL); - wglDeleteContext(m_glContext); - } - - ::ReleaseDC((HWND) m_window->GetHWND(), (HDC) m_hDC); -} - -void wxGLContext::SwapBuffers() -{ - if (m_glContext) - { - wglMakeCurrent((HDC) m_hDC, m_glContext); - ::SwapBuffers((HDC) m_hDC); //blits the backbuffer into DC - } -} - -void wxGLContext::SetCurrent() -{ - if (m_glContext) - { - wglMakeCurrent((HDC) m_hDC, m_glContext); - } - -/* - setupPixelFormat(hDC); - setupPalette(hDC); -*/ -} - -void wxGLContext::SetColour(const char *colour) -{ - float r = 0.0; - float g = 0.0; - float b = 0.0; - wxColour *col = wxTheColourDatabase->FindColour(colour); - if (col) - { - r = (float)(col->Red()/256.0); - g = (float)(col->Green()/256.0); - b = (float)(col->Blue()/256.0); - glColor3f( r, g, b); - } -} - -void wxGLContext::SetupPixelFormat() // (HDC hDC) -{ - PIXELFORMATDESCRIPTOR pfd = { - sizeof(PIXELFORMATDESCRIPTOR), /* size */ - 1, /* version */ - PFD_SUPPORT_OPENGL | - PFD_DRAW_TO_WINDOW | - PFD_DOUBLEBUFFER, /* support double-buffering */ - PFD_TYPE_RGBA, /* color type */ - 16, /* prefered color depth */ - 0, 0, 0, 0, 0, 0, /* color bits (ignored) */ - 0, /* no alpha buffer */ - 0, /* alpha bits (ignored) */ - 0, /* no accumulation buffer */ - 0, 0, 0, 0, /* accum bits (ignored) */ - 16, /* depth buffer */ - 0, /* no stencil buffer */ - 0, /* no auxiliary buffers */ - PFD_MAIN_PLANE, /* main layer */ - 0, /* reserved */ - 0, 0, 0, /* no layer, visible, damage masks */ - }; - int pixelFormat; - - pixelFormat = ChoosePixelFormat((HDC) m_hDC, &pfd); - if (pixelFormat == 0) { - MessageBox(WindowFromDC((HDC) m_hDC), "ChoosePixelFormat failed.", "Error", - MB_ICONERROR | MB_OK); - exit(1); - } - - if (SetPixelFormat((HDC) m_hDC, pixelFormat, &pfd) != TRUE) { - MessageBox(WindowFromDC((HDC) m_hDC), "SetPixelFormat failed.", "Error", - MB_ICONERROR | MB_OK); - exit(1); - } -} - -void wxGLContext::SetupPalette(const wxPalette& palette) -{ - int pixelFormat = GetPixelFormat((HDC) m_hDC); - PIXELFORMATDESCRIPTOR pfd; - - DescribePixelFormat((HDC) m_hDC, pixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd); - - if (pfd.dwFlags & PFD_NEED_PALETTE) - { - } - else - { - return; - } - - m_palette = palette; - - if ( !m_palette.Ok() ) - { - m_palette = CreateDefaultPalette(); - } - - if (m_palette.Ok()) - { - SelectPalette((HDC) m_hDC, (HPALETTE) m_palette.GetHPALETTE(), FALSE); - RealizePalette((HDC) m_hDC); - } -} - -wxPalette wxGLContext::CreateDefaultPalette() -{ - PIXELFORMATDESCRIPTOR pfd; - int paletteSize; - int pixelFormat = GetPixelFormat((HDC) m_hDC); - - DescribePixelFormat((HDC) m_hDC, pixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd); - - paletteSize = 1 << pfd.cColorBits; - - LOGPALETTE* pPal = - (LOGPALETTE*) malloc(sizeof(LOGPALETTE) + paletteSize * sizeof(PALETTEENTRY)); - pPal->palVersion = 0x300; - pPal->palNumEntries = paletteSize; - - /* build a simple RGB color palette */ - { - int redMask = (1 << pfd.cRedBits) - 1; - int greenMask = (1 << pfd.cGreenBits) - 1; - int blueMask = (1 << pfd.cBlueBits) - 1; - int i; - - for (i=0; ipalPalEntry[i].peRed = - (((i >> pfd.cRedShift) & redMask) * 255) / redMask; - pPal->palPalEntry[i].peGreen = - (((i >> pfd.cGreenShift) & greenMask) * 255) / greenMask; - pPal->palPalEntry[i].peBlue = - (((i >> pfd.cBlueShift) & blueMask) * 255) / blueMask; - pPal->palPalEntry[i].peFlags = 0; - } - } - - HPALETTE hPalette = CreatePalette(pPal); - free(pPal); - - wxPalette palette; - palette.SetHPALETTE((WXHPALETTE) hPalette); - - return palette; -} - -/* - * wxGLCanvas implementation - */ - -IMPLEMENT_CLASS(wxGLCanvas, wxScrolledWindow) - -BEGIN_EVENT_TABLE(wxGLCanvas, wxScrolledWindow) - EVT_SIZE(wxGLCanvas::OnSize) - EVT_PALETTE_CHANGED(wxGLCanvas::OnPaletteChanged) - EVT_QUERY_NEW_PALETTE(wxGLCanvas::OnQueryNewPalette) -END_EVENT_TABLE() - -wxGLCanvas::wxGLCanvas(wxWindow *parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, long style, const wxString& name, - int *attribList /* not used yet! */, const wxPalette& palette): - wxScrolledWindow(parent, id, pos, size, style, name) -{ - m_glContext = new wxGLContext(TRUE, this, palette); -} - -wxGLCanvas::~wxGLCanvas() -{ - if (m_glContext) - delete m_glContext; -} - -void wxGLCanvas::SwapBuffers() -{ - if (m_glContext) - m_glContext->SwapBuffers(); -} - -void wxGLCanvas::OnSize(wxSizeEvent& event) -{ - int width, height; - GetClientSize(& width, & height); - - if (m_glContext) - { - m_glContext->SetCurrent(); - - glViewport(0, 0, (GLint)width, (GLint)height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 15.0 ); - glMatrixMode(GL_MODELVIEW); - } -} - -void wxGLCanvas::SetCurrent() -{ - if (m_glContext) - { - m_glContext->SetCurrent(); - } -} - -void wxGLCanvas::SetColour(const char *colour) -{ - if (m_glContext) - m_glContext->SetColour(colour); -} - -// TODO: Have to have this called by parent frame (?) -// So we need wxFrame to call OnQueryNewPalette for all children... -void wxGLCanvas::OnQueryNewPalette(wxQueryNewPaletteEvent& event) -{ - /* realize palette if this is the current window */ - if (m_glContext && m_glContext->GetPalette()->Ok()) { - ::UnrealizeObject((HPALETTE) m_glContext->GetPalette()->GetHPALETTE()); - ::SelectPalette((HDC) m_glContext->GetHDC(), (HPALETTE) m_glContext->GetPalette()->GetHPALETTE(), FALSE); - ::RealizePalette((HDC) m_glContext->GetHDC()); - Refresh(); - event.SetPaletteRealized(TRUE); - } - else - event.SetPaletteRealized(FALSE); -} - -// I think this doesn't have to be propagated to child windows. -void wxGLCanvas::OnPaletteChanged(wxPaletteChangedEvent& event) -{ - /* realize palette if this is *not* the current window */ - if ( m_glContext && - m_glContext->GetPalette() && - m_glContext->GetPalette()->Ok() && - (this != event.GetChangedWindow()) ) - { - ::UnrealizeObject((HPALETTE) m_glContext->GetPalette()->GetHPALETTE()); - ::SelectPalette((HDC) m_glContext->GetHDC(), (HPALETTE) m_glContext->GetPalette()->GetHPALETTE(), FALSE); - ::RealizePalette((HDC) m_glContext->GetHDC()); - Refresh(); - } -} - -/* Give extensions proper function names. */ - -/* EXT_vertex_array */ -void glArrayElementEXT(GLint i) -{ -} - -void glColorPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer) -{ -} - -void glDrawArraysEXT(GLenum mode, GLint first, GLsizei count) -{ -#ifdef GL_EXT_vertex_array - static PFNGLDRAWARRAYSEXTPROC proc = 0; - - if ( !proc ) - { - proc = (PFNGLDRAWARRAYSEXTPROC) wglGetProcAddress("glDrawArraysEXT"); - } - - if ( proc ) - (* proc) (mode, first, count); -#endif -} - -void glEdgeFlagPointerEXT(GLsizei stride, GLsizei count, const GLboolean *pointer) -{ -} - -void glGetPointervEXT(GLenum pname, GLvoid* *params) -{ -} - -void glIndexPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer) -{ -} - -void glNormalPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer) -{ -#ifdef GL_EXT_vertex_array - static PFNGLNORMALPOINTEREXTPROC proc = 0; - - if ( !proc ) - { - proc = (PFNGLNORMALPOINTEREXTPROC) wglGetProcAddress("glNormalPointerEXT"); - } - - if ( proc ) - (* proc) (type, stride, count, pointer); -#endif -} - -void glTexCoordPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer) -{ -} - -void glVertexPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer) -{ -#ifdef GL_EXT_vertex_array - static PFNGLVERTEXPOINTEREXTPROC proc = 0; - - if ( !proc ) - { - proc = (PFNGLVERTEXPOINTEREXTPROC) wglGetProcAddress("glVertexPointerEXT"); - } - - if ( proc ) - (* proc) (size, type, stride, count, pointer); -#endif -} - -/* EXT_color_subtable */ -void glColorSubtableEXT(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *table) -{ -} - -/* EXT_color_table */ -void glColorTableEXT(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table) -{ -} - -void glCopyColorTableEXT(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) -{ -} - -void glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid *table) -{ -} - -void glGetColorTableParamaterfvEXT(GLenum target, GLenum pname, GLfloat *params) -{ -} - -void glGetColorTavleParameterivEXT(GLenum target, GLenum pname, GLint *params) -{ -} - -/* SGI_compiled_vertex_array */ -void glLockArraysSGI(GLint first, GLsizei count) -{ -} - -void glUnlockArraysSGI() -{ -} - - -/* SGI_cull_vertex */ -void glCullParameterdvSGI(GLenum pname, GLdouble* params) -{ -} - -void glCullParameterfvSGI(GLenum pname, GLfloat* params) -{ -} - -/* SGI_index_func */ -void glIndexFuncSGI(GLenum func, GLclampf ref) -{ -} - -/* SGI_index_material */ -void glIndexMaterialSGI(GLenum face, GLenum mode) -{ -} - -/* WIN_swap_hint */ -void glAddSwapHintRectWin(GLint x, GLint y, GLsizei width, GLsizei height) -{ -} - diff --git a/utils/glcanvas/win/glcanvas.h b/utils/glcanvas/win/glcanvas.h deleted file mode 100644 index 5c84eb5db0..0000000000 --- a/utils/glcanvas/win/glcanvas.h +++ /dev/null @@ -1,125 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: glcanvas.h -// Purpose: wxGLCanvas, for using OpenGL with wxWindows under Windows -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma interface "glcanvas.h" -#endif - -#ifndef _WX_GLCANVAS_H_ -#define _WX_GLCANVAS_H_ - -#include - -#include "gl/gl.h" - -class wxGLContext: public wxObject -{ -public: - wxGLContext(bool isRGB, wxWindow *win, const wxPalette& palette = wxNullPalette); - ~wxGLContext(); - - void SetCurrent(); - void SetColour(const char *colour); - void SwapBuffers(); - - void SetupPixelFormat(); - void SetupPalette(const wxPalette& palette); - wxPalette CreateDefaultPalette(); - - inline wxPalette* GetPalette() const { return (wxPalette*) & m_palette; } - inline wxWindow* GetWindow() const { return m_window; } - inline WXHDC GetHDC() const { return m_hDC; } - inline HGLRC GetGLRC() const { return m_glContext; } - -public: - HGLRC m_glContext; - WXHDC m_hDC; - wxPalette m_palette; - wxWindow* m_window; -}; - -class wxGLCanvas: public wxScrolledWindow -{ - DECLARE_CLASS(wxGLCanvas) - public: - wxGLCanvas(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = "GLCanvas", int *attribList = 0, const wxPalette& palette = wxNullPalette); - ~wxGLCanvas(); - - void SetCurrent(); - void SetColour(const char *colour); - void SwapBuffers(); - - void OnSize(wxSizeEvent& event); - - void OnQueryNewPalette(wxQueryNewPaletteEvent& event); - void OnPaletteChanged(wxPaletteChangedEvent& event); - - inline wxGLContext* GetContext() const { return m_glContext; } - -protected: - wxGLContext* m_glContext; // this is typedef-ed ptr, in fact - -DECLARE_EVENT_TABLE() -}; - -#ifdef __cplusplus -extern "C" { -#endif - -/* Give extensions proper function names. */ - -/* N.B. - this is not completely implemented as yet */ - -/* EXT_vertex_array */ -void glArrayElementEXT(GLint i); -void glColorPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -void glDrawArraysEXT(GLenum mode, GLint first, GLsizei count); -void glEdgeFlagPointerEXT(GLsizei stride, GLsizei count, const GLboolean *pointer); -void glGetPointervEXT(GLenum pname, GLvoid* *params); -void glIndexPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -void glNormalPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -void glTexCoordPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -void glVertexPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); - -/* EXT_color_subtable */ -void glColorSubtableEXT(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *table); - -/* EXT_color_table */ -void glColorTableEXT(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -void glCopyColorTableEXT(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -void glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid *table); -void glGetColorTableParamaterfvEXT(GLenum target, GLenum pname, GLfloat *params); -void glGetColorTavleParameterivEXT(GLenum target, GLenum pname, GLint *params); - -/* SGI_compiled_vertex_array */ -void glLockArraysSGI(GLint first, GLsizei count); -void glUnlockArraysSGI(); - -/* SGI_cull_vertex */ -void glCullParameterdvSGI(GLenum pname, GLdouble* params); -void glCullParameterfvSGI(GLenum pname, GLfloat* params); - -/* SGI_index_func */ -void glIndexFuncSGI(GLenum func, GLclampf ref); - -/* SGI_index_material */ -void glIndexMaterialSGI(GLenum face, GLenum mode); - -/* WIN_swap_hint */ -void glAddSwapHintRectWin(GLint x, GLint y, GLsizei width, GLsizei height); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/utils/glcanvas/win/makefile.nt b/utils/glcanvas/win/makefile.nt deleted file mode 100644 index 6555f44619..0000000000 --- a/utils/glcanvas/win/makefile.nt +++ /dev/null @@ -1,106 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds GLCanvas class library (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) -GLDIR = $(WXDIR)\utils\glcanvas -THISDIR = $(GLDIR)\win -EXTRALIBS=$(WXDIR)\lib\glcanvas.lib -DOCDIR=$(WXDIR)\docs -LOCALDOCDIR=$(WXDIR)\utils\glcanvas\docs - -!include $(WXDIR)\src\ntwxwin.mak - -PROGRAM=test - -OBJECTS = glcanvas.obj -LIBTARGET=$(WXDIR)\lib\glcanvas.lib - -all: $(LIBTARGET) - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(LIBTARGET): $(OBJECTS) - -erase $(LIBTARGET) - $(implib) @<< --out:$(LIBTARGET) --machine:$(CPU) -$(OBJECTS) -<< - -glcanvas.obj: glcanvas.h glcanvas.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -clean: - -erase *.obj - -erase *.sbr - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb - -erase $(LIBTARGET) - -DOCSOURCES=$(LOCALDOCDIR)\manual.tex $(LOCALDOCDIR)\classes.tex - -html: $(DOCDIR)\html\glcanvas\glcanvas.htm -hlp: $(DOCDIR)\winhelp\glcanvas.hlp -ps: $(WXDIR)\docs\ps\glcanvas.ps - -$(DOCDIR)\winhelp\glcanvas.hlp: $(LOCALDOCDIR)\glcanvas.rtf $(LOCALDOCDIR)\glcanvas.hpj - cd $(LOCALDOCDIR) - -erase glcanvas.ph - hc glcanvas - move glcanvas.hlp $(DOCDIR)\winhelp\glcanvas.hlp - move glcanvas.cnt $(DOCDIR)\winhelp\glcanvas.cnt - cd $(THISDIR) - -$(LOCALDOCDIR)\glcanvas.rtf: $(DOCSOURCES) - cd $(LOCALDOCDIR) - -start /w tex2rtf $(LOCALDOCDIR)\manual.tex $(LOCALDOCDIR)\glcanvas.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)\html\glcanvas\glcanvas.htm: $(DOCSOURCES) - cd $(LOCALDOCDIR) - -mkdir $(DOCDIR)\html\glcanvas - -start /w tex2rtf $(LOCALDOCDIR)\manual.tex $(DOCDIR)\html\glcanvas\glcanvas.htm -twice -html - -erase $(DOCDIR)\html\glcanvas\*.con - -erase $(DOCDIR)\html\glcanvas\*.ref - cd $(THISDIR) - -$(LOCALDOCDIR)\manual.dvi: $(DOCSOURCES) - cd $(LOCALDOCDIR) - -latex manual - -latex manual - -makeindx manual - -bibtex manual - -latex manual - -latex manual - cd $(THISDIR) - -$(WXDIR)\docs\ps\glcanvas.ps: $(LOCALDOCDIR)\manual.dvi - cd $(LOCALDOCDIR) - -dvips32 -o glcanvas.ps manual - move glcanvas.ps $(WXDIR)\docs\ps\glcanvas.ps - cd $(THISDIR) - - diff --git a/utils/makefile.nt b/utils/makefile.nt deleted file mode 100644 index 7679e9d9a7..0000000000 --- a/utils/makefile.nt +++ /dev/null @@ -1,96 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds utilities for Win95, VC++ 4.0 -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -THISDIR=$(WXDIR)\utils - -!include $(WXDIR)\src\ntwxwin.mak - -DEBUG_FLAGS="/Zi /FR" -LINK_DEBUG_FLAGS="/RELEASE" - -all: - cd $(WXDIR)\utils\dialoged\src - nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - cd $(WXDIR)\utils\wxprop\src - nmake -f makefile.nt test DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\utils\hytext\src -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\utils\mfutils\src -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\utils\tex2rtf\src -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\utils\wxbuild\src -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\utils\wxgraph\src -# nmake -f makefile.nt test DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\utils\wxtree\src -# nmake -f makefile.nt test DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\utils\wxhelp\src -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\utils\wximage\win -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\utils\wxweb\src -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\utils\wxhelp2\src -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\utils\clockwrk\src -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\utils\wxanim\src -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\utils\colours -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\utils\ogl\src -# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) -# cd $(WXDIR)\utils\wxchart\src -# nmake -f makefile.nt test DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS) - -clean: - cd $(WXDIR)\utils\wxprop\src - nmake -f makefile.nt clean - cd $(WXDIR)\utils\dialoged\src - nmake -f makefile.nt clean - cd $(WXDIR)\utils\nplugin - nmake -f makefile.nt clean -# cd $(WXDIR)\utils\hytext\src -# nmake -f makefile.nt clean -# cd $(WXDIR)\utils\mfutils\src -# nmake -f makefile.nt clean -# cd $(WXDIR)\utils\tex2rtf\src -# nmake -f makefile.nt clean -# cd $(WXDIR)\utils\wxbuild\src -# nmake -f makefile.nt clean -# cd $(WXDIR)\utils\wxgraph\src -# nmake -f makefile.nt clean -# cd $(WXDIR)\utils\wxtree\src -# nmake -f makefile.nt clean -# cd $(WXDIR)\utils\wxhelp\src -# nmake -f makefile.nt clean -# cd $(WXDIR)\utils\wxhelp2\src -# nmake -f makefile.nt clean -# cd $(WXDIR)\utils\clockwrk\src -# nmake -f makefile.nt clean -# cd $(WXDIR)\utils\wxanim\src -# nmake -f makefile.nt clean -# cd $(WXDIR)\utils\colours -# nmake -f makefile.nt clean -# cd $(WXDIR)\utils\ogl\src -# nmake -f makefile.nt clean -# cd $(WXDIR)\utils\wxchart\src -# nmake -f makefile.nt clean -# cd $(WXDIR)\utils\wxweb\src -# nmake -f makefile.nt clean -# cd $(WXDIR)\utils\wximage\win -# nmake -f makefile.nt clean diff --git a/utils/nplugin/docs/notes.txt b/utils/nplugin/docs/notes.txt deleted file mode 100644 index ee3d1412ea..0000000000 --- a/utils/nplugin/docs/notes.txt +++ /dev/null @@ -1,32 +0,0 @@ -Notes about plugins - - - I have users that want to visit my pages with tclets, but they do not - have the plugin. What can I do? - - Add a pluginspage=http://www.sunlabs.com/tcl/plugin/ name=value - pair to the embed statement. This will cause Navigator to find - the plugin for your user and suggest they install it. The user - is then prompted to download and install the plugin, and then she - has to restart the browser and revisit your page. Very inconvenient - and only slightly better than giving your users the broken image - icon. Netscape says they are working on a more automatic solution. - - - - -14. Your demos work just fine, but when I visit my own pages with tclets in - them, at http://www.myserver.com/~mypages/mypage.html, I still get the - broken image icon. Why doesn't it work for me? - - This is likely because your web server -- the program that sends - the pages to your browser when you click on a URL -- is not - sending the right mime-type when it sends the '.tcl' file. You - can work around this by adding a type=application/x-tcl name=value - pair to the embed statement, which will cause Navigator to infer - that it should use the Tcl plugin anyways. A better solution is - to ask your system administrator to configure the web server to - send the mime type application/x-tcl when it sends files with a - '.tcl' extension. Nearly all web servers in the world nowadays - are already configured to do this, the only ones we are aware of - that do not are some older versions of Apache. diff --git a/utils/nplugin/lib/dummy b/utils/nplugin/lib/dummy deleted file mode 100644 index bfdf726d49..0000000000 --- a/utils/nplugin/lib/dummy +++ /dev/null @@ -1 +0,0 @@ -I'm just here to force the creation of a LIB directory. diff --git a/utils/nplugin/makefile.nt b/utils/nplugin/makefile.nt deleted file mode 100644 index a6a1d27258..0000000000 --- a/utils/nplugin/makefile.nt +++ /dev/null @@ -1,32 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds utilities for Win95, VC++ 4.0 -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -THISDIR=$(WXDIR)\utils\nplugin - -!include $(WXDIR)\src\ntwxwin.mak - -DEBUG_FLAGS="/Zi /FR" -LINK_DEBUG_FLAGS="/RELEASE" - -clean: - cd $(WXDIR)\utils\nplugin\src - nmake -f makefile.nt clean - cd $(WXDIR)\utils\nplugin\samples\simple - nmake -f makefile.nt clean - cd $(WXDIR)\utils\nplugin\samples\gui - nmake -f makefile.nt clean - cd $(WXDIR)\utils\nplugin - diff --git a/utils/nplugin/samples/gui/gui.cpp b/utils/nplugin/samples/gui/gui.cpp deleted file mode 100644 index 3ae118fda0..0000000000 --- a/utils/nplugin/samples/gui/gui.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/* - * File: simple.cpp - * Purpose: Minimal wxWindows plugin - * Author: Julian Smart - * Created: 1997 - * Updated: - * Copyright: (c) Julian Smart - */ - -/* static const char sccsid[] = "%W% %G%"; */ - -#ifdef __GNUG__ -#pragma implementation -#pragma interface -#endif - -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include - -#include "NPApp.h" -#include "NPFrame.h" - -#define ID_HELLO 10 - -// Define a new application type -class MyApp: public wxPluginApp -{ public: - virtual wxFrame *OnInit(void); - virtual wxPluginFrame* OnNewInstance(const wxPluginData& data); -}; - -// Define a new frame type -class MyFrame: public wxPluginFrame -{ public: - MyFrame(const wxPluginData& data); - - public: - // Let's paint directly onto the 'frame'; we don't need a subwindow - void OnPaint(wxPaintEvent& event); - void OnMouseEvent(wxMouseEvent& event); - void OnHello(wxCommandEvent& event); - - // Called when the file has been downloaded - virtual void OnNPNewFile(NPStream *stream, const wxString& fname); - - void CentreStrings(wxDC& dc); - - DECLARE_EVENT_TABLE() - - protected: - wxStringList m_strings; - float m_xpos; - float m_ypos; -}; - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_SIZE(MyFrame::OnSize) - EVT_PAINT(MyFrame::OnPaint) - EVT_MOUSE_EVENTS(MyFrame::OnMouseEvent) - EVT_BUTTON(ID_HELLO, MyFrame::OnHello) -END_EVENT_TABLE() - -IMPLEMENT_APP(MyApp) - -// No app initialisation necessary, and for a plugin there is no -// top frame. -wxFrame *MyApp::OnInit(void) -{ - return NULL; -} - -// Called whenever a new plugin instance is called. We could check -// various things here in 'data' but we won't bother. -wxPluginFrame* MyApp::OnNewInstance(const wxPluginData& data) -{ - // Implicitly added to list of plugin frames - return new MyFrame(data); -} - -// My frame constructor -MyFrame::MyFrame(const wxPluginData& data): - wxPluginFrame(data) -{ - m_xpos = -1; - m_ypos = -1; - - wxMenuBar *menuBar = new wxMenuBar; - wxMenu *menu = new wxMenu; - menu->Append(1, "E&xit"); - menuBar->Append(menu, "&File"); - - SetMenuBar(menuBar); - - new wxTextCtrl(this, -1, "", wxPoint(10, 30), wxSize(200, 25), wxSUNKEN_BORDER); - new wxButton(this, ID_HELLO, "Hello", wxPoint(10, 70)); -} - -void MyFrame::OnPaint(wxPaintEvent& event) -{ - wxPaintDC dc(this); - - dc.SetBrush(*wxCYAN_BRUSH); - dc.SetPen(*wxRED_PEN); - - int w, h; - GetClientSize(&w, &h); - - dc.DrawRectangle(0, 0, w, h); - - wxFont swissFont(10, wxSWISS, wxNORMAL, wxNORMAL); - dc.SetFont(swissFont); - dc.SetBackgroundMode(wxTRANSPARENT); - - CentreStrings(dc); -} - -// Called when the file has been downloaded -void MyFrame::OnNPNewFile(NPStream *stream, const wxString& fname) -{ - ifstream str(fname); - char buf[201]; - - while ( !str.eof() ) - { - buf[0] = 0; - str.getline(buf, 200); - - if ( buf[0] != 0 ) - m_strings.Add(buf); - } - Refresh(); -} - -void MyFrame::CentreStrings(wxDC& dc) -{ - int y = 5; - int cw, ch; - GetClientSize(&cw, &ch); - - wxNode *node = m_strings.First(); - while ( node ) - { - char *s = (char *)node->Data(); - float w, h; - dc.GetTextExtent(s, &w, &h); - - int x = wxMax(0, (cw - w)/2); - dc.DrawText(s, x, y); - - y += h + (h/2); - - node = node->Next(); - } -} - -// This implements a tiny doodling program. Drag the mouse using -// the left button. -void MyFrame::OnMouseEvent(wxMouseEvent& event) -{ - float x, y; - event.Position(&x, &y); - wxClientDC dc(this); - - if (m_xpos > -1 && m_ypos > -1 && event.Dragging() && event.LeftIsDown()) - { - dc.SetPen(wxBLACK_PEN); - dc.SetBrush(wxTRANSPARENT_BRUSH); - dc.DrawLine(m_xpos, m_ypos, x, y); - } - m_xpos = x; - m_ypos = y; -} - -void MyFrame::OnHello(wxCommandEvent& event) -{ - wxMessageBox("Hello!"); -} diff --git a/utils/nplugin/samples/gui/gui.h b/utils/nplugin/samples/gui/gui.h deleted file mode 100644 index 01e46d64b6..0000000000 --- a/utils/nplugin/samples/gui/gui.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * File: gui.h - * Purpose: wxWindows plugin with a few GUI elements - * Author: Julian Smart - * Created: 1997 - * Updated: - * Copyright: (c) Julian Smart - */ - -#ifndef __GUIH__ -#define __GUIH__ - -// Define a new application type -class MyApp: public wxPluginApp -{ public: - virtual wxFrame *OnInit(void); - virtual wxPluginFrame* OnNewInstance(const wxPluginData& data); -}; - -class MyApp; -class MyFrame; -class MyCanvas; - -class MyFrame: public wxPluginFrame -{ -public: - MyFrame(const wxPluginData& data); - virtual ~MyFrame(); - - void OldOnMenuCommand(int id); - -private: - wxMenu* fileMenu; - wxMenuBar* menuBar; - MyCanvas* leftCanvas; - MyCanvas* rightCanvas; - wxSplitterWindow* splitter; -}; - -class MyCanvas: public wxScrolledWindow -{ -public: - MyCanvas(wxWindow* parent, int x, int y, int w, int h); - virtual ~MyCanvas(); - - void OnPaint(wxPaintEvent& event); - -DECLARE_EVENT_TABLE() -}; - -// ID for the menu quit command -#define SPLIT_QUIT 1 -#define SPLIT_HORIZONTAL 2 -#define SPLIT_VERTICAL 3 -#define SPLIT_UNSPLIT 4 - - -#endif - diff --git a/utils/nplugin/samples/gui/index.html b/utils/nplugin/samples/gui/index.html deleted file mode 100644 index 1d84f3d78f..0000000000 --- a/utils/nplugin/samples/gui/index.html +++ /dev/null @@ -1,34 +0,0 @@ - - -GUI Plugin Demo - - - -

    GUI Plugin Demo

    - -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file.

    - - - -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file.

    - -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file.

    - - - - diff --git a/utils/nplugin/samples/gui/makefile.nt b/utils/nplugin/samples/gui/makefile.nt deleted file mode 100644 index 2487d04e37..0000000000 --- a/utils/nplugin/samples/gui/makefile.nt +++ /dev/null @@ -1,70 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1997 -# Updated: -# Copyright: (c) 1997, Julian Smart -# -# "%W% %G%" -# -# Makefile : Builds gui plugin example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -# Application is a DLL -DLL=1 - -EXTRAINC=/I$(WXDIR)\utils\nplugin\src - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\utils\nplugin\examples\gui -PROGRAM=npgui32 -PLUGINLIB=$(WXDIR)\utils\nplugin\lib\nplugin.lib - -OBJECTS = gui.obj - -all: $(PROGRAM).dll - -$(PROGRAM): $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt dllnp FINAL=$(FINAL) - cd $(THISDIR) - -# Update the dynamic link library - -$(PROGRAM).dll: $(DUMMYOBJ) $(OBJECTS) $(WXDIR)\lib\wx.lib $(PLUGINLIB) $(PROGRAM).res $(PROGRAM).def - $(link) $(LINKFLAGS) \ - -out:$(PROGRAM).dll \ - -def:$(PROGRAM).def \ - $(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res $(WXDIR)\lib\wx.lib $(PLUGINLIB) \ - $(guilibsdll) msvcrt.lib shell32.lib comctl32.lib ctl3d32.lib - -gui.obj: gui.$(SRCSUFF) gui.h $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - -copy: - copy npgui32.dll "c:\program files\Netscape\Navigator\program\plugins" - copy npgui32.dll "c:\program files\Internet Explorer\plugins" - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb - -erase *.dll - -erase *.exp - -erase *.lib - -erase *.ilk diff --git a/utils/nplugin/samples/gui/npgui32.def b/utils/nplugin/samples/gui/npgui32.def deleted file mode 100644 index 1107bb98f5..0000000000 --- a/utils/nplugin/samples/gui/npgui32.def +++ /dev/null @@ -1,9 +0,0 @@ -LIBRARY NPGUI32 - -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD SINGLE - -EXPORTS - NP_GetEntryPoints @1 - NP_Initialize @2 - NP_Shutdown @3 diff --git a/utils/nplugin/samples/gui/npgui32.rc b/utils/nplugin/samples/gui/npgui32.rc deleted file mode 100644 index cafee455df..0000000000 --- a/utils/nplugin/samples/gui/npgui32.rc +++ /dev/null @@ -1,44 +0,0 @@ -#include "wx/msw/wx.rc" - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "CompanyName", "Julian Smart\0" - VALUE "FileDescription", "wxWindows GUI example plugin file\0" - VALUE "FileVersion", "0.0.0.1\0" - VALUE "InternalName", "wxWindows GUI Plugin\0" - VALUE "LegalCopyright", "Copyright Julian Smart 1997\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename","npgui32.dll\0" - VALUE "ProductName", "wxWindows GUI Plugin Sample\0" - VALUE "ProductVersion", "0.0.0.1\0" - VALUE "MIMEType", "wxgui/mime-type\0" - VALUE "FileExtents", "gui\0" - VALUE "FileOpenName", "wxWindows GUI (*.gui)\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END - diff --git a/utils/nplugin/samples/simple/index.html b/utils/nplugin/samples/simple/index.html deleted file mode 100644 index 84998d2cd5..0000000000 --- a/utils/nplugin/samples/simple/index.html +++ /dev/null @@ -1,34 +0,0 @@ - - -Simple Plugin Demo - - - -

    Simple Plugin Demo

    - -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file.

    - - - -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file.

    - -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file. -This just demonstrates how to embed an object into an HTML file.

    - - - - diff --git a/utils/nplugin/samples/simple/makefile.nt b/utils/nplugin/samples/simple/makefile.nt deleted file mode 100644 index 896d59b83c..0000000000 --- a/utils/nplugin/samples/simple/makefile.nt +++ /dev/null @@ -1,70 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1997 -# Updated: -# Copyright: (c) 1997, Julian Smart -# -# "%W% %G%" -# -# Makefile : Builds simple plugin example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -# Application is a DLL -DLL=1 - -EXTRAINC=/I$(WXDIR)\utils\nplugin\src - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\utils\nplugin\smples\simple -PROGRAM=npsimple32 -PLUGINLIB=$(WXDIR)\utils\nplugin\lib\nplugin.lib - -OBJECTS = simple.obj - -all: $(PROGRAM).dll - -$(PROGRAM): $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt dllnp FINAL=$(FINAL) - cd $(THISDIR) - -# Update the dynamic link library - -$(PROGRAM).dll: $(DUMMYOBJ) $(OBJECTS) $(WXDIR)\lib\wx.lib $(PLUGINLIB) $(PROGRAM).res $(PROGRAM).def - $(link) $(LINKFLAGS) \ - -out:$(PROGRAM).dll \ - -def:$(PROGRAM).def \ - $(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res $(WXDIR)\lib\wx.lib $(PLUGINLIB) \ - $(guilibsdll) msvcrt.lib shell32.lib comctl32.lib ctl3d32.lib ole32.lib - -simple.obj: simple.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - -copy: - copy npsimple32.dll "c:\program files\Netscape\Navigator\program\plugins" - copy npsimple32.dll "c:\program files\Internet Explorer\plugins" - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb - -erase *.dll - -erase *.exp - -erase *.lib - -erase *.ilk diff --git a/utils/nplugin/samples/simple/npsimple32.def b/utils/nplugin/samples/simple/npsimple32.def deleted file mode 100644 index e3af3116fe..0000000000 --- a/utils/nplugin/samples/simple/npsimple32.def +++ /dev/null @@ -1,9 +0,0 @@ -LIBRARY NPSIMPLE32 - -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD SINGLE - -EXPORTS - NP_GetEntryPoints @1 - NP_Initialize @2 - NP_Shutdown @3 diff --git a/utils/nplugin/samples/simple/npsimple32.rc b/utils/nplugin/samples/simple/npsimple32.rc deleted file mode 100644 index f2d4903226..0000000000 --- a/utils/nplugin/samples/simple/npsimple32.rc +++ /dev/null @@ -1,44 +0,0 @@ -#include "wx/msw/wx.rc" - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "CompanyName", "Julian Smart\0" - VALUE "FileDescription", "wxWindows simple example plugin file\0" - VALUE "FileVersion", "0.0.0.1\0" - VALUE "InternalName", "wxWindows Simple Plugin\0" - VALUE "LegalCopyright", "Copyright Julian Smart 1997\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename","npsimple32.dll\0" - VALUE "ProductName", "wxWindows Simple Plugin Sample\0" - VALUE "ProductVersion", "0.0.0.1\0" - VALUE "MIMEType", "wxsimple/mime-type\0" - VALUE "FileExtents", "smp\0" - VALUE "FileOpenName", "wxWindows Simple (*.smp)\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END - diff --git a/utils/nplugin/samples/simple/simple.cpp b/utils/nplugin/samples/simple/simple.cpp deleted file mode 100644 index 4e4a83f593..0000000000 --- a/utils/nplugin/samples/simple/simple.cpp +++ /dev/null @@ -1,174 +0,0 @@ -/* - * File: simple.cpp - * Purpose: Minimal wxWindows plugin - * Author: Julian Smart - * Created: 1997 - * Updated: - * Copyright: (c) Julian Smart - */ - -/* static const char sccsid[] = "%W% %G%"; */ - -#ifdef __GNUG__ -#pragma implementation -#pragma interface -#endif - -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include - -#include "NPApp.h" -#include "NPFrame.h" - -// Define a new application type -class MyApp: public wxPluginApp -{ public: - virtual bool OnInit(void); - virtual wxPluginFrame* OnNewInstance(const wxPluginData& data); -}; - -// Define a new frame type -class MyFrame: public wxPluginFrame -{ public: - MyFrame(const wxPluginData& data); - - public: - // Let's paint directly onto the 'frame'; we don't need a subwindow - void OnPaint(wxPaintEvent& event); - void OnDraw(wxDC& dc); - void OnMouseEvent(wxMouseEvent& event); - - // Called when the file has been downloaded - virtual void OnNPNewFile(NPStream *stream, const wxString& fname); - - void CentreStrings(wxDC& dc); - - DECLARE_EVENT_TABLE() - - protected: - wxStringList m_strings; - long m_xpos; - long m_ypos; -}; - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_SIZE(MyFrame::OnSize) - EVT_PAINT(MyFrame::OnPaint) - EVT_MOUSE_EVENTS(MyFrame::OnMouseEvent) -END_EVENT_TABLE() - -IMPLEMENT_APP(MyApp) - -// No app initialisation necessary, and for a plugin there is no -// top frame. -bool MyApp::OnInit(void) -{ - return TRUE; -} - -// Called whenever a new plugin instance is called. We could check -// various things here in 'data' but we won't bother. -wxPluginFrame* MyApp::OnNewInstance(const wxPluginData& data) -{ - // Implicitly added to list of plugin frames - return new MyFrame(data); -} - -// My frame constructor -MyFrame::MyFrame(const wxPluginData& data): - wxPluginFrame(data) -{ - m_xpos = -1; - m_ypos = -1; -} - -void MyFrame::OnPaint(wxPaintEvent& event) -{ - wxPaintDC dc(this); - - OnDraw(dc); -} - -void MyFrame::OnDraw(wxDC& dc) -{ - dc.SetBrush(*wxCYAN_BRUSH); - dc.SetPen(*wxRED_PEN); - - int w, h; - GetClientSize(&w, &h); - - dc.DrawRectangle(0, 0, w, h); - - wxFont swissFont(10, wxSWISS, wxNORMAL, wxNORMAL); - dc.SetFont(swissFont); - dc.SetBackgroundMode(wxTRANSPARENT); - - CentreStrings(dc); -} - -// Called when the file has been downloaded -void MyFrame::OnNPNewFile(NPStream *stream, const wxString& fname) -{ - ifstream str(fname); - char buf[201]; - - while ( !str.eof() ) - { - buf[0] = 0; - str.getline(buf, 200); - - if ( buf[0] != 0 ) - m_strings.Add(buf); - } - Refresh(); -} - -void MyFrame::CentreStrings(wxDC& dc) -{ - int y = 5; - int cw, ch; - GetClientSize(&cw, &ch); - - wxNode *node = m_strings.First(); - while ( node ) - { - char *s = (char *)node->Data(); - long w, h; - dc.GetTextExtent(s, &w, &h); - - int x = wxMax(0, (cw - w)/2); - dc.DrawText(s, x, y); - - y += h + (h/2); - - node = node->Next(); - } -} - -// This implements a tiny doodling program. Drag the mouse using -// the left button. -void MyFrame::OnMouseEvent(wxMouseEvent& event) -{ - long x, y; - event.Position(&x, &y); - wxClientDC dc(this); - - if (m_xpos > -1 && m_ypos > -1 && event.Dragging() && event.LeftIsDown()) - { - dc.SetPen(wxBLACK_PEN); - dc.SetBrush(wxTRANSPARENT_BRUSH); - dc.DrawLine(m_xpos, m_ypos, x, y); - } - m_xpos = x; - m_ypos = y; -} - diff --git a/utils/nplugin/src/makefile.nt b/utils/nplugin/src/makefile.nt deleted file mode 100644 index b3e4491221..0000000000 --- a/utils/nplugin/src/makefile.nt +++ /dev/null @@ -1,78 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds controls example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -# Application is a DLL -DLL=1 - -!include $(WXDIR)\src\ntwxwin.mak - -PLUGINDIR = $(WXDIR)\utils\nplugin -THISDIR = $(PLUGINDIR)\src -LIBTARGET=$(PLUGINDIR)\lib\nplugin.lib - -OBJECTS = npwin.obj npshell.obj NPFrame.obj NPApp.obj - -all: $(LIBTARGET) - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(LIBTARGET): $(OBJECTS) - -erase $(LIBTARGET) - $(implib) @<< --out:$(LIBTARGET) --machine:$(CPU) -$(OBJECTS) -<< - -npwin.obj: npwin.cpp npapi.h npupp.h - $(cc) @<< -$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF) -<< - -npshell.obj: npshell.cpp npapi.h NPApp.h NPFrame.h - $(cc) @<< -$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF) -<< - -NPFrame.obj: NPFrame.cpp NPFrame.h NPApp.h npapi.h - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -NPApp.obj: NPApp.cpp NPApp.h NPFrame.h npapi.h - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb - -erase *.dll - -erase *.exp - -erase *.ilk - -erase $(LIBTARGET) diff --git a/utils/nplugin/src/npapi.h b/utils/nplugin/src/npapi.h deleted file mode 100644 index bbb631c3d4..0000000000 --- a/utils/nplugin/src/npapi.h +++ /dev/null @@ -1,258 +0,0 @@ -/* - * npapi.h $Revision$ - * Netscape client plug-in API spec - */ - -#ifndef _NPAPI_H_ -#define _NPAPI_H_ - - -/* XXX this needs to get out of here */ -#if defined(__MWERKS__) -#ifndef XP_MAC -#define XP_MAC -#endif -#endif - - -/* - * Version constants - */ - -#define NP_VERSION_MAJOR 0 -#define NP_VERSION_MINOR 6 - - - -/* - * Basic types - */ - -#ifndef _UINT16 -typedef unsigned short uint16; -#endif -#ifndef _UINT32 -typedef unsigned long uint32; -#endif -#ifndef _INT16 -typedef short int16; -#endif -#ifndef _INT32 -typedef long int32; -#endif - -#ifndef FALSE -#define FALSE (0) -#endif -#ifndef TRUE -#define TRUE (1) -#endif -#ifndef NULL -#define NULL (0L) -#endif - -typedef unsigned char NPBool; -typedef void* NPEvent; -typedef int16 NPError; -typedef char* NPMIMEType; - - -/* - * NPP is a plug-in's opaque instance handle - */ -typedef struct _NPP -{ - void* pdata; /* plug-in private data */ - void* ndata; /* netscape private data */ -} NPP_t; - -typedef NPP_t* NPP; - - - -typedef struct _NPStream -{ - void* pdata; /* plug-in private data */ - void* ndata; /* netscape private data */ - const char* url; - uint32 end; - uint32 lastmodified; -} NPStream; - -typedef struct _NPByteRange -{ - int32 offset; /* negative offset means from the end */ - uint32 length; - struct _NPByteRange* next; -} NPByteRange; - - -typedef struct _NPSavedData -{ - int32 len; - void* buf; -} NPSavedData; - - - -typedef struct _NPRect -{ - uint16 top; - uint16 left; - uint16 bottom; - uint16 right; -} NPRect; - -typedef struct _NPWindow -{ - void* window; /* platform specific window handle */ - uint32 x; /* position of top left corner relative to a netscape page */ - uint32 y; - uint32 width; /* maximum window size */ - uint32 height; - NPRect clipRect; /* clipping rectangle in port coordinates */ -} NPWindow; - - - -typedef struct _NPFullPrint -{ - NPBool pluginPrinted; /* Set TRUE if plugin handled fullscreen printing */ - NPBool printOne; /* TRUE if plugin should print one copy to default printer */ - void* platformPrint; /* Platform-specific printing info */ -} NPFullPrint; - -typedef struct _NPEmbedPrint -{ - NPWindow window; - void* platformPrint; /* Platform-specific printing info */ -} NPEmbedPrint; - -typedef struct _NPPrint -{ - uint16 mode; /* NP_FULL or NP_EMBED */ - union - { - NPFullPrint fullPrint; /* if mode is NP_FULL */ - NPEmbedPrint embedPrint; /* if mode is NP_EMBED */ - } print; -} NPPrint; - - - - -#ifdef XP_MAC - -/* - * Mac-specific structures and definitions. - */ - -#include -#include - -typedef struct NP_Port -{ - CGrafPtr port; /* Grafport */ - int32 portx; /* position inside the topmost window */ - int32 porty; -} NP_Port; - -/* - * Non-standard event types that can be passed to HandleEvent - */ -#define getFocusEvent (osEvt + 16) -#define loseFocusEvent (osEvt + 17) -#define adjustCursorEvent (osEvt + 18) - -#endif /* XP_MAC */ - - - - -#define NP_EMBED 1 -#define NP_FULL 2 -#define NP_BACKGROUND 3 - -#define NP_NORMAL 1 -#define NP_SEEK 2 -#define NP_ASFILE 3 - -#define NP_MAXREADY (((unsigned)(~0)<<1)>>1) - - -/* - * Error and reason code definitions. - */ - -#define NP_NOERR 0 -#define NP_EINVAL 1 -#define NP_EABORT 2 - -#define NPERR_BASE 0 -#define NPERR_NO_ERROR (NPERR_BASE + 0) -#define NPERR_GENERIC_ERROR (NPERR_BASE + 1) -#define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2) -#define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3) -#define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4) -#define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5) -#define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6) -#define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7) -#define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8) - -#define NPRES_BASE 0 -#define NPRES_NETWORK_ERR (NPRES_BASE + 0) -#define NPRES_USER_BREAK (NPRES_BASE + 1) -#define NPRES_DONE (NPRES_BASE + 3) - - - -/* - * Function prototypes. - * Functions beginning with 'NPP' are functions provided by the plugin that Netscape will call. - * Functions beginning with 'NPN' are functions provided by Netscape that the plugin will call. - */ - -#if defined(_WINDOWS) && !defined(__WIN32__) -#define NP_LOADDS _loadds -#else -#define NP_LOADDS -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -NPError NPP_Initialize(void); -void NPP_Shutdown(void); -NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); -NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save); -NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window); -NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); -NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream, NPError reason); -int32 NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream); -int32 NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer); -void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname); -void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint); -int16 NPP_HandleEvent(NPP instance, void* event); - -void NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor); -NPError NPN_GetURL(NPP instance, const char* url, const char* window); -NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file); -NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList); -NPError NPN_NewStream(NPP instance, NPMIMEType type, NPStream* stream); -int32 NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer); -NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason); -void NPN_Status(NPP instance, const char* message); -const char* NPN_UserAgent(NPP instance); -void* NPN_MemAlloc(uint32 size); -void NPN_MemFree(void* ptr); -uint32 NPN_MemFlush(uint32 size); -void NPN_ReloadPlugins(NPBool reloadPages); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif - - -#endif /* _NPAPI_H_ */ - diff --git a/utils/nplugin/src/npapp.cpp b/utils/nplugin/src/npapp.cpp deleted file mode 100644 index b5aff25ab1..0000000000 --- a/utils/nplugin/src/npapp.cpp +++ /dev/null @@ -1,279 +0,0 @@ -/* - * File: NPApp.cc - * Purpose: wxPluginApp implementation - * Author: Julian Smart - * Created: 1997 - * Updated: - * Copyright: (c) Julian Smart - */ - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#include "NPApp.h" -#include "NPFrame.h" - -#include - -IMPLEMENT_ABSTRACT_CLASS(wxPluginApp, wxApp) - -wxPluginApp *wxGetPluginApp(void) -{ - if ( wxTheApp && wxTheApp->IsKindOf(CLASSINFO(wxPluginApp))) - return (wxPluginApp *)wxTheApp; - else - return NULL; -} - -wxPluginApp::wxPluginApp(void) -{ - m_data.m_argc = NULL; - m_data.m_argn = NULL; - m_data.m_argv = NULL; - m_data.m_type = 0; - m_data.m_instance = 0; - m_data.m_mode = 0; - m_data.m_window = 0; -} - -wxPluginApp::~wxPluginApp(void) -{ - if ( m_data.m_argn ) - delete[] m_data.m_argn; - if ( m_data.m_argv ) - delete[] m_data.m_argv; -} - -// Add a frame -void wxPluginApp::AddFrame(wxPluginFrame *frame) -{ - m_frames.Append(frame); -} - -// Remove a frame -void wxPluginApp::RemoveFrame(wxPluginFrame *frame) -{ - m_frames.DeleteObject(frame); -} - -// Find a frame given a NP instance -wxPluginFrame *wxPluginApp::FindFrame(NPP instance) -{ - wxNode *node = m_frames.First(); - while ( node ) - { - wxPluginFrame *frame = (wxPluginFrame *)node->Data(); - if ( frame->GetInstance() == instance ) - { - return frame; - } - node = node->Next(); - } - return NULL; -} - -void wxPluginApp::SetAttributeValues(const int n, char *argn[], char *argv[]) -{ - if ( m_data.m_argn ) - delete[] m_data.m_argn; - if ( m_data.m_argv ) - delete[] m_data.m_argv; - - m_data.m_argc = n; - - m_data.m_argn = new wxString[n]; - m_data.m_argv = new wxString[n]; - int i; - for ( i = 0; i < n ; i ++) - { - m_data.m_argn[i] = argn[i]; - m_data.m_argv[i] = argv[i]; - } -} - -/////////////////////////////////////////////////////////////// -// Netscape Plugin API calls routed via wxPluginApp - -NPError wxPluginApp::NPP_Destroy(NPP instance, NPSavedData** save) -{ - wxPluginFrame *frame = FindFrame(instance); - if ( frame ) - { - frame->OnClose(); - delete frame; - } - return NPERR_NO_ERROR; -} - -NPError wxPluginApp::NPP_DestroyStream(NPP instance, NPStream* stream, NPError reason) -{ - return NPERR_NO_ERROR; -} - -/* -jref wxPluginApp::NPP_GetJavaClass(void) -{ - return 0; -} -*/ - -// This can't work now because we don't have a global app until wxEntry is called. -// We'll put the wxEntry call in npshell.cpp instead. -NPError wxPluginApp::NPP_Initialize(void) -{ - static int init = FALSE; - - if ( init == TRUE ) - MessageBox(NULL, "wxPluginApp::NPP_Initialize:\nabout to call wxEntry for 2nd time!!!", "wxPlugin", MB_OK); - - wxEntry((WXHINSTANCE) GetModuleHandle(NULL)); - - init = TRUE; - -// MessageBox(NULL, "wxPluginApp::NPP_Initialize: have called wxEntry", "wxPlugin", MB_OK); - return NPERR_NO_ERROR; -} - -NPError wxPluginApp::NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, - int16 argc, char* argn[], char* argv[], NPSavedData* saved) -{ -// MessageBox(NULL, "wxPluginApp::NPP_New", "wxPlugin", MB_OK); - - // Save values so frame can be created in first NPP_SetWindow - if ( m_data.m_instance != 0 ) - { - MessageBox(NULL, "wxPluginApp::NPP_New: whoops, 2 NPP_New calls in succession without NPP_SetWindow.\n Need to modify my code!", "wxPlugin", MB_OK); - return NPERR_NO_ERROR; - } - - m_data.m_instance = instance; - m_data.m_type = pluginType; - m_data.m_mode = mode; - - SetAttributeValues(argc, argn, argv); - - // Unfortunately, we may get a stream event before we've got a valid window - // handle, so we just have to go ahead and create a new instance. - wxPluginFrame *frame = OnNewInstance(m_data); - - m_data.m_instance = NULL; - m_data.m_window = NULL; - delete[] m_data.m_argv; - delete[] m_data.m_argn; - m_data.m_argv = NULL; - m_data.m_argn = NULL; - - return NPERR_NO_ERROR; -} - -NPError wxPluginApp::NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream, - NPBool seekable, uint16* stype) -{ - // By default, we want to receive a file instead of a stream. - wxPluginFrame *frame = FindFrame(instance); - if ( frame ) - { - return frame->OnNPNewStream(type, stream, seekable, stype); - } - return NPERR_NO_ERROR; -} - -void wxPluginApp::NPP_Print(NPP instance, NPPrint* printInfo) -{ - if (instance == NULL) - return; - - wxPluginFrame *frame = FindFrame(instance); - if ( frame ) - { - frame->OnNPPrint(printInfo); - } -} - -NPError wxPluginApp::NPP_SetWindow(NPP instance, NPWindow* window) -{ -// MessageBox(NULL, "wxPluginApp::NPP_SetWindow", "wxPlugin", MB_OK); - - if ( window ) - wxDebugMsg("%d\n", (int) window->window); - - wxPluginFrame *frame = FindFrame(instance); - if ( frame ) - { - frame->SetNPWindow(window); - } - else - { -#if 0 - // No such frame: must make it. - if ( m_data.m_instance == NULL ) - { - MessageBox(NULL, "wxPluginApp::NPP_SetWindow: whoops, no data to create window. SetWindow called in funny order?", "wxPlugin", MB_OK); - return NPERR_NO_ERROR; - } - - if ( window->window == NULL ) - { - // We're receiving a NULL window before we've even received - // a valid window. Ignore this silly thing. - return NPERR_NO_ERROR; - } - - m_data.m_window = window; - m_data.m_instance = instance; - -// wxPluginFrame *frame = OnNewInstance(m_data); - - m_data.m_instance = NULL; - m_data.m_window = NULL; - delete[] m_data.m_argv; - delete[] m_data.m_argn; - m_data.m_argv = NULL; - m_data.m_argn = NULL; -#endif - } - return NPERR_NO_ERROR; -} - -void wxPluginApp::NPP_Shutdown(void) -{ - // Clean up wxWindows - CleanUp(); -} - -void wxPluginApp::NPP_StreamAsFile(NPP instance, NPStream* stream, const char *fname) -{ - wxPluginFrame *frame = FindFrame(instance); - if ( frame ) - { - wxString str(fname); - frame->OnNPNewFile(stream, str); - } -} - -/* -void wxPluginApp::NPP_URLNotify(NPP instance, const char* url, NPReason reason, - void* notifyData) -{ -} -*/ - -int32 wxPluginApp::NPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len, - void* buf) -{ - return len; // The number of bytes accepted -} - -static int32 STREAMBUFSIZE = 0X0FFFFFFF; // If we are reading from a file in NPAsFile - // mode so we can take any size stream in our - // write call (since we ignore it) - -int32 wxPluginApp::NPP_WriteReady(NPP instance, NPStream* stream) -{ - return STREAMBUFSIZE; // Number of bytes ready to accept in NPP_Write() -} - diff --git a/utils/nplugin/src/npapp.h b/utils/nplugin/src/npapp.h deleted file mode 100644 index 238a612313..0000000000 --- a/utils/nplugin/src/npapp.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * File: NPApp.h - * Purpose: wxPluginApp declaration - * Author: Julian Smart - * Created: 1997 - * Updated: - * Copyright: (c) Julian Smart - */ - -#ifndef __PLUGINAPP__ -#define __PLUGINAPP__ - -#include "wx/wx.h" -#include "npapi.h" - -class wxPluginFrame; - -// Data passed to OnNewInstance -class wxPluginData -{ -public: - NPP m_instance; - NPMIMEType m_type; - NPWindow* m_window; - int m_mode; - int m_argc; - wxString* m_argn; - wxString* m_argv; -}; - -class WXDLLEXPORT wxPluginApp: public wxApp -{ - DECLARE_ABSTRACT_CLASS(wxPluginApp) - -public: - wxPluginApp(void); - ~wxPluginApp(void); - - // Find a frame given a NP instance - wxPluginFrame *FindFrame(NPP instance); - - // Add a frame - void AddFrame(wxPluginFrame *frame); - - // Remove a frame - void RemoveFrame(wxPluginFrame *frame); - - // Set attribute/values for the last instance - void SetAttributeValues(const int n, char *argn[], char *argv[]); - - /////////////////////////////////////////////////////////////// - // Higher-level API than NP API - virtual wxPluginFrame *OnNewInstance(const wxPluginData& data) = 0; - - /////////////////////////////////////////////////////////////// - // Netscape Plugin API calls routed via wxPluginApp - - virtual NPError NPP_Destroy(NPP instance, NPSavedData** save); - virtual NPError NPP_DestroyStream(NPP instance, NPStream* stream, NPError reason); -// virtual jref NPP_GetJavaClass(void); - virtual NPError NPP_Initialize(void); - virtual NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, - int16 argc, char* argn[], char* argv[], NPSavedData* saved); - virtual NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream, - NPBool seekable, uint16* stype); - virtual void NPP_Print(NPP instance, NPPrint* platformPrint); - virtual NPError NPP_SetWindow(NPP instance, NPWindow* window); - virtual void NPP_Shutdown(void); - virtual void NPP_StreamAsFile(NPP instance, NPStream* stream, const char *fname); -/* - virtual void NPP_URLNotify(NPP instance, const char* url, NPReason reason, - void* notifyData); -*/ - virtual int32 NPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len, - void* buf); - virtual int32 NPP_WriteReady(NPP instance, NPStream* stream); - -protected: - - // List of plugin frames - wxList m_frames; - - // Temporary NPP_New arguments so we can wait until NPP_SetWindow is called - // before creating a frame - wxPluginData m_data; -}; - -wxPluginApp *wxGetPluginApp(void); - -#endif - diff --git a/utils/nplugin/src/npframe.cpp b/utils/nplugin/src/npframe.cpp deleted file mode 100644 index e3e3f63661..0000000000 --- a/utils/nplugin/src/npframe.cpp +++ /dev/null @@ -1,293 +0,0 @@ -/* - * File: NPFrame.cc - * Purpose: wxPluginFrame implementation - * Author: Julian Smart - * Created: 1997 - * Updated: - * Copyright: (c) Julian Smart - */ - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/frame.h" -#endif - -#include "wx/dcprint.h" - -#include "NPFrame.h" -#include "NPApp.h" - -#include - -extern wxList wxModelessWindows; -extern char wxFrameClassName[]; - -IMPLEMENT_DYNAMIC_CLASS(wxPluginFrame, wxFrame) - -wxPluginFrame::wxPluginFrame(void) -{ - m_npWindow = NULL; - m_npInstance = NULL; - m_nAttributes = 0; - m_names = NULL; - m_values = NULL; -} - -bool wxPluginFrame::Create(const wxPluginData& data) -{ - SetName("pluginFrame"); - - m_npWindow = NULL; - m_npInstance = NULL; - m_nAttributes = 0; - m_names = NULL; - m_values = NULL; - m_npWindow = data.m_window; - m_npInstance = data.m_instance; - - SetAttributeValues(data.m_argc, data.m_argn, data.m_argv); - SetNPWindow(data.m_window); - - wxModelessWindows.Append(this); - - if (wxTheApp->IsKindOf(CLASSINFO(wxPluginApp))) - { - ((wxPluginApp *)wxTheApp)->AddFrame(this); - } - return TRUE; -} - -wxPluginFrame::~wxPluginFrame(void) -{ - if (wxTheApp->IsKindOf(CLASSINFO(wxPluginApp))) - { - ((wxPluginApp *)wxTheApp)->RemoveFrame(this); - } - - if ( GetHWND() ) - UnsubclassWin(); - m_hWnd = 0; - - if ( m_names ) - delete[] m_names; - if ( m_values ) - delete[] m_values; -} - -// Get size *available for subwindows* i.e. excluding menu bar etc. -// For XView, this is the same as GetSize -void wxPluginFrame::GetClientSize(int *x, int *y) const -{ - if ( !m_hWnd ) - { - *x = 0; *y = 0; - return; - } - wxFrame::GetClientSize(x, y); -} - -// Set the client size (i.e. leave the calculation of borders etc. -// to wxWindows) -void wxPluginFrame::SetClientSize(const int width, const int height) -{ - if ( !m_hWnd ) - return ; - - wxFrame::SetClientSize(width, height); -} - -void wxPluginFrame::GetSize(int *width, int *height) const -{ - if ( !m_hWnd ) - { - *width = 0; *height = 0; - return; - } - wxFrame::GetSize(width, height); -} - -void wxPluginFrame::GetPosition(int *x, int *y) const -{ - if ( !m_hWnd ) - { - *x = 0; *y = 0; - return; - } - wxFrame::GetPosition(x, y); -} - -void wxPluginFrame::SetAttributeValues(const int n, const char *argn[], const char *argv[]) -{ - if ( m_names ) - delete[] m_names; - if ( m_values ) - delete[] m_values; - - m_nAttributes = n; - - m_names = new wxString[n]; - m_values = new wxString[n]; - int i; - for ( i = 0; i < n ; i ++) - { - m_names[i] = argn[i]; - m_values[i] = argv[i]; - } -} - -void wxPluginFrame::SetAttributeValues(const int n, const wxString* argn, const wxString* argv) -{ - if ( m_names ) - delete[] m_names; - if ( m_values ) - delete[] m_values; - - m_nAttributes = n; - - m_names = new wxString[n]; - m_values = new wxString[n]; - int i; - for ( i = 0; i < n ; i ++) - { - m_names[i] = argn[i]; - m_values[i] = argv[i]; - } -} - -void wxPluginFrame::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags) -{ - // Can't allow app to set the size. - return; -} - -// Sets and subclasses the platform-specific window handle -bool wxPluginFrame::SetNPWindow(NPWindow *window) -{ - if ( !window || !window->window) - { - if ( m_hWnd ) - { - wxMessageBox("Unsubclassing window prematurely"); - UnsubclassWin(); - m_hWnd = 0; - } - m_npWindow = NULL; - } - else - { - if ( m_hWnd ) - { - if ( m_hWnd == (WXHWND) window->window ) - { - // Does this mean a resize? - return TRUE; - } - } - - m_npWindow = window; - m_hWnd = (WXHWND) window->window; - SubclassWin(m_hWnd); - m_windowId = ::GetWindowLong((HWND) m_hWnd, GWL_ID); - } - return TRUE; -} - -NPError wxPluginFrame::OnNPNewStream(NPMIMEType type, NPStream *stream, bool seekable, uint16* stype) -{ - *stype = NP_ASFILE; - return NPERR_NO_ERROR; -} - -void wxPluginFrame::OnNPNewFile(NPStream *stream, const wxString& fname) -{ -} - -void wxPluginFrame::OnNPPrint(NPPrint* printInfo) -{ - if (printInfo->mode == NP_FULL) - { - // - // *Developers*: If your plugin would like to take over - // printing completely when it is in full-screen mode, - // set printInfo->pluginPrinted to TRUE and print your - // plugin as you see fit. If your plugin wants Netscape - // to handle printing in this case, set printInfo->pluginPrinted - // to FALSE (the default) and do nothing. If you do want - // to handle printing yourself, printOne is true if the - // print button (as opposed to the print menu) was clicked. - // On the Macintosh, platformPrint is a THPrint; on Windows, - // platformPrint is a structure (defined in npapi.h) containing - // the printer name, port, etc. - // - void* platformPrint = printInfo->print.fullPrint.platformPrint; - NPBool printOne = printInfo->print.fullPrint.printOne; - - printInfo->print.fullPrint.pluginPrinted = FALSE; // Do the default - - } - else // If not fullscreen, we must be embedded - { - // - // *Developers*: If your plugin is embedded, or is full-screen - // but you returned false in pluginPrinted above, NPP_Print - // will be called with mode == NP_EMBED. The NPWindow - // in the printInfo gives the location and dimensions of - // the embedded plugin on the printed page. On the Macintosh, - // platformPrint is the printer port; on Windows, platformPrint - // is the handle to the printing device context. - // - NPWindow* printWindow = &(printInfo->print.embedPrint.window); - void* platformPrint = printInfo->print.embedPrint.platformPrint; - - HDC hDC = (HDC) platformPrint; - wxRectangle rect; - rect.x = printWindow->x; - rect.y = printWindow->y; - rect.width = printWindow->width; - rect.height = printWindow->height; - - int saveIt = ::SaveDC(hDC); - - wxPrinterDC *printerDC = new wxPrinterDC((WXHDC) hDC); - - OnPrint(*printerDC, rect); - - printerDC->SetHDC(0); - delete printerDC; - - ::RestoreDC(hDC, saveIt); - } - } - -void wxPluginFrame::OnPrint(wxPrinterDC& dc, wxRectangle& rect) -{ - // We must do some transformations here - RECT winRect; -/* - winRect.left = rect.x; - winRect.top = rect.y; - winRect.right = rect.x + rect.right; - winRect.bottom = rect.y + rect.height; -*/ - POINT winPoint[2]; - winPoint[0].x = rect.x; - winPoint[0].y = rect.y; - winPoint[1].x = rect.x + rect.width; - winPoint[1].y = rect.y + rect.height; - - if (!LPtoDP((HDC) dc.GetHDC(), winPoint, 2)) - wxMessageBox("LPtoDP failed."); - - OnDraw(dc); -} - -void wxPluginFrame::OnDraw(wxDC& dc) -{ -} - diff --git a/utils/nplugin/src/npframe.h b/utils/nplugin/src/npframe.h deleted file mode 100644 index 23a45da355..0000000000 --- a/utils/nplugin/src/npframe.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * File: NPFrame.h - * Purpose: wxPluginFrame declaration - * Author: Julian Smart - * Created: 1997 - * Updated: - * Copyright: (c) Julian Smart - */ - -#ifndef __PLUGINFRAME__ -#define __PLUGINFRAME__ - -#include "wx/frame.h" -#include "NPApp.h" -#include "npapi.h" - -WXDLLEXPORT extern const char *wxFrameNameStr; - -class wxPrinterDC; -class WXDLLEXPORT wxPluginFrame: public wxFrame -{ - DECLARE_DYNAMIC_CLASS(wxPluginFrame) - -public: - wxPluginFrame(void); - inline wxPluginFrame(const wxPluginData& data) - { - m_npWindow = NULL; - m_npInstance = NULL; - m_nAttributes = 0; - m_names = NULL; - m_values = NULL; - - Create(data); - } - - ~wxPluginFrame(void); - - bool Create(const wxPluginData& data); - - // Sets and subclasses the platform-specific window handle - virtual bool SetNPWindow(NPWindow *window); - inline NPWindow *GetNPWindow(void) { return m_npWindow; } - - void SetClientSize(const int width, const int height); - void GetClientSize(int *width, int *height) const; - - void GetSize(int *width, int *height) const ; - void GetPosition(int *x, int *y) const ; - void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO); - - // Accessors - inline int GetAttributeCount(void) const { return m_nAttributes; } - inline wxString GetAttributeName(const int n) { return m_names[n]; } - inline wxString GetAttributeValue(const int n) { return m_values[n]; } - - void SetAttributeValues(const int n, const char* argn[], const char *argv[]); - void SetAttributeValues(const int n, const wxString* argn, const wxString* argv); - inline void SetInstance(const NPP instance) { m_npInstance = instance; }; - inline NPP GetInstance(void) { return m_npInstance; } - - // Overridables: low-level - virtual NPError OnNPNewStream(NPMIMEType type, NPStream *stream, bool seekable, uint16* stype); - virtual void OnNPNewFile(NPStream *stream, const wxString& fname); - virtual void OnNPPrint(NPPrint* printInfo); - - // Overridables: high-level - virtual void OnPrint(wxPrinterDC& dc, wxRectangle& rect); - virtual void OnDraw(wxDC& dc); - -protected: - - wxString* m_names; - wxString* m_values; - int m_nAttributes; - NPP m_npInstance; - NPWindow* m_npWindow; -}; - -#endif - diff --git a/utils/nplugin/src/npshell.cpp b/utils/nplugin/src/npshell.cpp deleted file mode 100644 index 2fe8d3b4b6..0000000000 --- a/utils/nplugin/src/npshell.cpp +++ /dev/null @@ -1,282 +0,0 @@ -//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -// -// npshell.cpp -// -// This file defines a "shell" plugin that plugin developers can use -// as the basis for a real plugin. This shell just provides empty -// implementations of all functions that the plugin can implement -// that will be called by Netscape (the NPP_xxx methods defined in -// npapi.h). -// -//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -#ifndef _NPAPI_H_ -#include "npapi.h" -#endif - -#include -#include -#include - -#include "NPApp.h" - -// -// Instance state information about the plugin. -// -// *Developers*: Use this struct to hold per-instance -// information that you'll need in the -// various functions in this file. -// -typedef struct _PluginInstance -{ - NPWindow* fWindow; - uint16 fMode; - -} PluginInstance; - - - -//------------------------------------------------------------------------------------ -// NPP_Initialize: -//------------------------------------------------------------------------------------ -NPError NPP_Initialize(void) -{ -// MessageBox(NULL, "NPP_Initialize", "NPTest", MB_OK); -/* - wxPluginApp *app = wxGetPluginApp(); - if ( app ) - return app->NPP_Initialize(); - else - return NPERR_NO_ERROR; -*/ - wxEntry((WXHINSTANCE) GetModuleHandle(NULL)); - - return NPERR_NO_ERROR; -} - - -//------------------------------------------------------------------------------------ -// NPP_Shutdown: -//------------------------------------------------------------------------------------ -void NPP_Shutdown(void) -{ -// MessageBox(NULL, "NPP_Shutdown", "wxPlugin", MB_OK); - - wxPluginApp *app = wxGetPluginApp(); - if ( app ) - app->NPP_Shutdown(); -} - - -//------------------------------------------------------------------------------------ -// NPP_New: -//------------------------------------------------------------------------------------ -NPError NP_LOADDS -NPP_New(NPMIMEType pluginType, - NPP instance, - uint16 mode, - int16 argc, - char* argn[], - char* argv[], - NPSavedData* saved) -{ -// MessageBox(NULL, "NPP_New", "NPTest", MB_OK); - - if (instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - wxPluginApp *app = wxGetPluginApp(); - if ( app ) - return app->NPP_New(pluginType, instance, mode, argc, argn, argv, saved); - else - return NPERR_NO_ERROR; -} - -//------------------------------------------------------------------------------------ -// NPP_Destroy: -//------------------------------------------------------------------------------------ -NPError NP_LOADDS -NPP_Destroy(NPP instance, NPSavedData** save) -{ -// MessageBox(NULL, "NPP_Destroy", "NPTest", MB_OK); - - if (instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - wxPluginApp *app = wxGetPluginApp(); - if ( app ) - return app->NPP_Destroy(instance, save); - else - return NPERR_NO_ERROR; -} - - -//------------------------------------------------------------------------------------ -// NPP_SetWindow: -//------------------------------------------------------------------------------------ -NPError NP_LOADDS -NPP_SetWindow(NPP instance, NPWindow* window) -{ -// MessageBox(NULL, "NPP_SetWindow", "NPTest", MB_OK); - - if (instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - wxPluginApp *app = wxGetPluginApp(); - if ( app ) - return app->NPP_SetWindow(instance, window); - else - return NPERR_NO_ERROR; -} - - -//------------------------------------------------------------------------------------ -// NPP_NewStream: -//------------------------------------------------------------------------------------ -NPError NP_LOADDS -NPP_NewStream(NPP instance, - NPMIMEType type, - NPStream *stream, - NPBool seekable, - uint16 *stype) -{ -// MessageBox(NULL, "NPP_NewStream", "NPTest", MB_OK); - - if (instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - wxPluginApp *app = wxGetPluginApp(); - if ( app ) - return app->NPP_NewStream(instance, type, stream, seekable, stype); - else - return NPERR_NO_ERROR; -} - - - -// -// *Developers*: -// These next 2 functions are directly relevant in a plug-in which handles the -// data in a streaming manner. If you want zero bytes because no buffer space -// is YET available, return 0. As long as the stream has not been written -// to the plugin, Navigator will continue trying to send bytes. If the plugin -// doesn't want them, just return some large number from NPP_WriteReady(), and -// ignore them in NPP_Write(). For a NP_ASFILE stream, they are still called -// but can safely be ignored using this strategy. -// - -static int32 STREAMBUFSIZE = 0X0FFFFFFF; // If we are reading from a file in NPAsFile - // mode so we can take any size stream in our - // write call (since we ignore it) - -//------------------------------------------------------------------------------------ -// NPP_WriteReady: -//------------------------------------------------------------------------------------ -int32 NP_LOADDS -NPP_WriteReady(NPP instance, NPStream *stream) -{ - wxPluginApp *app = wxGetPluginApp(); - if ( app ) - return app->NPP_WriteReady(instance, stream); - else - return STREAMBUFSIZE; - - return STREAMBUFSIZE; // Number of bytes ready to accept in NPP_Write() -} - - - -//------------------------------------------------------------------------------------ -// NPP_Write: -//------------------------------------------------------------------------------------ -int32 NP_LOADDS -NPP_Write(NPP instance, NPStream *stream, int32 offset, int32 len, void *buffer) -{ - wxPluginApp *app = wxGetPluginApp(); - if ( app ) - return app->NPP_Write(instance, stream, offset, len, buffer); - else - return len; // The number of bytes accepted -} - - - -//------------------------------------------------------------------------------------ -// NPP_DestroyStream: -//------------------------------------------------------------------------------------ -NPError NP_LOADDS -NPP_DestroyStream(NPP instance, NPStream *stream, NPError reason) -{ - if (instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - wxPluginApp *app = wxGetPluginApp(); - if ( app ) - return app->NPP_DestroyStream(instance, stream, reason); - else - return NPERR_NO_ERROR; -} - - -//------------------------------------------------------------------------------------ -// NPP_StreamAsFile: -//------------------------------------------------------------------------------------ -void NP_LOADDS -NPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname) -{ - wxPluginApp *app = wxGetPluginApp(); - if ( app ) - app->NPP_StreamAsFile(instance, stream, fname); -} - - - -//------------------------------------------------------------------------------------ -// NPP_Print: -//------------------------------------------------------------------------------------ -void NP_LOADDS -NPP_Print(NPP instance, NPPrint* printInfo) -{ - if (printInfo == NULL) // trap invalid parm - return; - if ( instance == NULL ) - return; - - wxPluginApp *app = wxGetPluginApp(); - if ( app ) - app->NPP_Print(instance, printInfo); -} - - -//------------------------------------------------------------------------------------ -// NPP_HandleEvent: -// Mac-only. -//------------------------------------------------------------------------------------ -int16 NPP_HandleEvent(NPP instance, void* event) -{ - NPBool eventHandled = FALSE; - if (instance == NULL) - return eventHandled; - - PluginInstance* This = (PluginInstance*) instance->pdata; - - // - // *Developers*: The "event" passed in is a Macintosh - // EventRecord*. The event.what field can be any of the - // normal Mac event types, or one of the following additional - // types defined in npapi.h: getFocusEvent, loseFocusEvent, - // adjustCursorEvent. The focus events inform your plugin - // that it will become, or is no longer, the recepient of - // key events. If your plugin doesn't want to receive key - // events, return false when passed at getFocusEvent. The - // adjustCursorEvent is passed repeatedly when the mouse is - // over your plugin; if your plugin doesn't want to set the - // cursor, return false. Handle the standard Mac events as - // normal. The return value for all standard events is currently - // ignored except for the key event: for key events, only return - // true if your plugin has handled that particular key event. - // - - return eventHandled; -} - diff --git a/utils/nplugin/src/npupp.h b/utils/nplugin/src/npupp.h deleted file mode 100644 index 1c352d2245..0000000000 --- a/utils/nplugin/src/npupp.h +++ /dev/null @@ -1,799 +0,0 @@ -/* - * npupp.h $Revision$ - * function call mecahnics needed by platform specific glue code. - */ - - -#ifndef _NPUPP_H_ -#define _NPUPP_H_ - -#ifndef GENERATINGCFM -#define GENERATINGCFM 0 -#endif - -#ifndef _NPAPI_H_ -#include "npapi.h" -#endif - -/****************************************************************************************** - plug-in function table macros - for each function in and out of the plugin API we define - typedef NPP_FooUPP - #define NewNPP_FooProc - #define CallNPP_FooProc - for mac, define the UPP magic for PPC/68K calling - *******************************************************************************************/ - - -/* NPP_Initialize */ - -#if GENERATINGCFM -typedef UniversalProcPtr NPP_InitializeUPP; - -enum { - uppNPP_InitializeProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0)) - | RESULT_SIZE(SIZE_CODE(0)) -}; - -#define NewNPP_InitializeProc(FUNC) \ - (NPP_InitializeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_InitializeProcInfo, GetCurrentArchitecture()) -#define CallNPP_InitializeProc(FUNC) \ - (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_InitializeProcInfo) - -#else - -typedef void (*NPP_InitializeUPP)(void); -#define NewNPP_InitializeProc(FUNC) \ - ((NPP_InitializeUPP) (FUNC)) -#define CallNPP_InitializeProc(FUNC) \ - (*(FUNC))() - -#endif - - -/* NPP_Shutdown */ - -#if GENERATINGCFM -typedef UniversalProcPtr NPP_ShutdownUPP; - -enum { - uppNPP_ShutdownProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0)) - | RESULT_SIZE(SIZE_CODE(0)) -}; - -#define NewNPP_ShutdownProc(FUNC) \ - (NPP_ShutdownUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_ShutdownProcInfo, GetCurrentArchitecture()) -#define CallNPP_ShutdownProc(FUNC) \ - (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_ShutdownProcInfo) - -#else - -typedef void (*NPP_ShutdownUPP)(void); -#define NewNPP_ShutdownProc(FUNC) \ - ((NPP_ShutdownUPP) (FUNC)) -#define CallNPP_ShutdownProc(FUNC) \ - (*(FUNC))() - -#endif - - -/* NPP_New */ - -#if GENERATINGCFM -typedef UniversalProcPtr NPP_NewUPP; - -enum { - uppNPP_NewProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPMIMEType))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(uint16))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int16))) - | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(char **))) - | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(char **))) - | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(NPSavedData *))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) -}; - -#define NewNPP_NewProc(FUNC) \ - (NPP_NewUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewProcInfo, GetCurrentArchitecture()) -#define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewProcInfo, \ - (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) -#else - -typedef NPError (*NPP_NewUPP)(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); -#define NewNPP_NewProc(FUNC) \ - ((NPP_NewUPP) (FUNC)) -#define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) - -#endif - - -/* NPP_Destroy */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPP_DestroyUPP; -enum { - uppNPP_DestroyProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPSavedData **))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) -}; -#define NewNPP_DestroyProc(FUNC) \ - (NPP_DestroyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyProcInfo, GetCurrentArchitecture()) -#define CallNPP_DestroyProc(FUNC, ARG1, ARG2) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyProcInfo, (ARG1), (ARG2)) -#else - -typedef NPError (*NPP_DestroyUPP)(NPP instance, NPSavedData** save); -#define NewNPP_DestroyProc(FUNC) \ - ((NPP_DestroyUPP) (FUNC)) -#define CallNPP_DestroyProc(FUNC, ARG1, ARG2) \ - (*(FUNC))((ARG1), (ARG2)) - -#endif - - -/* NPP_SetWindow */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPP_SetWindowUPP; -enum { - uppNPP_SetWindowProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPWindow *))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) -}; -#define NewNPP_SetWindowProc(FUNC) \ - (NPP_SetWindowUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_SetWindowProcInfo, GetCurrentArchitecture()) -#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_SetWindowProcInfo, (ARG1), (ARG2)) - -#else - -typedef NPError (*NPP_SetWindowUPP)(NPP instance, NPWindow* window); -#define NewNPP_SetWindowProc(FUNC) \ - ((NPP_SetWindowUPP) (FUNC)) -#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2) \ - (*(FUNC))((ARG1), (ARG2)) - -#endif - - -/* NPP_NewStream */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPP_NewStreamUPP; -enum { - uppNPP_NewStreamProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPStream *))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPBool))) - | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint16 *))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) -}; -#define NewNPP_NewStreamProc(FUNC) \ - (NPP_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewStreamProcInfo, GetCurrentArchitecture()) -#define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewStreamProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) -#else - -typedef NPError (*NPP_NewStreamUPP)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); -#define NewNPP_NewStreamProc(FUNC) \ - ((NPP_NewStreamUPP) (FUNC)) -#define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) -#endif - - -/* NPP_DestroyStream */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPP_DestroyStreamUPP; -enum { - uppNPP_DestroyStreamProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPError))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) -}; -#define NewNPP_DestroyStreamProc(FUNC) \ - (NPP_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, GetCurrentArchitecture()) -#define CallNPP_DestroyStreamProc(FUNC, NPParg, NPStreamPtr, NPErrorArg) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, (NPParg), (NPStreamPtr), (NPErrorArg)) - -#else - -typedef NPError (*NPP_DestroyStreamUPP)(NPP instance, NPStream* stream, NPError reason); -#define NewNPP_DestroyStreamProc(FUNC) \ - ((NPP_DestroyStreamUPP) (FUNC)) -#define CallNPP_DestroyStreamProc(FUNC, NPParg, NPStreamPtr, NPErrorArg) \ - (*(FUNC))((NPParg), (NPStreamPtr), (NPErrorArg)) - -#endif - - -/* NPP_WriteReady */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPP_WriteReadyUPP; -enum { - uppNPP_WriteReadyProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) - | RESULT_SIZE(SIZE_CODE(sizeof(int32))) -}; -#define NewNPP_WriteReadyProc(FUNC) \ - (NPP_WriteReadyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, GetCurrentArchitecture()) -#define CallNPP_WriteReadyProc(FUNC, NPParg, NPStreamPtr) \ - (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, (NPParg), (NPStreamPtr)) - -#else - -typedef int32 (*NPP_WriteReadyUPP)(NPP instance, NPStream* stream); -#define NewNPP_WriteReadyProc(FUNC) \ - ((NPP_WriteReadyUPP) (FUNC)) -#define CallNPP_WriteReadyProc(FUNC, NPParg, NPStreamPtr) \ - (*(FUNC))((NPParg), (NPStreamPtr)) - -#endif - - -/* NPP_Write */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPP_WriteUPP; -enum { - uppNPP_WriteProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int32))) - | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(void*))) - | RESULT_SIZE(SIZE_CODE(sizeof(int32))) -}; -#define NewNPP_WriteProc(FUNC) \ - (NPP_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteProcInfo, GetCurrentArchitecture()) -#define CallNPP_WriteProc(FUNC, NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr) \ - (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteProcInfo, (NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr)) - -#else - -typedef int32 (*NPP_WriteUPP)(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer); -#define NewNPP_WriteProc(FUNC) \ - ((NPP_WriteUPP) (FUNC)) -#define CallNPP_WriteProc(FUNC, NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr) \ - (*(FUNC))((NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr)) - -#endif - - -/* NPP_StreamAsFile */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPP_StreamAsFileUPP; -enum { - uppNPP_StreamAsFileProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char *))) - | RESULT_SIZE(SIZE_CODE(0)) -}; -#define NewNPP_StreamAsFileProc(FUNC) \ - (NPP_StreamAsFileUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, GetCurrentArchitecture()) -#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3) \ - (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, (ARG1), (ARG2), (ARG3)) - -#else - -typedef void (*NPP_StreamAsFileUPP)(NPP instance, NPStream* stream, const char* fname); -#define NewNPP_StreamAsFileProc(FUNC) \ - ((NPP_StreamAsFileUPP) (FUNC)) -#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3) \ - (*(FUNC))((ARG1), (ARG2), (ARG3)) -#endif - - -/* NPP_Print */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPP_PrintUPP; -enum { - uppNPP_PrintProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPrint *))) - | RESULT_SIZE(SIZE_CODE(0)) -}; -#define NewNPP_PrintProc(FUNC) \ - (NPP_PrintUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_PrintProcInfo, GetCurrentArchitecture()) -#define CallNPP_PrintProc(FUNC, NPParg, voidPtr) \ - (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_PrintProcInfo, (NPParg), (voidPtr)) - -#else - -typedef void (*NPP_PrintUPP)(NPP instance, NPPrint* platformPrint); -#define NewNPP_PrintProc(FUNC) \ - ((NPP_PrintUPP) (FUNC)) -#define CallNPP_PrintProc(FUNC, NPParg, NPPrintArg) \ - (*(FUNC))((NPParg), (NPPrintArg)) - -#endif - - -/* NPP_HandleEvent */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPP_HandleEventUPP; -enum { - uppNPP_HandleEventProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *))) - | RESULT_SIZE(SIZE_CODE(sizeof(int16))) -}; -#define NewNPP_HandleEventProc(FUNC) \ - (NPP_HandleEventUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_HandleEventProcInfo, GetCurrentArchitecture()) -#define CallNPP_HandleEventProc(FUNC, NPParg, voidPtr) \ - (int16)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_HandleEventProcInfo, (NPParg), (voidPtr)) - -#else - -typedef int16 (*NPP_HandleEventUPP)(NPP instance, void* event); -#define NewNPP_HandleEventProc(FUNC) \ - ((NPP_HandleEventUPP) (FUNC)) -#define CallNPP_HandleEventProc(FUNC, NPParg, voidPtr) \ - (*(FUNC))((NPParg), (voidPtr)) - -#endif - - - - -/* - * Netscape entry points - */ - - -/* NPN_GetUrl */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPN_GetURLUPP; -enum { - uppNPN_GetURLProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) -}; -#define NewNPN_GetURLProc(FUNC) \ - (NPN_GetURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetURLProcInfo, GetCurrentArchitecture()) -#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetURLProcInfo, (ARG1), (ARG2), (ARG3)) -#else - -typedef NPError (*NPN_GetURLUPP)(NPP instance, const char* url, const char* window); -#define NewNPN_GetURLProc(FUNC) \ - ((NPN_GetURLUPP) (FUNC)) -#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \ - (*(FUNC))((ARG1), (ARG2), (ARG3)) -#endif - - -/* NPN_PostUrl */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPN_PostURLUPP; -enum { - uppNPN_PostURLProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(uint32))) - | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(const char*))) - | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPBool))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) -}; -#define NewNPN_PostURLProc(FUNC) \ - (NPN_PostURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PostURLProcInfo, GetCurrentArchitecture()) -#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PostURLProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) -#else - -typedef NPError (*NPN_PostURLUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file); -#define NewNPN_PostURLProc(FUNC) \ - ((NPN_PostURLUPP) (FUNC)) -#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) -#endif - - -/* NPN_RequestRead */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPN_RequestReadUPP; -enum { - uppNPN_RequestReadProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPStream *))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPByteRange *))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) -}; -#define NewNPN_RequestReadProc(FUNC) \ - (NPN_RequestReadUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_RequestReadProcInfo, GetCurrentArchitecture()) -#define CallNPN_RequestReadProc(FUNC, stream, range) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_RequestReadProcInfo, (stream), (range)) - -#else - -typedef NPError (*NPN_RequestReadUPP)(NPStream* stream, NPByteRange* rangeList); -#define NewNPN_RequestReadProc(FUNC) \ - ((NPN_RequestReadUPP) (FUNC)) -#define CallNPN_RequestReadProc(FUNC, stream, range) \ - (*(FUNC))((stream), (range)) - -#endif - - -/* NPN_NewStream */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPN_NewStreamUPP; -enum { - uppNPN_NewStreamProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP ))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPStream *))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPBool))) - | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint16*))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) -}; -#define NewNPN_NewStreamProc(FUNC) \ - (NPN_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_NewStreamProcInfo, GetCurrentArchitecture()) -#define CallNPN_NewStreamProc(FUNC, npp, type, stream) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_NewStreamProcInfo, (npp), (type), (stream)) - -#else - -typedef NPError (*NPN_NewStreamUPP)(NPP instance, NPMIMEType type, NPStream* stream); -#define NewNPN_NewStreamProc(FUNC) \ - ((NPN_NewStreamUPP) (FUNC)) -#define CallNPN_NewStreamProc(FUNC, npp, type, stream) \ - (*(FUNC))((npp), (type), (stream)) - -#endif - - -/* NPN_Write */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPN_WriteUPP; -enum { - uppNPN_WriteProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP ))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32))) - | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*))) - | RESULT_SIZE(SIZE_CODE(sizeof(int32))) -}; -#define NewNPN_WriteProc(FUNC) \ - (NPN_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_WriteProcInfo, GetCurrentArchitecture()) -#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \ - (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_WriteProcInfo, (npp), (stream), (len), (buffer)) - -#else - -typedef int32 (*NPN_WriteUPP)(NPP instance, NPStream* stream, int32 len, void* buffer); -#define NewNPN_WriteProc(FUNC) \ - ((NPN_WriteUPP) (FUNC)) -#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \ - (*(FUNC))((npp), (stream), (len), (buffer)) - -#endif - - -/* NPN_DestroyStream */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPN_DestroyStreamUPP; -enum { - uppNPN_DestroyStreamProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP ))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPError))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) -}; -#define NewNPN_DestroyStreamProc(FUNC) \ - (NPN_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, GetCurrentArchitecture()) -#define CallNPN_DestroyStreamProc(FUNC, npp, stream, err) \ - (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, (npp), (stream), (err)) - -#else - -typedef NPError (*NPN_DestroyStreamUPP)(NPP instance, NPStream* stream, NPError reason); -#define NewNPN_DestroyStreamProc(FUNC) \ - ((NPN_DestroyStreamUPP) (FUNC)) -#define CallNPN_DestroyStreamProc(FUNC, npp, stream, err) \ - (*(FUNC))((npp), (stream), (err)) - -#endif - - -/* NPN_Status */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPN_StatusUPP; -enum { - uppNPN_StatusProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char *))) -}; - -#define NewNPN_StatusProc(FUNC) \ - (NPN_StatusUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_StatusProcInfo, GetCurrentArchitecture()) -#define CallNPN_StatusProc(FUNC, npp, msg) \ - (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_StatusProcInfo, (npp), (msg)) - -#else - -typedef void (*NPN_StatusUPP)(NPP instance, const char* message); -#define NewNPN_StatusProc(FUNC) \ - ((NPN_StatusUPP) (FUNC)) -#define CallNPN_StatusProc(FUNC, npp, msg) \ - (*(FUNC))((npp), (msg)) - -#endif - - -/* NPN_UserAgent */ -#if GENERATINGCFM - -typedef UniversalProcPtr NPN_UserAgentUPP; -enum { - uppNPN_UserAgentProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP))) - | RESULT_SIZE(SIZE_CODE(sizeof(const char *))) -}; - -#define NewNPN_UserAgentProc(FUNC) \ - (NPN_UserAgentUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_UserAgentProcInfo, GetCurrentArchitecture()) -#define CallNPN_UserAgentProc(FUNC, ARG1) \ - (const char*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_UserAgentProcInfo, (ARG1)) - -#else - -typedef const char* (*NPN_UserAgentUPP)(NPP instance); -#define NewNPN_UserAgentProc(FUNC) \ - ((NPN_UserAgentUPP) (FUNC)) -#define CallNPN_UserAgentProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -#endif - - -/* NPN_MemAlloc */ -#if GENERATINGCFM - -typedef UniversalProcPtr NPN_MemAllocUPP; -enum { - uppNPN_MemAllocProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32))) - | RESULT_SIZE(SIZE_CODE(sizeof(void *))) -}; - -#define NewNPN_MemAllocProc(FUNC) \ - (NPN_MemAllocUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemAllocProcInfo, GetCurrentArchitecture()) -#define CallNPN_MemAllocProc(FUNC, ARG1) \ - (void*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemAllocProcInfo, (ARG1)) - -#else - -typedef void* (*NPN_MemAllocUPP)(uint32 size); -#define NewNPN_MemAllocProc(FUNC) \ - ((NPN_MemAllocUPP) (FUNC)) -#define CallNPN_MemAllocProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -#endif - - -/* NPN__MemFree */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPN_MemFreeUPP; -enum { - uppNPN_MemFreeProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void *))) -}; - -#define NewNPN_MemFreeProc(FUNC) \ - (NPN_MemFreeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFreeProcInfo, GetCurrentArchitecture()) -#define CallNPN_MemFreeProc(FUNC, ARG1) \ - (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFreeProcInfo, (ARG1)) - -#else - -typedef void (*NPN_MemFreeUPP)(void* ptr); -#define NewNPN_MemFreeProc(FUNC) \ - ((NPN_MemFreeUPP) (FUNC)) -#define CallNPN_MemFreeProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -#endif - - -/* NPN_MemFlush */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPN_MemFlushUPP; -enum { - uppNPN_MemFlushProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32))) - | RESULT_SIZE(SIZE_CODE(sizeof(uint32))) -}; - -#define NewNPN_MemFlushProc(FUNC) \ - (NPN_MemFlushUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFlushProcInfo, GetCurrentArchitecture()) -#define CallNPN_MemFlushProc(FUNC, ARG1) \ - (uint32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFlushProcInfo, (ARG1)) - -#else - -typedef uint32 (*NPN_MemFlushUPP)(uint32 size); -#define NewNPN_MemFlushProc(FUNC) \ - ((NPN_MemFlushUPP) (FUNC)) -#define CallNPN_MemFlushProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -#endif - - - -/* NPN_ReloadPlugins */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPN_ReloadPluginsUPP; -enum { - uppNPN_ReloadPluginsProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPBool))) - | RESULT_SIZE(SIZE_CODE(0)) -}; - -#define NewNPN_ReloadPluginsProc(FUNC) \ - (NPN_ReloadPluginsUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, GetCurrentArchitecture()) -#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \ - (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, (ARG1)) - -#else - -typedef void (*NPN_ReloadPluginsUPP)(NPBool reloadPages); -#define NewNPN_ReloadPluginsProc(FUNC) \ - ((NPN_ReloadPluginsUPP) (FUNC)) -#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -#endif - - - - -/****************************************************************************************** - * The actual plugin function table definitions - *******************************************************************************************/ - -typedef struct _NPPluginFuncs { - uint16 size; - uint16 version; - NPP_NewUPP newp; - NPP_DestroyUPP destroy; - NPP_SetWindowUPP setwindow; - NPP_NewStreamUPP newstream; - NPP_DestroyStreamUPP destroystream; - NPP_StreamAsFileUPP asfile; - NPP_WriteReadyUPP writeready; - NPP_WriteUPP write; - NPP_PrintUPP print; - NPP_HandleEventUPP event; -} NPPluginFuncs; - -typedef struct _NPNetscapeFuncs { - uint16 size; - uint16 version; - NPN_GetURLUPP geturl; - NPN_PostURLUPP posturl; - NPN_RequestReadUPP requestread; - NPN_NewStreamUPP newstream; - NPN_WriteUPP write; - NPN_DestroyStreamUPP destroystream; - NPN_StatusUPP status; - NPN_UserAgentUPP uagent; - NPN_MemAllocUPP memalloc; - NPN_MemFreeUPP memfree; - NPN_MemFlushUPP memflush; - NPN_ReloadPluginsUPP reloadplugins; -} NPNetscapeFuncs; - - - -#ifdef XP_MAC -/****************************************************************************************** - * Mac platform-specific plugin glue stuff - *******************************************************************************************/ - -/* - * Main entry point of the plugin. - * This routine will be called when the plugin is loaded. The function - * tables are passed in and the plugin fills in the NPPluginFuncs table - * and NPPShutdownUPP for Netscape's use. - */ - -#if GENERATINGCFM - -typedef UniversalProcPtr NPP_MainEntryUPP; -enum { - uppNPP_MainEntryProcInfo = kThinkCStackBased - | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPNetscapeFuncs*))) - | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPluginFuncs*))) - | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPP_ShutdownUPP*))) - | RESULT_SIZE(SIZE_CODE(sizeof(NPError))) -}; -#define NewNPP_MainEntryProc(FUNC) \ - (NPP_MainEntryUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_MainEntryProcInfo, GetCurrentArchitecture()) -#define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \ - CallUniversalProc((UniversalProcPtr)(FUNC), (ProcInfoType)uppNPP_MainEntryProcInfo, (netscapeFunc), (pluginFunc), (shutdownUPP)) - -#else - -typedef NPError (*NPP_MainEntryUPP)(NPNetscapeFuncs*, NPPluginFuncs*, NPP_ShutdownUPP*); -#define NewNPP_MainEntryProc(FUNC) \ - ((NPP_MainEntryUPP) (FUNC)) -#define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \ - (*(FUNC))((netscapeFunc), (pluginFunc), (shutdownUPP)) - -#endif -#endif /* MAC */ - - -#ifdef _WINDOWS - -#ifdef __cplusplus -extern "C" { -#endif - -/* plugin meta member functions */ - -NPError WINAPI NP_GetEntryPoints(NPPluginFuncs* pFuncs); - -NPError WINAPI NP_Initialize(NPNetscapeFuncs* pFuncs); - -NPError WINAPI NP_Shutdown(); - -#ifdef __cplusplus -} -#endif - -#endif /* _WINDOWS */ - - -#endif /* _NPUPP_H_ */ - diff --git a/utils/nplugin/src/npwin.cpp b/utils/nplugin/src/npwin.cpp deleted file mode 100644 index f97ef498a7..0000000000 --- a/utils/nplugin/src/npwin.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/* npwin.cpp */ -#include "windows.h" - -#include "npapi.h" -#include "npupp.h" - -#ifdef __WIN32__ - #define NP_EXPORT -#else - #define NP_EXPORT _export -#endif - -static NPNetscapeFuncs* g_pNavigatorFuncs = NULL; - - -/* PLUGIN DLL entry points */ -/* These are the Windows specific DLL entry points, not the "normal" plugin - entry points. The "normal" ones are in NPSHELL.CPP -*/ - -/* fills in the func table used by Navigator to call entry points in - plugin DLL. Note that these entry points ensure that DS is loaded - by using the NP_LOADDS macro, when compiling for Win16 -*/ -NPError WINAPI NP_EXPORT NP_GetEntryPoints(NPPluginFuncs* pFuncs) -{ - /* trap a NULL ptr */ - if(pFuncs == NULL) - return NPERR_INVALID_FUNCTABLE_ERROR; - - /* if the plugin's function table is smaller than the plugin expects, - then they are incompatible, and should return an error */ - if(pFuncs->size < sizeof NPPluginFuncs) - return NPERR_INVALID_FUNCTABLE_ERROR; - - pFuncs->version = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR; - pFuncs->newp = NPP_New; - pFuncs->destroy = NPP_Destroy; - pFuncs->setwindow = NPP_SetWindow; - pFuncs->newstream = NPP_NewStream; - pFuncs->destroystream = NPP_DestroyStream; - pFuncs->asfile = NPP_StreamAsFile; - pFuncs->writeready = NPP_WriteReady; - pFuncs->write = NPP_Write; - pFuncs->print = NPP_Print; - pFuncs->event = NULL; /* reserved */ - - return NPERR_NO_ERROR; -} - -/* called immediately after the plugin DLL is loaded -*/ -NPError WINAPI NP_EXPORT NP_Initialize(NPNetscapeFuncs* pFuncs) -{ - /* trap a NULL ptr */ - if(pFuncs == NULL) - return NPERR_INVALID_FUNCTABLE_ERROR; - - g_pNavigatorFuncs = pFuncs; /* save it for future reference */ - - /* if the plugin's major ver level is lower than the Navigator's, - then they are incompatible, and should return an error */ - if(HIBYTE(pFuncs->version) > NP_VERSION_MAJOR) - return NPERR_INCOMPATIBLE_VERSION_ERROR; - - /* if the Navigator's function table is smaller than the plugin expects, - then they are incompatible, and should return an error */ - if(pFuncs->size < sizeof NPNetscapeFuncs) - return NPERR_INVALID_FUNCTABLE_ERROR; - - return NPP_Initialize(); -} - -/* called immediately before the plugin DLL is unloaded -*/ -NPError WINAPI NP_EXPORT NP_Shutdown() -{ - NPP_Shutdown(); - - g_pNavigatorFuncs = NULL; - - return NPERR_NO_ERROR; -} - - -/* NAVIGATOR Entry points */ - -/* These entry points expect to be called from within the plugin. The - noteworthy assumption is that DS has already been set to point to the - plugin's DLL data segment. Don't call these functions from outside - the plugin without ensuring DS is set to the DLLs data segment first, - typically using the NP_LOADDS macro -*/ - -/* returns the major/minor version numbers of the Plugin API for the plugin - and the Navigator -*/ -void NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor) -{ - *plugin_major = NP_VERSION_MAJOR; - *plugin_minor = NP_VERSION_MINOR; - *netscape_major = HIBYTE(g_pNavigatorFuncs->version); - *netscape_minor = LOBYTE(g_pNavigatorFuncs->version); -} - -/* causes the specified URL to be fetched and streamed in -*/ -NPError NPN_GetURL(NPP instance, const char *url, const char *window) -{ - return g_pNavigatorFuncs->geturl(instance, url, window); -} - -NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file) -{ - return g_pNavigatorFuncs->posturl(instance, url, window, len, buf, file); -} - -/* Requests that a number of bytes be provided on a stream. Typically - this would be used if a stream was in "pull" mode. An optional - position can be provided for streams which are seekable. -*/ -NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList) -{ - return g_pNavigatorFuncs->requestread(stream, rangeList); -} - -/* Creates a new stream of data from the plug-in to be interpreted - by Netscape in the current window. -*/ -NPError NPN_NewStream(NPP instance, NPMIMEType type, NPStream *stream) -{ - return g_pNavigatorFuncs->newstream(instance, type, stream); -} - -/* Provides len bytes of data. -*/ -int32 NPN_Write(NPP instance, NPStream *stream, - int32 len, void *buffer) -{ - return g_pNavigatorFuncs->write(instance, stream, len, buffer); -} - -/* Closes a stream object. -reason indicates why the stream was closed. -*/ -NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason) -{ - return g_pNavigatorFuncs->destroystream(instance, stream, reason); -} - -/* Provides a text status message in the Netscape client user interface -*/ -void NPN_Status(NPP instance, const char *message) -{ - g_pNavigatorFuncs->status(instance, message); -} - -/* returns the user agent string of Navigator, which contains version info -*/ -const char* NPN_UserAgent(NPP instance) -{ - return g_pNavigatorFuncs->uagent(instance); -} - -/* allocates memory from the Navigator's memory space. Necessary so that - saved instance data may be freed by Navigator when exiting. -*/ -void* NPN_MemAlloc(uint32 size) -{ - return g_pNavigatorFuncs->memalloc(size); -} - -/* reciprocal of MemAlloc() above -*/ -void NPN_MemFree(void* ptr) -{ - g_pNavigatorFuncs->memfree(ptr); -} - -/* private function to Netscape. do not use! -*/ -void NPN_ReloadPlugins(NPBool reloadPages) -{ - g_pNavigatorFuncs->reloadplugins(reloadPages); -} - diff --git a/utils/ogl/distrib/ogl.rsp b/utils/ogl/distrib/ogl.rsp deleted file mode 100644 index f7eaa1967c..0000000000 --- a/utils/ogl/distrib/ogl.rsp +++ /dev/null @@ -1,39 +0,0 @@ -src/*.cpp -src/*.c -src/*.h -src/*.rc -src/*.def -src/*.xbm -src/make*.* -src/*.txt -src/*.ico -src/*.bmp - -samples/ogledit/*.cpp -samples/ogledit/*.c -samples/ogledit/*.h -samples/ogledit/*.rc -samples/ogledit/*.def -samples/ogledit/*.xbm -samples/ogledit/make*.* -samples/ogledit/*.txt - -samples/ogledit/*.ico -samples/ogledit/*.bmp -samples/ogledit/bitmaps/*.bmp -samples/ogledit/bitmaps/*.gif -samples/ogledit/bitmaps/*.xbm - -distrib/*.rsp -distrib/*.bat - -docs/*.txt -docs/*.tex -docs/*.ini -docs/*.hpj -docs/*.ps -docs/*.eps -docs/*.cnt -docs/*.bmp -docs/*.gif -docs/*.hlp diff --git a/utils/ogl/distrib/tarogl.bat b/utils/ogl/distrib/tarogl.bat deleted file mode 100755 index 68202249c0..0000000000 --- a/utils/ogl/distrib/tarogl.bat +++ /dev/null @@ -1,48 +0,0 @@ -@echo off -rem Tar up an external distribution of OGL - -if "%1" == "" goto usage -if "%2" == "" goto usage -echo About to archive an external OGL distribution: -echo From %1 -echo To %2\ogl.tgz -echo CTRL-C if this is not correct. -inkey /W4 `Press any key to continue...` %%input - -erase %2\ogl.tgz -cd %1 - -rem First, expand the wildcards in the ogl.rsp file - -rem Create empty list file -erase %1\distrib\ogl.lis -c:\bin\touch %1\distrib\ogl.lis - -rem Create a .rsp file with backslashes instead -rem of forward slashes -rem No need if using ls2 (from UNIX95 distribution) -rem sed -e "s/\//\\/g" %1\distrib\ogl.rsp > %1\distrib\ogl.rs2 - -set len=%@LINES[%1\distrib\ogl.rsp] -rem set len=%@DEC[%len] -do i = 0 to %len by 1 - set line=%@LINE[%1\distrib\ogl.rsp,%i] - if NOT "%line" == "" ls2 -1 %line >> %1\distrib\ogl.lis -enddo - -tar -c -T %1\distrib\ogl.lis -move archive.tar ogl.tar -gzip ogl.tar -move ogl.taz %2\ogl.tgz - -echo OGL archived. -goto end - -:usage -echo DOS OGL distribution. -echo Usage: tarogl source destination -echo e.g. tarogl c:\wx\utils\ogl c:\wx\utils\ogl\deliver - -:end - - diff --git a/utils/ogl/distrib/zipogl.bat b/utils/ogl/distrib/zipogl.bat deleted file mode 100755 index 37f3e3bf94..0000000000 --- a/utils/ogl/distrib/zipogl.bat +++ /dev/null @@ -1,28 +0,0 @@ -@echo off -rem Zip up an external distribution of OGL -set src=d:\wx2\wxWindows\utils\ogl -set dest=%src\deliver - -if "%src" == "" goto usage -if "%dest" == "" goto usage -echo About to archive an external OGL distribution: -echo From %src -echo To %dest\ogl.zip -echo CTRL-C if this is not correct. -inkey /W4 `Press any key to continue...` %%input - -erase %dest\ogl.zip -cd %src -zip32 -@ %dest\ogl.zip < %src\distrib\ogl.rsp - -echo OGL archived. -goto end - -:usage -echo DOS OGL distribution. -echo Usage: zipogl source destination -echo e.g. zipogl c:\wx\utils\ogl c:\wx\utils\ogl\deliver - -:end - - diff --git a/utils/ogl/docs/back.gif b/utils/ogl/docs/back.gif deleted file mode 100644 index 8a61076d3b..0000000000 Binary files a/utils/ogl/docs/back.gif and /dev/null differ diff --git a/utils/ogl/docs/books.bmp b/utils/ogl/docs/books.bmp deleted file mode 100644 index cf1e148734..0000000000 Binary files a/utils/ogl/docs/books.bmp and /dev/null differ diff --git a/utils/ogl/docs/bugs.tex b/utils/ogl/docs/bugs.tex deleted file mode 100644 index d66f64e613..0000000000 --- a/utils/ogl/docs/bugs.tex +++ /dev/null @@ -1,11 +0,0 @@ -\chapter{Bugs}\label{bugs}% -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage} - -These are the known bugs. - -\begin{itemize}\itemsep=0pt -\item In the OGLEdit sample, .dia files are output double-spaced -due to an unidentified bug in the way a stream is converted to a file. -\end{itemize} - diff --git a/utils/ogl/docs/bullet.bmp b/utils/ogl/docs/bullet.bmp deleted file mode 100644 index aad8fc793e..0000000000 Binary files a/utils/ogl/docs/bullet.bmp and /dev/null differ diff --git a/utils/ogl/docs/changes.tex b/utils/ogl/docs/changes.tex deleted file mode 100644 index 8b2f27e10d..0000000000 --- a/utils/ogl/docs/changes.tex +++ /dev/null @@ -1,9 +0,0 @@ -\chapter{Change log} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage} - -Version 2.0, June 1st 1996 - -\begin{itemize}\itemsep=0pt -\item First publically released version. -\end{itemize} diff --git a/utils/ogl/docs/classes.tex b/utils/ogl/docs/classes.tex deleted file mode 100644 index 02bce73283..0000000000 --- a/utils/ogl/docs/classes.tex +++ /dev/null @@ -1,2505 +0,0 @@ -\chapter{Class reference}\label{classref} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage} - -These are the main \ogl\ classes. - -\section{\class{OGLConstraint}: wxObject}\label{oglconstraint} - -\overview{wxCompositeShape overview}{compositeshapeoverview} - -An OGLConstraint object helps specify how child shapes are laid out with respect -to siblings and parents. - -\membersection{OGLConstraint::OGLConstraint}\label{oglconstraintconstr} - -\func{void}{OGLConstraint}{\void} - -Default constructor. - -\func{void}{OGLConstraint}{\param{int}{ type}, \param{wxShape *}{constraining}, \param{wxList\& }{constrained}} - -Constructor. - -{\it constraining} is the shape which is used as the reference for positioning the {\it constrained} objects. - -{\it constrained} contains a list of wxShapes which are to be constrained (with respect -to {\it constraining}) using {\it type}. - -{\it type} can be one of: - -\begin{itemize}\itemsep=0pt -\item {\bf gyCONSTRAINT\_CENTRED\_VERTICALLY}: the Y co-ordinates of the centres of the -bounding boxes of the constrained objects and the constraining object -will be the same -\item {\bf gyCONSTRAINT\_CENTRED\_HORIZONTALLY}: the X co-ordinates of the centres of the -bounding boxes of the constrained objects and the constraining object -will be the same -\item {\bf gyCONSTRAINT\_CENTRED\_BOTH}: the co-ordinates of the centres of the bounding boxes -of the constrained objects and the constraining object will be the same -\item {\bf gyCONSTRAINT\_LEFT\_OF}: the X co-ordinates of the right hand vertical edges -of the bounding boxes of the constrained objects will be less than -the X co-ordinate of the left hand vertical edge of the bounding box -of the constraining object -\item {\bf gyCONSTRAINT\_RIGHT\_OF}: the X co-ordinates of the left hand vertical edges -of the bounding boxes of the constrained objects will be greater than -the X co-ordinate of the right hand vertical edge of the bounding box -of the constraining object -\item {\bf gyCONSTRAINT\_ABOVE}: the Y co-ordinates of the bottom horizontal edges of the -bounding boxes of the constrained objects will be less than the -Y co-ordinate of the top horizontal edge of the bounding box of the -constraining object -\item {\bf gyCONSTRAINT\_BELOW}: the Y co-ordinates of the top horizontal edges of the -bounding boxes of the constrained objects will be greater than -the X co-ordinate of the bottom horizontal edge of the bounding box -of the constraining object -\item {\bf gyCONSTRAINT\_ALIGNED\_TOP}: the Y co-ordinates of the top horizontal edges of the -bounding boxes of the constrained objects will be the same as the -Y co-ordinate of the top horizontal edge of the bounding box of the -constraining object -\item {\bf gyCONSTRAINT\_ALIGNED\_BOTTOM}: the Y co-ordinates of the bottom horizontal edges -of the bounding boxes of the constrained objects will be the same as -the Y co-ordinate of the bottom horizontal edge of the bounding box -of the constraining object -\item {\bf gyCONSTRAINT\_ALIGNED\_LEFT}: the X co-ordinates of the left hand vertical edges -of the bounding boxes of the constrained objects will be the same as -the X co-ordinate of the left hand vertical edge of the bounding box -of the constraining object -\item {\bf gyCONSTRAINT\_ALIGNED\_RIGHT}: the X co-ordinates of the right hand vertical edges -of the bounding boxes of the constrained objects will be the same as -the X co-ordinate of the right hand vertical edge of the bounding box -of the constraining object -\item {\bf gyCONSTRAINT\_MIDALIGNED\_TOP}: the Y co-ordinates of the centres of -the bounding boxes of the constrained objects will be the same -as the Y co-ordinate of the top horizontal edge of -the bounding box of the constraining object -\item {\bf gyCONSTRAINT\_MIDALIGNED\_BOTTOM}: the Y co-ordinates of the centres of -the bounding boxes of the constrained objects will be the same -as the Y co-ordinate of the bottom horizontal edge of -the bounding box of the constraining object -\item {\bf gyCONSTRAINT\_MIDALIGNED\_LEFT}: the X co-ordinates of the centres of -the bounding boxes of the constrained objects will be the same -as the X co-ordinate of the left hand vertical edge of -the bounding box of the constraining object -\item {\bf gyCONSTRAINT\_MIDALIGNED\_RIGHT}: the X co-ordinates of the centres of -the bounding boxes of the constrained objects will be the same as -the X co-ordinate of the right hand vertical edge of -the bounding box of the constraining object -\end{itemize} - - -\membersection{OGLConstraint::\destruct{OGLConstraint}} - -\func{void}{\destruct{OGLConstraint}}{\void} - -Destructor. - -\membersection{OGLConstraint::Equals} - -\func{bool}{Equals}{\param{float}{ x}, \param{float}{ y}} - -Returns TRUE if {\it x} and {\it y} are approximately equal (for the purposes -of evaluating the constraint). - -\membersection{OGLConstraint::Evaluate} - -\func{bool}{Evaluate}{\void} - -Evaluates this constraint, returning TRUE if anything changed. - -\membersection{OGLConstraint::SetSpacing}\label{oglconstraintsetspacing} - -\func{void}{SetSpacing}{\param{float}{ x}, \param{float}{ y}} - -Sets the horizontal and vertical spacing for the constraint. - - -\section{\class{wxBitmapShape}: wxRectangleShape}\label{wxbitmapshape} - -Draws a bitmap (non-resizable). - -See also \helpref{wxRectangleShape}{wxrectangleshape}. - -\membersection{wxBitmapShape::wxBitmapShape} - -\func{void}{wxBitmapShape}{\void} - -Constructor. - -\membersection{wxBitmapShape::\destruct{wxBitmapShape}} - -\func{void}{\destruct{wxBitmapShape}}{\void} - -Destructor. - -\membersection{wxBitmapShape::GetDeleteBitmap} - -\func{bool}{GetDeleteBitmap}{\void} - -Returns TRUE if the bitmap will be deleted when the shape is deleted. - -\membersection{wxBitmapShape::GetBitmap} - -\func{wxBitmap\&}{GetBitmap}{\void} - -Returns a reference to the bitmap associated with this shape. - -\membersection{wxBitmapShape::GetFilename} - -\func{wxString}{GetFilename}{\void} - -Returns the bitmap filename. - -\membersection{wxBitmapShape::SetDeleteBitmap} - -\func{void}{SetDeleteBitmap}{\param{bool}{ deleteBitmap}} - -Determines whether the bitmap will be deleted when the shape is deleted. - -\membersection{wxBitmapShape::SetBitmap} - -\func{void}{SetBitmap}{\param{const wxBitmap\&}{ bitmap}} - -Sets the bitmap associated with this shape. You can delete the bitmap -from the calling application, since reference counting will take care of -holding on to the internal bitmap data. - -\membersection{wxBitmapShape::SetFilename} - -\func{void}{SetFilename}{\param{const wxString\& }{filename}} - -Sets the bitmap filename. - -\section{\class{wxDiagram}: wxObject}\label{wxdiagram} - -Encapsulates an entire diagram, with methods for reading/writing and drawing. - -\membersection{wxDiagram::wxDiagram} - -\func{void}{wxDiagram}{\void} - -Constructor. - -\membersection{wxDiagram::\destruct{wxDiagram}} - -\func{void}{\destruct{wxDiagram}}{\void} - -Destructor. - -\membersection{wxDiagram::AddShape} - -\func{void}{AddShape}{\param{wxShape *}{shape}, \param{wxShape *}{addAfter = NULL}} - -Adds a shape to the diagram. If {\it addAfter} is non-NULL, the shape will be added after this -one. - -\membersection{wxDiagram::Clear} - -\func{void}{Clear}{\void} - -Clears the device context associated with the diagram. - -\membersection{wxDiagram::DeleteAllShapes} - -\func{void}{DeletesAllShapes}{\void} - -Removes and deletes all shapes in the diagram. - -\membersection{wxDiagram::DrawOutline} - -\func{void}{DrawOutline}{\param{float}{ x1}, \param{float}{ y1}, \param{float}{ x2}, \param{float}{ y2}} - -Draws an outline rectangle on the current device context. - -\membersection{wxDiagram::GetCanvas} - -\func{wxCanvas *}{GetCanvas}{\void} - -Returns the canvas associated with this diagram. - -\membersection{wxDiagram::GetGridSpacing} - -\func{float}{GetGridSpacing}{\void} - -Returns the grid spacing. - -\membersection{wxDiagram::GetMouseTolerance} - -\func{int}{GetMouseTolerance}{\void} - -Returns the tolerance within which a mouse move is ignored. - -\membersection{wxDiagram::GetShapeList} - -\func{wxList *}{GetShapeList}{\void} - -Returns a pointer to the internal shape list. - -\membersection{wxDiagram::GetQuickEditMode} - -\func{bool}{GetQuickEditMode}{\void} - -Returns quick edit mode. - -\membersection{wxDiagram::GetSnapToGrid} - -\func{bool}{GetSnapToGrid}{\void} - -Returns snap-to-grid mode. - -\membersection{wxDiagram::InsertShape} - -\func{void}{InsertShape}{\param{wxShape *}{shape}} - -Inserts a shape at the front of the shape list. - -\membersection{wxDiagram::LoadFile} - -\func{bool}{LoadFile}{\param{const wxString\& }{filename}} - -Loads the diagram from a PrologIO file. - -\membersection{wxDiagram::OnDatabaseLoad} - -\func{void}{OnDatabaseLoad}{\param{PrologDatabase\&}{ database}} - -Called just after the nodes and lines have been read from the PrologDatabase. You may override this; -the default member does nothing. - - -\membersection{wxDiagram::OnDatabaseSave} - -\func{void}{OnDatabaseSave}{\param{PrologDatabase\&}{ database}} - -Called just after the nodes and lines have been written to the PrologDatabase. You may override this; -the default member does nothing. - -\membersection{wxDiagram::OnHeaderLoad} - -\func{bool}{OnHeaderLoad}{\param{PrologDatabase\&}{ database}, \param{PrologExpr\&}{ expr}} - -Called to allow the `diagram' header object to be read. The default member reads no further information. -You may wish to override this to read version information, author name, etc. - - -\membersection{wxDiagram::OnHeaderSave} - -\func{bool}{OnHeaderSave}{\param{PrologDatabase\&}{ database}, \param{PrologExpr\&}{ expr}} - -Called to allow instantiation of the `diagram' header object. The default member writes no further information. -You may wish to override this to include version information, author name, etc. - -\membersection{wxDiagram::OnShapeLoad} - -\func{bool}{OnShapeLoad}{\param{PrologDatabase\&}{ database}, \param{wxShape\&}{ shape}, \param{PrologExpr\&}{ expr}} - -Called to read the shape from the {\it expr}. You may override this, but call this function first. -The default member calls ReadPrologAttributes for the shape. - -\membersection{wxDiagram::OnShapeSave} - -\func{bool}{OnShapeSave}{\param{PrologDatabase\&}{ database}, \param{wxShape\&}{ shape}, \param{PrologExpr\&}{ expr}} - -Called to save the shape to the {\it expr} and {\it database}. You may override this, but call this function first. -The default member calls WritePrologAttributes for the shape, appends the shape to the database, and of the shape -is a composite, recursively calls OnShapeSave for its children. - -\membersection{wxDiagram::ReadContainerGeometry} - -\func{void}{ReadContainerGeometry}{\param{PrologDatabase\&}{ database}} - -Reads container geometry from a PrologDatabase, linking up nodes which -are part of a composite. You probably won't need to redefine this. - -\membersection{wxDiagram::ReadLines} - -\func{void}{ReadLines}{\param{PrologDatabase\&}{ database}} - -Reads lines from a PrologDatabase. You probably won't need to redefine this. - -\membersection{wxDiagram::ReadNodes} - -\func{void}{ReadNodes}{\param{PrologDatabase\&}{ database}} - -Reads nodes from a PrologDatabase. You probably won't need to redefine this. - - -\membersection{wxDiagram::RecentreAll} - -\func{void}{RecentreAll}{\void} - -Make sure all text that should be centred, is centred. - -\membersection{wxDiagram::Redraw} - -\func{void}{Redraw}{\void} - -Draws the shapes in the diagram on the currently set device context. - -\membersection{wxDiagram::RemoveAllShapes} - -\func{void}{RemoveAllShapes}{\void} - -Removes all shapes from the diagram but does not delete the shapes. - -\membersection{wxDiagram::RemoveShape} - -\func{void}{RemoveShape}{\param{wxShape *}{shape}} - -Removes the shape from the diagram (non-recursively) but does not delete it. - -\membersection{wxDiagram::SaveFile} - -\func{bool}{SaveFile}{\param{const wxString\& }{filename}} - -Saves the diagram in a PrologIO file. - -\membersection{wxDiagram::SetCanvas} - -\func{void}{SetCanvas}{\param{wxShapeCanvas *}{canvas}} - -Sets the canvas associated with this diagram. - -\membersection{wxDiagram::SetGridSpacing} - -\func{void}{SetGridSpacing}{\param{float}{ spacing}} - -Sets the grid spacing. The default is 5. - -\membersection{wxDiagram::SetMouseTolerance} - -\func{void}{SetMouseTolerance}{\param{int}{ tolerance}} - -Sets the tolerance within which a mouse move is ignored. The default is 3 pixels. - -\membersection{wxDiagram::SetQuickEditMode} - -\func{void}{SetQuickEditMode}{\param{bool}{ mode}} - -Sets quick-edit-mode on or off. In this mode, refreshes are minimized, but the -diagram may need manual refreshing occasionally. - -\membersection{wxDiagram::SetSnapToGrid} - -\func{void}{SetSnapToGrid}{\param{bool}{ snap}} - -Sets snap-to-grid mode on or off. The default is on. - -\membersection{wxDiagram::ShowAll} - -\func{void}{ShowAll}{\param{bool}{ show}} - -Calls Show for each shape in the diagram. - -\membersection{wxDiagram::Snap} - -\func{void}{Snap}{\param{float *}{x}, \param{float *}{y}} - -`Snaps' the coordinate to the nearest grid position, if snap-to-grid is on. - - -\section{\class{wxDrawnShape}: wxRectangleShape}\label{wxdrawnshape} - -Draws a pseduo-metafile shape, which can be loaded from a simple Windows metafile. - -See also \helpref{wxRectangleShape}{wxrectangleshape}. - -\membersection{wxDrawnShape::wxDrawnShape} - -\func{void}{wxDrawnShape}{\void} - -Constructor. - -\membersection{wxDrawnShape::\destruct{wxDrawnShape}} - -\func{void}{\destruct{wxDrawnShape}}{\void} - -Destructor. - -\membersection{wxDrawnShape::GetMetaFile} - -\func{wxPseudoMetaFile\& }{GetMetaFile}{\void} - -Returns a reference to the internal `pseudo-metafile'. - -\membersection{wxDrawnShape::LoadFromMetaFile} - -\func{bool}{LoadFromMetaFile}{\param{const wxString\& }{filename}} - -Loads a (very simple) Windows metafile, created for example by Top Draw, the Windows shareware graphics package. - -\membersection{wxDrawnShape::Rotate} - -\func{void}{Rotate}{\param{float }{x}, \param{float }{y}, \param{float }{theta}} - -Rotate about the given axis by the given amount in radians. - -\membersection{wxDrawnShape::Scale} - -\func{void}{Scale}{\param{float }{sx}, \param{float }{sy}} - -Scales the shape by the given amount. - -\membersection{wxDrawnShape::SetSaveToFile} - -\func{void}{SetSaveToFile}{\param{bool }{save}} - -If {\it save} is TRUE, the image will be saved along with the shape's other attributes. The reason -why this might not be desirable is that if there are many shapes with the same image, it would be -more efficient for the application to save one copy, and not duplicate the information for every -shape. The default is TRUE. - -\membersection{wxDrawnShape::Translate} - -\func{void}{Translate}{\param{float }{x}, \param{float }{y}} - -Translates the shape by the given amount. - -\section{\class{wxCircleShape}: wxEllipseShape}\label{wxcircleshape} - -An wxEllipseShape whose width and height are the same. - -See also \helpref{wxEllipseShape}{wxellipseshape}. - -\membersection{wxCircleShape::wxCircleShape} - -\func{void}{wxCircleShape}{\param{float}{ width = 0.0}} - -Constructor. - -\membersection{wxCircleShape::\destruct{wxCircleShape}} - -\func{void}{\destruct{wxCircleShape}}{\void} - -Destructor. - - -\section{\class{wxCompositeShape}: wxRectangleShape}\label{wxcompositeshape} - -\overview{wxCompositeShape overview}{compositeshapeoverview} - -This is an object with a list of child objects, and a list of size -and positioning constraints between the children. - -See also \helpref{wxRectangleShape}{wxrectangleshape}. - -\membersection{wxCompositeShape::wxCompositeShape} - -\func{void}{wxCompositeShape}{\void} - -Constructor. - -\membersection{wxCompositeShape::\destruct{wxCompositeShape}} - -\func{void}{\destruct{wxCompositeShape}}{\void} - -Destructor. - -\membersection{wxCompositeShape::AddChild}\label{wxcompositeshapeaddchild} - -\func{void}{AddChild}{\param{wxShape *}{child}, \param{wxShape *}{addAfter = NULL}} - -Adds a child shape to the composite. If {\it addAfter} is non-NULL, the shape will be added -after this shape. - -\membersection{wxCompositeShape::AddConstraint}\label{wxcompositeshapeaddconstraint} - -\func{OGLConstraint *}{AddConstraint}{\param{OGLConstraint *}{constraint}} - -\func{OGLConstraint *}{AddConstraint}{\param{int}{ type}, \param{wxShape *}{constraining}, \param{wxList\&}{constrained}} - -\func{OGLConstraint *}{AddConstraint}{\param{int}{ type}, \param{wxShape *}{constraining}, \param{wxShape *}{constrained}} - -Adds a constraint to the composite. - -\membersection{wxCompositeShape::CalculateSize} - -\func{void}{CalculateSize}{\void} - -Calculates the size and position of the composite based on child sizes and positions. - -\membersection{wxCompositeShape::ContainsDivision} - -\func{bool}{FindContainerImage}{\param{wxDivisionShape *}{division}} - -Returns TRUE if {\it division} is a descendant of this container. - -\membersection{wxCompositeShape::DeleteConstraint} - -\func{void}{DeleteConstraint}{\param{OGLConstraint *}{constraint}} - -Deletes constraint from composite. - -\membersection{wxCompositeShape::DeleteConstraintsInvolvingChild} - -\func{void}{DeleteConstraintsInvolvingChild}{\param{wxShape *}{child}} - -This function deletes constraints which mention the given child. Used when -deleting a child from the composite. - -\membersection{wxCompositeShape::FindConstraint} - -\func{OGLConstraint *}{FindConstraint}{\param{long}{ id}, \param{wxCompositeShape **}{actualComposite}} - -Finds the constraint with the given id, also returning the actual composite the constraint was in, -in case that composite was a descendant of this composite. - -\membersection{wxCompositeShape::FindContainerImage} - -\func{wxShape *}{FindContainerImage}{\void} - -Finds the image used to visualize a container. This is any child -of the composite that is not in the divisions list. - -\membersection{wxCompositeShape::GetConstraints} - -\func{wxList\&}{GetConstraints}{\void} - -Returns a reference to the list of constraints. - -\membersection{wxCompositeShape::GetDivisions} - -\func{wxList\&}{GetDivisions}{\void} - -Returns a reference to the list of divisions. - -\membersection{wxCompositeShape::MakeContainer}\label{wxcompositeshapemakecontainer} - -\func{void}{MakeContainer}{\void} - -Makes this composite into a container by creating one child wxDivisionShape. - -\membersection{wxCompositeShape::OnCreateDivision} - -\func{wxDivisionShape *}{OnCreateDivision}{\void} - -Called when a new division shape is required. Can be overriden to allow an application -to use a different class of division. - -\membersection{wxCompositeShape::Recompute}\label{wxcompositeshaperecompute} - -\func{bool}{Recompute}{\void} - -Recomputes any constraints associated with the object. If FALSE is returned, -the constraints could not be satisfied (there was an inconsistency). - -\membersection{wxCompositeShape::RemoveChild} - -\func{void}{RemoveChild}{\param{wxShape *}{child}} - -Removes the child from the composite and any constraint relationships, but does not -delete the child. - -\section{\class{wxDividedShape}: wxRectangleShape}\label{wxdividedshape} - -\overview{wxDividedShape overview}{dividedshapeoverview} - -A wxDividedShape is a rectangle with a number of vertical divisions. Each -division may have its text formatted with independent characteristics, and -the size of each division relative to the whole image may be specified. - -See also \helpref{wxRectangleShape}{wxrectangleshape}. - -\membersection{wxDividedShape::wxDividedShape} - -\func{void}{wxDividedShape}{\param{float}{ width = 0.0}, \param{float}{ height = 0.0}} - -Constructor. - -\membersection{wxDividedShape::\destruct{wxDividedShape}} - -\func{void}{\destruct{wxDividedShape}}{\void} - -Destructor. - -\membersection{wxDividedShape::EditRegions} - -\func{void}{EditRegions}{\void} - -Edit the region colours and styles. - -\membersection{wxDividedShape::SetRegionSizes} - -\func{void}{SetRegionSizes}{\void} - -Set all region sizes according to proportions and -this object total size. - - - - -\section{\class{wxDivisionShape}: wxCompositeShape}\label{wxdivisionshape} - -\overview{wxCompositeShape overview}{compositeshapeoverview} - -A division shape is like a composite in that it can contain further objects, but is used exclusively to -divide another shape into regions, or divisions. A wxDivisionShape is never free-standing. - -See also \helpref{wxCompositeShape}{wxcompositeshape}. - -\membersection{wxDivisionShape::wxDivisionShape} - -\func{void}{wxDivisionShape}{\void} - -Constructor. - -\membersection{wxDivisionShape::\destruct{wxDivisionShape}} - -\func{void}{\destruct{wxDivisionShape}}{\void} - -Destructor. - -\membersection{wxDivisionShape::AdjustBottom} - -\func{void}{AdjustBottom}{\param{float}{ bottom}, \param{bool}{ test}} - -Adjust a side, returning FALSE if it's not physically possible to adjust it to this point. - -\membersection{wxDivisionShape::AdjustLeft} - -\func{void}{AdjustLeft}{\param{float}{ left}, \param{bool}{ test}} - -Adjust a side, returning FALSE if it's not physically possible to adjust it to this point. - -\membersection{wxDivisionShape::AdjustRight} - -\func{void}{AdjustRight}{\param{float}{ right}, \param{bool}{ test}} - -Adjust a side, returning FALSE if it's not physically possible to adjust it to this point. - -\membersection{wxDivisionShape::AdjustTop} - -\func{void}{AdjustTop}{\param{float}{ top}, \param{bool}{ test}} - -Adjust a side, returning FALSE if it's not physically possible to adjust it to this point. - -\membersection{wxDivisionShape::Divide}\label{wxdivisionshapedivide} - -\func{void}{Divide}{\param{int}{ direction}} - -Divide this division into two further divisions, horizontally ({\it direction} is wxHORIZONTAL) or -vertically ({\it direction} is wxVERTICAL). - -\membersection{wxDivisionShape::EditEdge} - -\func{void}{EditEdge}{\param{int}{ side}} - -Interactively edit style of left or top side. - -\membersection{wxDivisionShape::GetBottomSide} - -\func{wxDivisionShape *}{GetBottomSide}{\void} - -Returns a pointer to the division on the bottom side of this division. - -\membersection{wxDivisionShape::GetHandleSide} - -\func{int}{GetHandleSide}{\void} - -Returns the side which the handle appears on (DIVISION\_SIDE\_LEFT or DIVISION\_SIDE\_TOP). - -\membersection{wxDivisionShape::GetLeftSide} - -\func{wxDivisionShape *}{GetLeftSide}{\void} - -Returns a pointer to the division on the left side of this division. - -\membersection{wxDivisionShape::GetLeftSideColour} - -\func{wxString}{GetLeftSideColour}{\void} - -Returns a pointer to the colour used for drawing the left side of the division. - -\membersection{wxDivisionShape::GetLeftSidePen} - -\func{wxPen *}{GetLeftSidePen}{\void} - -Returns a pointer to the pen used for drawing the left side of the division. - -\membersection{wxDivisionShape::GetRightSide} - -\func{wxDivisionShape *}{GetRightSide}{\void} - -Returns a pointer to the division on the right side of this division. - -\membersection{wxDivisionShape::GetTopSide} - -\func{wxDivisionShape *}{GetTopSide}{\void} - -Returns a pointer to the division on the top side of this division. - -\membersection{wxDivisionShape::GetTopSideColour} - -\func{wxString}{GetTopSideColour}{\void} - -Returns a pointer to the colour used for drawing the top side of the division. - -\membersection{wxDivisionShape::GetTopSidePen} - -\func{wxPen *}{GetTopSidePen}{\void} - -Returns a pointer to the pen used for drawing the left side of the division. - - -\membersection{wxDivisionShape::ResizeAdjoining} - -\func{void}{ResizeAdjoining}{\param{int}{ side}, \param{float}{ newPos}, \param{bool}{ test}} - -Resize adjoining divisions at the given side. If {\it test} is TRUE, -just see whether it's possible for each adjoining region, -returning FALSE if it's not. - -{\it side} can be one of: - -\begin{itemize}\itemsep=0pt -\item DIVISION\_SIDE\_NONE -\item DIVISION\_SIDE\_LEFT -\item DIVISION\_SIDE\_TOP -\item DIVISION\_SIDE\_RIGHT -\item DIVISION\_SIDE\_BOTTOM -\end{itemize} - -\membersection{wxDivisionShape::PopupMenu} - -\func{void}{PopupMenu}{\param{float}{ x}, \param{float}{ y}} - -Popup the division menu. - -\membersection{wxDivisionShape::SetBottomSide} - -\func{void}{SetBottomSide}{\param{wxDivisionShape *}{shape}} - -Set the pointer to the division on the bottom side of this division. - -\membersection{wxDivisionShape::SetHandleSide} - -\func{int}{SetHandleSide}{\void} - -Sets the side which the handle appears on (DIVISION\_SIDE\_LEFT or DIVISION\_SIDE\_TOP). - -\membersection{wxDivisionShape::SetLeftSide} - -\func{void}{SetLeftSide}{\param{wxDivisionShape *}{shape}} - -Set the pointer to the division on the left side of this division. - -\membersection{wxDivisionShape::SetLeftSideColour} - -\func{void}{SetLeftSideColour}{\param{const wxString\& }{colour}} - -Sets the colour for drawing the left side of the division. - -\membersection{wxDivisionShape::SetLeftSidePen} - -\func{void}{SetLeftSidePen}{\param{wxPen *}{pen}} - -Sets the pen for drawing the left side of the division. - -\membersection{wxDivisionShape::SetRightSide} - -\func{void}{SetRightSide}{\param{wxDivisionShape *}{shape}} - -Set the pointer to the division on the right side of this division. - -\membersection{wxDivisionShape::SetTopSide} - -\func{void}{SetTopSide}{\param{wxDivisionShape *}{shape}} - -Set the pointer to the division on the top side of this division. - -\membersection{wxDivisionShape::SetTopSideColour} - -\func{void}{SetTopSideColour}{\param{const wxString\& }{colour}} - -Sets the colour for drawing the top side of the division. - -\membersection{wxDivisionShape::SetTopSidePen} - -\func{void}{SetTopSidePen}{\param{wxPen *}{pen}} - -Sets the pen for drawing the top side of the division. - - - -\section{\class{wxEllipseShape}: wxShape}\label{wxellipseshape} - -The wxEllipseShape behaves similarly to the wxRectangleShape but is -elliptical. - -See also \helpref{wxShape}{wxshape}. - -\membersection{wxEllipseShape::wxEllipseShape} - -\func{void}{wxEllipseShape}{\param{float}{ width = 0.0}, \param{float}{ height = 0.0}} - -Constructor. - -\membersection{wxEllipseShape::\destruct{wxEllipseShape}} - -\func{void}{\destruct{wxEllipseShape}}{\void} - -Destructor. - -\section{\class{wxLineShape}: wxShape}\label{wxlineshape} - -A wxLineShape may be attached to two nodes; it may be segmented, in which -case a control point is drawn for each joint. - -See also \helpref{wxShape}{wxshape}. - -\membersection{wxLineShape::wxLineShape} - -\func{void}{wxLineShape}{\void} - -\func{void}{wxLineShape}{\param{wxList *}{list}} - -Constructors. In the second (usual) form, supply a list of wxPoints, each to be used -as a `control point' for the line. The minimum number of points is two. - -\membersection{wxLineShape::\destruct{wxLineShape}} - -\func{void}{\destruct{wxLineShape}}{\void} - -Destructor. - -\membersection{wxLineShape::AddArrow} - -\func{void}{AddArrow}{\param{WXTYPE}{ type}, \param{bool}{ end = ARROW\_POSITION\_END}, \param{float}{ arrowSize = 10.0}, - \param{float}{ xOffset = 0.0}, \param{const wxString\& }{name = NULL}, \param{wxPseudoMetaFile *}{mf = NULL}, \param{long}{ arrowId = -1}} - -Adds an arrow (or annotation) to the line. - -{\it type} may currently be one of: - -\begin{description}\itemsep=0pt -\item[ARROW\_HOLLOW\_CIRCLE] Hollow circle. -\item[ARROW\_FILLED\_CIRCLE] Filled circle. -\item[ARROW\_ARROW] Conventional arrowhead. -\item[ARROW\_SINGLE\_OBLIQUE] Single oblique stroke. -\item[ARROW\_DOUBLE\_OBLIQUE] Double oblique stroke. -\item[ARROW\_DOUBLE\_METAFILE] Custom arrowhead. -\end{description} - -{\it end} may currently be one of: - -\begin{description}\itemsep=0pt -\item[ARROW\_POSITION\_END] Arrow appears at the end. -\item[ARROW\_POSITION\_START] Arrow appears at the start. -\end{description} - -{\it arrowSize} specifies the length of the arrow. - -{\it xOffset} specifies the offset from the end of the line. - -{\it name} specifies a name for the arrow. - -{\it mf} can be a wxPseduoMetaFile, perhaps loaded from a simple Windows metafile. - -{\it arrowId} is the id for the arrow. - -\membersection{wxLineShape::AddArrowOrdered} - -\func{void}{AddArrowOrdered}{\param{wxArrowHead *}{arrow}, \param{wxList\&}{ referenceList}, \param{int}{ end}} - -Add an arrowhead in the position indicated by the reference -list of arrowheads, which contains all legal arrowheads for this -line, in the correct order. -E.g. - -\begin{verbatim} - Reference list: a b c d e - Current line list: a d -\end{verbatim} - -Add c, then line list is: a c d. - -If no legal arrowhead position, return FALSE. Assume reference list is -for one end only, since it potentially defines the ordering for any one -of the 3 positions. So we don't check the reference list for arrowhead -position. - -\membersection{wxLineShape::ClearArrow} - -\func{bool}{ClearArrow}{\param{const wxString\& }{name}} - -Delete the arrow with the given name. - -\membersection{wxLineShape::ClearArrowsAtPosition} - -\func{void}{ClearArrowsAtPosition}{\param{int}{ position = -1}} - -Delete the arrows at the specified position, or at any position if {\it position} is -1. - -\membersection{wxLineShape::DrawArrow} - -\func{void}{DrawArrow}{\param{ArrowHead *}{arrow}, \param{float}{ xOffset}, \param{bool}{ proportionalOffset}} - -Draws the given arrowhead (or annotation). - -\membersection{wxLineShape::DeleteArrowHead} - -\func{bool}{DeleteArrowHead}{\param{long}{ arrowId}} - -\func{bool}{DeleteArrowHead}{\param{int}{ position}, \param{const wxString\& }{name}} - -Delete arrowhead by id or position and name. - -\membersection{wxLineShape::DeleteLineControlPoint} - -\func{bool}{DeleteLineControlPoint}{\void} - -Deletes an arbitary point on the line. - -\membersection{wxLineShape::DrawArrows} - -\func{void}{DrawArrows}{\void} - -Draws all arrows. - -\membersection{wxLineShape::DrawRegion} - -\func{void}{DrawRegion}{\param{wxShapeRegion *}{region}, \param{float}{ x}, \param{float}{ y}} - -Format one region at this position. - -\membersection{wxLineShape::EraseRegion} - -\func{void}{EraseRegion}{\param{wxShapeRegion *}{region}, \param{float}{ x}, \param{float}{ y}} - -Format one region at this position. - -\membersection{wxLineShape::FindArrowHead} - -\func{wxArrowHead *}{FindArrowHead}{\param{long}{ arrowId}} - -\func{wxArrowHead *}{FindArrowHead}{\param{int}{ position}, \param{const wxString\& }{name}} - -Find arrowhead by id or position and name. - -\membersection{wxLineShape::FindLineEndPoints} - -\func{void}{FindLineEndPoints}{\param{float *}{fromX}, \param{float *}{fromY}, \param{float *}{toX}, \param{float *}{toY}} - -Finds the x, y points at the two ends of the line. This function can be -used by e.g. line-routing routines to get the actual points on the two -node images where the lines will be drawn to/from. - -\membersection{wxLineShape::FindLinePosition} - -\func{int}{FindLinePosition}{\param{float }{x}, \param{float }{y}} - -Find which position we're talking about at this x, y. -Returns ARROW\_POSITION\_START, ARROW\_POSITION\_MIDDLE, ARROW\_POSITION\_END. - -\membersection{wxLineShape::FindMinimumWidth} - -\func{float}{FindMinimumWidth}{\void} - -Finds the horizontal width for drawing a line with arrows in minimum -space. Assume arrows at end only. - -\membersection{wxLineShape::FindNth} - -\func{void}{FindNth}{\param{wxShape *}{image}, \param{int *}{nth}, \param{int *}{noArcs}, \param{bool}{ incoming}} - -Finds the position of the line on the given object. Specify whether incoming or outgoing lines are -being considered with {\it incoming}. - -\membersection{wxLineShape::GetAttachmentFrom} - -\func{int}{GetAttachmentFrom}{\void} - -Returns the attachment point on the `from' node. - -\membersection{wxLineShape::GetAttachmentTo} - -\func{int}{GetAttachmentTo}{\void} - -Returns the attachment point on the `to' node. - -\membersection{wxLineShape::GetEnds} - -\func{void}{GetEnds}{\param{float *}{x1}, \param{float *}{y1}, \param{float *}{x2}, \param{float *}{y2}} - -Gets the visible endpoints of the lines for drawing between two objects. - -\membersection{wxLineShape::GetFormatMode} - -\func{int}{GetFormatMode}{\param{int}{ regionId = 0}} - -Returns the format mode for this region. See als \helpref{SetFormatMode}{setformatmode}. - -\membersection{wxLineShape::GetFrom} - -\func{wxShape *}{GetFrom}{\void} - -Gets the `from' object. - -\membersection{wxLineShape::GetLabelPosition} - -\func{void}{GetLabelPosition}{\param{int}{ position}, \param{float *}{x}, \param{float *}{y}} - -Get the reference point for a label. Region x and y are offsets from this. -position is 0 (middle), 1 (start), 2 (end). - -\membersection{wxLineShape::GetNextControlPoint} - -\func{wxPoint *}{GetNextControlPoint}{\param{wxShape *}{shape}} - -Find the next control point in the line after the start/end point, -depending on whether the shape is at the start or end. - -\membersection{wxLineShape::GetTo} - -\func{wxShape *}{GetTo}{\void} - -Gets the `to' object. - -\membersection{wxLineShape::Initialise} - -\func{void}{Initialise}{\void} - -Initialises the line object. - -\membersection{wxLineShape::InsertLineControlPoint} - -\func{void}{InsertLineControlPoint}{\void} - -Inserts a control point at an arbitrary position. - -\membersection{wxLineShape::IsEnd} - -\func{bool}{IsEnd}{\param{wxShape *}{shape}} - -Returns TRUE if {\it shape} is at the end of the line. - -\membersection{wxLineShape::IsSpline} - -\func{bool}{IsSpline}{\void} - -Returns TRUE if a spline is drawn through the control points, and FALSE otherwise. - -\membersection{wxLineShape::MakeLineControlPoints} - -\func{void}{MakeLineControlPoints}{\param{int}{ n}} - -Make a given number of control points. - -\membersection{wxLineShape::OnMoveLink} - -\func{void}{OnMoveLink}{\void} - -Called when a connected object has moved, to move the link to -correct position. - -\membersection{wxLineShape::SetAttachments} - -\func{void}{SetAttachments}{\param{int}{ fromAttach}, \param{int}{ toAttach}} - -Specifies which object attachment points should be used at each end of the line. - -\membersection{wxLineShape::SetEnds} - -\func{void}{SetEnds}{\param{float}{ x1}, \param{float}{ y1}, \param{float}{ x2}, \param{float}{ y2}} - -Sets the end positions of the line. - -\membersection{wxLineShape::SetFrom} - -\func{void}{SetFrom}{\param{wxShape *}{object}} - -Sets the `from' object for the line. - -\membersection{wxLineShape::SetIgnoreOffsets} - -\func{void}{SetIgnoreOffsets}{\param{bool}{ ignore}} - -Tells the shape whether to ignore offsets from the end of the line when drawing. - -\membersection{wxLineShape::SetSpline} - -\func{void}{SetSpline}{\param{bool}{ spline}} - -Specifies whether a spline is to be drawn through the control points (TRUE), or a line (FALSE). - -\membersection{wxLineShape::SetTo} - -\func{void}{SetTo}{\param{wxShape *}{object}} - -Sets the `to' object for the line. - -\membersection{wxLineShape::Straighten} - -\func{void}{Straighten}{\void} - -Straighten verticals and horizontals. - -\membersection{wxLineShape::Unlink} - -\func{void}{Unlink}{\void} - -Unlinks the line from the nodes at either end. - - -\section{\class{wxPolygonShape}: wxShape}\label{wxpolygonshape} - -A wxPolygonShape's shape is defined by a number of points passed to the object's -constructor. It can be used to create new shapes such as diamonds and triangles. - -See also \helpref{wxShape}{wxshape}. - -\membersection{wxPolygonShape::wxPolygonShape} - -\func{void}{wxPolygonShape}{void} - -Constructor. Call Create to specify the polygon's vertices. - -\membersection{wxPolygonShape::\destruct{wxPolygonShape}} - -\func{void}{\destruct{wxPolygonShape}}{\void} - -Destructor. - -\membersection{wxPolygonShape::Create} - -\func{void}{Create}{\param{wxList *}{points}} - -Takes a list of wxPoints; each point is an {\it offset} from the centre. -The polygon's destructor will delete these points, so do not delete them yourself. - -\membersection{wxPolygonShape::AddPolygonPoint} - -\func{void}{AddPolygonPoint}{\param{int}{ pos = 0}} - -Add a control point after the given point. - -\membersection{wxPolygonShape::CalculatePolygonCentre} - -\func{void}{CalculatePolygonCentre}{\void} - -Recalculates the centre of the polygon. - -\membersection{wxPolygonShape::DeletePolygonPoint} - -\func{void}{DeletePolygonPoint}{\param{int}{ pos = 0}} - -Deletes a control point. - -\membersection{wxPolygonShape::GetPoints} - -\func{wxList *}{GetPoints}{\void} - -Returns a pointer to the internal list of polygon vertices. - -\membersection{wxPolygonShape::UpdateOriginalPoints} - -\func{void}{UpdateOriginalPoints}{\void} - -If we've changed the shape, must make the original -points match the working points with this function. - -\section{\class{wxRectangleShape}: wxShape}\label{wxrectangleshape} - -The wxRectangleShape has rounded or square corners. - -See also \helpref{wxShape}{wxshape}. - -\membersection{wxRectangleShape::wxRectangleShape} - -\func{void}{wxRectangleShape}{\param{float}{ width = 0.0}, \param{float}{ height = 0.0}} - -Constructor. - -\membersection{wxRectangleShape::\destruct{wxRectangleShape}} - -\func{void}{\destruct{wxRectangleShape}}{\void} - -Destructor. - -\membersection{wxRectangleShape::SetCornerRadius} - -\func{void}{SetCornerRadius}{\param{float}{ radius}} - -Sets the radius of the rectangle's rounded corners. If the radius is zero, a non-rounded -rectangle will be drawn. If the radius is negative, the value is the proportion of the -smaller dimension of the rectangle. - -\section{\class{wxPseudoMetaFile}: wxObject}\label{wxpseudometafile} - -A simple metafile-like class which can load data from a Windows metafile on all platforms. - - -\section{\class{wxShape}: wxShapeEvtHandler}\label{wxshape} - -The wxShape is the top-level, abstract object that all other -objects are derived from. All common functionality is represented by -wxShape's members, and overriden members that appear in derived -classes and have behaviour as documented for wxShape, are not -documented separately. - -See also \helpref{wxShapeEvtHandler}{wxshapeevthandler}. - -\membersection{wxShape::wxShape} - -\func{void}{wxShape}{\param{wxShapeCanvas *}{canvas = NULL}} - -Constructs a new wxShape. - -\membersection{wxShape::\destruct{wxShape}} - -\func{void}{\destruct{wxShape}}{\void} - -Destructor. - -\membersection{wxShape::AddLine} - -\func{void}{AddLine}{\param{wxLineShape *}{line}, \param{wxShape *}{other}, \param{int}{attachFrom = 0}, \param{int}{ attachTo = 0}} - -Adds a line between the specified canvas objects, at the specified attachment points. - -\membersection{wxShape::AddRegion} - -\func{void}{AddRegion}{\param{wxShapeRegion *}{region}} - -Adds a region to the shape. - -\membersection{wxShape::AddText} - -\func{void}{AddText}{\param{const wxString\& }{string}} - -Adds a line of text to the object's default text region. - -\membersection{wxShape::AddToCanvas} - -\func{void}{AddToCanvas}{\param{wxShapeCanvas *}{theCanvas}, \param{wxShape *}{addAfter=NULL}} - -Adds the object to the canvas's object list. If {\it addAfter} is -non-NULL, will add the shape after this one. - -\membersection{wxShape::AncestorSelected} - -\func{bool}{AncestorSelected}{\void} - -TRUE if the object's ancestor is currently selected. - -\membersection{wxShape::AssignNewIds} - -\func{void}{AssignNewIds}{\void} - -Assigns new ids to this image and its children. - -\membersection{wxShape::Attach} - -\func{void}{Attach}{\param{wxShapeCanvas *}{can}} - -Sets the object's internal canvas pointer to point to the given canvas. - -\membersection{wxShape::CalculateSize} - -\func{void}{CalculateSize}{\void} - -Called to calculate the object's size if dependent on children sizes. - -\membersection{wxShape::ClearAttachments} - -\func{void}{ClearAttachments}{\void} - -Clears internal custom attachment point objects (of class wxAttachmentPoint). - -\membersection{wxShape::ClearRegions} - -\func{void}{ClearRegions}{\void} - -Clears the wxShapeRegions from the shape. - -\membersection{wxShape::ClearText} - -\func{void}{ClearText}{\param{int}{ regionId = 0}} - -Clears the text from the specified text region. - -\membersection{wxShape::Constrain} - -\func{bool}{Constrain}{\void} - -Calculates the object's constraints (if any). Applicable -only to wxCompositeShape, does nothing if the object is of -a different class. - -\membersection{wxShape::Copy} - -\func{void}{Copy}{\param{wxShape\&}{ copy}} - -Copy the object into the given object. Every derived class must have one of these. - -\membersection{wxShape::CreateNewCopy} - -\func{wxShape *}{CreateNewCopy}{\param{wxShapeCanvas *}{theCanvas = NULL}} - -Creates and returns a new copy of this object (calling PrivateCopy). Do not override this function. - -This function should always be used to create a new copy, since it must do special processing -for copying constraints associated with constraints. - -\membersection{wxShape::DeleteControlPoints} - -\func{void}{DeleteControlPoints}{\void} - -Deletes the control points (or handles) for the object. Does not redraw -the object. - -\membersection{wxShape::Detach} - -\func{void}{Detach}{\void} - -Disassociates the object from its canvas by setting the internal object -canvas pointer to NULL. - -\membersection{wxShape::Draggable} - -\func{bool}{Draggable}{\void} - -TRUE if the object may be dragged by the user. - -\membersection{wxShape::Draw} - -\func{void}{Draw}{\void} - -Draws the whole object and any lines attached to it. - -Do not override this function: override OnDraw, which is called -by this function. - -\membersection{wxShape::DrawContents} - -\func{void}{DrawContents}{\void} - -Draws the internal graphic of the object (such as -text). - -Do not override this function: override OnDrawContents, which is called -by this function. - -\membersection{wxShape::DrawLines} - -\func{void}{DrawLinks}{\param{int}{ attachment = -1}} - -Draws any lines linked to this object. - -\membersection{wxShape::Erase} - -\func{void}{Erase}{\void} - -Erases the object, but does not repair damage caused to other -objects. - -\membersection{wxShape::EraseContents} - -\func{void}{EraseContents}{\void} - -Erases the object contents, that is, the area within the object's -minimum bounding box. - -\membersection{wxShape::EraseLinks} - -\func{void}{EraseLinks}{\param{int}{ attachment = -1}} - -Erases links attached to this object, but does not repair -damage caused to other objects. - -\membersection{wxShape::FindRegion} - -\func{wxShape *}{FindRegion}{\param{const wxString\& }{regionName}, \param{int *}{regionId}} - -Finds the actual image (`this' if non-composite) and region id for the given -region name. - -\membersection{wxShape::FindRegionNames} - -\func{void}{FindRegionNames}{\param{wxStringList\&}{ list}} - -Finds all region names for this image (composite or simple). -Supply an empty string list. - -\membersection{wxShape::Flash} - -\func{void}{Flash}{\void} - -Flashes the object. - -\membersection{wxShape::FormatText} - -\func{void}{FormatText}{\param{const wxString\& }{s}, \param{int}{ i = 0}} - -Reformats the given text region; defaults to formatting the default region. - -\membersection{wxShape::GetAttachmentMode} - -\func{void}{GetAttachmentMode}{\void} - -Returns the attachment mode. See \helpref{SetAttachmentMode}{setattachmentmode}. - -\membersection{wxShape::GetAttachmentPosition} - -\func{void}{GetAttachmentPosition}{\param{int}{ attachment}, \param{float *}{x}, \param{float *}{y}, \param{int}{ nth = 0}, \param{int}{ noArcs = 1}} - -Gets the position at which the given attachment point should be drawn. - -\membersection{wxShape::GetBoundingBoxMax} - -\func{void}{GetBoundingBoxMax}{\param{float *}{width}, \param{float *}{height}} - -Gets the maximum bounding box for the object, taking into -account external features such as shadows. - -\membersection{wxShape::GetBoundingBoxMin} - -\func{void}{GetBoundingBoxMin}{\param{float *}{width}, \param{float *}{height}} - -Gets the minimum bounding box for the object, that defines -the area available for drawing the contents (such as text). - -\membersection{wxShape::GetBrush} - -\func{wxBrush *}{GetBrush}{\void} - -Returns the brush used for filling the shape. - -\membersection{wxShape::GetCanvas} - -\func{wxShapeCanvas *}{GetCanvas}{\void} - -Gets the internal canvas pointer. - -\membersection{wxShape::GetCentreResize} - -\func{bool}{GetCentreResize}{\void} - -Returns TRUE if the shape is to be resized from the centre (the centre -stands still), or FALSE if from the corner or side being dragged (the -other corner or side stands still). - -\membersection{wxShape::GetChildren} - -\func{wxList\&}{GetChildren}{\void} - -Returns a reference to the list of children for this shape. - -\membersection{wxShape::GetClientData} - -\func{wxObject *}{GetClientData}{\void} - -Gets the client data associated with the object (NULL if there is -none). - -\membersection{wxShape::GetDisableLabel} - -\func{bool}{GetDisableLabel}{\void} - -Returns TRUE if the default region will not be shown, FALSE otherwise. - -\membersection{wxShape::GetEventHandler} - -\func{wxShapeEvtHandler *}{GetEventHandler}{\void} - -Returns the event handler for this shape. - -\membersection{wxShape::GetFixedHeight} - -\func{bool}{GetFixedHeight}{\void} - -Returns TRUE if the shape cannot be resized in the vertical plane. - -\membersection{wxShape::GetFixedSize} - -\func{void}{GetFixedSize}{\param{bool *}{ x}, \param{bool *}{ y}} - -Returns flags indicating whether the shape is of fixed size in either direction. - -\membersection{wxShape::GetFixedWidth} - -\func{bool}{GetFixedWidth}{\void} - -Returns TRUE if the shape cannot be resized in the horizontal plane. - -\membersection{wxShape::GetFont} - -\func{int}{GetFont}{\param{int}{ regionId = 0}} - -Gets the font for the specified text region. - -\membersection{wxShape::GetFunctor} - -\func{char*}{GetFunctor}{\void} - -Gets a string representing the type of the object, to be used when -writing out object descriptions to a file. This is overridden by -each derived object class to provide an appropriate type string. - -\membersection{wxShape::GetId} - -\func{long}{GetId}{\void} - -Returns the integer identifier for this shape. - -\membersection{wxShape::GetLines} - -\func{wxList\&}{GetLines}{\void} - -Returns a reference to the list of lines connected to this shape. - -\membersection{wxShape::GetNumberOfAttachments} - -\func{int}{GetNumberOfAttachments}{\void} - -Gets the number of attachment points for this object. - -\membersection{wxShape::GetNumberOfTextRegions} - -\func{int}{GetNumberOfTextRegions}{\void} - -Gets the number of text regions for this object. - -\membersection{wxShape::GetParent} - -\func{wxShape *}{GetParent}{\void} - -Returns the parent of this shape, if it is part of a composite. - -\membersection{wxShape::GetPen} - -\func{wxPen *}{GetPen}{\void} - -Returns the pen used for drawing the shape's outline. - -\membersection{wxShape::GetPerimeterPoint} - -\func{bool}{GetPerimeterPoint}{\param{float}{ x1}, \param{float}{ y1}, \param{float}{ x2}, \param{float}{ y2}, \param{float *}{x3}, \param{float *}{y3}} - -Gets the point at which the line from (x1, y1) to (x2, y2) hits the object. Returns TRUE if the -line hits the perimeter. - -\membersection{wxShape::GetRegionId}\label{getregionid} - -\func{int}{GetRegionId}{\param{const wxString\& }{name}} - -Gets the region's identifier by name. This is {\it not} unique for within an entire composite, but -is unique for the image. - -\membersection{wxShape::GetRegionName}\label{getregionname} - -\func{wxString}{GetRegionName}{\param{int}{ regionId = 0}} - -Gets the region's name. A region's name can be used to uniquely determine a region within -an entire composite image hierarchy. See also \helpref{SetRegionName}{setregionname}. - -\membersection{wxShape::GetRegions}\label{getregions} - -\func{wxList\&}{GetRegions}{\void} - -Returns the list of wxShapeRegions. - -\membersection{wxShape::GetRotation} - -\func{float}{GetRotatation}{\void} - -Returns the angle of rotation in radians. - -\membersection{wxShape::GetSensitivityFilter} - -\func{void}{GetSensitivityFilter}{\void} - -Returns the sensitivity filter, a bitlist of values. See \helpref{SetSensitivityFilter}{setsensitivityfilter}. - -\membersection{wxShape::GetShadowMode} - -\func{int}{SetShadowMode}{\void} - -Returns the shadow mode. See \helpref{SetShadowMode}{setshadowmode}. - -\membersection{wxShape::GetSpaceAttachments} - -\func{bool}{GetSpaceAttachments}{\void} - -Indicates whether lines should be spaced out evenly at the point they touch the node (TRUE), or whether they -should join at a single point (FALSE). - -\membersection{wxShape::GetTextColour} - -\func{wxString}{GetTextColour}{\param{int}{ regionId = 0}} - -Gets the colour for the specified text region. - -\membersection{wxShape::GetTopAncestor} - -\func{wxShape *}{GetTopAncestor}{\void} - -Returns the top-most ancestor of this shape (the root of the composite). - -\membersection{wxShape::GetX} - -\func{float}{GetX}{\void} - -Gets the x position of the centre of the object. - -\membersection{wxShape::GetY} - -\func{float}{GetY}{\void} - -Gets the y position of the centre of the object. - -\membersection{wxShape::HitTest} - -\func{bool}{HitTest}{\param{float}{ x}, \param{float}{ y}, \param{int *}{attachment}, \param{float *}{distance}} - -Given a point on a canvas, returns TRUE if the point was on the object, and returns -the nearest attachment point and distance from the given point and target. - -\membersection{wxShape::Insert} - -\func{void}{InsertInCanvas}{\param{wxShapeCanvas *}{canvas}} - -Inserts the shape at the front of the object list of {\it canvas}. - -\membersection{wxShape::IsHighlighted} - -\func{bool}{IsHighlighted}{\void} - -Returns TRUE if the shape is highlighted. Shape highlighting is unimplemented. - -\membersection{wxShape::IsShown} - -\func{bool}{IsShown}{\void} - -Returns TRUE if the shape is in a visible state, FALSE otherwise. Note -that this has nothing to do with whether the window is hidden or the -shape has scrolled off the canvas; it refers to the internal -visibility flag. - -\membersection{wxShape::MakeControlPoints} - -\func{void}{MakeControlPoints}{\void} - -Make a list of control points (draggable handles) appropriate to the object. - -\membersection{wxShape::MakeMandatoryControlPoints} - -\func{void}{MakeMandatoryControlPoints}{\void} - -Make the mandatory control points. For example, the control point on a dividing line should -appear even if the divided rectangle shape's handles should not appear (because it is the child of -a composite, and children are not resizable). - -\membersection{wxShape::Move} - -\func{void}{Move}{\param{float}{ x1}, \param{float}{ y1}, \param{bool}{ display = TRUE}} - -Move the object to the given position, redrawing if {\it display} is TRUE. - -\membersection{wxShape::MoveLineToNewAttachment} - -\func{void}{MoveLineToNewAttachment}{\param{wxLineShape *}{toMove}, \param{float}{ x}, \param{float}{ y}} - -Move the given line (which must already be attached to the object) to -a different attachment point on the object. - -\membersection{wxShape::MoveLinks} - -\func{void}{MoveLinks}{\void} - -Redraw all the lines attached to the object. - -\membersection{wxShape::NameRegions} - -\func{void}{NameRegions}{\param{const wxString\& }{parentName = ``"}} - -Make unique names for all the regions in a shape or composite shape. - -\membersection{wxShape::NewCopy} - -\func{wxShape *}{NewCopy}{\void} - -Returns a new instance, and does the copy for this class. Should be -defined for each object class. - -\membersection{wxShape::PrivateCopy} - -\func{wxShape *}{PrivateCopy}{\void} - -Returns a new instance, and does the copy for this class. This member -should be define for each class. - -\membersection{wxShape::Rotate} - -\func{void}{Rotate}{\param{float }{x}, \param{float }{y}, \param{float }{theta}} - -Rotate about the given axis by the given amount in radians (does nothing -for most objects). But even non-rotating objects should record their -notional rotation in case it's important (e.g. in dog-leg code). - -\membersection{wxShape::ReadConstraints} - -\func{void}{ReadConstraints}{\param{PrologExpr *}{clause}, \param{PrologDatabase *}{database}} - -If the object is a composite, it may have constraints that need to be read in in a separate pass. - -\membersection{wxShape::ReadPrologAttributes} - -\func{void}{ReadPrologAttributes}{\param{PrologExpr *}{clause}} - -Reads the attributes (data member values) from the given expression. - -\membersection{wxShape::ReadRegions} - -\func{void}{ReadRegions}{\param{PrologExpr *}{clause}} - -Reads in the regions. - -\membersection{wxShape::Recentre} - -\func{void}{Recentre}{\void} - -Does recentring (or other formatting) for all the text regions for this object. - -\membersection{wxShape::RemoveFromCanvas} - -\func{void}{RemoveFromCanvas}{\param{wxShapeCanvas *}{canvas}} - -Removes the shape from the canvas. - -\membersection{wxShape::ResetControlPoints} - -\func{void}{ResetControlPoints}{\void} - -Resets the positions of the control points (for instance when the -object's shape has changed). - -\membersection{wxShape::ResetMandatoryControlPoints} - -\func{void}{ResetMandatoryControlPoints}{\void} - -Reset the mandatory control points. For example, the control point on a dividing line should -appear even if the divided rectangle shape's handles should not appear (because it is the child of -a composite, and children are not resizable). - -\membersection{wxShape::Recompute} - -\func{bool}{Recompute}{\void} - -Recomputes any constraints associated with the object (normally -applicable to wxCompositeShapes only, but harmless for other -classes of object). - -\membersection{wxShape::RemoveLine} - -\func{void}{RemoveLine}{\param{wxLineShape *}{line}} - -Removes the given line from the object's list of attached lines. - -\membersection{wxShape::Select} - -\func{void}{Select}{\param{bool}{ select = TRUE}} - -Selects or deselects the given object, drawing or erasing control points -(handles) as necessary. - -\membersection{wxShape::Selected} - -\func{bool}{Selected}{\void} - -TRUE if the object is currently selected. - -\membersection{wxShape::SetAttachmentMode}\label{setattachmentmode} - -\func{void}{SetAttachmentMode}{\param{bool}{ flag}} - -Sets the attachment mode to TRUE or FALSE. If TRUE, attachment points -will be significant when drawing lines to and from this object. -If FALSE, lines will be drawn as if to the centre of the object. - -\membersection{wxShape::SetBrush} - -\func{void}{SetBrush}{\param{wxBrush *}{brush}} - -Sets the brush for filling the object's shape. - -\membersection{wxShape::SetCanvas} - -\func{void}{SetCanvas}{\param{wxShapeCanvas *}{theCanvas}} - -Identical to Attach. - -\membersection{wxShape::SetCentreResize} - -\func{void}{SetCentreResize}{\param{bool}{ cr}} - -Specify whether the shape is to be resized from the centre (the centre stands still) or from the corner or side -being dragged (the other corner or side stands still). - -\membersection{wxShape::SetClientData} - -\func{void}{SetClientData}{\param{wxObject *}{clientData}} - -Sets the client data. - - -\membersection{wxShape::SetDC} - -\func{void}{SetDC}{\param{wxDC *}{dc}} - -Sets the device context associated with the object. This may temporarily be set -to (for example) a printer device context, so that the object will be printed -instead of drawn on a canvas. - -\membersection{wxShape::SetDefaultRegionSize}\label{setdefaultregionsize} - -\func{void}{SetDefaultRegionSize}{\void} - -Set the default region to be consistent with the shape size. - -\membersection{wxShape::SetDisableLabel} - -\func{void}{SetDisableLabel}{\param{bool}{ flag}} - -Set {\it flag} to TRUE to stop the default region being shown, FALSE otherwise. - -\membersection{wxShape::SetDraggable} - -\func{void}{SetDraggable}{\param{bool}{ drag}, \param{bool}{ recursive = FALSE}} - -Sets the object to be draggable or not draggable. - -\membersection{wxShape::SetDrawHandles} - -\func{void}{SetDrawHandles}{\param{bool}{ drawH}} - -Sets the {\it drawHandles} flag for this shape and all descendants. If {\it drawH} is TRUE (the default), -any handles (control points) will be drawn. Otherwise, the handles will not be drawn. - -\membersection{wxShape::SetEventHandler} - -\func{void}{GetEventHandler}{\param{wxShapeEvtHandler *}{handler}} - -Sets the event handler for this shape. - -\membersection{wxShape::SetFixedSize} - -\func{void}{SetFixedSize}{\param{bool}{ x}, \param{bool}{ y}} - -Sets the object to be of the given, fixed size. - -\membersection{wxShape::SetFont} - -\func{void}{SetFont}{\param{wxFont *}{font}, \param{int}{ regionId = 0}} - -Sets the font for the specified text region. - -\membersection{wxShape::SetFormatMode}\label{setformatmode} - -\func{void}{SetFormatMode}{\param{int}{ mode}, \param{int}{ regionId = 0}} - -Sets the format mode of the default text region. The argument can be a bit list -of the following: - -\begin{description}\itemsep=0pt -\item[FORMAT\_NONE] No formatting. -\item[FORMAT\_CENTRE\_HORIZ] Horizontal centring. -\item[FORMAT\_CENTRE\_VERT] Vertical centring. -\end{description} - -\membersection{wxShape::SetHighlight} - -\func{void}{SetHighlight}{\param{bool}{ hi}, \param{bool}{ recurse = FALSE}} - -Sets the highlight for a shape. Shape highlighting is unimplemented. - -\membersection{wxShape::SetId} - -\func{void}{SetId}{\param{long}{ id}} - -Set the integer identifier for this shape. - -\membersection{wxShape::SetPen} - -\func{void}{SetPen}{\param{wxPen *}{pen}} - -Sets the pen for drawing the object's outline. - -\membersection{wxShape::SetRegionName}\label{setregionname} - -\func{void}{SetRegionName}{\param{const wxString\& }{name}, \param{int}{ regionId = 0}} - -Sets the name for this region. The name for a region is unique within the scope of the whole -composite, whereas a region id is unique only for a single image. - -\membersection{wxShape::SetSensitivityFilter}\label{setsensitivityfilter} - -\func{void}{SetSensitivityFilter}{\param{int}{ sens=OP\_ALL}, \param{bool}{ recursive = FALSE}} - -Sets the object to be sensitive or insensitive to specific mouse operations. - -{\it sens} is a bitlist of the following: - -\begin{itemize}\itemsep=0pt -\item OP\_CLICK\_LEFT -\item OP\_CLICK\_RIGHT -\item OP\_DRAG\_LEFT -\item OP\_DRAG\_RIGHT -\item OP\_ALL (equivalent to a combination of all the above). -\end{itemize} - -\membersection{wxShape::SetShadowMode}\label{setshadowmode} - -\func{void}{SetShadowMode}{\param{int}{ mode}, \param{bool}{ redraw = FALSE}} - -Sets the shadow mode (whether a shadow is drawn or not). {\it mode} can be one of -the following: - -\begin{description}\itemsep=0pt -\item[SHADOW\_NONE] No shadow (the default). -\item[SHADOW\_LEFT] Shadow on the left side. -\item[SHADOW\_RIGHT] Shadow on the right side. -\end{description} - -\membersection{wxShape::SetSize} - -\func{void}{SetSize}{\param{float}{ x}, \param{float}{ y}, \param{bool}{ recursive = TRUE}} - -Sets the object's size. - -\membersection{wxShape::SetSpaceAttachments} - -\func{void}{SetSpaceAttachments}{\param{bool}{ sp}} - -Indicate whether lines should be spaced out evenly at the point they touch the node (TRUE), or whether they -should join at a single point (FALSE). - -\membersection{wxShape::SetTextColour} - -\func{void}{SetTextColour}{\param{const wxString\& }{colour}, \param{int}{ regionId = 0}} - -Sets the colour for the specified text region. - -\membersection{wxShape::SetX} - -\func{void}{SetX}{\param{float}{ x}} - -Sets the {\it x} position of the shape. - -\membersection{wxShape::SetX} - -\func{void}{SetY}{\param{float}{ y}} - -Sets the {\it y} position of the shape. - -\membersection{wxShape::SpaceAttachments} - -\func{void}{SpaceAttachments}{\param{bool}{ sp}} - -Sets the spacing mode: if TRUE, lines at the same attachment point will be -spaced evenly across that side of the object. If false, all lines at the -same attachment point will emanate from the same point. - -\membersection{wxShape::Show} - -\func{void}{Show}{\param{bool}{ show}} - -Sets a flag indicating whether the object should be drawn. - -\membersection{wxShape::Unlink} - -\func{void}{Unlink}{\void} - -If the shape is a line, unlinks the nodes attached to the object, removing itself from the list of -lines for each of the `to' and `from' nodes. - -\membersection{wxShape::WritePrologAttributes} - -\func{void}{WritePrologAttributes}{\param{PrologExpr *}{clause}} - -Writes the object's attributes (data member values) into the given expression. - -\membersection{wxShape::WriteRegions} - -\func{void}{WriteRegions}{\param{PrologExpr *}{clause}} - -Writes the regions. - - - -\section{\class{wxShapeCanvas}: wxCanvas}\label{wxshapecanvas} - -A canvas for drawing diagrams on. - -\membersection{wxShapeCanvas::wxShapeCanvas} - -\func{void}{wxShapeCanvas}{\void} - -Constructor. - -\membersection{wxShapeCanvas::\destruct{wxShapeCanvas}} - -\func{void}{\destruct{wxShapeCanvas}}{\void} - -Destructor. - -\membersection{wxShapeCanvas::AddShape} - -\func{void}{AddShape}{\param{wxShape *}{shape}, \param{wxShape *}{addAfter = NULL}} - -Adds a shape to the diagram. If {\it addAfter} is non-NULL, the shape will be added after this -one. - -\membersection{wxShapeCanvas::Clear} - -\func{void}{Clear}{\void} - -Clears the device context associated with the diagram. - -\membersection{wxShapeCanvas::DrawOutline} - -\func{void}{DrawOutline}{\param{float}{ x1}, \param{float}{ y1}, \param{float}{ x2}, \param{float}{ y2}} - -Draws an outline rectangle on the current device context. - -\membersection{wxShapeCanvas::FindShape} - -\func{wxShape *}{FindShape}{\param{float}{ x1}, \param{float}{ y}, \param{int *}{attachment}, \param{wxClassInfo *}{info = NULL}, - \param{wxShape *}{notImage = NULL}} - -Find a shape under this mouse click. Returns the shape (or NULL), and the nearest attachment point. - -If {\it info} is non-NULL, a shape whose class which is a descendant of the desired class is found. - -If {\it notImage} is non-NULL, shapes which are descendants of {\it notImage} are ignored. - -\membersection{wxShapeCanvas::FindFirstSensitiveShape} - -\func{wxShape *}{FindFirstSensitiveShape}{\param{float}{ x1}, \param{float}{ y}, \param{int *}{attachment}, \param{int}{ op}} - -Finds the first sensitive shape whose sensitivity filter matches {\it op}, working up the hierarchy of composites until -one (or none) is found. - -\membersection{wxShapeCanvas::GetCanvas} - -\func{wxCanvas *}{GetCanvas}{\void} - -Returns the canvas associated with this diagram. - -\membersection{wxShapeCanvas::GetDC} - -\func{wxDC *}{GetDC}{\void} - -Returns the device context associated with this diagram. - -\membersection{wxShapeCanvas::GetGridSpacing} - -\func{float}{GetGridSpacing}{\void} - -Returns the grid spacing. - -\membersection{wxShapeCanvas::GetMouseTolerance} - -\func{int}{GetMouseTolerance}{\void} - -Returns the tolerance within which a mouse move is ignored. - -\membersection{wxShapeCanvas::GetShapeList} - -\func{wxList *}{GetShapeList}{\void} - -Returns a pointer to the internal shape list. - -\membersection{wxShapeCanvas::GetQuickEditMode} - -\func{bool}{GetQuickEditMode}{\void} - -Returns quick edit mode for the associated diagram. - -\membersection{wxShapeCanvas::InsertShape} - -\func{void}{InsertShape}{\param{wxShape *}{shape}} - -Inserts a shape at the front of the shape list. - -\membersection{wxShapeCanvas::OnBeginDragLeft}\label{onbegindragleft} - -\func{void}{OnBeginDragLeft}{\param{float}{ x}, \param{float}{ y}, \param{int}{ keys = 0}} - -Called when the start of a left-button drag event on the canvas background is detected by OnEvent. You may override this member; -by default it does nothing. - -{\it keys} is a bit list of the following: - -\begin{itemize}\itemsep=0pt -\item KEY\_SHIFT -\item KEY\_CTRL -\end{itemize} - -See also \helpref{OnDragLeft}{ondragleft}, \helpref{OnEndDragLeft}{onenddragleft}. - -\membersection{wxShapeCanvas::OnBeginDragRight}\label{onbegindragright} - -\func{void}{OnBeginDragRight}{\param{float}{ x}, \param{float}{ y}, \param{int}{ keys = 0}} - -Called when the start of a right-button drag event on the canvas background is detected by OnEvent. You may override this member; -by default it does nothing. - -{\it keys} is a bit list of the following: - -\begin{itemize}\itemsep=0pt -\item KEY\_SHIFT -\item KEY\_CTRL -\end{itemize} - -See also \helpref{OnDragRight}{ondragright}, \helpref{OnEndDragRight}{onenddragright}. - -\membersection{wxShapeCanvas::OnEndDragLeft}\label{onenddragleft} - -\func{void}{OnEndDragLeft}{\param{float}{ x}, \param{float}{ y}, \param{int}{ keys = 0}} - -Called when the end of a left-button drag event on the canvas background is detected by OnEvent. You may override this member; -by default it does nothing. - -{\it keys} is a bit list of the following: - -\begin{itemize}\itemsep=0pt -\item KEY\_SHIFT -\item KEY\_CTRL -\end{itemize} - -See also \helpref{OnDragLeft}{ondragleft}, \helpref{OnBeginDragLeft}{onbegindragleft}. - -\membersection{wxShapeCanvas::OnEndDragRight}\label{onenddragright} - -\func{void}{OnEndDragRight}{\param{float}{ x}, \param{float}{ y}, \param{int}{ keys = 0}} - -Called when the end of a right-button drag event on the canvas background is detected by OnEvent. You may override this member; -by default it does nothing. - -{\it keys} is a bit list of the following: - -\begin{itemize}\itemsep=0pt -\item KEY\_SHIFT -\item KEY\_CTRL -\end{itemize} - -See also \helpref{OnDragRight}{ondragright}, \helpref{OnBeginDragRight}{onbegindragright}. - -\membersection{wxShapeCanvas::OnDragLeft}\label{ondragleft} - -\func{void}{OnDragLeft}{\param{bool}{ draw}, \param{float}{ x}, \param{float}{ y}, \param{int}{ keys = 0}} - -Called when a left-button drag event on the canvas background is detected by OnEvent. You may override this member; -by default it does nothing. - -{\it draw} is alternately TRUE and FALSE, to assist drawing and erasing. - -{\it keys} is a bit list of the following: - -\begin{itemize}\itemsep=0pt -\item KEY\_SHIFT -\item KEY\_CTRL -\end{itemize} - -See also \helpref{OnBeginDragLeft}{onbegindragleft}, \helpref{OnEndDragLeft}{onenddragleft}. - -\membersection{wxShapeCanvas::OnDragRight}\label{ondragright} - -\func{void}{OnDragRight}{\param{bool}{ draw}, \param{float}{ x}, \param{float}{ y}, \param{int}{ keys = 0}} - -Called when a right-button drag event on the canvas background is detected by OnEvent. You may override this member; -by default it does nothing. - -{\it draw} is alternately TRUE and FALSE, to assist drawing and erasing. - -{\it keys} is a bit list of the following: - -\begin{itemize}\itemsep=0pt -\item KEY\_SHIFT -\item KEY\_CTRL -\end{itemize} - -See also \helpref{OnBeginDragRight}{onbegindragright}, \helpref{OnEndDragRight}{onenddragright}. - -\membersection{wxShapeCanvas::OnLeftClick}\label{onleftclick} - -\func{void}{OnLeftClick}{\param{float}{ x}, \param{float}{ y}, \param{int}{ keys = 0}} - -Called when a left click event on the canvas background is detected by OnEvent. You may override this member; -by default it does nothing. - -{\it keys} is a bit list of the following: - -\begin{itemize}\itemsep=0pt -\item KEY\_SHIFT -\item KEY\_CTRL -\end{itemize} - -\membersection{wxShapeCanvas::OnRightClick}\label{onrightclick} - -\func{void}{OnRightClick}{\param{float}{ x}, \param{float}{ y}, \param{int}{ keys = 0}} - -Called when a right click event on the canvas background is detected by OnEvent. You may override this member; -by default it does nothing. - -{\it keys} is a bit list of the following: - -\begin{itemize}\itemsep=0pt -\item KEY\_SHIFT -\item KEY\_CTRL -\end{itemize} - -\membersection{wxShapeCanvas::Redraw} - -\func{void}{Redraw}{\void} - -Calls wxDiagram::Redraw. - -\membersection{wxShapeCanvas::RemoveShape} - -\func{void}{RemoveShape}{\param{wxShape *}{shape}} - -Calls wxDiagram::RemoveShape. - -\membersection{wxShapeCanvas::SetDiagram} - -\func{void}{SetDiagram}{\param{wxDiagram *}{diagram}} - -Sets the diagram associated with this diagram. - -\membersection{wxShapeCanvas::Snap} - -\func{void}{Snap}{\param{float *}{x}, \param{float *}{y}} - -Calls wxDiagram::Snap. - - - -\section{\class{wxShapeEvtHandler}: wxObject}\label{wxshapeevthandler} - -wxShapeEvtHandler is a class from which wxShape (and therefore all shape classes) are derived. -A wxShape also contains a pointer to its current wxShapeEvtHandler. Event handlers -can be swapped in and out, altering the behaviour of a shape. This allows, for example, -a range of behaviours to be redefined in one class, rather than requiring -each shape class to be subclassed. - -\membersection{wxShapeEvtHandler::handlerShape} - -\member{wxShape *}{handlerShape} - -Pointer to the shape associated with this handler. - -\membersection{wxShapeEvtHandler::previousHandler} - -\member{wxShapeEvtHandler *}{previousHandler} - -Pointer to the previous handler. - -\membersection{wxShapeEvtHandler::wxShapeEvtHandler} - -\func{void}{wxShapeEvtHandler}{\param{wxShapeEvtHandler *}{previous = NULL}, \param{wxShape *}{shape = NULL}} - -Constructs a new event handler. - -\membersection{wxShapeEvtHandler::\destruct{wxShapeEvtHandler}} - -\func{void}{\destruct{wxShapeEvtHandler}}{\void} - -Destructor. - -\membersection{wxShapeEvtHandler::GetShape} - -\func{void}{GetShape}{\void} - -Returns the shape associated with this handler. - -\membersection{wxShapeEvtHandler::OnBeginDragLeft} - -\func{void}{OnBeginDragLeft}{\param{float}{ x}, \param{float}{ y}, \param{int}{ keys=0}, \param{int}{ attachment = 0}} - -Called when the user is beginning to drag using the left mouse button. - -\membersection{wxShapeEvtHandler::OnBeginDragRight} - -\func{void}{OnBeginDragRight}{\param{float}{ x}, \param{float}{ y}, \param{int}{ keys=0}, \param{int}{ attachment = 0}} - -Called when the user is beginning to drag using the right mouse button. - -\membersection{wxShapeEvtHandler::OnBeginSize} - -\func{void}{OnBeginSize}{\param{float}{ width}, \param{float}{ height}} - -Called when a shape starts to be resized. - -\membersection{wxShapeEvtHandler::OnDragLeft} - -\func{void}{OnDragLeft}{\param{bool}{ draw}, \param{float}{ x}, \param{float}{ y}, \param{int}{ keys=0}, \param{int}{ attachment = 0}} - -Called twice when the object is being dragged, once to allow erasing the old -image, and again to allow drawing at the new position. - -\membersection{wxShapeEvtHandler::OnDragRight} - -\func{void}{OnDragRight}{\param{bool}{ draw}, \param{float}{ x}, \param{float}{ y}, \param{int}{ keys=0}, \param{int}{ attachment = 0}} - -Called twice when the object is being dragged, once to allow erasing the old -image, and again to allow drawing at the new position. - -\membersection{wxShapeEvtHandler::OnDraw} - -\func{void}{OnDraw}{\void} - -Defined for each class to draw the main graphic, but -not the contents. - -\membersection{wxShapeEvtHandler::OnDrawContents} - -\func{void}{OnDrawContents}{\void} - -Defined for each class to draw the contents of the -object, such as text. - -\membersection{wxShapeEvtHandler::OnDrawControlPoints} - -\func{void}{OnDrawControlPoints}{\void} - -Called when the object's control points (handles) should -be drawn. - -\membersection{wxShapeEvtHandler::OnDrawOutline} - -\func{void}{OnDrawOutline}{\void} - -Called when the outline of the object should be drawn. - -\membersection{wxShapeEvtHandler::OnEndDragLeft} - -\func{void}{OnEndDragLeft}{\param{float}{ x}, \param{float}{ y}, \param{int}{ keys=0}, \param{int}{ attachment = 0}} - -Called when the user is stopping dragging using the left mouse button. - -\membersection{wxShapeEvtHandler::OnEndDragRight} - -\func{void}{OnEndDragRight}{\param{float}{ x}, \param{float}{ y}, \param{int}{ keys=0}, \param{int}{ attachment = 0}} - -Called when the user is stopping dragging using the right mouse button. - -\membersection{wxShapeEvtHandler::OnEndSize} - -\func{void}{OnEndSize}{\param{float}{ width}, \param{float}{ height}} - -Called after a shape is resized. - -\membersection{wxShapeEvtHandler::OnErase} - -\func{void}{OnErase}{\void} - -Called when the whole object should be erased. - -\membersection{wxShapeEvtHandler::OnEraseContents} - -\func{void}{OnEraseContents}{\void} - -Called when the contents should be erased. - -\membersection{wxShapeEvtHandler::OnEraseControlPoints} - -\func{void}{OnEraseControlPoints}{\void} - -Called when the object's control points (handles) should -be erased. - -\membersection{wxShapeEvtHandler::OnHighlight} - -\func{void}{OnHighlight}{\void} - -Called when the object should be highlighted. - -\membersection{wxShapeEvtHandler::OnLeftClick} - -\func{void}{OnLeftClick}{\param{float}{ x}, \param{float}{ y}, \param{int}{ keys =0}, \param{int}{ attachment = 0}} - -Called when the object receives a left mouse click event. - -\membersection{wxShapeEvtHandler::OnMove} - -\func{void}{OnMove}{\param{float}{ x}, \param{float}{ y}, \param{float}{ oldX}, \param{float}{ oldY}, \param{bool}{ display = TRUE}} - -Called when the object receives a move request. - -\membersection{wxShapeEvtHandler::OnMoveLink} - -\func{void}{OnMoveLink}{\param{bool}{ moveControlPoints=TRUE}} - -Called when the line attached to an object need to be repositioned, -because the object has moved. - -\membersection{wxShapeEvtHandler::OnMoveLinks} - -\func{void}{OnMoveLinks}{\void} - -Called when the lines attached to an object need to be repositioned, -because the object has moved. - -\membersection{wxShapeEvtHandler::OnMovePre} - -\func{bool}{OnMovePre}{\param{float}{ x}, \param{float}{ y}, \param{float}{ oldX}, \param{float}{ oldY}, \param{bool}{ display = TRUE}} - -Called just after the object receives a move request. - -\membersection{wxShapeEvtHandler::OnMovePre} - -\func{bool}{OnMovePre}{\param{float}{ x}, \param{float}{ y}, \param{float}{ oldX}, \param{float}{ oldY}, \param{bool}{ display = TRUE}} - -Called just before the object receives a move request. Returning TRUE -allows the move to be processed; returning FALSE vetoes the move. - -\membersection{wxShapeEvtHandler::OnRightClick} - -\func{void}{OnRightClick}{\param{float}{ x}, \param{float}{ y}, \param{int}{ keys = 0}, \param{int}{ attachment = 0}} - -Called when the object receives a mouse mouse click event. - -\membersection{wxShapeEvtHandler::OnSize} - -\func{void}{OnSize}{\param{float}{ x}, \param{float}{ y}} - -Called when the object receives a resize request. - - - -\section{\class{wxTextShape}: wxRectangleShape}\label{wxtextshape} - -As wxRectangleShape, but only the text is displayed. - -See also \helpref{wxRectangleShape}{wxrectangleshape}. - -\membersection{wxTextShape::wxTextShape} - -\func{void}{wxTextShape}{\param{float}{ width = 0.0}, \param{float}{ height = 0.0}} - -Constructor. - -\membersection{wxTextShape::\destruct{wxTextShape}} - -\func{void}{\destruct{wxTextShape}}{\void} - -Destructor. - -\section{Functions}\label{functions} - -These are the OGL functions. - -\membersection{::wxOGLInitialize} - -\func{void}{wxOGLInitialize}{\param{wxHelpInstance *}{helpInstance = NULL}, \param{const wxString\& }{helpFile = NULL}, - \param{wxFont *}{buttonFont = NULL}, \param{wxFont *}{labelFont = NULL}} - -Initializes OGL. The optional parameters tell OGL what to use for on-line help and font sizes. - -\membersection{::wxOGLCleanUp} - -\func{void}{wxOGLCleanUp}{\void} - -Cleans up OGL. diff --git a/utils/ogl/docs/contents.gif b/utils/ogl/docs/contents.gif deleted file mode 100644 index 3dddfa3dd5..0000000000 Binary files a/utils/ogl/docs/contents.gif and /dev/null differ diff --git a/utils/ogl/docs/forward.gif b/utils/ogl/docs/forward.gif deleted file mode 100644 index 9c81e8c92f..0000000000 Binary files a/utils/ogl/docs/forward.gif and /dev/null differ diff --git a/utils/ogl/docs/intro.tex b/utils/ogl/docs/intro.tex deleted file mode 100644 index 96c33653ef..0000000000 --- a/utils/ogl/docs/intro.tex +++ /dev/null @@ -1,45 +0,0 @@ -\chapter{Introduction} -\pagenumbering{arabic}% -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage} - -Object Graphics Library (\ogl) is a C++ library supporting the creation and -manipulation of simple and complex graphic images on a canvas. - -It can be found in the directory {\tt utils/ogl/src} in the -wxWindows distribution. The file {\tt ogl.h} must be included to make use -of the library. - -Please see \helpref{OGL overview}{ogloverview} for a general description how the object library works. For details, -please see the \helpref{class reference}{classref}. - -\section{File structure} - -These are the files that comprise the \ogl\ library. - -\begin{description}\itemsep=0pt -\item[basic.h] Header for basic objects such as wxShape and wxRectangleShape. -\item[basic.cpp] Basic objects implementation (1). -\item[basic2.cpp] Basic objects implementation (2). -\item[bitmap.cpp] wxBitmapShape class header. -\item[bitmap.cpp] wxBitmapShape implementation. -\item[canvas.h] wxShapeCanvas class header. -\item[canvas.cpp] wxShapeCanvas class implementation. -\item[composit.h] Composite object class header. -\item[composit.cpp] Composite object class implementation. -\item[constrnt.h] Constraint classes header. -\item[constrnt.cpp] Constraint classes implementation. -\item[divided.h] Divided object class header. -\item[divided.cpp] Divided object class implementation. -\item[drawn.h] Drawn (metafile) object class header. -\item[drawn.cpp] Drawn (metafile) object class implementation. -\item[graphics.h] Main include file. -\item[lines.h] wxLineShape class header. -\item[lines.cpp] wxLineShape class implementation. -\item[misc.h] Miscellaneous graphics functions header. -\item[misc.cpp] Miscellaneous graphics functions implementation. -\item[ogldiag.h] wxDiagram class header. -\item[ogldiag.cpp] wxDiagram implementation. -\end{description} - - diff --git a/utils/ogl/docs/ogl.hpj b/utils/ogl/docs/ogl.hpj deleted file mode 100644 index 7f8c9efa46..0000000000 --- a/utils/ogl/docs/ogl.hpj +++ /dev/null @@ -1,17 +0,0 @@ -[OPTIONS] -BMROOT=d:\wx2\wxwind~1\utils\ogl\docs ; Assume that bitmaps are where the source is -TITLE=OGL Manual -CONTENTS=Contents -COMPRESS=HIGH - -[FILES] -ogl.rtf - -[CONFIG] -CreateButton("Up", "&Up", "JumpId(`ogl.hlp', `Contents')") -BrowseButtons() - -[MAP] - -[BITMAPS] - diff --git a/utils/ogl/docs/ogl.tex b/utils/ogl/docs/ogl.tex deleted file mode 100644 index 6408591627..0000000000 --- a/utils/ogl/docs/ogl.tex +++ /dev/null @@ -1,38 +0,0 @@ -\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report} -\newcommand{\ogl}[0]{{OGL}} -\input psbox.tex -\parindent 0pt -\parskip 11pt -\title{Manual for Object Graphics Library 3.0} -\author{Julian Smart} -\date{July 1998} - -\makeindex -\begin{document} -\maketitle - -\pagestyle{fancyplain} -\bibliographystyle{plain} -\pagenumbering{roman} -\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}} -\setfooter{\thepage}{}{}{}{}{\thepage} -\tableofcontents% - -\input{intro.tex} -% -\input{sample.tex} -% -\input{classes.tex} -% -\input{topics.tex} -% -\input{bugs.tex} -% -\input{changes.tex} - -% -\addcontentsline{toc}{chapter}{Index} -\setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}} -\setfooter{\thepage}{}{}{}{}{\thepage}% -\printindex -\end{document} diff --git a/utils/ogl/docs/ogledit.bmp b/utils/ogl/docs/ogledit.bmp deleted file mode 100644 index e7cf417cf5..0000000000 Binary files a/utils/ogl/docs/ogledit.bmp and /dev/null differ diff --git a/utils/ogl/docs/ogledit.gif b/utils/ogl/docs/ogledit.gif deleted file mode 100644 index 9784681b2d..0000000000 Binary files a/utils/ogl/docs/ogledit.gif and /dev/null differ diff --git a/utils/ogl/docs/sample.tex b/utils/ogl/docs/sample.tex deleted file mode 100644 index ca69297758..0000000000 --- a/utils/ogl/docs/sample.tex +++ /dev/null @@ -1,128 +0,0 @@ -\chapter{OGLEdit: a sample OGL application}\label{ogledit}% -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage} - -OGLEdit is a sample OGL application that allows the user to draw, edit, -save and load a few shapes. It should clarify aspects of OGL usage, and -can act as a template for similar applications. OGLEdit can be found in\rtfsp -{\tt samples/ogledit} in the OGL distribution. - -$$\image{10cm;0cm}{ogledit.eps}$$\par - -The wxWindows document/view model has been used in OGL, to reduce the amount of -housekeeping logic required to get it up and running. OGLEdit also provides -a demonstration of the Undo/Redo capability supported by the document/view classes, -and how a typical application might implement this feature. - -{\it Note:} A bug in the wxWindows document/view implementation before -version 1.66C may cause Do/Undo to misbehave and get out of sync. If this is the case, -please replace wxCommandProcessor::Submit with the following in wx\_doc.cpp. - -{\small -\begin{verbatim} - Bool wxCommandProcessor::Submit(wxCommand *command, Bool storeIt) - { - Bool success = command->Do(); - if (success && storeIt) - { - if (commands.Number() == maxNoCommands) - { - wxNode *firstNode = commands.First(); - wxCommand *firstCommand = (wxCommand *)firstNode->Data(); - delete firstCommand; - delete firstNode; - } - - // Correct a bug: we must chop off the current 'branch' - // so that we're at the end of the command list. - if (currentCommand) - { - wxNode *node = currentCommand->Next(); - while (node) - { - wxNode *next = node->Next(); - delete node; - node = next; - } - } - - commands.Append(command); - currentCommand = commands.Last(); - SetMenuStrings(); - } - return success; - } -\end{verbatim} -} - -\section{OGLEdit files} - -OGLEdit comprises the following source files. - -\begin{itemize}\itemsep=0pt -\item doc.h, doc.cpp: MyDiagram, DiagramDocument, DiagramCommand, MyEvtHandler -classes related to diagram functionality and documents. -\item view.h, view.cpp: MyCanvas, DiagramView classes related to visualisation of -the diagram. -\item ogledit.h, ogledit.cpp: MyFrame, MyApp classes related to the overall application. -\item palette.h, palette.cpp: EditorToolPalette implementing the shape palette. -\end{itemize} - -\section{How OGLEdit works} - -OGLEdit defines a DiagramDocument class, each of instance of which holds a MyDiagram -member which itself contains the shapes. - -In order to implement specific mouse behaviour for shapes, a class MyEvtHandler is -defined which is `plugged into' each shape when it is created, instead of overriding each shape class -individually. This event handler class also holds a label string. - -The DiagramCommand class is the key to implementing Undo/Redo. Each instance of DiagramCommand -stores enough information about an operation (create, delete, change colour etc.) to allow -it to carry out (or undo) its command. In DiagramView::OnMenuCommand, when the user initiates the -command, a new DiagramCommand instance is created which is then sent to the document's -command processor (see wxWindows manual for more information about doc/view and command -processing). - -Apart from menu commands, another way commands are initiated is by the user left-clicking on -the canvas or right-dragging on a node. MyCanvas::OnLeftClick in view.cpp shows how -the appropriate wxClassInfo is passed to a DiagramCommand, to allow DiagramCommand::Do -to create a new shape given the wxClassInfo. - -The MyEvtHandler right-drag methods in doc.cpp implement drawing a line between -two shapes, detecting where the right mouse button was released and looking for a second -shape. Again, a new DiagramCommand instance is created and passed to the command -processor to carry out the command. - -DiagramCommand::Do and DiagramCommand::Undo embody much of the -interesting interaction with the OGL library. A complication of note -when implementing undo is the problem of deleting a node shape which has -one or more arcs attached to it. If you delete the node, the arc(s) -should be deleted too. But multiple arc deletion represents more information -that can be incorporated in the existing DiagramCommand scheme. OGLEdit -copes with this by treating each arc deletion as a separate command, and -sending Cut commands recursively, providing an undo path. Undoing such a -Cut will only undo one command at a time - not a one to one -correspondence with the original command - but it's a reasonable -compromise and preserves Do/Undo whilst keeping our DiagramCommand class -simple. - -\section{Possible enhancements} - -OGLEdit is very simplistic and does not employ the more advanced features -of OGL, such as: - -\begin{itemize}\itemsep=0pt -\item attachment points (arcs are drawn to particular points on a shape) -\item metafile and bitmaps shapes -\item divided rectangles -\item composite shapes, and constraints -\item creating labels in shape regions -\item arc labels (OGL has support for three movable labels per arc) -\item spline and multiple-segment line arcs -\item adding annotations to node and arc shapes -\item line-straightening (supported by OGL) and alignment (not supported directly by OGL) -\end{itemize} - -These could be added to OGLEdit, at the risk of making it a less -useful example for beginners. diff --git a/utils/ogl/docs/tex2rtf.ini b/utils/ogl/docs/tex2rtf.ini deleted file mode 100644 index f69000ef11..0000000000 --- a/utils/ogl/docs/tex2rtf.ini +++ /dev/null @@ -1,20 +0,0 @@ -runTwice = yes -titleFontSize = 12 -authorFontSize = 10 -chapterFontSize = 12 -sectionFontSize = 12 -subsectionFontSize = 12 -headerRule = yes -footerRule = yes -useHeadingStyles = yes -listItemIndent=40 -generateHPJ = no -htmlBrowseButtons = bitmap -winHelpVersion = 3 -winHelpContents = yes -winHelpTitle = "OGL Manual" -truncateFilenames = yes -combineSubSections = yes -\overview [2] {\rtfonly{See also }\sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}} -\htmlonly{\image{}{books.gif}}\helpref{#1}{#2} -\sethotspotcolour{on}\sethotspotunderline{on}} diff --git a/utils/ogl/docs/topics.tex b/utils/ogl/docs/topics.tex deleted file mode 100644 index 7f126e9bb1..0000000000 --- a/utils/ogl/docs/topics.tex +++ /dev/null @@ -1,163 +0,0 @@ -\chapter{Topic overviews} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage} - -The following sections describe particular topics. - -\section{OGL overview}\label{ogloverview} - -\helpref{wxShapeCanvas}{wxshapecanvas}, derived from {\bf wxCanvas}, is the drawing area -for a number of \helpref{wxShape}{wxshape} instances. Everything drawn on a -wxShapeCanvas is derived from wxShape, which provides virtual -member functions for redrawing, creating and destroying -resize/selection `handles', movement and erasing behaviour, mouse -click behaviour, calculating the bounding box of the shape, linking -nodes with arcs, and so on. - -The way a client application copes with `damage' to the canvas is to -erase (white out) anything should no longer be displayed, redraw the shape, -and then redraw everything on the canvas to repair any damage. If quick edit -mode is on for the canvas, the complete should be omitted by OGL and the -application. - -Selection handles (called control points in the code) are implemented as -wxRectangleShapes. - -Events are passed to shapes by the canvas in a high-level form, for example {\bf OnLeftClick}, -{\bf OnBeginDragLeft}, {\bf OnDragLeft}, {\bf OnEndDragLeft}. The canvas decides -what is a click and what is a drag, whether it is on a shape or the canvas itself, -and (by interrogating the shape) which attachment point the click is associated with. - -In order to provide event-handling flexibility, each shapes has an `event handler' associated with it, -which by default is the shape itself (all shapes derive from wxShapeEvtHandler). -An application can modify the event-handling behaviour simply by plugging a new -event handler into the shape. This can avoid the need for multiple inheritance when -new properties and behaviour are required for a number of different shape classes: instead -of overriding each class, one new event handler class can be defined and used for all -existing shape classes. - -A range of shapes have been predefined in the library, including rectangles, ellipses, -polygons. A client application can derive from these shapes and/or derive entirely -new shapes from wxShape. - -Instances of a class called \helpref{wxDiagram}{wxdiagram} organise collections of -shapes, providing default file input and output behaviour. - - -\section{wxDividedShape overview}\label{dividedshapeoverview} - -Classes: \helpref{wxDividedShape}{wxdividedshape} - -A wxDividedShape is a rectangle with a number of vertical divisions. Each -division may have its text formatted with independent characteristics, and -the size of each division relative to the whole image may be specified. - -Once a wxDividedShape has been created, the user may move the divisions with the -mouse. By pressing Ctrl while right-clicking, the region attributes can be edited. - -Here are examples of creating wxDividedShape objects: - -{\small -\begin{verbatim} - /* - * Divided rectangle with 3 regions - * - */ - - wxDividedShape *dividedRect = new wxDividedShape(50, 60); - - wxShapeRegion *region = new wxShapeRegion; - region->SetProportions(0.0, 0.25); - dividedRect->AddRegion(region); - - region = new wxShapeRegion; - region->SetProportions(0.0, 0.5); - dividedRect->AddRegion(region); - - region = new wxShapeRegion; - region->SetProportions(0.0, 0.25); - dividedRect->AddRegion(region); - - dividedRect->SetSize(50, 60); // Allow it to calculate region sizes - dividedRect->SetPen(wxBLACK_PEN); - dividedRect->SetBrush(wxWHITE_BRUSH); - dividedRect->Show(TRUE); - dividedRect->NameRegions(); - - /* - * Divided rectangle with 3 regions, rounded - * - */ - - wxDividedShape *dividedRect3 = new wxDividedShape(50, 60); - dividedRect3->SetCornerRadius(-0.4); - - region = new wxShapeRegion; - region->SetProportions(0.0, 0.25); - dividedRect3->AddRegion(region); - - region = new wxShapeRegion; - region->SetProportions(0.0, 0.5); - dividedRect3->AddRegion(region); - - region = new wxShapeRegion; - region->SetProportions(0.0, 0.25); - dividedRect3->AddRegion(region); - - dividedRect3->SetSize(50, 60); // Allow it to calculate region sizes - dividedRect3->SetPen(wxBLACK_PEN); - dividedRect3->SetBrush(wxWHITE_BRUSH); - dividedRect3->Show(TRUE); - dividedRect3->NameRegions(); -\end{verbatim} -} - - -\section{wxCompositeShape overview}\label{compositeshapeoverview} - -Classes: \helpref{wxCompositeShape}{wxcompositeshape}, \helpref{OGLConstraint}{oglconstraint} - -The wxCompositeShape allows fairly complex shapes to be created, and maintains -a set of constraints which specify the layout and proportions of child shapes. - -Add child shapes to a wxCompositeShape using \helpref{AddChild}{wxcompositeshapeaddchild}, and -add constraints using \helpref{AddConstraint}{wxcompositeshapeaddconstraint}. - -After children and shapes have been added, call \helpref{Recompute}{wxcompositeshaperecompute} which -will return TRUE is the constraints could be satisfied, FALSE otherwise. If -constraints have been correctly and consistently specified, this call will succeed. - -If there is more than one child, constraints must be specified: OGL cannot calculate -the size and position of children otherwise. Don't assume that children will simply -move relative to the parent without the use of constraints. - -To specify a constraint, you need three things: - -\begin{enumerate}\itemsep=0pt -\item a constraint type, such as gyCONSTRAINT\_CENTRED\_VERTICALLY; -\item a reference shape, with respect to which other shapes are going to be positioned - the\rtfsp -{\it constraining} shape; -\item a list of one or more shapes to be constrained: the {\it constrained} shapes. -\end{enumerate} - -The constraining shape can be either the parent of the constrained shapes, or a sibling. The -constrained shapes must all be siblings of each other. - -For an exhaustive list and description of the available constraint types, see the \helpref{OGLConstraint constructor}{oglconstraintconstr}. -Note that most constraints operate in one dimension only (vertically or horizontally), so you will -usually need to specify constraints in pairs. - -You can set the spacing between constraining and constrained shapes by -calling \helpref{OGLConstraint::SetSpacing}{oglconstraintsetspacing}. - -Finally, a wxCompositeShape can have {\it divisions}, which are special child shapes of class -wxDivisionShape (not to be confused with wxDividedShape). The purpose of this is to allow -the composite to be divided into user-adjustable regions (divisions) into which other shapes -can be dropped dynamically, given suitable application code. Divisons allow the child -shapes to have an identity of their own - they can be manipulated independently of their container - -but to behave as if they are contained with the division, moving with the parent shape. -Divisions boundaries can themselves be moved using the mouse. - -To create an initial division, call \helpref{wxCompositeShape::MakeContainer}{wxcompositeshapemakecontainer}. -Make further divisions by calling \helpref{wxDivisionShape::Divide}{wxdivisionshapedivide}. - diff --git a/utils/ogl/docs/up.gif b/utils/ogl/docs/up.gif deleted file mode 100644 index 316d0d2a14..0000000000 Binary files a/utils/ogl/docs/up.gif and /dev/null differ diff --git a/utils/ogl/samples/ogledit/bitmaps/arrow.bmp b/utils/ogl/samples/ogledit/bitmaps/arrow.bmp deleted file mode 100644 index d406ceb64f..0000000000 Binary files a/utils/ogl/samples/ogledit/bitmaps/arrow.bmp and /dev/null differ diff --git a/utils/ogl/samples/ogledit/bitmaps/tool1.bmp b/utils/ogl/samples/ogledit/bitmaps/tool1.bmp deleted file mode 100644 index cb1760d285..0000000000 Binary files a/utils/ogl/samples/ogledit/bitmaps/tool1.bmp and /dev/null differ diff --git a/utils/ogl/samples/ogledit/bitmaps/tool2.bmp b/utils/ogl/samples/ogledit/bitmaps/tool2.bmp deleted file mode 100644 index a18faccff7..0000000000 Binary files a/utils/ogl/samples/ogledit/bitmaps/tool2.bmp and /dev/null differ diff --git a/utils/ogl/samples/ogledit/bitmaps/tool3.bmp b/utils/ogl/samples/ogledit/bitmaps/tool3.bmp deleted file mode 100644 index 6a49f459c3..0000000000 Binary files a/utils/ogl/samples/ogledit/bitmaps/tool3.bmp and /dev/null differ diff --git a/utils/ogl/samples/ogledit/bitmaps/tool4.bmp b/utils/ogl/samples/ogledit/bitmaps/tool4.bmp deleted file mode 100644 index 95c2061a90..0000000000 Binary files a/utils/ogl/samples/ogledit/bitmaps/tool4.bmp and /dev/null differ diff --git a/utils/ogl/samples/ogledit/doc.cpp b/utils/ogl/samples/ogledit/doc.cpp deleted file mode 100644 index 484442a349..0000000000 --- a/utils/ogl/samples/ogledit/doc.cpp +++ /dev/null @@ -1,570 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: doc.cpp -// Purpose: Implements document functionality in OGLEdit -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma implementation -#endif - -// For compilers that support precompilation, includes "wx.h". -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#if !USE_DOC_VIEW_ARCHITECTURE -#error You must set USE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h! -#endif - -#include "ogledit.h" -#include "doc.h" -#include -#include "view.h" - -IMPLEMENT_DYNAMIC_CLASS(DiagramDocument, wxDocument) - -DiagramDocument::DiagramDocument(void) -{ -} - -DiagramDocument::~DiagramDocument(void) -{ -} - -bool DiagramDocument::OnCloseDocument(void) -{ - diagram.DeleteAllShapes(); - return TRUE; -} - -ostream& DiagramDocument::SaveObject(ostream& stream) -{ - wxDocument::SaveObject(stream); - - char buf[400]; - (void) wxGetTempFileName("diag", buf); - - diagram.SaveFile(buf); - wxTransferFileToStream(buf, stream); - - wxRemoveFile(buf); - - return stream; -} - -istream& DiagramDocument::LoadObject(istream& stream) -{ - wxDocument::LoadObject(stream); - - char buf[400]; - (void) wxGetTempFileName("diag", buf); - - wxTransferStreamToFile(stream, buf); - - diagram.DeleteAllShapes(); - diagram.LoadFile(buf); - wxRemoveFile(buf); - - return stream; -} - -/* - * Implementation of drawing command - */ - -DiagramCommand::DiagramCommand(char *name, int command, DiagramDocument *ddoc, wxClassInfo *info, double xx, double yy, - bool sel, wxShape *theShape, wxShape *fs, wxShape *ts): - wxCommand(TRUE, name) -{ - doc = ddoc; - cmd = command; - shape = theShape; - fromShape = fs; - toShape = ts; - shapeInfo = info; - shapeBrush = NULL; - shapePen = NULL; - x = xx; - y = yy; - selected = sel; - deleteShape = FALSE; -} - -DiagramCommand::DiagramCommand(char *name, int command, DiagramDocument *ddoc, wxBrush *backgroundColour, wxShape *theShape): - wxCommand(TRUE, name) -{ - doc = ddoc; - cmd = command; - shape = theShape; - fromShape = NULL; - toShape = NULL; - shapeInfo = NULL; - x = 0.0; - y = 0.0; - selected = FALSE; - deleteShape = FALSE; - shapeBrush = backgroundColour; - shapePen = NULL; -} - -DiagramCommand::DiagramCommand(char *name, int command, DiagramDocument *ddoc, const wxString& lab, wxShape *theShape): - wxCommand(TRUE, name) -{ - doc = ddoc; - cmd = command; - shape = theShape; - fromShape = NULL; - toShape = NULL; - shapeInfo = NULL; - x = 0.0; - y = 0.0; - selected = FALSE; - deleteShape = FALSE; - shapeBrush = NULL; - shapePen = NULL; - shapeLabel = lab; -} - -DiagramCommand::~DiagramCommand(void) -{ - if (shape && deleteShape) - { - shape->SetCanvas(NULL); - delete shape; - } -} - -bool DiagramCommand::Do(void) -{ - switch (cmd) - { - case OGLEDIT_CUT: - { - if (shape) - { - deleteShape = TRUE; - - shape->Select(FALSE); - - // Generate commands to explicitly remove each connected line. - RemoveLines(shape); - - doc->GetDiagram()->RemoveShape(shape); - if (shape->IsKindOf(CLASSINFO(wxLineShape))) - { - wxLineShape *lineShape = (wxLineShape *)shape; - fromShape = lineShape->GetFrom(); - toShape = lineShape->GetTo(); - } - shape->Unlink(); - - doc->Modify(TRUE); - doc->UpdateAllViews(); - } - - break; - } - case OGLEDIT_ADD_SHAPE: - { - wxShape *theShape = NULL; - if (shape) - theShape = shape; // Saved from undoing the shape - else - { - theShape = (wxShape *)shapeInfo->CreateObject(); - theShape->AssignNewIds(); - theShape->SetEventHandler(new MyEvtHandler(theShape, theShape, wxString(""))); - theShape->SetCentreResize(FALSE); - theShape->SetPen(wxBLACK_PEN); - theShape->SetBrush(wxCYAN_BRUSH); - - theShape->SetSize(60, 60); - } - doc->GetDiagram()->AddShape(theShape); - theShape->Show(TRUE); - - wxClientDC dc(theShape->GetCanvas()); - theShape->GetCanvas()->PrepareDC(dc); - - theShape->Move(dc, x, y); - - shape = theShape; - deleteShape = FALSE; - - doc->Modify(TRUE); - doc->UpdateAllViews(); - break; - } - case OGLEDIT_ADD_LINE: - { - wxShape *theShape = NULL; - if (shape) - theShape = shape; // Saved from undoing the line - else - { - theShape = (wxShape *)shapeInfo->CreateObject(); - theShape->AssignNewIds(); - theShape->SetEventHandler(new MyEvtHandler(theShape, theShape, wxString(""))); - theShape->SetPen(wxBLACK_PEN); - theShape->SetBrush(wxRED_BRUSH); - - wxLineShape *lineShape = (wxLineShape *)theShape; - - // Yes, you can have more than 2 control points, in which case - // it becomes a multi-segment line. - lineShape->MakeLineControlPoints(2); - lineShape->AddArrow(ARROW_ARROW, ARROW_POSITION_END, 10.0, 0.0, "Normal arrowhead"); - } - - doc->GetDiagram()->AddShape(theShape); - - fromShape->AddLine((wxLineShape *)theShape, toShape); - - theShape->Show(TRUE); - - wxClientDC dc(theShape->GetCanvas()); - theShape->GetCanvas()->PrepareDC(dc); - - // It won't get drawn properly unless you move both - // connected images - fromShape->Move(dc, fromShape->GetX(), fromShape->GetY()); - toShape->Move(dc, toShape->GetX(), toShape->GetY()); - - shape = theShape; - deleteShape = FALSE; - - doc->Modify(TRUE); - doc->UpdateAllViews(); - break; - } - case OGLEDIT_CHANGE_BACKGROUND_COLOUR: - { - if (shape) - { - wxClientDC dc(shape->GetCanvas()); - shape->GetCanvas()->PrepareDC(dc); - - wxBrush *oldBrush = shape->GetBrush(); - shape->SetBrush(shapeBrush); - shapeBrush = oldBrush; - shape->Draw(dc); - - doc->Modify(TRUE); - doc->UpdateAllViews(); - } - - break; - } - case OGLEDIT_EDIT_LABEL: - { - if (shape) - { - MyEvtHandler *myHandler = (MyEvtHandler *)shape->GetEventHandler(); - wxString oldLabel(myHandler->label); - myHandler->label = shapeLabel; - shapeLabel = oldLabel; - - wxClientDC dc(shape->GetCanvas()); - shape->GetCanvas()->PrepareDC(dc); - - shape->FormatText(dc, (char*) (const char*) myHandler->label); - shape->Draw(dc); - - doc->Modify(TRUE); - doc->UpdateAllViews(); - } - - break; - } - } - return TRUE; -} - -bool DiagramCommand::Undo(void) -{ - switch (cmd) - { - case OGLEDIT_CUT: - { - if (shape) - { - doc->GetDiagram()->AddShape(shape); - shape->Show(TRUE); - - if (shape->IsKindOf(CLASSINFO(wxLineShape))) - { - wxLineShape *lineShape = (wxLineShape *)shape; - - fromShape->AddLine(lineShape, toShape); - } - if (selected) - shape->Select(TRUE); - - deleteShape = FALSE; - } - doc->Modify(TRUE); - doc->UpdateAllViews(); - break; - } - case OGLEDIT_ADD_SHAPE: - case OGLEDIT_ADD_LINE: - { - if (shape) - { - wxClientDC dc(shape->GetCanvas()); - shape->GetCanvas()->PrepareDC(dc); - - shape->Select(FALSE, &dc); - doc->GetDiagram()->RemoveShape(shape); - shape->Unlink(); - deleteShape = TRUE; - } - doc->Modify(TRUE); - doc->UpdateAllViews(); - break; - } - case OGLEDIT_CHANGE_BACKGROUND_COLOUR: - { - if (shape) - { - wxClientDC dc(shape->GetCanvas()); - shape->GetCanvas()->PrepareDC(dc); - - wxBrush *oldBrush = shape->GetBrush(); - shape->SetBrush(shapeBrush); - shapeBrush = oldBrush; - shape->Draw(dc); - - doc->Modify(TRUE); - doc->UpdateAllViews(); - } - break; - } - case OGLEDIT_EDIT_LABEL: - { - if (shape) - { - MyEvtHandler *myHandler = (MyEvtHandler *)shape->GetEventHandler(); - wxString oldLabel(myHandler->label); - myHandler->label = shapeLabel; - shapeLabel = oldLabel; - - wxClientDC dc(shape->GetCanvas()); - shape->GetCanvas()->PrepareDC(dc); - - shape->FormatText(dc, (char*) (const char*) myHandler->label); - shape->Draw(dc); - - doc->Modify(TRUE); - doc->UpdateAllViews(); - } - - break; - } - } - return TRUE; -} - -// Remove each individual line connected to a shape by sending a command. -void DiagramCommand::RemoveLines(wxShape *shape) -{ - wxNode *node = shape->GetLines().First(); - while (node) - { - wxLineShape *line = (wxLineShape *)node->Data(); - doc->GetCommandProcessor()->Submit(new DiagramCommand("Cut", OGLEDIT_CUT, doc, NULL, 0.0, 0.0, line->Selected(), line)); - - node = shape->GetLines().First(); - } -} - -/* - * MyEvtHandler: an event handler class for all shapes - */ - -void MyEvtHandler::OnLeftClick(double x, double y, int keys, int attachment) -{ - wxClientDC dc(GetShape()->GetCanvas()); - GetShape()->GetCanvas()->PrepareDC(dc); - - if (keys == 0) - { - // Selection is a concept the library knows about - if (GetShape()->Selected()) - { - GetShape()->Select(FALSE, &dc); - GetShape()->GetCanvas()->Redraw(dc); // Redraw because bits of objects will be are missing - } - else - { - // Ensure no other shape is selected, to simplify Undo/Redo code - bool redraw = FALSE; - wxNode *node = GetShape()->GetCanvas()->GetDiagram()->GetShapeList()->First(); - while (node) - { - wxShape *eachShape = (wxShape *)node->Data(); - if (eachShape->GetParent() == NULL) - { - if (eachShape->Selected()) - { - eachShape->Select(FALSE, &dc); - redraw = TRUE; - } - } - node = node->Next(); - } - GetShape()->Select(TRUE, &dc); - if (redraw) - GetShape()->GetCanvas()->Redraw(dc); - } - } - else if (keys & KEY_CTRL) - { - // Do something for CONTROL - } - else - { - wxGetApp().frame->SetStatusText(label); - } -} - -/* - * Implement connection of two shapes by right-dragging between them. - */ - -void MyEvtHandler::OnBeginDragRight(double x, double y, int keys, int attachment) -{ - // Force attachment to be zero for now. Eventually we can deal with - // the actual attachment point, e.g. a rectangle side if attachment mode is on. - attachment = 0; - - wxClientDC dc(GetShape()->GetCanvas()); - GetShape()->GetCanvas()->PrepareDC(dc); - - wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT); - dc.SetLogicalFunction(wxXOR); - dc.SetPen(dottedPen); - double xp, yp; - GetShape()->GetAttachmentPosition(attachment, &xp, &yp); - dc.DrawLine(xp, yp, x, y); - GetShape()->GetCanvas()->CaptureMouse(); -} - -void MyEvtHandler::OnDragRight(bool draw, double x, double y, int keys, int attachment) -{ - // Force attachment to be zero for now - attachment = 0; - - wxClientDC dc(GetShape()->GetCanvas()); - GetShape()->GetCanvas()->PrepareDC(dc); - - wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT); - dc.SetLogicalFunction(wxXOR); - dc.SetPen(dottedPen); - double xp, yp; - GetShape()->GetAttachmentPosition(attachment, &xp, &yp); - dc.DrawLine(xp, yp, x, y); -} - -void MyEvtHandler::OnEndDragRight(double x, double y, int keys, int attachment) -{ - GetShape()->GetCanvas()->ReleaseMouse(); - MyCanvas *canvas = (MyCanvas *)GetShape()->GetCanvas(); - - // Check if we're on an object - int new_attachment; - wxShape *otherShape = canvas->FindFirstSensitiveShape(x, y, &new_attachment, OP_DRAG_RIGHT); - - if (otherShape && !otherShape->IsKindOf(CLASSINFO(wxLineShape))) - { - canvas->view->GetDocument()->GetCommandProcessor()->Submit( - new DiagramCommand("wxLineShape", OGLEDIT_ADD_LINE, (DiagramDocument *)canvas->view->GetDocument(), CLASSINFO(wxLineShape), - 0.0, 0.0, FALSE, NULL, GetShape(), otherShape)); - } -} - -void MyEvtHandler::OnEndSize(double x, double y) -{ - wxClientDC dc(GetShape()->GetCanvas()); - GetShape()->GetCanvas()->PrepareDC(dc); - - GetShape()->FormatText(dc, (char*) (const char*) label); -} - -/* - * Diagram - */ - -bool MyDiagram::OnShapeSave(wxExprDatabase& db, wxShape& shape, wxExpr& expr) -{ - wxDiagram::OnShapeSave(db, shape, expr); - MyEvtHandler *handler = (MyEvtHandler *)shape.GetEventHandler(); - expr.AddAttributeValueString("label", handler->label); - return TRUE; -} - -bool MyDiagram::OnShapeLoad(wxExprDatabase& db, wxShape& shape, wxExpr& expr) -{ - wxDiagram::OnShapeLoad(db, shape, expr); - char *label = NULL; - expr.AssignAttributeValue("label", &label); - MyEvtHandler *handler = new MyEvtHandler(&shape, &shape, wxString(label)); - shape.SetEventHandler(handler); - - if (label) - delete[] label; - return TRUE; -} - -/* - * New shapes - */ - -IMPLEMENT_DYNAMIC_CLASS(wxRoundedRectangleShape, wxRectangleShape) - -wxRoundedRectangleShape::wxRoundedRectangleShape(double w, double h): - wxRectangleShape(w, h) -{ - // 0.3 of the smaller rectangle dimension - SetCornerRadius((double) -0.3); -} - -IMPLEMENT_DYNAMIC_CLASS(wxDiamondShape, wxPolygonShape) - -wxDiamondShape::wxDiamondShape(double w, double h): - wxPolygonShape() -{ - // wxPolygonShape::SetSize relies on the shape having non-zero - // size initially. - if (w == 0.0) - w = 60.0; - if (h == 0.0) - h = 60.0; - - wxList *thePoints = new wxList; - wxRealPoint *point = new wxRealPoint(0.0, (-h/2.0)); - thePoints->Append((wxObject*) point); - - point = new wxRealPoint((w/2.0), 0.0); - thePoints->Append((wxObject*) point); - - point = new wxRealPoint(0.0, (h/2.0)); - thePoints->Append((wxObject*) point); - - point = new wxRealPoint((-w/2.0), 0.0); - thePoints->Append((wxObject*) point); - - Create(thePoints); -} diff --git a/utils/ogl/samples/ogledit/doc.h b/utils/ogl/samples/ogledit/doc.h deleted file mode 100644 index 968fad13ac..0000000000 --- a/utils/ogl/samples/ogledit/doc.h +++ /dev/null @@ -1,172 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: doc.h -// Purpose: Document classes -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _OGLSAMPLE_DOC_H_ -#define _OGLSAMPLE_DOC_H_ - -#ifdef __GNUG__ -// #pragma interface -#endif - -#include -#include -#include - -#include "ogl.h" - -/* - * Override a few members for this application - */ - -class MyDiagram: public wxDiagram -{ - public: - MyDiagram(void) {} - bool OnShapeSave(wxExprDatabase& db, wxShape& shape, wxExpr& expr); - bool OnShapeLoad(wxExprDatabase& db, wxShape& shape, wxExpr& expr); -}; - -/* - * A few new shape classes so we have a 1:1 mapping - * between palette symbol and unique class - */ - -class wxRoundedRectangleShape: public wxRectangleShape -{ - DECLARE_DYNAMIC_CLASS(wxRoundedRectangleShape) - private: - public: - wxRoundedRectangleShape(double w = 0.0, double h = 0.0); -}; - -class wxDiamondShape: public wxPolygonShape -{ - DECLARE_DYNAMIC_CLASS(wxDiamondShape) - private: - public: - wxDiamondShape(double w = 0.0, double h = 0.0); -}; - -/* - * All shape event behaviour is routed through this handler, so we don't - * have to derive from each shape class. We plug this in to each shape. - */ - -class MyEvtHandler: public wxShapeEvtHandler -{ - public: - wxString label; - MyEvtHandler(wxShapeEvtHandler *prev = NULL, wxShape *shape = NULL, const wxString& lab = ""):wxShapeEvtHandler(prev, shape) - { - label = lab; - } - ~MyEvtHandler(void) - { - } - void OnLeftClick(double x, double y, int keys = 0, int attachment = 0); - void OnBeginDragRight(double x, double y, int keys = 0, int attachment = 0); - void OnDragRight(bool draw, double x, double y, int keys = 0, int attachment = 0); - void OnEndDragRight(double x, double y, int keys = 0, int attachment = 0); - void OnEndSize(double x, double y); -}; - -/* - * A diagram document, which contains a diagram. - */ - -class DiagramDocument: public wxDocument -{ - DECLARE_DYNAMIC_CLASS(DiagramDocument) - private: - public: - MyDiagram diagram; - - DiagramDocument(void); - ~DiagramDocument(void); - - ostream& SaveObject(ostream& stream); - istream& LoadObject(istream& stream); - - inline wxDiagram *GetDiagram() { return &diagram; } - - bool OnCloseDocument(void); -}; - -/* - * Most user interface commands are routed through this, to give us the - * Undo/Redo mechanism. If you add more commands, such as changing the shape colour, - * you will need to add members to 'remember' what the user applied (for 'Do') and what the - * previous state was (for 'Undo'). - * You can have one member for each property to be changed. Assume we also have - * a pointer member wxShape *shape, which is set to the shape being changed. - * Let's assume we're changing the shape colour. Our member for this is shapeColour. - * - * - In 'Do': - * o Set a temporary variable 'temp' to the current colour for 'shape'. - * o Change the colour to the new colour. - * o Set shapeColour to the _old_ colour, 'temp'. - * - In 'Undo': - * o Set a temporary variable 'temp' to the current colour for 'shape'. - * o Change the colour to shapeColour (the old colour). - * o Set shapeColour to 'temp'. - * - * So, as long as we have a pointer to the shape being changed, - * we only need one member variable for each property. - * - * PROBLEM: when an Add shape command is redone, the 'shape' pointer changes. - * Assume, as here, that we keep a pointer to the old shape so we reuse it - * when we recreate. - */ - -class DiagramCommand: public wxCommand -{ - protected: - DiagramDocument *doc; - int cmd; - wxShape *shape; // Pointer to the shape we're acting on - wxShape *fromShape; - wxShape *toShape; - wxClassInfo *shapeInfo; - double x; - double y; - bool selected; - bool deleteShape; - - // Storage for property commands - wxBrush *shapeBrush; - wxPen *shapePen; - wxString shapeLabel; - public: - // Multi-purpose constructor for creating, deleting shapes - DiagramCommand(char *name, int cmd, DiagramDocument *ddoc, wxClassInfo *shapeInfo = NULL, - double x = 0.0, double y = 0.0, bool sel = FALSE, wxShape *theShape = NULL, wxShape *fs = NULL, wxShape *ts = NULL); - - // Property-changing command constructors - DiagramCommand(char *name, int cmd, DiagramDocument *ddoc, wxBrush *backgroundColour, wxShape *theShape); - DiagramCommand(char *name, int cmd, DiagramDocument *ddoc, const wxString& lab, wxShape *theShape); - - ~DiagramCommand(void); - - bool Do(void); - bool Undo(void); - - inline void SetShape(wxShape *s) { shape = s; } - inline wxShape *GetShape(void) { return shape; } - inline wxShape *GetFromShape(void) { return fromShape; } - inline wxShape *GetToShape(void) { return toShape; } - inline wxClassInfo *GetShapeInfo(void) { return shapeInfo; } - inline bool GetSelected(void) { return selected; } - - void RemoveLines(wxShape *shape); -}; - -#endif - // _OGLSAMPLE_DOC_H_ diff --git a/utils/ogl/samples/ogledit/makefile.b32 b/utils/ogl/samples/ogledit/makefile.b32 deleted file mode 100644 index ffe204cf46..0000000000 --- a/utils/ogl/samples/ogledit/makefile.b32 +++ /dev/null @@ -1,88 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1996 -# Updated: -# Copyright: (c) 1996 -# -# "%W% %G%" -# -# Makefile : Builds OGL example for BC++, 32-bit. - -!if "$(BCCDIR)" == "" -!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 -!endif - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -!ifndef FINAL -FINAL=0 -!endif - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -THISDIR = $(WXDIR)\utils\ogl\samples\ogledit - -OGLDIR = ..\.. # $(WXDIR)\utils\ogl # Command line too long! -OGLINC = $(OGLDIR)\src -OGLLIB = $(WXDIR)\lib\ogl.lib - -WXLIB = $(WXDIR)\lib\wx32.lib -LIBS=$(WXLIB) $(OGLLIB) cw32 import32 -INC=/I$(OGLINC) -CFG=$(WXDIR)\src\wxwin32.cfg - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -DDEBUG=$(DEBUG) -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -O2 -DEBUG_FLAGS = -DDEBUG=$(DEBUG) -!endif - -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = ogledit.obj doc.obj view.obj palette.obj - -all: ogl ogledit.exe - -ogl: - cd $(OGLDIR)\src - make -f makefile.b32 - cd $(THISDIR) - -ogledit.exe: $(WXLIB) $(OBJECTS) ogledit.def ogledit.res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(OBJECTS) -ogledit -nul -$(LIBS) -ogledit.def -! - brc32 -K ogledit.res - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) $(INC) -c {$< } - -ogledit.obj: ogledit.$(SRCSUFF) - -doc.obj: doc.$(SRCSUFF) - -view.obj: view.$(SRCSUFF) - -palette.obj: palette.$(SRCSUFF) - -ogledit.res : ogledit.rc $(WXDIR)\include\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa ogledit - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws diff --git a/utils/ogl/samples/ogledit/makefile.bcc b/utils/ogl/samples/ogledit/makefile.bcc deleted file mode 100644 index 0b94f0ab24..0000000000 --- a/utils/ogl/samples/ogledit/makefile.bcc +++ /dev/null @@ -1,87 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1996 -# Updated: -# Copyright: (c) 1996 -# -# "%W% %G%" -# -# Makefile : Builds OGL example for BC++, 16-bit. - -!if "$(BCCDIR)" == "" -!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 -!endif - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -!ifndef FINAL -FINAL=0 -!endif - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makebcc.env - -THISDIR = $(WXDIR)\utils\ogl\samples\ogledit - -OGLDIR = $(WXDIR)\utils\ogl -OGLINC = $(OGLDIR)\src -OGLLIB = $(OGLDIR)\lib\ogl.lib - -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) $(OGLLIB) mathwl cwl import -INC=/I$(OGLINC) -CFG=$(WXDIR)\src\wxwin.cfg - -!if "$(FINAL)" == "0" -LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -O2 -DEBUG_FLAGS = -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = ogledit.obj doc.obj view.obj palette.obj - -all: ogl ogledit.exe - -ogl: - cd $(OGLDIR)\src - make -f makefile.bcc - cd $(THISDIR) - -ogledit.exe: $(WXLIB) $(OBJECTS) ogledit.def ogledit.res - tlink $(LINKFLAGS) @&&! -c0wl.obj $(OBJECTS) -ogledit -nul -$(LIBS) -ogledit.def -! - rc -30 -K ogledit.res - -.$(SRCSUFF).obj: - bcc $(CPPFLAGS) $(INC) -c {$< } - -ogledit.obj: ogledit.$(SRCSUFF) - -doc.obj: doc.$(SRCSUFF) - -view.obj: view.$(SRCSUFF) - -palette.obj: palette.$(SRCSUFF) - -ogledit.res : ogledit.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(BCCDIR)\include /i$(WXDIR)\include ogledit - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.rws diff --git a/utils/ogl/samples/ogledit/makefile.dos b/utils/ogl/samples/ogledit/makefile.dos deleted file mode 100644 index 34eb326437..0000000000 --- a/utils/ogl/samples/ogledit/makefile.dos +++ /dev/null @@ -1,103 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1995 -# Updated: -# Copyright: (c) 1995, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds OGLEdit example (MSVC++ 1.5). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\utils\ogl\samples\ogledit -WXLIB = $(WXDIR)\lib\wx.lib - -OGLDIR = $(WXDIR)\utils\ogl -OGLINC = $(OGLDIR)\src -OGLLIB = $(OGLDIR)\lib\ogl.lib - -LIBS=$(WXLIB) $(OGLLIB) oldnames libw llibcew commdlg shell ddeml - -EXTRAFLAGS=/I$(OGLINC) - -OBJECTS = ogledit.obj doc.obj view.obj palette.obj - -all: ogledit.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -ogl: - cd $(OGLDIR)\src - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -prologio: - cd $(PROLOGDIR)\src - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -ogledit.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) $(OGLLIB) ogledit.def ogledit.res - link $(LINKFLAGS) @<< -$(WXDIR)\src\msw\dummy.obj $(OBJECTS), -ogledit, -NUL, -$(LIBS), -ogledit.def -; -<< - rc -30 -K ogledit.res - -ogledit.obj: ogledit.h ogledit.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -view.obj: view.h view.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -doc.obj: doc.h doc.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -palette.obj: view.h doc.h ogledit.h palette.$(SRCSUFF) $(DUMMYOBJ) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -ogledit.res : ogledit.rc $(WXDIR)\include\msw\wx.rc - rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw ogledit - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb - -cleanogl: - cd $(OGLDIR)\src - nmake -f makefile.dos clean - cd $(THISDIR) - -cleanall: - cd $(OGLDIR)\src - nmake -f makefile.dos clean - cd $(THISDIR) \ No newline at end of file diff --git a/utils/ogl/samples/ogledit/makefile.nt b/utils/ogl/samples/ogledit/makefile.nt deleted file mode 100644 index f49a7ed70b..0000000000 --- a/utils/ogl/samples/ogledit/makefile.nt +++ /dev/null @@ -1,95 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds docview example (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\ntwxwin.mak - -THISDIR = $(WXDIR)\utils\ogl\samples\ogledit - -OGLDIR = $(WXDIR)\utils\ogl -OGLINC = $(OGLDIR)\src -OGLLIB = $(WXDIR)\lib\ogl.lib - -PROGRAM=ogledit - -EXTRALIBS=$(OGLLIB) -EXTRAINC=/I$(OGLINC) - -OBJECTS = $(PROGRAM).obj doc.obj view.obj palette.obj - -$(PROGRAM): $(PROGRAM).exe - -all: $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -ogl: - cd $(OGLDIR)\src - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(OGLLIB) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res -$(LIBS) -<< - -$(PROGRAM).obj: $(PROGRAM).h doc.h view.h palette.h $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -doc.obj: view.h doc.h doc.$(SRCSUFF) ogledit.h $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -view.obj: view.h doc.h view.$(SRCSUFF) ogledit.h $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -palette.obj: view.h doc.h ogledit.h palette.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc ogl.ico - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -cleanogl: - cd $(OGLDIR)\src - nmake -f makefile.nt clean - cd $(THISDIR) - -clean: - -erase *.obj - -erase *.sbr - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb - diff --git a/utils/ogl/samples/ogledit/makefile.sc b/utils/ogl/samples/ogledit/makefile.sc deleted file mode 100644 index 03da92bcd0..0000000000 --- a/utils/ogl/samples/ogledit/makefile.sc +++ /dev/null @@ -1,33 +0,0 @@ -# Symantec C++ makefile for docview example -# NOTE that peripheral libraries are now dealt in main wxWindows makefile. - -WXDIR = $(WXWIN) -include $(WXDIR)\src\makesc.env - -WXLIB = $(WXDIR)\lib\wx.lib -INCDIR = $(WXDIR)\include -MSWINC = $(INCDIR)\msw -BASEINC = $(INCDIR)\base - -INCLUDE=$(BASEINC);$(MSWINC) - -LIBS=$(WXLIB) libw.lib commdlg.lib shell.lib - -OBJECTS=docview.obj view.obj doc.obj - -.$(SRCSUFF).obj: - *$(CC) -c $(CFLAGS) -I$(INCLUDE) $< - -.rc.res: - *$(RC) -r -I$(INCLUDE) $< - -docview.exe: $(OBJECTS) docview.def docview.res - *$(CC) $(LDFLAGS) -o$@ $(OBJECTS) docview.def $(LIBS) - *$(RC) -k docview.res - -clean: - -del *.obj - -del *.exe - -del *.res - -del *.map - -del *.rws diff --git a/utils/ogl/samples/ogledit/makefile.unx b/utils/ogl/samples/ogledit/makefile.unx deleted file mode 100644 index a813dbceb0..0000000000 --- a/utils/ogl/samples/ogledit/makefile.unx +++ /dev/null @@ -1,79 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for docview example (UNIX). - -WXDIR = ../../../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/make.env - -OGLDIR = $(WXDIR)/utils/ogl -OGLINC = $(OGLDIR)/src -OGLLIB = $(OGLDIR)/lib/libogl$(GUISUFFIX).a - -OBJECTS = $(OBJDIR)/ogledit.$(OBJSUFF) $(OBJDIR)/view.$(OBJSUFF) $(OBJDIR)/doc.$(OBJSUFF) $(OBJDIR)/palette.$(OBJSUFF) - -LDFLAGS = $(XLIB) -L$(WXDIR)/lib -L$(OGLDIR)/lib -L$(MFDIR)/lib - -XVIEWLDLIBS = -logl_ol -lwx_ol -lxview -lolgx -lX11 -lm $(COMPLIBS) -MOTIFLDLIBS = -logl_motif -lwx_motif -lXm -lXt -lX11 -lm $(COMPLIBS) -HPLDLIBS = -logl_motif -lwx_hp -lXm -lXt -lX11 -lm $(COMPLIBS) - -CPPFLAGS = -I$(OGLINC) -I$(PROLOGINC) -I$(MFINC) $(XINCLUDE) $(INC) $(GUI) -DDEBUG='$(DEBUG)' $(DEBUGFLAGS) $(WARN) $(OPTIONS) -DPROLOGIO - -.SUFFIXES: - -all: $(OBJDIR) ogledit$(GUISUFFIX) - -wx_motif: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif - -wx_ol: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview -motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK= - -xview: - $(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' - -hp: - $(MAKE) -f makefile,unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='' WARN='-w' \ - XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' LDLIBS='$(HPLDLIBS)' - -$(OBJDIR): - mkdir $(OBJDIR) - -ogledit$(GUISUFFIX): $(OBJECTS) $(WXLIB) - $(CC) $(LDFLAGS) -o ogledit$(GUISUFFIX) $(OBJECTS) $(XVIEW_LINK) $(LDLIBS) - -$(OBJDIR)/ogledit.$(OBJSUFF): ogledit.$(SRCSUFF) ogledit.h doc.h view.h palette.h - $(CC) -c $(CPPFLAGS) -o $@ ogledit.$(SRCSUFF) - -$(OBJDIR)/doc.$(OBJSUFF): doc.$(SRCSUFF) doc.h - $(CC) -c $(CPPFLAGS) -o $@ doc.$(SRCSUFF) - -$(OBJDIR)/view.$(OBJSUFF): view.$(SRCSUFF) view.h - $(CC) -c $(CPPFLAGS) -o $@ view.$(SRCSUFF) - -$(OBJDIR)/palette.$(OBJSUFF): palette.$(SRCSUFF) palette.h - $(CC) -c $(CPPFLAGS) -o $@ palette.$(SRCSUFF) - -clean_motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany - -clean_ol: - $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany - -clean_hp: - $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany - -cleanany: - rm -f $(OBJECTS) ogledit(GUISUFFIX) core diff --git a/utils/ogl/samples/ogledit/makefile.vms b/utils/ogl/samples/ogledit/makefile.vms deleted file mode 100644 index 1a64fc7f30..0000000000 --- a/utils/ogl/samples/ogledit/makefile.vms +++ /dev/null @@ -1,44 +0,0 @@ -#************************************************************************ -# Makefile for DOCVIEW under VMS -# by Stefan Hammes -# (incomplete) update history: -# 09.06.95 -#************************************************************************ - -#************************************************************************ -# Definition section -# (cave: definitions and includes must begin with ',') -#************************************************************************ - -APPOPTS = -APPDEFS = -APPINCS = - -#************************************************************************ -# Module section -#************************************************************************ - -# Name of main module -MAIN = docview - -# Object modules of the application. -OBJS = docview.obj view.obj doc.obj -OBJLIST =docview.obj,view.obj,doc.obj - -.include [--.src]makevms.env - -# main dependency -$(MAIN).exe : $(OBJS) - $(LINK) $(LINKFLAGS) /exec=$(MAIN).exe $(OBJLIST),$(WXLIB)/lib,$(OPTSFILE)/option - - purge *.exe - -#************************************************************************ -# Header file depedencies following -#************************************************************************ - -docview.$(OBJSUFF) : docview.$(SRCSUFF) docview.h doc.h view.h - -doc.$(OBJSUFF) : doc.$(SRCSUFF) doc.h - -view.$(OBJSUFF) : view.$(SRCSUFF) view.h - diff --git a/utils/ogl/samples/ogledit/makefile.wat b/utils/ogl/samples/ogledit/makefile.wat deleted file mode 100644 index bafa16f3a5..0000000000 --- a/utils/ogl/samples/ogledit/makefile.wat +++ /dev/null @@ -1,43 +0,0 @@ -# -# Makefile for WATCOM -# -# Created by D.Chubraev, chubraev@iem.ee.ethz.ch -# 8 Nov 1994 -# - -WXDIR = ..\.. - -!include $(WXDIR)\src\makewat.env - -WXLIB = $(WXDIR)\lib -NAME = docview -LNK = $(name).lnk -OBJS = $(name).obj doc.obj view.obj - -all: $(name).exe - -$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib - wlink @$(LNK) - $(BINDCOMMAND) $(name).res - -$(name).res : $(name).rc $(WXDIR)\include\msw\wx.rc - $(RC) $(RESFLAGS1) $(name).rc - -$(LNK) : makefile.wat - %create $(LNK) - @%append $(LNK) debug all - @%append $(LNK) system $(LINKOPTION) - @%append $(LNK) $(MINDATA) - @%append $(LNK) $(MAXDATA) - @%append $(LNK) $(STACK) - @%append $(LNK) name $(name) - @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib - @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i - @for %i in ($(OBJS)) do @%append $(LNK) file %i - -thing: .SYMBOLIC - echo $(WATLIBDIR) - -clean: .SYMBOLIC - -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex - diff --git a/utils/ogl/samples/ogledit/ogl.ico b/utils/ogl/samples/ogledit/ogl.ico deleted file mode 100644 index 7cb092e04c..0000000000 Binary files a/utils/ogl/samples/ogledit/ogl.ico and /dev/null differ diff --git a/utils/ogl/samples/ogledit/ogledit.cpp b/utils/ogl/samples/ogledit/ogledit.cpp deleted file mode 100644 index ee31750c2b..0000000000 --- a/utils/ogl/samples/ogledit/ogledit.cpp +++ /dev/null @@ -1,208 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: ogledit.cpp -// Purpose: OGLEdit sample app -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma implementation -#endif - -// For compilers that support precompilation, includes "wx.h". -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#if !USE_DOC_VIEW_ARCHITECTURE -#error You must set USE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h! -#endif - -#include "ogledit.h" -#include "palette.h" -#include "doc.h" -#include "view.h" - -// A macro needed for some compilers (AIX) that need 'main' to be defined -// in the application itself. -IMPLEMENT_APP(MyApp) - -MyApp::MyApp(void) -{ - frame = NULL; -} - -// The `main program' equivalent, creating the windows and returning the -// main frame -bool MyApp::OnInit(void) -{ - wxOGLInitialize(); - - //// Create a document manager - wxDocManager *myDocManager = new wxDocManager; - - //// Create a template relating drawing documents to their views - (void) new wxDocTemplate(myDocManager, "Diagram", "*.dia", "", "dia", "Diagram Doc", "Diagram View", - CLASSINFO(DiagramDocument), CLASSINFO(DiagramView)); - - // If we've only got one window, we only get to edit - // one document at a time. - myDocManager->SetMaxDocsOpen(1); - - //// Create the main frame window - frame = new MyFrame(myDocManager, NULL, "OGLEdit Demo", wxPoint(0, 0), wxSize(500, 400), wxDEFAULT_FRAME_STYLE); - - //// Give it an icon -#ifdef __WXMSW__ - frame->SetIcon(wxIcon("ogl_icn")); -#endif -#ifdef __X__ - frame->SetIcon(wxIcon("ogl.xbm")); -#endif - - //// Make a menubar - wxMenu *file_menu = new wxMenu; - wxMenu *edit_menu = NULL; - - file_menu->Append(wxID_NEW, "&New..."); - file_menu->Append(wxID_OPEN, "&Open..."); - - file_menu->Append(wxID_CLOSE, "&Close"); - file_menu->Append(wxID_SAVE, "&Save"); - file_menu->Append(wxID_SAVEAS, "Save &As..."); - file_menu->AppendSeparator(); - file_menu->Append(wxID_PRINT, "&Print..."); - file_menu->Append(wxID_PRINT_SETUP, "Print &Setup..."); - file_menu->Append(wxID_PREVIEW, "Print Pre&view"); - - edit_menu = new wxMenu; - edit_menu->Append(wxID_UNDO, "&Undo"); - edit_menu->Append(wxID_REDO, "&Redo"); - edit_menu->AppendSeparator(); - edit_menu->Append(OGLEDIT_CUT, "&Cut"); - edit_menu->AppendSeparator(); - edit_menu->Append(OGLEDIT_CHANGE_BACKGROUND_COLOUR, "Change &background colour"); - edit_menu->Append(OGLEDIT_EDIT_LABEL, "Edit &label"); - - frame->editMenu = edit_menu; - - file_menu->AppendSeparator(); - file_menu->Append(wxID_EXIT, "E&xit"); - - // A nice touch: a history of files visited. Use this menu. - myDocManager->FileHistoryUseMenu(file_menu); - - wxMenu *help_menu = new wxMenu; - help_menu->Append(OGLEDIT_ABOUT, "&About"); - - wxMenuBar *menu_bar = new wxMenuBar; - - menu_bar->Append(file_menu, "&File"); - if (edit_menu) - menu_bar->Append(edit_menu, "&Edit"); - menu_bar->Append(help_menu, "&Help"); - - frame->canvas = frame->CreateCanvas(NULL, frame); - frame->palette = wxGetApp().CreatePalette(frame); - myDocManager->CreateDocument("", wxDOC_NEW); - - //// Associate the menu bar with the frame - frame->SetMenuBar(menu_bar); - - frame->CreateStatusBar(1); - - frame->Centre(wxBOTH); - frame->Show(TRUE); - - return TRUE; -} - -/* - * This is the top-level window of the application. - */ - -IMPLEMENT_CLASS(MyFrame, wxDocParentFrame) - -BEGIN_EVENT_TABLE(MyFrame, wxDocParentFrame) - EVT_MENU(OGLEDIT_ABOUT, MyFrame::OnAbout) - EVT_SIZE(MyFrame::OnSize) -END_EVENT_TABLE() - -MyFrame::MyFrame(wxDocManager *manager, wxFrame *frame, const wxString& title, - const wxPoint& pos, const wxSize& size, long type): - wxDocParentFrame(manager, frame, -1, title, pos, size, type) -{ - canvas = NULL; - palette = NULL; - editMenu = NULL; -} - -void MyFrame::OnSize(wxSizeEvent& event) -{ - if (canvas && palette) - { - int cw, ch; - GetClientSize(&cw, &ch); - int paletteX = 0; - int paletteY = 0; - int paletteW = 30; - int paletteH = ch; - int canvasX = paletteX + paletteW; - int canvasY = 0; - int canvasW = cw - paletteW; - int canvasH = ch; - - palette->SetSize(paletteX, paletteY, paletteW, paletteH); - canvas->SetSize(canvasX, canvasY, canvasW, canvasH); - } -} - -bool MyFrame::OnClose(void) -{ - if (wxDocParentFrame::OnClose()) - { - wxOGLCleanUp(); - return TRUE; - } - else - return FALSE; -} - -// Intercept menu commands -void MyFrame::OnAbout(wxCommandEvent& event) -{ - (void)wxMessageBox("OGLEdit Demo\nTo draw a shape, select a shape on the toolbar and left-click on the canvas.\nTo draw a line, right-drag between shapes.\nFor further details, see the OGL manual.\n (c) Julian Smart 1996", "About OGLEdit"); -} - -// Creates a canvas. Called by OnInit as a child of the main window -MyCanvas *MyFrame::CreateCanvas(wxView *view, wxFrame *parent) -{ - int width, height; - parent->GetClientSize(&width, &height); - - // Non-retained canvas - MyCanvas *canvas = new MyCanvas(view, parent, -1, wxPoint(0, 0), wxSize(width, height), 0); - wxCursor *cursor = new wxCursor(wxCURSOR_HAND); - canvas->SetCursor(cursor); - - // Give it scrollbars - canvas->SetScrollbars(20, 20, 50, 50); - - return canvas; -} - -MyFrame *GetMainFrame(void) -{ - return wxGetApp().frame; -} - diff --git a/utils/ogl/samples/ogledit/ogledit.def b/utils/ogl/samples/ogledit/ogledit.def deleted file mode 100644 index d587ce5556..0000000000 --- a/utils/ogl/samples/ogledit/ogledit.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME OGLEdit -DESCRIPTION 'OGL Editor Sample' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 8192 diff --git a/utils/ogl/samples/ogledit/ogledit.h b/utils/ogl/samples/ogledit/ogledit.h deleted file mode 100644 index c44195b6a7..0000000000 --- a/utils/ogl/samples/ogledit/ogledit.h +++ /dev/null @@ -1,75 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: ogledit.h -// Purpose: OGL sample -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma interface -#endif - -#ifndef _OGLSAMPLE_OGLEDIT_H_ -#define _OGLSAMPLE_OGLEDIT_H_ - -#include - -// Define a new application -class MyFrame; -class EditorToolPalette; -class MyApp: public wxApp -{ - public: - MyFrame *frame; - - MyApp(void); - bool OnInit(void); - - // Palette stuff - EditorToolPalette *CreatePalette(wxFrame *parent); -}; - -DECLARE_APP(MyApp) - -// Define a new frame -class MyCanvas; -class MyFrame: public wxDocParentFrame -{ - DECLARE_CLASS(MyFrame) - public: - wxMenu *editMenu; - - MyCanvas *canvas; - EditorToolPalette *palette; - - MyFrame(wxDocManager *manager, wxFrame *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE); - - MyCanvas *CreateCanvas(wxView *view, wxFrame *parent); - void OnSize(wxSizeEvent& event); - bool OnClose(void); - void OnAbout(wxCommandEvent& event); - -DECLARE_EVENT_TABLE() -}; - -extern MyFrame *GetMainFrame(void); - -// Menu/undo/redo commands - -#define OGLEDIT_CUT 1 -#define OGLEDIT_ADD_SHAPE 2 -#define OGLEDIT_ADD_LINE 3 -#define OGLEDIT_EDIT_LABEL 4 -#define OGLEDIT_CHANGE_BACKGROUND_COLOUR 5 - -#define OGLEDIT_ABOUT 100 - -#endif - // _OGLSAMPLE_OGLEDIT_H_ diff --git a/utils/ogl/samples/ogledit/ogledit.rc b/utils/ogl/samples/ogledit/ogledit.rc deleted file mode 100644 index fc2d538d65..0000000000 --- a/utils/ogl/samples/ogledit/ogledit.rc +++ /dev/null @@ -1,10 +0,0 @@ -ogl_icn ICON ogl.ico - -TOOL1 BITMAP "bitmaps/tool1.bmp" -TOOL2 BITMAP "bitmaps/tool2.bmp" -TOOL3 BITMAP "bitmaps/tool3.bmp" -TOOL4 BITMAP "bitmaps/tool4.bmp" -ARROWTOOL BITMAP "bitmaps/arrow.bmp" - -#include "wx/msw/wx.rc" - diff --git a/utils/ogl/samples/ogledit/palette.cpp b/utils/ogl/samples/ogledit/palette.cpp deleted file mode 100644 index 255f0decbc..0000000000 --- a/utils/ogl/samples/ogledit/palette.cpp +++ /dev/null @@ -1,115 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: palette.cpp -// Purpose: OGLEdit palette -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma implementation -#endif - -// For compilers that support precompilation, includes "wx.h". -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#include - -#include -#include -#include - -#include "doc.h" -#include "view.h" -#include "ogledit.h" -#include "palette.h" - -/* - * Object editor tool palette - * - */ - -EditorToolPalette::EditorToolPalette(wxWindow* parent, const wxPoint& pos, const wxSize& size, - long style): - TOOLPALETTECLASS(parent, -1, pos, size, style) -{ - currentlySelected = -1; - - SetMaxRowsCols(1000, 1); -} - -bool EditorToolPalette::OnLeftClick(int toolIndex, bool toggled) -{ - // BEGIN mutual exclusivity code - if (toggled && (currentlySelected != -1) && (toolIndex != currentlySelected)) - ToggleTool(currentlySelected, FALSE); - - if (toggled) - currentlySelected = toolIndex; - else if (currentlySelected == toolIndex) - currentlySelected = -1; - // END mutual exclusivity code - - return TRUE; -} - -void EditorToolPalette::OnMouseEnter(int toolIndex) -{ -} - -void EditorToolPalette::SetSize(int x, int y, int width, int height, int sizeFlags) -{ - TOOLPALETTECLASS::SetSize(x, y, width, height, sizeFlags); -} - -EditorToolPalette *MyApp::CreatePalette(wxFrame *parent) -{ - // Load palette bitmaps -#ifdef __WXMSW__ - wxBitmap PaletteTool1("TOOL1"); - wxBitmap PaletteTool2("TOOL2"); - wxBitmap PaletteTool3("TOOL3"); - wxBitmap PaletteTool4("TOOL4"); - wxBitmap PaletteArrow("ARROWTOOL"); -#endif -#ifdef __X__ - wxBitmap PaletteTool1(tool1_bits, tool1_width, tool1_height); - wxBitmap PaletteTool2(tool2_bits, tool2_width, tool2_height); - wxBitmap PaletteTool3(tool3_bits, tool3_width, tool3_height); - wxBitmap PaletteTool4(tool4_bits, tool4_width, tool4_height); - wxBitmap PaletteArrow(arrow_bits, arrow_width, arrow_height); -#endif - - EditorToolPalette *palette = new EditorToolPalette(parent, wxPoint(0, 0), wxSize(-1, -1), wxTB_HORIZONTAL); - - palette->SetMargins(2, 2); - -#ifdef __WXMSW__ - if (palette->IsKindOf(CLASSINFO(wxToolBar95))) - ((wxToolBar95 *)palette)->SetToolBitmapSize(wxSize(22, 22)); -#endif - - palette->AddTool(PALETTE_ARROW, PaletteArrow, wxNullBitmap, TRUE, 0, -1, NULL, "Pointer"); - palette->AddTool(PALETTE_TOOL1, PaletteTool1, wxNullBitmap, TRUE, 0, -1, NULL, "Tool 1"); - palette->AddTool(PALETTE_TOOL2, PaletteTool2, wxNullBitmap, TRUE, 0, -1, NULL, "Tool 2"); - palette->AddTool(PALETTE_TOOL3, PaletteTool3, wxNullBitmap, TRUE, 0, -1, NULL, "Tool 3"); - palette->AddTool(PALETTE_TOOL4, PaletteTool4, wxNullBitmap, TRUE, 0, -1, NULL, "Tool 4"); - - palette->Realize(); - - palette->ToggleTool(PALETTE_ARROW, TRUE); - palette->currentlySelected = PALETTE_ARROW; - return palette; -} - diff --git a/utils/ogl/samples/ogledit/palette.h b/utils/ogl/samples/ogledit/palette.h deleted file mode 100644 index 6159266230..0000000000 --- a/utils/ogl/samples/ogledit/palette.h +++ /dev/null @@ -1,58 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: palette.h -// Purpose: OGL sample palette -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _OGLSAMPLE_PALETTE_H_ -#define _OGLSAMPLE_PALETTE_H_ - -#ifdef __GNUG__ -// #pragma interface -#endif - -#include -#include -#include - -/* - * Object editor tool palette - * - */ - -// TODO for wxWin: wxToolBar95 cannot be moved to a non-0,0 position! -// Needs to have a parent window... -// So use a simple toolbar at present. -#define TOOLPALETTECLASS wxToolBarSimple - -class EditorToolPalette: public TOOLPALETTECLASS -{ - public: - int currentlySelected; - - EditorToolPalette(wxWindow *parent, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxTB_VERTICAL); - bool OnLeftClick(int toolIndex, bool toggled); - void OnMouseEnter(int toolIndex); - void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); -}; - -#define PALETTE_TOOL1 1 -#define PALETTE_TOOL2 2 -#define PALETTE_TOOL3 3 -#define PALETTE_TOOL4 4 -#define PALETTE_TOOL5 5 -#define PALETTE_TOOL6 6 -#define PALETTE_TOOL7 7 -#define PALETTE_TOOL8 8 -#define PALETTE_TOOL9 9 -#define PALETTE_ARROW 10 - -#endif - // _OGLSAMPLE_PALETTE_H_ diff --git a/utils/ogl/samples/ogledit/view.cpp b/utils/ogl/samples/ogledit/view.cpp deleted file mode 100644 index 2ff5d84b5a..0000000000 --- a/utils/ogl/samples/ogledit/view.cpp +++ /dev/null @@ -1,264 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: view.cpp -// Purpose: Implements view functionality in OGLEdit -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -// #pragma implementation -#endif - -// For compilers that support precompilation, includes "wx.h". -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#include - -#if !USE_DOC_VIEW_ARCHITECTURE -#error You must set USE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h! -#endif - -#include "ogledit.h" -#include "doc.h" -#include "view.h" -#include "palette.h" - -IMPLEMENT_DYNAMIC_CLASS(DiagramView, wxView) - -BEGIN_EVENT_TABLE(DiagramView, wxView) - EVT_MENU(OGLEDIT_CUT, DiagramView::OnCut) - EVT_MENU(OGLEDIT_CHANGE_BACKGROUND_COLOUR, DiagramView::OnChangeBackgroundColour) - EVT_MENU(OGLEDIT_EDIT_LABEL, DiagramView::OnEditLabel) -END_EVENT_TABLE() - -// What to do when a view is created. Creates actual -// windows for displaying the view. -bool DiagramView::OnCreate(wxDocument *doc, long flags) -{ - frame = GetMainFrame(); - canvas = GetMainFrame()->canvas; - canvas->view = this; - - SetFrame(frame); - Activate(TRUE); - - // Initialize the edit menu Undo and Redo items - doc->GetCommandProcessor()->SetEditMenu(((MyFrame *)frame)->editMenu); - doc->GetCommandProcessor()->Initialize(); - - wxShapeCanvas *shapeCanvas = (wxShapeCanvas *)canvas; - DiagramDocument *diagramDoc = (DiagramDocument *)doc; - shapeCanvas->SetDiagram(diagramDoc->GetDiagram()); - diagramDoc->GetDiagram()->SetCanvas(shapeCanvas); - - return TRUE; -} - -// Sneakily gets used for default print/preview -// as well as drawing on the screen. -void DiagramView::OnDraw(wxDC *dc) -{ -} - -void DiagramView::OnUpdate(wxView *sender, wxObject *hint) -{ - if (canvas) - canvas->Refresh(); -} - -// Clean up windows used for displaying the view. -bool DiagramView::OnClose(bool deleteWindow) -{ - if (!GetDocument()->Close()) - return FALSE; - - DiagramDocument *diagramDoc = (DiagramDocument *)GetDocument(); - diagramDoc->GetDiagram()->SetCanvas(NULL); - - canvas->Clear(); - canvas->SetDiagram(NULL); - canvas->view = NULL; - canvas = NULL; - - wxString s = wxTheApp->GetAppName(); - if (frame) - frame->SetTitle(s); - - SetFrame(NULL); - - Activate(FALSE); - - return TRUE; -} - -wxShape *DiagramView::FindSelectedShape(void) -{ - DiagramDocument *doc = (DiagramDocument *)GetDocument(); - wxShape *theShape = NULL; - wxNode *node = doc->GetDiagram()->GetShapeList()->First(); - while (node) - { - wxShape *eachShape = (wxShape *)node->Data(); - if ((eachShape->GetParent() == NULL) && eachShape->Selected()) - { - theShape = eachShape; - node = NULL; - } - else node = node->Next(); - } - return theShape; -} - -void DiagramView::OnCut(wxCommandEvent& event) -{ - DiagramDocument *doc = (DiagramDocument *)GetDocument(); - - wxShape *theShape = FindSelectedShape(); - if (theShape) - doc->GetCommandProcessor()->Submit(new DiagramCommand("Cut", OGLEDIT_CUT, doc, NULL, 0.0, 0.0, TRUE, theShape)); -} - -void DiagramView::OnChangeBackgroundColour(wxCommandEvent& event) -{ - DiagramDocument *doc = (DiagramDocument *)GetDocument(); - - wxShape *theShape = FindSelectedShape(); - if (theShape) - { - wxColourData data; - data.SetChooseFull(TRUE); - data.SetColour(theShape->GetBrush()->GetColour()); - - wxColourDialog *dialog = new wxColourDialog(frame, &data); - wxBrush *theBrush = NULL; - if (dialog->ShowModal() == wxID_OK) - { - wxColourData retData = dialog->GetColourData(); - wxColour col = retData.GetColour(); - theBrush = wxTheBrushList->FindOrCreateBrush(col, wxSOLID); - } - dialog->Close(); - - if (theBrush) - doc->GetCommandProcessor()->Submit(new DiagramCommand("Change colour", OGLEDIT_CHANGE_BACKGROUND_COLOUR, doc, - theBrush, theShape)); - } -} - -void DiagramView::OnEditLabel(wxCommandEvent& event) -{ - wxShape *theShape = FindSelectedShape(); - if (theShape) - { - wxString newLabel = wxGetTextFromUser("Enter new label", "Shape Label", ((MyEvtHandler *)theShape->GetEventHandler())->label); - GetDocument()->GetCommandProcessor()->Submit(new DiagramCommand("Edit label", OGLEDIT_EDIT_LABEL, (DiagramDocument*) GetDocument(), newLabel, theShape)); - } -} - -/* - * Window implementations - */ - -BEGIN_EVENT_TABLE(MyCanvas, wxShapeCanvas) - EVT_MOUSE_EVENTS(MyCanvas::OnMouseEvent) - EVT_PAINT(MyCanvas::OnPaint) -END_EVENT_TABLE() - -// Define a constructor for my canvas -MyCanvas::MyCanvas(wxView *v, wxWindow *parent, wxWindowID id, const wxPoint& pos, - const wxSize& size, long style): - wxShapeCanvas(parent, id, pos, size, style) -{ - view = v; -} - -MyCanvas::~MyCanvas(void) -{ -} - -void MyCanvas::OnLeftClick(double x, double y, int keys) -{ - EditorToolPalette *palette = wxGetApp().frame->palette; - wxClassInfo *info = NULL; - switch (palette->currentlySelected) - { - case PALETTE_TOOL1: - { - info = CLASSINFO(wxRectangleShape); - break; - } - case PALETTE_TOOL2: - { - info = CLASSINFO(wxRoundedRectangleShape); - break; - } - case PALETTE_TOOL3: - { - info = CLASSINFO(wxEllipseShape); - break; - } - case PALETTE_TOOL4: - { - info = CLASSINFO(wxDiamondShape); - break; - } - default: - break; - } - if (info) - { - view->GetDocument()->GetCommandProcessor()->Submit(new DiagramCommand(info->GetClassName(), OGLEDIT_ADD_SHAPE, (DiagramDocument *)view->GetDocument(), info, - x, y)); - } -} - -void MyCanvas::OnRightClick(double x, double y, int keys) -{ -} - -void MyCanvas::OnDragLeft(bool draw, double x, double y, int keys) -{ -} - -void MyCanvas::OnBeginDragLeft(double x, double y, int keys) -{ -} - -void MyCanvas::OnEndDragLeft(double x, double y, int keys) -{ -} - -void MyCanvas::OnDragRight(bool draw, double x, double y, int keys) -{ -} - -void MyCanvas::OnBeginDragRight(double x, double y, int keys) -{ -} - -void MyCanvas::OnEndDragRight(double x, double y, int keys) -{ -} - -void MyCanvas::OnMouseEvent(wxMouseEvent& event) -{ - wxShapeCanvas::OnMouseEvent(event); -} - -void MyCanvas::OnPaint(wxPaintEvent& event) -{ -// if (GetDiagram()) - wxShapeCanvas::OnPaint(event); -} diff --git a/utils/ogl/samples/ogledit/view.h b/utils/ogl/samples/ogledit/view.h deleted file mode 100644 index f4c508e198..0000000000 --- a/utils/ogl/samples/ogledit/view.h +++ /dev/null @@ -1,79 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: view.h -// Purpose: View-related classes -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _OGLSAMPLE_VIEW_H_ -#define _OGLSAMPLE_VIEW_H_ - -#ifdef __GNUG__ -// #pragma interface "view.h" -#endif - -#include "doc.h" -#include "ogl.h" - -class MyCanvas: public wxShapeCanvas -{ -// DECLARE_DYNAMIC_CLASS(wxShapeCanvas) - protected: - public: - wxView *view; - - MyCanvas(wxView *view, wxWindow *parent = NULL, wxWindowID id = -1, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxRETAINED); - ~MyCanvas(void); - - void OnMouseEvent(wxMouseEvent& event); - void OnPaint(wxPaintEvent& event); - - virtual void OnLeftClick(double x, double y, int keys = 0); - virtual void OnRightClick(double x, double y, int keys = 0); - - virtual void OnDragLeft(bool draw, double x, double y, int keys=0); // Erase if draw false - virtual void OnBeginDragLeft(double x, double y, int keys=0); - virtual void OnEndDragLeft(double x, double y, int keys=0); - - virtual void OnDragRight(bool draw, double x, double y, int keys=0); // Erase if draw false - virtual void OnBeginDragRight(double x, double y, int keys=0); - virtual void OnEndDragRight(double x, double y, int keys=0); - -DECLARE_EVENT_TABLE() -}; - -class DiagramView: public wxView -{ - DECLARE_DYNAMIC_CLASS(DiagramView) - private: - public: - wxFrame *frame; - MyCanvas *canvas; - - DiagramView(void) { canvas = NULL; frame = NULL; }; - ~DiagramView(void) {}; - - bool OnCreate(wxDocument *doc, long flags); - void OnDraw(wxDC *dc); - void OnUpdate(wxView *sender, wxObject *hint = NULL); - bool OnClose(bool deleteWindow = TRUE); - - wxShape *FindSelectedShape(void); - -// void OnMenuCommand(int cmd); - - void OnCut(wxCommandEvent& event); - void OnChangeBackgroundColour(wxCommandEvent& event); - void OnEditLabel(wxCommandEvent& event); - -DECLARE_EVENT_TABLE() -}; - -#endif - // _OGLSAMPLE_VIEW_H_ diff --git a/utils/ogl/src/basic.cpp b/utils/ogl/src/basic.cpp deleted file mode 100644 index 240dfc58ea..0000000000 --- a/utils/ogl/src/basic.cpp +++ /dev/null @@ -1,2754 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: basic.cpp -// Purpose: Basic OGL classes -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "basic.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#ifdef PROLOGIO -#include -#endif - -#if USE_IOSTREAMH -#include -#else -#include -#endif - -#include -#include -#include - -#include "basic.h" -#include "basicp.h" -#include "composit.h" -#include "lines.h" -#include "canvas.h" -#include "divided.h" -#include "misc.h" - -// Control point types -// Rectangle and most other shapes -#define CONTROL_POINT_VERTICAL 1 -#define CONTROL_POINT_HORIZONTAL 2 -#define CONTROL_POINT_DIAGONAL 3 - -// Line -#define CONTROL_POINT_ENDPOINT_TO 4 -#define CONTROL_POINT_ENDPOINT_FROM 5 -#define CONTROL_POINT_LINE 6 - -IMPLEMENT_DYNAMIC_CLASS(wxShapeTextLine, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxAttachmentPoint, wxObject) - -wxShapeTextLine::wxShapeTextLine(double the_x, double the_y, const wxString& the_line) -{ - m_x = the_x; m_y = the_y; m_line = the_line; -} - -wxShapeTextLine::~wxShapeTextLine() -{ -} - -IMPLEMENT_ABSTRACT_CLASS(wxShapeEvtHandler, wxObject) - -wxShapeEvtHandler::wxShapeEvtHandler(wxShapeEvtHandler *prev, wxShape *shape) -{ - m_previousHandler = prev; - m_handlerShape = shape; -} - -wxShapeEvtHandler::~wxShapeEvtHandler() -{ -} - -// Creates a copy of this event handler. -wxShapeEvtHandler* wxShapeEvtHandler::CreateNewCopy() -{ - wxShapeEvtHandler* newObject = (wxShapeEvtHandler*) GetClassInfo()->CreateObject(); - - wxASSERT( (newObject != NULL) ); - wxASSERT( (newObject->IsKindOf(CLASSINFO(wxShapeEvtHandler))) ); - - newObject->m_previousHandler = newObject; - - CopyData(*newObject); - - return newObject; -} - - -void wxShapeEvtHandler::OnDelete() -{ - if (this != GetShape()) - delete this; -} - -void wxShapeEvtHandler::OnDraw(wxDC& dc) -{ - if (m_previousHandler) - m_previousHandler->OnDraw(dc); -} - -void wxShapeEvtHandler::OnMoveLinks(wxDC& dc) -{ - if (m_previousHandler) - m_previousHandler->OnMoveLinks(dc); -} - -void wxShapeEvtHandler::OnMoveLink(wxDC& dc, bool moveControlPoints) -{ - if (m_previousHandler) - m_previousHandler->OnMoveLink(dc, moveControlPoints); -} - -void wxShapeEvtHandler::OnDrawContents(wxDC& dc) -{ - if (m_previousHandler) - m_previousHandler->OnDrawContents(dc); -} - -void wxShapeEvtHandler::OnSize(double x, double y) -{ - if (m_previousHandler) - m_previousHandler->OnSize(x, y); -} - -bool wxShapeEvtHandler::OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display) -{ - if (m_previousHandler) - return m_previousHandler->OnMovePre(dc, x, y, old_x, old_y, display); - else - return TRUE; -} - -void wxShapeEvtHandler::OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display) -{ - if (m_previousHandler) - m_previousHandler->OnMovePost(dc, x, y, old_x, old_y, display); -} - -void wxShapeEvtHandler::OnErase(wxDC& dc) -{ - if (m_previousHandler) - m_previousHandler->OnErase(dc); -} - -void wxShapeEvtHandler::OnEraseContents(wxDC& dc) -{ - if (m_previousHandler) - m_previousHandler->OnEraseContents(dc); -} - -void wxShapeEvtHandler::OnHighlight(wxDC& dc) -{ - if (m_previousHandler) - m_previousHandler->OnHighlight(dc); -} - -void wxShapeEvtHandler::OnLeftClick(double x, double y, int keys, int attachment) -{ - if (m_previousHandler) - m_previousHandler->OnLeftClick(x, y, keys, attachment); -} - -void wxShapeEvtHandler::OnRightClick(double x, double y, int keys, int attachment) -{ - if (m_previousHandler) - m_previousHandler->OnRightClick(x, y, keys, attachment); -} - -void wxShapeEvtHandler::OnDragLeft(bool draw, double x, double y, int keys, int attachment) -{ - if (m_previousHandler) - m_previousHandler->OnDragLeft(draw, x, y, keys, attachment); -} - -void wxShapeEvtHandler::OnBeginDragLeft(double x, double y, int keys, int attachment) -{ - if (m_previousHandler) - m_previousHandler->OnBeginDragLeft(x, y, keys, attachment); -} - -void wxShapeEvtHandler::OnEndDragLeft(double x, double y, int keys, int attachment) -{ - if (m_previousHandler) - m_previousHandler->OnEndDragLeft(x, y, keys, attachment); -} - -void wxShapeEvtHandler::OnDragRight(bool draw, double x, double y, int keys, int attachment) -{ - if (m_previousHandler) - m_previousHandler->OnDragRight(draw, x, y, keys, attachment); -} - -void wxShapeEvtHandler::OnBeginDragRight(double x, double y, int keys, int attachment) -{ - if (m_previousHandler) - m_previousHandler->OnBeginDragRight(x, y, keys, attachment); -} - -void wxShapeEvtHandler::OnEndDragRight(double x, double y, int keys, int attachment) -{ - if (m_previousHandler) - m_previousHandler->OnEndDragRight(x, y, keys, attachment); -} - -// Control points ('handles') redirect control to the actual shape, to make it easier -// to override sizing behaviour. -void wxShapeEvtHandler::OnSizingDragLeft(wxControlPoint* pt, bool draw, double x, double y, int keys, int attachment) -{ - if (m_previousHandler) - m_previousHandler->OnSizingDragLeft(pt, draw, x, y, keys, attachment); -} - -void wxShapeEvtHandler::OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y, int keys, int attachment) -{ - if (m_previousHandler) - m_previousHandler->OnSizingBeginDragLeft(pt, x, y, keys, attachment); -} - -void wxShapeEvtHandler::OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, int keys, int attachment) -{ - if (m_previousHandler) - m_previousHandler->OnSizingEndDragLeft(pt, x, y, keys, attachment); -} - -void wxShapeEvtHandler::OnDrawOutline(wxDC& dc, double x, double y, double w, double h) -{ - if (m_previousHandler) - m_previousHandler->OnDrawOutline(dc, x, y, w, h); -} - -void wxShapeEvtHandler::OnDrawControlPoints(wxDC& dc) -{ - if (m_previousHandler) - m_previousHandler->OnDrawControlPoints(dc); -} - -void wxShapeEvtHandler::OnEraseControlPoints(wxDC& dc) -{ - if (m_previousHandler) - m_previousHandler->OnEraseControlPoints(dc); -} - -// Can override this to prevent or intercept line reordering. -void wxShapeEvtHandler::OnChangeAttachment(int attachment, wxLineShape* line, wxList& ordering) -{ - if (m_previousHandler) - m_previousHandler->OnChangeAttachment(attachment, line, ordering); -} - -IMPLEMENT_ABSTRACT_CLASS(wxShape, wxShapeEvtHandler) - -wxShape::wxShape(wxShapeCanvas *can) -{ - m_eventHandler = this; - SetShape(this); - m_id = 0; - m_formatted = FALSE; - m_canvas = can; - m_xpos = 0.0; m_ypos = 0.0; - m_pen = g_oglBlackPen; - m_brush = wxWHITE_BRUSH; - m_font = g_oglNormalFont; - m_textColour = wxBLACK; - m_textColourName = "BLACK"; - m_visible = FALSE; - m_clientData = NULL; - m_selected = FALSE; - m_attachmentMode = FALSE; - m_spaceAttachments = TRUE; - m_disableLabel = FALSE; - m_fixedWidth = FALSE; - m_fixedHeight = FALSE; - m_drawHandles = TRUE; - m_sensitivity = OP_ALL; - m_draggable = TRUE; - m_parent = NULL; - m_formatMode = FORMAT_CENTRE_HORIZ | FORMAT_CENTRE_VERT; - m_shadowMode = SHADOW_NONE; - m_shadowOffsetX = 6.0; - m_shadowOffsetY = 6.0; - m_shadowBrush = wxBLACK_BRUSH; - m_textMarginX = 5.0; - m_textMarginY = 5.0; - m_regionName = "0"; - m_centreResize = TRUE; - m_highlighted = FALSE; - m_rotation = 0.0; - - // Set up a default region. Much of the above will be put into - // the region eventually (the duplication is for compatibility) - wxShapeRegion *region = new wxShapeRegion; - m_regions.Append(region); - region->SetName("0"); - region->SetFont(g_oglNormalFont); - region->SetFormatMode(FORMAT_CENTRE_HORIZ | FORMAT_CENTRE_VERT); - region->SetColour("BLACK"); -} - -wxShape::~wxShape() -{ - if (m_parent) - m_parent->GetChildren().DeleteObject(this); - - ClearText(); - ClearRegions(); - ClearAttachments(); - - if (m_canvas) - m_canvas->RemoveShape(this); - - GetEventHandler()->OnDelete(); -} - -void wxShape::SetHighlight(bool hi, bool recurse) -{ - m_highlighted = hi; - if (recurse) - { - wxNode *node = m_children.First(); - while (node) - { - wxShape *child = (wxShape *)node->Data(); - child->SetHighlight(hi, recurse); - node = node->Next(); - } - } -} - -void wxShape::SetSensitivityFilter(int sens, bool recursive) -{ - if (sens & OP_DRAG_LEFT) - m_draggable = TRUE; - else - m_draggable = FALSE; - - m_sensitivity = sens; - if (recursive) - { - wxNode *node = m_children.First(); - while (node) - { - wxShape *obj = (wxShape *)node->Data(); - obj->SetSensitivityFilter(sens, TRUE); - node = node->Next(); - } - } -} - -void wxShape::SetDraggable(bool drag, bool recursive) -{ - m_draggable = drag; - if (m_draggable) - m_sensitivity |= OP_DRAG_LEFT; - else - if (m_sensitivity & OP_DRAG_LEFT) - m_sensitivity = m_sensitivity - OP_DRAG_LEFT; - - if (recursive) - { - wxNode *node = m_children.First(); - while (node) - { - wxShape *obj = (wxShape *)node->Data(); - obj->SetDraggable(drag, TRUE); - node = node->Next(); - } - } -} - -void wxShape::SetDrawHandles(bool drawH) -{ - m_drawHandles = drawH; - wxNode *node = m_children.First(); - while (node) - { - wxShape *obj = (wxShape *)node->Data(); - obj->SetDrawHandles(drawH); - node = node->Next(); - } -} - -void wxShape::SetShadowMode(int mode, bool redraw) -{ - if (redraw && GetCanvas()) - { - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - Erase(dc); - - m_shadowMode = mode; - - Draw(dc); - } - else - { - m_shadowMode = mode; - } -} - -void wxShape::SetCanvas(wxShapeCanvas *theCanvas) -{ - m_canvas = theCanvas; - wxNode *node = m_children.First(); - while (node) - { - wxShape *child = (wxShape *)node->Data(); - child->SetCanvas(theCanvas); - node = node->Next(); - } -} - -void wxShape::AddToCanvas(wxShapeCanvas *theCanvas, wxShape *addAfter) -{ - theCanvas->AddShape(this, addAfter); - wxNode *node = m_children.First(); - wxShape *lastImage = this; - while (node) - { - wxShape *object = (wxShape *)node->Data(); - object->AddToCanvas(theCanvas, lastImage); - lastImage = object; - - node = node->Next(); - } -} - -// Insert at front of canvas -void wxShape::InsertInCanvas(wxShapeCanvas *theCanvas) -{ - theCanvas->InsertShape(this); - wxNode *node = m_children.First(); - wxShape *lastImage = this; - while (node) - { - wxShape *object = (wxShape *)node->Data(); - object->AddToCanvas(theCanvas, lastImage); - lastImage = object; - - node = node->Next(); - } -} - -void wxShape::RemoveFromCanvas(wxShapeCanvas *theCanvas) -{ - if (Selected()) - Select(FALSE); - theCanvas->RemoveShape(this); - wxNode *node = m_children.First(); - while (node) - { - wxShape *object = (wxShape *)node->Data(); - object->RemoveFromCanvas(theCanvas); - - node = node->Next(); - } -} - -void wxShape::ClearAttachments() -{ - wxNode *node = m_attachmentPoints.First(); - while (node) - { - wxAttachmentPoint *point = (wxAttachmentPoint *)node->Data(); - delete point; - node = node->Next(); - } - m_attachmentPoints.Clear(); -} - -void wxShape::ClearText(int regionId) -{ - if (regionId == 0) - { - m_text.DeleteContents(TRUE); - m_text.Clear(); - m_text.DeleteContents(FALSE); - } - wxNode *node = m_regions.Nth(regionId); - if (!node) - return; - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - region->ClearText(); -} - -void wxShape::ClearRegions() -{ - wxNode *node = m_regions.First(); - while (node) - { - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - wxNode *next = node->Next(); - delete region; - delete node; - node = next; - } -} - -void wxShape::AddRegion(wxShapeRegion *region) -{ - m_regions.Append(region); -} - -void wxShape::SetDefaultRegionSize() -{ - wxNode *node = m_regions.First(); - if (!node) return; - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - double w, h; - GetBoundingBoxMin(&w, &h); - region->SetSize(w, h); -} - -bool wxShape::HitTest(double x, double y, int *attachment, double *distance) -{ -// if (!sensitive) -// return FALSE; - - double width = 0.0, height = 0.0; - GetBoundingBoxMin(&width, &height); - if (fabs(width) < 4.0) width = 4.0; - if (fabs(height) < 4.0) height = 4.0; - - width += (double)4.0; height += (double)4.0; // Allowance for inaccurate mousing - - double left = (double)(m_xpos - (width/2.0)); - double top = (double)(m_ypos - (height/2.0)); - double right = (double)(m_xpos + (width/2.0)); - double bottom = (double)(m_ypos + (height/2.0)); - - int nearest_attachment = 0; - - - // If within the bounding box, check the attachment points - // within the object. - - if (x >= left && x <= right && y >= top && y <= bottom) - { - int n = GetNumberOfAttachments(); - double nearest = 999999.0; - - for (int i = 0; i < n; i++) - { - double xp, yp; - if (GetAttachmentPosition(i, &xp, &yp)) - { - double l = (double)sqrt(((xp - x) * (xp - x)) + - ((yp - y) * (yp - y))); - - if (l < nearest) - { - nearest = l; - nearest_attachment = i; - } - } - } - *attachment = nearest_attachment; - *distance = nearest; - return TRUE; - } - else return FALSE; -} - -// Format a text string according to the region size, adding -// strings with positions to region text list - -static bool GraphicsInSizeToContents = FALSE; // Infinite recursion elimination -void wxShape::FormatText(wxDC& dc, const wxString& s, int i) -{ - double w, h; - ClearText(i); - - if (m_regions.Number() < 1) - return; - wxNode *node = m_regions.Nth(i); - if (!node) - return; - - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - region->SetText(s); - dc.SetFont(region->GetFont()); - - region->GetSize(&w, &h); - - wxStringList *stringList = oglFormatText(dc, s, (w-5), (h-5), region->GetFormatMode()); - node = stringList->First(); - while (node) - { - char *s = (char *)node->Data(); - wxShapeTextLine *line = new wxShapeTextLine(0.0, 0.0, s); - region->GetFormattedText().Append((wxObject *)line); - node = node->Next(); - } - delete stringList; - double actualW = w; - double actualH = h; - // Don't try to resize an object with more than one image (this case should be dealt - // with by overriden handlers) - if ((region->GetFormatMode() & FORMAT_SIZE_TO_CONTENTS) && - (region->GetFormattedText().Number() > 0) && - (m_regions.Number() == 1) && !GraphicsInSizeToContents) - { - oglGetCentredTextExtent(dc, &(region->GetFormattedText()), m_xpos, m_ypos, w, h, &actualW, &actualH); - if ((actualW+m_textMarginX != w ) || (actualH+m_textMarginY != h)) - { - // If we are a descendant of a composite, must make sure the composite gets - // resized properly - wxShape *topAncestor = GetTopAncestor(); - - if (topAncestor != this) - { - // Make sure we don't recurse infinitely - GraphicsInSizeToContents = TRUE; - - wxCompositeShape *composite = (wxCompositeShape *)topAncestor; - composite->Erase(dc); - SetSize(actualW+m_textMarginX, actualH+m_textMarginY); - Move(dc, m_xpos, m_ypos); - composite->CalculateSize(); - if (composite->Selected()) - { - composite->DeleteControlPoints(& dc); - composite->MakeControlPoints(); - composite->MakeMandatoryControlPoints(); - } - // Where infinite recursion might happen if we didn't stop it - composite->Draw(dc); - - GraphicsInSizeToContents = FALSE; - } - else - { - Erase(dc); - SetSize(actualW+m_textMarginX, actualH+m_textMarginY); - Move(dc, m_xpos, m_ypos); - } - SetSize(actualW+m_textMarginX, actualH+m_textMarginY); - Move(dc, m_xpos, m_ypos); - EraseContents(dc); - } - } - oglCentreText(dc, &(region->GetFormattedText()), m_xpos, m_ypos, actualW, actualH, region->GetFormatMode()); - m_formatted = TRUE; -} - -void wxShape::Recentre(wxDC& dc) -{ - double w, h; - GetBoundingBoxMin(&w, &h); - - int noRegions = m_regions.Number(); - for (int i = 0; i < noRegions; i++) - { - wxNode *node = m_regions.Nth(i); - if (node) - { - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - oglCentreText(dc, &(region->GetFormattedText()), m_xpos, m_ypos, w, h, region->GetFormatMode()); - } - } -} - -bool wxShape::GetPerimeterPoint(double x1, double y1, - double x2, double y2, - double *x3, double *y3) -{ - return FALSE; -} - -void wxShape::SetPen(wxPen *the_pen) -{ - m_pen = the_pen; -} - -void wxShape::SetBrush(wxBrush *the_brush) -{ - m_brush = the_brush; -} - -// Get the top-most (non-division) ancestor, or self -wxShape *wxShape::GetTopAncestor() -{ - if (!GetParent()) - return this; - - if (GetParent()->IsKindOf(CLASSINFO(wxDivisionShape))) - return this; - else return GetParent()->GetTopAncestor(); -} - -/* - * Region functions - * - */ -void wxShape::SetFont(wxFont *the_font, int regionId) -{ - m_font = the_font; - wxNode *node = m_regions.Nth(regionId); - if (!node) - return; - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - region->SetFont(the_font); -} - -wxFont *wxShape::GetFont(int n) const -{ - wxNode *node = m_regions.Nth(n); - if (!node) - return NULL; - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - return region->GetFont(); -} - -void wxShape::SetFormatMode(int mode, int regionId) -{ - wxNode *node = m_regions.Nth(regionId); - if (!node) - return; - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - region->SetFormatMode(mode); -} - -int wxShape::GetFormatMode(int regionId) const -{ - wxNode *node = m_regions.Nth(regionId); - if (!node) - return 0; - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - return region->GetFormatMode(); -} - -void wxShape::SetTextColour(const wxString& the_colour, int regionId) -{ - wxColour *wxcolour = wxTheColourDatabase->FindColour(the_colour); - m_textColour = wxcolour; - m_textColourName = the_colour; - - wxNode *node = m_regions.Nth(regionId); - if (!node) - return; - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - region->SetColour(the_colour); -} - -wxString wxShape::GetTextColour(int regionId) const -{ - wxNode *node = m_regions.Nth(regionId); - if (!node) - return wxString(""); - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - return region->GetColour(); -} - -void wxShape::SetRegionName(const wxString& name, int regionId) -{ - wxNode *node = m_regions.Nth(regionId); - if (!node) - return; - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - region->SetName(name); -} - -wxString wxShape::GetRegionName(int regionId) -{ - wxNode *node = m_regions.Nth(regionId); - if (!node) - return wxString(""); - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - return region->GetName(); -} - -int wxShape::GetRegionId(const wxString& name) -{ - wxNode *node = m_regions.First(); - int i = 0; - while (node) - { - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - if (region->GetName() == name) - return i; - node = node->Next(); - i ++; - } - return -1; -} - -// Name all m_regions in all subimages recursively. -void wxShape::NameRegions(const wxString& parentName) -{ - int n = GetNumberOfTextRegions(); - char buf[100]; - for (int i = 0; i < n; i++) - { - if (parentName.Length() > 0) - sprintf(buf, "%s.%d", (const char*) parentName, i); - else - sprintf(buf, "%d", i); - SetRegionName(buf, i); - } - wxNode *node = m_children.First(); - int j = 0; - while (node) - { - wxShape *child = (wxShape *)node->Data(); - if (parentName.Length() > 0) - sprintf(buf, "%s.%d", (const char*) parentName, j); - else - sprintf(buf, "%d", j); - child->NameRegions(buf); - node = node->Next(); - j ++; - } -} - -// Get a region by name, possibly looking recursively into composites. -wxShape *wxShape::FindRegion(const wxString& name, int *regionId) -{ - int id = GetRegionId(name); - if (id > -1) - { - *regionId = id; - return this; - } - - wxNode *node = m_children.First(); - while (node) - { - wxShape *child = (wxShape *)node->Data(); - wxShape *actualImage = child->FindRegion(name, regionId); - if (actualImage) - return actualImage; - node = node->Next(); - } - return NULL; -} - -// Finds all region names for this image (composite or simple). -// Supply empty string list. -void wxShape::FindRegionNames(wxStringList& list) -{ - int n = GetNumberOfTextRegions(); - for (int i = 0; i < n; i++) - { - wxString name(GetRegionName(i)); - list.Add((const char*) name); - } - - wxNode *node = m_children.First(); - while (node) - { - wxShape *child = (wxShape *)node->Data(); - child->FindRegionNames(list); - node = node->Next(); - } -} - -void wxShape::AssignNewIds() -{ -// if (m_id == 0) - m_id = NewId(); - wxNode *node = m_children.First(); - while (node) - { - wxShape *child = (wxShape *)node->Data(); - child->AssignNewIds(); - node = node->Next(); - } -} - -void wxShape::OnDraw(wxDC& dc) -{ -} - -void wxShape::OnMoveLinks(wxDC& dc) -{ - // Want to set the ends of all attached links - // to point to/from this object - - wxNode *current = m_lines.First(); - while (current) - { - wxLineShape *line = (wxLineShape *)current->Data(); - line->GetEventHandler()->OnMoveLink(dc); - current = current->Next(); - } -} - - -void wxShape::OnDrawContents(wxDC& dc) -{ - double bound_x, bound_y; - GetBoundingBoxMin(&bound_x, &bound_y); - if (m_regions.Number() < 1) return; - - if (m_pen) dc.SetPen(m_pen); - - wxShapeRegion *region = (wxShapeRegion *)m_regions.First()->Data(); - if (region->GetFont()) dc.SetFont(region->GetFont()); - - dc.SetTextForeground(* (region->GetActualColourObject())); - dc.SetBackgroundMode(wxTRANSPARENT); - if (!m_formatted) - { - oglCentreText(dc, &(region->GetFormattedText()), m_xpos, m_ypos, bound_x, bound_y, region->GetFormatMode()); - m_formatted = TRUE; - } - if (!GetDisableLabel()) - { - oglDrawFormattedText(dc, &(region->GetFormattedText()), m_xpos, m_ypos, bound_x, bound_y, region->GetFormatMode()); - } -} - -void wxShape::DrawContents(wxDC& dc) -{ - GetEventHandler()->OnDrawContents(dc); -} - -void wxShape::OnSize(double x, double y) -{ -} - -bool wxShape::OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display) -{ - return TRUE; -} - -void wxShape::OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display) -{ -} - -void wxShape::OnErase(wxDC& dc) -{ - if (!m_visible) - return; - - // Erase links - wxNode *current = m_lines.First(); - while (current) - { - wxLineShape *line = (wxLineShape *)current->Data(); - line->GetEventHandler()->OnErase(dc); - current = current->Next(); - } - GetEventHandler()->OnEraseContents(dc); -} - -void wxShape::OnEraseContents(wxDC& dc) -{ - if (!m_visible) - return; - - double maxX, maxY, minX, minY; - double xp = GetX(); - double yp = GetY(); - GetBoundingBoxMin(&minX, &minY); - GetBoundingBoxMax(&maxX, &maxY); - double topLeftX = (double)(xp - (maxX / 2.0) - 2.0); - double topLeftY = (double)(yp - (maxY / 2.0) - 2.0); - - int penWidth = 0; - if (m_pen) - penWidth = m_pen->GetWidth(); - - dc.SetPen(g_oglWhiteBackgroundPen); - dc.SetBrush(g_oglWhiteBackgroundBrush); - dc.DrawRectangle(WXROUND(topLeftX - penWidth), WXROUND(topLeftY - penWidth), - WXROUND(maxX + penWidth*2.0 + 4.0), WXROUND(maxY + penWidth*2.0 + 4.0)); -} - -void wxShape::EraseLinks(wxDC& dc, int attachment, bool recurse) -{ - if (!m_visible) - return; - - wxNode *current = m_lines.First(); - while (current) - { - wxLineShape *line = (wxLineShape *)current->Data(); - if (attachment == -1 || ((line->GetTo() == this && line->GetAttachmentTo() == attachment) || - (line->GetFrom() == this && line->GetAttachmentFrom() == attachment))) - line->GetEventHandler()->OnErase(dc); - current = current->Next(); - } - if (recurse) - { - wxNode *node = m_children.First(); - while (node) - { - wxShape *child = (wxShape *)node->Data(); - child->EraseLinks(dc, attachment, recurse); - node = node->Next(); - } - } -} - -void wxShape::DrawLinks(wxDC& dc, int attachment, bool recurse) -{ - if (!m_visible) - return; - - wxNode *current = m_lines.First(); - while (current) - { - wxLineShape *line = (wxLineShape *)current->Data(); - if (attachment == -1 || - (line->GetTo() == this && line->GetAttachmentTo() == attachment) || - (line->GetFrom() == this && line->GetAttachmentFrom() == attachment)) - line->Draw(dc); - current = current->Next(); - } - if (recurse) - { - wxNode *node = m_children.First(); - while (node) - { - wxShape *child = (wxShape *)node->Data(); - child->DrawLinks(dc, attachment, recurse); - node = node->Next(); - } - } -} - -// Returns TRUE if pt1 <= pt2 in the sense that one point comes before another on an -// edge of the shape. -// attachmentPoint is the attachment point (= side) in question. - -// This is the default, rectangular implementation. -bool wxShape::AttachmentSortTest(int attachmentPoint, const wxRealPoint& pt1, const wxRealPoint& pt2) -{ - switch (attachmentPoint) - { - case 0: - case 2: - { - return (pt1.x <= pt2.x) ; - break; - } - case 1: - case 3: - { - return (pt1.y <= pt2.y) ; - break; - } - } - - return FALSE; -} - -void wxShape::MoveLineToNewAttachment(wxDC& dc, wxLineShape *to_move, - double x, double y) -{ - if (!GetAttachmentMode()) - return; - - int newAttachment, oldAttachment; - double distance; - - // Is (x, y) on this object? If so, find the new attachment point - // the user has moved the point to - bool hit = HitTest(x, y, &newAttachment, &distance); - if (!hit) - return; - - EraseLinks(dc); - - if (to_move->GetTo() == this) - oldAttachment = to_move->GetAttachmentTo(); - else - oldAttachment = to_move->GetAttachmentFrom(); - - // The links in a new ordering. - wxList newOrdering; - - // First, add all links to the new list. - wxNode *node = m_lines.First(); - while (node) - { - newOrdering.Append(node->Data()); - node = node->Next(); - } - - // Delete the line object from the list of links; we're going to move - // it to another position in the list - newOrdering.DeleteObject(to_move); - - double old_x = (double) -99999.9; - double old_y = (double) -99999.9; - - node = newOrdering.First(); - bool found = FALSE; - - while (!found && node) - { - wxLineShape *line = (wxLineShape *)node->Data(); - if ((line->GetTo() == this && oldAttachment == line->GetAttachmentTo()) || - (line->GetFrom() == this && oldAttachment == line->GetAttachmentFrom())) - { - double startX, startY, endX, endY; - double xp, yp; - line->GetEnds(&startX, &startY, &endX, &endY); - if (line->GetTo() == this) - { - xp = endX; - yp = endY; - } else - { - xp = startX; - yp = startY; - } - - wxRealPoint thisPoint(xp, yp); - wxRealPoint lastPoint(old_x, old_y); - wxRealPoint newPoint(x, y); - - if (AttachmentSortTest(newAttachment, newPoint, thisPoint) && AttachmentSortTest(newAttachment, lastPoint, newPoint)) - { - found = TRUE; - newOrdering.Insert(node, to_move); - } - - old_x = xp; - old_y = yp; - } - node = node->Next(); - } - - if (!found) - newOrdering.Append(to_move); - - GetEventHandler()->OnChangeAttachment(newAttachment, to_move, newOrdering); -} - -void wxShape::OnChangeAttachment(int attachment, wxLineShape* line, wxList& ordering) -{ - if (line->GetTo() == this) - line->SetAttachmentTo(attachment); - else - line->SetAttachmentFrom(attachment); - - ApplyAttachmentOrdering(ordering); - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - MoveLinks(dc); - - if (!GetCanvas()->GetQuickEditMode()) GetCanvas()->Redraw(dc); -} - -// Reorders the lines according to the given list. -void wxShape::ApplyAttachmentOrdering(wxList& linesToSort) -{ - // This is a temporary store of all the lines. - wxList linesStore; - - wxNode *node = m_lines.First(); - while (node) - { - wxLineShape *line = (wxLineShape *)node->Data(); - linesStore.Append(line); - node = node->Next();; - } - - m_lines.Clear(); - - node = linesToSort.First(); - while (node) - { - wxLineShape *line = (wxLineShape *)node->Data(); - if (linesStore.Member(line)) - { - // Done this one - linesStore.DeleteObject(line); - m_lines.Append(line); - } - node = node->Next(); - } - - // Now add any lines that haven't been listed in linesToSort. - node = linesStore.First(); - while (node) - { - wxLineShape *line = (wxLineShape *)node->Data(); - m_lines.Append(line); - node = node->Next(); - } -} - -// Reorders the lines coming into the node image at this attachment -// position, in the order in which they appear in linesToSort. -// Any remaining lines not in the list will be added to the end. -void wxShape::SortLines(int attachment, wxList& linesToSort) -{ - // This is a temporary store of all the lines at this attachment - // point. We'll tick them off as we've processed them. - wxList linesAtThisAttachment; - - wxNode *node = m_lines.First(); - while (node) - { - wxLineShape *line = (wxLineShape *)node->Data(); - wxNode *next = node->Next(); - if ((line->GetTo() == this && line->GetAttachmentTo() == attachment) || - (line->GetFrom() == this && line->GetAttachmentFrom() == attachment)) - { - linesAtThisAttachment.Append(line); - delete node; - node = next; - } - else node = node->Next(); - } - - node = linesToSort.First(); - while (node) - { - wxLineShape *line = (wxLineShape *)node->Data(); - if (linesAtThisAttachment.Member(line)) - { - // Done this one - linesAtThisAttachment.DeleteObject(line); - m_lines.Append(line); - } - node = node->Next(); - } - - // Now add any lines that haven't been listed in linesToSort. - node = linesAtThisAttachment.First(); - while (node) - { - wxLineShape *line = (wxLineShape *)node->Data(); - m_lines.Append(line); - node = node->Next(); - } -} - -void wxShape::OnHighlight(wxDC& dc) -{ -} - -void wxShape::OnLeftClick(double x, double y, int keys, int attachment) -{ - if ((m_sensitivity & OP_CLICK_LEFT) != OP_CLICK_LEFT) - { - attachment = 0; - double dist; - if (m_parent) - { - m_parent->HitTest(x, y, &attachment, &dist); - m_parent->GetEventHandler()->OnLeftClick(x, y, keys, attachment); - } - return; - } -} - -void wxShape::OnRightClick(double x, double y, int keys, int attachment) -{ - if ((m_sensitivity & OP_CLICK_RIGHT) != OP_CLICK_RIGHT) - { - attachment = 0; - double dist; - if (m_parent) - { - m_parent->HitTest(x, y, &attachment, &dist); - m_parent->GetEventHandler()->OnRightClick(x, y, keys, attachment); - } - return; - } -} - -double DragOffsetX = 0.0; -double DragOffsetY = 0.0; - -void wxShape::OnDragLeft(bool draw, double x, double y, int keys, int attachment) -{ - if ((m_sensitivity & OP_DRAG_LEFT) != OP_DRAG_LEFT) - { - attachment = 0; - double dist; - if (m_parent) - { - m_parent->HitTest(x, y, &attachment, &dist); - m_parent->GetEventHandler()->OnDragLeft(draw, x, y, keys, attachment); - } - return; - } - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - dc.SetLogicalFunction(wxXOR); - - wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT); - dc.SetPen(dottedPen); - dc.SetBrush(* wxTRANSPARENT_BRUSH); - - double xx, yy; - xx = x + DragOffsetX; - yy = y + DragOffsetY; - - m_canvas->Snap(&xx, &yy); -// m_xpos = xx; m_ypos = yy; - double w, h; - GetBoundingBoxMax(&w, &h); - GetEventHandler()->OnDrawOutline(dc, xx, yy, w, h); -} - -void wxShape::OnBeginDragLeft(double x, double y, int keys, int attachment) -{ - if ((m_sensitivity & OP_DRAG_LEFT) != OP_DRAG_LEFT) - { - attachment = 0; - double dist; - if (m_parent) - { - m_parent->HitTest(x, y, &attachment, &dist); - m_parent->GetEventHandler()->OnBeginDragLeft(x, y, keys, attachment); - } - return; - } - - DragOffsetX = m_xpos - x; - DragOffsetY = m_ypos - y; - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - // New policy: don't erase shape until end of drag. -// Erase(dc); - - double xx, yy; - xx = x + DragOffsetX; - yy = y + DragOffsetY; - m_canvas->Snap(&xx, &yy); -// m_xpos = xx; m_ypos = yy; - dc.SetLogicalFunction(wxXOR); - - wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT); - dc.SetPen(dottedPen); - dc.SetBrush((* wxTRANSPARENT_BRUSH)); - - double w, h; - GetBoundingBoxMax(&w, &h); - GetEventHandler()->OnDrawOutline(dc, xx, yy, w, h); - m_canvas->CaptureMouse(); -} - -void wxShape::OnEndDragLeft(double x, double y, int keys, int attachment) -{ - m_canvas->ReleaseMouse(); - if ((m_sensitivity & OP_DRAG_LEFT) != OP_DRAG_LEFT) - { - attachment = 0; - double dist; - if (m_parent) - { - m_parent->HitTest(x, y, &attachment, &dist); - m_parent->GetEventHandler()->OnEndDragLeft(x, y, keys, attachment); - } - return; - } - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - dc.SetLogicalFunction(wxCOPY); - - double xx = x + DragOffsetX; - double yy = y + DragOffsetY; - m_canvas->Snap(&xx, &yy); -// canvas->Snap(&m_xpos, &m_ypos); - - // New policy: erase shape at end of drag. - Erase(dc); - - Move(dc, xx, yy); - if (m_canvas && !m_canvas->GetQuickEditMode()) m_canvas->Redraw(dc); -} - -void wxShape::OnDragRight(bool draw, double x, double y, int keys, int attachment) -{ - if ((m_sensitivity & OP_DRAG_RIGHT) != OP_DRAG_RIGHT) - { - attachment = 0; - double dist; - if (m_parent) - { - m_parent->HitTest(x, y, &attachment, &dist); - m_parent->GetEventHandler()->OnDragRight(draw, x, y, keys, attachment); - } - return; - } -} - -void wxShape::OnBeginDragRight(double x, double y, int keys, int attachment) -{ - if ((m_sensitivity & OP_DRAG_RIGHT) != OP_DRAG_RIGHT) - { - attachment = 0; - double dist; - if (m_parent) - { - m_parent->HitTest(x, y, &attachment, &dist); - m_parent->GetEventHandler()->OnBeginDragRight(x, y, keys, attachment); - } - return; - } -} - -void wxShape::OnEndDragRight(double x, double y, int keys, int attachment) -{ - if ((m_sensitivity & OP_DRAG_RIGHT) != OP_DRAG_RIGHT) - { - attachment = 0; - double dist; - if (m_parent) - { - m_parent->HitTest(x, y, &attachment, &dist); - m_parent->GetEventHandler()->OnEndDragRight(x, y, keys, attachment); - } - return; - } -} - -void wxShape::OnDrawOutline(wxDC& dc, double x, double y, double w, double h) -{ - double top_left_x = (double)(x - w/2.0); - double top_left_y = (double)(y - h/2.0); - double top_right_x = (double)(top_left_x + w); - double top_right_y = (double)top_left_y; - double bottom_left_x = (double)top_left_x; - double bottom_left_y = (double)(top_left_y + h); - double bottom_right_x = (double)top_right_x; - double bottom_right_y = (double)bottom_left_y; - - wxPoint points[5]; - points[0].x = WXROUND(top_left_x); points[0].y = WXROUND(top_left_y); - points[1].x = WXROUND(top_right_x); points[1].y = WXROUND(top_right_y); - points[2].x = WXROUND(bottom_right_x); points[2].y = WXROUND(bottom_right_y); - points[3].x = WXROUND(bottom_left_x); points[3].y = WXROUND(bottom_left_y); - points[4].x = WXROUND(top_left_x); points[4].y = WXROUND(top_left_y); - - dc.DrawLines(5, points); -} - -void wxShape::Attach(wxShapeCanvas *can) -{ - m_canvas = can; -} - -void wxShape::Detach() -{ - m_canvas = NULL; -} - -void wxShape::Move(wxDC& dc, double x, double y, bool display) -{ - double old_x = m_xpos; - double old_y = m_ypos; - - m_xpos = x; m_ypos = y; - - if (!GetEventHandler()->OnMovePre(dc, x, y, old_x, old_y, display)) - { - m_xpos = old_x; - m_ypos = old_y; - return; - } - - ResetControlPoints(); - - if (display) - Draw(dc); - - MoveLinks(dc); - - GetEventHandler()->OnMovePost(dc, x, y, old_x, old_y, display); -} - -void wxShape::MoveLinks(wxDC& dc) -{ - GetEventHandler()->OnMoveLinks(dc); -} - - -void wxShape::Draw(wxDC& dc) -{ - if (m_visible) - { - GetEventHandler()->OnDraw(dc); - GetEventHandler()->OnDrawContents(dc); - GetEventHandler()->OnDrawControlPoints(dc); - } -} - -void wxShape::Flash() -{ - if (GetCanvas()) - { - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - dc.SetLogicalFunction(wxXOR); - Draw(dc); - dc.SetLogicalFunction(wxCOPY); - Draw(dc); - } -} - -void wxShape::Show(bool show) -{ - m_visible = show; - wxNode *node = m_children.First(); - while (node) - { - wxShape *image = (wxShape *)node->Data(); - image->Show(show); - node = node->Next(); - } -} - -void wxShape::Erase(wxDC& dc) -{ - GetEventHandler()->OnErase(dc); - GetEventHandler()->OnEraseControlPoints(dc); -} - -void wxShape::EraseContents(wxDC& dc) -{ - GetEventHandler()->OnEraseContents(dc); -} - -void wxShape::AddText(const wxString& string) -{ - wxNode *node = m_regions.First(); - if (!node) - return; - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - region->ClearText(); - wxShapeTextLine *new_line = - new wxShapeTextLine(0.0, 0.0, string); - region->GetFormattedText().Append(new_line); - - m_formatted = FALSE; -} - -void wxShape::SetSize(double x, double y, bool recursive) -{ - SetAttachmentSize(x, y); - SetDefaultRegionSize(); -} - -void wxShape::SetAttachmentSize(double w, double h) -{ - double scaleX; - double scaleY; - double width, height; - GetBoundingBoxMin(&width, &height); - if (width == 0.0) - scaleX = 1.0; - else scaleX = w/width; - if (height == 0.0) - scaleY = 1.0; - else scaleY = h/height; - - wxNode *node = m_attachmentPoints.First(); - while (node) - { - wxAttachmentPoint *point = (wxAttachmentPoint *)node->Data(); - point->m_x = (double)(point->m_x * scaleX); - point->m_y = (double)(point->m_y * scaleY); - node = node->Next(); - } -} - -// Add line FROM this object -void wxShape::AddLine(wxLineShape *line, wxShape *other, - int attachFrom, int attachTo, - // The line ordering - int positionFrom, int positionTo) -{ - m_lines.DeleteObject(line); - other->m_lines.DeleteObject(line); - - if (positionFrom == -1) - m_lines.Append(line); - else - { - if (positionFrom < m_lines.Number()) - { - wxNode* node = m_lines.Nth(positionFrom); - m_lines.Insert(node, line); - } - else - m_lines.Append(line); - } - - if (positionTo == -1) - other->m_lines.Append(line); - else - { - if (positionTo < other->m_lines.Number()) - { - wxNode* node = other->m_lines.Nth(positionTo); - other->m_lines.Insert(node, line); - } - else - other->m_lines.Append(line); - } - - line->SetFrom(this); - line->SetTo(other); - line->SetAttachments(attachFrom, attachTo); -} - -void wxShape::RemoveLine(wxLineShape *line) -{ - if (line->GetFrom() == this) - line->GetTo()->m_lines.DeleteObject(line); - else - line->GetFrom()->m_lines.DeleteObject(line); - - m_lines.DeleteObject(line); -} - -#ifdef PROLOGIO -char *wxShape::GetFunctor() -{ - return "node_image"; -} - -void wxShape::WritePrologAttributes(wxExpr *clause) -{ - clause->AddAttributeValueString("type", GetClassInfo()->GetClassName()); - clause->AddAttributeValue("id", m_id); - - if (m_pen) - { - int penWidth = m_pen->GetWidth(); - int penStyle = m_pen->GetStyle(); - if (penWidth != 1) - clause->AddAttributeValue("pen_width", (long)penWidth); - if (penStyle != wxSOLID) - clause->AddAttributeValue("pen_style", (long)penStyle); - - wxString penColour = wxTheColourDatabase->FindName(m_pen->GetColour()); - if (penColour == "") - { - wxString hex(oglColourToHex(m_pen->GetColour())); - hex = wxString("#") + hex; - clause->AddAttributeValueString("pen_colour", hex); - } - else if (penColour != "BLACK") - clause->AddAttributeValueString("pen_colour", penColour); - } - - if (m_brush) - { - wxString brushColour = wxTheColourDatabase->FindName(m_brush->GetColour()); - - if (brushColour == "") - { - wxString hex(oglColourToHex(m_brush->GetColour())); - hex = wxString("#") + hex; - clause->AddAttributeValueString("brush_colour", hex); - } - else if (brushColour != "WHITE") - clause->AddAttributeValueString("brush_colour", brushColour); - - if (m_brush->GetStyle() != wxSOLID) - clause->AddAttributeValue("brush_style", (long)m_brush->GetStyle()); - } - - // Output line ids - - int n_lines = m_lines.Number(); - if (n_lines > 0) - { - wxExpr *list = new wxExpr(PrologList); - wxNode *node = m_lines.First(); - while (node) - { - wxShape *line = (wxShape *)node->Data(); - wxExpr *id_expr = new wxExpr(line->GetId()); - list->Append(id_expr); - node = node->Next(); - } - clause->AddAttributeValue("arcs", list); - } - - // Miscellaneous members - if (m_attachmentMode != 0) - clause->AddAttributeValue("use_attachments", (long)m_attachmentMode); - if (m_sensitivity != OP_ALL) - clause->AddAttributeValue("sensitivity", (long)m_sensitivity); - if (!m_spaceAttachments) - clause->AddAttributeValue("space_attachments", (long)m_spaceAttachments); - if (m_fixedWidth) - clause->AddAttributeValue("fixed_width", (long)m_fixedWidth); - if (m_fixedHeight) - clause->AddAttributeValue("fixed_height", (long)m_fixedHeight); - if (m_shadowMode != SHADOW_NONE) - clause->AddAttributeValue("shadow_mode", (long)m_shadowMode); - if (m_centreResize != TRUE) - clause->AddAttributeValue("centre_resize", (long)0); - if (m_highlighted != FALSE) - clause->AddAttributeValue("hilite", (long)m_highlighted); - - if (m_parent) // For composite objects - clause->AddAttributeValue("parent", (long)m_parent->GetId()); - - if (m_rotation != 0.0) - clause->AddAttributeValue("rotation", m_rotation); - - // Write user-defined attachment points, if any - if (m_attachmentPoints.Number() > 0) - { - wxExpr *attachmentList = new wxExpr(PrologList); - wxNode *node = m_attachmentPoints.First(); - while (node) - { - wxAttachmentPoint *point = (wxAttachmentPoint *)node->Data(); - wxExpr *pointExpr = new wxExpr(PrologList); - pointExpr->Append(new wxExpr((long)point->m_id)); - pointExpr->Append(new wxExpr(point->m_x)); - pointExpr->Append(new wxExpr(point->m_y)); - attachmentList->Append(pointExpr); - node = node->Next(); - } - clause->AddAttributeValue("user_attachments", attachmentList); - } - - // Write text regions - WriteRegions(clause); -} - -void wxShape::WriteRegions(wxExpr *clause) -{ - // Output regions as region1 = (...), region2 = (...), etc - // and formatted text as text1 = (...), text2 = (...) etc. - int regionNo = 1; - char regionNameBuf[20]; - char textNameBuf[20]; - wxNode *node = m_regions.First(); - while (node) - { - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - sprintf(regionNameBuf, "region%d", regionNo); - sprintf(textNameBuf, "text%d", regionNo); - - // Original text and region attributes: - // region1 = (regionName regionText x y width height minWidth minHeight proportionX proportionY - // formatMode fontSize fontFamily fontStyle fontWeight textColour) - wxExpr *regionExpr = new wxExpr(PrologList); - regionExpr->Append(new wxExpr(PrologString, (region->m_regionName ? region->m_regionName : ""))); - regionExpr->Append(new wxExpr(PrologString, (region->m_regionText ? region->m_regionText : ""))); - - regionExpr->Append(new wxExpr(region->m_x)); - regionExpr->Append(new wxExpr(region->m_y)); - regionExpr->Append(new wxExpr(region->GetWidth())); - regionExpr->Append(new wxExpr(region->GetHeight())); - - regionExpr->Append(new wxExpr(region->m_minWidth)); - regionExpr->Append(new wxExpr(region->m_minHeight)); - regionExpr->Append(new wxExpr(region->m_regionProportionX)); - regionExpr->Append(new wxExpr(region->m_regionProportionY)); - - regionExpr->Append(new wxExpr((long)region->m_formatMode)); - - regionExpr->Append(new wxExpr((long)(region->m_font ? region->m_font->GetPointSize() : 10))); - regionExpr->Append(new wxExpr((long)(region->m_font ? region->m_font->GetFamily() : wxDEFAULT))); - regionExpr->Append(new wxExpr((long)(region->m_font ? region->m_font->GetStyle() : wxDEFAULT))); - regionExpr->Append(new wxExpr((long)(region->m_font ? region->m_font->GetWeight() : wxNORMAL))); - regionExpr->Append(new wxExpr(PrologString, region->m_textColour ? region->m_textColour : "BLACK")); - - // New members for pen colour/style - regionExpr->Append(new wxExpr(PrologString, region->m_penColour ? region->m_penColour : "BLACK")); - regionExpr->Append(new wxExpr((long)region->m_penStyle)); - - // Formatted text: - // text1 = ((x y string) (x y string) ...) - wxExpr *textExpr = new wxExpr(PrologList); - - wxNode *textNode = region->m_formattedText.First(); - while (textNode) - { - wxShapeTextLine *line = (wxShapeTextLine *)textNode->Data(); - wxExpr *list2 = new wxExpr(PrologList); - list2->Append(new wxExpr(line->GetX())); - list2->Append(new wxExpr(line->GetY())); - list2->Append(new wxExpr(PrologString, line->GetText())); - textExpr->Append(list2); - textNode = textNode->Next(); - } - - // Now add both attributes to the clause - clause->AddAttributeValue(regionNameBuf, regionExpr); - clause->AddAttributeValue(textNameBuf, textExpr); - - node = node->Next(); - regionNo ++; - } -} - -void wxShape::ReadPrologAttributes(wxExpr *clause) -{ - clause->GetAttributeValue("id", m_id); - RegisterId(m_id); - - clause->GetAttributeValue("x", m_xpos); - clause->GetAttributeValue("y", m_ypos); - - // Input text strings (FOR COMPATIBILITY WITH OLD FILES ONLY. SEE REGION CODE BELOW.) - ClearText(); - wxExpr *strings = clause->AttributeValue("text"); - if (strings && strings->Type() == PrologList) - { - m_formatted = TRUE; // Assume text is formatted unless we prove otherwise - wxExpr *node = strings->value.first; - while (node) - { - wxExpr *string_expr = node; - double the_x = 0.0; - double the_y = 0.0; - wxString the_string(""); - - // string_expr can either be a string, or a list of - // 3 elements: x, y, and string. - if (string_expr->Type() == PrologString) - { - the_string = string_expr->StringValue(); - m_formatted = FALSE; - } - else if (string_expr->Type() == PrologList) - { - wxExpr *first = string_expr->value.first; - wxExpr *second = first ? first->next : NULL; - wxExpr *third = second ? second->next : NULL; - - if (first && second && third && - (first->Type() == PrologReal || first->Type() == PrologInteger) && - (second->Type() == PrologReal || second->Type() == PrologInteger) && - third->Type() == PrologString) - { - if (first->Type() == PrologReal) - the_x = first->RealValue(); - else the_x = (double)first->IntegerValue(); - - if (second->Type() == PrologReal) - the_y = second->RealValue(); - else the_y = (double)second->IntegerValue(); - - the_string = third->StringValue(); - } - } - wxShapeTextLine *line = - new wxShapeTextLine(the_x, the_y, (char*) (const char*) the_string); - m_text.Append(line); - - node = node->next; - } - } - - wxString pen_string = ""; - wxString brush_string = ""; - int pen_width = 1; - int pen_style = wxSOLID; - int brush_style = wxSOLID; - m_attachmentMode = FALSE; - - clause->GetAttributeValue("pen_colour", pen_string); - clause->GetAttributeValue("text_colour", m_textColourName); - - SetTextColour(m_textColourName); - - clause->GetAttributeValue("region_name", m_regionName); - - clause->GetAttributeValue("brush_colour", brush_string); - clause->GetAttributeValue("pen_width", pen_width); - clause->GetAttributeValue("pen_style", pen_style); - clause->GetAttributeValue("brush_style", brush_style); - - int iVal = (int) m_attachmentMode; - clause->GetAttributeValue("use_attachments", iVal); - m_attachmentMode = (iVal != 0); - - clause->GetAttributeValue("sensitivity", m_sensitivity); - - iVal = (int) m_spaceAttachments; - clause->GetAttributeValue("space_attachments", iVal); - m_spaceAttachments = (iVal != 0); - - iVal = (int) m_fixedWidth; - clause->GetAttributeValue("fixed_width", iVal); - m_fixedWidth = (iVal != 0); - - iVal = (int) m_fixedHeight; - clause->GetAttributeValue("fixed_height", iVal); - m_fixedHeight = (iVal != 0); - - clause->GetAttributeValue("format_mode", m_formatMode); - clause->GetAttributeValue("shadow_mode", m_shadowMode); - - iVal = (int) m_centreResize; - clause->GetAttributeValue("centre_resize", iVal); - m_centreResize = (iVal != 0); - - iVal = (int) m_highlighted; - clause->GetAttributeValue("hilite", iVal); - m_highlighted = (iVal != 0); - - clause->GetAttributeValue("rotation", m_rotation); - - if (pen_string == "") - pen_string = "BLACK"; - if (brush_string == "") - brush_string = "WHITE"; - - if (pen_string[0] == '#') - { - wxColour col(oglHexToColour(pen_string.After('#'))); - m_pen = wxThePenList->FindOrCreatePen(col, pen_width, pen_style); - } - else - m_pen = wxThePenList->FindOrCreatePen(pen_string, pen_width, pen_style); - - if (!m_pen) - m_pen = wxBLACK_PEN; - - if (brush_string[0] == '#') - { - wxColour col(oglHexToColour(brush_string.After('#'))); - m_brush = wxTheBrushList->FindOrCreateBrush(col, brush_style); - } - else - m_brush = wxTheBrushList->FindOrCreateBrush(brush_string, brush_style); - - if (!m_brush) - m_brush = wxWHITE_BRUSH; - - int point_size = 10; - clause->GetAttributeValue("point_size", point_size); - SetFont(oglMatchFont(point_size)); - - // Read user-defined attachment points, if any - wxExpr *attachmentList = clause->AttributeValue("user_attachments"); - if (attachmentList) - { - wxExpr *pointExpr = attachmentList->GetFirst(); - while (pointExpr) - { - wxExpr *idExpr = pointExpr->Nth(0); - wxExpr *xExpr = pointExpr->Nth(1); - wxExpr *yExpr = pointExpr->Nth(2); - if (idExpr && xExpr && yExpr) - { - wxAttachmentPoint *point = new wxAttachmentPoint; - point->m_id = (int)idExpr->IntegerValue(); - point->m_x = xExpr->RealValue(); - point->m_y = yExpr->RealValue(); - m_attachmentPoints.Append((wxObject *)point); - } - pointExpr = pointExpr->GetNext(); - } - } - - // Read text regions - ReadRegions(clause); -} - -void wxShape::ReadRegions(wxExpr *clause) -{ - ClearRegions(); - - // region1 = (regionName regionText x y width height minWidth minHeight proportionX proportionY - // formatMode fontSize fontFamily fontStyle fontWeight textColour) - int regionNo = 1; - char regionNameBuf[20]; - char textNameBuf[20]; - - wxExpr *regionExpr = NULL; - wxExpr *textExpr = NULL; - sprintf(regionNameBuf, "region%d", regionNo); - sprintf(textNameBuf, "text%d", regionNo); - - m_formatted = TRUE; // Assume text is formatted unless we prove otherwise - - while (regionExpr = clause->AttributeValue(regionNameBuf)) - { - /* - * Get the region information - * - */ - - wxString regionName(""); - wxString regionText(""); - double x = 0.0; - double y = 0.0; - double width = 0.0; - double height = 0.0; - double minWidth = 5.0; - double minHeight = 5.0; - double m_regionProportionX = -1.0; - double m_regionProportionY = -1.0; - int formatMode = FORMAT_NONE; - int fontSize = 10; - int fontFamily = wxSWISS; - int fontStyle = wxNORMAL; - int fontWeight = wxNORMAL; - wxString regionTextColour(""); - wxString penColour(""); - int penStyle = wxSOLID; - - if (regionExpr->Type() == PrologList) - { - wxExpr *nameExpr = regionExpr->Nth(0); - wxExpr *textExpr = regionExpr->Nth(1); - wxExpr *xExpr = regionExpr->Nth(2); - wxExpr *yExpr = regionExpr->Nth(3); - wxExpr *widthExpr = regionExpr->Nth(4); - wxExpr *heightExpr = regionExpr->Nth(5); - wxExpr *minWidthExpr = regionExpr->Nth(6); - wxExpr *minHeightExpr = regionExpr->Nth(7); - wxExpr *propXExpr = regionExpr->Nth(8); - wxExpr *propYExpr = regionExpr->Nth(9); - wxExpr *formatExpr = regionExpr->Nth(10); - wxExpr *sizeExpr = regionExpr->Nth(11); - wxExpr *familyExpr = regionExpr->Nth(12); - wxExpr *styleExpr = regionExpr->Nth(13); - wxExpr *weightExpr = regionExpr->Nth(14); - wxExpr *colourExpr = regionExpr->Nth(15); - wxExpr *penColourExpr = regionExpr->Nth(16); - wxExpr *penStyleExpr = regionExpr->Nth(17); - - regionName = nameExpr->StringValue(); - regionText = textExpr->StringValue(); - - x = xExpr->RealValue(); - y = yExpr->RealValue(); - - width = widthExpr->RealValue(); - height = heightExpr->RealValue(); - - minWidth = minWidthExpr->RealValue(); - minHeight = minHeightExpr->RealValue(); - - m_regionProportionX = propXExpr->RealValue(); - m_regionProportionY = propYExpr->RealValue(); - - formatMode = (int) formatExpr->IntegerValue(); - fontSize = (int)sizeExpr->IntegerValue(); - fontFamily = (int)familyExpr->IntegerValue(); - fontStyle = (int)styleExpr->IntegerValue(); - fontWeight = (int)weightExpr->IntegerValue(); - - if (colourExpr) - { - regionTextColour = colourExpr->StringValue(); - } - else - regionTextColour = "BLACK"; - - if (penColourExpr) - penColour = penColourExpr->StringValue(); - if (penStyleExpr) - penStyle = (int)penStyleExpr->IntegerValue(); - } - wxFont *font = wxTheFontList->FindOrCreateFont(fontSize, fontFamily, fontStyle, fontWeight); - - wxShapeRegion *region = new wxShapeRegion; - region->SetProportions(m_regionProportionX, m_regionProportionY); - region->SetFont(font); - region->SetSize(width, height); - region->SetPosition(x, y); - region->SetMinSize(minWidth, minHeight); - region->SetFormatMode(formatMode); - region->SetPenStyle(penStyle); - if (penColour != "") - region->SetPenColour(penColour); - - region->m_textColour = regionTextColour; - region->m_regionText = regionText; - region->m_regionName = regionName; - - m_regions.Append(region); - - /* - * Get the formatted text strings - * - */ - textExpr = clause->AttributeValue(textNameBuf); - if (textExpr && (textExpr->Type() == PrologList)) - { - wxExpr *node = textExpr->value.first; - while (node) - { - wxExpr *string_expr = node; - double the_x = 0.0; - double the_y = 0.0; - wxString the_string(""); - - // string_expr can either be a string, or a list of - // 3 elements: x, y, and string. - if (string_expr->Type() == PrologString) - { - the_string = string_expr->StringValue(); - m_formatted = FALSE; - } - else if (string_expr->Type() == PrologList) - { - wxExpr *first = string_expr->value.first; - wxExpr *second = first ? first->next : NULL; - wxExpr *third = second ? second->next : NULL; - - if (first && second && third && - (first->Type() == PrologReal || first->Type() == PrologInteger) && - (second->Type() == PrologReal || second->Type() == PrologInteger) && - third->Type() == PrologString) - { - if (first->Type() == PrologReal) - the_x = first->RealValue(); - else the_x = (double)first->IntegerValue(); - - if (second->Type() == PrologReal) - the_y = second->RealValue(); - else the_y = (double)second->IntegerValue(); - - the_string = third->StringValue(); - } - } - if (the_string) - { - wxShapeTextLine *line = - new wxShapeTextLine(the_x, the_y, (char*) (const char*) the_string); - region->m_formattedText.Append(line); - } - node = node->next; - } - } - - regionNo ++; - sprintf(regionNameBuf, "region%d", regionNo); - sprintf(textNameBuf, "text%d", regionNo); - } - - // Compatibility: check for no regions (old file). - // Lines and divided rectangles must deal with this compatibility - // theirselves. Composites _may_ not have any regions anyway. - if ((m_regions.Number() == 0) && - !this->IsKindOf(CLASSINFO(wxLineShape)) && !this->IsKindOf(CLASSINFO(wxDividedShape)) && - !this->IsKindOf(CLASSINFO(wxCompositeShape))) - { - wxShapeRegion *newRegion = new wxShapeRegion; - newRegion->SetName("0"); - m_regions.Append((wxObject *)newRegion); - if (m_text.Number() > 0) - { - newRegion->ClearText(); - wxNode *node = m_text.First(); - while (node) - { - wxShapeTextLine *textLine = (wxShapeTextLine *)node->Data(); - wxNode *next = node->Next(); - newRegion->GetFormattedText().Append((wxObject *)textLine); - delete node; - node = next; - } - } - } -} - -#endif - -void wxShape::Copy(wxShape& copy) -{ - copy.m_id = m_id; - copy.m_xpos = m_xpos; - copy.m_ypos = m_ypos; - copy.m_pen = m_pen; - copy.m_brush = m_brush; - copy.m_textColour = m_textColour; - copy.m_centreResize = m_centreResize; - copy.m_attachmentMode = m_attachmentMode; - copy.m_spaceAttachments = m_spaceAttachments; - copy.m_highlighted = m_highlighted; - copy.m_rotation = m_rotation; - copy.m_textColourName = m_textColourName; - copy.m_regionName = m_regionName; - - copy.m_sensitivity = m_sensitivity; - copy.m_draggable = m_draggable; - copy.m_fixedWidth = m_fixedWidth; - copy.m_fixedHeight = m_fixedHeight; - copy.m_formatMode = m_formatMode; - copy.m_drawHandles = m_drawHandles; - - copy.m_visible = m_visible; - copy.m_shadowMode = m_shadowMode; - copy.m_shadowOffsetX = m_shadowOffsetX; - copy.m_shadowOffsetY = m_shadowOffsetY; - copy.m_shadowBrush = m_shadowBrush; - - // Copy text regions - copy.ClearRegions(); - wxNode *node = m_regions.First(); - while (node) - { - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - wxShapeRegion *newRegion = new wxShapeRegion(*region); - copy.m_regions.Append(newRegion); - node = node->Next(); - } - - // Copy attachments - copy.ClearAttachments(); - node = m_attachmentPoints.First(); - while (node) - { - wxAttachmentPoint *point = (wxAttachmentPoint *)node->Data(); - wxAttachmentPoint *newPoint = new wxAttachmentPoint; - newPoint->m_id = point->m_id; - newPoint->m_x = point->m_x; - newPoint->m_y = point->m_y; - copy.m_attachmentPoints.Append((wxObject *)newPoint); - node = node->Next(); - } - - // Copy lines - copy.m_lines.Clear(); - node = m_lines.First(); - while (node) - { - wxLineShape* line = (wxLineShape*) node->Data(); - copy.m_lines.Append(line); - node = node->Next(); - } -} - -// Create and return a new, fully copied object. -wxShape *wxShape::CreateNewCopy(bool resetMapping, bool recompute) -{ - if (resetMapping) - oglObjectCopyMapping.Clear(); - - wxShape* newObject = (wxShape*) GetClassInfo()->CreateObject(); - - wxASSERT( (newObject != NULL) ); - wxASSERT( (newObject->IsKindOf(CLASSINFO(wxShape))) ); - - Copy(*newObject); - - if (GetEventHandler() != this) - { - wxShapeEvtHandler* newHandler = GetEventHandler()->CreateNewCopy(); - newObject->SetEventHandler(newHandler); - newObject->SetPreviousHandler(NULL); - newHandler->SetPreviousHandler(newObject); - newHandler->SetShape(newObject); - } - - if (recompute) - newObject->Recompute(); - return newObject; -} - -// Does the copying for this object, including copying event -// handler data if any. Calls the virtual Copy function. -void wxShape::CopyWithHandler(wxShape& copy) -{ - Copy(copy); - - if (GetEventHandler() != this) - { - wxASSERT( copy.GetEventHandler() != NULL ); - wxASSERT( copy.GetEventHandler() != (©) ); - wxASSERT( GetEventHandler()->GetClassInfo() == copy.GetEventHandler()->GetClassInfo() ); - GetEventHandler()->CopyData(* (copy.GetEventHandler())); - } -} - - -// Default - make 6 control points -void wxShape::MakeControlPoints() -{ - double maxX, maxY, minX, minY; - - GetBoundingBoxMax(&maxX, &maxY); - GetBoundingBoxMin(&minX, &minY); - - double widthMin = (double)(minX + CONTROL_POINT_SIZE + 2); - double heightMin = (double)(minY + CONTROL_POINT_SIZE + 2); - - // Offsets from main object - double top = (double)(- (heightMin / 2.0)); - double bottom = (double)(heightMin / 2.0 + (maxY - minY)); - double left = (double)(- (widthMin / 2.0)); - double right = (double)(widthMin / 2.0 + (maxX - minX)); - - wxControlPoint *control = new wxControlPoint(m_canvas, this, CONTROL_POINT_SIZE, left, top, - CONTROL_POINT_DIAGONAL); - m_canvas->AddShape(control); - m_controlPoints.Append(control); - - control = new wxControlPoint(m_canvas, this, CONTROL_POINT_SIZE, 0, top, - CONTROL_POINT_VERTICAL); - m_canvas->AddShape(control); - m_controlPoints.Append(control); - - control = new wxControlPoint(m_canvas, this, CONTROL_POINT_SIZE, right, top, - CONTROL_POINT_DIAGONAL); - m_canvas->AddShape(control); - m_controlPoints.Append(control); - - control = new wxControlPoint(m_canvas, this, CONTROL_POINT_SIZE, right, 0, - CONTROL_POINT_HORIZONTAL); - m_canvas->AddShape(control); - m_controlPoints.Append(control); - - control = new wxControlPoint(m_canvas, this, CONTROL_POINT_SIZE, right, bottom, - CONTROL_POINT_DIAGONAL); - m_canvas->AddShape(control); - m_controlPoints.Append(control); - - control = new wxControlPoint(m_canvas, this, CONTROL_POINT_SIZE, 0, bottom, - CONTROL_POINT_VERTICAL); - m_canvas->AddShape(control); - m_controlPoints.Append(control); - - control = new wxControlPoint(m_canvas, this, CONTROL_POINT_SIZE, left, bottom, - CONTROL_POINT_DIAGONAL); - m_canvas->AddShape(control); - m_controlPoints.Append(control); - - control = new wxControlPoint(m_canvas, this, CONTROL_POINT_SIZE, left, 0, - CONTROL_POINT_HORIZONTAL); - m_canvas->AddShape(control); - m_controlPoints.Append(control); - -} - -void wxShape::MakeMandatoryControlPoints() -{ - wxNode *node = m_children.First(); - while (node) - { - wxShape *child = (wxShape *)node->Data(); - child->MakeMandatoryControlPoints(); - node = node->Next(); - } -} - -void wxShape::ResetMandatoryControlPoints() -{ - wxNode *node = m_children.First(); - while (node) - { - wxShape *child = (wxShape *)node->Data(); - child->ResetMandatoryControlPoints(); - node = node->Next(); - } -} - -void wxShape::ResetControlPoints() -{ - ResetMandatoryControlPoints(); - - if (m_controlPoints.Number() < 1) - return; - - double maxX, maxY, minX, minY; - - GetBoundingBoxMax(&maxX, &maxY); - GetBoundingBoxMin(&minX, &minY); - - double widthMin = (double)(minX + CONTROL_POINT_SIZE + 2); - double heightMin = (double)(minY + CONTROL_POINT_SIZE + 2); - - // Offsets from main object - double top = (double)(- (heightMin / 2.0)); - double bottom = (double)(heightMin / 2.0 + (maxY - minY)); - double left = (double)(- (widthMin / 2.0)); - double right = (double)(widthMin / 2.0 + (maxX - minX)); - - wxNode *node = m_controlPoints.First(); - wxControlPoint *control = (wxControlPoint *)node->Data(); - control->m_xoffset = left; control->m_yoffset = top; - - node = node->Next(); control = (wxControlPoint *)node->Data(); - control->m_xoffset = 0; control->m_yoffset = top; - - node = node->Next(); control = (wxControlPoint *)node->Data(); - control->m_xoffset = right; control->m_yoffset = top; - - node = node->Next(); control = (wxControlPoint *)node->Data(); - control->m_xoffset = right; control->m_yoffset = 0; - - node = node->Next(); control = (wxControlPoint *)node->Data(); - control->m_xoffset = right; control->m_yoffset = bottom; - - node = node->Next(); control = (wxControlPoint *)node->Data(); - control->m_xoffset = 0; control->m_yoffset = bottom; - - node = node->Next(); control = (wxControlPoint *)node->Data(); - control->m_xoffset = left; control->m_yoffset = bottom; - - node = node->Next(); control = (wxControlPoint *)node->Data(); - control->m_xoffset = left; control->m_yoffset = 0; -} - -void wxShape::DeleteControlPoints(wxDC *dc) -{ - wxNode *node = m_controlPoints.First(); - while (node) - { - wxControlPoint *control = (wxControlPoint *)node->Data(); - if (dc) - control->GetEventHandler()->OnErase(*dc); - m_canvas->RemoveShape(control); - delete control; - delete node; - node = m_controlPoints.First(); - } - // Children of divisions are contained objects, - // so stop here - if (!IsKindOf(CLASSINFO(wxDivisionShape))) - { - node = m_children.First(); - while (node) - { - wxShape *child = (wxShape *)node->Data(); - child->DeleteControlPoints(dc); - node = node->Next(); - } - } -} - -void wxShape::OnDrawControlPoints(wxDC& dc) -{ - if (!m_drawHandles) - return; - - dc.SetBrush(wxBLACK_BRUSH); - dc.SetPen(wxBLACK_PEN); - - wxNode *node = m_controlPoints.First(); - while (node) - { - wxControlPoint *control = (wxControlPoint *)node->Data(); - control->Draw(dc); - node = node->Next(); - } - // Children of divisions are contained objects, - // so stop here. - // This test bypasses the type facility for speed - // (critical when drawing) - if (!IsKindOf(CLASSINFO(wxDivisionShape))) - { - node = m_children.First(); - while (node) - { - wxShape *child = (wxShape *)node->Data(); - child->GetEventHandler()->OnDrawControlPoints(dc); - node = node->Next(); - } - } -} - -void wxShape::OnEraseControlPoints(wxDC& dc) -{ - wxNode *node = m_controlPoints.First(); - while (node) - { - wxControlPoint *control = (wxControlPoint *)node->Data(); - control->Erase(dc); - node = node->Next(); - } - if (!IsKindOf(CLASSINFO(wxDivisionShape))) - { - node = m_children.First(); - while (node) - { - wxShape *child = (wxShape *)node->Data(); - child->GetEventHandler()->OnEraseControlPoints(dc); - node = node->Next(); - } - } -} - -void wxShape::Select(bool select, wxDC* dc) -{ - m_selected = select; - if (select) - { - MakeControlPoints(); - // Children of divisions are contained objects, - // so stop here - if (!IsKindOf(CLASSINFO(wxDivisionShape))) - { - wxNode *node = m_children.First(); - while (node) - { - wxShape *child = (wxShape *)node->Data(); - child->MakeMandatoryControlPoints(); - node = node->Next(); - } - } - if (dc) - GetEventHandler()->OnDrawControlPoints(*dc); - } - if (!select) - { - DeleteControlPoints(dc); - if (!IsKindOf(CLASSINFO(wxDivisionShape))) - { - wxNode *node = m_children.First(); - while (node) - { - wxShape *child = (wxShape *)node->Data(); - child->DeleteControlPoints(dc); - node = node->Next(); - } - } - } -} - -bool wxShape::Selected() const -{ - return m_selected; -} - -bool wxShape::AncestorSelected() const -{ - if (m_selected) return TRUE; - if (!GetParent()) - return FALSE; - else - return GetParent()->AncestorSelected(); -} - -int wxShape::GetNumberOfAttachments() -{ - // Should return the MAXIMUM attachment point id here, - // so higher-level functions can iterate through all attachments, - // even if they're not contiguous. - if (m_attachmentPoints.Number() == 0) - return 4; - else - { - int maxN = 3; - wxNode *node = m_attachmentPoints.First(); - while (node) - { - wxAttachmentPoint *point = (wxAttachmentPoint *)node->Data(); - if (point->m_id > maxN) - maxN = point->m_id; - node = node->Next(); - } - return maxN+1;; - } -} - -bool wxShape::AttachmentIsValid(int attachment) -{ - if ((attachment >= 0) && (attachment < 4)) - return TRUE; - - wxNode *node = m_attachmentPoints.First(); - while (node) - { - wxAttachmentPoint *point = (wxAttachmentPoint *)node->Data(); - if (point->m_id == attachment) - return TRUE; - node = node->Next(); - } - return FALSE; -} - -bool wxShape::GetAttachmentPosition(int attachment, double *x, double *y, - int nth, int no_arcs, wxLineShape *line) -{ - if (!m_attachmentMode) - { - *x = m_xpos; *y = m_ypos; - return TRUE; - } - else - { - wxNode *node = m_attachmentPoints.First(); - while (node) - { - wxAttachmentPoint *point = (wxAttachmentPoint *)node->Data(); - if (point->m_id == attachment) - { - *x = (double)(m_xpos + point->m_x); - *y = (double)(m_ypos + point->m_y); - return TRUE; - } - node = node->Next(); - } - *x = m_xpos; *y = m_ypos; - return FALSE; - } -} - -void wxShape::GetBoundingBoxMax(double *w, double *h) -{ - double ww, hh; - GetBoundingBoxMin(&ww, &hh); - if (m_shadowMode != SHADOW_NONE) - { - ww += m_shadowOffsetX; - hh += m_shadowOffsetY; - } - *w = ww; - *h = hh; -} - -// Returns TRUE if image is a descendant of this composite -bool wxShape::HasDescendant(wxShape *image) -{ - if (image == this) - return TRUE; - wxNode *node = m_children.First(); - while (node) - { - wxShape *child = (wxShape *)node->Data(); - bool ans = child->HasDescendant(image); - if (ans) - return TRUE; - node = node->Next(); - } - return FALSE; -} - -// Clears points from a list of wxRealPoints, and clears list -void wxShape::ClearPointList(wxList& list) -{ - wxNode* node = list.First(); - while (node) - { - wxRealPoint* pt = (wxRealPoint*) node->Data(); - delete pt; - - node = node->Next(); - } - list.Clear(); -} - -// Assuming the attachment lies along a vertical or horizontal line, -// calculate the position on that point. -wxRealPoint wxShape::CalcSimpleAttachment(const wxRealPoint& pt1, const wxRealPoint& pt2, - int nth, int noArcs, wxLineShape* line) -{ - bool isEnd = (line && line->IsEnd(this)); - - // Are we horizontal or vertical? - bool isHorizontal = (oglRoughlyEqual(pt1.y, pt2.y) == TRUE); - - double x, y; - - if (isHorizontal) - { - wxRealPoint firstPoint, secondPoint; - if (pt1.x > pt2.x) - { - firstPoint = pt2; - secondPoint = pt1; - } - else - { - firstPoint = pt1; - secondPoint = pt2; - } - - if (m_spaceAttachments) - { - if (line && (line->GetAlignmentType(isEnd) == LINE_ALIGNMENT_TO_NEXT_HANDLE)) - { - // Align line according to the next handle along - wxRealPoint *point = line->GetNextControlPoint(this); - if (point->x < firstPoint.x) - x = firstPoint.x; - else if (point->x > secondPoint.x) - x = secondPoint.x; - else - x = point->x; - } - else - x = firstPoint.x + (nth + 1)*(secondPoint.x - firstPoint.x)/(noArcs + 1); - } - else x = (secondPoint.x - firstPoint.x)/2.0; // Midpoint - - y = pt1.y; - } - else - { - wxASSERT( oglRoughlyEqual(pt1.x, pt2.x) == TRUE ); - - wxRealPoint firstPoint, secondPoint; - if (pt1.y > pt2.y) - { - firstPoint = pt2; - secondPoint = pt1; - } - else - { - firstPoint = pt1; - secondPoint = pt2; - } - - if (m_spaceAttachments) - { - if (line && (line->GetAlignmentType(isEnd) == LINE_ALIGNMENT_TO_NEXT_HANDLE)) - { - // Align line according to the next handle along - wxRealPoint *point = line->GetNextControlPoint(this); - if (point->y < firstPoint.y) - y = firstPoint.y; - else if (point->y > secondPoint.y) - y = secondPoint.y; - else - y = point->y; - } - else - y = firstPoint.y + (nth + 1)*(secondPoint.y - firstPoint.y)/(noArcs + 1); - } - else y = (secondPoint.y - firstPoint.y)/2.0; // Midpoint - - x = pt1.x; - } - - return wxRealPoint(x, y); -} - -// Return the zero-based position in m_lines of line. -int wxShape::GetLinePosition(wxLineShape* line) -{ - int i = 0; - for (i = 0; i < m_lines.Number(); i++) - if ((wxLineShape*) (m_lines.Nth(i)->Data()) == line) - return i; - - return 0; -} - diff --git a/utils/ogl/src/basic.h b/utils/ogl/src/basic.h deleted file mode 100644 index bc3bb5f356..0000000000 --- a/utils/ogl/src/basic.h +++ /dev/null @@ -1,660 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: basic.h -// Purpose: Basic OGL classes and definitions -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _OGL_BASIC_H_ -#define _OGL_BASIC_H_ - -#ifdef __GNUG__ -#pragma interface "basic.h" -#endif - -#define OGL_VERSION 2.0 - -#ifndef DEFAULT_MOUSE_TOLERANCE -#define DEFAULT_MOUSE_TOLERANCE 3 -#endif - -// Edit these lines if you positively don't want PROLOGIO support -#ifndef PROLOGIO -#define PROLOGIO -#endif - -// Key identifiers -#define KEY_SHIFT 1 -#define KEY_CTRL 2 - -// Arrow styles - -#define ARROW_NONE 0 -#define ARROW_END 1 -#define ARROW_BOTH 2 -#define ARROW_MIDDLE 3 -#define ARROW_START 4 - -// Control point types -// Rectangle and most other shapes -#define CONTROL_POINT_VERTICAL 1 -#define CONTROL_POINT_HORIZONTAL 2 -#define CONTROL_POINT_DIAGONAL 3 - -// Line -#define CONTROL_POINT_ENDPOINT_TO 4 -#define CONTROL_POINT_ENDPOINT_FROM 5 -#define CONTROL_POINT_LINE 6 - -// Types of formatting: can be combined in a bit list -#define FORMAT_NONE 0 - // Left justification -#define FORMAT_CENTRE_HORIZ 1 - // Centre horizontally -#define FORMAT_CENTRE_VERT 2 - // Centre vertically -#define FORMAT_SIZE_TO_CONTENTS 4 - // Resize shape to contents - -// Shadow mode -#define SHADOW_NONE 0 -#define SHADOW_LEFT 1 -#define SHADOW_RIGHT 2 - -/* - * Declare types - * - */ - -#define SHAPE_BASIC wxTYPE_USER + 1 -#define SHAPE_RECTANGLE wxTYPE_USER + 2 -#define SHAPE_ELLIPSE wxTYPE_USER + 3 -#define SHAPE_POLYGON wxTYPE_USER + 4 -#define SHAPE_CIRCLE wxTYPE_USER + 5 -#define SHAPE_LINE wxTYPE_USER + 6 -#define SHAPE_DIVIDED_RECTANGLE wxTYPE_USER + 8 -#define SHAPE_COMPOSITE wxTYPE_USER + 9 -#define SHAPE_CONTROL_POINT wxTYPE_USER + 10 -#define SHAPE_DRAWN wxTYPE_USER + 11 -#define SHAPE_DIVISION wxTYPE_USER + 12 -#define SHAPE_LABEL_OBJECT wxTYPE_USER + 13 -#define SHAPE_BITMAP wxTYPE_USER + 14 -#define SHAPE_DIVIDED_OBJECT_CONTROL_POINT wxTYPE_USER + 15 - -#define OBJECT_REGION wxTYPE_USER + 20 - -#define OP_CLICK_LEFT 1 -#define OP_CLICK_RIGHT 2 -#define OP_DRAG_LEFT 4 -#define OP_DRAG_RIGHT 8 - -#define OP_ALL (OP_CLICK_LEFT | OP_CLICK_RIGHT | OP_DRAG_LEFT | OP_DRAG_RIGHT) - -class wxShapeTextLine; -class wxShapeCanvas; -class wxLineShape; -class wxControlPoint; -class wxShapeRegion; -class wxShape; - -#ifdef PROLOGIO -class WXDLLEXPORT wxExpr; -class WXDLLEXPORT wxExprDatabase; -#endif - -// Round up -#define WXROUND(x) ( (long) (x + 0.5) ) - -class wxShapeEvtHandler: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxShapeEvtHandler) - - public: - wxShapeEvtHandler(wxShapeEvtHandler *prev = NULL, wxShape *shape = NULL); - virtual ~wxShapeEvtHandler(); - - inline void SetShape(wxShape *sh) { m_handlerShape = sh; } - inline wxShape *GetShape() const { return m_handlerShape; } - - inline void SetPreviousHandler(wxShapeEvtHandler* handler) { m_previousHandler = handler; } - inline wxShapeEvtHandler* GetPreviousHandler() const { return m_previousHandler; } - - // This is called when the _shape_ is deleted. - virtual void OnDelete(); - virtual void OnDraw(wxDC& dc); - virtual void OnDrawContents(wxDC& dc); - virtual void OnMoveLinks(wxDC& dc); - virtual void OnErase(wxDC& dc); - virtual void OnEraseContents(wxDC& dc); - virtual void OnHighlight(wxDC& dc); - virtual void OnLeftClick(double x, double y, int keys = 0, int attachment = 0); - virtual void OnRightClick(double x, double y, int keys = 0, int attachment = 0); - virtual void OnSize(double x, double y); - virtual bool OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE); - virtual void OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE); - - virtual void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); // Erase if draw false - virtual void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); - virtual void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); - virtual void OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0); // Erase if draw false - virtual void OnBeginDragRight(double x, double y, int keys=0, int attachment = 0); - virtual void OnEndDragRight(double x, double y, int keys=0, int attachment = 0); - virtual void OnDrawOutline(wxDC& dc, double x, double y, double w, double h); - virtual void OnDrawControlPoints(wxDC& dc); - virtual void OnEraseControlPoints(wxDC& dc); - virtual void OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE); - - // Control points ('handles') redirect control to the actual shape, to make it easier - // to override sizing behaviour. - virtual void OnSizingDragLeft(wxControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); // Erase if draw false - virtual void OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0); - virtual void OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0); - - virtual void OnBeginSize(double WXUNUSED(w), double WXUNUSED(h)) { } - virtual void OnEndSize(double WXUNUSED(w), double WXUNUSED(h)) { } - - // Can override this to prevent or intercept line reordering. - virtual void OnChangeAttachment(int attachment, wxLineShape* line, wxList& ordering); - - // Creates a copy of this event handler. - wxShapeEvtHandler *CreateNewCopy(); - - // Does the copy - override for new event handlers which might store - // app-specific data. - virtual void CopyData(wxShapeEvtHandler& copy) {}; - - private: - wxShapeEvtHandler* m_previousHandler; - wxShape* m_handlerShape; -}; - -class wxShape: public wxShapeEvtHandler -{ - DECLARE_ABSTRACT_CLASS(wxShape) - - public: - - wxShape(wxShapeCanvas *can = NULL); - virtual ~wxShape(); - virtual void GetBoundingBoxMax(double *width, double *height); - virtual void GetBoundingBoxMin(double *width, double *height) = 0; - virtual bool GetPerimeterPoint(double x1, double y1, - double x2, double y2, - double *x3, double *y3); - inline wxShapeCanvas *GetCanvas() { return m_canvas; } - void SetCanvas(wxShapeCanvas *the_canvas); - virtual void AddToCanvas(wxShapeCanvas *the_canvas, wxShape *addAfter = NULL); - virtual void InsertInCanvas(wxShapeCanvas *the_canvas); - - virtual void RemoveFromCanvas(wxShapeCanvas *the_canvas); - inline double GetX() const { return m_xpos; } - inline double GetY() const { return m_ypos; } - inline void SetX(double x) { m_xpos = x; } - inline void SetY(double y) { m_ypos = y; } - - inline wxShape *GetParent() const { return m_parent; } - inline void SetParent(wxShape *p) { m_parent = p; } - wxShape *GetTopAncestor(); - inline wxList& GetChildren() { return m_children; } - - virtual void OnDraw(wxDC& dc); - virtual void OnDrawContents(wxDC& dc); - virtual void OnMoveLinks(wxDC& dc); - virtual void Unlink() { }; - void SetDrawHandles(bool drawH); - inline bool GetDrawHandles() { return m_drawHandles; } - virtual void OnErase(wxDC& dc); - virtual void OnEraseContents(wxDC& dc); - virtual void OnHighlight(wxDC& dc); - virtual void OnLeftClick(double x, double y, int keys = 0, int attachment = 0); - virtual void OnRightClick(double x, double y, int keys = 0, int attachment = 0); - virtual void OnSize(double x, double y); - virtual bool OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE); - virtual void OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE); - - virtual void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); // Erase if draw false - virtual void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); - virtual void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); - virtual void OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0); // Erase if draw false - virtual void OnBeginDragRight(double x, double y, int keys=0, int attachment = 0); - virtual void OnEndDragRight(double x, double y, int keys=0, int attachment = 0); - virtual void OnDrawOutline(wxDC& dc, double x, double y, double w, double h); - virtual void OnDrawControlPoints(wxDC& dc); - virtual void OnEraseControlPoints(wxDC& dc); - - virtual void OnBeginSize(double WXUNUSED(w), double WXUNUSED(h)) { } - virtual void OnEndSize(double WXUNUSED(w), double WXUNUSED(h)) { } - - // Control points ('handles') redirect control to the actual shape, to make it easier - // to override sizing behaviour. - virtual void OnSizingDragLeft(wxControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); // Erase if draw false - virtual void OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0); - virtual void OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0); - - virtual void MakeControlPoints(); - virtual void DeleteControlPoints(wxDC *dc = NULL); - virtual void ResetControlPoints(); - - inline wxShapeEvtHandler *GetEventHandler() { return m_eventHandler; } - inline void SetEventHandler(wxShapeEvtHandler *handler) { m_eventHandler = handler; } - - // Mandatory control points, e.g. the divided line moving handles - // should appear even if a child of the 'selected' image - virtual void MakeMandatoryControlPoints(); - virtual void ResetMandatoryControlPoints(); - - inline virtual bool Recompute() { return TRUE; }; - // Calculate size recursively, if size changes. Size might depend on children. - inline virtual void CalculateSize() { }; - virtual void Select(bool select = TRUE, wxDC* dc = NULL); - virtual void SetHighlight(bool hi = TRUE, bool recurse = FALSE); - inline virtual bool IsHighlighted() const { return m_highlighted; }; - virtual bool Selected() const; - virtual bool AncestorSelected() const; - void SetSensitivityFilter(int sens = OP_ALL, bool recursive = FALSE); - int GetSensitivityFilter() const { return m_sensitivity; } - void SetDraggable(bool drag, bool recursive = FALSE); - inline void SetFixedSize(bool x, bool y) { m_fixedWidth = x; m_fixedHeight = y; }; - inline void GetFixedSize(bool *x, bool *y) const { *x = m_fixedWidth; *y = m_fixedHeight; }; - inline bool GetFixedWidth() const { return m_fixedWidth; } - inline bool GetFixedHeight() const { return m_fixedHeight; } - inline void SetSpaceAttachments(bool sp) { m_spaceAttachments = sp; }; - inline bool GetSpaceAttachments() const { return m_spaceAttachments; }; - void SetShadowMode(int mode, bool redraw = FALSE); - inline int GetShadowMode() const { return m_shadowMode; } - virtual bool HitTest(double x, double y, int *attachment, double *distance); - inline void SetCentreResize(bool cr) { m_centreResize = cr; } - inline bool GetCentreResize() const { return m_centreResize; } - inline wxList& GetLines() { return m_lines; } - inline void SetDisableLabel(bool flag) { m_disableLabel = flag; } - inline bool GetDisableLabel() const { return m_disableLabel; } - inline void SetAttachmentMode(bool flag) { m_attachmentMode = flag; } - inline bool GetAttachmentMode() const { return m_attachmentMode; } - inline void SetId(long i) { m_id = i; } - inline long GetId() const { return m_id; } - - void SetPen(wxPen *pen); - void SetBrush(wxBrush *brush); - inline void SetClientData(wxObject *client_data) { m_clientData = client_data; }; - inline wxObject *GetClientData() const { return m_clientData; }; - - virtual void Show(bool show); - virtual bool IsShown() const { return m_visible; } - virtual void Move(wxDC& dc, double x1, double y1, bool display = TRUE); - virtual void Erase(wxDC& dc); - virtual void EraseContents(wxDC& dc); - virtual void Draw(wxDC& dc); - virtual void Flash(); - virtual void MoveLinks(wxDC& dc); - virtual void DrawContents(wxDC& dc); // E.g. for drawing text label - virtual void SetSize(double x, double y, bool recursive = TRUE); - virtual void SetAttachmentSize(double x, double y); - void Attach(wxShapeCanvas *can); - void Detach(); - - inline virtual bool Constrain() { return FALSE; } ; - - void AddLine(wxLineShape *line, wxShape *other, - int attachFrom = 0, int attachTo = 0, - // The line ordering - int positionFrom = -1, int positionTo = -1); - - // Return the zero-based position in m_lines of line. - int GetLinePosition(wxLineShape* line); - - void AddText(const wxString& string); - - inline wxPen *GetPen() const { return m_pen; } - inline wxBrush *GetBrush() const { return m_brush; } - - /* - * Region-specific functions (defaults to the default region - * for simple objects - */ - - // Set the default, single region size to be consistent - // with the object size - void SetDefaultRegionSize(); - virtual void FormatText(wxDC& dc, const wxString& s, int regionId = 0); - virtual void SetFormatMode(int mode, int regionId = 0); - virtual int GetFormatMode(int regionId = 0) const; - virtual void SetFont(wxFont *font, int regionId = 0); - virtual wxFont *GetFont(int regionId = 0) const; - virtual void SetTextColour(const wxString& colour, int regionId = 0); - virtual wxString GetTextColour(int regionId = 0) const; - virtual inline int GetNumberOfTextRegions() const { return m_regions.Number(); } - virtual void SetRegionName(const wxString& name, int regionId = 0); - - // Get the name representing the region for this image alone. - // I.e. this image's region ids go from 0 to N-1. - // But the names might be "0.2.0", "0.2.1" etc. depending on position in composite. - // So the last digit represents the region Id, the others represent positions - // in composites. - virtual wxString GetRegionName(int regionId); - - // Gets the region corresponding to the name, or -1 if not found. - virtual int GetRegionId(const wxString& name); - - // Construct names for regions, unique even for children of a composite. - virtual void NameRegions(const wxString& parentName = ""); - - // Get list of regions - inline wxList& GetRegions() const { return (wxList&) m_regions; } - - virtual void AddRegion(wxShapeRegion *region); - - virtual void ClearRegions(); - - // Assign new ids to this image and children (if composite) - void AssignNewIds(); - - // Returns actual image (same as 'this' if non-composite) and region id - // for given region name. - virtual wxShape *FindRegion(const wxString& regionName, int *regionId); - - // Finds all region names for this image (composite or simple). - // Supply empty string list. - virtual void FindRegionNames(wxStringList& list); - - virtual void ClearText(int regionId = 0); - void RemoveLine(wxLineShape *line); - -#ifdef PROLOGIO - // Prolog database stuff - virtual char *GetFunctor(); - virtual void WritePrologAttributes(wxExpr *clause); - virtual void ReadPrologAttributes(wxExpr *clause); - - // In case the object has constraints it needs to read in in a different pass - inline virtual void ReadConstraints(wxExpr *WXUNUSED(clause), wxExprDatabase *WXUNUSED(database)) { }; - virtual void WriteRegions(wxExpr *clause); - virtual void ReadRegions(wxExpr *clause); -#endif - - // Attachment code - virtual bool GetAttachmentPosition(int attachment, double *x, double *y, - int nth = 0, int no_arcs = 1, wxLineShape *line = NULL); - virtual int GetNumberOfAttachments(); - virtual bool AttachmentIsValid(int attachment); - - // Assuming the attachment lies along a vertical or horizontal line, - // calculate the position on that point. - wxRealPoint CalcSimpleAttachment(const wxRealPoint& pt1, const wxRealPoint& pt2, - int nth, int noArcs, wxLineShape* line); - - // Returns TRUE if pt1 <= pt2 in the sense that one point comes before another on an - // edge of the shape. - // attachmentPoint is the attachment point (= side) in question. - bool AttachmentSortTest(int attachmentPoint, const wxRealPoint& pt1, const wxRealPoint& pt2); - - virtual void EraseLinks(wxDC& dc, int attachment = -1, bool recurse = FALSE); - virtual void DrawLinks(wxDC& dc, int attachment = -1, bool recurse = FALSE); - - virtual void MoveLineToNewAttachment(wxDC& dc, wxLineShape *to_move, - double x, double y); - - // Reorders the lines coming into the node image at this attachment - // position, in the order in which they appear in linesToSort. - virtual void SortLines(int attachment, wxList& linesToSort); - - // Apply an attachment ordering change - void ApplyAttachmentOrdering(wxList& ordering); - - // Can override this to prevent or intercept line reordering. - virtual void OnChangeAttachment(int attachment, wxLineShape* line, wxList& ordering); - - // This is really to distinguish between lines and other images. - // For lines, want to pass drag to canvas, since lines tend to prevent - // dragging on a canvas (they get in the way.) - virtual bool Draggable() const { return TRUE; } - - // Returns TRUE if image is a descendant of this image - bool HasDescendant(wxShape *image); - - // Creates a copy of this shape. - wxShape *CreateNewCopy(bool resetMapping = TRUE, bool recompute = TRUE); - - // Does the copying for this object - virtual void Copy(wxShape& copy); - - // Does the copying for this object, including copying event - // handler data if any. Calls the virtual Copy function. - void CopyWithHandler(wxShape& copy); - - // Rotate about the given axis by the given amount in radians - // (does nothing for most objects) - // But even non-rotating objects should record their notional - // rotation in case it's important (e.g. in dog-leg code). - virtual inline void Rotate(double WXUNUSED(x), double WXUNUSED(y), double theta) { m_rotation = theta; } - virtual inline double GetRotation() const { return m_rotation; } - - void ClearAttachments(); - - // Recentres all the text regions for this object - void Recentre(wxDC& dc); - - // Clears points from a list of wxRealPoints - void ClearPointList(wxList& list); - - private: - wxObject* m_clientData; - - protected: - wxShapeEvtHandler* m_eventHandler; - bool m_formatted; - double m_xpos, m_ypos; - wxPen* m_pen; - wxBrush* m_brush; - wxFont* m_font; - wxColour* m_textColour; - wxString m_textColourName; - wxShapeCanvas* m_canvas; - wxList m_lines; - wxList m_text; - wxList m_controlPoints; - wxList m_regions; - wxList m_attachmentPoints; - bool m_visible; - bool m_disableLabel; - long m_id; - bool m_selected; - bool m_highlighted; // Different from selected: user-defined highlighting, - // e.g. thick border. - double m_rotation; - int m_sensitivity; - bool m_draggable; - bool m_attachmentMode; // TRUE if using attachments, FALSE otherwise - bool m_spaceAttachments; // TRUE if lines at one side should be spaced - bool m_fixedWidth; - bool m_fixedHeight; - bool m_centreResize; // Default is to resize keeping the centre constant (TRUE) - bool m_drawHandles; // Don't draw handles if FALSE, usually TRUE - wxList m_children; // In case it's composite - wxShape* m_parent; // In case it's a child - int m_formatMode; - int m_shadowMode; - wxBrush* m_shadowBrush; - int m_shadowOffsetX; - int m_shadowOffsetY; - int m_textMarginX; // Gap between text and border - int m_textMarginY; - wxString m_regionName; -}; - -class wxPolygonShape: public wxShape -{ - DECLARE_DYNAMIC_CLASS(wxPolygonShape) - public: - wxPolygonShape(); - ~wxPolygonShape(); - - // Takes a list of wxRealPoints; each point is an OFFSET from the centre. - // Deletes user's points in destructor. - virtual void Create(wxList *points); - virtual void ClearPoints(); - - void GetBoundingBoxMin(double *w, double *h); - void CalculateBoundingBox(); - bool GetPerimeterPoint(double x1, double y1, - double x2, double y2, - double *x3, double *y3); - bool HitTest(double x, double y, int *attachment, double *distance); - void SetSize(double x, double y, bool recursive = TRUE); - void OnDraw(wxDC& dc); - void OnDrawOutline(wxDC& dc, double x, double y, double w, double h); - - // Control points ('handles') redirect control to the actual shape, to make it easier - // to override sizing behaviour. - virtual void OnSizingDragLeft(wxControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); - virtual void OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0); - virtual void OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0); - - // A polygon should have a control point at each vertex, - // with the option of moving the control points individually - // to change the shape. - void MakeControlPoints(); - void ResetControlPoints(); - - // If we've changed the shape, must make the original - // points match the working points - void UpdateOriginalPoints(); - - // Add a control point after the given point - virtual void AddPolygonPoint(int pos = 0); - - // Delete a control point - virtual void DeletePolygonPoint(int pos = 0); - - // Recalculates the centre of the polygon - virtual void CalculatePolygonCentre(); - -#ifdef PROLOGIO - // Prolog database stuff - void WritePrologAttributes(wxExpr *clause); - void ReadPrologAttributes(wxExpr *clause); -#endif - - int GetNumberOfAttachments(); - bool GetAttachmentPosition(int attachment, double *x, double *y, - int nth = 0, int no_arcs = 1, wxLineShape *line = NULL); - bool AttachmentIsValid(int attachment); - // Does the copying for this object - void Copy(wxShape& copy); - - inline wxList *GetPoints() { return m_points; } - - private: - wxList* m_points; - wxList* m_originalPoints; - double m_boundWidth; - double m_boundHeight; - double m_originalWidth; - double m_originalHeight; -}; - -class wxRectangleShape: public wxShape -{ - DECLARE_DYNAMIC_CLASS(wxRectangleShape) - public: - wxRectangleShape(double w = 0.0, double h = 0.0); - void GetBoundingBoxMin(double *w, double *h); - bool GetPerimeterPoint(double x1, double y1, - double x2, double y2, - double *x3, double *y3); - void OnDraw(wxDC& dc); - void SetSize(double x, double y, bool recursive = TRUE); - void SetCornerRadius(double rad); // If > 0, rounded corners - -#ifdef PROLOGIO - // Prolog database stuff - void WritePrologAttributes(wxExpr *clause); - void ReadPrologAttributes(wxExpr *clause); -#endif - - int GetNumberOfAttachments(); - bool GetAttachmentPosition(int attachment, double *x, double *y, - int nth = 0, int no_arcs = 1, wxLineShape *line = NULL); - // Does the copying for this object - void Copy(wxShape& copy); - - inline double GetWidth() const { return m_width; } - inline double GetHeight() const { return m_height; } - inline void SetWidth(double w) { m_width = w; } - inline void SetHeight(double h) { m_height = h; } - -protected: - double m_width; - double m_height; - double m_cornerRadius; -}; - -class wxTextShape: public wxRectangleShape -{ - DECLARE_DYNAMIC_CLASS(wxTextShape) - public: - wxTextShape(double width = 0.0, double height = 0.0); - - void OnDraw(wxDC& dc); - -#ifdef PROLOGIO - void WritePrologAttributes(wxExpr *clause); -#endif - - // Does the copying for this object - void Copy(wxShape& copy); -}; - -class wxEllipseShape: public wxShape -{ - DECLARE_DYNAMIC_CLASS(wxEllipseShape) - public: - wxEllipseShape(double w = 0.0, double h = 0.0); - - void GetBoundingBoxMin(double *w, double *h); - bool GetPerimeterPoint(double x1, double y1, - double x2, double y2, - double *x3, double *y3); - - void OnDraw(wxDC& dc); - void SetSize(double x, double y, bool recursive = TRUE); - -#ifdef PROLOGIO - // Prolog database stuff - void WritePrologAttributes(wxExpr *clause); - void ReadPrologAttributes(wxExpr *clause); -#endif - - int GetNumberOfAttachments(); - bool GetAttachmentPosition(int attachment, double *x, double *y, - int nth = 0, int no_arcs = 1, wxLineShape *line = NULL); - - // Does the copying for this object - void Copy(wxShape& copy); - - inline double GetWidth() const { return m_width; } - inline double GetHeight() const { return m_height; } - -protected: - double m_width; - double m_height; -}; - -class wxCircleShape: public wxEllipseShape -{ - DECLARE_DYNAMIC_CLASS(wxCircleShape) - public: - wxCircleShape(double w = 0.0); - - bool GetPerimeterPoint(double x1, double y1, - double x2, double y2, - double *x3, double *y3); - // Does the copying for this object - void Copy(wxShape& copy); -}; - -#endif - // _OGL_BASIC_H_ diff --git a/utils/ogl/src/basic2.cpp b/utils/ogl/src/basic2.cpp deleted file mode 100644 index 2c9c7c9b2c..0000000000 --- a/utils/ogl/src/basic2.cpp +++ /dev/null @@ -1,2049 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: basic2.cpp -// Purpose: Basic OGL classes (2) -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#endif - -// For compilers that support precompilation, includes "wx.h". -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#ifdef PROLOGIO -#include -#endif - -#if USE_IOSTREAMH -#include -#else -#include -#endif - -#include -#include -#include - -#include "basic.h" -#include "basicp.h" -#include "composit.h" -#include "lines.h" -#include "canvas.h" -#include "divided.h" -#include "misc.h" - -// Control point types -// Rectangle and most other shapes -#define CONTROL_POINT_VERTICAL 1 -#define CONTROL_POINT_HORIZONTAL 2 -#define CONTROL_POINT_DIAGONAL 3 - -// Line -#define CONTROL_POINT_ENDPOINT_TO 4 -#define CONTROL_POINT_ENDPOINT_FROM 5 -#define CONTROL_POINT_LINE 6 - -// Two stage construction: need to call Create -IMPLEMENT_DYNAMIC_CLASS(wxPolygonShape, wxShape) - -wxPolygonShape::wxPolygonShape() -{ - m_points = NULL; - m_originalPoints = NULL; -} - -void wxPolygonShape::Create(wxList *the_points) -{ - ClearPoints(); - - m_originalPoints = the_points; - - // Duplicate the list of points - m_points = new wxList; - - wxNode *node = the_points->First(); - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - wxRealPoint *new_point = new wxRealPoint(point->x, point->y); - m_points->Append((wxObject*) new_point); - node = node->Next(); - } - CalculateBoundingBox(); - m_originalWidth = m_boundWidth; - m_originalHeight = m_boundHeight; - SetDefaultRegionSize(); -} - -wxPolygonShape::~wxPolygonShape() -{ - ClearPoints(); -} - -void wxPolygonShape::ClearPoints() -{ - if (m_points) - { - wxNode *node = m_points->First(); - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - delete point; - delete node; - node = m_points->First(); - } - delete m_points; - m_points = NULL; - } - if (m_originalPoints) - { - wxNode *node = m_originalPoints->First(); - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - delete point; - delete node; - node = m_originalPoints->First(); - } - delete m_originalPoints; - m_originalPoints = NULL; - } -} - - -// Width and height. Centre of object is centre of box. -void wxPolygonShape::GetBoundingBoxMin(double *width, double *height) -{ - *width = m_boundWidth; - *height = m_boundHeight; -} - -void wxPolygonShape::CalculateBoundingBox() -{ - // Calculate bounding box at construction (and presumably resize) time - double left = 10000; - double right = -10000; - double top = 10000; - double bottom = -10000; - - wxNode *node = m_points->First(); - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - if (point->x < left) left = point->x; - if (point->x > right) right = point->x; - - if (point->y < top) top = point->y; - if (point->y > bottom) bottom = point->y; - - node = node->Next(); - } - m_boundWidth = right - left; - m_boundHeight = bottom - top; -} - -// Recalculates the centre of the polygon, and -// readjusts the point offsets accordingly. -// Necessary since the centre of the polygon -// is expected to be the real centre of the bounding -// box. -void wxPolygonShape::CalculatePolygonCentre() -{ - double left = 10000; - double right = -10000; - double top = 10000; - double bottom = -10000; - - wxNode *node = m_points->First(); - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - if (point->x < left) left = point->x; - if (point->x > right) right = point->x; - - if (point->y < top) top = point->y; - if (point->y > bottom) bottom = point->y; - - node = node->Next(); - } - double bwidth = right - left; - double bheight = bottom - top; - - double newCentreX = (double)(left + (bwidth/2.0)); - double newCentreY = (double)(top + (bheight/2.0)); - - node = m_points->First(); - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - point->x -= newCentreX; - point->y -= newCentreY; - node = node->Next(); - } - m_xpos += newCentreX; - m_ypos += newCentreY; -} - -bool PolylineHitTest(double n, double xvec[], double yvec[], - double x1, double y1, double x2, double y2) -{ - bool isAHit = FALSE; - int i; - double lastx = xvec[0]; - double lasty = yvec[0]; - - double min_ratio = 1.0; - double line_ratio; - double other_ratio; - -// char buf[300]; - for (i = 1; i < n; i++) - { - oglCheckLineIntersection(x1, y1, x2, y2, lastx, lasty, xvec[i], yvec[i], - &line_ratio, &other_ratio); - if (line_ratio != 1.0) - isAHit = TRUE; -// sprintf(buf, "Line ratio = %.2f, other ratio = %.2f\n", line_ratio, other_ratio); -// ClipsErrorFunction(buf); - lastx = xvec[i]; - lasty = yvec[i]; - - if (line_ratio < min_ratio) - min_ratio = line_ratio; - } - - // Do last (implicit) line if last and first doubles are not identical - if (!(xvec[0] == lastx && yvec[0] == lasty)) - { - oglCheckLineIntersection(x1, y1, x2, y2, lastx, lasty, xvec[0], yvec[0], - &line_ratio, &other_ratio); - if (line_ratio != 1.0) - isAHit = TRUE; -// sprintf(buf, "Line ratio = %.2f, other ratio = %.2f\n", line_ratio, other_ratio); -// ClipsErrorFunction(buf); - - if (line_ratio < min_ratio) - min_ratio = line_ratio; - } -// ClipsErrorFunction("\n"); - return isAHit; -} - -bool wxPolygonShape::HitTest(double x, double y, int *attachment, double *distance) -{ - // Imagine four lines radiating from this point. If all of these lines hit the polygon, - // we're inside it, otherwise we're not. Obviously we'd need more radiating lines - // to be sure of correct results for very strange (concave) shapes. - double endPointsX[4]; - double endPointsY[4]; - // North - endPointsX[0] = x; - endPointsY[0] = (double)(y - 1000.0); - // East - endPointsX[1] = (double)(x + 1000.0); - endPointsY[1] = y; - // South - endPointsX[2] = x; - endPointsY[2] = (double)(y + 1000.0); - // West - endPointsX[3] = (double)(x - 1000.0); - endPointsY[3] = y; - - // Store polygon points in an array - int np = m_points->Number(); - double *xpoints = new double[np]; - double *ypoints = new double[np]; - wxNode *node = m_points->First(); - int i = 0; - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - xpoints[i] = point->x + m_xpos; - ypoints[i] = point->y + m_ypos; - node = node->Next(); - i ++; - } - - // We assume it's inside the polygon UNLESS one or more - // lines don't hit the outline. - bool isContained = TRUE; - - int noPoints = 4; - for (i = 0; i < noPoints; i++) - { - if (!PolylineHitTest(np, xpoints, ypoints, x, y, endPointsX[i], endPointsY[i])) - isContained = FALSE; - } -/* - if (isContained) - ClipsErrorFunction("It's a hit!\n"); - else - ClipsErrorFunction("No hit.\n"); -*/ - delete[] xpoints; - delete[] ypoints; - - if (!isContained) - return FALSE; - - int nearest_attachment = 0; - - // If a hit, check the attachment points within the object. - int n = GetNumberOfAttachments(); - double nearest = 999999.0; - - for (i = 0; i < n; i++) - { - double xp, yp; - if (GetAttachmentPosition(i, &xp, &yp)) - { - double l = (double)sqrt(((xp - x) * (xp - x)) + - ((yp - y) * (yp - y))); - if (l < nearest) - { - nearest = l; - nearest_attachment = i; - } - } - } - *attachment = nearest_attachment; - *distance = nearest; - return TRUE; -} - -// Really need to be able to reset the shape! Otherwise, if the -// points ever go to zero, we've lost it, and can't resize. -void wxPolygonShape::SetSize(double new_width, double new_height, bool recursive) -{ - SetAttachmentSize(new_width, new_height); - - // Multiply all points by proportion of new size to old size - double x_proportion = (double)(fabs(new_width/m_originalWidth)); - double y_proportion = (double)(fabs(new_height/m_originalHeight)); - - wxNode *node = m_points->First(); - wxNode *original_node = m_originalPoints->First(); - while (node && original_node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - wxRealPoint *original_point = (wxRealPoint *)original_node->Data(); - - point->x = (original_point->x * x_proportion); - point->y = (original_point->y * y_proportion); - - node = node->Next(); - original_node = original_node->Next(); - } - -// CalculateBoundingBox(); - m_boundWidth = (double)fabs(new_width); - m_boundHeight = (double)fabs(new_height); - SetDefaultRegionSize(); -} - -// Make the original points the same as the working points -void wxPolygonShape::UpdateOriginalPoints() -{ - if (!m_originalPoints) m_originalPoints = new wxList; - wxNode *original_node = m_originalPoints->First(); - while (original_node) - { - wxNode *next_node = original_node->Next(); - wxRealPoint *original_point = (wxRealPoint *)original_node->Data(); - delete original_point; - delete original_node; - - original_node = next_node; - } - - wxNode *node = m_points->First(); - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - wxRealPoint *original_point = new wxRealPoint(point->x, point->y); - m_originalPoints->Append((wxObject*) original_point); - - node = node->Next(); - } - CalculateBoundingBox(); - m_originalWidth = m_boundWidth; - m_originalHeight = m_boundHeight; -} - -void wxPolygonShape::AddPolygonPoint(int pos) -{ - wxNode *node = m_points->Nth(pos); - if (!node) node = m_points->First(); - wxRealPoint *firstPoint = (wxRealPoint *)node->Data(); - - wxNode *node2 = m_points->Nth(pos + 1); - if (!node2) node2 = m_points->First(); - wxRealPoint *secondPoint = (wxRealPoint *)node2->Data(); - - double x = (double)((secondPoint->x - firstPoint->x)/2.0 + firstPoint->x); - double y = (double)((secondPoint->y - firstPoint->y)/2.0 + firstPoint->y); - wxRealPoint *point = new wxRealPoint(x, y); - - if (pos >= (m_points->Number() - 1)) - m_points->Append((wxObject*) point); - else - m_points->Insert(node2, (wxObject*) point); - - UpdateOriginalPoints(); - - if (m_selected) - { - DeleteControlPoints(); - MakeControlPoints(); - } -} - -void wxPolygonShape::DeletePolygonPoint(int pos) -{ - wxNode *node = m_points->Nth(pos); - if (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - delete point; - delete node; - UpdateOriginalPoints(); - if (m_selected) - { - DeleteControlPoints(); - MakeControlPoints(); - } - } -} - -// Assume (x1, y1) is centre of box (most generally, line end at box) -bool wxPolygonShape::GetPerimeterPoint(double x1, double y1, - double x2, double y2, - double *x3, double *y3) -{ - int n = m_points->Number(); - - // First check for situation where the line is vertical, - // and we would want to connect to a point on that vertical -- - // oglFindEndForPolyline can't cope with this (the arrow - // gets drawn to the wrong place). - if ((!m_attachmentMode) && (x1 == x2)) - { - // Look for the point we'd be connecting to. This is - // a heuristic... - wxNode *node = m_points->First(); - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - if (point->x == 0.0) - { - if ((y2 > y1) && (point->y > 0.0)) - { - *x3 = point->x + m_xpos; - *y3 = point->y + m_ypos; - return TRUE; - } - else if ((y2 < y1) && (point->y < 0.0)) - { - *x3 = point->x + m_xpos; - *y3 = point->y + m_ypos; - return TRUE; - } - } - node = node->Next(); - } - } - - double *xpoints = new double[n]; - double *ypoints = new double[n]; - - wxNode *node = m_points->First(); - int i = 0; - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - xpoints[i] = point->x + m_xpos; - ypoints[i] = point->y + m_ypos; - node = node->Next(); - i ++; - } - - oglFindEndForPolyline(n, xpoints, ypoints, - x1, y1, x2, y2, x3, y3); - - delete[] xpoints; - delete[] ypoints; - - return TRUE; -} - -void wxPolygonShape::OnDraw(wxDC& dc) -{ - int n = m_points->Number(); - wxPoint *intPoints = new wxPoint[n]; - int i; - for (i = 0; i < n; i++) - { - wxRealPoint* point = (wxRealPoint*) m_points->Nth(i)->Data(); - intPoints[i].x = WXROUND(point->x); - intPoints[i].y = WXROUND(point->y); - } - - if (m_shadowMode != SHADOW_NONE) - { - if (m_shadowBrush) - dc.SetBrush(m_shadowBrush); - dc.SetPen(g_oglTransparentPen); - - dc.DrawPolygon(n, intPoints, WXROUND(m_xpos + m_shadowOffsetX), WXROUND(m_ypos + m_shadowOffsetY)); - } - - if (m_pen) - { - if (m_pen->GetWidth() == 0) - dc.SetPen(g_oglTransparentPen); - else - dc.SetPen(m_pen); - } - if (m_brush) - dc.SetBrush(m_brush); - dc.DrawPolygon(n, intPoints, WXROUND(m_xpos), WXROUND(m_ypos)); - - delete[] intPoints; -} - -void wxPolygonShape::OnDrawOutline(wxDC& dc, double x, double y, double w, double h) -{ - dc.SetBrush(wxTRANSPARENT_BRUSH); - // Multiply all points by proportion of new size to old size - double x_proportion = (double)(fabs(w/m_originalWidth)); - double y_proportion = (double)(fabs(h/m_originalHeight)); - - int n = m_originalPoints->Number(); - wxPoint *intPoints = new wxPoint[n]; - int i; - for (i = 0; i < n; i++) - { - wxRealPoint* point = (wxRealPoint*) m_originalPoints->Nth(i)->Data(); - intPoints[i].x = WXROUND(x_proportion * point->x); - intPoints[i].y = WXROUND(y_proportion * point->y); - } - dc.DrawPolygon(n, intPoints, WXROUND(x), WXROUND(y)); - delete[] intPoints; -} - -// Make as many control points as there are vertices. -void wxPolygonShape::MakeControlPoints() -{ - wxNode *node = m_points->First(); - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - wxPolygonControlPoint *control = new wxPolygonControlPoint(m_canvas, this, CONTROL_POINT_SIZE, - point, point->x, point->y); - m_canvas->AddShape(control); - m_controlPoints.Append(control); - node = node->Next(); - } - -/* - double maxX, maxY, minX, minY; - - GetBoundingBoxMax(&maxX, &maxY); - GetBoundingBoxMin(&minX, &minY); - - double widthMin = (double)(minX + CONTROL_POINT_SIZE + 2); - double heightMin = (double)(minY + CONTROL_POINT_SIZE + 2); - - // Offsets from main object - double top = (double)(- (heightMin / 2.0)); - double bottom = (double)(heightMin / 2.0 + (maxY - minY)); - double left = (double)(- (widthMin / 2.0)); - double right = (double)(widthMin / 2.0 + (maxX - minX)); - - wxControlPoint *control = new wxControlPoint(m_canvas, this, CONTROL_POINT_SIZE, left, top, - CONTROL_POINT_DIAGONAL); - m_canvas->AddShape(control); - m_controlPoints.Append(control); - - control = new wxControlPoint(m_canvas, this, CONTROL_POINT_SIZE, 0, top, - CONTROL_POINT_VERTICAL); - m_canvas->AddShape(control); - m_controlPoints.Append(control); - - control = new wxControlPoint(m_canvas, this, CONTROL_POINT_SIZE, right, top, - CONTROL_POINT_DIAGONAL); - m_canvas->AddShape(control); - m_controlPoints.Append(control); - - control = new wxControlPoint(m_canvas, this, CONTROL_POINT_SIZE, right, 0, - CONTROL_POINT_HORIZONTAL); - m_canvas->AddShape(control); - m_controlPoints.Append(control); - - control = new wxControlPoint(m_canvas, this, CONTROL_POINT_SIZE, right, bottom, - CONTROL_POINT_DIAGONAL); - m_canvas->AddShape(control); - m_controlPoints.Append(control); - - control = new wxControlPoint(m_canvas, this, CONTROL_POINT_SIZE, 0, bottom, - CONTROL_POINT_VERTICAL); - m_canvas->AddShape(control); - m_controlPoints.Append(control); - - control = new wxControlPoint(m_canvas, this, CONTROL_POINT_SIZE, left, bottom, - CONTROL_POINT_DIAGONAL); - m_canvas->AddShape(control); - m_controlPoints.Append(control); - - control = new wxControlPoint(m_canvas, this, CONTROL_POINT_SIZE, left, 0, - CONTROL_POINT_HORIZONTAL); - m_canvas->AddShape(control); - m_controlPoints.Append(control); -*/ -} - -void wxPolygonShape::ResetControlPoints() -{ - wxNode *node = m_points->First(); - wxNode *controlPointNode = m_controlPoints.First(); - while (node && controlPointNode) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - wxPolygonControlPoint *controlPoint = (wxPolygonControlPoint *)controlPointNode->Data(); - - controlPoint->m_xoffset = point->x; - controlPoint->m_yoffset = point->y; - controlPoint->m_polygonVertex = point; - - node = node->Next(); - controlPointNode = controlPointNode->Next(); - } -/* - - if (m_controlPoints.Number() < 1) - return; - - double maxX, maxY, minX, minY; - - GetBoundingBoxMax(&maxX, &maxY); - GetBoundingBoxMin(&minX, &minY); - - double widthMin = (double)(minX + CONTROL_POINT_SIZE + 2); - double heightMin = (double)(minY + CONTROL_POINT_SIZE + 2); - - // Offsets from main object - double top = (double)(- (heightMin / 2.0)); - double bottom = (double)(heightMin / 2.0 + (maxY - minY)); - double left = (double)(- (widthMin / 2.0)); - double right = (double)(widthMin / 2.0 + (maxX - minX)); - - wxNode *node = m_controlPoints.First(); - wxControlPoint *control = (wxControlPoint *)node->Data(); - control->xoffset = left; control->yoffset = top; - - node = node->Next(); control = (wxControlPoint *)node->Data(); - control->xoffset = 0; control->yoffset = top; - - node = node->Next(); control = (wxControlPoint *)node->Data(); - control->xoffset = right; control->yoffset = top; - - node = node->Next(); control = (wxControlPoint *)node->Data(); - control->xoffset = right; control->yoffset = 0; - - node = node->Next(); control = (wxControlPoint *)node->Data(); - control->xoffset = right; control->yoffset = bottom; - - node = node->Next(); control = (wxControlPoint *)node->Data(); - control->xoffset = 0; control->yoffset = bottom; - - node = node->Next(); control = (wxControlPoint *)node->Data(); - control->xoffset = left; control->yoffset = bottom; - - node = node->Next(); control = (wxControlPoint *)node->Data(); - control->xoffset = left; control->yoffset = 0; -*/ -} - - -#ifdef PROLOGIO -void wxPolygonShape::WritePrologAttributes(wxExpr *clause) -{ - wxShape::WritePrologAttributes(clause); - - clause->AddAttributeValue("x", m_xpos); - clause->AddAttributeValue("y", m_ypos); - - // Make a list of lists for the coordinates - wxExpr *list = new wxExpr(PrologList); - wxNode *node = m_points->First(); - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - wxExpr *point_list = new wxExpr(PrologList); - wxExpr *x_expr = new wxExpr((double)point->x); - wxExpr *y_expr = new wxExpr((double)point->y); - - point_list->Append(x_expr); - point_list->Append(y_expr); - list->Append(point_list); - - node = node->Next(); - } - clause->AddAttributeValue("points", list); - - // Save the original (unscaled) points - list = new wxExpr(PrologList); - node = m_originalPoints->First(); - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - wxExpr *point_list = new wxExpr(PrologList); - wxExpr *x_expr = new wxExpr((double) point->x); - wxExpr *y_expr = new wxExpr((double) point->y); - point_list->Append(x_expr); - point_list->Append(y_expr); - list->Append(point_list); - - node = node->Next(); - } - clause->AddAttributeValue("m_originalPoints", list); -} - -void wxPolygonShape::ReadPrologAttributes(wxExpr *clause) -{ - wxShape::ReadPrologAttributes(clause); - - // Read a list of lists - m_points = new wxList; - m_originalPoints = new wxList; - - wxExpr *points_list = NULL; - clause->AssignAttributeValue("points", &points_list); - - // If no points_list, don't crash!! Assume a diamond instead. - double the_height = 100.0; - double the_width = 100.0; - if (!points_list) - { - wxRealPoint *point = new wxRealPoint(0.0, (-the_height/2)); - m_points->Append((wxObject*) point); - - point = new wxRealPoint((the_width/2), 0.0); - m_points->Append((wxObject*) point); - - point = new wxRealPoint(0.0, (the_height/2)); - m_points->Append((wxObject*) point); - - point = new wxRealPoint((-the_width/2), 0.0); - m_points->Append((wxObject*) point); - - point = new wxRealPoint(0.0, (-the_height/2)); - m_points->Append((wxObject*) point); - } - else - { - wxExpr *node = points_list->value.first; - - while (node) - { - wxExpr *xexpr = node->value.first; - long x = xexpr->IntegerValue(); - - wxExpr *yexpr = xexpr->next; - long y = yexpr->IntegerValue(); - - wxRealPoint *point = new wxRealPoint((double)x, (double)y); - m_points->Append((wxObject*) point); - - node = node->next; - } - } - - points_list = NULL; - clause->AssignAttributeValue("m_originalPoints", &points_list); - - // If no points_list, don't crash!! Assume a diamond instead. - if (!points_list) - { - wxRealPoint *point = new wxRealPoint(0.0, (-the_height/2)); - m_originalPoints->Append((wxObject*) point); - - point = new wxRealPoint((the_width/2), 0.0); - m_originalPoints->Append((wxObject*) point); - - point = new wxRealPoint(0.0, (the_height/2)); - m_originalPoints->Append((wxObject*) point); - - point = new wxRealPoint((-the_width/2), 0.0); - m_originalPoints->Append((wxObject*) point); - - point = new wxRealPoint(0.0, (-the_height/2)); - m_originalPoints->Append((wxObject*) point); - - m_originalWidth = the_width; - m_originalHeight = the_height; - } - else - { - wxExpr *node = points_list->value.first; - double min_x = 1000; - double min_y = 1000; - double max_x = -1000; - double max_y = -1000; - while (node) - { - wxExpr *xexpr = node->value.first; - long x = xexpr->IntegerValue(); - - wxExpr *yexpr = xexpr->next; - long y = yexpr->IntegerValue(); - - wxRealPoint *point = new wxRealPoint((double)x, (double)y); - m_originalPoints->Append((wxObject*) point); - - if (x < min_x) - min_x = (double)x; - if (y < min_y) - min_y = (double)y; - if (x > max_x) - max_x = (double)x; - if (y > max_y) - max_y = (double)y; - - node = node->next; - } - m_originalWidth = max_x - min_x; - m_originalHeight = max_y - min_y; - } - - CalculateBoundingBox(); -} -#endif - -void wxPolygonShape::Copy(wxShape& copy) -{ - wxShape::Copy(copy); - - wxASSERT( copy.IsKindOf(CLASSINFO(wxPolygonShape)) ); - - wxPolygonShape& polyCopy = (wxPolygonShape&) copy; - - polyCopy.ClearPoints(); - - polyCopy.m_points = new wxList; - polyCopy.m_originalPoints = new wxList; - - wxNode *node = m_points->First(); - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - wxRealPoint *new_point = new wxRealPoint(point->x, point->y); - polyCopy.m_points->Append((wxObject*) new_point); - node = node->Next(); - } - node = m_originalPoints->First(); - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - wxRealPoint *new_point = new wxRealPoint(point->x, point->y); - polyCopy.m_originalPoints->Append((wxObject*) new_point); - node = node->Next(); - } - polyCopy.m_boundWidth = m_boundWidth; - polyCopy.m_boundHeight = m_boundHeight; - polyCopy.m_originalWidth = m_originalWidth; - polyCopy.m_originalHeight = m_originalHeight; -} - -int wxPolygonShape::GetNumberOfAttachments() -{ - int maxN = (m_points ? (m_points->Number() - 1) : 0); - wxNode *node = m_attachmentPoints.First(); - while (node) - { - wxAttachmentPoint *point = (wxAttachmentPoint *)node->Data(); - if (point->m_id > maxN) - maxN = point->m_id; - node = node->Next(); - } - return maxN+1;; -} - -bool wxPolygonShape::GetAttachmentPosition(int attachment, double *x, double *y, - int nth, int no_arcs, wxLineShape *line) -{ - if (m_attachmentMode && m_points && attachment < m_points->Number()) - { - wxRealPoint *point = (wxRealPoint *)m_points->Nth(attachment)->Data(); - *x = point->x + m_xpos; - *y = point->y + m_ypos; - return TRUE; - } - else - { return wxShape::GetAttachmentPosition(attachment, x, y, nth, no_arcs, line); } -} - -bool wxPolygonShape::AttachmentIsValid(int attachment) -{ - if (!m_points) - return FALSE; - - if ((attachment >= 0) && (attachment < m_points->Number())) - return TRUE; - - wxNode *node = m_attachmentPoints.First(); - while (node) - { - wxAttachmentPoint *point = (wxAttachmentPoint *)node->Data(); - if (point->m_id == attachment) - return TRUE; - node = node->Next(); - } - return FALSE; -} - -// Rectangle object - -IMPLEMENT_DYNAMIC_CLASS(wxRectangleShape, wxShape) - -wxRectangleShape::wxRectangleShape(double w, double h) -{ - m_width = w; m_height = h; m_cornerRadius = 0.0; - SetDefaultRegionSize(); -} - -void wxRectangleShape::OnDraw(wxDC& dc) -{ - double x1 = (double)(m_xpos - m_width/2.0); - double y1 = (double)(m_ypos - m_height/2.0); - - if (m_shadowMode != SHADOW_NONE) - { - if (m_shadowBrush) - dc.SetBrush(m_shadowBrush); - dc.SetPen(g_oglTransparentPen); - - if (m_cornerRadius != 0.0) - dc.DrawRoundedRectangle(WXROUND(x1 + m_shadowOffsetX), WXROUND(y1 + m_shadowOffsetY), - WXROUND(m_width), WXROUND(m_height), m_cornerRadius); - else - dc.DrawRectangle(WXROUND(x1 + m_shadowOffsetX), WXROUND(y1 + m_shadowOffsetY), WXROUND(m_width), WXROUND(m_height)); - } - - if (m_pen) - { - if (m_pen->GetWidth() == 0) - dc.SetPen(g_oglTransparentPen); - else - dc.SetPen(m_pen); - } - if (m_brush) - dc.SetBrush(m_brush); - - if (m_cornerRadius != 0.0) - dc.DrawRoundedRectangle(WXROUND(x1), WXROUND(y1), WXROUND(m_width), WXROUND(m_height), m_cornerRadius); - else - dc.DrawRectangle(WXROUND(x1), WXROUND(y1), WXROUND(m_width), WXROUND(m_height)); -} - -void wxRectangleShape::GetBoundingBoxMin(double *the_width, double *the_height) -{ - *the_width = m_width; - *the_height = m_height; -} - -void wxRectangleShape::SetSize(double x, double y, bool recursive) -{ - SetAttachmentSize(x, y); - m_width = (double)wxMax(x, 1.0); - m_height = (double)wxMax(y, 1.0); - SetDefaultRegionSize(); -} - -void wxRectangleShape::SetCornerRadius(double rad) -{ - m_cornerRadius = rad; -} - -// Assume (x1, y1) is centre of box (most generally, line end at box) -bool wxRectangleShape::GetPerimeterPoint(double x1, double y1, - double x2, double y2, - double *x3, double *y3) -{ - double bound_x, bound_y; - GetBoundingBoxMax(&bound_x, &bound_y); - oglFindEndForBox(bound_x, bound_y, m_xpos, m_ypos, x2, y2, x3, y3); - - return TRUE; -} - -#ifdef PROLOGIO -void wxRectangleShape::WritePrologAttributes(wxExpr *clause) -{ - wxShape::WritePrologAttributes(clause); - clause->AddAttributeValue("x", m_xpos); - clause->AddAttributeValue("y", m_ypos); - - clause->AddAttributeValue("width", m_width); - clause->AddAttributeValue("height", m_height); - if (m_cornerRadius != 0.0) - clause->AddAttributeValue("corner", m_cornerRadius); -} - -void wxRectangleShape::ReadPrologAttributes(wxExpr *clause) -{ - wxShape::ReadPrologAttributes(clause); - clause->AssignAttributeValue("width", &m_width); - clause->AssignAttributeValue("height", &m_height); - clause->AssignAttributeValue("corner", &m_cornerRadius); - - // In case we're reading an old file, set the region's size - if (m_regions.Number() == 1) - { - wxShapeRegion *region = (wxShapeRegion *)m_regions.First()->Data(); - region->SetSize(m_width, m_height); - } -} -#endif - -void wxRectangleShape::Copy(wxShape& copy) -{ - wxShape::Copy(copy); - - wxASSERT( copy.IsKindOf(CLASSINFO(wxRectangleShape)) ); - - wxRectangleShape& rectCopy = (wxRectangleShape&) copy; - rectCopy.m_width = m_width; - rectCopy.m_height = m_height; - rectCopy.m_cornerRadius = m_cornerRadius; -} - -int wxRectangleShape::GetNumberOfAttachments() -{ - return wxShape::GetNumberOfAttachments(); -} - - -// There are 4 attachment points on a rectangle - 0 = top, 1 = right, 2 = bottom, -// 3 = left. -bool wxRectangleShape::GetAttachmentPosition(int attachment, double *x, double *y, - int nth, int no_arcs, wxLineShape *line) -{ - if (m_attachmentMode) - { - double top = (double)(m_ypos + m_height/2.0); - double bottom = (double)(m_ypos - m_height/2.0); - double left = (double)(m_xpos - m_width/2.0); - double right = (double)(m_xpos + m_width/2.0); - - bool isEnd = (line && line->IsEnd(this)); - - // Simplified code - switch (attachment) - { - case 0: - { - wxRealPoint pt = CalcSimpleAttachment(wxRealPoint(left, bottom), wxRealPoint(right, bottom), - nth, no_arcs, line); - - *x = pt.x; *y = pt.y; - break; - } - case 1: - { - wxRealPoint pt = CalcSimpleAttachment(wxRealPoint(right, bottom), wxRealPoint(right, top), - nth, no_arcs, line); - - *x = pt.x; *y = pt.y; - break; - } - case 2: - { - wxRealPoint pt = CalcSimpleAttachment(wxRealPoint(left, top), wxRealPoint(right, top), - nth, no_arcs, line); - - *x = pt.x; *y = pt.y; - break; - } - case 3: - { - wxRealPoint pt = CalcSimpleAttachment(wxRealPoint(left, bottom), wxRealPoint(left, top), - nth, no_arcs, line); - - *x = pt.x; *y = pt.y; - break; - } - default: - { - return wxShape::GetAttachmentPosition(attachment, x, y, nth, no_arcs, line); - break; - } - } - - // Old code -#if 0 - switch (attachment) - { - case 0: - { - if (m_spaceAttachments) - { - if (line && (line->GetAlignmentType(isEnd) == LINE_ALIGNMENT_TO_NEXT_HANDLE)) - { - // Align line according to the next handle along - wxRealPoint *point = line->GetNextControlPoint(this); - if (point->x < left) - *x = left; - else if (point->x > right) - *x = right; - else - *x = point->x; - } - else - *x = left + (nth + 1)*m_width/(no_arcs + 1); - } - else *x = m_xpos; - - *y = bottom; - break; - } - case 1: - { - *x = right; - if (m_spaceAttachments) - { - if (line && (line->GetAlignmentType(isEnd) == LINE_ALIGNMENT_TO_NEXT_HANDLE)) - { - // Align line according to the next handle along - wxRealPoint *point = line->GetNextControlPoint(this); - if (point->y < bottom) - *y = bottom; - else if (point->y > top) - *y = top; - else - *y = point->y; - } - else - *y = bottom + (nth + 1)*m_height/(no_arcs + 1); - } - else *y = m_ypos; - break; - } - case 2: - { - if (m_spaceAttachments) - { - if (line && (line->GetAlignmentType(isEnd) == LINE_ALIGNMENT_TO_NEXT_HANDLE)) - { - // Align line according to the next handle along - wxRealPoint *point = line->GetNextControlPoint(this); - if (point->x < left) - *x = left; - else if (point->x > right) - *x = right; - else - *x = point->x; - } - else - *x = left + (nth + 1)*m_width/(no_arcs + 1); - } - else *x = m_xpos; - *y = top; - break; - } - case 3: - { - *x = left; - if (m_spaceAttachments) - { - if (line && (line->GetAlignmentType(isEnd) == LINE_ALIGNMENT_TO_NEXT_HANDLE)) - { - // Align line according to the next handle along - wxRealPoint *point = line->GetNextControlPoint(this); - if (point->y < bottom) - *y = bottom; - else if (point->y > top) - *y = top; - else - *y = point->y; - } - else - *y = bottom + (nth + 1)*m_height/(no_arcs + 1); - } - else *y = m_ypos; - break; - } - default: - { - return wxShape::GetAttachmentPosition(attachment, x, y, nth, no_arcs, line); - break; - } - } -#endif - return TRUE; - } - else - { *x = m_xpos; *y = m_ypos; return TRUE; } -} - -// Text object (no box) - -IMPLEMENT_DYNAMIC_CLASS(wxTextShape, wxRectangleShape) - -wxTextShape::wxTextShape(double width, double height): - wxRectangleShape(width, height) -{ -} - -void wxTextShape::OnDraw(wxDC& dc) -{ -} - -void wxTextShape::Copy(wxShape& copy) -{ - wxRectangleShape::Copy(copy); -} - -#ifdef PROLOGIO -void wxTextShape::WritePrologAttributes(wxExpr *clause) -{ - wxRectangleShape::WritePrologAttributes(clause); -} -#endif - -// Ellipse object - -IMPLEMENT_DYNAMIC_CLASS(wxEllipseShape, wxShape) - -wxEllipseShape::wxEllipseShape(double w, double h) -{ - m_width = w; m_height = h; - SetDefaultRegionSize(); -} - -void wxEllipseShape::GetBoundingBoxMin(double *w, double *h) -{ - *w = m_width; *h = m_height; -} - -bool wxEllipseShape::GetPerimeterPoint(double x1, double y1, - double x2, double y2, - double *x3, double *y3) -{ - double bound_x, bound_y; - GetBoundingBoxMax(&bound_x, &bound_y); - -// oglFindEndForBox(bound_x, bound_y, m_xpos, m_ypos, x2, y2, x3, y3); - oglDrawArcToEllipse(m_xpos, m_ypos, bound_x, bound_y, x2, y2, x1, y1, x3, y3); - - return TRUE; -} - -void wxEllipseShape::OnDraw(wxDC& dc) -{ - if (m_shadowMode != SHADOW_NONE) - { - if (m_shadowBrush) - dc.SetBrush(m_shadowBrush); - dc.SetPen(g_oglTransparentPen); - dc.DrawEllipse((m_xpos - GetWidth()/2) + m_shadowOffsetX, - (m_ypos - GetHeight()/2) + m_shadowOffsetY, - GetWidth(), GetHeight()); - } - - if (m_pen) - { - if (m_pen->GetWidth() == 0) - dc.SetPen(g_oglTransparentPen); - else - dc.SetPen(m_pen); - } - if (m_brush) - dc.SetBrush(m_brush); - dc.DrawEllipse((m_xpos - GetWidth()/2), (m_ypos - GetHeight()/2), GetWidth(), GetHeight()); -} - -void wxEllipseShape::SetSize(double x, double y, bool recursive) -{ - SetAttachmentSize(x, y); - m_width = x; - m_height = y; - SetDefaultRegionSize(); -} - -#ifdef PROLOGIO -void wxEllipseShape::WritePrologAttributes(wxExpr *clause) -{ - wxShape::WritePrologAttributes(clause); - clause->AddAttributeValue("x", m_xpos); - clause->AddAttributeValue("y", m_ypos); - - clause->AddAttributeValue("width", m_width); - clause->AddAttributeValue("height", m_height); -} - -void wxEllipseShape::ReadPrologAttributes(wxExpr *clause) -{ - wxShape::ReadPrologAttributes(clause); - clause->AssignAttributeValue("width", &m_width); - clause->AssignAttributeValue("height", &m_height); - - // In case we're reading an old file, set the region's size - if (m_regions.Number() == 1) - { - wxShapeRegion *region = (wxShapeRegion *)m_regions.First()->Data(); - region->SetSize(m_width, m_height); - } -} -#endif - -void wxEllipseShape::Copy(wxShape& copy) -{ - wxShape::Copy(copy); - - wxASSERT( copy.IsKindOf(CLASSINFO(wxEllipseShape)) ); - - wxEllipseShape& ellipseCopy = (wxEllipseShape&) copy; - - ellipseCopy.m_width = m_width; - ellipseCopy.m_height = m_height; -} - -int wxEllipseShape::GetNumberOfAttachments() -{ - return wxShape::GetNumberOfAttachments(); -} - -// There are 4 attachment points on an ellipse - 0 = top, 1 = right, 2 = bottom, -// 3 = left. -bool wxEllipseShape::GetAttachmentPosition(int attachment, double *x, double *y, - int nth, int no_arcs, wxLineShape *line) -{ - if (m_attachmentMode) - { - double top = (double)(m_ypos + m_height/2.0); - double bottom = (double)(m_ypos - m_height/2.0); - double left = (double)(m_xpos - m_width/2.0); - double right = (double)(m_xpos + m_width/2.0); - switch (attachment) - { - case 0: - { - if (m_spaceAttachments) - *x = left + (nth + 1)*m_width/(no_arcs + 1); - else *x = m_xpos; - *y = top; - // We now have the point on the bounding box: but get the point on the ellipse - // by imagining a vertical line from (*x, m_ypos - m_height- 500) to (*x, m_ypos) intersecting - // the ellipse. - oglDrawArcToEllipse(m_xpos, m_ypos, m_width, m_height, *x, (double)(m_ypos-m_height-500), *x, m_ypos, x, y); - break; - } - case 1: - { - *x = right; - if (m_spaceAttachments) - *y = bottom + (nth + 1)*m_height/(no_arcs + 1); - else *y = m_ypos; - oglDrawArcToEllipse(m_xpos, m_ypos, m_width, m_height, (double)(m_xpos+m_width+500), *y, m_xpos, *y, x, y); - break; - } - case 2: - { - if (m_spaceAttachments) - *x = left + (nth + 1)*m_width/(no_arcs + 1); - else *x = m_xpos; - *y = bottom; - oglDrawArcToEllipse(m_xpos, m_ypos, m_width, m_height, *x, (double)(m_ypos+m_height+500), *x, m_ypos, x, y); - break; - } - case 3: - { - *x = left; - if (m_spaceAttachments) - *y = bottom + (nth + 1)*m_height/(no_arcs + 1); - else *y = m_ypos; - oglDrawArcToEllipse(m_xpos, m_ypos, m_width, m_height, (double)(m_xpos-m_width-500), *y, m_xpos, *y, x, y); - break; - } - default: - { - return wxShape::GetAttachmentPosition(attachment, x, y, nth, no_arcs, line); - break; - } - } - return TRUE; - } - else - { *x = m_xpos; *y = m_ypos; return TRUE; } -} - - -// Circle object -IMPLEMENT_DYNAMIC_CLASS(wxCircleShape, wxEllipseShape) - -wxCircleShape::wxCircleShape(double diameter):wxEllipseShape(diameter, diameter) -{ -} - -void wxCircleShape::Copy(wxShape& copy) -{ - wxEllipseShape::Copy(copy); -} - -bool wxCircleShape::GetPerimeterPoint(double x1, double y1, - double x2, double y2, - double *x3, double *y3) -{ - oglFindEndForCircle(m_width/2, - m_xpos, m_ypos, // Centre of circle - x2, y2, // Other end of line - x3, y3); - - return TRUE; -} - -// Control points - -double wxControlPoint::controlPointDragStartX = 0.0; -double wxControlPoint::controlPointDragStartY = 0.0; -double wxControlPoint::controlPointDragStartWidth = 0.0; -double wxControlPoint::controlPointDragStartHeight = 0.0; -double wxControlPoint::controlPointDragEndWidth = 0.0; -double wxControlPoint::controlPointDragEndHeight = 0.0; -double wxControlPoint::controlPointDragPosX = 0.0; -double wxControlPoint::controlPointDragPosY = 0.0; - -IMPLEMENT_DYNAMIC_CLASS(wxControlPoint, wxRectangleShape) - -wxControlPoint::wxControlPoint(wxShapeCanvas *theCanvas, wxShape *object, double size, double the_xoffset, double the_yoffset, int the_type):wxRectangleShape(size, size) -{ - m_canvas = theCanvas; - m_shape = object; - m_xoffset = the_xoffset; - m_yoffset = the_yoffset; - m_type = the_type; - SetPen(g_oglBlackForegroundPen); - SetBrush(wxBLACK_BRUSH); - m_oldCursor = NULL; - m_visible = TRUE; - m_eraseObject = TRUE; -} - -wxControlPoint::~wxControlPoint() -{ -} - -// Don't even attempt to draw any text - waste of time! -void wxControlPoint::OnDrawContents(wxDC& dc) -{ -} - -void wxControlPoint::OnDraw(wxDC& dc) -{ - m_xpos = m_shape->GetX() + m_xoffset; - m_ypos = m_shape->GetY() + m_yoffset; - wxRectangleShape::OnDraw(dc); -} - -void wxControlPoint::OnErase(wxDC& dc) -{ - wxRectangleShape::OnErase(dc); -} - -// Implement resizing of canvas object -void wxControlPoint::OnDragLeft(bool draw, double x, double y, int keys, int attachment) -{ - m_shape->GetEventHandler()->OnSizingDragLeft(this, draw, x, y, keys, attachment); -} - -void wxControlPoint::OnBeginDragLeft(double x, double y, int keys, int attachment) -{ - m_shape->GetEventHandler()->OnSizingBeginDragLeft(this, x, y, keys, attachment); -} - -void wxControlPoint::OnEndDragLeft(double x, double y, int keys, int attachment) -{ - m_shape->GetEventHandler()->OnSizingEndDragLeft(this, x, y, keys, attachment); -} - -int wxControlPoint::GetNumberOfAttachments() -{ - return 1; -} - -bool wxControlPoint::GetAttachmentPosition(int attachment, double *x, double *y, - int nth, int no_arcs, wxLineShape *line) -{ - *x = m_xpos; *y = m_ypos; - return TRUE; -} - -// Control points ('handles') redirect control to the actual shape, to make it easier -// to override sizing behaviour. -void wxShape::OnSizingDragLeft(wxControlPoint* pt, bool draw, double x, double y, int keys, int attachment) -{ - double bound_x; - double bound_y; - this->GetBoundingBoxMin(&bound_x, &bound_y); - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - dc.SetLogicalFunction(wxXOR); - - wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT); - dc.SetPen(dottedPen); - dc.SetBrush((* wxTRANSPARENT_BRUSH)); - - if (this->GetCentreResize()) - { - // Maintain the same centre point. - double new_width = (double)(2.0*fabs(x - this->GetX())); - double new_height = (double)(2.0*fabs(y - this->GetY())); - - // Constrain sizing according to what control point you're dragging - if (pt->m_type == CONTROL_POINT_HORIZONTAL) - new_height = bound_y; - else if (pt->m_type == CONTROL_POINT_VERTICAL) - new_width = bound_x; - else if (pt->m_type == CONTROL_POINT_DIAGONAL && (keys & KEY_SHIFT)) - new_height = bound_y*(new_width/bound_x); - - if (this->GetFixedWidth()) - new_width = bound_x; - - if (this->GetFixedHeight()) - new_height = bound_y; - - pt->controlPointDragEndWidth = new_width; - pt->controlPointDragEndHeight = new_height; - - this->GetEventHandler()->OnDrawOutline(dc, this->GetX(), this->GetY(), - new_width, new_height); - } - else - { - // Don't maintain the same centre point! - double newX1 = wxMin(pt->controlPointDragStartX, x); - double newY1 = wxMin(pt->controlPointDragStartY, y); - double newX2 = wxMax(pt->controlPointDragStartX, x); - double newY2 = wxMax(pt->controlPointDragStartY, y); - if (pt->m_type == CONTROL_POINT_HORIZONTAL) - { - newY1 = pt->controlPointDragStartY; - newY2 = newY1 + pt->controlPointDragStartHeight; - } - else if (pt->m_type == CONTROL_POINT_VERTICAL) - { - newX1 = pt->controlPointDragStartX; - newX2 = newX1 + pt->controlPointDragStartWidth; - } - else if (pt->m_type == CONTROL_POINT_DIAGONAL && (keys & KEY_SHIFT)) - { - double newH = (double)((newX2 - newX1)*(pt->controlPointDragStartHeight/pt->controlPointDragStartWidth)); - if (GetY() > pt->controlPointDragStartY) - newY2 = (double)(newY1 + newH); - else - newY1 = (double)(newY2 - newH); - } - double newWidth = (double)(newX2 - newX1); - double newHeight = (double)(newY2 - newY1); - - pt->controlPointDragPosX = (double)(newX1 + (newWidth/2.0)); - pt->controlPointDragPosY = (double)(newY1 + (newHeight/2.0)); - if (this->GetFixedWidth()) - newWidth = bound_x; - - if (this->GetFixedHeight()) - newHeight = bound_y; - - pt->controlPointDragEndWidth = newWidth; - pt->controlPointDragEndHeight = newHeight; - this->GetEventHandler()->OnDrawOutline(dc, pt->controlPointDragPosX, pt->controlPointDragPosY, newWidth, newHeight); - } -} - -void wxShape::OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y, int keys, int attachment) -{ - m_canvas->CaptureMouse(); - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - if (pt->m_eraseObject) - this->Erase(dc); - - dc.SetLogicalFunction(wxXOR); - - double bound_x; - double bound_y; - this->GetBoundingBoxMin(&bound_x, &bound_y); - - // Choose the 'opposite corner' of the object as the stationary - // point in case this is non-centring resizing. - if (pt->GetX() < this->GetX()) - pt->controlPointDragStartX = (double)(this->GetX() + (bound_x/2.0)); - else - pt->controlPointDragStartX = (double)(this->GetX() - (bound_x/2.0)); - - if (pt->GetY() < this->GetY()) - pt->controlPointDragStartY = (double)(this->GetY() + (bound_y/2.0)); - else - pt->controlPointDragStartY = (double)(this->GetY() - (bound_y/2.0)); - - if (pt->m_type == CONTROL_POINT_HORIZONTAL) - pt->controlPointDragStartY = (double)(this->GetY() - (bound_y/2.0)); - else if (pt->m_type == CONTROL_POINT_VERTICAL) - pt->controlPointDragStartX = (double)(this->GetX() - (bound_x/2.0)); - - // We may require the old width and height. - pt->controlPointDragStartWidth = bound_x; - pt->controlPointDragStartHeight = bound_y; - - wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT); - dc.SetPen(dottedPen); - dc.SetBrush((* wxTRANSPARENT_BRUSH)); - - if (this->GetCentreResize()) - { - double new_width = (double)(2.0*fabs(x - this->GetX())); - double new_height = (double)(2.0*fabs(y - this->GetY())); - - // Constrain sizing according to what control point you're dragging - if (pt->m_type == CONTROL_POINT_HORIZONTAL) - new_height = bound_y; - else if (pt->m_type == CONTROL_POINT_VERTICAL) - new_width = bound_x; - else if (pt->m_type == CONTROL_POINT_DIAGONAL && (keys & KEY_SHIFT)) - new_height = bound_y*(new_width/bound_x); - - if (this->GetFixedWidth()) - new_width = bound_x; - - if (this->GetFixedHeight()) - new_height = bound_y; - - pt->controlPointDragEndWidth = new_width; - pt->controlPointDragEndHeight = new_height; - this->GetEventHandler()->OnDrawOutline(dc, this->GetX(), this->GetY(), - new_width, new_height); - } - else - { - // Don't maintain the same centre point! - double newX1 = wxMin(pt->controlPointDragStartX, x); - double newY1 = wxMin(pt->controlPointDragStartY, y); - double newX2 = wxMax(pt->controlPointDragStartX, x); - double newY2 = wxMax(pt->controlPointDragStartY, y); - if (pt->m_type == CONTROL_POINT_HORIZONTAL) - { - newY1 = pt->controlPointDragStartY; - newY2 = newY1 + pt->controlPointDragStartHeight; - } - else if (pt->m_type == CONTROL_POINT_VERTICAL) - { - newX1 = pt->controlPointDragStartX; - newX2 = newX1 + pt->controlPointDragStartWidth; - } - else if (pt->m_type == CONTROL_POINT_DIAGONAL && (keys & KEY_SHIFT)) - { - double newH = (double)((newX2 - newX1)*(pt->controlPointDragStartHeight/pt->controlPointDragStartWidth)); - if (pt->GetY() > pt->controlPointDragStartY) - newY2 = (double)(newY1 + newH); - else - newY1 = (double)(newY2 - newH); - } - double newWidth = (double)(newX2 - newX1); - double newHeight = (double)(newY2 - newY1); - - pt->controlPointDragPosX = (double)(newX1 + (newWidth/2.0)); - pt->controlPointDragPosY = (double)(newY1 + (newHeight/2.0)); - if (this->GetFixedWidth()) - newWidth = bound_x; - - if (this->GetFixedHeight()) - newHeight = bound_y; - - pt->controlPointDragEndWidth = newWidth; - pt->controlPointDragEndHeight = newHeight; - this->GetEventHandler()->OnDrawOutline(dc, pt->controlPointDragPosX, pt->controlPointDragPosY, newWidth, newHeight); - } -} - -void wxShape::OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, int keys, int attachment) -{ - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - m_canvas->ReleaseMouse(); - dc.SetLogicalFunction(wxCOPY); - this->Recompute(); - this->ResetControlPoints(); - - if (!pt->m_eraseObject) - this->Show(FALSE); - - this->SetSize(pt->controlPointDragEndWidth, pt->controlPointDragEndHeight); - - // The next operation could destroy this control point (it does for label objects, - // via formatting the text), so save all values we're going to use, or - // we'll be accessing garbage. - wxShape *theObject = this; - wxShapeCanvas *theCanvas = m_canvas; - bool eraseIt = pt->m_eraseObject; - - if (theObject->GetCentreResize()) - theObject->Move(dc, theObject->GetX(), theObject->GetY()); - else - theObject->Move(dc, pt->controlPointDragPosX, pt->controlPointDragPosY); - - if (!eraseIt) - theObject->Show(TRUE); - - // Recursively redraw links if we have a composite. - if (theObject->GetChildren().Number() > 0) - theObject->DrawLinks(dc, -1, TRUE); - - double width, height; - theObject->GetBoundingBoxMax(&width, &height); - theObject->GetEventHandler()->OnEndSize(width, height); - - if (!theCanvas->GetQuickEditMode() && eraseIt) theCanvas->Redraw(dc); -} - - - -// Polygon control points - -IMPLEMENT_DYNAMIC_CLASS(wxPolygonControlPoint, wxControlPoint) - -wxPolygonControlPoint::wxPolygonControlPoint(wxShapeCanvas *theCanvas, wxShape *object, double size, - wxRealPoint *vertex, double the_xoffset, double the_yoffset): - wxControlPoint(theCanvas, object, size, the_xoffset, the_yoffset, 0) -{ - m_polygonVertex = vertex; - m_originalDistance = 0.0; -} - -wxPolygonControlPoint::~wxPolygonControlPoint() -{ -} - -// Calculate what new size would be, at end of resize -void wxPolygonControlPoint::CalculateNewSize(double x, double y) -{ - double bound_x; - double bound_y; - GetShape()->GetBoundingBoxMin(&bound_x, &bound_y); - - double dist = (double)sqrt((x - m_shape->GetX())*(x - m_shape->GetX()) + - (y - m_shape->GetY())*(y - m_shape->GetY())); - - m_newSize.x = (double)(dist/this->m_originalDistance)*this->m_originalSize.x; - m_newSize.y = (double)(dist/this->m_originalDistance)*this->m_originalSize.y; -} - - -// Implement resizing polygon or moving the vertex. -void wxPolygonControlPoint::OnDragLeft(bool draw, double x, double y, int keys, int attachment) -{ - m_shape->GetEventHandler()->OnSizingDragLeft(this, draw, x, y, keys, attachment); -} - -void wxPolygonControlPoint::OnBeginDragLeft(double x, double y, int keys, int attachment) -{ - m_shape->GetEventHandler()->OnSizingBeginDragLeft(this, x, y, keys, attachment); -} - -void wxPolygonControlPoint::OnEndDragLeft(double x, double y, int keys, int attachment) -{ - m_shape->GetEventHandler()->OnSizingEndDragLeft(this, x, y, keys, attachment); -} - -// Control points ('handles') redirect control to the actual shape, to make it easier -// to override sizing behaviour. -void wxPolygonShape::OnSizingDragLeft(wxControlPoint* pt, bool draw, double x, double y, int keys, int attachment) -{ - wxPolygonControlPoint* ppt = (wxPolygonControlPoint*) pt; - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - dc.SetLogicalFunction(wxXOR); - - wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT); - dc.SetPen(dottedPen); - dc.SetBrush((* wxTRANSPARENT_BRUSH)); - - if (0) // keys & KEY_CTRL) - { - // TODO: mend this code. Currently we rely on altering the - // actual points, but we should assume we're not, as per - // the normal sizing case. - m_canvas->Snap(&x, &y); - - // Move point - ppt->m_polygonVertex->x = x - this->GetX(); - ppt->m_polygonVertex->y = y - this->GetY(); - ppt->SetX(x); - ppt->SetY(y); - ((wxPolygonShape *)this)->CalculateBoundingBox(); - ((wxPolygonShape *)this)->CalculatePolygonCentre(); - } - else - { - ppt->CalculateNewSize(x, y); - } - - this->GetEventHandler()->OnDrawOutline(dc, this->GetX(), this->GetY(), - ppt->GetNewSize().x, ppt->GetNewSize().y); -} - -void wxPolygonShape::OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y, int keys, int attachment) -{ - wxPolygonControlPoint* ppt = (wxPolygonControlPoint*) pt; - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - this->Erase(dc); - - dc.SetLogicalFunction(wxXOR); - - double bound_x; - double bound_y; - this->GetBoundingBoxMin(&bound_x, &bound_y); - - double dist = (double)sqrt((x - this->GetX())*(x - this->GetX()) + - (y - this->GetY())*(y - this->GetY())); - ppt->m_originalDistance = dist; - ppt->m_originalSize.x = bound_x; - ppt->m_originalSize.y = bound_y; - - if (ppt->m_originalDistance == 0.0) ppt->m_originalDistance = (double) 0.0001; - - wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT); - dc.SetPen(dottedPen); - dc.SetBrush((* wxTRANSPARENT_BRUSH)); - - if (0) // keys & KEY_CTRL) - { - // TODO: mend this code. Currently we rely on altering the - // actual points, but we should assume we're not, as per - // the normal sizing case. - m_canvas->Snap(&x, &y); - - // Move point - ppt->m_polygonVertex->x = x - this->GetX(); - ppt->m_polygonVertex->y = y - this->GetY(); - ppt->SetX(x); - ppt->SetY(y); - ((wxPolygonShape *)this)->CalculateBoundingBox(); - ((wxPolygonShape *)this)->CalculatePolygonCentre(); - } - else - { - ppt->CalculateNewSize(x, y); - } - - this->GetEventHandler()->OnDrawOutline(dc, this->GetX(), this->GetY(), - ppt->GetNewSize().x, ppt->GetNewSize().y); - - m_canvas->CaptureMouse(); -} - -void wxPolygonShape::OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, int keys, int attachment) -{ - wxPolygonControlPoint* ppt = (wxPolygonControlPoint*) pt; - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - m_canvas->ReleaseMouse(); - dc.SetLogicalFunction(wxCOPY); - - // If we're changing shape, must reset the original points - if (keys & KEY_CTRL) - { - ((wxPolygonShape *)this)->CalculateBoundingBox(); - ((wxPolygonShape *)this)->UpdateOriginalPoints(); - } - else - { - SetSize(ppt->GetNewSize().x, ppt->GetNewSize().y); - } - - ((wxPolygonShape *)this)->CalculateBoundingBox(); - ((wxPolygonShape *)this)->CalculatePolygonCentre(); - - this->Recompute(); - this->ResetControlPoints(); - this->Move(dc, this->GetX(), this->GetY()); - if (!m_canvas->GetQuickEditMode()) m_canvas->Redraw(dc); -} - -/* - * Object region - * - */ -IMPLEMENT_DYNAMIC_CLASS(wxShapeRegion, wxObject) - -wxShapeRegion::wxShapeRegion() -{ - m_regionText = ""; - m_font = g_oglNormalFont; - m_minHeight = 5.0; - m_minWidth = 5.0; - m_width = 0.0; - m_height = 0.0; - m_x = 0.0; - m_y = 0.0; - - m_regionProportionX = -1.0; - m_regionProportionY = -1.0; - m_formatMode = FORMAT_CENTRE_HORIZ | FORMAT_CENTRE_VERT; - m_regionName = ""; - m_textColour = "BLACK"; - m_penColour = "BLACK"; - m_penStyle = wxSOLID; - m_actualColourObject = NULL; - m_actualPenObject = NULL; -} - -wxShapeRegion::wxShapeRegion(wxShapeRegion& region) -{ - m_regionText = region.m_regionText; - m_regionName = region.m_regionName; - m_textColour = region.m_textColour; - - m_font = region.m_font; - m_minHeight = region.m_minHeight; - m_minWidth = region.m_minWidth; - m_width = region.m_width; - m_height = region.m_height; - m_x = region.m_x; - m_y = region.m_y; - - m_regionProportionX = region.m_regionProportionX; - m_regionProportionY = region.m_regionProportionY; - m_formatMode = region.m_formatMode; - m_actualColourObject = NULL; - m_actualPenObject = NULL; - m_penStyle = region.m_penStyle; - m_penColour = region.m_penColour; - - ClearText(); - wxNode *node = region.m_formattedText.First(); - while (node) - { - wxShapeTextLine *line = (wxShapeTextLine *)node->Data(); - wxShapeTextLine *new_line = - new wxShapeTextLine(line->GetX(), line->GetY(), line->GetText()); - m_formattedText.Append(new_line); - node = node->Next(); - } -} - -wxShapeRegion::~wxShapeRegion() -{ - ClearText(); -} - -void wxShapeRegion::ClearText() -{ - wxNode *node = m_formattedText.First(); - while (node) - { - wxShapeTextLine *line = (wxShapeTextLine *)node->Data(); - wxNode *next = node->Next(); - delete line; - delete node; - node = next; - } -} - -void wxShapeRegion::SetFont(wxFont *f) -{ - m_font = f; -} - -void wxShapeRegion::SetMinSize(double w, double h) -{ - m_minWidth = w; - m_minHeight = h; -} - -void wxShapeRegion::SetSize(double w, double h) -{ - m_width = w; - m_height = h; -} - -void wxShapeRegion::SetPosition(double xp, double yp) -{ - m_x = xp; - m_y = yp; -} - -void wxShapeRegion::SetProportions(double xp, double yp) -{ - m_regionProportionX = xp; - m_regionProportionY = yp; -} - -void wxShapeRegion::SetFormatMode(int mode) -{ - m_formatMode = mode; -} - -void wxShapeRegion::SetColour(const wxString& col) -{ - m_textColour = col; - m_actualColourObject = NULL; -} - -wxColour *wxShapeRegion::GetActualColourObject() -{ - if (!m_actualColourObject) - m_actualColourObject = wxTheColourDatabase->FindColour(GetColour()); - if (!m_actualColourObject) - m_actualColourObject = wxBLACK; - return m_actualColourObject; -} - -void wxShapeRegion::SetPenColour(const wxString& col) -{ - m_penColour = col; - m_actualPenObject = NULL; -} - -// Returns NULL if the pen is invisible -// (different to pen being transparent; indicates that -// region boundary should not be drawn.) -wxPen *wxShapeRegion::GetActualPen() -{ - if (m_actualPenObject) - return m_actualPenObject; - - if (!m_penColour) return NULL; - if (m_penColour == "Invisible") - return NULL; - m_actualPenObject = wxThePenList->FindOrCreatePen(m_penColour, 1, m_penStyle); - return m_actualPenObject; -} - - diff --git a/utils/ogl/src/basicp.h b/utils/ogl/src/basicp.h deleted file mode 100644 index 77c6922c14..0000000000 --- a/utils/ogl/src/basicp.h +++ /dev/null @@ -1,223 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: basicp.h -// Purpose: Private OGL classes and definitions -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _OGL_BASICP_H_ -#define _OGL_BASICP_H_ - -#ifdef __GNUG__ -#pragma interface "basicp.h" -#endif - -#define CONTROL_POINT_SIZE 6 - -class wxShapeTextLine: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxShapeTextLine) -public: - wxShapeTextLine(double the_x = 0.0, double the_y = 0.0, const wxString& the_line = ""); - ~wxShapeTextLine(); - - inline double GetX() const { return m_x; } - inline double GetY() const { return m_y; } - - inline void SetX(double x) { m_x = x; } - inline void SetY(double y) { m_y = y; } - - inline void SetText(const wxString& text) { m_line = text; } - inline wxString GetText() const { return m_line; } - -protected: - wxString m_line; - double m_x; - double m_y; -}; - -class wxShape; -class wxControlPoint: public wxRectangleShape -{ - DECLARE_DYNAMIC_CLASS(wxControlPoint) - - friend class wxShapeEvtHandler; - friend class wxShape; - - public: - wxControlPoint(wxShapeCanvas *the_canvas = NULL, wxShape *object = NULL, double size = 0.0, double the_xoffset = 0.0, - double the_yoffset = 0.0, int the_type = 0); - ~wxControlPoint(); - - void OnDraw(wxDC& dc); - void OnErase(wxDC& dc); - void OnDrawContents(wxDC& dc); - void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); - void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); - void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); - - bool GetAttachmentPosition(int attachment, double *x, double *y, - int nth = 0, int no_arcs = 1, wxLineShape *line = NULL); - int GetNumberOfAttachments(); - - inline void SetEraseObject(bool er) { m_eraseObject = er; } - -public: - int m_type; - double m_xoffset; - double m_yoffset; - wxShape* m_shape; - wxCursor* m_oldCursor; - bool m_eraseObject; // If TRUE, erases object before dragging handle. - -/* - * Store original top-left, bottom-right coordinates - * in case we're doing non-vertical resizing. - */ - static double controlPointDragStartX; - static double controlPointDragStartY; - static double controlPointDragStartWidth; - static double controlPointDragStartHeight; - static double controlPointDragEndWidth; - static double controlPointDragEndHeight; - static double controlPointDragPosX; - static double controlPointDragPosY; -}; - -class wxPolygonShape; -class wxPolygonControlPoint: public wxControlPoint -{ - DECLARE_DYNAMIC_CLASS(wxPolygonControlPoint) - friend class wxPolygonShape; - public: - wxPolygonControlPoint(wxShapeCanvas *the_canvas = NULL, wxShape *object = NULL, double size = 0.0, wxRealPoint *vertex = NULL, - double the_xoffset = 0.0, double the_yoffset = 0.0); - ~wxPolygonControlPoint(); - - void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); - void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); - void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); - - // Calculate what new size would be, at end of resize - virtual void CalculateNewSize(double x, double y); - - // Get new size - inline wxRealPoint GetNewSize() const { return m_newSize; }; - -public: - wxRealPoint* m_polygonVertex; - wxRealPoint m_originalSize; - double m_originalDistance; - wxRealPoint m_newSize; -}; - -/* - * Object regions. - * Every shape has one or more text regions with various - * properties. Not all of a region's properties will be used - * by a shape. - * - */ - -class wxShapeRegion: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxShapeRegion) - - public: - // Constructor - wxShapeRegion(); - // Copy constructor - wxShapeRegion(wxShapeRegion& region); - // Destructor - ~wxShapeRegion(); - - // Accessors - inline void SetText(const wxString& s) { m_regionText = s; } - void SetFont(wxFont *f); - void SetMinSize(double w, double h); - void SetSize(double w, double h); - void SetPosition(double x, double y); - void SetProportions(double x, double y); - void SetFormatMode(int mode); - inline void SetName(const wxString& s) { m_regionName = s; }; - void SetColour(const wxString& col); // Text colour - - inline wxString GetText() const { return m_regionText; } - inline wxFont *GetFont() const { return m_font; } - inline void GetMinSize(double *x, double *y) const { *x = m_minWidth; *y = m_minHeight; } - inline void GetProportion(double *x, double *y) const { *x = m_regionProportionX; *y = m_regionProportionY; } - inline void GetSize(double *x, double *y) const { *x = m_width; *y = m_height; } - inline void GetPosition(double *xp, double *yp) const { *xp = m_x; *yp = m_y; } - inline int GetFormatMode() const { return m_formatMode; } - inline wxString GetName() const { return m_regionName; } - inline wxString GetColour() const { return m_textColour; } - wxColour *GetActualColourObject(); - inline wxList& GetFormattedText() { return m_formattedText; } - inline wxString GetPenColour() const { return m_penColour; } - inline int GetPenStyle() const { return m_penStyle; } - inline void SetPenStyle(int style) { m_penStyle = style; m_actualPenObject = NULL; } - void SetPenColour(const wxString& col); - wxPen *GetActualPen(); - inline double GetWidth() const { return m_width; } - inline double GetHeight() const { return m_height; } - - void ClearText(); - -public: - wxString m_regionText; - wxList m_formattedText; // List of wxShapeTextLines - wxFont* m_font; - double m_minHeight; // If zero, hide region. - double m_minWidth; // If zero, hide region. - double m_width; - double m_height; - double m_x; - double m_y; - - double m_regionProportionX; // Proportion of total object size; - // -1.0 indicates equal proportion - double m_regionProportionY; // Proportion of total object size; - // -1.0 indicates equal proportion - - int m_formatMode; // FORMAT_CENTRE_HORIZ | FORMAT_CENTRE_VERT | FORMAT_NONE - wxString m_regionName; - wxString m_textColour; - wxColour* m_actualColourObject; // For speed purposes - - // New members for specifying divided rectangle division colour/style 30/6/94 - wxString m_penColour; - int m_penStyle; - wxPen* m_actualPenObject; - -}; - -/* - * User-defined attachment point - */ - -class wxAttachmentPoint: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxAttachmentPoint) - -public: - inline wxAttachmentPoint() - { - m_id = 0; m_x = 0.0; m_y = 0.0; - } - inline wxAttachmentPoint(int id, double x, double y) - { - m_id = id; m_x = x; m_y = y; - } - -public: - int m_id; // Identifier - double m_x; // x offset from centre of object - double m_y; // y offset from centre of object -}; - -#endif - // _OGL_BASICP_H_ diff --git a/utils/ogl/src/bitmap.cpp b/utils/ogl/src/bitmap.cpp deleted file mode 100644 index 8004f4a8d9..0000000000 --- a/utils/ogl/src/bitmap.cpp +++ /dev/null @@ -1,123 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bitmap.cpp -// Purpose: Bitmap shape class -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "bitmap.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#ifdef PROLOGIO -#include -#endif - -#include "basic.h" -#include "basicp.h" -#include "canvas.h" -#include "bitmap.h" -#include "misc.h" - -/* - * Bitmap object - * - */ - -IMPLEMENT_DYNAMIC_CLASS(wxBitmapShape, wxShape) - -wxBitmapShape::wxBitmapShape():wxRectangleShape(100.0, 50.0) -{ - m_filename = ""; -} - -wxBitmapShape::~wxBitmapShape() -{ -} - -void wxBitmapShape::OnDraw(wxDC& dc) -{ - if (!m_bitmap.Ok()) - return; - - wxMemoryDC tempDC; - tempDC.SelectObject(m_bitmap); - double x, y; - x = WXROUND(m_xpos - m_bitmap.GetWidth() / 2.0); - y = WXROUND(m_ypos - m_bitmap.GetHeight() / 2.0); - dc.Blit(x, y, m_bitmap.GetWidth(), m_bitmap.GetHeight(), &tempDC, 0, 0); -} - -void wxBitmapShape::SetSize(double w, double h, bool recursive) -{ - if (m_bitmap.Ok()) - { - w = m_bitmap.GetWidth(); - h = m_bitmap.GetHeight(); - } - - SetAttachmentSize(w, h); - - m_width = w; - m_height = h; - SetDefaultRegionSize(); -} - -#ifdef PROLOGIO -// Prolog database stuff -char *wxBitmapShape::GetFunctor() -{ - return "node_image"; -} - -void wxBitmapShape::WritePrologAttributes(wxExpr *clause) -{ - // Can't really save the bitmap; so instantiate the bitmap - // at a higher level in the application, from a symbol library. - wxRectangleShape::WritePrologAttributes(clause); - clause->AddAttributeValueString("filename", m_filename); -} - -void wxBitmapShape::ReadPrologAttributes(wxExpr *clause) -{ - wxRectangleShape::ReadPrologAttributes(clause); - clause->GetAttributeValue("filename", m_filename); -} -#endif - -// Does the copying for this object -void wxBitmapShape::Copy(wxShape& copy) -{ - wxRectangleShape::Copy(copy); - - wxASSERT( copy.IsKindOf(CLASSINFO(wxBitmapShape)) ) ; - - wxBitmapShape& bitmapCopy = (wxBitmapShape&) copy; - - bitmapCopy.m_bitmap = m_bitmap; - bitmapCopy.SetFilename(m_filename); -} - -void wxBitmapShape::SetBitmap(const wxBitmap& bm) -{ - m_bitmap = bm; - if (m_bitmap.Ok()) - SetSize(m_bitmap.GetWidth(), m_bitmap.GetHeight()); -} - - diff --git a/utils/ogl/src/bitmap.h b/utils/ogl/src/bitmap.h deleted file mode 100644 index 8527c49088..0000000000 --- a/utils/ogl/src/bitmap.h +++ /dev/null @@ -1,54 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: bitmap.h -// Purpose: wxBitmapShape -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _OGL_BITMAP_H_ -#define _OGL_BITMAP_H_ - -#ifdef __GNUG__ -#pragma interface "bitmap.h" -#endif - -#include "basic.h" - -class wxBitmapShape: public wxRectangleShape -{ - DECLARE_DYNAMIC_CLASS(wxBitmapShape) - public: - wxBitmapShape(); - ~wxBitmapShape(); - - void OnDraw(wxDC& dc); - -#ifdef PROLOGIO - // Prolog database stuff - char *GetFunctor(); - void WritePrologAttributes(wxExpr *clause); - void ReadPrologAttributes(wxExpr *clause); -#endif - - // Does the copying for this object - void Copy(wxShape& copy); - - void SetSize(double w, double h, bool recursive = TRUE); - inline wxBitmap& GetBitmap() const { return (wxBitmap&) m_bitmap; } - void SetBitmap(const wxBitmap& bm); - inline void SetFilename(const wxString& f) { m_filename = f; }; - inline wxString GetFilename() const { return m_filename; } - -private: - wxBitmap m_bitmap; - wxString m_filename; -}; - -#endif - // _OGL_BITMAP_H_ - - diff --git a/utils/ogl/src/canvas.cpp b/utils/ogl/src/canvas.cpp deleted file mode 100644 index d0ca4ee7c8..0000000000 --- a/utils/ogl/src/canvas.cpp +++ /dev/null @@ -1,511 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: canvas.cpp -// Purpose: Shape canvas class -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "canvas.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#ifdef PROLOGIO -#include -#endif - -#if USE_IOSTREAMH -#include -#else -#include -#endif - -#include -#include -#include - -#include "basic.h" -#include "basicp.h" -#include "canvas.h" -#include "ogldiag.h" -#include "misc.h" -#include "lines.h" -#include "composit.h" - -#define CONTROL_POINT_SIZE 6 - -// Control point types -// Rectangle and most other shapes -#define CONTROL_POINT_VERTICAL 1 -#define CONTROL_POINT_HORIZONTAL 2 -#define CONTROL_POINT_DIAGONAL 3 - -// Line -#define CONTROL_POINT_ENDPOINT_TO 4 -#define CONTROL_POINT_ENDPOINT_FROM 5 -#define CONTROL_POINT_LINE 6 - -extern wxCursor *g_oglBullseyeCursor; - -IMPLEMENT_DYNAMIC_CLASS(wxShapeCanvas, wxScrolledWindow) - -BEGIN_EVENT_TABLE(wxShapeCanvas, wxScrolledWindow) - EVT_PAINT(wxShapeCanvas::OnPaint) - EVT_MOUSE_EVENTS(wxShapeCanvas::OnMouseEvent) -END_EVENT_TABLE() - -// Object canvas -wxShapeCanvas::wxShapeCanvas(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style): - wxScrolledWindow(parent, id, pos, size, style) -{ - m_shapeDiagram = NULL; - m_dragState = NoDragging; - m_draggedShape = NULL; - m_oldDragX = 0; - m_oldDragY = 0; - m_firstDragX = 0; - m_firstDragY = 0; - m_checkTolerance = TRUE; -} - -wxShapeCanvas::~wxShapeCanvas() -{ -} - -void wxShapeCanvas::OnPaint(wxPaintEvent& event) -{ - wxPaintDC dc(this); - - PrepareDC(dc); - - dc.Clear(); - - if (GetDiagram()) - GetDiagram()->Redraw(dc); -} - -void wxShapeCanvas::OnMouseEvent(wxMouseEvent& event) -{ - wxClientDC dc(this); - PrepareDC(dc); - - wxPoint logPos(event.GetLogicalPosition(dc)); - - double x, y; - x = (double) logPos.x; - y = (double) logPos.y; - - int keys = 0; - if (event.ShiftDown()) - keys = keys | KEY_SHIFT; - if (event.ControlDown()) - keys = keys | KEY_CTRL; - - bool dragging = event.Dragging(); - - // Check if we're within the tolerance for mouse movements. - // If we're very close to the position we started dragging - // from, this may not be an intentional drag at all. - if (dragging) - { - int dx = abs(dc.LogicalToDeviceX(x - m_firstDragX)); - int dy = abs(dc.LogicalToDeviceY(y - m_firstDragY)); - if (m_checkTolerance && (dx <= GetDiagram()->GetMouseTolerance()) && (dy <= GetDiagram()->GetMouseTolerance())) - { - return; - } - else - // If we've ignored the tolerance once, then ALWAYS ignore - // tolerance in this drag, even if we come back within - // the tolerance range. - m_checkTolerance = FALSE; - } - - // Dragging - note that the effect of dragging is left entirely up - // to the object, so no movement is done unless explicitly done by - // object. - if (dragging && m_draggedShape && m_dragState == StartDraggingLeft) - { - m_dragState = ContinueDraggingLeft; - - // If the object isn't m_draggable, transfer message to canvas - if (m_draggedShape->Draggable()) - m_draggedShape->GetEventHandler()->OnBeginDragLeft((double)x, (double)y, keys, m_draggedAttachment); - else - { - m_draggedShape = NULL; - OnBeginDragLeft((double)x, (double)y, keys); - } - - m_oldDragX = x; m_oldDragY = y; - } - else if (dragging && m_draggedShape && m_dragState == ContinueDraggingLeft) - { - // Continue dragging - m_draggedShape->GetEventHandler()->OnDragLeft(FALSE, m_oldDragX, m_oldDragY, keys, m_draggedAttachment); - m_draggedShape->GetEventHandler()->OnDragLeft(TRUE, (double)x, (double)y, keys, m_draggedAttachment); - m_oldDragX = x; m_oldDragY = y; - } - else if (event.LeftUp() && m_draggedShape && m_dragState == ContinueDraggingLeft) - { - m_dragState = NoDragging; - m_checkTolerance = TRUE; - - m_draggedShape->GetEventHandler()->OnDragLeft(FALSE, m_oldDragX, m_oldDragY, keys, m_draggedAttachment); - - m_draggedShape->GetEventHandler()->OnEndDragLeft((double)x, (double)y, keys, m_draggedAttachment); - m_draggedShape = NULL; - } - else if (dragging && m_draggedShape && m_dragState == StartDraggingRight) - { - m_dragState = ContinueDraggingRight; - - if (m_draggedShape->Draggable()) - m_draggedShape->GetEventHandler()->OnBeginDragRight((double)x, (double)y, keys, m_draggedAttachment); - else - { - m_draggedShape = NULL; - OnBeginDragRight((double)x, (double)y, keys); - } - m_oldDragX = x; m_oldDragY = y; - } - else if (dragging && m_draggedShape && m_dragState == ContinueDraggingRight) - { - // Continue dragging - m_draggedShape->GetEventHandler()->OnDragRight(FALSE, m_oldDragX, m_oldDragY, keys, m_draggedAttachment); - m_draggedShape->GetEventHandler()->OnDragRight(TRUE, (double)x, (double)y, keys, m_draggedAttachment); - m_oldDragX = x; m_oldDragY = y; - } - else if (event.RightUp() && m_draggedShape && m_dragState == ContinueDraggingRight) - { - m_dragState = NoDragging; - m_checkTolerance = TRUE; - - m_draggedShape->GetEventHandler()->OnDragRight(FALSE, m_oldDragX, m_oldDragY, keys, m_draggedAttachment); - - m_draggedShape->GetEventHandler()->OnEndDragRight((double)x, (double)y, keys, m_draggedAttachment); - m_draggedShape = NULL; - } - - // All following events sent to canvas, not object - else if (dragging && !m_draggedShape && m_dragState == StartDraggingLeft) - { - m_dragState = ContinueDraggingLeft; - OnBeginDragLeft((double)x, (double)y, keys); - m_oldDragX = x; m_oldDragY = y; - } - else if (dragging && !m_draggedShape && m_dragState == ContinueDraggingLeft) - { - // Continue dragging - OnDragLeft(FALSE, m_oldDragX, m_oldDragY, keys); - OnDragLeft(TRUE, (double)x, (double)y, keys); - m_oldDragX = x; m_oldDragY = y; - } - else if (event.LeftUp() && !m_draggedShape && m_dragState == ContinueDraggingLeft) - { - m_dragState = NoDragging; - m_checkTolerance = TRUE; - - OnDragLeft(FALSE, m_oldDragX, m_oldDragY, keys); - OnEndDragLeft((double)x, (double)y, keys); - m_draggedShape = NULL; - } - else if (dragging && !m_draggedShape && m_dragState == StartDraggingRight) - { - m_dragState = ContinueDraggingRight; - OnBeginDragRight((double)x, (double)y, keys); - m_oldDragX = x; m_oldDragY = y; - } - else if (dragging && !m_draggedShape && m_dragState == ContinueDraggingRight) - { - // Continue dragging - OnDragRight(FALSE, m_oldDragX, m_oldDragY, keys); - OnDragRight(TRUE, (double)x, (double)y, keys); - m_oldDragX = x; m_oldDragY = y; - } - else if (event.RightUp() && !m_draggedShape && m_dragState == ContinueDraggingRight) - { - m_dragState = NoDragging; - m_checkTolerance = TRUE; - - OnDragRight(FALSE, m_oldDragX, m_oldDragY, keys); - OnEndDragRight((double)x, (double)y, keys); - m_draggedShape = NULL; - } - - // Non-dragging events - else if (event.IsButton()) - { - m_checkTolerance = TRUE; - - // Find the nearest object - int attachment = 0; - wxShape *nearest_object = FindShape(x, y, &attachment); - if (nearest_object) // Object event - { - if (event.LeftDown()) - { - m_draggedShape = nearest_object; - m_draggedAttachment = attachment; - m_dragState = StartDraggingLeft; - m_firstDragX = x; - m_firstDragY = y; - } - else if (event.LeftUp()) - { - // N.B. Only register a click if the same object was - // identified for down *and* up. - if (nearest_object == m_draggedShape) - nearest_object->GetEventHandler()->OnLeftClick((double)x, (double)y, keys, attachment); - - m_draggedShape = NULL; - m_dragState = NoDragging; - } - else if (event.RightDown()) - { - m_draggedShape = nearest_object; - m_draggedAttachment = attachment; - m_dragState = StartDraggingRight; - m_firstDragX = x; - m_firstDragY = y; - } - else if (event.RightUp()) - { - if (nearest_object == m_draggedShape) - nearest_object->GetEventHandler()->OnRightClick((double)x, (double)y, keys, attachment); - - m_draggedShape = NULL; - m_dragState = NoDragging; - } - } - else // Canvas event (no nearest object) - { - if (event.LeftDown()) - { - m_draggedShape = NULL; - m_dragState = StartDraggingLeft; - m_firstDragX = x; - m_firstDragY = y; - } - else if (event.LeftUp()) - { - OnLeftClick((double)x, (double)y, keys); - - m_draggedShape = NULL; - m_dragState = NoDragging; - } - else if (event.RightDown()) - { - m_draggedShape = NULL; - m_dragState = StartDraggingRight; - m_firstDragX = x; - m_firstDragY = y; - } - else if (event.RightUp()) - { - OnRightClick((double)x, (double)y, keys); - - m_draggedShape = NULL; - m_dragState = NoDragging; - } - } - } -} - -/* - * Try to find a sensitive object, working up the hierarchy of composites. - * - */ -wxShape *wxShapeCanvas::FindFirstSensitiveShape(double x, double y, int *new_attachment, int op) -{ - wxShape *image = FindShape(x, y, new_attachment); - if (!image) return NULL; - - wxShape *actualImage = FindFirstSensitiveShape1(image, op); - if (actualImage) - { - double dist; - // Find actual attachment - actualImage->HitTest(x, y, new_attachment, &dist); - } - return actualImage; -} - -wxShape *wxShapeCanvas::FindFirstSensitiveShape1(wxShape *image, int op) -{ - if (image->GetSensitivityFilter() & op) - return image; - if (image->GetParent()) - return FindFirstSensitiveShape1(image->GetParent(), op); - return NULL; -} - -// Helper function: TRUE if 'contains' wholly contains 'contained'. -static bool WhollyContains(wxShape *contains, wxShape *contained) -{ - double xp1, yp1, xp2, yp2; - double w1, h1, w2, h2; - double left1, top1, right1, bottom1, left2, top2, right2, bottom2; - - xp1 = contains->GetX(); yp1 = contains->GetY(); xp2 = contained->GetX(); yp2 = contained->GetY(); - contains->GetBoundingBoxMax(&w1, &h1); - contained->GetBoundingBoxMax(&w2, &h2); - - left1 = (double)(xp1 - (w1 / 2.0)); - top1 = (double)(yp1 - (h1 / 2.0)); - right1 = (double)(xp1 + (w1 / 2.0)); - bottom1 = (double)(yp1 + (h1 / 2.0)); - - left2 = (double)(xp2 - (w2 / 2.0)); - top2 = (double)(yp2 - (h2 / 2.0)); - right2 = (double)(xp2 + (w2 / 2.0)); - bottom2 = (double)(yp2 + (h2 / 2.0)); - - return ((left1 <= left2) && (top1 <= top2) && (right1 >= right2) && (bottom1 >= bottom2)); -} - -wxShape *wxShapeCanvas::FindShape(double x, double y, int *attachment, wxClassInfo *info, wxShape *notObject) -{ - double nearest = 100000.0; - int nearest_attachment = 0; - wxShape *nearest_object = NULL; - - // Go backward through the object list, since we want: - // (a) to have the control points drawn LAST to overlay - // the other objects - // (b) to find the control points FIRST if they exist - - wxNode *current = GetDiagram()->GetShapeList()->Last(); - while (current) - { - wxShape *object = (wxShape *)current->Data(); - - double dist; - int temp_attachment; - - // First pass for lines, which might be inside a container, so we - // want lines to take priority over containers. This first loop - // could fail if we clickout side a line, so then we'll - // try other shapes. - if (object->IsShown() && - object->IsKindOf(CLASSINFO(wxLineShape)) && - object->HitTest(x, y, &temp_attachment, &dist) && - ((info == NULL) || object->IsKindOf(info)) && - (!notObject || !notObject->HasDescendant(object))) - { - // A line is trickier to spot than a normal object. - // For a line, since it's the diagonal of the box - // we use for the hit test, we may have several - // lines in the box and therefore we need to be able - // to specify the nearest point to the centre of the line - // as our hit criterion, to give the user some room for - // manouevre. - if (dist < nearest) - { - nearest = dist; - nearest_object = object; - nearest_attachment = temp_attachment; - } - } - if (current) - current = current->Previous(); - } - - current = GetDiagram()->GetShapeList()->Last(); - while (current) - { - wxShape *object = (wxShape *)current->Data(); - double dist; - int temp_attachment; - - // On second pass, only ever consider non-composites or divisions. If children want to pass - // up control to the composite, that's up to them. - if (object->IsShown() && (object->IsKindOf(CLASSINFO(wxDivisionShape)) || !object->IsKindOf(CLASSINFO(wxCompositeShape))) - && object->HitTest(x, y, &temp_attachment, &dist) && ((info == NULL) || object->IsKindOf(info)) && - (!notObject || !notObject->HasDescendant(object))) - { - if (!object->IsKindOf(CLASSINFO(wxLineShape))) - { - // If we've hit a container, and we have already found a line in the - // first pass, then ignore the container in case the line is in the container. - // Check for division in case line straddles divisions (i.e. is not wholly contained). - if (!nearest_object || !(object->IsKindOf(CLASSINFO(wxDivisionShape)) || WhollyContains(object, nearest_object))) - { - nearest = dist; - nearest_object = object; - nearest_attachment = temp_attachment; - current = NULL; - } - } - } - if (current) - current = current->Previous(); - } - - *attachment = nearest_attachment; - return nearest_object; -} - -/* - * Higher-level events called by OnEvent - * - */ - -void wxShapeCanvas::OnLeftClick(double x, double y, int keys) -{ -} - -void wxShapeCanvas::OnRightClick(double x, double y, int keys) -{ -} - -void wxShapeCanvas::OnDragLeft(bool draw, double x, double y, int keys) -{ -} - -void wxShapeCanvas::OnBeginDragLeft(double x, double y, int keys) -{ -} - -void wxShapeCanvas::OnEndDragLeft(double x, double y, int keys) -{ -} - -void wxShapeCanvas::OnDragRight(bool draw, double x, double y, int keys) -{ -} - -void wxShapeCanvas::OnBeginDragRight(double x, double y, int keys) -{ -} - -void wxShapeCanvas::OnEndDragRight(double x, double y, int keys) -{ -} - -void wxShapeCanvas::AddShape(wxShape *object, wxShape *addAfter) - { GetDiagram()->AddShape(object, addAfter); } -void wxShapeCanvas::InsertShape(wxShape *object) - { GetDiagram()->InsertShape(object); } -void wxShapeCanvas::RemoveShape(wxShape *object) - { GetDiagram()->RemoveShape(object); } -bool wxShapeCanvas::GetQuickEditMode() - { return GetDiagram()->GetQuickEditMode(); } -void wxShapeCanvas::Redraw(wxDC& dc) - { GetDiagram()->Redraw(dc); } -void wxShapeCanvas::Snap(double *x, double *y) - { GetDiagram()->Snap(x, y); } diff --git a/utils/ogl/src/canvas.h b/utils/ogl/src/canvas.h deleted file mode 100644 index faeaaa30ad..0000000000 --- a/utils/ogl/src/canvas.h +++ /dev/null @@ -1,83 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: canvas.h -// Purpose: wxShapeCanvas -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _OGL_CANVAS_H_ -#define _OGL_CANVAS_H_ - -#ifdef __GNUG__ -#pragma interface "canvas.h" -#endif - -// Drag states -#define NoDragging 0 -#define StartDraggingLeft 1 -#define ContinueDraggingLeft 2 -#define StartDraggingRight 3 -#define ContinueDraggingRight 4 - -// When drag_count reaches 0, process drag message - -class wxDiagram; - -class wxShapeCanvas: public wxScrolledWindow -{ - DECLARE_DYNAMIC_CLASS(wxShapeCanvas) - public: - wxShapeCanvas(wxWindow *parent = NULL, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxBORDER | wxRETAINED); - ~wxShapeCanvas(); - - inline void SetDiagram(wxDiagram *diag) { m_shapeDiagram = diag; } - inline wxDiagram *GetDiagram() const { return m_shapeDiagram; } - - virtual void OnLeftClick(double x, double y, int keys = 0); - virtual void OnRightClick(double x, double y, int keys = 0); - - virtual void OnDragLeft(bool draw, double x, double y, int keys=0); // Erase if draw false - virtual void OnBeginDragLeft(double x, double y, int keys=0); - virtual void OnEndDragLeft(double x, double y, int keys=0); - - virtual void OnDragRight(bool draw, double x, double y, int keys=0); // Erase if draw false - virtual void OnBeginDragRight(double x, double y, int keys=0); - virtual void OnEndDragRight(double x, double y, int keys=0); - - // Find object for mouse click, of given wxClassInfo (NULL for any type). - // If notImage is non-NULL, don't find an object that is equal to or a descendant of notImage - virtual wxShape *FindShape(double x, double y, int *attachment, wxClassInfo *info = NULL, wxShape *notImage = NULL); - wxShape *FindFirstSensitiveShape(double x, double y, int *new_attachment, int op); - wxShape *FindFirstSensitiveShape1(wxShape *image, int op); - - // Redirect to wxDiagram object - virtual void AddShape(wxShape *object, wxShape *addAfter = NULL); - virtual void InsertShape(wxShape *object); - virtual void RemoveShape(wxShape *object); - virtual bool GetQuickEditMode(); - virtual void Redraw(wxDC& dc); - void Snap(double *x, double *y); - - // Events - void OnPaint(wxPaintEvent& event); - void OnMouseEvent(wxMouseEvent& event); - - protected: - wxDiagram* m_shapeDiagram; - int m_dragState; - double m_oldDragX, m_oldDragY; // Previous drag coordinates - double m_firstDragX, m_firstDragY; // INITIAL drag coordinates - bool m_checkTolerance; // Whether to check drag tolerance - wxShape* m_draggedShape; - int m_draggedAttachment; - -DECLARE_EVENT_TABLE() -}; - -#endif - // _OGL_CANVAS_H_ diff --git a/utils/ogl/src/composit.cpp b/utils/ogl/src/composit.cpp deleted file mode 100644 index 2ce5273e41..0000000000 --- a/utils/ogl/src/composit.cpp +++ /dev/null @@ -1,1763 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: composit.cpp -// Purpose: Composite OGL class -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "composit.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#ifdef PROLOGIO -#include -#endif - -#include "basic.h" -#include "basicp.h" -#include "constrnt.h" -#include "composit.h" -#include "misc.h" -#include "canvas.h" - -// Sometimes, objects need to access the whole database to -// construct themselves. -wxExprDatabase *GlobalwxExprDatabase = NULL; - -// Popup menu for editing divisions -wxMenu *oglPopupDivisionMenu = NULL; - -/* - * Division control point - */ - -class wxDivisionControlPoint: public wxControlPoint -{ - DECLARE_DYNAMIC_CLASS(wxDivisionControlPoint) - public: - wxDivisionControlPoint() {} - wxDivisionControlPoint(wxShapeCanvas *the_canvas, wxShape *object, double size, double the_xoffset, double the_yoffset, int the_type); - ~wxDivisionControlPoint(); - - void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); - void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); - void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); -}; - -IMPLEMENT_DYNAMIC_CLASS(wxDivisionControlPoint, wxControlPoint) - -/* - * Composite object - * - */ - -IMPLEMENT_DYNAMIC_CLASS(wxCompositeShape, wxRectangleShape) - -wxCompositeShape::wxCompositeShape(): wxRectangleShape(10.0, 10.0) -{ -// selectable = FALSE; - m_oldX = m_xpos; - m_oldY = m_ypos; -} - -wxCompositeShape::~wxCompositeShape() -{ - wxNode *node = m_constraints.First(); - while (node) - { - OGLConstraint *constraint = (OGLConstraint *)node->Data(); - delete constraint; - node = node->Next(); - } - node = m_children.First(); - while (node) - { - wxShape *object = (wxShape *)node->Data(); - wxNode *next = node->Next(); - object->Unlink(); - delete object; - node = next; - } -} - -void wxCompositeShape::OnDraw(wxDC& dc) -{ - double x1 = (double)(m_xpos - m_width/2.0); - double y1 = (double)(m_ypos - m_height/2.0); - - if (m_shadowMode != SHADOW_NONE) - { - if (m_shadowBrush) - dc.SetBrush(m_shadowBrush); - dc.SetPen(g_oglTransparentPen); - - if (m_cornerRadius != 0.0) - dc.DrawRoundedRectangle(WXROUND(x1 + m_shadowOffsetX), WXROUND(y1 + m_shadowOffsetY), - WXROUND(m_width), WXROUND(m_height), m_cornerRadius); - else - dc.DrawRectangle(WXROUND(x1 + m_shadowOffsetX), WXROUND(y1 + m_shadowOffsetY), WXROUND(m_width), WXROUND(m_height)); - } -} - -void wxCompositeShape::OnDrawContents(wxDC& dc) -{ - wxNode *node = m_children.First(); - while (node) - { - wxShape *object = (wxShape *)node->Data(); - object->Draw(dc); - object->DrawLinks(dc); - node = node->Next(); - } - wxShape::OnDrawContents(dc); -} - -bool wxCompositeShape::OnMovePre(wxDC& dc, double x, double y, double oldx, double oldy, bool display) -{ - double diffX = x - oldx; - double diffY = y - oldy; - wxNode *node = m_children.First(); - while (node) - { - wxShape *object = (wxShape *)node->Data(); - - object->Erase(dc); - object->Move(dc, object->GetX() + diffX, object->GetY() + diffY, display); - - node = node->Next(); - } - return TRUE; -} - -void wxCompositeShape::OnErase(wxDC& dc) -{ - wxRectangleShape::OnErase(dc); - wxNode *node = m_children.First(); - while (node) - { - wxShape *object = (wxShape *)node->Data(); - object->Erase(dc); - node = node->Next(); - } -} - -static double objectStartX = 0.0; -static double objectStartY = 0.0; - -void wxCompositeShape::OnDragLeft(bool draw, double x, double y, int keys, int attachment) -{ - double xx = x; - double yy = y; - m_canvas->Snap(&xx, &yy); - double offsetX = xx - objectStartX; - double offsetY = yy - objectStartY; - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - dc.SetLogicalFunction(wxXOR); - wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT); - dc.SetPen(dottedPen); - dc.SetBrush((* wxTRANSPARENT_BRUSH)); - - GetEventHandler()->OnDrawOutline(dc, GetX() + offsetX, GetY() + offsetY, GetWidth(), GetHeight()); -// wxShape::OnDragLeft(draw, x, y, keys, attachment); -} - -void wxCompositeShape::OnBeginDragLeft(double x, double y, int keys, int attachment) -{ - objectStartX = x; - objectStartY = y; - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - Erase(dc); - - dc.SetLogicalFunction(wxXOR); - - wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT); - dc.SetPen(dottedPen); - dc.SetBrush((* wxTRANSPARENT_BRUSH)); - m_canvas->CaptureMouse(); - - double xx = x; - double yy = y; - m_canvas->Snap(&xx, &yy); - double offsetX = xx - objectStartX; - double offsetY = yy - objectStartY; - - GetEventHandler()->OnDrawOutline(dc, GetX() + offsetX, GetY() + offsetY, GetWidth(), GetHeight()); - -// wxShape::OnBeginDragLeft(x, y, keys, attachment); -} - -void wxCompositeShape::OnEndDragLeft(double x, double y, int keys, int attachment) -{ -// wxShape::OnEndDragLeft(x, y, keys, attachment); - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - m_canvas->ReleaseMouse(); - - if (!m_draggable) - { - if (m_parent) m_parent->GetEventHandler()->OnEndDragLeft(x, y, keys, 0); - return; - } - - dc.SetLogicalFunction(wxCOPY); - double xx = x; - double yy = y; - m_canvas->Snap(&xx, &yy); - double offsetX = xx - objectStartX; - double offsetY = yy - objectStartY; - - Move(dc, GetX() + offsetX, GetY() + offsetY); - - if (m_canvas && !m_canvas->GetQuickEditMode()) m_canvas->Redraw(dc); -} - -void wxCompositeShape::OnRightClick(double x, double y, int keys, int attachment) -{ - // If we get a ctrl-right click, this means send the message to - // the division, so we can invoke a user interface for dealing with regions. - if (keys & KEY_CTRL) - { - wxNode *node = m_divisions.First(); - while (node) - { - wxDivisionShape *division = (wxDivisionShape *)node->Data(); - wxNode *next = node->Next(); - int attach = 0; - double dist = 0.0; - if (division->HitTest(x, y, &attach, &dist)) - { - division->GetEventHandler()->OnRightClick(x, y, keys, attach); - node = NULL; - } - if (node) - node = next; - } - } -} - -void wxCompositeShape::SetSize(double w, double h, bool recursive) -{ - SetAttachmentSize(w, h); - - double xScale = (double)(w/(wxMax(1.0, GetWidth()))); - double yScale = (double)(h/(wxMax(1.0, GetHeight()))); - - m_width = w; - m_height = h; - - if (!recursive) return; - - wxNode *node = m_children.First(); - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - double xBound, yBound; - while (node) - { - wxShape *object = (wxShape *)node->Data(); - - // Scale the position first - double newX = (double)(((object->GetX() - GetX())*xScale) + GetX()); - double newY = (double)(((object->GetY() - GetY())*yScale) + GetY()); - object->Show(FALSE); - object->Move(dc, newX, newY); - object->Show(TRUE); - - // Now set the scaled size - object->GetBoundingBoxMin(&xBound, &yBound); - object->SetSize(object->GetFixedWidth() ? xBound : xScale*xBound, - object->GetFixedHeight() ? yBound : yScale*yBound); - - node = node->Next(); - } - SetDefaultRegionSize(); -} - -void wxCompositeShape::AddChild(wxShape *child, wxShape *addAfter) -{ - m_children.Append(child); - child->SetParent(this); - if (m_canvas) - { - // Ensure we add at the right position - if (addAfter) - child->RemoveFromCanvas(m_canvas); - child->AddToCanvas(m_canvas, addAfter); - } -} - -void wxCompositeShape::RemoveChild(wxShape *child) -{ - m_children.DeleteObject(child); - m_divisions.DeleteObject(child); - RemoveChildFromConstraints(child); - child->SetParent(NULL); -} - -void wxCompositeShape::DeleteConstraintsInvolvingChild(wxShape *child) -{ - wxNode *node = m_constraints.First(); - while (node) - { - OGLConstraint *constraint = (OGLConstraint *)node->Data(); - wxNode *nextNode = node->Next(); - - if ((constraint->m_constrainingObject == child) || - constraint->m_constrainedObjects.Member(child)) - { - delete constraint; - delete node; - } - node = nextNode; - } -} - -void wxCompositeShape::RemoveChildFromConstraints(wxShape *child) -{ - wxNode *node = m_constraints.First(); - while (node) - { - OGLConstraint *constraint = (OGLConstraint *)node->Data(); - wxNode *nextNode = node->Next(); - - if (constraint->m_constrainedObjects.Member(child)) - constraint->m_constrainedObjects.DeleteObject(child); - if (constraint->m_constrainingObject == child) - constraint->m_constrainingObject = NULL; - - // Delete the constraint if no participants left - if (!constraint->m_constrainingObject) - { - delete constraint; - delete node; - } - - node = nextNode; - } -} - -void wxCompositeShape::Copy(wxShape& copy) -{ - wxRectangleShape::Copy(copy); - - wxASSERT( copy.IsKindOf(CLASSINFO(wxCompositeShape)) ) ; - - wxCompositeShape& compositeCopy = (wxCompositeShape&) copy; - - // Associate old and new copies for compositeCopying constraints and division geometry - oglObjectCopyMapping.Append((long)this, &compositeCopy); - - // Copy the children - wxNode *node = m_children.First(); - while (node) - { - wxShape *object = (wxShape *)node->Data(); - wxShape *newObject = object->CreateNewCopy(FALSE, FALSE); - if (newObject->GetId() == 0) - newObject->SetId(NewId()); - - newObject->SetParent(&compositeCopy); - compositeCopy.m_children.Append(newObject); - - // Some m_children may be divisions - if (m_divisions.Member(object)) - compositeCopy.m_divisions.Append(newObject); - - oglObjectCopyMapping.Append((long)object, newObject); - - node = node->Next(); - } - - // Copy the constraints - node = m_constraints.First(); - while (node) - { - OGLConstraint *constraint = (OGLConstraint *)node->Data(); - - wxShape *newConstraining = (wxShape *)(oglObjectCopyMapping.Find((long)constraint->m_constrainingObject)->Data()); - - wxList newConstrainedList; - wxNode *node2 = constraint->m_constrainedObjects.First(); - while (node2) - { - wxShape *constrainedObject = (wxShape *)node2->Data(); - wxShape *newConstrained = (wxShape *)(oglObjectCopyMapping.Find((long)constrainedObject)->Data()); - newConstrainedList.Append(newConstrained); - node2 = node2->Next(); - } - - OGLConstraint *newConstraint = new OGLConstraint(constraint->m_constraintType, newConstraining, - newConstrainedList); - newConstraint->m_constraintId = constraint->m_constraintId; - if (constraint->m_constraintName) - { - newConstraint->m_constraintName = constraint->m_constraintName; - } - newConstraint->SetSpacing(constraint->m_xSpacing, constraint->m_ySpacing); - compositeCopy.m_constraints.Append(newConstraint); - - node = node->Next(); - } - - // Now compositeCopy the division geometry - node = m_divisions.First(); - while (node) - { - wxDivisionShape *division = (wxDivisionShape *)node->Data(); - wxNode *node1 = oglObjectCopyMapping.Find((long)division); - wxNode *leftNode = NULL; - wxNode *topNode = NULL; - wxNode *rightNode = NULL; - wxNode *bottomNode = NULL; - if (division->GetLeftSide()) - leftNode = oglObjectCopyMapping.Find((long)division->GetLeftSide()); - if (division->GetTopSide()) - topNode = oglObjectCopyMapping.Find((long)division->GetTopSide()); - if (division->GetRightSide()) - rightNode = oglObjectCopyMapping.Find((long)division->GetRightSide()); - if (division->GetBottomSide()) - bottomNode = oglObjectCopyMapping.Find((long)division->GetBottomSide()); - if (node1) - { - wxDivisionShape *newDivision = (wxDivisionShape *)node1->Data(); - if (leftNode) - newDivision->SetLeftSide((wxDivisionShape *)leftNode->Data()); - if (topNode) - newDivision->SetTopSide((wxDivisionShape *)topNode->Data()); - if (rightNode) - newDivision->SetRightSide((wxDivisionShape *)rightNode->Data()); - if (bottomNode) - newDivision->SetBottomSide((wxDivisionShape *)bottomNode->Data()); - } - node = node->Next(); - } -} - -OGLConstraint *wxCompositeShape::AddConstraint(OGLConstraint *constraint) -{ - m_constraints.Append(constraint); - if (constraint->m_constraintId == 0) - constraint->m_constraintId = NewId(); - return constraint; -} - -OGLConstraint *wxCompositeShape::AddConstraint(int type, wxShape *constraining, wxList& constrained) -{ - OGLConstraint *constraint = new OGLConstraint(type, constraining, constrained); - if (constraint->m_constraintId == 0) - constraint->m_constraintId = NewId(); - m_constraints.Append(constraint); - return constraint; -} - -OGLConstraint *wxCompositeShape::AddConstraint(int type, wxShape *constraining, wxShape *constrained) -{ - wxList l; - l.Append(constrained); - OGLConstraint *constraint = new OGLConstraint(type, constraining, l); - if (constraint->m_constraintId == 0) - constraint->m_constraintId = NewId(); - m_constraints.Append(constraint); - return constraint; -} - -OGLConstraint *wxCompositeShape::FindConstraint(long cId, wxCompositeShape **actualComposite) -{ - wxNode *node = m_constraints.First(); - while (node) - { - OGLConstraint *constraint = (OGLConstraint *)node->Data(); - if (constraint->m_constraintId == cId) - { - if (actualComposite) - *actualComposite = this; - return constraint; - } - node = node->Next(); - } - // If not found, try children. - node = m_children.First(); - while (node) - { - wxShape *child = (wxShape *)node->Data(); - if (child->IsKindOf(CLASSINFO(wxCompositeShape))) - { - OGLConstraint *constraint = ((wxCompositeShape *)child)->FindConstraint(cId, actualComposite); - if (constraint) - { - if (actualComposite) - *actualComposite = (wxCompositeShape *)child; - return constraint; - } - } - node = node->Next(); - } - return NULL; -} - -void wxCompositeShape::DeleteConstraint(OGLConstraint *constraint) -{ - m_constraints.DeleteObject(constraint); - delete constraint; -} - -void wxCompositeShape::CalculateSize() -{ - double maxX = (double) -999999.9; - double maxY = (double) -999999.9; - double minX = (double) 999999.9; - double minY = (double) 999999.9; - - double w, h; - wxNode *node = m_children.First(); - while (node) - { - wxShape *object = (wxShape *)node->Data(); - - // Recalculate size of composite objects because may not conform - // to size it was set to - depends on the children. - object->CalculateSize(); - - object->GetBoundingBoxMax(&w, &h); - if ((object->GetX() + (w/2.0)) > maxX) - maxX = (double)(object->GetX() + (w/2.0)); - if ((object->GetX() - (w/2.0)) < minX) - minX = (double)(object->GetX() - (w/2.0)); - if ((object->GetY() + (h/2.0)) > maxY) - maxY = (double)(object->GetY() + (h/2.0)); - if ((object->GetY() - (h/2.0)) < minY) - minY = (double)(object->GetY() - (h/2.0)); - - node = node->Next(); - } - m_width = maxX - minX; - m_height = maxY - minY; - m_xpos = (double)(m_width/2.0 + minX); - m_ypos = (double)(m_height/2.0 + minY); -} - -bool wxCompositeShape::Recompute() -{ - int noIterations = 0; - bool changed = TRUE; - while (changed && (noIterations < 500)) - { - changed = Constrain(); - noIterations ++; - } -/* -#ifdef wx_x - if (changed) - cerr << "Warning: constraint algorithm failed after 500 iterations.\n"; -#endif -*/ - return (!changed); -} - -bool wxCompositeShape::Constrain() -{ - CalculateSize(); - - bool changed = FALSE; - wxNode *node = m_children.First(); - while (node) - { - wxShape *object = (wxShape *)node->Data(); - if (object->Constrain()) - changed = TRUE; - node = node->Next(); - } - - node = m_constraints.First(); - while (node) - { - OGLConstraint *constraint = (OGLConstraint *)node->Data(); - if (constraint->Evaluate()) changed = TRUE; - node = node->Next(); - } - return changed; -} - -#ifdef PROLOGIO -void wxCompositeShape::WritePrologAttributes(wxExpr *clause) -{ - wxRectangleShape::WritePrologAttributes(clause); - -// clause->AddAttributeValue("selectable", (long)selectable); - - // Output constraints as constraint1 = (...), constraint2 = (...), etc. - int constraintNo = 1; - char m_constraintNameBuf[20]; - wxNode *node = m_constraints.First(); - while (node) - { - OGLConstraint *constraint = (OGLConstraint *)node->Data(); - sprintf(m_constraintNameBuf, "constraint%d", constraintNo); - - // Each constraint is stored in the form - // (type name id xspacing yspacing m_constrainingObjectId constrainedObjectIdList) - wxExpr *constraintExpr = new wxExpr(PrologList); - constraintExpr->Append(new wxExpr((long)constraint->m_constraintType)); - constraintExpr->Append(new wxExpr(PrologString, constraint->m_constraintName)); - constraintExpr->Append(new wxExpr(constraint->m_constraintId)); - constraintExpr->Append(new wxExpr(constraint->m_xSpacing)); - constraintExpr->Append(new wxExpr(constraint->m_ySpacing)); - constraintExpr->Append(new wxExpr(constraint->m_constrainingObject->GetId())); - - wxExpr *objectList = new wxExpr(PrologList); - wxNode *node1 = constraint->m_constrainedObjects.First(); - while (node1) - { - wxShape *obj = (wxShape *)node1->Data(); - objectList->Append(new wxExpr(obj->GetId())); - node1 = node1->Next(); - } - constraintExpr->Append(objectList); - - clause->AddAttributeValue(m_constraintNameBuf, constraintExpr); - - node = node->Next(); - constraintNo ++; - } - - // Write the ids of all the child images - wxExpr *childrenExpr = new wxExpr(PrologList); - node = m_children.First(); - while (node) - { - wxShape *child = (wxShape *)node->Data(); - childrenExpr->Append(new wxExpr(child->GetId())); - node = node->Next(); - } - clause->AddAttributeValue("children", childrenExpr); - - // Write the ids of all the division images - if (m_divisions.Number() > 0) - { - wxExpr *divisionsExpr = new wxExpr(PrologList); - node = m_divisions.First(); - while (node) - { - wxShape *child = (wxShape *)node->Data(); - divisionsExpr->Append(new wxExpr(child->GetId())); - node = node->Next(); - } - clause->AddAttributeValue("divisions", divisionsExpr); - } -} - -// Problem. Child images are always written AFTER the parent -// so as to be able to link up to parent. So we may not be able -// to find the constraint participants until we've read everything -// in. Need to have another pass for composites. -void wxCompositeShape::ReadPrologAttributes(wxExpr *clause) -{ - wxRectangleShape::ReadPrologAttributes(clause); - -// clause->GetAttributeValue("selectable", selectable); -} - -void wxCompositeShape::ReadConstraints(wxExpr *clause, wxExprDatabase *database) -{ - // Constraints are output as constraint1 = (...), constraint2 = (...), etc. - int constraintNo = 1; - char m_constraintNameBuf[20]; - bool haveConstraints = TRUE; - - while (haveConstraints) - { - sprintf(m_constraintNameBuf, "constraint%d", constraintNo); - wxExpr *constraintExpr = NULL; - clause->GetAttributeValue(m_constraintNameBuf, &constraintExpr); - if (!constraintExpr) - { - haveConstraints = FALSE; - break; - } - int cType = 0; - double cXSpacing = 0.0; - double cYSpacing = 0.0; - wxString cName(""); - long cId = 0; - wxShape *m_constrainingObject = NULL; - wxList m_constrainedObjects; - - // Each constraint is stored in the form - // (type name id xspacing yspacing m_constrainingObjectId constrainedObjectIdList) - - wxExpr *typeExpr = constraintExpr->Nth(0); - wxExpr *nameExpr = constraintExpr->Nth(1); - wxExpr *idExpr = constraintExpr->Nth(2); - wxExpr *xExpr = constraintExpr->Nth(3); - wxExpr *yExpr = constraintExpr->Nth(4); - wxExpr *constrainingExpr = constraintExpr->Nth(5); - wxExpr *constrainedExpr = constraintExpr->Nth(6); - - cType = (int)typeExpr->IntegerValue(); - cXSpacing = xExpr->RealValue(); - cYSpacing = yExpr->RealValue(); - cName = nameExpr->StringValue(); - cId = idExpr->IntegerValue(); - - wxExpr *objExpr1 = database->HashFind("node_image", constrainingExpr->IntegerValue()); - if (objExpr1 && objExpr1->GetClientData()) - m_constrainingObject = (wxShape *)objExpr1->GetClientData(); - else - wxFatalError("Couldn't find constraining image of composite.", "Object graphics error"); - - int i = 0; - wxExpr *currentIdExpr = constrainedExpr->Nth(i); - while (currentIdExpr) - { - long currentId = currentIdExpr->IntegerValue(); - wxExpr *objExpr2 = database->HashFind("node_image", currentId); - if (objExpr2 && objExpr2->GetClientData()) - { - m_constrainedObjects.Append((wxShape *)objExpr2->GetClientData()); - } - else - { - wxFatalError("Couldn't find constrained image of composite.", "Object graphics error"); - } - - i ++; - currentIdExpr = constrainedExpr->Nth(i); - } - OGLConstraint *newConstraint = AddConstraint(cType, m_constrainingObject, m_constrainedObjects); - newConstraint->SetSpacing(cXSpacing, cYSpacing); - newConstraint->m_constraintId = cId; - newConstraint->m_constraintName = (const char*) cName; - constraintNo ++; - } -} -#endif - -// Make this composite into a container by creating one wxDivisionShape -void wxCompositeShape::MakeContainer() -{ - wxDivisionShape *division = OnCreateDivision(); - m_divisions.Append(division); - AddChild(division); - - division->SetSize(m_width, m_height); - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - division->Move(dc, GetX(), GetY()); - Recompute(); - division->Show(TRUE); -} - -wxDivisionShape *wxCompositeShape::OnCreateDivision() -{ - return new wxDivisionShape; -} - -wxShape *wxCompositeShape::FindContainerImage() -{ - wxNode *node = m_children.First(); - while (node) - { - wxShape *child = (wxShape *)node->Data(); - if (!m_divisions.Member(child)) - return child; - node = node->Next(); - } - return NULL; -} - -// Returns TRUE if division is a descendant of this container -bool wxCompositeShape::ContainsDivision(wxDivisionShape *division) -{ - if (m_divisions.Member(division)) - return TRUE; - wxNode *node = m_children.First(); - while (node) - { - wxShape *child = (wxShape *)node->Data(); - if (child->IsKindOf(CLASSINFO(wxCompositeShape))) - { - bool ans = ((wxCompositeShape *)child)->ContainsDivision(division); - if (ans) - return TRUE; - } - node = node->Next(); - } - return FALSE; -} - -/* - * Division object - * - */ - -IMPLEMENT_DYNAMIC_CLASS(wxDivisionShape, wxCompositeShape) - -wxDivisionShape::wxDivisionShape() -{ - SetSensitivityFilter(OP_CLICK_LEFT | OP_CLICK_RIGHT | OP_DRAG_RIGHT); - SetCentreResize(FALSE); - SetAttachmentMode(TRUE); - m_leftSide = NULL; - m_rightSide = NULL; - m_topSide = NULL; - m_bottomSide = NULL; - m_handleSide = DIVISION_SIDE_NONE; - m_leftSidePen = wxBLACK_PEN; - m_topSidePen = wxBLACK_PEN; - m_leftSideColour = "BLACK"; - m_topSideColour = "BLACK"; - m_leftSideStyle = "Solid"; - m_topSideStyle = "Solid"; - ClearRegions(); -} - -wxDivisionShape::~wxDivisionShape() -{ -} - -void wxDivisionShape::OnDraw(wxDC& dc) -{ - dc.SetBrush(wxTRANSPARENT_BRUSH); - dc.SetBackgroundMode(wxTRANSPARENT); - - double x1 = (double)(GetX() - (GetWidth()/2.0)); - double y1 = (double)(GetY() - (GetHeight()/2.0)); - double x2 = (double)(GetX() + (GetWidth()/2.0)); - double y2 = (double)(GetY() + (GetHeight()/2.0)); - - // Should subtract 1 pixel if drawing under Windows -#ifdef __WXMSW__ - y2 -= (double)1.0; -#endif - - if (m_leftSide) - { - dc.SetPen(m_leftSidePen); - dc.DrawLine(WXROUND(x1), WXROUND(y2), WXROUND(x1), WXROUND(y1)); - } - if (m_topSide) - { - dc.SetPen(m_topSidePen); - dc.DrawLine(WXROUND(x1), WXROUND(y1), WXROUND(x2), WXROUND(y1)); - } - - // For testing purposes, draw a rectangle so we know - // how big the division is. -// SetBrush(wxCYAN_BRUSH); -// wxRectangleShape::OnDraw(dc); -} - -void wxDivisionShape::OnDrawContents(wxDC& dc) -{ - wxCompositeShape::OnDrawContents(dc); -} - -bool wxDivisionShape::OnMovePre(wxDC& dc, double x, double y, double oldx, double oldy, bool display) -{ - double diffX = x - oldx; - double diffY = y - oldy; - wxNode *node = m_children.First(); - while (node) - { - wxShape *object = (wxShape *)node->Data(); - object->Erase(dc); - object->Move(dc, object->GetX() + diffX, object->GetY() + diffY, display); - node = node->Next(); - } - return TRUE; -} - -void wxDivisionShape::OnDragLeft(bool draw, double x, double y, int keys, int attachment) -{ - if ((m_sensitivity & OP_DRAG_LEFT) != OP_DRAG_LEFT) - { - attachment = 0; - double dist; - if (m_parent) - { - m_parent->HitTest(x, y, &attachment, &dist); - m_parent->GetEventHandler()->OnDragLeft(draw, x, y, keys, attachment); - } - return; - } - wxShape::OnDragLeft(draw, x, y, keys, attachment); -} - -void wxDivisionShape::OnBeginDragLeft(double x, double y, int keys, int attachment) -{ - if ((m_sensitivity & OP_DRAG_LEFT) != OP_DRAG_LEFT) - { - attachment = 0; - double dist; - if (m_parent) - { - m_parent->HitTest(x, y, &attachment, &dist); - m_parent->GetEventHandler()->OnBeginDragLeft(x, y, keys, attachment); - } - return; - } - - wxShape::OnBeginDragLeft(x, y, keys, attachment); -} - -void wxDivisionShape::OnEndDragLeft(double x, double y, int keys, int attachment) -{ - m_canvas->ReleaseMouse(); - if ((m_sensitivity & OP_DRAG_LEFT) != OP_DRAG_LEFT) - { - attachment = 0; - double dist; - if (m_parent) - { - m_parent->HitTest(x, y, &attachment, &dist); - m_parent->GetEventHandler()->OnEndDragLeft(x, y, keys, attachment); - } - return; - } - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - dc.SetLogicalFunction(wxCOPY); - - m_canvas->Snap(&m_xpos, &m_ypos); - GetEventHandler()->OnMovePre(dc, x, y, m_oldX, m_oldY); - - ResetControlPoints(); - Draw(dc); - MoveLinks(dc); - GetEventHandler()->OnDrawControlPoints(dc); - - if (m_canvas && !m_canvas->GetQuickEditMode()) m_canvas->Redraw(dc); -} - -void wxDivisionShape::SetSize(double w, double h, bool recursive) -{ - m_width = w; - m_height = h; - wxRectangleShape::SetSize(w, h, recursive); -} - -void wxDivisionShape::CalculateSize() -{ -} - -void wxDivisionShape::Copy(wxShape& copy) -{ - wxCompositeShape::Copy(copy); - - wxASSERT( copy.IsKindOf(CLASSINFO(wxDivisionShape)) ) ; - - wxDivisionShape& divisionCopy = (wxDivisionShape&) copy; - - divisionCopy.m_leftSideStyle = m_leftSideStyle; - divisionCopy.m_topSideStyle = m_topSideStyle; - divisionCopy.m_leftSideColour = m_leftSideColour; - divisionCopy.m_topSideColour = m_topSideColour; - - divisionCopy.m_leftSidePen = m_leftSidePen; - divisionCopy.m_topSidePen = m_topSidePen; - divisionCopy.m_handleSide = m_handleSide; - - // Division geometry copying is handled at the wxCompositeShape level. -} - -#ifdef PROLOGIO -void wxDivisionShape::WritePrologAttributes(wxExpr *clause) -{ - wxCompositeShape::WritePrologAttributes(clause); - - if (m_leftSide) - clause->AddAttributeValue("left_side", (long)m_leftSide->GetId()); - if (m_topSide) - clause->AddAttributeValue("top_side", (long)m_topSide->GetId()); - if (m_rightSide) - clause->AddAttributeValue("right_side", (long)m_rightSide->GetId()); - if (m_bottomSide) - clause->AddAttributeValue("bottom_side", (long)m_bottomSide->GetId()); - - clause->AddAttributeValue("handle_side", (long)m_handleSide); - clause->AddAttributeValueString("left_colour", m_leftSideColour); - clause->AddAttributeValueString("top_colour", m_topSideColour); - clause->AddAttributeValueString("left_style", m_leftSideStyle); - clause->AddAttributeValueString("top_style", m_topSideStyle); -} - -void wxDivisionShape::ReadPrologAttributes(wxExpr *clause) -{ - wxCompositeShape::ReadPrologAttributes(clause); - - clause->GetAttributeValue("handle_side", m_handleSide); - clause->GetAttributeValue("left_colour", m_leftSideColour); - clause->GetAttributeValue("top_colour", m_topSideColour); - clause->GetAttributeValue("left_style", m_leftSideStyle); - clause->GetAttributeValue("top_style", m_topSideStyle); -} -#endif - -// Experimental -void wxDivisionShape::OnRightClick(double x, double y, int keys, int attachment) -{ - if (keys & KEY_CTRL) - { - PopupMenu(x, y); - } -/* - else if (keys & KEY_SHIFT) - { - if (m_leftSide || m_topSide || m_rightSide || m_bottomSide) - { - if (Selected()) - { - Select(FALSE); - GetParent()->Draw(dc); - } - else - Select(TRUE); - } - } -*/ - else - { - attachment = 0; - double dist; - if (m_parent) - { - m_parent->HitTest(x, y, &attachment, &dist); - m_parent->GetEventHandler()->OnRightClick(x, y, keys, attachment); - } - return; - } -} - - -// Divide wxHORIZONTALly or wxVERTICALly -bool wxDivisionShape::Divide(int direction) -{ - // Calculate existing top-left, bottom-right - double x1 = (double)(GetX() - (GetWidth()/2.0)); - double y1 = (double)(GetY() - (GetHeight()/2.0)); - wxCompositeShape *compositeParent = (wxCompositeShape *)GetParent(); - double oldWidth = GetWidth(); - double oldHeight = GetHeight(); - if (Selected()) - Select(FALSE); - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - if (direction == wxVERTICAL) - { - // Dividing vertically means notionally putting a horizontal line through it. - // Break existing piece into two. - double newXPos1 = GetX(); - double newYPos1 = (double)(y1 + (GetHeight()/4.0)); - double newXPos2 = GetX(); - double newYPos2 = (double)(y1 + (3.0*GetHeight()/4.0)); - wxDivisionShape *newDivision = compositeParent->OnCreateDivision(); - newDivision->Show(TRUE); - - Erase(dc); - - // Anything adjoining the bottom of this division now adjoins the - // bottom of the new division. - wxNode *node = compositeParent->GetDivisions().First(); - while (node) - { - wxDivisionShape *obj = (wxDivisionShape *)node->Data(); - if (obj->GetTopSide() == this) - obj->SetTopSide(newDivision); - node = node->Next(); - } - newDivision->SetTopSide(this); - newDivision->SetBottomSide(m_bottomSide); - newDivision->SetLeftSide(m_leftSide); - newDivision->SetRightSide(m_rightSide); - m_bottomSide = newDivision; - - compositeParent->GetDivisions().Append(newDivision); - - // CHANGE: Need to insert this division at start of divisions in the object - // list, because e.g.: - // 1) Add division - // 2) Add contained object - // 3) Add division - // Division is now receiving mouse events _before_ the contained object, - // because it was added last (on top of all others) - - // Add after the image that visualizes the container - compositeParent->AddChild(newDivision, compositeParent->FindContainerImage()); - - m_handleSide = DIVISION_SIDE_BOTTOM; - newDivision->SetHandleSide(DIVISION_SIDE_TOP); - - SetSize(oldWidth, (double)(oldHeight/2.0)); - Move(dc, newXPos1, newYPos1); - - newDivision->SetSize(oldWidth, (double)(oldHeight/2.0)); - newDivision->Move(dc, newXPos2, newYPos2); - } - else - { - // Dividing horizontally means notionally putting a vertical line through it. - // Break existing piece into two. - double newXPos1 = (double)(x1 + (GetWidth()/4.0)); - double newYPos1 = GetY(); - double newXPos2 = (double)(x1 + (3.0*GetWidth()/4.0)); - double newYPos2 = GetY(); - wxDivisionShape *newDivision = compositeParent->OnCreateDivision(); - newDivision->Show(TRUE); - - Erase(dc); - - // Anything adjoining the left of this division now adjoins the - // left of the new division. - wxNode *node = compositeParent->GetDivisions().First(); - while (node) - { - wxDivisionShape *obj = (wxDivisionShape *)node->Data(); - if (obj->GetLeftSide() == this) - obj->SetLeftSide(newDivision); - node = node->Next(); - } - newDivision->SetTopSide(m_topSide); - newDivision->SetBottomSide(m_bottomSide); - newDivision->SetLeftSide(this); - newDivision->SetRightSide(m_rightSide); - m_rightSide = newDivision; - - compositeParent->GetDivisions().Append(newDivision); - compositeParent->AddChild(newDivision, compositeParent->FindContainerImage()); - - m_handleSide = DIVISION_SIDE_RIGHT; - newDivision->SetHandleSide(DIVISION_SIDE_LEFT); - - SetSize((double)(oldWidth/2.0), oldHeight); - Move(dc, newXPos1, newYPos1); - - newDivision->SetSize((double)(oldWidth/2.0), oldHeight); - newDivision->Move(dc, newXPos2, newYPos2); - } - if (compositeParent->Selected()) - { - compositeParent->DeleteControlPoints(& dc); - compositeParent->MakeControlPoints(); - compositeParent->MakeMandatoryControlPoints(); - } - compositeParent->Draw(dc); - return TRUE; -} - -// Make one control point for every visible line -void wxDivisionShape::MakeControlPoints() -{ - MakeMandatoryControlPoints(); -} - -void wxDivisionShape::MakeMandatoryControlPoints() -{ - double maxX, maxY; - - GetBoundingBoxMax(&maxX, &maxY); - double x, y; - int direction; -/* - if (m_leftSide) - { - x = (double)(-maxX/2.0); - y = 0.0; - wxDivisionControlPoint *control = new wxDivisionControlPoint(m_canvas, this, CONTROL_POINT_SIZE, x, y, - CONTROL_POINT_HORIZONTAL); - m_canvas->AddShape(control); - m_controlPoints.Append(control); - } - if (m_topSide) - { - x = 0.0; - y = (double)(-maxY/2.0); - wxDivisionControlPoint *control = new wxDivisionControlPoint(m_canvas, this, CONTROL_POINT_SIZE, x, y, - CONTROL_POINT_VERTICAL); - m_canvas->AddShape(control); - m_controlPoints.Append(control); - } -*/ - switch (m_handleSide) - { - case DIVISION_SIDE_LEFT: - { - x = (double)(-maxX/2.0); - y = 0.0; - direction = CONTROL_POINT_HORIZONTAL; - break; - } - case DIVISION_SIDE_TOP: - { - x = 0.0; - y = (double)(-maxY/2.0); - direction = CONTROL_POINT_VERTICAL; - break; - } - case DIVISION_SIDE_RIGHT: - { - x = (double)(maxX/2.0); - y = 0.0; - direction = CONTROL_POINT_HORIZONTAL; - break; - } - case DIVISION_SIDE_BOTTOM: - { - x = 0.0; - y = (double)(maxY/2.0); - direction = CONTROL_POINT_VERTICAL; - break; - } - default: - break; - } - if (m_handleSide != DIVISION_SIDE_NONE) - { - wxDivisionControlPoint *control = new wxDivisionControlPoint(m_canvas, this, CONTROL_POINT_SIZE, x, y, - direction); - m_canvas->AddShape(control); - m_controlPoints.Append(control); - } -} - -void wxDivisionShape::ResetControlPoints() -{ - ResetMandatoryControlPoints(); -} - -void wxDivisionShape::ResetMandatoryControlPoints() -{ - if (m_controlPoints.Number() < 1) - return; - - double maxX, maxY; - - GetBoundingBoxMax(&maxX, &maxY); -/* - wxNode *node = m_controlPoints.First(); - while (node) - { - wxDivisionControlPoint *control = (wxDivisionControlPoint *)node->Data(); - if (control->type == CONTROL_POINT_HORIZONTAL) - { - control->xoffset = (double)(-maxX/2.0); control->m_yoffset = 0.0; - } - else if (control->type == CONTROL_POINT_VERTICAL) - { - control->xoffset = 0.0; control->m_yoffset = (double)(-maxY/2.0); - } - node = node->Next(); - } -*/ - wxNode *node = m_controlPoints.First(); - if ((m_handleSide == DIVISION_SIDE_LEFT) && node) - { - wxDivisionControlPoint *control = (wxDivisionControlPoint *)node->Data(); - control->m_xoffset = (double)(-maxX/2.0); control->m_yoffset = 0.0; - } - - if ((m_handleSide == DIVISION_SIDE_TOP) && node) - { - wxDivisionControlPoint *control = (wxDivisionControlPoint *)node->Data(); - control->m_xoffset = 0.0; control->m_yoffset = (double)(-maxY/2.0); - } - - if ((m_handleSide == DIVISION_SIDE_RIGHT) && node) - { - wxDivisionControlPoint *control = (wxDivisionControlPoint *)node->Data(); - control->m_xoffset = (double)(maxX/2.0); control->m_yoffset = 0.0; - } - - if ((m_handleSide == DIVISION_SIDE_BOTTOM) && node) - { - wxDivisionControlPoint *control = (wxDivisionControlPoint *)node->Data(); - control->m_xoffset = 0.0; control->m_yoffset = (double)(maxY/2.0); - } -} - -// Adjust a side, returning FALSE if it's not physically possible. -bool wxDivisionShape::AdjustLeft(double left, bool test) -{ - double x2 = (double)(GetX() + (GetWidth()/2.0)); - - if (left >= x2) - return FALSE; - if (test) - return TRUE; - - double newW = x2 - left; - double newX = (double)(left + newW/2.0); - SetSize(newW, GetHeight()); - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - Move(dc, newX, GetY()); - - return TRUE; -} - -bool wxDivisionShape::AdjustTop(double top, bool test) -{ - double y2 = (double)(GetY() + (GetHeight()/2.0)); - - if (top >= y2) - return FALSE; - if (test) - return TRUE; - - double newH = y2 - top; - double newY = (double)(top + newH/2.0); - SetSize(GetWidth(), newH); - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - Move(dc, GetX(), newY); - - return TRUE; -} - -bool wxDivisionShape::AdjustRight(double right, bool test) -{ - double x1 = (double)(GetX() - (GetWidth()/2.0)); - - if (right <= x1) - return FALSE; - if (test) - return TRUE; - - double newW = right - x1; - double newX = (double)(x1 + newW/2.0); - SetSize(newW, GetHeight()); - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - Move(dc, newX, GetY()); - - return TRUE; -} - -bool wxDivisionShape::AdjustBottom(double bottom, bool test) -{ - double y1 = (double)(GetY() - (GetHeight()/2.0)); - - if (bottom <= y1) - return FALSE; - if (test) - return TRUE; - - double newH = bottom - y1; - double newY = (double)(y1 + newH/2.0); - SetSize(GetWidth(), newH); - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - Move(dc, GetX(), newY); - - return TRUE; -} - -wxDivisionControlPoint::wxDivisionControlPoint(wxShapeCanvas *the_canvas, wxShape *object, double size, double the_xoffset, double the_yoffset, int the_type): - wxControlPoint(the_canvas, object, size, the_xoffset, the_yoffset, the_type) -{ - SetEraseObject(FALSE); -} - -wxDivisionControlPoint::~wxDivisionControlPoint() -{ -} - -static double originalX = 0.0; -static double originalY = 0.0; -static double originalW = 0.0; -static double originalH = 0.0; - -// Implement resizing of canvas object -void wxDivisionControlPoint::OnDragLeft(bool draw, double x, double y, int keys, int attachment) -{ - wxControlPoint::OnDragLeft(draw, x, y, keys, attachment); -} - -void wxDivisionControlPoint::OnBeginDragLeft(double x, double y, int keys, int attachment) -{ - wxDivisionShape *division = (wxDivisionShape *)m_shape; - originalX = division->GetX(); - originalY = division->GetY(); - originalW = division->GetWidth(); - originalH = division->GetHeight(); - - wxControlPoint::OnBeginDragLeft(x, y, keys, attachment); -} - -void wxDivisionControlPoint::OnEndDragLeft(double x, double y, int keys, int attachment) -{ - wxControlPoint::OnEndDragLeft(x, y, keys, attachment); - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - wxDivisionShape *division = (wxDivisionShape *)m_shape; - wxCompositeShape *divisionParent = (wxCompositeShape *)division->GetParent(); - - // Need to check it's within the bounds of the parent composite. - double x1 = (double)(divisionParent->GetX() - (divisionParent->GetWidth()/2.0)); - double y1 = (double)(divisionParent->GetY() - (divisionParent->GetHeight()/2.0)); - double x2 = (double)(divisionParent->GetX() + (divisionParent->GetWidth()/2.0)); - double y2 = (double)(divisionParent->GetY() + (divisionParent->GetHeight()/2.0)); - - // Need to check it has not made the division zero or negative width/height - double dx1 = (double)(division->GetX() - (division->GetWidth()/2.0)); - double dy1 = (double)(division->GetY() - (division->GetHeight()/2.0)); - double dx2 = (double)(division->GetX() + (division->GetWidth()/2.0)); - double dy2 = (double)(division->GetY() + (division->GetHeight()/2.0)); - - bool success = TRUE; - switch (division->GetHandleSide()) - { - case DIVISION_SIDE_LEFT: - { - if ((x <= x1) || (x >= x2) || (x >= dx2)) - success = FALSE; - // Try it out first... - else if (!division->ResizeAdjoining(DIVISION_SIDE_LEFT, x, TRUE)) - success = FALSE; - else - division->ResizeAdjoining(DIVISION_SIDE_LEFT, x, FALSE); - - break; - } - case DIVISION_SIDE_TOP: - { - if ((y <= y1) || (y >= y2) || (y >= dy2)) - success = FALSE; - else if (!division->ResizeAdjoining(DIVISION_SIDE_TOP, y, TRUE)) - success = FALSE; - else - division->ResizeAdjoining(DIVISION_SIDE_TOP, y, FALSE); - - break; - } - case DIVISION_SIDE_RIGHT: - { - if ((x <= x1) || (x >= x2) || (x <= dx1)) - success = FALSE; - else if (!division->ResizeAdjoining(DIVISION_SIDE_RIGHT, x, TRUE)) - success = FALSE; - else - division->ResizeAdjoining(DIVISION_SIDE_RIGHT, x, FALSE); - - break; - } - case DIVISION_SIDE_BOTTOM: - { - if ((y <= y1) || (y >= y2) || (y <= dy1)) - success = FALSE; - else if (!division->ResizeAdjoining(DIVISION_SIDE_BOTTOM, y, TRUE)) - success = FALSE; - else - division->ResizeAdjoining(DIVISION_SIDE_BOTTOM, y, FALSE); - - break; - } - } - if (!success) - { - division->SetSize(originalW, originalH); - division->Move(dc, originalX, originalY); - } - divisionParent->Draw(dc); - division->GetEventHandler()->OnDrawControlPoints(dc); -} - -/* Resize adjoining divisions. - * - Behaviour should be as follows: - If right edge moves, find all objects whose left edge - adjoins this object, and move left edge accordingly. - If left..., move ... right. - If top..., move ... bottom. - If bottom..., move top. - If size goes to zero or end position is other side of start position, - resize to original size and return. - */ -bool wxDivisionShape::ResizeAdjoining(int side, double newPos, bool test) -{ - wxCompositeShape *divisionParent = (wxCompositeShape *)GetParent(); - wxNode *node = divisionParent->GetDivisions().First(); - while (node) - { - wxDivisionShape *division = (wxDivisionShape *)node->Data(); - switch (side) - { - case DIVISION_SIDE_LEFT: - { - if (division->m_rightSide == this) - { - bool success = division->AdjustRight(newPos, test); - if (!success && test) - return FALSE; - } - break; - } - case DIVISION_SIDE_TOP: - { - if (division->m_bottomSide == this) - { - bool success = division->AdjustBottom(newPos, test); - if (!success && test) - return FALSE; - } - break; - } - case DIVISION_SIDE_RIGHT: - { - if (division->m_leftSide == this) - { - bool success = division->AdjustLeft(newPos, test); - if (!success && test) - return FALSE; - } - break; - } - case DIVISION_SIDE_BOTTOM: - { - if (division->m_topSide == this) - { - bool success = division->AdjustTop(newPos, test); - if (!success && test) - return FALSE; - } - break; - } - default: - break; - } - node = node->Next(); - } - - return TRUE; -} - -/* - * Popup menu for editing divisions - * - */ - -void oglGraphicsDivisionMenuProc(wxMenu& menu, wxCommandEvent& event) -{ - wxDivisionShape *division = (wxDivisionShape *)menu.GetClientData(); - switch (event.GetInt()) - { - case DIVISION_MENU_SPLIT_HORIZONTALLY: - { - division->Divide(wxHORIZONTAL); - break; - } - case DIVISION_MENU_SPLIT_VERTICALLY: - { - division->Divide(wxVERTICAL); - break; - } - case DIVISION_MENU_EDIT_LEFT_EDGE: - { - division->EditEdge(DIVISION_SIDE_LEFT); - break; - } - case DIVISION_MENU_EDIT_TOP_EDGE: - { - division->EditEdge(DIVISION_SIDE_TOP); - break; - } - default: - break; - } -} - -void wxDivisionShape::EditEdge(int side) -{ - wxMessageBox("EditEdge() not implemented", "OGL", wxOK); - -#if 0 - wxBeginBusyCursor(); - - wxPen *currentPen = NULL; - char **pColour = NULL; - char **pStyle = NULL; - if (side == DIVISION_SIDE_LEFT) - { - currentPen = m_leftSidePen; - pColour = &m_leftSideColour; - pStyle = &m_leftSideStyle; - } - else - { - currentPen = m_topSidePen; - pColour = &m_topSideColour; - pStyle = &m_topSideStyle; - } - - GraphicsForm *form = new GraphicsForm("Containers"); - int lineWidth = currentPen->GetWidth(); - - form->Add(wxMakeFormShort("Width", &lineWidth, wxFORM_DEFAULT, NULL, NULL, wxVERTICAL, - 150)); - form->Add(wxMakeFormString("Colour", pColour, wxFORM_CHOICE, - new wxList(wxMakeConstraintStrings( - "BLACK" , - "BLUE" , - "BROWN" , - "CORAL" , - "CYAN" , - "DARK GREY" , - "DARK GREEN" , - "DIM GREY" , - "GREY" , - "GREEN" , - "LIGHT BLUE" , - "LIGHT GREY" , - "MAGENTA" , - "MAROON" , - "NAVY" , - "ORANGE" , - "PURPLE" , - "RED" , - "TURQUOISE" , - "VIOLET" , - "WHITE" , - "YELLOW" , - NULL), - NULL), NULL, wxVERTICAL, 150)); - form->Add(wxMakeFormString("Style", pStyle, wxFORM_CHOICE, - new wxList(wxMakeConstraintStrings( - "Solid" , - "Short Dash" , - "Long Dash" , - "Dot" , - "Dot Dash" , - NULL), - NULL), NULL, wxVERTICAL, 100)); - - wxDialogBox *dialog = new wxDialogBox(m_canvas->GetParent(), "Division properties", 10, 10, 500, 500); - if (GraphicsLabelFont) - dialog->SetLabelFont(GraphicsLabelFont); - if (GraphicsButtonFont) - dialog->SetButtonFont(GraphicsButtonFont); - - form->AssociatePanel(dialog); - form->dialog = dialog; - - dialog->Fit(); - dialog->Centre(wxBOTH); - - wxEndBusyCursor(); - dialog->Show(TRUE); - - int lineStyle = wxSOLID; - if (*pStyle) - { - if (strcmp(*pStyle, "Solid") == 0) - lineStyle = wxSOLID; - else if (strcmp(*pStyle, "Dot") == 0) - lineStyle = wxDOT; - else if (strcmp(*pStyle, "Short Dash") == 0) - lineStyle = wxSHORT_DASH; - else if (strcmp(*pStyle, "Long Dash") == 0) - lineStyle = wxLONG_DASH; - else if (strcmp(*pStyle, "Dot Dash") == 0) - lineStyle = wxDOT_DASH; - } - - wxPen *newPen = wxThePenList->FindOrCreatePen(*pColour, lineWidth, lineStyle); - if (!pen) - pen = wxBLACK_PEN; - if (side == DIVISION_SIDE_LEFT) - m_leftSidePen = newPen; - else - m_topSidePen = newPen; - - // Need to draw whole image again - wxCompositeShape *compositeParent = (wxCompositeShape *)GetParent(); - compositeParent->Draw(dc); -#endif -} - -// Popup menu -void wxDivisionShape::PopupMenu(double x, double y) -{ - oglPopupDivisionMenu->SetClientData((char *)this); - if (m_leftSide) - oglPopupDivisionMenu->Enable(DIVISION_MENU_EDIT_LEFT_EDGE, TRUE); - else - oglPopupDivisionMenu->Enable(DIVISION_MENU_EDIT_LEFT_EDGE, FALSE); - if (m_topSide) - oglPopupDivisionMenu->Enable(DIVISION_MENU_EDIT_TOP_EDGE, TRUE); - else - oglPopupDivisionMenu->Enable(DIVISION_MENU_EDIT_TOP_EDGE, FALSE); - - int x1, y1; - m_canvas->ViewStart(&x1, &y1); - - int unit_x, unit_y; - m_canvas->GetScrollPixelsPerUnit(&unit_x, &unit_y); - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - int mouse_x = (int)(dc.LogicalToDeviceX(x - x1*unit_x)); - int mouse_y = (int)(dc.LogicalToDeviceY(y - y1*unit_y)); - - m_canvas->PopupMenu(oglPopupDivisionMenu, mouse_x, mouse_y); -} - -void wxDivisionShape::SetLeftSideColour(const wxString& colour) -{ - m_leftSideColour = colour; -} - -void wxDivisionShape::SetTopSideColour(const wxString& colour) -{ - m_topSideColour = colour; -} - -void wxDivisionShape::SetLeftSideStyle(const wxString& style) -{ - m_leftSideStyle = style; -} - -void wxDivisionShape::SetTopSideStyle(const wxString& style) -{ - m_topSideStyle = style; -} - diff --git a/utils/ogl/src/composit.h b/utils/ogl/src/composit.h deleted file mode 100644 index 85dc9c1292..0000000000 --- a/utils/ogl/src/composit.h +++ /dev/null @@ -1,242 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: composit.h -// Purpose: wxCompositeShape -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _OGL_COMPOSIT_H_ -#define _OGL_COMPOSIT_H_ - -#ifdef __GNUG__ -#pragma interface "composit.h" -#endif - -class wxDivisionShape; -class OGLConstraint; - -/* - * A composite object is an invisible rectangle surrounding all children - * - */ - -class wxCompositeShape: public wxRectangleShape -{ - DECLARE_DYNAMIC_CLASS(wxCompositeShape) -public: - - wxCompositeShape(); - ~wxCompositeShape(); - - void OnDraw(wxDC& dc); - void OnDrawContents(wxDC& dc); - void OnErase(wxDC& dc); - bool OnMovePre(wxDC& dc, double x, double y, double oldX, double oldY, bool display = TRUE); - void OnDragLeft(bool draw, double x, double y, int keys, int attachment = 0); - void OnBeginDragLeft(double x, double y, int keys, int attachment = 0); - void OnEndDragLeft(double x, double y, int keys, int attachment = 0); - - void OnRightClick(double x, double y, int keys, int attachment = 0); - - void SetSize(double w, double h, bool recursive = TRUE); - - // Returns TRUE if it settled down - bool Recompute(); - - // New members - void AddChild(wxShape *child, wxShape *addAfter = NULL); - void RemoveChild(wxShape *child); - - OGLConstraint *AddConstraint(OGLConstraint *constraint); - OGLConstraint *AddConstraint(int type, wxShape *constraining, wxList& constrained); - OGLConstraint *AddConstraint(int type, wxShape *constraining, wxShape *constrained); - - void DeleteConstraint(OGLConstraint *constraint); - - // Delete constraints that involve this child. - void DeleteConstraintsInvolvingChild(wxShape *child); - - // Remove the image from any constraints involving it, but DON'T - // remove any constraints. - void RemoveChildFromConstraints(wxShape *child); - - // Find constraint, also returning actual composite the constraint was in, - // in case it had to find it recursively. - OGLConstraint *FindConstraint(long id, wxCompositeShape **actualComposite = NULL); - - // Returns TRUE if something changed - bool Constrain(); - - // Make this composite into a container by creating one wxDivisionShape - void MakeContainer(); - - // Calculates size and position of composite object based on children - void CalculateSize(); - -#ifdef PROLOGIO - // Prolog database stuff - void WritePrologAttributes(wxExpr *clause); - void ReadPrologAttributes(wxExpr *clause); - // In case the object has constraints it needs to read in in a different pass - void ReadConstraints(wxExpr *clause, wxExprDatabase *database); -#endif - // Does the copying for this object - void Copy(wxShape& copy); - - virtual wxDivisionShape *OnCreateDivision(); - - // Finds the image used to visualize a container. This is any child - // of the composite that is not in the divisions list. - wxShape *FindContainerImage(); - - // Returns TRUE if division is a descendant of this container - bool ContainsDivision(wxDivisionShape *division); - - inline wxList& GetDivisions() const { return (wxList&) m_divisions; } - inline wxList& GetConstraints() const { return (wxList&) m_constraints; } - -protected: - double m_oldX; - double m_oldY; - wxList m_constraints; - wxList m_divisions; // In case it's a container -}; - -/* - * A division object is a composite with special properties, - * to be used for containment. It's a subdivision of a container. - * A containing node image consists of a composite with a main child shape - * such as rounded rectangle, plus a list of division objects. - * It needs to be a composite because a division contains pieces - * of diagram. - * NOTE a container has at least one wxDivisionShape for consistency. - * This can be subdivided, so it turns into two objects, then each of - * these can be subdivided, etc. - */ -#define DIVISION_SIDE_NONE 0 -#define DIVISION_SIDE_LEFT 1 -#define DIVISION_SIDE_TOP 2 -#define DIVISION_SIDE_RIGHT 3 -#define DIVISION_SIDE_BOTTOM 4 - -class wxDivisionShape: public wxCompositeShape -{ - DECLARE_DYNAMIC_CLASS(wxDivisionShape) - public: - - wxDivisionShape(); - ~wxDivisionShape(); - - void OnDraw(wxDC& dc); - void OnDrawContents(wxDC& dc); - bool OnMovePre(wxDC& dc, double x, double y, double oldX, double oldY, bool display = TRUE); - void OnDragLeft(bool draw, double x, double y, int keys, int attachment = 0); - void OnBeginDragLeft(double x, double y, int keys, int attachment = 0); - void OnEndDragLeft(double x, double y, int keys, int attachment = 0); - - void OnRightClick(double x, double y, int keys = 0, int attachment = 0); - - // Don't want this kind of composite to resize its subdiagrams, so - // override composite's SetSize. - void SetSize(double w, double h, bool recursive = TRUE); - - // Similarly for calculating size: it's fixed at whatever SetSize - // set it to, not in terms of children. - void CalculateSize(); - - void MakeControlPoints(); - void ResetControlPoints(); - void MakeMandatoryControlPoints(); - void ResetMandatoryControlPoints(); - -#ifdef PROLOGIO - // Prolog database stuff - void WritePrologAttributes(wxExpr *clause); - void ReadPrologAttributes(wxExpr *clause); -#endif - // Does the copying for this object - void Copy(wxShape& copy); - - // Divide horizontally (wxHORIZONTAL) or vertically (wxVERTICAL) - bool Divide(int direction); - - // Resize adjoining divisions at the given side. If test is TRUE, - // just see whether it's possible for each adjoining region, - // returning FALSE if it's not. - bool ResizeAdjoining(int side, double newPos, bool test); - - // Adjust a side, returning FALSE if it's not physically possible. - bool AdjustLeft(double left, bool test); - bool AdjustTop(double top, bool test); - bool AdjustRight(double right, bool test); - bool AdjustBottom(double bottom, bool test); - - // Edit style of left or top side - void EditEdge(int side); - - // Popup menu - void PopupMenu(double x, double y); - - inline void SetLeftSide(wxDivisionShape *shape) { m_leftSide = shape; } - inline void SetTopSide(wxDivisionShape *shape) { m_topSide = shape; } - inline void SetRightSide(wxDivisionShape *shape) { m_rightSide = shape; } - inline void SetBottomSide(wxDivisionShape *shape) { m_bottomSide = shape; } - inline wxDivisionShape *GetLeftSide() const { return m_leftSide; } - inline wxDivisionShape *GetTopSide() const { return m_topSide; } - inline wxDivisionShape *GetRightSide() const { return m_rightSide; } - inline wxDivisionShape *GetBottomSide() const { return m_bottomSide; } - - inline void SetHandleSide(int side) { m_handleSide = side; } - inline int GetHandleSide() const { return m_handleSide; } - - inline void SetLeftSidePen(wxPen *pen) { m_leftSidePen = pen; } - inline wxPen *GetLeftSidePen() const { return m_leftSidePen; } - inline void SetTopSidePen(wxPen *pen) { m_topSidePen = pen; } - inline wxPen *GetTopSidePen() const { return m_topSidePen; } - - void SetLeftSideColour(const wxString& colour); - void SetTopSideColour(const wxString& colour); - void SetLeftSideStyle(const wxString& style); - void SetTopSideStyle(const wxString& style); - - inline wxString GetLeftSideColour() const { return m_leftSideColour; } - inline wxString GetTopSideColour() const { return m_topSideColour; } - inline wxString GetLeftSideStyle() const { return m_leftSideStyle; } - inline wxString GetTopSideStyle() const { return m_topSideStyle; } - - protected: - // Adjoining divisions. NULL indicates edge - // of container, and that side shouldn't be - // drawn. - wxDivisionShape* m_leftSide; - wxDivisionShape* m_rightSide; - wxDivisionShape* m_topSide; - wxDivisionShape* m_bottomSide; - - int m_handleSide; // Side at which handle is legal - - wxPen* m_leftSidePen; - wxPen* m_topSidePen; - wxString m_leftSideColour; - wxString m_topSideColour; - wxString m_leftSideStyle; - wxString m_topSideStyle; -}; - -extern wxMenu *oglPopupDivisionMenu; -extern void oglGraphicsDivisionMenuProc(wxMenu& menu, wxCommandEvent& event); - -#define DIVISION_MENU_SPLIT_HORIZONTALLY 1 -#define DIVISION_MENU_SPLIT_VERTICALLY 2 -#define DIVISION_MENU_EDIT_LEFT_EDGE 3 -#define DIVISION_MENU_EDIT_TOP_EDGE 4 -#define DIVISION_MENU_EDIT_RIGHT_EDGE 5 -#define DIVISION_MENU_EDIT_BOTTOM_EDGE 6 -#define DIVISION_MENU_DELETE_ALL 7 - -#endif - // _OGL_COMPOSIT_H_ diff --git a/utils/ogl/src/constrnt.cpp b/utils/ogl/src/constrnt.cpp deleted file mode 100644 index 424939420a..0000000000 --- a/utils/ogl/src/constrnt.cpp +++ /dev/null @@ -1,621 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: constrnt.cpp -// Purpose: OGL Constraint classes -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "constrnt.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#ifdef PROLOGIO -#include -#endif - -#include "basic.h" -#include "constrnt.h" -#include "canvas.h" - -wxList *OGLConstraintTypes = NULL; - -/* - * Constraint type - * - */ - -IMPLEMENT_DYNAMIC_CLASS(OGLConstraintType, wxObject) - -OGLConstraintType::OGLConstraintType(int theType, const wxString& theName, const wxString& thePhrase) -{ - m_type = theType; - m_name = theName; - m_phrase = thePhrase; -} - -OGLConstraintType::~OGLConstraintType() -{ -} - -void OGLInitializeConstraintTypes() -{ - if (!OGLConstraintTypes) - return; - - OGLConstraintTypes = new wxList(wxKEY_INTEGER); - - OGLConstraintTypes->Append(gyCONSTRAINT_CENTRED_VERTICALLY, - new OGLConstraintType(gyCONSTRAINT_CENTRED_VERTICALLY, "Centre vertically", "centred vertically w.r.t.")); - - OGLConstraintTypes->Append(gyCONSTRAINT_CENTRED_HORIZONTALLY, - new OGLConstraintType(gyCONSTRAINT_CENTRED_HORIZONTALLY, "Centre horizontally", "centred horizontally w.r.t.")); - - OGLConstraintTypes->Append(gyCONSTRAINT_CENTRED_BOTH, - new OGLConstraintType(gyCONSTRAINT_CENTRED_BOTH, "Centre", "centred w.r.t.")); - - OGLConstraintTypes->Append(gyCONSTRAINT_LEFT_OF, - new OGLConstraintType(gyCONSTRAINT_LEFT_OF, "Left of", "left of")); - - OGLConstraintTypes->Append(gyCONSTRAINT_RIGHT_OF, - new OGLConstraintType(gyCONSTRAINT_RIGHT_OF, "Right of", "right of")); - - OGLConstraintTypes->Append(gyCONSTRAINT_ABOVE, - new OGLConstraintType(gyCONSTRAINT_ABOVE, "Above", "above")); - - OGLConstraintTypes->Append(gyCONSTRAINT_BELOW, - new OGLConstraintType(gyCONSTRAINT_BELOW, "Below", "below")); - - // Alignment - OGLConstraintTypes->Append(gyCONSTRAINT_ALIGNED_TOP, - new OGLConstraintType(gyCONSTRAINT_ALIGNED_TOP, "Top-aligned", "aligned to the top of")); - - OGLConstraintTypes->Append(gyCONSTRAINT_ALIGNED_BOTTOM, - new OGLConstraintType(gyCONSTRAINT_ALIGNED_BOTTOM, "Bottom-aligned", "aligned to the bottom of")); - - OGLConstraintTypes->Append(gyCONSTRAINT_ALIGNED_LEFT, - new OGLConstraintType(gyCONSTRAINT_ALIGNED_LEFT, "Left-aligned", "aligned to the left of")); - - OGLConstraintTypes->Append(gyCONSTRAINT_ALIGNED_RIGHT, - new OGLConstraintType(gyCONSTRAINT_ALIGNED_RIGHT, "Right-aligned", "aligned to the right of")); - - // Mid-alignment - OGLConstraintTypes->Append(gyCONSTRAINT_MIDALIGNED_TOP, - new OGLConstraintType(gyCONSTRAINT_MIDALIGNED_TOP, "Top-midaligned", "centred on the top of")); - - OGLConstraintTypes->Append(gyCONSTRAINT_MIDALIGNED_BOTTOM, - new OGLConstraintType(gyCONSTRAINT_MIDALIGNED_BOTTOM, "Bottom-midaligned", "centred on the bottom of")); - - OGLConstraintTypes->Append(gyCONSTRAINT_MIDALIGNED_LEFT, - new OGLConstraintType(gyCONSTRAINT_MIDALIGNED_LEFT, "Left-midaligned", "centred on the left of")); - - OGLConstraintTypes->Append(gyCONSTRAINT_MIDALIGNED_RIGHT, - new OGLConstraintType(gyCONSTRAINT_MIDALIGNED_RIGHT, "Right-midaligned", "centred on the right of")); -} - -void OGLCleanUpConstraintTypes() -{ - if (!OGLConstraintTypes) - return; - - wxNode* node = OGLConstraintTypes->First(); - while (node) - { - OGLConstraintType* ct = (OGLConstraintType*) node->Data(); - delete ct; - node = node->Next(); - } - delete OGLConstraintTypes; - OGLConstraintTypes = NULL; -} - -/* - * Constraint Stuff - * - */ - -IMPLEMENT_DYNAMIC_CLASS(OGLConstraint, wxObject) - -OGLConstraint::OGLConstraint(int type, wxShape *constraining, wxList& constrained) -{ - m_xSpacing = 0.0; - m_ySpacing = 0.0; - - m_constraintType = type; - m_constrainingObject = constraining; - - m_constraintId = 0; - m_constraintName = "noname"; - - wxNode *node = constrained.First(); - while (node) - { - m_constrainedObjects.Append(node->Data()); - node = node->Next(); - } -} - -OGLConstraint::~OGLConstraint() -{ -} - -bool OGLConstraint::Equals(double a, double b) -{ - double marg = 0.5; - - bool eq = ((b <= a + marg) && (b >= a - marg)); - return eq; -} - -// Return TRUE if anything changed -bool OGLConstraint::Evaluate() -{ - double maxWidth, maxHeight, minWidth, minHeight, x, y; - m_constrainingObject->GetBoundingBoxMax(&maxWidth, &maxHeight); - m_constrainingObject->GetBoundingBoxMin(&minWidth, &minHeight); - x = m_constrainingObject->GetX(); - y = m_constrainingObject->GetY(); - - wxClientDC dc(m_constrainingObject->GetCanvas()); - m_constrainingObject->GetCanvas()->PrepareDC(dc); - - switch (m_constraintType) - { - case gyCONSTRAINT_CENTRED_VERTICALLY: - { - int n = m_constrainedObjects.Number(); - double totalObjectHeight = 0.0; - wxNode *node = m_constrainedObjects.First(); - while (node) - { - wxShape *constrainedObject = (wxShape *)node->Data(); - - double width2, height2; - constrainedObject->GetBoundingBoxMax(&width2, &height2); - totalObjectHeight += height2; - node = node->Next(); - } - double startY; - double spacingY; - // Check if within the constraining object... - if ((totalObjectHeight + (n + 1)*m_ySpacing) <= minHeight) - { - spacingY = (double)((minHeight - totalObjectHeight)/(n + 1)); - startY = (double)(y - (minHeight/2.0)); - } - // Otherwise, use default spacing - else - { - spacingY = m_ySpacing; - startY = (double)(y - ((totalObjectHeight + (n+1)*spacingY)/2.0)); - } - - // Now position the objects - bool changed = FALSE; - node = m_constrainedObjects.First(); - while (node) - { - wxShape *constrainedObject = (wxShape *)node->Data(); - double width2, height2; - constrainedObject->GetBoundingBoxMax(&width2, &height2); - startY += (double)(spacingY + (height2/2.0)); - if (!Equals(startY, constrainedObject->GetY())) - { - constrainedObject->Move(dc, constrainedObject->GetX(), startY, FALSE); - changed = TRUE; - } - startY += (double)(height2/2.0); - node = node->Next(); - } - return changed; - } - case gyCONSTRAINT_CENTRED_HORIZONTALLY: - { - int n = m_constrainedObjects.Number(); - double totalObjectWidth = 0.0; - wxNode *node = m_constrainedObjects.First(); - while (node) - { - wxShape *constrainedObject = (wxShape *)node->Data(); - - double width2, height2; - constrainedObject->GetBoundingBoxMax(&width2, &height2); - totalObjectWidth += width2; - node = node->Next(); - } - double startX; - double spacingX; - // Check if within the constraining object... - if ((totalObjectWidth + (n + 1)*m_xSpacing) <= minWidth) - { - spacingX = (double)((minWidth - totalObjectWidth)/(n + 1)); - startX = (double)(x - (minWidth/2.0)); - } - // Otherwise, use default spacing - else - { - spacingX = m_xSpacing; - startX = (double)(x - ((totalObjectWidth + (n+1)*spacingX)/2.0)); - } - - // Now position the objects - bool changed = FALSE; - node = m_constrainedObjects.First(); - while (node) - { - wxShape *constrainedObject = (wxShape *)node->Data(); - double width2, height2; - constrainedObject->GetBoundingBoxMax(&width2, &height2); - startX += (double)(spacingX + (width2/2.0)); - if (!Equals(startX, constrainedObject->GetX())) - { - constrainedObject->Move(dc, startX, constrainedObject->GetY(), FALSE); - changed = TRUE; - } - startX += (double)(width2/2.0); - node = node->Next(); - } - return changed; - } - case gyCONSTRAINT_CENTRED_BOTH: - { - int n = m_constrainedObjects.Number(); - double totalObjectWidth = 0.0; - double totalObjectHeight = 0.0; - wxNode *node = m_constrainedObjects.First(); - while (node) - { - wxShape *constrainedObject = (wxShape *)node->Data(); - - double width2, height2; - constrainedObject->GetBoundingBoxMax(&width2, &height2); - totalObjectWidth += width2; - totalObjectHeight += height2; - node = node->Next(); - } - double startX; - double spacingX; - double startY; - double spacingY; - - // Check if within the constraining object... - if ((totalObjectWidth + (n + 1)*m_xSpacing) <= minWidth) - { - spacingX = (double)((minWidth - totalObjectWidth)/(n + 1)); - startX = (double)(x - (minWidth/2.0)); - } - // Otherwise, use default spacing - else - { - spacingX = m_xSpacing; - startX = (double)(x - ((totalObjectWidth + (n+1)*spacingX)/2.0)); - } - - // Check if within the constraining object... - if ((totalObjectHeight + (n + 1)*m_ySpacing) <= minHeight) - { - spacingY = (double)((minHeight - totalObjectHeight)/(n + 1)); - startY = (double)(y - (minHeight/2.0)); - } - // Otherwise, use default spacing - else - { - spacingY = m_ySpacing; - startY = (double)(y - ((totalObjectHeight + (n+1)*spacingY)/2.0)); - } - - // Now position the objects - bool changed = FALSE; - node = m_constrainedObjects.First(); - while (node) - { - wxShape *constrainedObject = (wxShape *)node->Data(); - double width2, height2; - constrainedObject->GetBoundingBoxMax(&width2, &height2); - startX += (double)(spacingX + (width2/2.0)); - startY += (double)(spacingY + (height2/2.0)); - - if ((!Equals(startX, constrainedObject->GetX())) || (!Equals(startY, constrainedObject->GetY()))) - { - constrainedObject->Move(dc, startX, startY, FALSE); - changed = TRUE; - } - - startX += (double)(width2/2.0); - startY += (double)(height2/2.0); - - node = node->Next(); - } - return changed; - } - case gyCONSTRAINT_LEFT_OF: - { - bool changed = FALSE; - - wxNode *node = m_constrainedObjects.First(); - while (node) - { - wxShape *constrainedObject = (wxShape *)node->Data(); - - double width2, height2; - constrainedObject->GetBoundingBoxMax(&width2, &height2); - - double x3 = (double)(x - (minWidth/2.0) - (width2/2.0) - m_xSpacing); - if (!Equals(x3, constrainedObject->GetX())) - { - changed = TRUE; - constrainedObject->Move(dc, x3, constrainedObject->GetY(), FALSE); - } - - node = node->Next(); - } - return changed; - } - case gyCONSTRAINT_RIGHT_OF: - { - bool changed = FALSE; - - wxNode *node = m_constrainedObjects.First(); - while (node) - { - wxShape *constrainedObject = (wxShape *)node->Data(); - - double width2, height2; - constrainedObject->GetBoundingBoxMax(&width2, &height2); - - double x3 = (double)(x + (minWidth/2.0) + (width2/2.0) + m_xSpacing); - if (!Equals(x3, constrainedObject->GetX())) - { - changed = TRUE; - constrainedObject->Move(dc, x3, constrainedObject->GetY(), FALSE); - } - - node = node->Next(); - } - return changed; - - return FALSE; - } - case gyCONSTRAINT_ABOVE: - { - bool changed = FALSE; - - wxNode *node = m_constrainedObjects.First(); - while (node) - { - wxShape *constrainedObject = (wxShape *)node->Data(); - - double width2, height2; - constrainedObject->GetBoundingBoxMax(&width2, &height2); - - double y3 = (double)(y - (minHeight/2.0) - (height2/2.0) - m_ySpacing); - if (!Equals(y3, constrainedObject->GetY())) - { - changed = TRUE; - constrainedObject->Move(dc, constrainedObject->GetX(), y3, FALSE); - } - - node = node->Next(); - } - return changed; - } - case gyCONSTRAINT_BELOW: - { - bool changed = FALSE; - - wxNode *node = m_constrainedObjects.First(); - while (node) - { - wxShape *constrainedObject = (wxShape *)node->Data(); - - double width2, height2; - constrainedObject->GetBoundingBoxMax(&width2, &height2); - - double y3 = (double)(y + (minHeight/2.0) + (height2/2.0) + m_ySpacing); - if (!Equals(y3, constrainedObject->GetY())) - { - changed = TRUE; - constrainedObject->Move(dc, constrainedObject->GetX(), y3, FALSE); - } - - node = node->Next(); - } - return changed; - } - case gyCONSTRAINT_ALIGNED_LEFT: - { - bool changed = FALSE; - - wxNode *node = m_constrainedObjects.First(); - while (node) - { - wxShape *constrainedObject = (wxShape *)node->Data(); - - double width2, height2; - constrainedObject->GetBoundingBoxMax(&width2, &height2); - - double x3 = (double)(x - (minWidth/2.0) + (width2/2.0) + m_xSpacing); - if (!Equals(x3, constrainedObject->GetX())) - { - changed = TRUE; - constrainedObject->Move(dc, x3, constrainedObject->GetY(), FALSE); - } - - node = node->Next(); - } - return changed; - } - case gyCONSTRAINT_ALIGNED_RIGHT: - { - bool changed = FALSE; - - wxNode *node = m_constrainedObjects.First(); - while (node) - { - wxShape *constrainedObject = (wxShape *)node->Data(); - - double width2, height2; - constrainedObject->GetBoundingBoxMax(&width2, &height2); - - double x3 = (double)(x + (minWidth/2.0) - (width2/2.0) - m_xSpacing); - if (!Equals(x3, constrainedObject->GetX())) - { - changed = TRUE; - constrainedObject->Move(dc, x3, constrainedObject->GetY(), FALSE); - } - - node = node->Next(); - } - return changed; - - return FALSE; - } - case gyCONSTRAINT_ALIGNED_TOP: - { - bool changed = FALSE; - - wxNode *node = m_constrainedObjects.First(); - while (node) - { - wxShape *constrainedObject = (wxShape *)node->Data(); - - double width2, height2; - constrainedObject->GetBoundingBoxMax(&width2, &height2); - - double y3 = (double)(y - (minHeight/2.0) + (height2/2.0) + m_ySpacing); - if (!Equals(y3, constrainedObject->GetY())) - { - changed = TRUE; - constrainedObject->Move(dc, constrainedObject->GetX(), y3, FALSE); - } - - node = node->Next(); - } - return changed; - } - case gyCONSTRAINT_ALIGNED_BOTTOM: - { - bool changed = FALSE; - - wxNode *node = m_constrainedObjects.First(); - while (node) - { - wxShape *constrainedObject = (wxShape *)node->Data(); - - double width2, height2; - constrainedObject->GetBoundingBoxMax(&width2, &height2); - - double y3 = (double)(y + (minHeight/2.0) - (height2/2.0) - m_ySpacing); - if (!Equals(y3, constrainedObject->GetY())) - { - changed = TRUE; - constrainedObject->Move(dc, constrainedObject->GetX(), y3, FALSE); - } - - node = node->Next(); - } - return changed; - } - case gyCONSTRAINT_MIDALIGNED_LEFT: - { - bool changed = FALSE; - - wxNode *node = m_constrainedObjects.First(); - while (node) - { - wxShape *constrainedObject = (wxShape *)node->Data(); - - double x3 = (double)(x - (minWidth/2.0)); - if (!Equals(x3, constrainedObject->GetX())) - { - changed = TRUE; - constrainedObject->Move(dc, x3, constrainedObject->GetY(), FALSE); - } - - node = node->Next(); - } - return changed; - } - case gyCONSTRAINT_MIDALIGNED_RIGHT: - { - bool changed = FALSE; - - wxNode *node = m_constrainedObjects.First(); - while (node) - { - wxShape *constrainedObject = (wxShape *)node->Data(); - - double x3 = (double)(x + (minWidth/2.0)); - if (!Equals(x3, constrainedObject->GetX())) - { - changed = TRUE; - constrainedObject->Move(dc, x3, constrainedObject->GetY(), FALSE); - } - - node = node->Next(); - } - return changed; - - return FALSE; - } - case gyCONSTRAINT_MIDALIGNED_TOP: - { - bool changed = FALSE; - - wxNode *node = m_constrainedObjects.First(); - while (node) - { - wxShape *constrainedObject = (wxShape *)node->Data(); - - double y3 = (double)(y - (minHeight/2.0)); - if (!Equals(y3, constrainedObject->GetY())) - { - changed = TRUE; - constrainedObject->Move(dc, constrainedObject->GetX(), y3, FALSE); - } - - node = node->Next(); - } - return changed; - } - case gyCONSTRAINT_MIDALIGNED_BOTTOM: - { - bool changed = FALSE; - - wxNode *node = m_constrainedObjects.First(); - while (node) - { - wxShape *constrainedObject = (wxShape *)node->Data(); - - double y3 = (double)(y + (minHeight/2.0)); - if (!Equals(y3, constrainedObject->GetY())) - { - changed = TRUE; - constrainedObject->Move(dc, constrainedObject->GetX(), y3, FALSE); - } - - node = node->Next(); - } - return changed; - } - - default: - return FALSE; - } - return FALSE; -} - diff --git a/utils/ogl/src/constrnt.h b/utils/ogl/src/constrnt.h deleted file mode 100644 index ef35bd03c3..0000000000 --- a/utils/ogl/src/constrnt.h +++ /dev/null @@ -1,87 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: constrnt.h -// Purpose: OGL constraint definitions -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _OGL_CONSTRNT_H_ -#define _OGL_CONSTRNT_H_ - -#ifdef __GNUG__ -#pragma interface "constrnt.h" -#endif - -/* - * OGL Constraints - * - */ - -class OGLConstraintType: public wxObject -{ - DECLARE_DYNAMIC_CLASS(OGLConstraintType) -public: - OGLConstraintType(int type = 0, const wxString& name = "", const wxString& phrase = ""); - ~OGLConstraintType(); - -public: - int m_type; // E.g. gyCONSTRAINT_CENTRED_VERTICALLY - wxString m_name; // E.g. "Centre vertically" - wxString m_phrase; // E.g. "centred vertically with respect to", "left of" - -}; - -extern wxList* OGLConstraintTypes; - -#define gyCONSTRAINT_CENTRED_VERTICALLY 1 -#define gyCONSTRAINT_CENTRED_HORIZONTALLY 2 -#define gyCONSTRAINT_CENTRED_BOTH 3 -#define gyCONSTRAINT_LEFT_OF 4 -#define gyCONSTRAINT_RIGHT_OF 5 -#define gyCONSTRAINT_ABOVE 6 -#define gyCONSTRAINT_BELOW 7 -#define gyCONSTRAINT_ALIGNED_TOP 8 -#define gyCONSTRAINT_ALIGNED_BOTTOM 9 -#define gyCONSTRAINT_ALIGNED_LEFT 10 -#define gyCONSTRAINT_ALIGNED_RIGHT 11 - -// Like aligned, but with the objects centred on the respective edge -// of the reference object. -#define gyCONSTRAINT_MIDALIGNED_TOP 12 -#define gyCONSTRAINT_MIDALIGNED_BOTTOM 13 -#define gyCONSTRAINT_MIDALIGNED_LEFT 14 -#define gyCONSTRAINT_MIDALIGNED_RIGHT 15 - -class OGLConstraint: public wxObject -{ - DECLARE_DYNAMIC_CLASS(OGLConstraint) - public: - OGLConstraint() { m_xSpacing = 0.0; m_ySpacing = 0.0; m_constraintType = 0; m_constraintName = ""; m_constraintId = 0; - m_constrainingObject = NULL; } - OGLConstraint(int type, wxShape *constraining, wxList& constrained); - ~OGLConstraint(); - - // Returns TRUE if anything changed - bool Evaluate(); - inline void SetSpacing(double x, double y) { m_xSpacing = x; m_ySpacing = y; }; - bool Equals(double a, double b); - - double m_xSpacing; - double m_ySpacing; - int m_constraintType; - wxString m_constraintName; - long m_constraintId; - wxShape* m_constrainingObject; - wxList m_constrainedObjects; - -}; - -void OGLInitializeConstraintTypes(); -void OGLCleanUpConstraintTypes(); - -#endif - // _OGL_CONSTRNT_H_ diff --git a/utils/ogl/src/divided.cpp b/utils/ogl/src/divided.cpp deleted file mode 100644 index efee471e62..0000000000 --- a/utils/ogl/src/divided.cpp +++ /dev/null @@ -1,722 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: divided.cpp -// Purpose: wxDividedShape class -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "divided.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#ifdef PROLOGIO -#include -#endif - -#include "basic.h" -#include "basicp.h" -#include "canvas.h" -#include "divided.h" -#include "lines.h" -#include "misc.h" - -class wxDividedShapeControlPoint: public wxControlPoint -{ - DECLARE_DYNAMIC_CLASS(wxDividedShapeControlPoint) - private: - int regionId; - public: - wxDividedShapeControlPoint() { regionId = 0; } - wxDividedShapeControlPoint(wxShapeCanvas *the_canvas, wxShape *object, int region, - double size, double the_xoffset, double the_yoffset, int the_type); - ~wxDividedShapeControlPoint(); - - void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); - void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); - void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); -}; - -IMPLEMENT_DYNAMIC_CLASS(wxDividedShapeControlPoint, wxControlPoint) - -/* - * Divided object - * - */ - -IMPLEMENT_DYNAMIC_CLASS(wxDividedShape, wxRectangleShape) - -wxDividedShape::wxDividedShape(double w, double h): wxRectangleShape(w, h) -{ - ClearRegions(); -} - -wxDividedShape::~wxDividedShape() -{ -} - -void wxDividedShape::OnDraw(wxDC& dc) -{ - wxRectangleShape::OnDraw(dc); -} - -void wxDividedShape::OnDrawContents(wxDC& dc) -{ - double defaultProportion = (double)(GetRegions().Number() > 0 ? (1.0/((double)(GetRegions().Number()))) : 0.0); - double currentY = (double)(m_ypos - (m_height / 2.0)); - double maxY = (double)(m_ypos + (m_height / 2.0)); - - double leftX = (double)(m_xpos - (m_width / 2.0)); - double rightX = (double)(m_xpos + (m_width / 2.0)); - - if (m_pen) dc.SetPen(m_pen); - - if (m_textColour) dc.SetTextForeground(* m_textColour); - -#ifdef __WXMSW__ - // For efficiency, don't do this under X - doesn't make - // any visible difference for our purposes. - if (m_brush) - dc.SetTextBackground(m_brush->GetColour()); -#endif -/* - if (!formatted) - { - FormatRegionText(); - formatted = TRUE; - } -*/ - if (GetDisableLabel()) return; - - double xMargin = 2; - double yMargin = 2; - dc.SetBackgroundMode(wxTRANSPARENT); - - wxNode *node = GetRegions().First(); - while (node) - { - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - dc.SetFont(region->GetFont()); - dc.SetTextForeground(* region->GetActualColourObject()); - - double proportion = - region->m_regionProportionY < 0.0 ? defaultProportion : region->m_regionProportionY; - - double y = currentY + m_height*proportion; - double actualY = maxY < y ? maxY : y; - - double centreX = m_xpos; - double centreY = (double)(currentY + (actualY - currentY)/2.0); - - oglDrawFormattedText(dc, ®ion->m_formattedText, - (double)(centreX), (double)(centreY), (double)(m_width-2*xMargin), (double)(actualY - currentY - 2*yMargin), - region->m_formatMode); - if ((y <= maxY) && (node->Next())) - { - wxPen *regionPen = region->GetActualPen(); - if (regionPen) - { - dc.SetPen(regionPen); - dc.DrawLine(WXROUND(leftX), WXROUND(y), WXROUND(rightX), WXROUND(y)); - } - } - - currentY = actualY; - - node = node->Next(); - } -} - -void wxDividedShape::SetSize(double w, double h, bool recursive) -{ - SetAttachmentSize(w, h); - m_width = w; - m_height = h; - SetRegionSizes(); -} - -void wxDividedShape::SetRegionSizes() -{ - if (GetRegions().Number() == 0) - return; - - double defaultProportion = (double)(GetRegions().Number() > 0 ? (1.0/((double)(GetRegions().Number()))) : 0.0); - double currentY = (double)(m_ypos - (m_height / 2.0)); - double maxY = (double)(m_ypos + (m_height / 2.0)); - -// double leftX = (double)(m_xpos - (m_width / 2.0)); -// double rightX = (double)(m_xpos + (m_width / 2.0)); - - wxNode *node = GetRegions().First(); - while (node) - { - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - double proportion = - region->m_regionProportionY <= 0.0 ? defaultProportion : region->m_regionProportionY; - - double sizeY = (double)proportion*m_height; - double y = currentY + sizeY; - double actualY = maxY < y ? maxY : y; - - double centreY = (double)(currentY + (actualY - currentY)/2.0); - - region->SetSize(m_width, sizeY); - region->SetPosition(0.0, (double)(centreY - m_ypos)); - currentY = actualY; - node = node->Next(); - } -} - -// Attachment points correspond to regions in the divided box -bool wxDividedShape::GetAttachmentPosition(int attachment, double *x, double *y, int nth, int no_arcs, - wxLineShape *line) -{ - int totalNumberAttachments = (GetRegions().Number() * 2) + 2; - if (!GetAttachmentMode() || (attachment >= totalNumberAttachments)) - { - return wxShape::GetAttachmentPosition(attachment, x, y, nth, no_arcs); - } - - int n = GetRegions().Number(); - bool isEnd = (line && line->IsEnd(this)); - - double left = (double)(m_xpos - m_width/2.0); - double right = (double)(m_xpos + m_width/2.0); - double top = (double)(m_ypos - m_height/2.0); - double bottom = (double)(m_ypos + m_height/2.0); - - // Zero is top, n+1 is bottom. - if (attachment == 0) - { - *y = top; - if (m_spaceAttachments) - { - if (line && (line->GetAlignmentType(isEnd) == LINE_ALIGNMENT_TO_NEXT_HANDLE)) - { - // Align line according to the next handle along - wxRealPoint *point = line->GetNextControlPoint(this); - if (point->x < left) - *x = left; - else if (point->x > right) - *x = right; - else - *x = point->x; - } - else - *x = left + (nth + 1)*m_width/(no_arcs + 1); - } - else - *x = m_xpos; - } - else if (attachment == (n+1)) - { - *y = bottom; - if (m_spaceAttachments) - { - if (line && (line->GetAlignmentType(isEnd) == LINE_ALIGNMENT_TO_NEXT_HANDLE)) - { - // Align line according to the next handle along - wxRealPoint *point = line->GetNextControlPoint(this); - if (point->x < left) - *x = left; - else if (point->x > right) - *x = right; - else - *x = point->x; - } - else - *x = left + (nth + 1)*m_width/(no_arcs + 1); - } - else - *x = m_xpos; - } - // Left or right. - else - { - int i = 0; - bool isLeft = FALSE; - if (attachment < (n+1)) - { - i = attachment-1; - isLeft = FALSE; - } - else - { - i = (totalNumberAttachments - attachment - 1); - isLeft = TRUE; - } - wxNode *node = GetRegions().Nth(i); - if (node) - { - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - - if (isLeft) - *x = left; - else - *x = right; - - // Calculate top and bottom of region - top = (double)((m_ypos + region->m_y) - (region->m_height/2.0)); - bottom = (double)((m_ypos + region->m_y) + (region->m_height/2.0)); - - // Assuming we can trust the absolute size and - // position of these regions... - if (m_spaceAttachments) - { - if (line && (line->GetAlignmentType(isEnd) == LINE_ALIGNMENT_TO_NEXT_HANDLE)) - { - // Align line according to the next handle along - wxRealPoint *point = line->GetNextControlPoint(this); - if (point->y < bottom) - *y = bottom; - else if (point->y > top) - *y = top; - else - *y = point->y; - } - else -// *y = (double)(((m_ypos + region->m_y) - (region->m_height/2.0)) + (nth + 1)*region->m_height/(no_arcs+1)); - *y = (double)(top + (nth + 1)*region->m_height/(no_arcs+1)); - } - else - *y = (double)(m_ypos + region->m_y); - } - else - { - *x = m_xpos; - *y = m_ypos; - return FALSE; - } - } - return TRUE; -} - -int wxDividedShape::GetNumberOfAttachments() -{ - // There are two attachments for each region (left and right), - // plus one on the top and one on the bottom. - int n = (GetRegions().Number() * 2) + 2; - - int maxN = n - 1; - wxNode *node = m_attachmentPoints.First(); - while (node) - { - wxAttachmentPoint *point = (wxAttachmentPoint *)node->Data(); - if (point->m_id > maxN) - maxN = point->m_id; - node = node->Next(); - } - return maxN + 1; -} - -bool wxDividedShape::AttachmentIsValid(int attachment) -{ - int totalNumberAttachments = (GetRegions().Number() * 2) + 2; - if (attachment >= totalNumberAttachments) - { - return wxShape::AttachmentIsValid(attachment); - } - else if (attachment >= 0) - return TRUE; - else - return FALSE; -} - -void wxDividedShape::Copy(wxShape& copy) -{ - wxRectangleShape::Copy(copy); -} - -// Region operations - -void wxDividedShape::MakeControlPoints() -{ - wxRectangleShape::MakeControlPoints(); - - MakeMandatoryControlPoints(); -} - -void wxDividedShape::MakeMandatoryControlPoints() -{ - double currentY = (double)(GetY() - (m_height / 2.0)); - double maxY = (double)(GetY() + (m_height / 2.0)); - - wxNode *node = GetRegions().First(); - int i = 0; - while (node) - { - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - - double proportion = region->m_regionProportionY; - - double y = currentY + m_height*proportion; - double actualY = (double)(maxY < y ? maxY : y); - - if (node->Next()) - { - wxDividedShapeControlPoint *controlPoint = - new wxDividedShapeControlPoint(m_canvas, this, i, CONTROL_POINT_SIZE, 0.0, (double)(actualY - GetY()), 0); - m_canvas->AddShape(controlPoint); - m_controlPoints.Append(controlPoint); - } - currentY = actualY; - i ++; - node = node->Next(); - } -} - -void wxDividedShape::ResetControlPoints() -{ - // May only have the region handles, (n - 1) of them. - if (m_controlPoints.Number() > (GetRegions().Number() - 1)) - wxRectangleShape::ResetControlPoints(); - - ResetMandatoryControlPoints(); -} - -void wxDividedShape::ResetMandatoryControlPoints() -{ - double currentY = (double)(GetY() - (m_height / 2.0)); - double maxY = (double)(GetY() + (m_height / 2.0)); - - wxNode *node = m_controlPoints.First(); - int i = 0; - while (node) - { - wxControlPoint *controlPoint = (wxControlPoint *)node->Data(); - if (controlPoint->IsKindOf(CLASSINFO(wxDividedShapeControlPoint))) - { - wxNode *node1 = GetRegions().Nth(i); - wxShapeRegion *region = (wxShapeRegion *)node1->Data(); - - double proportion = region->m_regionProportionY; - - double y = currentY + m_height*proportion; - double actualY = (double)(maxY < y ? maxY : y); - - controlPoint->m_xoffset = 0.0; - controlPoint->m_yoffset = (double)(actualY - GetY()); - currentY = actualY; - i ++; - } - node = node->Next(); - } -} - -#ifdef PROLOGIO -void wxDividedShape::WritePrologAttributes(wxExpr *clause) -{ - wxRectangleShape::WritePrologAttributes(clause); -} - -void wxDividedShape::ReadPrologAttributes(wxExpr *clause) -{ - wxRectangleShape::ReadPrologAttributes(clause); -} -#endif - -/* - * Edit the division colour/style - * - */ - -void wxDividedShape::EditRegions() -{ - wxMessageBox("EditRegions() is unimplemented.", "OGL", wxOK); - - // TODO -#if 0 - if (GetRegions().Number() < 2) - return; - - wxBeginBusyCursor(); - - GraphicsForm *form = new GraphicsForm("Divided nodes"); - // Need an array to store all the style strings, - // since they need to be converted to integers - char **styleStrings = new char *[GetRegions().Number()]; - for (int j = 0; j < GetRegions().Number(); j++) - styleStrings[j] = NULL; - - int i = 0; - wxNode *node = GetRegions().First(); - while (node && node->Next()) - { - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - char buf[50]; - sprintf(buf, "Region %d", (i+1)); - form->Add(wxMakeFormMessage(buf)); - form->Add(wxMakeFormNewLine()); - - form->Add(wxMakeFormString("Colour", ®ion->penColour, wxFORM_CHOICE, - new wxList(wxMakeConstraintStrings( - "Invisible" , - "BLACK" , - "BLUE" , - "BROWN" , - "CORAL" , - "CYAN" , - "DARK GREY" , - "DARK GREEN" , - "DIM GREY" , - "GREY" , - "GREEN" , - "LIGHT BLUE" , - "LIGHT GREY" , - "MAGENTA" , - "MAROON" , - "NAVY" , - "ORANGE" , - "PURPLE" , - "RED" , - "TURQUOISE" , - "VIOLET" , - "WHITE" , - "YELLOW" , - NULL), - NULL), NULL, wxVERTICAL, 150)); - - char *styleString = NULL; - switch (region->penStyle) - { - case wxSHORT_DASH: - styleString = "Short Dash"; - break; - case wxLONG_DASH: - styleString = "Long Dash"; - break; - case wxDOT: - styleString = "Dot"; - break; - case wxDOT_DASH: - styleString = "Dot Dash"; - break; - case wxSOLID: - default: - styleString = "Solid"; - break; - } - styleStrings[i] = copystring(styleString); - form->Add(wxMakeFormString("Style", &(styleStrings[i]), wxFORM_CHOICE, - new wxList(wxMakeConstraintStrings( - "Solid" , - "Short Dash" , - "Long Dash" , - "Dot" , - "Dot Dash" , - NULL), - NULL), NULL, wxVERTICAL, 100)); - node = node->Next(); - i ++; - if (node && node->Next()) - form->Add(wxMakeFormNewLine()); - } - wxDialogBox *dialog = new wxDialogBox(m_canvas->GetParent(), "Divided object properties", 10, 10, 500, 500); - if (GraphicsLabelFont) - dialog->SetLabelFont(GraphicsLabelFont); - if (GraphicsButtonFont) - dialog->SetButtonFont(GraphicsButtonFont); - form->AssociatePanel(dialog); - form->dialog = dialog; - - dialog->Fit(); - dialog->Centre(wxBOTH); - - wxEndBusyCursor(); - - dialog->Show(TRUE); - - node = GetRegions().First(); - i = 0; - while (node) - { - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - - if (styleStrings[i]) - { - if (strcmp(styleStrings[i], "Solid") == 0) - region->penStyle = wxSOLID; - else if (strcmp(styleStrings[i], "Dot") == 0) - region->penStyle = wxDOT; - else if (strcmp(styleStrings[i], "Short Dash") == 0) - region->penStyle = wxSHORT_DASH; - else if (strcmp(styleStrings[i], "Long Dash") == 0) - region->penStyle = wxLONG_DASH; - else if (strcmp(styleStrings[i], "Dot Dash") == 0) - region->penStyle = wxDOT_DASH; - delete[] styleStrings[i]; - } - region->m_actualPenObject = NULL; - node = node->Next(); - i ++; - } - delete[] styleStrings; - Draw(dc); -#endif -} - -void wxDividedShape::OnRightClick(double x, double y, int keys, int attachment) -{ - if (keys & KEY_CTRL) - { - EditRegions(); - } - else - { - wxRectangleShape::OnRightClick(x, y, keys, attachment); - } -} - -wxDividedShapeControlPoint::wxDividedShapeControlPoint(wxShapeCanvas *the_canvas, wxShape *object, - int region, double size, double the_m_xoffset, double the_m_yoffset, int the_type): - wxControlPoint(the_canvas, object, size, the_m_xoffset, the_m_yoffset, the_type) -{ - regionId = region; -} - -wxDividedShapeControlPoint::~wxDividedShapeControlPoint() -{ -} - -// Implement resizing of divided object division -void wxDividedShapeControlPoint::OnDragLeft(bool draw, double x, double y, int keys, int attachment) -{ - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - dc.SetLogicalFunction(wxXOR); - wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT); - dc.SetPen(dottedPen); - dc.SetBrush((* wxTRANSPARENT_BRUSH)); - - wxDividedShape *dividedObject = (wxDividedShape *)m_shape; - double x1 = (double)(dividedObject->GetX() - (dividedObject->GetWidth()/2.0)); - double y1 = y; - double x2 = (double)(dividedObject->GetX() + (dividedObject->GetWidth()/2.0)); - double y2 = y; - dc.DrawLine(WXROUND(x1), WXROUND(y1), WXROUND(x2), WXROUND(y2)); -} - -void wxDividedShapeControlPoint::OnBeginDragLeft(double x, double y, int keys, int attachment) -{ - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - wxDividedShape *dividedObject = (wxDividedShape *)m_shape; - dc.SetLogicalFunction(wxXOR); - wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT); - dc.SetPen(dottedPen); - dc.SetBrush((* wxTRANSPARENT_BRUSH)); - - double x1 = (double)(dividedObject->GetX() - (dividedObject->GetWidth()/2.0)); - double y1 = y; - double x2 = (double)(dividedObject->GetX() + (dividedObject->GetWidth()/2.0)); - double y2 = y; - dc.DrawLine(WXROUND(x1), WXROUND(y1), WXROUND(x2), WXROUND(y2)); - m_canvas->CaptureMouse(); -} - -void wxDividedShapeControlPoint::OnEndDragLeft(double x, double y, int keys, int attachment) -{ - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - wxDividedShape *dividedObject = (wxDividedShape *)m_shape; - wxNode *node = dividedObject->GetRegions().Nth(regionId); - if (!node) - return; - - wxShapeRegion *thisRegion = (wxShapeRegion *)node->Data(); - wxShapeRegion *nextRegion = NULL; // Region below this one - - dc.SetLogicalFunction(wxCOPY); - - m_canvas->ReleaseMouse(); - - // Find the old top and bottom of this region, - // and calculate the new proportion for this region - // if legal. - - double currentY = (double)(dividedObject->GetY() - (dividedObject->GetHeight() / 2.0)); - double maxY = (double)(dividedObject->GetY() + (dividedObject->GetHeight() / 2.0)); - - // Save values - double thisRegionTop = 0.0; - double thisRegionBottom = 0.0; - double nextRegionBottom = 0.0; - - node = dividedObject->GetRegions().First(); - while (node) - { - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - - double proportion = region->m_regionProportionY; - double yy = currentY + (dividedObject->GetHeight()*proportion); - double actualY = (double)(maxY < yy ? maxY : yy); - - if (region == thisRegion) - { - thisRegionTop = currentY; - thisRegionBottom = actualY; - if (node->Next()) - nextRegion = (wxShapeRegion *)node->Next()->Data(); - } - if (region == nextRegion) - { - nextRegionBottom = actualY; - } - - currentY = actualY; - node = node->Next(); - } - if (!nextRegion) - return; - - // Check that we haven't gone above this region or below - // next region. - if ((y <= thisRegionTop) || (y >= nextRegionBottom)) - return; - - dividedObject->EraseLinks(dc); - - // Now calculate the new proportions of this region and the next region. - double thisProportion = (double)((y - thisRegionTop)/dividedObject->GetHeight()); - double nextProportion = (double)((nextRegionBottom - y)/dividedObject->GetHeight()); - thisRegion->SetProportions(0.0, thisProportion); - nextRegion->SetProportions(0.0, nextProportion); - m_yoffset = (double)(y - dividedObject->GetY()); - - // Now reformat text - int i = 0; - node = dividedObject->GetRegions().First(); - while (node) - { - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - if (region->GetText()) - { - char *s = copystring(region->GetText()); - dividedObject->FormatText(dc, s, i); - delete[] s; - } - node = node->Next(); - i++; - } - dividedObject->SetRegionSizes(); - dividedObject->Draw(dc); - dividedObject->GetEventHandler()->OnMoveLinks(dc); -} - diff --git a/utils/ogl/src/divided.h b/utils/ogl/src/divided.h deleted file mode 100644 index dde6251367..0000000000 --- a/utils/ogl/src/divided.h +++ /dev/null @@ -1,76 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: divided.h -// Purpose: wxDividedShape -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _OGL_DIVIDED_H_ -#define _OGL_DIVIDED_H_ - -#ifdef __GNUG__ -#pragma interface "basic.h" -#endif - -/* - * Definition of a region - * - */ - -/* - * Box divided into horizontal regions - * - */ - -extern wxFont *g_oglNormalFont; -class wxDividedShape: public wxRectangleShape -{ - DECLARE_DYNAMIC_CLASS(wxDividedShape) - - public: - wxDividedShape(double w = 0.0, double h = 0.0); - ~wxDividedShape(); - - void OnDraw(wxDC& dc); - void OnDrawContents(wxDC& dc); - - void SetSize(double w, double h, bool recursive = TRUE); - - void MakeControlPoints(); - void ResetControlPoints(); - - void MakeMandatoryControlPoints(); - void ResetMandatoryControlPoints(); - -#ifdef PROLOGIO - // Prolog database stuff - void WritePrologAttributes(wxExpr *clause); - void ReadPrologAttributes(wxExpr *clause); -#endif - - void Copy(wxShape ©); - - // Set all region sizes according to proportions and - // this object total size - void SetRegionSizes(); - - // Edit region colours/styles - void EditRegions(); - - // Attachment points correspond to regions in the divided box - bool GetAttachmentPosition(int attachment, double *x, double *y, - int nth = 0, int no_arcs = 1, wxLineShape *line = NULL); - bool AttachmentIsValid(int attachment); - int GetNumberOfAttachments(); - - // Invoke editor on CTRL-right click - void OnRightClick(double x, double y, int keys = 0, int attachment = 0); -}; - -#endif - // _OGL_DIVIDED_H_ - diff --git a/utils/ogl/src/drawn.cpp b/utils/ogl/src/drawn.cpp deleted file mode 100644 index 2337312fb5..0000000000 --- a/utils/ogl/src/drawn.cpp +++ /dev/null @@ -1,2494 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: drawn.cpp -// Purpose: wxDrawnShape -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "drawn.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#ifdef PROLOGIO -#include -#endif - -#include "basic.h" -#include "basicp.h" -#include "canvas.h" -#include "mfutils.h" -#include "drawn.h" -#include "drawnp.h" -#include "misc.h" - -static void IntToHex(unsigned int dec, char *buf); -static unsigned long HexToInt(char *buf); -extern char *oglBuffer; - -#define gyTYPE_PEN 40 -#define gyTYPE_BRUSH 41 -#define gyTYPE_FONT 42 - -/* - * Drawn object - * - */ - -IMPLEMENT_DYNAMIC_CLASS(wxDrawnShape, wxRectangleShape) - -wxDrawnShape::wxDrawnShape():wxRectangleShape(100.0, 50.0) -{ - m_saveToFile = TRUE; - m_currentAngle = oglDRAWN_ANGLE_0; -} - -wxDrawnShape::~wxDrawnShape() -{ -} - -void wxDrawnShape::OnDraw(wxDC& dc) -{ - // Pass pen and brush in case we have force outline - // and fill colours - if (m_shadowMode != SHADOW_NONE) - { - if (m_shadowBrush) - m_metafiles[m_currentAngle].m_fillBrush = m_shadowBrush; - m_metafiles[m_currentAngle].m_outlinePen = g_oglTransparentPen; - m_metafiles[m_currentAngle].Draw(dc, m_xpos + m_shadowOffsetX, m_ypos + m_shadowOffsetY); - } - - m_metafiles[m_currentAngle].m_outlinePen = m_pen; - m_metafiles[m_currentAngle].m_fillBrush = m_brush; - m_metafiles[m_currentAngle].Draw(dc, m_xpos, m_ypos); -} - -void wxDrawnShape::SetSize(double w, double h, bool recursive) -{ - SetAttachmentSize(w, h); - - double scaleX; - double scaleY; - if (GetWidth() == 0.0) - scaleX = 1.0; - else scaleX = w/GetWidth(); - if (GetHeight() == 0.0) - scaleY = 1.0; - else scaleY = h/GetHeight(); - - int i = 0; - for (i = 0; i < 4; i++) - { - if (m_metafiles[i].IsValid()) - m_metafiles[i].Scale(scaleX, scaleY); - } - m_width = w; - m_height = h; - SetDefaultRegionSize(); -} - -void wxDrawnShape::Scale(double sx, double sy) -{ - int i; - for (i = 0; i < 4; i++) - { - if (m_metafiles[i].IsValid()) - { - m_metafiles[i].Scale(sx, sy); - m_metafiles[i].CalculateSize(this); - } - } -} - -void wxDrawnShape::Translate(double x, double y) -{ - int i; - for (i = 0; i < 4; i++) - { - if (m_metafiles[i].IsValid()) - { - m_metafiles[i].Translate(x, y); - m_metafiles[i].CalculateSize(this); - } - } -} - -// theta is absolute rotation from the zero position -void wxDrawnShape::Rotate(double x, double y, double theta) -{ - m_currentAngle = DetermineMetaFile(theta); - - if (m_currentAngle == 0) - { - // Rotate metafile - if (!m_metafiles[0].GetRotateable()) - return; - - m_metafiles[0].Rotate(x, y, theta); - } - - double actualTheta = theta-m_rotation; - - // Rotate attachment points - double sinTheta = (double)sin(actualTheta); - double cosTheta = (double)cos(actualTheta); - wxNode *node = m_attachmentPoints.First(); - while (node) - { - wxAttachmentPoint *point = (wxAttachmentPoint *)node->Data(); - double x1 = point->m_x; - double y1 = point->m_y; - point->m_x = x1*cosTheta - y1*sinTheta + x*(1.0 - cosTheta) + y*sinTheta; - point->m_y = x1*sinTheta + y1*cosTheta + y*(1.0 - cosTheta) + x*sinTheta; - node = node->Next(); - } - m_rotation = theta; - - m_metafiles[m_currentAngle].CalculateSize(this); -} - -// Which metafile do we use now? Based on current rotation and validity -// of metafiles. - -int wxDrawnShape::DetermineMetaFile(double rotation) -{ - double tolerance = 0.0001; - const double pi = 3.1415926535897932384626433832795 ; - double angle1 = 0.0; - double angle2 = pi/2.0; - double angle3 = pi; - double angle4 = 3.0*pi/2.0; - - int whichMetafile = 0; - - if (oglRoughlyEqual(rotation, angle1, tolerance)) - { - whichMetafile = 0; - } - else if (oglRoughlyEqual(rotation, angle2, tolerance)) - { - whichMetafile = 1; - } - else if (oglRoughlyEqual(rotation, angle3, tolerance)) - { - whichMetafile = 2; - } - else if (oglRoughlyEqual(rotation, angle4, tolerance)) - { - whichMetafile = 3; - } - - if ((whichMetafile > 0) && !m_metafiles[whichMetafile].IsValid()) - whichMetafile = 0; - - return whichMetafile; -} - -void wxDrawnShape::OnDrawOutline(wxDC& dc, double x, double y, double w, double h) -{ - if (m_metafiles[m_currentAngle].GetOutlineOp() != -1) - { - wxNode* node = m_metafiles[m_currentAngle].GetOps().Nth(m_metafiles[m_currentAngle].GetOutlineOp()); - wxASSERT (node != NULL); - wxDrawOp* op = (wxDrawOp*) node->Data(); - - if (op->OnDrawOutline(dc, x, y, w, h, m_width, m_height)) - return; - } - - // Default... just use a rectangle - wxRectangleShape::OnDrawOutline(dc, x, y, w, h); -} - -// Get the perimeter point using the special outline op, if there is one, -// otherwise use default wxRectangleShape scheme -bool wxDrawnShape::GetPerimeterPoint(double x1, double y1, - double x2, double y2, - double *x3, double *y3) -{ - if (m_metafiles[m_currentAngle].GetOutlineOp() != -1) - { - wxNode* node = m_metafiles[m_currentAngle].GetOps().Nth(m_metafiles[m_currentAngle].GetOutlineOp()); - wxASSERT (node != NULL); - wxDrawOp* op = (wxDrawOp*) node->Data(); - - if (op->GetPerimeterPoint(x1, y1, x2, y2, x3, y3, GetX(), GetY(), GetAttachmentMode())) - return TRUE; - } - - // Default... just use a rectangle - return wxRectangleShape::GetPerimeterPoint(x1, y1, x2, y2, x3, y3); -} - -#ifdef PROLOGIO -// Prolog database stuff -char *wxDrawnShape::GetFunctor() -{ - return "node_image"; -} - -void wxDrawnShape::WritePrologAttributes(wxExpr *clause) -{ - wxRectangleShape::WritePrologAttributes(clause); - - clause->AddAttributeValue("save_metafile", (long)m_saveToFile); - if (m_saveToFile) - { - int i = 0; - for (i = 0; i < 4; i++) - { - if (m_metafiles[i].IsValid()) - m_metafiles[i].WritePrologAttributes(clause, i); - } - } -} - -void wxDrawnShape::ReadPrologAttributes(wxExpr *clause) -{ - wxRectangleShape::ReadPrologAttributes(clause); - - int iVal = (int) m_saveToFile; - clause->AssignAttributeValue("save_metafile", &iVal); - m_saveToFile = (iVal != 0); - - if (m_saveToFile) - { - int i = 0; - for (i = 0; i < 4; i++) - { - m_metafiles[i].ReadPrologAttributes(clause, i); - } - } -} -#endif - -// Does the copying for this object -void wxDrawnShape::Copy(wxShape& copy) -{ - wxRectangleShape::Copy(copy); - - wxASSERT( copy.IsKindOf(CLASSINFO(wxDrawnShape)) ) ; - - wxDrawnShape& drawnCopy = (wxDrawnShape&) copy; - - int i = 0; - for (i = 0; i < 4; i++) - { - m_metafiles[i].Copy(drawnCopy.m_metafiles[i]); - } - drawnCopy.m_saveToFile = m_saveToFile; - drawnCopy.m_currentAngle = m_currentAngle; -} - -bool wxDrawnShape::LoadFromMetaFile(char *filename) -{ - return m_metafiles[0].LoadFromMetaFile(filename, &m_width, &m_height); -} - -// Set of functions for drawing into a pseudo metafile. -// They use integers, but doubles are used internally for accuracy -// when scaling. - -void wxDrawnShape::DrawLine(const wxPoint& pt1, const wxPoint& pt2) -{ - m_metafiles[m_currentAngle].DrawLine(pt1, pt2); -} - -void wxDrawnShape::DrawRectangle(const wxRect& rect) -{ - m_metafiles[m_currentAngle].DrawRectangle(rect); -} - -void wxDrawnShape::DrawRoundedRectangle(const wxRect& rect, double radius) -{ - m_metafiles[m_currentAngle].DrawRoundedRectangle(rect, radius); -} - -void wxDrawnShape::DrawEllipse(const wxRect& rect) -{ - m_metafiles[m_currentAngle].DrawEllipse(rect); -} - -void wxDrawnShape::DrawArc(const wxPoint& centrePt, const wxPoint& startPt, const wxPoint& endPt) -{ - m_metafiles[m_currentAngle].DrawArc(centrePt, startPt, endPt); -} - -void wxDrawnShape::DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle) -{ - m_metafiles[m_currentAngle].DrawEllipticArc(rect, startAngle, endAngle); -} - -void wxDrawnShape::DrawPoint(const wxPoint& pt) -{ - m_metafiles[m_currentAngle].DrawPoint(pt); -} - -void wxDrawnShape::DrawText(const wxString& text, const wxPoint& pt) -{ - m_metafiles[m_currentAngle].DrawText(text, pt); -} - -void wxDrawnShape::DrawLines(int n, wxPoint pts[]) -{ - m_metafiles[m_currentAngle].DrawLines(n, pts); -} - -void wxDrawnShape::DrawPolygon(int n, wxPoint pts[], int flags) -{ - if (flags & oglMETAFLAGS_ATTACHMENTS) - { - ClearAttachments(); - int i; - for (i = 0; i < n; i++) - m_attachmentPoints.Append(new wxAttachmentPoint(i, pts[i].x, pts[i].y)); - } - m_metafiles[m_currentAngle].DrawPolygon(n, pts, flags); -} - -void wxDrawnShape::DrawSpline(int n, wxPoint pts[]) -{ - m_metafiles[m_currentAngle].DrawSpline(n, pts); -} - -void wxDrawnShape::SetClippingRect(const wxRect& rect) -{ - m_metafiles[m_currentAngle].SetClippingRect(rect); -} - -void wxDrawnShape::DestroyClippingRect() -{ - m_metafiles[m_currentAngle].DestroyClippingRect(); -} - -void wxDrawnShape::SetPen(wxPen* pen, bool isOutline) -{ - m_metafiles[m_currentAngle].SetPen(pen, isOutline); -} - -void wxDrawnShape::SetBrush(wxBrush* brush, bool isFill) -{ - m_metafiles[m_currentAngle].SetBrush(brush, isFill); -} - -void wxDrawnShape::SetFont(wxFont* font) -{ - m_metafiles[m_currentAngle].SetFont(font); -} - -void wxDrawnShape::SetTextColour(const wxColour& colour) -{ - m_metafiles[m_currentAngle].SetTextColour(colour); -} - -void wxDrawnShape::SetBackgroundColour(const wxColour& colour) -{ - m_metafiles[m_currentAngle].SetBackgroundColour(colour); -} - -void wxDrawnShape::SetBackgroundMode(int mode) -{ - m_metafiles[m_currentAngle].SetBackgroundMode(mode); -} - - -/* - * Individual operations - * - */ - -/* - * Set font, brush, text colour - * - */ - -wxOpSetGDI::wxOpSetGDI(int theOp, wxPseudoMetaFile *theImage, int theGdiIndex, int theMode): - wxDrawOp(theOp) -{ - m_gdiIndex = theGdiIndex; - m_image = theImage; - m_mode = theMode; -} - -void wxOpSetGDI::Do(wxDC& dc, double xoffset, double yoffset) -{ - switch (m_op) - { - case DRAWOP_SET_PEN: - { - // Check for overriding this operation for outline - // colour - if (m_image->m_outlineColours.Member((wxObject *)m_gdiIndex)) - { - if (m_image->m_outlinePen) - dc.SetPen(m_image->m_outlinePen); - } - else - { - wxNode *node = m_image->m_gdiObjects.Nth(m_gdiIndex); - if (node) - { - wxPen *pen = (wxPen *)node->Data(); - if (pen) - dc.SetPen(pen); - } - } - break; - } - case DRAWOP_SET_BRUSH: - { - // Check for overriding this operation for outline or fill - // colour - if (m_image->m_outlineColours.Member((wxObject *)m_gdiIndex)) - { - // Need to construct a brush to match the outline pen's colour - if (m_image->m_outlinePen) - { - wxBrush *br = wxTheBrushList->FindOrCreateBrush(m_image->m_outlinePen->GetColour(), wxSOLID); - if (br) - dc.SetBrush(br); - } - } - else if (m_image->m_fillColours.Member((wxObject *)m_gdiIndex)) - { - if (m_image->m_fillBrush) - { - dc.SetBrush(m_image->m_fillBrush); - } - } - else - { - wxNode *node = m_image->m_gdiObjects.Nth(m_gdiIndex); - if (node) - { - wxBrush *brush = (wxBrush *)node->Data(); - if (brush) - dc.SetBrush(brush); - } - } - break; - } - case DRAWOP_SET_FONT: - { - wxNode *node = m_image->m_gdiObjects.Nth(m_gdiIndex); - if (node) - { - wxFont *font = (wxFont *)node->Data(); - if (font) - dc.SetFont(font); - } - break; - } - case DRAWOP_SET_TEXT_COLOUR: - { - wxColour col(m_r,m_g,m_b); - dc.SetTextForeground(col); - break; - } - case DRAWOP_SET_BK_COLOUR: - { - wxColour col(m_r,m_g,m_b); - dc.SetTextBackground(col); - break; - } - case DRAWOP_SET_BK_MODE: - { - dc.SetBackgroundMode(m_mode); - break; - } - default: - break; - } -} - -wxDrawOp *wxOpSetGDI::Copy(wxPseudoMetaFile *newImage) -{ - wxOpSetGDI *newOp = new wxOpSetGDI(m_op, newImage, m_gdiIndex, m_mode); - newOp->m_r = m_r; - newOp->m_g = m_g; - newOp->m_b = m_b; - return newOp; -} - -wxExpr *wxOpSetGDI::WriteExpr(wxPseudoMetaFile *image) -{ - wxExpr *expr = new wxExpr(PrologList); - expr->Append(new wxExpr((long)m_op)); - switch (m_op) - { - case DRAWOP_SET_PEN: - case DRAWOP_SET_BRUSH: - case DRAWOP_SET_FONT: - { - expr->Append(new wxExpr((long)m_gdiIndex)); - break; - } - case DRAWOP_SET_TEXT_COLOUR: - case DRAWOP_SET_BK_COLOUR: - { - expr->Append(new wxExpr((long)m_r)); - expr->Append(new wxExpr((long)m_g)); - expr->Append(new wxExpr((long)m_b)); - break; - } - case DRAWOP_SET_BK_MODE: - { - expr->Append(new wxExpr((long)m_mode)); - break; - } - default: - break; - } - return expr; -} - -void wxOpSetGDI::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr) -{ - switch (m_op) - { - case DRAWOP_SET_PEN: - case DRAWOP_SET_BRUSH: - case DRAWOP_SET_FONT: - { - m_gdiIndex = (int)expr->Nth(1)->IntegerValue(); - break; - } - case DRAWOP_SET_TEXT_COLOUR: - case DRAWOP_SET_BK_COLOUR: - { - m_r = (unsigned char)expr->Nth(1)->IntegerValue(); - m_g = (unsigned char)expr->Nth(2)->IntegerValue(); - m_b = (unsigned char)expr->Nth(3)->IntegerValue(); - break; - } - case DRAWOP_SET_BK_MODE: - { - m_mode = (int)expr->Nth(1)->IntegerValue(); - break; - } - default: - break; - } -} - -/* - * Set/destroy clipping - * - */ - -wxOpSetClipping::wxOpSetClipping(int theOp, double theX1, double theY1, - double theX2, double theY2):wxDrawOp(theOp) -{ - m_x1 = theX1; - m_y1 = theY1; - m_x2 = theX2; - m_y2 = theY2; -} - -wxDrawOp *wxOpSetClipping::Copy(wxPseudoMetaFile *newImage) -{ - wxOpSetClipping *newOp = new wxOpSetClipping(m_op, m_x1, m_y1, m_x2, m_y2); - return newOp; -} - -void wxOpSetClipping::Do(wxDC& dc, double xoffset, double yoffset) -{ - switch (m_op) - { - case DRAWOP_SET_CLIPPING_RECT: - { - dc.SetClippingRegion(m_x1 + xoffset, m_y1 + yoffset, m_x2 + xoffset, m_y2 + yoffset); - break; - } - case DRAWOP_DESTROY_CLIPPING_RECT: - { - dc.DestroyClippingRegion(); - break; - } - default: - break; - } -} - -void wxOpSetClipping::Scale(double xScale, double yScale) -{ - m_x1 *= xScale; - m_y1 *= yScale; - m_x2 *= xScale; - m_y2 *= yScale; -} - -void wxOpSetClipping::Translate(double x, double y) -{ - m_x1 += x; - m_y1 += y; -} - -wxExpr *wxOpSetClipping::WriteExpr(wxPseudoMetaFile *image) -{ - wxExpr *expr = new wxExpr(PrologList); - expr->Append(new wxExpr((long)m_op)); - switch (m_op) - { - case DRAWOP_SET_CLIPPING_RECT: - { - expr->Append(new wxExpr(m_x1)); - expr->Append(new wxExpr(m_y1)); - expr->Append(new wxExpr(m_x2)); - expr->Append(new wxExpr(m_y2)); - break; - } - default: - break; - } - return expr; -} - -void wxOpSetClipping::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr) -{ - switch (m_op) - { - case DRAWOP_SET_CLIPPING_RECT: - { - m_x1 = expr->Nth(1)->RealValue(); - m_y1 = expr->Nth(2)->RealValue(); - m_x2 = expr->Nth(3)->RealValue(); - m_y2 = expr->Nth(4)->RealValue(); - break; - } - default: - break; - } -} - -/* - * Draw line, rectangle, rounded rectangle, ellipse, point, arc, text - * - */ - -wxOpDraw::wxOpDraw(int theOp, double theX1, double theY1, double theX2, double theY2, - double theRadius, char *s):wxDrawOp(theOp) -{ - m_x1 = theX1; - m_y1 = theY1; - m_x2 = theX2; - m_y2 = theY2; - m_x3 = 0.0; - m_y3 = 0.0; - m_radius = theRadius; - if (s) m_textString = copystring(s); - else m_textString = NULL; -} - -wxOpDraw::~wxOpDraw() -{ - if (m_textString) delete[] m_textString; -} - -wxDrawOp *wxOpDraw::Copy(wxPseudoMetaFile *newImage) -{ - wxOpDraw *newOp = new wxOpDraw(m_op, m_x1, m_y1, m_x2, m_y2, m_radius, m_textString); - newOp->m_x3 = m_x3; - newOp->m_y3 = m_y3; - return newOp; -} - -void wxOpDraw::Do(wxDC& dc, double xoffset, double yoffset) -{ - switch (m_op) - { - case DRAWOP_DRAW_LINE: - { - dc.DrawLine(WXROUND(m_x1+xoffset), WXROUND(m_y1+yoffset), WXROUND(m_x2+xoffset), WXROUND(m_y2+yoffset)); - break; - } - case DRAWOP_DRAW_RECT: - { - dc.DrawRectangle(WXROUND(m_x1+xoffset), WXROUND(m_y1+yoffset), WXROUND(m_x2), WXROUND(m_y2)); - break; - } - case DRAWOP_DRAW_ROUNDED_RECT: - { - dc.DrawRoundedRectangle(WXROUND(m_x1+xoffset), WXROUND(m_y1+yoffset), WXROUND(m_x2), WXROUND(m_y2), m_radius); - break; - } - case DRAWOP_DRAW_ELLIPSE: - { - dc.DrawEllipse(WXROUND(m_x1+xoffset), WXROUND(m_y1+yoffset), WXROUND(m_x2), WXROUND(m_y2)); - break; - } - case DRAWOP_DRAW_ARC: - { - dc.DrawArc(WXROUND(m_x2+xoffset), WXROUND(m_y2+yoffset), - WXROUND(m_x3+xoffset), WXROUND(m_y3+yoffset), - WXROUND(m_x1+xoffset), WXROUND(m_y1+yoffset)); - break; - } - case DRAWOP_DRAW_ELLIPTIC_ARC: - { - const double pi = 3.1415926535897932384626433832795 ; - - // Convert back to degrees - dc.DrawEllipticArc( - WXROUND(m_x1+xoffset), WXROUND(m_y1+yoffset), - WXROUND(m_x2), WXROUND(m_y2), - WXROUND(m_x3*(360.0/(2.0*pi))), WXROUND(m_y3*(360.0/(2.0*pi)))); - break; - } - case DRAWOP_DRAW_POINT: - { - dc.DrawPoint(WXROUND(m_x1+xoffset), WXROUND(m_y1+yoffset)); - break; - } - case DRAWOP_DRAW_TEXT: - { - dc.DrawText(m_textString, WXROUND(m_x1+xoffset), WXROUND(m_y1+yoffset)); - break; - } - default: - break; - } -} - -void wxOpDraw::Scale(double scaleX, double scaleY) -{ - m_x1 *= scaleX; - m_y1 *= scaleY; - m_x2 *= scaleX; - m_y2 *= scaleY; - - if (m_op != DRAWOP_DRAW_ELLIPTIC_ARC) - { - m_x3 *= scaleX; - m_y3 *= scaleY; - } - - m_radius *= scaleX; -} - -void wxOpDraw::Translate(double x, double y) -{ - m_x1 += x; - m_y1 += y; - - switch (m_op) - { - case DRAWOP_DRAW_LINE: - { - m_x2 += x; - m_y2 += y; - break; - } - case DRAWOP_DRAW_ARC: - { - m_x2 += x; - m_y2 += y; - m_x3 += x; - m_y3 += y; - break; - } - case DRAWOP_DRAW_ELLIPTIC_ARC: - { - break; - } - default: - break; - } -} - -void wxOpDraw::Rotate(double x, double y, double theta, double sinTheta, double cosTheta) -{ - double newX1 = m_x1*cosTheta - m_y1*sinTheta + x*(1.0 - cosTheta) + y*sinTheta; - double newY1 = m_x1*sinTheta + m_y1*cosTheta + y*(1.0 - cosTheta) + x*sinTheta; - - switch (m_op) - { - case DRAWOP_DRAW_LINE: - { - double newX2 = m_x2*cosTheta - m_y2*sinTheta + x*(1.0 - cosTheta) + y*sinTheta; - double newY2 = m_x2*sinTheta + m_y2*cosTheta + y*(1.0 - cosTheta) + x*sinTheta; - - m_x1 = newX1; - m_y1 = newY1; - m_x2 = newX2; - m_y2 = newY2; - break; - } - case DRAWOP_DRAW_RECT: - case DRAWOP_DRAW_ROUNDED_RECT: - case DRAWOP_DRAW_ELLIPTIC_ARC: - { - // Assume only 0, 90, 180, 270 degree rotations. - // oldX1, oldY1 represents the top left corner. Find the - // bottom right, and rotate that. Then the width/height is the difference - // between x/y values. - double oldBottomRightX = m_x1 + m_x2; - double oldBottomRightY = m_y1 + m_y2; - double newBottomRightX = oldBottomRightX*cosTheta - oldBottomRightY*sinTheta + x*(1.0 - cosTheta) + y*sinTheta; - double newBottomRightY = oldBottomRightX*sinTheta + oldBottomRightY*cosTheta + y*(1.0 - cosTheta) + x*sinTheta; - - // Now find the new top-left, bottom-right coordinates. - double minX = wxMin(newX1, newBottomRightX); - double minY = wxMin(newY1, newBottomRightY); - double maxX = wxMax(newX1, newBottomRightX); - double maxY = wxMax(newY1, newBottomRightY); - - m_x1 = minX; - m_y1 = minY; - m_x2 = maxX - minX; // width - m_y2 = maxY - minY; // height - - if (m_op == DRAWOP_DRAW_ELLIPTIC_ARC) - { - // Add rotation to angles - m_x3 += theta; - m_y3 += theta; - } - - break; - } - case DRAWOP_DRAW_ARC: - { - double newX2 = m_x2*cosTheta - m_y2*sinTheta + x*(1.0 - cosTheta) + y*sinTheta; - double newY2 = m_x2*sinTheta + m_y2*cosTheta + y*(1.0 - cosTheta) + x*sinTheta; - double newX3 = m_x3*cosTheta - m_y3*sinTheta + x*(1.0 - cosTheta) + y*sinTheta; - double newY3 = m_x3*sinTheta + m_y3*cosTheta + y*(1.0 - cosTheta) + x*sinTheta; - - m_x1 = newX1; - m_y1 = newY1; - m_x2 = newX2; - m_y2 = newY2; - m_x3 = newX3; - m_y3 = newY3; - - break; - } - default: - break; - } -} - -wxExpr *wxOpDraw::WriteExpr(wxPseudoMetaFile *image) -{ - wxExpr *expr = new wxExpr(PrologList); - expr->Append(new wxExpr((long)m_op)); - switch (m_op) - { - case DRAWOP_DRAW_LINE: - case DRAWOP_DRAW_RECT: - case DRAWOP_DRAW_ELLIPSE: - { - expr->Append(new wxExpr(m_x1)); - expr->Append(new wxExpr(m_y1)); - expr->Append(new wxExpr(m_x2)); - expr->Append(new wxExpr(m_y2)); - break; - } - case DRAWOP_DRAW_ROUNDED_RECT: - { - expr->Append(new wxExpr(m_x1)); - expr->Append(new wxExpr(m_y1)); - expr->Append(new wxExpr(m_x2)); - expr->Append(new wxExpr(m_y2)); - expr->Append(new wxExpr(m_radius)); - break; - } - case DRAWOP_DRAW_POINT: - { - expr->Append(new wxExpr(m_x1)); - expr->Append(new wxExpr(m_y1)); - break; - } - case DRAWOP_DRAW_TEXT: - { - expr->Append(new wxExpr(m_x1)); - expr->Append(new wxExpr(m_y1)); - expr->Append(new wxExpr(PrologString, m_textString)); - break; - } - case DRAWOP_DRAW_ARC: - case DRAWOP_DRAW_ELLIPTIC_ARC: - { - expr->Append(new wxExpr(m_x1)); - expr->Append(new wxExpr(m_y1)); - expr->Append(new wxExpr(m_x2)); - expr->Append(new wxExpr(m_y2)); - expr->Append(new wxExpr(m_x3)); - expr->Append(new wxExpr(m_y3)); - break; - } - default: - { - break; - } - } - return expr; -} - -void wxOpDraw::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr) -{ - switch (m_op) - { - case DRAWOP_DRAW_LINE: - case DRAWOP_DRAW_RECT: - case DRAWOP_DRAW_ELLIPSE: - { - m_x1 = expr->Nth(1)->RealValue(); - m_y1 = expr->Nth(2)->RealValue(); - m_x2 = expr->Nth(3)->RealValue(); - m_y2 = expr->Nth(4)->RealValue(); - break; - } - case DRAWOP_DRAW_ROUNDED_RECT: - { - m_x1 = expr->Nth(1)->RealValue(); - m_y1 = expr->Nth(2)->RealValue(); - m_x2 = expr->Nth(3)->RealValue(); - m_y2 = expr->Nth(4)->RealValue(); - m_radius = expr->Nth(5)->RealValue(); - break; - } - case DRAWOP_DRAW_POINT: - { - m_x1 = expr->Nth(1)->RealValue(); - m_y1 = expr->Nth(2)->RealValue(); - break; - } - case DRAWOP_DRAW_TEXT: - { - m_x1 = expr->Nth(1)->RealValue(); - m_y1 = expr->Nth(2)->RealValue(); - wxString str(expr->Nth(3)->StringValue()); - m_textString = copystring((const char*) str); - break; - } - case DRAWOP_DRAW_ARC: - case DRAWOP_DRAW_ELLIPTIC_ARC: - { - m_x1 = expr->Nth(1)->RealValue(); - m_y1 = expr->Nth(2)->RealValue(); - m_x2 = expr->Nth(3)->RealValue(); - m_y2 = expr->Nth(4)->RealValue(); - m_x3 = expr->Nth(5)->RealValue(); - m_y3 = expr->Nth(6)->RealValue(); - break; - } - default: - { - break; - } - } -} - -/* - * Draw polygon, polyline, spline - * - */ - -wxOpPolyDraw::wxOpPolyDraw(int theOp, int n, wxRealPoint *thePoints):wxDrawOp(theOp) -{ - m_noPoints = n; - m_points = thePoints; -} - -wxOpPolyDraw::~wxOpPolyDraw() -{ - delete[] m_points; -} - -wxDrawOp *wxOpPolyDraw::Copy(wxPseudoMetaFile *newImage) -{ - wxRealPoint *newPoints = new wxRealPoint[m_noPoints]; - for (int i = 0; i < m_noPoints; i++) - { - newPoints[i].x = m_points[i].x; - newPoints[i].y = m_points[i].y; - } - wxOpPolyDraw *newOp = new wxOpPolyDraw(m_op, m_noPoints, newPoints); - return newOp; -} - -void wxOpPolyDraw::Do(wxDC& dc, double xoffset, double yoffset) -{ - switch (m_op) - { - case DRAWOP_DRAW_POLYLINE: - { - wxPoint *actualPoints = new wxPoint[m_noPoints]; - int i; - for (i = 0; i < m_noPoints; i++) - { - actualPoints[i].x = WXROUND(m_points[i].x); - actualPoints[i].y = WXROUND(m_points[i].y); - } - - dc.DrawLines(m_noPoints, actualPoints, WXROUND(xoffset), WXROUND(yoffset)); - - delete[] actualPoints; - break; - } - case DRAWOP_DRAW_POLYGON: - { - wxPoint *actualPoints = new wxPoint[m_noPoints]; - int i; - for (i = 0; i < m_noPoints; i++) - { - actualPoints[i].x = WXROUND(m_points[i].x); - actualPoints[i].y = WXROUND(m_points[i].y); - } - - dc.DrawPolygon(m_noPoints, actualPoints, WXROUND(xoffset), WXROUND(yoffset)); - - delete[] actualPoints; - break; - } - case DRAWOP_DRAW_SPLINE: - { - wxPoint *actualPoints = new wxPoint[m_noPoints]; - int i; - for (i = 0; i < m_noPoints; i++) - { - actualPoints[i].x = WXROUND(m_points[i].x); - actualPoints[i].y = WXROUND(m_points[i].y); - } - - dc.DrawSpline(m_noPoints, actualPoints); // no offsets in DrawSpline // , xoffset, yoffset); - - delete[] actualPoints; - break; - break; - } - default: - break; - } -} - -void wxOpPolyDraw::Scale(double scaleX, double scaleY) -{ - for (int i = 0; i < m_noPoints; i++) - { - m_points[i].x *= scaleX; - m_points[i].y *= scaleY; - } -} - -void wxOpPolyDraw::Translate(double x, double y) -{ - for (int i = 0; i < m_noPoints; i++) - { - m_points[i].x += x; - m_points[i].y += y; - } -} - -void wxOpPolyDraw::Rotate(double x, double y, double theta, double sinTheta, double cosTheta) -{ - for (int i = 0; i < m_noPoints; i++) - { - double x1 = m_points[i].x; - double y1 = m_points[i].y; - m_points[i].x = x1*cosTheta - y1*sinTheta + x*(1.0 - cosTheta) + y*sinTheta; - m_points[i].y = x1*sinTheta + y1*cosTheta + y*(1.0 - cosTheta) + x*sinTheta; - } -} - -wxExpr *wxOpPolyDraw::WriteExpr(wxPseudoMetaFile *image) -{ - wxExpr *expr = new wxExpr(PrologList); - expr->Append(new wxExpr((long)m_op)); - expr->Append(new wxExpr((long)m_noPoints)); - -// char buf1[9]; - char buf2[5]; - char buf3[5]; - - oglBuffer[0] = 0; - - /* - * Store each coordinate pair in a hex string to save space. - * E.g. "1B9080CD". 4 hex digits per coordinate pair. - * - */ - - for (int i = 0; i < m_noPoints; i++) - { - long signedX = (long)(m_points[i].x*100.0); - long signedY = (long)(m_points[i].y*100.0); - - // Scale to 0 -> 64K - long unSignedX = (long)(signedX + 32767.0); - long unSignedY = (long)(signedY + 32767.0); - -// IntToHex((unsigned int)signedX, buf2); -// IntToHex((unsigned int)signedY, buf3); - IntToHex((int)unSignedX, buf2); - IntToHex((int)unSignedY, buf3); - - // Don't overrun the buffer - if ((i*8) < 3000) - { - strcat(oglBuffer, buf2); - strcat(oglBuffer, buf3); - } - } - expr->Append(new wxExpr(PrologString, oglBuffer)); - return expr; -} - -void wxOpPolyDraw::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr) -{ - m_noPoints = (int)expr->Nth(1)->IntegerValue(); - - char buf1[5]; - char buf2[5]; - - m_points = new wxRealPoint[m_noPoints]; - int i = 0; - int bufPtr = 0; - wxString hexString = expr->Nth(2)->StringValue(); - while (i < m_noPoints) - { - buf1[0] = hexString[bufPtr]; - buf1[1] = hexString[bufPtr + 1]; - buf1[2] = hexString[bufPtr + 2]; - buf1[3] = hexString[bufPtr + 3]; - buf1[4] = 0; - - buf2[0] = hexString[bufPtr + 4]; - buf2[1] = hexString[bufPtr + 5]; - buf2[2] = hexString[bufPtr + 6]; - buf2[3] = hexString[bufPtr + 7]; - buf2[4] = 0; - - bufPtr += 8; - -// int signedX = (signed int)HexToInt(buf1); -// int signedY = (signed int)HexToInt(buf2); - long unSignedX = HexToInt(buf1); - long unSignedY = HexToInt(buf2); - // Scale -32K -> +32K - long signedX = unSignedX - 32767; - long signedY = unSignedY - 32767; -#ifdef __WXMSW__ - int testX = (signed int)unSignedX; - int testY = (signed int)unSignedY; -#endif - - m_points[i].x = (double)(signedX / 100.0); - m_points[i].y = (double)(signedY / 100.0); - - i ++; - } -} - -// Draw an outline using the current operation. -bool wxOpPolyDraw::OnDrawOutline(wxDC& dc, double x, double y, double w, double h, double oldW, double oldH) -{ - dc.SetBrush(wxTRANSPARENT_BRUSH); - - // Multiply all points by proportion of new size to old size - double x_proportion = (double)(fabs(w/oldW)); - double y_proportion = (double)(fabs(h/oldH)); - - int n = m_noPoints; - wxPoint *intPoints = new wxPoint[n]; - int i; - for (i = 0; i < n; i++) - { - intPoints[i].x = WXROUND (x_proportion * m_points[i].x); - intPoints[i].y = WXROUND (y_proportion * m_points[i].y); - } - dc.DrawPolygon(n, intPoints, x, y); - delete[] intPoints; - return TRUE; -} - -// Assume (x1, y1) is centre of box (most generally, line end at box) -bool wxOpPolyDraw::GetPerimeterPoint(double x1, double y1, - double x2, double y2, - double *x3, double *y3, - double xOffset, double yOffset, - bool attachmentMode) -{ - int n = m_noPoints; - - // First check for situation where the line is vertical, - // and we would want to connect to a point on that vertical -- - // oglFindEndForPolyline can't cope with this (the arrow - // gets drawn to the wrong place). - if ((!attachmentMode) && (x1 == x2)) - { - // Look for the point we'd be connecting to. This is - // a heuristic... - int i; - for (i = 0; i < n; i++) - { - wxRealPoint *point = & (m_points[i]); - if (point->x == 0.0) - { - if ((y2 > y1) && (point->y > 0.0)) - { - *x3 = point->x + xOffset; - *y3 = point->y + yOffset; - return TRUE; - } - else if ((y2 < y1) && (point->y < 0.0)) - { - *x3 = point->x + xOffset; - *y3 = point->y + yOffset; - return TRUE; - } - } - } - } - - double *xpoints = new double[n]; - double *ypoints = new double[n]; - - int i = 0; - for (i = 0; i < n; i++) - { - wxRealPoint *point = & (m_points[i]); - xpoints[i] = point->x + xOffset; - ypoints[i] = point->y + yOffset; - } - - oglFindEndForPolyline(n, xpoints, ypoints, - x1, y1, x2, y2, x3, y3); - - delete[] xpoints; - delete[] ypoints; - - return TRUE; -} - - -/* - * Utilities - * - */ - -static char hexArray[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', - 'C', 'D', 'E', 'F' }; - -// Convert unsigned 16-bit integer to 4-character hex string -static void IntToHex(unsigned int dec, char *buf) -{ - int digit1 = (int)(dec/4096); - int digit2 = (int)((dec - (digit1*4096))/256); - int digit3 = (int)((dec - (digit1*4096) - (digit2*256))/16); - int digit4 = dec - (digit1*4096 + digit2*256 + digit3*16); - - buf[0] = hexArray[digit1]; - buf[1] = hexArray[digit2]; - buf[2] = hexArray[digit3]; - buf[3] = hexArray[digit4]; - buf[4] = 0; -} - -// One hex digit to decimal number -static int HexToInt1(char hex) -{ - switch (hex) - { - case '0': - return 0; - case '1': - return 1; - case '2': - return 2; - case '3': - return 3; - case '4': - return 4; - case '5': - return 5; - case '6': - return 6; - case '7': - return 7; - case '8': - return 8; - case '9': - return 9; - case 'A': - return 10; - case 'B': - return 11; - case 'C': - return 12; - case 'D': - return 13; - case 'E': - return 14; - case 'F': - return 15; - default: - return 0; - } - return 0; -} - -// 4-digit hex string to unsigned integer -static unsigned long HexToInt(char *buf) -{ - long d1 = (long)(HexToInt1(buf[0])*4096.0) ; - long d2 = (long)(HexToInt1(buf[1])*256.0) ; - long d3 = (long)(HexToInt1(buf[2])*16.0) ; - long d4 = (long)(HexToInt1(buf[3])) ; - unsigned long n = (long)(d1 + d2 + d3 + d4) ; - return n; -} - -/* - * wxPseudo meta-file - * - */ - -IMPLEMENT_DYNAMIC_CLASS(wxPseudoMetaFile, wxObject) - -wxPseudoMetaFile::wxPseudoMetaFile() -{ - m_currentRotation = 0; - m_rotateable = TRUE; - m_width = 0.0; - m_height = 0.0; - m_outlinePen = NULL; - m_fillBrush = NULL; - m_outlineOp = -1; -} - -wxPseudoMetaFile::wxPseudoMetaFile(wxPseudoMetaFile& mf) -{ - mf.Copy(*this); -} - -wxPseudoMetaFile::~wxPseudoMetaFile() -{ - Clear(); -} - -void wxPseudoMetaFile::Clear() -{ - wxNode *node = m_ops.First(); - while (node) - { - wxDrawOp *op = (wxDrawOp *)node->Data(); - delete op; - node = node->Next(); - } - m_ops.Clear(); - m_gdiObjects.Clear(); - m_outlineColours.Clear(); - m_fillColours.Clear(); - m_outlineOp = -1; -} - -void wxPseudoMetaFile::Draw(wxDC& dc, double xoffset, double yoffset) -{ - wxNode *node = m_ops.First(); - while (node) - { - wxDrawOp *op = (wxDrawOp *)node->Data(); - op->Do(dc, xoffset, yoffset); - node = node->Next(); - } -} - -void wxPseudoMetaFile::Scale(double sx, double sy) -{ - wxNode *node = m_ops.First(); - while (node) - { - wxDrawOp *op = (wxDrawOp *)node->Data(); - op->Scale(sx, sy); - node = node->Next(); - } - m_width *= sx; - m_height *= sy; -} - -void wxPseudoMetaFile::Translate(double x, double y) -{ - wxNode *node = m_ops.First(); - while (node) - { - wxDrawOp *op = (wxDrawOp *)node->Data(); - op->Translate(x, y); - node = node->Next(); - } -} - -void wxPseudoMetaFile::Rotate(double x, double y, double theta) -{ - double theta1 = theta-m_currentRotation; - if (theta1 == 0.0) return; - double cosTheta = (double)cos(theta1); - double sinTheta = (double)sin(theta1); - - wxNode *node = m_ops.First(); - while (node) - { - wxDrawOp *op = (wxDrawOp *)node->Data(); - op->Rotate(x, y, theta, sinTheta, cosTheta); - node = node->Next(); - } - m_currentRotation = theta; -} - -#ifdef PROLOGIO -void wxPseudoMetaFile::WritePrologAttributes(wxExpr *clause, int whichAngle) -{ - wxString widthStr; - widthStr.Printf("meta_width%d", whichAngle); - - wxString heightStr; - heightStr.Printf("meta_height%d", whichAngle); - - wxString outlineStr; - outlineStr.Printf("outline_op%d", whichAngle); - - wxString rotateableStr; - rotateableStr.Printf("meta_rotateable%d", whichAngle); - - // Write width and height - clause->AddAttributeValue(widthStr, m_width); - clause->AddAttributeValue(heightStr, m_height); - clause->AddAttributeValue(rotateableStr, (long)m_rotateable); - clause->AddAttributeValue(outlineStr, (long)m_outlineOp); - - // Write GDI objects - char buf[50]; - int i = 1; - wxNode *node = m_gdiObjects.First(); - while (node) - { - sprintf(buf, "gdi%d_%d", whichAngle, i); - wxObject *obj = (wxObject *)node->Data(); - wxExpr *expr = NULL; - if (obj) - { - if (obj->IsKindOf(CLASSINFO(wxPen))) - { - wxPen *thePen = (wxPen *)obj; - expr = new wxExpr(PrologList); - expr->Append(new wxExpr((long)gyTYPE_PEN)); - expr->Append(new wxExpr((long)thePen->GetWidth())); - expr->Append(new wxExpr((long)thePen->GetStyle())); - expr->Append(new wxExpr((long)thePen->GetColour().Red())); - expr->Append(new wxExpr((long)thePen->GetColour().Green())); - expr->Append(new wxExpr((long)thePen->GetColour().Blue())); - } - else if (obj->IsKindOf(CLASSINFO(wxBrush))) - { - wxBrush *theBrush = (wxBrush *)obj; - expr = new wxExpr(PrologList); - expr->Append(new wxExpr((long)gyTYPE_BRUSH)); - expr->Append(new wxExpr((long)theBrush->GetStyle())); - expr->Append(new wxExpr((long)theBrush->GetColour().Red())); - expr->Append(new wxExpr((long)theBrush->GetColour().Green())); - expr->Append(new wxExpr((long)theBrush->GetColour().Blue())); - } - else if (obj->IsKindOf(CLASSINFO(wxFont))) - { - wxFont *theFont = (wxFont *)obj; - expr = new wxExpr(PrologList); - expr->Append(new wxExpr((long)gyTYPE_FONT)); - expr->Append(new wxExpr((long)theFont->GetPointSize())); - expr->Append(new wxExpr((long)theFont->GetFamily())); - expr->Append(new wxExpr((long)theFont->GetStyle())); - expr->Append(new wxExpr((long)theFont->GetWeight())); - expr->Append(new wxExpr((long)theFont->GetUnderlined())); - } - } - else - { - // If no recognised GDI object, append a place holder anyway. - expr = new wxExpr(PrologList); - expr->Append(new wxExpr((long)0)); - } - - if (expr) - { - clause->AddAttributeValue(buf, expr); - i ++; - } - node = node->Next(); - } - - // Write drawing operations - i = 1; - node = m_ops.First(); - while (node) - { - sprintf(buf, "op%d_%d", whichAngle, i); - wxDrawOp *op = (wxDrawOp *)node->Data(); - wxExpr *expr = op->WriteExpr(this); - if (expr) - { - clause->AddAttributeValue(buf, expr); - i ++; - } - node = node->Next(); - } - - // Write outline and fill GDI op lists (if any) - if (m_outlineColours.Number() > 0) - { - wxExpr *outlineExpr = new wxExpr(PrologList); - node = m_outlineColours.First(); - while (node) - { - outlineExpr->Append(new wxExpr((long)node->Data())); - node = node->Next(); - } - wxString outlineObjectsStr; - outlineObjectsStr.Printf("outline_objects%d", whichAngle); - - clause->AddAttributeValue(outlineObjectsStr, outlineExpr); - } - if (m_fillColours.Number() > 0) - { - wxExpr *fillExpr = new wxExpr(PrologList); - node = m_fillColours.First(); - while (node) - { - fillExpr->Append(new wxExpr((long)node->Data())); - node = node->Next(); - } - wxString fillObjectsStr; - fillObjectsStr.Printf("fill_objects%d", whichAngle); - - clause->AddAttributeValue(fillObjectsStr, fillExpr); - } - -} - -void wxPseudoMetaFile::ReadPrologAttributes(wxExpr *clause, int whichAngle) -{ - wxString widthStr; - widthStr.Printf("meta_width%d", whichAngle); - - wxString heightStr; - heightStr.Printf("meta_height%d", whichAngle); - - wxString outlineStr; - outlineStr.Printf("outline_op%d", whichAngle); - - wxString rotateableStr; - rotateableStr.Printf("meta_rotateable%d", whichAngle); - - clause->GetAttributeValue(widthStr, m_width); - clause->GetAttributeValue(heightStr, m_height); - clause->GetAttributeValue(outlineStr, m_outlineOp); - - int iVal = (int) m_rotateable; - clause->GetAttributeValue(rotateableStr, iVal); - m_rotateable = (iVal != 0); - - // Read GDI objects - char buf[50]; - int i = 1; - bool keepGoing = TRUE; - while (keepGoing) - { - sprintf(buf, "gdi%d_%d", whichAngle, i); - wxExpr *expr = NULL; - clause->GetAttributeValue(buf, &expr); - if (!expr) - { - keepGoing = FALSE; - } - else - { - wxExpr *idExpr = expr->Nth(0); - switch (idExpr->IntegerValue()) - { - case gyTYPE_PEN: - { - int penWidth = (int)expr->Nth(1)->IntegerValue(); - int penStyle = (int)expr->Nth(2)->IntegerValue(); - int penRed = (int)expr->Nth(3)->IntegerValue(); - int penGreen = (int)expr->Nth(4)->IntegerValue(); - int penBlue = (int)expr->Nth(5)->IntegerValue(); - wxColour col(penRed, penGreen, penBlue); - wxPen *p = wxThePenList->FindOrCreatePen(col, penWidth, penStyle); - if (!p) - p = wxBLACK_PEN; - m_gdiObjects.Append(p); - break; - } - case gyTYPE_BRUSH: - { - int brushStyle = (int)expr->Nth(1)->IntegerValue(); - int brushRed = (int)expr->Nth(2)->IntegerValue(); - int brushGreen = (int)expr->Nth(3)->IntegerValue(); - int brushBlue = (int)expr->Nth(4)->IntegerValue(); - wxColour col(brushRed, brushGreen, brushBlue); - wxBrush *b = wxTheBrushList->FindOrCreateBrush(col, brushStyle); - if (!b) - b = wxWHITE_BRUSH; - m_gdiObjects.Append(b); - break; - } - case gyTYPE_FONT: - { - int fontPointSize = (int)expr->Nth(1)->IntegerValue(); - int fontFamily = (int)expr->Nth(2)->IntegerValue(); - int fontStyle = (int)expr->Nth(3)->IntegerValue(); - int fontWeight = (int)expr->Nth(4)->IntegerValue(); - int fontUnderlined = (int)expr->Nth(5)->IntegerValue(); - m_gdiObjects.Append(wxTheFontList->FindOrCreateFont(fontPointSize, - fontFamily, fontStyle, fontWeight, (fontUnderlined != 0))); - break; - } - default: - { - // Place holder - m_gdiObjects.Append(NULL); - break; - } - } - i ++; - } - } - - // Now read in the operations - keepGoing = TRUE; - i = 1; - while (keepGoing) - { - sprintf(buf, "op%d_%d", whichAngle, i); - wxExpr *expr = NULL; - clause->GetAttributeValue(buf, &expr); - if (!expr) - { - keepGoing = FALSE; - } - else - { - wxExpr *idExpr = expr->Nth(0); - int opId = (int)idExpr->IntegerValue(); - switch (opId) - { - case DRAWOP_SET_PEN: - case DRAWOP_SET_BRUSH: - case DRAWOP_SET_FONT: - case DRAWOP_SET_TEXT_COLOUR: - case DRAWOP_SET_BK_COLOUR: - case DRAWOP_SET_BK_MODE: - { - wxOpSetGDI *theOp = new wxOpSetGDI(opId, this, 0); - theOp->ReadExpr(this, expr); - m_ops.Append(theOp); - break; - } - - case DRAWOP_SET_CLIPPING_RECT: - case DRAWOP_DESTROY_CLIPPING_RECT: - { - wxOpSetClipping *theOp = new wxOpSetClipping(opId, 0.0, 0.0, 0.0, 0.0); - theOp->ReadExpr(this, expr); - m_ops.Append(theOp); - break; - } - - case DRAWOP_DRAW_LINE: - case DRAWOP_DRAW_RECT: - case DRAWOP_DRAW_ROUNDED_RECT: - case DRAWOP_DRAW_ELLIPSE: - case DRAWOP_DRAW_POINT: - case DRAWOP_DRAW_ARC: - case DRAWOP_DRAW_TEXT: - { - wxOpDraw *theOp = new wxOpDraw(opId, 0.0, 0.0, 0.0, 0.0); - theOp->ReadExpr(this, expr); - m_ops.Append(theOp); - break; - } - case DRAWOP_DRAW_SPLINE: - case DRAWOP_DRAW_POLYLINE: - case DRAWOP_DRAW_POLYGON: - { - wxOpPolyDraw *theOp = new wxOpPolyDraw(opId, 0, NULL); - theOp->ReadExpr(this, expr); - m_ops.Append(theOp); - break; - } - default: - break; - } - } - i ++; - } - - wxString outlineObjectsStr; - outlineObjectsStr.Printf("outline_objects%d", whichAngle); - - // Now read in the list of outline and fill operations, if any - wxExpr *expr1 = clause->AttributeValue(outlineObjectsStr); - if (expr1) - { - wxExpr *eachExpr = expr1->GetFirst(); - while (eachExpr) - { - m_outlineColours.Append((wxObject *)eachExpr->IntegerValue()); - eachExpr = eachExpr->GetNext(); - } - } - - wxString fillObjectsStr; - fillObjectsStr.Printf("fill_objects%d", whichAngle); - - expr1 = clause->AttributeValue(fillObjectsStr); - if (expr1) - { - wxExpr *eachExpr = expr1->GetFirst(); - while (eachExpr) - { - m_fillColours.Append((wxObject *)eachExpr->IntegerValue()); - eachExpr = eachExpr->GetNext(); - } - } -} -#endif - -// Does the copying for this object -void wxPseudoMetaFile::Copy(wxPseudoMetaFile& copy) -{ - copy.Clear(); - - copy.m_currentRotation = m_currentRotation; - copy.m_width = m_width; - copy.m_height = m_height; - copy.m_rotateable = m_rotateable; - copy.m_fillBrush = m_fillBrush; - copy.m_outlinePen = m_outlinePen; - copy.m_outlineOp = m_outlineOp; - - // Copy the GDI objects - wxNode *node = m_gdiObjects.First(); - while (node) - { - wxObject *obj = (wxObject *)node->Data(); - copy.m_gdiObjects.Append(obj); - node = node->Next(); - } - - // Copy the operations - node = m_ops.First(); - while (node) - { - wxDrawOp *op = (wxDrawOp *)node->Data(); - copy.m_ops.Append(op->Copy(©)); - node = node->Next(); - } - - // Copy the outline/fill operations - node = m_outlineColours.First(); - while (node) - { - copy.m_outlineColours.Append((wxObject *)node->Data()); - node = node->Next(); - } - node = m_fillColours.First(); - while (node) - { - copy.m_fillColours.Append((wxObject *)node->Data()); - node = node->Next(); - } -} - -/* - * Pass size of existing image; scale height to - * fit width and return new width and height. - * - */ - -bool wxPseudoMetaFile::LoadFromMetaFile(char *filename, double *rwidth, double *rheight) -{ - if (!FileExists(filename)) - return NULL; - - wxXMetaFile *metaFile = new wxXMetaFile; - - if (!metaFile->ReadFile(filename)) - { - delete metaFile; - return FALSE; - } - - double lastX = 0.0; - double lastY = 0.0; - - // Convert from metafile records to wxDrawnShape records - wxNode *node = metaFile->metaRecords.First(); - while (node) - { - wxMetaRecord *record = (wxMetaRecord *)node->Data(); - switch (record->metaFunction) - { - case META_SETBKCOLOR: - { - wxOpSetGDI *op = new wxOpSetGDI(DRAWOP_SET_BK_COLOUR, this, 0); - op->m_r = (unsigned char)record->param1; - op->m_g = (unsigned char)record->param2; - op->m_b = (unsigned char)record->param3; - m_ops.Append(op); - break; - } - case META_SETBKMODE: - { - wxOpSetGDI *op = new wxOpSetGDI(DRAWOP_SET_BK_MODE, this, 0, (int)record->param1); - m_ops.Append(op); - break; - } - case META_SETMAPMODE: - { - break; - } -// case META_SETROP2: -// case META_SETRELABS: -// case META_SETPOLYFILLMODE: -// case META_SETSTRETCHBLTMODE: -// case META_SETTEXTCHAREXTRA: - case META_SETTEXTCOLOR: - { - wxOpSetGDI *op = new wxOpSetGDI(DRAWOP_SET_TEXT_COLOUR, this, 0); - op->m_r = (unsigned char)record->param1; - op->m_g = (unsigned char)record->param2; - op->m_b = (unsigned char)record->param3; - m_ops.Append(op); - break; - } -// case META_SETTEXTJUSTIFICATION: -// case META_SETWINDOWORG: -// case META_SETWINDOWEXT: -// case META_SETVIEWPORTORG: -// case META_SETVIEWPORTEXT: -// case META_OFFSETWINDOWORG: -// case META_SCALEWINDOWEXT: -// case META_OFFSETVIEWPORTORG: -// case META_SCALEVIEWPORTEXT: - case META_LINETO: - { - wxOpDraw *op = new wxOpDraw(DRAWOP_DRAW_LINE, (double)lastX, (double)lastY, - (double)record->param1, (double)record->param2); - m_ops.Append(op); - break; - } - case META_MOVETO: - { - lastX = (double)record->param1; - lastY = (double)record->param2; - break; - } - case META_EXCLUDECLIPRECT: - { -/* - wxMetaRecord *rec = new wxMetaRecord(META_EXCLUDECLIPRECT); - rec->param4 = getshort(handle); // m_y2 - rec->param3 = getshort(handle); // x2 - rec->param2 = getshort(handle); // y1 - rec->param1 = getshort(handle); // x1 -*/ - break; - } - case META_INTERSECTCLIPRECT: - { -/* - rec->param4 = getshort(handle); // m_y2 - rec->param3 = getshort(handle); // x2 - rec->param2 = getshort(handle); // y1 - rec->param1 = getshort(handle); // x1 -*/ - break; - } -// case META_ARC: // DO!!! - case META_ELLIPSE: - { - wxOpDraw *op = new wxOpDraw(DRAWOP_DRAW_ELLIPSE, - (double)record->param1, (double)record->param2, - (double)(record->param3 - record->param1), - (double)(record->param4 - record->param2)); - m_ops.Append(op); - break; - } -// case META_FLOODFILL: -// case META_PIE: // DO!!! - case META_RECTANGLE: - { - wxOpDraw *op = new wxOpDraw(DRAWOP_DRAW_RECT, - (double)record->param1, (double)record->param2, - (double)(record->param3 - record->param1), - (double)(record->param4 - record->param2)); - m_ops.Append(op); - break; - } - case META_ROUNDRECT: - { - wxOpDraw *op = new wxOpDraw(DRAWOP_DRAW_ROUNDED_RECT, - (double)record->param1, (double)record->param2, - (double)(record->param3 - record->param1), - (double)(record->param4 - record->param2), (double)record->param5); - m_ops.Append(op); - break; - } -// case META_PATBLT: -// case META_SAVEDC: - case META_SETPIXEL: - { - wxOpDraw *op = new wxOpDraw(DRAWOP_DRAW_POINT, - (double)record->param1, (double)record->param2, - 0.0, 0.0); - -// SHOULD SET THE COLOUR - SET PEN? -// rec->param3 = getint(handle); // COLORREF - m_ops.Append(op); - break; - } -// case META_OFFSETCLIPRGN: - case META_TEXTOUT: - { - wxOpDraw *op = new wxOpDraw(DRAWOP_DRAW_TEXT, - (double)record->param1, (double)record->param2, - 0.0, 0.0, 0.0, record->stringParam); - m_ops.Append(op); - break; - } -// case META_BITBLT: -// case META_STRETCHBLT: - case META_POLYGON: - { - int n = (int)record->param1; - wxRealPoint *newPoints = new wxRealPoint[n]; - for (int i = 0; i < n; i++) - { - newPoints[i].x = record->points[i].x; - newPoints[i].y = record->points[i].y; - } - - wxOpPolyDraw *op = new wxOpPolyDraw(DRAWOP_DRAW_POLYGON, n, newPoints); - m_ops.Append(op); - break; - } - case META_POLYLINE: - { - int n = (int)record->param1; - wxRealPoint *newPoints = new wxRealPoint[n]; - for (int i = 0; i < n; i++) - { - newPoints[i].x = record->points[i].x; - newPoints[i].y = record->points[i].y; - } - - wxOpPolyDraw *op = new wxOpPolyDraw(DRAWOP_DRAW_POLYLINE, n, newPoints); - m_ops.Append(op); - break; - } -// case META_ESCAPE: -// case META_RESTOREDC: -// case META_FILLREGION: -// case META_FRAMEREGION: -// case META_INVERTREGION: -// case META_PAINTREGION: -// case META_SELECTCLIPREGION: // DO THIS! - case META_SELECTOBJECT: - { - // The pen, brush etc. has already been created when the metafile - // was read in, so we don't create it - we set it. - wxNode *recNode = metaFile->gdiObjects.Nth((int)record->param2); - if (recNode) - { - wxMetaRecord *gdiRec = (wxMetaRecord *)recNode->Data(); - if (gdiRec && (gdiRec->param1 != 0)) - { - wxObject *obj = (wxObject *)gdiRec->param1; - if (obj->IsKindOf(CLASSINFO(wxPen))) - { - wxOpSetGDI *op = new wxOpSetGDI(DRAWOP_SET_PEN, this, (int)record->param2); - m_ops.Append(op); - } - else if (obj->IsKindOf(CLASSINFO(wxBrush))) - { - wxOpSetGDI *op = new wxOpSetGDI(DRAWOP_SET_BRUSH, this, (int)record->param2); - m_ops.Append(op); - } - else if (obj->IsKindOf(CLASSINFO(wxFont))) - { - wxOpSetGDI *op = new wxOpSetGDI(DRAWOP_SET_FONT, this, (int)record->param2); - m_ops.Append(op); - } - } - } - break; - } -// case META_SETTEXTALIGN: -// case META_DRAWTEXT: -// case META_CHORD: -// case META_SETMAPPERFLAGS: -// case META_EXTTEXTOUT: -// case META_SETDIBTODEV: -// case META_SELECTPALETTE: -// case META_REALIZEPALETTE: -// case META_ANIMATEPALETTE: -// case META_SETPALENTRIES: -// case META_POLYPOLYGON: -// case META_RESIZEPALETTE: -// case META_DIBBITBLT: -// case META_DIBSTRETCHBLT: - case META_DIBCREATEPATTERNBRUSH: - { - // Place holder - m_gdiObjects.Append(NULL); - break; - } -// case META_STRETCHDIB: -// case META_EXTFLOODFILL: -// case META_RESETDC: -// case META_STARTDOC: -// case META_STARTPAGE: -// case META_ENDPAGE: -// case META_ABORTDOC: -// case META_ENDDOC: -// case META_DELETEOBJECT: // DO!! - case META_CREATEPALETTE: - { - // Place holder - m_gdiObjects.Append(NULL); - break; - } - case META_CREATEBRUSH: - { - // Place holder - m_gdiObjects.Append(NULL); - break; - } - case META_CREATEPATTERNBRUSH: - { - // Place holder - m_gdiObjects.Append(NULL); - break; - } - case META_CREATEPENINDIRECT: - { - // The pen is created when the metafile is read in. - // We keep track of all the GDI objects needed for this - // image so when reading the wxDrawnShape from file, - // we can read in all the GDI objects, then refer - // to them by an index starting from zero thereafter. - m_gdiObjects.Append((wxObject *)record->param1); - break; - } - case META_CREATEFONTINDIRECT: - { - m_gdiObjects.Append((wxObject *)record->param1); - break; - } - case META_CREATEBRUSHINDIRECT: - { - // Don't have to do anything here: the pen is created - // when the metafile is read in. - m_gdiObjects.Append((wxObject *)record->param1); - break; - } - case META_CREATEBITMAPINDIRECT: - { - // Place holder - m_gdiObjects.Append(NULL); - break; - } - case META_CREATEBITMAP: - { - // Place holder - m_gdiObjects.Append(NULL); - break; - } - case META_CREATEREGION: - { - // Place holder - m_gdiObjects.Append(NULL); - break; - } - default: - { - break; - } - } - node = node->Next(); - } - double actualWidth = (double)fabs(metaFile->right - metaFile->left); - double actualHeight = (double)fabs(metaFile->bottom - metaFile->top); - - double initialScaleX = 1.0; - double initialScaleY = 1.0; - - double xoffset, yoffset; - - // Translate so origin is at centre of rectangle - if (metaFile->bottom > metaFile->top) - yoffset = - (double)((metaFile->bottom - metaFile->top)/2.0); - else - yoffset = - (double)((metaFile->top - metaFile->bottom)/2.0); - - if (metaFile->right > metaFile->left) - xoffset = - (double)((metaFile->right - metaFile->left)/2.0); - else - xoffset = - (double)((metaFile->left - metaFile->right)/2.0); - - Translate(xoffset, yoffset); - - // Scale to a reasonable size (take the width of this wxDrawnShape - // as a guide) - if (actualWidth != 0.0) - { - initialScaleX = (double)((*rwidth) / actualWidth); - initialScaleY = initialScaleX; - (*rheight) = initialScaleY*actualHeight; - } - Scale(initialScaleX, initialScaleY); - - m_width = (actualWidth*initialScaleX); - m_height = *rheight; - - delete metaFile; - return TRUE; -} - -// Scale to fit size -void wxPseudoMetaFile::ScaleTo(double w, double h) -{ - double scaleX = (double)(w/m_width); - double scaleY = (double)(h/m_height); - - // Do the scaling - Scale(scaleX, scaleY); -} - -void wxPseudoMetaFile::GetBounds(double *boundMinX, double *boundMinY, double *boundMaxX, double *boundMaxY) -{ - double maxX = (double) -99999.9; - double maxY = (double) -99999.9; - double minX = (double) 99999.9; - double minY = (double) 99999.9; - - wxNode *node = m_ops.First(); - while (node) - { - wxDrawOp *op = (wxDrawOp *)node->Data(); - switch (op->GetOp()) - { - case DRAWOP_DRAW_LINE: - case DRAWOP_DRAW_RECT: - case DRAWOP_DRAW_ROUNDED_RECT: - case DRAWOP_DRAW_ELLIPSE: - case DRAWOP_DRAW_POINT: - case DRAWOP_DRAW_TEXT: - { - wxOpDraw *opDraw = (wxOpDraw *)op; - if (opDraw->m_x1 < minX) minX = opDraw->m_x1; - if (opDraw->m_x1 > maxX) maxX = opDraw->m_x1; - if (opDraw->m_y1 < minY) minY = opDraw->m_y1; - if (opDraw->m_y1 > maxY) maxY = opDraw->m_y1; - if (op->GetOp() == DRAWOP_DRAW_LINE) - { - if (opDraw->m_x2 < minX) minX = opDraw->m_x2; - if (opDraw->m_x2 > maxX) maxX = opDraw->m_x2; - if (opDraw->m_y2 < minY) minY = opDraw->m_y2; - if (opDraw->m_y2 > maxY) maxY = opDraw->m_y2; - } - else if (op->GetOp() == DRAWOP_DRAW_RECT || - op->GetOp() == DRAWOP_DRAW_ROUNDED_RECT || - op->GetOp() == DRAWOP_DRAW_ELLIPSE) - { - if ((opDraw->m_x1 + opDraw->m_x2) < minX) minX = (opDraw->m_x1 + opDraw->m_x2); - if ((opDraw->m_x1 + opDraw->m_x2) > maxX) maxX = (opDraw->m_x1 + opDraw->m_x2); - if ((opDraw->m_y1 + opDraw->m_y2) < minY) minY = (opDraw->m_y1 + opDraw->m_y2); - if ((opDraw->m_y1 + opDraw->m_y2) > maxY) maxY = (opDraw->m_y1 + opDraw->m_y2); - } - break; - } - case DRAWOP_DRAW_ARC: - { - // TODO: don't yet know how to calculate the bounding box - // for an arc. So pretend it's a line; to get a correct - // bounding box, draw a blank rectangle first, of the correct - // size. - wxOpDraw *opDraw = (wxOpDraw *)op; - if (opDraw->m_x1 < minX) minX = opDraw->m_x1; - if (opDraw->m_x1 > maxX) maxX = opDraw->m_x1; - if (opDraw->m_y1 < minY) minY = opDraw->m_y1; - if (opDraw->m_y1 > maxY) maxY = opDraw->m_y1; - if (opDraw->m_x2 < minX) minX = opDraw->m_x2; - if (opDraw->m_x2 > maxX) maxX = opDraw->m_x2; - if (opDraw->m_y2 < minY) minY = opDraw->m_y2; - if (opDraw->m_y2 > maxY) maxY = opDraw->m_y2; - break; - } - case DRAWOP_DRAW_POLYLINE: - case DRAWOP_DRAW_POLYGON: - case DRAWOP_DRAW_SPLINE: - { - wxOpPolyDraw *poly = (wxOpPolyDraw *)op; - for (int i = 0; i < poly->m_noPoints; i++) - { - if (poly->m_points[i].x < minX) minX = poly->m_points[i].x; - if (poly->m_points[i].x > maxX) maxX = poly->m_points[i].x; - if (poly->m_points[i].y < minY) minY = poly->m_points[i].y; - if (poly->m_points[i].y > maxY) maxY = poly->m_points[i].y; - } - break; - } - default: - break; - } - node = node->Next(); - } - - *boundMinX = minX; - *boundMinY = minY; - *boundMaxX = maxX; - *boundMaxY = maxY; -/* - *w = (double)fabs(maxX - minX); - *h = (double)fabs(maxY - minY); -*/ -} - -// Calculate size from current operations -void wxPseudoMetaFile::CalculateSize(wxDrawnShape* shape) -{ - double boundMinX, boundMinY, boundMaxX, boundMaxY; - - GetBounds(& boundMinX, & boundMinY, & boundMaxX, & boundMaxY); - - SetSize(boundMaxX - boundMinX, boundMaxY - boundMinY); - - if (shape) - { - shape->SetWidth(m_width); - shape->SetHeight(m_height); - } -} - -// Set of functions for drawing into a pseudo metafile. -// They use integers, but doubles are used internally for accuracy -// when scaling. - -void wxPseudoMetaFile::DrawLine(const wxPoint& pt1, const wxPoint& pt2) -{ - wxOpDraw *theOp = new wxOpDraw(DRAWOP_DRAW_LINE, - (double) pt1.x, (double) pt1.y, (double) pt2.x, (double) pt2.y); - - m_ops.Append(theOp); -} - -void wxPseudoMetaFile::DrawRectangle(const wxRect& rect) -{ - wxOpDraw *theOp = new wxOpDraw(DRAWOP_DRAW_RECT, - (double) rect.x, (double) rect.y, (double) rect.width, (double) rect.height); - - m_ops.Append(theOp); -} - -void wxPseudoMetaFile::DrawRoundedRectangle(const wxRect& rect, double radius) -{ - wxOpDraw *theOp = new wxOpDraw(DRAWOP_DRAW_ROUNDED_RECT, - (double) rect.x, (double) rect.y, (double) rect.width, (double) rect.height); - - theOp->m_radius = radius; - - m_ops.Append(theOp); -} - -void wxPseudoMetaFile::DrawEllipse(const wxRect& rect) -{ - wxOpDraw *theOp = new wxOpDraw(DRAWOP_DRAW_ELLIPSE, - (double) rect.x, (double) rect.y, (double) rect.width, (double) rect.height); - - m_ops.Append(theOp); -} - -void wxPseudoMetaFile::DrawArc(const wxPoint& centrePt, const wxPoint& startPt, const wxPoint& endPt) -{ - wxOpDraw *theOp = new wxOpDraw(DRAWOP_DRAW_ARC, - (double) centrePt.x, (double) centrePt.y, (double) startPt.x, (double) startPt.y); - - theOp->m_x3 = (double) endPt.x; - theOp->m_y3 = (double) endPt.y; - - m_ops.Append(theOp); -} - -void wxPseudoMetaFile::DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle) -{ - const double pi = 3.1415926535897932384626433832795 ; - - double startAngleRadians = startAngle* (pi*2.0/360.0); - double endAngleRadians = endAngle* (pi*2.0/360.0); - - wxOpDraw *theOp = new wxOpDraw(DRAWOP_DRAW_ELLIPTIC_ARC, - (double) rect.x, (double) rect.y, (double) rect.width, (double) rect.height); - - theOp->m_x3 = startAngleRadians; - theOp->m_y3 = endAngleRadians; - - m_ops.Append(theOp); -} - -void wxPseudoMetaFile::DrawPoint(const wxPoint& pt) -{ - wxOpDraw *theOp = new wxOpDraw(DRAWOP_DRAW_POINT, - (double) pt.x, (double) pt.y, 0.0, 0.0); - - m_ops.Append(theOp); -} - -void wxPseudoMetaFile::DrawText(const wxString& text, const wxPoint& pt) -{ - wxOpDraw *theOp = new wxOpDraw(DRAWOP_DRAW_TEXT, - (double) pt.x, (double) pt.y, 0.0, 0.0); - - theOp->m_textString = copystring(text); - - m_ops.Append(theOp); -} - -void wxPseudoMetaFile::DrawLines(int n, wxPoint pts[]) -{ - wxRealPoint* realPoints = new wxRealPoint[n]; - int i; - for (i = 0; i < n; i++) - { - realPoints[i].x = pts[i].x; - realPoints[i].y = pts[i].y; - } - wxOpPolyDraw* theOp = new wxOpPolyDraw(DRAWOP_DRAW_POLYLINE, n, realPoints); - m_ops.Append(theOp); -} - -void wxPseudoMetaFile::DrawPolygon(int n, wxPoint pts[], int flags) -{ - wxRealPoint* realPoints = new wxRealPoint[n]; - int i; - for (i = 0; i < n; i++) - { - realPoints[i].x = pts[i].x; - realPoints[i].y = pts[i].y; - } - wxOpPolyDraw* theOp = new wxOpPolyDraw(DRAWOP_DRAW_POLYGON, n, realPoints); - m_ops.Append(theOp); - - if (flags & oglMETAFLAGS_OUTLINE) - m_outlineOp = (m_ops.Number() - 1); -} - -void wxPseudoMetaFile::DrawSpline(int n, wxPoint pts[]) -{ - wxRealPoint* realPoints = new wxRealPoint[n]; - int i; - for (i = 0; i < n; i++) - { - realPoints[i].x = pts[i].x; - realPoints[i].y = pts[i].y; - } - wxOpPolyDraw* theOp = new wxOpPolyDraw(DRAWOP_DRAW_SPLINE, n, realPoints); - m_ops.Append(theOp); -} - -void wxPseudoMetaFile::SetClippingRect(const wxRect& rect) -{ - wxOpSetClipping* theOp = new wxOpSetClipping(DRAWOP_SET_CLIPPING_RECT, - (double) rect.x, (double) rect.y, (double) rect.width, (double) rect.height); -} - -void wxPseudoMetaFile::DestroyClippingRect() -{ - wxOpSetClipping* theOp = new wxOpSetClipping(DRAWOP_DESTROY_CLIPPING_RECT, - 0.0, 0.0, 0.0, 0.0); - - m_ops.Append(theOp); -} - -void wxPseudoMetaFile::SetPen(wxPen* pen, bool isOutline) -{ - m_gdiObjects.Append(pen); - int n = m_gdiObjects.Number(); - - wxOpSetGDI* theOp = new wxOpSetGDI(DRAWOP_SET_PEN, this, n - 1); - - m_ops.Append(theOp); - - if (isOutline) - { - m_outlineColours.Append((wxObject*) (n - 1)); - } -} - -void wxPseudoMetaFile::SetBrush(wxBrush* brush, bool isFill) -{ - m_gdiObjects.Append(brush); - int n = m_gdiObjects.Number(); - - wxOpSetGDI* theOp = new wxOpSetGDI(DRAWOP_SET_BRUSH, this, n - 1); - - m_ops.Append(theOp); - - if (isFill) - { - m_fillColours.Append((wxObject*) (n - 1)); - } -} - -void wxPseudoMetaFile::SetFont(wxFont* font) -{ - m_gdiObjects.Append(font); - int n = m_gdiObjects.Number(); - - wxOpSetGDI* theOp = new wxOpSetGDI(DRAWOP_SET_FONT, this, n - 1); - - m_ops.Append(theOp); -} - -void wxPseudoMetaFile::SetTextColour(const wxColour& colour) -{ - wxOpSetGDI* theOp = new wxOpSetGDI(DRAWOP_SET_TEXT_COLOUR, this, 0); - theOp->m_r = colour.Red(); - theOp->m_g = colour.Green(); - theOp->m_b = colour.Blue(); - - m_ops.Append(theOp); -} - -void wxPseudoMetaFile::SetBackgroundColour(const wxColour& colour) -{ - wxOpSetGDI* theOp = new wxOpSetGDI(DRAWOP_SET_BK_COLOUR, this, 0); - theOp->m_r = colour.Red(); - theOp->m_g = colour.Green(); - theOp->m_b = colour.Blue(); - - m_ops.Append(theOp); -} - -void wxPseudoMetaFile::SetBackgroundMode(int mode) -{ - wxOpSetGDI* theOp = new wxOpSetGDI(DRAWOP_SET_BK_MODE, this, 0, mode); - - m_ops.Append(theOp); -} - diff --git a/utils/ogl/src/drawn.h b/utils/ogl/src/drawn.h deleted file mode 100644 index 0548ac3614..0000000000 --- a/utils/ogl/src/drawn.h +++ /dev/null @@ -1,226 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: drawn.h -// Purpose: wxDrawnShape -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _OGL_DRAWN_H_ -#define _OGL_DRAWN_H_ - -#ifdef __GNUG__ -#pragma interface "drawn.h" -#endif - -#include "basic.h" - -#define oglMETAFLAGS_OUTLINE 1 -#define oglMETAFLAGS_ATTACHMENTS 2 - -class wxDrawnShape; -class wxPseudoMetaFile: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxPseudoMetaFile) - public: - wxPseudoMetaFile(); - wxPseudoMetaFile(wxPseudoMetaFile& mf); - ~wxPseudoMetaFile(); - - void Draw(wxDC& dc, double xoffset, double yoffset); - -#ifdef PROLOGIO - void WritePrologAttributes(wxExpr *clause, int whichAngle); - void ReadPrologAttributes(wxExpr *clause, int whichAngle); -#endif - - void Clear(); - - void Copy(wxPseudoMetaFile& copy); - - void Scale(double sx, double sy); - void ScaleTo(double w, double h); // Scale to fit size - void Translate(double x, double y); - - // Rotate about the given axis by theta radians from the x axis. - void Rotate(double x, double y, double theta); - - bool LoadFromMetaFile(char *filename, double *width, double *height); - - void GetBounds(double *minX, double *minY, double *maxX, double *maxY); - - // Calculate size from current operations - void CalculateSize(wxDrawnShape* shape); - - inline wxList& GetOutlineColours() const { return (wxList&) m_outlineColours; } - inline wxList& GetFillColours() const { return (wxList&) m_fillColours; } - inline void SetRotateable(bool rot) { m_rotateable = rot; } - inline bool GetRotateable() const { return m_rotateable; } - - inline void SetSize(double w, double h) { m_width = w; m_height = h; } - - inline void SetFillBrush(wxBrush* brush) { m_fillBrush = brush; } - inline wxBrush* GetFillBrush() const { return m_fillBrush; } - - inline void SetOutlinePen(wxPen* pen) { m_outlinePen = pen; } - inline wxPen* GetOutlinePen() const { return m_outlinePen; } - - inline void SetOutlineOp(int op) { m_outlineOp = op; } - inline int GetOutlineOp() const { return m_outlineOp; } - - inline wxList& GetOps() const { return (wxList&) m_ops; } - - // Is this a valid (non-empty) metafile? - inline bool IsValid() const { return (m_ops.Number() > 0); } - -public: - /// Set of functions for drawing into a pseudo metafile. - /// They use integers, but doubles are used internally for accuracy - /// when scaling. - - virtual void DrawLine(const wxPoint& pt1, const wxPoint& pt2); - virtual void DrawRectangle(const wxRect& rect); - virtual void DrawRoundedRectangle(const wxRect& rect, double radius); - virtual void DrawArc(const wxPoint& centrePt, const wxPoint& startPt, const wxPoint& endPt); - virtual void DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle); - virtual void DrawEllipse(const wxRect& rect); - virtual void DrawPoint(const wxPoint& pt); - virtual void DrawText(const wxString& text, const wxPoint& pt); - virtual void DrawLines(int n, wxPoint pts[]); - // flags: - // oglMETAFLAGS_OUTLINE: will be used for drawing the outline and - // also drawing lines/arrows at the circumference. - // oglMETAFLAGS_ATTACHMENTS: will be used for initialising attachment points at - // the vertices (perhaps a rare case...) - virtual void DrawPolygon(int n, wxPoint pts[], int flags = 0); - virtual void DrawSpline(int n, wxPoint pts[]); - - virtual void SetClippingRect(const wxRect& rect); - virtual void DestroyClippingRect(); - - virtual void SetPen(wxPen* pen, bool isOutline = FALSE); // TODO: eventually, just store GDI object attributes, not actual - virtual void SetBrush(wxBrush* brush, bool isFill = FALSE); // pens/brushes etc. - virtual void SetFont(wxFont* font); - virtual void SetTextColour(const wxColour& colour); - virtual void SetBackgroundColour(const wxColour& colour); - virtual void SetBackgroundMode(int mode); - -public: - bool m_rotateable; - double m_width; - double m_height; - wxList m_ops; // List of drawing operations (see drawnp.h) - wxList m_gdiObjects; // List of pens, brushes and fonts for this object. - int m_outlineOp; // The op representing the outline, if any - - // Pen/brush specifying outline/fill colours - // to override operations. - wxPen* m_outlinePen; - wxBrush* m_fillBrush; - wxList m_outlineColours; // List of the GDI operations that comprise the outline - wxList m_fillColours; // List of the GDI operations that fill the shape - double m_currentRotation; -}; - -#define oglDRAWN_ANGLE_0 0 -#define oglDRAWN_ANGLE_90 1 -#define oglDRAWN_ANGLE_180 2 -#define oglDRAWN_ANGLE_270 3 - -class wxDrawnShape: public wxRectangleShape -{ - DECLARE_DYNAMIC_CLASS(wxDrawnShape) - public: - wxDrawnShape(); - ~wxDrawnShape(); - - void OnDraw(wxDC& dc); - -#ifdef PROLOGIO - // Prolog database stuff - char *GetFunctor(); - void WritePrologAttributes(wxExpr *clause); - void ReadPrologAttributes(wxExpr *clause); -#endif - - // Does the copying for this object - void Copy(wxShape& copy); - - void Scale(double sx, double sy); - void Translate(double x, double y); - // Rotate about the given axis by theta radians from the x axis. - void Rotate(double x, double y, double theta); - - // Get current rotation - inline double GetRotation() const { return m_rotation; } - - void SetSize(double w, double h, bool recursive = TRUE); - bool LoadFromMetaFile(char *filename); - - inline void SetSaveToFile(bool save) { m_saveToFile = save; } - inline wxPseudoMetaFile& GetMetaFile(int which = 0) const { return (wxPseudoMetaFile&) m_metafiles[which]; } - - void OnDrawOutline(wxDC& dc, double x, double y, double w, double h); - - // Get the perimeter point using the special outline op, if there is one, - // otherwise use default wxRectangleShape scheme - bool GetPerimeterPoint(double x1, double y1, - double x2, double y2, - double *x3, double *y3); - - /// Set of functions for drawing into a pseudo metafile. - /// They use integers, but doubles are used internally for accuracy - /// when scaling. - - virtual void DrawLine(const wxPoint& pt1, const wxPoint& pt2); - virtual void DrawRectangle(const wxRect& rect); - virtual void DrawRoundedRectangle(const wxRect& rect, double radius); - virtual void DrawArc(const wxPoint& centrePt, const wxPoint& startPt, const wxPoint& endPt); - virtual void DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle); - virtual void DrawEllipse(const wxRect& rect); - virtual void DrawPoint(const wxPoint& pt); - virtual void DrawText(const wxString& text, const wxPoint& pt); - virtual void DrawLines(int n, wxPoint pts[]); - virtual void DrawPolygon(int n, wxPoint pts[], int flags = 0); - virtual void DrawSpline(int n, wxPoint pts[]); - - virtual void SetClippingRect(const wxRect& rect); - virtual void DestroyClippingRect(); - - virtual void SetPen(wxPen* pen, bool isOutline = FALSE); // TODO: eventually, just store GDI object attributes, not actual - virtual void SetBrush(wxBrush* brush, bool isFill = FALSE); // pens/brushes etc. - virtual void SetFont(wxFont* font); - virtual void SetTextColour(const wxColour& colour); - virtual void SetBackgroundColour(const wxColour& colour); - virtual void SetBackgroundMode(int mode); - - // Set the width/height according to the shapes in the metafile. - // Call this after drawing into the shape. - inline void CalculateSize() { m_metafiles[m_currentAngle].CalculateSize(this); } - - inline void DrawAtAngle(int angle) { m_currentAngle = angle; }; - - inline int GetAngle() const { return m_currentAngle; } - - // Which metafile do we use now? Based on current rotation and validity - // of metafiles. - int DetermineMetaFile(double rotation); - -private: - // One metafile for each 90 degree rotation (or just a single one). - wxPseudoMetaFile m_metafiles[4]; - - // Don't save all wxDrawnShape metafiles to file: sometimes - // we take the metafile data from a symbol library. - bool m_saveToFile; - - // Which angle are we using/drawing into? - int m_currentAngle; -}; - -#endif - // _DRAWN_H_ - diff --git a/utils/ogl/src/drawnp.h b/utils/ogl/src/drawnp.h deleted file mode 100644 index ab5ef12631..0000000000 --- a/utils/ogl/src/drawnp.h +++ /dev/null @@ -1,205 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: drawnp.h -// Purpose: Private header for wxDrawnShape -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _OGL_DRAWNP_H_ -#define _OGL_DRAWNP_H_ - -#ifdef __GNUG__ -#pragma interface "drawnp.h" -#endif - -#include "drawn.h" - -/* - * Drawing operations - * - */ - -#define DRAWOP_SET_PEN 1 -#define DRAWOP_SET_BRUSH 2 -#define DRAWOP_SET_FONT 3 -#define DRAWOP_SET_TEXT_COLOUR 4 -#define DRAWOP_SET_BK_COLOUR 5 -#define DRAWOP_SET_BK_MODE 6 -#define DRAWOP_SET_CLIPPING_RECT 7 -#define DRAWOP_DESTROY_CLIPPING_RECT 8 - -/* -#define DRAWOP_CREATE_PEN 10 -#define DRAWOP_CREATE_BRUSH 11 -#define DRAWOP_CREATE_FONT 12 -*/ - -#define DRAWOP_DRAW_LINE 20 -#define DRAWOP_DRAW_POLYLINE 21 -#define DRAWOP_DRAW_POLYGON 22 -#define DRAWOP_DRAW_RECT 23 -#define DRAWOP_DRAW_ROUNDED_RECT 24 -#define DRAWOP_DRAW_ELLIPSE 25 -#define DRAWOP_DRAW_POINT 26 -#define DRAWOP_DRAW_ARC 27 -#define DRAWOP_DRAW_TEXT 28 -#define DRAWOP_DRAW_SPLINE 29 -#define DRAWOP_DRAW_ELLIPTIC_ARC 30 - -/* - * Base, virtual class - * - */ - -class wxDrawOp: public wxObject -{ -public: - inline wxDrawOp(int theOp) { m_op = theOp; } - inline ~wxDrawOp() {} - inline virtual void Scale(double xScale, double yScale) {}; - inline virtual void Translate(double x, double y) {}; - inline virtual void Rotate(double x, double y, double theta, double sinTheta, double cosTheta) {}; - virtual void Do(wxDC& dc, double xoffset, double yoffset) = 0; - virtual wxDrawOp *Copy(wxPseudoMetaFile *newImage) = 0; - virtual wxExpr *WriteExpr(wxPseudoMetaFile *image) = 0; - virtual void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr) = 0; - - inline int GetOp() const { return m_op; } - - // Draw an outline using the current operation. By default, return FALSE (not drawn) - virtual bool OnDrawOutline(wxDC& dc, double x, double y, double w, double h, - double oldW, double oldH) { return FALSE; } - - // Get the perimeter point using this data - virtual bool GetPerimeterPoint(double x1, double y1, - double x2, double y2, - double *x3, double *y3, - double xOffset, double yOffset, - bool attachmentMode) - { return FALSE; } - -protected: - int m_op; - -}; - -/* - * Set font, brush, text colour - * - */ - -class wxOpSetGDI: public wxDrawOp -{ - public: - wxOpSetGDI(int theOp, wxPseudoMetaFile *theImage, int theGdiIndex, int theMode = 0); - void Do(wxDC& dc, double xoffset, double yoffset); - wxDrawOp *Copy(wxPseudoMetaFile *newImage); - wxExpr *WriteExpr(wxPseudoMetaFile *image); - void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr); - -public: - int m_mode; - int m_gdiIndex; - wxPseudoMetaFile* m_image; - unsigned char m_r; - unsigned char m_g; - unsigned char m_b; -}; - -/* - * Set/destroy clipping - * - */ - -class wxOpSetClipping: public wxDrawOp -{ -public: - wxOpSetClipping(int theOp, double theX1, double theY1, double theX2, double theY2); - void Do(wxDC& dc, double xoffset, double yoffset); - void Scale(double xScale, double yScale); - void Translate(double x, double y); - wxDrawOp *Copy(wxPseudoMetaFile *newImage); - wxExpr *WriteExpr(wxPseudoMetaFile *image); - void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr); - -public: - double m_x1; - double m_y1; - double m_x2; - double m_y2; -}; - -/* - * Draw line, rectangle, rounded rectangle, ellipse, point, arc, text - * - */ - -class wxOpDraw: public wxDrawOp -{ - public: - wxOpDraw(int theOp, double theX1, double theY1, double theX2, double theY2, - double radius = 0.0, char *s = NULL); - ~wxOpDraw(); - void Do(wxDC& dc, double xoffset, double yoffset); - void Scale(double scaleX, double scaleY); - void Translate(double x, double y); - void Rotate(double x, double y, double theta, double sinTheta, double cosTheta); - wxDrawOp *Copy(wxPseudoMetaFile *newImage); - wxExpr *WriteExpr(wxPseudoMetaFile *image); - void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr); - -public: - double m_x1; - double m_y1; - double m_x2; - double m_y2; - double m_x3; - double m_y3; - double m_radius; - char* m_textString; - -}; - -/* - * Draw polyline, spline, polygon - * - */ - -class wxOpPolyDraw: public wxDrawOp -{ -public: - wxOpPolyDraw(int theOp, int n, wxRealPoint *thePoints); - ~wxOpPolyDraw(); - void Do(wxDC& dc, double xoffset, double yoffset); - void Scale(double scaleX, double scaleY); - void Translate(double x, double y); - void Rotate(double x, double y, double theta, double sinTheta, double cosTheta); - wxDrawOp *Copy(wxPseudoMetaFile *newImage); - wxExpr *WriteExpr(wxPseudoMetaFile *image); - void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr); - - // Draw an outline using the current operation. - virtual bool OnDrawOutline(wxDC& dc, double x, double y, double w, double h, - double oldW, double oldH); - - // Get the perimeter point using this data - bool GetPerimeterPoint(double x1, double y1, - double x2, double y2, - double *x3, double *y3, - double xOffset, double yOffset, - bool attachmentMode); - -public: - wxRealPoint* m_points; - int m_noPoints; - -}; - -#endif - // _OGL_DRAWNP_H_ - - diff --git a/utils/ogl/src/lines.cpp b/utils/ogl/src/lines.cpp deleted file mode 100644 index 18d7268120..0000000000 --- a/utils/ogl/src/lines.cpp +++ /dev/null @@ -1,2501 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: lines.cpp -// Purpose: wxLineShape -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "lines.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#ifdef PROLOGIO -#include -#endif - -#if USE_IOSTREAMH -#include -#else -#include -#endif - -#include -#include - -#include "basic.h" -#include "basicp.h" -#include "lines.h" -#include "linesp.h" -#include "drawn.h" -#include "misc.h" -#include "canvas.h" - -// Line shape -IMPLEMENT_DYNAMIC_CLASS(wxLineShape, wxShape) - -wxLineShape::wxLineShape() -{ - m_sensitivity = OP_CLICK_LEFT | OP_CLICK_RIGHT; - m_draggable = FALSE; - m_attachmentTo = 0; - m_attachmentFrom = 0; -/* - m_actualTextWidth = 0.0; - m_actualTextHeight = 0.0; -*/ - m_from = NULL; - m_to = NULL; - m_erasing = FALSE; - m_arrowSpacing = 5.0; // For the moment, don't bother saving this to file. - m_ignoreArrowOffsets = FALSE; - m_isSpline = FALSE; - m_maintainStraightLines = FALSE; - m_alignmentStart = 0; - m_alignmentEnd = 0; - - m_lineControlPoints = NULL; - - // Clear any existing regions (created in an earlier constructor) - // and make the three line regions. - ClearRegions(); - wxShapeRegion *newRegion = new wxShapeRegion; - newRegion->SetName("Middle"); - newRegion->SetSize(150, 50); - m_regions.Append((wxObject *)newRegion); - - newRegion = new wxShapeRegion; - newRegion->SetName("Start"); - newRegion->SetSize(150, 50); - m_regions.Append((wxObject *)newRegion); - - newRegion = new wxShapeRegion; - newRegion->SetName("End"); - newRegion->SetSize(150, 50); - m_regions.Append((wxObject *)newRegion); - - for (int i = 0; i < 3; i++) - m_labelObjects[i] = NULL; -} - -wxLineShape::~wxLineShape() -{ - if (m_lineControlPoints) - { - ClearPointList(*m_lineControlPoints); - delete m_lineControlPoints; - } - for (int i = 0; i < 3; i++) - { - if (m_labelObjects[i]) - { - m_labelObjects[i]->Select(FALSE); - m_labelObjects[i]->RemoveFromCanvas(m_canvas); - delete m_labelObjects[i]; - m_labelObjects[i] = NULL; - } - } - ClearArrowsAtPosition(-1); -} - -void wxLineShape::MakeLineControlPoints(int n) -{ - if (m_lineControlPoints) - { - ClearPointList(*m_lineControlPoints); - delete m_lineControlPoints; - } - m_lineControlPoints = new wxList; - - int i = 0; - for (i = 0; i < n; i++) - { - wxRealPoint *point = new wxRealPoint(-999, -999); - m_lineControlPoints->Append((wxObject*) point); - } -} - -wxNode *wxLineShape::InsertLineControlPoint(wxDC* dc) -{ - if (dc) - Erase(*dc); - - wxNode *last = m_lineControlPoints->Last(); - wxNode *second_last = last->Previous(); - wxRealPoint *last_point = (wxRealPoint *)last->Data(); - wxRealPoint *second_last_point = (wxRealPoint *)second_last->Data(); - - // Choose a point half way between the last and penultimate points - double line_x = ((last_point->x + second_last_point->x)/2); - double line_y = ((last_point->y + second_last_point->y)/2); - - wxRealPoint *point = new wxRealPoint(line_x, line_y); - wxNode *node = m_lineControlPoints->Insert(last, (wxObject*) point); - return node; -} - -bool wxLineShape::DeleteLineControlPoint() -{ - if (m_lineControlPoints->Number() < 3) - return FALSE; - - wxNode *last = m_lineControlPoints->Last(); - wxNode *second_last = last->Previous(); - - wxRealPoint *second_last_point = (wxRealPoint *)second_last->Data(); - delete second_last_point; - delete second_last; - - return TRUE; -} - -void wxLineShape::Initialise() -{ - if (m_lineControlPoints) - { - // Just move the first and last control points - wxNode *first = m_lineControlPoints->First(); - wxRealPoint *first_point = (wxRealPoint *)first->Data(); - - wxNode *last = m_lineControlPoints->Last(); - wxRealPoint *last_point = (wxRealPoint *)last->Data(); - - // If any of the line points are at -999, we must - // initialize them by placing them half way between the first - // and the last. - wxNode *node = first->Next(); - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - if (point->x == -999) - { - double x1, y1, x2, y2; - if (first_point->x < last_point->x) - { x1 = first_point->x; x2 = last_point->x; } - else - { x2 = first_point->x; x1 = last_point->x; } - - if (first_point->y < last_point->y) - { y1 = first_point->y; y2 = last_point->y; } - else - { y2 = first_point->y; y1 = last_point->y; } - - point->x = ((x2 - x1)/2 + x1); - point->y = ((y2 - y1)/2 + y1); - } - node = node->Next(); - } - } -} - -// Format a text string according to the region size, adding -// strings with positions to region text list -void wxLineShape::FormatText(wxDC& dc, const wxString& s, int i) -{ - double w, h; - ClearText(i); - - if (m_regions.Number() < 1) - return; - wxNode *node = m_regions.Nth(i); - if (!node) - return; - - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - region->SetText(s); - dc.SetFont(region->GetFont()); - - region->GetSize(&w, &h); - // Initialize the size if zero - if (((w == 0) || (h == 0)) && (strlen(s) > 0)) - { - w = 100; h = 50; - region->SetSize(w, h); - } - - wxStringList *string_list = oglFormatText(dc, s, (w-5), (h-5), region->GetFormatMode()); - node = string_list->First(); - while (node) - { - char *s = (char *)node->Data(); - wxShapeTextLine *line = new wxShapeTextLine(0.0, 0.0, s); - region->GetFormattedText().Append((wxObject *)line); - node = node->Next(); - } - delete string_list; - double actualW = w; - double actualH = h; - if (region->GetFormatMode() & FORMAT_SIZE_TO_CONTENTS) - { - oglGetCentredTextExtent(dc, &(region->GetFormattedText()), m_xpos, m_ypos, w, h, &actualW, &actualH); - if ((actualW != w ) || (actualH != h)) - { - double xx, yy; - GetLabelPosition(i, &xx, &yy); - EraseRegion(dc, region, xx, yy); - if (m_labelObjects[i]) - { - m_labelObjects[i]->Select(FALSE); - m_labelObjects[i]->Erase(dc); - m_labelObjects[i]->SetSize(actualW, actualH); - } - - region->SetSize(actualW, actualH); - - if (m_labelObjects[i]) - { - m_labelObjects[i]->Select(TRUE, & dc); - m_labelObjects[i]->Draw(dc); - } - } - } - oglCentreText(dc, &(region->GetFormattedText()), m_xpos, m_ypos, actualW, actualH, region->GetFormatMode()); - m_formatted = TRUE; -} - -void wxLineShape::DrawRegion(wxDC& dc, wxShapeRegion *region, double x, double y) -{ - if (GetDisableLabel()) - return; - - double w, h; - double xx, yy; - region->GetSize(&w, &h); - - // Get offset from x, y - region->GetPosition(&xx, &yy); - - double xp = xx + x; - double yp = yy + y; - - // First, clear a rectangle for the text IF there is any - if (region->GetFormattedText().Number() > 0) - { - dc.SetPen(g_oglWhiteBackgroundPen); - dc.SetBrush(g_oglWhiteBackgroundBrush); - - // Now draw the text - if (region->GetFont()) dc.SetFont(region->GetFont()); - - dc.DrawRectangle((double)(xp - w/2.0), (double)(yp - h/2.0), (double)w, (double)h); - - if (m_pen) dc.SetPen(m_pen); - dc.SetTextForeground(* region->GetActualColourObject()); - -#ifdef __WXMSW__ - dc.SetTextBackground(g_oglWhiteBackgroundBrush->GetColour()); -#endif - - oglDrawFormattedText(dc, &(region->GetFormattedText()), xp, yp, w, h, region->GetFormatMode()); - } -} - -void wxLineShape::EraseRegion(wxDC& dc, wxShapeRegion *region, double x, double y) -{ - if (GetDisableLabel()) - return; - - double w, h; - double xx, yy; - region->GetSize(&w, &h); - - // Get offset from x, y - region->GetPosition(&xx, &yy); - - double xp = xx + x; - double yp = yy + y; - - if (region->GetFormattedText().Number() > 0) - { - dc.SetPen(g_oglWhiteBackgroundPen); - dc.SetBrush(g_oglWhiteBackgroundBrush); - - dc.DrawRectangle((double)(xp - w/2.0), (double)(yp - h/2.0), (double)w, (double)h); - } -} - -// Get the reference point for a label. Region x and y -// are offsets from this. -// position is 0, 1, 2 -void wxLineShape::GetLabelPosition(int position, double *x, double *y) -{ - switch (position) - { - case 0: - { - // Want to take the middle section for the label - int n = m_lineControlPoints->Number(); - int half_way = (int)(n/2); - - // Find middle of this line - wxNode *node = m_lineControlPoints->Nth(half_way - 1); - wxRealPoint *point = (wxRealPoint *)node->Data(); - wxNode *next_node = node->Next(); - wxRealPoint *next_point = (wxRealPoint *)next_node->Data(); - - double dx = (next_point->x - point->x); - double dy = (next_point->y - point->y); - *x = (double)(point->x + dx/2.0); - *y = (double)(point->y + dy/2.0); - break; - } - case 1: - { - wxNode *node = m_lineControlPoints->First(); - *x = ((wxRealPoint *)node->Data())->x; - *y = ((wxRealPoint *)node->Data())->y; - break; - } - case 2: - { - wxNode *node = m_lineControlPoints->Last(); - *x = ((wxRealPoint *)node->Data())->x; - *y = ((wxRealPoint *)node->Data())->y; - break; - } - default: - break; - } -} - -/* - * Find whether line is supposed to be vertical or horizontal and - * make it so. - * - */ -void GraphicsStraightenLine(wxRealPoint *point1, wxRealPoint *point2) -{ - double dx = point2->x - point1->x; - double dy = point2->y - point1->y; - - if (dx == 0.0) - return; - else if (fabs(dy/dx) > 1.0) - { - point2->x = point1->x; - } - else point2->y = point1->y; -} - -void wxLineShape::Straighten(wxDC& dc) -{ - if (!m_lineControlPoints || m_lineControlPoints->Number() < 3) - return; - - Erase(dc); - - wxNode *first_point_node = m_lineControlPoints->First(); - wxNode *last_point_node = m_lineControlPoints->Last(); - wxNode *second_last_point_node = last_point_node->Previous(); - - wxRealPoint *last_point = (wxRealPoint *)last_point_node->Data(); - wxRealPoint *second_last_point = (wxRealPoint *)second_last_point_node->Data(); - - GraphicsStraightenLine(last_point, second_last_point); - - wxNode *node = first_point_node; - while (node && (node != second_last_point_node)) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - wxRealPoint *next_point = (wxRealPoint *)(node->Next()->Data()); - - GraphicsStraightenLine(point, next_point); - node = node->Next(); - } - - Draw(dc); -} - - -void wxLineShape::Unlink() -{ - if (m_to) - m_to->GetLines().DeleteObject(this); - if (m_from) - m_from->GetLines().DeleteObject(this); - m_to = NULL; - m_from = NULL; -} - -void wxLineShape::SetEnds(double x1, double y1, double x2, double y2) -{ - // Find centre point - wxNode *first_point_node = m_lineControlPoints->First(); - wxNode *last_point_node = m_lineControlPoints->Last(); - wxRealPoint *first_point = (wxRealPoint *)first_point_node->Data(); - wxRealPoint *last_point = (wxRealPoint *)last_point_node->Data(); - - first_point->x = x1; - first_point->y = y1; - last_point->x = x2; - last_point->y = y2; - - m_xpos = (double)((x1 + x2)/2.0); - m_ypos = (double)((y1 + y2)/2.0); -} - -// Get absolute positions of ends -void wxLineShape::GetEnds(double *x1, double *y1, double *x2, double *y2) -{ - wxNode *first_point_node = m_lineControlPoints->First(); - wxNode *last_point_node = m_lineControlPoints->Last(); - wxRealPoint *first_point = (wxRealPoint *)first_point_node->Data(); - wxRealPoint *last_point = (wxRealPoint *)last_point_node->Data(); - - *x1 = first_point->x; *y1 = first_point->y; - *x2 = last_point->x; *y2 = last_point->y; -} - -void wxLineShape::SetAttachments(int from_attach, int to_attach) -{ - m_attachmentFrom = from_attach; - m_attachmentTo = to_attach; -} - -bool wxLineShape::HitTest(double x, double y, int *attachment, double *distance) -{ - if (!m_lineControlPoints) - return FALSE; - - // Look at label regions in case mouse is over a label - bool inLabelRegion = FALSE; - for (int i = 0; i < 3; i ++) - { - wxNode *regionNode = m_regions.Nth(i); - if (regionNode) - { - wxShapeRegion *region = (wxShapeRegion *)regionNode->Data(); - if (region->m_formattedText.Number() > 0) - { - double xp, yp, cx, cy, cw, ch; - GetLabelPosition(i, &xp, &yp); - // Offset region from default label position - region->GetPosition(&cx, &cy); - region->GetSize(&cw, &ch); - cx += xp; - cy += yp; - double rLeft = (double)(cx - (cw/2.0)); - double rTop = (double)(cy - (ch/2.0)); - double rRight = (double)(cx + (cw/2.0)); - double rBottom = (double)(cy + (ch/2.0)); - if (x > rLeft && x < rRight && y > rTop && y < rBottom) - { - inLabelRegion = TRUE; - i = 3; - } - } - } - } - - wxNode *node = m_lineControlPoints->First(); - - while (node && node->Next()) - { - wxRealPoint *point1 = (wxRealPoint *)node->Data(); - wxRealPoint *point2 = (wxRealPoint *)node->Next()->Data(); - - // Allow for inaccurate mousing or vert/horiz lines - int extra = 4; - double left = wxMin(point1->x, point2->x) - extra; - double right = wxMax(point1->x, point2->x) + extra; - - double bottom = wxMin(point1->y, point2->y) - extra; - double top = wxMax(point1->y, point2->y) + extra; - - if ((x > left && x < right && y > bottom && y < top) || inLabelRegion) - { - // Work out distance from centre of line - double centre_x = (double)(left + (right - left)/2.0); - double centre_y = (double)(bottom + (top - bottom)/2.0); - - *attachment = 0; - *distance = (double)sqrt((centre_x - x)*(centre_x - x) + (centre_y - y)*(centre_y - y)); - return TRUE; - } - - node = node->Next(); - } - return FALSE; -} - -void wxLineShape::DrawArrows(wxDC& dc) -{ - // Distance along line of each arrow: space them out evenly. - double startArrowPos = 0.0; - double endArrowPos = 0.0; - double middleArrowPos = 0.0; - - wxNode *node = m_arcArrows.First(); - while (node) - { - wxArrowHead *arrow = (wxArrowHead *)node->Data(); - switch (arrow->GetArrowEnd()) - { - case ARROW_POSITION_START: - { - if ((arrow->GetXOffset() != 0.0) && !m_ignoreArrowOffsets) - // If specified, x offset is proportional to line length - DrawArrow(dc, arrow, arrow->GetXOffset(), TRUE); - else - { - DrawArrow(dc, arrow, startArrowPos, FALSE); // Absolute distance - startArrowPos += arrow->GetSize() + arrow->GetSpacing(); - } - break; - } - case ARROW_POSITION_END: - { - if ((arrow->GetXOffset() != 0.0) && !m_ignoreArrowOffsets) - DrawArrow(dc, arrow, arrow->GetXOffset(), TRUE); - else - { - DrawArrow(dc, arrow, endArrowPos, FALSE); - endArrowPos += arrow->GetSize() + arrow->GetSpacing(); - } - break; - } - case ARROW_POSITION_MIDDLE: - { - arrow->SetXOffset(middleArrowPos); - if ((arrow->GetXOffset() != 0.0) && !m_ignoreArrowOffsets) - DrawArrow(dc, arrow, arrow->GetXOffset(), TRUE); - else - { - DrawArrow(dc, arrow, middleArrowPos, FALSE); - middleArrowPos += arrow->GetSize() + arrow->GetSpacing(); - } - break; - } - } - node = node->Next(); - } -} - -void wxLineShape::DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool proportionalOffset) -{ - wxNode *first_line_node = m_lineControlPoints->First(); - wxRealPoint *first_line_point = (wxRealPoint *)first_line_node->Data(); - wxNode *second_line_node = first_line_node->Next(); - wxRealPoint *second_line_point = (wxRealPoint *)second_line_node->Data(); - - wxNode *last_line_node = m_lineControlPoints->Last(); - wxRealPoint *last_line_point = (wxRealPoint *)last_line_node->Data(); - wxNode *second_last_line_node = last_line_node->Previous(); - wxRealPoint *second_last_line_point = (wxRealPoint *)second_last_line_node->Data(); - - // Position where we want to start drawing - double positionOnLineX, positionOnLineY; - - // Position of start point of line, at the end of which we draw the arrow. - double startPositionX, startPositionY; - - switch (arrow->GetPosition()) - { - case ARROW_POSITION_START: - { - // If we're using a proportional offset, calculate just where this will - // be on the line. - double realOffset = xOffset; - if (proportionalOffset) - { - double totalLength = - (double)sqrt((second_line_point->x - first_line_point->x)*(second_line_point->x - first_line_point->x) + - (second_line_point->y - first_line_point->y)*(second_line_point->y - first_line_point->y)); - realOffset = (double)(xOffset * totalLength); - } - GetPointOnLine(second_line_point->x, second_line_point->y, - first_line_point->x, first_line_point->y, - realOffset, &positionOnLineX, &positionOnLineY); - startPositionX = second_line_point->x; - startPositionY = second_line_point->y; - break; - } - case ARROW_POSITION_END: - { - // If we're using a proportional offset, calculate just where this will - // be on the line. - double realOffset = xOffset; - if (proportionalOffset) - { - double totalLength = - (double)sqrt((second_last_line_point->x - last_line_point->x)*(second_last_line_point->x - last_line_point->x) + - (second_last_line_point->y - last_line_point->y)*(second_last_line_point->y - last_line_point->y)); - realOffset = (double)(xOffset * totalLength); - } - GetPointOnLine(second_last_line_point->x, second_last_line_point->y, - last_line_point->x, last_line_point->y, - realOffset, &positionOnLineX, &positionOnLineY); - startPositionX = second_last_line_point->x; - startPositionY = second_last_line_point->y; - break; - } - case ARROW_POSITION_MIDDLE: - { - // Choose a point half way between the last and penultimate points - double x = ((last_line_point->x + second_last_line_point->x)/2); - double y = ((last_line_point->y + second_last_line_point->y)/2); - - // If we're using a proportional offset, calculate just where this will - // be on the line. - double realOffset = xOffset; - if (proportionalOffset) - { - double totalLength = - (double)sqrt((second_last_line_point->x - x)*(second_last_line_point->x - x) + - (second_last_line_point->y - y)*(second_last_line_point->y - y)); - realOffset = (double)(xOffset * totalLength); - } - - GetPointOnLine(second_last_line_point->x, second_last_line_point->y, - x, y, realOffset, &positionOnLineX, &positionOnLineY); - startPositionX = second_last_line_point->x; - startPositionY = second_last_line_point->y; - break; - } - } - - /* - * Add yOffset to arrow, if any - */ - - const double myPi = (double) 3.14159265; - // The translation that the y offset may give - double deltaX = 0.0; - double deltaY = 0.0; - if ((arrow->GetYOffset() != 0.0) && !m_ignoreArrowOffsets) - { - /* - |(x4, y4) - |d - | - (x1, y1)--------------(x3, y3)------------------(x2, y2) - x4 = x3 - d * sin(theta) - y4 = y3 + d * cos(theta) - - Where theta = tan(-1) of (y3-y1)/(x3-x1) - */ - double x1 = startPositionX; - double y1 = startPositionY; - double x3 = positionOnLineX; - double y3 = positionOnLineY; - double d = -arrow->GetYOffset(); // Negate so +offset is above line - - double theta = 0.0; - if (x3 == x1) - theta = (double)(myPi/2.0); - else - theta = (double)atan((y3-y1)/(x3-x1)); - - double x4 = (double)(x3 - (d*sin(theta))); - double y4 = (double)(y3 + (d*cos(theta))); - - deltaX = x4 - positionOnLineX; - deltaY = y4 - positionOnLineY; - } - - switch (arrow->_GetType()) - { - case ARROW_ARROW: - { - double arrowLength = arrow->GetSize(); - double arrowWidth = (double)(arrowLength/3.0); - - double tip_x, tip_y, side1_x, side1_y, side2_x, side2_y; - oglGetArrowPoints(startPositionX+deltaX, startPositionY+deltaY, - positionOnLineX+deltaX, positionOnLineY+deltaY, - arrowLength, arrowWidth, &tip_x, &tip_y, - &side1_x, &side1_y, &side2_x, &side2_y); - - wxPoint points[4]; - points[0].x = tip_x; points[0].y = tip_y; - points[1].x = side1_x; points[1].y = side1_y; - points[2].x = side2_x; points[2].y = side2_y; - points[3].x = tip_x; points[3].y = tip_y; - - dc.SetPen(m_pen); - dc.SetBrush(m_brush); - dc.DrawPolygon(4, points); - break; - } - case ARROW_HOLLOW_CIRCLE: - case ARROW_FILLED_CIRCLE: - { - // Find point on line of centre of circle, which is a radius away - // from the end position - double diameter = (double)(arrow->GetSize()); - double x, y; - GetPointOnLine(startPositionX+deltaX, startPositionY+deltaY, - positionOnLineX+deltaX, positionOnLineY+deltaY, - (double)(diameter/2.0), - &x, &y); - - // Convert ellipse centre to top-left coordinates - double x1 = (double)(x - (diameter/2.0)); - double y1 = (double)(y - (diameter/2.0)); - - dc.SetPen(m_pen); - if (arrow->_GetType() == ARROW_HOLLOW_CIRCLE) - dc.SetBrush(g_oglWhiteBackgroundBrush); - else - dc.SetBrush(m_brush); - - dc.DrawEllipse(x1, y1, diameter, diameter); - break; - } - case ARROW_SINGLE_OBLIQUE: - { - break; - } - case ARROW_METAFILE: - { - if (arrow->GetMetaFile()) - { - // Find point on line of centre of object, which is a half-width away - // from the end position - /* - * width - * <-- start pos <-----><-- positionOnLineX - * _____ - * --------------| x | <-- e.g. rectangular arrowhead - * ----- - */ - double x, y; - GetPointOnLine(startPositionX, startPositionY, - positionOnLineX, positionOnLineY, - (double)(arrow->GetMetaFile()->m_width/2.0), - &x, &y); - - // Calculate theta for rotating the metafile. - /* - | - | o(x2, y2) 'o' represents the arrowhead. - | / - | / - | /theta - | /(x1, y1) - |______________________ - */ - double theta = 0.0; - double x1 = startPositionX; - double y1 = startPositionY; - double x2 = positionOnLineX; - double y2 = positionOnLineY; - - if ((x1 == x2) && (y1 == y2)) - theta = 0.0; - - else if ((x1 == x2) && (y1 > y2)) - theta = (double)(3.0*myPi/2.0); - - else if ((x1 == x2) && (y2 > y1)) - theta = (double)(myPi/2.0); - - else if ((x2 > x1) && (y2 >= y1)) - theta = (double)atan((y2 - y1)/(x2 - x1)); - - else if (x2 < x1) - theta = (double)(myPi + atan((y2 - y1)/(x2 - x1))); - - else if ((x2 > x1) && (y2 < y1)) - theta = (double)(2*myPi + atan((y2 - y1)/(x2 - x1))); - - else - { - wxFatalError("Unknown arrowhead rotation case in lines.cc"); - } - - // Rotate about the centre of the object, then place - // the object on the line. - if (arrow->GetMetaFile()->GetRotateable()) - arrow->GetMetaFile()->Rotate(0.0, 0.0, theta); - - if (m_erasing) - { - // If erasing, just draw a rectangle. - double minX, minY, maxX, maxY; - arrow->GetMetaFile()->GetBounds(&minX, &minY, &maxX, &maxY); - // Make erasing rectangle slightly bigger or you get droppings. - int extraPixels = 4; - dc.DrawRectangle((double)(deltaX + x + minX - (extraPixels/2.0)), (double)(deltaY + y + minY - (extraPixels/2.0)), - (double)(maxX - minX + extraPixels), (double)(maxY - minY + extraPixels)); - } - else - arrow->GetMetaFile()->Draw(dc, x+deltaX, y+deltaY); - } - break; - } - default: - { - } - } -} - -void wxLineShape::OnErase(wxDC& dc) -{ - wxPen *old_pen = m_pen; - wxBrush *old_brush = m_brush; - SetPen(g_oglWhiteBackgroundPen); - SetBrush(g_oglWhiteBackgroundBrush); - - double bound_x, bound_y; - GetBoundingBoxMax(&bound_x, &bound_y); - if (m_font) dc.SetFont(m_font); - - // Undraw text regions - for (int i = 0; i < 3; i++) - { - wxNode *node = m_regions.Nth(i); - if (node) - { - double x, y; - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - GetLabelPosition(i, &x, &y); - EraseRegion(dc, region, x, y); - } - } - - // Undraw line - dc.SetPen(g_oglWhiteBackgroundPen); - dc.SetBrush(g_oglWhiteBackgroundBrush); - - // Drawing over the line only seems to work if the line has a thickness - // of 1. - if (old_pen && (old_pen->GetWidth() > 1)) - { - dc.DrawRectangle((double)(m_xpos - (bound_x/2.0) - 2.0), (double)(m_ypos - (bound_y/2.0) - 2.0), - (double)(bound_x+4.0), (double)(bound_y+4.0)); - } - else - { - m_erasing = TRUE; - GetEventHandler()->OnDraw(dc); - GetEventHandler()->OnEraseControlPoints(dc); - m_erasing = FALSE; - } - - if (old_pen) SetPen(old_pen); - if (old_brush) SetBrush(old_brush); -} - -void wxLineShape::GetBoundingBoxMin(double *w, double *h) -{ - double x1 = 10000; - double y1 = 10000; - double x2 = -10000; - double y2 = -10000; - - wxNode *node = m_lineControlPoints->First(); - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - - if (point->x < x1) x1 = point->x; - if (point->y < y1) y1 = point->y; - if (point->x > x2) x2 = point->x; - if (point->y > y2) y2 = point->y; - - node = node->Next(); - } - *w = (double)(x2 - x1); - *h = (double)(y2 - y1); -} - -/* - * For a node image of interest, finds the position of this arc - * amongst all the arcs which are attached to THIS SIDE of the node image, - * and the number of same. - */ -void wxLineShape::FindNth(wxShape *image, int *nth, int *no_arcs, bool incoming) -{ - int n = -1; - int num = 0; - wxNode *node = image->GetLines().First(); - int this_attachment; - if (image == m_to) - this_attachment = m_attachmentTo; - else - this_attachment = m_attachmentFrom; - - // Find number of lines going into/out of this particular attachment point - while (node) - { - wxLineShape *line = (wxLineShape *)node->Data(); - - if (line->m_from == image) - { - // This is the nth line attached to 'image' - if ((line == this) && !incoming) - n = num; - - // Increment num count if this is the same side (attachment number) - if (line->m_attachmentFrom == this_attachment) - num ++; - } - - if (line->m_to == image) - { - // This is the nth line attached to 'image' - if ((line == this) && incoming) - n = num; - - // Increment num count if this is the same side (attachment number) - if (line->m_attachmentTo == this_attachment) - num ++; - } - - node = node->Next(); - } - *nth = n; - *no_arcs = num; -} - -void wxLineShape::OnDrawOutline(wxDC& dc, double x, double y, double w, double h) -{ - wxPen *old_pen = m_pen; - wxBrush *old_brush = m_brush; - - wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT); - SetPen(& dottedPen); - SetBrush( wxTRANSPARENT_BRUSH ); - - GetEventHandler()->OnDraw(dc); - - if (old_pen) SetPen(old_pen); - else SetPen(NULL); - if (old_brush) SetBrush(old_brush); - else SetBrush(NULL); -} - -bool wxLineShape::OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display) -{ - double x_offset = x - old_x; - double y_offset = y - old_y; - - if (m_lineControlPoints && !(x_offset == 0.0 && y_offset == 0.0)) - { - wxNode *node = m_lineControlPoints->First(); - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - point->x += x_offset; - point->y += y_offset; - node = node->Next(); - } - - } - - // Move temporary label rectangles if necessary - for (int i = 0; i < 3; i++) - { - if (m_labelObjects[i]) - { - m_labelObjects[i]->Erase(dc); - double xp, yp, xr, yr; - GetLabelPosition(i, &xp, &yp); - wxNode *node = m_regions.Nth(i); - if (node) - { - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - region->GetPosition(&xr, &yr); - } - else - { - xr = 0.0; yr = 0.0; - } - - m_labelObjects[i]->Move(dc, xp+xr, yp+yr); - } - } - return TRUE; -} - -void wxLineShape::OnMoveLink(wxDC& dc, bool moveControlPoints) -{ - if (!m_from || !m_to) - return; - - if (m_lineControlPoints->Number() > 2) - Initialise(); - - // Do each end - nothing in the middle. User has to move other points - // manually if necessary. - double end_x, end_y; - double other_end_x, other_end_y; - - FindLineEndPoints(&end_x, &end_y, &other_end_x, &other_end_y); - - wxNode *first = m_lineControlPoints->First(); - wxRealPoint *first_point = (wxRealPoint *)first->Data(); - wxNode *last = m_lineControlPoints->Last(); - wxRealPoint *last_point = (wxRealPoint *)last->Data(); - -/* This is redundant, surely? Done by SetEnds. - first_point->x = end_x; first_point->y = end_y; - last_point->x = other_end_x; last_point->y = other_end_y; -*/ - - double oldX = m_xpos; - double oldY = m_ypos; - - SetEnds(end_x, end_y, other_end_x, other_end_y); - - // Do a second time, because one may depend on the other. - FindLineEndPoints(&end_x, &end_y, &other_end_x, &other_end_y); - SetEnds(end_x, end_y, other_end_x, other_end_y); - - // Try to move control points with the arc - double x_offset = m_xpos - oldX; - double y_offset = m_ypos - oldY; - -// if (moveControlPoints && m_lineControlPoints && !(x_offset == 0.0 && y_offset == 0.0)) - // Only move control points if it's a self link. And only works if attachment mode is ON. - if ((m_from == m_to) && m_from->GetAttachmentMode() && moveControlPoints && m_lineControlPoints && !(x_offset == 0.0 && y_offset == 0.0)) - { - wxNode *node = m_lineControlPoints->First(); - while (node) - { - if ((node != m_lineControlPoints->First()) && (node != m_lineControlPoints->Last())) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - point->x += x_offset; - point->y += y_offset; - } - node = node->Next(); - } - } - - Move(dc, m_xpos, m_ypos); -} - -// Finds the x, y points at the two ends of the line. -// This function can be used by e.g. line-routing routines to -// get the actual points on the two node images where the lines will be drawn -// to/from. -void wxLineShape::FindLineEndPoints(double *fromX, double *fromY, double *toX, double *toY) -{ - if (!m_from || !m_to) - return; - - // Do each end - nothing in the middle. User has to move other points - // manually if necessary. - double end_x, end_y; - double other_end_x, other_end_y; - - wxNode *first = m_lineControlPoints->First(); - wxRealPoint *first_point = (wxRealPoint *)first->Data(); - wxNode *last = m_lineControlPoints->Last(); - wxRealPoint *last_point = (wxRealPoint *)last->Data(); - - wxNode *second = first->Next(); - wxRealPoint *second_point = (wxRealPoint *)second->Data(); - - wxNode *second_last = last->Previous(); - wxRealPoint *second_last_point = (wxRealPoint *)second_last->Data(); - - if (m_lineControlPoints->Number() > 2) - { - if (m_from->GetAttachmentMode()) - { - int nth, no_arcs; - FindNth(m_from, &nth, &no_arcs, FALSE); // Not incoming - m_from->GetAttachmentPosition(m_attachmentFrom, &end_x, &end_y, nth, no_arcs, this); - } - else - (void) m_from->GetPerimeterPoint(m_from->GetX(), m_from->GetY(), - (double)second_point->x, (double)second_point->y, - &end_x, &end_y); - - if (m_to->GetAttachmentMode()) - { - int nth, no_arcs; - FindNth(m_to, &nth, &no_arcs, TRUE); // Incoming - m_to->GetAttachmentPosition(m_attachmentTo, &other_end_x, &other_end_y, nth, no_arcs, this); - } - else - (void) m_to->GetPerimeterPoint(m_to->GetX(), m_to->GetY(), - (double)second_last_point->x, (double)second_last_point->y, - &other_end_x, &other_end_y); - } - else - { - double fromX = m_from->GetX(); - double fromY = m_from->GetY(); - double toX = m_to->GetX(); - double toY = m_to->GetY(); - - if (m_from->GetAttachmentMode()) - { - int nth, no_arcs; - FindNth(m_from, &nth, &no_arcs, FALSE); - m_from->GetAttachmentPosition(m_attachmentFrom, &end_x, &end_y, nth, no_arcs, this); - fromX = end_x; - fromY = end_y; - } - - if (m_to->GetAttachmentMode()) - { - int nth, no_arcs; - FindNth(m_to, &nth, &no_arcs, TRUE); - m_to->GetAttachmentPosition(m_attachmentTo, &other_end_x, &other_end_y, nth, no_arcs, this); - toX = other_end_x; - toY = other_end_y; - } - - if (!m_from->GetAttachmentMode()) - (void) m_from->GetPerimeterPoint(m_from->GetX(), m_from->GetY(), - toX, toY, - &end_x, &end_y); - - if (!m_to->GetAttachmentMode()) - (void) m_to->GetPerimeterPoint(m_to->GetX(), m_to->GetY(), - fromX, fromY, - &other_end_x, &other_end_y); - } - *fromX = end_x; - *fromY = end_y; - *toX = other_end_x; - *toY = other_end_y; -} - -void wxLineShape::OnDraw(wxDC& dc) -{ - if (m_lineControlPoints) - { - if (m_pen) - dc.SetPen(m_pen); - if (m_brush) - dc.SetBrush(m_brush); - - int n = m_lineControlPoints->Number(); - wxPoint *points = new wxPoint[n]; - int i; - for (i = 0; i < n; i++) - { - wxRealPoint* point = (wxRealPoint*) m_lineControlPoints->Nth(i)->Data(); - points[i].x = WXROUND(point->x); - points[i].y = WXROUND(point->y); - } - - if (m_isSpline) - dc.DrawSpline(n, points); - else - dc.DrawLines(n, points); - -#ifdef __WXMSW__ - // For some reason, last point isn't drawn under Windows. - dc.DrawPoint(points[n-1]); -#endif - - delete[] points; - - - // Problem with pen - if not a solid pen, does strange things - // to the arrowhead. So make (get) a new pen that's solid. - if (m_pen && (m_pen->GetStyle() != wxSOLID)) - { - wxPen *solid_pen = - wxThePenList->FindOrCreatePen(m_pen->GetColour(), 1, wxSOLID); - if (solid_pen) - dc.SetPen(solid_pen); - } - DrawArrows(dc); - } -} - -void wxLineShape::OnDrawControlPoints(wxDC& dc) -{ - if (!m_drawHandles) - return; - - // Draw temporary label rectangles if necessary - for (int i = 0; i < 3; i++) - { - if (m_labelObjects[i]) - m_labelObjects[i]->Draw(dc); - } - wxShape::OnDrawControlPoints(dc); -} - -void wxLineShape::OnEraseControlPoints(wxDC& dc) -{ - // Erase temporary label rectangles if necessary - for (int i = 0; i < 3; i++) - { - if (m_labelObjects[i]) - m_labelObjects[i]->Erase(dc); - } - wxShape::OnEraseControlPoints(dc); -} - -void wxLineShape::OnDragLeft(bool draw, double x, double y, int keys, int attachment) -{ -} - -void wxLineShape::OnBeginDragLeft(double x, double y, int keys, int attachment) -{ -} - -void wxLineShape::OnEndDragLeft(double x, double y, int keys, int attachment) -{ -} - -/* -void wxLineShape::SetArrowSize(double length, double width) -{ - arrow_length = length; - arrow_width = width; -} - -void wxLineShape::SetStartArrow(int style) -{ - start_style = style; -} - -void wxLineShape::SetMiddleArrow(int style) -{ - middle_style = style; -} - -void wxLineShape::SetEndArrow(int style) -{ - end_style = style; -} -*/ - -void wxLineShape::OnDrawContents(wxDC& dc) -{ - if (GetDisableLabel()) - return; - - for (int i = 0; i < 3; i++) - { - wxNode *node = m_regions.Nth(i); - if (node) - { - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - double x, y; - GetLabelPosition(i, &x, &y); - DrawRegion(dc, region, x, y); - } - } -} - - -#ifdef PROLOGIO -char *wxLineShape::GetFunctor() -{ - return "arc_image"; -} -#endif - -void wxLineShape::SetTo(wxShape *object) -{ - m_to = object; -} - -void wxLineShape::SetFrom(wxShape *object) -{ - m_from = object; -} - -void wxLineShape::MakeControlPoints() -{ - if (m_canvas && m_lineControlPoints) - { - wxNode *first = m_lineControlPoints->First(); - wxNode *last = m_lineControlPoints->Last(); - wxRealPoint *first_point = (wxRealPoint *)first->Data(); - wxRealPoint *last_point = (wxRealPoint *)last->Data(); - - wxLineControlPoint *control = new wxLineControlPoint(m_canvas, this, CONTROL_POINT_SIZE, - first_point->x, first_point->y, - CONTROL_POINT_ENDPOINT_FROM); - control->m_point = first_point; - m_canvas->AddShape(control); - m_controlPoints.Append(control); - - - wxNode *node = first->Next(); - while (node != last) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - - control = new wxLineControlPoint(m_canvas, this, CONTROL_POINT_SIZE, - point->x, point->y, - CONTROL_POINT_LINE); - control->m_point = point; - - m_canvas->AddShape(control); - m_controlPoints.Append(control); - - node = node->Next(); - } - control = new wxLineControlPoint(m_canvas, this, CONTROL_POINT_SIZE, - last_point->x, last_point->y, - CONTROL_POINT_ENDPOINT_TO); - control->m_point = last_point; - m_canvas->AddShape(control); - m_controlPoints.Append(control); - - } - -} - -void wxLineShape::ResetControlPoints() -{ - if (m_canvas && m_lineControlPoints && m_controlPoints.Number() > 0) - { - wxNode *node = m_controlPoints.First(); - wxNode *control_node = m_lineControlPoints->First(); - while (node && control_node) - { - wxRealPoint *point = (wxRealPoint *)control_node->Data(); - wxLineControlPoint *control = (wxLineControlPoint *)node->Data(); - control->SetX(point->x); - control->SetY(point->y); - - node = node->Next(); - control_node = control_node->Next(); - } - } -} - -#ifdef PROLOGIO -void wxLineShape::WritePrologAttributes(wxExpr *clause) -{ - wxShape::WritePrologAttributes(clause); - - if (m_from) - clause->AddAttributeValue("from", m_from->GetId()); - if (m_to) - clause->AddAttributeValue("to", m_to->GetId()); - - if (m_attachmentTo != 0) - clause->AddAttributeValue("attachment_to", (long)m_attachmentTo); - if (m_attachmentFrom != 0) - clause->AddAttributeValue("attachment_from", (long)m_attachmentFrom); - - if (m_alignmentStart != 0) - clause->AddAttributeValue("align_start", (long)m_alignmentStart); - if (m_alignmentEnd != 0) - clause->AddAttributeValue("align_end", (long)m_alignmentEnd); - - clause->AddAttributeValue("is_spline", (long)m_isSpline); - if (m_maintainStraightLines) - clause->AddAttributeValue("keep_lines_straight", (long)m_maintainStraightLines); - - // Make a list of lists for the (sp)line controls - wxExpr *list = new wxExpr(PrologList); - wxNode *node = m_lineControlPoints->First(); - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - wxExpr *point_list = new wxExpr(PrologList); - wxExpr *x_expr = new wxExpr((double) point->x); - wxExpr *y_expr = new wxExpr((double) point->y); - point_list->Append(x_expr); - point_list->Append(y_expr); - list->Append(point_list); - - node = node->Next(); - } - clause->AddAttributeValue("controls", list); - - // Write arc arrows in new OGL format, if there are any. - // This is a list of lists. Each sublist comprises: - // (arrowType arrowEnd xOffset arrowSize) - if (m_arcArrows.Number() > 0) - { - wxExpr *arrow_list = new wxExpr(PrologList); - node = m_arcArrows.First(); - while (node) - { - wxArrowHead *head = (wxArrowHead *)node->Data(); - wxExpr *head_list = new wxExpr(PrologList); - head_list->Append(new wxExpr((long)head->_GetType())); - head_list->Append(new wxExpr((long)head->GetArrowEnd())); - head_list->Append(new wxExpr(head->GetXOffset())); - head_list->Append(new wxExpr(head->GetArrowSize())); - head_list->Append(new wxExpr(PrologString, (head->GetName() ? head->GetName() : ""))); - head_list->Append(new wxExpr(head->GetId())); - - // New members of wxArrowHead - head_list->Append(new wxExpr(head->GetYOffset())); - head_list->Append(new wxExpr(head->GetSpacing())); - - arrow_list->Append(head_list); - - node = node->Next(); - } - clause->AddAttributeValue("arrows", arrow_list); - } -} - -void wxLineShape::ReadPrologAttributes(wxExpr *clause) -{ - wxShape::ReadPrologAttributes(clause); - - int iVal = (int) m_isSpline; - clause->AssignAttributeValue("is_spline", &iVal); - m_isSpline = (iVal != 0); - - iVal = (int) m_maintainStraightLines; - clause->AssignAttributeValue("keep_lines_straight", &iVal); - m_maintainStraightLines = (iVal != 0); - - clause->AssignAttributeValue("align_start", &m_alignmentStart); - clause->AssignAttributeValue("align_end", &m_alignmentEnd); - - // Compatibility: check for no regions. - if (m_regions.Number() == 0) - { - wxShapeRegion *newRegion = new wxShapeRegion; - newRegion->SetName("Middle"); - newRegion->SetSize(150, 50); - m_regions.Append((wxObject *)newRegion); - if (m_text.Number() > 0) - { - newRegion->ClearText(); - wxNode *node = m_text.First(); - while (node) - { - wxShapeTextLine *textLine = (wxShapeTextLine *)node->Data(); - wxNode *next = node->Next(); - newRegion->GetFormattedText().Append((wxObject *)textLine); - delete node; - node = next; - } - } - - newRegion = new wxShapeRegion; - newRegion->SetName("Start"); - newRegion->SetSize(150, 50); - m_regions.Append((wxObject *)newRegion); - - newRegion = new wxShapeRegion; - newRegion->SetName("End"); - newRegion->SetSize(150, 50); - m_regions.Append((wxObject *)newRegion); - } - - m_attachmentTo = 0; - m_attachmentFrom = 0; - - clause->AssignAttributeValue("attachment_to", &m_attachmentTo); - clause->AssignAttributeValue("attachmen_from", &m_attachmentFrom); - - wxExpr *line_list = NULL; - - // When image is created, there are default control points. Override - // them if there are some in the file. - clause->AssignAttributeValue("controls", &line_list); - - if (line_list) - { - // Read a list of lists for the spline controls - if (m_lineControlPoints) - { - ClearPointList(*m_lineControlPoints); - } - else - m_lineControlPoints = new wxList; - - wxExpr *node = line_list->value.first; - - while (node) - { - wxExpr *xexpr = node->value.first; - double x = xexpr->RealValue(); - - wxExpr *yexpr = xexpr->next; - double y = yexpr->RealValue(); - - wxRealPoint *point = new wxRealPoint(x, y); - m_lineControlPoints->Append((wxObject*) point); - - node = node->next; - } - } - - // Read arrow list, for new OGL code - wxExpr *arrow_list = NULL; - - clause->AssignAttributeValue("arrows", &arrow_list); - if (arrow_list) - { - wxExpr *node = arrow_list->value.first; - - while (node) - { - WXTYPE arrowType = ARROW_ARROW; - int arrowEnd = 0; - double xOffset = 0.0; - double arrowSize = 0.0; - wxString arrowName(""); - long arrowId = -1; - - wxExpr *type_expr = node->Nth(0); - wxExpr *end_expr = node->Nth(1); - wxExpr *dist_expr = node->Nth(2); - wxExpr *size_expr = node->Nth(3); - wxExpr *name_expr = node->Nth(4); - wxExpr *id_expr = node->Nth(5); - - // New members of wxArrowHead - wxExpr *yOffsetExpr = node->Nth(6); - wxExpr *spacingExpr = node->Nth(7); - - if (type_expr) - arrowType = (int)type_expr->IntegerValue(); - if (end_expr) - arrowEnd = (int)end_expr->IntegerValue(); - if (dist_expr) - xOffset = dist_expr->RealValue(); - if (size_expr) - arrowSize = size_expr->RealValue(); - if (name_expr) - arrowName = name_expr->StringValue(); - if (id_expr) - arrowId = id_expr->IntegerValue(); - - if (arrowId == -1) - arrowId = NewId(); - else - RegisterId(arrowId); - - wxArrowHead *arrowHead = AddArrow(arrowType, arrowEnd, arrowSize, xOffset, (char*) (const char*) arrowName, NULL, arrowId); - if (yOffsetExpr) - arrowHead->SetYOffset(yOffsetExpr->RealValue()); - if (spacingExpr) - arrowHead->SetSpacing(spacingExpr->RealValue()); - - node = node->next; - } - } -} -#endif - -void wxLineShape::Copy(wxShape& copy) -{ - wxShape::Copy(copy); - - wxASSERT( copy.IsKindOf(CLASSINFO(wxLineShape)) ); - - wxLineShape& lineCopy = (wxLineShape&) copy; - - lineCopy.m_to = m_to; - lineCopy.m_from = m_from; - lineCopy.m_attachmentTo = m_attachmentTo; - lineCopy.m_attachmentFrom = m_attachmentFrom; - lineCopy.m_isSpline = m_isSpline; - lineCopy.m_alignmentStart = m_alignmentStart; - lineCopy.m_alignmentEnd = m_alignmentEnd; - lineCopy.m_maintainStraightLines = m_maintainStraightLines; - lineCopy.m_lineOrientations.Clear(); - - wxNode *node = m_lineOrientations.First(); - while (node) - { - lineCopy.m_lineOrientations.Append(node->Data()); - node = node->Next(); - } - - if (lineCopy.m_lineControlPoints) - { - ClearPointList(*lineCopy.m_lineControlPoints); - delete lineCopy.m_lineControlPoints; - } - - lineCopy.m_lineControlPoints = new wxList; - - node = m_lineControlPoints->First(); - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - wxRealPoint *new_point = new wxRealPoint(point->x, point->y); - lineCopy.m_lineControlPoints->Append((wxObject*) new_point); - node = node->Next(); - } - - // Copy arrows - lineCopy.ClearArrowsAtPosition(-1); - node = m_arcArrows.First(); - while (node) - { - wxArrowHead *arrow = (wxArrowHead *)node->Data(); - lineCopy.m_arcArrows.Append(new wxArrowHead(*arrow)); - node = node->Next(); - } -} - -// Override select, to create/delete temporary label-moving objects -void wxLineShape::Select(bool select, wxDC* dc) -{ - wxShape::Select(select, dc); - if (select) - { - for (int i = 0; i < 3; i++) - { - wxNode *node = m_regions.Nth(i); - if (node) - { - wxShapeRegion *region = (wxShapeRegion *)node->Data(); - if (region->m_formattedText.Number() > 0) - { - double w, h, x, y, xx, yy; - region->GetSize(&w, &h); - region->GetPosition(&x, &y); - GetLabelPosition(i, &xx, &yy); - if (m_labelObjects[i]) - { - m_labelObjects[i]->Select(FALSE); - m_labelObjects[i]->RemoveFromCanvas(m_canvas); - delete m_labelObjects[i]; - } - m_labelObjects[i] = new wxLabelShape(this, region, w, h); - m_labelObjects[i]->AddToCanvas(m_canvas); - m_labelObjects[i]->Show(TRUE); - if (dc) - m_labelObjects[i]->Move(*dc, (double)(x + xx), (double)(y + yy)); - m_labelObjects[i]->Select(TRUE); - } - } - } - } - else - { - for (int i = 0; i < 3; i++) - { - if (m_labelObjects[i]) - { - m_labelObjects[i]->Select(FALSE, dc); - m_labelObjects[i]->RemoveFromCanvas(m_canvas); - delete m_labelObjects[i]; - m_labelObjects[i] = NULL; - } - } - } -} - -/* - * Line control point - * - */ - -IMPLEMENT_DYNAMIC_CLASS(wxLineControlPoint, wxControlPoint) - -wxLineControlPoint::wxLineControlPoint(wxShapeCanvas *theCanvas, wxShape *object, double size, double x, double y, int the_type): - wxControlPoint(theCanvas, object, size, x, y, the_type) -{ - m_xpos = x; - m_ypos = y; - m_type = the_type; -} - -wxLineControlPoint::~wxLineControlPoint() -{ -} - -void wxLineControlPoint::OnDraw(wxDC& dc) -{ - wxRectangleShape::OnDraw(dc); -} - -// Implement movement of Line point -void wxLineControlPoint::OnDragLeft(bool draw, double x, double y, int keys, int attachment) -{ - m_shape->GetEventHandler()->OnSizingDragLeft(this, draw, x, y, keys, attachment); -} - -void wxLineControlPoint::OnBeginDragLeft(double x, double y, int keys, int attachment) -{ - m_shape->GetEventHandler()->OnSizingBeginDragLeft(this, x, y, keys, attachment); -} - -void wxLineControlPoint::OnEndDragLeft(double x, double y, int keys, int attachment) -{ - m_shape->GetEventHandler()->OnSizingEndDragLeft(this, x, y, keys, attachment); -} - -// Control points ('handles') redirect control to the actual shape, to make it easier -// to override sizing behaviour. -void wxLineShape::OnSizingDragLeft(wxControlPoint* pt, bool draw, double x, double y, int keys, int attachment) -{ - wxLineControlPoint* lpt = (wxLineControlPoint*) pt; - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - dc.SetLogicalFunction(wxXOR); - - wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT); - dc.SetPen(dottedPen); - dc.SetBrush((* wxTRANSPARENT_BRUSH)); - - if (lpt->m_type == CONTROL_POINT_LINE) - { - m_canvas->Snap(&x, &y); - - lpt->SetX(x); lpt->SetY(y); - lpt->m_point->x = x; lpt->m_point->y = y; - - wxLineShape *lineShape = (wxLineShape *)this; - - wxPen *old_pen = lineShape->GetPen(); - wxBrush *old_brush = lineShape->GetBrush(); - - wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT); - lineShape->SetPen(& dottedPen); - lineShape->SetBrush(wxTRANSPARENT_BRUSH); - - lineShape->GetEventHandler()->OnMoveLink(dc, FALSE); - - lineShape->SetPen(old_pen); - lineShape->SetBrush(old_brush); - } - - if (lpt->m_type == CONTROL_POINT_ENDPOINT_FROM || lpt->m_type == CONTROL_POINT_ENDPOINT_TO) - { - lpt->SetX(x); lpt->SetY(y); - } - -} - -void wxLineShape::OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y, int keys, int attachment) -{ - wxLineControlPoint* lpt = (wxLineControlPoint*) pt; - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - wxLineShape *lineShape = (wxLineShape *)this; - if (lpt->m_type == CONTROL_POINT_LINE) - { - m_canvas->Snap(&x, &y); - - this->Erase(dc); - - // Redraw start and end objects because we've left holes - // when erasing the line - lineShape->GetFrom()->OnDraw(dc); - lineShape->GetFrom()->OnDrawContents(dc); - lineShape->GetTo()->OnDraw(dc); - lineShape->GetTo()->OnDrawContents(dc); - - this->SetDisableLabel(TRUE); - dc.SetLogicalFunction(wxXOR); - - lpt->m_xpos = x; lpt->m_ypos = y; - lpt->m_point->x = x; lpt->m_point->y = y; - - wxPen *old_pen = lineShape->GetPen(); - wxBrush *old_brush = lineShape->GetBrush(); - - wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT); - lineShape->SetPen(& dottedPen); - lineShape->SetBrush(wxTRANSPARENT_BRUSH); - - lineShape->GetEventHandler()->OnMoveLink(dc, FALSE); - - lineShape->SetPen(old_pen); - lineShape->SetBrush(old_brush); - } - - if (lpt->m_type == CONTROL_POINT_ENDPOINT_FROM || lpt->m_type == CONTROL_POINT_ENDPOINT_TO) - { - lpt->Erase(dc); - lineShape->OnDraw(dc); - if (lpt->m_type == CONTROL_POINT_ENDPOINT_FROM) - { - lineShape->GetFrom()->OnDraw(dc); - lineShape->GetFrom()->OnDrawContents(dc); - } - else - { - lineShape->GetTo()->OnDraw(dc); - lineShape->GetTo()->OnDrawContents(dc); - } - m_canvas->SetCursor(g_oglBullseyeCursor); - lpt->m_oldCursor = wxSTANDARD_CURSOR; - } -} - -void wxLineShape::OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, int keys, int attachment) -{ - wxLineControlPoint* lpt = (wxLineControlPoint*) pt; - - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - this->SetDisableLabel(FALSE); - wxLineShape *lineShape = (wxLineShape *)this; - - if (lpt->m_type == CONTROL_POINT_LINE) - { - m_canvas->Snap(&x, &y); - - dc.SetLogicalFunction(wxCOPY); - lpt->m_xpos = x; lpt->m_ypos = y; - lpt->m_point->x = x; lpt->m_point->y = y; - - lineShape->GetEventHandler()->OnMoveLink(dc); - } - if (lpt->m_type == CONTROL_POINT_ENDPOINT_FROM) - { - if (lpt->m_oldCursor) - m_canvas->SetCursor(lpt->m_oldCursor); - this->Erase(dc); - - lpt->m_xpos = x; lpt->m_ypos = y; - - if (lineShape->GetFrom()) - { - lineShape->GetFrom()->MoveLineToNewAttachment(dc, lineShape, x, y); - } - } - if (lpt->m_type == CONTROL_POINT_ENDPOINT_TO) - { - if (lpt->m_oldCursor) - m_canvas->SetCursor(lpt->m_oldCursor); - - lpt->m_xpos = x; lpt->m_ypos = y; - - if (lineShape->GetTo()) - { - lineShape->GetTo()->MoveLineToNewAttachment(dc, lineShape, x, y); - } - } - - // Needed? -#if 0 - int i = 0; - for (i = 0; i < lineShape->GetLineControlPoints()->Number(); i++) - if (((wxRealPoint *)(lineShape->GetLineControlPoints()->Nth(i)->Data())) == lpt->m_point) - break; - - // N.B. in OnMoveControlPoint, an event handler in Hardy could have deselected - // the line and therefore deleted 'this'. -> GPF, intermittently. - // So assume at this point that we've been blown away. - wxLineShape *lineObj = lineShape; - wxShapeCanvas *objCanvas = m_canvas; - - lineObj->OnMoveControlPoint(i+1, x, y); -#endif -} - -// Implement movement of endpoint to a new attachment -// OBSOLETE: done by dragging with the left button. - -#if 0 -void wxLineControlPoint::OnDragRight(bool draw, double x, double y, int keys, int attachment) -{ - if (m_type == CONTROL_POINT_ENDPOINT_FROM || m_type == CONTROL_POINT_ENDPOINT_TO) - { - m_xpos = x; m_ypos = y; - } -} - -void wxLineControlPoint::OnBeginDragRight(double x, double y, int keys, int attachment) -{ - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - wxLineShape *lineShape = (wxLineShape *)m_shape; - if (m_type == CONTROL_POINT_ENDPOINT_FROM || m_type == CONTROL_POINT_ENDPOINT_TO) - { - Erase(dc); - lineShape->GetEventHandler()->OnDraw(dc); - if (m_type == CONTROL_POINT_ENDPOINT_FROM) - { - lineShape->GetFrom()->GetEventHandler()->OnDraw(dc); - lineShape->GetFrom()->GetEventHandler()->OnDrawContents(dc); - } - else - { - lineShape->GetTo()->GetEventHandler()->OnDraw(dc); - lineShape->GetTo()->GetEventHandler()->OnDrawContents(dc); - } - m_canvas->SetCursor(g_oglBullseyeCursor); - m_oldCursor = wxSTANDARD_CURSOR; - } -} - -void wxLineControlPoint::OnEndDragRight(double x, double y, int keys, int attachment) -{ - wxClientDC dc(GetCanvas()); - GetCanvas()->PrepareDC(dc); - - wxLineShape *lineShape = (wxLineShape *)m_shape; - if (m_type == CONTROL_POINT_ENDPOINT_FROM) - { - if (m_oldCursor) - m_canvas->SetCursor(m_oldCursor); - - m_xpos = x; m_ypos = y; - - if (lineShape->GetFrom()) - { - lineShape->GetFrom()->EraseLinks(dc); - - int new_attachment; - double distance; - - if (lineShape->GetFrom()->HitTest(x, y, &new_attachment, &distance)) - lineShape->SetAttachments(new_attachment, lineShape->GetAttachmentTo()); - - lineShape->GetFrom()->MoveLinks(dc); - } - } - if (m_type == CONTROL_POINT_ENDPOINT_TO) - { - if (m_oldCursor) - m_canvas->SetCursor(m_oldCursor); - m_shape->Erase(dc); - - m_xpos = x; m_ypos = y; - - if (lineShape->GetTo()) - { - lineShape->GetTo()->EraseLinks(dc); - - int new_attachment; - double distance; - if (lineShape->GetTo()->HitTest(x, y, &new_attachment, &distance)) - lineShape->SetAttachments(lineShape->GetAttachmentFrom(), new_attachment); - - lineShape->GetTo()->MoveLinks(dc); - } - } - int i = 0; - for (i = 0; i < lineShape->GetLineControlPoints()->Number(); i++) - if (((wxRealPoint *)(lineShape->GetLineControlPoints()->Nth(i)->Data())) == m_point) - break; - lineShape->OnMoveControlPoint(i+1, x, y); - if (!m_canvas->GetQuickEditMode()) m_canvas->Redraw(dc); -} -#endif - -/* - * Get the point on the given line (x1, y1) (x2, y2) - * distance 'length' along from the end, - * returned values in x and y - */ - -void GetPointOnLine(double x1, double y1, double x2, double y2, - double length, double *x, double *y) -{ - double l = (double)sqrt((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1)); - - if (l < 0.01) - l = (double) 0.01; - - double i_bar = (x2 - x1)/l; - double j_bar = (y2 - y1)/l; - - *x = (- length*i_bar) + x2; - *y = (- length*j_bar) + y2; -} - -wxArrowHead *wxLineShape::AddArrow(WXTYPE type, int end, double size, double xOffset, - const wxString& name, wxPseudoMetaFile *mf, long arrowId) -{ - wxArrowHead *arrow = new wxArrowHead(type, end, size, xOffset, name, mf, arrowId); - m_arcArrows.Append(arrow); - return arrow; -} - -/* - * Add arrowhead at a particular position in the arrowhead list. - */ -bool wxLineShape::AddArrowOrdered(wxArrowHead *arrow, wxList& referenceList, int end) -{ - wxNode *refNode = referenceList.First(); - wxNode *currNode = m_arcArrows.First(); - wxString targetName(arrow->GetName()); - if (!refNode) return FALSE; - - // First check whether we need to insert in front of list, - // because this arrowhead is the first in the reference - // list and should therefore be first in the current list. - wxArrowHead *refArrow = (wxArrowHead *)refNode->Data(); - if (refArrow->GetName() == targetName) - { - m_arcArrows.Insert(arrow); - return TRUE; - } - - while (refNode && currNode) - { - wxArrowHead *currArrow = (wxArrowHead *)currNode->Data(); - refArrow = (wxArrowHead *)refNode->Data(); - - // Matching: advance current arrow pointer - if ((currArrow->GetArrowEnd() == end) && - (currArrow->GetName() == refArrow->GetName())) - { - currNode = currNode->Next(); // Could be NULL now - if (currNode) - currArrow = (wxArrowHead *)currNode->Data(); - } - - // Check if we're at the correct position in the - // reference list - if (targetName == refArrow->GetName()) - { - if (currNode) - m_arcArrows.Insert(currNode, arrow); - else - m_arcArrows.Append(arrow); - return TRUE; - } - refNode = refNode->Next(); - } - m_arcArrows.Append(arrow); - return TRUE; -} - -void wxLineShape::ClearArrowsAtPosition(int end) -{ - wxNode *node = m_arcArrows.First(); - while (node) - { - wxArrowHead *arrow = (wxArrowHead *)node->Data(); - wxNode *next = node->Next(); - switch (end) - { - case -1: - { - delete arrow; - delete node; - break; - } - case ARROW_POSITION_START: - { - if (arrow->GetArrowEnd() == ARROW_POSITION_START) - { - delete arrow; - delete node; - } - break; - } - case ARROW_POSITION_END: - { - if (arrow->GetArrowEnd() == ARROW_POSITION_END) - { - delete arrow; - delete node; - } - break; - } - case ARROW_POSITION_MIDDLE: - { - if (arrow->GetArrowEnd() == ARROW_POSITION_MIDDLE) - { - delete arrow; - delete node; - } - break; - } - } - node = next; - } -} - -bool wxLineShape::ClearArrow(const wxString& name) -{ - wxNode *node = m_arcArrows.First(); - while (node) - { - wxArrowHead *arrow = (wxArrowHead *)node->Data(); - if (arrow->GetName() == name) - { - delete arrow; - delete node; - return TRUE; - } - node = node->Next(); - } - return FALSE; -} - -/* - * Finds an arrowhead at the given position (if -1, any position) - * - */ - -wxArrowHead *wxLineShape::FindArrowHead(int position, const wxString& name) -{ - wxNode *node = m_arcArrows.First(); - while (node) - { - wxArrowHead *arrow = (wxArrowHead *)node->Data(); - if (((position == -1) || (position == arrow->GetArrowEnd())) && - (arrow->GetName() == name)) - return arrow; - node = node->Next(); - } - return NULL; -} - -wxArrowHead *wxLineShape::FindArrowHead(long arrowId) -{ - wxNode *node = m_arcArrows.First(); - while (node) - { - wxArrowHead *arrow = (wxArrowHead *)node->Data(); - if (arrowId == arrow->GetId()) - return arrow; - node = node->Next(); - } - return NULL; -} - -/* - * Deletes an arrowhead at the given position (if -1, any position) - * - */ - -bool wxLineShape::DeleteArrowHead(int position, const wxString& name) -{ - wxNode *node = m_arcArrows.First(); - while (node) - { - wxArrowHead *arrow = (wxArrowHead *)node->Data(); - if (((position == -1) || (position == arrow->GetArrowEnd())) && - (arrow->GetName() == name)) - { - delete arrow; - delete node; - return TRUE; - } - node = node->Next(); - } - return FALSE; -} - -// Overloaded DeleteArrowHead: pass arrowhead id. -bool wxLineShape::DeleteArrowHead(long id) -{ - wxNode *node = m_arcArrows.First(); - while (node) - { - wxArrowHead *arrow = (wxArrowHead *)node->Data(); - if (arrow->GetId() == id) - { - delete arrow; - delete node; - return TRUE; - } - node = node->Next(); - } - return FALSE; -} - -/* - * Calculate the minimum width a line - * occupies, for the purposes of drawing lines in tools. - * - */ - -double wxLineShape::FindMinimumWidth() -{ - double minWidth = 0.0; - wxNode *node = m_arcArrows.First(); - while (node) - { - wxArrowHead *arrowHead = (wxArrowHead *)node->Data(); - minWidth += arrowHead->GetSize(); - if (node->Next()) - minWidth += arrowHead->GetSpacing(); - - node = node->Next(); - } - // We have ABSOLUTE minimum now. So - // scale it to give it reasonable aesthetics - // when drawing with line. - if (minWidth > 0.0) - minWidth = (double)(minWidth * 1.4); - else - minWidth = 20.0; - - SetEnds(0.0, 0.0, minWidth, 0.0); - Initialise(); - - return minWidth; -} - -// Find which position we're talking about at this (x, y). -// Returns ARROW_POSITION_START, ARROW_POSITION_MIDDLE, ARROW_POSITION_END -int wxLineShape::FindLinePosition(double x, double y) -{ - double startX, startY, endX, endY; - GetEnds(&startX, &startY, &endX, &endY); - - // Find distances from centre, start and end. The smallest wins. - double centreDistance = (double)(sqrt((x - m_xpos)*(x - m_xpos) + (y - m_ypos)*(y - m_ypos))); - double startDistance = (double)(sqrt((x - startX)*(x - startX) + (y - startY)*(y - startY))); - double endDistance = (double)(sqrt((x - endX)*(x - endX) + (y - endY)*(y - endY))); - - if (centreDistance < startDistance && centreDistance < endDistance) - return ARROW_POSITION_MIDDLE; - else if (startDistance < endDistance) - return ARROW_POSITION_START; - else - return ARROW_POSITION_END; -} - -// Set alignment flags -void wxLineShape::SetAlignmentOrientation(bool isEnd, bool isHoriz) -{ - if (isEnd) - { - if (isHoriz && ((m_alignmentEnd & LINE_ALIGNMENT_HORIZ) != LINE_ALIGNMENT_HORIZ)) - m_alignmentEnd |= LINE_ALIGNMENT_HORIZ; - else if (!isHoriz && ((m_alignmentEnd & LINE_ALIGNMENT_HORIZ) == LINE_ALIGNMENT_HORIZ)) - m_alignmentEnd -= LINE_ALIGNMENT_HORIZ; - } - else - { - if (isHoriz && ((m_alignmentStart & LINE_ALIGNMENT_HORIZ) != LINE_ALIGNMENT_HORIZ)) - m_alignmentStart |= LINE_ALIGNMENT_HORIZ; - else if (!isHoriz && ((m_alignmentStart & LINE_ALIGNMENT_HORIZ) == LINE_ALIGNMENT_HORIZ)) - m_alignmentStart -= LINE_ALIGNMENT_HORIZ; - } -} - -void wxLineShape::SetAlignmentType(bool isEnd, int alignType) -{ - if (isEnd) - { - if (alignType == LINE_ALIGNMENT_TO_NEXT_HANDLE) - { - if ((m_alignmentEnd & LINE_ALIGNMENT_TO_NEXT_HANDLE) != LINE_ALIGNMENT_TO_NEXT_HANDLE) - m_alignmentEnd |= LINE_ALIGNMENT_TO_NEXT_HANDLE; - } - else if ((m_alignmentEnd & LINE_ALIGNMENT_TO_NEXT_HANDLE) == LINE_ALIGNMENT_TO_NEXT_HANDLE) - m_alignmentEnd -= LINE_ALIGNMENT_TO_NEXT_HANDLE; - } - else - { - if (alignType == LINE_ALIGNMENT_TO_NEXT_HANDLE) - { - if ((m_alignmentStart & LINE_ALIGNMENT_TO_NEXT_HANDLE) != LINE_ALIGNMENT_TO_NEXT_HANDLE) - m_alignmentStart |= LINE_ALIGNMENT_TO_NEXT_HANDLE; - } - else if ((m_alignmentStart & LINE_ALIGNMENT_TO_NEXT_HANDLE) == LINE_ALIGNMENT_TO_NEXT_HANDLE) - m_alignmentStart -= LINE_ALIGNMENT_TO_NEXT_HANDLE; - } -} - -bool wxLineShape::GetAlignmentOrientation(bool isEnd) -{ - if (isEnd) - return ((m_alignmentEnd & LINE_ALIGNMENT_HORIZ) == LINE_ALIGNMENT_HORIZ); - else - return ((m_alignmentStart & LINE_ALIGNMENT_HORIZ) == LINE_ALIGNMENT_HORIZ); -} - -int wxLineShape::GetAlignmentType(bool isEnd) -{ - if (isEnd) - return (m_alignmentEnd & LINE_ALIGNMENT_TO_NEXT_HANDLE); - else - return (m_alignmentStart & LINE_ALIGNMENT_TO_NEXT_HANDLE); -} - -wxRealPoint *wxLineShape::GetNextControlPoint(wxShape *nodeObject) -{ - int n = m_lineControlPoints->Number(); - int nn = 0; - if (m_to == nodeObject) - { - // Must be END of line, so we want (n - 1)th control point. - // But indexing ends at n-1, so subtract 2. - nn = n - 2; - } - else nn = 1; - wxNode *node = m_lineControlPoints->Nth(nn); - if (node) - { - return (wxRealPoint *)node->Data(); - } - else - return FALSE; -} - -/* - * Arrowhead - * - */ - -IMPLEMENT_DYNAMIC_CLASS(wxArrowHead, wxObject) - -wxArrowHead::wxArrowHead(WXTYPE type, int end, double size, double dist, const wxString& name, - wxPseudoMetaFile *mf, long arrowId) -{ - m_arrowType = type; m_arrowEnd = end; m_arrowSize = size; - m_xOffset = dist; - m_yOffset = 0.0; - m_spacing = 5.0; - - m_arrowName = name; - m_metaFile = mf; - m_id = arrowId; - if (m_id == -1) - m_id = NewId(); -} - -wxArrowHead::wxArrowHead(wxArrowHead& toCopy) -{ - m_arrowType = toCopy.m_arrowType; m_arrowEnd = toCopy.GetArrowEnd(); - m_arrowSize = toCopy.m_arrowSize; - m_xOffset = toCopy.m_xOffset; - m_yOffset = toCopy.m_yOffset; - m_spacing = toCopy.m_spacing; - m_arrowName = toCopy.m_arrowName ; - if (toCopy.m_metaFile) - m_metaFile = new wxPseudoMetaFile(*(toCopy.m_metaFile)); - else - m_metaFile = NULL; - m_id = NewId(); -} - -wxArrowHead::~wxArrowHead() -{ - if (m_metaFile) delete m_metaFile; -} - -void wxArrowHead::SetSize(double size) -{ - m_arrowSize = size; - if ((m_arrowType == ARROW_METAFILE) && m_metaFile) - { - double oldWidth = m_metaFile->m_width; - if (oldWidth == 0.0) - return; - - double scale = (double)(size/oldWidth); - if (scale != 1.0) - m_metaFile->Scale(scale, scale); - } -} - -/* - * Label object - * - */ - -IMPLEMENT_DYNAMIC_CLASS(wxLabelShape, wxRectangleShape) - -wxLabelShape::wxLabelShape(wxLineShape *parent, wxShapeRegion *region, double w, double h):wxRectangleShape(w, h) -{ - m_lineShape = parent; - m_shapeRegion = region; - SetPen(wxThePenList->FindOrCreatePen(wxColour(0, 0, 0), 1, wxDOT)); -} - -wxLabelShape::~wxLabelShape() -{ -} - -void wxLabelShape::OnDraw(wxDC& dc) -{ - if (m_lineShape && !m_lineShape->GetDrawHandles()) - return; - - double x1 = (double)(m_xpos - m_width/2.0); - double y1 = (double)(m_ypos - m_height/2.0); - - if (m_pen) - { - if (m_pen->GetWidth() == 0) - dc.SetPen(g_oglTransparentPen); - else - dc.SetPen(m_pen); - } - dc.SetBrush(wxTRANSPARENT_BRUSH); - - if (m_cornerRadius > 0.0) - dc.DrawRoundedRectangle(WXROUND(x1), WXROUND(y1), WXROUND(m_width), WXROUND(m_height), m_cornerRadius); - else - dc.DrawRectangle(WXROUND(x1), WXROUND(y1), WXROUND(m_width), WXROUND(m_height)); -} - -void wxLabelShape::OnDrawContents(wxDC& dc) -{ -} - -void wxLabelShape::OnDragLeft(bool draw, double x, double y, int keys, int attachment) -{ - wxRectangleShape::OnDragLeft(draw, x, y, keys, attachment); -} - -void wxLabelShape::OnBeginDragLeft(double x, double y, int keys, int attachment) -{ - wxRectangleShape::OnBeginDragLeft(x, y, keys, attachment); -} - -void wxLabelShape::OnEndDragLeft(double x, double y, int keys, int attachment) -{ - wxRectangleShape::OnEndDragLeft(x, y, keys, attachment); -} - -bool wxLabelShape::OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display) -{ - m_shapeRegion->SetSize(m_width, m_height); - - // Find position in line's region list - int i = 0; - wxNode *node = m_lineShape->GetRegions().First(); - while (node) - { - if (m_shapeRegion == (wxShapeRegion *)node->Data()) - node = NULL; - else - { - node = node->Next(); - i ++; - } - } - double xx, yy; - m_lineShape->GetLabelPosition(i, &xx, &yy); - // Set the region's offset, relative to the default position for - // each region. - m_shapeRegion->SetPosition((double)(x - xx), (double)(y - yy)); - - // Need to reformat to fit region. - if (m_shapeRegion->GetText()) - { - - wxString s(m_shapeRegion->GetText()); - m_lineShape->FormatText(dc, s, i); - m_lineShape->DrawRegion(dc, m_shapeRegion, xx, yy); - } - return TRUE; -} - -// Divert left and right clicks to line object -void wxLabelShape::OnLeftClick(double x, double y, int keys, int attachment) -{ - m_lineShape->GetEventHandler()->OnLeftClick(x, y, keys, attachment); -} - -void wxLabelShape::OnRightClick(double x, double y, int keys, int attachment) -{ - m_lineShape->GetEventHandler()->OnRightClick(x, y, keys, attachment); -} - diff --git a/utils/ogl/src/lines.h b/utils/ogl/src/lines.h deleted file mode 100644 index e15a64b93d..0000000000 --- a/utils/ogl/src/lines.h +++ /dev/null @@ -1,295 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: lines.h -// Purpose: wxLineShape -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _OGL_LINES_H_ -#define _OGL_LINES_H_ - -#ifdef __GNUG__ -#pragma interface "lines.h" -#endif - -class wxLabelShape; -class wxPseudoMetaFile; -class wxLineControlPoint; -/* - * Arcs with multiple arrowheads - * - */ - -// Types of arrowhead -// (i) Built-in -#define ARROW_HOLLOW_CIRCLE 1 -#define ARROW_FILLED_CIRCLE 2 -#define ARROW_ARROW 3 -#define ARROW_SINGLE_OBLIQUE 4 -#define ARROW_DOUBLE_OBLIQUE 5 -// (ii) Custom -#define ARROW_METAFILE 20 - -// Position of arrow on line -#define ARROW_POSITION_START 0 -#define ARROW_POSITION_END 1 -#define ARROW_POSITION_MIDDLE 2 - -// Line alignment flags -// Vertical by default -#define LINE_ALIGNMENT_HORIZ 1 -#define LINE_ALIGNMENT_VERT 0 -#define LINE_ALIGNMENT_TO_NEXT_HANDLE 2 -#define LINE_ALIGNMENT_NONE 0 - -class wxArrowHead: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxArrowHead) - - public: - wxArrowHead(WXTYPE type = 0, int end = 0, double size = 0.0, double dist = 0.0, const wxString& name = "", wxPseudoMetaFile *mf = NULL, - long arrowId = -1); - ~wxArrowHead(); - wxArrowHead(wxArrowHead& toCopy); - - inline WXTYPE _GetType() const { return m_arrowType; } - inline int GetPosition() const { return m_arrowEnd; } - inline void SetPosition(int pos) { m_arrowEnd = pos; } - inline double GetXOffset() const { return m_xOffset; } - inline double GetYOffset() const { return m_yOffset; } - inline double GetSpacing() const { return m_spacing; } - inline double GetSize() const { return m_arrowSize; } - inline wxString GetName() const { return m_arrowName; } - inline void SetXOffset(double x) { m_xOffset = x; } - inline void SetYOffset(double y) { m_yOffset = y; } - inline wxPseudoMetaFile *GetMetaFile() const { return m_metaFile; } - inline long GetId() const { return m_id; } - inline int GetArrowEnd() const { return m_arrowEnd; } - inline double GetArrowSize() const { return m_arrowSize; } - void SetSize(double size); - inline void SetSpacing(double sp) { m_spacing = sp; } - - protected: - WXTYPE m_arrowType; - int m_arrowEnd; // Position on line - double m_xOffset; // Distance from arc start or end, w.r.t. point on arrowhead - // nearest start or end. If zero, use default spacing. - double m_yOffset; // vertical offset (w.r.t. a horizontal line). Normally zero. - double m_spacing; // Spacing from the last arrowhead - double m_arrowSize; // Length of arrowhead - wxString m_arrowName; // Name of arrow - bool m_saveToFile; // TRUE if we want to save custom arrowheads to file. - wxPseudoMetaFile* m_metaFile; // Pseudo metafile if this is a custom arrowhead - long m_id; // identifier -}; - -// Line object -class wxLineShape: public wxShape -{ - DECLARE_DYNAMIC_CLASS(wxLineShape) - - public: - wxLineShape(); - ~wxLineShape(); - - // Called when a connected object has moved, to move the link to - // correct position - // moveControlPoints must be disabled when a control point is being - // dragged. - void OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE); - bool OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE); - void OnDraw(wxDC& dc); - void OnDrawContents(wxDC& dc); - void OnDrawControlPoints(wxDC& dc); - void OnEraseControlPoints(wxDC& dc); - void OnErase(wxDC& dc); - virtual inline void OnMoveControlPoint(int WXUNUSED(which), double WXUNUSED(x), double WXUNUSED(y)) {} - void OnDrawOutline(wxDC& dc, double x, double y, double w, double h); - void GetBoundingBoxMin(double *w, double *h); - void FormatText(wxDC& dc, const wxString& s, int regionId = 0); - virtual void SetEnds(double x1, double y1, double x2, double y2); - virtual void GetEnds(double *x1, double *y1, double *x2, double *y2); - inline virtual wxShape *GetFrom() { return m_from; } - inline virtual wxShape *GetTo() { return m_to; } - inline virtual int GetAttachmentFrom() { return m_attachmentFrom; } - inline virtual int GetAttachmentTo() { return m_attachmentTo; } - - virtual void SetFrom(wxShape *object); - virtual void SetTo(wxShape *object); - virtual void DrawArrows(wxDC& dc); - - // Finds the x, y points at the two ends of the line. - // This function can be used by e.g. line-routing routines to - // get the actual points on the two node images where the lines will be drawn - // to/from. - void FindLineEndPoints(double *fromX, double *fromY, double *toX, double *toY); - - // Format one region at this position - void DrawRegion(wxDC& dc, wxShapeRegion *region, double x, double y); - - // Erase one region at this position - void EraseRegion(wxDC& dc, wxShapeRegion *region, double x, double y); - - // Get the reference point for a label. Region x and y - // are offsets from this. - // position is 0 (middle), 1 (start), 2 (end) - void GetLabelPosition(int position, double *x, double *y); - - // Straighten verticals and horizontals - virtual void Straighten(wxDC& dc); - - // Not implemented - inline void SetMaintainStraightLines(bool flag) { m_maintainStraightLines = flag; } - inline bool GetMaintainStraightLines() const { return m_maintainStraightLines; } - - // Make handle control points - void MakeControlPoints(); - void ResetControlPoints(); - - // Make a given number of control points - virtual void MakeLineControlPoints(int n); - virtual wxNode *InsertLineControlPoint(wxDC* dc); - virtual bool DeleteLineControlPoint(); - virtual void Initialise(); - inline wxList *GetLineControlPoints() { return m_lineControlPoints; } - - // Override dragging behaviour - don't want to be able to drag lines! - void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); - void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); - void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); - - // Control points ('handles') redirect control to the actual shape, to make it easier - // to override sizing behaviour. - virtual void OnSizingDragLeft(wxControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); - virtual void OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0); - virtual void OnSizingEndDragLeft(wxControlPoint* pt, double x, double y, int keys=0, int attachment = 0); - - // Override select, to create/delete temporary label-moving objects - void Select(bool select = TRUE, wxDC* dc = NULL); - - // Set to spline (TRUE) or line (FALSE) - inline void SetSpline(bool spl) { m_isSpline = spl; } - inline bool IsSpline() const { return m_isSpline; } - - void Unlink(); - void SetAttachments(int from_attach, int to_attach); - inline void SetAttachmentFrom(int attach) { m_attachmentFrom = attach; } - inline void SetAttachmentTo(int attach) { m_attachmentTo = attach; } - - bool HitTest(double x, double y, int *attachment, double *distance); - -#ifdef PROLOGIO - // Prolog database stuff - virtual char *GetFunctor(); - virtual void WritePrologAttributes(wxExpr *clause); - virtual void ReadPrologAttributes(wxExpr *clause); -#endif - - virtual void FindNth(wxShape *image, int *nth, int *no_arcs, bool incoming); - - // Find which position we're talking about at this (x, y). - // Returns ARROW_POSITION_START, ARROW_POSITION_MIDDLE, ARROW_POSITION_END - int FindLinePosition(double x, double y); - - // This is really to distinguish between lines and other images. - // For lines, want to pass drag to canvas, since lines tend to prevent - // dragging on a canvas (they get in the way.) - virtual bool Draggable() const { return FALSE; } - - // Does the copying for this object - void Copy(wxShape& copy); - - // Add an arrowhead. - wxArrowHead *AddArrow(WXTYPE type, int end = ARROW_POSITION_END, - double arrowSize = 10.0, double xOffset = 0.0, const wxString& name = "", - wxPseudoMetaFile *mf = NULL, long arrowId = -1); - - // Add an arrowhead in the position indicated by the reference - // list of arrowheads, which contains all legal arrowheads for this - // line, in the correct order. - // E.g. reference list: a b c d e - // Current line list: a d - // Add c, then line list is: a c d - // If no legal arrowhead position, return FALSE. - // Assume reference list is for one end only, since it potentially defines - // the ordering for any one of the 3 positions. So we don't check - // the reference list for arrowhead position. - bool AddArrowOrdered(wxArrowHead *arrow, wxList& referenceList, int end); - - // Delete arrowhead(s) - void ClearArrowsAtPosition(int end = -1); - bool ClearArrow(const wxString& name); - wxArrowHead *FindArrowHead(int position, const wxString& name); - wxArrowHead *FindArrowHead(long arrowId); - bool DeleteArrowHead(int position, const wxString& name); - bool DeleteArrowHead(long arrowId); - void DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool proportionalOffset); - inline void SetIgnoreOffsets(bool ignore) { m_ignoreArrowOffsets = ignore; } - inline wxList& GetArrows() const { return (wxList&) m_arcArrows; } - - // Find horizontal width for drawing a line with - // arrows in minimum space. Assume arrows at - // END only - double FindMinimumWidth(); - - // Set alignment flags. ALIGNMENT NOT IMPLEMENTED. - void SetAlignmentOrientation(bool isEnd, bool isHoriz); - void SetAlignmentType(bool isEnd, int alignType); - bool GetAlignmentOrientation(bool isEnd); - int GetAlignmentType(bool isEnd); - - // Find next control point in line after the start/end point - // (depending on whether the node object is at start or end) - wxRealPoint *GetNextControlPoint(wxShape *nodeObject); - inline bool IsEnd(wxShape *nodeObject) const { return (m_to == nodeObject); } - -private: - bool m_erasing; // flag to say whether we're erasing or drawing - // this line (really so metafiles can draw a - // blank rectangle) - bool m_ignoreArrowOffsets; // Don't always want to draw arrowhead offsets - // because they may not work on tool palettes (for example) - bool m_isSpline; - bool m_maintainStraightLines; - -protected: - // Temporary list of line segment orientations - // so we know what direction the line is supposed to be dog-legging - // in. The values are integer: 0 for vertical, 1 for horizontal. - wxList m_lineOrientations; - - // Temporary pointers for start, middle and end label editing objects - // (active only when the line is selected) - wxLabelShape* m_labelObjects[3]; - - // These define the segmented line - not to be confused with temporary control - // points which appear when object is selected (although in this case they'll - // probably be the same) - wxList* m_lineControlPoints; - - double m_arrowSpacing; // Separation between adjacent arrows - - wxShape* m_to; - wxShape* m_from; - -/* - double m_actualTextWidth; // Space the text takes up - double m_actualTextHeight; // (depends on text content unlike nodes) -*/ - int m_attachmentTo; // Attachment point at one end - int m_attachmentFrom; // Attachment point at other end - - // Alignment flags - int m_alignmentStart; - int m_alignmentEnd; - - wxList m_arcArrows; - -}; - -#endif - // _OGL_LINES_H_ diff --git a/utils/ogl/src/linesp.h b/utils/ogl/src/linesp.h deleted file mode 100644 index 70b7026d74..0000000000 --- a/utils/ogl/src/linesp.h +++ /dev/null @@ -1,88 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: linesp.h -// Purpose: Lines private header file -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _OGL_LINESP_H_ -#define _OGL_LINESP_H_ - -#ifdef __GNUG__ -#pragma interface "linesp.h" -#endif - -class wxLineShape; -class wxLineControlPoint: public wxControlPoint -{ - DECLARE_DYNAMIC_CLASS(wxLineControlPoint) - friend class wxLineShape; - public: - - wxLineControlPoint(wxShapeCanvas *the_canvas = NULL, wxShape *object = NULL, double size = 0.0, - double x = 0.0, double y = 0.0, int the_type = 0); - ~wxLineControlPoint(); - - void OnDraw(wxDC& dc); - void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); - void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); - void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); - - // Obsolete (left-dragging now moves attachment point to new relative position OR new - // attachment id) -#if 0 - void OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0); - void OnBeginDragRight(double x, double y, int keys=0, int attachment = 0); - void OnEndDragRight(double x, double y, int keys=0, int attachment = 0); -#endif - -public: - - int m_type; - wxRealPoint* m_point; // Line point - -}; - -/* - * Temporary arc label object - */ - -class wxLabelShape: public wxRectangleShape -{ - DECLARE_DYNAMIC_CLASS(wxLabelShape) - - public: - wxLabelShape(wxLineShape *parent = NULL, wxShapeRegion *region = NULL, double w = 0.0, double h = 0.0); - ~wxLabelShape(); - - void OnDraw(wxDC& dc); - void OnDrawContents(wxDC& dc); - void OnLeftClick(double x, double y, int keys = 0, int attachment = 0); - void OnRightClick(double x, double y, int keys = 0, int attachment = 0); - void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); - void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); - void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); - bool OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE); - -public: - wxLineShape* m_lineShape; - wxShapeRegion* m_shapeRegion; - -}; - -/* - * Get the point on the given line (x1, y1) (x2, y2) - * distance 'length' along from the end, - * returned values in x and y - */ - -void GetPointOnLine(double x1, double y1, double x2, double y2, - double length, double *x, double *y); - -#endif - // _OGL_LINESP_H_ - diff --git a/utils/ogl/src/makefile.b32 b/utils/ogl/src/makefile.b32 deleted file mode 100644 index 7945902454..0000000000 --- a/utils/ogl/src/makefile.b32 +++ /dev/null @@ -1,106 +0,0 @@ -# -# File: makefile.b32 -# Author: Julian Smart -# Created: 1996 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds OGL for BC++, 32-bit. - -!if "$(BCCDIR)" == "" -!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 -!endif - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -# Change WXDIR to wherever wxWindows is found -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXLIB = $(WXDIR)\lib\wx32.lib -WXINC = $(WXDIR)\include -CFG=$(WXWIN)\src\wxwin32.cfg - -OGLDIR = $(WXDIR)\utils\ogl -OGLLIB = $(WXDIR)\lib\ogl.lib -DOCDIR = $(OGLDIR)\docs - -INC=/DPROLOGIO=1 # /I$(WXDIR)\include\base /I$(WXDIR)\include\msw - -LIBS=$(WXLIB) $(OGLLIB) mathwl cwl import mathwl - -!ifndef FINAL -FINAL=0 -!endif - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -DDEBUG=$(DEBUG) -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -O2 -DEBUG_FLAGS = -DDEBUG=$(DEBUG) -!endif - -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) -CFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = basic.obj basic2.obj canvas.obj ogldiag.obj lines.obj misc.obj divided.obj constrnt.obj\ - composit.obj drawn.obj bitmap.obj mfutils.obj - -all: $(OGLLIB) - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) $(INC) -c {$< } - -$(OGLLIB): $(OBJECTS) - erase $(OGLLIB) - tlib /P128 @&&! -$(OGLLIB) & -+$(OBJECTS:.obj =.obj +) -! - -# Making documents -docs: hlp -hlp: $(DOCDIR)/ogl.hlp -hlp32: $(DOCDIR)/hlp32/ogl.hlp -rtf: $(DOCDIR)/ogl.rtf - -$(DOCDIR)/ogl.hlp: $(DOCDIR)/ogl.rtf $(DOCDIR)/ogl.hpj - cd $(DOCDIR) - -erase ogl.ph - hc ogl - cd $(THISDIR) - -$(DOCDIR)/hlp32/ogl.hlp: $(DOCDIR)/hlp32/ogl.rtf $(DOCDIR)/hlp32/ogl.hpj - cd $(DOCDIR)/hlp32 - -erase ogl.ph - start /w hcw /c /e ogl.hpj - cd $(THISDIR) - -$(DOCDIR)/ogl.rtf: $(DOCDIR)/classes.tex $(DOCDIR)/intro.tex $(DOCDIR)/ogl.tex - cd $(DOCDIR) - start /w tex2rtf $(DOCDIR)/ogl.tex $(DOCDIR)/ogl.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)/hlp32/ogl.rtf: $(DOCDIR)/classes.tex $(DOCDIR)/intro.tex $(DOCDIR)/ogl.tex - cd $(DOCDIR) - start /w tex2rtf $(DOCDIR)/ogl.tex $(DOCDIR)/hlp32/ogl.rtf -twice -winhelp -macros $(DOCDIR)/t2rtf32.ini - cd $(THISDIR) - -wordrtf: - cd $(DOCDIR) - -wx /W tex2rtf $(DOCDIR)/ogl.tex $(DOCDIR)/ogl.rtf -twice -rtf - cd $(THISDIR) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase ..\lib\*.lib $(OGLLIB) - diff --git a/utils/ogl/src/makefile.bcc b/utils/ogl/src/makefile.bcc deleted file mode 100644 index 92a3d67369..0000000000 --- a/utils/ogl/src/makefile.bcc +++ /dev/null @@ -1,105 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1996 -# Updated: -# Copyright: (c) 1996 -# -# "%W% %G%" -# -# Makefile : Builds OGL for BC++, 16-bit. - -!if "$(BCCDIR)" == "" -!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 -!endif - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -# Change WXDIR to wherever wxWindows is found -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makebcc.env - -WXLIB = $(WXDIR)\lib\wx.lib -WXINC = $(WXDIR)\include -CFG=$(WXWIN)\src\wxwin.cfg - -OGLDIR = $(WXDIR)\utils\ogl -OGLLIB = $(OGLDIR)\lib\ogl.lib -DOCDIR = $(OGLDIR)\docs - -INC=/DPROLOGIO=1 # /I$(WXDIR)\include\base /I$(WXDIR)\include\msw - -LIBS=$(WXLIB) $(OGLLIB) mathwl cwl import mathwl - -!ifndef FINAL -FINAL=0 -!endif - -!if "$(FINAL)" == "0" -LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -O2 -DEBUG_FLAGS= -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) -CFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -OBJECTS = basic.obj basic2.obj canvas.obj ogldiag.obj lines.obj misc.obj divided.obj constrnt.obj\ - composit.obj drawn.obj bitmap.obj mfutils.obj - -all: $(OGLLIB) - -.$(SRCSUFF).obj: - bcc $(CPPFLAGS) $(INC) -c {$< } - -$(OGLLIB): $(OBJECTS) - erase $(OGLLIB) - tlib /P128 @&&! -$(OGLLIB) & -+$(OBJECTS:.obj =.obj +) -! - -# Making documents -docs: hlp -hlp: $(DOCDIR)/ogl.hlp -hlp32: $(DOCDIR)/hlp32/ogl.hlp -rtf: $(DOCDIR)/ogl.rtf - -$(DOCDIR)/ogl.hlp: $(DOCDIR)/ogl.rtf $(DOCDIR)/ogl.hpj - cd $(DOCDIR) - -erase ogl.ph - hc ogl - cd $(THISDIR) - -$(DOCDIR)/hlp32/ogl.hlp: $(DOCDIR)/hlp32/ogl.rtf $(DOCDIR)/hlp32/ogl.hpj - cd $(DOCDIR)/hlp32 - -erase ogl.ph - start /w hcw /c /e ogl.hpj - cd $(THISDIR) - -$(DOCDIR)/ogl.rtf: $(DOCDIR)/classes.tex $(DOCDIR)/intro.tex $(DOCDIR)/ogl.tex - cd $(DOCDIR) - start /w tex2rtf $(DOCDIR)/ogl.tex $(DOCDIR)/ogl.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)/hlp32/ogl.rtf: $(DOCDIR)/classes.tex $(DOCDIR)/intro.tex $(DOCDIR)/ogl.tex - cd $(DOCDIR) - start /w tex2rtf $(DOCDIR)/ogl.tex $(DOCDIR)/hlp32/ogl.rtf -twice -winhelp -macros $(DOCDIR)/t2rtf32.ini - cd $(THISDIR) - -wordrtf: - cd $(DOCDIR) - -wx /W tex2rtf $(DOCDIR)/ogl.tex $(DOCDIR)/ogl.rtf -twice -rtf - cd $(THISDIR) - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase ..\lib\*.lib - diff --git a/utils/ogl/src/makefile.dos b/utils/ogl/src/makefile.dos deleted file mode 100644 index 179e52a37f..0000000000 --- a/utils/ogl/src/makefile.dos +++ /dev/null @@ -1,161 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile: Builds object graphics library (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -OGLDIR = $(WXDIR)\utils\ogl -THISDIR = $(OGLDIR)\src -DOCDIR = $(OGLDIR)\docs -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) libw llibcew commdlg shell ctl3dv2 - -GRAPHICSLIB = $(WXDIR)\lib\ogl.lib -INC = /I$(WXDIR)\include - -# Normally set OPTIONS = -# to disable PROLOGIO-dependent code -OPTIONS = -DPROLOGIO - -OBJECTS = basic.obj basic2.obj canvas.obj ogldiag.obj lines.obj misc.obj divided.obj constrnt.obj\ - composit.obj drawn.obj bitmap.obj mfutils.obj - -all: $(GRAPHICSLIB) - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos $(WXLIB) FINAL=$(FINAL) - cd $(THISDIR) - -$(GRAPHICSLIB): $(OBJECTS) - erase $(GRAPHICSLIB) - lib /PAGESIZE:128 @<< -$(GRAPHICSLIB) -y -$(OBJECTS) -nul -; -<< - -# NOTE: This causes a floating point stack error when optimized, -# so DON'T optimize! - -basic.obj: basic.$(SRCSUFF) basic.h lines.h misc.h canvas.h - cl @<< -$(CPPFLAGS) /Od /c /Tp $*.$(SRCSUFF) -<< - -basic2.obj: basic2.$(SRCSUFF) basic.h lines.h misc.h canvas.h - cl @<< -$(CPPFLAGS) /Od /c /Tp $*.$(SRCSUFF) -<< - -canvas.obj: canvas.$(SRCSUFF) basic.h misc.h canvas.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -ogldiag.obj: ogldiag.$(SRCSUFF) ogldiag.h canvas.h basic.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -lines.obj: lines.$(SRCSUFF) basic.h misc.h canvas.h lines.h basicp.h linesp.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -misc.obj: misc.$(SRCSUFF) basic.h misc.h constrnt.h basicp.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -divided.obj: divided.$(SRCSUFF) basic.h misc.h canvas.h divided.h basicp.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -constrnt.obj: constrnt.$(SRCSUFF) basic.h constrnt.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -composit.obj: composit.$(SRCSUFF) basic.h misc.h canvas.h constrnt.h composit.h basicp.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -drawn.obj: drawn.$(SRCSUFF) basic.h misc.h canvas.h drawn.h drawnp.h basicp.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -bitmap.obj: bitmap.$(SRCSUFF) basic.h misc.h canvas.h bitmap.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -mfutils.obj: mfutils.$(SRCSUFF) mfutils.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -# Making documents -docs: hlp -hlp: $(DOCDIR)/ogl.hlp -hlp32: $(DOCDIR)/hlp32/ogl.hlp -rtf: $(DOCDIR)/ogl.rtf - -$(DOCDIR)/ogl.hlp: $(DOCDIR)/ogl.rtf $(DOCDIR)/ogl.hpj - cd $(DOCDIR) - -erase ogl.ph - hc ogl - cd $(THISDIR) - -$(DOCDIR)/hlp32/ogl.hlp: $(DOCDIR)/hlp32/ogl.rtf $(DOCDIR)/hlp32/ogl.hpj - cd $(DOCDIR)/hlp32 - -erase ogl.ph - start /w hcw /c /e ogl.hpj - cd $(THISDIR) - -$(DOCDIR)/ogl.rtf: $(DOCDIR)/classes.tex $(DOCDIR)/intro.tex $(DOCDIR)/ogl.tex - cd $(DOCDIR) - start /w tex2rtf $(DOCDIR)/ogl.tex $(DOCDIR)/ogl.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)/hlp32/ogl.rtf: $(DOCDIR)/classes.tex $(DOCDIR)/intro.tex $(DOCDIR)/ogl.tex - cd $(DOCDIR) - start /w tex2rtf $(DOCDIR)/ogl.tex $(DOCDIR)/hlp32/ogl.rtf -twice -winhelp -macros $(DOCDIR)/t2rtf32.ini - cd $(THISDIR) - -wordrtf: - cd $(DOCDIR) - -wx /W tex2rtf $(DOCDIR)/ogl.tex $(DOCDIR)/ogl.rtf -twice -rtf - cd $(THISDIR) - -clean: - -erase *.obj - -erase *.sbr - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb - -erase *.lib - -erase ..\lib\*.lib - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) diff --git a/utils/ogl/src/makefile.nt b/utils/ogl/src/makefile.nt deleted file mode 100644 index dfd5a0b159..0000000000 --- a/utils/ogl/src/makefile.nt +++ /dev/null @@ -1,180 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds OGL classes library (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) -OBJECTSDIR = $(WXDIR)\utils\ogl -THISDIR = $(WXDIR)\utils\ogl\src -EXTRALIBS=$(WXDIR)\lib\ogl.lib $(WXDIR)\lib\mfutils.lib -EXTRAINC=/I$(WXDIR)\utils\mfutils\src /I$(WXDIR)\utils\prologio\src -EXTRAFLAGS=/DPROLOGIO=1 -DOCDIR=$(WXDIR)\docs -LOCALDOCDIR=$(WXDIR)\utils\ogl\docs - -!include $(WXDIR)\src\ntwxwin.mak - -PROGRAM=test - -OBJECTS = basic.obj basic2.obj canvas.obj ogldiag.obj lines.obj misc.obj divided.obj constrnt.obj\ - composit.obj drawn.obj bitmap.obj mfutils.obj - -LIBTARGET=$(WXDIR)\lib\ogl.lib - -all: $(LIBTARGET) - -$(PROGRAM): $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(LIBTARGET): $(OBJECTS) - -erase $(LIBTARGET) - $(implib) @<< --out:$(LIBTARGET) --machine:$(CPU) -$(OBJECTS) -<< - -# NOTE: This causes a floating point stack error when optimized, -# so DON'T optimize! -basic.obj: basic.$(SRCSUFF) basic.h lines.h misc.h canvas.h - cl @<< -$(CPPFLAGS) /Od /c /Tp $*.$(SRCSUFF) -<< - -basic2.obj: basic2.$(SRCSUFF) basic.h lines.h misc.h canvas.h - cl @<< -$(CPPFLAGS) /Od /c /Tp $*.$(SRCSUFF) -<< - -canvas.obj: canvas.$(SRCSUFF) basic.h misc.h canvas.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -ogldiag.obj: ogldiag.$(SRCSUFF) ogldiag.h canvas.h basic.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -lines.obj: lines.$(SRCSUFF) basic.h misc.h canvas.h lines.h basicp.h linesp.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -misc.obj: misc.$(SRCSUFF) basic.h misc.h constrnt.h basicp.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -divided.obj: divided.$(SRCSUFF) basic.h misc.h canvas.h divided.h basicp.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -constrnt.obj: constrnt.$(SRCSUFF) basic.h constrnt.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -composit.obj: composit.$(SRCSUFF) basic.h misc.h canvas.h constrnt.h composit.h basicp.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -drawn.obj: drawn.$(SRCSUFF) basic.h misc.h canvas.h drawn.h drawnp.h basicp.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -bitmap.obj: bitmap.$(SRCSUFF) basic.h misc.h canvas.h bitmap.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -mfutils.obj: mfutils.$(SRCSUFF) mfutils.h - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -clean: - -erase *.obj - -erase *.sbr - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb - -erase $(LIBTARGET) - -DOCSOURCES=$(LOCALDOCDIR)\ogl.tex \ - $(LOCALDOCDIR)\bugs.tex $(LOCALDOCDIR)\changes.tex\ - $(LOCALDOCDIR)\classes.tex $(LOCALDOCDIR)\intro.tex\ - $(LOCALDOCDIR)\topics.tex $(LOCALDOCDIR)\sample.tex - -html: $(DOCDIR)\html\ogl\ogl.htm -hlp: $(DOCDIR)\winhelp\ogl.hlp -pdfrtf: $(DOCDIR)\pdf\ogl.rtf -ps: $(DOCDIR)\ps\ogl.ps - -$(DOCDIR)\winhelp\ogl.hlp: $(LOCALDOCDIR)\ogl.rtf $(LOCALDOCDIR)\ogl.hpj - cd $(LOCALDOCDIR) - -erase ogl.ph - hc ogl - move ogl.hlp $(DOCDIR)\winhelp\ogl.hlp - move ogl.cnt $(DOCDIR)\winhelp\ogl.cnt - cd $(THISDIR) - -$(LOCALDOCDIR)\ogl.rtf: $(DOCSOURCES) - cd $(LOCALDOCDIR) - -start /w tex2rtf $(LOCALDOCDIR)\ogl.tex $(LOCALDOCDIR)\ogl.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)\pdf\ogl.rtf: $(DOCSOURCES) - cd $(LOCALDOCDIR) - -copy *.bmp $(DOCDIR)\pdf - -start /w tex2rtf $(LOCALDOCDIR)\ogl.tex $(DOCDIR)\pdf\ogl.rtf -twice -rtf - cd $(THISDIR) - -$(DOCDIR)\html\ogl\ogl.htm: $(DOCSOURCES) - cd $(LOCALDOCDIR) - -mkdir $(DOCDIR)\html\ogl - cp *.gif $(DOCDIR)\html\ogl - -start /w tex2rtf $(LOCALDOCDIR)\ogl.tex $(DOCDIR)\html\ogl\ogl.htm -twice -html - -erase $(DOCDIR)\html\ogl\*.con - -erase $(DOCDIR)\html\ogl\*.ref - cd $(THISDIR) - -$(LOCALDOCDIR)\ogl.dvi: $(DOCSOURCES) - cd $(LOCALDOCDIR) - -latex ogl - -latex ogl - -makeindx ogl - -bibtex ogl - -latex ogl - -latex ogl - cd $(THISDIR) - -$(WXDIR)\docs\ps\ogl.ps: $(LOCALDOCDIR)\ogl.dvi - cd $(LOCALDOCDIR) - -dvips32 -o ogl.ps ogl - move ogl.ps $(WXDIR)\docs\ps\ogl.ps - cd $(THISDIR) - - diff --git a/utils/ogl/src/makefile.unx b/utils/ogl/src/makefile.unx deleted file mode 100644 index 83ef912268..0000000000 --- a/utils/ogl/src/makefile.unx +++ /dev/null @@ -1,125 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1996 -# Updated: -# Copyright: (c) 1996 Julian Smart -# -# "%W% %G%" -# -# Makefile for object graphics library (UNIX). - -WXDIR = ../../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/make.env - -PRODIR = $(WXDIR)/utils/prologio -PROINC = $(PRODIR)/src -PROLIB = $(PRODIR)/lib/libproio$(GUISUFFIX).a - -MFDIR = $(WXDIR)/utils/mfutils -MFINC = $(MFDIR)/src - -OGLDIR = $(WXDIR)/utils/ogl -OGLLIB = $(OGLDIR)/lib/libogl$(GUISUFFIX).a - -OBJECTS = $(OBJDIR)/basic.o $(OBJDIR)/basic2.o $(OBJDIR)/canvas.o $(OBJDIR)/lines.o $(OBJDIR)/misc.o\ - $(OBJDIR)/divided.o $(OBJDIR)/constrnt.o $(OBJDIR)/composit.o $(OBJDIR)/drawn.o\ - $(OBJDIR)/bitmap.o $(OBJDIR)/ogldiag.o - -CPPFLAGS = -I$(PROINC) -I$(MFINC) $(XINCLUDE) $(INC) $(GUI) -DDEBUG='$(DEBUG)' $(DEBUGFLAGS) $(WARN) $(OPTIONS) -DPROLOGIO - -all: $(OBJDIR) $(OGLLIB) - -.SUFFIXES: - -wx: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx OPT=$(OPT) GUI=$(GUI) - -motif: - $(MAKE) -f makefile.unx GUI=-Dwx_motif OPT=$(OPT) GUISUFFIX=_motif LDLIBS='$(MOTIFLDLIBS)' XVIEW_LINK= - -xview: - $(MAKE) -f makefile.unx GUI=-Dwx_xview OPT=$(OPT) GUISUFFIX=_ol - -hp: - $(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' DEBUGFLAGS='-g' OPT='' WARN='-w' \ - XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' \ - LDLIBS='$(HPLDLIBS)' - -$(OBJDIR): - mkdir $(OBJDIR) - -$(OGLLIB): $(OBJECTS) - rm -f $@ - ar $(AROPTIONS) $@ $(OBJECTS) - $(RANLIB) $@ - -$(OBJDIR)/basic.o: basic.$(SRCSUFF) basic.h lines.h misc.h canvas.h - $(CC) -c $(CPPFLAGS) -o $@ basic.$(SRCSUFF) - -$(OBJDIR)/basic2.o: basic2.$(SRCSUFF) basic.h lines.h misc.h canvas.h - $(CC) -c $(CPPFLAGS) -o $@ basic2.$(SRCSUFF) - -$(OBJDIR)/canvas.o: canvas.$(SRCSUFF) basic.h misc.h canvas.h - $(CC) -c $(CPPFLAGS) -o $@ canvas.$(SRCSUFF) - -$(OBJDIR)/lines.o: lines.$(SRCSUFF) basic.h misc.h canvas.h lines.h - $(CC) -c $(CPPFLAGS) -o $@ lines.$(SRCSUFF) - -$(OBJDIR)/misc.o: misc.$(SRCSUFF) basic.h misc.h constrnt.h - $(CC) -c $(CPPFLAGS) -o $@ misc.$(SRCSUFF) - -$(OBJDIR)/divided.o: divided.$(SRCSUFF) basic.h misc.h canvas.h divided.h - $(CC) -c $(CPPFLAGS) -o $@ divided.$(SRCSUFF) - -$(OBJDIR)/constrnt.o: constrnt.$(SRCSUFF) basic.h constrnt.h - $(CC) -c $(CPPFLAGS) -o $@ constrnt.$(SRCSUFF) - -$(OBJDIR)/composit.o: composit.$(SRCSUFF) basic.h misc.h canvas.h constrnt.h composit.h - $(CC) -c $(CPPFLAGS) -o $@ composit.$(SRCSUFF) - -$(OBJDIR)/drawn.o: drawn.$(SRCSUFF) basic.h misc.h canvas.h drawn.h drawnp.h - $(CC) -c $(CPPFLAGS) -o $@ drawn.$(SRCSUFF) - -$(OBJDIR)/bitmap.o: bitmap.$(SRCSUFF) basic.h misc.h canvas.h bitmap.h - $(CC) -c $(CPPFLAGS) -o $@ bitmap.$(SRCSUFF) - -$(OBJDIR)/ogldiag.o: ogldiag.$(SRCSUFF) basic.h misc.h canvas.h bitmap.h ogldiag.h - $(CC) -c $(CPPFLAGS) -o $@ ogldiag.$(SRCSUFF) - -HTMLDIR=/home/hardy/html/wx/manuals - -docs: ps xlp -ps: $(OGLDIR)/docs/ogl.ps -xlp: $(OGLDIR)/docs/ogl.xlp -html: $(HTMLDIR)/ogl/ogl_contents.html - -$(OGLDIR)/docs/ogl.xlp: $(OGLDIR)/docs/classes.tex $(OGLDIR)/docs/ogl.tex $(OGLDIR)/docs/topics.tex $(OGLDIR)/docs/changes.tex $(OGLDIR)/docs/intro.tex - cd ../docs; tex2rtf ogl.tex tmp.xlp -xlp -twice - sed -e "s/WXHELPCONTENTS/OGL Manual/g" < $(OGLDIR)/docs/tmp.xlp > $(OGLDIR)/docs/ogl.xlp - /bin/rm -f $(OGLDIR)/docs/tmp.xlp - -$(HTMLDIR)/ogl/ogl_contents.html: $(OGLDIR)/docs/classes.tex $(OGLDIR)/docs/ogl.tex $(OGLDIR)/docs/topics.tex $(OGLDIR)/docs/changes.tex $(OGLDIR)/docs/intro.tex - cd ../docs; tex2rtf ogl.tex $(HTMLDIR)/ogl/ogl -twice -html - -$(OGLDIR)/docs/ogl.dvi: $(OGLDIR)/docs/ogl.tex $(OGLDIR)/docs/classes.tex $(OGLDIR)/docs/topics.tex $(OGLDIR)/docs/changes.tex $(OGLDIR)/docs/intro.tex - cd $(OGLDIR)/docs; latex ogl; latex ogl; makeindex ogl; latex ogl; \ - -$(OGLDIR)/docs/ogl.ps: $(OGLDIR)/docs/ogl.dvi - cd $(OGLDIR)/docs; dvips -f -r < ogl.dvi > ogl.ps - -cleaneach: - rm -f $(OBJECTS) $(OGLLIB) core - -clean_motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif cleaneach - -clean_ol: - $(MAKE) -f makefile.unx GUISUFFIX=_ol cleaneach - -clean_hp: - $(MAKE) -f makefile.unx GUISUFFIX=_hp cleaneach - diff --git a/utils/ogl/src/makefile.wat b/utils/ogl/src/makefile.wat deleted file mode 100644 index 1ba7250c92..0000000000 --- a/utils/ogl/src/makefile.wat +++ /dev/null @@ -1,28 +0,0 @@ -# Objects makefile - -WXDIR = ..\..\.. - -!include $(WXDIR)\src\makewat.env - -EXTRACPPFLAGS=/DPROLOGIO - -OBJECTSLIB = $(WXDIR)\utils\objects\lib\graphics.lib -THISDIR = $(WXDIR)\utils\objects\src - -NAME = graphics -LNK = $(name).lnk - -IFLAGS = -i=$(WXINC) -i=$(WXBASEINC) -i=..\..\mfutils\src -i=..\..\prologio\src - -OBJECTS = basic.obj basic2.obj canvas.obj lines.obj misc.obj divided.obj constrnt.obj composit.obj drawn.obj bitmap.obj - -all: $(OBJECTSLIB) - -$(OBJECTSLIB): $(OBJECTS) - *wlib /b /c /n /P=256 $(OBJECTSLIB) $(OBJECTS) - -clean: .SYMBOLIC - -erase *.obj *.bak *.err *.pch $(OBJECTSLIB) *.lbc - - - diff --git a/utils/ogl/src/mfutils.cpp b/utils/ogl/src/mfutils.cpp deleted file mode 100644 index 3497460961..0000000000 --- a/utils/ogl/src/mfutils.cpp +++ /dev/null @@ -1,1085 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: mfutils.cpp -// Purpose: Metafile utillities -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "mfutils.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#include -#include - -#include "mfutils.h" -#include - -static char hexArray[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', - 'C', 'D', 'E', 'F' }; - -static void DecToHex(int dec, char *buf) -{ - int firstDigit = (int)(dec/16.0); - int secondDigit = (int)(dec - (firstDigit*16.0)); - buf[0] = hexArray[firstDigit]; - buf[1] = hexArray[secondDigit]; - buf[2] = 0; -} - -// 16-bit unsigned integer -static unsigned int getshort(FILE *fp) -{ - int c, c1; - c = getc(fp); c1 = getc(fp); - unsigned int res = ((unsigned int) c) + (((unsigned int) c1) << 8); - return res; -} - -// 16-bit signed integer -static int getsignedshort(FILE *fp) -{ - int c, c1; - c = getc(fp); c1 = getc(fp); - int testRes = ((unsigned int) c) + (((unsigned int) c1) << 8); - unsigned long res1 = ((unsigned int) c) + (((unsigned int) c1) << 8); - int res = 0; - if (res1 > 32767) - res = (int)(res1 - 65536); - else - res = (int)(res1); - return res; -} - -// 32-bit integer -static long getint(FILE *fp) -{ - int c, c1, c2, c3; - c = getc(fp); c1 = getc(fp); c2 = getc(fp); c3 = getc(fp); - long res = (long)((long) c) + - (((long) c1) << 8) + - (((long) c2) << 16) + - (((long) c3) << 24); - return res; -} - - -/* Placeable metafile header -struct mfPLACEABLEHEADER { - DWORD key; // 32-bit - HANDLE hmf; // 16-bit - RECT bbox; // 4x16 bit - WORD inch; // 16-bit - DWORD reserved; // 32-bit - WORD checksum; // 16-bit -}; -*/ - -wxMetaRecord::~wxMetaRecord(void) -{ - if (points) delete[] points; - if (stringParam) delete[] stringParam; -} - -wxXMetaFile::wxXMetaFile(char *file) -{ - ok = FALSE; - top = 0.0; - bottom = 0.0; - left = 0.0; - right = 0.0; - - if (file) - ok = ReadFile(file); -} - -/* - Handle table gdiObjects - ------------ ---------- - [0] wxPen - [1]----param2--- wxBrush - [2] | wxFont - [3] | -> wxPen - - The handle table works as follows. - When a GDI object is created whilst reading in the - metafile, the (e.g.) createpen record is added to the - first free entry in the handle table. The createpen - record's param1 is a pointer to the actual wxPen, and - its param2 is the index into the gdiObjects list, which only - grows and never shrinks (unlike the handle table.) - - When SelectObject(index) is found, the index in the file - refers to the position in the handle table. BUT we then - set param2 to be the position of the wxPen in gdiObjects, - i.e. to param2 of the CreatePen record, itself found in - the handle table. - - When an object is deleted, the entry in the handletable is - NULLed but the gdiObjects entry is not removed (no point, and - allows us to create all GDI objects in advance of playing the - metafile). -*/ - - -static wxMetaRecord *HandleTable[100]; -static int HandleTableSize = 0; - -void DeleteMetaRecordHandle(int index) -{ - HandleTable[index] = NULL; -} - -int AddMetaRecordHandle(wxMetaRecord *record) -{ - for (int i = 0; i < HandleTableSize; i++) - if (!HandleTable[i]) - { - HandleTable[i] = record; - return i; - } - // No free spaces in table, so append. - - HandleTable[HandleTableSize] = record; - HandleTableSize ++; - return (HandleTableSize - 1); -} - -bool wxXMetaFile::ReadFile(char *file) -{ - HandleTableSize = 0; - - FILE *handle = fopen(file, "rb"); - if (!handle) return FALSE; - - // Read placeable metafile header, if any - long key = getint(handle); - - if (key == 0x9AC6CDD7) - { - long hmf = getshort(handle); - int iLeft, iTop, iRight, iBottom; - iLeft = getsignedshort(handle); - iTop = getsignedshort(handle); - iRight = getsignedshort(handle); - iBottom = getsignedshort(handle); - - left = (double)iLeft; - top = (double)iTop; - right = (double)iRight; - bottom = (double)iBottom; - - int inch = getshort(handle); - long reserved = getint(handle); - int checksum = getshort(handle); -/* - double widthInUnits = (double)right - left; - double heightInUnits = (double)bottom - top; - *width = (int)((widthInUnits*1440.0)/inch); - *height = (int)((heightInUnits*1440.0)/inch); -*/ - } - else rewind(handle); - - // Read METAHEADER - int mtType = getshort(handle); - - if (mtType != 1 && mtType != 2) - { - fclose(handle); - return FALSE; - } - - int mtHeaderSize = getshort(handle); - int mtVersion = getshort(handle); - - if (mtVersion != 0x0300 && mtVersion != 0x0100) - { - fclose(handle); - return FALSE; - } - - long mtSize = getint(handle); - int mtNoObjects = getshort(handle); - long mtMaxRecord = getint(handle); - int mtNoParameters = getshort(handle); - - while (!feof(handle)) - { - long rdSize = getint(handle); // 4 bytes - int rdFunction = getshort(handle); // 2 bytes - if (feof(handle)) - break; - - switch (rdFunction) - { - case META_SETBKCOLOR: - { - wxMetaRecord *rec = new wxMetaRecord(META_SETBKCOLOR); - long colorref = getint(handle); // COLORREF - rec->param1 = GetRValue(colorref); - rec->param2 = GetGValue(colorref); - rec->param3 = GetBValue(colorref); - metaRecords.Append(rec); - break; - } - case META_SETBKMODE: - { - wxMetaRecord *rec = new wxMetaRecord(META_SETBKMODE); - rec->param1 = getshort(handle); // Background mode - if (rec->param1 == OPAQUE) rec->param1 = wxSOLID; - else rec->param1 = wxTRANSPARENT; - metaRecords.Append(rec); - break; - } - case META_SETMAPMODE: - { - wxMetaRecord *rec = new wxMetaRecord(META_SETMAPMODE); - rec->param1 = getshort(handle); - metaRecords.Append(rec); - break; - } -// case META_SETROP2: -// case META_SETRELABS: -// case META_SETPOLYFILLMODE: -// case META_SETSTRETCHBLTMODE: -// case META_SETTEXTCHAREXTRA: - case META_SETTEXTCOLOR: - { - wxMetaRecord *rec = new wxMetaRecord(META_SETTEXTCOLOR); - long colorref = getint(handle); // COLORREF - rec->param1 = GetRValue(colorref); - rec->param2 = GetGValue(colorref); - rec->param3 = GetBValue(colorref); - metaRecords.Append(rec); - break; - } -// case META_SETTEXTJUSTIFICATION: - case META_SETWINDOWORG: - { - wxMetaRecord *rec = new wxMetaRecord(META_SETWINDOWORG); - rec->param2 = getshort(handle); - rec->param1 = getshort(handle); - metaRecords.Append(rec); - break; - } - case META_SETWINDOWEXT: - { - wxMetaRecord *rec = new wxMetaRecord(META_SETWINDOWEXT); - rec->param2 = getshort(handle); - rec->param1 = getshort(handle); - metaRecords.Append(rec); - break; - } -// case META_SETVIEWPORTORG: -// case META_SETVIEWPORTEXT: -// case META_OFFSETWINDOWORG: -// case META_SCALEWINDOWEXT: -// case META_OFFSETVIEWPORTORG: -// case META_SCALEVIEWPORTEXT: - case META_LINETO: - { - wxMetaRecord *rec = new wxMetaRecord(META_LINETO); - rec->param1 = getshort(handle); // x1 - rec->param2 = getshort(handle); // y1 - metaRecords.Append(rec); - break; - } - case META_MOVETO: - { - wxMetaRecord *rec = new wxMetaRecord(META_MOVETO); - rec->param1 = getshort(handle); // x1 - rec->param2 = getshort(handle); // y1 - metaRecords.Append(rec); - break; - } - case META_EXCLUDECLIPRECT: - { - wxMetaRecord *rec = new wxMetaRecord(META_EXCLUDECLIPRECT); - rec->param4 = getshort(handle); // y2 - rec->param3 = getshort(handle); // x2 - rec->param2 = getshort(handle); // y1 - rec->param1 = getshort(handle); // x1 - metaRecords.Append(rec); - break; - } - case META_INTERSECTCLIPRECT: - { - wxMetaRecord *rec = new wxMetaRecord(META_INTERSECTCLIPRECT); - rec->param4 = getshort(handle); // y2 - rec->param3 = getshort(handle); // x2 - rec->param2 = getshort(handle); // y1 - rec->param1 = getshort(handle); // x1 - metaRecords.Append(rec); - break; - } -// case META_ARC: // DO!!! - case META_ELLIPSE: - { - wxMetaRecord *rec = new wxMetaRecord(META_ELLIPSE); - rec->param4 = getshort(handle); // y2 - rec->param3 = getshort(handle); // x2 - rec->param2 = getshort(handle); // y1 - rec->param1 = getshort(handle); // x1 - metaRecords.Append(rec); - break; - } -// case META_FLOODFILL: -// case META_PIE: // DO!!! - case META_RECTANGLE: - { - wxMetaRecord *rec = new wxMetaRecord(META_RECTANGLE); - rec->param4 = getshort(handle); // y2 - rec->param3 = getshort(handle); // x2 - rec->param2 = getshort(handle); // y1 - rec->param1 = getshort(handle); // x1 - metaRecords.Append(rec); - break; - } - case META_ROUNDRECT: - { - wxMetaRecord *rec = new wxMetaRecord(META_ROUNDRECT); - rec->param6 = getshort(handle); // width - rec->param5 = getshort(handle); // height - rec->param4 = getshort(handle); // y2 - rec->param3 = getshort(handle); // x2 - rec->param2 = getshort(handle); // y1 - rec->param1 = getshort(handle); // x1 - metaRecords.Append(rec); - break; - } -// case META_PATBLT: -// case META_SAVEDC: - case META_SETPIXEL: - { - wxMetaRecord *rec = new wxMetaRecord(META_SETPIXEL); - rec->param1 = getshort(handle); // x1 - rec->param2 = getshort(handle); // y1 - rec->param3 = getint(handle); // COLORREF - metaRecords.Append(rec); - break; - } -// case META_OFFSETCLIPRGN: - case META_TEXTOUT: - { - wxMetaRecord *rec = new wxMetaRecord(META_TEXTOUT); - int count = getshort(handle); - rec->stringParam = new char[count+1]; - fread((void *)rec->stringParam, sizeof(char), count, handle); - rec->stringParam[count] = 0; - rec->param2 = getshort(handle); // Y - rec->param1 = getshort(handle); // X - metaRecords.Append(rec); - break; - } -/* - case META_EXTTEXTOUT: - { - wxMetaRecord *rec = new wxMetaRecord(META_EXTTEXTOUT); - int cellSpacing = getshort(handle); - int count = getshort(handle); - rec->stringParam = new char[count+1]; - fread((void *)rec->stringParam, sizeof(char), count, handle); - rec->stringParam[count] = 0; - // Rectangle - int rectY2 = getshort(handle); - int rectX2 = getshort(handle); - int rectY1 = getshort(handle); - int rectX1 = getshort(handle); - int rectType = getshort(handle); - rec->param2 = getshort(handle); // Y - rec->param1 = getshort(handle); // X - metaRecords.Append(rec); - break; - } -*/ -// case META_BITBLT: -// case META_STRETCHBLT: - case META_POLYGON: - { - wxMetaRecord *rec = new wxMetaRecord(META_POLYGON); - rec->param1 = getshort(handle); - rec->points = new wxRealPoint[(int)rec->param1]; - for (int i = 0; i < rec->param1; i++) - { - rec->points[i].x = getshort(handle); - rec->points[i].y = getshort(handle); - } - - metaRecords.Append(rec); - break; - } - case META_POLYLINE: - { - wxMetaRecord *rec = new wxMetaRecord(META_POLYLINE); - rec->param1 = (long)getshort(handle); - rec->points = new wxRealPoint[(int)rec->param1]; - for (int i = 0; i < rec->param1; i++) - { - rec->points[i].x = getshort(handle); - rec->points[i].y = getshort(handle); - } - - metaRecords.Append(rec); - break; - } -// case META_ESCAPE: -// case META_RESTOREDC: -// case META_FILLREGION: -// case META_FRAMEREGION: -// case META_INVERTREGION: -// case META_PAINTREGION: -// case META_SELECTCLIPREGION: // DO THIS! - case META_SELECTOBJECT: - { - wxMetaRecord *rec = new wxMetaRecord(META_SELECTOBJECT); - rec->param1 = (long)getshort(handle); // Position of object in gdiObjects list - metaRecords.Append(rec); - // param2 gives the index into gdiObjects, which is different from - // the index into the handle table. - rec->param2 = HandleTable[(int)rec->param1]->param2; - break; - } -// case META_SETTEXTALIGN: -// case META_DRAWTEXT: -// case META_CHORD: -// case META_SETMAPPERFLAGS: -// case META_EXTTEXTOUT: -// case META_SETDIBTODEV: -// case META_SELECTPALETTE: -// case META_REALIZEPALETTE: -// case META_ANIMATEPALETTE: -// case META_SETPALENTRIES: -// case META_POLYPOLYGON: -// case META_RESIZEPALETTE: -// case META_DIBBITBLT: -// case META_DIBSTRETCHBLT: - case META_DIBCREATEPATTERNBRUSH: - { - wxMetaRecord *rec = new wxMetaRecord(META_DIBCREATEPATTERNBRUSH); - fread((void *)wxBuffer, sizeof(char), (int)((2*rdSize) - 6), handle); - - metaRecords.Append(rec); - gdiObjects.Append(rec); - AddMetaRecordHandle(rec); - rec->param2 = (long)(gdiObjects.Number() - 1); - break; - } -// case META_STRETCHDIB: -// case META_EXTFLOODFILL: -// case META_RESETDC: -// case META_STARTDOC: -// case META_STARTPAGE: -// case META_ENDPAGE: -// case META_ABORTDOC: -// case META_ENDDOC: - case META_DELETEOBJECT: - { - int index = getshort(handle); - DeleteMetaRecordHandle(index); - break; - } - case META_CREATEPALETTE: - { - wxMetaRecord *rec = new wxMetaRecord(META_CREATEPALETTE); - fread((void *)wxBuffer, sizeof(char), (int)((2*rdSize) - 6), handle); - - metaRecords.Append(rec); - gdiObjects.Append(rec); - AddMetaRecordHandle(rec); - rec->param2 = (long)(gdiObjects.Number() - 1); - break; - } - case META_CREATEBRUSH: - { - wxMetaRecord *rec = new wxMetaRecord(META_CREATEBRUSH); - fread((void *)wxBuffer, sizeof(char), (int)((2*rdSize) - 6), handle); - metaRecords.Append(rec); - gdiObjects.Append(rec); - AddMetaRecordHandle(rec); - rec->param2 = (long)(gdiObjects.Number() - 1); - break; - } - case META_CREATEPATTERNBRUSH: - { - wxMetaRecord *rec = new wxMetaRecord(META_CREATEPATTERNBRUSH); - fread((void *)wxBuffer, sizeof(char), (int)((2*rdSize) - 6), handle); - metaRecords.Append(rec); - gdiObjects.Append(rec); - AddMetaRecordHandle(rec); - rec->param2 = (long)(gdiObjects.Number() - 1); - break; - } - case META_CREATEPENINDIRECT: - { - wxMetaRecord *rec = new wxMetaRecord(META_CREATEPENINDIRECT); - int msStyle = getshort(handle); // Style: 2 bytes - int x = getshort(handle); // X: 2 bytes - int y = getshort(handle); // Y: 2 bytes - long colorref = getint(handle); // COLORREF 4 bytes - - int style; - if (msStyle == PS_DOT) - style = wxDOT; - else if (msStyle == PS_DASH) - style = wxSHORT_DASH; - else if (msStyle == PS_NULL) - style = wxTRANSPARENT; - else style = wxSOLID; - - wxColour colour(GetRValue(colorref), GetGValue(colorref), GetBValue(colorref)); - rec->param1 = (long)wxThePenList->FindOrCreatePen(colour, x, style); - metaRecords.Append(rec); - gdiObjects.Append(rec); - - AddMetaRecordHandle(rec); - rec->param2 = (long)(gdiObjects.Number() - 1); - - // For some reason, the size of this record is sometimes 9 words!!! - // instead of the usual 8. So read 2 characters extra. - if (rdSize == 9) - { - (void) getshort(handle); - } - break; - } - case META_CREATEFONTINDIRECT: - { - wxMetaRecord *rec = new wxMetaRecord(META_CREATEFONTINDIRECT); - int lfHeight = getshort(handle); // 2 bytes - int lfWidth = getshort(handle); // 2 bytes - int lfEsc = getshort(handle); // 2 bytes - int lfOrient = getshort(handle); // 2 bytes - int lfWeight = getshort(handle); // 2 bytes - char lfItalic = getc(handle); // 1 byte - char lfUnderline = getc(handle); // 1 byte - char lfStrikeout = getc(handle); // 1 byte - char lfCharSet = getc(handle); // 1 byte - char lfOutPrecision = getc(handle); // 1 byte - char lfClipPrecision = getc(handle); // 1 byte - char lfQuality = getc(handle); // 1 byte - char lfPitchAndFamily = getc(handle); // 1 byte (18th) - char lfFacename[32]; - // Read the rest of the record, which is total record size - // minus the number of bytes already read (18 record, 6 metarecord - // header) - fread((void *)lfFacename, sizeof(char), (int)((2*rdSize) - 18 - 6), handle); - - int family; - if (lfPitchAndFamily & FF_MODERN) - family = wxMODERN; - else if (lfPitchAndFamily & FF_MODERN) - family = wxMODERN; - else if (lfPitchAndFamily & FF_ROMAN) - family = wxROMAN; - else if (lfPitchAndFamily & FF_SWISS) - family = wxSWISS; - else if (lfPitchAndFamily & FF_DECORATIVE) - family = wxDECORATIVE; - else - family = wxDEFAULT; - - int weight; - if (lfWeight == 300) - weight = wxLIGHT; - else if (lfWeight == 400) - weight = wxNORMAL; - else if (lfWeight == 900) - weight = wxBOLD; - else weight = wxNORMAL; - - int style; - if (lfItalic != 0) - style = wxITALIC; - else - style = wxNORMAL; - - // About how many pixels per inch??? - int logPixelsY = 100; - int pointSize = (int)(lfHeight*72.0/logPixelsY); - - wxFont *theFont = - wxTheFontList->FindOrCreateFont(pointSize, family, style, weight, (lfUnderline != 0)); - - rec->param1 = (long) theFont; - metaRecords.Append(rec); - gdiObjects.Append(rec); - AddMetaRecordHandle(rec); - rec->param2 = (long)(gdiObjects.Number() - 1); - break; - } - case META_CREATEBRUSHINDIRECT: - { - wxMetaRecord *rec = new wxMetaRecord(META_CREATEBRUSHINDIRECT); - int msStyle = getshort(handle); // Style: 2 bytes - long colorref = getint(handle); // COLORREF: 4 bytes - int hatchStyle = getshort(handle); // Hatch style 2 bytes - - int style; - switch (msStyle) - { - case BS_HATCHED: - { - switch (hatchStyle) - { - case HS_BDIAGONAL: - style = wxBDIAGONAL_HATCH; - break; - case HS_DIAGCROSS: - style = wxCROSSDIAG_HATCH; - break; - case HS_FDIAGONAL: - style = wxFDIAGONAL_HATCH; - break; - case HS_HORIZONTAL: - style = wxHORIZONTAL_HATCH; - break; - case HS_VERTICAL: - style = wxVERTICAL_HATCH; - break; - default: - case HS_CROSS: - style = wxCROSS_HATCH; - break; - } - break; - } - case BS_SOLID: - default: - style = wxSOLID; - break; - } - if (msStyle == PS_DOT) - style = wxDOT; - else if (msStyle == PS_DASH) - style = wxSHORT_DASH; - else if (msStyle == PS_NULL) - style = wxTRANSPARENT; - else style = wxSOLID; - - wxColour colour(GetRValue(colorref), GetGValue(colorref), GetBValue(colorref)); - rec->param1 = (long)wxTheBrushList->FindOrCreateBrush(colour, style); - metaRecords.Append(rec); - gdiObjects.Append(rec); - AddMetaRecordHandle(rec); - rec->param2 = (long)(gdiObjects.Number() - 1); - break; - } - case META_CREATEBITMAPINDIRECT: - { - wxMetaRecord *rec = new wxMetaRecord(META_CREATEBITMAPINDIRECT); - fread((void *)wxBuffer, sizeof(char), (int)((2*rdSize) - 6), handle); - - metaRecords.Append(rec); - gdiObjects.Append(rec); - AddMetaRecordHandle(rec); - rec->param2 = (long)(gdiObjects.Number() - 1); - break; - } - case META_CREATEBITMAP: - { - wxMetaRecord *rec = new wxMetaRecord(META_CREATEBITMAP); - fread((void *)wxBuffer, sizeof(char), (int)((2*rdSize) - 6), handle); - - metaRecords.Append(rec); - gdiObjects.Append(rec); - AddMetaRecordHandle(rec); - rec->param2 = (long)(gdiObjects.Number() - 1); - break; - } - case META_CREATEREGION: - { - wxMetaRecord *rec = new wxMetaRecord(META_CREATEREGION); - fread((void *)wxBuffer, sizeof(char), (int)((2*rdSize) - 6), handle); - - metaRecords.Append(rec); - gdiObjects.Append(rec); - AddMetaRecordHandle(rec); - rec->param2 = (long)(gdiObjects.Number() - 1); - break; - } - default: - { - fread((void *)wxBuffer, sizeof(char), (int)((2*rdSize) - 6), handle); - break; - } - } - } - fclose(handle); - return TRUE; -} - -wxXMetaFile::~wxXMetaFile(void) -{ - wxNode *node = metaRecords.First(); - while (node) - { - wxMetaRecord *rec = (wxMetaRecord *)node->Data(); - delete rec; - wxNode *next = node->Next(); - delete node; - node = next; - } -} - -bool wxXMetaFile::SetClipboard(int width, int height) -{ - return FALSE; -} - -bool wxXMetaFile::Play(wxDC *dc) -{ - wxNode *node = metaRecords.First(); - while (node) - { - wxMetaRecord *rec = (wxMetaRecord *)node->Data(); - int rdFunction = rec->metaFunction; - - switch (rdFunction) - { - case META_SETBKCOLOR: - { - break; - } - case META_SETBKMODE: - { - break; - } - case META_SETMAPMODE: - { - break; - } -// case META_SETROP2: -// case META_SETRELABS: -// case META_SETPOLYFILLMODE: -// case META_SETSTRETCHBLTMODE: -// case META_SETTEXTCHAREXTRA: - case META_SETTEXTCOLOR: - { - break; - } -// case META_SETTEXTJUSTIFICATION: - case META_SETWINDOWORG: - { - break; - } - case META_SETWINDOWEXT: - { - break; - } -// case META_SETVIEWPORTORG: -// case META_SETVIEWPORTEXT: -// case META_OFFSETWINDOWORG: -// case META_SCALEWINDOWEXT: -// case META_OFFSETVIEWPORTORG: -// case META_SCALEVIEWPORTEXT: - case META_LINETO: - { - long x1 = rec->param1; - long y1 = rec->param2; - dc->DrawLine(lastX, lastY, (double)x1, (double)y1); - break; - } - case META_MOVETO: - { - lastX = (double)rec->param1; - lastY = (double)rec->param2; - break; - } - case META_EXCLUDECLIPRECT: - { - break; - } - case META_INTERSECTCLIPRECT: - { - break; - } -// case META_ARC: // DO!!! - case META_ELLIPSE: - { - break; - } -// case META_FLOODFILL: -// case META_PIE: // DO!!! - case META_RECTANGLE: - { - dc->DrawRectangle((double)rec->param1, (double)rec->param2, - (double)rec->param3 - rec->param1, - (double)rec->param4 - rec->param2); - break; - } - case META_ROUNDRECT: - { - dc->DrawRoundedRectangle((double)rec->param1, (double)rec->param2, - (double)rec->param3 - rec->param1, - (double)rec->param4 - rec->param2, - (double)rec->param5); - break; - } -// case META_PATBLT: -// case META_SAVEDC: - case META_SETPIXEL: - { -// rec->param1 = getshort(handle); // x1 -// rec->param2 = getshort(handle); // y1 -// rec->param3 = getint(handle); // COLORREF - break; - } -// case META_OFFSETCLIPRGN: - case META_TEXTOUT: - { -/* - int count = getshort(handle); - rec->stringParam = new char[count+1]; - fread((void *)rec->stringParam, sizeof(char), count, handle); - rec->stringParam[count] = 0; - rec->param2 = getshort(handle); // Y - rec->param1 = getshort(handle); // X -*/ - break; - } -// case META_BITBLT: -// case META_STRETCHBLT: - case META_POLYGON: - { -/* - rec->param1 = getshort(handle); - rec->points = new wxRealPoint[(int)rec->param1]; - for (int i = 0; i < rec->param1; i++) - { - rec->points[i].x = getshort(handle); - rec->points[i].y = getshort(handle); - } -*/ - break; - } - case META_POLYLINE: - { -/* - wxMetaRecord *rec = new wxMetaRecord(META_POLYLINE); - rec->param1 = (long)getshort(handle); - rec->points = new wxRealPoint[(int)rec->param1]; - for (int i = 0; i < rec->param1; i++) - { - rec->points[i].x = getshort(handle); - rec->points[i].y = getshort(handle); - } -*/ - break; - } -// case META_ESCAPE: -// case META_RESTOREDC: -// case META_FILLREGION: -// case META_FRAMEREGION: -// case META_INVERTREGION: -// case META_PAINTREGION: -// case META_SELECTCLIPREGION: // DO THIS! - case META_SELECTOBJECT: - { -/* - wxMetaRecord *rec = new wxMetaRecord(META_SELECTOBJECT); - rec->param1 = (long)getshort(handle); // Position of object in gdiObjects list -*/ - break; - } -// case META_SETTEXTALIGN: -// case META_DRAWTEXT: -// case META_CHORD: -// case META_SETMAPPERFLAGS: -// case META_EXTTEXTOUT: -// case META_SETDIBTODEV: -// case META_SELECTPALETTE: -// case META_REALIZEPALETTE: -// case META_ANIMATEPALETTE: -// case META_SETPALENTRIES: -// case META_POLYPOLYGON: -// case META_RESIZEPALETTE: -// case META_DIBBITBLT: -// case META_DIBSTRETCHBLT: - case META_DIBCREATEPATTERNBRUSH: - { -/* - fread((void *)wxBuffer, sizeof(char), (int)(rdSize - 3), handle); -*/ - break; - } -// case META_STRETCHDIB: -// case META_EXTFLOODFILL: -// case META_RESETDC: -// case META_STARTDOC: -// case META_STARTPAGE: -// case META_ENDPAGE: -// case META_ABORTDOC: -// case META_ENDDOC: -// case META_DELETEOBJECT: // DO!! - case META_CREATEPALETTE: - { -/* - wxMetaRecord *rec = new wxMetaRecord(META_CREATEPALETTE); - fread((void *)wxBuffer, sizeof(char), (int)(rdSize - 3), handle); -*/ - break; - } - case META_CREATEBRUSH: - { -/* - fread((void *)wxBuffer, sizeof(char), (int)(rdSize - 3), handle); -*/ - break; - } - case META_CREATEPATTERNBRUSH: - { -/* - fread((void *)wxBuffer, sizeof(char), (int)(rdSize - 3), handle); -*/ - break; - } - case META_CREATEPENINDIRECT: - { -/* - int msStyle = getshort(handle); // Style: 2 bytes - int x = getshort(handle); // X: 2 bytes - int y = getshort(handle); // Y: 2 bytes - int colorref = getint(handle); // COLORREF 4 bytes - - int style; - if (msStyle == PS_DOT) - style = wxDOT; - else if (msStyle == PS_DASH) - style = wxSHORT_DASH; - else if (msStyle == PS_NULL) - style = wxTRANSPARENT; - else style = wxSOLID; - - wxColour colour(GetRValue(colorref), GetGValue(colorref), GetBValue(colorref)); - rec->param1 = (long)wxThePenList->FindOrCreatePen(&colour, x, style); -*/ - break; - } - case META_CREATEFONTINDIRECT: - { -/* - int lfHeight = getshort(handle); - int lfWidth = getshort(handle); - int lfEsc = getshort(handle); - int lfOrient = getshort(handle); - int lfWeight = getshort(handle); - char lfItalic = getc(handle); - char lfUnderline = getc(handle); - char lfStrikeout = getc(handle); - char lfCharSet = getc(handle); - char lfOutPrecision = getc(handle); - char lfClipPrecision = getc(handle); - char lfQuality = getc(handle); - char lfPitchAndFamily = getc(handle); - char lfFacename[32]; - fread((void *)lfFacename, sizeof(char), 32, handle); - - int family; - if (lfPitchAndFamily & FF_MODERN) - family = wxMODERN; - else if (lfPitchAndFamily & FF_MODERN) - family = wxMODERN; - else if (lfPitchAndFamily & FF_ROMAN) - family = wxROMAN; - else if (lfPitchAndFamily & FF_SWISS) - family = wxSWISS; - else if (lfPitchAndFamily & FF_DECORATIVE) - family = wxDECORATIVE; - else - family = wxDEFAULT; - - int weight; - if (lfWeight == 300) - weight = wxLIGHT; - else if (lfWeight == 400) - weight = wxNORMAL; - else if (lfWeight == 900) - weight = wxBOLD; - else weight = wxNORMAL; - - int style; - if ((bool)lfItalic) - style = wxITALIC; - else - style = wxNORMAL; - - // About how many pixels per inch??? - int logPixelsY = 100; - int pointSize = (int)(lfHeight*72.0/logPixelsY); - - wxFont *theFont = - wxTheFontList->FindOrCreateFont(pointSize, family, style, weight, (bool)lfUnderline); - - rec->param1 = (long)theFont; -*/ - break; - } - case META_CREATEBRUSHINDIRECT: - { -/* - int msStyle = getshort(handle); // Style: 2 bytes - int colorref = getint(handle); // COLORREF: 4 bytes - int hatchStyle = getshort(handle); // Hatch style 2 bytes - - int style; - if (msStyle == PS_DOT) - style = wxDOT; - else if (msStyle == PS_DASH) - style = wxSHORT_DASH; - else if (msStyle == PS_NULL) - style = wxTRANSPARENT; - else style = wxSOLID; - - wxColour colour(GetRValue(colorref), GetGValue(colorref), GetBValue(colorref)); - rec->param1 = (long)wxTheBrushList->FindOrCreateBrush(&colour, wxSOLID); -*/ - break; - } - case META_CREATEBITMAPINDIRECT: - { -/* - fread((void *)wxBuffer, sizeof(char), (int)(rdSize - 3), handle); -*/ - break; - } - case META_CREATEBITMAP: - { -/* - fread((void *)wxBuffer, sizeof(char), (int)(rdSize - 3), handle); -*/ - break; - } - case META_CREATEREGION: - { - dc->DestroyClippingRegion(); -/* - rec->param1 = getshort(handle); // Style: 2 bytes -*/ - break; - } - default: - { - break; - } - } - node = node->Next(); - } - return TRUE; -} - diff --git a/utils/ogl/src/mfutils.h b/utils/ogl/src/mfutils.h deleted file mode 100644 index e4b1c2c4fe..0000000000 --- a/utils/ogl/src/mfutils.h +++ /dev/null @@ -1,211 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: mfutils.h -// Purpose: Metafile utilities: reading a placeable metafile independently -// of Windows. -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _MFUTILS_H_ -#define _MFUTILS_H_ - -#ifdef __GNUG__ -#pragma interface "mfutils.h" -#endif - -#include - -#ifndef __WXMSW__ -#define GetRValue(rgb) ((unsigned char)(rgb)) -#define GetGValue(rgb) ((unsigned char)(((int)(rgb)) >> 8)) -#define GetBValue(rgb) ((unsigned char)((rgb)>>16)) -#endif - -/* Metafile Functions */ -/* Win32s/Borland need these macros, although META_SETBKCOLOR is defined */ -#if !defined(META_SETBKCOLOR) || defined(WIN32) - -#define META_SETBKCOLOR 0x0201 -#define META_SETBKMODE 0x0102 -#define META_SETMAPMODE 0x0103 -#define META_SETROP2 0x0104 -#define META_SETRELABS 0x0105 -#define META_SETPOLYFILLMODE 0x0106 -#define META_SETSTRETCHBLTMODE 0x0107 -#define META_SETTEXTCHAREXTRA 0x0108 -#define META_SETTEXTCOLOR 0x0209 -#define META_SETTEXTJUSTIFICATION 0x020A -#define META_SETWINDOWORG 0x020B -#define META_SETWINDOWEXT 0x020C -#define META_SETVIEWPORTORG 0x020D -#define META_SETVIEWPORTEXT 0x020E -#define META_OFFSETWINDOWORG 0x020F -#define META_SCALEWINDOWEXT 0x0410 -#define META_OFFSETVIEWPORTORG 0x0211 -#define META_SCALEVIEWPORTEXT 0x0412 -#define META_LINETO 0x0213 -#define META_MOVETO 0x0214 -#define META_EXCLUDECLIPRECT 0x0415 -#define META_INTERSECTCLIPRECT 0x0416 -#define META_ARC 0x0817 -#define META_ELLIPSE 0x0418 -#define META_FLOODFILL 0x0419 -#define META_PIE 0x081A -#define META_RECTANGLE 0x041B -#define META_ROUNDRECT 0x061C -#define META_PATBLT 0x061D -#define META_SAVEDC 0x001E -#define META_SETPIXEL 0x041F -#define META_OFFSETCLIPRGN 0x0220 -#define META_TEXTOUT 0x0521 -#define META_BITBLT 0x0922 -#define META_STRETCHBLT 0x0B23 -#define META_POLYGON 0x0324 -#define META_POLYLINE 0x0325 -#define META_ESCAPE 0x0626 -#define META_RESTOREDC 0x0127 -#define META_FILLREGION 0x0228 -#define META_FRAMEREGION 0x0429 -#define META_INVERTREGION 0x012A -#define META_PAINTREGION 0x012B -#define META_SELECTCLIPREGION 0x012C -#define META_SELECTOBJECT 0x012D -#define META_SETTEXTALIGN 0x012E -#define META_DRAWTEXT 0x062F - -#define META_CHORD 0x0830 -#define META_SETMAPPERFLAGS 0x0231 -#define META_EXTTEXTOUT 0x0a32 -#define META_SETDIBTODEV 0x0d33 -#define META_SELECTPALETTE 0x0234 -#define META_REALIZEPALETTE 0x0035 -#define META_ANIMATEPALETTE 0x0436 -#define META_SETPALENTRIES 0x0037 -#define META_POLYPOLYGON 0x0538 -#define META_RESIZEPALETTE 0x0139 - -#define META_DIBBITBLT 0x0940 -#define META_DIBSTRETCHBLT 0x0b41 -#define META_DIBCREATEPATTERNBRUSH 0x0142 -#define META_STRETCHDIB 0x0f43 - -#define META_EXTFLOODFILL 0x0548 - -#define META_RESETDC 0x014C -#define META_STARTDOC 0x014D -#define META_STARTPAGE 0x004F -#define META_ENDPAGE 0x0050 -#define META_ABORTDOC 0x0052 -#define META_ENDDOC 0x005E - -#define META_DELETEOBJECT 0x01f0 - -#define META_CREATEPALETTE 0x00f7 -#define META_CREATEBRUSH 0x00F8 -#define META_CREATEPATTERNBRUSH 0x01F9 -#define META_CREATEPENINDIRECT 0x02FA -#define META_CREATEFONTINDIRECT 0x02FB -#define META_CREATEBRUSHINDIRECT 0x02FC -#define META_CREATEBITMAPINDIRECT 0x02FD -#define META_CREATEBITMAP 0x06FE -#define META_CREATEREGION 0x06FF - -/* Background Modes */ -#define TRANSPARENT 1 -#define OPAQUE 2 - -/* Pen Styles */ -#define PS_SOLID 0 -#define PS_DASH 1 -#define PS_DOT 2 -#define PS_DASHDOT 3 -#define PS_DASHDOTDOT 4 -#define PS_NULL 5 -#define PS_INSIDEFRAME 6 - -/* PitchAndFamily family values (high 4 bits) */ -/* Win32s/Borland don't need this */ -#if !defined(__BORLANDC__) && !defined(WIN32) -#define FF_DONTCARE 0x00 -#define FF_ROMAN 0x10 -#define FF_SWISS 0x20 -#define FF_MODERN 0x30 -#define FF_SCRIPT 0x40 -#define FF_DECORATIVE 0x50 -#endif - -/* Brush Styles */ -#define BS_SOLID 0 -#define BS_NULL 1 -#define BS_HOLLOW BS_NULL -#define BS_HATCHED 2 -#define BS_PATTERN 3 -#define BS_INDEXED 4 -#define BS_DIBPATTERN 5 - -/* Hatch Styles */ -#define HS_HORIZONTAL 0 -#define HS_VERTICAL 1 -#define HS_FDIAGONAL 2 -#define HS_BDIAGONAL 3 -#define HS_CROSS 4 -#define HS_DIAGCROSS 5 - -#endif // metafile functions - -class wxMetaRecord: public wxObject -{ - public: - int metaFunction; - long param1; - long param2; - long param3; - long param4; - long param5; - long param6; - long param7; - long param8; - char *stringParam; - wxRealPoint *points; - - wxMetaRecord(int fun) - { - metaFunction = fun; points = NULL; stringParam = NULL; - param1 = 0; - } - ~wxMetaRecord(void); -}; - -class wxXMetaFile: public wxObject -{ - public: - double lastX; - double lastY; - bool ok; - - double left; - double top; - double right; - double bottom; - - wxList metaRecords; - wxList gdiObjects; // List of wxMetaRecord objects created with Create..., - // referenced by position in list by SelectObject - wxXMetaFile(char *file = NULL); - ~wxXMetaFile(void); - - // After this is called, the metafile cannot be used for anything - // since it is now owned by the clipboard. - bool SetClipboard(int width = 0, int height = 0); - - bool Play(wxDC *dc); - inline bool Ok(void) const { return ok; } - bool ReadFile(char *file); -}; - -#endif - // _MFUTILS_H_ diff --git a/utils/ogl/src/misc.cpp b/utils/ogl/src/misc.cpp deleted file mode 100644 index 03a9b5a4fc..0000000000 --- a/utils/ogl/src/misc.cpp +++ /dev/null @@ -1,908 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: misc.cpp -// Purpose: Miscellaneous OGL support functions -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "misc.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#ifdef PROLOGIO -#include -#endif - -#include - -#if USE_IOSTREAMH -#include -#else -#include -#endif -#include -#include -#include - -#include "basic.h" -#include "basicp.h" -#include "misc.h" -#include "constrnt.h" -#include "composit.h" - -wxFont* g_oglNormalFont; -wxPen* g_oglBlackPen; -wxPen* g_oglWhiteBackgroundPen; -wxPen* g_oglTransparentPen; -wxBrush* g_oglWhiteBackgroundBrush; -wxPen* g_oglBlackForegroundPen; -wxCursor* g_oglBullseyeCursor = NULL; - -char* oglBuffer = NULL; - -wxList oglObjectCopyMapping(wxKEY_INTEGER); - -void wxOGLInitialize() -{ - g_oglBullseyeCursor = new wxCursor(wxCURSOR_BULLSEYE); - - g_oglNormalFont = new wxFont(10, wxSWISS, wxNORMAL, wxNORMAL); - - g_oglBlackPen = new wxPen("BLACK", 1, wxSOLID); - - g_oglWhiteBackgroundPen = new wxPen("WHITE", 1, wxSOLID); - g_oglTransparentPen = new wxPen("WHITE", 1, wxTRANSPARENT); - g_oglWhiteBackgroundBrush = new wxBrush("WHITE", wxSOLID); - g_oglBlackForegroundPen = new wxPen("BLACK", 1, wxSOLID); - - OGLInitializeConstraintTypes(); - - // Initialize big buffer used when writing images - oglBuffer = new char[3000]; - - if (!oglPopupDivisionMenu) - { - oglPopupDivisionMenu = new wxMenu("", (wxFunction)oglGraphicsDivisionMenuProc); - oglPopupDivisionMenu->Append(DIVISION_MENU_SPLIT_HORIZONTALLY, "Split horizontally"); - oglPopupDivisionMenu->Append(DIVISION_MENU_SPLIT_VERTICALLY, "Split vertically"); - oglPopupDivisionMenu->AppendSeparator(); - oglPopupDivisionMenu->Append(DIVISION_MENU_EDIT_LEFT_EDGE, "Edit left edge"); - oglPopupDivisionMenu->Append(DIVISION_MENU_EDIT_TOP_EDGE, "Edit top edge"); - } -} - -void wxOGLCleanUp() -{ - if (oglBuffer) - { - delete[] oglBuffer; - oglBuffer = NULL; - } - oglBuffer = NULL; - if (oglPopupDivisionMenu) - { - delete oglPopupDivisionMenu; - oglPopupDivisionMenu = NULL; - } - if (g_oglBullseyeCursor) - { - delete g_oglBullseyeCursor; - g_oglBullseyeCursor = NULL; - } - - if (g_oglNormalFont) - { - delete g_oglNormalFont; - g_oglNormalFont = NULL; - } - if (g_oglBlackPen) - { - delete g_oglBlackPen; - g_oglBlackPen = NULL; - } - if (g_oglWhiteBackgroundPen) - { - delete g_oglWhiteBackgroundPen; - g_oglWhiteBackgroundPen = NULL; - } - if (g_oglTransparentPen) - { - delete g_oglTransparentPen; - g_oglTransparentPen = NULL; - } - if (g_oglWhiteBackgroundBrush) - { - delete g_oglWhiteBackgroundBrush; - g_oglWhiteBackgroundBrush = NULL; - } - if (g_oglBlackForegroundPen) - { - delete g_oglBlackForegroundPen; - g_oglBlackForegroundPen = NULL; - } - - OGLCleanUpConstraintTypes(); -} - -wxFont *oglMatchFont(int point_size) -{ - wxFont *font = wxTheFontList->FindOrCreateFont(point_size, wxSWISS, wxNORMAL, wxNORMAL); -#if 0 - switch (point_size) - { - case 4: - font = swiss_font_4; - break; - case 6: - font = swiss_font_6; - break; - case 8: - font = swiss_font_8; - break; - case 12: - font = swiss_font_12; - break; - case 14: - font = swiss_font_14; - break; - case 18: - font = swiss_font_18; - break; - case 24: - font = swiss_font_24; - break; - default: - case 10: - font = swiss_font_10; - break; - } -#endif - return font; -} - -int FontSizeDialog(wxFrame *parent, int old_size) -{ - if (old_size <= 0) - old_size = 10; - char buf[40]; - sprintf(buf, "%d", old_size); - wxString ans = wxGetTextFromUser("Enter point size", "Font size", buf, parent); - if (ans == "") - return 0; - - int new_size = atoi(ans); - if ((new_size <= 0) || (new_size > 40)) - { - wxMessageBox("Invalid point size!", "Error", wxOK); - return 0; - } - return new_size; -/* - char *strings[8]; - strings[0] = "4"; - strings[1] = "6"; - strings[2] = "8"; - strings[3] = "10"; - strings[4] = "12"; - strings[5] = "14"; - strings[6] = "18"; - strings[7] = "24"; - char *ans = wxGetSingleChoice("Choose", "Choose a font size", 8, strings, parent); - if (ans) - { - int size; - sscanf(ans, "%d", &size); - return oglMatchFont(size); - } - else return NULL; -*/ -} - -// Centre a list of strings in the given box. xOffset and yOffset are the -// the positions that these lines should be relative to, and this might be -// the same as m_xpos, m_ypos, but might be zero if formatting from left-justifying. -void oglCentreText(wxDC& dc, wxList *text_list, - double m_xpos, double m_ypos, double width, double height, - int formatMode) -{ - int n = text_list->Number(); - - if (!text_list || (n == 0)) - return; - - // First, get maximum dimensions of box enclosing text - - long char_height = 0; - long max_width = 0; - long current_width = 0; - - // Store text extents for speed - double *widths = new double[n]; - - wxNode *current = text_list->First(); - int i = 0; - while (current) - { - wxShapeTextLine *line = (wxShapeTextLine *)current->Data(); - dc.GetTextExtent(line->GetText(), ¤t_width, &char_height); - widths[i] = current_width; - - if (current_width > max_width) - max_width = current_width; - current = current->Next(); - i ++; - } - - double max_height = n*char_height; - - double xoffset, yoffset, xOffset, yOffset; - - if (formatMode & FORMAT_CENTRE_VERT) - { - if (max_height < height) - yoffset = (double)(m_ypos - (height/2.0) + (height - max_height)/2.0); - else - yoffset = (double)(m_ypos - (height/2.0)); - yOffset = m_ypos; - } - else - { - yoffset = 0.0; - yOffset = 0.0; - } - - if (formatMode & FORMAT_CENTRE_HORIZ) - { - xoffset = (double)(m_xpos - width/2.0); - xOffset = m_xpos; - } - else - { - xoffset = 0.0; - xOffset = 0.0; - } - - current = text_list->First(); - i = 0; - - while (current) - { - wxShapeTextLine *line = (wxShapeTextLine *)current->Data(); - - double x; - if ((formatMode & FORMAT_CENTRE_HORIZ) && (widths[i] < width)) - x = (double)((width - widths[i])/2.0 + xoffset); - else - x = xoffset; - double y = (double)(i*char_height + yoffset); - - line->SetX( x - xOffset ); line->SetY( y - yOffset ); - current = current->Next(); - i ++; - } - - delete widths; -} - -// Centre a list of strings in the given box -void oglCentreTextNoClipping(wxDC& dc, wxList *text_list, - double m_xpos, double m_ypos, double width, double height) -{ - int n = text_list->Number(); - - if (!text_list || (n == 0)) - return; - - // First, get maximum dimensions of box enclosing text - - long char_height = 0; - long max_width = 0; - long current_width = 0; - - // Store text extents for speed - double *widths = new double[n]; - - wxNode *current = text_list->First(); - int i = 0; - while (current) - { - wxShapeTextLine *line = (wxShapeTextLine *)current->Data(); - dc.GetTextExtent(line->GetText(), ¤t_width, &char_height); - widths[i] = current_width; - - if (current_width > max_width) - max_width = current_width; - current = current->Next(); - i ++; - } - - double max_height = n*char_height; - - double yoffset = (double)(m_ypos - (height/2.0) + (height - max_height)/2.0); - - double xoffset = (double)(m_xpos - width/2.0); - - current = text_list->First(); - i = 0; - - while (current) - { - wxShapeTextLine *line = (wxShapeTextLine *)current->Data(); - - double x = (double)((width - widths[i])/2.0 + xoffset); - double y = (double)(i*char_height + yoffset); - - line->SetX( x - m_xpos ); line->SetY( y - m_ypos ); - current = current->Next(); - i ++; - } - delete widths; -} - -void oglGetCentredTextExtent(wxDC& dc, wxList *text_list, - double m_xpos, double m_ypos, double width, double height, - double *actual_width, double *actual_height) -{ - int n = text_list->Number(); - - if (!text_list || (n == 0)) - { - *actual_width = 0; - *actual_height = 0; - return; - } - - // First, get maximum dimensions of box enclosing text - - long char_height = 0; - long max_width = 0; - long current_width = 0; - - wxNode *current = text_list->First(); - int i = 0; - while (current) - { - wxShapeTextLine *line = (wxShapeTextLine *)current->Data(); - dc.GetTextExtent(line->GetText(), ¤t_width, &char_height); - - if (current_width > max_width) - max_width = current_width; - current = current->Next(); - i ++; - } - - *actual_height = n*char_height; - *actual_width = max_width; -} - -// Format a string to a list of strings that fit in the given box. -// Interpret %n and 10 or 13 as a new line. -wxStringList *oglFormatText(wxDC& dc, const wxString& text, double width, double height, int formatMode) -{ - // First, parse the string into a list of words - wxStringList word_list; - - // Make new lines into NULL strings at this point - int i = 0; int j = 0; int len = strlen(text); - char word[200]; word[0] = 0; - bool end_word = FALSE; bool new_line = FALSE; - while (i < len) - { - switch (text[i]) - { - case '%': - { - i ++; - if (i == len) - { word[j] = '%'; j ++; } - else - { - if (text[i] == 'n') - { new_line = TRUE; end_word = TRUE; i++; } - else - { word[j] = '%'; j ++; word[j] = text[i]; j ++; i ++; } - } - break; - } - case 10: - { - new_line = TRUE; end_word = TRUE; i++; - break; - } - case 13: - { - new_line = TRUE; end_word = TRUE; i++; - } - case ' ': - { - end_word = TRUE; - i ++; - break; - } - default: - { - word[j] = text[i]; - j ++; i ++; - break; - } - } - if (i == len) end_word = TRUE; - if (end_word) - { - word[j] = 0; - j = 0; - word_list.Append((wxObject *)copystring(word)); - end_word = FALSE; - } - if (new_line) - { - word_list.Append((wxObject *)NULL); - new_line = FALSE; - } - } - // Now, make a list of strings which can fit in the box - wxStringList *string_list = new wxStringList; - - char buffer[400]; - buffer[0] = 0; - wxNode *node = word_list.First(); - long x, y; - - while (node) - { - wxString oldBuffer(buffer); - - char *s = (char *)node->Data(); - if (!s) - { - // FORCE NEW LINE - if (strlen(buffer) > 0) - string_list->Add(buffer); - - buffer[0] = 0; - } - else - { - if (buffer[0] != 0) - strcat(buffer, " "); - - strcat(buffer, s); - dc.GetTextExtent(buffer, &x, &y); - - // Don't fit within the bounding box if we're fitting shape to contents - if ((x > width) && !(formatMode & FORMAT_SIZE_TO_CONTENTS)) - { - // Deal with first word being wider than box - if (oldBuffer.Length() > 0) - string_list->Add(oldBuffer); - - buffer[0] = 0; - strcat(buffer, s); - } - } - - node = node->Next(); - } - if (buffer[0] != 0) - string_list->Add(buffer); - - return string_list; -} - -void oglDrawFormattedText(wxDC& dc, wxList *text_list, - double m_xpos, double m_ypos, double width, double height, - int formatMode) -{ - double xoffset, yoffset; - if (formatMode & FORMAT_CENTRE_HORIZ) - xoffset = m_xpos; - else - xoffset = (double)(m_xpos - (width / 2.0)); - - if (formatMode & FORMAT_CENTRE_VERT) - yoffset = m_ypos; - else - yoffset = (double)(m_ypos - (height / 2.0)); - - dc.SetClippingRegion( - (double)(m_xpos - width/2.0), (double)(m_ypos - height/2.0), - (double)width, (double)height); - - wxNode *current = text_list->First(); - while (current) - { - wxShapeTextLine *line = (wxShapeTextLine *)current->Data(); - - dc.DrawText(line->GetText(), WXROUND(xoffset + line->GetX()), WXROUND(yoffset + line->GetY())); - current = current->Next(); - } - - dc.DestroyClippingRegion(); -} - -/* - * Find centroid given list of points comprising polyline - * - */ - -void oglFindPolylineCentroid(wxList *points, double *x, double *y) -{ - double xcount = 0; - double ycount = 0; - - wxNode *node = points->First(); - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - xcount += point->x; - ycount += point->y; - node = node->Next(); - } - - *x = (xcount/points->Number()); - *y = (ycount/points->Number()); -} - -/* - * Check that (x1, y1) -> (x2, y2) hits (x3, y3) -> (x4, y4). - * If so, ratio1 gives the proportion along the first line - * that the intersection occurs (or something like that). - * Used by functions below. - * - */ -void oglCheckLineIntersection(double x1, double y1, double x2, double y2, - double x3, double y3, double x4, double y4, - double *ratio1, double *ratio2) -{ - double denominator_term = (y4 - y3)*(x2 - x1) - (y2 - y1)*(x4 - x3); - double numerator_term = (x3 - x1)*(y4 - y3) + (x4 - x3)*(y1 - y3); - - double line_constant; - double length_ratio = 1.0; - double k_line = 1.0; - - // Check for parallel lines - if ((denominator_term < 0.005) && (denominator_term > -0.005)) - line_constant = -1.0; - else - line_constant = numerator_term/denominator_term; - - // Check for intersection - if ((line_constant < 1.0) && (line_constant > 0.0)) - { - // Now must check that other line hits - if (((y4 - y3) < 0.005) && ((y4 - y3) > -0.005)) - k_line = ((x1 - x3) + line_constant*(x2 - x1))/(x4 - x3); - else - k_line = ((y1 - y3) + line_constant*(y2 - y1))/(y4 - y3); - - if ((k_line >= 0.0) && (k_line < 1.0)) - length_ratio = line_constant; - else - k_line = 1.0; - } - *ratio1 = length_ratio; - *ratio2 = k_line; -} - -/* - * Find where (x1, y1) -> (x2, y2) hits one of the lines in xvec, yvec. - * (*x3, *y3) is the point where it hits. - * - */ -void oglFindEndForPolyline(double n, double xvec[], double yvec[], - double x1, double y1, double x2, double y2, double *x3, double *y3) -{ - int i; - double lastx = xvec[0]; - double lasty = yvec[0]; - - double min_ratio = 1.0; - double line_ratio; - double other_ratio; - - for (i = 1; i < n; i++) - { - oglCheckLineIntersection(x1, y1, x2, y2, lastx, lasty, xvec[i], yvec[i], - &line_ratio, &other_ratio); - lastx = xvec[i]; - lasty = yvec[i]; - - if (line_ratio < min_ratio) - min_ratio = line_ratio; - } - - // Do last (implicit) line if last and first doubles are not identical - if (!(xvec[0] == lastx && yvec[0] == lasty)) - { - oglCheckLineIntersection(x1, y1, x2, y2, lastx, lasty, xvec[0], yvec[0], - &line_ratio, &other_ratio); - - if (line_ratio < min_ratio) - min_ratio = line_ratio; - } - - *x3 = (x1 + (x2 - x1)*min_ratio); - *y3 = (y1 + (y2 - y1)*min_ratio); - -} - -/* - * Find where the line hits the box. - * - */ - -void oglFindEndForBox(double width, double height, - double x1, double y1, // Centre of box (possibly) - double x2, double y2, // other end of line - double *x3, double *y3) // End on box edge -{ - double xvec[5]; - double yvec[5]; - - xvec[0] = (double)(x1 - width/2.0); - yvec[0] = (double)(y1 - height/2.0); - xvec[1] = (double)(x1 - width/2.0); - yvec[1] = (double)(y1 + height/2.0); - xvec[2] = (double)(x1 + width/2.0); - yvec[2] = (double)(y1 + height/2.0); - xvec[3] = (double)(x1 + width/2.0); - yvec[3] = (double)(y1 - height/2.0); - xvec[4] = (double)(x1 - width/2.0); - yvec[4] = (double)(y1 - height/2.0); - - oglFindEndForPolyline(5, xvec, yvec, x2, y2, x1, y1, x3, y3); -} - -/* - * Find where the line hits the circle. - * - */ - -void oglFindEndForCircle(double radius, - double x1, double y1, // Centre of circle - double x2, double y2, // Other end of line - double *x3, double *y3) -{ - double H = (double)sqrt((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1)); - - if (H == 0.0) - { - *x3 = x1; - *y3 = y1; - } - else - { - *y3 = radius * (y2 - y1)/H + y1; - *x3 = radius * (x2 - x1)/H + x1; - } -} - -/* - * Given the line (x1, y1) -> (x2, y2), and an arrow size of given length and width, - * return the position of the tip of the arrow and the left and right vertices of the arrow. - * - */ - -void oglGetArrowPoints(double x1, double y1, double x2, double y2, - double length, double width, - double *tip_x, double *tip_y, - double *side1_x, double *side1_y, - double *side2_x, double *side2_y) -{ - double l = (double)sqrt((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1)); - - if (l < 0.01) - l = (double) 0.01; - - double i_bar = (x2 - x1)/l; - double j_bar = (y2 - y1)/l; - - double x3 = (- length*i_bar) + x2; - double y3 = (- length*j_bar) + y2; - - *side1_x = width*(-j_bar) + x3; - *side1_y = width*i_bar + y3; - - *side2_x = -width*(-j_bar) + x3; - *side2_y = -width*i_bar + y3; - - *tip_x = x2; *tip_y = y2; -} - -/* - * Given an ellipse and endpoints of a line, returns the point at which - * the line touches the ellipse in values x4, y4. - * This function assumes that the centre of the ellipse is at x1, y1, and the - * ellipse has a width of width1 and a height of height1. It also assumes you are - * wanting to draw an arc FROM point x2, y2 TOWARDS point x3, y3. - * This function calculates the x,y coordinates of the intersection point of - * the arc with the ellipse. - * Author: Ian Harrison - */ - -void oglDrawArcToEllipse(double x1, double y1, double width1, double height1, double x2, double y2, double x3, double y3, - double *x4, double *y4) -{ - double a1 = (double)(width1/2.0); - double b1 = (double)(height1/2.0); - - // These are required to give top left x and y coordinates for DrawEllipse -// double top_left_x1 = (double)(x1 - a1); -// double top_left_y1 = (double)(y1 - b1); -/* - // Check for vertical line - if (fabs(x2 - x3) < 0.05) - { - *x4 = x3; - if (y2 < y3) - *y4 = (double)(y1 - b1); - else - *y4 = (double)(y1 + b1); - return; - } -*/ - // Check that x2 != x3 - if (fabs(x2 - x3) < 0.05) - { - *x4 = x2; - if (y3 > y2) - *y4 = (double)(y1 - sqrt((b1*b1 - (((x2-x1)*(x2-x1))*(b1*b1)/(a1*a1))))); - else - *y4 = (double)(y1 + sqrt((b1*b1 - (((x2-x1)*(x2-x1))*(b1*b1)/(a1*a1))))); - return; - } - - // Calculate the x and y coordinates of the point where arc intersects ellipse - - double A, B, C, D, E, F, G, H, K; - double ellipse1_x, ellipse1_y; - - A = (double)(1/(a1 * a1)); - B = (double)((y3 - y2) * (y3 - y2)) / ((x3 - x2) * (x3 - x2) * b1 * b1); - C = (double)(2 * (y3 - y2) * (y2 - y1)) / ((x3 - x2) * b1 * b1); - D = (double)((y2 - y1) * (y2 - y1)) / (b1 * b1); - E = (double)(A + B); - F = (double)(C - (2 * A * x1) - (2 * B * x2)); - G = (double)((A * x1 * x1) + (B * x2 * x2) - (C * x2) + D - 1); - H = (double)((y3 - y2) / (x3 - x2)); - K = (double)((F * F) - (4 * E * G)); - - if (K >= 0) - // In this case the line intersects the ellipse, so calculate intersection - { - if(x2 >= x1) - { - ellipse1_x = (double)(((F * -1) + sqrt(K)) / (2 * E)); - ellipse1_y = (double)((H * (ellipse1_x - x2)) + y2); - } - else - { - ellipse1_x = (double)(((F * -1) - sqrt(K)) / (2 * E)); - ellipse1_y = (double)((H * (ellipse1_x - x2)) + y2); - } - } - else - // in this case, arc does not intersect ellipse, so just draw arc - { - ellipse1_x = x3; - ellipse1_y = y3; - } - *x4 = ellipse1_x; - *y4 = ellipse1_y; - -/* - // Draw a little circle (radius = 2) at the end of the arc where it hits - // the ellipse . - - double circle_x = ellipse1_x - 2.0; - double circle_y = ellipse1_y - 2.0; - m_canvas->DrawEllipse(circle_x, circle_y, 4.0, 4.0); -*/ -} - -// Update a list item from a list of strings -void UpdateListBox(wxListBox *item, wxList *list) -{ - item->Clear(); - if (!list) - return; - - wxNode *node = list->First(); - while (node) - { - char *s = (char *)node->Data(); - item->Append(s); - node = node->Next(); - } -} - -bool oglRoughlyEqual(double val1, double val2, double tol) -{ - return ( (val1 < (val2 + tol)) && (val1 > (val2 - tol)) && - (val2 < (val1 + tol)) && (val2 > (val1 - tol))); -} - -/* - * Hex<->Dec conversion - */ - -// Array used in DecToHex conversion routine. -static char sg_HexArray[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', - 'C', 'D', 'E', 'F' }; - -// Convert 2-digit hex number to decimal -unsigned int oglHexToDec(char* buf) -{ - int firstDigit, secondDigit; - - if (buf[0] >= 'A') - firstDigit = buf[0] - 'A' + 10; - else - firstDigit = buf[0] - '0'; - - if (buf[1] >= 'A') - secondDigit = buf[1] - 'A' + 10; - else - secondDigit = buf[1] - '0'; - - return firstDigit * 16 + secondDigit; -} - -// Convert decimal integer to 2-character hex string -void oglDecToHex(unsigned int dec, char *buf) -{ - int firstDigit = (int)(dec/16.0); - int secondDigit = (int)(dec - (firstDigit*16.0)); - buf[0] = sg_HexArray[firstDigit]; - buf[1] = sg_HexArray[secondDigit]; - buf[2] = 0; -} - -// 3-digit hex to wxColour -wxColour oglHexToColour(const wxString& hex) -{ - if (hex.Length() == 6) - { - char buf[7]; - strncpy(buf, hex, 7); - unsigned int r = oglHexToDec((char *)buf); - unsigned int g = oglHexToDec((char *)(buf+2)); - unsigned int b = oglHexToDec((char *)(buf+4)); - return wxColour(r, g, b); - } - else - return wxColour(0,0,0); -} - -// RGB to 3-digit hex -wxString oglColourToHex(const wxColour& colour) -{ - char buf[7]; - unsigned int red = colour.Red(); - unsigned int green = colour.Green(); - unsigned int blue = colour.Blue(); - - oglDecToHex(red, buf); - oglDecToHex(green, buf+2); - oglDecToHex(blue, buf+4); - - return wxString(buf); -} - - diff --git a/utils/ogl/src/misc.h b/utils/ogl/src/misc.h deleted file mode 100644 index 4e6abfb6b2..0000000000 --- a/utils/ogl/src/misc.h +++ /dev/null @@ -1,113 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: misc.h -// Purpose: Miscellaneous utilities for OGL -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _OGL_MISC_H_ -#define _OGL_MISC_H_ - -#ifdef __GNUG__ -#pragma interface "misc.h" -#endif - -// List to use when copying objects; may need to associate elements of new objects -// with elements of old objects, e.g. when copying constraint.s -extern wxList oglObjectCopyMapping; - -/* - * TEXT FORMATTING FUNCTIONS - * - */ - -// Centres the given list of wxShapeTextLine strings in the given box -// (changing the positions in situ). Doesn't actually draw into the DC. -void oglCentreText(wxDC& dc, wxList *text, double m_xpos, double m_ypos, - double width, double height, - int formatMode = FORMAT_CENTRE_HORIZ | FORMAT_CENTRE_VERT); - -// Given a string, returns a list of strings that fit within the given -// width of box. Height is ignored. -wxStringList *oglFormatText(wxDC& dc, const wxString& text, double width, double height, int formatMode = 0); - -// Centres the list of wxShapeTextLine strings, doesn't clip. -// Doesn't actually draw into the DC. -void oglCentreTextNoClipping(wxDC& dc, wxList *text_list, - double m_xpos, double m_ypos, double width, double height); - -// Gets the maximum width and height of the given list of wxShapeTextLines. -void oglGetCentredTextExtent(wxDC& dc, wxList *text_list, - double m_xpos, double m_ypos, double width, double height, - double *actual_width, double *actual_height); - -// Actually draw the preformatted list of wxShapeTextLines. -void oglDrawFormattedText(wxDC& context, wxList *text_list, - double m_xpos, double m_ypos, double width, double height, - int formatMode = FORMAT_CENTRE_HORIZ | FORMAT_CENTRE_VERT); - -// Give it a list of points, finds the centre. -void oglFindPolylineCentroid(wxList *points, double *x, double *y); - -void oglCheckLineIntersection(double x1, double y1, double x2, double y2, - double x3, double y3, double x4, double y4, - double *ratio1, double *ratio2); - -void oglFindEndForPolyline(double n, double xvec[], double yvec[], - double x1, double y1, double x2, double y2, double *x3, double *y3); - - -void oglFindEndForBox(double width, double height, - double x1, double y1, // Centre of box (possibly) - double x2, double y2, // other end of line - double *x3, double *y3); // End on box edge - -void oglFindEndForCircle(double radius, - double x1, double y1, // Centre of circle - double x2, double y2, // Other end of line - double *x3, double *y3); - -void oglGetArrowPoints(double x1, double y1, double x2, double y2, - double length, double width, - double *tip_x, double *tip_y, - double *side1_x, double *side1_y, - double *side2_x, double *side2_y); - -/* - * Given an ellipse and endpoints of a line, returns the point at which - * the line touches the ellipse in values x4, y4. - * This function assumes that the centre of the ellipse is at x1, y1, and the - * ellipse has a width of a1 and a height of b1. It also assumes you are - * wanting to draw an arc FROM point x2, y2 TOWARDS point x3, y3. - * This function calculates the x,y coordinates of the intersection point of - * the arc with the ellipse. - * Author: Ian Harrison - */ - -void oglDrawArcToEllipse(double x1, double y1, double a1, double b1, double x2, double y2, double x3, double y3, - double *x4, double *y4); - -bool oglRoughlyEqual(double val1, double val2, double tol = 0.00001); - -extern wxFont* g_oglNormalFont; -extern wxPen* g_oglBlackPen; -extern wxPen* g_oglWhiteBackgroundPen; -extern wxPen* g_oglTransparentPen; -extern wxBrush* g_oglWhiteBackgroundBrush; -extern wxPen* g_oglBlackForegroundPen; -extern wxCursor* g_oglBullseyeCursor; - -extern wxFont* oglMatchFont(int point_size); - -extern wxString oglColourToHex(const wxColour& colour); -extern wxColour oglHexToColour(const wxString& hex); -extern void oglDecToHex(unsigned int dec, char *buf); -extern unsigned int oglHexToDec(char* buf); - - -#endif - // _OGL_MISC_H_ diff --git a/utils/ogl/src/ogl.h b/utils/ogl/src/ogl.h deleted file mode 100644 index 7f5080da11..0000000000 --- a/utils/ogl/src/ogl.h +++ /dev/null @@ -1,26 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: ogl.h -// Purpose: OGL main include -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _OGL_OGL_H_ -#define _OGL_OGL_H_ - -#include "basic.h" // Basic shapes -#include "lines.h" // Lines and splines -#include "divided.h" // Vertically-divided rectangle -#include "composit.h" // Composite images -#include "canvas.h" // wxShapeCanvas for displaying objects -#include "ogldiag.h" // wxDiagram - -extern void wxOGLInitialize(); -extern void wxOGLCleanUp(); - -#endif - // _OGL_OGL_H_ diff --git a/utils/ogl/src/ogldiag.cpp b/utils/ogl/src/ogldiag.cpp deleted file mode 100644 index 60efe27a7d..0000000000 --- a/utils/ogl/src/ogldiag.cpp +++ /dev/null @@ -1,580 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: ogldiag.cpp -// Purpose: wxDiagram -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "ogldiag.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#ifdef PROLOGIO -#include -#endif - -#if USE_IOSTREAMH -#include -#else -#include -#endif - -#include -#include -#include -#include - -#include "basic.h" -#include "basicp.h" -#include "canvas.h" -#include "ogldiag.h" -#include "lines.h" -#include "composit.h" -#include "misc.h" - -IMPLEMENT_DYNAMIC_CLASS(wxDiagram, wxObject) - -// Object canvas -wxDiagram::wxDiagram() -{ - m_diagramCanvas = NULL; - m_quickEditMode = FALSE; - m_snapToGrid = TRUE; - m_gridSpacing = 5.0; - m_shapeList = new wxList; - m_mouseTolerance = DEFAULT_MOUSE_TOLERANCE; -} - -wxDiagram::~wxDiagram() -{ - if (m_shapeList) - delete m_shapeList; -} - -void wxDiagram::SetSnapToGrid(bool snap) -{ - m_snapToGrid = snap; -} - -void wxDiagram::SetGridSpacing(double spacing) -{ - m_gridSpacing = spacing; -} - -void wxDiagram::Snap(double *x, double *y) -{ - if (m_snapToGrid) - { - *x = m_gridSpacing * ((int)(*x/m_gridSpacing + 0.5)); - *y = m_gridSpacing * ((int)(*y/m_gridSpacing + 0.5)); - } -} - - -void wxDiagram::Redraw(wxDC& dc) -{ - if (m_shapeList) - { - if (GetCanvas()) - GetCanvas()->SetCursor(wxHOURGLASS_CURSOR); - wxNode *current = m_shapeList->First(); - - while (current) - { - wxShape *object = (wxShape *)current->Data(); - if (!object->GetParent()) - object->Draw(dc); - - current = current->Next(); - } - if (GetCanvas()) - GetCanvas()->SetCursor(wxSTANDARD_CURSOR); - } -} - -void wxDiagram::Clear(wxDC& dc) -{ - dc.Clear(); -} - -// Insert object after addAfter, or at end of list. -void wxDiagram::AddShape(wxShape *object, wxShape *addAfter) -{ - wxNode *nodeAfter = NULL; - if (addAfter) - nodeAfter = m_shapeList->Member(addAfter); - - if (!m_shapeList->Member(object)) - { - if (nodeAfter) - { - if (nodeAfter->Next()) - m_shapeList->Insert(nodeAfter->Next(), object); - else - m_shapeList->Append(object); - } - else - m_shapeList->Append(object); - object->SetCanvas(GetCanvas()); - } -} - -void wxDiagram::InsertShape(wxShape *object) -{ - m_shapeList->Insert(object); - object->SetCanvas(GetCanvas()); -} - -void wxDiagram::RemoveShape(wxShape *object) -{ - m_shapeList->DeleteObject(object); -} - -// Should this delete the actual objects too? I think not. -void wxDiagram::RemoveAllShapes() -{ - m_shapeList->Clear(); -} - -void wxDiagram::DeleteAllShapes() -{ - wxNode *node = m_shapeList->First(); - while (node) - { - wxShape *shape = (wxShape *)node->Data(); - if (!shape->GetParent()) - { - RemoveShape(shape); - delete shape; - node = m_shapeList->First(); - } - else - node = node->Next(); - } -} - -void wxDiagram::ShowAll(bool show) -{ - wxNode *current = m_shapeList->First(); - - while (current) - { - wxShape *object = (wxShape *)current->Data(); - object->Show(show); - - current = current->Next(); - } -} - -void wxDiagram::DrawOutline(wxDC& dc, double x1, double y1, double x2, double y2) -{ - wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT); - dc.SetPen(dottedPen); - dc.SetBrush((* wxTRANSPARENT_BRUSH)); - - wxPoint points[5]; - - points[0].x = x1; - points[0].y = y1; - - points[1].x = x2; - points[1].y = y1; - - points[2].x = x2; - points[2].y = y2; - - points[3].x = x1; - points[3].y = y2; - - points[4].x = x1; - points[4].y = y1; - dc.DrawLines(5, points); -} - -// Make sure all text that should be centred, is centred. -void wxDiagram::RecentreAll(wxDC& dc) -{ - wxNode *object_node = m_shapeList->First(); - while (object_node) - { - wxShape *obj = (wxShape *)object_node->Data(); - obj->Recentre(dc); - object_node = object_node->Next(); - } -} - -// Input/output -#ifdef PROLOGIO -bool wxDiagram::SaveFile(const wxString& filename) -{ - wxBeginBusyCursor(); - - wxExprDatabase *database = new wxExprDatabase; - - // First write the diagram type - wxExpr *header = new wxExpr("diagram"); - OnHeaderSave(*database, *header); - - database->Append(header); - - wxNode *node = m_shapeList->First(); - while (node) - { - wxShape *shape = (wxShape *)node->Data(); - - if (!shape->IsKindOf(CLASSINFO(wxControlPoint))) - { - wxExpr *expr = NULL; - if (shape->IsKindOf(CLASSINFO(wxLineShape))) - expr = new wxExpr("line"); - else - expr = new wxExpr("shape"); - - OnShapeSave(*database, *shape, *expr); - } - node = node->Next(); - } - OnDatabaseSave(*database); - - char tempFile[400]; - wxGetTempFileName("diag", tempFile); - ofstream stream(tempFile); - if (stream.bad()) - { - wxEndBusyCursor(); - delete database; - return FALSE; - } - - database->Write(stream); - stream.close(); - delete database; - -/* - // Save backup - if (FileExists(filename)) - { - char buf[400]; -#ifdef __X__ - sprintf(buf, "%s.bak", filename); -#endif -#ifdef __WXMSW__ - sprintf(buf, "_diagram.bak"); -#endif - if (FileExists(buf)) wxRemoveFile(buf); - if (!wxRenameFile(filename, buf)) - { - wxCopyFile(filename, buf); - wxRemoveFile(filename); - } - } -*/ - - // Copy the temporary file to the correct filename - if (!wxRenameFile(tempFile, filename)) - { - wxCopyFile(tempFile, filename); - wxRemoveFile(tempFile); - } - - wxEndBusyCursor(); - return TRUE; -} - -bool wxDiagram::LoadFile(const wxString& filename) -{ - wxBeginBusyCursor(); - - wxExprDatabase database(PrologInteger, "id"); - if (!database.Read(filename)) - { - wxEndBusyCursor(); - return FALSE; - } - - DeleteAllShapes(); - - database.BeginFind(); - wxExpr *header = database.FindClauseByFunctor("diagram"); - - if (header) - OnHeaderLoad(database, *header); - - // Scan through all clauses and register the ids - wxNode *node = database.First(); - while (node) - { - wxExpr *clause = (wxExpr *)node->Data(); - long id = -1; - clause->GetAttributeValue("id", id); - RegisterId(id); - node = node->Next(); - } - - ReadNodes(database); - ReadContainerGeometry(database); - ReadLines(database); - - OnDatabaseLoad(database); - - wxEndBusyCursor(); - - return TRUE; -} - -void wxDiagram::ReadNodes(wxExprDatabase& database) -{ - // Find and create the node images - database.BeginFind(); - wxExpr *clause = database.FindClauseByFunctor("shape"); - while (clause) - { - char *type = NULL; - long parentId = -1; - - clause->AssignAttributeValue("type", &type); - clause->AssignAttributeValue("parent", &parentId); - wxClassInfo *classInfo = wxClassInfo::FindClass(type); - if (classInfo) - { - wxShape *shape = (wxShape *)classInfo->CreateObject(); - OnShapeLoad(database, *shape, *clause); - - shape->SetCanvas(GetCanvas()); - shape->Show(TRUE); - - m_shapeList->Append(shape); - - // If child of composite, link up - if (parentId > -1) - { - wxExpr *parentExpr = database.HashFind("shape", parentId); - if (parentExpr && parentExpr->GetClientData()) - { - wxShape *parent = (wxShape *)parentExpr->GetClientData(); - shape->SetParent(parent); - parent->GetChildren().Append(shape); - } - } - - clause->SetClientData(shape); - } - if (type) - delete[] type; - - clause = database.FindClauseByFunctor("shape"); - } - return; -} - -void wxDiagram::ReadLines(wxExprDatabase& database) -{ - database.BeginFind(); - wxExpr *clause = database.FindClauseByFunctor("line"); - while (clause) - { - wxString type(""); - long parentId = -1; - - clause->GetAttributeValue("type", type); - clause->GetAttributeValue("parent", parentId); - wxClassInfo *classInfo = wxClassInfo::FindClass((char*) (const char*) type); - if (classInfo) - { - wxLineShape *shape = (wxLineShape *)classInfo->CreateObject(); - shape->Show(TRUE); - - OnShapeLoad(database, *shape, *clause); - - long image_to = -1; long image_from = -1; - clause->GetAttributeValue("to", image_to); - clause->GetAttributeValue("from", image_from); - - wxExpr *image_to_expr = database.HashFind("shape", image_to); - - if (!image_to_expr) - { - // Error - } - wxExpr *image_from_expr = database.HashFind("shape", image_from); - - if (!image_from_expr) - { - // Error - } - - if (image_to_expr && image_from_expr) - { - wxShape *image_to_object = (wxShape *)image_to_expr->GetClientData(); - wxShape *image_from_object = (wxShape *)image_from_expr->GetClientData(); - - if (image_to_object && image_from_object) - { - image_from_object->AddLine(shape, image_to_object, shape->GetAttachmentFrom(), shape->GetAttachmentTo()); - } - } - clause->SetClientData(shape); - - m_shapeList->Append(shape); - } - - clause = database.FindClauseByFunctor("line"); - } -} - -// Containers have divisions that reference adjoining divisions, -// so we need a separate pass to link everything up. -// Also used by Symbol Library. -void wxDiagram::ReadContainerGeometry(wxExprDatabase& database) -{ - database.BeginFind(); - wxExpr *clause = database.FindClauseByFunctor("shape"); - while (clause) - { - wxShape *image = (wxShape *)clause->GetClientData(); - if (image && image->IsKindOf(CLASSINFO(wxCompositeShape))) - { - wxCompositeShape *composite = (wxCompositeShape *)image; - wxExpr *divisionExpr = NULL; - - // Find the list of divisions in the composite - clause->GetAttributeValue("divisions", &divisionExpr); - if (divisionExpr) - { - int i = 0; - wxExpr *idExpr = divisionExpr->Nth(i); - while (idExpr) - { - long divisionId = idExpr->IntegerValue(); - wxExpr *childExpr = database.HashFind("shape", divisionId); - if (childExpr && childExpr->GetClientData()) - { - wxDivisionShape *child = (wxDivisionShape *)childExpr->GetClientData(); - composite->GetDivisions().Append(child); - - // Find the adjoining shapes - long leftSideId = -1; - long topSideId = -1; - long rightSideId = -1; - long bottomSideId = -1; - childExpr->GetAttributeValue("left_side", leftSideId); - childExpr->GetAttributeValue("top_side", topSideId); - childExpr->GetAttributeValue("right_side", rightSideId); - childExpr->GetAttributeValue("bottom_side", bottomSideId); - if (leftSideId > -1) - { - wxExpr *leftExpr = database.HashFind("shape", leftSideId); - if (leftExpr && leftExpr->GetClientData()) - { - wxDivisionShape *leftSide = (wxDivisionShape *)leftExpr->GetClientData(); - child->SetLeftSide(leftSide); - } - } - if (topSideId > -1) - { - wxExpr *topExpr = database.HashFind("shape", topSideId); - if (topExpr && topExpr->GetClientData()) - { - wxDivisionShape *topSide = (wxDivisionShape *)topExpr->GetClientData(); - child->SetTopSide(topSide); - } - } - if (rightSideId > -1) - { - wxExpr *rightExpr = database.HashFind("shape", rightSideId); - if (rightExpr && rightExpr->GetClientData()) - { - wxDivisionShape *rightSide = (wxDivisionShape *)rightExpr->GetClientData(); - child->SetRightSide(rightSide); - } - } - if (bottomSideId > -1) - { - wxExpr *bottomExpr = database.HashFind("shape", bottomSideId); - if (bottomExpr && bottomExpr->GetClientData()) - { - wxDivisionShape *bottomSide = (wxDivisionShape *)bottomExpr->GetClientData(); - child->SetBottomSide(bottomSide); - } - } - } - i ++; - idExpr = divisionExpr->Nth(i); - } - } - } - - clause = database.FindClauseByFunctor("shape"); - } -} - -// Allow for modifying file -bool wxDiagram::OnDatabaseLoad(wxExprDatabase& db) -{ - return TRUE; -} - -bool wxDiagram::OnDatabaseSave(wxExprDatabase& db) -{ - return TRUE; -} - -bool wxDiagram::OnShapeSave(wxExprDatabase& db, wxShape& shape, wxExpr& expr) -{ - shape.WritePrologAttributes(&expr); - db.Append(&expr); - - if (shape.IsKindOf(CLASSINFO(wxCompositeShape))) - { - wxNode *node = shape.GetChildren().First(); - while (node) - { - wxShape *childShape = (wxShape *)node->Data(); - wxExpr *childExpr = new wxExpr("shape"); - OnShapeSave(db, *childShape, *childExpr); - node = node->Next(); - } - } - - return TRUE; -} - -bool wxDiagram::OnShapeLoad(wxExprDatabase& db, wxShape& shape, wxExpr& expr) -{ - shape.ReadPrologAttributes(&expr); - return TRUE; -} - -bool wxDiagram::OnHeaderSave(wxExprDatabase& db, wxExpr& expr) -{ - return TRUE; -} - -bool wxDiagram::OnHeaderLoad(wxExprDatabase& db, wxExpr& expr) -{ - return TRUE; -} - -#endif - -void wxDiagram::SetCanvas(wxShapeCanvas *can) -{ - m_diagramCanvas = can; -} - - diff --git a/utils/ogl/src/ogldiag.h b/utils/ogl/src/ogldiag.h deleted file mode 100644 index 595e88b386..0000000000 --- a/utils/ogl/src/ogldiag.h +++ /dev/null @@ -1,94 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: ogldiag.h -// Purpose: OGL - wxDiagram class -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _OGL_OGLDIAG_H_ -#define _OGL_OGLDIAG_H_ - -#ifdef __GNUG__ -#pragma interface "ogldiag.h" -#endif - -#include "basic.h" - -class wxDiagram: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxDiagram) - -public: - - wxDiagram(); - virtual ~wxDiagram(); - - void SetCanvas(wxShapeCanvas *can); - - inline wxShapeCanvas *GetCanvas() const { return m_diagramCanvas; } - - virtual void Redraw(wxDC& dc); - virtual void Clear(wxDC& dc); - virtual void DrawOutline(wxDC& dc, double x1, double y1, double x2, double y2); - - // Add object to end of object list (if addAfter is NULL) - // or just after addAfter. - virtual void AddShape(wxShape *object, wxShape *addAfter = NULL); - - // Add object to front of object list - virtual void InsertShape(wxShape *object); - - void SetSnapToGrid(bool snap); - void SetGridSpacing(double spacing); - inline double GetGridSpacing() { return m_gridSpacing; } - inline bool GetSnapToGrid() const { return m_snapToGrid; } - void Snap(double *x, double *y); - - inline void SetQuickEditMode(bool qem) { m_quickEditMode = qem; } - inline bool GetQuickEditMode() const { return m_quickEditMode; } - - virtual void RemoveShape(wxShape *object); - virtual void RemoveAllShapes(); - virtual void DeleteAllShapes(); - virtual void ShowAll(bool show); - - inline void SetMouseTolerance(int tol) { m_mouseTolerance = tol; } - inline int GetMouseTolerance() const { return m_mouseTolerance; } - inline wxList *GetShapeList() const { return m_shapeList; } - - // Make sure all text that should be centred, is centred. - void RecentreAll(wxDC& dc); - -#ifdef PROLOGIO - // Prolog database stuff - virtual bool SaveFile(const wxString& filename); - virtual bool LoadFile(const wxString& filename); - - virtual void ReadNodes(wxExprDatabase& database); - virtual void ReadLines(wxExprDatabase& database); - virtual void ReadContainerGeometry(wxExprDatabase& database); - - // Allow for modifying file - virtual bool OnDatabaseLoad(wxExprDatabase& db); - virtual bool OnDatabaseSave(wxExprDatabase& db); - virtual bool OnShapeSave(wxExprDatabase& db, wxShape& shape, wxExpr& expr); - virtual bool OnShapeLoad(wxExprDatabase& db, wxShape& shape, wxExpr& expr); - virtual bool OnHeaderSave(wxExprDatabase& db, wxExpr& expr); - virtual bool OnHeaderLoad(wxExprDatabase& db, wxExpr& expr); -#endif - -protected: - wxShapeCanvas* m_diagramCanvas; - bool m_quickEditMode; - bool m_snapToGrid; - double m_gridSpacing; - int m_mouseTolerance; - wxList* m_shapeList; -}; - -#endif - // _OGL_OGLDIAG_H_ diff --git a/utils/serialize/.cvsignore b/utils/serialize/.cvsignore deleted file mode 100644 index 4646a42c35..0000000000 --- a/utils/serialize/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux diff --git a/utils/serialize/Makefile b/utils/serialize/Makefile deleted file mode 100644 index 3f7a4dce0d..0000000000 --- a/utils/serialize/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makedirs diff --git a/utils/serialize/Makefile.in b/utils/serialize/Makefile.in deleted file mode 100644 index 7a8beeebb6..0000000000 --- a/utils/serialize/Makefile.in +++ /dev/null @@ -1,48 +0,0 @@ -# WXXT base directory -WXBASEDIR=@WXBASEDIR@ - -# set the OS type for compilation -OS=@OS@ -# compile a library only -RULE=gslib - -# define common stuff - -# define library name -LIB_TARGET=wx_serial_gtk -LIB_MAJOR=2 -LIB_MINOR=0 -# define library sources -LIB_SRC=\ -sermain.cpp sercore.cpp sergdi.cpp serwnd.cpp serctrl.cpp serext.cpp -#define library objects -LIB_OBJ=\ -sermain.o sercore.o sergdi.o serwnd.o serctrl.o serext.o - -#additional things needed for compile - -# include the definitions now -include ../../../template.mak - -install:: - @echo "Installing library files and headers for libwx_serial_gtk.." - @echo " Creating directory.." - @$(WXBASEDIR)/mkinstalldirs /usr/local/include/wx_serial - @echo " Copying headers from /include/wx" - @cd $(WXBASEDIR)/utils/serialize ; \ - for f in *.h ; do \ - rm -f /usr/local/include/wx_serial/$$f ; \ - $(INSTALL_DATA) $$f /usr/local/include/wx_serial/$$f ; \ - done - @echo " Copying static library files to /usr/local/lib" - @cd $(WXBASEDIR)/lib/$(OS) ; \ - for f in libwx_serial_gtk.a ; do \ - rm -f /usr/local/lib/$$f ; \ - $(INSTALL_DATA) $$f /usr/local/lib/$$f ; \ - done - @echo " Copying shared libraries to /usr/local/lib" - @cd $(WXBASEDIR)/lib/$(OS) ; \ - for f in libwx_serial_gtk.so* ; do \ - rm -f /usr/local/lib/$$f ; \ - $(INSTALL_PROGRAM) $$f /usr/local/lib/$$f ; \ - done diff --git a/utils/serialize/sercore.cpp b/utils/serialize/sercore.cpp deleted file mode 100644 index 0fffba7f5b..0000000000 --- a/utils/serialize/sercore.cpp +++ /dev/null @@ -1,107 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: sercore.cpp -// Purpose: Serialization: core classes -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "sercore.h" -#endif -#include -#include -#include -#include -#include "sercore.h" - -IMPLEMENT_SERIAL_CLASS(wxList, wxObject) -IMPLEMENT_SERIAL_CLASS(wxHashTable, wxObject) - -void WXSERIAL(wxList)::StoreObject(wxObjectOutputStream& s) -{ - wxList *lst_object = (wxList *)Object(); - wxNode *node = lst_object->First(); - - if (s.FirstStage()) { - while (node) { - s.AddChild(node->Data()); - node = node->Next(); - } - return; - } - - wxDataOutputStream data_s(s); - - data_s.Write8(lst_object->destroy_data); - data_s.Write8(lst_object->key_type); - data_s.Write32( lst_object->Number() ); - - if (lst_object->key_type == wxKEY_INTEGER) { - while (node) { - data_s.Write32(node->key.integer); - node = node->Next(); - } - } else { - while (node) { - data_s.WriteString(node->key.string); - node = node->Next(); - } - } -} - -void WXSERIAL(wxList)::LoadObject(wxObjectInputStream& s) -{ - wxDataInputStream data_s(s); - wxList *list = (wxList *)Object(); - int number, i; - - list->DeleteContents( data_s.Read8() ); - list->key_type = data_s.Read8(); - number = data_s.Read32(); - - if (list->key_type == wxKEY_INTEGER) { - for (i=0;iAppend( data_s.Read32(), s.GetChild() ); - } else { - for (i=0;iAppend( data_s.ReadString(), s.GetChild() ); - } -} - -// ---------------------------------------------------------------------------- - -void WXSERIAL(wxHashTable)::StoreObject(wxObjectOutputStream& s) -{ - wxHashTable *table = (wxHashTable *)Object(); - int i; - - if (s.FirstStage()) { - for (i=0;in;i++) - s.AddChild(table->hash_table[i]); - return; - } - - wxDataOutputStream data_s(s); - - data_s.Write8(table->key_type); - data_s.Write32(table->n); -} - -void WXSERIAL(wxHashTable)::LoadObject(wxObjectInputStream& s) -{ - wxHashTable *table = (wxHashTable *)Object(); - wxDataInputStream data_s(s); - int i, key, n; - - key = data_s.Read8(); - n = data_s.Read32(); - - table->Create(key, n); - - for (i=0;ihash_table[i] = (wxList *)s.GetChild(); -} diff --git a/utils/serialize/sercore.h b/utils/serialize/sercore.h deleted file mode 100644 index 57651eab6d..0000000000 --- a/utils/serialize/sercore.h +++ /dev/null @@ -1,24 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: sercore.h -// Purpose: Serialization: core classes -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef __SERCORE_H__ -#define __SERCORE_H__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include - -DECLARE_SERIAL_CLASS(wxList, wxObject) -DECLARE_SERIAL_CLASS(wxHashTable, wxObject) - -#endif diff --git a/utils/serialize/serctrl.cpp b/utils/serialize/serctrl.cpp deleted file mode 100644 index 13e5451721..0000000000 --- a/utils/serialize/serctrl.cpp +++ /dev/null @@ -1,423 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: serctrl.cpp -// Purpose: Serialization: control classes -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "serctrl.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "serwnd.h" -#include "serctrl.h" - -IMPLEMENT_ALIAS_SERIAL_CLASS(wxControl, wxWindow) -IMPLEMENT_SERIAL_CLASS(wxSlider, wxControl) -IMPLEMENT_SERIAL_CLASS(wxCheckBox, wxControl) -IMPLEMENT_SERIAL_CLASS(wxChoice, wxControl) -IMPLEMENT_SERIAL_CLASS(wxComboBox, wxControl) -IMPLEMENT_SERIAL_CLASS(wxGauge, wxControl) -IMPLEMENT_SERIAL_CLASS(wxListBox, wxControl) -IMPLEMENT_SERIAL_CLASS(wxNotebook, wxControl) -IMPLEMENT_SERIAL_CLASS(wxRadioBox, wxControl) -IMPLEMENT_SERIAL_CLASS(wxRadioButton, wxControl) -IMPLEMENT_SERIAL_CLASS(wxButton, wxControl) -IMPLEMENT_SERIAL_CLASS(wxStaticText, wxControl) -IMPLEMENT_SERIAL_CLASS(wxStaticBox, wxControl) - -//----------------------------------------------------------------------------- - -void WXSERIAL(wxButton)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxControl)::StoreObject(s); -} - -void WXSERIAL(wxButton)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxControl)::LoadObject(s); - - wxButton *button = (wxButton *)Object(); - - printf("label = %s\n", WXSTRINGCAST m_label); - button->Create(m_parent, m_id, m_label, wxPoint(m_x, m_y), wxSize(m_w, m_h), - m_style, *m_validator, m_name); -} - -//----------------------------------------------------------------------------- - -void WXSERIAL(wxCheckBox)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxControl)::StoreObject(s); - - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - data_s.Write8( ((wxCheckBox *)Object())->GetValue() ); -} - -void WXSERIAL(wxCheckBox)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxControl)::LoadObject(s); - - wxDataInputStream data_s(s); - wxCheckBox *chkbox = (wxCheckBox *)Object(); - - chkbox->Create(m_parent, m_id, m_label, wxPoint(m_x, m_y), wxSize(m_w, m_h), - m_style, *m_validator, m_name); - - chkbox->SetValue(data_s.Read8()); -} - -//----------------------------------------------------------------------------- - -void WXSERIAL(wxSlider)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxControl)::StoreObject(s); - - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - wxSlider *slider = (wxSlider *)Object(); - - data_s.Write32( slider->GetMin() ); - data_s.Write32( slider->GetMax() ); - data_s.Write32( slider->GetValue() ); - data_s.Write32( slider->GetTickFreq() ); - data_s.Write32( slider->GetPageSize() ); - data_s.Write32( slider->GetLineSize() ); - data_s.Write32( slider->GetSelStart() ); - data_s.Write32( slider->GetSelEnd() ); - data_s.Write32( slider->GetThumbLength() ); -} - -void WXSERIAL(wxSlider)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxControl)::LoadObject(s); - - wxDataInputStream data_s(s); - wxSlider *slider = (wxSlider *)Object(); - int value, min, max; - - min = data_s.Read32(); - max = data_s.Read32(); - value = data_s.Read32(); - - slider->Create(m_parent, m_id, value, min, max, wxPoint(m_x, m_y), - wxSize(m_w, m_h), m_style, *m_validator, m_name); - - slider->SetTickFreq( 0, data_s.Read32() ); - slider->SetPageSize( data_s.Read32() ); - slider->SetLineSize( data_s.Read32() ); - min = data_s.Read32(); - max = data_s.Read32(); - slider->SetSelection(min, max); - slider->SetThumbLength( data_s.Read32() ); -} - -//----------------------------------------------------------------------------- - -void WXSERIAL(wxGauge)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxControl)::StoreObject(s); - - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - wxGauge *gauge = (wxGauge *)Object(); - - data_s.Write32( gauge->GetRange() ); - data_s.Write8( gauge->GetShadowWidth() ); - data_s.Write8( gauge->GetBezelFace() ); - data_s.Write32( gauge->GetValue() ); -} - -void WXSERIAL(wxGauge)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxControl)::LoadObject(s); - - wxDataInputStream data_s(s); - wxGauge *gauge = (wxGauge *)Object(); - int range; - - range = data_s.Read32(); - gauge->Create(m_parent, m_id, range, wxPoint(m_x, m_y), wxSize(m_w, m_h), - m_style, *m_validator, m_name); - - gauge->SetShadowWidth( data_s.Read8() ); - gauge->SetBezelFace( data_s.Read8() ); - gauge->SetValue( data_s.Read32() ); -} - -//----------------------------------------------------------------------------- - -void WXSERIAL(wxChoice)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxControl)::StoreObject(s); - - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - wxChoice *choice = (wxChoice *)Object(); - int i, num = choice->Number(); - - data_s.Write32(num); - for (i=0;iGetString(i) ); -} - -void WXSERIAL(wxChoice)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxControl)::LoadObject(s); - - wxDataInputStream data_s(s); - wxChoice *choice = (wxChoice *)Object(); - int i,num = data_s.Read32(); - - choice->Create(m_parent, m_id, wxPoint(m_x, m_y), wxSize(m_w, m_h), 0, NULL, - m_style, *m_validator, m_name); - - for (i=0;iAppend( data_s.ReadString() ); -} - -//----------------------------------------------------------------------------- - -void WXSERIAL(wxListBox)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxControl)::StoreObject(s); - - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - wxListBox *listbox = (wxListBox *)Object(); - int i, num = listbox->Number(); - - data_s.Write32(num); - for (i=0;iGetString(i) ); -} - -void WXSERIAL(wxListBox)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxListBox)::LoadObject(s); - - wxDataInputStream data_s(s); - wxListBox *listbox = (wxListBox *)Object(); - int i, num = data_s.Read32(); - - for (i=0;iAppend( data_s.ReadString() ); -} - -//----------------------------------------------------------------------------- - -void WXSERIAL(wxNotebook)::StoreObject(wxObjectOutputStream& s) -{ - wxNotebook *notebook = (wxNotebook *)Object(); - wxImageList *imaglist = notebook->GetImageList(); - int i, pcount = notebook->GetPageCount(); - - WXSERIAL(wxControl)::StoreObject(s); - if (s.FirstStage()) { - s.AddChild(imaglist); - return; - } - - wxDataOutputStream data_s(s); - - data_s.Write8( pcount ); - - for (i=0;iGetPageText(i) ); -} - -void WXSERIAL(wxNotebook)::LoadObject(wxObjectInputStream& s) -{ - wxNotebook *notebook = (wxNotebook *)Object(); - int i; - wxImageList *imaglist; - - if (s.SecondCall()) { - for (i=0;iAddPage( (wxWindow *)s.GetChild(), m_stringlist[i] ); - return; - } - - WXSERIAL(wxControl)::LoadObject(s); - - imaglist = (wxImageList *)s.GetChild(); - - notebook->Create(m_parent, m_id, wxPoint(m_x, m_y), wxSize(m_w, m_h), - m_style, m_name); - - wxDataInputStream data_s(s); - - m_pcount = data_s.Read8(); - for (i=0;iNumber(); - - data_s.Write8( n_items ); - data_s.Write8( box->GetNumberOfRowsOrCols() ); - - for (i=0;iGetString(i) ); -} - -void WXSERIAL(wxRadioBox)::LoadObject(wxObjectInputStream& s) -{ - wxRadioBox *box = (wxRadioBox *)Object(); - - WXSERIAL(wxControl)::LoadObject(s); - - wxDataInputStream data_s(s); - int i, n_rows_cols, n_items; - wxString *items; - - n_items = data_s.Read8(); - n_rows_cols = data_s.Read8(); - - items = new wxString[n_items]; - for (i=0;iCreate(m_parent, m_id, m_title, wxPoint(m_x, m_y), wxSize(m_w, m_h), - n_items, items, 0, m_style, *m_validator, m_name); -} - -//----------------------------------------------------------------------------- - -void WXSERIAL(wxRadioButton)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxControl)::StoreObject(s); - - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - data_s.Write8( (char) ((wxRadioButton *)Object())->GetValue() ); -} - -void WXSERIAL(wxRadioButton)::LoadObject(wxObjectInputStream& s) -{ - wxDataInputStream data_s(s); - - WXSERIAL(wxControl)::LoadObject(s); - ((wxRadioButton *)Object())->SetValue( (bool)data_s.Read8() ); -} - -//----------------------------------------------------------------------------- - -void WXSERIAL(wxComboBox)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxControl)::StoreObject(s); - - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - wxComboBox *box = (wxComboBox *)Object(); - int i, num = box->Number(); - - data_s.Write8( num ); - data_s.Write8( box->GetSelection() ); - for (i=0;iGetString(i) ); - - data_s.WriteString( box->GetValue() ); - - // TODO: Editable flag -} - -void WXSERIAL(wxComboBox)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxControl)::LoadObject(s); - - wxDataInputStream data_s(s); - wxComboBox *box = (wxComboBox *)Object(); - int i, num, selection; - - box->Create(m_parent, m_id, wxEmptyString, wxPoint(m_x, m_y), wxSize(m_w, m_h), - 0, NULL, m_style, *m_validator, m_name); - - num = data_s.Read8(); - selection = data_s.Read8(); - - for (i=0;iAppend( data_s.ReadString() ); - - box->SetSelection( selection ); - box->SetValue( data_s.ReadString() ); -} - -//----------------------------------------------------------------------------- - -void WXSERIAL(wxStaticText)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxControl)::StoreObject(s); -} - -void WXSERIAL(wxStaticText)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxControl)::LoadObject(s); - - ((wxStaticText *)Object())->Create(m_parent, m_id, m_label, wxPoint(m_x, m_y), - wxSize(m_w, m_h), m_style, m_name); -} - -//----------------------------------------------------------------------------- - -void WXSERIAL(wxStaticBox)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxControl)::StoreObject(s); -} - -void WXSERIAL(wxStaticBox)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxControl)::LoadObject(s); - - ((wxStaticBox *)Object())->Create(m_parent, m_id, m_label, wxPoint(m_x, m_y), - wxSize(m_w, m_h), m_style, m_name); -} diff --git a/utils/serialize/serctrl.h b/utils/serialize/serctrl.h deleted file mode 100644 index a93a1b3c1a..0000000000 --- a/utils/serialize/serctrl.h +++ /dev/null @@ -1,47 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: serctrl.h -// Purpose: Serialization: control classes -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef __SERCTRL_H__ -#define __SERCTRL_H__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include -#include "serwnd.h" - -DECLARE_ALIAS_SERIAL_CLASS(wxControl, wxWindow) -DECLARE_SERIAL_CLASS(wxButton, wxControl) -DECLARE_SERIAL_CLASS(wxSlider, wxControl) -DECLARE_SERIAL_CLASS(wxCheckBox, wxControl) -DECLARE_SERIAL_CLASS(wxChoice, wxControl) -DECLARE_SERIAL_CLASS(wxComboBox, wxControl) -DECLARE_SERIAL_CLASS(wxGauge, wxControl) -DECLARE_SERIAL_CLASS(wxListBox, wxControl) -DECLARE_SERIAL_CLASS(wxRadioBox, wxControl) -DECLARE_SERIAL_CLASS(wxRadioButton, wxControl) -DECLARE_SERIAL_CLASS(wxStaticText, wxControl) -DECLARE_SERIAL_CLASS(wxStaticBox, wxControl) - - -class WXSERIAL(wxNotebook) : public WXSERIAL(wxControl) { - DECLARE_DYNAMIC_CLASS( wxNotebook_Serialize ) -public: - void StoreObject(wxObjectOutputStream& s); - void LoadObject(wxObjectInputStream& s); - -protected: - int m_pcount; - wxArrayString m_stringlist; -}; - -#endif diff --git a/utils/serialize/serext.cpp b/utils/serialize/serext.cpp deleted file mode 100644 index aaddb4066a..0000000000 --- a/utils/serialize/serext.cpp +++ /dev/null @@ -1,137 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: serext.cpp -// Purpose: Serialization: Other classes -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "serext.h" -#endif - -#include "serext.h" -#include -#include -#include -#include -#include - -IMPLEMENT_SERIAL_CLASS(wxSplitterWindow, wxWindow) -IMPLEMENT_SERIAL_CLASS(wxGridCell, wxObject) -IMPLEMENT_SERIAL_CLASS(wxGrid, wxPanel) - -void WXSERIAL(wxSplitterWindow)::StoreObject(wxObjectOutputStream& s) -{ - wxSplitterWindow *splitter = (wxSplitterWindow *)Object(); - WXSERIAL(wxWindow)::StoreObject(s); - - if (s.FirstStage()) { - s.AddChild( splitter->GetWindow1() ); - s.AddChild( splitter->GetWindow2() ); - return; - } - - wxDataOutputStream data_s(s); - data_s.Write8( splitter->GetSplitMode() ); - data_s.Write32( splitter->GetSashSize() ); - data_s.Write8( splitter->GetBorderSize() ); - data_s.Write32( splitter->GetSashPosition() ); - data_s.Write32( splitter->GetMinimumPaneSize() ); -} - -void WXSERIAL(wxSplitterWindow)::LoadObject(wxObjectInputStream& s) -{ - wxSplitterWindow *splitter = (wxSplitterWindow *)Object(); - WXSERIAL(wxWindow)::LoadObject(s); - - wxDataInputStream data_s(s); - int split_mode, sash_size, border_size, sash_position, min_pane_size; - - split_mode = data_s.Read8(); - sash_size = data_s.Read32(); - border_size = data_s.Read8(); - sash_position = data_s.Read32(); - min_pane_size = data_s.Read32(); - - splitter->Create(m_parent, m_id, wxPoint(m_x, m_y), wxSize(m_w, m_h), m_style, - m_name); - - if (s.GetChild(1)) { - if (data_s.Read8() == wxSPLIT_VERTICAL) - splitter->SplitVertically((wxWindow *)s.GetChild(0), - (wxWindow *)s.GetChild(1), sash_position); - else - splitter->SplitHorizontally((wxWindow *)s.GetChild(0), - (wxWindow *)s.GetChild(1), sash_position); - } - - splitter->SetSashSize(sash_size); - splitter->SetBorderSize(border_size); - splitter->SetMinimumPaneSize(min_pane_size); -} - -void WXSERIAL(wxGridCell)::StoreObject(wxObjectOutputStream& s) -{ - wxGridCell *cell = (wxGridCell *)Object(); - wxDataOutputStream data_s(s); - - if (s.FirstStage()) { - s.AddChild( cell->GetFont() ); - s.AddChild( cell->GetBackgroundBrush() ); - s.AddChild( cell->GetCellBitmap() ); - s.AddChild( &(cell->GetTextColour()) ); - s.AddChild( &(cell->GetBackgroundColour()) ); - return; - } - - data_s.WriteString( cell->GetTextValue() ); - data_s.Write16( cell->GetAlignment() ); -} - -void WXSERIAL(wxGridCell)::LoadObject(wxObjectInputStream& s) -{ - wxGridCell *cell = (wxGridCell *)Object(); - wxDataInputStream data_s(s); - - cell->SetTextValue( data_s.ReadString() ); - cell->SetAlignment( data_s.Read16() ); - cell->SetFont( (wxFont *)s.GetChild() ); - cell->SetBackgroundBrush( (wxBrush *)s.GetChild() ); - cell->SetCellBitmap( (wxBitmap *)s.GetChild() ); - cell->SetTextColour( *((wxColour *)s.GetChild()) ); - cell->SetBackgroundColour( *((wxColour *)s.GetChild()) ); -} - -void WXSERIAL(wxGrid)::StoreObject(wxObjectOutputStream& s) -{ - wxDataOutputStream data_s(s); - wxGrid *grid = (wxGrid *)Object(); - int n_rows = grid->GetRows(), n_cols = grid->GetCols(); - int r, c; - - if (s.FirstStage()) { - for (r=0;rGetCell(r, c) ); - - s.AddChild( grid->GetDividerPen() ); - WXSERIAL(wxPanel)::StoreObject(s); - return; - } - - data_s.Write16( n_rows ); - data_s.Write16( n_cols ); - data_s.Write16( grid->GetCursorRow() ); - data_s.Write16( grid->GetCursorColumn() ); - - WXSERIAL(wxPanel)::StoreObject(s); -} - -void WXSERIAL(wxGrid)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxPanel)::LoadObject(s); -} diff --git a/utils/serialize/serext.h b/utils/serialize/serext.h deleted file mode 100644 index 540bb998b5..0000000000 --- a/utils/serialize/serext.h +++ /dev/null @@ -1,26 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: serext.cpp -// Purpose: Serialization: Other classes -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef __SEREXT_H__ -#define __SEREXT_H__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include -#include "serwnd.h" - -DECLARE_SERIAL_CLASS(wxSplitterWindow, wxWindow) -DECLARE_SERIAL_CLASS(wxGrid, wxPanel) -DECLARE_SERIAL_CLASS(wxGridCell, wxObject) - -#endif diff --git a/utils/serialize/sergdi.cpp b/utils/serialize/sergdi.cpp deleted file mode 100644 index 8ab44d782c..0000000000 --- a/utils/serialize/sergdi.cpp +++ /dev/null @@ -1,326 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: sergdi.cpp -// Purpose: Serialization: GDI classes -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "sergdi.h" -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "sergdi.h" - -IMPLEMENT_SERIAL_CLASS(wxBitmap, wxObject) -IMPLEMENT_SERIAL_CLASS(wxGDIObject, wxObject) -IMPLEMENT_SERIAL_CLASS(wxRegion, wxGDIObject) -IMPLEMENT_SERIAL_CLASS(wxColour, wxGDIObject) -IMPLEMENT_SERIAL_CLASS(wxFont, wxGDIObject) -IMPLEMENT_SERIAL_CLASS(wxPen, wxGDIObject) -IMPLEMENT_SERIAL_CLASS(wxBrush, wxGDIObject) -IMPLEMENT_SERIAL_CLASS(wxImageList, wxObject) - -IMPLEMENT_ALIAS_SERIAL_CLASS(wxPenList, wxList) -IMPLEMENT_ALIAS_SERIAL_CLASS(wxBrushList, wxList) -IMPLEMENT_ALIAS_SERIAL_CLASS(wxFontList, wxList) -IMPLEMENT_ALIAS_SERIAL_CLASS(wxColourDatabase, wxList) -IMPLEMENT_ALIAS_SERIAL_CLASS(wxBitmapList, wxList) - -// ---------------------------------------------------------------------------- - -void WXSERIAL(wxBitmap)::StoreObject(wxObjectOutputStream& s) -{ - // TODO - // I implemented a basic image saving (maybe I'll need to improve wxWin API). - - int x, y, w, h; - wxDataOutputStream data_s(s); - wxBitmap *bitmap = (wxBitmap *)Object(); - wxColour col; - wxMemoryDC dc; - - w = bitmap->GetWidth(); - h = bitmap->GetHeight(); - - if (s.FirstStage()) { - s.AddChild(bitmap->GetMask()); - } - - dc.SelectObject(*bitmap); - - data_s.Write16(w); - data_s.Write16(h); - for (y=0;yResize(w, h); - dc.SelectObject(*bitmap); - - for (y=0;yGetVisible(); - - wxDataOutputStream data_s(s); - data_s.Write8(visible); -} - -void WXSERIAL(wxGDIObject)::LoadObject(wxObjectInputStream& s) -{ - wxDataInputStream data_s(s); - - ((wxGDIObject *)Object())->SetVisible( data_s.Read8() ); -} - -// ---------------------------------------------------------------------------- - -void WXSERIAL(wxRegion)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxGDIObject)::StoreObject(s); - - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - wxRect rect = ((wxRegion *)Object())->GetBox(); - - data_s.Write16( rect.GetX() ); - data_s.Write16( rect.GetY() ); - data_s.Write16( rect.GetWidth() ); - data_s.Write16( rect.GetHeight() ); -} - -void WXSERIAL(wxRegion)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxGDIObject)::LoadObject(s); - - wxDataInputStream data_s(s); - wxRegion *region = (wxRegion *)Object(); - wxRect rect; - - rect.SetX( data_s.Read16() ); - rect.SetY( data_s.Read16() ); - rect.SetWidth( data_s.Read16() ); - rect.SetHeight( data_s.Read16() ); - - *region = wxRegion(rect); -} - -// ---------------------------------------------------------------------------- - -void WXSERIAL(wxColour)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxGDIObject)::StoreObject(s); - - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - wxColour *colour = (wxColour *)Object(); - - data_s.Write8(colour->Red()); - data_s.Write8(colour->Green()); - data_s.Write8(colour->Blue()); -} - -void WXSERIAL(wxColour)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxGDIObject)::LoadObject(s); - - wxDataInputStream data_s(s); - wxColour *colour = (wxColour *)Object(); - int r, g, b; - - r = data_s.Read8(); - g = data_s.Read8(); - b = data_s.Read8(); - - colour->Set(r, g, b); -} - -// ---------------------------------------------------------------------------- - -void WXSERIAL(wxPen)::StoreObject(wxObjectOutputStream& s) -{ - wxPen *pen = (wxPen *)Object(); - WXSERIAL(wxGDIObject)::StoreObject(s); - - if (s.FirstStage()) { - s.AddChild(& (pen->GetColour()) ); - return; - } - - wxDataOutputStream data_s(s); - - data_s.Write8( pen->GetCap() ); - data_s.Write8( pen->GetJoin() ); - data_s.Write8( pen->GetStyle() ); - data_s.Write8( pen->GetWidth() ); -} - -void WXSERIAL(wxPen)::LoadObject(wxObjectInputStream& s) -{ - wxPen *pen = (wxPen *)Object(); - wxColour *col = (wxColour *) s.GetChild(); - - WXSERIAL(wxGDIObject)::LoadObject(s); - - wxDataInputStream data_s(s); - - pen->SetColour(*col); - pen->SetCap( data_s.Read8() ); - pen->SetJoin( data_s.Read8() ); - pen->SetStyle( data_s.Read8() ); - pen->SetWidth( data_s.Read8() ); -} - -// ---------------------------------------------------------------------------- -void WXSERIAL(wxBrush)::StoreObject(wxObjectOutputStream& s) -{ - wxBrush *brush = (wxBrush *)Object(); - WXSERIAL(wxGDIObject)::StoreObject(s); - - if (s.FirstStage()) { - s.AddChild( &(brush->GetColour()) ); - s.AddChild( brush->GetStipple() ); - return; - } - - wxDataOutputStream data_s(s); - data_s.Write8( brush->GetStyle() ); -} - -void WXSERIAL(wxBrush)::LoadObject(wxObjectInputStream& s) -{ - wxBrush *brush = (wxBrush *)Object(); - wxColour *col = (wxColour *)s.GetChild(); - wxBitmap *bmap = (wxBitmap *)s.GetChild(); - - WXSERIAL(wxGDIObject)::LoadObject(s); - - wxDataInputStream data_s(s); - if (bmap) - *brush = wxBrush(*col, data_s.Read8()); - else - *brush = wxBrush(bmap); -} - -// ---------------------------------------------------------------------------- -void WXSERIAL(wxFont)::StoreObject(wxObjectOutputStream& s) -{ - wxFont *font = (wxFont *)Object(); - - WXSERIAL(wxGDIObject)::StoreObject(s); - - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - - data_s.Write8( font->GetPointSize() ); - data_s.WriteString( font->GetFaceName() ); - data_s.Write8( font->GetFamily() ); - data_s.Write8( font->GetStyle() ); - data_s.Write8( font->GetWeight() ); - data_s.Write8( font->GetUnderlined() ); -} - -void WXSERIAL(wxFont)::LoadObject(wxObjectInputStream& s) -{ - wxFont *font = (wxFont *)Object(); - - WXSERIAL(wxGDIObject)::LoadObject(s); - - wxDataInputStream data_s(s); - int psize, family, style, weight; - bool underlined; - wxString face_name; - - psize = data_s.Read8(); - face_name = data_s.ReadString(); - family = data_s.Read8(); - style = data_s.Read8(); - weight = data_s.Read8(); - underlined = data_s.Read8(); - - *font = wxFont(psize, face_name, family, style, weight, underlined); -} - -// ---------------------------------------------------------------------------- - -void WXSERIAL(wxImageList)::StoreObject(wxObjectOutputStream& s) -{ - wxImageList *list = (wxImageList *)Object(); - int i; - - if (s.FirstStage()) { - for (i=0;iGetImageCount();i++) - s.AddChild(list->GetBitmap(i)); - } - - wxDataOutputStream data_s(s); - - data_s.Write32(list->GetImageCount()); -} - -void WXSERIAL(wxImageList)::LoadObject(wxObjectInputStream& s) -{ - int i, count; - wxImageList *list = (wxImageList *)Object(); - wxDataInputStream data_s(s); - - count = data_s.Read32(); - for (i=0;iAdd(*((wxBitmap *)s.GetChild())); -} diff --git a/utils/serialize/sergdi.h b/utils/serialize/sergdi.h deleted file mode 100644 index 941586e077..0000000000 --- a/utils/serialize/sergdi.h +++ /dev/null @@ -1,37 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: sergdi.h -// Purpose: Serialization: GDI classes -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef __SERGDI_H__ -#define __SERGDI_H__ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include -#include "sercore.h" - -DECLARE_SERIAL_CLASS(wxBitmap, wxObject) -DECLARE_SERIAL_CLASS(wxGDIObject, wxObject) -DECLARE_SERIAL_CLASS(wxRegion, wxGDIObject) -DECLARE_SERIAL_CLASS(wxColour, wxGDIObject) -DECLARE_SERIAL_CLASS(wxFont, wxGDIObject) -DECLARE_SERIAL_CLASS(wxPen, wxGDIObject) -DECLARE_SERIAL_CLASS(wxBrush, wxGDIObject) -DECLARE_SERIAL_CLASS(wxImageList, wxObject) - -DECLARE_ALIAS_SERIAL_CLASS(wxPenList, wxList) -DECLARE_ALIAS_SERIAL_CLASS(wxBrushList, wxList) -DECLARE_ALIAS_SERIAL_CLASS(wxFontList, wxList) -DECLARE_ALIAS_SERIAL_CLASS(wxColourDatabase, wxList) -DECLARE_ALIAS_SERIAL_CLASS(wxBitmapList, wxList) - -#endif diff --git a/utils/serialize/sermain.cpp b/utils/serialize/sermain.cpp deleted file mode 100644 index 2983a8c495..0000000000 --- a/utils/serialize/sermain.cpp +++ /dev/null @@ -1,27 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: sermain.cpp -// Purpose: Serialization: main -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "serbase.h" -#endif - -#include -#include - -#include "sercore.h" -#include "serwnd.h" -#include "sergdi.h" -#include "serctrl.h" -#include "serext.h" - -IMPLEMENT_DYNAMIC_CLASS(wxObject_Serialize, wxObject) - -WXDLL_ENTRY_FUNCTION() diff --git a/utils/serialize/serwnd.cpp b/utils/serialize/serwnd.cpp deleted file mode 100644 index a52ef3f893..0000000000 --- a/utils/serialize/serwnd.cpp +++ /dev/null @@ -1,464 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: serwnd.cpp -// Purpose: Serialization: wxWindow classes -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "serwnd.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "wx/log.h" -#include "serwnd.h" - - -IMPLEMENT_SERIAL_CLASS(wxWindow, wxObject) -IMPLEMENT_SERIAL_CLASS(wxIndividualLayoutConstraint, wxObject) -IMPLEMENT_SERIAL_CLASS(wxLayoutConstraints, wxObject) -IMPLEMENT_ALIAS_SERIAL_CLASS(wxValidator, wxObject) -IMPLEMENT_SERIAL_CLASS(wxFrame, wxWindow) -IMPLEMENT_SERIAL_CLASS(wxPanel, wxWindow) -IMPLEMENT_SERIAL_CLASS(wxDialog, wxWindow) -IMPLEMENT_SERIAL_CLASS(wxMenuBar, wxWindow) -IMPLEMENT_SERIAL_CLASS(wxMenuItem, wxObject) -IMPLEMENT_SERIAL_CLASS(wxMenu, wxObject) - -IMPLEMENT_SERIAL_CLASS(wxMDIParentFrame, wxFrame) -IMPLEMENT_SERIAL_CLASS(wxMDIChildFrame, wxFrame) -IMPLEMENT_SERIAL_CLASS(wxMDIClientWindow, wxWindow) - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxWindow)::StoreObject(wxObjectOutputStream& s) -{ - wxWindow *win_object = (wxWindow *)Object(); - - if (s.FirstStage()) { - wxNode *node = win_object->GetChildren()->First(); - - s.AddChild(win_object->GetConstraints()); - s.AddChild(win_object->GetValidator()); - - // BAD HACK, but I don't have access to the internal variable of wxWindow. - m_bg_colour = win_object->GetDefaultBackgroundColour(); - m_fg_colour = win_object->GetDefaultForegroundColour(); - s.AddChild(&m_bg_colour); - s.AddChild(&m_fg_colour); - s.AddChild(win_object->GetFont()); - while (node) { - s.AddChild(node->Data()); - node = node->Next(); - } - return; - } - - wxDataOutputStream data(s); - int x,y,w,h; - - data.WriteString( win_object->GetName() ); - data.WriteString( win_object->GetLabel() ); - data.WriteString( win_object->GetTitle() ); - - data.Write8( win_object->GetAutoLayout() ); - data.Write8( win_object->IsShown() ); - data.Write32( win_object->GetWindowStyleFlag() ); - data.Write32( win_object->GetId() ); - wxLogDebug( "Number = %d", win_object->GetChildren()->Number() ); - data.Write8( win_object->GetChildren()->Number() ); - - win_object->GetSize(&w, &h); - win_object->GetPosition(&x, &y); - data.Write16(x); - data.Write16(y); - data.Write16(w); - data.Write16(h); -} - -void WXSERIAL(wxWindow)::LoadObject(wxObjectInputStream& s) -{ - wxDataInputStream data_s(s); - wxWindow *win_object = (wxWindow *)Object(); - wxColour *colour; - wxFont *font; - int number; - - m_parent = (wxWindow *)s.GetParent(); - - m_name = data_s.ReadString(); - m_label = data_s.ReadString(); - m_title = data_s.ReadString(); - - m_auto_layout = data_s.Read8(); - m_shown = data_s.Read8(); - m_style = data_s.Read32(); - m_id = data_s.Read32(); - number = data_s.Read8(); - - m_x = data_s.Read16(); - m_y = data_s.Read16(); - m_w = data_s.Read16(); - m_h = data_s.Read16(); - - /* I assume we will never create raw wxWindow object */ - (void)s.GetChild(); // We pass wxLayoutConstraints. - - m_validator = (wxValidator *)s.GetChild(); - if (!m_validator) - m_validator = (wxValidator *)&wxDefaultValidator; - - colour = (wxColour *)s.GetChild(); - if (colour) - win_object->SetDefaultBackgroundColour(*colour); - colour = (wxColour *)s.GetChild(); - if (colour) - win_object->SetDefaultForegroundColour(*colour); - font = (wxFont *)s.GetChild(); - if (font) - win_object->SetFont(*font); - - s.RemoveChildren(number); - - return; -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxIndividualLayoutConstraint)::StoreObject - (wxObjectOutputStream& s) -{ - wxIndividualLayoutConstraint *lay_object = - (wxIndividualLayoutConstraint *)Object(); - if (s.FirstStage()) - return; - - wxDataOutputStream data_s(s); - - data_s.WriteString(s.GetObjectName(lay_object->GetOtherWindow())); - data_s.Write8(lay_object->GetMyEdge()); - data_s.Write8(lay_object->GetRelationship()); - data_s.Write16(lay_object->GetMargin()); - data_s.Write16(lay_object->GetValue()); - data_s.Write8(lay_object->GetPercent()); - data_s.Write8(lay_object->GetOtherEdge()); -} - -void WXSERIAL(wxIndividualLayoutConstraint):: - LoadObject(wxObjectInputStream& s) -{ - wxIndividualLayoutConstraint *lay_object = - (wxIndividualLayoutConstraint *)Object(); - wxDataInputStream data_s(s); - wxString win_name; - - win_name = data_s.ReadString(); - lay_object->otherWin = (wxWindow *)s.SolveName(win_name); - lay_object->myEdge = (wxEdge)data_s.Read8(); - lay_object->relationship = (wxRelationship)data_s.Read8(); - lay_object->margin = data_s.Read16(); - lay_object->value = data_s.Read16(); - lay_object->percent = data_s.Read8(); - lay_object->otherEdge = (wxEdge)data_s.Read8(); -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxLayoutConstraints)::StoreObject(wxObjectOutputStream& s) -{ - wxLayoutConstraints *lay_object = (wxLayoutConstraints *)Object(); - WXSERIAL(wxIndividualLayoutConstraint) c; - -#define STORE(obj) c.SetObject(&(lay_object->obj)); c.StoreObject(s); - - // I simplify the process for this object - STORE(left); - STORE(right); - STORE(bottom); - STORE(top); - - STORE(width); - STORE(height); - - STORE(centreX); - STORE(centreY); - -#undef STORE -} - -void WXSERIAL(wxLayoutConstraints)::LoadObject(wxObjectInputStream& s) -{ - wxLayoutConstraints *lay_object = (wxLayoutConstraints *)Object(); - WXSERIAL(wxIndividualLayoutConstraint) c; - -#define LOAD(obj) c.SetObject(&(lay_object->obj)); c.LoadObject(s); - - // I simplify the process for this object - LOAD(left); - LOAD(right); - LOAD(bottom); - LOAD(top); - - LOAD(width); - LOAD(height); - - LOAD(centreX); - LOAD(centreY); - -#undef LOAD - - // Initialize constraints - ((wxWindow *)s.GetParent())->SetConstraints(lay_object); -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxFrame)::StoreObject(wxObjectOutputStream& s) -{ - wxFrame *frame = (wxFrame *)Object(); - - if (s.FirstStage()) { - s.AddChild(frame->GetMenuBar()); - WXSERIAL(wxWindow)::StoreObject(s); - return; - } - - WXSERIAL(wxWindow)::StoreObject(s); - - wxDataOutputStream data_s(s); - wxStatusBar *statbar = frame->GetStatusBar(); - - // AAARGH !! I absolutely need to be able to modify internal fields of - // wxFrame (wxToolBar and wxStatusBar) - - if (statbar) - data_s.Write8(statbar->GetFieldsCount()); - else - data_s.Write8(0); - // HOW CAN I ACCESS TO THIS FIELD ? - // for (...) { data_s.Write8(statbar->m_statusWidths[i]); } -} - -void WXSERIAL(wxFrame)::LoadObject(wxObjectInputStream& s) -{ - wxFrame *frame = (wxFrame *)Object(); - wxMenuBar *mbar = (wxMenuBar *)s.GetChild(); - - WXSERIAL(wxWindow)::LoadObject(s); - - wxDataInputStream data_s(s); - - frame->SetMenuBar(mbar); - if (frame->GetClassInfo() == CLASSINFO(wxFrame)) - frame->Create(m_parent, m_id, m_title, wxPoint(m_x, m_y), - wxSize(m_w, m_h), m_style, m_name); - - frame->CreateStatusBar(data_s.Read8()); -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxMenuBar)::StoreObject(wxObjectOutputStream& s) -{ - wxMenuBar *mbar = (wxMenuBar *)Object(); - int i, mcount = mbar->GetMenuCount(); - - if (s.FirstStage()) { - for (i=0;iGetMenu(i) ); - WXSERIAL(wxWindow)::StoreObject(s); - return; - } - - wxDataOutputStream data_s(s); - data_s.Write8( mcount ); - - // It isn't necessary for this object. - // WXSERIAL(wxWindow)::StoreObject(s); -} - -void WXSERIAL(wxMenuBar)::LoadObject(wxObjectInputStream& s) -{ - wxMenuBar *mbar = (wxMenuBar *)Object(); - int i, mcount; - wxDataInputStream data_s(s); - - mcount = data_s.Read8(); - for (i=0;iAppend( menu, menu->GetTitle() ); - } - - // It isn't necessary for this object. - // WXSERIAL(wxWindow)::LoadObject(s); -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxMenu)::StoreObject(wxObjectOutputStream& s) -{ - wxMenu *menu = (wxMenu *)Object(); - - if (s.FirstStage()) { - s.AddChild( &menu->GetItems() ); - return; - } - - wxDataOutputStream data_s(s); - data_s.WriteString( menu->GetTitle() ); -} - -void WXSERIAL(wxMenu)::LoadObject(wxObjectInputStream& s) -{ - wxMenu *menu = (wxMenu *)Object(); - wxList *items = (wxList *)s.GetChild(); - wxNode *node = items->First(); - - wxDataInputStream data_s(s); - - menu->SetTitle( data_s.ReadString() ); - - while (node) { -// NOT IMPLEMENTED in wxGTK -// menu->Append( (wxMenuItem *)node->Data() ); - node = node->Next(); - } -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxMenuItem)::StoreObject(wxObjectOutputStream& s) -{ - wxMenuItem *item = (wxMenuItem *)Object(); - - if (s.FirstStage()) { - s.AddChild(item->GetSubMenu()); - return; - } - - wxDataOutputStream data_s(s); - - data_s.Write8( item->GetId() ); - data_s.WriteString( item->GetText() ); - data_s.Write8( item->IsCheckable() ); - data_s.Write8( item->IsEnabled() ); - data_s.Write8( item->IsChecked() ); -} - -void WXSERIAL(wxMenuItem)::LoadObject(wxObjectInputStream& s) -{ - wxMenuItem *item = (wxMenuItem *)Object(); - wxDataInputStream data_s(s); - - item->SetId( data_s.Read8() ); - item->SetText( data_s.ReadString() ); - item->SetCheckable( data_s.Read8() ); - item->Enable( data_s.Read8() ); - item->Check( data_s.Read8() ); - item->SetSubMenu( (wxMenu *)s.GetChild() ); -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxPanel)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxWindow)::StoreObject(s); -} - -void WXSERIAL(wxPanel)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxWindow)::LoadObject(s); - - ((wxPanel *)Object())->Create(m_parent, m_id, wxPoint(m_x, m_y), - wxSize(m_w, m_h), m_style, m_name); -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxDialog)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxWindow)::StoreObject(s); -} - -void WXSERIAL(wxDialog)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxWindow)::LoadObject(s); - - ((wxDialog *)Object())->Create(m_parent, m_id, m_title, wxPoint(m_x, m_y), - wxSize(m_w, m_h), m_style, m_name); -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxMDIParentFrame)::StoreObject(wxObjectOutputStream& s) -{ - wxMDIParentFrame *frame = (wxMDIParentFrame *)Object(); - - if (s.FirstStage()) { - s.AddChild(frame->GetClientWindow()); - WXSERIAL(wxMDIParentFrame)::StoreObject(s); - return; - } - - WXSERIAL(wxMDIParentFrame)::StoreObject(s); -} - -void WXSERIAL(wxMDIParentFrame)::LoadObject(wxObjectInputStream& s) -{ - wxMDIParentFrame *frame = (wxMDIParentFrame *)Object(); - wxMDIClientWindow *client; - - client = (wxMDIClientWindow *) s.GetChild(); - - frame->Create(m_parent, m_id, m_title, wxPoint(m_x, m_y), - wxSize(m_w, m_h), m_style, m_name); - - WXSERIAL(wxFrame)::LoadObject(s); -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxMDIChildFrame)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxFrame)::StoreObject(s); -} - -void WXSERIAL(wxMDIChildFrame)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxFrame)::LoadObject(s); - - ((wxMDIChildFrame *)Object())->Create((wxMDIParentFrame *)m_parent, - m_id, m_title, - wxPoint(m_x, m_y), wxSize(m_w, m_h), - m_style, m_name); -} - -///////////////////////////////////////////////////////////////////////////// - -void WXSERIAL(wxMDIClientWindow)::StoreObject(wxObjectOutputStream& s) -{ - WXSERIAL(wxWindow)::StoreObject(s); -} - -void WXSERIAL(wxMDIClientWindow)::LoadObject(wxObjectInputStream& s) -{ - WXSERIAL(wxWindow)::LoadObject(s); - - ((wxMDIClientWindow *)Object())->CreateClient((wxMDIParentFrame *)m_parent, m_style); -} diff --git a/utils/serialize/serwnd.h b/utils/serialize/serwnd.h deleted file mode 100644 index 14c3423ff9..0000000000 --- a/utils/serialize/serwnd.h +++ /dev/null @@ -1,56 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: serwnd.h -// Purpose: Serialization: wxWindow classes -// Author: Guilhem Lavaux -// Modified by: -// Created: July 1998 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Guilhem Lavaux -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _SERIALIZE_SERWND_H_ -#define _SERIALIZE_SERWND_H_ - -#ifdef __GNUG__ -#pragma interface -#endif - -#include -#include - -class WXSERIAL(wxWindow) : public WXSERIAL(wxObject) -{ - DECLARE_DYNAMIC_CLASS( wxWindow_Serialize ) - public: - WXSERIAL(wxWindow)() { } - virtual ~WXSERIAL(wxWindow)() { }; - - void StoreObject(wxObjectOutputStream& s); - void LoadObject(wxObjectInputStream& s); - - public: - int m_x, m_y, m_w, m_h; - bool m_shown, m_auto_layout; - wxWindowID m_id; - wxString m_name, m_title, m_label; - wxWindow *m_parent; - wxValidator *m_validator; - wxColour m_bg_colour, m_fg_colour; - long m_style; -}; - -DECLARE_SERIAL_CLASS(wxIndividualLayoutConstraint, wxObject) -DECLARE_SERIAL_CLASS(wxLayoutConstraints, wxObject) -DECLARE_ALIAS_SERIAL_CLASS(wxValidator, wxObject) -DECLARE_SERIAL_CLASS(wxFrame, wxWindow) -DECLARE_SERIAL_CLASS(wxPanel, wxWindow) -DECLARE_SERIAL_CLASS(wxDialog, wxWindow) -DECLARE_SERIAL_CLASS(wxMenuBar, wxWindow) -DECLARE_SERIAL_CLASS(wxMenuItem, wxObject) -DECLARE_SERIAL_CLASS(wxMenu, wxObject) -DECLARE_SERIAL_CLASS(wxMDIParentFrame, wxFrame) -DECLARE_SERIAL_CLASS(wxMDIChildFrame, wxFrame) -DECLARE_SERIAL_CLASS(wxMDIClientWindow, wxFrame) - -#endif diff --git a/utils/wxPython/README.txt b/utils/wxPython/README.txt deleted file mode 100644 index 15bca74ca8..0000000000 --- a/utils/wxPython/README.txt +++ /dev/null @@ -1,133 +0,0 @@ -wxPython README ---------------- - -Introduction ------------- -The code in this subtree is a Python Extension Module that enables the -use of wxWindows from the Python language. So what is Python? Go to -http://www.python.org to learn more but in a nutshell, it's an -extremly cool object oriented language. It's easier than Perl and -nearly as powerful. It runs on more platforms than Java, and by some -reports, is even faster than Java with a JIT compiler! - -So why would you wan to use wxPython over just C++ and wxWindows? -Personally I prefer using Python for everything. I only use C++ when -I absolutly have to eek more performance out of an algorithm, and even -then I ususally code it as an extension module and leave the majority -of the program in Python. Another good thing to use wxPython for is -quick prototyping of your wxWindows apps. With C++ you have to -continuously go though the edit-compile-link-run cycle, which can be -quite time comsuming. With Python it is only an edit-run cycle. You -can easily build an application in a few hours with Python that would -normally take a few days with C++. Converting a wxPython app to a -C++/wxWindows app should be a straight forward task. - -This extension module attempts to mirror the class heiarchy of -wxWindows as closely as possble. This means that there is a wxFrame -class in wxPython that looks, smells, tastes and acts almost the same -as the wxFrame class in the C++ version. Unfortunatly, I wasn't able -to match things exactly because of differences in the languages, but -the differences should be easy to absorb because they are natural to -Python. For example, some methods that return mutliple values via -argument pointers in C++ will return a tuple of values in Python. -These differences have not been documented yet so if something isn't -working the same as described in the wxWindows documents the best -thing to do is to scan through the wxPython sources. - -Currently this extension module is designed such that the entire -application will be written in Python. I havn't tried it yet, but I -am sure that attempting to embed wxPython in a C++ wxWindows -application will cause problems. However there is a plan to support -this in the future. - - - -Build Instructions ------------------- -I used SWIG (http://www.swig.org) to create the source code for the -extension module. This enabled me to only have to deal with a small -amount of code and only have to bother with the exceptional issues. -SWIG takes care of the rest and generates all the repetative code for -me. You don't need SWIG to build the extension module as all the -generated C++ code is included in the src directory. - -wxPython is organized as a Python package. This means that the -directory containing the results of the build process should be a -subdirectory of a directory on the PYTHONPATH. (And preferably should -be named wxPython.) You can control where the bulid process will dump -wxPython by setting the TARGETDIR makefile variable. The default is -$(WXWIN)/utils/wxPython, where this README.txt is located. If you -leave it here then you should add $(WXWIN)/utils to your PYTHONPATH. -However, you may prefer to use something that is already on your -PYTHONPATH, such as the site-packages directory on Unix systems. - - -Win32 ------ - -1. Build wxWindows with USE_RESOURCE_LOADING_IN_MSW set to 1 in -include/wx/msw/setup.h so icons can be loaded dynamically. - -2. Change into the $(WXWIN)/utils/wxPython/src directory. - -3. Edit makefile.nt and specify where your python installation is at. -You may also want to fiddle with the TARGETDIR variable as described -above. - -4. Run nmake -f makefile.nt - -5. If it builds successfully, congratulations! Move on to the next -step. If not then you can try mailing me for help. Also, I will -always have a pre-built win32 version of this extension module at -http://starship.skyport.net/crew/robind/python. - -6. Change to the $(WXWIN)/utils/wxPython/tests directory. - -7. Try executing the test programs. Note that some of these print -diagnositc or test info to standard output, so they will require the -console version of python. For example: - - python test1.py - -To run them without requiring a console, you can use the pythonw.exe -version of Python either from the command line or from a shortcut. - - - -Unix ----- - -NOTE: I don't have wxPython working yet with wxGTK, so if you aren't -using Win32 you can skip the rest of this file and check back in a -week or so. - - -1. Change into the $(WXWIN)/utils/wxPython/src directory. - -2. Edit Setup.in and ensure that the flags, directories, and toolkit -options are correct. See the above commentary about TARGETDIR. - -3. Run this command to generate a makefile: - - make -f Makefile.pre.in boot - -4. Run these commands to build and then install the wxPython extension -module: - - make - make install - - -5. Change to the $(WXWIN)/utils/wxPython/tests directory. - -6. Try executing the test programs. For example: - - python test1.py - - - ------------------------- -8/8/1998 - -Robin Dunn -robin@alldunn.com diff --git a/utils/wxPython/TODO.txt b/utils/wxPython/TODO.txt deleted file mode 100644 index e0cd903642..0000000000 --- a/utils/wxPython/TODO.txt +++ /dev/null @@ -1,43 +0,0 @@ -wxPython TODO List ------------------- - -These are the major tasks to be done on wxPython: - -1. Get it working for wxGTK. - -2. Figure out how to do embedding of wxPython in a wxWindows C++ - application. - - Actually, now that I think about it it might actually work. We - just need to move some of the wxWindows initialization stuff out - of wxpcinit, ensure that __wxStart is not called and that a wxApp - is not created. So this task becomes: Create a test case for - embedding wxPython in a C++ app. Should also create some helper - functions for passing window objects into the Python code, etc. - - Test this with M. - - -3. Add significantly to the tests. - -4. Derived Python classes should have the ability to call the standard - On** methods in the base class. - -5. There are some virtual On** and other methods in wxWindows that - should end up being callbacks in derived python classes, but they - are not called via the standard event system. Is there any way to - hook into these and call Python methods (if they exist in the - derived class) without having to derive a specialized C++ class? - -6. Add the Doc/View related classes - -7. Add the Printing related classes - -8. Document the differences (method signatures, new methods to - compensate for no overloading, etc.) between wxPython and wxWindows. - -9. Create some larger-scale sample application with wxPython to show - it can be done and the simplicity that it will provide... Test - distribution with Freeze. - - diff --git a/utils/wxPython/src/Makefile.pre.in b/utils/wxPython/src/Makefile.pre.in deleted file mode 100644 index 03490bf91b..0000000000 --- a/utils/wxPython/src/Makefile.pre.in +++ /dev/null @@ -1,378 +0,0 @@ -# Universal Unix Makefile for Python extensions -# ============================================= - -# Short Instructions -# ------------------ - -# 1. Build and install Python (1.5 or newer). -# 2. "make -f Makefile.pre.in boot" -# 3. "make" -# You should now have a shared library. - -# Long Instructions -# ----------------- - -# Build *and install* the basic Python 1.5 distribution. See the -# Python README for instructions. (This version of Makefile.pre.in -# only withs with Python 1.5, alpha 3 or newer.) - -# Create a file Setup.in for your extension. This file follows the -# format of the Modules/Setup.in file; see the instructions there. -# For a simple module called "spam" on file "spammodule.c", it can -# contain a single line: -# spam spammodule.c -# You can build as many modules as you want in the same directory -- -# just have a separate line for each of them in the Setup.in file. - -# If you want to build your extension as a shared library, insert a -# line containing just the string -# *shared* -# at the top of your Setup.in file. - -# Note that the build process copies Setup.in to Setup, and then works -# with Setup. It doesn't overwrite Setup when Setup.in is changed, so -# while you're in the process of debugging your Setup.in file, you may -# want to edit Setup instead, and copy it back to Setup.in later. -# (All this is done so you can distribute your extension easily and -# someone else can select the modules they actually want to build by -# commenting out lines in the Setup file, without editing the -# original. Editing Setup is also used to specify nonstandard -# locations for include or library files.) - -# Copy this file (Misc/Makefile.pre.in) to the directory containing -# your extension. - -# Run "make -f Makefile.pre.in boot". This creates Makefile -# (producing Makefile.pre and sedscript as intermediate files) and -# config.c, incorporating the values for sys.prefix, sys.exec_prefix -# and sys.version from the installed Python binary. For this to work, -# the python binary must be on your path. If this fails, try -# make -f Makefile.pre.in Makefile VERSION=1.5 installdir= -# where is the prefix used to install Python for installdir -# (and possibly similar for exec_installdir=). - -# Note: "make boot" implies "make clobber" -- it assumes that when you -# bootstrap you may have changed platforms so it removes all previous -# output files. - -# If you are building your extension as a shared library (your -# Setup.in file starts with *shared*), run "make" or "make sharedmods" -# to build the shared library files. If you are building a statically -# linked Python binary (the only solution of your platform doesn't -# support shared libraries, and sometimes handy if you want to -# distribute or install the resulting Python binary), run "make -# python". - -# Note: Each time you edit Makefile.pre.in or Setup, you must run -# "make Makefile" before running "make". - -# Hint: if you want to use VPATH, you can start in an empty -# subdirectory and say (e.g.): -# make -f ../Makefile.pre.in boot srcdir=.. VPATH=.. - - -# === Bootstrap variables (edited through "make boot") === - -# The prefix used by "make inclinstall libainstall" of core python -installdir= /usr/local - -# The exec_prefix used by the same -exec_installdir=$(installdir) - -# Source directory and VPATH in case you want to use VPATH. -# (You will have to edit these two lines yourself -- there is no -# automatic support as the Makefile is not generated by -# config.status.) -srcdir= . -VPATH= . - -# === Variables that you may want to customize (rarely) === - -# (Static) build target -TARGET= python - -# Installed python binary (used only by boot target) -PYTHON= python - -# Add more -I and -D options here -CFLAGS= $(OPT) -I$(INCLUDEPY) -I$(EXECINCLUDEPY) $(DEFS) - -# These two variables can be set in Setup to merge extensions. -# See example[23]. -BASELIB= -BASESETUP= - -# === Variables set by makesetup === - -MODOBJS= _MODOBJS_ -MODLIBS= _MODLIBS_ - -# === Definitions added by makesetup === - -# === Variables from configure (through sedscript) === - -VERSION= @VERSION@ -CC= @CC@ -LINKCC= @LINKCC@ -SGI_ABI= @SGI_ABI@ -OPT= @OPT@ -LDFLAGS= @LDFLAGS@ -LDLAST= @LDLAST@ -DEFS= @DEFS@ -LIBS= @LIBS@ -LIBM= @LIBM@ -LIBC= @LIBC@ -RANLIB= @RANLIB@ -MACHDEP= @MACHDEP@ -SO= @SO@ -LDSHARED= @LDSHARED@ -CCSHARED= @CCSHARED@ -LINKFORSHARED= @LINKFORSHARED@ -#@SET_CCC@ - -# Install prefix for architecture-independent files -prefix= /usr/local - -# Install prefix for architecture-dependent files -exec_prefix= $(prefix) - -# === Fixed definitions === - -# Shell used by make (some versions default to the login shell, which is bad) -SHELL= /bin/sh - -# Expanded directories -BINDIR= $(exec_installdir)/bin -LIBDIR= $(exec_prefix)/lib -MANDIR= $(installdir)/man -INCLUDEDIR= $(installdir)/include -SCRIPTDIR= $(prefix)/lib - -# Detailed destination directories -BINLIBDEST= $(LIBDIR)/python$(VERSION) -LIBDEST= $(SCRIPTDIR)/python$(VERSION) -INCLUDEPY= $(INCLUDEDIR)/python$(VERSION) -EXECINCLUDEPY= $(exec_installdir)/include/python$(VERSION) -LIBP= $(exec_installdir)/lib/python$(VERSION) -DESTSHARED= $(BINLIBDEST)/site-packages - -LIBPL= $(LIBP)/config - -PYTHONLIBS= $(LIBPL)/libpython$(VERSION).a - -MAKESETUP= $(LIBPL)/makesetup -MAKEFILE= $(LIBPL)/Makefile -CONFIGC= $(LIBPL)/config.c -CONFIGCIN= $(LIBPL)/config.c.in -SETUP= $(LIBPL)/Setup - -SYSLIBS= $(LIBM) $(LIBC) - -ADDOBJS= $(LIBPL)/python.o config.o - -# Portable install script (configure doesn't always guess right) -INSTALL= $(LIBPL)/install-sh -c -# Shared libraries must be installed with executable mode on some systems; -# rather than figuring out exactly which, we always give them executable mode. -# Also, making them read-only seems to be a good idea... -INSTALL_SHARED= ${INSTALL} -m 555 - -#--------------------------------------------------- -# Possibly change some definintions for C++ -ifdef MY_LDSHARED -LDSHARED=$(MY_LDSHARED) -endif -ifdef MY_LINKCC -LINKCC=$(MY_LINKCC) -endif - - -# === Fixed rules === - -# Default target. This builds shared libraries only -default: sharedmods - -# Build everything -all: static sharedmods - -# Build shared libraries from our extension modules -sharedmods: $(SHAREDMODS) - -# Build a static Python binary containing our extension modules -static: $(TARGET) -$(TARGET): $(ADDOBJS) lib.a $(PYTHONLIBS) Makefile $(BASELIB) - $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) \ - $(ADDOBJS) lib.a $(PYTHONLIBS) \ - $(LINKPATH) $(BASELIB) $(MODLIBS) $(LIBS) $(SYSLIBS) \ - -o $(TARGET) $(LDLAST) - -#------------------------------------------------------------------------ -#------------------------------------------------------------------------ -# This is a default version of the install target for wxPython. It just -# redirects to wxInstall below... - -install: wxInstall - -#install: sharedmods -# if test ! -d $(DESTSHARED) ; then \ -# mkdir $(DESTSHARED) ; else true ; fi -# -for i in X $(SHAREDMODS); do \ -# if test $$i != X; \ -# then $(INSTALL_SHARED) $$i $(DESTSHARED)/$$i; \ -# fi; \ -# done - - -# Build the library containing our extension modules -lib.a: $(MODOBJS) - -rm -f lib.a - ar cr lib.a $(MODOBJS) - -$(RANLIB) lib.a - -# This runs makesetup *twice* to use the BASESETUP definition from Setup -config.c Makefile: Makefile.pre Setup $(BASESETUP) $(MAKESETUP) - $(MAKESETUP) \ - -m Makefile.pre -c $(CONFIGCIN) Setup -n $(BASESETUP) $(SETUP) - $(MAKE) -f Makefile do-it-again - -# Internal target to run makesetup for the second time -do-it-again: - $(MAKESETUP) \ - -m Makefile.pre -c $(CONFIGCIN) Setup -n $(BASESETUP) $(SETUP) - -# Make config.o from the config.c created by makesetup -config.o: config.c - $(CC) $(CFLAGS) -c config.c - -# Setup is copied from Setup.in *only* if it doesn't yet exist -Setup: - cp Setup.in Setup - -# Make the intermediate Makefile.pre from Makefile.pre.in -Makefile.pre: Makefile.pre.in sedscript - sed -f sedscript Makefile.pre.in >Makefile.pre - -# Shortcuts to make the sed arguments on one line -P=prefix -E=exec_prefix -H=Generated automatically from Makefile.pre.in by sedscript. -L=LINKFORSHARED - -# Make the sed script used to create Makefile.pre from Makefile.pre.in -sedscript: $(MAKEFILE) - sed -n \ - -e '1s/.*/1i\\/p' \ - -e '2s%.*%# $H%p' \ - -e '/^VERSION=/s/^VERSION=[ ]*\(.*\)/s%@VERSION[@]%\1%/p' \ - -e '/^CC=/s/^CC=[ ]*\(.*\)/s%@CC[@]%\1%/p' \ - -e '/^CCC=/s/^CCC=[ ]*\(.*\)/s%#@SET_CCC[@]%CCC=\1%/p' \ - -e '/^LINKCC=/s/^LINKCC=[ ]*\(.*\)/s%@LINKCC[@]%\1%/p' \ - -e '/^OPT=/s/^OPT=[ ]*\(.*\)/s%@OPT[@]%\1%/p' \ - -e '/^LDFLAGS=/s/^LDFLAGS=[ ]*\(.*\)/s%@LDFLAGS[@]%\1%/p' \ - -e '/^DEFS=/s/^DEFS=[ ]*\(.*\)/s%@DEFS[@]%\1%/p' \ - -e '/^LIBS=/s/^LIBS=[ ]*\(.*\)/s%@LIBS[@]%\1%/p' \ - -e '/^LIBM=/s/^LIBM=[ ]*\(.*\)/s%@LIBM[@]%\1%/p' \ - -e '/^LIBC=/s/^LIBC=[ ]*\(.*\)/s%@LIBC[@]%\1%/p' \ - -e '/^RANLIB=/s/^RANLIB=[ ]*\(.*\)/s%@RANLIB[@]%\1%/p' \ - -e '/^MACHDEP=/s/^MACHDEP=[ ]*\(.*\)/s%@MACHDEP[@]%\1%/p' \ - -e '/^SO=/s/^SO=[ ]*\(.*\)/s%@SO[@]%\1%/p' \ - -e '/^LDSHARED=/s/^LDSHARED=[ ]*\(.*\)/s%@LDSHARED[@]%\1%/p' \ - -e '/^CCSHARED=/s/^CCSHARED=[ ]*\(.*\)/s%@CCSHARED[@]%\1%/p' \ - -e '/^$L=/s/^$L=[ ]*\(.*\)/s%@$L[@]%\1%/p' \ - -e '/^$P=/s/^$P=\(.*\)/s%^$P=.*%$P=\1%/p' \ - -e '/^$E=/s/^$E=\(.*\)/s%^$E=.*%$E=\1%/p' \ - $(MAKEFILE) >sedscript - echo "/^#@SET_CCC@/d" >>sedscript - echo "/^installdir=/s%=.*%= $(installdir)%" >>sedscript - echo "/^exec_installdir=/s%=.*%=$(exec_installdir)%" >>sedscript - echo "/^srcdir=/s%=.*%= $(srcdir)%" >>sedscript - echo "/^VPATH=/s%=.*%= $(VPATH)%" >>sedscript - echo "/^LINKPATH=/s%=.*%= $(LINKPATH)%" >>sedscript - echo "/^BASELIB=/s%=.*%= $(BASELIB)%" >>sedscript - echo "/^BASESETUP=/s%=.*%= $(BASESETUP)%" >>sedscript - -# Bootstrap target -boot: clobber - VERSION=`$(PYTHON) -c "import sys; print sys.version[:3]"`; \ - installdir=`$(PYTHON) -c "import sys; print sys.prefix"`; \ - exec_installdir=`$(PYTHON) -c "import sys; print sys.exec_prefix"`; \ - $(MAKE) -f Makefile.pre.in VPATH=$(VPATH) srcdir=$(srcdir) \ - VERSION=$$VERSION \ - installdir=$$installdir \ - exec_installdir=$$exec_installdir \ - Makefile - -# Handy target to remove intermediate files and backups -clean: - -rm -f *.o *~ - -# Handy target to remove everything that is easily regenerated -clobber: clean - -rm -f *.a tags TAGS config.c Makefile.pre $(TARGET) sedscript - -rm -f *.so *.sl so_locations - - -# Handy target to remove everything you don't want to distribute -distclean: clobber - -rm -f Makefile Setup - - - - -#------------------------------------------------------------------------ -#------------------------------------------------------------------------ -# Custom rules and dependencies added for wxPython -# - - -SWIGFLAGS=-c++ -shadow -python -dnone -D__WXGTK__ - - -PYMODULES = $(GENCODEDIR)/wxp.py $(GENCODEDIR)/events.py \ - $(GENCODEDIR)/windows.py $(GENCODEDIR)/misc.py \ - $(GENCODEDIR)/gdi.py $(GENCODEDIR)/mdi.py \ - $(GENCODEDIR)/controls.py $(GENCODEDIR)/controls2.py \ - $(GENCODEDIR)/windows2.py $(GENCODEDIR)/cmndlgs.py \ - __init__.py - - -# Implicit rules to run SWIG -$(GENCODEDIR)/%.cpp : %.i - swig $(SWIGFLAGS) -c -o $@ $< - -$(GENCODEDIR)/%.py : %.i - swig $(SWIGFLAGS) -c -o $@ $< - - -# This one must leave out the -c flag so we define the whole rule -$(GENCODEDIR)/wxp.cpp $(GENCODEDIR)/wxp.py : wxp.i my_typemaps.i _defs.i _extras.py - swig $(SWIGFLAGS) -o $(GENCODEDIR)/wxp.cpp wxp.i - - -# define some dependencies -$(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py : windows.i my_typemaps.i _defs.i -$(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py : windows2.i my_typemaps.i _defs.i -$(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py : events.i my_typemaps.i _defs.i -$(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py : misc.i my_typemaps.i _defs.i -$(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py : gdi.i my_typemaps.i _defs.i -$(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py : mdi.i my_typemaps.i _defs.i -$(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py : controls.i my_typemaps.i _defs.i -$(GENCODEDIR)/controls2.cpp $(GENCODEDIR)/controls2.py : controls2.i my_typemaps.i _defs.i -$(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py : cmndlgs.i my_typemaps.i _defs.i - -$(GENCODEDIR)/helpers.cpp: - ln -s `pwd`/helpers.cpp $@ - - -wxInstall : sharedmods $(PYMODULES) - if test ! -d $(TARGETDIR) ; then \ - mkdir $(TARGETDIR) ; else true ; fi - -chmod 755 $(SHAREDMODS); \ - cp $(SHAREDMODS) $(TARGETDIR); - -for i in $(PYMODULES); do \ - cp $$i $(TARGETDIR); \ - done - python $(LIBDEST)/compileall.py -l $(TARGETDIR) - python -O $(LIBDEST)/compileall.py -l $(TARGETDIR) - - diff --git a/utils/wxPython/src/Setup.in b/utils/wxPython/src/Setup.in deleted file mode 100644 index d9c764c3d3..0000000000 --- a/utils/wxPython/src/Setup.in +++ /dev/null @@ -1,44 +0,0 @@ -# This file gives the details of what is needed to build this extension -# module so the Makefile can be created. - -### -### This file should be created by configure. Currently it is tweaked by hand. -### - -*shared* - -CCC=c++ -WXWIN=../../.. -GENCODEDIR=gtk -srcdir=$(GENCODEDIR) - -# Depending on how your Python was built, you may have to set this -# value to use the C++ driver to link with instead of the default -# C driver. For example: -#MY_LDSHARED=$(CCC) -shared - -# Same as above, but for statically linking Python and wxPython together, -# in other words, if you comment out the *shared* above. If this is the -# case then you should ensure that the main() function is Python's, not -# wxWindows'. You can rebuild $(WXWIN)/src/gtk/app.cpp with NOMAIN defined -# to force this... -MY_LINKCC=$(CCC) - - -## Pick one of these, or set your own. This is where the -## wxPython module should be installed. It should be a -## subdirectory named wxPython. -TARGETDIR=.. -#TARGETDIR=$(BINLIBDEST)/site-packages/wxPython - - -wxpc wxp.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \ - mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.cpp \ - # CFLAGS - -I. -I$(WXWIN)/include -I/usr/local/lib/glib/include -I$(WXWIN)/src \ - -I/usr/X/include -DSWIG_GLOBAL -D__WXGTK__ \ - -D__WXDEBUG__ \ - # LFLAGS - -L$(WXWIN)/lib/solaris2.6 -L/usr/X/lib \ - -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1 \ - -lwx_gtk -lgtk -lgdk -lglib -lXext -lX11 -lstdc++ -lgcc diff --git a/utils/wxPython/src/__init__.py b/utils/wxPython/src/__init__.py deleted file mode 100644 index fa1ed6ae52..0000000000 --- a/utils/wxPython/src/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#---------------------------------------------------------------------------- -# Name: __init__.py -# Purpose: The presence of this file turs this directory into a -# Python package. For simplicity, we import all of the -# wxPython package at this point, so users only need to -# import the package. -# -# Author: Robin Dunn -# -# Created: 8/8/98 -# RCS-ID: $Id$ -# Copyright: (c) 1998 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------------- - -from wxp import * - -#---------------------------------------------------------------------------- -# -# $Log$ -# Revision 1.1 1998/08/09 08:25:49 RD -# Initial version -# -# diff --git a/utils/wxPython/src/_defs.i b/utils/wxPython/src/_defs.i deleted file mode 100644 index 5218ae9a7d..0000000000 --- a/utils/wxPython/src/_defs.i +++ /dev/null @@ -1,714 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: _defs.i -// Purpose: Definitions and stuff -// -// Author: Robin Dunn -// -// Created: 6/24/97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 by Total Control Software -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - - - -//--------------------------------------------------------------------------- -// Forward declares... - -class wxPyApp; -class wxEvtHandler; -class wxWindow; -class wxFrame; -class wxMiniFrame; -class wxPanel; -class wxDialog; -class wxMenu; -class wxPyMenu; -class wxMenuBar; -class wxMenuItem; -class wxEvent; -class wxSizeEvent; -class wxCloseEvent; -class wxCommandEvent; -class wxScrollEvent; -class wxMouseEvent; -class wxKeyEvent; -class wxMoveEvent; -class wxPaintEvent; -class wxEraseEvent; -class wxFocusEvent; -class wxActivateEvent; -class wxInitDialogEvent; -class wxMenuEvent; -class wxShowEvent; -class wxIconizeEvent; -class wxMaximizeEvent; -class wxJoystickEvent; -class wxDropFilesEvent; -class wxIdleEvent; -class wxUpdateUIEvent; -class wxSysColourChangedEvent; -class wxSize; -class wxRealPoint; -class wxPoint; -class wxRect; -class wxBitmap; -class wxMask; -class wxIcon; -class wxCursor; -class wxFont; -class wxColour; -class wxPen; -class wxBrush; -class wxDC; -class wxMemoryDC; -class wxScreenDC; -class wxClientDC; -class wxPaintDC; -class wxPostScriptDC; -class wxPrinterDC; -class wxMetaFileDC; -class wxMDIParentFrame; -class wxMDIChildFrame; -class wxMDIClientWindow; -class wxControl; -class wxButton; -class wxBitmapButton; -class wxCheckBox; -class wxChoice; -class wxComboBox; -class wxGauge; -class wxStaticBox; -class wxStaticText; -class wxListBox; -class wxTextCtrl; -class wxScrollBar; -class wxSpinButton; -class wxStaticBitmap; -class wxRadioBox; -class wxRadioButton; -class wxSlider; - -class wxPyTimer; -class wxIndividualLayoutConstraint; -class wxLayoutConstraints; - -//--------------------------------------------------------------------------- - -// some definitions for SWIG only -typedef unsigned char byte; -typedef short int WXTYPE; -typedef int wxWindowID; -typedef unsigned int uint; -typedef signed int EBool; - - -//--------------------------------------------------------------------------- - -// General numeric #define's and etc. Making them all enums makes SWIG use the -// real macro when making the Python Int - -enum { - wxMAJOR_VERSION, - wxMINOR_VERSION, - wxRELEASE_NUMBER, - -#ifdef __WXMSW__ - UNKNOWN, -#endif - NOT_FOUND, - - wxVSCROLL, - wxHSCROLL, - wxCAPTION, - wxDOUBLE_BORDER, - wxSUNKEN_BORDER, - wxRAISED_BORDER, - wxBORDER, - wxSIMPLE_BORDER, - wxSTATIC_BORDER, - wxTRANSPARENT_WINDOW, - wxNO_BORDER, - wxUSER_COLOURS, - wxNO_3D, -//wxOVERRIDE_KEY_TRANSLATIONS, - wxTAB_TRAVERSAL, - wxHORIZONTAL, - wxVERTICAL, - wxBOTH, - wxCENTER_FRAME, - wxSTAY_ON_TOP, - wxICONIZE, - wxMINIMIZE, - wxMAXIMIZE, - wxTHICK_FRAME, - wxSYSTEM_MENU, - wxMINIMIZE_BOX, - wxMAXIMIZE_BOX, - wxTINY_CAPTION_HORIZ, - wxTINY_CAPTION_VERT, - wxRESIZE_BOX, - wxRESIZE_BORDER, - wxDIALOG_MODAL, - wxDIALOG_MODELESS, - wxDEFAULT_FRAME_STYLE, - wxDEFAULT_DIALOG_STYLE, - wxRETAINED, - wxBACKINGSTORE, - wxTB_3DBUTTONS, - wxTB_HORIZONTAL, - wxTB_VERTICAL, - wxCOLOURED, - wxFIXED_LENGTH, - wxALIGN_LEFT, - wxALIGN_CENTER, - wxALIGN_CENTRE, - wxALIGN_RIGHT, - wxLB_NEEDED_SB, - wxLB_ALWAYS_SB, - wxLB_SORT, - wxLB_SINGLE, - wxLB_MULTIPLE, - wxLB_EXTENDED, - wxLB_OWNERDRAW, - wxLB_HSCROLL, - wxPROCESS_ENTER, - wxPASSWORD, - wxTE_PROCESS_ENTER, - wxTE_PASSWORD, - wxTE_READONLY, - wxTE_MULTILINE, - wxCB_SIMPLE, - wxCB_DROPDOWN, - wxCB_SORT, - wxCB_READONLY, - wxRA_HORIZONTAL, - wxRA_VERTICAL, - wxRB_GROUP, - wxGA_PROGRESSBAR, - wxGA_HORIZONTAL, - wxGA_VERTICAL, - wxSL_HORIZONTAL, - wxSL_VERTICAL, - wxSL_AUTOTICKS, - wxSL_LABELS, - wxSL_LEFT, - wxSL_TOP, - wxSL_RIGHT, - wxSL_BOTTOM, - wxSL_BOTH, - wxSL_SELRANGE, - wxSB_HORIZONTAL, - wxSB_VERTICAL, - wxBU_AUTODRAW, - wxBU_NOAUTODRAW, - wxTR_HAS_BUTTONS, - wxTR_EDIT_LABELS, - wxLC_ICON, - wxLC_SMALL_ICON, - wxLC_LIST, - wxLC_REPORT, - wxLC_ALIGN_TOP, - wxLC_ALIGN_LEFT, - wxLC_AUTOARRANGE, - wxLC_USER_TEXT, - wxLC_EDIT_LABELS, - wxLC_NO_HEADER, - wxLC_NO_SORT_HEADER, - wxLC_SINGLE_SEL, - wxLC_SORT_ASCENDING, - wxLC_SORT_DESCENDING, - wxLC_MASK_TYPE, - wxLC_MASK_ALIGN, - wxLC_MASK_SORT, - wxSP_VERTICAL, - wxSP_HORIZONTAL, - wxSP_ARROW_KEYS, - wxSP_WRAP, - wxSP_NOBORDER, - wxSP_3D, - wxSP_BORDER, - wxTAB_MULTILINE, - wxTAB_RIGHTJUSTIFY, - wxTAB_FIXEDWIDTH, - wxTAB_OWNERDRAW, -// wxSB_SIZEGRIP, - wxFLOOD_SURFACE, - wxFLOOD_BORDER, - wxODDEVEN_RULE, - wxWINDING_RULE, - wxTOOL_TOP, - wxTOOL_BOTTOM, - wxTOOL_LEFT, - wxTOOL_RIGHT, - wxOK, - wxYES_NO, - wxCANCEL, - wxYES, - wxNO, - wxICON_EXCLAMATION, - wxICON_HAND, - wxICON_QUESTION, - wxICON_INFORMATION, - wxICON_STOP, - wxICON_ASTERISK, - wxICON_MASK, - wxCENTRE, - wxCENTER, - wxSIZE_AUTO_WIDTH, - wxSIZE_AUTO_HEIGHT, - wxSIZE_AUTO, - wxSIZE_USE_EXISTING, - wxSIZE_ALLOW_MINUS_ONE, - wxDF_TEXT, - wxDF_BITMAP, - wxDF_METAFILE, - wxDF_DIB, - wxDF_OEMTEXT, - wxDF_FILENAME, - wxPORTRAIT, - wxLANDSCAPE, - wxID_OPEN, - wxID_CLOSE, - wxID_NEW, - wxID_SAVE, - wxID_SAVEAS, - wxID_REVERT, - wxID_EXIT, - wxID_UNDO, - wxID_REDO, - wxID_HELP, - wxID_PRINT, - wxID_PRINT_SETUP, - wxID_PREVIEW, - wxID_ABOUT, - wxID_HELP_CONTENTS, - wxID_HELP_COMMANDS, - wxID_HELP_PROCEDURES, - wxID_HELP_CONTEXT, - wxID_CUT, - wxID_COPY, - wxID_PASTE, - wxID_CLEAR, - wxID_FIND, - wxID_FILE1, - wxID_FILE2, - wxID_FILE3, - wxID_FILE4, - wxID_FILE5, - wxID_FILE6, - wxID_FILE7, - wxID_FILE8, - wxID_FILE9, - wxID_OK, - wxID_CANCEL, - wxID_APPLY, - wxID_YES, - wxID_NO, - wxBITMAP_TYPE_BMP, - wxBITMAP_TYPE_BMP_RESOURCE, - wxBITMAP_TYPE_ICO, - wxBITMAP_TYPE_ICO_RESOURCE, - wxBITMAP_TYPE_CUR, - wxBITMAP_TYPE_CUR_RESOURCE, - wxBITMAP_TYPE_XBM, - wxBITMAP_TYPE_XBM_DATA, - wxBITMAP_TYPE_XPM, - wxBITMAP_TYPE_XPM_DATA, - wxBITMAP_TYPE_TIF, - wxBITMAP_TYPE_TIF_RESOURCE, - wxBITMAP_TYPE_GIF, - wxBITMAP_TYPE_GIF_RESOURCE, - wxBITMAP_TYPE_PNG, - wxBITMAP_TYPE_PNG_RESOURCE, - wxBITMAP_TYPE_ANY, - wxBITMAP_TYPE_RESOURCE, - - wxOPEN, - wxSAVE, - wxHIDE_READONLY, - wxOVERWRITE_PROMPT, - -#ifdef __WXMSW__ - wxACCEL_ALT, - wxACCEL_CTRL, - wxACCEL_SHIFT, -#endif - -}; - - -/// Standard error codes -enum ErrCode -{ - ERR_PARAM = (-4000), - ERR_NODATA, - ERR_CANCEL, - ERR_SUCCESS = 0 -}; - - -enum { - wxDEFAULT , - wxDECORATIVE, - wxROMAN, - wxSCRIPT, - wxSWISS, - wxMODERN, - wxTELETYPE, - wxVARIABLE, - wxFIXED, - wxNORMAL, - wxLIGHT, - wxBOLD, - wxITALIC, - wxSLANT, - wxSOLID, - wxDOT, - wxLONG_DASH, - wxSHORT_DASH, - wxDOT_DASH, - wxUSER_DASH, - wxTRANSPARENT, - wxSTIPPLE, - wxBDIAGONAL_HATCH, - wxCROSSDIAG_HATCH, - wxFDIAGONAL_HATCH, - wxCROSS_HATCH, - wxHORIZONTAL_HATCH, - wxVERTICAL_HATCH, - wxJOIN_BEVEL, - wxJOIN_MITER, - wxJOIN_ROUND, - wxCAP_ROUND, - wxCAP_PROJECTING, - wxCAP_BUTT -}; - -typedef enum { - wxCLEAR, // 0 - wxXOR, // src XOR dst - wxINVERT, // NOT dst - wxOR_REVERSE, // src OR (NOT dst) - wxAND_REVERSE,// src AND (NOT dst) - wxCOPY, // src - wxAND, // src AND dst - wxAND_INVERT, // (NOT src) AND dst - wxNO_OP, // dst - wxNOR, // (NOT src) AND (NOT dst) - wxEQUIV, // (NOT src) XOR dst - wxSRC_INVERT, // (NOT src) - wxOR_INVERT, // (NOT src) OR dst - wxNAND, // (NOT src) OR (NOT dst) - wxOR, // src OR dst - wxSET, // 1 - wxSRC_OR, // source _bitmap_ OR destination - wxSRC_AND // source _bitmap_ AND destination -} form_ops_t; - -enum _Virtual_keycodes { - WXK_BACK = 8, - WXK_TAB = 9, - WXK_RETURN = 13, - WXK_ESCAPE = 27, - WXK_SPACE = 32, - WXK_DELETE = 127, - - WXK_START = 300, - WXK_LBUTTON, - WXK_RBUTTON, - WXK_CANCEL, - WXK_MBUTTON, - WXK_CLEAR, - WXK_SHIFT, - WXK_CONTROL, - WXK_MENU, - WXK_PAUSE, - WXK_CAPITAL, - WXK_PRIOR, // Page up - WXK_NEXT, // Page down - WXK_END, - WXK_HOME, - WXK_LEFT, - WXK_UP, - WXK_RIGHT, - WXK_DOWN, - WXK_SELECT, - WXK_PRINT, - WXK_EXECUTE, - WXK_SNAPSHOT, - WXK_INSERT, - WXK_HELP, - WXK_NUMPAD0, - WXK_NUMPAD1, - WXK_NUMPAD2, - WXK_NUMPAD3, - WXK_NUMPAD4, - WXK_NUMPAD5, - WXK_NUMPAD6, - WXK_NUMPAD7, - WXK_NUMPAD8, - WXK_NUMPAD9, - WXK_MULTIPLY, - WXK_ADD, - WXK_SEPARATOR, - WXK_SUBTRACT, - WXK_DECIMAL, - WXK_DIVIDE, - WXK_F1, - WXK_F2, - WXK_F3, - WXK_F4, - WXK_F5, - WXK_F6, - WXK_F7, - WXK_F8, - WXK_F9, - WXK_F10, - WXK_F11, - WXK_F12, - WXK_F13, - WXK_F14, - WXK_F15, - WXK_F16, - WXK_F17, - WXK_F18, - WXK_F19, - WXK_F20, - WXK_F21, - WXK_F22, - WXK_F23, - WXK_F24, - WXK_NUMLOCK, - WXK_SCROLL, - WXK_PAGEUP, - WXK_PAGEDOWN -}; - -typedef enum { - wxCURSOR_ARROW = 1, - wxCURSOR_BULLSEYE, - wxCURSOR_CHAR, - wxCURSOR_CROSS, - wxCURSOR_HAND, - wxCURSOR_IBEAM, - wxCURSOR_LEFT_BUTTON, - wxCURSOR_MAGNIFIER, - wxCURSOR_MIDDLE_BUTTON, - wxCURSOR_NO_ENTRY, - wxCURSOR_PAINT_BRUSH, - wxCURSOR_PENCIL, - wxCURSOR_POINT_LEFT, - wxCURSOR_POINT_RIGHT, - wxCURSOR_QUESTION_ARROW, - wxCURSOR_RIGHT_BUTTON, - wxCURSOR_SIZENESW, - wxCURSOR_SIZENS, - wxCURSOR_SIZENWSE, - wxCURSOR_SIZEWE, - wxCURSOR_SIZING, - wxCURSOR_SPRAYCAN, - wxCURSOR_WAIT, - wxCURSOR_WATCH, - wxCURSOR_BLANK -//#ifdef __X__ -// /* Not yet implemented for Windows */ -// , wxCURSOR_CROSS_REVERSE, -// wxCURSOR_DOUBLE_ARROW, -// wxCURSOR_BASED_ARROW_UP, -// wxCURSOR_BASED_ARROW_DOWN -//#endif -} _standard_cursors_t; - - -#define FALSE 0 -#define false 0 -#define TRUE 1 -#define true 1 - - -//--------------------------------------------------------------------------- -//--------------------------------------------------------------------------- - -/* - * Event types - * - */ -enum wxEventType { - wxEVT_NULL = 0, - wxEVT_FIRST = 10000, - - // New names - wxEVT_COMMAND_BUTTON_CLICKED, - wxEVT_COMMAND_CHECKBOX_CLICKED, - wxEVT_COMMAND_CHOICE_SELECTED, - wxEVT_COMMAND_LISTBOX_SELECTED, - wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, - wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, - wxEVT_COMMAND_TEXT_UPDATED, - wxEVT_COMMAND_TEXT_ENTER, - wxEVT_COMMAND_MENU_SELECTED, - wxEVT_COMMAND_SLIDER_UPDATED, - wxEVT_COMMAND_RADIOBOX_SELECTED, - wxEVT_COMMAND_RADIOBUTTON_SELECTED, -// wxEVT_COMMAND_SCROLLBAR_UPDATED is now obsolete since we use wxEVT_SCROLL... events - wxEVT_COMMAND_SCROLLBAR_UPDATED, - wxEVT_COMMAND_VLBOX_SELECTED, - wxEVT_COMMAND_COMBOBOX_SELECTED, - wxEVT_COMMAND_TOOL_CLICKED, - wxEVT_COMMAND_TOOL_RCLICKED, - wxEVT_COMMAND_TOOL_ENTER, - wxEVT_SET_FOCUS, - wxEVT_KILL_FOCUS, - -/* Mouse event types */ - wxEVT_LEFT_DOWN, - wxEVT_LEFT_UP, - wxEVT_MIDDLE_DOWN, - wxEVT_MIDDLE_UP, - wxEVT_RIGHT_DOWN, - wxEVT_RIGHT_UP, - wxEVT_MOTION, - wxEVT_ENTER_WINDOW, - wxEVT_LEAVE_WINDOW, - wxEVT_LEFT_DCLICK, - wxEVT_MIDDLE_DCLICK, - wxEVT_RIGHT_DCLICK, - - // Non-client mouse events - wxEVT_NC_LEFT_DOWN = wxEVT_FIRST + 100, - wxEVT_NC_LEFT_UP, - wxEVT_NC_MIDDLE_DOWN, - wxEVT_NC_MIDDLE_UP, - wxEVT_NC_RIGHT_DOWN, - wxEVT_NC_RIGHT_UP, - wxEVT_NC_MOTION, - wxEVT_NC_ENTER_WINDOW, - wxEVT_NC_LEAVE_WINDOW, - wxEVT_NC_LEFT_DCLICK, - wxEVT_NC_MIDDLE_DCLICK, - wxEVT_NC_RIGHT_DCLICK, - -/* Character input event type */ - wxEVT_CHAR, - - /* - * Scrollbar event identifiers - */ - wxEVT_SCROLL_TOP, - wxEVT_SCROLL_BOTTOM, - wxEVT_SCROLL_LINEUP, - wxEVT_SCROLL_LINEDOWN, - wxEVT_SCROLL_PAGEUP, - wxEVT_SCROLL_PAGEDOWN, - wxEVT_SCROLL_THUMBTRACK, - - wxEVT_SIZE = wxEVT_FIRST + 200, - wxEVT_MOVE, - wxEVT_CLOSE_WINDOW, - wxEVT_END_SESSION, - wxEVT_QUERY_END_SESSION, - wxEVT_ACTIVATE_APP, - wxEVT_POWER, - wxEVT_CHAR_HOOK, - wxEVT_KEY_UP, - wxEVT_ACTIVATE, - wxEVT_CREATE, - wxEVT_DESTROY, - wxEVT_SHOW, - wxEVT_ICONIZE, - wxEVT_MAXIMIZE, - wxEVT_MOUSE_CAPTURE_CHANGED, - wxEVT_PAINT, - wxEVT_ERASE_BACKGROUND, - wxEVT_NC_PAINT, - wxEVT_PAINT_ICON, - wxEVT_MENU_CHAR, - wxEVT_MENU_INIT, - wxEVT_MENU_HIGHLIGHT, - wxEVT_POPUP_MENU_INIT, - wxEVT_CONTEXT_MENU, - wxEVT_SYS_COLOUR_CHANGED, - wxEVT_SETTING_CHANGED, - wxEVT_QUERY_NEW_PALETTE, - wxEVT_PALETTE_CHANGED, - wxEVT_JOY_BUTTON_DOWN, - wxEVT_JOY_BUTTON_UP, - wxEVT_JOY_MOVE, - wxEVT_JOY_ZMOVE, - wxEVT_DROP_FILES, - wxEVT_DRAW_ITEM, - wxEVT_MEASURE_ITEM, - wxEVT_COMPARE_ITEM, - wxEVT_INIT_DIALOG, - wxEVT_IDLE, - wxEVT_UPDATE_UI, - - /* Generic command events */ - // Note: a click is a higher-level event - // than button down/up - wxEVT_COMMAND_LEFT_CLICK, - wxEVT_COMMAND_LEFT_DCLICK, - wxEVT_COMMAND_RIGHT_CLICK, - wxEVT_COMMAND_RIGHT_DCLICK, - wxEVT_COMMAND_SET_FOCUS, - wxEVT_COMMAND_KILL_FOCUS, - wxEVT_COMMAND_ENTER, - - /* Tree control event types */ - wxEVT_COMMAND_TREE_BEGIN_DRAG, - wxEVT_COMMAND_TREE_BEGIN_RDRAG, - wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, - wxEVT_COMMAND_TREE_END_LABEL_EDIT, - wxEVT_COMMAND_TREE_DELETE_ITEM, - wxEVT_COMMAND_TREE_GET_INFO, - wxEVT_COMMAND_TREE_SET_INFO, - wxEVT_COMMAND_TREE_ITEM_EXPANDED, - wxEVT_COMMAND_TREE_ITEM_EXPANDING, - wxEVT_COMMAND_TREE_SEL_CHANGED, - wxEVT_COMMAND_TREE_SEL_CHANGING, - wxEVT_COMMAND_TREE_KEY_DOWN, - - /* List control event types */ - wxEVT_COMMAND_LIST_BEGIN_DRAG, - wxEVT_COMMAND_LIST_BEGIN_RDRAG, - wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, - wxEVT_COMMAND_LIST_END_LABEL_EDIT, - wxEVT_COMMAND_LIST_DELETE_ITEM, - wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, - wxEVT_COMMAND_LIST_GET_INFO, - wxEVT_COMMAND_LIST_SET_INFO, - wxEVT_COMMAND_LIST_ITEM_SELECTED, - wxEVT_COMMAND_LIST_ITEM_DESELECTED, - wxEVT_COMMAND_LIST_KEY_DOWN, - wxEVT_COMMAND_LIST_INSERT_ITEM, - wxEVT_COMMAND_LIST_COL_CLICK, - - /* Tab and notebook control event types */ - wxEVT_COMMAND_TAB_SEL_CHANGED, - wxEVT_COMMAND_TAB_SEL_CHANGING, - wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, - wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING -}; - - - - -///////////////////////////////////////////////////////////////////////////// -// -// $Log$ -// Revision 1.4 1998/08/18 19:48:11 RD -// more wxGTK compatibility things. -// -// It builds now but there are serious runtime problems... -// -// Revision 1.3 1998/08/14 23:36:33 RD -// Beginings of wxGTK compatibility -// -// Revision 1.2 1998/08/14 03:16:35 RD -// removed some definitions that got removed from defs.h -// -// Revision 1.1 1998/08/09 08:25:49 RD -// Initial version -// -// diff --git a/utils/wxPython/src/_extras.py b/utils/wxPython/src/_extras.py deleted file mode 100644 index 1e87311f07..0000000000 --- a/utils/wxPython/src/_extras.py +++ /dev/null @@ -1,774 +0,0 @@ -#---------------------------------------------------------------------------- -# Name: _extra.py -# Purpose: This file is appended to the shadow class file generated -# by SWIG. We add some unSWIGable things here. -# -# Author: Robin Dunn -# -# Created: 6/30/97 -# RCS-ID: $Id$ -# Copyright: (c) 1998 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------------- - -import sys - -#---------------------------------------------------------------------- -# This gives this module's dictionary to the C++ extension code... - -_wxSetDictionary(vars()) - - -#---------------------------------------------------------------------- -#---------------------------------------------------------------------- -# Helper function to link python methods to wxWindows virtual -# functions by name. - -def _checkForCallback(obj, name, event, theID=-1): - try: cb = getattr(obj, name) - except: pass - else: obj.Connect(theID, -1, event, cb) - -def _StdWindowCallbacks(win): - _checkForCallback(win, "OnChar", wxEVT_CHAR) - _checkForCallback(win, "OnSize", wxEVT_SIZE) - _checkForCallback(win, "OnEraseBackground", wxEVT_ERASE_BACKGROUND) - _checkForCallback(win, "OnSysColourChanged", wxEVT_SYS_COLOUR_CHANGED) - _checkForCallback(win, "OnInitDialog", wxEVT_INIT_DIALOG) - _checkForCallback(win, "OnIdle", wxEVT_IDLE) - _checkForCallback(win, "OnPaint", wxEVT_PAINT) - -def _StdFrameCallbacks(win): - _StdWindowCallbacks(win) - _checkForCallback(win, "OnActivate", wxEVT_ACTIVATE) - _checkForCallback(win, "OnMenuHighlight", wxEVT_MENU_HIGHLIGHT) - _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW) - - -def _StdOnScrollCallback(win): - try: cb = getattr(win, "OnScroll") - except: pass - else: EVT_SCROLL(win, cb) - - - -#---------------------------------------------------------------------- -#---------------------------------------------------------------------- -# functions that look and act like the C++ Macros of the same name - - -# Miscellaneous -def EVT_SIZE(win, func): - win.Connect(-1, -1, wxEVT_SIZE, func) - -def EVT_MOVE(win, func): - win.Connect(-1, -1, wxEVT_MOVE, func) - -def EVT_CLOSE(win, func): - win.Connect(-1, -1, wxEVT_CLOSE_WINDOW, func) - -def EVT_PAINT(win, func): - win.Connect(-1, -1, wxEVT_PAINT, func) - -def EVT_ERASE_BACKGROUND(win, func): - win.Connect(-1, -1, wxEVT_ERASE_BACKGROUND, func) - -def EVT_CHAR(win, func): - win.Connect(-1, -1, wxEVT_CHAR, func) - -def EVT_CHAR_HOOK(win, func): - win.Connect(-1, -1, wxEVT_CHAR_HOOK, func) - -def EVT_MENU_HIGHLIGHT(win, id, func): - win.Connect(id, -1, wxEVT_MENU_HIGHLIGHT, func) - -def EVT_MENU_HIGHLIGHT_ALL(win, func): - win.Connect(-1, -1, wxEVT_MENU_HIGHLIGHT, func) - -def EVT_SET_FOCUS(win, func): - win.Connect(-1, -1, wxEVT_SET_FOCUS, func) - -def EVT_KILL_FOCUS(win, func): - win.Connect(-1, -1, wxEVT_KILL_FOCUS, func) - -def EVT_ACTIVATE(win, func): - win.Connect(-1, -1, wxEVT_ACTIVATE, func) - -def EVT_ACTIVATE_APP(win, func): - win.Connect(-1, -1, wxEVT_ACTIVATE_APP, func) - -def EVT_END_SESSION(win, func): - win.Connect(-1, -1, wxEVT_END_SESSION, func) - -def EVT_QUERY_END_SESSION(win, func): - win.Connect(-1, -1, wxEVT_QUERY_END_SESSION, func) - -def EVT_DROP_FILES(win, func): - win.Connect(-1, -1, wxEVT_DROP_FILES, func) - -def EVT_INIT_DIALOG(win, func): - win.Connect(-1, -1, wxEVT_INIT_DIALOG, func) - -def EVT_SYS_COLOUR_CHANGED(win, func): - win.Connect(-1, -1, wxEVT_SYS_COLOUR_CHANGED, func) - -def EVT_SHOW(win, func): - win.Connect(-1, -1, wxEVT_SHOW, func) - -def EVT_MAXIMIZE(win, func): - win.Connect(-1, -1, wxEVT_MAXIMIZE, func) - -def EVT_ICONIZE(win, func): - win.Connect(-1, -1, wxEVT_ICONIZE, func) - -def EVT_NAVIGATION_KEY(win, func): - win.Connect(-1, -1, wxEVT_NAVIGATION_KEY, func) - - -# Mouse Events -def EVT_LEFT_DOWN(win, func): - win.Connect(-1, -1, wxEVT_LEFT_DOWN, func) - -def EVT_LEFT_UP(win, func): - win.Connect(-1, -1, wxEVT_LEFT_UP, func) - -def EVT_MIDDLE_DOWN(win, func): - win.Connect(-1, -1, wxEVT_MIDDLE_DOWN, func) - -def EVT_MIDDLE_UP(win, func): - win.Connect(-1, -1, wxEVT_MIDDLE_UP, func) - -def EVT_RIGHT_DOWN(win, func): - win.Connect(-1, -1, wxEVT_RIGHT_DOWN, func) - -def EVT_RIGHT_UP(win, func): - win.Connect(-1, -1, wxEVT_RIGHT_UP, func) - -def EVT_MOTION(win, func): - win.Connect(-1, -1, wxEVT_MOTION, func) - -def EVT_LEFT_DCLICK(win, func): - win.Connect(-1, -1, wxEVT_LEFT_DCLICK, func) - -def EVT_MIDDLE_DCLICK(win, func): - win.Connect(-1, -1, wxEVT_MIDDLE_DCLICK, func) - -def EVT_RIGHT_DCLICK(win, func): - win.Connect(-1, -1, wxEVT_RIGHT_DCLICK, func) - -def EVT_LEAVE_WINDOW(win, func): - win.Connect(-1, -1, wxEVT_LEAVE_WINDOW, func) - -def EVT_ENTER_WINDOW(win, func): - win.Connect(-1, -1, wxEVT_ENTER_WINDOW, func) - - -# all mouse events -def EVT_MOUSE_EVENTS(win, func): - win.Connect(-1, -1, wxEVT_LEFT_DOWN, func) - win.Connect(-1, -1, wxEVT_LEFT_UP, func) - win.Connect(-1, -1, wxEVT_MIDDLE_DOWN, func) - win.Connect(-1, -1, wxEVT_MIDDLE_UP, func) - win.Connect(-1, -1, wxEVT_RIGHT_DOWN, func) - win.Connect(-1, -1, wxEVT_RIGHT_UP, func) - win.Connect(-1, -1, wxEVT_MOTION, func) - win.Connect(-1, -1, wxEVT_LEFT_DCLICK, func) - win.Connect(-1, -1, wxEVT_MIDDLE_DCLICK, func) - win.Connect(-1, -1, wxEVT_RIGHT_DCLICK, func) - win.Connect(-1, -1, wxEVT_LEAVE_WINDOW, func) - win.Connect(-1, -1, wxEVT_ENTER_WINDOW, func) - -# EVT_COMMAND -def EVT_COMMAND(win, id, cmd, func): - win.Connect(id, -1, cmd, func) - -def EVT_COMMAND_RANGE(win, id1, id2, cmd, func): - win.Connect(id1, id2, cmd, func) - -# Scrolling -def EVT_SCROLL(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_TOP, func) - win.Connect(-1, -1, wxEVT_SCROLL_BOTTOM, func) - win.Connect(-1, -1, wxEVT_SCROLL_LINEUP, func) - win.Connect(-1, -1, wxEVT_SCROLL_LINEDOWN, func) - win.Connect(-1, -1, wxEVT_SCROLL_PAGEUP, func) - win.Connect(-1, -1, wxEVT_SCROLL_PAGEDOWN, func) - win.Connect(-1, -1, wxEVT_SCROLL_THUMBTRACK,func) - -def EVT_SCROLL_TOP(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_TOP, func) - -def EVT_SCROLL_BOTTOM(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_BOTTOM, func) - -def EVT_SCROLL_LINEUP(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_LINEUP, func) - -def EVT_SCROLL_LINEDOWN(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_LINEDOWN, func) - -def EVT_SCROLL_PAGEUP(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_PAGEUP, func) - -def EVT_SCROLL_PAGEDOWN(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_PAGEDOWN, func) - -def EVT_SCROLL_THUMBTRACK(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_THUMBTRACK, func) - - - -# Scrolling, with an id -def EVT_COMMAND_SCROLL(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_TOP, func) - win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func) - win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) - win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func) - win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func) - win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func) - win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func) - -def EVT_COMMAND_SCROLL_TOP(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_TOP, func) - -def EVT_COMMAND_SCROLL_BOTTOM(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func) - -def EVT_COMMAND_SCROLL_LINEUP(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) - -def EVT_COMMAND_SCROLL_LINEDOWN(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func) - -def EVT_COMMAND_SCROLL_PAGEUP(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func) - -def EVT_COMMAND_SCROLL_PAGEDOWN(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func) - -def EVT_COMMAND_SCROLL_THUMBTRACK(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK, func) - - -# Convenience commands -def EVT_BUTTON(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_BUTTON_CLICKED, func) - -def EVT_CHECKBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_CHECKBOX_CLICKED, func) - -def EVT_CHOICE(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_CHOICE_SELECTED, func) - -def EVT_LISTBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LISTBOX_SELECTED, func) - -def EVT_LISTBOX_DCLICK(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, func) - -def EVT_TEXT(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TEXT_UPDATED, func) - -def EVT_TEXT_ENTER(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TEXT_ENTER, func) - -def EVT_MENU(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_MENU_SELECTED, func) - -def EVT_MENU_RANGE(win, id1, id2, func): - win.Connect(id1, id2, wxEVT_COMMAND_MENU_SELECTED, func) - -def EVT_SLIDER(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_SLIDER_UPDATED, func) - -def EVT_RADIOBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_RADIOBOX_SELECTED, func) - -def EVT_RADIOBUTTON(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_RADIOBUTTON_SELECTED, func) - -def EVT_VLBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_VLBOX_SELECTED, func) - -def EVT_COMBOBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_COMBOBOX_SELECTED, func) - -def EVT_TOOL(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TOOL_CLICKED, func) - -def EVT_TOOL_RCLICKED(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TOOL_RCLICKED, func) - -def EVT_TOOL_ENTER(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TOOL_ENTER, func) - -def EVT_CHECKLISTBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, func) - - -# Generic command events - -def EVT_COMMAND_LEFT_CLICK(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LEFT_CLICK, func) - -def EVT_COMMAND_LEFT_DCLICK(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LEFT_DCLICK, func) - -def EVT_COMMAND_RIGHT_CLICK(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_RIGHT_CLICK, func) - -def EVT_COMMAND_RIGHT_DCLICK(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_RIGHT_DCLICK, func) - -def EVT_COMMAND_SET_FOCUS(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_SET_FOCUS, func) - -def EVT_COMMAND_KILL_FOCUS(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_KILL_FOCUS, func) - -def EVT_COMMAND_ENTER(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_ENTER, func) - - - -def EVT_NOTEBOOK_PAGE_CHANGED(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, func) - -def EVT_NOTEBOOK_PAGE_CHANGING(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, func) - - - -#---------------------------------------------------------------------- -#---------------------------------------------------------------------- -# We need to add to the shadow classes a bit to facilitate callbacks via -# virtual functions. These classes replace the shadows generated by SWIG. - -class wxWindow(wxWindowPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxWindow,(arg0.this,arg1,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - - -class wxFrame(wxFramePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxFrame,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdFrameCallbacks(self) - - -if wxPlatform == '__WXMSW__': - class wxMiniFrame(wxMiniFramePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxMiniFrame,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdFrameCallbacks(self) - - -class wxPanel(wxPanelPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxPanel,(arg0.this,arg1,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - - -class wxDialog(wxDialogPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxDialog,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - _checkForCallback(self, "OnOk", wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK) - _checkForCallback(self, "OnApply", wxEVT_COMMAND_BUTTON_CLICKED, wxID_APPLY) - _checkForCallback(self, "OnCancel", wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL) - _checkForCallback(self, "OnCloseWindow", wxEVT_CLOSE_WINDOW) - _checkForCallback(self, "OnCharHook", wxEVT_CHAR_HOOK) - - -class wxScrolledWindow(wxScrolledWindowPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxScrolledWindow,(arg0.this,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - _StdOnScrollCallback(self) - - - -class wxMDIParentFrame(wxMDIParentFramePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(mdic.new_wxMDIParentFrame,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdFrameCallbacks(self) - - -class wxMDIChildFrame(wxMDIChildFramePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(mdic.new_wxMDIChildFrame,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdFrameCallbacks(self) - - -class wxMDIClientWindow(wxMDIClientWindowPtr): - def __init__(self,arg0,*args) : - self.this = apply(mdic.new_wxMDIClientWindow,(arg0.this,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - _StdOnScrollCallback(self) - - - -class wxControl(wxControlPtr): - def __init__(self,this): - self.this = this - _StdWindowCallbacks(self) - -class wxButton(wxButtonPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxButton,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxBitmapButton(wxBitmapButtonPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxBitmapButton,(arg0.this,arg1,arg2.this,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxCheckBox(wxCheckBoxPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxCheckBox,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - - - -class wxChoice(wxChoicePtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxChoice,(arg0.this,arg1,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxComboBox(wxComboBoxPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxComboBox,(arg0.this,arg1,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxGauge(wxGaugePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxGauge,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxStaticBox(wxStaticBoxPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxStaticBox,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxStaticText(wxStaticTextPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxStaticText,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxListBox(wxListBoxPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxListBox,(arg0.this,arg1,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxTextCtrl(wxTextCtrlPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxTextCtrl,(arg0.this,arg1,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxScrollBar(wxScrollBarPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxScrollBar,(arg0.this,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -if wxPlatform == '__WXMSW__': - class wxSpinButton(wxSpinButtonPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxSpinButton,(arg0.this,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxStaticBitmap(wxStaticBitmapPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxStaticBitmap,(arg0.this,arg1,arg2.this,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxRadioBox(wxRadioBoxPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxRadioBox,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxRadioButton(wxRadioButtonPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxRadioButton,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxSlider(wxSliderPtr): - def __init__(self,arg0,arg1,arg2,arg3,arg4,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxSlider,(arg0.this,arg1,arg2,arg3,arg4,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - - - - - - -class wxTimer(wxPyTimer): - def __init__(self): - wxPyTimer.__init__(self, self.Notify) # derived class must provide - # Notify(self) method. - -#---------------------------------------------------------------------- -# Some wxWin methods can take "NULL" as parameters, but the shadow classes -# expect an object with the SWIG pointer as a 'this' member. This class -# and instance fools the shadow into passing the NULL pointer. - -class NullObj: - this = 'NULL' # SWIG converts this to (void*)0 - -NULL = NullObj() - - -#---------------------------------------------------------------------- -# aliases - -wxColor = wxColour -wxNamedColor = wxNamedColour - -wxPyDefaultPosition.Set(-1,-1) -wxPyDefaultSize.Set(-1,-1) - -#---------------------------------------------------------------------- - -## class wxPyStdOutWindow(wxFrame): -## def __init__(self, title = "wxPython: stdout/stderr"): -## wxFrame.__init__(self, NULL, title) -## self.title = title -## self.text = wxTextWindow(self) -## self.text.SetFont(wxFont(10, wxMODERN, wxNORMAL, wxBOLD)) -## self.SetSize(-1,-1,400,200) -## self.Show(false) -## self.isShown = false - -## def write(self, str): # with this method, -## if not self.isShown: -## self.Show(true) -## self.isShown = true -## self.text.WriteText(str) - -## def OnCloseWindow(self, event): # doesn't allow the window to close, just hides it -## self.Show(false) -## self.isShown = false - - -_defRedirect = (wxPlatform == '__WXMSW__') - -#---------------------------------------------------------------------- -# The main application class. Derive from this and implement an OnInit -# method that creates a frame and then calls self.SetTopWindow(frame) - -class wxApp(wxPyApp): - error = 'wxApp.error' - - def __init__(self, redirect=_defRedirect, filename=None): - wxPyApp.__init__(self) - self.stdioWin = None - self.saveStdio = (sys.stdout, sys.stderr) - if redirect: - self.RedirectStdio(filename) - - # this initializes wxWindows and then calls our OnInit - _wxStart(self.OnInit) - - - def __del__(self): - try: - self.RestoreStdio() - except: - pass - - def RedirectStdio(self, filename): - if filename: - sys.stdout = sys.stderr = open(filename, 'a') - else: - raise self.error, 'wxPyStdOutWindow not yet implemented.' - #self.stdioWin = sys.stdout = sys.stderr = wxPyStdOutWindow() - - def RestoreStdio(self): - sys.stdout, sys.stderr = self.saveStdio - if self.stdioWin != None: - self.stdioWin.Show(false) - self.stdioWin.Destroy() - self.stdioWin = None - - -#---------------------------------------------------------------------------- -# -# $Log$ -# Revision 1.2 1998/08/18 19:48:12 RD -# more wxGTK compatibility things. -# -# It builds now but there are serious runtime problems... -# -# Revision 1.1 1998/08/09 08:25:49 RD -# Initial version -# -# - diff --git a/utils/wxPython/src/cmndlgs.i b/utils/wxPython/src/cmndlgs.i deleted file mode 100644 index dc6dae7be1..0000000000 --- a/utils/wxPython/src/cmndlgs.i +++ /dev/null @@ -1,315 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: cmndlgs.i -// Purpose: SWIG definitions for the Common Dialog Classes -// -// Author: Robin Dunn -// -// Created: 7/25/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 by Total Control Software -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -%module cmndlgs - -%{ -#include "helpers.h" -#include -#include -#include -#include -%} - -//---------------------------------------------------------------------- - -%include typemaps.i -%include my_typemaps.i - -// Import some definitions of other classes, etc. -%import _defs.i -%import misc.i -%import gdi.i -%import windows.i - - -//---------------------------------------------------------------------- - -class wxColourData { -public: - wxColourData(); - ~wxColourData(); - - bool GetChooseFull(); - wxColour& GetColour(); - wxColour GetCustomColour(int i); - void SetChooseFull(int flag); - void SetColour(const wxColour& colour); - void SetCustomColour(int i, const wxColour& colour); -}; - - -class wxColourDialog : public wxDialog { -public: - wxColourDialog(wxWindow* parent, wxColourData* data = NULL); - -#ifdef __WXMSW__ - wxColourData& GetColourData(); -#else - wxColourData GetColourData(); -#endif - int ShowModal(); -}; - - -//---------------------------------------------------------------------- - -#ifdef __WXMSW__ -class wxDirDialog : public wxDialog { -public: - wxDirDialog(wxWindow* parent, - char* message = "Choose a directory", - char* defaultPath = "", - long style = 0, - const wxPoint& pos = wxPyDefaultPosition); - - wxString GetPath(); - wxString GetMessage(); - long GetStyle(); - void SetMessage(const wxString& message); - void SetPath(const wxString& path); - int ShowModal(); -}; -#endif - -//---------------------------------------------------------------------- - -class wxFileDialog : public wxDialog { -public: - wxFileDialog(wxWindow* parent, - char* message = "Choose a file", - char* defaultDir = "", - char* defaultFile = "", - char* wildcard = "*.*", - long style = 0, - const wxPoint& pos = wxPyDefaultPosition); - - wxString GetDirectory(); - wxString GetFilename(); - int GetFilterIndex(); - wxString GetMessage(); - wxString GetPath(); - long GetStyle(); - wxString GetWildcard(); - void SetDirectory(const wxString& directory); - void SetFilename(const wxString& setfilename); - void SetFilterIndex(int filterIndex); - void SetMessage(const wxString& message); - void SetPath(const wxString& path); - void SetStyle(long style); - void SetWildcard(const wxString& wildCard); - int ShowModal(); -}; - - -//---------------------------------------------------------------------- - -//TODO: wxMultipleChoiceDialog - -//---------------------------------------------------------------------- - -class wxSingleChoiceDialog : public wxDialog { -public: - %addmethods { - // TODO: ignoring clientData for now... - // SWIG is messing up the &/*'s for some reason. - wxSingleChoiceDialog(wxWindow* parent, - wxString* message, - wxString* caption, - int LCOUNT, wxString* LIST, - //char** clientData = NULL, - long style = wxOK | wxCANCEL | wxCENTRE, - wxPoint* pos = &wxPyDefaultPosition) { - return new wxSingleChoiceDialog(parent, *message, *caption, - LCOUNT, LIST, NULL, style, *pos); - } - } - - int GetSelection(); - wxString GetStringSelection(); - void SetSelection(int sel); - int ShowModal(); -}; - - -//---------------------------------------------------------------------- - -class wxTextEntryDialog : public wxDialog { -public: - wxTextEntryDialog(wxWindow* parent, - char* message, - char* caption = "Input Text", - char* defaultValue = "", - long style = wxOK | wxCANCEL | wxCENTRE, - const wxPoint& pos = wxPyDefaultPosition); - - wxString GetValue(); - void SetValue(const wxString& value); - int ShowModal(); -}; - -//---------------------------------------------------------------------- - -class wxFontData { -public: - wxFontData(); - ~wxFontData(); - - void EnableEffects(bool enable); - bool GetAllowSymbols(); - wxColour& GetColour(); - wxFont GetChosenFont(); - bool GetEnableEffects(); - wxFont GetInitialFont(); - bool GetShowHelp(); - void SetAllowSymbols(bool allowSymbols); - void SetChosenFont(const wxFont& font); - void SetColour(const wxColour& colour); - void SetInitialFont(const wxFont& font); - void SetRange(int min, int max); - void SetShowHelp(bool showHelp); -}; - - -class wxFontDialog : public wxDialog { -public: - wxFontDialog(wxWindow* parent, wxFontData* data = NULL); - - wxFontData& GetFontData(); - int ShowModal(); -}; - - -//---------------------------------------------------------------------- - -#ifdef __WXMSW__ -class wxPageSetupData { -public: - wxPageSetupData(); - ~wxPageSetupData(); - - void EnableHelp(bool flag); - void EnableMargins(bool flag); - void EnableOrientation(bool flag); - void EnablePaper(bool flag); - void EnablePrinter(bool flag); - wxPoint GetPaperSize(); - wxPoint GetMarginTopLeft(); - wxPoint GetMarginBottomRight(); - wxPoint GetMinMarginTopLeft(); - wxPoint GetMinMarginBottomRight(); - int GetOrientation(); - bool GetDefaultMinMargins(); - bool GetEnableMargins(); - bool GetEnableOrientation(); - bool GetEnablePaper(); - bool GetEnablePrinter(); - bool GetEnableHelp(); - bool GetDefaultInfo(); - void SetPaperSize(const wxPoint& size); - void SetMarginTopLeft(const wxPoint& pt); - void SetMarginBottomRight(const wxPoint& pt); - void SetMinMarginTopLeft(const wxPoint& pt); - void SetMinMarginBottomRight(const wxPoint& pt); - void SetOrientation(int orientation); - void SetDefaultMinMargins(bool flag); - void SetDefaultInfo(bool flag); -}; - - -class wxPageSetupDialog : public wxDialog { -public: - wxPageSetupDialog(wxWindow* parent, wxPageSetupData* data = NULL); - - wxPageSetupData& GetPageSetupData(); - int ShowModal(); -}; -#endif - -//---------------------------------------------------------------------- - -#ifdef __WXMSW__ -class wxPrintData { -public: - wxPrintData(); - ~wxPrintData(); - - void EnableHelp(bool flag); - void EnablePageNumbers(bool flag); - void EnablePrintToFile(bool flag); - void EnableSelection(bool flag); - bool GetAllPages(); - bool GetCollate(); - int GetFromPage(); - int GetMaxPage(); - int GetMinPage(); - int GetNoCopies(); - int GetOrientation(); - int GetToPage(); - void SetCollate(bool flag); - void SetFromPage(int page); - void SetMaxPage(int page); - void SetMinPage(int page); - void SetOrientation(int orientation); - void SetNoCopies(int n); - void SetPrintToFile(bool flag); - void SetSetupDialog(bool flag); - void SetToPage(int page); -}; - - -class wxPrintDialog : public wxDialog { -public: - wxPrintDialog(wxWindow* parent, wxPrintData* data = NULL); - - wxPrintData& GetPrintData(); - wxDC* GetPrintDC(); - int ShowModal(); -}; -#endif - -//---------------------------------------------------------------------- - -class wxMessageDialog : public wxDialog { -public: - wxMessageDialog(wxWindow* parent, - char* message, - char* caption = "Message box", - long style = wxOK | wxCANCEL | wxCENTRE, - const wxPoint& pos = wxPyDefaultPosition); - - int ShowModal(); -}; - -//---------------------------------------------------------------------- - - -///////////////////////////////////////////////////////////////////////////// -// -// $Log$ -// Revision 1.3 1998/08/18 19:48:13 RD -// more wxGTK compatibility things. -// -// It builds now but there are serious runtime problems... -// -// Revision 1.2 1998/08/15 07:36:25 RD -// - Moved the header in the .i files out of the code that gets put into -// the .cpp files. It caused CVS conflicts because of the RCS ID being -// different each time. -// -// - A few minor fixes. -// -// Revision 1.1 1998/08/09 08:25:49 RD -// Initial version -// -// - diff --git a/utils/wxPython/src/controls.i b/utils/wxPython/src/controls.i deleted file mode 100644 index c3121d24e5..0000000000 --- a/utils/wxPython/src/controls.i +++ /dev/null @@ -1,451 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: controls.i -// Purpose: Control (widget) classes for wxPython -// -// Author: Robin Dunn -// -// Created: 6/10/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 by Total Control Software -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -%module controls - -%{ -#include "helpers.h" -#include - -#ifdef __WXMSW__ -#include -#endif -%} - -//---------------------------------------------------------------------- - -%include typemaps.i -%include my_typemaps.i - -// Import some definitions of other classes, etc. -%import _defs.i -%import misc.i -%import windows.i -%import gdi.i -%import events.i - -//---------------------------------------------------------------------- - -%{ -wxValidator wxPyDefaultValidator; // Non-const default because of SWIG -%} - -//---------------------------------------------------------------------- - -class wxControl : public wxWindow { -public: - void Command(wxCommandEvent& event); - wxString GetLabel(); - void SetLabel(const wxString& label); -}; - -//---------------------------------------------------------------------- - -class wxButton : public wxControl { -public: - wxButton(wxWindow* parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = 0, - const wxValidator& validator = wxPyDefaultValidator, - char* name = "button"); - void SetDefault(); -}; - -//---------------------------------------------------------------------- - -class wxBitmapButton : public wxButton { -public: - wxBitmapButton(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = wxBU_AUTODRAW, - const wxValidator& validator = wxPyDefaultValidator, - char* name = "button"); - - wxBitmap& GetBitmapLabel(); -#ifdef __WXMSW__ - wxBitmap& GetBitmapDisabled(); - wxBitmap& GetBitmapFocus(); - wxBitmap& GetBitmapSelected(); - void SetBitmapDisabled(const wxBitmap& bitmap); - void SetBitmapFocus(const wxBitmap& bitmap); - void SetBitmapSelected(const wxBitmap& bitmap); -#endif - void SetBitmapLabel(const wxBitmap& bitmap); - -}; - -//---------------------------------------------------------------------- - -class wxCheckBox : public wxControl { -public: - wxCheckBox(wxWindow* parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = 0, - const wxValidator& val = wxPyDefaultValidator, - char* name = "checkBox"); - - bool GetValue(); - void SetValue(const bool state); -}; - -//---------------------------------------------------------------------- - -class wxChoice : public wxControl { -public: - wxChoice(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - int LCOUNT=0, wxString* LIST=NULL, - long style = 0, - const wxValidator& validator = wxPyDefaultValidator, - char* name = "choice"); - - void Append(const wxString& item); - void Clear(); - int FindString(const wxString& string); - int GetColumns(); - int GetSelection(); - wxString GetString(const int n); - wxString GetStringSelection(); - int Number(); - void SetColumns(const int n = 1); - void SetSelection(const int n); - void SetStringSelection(const wxString& string); -}; - -//---------------------------------------------------------------------- - -class wxComboBox : public wxControl { -public: - wxComboBox(wxWindow* parent, wxWindowID id, char* value = "", - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - int LCOUNT=0, wxString* LIST=NULL, - long style = 0, - const wxValidator& validator = wxPyDefaultValidator, - char* name = "comboBox"); - - void Append(const wxString& item); - // TODO: void Append(const wxString& item, char* clientData); - void Clear(); - void Copy(); - void Cut(); - void Delete(int n); - // NotMember??: void Deselect(int n); - int FindString(const wxString& string); - // TODO: char* GetClientData(const int n); - long GetInsertionPoint(); - long GetLastPosition(); - int GetSelection(); - wxString GetString(int n); - wxString GetStringSelection(); - wxString GetValue(); - int Number(); - void Paste(); - void Replace(long from, long to, const wxString& text); - void Remove(long from, long to); - // TODO: void SetClientData(const int n, char* data); - void SetInsertionPoint(long pos); - void SetInsertionPointEnd(); - void SetSelection(int n, bool select = TRUE); - %name(SetMark)void SetSelection(long from, long to); - void SetValue(const wxString& text); -}; - -//---------------------------------------------------------------------- - -class wxGauge : public wxControl { -public: - wxGauge(wxWindow* parent, wxWindowID id, int range, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = wxGA_HORIZONTAL, - const wxValidator& validator = wxPyDefaultValidator, - char* name = "gauge"); - - int GetBezelFace(); - int GetRange(); - int GetShadowWidth(); - int GetValue(); - void SetBezelFace(int width); - void SetRange(int range); - void SetShadowWidth(int width); - void SetValue(int pos); -}; - -//---------------------------------------------------------------------- - -class wxStaticBox : public wxControl { -public: - wxStaticBox(wxWindow* parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = 0, - char* name = "staticBox"); -}; - - -//---------------------------------------------------------------------- - -class wxStaticText : public wxControl { -public: - wxStaticText(wxWindow* parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = 0, - char* name = "staticText"); - - wxString GetLabel(); - void SetLabel(const wxString& label); -}; - -//---------------------------------------------------------------------- - -class wxListBox : public wxControl { -public: - wxListBox(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - int LCOUNT, wxString* LIST = NULL, - long style = 0, - const wxValidator& validator = wxPyDefaultValidator, - char* name = "listBox"); - - void Append(const wxString& item); - // TODO: void Append(const wxString& item, char* clientData); - void Clear(); - void Delete(int n); - void Deselect(int n); - int FindString(const wxString& string); - // TODO: char* GetClientData(const int n); - int GetSelection(); - // TODO: int GetSelections(int **selections); - wxString GetString(int n); - wxString GetStringSelection(); - int Number(); - bool Selected(const int n); - void Set(int LCOUNT, wxString* LIST); - // TODO: void SetClientData(const int n, char* data); - void SetFirstItem(int n); - %name(SetFirstItemStr)void SetFirstItem(const wxString& string); - void SetSelection(int n, bool select = TRUE); - void SetString(int n, const wxString& string); - void SetStringSelection(const wxString& string, bool select = TRUE); -}; - - -//---------------------------------------------------------------------- - -class wxTextCtrl : public wxControl { -public: - wxTextCtrl(wxWindow* parent, wxWindowID id, char* value = "", - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = 0, - const wxValidator& validator = wxPyDefaultValidator, - char* name = "text"); - - void Clear(); - void Copy(); - void Cut(); - void DiscardEdits(); - long GetInsertionPoint(); - long GetLastPosition(); -#ifdef __WXMSW__ - int GetLineLength(long lineNo); - wxString GetLineText(long lineNo); - int GetNumberOfLines(); -#endif - wxString GetValue(); - bool IsModified(); - bool LoadFile(const wxString& filename); - void Paste(); -#ifdef __WXMSW__ - void PositionToXY(long pos, long *OUTPUT, long *OUTPUT); -#endif - void Remove(long from, long to); - void Replace(long from, long to, const wxString& value); - bool SaveFile(const wxString& filename); - void SetEditable(bool editable); - void SetInsertionPoint(long pos); - void SetInsertionPointEnd(); - void SetSelection(long from, long to); - void SetValue(const wxString& value); - void ShowPosition(long pos); - void WriteText(const wxString& text); -#ifdef __WXMSW__ - long XYToPosition(long x, long y); -#endif -}; - -//---------------------------------------------------------------------- - -class wxScrollBar : public wxControl { -public: - wxScrollBar(wxWindow* parent, wxWindowID id = -1, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = wxSB_HORIZONTAL, - const wxValidator& validator = wxPyDefaultValidator, - char* name = "scrollBar"); - - int GetRange(); - int GetPageSize(); - int GetPosition(); - int GetThumbSize(); - void SetPosition(int viewStart); - void SetScrollbar(int position, int thumbSize, - int range, int pageSize, - bool refresh = TRUE); -}; - -//---------------------------------------------------------------------- - -#ifdef __WXMSW__ -class wxSpinButton : public wxControl { -public: - wxSpinButton(wxWindow* parent, wxWindowID id = -1, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = wxSP_HORIZONTAL, - char* name = "spinButton"); - - int GetMax(); - int GetMin(); - int GetValue(); - void SetRange(int min, int max); - void SetValue(int value); -}; -#endif - -//---------------------------------------------------------------------- - -class wxStaticBitmap : public wxControl { -public: - wxStaticBitmap(wxWindow* parent, wxWindowID id, - const wxBitmap& bitmap, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = 0, - char* name = "staticBitmap"); - - wxBitmap& GetBitmap(); - void SetBitmap(const wxBitmap& bitmap); -}; - -//---------------------------------------------------------------------- - -class wxRadioBox : public wxControl { -public: - wxRadioBox(wxWindow* parent, wxWindowID id, - const wxString& label, - const wxPoint& point = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - int LCOUNT = 0, wxString* LIST = NULL, - int majorDimension = 0, - long style = wxRA_HORIZONTAL, - const wxValidator& validator = wxPyDefaultValidator, - char* name = "radioBox"); - - %name(EnableBox)void Enable(bool enable); - void Enable(int n, bool enable); - int FindString(const wxString& string); - %name(GetBoxLabel)wxString GetLabel(); - wxString GetLabel(int n); - int GetSelection(); - wxString GetString(int n); - wxString GetStringSelection(); - int Number(); - %name(SetBoxLabel)void SetLabel(const wxString& label); - void SetLabel(int n, const wxString& label); - void SetSelection(int n); - void SetStringSelection(const wxString& string); - void Show(bool show); - %name(ShowItem)void Show(int item, bool show); -}; - -//---------------------------------------------------------------------- - -class wxRadioButton : public wxControl { -public: - wxRadioButton(wxWindow* parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = 0, - const wxValidator& validator = wxPyDefaultValidator, - char* name = "radioButton"); - - bool GetValue(); - void SetValue(bool value); -}; - -//---------------------------------------------------------------------- - -class wxSlider : public wxControl { -public: - wxSlider(wxWindow* parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& point = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = wxSL_HORIZONTAL, - const wxValidator& validator = wxPyDefaultValidator, - char* name = "slider"); - - void ClearSel(); - void ClearTicks(); - int GetLineSize(); - int GetMax(); - int GetMin(); - int GetPageSize(); - int GetSelEnd(); - int GetSelStart(); - int GetThumbLength(); - int GetTickFreq(); - int GetValue(); - void SetRange(int minValue, int maxValue); - void SetTickFreq(int n, int pos); - void SetLineSize(int lineSize); - void SetPageSize(int pageSize); - void SetSelection(int startPos, int endPos); - void SetThumbLength(int len); - void SetTick(int tickPos); - void SetValue(int value); -}; - - -//---------------------------------------------------------------------- - - -///////////////////////////////////////////////////////////////////////////// -// -// $Log$ -// Revision 1.3 1998/08/18 19:48:14 RD -// more wxGTK compatibility things. -// -// It builds now but there are serious runtime problems... -// -// Revision 1.2 1998/08/15 07:36:28 RD -// - Moved the header in the .i files out of the code that gets put into -// the .cpp files. It caused CVS conflicts because of the RCS ID being -// different each time. -// -// - A few minor fixes. -// -// Revision 1.1 1998/08/09 08:25:49 RD -// Initial version -// -// - diff --git a/utils/wxPython/src/controls2.i b/utils/wxPython/src/controls2.i deleted file mode 100644 index 65ea561ecf..0000000000 --- a/utils/wxPython/src/controls2.i +++ /dev/null @@ -1,444 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: controls2.i -// Purpose: More control (widget) classes for wxPython -// -// Author: Robin Dunn -// -// Created: 6/10/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 by Total Control Software -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -%module controls2 - -%{ -#include "helpers.h" -#include -#include -#include -%} - -//---------------------------------------------------------------------- - -%include typemaps.i -%include my_typemaps.i - -// Import some definitions of other classes, etc. -%import _defs.i -%import misc.i -%import windows.i -%import gdi.i -%import events.i -%import controls.i - -//---------------------------------------------------------------------- - -%{ -extern wxValidator wxPyDefaultValidator; -%} - -//---------------------------------------------------------------------- - -class wxListItem { -public: - long m_mask; // Indicates what fields are valid - long m_itemId; // The zero-based item position - int m_col; // Zero-based column, if in report mode - long m_state; // The state of the item - long m_stateMask; // Which flags of m_state are valid (uses same flags) - wxString m_text; // The label/header text - int m_image; // The zero-based index into an image list - long m_data; // App-defined data -// wxColour *m_colour; // only wxGLC, not supported by Windows ;-> - - // For columns only - int m_format; // left, right, centre - int m_width; // width of column - - wxListItem(); - ~wxListItem(); -}; - -class wxListEvent: public wxCommandEvent { -public: - int m_code; - long m_itemIndex; - long m_oldItemIndex; - int m_col; - bool m_cancelled; - wxPoint m_pointDrag; - wxListItem m_item; -}; - - - - -class wxListCtrl : public wxControl { -public: -#ifdef __WXMSW__ - wxListCtrl(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = wxLC_ICON, - const wxValidator& validator = wxPyDefaultValidator, - char* name = "listCtrl"); -#else - wxListCtrl(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = wxLC_ICON, - char* name = "listctrl"); -#endif - - bool Arrange(int flag = wxLIST_ALIGN_DEFAULT); - bool DeleteItem(long item); - bool DeleteAllItems(); - bool DeleteColumn(int col); -#ifdef __WXMSW__ - bool DeleteAllColumns(void); - void ClearAll(void); - wxTextCtrl* EditLabel(long item); - bool EndEditLabel(bool cancel); -#endif - bool EnsureVisible(long item); - long FindItem(long start, const wxString& str, bool partial = FALSE); - %name(FindItemData)long FindItem(long start, long data); - %name(FindItemAtPos)long FindItem(long start, const wxPoint& pt, - int direction); - bool GetColumn(int col, wxListItem& item); - int GetColumnWidth(int col); - int GetCountPerPage(); -#ifdef __WXMSW - wxTextCtrl* GetEditControl(); -#endif - wxImageList* GetImageList(int which); - long GetItemData(long item); - - %addmethods { - %new wxListItem* GetItem() { - wxListItem* info = new wxListItem; - self->GetItem(*info); - return info; - } - %new wxPoint* GetItemPosition(long item) { - wxPoint* pos = new wxPoint; - self->GetItemPosition(item, *pos); - return pos; - } - %new wxRect* GetItemRect(long item, int code = wxLIST_RECT_BOUNDS) { - wxRect* rect= new wxRect; - self->GetItemRect(item, *rect, code); - return rect; - } - } - - int GetItemState(long item, long stateMask); - int GetItemCount(); - int GetItemSpacing(bool isSmall); - wxString GetItemText(long item); - long GetNextItem(long item, - int geometry = wxLIST_NEXT_ALL, - int state = wxLIST_STATE_DONTCARE); - int GetSelectedItemCount(); -#ifdef __WXMSW__ - wxColour GetTextColour(); -#endif - long GetTopItem(); - long HitTest(const wxPoint& point, int& OUTPUT); - %name(InsertColumnWithInfo)long InsertColumn(long col, wxListItem& info); - long InsertColumn(long col, const wxString& heading, - int format = wxLIST_FORMAT_LEFT, - int width = -1); - - long InsertItem(wxListItem& info); - %name(InsertStringItem) long InsertItem(long index, const wxString& label); - %name(InsertImageItem) long InsertItem(long index, int imageIndex); - %name(InsertImageStringItem)long InsertItem(long index, const wxString& label, - int imageIndex); - - bool ScrollList(int dx, int dy); - void SetBackgroundColour(const wxColour& col); - bool SetColumn(int col, wxListItem& item); - bool SetColumnWidth(int col, int width); - void SetImageList(wxImageList* imageList, int which); - bool SetItem(wxListItem& info); - %name(SetItemString)long SetItem(long index, int col, const wxString& label, - int imageId = -1); - bool SetItemData(long item, long data); - bool SetItemImage(long item, int image, int selImage); - bool SetItemPosition(long item, const wxPoint& pos); - bool SetItemState(long item, long state, long stateMask); - void SetItemText(long item, const wxString& text); - void SetSingleStyle(long style, bool add = TRUE); -#ifdef __WXMSW__ - void SetTextColour(const wxColour& col); -#endif - void SetWindowStyleFlag(long style); - // TODO: bool SortItems(wxListCtrlCompare fn, long data); -}; - - - -//---------------------------------------------------------------------- - - -enum { - wxTREE_MASK_HANDLE, - wxTREE_MASK_STATE, - wxTREE_MASK_TEXT, - wxTREE_MASK_IMAGE, - wxTREE_MASK_SELECTED_IMAGE, - wxTREE_MASK_CHILDREN, - wxTREE_MASK_DATA, - - wxTREE_STATE_BOLD, - wxTREE_STATE_DROPHILITED, - wxTREE_STATE_EXPANDED, - wxTREE_STATE_EXPANDEDONCE, - wxTREE_STATE_FOCUSED, - wxTREE_STATE_SELECTED, - wxTREE_STATE_CUT, - - wxTREE_HITTEST_ABOVE, - wxTREE_HITTEST_BELOW, - wxTREE_HITTEST_NOWHERE, - wxTREE_HITTEST_ONITEMBUTTON, - wxTREE_HITTEST_ONITEMICON, - wxTREE_HITTEST_ONITEMINDENT, - wxTREE_HITTEST_ONITEMLABEL, - wxTREE_HITTEST_ONITEMRIGHT, - wxTREE_HITTEST_ONITEMSTATEICON, - wxTREE_HITTEST_TOLEFT, - wxTREE_HITTEST_TORIGHT, - wxTREE_HITTEST_ONITEM, -}; - - -enum { - wxTREE_NEXT_CARET, - wxTREE_NEXT_CHILD, - wxTREE_NEXT_DROPHILITE, - wxTREE_NEXT_FIRSTVISIBLE, - wxTREE_NEXT_NEXT, - wxTREE_NEXT_NEXTVISIBLE, - wxTREE_NEXT_PARENT, - wxTREE_NEXT_PREVIOUS, - wxTREE_NEXT_PREVIOUSVISIBLE, - wxTREE_NEXT_ROOT -}; - -enum { - wxTREE_EXPAND_EXPAND, - wxTREE_EXPAND_COLLAPSE, - wxTREE_EXPAND_COLLAPSE_RESET, - wxTREE_EXPAND_TOGGLE -}; - -enum { - wxTREE_INSERT_LAST, - wxTREE_INSERT_FIRST, - wxTREE_INSERT_SORT, -}; - - - - - - - -class wxTreeItem { -public: - long m_mask; - long m_itemId; - long m_state; - long m_stateMask; - wxString m_text; - int m_image; - int m_selectedImage; - int m_children; - long m_data; - - wxTreeItem(); - ~wxTreeItem(); -}; - - - -class wxTreeEvent : public wxCommandEvent { -public: - int m_code; - wxTreeItem m_item; - long m_oldItem; - wxPoint m_pointDrag; -}; - - - - -class wxTreeCtrl : public wxControl { -public: -#ifdef __WXMSW__ - wxTreeCtrl(wxWindow *parent, wxWindowID id = -1, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = wxTR_HAS_BUTTONS, - const wxValidator& validator = wxPyDefaultValidator, - char* name = "wxTreeCtrl"); -#else - wxTreeCtrl(wxWindow *parent, wxWindowID id = -1, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = wxTR_HAS_BUTTONS, - char* name = "wxTreeCtrl"); -#endif - - bool DeleteAllItems(); -#ifdef __WXMSW__ - bool DeleteItem(long item); -#else - void DeleteItem(long item); -#endif -#ifdef __WXMSW__ - wxTextCtrl* EditLabel(long item); - bool EnsureVisible(long item); - bool ExpandItem(long item, int action); - long GetChild(long item); -#endif - int GetCount(); -#ifdef __WXMSW__ - wxTextCtrl* GetEditControl(); - long GetFirstVisibleItem(); -#endif - wxImageList* GetImageList(int which = wxIMAGE_LIST_NORMAL); - int GetIndent(); - long GetItemData(long item); - - %addmethods { - %new wxTreeItem* GetItem() { - wxTreeItem* info = new wxTreeItem; - self->GetItem(*info); - return info; - } -#ifdef __WXMSW__ - %new wxRect* GetItemRect(long item, int textOnly = FALSE) { - wxRect* rect = new wxRect; - self->GetItemRect(item, *rect, textOnly); - return rect; - } -#endif - } - -#ifdef __WXMSW__ - int GetItemState(long item, long stateMask); -#endif - wxString GetItemText(long item); -#ifdef __WXMSW__ - long GetNextItem(long item, int code); - long GetNextVisibleItem(long item); -#endif - long GetParent(long item); - long GetRootItem(); - long GetSelection(); - long HitTest(const wxPoint& point, int& OUTPUT); // *** check this - long InsertItem(long parent, wxTreeItem& info, - long insertAfter = wxTREE_INSERT_LAST); - %name(InsertItemString) - long InsertItem(long parent, const wxString& label, - int image = -1, int selImage = -1, - long insertAfter = wxTREE_INSERT_LAST); - bool ItemHasChildren(long item); -#ifdef __WXMSW__ - bool ScrollTo(long item); -#endif - bool SelectItem(long item); - void SetIndent(int indent); - void SetImageList(wxImageList* imageList, int which = wxIMAGE_LIST_NORMAL); - bool SetItem(wxTreeItem& info); -#ifdef __WXMSW__ - bool SetItemImage(long item, int image, int selImage); -#else - void SetItemImage(long item, int image, int selImage); -#endif -#ifdef __WXMSW__ - bool SetItemState(long item, long state, long stateMask); -#endif - void SetItemText(long item, const wxString& text); - bool SetItemData(long item, long data); -#ifdef __WXMSW__ - bool SortChildren(long item); -#endif -}; - -//---------------------------------------------------------------------- - -#ifdef __WXMSW__ -class wxTabEvent : public wxCommandEvent { -public: -}; - - - -class wxTabCtrl : public wxControl { -public: - wxTabCtrl(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = 0, - char* name = "tabCtrl"); - - bool DeleteAllItems(); - bool DeleteItem(int item); - wxImageList* GetImageList(); - int GetItemCount(); - // TODO: void* GetItemData(); - int GetItemImage(int item); - - %addmethods { - %new wxRect* GetItemRect(int item) { - wxRect* rect = new wxRect; - self->GetItemRect(item, *rect); - return rect; - } - } - - wxString GetItemText(int item); - bool GetRowCount(); - int GetSelection(); - int HitTest(const wxPoint& pt, long& OUTPUT); - void InsertItem(int item, const wxString& text, - int imageId = -1, void* clientData = NULL); - // TODO: bool SetItemData(int item, void* data); - bool SetItemImage(int item, int image); - void SetImageList(wxImageList* imageList); - void SetItemSize(const wxSize& size); - bool SetItemText(int item, const wxString& text); - void SetPadding(const wxSize& padding); - int SetSelection(int item); - -}; - -#endif - -//---------------------------------------------------------------------- - - -///////////////////////////////////////////////////////////////////////////// -// -// $Log$ -// Revision 1.3 1998/08/18 19:48:15 RD -// more wxGTK compatibility things. -// -// It builds now but there are serious runtime problems... -// -// Revision 1.2 1998/08/15 07:36:30 RD -// - Moved the header in the .i files out of the code that gets put into -// the .cpp files. It caused CVS conflicts because of the RCS ID being -// different each time. -// -// - A few minor fixes. -// -// Revision 1.1 1998/08/09 08:25:49 RD -// Initial version -// -// diff --git a/utils/wxPython/src/events.i b/utils/wxPython/src/events.i deleted file mode 100644 index 39f7e4417c..0000000000 --- a/utils/wxPython/src/events.i +++ /dev/null @@ -1,303 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: events.i -// Purpose: SWIGgable Event classes for wxPython -// -// Author: Robin Dunn -// -// Created: 5/24/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 by Total Control Software -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - - -%module events - -%{ -#include "helpers.h" -%} - -//---------------------------------------------------------------------- - -%include typemaps.i -%include my_typemaps.i - -// Import some definitions of other classes, etc. -%import _defs.i -%import misc.i - -//--------------------------------------------------------------------------- - -class wxEvent { -public: - wxObject* GetEventObject(); - wxEventType GetEventType(); - int GetId(); - bool GetSkipped(); - long GetTimestamp(); - void SetEventObject(wxObject* object); - void SetEventType(wxEventType typ); - void SetId(int id); - void SetTimestamp(long timeStamp); - void Skip(bool skip = TRUE); -}; - -//--------------------------------------------------------------------------- - -class wxSizeEvent : public wxEvent { -public: - wxSize GetSize(); -}; - -//--------------------------------------------------------------------------- - -class wxCloseEvent : public wxEvent { -public: - bool GetSessionEnding(); - bool GetLoggingOff(); - void Veto(bool veto = TRUE); - bool GetVeto(); - void SetForce(bool force); - bool GetForce(); -}; - -//--------------------------------------------------------------------------- - -class wxCommandEvent : public wxEvent { -public: - bool Checked(); - long GetExtraLong(); - int GetInt(); - int GetSelection(); - char* GetString(); - bool IsSelection(); - -}; - - -//--------------------------------------------------------------------------- - -class wxScrollEvent: public wxCommandEvent { -public: - int GetOrientation(); - int GetPosition(); -}; - -//--------------------------------------------------------------------------- - -class wxMouseEvent: public wxEvent { -public: - bool IsButton(); - bool ButtonDown(int but = -1); - bool ButtonDClick(int but = -1); - bool ButtonUp(int but = -1); - bool Button(int but); - bool ButtonIsDown(int but); - bool ControlDown(); - bool MetaDown(); - bool AltDown(); - bool ShiftDown(); - bool LeftDown(); - bool MiddleDown(); - bool RightDown(); - bool LeftUp(); - bool MiddleUp(); - bool RightUp(); - bool LeftDClick(); - bool MiddleDClick(); - bool RightDClick(); - bool LeftIsDown(); - bool MiddleIsDown(); - bool RightIsDown(); - bool Dragging(); - bool Moving(); - bool Entering(); - bool Leaving(); - void Position(long *OUTPUT, long *OUTPUT); - wxPoint GetPosition(); - wxPoint GetLogicalPosition(const wxDC& dc); - long GetX(); - long GetY(); -}; - -//--------------------------------------------------------------------------- - -class wxKeyEvent: public wxEvent { -public: - bool ControlDown(); - bool MetaDown(); - bool AltDown(); - bool ShiftDown(); - long KeyCode(); - void Position(float *OUTPUT, float *OUTPUT); - float GetX(); - float GetY(); -}; - -//--------------------------------------------------------------------------- - -class wxMoveEvent: public wxEvent { -public: - wxPoint GetPosition(); -}; - -//--------------------------------------------------------------------------- - -class wxPaintEvent: public wxEvent { -public: - -}; - -//--------------------------------------------------------------------------- - -class wxEraseEvent: public wxEvent { -public: - wxDC *GetDC(); -}; - -//--------------------------------------------------------------------------- - -class wxFocusEvent: public wxEvent { -public: - -}; - -//--------------------------------------------------------------------------- - -class wxActivateEvent: public wxEvent{ -public: - bool GetActive(); -}; - -//--------------------------------------------------------------------------- - -class wxInitDialogEvent: public wxEvent { -public: - -}; - -//--------------------------------------------------------------------------- - -class wxMenuEvent: public wxEvent { -public: - int GetMenuId(); -}; - -//--------------------------------------------------------------------------- - -class wxShowEvent: public wxEvent { -public: - void SetShow(bool show); - bool GetShow(); -}; - -//--------------------------------------------------------------------------- - -class wxIconizeEvent: public wxEvent { -public: -}; - -//--------------------------------------------------------------------------- - -class wxMaximizeEvent: public wxEvent { -public: - -}; - -//--------------------------------------------------------------------------- - -class wxJoystickEvent: public wxEvent { -public: - wxPoint GetPosition(); - int GetZPosition(); - int GetButtonState(); - int GetButtonChange(); - int GetJoystick(); - void SetJoystick(int stick); - void SetButtonState(int state); - void SetButtonChange(int change); - void SetPosition(const wxPoint& pos); - void SetZPosition(int zPos); - bool IsButton(); - bool IsMove(); - bool IsZMove(); - bool ButtonDown(int but = wxJOY_BUTTON_ANY); - bool ButtonUp(int but = wxJOY_BUTTON_ANY); - bool ButtonIsDown(int but = wxJOY_BUTTON_ANY); -}; - -//--------------------------------------------------------------------------- - -class wxDropFilesEvent: public wxEvent { -public: - wxPoint GetPosition(); - int GetNumberOfFiles(); - - %addmethods { - PyObject* GetFiles() { - int count = self->GetNumberOfFiles(); - wxString* files = self->GetFiles(); - PyObject* list = PyList_New(count); - - if (!list) { - PyErr_SetString(PyExc_MemoryError, "Can't allocate list of files!"); - return NULL; - } - - for (int i=0; i -%} - -//---------------------------------------------------------------------- - -%include typemaps.i -%include my_typemaps.i - -// Import some definitions of other classes, etc. -%import _defs.i -%import misc.i - -//--------------------------------------------------------------------------- - -class wxBitmap { -public: - wxBitmap(const wxString& name, long type); - ~wxBitmap(); - -#ifdef __WXMSW__ - void Create(int width, int height, int depth = -1); -#endif - int GetDepth(); - int GetHeight(); - wxPalette* GetPalette(); - wxMask* GetMask(); - int GetWidth(); - bool LoadFile(const wxString& name, long flags); - bool Ok(); - bool SaveFile(const wxString& name, int type, wxPalette* palette = NULL); - void SetDepth(int depth); - void SetHeight(int height); - void SetMask(wxMask* mask); -#ifdef __WXMSW__ - void SetPalette(wxPalette* palette); -#endif - void SetWidth(int width); -}; - -%new wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1); -wxBitmap* wxNoRefBitmap(char* name, long flags); -%{ // Alternate 'constructor' - wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1) { - return new wxBitmap(width, height, depth); - } - - // This one won't own the reference, so Python won't call - // the dtor, this is good for toolbars and such where - // the parent will manage the bitmap. - wxBitmap* wxNoRefBitmap(char* name, long flags) { - return new wxBitmap(name, flags); - } -%} - -//--------------------------------------------------------------------------- - -class wxMask { -public: - wxMask(const wxBitmap& bitmap); - ~wxMask(); -}; - -%new wxMask* wxMaskColour(const wxBitmap& bitmap, const wxColour& colour); -%{ - wxMask* wxMaskColour(const wxBitmap& bitmap, const wxColour& colour) { - return new wxMask(bitmap, colour); - } -%} - - -//--------------------------------------------------------------------------- - - -class wxIcon : public wxBitmap { -public: -#ifdef __WXMSW__ - wxIcon(const wxString& name, long flags, - int desiredWidth = -1, int desiredHeight = -1); -#endif - ~wxIcon(); - - int GetDepth(); - int GetHeight(); - int GetWidth(); - bool LoadFile(const wxString& name, long flags); - bool Ok(); - void SetDepth(int depth); - void SetHeight(int height); - void SetWidth(int width); -}; - -//--------------------------------------------------------------------------- - -class wxCursor : public wxBitmap { -public: -#ifdef __WXMSW__ - wxCursor(const wxString& cursorName, long flags, int hotSpotX=0, int hotSpotY=0); -#endif - ~wxCursor(); - bool Ok(); -}; - -%new wxCursor* wxStockCursor(int id); -%{ // Alternate 'constructor' - wxCursor* wxStockCursor(int id) { - return new wxCursor(id); - } -%} - -//---------------------------------------------------------------------- - -class wxFont { -public: - // I'll do it this way to use long-lived objects and not have to - // worry about when python may delete the object. - %addmethods { - wxFont( int pointSize, int family, int style, int weight, - int underline=FALSE, char* faceName = "") { - - return wxTheFontList->FindOrCreateFont(pointSize, family, style, weight, - underline, faceName); - } - // NO Destructor. - } - - - wxString GetFaceName(); - int GetFamily(); - int GetFontId(); - int GetPointSize(); - int GetStyle(); - bool GetUnderlined(); - int GetWeight(); -#ifdef __WXMSW__ - void SetFaceName(const wxString& faceName); - void SetFamily(int family); - void SetPointSize(int pointSize); - void SetStyle(int style); - void SetUnderlined(bool underlined); - void SetWeight(int weight); -#endif -}; - -//---------------------------------------------------------------------- - -class wxColour { -public: - wxColour(unsigned char red=0, unsigned char green=0, unsigned char blue=0); - ~wxColour(); - unsigned char Red(); - unsigned char Green(); - unsigned char Blue(); - bool Ok(); - void Set(unsigned char red, unsigned char green, unsigned char blue); - %addmethods { - PyObject* Get() { - PyObject* rv = PyTuple_New(3); - PyTuple_SetItem(rv, 0, PyInt_FromLong(self->Red())); - PyTuple_SetItem(rv, 1, PyInt_FromLong(self->Green())); - PyTuple_SetItem(rv, 2, PyInt_FromLong(self->Blue())); - return rv; - } - } -}; - -%new wxColour* wxNamedColour(const wxString& colorName); -%{ // Alternate 'constructor' - wxColour* wxNamedColour(const wxString& colorName) { - return new wxColour(colorName); - } -%} - - -//---------------------------------------------------------------------- - -typedef unsigned long wxDash; - -class wxPen { -public: - // I'll do it this way to use long-lived objects and not have to - // worry about when python may delete the object. - %addmethods { - wxPen(wxColour* colour, int width=1, int style=wxSOLID) { - return wxThePenList->FindOrCreatePen(*colour, width, style); - } - // NO Destructor. - } - - int GetCap(); - wxColour& GetColour(); - -#ifdef __WXMSW__ - // **** This one needs to return a list of ints (wxDash) - int GetDashes(wxDash **dashes); - wxBitmap* GetStipple(); -#endif - int GetJoin(); - int GetStyle(); - int GetWidth(); - bool Ok(); - void SetCap(int cap_style); - void SetColour(wxColour& colour); -#ifdef __WXMSW__ - void SetDashes(int LCOUNT, wxDash* LIST); - void SetStipple(wxBitmap * stipple); -#endif - void SetJoin(int join_style); - void SetStyle(int style); - void SetWidth(int width); -}; - -//---------------------------------------------------------------------- - -class wxBrush { -public: - // I'll do it this way to use long-lived objects and not have to - // worry about when python may delete the object. - %addmethods { - wxBrush(wxColour* colour, int style=wxSOLID) { - return wxTheBrushList->FindOrCreateBrush(*colour, style); - } - // NO Destructor. - } - - wxColour& GetColour(); - wxBitmap * GetStipple(); - int GetStyle(); - bool Ok(); -#ifdef __WXMSW__ - void SetColour(wxColour &colour); - void SetStipple(wxBitmap *bitmap); - void SetStyle(int style); -#endif -}; - -//---------------------------------------------------------------------- - - - -class wxDC { -public: -// wxDC(); **** abstract base class, can't instantiate. - ~wxDC(); - - void BeginDrawing(); - bool Blit(long xdest, long ydest, long width, long height, - wxDC *source, long xsrc, long ysrc, long logical_func); - void Clear(); - void CrossHair(long x, long y); - void DestroyClippingRegion(); - long DeviceToLogicalX(long x); - long DeviceToLogicalXRel(long x); - long DeviceToLogicalY(long y); - long DeviceToLogicalYRel(long y); - void DrawArc(long x1, long y1, long x2, long y2, long xc, long yc); - void DrawEllipse(long x, long y, long width, long height); - void DrawEllipticArc(long x, long y, long width, long height, long start, long end); - void DrawIcon(const wxIcon& icon, long x, long y); - void DrawLine(long x1, long y1, long x2, long y2); - void DrawLines(int LCOUNT, wxPoint* LIST, long xoffset=0, long yoffset=0); - void DrawPolygon(int LCOUNT, wxPoint* LIST, long xoffset=0, long yoffset=0, - int fill_style=wxODDEVEN_RULE); - void DrawPoint(long x, long y); - void DrawRectangle(long x, long y, long width, long height); - void DrawRoundedRectangle(long x, long y, long width, long height, long radius=20); - void DrawSpline(int LCOUNT, wxPoint* LIST); - void DrawText(const wxString& text, long x, long y); - void EndDoc(); - void EndDrawing(); - void EndPage(); -#ifdef __WXWIN__ - void FloodFill(long x, long y, const wxColour& colour, int style=wxFLOOD_SURFACE); -#endif -#ifdef __WXGTK__ - void FloodFill(long x, long y, wxColour* colour, int style=wxFLOOD_SURFACE); -#endif - wxBrush * GetBackground(); - wxBrush * GetBrush(); - long GetCharHeight(); - long GetCharWidth(); - void GetClippingBox(long *OUTPUT, long *OUTPUT, - long *OUTPUT, long *OUTPUT); - wxFont * GetFont(); - int GetLogicalFunction(); - int GetMapMode(); - bool GetOptimization(); - wxPen * GetPen(); - %addmethods { - %new wxColour* GetPixel(long x, long y) { - wxColour* wc = new wxColour(); - self->GetPixel(x, y, wc); - return wc; - } - } - void GetSize(int* OUTPUT, int* OUTPUT); //void GetSize(long* OUTPUT, long* OUTPUT); - wxColour& GetTextBackground(); - void GetTextExtent(const wxString& string, long *OUTPUT, long *OUTPUT, - long *OUTPUT, long *OUTPUT); - wxColour& GetTextForeground(); - long LogicalToDeviceX(long x); - long LogicalToDeviceXRel(long x); - long LogicalToDeviceY(long y); - long LogicalToDeviceYRel(long y); - long MaxX(); - long MaxY(); - long MinX(); - long MinY(); - bool Ok(); - void SetDeviceOrigin(long x, long y); - void SetBackground(const wxBrush& brush); - void SetBackgroundMode(int mode); - void SetClippingRegion(long x, long y, long width, long height); - void SetPalette(const wxPalette& colourMap); - void SetBrush(const wxBrush& brush); - void SetFont(const wxFont& font); - void SetLogicalFunction(int function); - void SetMapMode(int mode); - void SetOptimization(bool optimize); - void SetPen(const wxPen& pen); - void SetTextBackground(const wxColour& colour); - void SetTextForeground(const wxColour& colour); - void SetUserScale(double x_scale, double y_scale); - bool StartDoc(const wxString& message); - void StartPage(); - - - %addmethods { - // This one is my own creation... - void DrawBitmap(wxBitmap* bitmap, long x, long y, bool swapPalette=TRUE) { - wxMemoryDC* memDC = new wxMemoryDC; - memDC->SelectObject(bitmap); - if (swapPalette) - self->SetPalette(bitmap->GetPalette()); - self->Blit(x, y, bitmap->GetWidth(), bitmap->GetHeight(), memDC, - 0, 0, self->GetLogicalFunction()); - memDC->SelectObject(wxNullBitmap); - delete memDC; - } - } -}; - - -//---------------------------------------------------------------------- - -class wxMemoryDC : public wxDC { -public: - wxMemoryDC(); - - void SelectObject(const wxBitmap& bitmap); -} - -%new wxMemoryDC* wxMemoryDCFromDC(wxDC* oldDC); -%{ // Alternate 'constructor' - wxMemoryDC* wxMemoryDCFromDC(wxDC* oldDC) { - return new wxMemoryDC(oldDC); - } -%} - - -//--------------------------------------------------------------------------- - -class wxScreenDC : public wxDC { -public: - wxScreenDC(); - - bool StartDrawingOnTop(wxWindow* window); - %name(StartDrawingOnTopRect) bool StartDrawingOnTop(wxRect* rect = NULL); - bool EndDrawingOnTop(); -}; - -//--------------------------------------------------------------------------- - -class wxClientDC : public wxDC { -public: - wxClientDC(wxWindow* win); -}; - -//--------------------------------------------------------------------------- - -class wxPaintDC : public wxDC { -public: - wxPaintDC(wxWindow* win); -}; - -//--------------------------------------------------------------------------- - -class wxPostScriptDC : public wxDC { -public: - wxPostScriptDC(const wxString& output, bool interactive = TRUE, wxWindow* win = NULL); -}; - -//--------------------------------------------------------------------------- - -#ifdef __WXMSW__ -class wxPrinterDC : public wxDC { -public: - wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, - bool interactive = TRUE, int orientation = wxPORTRAIT); -}; -#endif - -//--------------------------------------------------------------------------- - -#ifdef __WXMSW__ -class wxMetaFileDC : public wxDC { -public: - wxMetaFileDC(const wxString& filename = wxPyEmptyStr); - wxMetaFile* Close(); -}; -#endif - -//--------------------------------------------------------------------------- -//--------------------------------------------------------------------------- - - -%readonly -extern wxFont *wxNORMAL_FONT; -extern wxFont *wxSMALL_FONT; -extern wxFont *wxITALIC_FONT; -extern wxFont *wxSWISS_FONT; -extern wxPen *wxRED_PEN; - -extern wxPen *wxCYAN_PEN; -extern wxPen *wxGREEN_PEN; -extern wxPen *wxBLACK_PEN; -extern wxPen *wxWHITE_PEN; -extern wxPen *wxTRANSPARENT_PEN; -extern wxPen *wxBLACK_DASHED_PEN; -extern wxPen *wxGREY_PEN; -extern wxPen *wxMEDIUM_GREY_PEN; -extern wxPen *wxLIGHT_GREY_PEN; - -extern wxBrush *wxBLUE_BRUSH; -extern wxBrush *wxGREEN_BRUSH; -extern wxBrush *wxWHITE_BRUSH; -extern wxBrush *wxBLACK_BRUSH; -extern wxBrush *wxTRANSPARENT_BRUSH; -extern wxBrush *wxCYAN_BRUSH; -extern wxBrush *wxRED_BRUSH; -extern wxBrush *wxGREY_BRUSH; -extern wxBrush *wxMEDIUM_GREY_BRUSH; -extern wxBrush *wxLIGHT_GREY_BRUSH; - -extern wxColour *wxBLACK; -extern wxColour *wxWHITE; -extern wxColour *wxRED; -extern wxColour *wxBLUE; -extern wxColour *wxGREEN; -extern wxColour *wxCYAN; -extern wxColour *wxLIGHT_GREY; - -extern wxCursor *wxSTANDARD_CURSOR; -extern wxCursor *wxHOURGLASS_CURSOR; -extern wxCursor *wxCROSS_CURSOR; - -extern wxBitmap wxNullBitmap; -extern wxIcon wxNullIcon; -extern wxCursor wxNullCursor; -extern wxPen wxNullPen; -extern wxBrush wxNullBrush; -extern wxPalette wxNullPalette; -extern wxFont wxNullFont; -extern wxColour wxNullColour; - -//--------------------------------------------------------------------------- - -///////////////////////////////////////////////////////////////////////////// -// -// $Log$ -// Revision 1.3 1998/08/18 19:48:16 RD -// more wxGTK compatibility things. -// -// It builds now but there are serious runtime problems... -// -// Revision 1.2 1998/08/15 07:36:35 RD -// - Moved the header in the .i files out of the code that gets put into -// the .cpp files. It caused CVS conflicts because of the RCS ID being -// different each time. -// -// - A few minor fixes. -// -// Revision 1.1 1998/08/09 08:25:50 RD -// Initial version -// -// diff --git a/utils/wxPython/src/gtk/cmndlgs.cpp b/utils/wxPython/src/gtk/cmndlgs.cpp deleted file mode 100644 index e63efefa0a..0000000000 --- a/utils/wxPython/src/gtk/cmndlgs.cpp +++ /dev/null @@ -1,2072 +0,0 @@ -/* - * FILE : gtk/cmndlgs.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif - -#define SWIG_init initcmndlgsc - -#define SWIG_name "cmndlgsc" - -#include "helpers.h" -#include -#include -#include -#include - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; -#define new_wxColourData() (new wxColourData()) -static PyObject *_wrap_new_wxColourData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColourData * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxColourData")) - return NULL; - _result = (wxColourData *)new_wxColourData(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColourData_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxColourData(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxColourData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColourData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxColourData",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColourData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxColourData. Expected _wxColourData_p."); - return NULL; - } - } - delete_wxColourData(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxColourData_GetChooseFull(_swigobj) (_swigobj->GetChooseFull()) -static PyObject *_wrap_wxColourData_GetChooseFull(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxColourData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxColourData_GetChooseFull",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColourData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourData_GetChooseFull. Expected _wxColourData_p."); - return NULL; - } - } - _result = (bool )wxColourData_GetChooseFull(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxColourData_GetColour(_swigobj) (_swigobj->GetColour()) -static PyObject *_wrap_wxColourData_GetColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxColourData * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxColourData_GetColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColourData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourData_GetColour. Expected _wxColourData_p."); - return NULL; - } - } - wxColour & _result_ref = wxColourData_GetColour(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxColourData_GetCustomColour(_swigobj,_swigarg0) (_swigobj->GetCustomColour(_swigarg0)) -static PyObject *_wrap_wxColourData_GetCustomColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxColourData * _arg0; - int _arg1; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxColourData_GetCustomColour",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColourData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourData_GetCustomColour. Expected _wxColourData_p."); - return NULL; - } - } - _result = new wxColour (wxColourData_GetCustomColour(_arg0,_arg1)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxColourData_SetChooseFull(_swigobj,_swigarg0) (_swigobj->SetChooseFull(_swigarg0)) -static PyObject *_wrap_wxColourData_SetChooseFull(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColourData * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxColourData_SetChooseFull",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColourData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourData_SetChooseFull. Expected _wxColourData_p."); - return NULL; - } - } - wxColourData_SetChooseFull(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxColourData_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0)) -static PyObject *_wrap_wxColourData_SetColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColourData * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxColourData_SetColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColourData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourData_SetColour. Expected _wxColourData_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxColourData_SetColour. Expected _wxColour_p."); - return NULL; - } - } - wxColourData_SetColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxColourData_SetCustomColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetCustomColour(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxColourData_SetCustomColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColourData * _arg0; - int _arg1; - wxColour * _arg2; - char * _argc0 = 0; - char * _argc2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sis:wxColourData_SetCustomColour",&_argc0,&_arg1,&_argc2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColourData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourData_SetCustomColour. Expected _wxColourData_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxColourData_SetCustomColour. Expected _wxColour_p."); - return NULL; - } - } - wxColourData_SetCustomColour(_arg0,_arg1,*_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxColourDialogTowxDialog(void *ptr) { - wxColourDialog *src; - wxDialog *dest; - src = (wxColourDialog *) ptr; - dest = (wxDialog *) src; - return (void *) dest; -} - -static void *SwigwxColourDialogTowxPanel(void *ptr) { - wxColourDialog *src; - wxPanel *dest; - src = (wxColourDialog *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxColourDialogTowxWindow(void *ptr) { - wxColourDialog *src; - wxWindow *dest; - src = (wxColourDialog *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxColourDialogTowxEvtHandler(void *ptr) { - wxColourDialog *src; - wxEvtHandler *dest; - src = (wxColourDialog *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxColourDialog(_swigarg0,_swigarg1) (new wxColourDialog(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxColourDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColourDialog * _result; - wxWindow * _arg0; - wxColourData * _arg1 = NULL; - char * _argc0 = 0; - char * _argc1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|s:new_wxColourDialog",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxColourDialog. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColourData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxColourDialog. Expected _wxColourData_p."); - return NULL; - } - } - _result = (wxColourDialog *)new_wxColourDialog(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColourDialog_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxColourDialog_GetColourData(_swigobj) (_swigobj->GetColourData()) -static PyObject *_wrap_wxColourDialog_GetColourData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColourData * _result; - wxColourDialog * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxColourDialog_GetColourData",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColourDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourDialog_GetColourData. Expected _wxColourDialog_p."); - return NULL; - } - } - _result = new wxColourData (wxColourDialog_GetColourData(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxColourData_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxColourDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) -static PyObject *_wrap_wxColourDialog_ShowModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxColourDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxColourDialog_ShowModal",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColourDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourDialog_ShowModal. Expected _wxColourDialog_p."); - return NULL; - } - } - _result = (int )wxColourDialog_ShowModal(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxFileDialogTowxDialog(void *ptr) { - wxFileDialog *src; - wxDialog *dest; - src = (wxFileDialog *) ptr; - dest = (wxDialog *) src; - return (void *) dest; -} - -static void *SwigwxFileDialogTowxPanel(void *ptr) { - wxFileDialog *src; - wxPanel *dest; - src = (wxFileDialog *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxFileDialogTowxWindow(void *ptr) { - wxFileDialog *src; - wxWindow *dest; - src = (wxFileDialog *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxFileDialogTowxEvtHandler(void *ptr) { - wxFileDialog *src; - wxEvtHandler *dest; - src = (wxFileDialog *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxFileDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxFileDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxFileDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFileDialog * _result; - wxWindow * _arg0; - char * _arg1 = "Choose a file"; - char * _arg2 = ""; - char * _arg3 = ""; - char * _arg4 = "*.*"; - long _arg5 = 0; - wxPoint * _arg6 = &wxPyDefaultPosition; - char * _argc0 = 0; - char * _argc6 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|ssssls:new_wxFileDialog",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_argc6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxFileDialog. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc6) { - if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxFileDialog. Expected _wxPoint_p."); - return NULL; - } - } - _result = (wxFileDialog *)new_wxFileDialog(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFileDialog_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxFileDialog_GetDirectory(_swigobj) (_swigobj->GetDirectory()) -static PyObject *_wrap_wxFileDialog_GetDirectory(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxFileDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFileDialog_GetDirectory",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetDirectory. Expected _wxFileDialog_p."); - return NULL; - } - } - _result = new wxString (wxFileDialog_GetDirectory(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxFileDialog_GetFilename(_swigobj) (_swigobj->GetFilename()) -static PyObject *_wrap_wxFileDialog_GetFilename(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxFileDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFileDialog_GetFilename",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetFilename. Expected _wxFileDialog_p."); - return NULL; - } - } - _result = new wxString (wxFileDialog_GetFilename(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxFileDialog_GetFilterIndex(_swigobj) (_swigobj->GetFilterIndex()) -static PyObject *_wrap_wxFileDialog_GetFilterIndex(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxFileDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFileDialog_GetFilterIndex",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetFilterIndex. Expected _wxFileDialog_p."); - return NULL; - } - } - _result = (int )wxFileDialog_GetFilterIndex(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFileDialog_GetMessage(_swigobj) (_swigobj->GetMessage()) -static PyObject *_wrap_wxFileDialog_GetMessage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxFileDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFileDialog_GetMessage",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetMessage. Expected _wxFileDialog_p."); - return NULL; - } - } - _result = new wxString (wxFileDialog_GetMessage(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxFileDialog_GetPath(_swigobj) (_swigobj->GetPath()) -static PyObject *_wrap_wxFileDialog_GetPath(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxFileDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFileDialog_GetPath",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetPath. Expected _wxFileDialog_p."); - return NULL; - } - } - _result = new wxString (wxFileDialog_GetPath(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxFileDialog_GetStyle(_swigobj) (_swigobj->GetStyle()) -static PyObject *_wrap_wxFileDialog_GetStyle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxFileDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFileDialog_GetStyle",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetStyle. Expected _wxFileDialog_p."); - return NULL; - } - } - _result = (long )wxFileDialog_GetStyle(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxFileDialog_GetWildcard(_swigobj) (_swigobj->GetWildcard()) -static PyObject *_wrap_wxFileDialog_GetWildcard(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxFileDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFileDialog_GetWildcard",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetWildcard. Expected _wxFileDialog_p."); - return NULL; - } - } - _result = new wxString (wxFileDialog_GetWildcard(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxFileDialog_SetDirectory(_swigobj,_swigarg0) (_swigobj->SetDirectory(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetDirectory(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFileDialog * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxFileDialog_SetDirectory",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetDirectory. Expected _wxFileDialog_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxFileDialog_SetDirectory(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxFileDialog_SetFilename(_swigobj,_swigarg0) (_swigobj->SetFilename(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetFilename(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFileDialog * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxFileDialog_SetFilename",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetFilename. Expected _wxFileDialog_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxFileDialog_SetFilename(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxFileDialog_SetFilterIndex(_swigobj,_swigarg0) (_swigobj->SetFilterIndex(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetFilterIndex(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFileDialog * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxFileDialog_SetFilterIndex",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetFilterIndex. Expected _wxFileDialog_p."); - return NULL; - } - } - wxFileDialog_SetFilterIndex(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFileDialog_SetMessage(_swigobj,_swigarg0) (_swigobj->SetMessage(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetMessage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFileDialog * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxFileDialog_SetMessage",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetMessage. Expected _wxFileDialog_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxFileDialog_SetMessage(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxFileDialog_SetPath(_swigobj,_swigarg0) (_swigobj->SetPath(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetPath(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFileDialog * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxFileDialog_SetPath",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetPath. Expected _wxFileDialog_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxFileDialog_SetPath(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxFileDialog_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetStyle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFileDialog * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxFileDialog_SetStyle",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetStyle. Expected _wxFileDialog_p."); - return NULL; - } - } - wxFileDialog_SetStyle(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFileDialog_SetWildcard(_swigobj,_swigarg0) (_swigobj->SetWildcard(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetWildcard(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFileDialog * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxFileDialog_SetWildcard",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetWildcard. Expected _wxFileDialog_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxFileDialog_SetWildcard(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxFileDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) -static PyObject *_wrap_wxFileDialog_ShowModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxFileDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFileDialog_ShowModal",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_ShowModal. Expected _wxFileDialog_p."); - return NULL; - } - } - _result = (int )wxFileDialog_ShowModal(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxSingleChoiceDialogTowxDialog(void *ptr) { - wxSingleChoiceDialog *src; - wxDialog *dest; - src = (wxSingleChoiceDialog *) ptr; - dest = (wxDialog *) src; - return (void *) dest; -} - -static void *SwigwxSingleChoiceDialogTowxPanel(void *ptr) { - wxSingleChoiceDialog *src; - wxPanel *dest; - src = (wxSingleChoiceDialog *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxSingleChoiceDialogTowxWindow(void *ptr) { - wxSingleChoiceDialog *src; - wxWindow *dest; - src = (wxSingleChoiceDialog *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxSingleChoiceDialogTowxEvtHandler(void *ptr) { - wxSingleChoiceDialog *src; - wxEvtHandler *dest; - src = (wxSingleChoiceDialog *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -static wxSingleChoiceDialog *new_wxSingleChoiceDialog(wxWindow *parent,wxString *message,wxString *caption,int LCOUNT,wxString *LIST,long style,wxPoint *pos) { - return new wxSingleChoiceDialog(parent, *message, *caption, - LCOUNT, LIST, NULL, style, *pos); - } - -static PyObject *_wrap_new_wxSingleChoiceDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSingleChoiceDialog * _result; - wxWindow * _arg0; - wxString * _arg1; - wxString * _arg2; - int _arg3; - wxString * _arg4; - long _arg5 = (wxOK)|(wxCANCEL)|(wxCENTRE); - wxPoint * _arg6 = &wxPyDefaultPosition; - char * _argc0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj2 = 0; - PyObject * _obj4 = 0; - char * _argc6 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sOOO|ls:new_wxSingleChoiceDialog",&_argc0,&_obj1,&_obj2,&_obj4,&_arg5,&_argc6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxSingleChoiceDialog. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_obj4) -{ - _arg4 = wxString_LIST_helper(_obj4); - if (_arg4 == NULL) { - return NULL; - } -} - if (_argc6) { - if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxSingleChoiceDialog. Expected _wxPoint_p."); - return NULL; - } - } -{ - _arg3 = PyList_Size(_obj4); -} - _result = (wxSingleChoiceDialog *)new_wxSingleChoiceDialog(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxSingleChoiceDialog_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj1) - delete _arg1; -} -{ - if (_obj2) - delete _arg2; -} -{ - delete [] _arg4; -} - return _resultobj; -} - -#define wxSingleChoiceDialog_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxSingleChoiceDialog_GetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSingleChoiceDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSingleChoiceDialog_GetSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSingleChoiceDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSingleChoiceDialog_GetSelection. Expected _wxSingleChoiceDialog_p."); - return NULL; - } - } - _result = (int )wxSingleChoiceDialog_GetSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSingleChoiceDialog_GetStringSelection(_swigobj) (_swigobj->GetStringSelection()) -static PyObject *_wrap_wxSingleChoiceDialog_GetStringSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxSingleChoiceDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSingleChoiceDialog_GetStringSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSingleChoiceDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSingleChoiceDialog_GetStringSelection. Expected _wxSingleChoiceDialog_p."); - return NULL; - } - } - _result = new wxString (wxSingleChoiceDialog_GetStringSelection(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxSingleChoiceDialog_SetSelection(_swigobj,_swigarg0) (_swigobj->SetSelection(_swigarg0)) -static PyObject *_wrap_wxSingleChoiceDialog_SetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSingleChoiceDialog * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxSingleChoiceDialog_SetSelection",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSingleChoiceDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSingleChoiceDialog_SetSelection. Expected _wxSingleChoiceDialog_p."); - return NULL; - } - } - wxSingleChoiceDialog_SetSelection(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSingleChoiceDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) -static PyObject *_wrap_wxSingleChoiceDialog_ShowModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSingleChoiceDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSingleChoiceDialog_ShowModal",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSingleChoiceDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSingleChoiceDialog_ShowModal. Expected _wxSingleChoiceDialog_p."); - return NULL; - } - } - _result = (int )wxSingleChoiceDialog_ShowModal(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxTextEntryDialogTowxDialog(void *ptr) { - wxTextEntryDialog *src; - wxDialog *dest; - src = (wxTextEntryDialog *) ptr; - dest = (wxDialog *) src; - return (void *) dest; -} - -static void *SwigwxTextEntryDialogTowxPanel(void *ptr) { - wxTextEntryDialog *src; - wxPanel *dest; - src = (wxTextEntryDialog *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxTextEntryDialogTowxWindow(void *ptr) { - wxTextEntryDialog *src; - wxWindow *dest; - src = (wxTextEntryDialog *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxTextEntryDialogTowxEvtHandler(void *ptr) { - wxTextEntryDialog *src; - wxEvtHandler *dest; - src = (wxTextEntryDialog *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxTextEntryDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxTextEntryDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_new_wxTextEntryDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextEntryDialog * _result; - wxWindow * _arg0; - char * _arg1; - char * _arg2 = "Input Text"; - char * _arg3 = ""; - long _arg4 = (wxOK)|(wxCANCEL)|(wxCENTRE); - wxPoint * _arg5 = &wxPyDefaultPosition; - char * _argc0 = 0; - char * _argc5 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"ss|ssls:new_wxTextEntryDialog",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_argc5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxTextEntryDialog. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc5) { - if (SWIG_GetPtr(_argc5,(void **) &_arg5,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of new_wxTextEntryDialog. Expected _wxPoint_p."); - return NULL; - } - } - _result = (wxTextEntryDialog *)new_wxTextEntryDialog(_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextEntryDialog_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxTextEntryDialog_GetValue(_swigobj) (_swigobj->GetValue()) -static PyObject *_wrap_wxTextEntryDialog_GetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxTextEntryDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextEntryDialog_GetValue",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextEntryDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextEntryDialog_GetValue. Expected _wxTextEntryDialog_p."); - return NULL; - } - } - _result = new wxString (wxTextEntryDialog_GetValue(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxTextEntryDialog_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) -static PyObject *_wrap_wxTextEntryDialog_SetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextEntryDialog * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxTextEntryDialog_SetValue",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextEntryDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextEntryDialog_SetValue. Expected _wxTextEntryDialog_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxTextEntryDialog_SetValue(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxTextEntryDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) -static PyObject *_wrap_wxTextEntryDialog_ShowModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTextEntryDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextEntryDialog_ShowModal",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextEntryDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextEntryDialog_ShowModal. Expected _wxTextEntryDialog_p."); - return NULL; - } - } - _result = (int )wxTextEntryDialog_ShowModal(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define new_wxFontData() (new wxFontData()) -static PyObject *_wrap_new_wxFontData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontData * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxFontData")) - return NULL; - _result = (wxFontData *)new_wxFontData(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFontData_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxFontData(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxFontData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxFontData",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxFontData. Expected _wxFontData_p."); - return NULL; - } - } - delete_wxFontData(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontData_EnableEffects(_swigobj,_swigarg0) (_swigobj->EnableEffects(_swigarg0)) -static PyObject *_wrap_wxFontData_EnableEffects(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontData * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxFontData_EnableEffects",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_EnableEffects. Expected _wxFontData_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxFontData_EnableEffects(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontData_GetAllowSymbols(_swigobj) (_swigobj->GetAllowSymbols()) -static PyObject *_wrap_wxFontData_GetAllowSymbols(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxFontData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFontData_GetAllowSymbols",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_GetAllowSymbols. Expected _wxFontData_p."); - return NULL; - } - } - _result = (bool )wxFontData_GetAllowSymbols(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFontData_GetColour(_swigobj) (_swigobj->GetColour()) -static PyObject *_wrap_wxFontData_GetColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxFontData * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFontData_GetColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_GetColour. Expected _wxFontData_p."); - return NULL; - } - } - wxColour & _result_ref = wxFontData_GetColour(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxFontData_GetChosenFont(_swigobj) (_swigobj->GetChosenFont()) -static PyObject *_wrap_wxFontData_GetChosenFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _result; - wxFontData * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFontData_GetChosenFont",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_GetChosenFont. Expected _wxFontData_p."); - return NULL; - } - } - _result = new wxFont (wxFontData_GetChosenFont(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxFontData_GetEnableEffects(_swigobj) (_swigobj->GetEnableEffects()) -static PyObject *_wrap_wxFontData_GetEnableEffects(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxFontData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFontData_GetEnableEffects",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_GetEnableEffects. Expected _wxFontData_p."); - return NULL; - } - } - _result = (bool )wxFontData_GetEnableEffects(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFontData_GetInitialFont(_swigobj) (_swigobj->GetInitialFont()) -static PyObject *_wrap_wxFontData_GetInitialFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _result; - wxFontData * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFontData_GetInitialFont",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_GetInitialFont. Expected _wxFontData_p."); - return NULL; - } - } - _result = new wxFont (wxFontData_GetInitialFont(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxFontData_GetShowHelp(_swigobj) (_swigobj->GetShowHelp()) -static PyObject *_wrap_wxFontData_GetShowHelp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxFontData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFontData_GetShowHelp",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_GetShowHelp. Expected _wxFontData_p."); - return NULL; - } - } - _result = (bool )wxFontData_GetShowHelp(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFontData_SetAllowSymbols(_swigobj,_swigarg0) (_swigobj->SetAllowSymbols(_swigarg0)) -static PyObject *_wrap_wxFontData_SetAllowSymbols(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontData * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxFontData_SetAllowSymbols",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_SetAllowSymbols. Expected _wxFontData_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxFontData_SetAllowSymbols(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontData_SetChosenFont(_swigobj,_swigarg0) (_swigobj->SetChosenFont(_swigarg0)) -static PyObject *_wrap_wxFontData_SetChosenFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontData * _arg0; - wxFont * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxFontData_SetChosenFont",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_SetChosenFont. Expected _wxFontData_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontData_SetChosenFont. Expected _wxFont_p."); - return NULL; - } - } - wxFontData_SetChosenFont(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontData_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0)) -static PyObject *_wrap_wxFontData_SetColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontData * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxFontData_SetColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_SetColour. Expected _wxFontData_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontData_SetColour. Expected _wxColour_p."); - return NULL; - } - } - wxFontData_SetColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontData_SetInitialFont(_swigobj,_swigarg0) (_swigobj->SetInitialFont(_swigarg0)) -static PyObject *_wrap_wxFontData_SetInitialFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontData * _arg0; - wxFont * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxFontData_SetInitialFont",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_SetInitialFont. Expected _wxFontData_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontData_SetInitialFont. Expected _wxFont_p."); - return NULL; - } - } - wxFontData_SetInitialFont(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontData_SetRange(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRange(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxFontData_SetRange(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontData * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxFontData_SetRange",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_SetRange. Expected _wxFontData_p."); - return NULL; - } - } - wxFontData_SetRange(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontData_SetShowHelp(_swigobj,_swigarg0) (_swigobj->SetShowHelp(_swigarg0)) -static PyObject *_wrap_wxFontData_SetShowHelp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontData * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxFontData_SetShowHelp",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_SetShowHelp. Expected _wxFontData_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxFontData_SetShowHelp(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxFontDialogTowxDialog(void *ptr) { - wxFontDialog *src; - wxDialog *dest; - src = (wxFontDialog *) ptr; - dest = (wxDialog *) src; - return (void *) dest; -} - -static void *SwigwxFontDialogTowxPanel(void *ptr) { - wxFontDialog *src; - wxPanel *dest; - src = (wxFontDialog *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxFontDialogTowxWindow(void *ptr) { - wxFontDialog *src; - wxWindow *dest; - src = (wxFontDialog *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxFontDialogTowxEvtHandler(void *ptr) { - wxFontDialog *src; - wxEvtHandler *dest; - src = (wxFontDialog *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxFontDialog(_swigarg0,_swigarg1) (new wxFontDialog(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxFontDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontDialog * _result; - wxWindow * _arg0; - wxFontData * _arg1 = NULL; - char * _argc0 = 0; - char * _argc1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|s:new_wxFontDialog",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxFontDialog. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxFontDialog. Expected _wxFontData_p."); - return NULL; - } - } - _result = (wxFontDialog *)new_wxFontDialog(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFontDialog_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxFontDialog_GetFontData(_swigobj) (_swigobj->GetFontData()) -static PyObject *_wrap_wxFontDialog_GetFontData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontData * _result; - wxFontDialog * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFontDialog_GetFontData",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontDialog_GetFontData. Expected _wxFontDialog_p."); - return NULL; - } - } - wxFontData & _result_ref = wxFontDialog_GetFontData(_arg0); - _result = (wxFontData *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFontData_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxFontDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) -static PyObject *_wrap_wxFontDialog_ShowModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxFontDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFontDialog_ShowModal",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontDialog_ShowModal. Expected _wxFontDialog_p."); - return NULL; - } - } - _result = (int )wxFontDialog_ShowModal(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxMessageDialogTowxDialog(void *ptr) { - wxMessageDialog *src; - wxDialog *dest; - src = (wxMessageDialog *) ptr; - dest = (wxDialog *) src; - return (void *) dest; -} - -static void *SwigwxMessageDialogTowxPanel(void *ptr) { - wxMessageDialog *src; - wxPanel *dest; - src = (wxMessageDialog *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxMessageDialogTowxWindow(void *ptr) { - wxMessageDialog *src; - wxWindow *dest; - src = (wxMessageDialog *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxMessageDialogTowxEvtHandler(void *ptr) { - wxMessageDialog *src; - wxEvtHandler *dest; - src = (wxMessageDialog *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxMessageDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxMessageDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_new_wxMessageDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMessageDialog * _result; - wxWindow * _arg0; - char * _arg1; - char * _arg2 = "Message box"; - long _arg3 = (wxOK)|(wxCANCEL)|(wxCENTRE); - wxPoint * _arg4 = &wxPyDefaultPosition; - char * _argc0 = 0; - char * _argc4 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"ss|sls:new_wxMessageDialog",&_argc0,&_arg1,&_arg2,&_arg3,&_argc4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxMessageDialog. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxMessageDialog. Expected _wxPoint_p."); - return NULL; - } - } - _result = (wxMessageDialog *)new_wxMessageDialog(_arg0,_arg1,_arg2,_arg3,*_arg4); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMessageDialog_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMessageDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) -static PyObject *_wrap_wxMessageDialog_ShowModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxMessageDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMessageDialog_ShowModal",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMessageDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMessageDialog_ShowModal. Expected _wxMessageDialog_p."); - return NULL; - } - } - _result = (int )wxMessageDialog_ShowModal(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyMethodDef cmndlgscMethods[] = { - { "wxMessageDialog_ShowModal", _wrap_wxMessageDialog_ShowModal, 1 }, - { "new_wxMessageDialog", _wrap_new_wxMessageDialog, 1 }, - { "wxFontDialog_ShowModal", _wrap_wxFontDialog_ShowModal, 1 }, - { "wxFontDialog_GetFontData", _wrap_wxFontDialog_GetFontData, 1 }, - { "new_wxFontDialog", _wrap_new_wxFontDialog, 1 }, - { "wxFontData_SetShowHelp", _wrap_wxFontData_SetShowHelp, 1 }, - { "wxFontData_SetRange", _wrap_wxFontData_SetRange, 1 }, - { "wxFontData_SetInitialFont", _wrap_wxFontData_SetInitialFont, 1 }, - { "wxFontData_SetColour", _wrap_wxFontData_SetColour, 1 }, - { "wxFontData_SetChosenFont", _wrap_wxFontData_SetChosenFont, 1 }, - { "wxFontData_SetAllowSymbols", _wrap_wxFontData_SetAllowSymbols, 1 }, - { "wxFontData_GetShowHelp", _wrap_wxFontData_GetShowHelp, 1 }, - { "wxFontData_GetInitialFont", _wrap_wxFontData_GetInitialFont, 1 }, - { "wxFontData_GetEnableEffects", _wrap_wxFontData_GetEnableEffects, 1 }, - { "wxFontData_GetChosenFont", _wrap_wxFontData_GetChosenFont, 1 }, - { "wxFontData_GetColour", _wrap_wxFontData_GetColour, 1 }, - { "wxFontData_GetAllowSymbols", _wrap_wxFontData_GetAllowSymbols, 1 }, - { "wxFontData_EnableEffects", _wrap_wxFontData_EnableEffects, 1 }, - { "delete_wxFontData", _wrap_delete_wxFontData, 1 }, - { "new_wxFontData", _wrap_new_wxFontData, 1 }, - { "wxTextEntryDialog_ShowModal", _wrap_wxTextEntryDialog_ShowModal, 1 }, - { "wxTextEntryDialog_SetValue", _wrap_wxTextEntryDialog_SetValue, 1 }, - { "wxTextEntryDialog_GetValue", _wrap_wxTextEntryDialog_GetValue, 1 }, - { "new_wxTextEntryDialog", _wrap_new_wxTextEntryDialog, 1 }, - { "wxSingleChoiceDialog_ShowModal", _wrap_wxSingleChoiceDialog_ShowModal, 1 }, - { "wxSingleChoiceDialog_SetSelection", _wrap_wxSingleChoiceDialog_SetSelection, 1 }, - { "wxSingleChoiceDialog_GetStringSelection", _wrap_wxSingleChoiceDialog_GetStringSelection, 1 }, - { "wxSingleChoiceDialog_GetSelection", _wrap_wxSingleChoiceDialog_GetSelection, 1 }, - { "new_wxSingleChoiceDialog", _wrap_new_wxSingleChoiceDialog, 1 }, - { "wxFileDialog_ShowModal", _wrap_wxFileDialog_ShowModal, 1 }, - { "wxFileDialog_SetWildcard", _wrap_wxFileDialog_SetWildcard, 1 }, - { "wxFileDialog_SetStyle", _wrap_wxFileDialog_SetStyle, 1 }, - { "wxFileDialog_SetPath", _wrap_wxFileDialog_SetPath, 1 }, - { "wxFileDialog_SetMessage", _wrap_wxFileDialog_SetMessage, 1 }, - { "wxFileDialog_SetFilterIndex", _wrap_wxFileDialog_SetFilterIndex, 1 }, - { "wxFileDialog_SetFilename", _wrap_wxFileDialog_SetFilename, 1 }, - { "wxFileDialog_SetDirectory", _wrap_wxFileDialog_SetDirectory, 1 }, - { "wxFileDialog_GetWildcard", _wrap_wxFileDialog_GetWildcard, 1 }, - { "wxFileDialog_GetStyle", _wrap_wxFileDialog_GetStyle, 1 }, - { "wxFileDialog_GetPath", _wrap_wxFileDialog_GetPath, 1 }, - { "wxFileDialog_GetMessage", _wrap_wxFileDialog_GetMessage, 1 }, - { "wxFileDialog_GetFilterIndex", _wrap_wxFileDialog_GetFilterIndex, 1 }, - { "wxFileDialog_GetFilename", _wrap_wxFileDialog_GetFilename, 1 }, - { "wxFileDialog_GetDirectory", _wrap_wxFileDialog_GetDirectory, 1 }, - { "new_wxFileDialog", _wrap_new_wxFileDialog, 1 }, - { "wxColourDialog_ShowModal", _wrap_wxColourDialog_ShowModal, 1 }, - { "wxColourDialog_GetColourData", _wrap_wxColourDialog_GetColourData, 1 }, - { "new_wxColourDialog", _wrap_new_wxColourDialog, 1 }, - { "wxColourData_SetCustomColour", _wrap_wxColourData_SetCustomColour, 1 }, - { "wxColourData_SetColour", _wrap_wxColourData_SetColour, 1 }, - { "wxColourData_SetChooseFull", _wrap_wxColourData_SetChooseFull, 1 }, - { "wxColourData_GetCustomColour", _wrap_wxColourData_GetCustomColour, 1 }, - { "wxColourData_GetColour", _wrap_wxColourData_GetColour, 1 }, - { "wxColourData_GetChooseFull", _wrap_wxColourData_GetChooseFull, 1 }, - { "delete_wxColourData", _wrap_delete_wxColourData, 1 }, - { "new_wxColourData", _wrap_new_wxColourData, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initcmndlgsc)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("cmndlgsc", cmndlgscMethods); - d = PyModule_GetDict(m); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_wxFontData","_class_wxFontData",0); - SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMessageDialog",SwigwxMessageDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxMessageDialog",SwigwxMessageDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxFontDialog",SwigwxFontDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxFontDialog",SwigwxFontDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxTextEntryDialog",SwigwxTextEntryDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxTextEntryDialog",SwigwxTextEntryDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxFileDialog",SwigwxFileDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxFileDialog",SwigwxFileDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxColourDialog",SwigwxColourDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxColourDialog",SwigwxColourDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxEvtHandler",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); - SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); - SWIG_RegisterMapping("_class_wxColourData","_wxColourData",0); - SWIG_RegisterMapping("_wxPen","_class_wxPen",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_long","_wxDash",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_wxDC","_class_wxDC",0); - SWIG_RegisterMapping("_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_class_wxMenuItem","_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxPanel","_class_wxMessageDialog",SwigwxMessageDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_wxMessageDialog",SwigwxMessageDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_class_wxFontDialog",SwigwxFontDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_wxFontDialog",SwigwxFontDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_class_wxTextEntryDialog",SwigwxTextEntryDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_wxTextEntryDialog",SwigwxTextEntryDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_class_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_class_wxFileDialog",SwigwxFileDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_wxFileDialog",SwigwxFileDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_class_wxColourDialog",SwigwxColourDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_wxColourDialog",SwigwxColourDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_class_wxPanel",0); - SWIG_RegisterMapping("_class_wxMask","_wxMask",0); - SWIG_RegisterMapping("_wxColour","_class_wxColour",0); - SWIG_RegisterMapping("_class_wxDialog","_class_wxMessageDialog",SwigwxMessageDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_wxMessageDialog",SwigwxMessageDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_class_wxFontDialog",SwigwxFontDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_wxFontDialog",SwigwxFontDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_class_wxTextEntryDialog",SwigwxTextEntryDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_wxTextEntryDialog",SwigwxTextEntryDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_class_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_class_wxFileDialog",SwigwxFileDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_wxFileDialog",SwigwxFileDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_class_wxColourDialog",SwigwxColourDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_wxColourDialog",SwigwxColourDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_wxDialog",0); - SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_class_wxFontData","_wxFontData",0); - SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_wxColourDialog","_class_wxColourDialog",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxMessageDialog","_class_wxMessageDialog",0); - SWIG_RegisterMapping("_wxTextEntryDialog","_class_wxTextEntryDialog",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_wxFont","_class_wxFont",0); - SWIG_RegisterMapping("_unsigned_long","_wxDash",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxDC","_wxDC",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_class_wxPanel","_class_wxMessageDialog",SwigwxMessageDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxMessageDialog",SwigwxMessageDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_class_wxFontDialog",SwigwxFontDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxFontDialog",SwigwxFontDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_class_wxTextEntryDialog",SwigwxTextEntryDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxTextEntryDialog",SwigwxTextEntryDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_class_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_class_wxFileDialog",SwigwxFileDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxFileDialog",SwigwxFileDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_class_wxColourDialog",SwigwxColourDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxColourDialog",SwigwxColourDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxPanel",0); - SWIG_RegisterMapping("_class_wxMessageDialog","_wxMessageDialog",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxMenu","_class_wxMenu",0); - SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_wxFileDialog","_class_wxFileDialog",0); - SWIG_RegisterMapping("_class_wxBrush","_wxBrush",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxWindow","_class_wxMessageDialog",SwigwxMessageDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxMessageDialog",SwigwxMessageDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxFontDialog",SwigwxFontDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxFontDialog",SwigwxFontDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxTextEntryDialog",SwigwxTextEntryDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxTextEntryDialog",SwigwxTextEntryDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxFileDialog",SwigwxFileDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxFileDialog",SwigwxFileDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxColourDialog",SwigwxColourDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxColourDialog",SwigwxColourDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxWindow",0); - SWIG_RegisterMapping("_class_wxFont","_wxFont",0); - SWIG_RegisterMapping("_wxClientDC","_class_wxClientDC",0); - SWIG_RegisterMapping("_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_wxMemoryDC","_class_wxMemoryDC",0); - SWIG_RegisterMapping("_wxPaintDC","_class_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); - SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_class_wxMenu","_wxMenu",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); - SWIG_RegisterMapping("_wxDialog","_class_wxMessageDialog",SwigwxMessageDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_wxMessageDialog",SwigwxMessageDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_class_wxFontDialog",SwigwxFontDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_wxFontDialog",SwigwxFontDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_class_wxTextEntryDialog",SwigwxTextEntryDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_wxTextEntryDialog",SwigwxTextEntryDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_class_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_class_wxFileDialog",SwigwxFileDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_wxFileDialog",SwigwxFileDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_class_wxColourDialog",SwigwxColourDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_wxColourDialog",SwigwxColourDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); - SWIG_RegisterMapping("_class_wxPen","_wxPen",0); - SWIG_RegisterMapping("_class_wxFileDialog","_wxFileDialog",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_wxFrame","_class_wxFrame",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxPaintDC","_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_class_wxIcon","_wxIcon",0); - SWIG_RegisterMapping("_class_wxColour","_wxColour",0); - SWIG_RegisterMapping("_class_wxScreenDC","_wxScreenDC",0); - SWIG_RegisterMapping("_wxFontDialog","_class_wxFontDialog",0); - SWIG_RegisterMapping("_class_wxClientDC","_wxClientDC",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); - SWIG_RegisterMapping("_class_wxBitmap","_wxBitmap",0); - SWIG_RegisterMapping("_class_wxMemoryDC","_wxMemoryDC",0); - SWIG_RegisterMapping("_wxMenuBar","_class_wxMenuBar",0); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxMessageDialog",SwigwxMessageDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxMessageDialog",SwigwxMessageDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxFontDialog",SwigwxFontDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxFontDialog",SwigwxFontDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxTextEntryDialog",SwigwxTextEntryDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxTextEntryDialog",SwigwxTextEntryDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxFileDialog",SwigwxFileDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxFileDialog",SwigwxFileDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxColourDialog",SwigwxColourDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxColourDialog",SwigwxColourDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxEvtHandler",0); - SWIG_RegisterMapping("_wxMenuItem","_class_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxColourDialog","_wxColourDialog",0); - SWIG_RegisterMapping("_wxDash","_unsigned_long",0); - SWIG_RegisterMapping("_wxDash","_long",0); - SWIG_RegisterMapping("_class_wxScrolledWindow","_wxScrolledWindow",0); - SWIG_RegisterMapping("_class_wxTextEntryDialog","_wxTextEntryDialog",0); - SWIG_RegisterMapping("_wxColourData","_class_wxColourData",0); - SWIG_RegisterMapping("_class_wxFontDialog","_wxFontDialog",0); - SWIG_RegisterMapping("_wxWindow","_class_wxMessageDialog",SwigwxMessageDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxMessageDialog",SwigwxMessageDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxFontDialog",SwigwxFontDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxFontDialog",SwigwxFontDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxTextEntryDialog",SwigwxTextEntryDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxTextEntryDialog",SwigwxTextEntryDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxFileDialog",SwigwxFileDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxFileDialog",SwigwxFileDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxColourDialog",SwigwxColourDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxColourDialog",SwigwxColourDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxWindow",0); - SWIG_RegisterMapping("_class_wxFrame","_wxFrame",0); -} diff --git a/utils/wxPython/src/gtk/cmndlgs.py b/utils/wxPython/src/gtk/cmndlgs.py deleted file mode 100644 index f929b54e8c..0000000000 --- a/utils/wxPython/src/gtk/cmndlgs.py +++ /dev/null @@ -1,307 +0,0 @@ -# This file was created automatically by SWIG. -import cmndlgsc - -from misc import * - -from gdi import * - -from windows import * -class wxColourDataPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - cmndlgsc.delete_wxColourData(self.this) - def GetChooseFull(self): - val = cmndlgsc.wxColourData_GetChooseFull(self.this) - return val - def GetColour(self): - val = cmndlgsc.wxColourData_GetColour(self.this) - val = wxColourPtr(val) - return val - def GetCustomColour(self,arg0): - val = cmndlgsc.wxColourData_GetCustomColour(self.this,arg0) - val = wxColourPtr(val) - val.thisown = 1 - return val - def SetChooseFull(self,arg0): - val = cmndlgsc.wxColourData_SetChooseFull(self.this,arg0) - return val - def SetColour(self,arg0): - val = cmndlgsc.wxColourData_SetColour(self.this,arg0.this) - return val - def SetCustomColour(self,arg0,arg1): - val = cmndlgsc.wxColourData_SetCustomColour(self.this,arg0,arg1.this) - return val - def __repr__(self): - return "" -class wxColourData(wxColourDataPtr): - def __init__(self) : - self.this = cmndlgsc.new_wxColourData() - self.thisown = 1 - - - - -class wxColourDialogPtr(wxDialogPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetColourData(self): - val = cmndlgsc.wxColourDialog_GetColourData(self.this) - val = wxColourDataPtr(val) - val.thisown = 1 - return val - def ShowModal(self): - val = cmndlgsc.wxColourDialog_ShowModal(self.this) - return val - def __repr__(self): - return "" -class wxColourDialog(wxColourDialogPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - self.this = apply(cmndlgsc.new_wxColourDialog,(arg0.this,)+args) - self.thisown = 1 - - - - -class wxFileDialogPtr(wxDialogPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetDirectory(self): - val = cmndlgsc.wxFileDialog_GetDirectory(self.this) - return val - def GetFilename(self): - val = cmndlgsc.wxFileDialog_GetFilename(self.this) - return val - def GetFilterIndex(self): - val = cmndlgsc.wxFileDialog_GetFilterIndex(self.this) - return val - def GetMessage(self): - val = cmndlgsc.wxFileDialog_GetMessage(self.this) - return val - def GetPath(self): - val = cmndlgsc.wxFileDialog_GetPath(self.this) - return val - def GetStyle(self): - val = cmndlgsc.wxFileDialog_GetStyle(self.this) - return val - def GetWildcard(self): - val = cmndlgsc.wxFileDialog_GetWildcard(self.this) - return val - def SetDirectory(self,arg0): - val = cmndlgsc.wxFileDialog_SetDirectory(self.this,arg0) - return val - def SetFilename(self,arg0): - val = cmndlgsc.wxFileDialog_SetFilename(self.this,arg0) - return val - def SetFilterIndex(self,arg0): - val = cmndlgsc.wxFileDialog_SetFilterIndex(self.this,arg0) - return val - def SetMessage(self,arg0): - val = cmndlgsc.wxFileDialog_SetMessage(self.this,arg0) - return val - def SetPath(self,arg0): - val = cmndlgsc.wxFileDialog_SetPath(self.this,arg0) - return val - def SetStyle(self,arg0): - val = cmndlgsc.wxFileDialog_SetStyle(self.this,arg0) - return val - def SetWildcard(self,arg0): - val = cmndlgsc.wxFileDialog_SetWildcard(self.this,arg0) - return val - def ShowModal(self): - val = cmndlgsc.wxFileDialog_ShowModal(self.this) - return val - def __repr__(self): - return "" -class wxFileDialog(wxFileDialogPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[5] = argl[5].this - except: pass - args = tuple(argl) - self.this = apply(cmndlgsc.new_wxFileDialog,(arg0.this,)+args) - self.thisown = 1 - - - - -class wxSingleChoiceDialogPtr(wxDialogPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetSelection(self): - val = cmndlgsc.wxSingleChoiceDialog_GetSelection(self.this) - return val - def GetStringSelection(self): - val = cmndlgsc.wxSingleChoiceDialog_GetStringSelection(self.this) - return val - def SetSelection(self,arg0): - val = cmndlgsc.wxSingleChoiceDialog_SetSelection(self.this,arg0) - return val - def ShowModal(self): - val = cmndlgsc.wxSingleChoiceDialog_ShowModal(self.this) - return val - def __repr__(self): - return "" -class wxSingleChoiceDialog(wxSingleChoiceDialogPtr): - def __init__(self,arg0,arg1,arg2,arg3,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(cmndlgsc.new_wxSingleChoiceDialog,(arg0.this,arg1,arg2,arg3,)+args) - self.thisown = 1 - - - - -class wxTextEntryDialogPtr(wxDialogPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetValue(self): - val = cmndlgsc.wxTextEntryDialog_GetValue(self.this) - return val - def SetValue(self,arg0): - val = cmndlgsc.wxTextEntryDialog_SetValue(self.this,arg0) - return val - def ShowModal(self): - val = cmndlgsc.wxTextEntryDialog_ShowModal(self.this) - return val - def __repr__(self): - return "" -class wxTextEntryDialog(wxTextEntryDialogPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[3] = argl[3].this - except: pass - args = tuple(argl) - self.this = apply(cmndlgsc.new_wxTextEntryDialog,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - -class wxFontDataPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - cmndlgsc.delete_wxFontData(self.this) - def EnableEffects(self,arg0): - val = cmndlgsc.wxFontData_EnableEffects(self.this,arg0) - return val - def GetAllowSymbols(self): - val = cmndlgsc.wxFontData_GetAllowSymbols(self.this) - return val - def GetColour(self): - val = cmndlgsc.wxFontData_GetColour(self.this) - val = wxColourPtr(val) - return val - def GetChosenFont(self): - val = cmndlgsc.wxFontData_GetChosenFont(self.this) - val = wxFontPtr(val) - val.thisown = 1 - return val - def GetEnableEffects(self): - val = cmndlgsc.wxFontData_GetEnableEffects(self.this) - return val - def GetInitialFont(self): - val = cmndlgsc.wxFontData_GetInitialFont(self.this) - val = wxFontPtr(val) - val.thisown = 1 - return val - def GetShowHelp(self): - val = cmndlgsc.wxFontData_GetShowHelp(self.this) - return val - def SetAllowSymbols(self,arg0): - val = cmndlgsc.wxFontData_SetAllowSymbols(self.this,arg0) - return val - def SetChosenFont(self,arg0): - val = cmndlgsc.wxFontData_SetChosenFont(self.this,arg0.this) - return val - def SetColour(self,arg0): - val = cmndlgsc.wxFontData_SetColour(self.this,arg0.this) - return val - def SetInitialFont(self,arg0): - val = cmndlgsc.wxFontData_SetInitialFont(self.this,arg0.this) - return val - def SetRange(self,arg0,arg1): - val = cmndlgsc.wxFontData_SetRange(self.this,arg0,arg1) - return val - def SetShowHelp(self,arg0): - val = cmndlgsc.wxFontData_SetShowHelp(self.this,arg0) - return val - def __repr__(self): - return "" -class wxFontData(wxFontDataPtr): - def __init__(self) : - self.this = cmndlgsc.new_wxFontData() - self.thisown = 1 - - - - -class wxFontDialogPtr(wxDialogPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetFontData(self): - val = cmndlgsc.wxFontDialog_GetFontData(self.this) - val = wxFontDataPtr(val) - return val - def ShowModal(self): - val = cmndlgsc.wxFontDialog_ShowModal(self.this) - return val - def __repr__(self): - return "" -class wxFontDialog(wxFontDialogPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - self.this = apply(cmndlgsc.new_wxFontDialog,(arg0.this,)+args) - self.thisown = 1 - - - - -class wxMessageDialogPtr(wxDialogPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def ShowModal(self): - val = cmndlgsc.wxMessageDialog_ShowModal(self.this) - return val - def __repr__(self): - return "" -class wxMessageDialog(wxMessageDialogPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(cmndlgsc.new_wxMessageDialog,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - - - -#-------------- VARIABLE WRAPPERS ------------------ - diff --git a/utils/wxPython/src/gtk/controls.cpp b/utils/wxPython/src/gtk/controls.cpp deleted file mode 100644 index b4ed5b586c..0000000000 --- a/utils/wxPython/src/gtk/controls.cpp +++ /dev/null @@ -1,5165 +0,0 @@ -/* - * FILE : gtk/controls.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif - -#define SWIG_init initcontrolsc - -#define SWIG_name "controlsc" - -#include "helpers.h" -#include - -#ifdef __WXMSW__ -#include -#endif - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; - -wxValidator wxPyDefaultValidator; // Non-const default because of SWIG -static void *SwigwxControlTowxWindow(void *ptr) { - wxControl *src; - wxWindow *dest; - src = (wxControl *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxControlTowxEvtHandler(void *ptr) { - wxControl *src; - wxEvtHandler *dest; - src = (wxControl *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define wxControl_Command(_swigobj,_swigarg0) (_swigobj->Command(_swigarg0)) -static PyObject *_wrap_wxControl_Command(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxControl * _arg0; - wxCommandEvent * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxControl_Command",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxControl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxControl_Command. Expected _wxControl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxCommandEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxControl_Command. Expected _wxCommandEvent_p."); - return NULL; - } - } - wxControl_Command(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxControl_GetLabel(_swigobj) (_swigobj->GetLabel()) -static PyObject *_wrap_wxControl_GetLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxControl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxControl_GetLabel",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxControl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxControl_GetLabel. Expected _wxControl_p."); - return NULL; - } - } - _result = new wxString (wxControl_GetLabel(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxControl_SetLabel(_swigobj,_swigarg0) (_swigobj->SetLabel(_swigarg0)) -static PyObject *_wrap_wxControl_SetLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxControl * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxControl_SetLabel",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxControl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxControl_SetLabel. Expected _wxControl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxControl_SetLabel(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static void *SwigwxButtonTowxControl(void *ptr) { - wxButton *src; - wxControl *dest; - src = (wxButton *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxButtonTowxWindow(void *ptr) { - wxButton *src; - wxWindow *dest; - src = (wxButton *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxButtonTowxEvtHandler(void *ptr) { - wxButton *src; - wxEvtHandler *dest; - src = (wxButton *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) -static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxButton * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = 0; - wxValidator * _arg6 = &wxPyDefaultValidator; - char * _arg7 = "button"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char * _argc6 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|sslss:new_wxButton",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_arg5,&_argc6,&_arg7)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxButton. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxButton. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxButton. Expected _wxSize_p."); - return NULL; - } - } - if (_argc6) { - if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxButton. Expected _wxValidator_p."); - return NULL; - } - } - _result = (wxButton *)new_wxButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxButton_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxButton_SetDefault(_swigobj) (_swigobj->SetDefault()) -static PyObject *_wrap_wxButton_SetDefault(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxButton * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxButton_SetDefault",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxButton_SetDefault. Expected _wxButton_p."); - return NULL; - } - } - wxButton_SetDefault(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxBitmapButtonTowxButton(void *ptr) { - wxBitmapButton *src; - wxButton *dest; - src = (wxBitmapButton *) ptr; - dest = (wxButton *) src; - return (void *) dest; -} - -static void *SwigwxBitmapButtonTowxControl(void *ptr) { - wxBitmapButton *src; - wxControl *dest; - src = (wxBitmapButton *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxBitmapButtonTowxWindow(void *ptr) { - wxBitmapButton *src; - wxWindow *dest; - src = (wxBitmapButton *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxBitmapButtonTowxEvtHandler(void *ptr) { - wxBitmapButton *src; - wxEvtHandler *dest; - src = (wxBitmapButton *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxBitmapButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxBitmapButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) -static PyObject *_wrap_new_wxBitmapButton(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmapButton * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxBitmap * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = (wxBU_AUTODRAW); - wxValidator * _arg6 = &wxPyDefaultValidator; - char * _arg7 = "button"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char * _argc6 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sis|sslss:new_wxBitmapButton",&_argc0,&_arg1,&_argc2,&_argc3,&_argc4,&_arg5,&_argc6,&_arg7)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBitmapButton. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxBitmapButton. Expected _wxBitmap_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxBitmapButton. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxBitmapButton. Expected _wxSize_p."); - return NULL; - } - } - if (_argc6) { - if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxBitmapButton. Expected _wxValidator_p."); - return NULL; - } - } - _result = (wxBitmapButton *)new_wxBitmapButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmapButton_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxBitmapButton_GetBitmapLabel(_swigobj) (_swigobj->GetBitmapLabel()) -static PyObject *_wrap_wxBitmapButton_GetBitmapLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - wxBitmapButton * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBitmapButton_GetBitmapLabel",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmapButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapButton_GetBitmapLabel. Expected _wxBitmapButton_p."); - return NULL; - } - } - wxBitmap & _result_ref = wxBitmapButton_GetBitmapLabel(_arg0); - _result = (wxBitmap *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxBitmapButton_SetBitmapLabel(_swigobj,_swigarg0) (_swigobj->SetBitmapLabel(_swigarg0)) -static PyObject *_wrap_wxBitmapButton_SetBitmapLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmapButton * _arg0; - wxBitmap * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxBitmapButton_SetBitmapLabel",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmapButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapButton_SetBitmapLabel. Expected _wxBitmapButton_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmapButton_SetBitmapLabel. Expected _wxBitmap_p."); - return NULL; - } - } - wxBitmapButton_SetBitmapLabel(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxCheckBoxTowxControl(void *ptr) { - wxCheckBox *src; - wxControl *dest; - src = (wxCheckBox *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxCheckBoxTowxWindow(void *ptr) { - wxCheckBox *src; - wxWindow *dest; - src = (wxCheckBox *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxCheckBoxTowxEvtHandler(void *ptr) { - wxCheckBox *src; - wxEvtHandler *dest; - src = (wxCheckBox *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxCheckBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxCheckBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) -static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxCheckBox * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = 0; - wxValidator * _arg6 = &wxPyDefaultValidator; - char * _arg7 = "checkBox"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char * _argc6 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|sslss:new_wxCheckBox",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_arg5,&_argc6,&_arg7)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxCheckBox. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxCheckBox. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxCheckBox. Expected _wxSize_p."); - return NULL; - } - } - if (_argc6) { - if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxCheckBox. Expected _wxValidator_p."); - return NULL; - } - } - _result = (wxCheckBox *)new_wxCheckBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxCheckBox_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxCheckBox_GetValue(_swigobj) (_swigobj->GetValue()) -static PyObject *_wrap_wxCheckBox_GetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxCheckBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCheckBox_GetValue",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCheckBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCheckBox_GetValue. Expected _wxCheckBox_p."); - return NULL; - } - } - _result = (bool )wxCheckBox_GetValue(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxCheckBox_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) -static PyObject *_wrap_wxCheckBox_SetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxCheckBox * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxCheckBox_SetValue",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCheckBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCheckBox_SetValue. Expected _wxCheckBox_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxCheckBox_SetValue(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxChoiceTowxControl(void *ptr) { - wxChoice *src; - wxControl *dest; - src = (wxChoice *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxChoiceTowxWindow(void *ptr) { - wxChoice *src; - wxWindow *dest; - src = (wxChoice *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxChoiceTowxEvtHandler(void *ptr) { - wxChoice *src; - wxEvtHandler *dest; - src = (wxChoice *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxChoice(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxChoice(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8)) -static PyObject *_wrap_new_wxChoice(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxChoice * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - int _arg4 = 0; - wxString * _arg5 = NULL; - long _arg6 = 0; - wxValidator * _arg7 = &wxPyDefaultValidator; - char * _arg8 = "choice"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - PyObject * _obj5 = 0; - char * _argc7 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si|ssOlss:new_wxChoice",&_argc0,&_arg1,&_argc2,&_argc3,&_obj5,&_arg6,&_argc7,&_arg8)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxChoice. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxChoice. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxChoice. Expected _wxSize_p."); - return NULL; - } - } - if (_obj5) -{ - _arg5 = wxString_LIST_helper(_obj5); - if (_arg5 == NULL) { - return NULL; - } -} - if (_argc7) { - if (SWIG_GetPtr(_argc7,(void **) &_arg7,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxChoice. Expected _wxValidator_p."); - return NULL; - } - } -{ - _arg4 = PyList_Size(_obj5); -} - _result = (wxChoice *)new_wxChoice(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxChoice_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - delete [] _arg5; -} - return _resultobj; -} - -#define wxChoice_Append(_swigobj,_swigarg0) (_swigobj->Append(_swigarg0)) -static PyObject *_wrap_wxChoice_Append(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxChoice * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxChoice_Append",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_Append. Expected _wxChoice_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxChoice_Append(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxChoice_Clear(_swigobj) (_swigobj->Clear()) -static PyObject *_wrap_wxChoice_Clear(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxChoice * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxChoice_Clear",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_Clear. Expected _wxChoice_p."); - return NULL; - } - } - wxChoice_Clear(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxChoice_FindString(_swigobj,_swigarg0) (_swigobj->FindString(_swigarg0)) -static PyObject *_wrap_wxChoice_FindString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxChoice * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxChoice_FindString",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_FindString. Expected _wxChoice_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (int )wxChoice_FindString(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxChoice_GetColumns(_swigobj) (_swigobj->GetColumns()) -static PyObject *_wrap_wxChoice_GetColumns(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxChoice * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxChoice_GetColumns",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_GetColumns. Expected _wxChoice_p."); - return NULL; - } - } - _result = (int )wxChoice_GetColumns(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxChoice_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxChoice_GetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxChoice * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxChoice_GetSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_GetSelection. Expected _wxChoice_p."); - return NULL; - } - } - _result = (int )wxChoice_GetSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxChoice_GetString(_swigobj,_swigarg0) (_swigobj->GetString(_swigarg0)) -static PyObject *_wrap_wxChoice_GetString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxChoice * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxChoice_GetString",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_GetString. Expected _wxChoice_p."); - return NULL; - } - } - _result = new wxString (wxChoice_GetString(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxChoice_GetStringSelection(_swigobj) (_swigobj->GetStringSelection()) -static PyObject *_wrap_wxChoice_GetStringSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxChoice * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxChoice_GetStringSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_GetStringSelection. Expected _wxChoice_p."); - return NULL; - } - } - _result = new wxString (wxChoice_GetStringSelection(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxChoice_Number(_swigobj) (_swigobj->Number()) -static PyObject *_wrap_wxChoice_Number(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxChoice * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxChoice_Number",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_Number. Expected _wxChoice_p."); - return NULL; - } - } - _result = (int )wxChoice_Number(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxChoice_SetColumns(_swigobj,_swigarg0) (_swigobj->SetColumns(_swigarg0)) -static PyObject *_wrap_wxChoice_SetColumns(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxChoice * _arg0; - int _arg1 = 1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxChoice_SetColumns",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_SetColumns. Expected _wxChoice_p."); - return NULL; - } - } - wxChoice_SetColumns(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxChoice_SetSelection(_swigobj,_swigarg0) (_swigobj->SetSelection(_swigarg0)) -static PyObject *_wrap_wxChoice_SetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxChoice * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxChoice_SetSelection",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_SetSelection. Expected _wxChoice_p."); - return NULL; - } - } - wxChoice_SetSelection(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxChoice_SetStringSelection(_swigobj,_swigarg0) (_swigobj->SetStringSelection(_swigarg0)) -static PyObject *_wrap_wxChoice_SetStringSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxChoice * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxChoice_SetStringSelection",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_SetStringSelection. Expected _wxChoice_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxChoice_SetStringSelection(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static void *SwigwxComboBoxTowxControl(void *ptr) { - wxComboBox *src; - wxControl *dest; - src = (wxComboBox *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxComboBoxTowxWindow(void *ptr) { - wxComboBox *src; - wxWindow *dest; - src = (wxComboBox *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxComboBoxTowxEvtHandler(void *ptr) { - wxComboBox *src; - wxEvtHandler *dest; - src = (wxComboBox *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxComboBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9) (new wxComboBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9)) -static PyObject *_wrap_new_wxComboBox(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _result; - wxWindow * _arg0; - wxWindowID _arg1; - char * _arg2 = ""; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - int _arg5 = 0; - wxString * _arg6 = NULL; - long _arg7 = 0; - wxValidator * _arg8 = &wxPyDefaultValidator; - char * _arg9 = "comboBox"; - char * _argc0 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - PyObject * _obj6 = 0; - char * _argc8 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si|sssOlss:new_wxComboBox",&_argc0,&_arg1,&_arg2,&_argc3,&_argc4,&_obj6,&_arg7,&_argc8,&_arg9)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxComboBox. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxComboBox. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxComboBox. Expected _wxSize_p."); - return NULL; - } - } - if (_obj6) -{ - _arg6 = wxString_LIST_helper(_obj6); - if (_arg6 == NULL) { - return NULL; - } -} - if (_argc8) { - if (SWIG_GetPtr(_argc8,(void **) &_arg8,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of new_wxComboBox. Expected _wxValidator_p."); - return NULL; - } - } -{ - _arg5 = PyList_Size(_obj6); -} - _result = (wxComboBox *)new_wxComboBox(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxComboBox_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - delete [] _arg6; -} - return _resultobj; -} - -#define wxComboBox_Append(_swigobj,_swigarg0) (_swigobj->Append(_swigarg0)) -static PyObject *_wrap_wxComboBox_Append(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxComboBox_Append",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_Append. Expected _wxComboBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxComboBox_Append(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxComboBox_Clear(_swigobj) (_swigobj->Clear()) -static PyObject *_wrap_wxComboBox_Clear(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_Clear",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_Clear. Expected _wxComboBox_p."); - return NULL; - } - } - wxComboBox_Clear(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxComboBox_Copy(_swigobj) (_swigobj->Copy()) -static PyObject *_wrap_wxComboBox_Copy(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_Copy",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_Copy. Expected _wxComboBox_p."); - return NULL; - } - } - wxComboBox_Copy(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxComboBox_Cut(_swigobj) (_swigobj->Cut()) -static PyObject *_wrap_wxComboBox_Cut(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_Cut",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_Cut. Expected _wxComboBox_p."); - return NULL; - } - } - wxComboBox_Cut(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxComboBox_Delete(_swigobj,_swigarg0) (_swigobj->Delete(_swigarg0)) -static PyObject *_wrap_wxComboBox_Delete(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxComboBox_Delete",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_Delete. Expected _wxComboBox_p."); - return NULL; - } - } - wxComboBox_Delete(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxComboBox_FindString(_swigobj,_swigarg0) (_swigobj->FindString(_swigarg0)) -static PyObject *_wrap_wxComboBox_FindString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxComboBox * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxComboBox_FindString",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_FindString. Expected _wxComboBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (int )wxComboBox_FindString(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxComboBox_GetInsertionPoint(_swigobj) (_swigobj->GetInsertionPoint()) -static PyObject *_wrap_wxComboBox_GetInsertionPoint(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_GetInsertionPoint",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_GetInsertionPoint. Expected _wxComboBox_p."); - return NULL; - } - } - _result = (long )wxComboBox_GetInsertionPoint(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxComboBox_GetLastPosition(_swigobj) (_swigobj->GetLastPosition()) -static PyObject *_wrap_wxComboBox_GetLastPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_GetLastPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_GetLastPosition. Expected _wxComboBox_p."); - return NULL; - } - } - _result = (long )wxComboBox_GetLastPosition(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxComboBox_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxComboBox_GetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_GetSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_GetSelection. Expected _wxComboBox_p."); - return NULL; - } - } - _result = (int )wxComboBox_GetSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxComboBox_GetString(_swigobj,_swigarg0) (_swigobj->GetString(_swigarg0)) -static PyObject *_wrap_wxComboBox_GetString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxComboBox * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxComboBox_GetString",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_GetString. Expected _wxComboBox_p."); - return NULL; - } - } - _result = new wxString (wxComboBox_GetString(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxComboBox_GetStringSelection(_swigobj) (_swigobj->GetStringSelection()) -static PyObject *_wrap_wxComboBox_GetStringSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_GetStringSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_GetStringSelection. Expected _wxComboBox_p."); - return NULL; - } - } - _result = new wxString (wxComboBox_GetStringSelection(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxComboBox_GetValue(_swigobj) (_swigobj->GetValue()) -static PyObject *_wrap_wxComboBox_GetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_GetValue",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_GetValue. Expected _wxComboBox_p."); - return NULL; - } - } - _result = new wxString (wxComboBox_GetValue(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxComboBox_Number(_swigobj) (_swigobj->Number()) -static PyObject *_wrap_wxComboBox_Number(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_Number",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_Number. Expected _wxComboBox_p."); - return NULL; - } - } - _result = (int )wxComboBox_Number(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxComboBox_Paste(_swigobj) (_swigobj->Paste()) -static PyObject *_wrap_wxComboBox_Paste(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_Paste",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_Paste. Expected _wxComboBox_p."); - return NULL; - } - } - wxComboBox_Paste(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxComboBox_Replace(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Replace(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxComboBox_Replace(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - long _arg1; - long _arg2; - wxString * _arg3; - char * _argc0 = 0; - PyObject * _obj3 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sllO:wxComboBox_Replace",&_argc0,&_arg1,&_arg2,&_obj3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_Replace. Expected _wxComboBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AsString(_obj3)); -} - wxComboBox_Replace(_arg0,_arg1,_arg2,*_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj3) - delete _arg3; -} - return _resultobj; -} - -#define wxComboBox_Remove(_swigobj,_swigarg0,_swigarg1) (_swigobj->Remove(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxComboBox_Remove(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxComboBox_Remove",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_Remove. Expected _wxComboBox_p."); - return NULL; - } - } - wxComboBox_Remove(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxComboBox_SetInsertionPoint(_swigobj,_swigarg0) (_swigobj->SetInsertionPoint(_swigarg0)) -static PyObject *_wrap_wxComboBox_SetInsertionPoint(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxComboBox_SetInsertionPoint",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_SetInsertionPoint. Expected _wxComboBox_p."); - return NULL; - } - } - wxComboBox_SetInsertionPoint(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxComboBox_SetInsertionPointEnd(_swigobj) (_swigobj->SetInsertionPointEnd()) -static PyObject *_wrap_wxComboBox_SetInsertionPointEnd(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_SetInsertionPointEnd",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_SetInsertionPointEnd. Expected _wxComboBox_p."); - return NULL; - } - } - wxComboBox_SetInsertionPointEnd(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxComboBox_SetSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSelection(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxComboBox_SetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - int _arg1; - bool _arg2 = (1); - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"si|i:wxComboBox_SetSelection",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_SetSelection. Expected _wxComboBox_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - wxComboBox_SetSelection(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxComboBox_SetMark(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSelection(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxComboBox_SetMark(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxComboBox_SetMark",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_SetMark. Expected _wxComboBox_p."); - return NULL; - } - } - wxComboBox_SetMark(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxComboBox_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) -static PyObject *_wrap_wxComboBox_SetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxComboBox_SetValue",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_SetValue. Expected _wxComboBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxComboBox_SetValue(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static void *SwigwxGaugeTowxControl(void *ptr) { - wxGauge *src; - wxControl *dest; - src = (wxGauge *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxGaugeTowxWindow(void *ptr) { - wxGauge *src; - wxWindow *dest; - src = (wxGauge *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxGaugeTowxEvtHandler(void *ptr) { - wxGauge *src; - wxEvtHandler *dest; - src = (wxGauge *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxGauge(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxGauge(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) -static PyObject *_wrap_new_wxGauge(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGauge * _result; - wxWindow * _arg0; - wxWindowID _arg1; - int _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = (wxGA_HORIZONTAL); - wxValidator * _arg6 = &wxPyDefaultValidator; - char * _arg7 = "gauge"; - char * _argc0 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char * _argc6 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sii|sslss:new_wxGauge",&_argc0,&_arg1,&_arg2,&_argc3,&_argc4,&_arg5,&_argc6,&_arg7)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGauge. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxGauge. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxGauge. Expected _wxSize_p."); - return NULL; - } - } - if (_argc6) { - if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxGauge. Expected _wxValidator_p."); - return NULL; - } - } - _result = (wxGauge *)new_wxGauge(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxGauge_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGauge_GetBezelFace(_swigobj) (_swigobj->GetBezelFace()) -static PyObject *_wrap_wxGauge_GetBezelFace(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGauge * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGauge_GetBezelFace",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGauge_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGauge_GetBezelFace. Expected _wxGauge_p."); - return NULL; - } - } - _result = (int )wxGauge_GetBezelFace(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGauge_GetRange(_swigobj) (_swigobj->GetRange()) -static PyObject *_wrap_wxGauge_GetRange(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGauge * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGauge_GetRange",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGauge_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGauge_GetRange. Expected _wxGauge_p."); - return NULL; - } - } - _result = (int )wxGauge_GetRange(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGauge_GetShadowWidth(_swigobj) (_swigobj->GetShadowWidth()) -static PyObject *_wrap_wxGauge_GetShadowWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGauge * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGauge_GetShadowWidth",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGauge_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGauge_GetShadowWidth. Expected _wxGauge_p."); - return NULL; - } - } - _result = (int )wxGauge_GetShadowWidth(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGauge_GetValue(_swigobj) (_swigobj->GetValue()) -static PyObject *_wrap_wxGauge_GetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGauge * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGauge_GetValue",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGauge_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGauge_GetValue. Expected _wxGauge_p."); - return NULL; - } - } - _result = (int )wxGauge_GetValue(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGauge_SetBezelFace(_swigobj,_swigarg0) (_swigobj->SetBezelFace(_swigarg0)) -static PyObject *_wrap_wxGauge_SetBezelFace(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGauge * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGauge_SetBezelFace",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGauge_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGauge_SetBezelFace. Expected _wxGauge_p."); - return NULL; - } - } - wxGauge_SetBezelFace(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGauge_SetRange(_swigobj,_swigarg0) (_swigobj->SetRange(_swigarg0)) -static PyObject *_wrap_wxGauge_SetRange(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGauge * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGauge_SetRange",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGauge_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGauge_SetRange. Expected _wxGauge_p."); - return NULL; - } - } - wxGauge_SetRange(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGauge_SetShadowWidth(_swigobj,_swigarg0) (_swigobj->SetShadowWidth(_swigarg0)) -static PyObject *_wrap_wxGauge_SetShadowWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGauge * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGauge_SetShadowWidth",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGauge_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGauge_SetShadowWidth. Expected _wxGauge_p."); - return NULL; - } - } - wxGauge_SetShadowWidth(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGauge_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) -static PyObject *_wrap_wxGauge_SetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGauge * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGauge_SetValue",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGauge_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGauge_SetValue. Expected _wxGauge_p."); - return NULL; - } - } - wxGauge_SetValue(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxStaticBoxTowxControl(void *ptr) { - wxStaticBox *src; - wxControl *dest; - src = (wxStaticBox *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxStaticBoxTowxWindow(void *ptr) { - wxStaticBox *src; - wxWindow *dest; - src = (wxStaticBox *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxStaticBoxTowxEvtHandler(void *ptr) { - wxStaticBox *src; - wxEvtHandler *dest; - src = (wxStaticBox *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxStaticBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxStaticBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxStaticBox * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = 0; - char * _arg6 = "staticBox"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|ssls:new_wxStaticBox",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxStaticBox. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxStaticBox. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxStaticBox. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxStaticBox *)new_wxStaticBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticBox_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -static void *SwigwxStaticTextTowxControl(void *ptr) { - wxStaticText *src; - wxControl *dest; - src = (wxStaticText *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxStaticTextTowxWindow(void *ptr) { - wxStaticText *src; - wxWindow *dest; - src = (wxStaticText *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxStaticTextTowxEvtHandler(void *ptr) { - wxStaticText *src; - wxEvtHandler *dest; - src = (wxStaticText *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxStaticText(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxStaticText(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxStaticText * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = 0; - char * _arg6 = "staticText"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|ssls:new_wxStaticText",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxStaticText. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxStaticText. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxStaticText. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxStaticText *)new_wxStaticText(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticText_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxStaticText_GetLabel(_swigobj) (_swigobj->GetLabel()) -static PyObject *_wrap_wxStaticText_GetLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxStaticText * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxStaticText_GetLabel",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxStaticText_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStaticText_GetLabel. Expected _wxStaticText_p."); - return NULL; - } - } - _result = new wxString (wxStaticText_GetLabel(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxStaticText_SetLabel(_swigobj,_swigarg0) (_swigobj->SetLabel(_swigarg0)) -static PyObject *_wrap_wxStaticText_SetLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxStaticText * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxStaticText_SetLabel",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxStaticText_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStaticText_SetLabel. Expected _wxStaticText_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxStaticText_SetLabel(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static void *SwigwxListBoxTowxControl(void *ptr) { - wxListBox *src; - wxControl *dest; - src = (wxListBox *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxListBoxTowxWindow(void *ptr) { - wxListBox *src; - wxWindow *dest; - src = (wxListBox *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxListBoxTowxEvtHandler(void *ptr) { - wxListBox *src; - wxEvtHandler *dest; - src = (wxListBox *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxListBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxListBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8)) -static PyObject *_wrap_new_wxListBox(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - int _arg4; - wxString * _arg5 = NULL; - long _arg6 = 0; - wxValidator * _arg7 = &wxPyDefaultValidator; - char * _arg8 = "listBox"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - PyObject * _obj5 = 0; - char * _argc7 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si|ssOlss:new_wxListBox",&_argc0,&_arg1,&_argc2,&_argc3,&_obj5,&_arg6,&_argc7,&_arg8)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxListBox. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxListBox. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxListBox. Expected _wxSize_p."); - return NULL; - } - } - if (_obj5) -{ - _arg5 = wxString_LIST_helper(_obj5); - if (_arg5 == NULL) { - return NULL; - } -} - if (_argc7) { - if (SWIG_GetPtr(_argc7,(void **) &_arg7,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxListBox. Expected _wxValidator_p."); - return NULL; - } - } -{ - _arg4 = PyList_Size(_obj5); -} - _result = (wxListBox *)new_wxListBox(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxListBox_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - delete [] _arg5; -} - return _resultobj; -} - -#define wxListBox_Append(_swigobj,_swigarg0) (_swigobj->Append(_swigarg0)) -static PyObject *_wrap_wxListBox_Append(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxListBox_Append",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_Append. Expected _wxListBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxListBox_Append(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxListBox_Clear(_swigobj) (_swigobj->Clear()) -static PyObject *_wrap_wxListBox_Clear(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListBox_Clear",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_Clear. Expected _wxListBox_p."); - return NULL; - } - } - wxListBox_Clear(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxListBox_Delete(_swigobj,_swigarg0) (_swigobj->Delete(_swigarg0)) -static PyObject *_wrap_wxListBox_Delete(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxListBox_Delete",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_Delete. Expected _wxListBox_p."); - return NULL; - } - } - wxListBox_Delete(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxListBox_Deselect(_swigobj,_swigarg0) (_swigobj->Deselect(_swigarg0)) -static PyObject *_wrap_wxListBox_Deselect(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxListBox_Deselect",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_Deselect. Expected _wxListBox_p."); - return NULL; - } - } - wxListBox_Deselect(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxListBox_FindString(_swigobj,_swigarg0) (_swigobj->FindString(_swigarg0)) -static PyObject *_wrap_wxListBox_FindString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListBox * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxListBox_FindString",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_FindString. Expected _wxListBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (int )wxListBox_FindString(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxListBox_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxListBox_GetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListBox_GetSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_GetSelection. Expected _wxListBox_p."); - return NULL; - } - } - _result = (int )wxListBox_GetSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListBox_GetString(_swigobj,_swigarg0) (_swigobj->GetString(_swigarg0)) -static PyObject *_wrap_wxListBox_GetString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxListBox * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxListBox_GetString",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_GetString. Expected _wxListBox_p."); - return NULL; - } - } - _result = new wxString (wxListBox_GetString(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxListBox_GetStringSelection(_swigobj) (_swigobj->GetStringSelection()) -static PyObject *_wrap_wxListBox_GetStringSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxListBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListBox_GetStringSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_GetStringSelection. Expected _wxListBox_p."); - return NULL; - } - } - _result = new wxString (wxListBox_GetStringSelection(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxListBox_Number(_swigobj) (_swigobj->Number()) -static PyObject *_wrap_wxListBox_Number(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListBox_Number",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_Number. Expected _wxListBox_p."); - return NULL; - } - } - _result = (int )wxListBox_Number(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListBox_Selected(_swigobj,_swigarg0) (_swigobj->Selected(_swigarg0)) -static PyObject *_wrap_wxListBox_Selected(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListBox * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxListBox_Selected",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_Selected. Expected _wxListBox_p."); - return NULL; - } - } - _result = (bool )wxListBox_Selected(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListBox_Set(_swigobj,_swigarg0,_swigarg1) (_swigobj->Set(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListBox_Set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _arg0; - int _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxListBox_Set",&_argc0,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_Set. Expected _wxListBox_p."); - return NULL; - } - } - if (_obj2) -{ - _arg2 = wxString_LIST_helper(_obj2); - if (_arg2 == NULL) { - return NULL; - } -} -{ - _arg1 = PyList_Size(_obj2); -} - wxListBox_Set(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - delete [] _arg2; -} - return _resultobj; -} - -#define wxListBox_SetFirstItem(_swigobj,_swigarg0) (_swigobj->SetFirstItem(_swigarg0)) -static PyObject *_wrap_wxListBox_SetFirstItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxListBox_SetFirstItem",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_SetFirstItem. Expected _wxListBox_p."); - return NULL; - } - } - wxListBox_SetFirstItem(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxListBox_SetFirstItemStr(_swigobj,_swigarg0) (_swigobj->SetFirstItem(_swigarg0)) -static PyObject *_wrap_wxListBox_SetFirstItemStr(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxListBox_SetFirstItemStr",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_SetFirstItemStr. Expected _wxListBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxListBox_SetFirstItemStr(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxListBox_SetSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSelection(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListBox_SetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _arg0; - int _arg1; - bool _arg2 = (1); - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"si|i:wxListBox_SetSelection",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_SetSelection. Expected _wxListBox_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - wxListBox_SetSelection(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxListBox_SetString(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetString(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListBox_SetString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _arg0; - int _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siO:wxListBox_SetString",&_argc0,&_arg1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_SetString. Expected _wxListBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - wxListBox_SetString(_arg0,_arg1,*_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxListBox_SetStringSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetStringSelection(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListBox_SetStringSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _arg0; - wxString * _arg1; - bool _arg2 = (1); - char * _argc0 = 0; - PyObject * _obj1 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"sO|i:wxListBox_SetStringSelection",&_argc0,&_obj1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_SetStringSelection. Expected _wxListBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _arg2 = (bool ) tempbool2; - wxListBox_SetStringSelection(_arg0,*_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static void *SwigwxTextCtrlTowxControl(void *ptr) { - wxTextCtrl *src; - wxControl *dest; - src = (wxTextCtrl *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxTextCtrlTowxWindow(void *ptr) { - wxTextCtrl *src; - wxWindow *dest; - src = (wxTextCtrl *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxTextCtrlTowxEvtHandler(void *ptr) { - wxTextCtrl *src; - wxEvtHandler *dest; - src = (wxTextCtrl *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxTextCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxTextCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) -static PyObject *_wrap_new_wxTextCtrl(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _result; - wxWindow * _arg0; - wxWindowID _arg1; - char * _arg2 = ""; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = 0; - wxValidator * _arg6 = &wxPyDefaultValidator; - char * _arg7 = "text"; - char * _argc0 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char * _argc6 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si|ssslss:new_wxTextCtrl",&_argc0,&_arg1,&_arg2,&_argc3,&_argc4,&_arg5,&_argc6,&_arg7)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxTextCtrl. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxTextCtrl. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxTextCtrl. Expected _wxSize_p."); - return NULL; - } - } - if (_argc6) { - if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxTextCtrl. Expected _wxValidator_p."); - return NULL; - } - } - _result = (wxTextCtrl *)new_wxTextCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxTextCtrl_Clear(_swigobj) (_swigobj->Clear()) -static PyObject *_wrap_wxTextCtrl_Clear(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_Clear",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Clear. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_Clear(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_Copy(_swigobj) (_swigobj->Copy()) -static PyObject *_wrap_wxTextCtrl_Copy(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_Copy",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Copy. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_Copy(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_Cut(_swigobj) (_swigobj->Cut()) -static PyObject *_wrap_wxTextCtrl_Cut(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_Cut",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Cut. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_Cut(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_DiscardEdits(_swigobj) (_swigobj->DiscardEdits()) -static PyObject *_wrap_wxTextCtrl_DiscardEdits(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_DiscardEdits",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_DiscardEdits. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_DiscardEdits(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_GetInsertionPoint(_swigobj) (_swigobj->GetInsertionPoint()) -static PyObject *_wrap_wxTextCtrl_GetInsertionPoint(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_GetInsertionPoint",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetInsertionPoint. Expected _wxTextCtrl_p."); - return NULL; - } - } - _result = (long )wxTextCtrl_GetInsertionPoint(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTextCtrl_GetLastPosition(_swigobj) (_swigobj->GetLastPosition()) -static PyObject *_wrap_wxTextCtrl_GetLastPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_GetLastPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetLastPosition. Expected _wxTextCtrl_p."); - return NULL; - } - } - _result = (long )wxTextCtrl_GetLastPosition(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTextCtrl_GetValue(_swigobj) (_swigobj->GetValue()) -static PyObject *_wrap_wxTextCtrl_GetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_GetValue",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetValue. Expected _wxTextCtrl_p."); - return NULL; - } - } - _result = new wxString (wxTextCtrl_GetValue(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxTextCtrl_IsModified(_swigobj) (_swigobj->IsModified()) -static PyObject *_wrap_wxTextCtrl_IsModified(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_IsModified",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_IsModified. Expected _wxTextCtrl_p."); - return NULL; - } - } - _result = (bool )wxTextCtrl_IsModified(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTextCtrl_LoadFile(_swigobj,_swigarg0) (_swigobj->LoadFile(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_LoadFile(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTextCtrl * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxTextCtrl_LoadFile",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_LoadFile. Expected _wxTextCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (bool )wxTextCtrl_LoadFile(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxTextCtrl_Paste(_swigobj) (_swigobj->Paste()) -static PyObject *_wrap_wxTextCtrl_Paste(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_Paste",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Paste. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_Paste(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_Remove(_swigobj,_swigarg0,_swigarg1) (_swigobj->Remove(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTextCtrl_Remove(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxTextCtrl_Remove",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Remove. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_Remove(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_Replace(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Replace(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxTextCtrl_Replace(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - long _arg1; - long _arg2; - wxString * _arg3; - char * _argc0 = 0; - PyObject * _obj3 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sllO:wxTextCtrl_Replace",&_argc0,&_arg1,&_arg2,&_obj3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Replace. Expected _wxTextCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AsString(_obj3)); -} - wxTextCtrl_Replace(_arg0,_arg1,_arg2,*_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj3) - delete _arg3; -} - return _resultobj; -} - -#define wxTextCtrl_SaveFile(_swigobj,_swigarg0) (_swigobj->SaveFile(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_SaveFile(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTextCtrl * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxTextCtrl_SaveFile",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SaveFile. Expected _wxTextCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (bool )wxTextCtrl_SaveFile(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxTextCtrl_SetEditable(_swigobj,_swigarg0) (_swigobj->SetEditable(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_SetEditable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxTextCtrl_SetEditable",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SetEditable. Expected _wxTextCtrl_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxTextCtrl_SetEditable(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_SetInsertionPoint(_swigobj,_swigarg0) (_swigobj->SetInsertionPoint(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_SetInsertionPoint(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTextCtrl_SetInsertionPoint",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SetInsertionPoint. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_SetInsertionPoint(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_SetInsertionPointEnd(_swigobj) (_swigobj->SetInsertionPointEnd()) -static PyObject *_wrap_wxTextCtrl_SetInsertionPointEnd(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_SetInsertionPointEnd",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SetInsertionPointEnd. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_SetInsertionPointEnd(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_SetSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSelection(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTextCtrl_SetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxTextCtrl_SetSelection",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SetSelection. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_SetSelection(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_SetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxTextCtrl_SetValue",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SetValue. Expected _wxTextCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxTextCtrl_SetValue(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxTextCtrl_ShowPosition(_swigobj,_swigarg0) (_swigobj->ShowPosition(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_ShowPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTextCtrl_ShowPosition",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_ShowPosition. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_ShowPosition(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_WriteText(_swigobj,_swigarg0) (_swigobj->WriteText(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_WriteText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxTextCtrl_WriteText",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_WriteText. Expected _wxTextCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxTextCtrl_WriteText(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static void *SwigwxScrollBarTowxControl(void *ptr) { - wxScrollBar *src; - wxControl *dest; - src = (wxScrollBar *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxScrollBarTowxWindow(void *ptr) { - wxScrollBar *src; - wxWindow *dest; - src = (wxScrollBar *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxScrollBarTowxEvtHandler(void *ptr) { - wxScrollBar *src; - wxEvtHandler *dest; - src = (wxScrollBar *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxScrollBar(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxScrollBar(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxScrollBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrollBar * _result; - wxWindow * _arg0; - wxWindowID _arg1 = -1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - long _arg4 = (wxSB_HORIZONTAL); - wxValidator * _arg5 = &wxPyDefaultValidator; - char * _arg6 = "scrollBar"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char * _argc5 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|isslss:new_wxScrollBar",&_argc0,&_arg1,&_argc2,&_argc3,&_arg4,&_argc5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxScrollBar. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxScrollBar. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxScrollBar. Expected _wxSize_p."); - return NULL; - } - } - if (_argc5) { - if (SWIG_GetPtr(_argc5,(void **) &_arg5,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of new_wxScrollBar. Expected _wxValidator_p."); - return NULL; - } - } - _result = (wxScrollBar *)new_wxScrollBar(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxScrollBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxScrollBar_GetRange(_swigobj) (_swigobj->GetRange()) -static PyObject *_wrap_wxScrollBar_GetRange(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxScrollBar * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxScrollBar_GetRange",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrollBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollBar_GetRange. Expected _wxScrollBar_p."); - return NULL; - } - } - _result = (int )wxScrollBar_GetRange(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxScrollBar_GetPageSize(_swigobj) (_swigobj->GetPageSize()) -static PyObject *_wrap_wxScrollBar_GetPageSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxScrollBar * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxScrollBar_GetPageSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrollBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollBar_GetPageSize. Expected _wxScrollBar_p."); - return NULL; - } - } - _result = (int )wxScrollBar_GetPageSize(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxScrollBar_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxScrollBar_GetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxScrollBar * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxScrollBar_GetPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrollBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollBar_GetPosition. Expected _wxScrollBar_p."); - return NULL; - } - } - _result = (int )wxScrollBar_GetPosition(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxScrollBar_GetThumbSize(_swigobj) (_swigobj->GetThumbSize()) -static PyObject *_wrap_wxScrollBar_GetThumbSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxScrollBar * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxScrollBar_GetThumbSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrollBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollBar_GetThumbSize. Expected _wxScrollBar_p."); - return NULL; - } - } - _result = (int )wxScrollBar_GetThumbSize(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxScrollBar_SetPosition(_swigobj,_swigarg0) (_swigobj->SetPosition(_swigarg0)) -static PyObject *_wrap_wxScrollBar_SetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrollBar * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxScrollBar_SetPosition",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrollBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollBar_SetPosition. Expected _wxScrollBar_p."); - return NULL; - } - } - wxScrollBar_SetPosition(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxScrollBar_SetScrollbar(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SetScrollbar(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_wxScrollBar_SetScrollbar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrollBar * _arg0; - int _arg1; - int _arg2; - int _arg3; - int _arg4; - bool _arg5 = (1); - char * _argc0 = 0; - int tempbool5; - - self = self; - if(!PyArg_ParseTuple(args,"siiii|i:wxScrollBar_SetScrollbar",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&tempbool5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrollBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollBar_SetScrollbar. Expected _wxScrollBar_p."); - return NULL; - } - } - _arg5 = (bool ) tempbool5; - wxScrollBar_SetScrollbar(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxStaticBitmapTowxControl(void *ptr) { - wxStaticBitmap *src; - wxControl *dest; - src = (wxStaticBitmap *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxStaticBitmapTowxWindow(void *ptr) { - wxStaticBitmap *src; - wxWindow *dest; - src = (wxStaticBitmap *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxStaticBitmapTowxEvtHandler(void *ptr) { - wxStaticBitmap *src; - wxEvtHandler *dest; - src = (wxStaticBitmap *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxStaticBitmap(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxStaticBitmap(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxStaticBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxStaticBitmap * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxBitmap * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = 0; - char * _arg6 = "staticBitmap"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sis|ssls:new_wxStaticBitmap",&_argc0,&_arg1,&_argc2,&_argc3,&_argc4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxStaticBitmap. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxStaticBitmap. Expected _wxBitmap_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxStaticBitmap. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxStaticBitmap. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxStaticBitmap *)new_wxStaticBitmap(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxStaticBitmap_GetBitmap(_swigobj) (_swigobj->GetBitmap()) -static PyObject *_wrap_wxStaticBitmap_GetBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - wxStaticBitmap * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxStaticBitmap_GetBitmap",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxStaticBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStaticBitmap_GetBitmap. Expected _wxStaticBitmap_p."); - return NULL; - } - } - wxBitmap & _result_ref = wxStaticBitmap_GetBitmap(_arg0); - _result = (wxBitmap *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxStaticBitmap_SetBitmap(_swigobj,_swigarg0) (_swigobj->SetBitmap(_swigarg0)) -static PyObject *_wrap_wxStaticBitmap_SetBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxStaticBitmap * _arg0; - wxBitmap * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxStaticBitmap_SetBitmap",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxStaticBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStaticBitmap_SetBitmap. Expected _wxStaticBitmap_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStaticBitmap_SetBitmap. Expected _wxBitmap_p."); - return NULL; - } - } - wxStaticBitmap_SetBitmap(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxRadioBoxTowxControl(void *ptr) { - wxRadioBox *src; - wxControl *dest; - src = (wxRadioBox *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxRadioBoxTowxWindow(void *ptr) { - wxRadioBox *src; - wxWindow *dest; - src = (wxRadioBox *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxRadioBoxTowxEvtHandler(void *ptr) { - wxRadioBox *src; - wxEvtHandler *dest; - src = (wxRadioBox *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxRadioBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9,_swigarg10) (new wxRadioBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9,_swigarg10)) -static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioBox * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - int _arg5 = 0; - wxString * _arg6 = NULL; - int _arg7 = 0; - long _arg8 = (wxRA_HORIZONTAL); - wxValidator * _arg9 = &wxPyDefaultValidator; - char * _arg10 = "radioBox"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - PyObject * _obj6 = 0; - char * _argc9 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|ssOilss:new_wxRadioBox",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_obj6,&_arg7,&_arg8,&_argc9,&_arg10)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxRadioBox. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxRadioBox. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxRadioBox. Expected _wxSize_p."); - return NULL; - } - } - if (_obj6) -{ - _arg6 = wxString_LIST_helper(_obj6); - if (_arg6 == NULL) { - return NULL; - } -} - if (_argc9) { - if (SWIG_GetPtr(_argc9,(void **) &_arg9,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 10 of new_wxRadioBox. Expected _wxValidator_p."); - return NULL; - } - } -{ - _arg5 = PyList_Size(_obj6); -} - _result = (wxRadioBox *)new_wxRadioBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,*_arg9,_arg10); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxRadioBox_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} -{ - delete [] _arg6; -} - return _resultobj; -} - -#define wxRadioBox_EnableBox(_swigobj,_swigarg0) (_swigobj->Enable(_swigarg0)) -static PyObject *_wrap_wxRadioBox_EnableBox(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioBox * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxRadioBox_EnableBox",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_EnableBox. Expected _wxRadioBox_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxRadioBox_EnableBox(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxRadioBox_Enable(_swigobj,_swigarg0,_swigarg1) (_swigobj->Enable(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxRadioBox_Enable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioBox * _arg0; - int _arg1; - bool _arg2; - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxRadioBox_Enable",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_Enable. Expected _wxRadioBox_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - wxRadioBox_Enable(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxRadioBox_FindString(_swigobj,_swigarg0) (_swigobj->FindString(_swigarg0)) -static PyObject *_wrap_wxRadioBox_FindString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxRadioBox * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxRadioBox_FindString",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_FindString. Expected _wxRadioBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (int )wxRadioBox_FindString(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxRadioBox_GetBoxLabel(_swigobj) (_swigobj->GetLabel()) -static PyObject *_wrap_wxRadioBox_GetBoxLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxRadioBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRadioBox_GetBoxLabel",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_GetBoxLabel. Expected _wxRadioBox_p."); - return NULL; - } - } - _result = new wxString (wxRadioBox_GetBoxLabel(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxRadioBox_GetLabel(_swigobj,_swigarg0) (_swigobj->GetLabel(_swigarg0)) -static PyObject *_wrap_wxRadioBox_GetLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxRadioBox * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxRadioBox_GetLabel",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_GetLabel. Expected _wxRadioBox_p."); - return NULL; - } - } - _result = new wxString (wxRadioBox_GetLabel(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxRadioBox_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxRadioBox_GetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxRadioBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRadioBox_GetSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_GetSelection. Expected _wxRadioBox_p."); - return NULL; - } - } - _result = (int )wxRadioBox_GetSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRadioBox_GetString(_swigobj,_swigarg0) (_swigobj->GetString(_swigarg0)) -static PyObject *_wrap_wxRadioBox_GetString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxRadioBox * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxRadioBox_GetString",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_GetString. Expected _wxRadioBox_p."); - return NULL; - } - } - _result = new wxString (wxRadioBox_GetString(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxRadioBox_GetStringSelection(_swigobj) (_swigobj->GetStringSelection()) -static PyObject *_wrap_wxRadioBox_GetStringSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxRadioBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRadioBox_GetStringSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_GetStringSelection. Expected _wxRadioBox_p."); - return NULL; - } - } - _result = new wxString (wxRadioBox_GetStringSelection(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxRadioBox_Number(_swigobj) (_swigobj->Number()) -static PyObject *_wrap_wxRadioBox_Number(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxRadioBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRadioBox_Number",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_Number. Expected _wxRadioBox_p."); - return NULL; - } - } - _result = (int )wxRadioBox_Number(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRadioBox_SetBoxLabel(_swigobj,_swigarg0) (_swigobj->SetLabel(_swigarg0)) -static PyObject *_wrap_wxRadioBox_SetBoxLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioBox * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxRadioBox_SetBoxLabel",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_SetBoxLabel. Expected _wxRadioBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxRadioBox_SetBoxLabel(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxRadioBox_SetLabel(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetLabel(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxRadioBox_SetLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioBox * _arg0; - int _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siO:wxRadioBox_SetLabel",&_argc0,&_arg1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_SetLabel. Expected _wxRadioBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - wxRadioBox_SetLabel(_arg0,_arg1,*_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxRadioBox_SetSelection(_swigobj,_swigarg0) (_swigobj->SetSelection(_swigarg0)) -static PyObject *_wrap_wxRadioBox_SetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioBox * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxRadioBox_SetSelection",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_SetSelection. Expected _wxRadioBox_p."); - return NULL; - } - } - wxRadioBox_SetSelection(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxRadioBox_SetStringSelection(_swigobj,_swigarg0) (_swigobj->SetStringSelection(_swigarg0)) -static PyObject *_wrap_wxRadioBox_SetStringSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioBox * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxRadioBox_SetStringSelection",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_SetStringSelection. Expected _wxRadioBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxRadioBox_SetStringSelection(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxRadioBox_Show(_swigobj,_swigarg0) (_swigobj->Show(_swigarg0)) -static PyObject *_wrap_wxRadioBox_Show(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioBox * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxRadioBox_Show",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_Show. Expected _wxRadioBox_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxRadioBox_Show(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxRadioBox_ShowItem(_swigobj,_swigarg0,_swigarg1) (_swigobj->Show(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxRadioBox_ShowItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioBox * _arg0; - int _arg1; - bool _arg2; - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxRadioBox_ShowItem",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_ShowItem. Expected _wxRadioBox_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - wxRadioBox_ShowItem(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxRadioButtonTowxControl(void *ptr) { - wxRadioButton *src; - wxControl *dest; - src = (wxRadioButton *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxRadioButtonTowxWindow(void *ptr) { - wxRadioButton *src; - wxWindow *dest; - src = (wxRadioButton *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxRadioButtonTowxEvtHandler(void *ptr) { - wxRadioButton *src; - wxEvtHandler *dest; - src = (wxRadioButton *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxRadioButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxRadioButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) -static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioButton * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = 0; - wxValidator * _arg6 = &wxPyDefaultValidator; - char * _arg7 = "radioButton"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char * _argc6 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|sslss:new_wxRadioButton",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_arg5,&_argc6,&_arg7)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxRadioButton. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxRadioButton. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxRadioButton. Expected _wxSize_p."); - return NULL; - } - } - if (_argc6) { - if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxRadioButton. Expected _wxValidator_p."); - return NULL; - } - } - _result = (wxRadioButton *)new_wxRadioButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxRadioButton_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxRadioButton_GetValue(_swigobj) (_swigobj->GetValue()) -static PyObject *_wrap_wxRadioButton_GetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxRadioButton * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRadioButton_GetValue",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioButton_GetValue. Expected _wxRadioButton_p."); - return NULL; - } - } - _result = (bool )wxRadioButton_GetValue(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRadioButton_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) -static PyObject *_wrap_wxRadioButton_SetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioButton * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxRadioButton_SetValue",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioButton_SetValue. Expected _wxRadioButton_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxRadioButton_SetValue(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxSliderTowxControl(void *ptr) { - wxSlider *src; - wxControl *dest; - src = (wxSlider *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxSliderTowxWindow(void *ptr) { - wxSlider *src; - wxWindow *dest; - src = (wxSlider *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxSliderTowxEvtHandler(void *ptr) { - wxSlider *src; - wxEvtHandler *dest; - src = (wxSlider *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxSlider(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9) (new wxSlider(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9)) -static PyObject *_wrap_new_wxSlider(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _result; - wxWindow * _arg0; - wxWindowID _arg1; - int _arg2; - int _arg3; - int _arg4; - wxPoint * _arg5 = &wxPyDefaultPosition; - wxSize * _arg6 = &wxPyDefaultSize; - long _arg7 = (wxSL_HORIZONTAL); - wxValidator * _arg8 = &wxPyDefaultValidator; - char * _arg9 = "slider"; - char * _argc0 = 0; - char * _argc5 = 0; - char * _argc6 = 0; - char * _argc8 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siiii|sslss:new_wxSlider",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_argc5,&_argc6,&_arg7,&_argc8,&_arg9)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxSlider. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc5) { - if (SWIG_GetPtr(_argc5,(void **) &_arg5,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of new_wxSlider. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc6) { - if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxSlider. Expected _wxSize_p."); - return NULL; - } - } - if (_argc8) { - if (SWIG_GetPtr(_argc8,(void **) &_arg8,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of new_wxSlider. Expected _wxValidator_p."); - return NULL; - } - } - _result = (wxSlider *)new_wxSlider(_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5,*_arg6,_arg7,*_arg8,_arg9); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxSlider_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxSlider_ClearSel(_swigobj) (_swigobj->ClearSel()) -static PyObject *_wrap_wxSlider_ClearSel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_ClearSel",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_ClearSel. Expected _wxSlider_p."); - return NULL; - } - } - wxSlider_ClearSel(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSlider_ClearTicks(_swigobj) (_swigobj->ClearTicks()) -static PyObject *_wrap_wxSlider_ClearTicks(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_ClearTicks",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_ClearTicks. Expected _wxSlider_p."); - return NULL; - } - } - wxSlider_ClearTicks(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSlider_GetLineSize(_swigobj) (_swigobj->GetLineSize()) -static PyObject *_wrap_wxSlider_GetLineSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_GetLineSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_GetLineSize. Expected _wxSlider_p."); - return NULL; - } - } - _result = (int )wxSlider_GetLineSize(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSlider_GetMax(_swigobj) (_swigobj->GetMax()) -static PyObject *_wrap_wxSlider_GetMax(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_GetMax",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_GetMax. Expected _wxSlider_p."); - return NULL; - } - } - _result = (int )wxSlider_GetMax(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSlider_GetMin(_swigobj) (_swigobj->GetMin()) -static PyObject *_wrap_wxSlider_GetMin(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_GetMin",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_GetMin. Expected _wxSlider_p."); - return NULL; - } - } - _result = (int )wxSlider_GetMin(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSlider_GetPageSize(_swigobj) (_swigobj->GetPageSize()) -static PyObject *_wrap_wxSlider_GetPageSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_GetPageSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_GetPageSize. Expected _wxSlider_p."); - return NULL; - } - } - _result = (int )wxSlider_GetPageSize(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSlider_GetSelEnd(_swigobj) (_swigobj->GetSelEnd()) -static PyObject *_wrap_wxSlider_GetSelEnd(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_GetSelEnd",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_GetSelEnd. Expected _wxSlider_p."); - return NULL; - } - } - _result = (int )wxSlider_GetSelEnd(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSlider_GetSelStart(_swigobj) (_swigobj->GetSelStart()) -static PyObject *_wrap_wxSlider_GetSelStart(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_GetSelStart",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_GetSelStart. Expected _wxSlider_p."); - return NULL; - } - } - _result = (int )wxSlider_GetSelStart(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSlider_GetThumbLength(_swigobj) (_swigobj->GetThumbLength()) -static PyObject *_wrap_wxSlider_GetThumbLength(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_GetThumbLength",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_GetThumbLength. Expected _wxSlider_p."); - return NULL; - } - } - _result = (int )wxSlider_GetThumbLength(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSlider_GetTickFreq(_swigobj) (_swigobj->GetTickFreq()) -static PyObject *_wrap_wxSlider_GetTickFreq(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_GetTickFreq",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_GetTickFreq. Expected _wxSlider_p."); - return NULL; - } - } - _result = (int )wxSlider_GetTickFreq(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSlider_GetValue(_swigobj) (_swigobj->GetValue()) -static PyObject *_wrap_wxSlider_GetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_GetValue",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_GetValue. Expected _wxSlider_p."); - return NULL; - } - } - _result = (int )wxSlider_GetValue(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSlider_SetRange(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRange(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxSlider_SetRange(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxSlider_SetRange",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_SetRange. Expected _wxSlider_p."); - return NULL; - } - } - wxSlider_SetRange(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSlider_SetTickFreq(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetTickFreq(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxSlider_SetTickFreq(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxSlider_SetTickFreq",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_SetTickFreq. Expected _wxSlider_p."); - return NULL; - } - } - wxSlider_SetTickFreq(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSlider_SetLineSize(_swigobj,_swigarg0) (_swigobj->SetLineSize(_swigarg0)) -static PyObject *_wrap_wxSlider_SetLineSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxSlider_SetLineSize",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_SetLineSize. Expected _wxSlider_p."); - return NULL; - } - } - wxSlider_SetLineSize(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSlider_SetPageSize(_swigobj,_swigarg0) (_swigobj->SetPageSize(_swigarg0)) -static PyObject *_wrap_wxSlider_SetPageSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxSlider_SetPageSize",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_SetPageSize. Expected _wxSlider_p."); - return NULL; - } - } - wxSlider_SetPageSize(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSlider_SetSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSelection(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxSlider_SetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxSlider_SetSelection",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_SetSelection. Expected _wxSlider_p."); - return NULL; - } - } - wxSlider_SetSelection(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSlider_SetThumbLength(_swigobj,_swigarg0) (_swigobj->SetThumbLength(_swigarg0)) -static PyObject *_wrap_wxSlider_SetThumbLength(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxSlider_SetThumbLength",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_SetThumbLength. Expected _wxSlider_p."); - return NULL; - } - } - wxSlider_SetThumbLength(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSlider_SetTick(_swigobj,_swigarg0) (_swigobj->SetTick(_swigarg0)) -static PyObject *_wrap_wxSlider_SetTick(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxSlider_SetTick",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_SetTick. Expected _wxSlider_p."); - return NULL; - } - } - wxSlider_SetTick(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSlider_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) -static PyObject *_wrap_wxSlider_SetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxSlider_SetValue",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_SetValue. Expected _wxSlider_p."); - return NULL; - } - } - wxSlider_SetValue(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyMethodDef controlscMethods[] = { - { "wxSlider_SetValue", _wrap_wxSlider_SetValue, 1 }, - { "wxSlider_SetTick", _wrap_wxSlider_SetTick, 1 }, - { "wxSlider_SetThumbLength", _wrap_wxSlider_SetThumbLength, 1 }, - { "wxSlider_SetSelection", _wrap_wxSlider_SetSelection, 1 }, - { "wxSlider_SetPageSize", _wrap_wxSlider_SetPageSize, 1 }, - { "wxSlider_SetLineSize", _wrap_wxSlider_SetLineSize, 1 }, - { "wxSlider_SetTickFreq", _wrap_wxSlider_SetTickFreq, 1 }, - { "wxSlider_SetRange", _wrap_wxSlider_SetRange, 1 }, - { "wxSlider_GetValue", _wrap_wxSlider_GetValue, 1 }, - { "wxSlider_GetTickFreq", _wrap_wxSlider_GetTickFreq, 1 }, - { "wxSlider_GetThumbLength", _wrap_wxSlider_GetThumbLength, 1 }, - { "wxSlider_GetSelStart", _wrap_wxSlider_GetSelStart, 1 }, - { "wxSlider_GetSelEnd", _wrap_wxSlider_GetSelEnd, 1 }, - { "wxSlider_GetPageSize", _wrap_wxSlider_GetPageSize, 1 }, - { "wxSlider_GetMin", _wrap_wxSlider_GetMin, 1 }, - { "wxSlider_GetMax", _wrap_wxSlider_GetMax, 1 }, - { "wxSlider_GetLineSize", _wrap_wxSlider_GetLineSize, 1 }, - { "wxSlider_ClearTicks", _wrap_wxSlider_ClearTicks, 1 }, - { "wxSlider_ClearSel", _wrap_wxSlider_ClearSel, 1 }, - { "new_wxSlider", _wrap_new_wxSlider, 1 }, - { "wxRadioButton_SetValue", _wrap_wxRadioButton_SetValue, 1 }, - { "wxRadioButton_GetValue", _wrap_wxRadioButton_GetValue, 1 }, - { "new_wxRadioButton", _wrap_new_wxRadioButton, 1 }, - { "wxRadioBox_ShowItem", _wrap_wxRadioBox_ShowItem, 1 }, - { "wxRadioBox_Show", _wrap_wxRadioBox_Show, 1 }, - { "wxRadioBox_SetStringSelection", _wrap_wxRadioBox_SetStringSelection, 1 }, - { "wxRadioBox_SetSelection", _wrap_wxRadioBox_SetSelection, 1 }, - { "wxRadioBox_SetLabel", _wrap_wxRadioBox_SetLabel, 1 }, - { "wxRadioBox_SetBoxLabel", _wrap_wxRadioBox_SetBoxLabel, 1 }, - { "wxRadioBox_Number", _wrap_wxRadioBox_Number, 1 }, - { "wxRadioBox_GetStringSelection", _wrap_wxRadioBox_GetStringSelection, 1 }, - { "wxRadioBox_GetString", _wrap_wxRadioBox_GetString, 1 }, - { "wxRadioBox_GetSelection", _wrap_wxRadioBox_GetSelection, 1 }, - { "wxRadioBox_GetLabel", _wrap_wxRadioBox_GetLabel, 1 }, - { "wxRadioBox_GetBoxLabel", _wrap_wxRadioBox_GetBoxLabel, 1 }, - { "wxRadioBox_FindString", _wrap_wxRadioBox_FindString, 1 }, - { "wxRadioBox_Enable", _wrap_wxRadioBox_Enable, 1 }, - { "wxRadioBox_EnableBox", _wrap_wxRadioBox_EnableBox, 1 }, - { "new_wxRadioBox", _wrap_new_wxRadioBox, 1 }, - { "wxStaticBitmap_SetBitmap", _wrap_wxStaticBitmap_SetBitmap, 1 }, - { "wxStaticBitmap_GetBitmap", _wrap_wxStaticBitmap_GetBitmap, 1 }, - { "new_wxStaticBitmap", _wrap_new_wxStaticBitmap, 1 }, - { "wxScrollBar_SetScrollbar", _wrap_wxScrollBar_SetScrollbar, 1 }, - { "wxScrollBar_SetPosition", _wrap_wxScrollBar_SetPosition, 1 }, - { "wxScrollBar_GetThumbSize", _wrap_wxScrollBar_GetThumbSize, 1 }, - { "wxScrollBar_GetPosition", _wrap_wxScrollBar_GetPosition, 1 }, - { "wxScrollBar_GetPageSize", _wrap_wxScrollBar_GetPageSize, 1 }, - { "wxScrollBar_GetRange", _wrap_wxScrollBar_GetRange, 1 }, - { "new_wxScrollBar", _wrap_new_wxScrollBar, 1 }, - { "wxTextCtrl_WriteText", _wrap_wxTextCtrl_WriteText, 1 }, - { "wxTextCtrl_ShowPosition", _wrap_wxTextCtrl_ShowPosition, 1 }, - { "wxTextCtrl_SetValue", _wrap_wxTextCtrl_SetValue, 1 }, - { "wxTextCtrl_SetSelection", _wrap_wxTextCtrl_SetSelection, 1 }, - { "wxTextCtrl_SetInsertionPointEnd", _wrap_wxTextCtrl_SetInsertionPointEnd, 1 }, - { "wxTextCtrl_SetInsertionPoint", _wrap_wxTextCtrl_SetInsertionPoint, 1 }, - { "wxTextCtrl_SetEditable", _wrap_wxTextCtrl_SetEditable, 1 }, - { "wxTextCtrl_SaveFile", _wrap_wxTextCtrl_SaveFile, 1 }, - { "wxTextCtrl_Replace", _wrap_wxTextCtrl_Replace, 1 }, - { "wxTextCtrl_Remove", _wrap_wxTextCtrl_Remove, 1 }, - { "wxTextCtrl_Paste", _wrap_wxTextCtrl_Paste, 1 }, - { "wxTextCtrl_LoadFile", _wrap_wxTextCtrl_LoadFile, 1 }, - { "wxTextCtrl_IsModified", _wrap_wxTextCtrl_IsModified, 1 }, - { "wxTextCtrl_GetValue", _wrap_wxTextCtrl_GetValue, 1 }, - { "wxTextCtrl_GetLastPosition", _wrap_wxTextCtrl_GetLastPosition, 1 }, - { "wxTextCtrl_GetInsertionPoint", _wrap_wxTextCtrl_GetInsertionPoint, 1 }, - { "wxTextCtrl_DiscardEdits", _wrap_wxTextCtrl_DiscardEdits, 1 }, - { "wxTextCtrl_Cut", _wrap_wxTextCtrl_Cut, 1 }, - { "wxTextCtrl_Copy", _wrap_wxTextCtrl_Copy, 1 }, - { "wxTextCtrl_Clear", _wrap_wxTextCtrl_Clear, 1 }, - { "new_wxTextCtrl", _wrap_new_wxTextCtrl, 1 }, - { "wxListBox_SetStringSelection", _wrap_wxListBox_SetStringSelection, 1 }, - { "wxListBox_SetString", _wrap_wxListBox_SetString, 1 }, - { "wxListBox_SetSelection", _wrap_wxListBox_SetSelection, 1 }, - { "wxListBox_SetFirstItemStr", _wrap_wxListBox_SetFirstItemStr, 1 }, - { "wxListBox_SetFirstItem", _wrap_wxListBox_SetFirstItem, 1 }, - { "wxListBox_Set", _wrap_wxListBox_Set, 1 }, - { "wxListBox_Selected", _wrap_wxListBox_Selected, 1 }, - { "wxListBox_Number", _wrap_wxListBox_Number, 1 }, - { "wxListBox_GetStringSelection", _wrap_wxListBox_GetStringSelection, 1 }, - { "wxListBox_GetString", _wrap_wxListBox_GetString, 1 }, - { "wxListBox_GetSelection", _wrap_wxListBox_GetSelection, 1 }, - { "wxListBox_FindString", _wrap_wxListBox_FindString, 1 }, - { "wxListBox_Deselect", _wrap_wxListBox_Deselect, 1 }, - { "wxListBox_Delete", _wrap_wxListBox_Delete, 1 }, - { "wxListBox_Clear", _wrap_wxListBox_Clear, 1 }, - { "wxListBox_Append", _wrap_wxListBox_Append, 1 }, - { "new_wxListBox", _wrap_new_wxListBox, 1 }, - { "wxStaticText_SetLabel", _wrap_wxStaticText_SetLabel, 1 }, - { "wxStaticText_GetLabel", _wrap_wxStaticText_GetLabel, 1 }, - { "new_wxStaticText", _wrap_new_wxStaticText, 1 }, - { "new_wxStaticBox", _wrap_new_wxStaticBox, 1 }, - { "wxGauge_SetValue", _wrap_wxGauge_SetValue, 1 }, - { "wxGauge_SetShadowWidth", _wrap_wxGauge_SetShadowWidth, 1 }, - { "wxGauge_SetRange", _wrap_wxGauge_SetRange, 1 }, - { "wxGauge_SetBezelFace", _wrap_wxGauge_SetBezelFace, 1 }, - { "wxGauge_GetValue", _wrap_wxGauge_GetValue, 1 }, - { "wxGauge_GetShadowWidth", _wrap_wxGauge_GetShadowWidth, 1 }, - { "wxGauge_GetRange", _wrap_wxGauge_GetRange, 1 }, - { "wxGauge_GetBezelFace", _wrap_wxGauge_GetBezelFace, 1 }, - { "new_wxGauge", _wrap_new_wxGauge, 1 }, - { "wxComboBox_SetValue", _wrap_wxComboBox_SetValue, 1 }, - { "wxComboBox_SetMark", _wrap_wxComboBox_SetMark, 1 }, - { "wxComboBox_SetSelection", _wrap_wxComboBox_SetSelection, 1 }, - { "wxComboBox_SetInsertionPointEnd", _wrap_wxComboBox_SetInsertionPointEnd, 1 }, - { "wxComboBox_SetInsertionPoint", _wrap_wxComboBox_SetInsertionPoint, 1 }, - { "wxComboBox_Remove", _wrap_wxComboBox_Remove, 1 }, - { "wxComboBox_Replace", _wrap_wxComboBox_Replace, 1 }, - { "wxComboBox_Paste", _wrap_wxComboBox_Paste, 1 }, - { "wxComboBox_Number", _wrap_wxComboBox_Number, 1 }, - { "wxComboBox_GetValue", _wrap_wxComboBox_GetValue, 1 }, - { "wxComboBox_GetStringSelection", _wrap_wxComboBox_GetStringSelection, 1 }, - { "wxComboBox_GetString", _wrap_wxComboBox_GetString, 1 }, - { "wxComboBox_GetSelection", _wrap_wxComboBox_GetSelection, 1 }, - { "wxComboBox_GetLastPosition", _wrap_wxComboBox_GetLastPosition, 1 }, - { "wxComboBox_GetInsertionPoint", _wrap_wxComboBox_GetInsertionPoint, 1 }, - { "wxComboBox_FindString", _wrap_wxComboBox_FindString, 1 }, - { "wxComboBox_Delete", _wrap_wxComboBox_Delete, 1 }, - { "wxComboBox_Cut", _wrap_wxComboBox_Cut, 1 }, - { "wxComboBox_Copy", _wrap_wxComboBox_Copy, 1 }, - { "wxComboBox_Clear", _wrap_wxComboBox_Clear, 1 }, - { "wxComboBox_Append", _wrap_wxComboBox_Append, 1 }, - { "new_wxComboBox", _wrap_new_wxComboBox, 1 }, - { "wxChoice_SetStringSelection", _wrap_wxChoice_SetStringSelection, 1 }, - { "wxChoice_SetSelection", _wrap_wxChoice_SetSelection, 1 }, - { "wxChoice_SetColumns", _wrap_wxChoice_SetColumns, 1 }, - { "wxChoice_Number", _wrap_wxChoice_Number, 1 }, - { "wxChoice_GetStringSelection", _wrap_wxChoice_GetStringSelection, 1 }, - { "wxChoice_GetString", _wrap_wxChoice_GetString, 1 }, - { "wxChoice_GetSelection", _wrap_wxChoice_GetSelection, 1 }, - { "wxChoice_GetColumns", _wrap_wxChoice_GetColumns, 1 }, - { "wxChoice_FindString", _wrap_wxChoice_FindString, 1 }, - { "wxChoice_Clear", _wrap_wxChoice_Clear, 1 }, - { "wxChoice_Append", _wrap_wxChoice_Append, 1 }, - { "new_wxChoice", _wrap_new_wxChoice, 1 }, - { "wxCheckBox_SetValue", _wrap_wxCheckBox_SetValue, 1 }, - { "wxCheckBox_GetValue", _wrap_wxCheckBox_GetValue, 1 }, - { "new_wxCheckBox", _wrap_new_wxCheckBox, 1 }, - { "wxBitmapButton_SetBitmapLabel", _wrap_wxBitmapButton_SetBitmapLabel, 1 }, - { "wxBitmapButton_GetBitmapLabel", _wrap_wxBitmapButton_GetBitmapLabel, 1 }, - { "new_wxBitmapButton", _wrap_new_wxBitmapButton, 1 }, - { "wxButton_SetDefault", _wrap_wxButton_SetDefault, 1 }, - { "new_wxButton", _wrap_new_wxButton, 1 }, - { "wxControl_SetLabel", _wrap_wxControl_SetLabel, 1 }, - { "wxControl_GetLabel", _wrap_wxControl_GetLabel, 1 }, - { "wxControl_Command", _wrap_wxControl_Command, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initcontrolsc)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("controlsc", controlscMethods); - d = PyModule_GetDict(m); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_wxEvent","_class_wxEvent",0); - SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0); - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0); - SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxSlider",SwigwxSliderTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxSlider",SwigwxSliderTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxRadioButton",SwigwxRadioButtonTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxRadioButton",SwigwxRadioButtonTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxRadioBox",SwigwxRadioBoxTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxRadioBox",SwigwxRadioBoxTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxStaticBitmap",SwigwxStaticBitmapTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxStaticBitmap",SwigwxStaticBitmapTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxScrollBar",SwigwxScrollBarTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxScrollBar",SwigwxScrollBarTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxTextCtrl",SwigwxTextCtrlTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxTextCtrl",SwigwxTextCtrlTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxListBox",SwigwxListBoxTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxListBox",SwigwxListBoxTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxStaticText",SwigwxStaticTextTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxStaticText",SwigwxStaticTextTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxStaticBox",SwigwxStaticBoxTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxStaticBox",SwigwxStaticBoxTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxGauge",SwigwxGaugeTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxGauge",SwigwxGaugeTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxComboBox",SwigwxComboBoxTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxComboBox",SwigwxComboBoxTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxChoice",SwigwxChoiceTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxChoice",SwigwxChoiceTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxCheckBox",SwigwxCheckBoxTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxCheckBox",SwigwxCheckBoxTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxBitmapButton",SwigwxBitmapButtonTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxBitmapButton",SwigwxBitmapButtonTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxButton",SwigwxButtonTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxButton",SwigwxButtonTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxControl",SwigwxControlTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxControl",SwigwxControlTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxEvtHandler",0); - SWIG_RegisterMapping("_wxPaintEvent","_class_wxPaintEvent",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); - SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); - SWIG_RegisterMapping("_wxPen","_class_wxPen",0); - SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_wxStaticBox","_class_wxStaticBox",0); - SWIG_RegisterMapping("_wxChoice","_class_wxChoice",0); - SWIG_RegisterMapping("_wxSlider","_class_wxSlider",0); - SWIG_RegisterMapping("_long","_wxDash",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_wxDropFilesEvent","_class_wxDropFilesEvent",0); - SWIG_RegisterMapping("_wxBitmapButton","_class_wxBitmapButton",0); - SWIG_RegisterMapping("_class_wxGauge","_wxGauge",0); - SWIG_RegisterMapping("_wxDC","_class_wxDC",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_class_wxMenuItem","_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxPaintEvent","_wxPaintEvent",0); - SWIG_RegisterMapping("_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxPanel","_class_wxPanel",0); - SWIG_RegisterMapping("_wxInitDialogEvent","_class_wxInitDialogEvent",0); - SWIG_RegisterMapping("_wxCheckBox","_class_wxCheckBox",0); - SWIG_RegisterMapping("_wxTextCtrl","_class_wxTextCtrl",0); - SWIG_RegisterMapping("_class_wxMask","_wxMask",0); - SWIG_RegisterMapping("_class_wxKeyEvent","_wxKeyEvent",0); - SWIG_RegisterMapping("_wxColour","_class_wxColour",0); - SWIG_RegisterMapping("_class_wxDialog","_wxDialog",0); - SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); - SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); - SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxEvent","_wxEvent",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxCommandEvent","_class_wxCommandEvent",0); - SWIG_RegisterMapping("_wxSizeEvent","_class_wxSizeEvent",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_class_wxButton","_class_wxBitmapButton",SwigwxBitmapButtonTowxButton); - SWIG_RegisterMapping("_class_wxButton","_wxBitmapButton",SwigwxBitmapButtonTowxButton); - SWIG_RegisterMapping("_class_wxButton","_wxButton",0); - SWIG_RegisterMapping("_wxRadioBox","_class_wxRadioBox",0); - SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_wxScrollBar","_class_wxScrollBar",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0); - SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0); - SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxDropFilesEvent","_wxDropFilesEvent",0); - SWIG_RegisterMapping("_wxStaticText","_class_wxStaticText",0); - SWIG_RegisterMapping("_wxFont","_class_wxFont",0); - SWIG_RegisterMapping("_wxCloseEvent","_class_wxCloseEvent",0); - SWIG_RegisterMapping("_unsigned_long","_wxDash",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxDC","_wxDC",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_wxFocusEvent","_class_wxFocusEvent",0); - SWIG_RegisterMapping("_wxMaximizeEvent","_class_wxMaximizeEvent",0); - SWIG_RegisterMapping("_class_wxPanel","_wxPanel",0); - SWIG_RegisterMapping("_class_wxCheckBox","_wxCheckBox",0); - SWIG_RegisterMapping("_wxComboBox","_class_wxComboBox",0); - SWIG_RegisterMapping("_wxRadioButton","_class_wxRadioButton",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_class_wxTextCtrl","_wxTextCtrl",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxMenu","_class_wxMenu",0); - SWIG_RegisterMapping("_class_wxMoveEvent","_wxMoveEvent",0); - SWIG_RegisterMapping("_wxListBox","_class_wxListBox",0); - SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_class_wxBrush","_wxBrush",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxWindow","_class_wxSlider",SwigwxSliderTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxSlider",SwigwxSliderTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxRadioButton",SwigwxRadioButtonTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxRadioButton",SwigwxRadioButtonTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxRadioBox",SwigwxRadioBoxTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxRadioBox",SwigwxRadioBoxTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxStaticBitmap",SwigwxStaticBitmapTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxStaticBitmap",SwigwxStaticBitmapTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxScrollBar",SwigwxScrollBarTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxScrollBar",SwigwxScrollBarTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxTextCtrl",SwigwxTextCtrlTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxTextCtrl",SwigwxTextCtrlTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxListBox",SwigwxListBoxTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxListBox",SwigwxListBoxTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxStaticText",SwigwxStaticTextTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxStaticText",SwigwxStaticTextTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxStaticBox",SwigwxStaticBoxTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxStaticBox",SwigwxStaticBoxTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxGauge",SwigwxGaugeTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxGauge",SwigwxGaugeTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxComboBox",SwigwxComboBoxTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxComboBox",SwigwxComboBoxTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxChoice",SwigwxChoiceTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxChoice",SwigwxChoiceTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxCheckBox",SwigwxCheckBoxTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxCheckBox",SwigwxCheckBoxTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxBitmapButton",SwigwxBitmapButtonTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxBitmapButton",SwigwxBitmapButtonTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxButton",SwigwxButtonTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxButton",SwigwxButtonTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxControl",SwigwxControlTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxControl",SwigwxControlTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxWindow",0); - SWIG_RegisterMapping("_class_wxStaticText","_wxStaticText",0); - SWIG_RegisterMapping("_class_wxFont","_wxFont",0); - SWIG_RegisterMapping("_class_wxCloseEvent","_wxCloseEvent",0); - SWIG_RegisterMapping("_class_wxMenuEvent","_wxMenuEvent",0); - SWIG_RegisterMapping("_wxClientDC","_class_wxClientDC",0); - SWIG_RegisterMapping("_wxMouseEvent","_class_wxMouseEvent",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_class_wxRadioBox","_wxRadioBox",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_wxMemoryDC","_class_wxMemoryDC",0); - SWIG_RegisterMapping("_wxPaintDC","_class_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxFocusEvent","_wxFocusEvent",0); - SWIG_RegisterMapping("_class_wxMaximizeEvent","_wxMaximizeEvent",0); - SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); - SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_class_wxMenu","_wxMenu",0); - SWIG_RegisterMapping("_wxControl","_class_wxSlider",SwigwxSliderTowxControl); - SWIG_RegisterMapping("_wxControl","_wxSlider",SwigwxSliderTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxRadioButton",SwigwxRadioButtonTowxControl); - SWIG_RegisterMapping("_wxControl","_wxRadioButton",SwigwxRadioButtonTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxRadioBox",SwigwxRadioBoxTowxControl); - SWIG_RegisterMapping("_wxControl","_wxRadioBox",SwigwxRadioBoxTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxStaticBitmap",SwigwxStaticBitmapTowxControl); - SWIG_RegisterMapping("_wxControl","_wxStaticBitmap",SwigwxStaticBitmapTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxScrollBar",SwigwxScrollBarTowxControl); - SWIG_RegisterMapping("_wxControl","_wxScrollBar",SwigwxScrollBarTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxTextCtrl",SwigwxTextCtrlTowxControl); - SWIG_RegisterMapping("_wxControl","_wxTextCtrl",SwigwxTextCtrlTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxListBox",SwigwxListBoxTowxControl); - SWIG_RegisterMapping("_wxControl","_wxListBox",SwigwxListBoxTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxStaticText",SwigwxStaticTextTowxControl); - SWIG_RegisterMapping("_wxControl","_wxStaticText",SwigwxStaticTextTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxStaticBox",SwigwxStaticBoxTowxControl); - SWIG_RegisterMapping("_wxControl","_wxStaticBox",SwigwxStaticBoxTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxGauge",SwigwxGaugeTowxControl); - SWIG_RegisterMapping("_wxControl","_wxGauge",SwigwxGaugeTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxComboBox",SwigwxComboBoxTowxControl); - SWIG_RegisterMapping("_wxControl","_wxComboBox",SwigwxComboBoxTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxChoice",SwigwxChoiceTowxControl); - SWIG_RegisterMapping("_wxControl","_wxChoice",SwigwxChoiceTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxCheckBox",SwigwxCheckBoxTowxControl); - SWIG_RegisterMapping("_wxControl","_wxCheckBox",SwigwxCheckBoxTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxBitmapButton",SwigwxBitmapButtonTowxControl); - SWIG_RegisterMapping("_wxControl","_wxBitmapButton",SwigwxBitmapButtonTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxButton",SwigwxButtonTowxControl); - SWIG_RegisterMapping("_wxControl","_wxButton",SwigwxButtonTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxControl",0); - SWIG_RegisterMapping("_class_wxListBox","_wxListBox",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); - SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); - SWIG_RegisterMapping("_class_wxPen","_wxPen",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_class_wxStaticBox","_wxStaticBox",0); - SWIG_RegisterMapping("_class_wxScrollEvent","_wxScrollEvent",0); - SWIG_RegisterMapping("_wxJoystickEvent","_class_wxJoystickEvent",0); - SWIG_RegisterMapping("_class_wxChoice","_wxChoice",0); - SWIG_RegisterMapping("_class_wxSlider","_wxSlider",0); - SWIG_RegisterMapping("_class_wxBitmapButton","_wxBitmapButton",0); - SWIG_RegisterMapping("_wxFrame","_class_wxFrame",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_class_wxMouseEvent","_wxMouseEvent",0); - SWIG_RegisterMapping("_wxButton","_class_wxBitmapButton",SwigwxBitmapButtonTowxButton); - SWIG_RegisterMapping("_wxButton","_wxBitmapButton",SwigwxBitmapButtonTowxButton); - SWIG_RegisterMapping("_wxButton","_class_wxButton",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxPaintDC","_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_class_wxInitDialogEvent","_wxInitDialogEvent",0); - SWIG_RegisterMapping("_class_wxComboBox","_wxComboBox",0); - SWIG_RegisterMapping("_class_wxRadioButton","_wxRadioButton",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxIconizeEvent","_class_wxIconizeEvent",0); - SWIG_RegisterMapping("_class_wxControl","_class_wxSlider",SwigwxSliderTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxSlider",SwigwxSliderTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxRadioButton",SwigwxRadioButtonTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxRadioButton",SwigwxRadioButtonTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxRadioBox",SwigwxRadioBoxTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxRadioBox",SwigwxRadioBoxTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxStaticBitmap",SwigwxStaticBitmapTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxStaticBitmap",SwigwxStaticBitmapTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxScrollBar",SwigwxScrollBarTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxScrollBar",SwigwxScrollBarTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxTextCtrl",SwigwxTextCtrlTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxTextCtrl",SwigwxTextCtrlTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxListBox",SwigwxListBoxTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxListBox",SwigwxListBoxTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxStaticText",SwigwxStaticTextTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxStaticText",SwigwxStaticTextTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxStaticBox",SwigwxStaticBoxTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxStaticBox",SwigwxStaticBoxTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxGauge",SwigwxGaugeTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxGauge",SwigwxGaugeTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxComboBox",SwigwxComboBoxTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxComboBox",SwigwxComboBoxTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxChoice",SwigwxChoiceTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxChoice",SwigwxChoiceTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxCheckBox",SwigwxCheckBoxTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxCheckBox",SwigwxCheckBoxTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxBitmapButton",SwigwxBitmapButtonTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxBitmapButton",SwigwxBitmapButtonTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxButton",SwigwxButtonTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxButton",SwigwxButtonTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxControl",0); - SWIG_RegisterMapping("_wxStaticBitmap","_class_wxStaticBitmap",0); - SWIG_RegisterMapping("_class_wxIcon","_wxIcon",0); - SWIG_RegisterMapping("_class_wxColour","_wxColour",0); - SWIG_RegisterMapping("_class_wxScreenDC","_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxIdleEvent","_wxIdleEvent",0); - SWIG_RegisterMapping("_wxEraseEvent","_class_wxEraseEvent",0); - SWIG_RegisterMapping("_class_wxJoystickEvent","_wxJoystickEvent",0); - SWIG_RegisterMapping("_class_wxShowEvent","_wxShowEvent",0); - SWIG_RegisterMapping("_wxActivateEvent","_class_wxActivateEvent",0); - SWIG_RegisterMapping("_wxGauge","_class_wxGauge",0); - SWIG_RegisterMapping("_class_wxCommandEvent","_wxCommandEvent",0); - SWIG_RegisterMapping("_class_wxClientDC","_wxClientDC",0); - SWIG_RegisterMapping("_class_wxSizeEvent","_wxSizeEvent",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); - SWIG_RegisterMapping("_class_wxBitmap","_wxBitmap",0); - SWIG_RegisterMapping("_class_wxMemoryDC","_wxMemoryDC",0); - SWIG_RegisterMapping("_wxMenuBar","_class_wxMenuBar",0); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxSlider",SwigwxSliderTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxSlider",SwigwxSliderTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxRadioButton",SwigwxRadioButtonTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxRadioButton",SwigwxRadioButtonTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxRadioBox",SwigwxRadioBoxTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxRadioBox",SwigwxRadioBoxTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxStaticBitmap",SwigwxStaticBitmapTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxStaticBitmap",SwigwxStaticBitmapTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxScrollBar",SwigwxScrollBarTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxScrollBar",SwigwxScrollBarTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxTextCtrl",SwigwxTextCtrlTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxTextCtrl",SwigwxTextCtrlTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxListBox",SwigwxListBoxTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxListBox",SwigwxListBoxTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxStaticText",SwigwxStaticTextTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxStaticText",SwigwxStaticTextTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxStaticBox",SwigwxStaticBoxTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxStaticBox",SwigwxStaticBoxTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxGauge",SwigwxGaugeTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxGauge",SwigwxGaugeTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxComboBox",SwigwxComboBoxTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxComboBox",SwigwxComboBoxTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxChoice",SwigwxChoiceTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxChoice",SwigwxChoiceTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxCheckBox",SwigwxCheckBoxTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxCheckBox",SwigwxCheckBoxTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxBitmapButton",SwigwxBitmapButtonTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxBitmapButton",SwigwxBitmapButtonTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxButton",SwigwxButtonTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxButton",SwigwxButtonTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxControl",SwigwxControlTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxControl",SwigwxControlTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxEvtHandler",0); - SWIG_RegisterMapping("_wxMenuItem","_class_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxScrollBar","_wxScrollBar",0); - SWIG_RegisterMapping("_wxDash","_unsigned_long",0); - SWIG_RegisterMapping("_wxDash","_long",0); - SWIG_RegisterMapping("_class_wxScrolledWindow","_wxScrolledWindow",0); - SWIG_RegisterMapping("_wxKeyEvent","_class_wxKeyEvent",0); - SWIG_RegisterMapping("_wxMoveEvent","_class_wxMoveEvent",0); - SWIG_RegisterMapping("_class_wxEraseEvent","_wxEraseEvent",0); - SWIG_RegisterMapping("_wxWindow","_class_wxSlider",SwigwxSliderTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxSlider",SwigwxSliderTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxRadioButton",SwigwxRadioButtonTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxRadioButton",SwigwxRadioButtonTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxRadioBox",SwigwxRadioBoxTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxRadioBox",SwigwxRadioBoxTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxStaticBitmap",SwigwxStaticBitmapTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxStaticBitmap",SwigwxStaticBitmapTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxScrollBar",SwigwxScrollBarTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxScrollBar",SwigwxScrollBarTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxTextCtrl",SwigwxTextCtrlTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxTextCtrl",SwigwxTextCtrlTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxListBox",SwigwxListBoxTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxListBox",SwigwxListBoxTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxStaticText",SwigwxStaticTextTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxStaticText",SwigwxStaticTextTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxStaticBox",SwigwxStaticBoxTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxStaticBox",SwigwxStaticBoxTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxGauge",SwigwxGaugeTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxGauge",SwigwxGaugeTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxComboBox",SwigwxComboBoxTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxComboBox",SwigwxComboBoxTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxChoice",SwigwxChoiceTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxChoice",SwigwxChoiceTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxCheckBox",SwigwxCheckBoxTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxCheckBox",SwigwxCheckBoxTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxBitmapButton",SwigwxBitmapButtonTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxBitmapButton",SwigwxBitmapButtonTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxButton",SwigwxButtonTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxButton",SwigwxButtonTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxControl",SwigwxControlTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxControl",SwigwxControlTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxWindow",0); - SWIG_RegisterMapping("_class_wxFrame","_wxFrame",0); -} diff --git a/utils/wxPython/src/gtk/controls.py b/utils/wxPython/src/gtk/controls.py deleted file mode 100644 index cccf4bbb8b..0000000000 --- a/utils/wxPython/src/gtk/controls.py +++ /dev/null @@ -1,723 +0,0 @@ -# This file was created automatically by SWIG. -import controlsc - -from misc import * - -from windows import * - -from gdi import * - -from events import * -class wxControlPtr(wxWindowPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Command(self,arg0): - val = controlsc.wxControl_Command(self.this,arg0.this) - return val - def GetLabel(self): - val = controlsc.wxControl_GetLabel(self.this) - return val - def SetLabel(self,arg0): - val = controlsc.wxControl_SetLabel(self.this,arg0) - return val - def __repr__(self): - return "" -class wxControl(wxControlPtr): - def __init__(self,this): - self.this = this - - - - -class wxButtonPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def SetDefault(self): - val = controlsc.wxButton_SetDefault(self.this) - return val - def __repr__(self): - return "" -class wxButton(wxButtonPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxButton,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxBitmapButtonPtr(wxButtonPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetBitmapLabel(self): - val = controlsc.wxBitmapButton_GetBitmapLabel(self.this) - val = wxBitmapPtr(val) - return val - def SetBitmapLabel(self,arg0): - val = controlsc.wxBitmapButton_SetBitmapLabel(self.this,arg0.this) - return val - def __repr__(self): - return "" -class wxBitmapButton(wxBitmapButtonPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxBitmapButton,(arg0.this,arg1,arg2.this,)+args) - self.thisown = 1 - - - - -class wxCheckBoxPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetValue(self): - val = controlsc.wxCheckBox_GetValue(self.this) - return val - def SetValue(self,arg0): - val = controlsc.wxCheckBox_SetValue(self.this,arg0) - return val - def __repr__(self): - return "" -class wxCheckBox(wxCheckBoxPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxCheckBox,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxChoicePtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Append(self,arg0): - val = controlsc.wxChoice_Append(self.this,arg0) - return val - def Clear(self): - val = controlsc.wxChoice_Clear(self.this) - return val - def FindString(self,arg0): - val = controlsc.wxChoice_FindString(self.this,arg0) - return val - def GetColumns(self): - val = controlsc.wxChoice_GetColumns(self.this) - return val - def GetSelection(self): - val = controlsc.wxChoice_GetSelection(self.this) - return val - def GetString(self,arg0): - val = controlsc.wxChoice_GetString(self.this,arg0) - return val - def GetStringSelection(self): - val = controlsc.wxChoice_GetStringSelection(self.this) - return val - def Number(self): - val = controlsc.wxChoice_Number(self.this) - return val - def SetColumns(self,*args): - val = apply(controlsc.wxChoice_SetColumns,(self.this,)+args) - return val - def SetSelection(self,arg0): - val = controlsc.wxChoice_SetSelection(self.this,arg0) - return val - def SetStringSelection(self,arg0): - val = controlsc.wxChoice_SetStringSelection(self.this,arg0) - return val - def __repr__(self): - return "" -class wxChoice(wxChoicePtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxChoice,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - -class wxComboBoxPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Append(self,arg0): - val = controlsc.wxComboBox_Append(self.this,arg0) - return val - def Clear(self): - val = controlsc.wxComboBox_Clear(self.this) - return val - def Copy(self): - val = controlsc.wxComboBox_Copy(self.this) - return val - def Cut(self): - val = controlsc.wxComboBox_Cut(self.this) - return val - def Delete(self,arg0): - val = controlsc.wxComboBox_Delete(self.this,arg0) - return val - def FindString(self,arg0): - val = controlsc.wxComboBox_FindString(self.this,arg0) - return val - def GetInsertionPoint(self): - val = controlsc.wxComboBox_GetInsertionPoint(self.this) - return val - def GetLastPosition(self): - val = controlsc.wxComboBox_GetLastPosition(self.this) - return val - def GetSelection(self): - val = controlsc.wxComboBox_GetSelection(self.this) - return val - def GetString(self,arg0): - val = controlsc.wxComboBox_GetString(self.this,arg0) - return val - def GetStringSelection(self): - val = controlsc.wxComboBox_GetStringSelection(self.this) - return val - def GetValue(self): - val = controlsc.wxComboBox_GetValue(self.this) - return val - def Number(self): - val = controlsc.wxComboBox_Number(self.this) - return val - def Paste(self): - val = controlsc.wxComboBox_Paste(self.this) - return val - def Replace(self,arg0,arg1,arg2): - val = controlsc.wxComboBox_Replace(self.this,arg0,arg1,arg2) - return val - def Remove(self,arg0,arg1): - val = controlsc.wxComboBox_Remove(self.this,arg0,arg1) - return val - def SetInsertionPoint(self,arg0): - val = controlsc.wxComboBox_SetInsertionPoint(self.this,arg0) - return val - def SetInsertionPointEnd(self): - val = controlsc.wxComboBox_SetInsertionPointEnd(self.this) - return val - def SetSelection(self,arg0,*args): - val = apply(controlsc.wxComboBox_SetSelection,(self.this,arg0,)+args) - return val - def SetMark(self,arg0,arg1): - val = controlsc.wxComboBox_SetMark(self.this,arg0,arg1) - return val - def SetValue(self,arg0): - val = controlsc.wxComboBox_SetValue(self.this,arg0) - return val - def __repr__(self): - return "" -class wxComboBox(wxComboBoxPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxComboBox,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - -class wxGaugePtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetBezelFace(self): - val = controlsc.wxGauge_GetBezelFace(self.this) - return val - def GetRange(self): - val = controlsc.wxGauge_GetRange(self.this) - return val - def GetShadowWidth(self): - val = controlsc.wxGauge_GetShadowWidth(self.this) - return val - def GetValue(self): - val = controlsc.wxGauge_GetValue(self.this) - return val - def SetBezelFace(self,arg0): - val = controlsc.wxGauge_SetBezelFace(self.this,arg0) - return val - def SetRange(self,arg0): - val = controlsc.wxGauge_SetRange(self.this,arg0) - return val - def SetShadowWidth(self,arg0): - val = controlsc.wxGauge_SetShadowWidth(self.this,arg0) - return val - def SetValue(self,arg0): - val = controlsc.wxGauge_SetValue(self.this,arg0) - return val - def __repr__(self): - return "" -class wxGauge(wxGaugePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxGauge,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxStaticBoxPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxStaticBox(wxStaticBoxPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxStaticBox,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxStaticTextPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetLabel(self): - val = controlsc.wxStaticText_GetLabel(self.this) - return val - def SetLabel(self,arg0): - val = controlsc.wxStaticText_SetLabel(self.this,arg0) - return val - def __repr__(self): - return "" -class wxStaticText(wxStaticTextPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxStaticText,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxListBoxPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Append(self,arg0): - val = controlsc.wxListBox_Append(self.this,arg0) - return val - def Clear(self): - val = controlsc.wxListBox_Clear(self.this) - return val - def Delete(self,arg0): - val = controlsc.wxListBox_Delete(self.this,arg0) - return val - def Deselect(self,arg0): - val = controlsc.wxListBox_Deselect(self.this,arg0) - return val - def FindString(self,arg0): - val = controlsc.wxListBox_FindString(self.this,arg0) - return val - def GetSelection(self): - val = controlsc.wxListBox_GetSelection(self.this) - return val - def GetString(self,arg0): - val = controlsc.wxListBox_GetString(self.this,arg0) - return val - def GetStringSelection(self): - val = controlsc.wxListBox_GetStringSelection(self.this) - return val - def Number(self): - val = controlsc.wxListBox_Number(self.this) - return val - def Selected(self,arg0): - val = controlsc.wxListBox_Selected(self.this,arg0) - return val - def Set(self,arg0,*args): - val = apply(controlsc.wxListBox_Set,(self.this,arg0,)+args) - return val - def SetFirstItem(self,arg0): - val = controlsc.wxListBox_SetFirstItem(self.this,arg0) - return val - def SetFirstItemStr(self,arg0): - val = controlsc.wxListBox_SetFirstItemStr(self.this,arg0) - return val - def SetSelection(self,arg0,*args): - val = apply(controlsc.wxListBox_SetSelection,(self.this,arg0,)+args) - return val - def SetString(self,arg0,arg1): - val = controlsc.wxListBox_SetString(self.this,arg0,arg1) - return val - def SetStringSelection(self,arg0,*args): - val = apply(controlsc.wxListBox_SetStringSelection,(self.this,arg0,)+args) - return val - def __repr__(self): - return "" -class wxListBox(wxListBoxPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxListBox,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - -class wxTextCtrlPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Clear(self): - val = controlsc.wxTextCtrl_Clear(self.this) - return val - def Copy(self): - val = controlsc.wxTextCtrl_Copy(self.this) - return val - def Cut(self): - val = controlsc.wxTextCtrl_Cut(self.this) - return val - def DiscardEdits(self): - val = controlsc.wxTextCtrl_DiscardEdits(self.this) - return val - def GetInsertionPoint(self): - val = controlsc.wxTextCtrl_GetInsertionPoint(self.this) - return val - def GetLastPosition(self): - val = controlsc.wxTextCtrl_GetLastPosition(self.this) - return val - def GetValue(self): - val = controlsc.wxTextCtrl_GetValue(self.this) - return val - def IsModified(self): - val = controlsc.wxTextCtrl_IsModified(self.this) - return val - def LoadFile(self,arg0): - val = controlsc.wxTextCtrl_LoadFile(self.this,arg0) - return val - def Paste(self): - val = controlsc.wxTextCtrl_Paste(self.this) - return val - def Remove(self,arg0,arg1): - val = controlsc.wxTextCtrl_Remove(self.this,arg0,arg1) - return val - def Replace(self,arg0,arg1,arg2): - val = controlsc.wxTextCtrl_Replace(self.this,arg0,arg1,arg2) - return val - def SaveFile(self,arg0): - val = controlsc.wxTextCtrl_SaveFile(self.this,arg0) - return val - def SetEditable(self,arg0): - val = controlsc.wxTextCtrl_SetEditable(self.this,arg0) - return val - def SetInsertionPoint(self,arg0): - val = controlsc.wxTextCtrl_SetInsertionPoint(self.this,arg0) - return val - def SetInsertionPointEnd(self): - val = controlsc.wxTextCtrl_SetInsertionPointEnd(self.this) - return val - def SetSelection(self,arg0,arg1): - val = controlsc.wxTextCtrl_SetSelection(self.this,arg0,arg1) - return val - def SetValue(self,arg0): - val = controlsc.wxTextCtrl_SetValue(self.this,arg0) - return val - def ShowPosition(self,arg0): - val = controlsc.wxTextCtrl_ShowPosition(self.this,arg0) - return val - def WriteText(self,arg0): - val = controlsc.wxTextCtrl_WriteText(self.this,arg0) - return val - def __repr__(self): - return "" -class wxTextCtrl(wxTextCtrlPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxTextCtrl,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - -class wxScrollBarPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetRange(self): - val = controlsc.wxScrollBar_GetRange(self.this) - return val - def GetPageSize(self): - val = controlsc.wxScrollBar_GetPageSize(self.this) - return val - def GetPosition(self): - val = controlsc.wxScrollBar_GetPosition(self.this) - return val - def GetThumbSize(self): - val = controlsc.wxScrollBar_GetThumbSize(self.this) - return val - def SetPosition(self,arg0): - val = controlsc.wxScrollBar_SetPosition(self.this,arg0) - return val - def SetScrollbar(self,arg0,arg1,arg2,arg3,*args): - val = apply(controlsc.wxScrollBar_SetScrollbar,(self.this,arg0,arg1,arg2,arg3,)+args) - return val - def __repr__(self): - return "" -class wxScrollBar(wxScrollBarPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxScrollBar,(arg0.this,)+args) - self.thisown = 1 - - - - -class wxStaticBitmapPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetBitmap(self): - val = controlsc.wxStaticBitmap_GetBitmap(self.this) - val = wxBitmapPtr(val) - return val - def SetBitmap(self,arg0): - val = controlsc.wxStaticBitmap_SetBitmap(self.this,arg0.this) - return val - def __repr__(self): - return "" -class wxStaticBitmap(wxStaticBitmapPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxStaticBitmap,(arg0.this,arg1,arg2.this,)+args) - self.thisown = 1 - - - - -class wxRadioBoxPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def EnableBox(self,arg0): - val = controlsc.wxRadioBox_EnableBox(self.this,arg0) - return val - def Enable(self,arg0,arg1): - val = controlsc.wxRadioBox_Enable(self.this,arg0,arg1) - return val - def FindString(self,arg0): - val = controlsc.wxRadioBox_FindString(self.this,arg0) - return val - def GetBoxLabel(self): - val = controlsc.wxRadioBox_GetBoxLabel(self.this) - return val - def GetLabel(self,arg0): - val = controlsc.wxRadioBox_GetLabel(self.this,arg0) - return val - def GetSelection(self): - val = controlsc.wxRadioBox_GetSelection(self.this) - return val - def GetString(self,arg0): - val = controlsc.wxRadioBox_GetString(self.this,arg0) - return val - def GetStringSelection(self): - val = controlsc.wxRadioBox_GetStringSelection(self.this) - return val - def Number(self): - val = controlsc.wxRadioBox_Number(self.this) - return val - def SetBoxLabel(self,arg0): - val = controlsc.wxRadioBox_SetBoxLabel(self.this,arg0) - return val - def SetLabel(self,arg0,arg1): - val = controlsc.wxRadioBox_SetLabel(self.this,arg0,arg1) - return val - def SetSelection(self,arg0): - val = controlsc.wxRadioBox_SetSelection(self.this,arg0) - return val - def SetStringSelection(self,arg0): - val = controlsc.wxRadioBox_SetStringSelection(self.this,arg0) - return val - def Show(self,arg0): - val = controlsc.wxRadioBox_Show(self.this,arg0) - return val - def ShowItem(self,arg0,arg1): - val = controlsc.wxRadioBox_ShowItem(self.this,arg0,arg1) - return val - def __repr__(self): - return "" -class wxRadioBox(wxRadioBoxPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxRadioBox,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxRadioButtonPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetValue(self): - val = controlsc.wxRadioButton_GetValue(self.this) - return val - def SetValue(self,arg0): - val = controlsc.wxRadioButton_SetValue(self.this,arg0) - return val - def __repr__(self): - return "" -class wxRadioButton(wxRadioButtonPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxRadioButton,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxSliderPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def ClearSel(self): - val = controlsc.wxSlider_ClearSel(self.this) - return val - def ClearTicks(self): - val = controlsc.wxSlider_ClearTicks(self.this) - return val - def GetLineSize(self): - val = controlsc.wxSlider_GetLineSize(self.this) - return val - def GetMax(self): - val = controlsc.wxSlider_GetMax(self.this) - return val - def GetMin(self): - val = controlsc.wxSlider_GetMin(self.this) - return val - def GetPageSize(self): - val = controlsc.wxSlider_GetPageSize(self.this) - return val - def GetSelEnd(self): - val = controlsc.wxSlider_GetSelEnd(self.this) - return val - def GetSelStart(self): - val = controlsc.wxSlider_GetSelStart(self.this) - return val - def GetThumbLength(self): - val = controlsc.wxSlider_GetThumbLength(self.this) - return val - def GetTickFreq(self): - val = controlsc.wxSlider_GetTickFreq(self.this) - return val - def GetValue(self): - val = controlsc.wxSlider_GetValue(self.this) - return val - def SetRange(self,arg0,arg1): - val = controlsc.wxSlider_SetRange(self.this,arg0,arg1) - return val - def SetTickFreq(self,arg0,arg1): - val = controlsc.wxSlider_SetTickFreq(self.this,arg0,arg1) - return val - def SetLineSize(self,arg0): - val = controlsc.wxSlider_SetLineSize(self.this,arg0) - return val - def SetPageSize(self,arg0): - val = controlsc.wxSlider_SetPageSize(self.this,arg0) - return val - def SetSelection(self,arg0,arg1): - val = controlsc.wxSlider_SetSelection(self.this,arg0,arg1) - return val - def SetThumbLength(self,arg0): - val = controlsc.wxSlider_SetThumbLength(self.this,arg0) - return val - def SetTick(self,arg0): - val = controlsc.wxSlider_SetTick(self.this,arg0) - return val - def SetValue(self,arg0): - val = controlsc.wxSlider_SetValue(self.this,arg0) - return val - def __repr__(self): - return "" -class wxSlider(wxSliderPtr): - def __init__(self,arg0,arg1,arg2,arg3,arg4,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxSlider,(arg0.this,arg1,arg2,arg3,arg4,)+args) - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - - - -#-------------- VARIABLE WRAPPERS ------------------ - diff --git a/utils/wxPython/src/gtk/controls2.cpp b/utils/wxPython/src/gtk/controls2.cpp deleted file mode 100644 index ef2b91176b..0000000000 --- a/utils/wxPython/src/gtk/controls2.cpp +++ /dev/null @@ -1,3136 +0,0 @@ -/* - * FILE : gtk/controls2.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif - -#define SWIG_init initcontrols2c - -#define SWIG_name "controls2c" - -#include "helpers.h" -#include -#include -#include - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; - -extern wxValidator wxPyDefaultValidator; -#define wxListItem_m_mask_get(_swigobj) ((long ) _swigobj->m_mask) -static PyObject *_wrap_wxListItem_m_mask_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListItem_m_mask_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_m_mask_get. Expected _wxListItem_p."); - return NULL; - } - } - _result = (long )wxListItem_m_mask_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListItem_m_itemId_get(_swigobj) ((long ) _swigobj->m_itemId) -static PyObject *_wrap_wxListItem_m_itemId_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListItem_m_itemId_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_m_itemId_get. Expected _wxListItem_p."); - return NULL; - } - } - _result = (long )wxListItem_m_itemId_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListItem_m_col_get(_swigobj) ((int ) _swigobj->m_col) -static PyObject *_wrap_wxListItem_m_col_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListItem_m_col_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_m_col_get. Expected _wxListItem_p."); - return NULL; - } - } - _result = (int )wxListItem_m_col_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListItem_m_state_get(_swigobj) ((long ) _swigobj->m_state) -static PyObject *_wrap_wxListItem_m_state_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListItem_m_state_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_m_state_get. Expected _wxListItem_p."); - return NULL; - } - } - _result = (long )wxListItem_m_state_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListItem_m_stateMask_get(_swigobj) ((long ) _swigobj->m_stateMask) -static PyObject *_wrap_wxListItem_m_stateMask_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListItem_m_stateMask_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_m_stateMask_get. Expected _wxListItem_p."); - return NULL; - } - } - _result = (long )wxListItem_m_stateMask_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListItem_m_text_get(_swigobj) (&_swigobj->m_text) -static PyObject *_wrap_wxListItem_m_text_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListItem_m_text_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_m_text_get. Expected _wxListItem_p."); - return NULL; - } - } - _result = (wxString *)wxListItem_m_text_get(_arg0); -{ - _resultobj = PyString_FromString(WXSTRINGCAST (*_result)); -} - return _resultobj; -} - -#define wxListItem_m_image_get(_swigobj) ((int ) _swigobj->m_image) -static PyObject *_wrap_wxListItem_m_image_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListItem_m_image_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_m_image_get. Expected _wxListItem_p."); - return NULL; - } - } - _result = (int )wxListItem_m_image_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListItem_m_data_get(_swigobj) ((long ) _swigobj->m_data) -static PyObject *_wrap_wxListItem_m_data_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListItem_m_data_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_m_data_get. Expected _wxListItem_p."); - return NULL; - } - } - _result = (long )wxListItem_m_data_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListItem_m_format_get(_swigobj) ((int ) _swigobj->m_format) -static PyObject *_wrap_wxListItem_m_format_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListItem_m_format_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_m_format_get. Expected _wxListItem_p."); - return NULL; - } - } - _result = (int )wxListItem_m_format_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListItem_m_width_get(_swigobj) ((int ) _swigobj->m_width) -static PyObject *_wrap_wxListItem_m_width_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListItem_m_width_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_m_width_get. Expected _wxListItem_p."); - return NULL; - } - } - _result = (int )wxListItem_m_width_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define new_wxListItem() (new wxListItem()) -static PyObject *_wrap_new_wxListItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListItem * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxListItem")) - return NULL; - _result = (wxListItem *)new_wxListItem(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxListItem(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxListItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxListItem",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxListItem. Expected _wxListItem_p."); - return NULL; - } - } - delete_wxListItem(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxListEventTowxCommandEvent(void *ptr) { - wxListEvent *src; - wxCommandEvent *dest; - src = (wxListEvent *) ptr; - dest = (wxCommandEvent *) src; - return (void *) dest; -} - -static void *SwigwxListEventTowxEvent(void *ptr) { - wxListEvent *src; - wxEvent *dest; - src = (wxListEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxListEvent_m_code_get(_swigobj) ((int ) _swigobj->m_code) -static PyObject *_wrap_wxListEvent_m_code_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListEvent_m_code_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_m_code_get. Expected _wxListEvent_p."); - return NULL; - } - } - _result = (int )wxListEvent_m_code_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListEvent_m_itemIndex_get(_swigobj) ((long ) _swigobj->m_itemIndex) -static PyObject *_wrap_wxListEvent_m_itemIndex_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListEvent_m_itemIndex_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_m_itemIndex_get. Expected _wxListEvent_p."); - return NULL; - } - } - _result = (long )wxListEvent_m_itemIndex_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListEvent_m_oldItemIndex_get(_swigobj) ((long ) _swigobj->m_oldItemIndex) -static PyObject *_wrap_wxListEvent_m_oldItemIndex_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListEvent_m_oldItemIndex_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_m_oldItemIndex_get. Expected _wxListEvent_p."); - return NULL; - } - } - _result = (long )wxListEvent_m_oldItemIndex_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListEvent_m_col_get(_swigobj) ((int ) _swigobj->m_col) -static PyObject *_wrap_wxListEvent_m_col_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListEvent_m_col_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_m_col_get. Expected _wxListEvent_p."); - return NULL; - } - } - _result = (int )wxListEvent_m_col_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListEvent_m_cancelled_get(_swigobj) ((bool ) _swigobj->m_cancelled) -static PyObject *_wrap_wxListEvent_m_cancelled_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListEvent_m_cancelled_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_m_cancelled_get. Expected _wxListEvent_p."); - return NULL; - } - } - _result = (bool )wxListEvent_m_cancelled_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListEvent_m_pointDrag_get(_swigobj) (&_swigobj->m_pointDrag) -static PyObject *_wrap_wxListEvent_m_pointDrag_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxListEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListEvent_m_pointDrag_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_m_pointDrag_get. Expected _wxListEvent_p."); - return NULL; - } - } - _result = (wxPoint *)wxListEvent_m_pointDrag_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxListEvent_m_item_get(_swigobj) (&_swigobj->m_item) -static PyObject *_wrap_wxListEvent_m_item_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListItem * _result; - wxListEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListEvent_m_item_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_m_item_get. Expected _wxListEvent_p."); - return NULL; - } - } - _result = (wxListItem *)wxListEvent_m_item_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static void *SwigwxListCtrlTowxControl(void *ptr) { - wxListCtrl *src; - wxControl *dest; - src = (wxListCtrl *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxListCtrlTowxWindow(void *ptr) { - wxListCtrl *src; - wxWindow *dest; - src = (wxListCtrl *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxListCtrlTowxEvtHandler(void *ptr) { - wxListCtrl *src; - wxEvtHandler *dest; - src = (wxListCtrl *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxListCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxListCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_new_wxListCtrl(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListCtrl * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - long _arg4 = (wxLC_ICON); - char * _arg5 = "listctrl"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si|ssls:new_wxListCtrl",&_argc0,&_arg1,&_argc2,&_argc3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxListCtrl. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxListCtrl. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxListCtrl. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxListCtrl *)new_wxListCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxListCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxListCtrl_Arrange(_swigobj,_swigarg0) (_swigobj->Arrange(_swigarg0)) -static PyObject *_wrap_wxListCtrl_Arrange(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - int _arg1 = wxLIST_ALIGN_DEFAULT; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxListCtrl_Arrange",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_Arrange. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_Arrange(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_DeleteItem(_swigobj,_swigarg0) (_swigobj->DeleteItem(_swigarg0)) -static PyObject *_wrap_wxListCtrl_DeleteItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxListCtrl_DeleteItem",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_DeleteItem. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_DeleteItem(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_DeleteAllItems(_swigobj) (_swigobj->DeleteAllItems()) -static PyObject *_wrap_wxListCtrl_DeleteAllItems(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListCtrl_DeleteAllItems",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_DeleteAllItems. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_DeleteAllItems(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_DeleteColumn(_swigobj,_swigarg0) (_swigobj->DeleteColumn(_swigarg0)) -static PyObject *_wrap_wxListCtrl_DeleteColumn(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxListCtrl_DeleteColumn",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_DeleteColumn. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_DeleteColumn(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_EnsureVisible(_swigobj,_swigarg0) (_swigobj->EnsureVisible(_swigarg0)) -static PyObject *_wrap_wxListCtrl_EnsureVisible(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxListCtrl_EnsureVisible",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_EnsureVisible. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_EnsureVisible(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_FindItem(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->FindItem(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxListCtrl_FindItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - wxString * _arg2; - bool _arg3 = (0); - char * _argc0 = 0; - PyObject * _obj2 = 0; - int tempbool3; - - self = self; - if(!PyArg_ParseTuple(args,"slO|i:wxListCtrl_FindItem",&_argc0,&_arg1,&_obj2,&tempbool3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_FindItem. Expected _wxListCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - _arg3 = (bool ) tempbool3; - _result = (long )wxListCtrl_FindItem(_arg0,_arg1,*_arg2,_arg3); - _resultobj = Py_BuildValue("l",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxListCtrl_FindItemData(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindItem(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_FindItemData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxListCtrl_FindItemData",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_FindItemData. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (long )wxListCtrl_FindItemData(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListCtrl_FindItemAtPos(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->FindItem(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxListCtrl_FindItemAtPos(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - wxPoint * _arg2; - int _arg3; - char * _argc0 = 0; - char * _argc2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slsi:wxListCtrl_FindItemAtPos",&_argc0,&_arg1,&_argc2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_FindItemAtPos. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_FindItemAtPos. Expected _wxPoint_p."); - return NULL; - } - } - _result = (long )wxListCtrl_FindItemAtPos(_arg0,_arg1,*_arg2,_arg3); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListCtrl_GetColumn(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetColumn(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_GetColumn(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - int _arg1; - wxListItem * _arg2; - char * _argc0 = 0; - char * _argc2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sis:wxListCtrl_GetColumn",&_argc0,&_arg1,&_argc2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetColumn. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_GetColumn. Expected _wxListItem_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_GetColumn(_arg0,_arg1,*_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_GetColumnWidth(_swigobj,_swigarg0) (_swigobj->GetColumnWidth(_swigarg0)) -static PyObject *_wrap_wxListCtrl_GetColumnWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListCtrl * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxListCtrl_GetColumnWidth",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetColumnWidth. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (int )wxListCtrl_GetColumnWidth(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_GetCountPerPage(_swigobj) (_swigobj->GetCountPerPage()) -static PyObject *_wrap_wxListCtrl_GetCountPerPage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListCtrl_GetCountPerPage",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetCountPerPage. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (int )wxListCtrl_GetCountPerPage(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_GetImageList(_swigobj,_swigarg0) (_swigobj->GetImageList(_swigarg0)) -static PyObject *_wrap_wxListCtrl_GetImageList(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxImageList * _result; - wxListCtrl * _arg0; - int _arg1; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxListCtrl_GetImageList",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetImageList. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (wxImageList *)wxListCtrl_GetImageList(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageList_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxListCtrl_GetItemData(_swigobj,_swigarg0) (_swigobj->GetItemData(_swigarg0)) -static PyObject *_wrap_wxListCtrl_GetItemData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxListCtrl_GetItemData",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetItemData. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (long )wxListCtrl_GetItemData(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -static wxListItem * wxListCtrl_GetItem(wxListCtrl *self) { - wxListItem* info = new wxListItem; - self->GetItem(*info); - return info; - } -static PyObject *_wrap_wxListCtrl_GetItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListItem * _result; - wxListCtrl * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListCtrl_GetItem",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetItem. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (wxListItem *)wxListCtrl_GetItem(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static wxPoint * wxListCtrl_GetItemPosition(wxListCtrl *self,long item) { - wxPoint* pos = new wxPoint; - self->GetItemPosition(item, *pos); - return pos; - } -static PyObject *_wrap_wxListCtrl_GetItemPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxListCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxListCtrl_GetItemPosition",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetItemPosition. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (wxPoint *)wxListCtrl_GetItemPosition(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static wxRect * wxListCtrl_GetItemRect(wxListCtrl *self,long item,int code) { - wxRect* rect= new wxRect; - self->GetItemRect(item, *rect, code); - return rect; - } -static PyObject *_wrap_wxListCtrl_GetItemRect(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRect * _result; - wxListCtrl * _arg0; - long _arg1; - int _arg2 = wxLIST_RECT_BOUNDS; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sl|i:wxListCtrl_GetItemRect",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetItemRect. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (wxRect *)wxListCtrl_GetItemRect(_arg0,_arg1,_arg2); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxRect_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxListCtrl_GetItemState(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetItemState(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_GetItemState(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListCtrl * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxListCtrl_GetItemState",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetItemState. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (int )wxListCtrl_GetItemState(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_GetItemCount(_swigobj) (_swigobj->GetItemCount()) -static PyObject *_wrap_wxListCtrl_GetItemCount(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListCtrl_GetItemCount",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetItemCount. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (int )wxListCtrl_GetItemCount(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_GetItemSpacing(_swigobj,_swigarg0) (_swigobj->GetItemSpacing(_swigarg0)) -static PyObject *_wrap_wxListCtrl_GetItemSpacing(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListCtrl * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxListCtrl_GetItemSpacing",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetItemSpacing. Expected _wxListCtrl_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - _result = (int )wxListCtrl_GetItemSpacing(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_GetItemText(_swigobj,_swigarg0) (_swigobj->GetItemText(_swigarg0)) -static PyObject *_wrap_wxListCtrl_GetItemText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxListCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxListCtrl_GetItemText",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetItemText. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = new wxString (wxListCtrl_GetItemText(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxListCtrl_GetNextItem(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetNextItem(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxListCtrl_GetNextItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - int _arg2 = wxLIST_NEXT_ALL; - int _arg3 = wxLIST_STATE_DONTCARE; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl|ii:wxListCtrl_GetNextItem",&_argc0,&_arg1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetNextItem. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (long )wxListCtrl_GetNextItem(_arg0,_arg1,_arg2,_arg3); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListCtrl_GetSelectedItemCount(_swigobj) (_swigobj->GetSelectedItemCount()) -static PyObject *_wrap_wxListCtrl_GetSelectedItemCount(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListCtrl_GetSelectedItemCount",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetSelectedItemCount. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (int )wxListCtrl_GetSelectedItemCount(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_GetTopItem(_swigobj) (_swigobj->GetTopItem()) -static PyObject *_wrap_wxListCtrl_GetTopItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListCtrl_GetTopItem",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetTopItem. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (long )wxListCtrl_GetTopItem(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListCtrl_HitTest(_swigobj,_swigarg0,_swigarg1) (_swigobj->HitTest(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_HitTest(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - wxPoint * _arg1; - int * _arg2; - int temp; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; -{ - _arg2 = &temp; -} - if(!PyArg_ParseTuple(args,"ss:wxListCtrl_HitTest",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_HitTest. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_HitTest. Expected _wxPoint_p."); - return NULL; - } - } - _result = (long )wxListCtrl_HitTest(_arg0,*_arg1,*_arg2); - _resultobj = Py_BuildValue("l",_result); -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxListCtrl_InsertColumnWithInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertColumn(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_InsertColumnWithInfo(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - wxListItem * _arg2; - char * _argc0 = 0; - char * _argc2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sls:wxListCtrl_InsertColumnWithInfo",&_argc0,&_arg1,&_argc2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertColumnWithInfo. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_InsertColumnWithInfo. Expected _wxListItem_p."); - return NULL; - } - } - _result = (long )wxListCtrl_InsertColumnWithInfo(_arg0,_arg1,*_arg2); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListCtrl_InsertColumn(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->InsertColumn(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxListCtrl_InsertColumn(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - wxString * _arg2; - int _arg3 = wxLIST_FORMAT_LEFT; - int _arg4 = -1; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slO|ii:wxListCtrl_InsertColumn",&_argc0,&_arg1,&_obj2,&_arg3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertColumn. Expected _wxListCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - _result = (long )wxListCtrl_InsertColumn(_arg0,_arg1,*_arg2,_arg3,_arg4); - _resultobj = Py_BuildValue("l",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxListCtrl_InsertItem(_swigobj,_swigarg0) (_swigobj->InsertItem(_swigarg0)) -static PyObject *_wrap_wxListCtrl_InsertItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - wxListItem * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxListCtrl_InsertItem",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertItem. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_InsertItem. Expected _wxListItem_p."); - return NULL; - } - } - _result = (long )wxListCtrl_InsertItem(_arg0,*_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListCtrl_InsertStringItem(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertItem(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_InsertStringItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slO:wxListCtrl_InsertStringItem",&_argc0,&_arg1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertStringItem. Expected _wxListCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - _result = (long )wxListCtrl_InsertStringItem(_arg0,_arg1,*_arg2); - _resultobj = Py_BuildValue("l",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxListCtrl_InsertImageItem(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertItem(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_InsertImageItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sli:wxListCtrl_InsertImageItem",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertImageItem. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (long )wxListCtrl_InsertImageItem(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListCtrl_InsertImageStringItem(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->InsertItem(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxListCtrl_InsertImageStringItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - wxString * _arg2; - int _arg3; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slOi:wxListCtrl_InsertImageStringItem",&_argc0,&_arg1,&_obj2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertImageStringItem. Expected _wxListCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - _result = (long )wxListCtrl_InsertImageStringItem(_arg0,_arg1,*_arg2,_arg3); - _resultobj = Py_BuildValue("l",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxListCtrl_ScrollList(_swigobj,_swigarg0,_swigarg1) (_swigobj->ScrollList(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_ScrollList(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxListCtrl_ScrollList",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_ScrollList. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_ScrollList(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_SetBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetBackgroundColour(_swigarg0)) -static PyObject *_wrap_wxListCtrl_SetBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListCtrl * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxListCtrl_SetBackgroundColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetBackgroundColour. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_SetBackgroundColour. Expected _wxColour_p."); - return NULL; - } - } - wxListCtrl_SetBackgroundColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxListCtrl_SetColumn(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColumn(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_SetColumn(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - int _arg1; - wxListItem * _arg2; - char * _argc0 = 0; - char * _argc2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sis:wxListCtrl_SetColumn",&_argc0,&_arg1,&_argc2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetColumn. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_SetColumn. Expected _wxListItem_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_SetColumn(_arg0,_arg1,*_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_SetColumnWidth(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColumnWidth(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_SetColumnWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxListCtrl_SetColumnWidth",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetColumnWidth. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_SetColumnWidth(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_SetImageList(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetImageList(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_SetImageList(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListCtrl * _arg0; - wxImageList * _arg1; - int _arg2; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ssi:wxListCtrl_SetImageList",&_argc0,&_argc1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetImageList. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxImageList_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_SetImageList. Expected _wxImageList_p."); - return NULL; - } - } - wxListCtrl_SetImageList(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxListCtrl_SetItem(_swigobj,_swigarg0) (_swigobj->SetItem(_swigarg0)) -static PyObject *_wrap_wxListCtrl_SetItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - wxListItem * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxListCtrl_SetItem",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetItem. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_SetItem. Expected _wxListItem_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_SetItem(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_SetItemString(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->SetItem(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxListCtrl_SetItemString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - int _arg2; - wxString * _arg3; - int _arg4 = -1; - char * _argc0 = 0; - PyObject * _obj3 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sliO|i:wxListCtrl_SetItemString",&_argc0,&_arg1,&_arg2,&_obj3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetItemString. Expected _wxListCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AsString(_obj3)); -} - _result = (long )wxListCtrl_SetItemString(_arg0,_arg1,_arg2,*_arg3,_arg4); - _resultobj = Py_BuildValue("l",_result); -{ - if (_obj3) - delete _arg3; -} - return _resultobj; -} - -#define wxListCtrl_SetItemData(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemData(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_SetItemData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxListCtrl_SetItemData",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetItemData. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_SetItemData(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_SetItemImage(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemImage(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxListCtrl_SetItemImage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - long _arg1; - int _arg2; - int _arg3; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slii:wxListCtrl_SetItemImage",&_argc0,&_arg1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetItemImage. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_SetItemImage(_arg0,_arg1,_arg2,_arg3); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_SetItemPosition(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemPosition(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_SetItemPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - long _arg1; - wxPoint * _arg2; - char * _argc0 = 0; - char * _argc2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sls:wxListCtrl_SetItemPosition",&_argc0,&_arg1,&_argc2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetItemPosition. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_SetItemPosition. Expected _wxPoint_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_SetItemPosition(_arg0,_arg1,*_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_SetItemState(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemState(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxListCtrl_SetItemState(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - long _arg1; - long _arg2; - long _arg3; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slll:wxListCtrl_SetItemState",&_argc0,&_arg1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetItemState. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_SetItemState(_arg0,_arg1,_arg2,_arg3); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_SetItemText(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemText(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_SetItemText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListCtrl * _arg0; - long _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slO:wxListCtrl_SetItemText",&_argc0,&_arg1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetItemText. Expected _wxListCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - wxListCtrl_SetItemText(_arg0,_arg1,*_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxListCtrl_SetSingleStyle(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSingleStyle(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_SetSingleStyle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListCtrl * _arg0; - long _arg1; - bool _arg2 = (1); - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"sl|i:wxListCtrl_SetSingleStyle",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetSingleStyle. Expected _wxListCtrl_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - wxListCtrl_SetSingleStyle(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxListCtrl_SetWindowStyleFlag(_swigobj,_swigarg0) (_swigobj->SetWindowStyleFlag(_swigarg0)) -static PyObject *_wrap_wxListCtrl_SetWindowStyleFlag(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxListCtrl_SetWindowStyleFlag",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetWindowStyleFlag. Expected _wxListCtrl_p."); - return NULL; - } - } - wxListCtrl_SetWindowStyleFlag(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTreeItem_m_mask_get(_swigobj) ((long ) _swigobj->m_mask) -static PyObject *_wrap_wxTreeItem_m_mask_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeItem_m_mask_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItem_m_mask_get. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (long )wxTreeItem_m_mask_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeItem_m_itemId_get(_swigobj) ((long ) _swigobj->m_itemId) -static PyObject *_wrap_wxTreeItem_m_itemId_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeItem_m_itemId_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItem_m_itemId_get. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (long )wxTreeItem_m_itemId_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeItem_m_state_get(_swigobj) ((long ) _swigobj->m_state) -static PyObject *_wrap_wxTreeItem_m_state_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeItem_m_state_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItem_m_state_get. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (long )wxTreeItem_m_state_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeItem_m_stateMask_get(_swigobj) ((long ) _swigobj->m_stateMask) -static PyObject *_wrap_wxTreeItem_m_stateMask_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeItem_m_stateMask_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItem_m_stateMask_get. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (long )wxTreeItem_m_stateMask_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeItem_m_text_get(_swigobj) (&_swigobj->m_text) -static PyObject *_wrap_wxTreeItem_m_text_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxTreeItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeItem_m_text_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItem_m_text_get. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (wxString *)wxTreeItem_m_text_get(_arg0); -{ - _resultobj = PyString_FromString(WXSTRINGCAST (*_result)); -} - return _resultobj; -} - -#define wxTreeItem_m_image_get(_swigobj) ((int ) _swigobj->m_image) -static PyObject *_wrap_wxTreeItem_m_image_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTreeItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeItem_m_image_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItem_m_image_get. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (int )wxTreeItem_m_image_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeItem_m_selectedImage_get(_swigobj) ((int ) _swigobj->m_selectedImage) -static PyObject *_wrap_wxTreeItem_m_selectedImage_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTreeItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeItem_m_selectedImage_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItem_m_selectedImage_get. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (int )wxTreeItem_m_selectedImage_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeItem_m_children_get(_swigobj) ((int ) _swigobj->m_children) -static PyObject *_wrap_wxTreeItem_m_children_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTreeItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeItem_m_children_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItem_m_children_get. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (int )wxTreeItem_m_children_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeItem_m_data_get(_swigobj) ((long ) _swigobj->m_data) -static PyObject *_wrap_wxTreeItem_m_data_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeItem_m_data_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItem_m_data_get. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (long )wxTreeItem_m_data_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define new_wxTreeItem() (new wxTreeItem()) -static PyObject *_wrap_new_wxTreeItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTreeItem * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxTreeItem")) - return NULL; - _result = (wxTreeItem *)new_wxTreeItem(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTreeItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxTreeItem(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxTreeItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTreeItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxTreeItem",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxTreeItem. Expected _wxTreeItem_p."); - return NULL; - } - } - delete_wxTreeItem(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxTreeEventTowxCommandEvent(void *ptr) { - wxTreeEvent *src; - wxCommandEvent *dest; - src = (wxTreeEvent *) ptr; - dest = (wxCommandEvent *) src; - return (void *) dest; -} - -static void *SwigwxTreeEventTowxEvent(void *ptr) { - wxTreeEvent *src; - wxEvent *dest; - src = (wxTreeEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxTreeEvent_m_code_get(_swigobj) ((int ) _swigobj->m_code) -static PyObject *_wrap_wxTreeEvent_m_code_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTreeEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeEvent_m_code_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_m_code_get. Expected _wxTreeEvent_p."); - return NULL; - } - } - _result = (int )wxTreeEvent_m_code_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeEvent_m_item_get(_swigobj) (&_swigobj->m_item) -static PyObject *_wrap_wxTreeEvent_m_item_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTreeItem * _result; - wxTreeEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeEvent_m_item_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_m_item_get. Expected _wxTreeEvent_p."); - return NULL; - } - } - _result = (wxTreeItem *)wxTreeEvent_m_item_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTreeItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxTreeEvent_m_oldItem_get(_swigobj) ((long ) _swigobj->m_oldItem) -static PyObject *_wrap_wxTreeEvent_m_oldItem_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeEvent_m_oldItem_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_m_oldItem_get. Expected _wxTreeEvent_p."); - return NULL; - } - } - _result = (long )wxTreeEvent_m_oldItem_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeEvent_m_pointDrag_get(_swigobj) (&_swigobj->m_pointDrag) -static PyObject *_wrap_wxTreeEvent_m_pointDrag_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxTreeEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeEvent_m_pointDrag_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_m_pointDrag_get. Expected _wxTreeEvent_p."); - return NULL; - } - } - _result = (wxPoint *)wxTreeEvent_m_pointDrag_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static void *SwigwxTreeCtrlTowxControl(void *ptr) { - wxTreeCtrl *src; - wxControl *dest; - src = (wxTreeCtrl *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxTreeCtrlTowxWindow(void *ptr) { - wxTreeCtrl *src; - wxWindow *dest; - src = (wxTreeCtrl *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxTreeCtrlTowxEvtHandler(void *ptr) { - wxTreeCtrl *src; - wxEvtHandler *dest; - src = (wxTreeCtrl *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxTreeCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxTreeCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_new_wxTreeCtrl(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTreeCtrl * _result; - wxWindow * _arg0; - wxWindowID _arg1 = -1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - long _arg4 = (wxTR_HAS_BUTTONS); - char * _arg5 = "wxTreeCtrl"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|issls:new_wxTreeCtrl",&_argc0,&_arg1,&_argc2,&_argc3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxTreeCtrl. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxTreeCtrl. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxTreeCtrl. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxTreeCtrl *)new_wxTreeCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTreeCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxTreeCtrl_DeleteAllItems(_swigobj) (_swigobj->DeleteAllItems()) -static PyObject *_wrap_wxTreeCtrl_DeleteAllItems(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTreeCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_DeleteAllItems",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_DeleteAllItems. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (bool )wxTreeCtrl_DeleteAllItems(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeCtrl_DeleteItem(_swigobj,_swigarg0) (_swigobj->DeleteItem(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_DeleteItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTreeCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTreeCtrl_DeleteItem",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_DeleteItem. Expected _wxTreeCtrl_p."); - return NULL; - } - } - wxTreeCtrl_DeleteItem(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTreeCtrl_GetCount(_swigobj) (_swigobj->GetCount()) -static PyObject *_wrap_wxTreeCtrl_GetCount(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTreeCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_GetCount",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetCount. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (int )wxTreeCtrl_GetCount(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeCtrl_GetImageList(_swigobj,_swigarg0) (_swigobj->GetImageList(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_GetImageList(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxImageList * _result; - wxTreeCtrl * _arg0; - int _arg1 = wxIMAGE_LIST_NORMAL; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxTreeCtrl_GetImageList",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetImageList. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (wxImageList *)wxTreeCtrl_GetImageList(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageList_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxTreeCtrl_GetIndent(_swigobj) (_swigobj->GetIndent()) -static PyObject *_wrap_wxTreeCtrl_GetIndent(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTreeCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_GetIndent",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetIndent. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (int )wxTreeCtrl_GetIndent(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeCtrl_GetItemData(_swigobj,_swigarg0) (_swigobj->GetItemData(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_GetItemData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTreeCtrl_GetItemData",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemData. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (long )wxTreeCtrl_GetItemData(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -static wxTreeItem * wxTreeCtrl_GetItem(wxTreeCtrl *self) { - wxTreeItem* info = new wxTreeItem; - self->GetItem(*info); - return info; - } -static PyObject *_wrap_wxTreeCtrl_GetItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTreeItem * _result; - wxTreeCtrl * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_GetItem",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItem. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (wxTreeItem *)wxTreeCtrl_GetItem(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTreeItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxTreeCtrl_GetItemText(_swigobj,_swigarg0) (_swigobj->GetItemText(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_GetItemText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxTreeCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTreeCtrl_GetItemText",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemText. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = new wxString (wxTreeCtrl_GetItemText(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxTreeCtrl_GetParent(_swigobj,_swigarg0) (_swigobj->GetParent(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_GetParent(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTreeCtrl_GetParent",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetParent. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (long )wxTreeCtrl_GetParent(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeCtrl_GetRootItem(_swigobj) (_swigobj->GetRootItem()) -static PyObject *_wrap_wxTreeCtrl_GetRootItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_GetRootItem",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetRootItem. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (long )wxTreeCtrl_GetRootItem(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeCtrl_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxTreeCtrl_GetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_GetSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetSelection. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (long )wxTreeCtrl_GetSelection(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeCtrl_HitTest(_swigobj,_swigarg0,_swigarg1) (_swigobj->HitTest(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTreeCtrl_HitTest(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeCtrl * _arg0; - wxPoint * _arg1; - int * _arg2; - int temp; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; -{ - _arg2 = &temp; -} - if(!PyArg_ParseTuple(args,"ss:wxTreeCtrl_HitTest",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_HitTest. Expected _wxTreeCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_HitTest. Expected _wxPoint_p."); - return NULL; - } - } - _result = (long )wxTreeCtrl_HitTest(_arg0,*_arg1,*_arg2); - _resultobj = Py_BuildValue("l",_result); -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxTreeCtrl_InsertItem(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->InsertItem(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxTreeCtrl_InsertItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeCtrl * _arg0; - long _arg1; - wxTreeItem * _arg2; - long _arg3 = (wxTREE_INSERT_LAST); - char * _argc0 = 0; - char * _argc2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sls|l:wxTreeCtrl_InsertItem",&_argc0,&_arg1,&_argc2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_InsertItem. Expected _wxTreeCtrl_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxTreeCtrl_InsertItem. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (long )wxTreeCtrl_InsertItem(_arg0,_arg1,*_arg2,_arg3); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeCtrl_InsertItemString(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->InsertItem(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_wxTreeCtrl_InsertItemString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeCtrl * _arg0; - long _arg1; - wxString * _arg2; - int _arg3 = -1; - int _arg4 = -1; - long _arg5 = (wxTREE_INSERT_LAST); - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slO|iil:wxTreeCtrl_InsertItemString",&_argc0,&_arg1,&_obj2,&_arg3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_InsertItemString. Expected _wxTreeCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - _result = (long )wxTreeCtrl_InsertItemString(_arg0,_arg1,*_arg2,_arg3,_arg4,_arg5); - _resultobj = Py_BuildValue("l",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxTreeCtrl_ItemHasChildren(_swigobj,_swigarg0) (_swigobj->ItemHasChildren(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_ItemHasChildren(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTreeCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTreeCtrl_ItemHasChildren",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_ItemHasChildren. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (bool )wxTreeCtrl_ItemHasChildren(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeCtrl_SelectItem(_swigobj,_swigarg0) (_swigobj->SelectItem(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_SelectItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTreeCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTreeCtrl_SelectItem",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SelectItem. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (bool )wxTreeCtrl_SelectItem(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeCtrl_SetIndent(_swigobj,_swigarg0) (_swigobj->SetIndent(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_SetIndent(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTreeCtrl * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxTreeCtrl_SetIndent",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetIndent. Expected _wxTreeCtrl_p."); - return NULL; - } - } - wxTreeCtrl_SetIndent(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTreeCtrl_SetImageList(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetImageList(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTreeCtrl_SetImageList(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTreeCtrl * _arg0; - wxImageList * _arg1; - int _arg2 = wxIMAGE_LIST_NORMAL; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss|i:wxTreeCtrl_SetImageList",&_argc0,&_argc1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetImageList. Expected _wxTreeCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxImageList_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SetImageList. Expected _wxImageList_p."); - return NULL; - } - } - wxTreeCtrl_SetImageList(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTreeCtrl_SetItem(_swigobj,_swigarg0) (_swigobj->SetItem(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_SetItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTreeCtrl * _arg0; - wxTreeItem * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxTreeCtrl_SetItem",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItem. Expected _wxTreeCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SetItem. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (bool )wxTreeCtrl_SetItem(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeCtrl_SetItemImage(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemImage(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxTreeCtrl_SetItemImage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTreeCtrl * _arg0; - long _arg1; - int _arg2; - int _arg3; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slii:wxTreeCtrl_SetItemImage",&_argc0,&_arg1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemImage. Expected _wxTreeCtrl_p."); - return NULL; - } - } - wxTreeCtrl_SetItemImage(_arg0,_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTreeCtrl_SetItemText(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemText(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTreeCtrl_SetItemText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTreeCtrl * _arg0; - long _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slO:wxTreeCtrl_SetItemText",&_argc0,&_arg1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemText. Expected _wxTreeCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - wxTreeCtrl_SetItemText(_arg0,_arg1,*_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxTreeCtrl_SetItemData(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemData(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTreeCtrl_SetItemData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTreeCtrl * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxTreeCtrl_SetItemData",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemData. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (bool )wxTreeCtrl_SetItemData(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyMethodDef controls2cMethods[] = { - { "wxTreeCtrl_SetItemData", _wrap_wxTreeCtrl_SetItemData, 1 }, - { "wxTreeCtrl_SetItemText", _wrap_wxTreeCtrl_SetItemText, 1 }, - { "wxTreeCtrl_SetItemImage", _wrap_wxTreeCtrl_SetItemImage, 1 }, - { "wxTreeCtrl_SetItem", _wrap_wxTreeCtrl_SetItem, 1 }, - { "wxTreeCtrl_SetImageList", _wrap_wxTreeCtrl_SetImageList, 1 }, - { "wxTreeCtrl_SetIndent", _wrap_wxTreeCtrl_SetIndent, 1 }, - { "wxTreeCtrl_SelectItem", _wrap_wxTreeCtrl_SelectItem, 1 }, - { "wxTreeCtrl_ItemHasChildren", _wrap_wxTreeCtrl_ItemHasChildren, 1 }, - { "wxTreeCtrl_InsertItemString", _wrap_wxTreeCtrl_InsertItemString, 1 }, - { "wxTreeCtrl_InsertItem", _wrap_wxTreeCtrl_InsertItem, 1 }, - { "wxTreeCtrl_HitTest", _wrap_wxTreeCtrl_HitTest, 1 }, - { "wxTreeCtrl_GetSelection", _wrap_wxTreeCtrl_GetSelection, 1 }, - { "wxTreeCtrl_GetRootItem", _wrap_wxTreeCtrl_GetRootItem, 1 }, - { "wxTreeCtrl_GetParent", _wrap_wxTreeCtrl_GetParent, 1 }, - { "wxTreeCtrl_GetItemText", _wrap_wxTreeCtrl_GetItemText, 1 }, - { "wxTreeCtrl_GetItem", _wrap_wxTreeCtrl_GetItem, 1 }, - { "wxTreeCtrl_GetItemData", _wrap_wxTreeCtrl_GetItemData, 1 }, - { "wxTreeCtrl_GetIndent", _wrap_wxTreeCtrl_GetIndent, 1 }, - { "wxTreeCtrl_GetImageList", _wrap_wxTreeCtrl_GetImageList, 1 }, - { "wxTreeCtrl_GetCount", _wrap_wxTreeCtrl_GetCount, 1 }, - { "wxTreeCtrl_DeleteItem", _wrap_wxTreeCtrl_DeleteItem, 1 }, - { "wxTreeCtrl_DeleteAllItems", _wrap_wxTreeCtrl_DeleteAllItems, 1 }, - { "new_wxTreeCtrl", _wrap_new_wxTreeCtrl, 1 }, - { "wxTreeEvent_m_pointDrag_get", _wrap_wxTreeEvent_m_pointDrag_get, 1 }, - { "wxTreeEvent_m_oldItem_get", _wrap_wxTreeEvent_m_oldItem_get, 1 }, - { "wxTreeEvent_m_item_get", _wrap_wxTreeEvent_m_item_get, 1 }, - { "wxTreeEvent_m_code_get", _wrap_wxTreeEvent_m_code_get, 1 }, - { "delete_wxTreeItem", _wrap_delete_wxTreeItem, 1 }, - { "new_wxTreeItem", _wrap_new_wxTreeItem, 1 }, - { "wxTreeItem_m_data_get", _wrap_wxTreeItem_m_data_get, 1 }, - { "wxTreeItem_m_children_get", _wrap_wxTreeItem_m_children_get, 1 }, - { "wxTreeItem_m_selectedImage_get", _wrap_wxTreeItem_m_selectedImage_get, 1 }, - { "wxTreeItem_m_image_get", _wrap_wxTreeItem_m_image_get, 1 }, - { "wxTreeItem_m_text_get", _wrap_wxTreeItem_m_text_get, 1 }, - { "wxTreeItem_m_stateMask_get", _wrap_wxTreeItem_m_stateMask_get, 1 }, - { "wxTreeItem_m_state_get", _wrap_wxTreeItem_m_state_get, 1 }, - { "wxTreeItem_m_itemId_get", _wrap_wxTreeItem_m_itemId_get, 1 }, - { "wxTreeItem_m_mask_get", _wrap_wxTreeItem_m_mask_get, 1 }, - { "wxListCtrl_SetWindowStyleFlag", _wrap_wxListCtrl_SetWindowStyleFlag, 1 }, - { "wxListCtrl_SetSingleStyle", _wrap_wxListCtrl_SetSingleStyle, 1 }, - { "wxListCtrl_SetItemText", _wrap_wxListCtrl_SetItemText, 1 }, - { "wxListCtrl_SetItemState", _wrap_wxListCtrl_SetItemState, 1 }, - { "wxListCtrl_SetItemPosition", _wrap_wxListCtrl_SetItemPosition, 1 }, - { "wxListCtrl_SetItemImage", _wrap_wxListCtrl_SetItemImage, 1 }, - { "wxListCtrl_SetItemData", _wrap_wxListCtrl_SetItemData, 1 }, - { "wxListCtrl_SetItemString", _wrap_wxListCtrl_SetItemString, 1 }, - { "wxListCtrl_SetItem", _wrap_wxListCtrl_SetItem, 1 }, - { "wxListCtrl_SetImageList", _wrap_wxListCtrl_SetImageList, 1 }, - { "wxListCtrl_SetColumnWidth", _wrap_wxListCtrl_SetColumnWidth, 1 }, - { "wxListCtrl_SetColumn", _wrap_wxListCtrl_SetColumn, 1 }, - { "wxListCtrl_SetBackgroundColour", _wrap_wxListCtrl_SetBackgroundColour, 1 }, - { "wxListCtrl_ScrollList", _wrap_wxListCtrl_ScrollList, 1 }, - { "wxListCtrl_InsertImageStringItem", _wrap_wxListCtrl_InsertImageStringItem, 1 }, - { "wxListCtrl_InsertImageItem", _wrap_wxListCtrl_InsertImageItem, 1 }, - { "wxListCtrl_InsertStringItem", _wrap_wxListCtrl_InsertStringItem, 1 }, - { "wxListCtrl_InsertItem", _wrap_wxListCtrl_InsertItem, 1 }, - { "wxListCtrl_InsertColumn", _wrap_wxListCtrl_InsertColumn, 1 }, - { "wxListCtrl_InsertColumnWithInfo", _wrap_wxListCtrl_InsertColumnWithInfo, 1 }, - { "wxListCtrl_HitTest", _wrap_wxListCtrl_HitTest, 1 }, - { "wxListCtrl_GetTopItem", _wrap_wxListCtrl_GetTopItem, 1 }, - { "wxListCtrl_GetSelectedItemCount", _wrap_wxListCtrl_GetSelectedItemCount, 1 }, - { "wxListCtrl_GetNextItem", _wrap_wxListCtrl_GetNextItem, 1 }, - { "wxListCtrl_GetItemText", _wrap_wxListCtrl_GetItemText, 1 }, - { "wxListCtrl_GetItemSpacing", _wrap_wxListCtrl_GetItemSpacing, 1 }, - { "wxListCtrl_GetItemCount", _wrap_wxListCtrl_GetItemCount, 1 }, - { "wxListCtrl_GetItemState", _wrap_wxListCtrl_GetItemState, 1 }, - { "wxListCtrl_GetItemRect", _wrap_wxListCtrl_GetItemRect, 1 }, - { "wxListCtrl_GetItemPosition", _wrap_wxListCtrl_GetItemPosition, 1 }, - { "wxListCtrl_GetItem", _wrap_wxListCtrl_GetItem, 1 }, - { "wxListCtrl_GetItemData", _wrap_wxListCtrl_GetItemData, 1 }, - { "wxListCtrl_GetImageList", _wrap_wxListCtrl_GetImageList, 1 }, - { "wxListCtrl_GetCountPerPage", _wrap_wxListCtrl_GetCountPerPage, 1 }, - { "wxListCtrl_GetColumnWidth", _wrap_wxListCtrl_GetColumnWidth, 1 }, - { "wxListCtrl_GetColumn", _wrap_wxListCtrl_GetColumn, 1 }, - { "wxListCtrl_FindItemAtPos", _wrap_wxListCtrl_FindItemAtPos, 1 }, - { "wxListCtrl_FindItemData", _wrap_wxListCtrl_FindItemData, 1 }, - { "wxListCtrl_FindItem", _wrap_wxListCtrl_FindItem, 1 }, - { "wxListCtrl_EnsureVisible", _wrap_wxListCtrl_EnsureVisible, 1 }, - { "wxListCtrl_DeleteColumn", _wrap_wxListCtrl_DeleteColumn, 1 }, - { "wxListCtrl_DeleteAllItems", _wrap_wxListCtrl_DeleteAllItems, 1 }, - { "wxListCtrl_DeleteItem", _wrap_wxListCtrl_DeleteItem, 1 }, - { "wxListCtrl_Arrange", _wrap_wxListCtrl_Arrange, 1 }, - { "new_wxListCtrl", _wrap_new_wxListCtrl, 1 }, - { "wxListEvent_m_item_get", _wrap_wxListEvent_m_item_get, 1 }, - { "wxListEvent_m_pointDrag_get", _wrap_wxListEvent_m_pointDrag_get, 1 }, - { "wxListEvent_m_cancelled_get", _wrap_wxListEvent_m_cancelled_get, 1 }, - { "wxListEvent_m_col_get", _wrap_wxListEvent_m_col_get, 1 }, - { "wxListEvent_m_oldItemIndex_get", _wrap_wxListEvent_m_oldItemIndex_get, 1 }, - { "wxListEvent_m_itemIndex_get", _wrap_wxListEvent_m_itemIndex_get, 1 }, - { "wxListEvent_m_code_get", _wrap_wxListEvent_m_code_get, 1 }, - { "delete_wxListItem", _wrap_delete_wxListItem, 1 }, - { "new_wxListItem", _wrap_new_wxListItem, 1 }, - { "wxListItem_m_width_get", _wrap_wxListItem_m_width_get, 1 }, - { "wxListItem_m_format_get", _wrap_wxListItem_m_format_get, 1 }, - { "wxListItem_m_data_get", _wrap_wxListItem_m_data_get, 1 }, - { "wxListItem_m_image_get", _wrap_wxListItem_m_image_get, 1 }, - { "wxListItem_m_text_get", _wrap_wxListItem_m_text_get, 1 }, - { "wxListItem_m_stateMask_get", _wrap_wxListItem_m_stateMask_get, 1 }, - { "wxListItem_m_state_get", _wrap_wxListItem_m_state_get, 1 }, - { "wxListItem_m_col_get", _wrap_wxListItem_m_col_get, 1 }, - { "wxListItem_m_itemId_get", _wrap_wxListItem_m_itemId_get, 1 }, - { "wxListItem_m_mask_get", _wrap_wxListItem_m_mask_get, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initcontrols2c)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("controls2c", controls2cMethods); - d = PyModule_GetDict(m); - PyDict_SetItemString(d,"wxTREE_MASK_HANDLE", PyInt_FromLong((long) wxTREE_MASK_HANDLE)); - PyDict_SetItemString(d,"wxTREE_MASK_STATE", PyInt_FromLong((long) wxTREE_MASK_STATE)); - PyDict_SetItemString(d,"wxTREE_MASK_TEXT", PyInt_FromLong((long) wxTREE_MASK_TEXT)); - PyDict_SetItemString(d,"wxTREE_MASK_IMAGE", PyInt_FromLong((long) wxTREE_MASK_IMAGE)); - PyDict_SetItemString(d,"wxTREE_MASK_SELECTED_IMAGE", PyInt_FromLong((long) wxTREE_MASK_SELECTED_IMAGE)); - PyDict_SetItemString(d,"wxTREE_MASK_CHILDREN", PyInt_FromLong((long) wxTREE_MASK_CHILDREN)); - PyDict_SetItemString(d,"wxTREE_MASK_DATA", PyInt_FromLong((long) wxTREE_MASK_DATA)); - PyDict_SetItemString(d,"wxTREE_STATE_BOLD", PyInt_FromLong((long) wxTREE_STATE_BOLD)); - PyDict_SetItemString(d,"wxTREE_STATE_DROPHILITED", PyInt_FromLong((long) wxTREE_STATE_DROPHILITED)); - PyDict_SetItemString(d,"wxTREE_STATE_EXPANDED", PyInt_FromLong((long) wxTREE_STATE_EXPANDED)); - PyDict_SetItemString(d,"wxTREE_STATE_EXPANDEDONCE", PyInt_FromLong((long) wxTREE_STATE_EXPANDEDONCE)); - PyDict_SetItemString(d,"wxTREE_STATE_FOCUSED", PyInt_FromLong((long) wxTREE_STATE_FOCUSED)); - PyDict_SetItemString(d,"wxTREE_STATE_SELECTED", PyInt_FromLong((long) wxTREE_STATE_SELECTED)); - PyDict_SetItemString(d,"wxTREE_STATE_CUT", PyInt_FromLong((long) wxTREE_STATE_CUT)); - PyDict_SetItemString(d,"wxTREE_HITTEST_ABOVE", PyInt_FromLong((long) wxTREE_HITTEST_ABOVE)); - PyDict_SetItemString(d,"wxTREE_HITTEST_BELOW", PyInt_FromLong((long) wxTREE_HITTEST_BELOW)); - PyDict_SetItemString(d,"wxTREE_HITTEST_NOWHERE", PyInt_FromLong((long) wxTREE_HITTEST_NOWHERE)); - PyDict_SetItemString(d,"wxTREE_HITTEST_ONITEMBUTTON", PyInt_FromLong((long) wxTREE_HITTEST_ONITEMBUTTON)); - PyDict_SetItemString(d,"wxTREE_HITTEST_ONITEMICON", PyInt_FromLong((long) wxTREE_HITTEST_ONITEMICON)); - PyDict_SetItemString(d,"wxTREE_HITTEST_ONITEMINDENT", PyInt_FromLong((long) wxTREE_HITTEST_ONITEMINDENT)); - PyDict_SetItemString(d,"wxTREE_HITTEST_ONITEMLABEL", PyInt_FromLong((long) wxTREE_HITTEST_ONITEMLABEL)); - PyDict_SetItemString(d,"wxTREE_HITTEST_ONITEMRIGHT", PyInt_FromLong((long) wxTREE_HITTEST_ONITEMRIGHT)); - PyDict_SetItemString(d,"wxTREE_HITTEST_ONITEMSTATEICON", PyInt_FromLong((long) wxTREE_HITTEST_ONITEMSTATEICON)); - PyDict_SetItemString(d,"wxTREE_HITTEST_TOLEFT", PyInt_FromLong((long) wxTREE_HITTEST_TOLEFT)); - PyDict_SetItemString(d,"wxTREE_HITTEST_TORIGHT", PyInt_FromLong((long) wxTREE_HITTEST_TORIGHT)); - PyDict_SetItemString(d,"wxTREE_HITTEST_ONITEM", PyInt_FromLong((long) wxTREE_HITTEST_ONITEM)); - PyDict_SetItemString(d,"wxTREE_NEXT_CARET", PyInt_FromLong((long) wxTREE_NEXT_CARET)); - PyDict_SetItemString(d,"wxTREE_NEXT_CHILD", PyInt_FromLong((long) wxTREE_NEXT_CHILD)); - PyDict_SetItemString(d,"wxTREE_NEXT_DROPHILITE", PyInt_FromLong((long) wxTREE_NEXT_DROPHILITE)); - PyDict_SetItemString(d,"wxTREE_NEXT_FIRSTVISIBLE", PyInt_FromLong((long) wxTREE_NEXT_FIRSTVISIBLE)); - PyDict_SetItemString(d,"wxTREE_NEXT_NEXT", PyInt_FromLong((long) wxTREE_NEXT_NEXT)); - PyDict_SetItemString(d,"wxTREE_NEXT_NEXTVISIBLE", PyInt_FromLong((long) wxTREE_NEXT_NEXTVISIBLE)); - PyDict_SetItemString(d,"wxTREE_NEXT_PARENT", PyInt_FromLong((long) wxTREE_NEXT_PARENT)); - PyDict_SetItemString(d,"wxTREE_NEXT_PREVIOUS", PyInt_FromLong((long) wxTREE_NEXT_PREVIOUS)); - PyDict_SetItemString(d,"wxTREE_NEXT_PREVIOUSVISIBLE", PyInt_FromLong((long) wxTREE_NEXT_PREVIOUSVISIBLE)); - PyDict_SetItemString(d,"wxTREE_NEXT_ROOT", PyInt_FromLong((long) wxTREE_NEXT_ROOT)); - PyDict_SetItemString(d,"wxTREE_EXPAND_EXPAND", PyInt_FromLong((long) wxTREE_EXPAND_EXPAND)); - PyDict_SetItemString(d,"wxTREE_EXPAND_COLLAPSE", PyInt_FromLong((long) wxTREE_EXPAND_COLLAPSE)); - PyDict_SetItemString(d,"wxTREE_EXPAND_COLLAPSE_RESET", PyInt_FromLong((long) wxTREE_EXPAND_COLLAPSE_RESET)); - PyDict_SetItemString(d,"wxTREE_EXPAND_TOGGLE", PyInt_FromLong((long) wxTREE_EXPAND_TOGGLE)); - PyDict_SetItemString(d,"wxTREE_INSERT_LAST", PyInt_FromLong((long) wxTREE_INSERT_LAST)); - PyDict_SetItemString(d,"wxTREE_INSERT_FIRST", PyInt_FromLong((long) wxTREE_INSERT_FIRST)); - PyDict_SetItemString(d,"wxTREE_INSERT_SORT", PyInt_FromLong((long) wxTREE_INSERT_SORT)); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_wxEvent","_class_wxTreeEvent",SwigwxTreeEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxTreeEvent",SwigwxTreeEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxListEvent",SwigwxListEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxListEvent",SwigwxListEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxEvent",0); - SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0); - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0); - SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxTreeCtrl",SwigwxTreeCtrlTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxTreeCtrl",SwigwxTreeCtrlTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxListCtrl",SwigwxListCtrlTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxListCtrl",SwigwxListCtrlTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxEvtHandler",0); - SWIG_RegisterMapping("_wxPaintEvent","_class_wxPaintEvent",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); - SWIG_RegisterMapping("_class_wxTreeCtrl","_wxTreeCtrl",0); - SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); - SWIG_RegisterMapping("_wxPen","_class_wxPen",0); - SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_wxStaticBox","_class_wxStaticBox",0); - SWIG_RegisterMapping("_wxChoice","_class_wxChoice",0); - SWIG_RegisterMapping("_wxSlider","_class_wxSlider",0); - SWIG_RegisterMapping("_long","_wxDash",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_wxDropFilesEvent","_class_wxDropFilesEvent",0); - SWIG_RegisterMapping("_wxBitmapButton","_class_wxBitmapButton",0); - SWIG_RegisterMapping("_class_wxGauge","_wxGauge",0); - SWIG_RegisterMapping("_wxDC","_class_wxDC",0); - SWIG_RegisterMapping("_wxListEvent","_class_wxListEvent",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_class_wxMenuItem","_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxPaintEvent","_wxPaintEvent",0); - SWIG_RegisterMapping("_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxPanel","_class_wxPanel",0); - SWIG_RegisterMapping("_wxInitDialogEvent","_class_wxInitDialogEvent",0); - SWIG_RegisterMapping("_wxCheckBox","_class_wxCheckBox",0); - SWIG_RegisterMapping("_wxTextCtrl","_class_wxTextCtrl",0); - SWIG_RegisterMapping("_class_wxMask","_wxMask",0); - SWIG_RegisterMapping("_class_wxKeyEvent","_wxKeyEvent",0); - SWIG_RegisterMapping("_wxColour","_class_wxColour",0); - SWIG_RegisterMapping("_class_wxDialog","_wxDialog",0); - SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); - SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); - SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxEvent","_class_wxTreeEvent",SwigwxTreeEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxTreeEvent",SwigwxTreeEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxListEvent",SwigwxListEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxListEvent",SwigwxListEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxEvent",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxCommandEvent","_class_wxTreeEvent",SwigwxTreeEventTowxCommandEvent); - SWIG_RegisterMapping("_wxCommandEvent","_wxTreeEvent",SwigwxTreeEventTowxCommandEvent); - SWIG_RegisterMapping("_wxCommandEvent","_class_wxListEvent",SwigwxListEventTowxCommandEvent); - SWIG_RegisterMapping("_wxCommandEvent","_wxListEvent",SwigwxListEventTowxCommandEvent); - SWIG_RegisterMapping("_wxCommandEvent","_class_wxCommandEvent",0); - SWIG_RegisterMapping("_wxSizeEvent","_class_wxSizeEvent",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_class_wxButton","_wxButton",0); - SWIG_RegisterMapping("_wxRadioBox","_class_wxRadioBox",0); - SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_wxScrollBar","_class_wxScrollBar",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0); - SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0); - SWIG_RegisterMapping("_wxListItem","_class_wxListItem",0); - SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxDropFilesEvent","_wxDropFilesEvent",0); - SWIG_RegisterMapping("_wxStaticText","_class_wxStaticText",0); - SWIG_RegisterMapping("_wxFont","_class_wxFont",0); - SWIG_RegisterMapping("_wxCloseEvent","_class_wxCloseEvent",0); - SWIG_RegisterMapping("_unsigned_long","_wxDash",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxDC","_wxDC",0); - SWIG_RegisterMapping("_class_wxTreeEvent","_wxTreeEvent",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_wxFocusEvent","_class_wxFocusEvent",0); - SWIG_RegisterMapping("_wxMaximizeEvent","_class_wxMaximizeEvent",0); - SWIG_RegisterMapping("_class_wxPanel","_wxPanel",0); - SWIG_RegisterMapping("_class_wxCheckBox","_wxCheckBox",0); - SWIG_RegisterMapping("_wxComboBox","_class_wxComboBox",0); - SWIG_RegisterMapping("_wxRadioButton","_class_wxRadioButton",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_class_wxTextCtrl","_wxTextCtrl",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxMenu","_class_wxMenu",0); - SWIG_RegisterMapping("_class_wxMoveEvent","_wxMoveEvent",0); - SWIG_RegisterMapping("_wxListBox","_class_wxListBox",0); - SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_class_wxBrush","_wxBrush",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxWindow","_class_wxTreeCtrl",SwigwxTreeCtrlTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxTreeCtrl",SwigwxTreeCtrlTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxListCtrl",SwigwxListCtrlTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxListCtrl",SwigwxListCtrlTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxWindow",0); - SWIG_RegisterMapping("_class_wxStaticText","_wxStaticText",0); - SWIG_RegisterMapping("_class_wxFont","_wxFont",0); - SWIG_RegisterMapping("_class_wxCloseEvent","_wxCloseEvent",0); - SWIG_RegisterMapping("_wxTreeItem","_class_wxTreeItem",0); - SWIG_RegisterMapping("_class_wxMenuEvent","_wxMenuEvent",0); - SWIG_RegisterMapping("_wxClientDC","_class_wxClientDC",0); - SWIG_RegisterMapping("_wxMouseEvent","_class_wxMouseEvent",0); - SWIG_RegisterMapping("_wxListCtrl","_class_wxListCtrl",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_class_wxRadioBox","_wxRadioBox",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_wxMemoryDC","_class_wxMemoryDC",0); - SWIG_RegisterMapping("_wxPaintDC","_class_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxFocusEvent","_wxFocusEvent",0); - SWIG_RegisterMapping("_class_wxMaximizeEvent","_wxMaximizeEvent",0); - SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); - SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_class_wxMenu","_wxMenu",0); - SWIG_RegisterMapping("_wxControl","_class_wxTreeCtrl",SwigwxTreeCtrlTowxControl); - SWIG_RegisterMapping("_wxControl","_wxTreeCtrl",SwigwxTreeCtrlTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxListCtrl",SwigwxListCtrlTowxControl); - SWIG_RegisterMapping("_wxControl","_wxListCtrl",SwigwxListCtrlTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxControl",0); - SWIG_RegisterMapping("_class_wxListBox","_wxListBox",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); - SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); - SWIG_RegisterMapping("_class_wxListItem","_wxListItem",0); - SWIG_RegisterMapping("_class_wxPen","_wxPen",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_class_wxStaticBox","_wxStaticBox",0); - SWIG_RegisterMapping("_class_wxScrollEvent","_wxScrollEvent",0); - SWIG_RegisterMapping("_wxJoystickEvent","_class_wxJoystickEvent",0); - SWIG_RegisterMapping("_class_wxChoice","_wxChoice",0); - SWIG_RegisterMapping("_class_wxSlider","_wxSlider",0); - SWIG_RegisterMapping("_class_wxBitmapButton","_wxBitmapButton",0); - SWIG_RegisterMapping("_wxFrame","_class_wxFrame",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_class_wxMouseEvent","_wxMouseEvent",0); - SWIG_RegisterMapping("_class_wxListEvent","_wxListEvent",0); - SWIG_RegisterMapping("_wxButton","_class_wxButton",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxPaintDC","_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_class_wxInitDialogEvent","_wxInitDialogEvent",0); - SWIG_RegisterMapping("_class_wxComboBox","_wxComboBox",0); - SWIG_RegisterMapping("_class_wxRadioButton","_wxRadioButton",0); - SWIG_RegisterMapping("_wxTreeCtrl","_class_wxTreeCtrl",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxIconizeEvent","_class_wxIconizeEvent",0); - SWIG_RegisterMapping("_class_wxControl","_class_wxTreeCtrl",SwigwxTreeCtrlTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxTreeCtrl",SwigwxTreeCtrlTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxListCtrl",SwigwxListCtrlTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxListCtrl",SwigwxListCtrlTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxControl",0); - SWIG_RegisterMapping("_wxStaticBitmap","_class_wxStaticBitmap",0); - SWIG_RegisterMapping("_class_wxIcon","_wxIcon",0); - SWIG_RegisterMapping("_class_wxColour","_wxColour",0); - SWIG_RegisterMapping("_class_wxScreenDC","_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxIdleEvent","_wxIdleEvent",0); - SWIG_RegisterMapping("_wxEraseEvent","_class_wxEraseEvent",0); - SWIG_RegisterMapping("_class_wxJoystickEvent","_wxJoystickEvent",0); - SWIG_RegisterMapping("_class_wxShowEvent","_wxShowEvent",0); - SWIG_RegisterMapping("_wxActivateEvent","_class_wxActivateEvent",0); - SWIG_RegisterMapping("_wxGauge","_class_wxGauge",0); - SWIG_RegisterMapping("_class_wxTreeItem","_wxTreeItem",0); - SWIG_RegisterMapping("_class_wxCommandEvent","_class_wxTreeEvent",SwigwxTreeEventTowxCommandEvent); - SWIG_RegisterMapping("_class_wxCommandEvent","_wxTreeEvent",SwigwxTreeEventTowxCommandEvent); - SWIG_RegisterMapping("_class_wxCommandEvent","_class_wxListEvent",SwigwxListEventTowxCommandEvent); - SWIG_RegisterMapping("_class_wxCommandEvent","_wxListEvent",SwigwxListEventTowxCommandEvent); - SWIG_RegisterMapping("_class_wxCommandEvent","_wxCommandEvent",0); - SWIG_RegisterMapping("_class_wxClientDC","_wxClientDC",0); - SWIG_RegisterMapping("_class_wxSizeEvent","_wxSizeEvent",0); - SWIG_RegisterMapping("_class_wxListCtrl","_wxListCtrl",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); - SWIG_RegisterMapping("_class_wxBitmap","_wxBitmap",0); - SWIG_RegisterMapping("_class_wxMemoryDC","_wxMemoryDC",0); - SWIG_RegisterMapping("_wxMenuBar","_class_wxMenuBar",0); - SWIG_RegisterMapping("_wxTreeEvent","_class_wxTreeEvent",0); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxTreeCtrl",SwigwxTreeCtrlTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxTreeCtrl",SwigwxTreeCtrlTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxListCtrl",SwigwxListCtrlTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxListCtrl",SwigwxListCtrlTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxEvtHandler",0); - SWIG_RegisterMapping("_wxMenuItem","_class_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxScrollBar","_wxScrollBar",0); - SWIG_RegisterMapping("_wxDash","_unsigned_long",0); - SWIG_RegisterMapping("_wxDash","_long",0); - SWIG_RegisterMapping("_class_wxScrolledWindow","_wxScrolledWindow",0); - SWIG_RegisterMapping("_wxKeyEvent","_class_wxKeyEvent",0); - SWIG_RegisterMapping("_wxMoveEvent","_class_wxMoveEvent",0); - SWIG_RegisterMapping("_class_wxEraseEvent","_wxEraseEvent",0); - SWIG_RegisterMapping("_wxWindow","_class_wxTreeCtrl",SwigwxTreeCtrlTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxTreeCtrl",SwigwxTreeCtrlTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxListCtrl",SwigwxListCtrlTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxListCtrl",SwigwxListCtrlTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxWindow",0); - SWIG_RegisterMapping("_class_wxFrame","_wxFrame",0); -} diff --git a/utils/wxPython/src/gtk/controls2.py b/utils/wxPython/src/gtk/controls2.py deleted file mode 100644 index 43d83c7d1d..0000000000 --- a/utils/wxPython/src/gtk/controls2.py +++ /dev/null @@ -1,535 +0,0 @@ -# This file was created automatically by SWIG. -import controls2c - -from misc import * - -from windows import * - -from gdi import * - -from events import * - -from controls import * -class wxListItemPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - controls2c.delete_wxListItem(self.this) - def __setattr__(self,name,value): - if name == "m_mask" : - controls2c.wxListItem_m_mask_set(self.this,value) - return - if name == "m_itemId" : - controls2c.wxListItem_m_itemId_set(self.this,value) - return - if name == "m_col" : - controls2c.wxListItem_m_col_set(self.this,value) - return - if name == "m_state" : - controls2c.wxListItem_m_state_set(self.this,value) - return - if name == "m_stateMask" : - controls2c.wxListItem_m_stateMask_set(self.this,value) - return - if name == "m_text" : - controls2c.wxListItem_m_text_set(self.this,value) - return - if name == "m_image" : - controls2c.wxListItem_m_image_set(self.this,value) - return - if name == "m_data" : - controls2c.wxListItem_m_data_set(self.this,value) - return - if name == "m_format" : - controls2c.wxListItem_m_format_set(self.this,value) - return - if name == "m_width" : - controls2c.wxListItem_m_width_set(self.this,value) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "m_mask" : - return controls2c.wxListItem_m_mask_get(self.this) - if name == "m_itemId" : - return controls2c.wxListItem_m_itemId_get(self.this) - if name == "m_col" : - return controls2c.wxListItem_m_col_get(self.this) - if name == "m_state" : - return controls2c.wxListItem_m_state_get(self.this) - if name == "m_stateMask" : - return controls2c.wxListItem_m_stateMask_get(self.this) - if name == "m_text" : - return controls2c.wxListItem_m_text_get(self.this) - if name == "m_image" : - return controls2c.wxListItem_m_image_get(self.this) - if name == "m_data" : - return controls2c.wxListItem_m_data_get(self.this) - if name == "m_format" : - return controls2c.wxListItem_m_format_get(self.this) - if name == "m_width" : - return controls2c.wxListItem_m_width_get(self.this) - raise AttributeError,name - def __repr__(self): - return "" -class wxListItem(wxListItemPtr): - def __init__(self) : - self.this = controls2c.new_wxListItem() - self.thisown = 1 - - - - -class wxListEventPtr(wxCommandEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __setattr__(self,name,value): - if name == "m_code" : - controls2c.wxListEvent_m_code_set(self.this,value) - return - if name == "m_itemIndex" : - controls2c.wxListEvent_m_itemIndex_set(self.this,value) - return - if name == "m_oldItemIndex" : - controls2c.wxListEvent_m_oldItemIndex_set(self.this,value) - return - if name == "m_col" : - controls2c.wxListEvent_m_col_set(self.this,value) - return - if name == "m_cancelled" : - controls2c.wxListEvent_m_cancelled_set(self.this,value) - return - if name == "m_pointDrag" : - controls2c.wxListEvent_m_pointDrag_set(self.this,value.this) - return - if name == "m_item" : - controls2c.wxListEvent_m_item_set(self.this,value.this) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "m_code" : - return controls2c.wxListEvent_m_code_get(self.this) - if name == "m_itemIndex" : - return controls2c.wxListEvent_m_itemIndex_get(self.this) - if name == "m_oldItemIndex" : - return controls2c.wxListEvent_m_oldItemIndex_get(self.this) - if name == "m_col" : - return controls2c.wxListEvent_m_col_get(self.this) - if name == "m_cancelled" : - return controls2c.wxListEvent_m_cancelled_get(self.this) - if name == "m_pointDrag" : - return wxPointPtr(controls2c.wxListEvent_m_pointDrag_get(self.this)) - if name == "m_item" : - return wxListItemPtr(controls2c.wxListEvent_m_item_get(self.this)) - raise AttributeError,name - def __repr__(self): - return "" -class wxListEvent(wxListEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxListCtrlPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Arrange(self,*args): - val = apply(controls2c.wxListCtrl_Arrange,(self.this,)+args) - return val - def DeleteItem(self,arg0): - val = controls2c.wxListCtrl_DeleteItem(self.this,arg0) - return val - def DeleteAllItems(self): - val = controls2c.wxListCtrl_DeleteAllItems(self.this) - return val - def DeleteColumn(self,arg0): - val = controls2c.wxListCtrl_DeleteColumn(self.this,arg0) - return val - def EnsureVisible(self,arg0): - val = controls2c.wxListCtrl_EnsureVisible(self.this,arg0) - return val - def FindItem(self,arg0,arg1,*args): - val = apply(controls2c.wxListCtrl_FindItem,(self.this,arg0,arg1,)+args) - return val - def FindItemData(self,arg0,arg1): - val = controls2c.wxListCtrl_FindItemData(self.this,arg0,arg1) - return val - def FindItemAtPos(self,arg0,arg1,arg2): - val = controls2c.wxListCtrl_FindItemAtPos(self.this,arg0,arg1.this,arg2) - return val - def GetColumn(self,arg0,arg1): - val = controls2c.wxListCtrl_GetColumn(self.this,arg0,arg1.this) - return val - def GetColumnWidth(self,arg0): - val = controls2c.wxListCtrl_GetColumnWidth(self.this,arg0) - return val - def GetCountPerPage(self): - val = controls2c.wxListCtrl_GetCountPerPage(self.this) - return val - def GetImageList(self,arg0): - val = controls2c.wxListCtrl_GetImageList(self.this,arg0) - return val - def GetItemData(self,arg0): - val = controls2c.wxListCtrl_GetItemData(self.this,arg0) - return val - def GetItem(self): - val = controls2c.wxListCtrl_GetItem(self.this) - val = wxListItemPtr(val) - val.thisown = 1 - return val - def GetItemPosition(self,arg0): - val = controls2c.wxListCtrl_GetItemPosition(self.this,arg0) - val = wxPointPtr(val) - val.thisown = 1 - return val - def GetItemRect(self,arg0,*args): - val = apply(controls2c.wxListCtrl_GetItemRect,(self.this,arg0,)+args) - val = wxRectPtr(val) - val.thisown = 1 - return val - def GetItemState(self,arg0,arg1): - val = controls2c.wxListCtrl_GetItemState(self.this,arg0,arg1) - return val - def GetItemCount(self): - val = controls2c.wxListCtrl_GetItemCount(self.this) - return val - def GetItemSpacing(self,arg0): - val = controls2c.wxListCtrl_GetItemSpacing(self.this,arg0) - return val - def GetItemText(self,arg0): - val = controls2c.wxListCtrl_GetItemText(self.this,arg0) - return val - def GetNextItem(self,arg0,*args): - val = apply(controls2c.wxListCtrl_GetNextItem,(self.this,arg0,)+args) - return val - def GetSelectedItemCount(self): - val = controls2c.wxListCtrl_GetSelectedItemCount(self.this) - return val - def GetTopItem(self): - val = controls2c.wxListCtrl_GetTopItem(self.this) - return val - def HitTest(self,arg0): - val = controls2c.wxListCtrl_HitTest(self.this,arg0.this) - return val - def InsertColumnWithInfo(self,arg0,arg1): - val = controls2c.wxListCtrl_InsertColumnWithInfo(self.this,arg0,arg1.this) - return val - def InsertColumn(self,arg0,arg1,*args): - val = apply(controls2c.wxListCtrl_InsertColumn,(self.this,arg0,arg1,)+args) - return val - def InsertItem(self,arg0): - val = controls2c.wxListCtrl_InsertItem(self.this,arg0.this) - return val - def InsertStringItem(self,arg0,arg1): - val = controls2c.wxListCtrl_InsertStringItem(self.this,arg0,arg1) - return val - def InsertImageItem(self,arg0,arg1): - val = controls2c.wxListCtrl_InsertImageItem(self.this,arg0,arg1) - return val - def InsertImageStringItem(self,arg0,arg1,arg2): - val = controls2c.wxListCtrl_InsertImageStringItem(self.this,arg0,arg1,arg2) - return val - def ScrollList(self,arg0,arg1): - val = controls2c.wxListCtrl_ScrollList(self.this,arg0,arg1) - return val - def SetBackgroundColour(self,arg0): - val = controls2c.wxListCtrl_SetBackgroundColour(self.this,arg0.this) - return val - def SetColumn(self,arg0,arg1): - val = controls2c.wxListCtrl_SetColumn(self.this,arg0,arg1.this) - return val - def SetColumnWidth(self,arg0,arg1): - val = controls2c.wxListCtrl_SetColumnWidth(self.this,arg0,arg1) - return val - def SetImageList(self,arg0,arg1): - val = controls2c.wxListCtrl_SetImageList(self.this,arg0,arg1) - return val - def SetItem(self,arg0): - val = controls2c.wxListCtrl_SetItem(self.this,arg0.this) - return val - def SetItemString(self,arg0,arg1,arg2,*args): - val = apply(controls2c.wxListCtrl_SetItemString,(self.this,arg0,arg1,arg2,)+args) - return val - def SetItemData(self,arg0,arg1): - val = controls2c.wxListCtrl_SetItemData(self.this,arg0,arg1) - return val - def SetItemImage(self,arg0,arg1,arg2): - val = controls2c.wxListCtrl_SetItemImage(self.this,arg0,arg1,arg2) - return val - def SetItemPosition(self,arg0,arg1): - val = controls2c.wxListCtrl_SetItemPosition(self.this,arg0,arg1.this) - return val - def SetItemState(self,arg0,arg1,arg2): - val = controls2c.wxListCtrl_SetItemState(self.this,arg0,arg1,arg2) - return val - def SetItemText(self,arg0,arg1): - val = controls2c.wxListCtrl_SetItemText(self.this,arg0,arg1) - return val - def SetSingleStyle(self,arg0,*args): - val = apply(controls2c.wxListCtrl_SetSingleStyle,(self.this,arg0,)+args) - return val - def SetWindowStyleFlag(self,arg0): - val = controls2c.wxListCtrl_SetWindowStyleFlag(self.this,arg0) - return val - def __repr__(self): - return "" -class wxListCtrl(wxListCtrlPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controls2c.new_wxListCtrl,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - -class wxTreeItemPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - controls2c.delete_wxTreeItem(self.this) - def __setattr__(self,name,value): - if name == "m_mask" : - controls2c.wxTreeItem_m_mask_set(self.this,value) - return - if name == "m_itemId" : - controls2c.wxTreeItem_m_itemId_set(self.this,value) - return - if name == "m_state" : - controls2c.wxTreeItem_m_state_set(self.this,value) - return - if name == "m_stateMask" : - controls2c.wxTreeItem_m_stateMask_set(self.this,value) - return - if name == "m_text" : - controls2c.wxTreeItem_m_text_set(self.this,value) - return - if name == "m_image" : - controls2c.wxTreeItem_m_image_set(self.this,value) - return - if name == "m_selectedImage" : - controls2c.wxTreeItem_m_selectedImage_set(self.this,value) - return - if name == "m_children" : - controls2c.wxTreeItem_m_children_set(self.this,value) - return - if name == "m_data" : - controls2c.wxTreeItem_m_data_set(self.this,value) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "m_mask" : - return controls2c.wxTreeItem_m_mask_get(self.this) - if name == "m_itemId" : - return controls2c.wxTreeItem_m_itemId_get(self.this) - if name == "m_state" : - return controls2c.wxTreeItem_m_state_get(self.this) - if name == "m_stateMask" : - return controls2c.wxTreeItem_m_stateMask_get(self.this) - if name == "m_text" : - return controls2c.wxTreeItem_m_text_get(self.this) - if name == "m_image" : - return controls2c.wxTreeItem_m_image_get(self.this) - if name == "m_selectedImage" : - return controls2c.wxTreeItem_m_selectedImage_get(self.this) - if name == "m_children" : - return controls2c.wxTreeItem_m_children_get(self.this) - if name == "m_data" : - return controls2c.wxTreeItem_m_data_get(self.this) - raise AttributeError,name - def __repr__(self): - return "" -class wxTreeItem(wxTreeItemPtr): - def __init__(self) : - self.this = controls2c.new_wxTreeItem() - self.thisown = 1 - - - - -class wxTreeEventPtr(wxCommandEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __setattr__(self,name,value): - if name == "m_code" : - controls2c.wxTreeEvent_m_code_set(self.this,value) - return - if name == "m_item" : - controls2c.wxTreeEvent_m_item_set(self.this,value.this) - return - if name == "m_oldItem" : - controls2c.wxTreeEvent_m_oldItem_set(self.this,value) - return - if name == "m_pointDrag" : - controls2c.wxTreeEvent_m_pointDrag_set(self.this,value.this) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "m_code" : - return controls2c.wxTreeEvent_m_code_get(self.this) - if name == "m_item" : - return wxTreeItemPtr(controls2c.wxTreeEvent_m_item_get(self.this)) - if name == "m_oldItem" : - return controls2c.wxTreeEvent_m_oldItem_get(self.this) - if name == "m_pointDrag" : - return wxPointPtr(controls2c.wxTreeEvent_m_pointDrag_get(self.this)) - raise AttributeError,name - def __repr__(self): - return "" -class wxTreeEvent(wxTreeEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxTreeCtrlPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def DeleteAllItems(self): - val = controls2c.wxTreeCtrl_DeleteAllItems(self.this) - return val - def DeleteItem(self,arg0): - val = controls2c.wxTreeCtrl_DeleteItem(self.this,arg0) - return val - def GetCount(self): - val = controls2c.wxTreeCtrl_GetCount(self.this) - return val - def GetImageList(self,*args): - val = apply(controls2c.wxTreeCtrl_GetImageList,(self.this,)+args) - return val - def GetIndent(self): - val = controls2c.wxTreeCtrl_GetIndent(self.this) - return val - def GetItemData(self,arg0): - val = controls2c.wxTreeCtrl_GetItemData(self.this,arg0) - return val - def GetItem(self): - val = controls2c.wxTreeCtrl_GetItem(self.this) - val = wxTreeItemPtr(val) - val.thisown = 1 - return val - def GetItemText(self,arg0): - val = controls2c.wxTreeCtrl_GetItemText(self.this,arg0) - return val - def GetParent(self,arg0): - val = controls2c.wxTreeCtrl_GetParent(self.this,arg0) - return val - def GetRootItem(self): - val = controls2c.wxTreeCtrl_GetRootItem(self.this) - return val - def GetSelection(self): - val = controls2c.wxTreeCtrl_GetSelection(self.this) - return val - def HitTest(self,arg0): - val = controls2c.wxTreeCtrl_HitTest(self.this,arg0.this) - return val - def InsertItem(self,arg0,arg1,*args): - val = apply(controls2c.wxTreeCtrl_InsertItem,(self.this,arg0,arg1.this,)+args) - return val - def InsertItemString(self,arg0,arg1,*args): - val = apply(controls2c.wxTreeCtrl_InsertItemString,(self.this,arg0,arg1,)+args) - return val - def ItemHasChildren(self,arg0): - val = controls2c.wxTreeCtrl_ItemHasChildren(self.this,arg0) - return val - def SelectItem(self,arg0): - val = controls2c.wxTreeCtrl_SelectItem(self.this,arg0) - return val - def SetIndent(self,arg0): - val = controls2c.wxTreeCtrl_SetIndent(self.this,arg0) - return val - def SetImageList(self,arg0,*args): - val = apply(controls2c.wxTreeCtrl_SetImageList,(self.this,arg0,)+args) - return val - def SetItem(self,arg0): - val = controls2c.wxTreeCtrl_SetItem(self.this,arg0.this) - return val - def SetItemImage(self,arg0,arg1,arg2): - val = controls2c.wxTreeCtrl_SetItemImage(self.this,arg0,arg1,arg2) - return val - def SetItemText(self,arg0,arg1): - val = controls2c.wxTreeCtrl_SetItemText(self.this,arg0,arg1) - return val - def SetItemData(self,arg0,arg1): - val = controls2c.wxTreeCtrl_SetItemData(self.this,arg0,arg1) - return val - def __repr__(self): - return "" -class wxTreeCtrl(wxTreeCtrlPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controls2c.new_wxTreeCtrl,(arg0.this,)+args) - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - - - -#-------------- VARIABLE WRAPPERS ------------------ - -wxTREE_MASK_HANDLE = controls2c.wxTREE_MASK_HANDLE -wxTREE_MASK_STATE = controls2c.wxTREE_MASK_STATE -wxTREE_MASK_TEXT = controls2c.wxTREE_MASK_TEXT -wxTREE_MASK_IMAGE = controls2c.wxTREE_MASK_IMAGE -wxTREE_MASK_SELECTED_IMAGE = controls2c.wxTREE_MASK_SELECTED_IMAGE -wxTREE_MASK_CHILDREN = controls2c.wxTREE_MASK_CHILDREN -wxTREE_MASK_DATA = controls2c.wxTREE_MASK_DATA -wxTREE_STATE_BOLD = controls2c.wxTREE_STATE_BOLD -wxTREE_STATE_DROPHILITED = controls2c.wxTREE_STATE_DROPHILITED -wxTREE_STATE_EXPANDED = controls2c.wxTREE_STATE_EXPANDED -wxTREE_STATE_EXPANDEDONCE = controls2c.wxTREE_STATE_EXPANDEDONCE -wxTREE_STATE_FOCUSED = controls2c.wxTREE_STATE_FOCUSED -wxTREE_STATE_SELECTED = controls2c.wxTREE_STATE_SELECTED -wxTREE_STATE_CUT = controls2c.wxTREE_STATE_CUT -wxTREE_HITTEST_ABOVE = controls2c.wxTREE_HITTEST_ABOVE -wxTREE_HITTEST_BELOW = controls2c.wxTREE_HITTEST_BELOW -wxTREE_HITTEST_NOWHERE = controls2c.wxTREE_HITTEST_NOWHERE -wxTREE_HITTEST_ONITEMBUTTON = controls2c.wxTREE_HITTEST_ONITEMBUTTON -wxTREE_HITTEST_ONITEMICON = controls2c.wxTREE_HITTEST_ONITEMICON -wxTREE_HITTEST_ONITEMINDENT = controls2c.wxTREE_HITTEST_ONITEMINDENT -wxTREE_HITTEST_ONITEMLABEL = controls2c.wxTREE_HITTEST_ONITEMLABEL -wxTREE_HITTEST_ONITEMRIGHT = controls2c.wxTREE_HITTEST_ONITEMRIGHT -wxTREE_HITTEST_ONITEMSTATEICON = controls2c.wxTREE_HITTEST_ONITEMSTATEICON -wxTREE_HITTEST_TOLEFT = controls2c.wxTREE_HITTEST_TOLEFT -wxTREE_HITTEST_TORIGHT = controls2c.wxTREE_HITTEST_TORIGHT -wxTREE_HITTEST_ONITEM = controls2c.wxTREE_HITTEST_ONITEM -wxTREE_NEXT_CARET = controls2c.wxTREE_NEXT_CARET -wxTREE_NEXT_CHILD = controls2c.wxTREE_NEXT_CHILD -wxTREE_NEXT_DROPHILITE = controls2c.wxTREE_NEXT_DROPHILITE -wxTREE_NEXT_FIRSTVISIBLE = controls2c.wxTREE_NEXT_FIRSTVISIBLE -wxTREE_NEXT_NEXT = controls2c.wxTREE_NEXT_NEXT -wxTREE_NEXT_NEXTVISIBLE = controls2c.wxTREE_NEXT_NEXTVISIBLE -wxTREE_NEXT_PARENT = controls2c.wxTREE_NEXT_PARENT -wxTREE_NEXT_PREVIOUS = controls2c.wxTREE_NEXT_PREVIOUS -wxTREE_NEXT_PREVIOUSVISIBLE = controls2c.wxTREE_NEXT_PREVIOUSVISIBLE -wxTREE_NEXT_ROOT = controls2c.wxTREE_NEXT_ROOT -wxTREE_EXPAND_EXPAND = controls2c.wxTREE_EXPAND_EXPAND -wxTREE_EXPAND_COLLAPSE = controls2c.wxTREE_EXPAND_COLLAPSE -wxTREE_EXPAND_COLLAPSE_RESET = controls2c.wxTREE_EXPAND_COLLAPSE_RESET -wxTREE_EXPAND_TOGGLE = controls2c.wxTREE_EXPAND_TOGGLE -wxTREE_INSERT_LAST = controls2c.wxTREE_INSERT_LAST -wxTREE_INSERT_FIRST = controls2c.wxTREE_INSERT_FIRST -wxTREE_INSERT_SORT = controls2c.wxTREE_INSERT_SORT diff --git a/utils/wxPython/src/gtk/dummy b/utils/wxPython/src/gtk/dummy deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/utils/wxPython/src/gtk/events.cpp b/utils/wxPython/src/gtk/events.cpp deleted file mode 100644 index be3e3fd178..0000000000 --- a/utils/wxPython/src/gtk/events.cpp +++ /dev/null @@ -1,2844 +0,0 @@ -/* - * FILE : gtk/events.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif - -#define SWIG_init initeventsc - -#define SWIG_name "eventsc" - -#include "helpers.h" - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; -#define wxEvent_GetEventObject(_swigobj) (_swigobj->GetEventObject()) -static PyObject *_wrap_wxEvent_GetEventObject(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxObject * _result; - wxEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxEvent_GetEventObject",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_GetEventObject. Expected _wxEvent_p."); - return NULL; - } - } - _result = (wxObject *)wxEvent_GetEventObject(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxObject_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxEvent_GetEventType(_swigobj) (_swigobj->GetEventType()) -static PyObject *_wrap_wxEvent_GetEventType(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxEventType _result; - wxEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxEvent_GetEventType",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_GetEventType. Expected _wxEvent_p."); - return NULL; - } - } - _result = (wxEventType )wxEvent_GetEventType(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxEvent_GetId(_swigobj) (_swigobj->GetId()) -static PyObject *_wrap_wxEvent_GetId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxEvent_GetId",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_GetId. Expected _wxEvent_p."); - return NULL; - } - } - _result = (int )wxEvent_GetId(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxEvent_GetSkipped(_swigobj) (_swigobj->GetSkipped()) -static PyObject *_wrap_wxEvent_GetSkipped(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxEvent_GetSkipped",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_GetSkipped. Expected _wxEvent_p."); - return NULL; - } - } - _result = (bool )wxEvent_GetSkipped(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxEvent_GetTimestamp(_swigobj) (_swigobj->GetTimestamp()) -static PyObject *_wrap_wxEvent_GetTimestamp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxEvent_GetTimestamp",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_GetTimestamp. Expected _wxEvent_p."); - return NULL; - } - } - _result = (long )wxEvent_GetTimestamp(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxEvent_SetEventObject(_swigobj,_swigarg0) (_swigobj->SetEventObject(_swigarg0)) -static PyObject *_wrap_wxEvent_SetEventObject(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxEvent * _arg0; - wxObject * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxEvent_SetEventObject",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_SetEventObject. Expected _wxEvent_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxObject_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxEvent_SetEventObject. Expected _wxObject_p."); - return NULL; - } - } - wxEvent_SetEventObject(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxEvent_SetEventType(_swigobj,_swigarg0) (_swigobj->SetEventType(_swigarg0)) -static PyObject *_wrap_wxEvent_SetEventType(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxEvent * _arg0; - wxEventType _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxEvent_SetEventType",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_SetEventType. Expected _wxEvent_p."); - return NULL; - } - } - wxEvent_SetEventType(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxEvent_SetId(_swigobj,_swigarg0) (_swigobj->SetId(_swigarg0)) -static PyObject *_wrap_wxEvent_SetId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxEvent * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxEvent_SetId",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_SetId. Expected _wxEvent_p."); - return NULL; - } - } - wxEvent_SetId(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxEvent_SetTimestamp(_swigobj,_swigarg0) (_swigobj->SetTimestamp(_swigarg0)) -static PyObject *_wrap_wxEvent_SetTimestamp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxEvent * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxEvent_SetTimestamp",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_SetTimestamp. Expected _wxEvent_p."); - return NULL; - } - } - wxEvent_SetTimestamp(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxEvent_Skip(_swigobj,_swigarg0) (_swigobj->Skip(_swigarg0)) -static PyObject *_wrap_wxEvent_Skip(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxEvent * _arg0; - bool _arg1 = (1); - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxEvent_Skip",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_Skip. Expected _wxEvent_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxEvent_Skip(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxSizeEventTowxEvent(void *ptr) { - wxSizeEvent *src; - wxEvent *dest; - src = (wxSizeEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxSizeEvent_GetSize(_swigobj) (_swigobj->GetSize()) -static PyObject *_wrap_wxSizeEvent_GetSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSize * _result; - wxSizeEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSizeEvent_GetSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSizeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizeEvent_GetSize. Expected _wxSizeEvent_p."); - return NULL; - } - } - _result = new wxSize (wxSizeEvent_GetSize(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static void *SwigwxCloseEventTowxEvent(void *ptr) { - wxCloseEvent *src; - wxEvent *dest; - src = (wxCloseEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxCloseEvent_GetSessionEnding(_swigobj) (_swigobj->GetSessionEnding()) -static PyObject *_wrap_wxCloseEvent_GetSessionEnding(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxCloseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCloseEvent_GetSessionEnding",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCloseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCloseEvent_GetSessionEnding. Expected _wxCloseEvent_p."); - return NULL; - } - } - _result = (bool )wxCloseEvent_GetSessionEnding(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxCloseEvent_GetLoggingOff(_swigobj) (_swigobj->GetLoggingOff()) -static PyObject *_wrap_wxCloseEvent_GetLoggingOff(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxCloseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCloseEvent_GetLoggingOff",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCloseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCloseEvent_GetLoggingOff. Expected _wxCloseEvent_p."); - return NULL; - } - } - _result = (bool )wxCloseEvent_GetLoggingOff(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxCloseEvent_Veto(_swigobj,_swigarg0) (_swigobj->Veto(_swigarg0)) -static PyObject *_wrap_wxCloseEvent_Veto(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxCloseEvent * _arg0; - bool _arg1 = (1); - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxCloseEvent_Veto",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCloseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCloseEvent_Veto. Expected _wxCloseEvent_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxCloseEvent_Veto(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxCloseEvent_GetVeto(_swigobj) (_swigobj->GetVeto()) -static PyObject *_wrap_wxCloseEvent_GetVeto(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxCloseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCloseEvent_GetVeto",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCloseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCloseEvent_GetVeto. Expected _wxCloseEvent_p."); - return NULL; - } - } - _result = (bool )wxCloseEvent_GetVeto(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxCloseEvent_SetForce(_swigobj,_swigarg0) (_swigobj->SetForce(_swigarg0)) -static PyObject *_wrap_wxCloseEvent_SetForce(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxCloseEvent * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxCloseEvent_SetForce",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCloseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCloseEvent_SetForce. Expected _wxCloseEvent_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxCloseEvent_SetForce(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxCloseEvent_GetForce(_swigobj) (_swigobj->GetForce()) -static PyObject *_wrap_wxCloseEvent_GetForce(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxCloseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCloseEvent_GetForce",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCloseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCloseEvent_GetForce. Expected _wxCloseEvent_p."); - return NULL; - } - } - _result = (bool )wxCloseEvent_GetForce(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxCommandEventTowxEvent(void *ptr) { - wxCommandEvent *src; - wxEvent *dest; - src = (wxCommandEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxCommandEvent_Checked(_swigobj) (_swigobj->Checked()) -static PyObject *_wrap_wxCommandEvent_Checked(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxCommandEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCommandEvent_Checked",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCommandEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_Checked. Expected _wxCommandEvent_p."); - return NULL; - } - } - _result = (bool )wxCommandEvent_Checked(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxCommandEvent_GetExtraLong(_swigobj) (_swigobj->GetExtraLong()) -static PyObject *_wrap_wxCommandEvent_GetExtraLong(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxCommandEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCommandEvent_GetExtraLong",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCommandEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_GetExtraLong. Expected _wxCommandEvent_p."); - return NULL; - } - } - _result = (long )wxCommandEvent_GetExtraLong(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxCommandEvent_GetInt(_swigobj) (_swigobj->GetInt()) -static PyObject *_wrap_wxCommandEvent_GetInt(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxCommandEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCommandEvent_GetInt",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCommandEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_GetInt. Expected _wxCommandEvent_p."); - return NULL; - } - } - _result = (int )wxCommandEvent_GetInt(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxCommandEvent_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxCommandEvent_GetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxCommandEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCommandEvent_GetSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCommandEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_GetSelection. Expected _wxCommandEvent_p."); - return NULL; - } - } - _result = (int )wxCommandEvent_GetSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxCommandEvent_GetString(_swigobj) (_swigobj->GetString()) -static PyObject *_wrap_wxCommandEvent_GetString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - char * _result; - wxCommandEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCommandEvent_GetString",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCommandEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_GetString. Expected _wxCommandEvent_p."); - return NULL; - } - } - _result = (char *)wxCommandEvent_GetString(_arg0); - _resultobj = Py_BuildValue("s", _result); - return _resultobj; -} - -#define wxCommandEvent_IsSelection(_swigobj) (_swigobj->IsSelection()) -static PyObject *_wrap_wxCommandEvent_IsSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxCommandEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCommandEvent_IsSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCommandEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_IsSelection. Expected _wxCommandEvent_p."); - return NULL; - } - } - _result = (bool )wxCommandEvent_IsSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxScrollEventTowxCommandEvent(void *ptr) { - wxScrollEvent *src; - wxCommandEvent *dest; - src = (wxScrollEvent *) ptr; - dest = (wxCommandEvent *) src; - return (void *) dest; -} - -static void *SwigwxScrollEventTowxEvent(void *ptr) { - wxScrollEvent *src; - wxEvent *dest; - src = (wxScrollEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxScrollEvent_GetOrientation(_swigobj) (_swigobj->GetOrientation()) -static PyObject *_wrap_wxScrollEvent_GetOrientation(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxScrollEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxScrollEvent_GetOrientation",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrollEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollEvent_GetOrientation. Expected _wxScrollEvent_p."); - return NULL; - } - } - _result = (int )wxScrollEvent_GetOrientation(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxScrollEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxScrollEvent_GetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxScrollEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxScrollEvent_GetPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrollEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollEvent_GetPosition. Expected _wxScrollEvent_p."); - return NULL; - } - } - _result = (int )wxScrollEvent_GetPosition(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxMouseEventTowxEvent(void *ptr) { - wxMouseEvent *src; - wxEvent *dest; - src = (wxMouseEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxMouseEvent_IsButton(_swigobj) (_swigobj->IsButton()) -static PyObject *_wrap_wxMouseEvent_IsButton(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_IsButton",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_IsButton. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_IsButton(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_ButtonDown(_swigobj,_swigarg0) (_swigobj->ButtonDown(_swigarg0)) -static PyObject *_wrap_wxMouseEvent_ButtonDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - int _arg1 = -1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxMouseEvent_ButtonDown",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_ButtonDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_ButtonDown(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_ButtonDClick(_swigobj,_swigarg0) (_swigobj->ButtonDClick(_swigarg0)) -static PyObject *_wrap_wxMouseEvent_ButtonDClick(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - int _arg1 = -1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxMouseEvent_ButtonDClick",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_ButtonDClick. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_ButtonDClick(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_ButtonUp(_swigobj,_swigarg0) (_swigobj->ButtonUp(_swigarg0)) -static PyObject *_wrap_wxMouseEvent_ButtonUp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - int _arg1 = -1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxMouseEvent_ButtonUp",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_ButtonUp. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_ButtonUp(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_Button(_swigobj,_swigarg0) (_swigobj->Button(_swigarg0)) -static PyObject *_wrap_wxMouseEvent_Button(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMouseEvent_Button",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_Button. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_Button(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_ButtonIsDown(_swigobj,_swigarg0) (_swigobj->ButtonIsDown(_swigarg0)) -static PyObject *_wrap_wxMouseEvent_ButtonIsDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMouseEvent_ButtonIsDown",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_ButtonIsDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_ButtonIsDown(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_ControlDown(_swigobj) (_swigobj->ControlDown()) -static PyObject *_wrap_wxMouseEvent_ControlDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_ControlDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_ControlDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_ControlDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_MetaDown(_swigobj) (_swigobj->MetaDown()) -static PyObject *_wrap_wxMouseEvent_MetaDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_MetaDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_MetaDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_MetaDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_AltDown(_swigobj) (_swigobj->AltDown()) -static PyObject *_wrap_wxMouseEvent_AltDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_AltDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_AltDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_AltDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_ShiftDown(_swigobj) (_swigobj->ShiftDown()) -static PyObject *_wrap_wxMouseEvent_ShiftDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_ShiftDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_ShiftDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_ShiftDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_LeftDown(_swigobj) (_swigobj->LeftDown()) -static PyObject *_wrap_wxMouseEvent_LeftDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_LeftDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_LeftDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_LeftDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_MiddleDown(_swigobj) (_swigobj->MiddleDown()) -static PyObject *_wrap_wxMouseEvent_MiddleDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_MiddleDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_MiddleDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_MiddleDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_RightDown(_swigobj) (_swigobj->RightDown()) -static PyObject *_wrap_wxMouseEvent_RightDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_RightDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_RightDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_RightDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_LeftUp(_swigobj) (_swigobj->LeftUp()) -static PyObject *_wrap_wxMouseEvent_LeftUp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_LeftUp",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_LeftUp. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_LeftUp(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_MiddleUp(_swigobj) (_swigobj->MiddleUp()) -static PyObject *_wrap_wxMouseEvent_MiddleUp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_MiddleUp",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_MiddleUp. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_MiddleUp(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_RightUp(_swigobj) (_swigobj->RightUp()) -static PyObject *_wrap_wxMouseEvent_RightUp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_RightUp",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_RightUp. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_RightUp(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_LeftDClick(_swigobj) (_swigobj->LeftDClick()) -static PyObject *_wrap_wxMouseEvent_LeftDClick(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_LeftDClick",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_LeftDClick. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_LeftDClick(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_MiddleDClick(_swigobj) (_swigobj->MiddleDClick()) -static PyObject *_wrap_wxMouseEvent_MiddleDClick(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_MiddleDClick",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_MiddleDClick. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_MiddleDClick(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_RightDClick(_swigobj) (_swigobj->RightDClick()) -static PyObject *_wrap_wxMouseEvent_RightDClick(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_RightDClick",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_RightDClick. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_RightDClick(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_LeftIsDown(_swigobj) (_swigobj->LeftIsDown()) -static PyObject *_wrap_wxMouseEvent_LeftIsDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_LeftIsDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_LeftIsDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_LeftIsDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_MiddleIsDown(_swigobj) (_swigobj->MiddleIsDown()) -static PyObject *_wrap_wxMouseEvent_MiddleIsDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_MiddleIsDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_MiddleIsDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_MiddleIsDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_RightIsDown(_swigobj) (_swigobj->RightIsDown()) -static PyObject *_wrap_wxMouseEvent_RightIsDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_RightIsDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_RightIsDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_RightIsDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_Dragging(_swigobj) (_swigobj->Dragging()) -static PyObject *_wrap_wxMouseEvent_Dragging(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_Dragging",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_Dragging. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_Dragging(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_Moving(_swigobj) (_swigobj->Moving()) -static PyObject *_wrap_wxMouseEvent_Moving(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_Moving",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_Moving. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_Moving(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_Entering(_swigobj) (_swigobj->Entering()) -static PyObject *_wrap_wxMouseEvent_Entering(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_Entering",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_Entering. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_Entering(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_Leaving(_swigobj) (_swigobj->Leaving()) -static PyObject *_wrap_wxMouseEvent_Leaving(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_Leaving",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_Leaving. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_Leaving(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_Position(_swigobj,_swigarg0,_swigarg1) (_swigobj->Position(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMouseEvent_Position(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMouseEvent * _arg0; - long * _arg1; - long temp; - long * _arg2; - long temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_Position",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_Position. Expected _wxMouseEvent_p."); - return NULL; - } - } - wxMouseEvent_Position(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxMouseEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxMouseEvent_GetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_GetPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_GetPosition. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = new wxPoint (wxMouseEvent_GetPosition(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMouseEvent_GetLogicalPosition(_swigobj,_swigarg0) (_swigobj->GetLogicalPosition(_swigarg0)) -static PyObject *_wrap_wxMouseEvent_GetLogicalPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxMouseEvent * _arg0; - wxDC * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxMouseEvent_GetLogicalPosition",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_GetLogicalPosition. Expected _wxMouseEvent_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMouseEvent_GetLogicalPosition. Expected _wxDC_p."); - return NULL; - } - } - _result = new wxPoint (wxMouseEvent_GetLogicalPosition(_arg0,*_arg1)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMouseEvent_GetX(_swigobj) (_swigobj->GetX()) -static PyObject *_wrap_wxMouseEvent_GetX(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_GetX",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_GetX. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (long )wxMouseEvent_GetX(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxMouseEvent_GetY(_swigobj) (_swigobj->GetY()) -static PyObject *_wrap_wxMouseEvent_GetY(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_GetY",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_GetY. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (long )wxMouseEvent_GetY(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -static void *SwigwxKeyEventTowxEvent(void *ptr) { - wxKeyEvent *src; - wxEvent *dest; - src = (wxKeyEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxKeyEvent_ControlDown(_swigobj) (_swigobj->ControlDown()) -static PyObject *_wrap_wxKeyEvent_ControlDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxKeyEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxKeyEvent_ControlDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_ControlDown. Expected _wxKeyEvent_p."); - return NULL; - } - } - _result = (bool )wxKeyEvent_ControlDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxKeyEvent_MetaDown(_swigobj) (_swigobj->MetaDown()) -static PyObject *_wrap_wxKeyEvent_MetaDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxKeyEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxKeyEvent_MetaDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_MetaDown. Expected _wxKeyEvent_p."); - return NULL; - } - } - _result = (bool )wxKeyEvent_MetaDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxKeyEvent_AltDown(_swigobj) (_swigobj->AltDown()) -static PyObject *_wrap_wxKeyEvent_AltDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxKeyEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxKeyEvent_AltDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_AltDown. Expected _wxKeyEvent_p."); - return NULL; - } - } - _result = (bool )wxKeyEvent_AltDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxKeyEvent_ShiftDown(_swigobj) (_swigobj->ShiftDown()) -static PyObject *_wrap_wxKeyEvent_ShiftDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxKeyEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxKeyEvent_ShiftDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_ShiftDown. Expected _wxKeyEvent_p."); - return NULL; - } - } - _result = (bool )wxKeyEvent_ShiftDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxKeyEvent_KeyCode(_swigobj) (_swigobj->KeyCode()) -static PyObject *_wrap_wxKeyEvent_KeyCode(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxKeyEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxKeyEvent_KeyCode",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_KeyCode. Expected _wxKeyEvent_p."); - return NULL; - } - } - _result = (long )wxKeyEvent_KeyCode(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxKeyEvent_Position(_swigobj,_swigarg0,_swigarg1) (_swigobj->Position(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxKeyEvent_Position(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxKeyEvent * _arg0; - float * _arg1; - float temp; - float * _arg2; - float temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxKeyEvent_Position",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_Position. Expected _wxKeyEvent_p."); - return NULL; - } - } - wxKeyEvent_Position(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyFloat_FromDouble((double) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyFloat_FromDouble((double) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxKeyEvent_GetX(_swigobj) (_swigobj->GetX()) -static PyObject *_wrap_wxKeyEvent_GetX(PyObject *self, PyObject *args) { - PyObject * _resultobj; - float _result; - wxKeyEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxKeyEvent_GetX",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetX. Expected _wxKeyEvent_p."); - return NULL; - } - } - _result = (float )wxKeyEvent_GetX(_arg0); - _resultobj = Py_BuildValue("f",_result); - return _resultobj; -} - -#define wxKeyEvent_GetY(_swigobj) (_swigobj->GetY()) -static PyObject *_wrap_wxKeyEvent_GetY(PyObject *self, PyObject *args) { - PyObject * _resultobj; - float _result; - wxKeyEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxKeyEvent_GetY",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetY. Expected _wxKeyEvent_p."); - return NULL; - } - } - _result = (float )wxKeyEvent_GetY(_arg0); - _resultobj = Py_BuildValue("f",_result); - return _resultobj; -} - -static void *SwigwxMoveEventTowxEvent(void *ptr) { - wxMoveEvent *src; - wxEvent *dest; - src = (wxMoveEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxMoveEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxMoveEvent_GetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxMoveEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMoveEvent_GetPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMoveEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMoveEvent_GetPosition. Expected _wxMoveEvent_p."); - return NULL; - } - } - _result = new wxPoint (wxMoveEvent_GetPosition(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static void *SwigwxPaintEventTowxEvent(void *ptr) { - wxPaintEvent *src; - wxEvent *dest; - src = (wxPaintEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -static void *SwigwxEraseEventTowxEvent(void *ptr) { - wxEraseEvent *src; - wxEvent *dest; - src = (wxEraseEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxEraseEvent_GetDC(_swigobj) (_swigobj->GetDC()) -static PyObject *_wrap_wxEraseEvent_GetDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _result; - wxEraseEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxEraseEvent_GetDC",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEraseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEraseEvent_GetDC. Expected _wxEraseEvent_p."); - return NULL; - } - } - _result = (wxDC *)wxEraseEvent_GetDC(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static void *SwigwxFocusEventTowxEvent(void *ptr) { - wxFocusEvent *src; - wxEvent *dest; - src = (wxFocusEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -static void *SwigwxActivateEventTowxEvent(void *ptr) { - wxActivateEvent *src; - wxEvent *dest; - src = (wxActivateEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxActivateEvent_GetActive(_swigobj) (_swigobj->GetActive()) -static PyObject *_wrap_wxActivateEvent_GetActive(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxActivateEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxActivateEvent_GetActive",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxActivateEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxActivateEvent_GetActive. Expected _wxActivateEvent_p."); - return NULL; - } - } - _result = (bool )wxActivateEvent_GetActive(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxInitDialogEventTowxEvent(void *ptr) { - wxInitDialogEvent *src; - wxEvent *dest; - src = (wxInitDialogEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -static void *SwigwxMenuEventTowxEvent(void *ptr) { - wxMenuEvent *src; - wxEvent *dest; - src = (wxMenuEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxMenuEvent_GetMenuId(_swigobj) (_swigobj->GetMenuId()) -static PyObject *_wrap_wxMenuEvent_GetMenuId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxMenuEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuEvent_GetMenuId",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuEvent_GetMenuId. Expected _wxMenuEvent_p."); - return NULL; - } - } - _result = (int )wxMenuEvent_GetMenuId(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxShowEventTowxEvent(void *ptr) { - wxShowEvent *src; - wxEvent *dest; - src = (wxShowEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxShowEvent_SetShow(_swigobj,_swigarg0) (_swigobj->SetShow(_swigarg0)) -static PyObject *_wrap_wxShowEvent_SetShow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxShowEvent * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxShowEvent_SetShow",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxShowEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxShowEvent_SetShow. Expected _wxShowEvent_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxShowEvent_SetShow(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxShowEvent_GetShow(_swigobj) (_swigobj->GetShow()) -static PyObject *_wrap_wxShowEvent_GetShow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxShowEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxShowEvent_GetShow",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxShowEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxShowEvent_GetShow. Expected _wxShowEvent_p."); - return NULL; - } - } - _result = (bool )wxShowEvent_GetShow(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxIconizeEventTowxEvent(void *ptr) { - wxIconizeEvent *src; - wxEvent *dest; - src = (wxIconizeEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -static void *SwigwxMaximizeEventTowxEvent(void *ptr) { - wxMaximizeEvent *src; - wxEvent *dest; - src = (wxMaximizeEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -static void *SwigwxJoystickEventTowxEvent(void *ptr) { - wxJoystickEvent *src; - wxEvent *dest; - src = (wxJoystickEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxJoystickEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxJoystickEvent_GetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxJoystickEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxJoystickEvent_GetPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_GetPosition. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = new wxPoint (wxJoystickEvent_GetPosition(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxJoystickEvent_GetZPosition(_swigobj) (_swigobj->GetZPosition()) -static PyObject *_wrap_wxJoystickEvent_GetZPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxJoystickEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxJoystickEvent_GetZPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_GetZPosition. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = (int )wxJoystickEvent_GetZPosition(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxJoystickEvent_GetButtonState(_swigobj) (_swigobj->GetButtonState()) -static PyObject *_wrap_wxJoystickEvent_GetButtonState(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxJoystickEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxJoystickEvent_GetButtonState",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_GetButtonState. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = (int )wxJoystickEvent_GetButtonState(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxJoystickEvent_GetButtonChange(_swigobj) (_swigobj->GetButtonChange()) -static PyObject *_wrap_wxJoystickEvent_GetButtonChange(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxJoystickEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxJoystickEvent_GetButtonChange",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_GetButtonChange. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = (int )wxJoystickEvent_GetButtonChange(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxJoystickEvent_GetJoystick(_swigobj) (_swigobj->GetJoystick()) -static PyObject *_wrap_wxJoystickEvent_GetJoystick(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxJoystickEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxJoystickEvent_GetJoystick",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_GetJoystick. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = (int )wxJoystickEvent_GetJoystick(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxJoystickEvent_SetJoystick(_swigobj,_swigarg0) (_swigobj->SetJoystick(_swigarg0)) -static PyObject *_wrap_wxJoystickEvent_SetJoystick(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxJoystickEvent * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxJoystickEvent_SetJoystick",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_SetJoystick. Expected _wxJoystickEvent_p."); - return NULL; - } - } - wxJoystickEvent_SetJoystick(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxJoystickEvent_SetButtonState(_swigobj,_swigarg0) (_swigobj->SetButtonState(_swigarg0)) -static PyObject *_wrap_wxJoystickEvent_SetButtonState(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxJoystickEvent * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxJoystickEvent_SetButtonState",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_SetButtonState. Expected _wxJoystickEvent_p."); - return NULL; - } - } - wxJoystickEvent_SetButtonState(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxJoystickEvent_SetButtonChange(_swigobj,_swigarg0) (_swigobj->SetButtonChange(_swigarg0)) -static PyObject *_wrap_wxJoystickEvent_SetButtonChange(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxJoystickEvent * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxJoystickEvent_SetButtonChange",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_SetButtonChange. Expected _wxJoystickEvent_p."); - return NULL; - } - } - wxJoystickEvent_SetButtonChange(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxJoystickEvent_SetPosition(_swigobj,_swigarg0) (_swigobj->SetPosition(_swigarg0)) -static PyObject *_wrap_wxJoystickEvent_SetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxJoystickEvent * _arg0; - wxPoint * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxJoystickEvent_SetPosition",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_SetPosition. Expected _wxJoystickEvent_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxJoystickEvent_SetPosition. Expected _wxPoint_p."); - return NULL; - } - } - wxJoystickEvent_SetPosition(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxJoystickEvent_SetZPosition(_swigobj,_swigarg0) (_swigobj->SetZPosition(_swigarg0)) -static PyObject *_wrap_wxJoystickEvent_SetZPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxJoystickEvent * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxJoystickEvent_SetZPosition",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_SetZPosition. Expected _wxJoystickEvent_p."); - return NULL; - } - } - wxJoystickEvent_SetZPosition(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxJoystickEvent_IsButton(_swigobj) (_swigobj->IsButton()) -static PyObject *_wrap_wxJoystickEvent_IsButton(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxJoystickEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxJoystickEvent_IsButton",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_IsButton. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = (bool )wxJoystickEvent_IsButton(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxJoystickEvent_IsMove(_swigobj) (_swigobj->IsMove()) -static PyObject *_wrap_wxJoystickEvent_IsMove(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxJoystickEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxJoystickEvent_IsMove",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_IsMove. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = (bool )wxJoystickEvent_IsMove(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxJoystickEvent_IsZMove(_swigobj) (_swigobj->IsZMove()) -static PyObject *_wrap_wxJoystickEvent_IsZMove(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxJoystickEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxJoystickEvent_IsZMove",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_IsZMove. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = (bool )wxJoystickEvent_IsZMove(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxJoystickEvent_ButtonDown(_swigobj,_swigarg0) (_swigobj->ButtonDown(_swigarg0)) -static PyObject *_wrap_wxJoystickEvent_ButtonDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxJoystickEvent * _arg0; - int _arg1 = wxJOY_BUTTON_ANY; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxJoystickEvent_ButtonDown",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_ButtonDown. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = (bool )wxJoystickEvent_ButtonDown(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxJoystickEvent_ButtonUp(_swigobj,_swigarg0) (_swigobj->ButtonUp(_swigarg0)) -static PyObject *_wrap_wxJoystickEvent_ButtonUp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxJoystickEvent * _arg0; - int _arg1 = wxJOY_BUTTON_ANY; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxJoystickEvent_ButtonUp",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_ButtonUp. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = (bool )wxJoystickEvent_ButtonUp(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxJoystickEvent_ButtonIsDown(_swigobj,_swigarg0) (_swigobj->ButtonIsDown(_swigarg0)) -static PyObject *_wrap_wxJoystickEvent_ButtonIsDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxJoystickEvent * _arg0; - int _arg1 = wxJOY_BUTTON_ANY; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxJoystickEvent_ButtonIsDown",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_ButtonIsDown. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = (bool )wxJoystickEvent_ButtonIsDown(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxDropFilesEventTowxEvent(void *ptr) { - wxDropFilesEvent *src; - wxEvent *dest; - src = (wxDropFilesEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxDropFilesEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxDropFilesEvent_GetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxDropFilesEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDropFilesEvent_GetPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDropFilesEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDropFilesEvent_GetPosition. Expected _wxDropFilesEvent_p."); - return NULL; - } - } - _result = new wxPoint (wxDropFilesEvent_GetPosition(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxDropFilesEvent_GetNumberOfFiles(_swigobj) (_swigobj->GetNumberOfFiles()) -static PyObject *_wrap_wxDropFilesEvent_GetNumberOfFiles(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxDropFilesEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDropFilesEvent_GetNumberOfFiles",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDropFilesEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDropFilesEvent_GetNumberOfFiles. Expected _wxDropFilesEvent_p."); - return NULL; - } - } - _result = (int )wxDropFilesEvent_GetNumberOfFiles(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject * wxDropFilesEvent_GetFiles(wxDropFilesEvent *self) { - int count = self->GetNumberOfFiles(); - wxString* files = self->GetFiles(); - PyObject* list = PyList_New(count); - - if (!list) { - PyErr_SetString(PyExc_MemoryError, "Can't allocate list of files!"); - return NULL; - } - - for (int i=0; iRequestMore(_swigarg0)) -static PyObject *_wrap_wxIdleEvent_RequestMore(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIdleEvent * _arg0; - bool _arg1 = (1); - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxIdleEvent_RequestMore",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIdleEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIdleEvent_RequestMore. Expected _wxIdleEvent_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxIdleEvent_RequestMore(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIdleEvent_MoreRequested(_swigobj) (_swigobj->MoreRequested()) -static PyObject *_wrap_wxIdleEvent_MoreRequested(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxIdleEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxIdleEvent_MoreRequested",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIdleEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIdleEvent_MoreRequested. Expected _wxIdleEvent_p."); - return NULL; - } - } - _result = (bool )wxIdleEvent_MoreRequested(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxUpdateUIEventTowxEvent(void *ptr) { - wxUpdateUIEvent *src; - wxEvent *dest; - src = (wxUpdateUIEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxUpdateUIEvent_GetChecked(_swigobj) (_swigobj->GetChecked()) -static PyObject *_wrap_wxUpdateUIEvent_GetChecked(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxUpdateUIEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxUpdateUIEvent_GetChecked",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxUpdateUIEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxUpdateUIEvent_GetChecked. Expected _wxUpdateUIEvent_p."); - return NULL; - } - } - _result = (bool )wxUpdateUIEvent_GetChecked(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxUpdateUIEvent_GetEnabled(_swigobj) (_swigobj->GetEnabled()) -static PyObject *_wrap_wxUpdateUIEvent_GetEnabled(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxUpdateUIEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxUpdateUIEvent_GetEnabled",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxUpdateUIEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxUpdateUIEvent_GetEnabled. Expected _wxUpdateUIEvent_p."); - return NULL; - } - } - _result = (bool )wxUpdateUIEvent_GetEnabled(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxUpdateUIEvent_GetText(_swigobj) (_swigobj->GetText()) -static PyObject *_wrap_wxUpdateUIEvent_GetText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxUpdateUIEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxUpdateUIEvent_GetText",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxUpdateUIEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxUpdateUIEvent_GetText. Expected _wxUpdateUIEvent_p."); - return NULL; - } - } - _result = new wxString (wxUpdateUIEvent_GetText(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxUpdateUIEvent_GetSetText(_swigobj) (_swigobj->GetSetText()) -static PyObject *_wrap_wxUpdateUIEvent_GetSetText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxUpdateUIEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxUpdateUIEvent_GetSetText",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxUpdateUIEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxUpdateUIEvent_GetSetText. Expected _wxUpdateUIEvent_p."); - return NULL; - } - } - _result = (bool )wxUpdateUIEvent_GetSetText(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxUpdateUIEvent_GetSetChecked(_swigobj) (_swigobj->GetSetChecked()) -static PyObject *_wrap_wxUpdateUIEvent_GetSetChecked(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxUpdateUIEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxUpdateUIEvent_GetSetChecked",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxUpdateUIEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxUpdateUIEvent_GetSetChecked. Expected _wxUpdateUIEvent_p."); - return NULL; - } - } - _result = (bool )wxUpdateUIEvent_GetSetChecked(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxUpdateUIEvent_GetSetEnabled(_swigobj) (_swigobj->GetSetEnabled()) -static PyObject *_wrap_wxUpdateUIEvent_GetSetEnabled(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxUpdateUIEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxUpdateUIEvent_GetSetEnabled",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxUpdateUIEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxUpdateUIEvent_GetSetEnabled. Expected _wxUpdateUIEvent_p."); - return NULL; - } - } - _result = (bool )wxUpdateUIEvent_GetSetEnabled(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxUpdateUIEvent_Check(_swigobj,_swigarg0) (_swigobj->Check(_swigarg0)) -static PyObject *_wrap_wxUpdateUIEvent_Check(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxUpdateUIEvent * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxUpdateUIEvent_Check",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxUpdateUIEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxUpdateUIEvent_Check. Expected _wxUpdateUIEvent_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxUpdateUIEvent_Check(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxUpdateUIEvent_Enable(_swigobj,_swigarg0) (_swigobj->Enable(_swigarg0)) -static PyObject *_wrap_wxUpdateUIEvent_Enable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxUpdateUIEvent * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxUpdateUIEvent_Enable",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxUpdateUIEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxUpdateUIEvent_Enable. Expected _wxUpdateUIEvent_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxUpdateUIEvent_Enable(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxUpdateUIEvent_SetText(_swigobj,_swigarg0) (_swigobj->SetText(_swigarg0)) -static PyObject *_wrap_wxUpdateUIEvent_SetText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxUpdateUIEvent * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxUpdateUIEvent_SetText",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxUpdateUIEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxUpdateUIEvent_SetText. Expected _wxUpdateUIEvent_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxUpdateUIEvent_SetText(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static void *SwigwxSysColourChangedEventTowxEvent(void *ptr) { - wxSysColourChangedEvent *src; - wxEvent *dest; - src = (wxSysColourChangedEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -static PyMethodDef eventscMethods[] = { - { "wxUpdateUIEvent_SetText", _wrap_wxUpdateUIEvent_SetText, 1 }, - { "wxUpdateUIEvent_Enable", _wrap_wxUpdateUIEvent_Enable, 1 }, - { "wxUpdateUIEvent_Check", _wrap_wxUpdateUIEvent_Check, 1 }, - { "wxUpdateUIEvent_GetSetEnabled", _wrap_wxUpdateUIEvent_GetSetEnabled, 1 }, - { "wxUpdateUIEvent_GetSetChecked", _wrap_wxUpdateUIEvent_GetSetChecked, 1 }, - { "wxUpdateUIEvent_GetSetText", _wrap_wxUpdateUIEvent_GetSetText, 1 }, - { "wxUpdateUIEvent_GetText", _wrap_wxUpdateUIEvent_GetText, 1 }, - { "wxUpdateUIEvent_GetEnabled", _wrap_wxUpdateUIEvent_GetEnabled, 1 }, - { "wxUpdateUIEvent_GetChecked", _wrap_wxUpdateUIEvent_GetChecked, 1 }, - { "wxIdleEvent_MoreRequested", _wrap_wxIdleEvent_MoreRequested, 1 }, - { "wxIdleEvent_RequestMore", _wrap_wxIdleEvent_RequestMore, 1 }, - { "wxDropFilesEvent_GetFiles", _wrap_wxDropFilesEvent_GetFiles, 1 }, - { "wxDropFilesEvent_GetNumberOfFiles", _wrap_wxDropFilesEvent_GetNumberOfFiles, 1 }, - { "wxDropFilesEvent_GetPosition", _wrap_wxDropFilesEvent_GetPosition, 1 }, - { "wxJoystickEvent_ButtonIsDown", _wrap_wxJoystickEvent_ButtonIsDown, 1 }, - { "wxJoystickEvent_ButtonUp", _wrap_wxJoystickEvent_ButtonUp, 1 }, - { "wxJoystickEvent_ButtonDown", _wrap_wxJoystickEvent_ButtonDown, 1 }, - { "wxJoystickEvent_IsZMove", _wrap_wxJoystickEvent_IsZMove, 1 }, - { "wxJoystickEvent_IsMove", _wrap_wxJoystickEvent_IsMove, 1 }, - { "wxJoystickEvent_IsButton", _wrap_wxJoystickEvent_IsButton, 1 }, - { "wxJoystickEvent_SetZPosition", _wrap_wxJoystickEvent_SetZPosition, 1 }, - { "wxJoystickEvent_SetPosition", _wrap_wxJoystickEvent_SetPosition, 1 }, - { "wxJoystickEvent_SetButtonChange", _wrap_wxJoystickEvent_SetButtonChange, 1 }, - { "wxJoystickEvent_SetButtonState", _wrap_wxJoystickEvent_SetButtonState, 1 }, - { "wxJoystickEvent_SetJoystick", _wrap_wxJoystickEvent_SetJoystick, 1 }, - { "wxJoystickEvent_GetJoystick", _wrap_wxJoystickEvent_GetJoystick, 1 }, - { "wxJoystickEvent_GetButtonChange", _wrap_wxJoystickEvent_GetButtonChange, 1 }, - { "wxJoystickEvent_GetButtonState", _wrap_wxJoystickEvent_GetButtonState, 1 }, - { "wxJoystickEvent_GetZPosition", _wrap_wxJoystickEvent_GetZPosition, 1 }, - { "wxJoystickEvent_GetPosition", _wrap_wxJoystickEvent_GetPosition, 1 }, - { "wxShowEvent_GetShow", _wrap_wxShowEvent_GetShow, 1 }, - { "wxShowEvent_SetShow", _wrap_wxShowEvent_SetShow, 1 }, - { "wxMenuEvent_GetMenuId", _wrap_wxMenuEvent_GetMenuId, 1 }, - { "wxActivateEvent_GetActive", _wrap_wxActivateEvent_GetActive, 1 }, - { "wxEraseEvent_GetDC", _wrap_wxEraseEvent_GetDC, 1 }, - { "wxMoveEvent_GetPosition", _wrap_wxMoveEvent_GetPosition, 1 }, - { "wxKeyEvent_GetY", _wrap_wxKeyEvent_GetY, 1 }, - { "wxKeyEvent_GetX", _wrap_wxKeyEvent_GetX, 1 }, - { "wxKeyEvent_Position", _wrap_wxKeyEvent_Position, 1 }, - { "wxKeyEvent_KeyCode", _wrap_wxKeyEvent_KeyCode, 1 }, - { "wxKeyEvent_ShiftDown", _wrap_wxKeyEvent_ShiftDown, 1 }, - { "wxKeyEvent_AltDown", _wrap_wxKeyEvent_AltDown, 1 }, - { "wxKeyEvent_MetaDown", _wrap_wxKeyEvent_MetaDown, 1 }, - { "wxKeyEvent_ControlDown", _wrap_wxKeyEvent_ControlDown, 1 }, - { "wxMouseEvent_GetY", _wrap_wxMouseEvent_GetY, 1 }, - { "wxMouseEvent_GetX", _wrap_wxMouseEvent_GetX, 1 }, - { "wxMouseEvent_GetLogicalPosition", _wrap_wxMouseEvent_GetLogicalPosition, 1 }, - { "wxMouseEvent_GetPosition", _wrap_wxMouseEvent_GetPosition, 1 }, - { "wxMouseEvent_Position", _wrap_wxMouseEvent_Position, 1 }, - { "wxMouseEvent_Leaving", _wrap_wxMouseEvent_Leaving, 1 }, - { "wxMouseEvent_Entering", _wrap_wxMouseEvent_Entering, 1 }, - { "wxMouseEvent_Moving", _wrap_wxMouseEvent_Moving, 1 }, - { "wxMouseEvent_Dragging", _wrap_wxMouseEvent_Dragging, 1 }, - { "wxMouseEvent_RightIsDown", _wrap_wxMouseEvent_RightIsDown, 1 }, - { "wxMouseEvent_MiddleIsDown", _wrap_wxMouseEvent_MiddleIsDown, 1 }, - { "wxMouseEvent_LeftIsDown", _wrap_wxMouseEvent_LeftIsDown, 1 }, - { "wxMouseEvent_RightDClick", _wrap_wxMouseEvent_RightDClick, 1 }, - { "wxMouseEvent_MiddleDClick", _wrap_wxMouseEvent_MiddleDClick, 1 }, - { "wxMouseEvent_LeftDClick", _wrap_wxMouseEvent_LeftDClick, 1 }, - { "wxMouseEvent_RightUp", _wrap_wxMouseEvent_RightUp, 1 }, - { "wxMouseEvent_MiddleUp", _wrap_wxMouseEvent_MiddleUp, 1 }, - { "wxMouseEvent_LeftUp", _wrap_wxMouseEvent_LeftUp, 1 }, - { "wxMouseEvent_RightDown", _wrap_wxMouseEvent_RightDown, 1 }, - { "wxMouseEvent_MiddleDown", _wrap_wxMouseEvent_MiddleDown, 1 }, - { "wxMouseEvent_LeftDown", _wrap_wxMouseEvent_LeftDown, 1 }, - { "wxMouseEvent_ShiftDown", _wrap_wxMouseEvent_ShiftDown, 1 }, - { "wxMouseEvent_AltDown", _wrap_wxMouseEvent_AltDown, 1 }, - { "wxMouseEvent_MetaDown", _wrap_wxMouseEvent_MetaDown, 1 }, - { "wxMouseEvent_ControlDown", _wrap_wxMouseEvent_ControlDown, 1 }, - { "wxMouseEvent_ButtonIsDown", _wrap_wxMouseEvent_ButtonIsDown, 1 }, - { "wxMouseEvent_Button", _wrap_wxMouseEvent_Button, 1 }, - { "wxMouseEvent_ButtonUp", _wrap_wxMouseEvent_ButtonUp, 1 }, - { "wxMouseEvent_ButtonDClick", _wrap_wxMouseEvent_ButtonDClick, 1 }, - { "wxMouseEvent_ButtonDown", _wrap_wxMouseEvent_ButtonDown, 1 }, - { "wxMouseEvent_IsButton", _wrap_wxMouseEvent_IsButton, 1 }, - { "wxScrollEvent_GetPosition", _wrap_wxScrollEvent_GetPosition, 1 }, - { "wxScrollEvent_GetOrientation", _wrap_wxScrollEvent_GetOrientation, 1 }, - { "wxCommandEvent_IsSelection", _wrap_wxCommandEvent_IsSelection, 1 }, - { "wxCommandEvent_GetString", _wrap_wxCommandEvent_GetString, 1 }, - { "wxCommandEvent_GetSelection", _wrap_wxCommandEvent_GetSelection, 1 }, - { "wxCommandEvent_GetInt", _wrap_wxCommandEvent_GetInt, 1 }, - { "wxCommandEvent_GetExtraLong", _wrap_wxCommandEvent_GetExtraLong, 1 }, - { "wxCommandEvent_Checked", _wrap_wxCommandEvent_Checked, 1 }, - { "wxCloseEvent_GetForce", _wrap_wxCloseEvent_GetForce, 1 }, - { "wxCloseEvent_SetForce", _wrap_wxCloseEvent_SetForce, 1 }, - { "wxCloseEvent_GetVeto", _wrap_wxCloseEvent_GetVeto, 1 }, - { "wxCloseEvent_Veto", _wrap_wxCloseEvent_Veto, 1 }, - { "wxCloseEvent_GetLoggingOff", _wrap_wxCloseEvent_GetLoggingOff, 1 }, - { "wxCloseEvent_GetSessionEnding", _wrap_wxCloseEvent_GetSessionEnding, 1 }, - { "wxSizeEvent_GetSize", _wrap_wxSizeEvent_GetSize, 1 }, - { "wxEvent_Skip", _wrap_wxEvent_Skip, 1 }, - { "wxEvent_SetTimestamp", _wrap_wxEvent_SetTimestamp, 1 }, - { "wxEvent_SetId", _wrap_wxEvent_SetId, 1 }, - { "wxEvent_SetEventType", _wrap_wxEvent_SetEventType, 1 }, - { "wxEvent_SetEventObject", _wrap_wxEvent_SetEventObject, 1 }, - { "wxEvent_GetTimestamp", _wrap_wxEvent_GetTimestamp, 1 }, - { "wxEvent_GetSkipped", _wrap_wxEvent_GetSkipped, 1 }, - { "wxEvent_GetId", _wrap_wxEvent_GetId, 1 }, - { "wxEvent_GetEventType", _wrap_wxEvent_GetEventType, 1 }, - { "wxEvent_GetEventObject", _wrap_wxEvent_GetEventObject, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initeventsc)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("eventsc", eventscMethods); - d = PyModule_GetDict(m); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_wxEvent","_class_wxSysColourChangedEvent",SwigwxSysColourChangedEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxSysColourChangedEvent",SwigwxSysColourChangedEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxUpdateUIEvent",SwigwxUpdateUIEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxUpdateUIEvent",SwigwxUpdateUIEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxIdleEvent",SwigwxIdleEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxIdleEvent",SwigwxIdleEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxDropFilesEvent",SwigwxDropFilesEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxDropFilesEvent",SwigwxDropFilesEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxJoystickEvent",SwigwxJoystickEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxJoystickEvent",SwigwxJoystickEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxMaximizeEvent",SwigwxMaximizeEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxMaximizeEvent",SwigwxMaximizeEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxIconizeEvent",SwigwxIconizeEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxIconizeEvent",SwigwxIconizeEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxShowEvent",SwigwxShowEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxShowEvent",SwigwxShowEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxMenuEvent",SwigwxMenuEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxMenuEvent",SwigwxMenuEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxInitDialogEvent",SwigwxInitDialogEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxInitDialogEvent",SwigwxInitDialogEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxActivateEvent",SwigwxActivateEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxActivateEvent",SwigwxActivateEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxFocusEvent",SwigwxFocusEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxFocusEvent",SwigwxFocusEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxEraseEvent",SwigwxEraseEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxEraseEvent",SwigwxEraseEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxPaintEvent",SwigwxPaintEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxPaintEvent",SwigwxPaintEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxMoveEvent",SwigwxMoveEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxMoveEvent",SwigwxMoveEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxKeyEvent",SwigwxKeyEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxKeyEvent",SwigwxKeyEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxMouseEvent",SwigwxMouseEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxMouseEvent",SwigwxMouseEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxScrollEvent",SwigwxScrollEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxScrollEvent",SwigwxScrollEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxCommandEvent",SwigwxCommandEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxCommandEvent",SwigwxCommandEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxCloseEvent",SwigwxCloseEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxCloseEvent",SwigwxCloseEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxSizeEvent",SwigwxSizeEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxSizeEvent",SwigwxSizeEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxEvent",0); - SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0); - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0); - SWIG_RegisterMapping("_wxPaintEvent","_class_wxPaintEvent",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_wxDropFilesEvent","_class_wxDropFilesEvent",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_class_wxPaintEvent","_wxPaintEvent",0); - SWIG_RegisterMapping("_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_wxInitDialogEvent","_class_wxInitDialogEvent",0); - SWIG_RegisterMapping("_class_wxKeyEvent","_wxKeyEvent",0); - SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); - SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxEvent","_class_wxSysColourChangedEvent",SwigwxSysColourChangedEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxSysColourChangedEvent",SwigwxSysColourChangedEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxUpdateUIEvent",SwigwxUpdateUIEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxUpdateUIEvent",SwigwxUpdateUIEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxIdleEvent",SwigwxIdleEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxIdleEvent",SwigwxIdleEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxDropFilesEvent",SwigwxDropFilesEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxDropFilesEvent",SwigwxDropFilesEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxJoystickEvent",SwigwxJoystickEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxJoystickEvent",SwigwxJoystickEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxMaximizeEvent",SwigwxMaximizeEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxMaximizeEvent",SwigwxMaximizeEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxIconizeEvent",SwigwxIconizeEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxIconizeEvent",SwigwxIconizeEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxShowEvent",SwigwxShowEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxShowEvent",SwigwxShowEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxMenuEvent",SwigwxMenuEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxMenuEvent",SwigwxMenuEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxInitDialogEvent",SwigwxInitDialogEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxInitDialogEvent",SwigwxInitDialogEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxActivateEvent",SwigwxActivateEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxActivateEvent",SwigwxActivateEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxFocusEvent",SwigwxFocusEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxFocusEvent",SwigwxFocusEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxEraseEvent",SwigwxEraseEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxEraseEvent",SwigwxEraseEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxPaintEvent",SwigwxPaintEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxPaintEvent",SwigwxPaintEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxMoveEvent",SwigwxMoveEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxMoveEvent",SwigwxMoveEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxKeyEvent",SwigwxKeyEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxKeyEvent",SwigwxKeyEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxMouseEvent",SwigwxMouseEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxMouseEvent",SwigwxMouseEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxScrollEvent",SwigwxScrollEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxScrollEvent",SwigwxScrollEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxCommandEvent",SwigwxCommandEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxCommandEvent",SwigwxCommandEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxCloseEvent",SwigwxCloseEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxCloseEvent",SwigwxCloseEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxSizeEvent",SwigwxSizeEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxSizeEvent",SwigwxSizeEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxEvent",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxCommandEvent","_class_wxScrollEvent",SwigwxScrollEventTowxCommandEvent); - SWIG_RegisterMapping("_wxCommandEvent","_wxScrollEvent",SwigwxScrollEventTowxCommandEvent); - SWIG_RegisterMapping("_wxCommandEvent","_class_wxCommandEvent",0); - SWIG_RegisterMapping("_wxSizeEvent","_class_wxSizeEvent",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0); - SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxDropFilesEvent","_wxDropFilesEvent",0); - SWIG_RegisterMapping("_wxCloseEvent","_class_wxCloseEvent",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_wxFocusEvent","_class_wxFocusEvent",0); - SWIG_RegisterMapping("_wxMaximizeEvent","_class_wxMaximizeEvent",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_class_wxMoveEvent","_wxMoveEvent",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxCloseEvent","_wxCloseEvent",0); - SWIG_RegisterMapping("_class_wxMenuEvent","_wxMenuEvent",0); - SWIG_RegisterMapping("_wxMouseEvent","_class_wxMouseEvent",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_class_wxFocusEvent","_wxFocusEvent",0); - SWIG_RegisterMapping("_class_wxMaximizeEvent","_wxMaximizeEvent",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_class_wxScrollEvent","_wxScrollEvent",0); - SWIG_RegisterMapping("_wxJoystickEvent","_class_wxJoystickEvent",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_class_wxMouseEvent","_wxMouseEvent",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_class_wxInitDialogEvent","_wxInitDialogEvent",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxIconizeEvent","_class_wxIconizeEvent",0); - SWIG_RegisterMapping("_class_wxIdleEvent","_wxIdleEvent",0); - SWIG_RegisterMapping("_wxEraseEvent","_class_wxEraseEvent",0); - SWIG_RegisterMapping("_class_wxJoystickEvent","_wxJoystickEvent",0); - SWIG_RegisterMapping("_class_wxShowEvent","_wxShowEvent",0); - SWIG_RegisterMapping("_wxActivateEvent","_class_wxActivateEvent",0); - SWIG_RegisterMapping("_class_wxCommandEvent","_class_wxScrollEvent",SwigwxScrollEventTowxCommandEvent); - SWIG_RegisterMapping("_class_wxCommandEvent","_wxScrollEvent",SwigwxScrollEventTowxCommandEvent); - SWIG_RegisterMapping("_class_wxCommandEvent","_wxCommandEvent",0); - SWIG_RegisterMapping("_class_wxSizeEvent","_wxSizeEvent",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); - SWIG_RegisterMapping("_wxKeyEvent","_class_wxKeyEvent",0); - SWIG_RegisterMapping("_wxMoveEvent","_class_wxMoveEvent",0); - SWIG_RegisterMapping("_class_wxEraseEvent","_wxEraseEvent",0); -} diff --git a/utils/wxPython/src/gtk/events.py b/utils/wxPython/src/gtk/events.py deleted file mode 100644 index 53594aa316..0000000000 --- a/utils/wxPython/src/gtk/events.py +++ /dev/null @@ -1,611 +0,0 @@ -# This file was created automatically by SWIG. -import eventsc - -from misc import * -class wxEventPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetEventObject(self): - val = eventsc.wxEvent_GetEventObject(self.this) - return val - def GetEventType(self): - val = eventsc.wxEvent_GetEventType(self.this) - return val - def GetId(self): - val = eventsc.wxEvent_GetId(self.this) - return val - def GetSkipped(self): - val = eventsc.wxEvent_GetSkipped(self.this) - return val - def GetTimestamp(self): - val = eventsc.wxEvent_GetTimestamp(self.this) - return val - def SetEventObject(self,arg0): - val = eventsc.wxEvent_SetEventObject(self.this,arg0) - return val - def SetEventType(self,arg0): - val = eventsc.wxEvent_SetEventType(self.this,arg0) - return val - def SetId(self,arg0): - val = eventsc.wxEvent_SetId(self.this,arg0) - return val - def SetTimestamp(self,arg0): - val = eventsc.wxEvent_SetTimestamp(self.this,arg0) - return val - def Skip(self,*args): - val = apply(eventsc.wxEvent_Skip,(self.this,)+args) - return val - def __repr__(self): - return "" -class wxEvent(wxEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxSizeEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetSize(self): - val = eventsc.wxSizeEvent_GetSize(self.this) - val = wxSizePtr(val) - val.thisown = 1 - return val - def __repr__(self): - return "" -class wxSizeEvent(wxSizeEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxCloseEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetSessionEnding(self): - val = eventsc.wxCloseEvent_GetSessionEnding(self.this) - return val - def GetLoggingOff(self): - val = eventsc.wxCloseEvent_GetLoggingOff(self.this) - return val - def Veto(self,*args): - val = apply(eventsc.wxCloseEvent_Veto,(self.this,)+args) - return val - def GetVeto(self): - val = eventsc.wxCloseEvent_GetVeto(self.this) - return val - def SetForce(self,arg0): - val = eventsc.wxCloseEvent_SetForce(self.this,arg0) - return val - def GetForce(self): - val = eventsc.wxCloseEvent_GetForce(self.this) - return val - def __repr__(self): - return "" -class wxCloseEvent(wxCloseEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxCommandEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Checked(self): - val = eventsc.wxCommandEvent_Checked(self.this) - return val - def GetExtraLong(self): - val = eventsc.wxCommandEvent_GetExtraLong(self.this) - return val - def GetInt(self): - val = eventsc.wxCommandEvent_GetInt(self.this) - return val - def GetSelection(self): - val = eventsc.wxCommandEvent_GetSelection(self.this) - return val - def GetString(self): - val = eventsc.wxCommandEvent_GetString(self.this) - return val - def IsSelection(self): - val = eventsc.wxCommandEvent_IsSelection(self.this) - return val - def __repr__(self): - return "" -class wxCommandEvent(wxCommandEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxScrollEventPtr(wxCommandEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetOrientation(self): - val = eventsc.wxScrollEvent_GetOrientation(self.this) - return val - def GetPosition(self): - val = eventsc.wxScrollEvent_GetPosition(self.this) - return val - def __repr__(self): - return "" -class wxScrollEvent(wxScrollEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxMouseEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def IsButton(self): - val = eventsc.wxMouseEvent_IsButton(self.this) - return val - def ButtonDown(self,*args): - val = apply(eventsc.wxMouseEvent_ButtonDown,(self.this,)+args) - return val - def ButtonDClick(self,*args): - val = apply(eventsc.wxMouseEvent_ButtonDClick,(self.this,)+args) - return val - def ButtonUp(self,*args): - val = apply(eventsc.wxMouseEvent_ButtonUp,(self.this,)+args) - return val - def Button(self,arg0): - val = eventsc.wxMouseEvent_Button(self.this,arg0) - return val - def ButtonIsDown(self,arg0): - val = eventsc.wxMouseEvent_ButtonIsDown(self.this,arg0) - return val - def ControlDown(self): - val = eventsc.wxMouseEvent_ControlDown(self.this) - return val - def MetaDown(self): - val = eventsc.wxMouseEvent_MetaDown(self.this) - return val - def AltDown(self): - val = eventsc.wxMouseEvent_AltDown(self.this) - return val - def ShiftDown(self): - val = eventsc.wxMouseEvent_ShiftDown(self.this) - return val - def LeftDown(self): - val = eventsc.wxMouseEvent_LeftDown(self.this) - return val - def MiddleDown(self): - val = eventsc.wxMouseEvent_MiddleDown(self.this) - return val - def RightDown(self): - val = eventsc.wxMouseEvent_RightDown(self.this) - return val - def LeftUp(self): - val = eventsc.wxMouseEvent_LeftUp(self.this) - return val - def MiddleUp(self): - val = eventsc.wxMouseEvent_MiddleUp(self.this) - return val - def RightUp(self): - val = eventsc.wxMouseEvent_RightUp(self.this) - return val - def LeftDClick(self): - val = eventsc.wxMouseEvent_LeftDClick(self.this) - return val - def MiddleDClick(self): - val = eventsc.wxMouseEvent_MiddleDClick(self.this) - return val - def RightDClick(self): - val = eventsc.wxMouseEvent_RightDClick(self.this) - return val - def LeftIsDown(self): - val = eventsc.wxMouseEvent_LeftIsDown(self.this) - return val - def MiddleIsDown(self): - val = eventsc.wxMouseEvent_MiddleIsDown(self.this) - return val - def RightIsDown(self): - val = eventsc.wxMouseEvent_RightIsDown(self.this) - return val - def Dragging(self): - val = eventsc.wxMouseEvent_Dragging(self.this) - return val - def Moving(self): - val = eventsc.wxMouseEvent_Moving(self.this) - return val - def Entering(self): - val = eventsc.wxMouseEvent_Entering(self.this) - return val - def Leaving(self): - val = eventsc.wxMouseEvent_Leaving(self.this) - return val - def Position(self): - val = eventsc.wxMouseEvent_Position(self.this) - return val - def GetPosition(self): - val = eventsc.wxMouseEvent_GetPosition(self.this) - val = wxPointPtr(val) - val.thisown = 1 - return val - def GetLogicalPosition(self,arg0): - val = eventsc.wxMouseEvent_GetLogicalPosition(self.this,arg0.this) - val = wxPointPtr(val) - val.thisown = 1 - return val - def GetX(self): - val = eventsc.wxMouseEvent_GetX(self.this) - return val - def GetY(self): - val = eventsc.wxMouseEvent_GetY(self.this) - return val - def __repr__(self): - return "" -class wxMouseEvent(wxMouseEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxKeyEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def ControlDown(self): - val = eventsc.wxKeyEvent_ControlDown(self.this) - return val - def MetaDown(self): - val = eventsc.wxKeyEvent_MetaDown(self.this) - return val - def AltDown(self): - val = eventsc.wxKeyEvent_AltDown(self.this) - return val - def ShiftDown(self): - val = eventsc.wxKeyEvent_ShiftDown(self.this) - return val - def KeyCode(self): - val = eventsc.wxKeyEvent_KeyCode(self.this) - return val - def Position(self): - val = eventsc.wxKeyEvent_Position(self.this) - return val - def GetX(self): - val = eventsc.wxKeyEvent_GetX(self.this) - return val - def GetY(self): - val = eventsc.wxKeyEvent_GetY(self.this) - return val - def __repr__(self): - return "" -class wxKeyEvent(wxKeyEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxMoveEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetPosition(self): - val = eventsc.wxMoveEvent_GetPosition(self.this) - val = wxPointPtr(val) - val.thisown = 1 - return val - def __repr__(self): - return "" -class wxMoveEvent(wxMoveEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxPaintEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxPaintEvent(wxPaintEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxEraseEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetDC(self): - val = eventsc.wxEraseEvent_GetDC(self.this) - val = wxDCPtr(val) - return val - def __repr__(self): - return "" -class wxEraseEvent(wxEraseEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxFocusEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxFocusEvent(wxFocusEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxActivateEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetActive(self): - val = eventsc.wxActivateEvent_GetActive(self.this) - return val - def __repr__(self): - return "" -class wxActivateEvent(wxActivateEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxInitDialogEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxInitDialogEvent(wxInitDialogEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxMenuEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetMenuId(self): - val = eventsc.wxMenuEvent_GetMenuId(self.this) - return val - def __repr__(self): - return "" -class wxMenuEvent(wxMenuEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxShowEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def SetShow(self,arg0): - val = eventsc.wxShowEvent_SetShow(self.this,arg0) - return val - def GetShow(self): - val = eventsc.wxShowEvent_GetShow(self.this) - return val - def __repr__(self): - return "" -class wxShowEvent(wxShowEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxIconizeEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxIconizeEvent(wxIconizeEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxMaximizeEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxMaximizeEvent(wxMaximizeEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxJoystickEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetPosition(self): - val = eventsc.wxJoystickEvent_GetPosition(self.this) - val = wxPointPtr(val) - val.thisown = 1 - return val - def GetZPosition(self): - val = eventsc.wxJoystickEvent_GetZPosition(self.this) - return val - def GetButtonState(self): - val = eventsc.wxJoystickEvent_GetButtonState(self.this) - return val - def GetButtonChange(self): - val = eventsc.wxJoystickEvent_GetButtonChange(self.this) - return val - def GetJoystick(self): - val = eventsc.wxJoystickEvent_GetJoystick(self.this) - return val - def SetJoystick(self,arg0): - val = eventsc.wxJoystickEvent_SetJoystick(self.this,arg0) - return val - def SetButtonState(self,arg0): - val = eventsc.wxJoystickEvent_SetButtonState(self.this,arg0) - return val - def SetButtonChange(self,arg0): - val = eventsc.wxJoystickEvent_SetButtonChange(self.this,arg0) - return val - def SetPosition(self,arg0): - val = eventsc.wxJoystickEvent_SetPosition(self.this,arg0.this) - return val - def SetZPosition(self,arg0): - val = eventsc.wxJoystickEvent_SetZPosition(self.this,arg0) - return val - def IsButton(self): - val = eventsc.wxJoystickEvent_IsButton(self.this) - return val - def IsMove(self): - val = eventsc.wxJoystickEvent_IsMove(self.this) - return val - def IsZMove(self): - val = eventsc.wxJoystickEvent_IsZMove(self.this) - return val - def ButtonDown(self,*args): - val = apply(eventsc.wxJoystickEvent_ButtonDown,(self.this,)+args) - return val - def ButtonUp(self,*args): - val = apply(eventsc.wxJoystickEvent_ButtonUp,(self.this,)+args) - return val - def ButtonIsDown(self,*args): - val = apply(eventsc.wxJoystickEvent_ButtonIsDown,(self.this,)+args) - return val - def __repr__(self): - return "" -class wxJoystickEvent(wxJoystickEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxDropFilesEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetPosition(self): - val = eventsc.wxDropFilesEvent_GetPosition(self.this) - val = wxPointPtr(val) - val.thisown = 1 - return val - def GetNumberOfFiles(self): - val = eventsc.wxDropFilesEvent_GetNumberOfFiles(self.this) - return val - def GetFiles(self): - val = eventsc.wxDropFilesEvent_GetFiles(self.this) - return val - def __repr__(self): - return "" -class wxDropFilesEvent(wxDropFilesEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxIdleEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def RequestMore(self,*args): - val = apply(eventsc.wxIdleEvent_RequestMore,(self.this,)+args) - return val - def MoreRequested(self): - val = eventsc.wxIdleEvent_MoreRequested(self.this) - return val - def __repr__(self): - return "" -class wxIdleEvent(wxIdleEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxUpdateUIEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetChecked(self): - val = eventsc.wxUpdateUIEvent_GetChecked(self.this) - return val - def GetEnabled(self): - val = eventsc.wxUpdateUIEvent_GetEnabled(self.this) - return val - def GetText(self): - val = eventsc.wxUpdateUIEvent_GetText(self.this) - return val - def GetSetText(self): - val = eventsc.wxUpdateUIEvent_GetSetText(self.this) - return val - def GetSetChecked(self): - val = eventsc.wxUpdateUIEvent_GetSetChecked(self.this) - return val - def GetSetEnabled(self): - val = eventsc.wxUpdateUIEvent_GetSetEnabled(self.this) - return val - def Check(self,arg0): - val = eventsc.wxUpdateUIEvent_Check(self.this,arg0) - return val - def Enable(self,arg0): - val = eventsc.wxUpdateUIEvent_Enable(self.this,arg0) - return val - def SetText(self,arg0): - val = eventsc.wxUpdateUIEvent_SetText(self.this,arg0) - return val - def __repr__(self): - return "" -class wxUpdateUIEvent(wxUpdateUIEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxSysColourChangedEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxSysColourChangedEvent(wxSysColourChangedEventPtr): - def __init__(self,this): - self.this = this - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - - - -#-------------- VARIABLE WRAPPERS ------------------ - diff --git a/utils/wxPython/src/gtk/gdi.cpp b/utils/wxPython/src/gtk/gdi.cpp deleted file mode 100644 index bbbb21c9a5..0000000000 --- a/utils/wxPython/src/gtk/gdi.cpp +++ /dev/null @@ -1,4718 +0,0 @@ -/* - * FILE : gtk/gdi.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif - -#define SWIG_init initgdic - -#define SWIG_name "gdic" - -#include "helpers.h" -#include - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; - // Alternate 'constructor' - wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1) { - return new wxBitmap(width, height, depth); - } - - // This one won't own the reference, so Python won't call - // the dtor, this is good for toolbars and such where - // the parent will manage the bitmap. - wxBitmap* wxNoRefBitmap(char* name, long flags) { - return new wxBitmap(name, flags); - } - - wxMask* wxMaskColour(const wxBitmap& bitmap, const wxColour& colour) { - return new wxMask(bitmap, colour); - } - // Alternate 'constructor' - wxCursor* wxStockCursor(int id) { - return new wxCursor(id); - } - // Alternate 'constructor' - wxColour* wxNamedColour(const wxString& colorName) { - return new wxColour(colorName); - } - // Alternate 'constructor' - wxMemoryDC* wxMemoryDCFromDC(wxDC* oldDC) { - return new wxMemoryDC(oldDC); - } -extern wxFont * wxNORMAL_FONT; -extern wxFont * wxSMALL_FONT; -extern wxFont * wxITALIC_FONT; -extern wxFont * wxSWISS_FONT; -extern wxPen * wxRED_PEN; -extern wxPen * wxCYAN_PEN; -extern wxPen * wxGREEN_PEN; -extern wxPen * wxBLACK_PEN; -extern wxPen * wxWHITE_PEN; -extern wxPen * wxTRANSPARENT_PEN; -extern wxPen * wxBLACK_DASHED_PEN; -extern wxPen * wxGREY_PEN; -extern wxPen * wxMEDIUM_GREY_PEN; -extern wxPen * wxLIGHT_GREY_PEN; -extern wxBrush * wxBLUE_BRUSH; -extern wxBrush * wxGREEN_BRUSH; -extern wxBrush * wxWHITE_BRUSH; -extern wxBrush * wxBLACK_BRUSH; -extern wxBrush * wxTRANSPARENT_BRUSH; -extern wxBrush * wxCYAN_BRUSH; -extern wxBrush * wxRED_BRUSH; -extern wxBrush * wxGREY_BRUSH; -extern wxBrush * wxMEDIUM_GREY_BRUSH; -extern wxBrush * wxLIGHT_GREY_BRUSH; -extern wxColour * wxBLACK; -extern wxColour * wxWHITE; -extern wxColour * wxRED; -extern wxColour * wxBLUE; -extern wxColour * wxGREEN; -extern wxColour * wxCYAN; -extern wxColour * wxLIGHT_GREY; -extern wxCursor * wxSTANDARD_CURSOR; -extern wxCursor * wxHOURGLASS_CURSOR; -extern wxCursor * wxCROSS_CURSOR; -extern wxBitmap wxNullBitmap; -extern wxIcon wxNullIcon; -extern wxCursor wxNullCursor; -extern wxPen wxNullPen; -extern wxBrush wxNullBrush; -extern wxPalette wxNullPalette; -extern wxFont wxNullFont; -extern wxColour wxNullColour; -static PyObject *_wrap_wxEmptyBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - int _arg0; - int _arg1; - int _arg2 = -1; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"ii|i:wxEmptyBitmap",&_arg0,&_arg1,&_arg2)) - return NULL; - _result = (wxBitmap *)wxEmptyBitmap(_arg0,_arg1,_arg2); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxNoRefBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - char * _arg0; - long _arg1; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxNoRefBitmap",&_arg0,&_arg1)) - return NULL; - _result = (wxBitmap *)wxNoRefBitmap(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxMaskColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMask * _result; - wxBitmap * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxMaskColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMaskColour. Expected _wxBitmap_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMaskColour. Expected _wxColour_p."); - return NULL; - } - } - _result = (wxMask *)wxMaskColour(*_arg0,*_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMask_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxStockCursor(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxCursor * _result; - int _arg0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"i:wxStockCursor",&_arg0)) - return NULL; - _result = (wxCursor *)wxStockCursor(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxCursor_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxNamedColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxString * _arg0; - PyObject * _obj0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxNamedColour",&_obj0)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - _result = (wxColour *)wxNamedColour(*_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -static PyObject *_wrap_wxMemoryDCFromDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMemoryDC * _result; - wxDC * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMemoryDCFromDC",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryDCFromDC. Expected _wxDC_p."); - return NULL; - } - } - _result = (wxMemoryDC *)wxMemoryDCFromDC(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMemoryDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static int _wrap_wxNORMAL_FONT_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxNORMAL_FONT is read-only."); - return 1; -} - -static PyObject *_wrap_wxNORMAL_FONT_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxNORMAL_FONT,"_wxFont_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxSMALL_FONT_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxSMALL_FONT is read-only."); - return 1; -} - -static PyObject *_wrap_wxSMALL_FONT_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxSMALL_FONT,"_wxFont_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxITALIC_FONT_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxITALIC_FONT is read-only."); - return 1; -} - -static PyObject *_wrap_wxITALIC_FONT_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxITALIC_FONT,"_wxFont_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxSWISS_FONT_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxSWISS_FONT is read-only."); - return 1; -} - -static PyObject *_wrap_wxSWISS_FONT_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxSWISS_FONT,"_wxFont_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxRED_PEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxRED_PEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxRED_PEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxRED_PEN,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxCYAN_PEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxCYAN_PEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxCYAN_PEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxCYAN_PEN,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxGREEN_PEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxGREEN_PEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxGREEN_PEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxGREEN_PEN,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxBLACK_PEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxBLACK_PEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxBLACK_PEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxBLACK_PEN,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxWHITE_PEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxWHITE_PEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxWHITE_PEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxWHITE_PEN,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxTRANSPARENT_PEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxTRANSPARENT_PEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxTRANSPARENT_PEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxTRANSPARENT_PEN,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxBLACK_DASHED_PEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxBLACK_DASHED_PEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxBLACK_DASHED_PEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxBLACK_DASHED_PEN,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxGREY_PEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxGREY_PEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxGREY_PEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxGREY_PEN,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxMEDIUM_GREY_PEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxMEDIUM_GREY_PEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxMEDIUM_GREY_PEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxMEDIUM_GREY_PEN,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxLIGHT_GREY_PEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxLIGHT_GREY_PEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxLIGHT_GREY_PEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxLIGHT_GREY_PEN,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxBLUE_BRUSH_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxBLUE_BRUSH is read-only."); - return 1; -} - -static PyObject *_wrap_wxBLUE_BRUSH_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxBLUE_BRUSH,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxGREEN_BRUSH_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxGREEN_BRUSH is read-only."); - return 1; -} - -static PyObject *_wrap_wxGREEN_BRUSH_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxGREEN_BRUSH,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxWHITE_BRUSH_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxWHITE_BRUSH is read-only."); - return 1; -} - -static PyObject *_wrap_wxWHITE_BRUSH_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxWHITE_BRUSH,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxBLACK_BRUSH_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxBLACK_BRUSH is read-only."); - return 1; -} - -static PyObject *_wrap_wxBLACK_BRUSH_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxBLACK_BRUSH,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxTRANSPARENT_BRUSH_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxTRANSPARENT_BRUSH is read-only."); - return 1; -} - -static PyObject *_wrap_wxTRANSPARENT_BRUSH_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxTRANSPARENT_BRUSH,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxCYAN_BRUSH_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxCYAN_BRUSH is read-only."); - return 1; -} - -static PyObject *_wrap_wxCYAN_BRUSH_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxCYAN_BRUSH,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxRED_BRUSH_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxRED_BRUSH is read-only."); - return 1; -} - -static PyObject *_wrap_wxRED_BRUSH_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxRED_BRUSH,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxGREY_BRUSH_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxGREY_BRUSH is read-only."); - return 1; -} - -static PyObject *_wrap_wxGREY_BRUSH_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxGREY_BRUSH,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxMEDIUM_GREY_BRUSH_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxMEDIUM_GREY_BRUSH is read-only."); - return 1; -} - -static PyObject *_wrap_wxMEDIUM_GREY_BRUSH_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxMEDIUM_GREY_BRUSH,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxLIGHT_GREY_BRUSH_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxLIGHT_GREY_BRUSH is read-only."); - return 1; -} - -static PyObject *_wrap_wxLIGHT_GREY_BRUSH_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxLIGHT_GREY_BRUSH,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxBLACK_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxBLACK is read-only."); - return 1; -} - -static PyObject *_wrap_wxBLACK_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxBLACK,"_wxColour_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxWHITE_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxWHITE is read-only."); - return 1; -} - -static PyObject *_wrap_wxWHITE_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxWHITE,"_wxColour_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxRED_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxRED is read-only."); - return 1; -} - -static PyObject *_wrap_wxRED_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxRED,"_wxColour_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxBLUE_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxBLUE is read-only."); - return 1; -} - -static PyObject *_wrap_wxBLUE_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxBLUE,"_wxColour_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxGREEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxGREEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxGREEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxGREEN,"_wxColour_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxCYAN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxCYAN is read-only."); - return 1; -} - -static PyObject *_wrap_wxCYAN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxCYAN,"_wxColour_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxLIGHT_GREY_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxLIGHT_GREY is read-only."); - return 1; -} - -static PyObject *_wrap_wxLIGHT_GREY_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxLIGHT_GREY,"_wxColour_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxSTANDARD_CURSOR_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxSTANDARD_CURSOR is read-only."); - return 1; -} - -static PyObject *_wrap_wxSTANDARD_CURSOR_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxSTANDARD_CURSOR,"_wxCursor_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxHOURGLASS_CURSOR_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxHOURGLASS_CURSOR is read-only."); - return 1; -} - -static PyObject *_wrap_wxHOURGLASS_CURSOR_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxHOURGLASS_CURSOR,"_wxCursor_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxCROSS_CURSOR_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxCROSS_CURSOR is read-only."); - return 1; -} - -static PyObject *_wrap_wxCROSS_CURSOR_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxCROSS_CURSOR,"_wxCursor_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxNullBitmap_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxNullBitmap is read-only."); - return 1; -} - -static PyObject *_wrap_wxNullBitmap_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxNullBitmap,"_wxBitmap_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxNullIcon_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxNullIcon is read-only."); - return 1; -} - -static PyObject *_wrap_wxNullIcon_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxNullIcon,"_wxIcon_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxNullCursor_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxNullCursor is read-only."); - return 1; -} - -static PyObject *_wrap_wxNullCursor_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxNullCursor,"_wxCursor_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxNullPen_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxNullPen is read-only."); - return 1; -} - -static PyObject *_wrap_wxNullPen_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxNullPen,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxNullBrush_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxNullBrush is read-only."); - return 1; -} - -static PyObject *_wrap_wxNullBrush_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxNullBrush,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxNullPalette_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxNullPalette is read-only."); - return 1; -} - -static PyObject *_wrap_wxNullPalette_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxNullPalette,"_wxPalette_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxNullFont_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxNullFont is read-only."); - return 1; -} - -static PyObject *_wrap_wxNullFont_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxNullFont,"_wxFont_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxNullColour_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxNullColour is read-only."); - return 1; -} - -static PyObject *_wrap_wxNullColour_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxNullColour,"_wxColour_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -#define new_wxBitmap(_swigarg0,_swigarg1) (new wxBitmap(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - wxString * _arg0; - long _arg1; - PyObject * _obj0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"Ol:new_wxBitmap",&_obj0,&_arg1)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - _result = (wxBitmap *)new_wxBitmap(*_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -#define delete_wxBitmap(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxBitmap",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxBitmap. Expected _wxBitmap_p."); - return NULL; - } - } - delete_wxBitmap(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxBitmap_GetDepth(_swigobj) (_swigobj->GetDepth()) -static PyObject *_wrap_wxBitmap_GetDepth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxBitmap * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBitmap_GetDepth",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_GetDepth. Expected _wxBitmap_p."); - return NULL; - } - } - _result = (int )wxBitmap_GetDepth(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxBitmap_GetHeight(_swigobj) (_swigobj->GetHeight()) -static PyObject *_wrap_wxBitmap_GetHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxBitmap * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBitmap_GetHeight",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_GetHeight. Expected _wxBitmap_p."); - return NULL; - } - } - _result = (int )wxBitmap_GetHeight(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxBitmap_GetPalette(_swigobj) (_swigobj->GetPalette()) -static PyObject *_wrap_wxBitmap_GetPalette(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPalette * _result; - wxBitmap * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBitmap_GetPalette",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_GetPalette. Expected _wxBitmap_p."); - return NULL; - } - } - _result = (wxPalette *)wxBitmap_GetPalette(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPalette_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxBitmap_GetMask(_swigobj) (_swigobj->GetMask()) -static PyObject *_wrap_wxBitmap_GetMask(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMask * _result; - wxBitmap * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBitmap_GetMask",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_GetMask. Expected _wxBitmap_p."); - return NULL; - } - } - _result = (wxMask *)wxBitmap_GetMask(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMask_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxBitmap_GetWidth(_swigobj) (_swigobj->GetWidth()) -static PyObject *_wrap_wxBitmap_GetWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxBitmap * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBitmap_GetWidth",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_GetWidth. Expected _wxBitmap_p."); - return NULL; - } - } - _result = (int )wxBitmap_GetWidth(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxBitmap_LoadFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->LoadFile(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxBitmap_LoadFile(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxBitmap * _arg0; - wxString * _arg1; - long _arg2; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sOl:wxBitmap_LoadFile",&_argc0,&_obj1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_LoadFile. Expected _wxBitmap_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (bool )wxBitmap_LoadFile(_arg0,*_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxBitmap_Ok(_swigobj) (_swigobj->Ok()) -static PyObject *_wrap_wxBitmap_Ok(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxBitmap * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBitmap_Ok",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_Ok. Expected _wxBitmap_p."); - return NULL; - } - } - _result = (bool )wxBitmap_Ok(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxBitmap_SaveFile(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SaveFile(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxBitmap_SaveFile(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxBitmap * _arg0; - wxString * _arg1; - int _arg2; - wxPalette * _arg3 = NULL; - char * _argc0 = 0; - PyObject * _obj1 = 0; - char * _argc3 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sOi|s:wxBitmap_SaveFile",&_argc0,&_obj1,&_arg2,&_argc3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_SaveFile. Expected _wxBitmap_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPalette_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxBitmap_SaveFile. Expected _wxPalette_p."); - return NULL; - } - } - _result = (bool )wxBitmap_SaveFile(_arg0,*_arg1,_arg2,_arg3); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxBitmap_SetDepth(_swigobj,_swigarg0) (_swigobj->SetDepth(_swigarg0)) -static PyObject *_wrap_wxBitmap_SetDepth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxBitmap_SetDepth",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_SetDepth. Expected _wxBitmap_p."); - return NULL; - } - } - wxBitmap_SetDepth(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxBitmap_SetHeight(_swigobj,_swigarg0) (_swigobj->SetHeight(_swigarg0)) -static PyObject *_wrap_wxBitmap_SetHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxBitmap_SetHeight",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_SetHeight. Expected _wxBitmap_p."); - return NULL; - } - } - wxBitmap_SetHeight(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxBitmap_SetMask(_swigobj,_swigarg0) (_swigobj->SetMask(_swigarg0)) -static PyObject *_wrap_wxBitmap_SetMask(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _arg0; - wxMask * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxBitmap_SetMask",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_SetMask. Expected _wxBitmap_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxMask_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmap_SetMask. Expected _wxMask_p."); - return NULL; - } - } - wxBitmap_SetMask(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxBitmap_SetWidth(_swigobj,_swigarg0) (_swigobj->SetWidth(_swigarg0)) -static PyObject *_wrap_wxBitmap_SetWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxBitmap_SetWidth",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_SetWidth. Expected _wxBitmap_p."); - return NULL; - } - } - wxBitmap_SetWidth(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define new_wxMask(_swigarg0) (new wxMask(_swigarg0)) -static PyObject *_wrap_new_wxMask(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMask * _result; - wxBitmap * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:new_wxMask",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxMask. Expected _wxBitmap_p."); - return NULL; - } - } - _result = (wxMask *)new_wxMask(*_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMask_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxMask(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxMask(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMask * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxMask",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMask_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxMask. Expected _wxMask_p."); - return NULL; - } - } - delete_wxMask(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxIconTowxBitmap(void *ptr) { - wxIcon *src; - wxBitmap *dest; - src = (wxIcon *) ptr; - dest = (wxBitmap *) src; - return (void *) dest; -} - -#define delete_wxIcon(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxIcon(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIcon * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxIcon",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxIcon. Expected _wxIcon_p."); - return NULL; - } - } - delete_wxIcon(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIcon_GetDepth(_swigobj) (_swigobj->GetDepth()) -static PyObject *_wrap_wxIcon_GetDepth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxIcon * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxIcon_GetDepth",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_GetDepth. Expected _wxIcon_p."); - return NULL; - } - } - _result = (int )wxIcon_GetDepth(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxIcon_GetHeight(_swigobj) (_swigobj->GetHeight()) -static PyObject *_wrap_wxIcon_GetHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxIcon * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxIcon_GetHeight",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_GetHeight. Expected _wxIcon_p."); - return NULL; - } - } - _result = (int )wxIcon_GetHeight(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxIcon_GetWidth(_swigobj) (_swigobj->GetWidth()) -static PyObject *_wrap_wxIcon_GetWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxIcon * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxIcon_GetWidth",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_GetWidth. Expected _wxIcon_p."); - return NULL; - } - } - _result = (int )wxIcon_GetWidth(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxIcon_LoadFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->LoadFile(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxIcon_LoadFile(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxIcon * _arg0; - wxString * _arg1; - long _arg2; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sOl:wxIcon_LoadFile",&_argc0,&_obj1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_LoadFile. Expected _wxIcon_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (bool )wxIcon_LoadFile(_arg0,*_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxIcon_Ok(_swigobj) (_swigobj->Ok()) -static PyObject *_wrap_wxIcon_Ok(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxIcon * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxIcon_Ok",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_Ok. Expected _wxIcon_p."); - return NULL; - } - } - _result = (bool )wxIcon_Ok(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxIcon_SetDepth(_swigobj,_swigarg0) (_swigobj->SetDepth(_swigarg0)) -static PyObject *_wrap_wxIcon_SetDepth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIcon * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxIcon_SetDepth",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_SetDepth. Expected _wxIcon_p."); - return NULL; - } - } - wxIcon_SetDepth(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIcon_SetHeight(_swigobj,_swigarg0) (_swigobj->SetHeight(_swigarg0)) -static PyObject *_wrap_wxIcon_SetHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIcon * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxIcon_SetHeight",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_SetHeight. Expected _wxIcon_p."); - return NULL; - } - } - wxIcon_SetHeight(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIcon_SetWidth(_swigobj,_swigarg0) (_swigobj->SetWidth(_swigarg0)) -static PyObject *_wrap_wxIcon_SetWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIcon * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxIcon_SetWidth",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_SetWidth. Expected _wxIcon_p."); - return NULL; - } - } - wxIcon_SetWidth(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxCursorTowxBitmap(void *ptr) { - wxCursor *src; - wxBitmap *dest; - src = (wxCursor *) ptr; - dest = (wxBitmap *) src; - return (void *) dest; -} - -#define delete_wxCursor(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxCursor(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxCursor * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxCursor",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCursor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxCursor. Expected _wxCursor_p."); - return NULL; - } - } - delete_wxCursor(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxCursor_Ok(_swigobj) (_swigobj->Ok()) -static PyObject *_wrap_wxCursor_Ok(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxCursor * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCursor_Ok",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCursor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCursor_Ok. Expected _wxCursor_p."); - return NULL; - } - } - _result = (bool )wxCursor_Ok(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static wxFont *new_wxFont(int pointSize,int family,int style,int weight,int underline,char *faceName) { - - return wxTheFontList->FindOrCreateFont(pointSize, family, style, weight, - underline, faceName); - } - -static PyObject *_wrap_new_wxFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _result; - int _arg0; - int _arg1; - int _arg2; - int _arg3; - int _arg4 = (0); - char * _arg5 = ""; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"iiii|is:new_wxFont",&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5)) - return NULL; - _result = (wxFont *)new_wxFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxFont_GetFaceName(_swigobj) (_swigobj->GetFaceName()) -static PyObject *_wrap_wxFont_GetFaceName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxFont * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFont_GetFaceName",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetFaceName. Expected _wxFont_p."); - return NULL; - } - } - _result = new wxString (wxFont_GetFaceName(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxFont_GetFamily(_swigobj) (_swigobj->GetFamily()) -static PyObject *_wrap_wxFont_GetFamily(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxFont * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFont_GetFamily",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetFamily. Expected _wxFont_p."); - return NULL; - } - } - _result = (int )wxFont_GetFamily(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFont_GetFontId(_swigobj) (_swigobj->GetFontId()) -static PyObject *_wrap_wxFont_GetFontId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxFont * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFont_GetFontId",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetFontId. Expected _wxFont_p."); - return NULL; - } - } - _result = (int )wxFont_GetFontId(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFont_GetPointSize(_swigobj) (_swigobj->GetPointSize()) -static PyObject *_wrap_wxFont_GetPointSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxFont * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFont_GetPointSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetPointSize. Expected _wxFont_p."); - return NULL; - } - } - _result = (int )wxFont_GetPointSize(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFont_GetStyle(_swigobj) (_swigobj->GetStyle()) -static PyObject *_wrap_wxFont_GetStyle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxFont * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFont_GetStyle",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetStyle. Expected _wxFont_p."); - return NULL; - } - } - _result = (int )wxFont_GetStyle(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFont_GetUnderlined(_swigobj) (_swigobj->GetUnderlined()) -static PyObject *_wrap_wxFont_GetUnderlined(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxFont * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFont_GetUnderlined",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetUnderlined. Expected _wxFont_p."); - return NULL; - } - } - _result = (bool )wxFont_GetUnderlined(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFont_GetWeight(_swigobj) (_swigobj->GetWeight()) -static PyObject *_wrap_wxFont_GetWeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxFont * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFont_GetWeight",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetWeight. Expected _wxFont_p."); - return NULL; - } - } - _result = (int )wxFont_GetWeight(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define new_wxColour(_swigarg0,_swigarg1,_swigarg2) (new wxColour(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_new_wxColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - unsigned char _arg0 = 0; - unsigned char _arg1 = 0; - unsigned char _arg2 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"|bbb:new_wxColour",&_arg0,&_arg1,&_arg2)) - return NULL; - _result = (wxColour *)new_wxColour(_arg0,_arg1,_arg2); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxColour(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxColour. Expected _wxColour_p."); - return NULL; - } - } - delete_wxColour(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxColour_Red(_swigobj) (_swigobj->Red()) -static PyObject *_wrap_wxColour_Red(PyObject *self, PyObject *args) { - PyObject * _resultobj; - unsigned char _result; - wxColour * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxColour_Red",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Red. Expected _wxColour_p."); - return NULL; - } - } - _result = (unsigned char )wxColour_Red(_arg0); - _resultobj = Py_BuildValue("b",_result); - return _resultobj; -} - -#define wxColour_Green(_swigobj) (_swigobj->Green()) -static PyObject *_wrap_wxColour_Green(PyObject *self, PyObject *args) { - PyObject * _resultobj; - unsigned char _result; - wxColour * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxColour_Green",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Green. Expected _wxColour_p."); - return NULL; - } - } - _result = (unsigned char )wxColour_Green(_arg0); - _resultobj = Py_BuildValue("b",_result); - return _resultobj; -} - -#define wxColour_Blue(_swigobj) (_swigobj->Blue()) -static PyObject *_wrap_wxColour_Blue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - unsigned char _result; - wxColour * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxColour_Blue",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Blue. Expected _wxColour_p."); - return NULL; - } - } - _result = (unsigned char )wxColour_Blue(_arg0); - _resultobj = Py_BuildValue("b",_result); - return _resultobj; -} - -#define wxColour_Ok(_swigobj) (_swigobj->Ok()) -static PyObject *_wrap_wxColour_Ok(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxColour * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxColour_Ok",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Ok. Expected _wxColour_p."); - return NULL; - } - } - _result = (bool )wxColour_Ok(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxColour_Set(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Set(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxColour_Set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _arg0; - unsigned char _arg1; - unsigned char _arg2; - unsigned char _arg3; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sbbb:wxColour_Set",&_argc0,&_arg1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Set. Expected _wxColour_p."); - return NULL; - } - } - wxColour_Set(_arg0,_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject * wxColour_Get(wxColour *self) { - PyObject* rv = PyTuple_New(3); - PyTuple_SetItem(rv, 0, PyInt_FromLong(self->Red())); - PyTuple_SetItem(rv, 1, PyInt_FromLong(self->Green())); - PyTuple_SetItem(rv, 2, PyInt_FromLong(self->Blue())); - return rv; - } -static PyObject *_wrap_wxColour_Get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - PyObject * _result; - wxColour * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxColour_Get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Get. Expected _wxColour_p."); - return NULL; - } - } - _result = (PyObject *)wxColour_Get(_arg0); -{ - _resultobj = _result; -} - return _resultobj; -} - -static wxPen *new_wxPen(wxColour *colour,int width,int style) { - return wxThePenList->FindOrCreatePen(*colour, width, style); - } - -static PyObject *_wrap_new_wxPen(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPen * _result; - wxColour * _arg0; - int _arg1 = 1; - int _arg2 = (wxSOLID); - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|ii:new_wxPen",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPen. Expected _wxColour_p."); - return NULL; - } - } - _result = (wxPen *)new_wxPen(_arg0,_arg1,_arg2); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPen_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPen_GetCap(_swigobj) (_swigobj->GetCap()) -static PyObject *_wrap_wxPen_GetCap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPen * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPen_GetCap",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetCap. Expected _wxPen_p."); - return NULL; - } - } - _result = (int )wxPen_GetCap(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPen_GetColour(_swigobj) (_swigobj->GetColour()) -static PyObject *_wrap_wxPen_GetColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxPen * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPen_GetColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetColour. Expected _wxPen_p."); - return NULL; - } - } - wxColour & _result_ref = wxPen_GetColour(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPen_GetJoin(_swigobj) (_swigobj->GetJoin()) -static PyObject *_wrap_wxPen_GetJoin(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPen * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPen_GetJoin",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetJoin. Expected _wxPen_p."); - return NULL; - } - } - _result = (int )wxPen_GetJoin(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPen_GetStyle(_swigobj) (_swigobj->GetStyle()) -static PyObject *_wrap_wxPen_GetStyle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPen * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPen_GetStyle",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetStyle. Expected _wxPen_p."); - return NULL; - } - } - _result = (int )wxPen_GetStyle(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPen_GetWidth(_swigobj) (_swigobj->GetWidth()) -static PyObject *_wrap_wxPen_GetWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPen * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPen_GetWidth",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetWidth. Expected _wxPen_p."); - return NULL; - } - } - _result = (int )wxPen_GetWidth(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPen_Ok(_swigobj) (_swigobj->Ok()) -static PyObject *_wrap_wxPen_Ok(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPen * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPen_Ok",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_Ok. Expected _wxPen_p."); - return NULL; - } - } - _result = (bool )wxPen_Ok(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPen_SetCap(_swigobj,_swigarg0) (_swigobj->SetCap(_swigarg0)) -static PyObject *_wrap_wxPen_SetCap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPen * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPen_SetCap",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetCap. Expected _wxPen_p."); - return NULL; - } - } - wxPen_SetCap(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPen_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0)) -static PyObject *_wrap_wxPen_SetColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPen * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxPen_SetColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetColour. Expected _wxPen_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPen_SetColour. Expected _wxColour_p."); - return NULL; - } - } - wxPen_SetColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPen_SetJoin(_swigobj,_swigarg0) (_swigobj->SetJoin(_swigarg0)) -static PyObject *_wrap_wxPen_SetJoin(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPen * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPen_SetJoin",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetJoin. Expected _wxPen_p."); - return NULL; - } - } - wxPen_SetJoin(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPen_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0)) -static PyObject *_wrap_wxPen_SetStyle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPen * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPen_SetStyle",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetStyle. Expected _wxPen_p."); - return NULL; - } - } - wxPen_SetStyle(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPen_SetWidth(_swigobj,_swigarg0) (_swigobj->SetWidth(_swigarg0)) -static PyObject *_wrap_wxPen_SetWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPen * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPen_SetWidth",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetWidth. Expected _wxPen_p."); - return NULL; - } - } - wxPen_SetWidth(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static wxBrush *new_wxBrush(wxColour *colour,int style) { - return wxTheBrushList->FindOrCreateBrush(*colour, style); - } - -static PyObject *_wrap_new_wxBrush(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBrush * _result; - wxColour * _arg0; - int _arg1 = (wxSOLID); - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:new_wxBrush",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBrush. Expected _wxColour_p."); - return NULL; - } - } - _result = (wxBrush *)new_wxBrush(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxBrush_GetColour(_swigobj) (_swigobj->GetColour()) -static PyObject *_wrap_wxBrush_GetColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxBrush * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBrush_GetColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBrush_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrush_GetColour. Expected _wxBrush_p."); - return NULL; - } - } - wxColour & _result_ref = wxBrush_GetColour(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxBrush_GetStipple(_swigobj) (_swigobj->GetStipple()) -static PyObject *_wrap_wxBrush_GetStipple(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - wxBrush * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBrush_GetStipple",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBrush_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrush_GetStipple. Expected _wxBrush_p."); - return NULL; - } - } - _result = (wxBitmap *)wxBrush_GetStipple(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxBrush_GetStyle(_swigobj) (_swigobj->GetStyle()) -static PyObject *_wrap_wxBrush_GetStyle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxBrush * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBrush_GetStyle",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBrush_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrush_GetStyle. Expected _wxBrush_p."); - return NULL; - } - } - _result = (int )wxBrush_GetStyle(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxBrush_Ok(_swigobj) (_swigobj->Ok()) -static PyObject *_wrap_wxBrush_Ok(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxBrush * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBrush_Ok",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBrush_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrush_Ok. Expected _wxBrush_p."); - return NULL; - } - } - _result = (bool )wxBrush_Ok(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define delete_wxDC(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxDC",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxDC. Expected _wxDC_p."); - return NULL; - } - } - delete_wxDC(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_BeginDrawing(_swigobj) (_swigobj->BeginDrawing()) -static PyObject *_wrap_wxDC_BeginDrawing(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_BeginDrawing",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_BeginDrawing. Expected _wxDC_p."); - return NULL; - } - } - wxDC_BeginDrawing(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_Blit(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (_swigobj->Blit(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) -static PyObject *_wrap_wxDC_Blit(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - wxDC * _arg5; - long _arg6; - long _arg7; - long _arg8; - char * _argc0 = 0; - char * _argc5 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sllllslll:wxDC_Blit",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_argc5,&_arg6,&_arg7,&_arg8)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_Blit. Expected _wxDC_p."); - return NULL; - } - } - if (_argc5) { - if (SWIG_GetPtr(_argc5,(void **) &_arg5,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of wxDC_Blit. Expected _wxDC_p."); - return NULL; - } - } - _result = (bool )wxDC_Blit(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDC_Clear(_swigobj) (_swigobj->Clear()) -static PyObject *_wrap_wxDC_Clear(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_Clear",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_Clear. Expected _wxDC_p."); - return NULL; - } - } - wxDC_Clear(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_CrossHair(_swigobj,_swigarg0,_swigarg1) (_swigobj->CrossHair(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxDC_CrossHair(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxDC_CrossHair",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_CrossHair. Expected _wxDC_p."); - return NULL; - } - } - wxDC_CrossHair(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_DestroyClippingRegion(_swigobj) (_swigobj->DestroyClippingRegion()) -static PyObject *_wrap_wxDC_DestroyClippingRegion(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_DestroyClippingRegion",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DestroyClippingRegion. Expected _wxDC_p."); - return NULL; - } - } - wxDC_DestroyClippingRegion(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_DeviceToLogicalX(_swigobj,_swigarg0) (_swigobj->DeviceToLogicalX(_swigarg0)) -static PyObject *_wrap_wxDC_DeviceToLogicalX(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxDC_DeviceToLogicalX",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DeviceToLogicalX. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_DeviceToLogicalX(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_DeviceToLogicalXRel(_swigobj,_swigarg0) (_swigobj->DeviceToLogicalXRel(_swigarg0)) -static PyObject *_wrap_wxDC_DeviceToLogicalXRel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxDC_DeviceToLogicalXRel",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DeviceToLogicalXRel. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_DeviceToLogicalXRel(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_DeviceToLogicalY(_swigobj,_swigarg0) (_swigobj->DeviceToLogicalY(_swigarg0)) -static PyObject *_wrap_wxDC_DeviceToLogicalY(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxDC_DeviceToLogicalY",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DeviceToLogicalY. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_DeviceToLogicalY(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_DeviceToLogicalYRel(_swigobj,_swigarg0) (_swigobj->DeviceToLogicalYRel(_swigarg0)) -static PyObject *_wrap_wxDC_DeviceToLogicalYRel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxDC_DeviceToLogicalYRel",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DeviceToLogicalYRel. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_DeviceToLogicalYRel(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_DrawArc(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->DrawArc(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_wxDC_DrawArc(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - long _arg5; - long _arg6; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sllllll:wxDC_DrawArc",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawArc. Expected _wxDC_p."); - return NULL; - } - } - wxDC_DrawArc(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_DrawEllipse(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->DrawEllipse(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxDC_DrawEllipse(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sllll:wxDC_DrawEllipse",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawEllipse. Expected _wxDC_p."); - return NULL; - } - } - wxDC_DrawEllipse(_arg0,_arg1,_arg2,_arg3,_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_DrawEllipticArc(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->DrawEllipticArc(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_wxDC_DrawEllipticArc(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - long _arg5; - long _arg6; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sllllll:wxDC_DrawEllipticArc",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawEllipticArc. Expected _wxDC_p."); - return NULL; - } - } - wxDC_DrawEllipticArc(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_DrawIcon(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->DrawIcon(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxDC_DrawIcon(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxIcon * _arg1; - long _arg2; - long _arg3; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ssll:wxDC_DrawIcon",&_argc0,&_argc1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawIcon. Expected _wxDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_DrawIcon. Expected _wxIcon_p."); - return NULL; - } - } - wxDC_DrawIcon(_arg0,*_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_DrawLine(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->DrawLine(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxDC_DrawLine(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sllll:wxDC_DrawLine",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawLine. Expected _wxDC_p."); - return NULL; - } - } - wxDC_DrawLine(_arg0,_arg1,_arg2,_arg3,_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_DrawLines(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->DrawLines(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxDC_DrawLines(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - int _arg1; - wxPoint * _arg2; - long _arg3 = 0; - long _arg4 = 0; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO|ll:wxDC_DrawLines",&_argc0,&_obj2,&_arg3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawLines. Expected _wxDC_p."); - return NULL; - } - } - if (_obj2) -{ - _arg2 = wxPoint_LIST_helper(_obj2); - if (_arg2 == NULL) { - return NULL; - } -} -{ - _arg1 = PyList_Size(_obj2); -} - wxDC_DrawLines(_arg0,_arg1,_arg2,_arg3,_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - delete [] _arg2; -} - return _resultobj; -} - -#define wxDC_DrawPolygon(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->DrawPolygon(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_wxDC_DrawPolygon(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - int _arg1; - wxPoint * _arg2; - long _arg3 = 0; - long _arg4 = 0; - int _arg5 = (wxODDEVEN_RULE); - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO|lli:wxDC_DrawPolygon",&_argc0,&_obj2,&_arg3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawPolygon. Expected _wxDC_p."); - return NULL; - } - } - if (_obj2) -{ - _arg2 = wxPoint_LIST_helper(_obj2); - if (_arg2 == NULL) { - return NULL; - } -} -{ - _arg1 = PyList_Size(_obj2); -} - wxDC_DrawPolygon(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - delete [] _arg2; -} - return _resultobj; -} - -#define wxDC_DrawPoint(_swigobj,_swigarg0,_swigarg1) (_swigobj->DrawPoint(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxDC_DrawPoint(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxDC_DrawPoint",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawPoint. Expected _wxDC_p."); - return NULL; - } - } - wxDC_DrawPoint(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_DrawRectangle(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->DrawRectangle(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxDC_DrawRectangle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sllll:wxDC_DrawRectangle",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawRectangle. Expected _wxDC_p."); - return NULL; - } - } - wxDC_DrawRectangle(_arg0,_arg1,_arg2,_arg3,_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_DrawRoundedRectangle(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->DrawRoundedRectangle(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_wxDC_DrawRoundedRectangle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - long _arg5 = 20; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sllll|l:wxDC_DrawRoundedRectangle",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawRoundedRectangle. Expected _wxDC_p."); - return NULL; - } - } - wxDC_DrawRoundedRectangle(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_DrawSpline(_swigobj,_swigarg0,_swigarg1) (_swigobj->DrawSpline(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxDC_DrawSpline(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - int _arg1; - wxPoint * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxDC_DrawSpline",&_argc0,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawSpline. Expected _wxDC_p."); - return NULL; - } - } - if (_obj2) -{ - _arg2 = wxPoint_LIST_helper(_obj2); - if (_arg2 == NULL) { - return NULL; - } -} -{ - _arg1 = PyList_Size(_obj2); -} - wxDC_DrawSpline(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - delete [] _arg2; -} - return _resultobj; -} - -#define wxDC_DrawText(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->DrawText(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxDC_DrawText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxString * _arg1; - long _arg2; - long _arg3; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sOll:wxDC_DrawText",&_argc0,&_obj1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawText. Expected _wxDC_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxDC_DrawText(_arg0,*_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxDC_EndDoc(_swigobj) (_swigobj->EndDoc()) -static PyObject *_wrap_wxDC_EndDoc(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_EndDoc",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_EndDoc. Expected _wxDC_p."); - return NULL; - } - } - wxDC_EndDoc(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_EndDrawing(_swigobj) (_swigobj->EndDrawing()) -static PyObject *_wrap_wxDC_EndDrawing(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_EndDrawing",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_EndDrawing. Expected _wxDC_p."); - return NULL; - } - } - wxDC_EndDrawing(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_EndPage(_swigobj) (_swigobj->EndPage()) -static PyObject *_wrap_wxDC_EndPage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_EndPage",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_EndPage. Expected _wxDC_p."); - return NULL; - } - } - wxDC_EndPage(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_FloodFill(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->FloodFill(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxDC_FloodFill(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - wxColour * _arg3; - int _arg4 = (wxFLOOD_SURFACE); - char * _argc0 = 0; - char * _argc3 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slls|i:wxDC_FloodFill",&_argc0,&_arg1,&_arg2,&_argc3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_FloodFill. Expected _wxDC_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxDC_FloodFill. Expected _wxColour_p."); - return NULL; - } - } - wxDC_FloodFill(_arg0,_arg1,_arg2,_arg3,_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_GetBackground(_swigobj) (_swigobj->GetBackground()) -static PyObject *_wrap_wxDC_GetBackground(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBrush * _result; - wxDC * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetBackground",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetBackground. Expected _wxDC_p."); - return NULL; - } - } - _result = (wxBrush *)wxDC_GetBackground(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxDC_GetBrush(_swigobj) (_swigobj->GetBrush()) -static PyObject *_wrap_wxDC_GetBrush(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBrush * _result; - wxDC * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetBrush",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetBrush. Expected _wxDC_p."); - return NULL; - } - } - _result = (wxBrush *)wxDC_GetBrush(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxDC_GetCharHeight(_swigobj) (_swigobj->GetCharHeight()) -static PyObject *_wrap_wxDC_GetCharHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetCharHeight",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetCharHeight. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_GetCharHeight(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_GetCharWidth(_swigobj) (_swigobj->GetCharWidth()) -static PyObject *_wrap_wxDC_GetCharWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetCharWidth",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetCharWidth. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_GetCharWidth(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_GetClippingBox(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->GetClippingBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxDC_GetClippingBox(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long * _arg1; - long temp; - long * _arg2; - long temp0; - long * _arg3; - long temp1; - long * _arg4; - long temp2; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} -{ - _arg3 = &temp1; -} -{ - _arg4 = &temp2; -} - if(!PyArg_ParseTuple(args,"s:wxDC_GetClippingBox",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetClippingBox. Expected _wxDC_p."); - return NULL; - } - } - wxDC_GetClippingBox(_arg0,_arg1,_arg2,_arg3,_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg3)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg4)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxDC_GetFont(_swigobj) (_swigobj->GetFont()) -static PyObject *_wrap_wxDC_GetFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _result; - wxDC * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetFont",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetFont. Expected _wxDC_p."); - return NULL; - } - } - _result = (wxFont *)wxDC_GetFont(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxDC_GetLogicalFunction(_swigobj) (_swigobj->GetLogicalFunction()) -static PyObject *_wrap_wxDC_GetLogicalFunction(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetLogicalFunction",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetLogicalFunction. Expected _wxDC_p."); - return NULL; - } - } - _result = (int )wxDC_GetLogicalFunction(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDC_GetMapMode(_swigobj) (_swigobj->GetMapMode()) -static PyObject *_wrap_wxDC_GetMapMode(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetMapMode",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetMapMode. Expected _wxDC_p."); - return NULL; - } - } - _result = (int )wxDC_GetMapMode(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDC_GetOptimization(_swigobj) (_swigobj->GetOptimization()) -static PyObject *_wrap_wxDC_GetOptimization(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetOptimization",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetOptimization. Expected _wxDC_p."); - return NULL; - } - } - _result = (bool )wxDC_GetOptimization(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDC_GetPen(_swigobj) (_swigobj->GetPen()) -static PyObject *_wrap_wxDC_GetPen(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPen * _result; - wxDC * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetPen",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetPen. Expected _wxDC_p."); - return NULL; - } - } - _result = (wxPen *)wxDC_GetPen(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPen_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static wxColour * wxDC_GetPixel(wxDC *self,long x,long y) { - wxColour* wc = new wxColour(); - self->GetPixel(x, y, wc); - return wc; - } -static PyObject *_wrap_wxDC_GetPixel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxDC * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxDC_GetPixel",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetPixel. Expected _wxDC_p."); - return NULL; - } - } - _result = (wxColour *)wxDC_GetPixel(_arg0,_arg1,_arg2); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxDC_GetSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxDC_GetSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxDC_GetSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetSize. Expected _wxDC_p."); - return NULL; - } - } - wxDC_GetSize(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxDC_GetTextBackground(_swigobj) (_swigobj->GetTextBackground()) -static PyObject *_wrap_wxDC_GetTextBackground(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxDC * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetTextBackground",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetTextBackground. Expected _wxDC_p."); - return NULL; - } - } - wxColour & _result_ref = wxDC_GetTextBackground(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxDC_GetTextExtent(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->GetTextExtent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_wxDC_GetTextExtent(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxString * _arg1; - long * _arg2; - long temp; - long * _arg3; - long temp0; - long * _arg4; - long temp1; - long * _arg5; - long temp2; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; -{ - _arg2 = &temp; -} -{ - _arg3 = &temp0; -} -{ - _arg4 = &temp1; -} -{ - _arg5 = &temp2; -} - if(!PyArg_ParseTuple(args,"sO:wxDC_GetTextExtent",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetTextExtent. Expected _wxDC_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxDC_GetTextExtent(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg3)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg4)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg5)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxDC_GetTextForeground(_swigobj) (_swigobj->GetTextForeground()) -static PyObject *_wrap_wxDC_GetTextForeground(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxDC * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetTextForeground",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetTextForeground. Expected _wxDC_p."); - return NULL; - } - } - wxColour & _result_ref = wxDC_GetTextForeground(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxDC_LogicalToDeviceX(_swigobj,_swigarg0) (_swigobj->LogicalToDeviceX(_swigarg0)) -static PyObject *_wrap_wxDC_LogicalToDeviceX(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxDC_LogicalToDeviceX",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_LogicalToDeviceX. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_LogicalToDeviceX(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_LogicalToDeviceXRel(_swigobj,_swigarg0) (_swigobj->LogicalToDeviceXRel(_swigarg0)) -static PyObject *_wrap_wxDC_LogicalToDeviceXRel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxDC_LogicalToDeviceXRel",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_LogicalToDeviceXRel. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_LogicalToDeviceXRel(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_LogicalToDeviceY(_swigobj,_swigarg0) (_swigobj->LogicalToDeviceY(_swigarg0)) -static PyObject *_wrap_wxDC_LogicalToDeviceY(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxDC_LogicalToDeviceY",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_LogicalToDeviceY. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_LogicalToDeviceY(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_LogicalToDeviceYRel(_swigobj,_swigarg0) (_swigobj->LogicalToDeviceYRel(_swigarg0)) -static PyObject *_wrap_wxDC_LogicalToDeviceYRel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxDC_LogicalToDeviceYRel",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_LogicalToDeviceYRel. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_LogicalToDeviceYRel(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_MaxX(_swigobj) (_swigobj->MaxX()) -static PyObject *_wrap_wxDC_MaxX(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_MaxX",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_MaxX. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_MaxX(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_MaxY(_swigobj) (_swigobj->MaxY()) -static PyObject *_wrap_wxDC_MaxY(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_MaxY",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_MaxY. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_MaxY(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_MinX(_swigobj) (_swigobj->MinX()) -static PyObject *_wrap_wxDC_MinX(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_MinX",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_MinX. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_MinX(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_MinY(_swigobj) (_swigobj->MinY()) -static PyObject *_wrap_wxDC_MinY(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_MinY",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_MinY. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_MinY(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_Ok(_swigobj) (_swigobj->Ok()) -static PyObject *_wrap_wxDC_Ok(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_Ok",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_Ok. Expected _wxDC_p."); - return NULL; - } - } - _result = (bool )wxDC_Ok(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDC_SetDeviceOrigin(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDeviceOrigin(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxDC_SetDeviceOrigin(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxDC_SetDeviceOrigin",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetDeviceOrigin. Expected _wxDC_p."); - return NULL; - } - } - wxDC_SetDeviceOrigin(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetBackground(_swigobj,_swigarg0) (_swigobj->SetBackground(_swigarg0)) -static PyObject *_wrap_wxDC_SetBackground(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxBrush * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxDC_SetBackground",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetBackground. Expected _wxDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBrush_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetBackground. Expected _wxBrush_p."); - return NULL; - } - } - wxDC_SetBackground(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetBackgroundMode(_swigobj,_swigarg0) (_swigobj->SetBackgroundMode(_swigarg0)) -static PyObject *_wrap_wxDC_SetBackgroundMode(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxDC_SetBackgroundMode",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetBackgroundMode. Expected _wxDC_p."); - return NULL; - } - } - wxDC_SetBackgroundMode(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetClippingRegion(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->SetClippingRegion(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxDC_SetClippingRegion(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sllll:wxDC_SetClippingRegion",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetClippingRegion. Expected _wxDC_p."); - return NULL; - } - } - wxDC_SetClippingRegion(_arg0,_arg1,_arg2,_arg3,_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetPalette(_swigobj,_swigarg0) (_swigobj->SetPalette(_swigarg0)) -static PyObject *_wrap_wxDC_SetPalette(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxPalette * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxDC_SetPalette",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetPalette. Expected _wxDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPalette_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetPalette. Expected _wxPalette_p."); - return NULL; - } - } - wxDC_SetPalette(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetBrush(_swigobj,_swigarg0) (_swigobj->SetBrush(_swigarg0)) -static PyObject *_wrap_wxDC_SetBrush(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxBrush * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxDC_SetBrush",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetBrush. Expected _wxDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBrush_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetBrush. Expected _wxBrush_p."); - return NULL; - } - } - wxDC_SetBrush(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetFont(_swigobj,_swigarg0) (_swigobj->SetFont(_swigarg0)) -static PyObject *_wrap_wxDC_SetFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxFont * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxDC_SetFont",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetFont. Expected _wxDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetFont. Expected _wxFont_p."); - return NULL; - } - } - wxDC_SetFont(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetLogicalFunction(_swigobj,_swigarg0) (_swigobj->SetLogicalFunction(_swigarg0)) -static PyObject *_wrap_wxDC_SetLogicalFunction(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxDC_SetLogicalFunction",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetLogicalFunction. Expected _wxDC_p."); - return NULL; - } - } - wxDC_SetLogicalFunction(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetMapMode(_swigobj,_swigarg0) (_swigobj->SetMapMode(_swigarg0)) -static PyObject *_wrap_wxDC_SetMapMode(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxDC_SetMapMode",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetMapMode. Expected _wxDC_p."); - return NULL; - } - } - wxDC_SetMapMode(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetOptimization(_swigobj,_swigarg0) (_swigobj->SetOptimization(_swigarg0)) -static PyObject *_wrap_wxDC_SetOptimization(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxDC_SetOptimization",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetOptimization. Expected _wxDC_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxDC_SetOptimization(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetPen(_swigobj,_swigarg0) (_swigobj->SetPen(_swigarg0)) -static PyObject *_wrap_wxDC_SetPen(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxPen * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxDC_SetPen",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetPen. Expected _wxDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetPen. Expected _wxPen_p."); - return NULL; - } - } - wxDC_SetPen(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetTextBackground(_swigobj,_swigarg0) (_swigobj->SetTextBackground(_swigarg0)) -static PyObject *_wrap_wxDC_SetTextBackground(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxDC_SetTextBackground",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetTextBackground. Expected _wxDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetTextBackground. Expected _wxColour_p."); - return NULL; - } - } - wxDC_SetTextBackground(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetTextForeground(_swigobj,_swigarg0) (_swigobj->SetTextForeground(_swigarg0)) -static PyObject *_wrap_wxDC_SetTextForeground(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxDC_SetTextForeground",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetTextForeground. Expected _wxDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetTextForeground. Expected _wxColour_p."); - return NULL; - } - } - wxDC_SetTextForeground(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetUserScale(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetUserScale(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxDC_SetUserScale(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - double _arg1; - double _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sdd:wxDC_SetUserScale",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetUserScale. Expected _wxDC_p."); - return NULL; - } - } - wxDC_SetUserScale(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_StartDoc(_swigobj,_swigarg0) (_swigobj->StartDoc(_swigarg0)) -static PyObject *_wrap_wxDC_StartDoc(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxDC * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxDC_StartDoc",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_StartDoc. Expected _wxDC_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (bool )wxDC_StartDoc(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxDC_StartPage(_swigobj) (_swigobj->StartPage()) -static PyObject *_wrap_wxDC_StartPage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_StartPage",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_StartPage. Expected _wxDC_p."); - return NULL; - } - } - wxDC_StartPage(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void wxDC_DrawBitmap(wxDC *self,wxBitmap * bitmap,long x,long y,bool swapPalette) { - wxMemoryDC* memDC = new wxMemoryDC; - memDC->SelectObject(bitmap); - if (swapPalette) - self->SetPalette(bitmap->GetPalette()); - self->Blit(x, y, bitmap->GetWidth(), bitmap->GetHeight(), memDC, - 0, 0, self->GetLogicalFunction()); - memDC->SelectObject(wxNullBitmap); - delete memDC; - } -static PyObject *_wrap_wxDC_DrawBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxBitmap * _arg1; - long _arg2; - long _arg3; - bool _arg4 = (1); - char * _argc0 = 0; - char * _argc1 = 0; - int tempbool4; - - self = self; - if(!PyArg_ParseTuple(args,"ssll|i:wxDC_DrawBitmap",&_argc0,&_argc1,&_arg2,&_arg3,&tempbool4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawBitmap. Expected _wxDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_DrawBitmap. Expected _wxBitmap_p."); - return NULL; - } - } - _arg4 = (bool ) tempbool4; - wxDC_DrawBitmap(_arg0,_arg1,_arg2,_arg3,_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxMemoryDCTowxDC(void *ptr) { - wxMemoryDC *src; - wxDC *dest; - src = (wxMemoryDC *) ptr; - dest = (wxDC *) src; - return (void *) dest; -} - -#define new_wxMemoryDC() (new wxMemoryDC()) -static PyObject *_wrap_new_wxMemoryDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMemoryDC * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxMemoryDC")) - return NULL; - _result = (wxMemoryDC *)new_wxMemoryDC(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMemoryDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMemoryDC_SelectObject(_swigobj,_swigarg0) (_swigobj->SelectObject(_swigarg0)) -static PyObject *_wrap_wxMemoryDC_SelectObject(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMemoryDC * _arg0; - wxBitmap * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxMemoryDC_SelectObject",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMemoryDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryDC_SelectObject. Expected _wxMemoryDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMemoryDC_SelectObject. Expected _wxBitmap_p."); - return NULL; - } - } - wxMemoryDC_SelectObject(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxScreenDCTowxDC(void *ptr) { - wxScreenDC *src; - wxDC *dest; - src = (wxScreenDC *) ptr; - dest = (wxDC *) src; - return (void *) dest; -} - -#define new_wxScreenDC() (new wxScreenDC()) -static PyObject *_wrap_new_wxScreenDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScreenDC * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxScreenDC")) - return NULL; - _result = (wxScreenDC *)new_wxScreenDC(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxScreenDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxScreenDC_StartDrawingOnTop(_swigobj,_swigarg0) (_swigobj->StartDrawingOnTop(_swigarg0)) -static PyObject *_wrap_wxScreenDC_StartDrawingOnTop(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxScreenDC * _arg0; - wxWindow * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxScreenDC_StartDrawingOnTop",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScreenDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScreenDC_StartDrawingOnTop. Expected _wxScreenDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxScreenDC_StartDrawingOnTop. Expected _wxWindow_p."); - return NULL; - } - } - _result = (bool )wxScreenDC_StartDrawingOnTop(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxScreenDC_StartDrawingOnTopRect(_swigobj,_swigarg0) (_swigobj->StartDrawingOnTop(_swigarg0)) -static PyObject *_wrap_wxScreenDC_StartDrawingOnTopRect(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxScreenDC * _arg0; - wxRect * _arg1 = NULL; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|s:wxScreenDC_StartDrawingOnTopRect",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScreenDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScreenDC_StartDrawingOnTopRect. Expected _wxScreenDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxScreenDC_StartDrawingOnTopRect. Expected _wxRect_p."); - return NULL; - } - } - _result = (bool )wxScreenDC_StartDrawingOnTopRect(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxScreenDC_EndDrawingOnTop(_swigobj) (_swigobj->EndDrawingOnTop()) -static PyObject *_wrap_wxScreenDC_EndDrawingOnTop(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxScreenDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxScreenDC_EndDrawingOnTop",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScreenDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScreenDC_EndDrawingOnTop. Expected _wxScreenDC_p."); - return NULL; - } - } - _result = (bool )wxScreenDC_EndDrawingOnTop(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxClientDCTowxDC(void *ptr) { - wxClientDC *src; - wxDC *dest; - src = (wxClientDC *) ptr; - dest = (wxDC *) src; - return (void *) dest; -} - -#define new_wxClientDC(_swigarg0) (new wxClientDC(_swigarg0)) -static PyObject *_wrap_new_wxClientDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxClientDC * _result; - wxWindow * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:new_wxClientDC",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxClientDC. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxClientDC *)new_wxClientDC(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxClientDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static void *SwigwxPaintDCTowxDC(void *ptr) { - wxPaintDC *src; - wxDC *dest; - src = (wxPaintDC *) ptr; - dest = (wxDC *) src; - return (void *) dest; -} - -#define new_wxPaintDC(_swigarg0) (new wxPaintDC(_swigarg0)) -static PyObject *_wrap_new_wxPaintDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPaintDC * _result; - wxWindow * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:new_wxPaintDC",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPaintDC. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxPaintDC *)new_wxPaintDC(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPaintDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static void *SwigwxPostScriptDCTowxDC(void *ptr) { - wxPostScriptDC *src; - wxDC *dest; - src = (wxPostScriptDC *) ptr; - dest = (wxDC *) src; - return (void *) dest; -} - -#define new_wxPostScriptDC(_swigarg0,_swigarg1,_swigarg2) (new wxPostScriptDC(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_new_wxPostScriptDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPostScriptDC * _result; - wxString * _arg0; - bool _arg1 = (1); - wxWindow * _arg2 = NULL; - PyObject * _obj0 = 0; - int tempbool1; - char * _argc2 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"O|is:new_wxPostScriptDC",&_obj0,&tempbool1,&_argc2)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - _arg1 = (bool ) tempbool1; - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxPostScriptDC. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxPostScriptDC *)new_wxPostScriptDC(*_arg0,_arg1,_arg2); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPostScriptDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -static PyMethodDef gdicMethods[] = { - { "new_wxPostScriptDC", _wrap_new_wxPostScriptDC, 1 }, - { "new_wxPaintDC", _wrap_new_wxPaintDC, 1 }, - { "new_wxClientDC", _wrap_new_wxClientDC, 1 }, - { "wxScreenDC_EndDrawingOnTop", _wrap_wxScreenDC_EndDrawingOnTop, 1 }, - { "wxScreenDC_StartDrawingOnTopRect", _wrap_wxScreenDC_StartDrawingOnTopRect, 1 }, - { "wxScreenDC_StartDrawingOnTop", _wrap_wxScreenDC_StartDrawingOnTop, 1 }, - { "new_wxScreenDC", _wrap_new_wxScreenDC, 1 }, - { "wxMemoryDC_SelectObject", _wrap_wxMemoryDC_SelectObject, 1 }, - { "new_wxMemoryDC", _wrap_new_wxMemoryDC, 1 }, - { "wxDC_DrawBitmap", _wrap_wxDC_DrawBitmap, 1 }, - { "wxDC_StartPage", _wrap_wxDC_StartPage, 1 }, - { "wxDC_StartDoc", _wrap_wxDC_StartDoc, 1 }, - { "wxDC_SetUserScale", _wrap_wxDC_SetUserScale, 1 }, - { "wxDC_SetTextForeground", _wrap_wxDC_SetTextForeground, 1 }, - { "wxDC_SetTextBackground", _wrap_wxDC_SetTextBackground, 1 }, - { "wxDC_SetPen", _wrap_wxDC_SetPen, 1 }, - { "wxDC_SetOptimization", _wrap_wxDC_SetOptimization, 1 }, - { "wxDC_SetMapMode", _wrap_wxDC_SetMapMode, 1 }, - { "wxDC_SetLogicalFunction", _wrap_wxDC_SetLogicalFunction, 1 }, - { "wxDC_SetFont", _wrap_wxDC_SetFont, 1 }, - { "wxDC_SetBrush", _wrap_wxDC_SetBrush, 1 }, - { "wxDC_SetPalette", _wrap_wxDC_SetPalette, 1 }, - { "wxDC_SetClippingRegion", _wrap_wxDC_SetClippingRegion, 1 }, - { "wxDC_SetBackgroundMode", _wrap_wxDC_SetBackgroundMode, 1 }, - { "wxDC_SetBackground", _wrap_wxDC_SetBackground, 1 }, - { "wxDC_SetDeviceOrigin", _wrap_wxDC_SetDeviceOrigin, 1 }, - { "wxDC_Ok", _wrap_wxDC_Ok, 1 }, - { "wxDC_MinY", _wrap_wxDC_MinY, 1 }, - { "wxDC_MinX", _wrap_wxDC_MinX, 1 }, - { "wxDC_MaxY", _wrap_wxDC_MaxY, 1 }, - { "wxDC_MaxX", _wrap_wxDC_MaxX, 1 }, - { "wxDC_LogicalToDeviceYRel", _wrap_wxDC_LogicalToDeviceYRel, 1 }, - { "wxDC_LogicalToDeviceY", _wrap_wxDC_LogicalToDeviceY, 1 }, - { "wxDC_LogicalToDeviceXRel", _wrap_wxDC_LogicalToDeviceXRel, 1 }, - { "wxDC_LogicalToDeviceX", _wrap_wxDC_LogicalToDeviceX, 1 }, - { "wxDC_GetTextForeground", _wrap_wxDC_GetTextForeground, 1 }, - { "wxDC_GetTextExtent", _wrap_wxDC_GetTextExtent, 1 }, - { "wxDC_GetTextBackground", _wrap_wxDC_GetTextBackground, 1 }, - { "wxDC_GetSize", _wrap_wxDC_GetSize, 1 }, - { "wxDC_GetPixel", _wrap_wxDC_GetPixel, 1 }, - { "wxDC_GetPen", _wrap_wxDC_GetPen, 1 }, - { "wxDC_GetOptimization", _wrap_wxDC_GetOptimization, 1 }, - { "wxDC_GetMapMode", _wrap_wxDC_GetMapMode, 1 }, - { "wxDC_GetLogicalFunction", _wrap_wxDC_GetLogicalFunction, 1 }, - { "wxDC_GetFont", _wrap_wxDC_GetFont, 1 }, - { "wxDC_GetClippingBox", _wrap_wxDC_GetClippingBox, 1 }, - { "wxDC_GetCharWidth", _wrap_wxDC_GetCharWidth, 1 }, - { "wxDC_GetCharHeight", _wrap_wxDC_GetCharHeight, 1 }, - { "wxDC_GetBrush", _wrap_wxDC_GetBrush, 1 }, - { "wxDC_GetBackground", _wrap_wxDC_GetBackground, 1 }, - { "wxDC_FloodFill", _wrap_wxDC_FloodFill, 1 }, - { "wxDC_EndPage", _wrap_wxDC_EndPage, 1 }, - { "wxDC_EndDrawing", _wrap_wxDC_EndDrawing, 1 }, - { "wxDC_EndDoc", _wrap_wxDC_EndDoc, 1 }, - { "wxDC_DrawText", _wrap_wxDC_DrawText, 1 }, - { "wxDC_DrawSpline", _wrap_wxDC_DrawSpline, 1 }, - { "wxDC_DrawRoundedRectangle", _wrap_wxDC_DrawRoundedRectangle, 1 }, - { "wxDC_DrawRectangle", _wrap_wxDC_DrawRectangle, 1 }, - { "wxDC_DrawPoint", _wrap_wxDC_DrawPoint, 1 }, - { "wxDC_DrawPolygon", _wrap_wxDC_DrawPolygon, 1 }, - { "wxDC_DrawLines", _wrap_wxDC_DrawLines, 1 }, - { "wxDC_DrawLine", _wrap_wxDC_DrawLine, 1 }, - { "wxDC_DrawIcon", _wrap_wxDC_DrawIcon, 1 }, - { "wxDC_DrawEllipticArc", _wrap_wxDC_DrawEllipticArc, 1 }, - { "wxDC_DrawEllipse", _wrap_wxDC_DrawEllipse, 1 }, - { "wxDC_DrawArc", _wrap_wxDC_DrawArc, 1 }, - { "wxDC_DeviceToLogicalYRel", _wrap_wxDC_DeviceToLogicalYRel, 1 }, - { "wxDC_DeviceToLogicalY", _wrap_wxDC_DeviceToLogicalY, 1 }, - { "wxDC_DeviceToLogicalXRel", _wrap_wxDC_DeviceToLogicalXRel, 1 }, - { "wxDC_DeviceToLogicalX", _wrap_wxDC_DeviceToLogicalX, 1 }, - { "wxDC_DestroyClippingRegion", _wrap_wxDC_DestroyClippingRegion, 1 }, - { "wxDC_CrossHair", _wrap_wxDC_CrossHair, 1 }, - { "wxDC_Clear", _wrap_wxDC_Clear, 1 }, - { "wxDC_Blit", _wrap_wxDC_Blit, 1 }, - { "wxDC_BeginDrawing", _wrap_wxDC_BeginDrawing, 1 }, - { "delete_wxDC", _wrap_delete_wxDC, 1 }, - { "wxBrush_Ok", _wrap_wxBrush_Ok, 1 }, - { "wxBrush_GetStyle", _wrap_wxBrush_GetStyle, 1 }, - { "wxBrush_GetStipple", _wrap_wxBrush_GetStipple, 1 }, - { "wxBrush_GetColour", _wrap_wxBrush_GetColour, 1 }, - { "new_wxBrush", _wrap_new_wxBrush, 1 }, - { "wxPen_SetWidth", _wrap_wxPen_SetWidth, 1 }, - { "wxPen_SetStyle", _wrap_wxPen_SetStyle, 1 }, - { "wxPen_SetJoin", _wrap_wxPen_SetJoin, 1 }, - { "wxPen_SetColour", _wrap_wxPen_SetColour, 1 }, - { "wxPen_SetCap", _wrap_wxPen_SetCap, 1 }, - { "wxPen_Ok", _wrap_wxPen_Ok, 1 }, - { "wxPen_GetWidth", _wrap_wxPen_GetWidth, 1 }, - { "wxPen_GetStyle", _wrap_wxPen_GetStyle, 1 }, - { "wxPen_GetJoin", _wrap_wxPen_GetJoin, 1 }, - { "wxPen_GetColour", _wrap_wxPen_GetColour, 1 }, - { "wxPen_GetCap", _wrap_wxPen_GetCap, 1 }, - { "new_wxPen", _wrap_new_wxPen, 1 }, - { "wxColour_Get", _wrap_wxColour_Get, 1 }, - { "wxColour_Set", _wrap_wxColour_Set, 1 }, - { "wxColour_Ok", _wrap_wxColour_Ok, 1 }, - { "wxColour_Blue", _wrap_wxColour_Blue, 1 }, - { "wxColour_Green", _wrap_wxColour_Green, 1 }, - { "wxColour_Red", _wrap_wxColour_Red, 1 }, - { "delete_wxColour", _wrap_delete_wxColour, 1 }, - { "new_wxColour", _wrap_new_wxColour, 1 }, - { "wxFont_GetWeight", _wrap_wxFont_GetWeight, 1 }, - { "wxFont_GetUnderlined", _wrap_wxFont_GetUnderlined, 1 }, - { "wxFont_GetStyle", _wrap_wxFont_GetStyle, 1 }, - { "wxFont_GetPointSize", _wrap_wxFont_GetPointSize, 1 }, - { "wxFont_GetFontId", _wrap_wxFont_GetFontId, 1 }, - { "wxFont_GetFamily", _wrap_wxFont_GetFamily, 1 }, - { "wxFont_GetFaceName", _wrap_wxFont_GetFaceName, 1 }, - { "new_wxFont", _wrap_new_wxFont, 1 }, - { "wxCursor_Ok", _wrap_wxCursor_Ok, 1 }, - { "delete_wxCursor", _wrap_delete_wxCursor, 1 }, - { "wxIcon_SetWidth", _wrap_wxIcon_SetWidth, 1 }, - { "wxIcon_SetHeight", _wrap_wxIcon_SetHeight, 1 }, - { "wxIcon_SetDepth", _wrap_wxIcon_SetDepth, 1 }, - { "wxIcon_Ok", _wrap_wxIcon_Ok, 1 }, - { "wxIcon_LoadFile", _wrap_wxIcon_LoadFile, 1 }, - { "wxIcon_GetWidth", _wrap_wxIcon_GetWidth, 1 }, - { "wxIcon_GetHeight", _wrap_wxIcon_GetHeight, 1 }, - { "wxIcon_GetDepth", _wrap_wxIcon_GetDepth, 1 }, - { "delete_wxIcon", _wrap_delete_wxIcon, 1 }, - { "delete_wxMask", _wrap_delete_wxMask, 1 }, - { "new_wxMask", _wrap_new_wxMask, 1 }, - { "wxBitmap_SetWidth", _wrap_wxBitmap_SetWidth, 1 }, - { "wxBitmap_SetMask", _wrap_wxBitmap_SetMask, 1 }, - { "wxBitmap_SetHeight", _wrap_wxBitmap_SetHeight, 1 }, - { "wxBitmap_SetDepth", _wrap_wxBitmap_SetDepth, 1 }, - { "wxBitmap_SaveFile", _wrap_wxBitmap_SaveFile, 1 }, - { "wxBitmap_Ok", _wrap_wxBitmap_Ok, 1 }, - { "wxBitmap_LoadFile", _wrap_wxBitmap_LoadFile, 1 }, - { "wxBitmap_GetWidth", _wrap_wxBitmap_GetWidth, 1 }, - { "wxBitmap_GetMask", _wrap_wxBitmap_GetMask, 1 }, - { "wxBitmap_GetPalette", _wrap_wxBitmap_GetPalette, 1 }, - { "wxBitmap_GetHeight", _wrap_wxBitmap_GetHeight, 1 }, - { "wxBitmap_GetDepth", _wrap_wxBitmap_GetDepth, 1 }, - { "delete_wxBitmap", _wrap_delete_wxBitmap, 1 }, - { "new_wxBitmap", _wrap_new_wxBitmap, 1 }, - { "wxMemoryDCFromDC", _wrap_wxMemoryDCFromDC, 1 }, - { "wxNamedColour", _wrap_wxNamedColour, 1 }, - { "wxStockCursor", _wrap_wxStockCursor, 1 }, - { "wxMaskColour", _wrap_wxMaskColour, 1 }, - { "wxNoRefBitmap", _wrap_wxNoRefBitmap, 1 }, - { "wxEmptyBitmap", _wrap_wxEmptyBitmap, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initgdic)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("gdic", gdicMethods); - d = PyModule_GetDict(m); - PyDict_SetItemString(d,"cvar", SWIG_globals); - SWIG_addvarlink(SWIG_globals,"wxNORMAL_FONT",_wrap_wxNORMAL_FONT_get, _wrap_wxNORMAL_FONT_set); - SWIG_addvarlink(SWIG_globals,"wxSMALL_FONT",_wrap_wxSMALL_FONT_get, _wrap_wxSMALL_FONT_set); - SWIG_addvarlink(SWIG_globals,"wxITALIC_FONT",_wrap_wxITALIC_FONT_get, _wrap_wxITALIC_FONT_set); - SWIG_addvarlink(SWIG_globals,"wxSWISS_FONT",_wrap_wxSWISS_FONT_get, _wrap_wxSWISS_FONT_set); - SWIG_addvarlink(SWIG_globals,"wxRED_PEN",_wrap_wxRED_PEN_get, _wrap_wxRED_PEN_set); - SWIG_addvarlink(SWIG_globals,"wxCYAN_PEN",_wrap_wxCYAN_PEN_get, _wrap_wxCYAN_PEN_set); - SWIG_addvarlink(SWIG_globals,"wxGREEN_PEN",_wrap_wxGREEN_PEN_get, _wrap_wxGREEN_PEN_set); - SWIG_addvarlink(SWIG_globals,"wxBLACK_PEN",_wrap_wxBLACK_PEN_get, _wrap_wxBLACK_PEN_set); - SWIG_addvarlink(SWIG_globals,"wxWHITE_PEN",_wrap_wxWHITE_PEN_get, _wrap_wxWHITE_PEN_set); - SWIG_addvarlink(SWIG_globals,"wxTRANSPARENT_PEN",_wrap_wxTRANSPARENT_PEN_get, _wrap_wxTRANSPARENT_PEN_set); - SWIG_addvarlink(SWIG_globals,"wxBLACK_DASHED_PEN",_wrap_wxBLACK_DASHED_PEN_get, _wrap_wxBLACK_DASHED_PEN_set); - SWIG_addvarlink(SWIG_globals,"wxGREY_PEN",_wrap_wxGREY_PEN_get, _wrap_wxGREY_PEN_set); - SWIG_addvarlink(SWIG_globals,"wxMEDIUM_GREY_PEN",_wrap_wxMEDIUM_GREY_PEN_get, _wrap_wxMEDIUM_GREY_PEN_set); - SWIG_addvarlink(SWIG_globals,"wxLIGHT_GREY_PEN",_wrap_wxLIGHT_GREY_PEN_get, _wrap_wxLIGHT_GREY_PEN_set); - SWIG_addvarlink(SWIG_globals,"wxBLUE_BRUSH",_wrap_wxBLUE_BRUSH_get, _wrap_wxBLUE_BRUSH_set); - SWIG_addvarlink(SWIG_globals,"wxGREEN_BRUSH",_wrap_wxGREEN_BRUSH_get, _wrap_wxGREEN_BRUSH_set); - SWIG_addvarlink(SWIG_globals,"wxWHITE_BRUSH",_wrap_wxWHITE_BRUSH_get, _wrap_wxWHITE_BRUSH_set); - SWIG_addvarlink(SWIG_globals,"wxBLACK_BRUSH",_wrap_wxBLACK_BRUSH_get, _wrap_wxBLACK_BRUSH_set); - SWIG_addvarlink(SWIG_globals,"wxTRANSPARENT_BRUSH",_wrap_wxTRANSPARENT_BRUSH_get, _wrap_wxTRANSPARENT_BRUSH_set); - SWIG_addvarlink(SWIG_globals,"wxCYAN_BRUSH",_wrap_wxCYAN_BRUSH_get, _wrap_wxCYAN_BRUSH_set); - SWIG_addvarlink(SWIG_globals,"wxRED_BRUSH",_wrap_wxRED_BRUSH_get, _wrap_wxRED_BRUSH_set); - SWIG_addvarlink(SWIG_globals,"wxGREY_BRUSH",_wrap_wxGREY_BRUSH_get, _wrap_wxGREY_BRUSH_set); - SWIG_addvarlink(SWIG_globals,"wxMEDIUM_GREY_BRUSH",_wrap_wxMEDIUM_GREY_BRUSH_get, _wrap_wxMEDIUM_GREY_BRUSH_set); - SWIG_addvarlink(SWIG_globals,"wxLIGHT_GREY_BRUSH",_wrap_wxLIGHT_GREY_BRUSH_get, _wrap_wxLIGHT_GREY_BRUSH_set); - SWIG_addvarlink(SWIG_globals,"wxBLACK",_wrap_wxBLACK_get, _wrap_wxBLACK_set); - SWIG_addvarlink(SWIG_globals,"wxWHITE",_wrap_wxWHITE_get, _wrap_wxWHITE_set); - SWIG_addvarlink(SWIG_globals,"wxRED",_wrap_wxRED_get, _wrap_wxRED_set); - SWIG_addvarlink(SWIG_globals,"wxBLUE",_wrap_wxBLUE_get, _wrap_wxBLUE_set); - SWIG_addvarlink(SWIG_globals,"wxGREEN",_wrap_wxGREEN_get, _wrap_wxGREEN_set); - SWIG_addvarlink(SWIG_globals,"wxCYAN",_wrap_wxCYAN_get, _wrap_wxCYAN_set); - SWIG_addvarlink(SWIG_globals,"wxLIGHT_GREY",_wrap_wxLIGHT_GREY_get, _wrap_wxLIGHT_GREY_set); - SWIG_addvarlink(SWIG_globals,"wxSTANDARD_CURSOR",_wrap_wxSTANDARD_CURSOR_get, _wrap_wxSTANDARD_CURSOR_set); - SWIG_addvarlink(SWIG_globals,"wxHOURGLASS_CURSOR",_wrap_wxHOURGLASS_CURSOR_get, _wrap_wxHOURGLASS_CURSOR_set); - SWIG_addvarlink(SWIG_globals,"wxCROSS_CURSOR",_wrap_wxCROSS_CURSOR_get, _wrap_wxCROSS_CURSOR_set); - SWIG_addvarlink(SWIG_globals,"wxNullBitmap",_wrap_wxNullBitmap_get, _wrap_wxNullBitmap_set); - SWIG_addvarlink(SWIG_globals,"wxNullIcon",_wrap_wxNullIcon_get, _wrap_wxNullIcon_set); - SWIG_addvarlink(SWIG_globals,"wxNullCursor",_wrap_wxNullCursor_get, _wrap_wxNullCursor_set); - SWIG_addvarlink(SWIG_globals,"wxNullPen",_wrap_wxNullPen_get, _wrap_wxNullPen_set); - SWIG_addvarlink(SWIG_globals,"wxNullBrush",_wrap_wxNullBrush_get, _wrap_wxNullBrush_set); - SWIG_addvarlink(SWIG_globals,"wxNullPalette",_wrap_wxNullPalette_get, _wrap_wxNullPalette_set); - SWIG_addvarlink(SWIG_globals,"wxNullFont",_wrap_wxNullFont_get, _wrap_wxNullFont_set); - SWIG_addvarlink(SWIG_globals,"wxNullColour",_wrap_wxNullColour_get, _wrap_wxNullColour_set); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); - SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPen","_class_wxPen",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_long","_wxDash",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_wxDC","_class_wxPostScriptDC",SwigwxPostScriptDCTowxDC); - SWIG_RegisterMapping("_wxDC","_wxPostScriptDC",SwigwxPostScriptDCTowxDC); - SWIG_RegisterMapping("_wxDC","_class_wxPaintDC",SwigwxPaintDCTowxDC); - SWIG_RegisterMapping("_wxDC","_wxPaintDC",SwigwxPaintDCTowxDC); - SWIG_RegisterMapping("_wxDC","_class_wxClientDC",SwigwxClientDCTowxDC); - SWIG_RegisterMapping("_wxDC","_wxClientDC",SwigwxClientDCTowxDC); - SWIG_RegisterMapping("_wxDC","_class_wxScreenDC",SwigwxScreenDCTowxDC); - SWIG_RegisterMapping("_wxDC","_wxScreenDC",SwigwxScreenDCTowxDC); - SWIG_RegisterMapping("_wxDC","_class_wxMemoryDC",SwigwxMemoryDCTowxDC); - SWIG_RegisterMapping("_wxDC","_wxMemoryDC",SwigwxMemoryDCTowxDC); - SWIG_RegisterMapping("_wxDC","_class_wxDC",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); - SWIG_RegisterMapping("_class_wxMask","_wxMask",0); - SWIG_RegisterMapping("_wxColour","_class_wxColour",0); - SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_wxBitmap","_class_wxCursor",SwigwxCursorTowxBitmap); - SWIG_RegisterMapping("_wxBitmap","_wxCursor",SwigwxCursorTowxBitmap); - SWIG_RegisterMapping("_wxBitmap","_class_wxIcon",SwigwxIconTowxBitmap); - SWIG_RegisterMapping("_wxBitmap","_wxIcon",SwigwxIconTowxBitmap); - SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_wxFont","_class_wxFont",0); - SWIG_RegisterMapping("_unsigned_long","_wxDash",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxDC","_class_wxPostScriptDC",SwigwxPostScriptDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_wxPostScriptDC",SwigwxPostScriptDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_class_wxPaintDC",SwigwxPaintDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_wxPaintDC",SwigwxPaintDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_class_wxClientDC",SwigwxClientDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_wxClientDC",SwigwxClientDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_class_wxScreenDC",SwigwxScreenDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_wxScreenDC",SwigwxScreenDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_class_wxMemoryDC",SwigwxMemoryDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_wxMemoryDC",SwigwxMemoryDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_wxDC",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_class_wxBrush","_wxBrush",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxFont","_wxFont",0); - SWIG_RegisterMapping("_wxClientDC","_class_wxClientDC",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_wxMemoryDC","_class_wxMemoryDC",0); - SWIG_RegisterMapping("_wxPaintDC","_class_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); - SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); - SWIG_RegisterMapping("_class_wxPen","_wxPen",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxPaintDC","_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_class_wxIcon","_wxIcon",0); - SWIG_RegisterMapping("_class_wxColour","_wxColour",0); - SWIG_RegisterMapping("_class_wxScreenDC","_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxClientDC","_wxClientDC",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); - SWIG_RegisterMapping("_class_wxBitmap","_class_wxCursor",SwigwxCursorTowxBitmap); - SWIG_RegisterMapping("_class_wxBitmap","_wxCursor",SwigwxCursorTowxBitmap); - SWIG_RegisterMapping("_class_wxBitmap","_class_wxIcon",SwigwxIconTowxBitmap); - SWIG_RegisterMapping("_class_wxBitmap","_wxIcon",SwigwxIconTowxBitmap); - SWIG_RegisterMapping("_class_wxBitmap","_wxBitmap",0); - SWIG_RegisterMapping("_class_wxMemoryDC","_wxMemoryDC",0); - SWIG_RegisterMapping("_wxDash","_unsigned_long",0); - SWIG_RegisterMapping("_wxDash","_long",0); -} diff --git a/utils/wxPython/src/gtk/gdi.py b/utils/wxPython/src/gtk/gdi.py deleted file mode 100644 index 3a24275f91..0000000000 --- a/utils/wxPython/src/gtk/gdi.py +++ /dev/null @@ -1,689 +0,0 @@ -# This file was created automatically by SWIG. -import gdic - -from misc import * -class wxBitmapPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - gdic.delete_wxBitmap(self.this) - def GetDepth(self): - val = gdic.wxBitmap_GetDepth(self.this) - return val - def GetHeight(self): - val = gdic.wxBitmap_GetHeight(self.this) - return val - def GetPalette(self): - val = gdic.wxBitmap_GetPalette(self.this) - return val - def GetMask(self): - val = gdic.wxBitmap_GetMask(self.this) - val = wxMaskPtr(val) - return val - def GetWidth(self): - val = gdic.wxBitmap_GetWidth(self.this) - return val - def LoadFile(self,arg0,arg1): - val = gdic.wxBitmap_LoadFile(self.this,arg0,arg1) - return val - def Ok(self): - val = gdic.wxBitmap_Ok(self.this) - return val - def SaveFile(self,arg0,arg1,*args): - val = apply(gdic.wxBitmap_SaveFile,(self.this,arg0,arg1,)+args) - return val - def SetDepth(self,arg0): - val = gdic.wxBitmap_SetDepth(self.this,arg0) - return val - def SetHeight(self,arg0): - val = gdic.wxBitmap_SetHeight(self.this,arg0) - return val - def SetMask(self,arg0): - val = gdic.wxBitmap_SetMask(self.this,arg0.this) - return val - def SetWidth(self,arg0): - val = gdic.wxBitmap_SetWidth(self.this,arg0) - return val - def __repr__(self): - return "" -class wxBitmap(wxBitmapPtr): - def __init__(self,arg0,arg1) : - self.this = gdic.new_wxBitmap(arg0,arg1) - self.thisown = 1 - - - - -class wxMaskPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - gdic.delete_wxMask(self.this) - def __repr__(self): - return "" -class wxMask(wxMaskPtr): - def __init__(self,arg0) : - self.this = gdic.new_wxMask(arg0.this) - self.thisown = 1 - - - - -class wxIconPtr(wxBitmapPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - gdic.delete_wxIcon(self.this) - def GetDepth(self): - val = gdic.wxIcon_GetDepth(self.this) - return val - def GetHeight(self): - val = gdic.wxIcon_GetHeight(self.this) - return val - def GetWidth(self): - val = gdic.wxIcon_GetWidth(self.this) - return val - def LoadFile(self,arg0,arg1): - val = gdic.wxIcon_LoadFile(self.this,arg0,arg1) - return val - def Ok(self): - val = gdic.wxIcon_Ok(self.this) - return val - def SetDepth(self,arg0): - val = gdic.wxIcon_SetDepth(self.this,arg0) - return val - def SetHeight(self,arg0): - val = gdic.wxIcon_SetHeight(self.this,arg0) - return val - def SetWidth(self,arg0): - val = gdic.wxIcon_SetWidth(self.this,arg0) - return val - def __repr__(self): - return "" -class wxIcon(wxIconPtr): - def __init__(self,this): - self.this = this - - - - -class wxCursorPtr(wxBitmapPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - gdic.delete_wxCursor(self.this) - def Ok(self): - val = gdic.wxCursor_Ok(self.this) - return val - def __repr__(self): - return "" -class wxCursor(wxCursorPtr): - def __init__(self,this): - self.this = this - - - - -class wxFontPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetFaceName(self): - val = gdic.wxFont_GetFaceName(self.this) - return val - def GetFamily(self): - val = gdic.wxFont_GetFamily(self.this) - return val - def GetFontId(self): - val = gdic.wxFont_GetFontId(self.this) - return val - def GetPointSize(self): - val = gdic.wxFont_GetPointSize(self.this) - return val - def GetStyle(self): - val = gdic.wxFont_GetStyle(self.this) - return val - def GetUnderlined(self): - val = gdic.wxFont_GetUnderlined(self.this) - return val - def GetWeight(self): - val = gdic.wxFont_GetWeight(self.this) - return val - def __repr__(self): - return "" -class wxFont(wxFontPtr): - def __init__(self,arg0,arg1,arg2,arg3,*args) : - self.this = apply(gdic.new_wxFont,(arg0,arg1,arg2,arg3,)+args) - self.thisown = 1 - - - - -class wxColourPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - gdic.delete_wxColour(self.this) - def Red(self): - val = gdic.wxColour_Red(self.this) - return val - def Green(self): - val = gdic.wxColour_Green(self.this) - return val - def Blue(self): - val = gdic.wxColour_Blue(self.this) - return val - def Ok(self): - val = gdic.wxColour_Ok(self.this) - return val - def Set(self,arg0,arg1,arg2): - val = gdic.wxColour_Set(self.this,arg0,arg1,arg2) - return val - def Get(self): - val = gdic.wxColour_Get(self.this) - return val - def __repr__(self): - return "" -class wxColour(wxColourPtr): - def __init__(self,*args) : - self.this = apply(gdic.new_wxColour,()+args) - self.thisown = 1 - - - - -class wxPenPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetCap(self): - val = gdic.wxPen_GetCap(self.this) - return val - def GetColour(self): - val = gdic.wxPen_GetColour(self.this) - val = wxColourPtr(val) - return val - def GetJoin(self): - val = gdic.wxPen_GetJoin(self.this) - return val - def GetStyle(self): - val = gdic.wxPen_GetStyle(self.this) - return val - def GetWidth(self): - val = gdic.wxPen_GetWidth(self.this) - return val - def Ok(self): - val = gdic.wxPen_Ok(self.this) - return val - def SetCap(self,arg0): - val = gdic.wxPen_SetCap(self.this,arg0) - return val - def SetColour(self,arg0): - val = gdic.wxPen_SetColour(self.this,arg0.this) - return val - def SetJoin(self,arg0): - val = gdic.wxPen_SetJoin(self.this,arg0) - return val - def SetStyle(self,arg0): - val = gdic.wxPen_SetStyle(self.this,arg0) - return val - def SetWidth(self,arg0): - val = gdic.wxPen_SetWidth(self.this,arg0) - return val - def __repr__(self): - return "" -class wxPen(wxPenPtr): - def __init__(self,arg0,*args) : - self.this = apply(gdic.new_wxPen,(arg0.this,)+args) - self.thisown = 1 - - - - -class wxBrushPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetColour(self): - val = gdic.wxBrush_GetColour(self.this) - val = wxColourPtr(val) - return val - def GetStipple(self): - val = gdic.wxBrush_GetStipple(self.this) - val = wxBitmapPtr(val) - return val - def GetStyle(self): - val = gdic.wxBrush_GetStyle(self.this) - return val - def Ok(self): - val = gdic.wxBrush_Ok(self.this) - return val - def __repr__(self): - return "" -class wxBrush(wxBrushPtr): - def __init__(self,arg0,*args) : - self.this = apply(gdic.new_wxBrush,(arg0.this,)+args) - self.thisown = 1 - - - - -class wxDCPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - gdic.delete_wxDC(self.this) - def BeginDrawing(self): - val = gdic.wxDC_BeginDrawing(self.this) - return val - def Blit(self,arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7): - val = gdic.wxDC_Blit(self.this,arg0,arg1,arg2,arg3,arg4.this,arg5,arg6,arg7) - return val - def Clear(self): - val = gdic.wxDC_Clear(self.this) - return val - def CrossHair(self,arg0,arg1): - val = gdic.wxDC_CrossHair(self.this,arg0,arg1) - return val - def DestroyClippingRegion(self): - val = gdic.wxDC_DestroyClippingRegion(self.this) - return val - def DeviceToLogicalX(self,arg0): - val = gdic.wxDC_DeviceToLogicalX(self.this,arg0) - return val - def DeviceToLogicalXRel(self,arg0): - val = gdic.wxDC_DeviceToLogicalXRel(self.this,arg0) - return val - def DeviceToLogicalY(self,arg0): - val = gdic.wxDC_DeviceToLogicalY(self.this,arg0) - return val - def DeviceToLogicalYRel(self,arg0): - val = gdic.wxDC_DeviceToLogicalYRel(self.this,arg0) - return val - def DrawArc(self,arg0,arg1,arg2,arg3,arg4,arg5): - val = gdic.wxDC_DrawArc(self.this,arg0,arg1,arg2,arg3,arg4,arg5) - return val - def DrawEllipse(self,arg0,arg1,arg2,arg3): - val = gdic.wxDC_DrawEllipse(self.this,arg0,arg1,arg2,arg3) - return val - def DrawEllipticArc(self,arg0,arg1,arg2,arg3,arg4,arg5): - val = gdic.wxDC_DrawEllipticArc(self.this,arg0,arg1,arg2,arg3,arg4,arg5) - return val - def DrawIcon(self,arg0,arg1,arg2): - val = gdic.wxDC_DrawIcon(self.this,arg0.this,arg1,arg2) - return val - def DrawLine(self,arg0,arg1,arg2,arg3): - val = gdic.wxDC_DrawLine(self.this,arg0,arg1,arg2,arg3) - return val - def DrawLines(self,arg0,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(gdic.wxDC_DrawLines,(self.this,arg0,)+args) - return val - def DrawPolygon(self,arg0,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(gdic.wxDC_DrawPolygon,(self.this,arg0,)+args) - return val - def DrawPoint(self,arg0,arg1): - val = gdic.wxDC_DrawPoint(self.this,arg0,arg1) - return val - def DrawRectangle(self,arg0,arg1,arg2,arg3): - val = gdic.wxDC_DrawRectangle(self.this,arg0,arg1,arg2,arg3) - return val - def DrawRoundedRectangle(self,arg0,arg1,arg2,arg3,*args): - val = apply(gdic.wxDC_DrawRoundedRectangle,(self.this,arg0,arg1,arg2,arg3,)+args) - return val - def DrawSpline(self,arg0,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(gdic.wxDC_DrawSpline,(self.this,arg0,)+args) - return val - def DrawText(self,arg0,arg1,arg2): - val = gdic.wxDC_DrawText(self.this,arg0,arg1,arg2) - return val - def EndDoc(self): - val = gdic.wxDC_EndDoc(self.this) - return val - def EndDrawing(self): - val = gdic.wxDC_EndDrawing(self.this) - return val - def EndPage(self): - val = gdic.wxDC_EndPage(self.this) - return val - def FloodFill(self,arg0,arg1,arg2,*args): - val = apply(gdic.wxDC_FloodFill,(self.this,arg0,arg1,arg2.this,)+args) - return val - def GetBackground(self): - val = gdic.wxDC_GetBackground(self.this) - val = wxBrushPtr(val) - return val - def GetBrush(self): - val = gdic.wxDC_GetBrush(self.this) - val = wxBrushPtr(val) - return val - def GetCharHeight(self): - val = gdic.wxDC_GetCharHeight(self.this) - return val - def GetCharWidth(self): - val = gdic.wxDC_GetCharWidth(self.this) - return val - def GetClippingBox(self): - val = gdic.wxDC_GetClippingBox(self.this) - return val - def GetFont(self): - val = gdic.wxDC_GetFont(self.this) - val = wxFontPtr(val) - return val - def GetLogicalFunction(self): - val = gdic.wxDC_GetLogicalFunction(self.this) - return val - def GetMapMode(self): - val = gdic.wxDC_GetMapMode(self.this) - return val - def GetOptimization(self): - val = gdic.wxDC_GetOptimization(self.this) - return val - def GetPen(self): - val = gdic.wxDC_GetPen(self.this) - val = wxPenPtr(val) - return val - def GetPixel(self,arg0,arg1): - val = gdic.wxDC_GetPixel(self.this,arg0,arg1) - val = wxColourPtr(val) - val.thisown = 1 - return val - def GetSize(self): - val = gdic.wxDC_GetSize(self.this) - return val - def GetTextBackground(self): - val = gdic.wxDC_GetTextBackground(self.this) - val = wxColourPtr(val) - return val - def GetTextExtent(self,arg0): - val = gdic.wxDC_GetTextExtent(self.this,arg0) - return val - def GetTextForeground(self): - val = gdic.wxDC_GetTextForeground(self.this) - val = wxColourPtr(val) - return val - def LogicalToDeviceX(self,arg0): - val = gdic.wxDC_LogicalToDeviceX(self.this,arg0) - return val - def LogicalToDeviceXRel(self,arg0): - val = gdic.wxDC_LogicalToDeviceXRel(self.this,arg0) - return val - def LogicalToDeviceY(self,arg0): - val = gdic.wxDC_LogicalToDeviceY(self.this,arg0) - return val - def LogicalToDeviceYRel(self,arg0): - val = gdic.wxDC_LogicalToDeviceYRel(self.this,arg0) - return val - def MaxX(self): - val = gdic.wxDC_MaxX(self.this) - return val - def MaxY(self): - val = gdic.wxDC_MaxY(self.this) - return val - def MinX(self): - val = gdic.wxDC_MinX(self.this) - return val - def MinY(self): - val = gdic.wxDC_MinY(self.this) - return val - def Ok(self): - val = gdic.wxDC_Ok(self.this) - return val - def SetDeviceOrigin(self,arg0,arg1): - val = gdic.wxDC_SetDeviceOrigin(self.this,arg0,arg1) - return val - def SetBackground(self,arg0): - val = gdic.wxDC_SetBackground(self.this,arg0.this) - return val - def SetBackgroundMode(self,arg0): - val = gdic.wxDC_SetBackgroundMode(self.this,arg0) - return val - def SetClippingRegion(self,arg0,arg1,arg2,arg3): - val = gdic.wxDC_SetClippingRegion(self.this,arg0,arg1,arg2,arg3) - return val - def SetPalette(self,arg0): - val = gdic.wxDC_SetPalette(self.this,arg0) - return val - def SetBrush(self,arg0): - val = gdic.wxDC_SetBrush(self.this,arg0.this) - return val - def SetFont(self,arg0): - val = gdic.wxDC_SetFont(self.this,arg0.this) - return val - def SetLogicalFunction(self,arg0): - val = gdic.wxDC_SetLogicalFunction(self.this,arg0) - return val - def SetMapMode(self,arg0): - val = gdic.wxDC_SetMapMode(self.this,arg0) - return val - def SetOptimization(self,arg0): - val = gdic.wxDC_SetOptimization(self.this,arg0) - return val - def SetPen(self,arg0): - val = gdic.wxDC_SetPen(self.this,arg0.this) - return val - def SetTextBackground(self,arg0): - val = gdic.wxDC_SetTextBackground(self.this,arg0.this) - return val - def SetTextForeground(self,arg0): - val = gdic.wxDC_SetTextForeground(self.this,arg0.this) - return val - def SetUserScale(self,arg0,arg1): - val = gdic.wxDC_SetUserScale(self.this,arg0,arg1) - return val - def StartDoc(self,arg0): - val = gdic.wxDC_StartDoc(self.this,arg0) - return val - def StartPage(self): - val = gdic.wxDC_StartPage(self.this) - return val - def DrawBitmap(self,arg0,arg1,arg2,*args): - val = apply(gdic.wxDC_DrawBitmap,(self.this,arg0.this,arg1,arg2,)+args) - return val - def __repr__(self): - return "" -class wxDC(wxDCPtr): - def __init__(self,this): - self.this = this - - - - -class wxMemoryDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def SelectObject(self,arg0): - val = gdic.wxMemoryDC_SelectObject(self.this,arg0.this) - return val - def __repr__(self): - return "" -class wxMemoryDC(wxMemoryDCPtr): - def __init__(self) : - self.this = gdic.new_wxMemoryDC() - self.thisown = 1 - - - - -class wxScreenDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def StartDrawingOnTop(self,arg0): - val = gdic.wxScreenDC_StartDrawingOnTop(self.this,arg0.this) - return val - def StartDrawingOnTopRect(self,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(gdic.wxScreenDC_StartDrawingOnTopRect,(self.this,)+args) - return val - def EndDrawingOnTop(self): - val = gdic.wxScreenDC_EndDrawingOnTop(self.this) - return val - def __repr__(self): - return "" -class wxScreenDC(wxScreenDCPtr): - def __init__(self) : - self.this = gdic.new_wxScreenDC() - self.thisown = 1 - - - - -class wxClientDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxClientDC(wxClientDCPtr): - def __init__(self,arg0) : - self.this = gdic.new_wxClientDC(arg0.this) - self.thisown = 1 - - - - -class wxPaintDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxPaintDC(wxPaintDCPtr): - def __init__(self,arg0) : - self.this = gdic.new_wxPaintDC(arg0.this) - self.thisown = 1 - - - - -class wxPostScriptDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxPostScriptDC(wxPostScriptDCPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(gdic.new_wxPostScriptDC,(arg0,)+args) - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - -def wxEmptyBitmap(arg0,arg1,*args): - val = apply(gdic.wxEmptyBitmap,(arg0,arg1,)+args) - val = wxBitmapPtr(val) - val.thisown = 1 - return val - -def wxNoRefBitmap(arg0,arg1): - val = gdic.wxNoRefBitmap(arg0,arg1) - val = wxBitmapPtr(val) - return val - -def wxMaskColour(arg0,arg1): - val = gdic.wxMaskColour(arg0.this,arg1.this) - val = wxMaskPtr(val) - val.thisown = 1 - return val - -def wxStockCursor(arg0): - val = gdic.wxStockCursor(arg0) - val = wxCursorPtr(val) - val.thisown = 1 - return val - -def wxNamedColour(arg0): - val = gdic.wxNamedColour(arg0) - val = wxColourPtr(val) - val.thisown = 1 - return val - -def wxMemoryDCFromDC(arg0): - val = gdic.wxMemoryDCFromDC(arg0.this) - val = wxMemoryDCPtr(val) - val.thisown = 1 - return val - - - -#-------------- VARIABLE WRAPPERS ------------------ - -cvar = gdic.cvar -wxNORMAL_FONT = wxFontPtr(gdic.cvar.wxNORMAL_FONT) -wxSMALL_FONT = wxFontPtr(gdic.cvar.wxSMALL_FONT) -wxITALIC_FONT = wxFontPtr(gdic.cvar.wxITALIC_FONT) -wxSWISS_FONT = wxFontPtr(gdic.cvar.wxSWISS_FONT) -wxRED_PEN = wxPenPtr(gdic.cvar.wxRED_PEN) -wxCYAN_PEN = wxPenPtr(gdic.cvar.wxCYAN_PEN) -wxGREEN_PEN = wxPenPtr(gdic.cvar.wxGREEN_PEN) -wxBLACK_PEN = wxPenPtr(gdic.cvar.wxBLACK_PEN) -wxWHITE_PEN = wxPenPtr(gdic.cvar.wxWHITE_PEN) -wxTRANSPARENT_PEN = wxPenPtr(gdic.cvar.wxTRANSPARENT_PEN) -wxBLACK_DASHED_PEN = wxPenPtr(gdic.cvar.wxBLACK_DASHED_PEN) -wxGREY_PEN = wxPenPtr(gdic.cvar.wxGREY_PEN) -wxMEDIUM_GREY_PEN = wxPenPtr(gdic.cvar.wxMEDIUM_GREY_PEN) -wxLIGHT_GREY_PEN = wxPenPtr(gdic.cvar.wxLIGHT_GREY_PEN) -wxBLUE_BRUSH = wxBrushPtr(gdic.cvar.wxBLUE_BRUSH) -wxGREEN_BRUSH = wxBrushPtr(gdic.cvar.wxGREEN_BRUSH) -wxWHITE_BRUSH = wxBrushPtr(gdic.cvar.wxWHITE_BRUSH) -wxBLACK_BRUSH = wxBrushPtr(gdic.cvar.wxBLACK_BRUSH) -wxTRANSPARENT_BRUSH = wxBrushPtr(gdic.cvar.wxTRANSPARENT_BRUSH) -wxCYAN_BRUSH = wxBrushPtr(gdic.cvar.wxCYAN_BRUSH) -wxRED_BRUSH = wxBrushPtr(gdic.cvar.wxRED_BRUSH) -wxGREY_BRUSH = wxBrushPtr(gdic.cvar.wxGREY_BRUSH) -wxMEDIUM_GREY_BRUSH = wxBrushPtr(gdic.cvar.wxMEDIUM_GREY_BRUSH) -wxLIGHT_GREY_BRUSH = wxBrushPtr(gdic.cvar.wxLIGHT_GREY_BRUSH) -wxBLACK = wxColourPtr(gdic.cvar.wxBLACK) -wxWHITE = wxColourPtr(gdic.cvar.wxWHITE) -wxRED = wxColourPtr(gdic.cvar.wxRED) -wxBLUE = wxColourPtr(gdic.cvar.wxBLUE) -wxGREEN = wxColourPtr(gdic.cvar.wxGREEN) -wxCYAN = wxColourPtr(gdic.cvar.wxCYAN) -wxLIGHT_GREY = wxColourPtr(gdic.cvar.wxLIGHT_GREY) -wxSTANDARD_CURSOR = wxCursorPtr(gdic.cvar.wxSTANDARD_CURSOR) -wxHOURGLASS_CURSOR = wxCursorPtr(gdic.cvar.wxHOURGLASS_CURSOR) -wxCROSS_CURSOR = wxCursorPtr(gdic.cvar.wxCROSS_CURSOR) -wxNullBitmap = wxBitmapPtr(gdic.cvar.wxNullBitmap) -wxNullIcon = wxIconPtr(gdic.cvar.wxNullIcon) -wxNullCursor = wxCursorPtr(gdic.cvar.wxNullCursor) -wxNullPen = wxPenPtr(gdic.cvar.wxNullPen) -wxNullBrush = wxBrushPtr(gdic.cvar.wxNullBrush) -wxNullFont = wxFontPtr(gdic.cvar.wxNullFont) -wxNullColour = wxColourPtr(gdic.cvar.wxNullColour) diff --git a/utils/wxPython/src/gtk/mdi.cpp b/utils/wxPython/src/gtk/mdi.cpp deleted file mode 100644 index 9c232cc60e..0000000000 --- a/utils/wxPython/src/gtk/mdi.cpp +++ /dev/null @@ -1,863 +0,0 @@ -/* - * FILE : gtk/mdi.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif - -#define SWIG_init initmdic - -#define SWIG_name "mdic" - -#include "helpers.h" - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; -static void *SwigwxMDIParentFrameTowxFrame(void *ptr) { - wxMDIParentFrame *src; - wxFrame *dest; - src = (wxMDIParentFrame *) ptr; - dest = (wxFrame *) src; - return (void *) dest; -} - -static void *SwigwxMDIParentFrameTowxWindow(void *ptr) { - wxMDIParentFrame *src; - wxWindow *dest; - src = (wxMDIParentFrame *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxMDIParentFrameTowxEvtHandler(void *ptr) { - wxMDIParentFrame *src; - wxEvtHandler *dest; - src = (wxMDIParentFrame *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxMDIParentFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxMDIParentFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxMDIParentFrame(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIParentFrame * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = (wxDEFAULT_FRAME_STYLE)|(wxVSCROLL)|(wxHSCROLL); - char * _arg6 = "frame"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|ssls:new_wxMDIParentFrame",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxMDIParentFrame. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxMDIParentFrame. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxMDIParentFrame. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxMDIParentFrame *)new_wxMDIParentFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMDIParentFrame_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxMDIParentFrame_ActivateNext(_swigobj) (_swigobj->ActivateNext()) -static PyObject *_wrap_wxMDIParentFrame_ActivateNext(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIParentFrame * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIParentFrame_ActivateNext",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_ActivateNext. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - wxMDIParentFrame_ActivateNext(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMDIParentFrame_ActivatePrevious(_swigobj) (_swigobj->ActivatePrevious()) -static PyObject *_wrap_wxMDIParentFrame_ActivatePrevious(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIParentFrame * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIParentFrame_ActivatePrevious",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_ActivatePrevious. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - wxMDIParentFrame_ActivatePrevious(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMDIParentFrame_ArrangeIcons(_swigobj) (_swigobj->ArrangeIcons()) -static PyObject *_wrap_wxMDIParentFrame_ArrangeIcons(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIParentFrame * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIParentFrame_ArrangeIcons",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_ArrangeIcons. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - wxMDIParentFrame_ArrangeIcons(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMDIParentFrame_Cascade(_swigobj) (_swigobj->Cascade()) -static PyObject *_wrap_wxMDIParentFrame_Cascade(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIParentFrame * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIParentFrame_Cascade",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_Cascade. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - wxMDIParentFrame_Cascade(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMDIParentFrame_GetClientSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetClientSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMDIParentFrame_GetClientSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIParentFrame * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxMDIParentFrame_GetClientSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_GetClientSize. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - wxMDIParentFrame_GetClientSize(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxMDIParentFrame_GetActiveChild(_swigobj) (_swigobj->GetActiveChild()) -static PyObject *_wrap_wxMDIParentFrame_GetActiveChild(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIChildFrame * _result; - wxMDIParentFrame * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIParentFrame_GetActiveChild",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_GetActiveChild. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - _result = (wxMDIChildFrame *)wxMDIParentFrame_GetActiveChild(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMDIChildFrame_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMDIParentFrame_GetClientWindow(_swigobj) (_swigobj->GetClientWindow()) -static PyObject *_wrap_wxMDIParentFrame_GetClientWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIClientWindow * _result; - wxMDIParentFrame * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIParentFrame_GetClientWindow",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_GetClientWindow. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - _result = (wxMDIClientWindow *)wxMDIParentFrame_GetClientWindow(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMDIClientWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMDIParentFrame_GetToolBar(_swigobj) (_swigobj->GetToolBar()) -static PyObject *_wrap_wxMDIParentFrame_GetToolBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - wxMDIParentFrame * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIParentFrame_GetToolBar",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_GetToolBar. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - _result = (wxWindow *)wxMDIParentFrame_GetToolBar(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMDIParentFrame_Tile(_swigobj) (_swigobj->Tile()) -static PyObject *_wrap_wxMDIParentFrame_Tile(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIParentFrame * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIParentFrame_Tile",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_Tile. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - wxMDIParentFrame_Tile(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxMDIChildFrameTowxFrame(void *ptr) { - wxMDIChildFrame *src; - wxFrame *dest; - src = (wxMDIChildFrame *) ptr; - dest = (wxFrame *) src; - return (void *) dest; -} - -static void *SwigwxMDIChildFrameTowxWindow(void *ptr) { - wxMDIChildFrame *src; - wxWindow *dest; - src = (wxMDIChildFrame *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxMDIChildFrameTowxEvtHandler(void *ptr) { - wxMDIChildFrame *src; - wxEvtHandler *dest; - src = (wxMDIChildFrame *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxMDIChildFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxMDIChildFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxMDIChildFrame(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIChildFrame * _result; - wxMDIParentFrame * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = (wxDEFAULT_FRAME_STYLE); - char * _arg6 = "frame"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|ssls:new_wxMDIChildFrame",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxMDIChildFrame. Expected _wxMDIParentFrame_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxMDIChildFrame. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxMDIChildFrame. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxMDIChildFrame *)new_wxMDIChildFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMDIChildFrame_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxMDIChildFrame_Activate(_swigobj) (_swigobj->Activate()) -static PyObject *_wrap_wxMDIChildFrame_Activate(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIChildFrame * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIChildFrame_Activate",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIChildFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIChildFrame_Activate. Expected _wxMDIChildFrame_p."); - return NULL; - } - } - wxMDIChildFrame_Activate(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMDIChildFrame_Maximize(_swigobj) (_swigobj->Maximize()) -static PyObject *_wrap_wxMDIChildFrame_Maximize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIChildFrame * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIChildFrame_Maximize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIChildFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIChildFrame_Maximize. Expected _wxMDIChildFrame_p."); - return NULL; - } - } - wxMDIChildFrame_Maximize(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMDIChildFrame_Restore(_swigobj) (_swigobj->Restore()) -static PyObject *_wrap_wxMDIChildFrame_Restore(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIChildFrame * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIChildFrame_Restore",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIChildFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIChildFrame_Restore. Expected _wxMDIChildFrame_p."); - return NULL; - } - } - wxMDIChildFrame_Restore(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMDIChildFrame_SetMenuBar(_swigobj,_swigarg0) (_swigobj->SetMenuBar(_swigarg0)) -static PyObject *_wrap_wxMDIChildFrame_SetMenuBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIChildFrame * _arg0; - wxMenuBar * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxMDIChildFrame_SetMenuBar",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIChildFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIChildFrame_SetMenuBar. Expected _wxMDIChildFrame_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMDIChildFrame_SetMenuBar. Expected _wxMenuBar_p."); - return NULL; - } - } - wxMDIChildFrame_SetMenuBar(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMDIChildFrame_SetClientSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetClientSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMDIChildFrame_SetClientSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIChildFrame * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxMDIChildFrame_SetClientSize",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIChildFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIChildFrame_SetClientSize. Expected _wxMDIChildFrame_p."); - return NULL; - } - } - wxMDIChildFrame_SetClientSize(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMDIChildFrame_GetPosition(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetPosition(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMDIChildFrame_GetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIChildFrame * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxMDIChildFrame_GetPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIChildFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIChildFrame_GetPosition. Expected _wxMDIChildFrame_p."); - return NULL; - } - } - wxMDIChildFrame_GetPosition(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -static void *SwigwxMDIClientWindowTowxWindow(void *ptr) { - wxMDIClientWindow *src; - wxWindow *dest; - src = (wxMDIClientWindow *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxMDIClientWindowTowxEvtHandler(void *ptr) { - wxMDIClientWindow *src; - wxEvtHandler *dest; - src = (wxMDIClientWindow *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxMDIClientWindow(_swigarg0,_swigarg1) (new wxMDIClientWindow(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxMDIClientWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIClientWindow * _result; - wxMDIParentFrame * _arg0; - long _arg1 = 0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|l:new_wxMDIClientWindow",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxMDIClientWindow. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - _result = (wxMDIClientWindow *)new_wxMDIClientWindow(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMDIClientWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyMethodDef mdicMethods[] = { - { "new_wxMDIClientWindow", _wrap_new_wxMDIClientWindow, 1 }, - { "wxMDIChildFrame_GetPosition", _wrap_wxMDIChildFrame_GetPosition, 1 }, - { "wxMDIChildFrame_SetClientSize", _wrap_wxMDIChildFrame_SetClientSize, 1 }, - { "wxMDIChildFrame_SetMenuBar", _wrap_wxMDIChildFrame_SetMenuBar, 1 }, - { "wxMDIChildFrame_Restore", _wrap_wxMDIChildFrame_Restore, 1 }, - { "wxMDIChildFrame_Maximize", _wrap_wxMDIChildFrame_Maximize, 1 }, - { "wxMDIChildFrame_Activate", _wrap_wxMDIChildFrame_Activate, 1 }, - { "new_wxMDIChildFrame", _wrap_new_wxMDIChildFrame, 1 }, - { "wxMDIParentFrame_Tile", _wrap_wxMDIParentFrame_Tile, 1 }, - { "wxMDIParentFrame_GetToolBar", _wrap_wxMDIParentFrame_GetToolBar, 1 }, - { "wxMDIParentFrame_GetClientWindow", _wrap_wxMDIParentFrame_GetClientWindow, 1 }, - { "wxMDIParentFrame_GetActiveChild", _wrap_wxMDIParentFrame_GetActiveChild, 1 }, - { "wxMDIParentFrame_GetClientSize", _wrap_wxMDIParentFrame_GetClientSize, 1 }, - { "wxMDIParentFrame_Cascade", _wrap_wxMDIParentFrame_Cascade, 1 }, - { "wxMDIParentFrame_ArrangeIcons", _wrap_wxMDIParentFrame_ArrangeIcons, 1 }, - { "wxMDIParentFrame_ActivatePrevious", _wrap_wxMDIParentFrame_ActivatePrevious, 1 }, - { "wxMDIParentFrame_ActivateNext", _wrap_wxMDIParentFrame_ActivateNext, 1 }, - { "new_wxMDIParentFrame", _wrap_new_wxMDIParentFrame, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initmdic)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("mdic", mdicMethods); - d = PyModule_GetDict(m); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMDIClientWindow",SwigwxMDIClientWindowTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxMDIClientWindow",SwigwxMDIClientWindowTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxMDIChildFrame",SwigwxMDIChildFrameTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxMDIParentFrame",SwigwxMDIParentFrameTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxEvtHandler",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); - SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); - SWIG_RegisterMapping("_wxPen","_class_wxPen",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_long","_wxDash",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_wxDC","_class_wxDC",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_class_wxMenuItem","_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxPanel","_class_wxPanel",0); - SWIG_RegisterMapping("_class_wxMask","_wxMask",0); - SWIG_RegisterMapping("_wxColour","_class_wxColour",0); - SWIG_RegisterMapping("_class_wxDialog","_wxDialog",0); - SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxMDIChildFrame","_class_wxMDIChildFrame",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_wxFont","_class_wxFont",0); - SWIG_RegisterMapping("_unsigned_long","_wxDash",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxDC","_wxDC",0); - SWIG_RegisterMapping("_wxMDIParentFrame","_class_wxMDIParentFrame",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_class_wxPanel","_wxPanel",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxMenu","_class_wxMenu",0); - SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxMDIChildFrame","_wxMDIChildFrame",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_class_wxMDIClientWindow","_wxMDIClientWindow",0); - SWIG_RegisterMapping("_class_wxBrush","_wxBrush",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxWindow","_class_wxMDIClientWindow",SwigwxMDIClientWindowTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxMDIClientWindow",SwigwxMDIClientWindowTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxMDIChildFrame",SwigwxMDIChildFrameTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxMDIParentFrame",SwigwxMDIParentFrameTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxWindow",0); - SWIG_RegisterMapping("_class_wxFont","_wxFont",0); - SWIG_RegisterMapping("_wxClientDC","_class_wxClientDC",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_wxMemoryDC","_class_wxMemoryDC",0); - SWIG_RegisterMapping("_wxPaintDC","_class_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); - SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_class_wxMenu","_wxMenu",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); - SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); - SWIG_RegisterMapping("_class_wxPen","_wxPen",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_wxFrame","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxFrame); - SWIG_RegisterMapping("_wxFrame","_wxMDIChildFrame",SwigwxMDIChildFrameTowxFrame); - SWIG_RegisterMapping("_wxFrame","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxFrame); - SWIG_RegisterMapping("_wxFrame","_wxMDIParentFrame",SwigwxMDIParentFrameTowxFrame); - SWIG_RegisterMapping("_wxFrame","_class_wxFrame",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxMDIParentFrame","_wxMDIParentFrame",0); - SWIG_RegisterMapping("_class_wxPaintDC","_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_class_wxIcon","_wxIcon",0); - SWIG_RegisterMapping("_class_wxColour","_wxColour",0); - SWIG_RegisterMapping("_class_wxScreenDC","_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxClientDC","_wxClientDC",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); - SWIG_RegisterMapping("_class_wxBitmap","_wxBitmap",0); - SWIG_RegisterMapping("_class_wxMemoryDC","_wxMemoryDC",0); - SWIG_RegisterMapping("_wxMenuBar","_class_wxMenuBar",0); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxMDIClientWindow",SwigwxMDIClientWindowTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxMDIClientWindow",SwigwxMDIClientWindowTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxMDIChildFrame",SwigwxMDIChildFrameTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxMDIParentFrame",SwigwxMDIParentFrameTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxEvtHandler",0); - SWIG_RegisterMapping("_wxMenuItem","_class_wxMenuItem",0); - SWIG_RegisterMapping("_wxDash","_unsigned_long",0); - SWIG_RegisterMapping("_wxDash","_long",0); - SWIG_RegisterMapping("_class_wxScrolledWindow","_wxScrolledWindow",0); - SWIG_RegisterMapping("_wxMDIClientWindow","_class_wxMDIClientWindow",0); - SWIG_RegisterMapping("_wxWindow","_class_wxMDIClientWindow",SwigwxMDIClientWindowTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxMDIClientWindow",SwigwxMDIClientWindowTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxMDIChildFrame",SwigwxMDIChildFrameTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxMDIParentFrame",SwigwxMDIParentFrameTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxWindow",0); - SWIG_RegisterMapping("_class_wxFrame","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxFrame); - SWIG_RegisterMapping("_class_wxFrame","_wxMDIChildFrame",SwigwxMDIChildFrameTowxFrame); - SWIG_RegisterMapping("_class_wxFrame","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxFrame); - SWIG_RegisterMapping("_class_wxFrame","_wxMDIParentFrame",SwigwxMDIParentFrameTowxFrame); - SWIG_RegisterMapping("_class_wxFrame","_wxFrame",0); -} diff --git a/utils/wxPython/src/gtk/mdi.py b/utils/wxPython/src/gtk/mdi.py deleted file mode 100644 index fad0e58dcc..0000000000 --- a/utils/wxPython/src/gtk/mdi.py +++ /dev/null @@ -1,118 +0,0 @@ -# This file was created automatically by SWIG. -import mdic - -from misc import * - -from windows import * - -from gdi import * -class wxMDIParentFramePtr(wxFramePtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def ActivateNext(self): - val = mdic.wxMDIParentFrame_ActivateNext(self.this) - return val - def ActivatePrevious(self): - val = mdic.wxMDIParentFrame_ActivatePrevious(self.this) - return val - def ArrangeIcons(self): - val = mdic.wxMDIParentFrame_ArrangeIcons(self.this) - return val - def Cascade(self): - val = mdic.wxMDIParentFrame_Cascade(self.this) - return val - def GetClientSize(self): - val = mdic.wxMDIParentFrame_GetClientSize(self.this) - return val - def GetActiveChild(self): - val = mdic.wxMDIParentFrame_GetActiveChild(self.this) - val = wxMDIChildFramePtr(val) - return val - def GetClientWindow(self): - val = mdic.wxMDIParentFrame_GetClientWindow(self.this) - val = wxMDIClientWindowPtr(val) - return val - def GetToolBar(self): - val = mdic.wxMDIParentFrame_GetToolBar(self.this) - val = wxWindowPtr(val) - return val - def Tile(self): - val = mdic.wxMDIParentFrame_Tile(self.this) - return val - def __repr__(self): - return "" -class wxMDIParentFrame(wxMDIParentFramePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(mdic.new_wxMDIParentFrame,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxMDIChildFramePtr(wxFramePtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Activate(self): - val = mdic.wxMDIChildFrame_Activate(self.this) - return val - def Maximize(self): - val = mdic.wxMDIChildFrame_Maximize(self.this) - return val - def Restore(self): - val = mdic.wxMDIChildFrame_Restore(self.this) - return val - def SetMenuBar(self,arg0): - val = mdic.wxMDIChildFrame_SetMenuBar(self.this,arg0.this) - return val - def SetClientSize(self,arg0,arg1): - val = mdic.wxMDIChildFrame_SetClientSize(self.this,arg0,arg1) - return val - def GetPosition(self): - val = mdic.wxMDIChildFrame_GetPosition(self.this) - return val - def __repr__(self): - return "" -class wxMDIChildFrame(wxMDIChildFramePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(mdic.new_wxMDIChildFrame,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxMDIClientWindowPtr(wxWindowPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxMDIClientWindow(wxMDIClientWindowPtr): - def __init__(self,arg0,*args) : - self.this = apply(mdic.new_wxMDIClientWindow,(arg0.this,)+args) - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - - - -#-------------- VARIABLE WRAPPERS ------------------ - diff --git a/utils/wxPython/src/gtk/misc.cpp b/utils/wxPython/src/gtk/misc.cpp deleted file mode 100644 index 00f3d77f00..0000000000 --- a/utils/wxPython/src/gtk/misc.cpp +++ /dev/null @@ -1,2702 +0,0 @@ -/* - * FILE : gtk/misc.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif - -#define SWIG_init initmiscc - -#define SWIG_name "miscc" - -#include "helpers.h" -#include - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; - - char* wxGetResource(char *section, char *entry, char *file = NULL) { - char * retval; - wxGetResource(section, entry, &retval, file); - return retval; - } -static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args) { - PyObject * _resultobj; - char * _result; - char * _arg0; - char * _arg1 = NULL; - char * _arg2 = NULL; - char * _arg3 = NULL; - char * _arg4 = "*.*"; - int _arg5 = 0; - wxWindow * _arg6 = NULL; - int _arg7 = -1; - int _arg8 = -1; - char * _argc6 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|ssssisii:wxFileSelector",&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_argc6,&_arg7,&_arg8)) - return NULL; - if (_argc6) { - if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxFileSelector. Expected _wxWindow_p."); - return NULL; - } - } - _result = (char *)wxFileSelector(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8); - _resultobj = Py_BuildValue("s", _result); - return _resultobj; -} - -static PyObject *_wrap_wxGetTextFromUser(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxString * _arg0; - wxString * _arg1 = &wxPyEmptyStr; - wxString * _arg2 = &wxPyEmptyStr; - wxWindow * _arg3 = NULL; - int _arg4 = -1; - int _arg5 = -1; - bool _arg6 = (1); - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - int tempbool6; - - self = self; - if(!PyArg_ParseTuple(args,"O|OOsiii:wxGetTextFromUser",&_obj0,&_obj1,&_obj2,&_argc3,&_arg4,&_arg5,&tempbool6)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - if (_obj1) -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - if (_obj2) -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGetTextFromUser. Expected _wxWindow_p."); - return NULL; - } - } - _arg6 = (bool ) tempbool6; - _result = new wxString (wxGetTextFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} -{ - if (_obj2) - delete _arg2; -} -{ - delete _result; -} - return _resultobj; -} - -static PyObject *_wrap_wxGetSingleChoice(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxString * _arg0; - wxString * _arg1; - int _arg2; - wxString * _arg3; - wxWindow * _arg4 = NULL; - int _arg5 = -1; - int _arg6 = -1; - bool _arg7 = (1); - int _arg8 = 150; - int _arg9 = 200; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj3 = 0; - char * _argc4 = 0; - int tempbool7; - - self = self; - if(!PyArg_ParseTuple(args,"OOO|siiiii:wxGetSingleChoice",&_obj0,&_obj1,&_obj3,&_argc4,&_arg5,&_arg6,&tempbool7,&_arg8,&_arg9)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - if (_obj3) -{ - _arg3 = wxString_LIST_helper(_obj3); - if (_arg3 == NULL) { - return NULL; - } -} - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxGetSingleChoice. Expected _wxWindow_p."); - return NULL; - } - } - _arg7 = (bool ) tempbool7; -{ - _arg2 = PyList_Size(_obj3); -} - _result = new wxString (wxGetSingleChoice(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} -{ - delete [] _arg3; -} -{ - delete _result; -} - return _resultobj; -} - -static PyObject *_wrap_wxGetSingleChoiceIndex(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxString * _arg0; - wxString * _arg1; - int _arg2; - wxString * _arg3; - wxWindow * _arg4 = NULL; - int _arg5 = -1; - int _arg6 = -1; - bool _arg7 = (1); - int _arg8 = 150; - int _arg9 = 200; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj3 = 0; - char * _argc4 = 0; - int tempbool7; - - self = self; - if(!PyArg_ParseTuple(args,"OOO|siiiii:wxGetSingleChoiceIndex",&_obj0,&_obj1,&_obj3,&_argc4,&_arg5,&_arg6,&tempbool7,&_arg8,&_arg9)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - if (_obj3) -{ - _arg3 = wxString_LIST_helper(_obj3); - if (_arg3 == NULL) { - return NULL; - } -} - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxGetSingleChoiceIndex. Expected _wxWindow_p."); - return NULL; - } - } - _arg7 = (bool ) tempbool7; -{ - _arg2 = PyList_Size(_obj3); -} - _result = (int )wxGetSingleChoiceIndex(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} -{ - delete [] _arg3; -} - return _resultobj; -} - -static PyObject *_wrap_wxMessageBox(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxString * _arg0; - wxString * _arg1 = &wxPyEmptyStr; - int _arg2 = (wxOK)|(wxCENTRE); - wxWindow * _arg3 = NULL; - int _arg4 = -1; - int _arg5 = -1; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - char * _argc3 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O|Oisii:wxMessageBox",&_obj0,&_obj1,&_arg2,&_argc3,&_arg4,&_arg5)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - if (_obj1) -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxMessageBox. Expected _wxWindow_p."); - return NULL; - } - } - _result = (int )wxMessageBox(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static PyObject *_wrap_wxColourDisplay(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - - self = self; - if(!PyArg_ParseTuple(args,":wxColourDisplay")) - return NULL; - _result = (bool )wxColourDisplay(); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxDisplayDepth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - - self = self; - if(!PyArg_ParseTuple(args,":wxDisplayDepth")) - return NULL; - _result = (int )wxDisplayDepth(); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxSetCursor(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxCursor * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSetCursor",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCursor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursor. Expected _wxCursor_p."); - return NULL; - } - } - wxSetCursor(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_NewId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - - self = self; - if(!PyArg_ParseTuple(args,":NewId")) - return NULL; - _result = (long )NewId(); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -static PyObject *_wrap_RegisterId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _arg0; - - self = self; - if(!PyArg_ParseTuple(args,"l:RegisterId",&_arg0)) - return NULL; - RegisterId(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxBeginBusyCursor(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxCursor * _arg0 = wxHOURGLASS_CURSOR; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"|s:wxBeginBusyCursor",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCursor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBeginBusyCursor. Expected _wxCursor_p."); - return NULL; - } - } - wxBeginBusyCursor(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxBell(PyObject *self, PyObject *args) { - PyObject * _resultobj; - - self = self; - if(!PyArg_ParseTuple(args,":wxBell")) - return NULL; - wxBell(); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxDisplaySize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int * _arg0; - int temp; - int * _arg1; - int temp0; - - self = self; -{ - _arg0 = &temp; -} -{ - _arg1 = &temp0; -} - if(!PyArg_ParseTuple(args,":wxDisplaySize")) - return NULL; - wxDisplaySize(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg0)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -static PyObject *_wrap_wxEndBusyCursor(PyObject *self, PyObject *args) { - PyObject * _resultobj; - - self = self; - if(!PyArg_ParseTuple(args,":wxEndBusyCursor")) - return NULL; - wxEndBusyCursor(); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxExecute(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxString * _arg0; - bool _arg1 = (0); - PyObject * _obj0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"O|i:wxExecute",&_obj0,&tempbool1)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - _arg1 = (bool ) tempbool1; - _result = (long )wxExecute(*_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -static PyObject *_wrap_wxFindWindowByLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - wxString * _arg0; - wxWindow * _arg1 = NULL; - PyObject * _obj0 = 0; - char * _argc1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"O|s:wxFindWindowByLabel",&_obj0,&_argc1)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFindWindowByLabel. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxWindow *)wxFindWindowByLabel(*_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -static PyObject *_wrap_wxFindWindowByName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - wxString * _arg0; - wxWindow * _arg1 = NULL; - PyObject * _obj0 = 0; - char * _argc1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"O|s:wxFindWindowByName",&_obj0,&_argc1)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFindWindowByName. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxWindow *)wxFindWindowByName(*_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -static PyObject *_wrap_wxGetMousePosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int * _arg0; - int temp; - int * _arg1; - int temp0; - - self = self; -{ - _arg0 = &temp; -} -{ - _arg1 = &temp0; -} - if(!PyArg_ParseTuple(args,":wxGetMousePosition")) - return NULL; - wxGetMousePosition(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg0)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -static PyObject *_wrap_wxIsBusy(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - - self = self; - if(!PyArg_ParseTuple(args,":wxIsBusy")) - return NULL; - _result = (bool )wxIsBusy(); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxNow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - - self = self; - if(!PyArg_ParseTuple(args,":wxNow")) - return NULL; - _result = new wxString (wxNow()); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -static PyObject *_wrap_wxYield(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - - self = self; - if(!PyArg_ParseTuple(args,":wxYield")) - return NULL; - _result = (bool )wxYield(); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxGetResource(PyObject *self, PyObject *args) { - PyObject * _resultobj; - char * _result; - char * _arg0; - char * _arg1; - char * _arg2 = NULL; - - self = self; - if(!PyArg_ParseTuple(args,"ss|s:wxGetResource",&_arg0,&_arg1,&_arg2)) - return NULL; - _result = (char *)wxGetResource(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("s", _result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceAddIdentifier(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - char * _arg0; - int _arg1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxResourceAddIdentifier",&_arg0,&_arg1)) - return NULL; - _result = (bool )wxResourceAddIdentifier(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceClear(PyObject *self, PyObject *args) { - PyObject * _resultobj; - - self = self; - if(!PyArg_ParseTuple(args,":wxResourceClear")) - return NULL; - wxResourceClear(); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxResourceCreateBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - char * _arg0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxResourceCreateBitmap",&_arg0)) - return NULL; - _result = (wxBitmap *)wxResourceCreateBitmap(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxResourceCreateIcon(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIcon * _result; - char * _arg0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxResourceCreateIcon",&_arg0)) - return NULL; - _result = (wxIcon *)wxResourceCreateIcon(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIcon_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxResourceCreateMenuBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuBar * _result; - char * _arg0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxResourceCreateMenuBar",&_arg0)) - return NULL; - _result = (wxMenuBar *)wxResourceCreateMenuBar(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxResourceGetIdentifier(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - char * _arg0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxResourceGetIdentifier",&_arg0)) - return NULL; - _result = (int )wxResourceGetIdentifier(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceParseData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - char * _arg0; - wxResourceTable * _arg1 = NULL; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|s:wxResourceParseData",&_arg0,&_argc1)) - return NULL; - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxResourceTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseData. Expected _wxResourceTable_p."); - return NULL; - } - } - _result = (bool )wxResourceParseData(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceParseFile(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - char * _arg0; - wxResourceTable * _arg1 = NULL; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|s:wxResourceParseFile",&_arg0,&_argc1)) - return NULL; - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxResourceTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseFile. Expected _wxResourceTable_p."); - return NULL; - } - } - _result = (bool )wxResourceParseFile(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceParseString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - char * _arg0; - wxResourceTable * _arg1 = NULL; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|s:wxResourceParseString",&_arg0,&_argc1)) - return NULL; - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxResourceTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseString. Expected _wxResourceTable_p."); - return NULL; - } - } - _result = (bool )wxResourceParseString(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSize_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) -static PyObject *_wrap_wxSize_width_set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxSize * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxSize_width_set",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSize_width_set. Expected _wxSize_p."); - return NULL; - } - } - _result = (long )wxSize_x_set(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxSize_x_get(_swigobj) ((long ) _swigobj->x) -static PyObject *_wrap_wxSize_width_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxSize * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSize_width_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSize_width_get. Expected _wxSize_p."); - return NULL; - } - } - _result = (long )wxSize_x_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxSize_y_set(_swigobj,_swigval) (_swigobj->y = _swigval,_swigval) -static PyObject *_wrap_wxSize_height_set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxSize * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxSize_height_set",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSize_height_set. Expected _wxSize_p."); - return NULL; - } - } - _result = (long )wxSize_y_set(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxSize_y_get(_swigobj) ((long ) _swigobj->y) -static PyObject *_wrap_wxSize_height_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxSize * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSize_height_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSize_height_get. Expected _wxSize_p."); - return NULL; - } - } - _result = (long )wxSize_y_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define new_wxSize(_swigarg0,_swigarg1) (new wxSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSize * _result; - long _arg0 = 0; - long _arg1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"|ll:new_wxSize",&_arg0,&_arg1)) - return NULL; - _result = (wxSize *)new_wxSize(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxSize_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxSize(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSize * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxSize. Expected _wxSize_p."); - return NULL; - } - } - delete_wxSize(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSize_Set(_swigobj,_swigarg0,_swigarg1) (_swigobj->Set(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxSize_Set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSize * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxSize_Set",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSize_Set. Expected _wxSize_p."); - return NULL; - } - } - wxSize_Set(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSize_GetWidth(_swigobj) (_swigobj->GetX()) -static PyObject *_wrap_wxSize_GetWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxSize * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSize_GetWidth",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSize_GetWidth. Expected _wxSize_p."); - return NULL; - } - } - _result = (long )wxSize_GetWidth(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxSize_GetHeight(_swigobj) (_swigobj->GetY()) -static PyObject *_wrap_wxSize_GetHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxSize * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSize_GetHeight",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSize_GetHeight. Expected _wxSize_p."); - return NULL; - } - } - _result = (long )wxSize_GetHeight(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -static PyObject * wxSize___str__(wxSize *self) { - PyObject* tup = PyTuple_New(2); - PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x)); - PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y)); - return tup; - } -static PyObject *_wrap_wxSize___str__(PyObject *self, PyObject *args) { - PyObject * _resultobj; - PyObject * _result; - wxSize * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSize___str__",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSize___str__. Expected _wxSize_p."); - return NULL; - } - } - _result = (PyObject *)wxSize___str__(_arg0); -{ - _resultobj = _result; -} - return _resultobj; -} - -#define wxRealPoint_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) -static PyObject *_wrap_wxRealPoint_x_set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - double _result; - wxRealPoint * _arg0; - double _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sd:wxRealPoint_x_set",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRealPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRealPoint_x_set. Expected _wxRealPoint_p."); - return NULL; - } - } - _result = (double )wxRealPoint_x_set(_arg0,_arg1); - _resultobj = Py_BuildValue("d",_result); - return _resultobj; -} - -#define wxRealPoint_x_get(_swigobj) ((double ) _swigobj->x) -static PyObject *_wrap_wxRealPoint_x_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - double _result; - wxRealPoint * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRealPoint_x_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRealPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRealPoint_x_get. Expected _wxRealPoint_p."); - return NULL; - } - } - _result = (double )wxRealPoint_x_get(_arg0); - _resultobj = Py_BuildValue("d",_result); - return _resultobj; -} - -#define wxRealPoint_y_set(_swigobj,_swigval) (_swigobj->y = _swigval,_swigval) -static PyObject *_wrap_wxRealPoint_y_set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - double _result; - wxRealPoint * _arg0; - double _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sd:wxRealPoint_y_set",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRealPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRealPoint_y_set. Expected _wxRealPoint_p."); - return NULL; - } - } - _result = (double )wxRealPoint_y_set(_arg0,_arg1); - _resultobj = Py_BuildValue("d",_result); - return _resultobj; -} - -#define wxRealPoint_y_get(_swigobj) ((double ) _swigobj->y) -static PyObject *_wrap_wxRealPoint_y_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - double _result; - wxRealPoint * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRealPoint_y_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRealPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRealPoint_y_get. Expected _wxRealPoint_p."); - return NULL; - } - } - _result = (double )wxRealPoint_y_get(_arg0); - _resultobj = Py_BuildValue("d",_result); - return _resultobj; -} - -#define new_wxRealPoint(_swigarg0,_swigarg1) (new wxRealPoint(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxRealPoint(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRealPoint * _result; - double _arg0 = 0.0; - double _arg1 = 0.0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"|dd:new_wxRealPoint",&_arg0,&_arg1)) - return NULL; - _result = (wxRealPoint *)new_wxRealPoint(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxRealPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxRealPoint(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxRealPoint(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRealPoint * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxRealPoint",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRealPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxRealPoint. Expected _wxRealPoint_p."); - return NULL; - } - } - delete_wxRealPoint(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPoint_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) -static PyObject *_wrap_wxPoint_x_set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxPoint * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxPoint_x_set",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPoint_x_set. Expected _wxPoint_p."); - return NULL; - } - } - _result = (long )wxPoint_x_set(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxPoint_x_get(_swigobj) ((long ) _swigobj->x) -static PyObject *_wrap_wxPoint_x_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxPoint * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPoint_x_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPoint_x_get. Expected _wxPoint_p."); - return NULL; - } - } - _result = (long )wxPoint_x_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxPoint_y_set(_swigobj,_swigval) (_swigobj->y = _swigval,_swigval) -static PyObject *_wrap_wxPoint_y_set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxPoint * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxPoint_y_set",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPoint_y_set. Expected _wxPoint_p."); - return NULL; - } - } - _result = (long )wxPoint_y_set(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxPoint_y_get(_swigobj) ((long ) _swigobj->y) -static PyObject *_wrap_wxPoint_y_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxPoint * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPoint_y_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPoint_y_get. Expected _wxPoint_p."); - return NULL; - } - } - _result = (long )wxPoint_y_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define new_wxPoint(_swigarg0,_swigarg1) (new wxPoint(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxPoint(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - long _arg0 = 0; - long _arg1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"|ll:new_wxPoint",&_arg0,&_arg1)) - return NULL; - _result = (wxPoint *)new_wxPoint(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxPoint(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxPoint(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxPoint",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPoint. Expected _wxPoint_p."); - return NULL; - } - } - delete_wxPoint(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void wxPoint_Set(wxPoint *self,long x,long y) { - self->x = x; - self->y = y; - } -static PyObject *_wrap_wxPoint_Set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxPoint_Set",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPoint_Set. Expected _wxPoint_p."); - return NULL; - } - } - wxPoint_Set(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject * wxPoint___str__(wxPoint *self) { - PyObject* tup = PyTuple_New(2); - PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x)); - PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y)); - return tup; - } -static PyObject *_wrap_wxPoint___str__(PyObject *self, PyObject *args) { - PyObject * _resultobj; - PyObject * _result; - wxPoint * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPoint___str__",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPoint___str__. Expected _wxPoint_p."); - return NULL; - } - } - _result = (PyObject *)wxPoint___str__(_arg0); -{ - _resultobj = _result; -} - return _resultobj; -} - -#define new_wxRect(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxRect(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_new_wxRect(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRect * _result; - long _arg0 = 0; - long _arg1 = 0; - long _arg2 = 0; - long _arg3 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"|llll:new_wxRect",&_arg0,&_arg1,&_arg2,&_arg3)) - return NULL; - _result = (wxRect *)new_wxRect(_arg0,_arg1,_arg2,_arg3); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxRect_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxRect(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxRect(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxRect",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxRect. Expected _wxRect_p."); - return NULL; - } - } - delete_wxRect(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxRect_GetX(_swigobj) (_swigobj->GetX()) -static PyObject *_wrap_wxRect_GetX(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_GetX",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_GetX. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_GetX(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_SetX(_swigobj,_swigarg0) (_swigobj->SetX(_swigarg0)) -static PyObject *_wrap_wxRect_SetX(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRect * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxRect_SetX",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_SetX. Expected _wxRect_p."); - return NULL; - } - } - wxRect_SetX(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxRect_GetY(_swigobj) (_swigobj->GetY()) -static PyObject *_wrap_wxRect_GetY(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_GetY",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_GetY. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_GetY(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_SetY(_swigobj,_swigarg0) (_swigobj->SetY(_swigarg0)) -static PyObject *_wrap_wxRect_SetY(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRect * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxRect_SetY",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_SetY. Expected _wxRect_p."); - return NULL; - } - } - wxRect_SetY(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxRect_GetWidth(_swigobj) (_swigobj->GetWidth()) -static PyObject *_wrap_wxRect_GetWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_GetWidth",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_GetWidth. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_GetWidth(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_SetWidth(_swigobj,_swigarg0) (_swigobj->SetWidth(_swigarg0)) -static PyObject *_wrap_wxRect_SetWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRect * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxRect_SetWidth",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_SetWidth. Expected _wxRect_p."); - return NULL; - } - } - wxRect_SetWidth(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxRect_GetHeight(_swigobj) (_swigobj->GetHeight()) -static PyObject *_wrap_wxRect_GetHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_GetHeight",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_GetHeight. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_GetHeight(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_SetHeight(_swigobj,_swigarg0) (_swigobj->SetHeight(_swigarg0)) -static PyObject *_wrap_wxRect_SetHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRect * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxRect_SetHeight",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_SetHeight. Expected _wxRect_p."); - return NULL; - } - } - wxRect_SetHeight(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxRect_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxRect_GetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxRect * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_GetPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_GetPosition. Expected _wxRect_p."); - return NULL; - } - } - _result = new wxPoint (wxRect_GetPosition(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxRect_GetSize(_swigobj) (_swigobj->GetSize()) -static PyObject *_wrap_wxRect_GetSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSize * _result; - wxRect * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_GetSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_GetSize. Expected _wxRect_p."); - return NULL; - } - } - _result = new wxSize (wxRect_GetSize(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxRect_GetLeft(_swigobj) (_swigobj->GetLeft()) -static PyObject *_wrap_wxRect_GetLeft(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_GetLeft",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_GetLeft. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_GetLeft(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_GetTop(_swigobj) (_swigobj->GetTop()) -static PyObject *_wrap_wxRect_GetTop(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_GetTop",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_GetTop. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_GetTop(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_GetBottom(_swigobj) (_swigobj->GetBottom()) -static PyObject *_wrap_wxRect_GetBottom(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_GetBottom",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_GetBottom. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_GetBottom(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_GetRight(_swigobj) (_swigobj->GetRight()) -static PyObject *_wrap_wxRect_GetRight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_GetRight",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_GetRight. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_GetRight(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) -static PyObject *_wrap_wxRect_x_set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxRect_x_set",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_x_set. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_x_set(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_x_get(_swigobj) ((long ) _swigobj->x) -static PyObject *_wrap_wxRect_x_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_x_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_x_get. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_x_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_y_set(_swigobj,_swigval) (_swigobj->y = _swigval,_swigval) -static PyObject *_wrap_wxRect_y_set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxRect_y_set",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_y_set. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_y_set(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_y_get(_swigobj) ((long ) _swigobj->y) -static PyObject *_wrap_wxRect_y_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_y_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_y_get. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_y_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_width_set(_swigobj,_swigval) (_swigobj->width = _swigval,_swigval) -static PyObject *_wrap_wxRect_width_set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxRect_width_set",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_width_set. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_width_set(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_width_get(_swigobj) ((long ) _swigobj->width) -static PyObject *_wrap_wxRect_width_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_width_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_width_get. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_width_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_height_set(_swigobj,_swigval) (_swigobj->height = _swigval,_swigval) -static PyObject *_wrap_wxRect_height_set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxRect_height_set",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_height_set. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_height_set(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_height_get(_swigobj) ((long ) _swigobj->height) -static PyObject *_wrap_wxRect_height_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_height_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_height_get. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_height_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define new_wxPyTimer(_swigarg0) (new wxPyTimer(_swigarg0)) -static PyObject *_wrap_new_wxPyTimer(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyTimer * _result; - PyObject * _arg0; - PyObject * _obj0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"O:new_wxPyTimer",&_obj0)) - return NULL; -{ - _arg0 = _obj0; -} - _result = (wxPyTimer *)new_wxPyTimer(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyTimer_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxPyTimer(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxPyTimer(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyTimer * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxPyTimer",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyTimer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPyTimer. Expected _wxPyTimer_p."); - return NULL; - } - } - delete_wxPyTimer(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyTimer_Interval(_swigobj) (_swigobj->Interval()) -static PyObject *_wrap_wxPyTimer_Interval(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPyTimer * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyTimer_Interval",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyTimer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_Interval. Expected _wxPyTimer_p."); - return NULL; - } - } - _result = (int )wxPyTimer_Interval(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyTimer_Start(_swigobj,_swigarg0,_swigarg1) (_swigobj->Start(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxPyTimer_Start(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyTimer * _arg0; - int _arg1 = -1; - int _arg2 = (0); - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|ii:wxPyTimer_Start",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyTimer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_Start. Expected _wxPyTimer_p."); - return NULL; - } - } - wxPyTimer_Start(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyTimer_Stop(_swigobj) (_swigobj->Stop()) -static PyObject *_wrap_wxPyTimer_Stop(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyTimer * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyTimer_Stop",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyTimer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_Stop. Expected _wxPyTimer_p."); - return NULL; - } - } - wxPyTimer_Stop(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIndividualLayoutConstraint_Above(_swigobj,_swigarg0,_swigarg1) (_swigobj->Above(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxIndividualLayoutConstraint_Above(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _arg0; - wxWindow * _arg1; - int _arg2 = 0; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss|i:wxIndividualLayoutConstraint_Above",&_argc0,&_argc1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIndividualLayoutConstraint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIndividualLayoutConstraint_Above. Expected _wxIndividualLayoutConstraint_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxIndividualLayoutConstraint_Above. Expected _wxWindow_p."); - return NULL; - } - } - wxIndividualLayoutConstraint_Above(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIndividualLayoutConstraint_Absolute(_swigobj,_swigarg0) (_swigobj->Absolute(_swigarg0)) -static PyObject *_wrap_wxIndividualLayoutConstraint_Absolute(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxIndividualLayoutConstraint_Absolute",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIndividualLayoutConstraint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIndividualLayoutConstraint_Absolute. Expected _wxIndividualLayoutConstraint_p."); - return NULL; - } - } - wxIndividualLayoutConstraint_Absolute(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIndividualLayoutConstraint_AsIs(_swigobj) (_swigobj->AsIs()) -static PyObject *_wrap_wxIndividualLayoutConstraint_AsIs(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxIndividualLayoutConstraint_AsIs",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIndividualLayoutConstraint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIndividualLayoutConstraint_AsIs. Expected _wxIndividualLayoutConstraint_p."); - return NULL; - } - } - wxIndividualLayoutConstraint_AsIs(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIndividualLayoutConstraint_Below(_swigobj,_swigarg0,_swigarg1) (_swigobj->Below(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxIndividualLayoutConstraint_Below(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _arg0; - wxWindow * _arg1; - int _arg2 = 0; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss|i:wxIndividualLayoutConstraint_Below",&_argc0,&_argc1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIndividualLayoutConstraint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIndividualLayoutConstraint_Below. Expected _wxIndividualLayoutConstraint_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxIndividualLayoutConstraint_Below. Expected _wxWindow_p."); - return NULL; - } - } - wxIndividualLayoutConstraint_Below(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIndividualLayoutConstraint_Unconstrained(_swigobj) (_swigobj->Unconstrained()) -static PyObject *_wrap_wxIndividualLayoutConstraint_Unconstrained(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxIndividualLayoutConstraint_Unconstrained",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIndividualLayoutConstraint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIndividualLayoutConstraint_Unconstrained. Expected _wxIndividualLayoutConstraint_p."); - return NULL; - } - } - wxIndividualLayoutConstraint_Unconstrained(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIndividualLayoutConstraint_LeftOf(_swigobj,_swigarg0,_swigarg1) (_swigobj->LeftOf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxIndividualLayoutConstraint_LeftOf(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _arg0; - wxWindow * _arg1; - int _arg2 = 0; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss|i:wxIndividualLayoutConstraint_LeftOf",&_argc0,&_argc1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIndividualLayoutConstraint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIndividualLayoutConstraint_LeftOf. Expected _wxIndividualLayoutConstraint_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxIndividualLayoutConstraint_LeftOf. Expected _wxWindow_p."); - return NULL; - } - } - wxIndividualLayoutConstraint_LeftOf(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIndividualLayoutConstraint_PercentOf(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->PercentOf(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxIndividualLayoutConstraint_PercentOf(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _arg0; - wxWindow * _arg1; - wxEdge _arg2; - int _arg3; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ssii:wxIndividualLayoutConstraint_PercentOf",&_argc0,&_argc1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIndividualLayoutConstraint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIndividualLayoutConstraint_PercentOf. Expected _wxIndividualLayoutConstraint_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxIndividualLayoutConstraint_PercentOf. Expected _wxWindow_p."); - return NULL; - } - } - wxIndividualLayoutConstraint_PercentOf(_arg0,_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIndividualLayoutConstraint_RightOf(_swigobj,_swigarg0,_swigarg1) (_swigobj->RightOf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxIndividualLayoutConstraint_RightOf(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _arg0; - wxWindow * _arg1; - int _arg2 = 0; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss|i:wxIndividualLayoutConstraint_RightOf",&_argc0,&_argc1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIndividualLayoutConstraint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIndividualLayoutConstraint_RightOf. Expected _wxIndividualLayoutConstraint_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxIndividualLayoutConstraint_RightOf. Expected _wxWindow_p."); - return NULL; - } - } - wxIndividualLayoutConstraint_RightOf(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIndividualLayoutConstraint_SameAs(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SameAs(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxIndividualLayoutConstraint_SameAs(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _arg0; - wxWindow * _arg1; - wxEdge _arg2; - int _arg3 = 0; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ssi|i:wxIndividualLayoutConstraint_SameAs",&_argc0,&_argc1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIndividualLayoutConstraint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIndividualLayoutConstraint_SameAs. Expected _wxIndividualLayoutConstraint_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxIndividualLayoutConstraint_SameAs. Expected _wxWindow_p."); - return NULL; - } - } - wxIndividualLayoutConstraint_SameAs(_arg0,_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIndividualLayoutConstraint_Set(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->Set(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_wxIndividualLayoutConstraint_Set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _arg0; - wxRelationship _arg1; - wxWindow * _arg2; - wxEdge _arg3; - int _arg4 = 0; - int _arg5 = 0; - char * _argc0 = 0; - char * _argc2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sisi|ii:wxIndividualLayoutConstraint_Set",&_argc0,&_arg1,&_argc2,&_arg3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIndividualLayoutConstraint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIndividualLayoutConstraint_Set. Expected _wxIndividualLayoutConstraint_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxIndividualLayoutConstraint_Set. Expected _wxWindow_p."); - return NULL; - } - } - wxIndividualLayoutConstraint_Set(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define new_wxLayoutConstraints() (new wxLayoutConstraints()) -static PyObject *_wrap_new_wxLayoutConstraints(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxLayoutConstraints * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxLayoutConstraints")) - return NULL; - _result = (wxLayoutConstraints *)new_wxLayoutConstraints(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxLayoutConstraints_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxLayoutConstraints_bottom_get(_swigobj) (&_swigobj->bottom) -static PyObject *_wrap_wxLayoutConstraints_bottom_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _result; - wxLayoutConstraints * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxLayoutConstraints_bottom_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxLayoutConstraints_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLayoutConstraints_bottom_get. Expected _wxLayoutConstraints_p."); - return NULL; - } - } - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_bottom_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxLayoutConstraints_centreX_get(_swigobj) (&_swigobj->centreX) -static PyObject *_wrap_wxLayoutConstraints_centreX_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _result; - wxLayoutConstraints * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxLayoutConstraints_centreX_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxLayoutConstraints_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLayoutConstraints_centreX_get. Expected _wxLayoutConstraints_p."); - return NULL; - } - } - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_centreX_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxLayoutConstraints_centreY_get(_swigobj) (&_swigobj->centreY) -static PyObject *_wrap_wxLayoutConstraints_centreY_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _result; - wxLayoutConstraints * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxLayoutConstraints_centreY_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxLayoutConstraints_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLayoutConstraints_centreY_get. Expected _wxLayoutConstraints_p."); - return NULL; - } - } - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_centreY_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxLayoutConstraints_height_get(_swigobj) (&_swigobj->height) -static PyObject *_wrap_wxLayoutConstraints_height_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _result; - wxLayoutConstraints * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxLayoutConstraints_height_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxLayoutConstraints_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLayoutConstraints_height_get. Expected _wxLayoutConstraints_p."); - return NULL; - } - } - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_height_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxLayoutConstraints_left_get(_swigobj) (&_swigobj->left) -static PyObject *_wrap_wxLayoutConstraints_left_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _result; - wxLayoutConstraints * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxLayoutConstraints_left_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxLayoutConstraints_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLayoutConstraints_left_get. Expected _wxLayoutConstraints_p."); - return NULL; - } - } - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_left_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxLayoutConstraints_right_get(_swigobj) (&_swigobj->right) -static PyObject *_wrap_wxLayoutConstraints_right_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _result; - wxLayoutConstraints * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxLayoutConstraints_right_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxLayoutConstraints_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLayoutConstraints_right_get. Expected _wxLayoutConstraints_p."); - return NULL; - } - } - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_right_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxLayoutConstraints_top_get(_swigobj) (&_swigobj->top) -static PyObject *_wrap_wxLayoutConstraints_top_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _result; - wxLayoutConstraints * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxLayoutConstraints_top_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxLayoutConstraints_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLayoutConstraints_top_get. Expected _wxLayoutConstraints_p."); - return NULL; - } - } - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_top_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxLayoutConstraints_width_get(_swigobj) (&_swigobj->width) -static PyObject *_wrap_wxLayoutConstraints_width_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _result; - wxLayoutConstraints * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxLayoutConstraints_width_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxLayoutConstraints_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLayoutConstraints_width_get. Expected _wxLayoutConstraints_p."); - return NULL; - } - } - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_width_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyMethodDef misccMethods[] = { - { "wxLayoutConstraints_width_get", _wrap_wxLayoutConstraints_width_get, 1 }, - { "wxLayoutConstraints_top_get", _wrap_wxLayoutConstraints_top_get, 1 }, - { "wxLayoutConstraints_right_get", _wrap_wxLayoutConstraints_right_get, 1 }, - { "wxLayoutConstraints_left_get", _wrap_wxLayoutConstraints_left_get, 1 }, - { "wxLayoutConstraints_height_get", _wrap_wxLayoutConstraints_height_get, 1 }, - { "wxLayoutConstraints_centreY_get", _wrap_wxLayoutConstraints_centreY_get, 1 }, - { "wxLayoutConstraints_centreX_get", _wrap_wxLayoutConstraints_centreX_get, 1 }, - { "wxLayoutConstraints_bottom_get", _wrap_wxLayoutConstraints_bottom_get, 1 }, - { "new_wxLayoutConstraints", _wrap_new_wxLayoutConstraints, 1 }, - { "wxIndividualLayoutConstraint_Set", _wrap_wxIndividualLayoutConstraint_Set, 1 }, - { "wxIndividualLayoutConstraint_SameAs", _wrap_wxIndividualLayoutConstraint_SameAs, 1 }, - { "wxIndividualLayoutConstraint_RightOf", _wrap_wxIndividualLayoutConstraint_RightOf, 1 }, - { "wxIndividualLayoutConstraint_PercentOf", _wrap_wxIndividualLayoutConstraint_PercentOf, 1 }, - { "wxIndividualLayoutConstraint_LeftOf", _wrap_wxIndividualLayoutConstraint_LeftOf, 1 }, - { "wxIndividualLayoutConstraint_Unconstrained", _wrap_wxIndividualLayoutConstraint_Unconstrained, 1 }, - { "wxIndividualLayoutConstraint_Below", _wrap_wxIndividualLayoutConstraint_Below, 1 }, - { "wxIndividualLayoutConstraint_AsIs", _wrap_wxIndividualLayoutConstraint_AsIs, 1 }, - { "wxIndividualLayoutConstraint_Absolute", _wrap_wxIndividualLayoutConstraint_Absolute, 1 }, - { "wxIndividualLayoutConstraint_Above", _wrap_wxIndividualLayoutConstraint_Above, 1 }, - { "wxPyTimer_Stop", _wrap_wxPyTimer_Stop, 1 }, - { "wxPyTimer_Start", _wrap_wxPyTimer_Start, 1 }, - { "wxPyTimer_Interval", _wrap_wxPyTimer_Interval, 1 }, - { "delete_wxPyTimer", _wrap_delete_wxPyTimer, 1 }, - { "new_wxPyTimer", _wrap_new_wxPyTimer, 1 }, - { "wxRect_height_get", _wrap_wxRect_height_get, 1 }, - { "wxRect_height_set", _wrap_wxRect_height_set, 1 }, - { "wxRect_width_get", _wrap_wxRect_width_get, 1 }, - { "wxRect_width_set", _wrap_wxRect_width_set, 1 }, - { "wxRect_y_get", _wrap_wxRect_y_get, 1 }, - { "wxRect_y_set", _wrap_wxRect_y_set, 1 }, - { "wxRect_x_get", _wrap_wxRect_x_get, 1 }, - { "wxRect_x_set", _wrap_wxRect_x_set, 1 }, - { "wxRect_GetRight", _wrap_wxRect_GetRight, 1 }, - { "wxRect_GetBottom", _wrap_wxRect_GetBottom, 1 }, - { "wxRect_GetTop", _wrap_wxRect_GetTop, 1 }, - { "wxRect_GetLeft", _wrap_wxRect_GetLeft, 1 }, - { "wxRect_GetSize", _wrap_wxRect_GetSize, 1 }, - { "wxRect_GetPosition", _wrap_wxRect_GetPosition, 1 }, - { "wxRect_SetHeight", _wrap_wxRect_SetHeight, 1 }, - { "wxRect_GetHeight", _wrap_wxRect_GetHeight, 1 }, - { "wxRect_SetWidth", _wrap_wxRect_SetWidth, 1 }, - { "wxRect_GetWidth", _wrap_wxRect_GetWidth, 1 }, - { "wxRect_SetY", _wrap_wxRect_SetY, 1 }, - { "wxRect_GetY", _wrap_wxRect_GetY, 1 }, - { "wxRect_SetX", _wrap_wxRect_SetX, 1 }, - { "wxRect_GetX", _wrap_wxRect_GetX, 1 }, - { "delete_wxRect", _wrap_delete_wxRect, 1 }, - { "new_wxRect", _wrap_new_wxRect, 1 }, - { "wxPoint___str__", _wrap_wxPoint___str__, 1 }, - { "wxPoint_Set", _wrap_wxPoint_Set, 1 }, - { "delete_wxPoint", _wrap_delete_wxPoint, 1 }, - { "new_wxPoint", _wrap_new_wxPoint, 1 }, - { "wxPoint_y_get", _wrap_wxPoint_y_get, 1 }, - { "wxPoint_y_set", _wrap_wxPoint_y_set, 1 }, - { "wxPoint_x_get", _wrap_wxPoint_x_get, 1 }, - { "wxPoint_x_set", _wrap_wxPoint_x_set, 1 }, - { "delete_wxRealPoint", _wrap_delete_wxRealPoint, 1 }, - { "new_wxRealPoint", _wrap_new_wxRealPoint, 1 }, - { "wxRealPoint_y_get", _wrap_wxRealPoint_y_get, 1 }, - { "wxRealPoint_y_set", _wrap_wxRealPoint_y_set, 1 }, - { "wxRealPoint_x_get", _wrap_wxRealPoint_x_get, 1 }, - { "wxRealPoint_x_set", _wrap_wxRealPoint_x_set, 1 }, - { "wxSize___str__", _wrap_wxSize___str__, 1 }, - { "wxSize_GetHeight", _wrap_wxSize_GetHeight, 1 }, - { "wxSize_GetWidth", _wrap_wxSize_GetWidth, 1 }, - { "wxSize_Set", _wrap_wxSize_Set, 1 }, - { "delete_wxSize", _wrap_delete_wxSize, 1 }, - { "new_wxSize", _wrap_new_wxSize, 1 }, - { "wxSize_height_get", _wrap_wxSize_height_get, 1 }, - { "wxSize_height_set", _wrap_wxSize_height_set, 1 }, - { "wxSize_width_get", _wrap_wxSize_width_get, 1 }, - { "wxSize_width_set", _wrap_wxSize_width_set, 1 }, - { "wxResourceParseString", _wrap_wxResourceParseString, 1 }, - { "wxResourceParseFile", _wrap_wxResourceParseFile, 1 }, - { "wxResourceParseData", _wrap_wxResourceParseData, 1 }, - { "wxResourceGetIdentifier", _wrap_wxResourceGetIdentifier, 1 }, - { "wxResourceCreateMenuBar", _wrap_wxResourceCreateMenuBar, 1 }, - { "wxResourceCreateIcon", _wrap_wxResourceCreateIcon, 1 }, - { "wxResourceCreateBitmap", _wrap_wxResourceCreateBitmap, 1 }, - { "wxResourceClear", _wrap_wxResourceClear, 1 }, - { "wxResourceAddIdentifier", _wrap_wxResourceAddIdentifier, 1 }, - { "wxGetResource", _wrap_wxGetResource, 1 }, - { "wxYield", _wrap_wxYield, 1 }, - { "wxNow", _wrap_wxNow, 1 }, - { "wxIsBusy", _wrap_wxIsBusy, 1 }, - { "wxGetMousePosition", _wrap_wxGetMousePosition, 1 }, - { "wxFindWindowByName", _wrap_wxFindWindowByName, 1 }, - { "wxFindWindowByLabel", _wrap_wxFindWindowByLabel, 1 }, - { "wxExecute", _wrap_wxExecute, 1 }, - { "wxEndBusyCursor", _wrap_wxEndBusyCursor, 1 }, - { "wxDisplaySize", _wrap_wxDisplaySize, 1 }, - { "wxBell", _wrap_wxBell, 1 }, - { "wxBeginBusyCursor", _wrap_wxBeginBusyCursor, 1 }, - { "RegisterId", _wrap_RegisterId, 1 }, - { "NewId", _wrap_NewId, 1 }, - { "wxSetCursor", _wrap_wxSetCursor, 1 }, - { "wxDisplayDepth", _wrap_wxDisplayDepth, 1 }, - { "wxColourDisplay", _wrap_wxColourDisplay, 1 }, - { "wxMessageBox", _wrap_wxMessageBox, 1 }, - { "wxGetSingleChoiceIndex", _wrap_wxGetSingleChoiceIndex, 1 }, - { "wxGetSingleChoice", _wrap_wxGetSingleChoice, 1 }, - { "wxGetTextFromUser", _wrap_wxGetTextFromUser, 1 }, - { "wxFileSelector", _wrap_wxFileSelector, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initmiscc)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("miscc", misccMethods); - d = PyModule_GetDict(m); - PyDict_SetItemString(d,"wxLeft", PyInt_FromLong((long) wxLeft)); - PyDict_SetItemString(d,"wxTop", PyInt_FromLong((long) wxTop)); - PyDict_SetItemString(d,"wxRight", PyInt_FromLong((long) wxRight)); - PyDict_SetItemString(d,"wxBottom", PyInt_FromLong((long) wxBottom)); - PyDict_SetItemString(d,"wxWidth", PyInt_FromLong((long) wxWidth)); - PyDict_SetItemString(d,"wxHeight", PyInt_FromLong((long) wxHeight)); - PyDict_SetItemString(d,"wxCentre", PyInt_FromLong((long) wxCentre)); - PyDict_SetItemString(d,"wxCenter", PyInt_FromLong((long) wxCenter)); - PyDict_SetItemString(d,"wxCentreX", PyInt_FromLong((long) wxCentreX)); - PyDict_SetItemString(d,"wxCentreY", PyInt_FromLong((long) wxCentreY)); - PyDict_SetItemString(d,"wxUnconstrained", PyInt_FromLong((long) wxUnconstrained)); - PyDict_SetItemString(d,"wxAsIs", PyInt_FromLong((long) wxAsIs)); - PyDict_SetItemString(d,"wxPercentOf", PyInt_FromLong((long) wxPercentOf)); - PyDict_SetItemString(d,"wxAbove", PyInt_FromLong((long) wxAbove)); - PyDict_SetItemString(d,"wxBelow", PyInt_FromLong((long) wxBelow)); - PyDict_SetItemString(d,"wxLeftOf", PyInt_FromLong((long) wxLeftOf)); - PyDict_SetItemString(d,"wxRightOf", PyInt_FromLong((long) wxRightOf)); - PyDict_SetItemString(d,"wxSameAs", PyInt_FromLong((long) wxSameAs)); - PyDict_SetItemString(d,"wxAbsolute", PyInt_FromLong((long) wxAbsolute)); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); -} diff --git a/utils/wxPython/src/gtk/misc.py b/utils/wxPython/src/gtk/misc.py deleted file mode 100644 index 003ff667c8..0000000000 --- a/utils/wxPython/src/gtk/misc.py +++ /dev/null @@ -1,477 +0,0 @@ -# This file was created automatically by SWIG. -import miscc -class wxSizePtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - miscc.delete_wxSize(self.this) - def Set(self,arg0,arg1): - val = miscc.wxSize_Set(self.this,arg0,arg1) - return val - def GetWidth(self): - val = miscc.wxSize_GetWidth(self.this) - return val - def GetHeight(self): - val = miscc.wxSize_GetHeight(self.this) - return val - def __str__(self): - val = miscc.wxSize___str__(self.this) - return val - def __setattr__(self,name,value): - if name == "width" : - miscc.wxSize_width_set(self.this,value) - return - if name == "height" : - miscc.wxSize_height_set(self.this,value) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "width" : - return miscc.wxSize_width_get(self.this) - if name == "height" : - return miscc.wxSize_height_get(self.this) - raise AttributeError,name - def __repr__(self): - return "" -class wxSize(wxSizePtr): - def __init__(self,*args) : - self.this = apply(miscc.new_wxSize,()+args) - self.thisown = 1 - - - - -class wxRealPointPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - miscc.delete_wxRealPoint(self.this) - def __setattr__(self,name,value): - if name == "x" : - miscc.wxRealPoint_x_set(self.this,value) - return - if name == "y" : - miscc.wxRealPoint_y_set(self.this,value) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "x" : - return miscc.wxRealPoint_x_get(self.this) - if name == "y" : - return miscc.wxRealPoint_y_get(self.this) - raise AttributeError,name - def __repr__(self): - return "" -class wxRealPoint(wxRealPointPtr): - def __init__(self,*args) : - self.this = apply(miscc.new_wxRealPoint,()+args) - self.thisown = 1 - - - - -class wxPointPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - miscc.delete_wxPoint(self.this) - def Set(self,arg0,arg1): - val = miscc.wxPoint_Set(self.this,arg0,arg1) - return val - def __str__(self): - val = miscc.wxPoint___str__(self.this) - return val - def __setattr__(self,name,value): - if name == "x" : - miscc.wxPoint_x_set(self.this,value) - return - if name == "y" : - miscc.wxPoint_y_set(self.this,value) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "x" : - return miscc.wxPoint_x_get(self.this) - if name == "y" : - return miscc.wxPoint_y_get(self.this) - raise AttributeError,name - def __repr__(self): - return "" -class wxPoint(wxPointPtr): - def __init__(self,*args) : - self.this = apply(miscc.new_wxPoint,()+args) - self.thisown = 1 - - - - -class wxRectPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - miscc.delete_wxRect(self.this) - def GetX(self): - val = miscc.wxRect_GetX(self.this) - return val - def SetX(self,arg0): - val = miscc.wxRect_SetX(self.this,arg0) - return val - def GetY(self): - val = miscc.wxRect_GetY(self.this) - return val - def SetY(self,arg0): - val = miscc.wxRect_SetY(self.this,arg0) - return val - def GetWidth(self): - val = miscc.wxRect_GetWidth(self.this) - return val - def SetWidth(self,arg0): - val = miscc.wxRect_SetWidth(self.this,arg0) - return val - def GetHeight(self): - val = miscc.wxRect_GetHeight(self.this) - return val - def SetHeight(self,arg0): - val = miscc.wxRect_SetHeight(self.this,arg0) - return val - def GetPosition(self): - val = miscc.wxRect_GetPosition(self.this) - val = wxPointPtr(val) - val.thisown = 1 - return val - def GetSize(self): - val = miscc.wxRect_GetSize(self.this) - val = wxSizePtr(val) - val.thisown = 1 - return val - def GetLeft(self): - val = miscc.wxRect_GetLeft(self.this) - return val - def GetTop(self): - val = miscc.wxRect_GetTop(self.this) - return val - def GetBottom(self): - val = miscc.wxRect_GetBottom(self.this) - return val - def GetRight(self): - val = miscc.wxRect_GetRight(self.this) - return val - def __setattr__(self,name,value): - if name == "x" : - miscc.wxRect_x_set(self.this,value) - return - if name == "y" : - miscc.wxRect_y_set(self.this,value) - return - if name == "width" : - miscc.wxRect_width_set(self.this,value) - return - if name == "height" : - miscc.wxRect_height_set(self.this,value) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "x" : - return miscc.wxRect_x_get(self.this) - if name == "y" : - return miscc.wxRect_y_get(self.this) - if name == "width" : - return miscc.wxRect_width_get(self.this) - if name == "height" : - return miscc.wxRect_height_get(self.this) - raise AttributeError,name - def __repr__(self): - return "" -class wxRect(wxRectPtr): - def __init__(self,*args) : - self.this = apply(miscc.new_wxRect,()+args) - self.thisown = 1 - - - - -class wxPyTimerPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - miscc.delete_wxPyTimer(self.this) - def Interval(self): - val = miscc.wxPyTimer_Interval(self.this) - return val - def Start(self,*args): - val = apply(miscc.wxPyTimer_Start,(self.this,)+args) - return val - def Stop(self): - val = miscc.wxPyTimer_Stop(self.this) - return val - def __repr__(self): - return "" -class wxPyTimer(wxPyTimerPtr): - def __init__(self,arg0) : - self.this = miscc.new_wxPyTimer(arg0) - self.thisown = 1 - - - - -class wxIndividualLayoutConstraintPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def Above(self,arg0,*args): - val = apply(miscc.wxIndividualLayoutConstraint_Above,(self.this,arg0.this,)+args) - return val - def Absolute(self,arg0): - val = miscc.wxIndividualLayoutConstraint_Absolute(self.this,arg0) - return val - def AsIs(self): - val = miscc.wxIndividualLayoutConstraint_AsIs(self.this) - return val - def Below(self,arg0,*args): - val = apply(miscc.wxIndividualLayoutConstraint_Below,(self.this,arg0.this,)+args) - return val - def Unconstrained(self): - val = miscc.wxIndividualLayoutConstraint_Unconstrained(self.this) - return val - def LeftOf(self,arg0,*args): - val = apply(miscc.wxIndividualLayoutConstraint_LeftOf,(self.this,arg0.this,)+args) - return val - def PercentOf(self,arg0,arg1,arg2): - val = miscc.wxIndividualLayoutConstraint_PercentOf(self.this,arg0.this,arg1,arg2) - return val - def RightOf(self,arg0,*args): - val = apply(miscc.wxIndividualLayoutConstraint_RightOf,(self.this,arg0.this,)+args) - return val - def SameAs(self,arg0,arg1,*args): - val = apply(miscc.wxIndividualLayoutConstraint_SameAs,(self.this,arg0.this,arg1,)+args) - return val - def Set(self,arg0,arg1,arg2,*args): - val = apply(miscc.wxIndividualLayoutConstraint_Set,(self.this,arg0,arg1.this,arg2,)+args) - return val - def __repr__(self): - return "" -class wxIndividualLayoutConstraint(wxIndividualLayoutConstraintPtr): - def __init__(self,this): - self.this = this - - - - -class wxLayoutConstraintsPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __setattr__(self,name,value): - if name == "bottom" : - miscc.wxLayoutConstraints_bottom_set(self.this,value.this) - return - if name == "centreX" : - miscc.wxLayoutConstraints_centreX_set(self.this,value.this) - return - if name == "centreY" : - miscc.wxLayoutConstraints_centreY_set(self.this,value.this) - return - if name == "height" : - miscc.wxLayoutConstraints_height_set(self.this,value.this) - return - if name == "left" : - miscc.wxLayoutConstraints_left_set(self.this,value.this) - return - if name == "right" : - miscc.wxLayoutConstraints_right_set(self.this,value.this) - return - if name == "top" : - miscc.wxLayoutConstraints_top_set(self.this,value.this) - return - if name == "width" : - miscc.wxLayoutConstraints_width_set(self.this,value.this) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "bottom" : - return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_bottom_get(self.this)) - if name == "centreX" : - return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_centreX_get(self.this)) - if name == "centreY" : - return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_centreY_get(self.this)) - if name == "height" : - return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_height_get(self.this)) - if name == "left" : - return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_left_get(self.this)) - if name == "right" : - return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_right_get(self.this)) - if name == "top" : - return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_top_get(self.this)) - if name == "width" : - return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_width_get(self.this)) - raise AttributeError,name - def __repr__(self): - return "" -class wxLayoutConstraints(wxLayoutConstraintsPtr): - def __init__(self) : - self.this = miscc.new_wxLayoutConstraints() - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - -def wxFileSelector(arg0,*args): - argl = map(None,args) - try: argl[5] = argl[5].this - except: pass - args = tuple(argl) - val = apply(miscc.wxFileSelector,(arg0,)+args) - return val - -def wxGetTextFromUser(arg0,*args): - argl = map(None,args) - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - val = apply(miscc.wxGetTextFromUser,(arg0,)+args) - return val - -def wxGetSingleChoice(arg0,arg1,arg2,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(miscc.wxGetSingleChoice,(arg0,arg1,arg2,)+args) - return val - -def wxGetSingleChoiceIndex(arg0,arg1,arg2,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(miscc.wxGetSingleChoiceIndex,(arg0,arg1,arg2,)+args) - return val - -def wxMessageBox(arg0,*args): - argl = map(None,args) - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - val = apply(miscc.wxMessageBox,(arg0,)+args) - return val - -wxColourDisplay = miscc.wxColourDisplay - -wxDisplayDepth = miscc.wxDisplayDepth - -def wxSetCursor(arg0): - val = miscc.wxSetCursor(arg0.this) - return val - -NewId = miscc.NewId - -RegisterId = miscc.RegisterId - -def wxBeginBusyCursor(*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(miscc.wxBeginBusyCursor,()+args) - return val - -wxBell = miscc.wxBell - -wxDisplaySize = miscc.wxDisplaySize - -wxEndBusyCursor = miscc.wxEndBusyCursor - -wxExecute = miscc.wxExecute - -def wxFindWindowByLabel(arg0,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(miscc.wxFindWindowByLabel,(arg0,)+args) - val = wxWindowPtr(val) - return val - -def wxFindWindowByName(arg0,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(miscc.wxFindWindowByName,(arg0,)+args) - val = wxWindowPtr(val) - return val - -wxGetMousePosition = miscc.wxGetMousePosition - -wxIsBusy = miscc.wxIsBusy - -wxNow = miscc.wxNow - -wxYield = miscc.wxYield - -wxGetResource = miscc.wxGetResource - -wxResourceAddIdentifier = miscc.wxResourceAddIdentifier - -wxResourceClear = miscc.wxResourceClear - -def wxResourceCreateBitmap(arg0): - val = miscc.wxResourceCreateBitmap(arg0) - val = wxBitmapPtr(val) - return val - -def wxResourceCreateIcon(arg0): - val = miscc.wxResourceCreateIcon(arg0) - val = wxIconPtr(val) - return val - -def wxResourceCreateMenuBar(arg0): - val = miscc.wxResourceCreateMenuBar(arg0) - val = wxMenuBarPtr(val) - return val - -wxResourceGetIdentifier = miscc.wxResourceGetIdentifier - -wxResourceParseData = miscc.wxResourceParseData - -wxResourceParseFile = miscc.wxResourceParseFile - -wxResourceParseString = miscc.wxResourceParseString - - - -#-------------- VARIABLE WRAPPERS ------------------ - -wxLeft = miscc.wxLeft -wxTop = miscc.wxTop -wxRight = miscc.wxRight -wxBottom = miscc.wxBottom -wxWidth = miscc.wxWidth -wxHeight = miscc.wxHeight -wxCentre = miscc.wxCentre -wxCenter = miscc.wxCenter -wxCentreX = miscc.wxCentreX -wxCentreY = miscc.wxCentreY -wxUnconstrained = miscc.wxUnconstrained -wxAsIs = miscc.wxAsIs -wxPercentOf = miscc.wxPercentOf -wxAbove = miscc.wxAbove -wxBelow = miscc.wxBelow -wxLeftOf = miscc.wxLeftOf -wxRightOf = miscc.wxRightOf -wxSameAs = miscc.wxSameAs -wxAbsolute = miscc.wxAbsolute diff --git a/utils/wxPython/src/gtk/windows.cpp b/utils/wxPython/src/gtk/windows.cpp deleted file mode 100644 index 689c0a4584..0000000000 --- a/utils/wxPython/src/gtk/windows.cpp +++ /dev/null @@ -1,4553 +0,0 @@ -/* - * FILE : gtk/windows.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif - -#define SWIG_init initwindowsc - -#define SWIG_name "windowsc" - -#include "helpers.h" - -#ifdef __WXMSW__ - // wxGTK defines wxMenuItem inside menu.h -#include -#endif - -#ifdef __WXMSW__ -#include -#endif - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; -static void wxEvtHandler_Connect(wxEvtHandler *self,int id,int lastId,int eventType,PyObject * func) { - if (PyCallable_Check(func)) { - self->Connect(id, lastId, eventType, - (wxObjectEventFunction) &wxPyCallback::EventThunker, - new wxPyCallback(func)); - } - } -static PyObject *_wrap_wxEvtHandler_Connect(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxEvtHandler * _arg0; - int _arg1; - int _arg2; - int _arg3; - PyObject * _arg4; - char * _argc0 = 0; - PyObject * _obj4 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siiiO:wxEvtHandler_Connect",&_argc0,&_arg1,&_arg2,&_arg3,&_obj4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvtHandler_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvtHandler_Connect. Expected _wxEvtHandler_p."); - return NULL; - } - } -{ - _arg4 = _obj4; -} - wxEvtHandler_Connect(_arg0,_arg1,_arg2,_arg3,_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxWindowTowxEvtHandler(void *ptr) { - wxWindow *src; - wxEvtHandler *dest; - src = (wxWindow *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_new_wxWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - long _arg4 = 0; - char * _arg5 = "panel"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si|ssls:new_wxWindow",&_argc0,&_arg1,&_argc2,&_argc3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxWindow. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxWindow. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxWindow. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxWindow *)new_wxWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxWindow_CaptureMouse(_swigobj) (_swigobj->CaptureMouse()) -static PyObject *_wrap_wxWindow_CaptureMouse(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_CaptureMouse",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_CaptureMouse. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_CaptureMouse(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_Center(_swigobj,_swigarg0) (_swigobj->Center(_swigarg0)) -static PyObject *_wrap_wxWindow_Center(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1 = (wxHORIZONTAL); - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxWindow_Center",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Center. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_Center(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_Centre(_swigobj,_swigarg0) (_swigobj->Centre(_swigarg0)) -static PyObject *_wrap_wxWindow_Centre(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1 = (wxHORIZONTAL); - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxWindow_Centre",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Centre. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_Centre(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_ClientToScreen(_swigobj,_swigarg0,_swigarg1) (_swigobj->ClientToScreen(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxWindow_ClientToScreen(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int * _arg1; - int * _arg2; - char * _argc0 = 0; - int temp; - PyObject * _obj1 = 0; - int temp0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sOO:wxWindow_ClientToScreen",&_argc0,&_obj1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_ClientToScreen. Expected _wxWindow_p."); - return NULL; - } - } -{ - temp = (int) PyInt_AsLong(_obj1); - _arg1 = &temp; -} -{ - temp0 = (int) PyInt_AsLong(_obj2); - _arg2 = &temp0; -} - wxWindow_ClientToScreen(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxWindow_Close(_swigobj,_swigarg0) (_swigobj->Close(_swigarg0)) -static PyObject *_wrap_wxWindow_Close(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - int _arg1 = (0); - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxWindow_Close",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Close. Expected _wxWindow_p."); - return NULL; - } - } - _result = (bool )wxWindow_Close(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_Destroy(_swigobj) (_swigobj->Destroy()) -static PyObject *_wrap_wxWindow_Destroy(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_Destroy",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Destroy. Expected _wxWindow_p."); - return NULL; - } - } - _result = (bool )wxWindow_Destroy(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_DestroyChildren(_swigobj) (_swigobj->DestroyChildren()) -static PyObject *_wrap_wxWindow_DestroyChildren(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_DestroyChildren",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_DestroyChildren. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_DestroyChildren(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_Enable(_swigobj,_swigarg0) (_swigobj->Enable(_swigarg0)) -static PyObject *_wrap_wxWindow_Enable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_Enable",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Enable. Expected _wxWindow_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxWindow_Enable(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_FindWindowByID(_swigobj,_swigarg0) (_swigobj->FindWindow(_swigarg0)) -static PyObject *_wrap_wxWindow_FindWindowByID(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - wxWindow * _arg0; - long _arg1; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxWindow_FindWindowByID",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_FindWindowByID. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxWindow *)wxWindow_FindWindowByID(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxWindow_FindWindowByName(_swigobj,_swigarg0) (_swigobj->FindWindow(_swigarg0)) -static PyObject *_wrap_wxWindow_FindWindowByName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - wxWindow * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxWindow_FindWindowByName",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_FindWindowByName. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (wxWindow *)wxWindow_FindWindowByName(_arg0,*_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxWindow_Fit(_swigobj) (_swigobj->Fit()) -static PyObject *_wrap_wxWindow_Fit(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_Fit",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Fit. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_Fit(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_GetBackgroundColour(_swigobj) (_swigobj->GetBackgroundColour()) -static PyObject *_wrap_wxWindow_GetBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxWindow * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetBackgroundColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetBackgroundColour. Expected _wxWindow_p."); - return NULL; - } - } - _result = new wxColour (wxWindow_GetBackgroundColour(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxWindow_GetCharHeight(_swigobj) (_swigobj->GetCharHeight()) -static PyObject *_wrap_wxWindow_GetCharHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetCharHeight",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetCharHeight. Expected _wxWindow_p."); - return NULL; - } - } - _result = (int )wxWindow_GetCharHeight(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_GetCharWidth(_swigobj) (_swigobj->GetCharWidth()) -static PyObject *_wrap_wxWindow_GetCharWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetCharWidth",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetCharWidth. Expected _wxWindow_p."); - return NULL; - } - } - _result = (int )wxWindow_GetCharWidth(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_GetClientSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetClientSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxWindow_GetClientSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxWindow_GetClientSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetClientSize. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_GetClientSize(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxWindow_GetConstraints(_swigobj) (_swigobj->GetConstraints()) -static PyObject *_wrap_wxWindow_GetConstraints(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxLayoutConstraints * _result; - wxWindow * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetConstraints",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetConstraints. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxLayoutConstraints *)wxWindow_GetConstraints(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxLayoutConstraints_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxWindow_GetFont(_swigobj) (_swigobj->GetFont()) -static PyObject *_wrap_wxWindow_GetFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _result; - wxWindow * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetFont",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetFont. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxFont *)wxWindow_GetFont(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxWindow_GetForegroundColour(_swigobj) (_swigobj->GetForegroundColour()) -static PyObject *_wrap_wxWindow_GetForegroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxWindow * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetForegroundColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetForegroundColour. Expected _wxWindow_p."); - return NULL; - } - } - _result = new wxColour (wxWindow_GetForegroundColour(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxWindow_GetGrandParent(_swigobj) (_swigobj->GetGrandParent()) -static PyObject *_wrap_wxWindow_GetGrandParent(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - wxWindow * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetGrandParent",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetGrandParent. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxWindow *)wxWindow_GetGrandParent(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxWindow_GetId(_swigobj) (_swigobj->GetId()) -static PyObject *_wrap_wxWindow_GetId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetId",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetId. Expected _wxWindow_p."); - return NULL; - } - } - _result = (int )wxWindow_GetId(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_GetPosition(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetPosition(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxWindow_GetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxWindow_GetPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetPosition. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_GetPosition(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxWindow_GetLabel(_swigobj) (_swigobj->GetLabel()) -static PyObject *_wrap_wxWindow_GetLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetLabel",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetLabel. Expected _wxWindow_p."); - return NULL; - } - } - _result = new wxString (wxWindow_GetLabel(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxWindow_GetName(_swigobj) (_swigobj->GetName()) -static PyObject *_wrap_wxWindow_GetName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetName",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetName. Expected _wxWindow_p."); - return NULL; - } - } - _result = new wxString (wxWindow_GetName(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxWindow_GetParent(_swigobj) (_swigobj->GetParent()) -static PyObject *_wrap_wxWindow_GetParent(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - wxWindow * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetParent",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetParent. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxWindow *)wxWindow_GetParent(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxWindow_GetReturnCode(_swigobj) (_swigobj->GetReturnCode()) -static PyObject *_wrap_wxWindow_GetReturnCode(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetReturnCode",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetReturnCode. Expected _wxWindow_p."); - return NULL; - } - } - _result = (int )wxWindow_GetReturnCode(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_GetScrollThumb(_swigobj,_swigarg0) (_swigobj->GetScrollThumb(_swigarg0)) -static PyObject *_wrap_wxWindow_GetScrollThumb(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxWindow * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_GetScrollThumb",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetScrollThumb. Expected _wxWindow_p."); - return NULL; - } - } - _result = (int )wxWindow_GetScrollThumb(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_GetScrollPos(_swigobj,_swigarg0) (_swigobj->GetScrollPos(_swigarg0)) -static PyObject *_wrap_wxWindow_GetScrollPos(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxWindow * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_GetScrollPos",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetScrollPos. Expected _wxWindow_p."); - return NULL; - } - } - _result = (int )wxWindow_GetScrollPos(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_GetScrollRange(_swigobj,_swigarg0) (_swigobj->GetScrollRange(_swigarg0)) -static PyObject *_wrap_wxWindow_GetScrollRange(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxWindow * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_GetScrollRange",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetScrollRange. Expected _wxWindow_p."); - return NULL; - } - } - _result = (int )wxWindow_GetScrollRange(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_GetSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxWindow_GetSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxWindow_GetSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetSize. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_GetSize(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxWindow_GetTextExtent(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetTextExtent(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxWindow_GetTextExtent(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - wxString * _arg1; - int * _arg2; - int temp; - int * _arg3; - int temp0; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; -{ - _arg2 = &temp; -} -{ - _arg3 = &temp0; -} - if(!PyArg_ParseTuple(args,"sO:wxWindow_GetTextExtent",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetTextExtent. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxWindow_GetTextExtent(_arg0,*_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg3)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxWindow_GetTitle(_swigobj) (_swigobj->GetTitle()) -static PyObject *_wrap_wxWindow_GetTitle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetTitle",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetTitle. Expected _wxWindow_p."); - return NULL; - } - } - _result = new wxString (wxWindow_GetTitle(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxWindow_GetWindowStyleFlag(_swigobj) (_swigobj->GetWindowStyleFlag()) -static PyObject *_wrap_wxWindow_GetWindowStyleFlag(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetWindowStyleFlag",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetWindowStyleFlag. Expected _wxWindow_p."); - return NULL; - } - } - _result = (long )wxWindow_GetWindowStyleFlag(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxWindow_InitDialog(_swigobj) (_swigobj->InitDialog()) -static PyObject *_wrap_wxWindow_InitDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_InitDialog",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_InitDialog. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_InitDialog(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_IsEnabled(_swigobj) (_swigobj->IsEnabled()) -static PyObject *_wrap_wxWindow_IsEnabled(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_IsEnabled",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_IsEnabled. Expected _wxWindow_p."); - return NULL; - } - } - _result = (bool )wxWindow_IsEnabled(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_IsRetained(_swigobj) (_swigobj->IsRetained()) -static PyObject *_wrap_wxWindow_IsRetained(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_IsRetained",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_IsRetained. Expected _wxWindow_p."); - return NULL; - } - } - _result = (bool )wxWindow_IsRetained(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_IsShown(_swigobj) (_swigobj->IsShown()) -static PyObject *_wrap_wxWindow_IsShown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_IsShown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_IsShown. Expected _wxWindow_p."); - return NULL; - } - } - _result = (bool )wxWindow_IsShown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_Layout(_swigobj) (_swigobj->Layout()) -static PyObject *_wrap_wxWindow_Layout(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_Layout",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Layout. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_Layout(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_LoadFromResource(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFromResource(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxWindow_LoadFromResource(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - wxWindow * _arg1; - wxString * _arg2; - wxResourceTable * _arg3 = NULL; - char * _argc0 = 0; - char * _argc1 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ssO|s:wxWindow_LoadFromResource",&_argc0,&_argc1,&_obj2,&_argc3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_LoadFromResource. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_LoadFromResource. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxResourceTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxWindow_LoadFromResource. Expected _wxResourceTable_p."); - return NULL; - } - } - _result = (bool )wxWindow_LoadFromResource(_arg0,_arg1,*_arg2,_arg3); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxWindow_Lower(_swigobj) (_swigobj->Lower()) -static PyObject *_wrap_wxWindow_Lower(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_Lower",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Lower. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_Lower(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_MakeModal(_swigobj,_swigarg0) (_swigobj->MakeModal(_swigarg0)) -static PyObject *_wrap_wxWindow_MakeModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_MakeModal",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_MakeModal. Expected _wxWindow_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxWindow_MakeModal(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_Move(_swigobj,_swigarg0,_swigarg1) (_swigobj->Move(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxWindow_Move(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxWindow_Move",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Move. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_Move(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_PopupMenu(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->PopupMenu(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxWindow_PopupMenu(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - wxMenu * _arg1; - int _arg2; - int _arg3; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ssii:wxWindow_PopupMenu",&_argc0,&_argc1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_PopupMenu. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_PopupMenu. Expected _wxMenu_p."); - return NULL; - } - } - _result = (bool )wxWindow_PopupMenu(_arg0,_arg1,_arg2,_arg3); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_Raise(_swigobj) (_swigobj->Raise()) -static PyObject *_wrap_wxWindow_Raise(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_Raise",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Raise. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_Raise(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_Refresh(_swigobj,_swigarg0,_swigarg1) (_swigobj->Refresh(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxWindow_Refresh(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - bool _arg1 = (1); - wxRect * _arg2 = NULL; - char * _argc0 = 0; - int tempbool1; - char * _argc2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|is:wxWindow_Refresh",&_argc0,&tempbool1,&_argc2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Refresh. Expected _wxWindow_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxWindow_Refresh. Expected _wxRect_p."); - return NULL; - } - } - wxWindow_Refresh(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_ReleaseMouse(_swigobj) (_swigobj->ReleaseMouse()) -static PyObject *_wrap_wxWindow_ReleaseMouse(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_ReleaseMouse",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_ReleaseMouse. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_ReleaseMouse(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_ScreenToClient(_swigobj,_swigarg0,_swigarg1) (_swigobj->ScreenToClient(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxWindow_ScreenToClient(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int * _arg1; - int * _arg2; - char * _argc0 = 0; - int temp; - PyObject * _obj1 = 0; - int temp0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sOO:wxWindow_ScreenToClient",&_argc0,&_obj1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_ScreenToClient. Expected _wxWindow_p."); - return NULL; - } - } -{ - temp = (int) PyInt_AsLong(_obj1); - _arg1 = &temp; -} -{ - temp0 = (int) PyInt_AsLong(_obj2); - _arg2 = &temp0; -} - wxWindow_ScreenToClient(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxWindow_ScrollWindow(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->ScrollWindow(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxWindow_ScrollWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1; - int _arg2; - wxRect * _arg3 = NULL; - char * _argc0 = 0; - char * _argc3 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii|s:wxWindow_ScrollWindow",&_argc0,&_arg1,&_arg2,&_argc3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_ScrollWindow. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxWindow_ScrollWindow. Expected _wxRect_p."); - return NULL; - } - } - wxWindow_ScrollWindow(_arg0,_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetAutoLayout(_swigobj,_swigarg0) (_swigobj->SetAutoLayout(_swigarg0)) -static PyObject *_wrap_wxWindow_SetAutoLayout(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_SetAutoLayout",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetAutoLayout. Expected _wxWindow_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxWindow_SetAutoLayout(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetBackgroundColour(_swigarg0)) -static PyObject *_wrap_wxWindow_SetBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxWindow_SetBackgroundColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetBackgroundColour. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetBackgroundColour. Expected _wxColour_p."); - return NULL; - } - } - wxWindow_SetBackgroundColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetConstraints(_swigobj,_swigarg0) (_swigobj->SetConstraints(_swigarg0)) -static PyObject *_wrap_wxWindow_SetConstraints(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - wxLayoutConstraints * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxWindow_SetConstraints",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetConstraints. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxLayoutConstraints_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetConstraints. Expected _wxLayoutConstraints_p."); - return NULL; - } - } - wxWindow_SetConstraints(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetDoubleClick(_swigobj,_swigarg0) (_swigobj->SetDoubleClick(_swigarg0)) -static PyObject *_wrap_wxWindow_SetDoubleClick(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_SetDoubleClick",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetDoubleClick. Expected _wxWindow_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxWindow_SetDoubleClick(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetFocus(_swigobj) (_swigobj->SetFocus()) -static PyObject *_wrap_wxWindow_SetFocus(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_SetFocus",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetFocus. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_SetFocus(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetFont(_swigobj,_swigarg0) (_swigobj->SetFont(_swigarg0)) -static PyObject *_wrap_wxWindow_SetFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - wxFont * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxWindow_SetFont",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetFont. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetFont. Expected _wxFont_p."); - return NULL; - } - } - wxWindow_SetFont(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetForegroundColour(_swigobj,_swigarg0) (_swigobj->SetForegroundColour(_swigarg0)) -static PyObject *_wrap_wxWindow_SetForegroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxWindow_SetForegroundColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetForegroundColour. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetForegroundColour. Expected _wxColour_p."); - return NULL; - } - } - wxWindow_SetForegroundColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetId(_swigobj,_swigarg0) (_swigobj->SetId(_swigarg0)) -static PyObject *_wrap_wxWindow_SetId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_SetId",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetId. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_SetId(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetName(_swigobj,_swigarg0) (_swigobj->SetName(_swigarg0)) -static PyObject *_wrap_wxWindow_SetName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxWindow_SetName",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetName. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxWindow_SetName(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxWindow_SetReturnCode(_swigobj,_swigarg0) (_swigobj->SetReturnCode(_swigarg0)) -static PyObject *_wrap_wxWindow_SetReturnCode(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_SetReturnCode",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetReturnCode. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_SetReturnCode(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetScrollbar(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SetScrollbar(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_wxWindow_SetScrollbar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1; - int _arg2; - int _arg3; - int _arg4; - bool _arg5 = (1); - char * _argc0 = 0; - int tempbool5; - - self = self; - if(!PyArg_ParseTuple(args,"siiii|i:wxWindow_SetScrollbar",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&tempbool5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetScrollbar. Expected _wxWindow_p."); - return NULL; - } - } - _arg5 = (bool ) tempbool5; - wxWindow_SetScrollbar(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetScrollPos(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetScrollPos(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxWindow_SetScrollPos(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1; - int _arg2; - bool _arg3 = (1); - char * _argc0 = 0; - int tempbool3; - - self = self; - if(!PyArg_ParseTuple(args,"sii|i:wxWindow_SetScrollPos",&_argc0,&_arg1,&_arg2,&tempbool3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetScrollPos. Expected _wxWindow_p."); - return NULL; - } - } - _arg3 = (bool ) tempbool3; - wxWindow_SetScrollPos(_arg0,_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetDimensions(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SetSize(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_wxWindow_SetDimensions(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1; - int _arg2; - int _arg3; - int _arg4; - int _arg5 = (wxSIZE_AUTO); - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siiii|i:wxWindow_SetDimensions",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetDimensions. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_SetDimensions(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void wxWindow_SetSize(wxWindow *self,const wxSize & size) { - self->SetSize(size.x, size.y); - } -static PyObject *_wrap_wxWindow_SetSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - wxSize * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxWindow_SetSize",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetSize. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetSize. Expected _wxSize_p."); - return NULL; - } - } - wxWindow_SetSize(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void wxWindow_SetPosition(wxWindow *self,const wxPoint & pos) { - self->SetSize(pos.x, pos.y, -1, -1); - } -static PyObject *_wrap_wxWindow_SetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - wxPoint * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxWindow_SetPosition",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetPosition. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetPosition. Expected _wxPoint_p."); - return NULL; - } - } - wxWindow_SetPosition(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetSizeHints(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->SetSizeHints(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_wxWindow_SetSizeHints(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1 = -1; - int _arg2 = -1; - int _arg3 = -1; - int _arg4 = -1; - int _arg5 = -1; - int _arg6 = -1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|iiiiii:wxWindow_SetSizeHints",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetSizeHints. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_SetSizeHints(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetClientSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetClientSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxWindow_SetClientSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxWindow_SetClientSize",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetClientSize. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_SetClientSize(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetCursor(_swigobj,_swigarg0) (_swigobj->SetCursor(_swigarg0)) -static PyObject *_wrap_wxWindow_SetCursor(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - wxCursor * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxWindow_SetCursor",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetCursor. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxCursor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetCursor. Expected _wxCursor_p."); - return NULL; - } - } - wxWindow_SetCursor(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetTitle(_swigobj,_swigarg0) (_swigobj->SetTitle(_swigarg0)) -static PyObject *_wrap_wxWindow_SetTitle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxWindow_SetTitle",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetTitle. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxWindow_SetTitle(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxWindow_Show(_swigobj,_swigarg0) (_swigobj->Show(_swigarg0)) -static PyObject *_wrap_wxWindow_Show(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_Show",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Show. Expected _wxWindow_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - _result = (bool )wxWindow_Show(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_TransferDataFromWindow(_swigobj) (_swigobj->TransferDataFromWindow()) -static PyObject *_wrap_wxWindow_TransferDataFromWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_TransferDataFromWindow",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_TransferDataFromWindow. Expected _wxWindow_p."); - return NULL; - } - } - _result = (bool )wxWindow_TransferDataFromWindow(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_TransferDataToWindow(_swigobj) (_swigobj->TransferDataToWindow()) -static PyObject *_wrap_wxWindow_TransferDataToWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_TransferDataToWindow",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_TransferDataToWindow. Expected _wxWindow_p."); - return NULL; - } - } - _result = (bool )wxWindow_TransferDataToWindow(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_Validate(_swigobj) (_swigobj->Validate()) -static PyObject *_wrap_wxWindow_Validate(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_Validate",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Validate. Expected _wxWindow_p."); - return NULL; - } - } - _result = (bool )wxWindow_Validate(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxFrameTowxWindow(void *ptr) { - wxFrame *src; - wxWindow *dest; - src = (wxFrame *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxFrameTowxEvtHandler(void *ptr) { - wxFrame *src; - wxEvtHandler *dest; - src = (wxFrame *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxFrame(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFrame * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = (wxDEFAULT_FRAME_STYLE); - char * _arg6 = "frame"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|ssls:new_wxFrame",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxFrame. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxFrame. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxFrame. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxFrame *)new_wxFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFrame_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxFrame_Centre(_swigobj,_swigarg0) (_swigobj->Centre(_swigarg0)) -static PyObject *_wrap_wxFrame_Centre(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFrame * _arg0; - int _arg1 = (wxBOTH); - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxFrame_Centre",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Centre. Expected _wxFrame_p."); - return NULL; - } - } - wxFrame_Centre(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFrame_CreateStatusBar(_swigobj,_swigarg0) (_swigobj->CreateStatusBar(_swigarg0)) -static PyObject *_wrap_wxFrame_CreateStatusBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxFrame * _arg0; - int _arg1 = 1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxFrame_CreateStatusBar",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_CreateStatusBar. Expected _wxFrame_p."); - return NULL; - } - } - _result = (bool )wxFrame_CreateStatusBar(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFrame_GetMenuBar(_swigobj) (_swigobj->GetMenuBar()) -static PyObject *_wrap_wxFrame_GetMenuBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuBar * _result; - wxFrame * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFrame_GetMenuBar",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetMenuBar. Expected _wxFrame_p."); - return NULL; - } - } - _result = (wxMenuBar *)wxFrame_GetMenuBar(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxFrame_GetStatusBar(_swigobj) (_swigobj->GetStatusBar()) -static PyObject *_wrap_wxFrame_GetStatusBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxStatusBar * _result; - wxFrame * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFrame_GetStatusBar",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetStatusBar. Expected _wxFrame_p."); - return NULL; - } - } - _result = (wxStatusBar *)wxFrame_GetStatusBar(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxStatusBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxFrame_GetTitle(_swigobj) (_swigobj->GetTitle()) -static PyObject *_wrap_wxFrame_GetTitle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxFrame * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFrame_GetTitle",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetTitle. Expected _wxFrame_p."); - return NULL; - } - } - _result = new wxString (wxFrame_GetTitle(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxFrame_Iconize(_swigobj,_swigarg0) (_swigobj->Iconize(_swigarg0)) -static PyObject *_wrap_wxFrame_Iconize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFrame * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxFrame_Iconize",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Iconize. Expected _wxFrame_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxFrame_Iconize(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFrame_IsIconized(_swigobj) (_swigobj->IsIconized()) -static PyObject *_wrap_wxFrame_IsIconized(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxFrame * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFrame_IsIconized",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_IsIconized. Expected _wxFrame_p."); - return NULL; - } - } - _result = (bool )wxFrame_IsIconized(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFrame_Maximize(_swigobj,_swigarg0) (_swigobj->Maximize(_swigarg0)) -static PyObject *_wrap_wxFrame_Maximize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFrame * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxFrame_Maximize",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Maximize. Expected _wxFrame_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxFrame_Maximize(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFrame_SetIcon(_swigobj,_swigarg0) (_swigobj->SetIcon(_swigarg0)) -static PyObject *_wrap_wxFrame_SetIcon(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFrame * _arg0; - wxIcon * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxFrame_SetIcon",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetIcon. Expected _wxFrame_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFrame_SetIcon. Expected _wxIcon_p."); - return NULL; - } - } - wxFrame_SetIcon(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFrame_SetMenuBar(_swigobj,_swigarg0) (_swigobj->SetMenuBar(_swigarg0)) -static PyObject *_wrap_wxFrame_SetMenuBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFrame * _arg0; - wxMenuBar * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxFrame_SetMenuBar",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetMenuBar. Expected _wxFrame_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFrame_SetMenuBar. Expected _wxMenuBar_p."); - return NULL; - } - } - wxFrame_SetMenuBar(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFrame_SetStatusText(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetStatusText(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxFrame_SetStatusText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFrame * _arg0; - wxString * _arg1; - int _arg2 = 0; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO|i:wxFrame_SetStatusText",&_argc0,&_obj1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetStatusText. Expected _wxFrame_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxFrame_SetStatusText(_arg0,*_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxFrame_SetStatusWidths(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetStatusWidths(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxFrame_SetStatusWidths(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFrame * _arg0; - int _arg1; - int * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxFrame_SetStatusWidths",&_argc0,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetStatusWidths. Expected _wxFrame_p."); - return NULL; - } - } - if (_obj2) -{ - _arg2 = int_LIST_helper(_obj2); - if (_arg2 == NULL) { - return NULL; - } -} -{ - _arg1 = PyList_Size(_obj2); -} - wxFrame_SetStatusWidths(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - delete [] _arg2; -} - return _resultobj; -} - -#define wxFrame_SetTitle(_swigobj,_swigarg0) (_swigobj->SetTitle(_swigarg0)) -static PyObject *_wrap_wxFrame_SetTitle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFrame * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxFrame_SetTitle",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetTitle. Expected _wxFrame_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxFrame_SetTitle(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static void *SwigwxPanelTowxWindow(void *ptr) { - wxPanel *src; - wxWindow *dest; - src = (wxPanel *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxPanelTowxEvtHandler(void *ptr) { - wxPanel *src; - wxEvtHandler *dest; - src = (wxPanel *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxPanel(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxPanel(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_new_wxPanel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPanel * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - long _arg4 = (wxTAB_TRAVERSAL); - char * _arg5 = "panel"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si|ssls:new_wxPanel",&_argc0,&_arg1,&_argc2,&_argc3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPanel. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxPanel. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxPanel. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxPanel *)new_wxPanel(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPanel_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPanel_InitDialog(_swigobj) (_swigobj->InitDialog()) -static PyObject *_wrap_wxPanel_InitDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPanel * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPanel_InitDialog",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPanel_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPanel_InitDialog. Expected _wxPanel_p."); - return NULL; - } - } - wxPanel_InitDialog(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxDialogTowxPanel(void *ptr) { - wxDialog *src; - wxPanel *dest; - src = (wxDialog *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxDialogTowxWindow(void *ptr) { - wxDialog *src; - wxWindow *dest; - src = (wxDialog *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxDialogTowxEvtHandler(void *ptr) { - wxDialog *src; - wxEvtHandler *dest; - src = (wxDialog *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDialog * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = (wxDEFAULT_DIALOG_STYLE); - char * _arg6 = "dialogBox"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|ssls:new_wxDialog",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDialog. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxDialog. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxDialog. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxDialog *)new_wxDialog(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxDialog_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxDialog_Centre(_swigobj,_swigarg0) (_swigobj->Centre(_swigarg0)) -static PyObject *_wrap_wxDialog_Centre(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDialog * _arg0; - int _arg1 = (wxBOTH); - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxDialog_Centre",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_Centre. Expected _wxDialog_p."); - return NULL; - } - } - wxDialog_Centre(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDialog_EndModal(_swigobj,_swigarg0) (_swigobj->EndModal(_swigarg0)) -static PyObject *_wrap_wxDialog_EndModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDialog * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxDialog_EndModal",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_EndModal. Expected _wxDialog_p."); - return NULL; - } - } - wxDialog_EndModal(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDialog_GetTitle(_swigobj) (_swigobj->GetTitle()) -static PyObject *_wrap_wxDialog_GetTitle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDialog_GetTitle",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_GetTitle. Expected _wxDialog_p."); - return NULL; - } - } - _result = new wxString (wxDialog_GetTitle(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxDialog_Iconize(_swigobj,_swigarg0) (_swigobj->Iconize(_swigarg0)) -static PyObject *_wrap_wxDialog_Iconize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDialog * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxDialog_Iconize",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_Iconize. Expected _wxDialog_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxDialog_Iconize(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDialog_IsIconized(_swigobj) (_swigobj->IsIconized()) -static PyObject *_wrap_wxDialog_IsIconized(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDialog_IsIconized",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_IsIconized. Expected _wxDialog_p."); - return NULL; - } - } - _result = (bool )wxDialog_IsIconized(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDialog_SetModal(_swigobj,_swigarg0) (_swigobj->SetModal(_swigarg0)) -static PyObject *_wrap_wxDialog_SetModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDialog * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxDialog_SetModal",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_SetModal. Expected _wxDialog_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxDialog_SetModal(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDialog_IsModal(_swigobj) (_swigobj->IsModal()) -static PyObject *_wrap_wxDialog_IsModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDialog_IsModal",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_IsModal. Expected _wxDialog_p."); - return NULL; - } - } - _result = (bool )wxDialog_IsModal(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDialog_SetTitle(_swigobj,_swigarg0) (_swigobj->SetTitle(_swigarg0)) -static PyObject *_wrap_wxDialog_SetTitle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDialog * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxDialog_SetTitle",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_SetTitle. Expected _wxDialog_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxDialog_SetTitle(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxDialog_Show(_swigobj,_swigarg0) (_swigobj->Show(_swigarg0)) -static PyObject *_wrap_wxDialog_Show(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxDialog * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxDialog_Show",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_Show. Expected _wxDialog_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - _result = (bool )wxDialog_Show(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) -static PyObject *_wrap_wxDialog_ShowModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDialog_ShowModal",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_ShowModal. Expected _wxDialog_p."); - return NULL; - } - } - _result = (int )wxDialog_ShowModal(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxScrolledWindowTowxWindow(void *ptr) { - wxScrolledWindow *src; - wxWindow *dest; - src = (wxScrolledWindow *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxScrolledWindowTowxEvtHandler(void *ptr) { - wxScrolledWindow *src; - wxEvtHandler *dest; - src = (wxScrolledWindow *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxScrolledWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxScrolledWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_new_wxScrolledWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrolledWindow * _result; - wxWindow * _arg0; - wxWindowID _arg1 = -1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - long _arg4 = (wxHSCROLL)|(wxVSCROLL); - char * _arg5 = "scrolledWindow"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|issls:new_wxScrolledWindow",&_argc0,&_arg1,&_argc2,&_argc3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxScrolledWindow. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxScrolledWindow. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxScrolledWindow. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxScrolledWindow *)new_wxScrolledWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxScrolledWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxScrolledWindow_EnableScrolling(_swigobj,_swigarg0,_swigarg1) (_swigobj->EnableScrolling(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxScrolledWindow_EnableScrolling(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrolledWindow * _arg0; - bool _arg1; - bool _arg2; - char * _argc0 = 0; - int tempbool1; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxScrolledWindow_EnableScrolling",&_argc0,&tempbool1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrolledWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_EnableScrolling. Expected _wxScrolledWindow_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - _arg2 = (bool ) tempbool2; - wxScrolledWindow_EnableScrolling(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxScrolledWindow_GetScrollPixelsPerUnit(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetScrollPixelsPerUnit(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxScrolledWindow_GetScrollPixelsPerUnit(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrolledWindow * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxScrolledWindow_GetScrollPixelsPerUnit",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrolledWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_GetScrollPixelsPerUnit. Expected _wxScrolledWindow_p."); - return NULL; - } - } - wxScrolledWindow_GetScrollPixelsPerUnit(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxScrolledWindow_GetVirtualSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetVirtualSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxScrolledWindow_GetVirtualSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrolledWindow * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxScrolledWindow_GetVirtualSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrolledWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_GetVirtualSize. Expected _wxScrolledWindow_p."); - return NULL; - } - } - wxScrolledWindow_GetVirtualSize(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxScrolledWindow_IsRetained(_swigobj) (_swigobj->IsRetained()) -static PyObject *_wrap_wxScrolledWindow_IsRetained(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxScrolledWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxScrolledWindow_IsRetained",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrolledWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_IsRetained. Expected _wxScrolledWindow_p."); - return NULL; - } - } - _result = (bool )wxScrolledWindow_IsRetained(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxScrolledWindow_PrepareDC(_swigobj,_swigarg0) (_swigobj->PrepareDC(_swigarg0)) -static PyObject *_wrap_wxScrolledWindow_PrepareDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrolledWindow * _arg0; - wxDC * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxScrolledWindow_PrepareDC",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrolledWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_PrepareDC. Expected _wxScrolledWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxScrolledWindow_PrepareDC. Expected _wxDC_p."); - return NULL; - } - } - wxScrolledWindow_PrepareDC(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxScrolledWindow_Scroll(_swigobj,_swigarg0,_swigarg1) (_swigobj->Scroll(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxScrolledWindow_Scroll(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrolledWindow * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxScrolledWindow_Scroll",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrolledWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_Scroll. Expected _wxScrolledWindow_p."); - return NULL; - } - } - wxScrolledWindow_Scroll(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxScrolledWindow_SetScrollbars(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->SetScrollbars(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_wxScrolledWindow_SetScrollbars(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrolledWindow * _arg0; - int _arg1; - int _arg2; - int _arg3; - int _arg4; - int _arg5 = 0; - int _arg6 = 0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siiii|ii:wxScrolledWindow_SetScrollbars",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrolledWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_SetScrollbars. Expected _wxScrolledWindow_p."); - return NULL; - } - } - wxScrolledWindow_SetScrollbars(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxScrolledWindow_ViewStart(_swigobj,_swigarg0,_swigarg1) (_swigobj->ViewStart(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxScrolledWindow_ViewStart(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrolledWindow * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxScrolledWindow_ViewStart",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrolledWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_ViewStart. Expected _wxScrolledWindow_p."); - return NULL; - } - } - wxScrolledWindow_ViewStart(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -static void *SwigwxMenuTowxEvtHandler(void *ptr) { - wxMenu *src; - wxEvtHandler *dest; - src = (wxMenu *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxMenu(_swigarg0) (new wxMenu(_swigarg0)) -static PyObject *_wrap_new_wxMenu(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _result; - wxString * _arg0 = &wxPyEmptyStr; - PyObject * _obj0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"|O:new_wxMenu",&_obj0)) - return NULL; - if (_obj0) -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - _result = (wxMenu *)new_wxMenu(*_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -#define wxMenu_Append(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Append(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxMenu_Append(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _arg0; - int _arg1; - wxString * _arg2; - wxString * _arg3 = &wxPyEmptyStr; - int _arg4 = (0); - char * _argc0 = 0; - PyObject * _obj2 = 0; - PyObject * _obj3 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siO|Oi:wxMenu_Append",&_argc0,&_arg1,&_obj2,&_obj3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_Append. Expected _wxMenu_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_obj3) -{ - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AsString(_obj3)); -} - wxMenu_Append(_arg0,_arg1,*_arg2,*_arg3,_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} -{ - if (_obj3) - delete _arg3; -} - return _resultobj; -} - -#define wxMenu_AppendMenu(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Append(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxMenu_AppendMenu(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _arg0; - int _arg1; - wxString * _arg2; - wxMenu * _arg3; - wxString * _arg4 = &wxPyEmptyStr; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - PyObject * _obj4 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siOs|O:wxMenu_AppendMenu",&_argc0,&_arg1,&_obj2,&_argc3,&_obj4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_AppendMenu. Expected _wxMenu_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxMenu_AppendMenu. Expected _wxMenu_p."); - return NULL; - } - } - if (_obj4) -{ - if (!PyString_Check(_obj4)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg4 = new wxString(PyString_AsString(_obj4)); -} - wxMenu_AppendMenu(_arg0,_arg1,*_arg2,_arg3,*_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} -{ - if (_obj4) - delete _arg4; -} - return _resultobj; -} - -#define wxMenu_AppendSeparator(_swigobj) (_swigobj->AppendSeparator()) -static PyObject *_wrap_wxMenu_AppendSeparator(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenu_AppendSeparator",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_AppendSeparator. Expected _wxMenu_p."); - return NULL; - } - } - wxMenu_AppendSeparator(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMenu_Break(_swigobj) (_swigobj->Break()) -static PyObject *_wrap_wxMenu_Break(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenu_Break",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_Break. Expected _wxMenu_p."); - return NULL; - } - } - wxMenu_Break(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMenu_Check(_swigobj,_swigarg0,_swigarg1) (_swigobj->Check(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMenu_Check(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _arg0; - int _arg1; - bool _arg2; - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxMenu_Check",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_Check. Expected _wxMenu_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - wxMenu_Check(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMenu_Enable(_swigobj,_swigarg0,_swigarg1) (_swigobj->Enable(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMenu_Enable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _arg0; - int _arg1; - bool _arg2; - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxMenu_Enable",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_Enable. Expected _wxMenu_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - wxMenu_Enable(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMenu_FindItem(_swigobj,_swigarg0) (_swigobj->FindItem(_swigarg0)) -static PyObject *_wrap_wxMenu_FindItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxMenu * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxMenu_FindItem",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_FindItem. Expected _wxMenu_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (int )wxMenu_FindItem(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxMenu_FindItemForId(_swigobj,_swigarg0) (_swigobj->FindItemForId(_swigarg0)) -static PyObject *_wrap_wxMenu_FindItemForId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuItem * _result; - wxMenu * _arg0; - int _arg1; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenu_FindItemForId",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_FindItemForId. Expected _wxMenu_p."); - return NULL; - } - } - _result = (wxMenuItem *)wxMenu_FindItemForId(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMenu_GetHelpString(_swigobj,_swigarg0) (_swigobj->GetHelpString(_swigarg0)) -static PyObject *_wrap_wxMenu_GetHelpString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxMenu * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenu_GetHelpString",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_GetHelpString. Expected _wxMenu_p."); - return NULL; - } - } - _result = new wxString (wxMenu_GetHelpString(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxMenu_GetLabel(_swigobj,_swigarg0) (_swigobj->GetLabel(_swigarg0)) -static PyObject *_wrap_wxMenu_GetLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxMenu * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenu_GetLabel",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_GetLabel. Expected _wxMenu_p."); - return NULL; - } - } - _result = new wxString (wxMenu_GetLabel(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxMenu_SetHelpString(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetHelpString(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMenu_SetHelpString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _arg0; - int _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siO:wxMenu_SetHelpString",&_argc0,&_arg1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_SetHelpString. Expected _wxMenu_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - wxMenu_SetHelpString(_arg0,_arg1,*_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxMenu_IsChecked(_swigobj,_swigarg0) (_swigobj->IsChecked(_swigarg0)) -static PyObject *_wrap_wxMenu_IsChecked(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMenu * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenu_IsChecked",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_IsChecked. Expected _wxMenu_p."); - return NULL; - } - } - _result = (bool )wxMenu_IsChecked(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMenu_IsEnabled(_swigobj,_swigarg0) (_swigobj->IsEnabled(_swigarg0)) -static PyObject *_wrap_wxMenu_IsEnabled(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMenu * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenu_IsEnabled",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_IsEnabled. Expected _wxMenu_p."); - return NULL; - } - } - _result = (bool )wxMenu_IsEnabled(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMenu_SetLabel(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetLabel(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMenu_SetLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _arg0; - int _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siO:wxMenu_SetLabel",&_argc0,&_arg1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_SetLabel. Expected _wxMenu_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - wxMenu_SetLabel(_arg0,_arg1,*_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -static void *SwigwxPyMenuTowxMenu(void *ptr) { - wxPyMenu *src; - wxMenu *dest; - src = (wxPyMenu *) ptr; - dest = (wxMenu *) src; - return (void *) dest; -} - -static void *SwigwxPyMenuTowxEvtHandler(void *ptr) { - wxPyMenu *src; - wxEvtHandler *dest; - src = (wxPyMenu *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxPyMenu(_swigarg0,_swigarg1) (new wxPyMenu(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxPyMenu(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyMenu * _result; - wxString * _arg0 = &wxPyEmptyStr; - PyObject * _arg1 = NULL; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"|OO:new_wxPyMenu",&_obj0,&_obj1)) - return NULL; - if (_obj0) -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - if (_obj1) -{ - _arg1 = _obj1; -} - _result = (wxPyMenu *)new_wxPyMenu(*_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyMenu_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -#define delete_wxPyMenu(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxPyMenu(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyMenu * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxPyMenu",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPyMenu. Expected _wxPyMenu_p."); - return NULL; - } - } - delete_wxPyMenu(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxMenuBarTowxEvtHandler(void *ptr) { - wxMenuBar *src; - wxEvtHandler *dest; - src = (wxMenuBar *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxMenuBar() (new wxMenuBar()) -static PyObject *_wrap_new_wxMenuBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuBar * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxMenuBar")) - return NULL; - _result = (wxMenuBar *)new_wxMenuBar(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMenuBar_Append(_swigobj,_swigarg0,_swigarg1) (_swigobj->Append(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMenuBar_Append(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuBar * _arg0; - wxMenu * _arg1; - wxString * _arg2; - char * _argc0 = 0; - char * _argc1 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ssO:wxMenuBar_Append",&_argc0,&_argc1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_Append. Expected _wxMenuBar_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMenuBar_Append. Expected _wxMenu_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - wxMenuBar_Append(_arg0,_arg1,*_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxMenuBar_Check(_swigobj,_swigarg0,_swigarg1) (_swigobj->Check(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMenuBar_Check(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuBar * _arg0; - int _arg1; - bool _arg2; - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxMenuBar_Check",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_Check. Expected _wxMenuBar_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - wxMenuBar_Check(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMenuBar_Checked(_swigobj,_swigarg0) (_swigobj->Checked(_swigarg0)) -static PyObject *_wrap_wxMenuBar_Checked(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMenuBar * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenuBar_Checked",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_Checked. Expected _wxMenuBar_p."); - return NULL; - } - } - _result = (bool )wxMenuBar_Checked(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMenuBar_Enable(_swigobj,_swigarg0,_swigarg1) (_swigobj->Enable(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMenuBar_Enable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuBar * _arg0; - int _arg1; - bool _arg2; - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxMenuBar_Enable",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_Enable. Expected _wxMenuBar_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - wxMenuBar_Enable(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMenuBar_Enabled(_swigobj,_swigarg0) (_swigobj->Enabled(_swigarg0)) -static PyObject *_wrap_wxMenuBar_Enabled(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMenuBar * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenuBar_Enabled",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_Enabled. Expected _wxMenuBar_p."); - return NULL; - } - } - _result = (bool )wxMenuBar_Enabled(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMenuBar_FindMenuItem(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindMenuItem(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMenuBar_FindMenuItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxMenuBar * _arg0; - wxString * _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sOO:wxMenuBar_FindMenuItem",&_argc0,&_obj1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_FindMenuItem. Expected _wxMenuBar_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - _result = (int )wxMenuBar_FindMenuItem(_arg0,*_arg1,*_arg2); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxMenuBar_FindItemForId(_swigobj,_swigarg0) (_swigobj->FindMenuItemById(_swigarg0)) -static PyObject *_wrap_wxMenuBar_FindItemForId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuItem * _result; - wxMenuBar * _arg0; - int _arg1; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenuBar_FindItemForId",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_FindItemForId. Expected _wxMenuBar_p."); - return NULL; - } - } - _result = (wxMenuItem *)wxMenuBar_FindItemForId(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMenuBar_GetMenuCount(_swigobj) (_swigobj->GetMenuCount()) -static PyObject *_wrap_wxMenuBar_GetMenuCount(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxMenuBar * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuBar_GetMenuCount",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_GetMenuCount. Expected _wxMenuBar_p."); - return NULL; - } - } - _result = (int )wxMenuBar_GetMenuCount(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMenuBar_GetMenu(_swigobj,_swigarg0) (_swigobj->GetMenu(_swigarg0)) -static PyObject *_wrap_wxMenuBar_GetMenu(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _result; - wxMenuBar * _arg0; - int _arg1; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenuBar_GetMenu",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_GetMenu. Expected _wxMenuBar_p."); - return NULL; - } - } - _result = (wxMenu *)wxMenuBar_GetMenu(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMenuItem_IsSeparator(_swigobj) (_swigobj->IsSeparator()) -static PyObject *_wrap_wxMenuItem_IsSeparator(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMenuItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuItem_IsSeparator",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_IsSeparator. Expected _wxMenuItem_p."); - return NULL; - } - } - _result = (bool )wxMenuItem_IsSeparator(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMenuItem_IsEnabled(_swigobj) (_swigobj->IsEnabled()) -static PyObject *_wrap_wxMenuItem_IsEnabled(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMenuItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuItem_IsEnabled",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_IsEnabled. Expected _wxMenuItem_p."); - return NULL; - } - } - _result = (bool )wxMenuItem_IsEnabled(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMenuItem_IsChecked(_swigobj) (_swigobj->IsChecked()) -static PyObject *_wrap_wxMenuItem_IsChecked(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMenuItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuItem_IsChecked",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_IsChecked. Expected _wxMenuItem_p."); - return NULL; - } - } - _result = (bool )wxMenuItem_IsChecked(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMenuItem_IsCheckable(_swigobj) (_swigobj->IsCheckable()) -static PyObject *_wrap_wxMenuItem_IsCheckable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMenuItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuItem_IsCheckable",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_IsCheckable. Expected _wxMenuItem_p."); - return NULL; - } - } - _result = (bool )wxMenuItem_IsCheckable(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMenuItem_GetId(_swigobj) (_swigobj->GetId()) -static PyObject *_wrap_wxMenuItem_GetId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxMenuItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuItem_GetId",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_GetId. Expected _wxMenuItem_p."); - return NULL; - } - } - _result = (int )wxMenuItem_GetId(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMenuItem_GetSubMenu(_swigobj) (_swigobj->GetSubMenu()) -static PyObject *_wrap_wxMenuItem_GetSubMenu(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _result; - wxMenuItem * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuItem_GetSubMenu",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_GetSubMenu. Expected _wxMenuItem_p."); - return NULL; - } - } - _result = (wxMenu *)wxMenuItem_GetSubMenu(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMenuItem_GetHelp(_swigobj) (_swigobj->GetHelp()) -static PyObject *_wrap_wxMenuItem_GetHelp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxMenuItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuItem_GetHelp",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_GetHelp. Expected _wxMenuItem_p."); - return NULL; - } - } - const wxString & _result_ref = wxMenuItem_GetHelp(_arg0); - _result = (wxString *) &_result_ref; -{ - _resultobj = PyString_FromString(WXSTRINGCAST (*_result)); -} - return _resultobj; -} - -#define wxMenuItem_SetHelp(_swigobj,_swigarg0) (_swigobj->SetHelp(_swigarg0)) -static PyObject *_wrap_wxMenuItem_SetHelp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuItem * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxMenuItem_SetHelp",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_SetHelp. Expected _wxMenuItem_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxMenuItem_SetHelp(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxMenuItem_Enable(_swigobj,_swigarg0) (_swigobj->Enable(_swigarg0)) -static PyObject *_wrap_wxMenuItem_Enable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuItem * _arg0; - bool _arg1 = (1); - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxMenuItem_Enable",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_Enable. Expected _wxMenuItem_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxMenuItem_Enable(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMenuItem_Check(_swigobj,_swigarg0) (_swigobj->Check(_swigarg0)) -static PyObject *_wrap_wxMenuItem_Check(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuItem * _arg0; - bool _arg1 = (1); - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxMenuItem_Check",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_Check. Expected _wxMenuItem_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxMenuItem_Check(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyMethodDef windowscMethods[] = { - { "wxMenuItem_Check", _wrap_wxMenuItem_Check, 1 }, - { "wxMenuItem_Enable", _wrap_wxMenuItem_Enable, 1 }, - { "wxMenuItem_SetHelp", _wrap_wxMenuItem_SetHelp, 1 }, - { "wxMenuItem_GetHelp", _wrap_wxMenuItem_GetHelp, 1 }, - { "wxMenuItem_GetSubMenu", _wrap_wxMenuItem_GetSubMenu, 1 }, - { "wxMenuItem_GetId", _wrap_wxMenuItem_GetId, 1 }, - { "wxMenuItem_IsCheckable", _wrap_wxMenuItem_IsCheckable, 1 }, - { "wxMenuItem_IsChecked", _wrap_wxMenuItem_IsChecked, 1 }, - { "wxMenuItem_IsEnabled", _wrap_wxMenuItem_IsEnabled, 1 }, - { "wxMenuItem_IsSeparator", _wrap_wxMenuItem_IsSeparator, 1 }, - { "wxMenuBar_GetMenu", _wrap_wxMenuBar_GetMenu, 1 }, - { "wxMenuBar_GetMenuCount", _wrap_wxMenuBar_GetMenuCount, 1 }, - { "wxMenuBar_FindItemForId", _wrap_wxMenuBar_FindItemForId, 1 }, - { "wxMenuBar_FindMenuItem", _wrap_wxMenuBar_FindMenuItem, 1 }, - { "wxMenuBar_Enabled", _wrap_wxMenuBar_Enabled, 1 }, - { "wxMenuBar_Enable", _wrap_wxMenuBar_Enable, 1 }, - { "wxMenuBar_Checked", _wrap_wxMenuBar_Checked, 1 }, - { "wxMenuBar_Check", _wrap_wxMenuBar_Check, 1 }, - { "wxMenuBar_Append", _wrap_wxMenuBar_Append, 1 }, - { "new_wxMenuBar", _wrap_new_wxMenuBar, 1 }, - { "delete_wxPyMenu", _wrap_delete_wxPyMenu, 1 }, - { "new_wxPyMenu", _wrap_new_wxPyMenu, 1 }, - { "wxMenu_SetLabel", _wrap_wxMenu_SetLabel, 1 }, - { "wxMenu_IsEnabled", _wrap_wxMenu_IsEnabled, 1 }, - { "wxMenu_IsChecked", _wrap_wxMenu_IsChecked, 1 }, - { "wxMenu_SetHelpString", _wrap_wxMenu_SetHelpString, 1 }, - { "wxMenu_GetLabel", _wrap_wxMenu_GetLabel, 1 }, - { "wxMenu_GetHelpString", _wrap_wxMenu_GetHelpString, 1 }, - { "wxMenu_FindItemForId", _wrap_wxMenu_FindItemForId, 1 }, - { "wxMenu_FindItem", _wrap_wxMenu_FindItem, 1 }, - { "wxMenu_Enable", _wrap_wxMenu_Enable, 1 }, - { "wxMenu_Check", _wrap_wxMenu_Check, 1 }, - { "wxMenu_Break", _wrap_wxMenu_Break, 1 }, - { "wxMenu_AppendSeparator", _wrap_wxMenu_AppendSeparator, 1 }, - { "wxMenu_AppendMenu", _wrap_wxMenu_AppendMenu, 1 }, - { "wxMenu_Append", _wrap_wxMenu_Append, 1 }, - { "new_wxMenu", _wrap_new_wxMenu, 1 }, - { "wxScrolledWindow_ViewStart", _wrap_wxScrolledWindow_ViewStart, 1 }, - { "wxScrolledWindow_SetScrollbars", _wrap_wxScrolledWindow_SetScrollbars, 1 }, - { "wxScrolledWindow_Scroll", _wrap_wxScrolledWindow_Scroll, 1 }, - { "wxScrolledWindow_PrepareDC", _wrap_wxScrolledWindow_PrepareDC, 1 }, - { "wxScrolledWindow_IsRetained", _wrap_wxScrolledWindow_IsRetained, 1 }, - { "wxScrolledWindow_GetVirtualSize", _wrap_wxScrolledWindow_GetVirtualSize, 1 }, - { "wxScrolledWindow_GetScrollPixelsPerUnit", _wrap_wxScrolledWindow_GetScrollPixelsPerUnit, 1 }, - { "wxScrolledWindow_EnableScrolling", _wrap_wxScrolledWindow_EnableScrolling, 1 }, - { "new_wxScrolledWindow", _wrap_new_wxScrolledWindow, 1 }, - { "wxDialog_ShowModal", _wrap_wxDialog_ShowModal, 1 }, - { "wxDialog_Show", _wrap_wxDialog_Show, 1 }, - { "wxDialog_SetTitle", _wrap_wxDialog_SetTitle, 1 }, - { "wxDialog_IsModal", _wrap_wxDialog_IsModal, 1 }, - { "wxDialog_SetModal", _wrap_wxDialog_SetModal, 1 }, - { "wxDialog_IsIconized", _wrap_wxDialog_IsIconized, 1 }, - { "wxDialog_Iconize", _wrap_wxDialog_Iconize, 1 }, - { "wxDialog_GetTitle", _wrap_wxDialog_GetTitle, 1 }, - { "wxDialog_EndModal", _wrap_wxDialog_EndModal, 1 }, - { "wxDialog_Centre", _wrap_wxDialog_Centre, 1 }, - { "new_wxDialog", _wrap_new_wxDialog, 1 }, - { "wxPanel_InitDialog", _wrap_wxPanel_InitDialog, 1 }, - { "new_wxPanel", _wrap_new_wxPanel, 1 }, - { "wxFrame_SetTitle", _wrap_wxFrame_SetTitle, 1 }, - { "wxFrame_SetStatusWidths", _wrap_wxFrame_SetStatusWidths, 1 }, - { "wxFrame_SetStatusText", _wrap_wxFrame_SetStatusText, 1 }, - { "wxFrame_SetMenuBar", _wrap_wxFrame_SetMenuBar, 1 }, - { "wxFrame_SetIcon", _wrap_wxFrame_SetIcon, 1 }, - { "wxFrame_Maximize", _wrap_wxFrame_Maximize, 1 }, - { "wxFrame_IsIconized", _wrap_wxFrame_IsIconized, 1 }, - { "wxFrame_Iconize", _wrap_wxFrame_Iconize, 1 }, - { "wxFrame_GetTitle", _wrap_wxFrame_GetTitle, 1 }, - { "wxFrame_GetStatusBar", _wrap_wxFrame_GetStatusBar, 1 }, - { "wxFrame_GetMenuBar", _wrap_wxFrame_GetMenuBar, 1 }, - { "wxFrame_CreateStatusBar", _wrap_wxFrame_CreateStatusBar, 1 }, - { "wxFrame_Centre", _wrap_wxFrame_Centre, 1 }, - { "new_wxFrame", _wrap_new_wxFrame, 1 }, - { "wxWindow_Validate", _wrap_wxWindow_Validate, 1 }, - { "wxWindow_TransferDataToWindow", _wrap_wxWindow_TransferDataToWindow, 1 }, - { "wxWindow_TransferDataFromWindow", _wrap_wxWindow_TransferDataFromWindow, 1 }, - { "wxWindow_Show", _wrap_wxWindow_Show, 1 }, - { "wxWindow_SetTitle", _wrap_wxWindow_SetTitle, 1 }, - { "wxWindow_SetCursor", _wrap_wxWindow_SetCursor, 1 }, - { "wxWindow_SetClientSize", _wrap_wxWindow_SetClientSize, 1 }, - { "wxWindow_SetSizeHints", _wrap_wxWindow_SetSizeHints, 1 }, - { "wxWindow_SetPosition", _wrap_wxWindow_SetPosition, 1 }, - { "wxWindow_SetSize", _wrap_wxWindow_SetSize, 1 }, - { "wxWindow_SetDimensions", _wrap_wxWindow_SetDimensions, 1 }, - { "wxWindow_SetScrollPos", _wrap_wxWindow_SetScrollPos, 1 }, - { "wxWindow_SetScrollbar", _wrap_wxWindow_SetScrollbar, 1 }, - { "wxWindow_SetReturnCode", _wrap_wxWindow_SetReturnCode, 1 }, - { "wxWindow_SetName", _wrap_wxWindow_SetName, 1 }, - { "wxWindow_SetId", _wrap_wxWindow_SetId, 1 }, - { "wxWindow_SetForegroundColour", _wrap_wxWindow_SetForegroundColour, 1 }, - { "wxWindow_SetFont", _wrap_wxWindow_SetFont, 1 }, - { "wxWindow_SetFocus", _wrap_wxWindow_SetFocus, 1 }, - { "wxWindow_SetDoubleClick", _wrap_wxWindow_SetDoubleClick, 1 }, - { "wxWindow_SetConstraints", _wrap_wxWindow_SetConstraints, 1 }, - { "wxWindow_SetBackgroundColour", _wrap_wxWindow_SetBackgroundColour, 1 }, - { "wxWindow_SetAutoLayout", _wrap_wxWindow_SetAutoLayout, 1 }, - { "wxWindow_ScrollWindow", _wrap_wxWindow_ScrollWindow, 1 }, - { "wxWindow_ScreenToClient", _wrap_wxWindow_ScreenToClient, 1 }, - { "wxWindow_ReleaseMouse", _wrap_wxWindow_ReleaseMouse, 1 }, - { "wxWindow_Refresh", _wrap_wxWindow_Refresh, 1 }, - { "wxWindow_Raise", _wrap_wxWindow_Raise, 1 }, - { "wxWindow_PopupMenu", _wrap_wxWindow_PopupMenu, 1 }, - { "wxWindow_Move", _wrap_wxWindow_Move, 1 }, - { "wxWindow_MakeModal", _wrap_wxWindow_MakeModal, 1 }, - { "wxWindow_Lower", _wrap_wxWindow_Lower, 1 }, - { "wxWindow_LoadFromResource", _wrap_wxWindow_LoadFromResource, 1 }, - { "wxWindow_Layout", _wrap_wxWindow_Layout, 1 }, - { "wxWindow_IsShown", _wrap_wxWindow_IsShown, 1 }, - { "wxWindow_IsRetained", _wrap_wxWindow_IsRetained, 1 }, - { "wxWindow_IsEnabled", _wrap_wxWindow_IsEnabled, 1 }, - { "wxWindow_InitDialog", _wrap_wxWindow_InitDialog, 1 }, - { "wxWindow_GetWindowStyleFlag", _wrap_wxWindow_GetWindowStyleFlag, 1 }, - { "wxWindow_GetTitle", _wrap_wxWindow_GetTitle, 1 }, - { "wxWindow_GetTextExtent", _wrap_wxWindow_GetTextExtent, 1 }, - { "wxWindow_GetSize", _wrap_wxWindow_GetSize, 1 }, - { "wxWindow_GetScrollRange", _wrap_wxWindow_GetScrollRange, 1 }, - { "wxWindow_GetScrollPos", _wrap_wxWindow_GetScrollPos, 1 }, - { "wxWindow_GetScrollThumb", _wrap_wxWindow_GetScrollThumb, 1 }, - { "wxWindow_GetReturnCode", _wrap_wxWindow_GetReturnCode, 1 }, - { "wxWindow_GetParent", _wrap_wxWindow_GetParent, 1 }, - { "wxWindow_GetName", _wrap_wxWindow_GetName, 1 }, - { "wxWindow_GetLabel", _wrap_wxWindow_GetLabel, 1 }, - { "wxWindow_GetPosition", _wrap_wxWindow_GetPosition, 1 }, - { "wxWindow_GetId", _wrap_wxWindow_GetId, 1 }, - { "wxWindow_GetGrandParent", _wrap_wxWindow_GetGrandParent, 1 }, - { "wxWindow_GetForegroundColour", _wrap_wxWindow_GetForegroundColour, 1 }, - { "wxWindow_GetFont", _wrap_wxWindow_GetFont, 1 }, - { "wxWindow_GetConstraints", _wrap_wxWindow_GetConstraints, 1 }, - { "wxWindow_GetClientSize", _wrap_wxWindow_GetClientSize, 1 }, - { "wxWindow_GetCharWidth", _wrap_wxWindow_GetCharWidth, 1 }, - { "wxWindow_GetCharHeight", _wrap_wxWindow_GetCharHeight, 1 }, - { "wxWindow_GetBackgroundColour", _wrap_wxWindow_GetBackgroundColour, 1 }, - { "wxWindow_Fit", _wrap_wxWindow_Fit, 1 }, - { "wxWindow_FindWindowByName", _wrap_wxWindow_FindWindowByName, 1 }, - { "wxWindow_FindWindowByID", _wrap_wxWindow_FindWindowByID, 1 }, - { "wxWindow_Enable", _wrap_wxWindow_Enable, 1 }, - { "wxWindow_DestroyChildren", _wrap_wxWindow_DestroyChildren, 1 }, - { "wxWindow_Destroy", _wrap_wxWindow_Destroy, 1 }, - { "wxWindow_Close", _wrap_wxWindow_Close, 1 }, - { "wxWindow_ClientToScreen", _wrap_wxWindow_ClientToScreen, 1 }, - { "wxWindow_Centre", _wrap_wxWindow_Centre, 1 }, - { "wxWindow_Center", _wrap_wxWindow_Center, 1 }, - { "wxWindow_CaptureMouse", _wrap_wxWindow_CaptureMouse, 1 }, - { "new_wxWindow", _wrap_new_wxWindow, 1 }, - { "wxEvtHandler_Connect", _wrap_wxEvtHandler_Connect, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initwindowsc)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("windowsc", windowscMethods); - d = PyModule_GetDict(m); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMenuBar",SwigwxMenuBarTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxMenuBar",SwigwxMenuBarTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxPyMenu",SwigwxPyMenuTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxPyMenu",SwigwxPyMenuTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMenu",SwigwxMenuTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxMenu",SwigwxMenuTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxScrolledWindow",SwigwxScrolledWindowTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxScrolledWindow",SwigwxScrolledWindowTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxDialog",SwigwxDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxDialog",SwigwxDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxPanel",SwigwxPanelTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxPanel",SwigwxPanelTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxFrame",SwigwxFrameTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxFrame",SwigwxFrameTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxWindow",SwigwxWindowTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxWindow",SwigwxWindowTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxEvtHandler",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); - SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); - SWIG_RegisterMapping("_wxPen","_class_wxPen",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_long","_wxDash",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_wxDC","_class_wxDC",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_class_wxMenuItem","_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxPanel","_class_wxDialog",SwigwxDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_wxDialog",SwigwxDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_class_wxPanel",0); - SWIG_RegisterMapping("_class_wxMask","_wxMask",0); - SWIG_RegisterMapping("_wxColour","_class_wxColour",0); - SWIG_RegisterMapping("_class_wxDialog","_wxDialog",0); - SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_wxFont","_class_wxFont",0); - SWIG_RegisterMapping("_unsigned_long","_wxDash",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxDC","_wxDC",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_class_wxPanel","_class_wxDialog",SwigwxDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxDialog",SwigwxDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxPanel",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxMenu","_class_wxPyMenu",SwigwxPyMenuTowxMenu); - SWIG_RegisterMapping("_wxMenu","_wxPyMenu",SwigwxPyMenuTowxMenu); - SWIG_RegisterMapping("_wxMenu","_class_wxMenu",0); - SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_class_wxBrush","_wxBrush",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxWindow","_class_wxScrolledWindow",SwigwxScrolledWindowTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxScrolledWindow",SwigwxScrolledWindowTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxDialog",SwigwxDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxDialog",SwigwxDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxPanel",SwigwxPanelTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxPanel",SwigwxPanelTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxFrame",SwigwxFrameTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxFrame",SwigwxFrameTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxWindow",0); - SWIG_RegisterMapping("_class_wxFont","_wxFont",0); - SWIG_RegisterMapping("_wxClientDC","_class_wxClientDC",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_wxMemoryDC","_class_wxMemoryDC",0); - SWIG_RegisterMapping("_wxPaintDC","_class_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); - SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_class_wxMenu","_class_wxPyMenu",SwigwxPyMenuTowxMenu); - SWIG_RegisterMapping("_class_wxMenu","_wxPyMenu",SwigwxPyMenuTowxMenu); - SWIG_RegisterMapping("_class_wxMenu","_wxMenu",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); - SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); - SWIG_RegisterMapping("_class_wxPen","_wxPen",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_wxFrame","_class_wxFrame",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxPaintDC","_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_class_wxIcon","_wxIcon",0); - SWIG_RegisterMapping("_class_wxColour","_wxColour",0); - SWIG_RegisterMapping("_class_wxScreenDC","_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxClientDC","_wxClientDC",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); - SWIG_RegisterMapping("_class_wxBitmap","_wxBitmap",0); - SWIG_RegisterMapping("_class_wxMemoryDC","_wxMemoryDC",0); - SWIG_RegisterMapping("_wxMenuBar","_class_wxMenuBar",0); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxMenuBar",SwigwxMenuBarTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxMenuBar",SwigwxMenuBarTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxPyMenu",SwigwxPyMenuTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxPyMenu",SwigwxPyMenuTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxMenu",SwigwxMenuTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxMenu",SwigwxMenuTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxScrolledWindow",SwigwxScrolledWindowTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxScrolledWindow",SwigwxScrolledWindowTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxDialog",SwigwxDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxDialog",SwigwxDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxPanel",SwigwxPanelTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxPanel",SwigwxPanelTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxFrame",SwigwxFrameTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxFrame",SwigwxFrameTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxWindow",SwigwxWindowTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxWindow",SwigwxWindowTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxEvtHandler",0); - SWIG_RegisterMapping("_wxMenuItem","_class_wxMenuItem",0); - SWIG_RegisterMapping("_wxDash","_unsigned_long",0); - SWIG_RegisterMapping("_wxDash","_long",0); - SWIG_RegisterMapping("_class_wxScrolledWindow","_wxScrolledWindow",0); - SWIG_RegisterMapping("_wxWindow","_class_wxScrolledWindow",SwigwxScrolledWindowTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxScrolledWindow",SwigwxScrolledWindowTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxDialog",SwigwxDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxDialog",SwigwxDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxPanel",SwigwxPanelTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxPanel",SwigwxPanelTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxFrame",SwigwxFrameTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxFrame",SwigwxFrameTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxWindow",0); - SWIG_RegisterMapping("_class_wxFrame","_wxFrame",0); -} diff --git a/utils/wxPython/src/gtk/windows.py b/utils/wxPython/src/gtk/windows.py deleted file mode 100644 index e334d32867..0000000000 --- a/utils/wxPython/src/gtk/windows.py +++ /dev/null @@ -1,616 +0,0 @@ -# This file was created automatically by SWIG. -import windowsc - -from misc import * - -from gdi import * -class wxEvtHandlerPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def Connect(self,arg0,arg1,arg2,arg3): - val = windowsc.wxEvtHandler_Connect(self.this,arg0,arg1,arg2,arg3) - return val - def __repr__(self): - return "" -class wxEvtHandler(wxEvtHandlerPtr): - def __init__(self,this): - self.this = this - - - - -class wxWindowPtr(wxEvtHandlerPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def CaptureMouse(self): - val = windowsc.wxWindow_CaptureMouse(self.this) - return val - def Center(self,*args): - val = apply(windowsc.wxWindow_Center,(self.this,)+args) - return val - def Centre(self,*args): - val = apply(windowsc.wxWindow_Centre,(self.this,)+args) - return val - def ClientToScreen(self,arg0,arg1): - val = windowsc.wxWindow_ClientToScreen(self.this,arg0,arg1) - return val - def Close(self,*args): - val = apply(windowsc.wxWindow_Close,(self.this,)+args) - return val - def Destroy(self): - val = windowsc.wxWindow_Destroy(self.this) - return val - def DestroyChildren(self): - val = windowsc.wxWindow_DestroyChildren(self.this) - return val - def Enable(self,arg0): - val = windowsc.wxWindow_Enable(self.this,arg0) - return val - def FindWindowByID(self,arg0): - val = windowsc.wxWindow_FindWindowByID(self.this,arg0) - val = wxWindowPtr(val) - return val - def FindWindowByName(self,arg0): - val = windowsc.wxWindow_FindWindowByName(self.this,arg0) - val = wxWindowPtr(val) - return val - def Fit(self): - val = windowsc.wxWindow_Fit(self.this) - return val - def GetBackgroundColour(self): - val = windowsc.wxWindow_GetBackgroundColour(self.this) - val = wxColourPtr(val) - val.thisown = 1 - return val - def GetCharHeight(self): - val = windowsc.wxWindow_GetCharHeight(self.this) - return val - def GetCharWidth(self): - val = windowsc.wxWindow_GetCharWidth(self.this) - return val - def GetClientSize(self): - val = windowsc.wxWindow_GetClientSize(self.this) - return val - def GetConstraints(self): - val = windowsc.wxWindow_GetConstraints(self.this) - val = wxLayoutConstraintsPtr(val) - return val - def GetFont(self): - val = windowsc.wxWindow_GetFont(self.this) - val = wxFontPtr(val) - return val - def GetForegroundColour(self): - val = windowsc.wxWindow_GetForegroundColour(self.this) - val = wxColourPtr(val) - val.thisown = 1 - return val - def GetGrandParent(self): - val = windowsc.wxWindow_GetGrandParent(self.this) - val = wxWindowPtr(val) - return val - def GetId(self): - val = windowsc.wxWindow_GetId(self.this) - return val - def GetPosition(self): - val = windowsc.wxWindow_GetPosition(self.this) - return val - def GetLabel(self): - val = windowsc.wxWindow_GetLabel(self.this) - return val - def GetName(self): - val = windowsc.wxWindow_GetName(self.this) - return val - def GetParent(self): - val = windowsc.wxWindow_GetParent(self.this) - val = wxWindowPtr(val) - return val - def GetReturnCode(self): - val = windowsc.wxWindow_GetReturnCode(self.this) - return val - def GetScrollThumb(self,arg0): - val = windowsc.wxWindow_GetScrollThumb(self.this,arg0) - return val - def GetScrollPos(self,arg0): - val = windowsc.wxWindow_GetScrollPos(self.this,arg0) - return val - def GetScrollRange(self,arg0): - val = windowsc.wxWindow_GetScrollRange(self.this,arg0) - return val - def GetSize(self): - val = windowsc.wxWindow_GetSize(self.this) - return val - def GetTextExtent(self,arg0): - val = windowsc.wxWindow_GetTextExtent(self.this,arg0) - return val - def GetTitle(self): - val = windowsc.wxWindow_GetTitle(self.this) - return val - def GetWindowStyleFlag(self): - val = windowsc.wxWindow_GetWindowStyleFlag(self.this) - return val - def InitDialog(self): - val = windowsc.wxWindow_InitDialog(self.this) - return val - def IsEnabled(self): - val = windowsc.wxWindow_IsEnabled(self.this) - return val - def IsRetained(self): - val = windowsc.wxWindow_IsRetained(self.this) - return val - def IsShown(self): - val = windowsc.wxWindow_IsShown(self.this) - return val - def Layout(self): - val = windowsc.wxWindow_Layout(self.this) - return val - def LoadFromResource(self,arg0,arg1,*args): - val = apply(windowsc.wxWindow_LoadFromResource,(self.this,arg0.this,arg1,)+args) - return val - def Lower(self): - val = windowsc.wxWindow_Lower(self.this) - return val - def MakeModal(self,arg0): - val = windowsc.wxWindow_MakeModal(self.this,arg0) - return val - def Move(self,arg0,arg1): - val = windowsc.wxWindow_Move(self.this,arg0,arg1) - return val - def PopupMenu(self,arg0,arg1,arg2): - val = windowsc.wxWindow_PopupMenu(self.this,arg0.this,arg1,arg2) - return val - def Raise(self): - val = windowsc.wxWindow_Raise(self.this) - return val - def Refresh(self,*args): - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - val = apply(windowsc.wxWindow_Refresh,(self.this,)+args) - return val - def ReleaseMouse(self): - val = windowsc.wxWindow_ReleaseMouse(self.this) - return val - def ScreenToClient(self,arg0,arg1): - val = windowsc.wxWindow_ScreenToClient(self.this,arg0,arg1) - return val - def ScrollWindow(self,arg0,arg1,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(windowsc.wxWindow_ScrollWindow,(self.this,arg0,arg1,)+args) - return val - def SetAutoLayout(self,arg0): - val = windowsc.wxWindow_SetAutoLayout(self.this,arg0) - return val - def SetBackgroundColour(self,arg0): - val = windowsc.wxWindow_SetBackgroundColour(self.this,arg0.this) - return val - def SetConstraints(self,arg0): - val = windowsc.wxWindow_SetConstraints(self.this,arg0.this) - return val - def SetDoubleClick(self,arg0): - val = windowsc.wxWindow_SetDoubleClick(self.this,arg0) - return val - def SetFocus(self): - val = windowsc.wxWindow_SetFocus(self.this) - return val - def SetFont(self,arg0): - val = windowsc.wxWindow_SetFont(self.this,arg0.this) - return val - def SetForegroundColour(self,arg0): - val = windowsc.wxWindow_SetForegroundColour(self.this,arg0.this) - return val - def SetId(self,arg0): - val = windowsc.wxWindow_SetId(self.this,arg0) - return val - def SetName(self,arg0): - val = windowsc.wxWindow_SetName(self.this,arg0) - return val - def SetReturnCode(self,arg0): - val = windowsc.wxWindow_SetReturnCode(self.this,arg0) - return val - def SetScrollbar(self,arg0,arg1,arg2,arg3,*args): - val = apply(windowsc.wxWindow_SetScrollbar,(self.this,arg0,arg1,arg2,arg3,)+args) - return val - def SetScrollPos(self,arg0,arg1,*args): - val = apply(windowsc.wxWindow_SetScrollPos,(self.this,arg0,arg1,)+args) - return val - def SetDimensions(self,arg0,arg1,arg2,arg3,*args): - val = apply(windowsc.wxWindow_SetDimensions,(self.this,arg0,arg1,arg2,arg3,)+args) - return val - def SetSize(self,arg0): - val = windowsc.wxWindow_SetSize(self.this,arg0.this) - return val - def SetPosition(self,arg0): - val = windowsc.wxWindow_SetPosition(self.this,arg0.this) - return val - def SetSizeHints(self,*args): - val = apply(windowsc.wxWindow_SetSizeHints,(self.this,)+args) - return val - def SetClientSize(self,arg0,arg1): - val = windowsc.wxWindow_SetClientSize(self.this,arg0,arg1) - return val - def SetCursor(self,arg0): - val = windowsc.wxWindow_SetCursor(self.this,arg0.this) - return val - def SetTitle(self,arg0): - val = windowsc.wxWindow_SetTitle(self.this,arg0) - return val - def Show(self,arg0): - val = windowsc.wxWindow_Show(self.this,arg0) - return val - def TransferDataFromWindow(self): - val = windowsc.wxWindow_TransferDataFromWindow(self.this) - return val - def TransferDataToWindow(self): - val = windowsc.wxWindow_TransferDataToWindow(self.this) - return val - def Validate(self): - val = windowsc.wxWindow_Validate(self.this) - return val - def __repr__(self): - return "" -class wxWindow(wxWindowPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxWindow,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - -class wxFramePtr(wxWindowPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Centre(self,*args): - val = apply(windowsc.wxFrame_Centre,(self.this,)+args) - return val - def CreateStatusBar(self,*args): - val = apply(windowsc.wxFrame_CreateStatusBar,(self.this,)+args) - return val - def GetMenuBar(self): - val = windowsc.wxFrame_GetMenuBar(self.this) - val = wxMenuBarPtr(val) - return val - def GetStatusBar(self): - val = windowsc.wxFrame_GetStatusBar(self.this) - return val - def GetTitle(self): - val = windowsc.wxFrame_GetTitle(self.this) - return val - def Iconize(self,arg0): - val = windowsc.wxFrame_Iconize(self.this,arg0) - return val - def IsIconized(self): - val = windowsc.wxFrame_IsIconized(self.this) - return val - def Maximize(self,arg0): - val = windowsc.wxFrame_Maximize(self.this,arg0) - return val - def SetIcon(self,arg0): - val = windowsc.wxFrame_SetIcon(self.this,arg0.this) - return val - def SetMenuBar(self,arg0): - val = windowsc.wxFrame_SetMenuBar(self.this,arg0.this) - return val - def SetStatusText(self,arg0,*args): - val = apply(windowsc.wxFrame_SetStatusText,(self.this,arg0,)+args) - return val - def SetStatusWidths(self,arg0,*args): - val = apply(windowsc.wxFrame_SetStatusWidths,(self.this,arg0,)+args) - return val - def SetTitle(self,arg0): - val = windowsc.wxFrame_SetTitle(self.this,arg0) - return val - def __repr__(self): - return "" -class wxFrame(wxFramePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxFrame,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxPanelPtr(wxWindowPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def InitDialog(self): - val = windowsc.wxPanel_InitDialog(self.this) - return val - def __repr__(self): - return "" -class wxPanel(wxPanelPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxPanel,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - -class wxDialogPtr(wxPanelPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Centre(self,*args): - val = apply(windowsc.wxDialog_Centre,(self.this,)+args) - return val - def EndModal(self,arg0): - val = windowsc.wxDialog_EndModal(self.this,arg0) - return val - def GetTitle(self): - val = windowsc.wxDialog_GetTitle(self.this) - return val - def Iconize(self,arg0): - val = windowsc.wxDialog_Iconize(self.this,arg0) - return val - def IsIconized(self): - val = windowsc.wxDialog_IsIconized(self.this) - return val - def SetModal(self,arg0): - val = windowsc.wxDialog_SetModal(self.this,arg0) - return val - def IsModal(self): - val = windowsc.wxDialog_IsModal(self.this) - return val - def SetTitle(self,arg0): - val = windowsc.wxDialog_SetTitle(self.this,arg0) - return val - def Show(self,arg0): - val = windowsc.wxDialog_Show(self.this,arg0) - return val - def ShowModal(self): - val = windowsc.wxDialog_ShowModal(self.this) - return val - def __repr__(self): - return "" -class wxDialog(wxDialogPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxDialog,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxScrolledWindowPtr(wxWindowPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def EnableScrolling(self,arg0,arg1): - val = windowsc.wxScrolledWindow_EnableScrolling(self.this,arg0,arg1) - return val - def GetScrollPixelsPerUnit(self): - val = windowsc.wxScrolledWindow_GetScrollPixelsPerUnit(self.this) - return val - def GetVirtualSize(self): - val = windowsc.wxScrolledWindow_GetVirtualSize(self.this) - return val - def IsRetained(self): - val = windowsc.wxScrolledWindow_IsRetained(self.this) - return val - def PrepareDC(self,arg0): - val = windowsc.wxScrolledWindow_PrepareDC(self.this,arg0.this) - return val - def Scroll(self,arg0,arg1): - val = windowsc.wxScrolledWindow_Scroll(self.this,arg0,arg1) - return val - def SetScrollbars(self,arg0,arg1,arg2,arg3,*args): - val = apply(windowsc.wxScrolledWindow_SetScrollbars,(self.this,arg0,arg1,arg2,arg3,)+args) - return val - def ViewStart(self): - val = windowsc.wxScrolledWindow_ViewStart(self.this) - return val - def __repr__(self): - return "" -class wxScrolledWindow(wxScrolledWindowPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxScrolledWindow,(arg0.this,)+args) - self.thisown = 1 - - - - -class wxMenuPtr(wxEvtHandlerPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Append(self,arg0,arg1,*args): - val = apply(windowsc.wxMenu_Append,(self.this,arg0,arg1,)+args) - return val - def AppendMenu(self,arg0,arg1,arg2,*args): - val = apply(windowsc.wxMenu_AppendMenu,(self.this,arg0,arg1,arg2.this,)+args) - return val - def AppendSeparator(self): - val = windowsc.wxMenu_AppendSeparator(self.this) - return val - def Break(self): - val = windowsc.wxMenu_Break(self.this) - return val - def Check(self,arg0,arg1): - val = windowsc.wxMenu_Check(self.this,arg0,arg1) - return val - def Enable(self,arg0,arg1): - val = windowsc.wxMenu_Enable(self.this,arg0,arg1) - return val - def FindItem(self,arg0): - val = windowsc.wxMenu_FindItem(self.this,arg0) - return val - def FindItemForId(self,arg0): - val = windowsc.wxMenu_FindItemForId(self.this,arg0) - val = wxMenuItemPtr(val) - return val - def GetHelpString(self,arg0): - val = windowsc.wxMenu_GetHelpString(self.this,arg0) - return val - def GetLabel(self,arg0): - val = windowsc.wxMenu_GetLabel(self.this,arg0) - return val - def SetHelpString(self,arg0,arg1): - val = windowsc.wxMenu_SetHelpString(self.this,arg0,arg1) - return val - def IsChecked(self,arg0): - val = windowsc.wxMenu_IsChecked(self.this,arg0) - return val - def IsEnabled(self,arg0): - val = windowsc.wxMenu_IsEnabled(self.this,arg0) - return val - def SetLabel(self,arg0,arg1): - val = windowsc.wxMenu_SetLabel(self.this,arg0,arg1) - return val - def __repr__(self): - return "" -class wxMenu(wxMenuPtr): - def __init__(self,*args) : - self.this = apply(windowsc.new_wxMenu,()+args) - self.thisown = 1 - - - - -class wxPyMenuPtr(wxMenuPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - windowsc.delete_wxPyMenu(self.this) - def __repr__(self): - return "" -class wxPyMenu(wxPyMenuPtr): - def __init__(self,*args) : - self.this = apply(windowsc.new_wxPyMenu,()+args) - self.thisown = 1 - - - - -class wxMenuBarPtr(wxEvtHandlerPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Append(self,arg0,arg1): - val = windowsc.wxMenuBar_Append(self.this,arg0.this,arg1) - return val - def Check(self,arg0,arg1): - val = windowsc.wxMenuBar_Check(self.this,arg0,arg1) - return val - def Checked(self,arg0): - val = windowsc.wxMenuBar_Checked(self.this,arg0) - return val - def Enable(self,arg0,arg1): - val = windowsc.wxMenuBar_Enable(self.this,arg0,arg1) - return val - def Enabled(self,arg0): - val = windowsc.wxMenuBar_Enabled(self.this,arg0) - return val - def FindMenuItem(self,arg0,arg1): - val = windowsc.wxMenuBar_FindMenuItem(self.this,arg0,arg1) - return val - def FindItemForId(self,arg0): - val = windowsc.wxMenuBar_FindItemForId(self.this,arg0) - val = wxMenuItemPtr(val) - return val - def GetMenuCount(self): - val = windowsc.wxMenuBar_GetMenuCount(self.this) - return val - def GetMenu(self,arg0): - val = windowsc.wxMenuBar_GetMenu(self.this,arg0) - val = wxMenuPtr(val) - return val - def __repr__(self): - return "" -class wxMenuBar(wxMenuBarPtr): - def __init__(self) : - self.this = windowsc.new_wxMenuBar() - self.thisown = 1 - - - - -class wxMenuItemPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def IsSeparator(self): - val = windowsc.wxMenuItem_IsSeparator(self.this) - return val - def IsEnabled(self): - val = windowsc.wxMenuItem_IsEnabled(self.this) - return val - def IsChecked(self): - val = windowsc.wxMenuItem_IsChecked(self.this) - return val - def IsCheckable(self): - val = windowsc.wxMenuItem_IsCheckable(self.this) - return val - def GetId(self): - val = windowsc.wxMenuItem_GetId(self.this) - return val - def GetSubMenu(self): - val = windowsc.wxMenuItem_GetSubMenu(self.this) - val = wxMenuPtr(val) - return val - def GetHelp(self): - val = windowsc.wxMenuItem_GetHelp(self.this) - return val - def SetHelp(self,arg0): - val = windowsc.wxMenuItem_SetHelp(self.this,arg0) - return val - def Enable(self,*args): - val = apply(windowsc.wxMenuItem_Enable,(self.this,)+args) - return val - def Check(self,*args): - val = apply(windowsc.wxMenuItem_Check,(self.this,)+args) - return val - def __repr__(self): - return "" -class wxMenuItem(wxMenuItemPtr): - def __init__(self,this): - self.this = this - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - - - -#-------------- VARIABLE WRAPPERS ------------------ - diff --git a/utils/wxPython/src/gtk/windows2.cpp b/utils/wxPython/src/gtk/windows2.cpp deleted file mode 100644 index 0a7e039a35..0000000000 --- a/utils/wxPython/src/gtk/windows2.cpp +++ /dev/null @@ -1,2931 +0,0 @@ -/* - * FILE : gtk/windows2.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif - -#define SWIG_init initwindows2c - -#define SWIG_name "windows2c" - -#include "helpers.h" -#include -#include - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; -#define wxGridCell_GetTextValue(_swigobj) (_swigobj->GetTextValue()) -static PyObject *_wrap_wxGridCell_GetTextValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxGridCell * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGridCell_GetTextValue",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetTextValue. Expected _wxGridCell_p."); - return NULL; - } - } - wxString & _result_ref = wxGridCell_GetTextValue(_arg0); - _result = (wxString *) &_result_ref; -{ - _resultobj = PyString_FromString(WXSTRINGCAST (*_result)); -} - return _resultobj; -} - -#define wxGridCell_SetTextValue(_swigobj,_swigarg0) (_swigobj->SetTextValue(_swigarg0)) -static PyObject *_wrap_wxGridCell_SetTextValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGridCell * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxGridCell_SetTextValue",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_SetTextValue. Expected _wxGridCell_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxGridCell_SetTextValue(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxGridCell_GetFont(_swigobj) (_swigobj->GetFont()) -static PyObject *_wrap_wxGridCell_GetFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _result; - wxGridCell * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGridCell_GetFont",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetFont. Expected _wxGridCell_p."); - return NULL; - } - } - _result = (wxFont *)wxGridCell_GetFont(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGridCell_SetFont(_swigobj,_swigarg0) (_swigobj->SetFont(_swigarg0)) -static PyObject *_wrap_wxGridCell_SetFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGridCell * _arg0; - wxFont * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGridCell_SetFont",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_SetFont. Expected _wxGridCell_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCell_SetFont. Expected _wxFont_p."); - return NULL; - } - } - wxGridCell_SetFont(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGridCell_GetTextColour(_swigobj) (_swigobj->GetTextColour()) -static PyObject *_wrap_wxGridCell_GetTextColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxGridCell * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGridCell_GetTextColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetTextColour. Expected _wxGridCell_p."); - return NULL; - } - } - wxColour & _result_ref = wxGridCell_GetTextColour(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGridCell_SetTextColour(_swigobj,_swigarg0) (_swigobj->SetTextColour(_swigarg0)) -static PyObject *_wrap_wxGridCell_SetTextColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGridCell * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGridCell_SetTextColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_SetTextColour. Expected _wxGridCell_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCell_SetTextColour. Expected _wxColour_p."); - return NULL; - } - } - wxGridCell_SetTextColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGridCell_GetBackgroundColour(_swigobj) (_swigobj->GetBackgroundColour()) -static PyObject *_wrap_wxGridCell_GetBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxGridCell * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGridCell_GetBackgroundColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetBackgroundColour. Expected _wxGridCell_p."); - return NULL; - } - } - wxColour & _result_ref = wxGridCell_GetBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGridCell_SetBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetBackgroundColour(_swigarg0)) -static PyObject *_wrap_wxGridCell_SetBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGridCell * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGridCell_SetBackgroundColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_SetBackgroundColour. Expected _wxGridCell_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCell_SetBackgroundColour. Expected _wxColour_p."); - return NULL; - } - } - wxGridCell_SetBackgroundColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGridCell_GetBackgroundBrush(_swigobj) (_swigobj->GetBackgroundBrush()) -static PyObject *_wrap_wxGridCell_GetBackgroundBrush(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBrush * _result; - wxGridCell * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGridCell_GetBackgroundBrush",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetBackgroundBrush. Expected _wxGridCell_p."); - return NULL; - } - } - _result = (wxBrush *)wxGridCell_GetBackgroundBrush(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGridCell_GetAlignment(_swigobj) (_swigobj->GetAlignment()) -static PyObject *_wrap_wxGridCell_GetAlignment(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGridCell * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGridCell_GetAlignment",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetAlignment. Expected _wxGridCell_p."); - return NULL; - } - } - _result = (int )wxGridCell_GetAlignment(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGridCell_SetAlignment(_swigobj,_swigarg0) (_swigobj->SetAlignment(_swigarg0)) -static PyObject *_wrap_wxGridCell_SetAlignment(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGridCell * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGridCell_SetAlignment",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_SetAlignment. Expected _wxGridCell_p."); - return NULL; - } - } - wxGridCell_SetAlignment(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGridCell_GetCellBitmap(_swigobj) (_swigobj->GetCellBitmap()) -static PyObject *_wrap_wxGridCell_GetCellBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - wxGridCell * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGridCell_GetCellBitmap",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetCellBitmap. Expected _wxGridCell_p."); - return NULL; - } - } - _result = (wxBitmap *)wxGridCell_GetCellBitmap(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGridCell_SetCellBitmap(_swigobj,_swigarg0) (_swigobj->SetCellBitmap(_swigarg0)) -static PyObject *_wrap_wxGridCell_SetCellBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGridCell * _arg0; - wxBitmap * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGridCell_SetCellBitmap",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_SetCellBitmap. Expected _wxGridCell_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCell_SetCellBitmap. Expected _wxBitmap_p."); - return NULL; - } - } - wxGridCell_SetCellBitmap(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxGridTowxPanel(void *ptr) { - wxGrid *src; - wxPanel *dest; - src = (wxGrid *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxGridTowxWindow(void *ptr) { - wxGrid *src; - wxWindow *dest; - src = (wxGrid *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxGridTowxEvtHandler(void *ptr) { - wxGrid *src; - wxEvtHandler *dest; - src = (wxGrid *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxGrid(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxGrid(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_new_wxGrid(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - long _arg4 = 0; - char * _arg5 = "grid"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si|ssls:new_wxGrid",&_argc0,&_arg1,&_argc2,&_argc3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGrid. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxGrid. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxGrid. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxGrid *)new_wxGrid(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxGrid_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_AdjustScrollbars(_swigobj) (_swigobj->AdjustScrollbars()) -static PyObject *_wrap_wxGrid_AdjustScrollbars(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_AdjustScrollbars",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AdjustScrollbars. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_AdjustScrollbars(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_AppendCols(_swigobj,_swigarg0,_swigarg1) (_swigobj->AppendCols(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_AppendCols(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1 = 1; - bool _arg2 = (1); - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"s|ii:wxGrid_AppendCols",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AppendCols. Expected _wxGrid_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - _result = (bool )wxGrid_AppendCols(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_AppendRows(_swigobj,_swigarg0,_swigarg1) (_swigobj->AppendRows(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_AppendRows(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1 = 1; - bool _arg2 = (1); - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"s|ii:wxGrid_AppendRows",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AppendRows. Expected _wxGrid_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - _result = (bool )wxGrid_AppendRows(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_BeginBatch(_swigobj) (_swigobj->BeginBatch()) -static PyObject *_wrap_wxGrid_BeginBatch(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_BeginBatch",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_BeginBatch. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_BeginBatch(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_CellHitTest(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->CellHitTest(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxGrid_CellHitTest(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - int * _arg3; - int temp; - int * _arg4; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg3 = &temp; -} -{ - _arg4 = &temp0; -} - if(!PyArg_ParseTuple(args,"sii:wxGrid_CellHitTest",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CellHitTest. Expected _wxGrid_p."); - return NULL; - } - } - _result = (bool )wxGrid_CellHitTest(_arg0,_arg1,_arg2,_arg3,_arg4); - _resultobj = Py_BuildValue("i",_result); -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg3)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg4)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -static bool wxGrid_CreateGrid(wxGrid *self,int rows,int cols,short defaultWidth,short defaultHeight) { - return self->CreateGrid(rows, cols, NULL, NULL, - defaultWidth, defaultHeight); - } -static PyObject *_wrap_wxGrid_CreateGrid(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - short _arg3 = wxGRID_DEFAULT_CELL_WIDTH; - short _arg4 = wxGRID_DEFAULT_CELL_HEIGHT; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii|hh:wxGrid_CreateGrid",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CreateGrid. Expected _wxGrid_p."); - return NULL; - } - } - _result = (bool )wxGrid_CreateGrid(_arg0,_arg1,_arg2,_arg3,_arg4); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_CurrentCellVisible(_swigobj) (_swigobj->CurrentCellVisible()) -static PyObject *_wrap_wxGrid_CurrentCellVisible(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_CurrentCellVisible",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CurrentCellVisible. Expected _wxGrid_p."); - return NULL; - } - } - _result = (bool )wxGrid_CurrentCellVisible(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_DeleteCols(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->DeleteCols(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_DeleteCols(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1 = 0; - int _arg2 = 1; - bool _arg3 = (1); - char * _argc0 = 0; - int tempbool3; - - self = self; - if(!PyArg_ParseTuple(args,"s|iii:wxGrid_DeleteCols",&_argc0,&_arg1,&_arg2,&tempbool3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DeleteCols. Expected _wxGrid_p."); - return NULL; - } - } - _arg3 = (bool ) tempbool3; - _result = (bool )wxGrid_DeleteCols(_arg0,_arg1,_arg2,_arg3); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_DeleteRows(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->DeleteRows(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_DeleteRows(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1 = 0; - int _arg2 = 1; - bool _arg3 = (1); - char * _argc0 = 0; - int tempbool3; - - self = self; - if(!PyArg_ParseTuple(args,"s|iii:wxGrid_DeleteRows",&_argc0,&_arg1,&_arg2,&tempbool3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DeleteRows. Expected _wxGrid_p."); - return NULL; - } - } - _arg3 = (bool ) tempbool3; - _result = (bool )wxGrid_DeleteRows(_arg0,_arg1,_arg2,_arg3); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_EndBatch(_swigobj) (_swigobj->EndBatch()) -static PyObject *_wrap_wxGrid_EndBatch(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_EndBatch",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_EndBatch. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_EndBatch(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_GetBatchCount(_swigobj) (_swigobj->GetBatchCount()) -static PyObject *_wrap_wxGrid_GetBatchCount(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetBatchCount",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetBatchCount. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetBatchCount(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetCell(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCell(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetCell(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGridCell * _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_GetCell",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCell. Expected _wxGrid_p."); - return NULL; - } - } - _result = (wxGridCell *)wxGrid_GetCell(_arg0,_arg1,_arg2); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCell_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetCellAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellAlignment(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetCellAlignment(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_GetCellAlignment",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellAlignment. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetCellAlignment(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetDefCellAlignment(_swigobj) (_swigobj->GetCellAlignment()) -static PyObject *_wrap_wxGrid_GetDefCellAlignment(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetDefCellAlignment",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefCellAlignment. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetDefCellAlignment(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetCellBackgroundColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellBackgroundColour(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetCellBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_GetCellBackgroundColour",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellBackgroundColour. Expected _wxGrid_p."); - return NULL; - } - } - wxColour & _result_ref = wxGrid_GetCellBackgroundColour(_arg0,_arg1,_arg2); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetDefCellBackgroundColour(_swigobj) (_swigobj->GetCellBackgroundColour()) -static PyObject *_wrap_wxGrid_GetDefCellBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxGrid * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetDefCellBackgroundColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefCellBackgroundColour. Expected _wxGrid_p."); - return NULL; - } - } - wxColour & _result_ref = wxGrid_GetDefCellBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetCellTextColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellTextColour(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetCellTextColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_GetCellTextColour",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellTextColour. Expected _wxGrid_p."); - return NULL; - } - } - wxColour & _result_ref = wxGrid_GetCellTextColour(_arg0,_arg1,_arg2); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetDefCellTextColour(_swigobj) (_swigobj->GetCellTextColour()) -static PyObject *_wrap_wxGrid_GetDefCellTextColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxGrid * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetDefCellTextColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefCellTextColour. Expected _wxGrid_p."); - return NULL; - } - } - wxColour & _result_ref = wxGrid_GetDefCellTextColour(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetCellTextFont(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellTextFont(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetCellTextFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_GetCellTextFont",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellTextFont. Expected _wxGrid_p."); - return NULL; - } - } - _result = (wxFont *)wxGrid_GetCellTextFont(_arg0,_arg1,_arg2); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetDefCellTextFont(_swigobj) (_swigobj->GetCellTextFont()) -static PyObject *_wrap_wxGrid_GetDefCellTextFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _result; - wxGrid * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetDefCellTextFont",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefCellTextFont. Expected _wxGrid_p."); - return NULL; - } - } - _result = (wxFont *)wxGrid_GetDefCellTextFont(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetCellValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellValue(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetCellValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_GetCellValue",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellValue. Expected _wxGrid_p."); - return NULL; - } - } - wxString & _result_ref = wxGrid_GetCellValue(_arg0,_arg1,_arg2); - _result = (wxString *) &_result_ref; -{ - _resultobj = PyString_FromString(WXSTRINGCAST (*_result)); -} - return _resultobj; -} - -#define wxGrid_GetCols(_swigobj) (_swigobj->GetCols()) -static PyObject *_wrap_wxGrid_GetCols(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetCols",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCols. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetCols(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetColumnWidth(_swigobj,_swigarg0) (_swigobj->GetColumnWidth(_swigarg0)) -static PyObject *_wrap_wxGrid_GetColumnWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGrid_GetColumnWidth",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetColumnWidth. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetColumnWidth(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetCurrentRect(_swigobj) (_swigobj->GetCurrentRect()) -static PyObject *_wrap_wxGrid_GetCurrentRect(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRect * _result; - wxGrid * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetCurrentRect",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCurrentRect. Expected _wxGrid_p."); - return NULL; - } - } - wxRect & _result_ref = wxGrid_GetCurrentRect(_arg0); - _result = (wxRect *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxRect_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetCursorColumn(_swigobj) (_swigobj->GetCursorColumn()) -static PyObject *_wrap_wxGrid_GetCursorColumn(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetCursorColumn",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCursorColumn. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetCursorColumn(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetCursorRow(_swigobj) (_swigobj->GetCursorRow()) -static PyObject *_wrap_wxGrid_GetCursorRow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetCursorRow",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCursorRow. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetCursorRow(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetEditable(_swigobj) (_swigobj->GetEditable()) -static PyObject *_wrap_wxGrid_GetEditable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetEditable",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetEditable. Expected _wxGrid_p."); - return NULL; - } - } - _result = (bool )wxGrid_GetEditable(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetHorizScrollBar(_swigobj) (_swigobj->GetHorizScrollBar()) -static PyObject *_wrap_wxGrid_GetHorizScrollBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrollBar * _result; - wxGrid * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetHorizScrollBar",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetHorizScrollBar. Expected _wxGrid_p."); - return NULL; - } - } - _result = (wxScrollBar *)wxGrid_GetHorizScrollBar(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxScrollBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetLabelAlignment(_swigobj,_swigarg0) (_swigobj->GetLabelAlignment(_swigarg0)) -static PyObject *_wrap_wxGrid_GetLabelAlignment(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGrid_GetLabelAlignment",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelAlignment. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetLabelAlignment(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetLabelBackgroundColour(_swigobj) (_swigobj->GetLabelBackgroundColour()) -static PyObject *_wrap_wxGrid_GetLabelBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxGrid * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetLabelBackgroundColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelBackgroundColour. Expected _wxGrid_p."); - return NULL; - } - } - wxColour & _result_ref = wxGrid_GetLabelBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetLabelSize(_swigobj,_swigarg0) (_swigobj->GetLabelSize(_swigarg0)) -static PyObject *_wrap_wxGrid_GetLabelSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGrid_GetLabelSize",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelSize. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetLabelSize(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetLabelTextColour(_swigobj) (_swigobj->GetLabelTextColour()) -static PyObject *_wrap_wxGrid_GetLabelTextColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxGrid * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetLabelTextColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelTextColour. Expected _wxGrid_p."); - return NULL; - } - } - wxColour & _result_ref = wxGrid_GetLabelTextColour(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetLabelTextFont(_swigobj) (_swigobj->GetLabelTextFont()) -static PyObject *_wrap_wxGrid_GetLabelTextFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _result; - wxGrid * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetLabelTextFont",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelTextFont. Expected _wxGrid_p."); - return NULL; - } - } - _result = (wxFont *)wxGrid_GetLabelTextFont(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetLabelValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetLabelValue(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetLabelValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_GetLabelValue",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelValue. Expected _wxGrid_p."); - return NULL; - } - } - wxString & _result_ref = wxGrid_GetLabelValue(_arg0,_arg1,_arg2); - _result = (wxString *) &_result_ref; -{ - _resultobj = PyString_FromString(WXSTRINGCAST (*_result)); -} - return _resultobj; -} - -#define wxGrid_GetRowHeight(_swigobj,_swigarg0) (_swigobj->GetRowHeight(_swigarg0)) -static PyObject *_wrap_wxGrid_GetRowHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGrid_GetRowHeight",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetRowHeight. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetRowHeight(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetRows(_swigobj) (_swigobj->GetRows()) -static PyObject *_wrap_wxGrid_GetRows(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetRows",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetRows. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetRows(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetScrollPosX(_swigobj) (_swigobj->GetScrollPosX()) -static PyObject *_wrap_wxGrid_GetScrollPosX(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetScrollPosX",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetScrollPosX. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetScrollPosX(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetScrollPosY(_swigobj) (_swigobj->GetScrollPosY()) -static PyObject *_wrap_wxGrid_GetScrollPosY(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetScrollPosY",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetScrollPosY. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetScrollPosY(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetTextItem(_swigobj) (_swigobj->GetTextItem()) -static PyObject *_wrap_wxGrid_GetTextItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _result; - wxGrid * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetTextItem",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetTextItem. Expected _wxGrid_p."); - return NULL; - } - } - _result = (wxTextCtrl *)wxGrid_GetTextItem(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetVertScrollBar(_swigobj) (_swigobj->GetVertScrollBar()) -static PyObject *_wrap_wxGrid_GetVertScrollBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrollBar * _result; - wxGrid * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetVertScrollBar",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetVertScrollBar. Expected _wxGrid_p."); - return NULL; - } - } - _result = (wxScrollBar *)wxGrid_GetVertScrollBar(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxScrollBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_InsertCols(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->InsertCols(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_InsertCols(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1 = 0; - int _arg2 = 1; - bool _arg3 = (1); - char * _argc0 = 0; - int tempbool3; - - self = self; - if(!PyArg_ParseTuple(args,"s|iii:wxGrid_InsertCols",&_argc0,&_arg1,&_arg2,&tempbool3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_InsertCols. Expected _wxGrid_p."); - return NULL; - } - } - _arg3 = (bool ) tempbool3; - _result = (bool )wxGrid_InsertCols(_arg0,_arg1,_arg2,_arg3); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_InsertRows(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->InsertRows(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_InsertRows(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1 = 0; - int _arg2 = 1; - bool _arg3 = (1); - char * _argc0 = 0; - int tempbool3; - - self = self; - if(!PyArg_ParseTuple(args,"s|iii:wxGrid_InsertRows",&_argc0,&_arg1,&_arg2,&tempbool3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_InsertRows. Expected _wxGrid_p."); - return NULL; - } - } - _arg3 = (bool ) tempbool3; - _result = (bool )wxGrid_InsertRows(_arg0,_arg1,_arg2,_arg3); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_SetCellAlignment(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellAlignment(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_SetCellAlignment(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - int _arg2; - int _arg3; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siii:wxGrid_SetCellAlignment",&_argc0,&_arg1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellAlignment. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_SetCellAlignment(_arg0,_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetDefCellAlignment(_swigobj,_swigarg0) (_swigobj->SetCellAlignment(_swigarg0)) -static PyObject *_wrap_wxGrid_SetDefCellAlignment(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGrid_SetDefCellAlignment",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefCellAlignment. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_SetDefCellAlignment(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetCellBackgroundColour(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellBackgroundColour(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_SetCellBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxColour * _arg1; - int _arg2; - int _arg3; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ssii:wxGrid_SetCellBackgroundColour",&_argc0,&_argc1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellBackgroundColour. Expected _wxGrid_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetCellBackgroundColour. Expected _wxColour_p."); - return NULL; - } - } - wxGrid_SetCellBackgroundColour(_arg0,*_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetDefCellBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetCellBackgroundColour(_swigarg0)) -static PyObject *_wrap_wxGrid_SetDefCellBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGrid_SetDefCellBackgroundColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefCellBackgroundColour. Expected _wxGrid_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetDefCellBackgroundColour. Expected _wxColour_p."); - return NULL; - } - } - wxGrid_SetDefCellBackgroundColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetCellTextColour(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellTextColour(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_SetCellTextColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxColour * _arg1; - int _arg2; - int _arg3; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ssii:wxGrid_SetCellTextColour",&_argc0,&_argc1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellTextColour. Expected _wxGrid_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetCellTextColour. Expected _wxColour_p."); - return NULL; - } - } - wxGrid_SetCellTextColour(_arg0,*_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetDefCellTextColour(_swigobj,_swigarg0) (_swigobj->SetCellTextColour(_swigarg0)) -static PyObject *_wrap_wxGrid_SetDefCellTextColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGrid_SetDefCellTextColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefCellTextColour. Expected _wxGrid_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetDefCellTextColour. Expected _wxColour_p."); - return NULL; - } - } - wxGrid_SetDefCellTextColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetCellTextFont(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellTextFont(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_SetCellTextFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxFont * _arg1; - int _arg2; - int _arg3; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ssii:wxGrid_SetCellTextFont",&_argc0,&_argc1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellTextFont. Expected _wxGrid_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetCellTextFont. Expected _wxFont_p."); - return NULL; - } - } - wxGrid_SetCellTextFont(_arg0,_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetDefCellTextFont(_swigobj,_swigarg0) (_swigobj->SetCellTextFont(_swigarg0)) -static PyObject *_wrap_wxGrid_SetDefCellTextFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxFont * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGrid_SetDefCellTextFont",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefCellTextFont. Expected _wxGrid_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetDefCellTextFont. Expected _wxFont_p."); - return NULL; - } - } - wxGrid_SetDefCellTextFont(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetCellValue(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellValue(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_SetCellValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxString * _arg1; - int _arg2; - int _arg3; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sOii:wxGrid_SetCellValue",&_argc0,&_obj1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellValue. Expected _wxGrid_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxGrid_SetCellValue(_arg0,*_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxGrid_SetColumnWidth(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColumnWidth(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_SetColumnWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_SetColumnWidth",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColumnWidth. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_SetColumnWidth(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetDividerPen(_swigobj,_swigarg0) (_swigobj->SetDividerPen(_swigarg0)) -static PyObject *_wrap_wxGrid_SetDividerPen(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxPen * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGrid_SetDividerPen",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDividerPen. Expected _wxGrid_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetDividerPen. Expected _wxPen_p."); - return NULL; - } - } - wxGrid_SetDividerPen(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetEditable(_swigobj,_swigarg0) (_swigobj->SetEditable(_swigarg0)) -static PyObject *_wrap_wxGrid_SetEditable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGrid_SetEditable",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetEditable. Expected _wxGrid_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxGrid_SetEditable(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetGridCursor(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetGridCursor(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_SetGridCursor(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_SetGridCursor",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetGridCursor. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_SetGridCursor(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetLabelAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetLabelAlignment(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_SetLabelAlignment(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_SetLabelAlignment",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelAlignment. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_SetLabelAlignment(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetLabelBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetLabelBackgroundColour(_swigarg0)) -static PyObject *_wrap_wxGrid_SetLabelBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGrid_SetLabelBackgroundColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelBackgroundColour. Expected _wxGrid_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetLabelBackgroundColour. Expected _wxColour_p."); - return NULL; - } - } - wxGrid_SetLabelBackgroundColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetLabelSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetLabelSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_SetLabelSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_SetLabelSize",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelSize. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_SetLabelSize(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetLabelTextColour(_swigobj,_swigarg0) (_swigobj->SetLabelTextColour(_swigarg0)) -static PyObject *_wrap_wxGrid_SetLabelTextColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGrid_SetLabelTextColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelTextColour. Expected _wxGrid_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetLabelTextColour. Expected _wxColour_p."); - return NULL; - } - } - wxGrid_SetLabelTextColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetLabelTextFont(_swigobj,_swigarg0) (_swigobj->SetLabelTextFont(_swigarg0)) -static PyObject *_wrap_wxGrid_SetLabelTextFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxFont * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGrid_SetLabelTextFont",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelTextFont. Expected _wxGrid_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetLabelTextFont. Expected _wxFont_p."); - return NULL; - } - } - wxGrid_SetLabelTextFont(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetLabelValue(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetLabelValue(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_SetLabelValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - wxString * _arg2; - int _arg3; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siOi:wxGrid_SetLabelValue",&_argc0,&_arg1,&_obj2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelValue. Expected _wxGrid_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - wxGrid_SetLabelValue(_arg0,_arg1,*_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxGrid_SetRowHeight(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRowHeight(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_SetRowHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_SetRowHeight",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetRowHeight. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_SetRowHeight(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_UpdateDimensions(_swigobj) (_swigobj->UpdateDimensions()) -static PyObject *_wrap_wxGrid_UpdateDimensions(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_UpdateDimensions",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_UpdateDimensions. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_UpdateDimensions(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxNotebookEventTowxCommandEvent(void *ptr) { - wxNotebookEvent *src; - wxCommandEvent *dest; - src = (wxNotebookEvent *) ptr; - dest = (wxCommandEvent *) src; - return (void *) dest; -} - -static void *SwigwxNotebookEventTowxEvent(void *ptr) { - wxNotebookEvent *src; - wxEvent *dest; - src = (wxNotebookEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxNotebookEvent_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxNotebookEvent_GetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxNotebookEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxNotebookEvent_GetSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebookEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebookEvent_GetSelection. Expected _wxNotebookEvent_p."); - return NULL; - } - } - _result = (int )wxNotebookEvent_GetSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebookEvent_GetOldSelection(_swigobj) (_swigobj->GetOldSelection()) -static PyObject *_wrap_wxNotebookEvent_GetOldSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxNotebookEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxNotebookEvent_GetOldSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebookEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebookEvent_GetOldSelection. Expected _wxNotebookEvent_p."); - return NULL; - } - } - _result = (int )wxNotebookEvent_GetOldSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxNotebookTowxControl(void *ptr) { - wxNotebook *src; - wxControl *dest; - src = (wxNotebook *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxNotebookTowxWindow(void *ptr) { - wxNotebook *src; - wxWindow *dest; - src = (wxNotebook *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxNotebookTowxEvtHandler(void *ptr) { - wxNotebook *src; - wxEvtHandler *dest; - src = (wxNotebook *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxNotebook(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxNotebook(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_new_wxNotebook(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxNotebook * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - long _arg4 = 0; - char * _arg5 = "notebook"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si|ssls:new_wxNotebook",&_argc0,&_arg1,&_argc2,&_argc3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxNotebook. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxNotebook. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxNotebook. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxNotebook *)new_wxNotebook(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxNotebook_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxNotebook_GetPageCount(_swigobj) (_swigobj->GetPageCount()) -static PyObject *_wrap_wxNotebook_GetPageCount(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxNotebook * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxNotebook_GetPageCount",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetPageCount. Expected _wxNotebook_p."); - return NULL; - } - } - _result = (int )wxNotebook_GetPageCount(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_SetSelection(_swigobj,_swigarg0) (_swigobj->SetSelection(_swigarg0)) -static PyObject *_wrap_wxNotebook_SetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxNotebook * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxNotebook_SetSelection",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetSelection. Expected _wxNotebook_p."); - return NULL; - } - } - _result = (int )wxNotebook_SetSelection(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_AdvanceSelection(_swigobj,_swigarg0) (_swigobj->AdvanceSelection(_swigarg0)) -static PyObject *_wrap_wxNotebook_AdvanceSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxNotebook * _arg0; - bool _arg1 = (1); - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxNotebook_AdvanceSelection",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_AdvanceSelection. Expected _wxNotebook_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxNotebook_AdvanceSelection(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxNotebook_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxNotebook_GetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxNotebook * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxNotebook_GetSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetSelection. Expected _wxNotebook_p."); - return NULL; - } - } - _result = (int )wxNotebook_GetSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_SetPageText(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetPageText(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxNotebook_SetPageText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxNotebook * _arg0; - int _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siO:wxNotebook_SetPageText",&_argc0,&_arg1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetPageText. Expected _wxNotebook_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - _result = (bool )wxNotebook_SetPageText(_arg0,_arg1,*_arg2); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxNotebook_GetPageText(_swigobj,_swigarg0) (_swigobj->GetPageText(_swigarg0)) -static PyObject *_wrap_wxNotebook_GetPageText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxNotebook * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxNotebook_GetPageText",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetPageText. Expected _wxNotebook_p."); - return NULL; - } - } - _result = new wxString (wxNotebook_GetPageText(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxNotebook_SetImageList(_swigobj,_swigarg0) (_swigobj->SetImageList(_swigarg0)) -static PyObject *_wrap_wxNotebook_SetImageList(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxNotebook * _arg0; - wxImageList * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxNotebook_SetImageList",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetImageList. Expected _wxNotebook_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxImageList_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxNotebook_SetImageList. Expected _wxImageList_p."); - return NULL; - } - } - wxNotebook_SetImageList(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxNotebook_GetImageList(_swigobj) (_swigobj->GetImageList()) -static PyObject *_wrap_wxNotebook_GetImageList(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxImageList * _result; - wxNotebook * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxNotebook_GetImageList",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetImageList. Expected _wxNotebook_p."); - return NULL; - } - } - _result = (wxImageList *)wxNotebook_GetImageList(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageList_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxNotebook_GetPageImage(_swigobj,_swigarg0) (_swigobj->GetPageImage(_swigarg0)) -static PyObject *_wrap_wxNotebook_GetPageImage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxNotebook * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxNotebook_GetPageImage",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetPageImage. Expected _wxNotebook_p."); - return NULL; - } - } - _result = (int )wxNotebook_GetPageImage(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_SetPageImage(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetPageImage(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxNotebook_SetPageImage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxNotebook * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxNotebook_SetPageImage",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetPageImage. Expected _wxNotebook_p."); - return NULL; - } - } - _result = (bool )wxNotebook_SetPageImage(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_GetRowCount(_swigobj) (_swigobj->GetRowCount()) -static PyObject *_wrap_wxNotebook_GetRowCount(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxNotebook * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxNotebook_GetRowCount",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetRowCount. Expected _wxNotebook_p."); - return NULL; - } - } - _result = (int )wxNotebook_GetRowCount(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_DeletePage(_swigobj,_swigarg0) (_swigobj->DeletePage(_swigarg0)) -static PyObject *_wrap_wxNotebook_DeletePage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxNotebook * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxNotebook_DeletePage",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_DeletePage. Expected _wxNotebook_p."); - return NULL; - } - } - _result = (bool )wxNotebook_DeletePage(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_DeleteAllPages(_swigobj) (_swigobj->DeleteAllPages()) -static PyObject *_wrap_wxNotebook_DeleteAllPages(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxNotebook * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxNotebook_DeleteAllPages",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_DeleteAllPages. Expected _wxNotebook_p."); - return NULL; - } - } - _result = (bool )wxNotebook_DeleteAllPages(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_AddPage(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->AddPage(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxNotebook_AddPage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxNotebook * _arg0; - wxWindow * _arg1; - wxString * _arg2; - bool _arg3 = (0); - int _arg4 = -1; - char * _argc0 = 0; - char * _argc1 = 0; - PyObject * _obj2 = 0; - int tempbool3; - - self = self; - if(!PyArg_ParseTuple(args,"ssO|ii:wxNotebook_AddPage",&_argc0,&_argc1,&_obj2,&tempbool3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_AddPage. Expected _wxNotebook_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxNotebook_AddPage. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - _arg3 = (bool ) tempbool3; - _result = (bool )wxNotebook_AddPage(_arg0,_arg1,*_arg2,_arg3,_arg4); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxNotebook_GetPage(_swigobj,_swigarg0) (_swigobj->GetPage(_swigarg0)) -static PyObject *_wrap_wxNotebook_GetPage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxNotebookPage * _result; - wxNotebook * _arg0; - int _arg1; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxNotebook_GetPage",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetPage. Expected _wxNotebook_p."); - return NULL; - } - } - _result = (wxNotebookPage *)wxNotebook_GetPage(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxNotebookPage_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyMethodDef windows2cMethods[] = { - { "wxNotebook_GetPage", _wrap_wxNotebook_GetPage, 1 }, - { "wxNotebook_AddPage", _wrap_wxNotebook_AddPage, 1 }, - { "wxNotebook_DeleteAllPages", _wrap_wxNotebook_DeleteAllPages, 1 }, - { "wxNotebook_DeletePage", _wrap_wxNotebook_DeletePage, 1 }, - { "wxNotebook_GetRowCount", _wrap_wxNotebook_GetRowCount, 1 }, - { "wxNotebook_SetPageImage", _wrap_wxNotebook_SetPageImage, 1 }, - { "wxNotebook_GetPageImage", _wrap_wxNotebook_GetPageImage, 1 }, - { "wxNotebook_GetImageList", _wrap_wxNotebook_GetImageList, 1 }, - { "wxNotebook_SetImageList", _wrap_wxNotebook_SetImageList, 1 }, - { "wxNotebook_GetPageText", _wrap_wxNotebook_GetPageText, 1 }, - { "wxNotebook_SetPageText", _wrap_wxNotebook_SetPageText, 1 }, - { "wxNotebook_GetSelection", _wrap_wxNotebook_GetSelection, 1 }, - { "wxNotebook_AdvanceSelection", _wrap_wxNotebook_AdvanceSelection, 1 }, - { "wxNotebook_SetSelection", _wrap_wxNotebook_SetSelection, 1 }, - { "wxNotebook_GetPageCount", _wrap_wxNotebook_GetPageCount, 1 }, - { "new_wxNotebook", _wrap_new_wxNotebook, 1 }, - { "wxNotebookEvent_GetOldSelection", _wrap_wxNotebookEvent_GetOldSelection, 1 }, - { "wxNotebookEvent_GetSelection", _wrap_wxNotebookEvent_GetSelection, 1 }, - { "wxGrid_UpdateDimensions", _wrap_wxGrid_UpdateDimensions, 1 }, - { "wxGrid_SetRowHeight", _wrap_wxGrid_SetRowHeight, 1 }, - { "wxGrid_SetLabelValue", _wrap_wxGrid_SetLabelValue, 1 }, - { "wxGrid_SetLabelTextFont", _wrap_wxGrid_SetLabelTextFont, 1 }, - { "wxGrid_SetLabelTextColour", _wrap_wxGrid_SetLabelTextColour, 1 }, - { "wxGrid_SetLabelSize", _wrap_wxGrid_SetLabelSize, 1 }, - { "wxGrid_SetLabelBackgroundColour", _wrap_wxGrid_SetLabelBackgroundColour, 1 }, - { "wxGrid_SetLabelAlignment", _wrap_wxGrid_SetLabelAlignment, 1 }, - { "wxGrid_SetGridCursor", _wrap_wxGrid_SetGridCursor, 1 }, - { "wxGrid_SetEditable", _wrap_wxGrid_SetEditable, 1 }, - { "wxGrid_SetDividerPen", _wrap_wxGrid_SetDividerPen, 1 }, - { "wxGrid_SetColumnWidth", _wrap_wxGrid_SetColumnWidth, 1 }, - { "wxGrid_SetCellValue", _wrap_wxGrid_SetCellValue, 1 }, - { "wxGrid_SetDefCellTextFont", _wrap_wxGrid_SetDefCellTextFont, 1 }, - { "wxGrid_SetCellTextFont", _wrap_wxGrid_SetCellTextFont, 1 }, - { "wxGrid_SetDefCellTextColour", _wrap_wxGrid_SetDefCellTextColour, 1 }, - { "wxGrid_SetCellTextColour", _wrap_wxGrid_SetCellTextColour, 1 }, - { "wxGrid_SetDefCellBackgroundColour", _wrap_wxGrid_SetDefCellBackgroundColour, 1 }, - { "wxGrid_SetCellBackgroundColour", _wrap_wxGrid_SetCellBackgroundColour, 1 }, - { "wxGrid_SetDefCellAlignment", _wrap_wxGrid_SetDefCellAlignment, 1 }, - { "wxGrid_SetCellAlignment", _wrap_wxGrid_SetCellAlignment, 1 }, - { "wxGrid_InsertRows", _wrap_wxGrid_InsertRows, 1 }, - { "wxGrid_InsertCols", _wrap_wxGrid_InsertCols, 1 }, - { "wxGrid_GetVertScrollBar", _wrap_wxGrid_GetVertScrollBar, 1 }, - { "wxGrid_GetTextItem", _wrap_wxGrid_GetTextItem, 1 }, - { "wxGrid_GetScrollPosY", _wrap_wxGrid_GetScrollPosY, 1 }, - { "wxGrid_GetScrollPosX", _wrap_wxGrid_GetScrollPosX, 1 }, - { "wxGrid_GetRows", _wrap_wxGrid_GetRows, 1 }, - { "wxGrid_GetRowHeight", _wrap_wxGrid_GetRowHeight, 1 }, - { "wxGrid_GetLabelValue", _wrap_wxGrid_GetLabelValue, 1 }, - { "wxGrid_GetLabelTextFont", _wrap_wxGrid_GetLabelTextFont, 1 }, - { "wxGrid_GetLabelTextColour", _wrap_wxGrid_GetLabelTextColour, 1 }, - { "wxGrid_GetLabelSize", _wrap_wxGrid_GetLabelSize, 1 }, - { "wxGrid_GetLabelBackgroundColour", _wrap_wxGrid_GetLabelBackgroundColour, 1 }, - { "wxGrid_GetLabelAlignment", _wrap_wxGrid_GetLabelAlignment, 1 }, - { "wxGrid_GetHorizScrollBar", _wrap_wxGrid_GetHorizScrollBar, 1 }, - { "wxGrid_GetEditable", _wrap_wxGrid_GetEditable, 1 }, - { "wxGrid_GetCursorRow", _wrap_wxGrid_GetCursorRow, 1 }, - { "wxGrid_GetCursorColumn", _wrap_wxGrid_GetCursorColumn, 1 }, - { "wxGrid_GetCurrentRect", _wrap_wxGrid_GetCurrentRect, 1 }, - { "wxGrid_GetColumnWidth", _wrap_wxGrid_GetColumnWidth, 1 }, - { "wxGrid_GetCols", _wrap_wxGrid_GetCols, 1 }, - { "wxGrid_GetCellValue", _wrap_wxGrid_GetCellValue, 1 }, - { "wxGrid_GetDefCellTextFont", _wrap_wxGrid_GetDefCellTextFont, 1 }, - { "wxGrid_GetCellTextFont", _wrap_wxGrid_GetCellTextFont, 1 }, - { "wxGrid_GetDefCellTextColour", _wrap_wxGrid_GetDefCellTextColour, 1 }, - { "wxGrid_GetCellTextColour", _wrap_wxGrid_GetCellTextColour, 1 }, - { "wxGrid_GetDefCellBackgroundColour", _wrap_wxGrid_GetDefCellBackgroundColour, 1 }, - { "wxGrid_GetCellBackgroundColour", _wrap_wxGrid_GetCellBackgroundColour, 1 }, - { "wxGrid_GetDefCellAlignment", _wrap_wxGrid_GetDefCellAlignment, 1 }, - { "wxGrid_GetCellAlignment", _wrap_wxGrid_GetCellAlignment, 1 }, - { "wxGrid_GetCell", _wrap_wxGrid_GetCell, 1 }, - { "wxGrid_GetBatchCount", _wrap_wxGrid_GetBatchCount, 1 }, - { "wxGrid_EndBatch", _wrap_wxGrid_EndBatch, 1 }, - { "wxGrid_DeleteRows", _wrap_wxGrid_DeleteRows, 1 }, - { "wxGrid_DeleteCols", _wrap_wxGrid_DeleteCols, 1 }, - { "wxGrid_CurrentCellVisible", _wrap_wxGrid_CurrentCellVisible, 1 }, - { "wxGrid_CreateGrid", _wrap_wxGrid_CreateGrid, 1 }, - { "wxGrid_CellHitTest", _wrap_wxGrid_CellHitTest, 1 }, - { "wxGrid_BeginBatch", _wrap_wxGrid_BeginBatch, 1 }, - { "wxGrid_AppendRows", _wrap_wxGrid_AppendRows, 1 }, - { "wxGrid_AppendCols", _wrap_wxGrid_AppendCols, 1 }, - { "wxGrid_AdjustScrollbars", _wrap_wxGrid_AdjustScrollbars, 1 }, - { "new_wxGrid", _wrap_new_wxGrid, 1 }, - { "wxGridCell_SetCellBitmap", _wrap_wxGridCell_SetCellBitmap, 1 }, - { "wxGridCell_GetCellBitmap", _wrap_wxGridCell_GetCellBitmap, 1 }, - { "wxGridCell_SetAlignment", _wrap_wxGridCell_SetAlignment, 1 }, - { "wxGridCell_GetAlignment", _wrap_wxGridCell_GetAlignment, 1 }, - { "wxGridCell_GetBackgroundBrush", _wrap_wxGridCell_GetBackgroundBrush, 1 }, - { "wxGridCell_SetBackgroundColour", _wrap_wxGridCell_SetBackgroundColour, 1 }, - { "wxGridCell_GetBackgroundColour", _wrap_wxGridCell_GetBackgroundColour, 1 }, - { "wxGridCell_SetTextColour", _wrap_wxGridCell_SetTextColour, 1 }, - { "wxGridCell_GetTextColour", _wrap_wxGridCell_GetTextColour, 1 }, - { "wxGridCell_SetFont", _wrap_wxGridCell_SetFont, 1 }, - { "wxGridCell_GetFont", _wrap_wxGridCell_GetFont, 1 }, - { "wxGridCell_SetTextValue", _wrap_wxGridCell_SetTextValue, 1 }, - { "wxGridCell_GetTextValue", _wrap_wxGridCell_GetTextValue, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initwindows2c)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("windows2c", windows2cMethods); - d = PyModule_GetDict(m); - PyDict_SetItemString(d,"wxGRID_TEXT_CTRL", PyInt_FromLong((long) wxGRID_TEXT_CTRL)); - PyDict_SetItemString(d,"wxGRID_HSCROLL", PyInt_FromLong((long) wxGRID_HSCROLL)); - PyDict_SetItemString(d,"wxGRID_VSCROLL", PyInt_FromLong((long) wxGRID_VSCROLL)); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_wxEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxNotebookEvent",SwigwxNotebookEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxEvent",0); - SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0); - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0); - SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxNotebook",SwigwxNotebookTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxNotebook",SwigwxNotebookTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxGrid",SwigwxGridTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxGrid",SwigwxGridTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxEvtHandler",0); - SWIG_RegisterMapping("_wxPaintEvent","_class_wxPaintEvent",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); - SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxGrid","_class_wxGrid",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); - SWIG_RegisterMapping("_wxPen","_class_wxPen",0); - SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_wxStaticBox","_class_wxStaticBox",0); - SWIG_RegisterMapping("_wxChoice","_class_wxChoice",0); - SWIG_RegisterMapping("_wxSlider","_class_wxSlider",0); - SWIG_RegisterMapping("_wxNotebookEvent","_class_wxNotebookEvent",0); - SWIG_RegisterMapping("_long","_wxDash",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_wxDropFilesEvent","_class_wxDropFilesEvent",0); - SWIG_RegisterMapping("_wxBitmapButton","_class_wxBitmapButton",0); - SWIG_RegisterMapping("_class_wxGauge","_wxGauge",0); - SWIG_RegisterMapping("_wxDC","_class_wxDC",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_class_wxMenuItem","_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxPaintEvent","_wxPaintEvent",0); - SWIG_RegisterMapping("_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxPanel","_class_wxGrid",SwigwxGridTowxPanel); - SWIG_RegisterMapping("_wxPanel","_wxGrid",SwigwxGridTowxPanel); - SWIG_RegisterMapping("_wxPanel","_class_wxPanel",0); - SWIG_RegisterMapping("_wxInitDialogEvent","_class_wxInitDialogEvent",0); - SWIG_RegisterMapping("_wxCheckBox","_class_wxCheckBox",0); - SWIG_RegisterMapping("_wxTextCtrl","_class_wxTextCtrl",0); - SWIG_RegisterMapping("_class_wxMask","_wxMask",0); - SWIG_RegisterMapping("_class_wxKeyEvent","_wxKeyEvent",0); - SWIG_RegisterMapping("_class_wxGrid","_wxGrid",0); - SWIG_RegisterMapping("_wxColour","_class_wxColour",0); - SWIG_RegisterMapping("_class_wxDialog","_wxDialog",0); - SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); - SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); - SWIG_RegisterMapping("_class_wxNotebookEvent","_wxNotebookEvent",0); - SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxNotebookEvent",SwigwxNotebookEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxEvent",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxCommandEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent); - SWIG_RegisterMapping("_wxCommandEvent","_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent); - SWIG_RegisterMapping("_wxCommandEvent","_class_wxCommandEvent",0); - SWIG_RegisterMapping("_wxSizeEvent","_class_wxSizeEvent",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_class_wxButton","_wxButton",0); - SWIG_RegisterMapping("_wxRadioBox","_class_wxRadioBox",0); - SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_wxScrollBar","_class_wxScrollBar",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0); - SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0); - SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxDropFilesEvent","_wxDropFilesEvent",0); - SWIG_RegisterMapping("_wxStaticText","_class_wxStaticText",0); - SWIG_RegisterMapping("_wxFont","_class_wxFont",0); - SWIG_RegisterMapping("_wxCloseEvent","_class_wxCloseEvent",0); - SWIG_RegisterMapping("_wxNotebook","_class_wxNotebook",0); - SWIG_RegisterMapping("_unsigned_long","_wxDash",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxDC","_wxDC",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_wxFocusEvent","_class_wxFocusEvent",0); - SWIG_RegisterMapping("_wxMaximizeEvent","_class_wxMaximizeEvent",0); - SWIG_RegisterMapping("_class_wxPanel","_class_wxGrid",SwigwxGridTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxGrid",SwigwxGridTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxPanel",0); - SWIG_RegisterMapping("_class_wxCheckBox","_wxCheckBox",0); - SWIG_RegisterMapping("_wxComboBox","_class_wxComboBox",0); - SWIG_RegisterMapping("_wxRadioButton","_class_wxRadioButton",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_class_wxTextCtrl","_wxTextCtrl",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxMenu","_class_wxMenu",0); - SWIG_RegisterMapping("_class_wxMoveEvent","_wxMoveEvent",0); - SWIG_RegisterMapping("_wxListBox","_class_wxListBox",0); - SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_class_wxBrush","_wxBrush",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxWindow","_class_wxNotebook",SwigwxNotebookTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxNotebook",SwigwxNotebookTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxGrid",SwigwxGridTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxGrid",SwigwxGridTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxWindow",0); - SWIG_RegisterMapping("_class_wxStaticText","_wxStaticText",0); - SWIG_RegisterMapping("_class_wxFont","_wxFont",0); - SWIG_RegisterMapping("_class_wxCloseEvent","_wxCloseEvent",0); - SWIG_RegisterMapping("_class_wxMenuEvent","_wxMenuEvent",0); - SWIG_RegisterMapping("_wxClientDC","_class_wxClientDC",0); - SWIG_RegisterMapping("_wxMouseEvent","_class_wxMouseEvent",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_class_wxRadioBox","_wxRadioBox",0); - SWIG_RegisterMapping("_wxGridCell","_class_wxGridCell",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_wxMemoryDC","_class_wxMemoryDC",0); - SWIG_RegisterMapping("_wxPaintDC","_class_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxFocusEvent","_wxFocusEvent",0); - SWIG_RegisterMapping("_class_wxMaximizeEvent","_wxMaximizeEvent",0); - SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); - SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_class_wxMenu","_wxMenu",0); - SWIG_RegisterMapping("_wxControl","_class_wxNotebook",SwigwxNotebookTowxControl); - SWIG_RegisterMapping("_wxControl","_wxNotebook",SwigwxNotebookTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxControl",0); - SWIG_RegisterMapping("_class_wxListBox","_wxListBox",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); - SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); - SWIG_RegisterMapping("_class_wxPen","_wxPen",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_class_wxStaticBox","_wxStaticBox",0); - SWIG_RegisterMapping("_class_wxScrollEvent","_wxScrollEvent",0); - SWIG_RegisterMapping("_wxJoystickEvent","_class_wxJoystickEvent",0); - SWIG_RegisterMapping("_class_wxChoice","_wxChoice",0); - SWIG_RegisterMapping("_class_wxSlider","_wxSlider",0); - SWIG_RegisterMapping("_class_wxBitmapButton","_wxBitmapButton",0); - SWIG_RegisterMapping("_wxFrame","_class_wxFrame",0); - SWIG_RegisterMapping("_class_wxNotebook","_wxNotebook",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_class_wxMouseEvent","_wxMouseEvent",0); - SWIG_RegisterMapping("_wxButton","_class_wxButton",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxPaintDC","_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_class_wxInitDialogEvent","_wxInitDialogEvent",0); - SWIG_RegisterMapping("_class_wxComboBox","_wxComboBox",0); - SWIG_RegisterMapping("_class_wxRadioButton","_wxRadioButton",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxIconizeEvent","_class_wxIconizeEvent",0); - SWIG_RegisterMapping("_class_wxControl","_class_wxNotebook",SwigwxNotebookTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxNotebook",SwigwxNotebookTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxControl",0); - SWIG_RegisterMapping("_wxStaticBitmap","_class_wxStaticBitmap",0); - SWIG_RegisterMapping("_class_wxIcon","_wxIcon",0); - SWIG_RegisterMapping("_class_wxColour","_wxColour",0); - SWIG_RegisterMapping("_class_wxScreenDC","_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxIdleEvent","_wxIdleEvent",0); - SWIG_RegisterMapping("_wxEraseEvent","_class_wxEraseEvent",0); - SWIG_RegisterMapping("_class_wxJoystickEvent","_wxJoystickEvent",0); - SWIG_RegisterMapping("_class_wxShowEvent","_wxShowEvent",0); - SWIG_RegisterMapping("_wxActivateEvent","_class_wxActivateEvent",0); - SWIG_RegisterMapping("_wxGauge","_class_wxGauge",0); - SWIG_RegisterMapping("_class_wxCommandEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent); - SWIG_RegisterMapping("_class_wxCommandEvent","_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent); - SWIG_RegisterMapping("_class_wxCommandEvent","_wxCommandEvent",0); - SWIG_RegisterMapping("_class_wxClientDC","_wxClientDC",0); - SWIG_RegisterMapping("_class_wxSizeEvent","_wxSizeEvent",0); - SWIG_RegisterMapping("_class_wxGridCell","_wxGridCell",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); - SWIG_RegisterMapping("_class_wxBitmap","_wxBitmap",0); - SWIG_RegisterMapping("_class_wxMemoryDC","_wxMemoryDC",0); - SWIG_RegisterMapping("_wxMenuBar","_class_wxMenuBar",0); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxNotebook",SwigwxNotebookTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxNotebook",SwigwxNotebookTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxGrid",SwigwxGridTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxGrid",SwigwxGridTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxEvtHandler",0); - SWIG_RegisterMapping("_wxMenuItem","_class_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxScrollBar","_wxScrollBar",0); - SWIG_RegisterMapping("_wxDash","_unsigned_long",0); - SWIG_RegisterMapping("_wxDash","_long",0); - SWIG_RegisterMapping("_class_wxScrolledWindow","_wxScrolledWindow",0); - SWIG_RegisterMapping("_wxKeyEvent","_class_wxKeyEvent",0); - SWIG_RegisterMapping("_wxMoveEvent","_class_wxMoveEvent",0); - SWIG_RegisterMapping("_class_wxEraseEvent","_wxEraseEvent",0); - SWIG_RegisterMapping("_wxWindow","_class_wxNotebook",SwigwxNotebookTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxNotebook",SwigwxNotebookTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxGrid",SwigwxGridTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxGrid",SwigwxGridTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxWindow",0); - SWIG_RegisterMapping("_class_wxFrame","_wxFrame",0); -} diff --git a/utils/wxPython/src/gtk/windows2.py b/utils/wxPython/src/gtk/windows2.py deleted file mode 100644 index 87c42d4b90..0000000000 --- a/utils/wxPython/src/gtk/windows2.py +++ /dev/null @@ -1,387 +0,0 @@ -# This file was created automatically by SWIG. -import windows2c - -from misc import * - -from gdi import * - -from windows import * - -from controls import * - -from events import * -class wxGridCellPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetTextValue(self): - val = windows2c.wxGridCell_GetTextValue(self.this) - return val - def SetTextValue(self,arg0): - val = windows2c.wxGridCell_SetTextValue(self.this,arg0) - return val - def GetFont(self): - val = windows2c.wxGridCell_GetFont(self.this) - val = wxFontPtr(val) - return val - def SetFont(self,arg0): - val = windows2c.wxGridCell_SetFont(self.this,arg0.this) - return val - def GetTextColour(self): - val = windows2c.wxGridCell_GetTextColour(self.this) - val = wxColourPtr(val) - return val - def SetTextColour(self,arg0): - val = windows2c.wxGridCell_SetTextColour(self.this,arg0.this) - return val - def GetBackgroundColour(self): - val = windows2c.wxGridCell_GetBackgroundColour(self.this) - val = wxColourPtr(val) - return val - def SetBackgroundColour(self,arg0): - val = windows2c.wxGridCell_SetBackgroundColour(self.this,arg0.this) - return val - def GetBackgroundBrush(self): - val = windows2c.wxGridCell_GetBackgroundBrush(self.this) - val = wxBrushPtr(val) - return val - def GetAlignment(self): - val = windows2c.wxGridCell_GetAlignment(self.this) - return val - def SetAlignment(self,arg0): - val = windows2c.wxGridCell_SetAlignment(self.this,arg0) - return val - def GetCellBitmap(self): - val = windows2c.wxGridCell_GetCellBitmap(self.this) - val = wxBitmapPtr(val) - return val - def SetCellBitmap(self,arg0): - val = windows2c.wxGridCell_SetCellBitmap(self.this,arg0.this) - return val - def __repr__(self): - return "" -class wxGridCell(wxGridCellPtr): - def __init__(self,this): - self.this = this - - - - -class wxGridPtr(wxPanelPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def AdjustScrollbars(self): - val = windows2c.wxGrid_AdjustScrollbars(self.this) - return val - def AppendCols(self,*args): - val = apply(windows2c.wxGrid_AppendCols,(self.this,)+args) - return val - def AppendRows(self,*args): - val = apply(windows2c.wxGrid_AppendRows,(self.this,)+args) - return val - def BeginBatch(self): - val = windows2c.wxGrid_BeginBatch(self.this) - return val - def CellHitTest(self,arg0,arg1): - val = windows2c.wxGrid_CellHitTest(self.this,arg0,arg1) - return val - def CreateGrid(self,arg0,arg1,*args): - val = apply(windows2c.wxGrid_CreateGrid,(self.this,arg0,arg1,)+args) - return val - def CurrentCellVisible(self): - val = windows2c.wxGrid_CurrentCellVisible(self.this) - return val - def DeleteCols(self,*args): - val = apply(windows2c.wxGrid_DeleteCols,(self.this,)+args) - return val - def DeleteRows(self,*args): - val = apply(windows2c.wxGrid_DeleteRows,(self.this,)+args) - return val - def EndBatch(self): - val = windows2c.wxGrid_EndBatch(self.this) - return val - def GetBatchCount(self): - val = windows2c.wxGrid_GetBatchCount(self.this) - return val - def GetCell(self,arg0,arg1): - val = windows2c.wxGrid_GetCell(self.this,arg0,arg1) - val = wxGridCellPtr(val) - return val - def GetCellAlignment(self,arg0,arg1): - val = windows2c.wxGrid_GetCellAlignment(self.this,arg0,arg1) - return val - def GetDefCellAlignment(self): - val = windows2c.wxGrid_GetDefCellAlignment(self.this) - return val - def GetCellBackgroundColour(self,arg0,arg1): - val = windows2c.wxGrid_GetCellBackgroundColour(self.this,arg0,arg1) - val = wxColourPtr(val) - return val - def GetDefCellBackgroundColour(self): - val = windows2c.wxGrid_GetDefCellBackgroundColour(self.this) - val = wxColourPtr(val) - return val - def GetCellTextColour(self,arg0,arg1): - val = windows2c.wxGrid_GetCellTextColour(self.this,arg0,arg1) - val = wxColourPtr(val) - return val - def GetDefCellTextColour(self): - val = windows2c.wxGrid_GetDefCellTextColour(self.this) - val = wxColourPtr(val) - return val - def GetCellTextFont(self,arg0,arg1): - val = windows2c.wxGrid_GetCellTextFont(self.this,arg0,arg1) - val = wxFontPtr(val) - return val - def GetDefCellTextFont(self): - val = windows2c.wxGrid_GetDefCellTextFont(self.this) - val = wxFontPtr(val) - return val - def GetCellValue(self,arg0,arg1): - val = windows2c.wxGrid_GetCellValue(self.this,arg0,arg1) - return val - def GetCols(self): - val = windows2c.wxGrid_GetCols(self.this) - return val - def GetColumnWidth(self,arg0): - val = windows2c.wxGrid_GetColumnWidth(self.this,arg0) - return val - def GetCurrentRect(self): - val = windows2c.wxGrid_GetCurrentRect(self.this) - val = wxRectPtr(val) - return val - def GetCursorColumn(self): - val = windows2c.wxGrid_GetCursorColumn(self.this) - return val - def GetCursorRow(self): - val = windows2c.wxGrid_GetCursorRow(self.this) - return val - def GetEditable(self): - val = windows2c.wxGrid_GetEditable(self.this) - return val - def GetHorizScrollBar(self): - val = windows2c.wxGrid_GetHorizScrollBar(self.this) - val = wxScrollBarPtr(val) - return val - def GetLabelAlignment(self,arg0): - val = windows2c.wxGrid_GetLabelAlignment(self.this,arg0) - return val - def GetLabelBackgroundColour(self): - val = windows2c.wxGrid_GetLabelBackgroundColour(self.this) - val = wxColourPtr(val) - return val - def GetLabelSize(self,arg0): - val = windows2c.wxGrid_GetLabelSize(self.this,arg0) - return val - def GetLabelTextColour(self): - val = windows2c.wxGrid_GetLabelTextColour(self.this) - val = wxColourPtr(val) - return val - def GetLabelTextFont(self): - val = windows2c.wxGrid_GetLabelTextFont(self.this) - val = wxFontPtr(val) - return val - def GetLabelValue(self,arg0,arg1): - val = windows2c.wxGrid_GetLabelValue(self.this,arg0,arg1) - return val - def GetRowHeight(self,arg0): - val = windows2c.wxGrid_GetRowHeight(self.this,arg0) - return val - def GetRows(self): - val = windows2c.wxGrid_GetRows(self.this) - return val - def GetScrollPosX(self): - val = windows2c.wxGrid_GetScrollPosX(self.this) - return val - def GetScrollPosY(self): - val = windows2c.wxGrid_GetScrollPosY(self.this) - return val - def GetTextItem(self): - val = windows2c.wxGrid_GetTextItem(self.this) - val = wxTextCtrlPtr(val) - return val - def GetVertScrollBar(self): - val = windows2c.wxGrid_GetVertScrollBar(self.this) - val = wxScrollBarPtr(val) - return val - def InsertCols(self,*args): - val = apply(windows2c.wxGrid_InsertCols,(self.this,)+args) - return val - def InsertRows(self,*args): - val = apply(windows2c.wxGrid_InsertRows,(self.this,)+args) - return val - def SetCellAlignment(self,arg0,arg1,arg2): - val = windows2c.wxGrid_SetCellAlignment(self.this,arg0,arg1,arg2) - return val - def SetDefCellAlignment(self,arg0): - val = windows2c.wxGrid_SetDefCellAlignment(self.this,arg0) - return val - def SetCellBackgroundColour(self,arg0,arg1,arg2): - val = windows2c.wxGrid_SetCellBackgroundColour(self.this,arg0.this,arg1,arg2) - return val - def SetDefCellBackgroundColour(self,arg0): - val = windows2c.wxGrid_SetDefCellBackgroundColour(self.this,arg0.this) - return val - def SetCellTextColour(self,arg0,arg1,arg2): - val = windows2c.wxGrid_SetCellTextColour(self.this,arg0.this,arg1,arg2) - return val - def SetDefCellTextColour(self,arg0): - val = windows2c.wxGrid_SetDefCellTextColour(self.this,arg0.this) - return val - def SetCellTextFont(self,arg0,arg1,arg2): - val = windows2c.wxGrid_SetCellTextFont(self.this,arg0.this,arg1,arg2) - return val - def SetDefCellTextFont(self,arg0): - val = windows2c.wxGrid_SetDefCellTextFont(self.this,arg0.this) - return val - def SetCellValue(self,arg0,arg1,arg2): - val = windows2c.wxGrid_SetCellValue(self.this,arg0,arg1,arg2) - return val - def SetColumnWidth(self,arg0,arg1): - val = windows2c.wxGrid_SetColumnWidth(self.this,arg0,arg1) - return val - def SetDividerPen(self,arg0): - val = windows2c.wxGrid_SetDividerPen(self.this,arg0.this) - return val - def SetEditable(self,arg0): - val = windows2c.wxGrid_SetEditable(self.this,arg0) - return val - def SetGridCursor(self,arg0,arg1): - val = windows2c.wxGrid_SetGridCursor(self.this,arg0,arg1) - return val - def SetLabelAlignment(self,arg0,arg1): - val = windows2c.wxGrid_SetLabelAlignment(self.this,arg0,arg1) - return val - def SetLabelBackgroundColour(self,arg0): - val = windows2c.wxGrid_SetLabelBackgroundColour(self.this,arg0.this) - return val - def SetLabelSize(self,arg0,arg1): - val = windows2c.wxGrid_SetLabelSize(self.this,arg0,arg1) - return val - def SetLabelTextColour(self,arg0): - val = windows2c.wxGrid_SetLabelTextColour(self.this,arg0.this) - return val - def SetLabelTextFont(self,arg0): - val = windows2c.wxGrid_SetLabelTextFont(self.this,arg0.this) - return val - def SetLabelValue(self,arg0,arg1,arg2): - val = windows2c.wxGrid_SetLabelValue(self.this,arg0,arg1,arg2) - return val - def SetRowHeight(self,arg0,arg1): - val = windows2c.wxGrid_SetRowHeight(self.this,arg0,arg1) - return val - def UpdateDimensions(self): - val = windows2c.wxGrid_UpdateDimensions(self.this) - return val - def __repr__(self): - return "" -class wxGrid(wxGridPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windows2c.new_wxGrid,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - -class wxNotebookEventPtr(wxCommandEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetSelection(self): - val = windows2c.wxNotebookEvent_GetSelection(self.this) - return val - def GetOldSelection(self): - val = windows2c.wxNotebookEvent_GetOldSelection(self.this) - return val - def __repr__(self): - return "" -class wxNotebookEvent(wxNotebookEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxNotebookPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetPageCount(self): - val = windows2c.wxNotebook_GetPageCount(self.this) - return val - def SetSelection(self,arg0): - val = windows2c.wxNotebook_SetSelection(self.this,arg0) - return val - def AdvanceSelection(self,*args): - val = apply(windows2c.wxNotebook_AdvanceSelection,(self.this,)+args) - return val - def GetSelection(self): - val = windows2c.wxNotebook_GetSelection(self.this) - return val - def SetPageText(self,arg0,arg1): - val = windows2c.wxNotebook_SetPageText(self.this,arg0,arg1) - return val - def GetPageText(self,arg0): - val = windows2c.wxNotebook_GetPageText(self.this,arg0) - return val - def SetImageList(self,arg0): - val = windows2c.wxNotebook_SetImageList(self.this,arg0) - return val - def GetImageList(self): - val = windows2c.wxNotebook_GetImageList(self.this) - return val - def GetPageImage(self,arg0): - val = windows2c.wxNotebook_GetPageImage(self.this,arg0) - return val - def SetPageImage(self,arg0,arg1): - val = windows2c.wxNotebook_SetPageImage(self.this,arg0,arg1) - return val - def GetRowCount(self): - val = windows2c.wxNotebook_GetRowCount(self.this) - return val - def DeletePage(self,arg0): - val = windows2c.wxNotebook_DeletePage(self.this,arg0) - return val - def DeleteAllPages(self): - val = windows2c.wxNotebook_DeleteAllPages(self.this) - return val - def AddPage(self,arg0,arg1,*args): - val = apply(windows2c.wxNotebook_AddPage,(self.this,arg0.this,arg1,)+args) - return val - def GetPage(self,arg0): - val = windows2c.wxNotebook_GetPage(self.this,arg0) - return val - def __repr__(self): - return "" -class wxNotebook(wxNotebookPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windows2c.new_wxNotebook,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - - - -#-------------- VARIABLE WRAPPERS ------------------ - -wxGRID_TEXT_CTRL = windows2c.wxGRID_TEXT_CTRL -wxGRID_HSCROLL = windows2c.wxGRID_HSCROLL -wxGRID_VSCROLL = windows2c.wxGRID_VSCROLL diff --git a/utils/wxPython/src/gtk/wxp.cpp b/utils/wxPython/src/gtk/wxp.cpp deleted file mode 100644 index a3ac64da1f..0000000000 --- a/utils/wxPython/src/gtk/wxp.cpp +++ /dev/null @@ -1,1923 +0,0 @@ -/* - * FILE : gtk/wxp.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/*********************************************************************** - * $Header$ - * swig_lib/python/python.cfg - * - * This file contains coded needed to add variable linking to the - * Python interpreter. C variables are added as a new kind of Python - * datatype. - * - * Also contains supporting code for building python under Windows - * and things like that. - * - * $Log$ - * Revision 1.4 1998/08/27 21:59:29 RD - * Some chicken-and-egg problems solved for wxPython on wxGTK - * - ************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -#ifdef __cplusplus -} -#endif - -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef SWIG_GLOBAL -#ifdef __cplusplus -#define SWIGSTATIC extern "C" -#else -#define SWIGSTATIC -#endif -#endif - -#ifndef SWIGSTATIC -#define SWIGSTATIC static -#endif - -typedef struct { - char *name; - PyObject *(*get_attr)(void); - int (*set_attr)(PyObject *); -} swig_globalvar; - -typedef struct swig_varlinkobject { - PyObject_HEAD - swig_globalvar **vars; - int nvars; - int maxvars; -} swig_varlinkobject; - -/* ---------------------------------------------------------------------- - swig_varlink_repr() - - Function for python repr method - ---------------------------------------------------------------------- */ - -static PyObject * -swig_varlink_repr(swig_varlinkobject *v) -{ - v = v; - return PyString_FromString(""); -} - -/* --------------------------------------------------------------------- - swig_varlink_print() - - Print out all of the global variable names - --------------------------------------------------------------------- */ - -static int -swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) -{ - - int i = 0; - flags = flags; - fprintf(fp,"Global variables { "); - while (v->vars[i]) { - fprintf(fp,"%s", v->vars[i]->name); - i++; - if (v->vars[i]) fprintf(fp,", "); - } - fprintf(fp," }\n"); - return 0; -} - -/* -------------------------------------------------------------------- - swig_varlink_getattr - - This function gets the value of a variable and returns it as a - PyObject. In our case, we'll be looking at the datatype and - converting into a number or string - -------------------------------------------------------------------- */ - -static PyObject * -swig_varlink_getattr(swig_varlinkobject *v, char *n) -{ - int i = 0; - char temp[128]; - - while (v->vars[i]) { - if (strcmp(v->vars[i]->name,n) == 0) { - return (*v->vars[i]->get_attr)(); - } - i++; - } - sprintf(temp,"C global variable %s not found.", n); - PyErr_SetString(PyExc_NameError,temp); - return NULL; -} - -/* ------------------------------------------------------------------- - swig_varlink_setattr() - - This function sets the value of a variable. - ------------------------------------------------------------------- */ - -static int -swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) -{ - char temp[128]; - int i = 0; - while (v->vars[i]) { - if (strcmp(v->vars[i]->name,n) == 0) { - return (*v->vars[i]->set_attr)(p); - } - i++; - } - sprintf(temp,"C global variable %s not found.", n); - PyErr_SetString(PyExc_NameError,temp); - return 1; -} - -statichere PyTypeObject varlinktype = { -/* PyObject_HEAD_INIT(&PyType_Type) Note : This doesn't work on some machines */ - PyObject_HEAD_INIT(0) - 0, - "varlink", /* Type name */ - sizeof(swig_varlinkobject), /* Basic size */ - 0, /* Itemsize */ - 0, /* Deallocator */ - (printfunc) swig_varlink_print, /* Print */ - (getattrfunc) swig_varlink_getattr, /* get attr */ - (setattrfunc) swig_varlink_setattr, /* Set attr */ - 0, /* tp_compare */ - (reprfunc) swig_varlink_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_mapping*/ - 0, /* tp_hash */ -}; - -/* Create a variable linking object for use later */ - -SWIGSTATIC PyObject * -SWIG_newvarlink(void) -{ - swig_varlinkobject *result = 0; - result = PyMem_NEW(swig_varlinkobject,1); - varlinktype.ob_type = &PyType_Type; /* Patch varlinktype into a PyType */ - result->ob_type = &varlinktype; - /* _Py_NewReference(result); Does not seem to be necessary */ - result->nvars = 0; - result->maxvars = 64; - result->vars = (swig_globalvar **) malloc(64*sizeof(swig_globalvar *)); - result->vars[0] = 0; - result->ob_refcnt = 0; - Py_XINCREF((PyObject *) result); - return ((PyObject*) result); -} - -SWIGSTATIC void -SWIG_addvarlink(PyObject *p, char *name, - PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) -{ - swig_varlinkobject *v; - v= (swig_varlinkobject *) p; - - if (v->nvars >= v->maxvars -1) { - v->maxvars = 2*v->maxvars; - v->vars = (swig_globalvar **) realloc(v->vars,v->maxvars*sizeof(swig_globalvar *)); - if (v->vars == NULL) { - fprintf(stderr,"SWIG : Fatal error in initializing Python module.\n"); - exit(1); - } - } - v->vars[v->nvars] = (swig_globalvar *) malloc(sizeof(swig_globalvar)); - v->vars[v->nvars]->name = (char *) malloc(strlen(name)+1); - strcpy(v->vars[v->nvars]->name,name); - v->vars[v->nvars]->get_attr = get_attr; - v->vars[v->nvars]->set_attr = set_attr; - v->nvars++; - v->vars[v->nvars] = 0; -} - - - -/***************************************************************************** - * $Header$ - * - * swigptr.swg - * - * This file contains supporting code for the SWIG run-time type checking - * mechanism. The following functions are available : - * - * SWIG_RegisterMapping(char *origtype, char *newtype, void *(*cast)(void *)); - * - * Registers a new type-mapping with the type-checker. origtype is the - * original datatype and newtype is an equivalent type. cast is optional - * pointer to a function to cast pointer values between types (this - * is typically used to cast pointers from derived classes to base classes in C++) - * - * SWIG_MakePtr(char *buffer, void *ptr, char *typestring); - * - * Makes a pointer string from a pointer and typestring. The result is returned - * in buffer which is assumed to hold enough space for the result. - * - * char * SWIG_GetPtr(char *buffer, void **ptr, char *type) - * - * Gets a pointer value from a string. If there is a type-mismatch, returns - * a character string to the received type. On success, returns NULL. - * - * - * You can remap these functions by making a file called "swigptr.swg" in - * your the same directory as the interface file you are wrapping. - * - * These functions are normally declared static, but this file can be - * can be used in a multi-module environment by redefining the symbol - * SWIGSTATIC. - *****************************************************************************/ - -#include - -#ifdef SWIG_GLOBAL -#ifdef __cplusplus -#define SWIGSTATIC extern "C" -#else -#define SWIGSTATIC -#endif -#endif - -#ifndef SWIGSTATIC -#define SWIGSTATIC static -#endif - - -/* SWIG pointer structure */ - -typedef struct SwigPtrType { - char *name; /* Datatype name */ - int len; /* Length (used for optimization) */ - void *(*cast)(void *); /* Pointer casting function */ - struct SwigPtrType *next; /* Linked list pointer */ -} SwigPtrType; - -/* Pointer cache structure */ - -typedef struct { - int stat; /* Status (valid) bit */ - SwigPtrType *tp; /* Pointer to type structure */ - char name[256]; /* Given datatype name */ - char mapped[256]; /* Equivalent name */ -} SwigCacheType; - -/* Some variables */ - -static int SwigPtrMax = 64; /* Max entries that can be currently held */ - /* This value may be adjusted dynamically */ -static int SwigPtrN = 0; /* Current number of entries */ -static int SwigPtrSort = 0; /* Status flag indicating sort */ -static int SwigStart[256]; /* Starting positions of types */ - -/* Pointer table */ -static SwigPtrType *SwigPtrTable = 0; /* Table containing pointer equivalences */ - -/* Cached values */ - -#define SWIG_CACHESIZE 8 -#define SWIG_CACHEMASK 0x7 -static SwigCacheType SwigCache[SWIG_CACHESIZE]; -static int SwigCacheIndex = 0; -static int SwigLastCache = 0; - -/* Sort comparison function */ -static int swigsort(const void *data1, const void *data2) { - SwigPtrType *d1 = (SwigPtrType *) data1; - SwigPtrType *d2 = (SwigPtrType *) data2; - return strcmp(d1->name,d2->name); -} - -/* Binary Search function */ -static int swigcmp(const void *key, const void *data) { - char *k = (char *) key; - SwigPtrType *d = (SwigPtrType *) data; - return strncmp(k,d->name,d->len); -} - -/* Register a new datatype with the type-checker */ - -SWIGSTATIC -void SWIG_RegisterMapping(char *origtype, char *newtype, void *(*cast)(void *)) { - - int i; - SwigPtrType *t = 0,*t1; - - /* Allocate the pointer table if necessary */ - - if (!SwigPtrTable) { - SwigPtrTable = (SwigPtrType *) malloc(SwigPtrMax*sizeof(SwigPtrType)); - SwigPtrN = 0; - } - /* Grow the table */ - if (SwigPtrN >= SwigPtrMax) { - SwigPtrMax = 2*SwigPtrMax; - SwigPtrTable = (SwigPtrType *) realloc((char *) SwigPtrTable,SwigPtrMax*sizeof(SwigPtrType)); - } - for (i = 0; i < SwigPtrN; i++) - if (strcmp(SwigPtrTable[i].name,origtype) == 0) { - t = &SwigPtrTable[i]; - break; - } - if (!t) { - t = &SwigPtrTable[SwigPtrN]; - t->name = origtype; - t->len = strlen(t->name); - t->cast = 0; - t->next = 0; - SwigPtrN++; - } - - /* Check for existing entry */ - - while (t->next) { - if ((strcmp(t->name,newtype) == 0)) { - if (cast) t->cast = cast; - return; - } - t = t->next; - } - - /* Now place entry (in sorted order) */ - - t1 = (SwigPtrType *) malloc(sizeof(SwigPtrType)); - t1->name = newtype; - t1->len = strlen(t1->name); - t1->cast = cast; - t1->next = 0; - t->next = t1; - SwigPtrSort = 0; -} - -/* Make a pointer value string */ - -SWIGSTATIC -void SWIG_MakePtr(char *_c, const void *_ptr, char *type) { - static char _hex[16] = - {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - 'a', 'b', 'c', 'd', 'e', 'f'}; - unsigned long _p, _s; - char _result[20], *_r; /* Note : a 64-bit hex number = 16 digits */ - _r = _result; - _p = (unsigned long) _ptr; - if (_p > 0) { - while (_p > 0) { - _s = _p & 0xf; - *(_r++) = _hex[_s]; - _p = _p >> 4; - } - *_r = '_'; - while (_r >= _result) - *(_c++) = *(_r--); - } else { - strcpy (_c, "NULL"); - } - if (_ptr) - strcpy (_c, type); -} - -/* Define for backwards compatibility */ - -#define _swig_make_hex SWIG_MakePtr - -/* Function for getting a pointer value */ - -SWIGSTATIC -char *SWIG_GetPtr(char *_c, void **ptr, char *_t) -{ - unsigned long _p; - char temp_type[256]; - char *name; - int i, len; - SwigPtrType *sp,*tp; - SwigCacheType *cache; - int start, end; - _p = 0; - - /* Pointer values must start with leading underscore */ - if (*_c == '_') { - _c++; - /* Extract hex value from pointer */ - while (*_c) { - if ((*_c >= '0') && (*_c <= '9')) - _p = (_p << 4) + (*_c - '0'); - else if ((*_c >= 'a') && (*_c <= 'f')) - _p = (_p << 4) + ((*_c - 'a') + 10); - else - break; - _c++; - } - - if (_t) { - if (strcmp(_t,_c)) { - if (!SwigPtrSort) { - qsort((void *) SwigPtrTable, SwigPtrN, sizeof(SwigPtrType), swigsort); - for (i = 0; i < 256; i++) { - SwigStart[i] = SwigPtrN; - } - for (i = SwigPtrN-1; i >= 0; i--) { - SwigStart[(int) (SwigPtrTable[i].name[1])] = i; - } - for (i = 255; i >= 1; i--) { - if (SwigStart[i-1] > SwigStart[i]) - SwigStart[i-1] = SwigStart[i]; - } - SwigPtrSort = 1; - for (i = 0; i < SWIG_CACHESIZE; i++) - SwigCache[i].stat = 0; - } - - /* First check cache for matches. Uses last cache value as starting point */ - cache = &SwigCache[SwigLastCache]; - for (i = 0; i < SWIG_CACHESIZE; i++) { - if (cache->stat) { - if (strcmp(_t,cache->name) == 0) { - if (strcmp(_c,cache->mapped) == 0) { - cache->stat++; - *ptr = (void *) _p; - if (cache->tp->cast) *ptr = (*(cache->tp->cast))(*ptr); - return (char *) 0; - } - } - } - SwigLastCache = (SwigLastCache+1) & SWIG_CACHEMASK; - if (!SwigLastCache) cache = SwigCache; - else cache++; - } - /* We have a type mismatch. Will have to look through our type - mapping table to figure out whether or not we can accept this datatype */ - - start = SwigStart[(int) _t[1]]; - end = SwigStart[(int) _t[1]+1]; - sp = &SwigPtrTable[start]; - while (start < end) { - if (swigcmp(_t,sp) == 0) break; - sp++; - start++; - } - if (start >= end) sp = 0; - /* Try to find a match for this */ - if (sp) { - while (swigcmp(_t,sp) == 0) { - name = sp->name; - len = sp->len; - tp = sp->next; - /* Try to find entry for our given datatype */ - while(tp) { - if (tp->len >= 255) { - return _c; - } - strcpy(temp_type,tp->name); - strncat(temp_type,_t+len,255-tp->len); - if (strcmp(_c,temp_type) == 0) { - - strcpy(SwigCache[SwigCacheIndex].mapped,_c); - strcpy(SwigCache[SwigCacheIndex].name,_t); - SwigCache[SwigCacheIndex].stat = 1; - SwigCache[SwigCacheIndex].tp = tp; - SwigCacheIndex = SwigCacheIndex & SWIG_CACHEMASK; - - /* Get pointer value */ - *ptr = (void *) _p; - if (tp->cast) *ptr = (*(tp->cast))(*ptr); - return (char *) 0; - } - tp = tp->next; - } - sp++; - /* Hmmm. Didn't find it this time */ - } - } - /* Didn't find any sort of match for this data. - Get the pointer value and return the received type */ - *ptr = (void *) _p; - return _c; - } else { - /* Found a match on the first try. Return pointer value */ - *ptr = (void *) _p; - return (char *) 0; - } - } else { - /* No type specified. Good luck */ - *ptr = (void *) _p; - return (char *) 0; - } - } else { - if (strcmp (_c, "NULL") == 0) { - *ptr = (void *) 0; - return (char *) 0; - } - *ptr = (void *) 0; - return _c; - } -} - -/* Compatibility mode */ - -#define _swig_get_hex SWIG_GetPtr - -#define SWIG_init initwxpc - -#define SWIG_name "wxpc" - -#include "helpers.h" - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; - -extern "C" SWIGEXPORT(void,initwindowsc)(); -extern "C" SWIGEXPORT(void,initwindows2c)(); -extern "C" SWIGEXPORT(void,initeventsc)(); -extern "C" SWIGEXPORT(void,initmiscc)(); -extern "C" SWIGEXPORT(void,initgdic)(); -extern "C" SWIGEXPORT(void,initmdic)(); -extern "C" SWIGEXPORT(void,initcontrolsc)(); -extern "C" SWIGEXPORT(void,initcontrols2c)(); -extern "C" SWIGEXPORT(void,initcmndlgsc)(); - -static int _wrap_wxPyDefaultPosition_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxPyDefaultPosition is read-only."); - return 1; -} - -static PyObject *_wrap_wxPyDefaultPosition_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxPyDefaultPosition,"_wxPoint_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxPyDefaultSize_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxPyDefaultSize is read-only."); - return 1; -} - -static PyObject *_wrap_wxPyDefaultSize_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxPyDefaultSize,"_wxSize_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static void *SwigwxPyAppTowxEvtHandler(void *ptr) { - wxPyApp *src; - wxEvtHandler *dest; - src = (wxPyApp *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -static wxPyApp *new_wxPyApp() { - wxPythonApp = new wxPyApp(); - return wxPythonApp; - } - -static PyObject *_wrap_new_wxPyApp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxPyApp")) - return NULL; - _result = (wxPyApp *)new_wxPyApp(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyApp_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPyApp_GetAppName(_swigobj) (_swigobj->GetAppName()) -static PyObject *_wrap_wxPyApp_GetAppName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_GetAppName",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetAppName. Expected _wxPyApp_p."); - return NULL; - } - } - _result = new wxString (wxPyApp_GetAppName(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxPyApp_GetClassName(_swigobj) (_swigobj->GetClassName()) -static PyObject *_wrap_wxPyApp_GetClassName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_GetClassName",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetClassName. Expected _wxPyApp_p."); - return NULL; - } - } - _result = new wxString (wxPyApp_GetClassName(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxPyApp_GetExitOnFrameDelete(_swigobj) (_swigobj->GetExitOnFrameDelete()) -static PyObject *_wrap_wxPyApp_GetExitOnFrameDelete(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_GetExitOnFrameDelete",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetExitOnFrameDelete. Expected _wxPyApp_p."); - return NULL; - } - } - _result = (bool )wxPyApp_GetExitOnFrameDelete(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyApp_GetPrintMode(_swigobj) (_swigobj->GetPrintMode()) -static PyObject *_wrap_wxPyApp_GetPrintMode(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_GetPrintMode",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetPrintMode. Expected _wxPyApp_p."); - return NULL; - } - } - _result = (int )wxPyApp_GetPrintMode(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyApp_GetTopWindow(_swigobj) (_swigobj->GetTopWindow()) -static PyObject *_wrap_wxPyApp_GetTopWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - wxPyApp * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_GetTopWindow",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetTopWindow. Expected _wxPyApp_p."); - return NULL; - } - } - _result = (wxWindow *)wxPyApp_GetTopWindow(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPyApp_GetVendorName(_swigobj) (_swigobj->GetVendorName()) -static PyObject *_wrap_wxPyApp_GetVendorName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_GetVendorName",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetVendorName. Expected _wxPyApp_p."); - return NULL; - } - } - _result = new wxString (wxPyApp_GetVendorName(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxPyApp_Dispatch(_swigobj) (_swigobj->Dispatch()) -static PyObject *_wrap_wxPyApp_Dispatch(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_Dispatch",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_Dispatch. Expected _wxPyApp_p."); - return NULL; - } - } - wxPyApp_Dispatch(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyApp_ExitMainLoop(_swigobj) (_swigobj->ExitMainLoop()) -static PyObject *_wrap_wxPyApp_ExitMainLoop(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_ExitMainLoop",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_ExitMainLoop. Expected _wxPyApp_p."); - return NULL; - } - } - wxPyApp_ExitMainLoop(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyApp_Initialized(_swigobj) (_swigobj->Initialized()) -static PyObject *_wrap_wxPyApp_Initialized(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_Initialized",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_Initialized. Expected _wxPyApp_p."); - return NULL; - } - } - _result = (bool )wxPyApp_Initialized(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyApp_MainLoop(_swigobj) (_swigobj->MainLoop()) -static PyObject *_wrap_wxPyApp_MainLoop(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_MainLoop",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_MainLoop. Expected _wxPyApp_p."); - return NULL; - } - } - _result = (int )wxPyApp_MainLoop(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyApp_Pending(_swigobj) (_swigobj->Pending()) -static PyObject *_wrap_wxPyApp_Pending(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_Pending",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_Pending. Expected _wxPyApp_p."); - return NULL; - } - } - _result = (bool )wxPyApp_Pending(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyApp_SetAppName(_swigobj,_swigarg0) (_swigobj->SetAppName(_swigarg0)) -static PyObject *_wrap_wxPyApp_SetAppName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxPyApp_SetAppName",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetAppName. Expected _wxPyApp_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxPyApp_SetAppName(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxPyApp_SetClassName(_swigobj,_swigarg0) (_swigobj->SetClassName(_swigarg0)) -static PyObject *_wrap_wxPyApp_SetClassName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxPyApp_SetClassName",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetClassName. Expected _wxPyApp_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxPyApp_SetClassName(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxPyApp_SetExitOnFrameDelete(_swigobj,_swigarg0) (_swigobj->SetExitOnFrameDelete(_swigarg0)) -static PyObject *_wrap_wxPyApp_SetExitOnFrameDelete(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPyApp_SetExitOnFrameDelete",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetExitOnFrameDelete. Expected _wxPyApp_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxPyApp_SetExitOnFrameDelete(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyApp_SetPrintMode(_swigobj,_swigarg0) (_swigobj->SetPrintMode(_swigarg0)) -static PyObject *_wrap_wxPyApp_SetPrintMode(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPyApp_SetPrintMode",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetPrintMode. Expected _wxPyApp_p."); - return NULL; - } - } - wxPyApp_SetPrintMode(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyApp_SetTopWindow(_swigobj,_swigarg0) (_swigobj->SetTopWindow(_swigarg0)) -static PyObject *_wrap_wxPyApp_SetTopWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - wxWindow * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxPyApp_SetTopWindow",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetTopWindow. Expected _wxPyApp_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyApp_SetTopWindow. Expected _wxWindow_p."); - return NULL; - } - } - wxPyApp_SetTopWindow(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyApp_SetVendorName(_swigobj,_swigarg0) (_swigobj->SetVendorName(_swigarg0)) -static PyObject *_wrap_wxPyApp_SetVendorName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxPyApp_SetVendorName",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetVendorName. Expected _wxPyApp_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxPyApp_SetVendorName(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxPyApp_AfterMainLoop(_swigobj) (_swigobj->AfterMainLoop()) -static PyObject *_wrap_wxPyApp_AfterMainLoop(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_AfterMainLoop",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_AfterMainLoop. Expected _wxPyApp_p."); - return NULL; - } - } - wxPyApp_AfterMainLoop(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyMethodDef wxpcMethods[] = { - { "wxPyApp_AfterMainLoop", _wrap_wxPyApp_AfterMainLoop, 1 }, - { "wxPyApp_SetVendorName", _wrap_wxPyApp_SetVendorName, 1 }, - { "wxPyApp_SetTopWindow", _wrap_wxPyApp_SetTopWindow, 1 }, - { "wxPyApp_SetPrintMode", _wrap_wxPyApp_SetPrintMode, 1 }, - { "wxPyApp_SetExitOnFrameDelete", _wrap_wxPyApp_SetExitOnFrameDelete, 1 }, - { "wxPyApp_SetClassName", _wrap_wxPyApp_SetClassName, 1 }, - { "wxPyApp_SetAppName", _wrap_wxPyApp_SetAppName, 1 }, - { "wxPyApp_Pending", _wrap_wxPyApp_Pending, 1 }, - { "wxPyApp_MainLoop", _wrap_wxPyApp_MainLoop, 1 }, - { "wxPyApp_Initialized", _wrap_wxPyApp_Initialized, 1 }, - { "wxPyApp_ExitMainLoop", _wrap_wxPyApp_ExitMainLoop, 1 }, - { "wxPyApp_Dispatch", _wrap_wxPyApp_Dispatch, 1 }, - { "wxPyApp_GetVendorName", _wrap_wxPyApp_GetVendorName, 1 }, - { "wxPyApp_GetTopWindow", _wrap_wxPyApp_GetTopWindow, 1 }, - { "wxPyApp_GetPrintMode", _wrap_wxPyApp_GetPrintMode, 1 }, - { "wxPyApp_GetExitOnFrameDelete", _wrap_wxPyApp_GetExitOnFrameDelete, 1 }, - { "wxPyApp_GetClassName", _wrap_wxPyApp_GetClassName, 1 }, - { "wxPyApp_GetAppName", _wrap_wxPyApp_GetAppName, 1 }, - { "new_wxPyApp", _wrap_new_wxPyApp, 1 }, - { "_wxSetDictionary", __wxSetDictionary, 1 }, - { "_wxStart", __wxStart, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initwxpc)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("wxpc", wxpcMethods); - d = PyModule_GetDict(m); - PyDict_SetItemString(d,"wxMAJOR_VERSION", PyInt_FromLong((long) wxMAJOR_VERSION)); - PyDict_SetItemString(d,"wxMINOR_VERSION", PyInt_FromLong((long) wxMINOR_VERSION)); - PyDict_SetItemString(d,"wxRELEASE_NUMBER", PyInt_FromLong((long) wxRELEASE_NUMBER)); - PyDict_SetItemString(d,"NOT_FOUND", PyInt_FromLong((long) NOT_FOUND)); - PyDict_SetItemString(d,"wxVSCROLL", PyInt_FromLong((long) wxVSCROLL)); - PyDict_SetItemString(d,"wxHSCROLL", PyInt_FromLong((long) wxHSCROLL)); - PyDict_SetItemString(d,"wxCAPTION", PyInt_FromLong((long) wxCAPTION)); - PyDict_SetItemString(d,"wxDOUBLE_BORDER", PyInt_FromLong((long) wxDOUBLE_BORDER)); - PyDict_SetItemString(d,"wxSUNKEN_BORDER", PyInt_FromLong((long) wxSUNKEN_BORDER)); - PyDict_SetItemString(d,"wxRAISED_BORDER", PyInt_FromLong((long) wxRAISED_BORDER)); - PyDict_SetItemString(d,"wxBORDER", PyInt_FromLong((long) wxBORDER)); - PyDict_SetItemString(d,"wxSIMPLE_BORDER", PyInt_FromLong((long) wxSIMPLE_BORDER)); - PyDict_SetItemString(d,"wxSTATIC_BORDER", PyInt_FromLong((long) wxSTATIC_BORDER)); - PyDict_SetItemString(d,"wxTRANSPARENT_WINDOW", PyInt_FromLong((long) wxTRANSPARENT_WINDOW)); - PyDict_SetItemString(d,"wxNO_BORDER", PyInt_FromLong((long) wxNO_BORDER)); - PyDict_SetItemString(d,"wxUSER_COLOURS", PyInt_FromLong((long) wxUSER_COLOURS)); - PyDict_SetItemString(d,"wxNO_3D", PyInt_FromLong((long) wxNO_3D)); - PyDict_SetItemString(d,"wxTAB_TRAVERSAL", PyInt_FromLong((long) wxTAB_TRAVERSAL)); - PyDict_SetItemString(d,"wxHORIZONTAL", PyInt_FromLong((long) wxHORIZONTAL)); - PyDict_SetItemString(d,"wxVERTICAL", PyInt_FromLong((long) wxVERTICAL)); - PyDict_SetItemString(d,"wxBOTH", PyInt_FromLong((long) wxBOTH)); - PyDict_SetItemString(d,"wxCENTER_FRAME", PyInt_FromLong((long) wxCENTER_FRAME)); - PyDict_SetItemString(d,"wxSTAY_ON_TOP", PyInt_FromLong((long) wxSTAY_ON_TOP)); - PyDict_SetItemString(d,"wxICONIZE", PyInt_FromLong((long) wxICONIZE)); - PyDict_SetItemString(d,"wxMINIMIZE", PyInt_FromLong((long) wxMINIMIZE)); - PyDict_SetItemString(d,"wxMAXIMIZE", PyInt_FromLong((long) wxMAXIMIZE)); - PyDict_SetItemString(d,"wxTHICK_FRAME", PyInt_FromLong((long) wxTHICK_FRAME)); - PyDict_SetItemString(d,"wxSYSTEM_MENU", PyInt_FromLong((long) wxSYSTEM_MENU)); - PyDict_SetItemString(d,"wxMINIMIZE_BOX", PyInt_FromLong((long) wxMINIMIZE_BOX)); - PyDict_SetItemString(d,"wxMAXIMIZE_BOX", PyInt_FromLong((long) wxMAXIMIZE_BOX)); - PyDict_SetItemString(d,"wxTINY_CAPTION_HORIZ", PyInt_FromLong((long) wxTINY_CAPTION_HORIZ)); - PyDict_SetItemString(d,"wxTINY_CAPTION_VERT", PyInt_FromLong((long) wxTINY_CAPTION_VERT)); - PyDict_SetItemString(d,"wxRESIZE_BOX", PyInt_FromLong((long) wxRESIZE_BOX)); - PyDict_SetItemString(d,"wxRESIZE_BORDER", PyInt_FromLong((long) wxRESIZE_BORDER)); - PyDict_SetItemString(d,"wxDIALOG_MODAL", PyInt_FromLong((long) wxDIALOG_MODAL)); - PyDict_SetItemString(d,"wxDIALOG_MODELESS", PyInt_FromLong((long) wxDIALOG_MODELESS)); - PyDict_SetItemString(d,"wxDEFAULT_FRAME_STYLE", PyInt_FromLong((long) wxDEFAULT_FRAME_STYLE)); - PyDict_SetItemString(d,"wxDEFAULT_DIALOG_STYLE", PyInt_FromLong((long) wxDEFAULT_DIALOG_STYLE)); - PyDict_SetItemString(d,"wxRETAINED", PyInt_FromLong((long) wxRETAINED)); - PyDict_SetItemString(d,"wxBACKINGSTORE", PyInt_FromLong((long) wxBACKINGSTORE)); - PyDict_SetItemString(d,"wxTB_3DBUTTONS", PyInt_FromLong((long) wxTB_3DBUTTONS)); - PyDict_SetItemString(d,"wxTB_HORIZONTAL", PyInt_FromLong((long) wxTB_HORIZONTAL)); - PyDict_SetItemString(d,"wxTB_VERTICAL", PyInt_FromLong((long) wxTB_VERTICAL)); - PyDict_SetItemString(d,"wxCOLOURED", PyInt_FromLong((long) wxCOLOURED)); - PyDict_SetItemString(d,"wxFIXED_LENGTH", PyInt_FromLong((long) wxFIXED_LENGTH)); - PyDict_SetItemString(d,"wxALIGN_LEFT", PyInt_FromLong((long) wxALIGN_LEFT)); - PyDict_SetItemString(d,"wxALIGN_CENTER", PyInt_FromLong((long) wxALIGN_CENTER)); - PyDict_SetItemString(d,"wxALIGN_CENTRE", PyInt_FromLong((long) wxALIGN_CENTRE)); - PyDict_SetItemString(d,"wxALIGN_RIGHT", PyInt_FromLong((long) wxALIGN_RIGHT)); - PyDict_SetItemString(d,"wxLB_NEEDED_SB", PyInt_FromLong((long) wxLB_NEEDED_SB)); - PyDict_SetItemString(d,"wxLB_ALWAYS_SB", PyInt_FromLong((long) wxLB_ALWAYS_SB)); - PyDict_SetItemString(d,"wxLB_SORT", PyInt_FromLong((long) wxLB_SORT)); - PyDict_SetItemString(d,"wxLB_SINGLE", PyInt_FromLong((long) wxLB_SINGLE)); - PyDict_SetItemString(d,"wxLB_MULTIPLE", PyInt_FromLong((long) wxLB_MULTIPLE)); - PyDict_SetItemString(d,"wxLB_EXTENDED", PyInt_FromLong((long) wxLB_EXTENDED)); - PyDict_SetItemString(d,"wxLB_OWNERDRAW", PyInt_FromLong((long) wxLB_OWNERDRAW)); - PyDict_SetItemString(d,"wxLB_HSCROLL", PyInt_FromLong((long) wxLB_HSCROLL)); - PyDict_SetItemString(d,"wxPROCESS_ENTER", PyInt_FromLong((long) wxPROCESS_ENTER)); - PyDict_SetItemString(d,"wxPASSWORD", PyInt_FromLong((long) wxPASSWORD)); - PyDict_SetItemString(d,"wxTE_PROCESS_ENTER", PyInt_FromLong((long) wxTE_PROCESS_ENTER)); - PyDict_SetItemString(d,"wxTE_PASSWORD", PyInt_FromLong((long) wxTE_PASSWORD)); - PyDict_SetItemString(d,"wxTE_READONLY", PyInt_FromLong((long) wxTE_READONLY)); - PyDict_SetItemString(d,"wxTE_MULTILINE", PyInt_FromLong((long) wxTE_MULTILINE)); - PyDict_SetItemString(d,"wxCB_SIMPLE", PyInt_FromLong((long) wxCB_SIMPLE)); - PyDict_SetItemString(d,"wxCB_DROPDOWN", PyInt_FromLong((long) wxCB_DROPDOWN)); - PyDict_SetItemString(d,"wxCB_SORT", PyInt_FromLong((long) wxCB_SORT)); - PyDict_SetItemString(d,"wxCB_READONLY", PyInt_FromLong((long) wxCB_READONLY)); - PyDict_SetItemString(d,"wxRA_HORIZONTAL", PyInt_FromLong((long) wxRA_HORIZONTAL)); - PyDict_SetItemString(d,"wxRA_VERTICAL", PyInt_FromLong((long) wxRA_VERTICAL)); - PyDict_SetItemString(d,"wxRB_GROUP", PyInt_FromLong((long) wxRB_GROUP)); - PyDict_SetItemString(d,"wxGA_PROGRESSBAR", PyInt_FromLong((long) wxGA_PROGRESSBAR)); - PyDict_SetItemString(d,"wxGA_HORIZONTAL", PyInt_FromLong((long) wxGA_HORIZONTAL)); - PyDict_SetItemString(d,"wxGA_VERTICAL", PyInt_FromLong((long) wxGA_VERTICAL)); - PyDict_SetItemString(d,"wxSL_HORIZONTAL", PyInt_FromLong((long) wxSL_HORIZONTAL)); - PyDict_SetItemString(d,"wxSL_VERTICAL", PyInt_FromLong((long) wxSL_VERTICAL)); - PyDict_SetItemString(d,"wxSL_AUTOTICKS", PyInt_FromLong((long) wxSL_AUTOTICKS)); - PyDict_SetItemString(d,"wxSL_LABELS", PyInt_FromLong((long) wxSL_LABELS)); - PyDict_SetItemString(d,"wxSL_LEFT", PyInt_FromLong((long) wxSL_LEFT)); - PyDict_SetItemString(d,"wxSL_TOP", PyInt_FromLong((long) wxSL_TOP)); - PyDict_SetItemString(d,"wxSL_RIGHT", PyInt_FromLong((long) wxSL_RIGHT)); - PyDict_SetItemString(d,"wxSL_BOTTOM", PyInt_FromLong((long) wxSL_BOTTOM)); - PyDict_SetItemString(d,"wxSL_BOTH", PyInt_FromLong((long) wxSL_BOTH)); - PyDict_SetItemString(d,"wxSL_SELRANGE", PyInt_FromLong((long) wxSL_SELRANGE)); - PyDict_SetItemString(d,"wxSB_HORIZONTAL", PyInt_FromLong((long) wxSB_HORIZONTAL)); - PyDict_SetItemString(d,"wxSB_VERTICAL", PyInt_FromLong((long) wxSB_VERTICAL)); - PyDict_SetItemString(d,"wxBU_AUTODRAW", PyInt_FromLong((long) wxBU_AUTODRAW)); - PyDict_SetItemString(d,"wxBU_NOAUTODRAW", PyInt_FromLong((long) wxBU_NOAUTODRAW)); - PyDict_SetItemString(d,"wxTR_HAS_BUTTONS", PyInt_FromLong((long) wxTR_HAS_BUTTONS)); - PyDict_SetItemString(d,"wxTR_EDIT_LABELS", PyInt_FromLong((long) wxTR_EDIT_LABELS)); - PyDict_SetItemString(d,"wxLC_ICON", PyInt_FromLong((long) wxLC_ICON)); - PyDict_SetItemString(d,"wxLC_SMALL_ICON", PyInt_FromLong((long) wxLC_SMALL_ICON)); - PyDict_SetItemString(d,"wxLC_LIST", PyInt_FromLong((long) wxLC_LIST)); - PyDict_SetItemString(d,"wxLC_REPORT", PyInt_FromLong((long) wxLC_REPORT)); - PyDict_SetItemString(d,"wxLC_ALIGN_TOP", PyInt_FromLong((long) wxLC_ALIGN_TOP)); - PyDict_SetItemString(d,"wxLC_ALIGN_LEFT", PyInt_FromLong((long) wxLC_ALIGN_LEFT)); - PyDict_SetItemString(d,"wxLC_AUTOARRANGE", PyInt_FromLong((long) wxLC_AUTOARRANGE)); - PyDict_SetItemString(d,"wxLC_USER_TEXT", PyInt_FromLong((long) wxLC_USER_TEXT)); - PyDict_SetItemString(d,"wxLC_EDIT_LABELS", PyInt_FromLong((long) wxLC_EDIT_LABELS)); - PyDict_SetItemString(d,"wxLC_NO_HEADER", PyInt_FromLong((long) wxLC_NO_HEADER)); - PyDict_SetItemString(d,"wxLC_NO_SORT_HEADER", PyInt_FromLong((long) wxLC_NO_SORT_HEADER)); - PyDict_SetItemString(d,"wxLC_SINGLE_SEL", PyInt_FromLong((long) wxLC_SINGLE_SEL)); - PyDict_SetItemString(d,"wxLC_SORT_ASCENDING", PyInt_FromLong((long) wxLC_SORT_ASCENDING)); - PyDict_SetItemString(d,"wxLC_SORT_DESCENDING", PyInt_FromLong((long) wxLC_SORT_DESCENDING)); - PyDict_SetItemString(d,"wxLC_MASK_TYPE", PyInt_FromLong((long) wxLC_MASK_TYPE)); - PyDict_SetItemString(d,"wxLC_MASK_ALIGN", PyInt_FromLong((long) wxLC_MASK_ALIGN)); - PyDict_SetItemString(d,"wxLC_MASK_SORT", PyInt_FromLong((long) wxLC_MASK_SORT)); - PyDict_SetItemString(d,"wxSP_VERTICAL", PyInt_FromLong((long) wxSP_VERTICAL)); - PyDict_SetItemString(d,"wxSP_HORIZONTAL", PyInt_FromLong((long) wxSP_HORIZONTAL)); - PyDict_SetItemString(d,"wxSP_ARROW_KEYS", PyInt_FromLong((long) wxSP_ARROW_KEYS)); - PyDict_SetItemString(d,"wxSP_WRAP", PyInt_FromLong((long) wxSP_WRAP)); - PyDict_SetItemString(d,"wxSP_NOBORDER", PyInt_FromLong((long) wxSP_NOBORDER)); - PyDict_SetItemString(d,"wxSP_3D", PyInt_FromLong((long) wxSP_3D)); - PyDict_SetItemString(d,"wxSP_BORDER", PyInt_FromLong((long) wxSP_BORDER)); - PyDict_SetItemString(d,"wxTAB_MULTILINE", PyInt_FromLong((long) wxTAB_MULTILINE)); - PyDict_SetItemString(d,"wxTAB_RIGHTJUSTIFY", PyInt_FromLong((long) wxTAB_RIGHTJUSTIFY)); - PyDict_SetItemString(d,"wxTAB_FIXEDWIDTH", PyInt_FromLong((long) wxTAB_FIXEDWIDTH)); - PyDict_SetItemString(d,"wxTAB_OWNERDRAW", PyInt_FromLong((long) wxTAB_OWNERDRAW)); - PyDict_SetItemString(d,"wxFLOOD_SURFACE", PyInt_FromLong((long) wxFLOOD_SURFACE)); - PyDict_SetItemString(d,"wxFLOOD_BORDER", PyInt_FromLong((long) wxFLOOD_BORDER)); - PyDict_SetItemString(d,"wxODDEVEN_RULE", PyInt_FromLong((long) wxODDEVEN_RULE)); - PyDict_SetItemString(d,"wxWINDING_RULE", PyInt_FromLong((long) wxWINDING_RULE)); - PyDict_SetItemString(d,"wxTOOL_TOP", PyInt_FromLong((long) wxTOOL_TOP)); - PyDict_SetItemString(d,"wxTOOL_BOTTOM", PyInt_FromLong((long) wxTOOL_BOTTOM)); - PyDict_SetItemString(d,"wxTOOL_LEFT", PyInt_FromLong((long) wxTOOL_LEFT)); - PyDict_SetItemString(d,"wxTOOL_RIGHT", PyInt_FromLong((long) wxTOOL_RIGHT)); - PyDict_SetItemString(d,"wxOK", PyInt_FromLong((long) wxOK)); - PyDict_SetItemString(d,"wxYES_NO", PyInt_FromLong((long) wxYES_NO)); - PyDict_SetItemString(d,"wxCANCEL", PyInt_FromLong((long) wxCANCEL)); - PyDict_SetItemString(d,"wxYES", PyInt_FromLong((long) wxYES)); - PyDict_SetItemString(d,"wxNO", PyInt_FromLong((long) wxNO)); - PyDict_SetItemString(d,"wxICON_EXCLAMATION", PyInt_FromLong((long) wxICON_EXCLAMATION)); - PyDict_SetItemString(d,"wxICON_HAND", PyInt_FromLong((long) wxICON_HAND)); - PyDict_SetItemString(d,"wxICON_QUESTION", PyInt_FromLong((long) wxICON_QUESTION)); - PyDict_SetItemString(d,"wxICON_INFORMATION", PyInt_FromLong((long) wxICON_INFORMATION)); - PyDict_SetItemString(d,"wxICON_STOP", PyInt_FromLong((long) wxICON_STOP)); - PyDict_SetItemString(d,"wxICON_ASTERISK", PyInt_FromLong((long) wxICON_ASTERISK)); - PyDict_SetItemString(d,"wxICON_MASK", PyInt_FromLong((long) wxICON_MASK)); - PyDict_SetItemString(d,"wxCENTRE", PyInt_FromLong((long) wxCENTRE)); - PyDict_SetItemString(d,"wxCENTER", PyInt_FromLong((long) wxCENTER)); - PyDict_SetItemString(d,"wxSIZE_AUTO_WIDTH", PyInt_FromLong((long) wxSIZE_AUTO_WIDTH)); - PyDict_SetItemString(d,"wxSIZE_AUTO_HEIGHT", PyInt_FromLong((long) wxSIZE_AUTO_HEIGHT)); - PyDict_SetItemString(d,"wxSIZE_AUTO", PyInt_FromLong((long) wxSIZE_AUTO)); - PyDict_SetItemString(d,"wxSIZE_USE_EXISTING", PyInt_FromLong((long) wxSIZE_USE_EXISTING)); - PyDict_SetItemString(d,"wxSIZE_ALLOW_MINUS_ONE", PyInt_FromLong((long) wxSIZE_ALLOW_MINUS_ONE)); - PyDict_SetItemString(d,"wxDF_TEXT", PyInt_FromLong((long) wxDF_TEXT)); - PyDict_SetItemString(d,"wxDF_BITMAP", PyInt_FromLong((long) wxDF_BITMAP)); - PyDict_SetItemString(d,"wxDF_METAFILE", PyInt_FromLong((long) wxDF_METAFILE)); - PyDict_SetItemString(d,"wxDF_DIB", PyInt_FromLong((long) wxDF_DIB)); - PyDict_SetItemString(d,"wxDF_OEMTEXT", PyInt_FromLong((long) wxDF_OEMTEXT)); - PyDict_SetItemString(d,"wxDF_FILENAME", PyInt_FromLong((long) wxDF_FILENAME)); - PyDict_SetItemString(d,"wxPORTRAIT", PyInt_FromLong((long) wxPORTRAIT)); - PyDict_SetItemString(d,"wxLANDSCAPE", PyInt_FromLong((long) wxLANDSCAPE)); - PyDict_SetItemString(d,"wxID_OPEN", PyInt_FromLong((long) wxID_OPEN)); - PyDict_SetItemString(d,"wxID_CLOSE", PyInt_FromLong((long) wxID_CLOSE)); - PyDict_SetItemString(d,"wxID_NEW", PyInt_FromLong((long) wxID_NEW)); - PyDict_SetItemString(d,"wxID_SAVE", PyInt_FromLong((long) wxID_SAVE)); - PyDict_SetItemString(d,"wxID_SAVEAS", PyInt_FromLong((long) wxID_SAVEAS)); - PyDict_SetItemString(d,"wxID_REVERT", PyInt_FromLong((long) wxID_REVERT)); - PyDict_SetItemString(d,"wxID_EXIT", PyInt_FromLong((long) wxID_EXIT)); - PyDict_SetItemString(d,"wxID_UNDO", PyInt_FromLong((long) wxID_UNDO)); - PyDict_SetItemString(d,"wxID_REDO", PyInt_FromLong((long) wxID_REDO)); - PyDict_SetItemString(d,"wxID_HELP", PyInt_FromLong((long) wxID_HELP)); - PyDict_SetItemString(d,"wxID_PRINT", PyInt_FromLong((long) wxID_PRINT)); - PyDict_SetItemString(d,"wxID_PRINT_SETUP", PyInt_FromLong((long) wxID_PRINT_SETUP)); - PyDict_SetItemString(d,"wxID_PREVIEW", PyInt_FromLong((long) wxID_PREVIEW)); - PyDict_SetItemString(d,"wxID_ABOUT", PyInt_FromLong((long) wxID_ABOUT)); - PyDict_SetItemString(d,"wxID_HELP_CONTENTS", PyInt_FromLong((long) wxID_HELP_CONTENTS)); - PyDict_SetItemString(d,"wxID_HELP_COMMANDS", PyInt_FromLong((long) wxID_HELP_COMMANDS)); - PyDict_SetItemString(d,"wxID_HELP_PROCEDURES", PyInt_FromLong((long) wxID_HELP_PROCEDURES)); - PyDict_SetItemString(d,"wxID_HELP_CONTEXT", PyInt_FromLong((long) wxID_HELP_CONTEXT)); - PyDict_SetItemString(d,"wxID_CUT", PyInt_FromLong((long) wxID_CUT)); - PyDict_SetItemString(d,"wxID_COPY", PyInt_FromLong((long) wxID_COPY)); - PyDict_SetItemString(d,"wxID_PASTE", PyInt_FromLong((long) wxID_PASTE)); - PyDict_SetItemString(d,"wxID_CLEAR", PyInt_FromLong((long) wxID_CLEAR)); - PyDict_SetItemString(d,"wxID_FIND", PyInt_FromLong((long) wxID_FIND)); - PyDict_SetItemString(d,"wxID_FILE1", PyInt_FromLong((long) wxID_FILE1)); - PyDict_SetItemString(d,"wxID_FILE2", PyInt_FromLong((long) wxID_FILE2)); - PyDict_SetItemString(d,"wxID_FILE3", PyInt_FromLong((long) wxID_FILE3)); - PyDict_SetItemString(d,"wxID_FILE4", PyInt_FromLong((long) wxID_FILE4)); - PyDict_SetItemString(d,"wxID_FILE5", PyInt_FromLong((long) wxID_FILE5)); - PyDict_SetItemString(d,"wxID_FILE6", PyInt_FromLong((long) wxID_FILE6)); - PyDict_SetItemString(d,"wxID_FILE7", PyInt_FromLong((long) wxID_FILE7)); - PyDict_SetItemString(d,"wxID_FILE8", PyInt_FromLong((long) wxID_FILE8)); - PyDict_SetItemString(d,"wxID_FILE9", PyInt_FromLong((long) wxID_FILE9)); - PyDict_SetItemString(d,"wxID_OK", PyInt_FromLong((long) wxID_OK)); - PyDict_SetItemString(d,"wxID_CANCEL", PyInt_FromLong((long) wxID_CANCEL)); - PyDict_SetItemString(d,"wxID_APPLY", PyInt_FromLong((long) wxID_APPLY)); - PyDict_SetItemString(d,"wxID_YES", PyInt_FromLong((long) wxID_YES)); - PyDict_SetItemString(d,"wxID_NO", PyInt_FromLong((long) wxID_NO)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_BMP", PyInt_FromLong((long) wxBITMAP_TYPE_BMP)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_BMP_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_BMP_RESOURCE)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_ICO", PyInt_FromLong((long) wxBITMAP_TYPE_ICO)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_ICO_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_ICO_RESOURCE)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_CUR", PyInt_FromLong((long) wxBITMAP_TYPE_CUR)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_CUR_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_CUR_RESOURCE)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_XBM", PyInt_FromLong((long) wxBITMAP_TYPE_XBM)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_XBM_DATA", PyInt_FromLong((long) wxBITMAP_TYPE_XBM_DATA)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_XPM", PyInt_FromLong((long) wxBITMAP_TYPE_XPM)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_XPM_DATA", PyInt_FromLong((long) wxBITMAP_TYPE_XPM_DATA)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_TIF", PyInt_FromLong((long) wxBITMAP_TYPE_TIF)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_TIF_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_TIF_RESOURCE)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_GIF", PyInt_FromLong((long) wxBITMAP_TYPE_GIF)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_GIF_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_GIF_RESOURCE)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_PNG", PyInt_FromLong((long) wxBITMAP_TYPE_PNG)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_PNG_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_PNG_RESOURCE)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_ANY", PyInt_FromLong((long) wxBITMAP_TYPE_ANY)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_RESOURCE)); - PyDict_SetItemString(d,"wxOPEN", PyInt_FromLong((long) wxOPEN)); - PyDict_SetItemString(d,"wxSAVE", PyInt_FromLong((long) wxSAVE)); - PyDict_SetItemString(d,"wxHIDE_READONLY", PyInt_FromLong((long) wxHIDE_READONLY)); - PyDict_SetItemString(d,"wxOVERWRITE_PROMPT", PyInt_FromLong((long) wxOVERWRITE_PROMPT)); - PyDict_SetItemString(d,"ERR_PARAM", PyInt_FromLong((long) ERR_PARAM)); - PyDict_SetItemString(d,"ERR_NODATA", PyInt_FromLong((long) ERR_NODATA)); - PyDict_SetItemString(d,"ERR_CANCEL", PyInt_FromLong((long) ERR_CANCEL)); - PyDict_SetItemString(d,"ERR_SUCCESS", PyInt_FromLong((long) ERR_SUCCESS)); - PyDict_SetItemString(d,"wxDEFAULT", PyInt_FromLong((long) wxDEFAULT)); - PyDict_SetItemString(d,"wxDECORATIVE", PyInt_FromLong((long) wxDECORATIVE)); - PyDict_SetItemString(d,"wxROMAN", PyInt_FromLong((long) wxROMAN)); - PyDict_SetItemString(d,"wxSCRIPT", PyInt_FromLong((long) wxSCRIPT)); - PyDict_SetItemString(d,"wxSWISS", PyInt_FromLong((long) wxSWISS)); - PyDict_SetItemString(d,"wxMODERN", PyInt_FromLong((long) wxMODERN)); - PyDict_SetItemString(d,"wxTELETYPE", PyInt_FromLong((long) wxTELETYPE)); - PyDict_SetItemString(d,"wxVARIABLE", PyInt_FromLong((long) wxVARIABLE)); - PyDict_SetItemString(d,"wxFIXED", PyInt_FromLong((long) wxFIXED)); - PyDict_SetItemString(d,"wxNORMAL", PyInt_FromLong((long) wxNORMAL)); - PyDict_SetItemString(d,"wxLIGHT", PyInt_FromLong((long) wxLIGHT)); - PyDict_SetItemString(d,"wxBOLD", PyInt_FromLong((long) wxBOLD)); - PyDict_SetItemString(d,"wxITALIC", PyInt_FromLong((long) wxITALIC)); - PyDict_SetItemString(d,"wxSLANT", PyInt_FromLong((long) wxSLANT)); - PyDict_SetItemString(d,"wxSOLID", PyInt_FromLong((long) wxSOLID)); - PyDict_SetItemString(d,"wxDOT", PyInt_FromLong((long) wxDOT)); - PyDict_SetItemString(d,"wxLONG_DASH", PyInt_FromLong((long) wxLONG_DASH)); - PyDict_SetItemString(d,"wxSHORT_DASH", PyInt_FromLong((long) wxSHORT_DASH)); - PyDict_SetItemString(d,"wxDOT_DASH", PyInt_FromLong((long) wxDOT_DASH)); - PyDict_SetItemString(d,"wxUSER_DASH", PyInt_FromLong((long) wxUSER_DASH)); - PyDict_SetItemString(d,"wxTRANSPARENT", PyInt_FromLong((long) wxTRANSPARENT)); - PyDict_SetItemString(d,"wxSTIPPLE", PyInt_FromLong((long) wxSTIPPLE)); - PyDict_SetItemString(d,"wxBDIAGONAL_HATCH", PyInt_FromLong((long) wxBDIAGONAL_HATCH)); - PyDict_SetItemString(d,"wxCROSSDIAG_HATCH", PyInt_FromLong((long) wxCROSSDIAG_HATCH)); - PyDict_SetItemString(d,"wxFDIAGONAL_HATCH", PyInt_FromLong((long) wxFDIAGONAL_HATCH)); - PyDict_SetItemString(d,"wxCROSS_HATCH", PyInt_FromLong((long) wxCROSS_HATCH)); - PyDict_SetItemString(d,"wxHORIZONTAL_HATCH", PyInt_FromLong((long) wxHORIZONTAL_HATCH)); - PyDict_SetItemString(d,"wxVERTICAL_HATCH", PyInt_FromLong((long) wxVERTICAL_HATCH)); - PyDict_SetItemString(d,"wxJOIN_BEVEL", PyInt_FromLong((long) wxJOIN_BEVEL)); - PyDict_SetItemString(d,"wxJOIN_MITER", PyInt_FromLong((long) wxJOIN_MITER)); - PyDict_SetItemString(d,"wxJOIN_ROUND", PyInt_FromLong((long) wxJOIN_ROUND)); - PyDict_SetItemString(d,"wxCAP_ROUND", PyInt_FromLong((long) wxCAP_ROUND)); - PyDict_SetItemString(d,"wxCAP_PROJECTING", PyInt_FromLong((long) wxCAP_PROJECTING)); - PyDict_SetItemString(d,"wxCAP_BUTT", PyInt_FromLong((long) wxCAP_BUTT)); - PyDict_SetItemString(d,"wxCLEAR", PyInt_FromLong((long) wxCLEAR)); - PyDict_SetItemString(d,"wxXOR", PyInt_FromLong((long) wxXOR)); - PyDict_SetItemString(d,"wxINVERT", PyInt_FromLong((long) wxINVERT)); - PyDict_SetItemString(d,"wxOR_REVERSE", PyInt_FromLong((long) wxOR_REVERSE)); - PyDict_SetItemString(d,"wxAND_REVERSE", PyInt_FromLong((long) wxAND_REVERSE)); - PyDict_SetItemString(d,"wxCOPY", PyInt_FromLong((long) wxCOPY)); - PyDict_SetItemString(d,"wxAND", PyInt_FromLong((long) wxAND)); - PyDict_SetItemString(d,"wxAND_INVERT", PyInt_FromLong((long) wxAND_INVERT)); - PyDict_SetItemString(d,"wxNO_OP", PyInt_FromLong((long) wxNO_OP)); - PyDict_SetItemString(d,"wxNOR", PyInt_FromLong((long) wxNOR)); - PyDict_SetItemString(d,"wxEQUIV", PyInt_FromLong((long) wxEQUIV)); - PyDict_SetItemString(d,"wxSRC_INVERT", PyInt_FromLong((long) wxSRC_INVERT)); - PyDict_SetItemString(d,"wxOR_INVERT", PyInt_FromLong((long) wxOR_INVERT)); - PyDict_SetItemString(d,"wxNAND", PyInt_FromLong((long) wxNAND)); - PyDict_SetItemString(d,"wxOR", PyInt_FromLong((long) wxOR)); - PyDict_SetItemString(d,"wxSET", PyInt_FromLong((long) wxSET)); - PyDict_SetItemString(d,"wxSRC_OR", PyInt_FromLong((long) wxSRC_OR)); - PyDict_SetItemString(d,"wxSRC_AND", PyInt_FromLong((long) wxSRC_AND)); - PyDict_SetItemString(d,"WXK_BACK", PyInt_FromLong((long) WXK_BACK)); - PyDict_SetItemString(d,"WXK_TAB", PyInt_FromLong((long) WXK_TAB)); - PyDict_SetItemString(d,"WXK_RETURN", PyInt_FromLong((long) WXK_RETURN)); - PyDict_SetItemString(d,"WXK_ESCAPE", PyInt_FromLong((long) WXK_ESCAPE)); - PyDict_SetItemString(d,"WXK_SPACE", PyInt_FromLong((long) WXK_SPACE)); - PyDict_SetItemString(d,"WXK_DELETE", PyInt_FromLong((long) WXK_DELETE)); - PyDict_SetItemString(d,"WXK_START", PyInt_FromLong((long) WXK_START)); - PyDict_SetItemString(d,"WXK_LBUTTON", PyInt_FromLong((long) WXK_LBUTTON)); - PyDict_SetItemString(d,"WXK_RBUTTON", PyInt_FromLong((long) WXK_RBUTTON)); - PyDict_SetItemString(d,"WXK_CANCEL", PyInt_FromLong((long) WXK_CANCEL)); - PyDict_SetItemString(d,"WXK_MBUTTON", PyInt_FromLong((long) WXK_MBUTTON)); - PyDict_SetItemString(d,"WXK_CLEAR", PyInt_FromLong((long) WXK_CLEAR)); - PyDict_SetItemString(d,"WXK_SHIFT", PyInt_FromLong((long) WXK_SHIFT)); - PyDict_SetItemString(d,"WXK_CONTROL", PyInt_FromLong((long) WXK_CONTROL)); - PyDict_SetItemString(d,"WXK_MENU", PyInt_FromLong((long) WXK_MENU)); - PyDict_SetItemString(d,"WXK_PAUSE", PyInt_FromLong((long) WXK_PAUSE)); - PyDict_SetItemString(d,"WXK_CAPITAL", PyInt_FromLong((long) WXK_CAPITAL)); - PyDict_SetItemString(d,"WXK_PRIOR", PyInt_FromLong((long) WXK_PRIOR)); - PyDict_SetItemString(d,"WXK_NEXT", PyInt_FromLong((long) WXK_NEXT)); - PyDict_SetItemString(d,"WXK_END", PyInt_FromLong((long) WXK_END)); - PyDict_SetItemString(d,"WXK_HOME", PyInt_FromLong((long) WXK_HOME)); - PyDict_SetItemString(d,"WXK_LEFT", PyInt_FromLong((long) WXK_LEFT)); - PyDict_SetItemString(d,"WXK_UP", PyInt_FromLong((long) WXK_UP)); - PyDict_SetItemString(d,"WXK_RIGHT", PyInt_FromLong((long) WXK_RIGHT)); - PyDict_SetItemString(d,"WXK_DOWN", PyInt_FromLong((long) WXK_DOWN)); - PyDict_SetItemString(d,"WXK_SELECT", PyInt_FromLong((long) WXK_SELECT)); - PyDict_SetItemString(d,"WXK_PRINT", PyInt_FromLong((long) WXK_PRINT)); - PyDict_SetItemString(d,"WXK_EXECUTE", PyInt_FromLong((long) WXK_EXECUTE)); - PyDict_SetItemString(d,"WXK_SNAPSHOT", PyInt_FromLong((long) WXK_SNAPSHOT)); - PyDict_SetItemString(d,"WXK_INSERT", PyInt_FromLong((long) WXK_INSERT)); - PyDict_SetItemString(d,"WXK_HELP", PyInt_FromLong((long) WXK_HELP)); - PyDict_SetItemString(d,"WXK_NUMPAD0", PyInt_FromLong((long) WXK_NUMPAD0)); - PyDict_SetItemString(d,"WXK_NUMPAD1", PyInt_FromLong((long) WXK_NUMPAD1)); - PyDict_SetItemString(d,"WXK_NUMPAD2", PyInt_FromLong((long) WXK_NUMPAD2)); - PyDict_SetItemString(d,"WXK_NUMPAD3", PyInt_FromLong((long) WXK_NUMPAD3)); - PyDict_SetItemString(d,"WXK_NUMPAD4", PyInt_FromLong((long) WXK_NUMPAD4)); - PyDict_SetItemString(d,"WXK_NUMPAD5", PyInt_FromLong((long) WXK_NUMPAD5)); - PyDict_SetItemString(d,"WXK_NUMPAD6", PyInt_FromLong((long) WXK_NUMPAD6)); - PyDict_SetItemString(d,"WXK_NUMPAD7", PyInt_FromLong((long) WXK_NUMPAD7)); - PyDict_SetItemString(d,"WXK_NUMPAD8", PyInt_FromLong((long) WXK_NUMPAD8)); - PyDict_SetItemString(d,"WXK_NUMPAD9", PyInt_FromLong((long) WXK_NUMPAD9)); - PyDict_SetItemString(d,"WXK_MULTIPLY", PyInt_FromLong((long) WXK_MULTIPLY)); - PyDict_SetItemString(d,"WXK_ADD", PyInt_FromLong((long) WXK_ADD)); - PyDict_SetItemString(d,"WXK_SEPARATOR", PyInt_FromLong((long) WXK_SEPARATOR)); - PyDict_SetItemString(d,"WXK_SUBTRACT", PyInt_FromLong((long) WXK_SUBTRACT)); - PyDict_SetItemString(d,"WXK_DECIMAL", PyInt_FromLong((long) WXK_DECIMAL)); - PyDict_SetItemString(d,"WXK_DIVIDE", PyInt_FromLong((long) WXK_DIVIDE)); - PyDict_SetItemString(d,"WXK_F1", PyInt_FromLong((long) WXK_F1)); - PyDict_SetItemString(d,"WXK_F2", PyInt_FromLong((long) WXK_F2)); - PyDict_SetItemString(d,"WXK_F3", PyInt_FromLong((long) WXK_F3)); - PyDict_SetItemString(d,"WXK_F4", PyInt_FromLong((long) WXK_F4)); - PyDict_SetItemString(d,"WXK_F5", PyInt_FromLong((long) WXK_F5)); - PyDict_SetItemString(d,"WXK_F6", PyInt_FromLong((long) WXK_F6)); - PyDict_SetItemString(d,"WXK_F7", PyInt_FromLong((long) WXK_F7)); - PyDict_SetItemString(d,"WXK_F8", PyInt_FromLong((long) WXK_F8)); - PyDict_SetItemString(d,"WXK_F9", PyInt_FromLong((long) WXK_F9)); - PyDict_SetItemString(d,"WXK_F10", PyInt_FromLong((long) WXK_F10)); - PyDict_SetItemString(d,"WXK_F11", PyInt_FromLong((long) WXK_F11)); - PyDict_SetItemString(d,"WXK_F12", PyInt_FromLong((long) WXK_F12)); - PyDict_SetItemString(d,"WXK_F13", PyInt_FromLong((long) WXK_F13)); - PyDict_SetItemString(d,"WXK_F14", PyInt_FromLong((long) WXK_F14)); - PyDict_SetItemString(d,"WXK_F15", PyInt_FromLong((long) WXK_F15)); - PyDict_SetItemString(d,"WXK_F16", PyInt_FromLong((long) WXK_F16)); - PyDict_SetItemString(d,"WXK_F17", PyInt_FromLong((long) WXK_F17)); - PyDict_SetItemString(d,"WXK_F18", PyInt_FromLong((long) WXK_F18)); - PyDict_SetItemString(d,"WXK_F19", PyInt_FromLong((long) WXK_F19)); - PyDict_SetItemString(d,"WXK_F20", PyInt_FromLong((long) WXK_F20)); - PyDict_SetItemString(d,"WXK_F21", PyInt_FromLong((long) WXK_F21)); - PyDict_SetItemString(d,"WXK_F22", PyInt_FromLong((long) WXK_F22)); - PyDict_SetItemString(d,"WXK_F23", PyInt_FromLong((long) WXK_F23)); - PyDict_SetItemString(d,"WXK_F24", PyInt_FromLong((long) WXK_F24)); - PyDict_SetItemString(d,"WXK_NUMLOCK", PyInt_FromLong((long) WXK_NUMLOCK)); - PyDict_SetItemString(d,"WXK_SCROLL", PyInt_FromLong((long) WXK_SCROLL)); - PyDict_SetItemString(d,"WXK_PAGEUP", PyInt_FromLong((long) WXK_PAGEUP)); - PyDict_SetItemString(d,"WXK_PAGEDOWN", PyInt_FromLong((long) WXK_PAGEDOWN)); - PyDict_SetItemString(d,"wxCURSOR_ARROW", PyInt_FromLong((long) wxCURSOR_ARROW)); - PyDict_SetItemString(d,"wxCURSOR_BULLSEYE", PyInt_FromLong((long) wxCURSOR_BULLSEYE)); - PyDict_SetItemString(d,"wxCURSOR_CHAR", PyInt_FromLong((long) wxCURSOR_CHAR)); - PyDict_SetItemString(d,"wxCURSOR_CROSS", PyInt_FromLong((long) wxCURSOR_CROSS)); - PyDict_SetItemString(d,"wxCURSOR_HAND", PyInt_FromLong((long) wxCURSOR_HAND)); - PyDict_SetItemString(d,"wxCURSOR_IBEAM", PyInt_FromLong((long) wxCURSOR_IBEAM)); - PyDict_SetItemString(d,"wxCURSOR_LEFT_BUTTON", PyInt_FromLong((long) wxCURSOR_LEFT_BUTTON)); - PyDict_SetItemString(d,"wxCURSOR_MAGNIFIER", PyInt_FromLong((long) wxCURSOR_MAGNIFIER)); - PyDict_SetItemString(d,"wxCURSOR_MIDDLE_BUTTON", PyInt_FromLong((long) wxCURSOR_MIDDLE_BUTTON)); - PyDict_SetItemString(d,"wxCURSOR_NO_ENTRY", PyInt_FromLong((long) wxCURSOR_NO_ENTRY)); - PyDict_SetItemString(d,"wxCURSOR_PAINT_BRUSH", PyInt_FromLong((long) wxCURSOR_PAINT_BRUSH)); - PyDict_SetItemString(d,"wxCURSOR_PENCIL", PyInt_FromLong((long) wxCURSOR_PENCIL)); - PyDict_SetItemString(d,"wxCURSOR_POINT_LEFT", PyInt_FromLong((long) wxCURSOR_POINT_LEFT)); - PyDict_SetItemString(d,"wxCURSOR_POINT_RIGHT", PyInt_FromLong((long) wxCURSOR_POINT_RIGHT)); - PyDict_SetItemString(d,"wxCURSOR_QUESTION_ARROW", PyInt_FromLong((long) wxCURSOR_QUESTION_ARROW)); - PyDict_SetItemString(d,"wxCURSOR_RIGHT_BUTTON", PyInt_FromLong((long) wxCURSOR_RIGHT_BUTTON)); - PyDict_SetItemString(d,"wxCURSOR_SIZENESW", PyInt_FromLong((long) wxCURSOR_SIZENESW)); - PyDict_SetItemString(d,"wxCURSOR_SIZENS", PyInt_FromLong((long) wxCURSOR_SIZENS)); - PyDict_SetItemString(d,"wxCURSOR_SIZENWSE", PyInt_FromLong((long) wxCURSOR_SIZENWSE)); - PyDict_SetItemString(d,"wxCURSOR_SIZEWE", PyInt_FromLong((long) wxCURSOR_SIZEWE)); - PyDict_SetItemString(d,"wxCURSOR_SIZING", PyInt_FromLong((long) wxCURSOR_SIZING)); - PyDict_SetItemString(d,"wxCURSOR_SPRAYCAN", PyInt_FromLong((long) wxCURSOR_SPRAYCAN)); - PyDict_SetItemString(d,"wxCURSOR_WAIT", PyInt_FromLong((long) wxCURSOR_WAIT)); - PyDict_SetItemString(d,"wxCURSOR_WATCH", PyInt_FromLong((long) wxCURSOR_WATCH)); - PyDict_SetItemString(d,"wxCURSOR_BLANK", PyInt_FromLong((long) wxCURSOR_BLANK)); - PyDict_SetItemString(d,"FALSE", PyInt_FromLong((long) 0)); - PyDict_SetItemString(d,"false", PyInt_FromLong((long) 0)); - PyDict_SetItemString(d,"TRUE", PyInt_FromLong((long) 1)); - PyDict_SetItemString(d,"true", PyInt_FromLong((long) 1)); - PyDict_SetItemString(d,"wxEVT_NULL", PyInt_FromLong((long) wxEVT_NULL)); - PyDict_SetItemString(d,"wxEVT_FIRST", PyInt_FromLong((long) wxEVT_FIRST)); - PyDict_SetItemString(d,"wxEVT_COMMAND_BUTTON_CLICKED", PyInt_FromLong((long) wxEVT_COMMAND_BUTTON_CLICKED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_CHECKBOX_CLICKED", PyInt_FromLong((long) wxEVT_COMMAND_CHECKBOX_CLICKED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_CHOICE_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_CHOICE_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LISTBOX_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_LISTBOX_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LISTBOX_DOUBLECLICKED", PyInt_FromLong((long) wxEVT_COMMAND_LISTBOX_DOUBLECLICKED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_CHECKLISTBOX_TOGGLED", PyInt_FromLong((long) wxEVT_COMMAND_CHECKLISTBOX_TOGGLED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TEXT_UPDATED", PyInt_FromLong((long) wxEVT_COMMAND_TEXT_UPDATED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TEXT_ENTER", PyInt_FromLong((long) wxEVT_COMMAND_TEXT_ENTER)); - PyDict_SetItemString(d,"wxEVT_COMMAND_MENU_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_MENU_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_SLIDER_UPDATED", PyInt_FromLong((long) wxEVT_COMMAND_SLIDER_UPDATED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_RADIOBOX_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_RADIOBOX_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_RADIOBUTTON_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_RADIOBUTTON_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_SCROLLBAR_UPDATED", PyInt_FromLong((long) wxEVT_COMMAND_SCROLLBAR_UPDATED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_VLBOX_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_VLBOX_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_COMBOBOX_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_COMBOBOX_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TOOL_CLICKED", PyInt_FromLong((long) wxEVT_COMMAND_TOOL_CLICKED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TOOL_RCLICKED", PyInt_FromLong((long) wxEVT_COMMAND_TOOL_RCLICKED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TOOL_ENTER", PyInt_FromLong((long) wxEVT_COMMAND_TOOL_ENTER)); - PyDict_SetItemString(d,"wxEVT_SET_FOCUS", PyInt_FromLong((long) wxEVT_SET_FOCUS)); - PyDict_SetItemString(d,"wxEVT_KILL_FOCUS", PyInt_FromLong((long) wxEVT_KILL_FOCUS)); - PyDict_SetItemString(d,"wxEVT_LEFT_DOWN", PyInt_FromLong((long) wxEVT_LEFT_DOWN)); - PyDict_SetItemString(d,"wxEVT_LEFT_UP", PyInt_FromLong((long) wxEVT_LEFT_UP)); - PyDict_SetItemString(d,"wxEVT_MIDDLE_DOWN", PyInt_FromLong((long) wxEVT_MIDDLE_DOWN)); - PyDict_SetItemString(d,"wxEVT_MIDDLE_UP", PyInt_FromLong((long) wxEVT_MIDDLE_UP)); - PyDict_SetItemString(d,"wxEVT_RIGHT_DOWN", PyInt_FromLong((long) wxEVT_RIGHT_DOWN)); - PyDict_SetItemString(d,"wxEVT_RIGHT_UP", PyInt_FromLong((long) wxEVT_RIGHT_UP)); - PyDict_SetItemString(d,"wxEVT_MOTION", PyInt_FromLong((long) wxEVT_MOTION)); - PyDict_SetItemString(d,"wxEVT_ENTER_WINDOW", PyInt_FromLong((long) wxEVT_ENTER_WINDOW)); - PyDict_SetItemString(d,"wxEVT_LEAVE_WINDOW", PyInt_FromLong((long) wxEVT_LEAVE_WINDOW)); - PyDict_SetItemString(d,"wxEVT_LEFT_DCLICK", PyInt_FromLong((long) wxEVT_LEFT_DCLICK)); - PyDict_SetItemString(d,"wxEVT_MIDDLE_DCLICK", PyInt_FromLong((long) wxEVT_MIDDLE_DCLICK)); - PyDict_SetItemString(d,"wxEVT_RIGHT_DCLICK", PyInt_FromLong((long) wxEVT_RIGHT_DCLICK)); - PyDict_SetItemString(d,"wxEVT_NC_LEFT_DOWN", PyInt_FromLong((long) wxEVT_NC_LEFT_DOWN)); - PyDict_SetItemString(d,"wxEVT_NC_LEFT_UP", PyInt_FromLong((long) wxEVT_NC_LEFT_UP)); - PyDict_SetItemString(d,"wxEVT_NC_MIDDLE_DOWN", PyInt_FromLong((long) wxEVT_NC_MIDDLE_DOWN)); - PyDict_SetItemString(d,"wxEVT_NC_MIDDLE_UP", PyInt_FromLong((long) wxEVT_NC_MIDDLE_UP)); - PyDict_SetItemString(d,"wxEVT_NC_RIGHT_DOWN", PyInt_FromLong((long) wxEVT_NC_RIGHT_DOWN)); - PyDict_SetItemString(d,"wxEVT_NC_RIGHT_UP", PyInt_FromLong((long) wxEVT_NC_RIGHT_UP)); - PyDict_SetItemString(d,"wxEVT_NC_MOTION", PyInt_FromLong((long) wxEVT_NC_MOTION)); - PyDict_SetItemString(d,"wxEVT_NC_ENTER_WINDOW", PyInt_FromLong((long) wxEVT_NC_ENTER_WINDOW)); - PyDict_SetItemString(d,"wxEVT_NC_LEAVE_WINDOW", PyInt_FromLong((long) wxEVT_NC_LEAVE_WINDOW)); - PyDict_SetItemString(d,"wxEVT_NC_LEFT_DCLICK", PyInt_FromLong((long) wxEVT_NC_LEFT_DCLICK)); - PyDict_SetItemString(d,"wxEVT_NC_MIDDLE_DCLICK", PyInt_FromLong((long) wxEVT_NC_MIDDLE_DCLICK)); - PyDict_SetItemString(d,"wxEVT_NC_RIGHT_DCLICK", PyInt_FromLong((long) wxEVT_NC_RIGHT_DCLICK)); - PyDict_SetItemString(d,"wxEVT_CHAR", PyInt_FromLong((long) wxEVT_CHAR)); - PyDict_SetItemString(d,"wxEVT_SCROLL_TOP", PyInt_FromLong((long) wxEVT_SCROLL_TOP)); - PyDict_SetItemString(d,"wxEVT_SCROLL_BOTTOM", PyInt_FromLong((long) wxEVT_SCROLL_BOTTOM)); - PyDict_SetItemString(d,"wxEVT_SCROLL_LINEUP", PyInt_FromLong((long) wxEVT_SCROLL_LINEUP)); - PyDict_SetItemString(d,"wxEVT_SCROLL_LINEDOWN", PyInt_FromLong((long) wxEVT_SCROLL_LINEDOWN)); - PyDict_SetItemString(d,"wxEVT_SCROLL_PAGEUP", PyInt_FromLong((long) wxEVT_SCROLL_PAGEUP)); - PyDict_SetItemString(d,"wxEVT_SCROLL_PAGEDOWN", PyInt_FromLong((long) wxEVT_SCROLL_PAGEDOWN)); - PyDict_SetItemString(d,"wxEVT_SCROLL_THUMBTRACK", PyInt_FromLong((long) wxEVT_SCROLL_THUMBTRACK)); - PyDict_SetItemString(d,"wxEVT_SIZE", PyInt_FromLong((long) wxEVT_SIZE)); - PyDict_SetItemString(d,"wxEVT_MOVE", PyInt_FromLong((long) wxEVT_MOVE)); - PyDict_SetItemString(d,"wxEVT_CLOSE_WINDOW", PyInt_FromLong((long) wxEVT_CLOSE_WINDOW)); - PyDict_SetItemString(d,"wxEVT_END_SESSION", PyInt_FromLong((long) wxEVT_END_SESSION)); - PyDict_SetItemString(d,"wxEVT_QUERY_END_SESSION", PyInt_FromLong((long) wxEVT_QUERY_END_SESSION)); - PyDict_SetItemString(d,"wxEVT_ACTIVATE_APP", PyInt_FromLong((long) wxEVT_ACTIVATE_APP)); - PyDict_SetItemString(d,"wxEVT_POWER", PyInt_FromLong((long) wxEVT_POWER)); - PyDict_SetItemString(d,"wxEVT_CHAR_HOOK", PyInt_FromLong((long) wxEVT_CHAR_HOOK)); - PyDict_SetItemString(d,"wxEVT_KEY_UP", PyInt_FromLong((long) wxEVT_KEY_UP)); - PyDict_SetItemString(d,"wxEVT_ACTIVATE", PyInt_FromLong((long) wxEVT_ACTIVATE)); - PyDict_SetItemString(d,"wxEVT_CREATE", PyInt_FromLong((long) wxEVT_CREATE)); - PyDict_SetItemString(d,"wxEVT_DESTROY", PyInt_FromLong((long) wxEVT_DESTROY)); - PyDict_SetItemString(d,"wxEVT_SHOW", PyInt_FromLong((long) wxEVT_SHOW)); - PyDict_SetItemString(d,"wxEVT_ICONIZE", PyInt_FromLong((long) wxEVT_ICONIZE)); - PyDict_SetItemString(d,"wxEVT_MAXIMIZE", PyInt_FromLong((long) wxEVT_MAXIMIZE)); - PyDict_SetItemString(d,"wxEVT_MOUSE_CAPTURE_CHANGED", PyInt_FromLong((long) wxEVT_MOUSE_CAPTURE_CHANGED)); - PyDict_SetItemString(d,"wxEVT_PAINT", PyInt_FromLong((long) wxEVT_PAINT)); - PyDict_SetItemString(d,"wxEVT_ERASE_BACKGROUND", PyInt_FromLong((long) wxEVT_ERASE_BACKGROUND)); - PyDict_SetItemString(d,"wxEVT_NC_PAINT", PyInt_FromLong((long) wxEVT_NC_PAINT)); - PyDict_SetItemString(d,"wxEVT_PAINT_ICON", PyInt_FromLong((long) wxEVT_PAINT_ICON)); - PyDict_SetItemString(d,"wxEVT_MENU_CHAR", PyInt_FromLong((long) wxEVT_MENU_CHAR)); - PyDict_SetItemString(d,"wxEVT_MENU_INIT", PyInt_FromLong((long) wxEVT_MENU_INIT)); - PyDict_SetItemString(d,"wxEVT_MENU_HIGHLIGHT", PyInt_FromLong((long) wxEVT_MENU_HIGHLIGHT)); - PyDict_SetItemString(d,"wxEVT_POPUP_MENU_INIT", PyInt_FromLong((long) wxEVT_POPUP_MENU_INIT)); - PyDict_SetItemString(d,"wxEVT_CONTEXT_MENU", PyInt_FromLong((long) wxEVT_CONTEXT_MENU)); - PyDict_SetItemString(d,"wxEVT_SYS_COLOUR_CHANGED", PyInt_FromLong((long) wxEVT_SYS_COLOUR_CHANGED)); - PyDict_SetItemString(d,"wxEVT_SETTING_CHANGED", PyInt_FromLong((long) wxEVT_SETTING_CHANGED)); - PyDict_SetItemString(d,"wxEVT_QUERY_NEW_PALETTE", PyInt_FromLong((long) wxEVT_QUERY_NEW_PALETTE)); - PyDict_SetItemString(d,"wxEVT_PALETTE_CHANGED", PyInt_FromLong((long) wxEVT_PALETTE_CHANGED)); - PyDict_SetItemString(d,"wxEVT_JOY_BUTTON_DOWN", PyInt_FromLong((long) wxEVT_JOY_BUTTON_DOWN)); - PyDict_SetItemString(d,"wxEVT_JOY_BUTTON_UP", PyInt_FromLong((long) wxEVT_JOY_BUTTON_UP)); - PyDict_SetItemString(d,"wxEVT_JOY_MOVE", PyInt_FromLong((long) wxEVT_JOY_MOVE)); - PyDict_SetItemString(d,"wxEVT_JOY_ZMOVE", PyInt_FromLong((long) wxEVT_JOY_ZMOVE)); - PyDict_SetItemString(d,"wxEVT_DROP_FILES", PyInt_FromLong((long) wxEVT_DROP_FILES)); - PyDict_SetItemString(d,"wxEVT_DRAW_ITEM", PyInt_FromLong((long) wxEVT_DRAW_ITEM)); - PyDict_SetItemString(d,"wxEVT_MEASURE_ITEM", PyInt_FromLong((long) wxEVT_MEASURE_ITEM)); - PyDict_SetItemString(d,"wxEVT_COMPARE_ITEM", PyInt_FromLong((long) wxEVT_COMPARE_ITEM)); - PyDict_SetItemString(d,"wxEVT_INIT_DIALOG", PyInt_FromLong((long) wxEVT_INIT_DIALOG)); - PyDict_SetItemString(d,"wxEVT_IDLE", PyInt_FromLong((long) wxEVT_IDLE)); - PyDict_SetItemString(d,"wxEVT_UPDATE_UI", PyInt_FromLong((long) wxEVT_UPDATE_UI)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LEFT_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_LEFT_CLICK)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LEFT_DCLICK", PyInt_FromLong((long) wxEVT_COMMAND_LEFT_DCLICK)); - PyDict_SetItemString(d,"wxEVT_COMMAND_RIGHT_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_RIGHT_CLICK)); - PyDict_SetItemString(d,"wxEVT_COMMAND_RIGHT_DCLICK", PyInt_FromLong((long) wxEVT_COMMAND_RIGHT_DCLICK)); - PyDict_SetItemString(d,"wxEVT_COMMAND_SET_FOCUS", PyInt_FromLong((long) wxEVT_COMMAND_SET_FOCUS)); - PyDict_SetItemString(d,"wxEVT_COMMAND_KILL_FOCUS", PyInt_FromLong((long) wxEVT_COMMAND_KILL_FOCUS)); - PyDict_SetItemString(d,"wxEVT_COMMAND_ENTER", PyInt_FromLong((long) wxEVT_COMMAND_ENTER)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_BEGIN_DRAG", PyInt_FromLong((long) wxEVT_COMMAND_TREE_BEGIN_DRAG)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_BEGIN_RDRAG", PyInt_FromLong((long) wxEVT_COMMAND_TREE_BEGIN_RDRAG)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT", PyInt_FromLong((long) wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_END_LABEL_EDIT", PyInt_FromLong((long) wxEVT_COMMAND_TREE_END_LABEL_EDIT)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_DELETE_ITEM", PyInt_FromLong((long) wxEVT_COMMAND_TREE_DELETE_ITEM)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_GET_INFO", PyInt_FromLong((long) wxEVT_COMMAND_TREE_GET_INFO)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_SET_INFO", PyInt_FromLong((long) wxEVT_COMMAND_TREE_SET_INFO)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_EXPANDED", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_EXPANDED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_EXPANDING", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_EXPANDING)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_SEL_CHANGED", PyInt_FromLong((long) wxEVT_COMMAND_TREE_SEL_CHANGED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_SEL_CHANGING", PyInt_FromLong((long) wxEVT_COMMAND_TREE_SEL_CHANGING)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_KEY_DOWN", PyInt_FromLong((long) wxEVT_COMMAND_TREE_KEY_DOWN)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_BEGIN_DRAG", PyInt_FromLong((long) wxEVT_COMMAND_LIST_BEGIN_DRAG)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_BEGIN_RDRAG", PyInt_FromLong((long) wxEVT_COMMAND_LIST_BEGIN_RDRAG)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT", PyInt_FromLong((long) wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_END_LABEL_EDIT", PyInt_FromLong((long) wxEVT_COMMAND_LIST_END_LABEL_EDIT)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_DELETE_ITEM", PyInt_FromLong((long) wxEVT_COMMAND_LIST_DELETE_ITEM)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS", PyInt_FromLong((long) wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_GET_INFO", PyInt_FromLong((long) wxEVT_COMMAND_LIST_GET_INFO)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_SET_INFO", PyInt_FromLong((long) wxEVT_COMMAND_LIST_SET_INFO)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_ITEM_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_LIST_ITEM_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_ITEM_DESELECTED", PyInt_FromLong((long) wxEVT_COMMAND_LIST_ITEM_DESELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_KEY_DOWN", PyInt_FromLong((long) wxEVT_COMMAND_LIST_KEY_DOWN)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_INSERT_ITEM", PyInt_FromLong((long) wxEVT_COMMAND_LIST_INSERT_ITEM)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_COL_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_LIST_COL_CLICK)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TAB_SEL_CHANGED", PyInt_FromLong((long) wxEVT_COMMAND_TAB_SEL_CHANGED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TAB_SEL_CHANGING", PyInt_FromLong((long) wxEVT_COMMAND_TAB_SEL_CHANGING)); - PyDict_SetItemString(d,"wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED", PyInt_FromLong((long) wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING", PyInt_FromLong((long) wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)); - PyDict_SetItemString(d,"__version__", PyString_FromString("0.3.1")); - PyDict_SetItemString(d,"cvar", SWIG_globals); - SWIG_addvarlink(SWIG_globals,"wxPyDefaultPosition",_wrap_wxPyDefaultPosition_get, _wrap_wxPyDefaultPosition_set); - SWIG_addvarlink(SWIG_globals,"wxPyDefaultSize",_wrap_wxPyDefaultSize_get, _wrap_wxPyDefaultSize_set); - - - __wxPreStart(); // initialize the GUI toolkit, if needed. - -// wxPyWindows = new wxHashTable(wxKEY_INTEGER, 100); - - // Since these modules are all linked together, initialize them now - // because python won't be able to find their shared library files, - // (since there isn't any.) - initwindowsc(); - initwindows2c(); - initeventsc(); - initmiscc(); - initgdic(); - initmdic(); - initcontrolsc(); - initcontrols2c(); - initcmndlgsc(); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_wxEvent","_class_wxEvent",0); - SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0); - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0); - SWIG_RegisterMapping("_wxFontData","_class_wxFontData",0); - SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxPyApp",SwigwxPyAppTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxPyApp",SwigwxPyAppTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxEvtHandler",0); - SWIG_RegisterMapping("_wxPaintEvent","_class_wxPaintEvent",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); - SWIG_RegisterMapping("_class_wxTreeCtrl","_wxTreeCtrl",0); - SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxGrid","_class_wxGrid",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); - SWIG_RegisterMapping("_class_wxColourData","_wxColourData",0); - SWIG_RegisterMapping("_wxPen","_class_wxPen",0); - SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_wxStaticBox","_class_wxStaticBox",0); - SWIG_RegisterMapping("_wxChoice","_class_wxChoice",0); - SWIG_RegisterMapping("_wxSlider","_class_wxSlider",0); - SWIG_RegisterMapping("_wxNotebookEvent","_class_wxNotebookEvent",0); - SWIG_RegisterMapping("_long","_wxDash",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_wxDropFilesEvent","_class_wxDropFilesEvent",0); - SWIG_RegisterMapping("_wxBitmapButton","_class_wxBitmapButton",0); - SWIG_RegisterMapping("_class_wxGauge","_wxGauge",0); - SWIG_RegisterMapping("_wxDC","_class_wxDC",0); - SWIG_RegisterMapping("_wxListEvent","_class_wxListEvent",0); - SWIG_RegisterMapping("_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_class_wxMenuItem","_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxPaintEvent","_wxPaintEvent",0); - SWIG_RegisterMapping("_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxPanel","_class_wxPanel",0); - SWIG_RegisterMapping("_wxInitDialogEvent","_class_wxInitDialogEvent",0); - SWIG_RegisterMapping("_wxCheckBox","_class_wxCheckBox",0); - SWIG_RegisterMapping("_wxTextCtrl","_class_wxTextCtrl",0); - SWIG_RegisterMapping("_class_wxMask","_wxMask",0); - SWIG_RegisterMapping("_class_wxKeyEvent","_wxKeyEvent",0); - SWIG_RegisterMapping("_class_wxGrid","_wxGrid",0); - SWIG_RegisterMapping("_wxColour","_class_wxColour",0); - SWIG_RegisterMapping("_class_wxDialog","_wxDialog",0); - SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); - SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); - SWIG_RegisterMapping("_class_wxNotebookEvent","_wxNotebookEvent",0); - SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxEvent","_wxEvent",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxCommandEvent","_class_wxCommandEvent",0); - SWIG_RegisterMapping("_wxSizeEvent","_class_wxSizeEvent",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_class_wxButton","_wxButton",0); - SWIG_RegisterMapping("_wxRadioBox","_class_wxRadioBox",0); - SWIG_RegisterMapping("_class_wxFontData","_wxFontData",0); - SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_wxScrollBar","_class_wxScrollBar",0); - SWIG_RegisterMapping("_wxColourDialog","_class_wxColourDialog",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxMessageDialog","_class_wxMessageDialog",0); - SWIG_RegisterMapping("_wxTextEntryDialog","_class_wxTextEntryDialog",0); - SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0); - SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0); - SWIG_RegisterMapping("_wxMDIChildFrame","_class_wxMDIChildFrame",0); - SWIG_RegisterMapping("_wxListItem","_class_wxListItem",0); - SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxDropFilesEvent","_wxDropFilesEvent",0); - SWIG_RegisterMapping("_wxStaticText","_class_wxStaticText",0); - SWIG_RegisterMapping("_wxFont","_class_wxFont",0); - SWIG_RegisterMapping("_wxCloseEvent","_class_wxCloseEvent",0); - SWIG_RegisterMapping("_wxNotebook","_class_wxNotebook",0); - SWIG_RegisterMapping("_unsigned_long","_wxDash",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxDC","_wxDC",0); - SWIG_RegisterMapping("_wxPyApp","_class_wxPyApp",0); - SWIG_RegisterMapping("_wxMDIParentFrame","_class_wxMDIParentFrame",0); - SWIG_RegisterMapping("_class_wxTreeEvent","_wxTreeEvent",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_wxFocusEvent","_class_wxFocusEvent",0); - SWIG_RegisterMapping("_wxMaximizeEvent","_class_wxMaximizeEvent",0); - SWIG_RegisterMapping("_class_wxPanel","_wxPanel",0); - SWIG_RegisterMapping("_class_wxCheckBox","_wxCheckBox",0); - SWIG_RegisterMapping("_wxComboBox","_class_wxComboBox",0); - SWIG_RegisterMapping("_wxRadioButton","_class_wxRadioButton",0); - SWIG_RegisterMapping("_class_wxMessageDialog","_wxMessageDialog",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_class_wxTextCtrl","_wxTextCtrl",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxMenu","_class_wxMenu",0); - SWIG_RegisterMapping("_class_wxMoveEvent","_wxMoveEvent",0); - SWIG_RegisterMapping("_wxListBox","_class_wxListBox",0); - SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxMDIChildFrame","_wxMDIChildFrame",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_wxFileDialog","_class_wxFileDialog",0); - SWIG_RegisterMapping("_class_wxMDIClientWindow","_wxMDIClientWindow",0); - SWIG_RegisterMapping("_class_wxBrush","_wxBrush",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxWindow","_wxWindow",0); - SWIG_RegisterMapping("_class_wxStaticText","_wxStaticText",0); - SWIG_RegisterMapping("_class_wxFont","_wxFont",0); - SWIG_RegisterMapping("_class_wxCloseEvent","_wxCloseEvent",0); - SWIG_RegisterMapping("_wxTreeItem","_class_wxTreeItem",0); - SWIG_RegisterMapping("_class_wxMenuEvent","_wxMenuEvent",0); - SWIG_RegisterMapping("_wxClientDC","_class_wxClientDC",0); - SWIG_RegisterMapping("_wxMouseEvent","_class_wxMouseEvent",0); - SWIG_RegisterMapping("_wxListCtrl","_class_wxListCtrl",0); - SWIG_RegisterMapping("_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_class_wxRadioBox","_wxRadioBox",0); - SWIG_RegisterMapping("_wxGridCell","_class_wxGridCell",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_wxMemoryDC","_class_wxMemoryDC",0); - SWIG_RegisterMapping("_wxPaintDC","_class_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxFocusEvent","_wxFocusEvent",0); - SWIG_RegisterMapping("_class_wxMaximizeEvent","_wxMaximizeEvent",0); - SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); - SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_class_wxMenu","_wxMenu",0); - SWIG_RegisterMapping("_wxControl","_class_wxControl",0); - SWIG_RegisterMapping("_class_wxListBox","_wxListBox",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); - SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); - SWIG_RegisterMapping("_class_wxListItem","_wxListItem",0); - SWIG_RegisterMapping("_class_wxPen","_wxPen",0); - SWIG_RegisterMapping("_class_wxFileDialog","_wxFileDialog",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_class_wxStaticBox","_wxStaticBox",0); - SWIG_RegisterMapping("_class_wxScrollEvent","_wxScrollEvent",0); - SWIG_RegisterMapping("_wxJoystickEvent","_class_wxJoystickEvent",0); - SWIG_RegisterMapping("_class_wxChoice","_wxChoice",0); - SWIG_RegisterMapping("_class_wxSlider","_wxSlider",0); - SWIG_RegisterMapping("_class_wxBitmapButton","_wxBitmapButton",0); - SWIG_RegisterMapping("_wxFrame","_class_wxFrame",0); - SWIG_RegisterMapping("_class_wxNotebook","_wxNotebook",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_class_wxMouseEvent","_wxMouseEvent",0); - SWIG_RegisterMapping("_class_wxListEvent","_wxListEvent",0); - SWIG_RegisterMapping("_wxButton","_class_wxButton",0); - SWIG_RegisterMapping("_class_wxPyApp","_wxPyApp",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxMDIParentFrame","_wxMDIParentFrame",0); - SWIG_RegisterMapping("_class_wxPaintDC","_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_class_wxInitDialogEvent","_wxInitDialogEvent",0); - SWIG_RegisterMapping("_class_wxComboBox","_wxComboBox",0); - SWIG_RegisterMapping("_class_wxRadioButton","_wxRadioButton",0); - SWIG_RegisterMapping("_wxTreeCtrl","_class_wxTreeCtrl",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxIconizeEvent","_class_wxIconizeEvent",0); - SWIG_RegisterMapping("_class_wxControl","_wxControl",0); - SWIG_RegisterMapping("_wxStaticBitmap","_class_wxStaticBitmap",0); - SWIG_RegisterMapping("_class_wxIcon","_wxIcon",0); - SWIG_RegisterMapping("_class_wxColour","_wxColour",0); - SWIG_RegisterMapping("_class_wxScreenDC","_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxIdleEvent","_wxIdleEvent",0); - SWIG_RegisterMapping("_wxEraseEvent","_class_wxEraseEvent",0); - SWIG_RegisterMapping("_class_wxJoystickEvent","_wxJoystickEvent",0); - SWIG_RegisterMapping("_wxFontDialog","_class_wxFontDialog",0); - SWIG_RegisterMapping("_class_wxShowEvent","_wxShowEvent",0); - SWIG_RegisterMapping("_wxActivateEvent","_class_wxActivateEvent",0); - SWIG_RegisterMapping("_wxGauge","_class_wxGauge",0); - SWIG_RegisterMapping("_class_wxTreeItem","_wxTreeItem",0); - SWIG_RegisterMapping("_class_wxCommandEvent","_wxCommandEvent",0); - SWIG_RegisterMapping("_class_wxClientDC","_wxClientDC",0); - SWIG_RegisterMapping("_class_wxSizeEvent","_wxSizeEvent",0); - SWIG_RegisterMapping("_class_wxListCtrl","_wxListCtrl",0); - SWIG_RegisterMapping("_class_wxGridCell","_wxGridCell",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); - SWIG_RegisterMapping("_class_wxBitmap","_wxBitmap",0); - SWIG_RegisterMapping("_class_wxMemoryDC","_wxMemoryDC",0); - SWIG_RegisterMapping("_wxMenuBar","_class_wxMenuBar",0); - SWIG_RegisterMapping("_wxTreeEvent","_class_wxTreeEvent",0); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxPyApp",SwigwxPyAppTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxPyApp",SwigwxPyAppTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxEvtHandler",0); - SWIG_RegisterMapping("_wxMenuItem","_class_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxScrollBar","_wxScrollBar",0); - SWIG_RegisterMapping("_class_wxColourDialog","_wxColourDialog",0); - SWIG_RegisterMapping("_wxDash","_unsigned_long",0); - SWIG_RegisterMapping("_wxDash","_long",0); - SWIG_RegisterMapping("_class_wxScrolledWindow","_wxScrolledWindow",0); - SWIG_RegisterMapping("_class_wxTextEntryDialog","_wxTextEntryDialog",0); - SWIG_RegisterMapping("_wxKeyEvent","_class_wxKeyEvent",0); - SWIG_RegisterMapping("_wxMoveEvent","_class_wxMoveEvent",0); - SWIG_RegisterMapping("_wxColourData","_class_wxColourData",0); - SWIG_RegisterMapping("_class_wxEraseEvent","_wxEraseEvent",0); - SWIG_RegisterMapping("_wxMDIClientWindow","_class_wxMDIClientWindow",0); - SWIG_RegisterMapping("_class_wxFontDialog","_wxFontDialog",0); - SWIG_RegisterMapping("_wxWindow","_class_wxWindow",0); - SWIG_RegisterMapping("_class_wxFrame","_wxFrame",0); -} diff --git a/utils/wxPython/src/gtk/wxp.py b/utils/wxPython/src/gtk/wxp.py deleted file mode 100644 index b503c6f4b2..0000000000 --- a/utils/wxPython/src/gtk/wxp.py +++ /dev/null @@ -1,1387 +0,0 @@ -# This file was created automatically by SWIG. -import wxpc - -from misc import * - -from windows import * - -from gdi import * - -from events import * - -from mdi import * - -from controls import * - -from controls2 import * - -from windows2 import * - -from cmndlgs import * -class wxPyAppPtr(wxEvtHandlerPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetAppName(self): - val = wxpc.wxPyApp_GetAppName(self.this) - return val - def GetClassName(self): - val = wxpc.wxPyApp_GetClassName(self.this) - return val - def GetExitOnFrameDelete(self): - val = wxpc.wxPyApp_GetExitOnFrameDelete(self.this) - return val - def GetPrintMode(self): - val = wxpc.wxPyApp_GetPrintMode(self.this) - return val - def GetTopWindow(self): - val = wxpc.wxPyApp_GetTopWindow(self.this) - val = wxWindowPtr(val) - return val - def GetVendorName(self): - val = wxpc.wxPyApp_GetVendorName(self.this) - return val - def Dispatch(self): - val = wxpc.wxPyApp_Dispatch(self.this) - return val - def ExitMainLoop(self): - val = wxpc.wxPyApp_ExitMainLoop(self.this) - return val - def Initialized(self): - val = wxpc.wxPyApp_Initialized(self.this) - return val - def MainLoop(self): - val = wxpc.wxPyApp_MainLoop(self.this) - return val - def Pending(self): - val = wxpc.wxPyApp_Pending(self.this) - return val - def SetAppName(self,arg0): - val = wxpc.wxPyApp_SetAppName(self.this,arg0) - return val - def SetClassName(self,arg0): - val = wxpc.wxPyApp_SetClassName(self.this,arg0) - return val - def SetExitOnFrameDelete(self,arg0): - val = wxpc.wxPyApp_SetExitOnFrameDelete(self.this,arg0) - return val - def SetPrintMode(self,arg0): - val = wxpc.wxPyApp_SetPrintMode(self.this,arg0) - return val - def SetTopWindow(self,arg0): - val = wxpc.wxPyApp_SetTopWindow(self.this,arg0.this) - return val - def SetVendorName(self,arg0): - val = wxpc.wxPyApp_SetVendorName(self.this,arg0) - return val - def AfterMainLoop(self): - val = wxpc.wxPyApp_AfterMainLoop(self.this) - return val - def __repr__(self): - return "" -class wxPyApp(wxPyAppPtr): - def __init__(self) : - self.this = wxpc.new_wxPyApp() - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - -_wxStart = wxpc._wxStart - -_wxSetDictionary = wxpc._wxSetDictionary - - - -#-------------- VARIABLE WRAPPERS ------------------ - -wxMAJOR_VERSION = wxpc.wxMAJOR_VERSION -wxMINOR_VERSION = wxpc.wxMINOR_VERSION -wxRELEASE_NUMBER = wxpc.wxRELEASE_NUMBER -NOT_FOUND = wxpc.NOT_FOUND -wxVSCROLL = wxpc.wxVSCROLL -wxHSCROLL = wxpc.wxHSCROLL -wxCAPTION = wxpc.wxCAPTION -wxDOUBLE_BORDER = wxpc.wxDOUBLE_BORDER -wxSUNKEN_BORDER = wxpc.wxSUNKEN_BORDER -wxRAISED_BORDER = wxpc.wxRAISED_BORDER -wxBORDER = wxpc.wxBORDER -wxSIMPLE_BORDER = wxpc.wxSIMPLE_BORDER -wxSTATIC_BORDER = wxpc.wxSTATIC_BORDER -wxTRANSPARENT_WINDOW = wxpc.wxTRANSPARENT_WINDOW -wxNO_BORDER = wxpc.wxNO_BORDER -wxUSER_COLOURS = wxpc.wxUSER_COLOURS -wxNO_3D = wxpc.wxNO_3D -wxTAB_TRAVERSAL = wxpc.wxTAB_TRAVERSAL -wxHORIZONTAL = wxpc.wxHORIZONTAL -wxVERTICAL = wxpc.wxVERTICAL -wxBOTH = wxpc.wxBOTH -wxCENTER_FRAME = wxpc.wxCENTER_FRAME -wxSTAY_ON_TOP = wxpc.wxSTAY_ON_TOP -wxICONIZE = wxpc.wxICONIZE -wxMINIMIZE = wxpc.wxMINIMIZE -wxMAXIMIZE = wxpc.wxMAXIMIZE -wxTHICK_FRAME = wxpc.wxTHICK_FRAME -wxSYSTEM_MENU = wxpc.wxSYSTEM_MENU -wxMINIMIZE_BOX = wxpc.wxMINIMIZE_BOX -wxMAXIMIZE_BOX = wxpc.wxMAXIMIZE_BOX -wxTINY_CAPTION_HORIZ = wxpc.wxTINY_CAPTION_HORIZ -wxTINY_CAPTION_VERT = wxpc.wxTINY_CAPTION_VERT -wxRESIZE_BOX = wxpc.wxRESIZE_BOX -wxRESIZE_BORDER = wxpc.wxRESIZE_BORDER -wxDIALOG_MODAL = wxpc.wxDIALOG_MODAL -wxDIALOG_MODELESS = wxpc.wxDIALOG_MODELESS -wxDEFAULT_FRAME_STYLE = wxpc.wxDEFAULT_FRAME_STYLE -wxDEFAULT_DIALOG_STYLE = wxpc.wxDEFAULT_DIALOG_STYLE -wxRETAINED = wxpc.wxRETAINED -wxBACKINGSTORE = wxpc.wxBACKINGSTORE -wxTB_3DBUTTONS = wxpc.wxTB_3DBUTTONS -wxTB_HORIZONTAL = wxpc.wxTB_HORIZONTAL -wxTB_VERTICAL = wxpc.wxTB_VERTICAL -wxCOLOURED = wxpc.wxCOLOURED -wxFIXED_LENGTH = wxpc.wxFIXED_LENGTH -wxALIGN_LEFT = wxpc.wxALIGN_LEFT -wxALIGN_CENTER = wxpc.wxALIGN_CENTER -wxALIGN_CENTRE = wxpc.wxALIGN_CENTRE -wxALIGN_RIGHT = wxpc.wxALIGN_RIGHT -wxLB_NEEDED_SB = wxpc.wxLB_NEEDED_SB -wxLB_ALWAYS_SB = wxpc.wxLB_ALWAYS_SB -wxLB_SORT = wxpc.wxLB_SORT -wxLB_SINGLE = wxpc.wxLB_SINGLE -wxLB_MULTIPLE = wxpc.wxLB_MULTIPLE -wxLB_EXTENDED = wxpc.wxLB_EXTENDED -wxLB_OWNERDRAW = wxpc.wxLB_OWNERDRAW -wxLB_HSCROLL = wxpc.wxLB_HSCROLL -wxPROCESS_ENTER = wxpc.wxPROCESS_ENTER -wxPASSWORD = wxpc.wxPASSWORD -wxTE_PROCESS_ENTER = wxpc.wxTE_PROCESS_ENTER -wxTE_PASSWORD = wxpc.wxTE_PASSWORD -wxTE_READONLY = wxpc.wxTE_READONLY -wxTE_MULTILINE = wxpc.wxTE_MULTILINE -wxCB_SIMPLE = wxpc.wxCB_SIMPLE -wxCB_DROPDOWN = wxpc.wxCB_DROPDOWN -wxCB_SORT = wxpc.wxCB_SORT -wxCB_READONLY = wxpc.wxCB_READONLY -wxRA_HORIZONTAL = wxpc.wxRA_HORIZONTAL -wxRA_VERTICAL = wxpc.wxRA_VERTICAL -wxRB_GROUP = wxpc.wxRB_GROUP -wxGA_PROGRESSBAR = wxpc.wxGA_PROGRESSBAR -wxGA_HORIZONTAL = wxpc.wxGA_HORIZONTAL -wxGA_VERTICAL = wxpc.wxGA_VERTICAL -wxSL_HORIZONTAL = wxpc.wxSL_HORIZONTAL -wxSL_VERTICAL = wxpc.wxSL_VERTICAL -wxSL_AUTOTICKS = wxpc.wxSL_AUTOTICKS -wxSL_LABELS = wxpc.wxSL_LABELS -wxSL_LEFT = wxpc.wxSL_LEFT -wxSL_TOP = wxpc.wxSL_TOP -wxSL_RIGHT = wxpc.wxSL_RIGHT -wxSL_BOTTOM = wxpc.wxSL_BOTTOM -wxSL_BOTH = wxpc.wxSL_BOTH -wxSL_SELRANGE = wxpc.wxSL_SELRANGE -wxSB_HORIZONTAL = wxpc.wxSB_HORIZONTAL -wxSB_VERTICAL = wxpc.wxSB_VERTICAL -wxBU_AUTODRAW = wxpc.wxBU_AUTODRAW -wxBU_NOAUTODRAW = wxpc.wxBU_NOAUTODRAW -wxTR_HAS_BUTTONS = wxpc.wxTR_HAS_BUTTONS -wxTR_EDIT_LABELS = wxpc.wxTR_EDIT_LABELS -wxLC_ICON = wxpc.wxLC_ICON -wxLC_SMALL_ICON = wxpc.wxLC_SMALL_ICON -wxLC_LIST = wxpc.wxLC_LIST -wxLC_REPORT = wxpc.wxLC_REPORT -wxLC_ALIGN_TOP = wxpc.wxLC_ALIGN_TOP -wxLC_ALIGN_LEFT = wxpc.wxLC_ALIGN_LEFT -wxLC_AUTOARRANGE = wxpc.wxLC_AUTOARRANGE -wxLC_USER_TEXT = wxpc.wxLC_USER_TEXT -wxLC_EDIT_LABELS = wxpc.wxLC_EDIT_LABELS -wxLC_NO_HEADER = wxpc.wxLC_NO_HEADER -wxLC_NO_SORT_HEADER = wxpc.wxLC_NO_SORT_HEADER -wxLC_SINGLE_SEL = wxpc.wxLC_SINGLE_SEL -wxLC_SORT_ASCENDING = wxpc.wxLC_SORT_ASCENDING -wxLC_SORT_DESCENDING = wxpc.wxLC_SORT_DESCENDING -wxLC_MASK_TYPE = wxpc.wxLC_MASK_TYPE -wxLC_MASK_ALIGN = wxpc.wxLC_MASK_ALIGN -wxLC_MASK_SORT = wxpc.wxLC_MASK_SORT -wxSP_VERTICAL = wxpc.wxSP_VERTICAL -wxSP_HORIZONTAL = wxpc.wxSP_HORIZONTAL -wxSP_ARROW_KEYS = wxpc.wxSP_ARROW_KEYS -wxSP_WRAP = wxpc.wxSP_WRAP -wxSP_NOBORDER = wxpc.wxSP_NOBORDER -wxSP_3D = wxpc.wxSP_3D -wxSP_BORDER = wxpc.wxSP_BORDER -wxTAB_MULTILINE = wxpc.wxTAB_MULTILINE -wxTAB_RIGHTJUSTIFY = wxpc.wxTAB_RIGHTJUSTIFY -wxTAB_FIXEDWIDTH = wxpc.wxTAB_FIXEDWIDTH -wxTAB_OWNERDRAW = wxpc.wxTAB_OWNERDRAW -wxFLOOD_SURFACE = wxpc.wxFLOOD_SURFACE -wxFLOOD_BORDER = wxpc.wxFLOOD_BORDER -wxODDEVEN_RULE = wxpc.wxODDEVEN_RULE -wxWINDING_RULE = wxpc.wxWINDING_RULE -wxTOOL_TOP = wxpc.wxTOOL_TOP -wxTOOL_BOTTOM = wxpc.wxTOOL_BOTTOM -wxTOOL_LEFT = wxpc.wxTOOL_LEFT -wxTOOL_RIGHT = wxpc.wxTOOL_RIGHT -wxOK = wxpc.wxOK -wxYES_NO = wxpc.wxYES_NO -wxCANCEL = wxpc.wxCANCEL -wxYES = wxpc.wxYES -wxNO = wxpc.wxNO -wxICON_EXCLAMATION = wxpc.wxICON_EXCLAMATION -wxICON_HAND = wxpc.wxICON_HAND -wxICON_QUESTION = wxpc.wxICON_QUESTION -wxICON_INFORMATION = wxpc.wxICON_INFORMATION -wxICON_STOP = wxpc.wxICON_STOP -wxICON_ASTERISK = wxpc.wxICON_ASTERISK -wxICON_MASK = wxpc.wxICON_MASK -wxCENTRE = wxpc.wxCENTRE -wxCENTER = wxpc.wxCENTER -wxSIZE_AUTO_WIDTH = wxpc.wxSIZE_AUTO_WIDTH -wxSIZE_AUTO_HEIGHT = wxpc.wxSIZE_AUTO_HEIGHT -wxSIZE_AUTO = wxpc.wxSIZE_AUTO -wxSIZE_USE_EXISTING = wxpc.wxSIZE_USE_EXISTING -wxSIZE_ALLOW_MINUS_ONE = wxpc.wxSIZE_ALLOW_MINUS_ONE -wxDF_TEXT = wxpc.wxDF_TEXT -wxDF_BITMAP = wxpc.wxDF_BITMAP -wxDF_METAFILE = wxpc.wxDF_METAFILE -wxDF_DIB = wxpc.wxDF_DIB -wxDF_OEMTEXT = wxpc.wxDF_OEMTEXT -wxDF_FILENAME = wxpc.wxDF_FILENAME -wxPORTRAIT = wxpc.wxPORTRAIT -wxLANDSCAPE = wxpc.wxLANDSCAPE -wxID_OPEN = wxpc.wxID_OPEN -wxID_CLOSE = wxpc.wxID_CLOSE -wxID_NEW = wxpc.wxID_NEW -wxID_SAVE = wxpc.wxID_SAVE -wxID_SAVEAS = wxpc.wxID_SAVEAS -wxID_REVERT = wxpc.wxID_REVERT -wxID_EXIT = wxpc.wxID_EXIT -wxID_UNDO = wxpc.wxID_UNDO -wxID_REDO = wxpc.wxID_REDO -wxID_HELP = wxpc.wxID_HELP -wxID_PRINT = wxpc.wxID_PRINT -wxID_PRINT_SETUP = wxpc.wxID_PRINT_SETUP -wxID_PREVIEW = wxpc.wxID_PREVIEW -wxID_ABOUT = wxpc.wxID_ABOUT -wxID_HELP_CONTENTS = wxpc.wxID_HELP_CONTENTS -wxID_HELP_COMMANDS = wxpc.wxID_HELP_COMMANDS -wxID_HELP_PROCEDURES = wxpc.wxID_HELP_PROCEDURES -wxID_HELP_CONTEXT = wxpc.wxID_HELP_CONTEXT -wxID_CUT = wxpc.wxID_CUT -wxID_COPY = wxpc.wxID_COPY -wxID_PASTE = wxpc.wxID_PASTE -wxID_CLEAR = wxpc.wxID_CLEAR -wxID_FIND = wxpc.wxID_FIND -wxID_FILE1 = wxpc.wxID_FILE1 -wxID_FILE2 = wxpc.wxID_FILE2 -wxID_FILE3 = wxpc.wxID_FILE3 -wxID_FILE4 = wxpc.wxID_FILE4 -wxID_FILE5 = wxpc.wxID_FILE5 -wxID_FILE6 = wxpc.wxID_FILE6 -wxID_FILE7 = wxpc.wxID_FILE7 -wxID_FILE8 = wxpc.wxID_FILE8 -wxID_FILE9 = wxpc.wxID_FILE9 -wxID_OK = wxpc.wxID_OK -wxID_CANCEL = wxpc.wxID_CANCEL -wxID_APPLY = wxpc.wxID_APPLY -wxID_YES = wxpc.wxID_YES -wxID_NO = wxpc.wxID_NO -wxBITMAP_TYPE_BMP = wxpc.wxBITMAP_TYPE_BMP -wxBITMAP_TYPE_BMP_RESOURCE = wxpc.wxBITMAP_TYPE_BMP_RESOURCE -wxBITMAP_TYPE_ICO = wxpc.wxBITMAP_TYPE_ICO -wxBITMAP_TYPE_ICO_RESOURCE = wxpc.wxBITMAP_TYPE_ICO_RESOURCE -wxBITMAP_TYPE_CUR = wxpc.wxBITMAP_TYPE_CUR -wxBITMAP_TYPE_CUR_RESOURCE = wxpc.wxBITMAP_TYPE_CUR_RESOURCE -wxBITMAP_TYPE_XBM = wxpc.wxBITMAP_TYPE_XBM -wxBITMAP_TYPE_XBM_DATA = wxpc.wxBITMAP_TYPE_XBM_DATA -wxBITMAP_TYPE_XPM = wxpc.wxBITMAP_TYPE_XPM -wxBITMAP_TYPE_XPM_DATA = wxpc.wxBITMAP_TYPE_XPM_DATA -wxBITMAP_TYPE_TIF = wxpc.wxBITMAP_TYPE_TIF -wxBITMAP_TYPE_TIF_RESOURCE = wxpc.wxBITMAP_TYPE_TIF_RESOURCE -wxBITMAP_TYPE_GIF = wxpc.wxBITMAP_TYPE_GIF -wxBITMAP_TYPE_GIF_RESOURCE = wxpc.wxBITMAP_TYPE_GIF_RESOURCE -wxBITMAP_TYPE_PNG = wxpc.wxBITMAP_TYPE_PNG -wxBITMAP_TYPE_PNG_RESOURCE = wxpc.wxBITMAP_TYPE_PNG_RESOURCE -wxBITMAP_TYPE_ANY = wxpc.wxBITMAP_TYPE_ANY -wxBITMAP_TYPE_RESOURCE = wxpc.wxBITMAP_TYPE_RESOURCE -wxOPEN = wxpc.wxOPEN -wxSAVE = wxpc.wxSAVE -wxHIDE_READONLY = wxpc.wxHIDE_READONLY -wxOVERWRITE_PROMPT = wxpc.wxOVERWRITE_PROMPT -ERR_PARAM = wxpc.ERR_PARAM -ERR_NODATA = wxpc.ERR_NODATA -ERR_CANCEL = wxpc.ERR_CANCEL -ERR_SUCCESS = wxpc.ERR_SUCCESS -wxDEFAULT = wxpc.wxDEFAULT -wxDECORATIVE = wxpc.wxDECORATIVE -wxROMAN = wxpc.wxROMAN -wxSCRIPT = wxpc.wxSCRIPT -wxSWISS = wxpc.wxSWISS -wxMODERN = wxpc.wxMODERN -wxTELETYPE = wxpc.wxTELETYPE -wxVARIABLE = wxpc.wxVARIABLE -wxFIXED = wxpc.wxFIXED -wxNORMAL = wxpc.wxNORMAL -wxLIGHT = wxpc.wxLIGHT -wxBOLD = wxpc.wxBOLD -wxITALIC = wxpc.wxITALIC -wxSLANT = wxpc.wxSLANT -wxSOLID = wxpc.wxSOLID -wxDOT = wxpc.wxDOT -wxLONG_DASH = wxpc.wxLONG_DASH -wxSHORT_DASH = wxpc.wxSHORT_DASH -wxDOT_DASH = wxpc.wxDOT_DASH -wxUSER_DASH = wxpc.wxUSER_DASH -wxTRANSPARENT = wxpc.wxTRANSPARENT -wxSTIPPLE = wxpc.wxSTIPPLE -wxBDIAGONAL_HATCH = wxpc.wxBDIAGONAL_HATCH -wxCROSSDIAG_HATCH = wxpc.wxCROSSDIAG_HATCH -wxFDIAGONAL_HATCH = wxpc.wxFDIAGONAL_HATCH -wxCROSS_HATCH = wxpc.wxCROSS_HATCH -wxHORIZONTAL_HATCH = wxpc.wxHORIZONTAL_HATCH -wxVERTICAL_HATCH = wxpc.wxVERTICAL_HATCH -wxJOIN_BEVEL = wxpc.wxJOIN_BEVEL -wxJOIN_MITER = wxpc.wxJOIN_MITER -wxJOIN_ROUND = wxpc.wxJOIN_ROUND -wxCAP_ROUND = wxpc.wxCAP_ROUND -wxCAP_PROJECTING = wxpc.wxCAP_PROJECTING -wxCAP_BUTT = wxpc.wxCAP_BUTT -wxCLEAR = wxpc.wxCLEAR -wxXOR = wxpc.wxXOR -wxINVERT = wxpc.wxINVERT -wxOR_REVERSE = wxpc.wxOR_REVERSE -wxAND_REVERSE = wxpc.wxAND_REVERSE -wxCOPY = wxpc.wxCOPY -wxAND = wxpc.wxAND -wxAND_INVERT = wxpc.wxAND_INVERT -wxNO_OP = wxpc.wxNO_OP -wxNOR = wxpc.wxNOR -wxEQUIV = wxpc.wxEQUIV -wxSRC_INVERT = wxpc.wxSRC_INVERT -wxOR_INVERT = wxpc.wxOR_INVERT -wxNAND = wxpc.wxNAND -wxOR = wxpc.wxOR -wxSET = wxpc.wxSET -wxSRC_OR = wxpc.wxSRC_OR -wxSRC_AND = wxpc.wxSRC_AND -WXK_BACK = wxpc.WXK_BACK -WXK_TAB = wxpc.WXK_TAB -WXK_RETURN = wxpc.WXK_RETURN -WXK_ESCAPE = wxpc.WXK_ESCAPE -WXK_SPACE = wxpc.WXK_SPACE -WXK_DELETE = wxpc.WXK_DELETE -WXK_START = wxpc.WXK_START -WXK_LBUTTON = wxpc.WXK_LBUTTON -WXK_RBUTTON = wxpc.WXK_RBUTTON -WXK_CANCEL = wxpc.WXK_CANCEL -WXK_MBUTTON = wxpc.WXK_MBUTTON -WXK_CLEAR = wxpc.WXK_CLEAR -WXK_SHIFT = wxpc.WXK_SHIFT -WXK_CONTROL = wxpc.WXK_CONTROL -WXK_MENU = wxpc.WXK_MENU -WXK_PAUSE = wxpc.WXK_PAUSE -WXK_CAPITAL = wxpc.WXK_CAPITAL -WXK_PRIOR = wxpc.WXK_PRIOR -WXK_NEXT = wxpc.WXK_NEXT -WXK_END = wxpc.WXK_END -WXK_HOME = wxpc.WXK_HOME -WXK_LEFT = wxpc.WXK_LEFT -WXK_UP = wxpc.WXK_UP -WXK_RIGHT = wxpc.WXK_RIGHT -WXK_DOWN = wxpc.WXK_DOWN -WXK_SELECT = wxpc.WXK_SELECT -WXK_PRINT = wxpc.WXK_PRINT -WXK_EXECUTE = wxpc.WXK_EXECUTE -WXK_SNAPSHOT = wxpc.WXK_SNAPSHOT -WXK_INSERT = wxpc.WXK_INSERT -WXK_HELP = wxpc.WXK_HELP -WXK_NUMPAD0 = wxpc.WXK_NUMPAD0 -WXK_NUMPAD1 = wxpc.WXK_NUMPAD1 -WXK_NUMPAD2 = wxpc.WXK_NUMPAD2 -WXK_NUMPAD3 = wxpc.WXK_NUMPAD3 -WXK_NUMPAD4 = wxpc.WXK_NUMPAD4 -WXK_NUMPAD5 = wxpc.WXK_NUMPAD5 -WXK_NUMPAD6 = wxpc.WXK_NUMPAD6 -WXK_NUMPAD7 = wxpc.WXK_NUMPAD7 -WXK_NUMPAD8 = wxpc.WXK_NUMPAD8 -WXK_NUMPAD9 = wxpc.WXK_NUMPAD9 -WXK_MULTIPLY = wxpc.WXK_MULTIPLY -WXK_ADD = wxpc.WXK_ADD -WXK_SEPARATOR = wxpc.WXK_SEPARATOR -WXK_SUBTRACT = wxpc.WXK_SUBTRACT -WXK_DECIMAL = wxpc.WXK_DECIMAL -WXK_DIVIDE = wxpc.WXK_DIVIDE -WXK_F1 = wxpc.WXK_F1 -WXK_F2 = wxpc.WXK_F2 -WXK_F3 = wxpc.WXK_F3 -WXK_F4 = wxpc.WXK_F4 -WXK_F5 = wxpc.WXK_F5 -WXK_F6 = wxpc.WXK_F6 -WXK_F7 = wxpc.WXK_F7 -WXK_F8 = wxpc.WXK_F8 -WXK_F9 = wxpc.WXK_F9 -WXK_F10 = wxpc.WXK_F10 -WXK_F11 = wxpc.WXK_F11 -WXK_F12 = wxpc.WXK_F12 -WXK_F13 = wxpc.WXK_F13 -WXK_F14 = wxpc.WXK_F14 -WXK_F15 = wxpc.WXK_F15 -WXK_F16 = wxpc.WXK_F16 -WXK_F17 = wxpc.WXK_F17 -WXK_F18 = wxpc.WXK_F18 -WXK_F19 = wxpc.WXK_F19 -WXK_F20 = wxpc.WXK_F20 -WXK_F21 = wxpc.WXK_F21 -WXK_F22 = wxpc.WXK_F22 -WXK_F23 = wxpc.WXK_F23 -WXK_F24 = wxpc.WXK_F24 -WXK_NUMLOCK = wxpc.WXK_NUMLOCK -WXK_SCROLL = wxpc.WXK_SCROLL -WXK_PAGEUP = wxpc.WXK_PAGEUP -WXK_PAGEDOWN = wxpc.WXK_PAGEDOWN -wxCURSOR_ARROW = wxpc.wxCURSOR_ARROW -wxCURSOR_BULLSEYE = wxpc.wxCURSOR_BULLSEYE -wxCURSOR_CHAR = wxpc.wxCURSOR_CHAR -wxCURSOR_CROSS = wxpc.wxCURSOR_CROSS -wxCURSOR_HAND = wxpc.wxCURSOR_HAND -wxCURSOR_IBEAM = wxpc.wxCURSOR_IBEAM -wxCURSOR_LEFT_BUTTON = wxpc.wxCURSOR_LEFT_BUTTON -wxCURSOR_MAGNIFIER = wxpc.wxCURSOR_MAGNIFIER -wxCURSOR_MIDDLE_BUTTON = wxpc.wxCURSOR_MIDDLE_BUTTON -wxCURSOR_NO_ENTRY = wxpc.wxCURSOR_NO_ENTRY -wxCURSOR_PAINT_BRUSH = wxpc.wxCURSOR_PAINT_BRUSH -wxCURSOR_PENCIL = wxpc.wxCURSOR_PENCIL -wxCURSOR_POINT_LEFT = wxpc.wxCURSOR_POINT_LEFT -wxCURSOR_POINT_RIGHT = wxpc.wxCURSOR_POINT_RIGHT -wxCURSOR_QUESTION_ARROW = wxpc.wxCURSOR_QUESTION_ARROW -wxCURSOR_RIGHT_BUTTON = wxpc.wxCURSOR_RIGHT_BUTTON -wxCURSOR_SIZENESW = wxpc.wxCURSOR_SIZENESW -wxCURSOR_SIZENS = wxpc.wxCURSOR_SIZENS -wxCURSOR_SIZENWSE = wxpc.wxCURSOR_SIZENWSE -wxCURSOR_SIZEWE = wxpc.wxCURSOR_SIZEWE -wxCURSOR_SIZING = wxpc.wxCURSOR_SIZING -wxCURSOR_SPRAYCAN = wxpc.wxCURSOR_SPRAYCAN -wxCURSOR_WAIT = wxpc.wxCURSOR_WAIT -wxCURSOR_WATCH = wxpc.wxCURSOR_WATCH -wxCURSOR_BLANK = wxpc.wxCURSOR_BLANK -FALSE = wxpc.FALSE -false = wxpc.false -TRUE = wxpc.TRUE -true = wxpc.true -wxEVT_NULL = wxpc.wxEVT_NULL -wxEVT_FIRST = wxpc.wxEVT_FIRST -wxEVT_COMMAND_BUTTON_CLICKED = wxpc.wxEVT_COMMAND_BUTTON_CLICKED -wxEVT_COMMAND_CHECKBOX_CLICKED = wxpc.wxEVT_COMMAND_CHECKBOX_CLICKED -wxEVT_COMMAND_CHOICE_SELECTED = wxpc.wxEVT_COMMAND_CHOICE_SELECTED -wxEVT_COMMAND_LISTBOX_SELECTED = wxpc.wxEVT_COMMAND_LISTBOX_SELECTED -wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = wxpc.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED -wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = wxpc.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED -wxEVT_COMMAND_TEXT_UPDATED = wxpc.wxEVT_COMMAND_TEXT_UPDATED -wxEVT_COMMAND_TEXT_ENTER = wxpc.wxEVT_COMMAND_TEXT_ENTER -wxEVT_COMMAND_MENU_SELECTED = wxpc.wxEVT_COMMAND_MENU_SELECTED -wxEVT_COMMAND_SLIDER_UPDATED = wxpc.wxEVT_COMMAND_SLIDER_UPDATED -wxEVT_COMMAND_RADIOBOX_SELECTED = wxpc.wxEVT_COMMAND_RADIOBOX_SELECTED -wxEVT_COMMAND_RADIOBUTTON_SELECTED = wxpc.wxEVT_COMMAND_RADIOBUTTON_SELECTED -wxEVT_COMMAND_SCROLLBAR_UPDATED = wxpc.wxEVT_COMMAND_SCROLLBAR_UPDATED -wxEVT_COMMAND_VLBOX_SELECTED = wxpc.wxEVT_COMMAND_VLBOX_SELECTED -wxEVT_COMMAND_COMBOBOX_SELECTED = wxpc.wxEVT_COMMAND_COMBOBOX_SELECTED -wxEVT_COMMAND_TOOL_CLICKED = wxpc.wxEVT_COMMAND_TOOL_CLICKED -wxEVT_COMMAND_TOOL_RCLICKED = wxpc.wxEVT_COMMAND_TOOL_RCLICKED -wxEVT_COMMAND_TOOL_ENTER = wxpc.wxEVT_COMMAND_TOOL_ENTER -wxEVT_SET_FOCUS = wxpc.wxEVT_SET_FOCUS -wxEVT_KILL_FOCUS = wxpc.wxEVT_KILL_FOCUS -wxEVT_LEFT_DOWN = wxpc.wxEVT_LEFT_DOWN -wxEVT_LEFT_UP = wxpc.wxEVT_LEFT_UP -wxEVT_MIDDLE_DOWN = wxpc.wxEVT_MIDDLE_DOWN -wxEVT_MIDDLE_UP = wxpc.wxEVT_MIDDLE_UP -wxEVT_RIGHT_DOWN = wxpc.wxEVT_RIGHT_DOWN -wxEVT_RIGHT_UP = wxpc.wxEVT_RIGHT_UP -wxEVT_MOTION = wxpc.wxEVT_MOTION -wxEVT_ENTER_WINDOW = wxpc.wxEVT_ENTER_WINDOW -wxEVT_LEAVE_WINDOW = wxpc.wxEVT_LEAVE_WINDOW -wxEVT_LEFT_DCLICK = wxpc.wxEVT_LEFT_DCLICK -wxEVT_MIDDLE_DCLICK = wxpc.wxEVT_MIDDLE_DCLICK -wxEVT_RIGHT_DCLICK = wxpc.wxEVT_RIGHT_DCLICK -wxEVT_NC_LEFT_DOWN = wxpc.wxEVT_NC_LEFT_DOWN -wxEVT_NC_LEFT_UP = wxpc.wxEVT_NC_LEFT_UP -wxEVT_NC_MIDDLE_DOWN = wxpc.wxEVT_NC_MIDDLE_DOWN -wxEVT_NC_MIDDLE_UP = wxpc.wxEVT_NC_MIDDLE_UP -wxEVT_NC_RIGHT_DOWN = wxpc.wxEVT_NC_RIGHT_DOWN -wxEVT_NC_RIGHT_UP = wxpc.wxEVT_NC_RIGHT_UP -wxEVT_NC_MOTION = wxpc.wxEVT_NC_MOTION -wxEVT_NC_ENTER_WINDOW = wxpc.wxEVT_NC_ENTER_WINDOW -wxEVT_NC_LEAVE_WINDOW = wxpc.wxEVT_NC_LEAVE_WINDOW -wxEVT_NC_LEFT_DCLICK = wxpc.wxEVT_NC_LEFT_DCLICK -wxEVT_NC_MIDDLE_DCLICK = wxpc.wxEVT_NC_MIDDLE_DCLICK -wxEVT_NC_RIGHT_DCLICK = wxpc.wxEVT_NC_RIGHT_DCLICK -wxEVT_CHAR = wxpc.wxEVT_CHAR -wxEVT_SCROLL_TOP = wxpc.wxEVT_SCROLL_TOP -wxEVT_SCROLL_BOTTOM = wxpc.wxEVT_SCROLL_BOTTOM -wxEVT_SCROLL_LINEUP = wxpc.wxEVT_SCROLL_LINEUP -wxEVT_SCROLL_LINEDOWN = wxpc.wxEVT_SCROLL_LINEDOWN -wxEVT_SCROLL_PAGEUP = wxpc.wxEVT_SCROLL_PAGEUP -wxEVT_SCROLL_PAGEDOWN = wxpc.wxEVT_SCROLL_PAGEDOWN -wxEVT_SCROLL_THUMBTRACK = wxpc.wxEVT_SCROLL_THUMBTRACK -wxEVT_SIZE = wxpc.wxEVT_SIZE -wxEVT_MOVE = wxpc.wxEVT_MOVE -wxEVT_CLOSE_WINDOW = wxpc.wxEVT_CLOSE_WINDOW -wxEVT_END_SESSION = wxpc.wxEVT_END_SESSION -wxEVT_QUERY_END_SESSION = wxpc.wxEVT_QUERY_END_SESSION -wxEVT_ACTIVATE_APP = wxpc.wxEVT_ACTIVATE_APP -wxEVT_POWER = wxpc.wxEVT_POWER -wxEVT_CHAR_HOOK = wxpc.wxEVT_CHAR_HOOK -wxEVT_KEY_UP = wxpc.wxEVT_KEY_UP -wxEVT_ACTIVATE = wxpc.wxEVT_ACTIVATE -wxEVT_CREATE = wxpc.wxEVT_CREATE -wxEVT_DESTROY = wxpc.wxEVT_DESTROY -wxEVT_SHOW = wxpc.wxEVT_SHOW -wxEVT_ICONIZE = wxpc.wxEVT_ICONIZE -wxEVT_MAXIMIZE = wxpc.wxEVT_MAXIMIZE -wxEVT_MOUSE_CAPTURE_CHANGED = wxpc.wxEVT_MOUSE_CAPTURE_CHANGED -wxEVT_PAINT = wxpc.wxEVT_PAINT -wxEVT_ERASE_BACKGROUND = wxpc.wxEVT_ERASE_BACKGROUND -wxEVT_NC_PAINT = wxpc.wxEVT_NC_PAINT -wxEVT_PAINT_ICON = wxpc.wxEVT_PAINT_ICON -wxEVT_MENU_CHAR = wxpc.wxEVT_MENU_CHAR -wxEVT_MENU_INIT = wxpc.wxEVT_MENU_INIT -wxEVT_MENU_HIGHLIGHT = wxpc.wxEVT_MENU_HIGHLIGHT -wxEVT_POPUP_MENU_INIT = wxpc.wxEVT_POPUP_MENU_INIT -wxEVT_CONTEXT_MENU = wxpc.wxEVT_CONTEXT_MENU -wxEVT_SYS_COLOUR_CHANGED = wxpc.wxEVT_SYS_COLOUR_CHANGED -wxEVT_SETTING_CHANGED = wxpc.wxEVT_SETTING_CHANGED -wxEVT_QUERY_NEW_PALETTE = wxpc.wxEVT_QUERY_NEW_PALETTE -wxEVT_PALETTE_CHANGED = wxpc.wxEVT_PALETTE_CHANGED -wxEVT_JOY_BUTTON_DOWN = wxpc.wxEVT_JOY_BUTTON_DOWN -wxEVT_JOY_BUTTON_UP = wxpc.wxEVT_JOY_BUTTON_UP -wxEVT_JOY_MOVE = wxpc.wxEVT_JOY_MOVE -wxEVT_JOY_ZMOVE = wxpc.wxEVT_JOY_ZMOVE -wxEVT_DROP_FILES = wxpc.wxEVT_DROP_FILES -wxEVT_DRAW_ITEM = wxpc.wxEVT_DRAW_ITEM -wxEVT_MEASURE_ITEM = wxpc.wxEVT_MEASURE_ITEM -wxEVT_COMPARE_ITEM = wxpc.wxEVT_COMPARE_ITEM -wxEVT_INIT_DIALOG = wxpc.wxEVT_INIT_DIALOG -wxEVT_IDLE = wxpc.wxEVT_IDLE -wxEVT_UPDATE_UI = wxpc.wxEVT_UPDATE_UI -wxEVT_COMMAND_LEFT_CLICK = wxpc.wxEVT_COMMAND_LEFT_CLICK -wxEVT_COMMAND_LEFT_DCLICK = wxpc.wxEVT_COMMAND_LEFT_DCLICK -wxEVT_COMMAND_RIGHT_CLICK = wxpc.wxEVT_COMMAND_RIGHT_CLICK -wxEVT_COMMAND_RIGHT_DCLICK = wxpc.wxEVT_COMMAND_RIGHT_DCLICK -wxEVT_COMMAND_SET_FOCUS = wxpc.wxEVT_COMMAND_SET_FOCUS -wxEVT_COMMAND_KILL_FOCUS = wxpc.wxEVT_COMMAND_KILL_FOCUS -wxEVT_COMMAND_ENTER = wxpc.wxEVT_COMMAND_ENTER -wxEVT_COMMAND_TREE_BEGIN_DRAG = wxpc.wxEVT_COMMAND_TREE_BEGIN_DRAG -wxEVT_COMMAND_TREE_BEGIN_RDRAG = wxpc.wxEVT_COMMAND_TREE_BEGIN_RDRAG -wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT = wxpc.wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT -wxEVT_COMMAND_TREE_END_LABEL_EDIT = wxpc.wxEVT_COMMAND_TREE_END_LABEL_EDIT -wxEVT_COMMAND_TREE_DELETE_ITEM = wxpc.wxEVT_COMMAND_TREE_DELETE_ITEM -wxEVT_COMMAND_TREE_GET_INFO = wxpc.wxEVT_COMMAND_TREE_GET_INFO -wxEVT_COMMAND_TREE_SET_INFO = wxpc.wxEVT_COMMAND_TREE_SET_INFO -wxEVT_COMMAND_TREE_ITEM_EXPANDED = wxpc.wxEVT_COMMAND_TREE_ITEM_EXPANDED -wxEVT_COMMAND_TREE_ITEM_EXPANDING = wxpc.wxEVT_COMMAND_TREE_ITEM_EXPANDING -wxEVT_COMMAND_TREE_SEL_CHANGED = wxpc.wxEVT_COMMAND_TREE_SEL_CHANGED -wxEVT_COMMAND_TREE_SEL_CHANGING = wxpc.wxEVT_COMMAND_TREE_SEL_CHANGING -wxEVT_COMMAND_TREE_KEY_DOWN = wxpc.wxEVT_COMMAND_TREE_KEY_DOWN -wxEVT_COMMAND_LIST_BEGIN_DRAG = wxpc.wxEVT_COMMAND_LIST_BEGIN_DRAG -wxEVT_COMMAND_LIST_BEGIN_RDRAG = wxpc.wxEVT_COMMAND_LIST_BEGIN_RDRAG -wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT = wxpc.wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT -wxEVT_COMMAND_LIST_END_LABEL_EDIT = wxpc.wxEVT_COMMAND_LIST_END_LABEL_EDIT -wxEVT_COMMAND_LIST_DELETE_ITEM = wxpc.wxEVT_COMMAND_LIST_DELETE_ITEM -wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS = wxpc.wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS -wxEVT_COMMAND_LIST_GET_INFO = wxpc.wxEVT_COMMAND_LIST_GET_INFO -wxEVT_COMMAND_LIST_SET_INFO = wxpc.wxEVT_COMMAND_LIST_SET_INFO -wxEVT_COMMAND_LIST_ITEM_SELECTED = wxpc.wxEVT_COMMAND_LIST_ITEM_SELECTED -wxEVT_COMMAND_LIST_ITEM_DESELECTED = wxpc.wxEVT_COMMAND_LIST_ITEM_DESELECTED -wxEVT_COMMAND_LIST_KEY_DOWN = wxpc.wxEVT_COMMAND_LIST_KEY_DOWN -wxEVT_COMMAND_LIST_INSERT_ITEM = wxpc.wxEVT_COMMAND_LIST_INSERT_ITEM -wxEVT_COMMAND_LIST_COL_CLICK = wxpc.wxEVT_COMMAND_LIST_COL_CLICK -wxEVT_COMMAND_TAB_SEL_CHANGED = wxpc.wxEVT_COMMAND_TAB_SEL_CHANGED -wxEVT_COMMAND_TAB_SEL_CHANGING = wxpc.wxEVT_COMMAND_TAB_SEL_CHANGING -wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED = wxpc.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED -wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING = wxpc.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING -__version__ = wxpc.__version__ -cvar = wxpc.cvar -wxPyDefaultPosition = wxPointPtr(wxpc.cvar.wxPyDefaultPosition) -wxPyDefaultSize = wxSizePtr(wxpc.cvar.wxPyDefaultSize) - - -#-------------- USER INCLUDE ----------------------- - -#---------------------------------------------------------------------------- -# Name: _extra.py -# Purpose: This file is appended to the shadow class file generated -# by SWIG. We add some unSWIGable things here. -# -# Author: Robin Dunn -# -# Created: 6/30/97 -# RCS-ID: $Id$ -# Copyright: (c) 1998 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------------- - -import sys - -#---------------------------------------------------------------------- -# This gives this module's dictionary to the C++ extension code... - -_wxSetDictionary(vars()) - - -#---------------------------------------------------------------------- -#---------------------------------------------------------------------- -# Helper function to link python methods to wxWindows virtual -# functions by name. - -def _checkForCallback(obj, name, event, theID=-1): - try: cb = getattr(obj, name) - except: pass - else: obj.Connect(theID, -1, event, cb) - -def _StdWindowCallbacks(win): - _checkForCallback(win, "OnChar", wxEVT_CHAR) - _checkForCallback(win, "OnSize", wxEVT_SIZE) - _checkForCallback(win, "OnEraseBackground", wxEVT_ERASE_BACKGROUND) - _checkForCallback(win, "OnSysColourChanged", wxEVT_SYS_COLOUR_CHANGED) - _checkForCallback(win, "OnInitDialog", wxEVT_INIT_DIALOG) - _checkForCallback(win, "OnIdle", wxEVT_IDLE) - _checkForCallback(win, "OnPaint", wxEVT_PAINT) - -def _StdFrameCallbacks(win): - _StdWindowCallbacks(win) - _checkForCallback(win, "OnActivate", wxEVT_ACTIVATE) - _checkForCallback(win, "OnMenuHighlight", wxEVT_MENU_HIGHLIGHT) - _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW) - - -def _StdOnScrollCallback(win): - try: cb = getattr(win, "OnScroll") - except: pass - else: EVT_SCROLL(win, cb) - - - -#---------------------------------------------------------------------- -#---------------------------------------------------------------------- -# functions that look and act like the C++ Macros of the same name - - -# Miscellaneous -def EVT_SIZE(win, func): - win.Connect(-1, -1, wxEVT_SIZE, func) - -def EVT_MOVE(win, func): - win.Connect(-1, -1, wxEVT_MOVE, func) - -def EVT_CLOSE(win, func): - win.Connect(-1, -1, wxEVT_CLOSE_WINDOW, func) - -def EVT_PAINT(win, func): - win.Connect(-1, -1, wxEVT_PAINT, func) - -def EVT_ERASE_BACKGROUND(win, func): - win.Connect(-1, -1, wxEVT_ERASE_BACKGROUND, func) - -def EVT_CHAR(win, func): - win.Connect(-1, -1, wxEVT_CHAR, func) - -def EVT_CHAR_HOOK(win, func): - win.Connect(-1, -1, wxEVT_CHAR_HOOK, func) - -def EVT_MENU_HIGHLIGHT(win, id, func): - win.Connect(id, -1, wxEVT_MENU_HIGHLIGHT, func) - -def EVT_MENU_HIGHLIGHT_ALL(win, func): - win.Connect(-1, -1, wxEVT_MENU_HIGHLIGHT, func) - -def EVT_SET_FOCUS(win, func): - win.Connect(-1, -1, wxEVT_SET_FOCUS, func) - -def EVT_KILL_FOCUS(win, func): - win.Connect(-1, -1, wxEVT_KILL_FOCUS, func) - -def EVT_ACTIVATE(win, func): - win.Connect(-1, -1, wxEVT_ACTIVATE, func) - -def EVT_ACTIVATE_APP(win, func): - win.Connect(-1, -1, wxEVT_ACTIVATE_APP, func) - -def EVT_END_SESSION(win, func): - win.Connect(-1, -1, wxEVT_END_SESSION, func) - -def EVT_QUERY_END_SESSION(win, func): - win.Connect(-1, -1, wxEVT_QUERY_END_SESSION, func) - -def EVT_DROP_FILES(win, func): - win.Connect(-1, -1, wxEVT_DROP_FILES, func) - -def EVT_INIT_DIALOG(win, func): - win.Connect(-1, -1, wxEVT_INIT_DIALOG, func) - -def EVT_SYS_COLOUR_CHANGED(win, func): - win.Connect(-1, -1, wxEVT_SYS_COLOUR_CHANGED, func) - -def EVT_SHOW(win, func): - win.Connect(-1, -1, wxEVT_SHOW, func) - -def EVT_MAXIMIZE(win, func): - win.Connect(-1, -1, wxEVT_MAXIMIZE, func) - -def EVT_ICONIZE(win, func): - win.Connect(-1, -1, wxEVT_ICONIZE, func) - -def EVT_NAVIGATION_KEY(win, func): - win.Connect(-1, -1, wxEVT_NAVIGATION_KEY, func) - - -# Mouse Events -def EVT_LEFT_DOWN(win, func): - win.Connect(-1, -1, wxEVT_LEFT_DOWN, func) - -def EVT_LEFT_UP(win, func): - win.Connect(-1, -1, wxEVT_LEFT_UP, func) - -def EVT_MIDDLE_DOWN(win, func): - win.Connect(-1, -1, wxEVT_MIDDLE_DOWN, func) - -def EVT_MIDDLE_UP(win, func): - win.Connect(-1, -1, wxEVT_MIDDLE_UP, func) - -def EVT_RIGHT_DOWN(win, func): - win.Connect(-1, -1, wxEVT_RIGHT_DOWN, func) - -def EVT_RIGHT_UP(win, func): - win.Connect(-1, -1, wxEVT_RIGHT_UP, func) - -def EVT_MOTION(win, func): - win.Connect(-1, -1, wxEVT_MOTION, func) - -def EVT_LEFT_DCLICK(win, func): - win.Connect(-1, -1, wxEVT_LEFT_DCLICK, func) - -def EVT_MIDDLE_DCLICK(win, func): - win.Connect(-1, -1, wxEVT_MIDDLE_DCLICK, func) - -def EVT_RIGHT_DCLICK(win, func): - win.Connect(-1, -1, wxEVT_RIGHT_DCLICK, func) - -def EVT_LEAVE_WINDOW(win, func): - win.Connect(-1, -1, wxEVT_LEAVE_WINDOW, func) - -def EVT_ENTER_WINDOW(win, func): - win.Connect(-1, -1, wxEVT_ENTER_WINDOW, func) - - -# all mouse events -def EVT_MOUSE_EVENTS(win, func): - win.Connect(-1, -1, wxEVT_LEFT_DOWN, func) - win.Connect(-1, -1, wxEVT_LEFT_UP, func) - win.Connect(-1, -1, wxEVT_MIDDLE_DOWN, func) - win.Connect(-1, -1, wxEVT_MIDDLE_UP, func) - win.Connect(-1, -1, wxEVT_RIGHT_DOWN, func) - win.Connect(-1, -1, wxEVT_RIGHT_UP, func) - win.Connect(-1, -1, wxEVT_MOTION, func) - win.Connect(-1, -1, wxEVT_LEFT_DCLICK, func) - win.Connect(-1, -1, wxEVT_MIDDLE_DCLICK, func) - win.Connect(-1, -1, wxEVT_RIGHT_DCLICK, func) - win.Connect(-1, -1, wxEVT_LEAVE_WINDOW, func) - win.Connect(-1, -1, wxEVT_ENTER_WINDOW, func) - -# EVT_COMMAND -def EVT_COMMAND(win, id, cmd, func): - win.Connect(id, -1, cmd, func) - -def EVT_COMMAND_RANGE(win, id1, id2, cmd, func): - win.Connect(id1, id2, cmd, func) - -# Scrolling -def EVT_SCROLL(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_TOP, func) - win.Connect(-1, -1, wxEVT_SCROLL_BOTTOM, func) - win.Connect(-1, -1, wxEVT_SCROLL_LINEUP, func) - win.Connect(-1, -1, wxEVT_SCROLL_LINEDOWN, func) - win.Connect(-1, -1, wxEVT_SCROLL_PAGEUP, func) - win.Connect(-1, -1, wxEVT_SCROLL_PAGEDOWN, func) - win.Connect(-1, -1, wxEVT_SCROLL_THUMBTRACK,func) - -def EVT_SCROLL_TOP(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_TOP, func) - -def EVT_SCROLL_BOTTOM(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_BOTTOM, func) - -def EVT_SCROLL_LINEUP(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_LINEUP, func) - -def EVT_SCROLL_LINEDOWN(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_LINEDOWN, func) - -def EVT_SCROLL_PAGEUP(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_PAGEUP, func) - -def EVT_SCROLL_PAGEDOWN(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_PAGEDOWN, func) - -def EVT_SCROLL_THUMBTRACK(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_THUMBTRACK, func) - - - -# Scrolling, with an id -def EVT_COMMAND_SCROLL(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_TOP, func) - win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func) - win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) - win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func) - win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func) - win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func) - win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func) - -def EVT_COMMAND_SCROLL_TOP(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_TOP, func) - -def EVT_COMMAND_SCROLL_BOTTOM(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func) - -def EVT_COMMAND_SCROLL_LINEUP(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) - -def EVT_COMMAND_SCROLL_LINEDOWN(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func) - -def EVT_COMMAND_SCROLL_PAGEUP(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func) - -def EVT_COMMAND_SCROLL_PAGEDOWN(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func) - -def EVT_COMMAND_SCROLL_THUMBTRACK(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK, func) - - -# Convenience commands -def EVT_BUTTON(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_BUTTON_CLICKED, func) - -def EVT_CHECKBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_CHECKBOX_CLICKED, func) - -def EVT_CHOICE(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_CHOICE_SELECTED, func) - -def EVT_LISTBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LISTBOX_SELECTED, func) - -def EVT_LISTBOX_DCLICK(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, func) - -def EVT_TEXT(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TEXT_UPDATED, func) - -def EVT_TEXT_ENTER(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TEXT_ENTER, func) - -def EVT_MENU(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_MENU_SELECTED, func) - -def EVT_MENU_RANGE(win, id1, id2, func): - win.Connect(id1, id2, wxEVT_COMMAND_MENU_SELECTED, func) - -def EVT_SLIDER(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_SLIDER_UPDATED, func) - -def EVT_RADIOBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_RADIOBOX_SELECTED, func) - -def EVT_RADIOBUTTON(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_RADIOBUTTON_SELECTED, func) - -def EVT_VLBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_VLBOX_SELECTED, func) - -def EVT_COMBOBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_COMBOBOX_SELECTED, func) - -def EVT_TOOL(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TOOL_CLICKED, func) - -def EVT_TOOL_RCLICKED(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TOOL_RCLICKED, func) - -def EVT_TOOL_ENTER(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TOOL_ENTER, func) - -def EVT_CHECKLISTBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, func) - - -# Generic command events - -def EVT_COMMAND_LEFT_CLICK(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LEFT_CLICK, func) - -def EVT_COMMAND_LEFT_DCLICK(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LEFT_DCLICK, func) - -def EVT_COMMAND_RIGHT_CLICK(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_RIGHT_CLICK, func) - -def EVT_COMMAND_RIGHT_DCLICK(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_RIGHT_DCLICK, func) - -def EVT_COMMAND_SET_FOCUS(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_SET_FOCUS, func) - -def EVT_COMMAND_KILL_FOCUS(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_KILL_FOCUS, func) - -def EVT_COMMAND_ENTER(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_ENTER, func) - - - -def EVT_NOTEBOOK_PAGE_CHANGED(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, func) - -def EVT_NOTEBOOK_PAGE_CHANGING(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, func) - - - -#---------------------------------------------------------------------- -#---------------------------------------------------------------------- -# We need to add to the shadow classes a bit to facilitate callbacks via -# virtual functions. These classes replace the shadows generated by SWIG. - -class wxWindow(wxWindowPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxWindow,(arg0.this,arg1,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - - -class wxFrame(wxFramePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxFrame,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdFrameCallbacks(self) - - -if wxPlatform == '__WXMSW__': - class wxMiniFrame(wxMiniFramePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxMiniFrame,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdFrameCallbacks(self) - - -class wxPanel(wxPanelPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxPanel,(arg0.this,arg1,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - - -class wxDialog(wxDialogPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxDialog,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - _checkForCallback(self, "OnOk", wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK) - _checkForCallback(self, "OnApply", wxEVT_COMMAND_BUTTON_CLICKED, wxID_APPLY) - _checkForCallback(self, "OnCancel", wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL) - _checkForCallback(self, "OnCloseWindow", wxEVT_CLOSE_WINDOW) - _checkForCallback(self, "OnCharHook", wxEVT_CHAR_HOOK) - - -class wxScrolledWindow(wxScrolledWindowPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxScrolledWindow,(arg0.this,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - _StdOnScrollCallback(self) - - - -class wxMDIParentFrame(wxMDIParentFramePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(mdic.new_wxMDIParentFrame,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdFrameCallbacks(self) - - -class wxMDIChildFrame(wxMDIChildFramePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(mdic.new_wxMDIChildFrame,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdFrameCallbacks(self) - - -class wxMDIClientWindow(wxMDIClientWindowPtr): - def __init__(self,arg0,*args) : - self.this = apply(mdic.new_wxMDIClientWindow,(arg0.this,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - _StdOnScrollCallback(self) - - - -class wxControl(wxControlPtr): - def __init__(self,this): - self.this = this - _StdWindowCallbacks(self) - -class wxButton(wxButtonPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxButton,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxBitmapButton(wxBitmapButtonPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxBitmapButton,(arg0.this,arg1,arg2.this,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxCheckBox(wxCheckBoxPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxCheckBox,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - - - -class wxChoice(wxChoicePtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxChoice,(arg0.this,arg1,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxComboBox(wxComboBoxPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxComboBox,(arg0.this,arg1,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxGauge(wxGaugePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxGauge,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxStaticBox(wxStaticBoxPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxStaticBox,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxStaticText(wxStaticTextPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxStaticText,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxListBox(wxListBoxPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxListBox,(arg0.this,arg1,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxTextCtrl(wxTextCtrlPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxTextCtrl,(arg0.this,arg1,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxScrollBar(wxScrollBarPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxScrollBar,(arg0.this,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -if wxPlatform == '__WXMSW__': - class wxSpinButton(wxSpinButtonPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxSpinButton,(arg0.this,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxStaticBitmap(wxStaticBitmapPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxStaticBitmap,(arg0.this,arg1,arg2.this,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxRadioBox(wxRadioBoxPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxRadioBox,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxRadioButton(wxRadioButtonPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxRadioButton,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxSlider(wxSliderPtr): - def __init__(self,arg0,arg1,arg2,arg3,arg4,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxSlider,(arg0.this,arg1,arg2,arg3,arg4,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - - - - - - -class wxTimer(wxPyTimer): - def __init__(self): - wxPyTimer.__init__(self, self.Notify) # derived class must provide - # Notify(self) method. - -#---------------------------------------------------------------------- -# Some wxWin methods can take "NULL" as parameters, but the shadow classes -# expect an object with the SWIG pointer as a 'this' member. This class -# and instance fools the shadow into passing the NULL pointer. - -class NullObj: - this = 'NULL' # SWIG converts this to (void*)0 - -NULL = NullObj() - - -#---------------------------------------------------------------------- -# aliases - -wxColor = wxColour -wxNamedColor = wxNamedColour - -wxPyDefaultPosition.Set(-1,-1) -wxPyDefaultSize.Set(-1,-1) - -#---------------------------------------------------------------------- - -## class wxPyStdOutWindow(wxFrame): -## def __init__(self, title = "wxPython: stdout/stderr"): -## wxFrame.__init__(self, NULL, title) -## self.title = title -## self.text = wxTextWindow(self) -## self.text.SetFont(wxFont(10, wxMODERN, wxNORMAL, wxBOLD)) -## self.SetSize(-1,-1,400,200) -## self.Show(false) -## self.isShown = false - -## def write(self, str): # with this method, -## if not self.isShown: -## self.Show(true) -## self.isShown = true -## self.text.WriteText(str) - -## def OnCloseWindow(self, event): # doesn't allow the window to close, just hides it -## self.Show(false) -## self.isShown = false - - -_defRedirect = (wxPlatform == '__WXMSW__') - -#---------------------------------------------------------------------- -# The main application class. Derive from this and implement an OnInit -# method that creates a frame and then calls self.SetTopWindow(frame) - -class wxApp(wxPyApp): - error = 'wxApp.error' - - def __init__(self, redirect=_defRedirect, filename=None): - wxPyApp.__init__(self) - self.stdioWin = None - self.saveStdio = (sys.stdout, sys.stderr) - if redirect: - self.RedirectStdio(filename) - - # this initializes wxWindows and then calls our OnInit - _wxStart(self.OnInit) - - - def __del__(self): - try: - self.RestoreStdio() - except: - pass - - def RedirectStdio(self, filename): - if filename: - sys.stdout = sys.stderr = open(filename, 'a') - else: - raise self.error, 'wxPyStdOutWindow not yet implemented.' - #self.stdioWin = sys.stdout = sys.stderr = wxPyStdOutWindow() - - def RestoreStdio(self): - sys.stdout, sys.stderr = self.saveStdio - if self.stdioWin != None: - self.stdioWin.Show(false) - self.stdioWin.Destroy() - self.stdioWin = None - - -#---------------------------------------------------------------------------- -# -# $Log$ -# Revision 1.4 1998/08/27 21:59:31 RD -# Some chicken-and-egg problems solved for wxPython on wxGTK -# -# Revision 1.2 1998/08/18 19:48:12 RD -# more wxGTK compatibility things. -# -# It builds now but there are serious runtime problems... -# -# Revision 1.1 1998/08/09 08:25:49 RD -# Initial version -# -# - diff --git a/utils/wxPython/src/helpers.cpp b/utils/wxPython/src/helpers.cpp deleted file mode 100644 index 6649ed56c8..0000000000 --- a/utils/wxPython/src/helpers.cpp +++ /dev/null @@ -1,686 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: helpers.cpp -// Purpose: Helper functions/classes for the wxPython extension module -// -// Author: Robin Dunn -// -// Created: 7/1/97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 by Total Control Software -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __WXMSW__ -#include -#undef FindWindow -#undef GetCharWidth -#undef LoadAccelerators -#endif - -#undef DEBUG -#include -#include "helpers.h" - -#ifdef __WXGTK__ -#ifdef USE_GDK_IMLIB -#include "gdk_imlib/gdk_imlib.h" -#endif -#endif - -//--------------------------------------------------------------------------- - -//wxHashTable* wxPyWindows = NULL; - - -wxPoint wxPyDefaultPosition; //wxDefaultPosition); -wxSize wxPyDefaultSize; //wxDefaultSize); -wxString wxPyEmptyStr(""); - - - -#ifdef __WXMSW__ // If building for win32... -extern HINSTANCE wxhInstance; - -//---------------------------------------------------------------------- -// This gets run when the DLL is loaded. We just need to save a handle. -//---------------------------------------------------------------------- -BOOL WINAPI DllMain( - HINSTANCE hinstDLL, // handle to DLL module - DWORD fdwReason, // reason for calling function - LPVOID lpvReserved // reserved - ) -{ - wxhInstance = hinstDLL; - return 1; -} -#endif - -//---------------------------------------------------------------------- -// Class for implementing the wxp main application shell. -//---------------------------------------------------------------------- - -wxPyApp *wxPythonApp = NULL; // Global instance of application object - - -// This one isn't acutally called... See __wxStart() -bool wxPyApp::OnInit(void) { - return false; -} - -int wxPyApp::MainLoop(void) { - int retval = wxApp::MainLoop(); - AfterMainLoop(); - return retval; -} - -void wxPyApp::AfterMainLoop(void) { - // more stuff from wxEntry... - -#ifdef __WXMSW__ - if (wxPythonApp->GetTopWindow()) { - // Forcibly delete the window. - if (wxPythonApp->GetTopWindow()->IsKindOf(CLASSINFO(wxFrame)) || - wxPythonApp->GetTopWindow()->IsKindOf(CLASSINFO(wxDialog))) { - - wxPythonApp->GetTopWindow()->Close(TRUE); - wxPythonApp->DeletePendingObjects(); - } - else { - delete wxPythonApp->GetTopWindow(); - wxPythonApp->SetTopWindow(NULL); - } - } -#endif -#ifdef __WXGTK__ - wxPythonApp->DeletePendingObjects(); -#endif - - wxPythonApp->OnExit(); -#ifdef __WXMSW__ - wxApp::CleanUp(); -#endif -#ifdef __WXGTK__ - wxApp::CommonCleanUp(); -#endif - delete wxPythonApp; -} - - -//--------------------------------------------------------------------- -// a few native methods to add to the module -//---------------------------------------------------------------------- - - -// This is where we pick up the first part of the wxEntry functionality... -// The rest is in __wxStart and AfterMainLoop. Thi function is called when -// wxpc is imported. (Before there is a wxApp object.) -void __wxPreStart() -{ - // Bail out if there is already windows created. This means that the - // toolkit has already been initialized, as in embedding wxPython in - // a C++ wxWindows app. - if (wxTopLevelWindows.Number() > 0) - return; - -#ifdef __WXMSW__ - wxApp::Initialize((WXHINSTANCE)wxhInstance); -#endif -#ifdef __WXGTK__ - wxClassInfo::InitializeClasses(); - - PyObject* sysargv = PySys_GetObject("argv"); - int argc = PyList_Size(sysargv); - char** argv = new char*[argc+1]; - int x; - for(x=0; x 0) { - PyErr_SetString(PyExc_TypeError, "Only 1 wxApp per process!"); - return NULL; - } - - - // This is the next part of the wxEntry functionality... - wxPythonApp->argc = 0; - wxPythonApp->argv = __nullArgv; - wxPythonApp->OnInitGui(); - - - // Call the Python App's OnInit function - arglist = PyTuple_New(0); - result = PyEval_CallObject(onInitFunc, arglist); - if (!result) { - PyErr_Print(); - exit(1); - } - - if (! PyInt_Check(result)) { - PyErr_SetString(PyExc_TypeError, "OnInit should return a boolean value"); - return NULL; - } - bResult = PyInt_AS_LONG(result); - if (! bResult) { - wxPythonApp->DeletePendingObjects(); - wxPythonApp->OnExit(); -#ifdef __WXMSW__ - wxApp::CleanUp(); -#endif -#ifdef __WXGTK__ - wxApp::CommonCleanUp(); -#endif - PyErr_SetString(PyExc_SystemExit, "OnInit returned false, exiting..."); - return NULL; - } - -#ifdef __WXGTK__ - wxTheApp->m_initialized = (wxTopLevelWindows.Number() > 0); -#endif - - Py_INCREF(Py_None); - return Py_None; -} - - - - - -PyObject* wxPython_dict; -PyObject* __wxSetDictionary(PyObject* /* self */, PyObject* args) -{ - - if (!PyArg_ParseTuple(args, "O", &wxPython_dict)) - return NULL; - - if (!PyDict_Check(wxPython_dict)) { - PyErr_SetString(PyExc_TypeError, "_wxSetDictionary must have dictionary object!"); - return NULL; - } -#ifdef __WXMOTIF__ -#define wxPlatform "__WXMOTIF__" -#endif -#ifdef __WXQT__ -#define wxPlatform "__WXQT__" -#endif -#ifdef __WXGTK__ -#define wxPlatform "__WXGTK__" -#endif -#if defined(__WIN32__) || defined(__WXMSW__) -#define wxPlatform "__WXMSW__" -#endif -#ifdef __WXMAC__ -#define wxPlatform "__WXMAC__" -#endif - - PyDict_SetItemString(wxPython_dict, "wxPlatform", PyString_FromString(wxPlatform)); - - Py_INCREF(Py_None); - return Py_None; -} - - -//--------------------------------------------------------------------------- - - -static -PyObject* wxPyConstructObject(void* ptr, char* className) -{ - char buff[64]; // should be big enough... - char swigptr[64]; - - sprintf(buff, "_%s_p", className); - SWIG_MakePtr(swigptr, ptr, buff); - - sprintf(buff, "%sPtr", className); - PyObject* classobj = PyDict_GetItemString(wxPython_dict, buff); - if (! classobj) { - Py_INCREF(Py_None); - return Py_None; - } - - PyObject* arg = Py_BuildValue("(s)", swigptr); - PyObject* obj = PyInstance_New(classobj, arg, NULL); - Py_DECREF(arg); - - return obj; -} - - -// This function is used for all events destined for Python event handlers. -void wxPyCallback::EventThunker(wxEvent& event) { - wxPyCallback* cb = (wxPyCallback*)event.m_callbackUserData; - PyObject* func = cb->m_func; - PyObject* result; - PyObject* arg; - PyObject* tuple; - - arg = wxPyConstructObject((void*)&event, event.GetClassInfo()->GetClassName()); - - tuple = PyTuple_New(1); - PyTuple_SET_ITEM(tuple, 0, arg); - result = PyEval_CallObject(func, tuple); - Py_DECREF(arg); - Py_DECREF(tuple); - if (result) { - Py_DECREF(result); - PyErr_Clear(); - } else { - PyErr_Print(); - } -} - - -//--------------------------------------------------------------------------- - -wxPyMenu::wxPyMenu(const wxString& title, PyObject* _func) - : wxMenu(title, (wxFunction)(func ? MenuCallback : NULL)), func(0) { - - if (_func) { - func = _func; - Py_INCREF(func); - } -} - -wxPyMenu::~wxPyMenu() { - if (func) - Py_DECREF(func); -} - - -void wxPyMenu::MenuCallback(wxMenu& menu, wxCommandEvent& evt) { - PyObject* evtobj = wxPyConstructObject((void*)&evt, "wxCommandEvent"); - PyObject* menuobj = wxPyConstructObject((void*)&menu, "wxMenu"); - if (PyErr_Occurred()) { - // bail out if a problem - PyErr_Print(); - return; - } - // Now call the callback... - PyObject* func = ((wxPyMenu*)&menu)->func; - PyObject* args = Py_BuildValue("(OO)", menuobj, evtobj); - PyObject* res = PyEval_CallObject(func, args); - Py_DECREF(args); - Py_DECREF(res); - Py_DECREF(evtobj); - Py_DECREF(menuobj); -} - - -//--------------------------------------------------------------------------- - -wxPyTimer::wxPyTimer(PyObject* callback) { - func = callback; - Py_INCREF(func); -} - -wxPyTimer::~wxPyTimer() { - Py_DECREF(func); -} - -void wxPyTimer::Notify() { - PyObject* result; - PyObject* args = Py_BuildValue("()"); - - result = PyEval_CallObject(func, args); - Py_DECREF(args); - if (result) { - Py_DECREF(result); - PyErr_Clear(); - } else { - PyErr_Print(); - } -} - - - - -//---------------------------------------------------------------------- -//---------------------------------------------------------------------- -// Some helper functions for typemaps in my_typemaps.i, so they won't be -// imcluded in every file... - - -int* int_LIST_helper(PyObject* source) { - if (!PyList_Check(source)) { - PyErr_SetString(PyExc_TypeError, "Expected a list object."); - return NULL; - } - int count = PyList_Size(source); - int* temp = new int[count]; - if (! temp) { - PyErr_SetString(PyExc_MemoryError, "Unable to allocate temporary array"); - return NULL; - } - for (int x=0; xargc; -// char** argv = wxPythonApp->argv; - -// for (int i = 1; i < argc; i++) { -// if (strncmp(argv[i], "wxpstderr=", 10) == 0) -// stderrfilename = argv[i]+10; -// else { -// PyList_Append(argvList, PyString_FromString(argv[i])); -// if (!script) -// script = argv[i]; -// pyargc++; -// } -// } - -// PySys_SetObject("argv", argvList); - -//#if 1 -// char buf[256]; -//// //PyRun_SimpleString("import sys; sys.stdout=open('wxpstdout.log','w')"); -// sprintf(buf, "import sys; sys.stdout=sys.stderr=open('%s','w')", stderrfilename); -// PyRun_SimpleString(buf); -//#endif - -// initwxPythonc(); - -// if (script) { -// FILE *fp = fopen(script, "r"); -// if (fp) { -// PyRun_SimpleFile(fp, script);// This returns after wxpApp constructor -// fclose(fp); -// } -// else { -// char msg[256]; -// sprintf(msg, "Cannot open %s", script); -// wxMessageBox(msg); -// } -// } -// else -// PyRun_SimpleString("import wxpide"); - -// return 0; -//} - - -//#endif - -//---------------------------------------------------------------------- - -///////////////////////////////////////////////////////////////////////////// -// -// $Log$ -// Revision 1.8 1998/08/27 21:59:08 RD -// Some chicken-and-egg problems solved for wxPython on wxGTK -// -// Revision 1.7 1998/08/27 00:00:26 RD -// - more tweaks -// - have discovered some problems but not yet discovered solutions... -// -// Revision 1.6 1998/08/18 21:54:12 RD -// -// ifdef out some wxGTK specific code -// -// Revision 1.5 1998/08/18 19:48:17 RD -// more wxGTK compatibility things. -// -// It builds now but there are serious runtime problems... -// -// Revision 1.4 1998/08/16 04:31:06 RD -// More wxGTK work. -// -// Revision 1.3 1998/08/15 07:36:36 RD -// - Moved the header in the .i files out of the code that gets put into -// the .cpp files. It caused CVS conflicts because of the RCS ID being -// different each time. -// -// - A few minor fixes. -// -// Revision 1.2 1998/08/14 23:36:36 RD -// Beginings of wxGTK compatibility -// -// Revision 1.1 1998/08/09 08:25:51 RD -// Initial version -// -// diff --git a/utils/wxPython/src/helpers.h b/utils/wxPython/src/helpers.h deleted file mode 100644 index 3114aa5622..0000000000 --- a/utils/wxPython/src/helpers.h +++ /dev/null @@ -1,121 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: helpers.h -// Purpose: Helper functions/classes for the wxPython extenaion module -// -// Author: Robin Dunn -// -// Created: 7/1/97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 by Total Control Software -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef __wxp_helpers__ -#define __wxp_helpers__ - -#include - - -//---------------------------------------------------------------------- - -class wxPyApp: public wxApp -{ -public: - int MainLoop(void); - bool OnInit(void); - void AfterMainLoop(void); -}; - -extern wxPyApp *wxPythonApp; - -//---------------------------------------------------------------------- - -void __wxPreStart(); -PyObject* __wxStart(PyObject*, PyObject* args); - -extern PyObject* wxPython_dict; -PyObject* __wxSetDictionary(PyObject*, PyObject* args); - -extern wxHashTable* wxPyWindows; // keep track of all windows so we - // don't accidentally delete them twice. - -void wxPyEventThunker(wxObject*, wxEvent& event); - -//---------------------------------------------------------------------- - - -#ifndef SWIGCODE -extern "C" void SWIG_MakePtr(char *, void *, char *); -extern "C" char *SWIG_GetPtr(char *, void **, char *); -#endif - - -#ifdef _MSC_VER -# pragma warning(disable:4800) -#endif - - -// Non-const versions to keep SWIG happy. -extern wxPoint wxPyDefaultPosition; -extern wxSize wxPyDefaultSize; -extern char* wxPyPanelNameStr; -extern wxString wxPyEmptyStr; - -//---------------------------------------------------------------------- - -class wxPyCallback : public wxObject { -public: - wxPyCallback(PyObject* func) { m_func = func; Py_INCREF(m_func); } - ~wxPyCallback() { Py_DECREF(m_func); } - - void EventThunker(wxEvent& event); - - PyObject* m_func; -}; - -//--------------------------------------------------------------------------- - -class wxPyMenu : public wxMenu { -public: - wxPyMenu(const wxString& title = "", PyObject* func=NULL); - ~wxPyMenu(); - -private: - static void MenuCallback(wxMenu& menu, wxCommandEvent& evt); - PyObject* func; -}; - - -//--------------------------------------------------------------------------- - -class wxPyTimer : public wxTimer { -public: - wxPyTimer(PyObject* callback); - ~wxPyTimer(); - - void Notify(); - -private: - PyObject* func; -}; - -//--------------------------------------------------------------------------- -///////////////////////////////////////////////////////////////////////////// -// -// $Log$ -// Revision 1.4 1998/08/27 21:59:09 RD -// Some chicken-and-egg problems solved for wxPython on wxGTK -// -// Revision 1.3 1998/08/16 04:31:09 RD -// More wxGTK work. -// -// Revision 1.2 1998/08/14 23:36:37 RD -// Beginings of wxGTK compatibility -// -// Revision 1.1 1998/08/09 08:25:51 RD -// Initial version -// -// - -#endif - diff --git a/utils/wxPython/src/makefile.nt b/utils/wxPython/src/makefile.nt deleted file mode 100644 index f96d3a5683..0000000000 --- a/utils/wxPython/src/makefile.nt +++ /dev/null @@ -1,219 +0,0 @@ -#---------------------------------------------------------------------------- -# Name: makefile.nt -# Purpose: Win32, VC++ 5 makefile for wxPython -# -# Author: Robin Dunn -# -# Created: 3/27/97 -# RCS-ID: $Id$ -# Copyright: (c) 1998 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------------- - -# Set WXDIR to the root wxWindows directory for your system -WXDIR = $(WXWIN) - -# Set this to the root of the Python installation -PYTHONDIR=e:\Tools\Python15 - -# Set this to 1 for a non-debug, optimised compile -FINAL=0 - -# Set this to where you want the stuff installed at. It should -# be a directory contained in a PYTHONPATH directory. -TARGETDIR=.. - -# Set this to 1 for make to pre-compile the Python modules, 0 to -# just copy the sources and let Python compile them at the first -# runtime. -COMPILEPY=0 - -#---------------------------------------------------------------------- - -WXUSINGDLL=0 -NOPCH=1 -THISDIR=$(WXDIR)\utils\wxPython - -EXTRALIBS=$(PYTHONDIR)\libs\python15.lib -EXTRAINC=-I$(PYTHONDIR)\include -I. -EXTRAFLAGS=/Fpwxp.pch /YXhelpers.h -DSWIG_GLOBAL -DHAVE_CONFIG_H - -SWIGFLAGS=-c++ -shadow -python -dnone -D__WXMSW__ -GENCODEDIR=msw - - -!include $(WXDIR)\src\ntwxwin.mak - -#---------------------------------------------------------------------- - -TARGET = wxpc - -OBJECTS = wxp.obj helpers.obj windows.obj events.obj \ - misc.obj gdi.obj mdi.obj controls.obj \ - controls2.obj windows2.obj cmndlgs.obj - -PYMODULES = $(TARGETDIR)\wxp.py $(TARGETDIR)\events.py \ - $(TARGETDIR)\windows.py $(TARGETDIR)\misc.py \ - $(TARGETDIR)\gdi.py $(TARGETDIR)\mdi.py \ - $(TARGETDIR)\controls.py $(TARGETDIR)\controls2.py \ - $(TARGETDIR)\windows2.py $(TARGETDIR)\cmndlgs.py \ - $(TARGETDIR)\__init__.py - -#---------------------------------------------------------------------- - -!if "$(FINAL)" == "0" -DEBUGLFLAGS = /DEBUG /INCREMENTAL:YES -!else -DEBUGLFLAGS = /INCREMENTAL:NO -!endif - -LFLAGS= $(DEBUGLFLAGS) /DLL /def:$(TARGET).def /subsystem:windows,3.50 \ - /machine:I386 /implib:./$(TARGET).lib /nologo - -#---------------------------------------------------------------------- - -default: $(TARGETDIR)\$(TARGET).pyd pycfiles - -all: wx $(TARGET) - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - - -pycfiles : $(PYMODULES) -!if "$(COMPILEPY)" == "1" - $(PYTHONDIR)\python $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR) - $(PYTHONDIR)\python -O $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR) -!endif - -#---------------------------------------------------------------------- - -$(TARGETDIR)\$(TARGET).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(TARGET).res - $(link) @<< -/out:$@ /dll -$(LFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(TARGET).res -$(LIBS) -<< - - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(TARGET).rc - - - -# implicit rule for compiling .cpp files -{}.cpp{}.obj: - $(cc) @<< -$(CPPFLAGS) /c /Tp $< -<< - -{$(GENCODEDIR)}.cpp{}.obj: - $(cc) @<< -$(CPPFLAGS) /c /Tp $< -<< - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb - -erase *.pch - -erase $(TARGET).exp - -erase $(TARGET).lib - -erase $(TARGETDIR)\$(TARGET).pyd - -erase $(TARGETDIR)\*.py - -erase $(TARGETDIR)\*.pyc - -erase $(TARGETDIR)\*.pyo - -erase $(TARGETDIR)\$(TARGET).* - - - -#------------------------------------------------------------------------ - -.SUFFIXES : .i .py - -# Implicit rules to run SWIG -{}.i{$(GENCODEDIR)}.cpp: - swig $(SWIGFLAGS) -c -o $@ $< - -{}.i{$(GENCODEDIR)}.py: - swig $(SWIGFLAGS) -c -o $@ $< - - -{$(GENCODEDIR)}.py{$(TARGETDIR)}.py: - copy $< $@ - -{}.py{$(TARGETDIR)}.py: - copy $< $@ - -#{}.py{$(TARGETDIR)}.$(PYEXT): -# $(PYTHON) -c "import py_compile; py_compile.compile('$<', '$@')" - - - - -# This one must leave out the -c flag so we define the whole rule -$(GENCODEDIR)\wxp.cpp $(GENCODEDIR)\wxp.py : wxp.i my_typemaps.i _defs.i _extras.py - swig $(SWIGFLAGS) -o $(GENCODEDIR)/wxp.cpp wxp.i - - -# Define some dependencies. These MUST use forward slashes so SWIG -# will write the shadow file to the right directory. -$(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py : windows.i my_typemaps.i _defs.i -$(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py : windows2.i my_typemaps.i _defs.i -$(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py : events.i my_typemaps.i _defs.i -$(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py : misc.i my_typemaps.i _defs.i -$(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py : gdi.i my_typemaps.i _defs.i -$(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py : mdi.i my_typemaps.i _defs.i -$(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py : controls.i my_typemaps.i _defs.i -$(GENCODEDIR)/controls2.cpp $(GENCODEDIR)/controls2.py : controls2.i my_typemaps.i _defs.i -$(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py : cmndlgs.i my_typemaps.i _defs.i - - -$(TARGETDIR)\wxp.py : $(GENCODEDIR)\wxp.py -$(TARGETDIR)\windows.py : $(GENCODEDIR)\windows.py -$(TARGETDIR)\windows2.py : $(GENCODEDIR)\windows2.py -$(TARGETDIR)\events.py : $(GENCODEDIR)\events.py -$(TARGETDIR)\misc.py : $(GENCODEDIR)\misc.py -$(TARGETDIR)\gdi.py : $(GENCODEDIR)\gdi.py -$(TARGETDIR)\mdi.py : $(GENCODEDIR)\mdi.py -$(TARGETDIR)\controls.py : $(GENCODEDIR)\controls.py -$(TARGETDIR)\controls2.py : $(GENCODEDIR)\controls2.py -$(TARGETDIR)\cmndlgs.py : $(GENCODEDIR)\cmndlgs.py -$(TARGETDIR)\__init__.py : __init__.py - - -#------------------------------------------------------------------------ -# -# $Log$ -# Revision 1.5 1998/08/19 00:38:23 RD -# A few tweaks -# -# Revision 1.4 1998/08/18 21:55:10 RD -# -# New build directory structure -# -# Revision 1.3 1998/08/15 07:36:37 RD -# - Moved the header in the .i files out of the code that gets put into -# the .cpp files. It caused CVS conflicts because of the RCS ID being -# different each time. -# -# - A few minor fixes. -# -# Revision 1.2 1998/08/14 03:34:23 RD -# made pre-compiling the python files optional -# -# Revision 1.1 1998/08/09 08:25:51 RD -# Initial version -# diff --git a/utils/wxPython/src/mdi.i b/utils/wxPython/src/mdi.i deleted file mode 100644 index 5cc56043b3..0000000000 --- a/utils/wxPython/src/mdi.i +++ /dev/null @@ -1,109 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: mdi.i -// Purpose: MDI related class definitions for wxPython -// -// Author: Robin Dunn -// -// Created: 5/26/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 by Total Control Software -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - - -%module mdi - -%{ -#include "helpers.h" -%} - -//---------------------------------------------------------------------- - -%include typemaps.i -%include my_typemaps.i - -// Import some definitions of other classes, etc. -%import _defs.i -%import misc.i -%import windows.i - -//---------------------------------------------------------------------- - -class wxMDIParentFrame : public wxFrame { -public: - wxMDIParentFrame(wxWindow *parent, - const wxWindowID id, - const wxString& title, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const char* name = "frame"); - - void ActivateNext(); - void ActivatePrevious(); - void ArrangeIcons(); - void Cascade(); - void GetClientSize(int* OUTPUT, int* OUTPUT); - wxMDIChildFrame* GetActiveChild(); - wxMDIClientWindow* GetClientWindow(); - wxWindow* GetToolBar(); - - // TODO: This isn't handled by the standard event-table system... - //wxMDIClientWindow* OnCreateClient(); - -#ifdef __WXMSW__ - void SetToolBar(wxToolBar* toolbar); -#endif - void Tile(); -}; - -//--------------------------------------------------------------------------- - -class wxMDIChildFrame : public wxFrame { -public: - wxMDIChildFrame(wxMDIParentFrame* parent, - const wxWindowID id, - const wxString& title, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, - const char* name = "frame"); - - void Activate(); - void Maximize(); - void Restore(); - - void SetMenuBar(wxMenuBar *menu_bar); - void SetClientSize(int width, int height); - void GetPosition(int* OUTPUT, int* OUTPUT) const ; - -}; - - -//--------------------------------------------------------------------------- - -class wxMDIClientWindow : public wxWindow { -public: - wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0); -}; - -//--------------------------------------------------------------------------- -///////////////////////////////////////////////////////////////////////////// -// -// $Log$ -// Revision 1.3 1998/08/18 19:48:18 RD -// more wxGTK compatibility things. -// -// It builds now but there are serious runtime problems... -// -// Revision 1.2 1998/08/15 07:36:39 RD -// - Moved the header in the .i files out of the code that gets put into -// the .cpp files. It caused CVS conflicts because of the RCS ID being -// different each time. -// -// - A few minor fixes. -// -// Revision 1.1 1998/08/09 08:25:51 RD -// Initial version -// -// diff --git a/utils/wxPython/src/misc.i b/utils/wxPython/src/misc.i deleted file mode 100644 index 7b96bac70a..0000000000 --- a/utils/wxPython/src/misc.i +++ /dev/null @@ -1,330 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: misc.i -// Purpose: Definitions of miscelaneous functions and classes -// -// Author: Robin Dunn -// -// Created: 7/3/97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 by Total Control Software -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -%module misc - -%{ -#include "helpers.h" -#include -%} - -//---------------------------------------------------------------------- - -%include typemaps.i -%include my_typemaps.i - -// Import some definitions of other classes, etc. -%import _defs.i - -//--------------------------------------------------------------------------- - - - -class wxSize { -public: - %name(width) long x; - %name(height)long y; - - wxSize(long w=0, long h=0); - ~wxSize(); - void Set(long w, long h); - %name(GetWidth) long GetX(); - %name(GetHeight)long GetY(); - - %addmethods { - PyObject* __str__() { - PyObject* tup = PyTuple_New(2); - PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x)); - PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y)); - return tup; - } - } -}; - -//--------------------------------------------------------------------------- - -class wxRealPoint { -public: - double x; - double y; - wxRealPoint(double x=0.0, double y=0.0); - ~wxRealPoint(); -}; - -class wxPoint { -public: - long x; - long y; - wxPoint(long x=0, long y=0); - ~wxPoint(); - - %addmethods { - void Set(long x, long y) { - self->x = x; - self->y = y; - } - PyObject* __str__() { - PyObject* tup = PyTuple_New(2); - PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x)); - PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y)); - return tup; - } - } -}; - -//--------------------------------------------------------------------------- - -class wxRect { -public: - wxRect(long x=0, long y=0, long w=0, long h=0); - // TODO: do this one too... wxRect(const wxPoint& pos, const wxSize& size); - ~wxRect(); - - long GetX(); - void SetX(long X); - long GetY(); - void SetY(long Y); - long GetWidth(); - void SetWidth(long w); - long GetHeight(); - void SetHeight(long h); - - - wxPoint GetPosition(); - wxSize GetSize(); - - long GetLeft(); - long GetTop(); - long GetBottom(); - long GetRight(); - - long x, y, width, height; -}; - - - -//--------------------------------------------------------------------------- -// Dialog Functions - -char* wxFileSelector(char* message, - char* default_path = NULL, - char* default_filename = NULL, - char* default_extension = NULL, - char* wildcard = "*.*", - int flags = 0, - wxWindow *parent = NULL, - int x = -1, int y = -1); - -wxString wxGetTextFromUser(const wxString& message, - const wxString& caption = wxPyEmptyStr, - const wxString& default_value = wxPyEmptyStr, - wxWindow *parent = NULL, - int x = -1, int y = -1, - bool centre = TRUE); - -// TODO: Need to custom wrap this one... -// int wxGetMultipleChoice(char* message, char* caption, -// int LCOUNT, char** LIST, -// int nsel, int *selection, -// wxWindow *parent = NULL, int x = -1, int y = -1, -// bool centre = TRUE, int width=150, int height=200); - - -wxString wxGetSingleChoice(const wxString& message, const wxString& caption, - int LCOUNT, wxString* LIST, - wxWindow *parent = NULL, - int x = -1, int y = -1, - bool centre = TRUE, - int width=150, int height=200); - -int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption, - int LCOUNT, wxString* LIST, - wxWindow *parent = NULL, - int x = -1, int y = -1, - bool centre = TRUE, - int width=150, int height=200); - - -int wxMessageBox(const wxString& message, - const wxString& caption = wxPyEmptyStr, - int style = wxOK | wxCENTRE, - wxWindow *parent = NULL, - int x = -1, int y = -1); - -//--------------------------------------------------------------------------- -// GDI Functions - -bool wxColourDisplay(); -int wxDisplayDepth(); -void wxSetCursor(wxCursor *cursor); - -//--------------------------------------------------------------------------- -// Miscellaneous functions - -long NewId(); -void RegisterId(long id); -void wxBeginBusyCursor(wxCursor *cursor = wxHOURGLASS_CURSOR); -void wxBell(); -void wxDisplaySize(int *OUTPUT, int *OUTPUT); -void wxEndBusyCursor(); -long wxExecute(const wxString& command, bool sync = FALSE); -wxWindow * wxFindWindowByLabel(const wxString& label, wxWindow *parent=NULL); -wxWindow * wxFindWindowByName(const wxString& name, wxWindow *parent=NULL); -#ifdef __WXMSW__ -wxWindow * wxGetActiveWindow(); -long wxGetElapsedTime(bool resetTimer = TRUE); -long wxGetFreeMemory(); -#endif -void wxGetMousePosition(int* OUTPUT, int* OUTPUT); -bool wxIsBusy(); -wxString wxNow(); -#ifdef __WXMSW__ -bool wxShell(const wxString& command = wxPyEmptyStr); -void wxStartTimer(); -int wxGetOsVersion(int *OUTPUT, int *OUTPUT); -#endif - -bool wxYield(); - -%inline %{ - char* wxGetResource(char *section, char *entry, char *file = NULL) { - char * retval; - wxGetResource(section, entry, &retval, file); - return retval; - } -%} - -//--------------------------------------------------------------------------- -// Resource System - -bool wxResourceAddIdentifier(char *name, int value); -void wxResourceClear(void); -wxBitmap * wxResourceCreateBitmap(char *resource); -wxIcon * wxResourceCreateIcon(char *resource); -wxMenuBar * wxResourceCreateMenuBar(char *resource); -int wxResourceGetIdentifier(char *name); -bool wxResourceParseData(char *resource, wxResourceTable *table = NULL); -bool wxResourceParseFile(char *filename, wxResourceTable *table = NULL); -bool wxResourceParseString(char *resource, wxResourceTable *table = NULL); - - - -//---------------------------------------------------------------------- - -class wxPyTimer { -public: - wxPyTimer(PyObject* notify); - ~wxPyTimer(); - int Interval(); - void Start(int milliseconds=-1, int oneShot=FALSE); - void Stop(); -}; - -//--------------------------------------------------------------------------- - -enum wxEdge { wxLeft, wxTop, wxRight, wxBottom, wxWidth, wxHeight, - wxCentre, wxCenter = wxCentre, wxCentreX, wxCentreY }; -enum wxRelationship { wxUnconstrained = 0, - wxAsIs, - wxPercentOf, - wxAbove, - wxBelow, - wxLeftOf, - wxRightOf, - wxSameAs, - wxAbsolute }; - - -class wxIndividualLayoutConstraint { -public: -// wxIndividualLayoutConstraint(); -// ~wxIndividualLayoutConstraint(); - - void Above(wxWindow *otherWin, int margin=0); - void Absolute(int value); - void AsIs(void); - void Below(wxWindow *otherWin, int margin=0); - void Unconstrained(void); - void LeftOf(wxWindow *otherWin, int margin=0); - void PercentOf(wxWindow *otherWin, wxEdge edge, int percent); - void RightOf(wxWindow *otherWin, int margin=0); - void SameAs(wxWindow *otherWin, wxEdge edge, int margin=0); - void Set(wxRelationship rel, wxWindow *otherWin, wxEdge otherEdge, int value=0, int margin=0); -}; - - -class wxLayoutConstraints { -public: - wxLayoutConstraints(); - -%readonly - wxIndividualLayoutConstraint bottom; - wxIndividualLayoutConstraint centreX; - wxIndividualLayoutConstraint centreY; - wxIndividualLayoutConstraint height; - wxIndividualLayoutConstraint left; - wxIndividualLayoutConstraint right; - wxIndividualLayoutConstraint top; - wxIndividualLayoutConstraint width; -%readwrite -} - - -//--------------------------------------------------------------------------- -// Accelerator Entry and Table - -#ifdef __WXMSW__ -class wxAcceleratorEntry { -public: - wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0); - //~wxAcceleratorEntry(); *** ? - - void Set(int flags, int keyCode, int Cmd); - int GetFlags(); - int GetKeyCode(); - int GetCommand(); -}; - - -class wxAcceleratorTable { -public: - // Can also accept a list of 3-tuples - wxAcceleratorTable(int LCOUNT, wxAcceleratorEntry* LIST); - // ~wxAcceleratorEntry(); *** ? - -}; -#endif -//--------------------------------------------------------------------------- -///////////////////////////////////////////////////////////////////////////// -// -// $Log$ -// Revision 1.4 1998/08/18 19:48:19 RD -// more wxGTK compatibility things. -// -// It builds now but there are serious runtime problems... -// -// Revision 1.3 1998/08/16 04:31:10 RD -// More wxGTK work. -// -// Revision 1.2 1998/08/15 07:36:41 RD -// - Moved the header in the .i files out of the code that gets put into -// the .cpp files. It caused CVS conflicts because of the RCS ID being -// different each time. -// -// - A few minor fixes. -// -// Revision 1.1 1998/08/09 08:25:51 RD -// Initial version -// -// - - diff --git a/utils/wxPython/src/motif/dummy b/utils/wxPython/src/motif/dummy deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/utils/wxPython/src/msw/cmndlgs.cpp b/utils/wxPython/src/msw/cmndlgs.cpp deleted file mode 100644 index 7706046bfd..0000000000 --- a/utils/wxPython/src/msw/cmndlgs.cpp +++ /dev/null @@ -1,3830 +0,0 @@ -/* - * FILE : msw\cmndlgs.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif - -#define SWIG_init initcmndlgsc - -#define SWIG_name "cmndlgsc" - -#include "helpers.h" -#include -#include -#include -#include - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; -#define new_wxColourData() (new wxColourData()) -static PyObject *_wrap_new_wxColourData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColourData * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxColourData")) - return NULL; - _result = (wxColourData *)new_wxColourData(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColourData_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxColourData(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxColourData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColourData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxColourData",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColourData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxColourData. Expected _wxColourData_p."); - return NULL; - } - } - delete_wxColourData(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxColourData_GetChooseFull(_swigobj) (_swigobj->GetChooseFull()) -static PyObject *_wrap_wxColourData_GetChooseFull(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxColourData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxColourData_GetChooseFull",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColourData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourData_GetChooseFull. Expected _wxColourData_p."); - return NULL; - } - } - _result = (bool )wxColourData_GetChooseFull(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxColourData_GetColour(_swigobj) (_swigobj->GetColour()) -static PyObject *_wrap_wxColourData_GetColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxColourData * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxColourData_GetColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColourData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourData_GetColour. Expected _wxColourData_p."); - return NULL; - } - } - wxColour & _result_ref = wxColourData_GetColour(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxColourData_GetCustomColour(_swigobj,_swigarg0) (_swigobj->GetCustomColour(_swigarg0)) -static PyObject *_wrap_wxColourData_GetCustomColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxColourData * _arg0; - int _arg1; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxColourData_GetCustomColour",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColourData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourData_GetCustomColour. Expected _wxColourData_p."); - return NULL; - } - } - _result = new wxColour (wxColourData_GetCustomColour(_arg0,_arg1)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxColourData_SetChooseFull(_swigobj,_swigarg0) (_swigobj->SetChooseFull(_swigarg0)) -static PyObject *_wrap_wxColourData_SetChooseFull(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColourData * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxColourData_SetChooseFull",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColourData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourData_SetChooseFull. Expected _wxColourData_p."); - return NULL; - } - } - wxColourData_SetChooseFull(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxColourData_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0)) -static PyObject *_wrap_wxColourData_SetColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColourData * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxColourData_SetColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColourData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourData_SetColour. Expected _wxColourData_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxColourData_SetColour. Expected _wxColour_p."); - return NULL; - } - } - wxColourData_SetColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxColourData_SetCustomColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetCustomColour(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxColourData_SetCustomColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColourData * _arg0; - int _arg1; - wxColour * _arg2; - char * _argc0 = 0; - char * _argc2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sis:wxColourData_SetCustomColour",&_argc0,&_arg1,&_argc2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColourData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourData_SetCustomColour. Expected _wxColourData_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxColourData_SetCustomColour. Expected _wxColour_p."); - return NULL; - } - } - wxColourData_SetCustomColour(_arg0,_arg1,*_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxColourDialogTowxDialog(void *ptr) { - wxColourDialog *src; - wxDialog *dest; - src = (wxColourDialog *) ptr; - dest = (wxDialog *) src; - return (void *) dest; -} - -static void *SwigwxColourDialogTowxPanel(void *ptr) { - wxColourDialog *src; - wxPanel *dest; - src = (wxColourDialog *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxColourDialogTowxWindow(void *ptr) { - wxColourDialog *src; - wxWindow *dest; - src = (wxColourDialog *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxColourDialogTowxEvtHandler(void *ptr) { - wxColourDialog *src; - wxEvtHandler *dest; - src = (wxColourDialog *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxColourDialog(_swigarg0,_swigarg1) (new wxColourDialog(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxColourDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColourDialog * _result; - wxWindow * _arg0; - wxColourData * _arg1 = NULL; - char * _argc0 = 0; - char * _argc1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|s:new_wxColourDialog",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxColourDialog. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColourData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxColourDialog. Expected _wxColourData_p."); - return NULL; - } - } - _result = (wxColourDialog *)new_wxColourDialog(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColourDialog_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxColourDialog_GetColourData(_swigobj) (_swigobj->GetColourData()) -static PyObject *_wrap_wxColourDialog_GetColourData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColourData * _result; - wxColourDialog * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxColourDialog_GetColourData",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColourDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourDialog_GetColourData. Expected _wxColourDialog_p."); - return NULL; - } - } - wxColourData & _result_ref = wxColourDialog_GetColourData(_arg0); - _result = (wxColourData *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColourData_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxColourDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) -static PyObject *_wrap_wxColourDialog_ShowModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxColourDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxColourDialog_ShowModal",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColourDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourDialog_ShowModal. Expected _wxColourDialog_p."); - return NULL; - } - } - _result = (int )wxColourDialog_ShowModal(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxDirDialogTowxDialog(void *ptr) { - wxDirDialog *src; - wxDialog *dest; - src = (wxDirDialog *) ptr; - dest = (wxDialog *) src; - return (void *) dest; -} - -static void *SwigwxDirDialogTowxPanel(void *ptr) { - wxDirDialog *src; - wxPanel *dest; - src = (wxDirDialog *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxDirDialogTowxWindow(void *ptr) { - wxDirDialog *src; - wxWindow *dest; - src = (wxDirDialog *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxDirDialogTowxEvtHandler(void *ptr) { - wxDirDialog *src; - wxEvtHandler *dest; - src = (wxDirDialog *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxDirDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxDirDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_new_wxDirDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDirDialog * _result; - wxWindow * _arg0; - char * _arg1 = "Choose a directory"; - char * _arg2 = ""; - long _arg3 = 0; - wxPoint * _arg4 = &wxPyDefaultPosition; - char * _argc0 = 0; - char * _argc4 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|ssls:new_wxDirDialog",&_argc0,&_arg1,&_arg2,&_arg3,&_argc4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDirDialog. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxDirDialog. Expected _wxPoint_p."); - return NULL; - } - } - _result = (wxDirDialog *)new_wxDirDialog(_arg0,_arg1,_arg2,_arg3,*_arg4); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxDirDialog_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxDirDialog_GetPath(_swigobj) (_swigobj->GetPath()) -static PyObject *_wrap_wxDirDialog_GetPath(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxDirDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDirDialog_GetPath",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDirDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDirDialog_GetPath. Expected _wxDirDialog_p."); - return NULL; - } - } - _result = new wxString (wxDirDialog_GetPath(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxDirDialog_GetMessage(_swigobj) (_swigobj->GetMessage()) -static PyObject *_wrap_wxDirDialog_GetMessage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxDirDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDirDialog_GetMessage",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDirDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDirDialog_GetMessage. Expected _wxDirDialog_p."); - return NULL; - } - } - _result = new wxString (wxDirDialog_GetMessage(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxDirDialog_GetStyle(_swigobj) (_swigobj->GetStyle()) -static PyObject *_wrap_wxDirDialog_GetStyle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDirDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDirDialog_GetStyle",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDirDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDirDialog_GetStyle. Expected _wxDirDialog_p."); - return NULL; - } - } - _result = (long )wxDirDialog_GetStyle(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDirDialog_SetMessage(_swigobj,_swigarg0) (_swigobj->SetMessage(_swigarg0)) -static PyObject *_wrap_wxDirDialog_SetMessage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDirDialog * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxDirDialog_SetMessage",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDirDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDirDialog_SetMessage. Expected _wxDirDialog_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxDirDialog_SetMessage(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxDirDialog_SetPath(_swigobj,_swigarg0) (_swigobj->SetPath(_swigarg0)) -static PyObject *_wrap_wxDirDialog_SetPath(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDirDialog * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxDirDialog_SetPath",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDirDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDirDialog_SetPath. Expected _wxDirDialog_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxDirDialog_SetPath(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxDirDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) -static PyObject *_wrap_wxDirDialog_ShowModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxDirDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDirDialog_ShowModal",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDirDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDirDialog_ShowModal. Expected _wxDirDialog_p."); - return NULL; - } - } - _result = (int )wxDirDialog_ShowModal(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxFileDialogTowxDialog(void *ptr) { - wxFileDialog *src; - wxDialog *dest; - src = (wxFileDialog *) ptr; - dest = (wxDialog *) src; - return (void *) dest; -} - -static void *SwigwxFileDialogTowxPanel(void *ptr) { - wxFileDialog *src; - wxPanel *dest; - src = (wxFileDialog *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxFileDialogTowxWindow(void *ptr) { - wxFileDialog *src; - wxWindow *dest; - src = (wxFileDialog *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxFileDialogTowxEvtHandler(void *ptr) { - wxFileDialog *src; - wxEvtHandler *dest; - src = (wxFileDialog *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxFileDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxFileDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxFileDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFileDialog * _result; - wxWindow * _arg0; - char * _arg1 = "Choose a file"; - char * _arg2 = ""; - char * _arg3 = ""; - char * _arg4 = "*.*"; - long _arg5 = 0; - wxPoint * _arg6 = &wxPyDefaultPosition; - char * _argc0 = 0; - char * _argc6 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|ssssls:new_wxFileDialog",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_argc6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxFileDialog. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc6) { - if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxFileDialog. Expected _wxPoint_p."); - return NULL; - } - } - _result = (wxFileDialog *)new_wxFileDialog(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFileDialog_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxFileDialog_GetDirectory(_swigobj) (_swigobj->GetDirectory()) -static PyObject *_wrap_wxFileDialog_GetDirectory(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxFileDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFileDialog_GetDirectory",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetDirectory. Expected _wxFileDialog_p."); - return NULL; - } - } - _result = new wxString (wxFileDialog_GetDirectory(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxFileDialog_GetFilename(_swigobj) (_swigobj->GetFilename()) -static PyObject *_wrap_wxFileDialog_GetFilename(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxFileDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFileDialog_GetFilename",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetFilename. Expected _wxFileDialog_p."); - return NULL; - } - } - _result = new wxString (wxFileDialog_GetFilename(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxFileDialog_GetFilterIndex(_swigobj) (_swigobj->GetFilterIndex()) -static PyObject *_wrap_wxFileDialog_GetFilterIndex(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxFileDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFileDialog_GetFilterIndex",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetFilterIndex. Expected _wxFileDialog_p."); - return NULL; - } - } - _result = (int )wxFileDialog_GetFilterIndex(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFileDialog_GetMessage(_swigobj) (_swigobj->GetMessage()) -static PyObject *_wrap_wxFileDialog_GetMessage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxFileDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFileDialog_GetMessage",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetMessage. Expected _wxFileDialog_p."); - return NULL; - } - } - _result = new wxString (wxFileDialog_GetMessage(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxFileDialog_GetPath(_swigobj) (_swigobj->GetPath()) -static PyObject *_wrap_wxFileDialog_GetPath(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxFileDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFileDialog_GetPath",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetPath. Expected _wxFileDialog_p."); - return NULL; - } - } - _result = new wxString (wxFileDialog_GetPath(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxFileDialog_GetStyle(_swigobj) (_swigobj->GetStyle()) -static PyObject *_wrap_wxFileDialog_GetStyle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxFileDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFileDialog_GetStyle",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetStyle. Expected _wxFileDialog_p."); - return NULL; - } - } - _result = (long )wxFileDialog_GetStyle(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxFileDialog_GetWildcard(_swigobj) (_swigobj->GetWildcard()) -static PyObject *_wrap_wxFileDialog_GetWildcard(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxFileDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFileDialog_GetWildcard",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetWildcard. Expected _wxFileDialog_p."); - return NULL; - } - } - _result = new wxString (wxFileDialog_GetWildcard(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxFileDialog_SetDirectory(_swigobj,_swigarg0) (_swigobj->SetDirectory(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetDirectory(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFileDialog * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxFileDialog_SetDirectory",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetDirectory. Expected _wxFileDialog_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxFileDialog_SetDirectory(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxFileDialog_SetFilename(_swigobj,_swigarg0) (_swigobj->SetFilename(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetFilename(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFileDialog * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxFileDialog_SetFilename",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetFilename. Expected _wxFileDialog_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxFileDialog_SetFilename(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxFileDialog_SetFilterIndex(_swigobj,_swigarg0) (_swigobj->SetFilterIndex(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetFilterIndex(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFileDialog * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxFileDialog_SetFilterIndex",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetFilterIndex. Expected _wxFileDialog_p."); - return NULL; - } - } - wxFileDialog_SetFilterIndex(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFileDialog_SetMessage(_swigobj,_swigarg0) (_swigobj->SetMessage(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetMessage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFileDialog * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxFileDialog_SetMessage",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetMessage. Expected _wxFileDialog_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxFileDialog_SetMessage(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxFileDialog_SetPath(_swigobj,_swigarg0) (_swigobj->SetPath(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetPath(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFileDialog * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxFileDialog_SetPath",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetPath. Expected _wxFileDialog_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxFileDialog_SetPath(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxFileDialog_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetStyle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFileDialog * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxFileDialog_SetStyle",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetStyle. Expected _wxFileDialog_p."); - return NULL; - } - } - wxFileDialog_SetStyle(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFileDialog_SetWildcard(_swigobj,_swigarg0) (_swigobj->SetWildcard(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetWildcard(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFileDialog * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxFileDialog_SetWildcard",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetWildcard. Expected _wxFileDialog_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxFileDialog_SetWildcard(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxFileDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) -static PyObject *_wrap_wxFileDialog_ShowModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxFileDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFileDialog_ShowModal",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_ShowModal. Expected _wxFileDialog_p."); - return NULL; - } - } - _result = (int )wxFileDialog_ShowModal(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxSingleChoiceDialogTowxDialog(void *ptr) { - wxSingleChoiceDialog *src; - wxDialog *dest; - src = (wxSingleChoiceDialog *) ptr; - dest = (wxDialog *) src; - return (void *) dest; -} - -static void *SwigwxSingleChoiceDialogTowxPanel(void *ptr) { - wxSingleChoiceDialog *src; - wxPanel *dest; - src = (wxSingleChoiceDialog *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxSingleChoiceDialogTowxWindow(void *ptr) { - wxSingleChoiceDialog *src; - wxWindow *dest; - src = (wxSingleChoiceDialog *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxSingleChoiceDialogTowxEvtHandler(void *ptr) { - wxSingleChoiceDialog *src; - wxEvtHandler *dest; - src = (wxSingleChoiceDialog *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -static wxSingleChoiceDialog *new_wxSingleChoiceDialog(wxWindow *parent,wxString *message,wxString *caption,int LCOUNT,wxString *LIST,long style,wxPoint *pos) { - return new wxSingleChoiceDialog(parent, *message, *caption, - LCOUNT, LIST, NULL, style, *pos); - } - -static PyObject *_wrap_new_wxSingleChoiceDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSingleChoiceDialog * _result; - wxWindow * _arg0; - wxString * _arg1; - wxString * _arg2; - int _arg3; - wxString * _arg4; - long _arg5 = (wxOK)|(wxCANCEL)|(wxCENTRE); - wxPoint * _arg6 = &wxPyDefaultPosition; - char * _argc0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj2 = 0; - PyObject * _obj4 = 0; - char * _argc6 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sOOO|ls:new_wxSingleChoiceDialog",&_argc0,&_obj1,&_obj2,&_obj4,&_arg5,&_argc6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxSingleChoiceDialog. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_obj4) -{ - _arg4 = wxString_LIST_helper(_obj4); - if (_arg4 == NULL) { - return NULL; - } -} - if (_argc6) { - if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxSingleChoiceDialog. Expected _wxPoint_p."); - return NULL; - } - } -{ - _arg3 = PyList_Size(_obj4); -} - _result = (wxSingleChoiceDialog *)new_wxSingleChoiceDialog(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxSingleChoiceDialog_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj1) - delete _arg1; -} -{ - if (_obj2) - delete _arg2; -} -{ - delete [] _arg4; -} - return _resultobj; -} - -#define wxSingleChoiceDialog_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxSingleChoiceDialog_GetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSingleChoiceDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSingleChoiceDialog_GetSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSingleChoiceDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSingleChoiceDialog_GetSelection. Expected _wxSingleChoiceDialog_p."); - return NULL; - } - } - _result = (int )wxSingleChoiceDialog_GetSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSingleChoiceDialog_GetStringSelection(_swigobj) (_swigobj->GetStringSelection()) -static PyObject *_wrap_wxSingleChoiceDialog_GetStringSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxSingleChoiceDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSingleChoiceDialog_GetStringSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSingleChoiceDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSingleChoiceDialog_GetStringSelection. Expected _wxSingleChoiceDialog_p."); - return NULL; - } - } - _result = new wxString (wxSingleChoiceDialog_GetStringSelection(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxSingleChoiceDialog_SetSelection(_swigobj,_swigarg0) (_swigobj->SetSelection(_swigarg0)) -static PyObject *_wrap_wxSingleChoiceDialog_SetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSingleChoiceDialog * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxSingleChoiceDialog_SetSelection",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSingleChoiceDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSingleChoiceDialog_SetSelection. Expected _wxSingleChoiceDialog_p."); - return NULL; - } - } - wxSingleChoiceDialog_SetSelection(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSingleChoiceDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) -static PyObject *_wrap_wxSingleChoiceDialog_ShowModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSingleChoiceDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSingleChoiceDialog_ShowModal",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSingleChoiceDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSingleChoiceDialog_ShowModal. Expected _wxSingleChoiceDialog_p."); - return NULL; - } - } - _result = (int )wxSingleChoiceDialog_ShowModal(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxTextEntryDialogTowxDialog(void *ptr) { - wxTextEntryDialog *src; - wxDialog *dest; - src = (wxTextEntryDialog *) ptr; - dest = (wxDialog *) src; - return (void *) dest; -} - -static void *SwigwxTextEntryDialogTowxPanel(void *ptr) { - wxTextEntryDialog *src; - wxPanel *dest; - src = (wxTextEntryDialog *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxTextEntryDialogTowxWindow(void *ptr) { - wxTextEntryDialog *src; - wxWindow *dest; - src = (wxTextEntryDialog *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxTextEntryDialogTowxEvtHandler(void *ptr) { - wxTextEntryDialog *src; - wxEvtHandler *dest; - src = (wxTextEntryDialog *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxTextEntryDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxTextEntryDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_new_wxTextEntryDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextEntryDialog * _result; - wxWindow * _arg0; - char * _arg1; - char * _arg2 = "Input Text"; - char * _arg3 = ""; - long _arg4 = (wxOK)|(wxCANCEL)|(wxCENTRE); - wxPoint * _arg5 = &wxPyDefaultPosition; - char * _argc0 = 0; - char * _argc5 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"ss|ssls:new_wxTextEntryDialog",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_argc5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxTextEntryDialog. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc5) { - if (SWIG_GetPtr(_argc5,(void **) &_arg5,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of new_wxTextEntryDialog. Expected _wxPoint_p."); - return NULL; - } - } - _result = (wxTextEntryDialog *)new_wxTextEntryDialog(_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextEntryDialog_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxTextEntryDialog_GetValue(_swigobj) (_swigobj->GetValue()) -static PyObject *_wrap_wxTextEntryDialog_GetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxTextEntryDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextEntryDialog_GetValue",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextEntryDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextEntryDialog_GetValue. Expected _wxTextEntryDialog_p."); - return NULL; - } - } - _result = new wxString (wxTextEntryDialog_GetValue(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxTextEntryDialog_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) -static PyObject *_wrap_wxTextEntryDialog_SetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextEntryDialog * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxTextEntryDialog_SetValue",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextEntryDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextEntryDialog_SetValue. Expected _wxTextEntryDialog_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxTextEntryDialog_SetValue(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxTextEntryDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) -static PyObject *_wrap_wxTextEntryDialog_ShowModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTextEntryDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextEntryDialog_ShowModal",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextEntryDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextEntryDialog_ShowModal. Expected _wxTextEntryDialog_p."); - return NULL; - } - } - _result = (int )wxTextEntryDialog_ShowModal(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define new_wxFontData() (new wxFontData()) -static PyObject *_wrap_new_wxFontData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontData * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxFontData")) - return NULL; - _result = (wxFontData *)new_wxFontData(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFontData_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxFontData(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxFontData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxFontData",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxFontData. Expected _wxFontData_p."); - return NULL; - } - } - delete_wxFontData(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontData_EnableEffects(_swigobj,_swigarg0) (_swigobj->EnableEffects(_swigarg0)) -static PyObject *_wrap_wxFontData_EnableEffects(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontData * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxFontData_EnableEffects",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_EnableEffects. Expected _wxFontData_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxFontData_EnableEffects(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontData_GetAllowSymbols(_swigobj) (_swigobj->GetAllowSymbols()) -static PyObject *_wrap_wxFontData_GetAllowSymbols(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxFontData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFontData_GetAllowSymbols",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_GetAllowSymbols. Expected _wxFontData_p."); - return NULL; - } - } - _result = (bool )wxFontData_GetAllowSymbols(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFontData_GetColour(_swigobj) (_swigobj->GetColour()) -static PyObject *_wrap_wxFontData_GetColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxFontData * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFontData_GetColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_GetColour. Expected _wxFontData_p."); - return NULL; - } - } - wxColour & _result_ref = wxFontData_GetColour(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxFontData_GetChosenFont(_swigobj) (_swigobj->GetChosenFont()) -static PyObject *_wrap_wxFontData_GetChosenFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _result; - wxFontData * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFontData_GetChosenFont",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_GetChosenFont. Expected _wxFontData_p."); - return NULL; - } - } - _result = new wxFont (wxFontData_GetChosenFont(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxFontData_GetEnableEffects(_swigobj) (_swigobj->GetEnableEffects()) -static PyObject *_wrap_wxFontData_GetEnableEffects(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxFontData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFontData_GetEnableEffects",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_GetEnableEffects. Expected _wxFontData_p."); - return NULL; - } - } - _result = (bool )wxFontData_GetEnableEffects(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFontData_GetInitialFont(_swigobj) (_swigobj->GetInitialFont()) -static PyObject *_wrap_wxFontData_GetInitialFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _result; - wxFontData * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFontData_GetInitialFont",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_GetInitialFont. Expected _wxFontData_p."); - return NULL; - } - } - _result = new wxFont (wxFontData_GetInitialFont(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxFontData_GetShowHelp(_swigobj) (_swigobj->GetShowHelp()) -static PyObject *_wrap_wxFontData_GetShowHelp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxFontData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFontData_GetShowHelp",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_GetShowHelp. Expected _wxFontData_p."); - return NULL; - } - } - _result = (bool )wxFontData_GetShowHelp(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFontData_SetAllowSymbols(_swigobj,_swigarg0) (_swigobj->SetAllowSymbols(_swigarg0)) -static PyObject *_wrap_wxFontData_SetAllowSymbols(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontData * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxFontData_SetAllowSymbols",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_SetAllowSymbols. Expected _wxFontData_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxFontData_SetAllowSymbols(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontData_SetChosenFont(_swigobj,_swigarg0) (_swigobj->SetChosenFont(_swigarg0)) -static PyObject *_wrap_wxFontData_SetChosenFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontData * _arg0; - wxFont * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxFontData_SetChosenFont",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_SetChosenFont. Expected _wxFontData_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontData_SetChosenFont. Expected _wxFont_p."); - return NULL; - } - } - wxFontData_SetChosenFont(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontData_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0)) -static PyObject *_wrap_wxFontData_SetColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontData * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxFontData_SetColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_SetColour. Expected _wxFontData_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontData_SetColour. Expected _wxColour_p."); - return NULL; - } - } - wxFontData_SetColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontData_SetInitialFont(_swigobj,_swigarg0) (_swigobj->SetInitialFont(_swigarg0)) -static PyObject *_wrap_wxFontData_SetInitialFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontData * _arg0; - wxFont * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxFontData_SetInitialFont",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_SetInitialFont. Expected _wxFontData_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontData_SetInitialFont. Expected _wxFont_p."); - return NULL; - } - } - wxFontData_SetInitialFont(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontData_SetRange(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRange(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxFontData_SetRange(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontData * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxFontData_SetRange",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_SetRange. Expected _wxFontData_p."); - return NULL; - } - } - wxFontData_SetRange(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontData_SetShowHelp(_swigobj,_swigarg0) (_swigobj->SetShowHelp(_swigarg0)) -static PyObject *_wrap_wxFontData_SetShowHelp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontData * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxFontData_SetShowHelp",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontData_SetShowHelp. Expected _wxFontData_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxFontData_SetShowHelp(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxFontDialogTowxDialog(void *ptr) { - wxFontDialog *src; - wxDialog *dest; - src = (wxFontDialog *) ptr; - dest = (wxDialog *) src; - return (void *) dest; -} - -static void *SwigwxFontDialogTowxPanel(void *ptr) { - wxFontDialog *src; - wxPanel *dest; - src = (wxFontDialog *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxFontDialogTowxWindow(void *ptr) { - wxFontDialog *src; - wxWindow *dest; - src = (wxFontDialog *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxFontDialogTowxEvtHandler(void *ptr) { - wxFontDialog *src; - wxEvtHandler *dest; - src = (wxFontDialog *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxFontDialog(_swigarg0,_swigarg1) (new wxFontDialog(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxFontDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontDialog * _result; - wxWindow * _arg0; - wxFontData * _arg1 = NULL; - char * _argc0 = 0; - char * _argc1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|s:new_wxFontDialog",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxFontDialog. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxFontData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxFontDialog. Expected _wxFontData_p."); - return NULL; - } - } - _result = (wxFontDialog *)new_wxFontDialog(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFontDialog_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxFontDialog_GetFontData(_swigobj) (_swigobj->GetFontData()) -static PyObject *_wrap_wxFontDialog_GetFontData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFontData * _result; - wxFontDialog * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFontDialog_GetFontData",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontDialog_GetFontData. Expected _wxFontDialog_p."); - return NULL; - } - } - wxFontData & _result_ref = wxFontDialog_GetFontData(_arg0); - _result = (wxFontData *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFontData_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxFontDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) -static PyObject *_wrap_wxFontDialog_ShowModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxFontDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFontDialog_ShowModal",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFontDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontDialog_ShowModal. Expected _wxFontDialog_p."); - return NULL; - } - } - _result = (int )wxFontDialog_ShowModal(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define new_wxPageSetupData() (new wxPageSetupData()) -static PyObject *_wrap_new_wxPageSetupData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPageSetupData * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxPageSetupData")) - return NULL; - _result = (wxPageSetupData *)new_wxPageSetupData(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPageSetupData_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxPageSetupData(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxPageSetupData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPageSetupData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxPageSetupData",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPageSetupData. Expected _wxPageSetupData_p."); - return NULL; - } - } - delete_wxPageSetupData(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPageSetupData_EnableHelp(_swigobj,_swigarg0) (_swigobj->EnableHelp(_swigarg0)) -static PyObject *_wrap_wxPageSetupData_EnableHelp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPageSetupData * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPageSetupData_EnableHelp",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_EnableHelp. Expected _wxPageSetupData_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxPageSetupData_EnableHelp(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPageSetupData_EnableMargins(_swigobj,_swigarg0) (_swigobj->EnableMargins(_swigarg0)) -static PyObject *_wrap_wxPageSetupData_EnableMargins(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPageSetupData * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPageSetupData_EnableMargins",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_EnableMargins. Expected _wxPageSetupData_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxPageSetupData_EnableMargins(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPageSetupData_EnableOrientation(_swigobj,_swigarg0) (_swigobj->EnableOrientation(_swigarg0)) -static PyObject *_wrap_wxPageSetupData_EnableOrientation(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPageSetupData * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPageSetupData_EnableOrientation",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_EnableOrientation. Expected _wxPageSetupData_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxPageSetupData_EnableOrientation(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPageSetupData_EnablePaper(_swigobj,_swigarg0) (_swigobj->EnablePaper(_swigarg0)) -static PyObject *_wrap_wxPageSetupData_EnablePaper(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPageSetupData * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPageSetupData_EnablePaper",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_EnablePaper. Expected _wxPageSetupData_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxPageSetupData_EnablePaper(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPageSetupData_EnablePrinter(_swigobj,_swigarg0) (_swigobj->EnablePrinter(_swigarg0)) -static PyObject *_wrap_wxPageSetupData_EnablePrinter(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPageSetupData * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPageSetupData_EnablePrinter",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_EnablePrinter. Expected _wxPageSetupData_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxPageSetupData_EnablePrinter(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPageSetupData_GetPaperSize(_swigobj) (_swigobj->GetPaperSize()) -static PyObject *_wrap_wxPageSetupData_GetPaperSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxPageSetupData * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPageSetupData_GetPaperSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_GetPaperSize. Expected _wxPageSetupData_p."); - return NULL; - } - } - _result = new wxPoint (wxPageSetupData_GetPaperSize(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPageSetupData_GetMarginTopLeft(_swigobj) (_swigobj->GetMarginTopLeft()) -static PyObject *_wrap_wxPageSetupData_GetMarginTopLeft(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxPageSetupData * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPageSetupData_GetMarginTopLeft",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_GetMarginTopLeft. Expected _wxPageSetupData_p."); - return NULL; - } - } - _result = new wxPoint (wxPageSetupData_GetMarginTopLeft(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPageSetupData_GetMarginBottomRight(_swigobj) (_swigobj->GetMarginBottomRight()) -static PyObject *_wrap_wxPageSetupData_GetMarginBottomRight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxPageSetupData * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPageSetupData_GetMarginBottomRight",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_GetMarginBottomRight. Expected _wxPageSetupData_p."); - return NULL; - } - } - _result = new wxPoint (wxPageSetupData_GetMarginBottomRight(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPageSetupData_GetMinMarginTopLeft(_swigobj) (_swigobj->GetMinMarginTopLeft()) -static PyObject *_wrap_wxPageSetupData_GetMinMarginTopLeft(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxPageSetupData * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPageSetupData_GetMinMarginTopLeft",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_GetMinMarginTopLeft. Expected _wxPageSetupData_p."); - return NULL; - } - } - _result = new wxPoint (wxPageSetupData_GetMinMarginTopLeft(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPageSetupData_GetMinMarginBottomRight(_swigobj) (_swigobj->GetMinMarginBottomRight()) -static PyObject *_wrap_wxPageSetupData_GetMinMarginBottomRight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxPageSetupData * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPageSetupData_GetMinMarginBottomRight",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_GetMinMarginBottomRight. Expected _wxPageSetupData_p."); - return NULL; - } - } - _result = new wxPoint (wxPageSetupData_GetMinMarginBottomRight(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPageSetupData_GetOrientation(_swigobj) (_swigobj->GetOrientation()) -static PyObject *_wrap_wxPageSetupData_GetOrientation(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPageSetupData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPageSetupData_GetOrientation",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_GetOrientation. Expected _wxPageSetupData_p."); - return NULL; - } - } - _result = (int )wxPageSetupData_GetOrientation(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPageSetupData_GetDefaultMinMargins(_swigobj) (_swigobj->GetDefaultMinMargins()) -static PyObject *_wrap_wxPageSetupData_GetDefaultMinMargins(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPageSetupData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPageSetupData_GetDefaultMinMargins",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_GetDefaultMinMargins. Expected _wxPageSetupData_p."); - return NULL; - } - } - _result = (bool )wxPageSetupData_GetDefaultMinMargins(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPageSetupData_GetEnableMargins(_swigobj) (_swigobj->GetEnableMargins()) -static PyObject *_wrap_wxPageSetupData_GetEnableMargins(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPageSetupData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPageSetupData_GetEnableMargins",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_GetEnableMargins. Expected _wxPageSetupData_p."); - return NULL; - } - } - _result = (bool )wxPageSetupData_GetEnableMargins(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPageSetupData_GetEnableOrientation(_swigobj) (_swigobj->GetEnableOrientation()) -static PyObject *_wrap_wxPageSetupData_GetEnableOrientation(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPageSetupData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPageSetupData_GetEnableOrientation",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_GetEnableOrientation. Expected _wxPageSetupData_p."); - return NULL; - } - } - _result = (bool )wxPageSetupData_GetEnableOrientation(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPageSetupData_GetEnablePaper(_swigobj) (_swigobj->GetEnablePaper()) -static PyObject *_wrap_wxPageSetupData_GetEnablePaper(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPageSetupData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPageSetupData_GetEnablePaper",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_GetEnablePaper. Expected _wxPageSetupData_p."); - return NULL; - } - } - _result = (bool )wxPageSetupData_GetEnablePaper(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPageSetupData_GetEnablePrinter(_swigobj) (_swigobj->GetEnablePrinter()) -static PyObject *_wrap_wxPageSetupData_GetEnablePrinter(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPageSetupData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPageSetupData_GetEnablePrinter",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_GetEnablePrinter. Expected _wxPageSetupData_p."); - return NULL; - } - } - _result = (bool )wxPageSetupData_GetEnablePrinter(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPageSetupData_GetEnableHelp(_swigobj) (_swigobj->GetEnableHelp()) -static PyObject *_wrap_wxPageSetupData_GetEnableHelp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPageSetupData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPageSetupData_GetEnableHelp",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_GetEnableHelp. Expected _wxPageSetupData_p."); - return NULL; - } - } - _result = (bool )wxPageSetupData_GetEnableHelp(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPageSetupData_GetDefaultInfo(_swigobj) (_swigobj->GetDefaultInfo()) -static PyObject *_wrap_wxPageSetupData_GetDefaultInfo(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPageSetupData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPageSetupData_GetDefaultInfo",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_GetDefaultInfo. Expected _wxPageSetupData_p."); - return NULL; - } - } - _result = (bool )wxPageSetupData_GetDefaultInfo(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPageSetupData_SetPaperSize(_swigobj,_swigarg0) (_swigobj->SetPaperSize(_swigarg0)) -static PyObject *_wrap_wxPageSetupData_SetPaperSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPageSetupData * _arg0; - wxPoint * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxPageSetupData_SetPaperSize",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_SetPaperSize. Expected _wxPageSetupData_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPageSetupData_SetPaperSize. Expected _wxPoint_p."); - return NULL; - } - } - wxPageSetupData_SetPaperSize(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPageSetupData_SetMarginTopLeft(_swigobj,_swigarg0) (_swigobj->SetMarginTopLeft(_swigarg0)) -static PyObject *_wrap_wxPageSetupData_SetMarginTopLeft(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPageSetupData * _arg0; - wxPoint * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxPageSetupData_SetMarginTopLeft",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_SetMarginTopLeft. Expected _wxPageSetupData_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPageSetupData_SetMarginTopLeft. Expected _wxPoint_p."); - return NULL; - } - } - wxPageSetupData_SetMarginTopLeft(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPageSetupData_SetMarginBottomRight(_swigobj,_swigarg0) (_swigobj->SetMarginBottomRight(_swigarg0)) -static PyObject *_wrap_wxPageSetupData_SetMarginBottomRight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPageSetupData * _arg0; - wxPoint * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxPageSetupData_SetMarginBottomRight",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_SetMarginBottomRight. Expected _wxPageSetupData_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPageSetupData_SetMarginBottomRight. Expected _wxPoint_p."); - return NULL; - } - } - wxPageSetupData_SetMarginBottomRight(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPageSetupData_SetMinMarginTopLeft(_swigobj,_swigarg0) (_swigobj->SetMinMarginTopLeft(_swigarg0)) -static PyObject *_wrap_wxPageSetupData_SetMinMarginTopLeft(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPageSetupData * _arg0; - wxPoint * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxPageSetupData_SetMinMarginTopLeft",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_SetMinMarginTopLeft. Expected _wxPageSetupData_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPageSetupData_SetMinMarginTopLeft. Expected _wxPoint_p."); - return NULL; - } - } - wxPageSetupData_SetMinMarginTopLeft(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPageSetupData_SetMinMarginBottomRight(_swigobj,_swigarg0) (_swigobj->SetMinMarginBottomRight(_swigarg0)) -static PyObject *_wrap_wxPageSetupData_SetMinMarginBottomRight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPageSetupData * _arg0; - wxPoint * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxPageSetupData_SetMinMarginBottomRight",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_SetMinMarginBottomRight. Expected _wxPageSetupData_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPageSetupData_SetMinMarginBottomRight. Expected _wxPoint_p."); - return NULL; - } - } - wxPageSetupData_SetMinMarginBottomRight(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPageSetupData_SetOrientation(_swigobj,_swigarg0) (_swigobj->SetOrientation(_swigarg0)) -static PyObject *_wrap_wxPageSetupData_SetOrientation(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPageSetupData * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPageSetupData_SetOrientation",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_SetOrientation. Expected _wxPageSetupData_p."); - return NULL; - } - } - wxPageSetupData_SetOrientation(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPageSetupData_SetDefaultMinMargins(_swigobj,_swigarg0) (_swigobj->SetDefaultMinMargins(_swigarg0)) -static PyObject *_wrap_wxPageSetupData_SetDefaultMinMargins(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPageSetupData * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPageSetupData_SetDefaultMinMargins",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_SetDefaultMinMargins. Expected _wxPageSetupData_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxPageSetupData_SetDefaultMinMargins(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPageSetupData_SetDefaultInfo(_swigobj,_swigarg0) (_swigobj->SetDefaultInfo(_swigarg0)) -static PyObject *_wrap_wxPageSetupData_SetDefaultInfo(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPageSetupData * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPageSetupData_SetDefaultInfo",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupData_SetDefaultInfo. Expected _wxPageSetupData_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxPageSetupData_SetDefaultInfo(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxPageSetupDialogTowxDialog(void *ptr) { - wxPageSetupDialog *src; - wxDialog *dest; - src = (wxPageSetupDialog *) ptr; - dest = (wxDialog *) src; - return (void *) dest; -} - -static void *SwigwxPageSetupDialogTowxPanel(void *ptr) { - wxPageSetupDialog *src; - wxPanel *dest; - src = (wxPageSetupDialog *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxPageSetupDialogTowxWindow(void *ptr) { - wxPageSetupDialog *src; - wxWindow *dest; - src = (wxPageSetupDialog *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxPageSetupDialogTowxEvtHandler(void *ptr) { - wxPageSetupDialog *src; - wxEvtHandler *dest; - src = (wxPageSetupDialog *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxPageSetupDialog(_swigarg0,_swigarg1) (new wxPageSetupDialog(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxPageSetupDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPageSetupDialog * _result; - wxWindow * _arg0; - wxPageSetupData * _arg1 = NULL; - char * _argc0 = 0; - char * _argc1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|s:new_wxPageSetupDialog",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPageSetupDialog. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPageSetupData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxPageSetupDialog. Expected _wxPageSetupData_p."); - return NULL; - } - } - _result = (wxPageSetupDialog *)new_wxPageSetupDialog(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPageSetupDialog_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPageSetupDialog_GetPageSetupData(_swigobj) (_swigobj->GetPageSetupData()) -static PyObject *_wrap_wxPageSetupDialog_GetPageSetupData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPageSetupData * _result; - wxPageSetupDialog * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPageSetupDialog_GetPageSetupData",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupDialog_GetPageSetupData. Expected _wxPageSetupDialog_p."); - return NULL; - } - } - wxPageSetupData & _result_ref = wxPageSetupDialog_GetPageSetupData(_arg0); - _result = (wxPageSetupData *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPageSetupData_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPageSetupDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) -static PyObject *_wrap_wxPageSetupDialog_ShowModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPageSetupDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPageSetupDialog_ShowModal",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPageSetupDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupDialog_ShowModal. Expected _wxPageSetupDialog_p."); - return NULL; - } - } - _result = (int )wxPageSetupDialog_ShowModal(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define new_wxPrintData() (new wxPrintData()) -static PyObject *_wrap_new_wxPrintData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPrintData * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxPrintData")) - return NULL; - _result = (wxPrintData *)new_wxPrintData(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPrintData_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxPrintData(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxPrintData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPrintData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxPrintData",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPrintData. Expected _wxPrintData_p."); - return NULL; - } - } - delete_wxPrintData(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPrintData_EnableHelp(_swigobj,_swigarg0) (_swigobj->EnableHelp(_swigarg0)) -static PyObject *_wrap_wxPrintData_EnableHelp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPrintData * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPrintData_EnableHelp",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_EnableHelp. Expected _wxPrintData_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxPrintData_EnableHelp(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPrintData_EnablePageNumbers(_swigobj,_swigarg0) (_swigobj->EnablePageNumbers(_swigarg0)) -static PyObject *_wrap_wxPrintData_EnablePageNumbers(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPrintData * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPrintData_EnablePageNumbers",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_EnablePageNumbers. Expected _wxPrintData_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxPrintData_EnablePageNumbers(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPrintData_EnablePrintToFile(_swigobj,_swigarg0) (_swigobj->EnablePrintToFile(_swigarg0)) -static PyObject *_wrap_wxPrintData_EnablePrintToFile(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPrintData * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPrintData_EnablePrintToFile",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_EnablePrintToFile. Expected _wxPrintData_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxPrintData_EnablePrintToFile(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPrintData_EnableSelection(_swigobj,_swigarg0) (_swigobj->EnableSelection(_swigarg0)) -static PyObject *_wrap_wxPrintData_EnableSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPrintData * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPrintData_EnableSelection",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_EnableSelection. Expected _wxPrintData_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxPrintData_EnableSelection(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPrintData_GetAllPages(_swigobj) (_swigobj->GetAllPages()) -static PyObject *_wrap_wxPrintData_GetAllPages(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPrintData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPrintData_GetAllPages",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_GetAllPages. Expected _wxPrintData_p."); - return NULL; - } - } - _result = (bool )wxPrintData_GetAllPages(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPrintData_GetCollate(_swigobj) (_swigobj->GetCollate()) -static PyObject *_wrap_wxPrintData_GetCollate(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPrintData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPrintData_GetCollate",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_GetCollate. Expected _wxPrintData_p."); - return NULL; - } - } - _result = (bool )wxPrintData_GetCollate(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPrintData_GetFromPage(_swigobj) (_swigobj->GetFromPage()) -static PyObject *_wrap_wxPrintData_GetFromPage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPrintData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPrintData_GetFromPage",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_GetFromPage. Expected _wxPrintData_p."); - return NULL; - } - } - _result = (int )wxPrintData_GetFromPage(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPrintData_GetMaxPage(_swigobj) (_swigobj->GetMaxPage()) -static PyObject *_wrap_wxPrintData_GetMaxPage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPrintData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPrintData_GetMaxPage",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_GetMaxPage. Expected _wxPrintData_p."); - return NULL; - } - } - _result = (int )wxPrintData_GetMaxPage(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPrintData_GetMinPage(_swigobj) (_swigobj->GetMinPage()) -static PyObject *_wrap_wxPrintData_GetMinPage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPrintData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPrintData_GetMinPage",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_GetMinPage. Expected _wxPrintData_p."); - return NULL; - } - } - _result = (int )wxPrintData_GetMinPage(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPrintData_GetNoCopies(_swigobj) (_swigobj->GetNoCopies()) -static PyObject *_wrap_wxPrintData_GetNoCopies(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPrintData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPrintData_GetNoCopies",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_GetNoCopies. Expected _wxPrintData_p."); - return NULL; - } - } - _result = (int )wxPrintData_GetNoCopies(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPrintData_GetOrientation(_swigobj) (_swigobj->GetOrientation()) -static PyObject *_wrap_wxPrintData_GetOrientation(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPrintData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPrintData_GetOrientation",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_GetOrientation. Expected _wxPrintData_p."); - return NULL; - } - } - _result = (int )wxPrintData_GetOrientation(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPrintData_GetToPage(_swigobj) (_swigobj->GetToPage()) -static PyObject *_wrap_wxPrintData_GetToPage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPrintData * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPrintData_GetToPage",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_GetToPage. Expected _wxPrintData_p."); - return NULL; - } - } - _result = (int )wxPrintData_GetToPage(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPrintData_SetCollate(_swigobj,_swigarg0) (_swigobj->SetCollate(_swigarg0)) -static PyObject *_wrap_wxPrintData_SetCollate(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPrintData * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPrintData_SetCollate",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_SetCollate. Expected _wxPrintData_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxPrintData_SetCollate(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPrintData_SetFromPage(_swigobj,_swigarg0) (_swigobj->SetFromPage(_swigarg0)) -static PyObject *_wrap_wxPrintData_SetFromPage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPrintData * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPrintData_SetFromPage",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_SetFromPage. Expected _wxPrintData_p."); - return NULL; - } - } - wxPrintData_SetFromPage(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPrintData_SetMaxPage(_swigobj,_swigarg0) (_swigobj->SetMaxPage(_swigarg0)) -static PyObject *_wrap_wxPrintData_SetMaxPage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPrintData * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPrintData_SetMaxPage",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_SetMaxPage. Expected _wxPrintData_p."); - return NULL; - } - } - wxPrintData_SetMaxPage(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPrintData_SetMinPage(_swigobj,_swigarg0) (_swigobj->SetMinPage(_swigarg0)) -static PyObject *_wrap_wxPrintData_SetMinPage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPrintData * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPrintData_SetMinPage",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_SetMinPage. Expected _wxPrintData_p."); - return NULL; - } - } - wxPrintData_SetMinPage(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPrintData_SetOrientation(_swigobj,_swigarg0) (_swigobj->SetOrientation(_swigarg0)) -static PyObject *_wrap_wxPrintData_SetOrientation(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPrintData * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPrintData_SetOrientation",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_SetOrientation. Expected _wxPrintData_p."); - return NULL; - } - } - wxPrintData_SetOrientation(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPrintData_SetNoCopies(_swigobj,_swigarg0) (_swigobj->SetNoCopies(_swigarg0)) -static PyObject *_wrap_wxPrintData_SetNoCopies(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPrintData * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPrintData_SetNoCopies",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_SetNoCopies. Expected _wxPrintData_p."); - return NULL; - } - } - wxPrintData_SetNoCopies(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPrintData_SetPrintToFile(_swigobj,_swigarg0) (_swigobj->SetPrintToFile(_swigarg0)) -static PyObject *_wrap_wxPrintData_SetPrintToFile(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPrintData * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPrintData_SetPrintToFile",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_SetPrintToFile. Expected _wxPrintData_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxPrintData_SetPrintToFile(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPrintData_SetSetupDialog(_swigobj,_swigarg0) (_swigobj->SetSetupDialog(_swigarg0)) -static PyObject *_wrap_wxPrintData_SetSetupDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPrintData * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPrintData_SetSetupDialog",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_SetSetupDialog. Expected _wxPrintData_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxPrintData_SetSetupDialog(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPrintData_SetToPage(_swigobj,_swigarg0) (_swigobj->SetToPage(_swigarg0)) -static PyObject *_wrap_wxPrintData_SetToPage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPrintData * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPrintData_SetToPage",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_SetToPage. Expected _wxPrintData_p."); - return NULL; - } - } - wxPrintData_SetToPage(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxPrintDialogTowxDialog(void *ptr) { - wxPrintDialog *src; - wxDialog *dest; - src = (wxPrintDialog *) ptr; - dest = (wxDialog *) src; - return (void *) dest; -} - -static void *SwigwxPrintDialogTowxPanel(void *ptr) { - wxPrintDialog *src; - wxPanel *dest; - src = (wxPrintDialog *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxPrintDialogTowxWindow(void *ptr) { - wxPrintDialog *src; - wxWindow *dest; - src = (wxPrintDialog *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxPrintDialogTowxEvtHandler(void *ptr) { - wxPrintDialog *src; - wxEvtHandler *dest; - src = (wxPrintDialog *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxPrintDialog(_swigarg0,_swigarg1) (new wxPrintDialog(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxPrintDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPrintDialog * _result; - wxWindow * _arg0; - wxPrintData * _arg1 = NULL; - char * _argc0 = 0; - char * _argc1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|s:new_wxPrintDialog",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPrintDialog. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPrintData_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxPrintDialog. Expected _wxPrintData_p."); - return NULL; - } - } - _result = (wxPrintDialog *)new_wxPrintDialog(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPrintDialog_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPrintDialog_GetPrintData(_swigobj) (_swigobj->GetPrintData()) -static PyObject *_wrap_wxPrintDialog_GetPrintData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPrintData * _result; - wxPrintDialog * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPrintDialog_GetPrintData",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintDialog_GetPrintData. Expected _wxPrintDialog_p."); - return NULL; - } - } - wxPrintData & _result_ref = wxPrintDialog_GetPrintData(_arg0); - _result = (wxPrintData *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPrintData_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPrintDialog_GetPrintDC(_swigobj) (_swigobj->GetPrintDC()) -static PyObject *_wrap_wxPrintDialog_GetPrintDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _result; - wxPrintDialog * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPrintDialog_GetPrintDC",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintDialog_GetPrintDC. Expected _wxPrintDialog_p."); - return NULL; - } - } - _result = (wxDC *)wxPrintDialog_GetPrintDC(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPrintDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) -static PyObject *_wrap_wxPrintDialog_ShowModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPrintDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPrintDialog_ShowModal",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPrintDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintDialog_ShowModal. Expected _wxPrintDialog_p."); - return NULL; - } - } - _result = (int )wxPrintDialog_ShowModal(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxMessageDialogTowxDialog(void *ptr) { - wxMessageDialog *src; - wxDialog *dest; - src = (wxMessageDialog *) ptr; - dest = (wxDialog *) src; - return (void *) dest; -} - -static void *SwigwxMessageDialogTowxPanel(void *ptr) { - wxMessageDialog *src; - wxPanel *dest; - src = (wxMessageDialog *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxMessageDialogTowxWindow(void *ptr) { - wxMessageDialog *src; - wxWindow *dest; - src = (wxMessageDialog *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxMessageDialogTowxEvtHandler(void *ptr) { - wxMessageDialog *src; - wxEvtHandler *dest; - src = (wxMessageDialog *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxMessageDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxMessageDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_new_wxMessageDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMessageDialog * _result; - wxWindow * _arg0; - char * _arg1; - char * _arg2 = "Message box"; - long _arg3 = (wxOK)|(wxCANCEL)|(wxCENTRE); - wxPoint * _arg4 = &wxPyDefaultPosition; - char * _argc0 = 0; - char * _argc4 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"ss|sls:new_wxMessageDialog",&_argc0,&_arg1,&_arg2,&_arg3,&_argc4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxMessageDialog. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxMessageDialog. Expected _wxPoint_p."); - return NULL; - } - } - _result = (wxMessageDialog *)new_wxMessageDialog(_arg0,_arg1,_arg2,_arg3,*_arg4); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMessageDialog_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMessageDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) -static PyObject *_wrap_wxMessageDialog_ShowModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxMessageDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMessageDialog_ShowModal",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMessageDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMessageDialog_ShowModal. Expected _wxMessageDialog_p."); - return NULL; - } - } - _result = (int )wxMessageDialog_ShowModal(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyMethodDef cmndlgscMethods[] = { - { "wxMessageDialog_ShowModal", _wrap_wxMessageDialog_ShowModal, 1 }, - { "new_wxMessageDialog", _wrap_new_wxMessageDialog, 1 }, - { "wxPrintDialog_ShowModal", _wrap_wxPrintDialog_ShowModal, 1 }, - { "wxPrintDialog_GetPrintDC", _wrap_wxPrintDialog_GetPrintDC, 1 }, - { "wxPrintDialog_GetPrintData", _wrap_wxPrintDialog_GetPrintData, 1 }, - { "new_wxPrintDialog", _wrap_new_wxPrintDialog, 1 }, - { "wxPrintData_SetToPage", _wrap_wxPrintData_SetToPage, 1 }, - { "wxPrintData_SetSetupDialog", _wrap_wxPrintData_SetSetupDialog, 1 }, - { "wxPrintData_SetPrintToFile", _wrap_wxPrintData_SetPrintToFile, 1 }, - { "wxPrintData_SetNoCopies", _wrap_wxPrintData_SetNoCopies, 1 }, - { "wxPrintData_SetOrientation", _wrap_wxPrintData_SetOrientation, 1 }, - { "wxPrintData_SetMinPage", _wrap_wxPrintData_SetMinPage, 1 }, - { "wxPrintData_SetMaxPage", _wrap_wxPrintData_SetMaxPage, 1 }, - { "wxPrintData_SetFromPage", _wrap_wxPrintData_SetFromPage, 1 }, - { "wxPrintData_SetCollate", _wrap_wxPrintData_SetCollate, 1 }, - { "wxPrintData_GetToPage", _wrap_wxPrintData_GetToPage, 1 }, - { "wxPrintData_GetOrientation", _wrap_wxPrintData_GetOrientation, 1 }, - { "wxPrintData_GetNoCopies", _wrap_wxPrintData_GetNoCopies, 1 }, - { "wxPrintData_GetMinPage", _wrap_wxPrintData_GetMinPage, 1 }, - { "wxPrintData_GetMaxPage", _wrap_wxPrintData_GetMaxPage, 1 }, - { "wxPrintData_GetFromPage", _wrap_wxPrintData_GetFromPage, 1 }, - { "wxPrintData_GetCollate", _wrap_wxPrintData_GetCollate, 1 }, - { "wxPrintData_GetAllPages", _wrap_wxPrintData_GetAllPages, 1 }, - { "wxPrintData_EnableSelection", _wrap_wxPrintData_EnableSelection, 1 }, - { "wxPrintData_EnablePrintToFile", _wrap_wxPrintData_EnablePrintToFile, 1 }, - { "wxPrintData_EnablePageNumbers", _wrap_wxPrintData_EnablePageNumbers, 1 }, - { "wxPrintData_EnableHelp", _wrap_wxPrintData_EnableHelp, 1 }, - { "delete_wxPrintData", _wrap_delete_wxPrintData, 1 }, - { "new_wxPrintData", _wrap_new_wxPrintData, 1 }, - { "wxPageSetupDialog_ShowModal", _wrap_wxPageSetupDialog_ShowModal, 1 }, - { "wxPageSetupDialog_GetPageSetupData", _wrap_wxPageSetupDialog_GetPageSetupData, 1 }, - { "new_wxPageSetupDialog", _wrap_new_wxPageSetupDialog, 1 }, - { "wxPageSetupData_SetDefaultInfo", _wrap_wxPageSetupData_SetDefaultInfo, 1 }, - { "wxPageSetupData_SetDefaultMinMargins", _wrap_wxPageSetupData_SetDefaultMinMargins, 1 }, - { "wxPageSetupData_SetOrientation", _wrap_wxPageSetupData_SetOrientation, 1 }, - { "wxPageSetupData_SetMinMarginBottomRight", _wrap_wxPageSetupData_SetMinMarginBottomRight, 1 }, - { "wxPageSetupData_SetMinMarginTopLeft", _wrap_wxPageSetupData_SetMinMarginTopLeft, 1 }, - { "wxPageSetupData_SetMarginBottomRight", _wrap_wxPageSetupData_SetMarginBottomRight, 1 }, - { "wxPageSetupData_SetMarginTopLeft", _wrap_wxPageSetupData_SetMarginTopLeft, 1 }, - { "wxPageSetupData_SetPaperSize", _wrap_wxPageSetupData_SetPaperSize, 1 }, - { "wxPageSetupData_GetDefaultInfo", _wrap_wxPageSetupData_GetDefaultInfo, 1 }, - { "wxPageSetupData_GetEnableHelp", _wrap_wxPageSetupData_GetEnableHelp, 1 }, - { "wxPageSetupData_GetEnablePrinter", _wrap_wxPageSetupData_GetEnablePrinter, 1 }, - { "wxPageSetupData_GetEnablePaper", _wrap_wxPageSetupData_GetEnablePaper, 1 }, - { "wxPageSetupData_GetEnableOrientation", _wrap_wxPageSetupData_GetEnableOrientation, 1 }, - { "wxPageSetupData_GetEnableMargins", _wrap_wxPageSetupData_GetEnableMargins, 1 }, - { "wxPageSetupData_GetDefaultMinMargins", _wrap_wxPageSetupData_GetDefaultMinMargins, 1 }, - { "wxPageSetupData_GetOrientation", _wrap_wxPageSetupData_GetOrientation, 1 }, - { "wxPageSetupData_GetMinMarginBottomRight", _wrap_wxPageSetupData_GetMinMarginBottomRight, 1 }, - { "wxPageSetupData_GetMinMarginTopLeft", _wrap_wxPageSetupData_GetMinMarginTopLeft, 1 }, - { "wxPageSetupData_GetMarginBottomRight", _wrap_wxPageSetupData_GetMarginBottomRight, 1 }, - { "wxPageSetupData_GetMarginTopLeft", _wrap_wxPageSetupData_GetMarginTopLeft, 1 }, - { "wxPageSetupData_GetPaperSize", _wrap_wxPageSetupData_GetPaperSize, 1 }, - { "wxPageSetupData_EnablePrinter", _wrap_wxPageSetupData_EnablePrinter, 1 }, - { "wxPageSetupData_EnablePaper", _wrap_wxPageSetupData_EnablePaper, 1 }, - { "wxPageSetupData_EnableOrientation", _wrap_wxPageSetupData_EnableOrientation, 1 }, - { "wxPageSetupData_EnableMargins", _wrap_wxPageSetupData_EnableMargins, 1 }, - { "wxPageSetupData_EnableHelp", _wrap_wxPageSetupData_EnableHelp, 1 }, - { "delete_wxPageSetupData", _wrap_delete_wxPageSetupData, 1 }, - { "new_wxPageSetupData", _wrap_new_wxPageSetupData, 1 }, - { "wxFontDialog_ShowModal", _wrap_wxFontDialog_ShowModal, 1 }, - { "wxFontDialog_GetFontData", _wrap_wxFontDialog_GetFontData, 1 }, - { "new_wxFontDialog", _wrap_new_wxFontDialog, 1 }, - { "wxFontData_SetShowHelp", _wrap_wxFontData_SetShowHelp, 1 }, - { "wxFontData_SetRange", _wrap_wxFontData_SetRange, 1 }, - { "wxFontData_SetInitialFont", _wrap_wxFontData_SetInitialFont, 1 }, - { "wxFontData_SetColour", _wrap_wxFontData_SetColour, 1 }, - { "wxFontData_SetChosenFont", _wrap_wxFontData_SetChosenFont, 1 }, - { "wxFontData_SetAllowSymbols", _wrap_wxFontData_SetAllowSymbols, 1 }, - { "wxFontData_GetShowHelp", _wrap_wxFontData_GetShowHelp, 1 }, - { "wxFontData_GetInitialFont", _wrap_wxFontData_GetInitialFont, 1 }, - { "wxFontData_GetEnableEffects", _wrap_wxFontData_GetEnableEffects, 1 }, - { "wxFontData_GetChosenFont", _wrap_wxFontData_GetChosenFont, 1 }, - { "wxFontData_GetColour", _wrap_wxFontData_GetColour, 1 }, - { "wxFontData_GetAllowSymbols", _wrap_wxFontData_GetAllowSymbols, 1 }, - { "wxFontData_EnableEffects", _wrap_wxFontData_EnableEffects, 1 }, - { "delete_wxFontData", _wrap_delete_wxFontData, 1 }, - { "new_wxFontData", _wrap_new_wxFontData, 1 }, - { "wxTextEntryDialog_ShowModal", _wrap_wxTextEntryDialog_ShowModal, 1 }, - { "wxTextEntryDialog_SetValue", _wrap_wxTextEntryDialog_SetValue, 1 }, - { "wxTextEntryDialog_GetValue", _wrap_wxTextEntryDialog_GetValue, 1 }, - { "new_wxTextEntryDialog", _wrap_new_wxTextEntryDialog, 1 }, - { "wxSingleChoiceDialog_ShowModal", _wrap_wxSingleChoiceDialog_ShowModal, 1 }, - { "wxSingleChoiceDialog_SetSelection", _wrap_wxSingleChoiceDialog_SetSelection, 1 }, - { "wxSingleChoiceDialog_GetStringSelection", _wrap_wxSingleChoiceDialog_GetStringSelection, 1 }, - { "wxSingleChoiceDialog_GetSelection", _wrap_wxSingleChoiceDialog_GetSelection, 1 }, - { "new_wxSingleChoiceDialog", _wrap_new_wxSingleChoiceDialog, 1 }, - { "wxFileDialog_ShowModal", _wrap_wxFileDialog_ShowModal, 1 }, - { "wxFileDialog_SetWildcard", _wrap_wxFileDialog_SetWildcard, 1 }, - { "wxFileDialog_SetStyle", _wrap_wxFileDialog_SetStyle, 1 }, - { "wxFileDialog_SetPath", _wrap_wxFileDialog_SetPath, 1 }, - { "wxFileDialog_SetMessage", _wrap_wxFileDialog_SetMessage, 1 }, - { "wxFileDialog_SetFilterIndex", _wrap_wxFileDialog_SetFilterIndex, 1 }, - { "wxFileDialog_SetFilename", _wrap_wxFileDialog_SetFilename, 1 }, - { "wxFileDialog_SetDirectory", _wrap_wxFileDialog_SetDirectory, 1 }, - { "wxFileDialog_GetWildcard", _wrap_wxFileDialog_GetWildcard, 1 }, - { "wxFileDialog_GetStyle", _wrap_wxFileDialog_GetStyle, 1 }, - { "wxFileDialog_GetPath", _wrap_wxFileDialog_GetPath, 1 }, - { "wxFileDialog_GetMessage", _wrap_wxFileDialog_GetMessage, 1 }, - { "wxFileDialog_GetFilterIndex", _wrap_wxFileDialog_GetFilterIndex, 1 }, - { "wxFileDialog_GetFilename", _wrap_wxFileDialog_GetFilename, 1 }, - { "wxFileDialog_GetDirectory", _wrap_wxFileDialog_GetDirectory, 1 }, - { "new_wxFileDialog", _wrap_new_wxFileDialog, 1 }, - { "wxDirDialog_ShowModal", _wrap_wxDirDialog_ShowModal, 1 }, - { "wxDirDialog_SetPath", _wrap_wxDirDialog_SetPath, 1 }, - { "wxDirDialog_SetMessage", _wrap_wxDirDialog_SetMessage, 1 }, - { "wxDirDialog_GetStyle", _wrap_wxDirDialog_GetStyle, 1 }, - { "wxDirDialog_GetMessage", _wrap_wxDirDialog_GetMessage, 1 }, - { "wxDirDialog_GetPath", _wrap_wxDirDialog_GetPath, 1 }, - { "new_wxDirDialog", _wrap_new_wxDirDialog, 1 }, - { "wxColourDialog_ShowModal", _wrap_wxColourDialog_ShowModal, 1 }, - { "wxColourDialog_GetColourData", _wrap_wxColourDialog_GetColourData, 1 }, - { "new_wxColourDialog", _wrap_new_wxColourDialog, 1 }, - { "wxColourData_SetCustomColour", _wrap_wxColourData_SetCustomColour, 1 }, - { "wxColourData_SetColour", _wrap_wxColourData_SetColour, 1 }, - { "wxColourData_SetChooseFull", _wrap_wxColourData_SetChooseFull, 1 }, - { "wxColourData_GetCustomColour", _wrap_wxColourData_GetCustomColour, 1 }, - { "wxColourData_GetColour", _wrap_wxColourData_GetColour, 1 }, - { "wxColourData_GetChooseFull", _wrap_wxColourData_GetChooseFull, 1 }, - { "delete_wxColourData", _wrap_delete_wxColourData, 1 }, - { "new_wxColourData", _wrap_new_wxColourData, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initcmndlgsc)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("cmndlgsc", cmndlgscMethods); - d = PyModule_GetDict(m); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_wxAcceleratorTable","_class_wxAcceleratorTable",0); - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_wxFontData","_class_wxFontData",0); - SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMessageDialog",SwigwxMessageDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxMessageDialog",SwigwxMessageDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxPrintDialog",SwigwxPrintDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxPrintDialog",SwigwxPrintDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxPageSetupDialog",SwigwxPageSetupDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxFontDialog",SwigwxFontDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxFontDialog",SwigwxFontDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxTextEntryDialog",SwigwxTextEntryDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxTextEntryDialog",SwigwxTextEntryDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxFileDialog",SwigwxFileDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxFileDialog",SwigwxFileDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxDirDialog",SwigwxDirDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxDirDialog",SwigwxDirDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxColourDialog",SwigwxColourDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxColourDialog",SwigwxColourDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxEvtHandler",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); - SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPageSetupData","_class_wxPageSetupData",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); - SWIG_RegisterMapping("_class_wxColourData","_wxColourData",0); - SWIG_RegisterMapping("_wxPen","_class_wxPen",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_long","_wxDash",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_class_wxAcceleratorTable","_wxAcceleratorTable",0); - SWIG_RegisterMapping("_wxDC","_class_wxDC",0); - SWIG_RegisterMapping("_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_wxPrinterDC","_class_wxPrinterDC",0); - SWIG_RegisterMapping("_class_wxMenuItem","_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxPanel","_class_wxMessageDialog",SwigwxMessageDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_wxMessageDialog",SwigwxMessageDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_class_wxPrintDialog",SwigwxPrintDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_wxPrintDialog",SwigwxPrintDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_wxPageSetupDialog",SwigwxPageSetupDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_class_wxFontDialog",SwigwxFontDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_wxFontDialog",SwigwxFontDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_class_wxTextEntryDialog",SwigwxTextEntryDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_wxTextEntryDialog",SwigwxTextEntryDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_class_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_class_wxFileDialog",SwigwxFileDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_wxFileDialog",SwigwxFileDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_class_wxDirDialog",SwigwxDirDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_wxDirDialog",SwigwxDirDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_class_wxColourDialog",SwigwxColourDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_wxColourDialog",SwigwxColourDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_class_wxPanel",0); - SWIG_RegisterMapping("_class_wxMask","_wxMask",0); - SWIG_RegisterMapping("_class_wxPageSetupData","_wxPageSetupData",0); - SWIG_RegisterMapping("_wxColour","_class_wxColour",0); - SWIG_RegisterMapping("_class_wxDialog","_class_wxMessageDialog",SwigwxMessageDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_wxMessageDialog",SwigwxMessageDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_class_wxPrintDialog",SwigwxPrintDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_wxPrintDialog",SwigwxPrintDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_wxPageSetupDialog",SwigwxPageSetupDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_class_wxFontDialog",SwigwxFontDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_wxFontDialog",SwigwxFontDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_class_wxTextEntryDialog",SwigwxTextEntryDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_wxTextEntryDialog",SwigwxTextEntryDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_class_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_class_wxFileDialog",SwigwxFileDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_wxFileDialog",SwigwxFileDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_class_wxDirDialog",SwigwxDirDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_wxDirDialog",SwigwxDirDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_class_wxColourDialog",SwigwxColourDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_wxColourDialog",SwigwxColourDialogTowxDialog); - SWIG_RegisterMapping("_class_wxDialog","_wxDialog",0); - SWIG_RegisterMapping("_wxPageSetupDialog","_class_wxPageSetupDialog",0); - SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); - SWIG_RegisterMapping("_wxMiniFrame","_class_wxMiniFrame",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_class_wxFontData","_wxFontData",0); - SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); - SWIG_RegisterMapping("_wxPrintDialog","_class_wxPrintDialog",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_wxColourDialog","_class_wxColourDialog",0); - SWIG_RegisterMapping("_wxPrintData","_class_wxPrintData",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxMessageDialog","_class_wxMessageDialog",0); - SWIG_RegisterMapping("_wxTextEntryDialog","_class_wxTextEntryDialog",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_wxFont","_class_wxFont",0); - SWIG_RegisterMapping("_unsigned_long","_wxDash",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxDC","_wxDC",0); - SWIG_RegisterMapping("_class_wxDirDialog","_wxDirDialog",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_wxAcceleratorEntry","_class_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_class_wxPanel","_class_wxMessageDialog",SwigwxMessageDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxMessageDialog",SwigwxMessageDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_class_wxPrintDialog",SwigwxPrintDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxPrintDialog",SwigwxPrintDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxPageSetupDialog",SwigwxPageSetupDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_class_wxFontDialog",SwigwxFontDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxFontDialog",SwigwxFontDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_class_wxTextEntryDialog",SwigwxTextEntryDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxTextEntryDialog",SwigwxTextEntryDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_class_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_class_wxFileDialog",SwigwxFileDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxFileDialog",SwigwxFileDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_class_wxDirDialog",SwigwxDirDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxDirDialog",SwigwxDirDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_class_wxColourDialog",SwigwxColourDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxColourDialog",SwigwxColourDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxPanel",0); - SWIG_RegisterMapping("_class_wxMessageDialog","_wxMessageDialog",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxMetaFileDC","_class_wxMetaFileDC",0); - SWIG_RegisterMapping("_wxMenu","_class_wxMenu",0); - SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_wxFileDialog","_class_wxFileDialog",0); - SWIG_RegisterMapping("_class_wxBrush","_wxBrush",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxWindow","_class_wxMessageDialog",SwigwxMessageDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxMessageDialog",SwigwxMessageDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxPrintDialog",SwigwxPrintDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxPrintDialog",SwigwxPrintDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxPageSetupDialog",SwigwxPageSetupDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxFontDialog",SwigwxFontDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxFontDialog",SwigwxFontDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxTextEntryDialog",SwigwxTextEntryDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxTextEntryDialog",SwigwxTextEntryDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxFileDialog",SwigwxFileDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxFileDialog",SwigwxFileDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxDirDialog",SwigwxDirDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxDirDialog",SwigwxDirDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxColourDialog",SwigwxColourDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxColourDialog",SwigwxColourDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxWindow",0); - SWIG_RegisterMapping("_class_wxFont","_wxFont",0); - SWIG_RegisterMapping("_wxClientDC","_class_wxClientDC",0); - SWIG_RegisterMapping("_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_wxMemoryDC","_class_wxMemoryDC",0); - SWIG_RegisterMapping("_class_wxPrintDialog","_wxPrintDialog",0); - SWIG_RegisterMapping("_wxPaintDC","_class_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxAcceleratorEntry","_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); - SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_class_wxMetaFileDC","_wxMetaFileDC",0); - SWIG_RegisterMapping("_class_wxMenu","_wxMenu",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); - SWIG_RegisterMapping("_wxDialog","_class_wxMessageDialog",SwigwxMessageDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_wxMessageDialog",SwigwxMessageDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_class_wxPrintDialog",SwigwxPrintDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_wxPrintDialog",SwigwxPrintDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_wxPageSetupDialog",SwigwxPageSetupDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_class_wxFontDialog",SwigwxFontDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_wxFontDialog",SwigwxFontDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_class_wxTextEntryDialog",SwigwxTextEntryDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_wxTextEntryDialog",SwigwxTextEntryDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_class_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_class_wxFileDialog",SwigwxFileDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_wxFileDialog",SwigwxFileDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_class_wxDirDialog",SwigwxDirDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_wxDirDialog",SwigwxDirDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_class_wxColourDialog",SwigwxColourDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_wxColourDialog",SwigwxColourDialogTowxDialog); - SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); - SWIG_RegisterMapping("_class_wxPen","_wxPen",0); - SWIG_RegisterMapping("_class_wxFileDialog","_wxFileDialog",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_wxFrame","_class_wxFrame",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxPrinterDC","_wxPrinterDC",0); - SWIG_RegisterMapping("_class_wxPaintDC","_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_class_wxIcon","_wxIcon",0); - SWIG_RegisterMapping("_class_wxColour","_wxColour",0); - SWIG_RegisterMapping("_class_wxScreenDC","_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxPageSetupDialog","_wxPageSetupDialog",0); - SWIG_RegisterMapping("_class_wxMiniFrame","_wxMiniFrame",0); - SWIG_RegisterMapping("_wxFontDialog","_class_wxFontDialog",0); - SWIG_RegisterMapping("_class_wxClientDC","_wxClientDC",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); - SWIG_RegisterMapping("_class_wxBitmap","_wxBitmap",0); - SWIG_RegisterMapping("_class_wxMemoryDC","_wxMemoryDC",0); - SWIG_RegisterMapping("_wxMenuBar","_class_wxMenuBar",0); - SWIG_RegisterMapping("_wxDirDialog","_class_wxDirDialog",0); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxMessageDialog",SwigwxMessageDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxMessageDialog",SwigwxMessageDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxPrintDialog",SwigwxPrintDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxPrintDialog",SwigwxPrintDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxPageSetupDialog",SwigwxPageSetupDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxFontDialog",SwigwxFontDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxFontDialog",SwigwxFontDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxTextEntryDialog",SwigwxTextEntryDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxTextEntryDialog",SwigwxTextEntryDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxFileDialog",SwigwxFileDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxFileDialog",SwigwxFileDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxDirDialog",SwigwxDirDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxDirDialog",SwigwxDirDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxColourDialog",SwigwxColourDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxColourDialog",SwigwxColourDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxEvtHandler",0); - SWIG_RegisterMapping("_wxMenuItem","_class_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxColourDialog","_wxColourDialog",0); - SWIG_RegisterMapping("_class_wxPrintData","_wxPrintData",0); - SWIG_RegisterMapping("_wxDash","_unsigned_long",0); - SWIG_RegisterMapping("_wxDash","_long",0); - SWIG_RegisterMapping("_class_wxScrolledWindow","_wxScrolledWindow",0); - SWIG_RegisterMapping("_class_wxTextEntryDialog","_wxTextEntryDialog",0); - SWIG_RegisterMapping("_wxColourData","_class_wxColourData",0); - SWIG_RegisterMapping("_class_wxFontDialog","_wxFontDialog",0); - SWIG_RegisterMapping("_wxWindow","_class_wxMessageDialog",SwigwxMessageDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxMessageDialog",SwigwxMessageDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxPrintDialog",SwigwxPrintDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxPrintDialog",SwigwxPrintDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxPageSetupDialog",SwigwxPageSetupDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxFontDialog",SwigwxFontDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxFontDialog",SwigwxFontDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxTextEntryDialog",SwigwxTextEntryDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxTextEntryDialog",SwigwxTextEntryDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxSingleChoiceDialog",SwigwxSingleChoiceDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxFileDialog",SwigwxFileDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxFileDialog",SwigwxFileDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxDirDialog",SwigwxDirDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxDirDialog",SwigwxDirDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxColourDialog",SwigwxColourDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxColourDialog",SwigwxColourDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxWindow",0); - SWIG_RegisterMapping("_class_wxFrame","_wxFrame",0); -} diff --git a/utils/wxPython/src/msw/cmndlgs.py b/utils/wxPython/src/msw/cmndlgs.py deleted file mode 100644 index 32be47b45c..0000000000 --- a/utils/wxPython/src/msw/cmndlgs.py +++ /dev/null @@ -1,581 +0,0 @@ -# This file was created automatically by SWIG. -import cmndlgsc - -from misc import * - -from gdi import * - -from windows import * -class wxColourDataPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - cmndlgsc.delete_wxColourData(self.this) - def GetChooseFull(self): - val = cmndlgsc.wxColourData_GetChooseFull(self.this) - return val - def GetColour(self): - val = cmndlgsc.wxColourData_GetColour(self.this) - val = wxColourPtr(val) - return val - def GetCustomColour(self,arg0): - val = cmndlgsc.wxColourData_GetCustomColour(self.this,arg0) - val = wxColourPtr(val) - val.thisown = 1 - return val - def SetChooseFull(self,arg0): - val = cmndlgsc.wxColourData_SetChooseFull(self.this,arg0) - return val - def SetColour(self,arg0): - val = cmndlgsc.wxColourData_SetColour(self.this,arg0.this) - return val - def SetCustomColour(self,arg0,arg1): - val = cmndlgsc.wxColourData_SetCustomColour(self.this,arg0,arg1.this) - return val - def __repr__(self): - return "" -class wxColourData(wxColourDataPtr): - def __init__(self) : - self.this = cmndlgsc.new_wxColourData() - self.thisown = 1 - - - - -class wxColourDialogPtr(wxDialogPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetColourData(self): - val = cmndlgsc.wxColourDialog_GetColourData(self.this) - val = wxColourDataPtr(val) - return val - def ShowModal(self): - val = cmndlgsc.wxColourDialog_ShowModal(self.this) - return val - def __repr__(self): - return "" -class wxColourDialog(wxColourDialogPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - self.this = apply(cmndlgsc.new_wxColourDialog,(arg0.this,)+args) - self.thisown = 1 - - - - -class wxDirDialogPtr(wxDialogPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetPath(self): - val = cmndlgsc.wxDirDialog_GetPath(self.this) - return val - def GetMessage(self): - val = cmndlgsc.wxDirDialog_GetMessage(self.this) - return val - def GetStyle(self): - val = cmndlgsc.wxDirDialog_GetStyle(self.this) - return val - def SetMessage(self,arg0): - val = cmndlgsc.wxDirDialog_SetMessage(self.this,arg0) - return val - def SetPath(self,arg0): - val = cmndlgsc.wxDirDialog_SetPath(self.this,arg0) - return val - def ShowModal(self): - val = cmndlgsc.wxDirDialog_ShowModal(self.this) - return val - def __repr__(self): - return "" -class wxDirDialog(wxDirDialogPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[3] = argl[3].this - except: pass - args = tuple(argl) - self.this = apply(cmndlgsc.new_wxDirDialog,(arg0.this,)+args) - self.thisown = 1 - - - - -class wxFileDialogPtr(wxDialogPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetDirectory(self): - val = cmndlgsc.wxFileDialog_GetDirectory(self.this) - return val - def GetFilename(self): - val = cmndlgsc.wxFileDialog_GetFilename(self.this) - return val - def GetFilterIndex(self): - val = cmndlgsc.wxFileDialog_GetFilterIndex(self.this) - return val - def GetMessage(self): - val = cmndlgsc.wxFileDialog_GetMessage(self.this) - return val - def GetPath(self): - val = cmndlgsc.wxFileDialog_GetPath(self.this) - return val - def GetStyle(self): - val = cmndlgsc.wxFileDialog_GetStyle(self.this) - return val - def GetWildcard(self): - val = cmndlgsc.wxFileDialog_GetWildcard(self.this) - return val - def SetDirectory(self,arg0): - val = cmndlgsc.wxFileDialog_SetDirectory(self.this,arg0) - return val - def SetFilename(self,arg0): - val = cmndlgsc.wxFileDialog_SetFilename(self.this,arg0) - return val - def SetFilterIndex(self,arg0): - val = cmndlgsc.wxFileDialog_SetFilterIndex(self.this,arg0) - return val - def SetMessage(self,arg0): - val = cmndlgsc.wxFileDialog_SetMessage(self.this,arg0) - return val - def SetPath(self,arg0): - val = cmndlgsc.wxFileDialog_SetPath(self.this,arg0) - return val - def SetStyle(self,arg0): - val = cmndlgsc.wxFileDialog_SetStyle(self.this,arg0) - return val - def SetWildcard(self,arg0): - val = cmndlgsc.wxFileDialog_SetWildcard(self.this,arg0) - return val - def ShowModal(self): - val = cmndlgsc.wxFileDialog_ShowModal(self.this) - return val - def __repr__(self): - return "" -class wxFileDialog(wxFileDialogPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[5] = argl[5].this - except: pass - args = tuple(argl) - self.this = apply(cmndlgsc.new_wxFileDialog,(arg0.this,)+args) - self.thisown = 1 - - - - -class wxSingleChoiceDialogPtr(wxDialogPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetSelection(self): - val = cmndlgsc.wxSingleChoiceDialog_GetSelection(self.this) - return val - def GetStringSelection(self): - val = cmndlgsc.wxSingleChoiceDialog_GetStringSelection(self.this) - return val - def SetSelection(self,arg0): - val = cmndlgsc.wxSingleChoiceDialog_SetSelection(self.this,arg0) - return val - def ShowModal(self): - val = cmndlgsc.wxSingleChoiceDialog_ShowModal(self.this) - return val - def __repr__(self): - return "" -class wxSingleChoiceDialog(wxSingleChoiceDialogPtr): - def __init__(self,arg0,arg1,arg2,arg3,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(cmndlgsc.new_wxSingleChoiceDialog,(arg0.this,arg1,arg2,arg3,)+args) - self.thisown = 1 - - - - -class wxTextEntryDialogPtr(wxDialogPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetValue(self): - val = cmndlgsc.wxTextEntryDialog_GetValue(self.this) - return val - def SetValue(self,arg0): - val = cmndlgsc.wxTextEntryDialog_SetValue(self.this,arg0) - return val - def ShowModal(self): - val = cmndlgsc.wxTextEntryDialog_ShowModal(self.this) - return val - def __repr__(self): - return "" -class wxTextEntryDialog(wxTextEntryDialogPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[3] = argl[3].this - except: pass - args = tuple(argl) - self.this = apply(cmndlgsc.new_wxTextEntryDialog,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - -class wxFontDataPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - cmndlgsc.delete_wxFontData(self.this) - def EnableEffects(self,arg0): - val = cmndlgsc.wxFontData_EnableEffects(self.this,arg0) - return val - def GetAllowSymbols(self): - val = cmndlgsc.wxFontData_GetAllowSymbols(self.this) - return val - def GetColour(self): - val = cmndlgsc.wxFontData_GetColour(self.this) - val = wxColourPtr(val) - return val - def GetChosenFont(self): - val = cmndlgsc.wxFontData_GetChosenFont(self.this) - val = wxFontPtr(val) - val.thisown = 1 - return val - def GetEnableEffects(self): - val = cmndlgsc.wxFontData_GetEnableEffects(self.this) - return val - def GetInitialFont(self): - val = cmndlgsc.wxFontData_GetInitialFont(self.this) - val = wxFontPtr(val) - val.thisown = 1 - return val - def GetShowHelp(self): - val = cmndlgsc.wxFontData_GetShowHelp(self.this) - return val - def SetAllowSymbols(self,arg0): - val = cmndlgsc.wxFontData_SetAllowSymbols(self.this,arg0) - return val - def SetChosenFont(self,arg0): - val = cmndlgsc.wxFontData_SetChosenFont(self.this,arg0.this) - return val - def SetColour(self,arg0): - val = cmndlgsc.wxFontData_SetColour(self.this,arg0.this) - return val - def SetInitialFont(self,arg0): - val = cmndlgsc.wxFontData_SetInitialFont(self.this,arg0.this) - return val - def SetRange(self,arg0,arg1): - val = cmndlgsc.wxFontData_SetRange(self.this,arg0,arg1) - return val - def SetShowHelp(self,arg0): - val = cmndlgsc.wxFontData_SetShowHelp(self.this,arg0) - return val - def __repr__(self): - return "" -class wxFontData(wxFontDataPtr): - def __init__(self) : - self.this = cmndlgsc.new_wxFontData() - self.thisown = 1 - - - - -class wxFontDialogPtr(wxDialogPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetFontData(self): - val = cmndlgsc.wxFontDialog_GetFontData(self.this) - val = wxFontDataPtr(val) - return val - def ShowModal(self): - val = cmndlgsc.wxFontDialog_ShowModal(self.this) - return val - def __repr__(self): - return "" -class wxFontDialog(wxFontDialogPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - self.this = apply(cmndlgsc.new_wxFontDialog,(arg0.this,)+args) - self.thisown = 1 - - - - -class wxPageSetupDataPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - cmndlgsc.delete_wxPageSetupData(self.this) - def EnableHelp(self,arg0): - val = cmndlgsc.wxPageSetupData_EnableHelp(self.this,arg0) - return val - def EnableMargins(self,arg0): - val = cmndlgsc.wxPageSetupData_EnableMargins(self.this,arg0) - return val - def EnableOrientation(self,arg0): - val = cmndlgsc.wxPageSetupData_EnableOrientation(self.this,arg0) - return val - def EnablePaper(self,arg0): - val = cmndlgsc.wxPageSetupData_EnablePaper(self.this,arg0) - return val - def EnablePrinter(self,arg0): - val = cmndlgsc.wxPageSetupData_EnablePrinter(self.this,arg0) - return val - def GetPaperSize(self): - val = cmndlgsc.wxPageSetupData_GetPaperSize(self.this) - val = wxPointPtr(val) - val.thisown = 1 - return val - def GetMarginTopLeft(self): - val = cmndlgsc.wxPageSetupData_GetMarginTopLeft(self.this) - val = wxPointPtr(val) - val.thisown = 1 - return val - def GetMarginBottomRight(self): - val = cmndlgsc.wxPageSetupData_GetMarginBottomRight(self.this) - val = wxPointPtr(val) - val.thisown = 1 - return val - def GetMinMarginTopLeft(self): - val = cmndlgsc.wxPageSetupData_GetMinMarginTopLeft(self.this) - val = wxPointPtr(val) - val.thisown = 1 - return val - def GetMinMarginBottomRight(self): - val = cmndlgsc.wxPageSetupData_GetMinMarginBottomRight(self.this) - val = wxPointPtr(val) - val.thisown = 1 - return val - def GetOrientation(self): - val = cmndlgsc.wxPageSetupData_GetOrientation(self.this) - return val - def GetDefaultMinMargins(self): - val = cmndlgsc.wxPageSetupData_GetDefaultMinMargins(self.this) - return val - def GetEnableMargins(self): - val = cmndlgsc.wxPageSetupData_GetEnableMargins(self.this) - return val - def GetEnableOrientation(self): - val = cmndlgsc.wxPageSetupData_GetEnableOrientation(self.this) - return val - def GetEnablePaper(self): - val = cmndlgsc.wxPageSetupData_GetEnablePaper(self.this) - return val - def GetEnablePrinter(self): - val = cmndlgsc.wxPageSetupData_GetEnablePrinter(self.this) - return val - def GetEnableHelp(self): - val = cmndlgsc.wxPageSetupData_GetEnableHelp(self.this) - return val - def GetDefaultInfo(self): - val = cmndlgsc.wxPageSetupData_GetDefaultInfo(self.this) - return val - def SetPaperSize(self,arg0): - val = cmndlgsc.wxPageSetupData_SetPaperSize(self.this,arg0.this) - return val - def SetMarginTopLeft(self,arg0): - val = cmndlgsc.wxPageSetupData_SetMarginTopLeft(self.this,arg0.this) - return val - def SetMarginBottomRight(self,arg0): - val = cmndlgsc.wxPageSetupData_SetMarginBottomRight(self.this,arg0.this) - return val - def SetMinMarginTopLeft(self,arg0): - val = cmndlgsc.wxPageSetupData_SetMinMarginTopLeft(self.this,arg0.this) - return val - def SetMinMarginBottomRight(self,arg0): - val = cmndlgsc.wxPageSetupData_SetMinMarginBottomRight(self.this,arg0.this) - return val - def SetOrientation(self,arg0): - val = cmndlgsc.wxPageSetupData_SetOrientation(self.this,arg0) - return val - def SetDefaultMinMargins(self,arg0): - val = cmndlgsc.wxPageSetupData_SetDefaultMinMargins(self.this,arg0) - return val - def SetDefaultInfo(self,arg0): - val = cmndlgsc.wxPageSetupData_SetDefaultInfo(self.this,arg0) - return val - def __repr__(self): - return "" -class wxPageSetupData(wxPageSetupDataPtr): - def __init__(self) : - self.this = cmndlgsc.new_wxPageSetupData() - self.thisown = 1 - - - - -class wxPageSetupDialogPtr(wxDialogPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetPageSetupData(self): - val = cmndlgsc.wxPageSetupDialog_GetPageSetupData(self.this) - val = wxPageSetupDataPtr(val) - return val - def ShowModal(self): - val = cmndlgsc.wxPageSetupDialog_ShowModal(self.this) - return val - def __repr__(self): - return "" -class wxPageSetupDialog(wxPageSetupDialogPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - self.this = apply(cmndlgsc.new_wxPageSetupDialog,(arg0.this,)+args) - self.thisown = 1 - - - - -class wxPrintDataPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - cmndlgsc.delete_wxPrintData(self.this) - def EnableHelp(self,arg0): - val = cmndlgsc.wxPrintData_EnableHelp(self.this,arg0) - return val - def EnablePageNumbers(self,arg0): - val = cmndlgsc.wxPrintData_EnablePageNumbers(self.this,arg0) - return val - def EnablePrintToFile(self,arg0): - val = cmndlgsc.wxPrintData_EnablePrintToFile(self.this,arg0) - return val - def EnableSelection(self,arg0): - val = cmndlgsc.wxPrintData_EnableSelection(self.this,arg0) - return val - def GetAllPages(self): - val = cmndlgsc.wxPrintData_GetAllPages(self.this) - return val - def GetCollate(self): - val = cmndlgsc.wxPrintData_GetCollate(self.this) - return val - def GetFromPage(self): - val = cmndlgsc.wxPrintData_GetFromPage(self.this) - return val - def GetMaxPage(self): - val = cmndlgsc.wxPrintData_GetMaxPage(self.this) - return val - def GetMinPage(self): - val = cmndlgsc.wxPrintData_GetMinPage(self.this) - return val - def GetNoCopies(self): - val = cmndlgsc.wxPrintData_GetNoCopies(self.this) - return val - def GetOrientation(self): - val = cmndlgsc.wxPrintData_GetOrientation(self.this) - return val - def GetToPage(self): - val = cmndlgsc.wxPrintData_GetToPage(self.this) - return val - def SetCollate(self,arg0): - val = cmndlgsc.wxPrintData_SetCollate(self.this,arg0) - return val - def SetFromPage(self,arg0): - val = cmndlgsc.wxPrintData_SetFromPage(self.this,arg0) - return val - def SetMaxPage(self,arg0): - val = cmndlgsc.wxPrintData_SetMaxPage(self.this,arg0) - return val - def SetMinPage(self,arg0): - val = cmndlgsc.wxPrintData_SetMinPage(self.this,arg0) - return val - def SetOrientation(self,arg0): - val = cmndlgsc.wxPrintData_SetOrientation(self.this,arg0) - return val - def SetNoCopies(self,arg0): - val = cmndlgsc.wxPrintData_SetNoCopies(self.this,arg0) - return val - def SetPrintToFile(self,arg0): - val = cmndlgsc.wxPrintData_SetPrintToFile(self.this,arg0) - return val - def SetSetupDialog(self,arg0): - val = cmndlgsc.wxPrintData_SetSetupDialog(self.this,arg0) - return val - def SetToPage(self,arg0): - val = cmndlgsc.wxPrintData_SetToPage(self.this,arg0) - return val - def __repr__(self): - return "" -class wxPrintData(wxPrintDataPtr): - def __init__(self) : - self.this = cmndlgsc.new_wxPrintData() - self.thisown = 1 - - - - -class wxPrintDialogPtr(wxDialogPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetPrintData(self): - val = cmndlgsc.wxPrintDialog_GetPrintData(self.this) - val = wxPrintDataPtr(val) - return val - def GetPrintDC(self): - val = cmndlgsc.wxPrintDialog_GetPrintDC(self.this) - val = wxDCPtr(val) - return val - def ShowModal(self): - val = cmndlgsc.wxPrintDialog_ShowModal(self.this) - return val - def __repr__(self): - return "" -class wxPrintDialog(wxPrintDialogPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - self.this = apply(cmndlgsc.new_wxPrintDialog,(arg0.this,)+args) - self.thisown = 1 - - - - -class wxMessageDialogPtr(wxDialogPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def ShowModal(self): - val = cmndlgsc.wxMessageDialog_ShowModal(self.this) - return val - def __repr__(self): - return "" -class wxMessageDialog(wxMessageDialogPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(cmndlgsc.new_wxMessageDialog,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - - - -#-------------- VARIABLE WRAPPERS ------------------ - diff --git a/utils/wxPython/src/msw/controls.cpp b/utils/wxPython/src/msw/controls.cpp deleted file mode 100644 index 2c9f0d51f4..0000000000 --- a/utils/wxPython/src/msw/controls.cpp +++ /dev/null @@ -1,5673 +0,0 @@ -/* - * FILE : msw\controls.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif - -#define SWIG_init initcontrolsc - -#define SWIG_name "controlsc" - -#include "helpers.h" -#include - -#ifdef __WXMSW__ -#include -#endif - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; - -wxValidator wxPyDefaultValidator; // Non-const default because of SWIG -static void *SwigwxControlTowxWindow(void *ptr) { - wxControl *src; - wxWindow *dest; - src = (wxControl *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxControlTowxEvtHandler(void *ptr) { - wxControl *src; - wxEvtHandler *dest; - src = (wxControl *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define wxControl_Command(_swigobj,_swigarg0) (_swigobj->Command(_swigarg0)) -static PyObject *_wrap_wxControl_Command(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxControl * _arg0; - wxCommandEvent * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxControl_Command",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxControl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxControl_Command. Expected _wxControl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxCommandEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxControl_Command. Expected _wxCommandEvent_p."); - return NULL; - } - } - wxControl_Command(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxControl_GetLabel(_swigobj) (_swigobj->GetLabel()) -static PyObject *_wrap_wxControl_GetLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxControl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxControl_GetLabel",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxControl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxControl_GetLabel. Expected _wxControl_p."); - return NULL; - } - } - _result = new wxString (wxControl_GetLabel(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxControl_SetLabel(_swigobj,_swigarg0) (_swigobj->SetLabel(_swigarg0)) -static PyObject *_wrap_wxControl_SetLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxControl * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxControl_SetLabel",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxControl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxControl_SetLabel. Expected _wxControl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxControl_SetLabel(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static void *SwigwxButtonTowxControl(void *ptr) { - wxButton *src; - wxControl *dest; - src = (wxButton *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxButtonTowxWindow(void *ptr) { - wxButton *src; - wxWindow *dest; - src = (wxButton *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxButtonTowxEvtHandler(void *ptr) { - wxButton *src; - wxEvtHandler *dest; - src = (wxButton *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) -static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxButton * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = 0; - wxValidator * _arg6 = &wxPyDefaultValidator; - char * _arg7 = "button"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char * _argc6 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|sslss:new_wxButton",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_arg5,&_argc6,&_arg7)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxButton. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxButton. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxButton. Expected _wxSize_p."); - return NULL; - } - } - if (_argc6) { - if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxButton. Expected _wxValidator_p."); - return NULL; - } - } - _result = (wxButton *)new_wxButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxButton_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxButton_SetDefault(_swigobj) (_swigobj->SetDefault()) -static PyObject *_wrap_wxButton_SetDefault(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxButton * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxButton_SetDefault",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxButton_SetDefault. Expected _wxButton_p."); - return NULL; - } - } - wxButton_SetDefault(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxBitmapButtonTowxButton(void *ptr) { - wxBitmapButton *src; - wxButton *dest; - src = (wxBitmapButton *) ptr; - dest = (wxButton *) src; - return (void *) dest; -} - -static void *SwigwxBitmapButtonTowxControl(void *ptr) { - wxBitmapButton *src; - wxControl *dest; - src = (wxBitmapButton *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxBitmapButtonTowxWindow(void *ptr) { - wxBitmapButton *src; - wxWindow *dest; - src = (wxBitmapButton *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxBitmapButtonTowxEvtHandler(void *ptr) { - wxBitmapButton *src; - wxEvtHandler *dest; - src = (wxBitmapButton *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxBitmapButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxBitmapButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) -static PyObject *_wrap_new_wxBitmapButton(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmapButton * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxBitmap * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = (wxBU_AUTODRAW); - wxValidator * _arg6 = &wxPyDefaultValidator; - char * _arg7 = "button"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char * _argc6 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sis|sslss:new_wxBitmapButton",&_argc0,&_arg1,&_argc2,&_argc3,&_argc4,&_arg5,&_argc6,&_arg7)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBitmapButton. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxBitmapButton. Expected _wxBitmap_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxBitmapButton. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxBitmapButton. Expected _wxSize_p."); - return NULL; - } - } - if (_argc6) { - if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxBitmapButton. Expected _wxValidator_p."); - return NULL; - } - } - _result = (wxBitmapButton *)new_wxBitmapButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmapButton_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxBitmapButton_GetBitmapLabel(_swigobj) (_swigobj->GetBitmapLabel()) -static PyObject *_wrap_wxBitmapButton_GetBitmapLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - wxBitmapButton * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBitmapButton_GetBitmapLabel",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmapButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapButton_GetBitmapLabel. Expected _wxBitmapButton_p."); - return NULL; - } - } - wxBitmap & _result_ref = wxBitmapButton_GetBitmapLabel(_arg0); - _result = (wxBitmap *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxBitmapButton_GetBitmapDisabled(_swigobj) (_swigobj->GetBitmapDisabled()) -static PyObject *_wrap_wxBitmapButton_GetBitmapDisabled(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - wxBitmapButton * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBitmapButton_GetBitmapDisabled",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmapButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapButton_GetBitmapDisabled. Expected _wxBitmapButton_p."); - return NULL; - } - } - wxBitmap & _result_ref = wxBitmapButton_GetBitmapDisabled(_arg0); - _result = (wxBitmap *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxBitmapButton_GetBitmapFocus(_swigobj) (_swigobj->GetBitmapFocus()) -static PyObject *_wrap_wxBitmapButton_GetBitmapFocus(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - wxBitmapButton * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBitmapButton_GetBitmapFocus",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmapButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapButton_GetBitmapFocus. Expected _wxBitmapButton_p."); - return NULL; - } - } - wxBitmap & _result_ref = wxBitmapButton_GetBitmapFocus(_arg0); - _result = (wxBitmap *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxBitmapButton_GetBitmapSelected(_swigobj) (_swigobj->GetBitmapSelected()) -static PyObject *_wrap_wxBitmapButton_GetBitmapSelected(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - wxBitmapButton * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBitmapButton_GetBitmapSelected",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmapButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapButton_GetBitmapSelected. Expected _wxBitmapButton_p."); - return NULL; - } - } - wxBitmap & _result_ref = wxBitmapButton_GetBitmapSelected(_arg0); - _result = (wxBitmap *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxBitmapButton_SetBitmapDisabled(_swigobj,_swigarg0) (_swigobj->SetBitmapDisabled(_swigarg0)) -static PyObject *_wrap_wxBitmapButton_SetBitmapDisabled(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmapButton * _arg0; - wxBitmap * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxBitmapButton_SetBitmapDisabled",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmapButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapButton_SetBitmapDisabled. Expected _wxBitmapButton_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmapButton_SetBitmapDisabled. Expected _wxBitmap_p."); - return NULL; - } - } - wxBitmapButton_SetBitmapDisabled(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxBitmapButton_SetBitmapFocus(_swigobj,_swigarg0) (_swigobj->SetBitmapFocus(_swigarg0)) -static PyObject *_wrap_wxBitmapButton_SetBitmapFocus(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmapButton * _arg0; - wxBitmap * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxBitmapButton_SetBitmapFocus",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmapButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapButton_SetBitmapFocus. Expected _wxBitmapButton_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmapButton_SetBitmapFocus. Expected _wxBitmap_p."); - return NULL; - } - } - wxBitmapButton_SetBitmapFocus(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxBitmapButton_SetBitmapSelected(_swigobj,_swigarg0) (_swigobj->SetBitmapSelected(_swigarg0)) -static PyObject *_wrap_wxBitmapButton_SetBitmapSelected(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmapButton * _arg0; - wxBitmap * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxBitmapButton_SetBitmapSelected",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmapButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapButton_SetBitmapSelected. Expected _wxBitmapButton_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmapButton_SetBitmapSelected. Expected _wxBitmap_p."); - return NULL; - } - } - wxBitmapButton_SetBitmapSelected(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxBitmapButton_SetBitmapLabel(_swigobj,_swigarg0) (_swigobj->SetBitmapLabel(_swigarg0)) -static PyObject *_wrap_wxBitmapButton_SetBitmapLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmapButton * _arg0; - wxBitmap * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxBitmapButton_SetBitmapLabel",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmapButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapButton_SetBitmapLabel. Expected _wxBitmapButton_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmapButton_SetBitmapLabel. Expected _wxBitmap_p."); - return NULL; - } - } - wxBitmapButton_SetBitmapLabel(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxCheckBoxTowxControl(void *ptr) { - wxCheckBox *src; - wxControl *dest; - src = (wxCheckBox *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxCheckBoxTowxWindow(void *ptr) { - wxCheckBox *src; - wxWindow *dest; - src = (wxCheckBox *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxCheckBoxTowxEvtHandler(void *ptr) { - wxCheckBox *src; - wxEvtHandler *dest; - src = (wxCheckBox *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxCheckBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxCheckBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) -static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxCheckBox * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = 0; - wxValidator * _arg6 = &wxPyDefaultValidator; - char * _arg7 = "checkBox"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char * _argc6 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|sslss:new_wxCheckBox",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_arg5,&_argc6,&_arg7)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxCheckBox. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxCheckBox. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxCheckBox. Expected _wxSize_p."); - return NULL; - } - } - if (_argc6) { - if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxCheckBox. Expected _wxValidator_p."); - return NULL; - } - } - _result = (wxCheckBox *)new_wxCheckBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxCheckBox_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxCheckBox_GetValue(_swigobj) (_swigobj->GetValue()) -static PyObject *_wrap_wxCheckBox_GetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxCheckBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCheckBox_GetValue",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCheckBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCheckBox_GetValue. Expected _wxCheckBox_p."); - return NULL; - } - } - _result = (bool )wxCheckBox_GetValue(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxCheckBox_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) -static PyObject *_wrap_wxCheckBox_SetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxCheckBox * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxCheckBox_SetValue",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCheckBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCheckBox_SetValue. Expected _wxCheckBox_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxCheckBox_SetValue(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxChoiceTowxControl(void *ptr) { - wxChoice *src; - wxControl *dest; - src = (wxChoice *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxChoiceTowxWindow(void *ptr) { - wxChoice *src; - wxWindow *dest; - src = (wxChoice *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxChoiceTowxEvtHandler(void *ptr) { - wxChoice *src; - wxEvtHandler *dest; - src = (wxChoice *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxChoice(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxChoice(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8)) -static PyObject *_wrap_new_wxChoice(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxChoice * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - int _arg4 = 0; - wxString * _arg5 = NULL; - long _arg6 = 0; - wxValidator * _arg7 = &wxPyDefaultValidator; - char * _arg8 = "choice"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - PyObject * _obj5 = 0; - char * _argc7 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si|ssOlss:new_wxChoice",&_argc0,&_arg1,&_argc2,&_argc3,&_obj5,&_arg6,&_argc7,&_arg8)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxChoice. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxChoice. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxChoice. Expected _wxSize_p."); - return NULL; - } - } - if (_obj5) -{ - _arg5 = wxString_LIST_helper(_obj5); - if (_arg5 == NULL) { - return NULL; - } -} - if (_argc7) { - if (SWIG_GetPtr(_argc7,(void **) &_arg7,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxChoice. Expected _wxValidator_p."); - return NULL; - } - } -{ - _arg4 = PyList_Size(_obj5); -} - _result = (wxChoice *)new_wxChoice(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxChoice_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - delete [] _arg5; -} - return _resultobj; -} - -#define wxChoice_Append(_swigobj,_swigarg0) (_swigobj->Append(_swigarg0)) -static PyObject *_wrap_wxChoice_Append(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxChoice * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxChoice_Append",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_Append. Expected _wxChoice_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxChoice_Append(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxChoice_Clear(_swigobj) (_swigobj->Clear()) -static PyObject *_wrap_wxChoice_Clear(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxChoice * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxChoice_Clear",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_Clear. Expected _wxChoice_p."); - return NULL; - } - } - wxChoice_Clear(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxChoice_FindString(_swigobj,_swigarg0) (_swigobj->FindString(_swigarg0)) -static PyObject *_wrap_wxChoice_FindString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxChoice * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxChoice_FindString",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_FindString. Expected _wxChoice_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (int )wxChoice_FindString(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxChoice_GetColumns(_swigobj) (_swigobj->GetColumns()) -static PyObject *_wrap_wxChoice_GetColumns(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxChoice * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxChoice_GetColumns",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_GetColumns. Expected _wxChoice_p."); - return NULL; - } - } - _result = (int )wxChoice_GetColumns(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxChoice_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxChoice_GetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxChoice * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxChoice_GetSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_GetSelection. Expected _wxChoice_p."); - return NULL; - } - } - _result = (int )wxChoice_GetSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxChoice_GetString(_swigobj,_swigarg0) (_swigobj->GetString(_swigarg0)) -static PyObject *_wrap_wxChoice_GetString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxChoice * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxChoice_GetString",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_GetString. Expected _wxChoice_p."); - return NULL; - } - } - _result = new wxString (wxChoice_GetString(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxChoice_GetStringSelection(_swigobj) (_swigobj->GetStringSelection()) -static PyObject *_wrap_wxChoice_GetStringSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxChoice * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxChoice_GetStringSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_GetStringSelection. Expected _wxChoice_p."); - return NULL; - } - } - _result = new wxString (wxChoice_GetStringSelection(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxChoice_Number(_swigobj) (_swigobj->Number()) -static PyObject *_wrap_wxChoice_Number(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxChoice * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxChoice_Number",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_Number. Expected _wxChoice_p."); - return NULL; - } - } - _result = (int )wxChoice_Number(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxChoice_SetColumns(_swigobj,_swigarg0) (_swigobj->SetColumns(_swigarg0)) -static PyObject *_wrap_wxChoice_SetColumns(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxChoice * _arg0; - int _arg1 = 1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxChoice_SetColumns",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_SetColumns. Expected _wxChoice_p."); - return NULL; - } - } - wxChoice_SetColumns(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxChoice_SetSelection(_swigobj,_swigarg0) (_swigobj->SetSelection(_swigarg0)) -static PyObject *_wrap_wxChoice_SetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxChoice * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxChoice_SetSelection",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_SetSelection. Expected _wxChoice_p."); - return NULL; - } - } - wxChoice_SetSelection(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxChoice_SetStringSelection(_swigobj,_swigarg0) (_swigobj->SetStringSelection(_swigarg0)) -static PyObject *_wrap_wxChoice_SetStringSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxChoice * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxChoice_SetStringSelection",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxChoice_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_SetStringSelection. Expected _wxChoice_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxChoice_SetStringSelection(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static void *SwigwxComboBoxTowxControl(void *ptr) { - wxComboBox *src; - wxControl *dest; - src = (wxComboBox *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxComboBoxTowxWindow(void *ptr) { - wxComboBox *src; - wxWindow *dest; - src = (wxComboBox *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxComboBoxTowxEvtHandler(void *ptr) { - wxComboBox *src; - wxEvtHandler *dest; - src = (wxComboBox *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxComboBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9) (new wxComboBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9)) -static PyObject *_wrap_new_wxComboBox(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _result; - wxWindow * _arg0; - wxWindowID _arg1; - char * _arg2 = ""; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - int _arg5 = 0; - wxString * _arg6 = NULL; - long _arg7 = 0; - wxValidator * _arg8 = &wxPyDefaultValidator; - char * _arg9 = "comboBox"; - char * _argc0 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - PyObject * _obj6 = 0; - char * _argc8 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si|sssOlss:new_wxComboBox",&_argc0,&_arg1,&_arg2,&_argc3,&_argc4,&_obj6,&_arg7,&_argc8,&_arg9)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxComboBox. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxComboBox. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxComboBox. Expected _wxSize_p."); - return NULL; - } - } - if (_obj6) -{ - _arg6 = wxString_LIST_helper(_obj6); - if (_arg6 == NULL) { - return NULL; - } -} - if (_argc8) { - if (SWIG_GetPtr(_argc8,(void **) &_arg8,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of new_wxComboBox. Expected _wxValidator_p."); - return NULL; - } - } -{ - _arg5 = PyList_Size(_obj6); -} - _result = (wxComboBox *)new_wxComboBox(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxComboBox_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - delete [] _arg6; -} - return _resultobj; -} - -#define wxComboBox_Append(_swigobj,_swigarg0) (_swigobj->Append(_swigarg0)) -static PyObject *_wrap_wxComboBox_Append(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxComboBox_Append",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_Append. Expected _wxComboBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxComboBox_Append(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxComboBox_Clear(_swigobj) (_swigobj->Clear()) -static PyObject *_wrap_wxComboBox_Clear(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_Clear",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_Clear. Expected _wxComboBox_p."); - return NULL; - } - } - wxComboBox_Clear(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxComboBox_Copy(_swigobj) (_swigobj->Copy()) -static PyObject *_wrap_wxComboBox_Copy(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_Copy",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_Copy. Expected _wxComboBox_p."); - return NULL; - } - } - wxComboBox_Copy(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxComboBox_Cut(_swigobj) (_swigobj->Cut()) -static PyObject *_wrap_wxComboBox_Cut(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_Cut",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_Cut. Expected _wxComboBox_p."); - return NULL; - } - } - wxComboBox_Cut(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxComboBox_Delete(_swigobj,_swigarg0) (_swigobj->Delete(_swigarg0)) -static PyObject *_wrap_wxComboBox_Delete(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxComboBox_Delete",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_Delete. Expected _wxComboBox_p."); - return NULL; - } - } - wxComboBox_Delete(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxComboBox_FindString(_swigobj,_swigarg0) (_swigobj->FindString(_swigarg0)) -static PyObject *_wrap_wxComboBox_FindString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxComboBox * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxComboBox_FindString",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_FindString. Expected _wxComboBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (int )wxComboBox_FindString(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxComboBox_GetInsertionPoint(_swigobj) (_swigobj->GetInsertionPoint()) -static PyObject *_wrap_wxComboBox_GetInsertionPoint(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_GetInsertionPoint",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_GetInsertionPoint. Expected _wxComboBox_p."); - return NULL; - } - } - _result = (long )wxComboBox_GetInsertionPoint(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxComboBox_GetLastPosition(_swigobj) (_swigobj->GetLastPosition()) -static PyObject *_wrap_wxComboBox_GetLastPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_GetLastPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_GetLastPosition. Expected _wxComboBox_p."); - return NULL; - } - } - _result = (long )wxComboBox_GetLastPosition(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxComboBox_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxComboBox_GetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_GetSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_GetSelection. Expected _wxComboBox_p."); - return NULL; - } - } - _result = (int )wxComboBox_GetSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxComboBox_GetString(_swigobj,_swigarg0) (_swigobj->GetString(_swigarg0)) -static PyObject *_wrap_wxComboBox_GetString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxComboBox * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxComboBox_GetString",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_GetString. Expected _wxComboBox_p."); - return NULL; - } - } - _result = new wxString (wxComboBox_GetString(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxComboBox_GetStringSelection(_swigobj) (_swigobj->GetStringSelection()) -static PyObject *_wrap_wxComboBox_GetStringSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_GetStringSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_GetStringSelection. Expected _wxComboBox_p."); - return NULL; - } - } - _result = new wxString (wxComboBox_GetStringSelection(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxComboBox_GetValue(_swigobj) (_swigobj->GetValue()) -static PyObject *_wrap_wxComboBox_GetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_GetValue",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_GetValue. Expected _wxComboBox_p."); - return NULL; - } - } - _result = new wxString (wxComboBox_GetValue(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxComboBox_Number(_swigobj) (_swigobj->Number()) -static PyObject *_wrap_wxComboBox_Number(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_Number",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_Number. Expected _wxComboBox_p."); - return NULL; - } - } - _result = (int )wxComboBox_Number(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxComboBox_Paste(_swigobj) (_swigobj->Paste()) -static PyObject *_wrap_wxComboBox_Paste(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_Paste",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_Paste. Expected _wxComboBox_p."); - return NULL; - } - } - wxComboBox_Paste(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxComboBox_Replace(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Replace(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxComboBox_Replace(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - long _arg1; - long _arg2; - wxString * _arg3; - char * _argc0 = 0; - PyObject * _obj3 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sllO:wxComboBox_Replace",&_argc0,&_arg1,&_arg2,&_obj3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_Replace. Expected _wxComboBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AsString(_obj3)); -} - wxComboBox_Replace(_arg0,_arg1,_arg2,*_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj3) - delete _arg3; -} - return _resultobj; -} - -#define wxComboBox_Remove(_swigobj,_swigarg0,_swigarg1) (_swigobj->Remove(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxComboBox_Remove(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxComboBox_Remove",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_Remove. Expected _wxComboBox_p."); - return NULL; - } - } - wxComboBox_Remove(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxComboBox_SetInsertionPoint(_swigobj,_swigarg0) (_swigobj->SetInsertionPoint(_swigarg0)) -static PyObject *_wrap_wxComboBox_SetInsertionPoint(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxComboBox_SetInsertionPoint",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_SetInsertionPoint. Expected _wxComboBox_p."); - return NULL; - } - } - wxComboBox_SetInsertionPoint(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxComboBox_SetInsertionPointEnd(_swigobj) (_swigobj->SetInsertionPointEnd()) -static PyObject *_wrap_wxComboBox_SetInsertionPointEnd(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxComboBox_SetInsertionPointEnd",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_SetInsertionPointEnd. Expected _wxComboBox_p."); - return NULL; - } - } - wxComboBox_SetInsertionPointEnd(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxComboBox_SetSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSelection(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxComboBox_SetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - int _arg1; - bool _arg2 = (1); - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"si|i:wxComboBox_SetSelection",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_SetSelection. Expected _wxComboBox_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - wxComboBox_SetSelection(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxComboBox_SetMark(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSelection(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxComboBox_SetMark(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxComboBox_SetMark",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_SetMark. Expected _wxComboBox_p."); - return NULL; - } - } - wxComboBox_SetMark(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxComboBox_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) -static PyObject *_wrap_wxComboBox_SetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxComboBox * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxComboBox_SetValue",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_SetValue. Expected _wxComboBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxComboBox_SetValue(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static void *SwigwxGaugeTowxControl(void *ptr) { - wxGauge *src; - wxControl *dest; - src = (wxGauge *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxGaugeTowxWindow(void *ptr) { - wxGauge *src; - wxWindow *dest; - src = (wxGauge *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxGaugeTowxEvtHandler(void *ptr) { - wxGauge *src; - wxEvtHandler *dest; - src = (wxGauge *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxGauge(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxGauge(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) -static PyObject *_wrap_new_wxGauge(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGauge * _result; - wxWindow * _arg0; - wxWindowID _arg1; - int _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = (wxGA_HORIZONTAL); - wxValidator * _arg6 = &wxPyDefaultValidator; - char * _arg7 = "gauge"; - char * _argc0 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char * _argc6 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sii|sslss:new_wxGauge",&_argc0,&_arg1,&_arg2,&_argc3,&_argc4,&_arg5,&_argc6,&_arg7)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGauge. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxGauge. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxGauge. Expected _wxSize_p."); - return NULL; - } - } - if (_argc6) { - if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxGauge. Expected _wxValidator_p."); - return NULL; - } - } - _result = (wxGauge *)new_wxGauge(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxGauge_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGauge_GetBezelFace(_swigobj) (_swigobj->GetBezelFace()) -static PyObject *_wrap_wxGauge_GetBezelFace(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGauge * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGauge_GetBezelFace",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGauge_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGauge_GetBezelFace. Expected _wxGauge_p."); - return NULL; - } - } - _result = (int )wxGauge_GetBezelFace(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGauge_GetRange(_swigobj) (_swigobj->GetRange()) -static PyObject *_wrap_wxGauge_GetRange(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGauge * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGauge_GetRange",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGauge_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGauge_GetRange. Expected _wxGauge_p."); - return NULL; - } - } - _result = (int )wxGauge_GetRange(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGauge_GetShadowWidth(_swigobj) (_swigobj->GetShadowWidth()) -static PyObject *_wrap_wxGauge_GetShadowWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGauge * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGauge_GetShadowWidth",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGauge_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGauge_GetShadowWidth. Expected _wxGauge_p."); - return NULL; - } - } - _result = (int )wxGauge_GetShadowWidth(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGauge_GetValue(_swigobj) (_swigobj->GetValue()) -static PyObject *_wrap_wxGauge_GetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGauge * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGauge_GetValue",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGauge_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGauge_GetValue. Expected _wxGauge_p."); - return NULL; - } - } - _result = (int )wxGauge_GetValue(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGauge_SetBezelFace(_swigobj,_swigarg0) (_swigobj->SetBezelFace(_swigarg0)) -static PyObject *_wrap_wxGauge_SetBezelFace(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGauge * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGauge_SetBezelFace",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGauge_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGauge_SetBezelFace. Expected _wxGauge_p."); - return NULL; - } - } - wxGauge_SetBezelFace(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGauge_SetRange(_swigobj,_swigarg0) (_swigobj->SetRange(_swigarg0)) -static PyObject *_wrap_wxGauge_SetRange(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGauge * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGauge_SetRange",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGauge_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGauge_SetRange. Expected _wxGauge_p."); - return NULL; - } - } - wxGauge_SetRange(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGauge_SetShadowWidth(_swigobj,_swigarg0) (_swigobj->SetShadowWidth(_swigarg0)) -static PyObject *_wrap_wxGauge_SetShadowWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGauge * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGauge_SetShadowWidth",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGauge_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGauge_SetShadowWidth. Expected _wxGauge_p."); - return NULL; - } - } - wxGauge_SetShadowWidth(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGauge_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) -static PyObject *_wrap_wxGauge_SetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGauge * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGauge_SetValue",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGauge_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGauge_SetValue. Expected _wxGauge_p."); - return NULL; - } - } - wxGauge_SetValue(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxStaticBoxTowxControl(void *ptr) { - wxStaticBox *src; - wxControl *dest; - src = (wxStaticBox *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxStaticBoxTowxWindow(void *ptr) { - wxStaticBox *src; - wxWindow *dest; - src = (wxStaticBox *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxStaticBoxTowxEvtHandler(void *ptr) { - wxStaticBox *src; - wxEvtHandler *dest; - src = (wxStaticBox *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxStaticBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxStaticBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxStaticBox * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = 0; - char * _arg6 = "staticBox"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|ssls:new_wxStaticBox",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxStaticBox. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxStaticBox. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxStaticBox. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxStaticBox *)new_wxStaticBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticBox_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -static void *SwigwxStaticTextTowxControl(void *ptr) { - wxStaticText *src; - wxControl *dest; - src = (wxStaticText *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxStaticTextTowxWindow(void *ptr) { - wxStaticText *src; - wxWindow *dest; - src = (wxStaticText *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxStaticTextTowxEvtHandler(void *ptr) { - wxStaticText *src; - wxEvtHandler *dest; - src = (wxStaticText *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxStaticText(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxStaticText(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxStaticText * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = 0; - char * _arg6 = "staticText"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|ssls:new_wxStaticText",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxStaticText. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxStaticText. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxStaticText. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxStaticText *)new_wxStaticText(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticText_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxStaticText_GetLabel(_swigobj) (_swigobj->GetLabel()) -static PyObject *_wrap_wxStaticText_GetLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxStaticText * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxStaticText_GetLabel",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxStaticText_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStaticText_GetLabel. Expected _wxStaticText_p."); - return NULL; - } - } - _result = new wxString (wxStaticText_GetLabel(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxStaticText_SetLabel(_swigobj,_swigarg0) (_swigobj->SetLabel(_swigarg0)) -static PyObject *_wrap_wxStaticText_SetLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxStaticText * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxStaticText_SetLabel",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxStaticText_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStaticText_SetLabel. Expected _wxStaticText_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxStaticText_SetLabel(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static void *SwigwxListBoxTowxControl(void *ptr) { - wxListBox *src; - wxControl *dest; - src = (wxListBox *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxListBoxTowxWindow(void *ptr) { - wxListBox *src; - wxWindow *dest; - src = (wxListBox *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxListBoxTowxEvtHandler(void *ptr) { - wxListBox *src; - wxEvtHandler *dest; - src = (wxListBox *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxListBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxListBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8)) -static PyObject *_wrap_new_wxListBox(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - int _arg4; - wxString * _arg5 = NULL; - long _arg6 = 0; - wxValidator * _arg7 = &wxPyDefaultValidator; - char * _arg8 = "listBox"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - PyObject * _obj5 = 0; - char * _argc7 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si|ssOlss:new_wxListBox",&_argc0,&_arg1,&_argc2,&_argc3,&_obj5,&_arg6,&_argc7,&_arg8)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxListBox. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxListBox. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxListBox. Expected _wxSize_p."); - return NULL; - } - } - if (_obj5) -{ - _arg5 = wxString_LIST_helper(_obj5); - if (_arg5 == NULL) { - return NULL; - } -} - if (_argc7) { - if (SWIG_GetPtr(_argc7,(void **) &_arg7,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxListBox. Expected _wxValidator_p."); - return NULL; - } - } -{ - _arg4 = PyList_Size(_obj5); -} - _result = (wxListBox *)new_wxListBox(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxListBox_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - delete [] _arg5; -} - return _resultobj; -} - -#define wxListBox_Append(_swigobj,_swigarg0) (_swigobj->Append(_swigarg0)) -static PyObject *_wrap_wxListBox_Append(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxListBox_Append",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_Append. Expected _wxListBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxListBox_Append(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxListBox_Clear(_swigobj) (_swigobj->Clear()) -static PyObject *_wrap_wxListBox_Clear(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListBox_Clear",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_Clear. Expected _wxListBox_p."); - return NULL; - } - } - wxListBox_Clear(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxListBox_Delete(_swigobj,_swigarg0) (_swigobj->Delete(_swigarg0)) -static PyObject *_wrap_wxListBox_Delete(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxListBox_Delete",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_Delete. Expected _wxListBox_p."); - return NULL; - } - } - wxListBox_Delete(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxListBox_Deselect(_swigobj,_swigarg0) (_swigobj->Deselect(_swigarg0)) -static PyObject *_wrap_wxListBox_Deselect(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxListBox_Deselect",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_Deselect. Expected _wxListBox_p."); - return NULL; - } - } - wxListBox_Deselect(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxListBox_FindString(_swigobj,_swigarg0) (_swigobj->FindString(_swigarg0)) -static PyObject *_wrap_wxListBox_FindString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListBox * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxListBox_FindString",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_FindString. Expected _wxListBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (int )wxListBox_FindString(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxListBox_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxListBox_GetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListBox_GetSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_GetSelection. Expected _wxListBox_p."); - return NULL; - } - } - _result = (int )wxListBox_GetSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListBox_GetString(_swigobj,_swigarg0) (_swigobj->GetString(_swigarg0)) -static PyObject *_wrap_wxListBox_GetString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxListBox * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxListBox_GetString",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_GetString. Expected _wxListBox_p."); - return NULL; - } - } - _result = new wxString (wxListBox_GetString(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxListBox_GetStringSelection(_swigobj) (_swigobj->GetStringSelection()) -static PyObject *_wrap_wxListBox_GetStringSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxListBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListBox_GetStringSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_GetStringSelection. Expected _wxListBox_p."); - return NULL; - } - } - _result = new wxString (wxListBox_GetStringSelection(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxListBox_Number(_swigobj) (_swigobj->Number()) -static PyObject *_wrap_wxListBox_Number(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListBox_Number",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_Number. Expected _wxListBox_p."); - return NULL; - } - } - _result = (int )wxListBox_Number(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListBox_Selected(_swigobj,_swigarg0) (_swigobj->Selected(_swigarg0)) -static PyObject *_wrap_wxListBox_Selected(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListBox * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxListBox_Selected",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_Selected. Expected _wxListBox_p."); - return NULL; - } - } - _result = (bool )wxListBox_Selected(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListBox_Set(_swigobj,_swigarg0,_swigarg1) (_swigobj->Set(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListBox_Set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _arg0; - int _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxListBox_Set",&_argc0,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_Set. Expected _wxListBox_p."); - return NULL; - } - } - if (_obj2) -{ - _arg2 = wxString_LIST_helper(_obj2); - if (_arg2 == NULL) { - return NULL; - } -} -{ - _arg1 = PyList_Size(_obj2); -} - wxListBox_Set(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - delete [] _arg2; -} - return _resultobj; -} - -#define wxListBox_SetFirstItem(_swigobj,_swigarg0) (_swigobj->SetFirstItem(_swigarg0)) -static PyObject *_wrap_wxListBox_SetFirstItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxListBox_SetFirstItem",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_SetFirstItem. Expected _wxListBox_p."); - return NULL; - } - } - wxListBox_SetFirstItem(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxListBox_SetFirstItemStr(_swigobj,_swigarg0) (_swigobj->SetFirstItem(_swigarg0)) -static PyObject *_wrap_wxListBox_SetFirstItemStr(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxListBox_SetFirstItemStr",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_SetFirstItemStr. Expected _wxListBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxListBox_SetFirstItemStr(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxListBox_SetSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSelection(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListBox_SetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _arg0; - int _arg1; - bool _arg2 = (1); - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"si|i:wxListBox_SetSelection",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_SetSelection. Expected _wxListBox_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - wxListBox_SetSelection(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxListBox_SetString(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetString(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListBox_SetString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _arg0; - int _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siO:wxListBox_SetString",&_argc0,&_arg1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_SetString. Expected _wxListBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - wxListBox_SetString(_arg0,_arg1,*_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxListBox_SetStringSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetStringSelection(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListBox_SetStringSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListBox * _arg0; - wxString * _arg1; - bool _arg2 = (1); - char * _argc0 = 0; - PyObject * _obj1 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"sO|i:wxListBox_SetStringSelection",&_argc0,&_obj1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_SetStringSelection. Expected _wxListBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _arg2 = (bool ) tempbool2; - wxListBox_SetStringSelection(_arg0,*_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static void *SwigwxTextCtrlTowxControl(void *ptr) { - wxTextCtrl *src; - wxControl *dest; - src = (wxTextCtrl *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxTextCtrlTowxWindow(void *ptr) { - wxTextCtrl *src; - wxWindow *dest; - src = (wxTextCtrl *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxTextCtrlTowxEvtHandler(void *ptr) { - wxTextCtrl *src; - wxEvtHandler *dest; - src = (wxTextCtrl *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxTextCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxTextCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) -static PyObject *_wrap_new_wxTextCtrl(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _result; - wxWindow * _arg0; - wxWindowID _arg1; - char * _arg2 = ""; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = 0; - wxValidator * _arg6 = &wxPyDefaultValidator; - char * _arg7 = "text"; - char * _argc0 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char * _argc6 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si|ssslss:new_wxTextCtrl",&_argc0,&_arg1,&_arg2,&_argc3,&_argc4,&_arg5,&_argc6,&_arg7)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxTextCtrl. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxTextCtrl. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxTextCtrl. Expected _wxSize_p."); - return NULL; - } - } - if (_argc6) { - if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxTextCtrl. Expected _wxValidator_p."); - return NULL; - } - } - _result = (wxTextCtrl *)new_wxTextCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxTextCtrl_Clear(_swigobj) (_swigobj->Clear()) -static PyObject *_wrap_wxTextCtrl_Clear(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_Clear",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Clear. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_Clear(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_Copy(_swigobj) (_swigobj->Copy()) -static PyObject *_wrap_wxTextCtrl_Copy(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_Copy",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Copy. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_Copy(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_Cut(_swigobj) (_swigobj->Cut()) -static PyObject *_wrap_wxTextCtrl_Cut(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_Cut",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Cut. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_Cut(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_DiscardEdits(_swigobj) (_swigobj->DiscardEdits()) -static PyObject *_wrap_wxTextCtrl_DiscardEdits(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_DiscardEdits",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_DiscardEdits. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_DiscardEdits(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_GetInsertionPoint(_swigobj) (_swigobj->GetInsertionPoint()) -static PyObject *_wrap_wxTextCtrl_GetInsertionPoint(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_GetInsertionPoint",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetInsertionPoint. Expected _wxTextCtrl_p."); - return NULL; - } - } - _result = (long )wxTextCtrl_GetInsertionPoint(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTextCtrl_GetLastPosition(_swigobj) (_swigobj->GetLastPosition()) -static PyObject *_wrap_wxTextCtrl_GetLastPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_GetLastPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetLastPosition. Expected _wxTextCtrl_p."); - return NULL; - } - } - _result = (long )wxTextCtrl_GetLastPosition(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTextCtrl_GetLineLength(_swigobj,_swigarg0) (_swigobj->GetLineLength(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_GetLineLength(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTextCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTextCtrl_GetLineLength",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetLineLength. Expected _wxTextCtrl_p."); - return NULL; - } - } - _result = (int )wxTextCtrl_GetLineLength(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTextCtrl_GetLineText(_swigobj,_swigarg0) (_swigobj->GetLineText(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_GetLineText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxTextCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTextCtrl_GetLineText",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetLineText. Expected _wxTextCtrl_p."); - return NULL; - } - } - _result = new wxString (wxTextCtrl_GetLineText(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxTextCtrl_GetNumberOfLines(_swigobj) (_swigobj->GetNumberOfLines()) -static PyObject *_wrap_wxTextCtrl_GetNumberOfLines(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_GetNumberOfLines",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetNumberOfLines. Expected _wxTextCtrl_p."); - return NULL; - } - } - _result = (int )wxTextCtrl_GetNumberOfLines(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTextCtrl_GetValue(_swigobj) (_swigobj->GetValue()) -static PyObject *_wrap_wxTextCtrl_GetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_GetValue",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetValue. Expected _wxTextCtrl_p."); - return NULL; - } - } - _result = new wxString (wxTextCtrl_GetValue(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxTextCtrl_IsModified(_swigobj) (_swigobj->IsModified()) -static PyObject *_wrap_wxTextCtrl_IsModified(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_IsModified",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_IsModified. Expected _wxTextCtrl_p."); - return NULL; - } - } - _result = (bool )wxTextCtrl_IsModified(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTextCtrl_LoadFile(_swigobj,_swigarg0) (_swigobj->LoadFile(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_LoadFile(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTextCtrl * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxTextCtrl_LoadFile",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_LoadFile. Expected _wxTextCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (bool )wxTextCtrl_LoadFile(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxTextCtrl_Paste(_swigobj) (_swigobj->Paste()) -static PyObject *_wrap_wxTextCtrl_Paste(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_Paste",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Paste. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_Paste(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_PositionToXY(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->PositionToXY(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxTextCtrl_PositionToXY(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - long _arg1; - long * _arg2; - long temp; - long * _arg3; - long temp0; - char * _argc0 = 0; - - self = self; -{ - _arg2 = &temp; -} -{ - _arg3 = &temp0; -} - if(!PyArg_ParseTuple(args,"sl:wxTextCtrl_PositionToXY",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_PositionToXY. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_PositionToXY(_arg0,_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg3)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxTextCtrl_Remove(_swigobj,_swigarg0,_swigarg1) (_swigobj->Remove(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTextCtrl_Remove(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxTextCtrl_Remove",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Remove. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_Remove(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_Replace(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Replace(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxTextCtrl_Replace(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - long _arg1; - long _arg2; - wxString * _arg3; - char * _argc0 = 0; - PyObject * _obj3 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sllO:wxTextCtrl_Replace",&_argc0,&_arg1,&_arg2,&_obj3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Replace. Expected _wxTextCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AsString(_obj3)); -} - wxTextCtrl_Replace(_arg0,_arg1,_arg2,*_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj3) - delete _arg3; -} - return _resultobj; -} - -#define wxTextCtrl_SaveFile(_swigobj,_swigarg0) (_swigobj->SaveFile(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_SaveFile(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTextCtrl * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxTextCtrl_SaveFile",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SaveFile. Expected _wxTextCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (bool )wxTextCtrl_SaveFile(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxTextCtrl_SetEditable(_swigobj,_swigarg0) (_swigobj->SetEditable(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_SetEditable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxTextCtrl_SetEditable",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SetEditable. Expected _wxTextCtrl_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxTextCtrl_SetEditable(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_SetInsertionPoint(_swigobj,_swigarg0) (_swigobj->SetInsertionPoint(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_SetInsertionPoint(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTextCtrl_SetInsertionPoint",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SetInsertionPoint. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_SetInsertionPoint(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_SetInsertionPointEnd(_swigobj) (_swigobj->SetInsertionPointEnd()) -static PyObject *_wrap_wxTextCtrl_SetInsertionPointEnd(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTextCtrl_SetInsertionPointEnd",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SetInsertionPointEnd. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_SetInsertionPointEnd(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_SetSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSelection(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTextCtrl_SetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxTextCtrl_SetSelection",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SetSelection. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_SetSelection(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_SetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxTextCtrl_SetValue",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SetValue. Expected _wxTextCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxTextCtrl_SetValue(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxTextCtrl_ShowPosition(_swigobj,_swigarg0) (_swigobj->ShowPosition(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_ShowPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTextCtrl_ShowPosition",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_ShowPosition. Expected _wxTextCtrl_p."); - return NULL; - } - } - wxTextCtrl_ShowPosition(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTextCtrl_WriteText(_swigobj,_swigarg0) (_swigobj->WriteText(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_WriteText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxTextCtrl_WriteText",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_WriteText. Expected _wxTextCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxTextCtrl_WriteText(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxTextCtrl_XYToPosition(_swigobj,_swigarg0,_swigarg1) (_swigobj->XYToPosition(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTextCtrl_XYToPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTextCtrl * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxTextCtrl_XYToPosition",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_XYToPosition. Expected _wxTextCtrl_p."); - return NULL; - } - } - _result = (long )wxTextCtrl_XYToPosition(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -static void *SwigwxScrollBarTowxControl(void *ptr) { - wxScrollBar *src; - wxControl *dest; - src = (wxScrollBar *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxScrollBarTowxWindow(void *ptr) { - wxScrollBar *src; - wxWindow *dest; - src = (wxScrollBar *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxScrollBarTowxEvtHandler(void *ptr) { - wxScrollBar *src; - wxEvtHandler *dest; - src = (wxScrollBar *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxScrollBar(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxScrollBar(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxScrollBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrollBar * _result; - wxWindow * _arg0; - wxWindowID _arg1 = -1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - long _arg4 = (wxSB_HORIZONTAL); - wxValidator * _arg5 = &wxPyDefaultValidator; - char * _arg6 = "scrollBar"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char * _argc5 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|isslss:new_wxScrollBar",&_argc0,&_arg1,&_argc2,&_argc3,&_arg4,&_argc5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxScrollBar. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxScrollBar. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxScrollBar. Expected _wxSize_p."); - return NULL; - } - } - if (_argc5) { - if (SWIG_GetPtr(_argc5,(void **) &_arg5,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of new_wxScrollBar. Expected _wxValidator_p."); - return NULL; - } - } - _result = (wxScrollBar *)new_wxScrollBar(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxScrollBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxScrollBar_GetRange(_swigobj) (_swigobj->GetRange()) -static PyObject *_wrap_wxScrollBar_GetRange(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxScrollBar * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxScrollBar_GetRange",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrollBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollBar_GetRange. Expected _wxScrollBar_p."); - return NULL; - } - } - _result = (int )wxScrollBar_GetRange(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxScrollBar_GetPageSize(_swigobj) (_swigobj->GetPageSize()) -static PyObject *_wrap_wxScrollBar_GetPageSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxScrollBar * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxScrollBar_GetPageSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrollBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollBar_GetPageSize. Expected _wxScrollBar_p."); - return NULL; - } - } - _result = (int )wxScrollBar_GetPageSize(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxScrollBar_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxScrollBar_GetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxScrollBar * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxScrollBar_GetPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrollBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollBar_GetPosition. Expected _wxScrollBar_p."); - return NULL; - } - } - _result = (int )wxScrollBar_GetPosition(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxScrollBar_GetThumbSize(_swigobj) (_swigobj->GetThumbSize()) -static PyObject *_wrap_wxScrollBar_GetThumbSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxScrollBar * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxScrollBar_GetThumbSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrollBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollBar_GetThumbSize. Expected _wxScrollBar_p."); - return NULL; - } - } - _result = (int )wxScrollBar_GetThumbSize(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxScrollBar_SetPosition(_swigobj,_swigarg0) (_swigobj->SetPosition(_swigarg0)) -static PyObject *_wrap_wxScrollBar_SetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrollBar * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxScrollBar_SetPosition",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrollBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollBar_SetPosition. Expected _wxScrollBar_p."); - return NULL; - } - } - wxScrollBar_SetPosition(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxScrollBar_SetScrollbar(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SetScrollbar(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_wxScrollBar_SetScrollbar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrollBar * _arg0; - int _arg1; - int _arg2; - int _arg3; - int _arg4; - bool _arg5 = (1); - char * _argc0 = 0; - int tempbool5; - - self = self; - if(!PyArg_ParseTuple(args,"siiii|i:wxScrollBar_SetScrollbar",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&tempbool5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrollBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollBar_SetScrollbar. Expected _wxScrollBar_p."); - return NULL; - } - } - _arg5 = (bool ) tempbool5; - wxScrollBar_SetScrollbar(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxSpinButtonTowxControl(void *ptr) { - wxSpinButton *src; - wxControl *dest; - src = (wxSpinButton *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxSpinButtonTowxWindow(void *ptr) { - wxSpinButton *src; - wxWindow *dest; - src = (wxSpinButton *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxSpinButtonTowxEvtHandler(void *ptr) { - wxSpinButton *src; - wxEvtHandler *dest; - src = (wxSpinButton *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxSpinButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxSpinButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_new_wxSpinButton(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSpinButton * _result; - wxWindow * _arg0; - wxWindowID _arg1 = -1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - long _arg4 = (wxSP_HORIZONTAL); - char * _arg5 = "spinButton"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|issls:new_wxSpinButton",&_argc0,&_arg1,&_argc2,&_argc3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxSpinButton. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxSpinButton. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxSpinButton. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxSpinButton *)new_wxSpinButton(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxSpinButton_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxSpinButton_GetMax(_swigobj) (_swigobj->GetMax()) -static PyObject *_wrap_wxSpinButton_GetMax(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSpinButton * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSpinButton_GetMax",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSpinButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinButton_GetMax. Expected _wxSpinButton_p."); - return NULL; - } - } - _result = (int )wxSpinButton_GetMax(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSpinButton_GetMin(_swigobj) (_swigobj->GetMin()) -static PyObject *_wrap_wxSpinButton_GetMin(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSpinButton * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSpinButton_GetMin",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSpinButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinButton_GetMin. Expected _wxSpinButton_p."); - return NULL; - } - } - _result = (int )wxSpinButton_GetMin(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSpinButton_GetValue(_swigobj) (_swigobj->GetValue()) -static PyObject *_wrap_wxSpinButton_GetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSpinButton * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSpinButton_GetValue",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSpinButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinButton_GetValue. Expected _wxSpinButton_p."); - return NULL; - } - } - _result = (int )wxSpinButton_GetValue(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSpinButton_SetRange(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRange(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxSpinButton_SetRange(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSpinButton * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxSpinButton_SetRange",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSpinButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinButton_SetRange. Expected _wxSpinButton_p."); - return NULL; - } - } - wxSpinButton_SetRange(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSpinButton_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) -static PyObject *_wrap_wxSpinButton_SetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSpinButton * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxSpinButton_SetValue",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSpinButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinButton_SetValue. Expected _wxSpinButton_p."); - return NULL; - } - } - wxSpinButton_SetValue(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxStaticBitmapTowxControl(void *ptr) { - wxStaticBitmap *src; - wxControl *dest; - src = (wxStaticBitmap *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxStaticBitmapTowxWindow(void *ptr) { - wxStaticBitmap *src; - wxWindow *dest; - src = (wxStaticBitmap *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxStaticBitmapTowxEvtHandler(void *ptr) { - wxStaticBitmap *src; - wxEvtHandler *dest; - src = (wxStaticBitmap *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxStaticBitmap(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxStaticBitmap(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxStaticBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxStaticBitmap * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxBitmap * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = 0; - char * _arg6 = "staticBitmap"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sis|ssls:new_wxStaticBitmap",&_argc0,&_arg1,&_argc2,&_argc3,&_argc4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxStaticBitmap. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxStaticBitmap. Expected _wxBitmap_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxStaticBitmap. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxStaticBitmap. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxStaticBitmap *)new_wxStaticBitmap(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxStaticBitmap_GetBitmap(_swigobj) (_swigobj->GetBitmap()) -static PyObject *_wrap_wxStaticBitmap_GetBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - wxStaticBitmap * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxStaticBitmap_GetBitmap",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxStaticBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStaticBitmap_GetBitmap. Expected _wxStaticBitmap_p."); - return NULL; - } - } - wxBitmap & _result_ref = wxStaticBitmap_GetBitmap(_arg0); - _result = (wxBitmap *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxStaticBitmap_SetBitmap(_swigobj,_swigarg0) (_swigobj->SetBitmap(_swigarg0)) -static PyObject *_wrap_wxStaticBitmap_SetBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxStaticBitmap * _arg0; - wxBitmap * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxStaticBitmap_SetBitmap",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxStaticBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStaticBitmap_SetBitmap. Expected _wxStaticBitmap_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStaticBitmap_SetBitmap. Expected _wxBitmap_p."); - return NULL; - } - } - wxStaticBitmap_SetBitmap(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxRadioBoxTowxControl(void *ptr) { - wxRadioBox *src; - wxControl *dest; - src = (wxRadioBox *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxRadioBoxTowxWindow(void *ptr) { - wxRadioBox *src; - wxWindow *dest; - src = (wxRadioBox *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxRadioBoxTowxEvtHandler(void *ptr) { - wxRadioBox *src; - wxEvtHandler *dest; - src = (wxRadioBox *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxRadioBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9,_swigarg10) (new wxRadioBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9,_swigarg10)) -static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioBox * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - int _arg5 = 0; - wxString * _arg6 = NULL; - int _arg7 = 0; - long _arg8 = (wxRA_HORIZONTAL); - wxValidator * _arg9 = &wxPyDefaultValidator; - char * _arg10 = "radioBox"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - PyObject * _obj6 = 0; - char * _argc9 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|ssOilss:new_wxRadioBox",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_obj6,&_arg7,&_arg8,&_argc9,&_arg10)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxRadioBox. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxRadioBox. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxRadioBox. Expected _wxSize_p."); - return NULL; - } - } - if (_obj6) -{ - _arg6 = wxString_LIST_helper(_obj6); - if (_arg6 == NULL) { - return NULL; - } -} - if (_argc9) { - if (SWIG_GetPtr(_argc9,(void **) &_arg9,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 10 of new_wxRadioBox. Expected _wxValidator_p."); - return NULL; - } - } -{ - _arg5 = PyList_Size(_obj6); -} - _result = (wxRadioBox *)new_wxRadioBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,*_arg9,_arg10); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxRadioBox_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} -{ - delete [] _arg6; -} - return _resultobj; -} - -#define wxRadioBox_EnableBox(_swigobj,_swigarg0) (_swigobj->Enable(_swigarg0)) -static PyObject *_wrap_wxRadioBox_EnableBox(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioBox * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxRadioBox_EnableBox",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_EnableBox. Expected _wxRadioBox_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxRadioBox_EnableBox(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxRadioBox_Enable(_swigobj,_swigarg0,_swigarg1) (_swigobj->Enable(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxRadioBox_Enable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioBox * _arg0; - int _arg1; - bool _arg2; - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxRadioBox_Enable",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_Enable. Expected _wxRadioBox_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - wxRadioBox_Enable(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxRadioBox_FindString(_swigobj,_swigarg0) (_swigobj->FindString(_swigarg0)) -static PyObject *_wrap_wxRadioBox_FindString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxRadioBox * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxRadioBox_FindString",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_FindString. Expected _wxRadioBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (int )wxRadioBox_FindString(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxRadioBox_GetBoxLabel(_swigobj) (_swigobj->GetLabel()) -static PyObject *_wrap_wxRadioBox_GetBoxLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxRadioBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRadioBox_GetBoxLabel",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_GetBoxLabel. Expected _wxRadioBox_p."); - return NULL; - } - } - _result = new wxString (wxRadioBox_GetBoxLabel(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxRadioBox_GetLabel(_swigobj,_swigarg0) (_swigobj->GetLabel(_swigarg0)) -static PyObject *_wrap_wxRadioBox_GetLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxRadioBox * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxRadioBox_GetLabel",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_GetLabel. Expected _wxRadioBox_p."); - return NULL; - } - } - _result = new wxString (wxRadioBox_GetLabel(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxRadioBox_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxRadioBox_GetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxRadioBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRadioBox_GetSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_GetSelection. Expected _wxRadioBox_p."); - return NULL; - } - } - _result = (int )wxRadioBox_GetSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRadioBox_GetString(_swigobj,_swigarg0) (_swigobj->GetString(_swigarg0)) -static PyObject *_wrap_wxRadioBox_GetString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxRadioBox * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxRadioBox_GetString",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_GetString. Expected _wxRadioBox_p."); - return NULL; - } - } - _result = new wxString (wxRadioBox_GetString(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxRadioBox_GetStringSelection(_swigobj) (_swigobj->GetStringSelection()) -static PyObject *_wrap_wxRadioBox_GetStringSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxRadioBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRadioBox_GetStringSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_GetStringSelection. Expected _wxRadioBox_p."); - return NULL; - } - } - _result = new wxString (wxRadioBox_GetStringSelection(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxRadioBox_Number(_swigobj) (_swigobj->Number()) -static PyObject *_wrap_wxRadioBox_Number(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxRadioBox * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRadioBox_Number",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_Number. Expected _wxRadioBox_p."); - return NULL; - } - } - _result = (int )wxRadioBox_Number(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRadioBox_SetBoxLabel(_swigobj,_swigarg0) (_swigobj->SetLabel(_swigarg0)) -static PyObject *_wrap_wxRadioBox_SetBoxLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioBox * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxRadioBox_SetBoxLabel",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_SetBoxLabel. Expected _wxRadioBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxRadioBox_SetBoxLabel(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxRadioBox_SetLabel(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetLabel(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxRadioBox_SetLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioBox * _arg0; - int _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siO:wxRadioBox_SetLabel",&_argc0,&_arg1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_SetLabel. Expected _wxRadioBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - wxRadioBox_SetLabel(_arg0,_arg1,*_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxRadioBox_SetSelection(_swigobj,_swigarg0) (_swigobj->SetSelection(_swigarg0)) -static PyObject *_wrap_wxRadioBox_SetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioBox * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxRadioBox_SetSelection",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_SetSelection. Expected _wxRadioBox_p."); - return NULL; - } - } - wxRadioBox_SetSelection(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxRadioBox_SetStringSelection(_swigobj,_swigarg0) (_swigobj->SetStringSelection(_swigarg0)) -static PyObject *_wrap_wxRadioBox_SetStringSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioBox * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxRadioBox_SetStringSelection",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_SetStringSelection. Expected _wxRadioBox_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxRadioBox_SetStringSelection(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxRadioBox_Show(_swigobj,_swigarg0) (_swigobj->Show(_swigarg0)) -static PyObject *_wrap_wxRadioBox_Show(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioBox * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxRadioBox_Show",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_Show. Expected _wxRadioBox_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxRadioBox_Show(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxRadioBox_ShowItem(_swigobj,_swigarg0,_swigarg1) (_swigobj->Show(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxRadioBox_ShowItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioBox * _arg0; - int _arg1; - bool _arg2; - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxRadioBox_ShowItem",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_ShowItem. Expected _wxRadioBox_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - wxRadioBox_ShowItem(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxRadioButtonTowxControl(void *ptr) { - wxRadioButton *src; - wxControl *dest; - src = (wxRadioButton *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxRadioButtonTowxWindow(void *ptr) { - wxRadioButton *src; - wxWindow *dest; - src = (wxRadioButton *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxRadioButtonTowxEvtHandler(void *ptr) { - wxRadioButton *src; - wxEvtHandler *dest; - src = (wxRadioButton *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxRadioButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxRadioButton(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) -static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioButton * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = 0; - wxValidator * _arg6 = &wxPyDefaultValidator; - char * _arg7 = "radioButton"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char * _argc6 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|sslss:new_wxRadioButton",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_arg5,&_argc6,&_arg7)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxRadioButton. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxRadioButton. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxRadioButton. Expected _wxSize_p."); - return NULL; - } - } - if (_argc6) { - if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxRadioButton. Expected _wxValidator_p."); - return NULL; - } - } - _result = (wxRadioButton *)new_wxRadioButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxRadioButton_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxRadioButton_GetValue(_swigobj) (_swigobj->GetValue()) -static PyObject *_wrap_wxRadioButton_GetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxRadioButton * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRadioButton_GetValue",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioButton_GetValue. Expected _wxRadioButton_p."); - return NULL; - } - } - _result = (bool )wxRadioButton_GetValue(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRadioButton_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) -static PyObject *_wrap_wxRadioButton_SetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRadioButton * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxRadioButton_SetValue",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioButton_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioButton_SetValue. Expected _wxRadioButton_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxRadioButton_SetValue(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxSliderTowxControl(void *ptr) { - wxSlider *src; - wxControl *dest; - src = (wxSlider *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxSliderTowxWindow(void *ptr) { - wxSlider *src; - wxWindow *dest; - src = (wxSlider *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxSliderTowxEvtHandler(void *ptr) { - wxSlider *src; - wxEvtHandler *dest; - src = (wxSlider *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxSlider(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9) (new wxSlider(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9)) -static PyObject *_wrap_new_wxSlider(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _result; - wxWindow * _arg0; - wxWindowID _arg1; - int _arg2; - int _arg3; - int _arg4; - wxPoint * _arg5 = &wxPyDefaultPosition; - wxSize * _arg6 = &wxPyDefaultSize; - long _arg7 = (wxSL_HORIZONTAL); - wxValidator * _arg8 = &wxPyDefaultValidator; - char * _arg9 = "slider"; - char * _argc0 = 0; - char * _argc5 = 0; - char * _argc6 = 0; - char * _argc8 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siiii|sslss:new_wxSlider",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_argc5,&_argc6,&_arg7,&_argc8,&_arg9)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxSlider. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc5) { - if (SWIG_GetPtr(_argc5,(void **) &_arg5,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of new_wxSlider. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc6) { - if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxSlider. Expected _wxSize_p."); - return NULL; - } - } - if (_argc8) { - if (SWIG_GetPtr(_argc8,(void **) &_arg8,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of new_wxSlider. Expected _wxValidator_p."); - return NULL; - } - } - _result = (wxSlider *)new_wxSlider(_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5,*_arg6,_arg7,*_arg8,_arg9); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxSlider_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxSlider_ClearSel(_swigobj) (_swigobj->ClearSel()) -static PyObject *_wrap_wxSlider_ClearSel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_ClearSel",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_ClearSel. Expected _wxSlider_p."); - return NULL; - } - } - wxSlider_ClearSel(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSlider_ClearTicks(_swigobj) (_swigobj->ClearTicks()) -static PyObject *_wrap_wxSlider_ClearTicks(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_ClearTicks",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_ClearTicks. Expected _wxSlider_p."); - return NULL; - } - } - wxSlider_ClearTicks(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSlider_GetLineSize(_swigobj) (_swigobj->GetLineSize()) -static PyObject *_wrap_wxSlider_GetLineSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_GetLineSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_GetLineSize. Expected _wxSlider_p."); - return NULL; - } - } - _result = (int )wxSlider_GetLineSize(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSlider_GetMax(_swigobj) (_swigobj->GetMax()) -static PyObject *_wrap_wxSlider_GetMax(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_GetMax",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_GetMax. Expected _wxSlider_p."); - return NULL; - } - } - _result = (int )wxSlider_GetMax(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSlider_GetMin(_swigobj) (_swigobj->GetMin()) -static PyObject *_wrap_wxSlider_GetMin(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_GetMin",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_GetMin. Expected _wxSlider_p."); - return NULL; - } - } - _result = (int )wxSlider_GetMin(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSlider_GetPageSize(_swigobj) (_swigobj->GetPageSize()) -static PyObject *_wrap_wxSlider_GetPageSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_GetPageSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_GetPageSize. Expected _wxSlider_p."); - return NULL; - } - } - _result = (int )wxSlider_GetPageSize(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSlider_GetSelEnd(_swigobj) (_swigobj->GetSelEnd()) -static PyObject *_wrap_wxSlider_GetSelEnd(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_GetSelEnd",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_GetSelEnd. Expected _wxSlider_p."); - return NULL; - } - } - _result = (int )wxSlider_GetSelEnd(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSlider_GetSelStart(_swigobj) (_swigobj->GetSelStart()) -static PyObject *_wrap_wxSlider_GetSelStart(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_GetSelStart",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_GetSelStart. Expected _wxSlider_p."); - return NULL; - } - } - _result = (int )wxSlider_GetSelStart(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSlider_GetThumbLength(_swigobj) (_swigobj->GetThumbLength()) -static PyObject *_wrap_wxSlider_GetThumbLength(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_GetThumbLength",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_GetThumbLength. Expected _wxSlider_p."); - return NULL; - } - } - _result = (int )wxSlider_GetThumbLength(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSlider_GetTickFreq(_swigobj) (_swigobj->GetTickFreq()) -static PyObject *_wrap_wxSlider_GetTickFreq(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_GetTickFreq",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_GetTickFreq. Expected _wxSlider_p."); - return NULL; - } - } - _result = (int )wxSlider_GetTickFreq(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSlider_GetValue(_swigobj) (_swigobj->GetValue()) -static PyObject *_wrap_wxSlider_GetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxSlider * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSlider_GetValue",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_GetValue. Expected _wxSlider_p."); - return NULL; - } - } - _result = (int )wxSlider_GetValue(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSlider_SetRange(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRange(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxSlider_SetRange(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxSlider_SetRange",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_SetRange. Expected _wxSlider_p."); - return NULL; - } - } - wxSlider_SetRange(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSlider_SetTickFreq(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetTickFreq(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxSlider_SetTickFreq(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxSlider_SetTickFreq",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_SetTickFreq. Expected _wxSlider_p."); - return NULL; - } - } - wxSlider_SetTickFreq(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSlider_SetLineSize(_swigobj,_swigarg0) (_swigobj->SetLineSize(_swigarg0)) -static PyObject *_wrap_wxSlider_SetLineSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxSlider_SetLineSize",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_SetLineSize. Expected _wxSlider_p."); - return NULL; - } - } - wxSlider_SetLineSize(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSlider_SetPageSize(_swigobj,_swigarg0) (_swigobj->SetPageSize(_swigarg0)) -static PyObject *_wrap_wxSlider_SetPageSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxSlider_SetPageSize",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_SetPageSize. Expected _wxSlider_p."); - return NULL; - } - } - wxSlider_SetPageSize(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSlider_SetSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSelection(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxSlider_SetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxSlider_SetSelection",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_SetSelection. Expected _wxSlider_p."); - return NULL; - } - } - wxSlider_SetSelection(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSlider_SetThumbLength(_swigobj,_swigarg0) (_swigobj->SetThumbLength(_swigarg0)) -static PyObject *_wrap_wxSlider_SetThumbLength(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxSlider_SetThumbLength",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_SetThumbLength. Expected _wxSlider_p."); - return NULL; - } - } - wxSlider_SetThumbLength(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSlider_SetTick(_swigobj,_swigarg0) (_swigobj->SetTick(_swigarg0)) -static PyObject *_wrap_wxSlider_SetTick(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxSlider_SetTick",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_SetTick. Expected _wxSlider_p."); - return NULL; - } - } - wxSlider_SetTick(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSlider_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) -static PyObject *_wrap_wxSlider_SetValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSlider * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxSlider_SetValue",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSlider_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_SetValue. Expected _wxSlider_p."); - return NULL; - } - } - wxSlider_SetValue(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyMethodDef controlscMethods[] = { - { "wxSlider_SetValue", _wrap_wxSlider_SetValue, 1 }, - { "wxSlider_SetTick", _wrap_wxSlider_SetTick, 1 }, - { "wxSlider_SetThumbLength", _wrap_wxSlider_SetThumbLength, 1 }, - { "wxSlider_SetSelection", _wrap_wxSlider_SetSelection, 1 }, - { "wxSlider_SetPageSize", _wrap_wxSlider_SetPageSize, 1 }, - { "wxSlider_SetLineSize", _wrap_wxSlider_SetLineSize, 1 }, - { "wxSlider_SetTickFreq", _wrap_wxSlider_SetTickFreq, 1 }, - { "wxSlider_SetRange", _wrap_wxSlider_SetRange, 1 }, - { "wxSlider_GetValue", _wrap_wxSlider_GetValue, 1 }, - { "wxSlider_GetTickFreq", _wrap_wxSlider_GetTickFreq, 1 }, - { "wxSlider_GetThumbLength", _wrap_wxSlider_GetThumbLength, 1 }, - { "wxSlider_GetSelStart", _wrap_wxSlider_GetSelStart, 1 }, - { "wxSlider_GetSelEnd", _wrap_wxSlider_GetSelEnd, 1 }, - { "wxSlider_GetPageSize", _wrap_wxSlider_GetPageSize, 1 }, - { "wxSlider_GetMin", _wrap_wxSlider_GetMin, 1 }, - { "wxSlider_GetMax", _wrap_wxSlider_GetMax, 1 }, - { "wxSlider_GetLineSize", _wrap_wxSlider_GetLineSize, 1 }, - { "wxSlider_ClearTicks", _wrap_wxSlider_ClearTicks, 1 }, - { "wxSlider_ClearSel", _wrap_wxSlider_ClearSel, 1 }, - { "new_wxSlider", _wrap_new_wxSlider, 1 }, - { "wxRadioButton_SetValue", _wrap_wxRadioButton_SetValue, 1 }, - { "wxRadioButton_GetValue", _wrap_wxRadioButton_GetValue, 1 }, - { "new_wxRadioButton", _wrap_new_wxRadioButton, 1 }, - { "wxRadioBox_ShowItem", _wrap_wxRadioBox_ShowItem, 1 }, - { "wxRadioBox_Show", _wrap_wxRadioBox_Show, 1 }, - { "wxRadioBox_SetStringSelection", _wrap_wxRadioBox_SetStringSelection, 1 }, - { "wxRadioBox_SetSelection", _wrap_wxRadioBox_SetSelection, 1 }, - { "wxRadioBox_SetLabel", _wrap_wxRadioBox_SetLabel, 1 }, - { "wxRadioBox_SetBoxLabel", _wrap_wxRadioBox_SetBoxLabel, 1 }, - { "wxRadioBox_Number", _wrap_wxRadioBox_Number, 1 }, - { "wxRadioBox_GetStringSelection", _wrap_wxRadioBox_GetStringSelection, 1 }, - { "wxRadioBox_GetString", _wrap_wxRadioBox_GetString, 1 }, - { "wxRadioBox_GetSelection", _wrap_wxRadioBox_GetSelection, 1 }, - { "wxRadioBox_GetLabel", _wrap_wxRadioBox_GetLabel, 1 }, - { "wxRadioBox_GetBoxLabel", _wrap_wxRadioBox_GetBoxLabel, 1 }, - { "wxRadioBox_FindString", _wrap_wxRadioBox_FindString, 1 }, - { "wxRadioBox_Enable", _wrap_wxRadioBox_Enable, 1 }, - { "wxRadioBox_EnableBox", _wrap_wxRadioBox_EnableBox, 1 }, - { "new_wxRadioBox", _wrap_new_wxRadioBox, 1 }, - { "wxStaticBitmap_SetBitmap", _wrap_wxStaticBitmap_SetBitmap, 1 }, - { "wxStaticBitmap_GetBitmap", _wrap_wxStaticBitmap_GetBitmap, 1 }, - { "new_wxStaticBitmap", _wrap_new_wxStaticBitmap, 1 }, - { "wxSpinButton_SetValue", _wrap_wxSpinButton_SetValue, 1 }, - { "wxSpinButton_SetRange", _wrap_wxSpinButton_SetRange, 1 }, - { "wxSpinButton_GetValue", _wrap_wxSpinButton_GetValue, 1 }, - { "wxSpinButton_GetMin", _wrap_wxSpinButton_GetMin, 1 }, - { "wxSpinButton_GetMax", _wrap_wxSpinButton_GetMax, 1 }, - { "new_wxSpinButton", _wrap_new_wxSpinButton, 1 }, - { "wxScrollBar_SetScrollbar", _wrap_wxScrollBar_SetScrollbar, 1 }, - { "wxScrollBar_SetPosition", _wrap_wxScrollBar_SetPosition, 1 }, - { "wxScrollBar_GetThumbSize", _wrap_wxScrollBar_GetThumbSize, 1 }, - { "wxScrollBar_GetPosition", _wrap_wxScrollBar_GetPosition, 1 }, - { "wxScrollBar_GetPageSize", _wrap_wxScrollBar_GetPageSize, 1 }, - { "wxScrollBar_GetRange", _wrap_wxScrollBar_GetRange, 1 }, - { "new_wxScrollBar", _wrap_new_wxScrollBar, 1 }, - { "wxTextCtrl_XYToPosition", _wrap_wxTextCtrl_XYToPosition, 1 }, - { "wxTextCtrl_WriteText", _wrap_wxTextCtrl_WriteText, 1 }, - { "wxTextCtrl_ShowPosition", _wrap_wxTextCtrl_ShowPosition, 1 }, - { "wxTextCtrl_SetValue", _wrap_wxTextCtrl_SetValue, 1 }, - { "wxTextCtrl_SetSelection", _wrap_wxTextCtrl_SetSelection, 1 }, - { "wxTextCtrl_SetInsertionPointEnd", _wrap_wxTextCtrl_SetInsertionPointEnd, 1 }, - { "wxTextCtrl_SetInsertionPoint", _wrap_wxTextCtrl_SetInsertionPoint, 1 }, - { "wxTextCtrl_SetEditable", _wrap_wxTextCtrl_SetEditable, 1 }, - { "wxTextCtrl_SaveFile", _wrap_wxTextCtrl_SaveFile, 1 }, - { "wxTextCtrl_Replace", _wrap_wxTextCtrl_Replace, 1 }, - { "wxTextCtrl_Remove", _wrap_wxTextCtrl_Remove, 1 }, - { "wxTextCtrl_PositionToXY", _wrap_wxTextCtrl_PositionToXY, 1 }, - { "wxTextCtrl_Paste", _wrap_wxTextCtrl_Paste, 1 }, - { "wxTextCtrl_LoadFile", _wrap_wxTextCtrl_LoadFile, 1 }, - { "wxTextCtrl_IsModified", _wrap_wxTextCtrl_IsModified, 1 }, - { "wxTextCtrl_GetValue", _wrap_wxTextCtrl_GetValue, 1 }, - { "wxTextCtrl_GetNumberOfLines", _wrap_wxTextCtrl_GetNumberOfLines, 1 }, - { "wxTextCtrl_GetLineText", _wrap_wxTextCtrl_GetLineText, 1 }, - { "wxTextCtrl_GetLineLength", _wrap_wxTextCtrl_GetLineLength, 1 }, - { "wxTextCtrl_GetLastPosition", _wrap_wxTextCtrl_GetLastPosition, 1 }, - { "wxTextCtrl_GetInsertionPoint", _wrap_wxTextCtrl_GetInsertionPoint, 1 }, - { "wxTextCtrl_DiscardEdits", _wrap_wxTextCtrl_DiscardEdits, 1 }, - { "wxTextCtrl_Cut", _wrap_wxTextCtrl_Cut, 1 }, - { "wxTextCtrl_Copy", _wrap_wxTextCtrl_Copy, 1 }, - { "wxTextCtrl_Clear", _wrap_wxTextCtrl_Clear, 1 }, - { "new_wxTextCtrl", _wrap_new_wxTextCtrl, 1 }, - { "wxListBox_SetStringSelection", _wrap_wxListBox_SetStringSelection, 1 }, - { "wxListBox_SetString", _wrap_wxListBox_SetString, 1 }, - { "wxListBox_SetSelection", _wrap_wxListBox_SetSelection, 1 }, - { "wxListBox_SetFirstItemStr", _wrap_wxListBox_SetFirstItemStr, 1 }, - { "wxListBox_SetFirstItem", _wrap_wxListBox_SetFirstItem, 1 }, - { "wxListBox_Set", _wrap_wxListBox_Set, 1 }, - { "wxListBox_Selected", _wrap_wxListBox_Selected, 1 }, - { "wxListBox_Number", _wrap_wxListBox_Number, 1 }, - { "wxListBox_GetStringSelection", _wrap_wxListBox_GetStringSelection, 1 }, - { "wxListBox_GetString", _wrap_wxListBox_GetString, 1 }, - { "wxListBox_GetSelection", _wrap_wxListBox_GetSelection, 1 }, - { "wxListBox_FindString", _wrap_wxListBox_FindString, 1 }, - { "wxListBox_Deselect", _wrap_wxListBox_Deselect, 1 }, - { "wxListBox_Delete", _wrap_wxListBox_Delete, 1 }, - { "wxListBox_Clear", _wrap_wxListBox_Clear, 1 }, - { "wxListBox_Append", _wrap_wxListBox_Append, 1 }, - { "new_wxListBox", _wrap_new_wxListBox, 1 }, - { "wxStaticText_SetLabel", _wrap_wxStaticText_SetLabel, 1 }, - { "wxStaticText_GetLabel", _wrap_wxStaticText_GetLabel, 1 }, - { "new_wxStaticText", _wrap_new_wxStaticText, 1 }, - { "new_wxStaticBox", _wrap_new_wxStaticBox, 1 }, - { "wxGauge_SetValue", _wrap_wxGauge_SetValue, 1 }, - { "wxGauge_SetShadowWidth", _wrap_wxGauge_SetShadowWidth, 1 }, - { "wxGauge_SetRange", _wrap_wxGauge_SetRange, 1 }, - { "wxGauge_SetBezelFace", _wrap_wxGauge_SetBezelFace, 1 }, - { "wxGauge_GetValue", _wrap_wxGauge_GetValue, 1 }, - { "wxGauge_GetShadowWidth", _wrap_wxGauge_GetShadowWidth, 1 }, - { "wxGauge_GetRange", _wrap_wxGauge_GetRange, 1 }, - { "wxGauge_GetBezelFace", _wrap_wxGauge_GetBezelFace, 1 }, - { "new_wxGauge", _wrap_new_wxGauge, 1 }, - { "wxComboBox_SetValue", _wrap_wxComboBox_SetValue, 1 }, - { "wxComboBox_SetMark", _wrap_wxComboBox_SetMark, 1 }, - { "wxComboBox_SetSelection", _wrap_wxComboBox_SetSelection, 1 }, - { "wxComboBox_SetInsertionPointEnd", _wrap_wxComboBox_SetInsertionPointEnd, 1 }, - { "wxComboBox_SetInsertionPoint", _wrap_wxComboBox_SetInsertionPoint, 1 }, - { "wxComboBox_Remove", _wrap_wxComboBox_Remove, 1 }, - { "wxComboBox_Replace", _wrap_wxComboBox_Replace, 1 }, - { "wxComboBox_Paste", _wrap_wxComboBox_Paste, 1 }, - { "wxComboBox_Number", _wrap_wxComboBox_Number, 1 }, - { "wxComboBox_GetValue", _wrap_wxComboBox_GetValue, 1 }, - { "wxComboBox_GetStringSelection", _wrap_wxComboBox_GetStringSelection, 1 }, - { "wxComboBox_GetString", _wrap_wxComboBox_GetString, 1 }, - { "wxComboBox_GetSelection", _wrap_wxComboBox_GetSelection, 1 }, - { "wxComboBox_GetLastPosition", _wrap_wxComboBox_GetLastPosition, 1 }, - { "wxComboBox_GetInsertionPoint", _wrap_wxComboBox_GetInsertionPoint, 1 }, - { "wxComboBox_FindString", _wrap_wxComboBox_FindString, 1 }, - { "wxComboBox_Delete", _wrap_wxComboBox_Delete, 1 }, - { "wxComboBox_Cut", _wrap_wxComboBox_Cut, 1 }, - { "wxComboBox_Copy", _wrap_wxComboBox_Copy, 1 }, - { "wxComboBox_Clear", _wrap_wxComboBox_Clear, 1 }, - { "wxComboBox_Append", _wrap_wxComboBox_Append, 1 }, - { "new_wxComboBox", _wrap_new_wxComboBox, 1 }, - { "wxChoice_SetStringSelection", _wrap_wxChoice_SetStringSelection, 1 }, - { "wxChoice_SetSelection", _wrap_wxChoice_SetSelection, 1 }, - { "wxChoice_SetColumns", _wrap_wxChoice_SetColumns, 1 }, - { "wxChoice_Number", _wrap_wxChoice_Number, 1 }, - { "wxChoice_GetStringSelection", _wrap_wxChoice_GetStringSelection, 1 }, - { "wxChoice_GetString", _wrap_wxChoice_GetString, 1 }, - { "wxChoice_GetSelection", _wrap_wxChoice_GetSelection, 1 }, - { "wxChoice_GetColumns", _wrap_wxChoice_GetColumns, 1 }, - { "wxChoice_FindString", _wrap_wxChoice_FindString, 1 }, - { "wxChoice_Clear", _wrap_wxChoice_Clear, 1 }, - { "wxChoice_Append", _wrap_wxChoice_Append, 1 }, - { "new_wxChoice", _wrap_new_wxChoice, 1 }, - { "wxCheckBox_SetValue", _wrap_wxCheckBox_SetValue, 1 }, - { "wxCheckBox_GetValue", _wrap_wxCheckBox_GetValue, 1 }, - { "new_wxCheckBox", _wrap_new_wxCheckBox, 1 }, - { "wxBitmapButton_SetBitmapLabel", _wrap_wxBitmapButton_SetBitmapLabel, 1 }, - { "wxBitmapButton_SetBitmapSelected", _wrap_wxBitmapButton_SetBitmapSelected, 1 }, - { "wxBitmapButton_SetBitmapFocus", _wrap_wxBitmapButton_SetBitmapFocus, 1 }, - { "wxBitmapButton_SetBitmapDisabled", _wrap_wxBitmapButton_SetBitmapDisabled, 1 }, - { "wxBitmapButton_GetBitmapSelected", _wrap_wxBitmapButton_GetBitmapSelected, 1 }, - { "wxBitmapButton_GetBitmapFocus", _wrap_wxBitmapButton_GetBitmapFocus, 1 }, - { "wxBitmapButton_GetBitmapDisabled", _wrap_wxBitmapButton_GetBitmapDisabled, 1 }, - { "wxBitmapButton_GetBitmapLabel", _wrap_wxBitmapButton_GetBitmapLabel, 1 }, - { "new_wxBitmapButton", _wrap_new_wxBitmapButton, 1 }, - { "wxButton_SetDefault", _wrap_wxButton_SetDefault, 1 }, - { "new_wxButton", _wrap_new_wxButton, 1 }, - { "wxControl_SetLabel", _wrap_wxControl_SetLabel, 1 }, - { "wxControl_GetLabel", _wrap_wxControl_GetLabel, 1 }, - { "wxControl_Command", _wrap_wxControl_Command, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initcontrolsc)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("controlsc", controlscMethods); - d = PyModule_GetDict(m); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_wxAcceleratorTable","_class_wxAcceleratorTable",0); - SWIG_RegisterMapping("_wxEvent","_class_wxEvent",0); - SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0); - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0); - SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxSlider",SwigwxSliderTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxSlider",SwigwxSliderTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxRadioButton",SwigwxRadioButtonTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxRadioButton",SwigwxRadioButtonTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxRadioBox",SwigwxRadioBoxTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxRadioBox",SwigwxRadioBoxTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxStaticBitmap",SwigwxStaticBitmapTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxStaticBitmap",SwigwxStaticBitmapTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxSpinButton",SwigwxSpinButtonTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxSpinButton",SwigwxSpinButtonTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxScrollBar",SwigwxScrollBarTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxScrollBar",SwigwxScrollBarTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxTextCtrl",SwigwxTextCtrlTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxTextCtrl",SwigwxTextCtrlTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxListBox",SwigwxListBoxTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxListBox",SwigwxListBoxTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxStaticText",SwigwxStaticTextTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxStaticText",SwigwxStaticTextTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxStaticBox",SwigwxStaticBoxTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxStaticBox",SwigwxStaticBoxTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxGauge",SwigwxGaugeTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxGauge",SwigwxGaugeTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxComboBox",SwigwxComboBoxTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxComboBox",SwigwxComboBoxTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxChoice",SwigwxChoiceTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxChoice",SwigwxChoiceTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxCheckBox",SwigwxCheckBoxTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxCheckBox",SwigwxCheckBoxTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxBitmapButton",SwigwxBitmapButtonTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxBitmapButton",SwigwxBitmapButtonTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxButton",SwigwxButtonTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxButton",SwigwxButtonTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxControl",SwigwxControlTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxControl",SwigwxControlTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxEvtHandler",0); - SWIG_RegisterMapping("_wxPaintEvent","_class_wxPaintEvent",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); - SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); - SWIG_RegisterMapping("_wxPen","_class_wxPen",0); - SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_wxStaticBox","_class_wxStaticBox",0); - SWIG_RegisterMapping("_wxChoice","_class_wxChoice",0); - SWIG_RegisterMapping("_wxSlider","_class_wxSlider",0); - SWIG_RegisterMapping("_long","_wxDash",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_wxDropFilesEvent","_class_wxDropFilesEvent",0); - SWIG_RegisterMapping("_wxBitmapButton","_class_wxBitmapButton",0); - SWIG_RegisterMapping("_class_wxAcceleratorTable","_wxAcceleratorTable",0); - SWIG_RegisterMapping("_class_wxGauge","_wxGauge",0); - SWIG_RegisterMapping("_wxDC","_class_wxDC",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_wxPrinterDC","_class_wxPrinterDC",0); - SWIG_RegisterMapping("_class_wxMenuItem","_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxPaintEvent","_wxPaintEvent",0); - SWIG_RegisterMapping("_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxPanel","_class_wxPanel",0); - SWIG_RegisterMapping("_wxInitDialogEvent","_class_wxInitDialogEvent",0); - SWIG_RegisterMapping("_wxCheckBox","_class_wxCheckBox",0); - SWIG_RegisterMapping("_wxTextCtrl","_class_wxTextCtrl",0); - SWIG_RegisterMapping("_class_wxMask","_wxMask",0); - SWIG_RegisterMapping("_class_wxKeyEvent","_wxKeyEvent",0); - SWIG_RegisterMapping("_wxColour","_class_wxColour",0); - SWIG_RegisterMapping("_class_wxDialog","_wxDialog",0); - SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); - SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); - SWIG_RegisterMapping("_wxMiniFrame","_class_wxMiniFrame",0); - SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxEvent","_wxEvent",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxCommandEvent","_class_wxCommandEvent",0); - SWIG_RegisterMapping("_wxSizeEvent","_class_wxSizeEvent",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_class_wxButton","_class_wxBitmapButton",SwigwxBitmapButtonTowxButton); - SWIG_RegisterMapping("_class_wxButton","_wxBitmapButton",SwigwxBitmapButtonTowxButton); - SWIG_RegisterMapping("_class_wxButton","_wxButton",0); - SWIG_RegisterMapping("_wxRadioBox","_class_wxRadioBox",0); - SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_wxScrollBar","_class_wxScrollBar",0); - SWIG_RegisterMapping("_wxSpinButton","_class_wxSpinButton",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0); - SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0); - SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxDropFilesEvent","_wxDropFilesEvent",0); - SWIG_RegisterMapping("_wxStaticText","_class_wxStaticText",0); - SWIG_RegisterMapping("_wxFont","_class_wxFont",0); - SWIG_RegisterMapping("_wxCloseEvent","_class_wxCloseEvent",0); - SWIG_RegisterMapping("_unsigned_long","_wxDash",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxDC","_wxDC",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_wxFocusEvent","_class_wxFocusEvent",0); - SWIG_RegisterMapping("_wxMaximizeEvent","_class_wxMaximizeEvent",0); - SWIG_RegisterMapping("_class_wxSpinButton","_wxSpinButton",0); - SWIG_RegisterMapping("_wxAcceleratorEntry","_class_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_class_wxPanel","_wxPanel",0); - SWIG_RegisterMapping("_class_wxCheckBox","_wxCheckBox",0); - SWIG_RegisterMapping("_wxComboBox","_class_wxComboBox",0); - SWIG_RegisterMapping("_wxRadioButton","_class_wxRadioButton",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_class_wxTextCtrl","_wxTextCtrl",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxMetaFileDC","_class_wxMetaFileDC",0); - SWIG_RegisterMapping("_wxMenu","_class_wxMenu",0); - SWIG_RegisterMapping("_class_wxMoveEvent","_wxMoveEvent",0); - SWIG_RegisterMapping("_wxListBox","_class_wxListBox",0); - SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_class_wxBrush","_wxBrush",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxWindow","_class_wxSlider",SwigwxSliderTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxSlider",SwigwxSliderTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxRadioButton",SwigwxRadioButtonTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxRadioButton",SwigwxRadioButtonTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxRadioBox",SwigwxRadioBoxTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxRadioBox",SwigwxRadioBoxTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxStaticBitmap",SwigwxStaticBitmapTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxStaticBitmap",SwigwxStaticBitmapTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxSpinButton",SwigwxSpinButtonTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxSpinButton",SwigwxSpinButtonTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxScrollBar",SwigwxScrollBarTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxScrollBar",SwigwxScrollBarTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxTextCtrl",SwigwxTextCtrlTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxTextCtrl",SwigwxTextCtrlTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxListBox",SwigwxListBoxTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxListBox",SwigwxListBoxTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxStaticText",SwigwxStaticTextTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxStaticText",SwigwxStaticTextTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxStaticBox",SwigwxStaticBoxTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxStaticBox",SwigwxStaticBoxTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxGauge",SwigwxGaugeTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxGauge",SwigwxGaugeTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxComboBox",SwigwxComboBoxTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxComboBox",SwigwxComboBoxTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxChoice",SwigwxChoiceTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxChoice",SwigwxChoiceTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxCheckBox",SwigwxCheckBoxTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxCheckBox",SwigwxCheckBoxTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxBitmapButton",SwigwxBitmapButtonTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxBitmapButton",SwigwxBitmapButtonTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxButton",SwigwxButtonTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxButton",SwigwxButtonTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxControl",SwigwxControlTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxControl",SwigwxControlTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxWindow",0); - SWIG_RegisterMapping("_class_wxStaticText","_wxStaticText",0); - SWIG_RegisterMapping("_class_wxFont","_wxFont",0); - SWIG_RegisterMapping("_class_wxCloseEvent","_wxCloseEvent",0); - SWIG_RegisterMapping("_class_wxMenuEvent","_wxMenuEvent",0); - SWIG_RegisterMapping("_wxClientDC","_class_wxClientDC",0); - SWIG_RegisterMapping("_wxMouseEvent","_class_wxMouseEvent",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_class_wxRadioBox","_wxRadioBox",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_wxMemoryDC","_class_wxMemoryDC",0); - SWIG_RegisterMapping("_wxPaintDC","_class_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxFocusEvent","_wxFocusEvent",0); - SWIG_RegisterMapping("_class_wxMaximizeEvent","_wxMaximizeEvent",0); - SWIG_RegisterMapping("_class_wxAcceleratorEntry","_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); - SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_class_wxMetaFileDC","_wxMetaFileDC",0); - SWIG_RegisterMapping("_class_wxMenu","_wxMenu",0); - SWIG_RegisterMapping("_wxControl","_class_wxSlider",SwigwxSliderTowxControl); - SWIG_RegisterMapping("_wxControl","_wxSlider",SwigwxSliderTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxRadioButton",SwigwxRadioButtonTowxControl); - SWIG_RegisterMapping("_wxControl","_wxRadioButton",SwigwxRadioButtonTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxRadioBox",SwigwxRadioBoxTowxControl); - SWIG_RegisterMapping("_wxControl","_wxRadioBox",SwigwxRadioBoxTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxStaticBitmap",SwigwxStaticBitmapTowxControl); - SWIG_RegisterMapping("_wxControl","_wxStaticBitmap",SwigwxStaticBitmapTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxSpinButton",SwigwxSpinButtonTowxControl); - SWIG_RegisterMapping("_wxControl","_wxSpinButton",SwigwxSpinButtonTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxScrollBar",SwigwxScrollBarTowxControl); - SWIG_RegisterMapping("_wxControl","_wxScrollBar",SwigwxScrollBarTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxTextCtrl",SwigwxTextCtrlTowxControl); - SWIG_RegisterMapping("_wxControl","_wxTextCtrl",SwigwxTextCtrlTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxListBox",SwigwxListBoxTowxControl); - SWIG_RegisterMapping("_wxControl","_wxListBox",SwigwxListBoxTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxStaticText",SwigwxStaticTextTowxControl); - SWIG_RegisterMapping("_wxControl","_wxStaticText",SwigwxStaticTextTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxStaticBox",SwigwxStaticBoxTowxControl); - SWIG_RegisterMapping("_wxControl","_wxStaticBox",SwigwxStaticBoxTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxGauge",SwigwxGaugeTowxControl); - SWIG_RegisterMapping("_wxControl","_wxGauge",SwigwxGaugeTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxComboBox",SwigwxComboBoxTowxControl); - SWIG_RegisterMapping("_wxControl","_wxComboBox",SwigwxComboBoxTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxChoice",SwigwxChoiceTowxControl); - SWIG_RegisterMapping("_wxControl","_wxChoice",SwigwxChoiceTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxCheckBox",SwigwxCheckBoxTowxControl); - SWIG_RegisterMapping("_wxControl","_wxCheckBox",SwigwxCheckBoxTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxBitmapButton",SwigwxBitmapButtonTowxControl); - SWIG_RegisterMapping("_wxControl","_wxBitmapButton",SwigwxBitmapButtonTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxButton",SwigwxButtonTowxControl); - SWIG_RegisterMapping("_wxControl","_wxButton",SwigwxButtonTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxControl",0); - SWIG_RegisterMapping("_class_wxListBox","_wxListBox",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); - SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); - SWIG_RegisterMapping("_class_wxPen","_wxPen",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_class_wxStaticBox","_wxStaticBox",0); - SWIG_RegisterMapping("_class_wxScrollEvent","_wxScrollEvent",0); - SWIG_RegisterMapping("_wxJoystickEvent","_class_wxJoystickEvent",0); - SWIG_RegisterMapping("_class_wxChoice","_wxChoice",0); - SWIG_RegisterMapping("_class_wxSlider","_wxSlider",0); - SWIG_RegisterMapping("_class_wxBitmapButton","_wxBitmapButton",0); - SWIG_RegisterMapping("_wxFrame","_class_wxFrame",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_class_wxMouseEvent","_wxMouseEvent",0); - SWIG_RegisterMapping("_wxButton","_class_wxBitmapButton",SwigwxBitmapButtonTowxButton); - SWIG_RegisterMapping("_wxButton","_wxBitmapButton",SwigwxBitmapButtonTowxButton); - SWIG_RegisterMapping("_wxButton","_class_wxButton",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxPrinterDC","_wxPrinterDC",0); - SWIG_RegisterMapping("_class_wxPaintDC","_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_class_wxInitDialogEvent","_wxInitDialogEvent",0); - SWIG_RegisterMapping("_class_wxComboBox","_wxComboBox",0); - SWIG_RegisterMapping("_class_wxRadioButton","_wxRadioButton",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxIconizeEvent","_class_wxIconizeEvent",0); - SWIG_RegisterMapping("_class_wxControl","_class_wxSlider",SwigwxSliderTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxSlider",SwigwxSliderTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxRadioButton",SwigwxRadioButtonTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxRadioButton",SwigwxRadioButtonTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxRadioBox",SwigwxRadioBoxTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxRadioBox",SwigwxRadioBoxTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxStaticBitmap",SwigwxStaticBitmapTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxStaticBitmap",SwigwxStaticBitmapTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxSpinButton",SwigwxSpinButtonTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxSpinButton",SwigwxSpinButtonTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxScrollBar",SwigwxScrollBarTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxScrollBar",SwigwxScrollBarTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxTextCtrl",SwigwxTextCtrlTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxTextCtrl",SwigwxTextCtrlTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxListBox",SwigwxListBoxTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxListBox",SwigwxListBoxTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxStaticText",SwigwxStaticTextTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxStaticText",SwigwxStaticTextTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxStaticBox",SwigwxStaticBoxTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxStaticBox",SwigwxStaticBoxTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxGauge",SwigwxGaugeTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxGauge",SwigwxGaugeTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxComboBox",SwigwxComboBoxTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxComboBox",SwigwxComboBoxTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxChoice",SwigwxChoiceTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxChoice",SwigwxChoiceTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxCheckBox",SwigwxCheckBoxTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxCheckBox",SwigwxCheckBoxTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxBitmapButton",SwigwxBitmapButtonTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxBitmapButton",SwigwxBitmapButtonTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxButton",SwigwxButtonTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxButton",SwigwxButtonTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxControl",0); - SWIG_RegisterMapping("_wxStaticBitmap","_class_wxStaticBitmap",0); - SWIG_RegisterMapping("_class_wxIcon","_wxIcon",0); - SWIG_RegisterMapping("_class_wxColour","_wxColour",0); - SWIG_RegisterMapping("_class_wxScreenDC","_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxIdleEvent","_wxIdleEvent",0); - SWIG_RegisterMapping("_wxEraseEvent","_class_wxEraseEvent",0); - SWIG_RegisterMapping("_class_wxMiniFrame","_wxMiniFrame",0); - SWIG_RegisterMapping("_class_wxJoystickEvent","_wxJoystickEvent",0); - SWIG_RegisterMapping("_class_wxShowEvent","_wxShowEvent",0); - SWIG_RegisterMapping("_wxActivateEvent","_class_wxActivateEvent",0); - SWIG_RegisterMapping("_wxGauge","_class_wxGauge",0); - SWIG_RegisterMapping("_class_wxCommandEvent","_wxCommandEvent",0); - SWIG_RegisterMapping("_class_wxClientDC","_wxClientDC",0); - SWIG_RegisterMapping("_class_wxSizeEvent","_wxSizeEvent",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); - SWIG_RegisterMapping("_class_wxBitmap","_wxBitmap",0); - SWIG_RegisterMapping("_class_wxMemoryDC","_wxMemoryDC",0); - SWIG_RegisterMapping("_wxMenuBar","_class_wxMenuBar",0); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxSlider",SwigwxSliderTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxSlider",SwigwxSliderTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxRadioButton",SwigwxRadioButtonTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxRadioButton",SwigwxRadioButtonTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxRadioBox",SwigwxRadioBoxTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxRadioBox",SwigwxRadioBoxTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxStaticBitmap",SwigwxStaticBitmapTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxStaticBitmap",SwigwxStaticBitmapTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxSpinButton",SwigwxSpinButtonTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxSpinButton",SwigwxSpinButtonTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxScrollBar",SwigwxScrollBarTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxScrollBar",SwigwxScrollBarTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxTextCtrl",SwigwxTextCtrlTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxTextCtrl",SwigwxTextCtrlTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxListBox",SwigwxListBoxTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxListBox",SwigwxListBoxTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxStaticText",SwigwxStaticTextTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxStaticText",SwigwxStaticTextTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxStaticBox",SwigwxStaticBoxTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxStaticBox",SwigwxStaticBoxTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxGauge",SwigwxGaugeTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxGauge",SwigwxGaugeTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxComboBox",SwigwxComboBoxTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxComboBox",SwigwxComboBoxTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxChoice",SwigwxChoiceTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxChoice",SwigwxChoiceTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxCheckBox",SwigwxCheckBoxTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxCheckBox",SwigwxCheckBoxTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxBitmapButton",SwigwxBitmapButtonTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxBitmapButton",SwigwxBitmapButtonTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxButton",SwigwxButtonTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxButton",SwigwxButtonTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxControl",SwigwxControlTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxControl",SwigwxControlTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxEvtHandler",0); - SWIG_RegisterMapping("_wxMenuItem","_class_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxScrollBar","_wxScrollBar",0); - SWIG_RegisterMapping("_wxDash","_unsigned_long",0); - SWIG_RegisterMapping("_wxDash","_long",0); - SWIG_RegisterMapping("_class_wxScrolledWindow","_wxScrolledWindow",0); - SWIG_RegisterMapping("_wxKeyEvent","_class_wxKeyEvent",0); - SWIG_RegisterMapping("_wxMoveEvent","_class_wxMoveEvent",0); - SWIG_RegisterMapping("_class_wxEraseEvent","_wxEraseEvent",0); - SWIG_RegisterMapping("_wxWindow","_class_wxSlider",SwigwxSliderTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxSlider",SwigwxSliderTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxRadioButton",SwigwxRadioButtonTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxRadioButton",SwigwxRadioButtonTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxRadioBox",SwigwxRadioBoxTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxRadioBox",SwigwxRadioBoxTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxStaticBitmap",SwigwxStaticBitmapTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxStaticBitmap",SwigwxStaticBitmapTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxSpinButton",SwigwxSpinButtonTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxSpinButton",SwigwxSpinButtonTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxScrollBar",SwigwxScrollBarTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxScrollBar",SwigwxScrollBarTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxTextCtrl",SwigwxTextCtrlTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxTextCtrl",SwigwxTextCtrlTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxListBox",SwigwxListBoxTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxListBox",SwigwxListBoxTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxStaticText",SwigwxStaticTextTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxStaticText",SwigwxStaticTextTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxStaticBox",SwigwxStaticBoxTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxStaticBox",SwigwxStaticBoxTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxGauge",SwigwxGaugeTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxGauge",SwigwxGaugeTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxComboBox",SwigwxComboBoxTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxComboBox",SwigwxComboBoxTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxChoice",SwigwxChoiceTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxChoice",SwigwxChoiceTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxCheckBox",SwigwxCheckBoxTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxCheckBox",SwigwxCheckBoxTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxBitmapButton",SwigwxBitmapButtonTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxBitmapButton",SwigwxBitmapButtonTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxButton",SwigwxButtonTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxButton",SwigwxButtonTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxControl",SwigwxControlTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxControl",SwigwxControlTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxWindow",0); - SWIG_RegisterMapping("_class_wxFrame","_wxFrame",0); -} diff --git a/utils/wxPython/src/msw/controls.py b/utils/wxPython/src/msw/controls.py deleted file mode 100644 index 75406d9e80..0000000000 --- a/utils/wxPython/src/msw/controls.py +++ /dev/null @@ -1,794 +0,0 @@ -# This file was created automatically by SWIG. -import controlsc - -from misc import * - -from windows import * - -from gdi import * - -from events import * -class wxControlPtr(wxWindowPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Command(self,arg0): - val = controlsc.wxControl_Command(self.this,arg0.this) - return val - def GetLabel(self): - val = controlsc.wxControl_GetLabel(self.this) - return val - def SetLabel(self,arg0): - val = controlsc.wxControl_SetLabel(self.this,arg0) - return val - def __repr__(self): - return "" -class wxControl(wxControlPtr): - def __init__(self,this): - self.this = this - - - - -class wxButtonPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def SetDefault(self): - val = controlsc.wxButton_SetDefault(self.this) - return val - def __repr__(self): - return "" -class wxButton(wxButtonPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxButton,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxBitmapButtonPtr(wxButtonPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetBitmapLabel(self): - val = controlsc.wxBitmapButton_GetBitmapLabel(self.this) - val = wxBitmapPtr(val) - return val - def GetBitmapDisabled(self): - val = controlsc.wxBitmapButton_GetBitmapDisabled(self.this) - val = wxBitmapPtr(val) - return val - def GetBitmapFocus(self): - val = controlsc.wxBitmapButton_GetBitmapFocus(self.this) - val = wxBitmapPtr(val) - return val - def GetBitmapSelected(self): - val = controlsc.wxBitmapButton_GetBitmapSelected(self.this) - val = wxBitmapPtr(val) - return val - def SetBitmapDisabled(self,arg0): - val = controlsc.wxBitmapButton_SetBitmapDisabled(self.this,arg0.this) - return val - def SetBitmapFocus(self,arg0): - val = controlsc.wxBitmapButton_SetBitmapFocus(self.this,arg0.this) - return val - def SetBitmapSelected(self,arg0): - val = controlsc.wxBitmapButton_SetBitmapSelected(self.this,arg0.this) - return val - def SetBitmapLabel(self,arg0): - val = controlsc.wxBitmapButton_SetBitmapLabel(self.this,arg0.this) - return val - def __repr__(self): - return "" -class wxBitmapButton(wxBitmapButtonPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxBitmapButton,(arg0.this,arg1,arg2.this,)+args) - self.thisown = 1 - - - - -class wxCheckBoxPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetValue(self): - val = controlsc.wxCheckBox_GetValue(self.this) - return val - def SetValue(self,arg0): - val = controlsc.wxCheckBox_SetValue(self.this,arg0) - return val - def __repr__(self): - return "" -class wxCheckBox(wxCheckBoxPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxCheckBox,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxChoicePtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Append(self,arg0): - val = controlsc.wxChoice_Append(self.this,arg0) - return val - def Clear(self): - val = controlsc.wxChoice_Clear(self.this) - return val - def FindString(self,arg0): - val = controlsc.wxChoice_FindString(self.this,arg0) - return val - def GetColumns(self): - val = controlsc.wxChoice_GetColumns(self.this) - return val - def GetSelection(self): - val = controlsc.wxChoice_GetSelection(self.this) - return val - def GetString(self,arg0): - val = controlsc.wxChoice_GetString(self.this,arg0) - return val - def GetStringSelection(self): - val = controlsc.wxChoice_GetStringSelection(self.this) - return val - def Number(self): - val = controlsc.wxChoice_Number(self.this) - return val - def SetColumns(self,*args): - val = apply(controlsc.wxChoice_SetColumns,(self.this,)+args) - return val - def SetSelection(self,arg0): - val = controlsc.wxChoice_SetSelection(self.this,arg0) - return val - def SetStringSelection(self,arg0): - val = controlsc.wxChoice_SetStringSelection(self.this,arg0) - return val - def __repr__(self): - return "" -class wxChoice(wxChoicePtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxChoice,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - -class wxComboBoxPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Append(self,arg0): - val = controlsc.wxComboBox_Append(self.this,arg0) - return val - def Clear(self): - val = controlsc.wxComboBox_Clear(self.this) - return val - def Copy(self): - val = controlsc.wxComboBox_Copy(self.this) - return val - def Cut(self): - val = controlsc.wxComboBox_Cut(self.this) - return val - def Delete(self,arg0): - val = controlsc.wxComboBox_Delete(self.this,arg0) - return val - def FindString(self,arg0): - val = controlsc.wxComboBox_FindString(self.this,arg0) - return val - def GetInsertionPoint(self): - val = controlsc.wxComboBox_GetInsertionPoint(self.this) - return val - def GetLastPosition(self): - val = controlsc.wxComboBox_GetLastPosition(self.this) - return val - def GetSelection(self): - val = controlsc.wxComboBox_GetSelection(self.this) - return val - def GetString(self,arg0): - val = controlsc.wxComboBox_GetString(self.this,arg0) - return val - def GetStringSelection(self): - val = controlsc.wxComboBox_GetStringSelection(self.this) - return val - def GetValue(self): - val = controlsc.wxComboBox_GetValue(self.this) - return val - def Number(self): - val = controlsc.wxComboBox_Number(self.this) - return val - def Paste(self): - val = controlsc.wxComboBox_Paste(self.this) - return val - def Replace(self,arg0,arg1,arg2): - val = controlsc.wxComboBox_Replace(self.this,arg0,arg1,arg2) - return val - def Remove(self,arg0,arg1): - val = controlsc.wxComboBox_Remove(self.this,arg0,arg1) - return val - def SetInsertionPoint(self,arg0): - val = controlsc.wxComboBox_SetInsertionPoint(self.this,arg0) - return val - def SetInsertionPointEnd(self): - val = controlsc.wxComboBox_SetInsertionPointEnd(self.this) - return val - def SetSelection(self,arg0,*args): - val = apply(controlsc.wxComboBox_SetSelection,(self.this,arg0,)+args) - return val - def SetMark(self,arg0,arg1): - val = controlsc.wxComboBox_SetMark(self.this,arg0,arg1) - return val - def SetValue(self,arg0): - val = controlsc.wxComboBox_SetValue(self.this,arg0) - return val - def __repr__(self): - return "" -class wxComboBox(wxComboBoxPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxComboBox,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - -class wxGaugePtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetBezelFace(self): - val = controlsc.wxGauge_GetBezelFace(self.this) - return val - def GetRange(self): - val = controlsc.wxGauge_GetRange(self.this) - return val - def GetShadowWidth(self): - val = controlsc.wxGauge_GetShadowWidth(self.this) - return val - def GetValue(self): - val = controlsc.wxGauge_GetValue(self.this) - return val - def SetBezelFace(self,arg0): - val = controlsc.wxGauge_SetBezelFace(self.this,arg0) - return val - def SetRange(self,arg0): - val = controlsc.wxGauge_SetRange(self.this,arg0) - return val - def SetShadowWidth(self,arg0): - val = controlsc.wxGauge_SetShadowWidth(self.this,arg0) - return val - def SetValue(self,arg0): - val = controlsc.wxGauge_SetValue(self.this,arg0) - return val - def __repr__(self): - return "" -class wxGauge(wxGaugePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxGauge,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxStaticBoxPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxStaticBox(wxStaticBoxPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxStaticBox,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxStaticTextPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetLabel(self): - val = controlsc.wxStaticText_GetLabel(self.this) - return val - def SetLabel(self,arg0): - val = controlsc.wxStaticText_SetLabel(self.this,arg0) - return val - def __repr__(self): - return "" -class wxStaticText(wxStaticTextPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxStaticText,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxListBoxPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Append(self,arg0): - val = controlsc.wxListBox_Append(self.this,arg0) - return val - def Clear(self): - val = controlsc.wxListBox_Clear(self.this) - return val - def Delete(self,arg0): - val = controlsc.wxListBox_Delete(self.this,arg0) - return val - def Deselect(self,arg0): - val = controlsc.wxListBox_Deselect(self.this,arg0) - return val - def FindString(self,arg0): - val = controlsc.wxListBox_FindString(self.this,arg0) - return val - def GetSelection(self): - val = controlsc.wxListBox_GetSelection(self.this) - return val - def GetString(self,arg0): - val = controlsc.wxListBox_GetString(self.this,arg0) - return val - def GetStringSelection(self): - val = controlsc.wxListBox_GetStringSelection(self.this) - return val - def Number(self): - val = controlsc.wxListBox_Number(self.this) - return val - def Selected(self,arg0): - val = controlsc.wxListBox_Selected(self.this,arg0) - return val - def Set(self,arg0,*args): - val = apply(controlsc.wxListBox_Set,(self.this,arg0,)+args) - return val - def SetFirstItem(self,arg0): - val = controlsc.wxListBox_SetFirstItem(self.this,arg0) - return val - def SetFirstItemStr(self,arg0): - val = controlsc.wxListBox_SetFirstItemStr(self.this,arg0) - return val - def SetSelection(self,arg0,*args): - val = apply(controlsc.wxListBox_SetSelection,(self.this,arg0,)+args) - return val - def SetString(self,arg0,arg1): - val = controlsc.wxListBox_SetString(self.this,arg0,arg1) - return val - def SetStringSelection(self,arg0,*args): - val = apply(controlsc.wxListBox_SetStringSelection,(self.this,arg0,)+args) - return val - def __repr__(self): - return "" -class wxListBox(wxListBoxPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxListBox,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - -class wxTextCtrlPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Clear(self): - val = controlsc.wxTextCtrl_Clear(self.this) - return val - def Copy(self): - val = controlsc.wxTextCtrl_Copy(self.this) - return val - def Cut(self): - val = controlsc.wxTextCtrl_Cut(self.this) - return val - def DiscardEdits(self): - val = controlsc.wxTextCtrl_DiscardEdits(self.this) - return val - def GetInsertionPoint(self): - val = controlsc.wxTextCtrl_GetInsertionPoint(self.this) - return val - def GetLastPosition(self): - val = controlsc.wxTextCtrl_GetLastPosition(self.this) - return val - def GetLineLength(self,arg0): - val = controlsc.wxTextCtrl_GetLineLength(self.this,arg0) - return val - def GetLineText(self,arg0): - val = controlsc.wxTextCtrl_GetLineText(self.this,arg0) - return val - def GetNumberOfLines(self): - val = controlsc.wxTextCtrl_GetNumberOfLines(self.this) - return val - def GetValue(self): - val = controlsc.wxTextCtrl_GetValue(self.this) - return val - def IsModified(self): - val = controlsc.wxTextCtrl_IsModified(self.this) - return val - def LoadFile(self,arg0): - val = controlsc.wxTextCtrl_LoadFile(self.this,arg0) - return val - def Paste(self): - val = controlsc.wxTextCtrl_Paste(self.this) - return val - def PositionToXY(self,arg0): - val = controlsc.wxTextCtrl_PositionToXY(self.this,arg0) - return val - def Remove(self,arg0,arg1): - val = controlsc.wxTextCtrl_Remove(self.this,arg0,arg1) - return val - def Replace(self,arg0,arg1,arg2): - val = controlsc.wxTextCtrl_Replace(self.this,arg0,arg1,arg2) - return val - def SaveFile(self,arg0): - val = controlsc.wxTextCtrl_SaveFile(self.this,arg0) - return val - def SetEditable(self,arg0): - val = controlsc.wxTextCtrl_SetEditable(self.this,arg0) - return val - def SetInsertionPoint(self,arg0): - val = controlsc.wxTextCtrl_SetInsertionPoint(self.this,arg0) - return val - def SetInsertionPointEnd(self): - val = controlsc.wxTextCtrl_SetInsertionPointEnd(self.this) - return val - def SetSelection(self,arg0,arg1): - val = controlsc.wxTextCtrl_SetSelection(self.this,arg0,arg1) - return val - def SetValue(self,arg0): - val = controlsc.wxTextCtrl_SetValue(self.this,arg0) - return val - def ShowPosition(self,arg0): - val = controlsc.wxTextCtrl_ShowPosition(self.this,arg0) - return val - def WriteText(self,arg0): - val = controlsc.wxTextCtrl_WriteText(self.this,arg0) - return val - def XYToPosition(self,arg0,arg1): - val = controlsc.wxTextCtrl_XYToPosition(self.this,arg0,arg1) - return val - def __repr__(self): - return "" -class wxTextCtrl(wxTextCtrlPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxTextCtrl,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - -class wxScrollBarPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetRange(self): - val = controlsc.wxScrollBar_GetRange(self.this) - return val - def GetPageSize(self): - val = controlsc.wxScrollBar_GetPageSize(self.this) - return val - def GetPosition(self): - val = controlsc.wxScrollBar_GetPosition(self.this) - return val - def GetThumbSize(self): - val = controlsc.wxScrollBar_GetThumbSize(self.this) - return val - def SetPosition(self,arg0): - val = controlsc.wxScrollBar_SetPosition(self.this,arg0) - return val - def SetScrollbar(self,arg0,arg1,arg2,arg3,*args): - val = apply(controlsc.wxScrollBar_SetScrollbar,(self.this,arg0,arg1,arg2,arg3,)+args) - return val - def __repr__(self): - return "" -class wxScrollBar(wxScrollBarPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxScrollBar,(arg0.this,)+args) - self.thisown = 1 - - - - -class wxSpinButtonPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetMax(self): - val = controlsc.wxSpinButton_GetMax(self.this) - return val - def GetMin(self): - val = controlsc.wxSpinButton_GetMin(self.this) - return val - def GetValue(self): - val = controlsc.wxSpinButton_GetValue(self.this) - return val - def SetRange(self,arg0,arg1): - val = controlsc.wxSpinButton_SetRange(self.this,arg0,arg1) - return val - def SetValue(self,arg0): - val = controlsc.wxSpinButton_SetValue(self.this,arg0) - return val - def __repr__(self): - return "" -class wxSpinButton(wxSpinButtonPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxSpinButton,(arg0.this,)+args) - self.thisown = 1 - - - - -class wxStaticBitmapPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetBitmap(self): - val = controlsc.wxStaticBitmap_GetBitmap(self.this) - val = wxBitmapPtr(val) - return val - def SetBitmap(self,arg0): - val = controlsc.wxStaticBitmap_SetBitmap(self.this,arg0.this) - return val - def __repr__(self): - return "" -class wxStaticBitmap(wxStaticBitmapPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxStaticBitmap,(arg0.this,arg1,arg2.this,)+args) - self.thisown = 1 - - - - -class wxRadioBoxPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def EnableBox(self,arg0): - val = controlsc.wxRadioBox_EnableBox(self.this,arg0) - return val - def Enable(self,arg0,arg1): - val = controlsc.wxRadioBox_Enable(self.this,arg0,arg1) - return val - def FindString(self,arg0): - val = controlsc.wxRadioBox_FindString(self.this,arg0) - return val - def GetBoxLabel(self): - val = controlsc.wxRadioBox_GetBoxLabel(self.this) - return val - def GetLabel(self,arg0): - val = controlsc.wxRadioBox_GetLabel(self.this,arg0) - return val - def GetSelection(self): - val = controlsc.wxRadioBox_GetSelection(self.this) - return val - def GetString(self,arg0): - val = controlsc.wxRadioBox_GetString(self.this,arg0) - return val - def GetStringSelection(self): - val = controlsc.wxRadioBox_GetStringSelection(self.this) - return val - def Number(self): - val = controlsc.wxRadioBox_Number(self.this) - return val - def SetBoxLabel(self,arg0): - val = controlsc.wxRadioBox_SetBoxLabel(self.this,arg0) - return val - def SetLabel(self,arg0,arg1): - val = controlsc.wxRadioBox_SetLabel(self.this,arg0,arg1) - return val - def SetSelection(self,arg0): - val = controlsc.wxRadioBox_SetSelection(self.this,arg0) - return val - def SetStringSelection(self,arg0): - val = controlsc.wxRadioBox_SetStringSelection(self.this,arg0) - return val - def Show(self,arg0): - val = controlsc.wxRadioBox_Show(self.this,arg0) - return val - def ShowItem(self,arg0,arg1): - val = controlsc.wxRadioBox_ShowItem(self.this,arg0,arg1) - return val - def __repr__(self): - return "" -class wxRadioBox(wxRadioBoxPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxRadioBox,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxRadioButtonPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetValue(self): - val = controlsc.wxRadioButton_GetValue(self.this) - return val - def SetValue(self,arg0): - val = controlsc.wxRadioButton_SetValue(self.this,arg0) - return val - def __repr__(self): - return "" -class wxRadioButton(wxRadioButtonPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxRadioButton,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxSliderPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def ClearSel(self): - val = controlsc.wxSlider_ClearSel(self.this) - return val - def ClearTicks(self): - val = controlsc.wxSlider_ClearTicks(self.this) - return val - def GetLineSize(self): - val = controlsc.wxSlider_GetLineSize(self.this) - return val - def GetMax(self): - val = controlsc.wxSlider_GetMax(self.this) - return val - def GetMin(self): - val = controlsc.wxSlider_GetMin(self.this) - return val - def GetPageSize(self): - val = controlsc.wxSlider_GetPageSize(self.this) - return val - def GetSelEnd(self): - val = controlsc.wxSlider_GetSelEnd(self.this) - return val - def GetSelStart(self): - val = controlsc.wxSlider_GetSelStart(self.this) - return val - def GetThumbLength(self): - val = controlsc.wxSlider_GetThumbLength(self.this) - return val - def GetTickFreq(self): - val = controlsc.wxSlider_GetTickFreq(self.this) - return val - def GetValue(self): - val = controlsc.wxSlider_GetValue(self.this) - return val - def SetRange(self,arg0,arg1): - val = controlsc.wxSlider_SetRange(self.this,arg0,arg1) - return val - def SetTickFreq(self,arg0,arg1): - val = controlsc.wxSlider_SetTickFreq(self.this,arg0,arg1) - return val - def SetLineSize(self,arg0): - val = controlsc.wxSlider_SetLineSize(self.this,arg0) - return val - def SetPageSize(self,arg0): - val = controlsc.wxSlider_SetPageSize(self.this,arg0) - return val - def SetSelection(self,arg0,arg1): - val = controlsc.wxSlider_SetSelection(self.this,arg0,arg1) - return val - def SetThumbLength(self,arg0): - val = controlsc.wxSlider_SetThumbLength(self.this,arg0) - return val - def SetTick(self,arg0): - val = controlsc.wxSlider_SetTick(self.this,arg0) - return val - def SetValue(self,arg0): - val = controlsc.wxSlider_SetValue(self.this,arg0) - return val - def __repr__(self): - return "" -class wxSlider(wxSliderPtr): - def __init__(self,arg0,arg1,arg2,arg3,arg4,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxSlider,(arg0.this,arg1,arg2,arg3,arg4,)+args) - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - - - -#-------------- VARIABLE WRAPPERS ------------------ - diff --git a/utils/wxPython/src/msw/controls2.cpp b/utils/wxPython/src/msw/controls2.cpp deleted file mode 100644 index e192d0666d..0000000000 --- a/utils/wxPython/src/msw/controls2.cpp +++ /dev/null @@ -1,4204 +0,0 @@ -/* - * FILE : msw\controls2.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif - -#define SWIG_init initcontrols2c - -#define SWIG_name "controls2c" - -#include "helpers.h" -#include -#include -#include - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; - -extern wxValidator wxPyDefaultValidator; -#define wxListItem_m_mask_get(_swigobj) ((long ) _swigobj->m_mask) -static PyObject *_wrap_wxListItem_m_mask_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListItem_m_mask_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_m_mask_get. Expected _wxListItem_p."); - return NULL; - } - } - _result = (long )wxListItem_m_mask_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListItem_m_itemId_get(_swigobj) ((long ) _swigobj->m_itemId) -static PyObject *_wrap_wxListItem_m_itemId_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListItem_m_itemId_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_m_itemId_get. Expected _wxListItem_p."); - return NULL; - } - } - _result = (long )wxListItem_m_itemId_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListItem_m_col_get(_swigobj) ((int ) _swigobj->m_col) -static PyObject *_wrap_wxListItem_m_col_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListItem_m_col_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_m_col_get. Expected _wxListItem_p."); - return NULL; - } - } - _result = (int )wxListItem_m_col_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListItem_m_state_get(_swigobj) ((long ) _swigobj->m_state) -static PyObject *_wrap_wxListItem_m_state_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListItem_m_state_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_m_state_get. Expected _wxListItem_p."); - return NULL; - } - } - _result = (long )wxListItem_m_state_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListItem_m_stateMask_get(_swigobj) ((long ) _swigobj->m_stateMask) -static PyObject *_wrap_wxListItem_m_stateMask_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListItem_m_stateMask_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_m_stateMask_get. Expected _wxListItem_p."); - return NULL; - } - } - _result = (long )wxListItem_m_stateMask_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListItem_m_text_get(_swigobj) (&_swigobj->m_text) -static PyObject *_wrap_wxListItem_m_text_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListItem_m_text_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_m_text_get. Expected _wxListItem_p."); - return NULL; - } - } - _result = (wxString *)wxListItem_m_text_get(_arg0); -{ - _resultobj = PyString_FromString(WXSTRINGCAST (*_result)); -} - return _resultobj; -} - -#define wxListItem_m_image_get(_swigobj) ((int ) _swigobj->m_image) -static PyObject *_wrap_wxListItem_m_image_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListItem_m_image_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_m_image_get. Expected _wxListItem_p."); - return NULL; - } - } - _result = (int )wxListItem_m_image_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListItem_m_data_get(_swigobj) ((long ) _swigobj->m_data) -static PyObject *_wrap_wxListItem_m_data_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListItem_m_data_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_m_data_get. Expected _wxListItem_p."); - return NULL; - } - } - _result = (long )wxListItem_m_data_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListItem_m_format_get(_swigobj) ((int ) _swigobj->m_format) -static PyObject *_wrap_wxListItem_m_format_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListItem_m_format_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_m_format_get. Expected _wxListItem_p."); - return NULL; - } - } - _result = (int )wxListItem_m_format_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListItem_m_width_get(_swigobj) ((int ) _swigobj->m_width) -static PyObject *_wrap_wxListItem_m_width_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListItem_m_width_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_m_width_get. Expected _wxListItem_p."); - return NULL; - } - } - _result = (int )wxListItem_m_width_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define new_wxListItem() (new wxListItem()) -static PyObject *_wrap_new_wxListItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListItem * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxListItem")) - return NULL; - _result = (wxListItem *)new_wxListItem(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxListItem(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxListItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxListItem",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxListItem. Expected _wxListItem_p."); - return NULL; - } - } - delete_wxListItem(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxListEventTowxCommandEvent(void *ptr) { - wxListEvent *src; - wxCommandEvent *dest; - src = (wxListEvent *) ptr; - dest = (wxCommandEvent *) src; - return (void *) dest; -} - -static void *SwigwxListEventTowxEvent(void *ptr) { - wxListEvent *src; - wxEvent *dest; - src = (wxListEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxListEvent_m_code_get(_swigobj) ((int ) _swigobj->m_code) -static PyObject *_wrap_wxListEvent_m_code_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListEvent_m_code_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_m_code_get. Expected _wxListEvent_p."); - return NULL; - } - } - _result = (int )wxListEvent_m_code_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListEvent_m_itemIndex_get(_swigobj) ((long ) _swigobj->m_itemIndex) -static PyObject *_wrap_wxListEvent_m_itemIndex_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListEvent_m_itemIndex_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_m_itemIndex_get. Expected _wxListEvent_p."); - return NULL; - } - } - _result = (long )wxListEvent_m_itemIndex_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListEvent_m_oldItemIndex_get(_swigobj) ((long ) _swigobj->m_oldItemIndex) -static PyObject *_wrap_wxListEvent_m_oldItemIndex_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListEvent_m_oldItemIndex_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_m_oldItemIndex_get. Expected _wxListEvent_p."); - return NULL; - } - } - _result = (long )wxListEvent_m_oldItemIndex_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListEvent_m_col_get(_swigobj) ((int ) _swigobj->m_col) -static PyObject *_wrap_wxListEvent_m_col_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListEvent_m_col_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_m_col_get. Expected _wxListEvent_p."); - return NULL; - } - } - _result = (int )wxListEvent_m_col_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListEvent_m_cancelled_get(_swigobj) ((bool ) _swigobj->m_cancelled) -static PyObject *_wrap_wxListEvent_m_cancelled_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListEvent_m_cancelled_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_m_cancelled_get. Expected _wxListEvent_p."); - return NULL; - } - } - _result = (bool )wxListEvent_m_cancelled_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListEvent_m_pointDrag_get(_swigobj) (&_swigobj->m_pointDrag) -static PyObject *_wrap_wxListEvent_m_pointDrag_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxListEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListEvent_m_pointDrag_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_m_pointDrag_get. Expected _wxListEvent_p."); - return NULL; - } - } - _result = (wxPoint *)wxListEvent_m_pointDrag_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxListEvent_m_item_get(_swigobj) (&_swigobj->m_item) -static PyObject *_wrap_wxListEvent_m_item_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListItem * _result; - wxListEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListEvent_m_item_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_m_item_get. Expected _wxListEvent_p."); - return NULL; - } - } - _result = (wxListItem *)wxListEvent_m_item_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static void *SwigwxListCtrlTowxControl(void *ptr) { - wxListCtrl *src; - wxControl *dest; - src = (wxListCtrl *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxListCtrlTowxWindow(void *ptr) { - wxListCtrl *src; - wxWindow *dest; - src = (wxListCtrl *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxListCtrlTowxEvtHandler(void *ptr) { - wxListCtrl *src; - wxEvtHandler *dest; - src = (wxListCtrl *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxListCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxListCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxListCtrl(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListCtrl * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - long _arg4 = (wxLC_ICON); - wxValidator * _arg5 = &wxPyDefaultValidator; - char * _arg6 = "listCtrl"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char * _argc5 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si|sslss:new_wxListCtrl",&_argc0,&_arg1,&_argc2,&_argc3,&_arg4,&_argc5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxListCtrl. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxListCtrl. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxListCtrl. Expected _wxSize_p."); - return NULL; - } - } - if (_argc5) { - if (SWIG_GetPtr(_argc5,(void **) &_arg5,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of new_wxListCtrl. Expected _wxValidator_p."); - return NULL; - } - } - _result = (wxListCtrl *)new_wxListCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxListCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxListCtrl_Arrange(_swigobj,_swigarg0) (_swigobj->Arrange(_swigarg0)) -static PyObject *_wrap_wxListCtrl_Arrange(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - int _arg1 = wxLIST_ALIGN_DEFAULT; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxListCtrl_Arrange",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_Arrange. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_Arrange(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_DeleteItem(_swigobj,_swigarg0) (_swigobj->DeleteItem(_swigarg0)) -static PyObject *_wrap_wxListCtrl_DeleteItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxListCtrl_DeleteItem",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_DeleteItem. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_DeleteItem(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_DeleteAllItems(_swigobj) (_swigobj->DeleteAllItems()) -static PyObject *_wrap_wxListCtrl_DeleteAllItems(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListCtrl_DeleteAllItems",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_DeleteAllItems. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_DeleteAllItems(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_DeleteColumn(_swigobj,_swigarg0) (_swigobj->DeleteColumn(_swigarg0)) -static PyObject *_wrap_wxListCtrl_DeleteColumn(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxListCtrl_DeleteColumn",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_DeleteColumn. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_DeleteColumn(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_DeleteAllColumns(_swigobj) (_swigobj->DeleteAllColumns()) -static PyObject *_wrap_wxListCtrl_DeleteAllColumns(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListCtrl_DeleteAllColumns",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_DeleteAllColumns. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_DeleteAllColumns(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_ClearAll(_swigobj) (_swigobj->ClearAll()) -static PyObject *_wrap_wxListCtrl_ClearAll(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListCtrl_ClearAll",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_ClearAll. Expected _wxListCtrl_p."); - return NULL; - } - } - wxListCtrl_ClearAll(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxListCtrl_EditLabel(_swigobj,_swigarg0) (_swigobj->EditLabel(_swigarg0)) -static PyObject *_wrap_wxListCtrl_EditLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _result; - wxListCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxListCtrl_EditLabel",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_EditLabel. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (wxTextCtrl *)wxListCtrl_EditLabel(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxListCtrl_EndEditLabel(_swigobj,_swigarg0) (_swigobj->EndEditLabel(_swigarg0)) -static PyObject *_wrap_wxListCtrl_EndEditLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxListCtrl_EndEditLabel",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_EndEditLabel. Expected _wxListCtrl_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - _result = (bool )wxListCtrl_EndEditLabel(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_EnsureVisible(_swigobj,_swigarg0) (_swigobj->EnsureVisible(_swigarg0)) -static PyObject *_wrap_wxListCtrl_EnsureVisible(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxListCtrl_EnsureVisible",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_EnsureVisible. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_EnsureVisible(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_FindItem(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->FindItem(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxListCtrl_FindItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - wxString * _arg2; - bool _arg3 = (0); - char * _argc0 = 0; - PyObject * _obj2 = 0; - int tempbool3; - - self = self; - if(!PyArg_ParseTuple(args,"slO|i:wxListCtrl_FindItem",&_argc0,&_arg1,&_obj2,&tempbool3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_FindItem. Expected _wxListCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - _arg3 = (bool ) tempbool3; - _result = (long )wxListCtrl_FindItem(_arg0,_arg1,*_arg2,_arg3); - _resultobj = Py_BuildValue("l",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxListCtrl_FindItemData(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindItem(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_FindItemData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxListCtrl_FindItemData",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_FindItemData. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (long )wxListCtrl_FindItemData(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListCtrl_FindItemAtPos(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->FindItem(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxListCtrl_FindItemAtPos(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - wxPoint * _arg2; - int _arg3; - char * _argc0 = 0; - char * _argc2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slsi:wxListCtrl_FindItemAtPos",&_argc0,&_arg1,&_argc2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_FindItemAtPos. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_FindItemAtPos. Expected _wxPoint_p."); - return NULL; - } - } - _result = (long )wxListCtrl_FindItemAtPos(_arg0,_arg1,*_arg2,_arg3); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListCtrl_GetColumn(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetColumn(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_GetColumn(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - int _arg1; - wxListItem * _arg2; - char * _argc0 = 0; - char * _argc2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sis:wxListCtrl_GetColumn",&_argc0,&_arg1,&_argc2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetColumn. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_GetColumn. Expected _wxListItem_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_GetColumn(_arg0,_arg1,*_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_GetColumnWidth(_swigobj,_swigarg0) (_swigobj->GetColumnWidth(_swigarg0)) -static PyObject *_wrap_wxListCtrl_GetColumnWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListCtrl * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxListCtrl_GetColumnWidth",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetColumnWidth. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (int )wxListCtrl_GetColumnWidth(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_GetCountPerPage(_swigobj) (_swigobj->GetCountPerPage()) -static PyObject *_wrap_wxListCtrl_GetCountPerPage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListCtrl_GetCountPerPage",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetCountPerPage. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (int )wxListCtrl_GetCountPerPage(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_GetImageList(_swigobj,_swigarg0) (_swigobj->GetImageList(_swigarg0)) -static PyObject *_wrap_wxListCtrl_GetImageList(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxImageList * _result; - wxListCtrl * _arg0; - int _arg1; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxListCtrl_GetImageList",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetImageList. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (wxImageList *)wxListCtrl_GetImageList(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageList_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxListCtrl_GetItemData(_swigobj,_swigarg0) (_swigobj->GetItemData(_swigarg0)) -static PyObject *_wrap_wxListCtrl_GetItemData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxListCtrl_GetItemData",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetItemData. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (long )wxListCtrl_GetItemData(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -static wxListItem * wxListCtrl_GetItem(wxListCtrl *self) { - wxListItem* info = new wxListItem; - self->GetItem(*info); - return info; - } -static PyObject *_wrap_wxListCtrl_GetItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListItem * _result; - wxListCtrl * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListCtrl_GetItem",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetItem. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (wxListItem *)wxListCtrl_GetItem(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static wxPoint * wxListCtrl_GetItemPosition(wxListCtrl *self,long item) { - wxPoint* pos = new wxPoint; - self->GetItemPosition(item, *pos); - return pos; - } -static PyObject *_wrap_wxListCtrl_GetItemPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxListCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxListCtrl_GetItemPosition",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetItemPosition. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (wxPoint *)wxListCtrl_GetItemPosition(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static wxRect * wxListCtrl_GetItemRect(wxListCtrl *self,long item,int code) { - wxRect* rect= new wxRect; - self->GetItemRect(item, *rect, code); - return rect; - } -static PyObject *_wrap_wxListCtrl_GetItemRect(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRect * _result; - wxListCtrl * _arg0; - long _arg1; - int _arg2 = wxLIST_RECT_BOUNDS; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sl|i:wxListCtrl_GetItemRect",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetItemRect. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (wxRect *)wxListCtrl_GetItemRect(_arg0,_arg1,_arg2); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxRect_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxListCtrl_GetItemState(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetItemState(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_GetItemState(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListCtrl * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxListCtrl_GetItemState",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetItemState. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (int )wxListCtrl_GetItemState(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_GetItemCount(_swigobj) (_swigobj->GetItemCount()) -static PyObject *_wrap_wxListCtrl_GetItemCount(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListCtrl_GetItemCount",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetItemCount. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (int )wxListCtrl_GetItemCount(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_GetItemSpacing(_swigobj,_swigarg0) (_swigobj->GetItemSpacing(_swigarg0)) -static PyObject *_wrap_wxListCtrl_GetItemSpacing(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListCtrl * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxListCtrl_GetItemSpacing",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetItemSpacing. Expected _wxListCtrl_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - _result = (int )wxListCtrl_GetItemSpacing(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_GetItemText(_swigobj,_swigarg0) (_swigobj->GetItemText(_swigarg0)) -static PyObject *_wrap_wxListCtrl_GetItemText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxListCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxListCtrl_GetItemText",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetItemText. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = new wxString (wxListCtrl_GetItemText(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxListCtrl_GetNextItem(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetNextItem(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxListCtrl_GetNextItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - int _arg2 = wxLIST_NEXT_ALL; - int _arg3 = wxLIST_STATE_DONTCARE; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl|ii:wxListCtrl_GetNextItem",&_argc0,&_arg1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetNextItem. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (long )wxListCtrl_GetNextItem(_arg0,_arg1,_arg2,_arg3); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListCtrl_GetSelectedItemCount(_swigobj) (_swigobj->GetSelectedItemCount()) -static PyObject *_wrap_wxListCtrl_GetSelectedItemCount(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxListCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListCtrl_GetSelectedItemCount",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetSelectedItemCount. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (int )wxListCtrl_GetSelectedItemCount(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_GetTextColour(_swigobj) (_swigobj->GetTextColour()) -static PyObject *_wrap_wxListCtrl_GetTextColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxListCtrl * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListCtrl_GetTextColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetTextColour. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = new wxColour (wxListCtrl_GetTextColour(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxListCtrl_GetTopItem(_swigobj) (_swigobj->GetTopItem()) -static PyObject *_wrap_wxListCtrl_GetTopItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListCtrl_GetTopItem",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetTopItem. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (long )wxListCtrl_GetTopItem(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListCtrl_HitTest(_swigobj,_swigarg0,_swigarg1) (_swigobj->HitTest(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_HitTest(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - wxPoint * _arg1; - int * _arg2; - int temp; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; -{ - _arg2 = &temp; -} - if(!PyArg_ParseTuple(args,"ss:wxListCtrl_HitTest",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_HitTest. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_HitTest. Expected _wxPoint_p."); - return NULL; - } - } - _result = (long )wxListCtrl_HitTest(_arg0,*_arg1,*_arg2); - _resultobj = Py_BuildValue("l",_result); -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxListCtrl_InsertColumnWithInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertColumn(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_InsertColumnWithInfo(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - wxListItem * _arg2; - char * _argc0 = 0; - char * _argc2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sls:wxListCtrl_InsertColumnWithInfo",&_argc0,&_arg1,&_argc2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertColumnWithInfo. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_InsertColumnWithInfo. Expected _wxListItem_p."); - return NULL; - } - } - _result = (long )wxListCtrl_InsertColumnWithInfo(_arg0,_arg1,*_arg2); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListCtrl_InsertColumn(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->InsertColumn(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxListCtrl_InsertColumn(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - wxString * _arg2; - int _arg3 = wxLIST_FORMAT_LEFT; - int _arg4 = -1; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slO|ii:wxListCtrl_InsertColumn",&_argc0,&_arg1,&_obj2,&_arg3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertColumn. Expected _wxListCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - _result = (long )wxListCtrl_InsertColumn(_arg0,_arg1,*_arg2,_arg3,_arg4); - _resultobj = Py_BuildValue("l",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxListCtrl_InsertItem(_swigobj,_swigarg0) (_swigobj->InsertItem(_swigarg0)) -static PyObject *_wrap_wxListCtrl_InsertItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - wxListItem * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxListCtrl_InsertItem",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertItem. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_InsertItem. Expected _wxListItem_p."); - return NULL; - } - } - _result = (long )wxListCtrl_InsertItem(_arg0,*_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListCtrl_InsertStringItem(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertItem(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_InsertStringItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slO:wxListCtrl_InsertStringItem",&_argc0,&_arg1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertStringItem. Expected _wxListCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - _result = (long )wxListCtrl_InsertStringItem(_arg0,_arg1,*_arg2); - _resultobj = Py_BuildValue("l",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxListCtrl_InsertImageItem(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertItem(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_InsertImageItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sli:wxListCtrl_InsertImageItem",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertImageItem. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (long )wxListCtrl_InsertImageItem(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListCtrl_InsertImageStringItem(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->InsertItem(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxListCtrl_InsertImageStringItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - wxString * _arg2; - int _arg3; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slOi:wxListCtrl_InsertImageStringItem",&_argc0,&_arg1,&_obj2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertImageStringItem. Expected _wxListCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - _result = (long )wxListCtrl_InsertImageStringItem(_arg0,_arg1,*_arg2,_arg3); - _resultobj = Py_BuildValue("l",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxListCtrl_ScrollList(_swigobj,_swigarg0,_swigarg1) (_swigobj->ScrollList(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_ScrollList(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxListCtrl_ScrollList",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_ScrollList. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_ScrollList(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_SetBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetBackgroundColour(_swigarg0)) -static PyObject *_wrap_wxListCtrl_SetBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListCtrl * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxListCtrl_SetBackgroundColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetBackgroundColour. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_SetBackgroundColour. Expected _wxColour_p."); - return NULL; - } - } - wxListCtrl_SetBackgroundColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxListCtrl_SetColumn(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColumn(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_SetColumn(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - int _arg1; - wxListItem * _arg2; - char * _argc0 = 0; - char * _argc2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sis:wxListCtrl_SetColumn",&_argc0,&_arg1,&_argc2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetColumn. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_SetColumn. Expected _wxListItem_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_SetColumn(_arg0,_arg1,*_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_SetColumnWidth(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColumnWidth(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_SetColumnWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxListCtrl_SetColumnWidth",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetColumnWidth. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_SetColumnWidth(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_SetImageList(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetImageList(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_SetImageList(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListCtrl * _arg0; - wxImageList * _arg1; - int _arg2; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ssi:wxListCtrl_SetImageList",&_argc0,&_argc1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetImageList. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxImageList_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_SetImageList. Expected _wxImageList_p."); - return NULL; - } - } - wxListCtrl_SetImageList(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxListCtrl_SetItem(_swigobj,_swigarg0) (_swigobj->SetItem(_swigarg0)) -static PyObject *_wrap_wxListCtrl_SetItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - wxListItem * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxListCtrl_SetItem",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetItem. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_SetItem. Expected _wxListItem_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_SetItem(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_SetItemString(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->SetItem(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxListCtrl_SetItemString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxListCtrl * _arg0; - long _arg1; - int _arg2; - wxString * _arg3; - int _arg4 = -1; - char * _argc0 = 0; - PyObject * _obj3 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sliO|i:wxListCtrl_SetItemString",&_argc0,&_arg1,&_arg2,&_obj3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetItemString. Expected _wxListCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AsString(_obj3)); -} - _result = (long )wxListCtrl_SetItemString(_arg0,_arg1,_arg2,*_arg3,_arg4); - _resultobj = Py_BuildValue("l",_result); -{ - if (_obj3) - delete _arg3; -} - return _resultobj; -} - -#define wxListCtrl_SetItemData(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemData(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_SetItemData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxListCtrl_SetItemData",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetItemData. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_SetItemData(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_SetItemImage(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemImage(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxListCtrl_SetItemImage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - long _arg1; - int _arg2; - int _arg3; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slii:wxListCtrl_SetItemImage",&_argc0,&_arg1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetItemImage. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_SetItemImage(_arg0,_arg1,_arg2,_arg3); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_SetItemPosition(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemPosition(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_SetItemPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - long _arg1; - wxPoint * _arg2; - char * _argc0 = 0; - char * _argc2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sls:wxListCtrl_SetItemPosition",&_argc0,&_arg1,&_argc2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetItemPosition. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_SetItemPosition. Expected _wxPoint_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_SetItemPosition(_arg0,_arg1,*_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_SetItemState(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemState(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxListCtrl_SetItemState(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - long _arg1; - long _arg2; - long _arg3; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slll:wxListCtrl_SetItemState",&_argc0,&_arg1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetItemState. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (bool )wxListCtrl_SetItemState(_arg0,_arg1,_arg2,_arg3); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_SetItemText(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemText(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_SetItemText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListCtrl * _arg0; - long _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slO:wxListCtrl_SetItemText",&_argc0,&_arg1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetItemText. Expected _wxListCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - wxListCtrl_SetItemText(_arg0,_arg1,*_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxListCtrl_SetSingleStyle(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSingleStyle(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_SetSingleStyle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListCtrl * _arg0; - long _arg1; - bool _arg2 = (1); - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"sl|i:wxListCtrl_SetSingleStyle",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetSingleStyle. Expected _wxListCtrl_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - wxListCtrl_SetSingleStyle(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxListCtrl_SetTextColour(_swigobj,_swigarg0) (_swigobj->SetTextColour(_swigarg0)) -static PyObject *_wrap_wxListCtrl_SetTextColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListCtrl * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxListCtrl_SetTextColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetTextColour. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_SetTextColour. Expected _wxColour_p."); - return NULL; - } - } - wxListCtrl_SetTextColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxListCtrl_SetWindowStyleFlag(_swigobj,_swigarg0) (_swigobj->SetWindowStyleFlag(_swigarg0)) -static PyObject *_wrap_wxListCtrl_SetWindowStyleFlag(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxListCtrl_SetWindowStyleFlag",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetWindowStyleFlag. Expected _wxListCtrl_p."); - return NULL; - } - } - wxListCtrl_SetWindowStyleFlag(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTreeItem_m_mask_get(_swigobj) ((long ) _swigobj->m_mask) -static PyObject *_wrap_wxTreeItem_m_mask_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeItem_m_mask_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItem_m_mask_get. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (long )wxTreeItem_m_mask_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeItem_m_itemId_get(_swigobj) ((long ) _swigobj->m_itemId) -static PyObject *_wrap_wxTreeItem_m_itemId_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeItem_m_itemId_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItem_m_itemId_get. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (long )wxTreeItem_m_itemId_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeItem_m_state_get(_swigobj) ((long ) _swigobj->m_state) -static PyObject *_wrap_wxTreeItem_m_state_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeItem_m_state_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItem_m_state_get. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (long )wxTreeItem_m_state_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeItem_m_stateMask_get(_swigobj) ((long ) _swigobj->m_stateMask) -static PyObject *_wrap_wxTreeItem_m_stateMask_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeItem_m_stateMask_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItem_m_stateMask_get. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (long )wxTreeItem_m_stateMask_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeItem_m_text_get(_swigobj) (&_swigobj->m_text) -static PyObject *_wrap_wxTreeItem_m_text_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxTreeItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeItem_m_text_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItem_m_text_get. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (wxString *)wxTreeItem_m_text_get(_arg0); -{ - _resultobj = PyString_FromString(WXSTRINGCAST (*_result)); -} - return _resultobj; -} - -#define wxTreeItem_m_image_get(_swigobj) ((int ) _swigobj->m_image) -static PyObject *_wrap_wxTreeItem_m_image_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTreeItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeItem_m_image_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItem_m_image_get. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (int )wxTreeItem_m_image_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeItem_m_selectedImage_get(_swigobj) ((int ) _swigobj->m_selectedImage) -static PyObject *_wrap_wxTreeItem_m_selectedImage_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTreeItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeItem_m_selectedImage_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItem_m_selectedImage_get. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (int )wxTreeItem_m_selectedImage_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeItem_m_children_get(_swigobj) ((int ) _swigobj->m_children) -static PyObject *_wrap_wxTreeItem_m_children_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTreeItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeItem_m_children_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItem_m_children_get. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (int )wxTreeItem_m_children_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeItem_m_data_get(_swigobj) ((long ) _swigobj->m_data) -static PyObject *_wrap_wxTreeItem_m_data_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeItem_m_data_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItem_m_data_get. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (long )wxTreeItem_m_data_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define new_wxTreeItem() (new wxTreeItem()) -static PyObject *_wrap_new_wxTreeItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTreeItem * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxTreeItem")) - return NULL; - _result = (wxTreeItem *)new_wxTreeItem(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTreeItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxTreeItem(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxTreeItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTreeItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxTreeItem",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxTreeItem. Expected _wxTreeItem_p."); - return NULL; - } - } - delete_wxTreeItem(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxTreeEventTowxCommandEvent(void *ptr) { - wxTreeEvent *src; - wxCommandEvent *dest; - src = (wxTreeEvent *) ptr; - dest = (wxCommandEvent *) src; - return (void *) dest; -} - -static void *SwigwxTreeEventTowxEvent(void *ptr) { - wxTreeEvent *src; - wxEvent *dest; - src = (wxTreeEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxTreeEvent_m_code_get(_swigobj) ((int ) _swigobj->m_code) -static PyObject *_wrap_wxTreeEvent_m_code_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTreeEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeEvent_m_code_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_m_code_get. Expected _wxTreeEvent_p."); - return NULL; - } - } - _result = (int )wxTreeEvent_m_code_get(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeEvent_m_item_get(_swigobj) (&_swigobj->m_item) -static PyObject *_wrap_wxTreeEvent_m_item_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTreeItem * _result; - wxTreeEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeEvent_m_item_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_m_item_get. Expected _wxTreeEvent_p."); - return NULL; - } - } - _result = (wxTreeItem *)wxTreeEvent_m_item_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTreeItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxTreeEvent_m_oldItem_get(_swigobj) ((long ) _swigobj->m_oldItem) -static PyObject *_wrap_wxTreeEvent_m_oldItem_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeEvent_m_oldItem_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_m_oldItem_get. Expected _wxTreeEvent_p."); - return NULL; - } - } - _result = (long )wxTreeEvent_m_oldItem_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeEvent_m_pointDrag_get(_swigobj) (&_swigobj->m_pointDrag) -static PyObject *_wrap_wxTreeEvent_m_pointDrag_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxTreeEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeEvent_m_pointDrag_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_m_pointDrag_get. Expected _wxTreeEvent_p."); - return NULL; - } - } - _result = (wxPoint *)wxTreeEvent_m_pointDrag_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static void *SwigwxTreeCtrlTowxControl(void *ptr) { - wxTreeCtrl *src; - wxControl *dest; - src = (wxTreeCtrl *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxTreeCtrlTowxWindow(void *ptr) { - wxTreeCtrl *src; - wxWindow *dest; - src = (wxTreeCtrl *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxTreeCtrlTowxEvtHandler(void *ptr) { - wxTreeCtrl *src; - wxEvtHandler *dest; - src = (wxTreeCtrl *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxTreeCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxTreeCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxTreeCtrl(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTreeCtrl * _result; - wxWindow * _arg0; - wxWindowID _arg1 = -1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - long _arg4 = (wxTR_HAS_BUTTONS); - wxValidator * _arg5 = &wxPyDefaultValidator; - char * _arg6 = "wxTreeCtrl"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char * _argc5 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|isslss:new_wxTreeCtrl",&_argc0,&_arg1,&_argc2,&_argc3,&_arg4,&_argc5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxTreeCtrl. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxTreeCtrl. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxTreeCtrl. Expected _wxSize_p."); - return NULL; - } - } - if (_argc5) { - if (SWIG_GetPtr(_argc5,(void **) &_arg5,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of new_wxTreeCtrl. Expected _wxValidator_p."); - return NULL; - } - } - _result = (wxTreeCtrl *)new_wxTreeCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTreeCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxTreeCtrl_DeleteAllItems(_swigobj) (_swigobj->DeleteAllItems()) -static PyObject *_wrap_wxTreeCtrl_DeleteAllItems(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTreeCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_DeleteAllItems",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_DeleteAllItems. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (bool )wxTreeCtrl_DeleteAllItems(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeCtrl_DeleteItem(_swigobj,_swigarg0) (_swigobj->DeleteItem(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_DeleteItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTreeCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTreeCtrl_DeleteItem",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_DeleteItem. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (bool )wxTreeCtrl_DeleteItem(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeCtrl_EditLabel(_swigobj,_swigarg0) (_swigobj->EditLabel(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _result; - wxTreeCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTreeCtrl_EditLabel",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_EditLabel. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (wxTextCtrl *)wxTreeCtrl_EditLabel(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxTreeCtrl_EnsureVisible(_swigobj,_swigarg0) (_swigobj->EnsureVisible(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_EnsureVisible(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTreeCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTreeCtrl_EnsureVisible",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_EnsureVisible. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (bool )wxTreeCtrl_EnsureVisible(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeCtrl_ExpandItem(_swigobj,_swigarg0,_swigarg1) (_swigobj->ExpandItem(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTreeCtrl_ExpandItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTreeCtrl * _arg0; - long _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sli:wxTreeCtrl_ExpandItem",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_ExpandItem. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (bool )wxTreeCtrl_ExpandItem(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeCtrl_GetChild(_swigobj,_swigarg0) (_swigobj->GetChild(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_GetChild(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTreeCtrl_GetChild",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetChild. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (long )wxTreeCtrl_GetChild(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeCtrl_GetCount(_swigobj) (_swigobj->GetCount()) -static PyObject *_wrap_wxTreeCtrl_GetCount(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTreeCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_GetCount",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetCount. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (int )wxTreeCtrl_GetCount(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeCtrl_GetEditControl(_swigobj) (_swigobj->GetEditControl()) -static PyObject *_wrap_wxTreeCtrl_GetEditControl(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _result; - wxTreeCtrl * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_GetEditControl",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetEditControl. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (wxTextCtrl *)wxTreeCtrl_GetEditControl(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxTreeCtrl_GetFirstVisibleItem(_swigobj) (_swigobj->GetFirstVisibleItem()) -static PyObject *_wrap_wxTreeCtrl_GetFirstVisibleItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_GetFirstVisibleItem",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetFirstVisibleItem. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (long )wxTreeCtrl_GetFirstVisibleItem(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeCtrl_GetImageList(_swigobj,_swigarg0) (_swigobj->GetImageList(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_GetImageList(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxImageList * _result; - wxTreeCtrl * _arg0; - int _arg1 = wxIMAGE_LIST_NORMAL; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxTreeCtrl_GetImageList",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetImageList. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (wxImageList *)wxTreeCtrl_GetImageList(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageList_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxTreeCtrl_GetIndent(_swigobj) (_swigobj->GetIndent()) -static PyObject *_wrap_wxTreeCtrl_GetIndent(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTreeCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_GetIndent",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetIndent. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (int )wxTreeCtrl_GetIndent(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeCtrl_GetItemData(_swigobj,_swigarg0) (_swigobj->GetItemData(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_GetItemData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTreeCtrl_GetItemData",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemData. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (long )wxTreeCtrl_GetItemData(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -static wxTreeItem * wxTreeCtrl_GetItem(wxTreeCtrl *self) { - wxTreeItem* info = new wxTreeItem; - self->GetItem(*info); - return info; - } -static PyObject *_wrap_wxTreeCtrl_GetItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTreeItem * _result; - wxTreeCtrl * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_GetItem",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItem. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (wxTreeItem *)wxTreeCtrl_GetItem(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTreeItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static wxRect * wxTreeCtrl_GetItemRect(wxTreeCtrl *self,long item,int textOnly) { - wxRect* rect = new wxRect; - self->GetItemRect(item, *rect, textOnly); - return rect; - } -static PyObject *_wrap_wxTreeCtrl_GetItemRect(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRect * _result; - wxTreeCtrl * _arg0; - long _arg1; - int _arg2 = (0); - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sl|i:wxTreeCtrl_GetItemRect",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemRect. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (wxRect *)wxTreeCtrl_GetItemRect(_arg0,_arg1,_arg2); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxRect_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxTreeCtrl_GetItemState(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetItemState(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTreeCtrl_GetItemState(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTreeCtrl * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxTreeCtrl_GetItemState",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemState. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (int )wxTreeCtrl_GetItemState(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeCtrl_GetItemText(_swigobj,_swigarg0) (_swigobj->GetItemText(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_GetItemText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxTreeCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTreeCtrl_GetItemText",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemText. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = new wxString (wxTreeCtrl_GetItemText(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxTreeCtrl_GetNextItem(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetNextItem(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTreeCtrl_GetNextItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeCtrl * _arg0; - long _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sli:wxTreeCtrl_GetNextItem",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetNextItem. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (long )wxTreeCtrl_GetNextItem(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeCtrl_GetNextVisibleItem(_swigobj,_swigarg0) (_swigobj->GetNextVisibleItem(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_GetNextVisibleItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTreeCtrl_GetNextVisibleItem",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetNextVisibleItem. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (long )wxTreeCtrl_GetNextVisibleItem(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeCtrl_GetParent(_swigobj,_swigarg0) (_swigobj->GetParent(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_GetParent(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTreeCtrl_GetParent",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetParent. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (long )wxTreeCtrl_GetParent(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeCtrl_GetRootItem(_swigobj) (_swigobj->GetRootItem()) -static PyObject *_wrap_wxTreeCtrl_GetRootItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_GetRootItem",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetRootItem. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (long )wxTreeCtrl_GetRootItem(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeCtrl_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxTreeCtrl_GetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_GetSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetSelection. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (long )wxTreeCtrl_GetSelection(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeCtrl_HitTest(_swigobj,_swigarg0,_swigarg1) (_swigobj->HitTest(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTreeCtrl_HitTest(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeCtrl * _arg0; - wxPoint * _arg1; - int * _arg2; - int temp; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; -{ - _arg2 = &temp; -} - if(!PyArg_ParseTuple(args,"ss:wxTreeCtrl_HitTest",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_HitTest. Expected _wxTreeCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_HitTest. Expected _wxPoint_p."); - return NULL; - } - } - _result = (long )wxTreeCtrl_HitTest(_arg0,*_arg1,*_arg2); - _resultobj = Py_BuildValue("l",_result); -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxTreeCtrl_InsertItem(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->InsertItem(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxTreeCtrl_InsertItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeCtrl * _arg0; - long _arg1; - wxTreeItem * _arg2; - long _arg3 = (wxTREE_INSERT_LAST); - char * _argc0 = 0; - char * _argc2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sls|l:wxTreeCtrl_InsertItem",&_argc0,&_arg1,&_argc2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_InsertItem. Expected _wxTreeCtrl_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxTreeCtrl_InsertItem. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (long )wxTreeCtrl_InsertItem(_arg0,_arg1,*_arg2,_arg3); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxTreeCtrl_InsertItemString(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->InsertItem(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_wxTreeCtrl_InsertItemString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxTreeCtrl * _arg0; - long _arg1; - wxString * _arg2; - int _arg3 = -1; - int _arg4 = -1; - long _arg5 = (wxTREE_INSERT_LAST); - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slO|iil:wxTreeCtrl_InsertItemString",&_argc0,&_arg1,&_obj2,&_arg3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_InsertItemString. Expected _wxTreeCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - _result = (long )wxTreeCtrl_InsertItemString(_arg0,_arg1,*_arg2,_arg3,_arg4,_arg5); - _resultobj = Py_BuildValue("l",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxTreeCtrl_ItemHasChildren(_swigobj,_swigarg0) (_swigobj->ItemHasChildren(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_ItemHasChildren(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTreeCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTreeCtrl_ItemHasChildren",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_ItemHasChildren. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (bool )wxTreeCtrl_ItemHasChildren(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeCtrl_ScrollTo(_swigobj,_swigarg0) (_swigobj->ScrollTo(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_ScrollTo(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTreeCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTreeCtrl_ScrollTo",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_ScrollTo. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (bool )wxTreeCtrl_ScrollTo(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeCtrl_SelectItem(_swigobj,_swigarg0) (_swigobj->SelectItem(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_SelectItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTreeCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTreeCtrl_SelectItem",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SelectItem. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (bool )wxTreeCtrl_SelectItem(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeCtrl_SetIndent(_swigobj,_swigarg0) (_swigobj->SetIndent(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_SetIndent(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTreeCtrl * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxTreeCtrl_SetIndent",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetIndent. Expected _wxTreeCtrl_p."); - return NULL; - } - } - wxTreeCtrl_SetIndent(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTreeCtrl_SetImageList(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetImageList(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTreeCtrl_SetImageList(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTreeCtrl * _arg0; - wxImageList * _arg1; - int _arg2 = wxIMAGE_LIST_NORMAL; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss|i:wxTreeCtrl_SetImageList",&_argc0,&_argc1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetImageList. Expected _wxTreeCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxImageList_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SetImageList. Expected _wxImageList_p."); - return NULL; - } - } - wxTreeCtrl_SetImageList(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTreeCtrl_SetItem(_swigobj,_swigarg0) (_swigobj->SetItem(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_SetItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTreeCtrl * _arg0; - wxTreeItem * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxTreeCtrl_SetItem",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItem. Expected _wxTreeCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxTreeItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SetItem. Expected _wxTreeItem_p."); - return NULL; - } - } - _result = (bool )wxTreeCtrl_SetItem(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeCtrl_SetItemImage(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemImage(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxTreeCtrl_SetItemImage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTreeCtrl * _arg0; - long _arg1; - int _arg2; - int _arg3; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slii:wxTreeCtrl_SetItemImage",&_argc0,&_arg1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemImage. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (bool )wxTreeCtrl_SetItemImage(_arg0,_arg1,_arg2,_arg3); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeCtrl_SetItemState(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemState(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxTreeCtrl_SetItemState(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTreeCtrl * _arg0; - long _arg1; - long _arg2; - long _arg3; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slll:wxTreeCtrl_SetItemState",&_argc0,&_arg1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemState. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (bool )wxTreeCtrl_SetItemState(_arg0,_arg1,_arg2,_arg3); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeCtrl_SetItemText(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemText(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTreeCtrl_SetItemText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTreeCtrl * _arg0; - long _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"slO:wxTreeCtrl_SetItemText",&_argc0,&_arg1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemText. Expected _wxTreeCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - wxTreeCtrl_SetItemText(_arg0,_arg1,*_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxTreeCtrl_SetItemData(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemData(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTreeCtrl_SetItemData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTreeCtrl * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxTreeCtrl_SetItemData",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemData. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (bool )wxTreeCtrl_SetItemData(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTreeCtrl_SortChildren(_swigobj,_swigarg0) (_swigobj->SortChildren(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_SortChildren(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTreeCtrl * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxTreeCtrl_SortChildren",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SortChildren. Expected _wxTreeCtrl_p."); - return NULL; - } - } - _result = (bool )wxTreeCtrl_SortChildren(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxTabEventTowxCommandEvent(void *ptr) { - wxTabEvent *src; - wxCommandEvent *dest; - src = (wxTabEvent *) ptr; - dest = (wxCommandEvent *) src; - return (void *) dest; -} - -static void *SwigwxTabEventTowxEvent(void *ptr) { - wxTabEvent *src; - wxEvent *dest; - src = (wxTabEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -static void *SwigwxTabCtrlTowxControl(void *ptr) { - wxTabCtrl *src; - wxControl *dest; - src = (wxTabCtrl *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxTabCtrlTowxWindow(void *ptr) { - wxTabCtrl *src; - wxWindow *dest; - src = (wxTabCtrl *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxTabCtrlTowxEvtHandler(void *ptr) { - wxTabCtrl *src; - wxEvtHandler *dest; - src = (wxTabCtrl *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxTabCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxTabCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_new_wxTabCtrl(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTabCtrl * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - long _arg4 = 0; - char * _arg5 = "tabCtrl"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si|ssls:new_wxTabCtrl",&_argc0,&_arg1,&_argc2,&_argc3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxTabCtrl. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxTabCtrl. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxTabCtrl. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxTabCtrl *)new_wxTabCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTabCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxTabCtrl_DeleteAllItems(_swigobj) (_swigobj->DeleteAllItems()) -static PyObject *_wrap_wxTabCtrl_DeleteAllItems(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTabCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTabCtrl_DeleteAllItems",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTabCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTabCtrl_DeleteAllItems. Expected _wxTabCtrl_p."); - return NULL; - } - } - _result = (bool )wxTabCtrl_DeleteAllItems(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTabCtrl_DeleteItem(_swigobj,_swigarg0) (_swigobj->DeleteItem(_swigarg0)) -static PyObject *_wrap_wxTabCtrl_DeleteItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTabCtrl * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxTabCtrl_DeleteItem",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTabCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTabCtrl_DeleteItem. Expected _wxTabCtrl_p."); - return NULL; - } - } - _result = (bool )wxTabCtrl_DeleteItem(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTabCtrl_GetImageList(_swigobj) (_swigobj->GetImageList()) -static PyObject *_wrap_wxTabCtrl_GetImageList(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxImageList * _result; - wxTabCtrl * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTabCtrl_GetImageList",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTabCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTabCtrl_GetImageList. Expected _wxTabCtrl_p."); - return NULL; - } - } - _result = (wxImageList *)wxTabCtrl_GetImageList(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageList_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxTabCtrl_GetItemCount(_swigobj) (_swigobj->GetItemCount()) -static PyObject *_wrap_wxTabCtrl_GetItemCount(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTabCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTabCtrl_GetItemCount",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTabCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTabCtrl_GetItemCount. Expected _wxTabCtrl_p."); - return NULL; - } - } - _result = (int )wxTabCtrl_GetItemCount(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTabCtrl_GetItemImage(_swigobj,_swigarg0) (_swigobj->GetItemImage(_swigarg0)) -static PyObject *_wrap_wxTabCtrl_GetItemImage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTabCtrl * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxTabCtrl_GetItemImage",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTabCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTabCtrl_GetItemImage. Expected _wxTabCtrl_p."); - return NULL; - } - } - _result = (int )wxTabCtrl_GetItemImage(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static wxRect * wxTabCtrl_GetItemRect(wxTabCtrl *self,int item) { - wxRect* rect = new wxRect; - self->GetItemRect(item, *rect); - return rect; - } -static PyObject *_wrap_wxTabCtrl_GetItemRect(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRect * _result; - wxTabCtrl * _arg0; - int _arg1; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxTabCtrl_GetItemRect",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTabCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTabCtrl_GetItemRect. Expected _wxTabCtrl_p."); - return NULL; - } - } - _result = (wxRect *)wxTabCtrl_GetItemRect(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxRect_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxTabCtrl_GetItemText(_swigobj,_swigarg0) (_swigobj->GetItemText(_swigarg0)) -static PyObject *_wrap_wxTabCtrl_GetItemText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxTabCtrl * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxTabCtrl_GetItemText",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTabCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTabCtrl_GetItemText. Expected _wxTabCtrl_p."); - return NULL; - } - } - _result = new wxString (wxTabCtrl_GetItemText(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxTabCtrl_GetRowCount(_swigobj) (_swigobj->GetRowCount()) -static PyObject *_wrap_wxTabCtrl_GetRowCount(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTabCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTabCtrl_GetRowCount",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTabCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTabCtrl_GetRowCount. Expected _wxTabCtrl_p."); - return NULL; - } - } - _result = (bool )wxTabCtrl_GetRowCount(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTabCtrl_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxTabCtrl_GetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTabCtrl * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTabCtrl_GetSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTabCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTabCtrl_GetSelection. Expected _wxTabCtrl_p."); - return NULL; - } - } - _result = (int )wxTabCtrl_GetSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTabCtrl_HitTest(_swigobj,_swigarg0,_swigarg1) (_swigobj->HitTest(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTabCtrl_HitTest(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTabCtrl * _arg0; - wxPoint * _arg1; - long * _arg2; - long temp; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; -{ - _arg2 = &temp; -} - if(!PyArg_ParseTuple(args,"ss:wxTabCtrl_HitTest",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTabCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTabCtrl_HitTest. Expected _wxTabCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTabCtrl_HitTest. Expected _wxPoint_p."); - return NULL; - } - } - _result = (int )wxTabCtrl_HitTest(_arg0,*_arg1,*_arg2); - _resultobj = Py_BuildValue("i",_result); -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxTabCtrl_InsertItem(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->InsertItem(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxTabCtrl_InsertItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTabCtrl * _arg0; - int _arg1; - wxString * _arg2; - int _arg3 = -1; - void * _arg4 = NULL; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc4 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siO|is:wxTabCtrl_InsertItem",&_argc0,&_arg1,&_obj2,&_arg3,&_argc4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTabCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTabCtrl_InsertItem. Expected _wxTabCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,(char *) 0 )) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxTabCtrl_InsertItem. Expected _void_p."); - return NULL; - } - } - wxTabCtrl_InsertItem(_arg0,_arg1,*_arg2,_arg3,_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxTabCtrl_SetItemImage(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemImage(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTabCtrl_SetItemImage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTabCtrl * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxTabCtrl_SetItemImage",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTabCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTabCtrl_SetItemImage. Expected _wxTabCtrl_p."); - return NULL; - } - } - _result = (bool )wxTabCtrl_SetItemImage(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxTabCtrl_SetImageList(_swigobj,_swigarg0) (_swigobj->SetImageList(_swigarg0)) -static PyObject *_wrap_wxTabCtrl_SetImageList(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTabCtrl * _arg0; - wxImageList * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxTabCtrl_SetImageList",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTabCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTabCtrl_SetImageList. Expected _wxTabCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxImageList_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTabCtrl_SetImageList. Expected _wxImageList_p."); - return NULL; - } - } - wxTabCtrl_SetImageList(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTabCtrl_SetItemSize(_swigobj,_swigarg0) (_swigobj->SetItemSize(_swigarg0)) -static PyObject *_wrap_wxTabCtrl_SetItemSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTabCtrl * _arg0; - wxSize * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxTabCtrl_SetItemSize",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTabCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTabCtrl_SetItemSize. Expected _wxTabCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTabCtrl_SetItemSize. Expected _wxSize_p."); - return NULL; - } - } - wxTabCtrl_SetItemSize(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTabCtrl_SetItemText(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemText(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTabCtrl_SetItemText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxTabCtrl * _arg0; - int _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siO:wxTabCtrl_SetItemText",&_argc0,&_arg1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTabCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTabCtrl_SetItemText. Expected _wxTabCtrl_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - _result = (bool )wxTabCtrl_SetItemText(_arg0,_arg1,*_arg2); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxTabCtrl_SetPadding(_swigobj,_swigarg0) (_swigobj->SetPadding(_swigarg0)) -static PyObject *_wrap_wxTabCtrl_SetPadding(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTabCtrl * _arg0; - wxSize * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxTabCtrl_SetPadding",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTabCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTabCtrl_SetPadding. Expected _wxTabCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTabCtrl_SetPadding. Expected _wxSize_p."); - return NULL; - } - } - wxTabCtrl_SetPadding(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxTabCtrl_SetSelection(_swigobj,_swigarg0) (_swigobj->SetSelection(_swigarg0)) -static PyObject *_wrap_wxTabCtrl_SetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxTabCtrl * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxTabCtrl_SetSelection",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTabCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTabCtrl_SetSelection. Expected _wxTabCtrl_p."); - return NULL; - } - } - _result = (int )wxTabCtrl_SetSelection(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyMethodDef controls2cMethods[] = { - { "wxTabCtrl_SetSelection", _wrap_wxTabCtrl_SetSelection, 1 }, - { "wxTabCtrl_SetPadding", _wrap_wxTabCtrl_SetPadding, 1 }, - { "wxTabCtrl_SetItemText", _wrap_wxTabCtrl_SetItemText, 1 }, - { "wxTabCtrl_SetItemSize", _wrap_wxTabCtrl_SetItemSize, 1 }, - { "wxTabCtrl_SetImageList", _wrap_wxTabCtrl_SetImageList, 1 }, - { "wxTabCtrl_SetItemImage", _wrap_wxTabCtrl_SetItemImage, 1 }, - { "wxTabCtrl_InsertItem", _wrap_wxTabCtrl_InsertItem, 1 }, - { "wxTabCtrl_HitTest", _wrap_wxTabCtrl_HitTest, 1 }, - { "wxTabCtrl_GetSelection", _wrap_wxTabCtrl_GetSelection, 1 }, - { "wxTabCtrl_GetRowCount", _wrap_wxTabCtrl_GetRowCount, 1 }, - { "wxTabCtrl_GetItemText", _wrap_wxTabCtrl_GetItemText, 1 }, - { "wxTabCtrl_GetItemRect", _wrap_wxTabCtrl_GetItemRect, 1 }, - { "wxTabCtrl_GetItemImage", _wrap_wxTabCtrl_GetItemImage, 1 }, - { "wxTabCtrl_GetItemCount", _wrap_wxTabCtrl_GetItemCount, 1 }, - { "wxTabCtrl_GetImageList", _wrap_wxTabCtrl_GetImageList, 1 }, - { "wxTabCtrl_DeleteItem", _wrap_wxTabCtrl_DeleteItem, 1 }, - { "wxTabCtrl_DeleteAllItems", _wrap_wxTabCtrl_DeleteAllItems, 1 }, - { "new_wxTabCtrl", _wrap_new_wxTabCtrl, 1 }, - { "wxTreeCtrl_SortChildren", _wrap_wxTreeCtrl_SortChildren, 1 }, - { "wxTreeCtrl_SetItemData", _wrap_wxTreeCtrl_SetItemData, 1 }, - { "wxTreeCtrl_SetItemText", _wrap_wxTreeCtrl_SetItemText, 1 }, - { "wxTreeCtrl_SetItemState", _wrap_wxTreeCtrl_SetItemState, 1 }, - { "wxTreeCtrl_SetItemImage", _wrap_wxTreeCtrl_SetItemImage, 1 }, - { "wxTreeCtrl_SetItem", _wrap_wxTreeCtrl_SetItem, 1 }, - { "wxTreeCtrl_SetImageList", _wrap_wxTreeCtrl_SetImageList, 1 }, - { "wxTreeCtrl_SetIndent", _wrap_wxTreeCtrl_SetIndent, 1 }, - { "wxTreeCtrl_SelectItem", _wrap_wxTreeCtrl_SelectItem, 1 }, - { "wxTreeCtrl_ScrollTo", _wrap_wxTreeCtrl_ScrollTo, 1 }, - { "wxTreeCtrl_ItemHasChildren", _wrap_wxTreeCtrl_ItemHasChildren, 1 }, - { "wxTreeCtrl_InsertItemString", _wrap_wxTreeCtrl_InsertItemString, 1 }, - { "wxTreeCtrl_InsertItem", _wrap_wxTreeCtrl_InsertItem, 1 }, - { "wxTreeCtrl_HitTest", _wrap_wxTreeCtrl_HitTest, 1 }, - { "wxTreeCtrl_GetSelection", _wrap_wxTreeCtrl_GetSelection, 1 }, - { "wxTreeCtrl_GetRootItem", _wrap_wxTreeCtrl_GetRootItem, 1 }, - { "wxTreeCtrl_GetParent", _wrap_wxTreeCtrl_GetParent, 1 }, - { "wxTreeCtrl_GetNextVisibleItem", _wrap_wxTreeCtrl_GetNextVisibleItem, 1 }, - { "wxTreeCtrl_GetNextItem", _wrap_wxTreeCtrl_GetNextItem, 1 }, - { "wxTreeCtrl_GetItemText", _wrap_wxTreeCtrl_GetItemText, 1 }, - { "wxTreeCtrl_GetItemState", _wrap_wxTreeCtrl_GetItemState, 1 }, - { "wxTreeCtrl_GetItemRect", _wrap_wxTreeCtrl_GetItemRect, 1 }, - { "wxTreeCtrl_GetItem", _wrap_wxTreeCtrl_GetItem, 1 }, - { "wxTreeCtrl_GetItemData", _wrap_wxTreeCtrl_GetItemData, 1 }, - { "wxTreeCtrl_GetIndent", _wrap_wxTreeCtrl_GetIndent, 1 }, - { "wxTreeCtrl_GetImageList", _wrap_wxTreeCtrl_GetImageList, 1 }, - { "wxTreeCtrl_GetFirstVisibleItem", _wrap_wxTreeCtrl_GetFirstVisibleItem, 1 }, - { "wxTreeCtrl_GetEditControl", _wrap_wxTreeCtrl_GetEditControl, 1 }, - { "wxTreeCtrl_GetCount", _wrap_wxTreeCtrl_GetCount, 1 }, - { "wxTreeCtrl_GetChild", _wrap_wxTreeCtrl_GetChild, 1 }, - { "wxTreeCtrl_ExpandItem", _wrap_wxTreeCtrl_ExpandItem, 1 }, - { "wxTreeCtrl_EnsureVisible", _wrap_wxTreeCtrl_EnsureVisible, 1 }, - { "wxTreeCtrl_EditLabel", _wrap_wxTreeCtrl_EditLabel, 1 }, - { "wxTreeCtrl_DeleteItem", _wrap_wxTreeCtrl_DeleteItem, 1 }, - { "wxTreeCtrl_DeleteAllItems", _wrap_wxTreeCtrl_DeleteAllItems, 1 }, - { "new_wxTreeCtrl", _wrap_new_wxTreeCtrl, 1 }, - { "wxTreeEvent_m_pointDrag_get", _wrap_wxTreeEvent_m_pointDrag_get, 1 }, - { "wxTreeEvent_m_oldItem_get", _wrap_wxTreeEvent_m_oldItem_get, 1 }, - { "wxTreeEvent_m_item_get", _wrap_wxTreeEvent_m_item_get, 1 }, - { "wxTreeEvent_m_code_get", _wrap_wxTreeEvent_m_code_get, 1 }, - { "delete_wxTreeItem", _wrap_delete_wxTreeItem, 1 }, - { "new_wxTreeItem", _wrap_new_wxTreeItem, 1 }, - { "wxTreeItem_m_data_get", _wrap_wxTreeItem_m_data_get, 1 }, - { "wxTreeItem_m_children_get", _wrap_wxTreeItem_m_children_get, 1 }, - { "wxTreeItem_m_selectedImage_get", _wrap_wxTreeItem_m_selectedImage_get, 1 }, - { "wxTreeItem_m_image_get", _wrap_wxTreeItem_m_image_get, 1 }, - { "wxTreeItem_m_text_get", _wrap_wxTreeItem_m_text_get, 1 }, - { "wxTreeItem_m_stateMask_get", _wrap_wxTreeItem_m_stateMask_get, 1 }, - { "wxTreeItem_m_state_get", _wrap_wxTreeItem_m_state_get, 1 }, - { "wxTreeItem_m_itemId_get", _wrap_wxTreeItem_m_itemId_get, 1 }, - { "wxTreeItem_m_mask_get", _wrap_wxTreeItem_m_mask_get, 1 }, - { "wxListCtrl_SetWindowStyleFlag", _wrap_wxListCtrl_SetWindowStyleFlag, 1 }, - { "wxListCtrl_SetTextColour", _wrap_wxListCtrl_SetTextColour, 1 }, - { "wxListCtrl_SetSingleStyle", _wrap_wxListCtrl_SetSingleStyle, 1 }, - { "wxListCtrl_SetItemText", _wrap_wxListCtrl_SetItemText, 1 }, - { "wxListCtrl_SetItemState", _wrap_wxListCtrl_SetItemState, 1 }, - { "wxListCtrl_SetItemPosition", _wrap_wxListCtrl_SetItemPosition, 1 }, - { "wxListCtrl_SetItemImage", _wrap_wxListCtrl_SetItemImage, 1 }, - { "wxListCtrl_SetItemData", _wrap_wxListCtrl_SetItemData, 1 }, - { "wxListCtrl_SetItemString", _wrap_wxListCtrl_SetItemString, 1 }, - { "wxListCtrl_SetItem", _wrap_wxListCtrl_SetItem, 1 }, - { "wxListCtrl_SetImageList", _wrap_wxListCtrl_SetImageList, 1 }, - { "wxListCtrl_SetColumnWidth", _wrap_wxListCtrl_SetColumnWidth, 1 }, - { "wxListCtrl_SetColumn", _wrap_wxListCtrl_SetColumn, 1 }, - { "wxListCtrl_SetBackgroundColour", _wrap_wxListCtrl_SetBackgroundColour, 1 }, - { "wxListCtrl_ScrollList", _wrap_wxListCtrl_ScrollList, 1 }, - { "wxListCtrl_InsertImageStringItem", _wrap_wxListCtrl_InsertImageStringItem, 1 }, - { "wxListCtrl_InsertImageItem", _wrap_wxListCtrl_InsertImageItem, 1 }, - { "wxListCtrl_InsertStringItem", _wrap_wxListCtrl_InsertStringItem, 1 }, - { "wxListCtrl_InsertItem", _wrap_wxListCtrl_InsertItem, 1 }, - { "wxListCtrl_InsertColumn", _wrap_wxListCtrl_InsertColumn, 1 }, - { "wxListCtrl_InsertColumnWithInfo", _wrap_wxListCtrl_InsertColumnWithInfo, 1 }, - { "wxListCtrl_HitTest", _wrap_wxListCtrl_HitTest, 1 }, - { "wxListCtrl_GetTopItem", _wrap_wxListCtrl_GetTopItem, 1 }, - { "wxListCtrl_GetTextColour", _wrap_wxListCtrl_GetTextColour, 1 }, - { "wxListCtrl_GetSelectedItemCount", _wrap_wxListCtrl_GetSelectedItemCount, 1 }, - { "wxListCtrl_GetNextItem", _wrap_wxListCtrl_GetNextItem, 1 }, - { "wxListCtrl_GetItemText", _wrap_wxListCtrl_GetItemText, 1 }, - { "wxListCtrl_GetItemSpacing", _wrap_wxListCtrl_GetItemSpacing, 1 }, - { "wxListCtrl_GetItemCount", _wrap_wxListCtrl_GetItemCount, 1 }, - { "wxListCtrl_GetItemState", _wrap_wxListCtrl_GetItemState, 1 }, - { "wxListCtrl_GetItemRect", _wrap_wxListCtrl_GetItemRect, 1 }, - { "wxListCtrl_GetItemPosition", _wrap_wxListCtrl_GetItemPosition, 1 }, - { "wxListCtrl_GetItem", _wrap_wxListCtrl_GetItem, 1 }, - { "wxListCtrl_GetItemData", _wrap_wxListCtrl_GetItemData, 1 }, - { "wxListCtrl_GetImageList", _wrap_wxListCtrl_GetImageList, 1 }, - { "wxListCtrl_GetCountPerPage", _wrap_wxListCtrl_GetCountPerPage, 1 }, - { "wxListCtrl_GetColumnWidth", _wrap_wxListCtrl_GetColumnWidth, 1 }, - { "wxListCtrl_GetColumn", _wrap_wxListCtrl_GetColumn, 1 }, - { "wxListCtrl_FindItemAtPos", _wrap_wxListCtrl_FindItemAtPos, 1 }, - { "wxListCtrl_FindItemData", _wrap_wxListCtrl_FindItemData, 1 }, - { "wxListCtrl_FindItem", _wrap_wxListCtrl_FindItem, 1 }, - { "wxListCtrl_EnsureVisible", _wrap_wxListCtrl_EnsureVisible, 1 }, - { "wxListCtrl_EndEditLabel", _wrap_wxListCtrl_EndEditLabel, 1 }, - { "wxListCtrl_EditLabel", _wrap_wxListCtrl_EditLabel, 1 }, - { "wxListCtrl_ClearAll", _wrap_wxListCtrl_ClearAll, 1 }, - { "wxListCtrl_DeleteAllColumns", _wrap_wxListCtrl_DeleteAllColumns, 1 }, - { "wxListCtrl_DeleteColumn", _wrap_wxListCtrl_DeleteColumn, 1 }, - { "wxListCtrl_DeleteAllItems", _wrap_wxListCtrl_DeleteAllItems, 1 }, - { "wxListCtrl_DeleteItem", _wrap_wxListCtrl_DeleteItem, 1 }, - { "wxListCtrl_Arrange", _wrap_wxListCtrl_Arrange, 1 }, - { "new_wxListCtrl", _wrap_new_wxListCtrl, 1 }, - { "wxListEvent_m_item_get", _wrap_wxListEvent_m_item_get, 1 }, - { "wxListEvent_m_pointDrag_get", _wrap_wxListEvent_m_pointDrag_get, 1 }, - { "wxListEvent_m_cancelled_get", _wrap_wxListEvent_m_cancelled_get, 1 }, - { "wxListEvent_m_col_get", _wrap_wxListEvent_m_col_get, 1 }, - { "wxListEvent_m_oldItemIndex_get", _wrap_wxListEvent_m_oldItemIndex_get, 1 }, - { "wxListEvent_m_itemIndex_get", _wrap_wxListEvent_m_itemIndex_get, 1 }, - { "wxListEvent_m_code_get", _wrap_wxListEvent_m_code_get, 1 }, - { "delete_wxListItem", _wrap_delete_wxListItem, 1 }, - { "new_wxListItem", _wrap_new_wxListItem, 1 }, - { "wxListItem_m_width_get", _wrap_wxListItem_m_width_get, 1 }, - { "wxListItem_m_format_get", _wrap_wxListItem_m_format_get, 1 }, - { "wxListItem_m_data_get", _wrap_wxListItem_m_data_get, 1 }, - { "wxListItem_m_image_get", _wrap_wxListItem_m_image_get, 1 }, - { "wxListItem_m_text_get", _wrap_wxListItem_m_text_get, 1 }, - { "wxListItem_m_stateMask_get", _wrap_wxListItem_m_stateMask_get, 1 }, - { "wxListItem_m_state_get", _wrap_wxListItem_m_state_get, 1 }, - { "wxListItem_m_col_get", _wrap_wxListItem_m_col_get, 1 }, - { "wxListItem_m_itemId_get", _wrap_wxListItem_m_itemId_get, 1 }, - { "wxListItem_m_mask_get", _wrap_wxListItem_m_mask_get, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initcontrols2c)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("controls2c", controls2cMethods); - d = PyModule_GetDict(m); - PyDict_SetItemString(d,"wxTREE_MASK_HANDLE", PyInt_FromLong((long) wxTREE_MASK_HANDLE)); - PyDict_SetItemString(d,"wxTREE_MASK_STATE", PyInt_FromLong((long) wxTREE_MASK_STATE)); - PyDict_SetItemString(d,"wxTREE_MASK_TEXT", PyInt_FromLong((long) wxTREE_MASK_TEXT)); - PyDict_SetItemString(d,"wxTREE_MASK_IMAGE", PyInt_FromLong((long) wxTREE_MASK_IMAGE)); - PyDict_SetItemString(d,"wxTREE_MASK_SELECTED_IMAGE", PyInt_FromLong((long) wxTREE_MASK_SELECTED_IMAGE)); - PyDict_SetItemString(d,"wxTREE_MASK_CHILDREN", PyInt_FromLong((long) wxTREE_MASK_CHILDREN)); - PyDict_SetItemString(d,"wxTREE_MASK_DATA", PyInt_FromLong((long) wxTREE_MASK_DATA)); - PyDict_SetItemString(d,"wxTREE_STATE_BOLD", PyInt_FromLong((long) wxTREE_STATE_BOLD)); - PyDict_SetItemString(d,"wxTREE_STATE_DROPHILITED", PyInt_FromLong((long) wxTREE_STATE_DROPHILITED)); - PyDict_SetItemString(d,"wxTREE_STATE_EXPANDED", PyInt_FromLong((long) wxTREE_STATE_EXPANDED)); - PyDict_SetItemString(d,"wxTREE_STATE_EXPANDEDONCE", PyInt_FromLong((long) wxTREE_STATE_EXPANDEDONCE)); - PyDict_SetItemString(d,"wxTREE_STATE_FOCUSED", PyInt_FromLong((long) wxTREE_STATE_FOCUSED)); - PyDict_SetItemString(d,"wxTREE_STATE_SELECTED", PyInt_FromLong((long) wxTREE_STATE_SELECTED)); - PyDict_SetItemString(d,"wxTREE_STATE_CUT", PyInt_FromLong((long) wxTREE_STATE_CUT)); - PyDict_SetItemString(d,"wxTREE_HITTEST_ABOVE", PyInt_FromLong((long) wxTREE_HITTEST_ABOVE)); - PyDict_SetItemString(d,"wxTREE_HITTEST_BELOW", PyInt_FromLong((long) wxTREE_HITTEST_BELOW)); - PyDict_SetItemString(d,"wxTREE_HITTEST_NOWHERE", PyInt_FromLong((long) wxTREE_HITTEST_NOWHERE)); - PyDict_SetItemString(d,"wxTREE_HITTEST_ONITEMBUTTON", PyInt_FromLong((long) wxTREE_HITTEST_ONITEMBUTTON)); - PyDict_SetItemString(d,"wxTREE_HITTEST_ONITEMICON", PyInt_FromLong((long) wxTREE_HITTEST_ONITEMICON)); - PyDict_SetItemString(d,"wxTREE_HITTEST_ONITEMINDENT", PyInt_FromLong((long) wxTREE_HITTEST_ONITEMINDENT)); - PyDict_SetItemString(d,"wxTREE_HITTEST_ONITEMLABEL", PyInt_FromLong((long) wxTREE_HITTEST_ONITEMLABEL)); - PyDict_SetItemString(d,"wxTREE_HITTEST_ONITEMRIGHT", PyInt_FromLong((long) wxTREE_HITTEST_ONITEMRIGHT)); - PyDict_SetItemString(d,"wxTREE_HITTEST_ONITEMSTATEICON", PyInt_FromLong((long) wxTREE_HITTEST_ONITEMSTATEICON)); - PyDict_SetItemString(d,"wxTREE_HITTEST_TOLEFT", PyInt_FromLong((long) wxTREE_HITTEST_TOLEFT)); - PyDict_SetItemString(d,"wxTREE_HITTEST_TORIGHT", PyInt_FromLong((long) wxTREE_HITTEST_TORIGHT)); - PyDict_SetItemString(d,"wxTREE_HITTEST_ONITEM", PyInt_FromLong((long) wxTREE_HITTEST_ONITEM)); - PyDict_SetItemString(d,"wxTREE_NEXT_CARET", PyInt_FromLong((long) wxTREE_NEXT_CARET)); - PyDict_SetItemString(d,"wxTREE_NEXT_CHILD", PyInt_FromLong((long) wxTREE_NEXT_CHILD)); - PyDict_SetItemString(d,"wxTREE_NEXT_DROPHILITE", PyInt_FromLong((long) wxTREE_NEXT_DROPHILITE)); - PyDict_SetItemString(d,"wxTREE_NEXT_FIRSTVISIBLE", PyInt_FromLong((long) wxTREE_NEXT_FIRSTVISIBLE)); - PyDict_SetItemString(d,"wxTREE_NEXT_NEXT", PyInt_FromLong((long) wxTREE_NEXT_NEXT)); - PyDict_SetItemString(d,"wxTREE_NEXT_NEXTVISIBLE", PyInt_FromLong((long) wxTREE_NEXT_NEXTVISIBLE)); - PyDict_SetItemString(d,"wxTREE_NEXT_PARENT", PyInt_FromLong((long) wxTREE_NEXT_PARENT)); - PyDict_SetItemString(d,"wxTREE_NEXT_PREVIOUS", PyInt_FromLong((long) wxTREE_NEXT_PREVIOUS)); - PyDict_SetItemString(d,"wxTREE_NEXT_PREVIOUSVISIBLE", PyInt_FromLong((long) wxTREE_NEXT_PREVIOUSVISIBLE)); - PyDict_SetItemString(d,"wxTREE_NEXT_ROOT", PyInt_FromLong((long) wxTREE_NEXT_ROOT)); - PyDict_SetItemString(d,"wxTREE_EXPAND_EXPAND", PyInt_FromLong((long) wxTREE_EXPAND_EXPAND)); - PyDict_SetItemString(d,"wxTREE_EXPAND_COLLAPSE", PyInt_FromLong((long) wxTREE_EXPAND_COLLAPSE)); - PyDict_SetItemString(d,"wxTREE_EXPAND_COLLAPSE_RESET", PyInt_FromLong((long) wxTREE_EXPAND_COLLAPSE_RESET)); - PyDict_SetItemString(d,"wxTREE_EXPAND_TOGGLE", PyInt_FromLong((long) wxTREE_EXPAND_TOGGLE)); - PyDict_SetItemString(d,"wxTREE_INSERT_LAST", PyInt_FromLong((long) wxTREE_INSERT_LAST)); - PyDict_SetItemString(d,"wxTREE_INSERT_FIRST", PyInt_FromLong((long) wxTREE_INSERT_FIRST)); - PyDict_SetItemString(d,"wxTREE_INSERT_SORT", PyInt_FromLong((long) wxTREE_INSERT_SORT)); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_wxAcceleratorTable","_class_wxAcceleratorTable",0); - SWIG_RegisterMapping("_wxEvent","_class_wxTabEvent",SwigwxTabEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxTabEvent",SwigwxTabEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxTreeEvent",SwigwxTreeEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxTreeEvent",SwigwxTreeEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxListEvent",SwigwxListEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxListEvent",SwigwxListEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxEvent",0); - SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0); - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0); - SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxTabCtrl",SwigwxTabCtrlTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxTabCtrl",SwigwxTabCtrlTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxTreeCtrl",SwigwxTreeCtrlTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxTreeCtrl",SwigwxTreeCtrlTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxListCtrl",SwigwxListCtrlTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxListCtrl",SwigwxListCtrlTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxEvtHandler",0); - SWIG_RegisterMapping("_wxPaintEvent","_class_wxPaintEvent",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); - SWIG_RegisterMapping("_class_wxTreeCtrl","_wxTreeCtrl",0); - SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); - SWIG_RegisterMapping("_wxPen","_class_wxPen",0); - SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_wxStaticBox","_class_wxStaticBox",0); - SWIG_RegisterMapping("_wxChoice","_class_wxChoice",0); - SWIG_RegisterMapping("_wxSlider","_class_wxSlider",0); - SWIG_RegisterMapping("_long","_wxDash",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_wxDropFilesEvent","_class_wxDropFilesEvent",0); - SWIG_RegisterMapping("_wxBitmapButton","_class_wxBitmapButton",0); - SWIG_RegisterMapping("_class_wxAcceleratorTable","_wxAcceleratorTable",0); - SWIG_RegisterMapping("_class_wxGauge","_wxGauge",0); - SWIG_RegisterMapping("_wxDC","_class_wxDC",0); - SWIG_RegisterMapping("_wxListEvent","_class_wxListEvent",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_wxPrinterDC","_class_wxPrinterDC",0); - SWIG_RegisterMapping("_class_wxMenuItem","_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxPaintEvent","_wxPaintEvent",0); - SWIG_RegisterMapping("_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxPanel","_class_wxPanel",0); - SWIG_RegisterMapping("_wxInitDialogEvent","_class_wxInitDialogEvent",0); - SWIG_RegisterMapping("_wxCheckBox","_class_wxCheckBox",0); - SWIG_RegisterMapping("_wxTextCtrl","_class_wxTextCtrl",0); - SWIG_RegisterMapping("_class_wxMask","_wxMask",0); - SWIG_RegisterMapping("_class_wxKeyEvent","_wxKeyEvent",0); - SWIG_RegisterMapping("_wxColour","_class_wxColour",0); - SWIG_RegisterMapping("_class_wxDialog","_wxDialog",0); - SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); - SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); - SWIG_RegisterMapping("_wxMiniFrame","_class_wxMiniFrame",0); - SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxEvent","_class_wxTabEvent",SwigwxTabEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxTabEvent",SwigwxTabEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxTreeEvent",SwigwxTreeEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxTreeEvent",SwigwxTreeEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxListEvent",SwigwxListEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxListEvent",SwigwxListEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxEvent",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxCommandEvent","_class_wxTabEvent",SwigwxTabEventTowxCommandEvent); - SWIG_RegisterMapping("_wxCommandEvent","_wxTabEvent",SwigwxTabEventTowxCommandEvent); - SWIG_RegisterMapping("_wxCommandEvent","_class_wxTreeEvent",SwigwxTreeEventTowxCommandEvent); - SWIG_RegisterMapping("_wxCommandEvent","_wxTreeEvent",SwigwxTreeEventTowxCommandEvent); - SWIG_RegisterMapping("_wxCommandEvent","_class_wxListEvent",SwigwxListEventTowxCommandEvent); - SWIG_RegisterMapping("_wxCommandEvent","_wxListEvent",SwigwxListEventTowxCommandEvent); - SWIG_RegisterMapping("_wxCommandEvent","_class_wxCommandEvent",0); - SWIG_RegisterMapping("_wxSizeEvent","_class_wxSizeEvent",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_class_wxButton","_wxButton",0); - SWIG_RegisterMapping("_wxRadioBox","_class_wxRadioBox",0); - SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_wxScrollBar","_class_wxScrollBar",0); - SWIG_RegisterMapping("_wxSpinButton","_class_wxSpinButton",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0); - SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0); - SWIG_RegisterMapping("_wxListItem","_class_wxListItem",0); - SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxDropFilesEvent","_wxDropFilesEvent",0); - SWIG_RegisterMapping("_wxStaticText","_class_wxStaticText",0); - SWIG_RegisterMapping("_wxFont","_class_wxFont",0); - SWIG_RegisterMapping("_wxCloseEvent","_class_wxCloseEvent",0); - SWIG_RegisterMapping("_unsigned_long","_wxDash",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxDC","_wxDC",0); - SWIG_RegisterMapping("_class_wxTreeEvent","_wxTreeEvent",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_wxFocusEvent","_class_wxFocusEvent",0); - SWIG_RegisterMapping("_wxMaximizeEvent","_class_wxMaximizeEvent",0); - SWIG_RegisterMapping("_class_wxSpinButton","_wxSpinButton",0); - SWIG_RegisterMapping("_wxAcceleratorEntry","_class_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_class_wxPanel","_wxPanel",0); - SWIG_RegisterMapping("_class_wxCheckBox","_wxCheckBox",0); - SWIG_RegisterMapping("_wxComboBox","_class_wxComboBox",0); - SWIG_RegisterMapping("_wxRadioButton","_class_wxRadioButton",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_class_wxTextCtrl","_wxTextCtrl",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxMetaFileDC","_class_wxMetaFileDC",0); - SWIG_RegisterMapping("_wxMenu","_class_wxMenu",0); - SWIG_RegisterMapping("_class_wxMoveEvent","_wxMoveEvent",0); - SWIG_RegisterMapping("_wxListBox","_class_wxListBox",0); - SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_class_wxBrush","_wxBrush",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxWindow","_class_wxTabCtrl",SwigwxTabCtrlTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxTabCtrl",SwigwxTabCtrlTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxTreeCtrl",SwigwxTreeCtrlTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxTreeCtrl",SwigwxTreeCtrlTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxListCtrl",SwigwxListCtrlTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxListCtrl",SwigwxListCtrlTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxWindow",0); - SWIG_RegisterMapping("_class_wxStaticText","_wxStaticText",0); - SWIG_RegisterMapping("_class_wxFont","_wxFont",0); - SWIG_RegisterMapping("_class_wxCloseEvent","_wxCloseEvent",0); - SWIG_RegisterMapping("_wxTreeItem","_class_wxTreeItem",0); - SWIG_RegisterMapping("_class_wxMenuEvent","_wxMenuEvent",0); - SWIG_RegisterMapping("_wxClientDC","_class_wxClientDC",0); - SWIG_RegisterMapping("_wxMouseEvent","_class_wxMouseEvent",0); - SWIG_RegisterMapping("_wxListCtrl","_class_wxListCtrl",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_class_wxRadioBox","_wxRadioBox",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_wxMemoryDC","_class_wxMemoryDC",0); - SWIG_RegisterMapping("_wxPaintDC","_class_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxFocusEvent","_wxFocusEvent",0); - SWIG_RegisterMapping("_class_wxMaximizeEvent","_wxMaximizeEvent",0); - SWIG_RegisterMapping("_class_wxAcceleratorEntry","_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); - SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_class_wxMetaFileDC","_wxMetaFileDC",0); - SWIG_RegisterMapping("_class_wxMenu","_wxMenu",0); - SWIG_RegisterMapping("_wxControl","_class_wxTabCtrl",SwigwxTabCtrlTowxControl); - SWIG_RegisterMapping("_wxControl","_wxTabCtrl",SwigwxTabCtrlTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxTreeCtrl",SwigwxTreeCtrlTowxControl); - SWIG_RegisterMapping("_wxControl","_wxTreeCtrl",SwigwxTreeCtrlTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxListCtrl",SwigwxListCtrlTowxControl); - SWIG_RegisterMapping("_wxControl","_wxListCtrl",SwigwxListCtrlTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxControl",0); - SWIG_RegisterMapping("_class_wxListBox","_wxListBox",0); - SWIG_RegisterMapping("_wxTabCtrl","_class_wxTabCtrl",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); - SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); - SWIG_RegisterMapping("_class_wxListItem","_wxListItem",0); - SWIG_RegisterMapping("_class_wxPen","_wxPen",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_class_wxStaticBox","_wxStaticBox",0); - SWIG_RegisterMapping("_class_wxScrollEvent","_wxScrollEvent",0); - SWIG_RegisterMapping("_wxJoystickEvent","_class_wxJoystickEvent",0); - SWIG_RegisterMapping("_class_wxChoice","_wxChoice",0); - SWIG_RegisterMapping("_class_wxSlider","_wxSlider",0); - SWIG_RegisterMapping("_class_wxBitmapButton","_wxBitmapButton",0); - SWIG_RegisterMapping("_wxTabEvent","_class_wxTabEvent",0); - SWIG_RegisterMapping("_wxFrame","_class_wxFrame",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_class_wxMouseEvent","_wxMouseEvent",0); - SWIG_RegisterMapping("_class_wxListEvent","_wxListEvent",0); - SWIG_RegisterMapping("_wxButton","_class_wxButton",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxPrinterDC","_wxPrinterDC",0); - SWIG_RegisterMapping("_class_wxPaintDC","_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_class_wxInitDialogEvent","_wxInitDialogEvent",0); - SWIG_RegisterMapping("_class_wxComboBox","_wxComboBox",0); - SWIG_RegisterMapping("_class_wxRadioButton","_wxRadioButton",0); - SWIG_RegisterMapping("_wxTreeCtrl","_class_wxTreeCtrl",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxIconizeEvent","_class_wxIconizeEvent",0); - SWIG_RegisterMapping("_class_wxControl","_class_wxTabCtrl",SwigwxTabCtrlTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxTabCtrl",SwigwxTabCtrlTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxTreeCtrl",SwigwxTreeCtrlTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxTreeCtrl",SwigwxTreeCtrlTowxControl); - SWIG_RegisterMapping("_class_wxControl","_class_wxListCtrl",SwigwxListCtrlTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxListCtrl",SwigwxListCtrlTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxControl",0); - SWIG_RegisterMapping("_wxStaticBitmap","_class_wxStaticBitmap",0); - SWIG_RegisterMapping("_class_wxTabCtrl","_wxTabCtrl",0); - SWIG_RegisterMapping("_class_wxIcon","_wxIcon",0); - SWIG_RegisterMapping("_class_wxColour","_wxColour",0); - SWIG_RegisterMapping("_class_wxScreenDC","_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxIdleEvent","_wxIdleEvent",0); - SWIG_RegisterMapping("_wxEraseEvent","_class_wxEraseEvent",0); - SWIG_RegisterMapping("_class_wxMiniFrame","_wxMiniFrame",0); - SWIG_RegisterMapping("_class_wxJoystickEvent","_wxJoystickEvent",0); - SWIG_RegisterMapping("_class_wxShowEvent","_wxShowEvent",0); - SWIG_RegisterMapping("_wxActivateEvent","_class_wxActivateEvent",0); - SWIG_RegisterMapping("_wxGauge","_class_wxGauge",0); - SWIG_RegisterMapping("_class_wxTreeItem","_wxTreeItem",0); - SWIG_RegisterMapping("_class_wxCommandEvent","_class_wxTabEvent",SwigwxTabEventTowxCommandEvent); - SWIG_RegisterMapping("_class_wxCommandEvent","_wxTabEvent",SwigwxTabEventTowxCommandEvent); - SWIG_RegisterMapping("_class_wxCommandEvent","_class_wxTreeEvent",SwigwxTreeEventTowxCommandEvent); - SWIG_RegisterMapping("_class_wxCommandEvent","_wxTreeEvent",SwigwxTreeEventTowxCommandEvent); - SWIG_RegisterMapping("_class_wxCommandEvent","_class_wxListEvent",SwigwxListEventTowxCommandEvent); - SWIG_RegisterMapping("_class_wxCommandEvent","_wxListEvent",SwigwxListEventTowxCommandEvent); - SWIG_RegisterMapping("_class_wxCommandEvent","_wxCommandEvent",0); - SWIG_RegisterMapping("_class_wxClientDC","_wxClientDC",0); - SWIG_RegisterMapping("_class_wxSizeEvent","_wxSizeEvent",0); - SWIG_RegisterMapping("_class_wxListCtrl","_wxListCtrl",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); - SWIG_RegisterMapping("_class_wxBitmap","_wxBitmap",0); - SWIG_RegisterMapping("_class_wxMemoryDC","_wxMemoryDC",0); - SWIG_RegisterMapping("_wxMenuBar","_class_wxMenuBar",0); - SWIG_RegisterMapping("_wxTreeEvent","_class_wxTreeEvent",0); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxTabCtrl",SwigwxTabCtrlTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxTabCtrl",SwigwxTabCtrlTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxTreeCtrl",SwigwxTreeCtrlTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxTreeCtrl",SwigwxTreeCtrlTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxListCtrl",SwigwxListCtrlTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxListCtrl",SwigwxListCtrlTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxEvtHandler",0); - SWIG_RegisterMapping("_wxMenuItem","_class_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxScrollBar","_wxScrollBar",0); - SWIG_RegisterMapping("_wxDash","_unsigned_long",0); - SWIG_RegisterMapping("_wxDash","_long",0); - SWIG_RegisterMapping("_class_wxScrolledWindow","_wxScrolledWindow",0); - SWIG_RegisterMapping("_wxKeyEvent","_class_wxKeyEvent",0); - SWIG_RegisterMapping("_wxMoveEvent","_class_wxMoveEvent",0); - SWIG_RegisterMapping("_class_wxEraseEvent","_wxEraseEvent",0); - SWIG_RegisterMapping("_wxWindow","_class_wxTabCtrl",SwigwxTabCtrlTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxTabCtrl",SwigwxTabCtrlTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxTreeCtrl",SwigwxTreeCtrlTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxTreeCtrl",SwigwxTreeCtrlTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxListCtrl",SwigwxListCtrlTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxListCtrl",SwigwxListCtrlTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxWindow",0); - SWIG_RegisterMapping("_class_wxTabEvent","_wxTabEvent",0); - SWIG_RegisterMapping("_class_wxFrame","_wxFrame",0); -} diff --git a/utils/wxPython/src/msw/controls2.py b/utils/wxPython/src/msw/controls2.py deleted file mode 100644 index 10d0a29cc4..0000000000 --- a/utils/wxPython/src/msw/controls2.py +++ /dev/null @@ -1,685 +0,0 @@ -# This file was created automatically by SWIG. -import controls2c - -from misc import * - -from windows import * - -from gdi import * - -from events import * - -from controls import * -class wxListItemPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - controls2c.delete_wxListItem(self.this) - def __setattr__(self,name,value): - if name == "m_mask" : - controls2c.wxListItem_m_mask_set(self.this,value) - return - if name == "m_itemId" : - controls2c.wxListItem_m_itemId_set(self.this,value) - return - if name == "m_col" : - controls2c.wxListItem_m_col_set(self.this,value) - return - if name == "m_state" : - controls2c.wxListItem_m_state_set(self.this,value) - return - if name == "m_stateMask" : - controls2c.wxListItem_m_stateMask_set(self.this,value) - return - if name == "m_text" : - controls2c.wxListItem_m_text_set(self.this,value) - return - if name == "m_image" : - controls2c.wxListItem_m_image_set(self.this,value) - return - if name == "m_data" : - controls2c.wxListItem_m_data_set(self.this,value) - return - if name == "m_format" : - controls2c.wxListItem_m_format_set(self.this,value) - return - if name == "m_width" : - controls2c.wxListItem_m_width_set(self.this,value) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "m_mask" : - return controls2c.wxListItem_m_mask_get(self.this) - if name == "m_itemId" : - return controls2c.wxListItem_m_itemId_get(self.this) - if name == "m_col" : - return controls2c.wxListItem_m_col_get(self.this) - if name == "m_state" : - return controls2c.wxListItem_m_state_get(self.this) - if name == "m_stateMask" : - return controls2c.wxListItem_m_stateMask_get(self.this) - if name == "m_text" : - return controls2c.wxListItem_m_text_get(self.this) - if name == "m_image" : - return controls2c.wxListItem_m_image_get(self.this) - if name == "m_data" : - return controls2c.wxListItem_m_data_get(self.this) - if name == "m_format" : - return controls2c.wxListItem_m_format_get(self.this) - if name == "m_width" : - return controls2c.wxListItem_m_width_get(self.this) - raise AttributeError,name - def __repr__(self): - return "" -class wxListItem(wxListItemPtr): - def __init__(self) : - self.this = controls2c.new_wxListItem() - self.thisown = 1 - - - - -class wxListEventPtr(wxCommandEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __setattr__(self,name,value): - if name == "m_code" : - controls2c.wxListEvent_m_code_set(self.this,value) - return - if name == "m_itemIndex" : - controls2c.wxListEvent_m_itemIndex_set(self.this,value) - return - if name == "m_oldItemIndex" : - controls2c.wxListEvent_m_oldItemIndex_set(self.this,value) - return - if name == "m_col" : - controls2c.wxListEvent_m_col_set(self.this,value) - return - if name == "m_cancelled" : - controls2c.wxListEvent_m_cancelled_set(self.this,value) - return - if name == "m_pointDrag" : - controls2c.wxListEvent_m_pointDrag_set(self.this,value.this) - return - if name == "m_item" : - controls2c.wxListEvent_m_item_set(self.this,value.this) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "m_code" : - return controls2c.wxListEvent_m_code_get(self.this) - if name == "m_itemIndex" : - return controls2c.wxListEvent_m_itemIndex_get(self.this) - if name == "m_oldItemIndex" : - return controls2c.wxListEvent_m_oldItemIndex_get(self.this) - if name == "m_col" : - return controls2c.wxListEvent_m_col_get(self.this) - if name == "m_cancelled" : - return controls2c.wxListEvent_m_cancelled_get(self.this) - if name == "m_pointDrag" : - return wxPointPtr(controls2c.wxListEvent_m_pointDrag_get(self.this)) - if name == "m_item" : - return wxListItemPtr(controls2c.wxListEvent_m_item_get(self.this)) - raise AttributeError,name - def __repr__(self): - return "" -class wxListEvent(wxListEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxListCtrlPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Arrange(self,*args): - val = apply(controls2c.wxListCtrl_Arrange,(self.this,)+args) - return val - def DeleteItem(self,arg0): - val = controls2c.wxListCtrl_DeleteItem(self.this,arg0) - return val - def DeleteAllItems(self): - val = controls2c.wxListCtrl_DeleteAllItems(self.this) - return val - def DeleteColumn(self,arg0): - val = controls2c.wxListCtrl_DeleteColumn(self.this,arg0) - return val - def DeleteAllColumns(self): - val = controls2c.wxListCtrl_DeleteAllColumns(self.this) - return val - def ClearAll(self): - val = controls2c.wxListCtrl_ClearAll(self.this) - return val - def EditLabel(self,arg0): - val = controls2c.wxListCtrl_EditLabel(self.this,arg0) - val = wxTextCtrlPtr(val) - return val - def EndEditLabel(self,arg0): - val = controls2c.wxListCtrl_EndEditLabel(self.this,arg0) - return val - def EnsureVisible(self,arg0): - val = controls2c.wxListCtrl_EnsureVisible(self.this,arg0) - return val - def FindItem(self,arg0,arg1,*args): - val = apply(controls2c.wxListCtrl_FindItem,(self.this,arg0,arg1,)+args) - return val - def FindItemData(self,arg0,arg1): - val = controls2c.wxListCtrl_FindItemData(self.this,arg0,arg1) - return val - def FindItemAtPos(self,arg0,arg1,arg2): - val = controls2c.wxListCtrl_FindItemAtPos(self.this,arg0,arg1.this,arg2) - return val - def GetColumn(self,arg0,arg1): - val = controls2c.wxListCtrl_GetColumn(self.this,arg0,arg1.this) - return val - def GetColumnWidth(self,arg0): - val = controls2c.wxListCtrl_GetColumnWidth(self.this,arg0) - return val - def GetCountPerPage(self): - val = controls2c.wxListCtrl_GetCountPerPage(self.this) - return val - def GetImageList(self,arg0): - val = controls2c.wxListCtrl_GetImageList(self.this,arg0) - return val - def GetItemData(self,arg0): - val = controls2c.wxListCtrl_GetItemData(self.this,arg0) - return val - def GetItem(self): - val = controls2c.wxListCtrl_GetItem(self.this) - val = wxListItemPtr(val) - val.thisown = 1 - return val - def GetItemPosition(self,arg0): - val = controls2c.wxListCtrl_GetItemPosition(self.this,arg0) - val = wxPointPtr(val) - val.thisown = 1 - return val - def GetItemRect(self,arg0,*args): - val = apply(controls2c.wxListCtrl_GetItemRect,(self.this,arg0,)+args) - val = wxRectPtr(val) - val.thisown = 1 - return val - def GetItemState(self,arg0,arg1): - val = controls2c.wxListCtrl_GetItemState(self.this,arg0,arg1) - return val - def GetItemCount(self): - val = controls2c.wxListCtrl_GetItemCount(self.this) - return val - def GetItemSpacing(self,arg0): - val = controls2c.wxListCtrl_GetItemSpacing(self.this,arg0) - return val - def GetItemText(self,arg0): - val = controls2c.wxListCtrl_GetItemText(self.this,arg0) - return val - def GetNextItem(self,arg0,*args): - val = apply(controls2c.wxListCtrl_GetNextItem,(self.this,arg0,)+args) - return val - def GetSelectedItemCount(self): - val = controls2c.wxListCtrl_GetSelectedItemCount(self.this) - return val - def GetTextColour(self): - val = controls2c.wxListCtrl_GetTextColour(self.this) - val = wxColourPtr(val) - val.thisown = 1 - return val - def GetTopItem(self): - val = controls2c.wxListCtrl_GetTopItem(self.this) - return val - def HitTest(self,arg0): - val = controls2c.wxListCtrl_HitTest(self.this,arg0.this) - return val - def InsertColumnWithInfo(self,arg0,arg1): - val = controls2c.wxListCtrl_InsertColumnWithInfo(self.this,arg0,arg1.this) - return val - def InsertColumn(self,arg0,arg1,*args): - val = apply(controls2c.wxListCtrl_InsertColumn,(self.this,arg0,arg1,)+args) - return val - def InsertItem(self,arg0): - val = controls2c.wxListCtrl_InsertItem(self.this,arg0.this) - return val - def InsertStringItem(self,arg0,arg1): - val = controls2c.wxListCtrl_InsertStringItem(self.this,arg0,arg1) - return val - def InsertImageItem(self,arg0,arg1): - val = controls2c.wxListCtrl_InsertImageItem(self.this,arg0,arg1) - return val - def InsertImageStringItem(self,arg0,arg1,arg2): - val = controls2c.wxListCtrl_InsertImageStringItem(self.this,arg0,arg1,arg2) - return val - def ScrollList(self,arg0,arg1): - val = controls2c.wxListCtrl_ScrollList(self.this,arg0,arg1) - return val - def SetBackgroundColour(self,arg0): - val = controls2c.wxListCtrl_SetBackgroundColour(self.this,arg0.this) - return val - def SetColumn(self,arg0,arg1): - val = controls2c.wxListCtrl_SetColumn(self.this,arg0,arg1.this) - return val - def SetColumnWidth(self,arg0,arg1): - val = controls2c.wxListCtrl_SetColumnWidth(self.this,arg0,arg1) - return val - def SetImageList(self,arg0,arg1): - val = controls2c.wxListCtrl_SetImageList(self.this,arg0,arg1) - return val - def SetItem(self,arg0): - val = controls2c.wxListCtrl_SetItem(self.this,arg0.this) - return val - def SetItemString(self,arg0,arg1,arg2,*args): - val = apply(controls2c.wxListCtrl_SetItemString,(self.this,arg0,arg1,arg2,)+args) - return val - def SetItemData(self,arg0,arg1): - val = controls2c.wxListCtrl_SetItemData(self.this,arg0,arg1) - return val - def SetItemImage(self,arg0,arg1,arg2): - val = controls2c.wxListCtrl_SetItemImage(self.this,arg0,arg1,arg2) - return val - def SetItemPosition(self,arg0,arg1): - val = controls2c.wxListCtrl_SetItemPosition(self.this,arg0,arg1.this) - return val - def SetItemState(self,arg0,arg1,arg2): - val = controls2c.wxListCtrl_SetItemState(self.this,arg0,arg1,arg2) - return val - def SetItemText(self,arg0,arg1): - val = controls2c.wxListCtrl_SetItemText(self.this,arg0,arg1) - return val - def SetSingleStyle(self,arg0,*args): - val = apply(controls2c.wxListCtrl_SetSingleStyle,(self.this,arg0,)+args) - return val - def SetTextColour(self,arg0): - val = controls2c.wxListCtrl_SetTextColour(self.this,arg0.this) - return val - def SetWindowStyleFlag(self,arg0): - val = controls2c.wxListCtrl_SetWindowStyleFlag(self.this,arg0) - return val - def __repr__(self): - return "" -class wxListCtrl(wxListCtrlPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controls2c.new_wxListCtrl,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - -class wxTreeItemPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - controls2c.delete_wxTreeItem(self.this) - def __setattr__(self,name,value): - if name == "m_mask" : - controls2c.wxTreeItem_m_mask_set(self.this,value) - return - if name == "m_itemId" : - controls2c.wxTreeItem_m_itemId_set(self.this,value) - return - if name == "m_state" : - controls2c.wxTreeItem_m_state_set(self.this,value) - return - if name == "m_stateMask" : - controls2c.wxTreeItem_m_stateMask_set(self.this,value) - return - if name == "m_text" : - controls2c.wxTreeItem_m_text_set(self.this,value) - return - if name == "m_image" : - controls2c.wxTreeItem_m_image_set(self.this,value) - return - if name == "m_selectedImage" : - controls2c.wxTreeItem_m_selectedImage_set(self.this,value) - return - if name == "m_children" : - controls2c.wxTreeItem_m_children_set(self.this,value) - return - if name == "m_data" : - controls2c.wxTreeItem_m_data_set(self.this,value) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "m_mask" : - return controls2c.wxTreeItem_m_mask_get(self.this) - if name == "m_itemId" : - return controls2c.wxTreeItem_m_itemId_get(self.this) - if name == "m_state" : - return controls2c.wxTreeItem_m_state_get(self.this) - if name == "m_stateMask" : - return controls2c.wxTreeItem_m_stateMask_get(self.this) - if name == "m_text" : - return controls2c.wxTreeItem_m_text_get(self.this) - if name == "m_image" : - return controls2c.wxTreeItem_m_image_get(self.this) - if name == "m_selectedImage" : - return controls2c.wxTreeItem_m_selectedImage_get(self.this) - if name == "m_children" : - return controls2c.wxTreeItem_m_children_get(self.this) - if name == "m_data" : - return controls2c.wxTreeItem_m_data_get(self.this) - raise AttributeError,name - def __repr__(self): - return "" -class wxTreeItem(wxTreeItemPtr): - def __init__(self) : - self.this = controls2c.new_wxTreeItem() - self.thisown = 1 - - - - -class wxTreeEventPtr(wxCommandEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __setattr__(self,name,value): - if name == "m_code" : - controls2c.wxTreeEvent_m_code_set(self.this,value) - return - if name == "m_item" : - controls2c.wxTreeEvent_m_item_set(self.this,value.this) - return - if name == "m_oldItem" : - controls2c.wxTreeEvent_m_oldItem_set(self.this,value) - return - if name == "m_pointDrag" : - controls2c.wxTreeEvent_m_pointDrag_set(self.this,value.this) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "m_code" : - return controls2c.wxTreeEvent_m_code_get(self.this) - if name == "m_item" : - return wxTreeItemPtr(controls2c.wxTreeEvent_m_item_get(self.this)) - if name == "m_oldItem" : - return controls2c.wxTreeEvent_m_oldItem_get(self.this) - if name == "m_pointDrag" : - return wxPointPtr(controls2c.wxTreeEvent_m_pointDrag_get(self.this)) - raise AttributeError,name - def __repr__(self): - return "" -class wxTreeEvent(wxTreeEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxTreeCtrlPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def DeleteAllItems(self): - val = controls2c.wxTreeCtrl_DeleteAllItems(self.this) - return val - def DeleteItem(self,arg0): - val = controls2c.wxTreeCtrl_DeleteItem(self.this,arg0) - return val - def EditLabel(self,arg0): - val = controls2c.wxTreeCtrl_EditLabel(self.this,arg0) - val = wxTextCtrlPtr(val) - return val - def EnsureVisible(self,arg0): - val = controls2c.wxTreeCtrl_EnsureVisible(self.this,arg0) - return val - def ExpandItem(self,arg0,arg1): - val = controls2c.wxTreeCtrl_ExpandItem(self.this,arg0,arg1) - return val - def GetChild(self,arg0): - val = controls2c.wxTreeCtrl_GetChild(self.this,arg0) - return val - def GetCount(self): - val = controls2c.wxTreeCtrl_GetCount(self.this) - return val - def GetEditControl(self): - val = controls2c.wxTreeCtrl_GetEditControl(self.this) - val = wxTextCtrlPtr(val) - return val - def GetFirstVisibleItem(self): - val = controls2c.wxTreeCtrl_GetFirstVisibleItem(self.this) - return val - def GetImageList(self,*args): - val = apply(controls2c.wxTreeCtrl_GetImageList,(self.this,)+args) - return val - def GetIndent(self): - val = controls2c.wxTreeCtrl_GetIndent(self.this) - return val - def GetItemData(self,arg0): - val = controls2c.wxTreeCtrl_GetItemData(self.this,arg0) - return val - def GetItem(self): - val = controls2c.wxTreeCtrl_GetItem(self.this) - val = wxTreeItemPtr(val) - val.thisown = 1 - return val - def GetItemRect(self,arg0,*args): - val = apply(controls2c.wxTreeCtrl_GetItemRect,(self.this,arg0,)+args) - val = wxRectPtr(val) - val.thisown = 1 - return val - def GetItemState(self,arg0,arg1): - val = controls2c.wxTreeCtrl_GetItemState(self.this,arg0,arg1) - return val - def GetItemText(self,arg0): - val = controls2c.wxTreeCtrl_GetItemText(self.this,arg0) - return val - def GetNextItem(self,arg0,arg1): - val = controls2c.wxTreeCtrl_GetNextItem(self.this,arg0,arg1) - return val - def GetNextVisibleItem(self,arg0): - val = controls2c.wxTreeCtrl_GetNextVisibleItem(self.this,arg0) - return val - def GetParent(self,arg0): - val = controls2c.wxTreeCtrl_GetParent(self.this,arg0) - return val - def GetRootItem(self): - val = controls2c.wxTreeCtrl_GetRootItem(self.this) - return val - def GetSelection(self): - val = controls2c.wxTreeCtrl_GetSelection(self.this) - return val - def HitTest(self,arg0): - val = controls2c.wxTreeCtrl_HitTest(self.this,arg0.this) - return val - def InsertItem(self,arg0,arg1,*args): - val = apply(controls2c.wxTreeCtrl_InsertItem,(self.this,arg0,arg1.this,)+args) - return val - def InsertItemString(self,arg0,arg1,*args): - val = apply(controls2c.wxTreeCtrl_InsertItemString,(self.this,arg0,arg1,)+args) - return val - def ItemHasChildren(self,arg0): - val = controls2c.wxTreeCtrl_ItemHasChildren(self.this,arg0) - return val - def ScrollTo(self,arg0): - val = controls2c.wxTreeCtrl_ScrollTo(self.this,arg0) - return val - def SelectItem(self,arg0): - val = controls2c.wxTreeCtrl_SelectItem(self.this,arg0) - return val - def SetIndent(self,arg0): - val = controls2c.wxTreeCtrl_SetIndent(self.this,arg0) - return val - def SetImageList(self,arg0,*args): - val = apply(controls2c.wxTreeCtrl_SetImageList,(self.this,arg0,)+args) - return val - def SetItem(self,arg0): - val = controls2c.wxTreeCtrl_SetItem(self.this,arg0.this) - return val - def SetItemImage(self,arg0,arg1,arg2): - val = controls2c.wxTreeCtrl_SetItemImage(self.this,arg0,arg1,arg2) - return val - def SetItemState(self,arg0,arg1,arg2): - val = controls2c.wxTreeCtrl_SetItemState(self.this,arg0,arg1,arg2) - return val - def SetItemText(self,arg0,arg1): - val = controls2c.wxTreeCtrl_SetItemText(self.this,arg0,arg1) - return val - def SetItemData(self,arg0,arg1): - val = controls2c.wxTreeCtrl_SetItemData(self.this,arg0,arg1) - return val - def SortChildren(self,arg0): - val = controls2c.wxTreeCtrl_SortChildren(self.this,arg0) - return val - def __repr__(self): - return "" -class wxTreeCtrl(wxTreeCtrlPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controls2c.new_wxTreeCtrl,(arg0.this,)+args) - self.thisown = 1 - - - - -class wxTabEventPtr(wxCommandEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxTabEvent(wxTabEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxTabCtrlPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def DeleteAllItems(self): - val = controls2c.wxTabCtrl_DeleteAllItems(self.this) - return val - def DeleteItem(self,arg0): - val = controls2c.wxTabCtrl_DeleteItem(self.this,arg0) - return val - def GetImageList(self): - val = controls2c.wxTabCtrl_GetImageList(self.this) - return val - def GetItemCount(self): - val = controls2c.wxTabCtrl_GetItemCount(self.this) - return val - def GetItemImage(self,arg0): - val = controls2c.wxTabCtrl_GetItemImage(self.this,arg0) - return val - def GetItemRect(self,arg0): - val = controls2c.wxTabCtrl_GetItemRect(self.this,arg0) - val = wxRectPtr(val) - val.thisown = 1 - return val - def GetItemText(self,arg0): - val = controls2c.wxTabCtrl_GetItemText(self.this,arg0) - return val - def GetRowCount(self): - val = controls2c.wxTabCtrl_GetRowCount(self.this) - return val - def GetSelection(self): - val = controls2c.wxTabCtrl_GetSelection(self.this) - return val - def HitTest(self,arg0): - val = controls2c.wxTabCtrl_HitTest(self.this,arg0.this) - return val - def InsertItem(self,arg0,arg1,*args): - val = apply(controls2c.wxTabCtrl_InsertItem,(self.this,arg0,arg1,)+args) - return val - def SetItemImage(self,arg0,arg1): - val = controls2c.wxTabCtrl_SetItemImage(self.this,arg0,arg1) - return val - def SetImageList(self,arg0): - val = controls2c.wxTabCtrl_SetImageList(self.this,arg0) - return val - def SetItemSize(self,arg0): - val = controls2c.wxTabCtrl_SetItemSize(self.this,arg0.this) - return val - def SetItemText(self,arg0,arg1): - val = controls2c.wxTabCtrl_SetItemText(self.this,arg0,arg1) - return val - def SetPadding(self,arg0): - val = controls2c.wxTabCtrl_SetPadding(self.this,arg0.this) - return val - def SetSelection(self,arg0): - val = controls2c.wxTabCtrl_SetSelection(self.this,arg0) - return val - def __repr__(self): - return "" -class wxTabCtrl(wxTabCtrlPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controls2c.new_wxTabCtrl,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - - - -#-------------- VARIABLE WRAPPERS ------------------ - -wxTREE_MASK_HANDLE = controls2c.wxTREE_MASK_HANDLE -wxTREE_MASK_STATE = controls2c.wxTREE_MASK_STATE -wxTREE_MASK_TEXT = controls2c.wxTREE_MASK_TEXT -wxTREE_MASK_IMAGE = controls2c.wxTREE_MASK_IMAGE -wxTREE_MASK_SELECTED_IMAGE = controls2c.wxTREE_MASK_SELECTED_IMAGE -wxTREE_MASK_CHILDREN = controls2c.wxTREE_MASK_CHILDREN -wxTREE_MASK_DATA = controls2c.wxTREE_MASK_DATA -wxTREE_STATE_BOLD = controls2c.wxTREE_STATE_BOLD -wxTREE_STATE_DROPHILITED = controls2c.wxTREE_STATE_DROPHILITED -wxTREE_STATE_EXPANDED = controls2c.wxTREE_STATE_EXPANDED -wxTREE_STATE_EXPANDEDONCE = controls2c.wxTREE_STATE_EXPANDEDONCE -wxTREE_STATE_FOCUSED = controls2c.wxTREE_STATE_FOCUSED -wxTREE_STATE_SELECTED = controls2c.wxTREE_STATE_SELECTED -wxTREE_STATE_CUT = controls2c.wxTREE_STATE_CUT -wxTREE_HITTEST_ABOVE = controls2c.wxTREE_HITTEST_ABOVE -wxTREE_HITTEST_BELOW = controls2c.wxTREE_HITTEST_BELOW -wxTREE_HITTEST_NOWHERE = controls2c.wxTREE_HITTEST_NOWHERE -wxTREE_HITTEST_ONITEMBUTTON = controls2c.wxTREE_HITTEST_ONITEMBUTTON -wxTREE_HITTEST_ONITEMICON = controls2c.wxTREE_HITTEST_ONITEMICON -wxTREE_HITTEST_ONITEMINDENT = controls2c.wxTREE_HITTEST_ONITEMINDENT -wxTREE_HITTEST_ONITEMLABEL = controls2c.wxTREE_HITTEST_ONITEMLABEL -wxTREE_HITTEST_ONITEMRIGHT = controls2c.wxTREE_HITTEST_ONITEMRIGHT -wxTREE_HITTEST_ONITEMSTATEICON = controls2c.wxTREE_HITTEST_ONITEMSTATEICON -wxTREE_HITTEST_TOLEFT = controls2c.wxTREE_HITTEST_TOLEFT -wxTREE_HITTEST_TORIGHT = controls2c.wxTREE_HITTEST_TORIGHT -wxTREE_HITTEST_ONITEM = controls2c.wxTREE_HITTEST_ONITEM -wxTREE_NEXT_CARET = controls2c.wxTREE_NEXT_CARET -wxTREE_NEXT_CHILD = controls2c.wxTREE_NEXT_CHILD -wxTREE_NEXT_DROPHILITE = controls2c.wxTREE_NEXT_DROPHILITE -wxTREE_NEXT_FIRSTVISIBLE = controls2c.wxTREE_NEXT_FIRSTVISIBLE -wxTREE_NEXT_NEXT = controls2c.wxTREE_NEXT_NEXT -wxTREE_NEXT_NEXTVISIBLE = controls2c.wxTREE_NEXT_NEXTVISIBLE -wxTREE_NEXT_PARENT = controls2c.wxTREE_NEXT_PARENT -wxTREE_NEXT_PREVIOUS = controls2c.wxTREE_NEXT_PREVIOUS -wxTREE_NEXT_PREVIOUSVISIBLE = controls2c.wxTREE_NEXT_PREVIOUSVISIBLE -wxTREE_NEXT_ROOT = controls2c.wxTREE_NEXT_ROOT -wxTREE_EXPAND_EXPAND = controls2c.wxTREE_EXPAND_EXPAND -wxTREE_EXPAND_COLLAPSE = controls2c.wxTREE_EXPAND_COLLAPSE -wxTREE_EXPAND_COLLAPSE_RESET = controls2c.wxTREE_EXPAND_COLLAPSE_RESET -wxTREE_EXPAND_TOGGLE = controls2c.wxTREE_EXPAND_TOGGLE -wxTREE_INSERT_LAST = controls2c.wxTREE_INSERT_LAST -wxTREE_INSERT_FIRST = controls2c.wxTREE_INSERT_FIRST -wxTREE_INSERT_SORT = controls2c.wxTREE_INSERT_SORT diff --git a/utils/wxPython/src/msw/dummy b/utils/wxPython/src/msw/dummy deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/utils/wxPython/src/msw/events.cpp b/utils/wxPython/src/msw/events.cpp deleted file mode 100644 index 4cd7ccad98..0000000000 --- a/utils/wxPython/src/msw/events.cpp +++ /dev/null @@ -1,2847 +0,0 @@ -/* - * FILE : msw\events.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif - -#define SWIG_init initeventsc - -#define SWIG_name "eventsc" - -#include "helpers.h" - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; -#define wxEvent_GetEventObject(_swigobj) (_swigobj->GetEventObject()) -static PyObject *_wrap_wxEvent_GetEventObject(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxObject * _result; - wxEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxEvent_GetEventObject",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_GetEventObject. Expected _wxEvent_p."); - return NULL; - } - } - _result = (wxObject *)wxEvent_GetEventObject(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxObject_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxEvent_GetEventType(_swigobj) (_swigobj->GetEventType()) -static PyObject *_wrap_wxEvent_GetEventType(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxEventType _result; - wxEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxEvent_GetEventType",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_GetEventType. Expected _wxEvent_p."); - return NULL; - } - } - _result = (wxEventType )wxEvent_GetEventType(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxEvent_GetId(_swigobj) (_swigobj->GetId()) -static PyObject *_wrap_wxEvent_GetId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxEvent_GetId",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_GetId. Expected _wxEvent_p."); - return NULL; - } - } - _result = (int )wxEvent_GetId(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxEvent_GetSkipped(_swigobj) (_swigobj->GetSkipped()) -static PyObject *_wrap_wxEvent_GetSkipped(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxEvent_GetSkipped",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_GetSkipped. Expected _wxEvent_p."); - return NULL; - } - } - _result = (bool )wxEvent_GetSkipped(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxEvent_GetTimestamp(_swigobj) (_swigobj->GetTimestamp()) -static PyObject *_wrap_wxEvent_GetTimestamp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxEvent_GetTimestamp",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_GetTimestamp. Expected _wxEvent_p."); - return NULL; - } - } - _result = (long )wxEvent_GetTimestamp(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxEvent_SetEventObject(_swigobj,_swigarg0) (_swigobj->SetEventObject(_swigarg0)) -static PyObject *_wrap_wxEvent_SetEventObject(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxEvent * _arg0; - wxObject * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxEvent_SetEventObject",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_SetEventObject. Expected _wxEvent_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxObject_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxEvent_SetEventObject. Expected _wxObject_p."); - return NULL; - } - } - wxEvent_SetEventObject(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxEvent_SetEventType(_swigobj,_swigarg0) (_swigobj->SetEventType(_swigarg0)) -static PyObject *_wrap_wxEvent_SetEventType(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxEvent * _arg0; - wxEventType _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxEvent_SetEventType",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_SetEventType. Expected _wxEvent_p."); - return NULL; - } - } - wxEvent_SetEventType(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxEvent_SetId(_swigobj,_swigarg0) (_swigobj->SetId(_swigarg0)) -static PyObject *_wrap_wxEvent_SetId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxEvent * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxEvent_SetId",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_SetId. Expected _wxEvent_p."); - return NULL; - } - } - wxEvent_SetId(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxEvent_SetTimestamp(_swigobj,_swigarg0) (_swigobj->SetTimestamp(_swigarg0)) -static PyObject *_wrap_wxEvent_SetTimestamp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxEvent * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxEvent_SetTimestamp",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_SetTimestamp. Expected _wxEvent_p."); - return NULL; - } - } - wxEvent_SetTimestamp(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxEvent_Skip(_swigobj,_swigarg0) (_swigobj->Skip(_swigarg0)) -static PyObject *_wrap_wxEvent_Skip(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxEvent * _arg0; - bool _arg1 = (1); - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxEvent_Skip",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_Skip. Expected _wxEvent_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxEvent_Skip(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxSizeEventTowxEvent(void *ptr) { - wxSizeEvent *src; - wxEvent *dest; - src = (wxSizeEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxSizeEvent_GetSize(_swigobj) (_swigobj->GetSize()) -static PyObject *_wrap_wxSizeEvent_GetSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSize * _result; - wxSizeEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSizeEvent_GetSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSizeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizeEvent_GetSize. Expected _wxSizeEvent_p."); - return NULL; - } - } - _result = new wxSize (wxSizeEvent_GetSize(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static void *SwigwxCloseEventTowxEvent(void *ptr) { - wxCloseEvent *src; - wxEvent *dest; - src = (wxCloseEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxCloseEvent_GetSessionEnding(_swigobj) (_swigobj->GetSessionEnding()) -static PyObject *_wrap_wxCloseEvent_GetSessionEnding(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxCloseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCloseEvent_GetSessionEnding",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCloseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCloseEvent_GetSessionEnding. Expected _wxCloseEvent_p."); - return NULL; - } - } - _result = (bool )wxCloseEvent_GetSessionEnding(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxCloseEvent_GetLoggingOff(_swigobj) (_swigobj->GetLoggingOff()) -static PyObject *_wrap_wxCloseEvent_GetLoggingOff(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxCloseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCloseEvent_GetLoggingOff",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCloseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCloseEvent_GetLoggingOff. Expected _wxCloseEvent_p."); - return NULL; - } - } - _result = (bool )wxCloseEvent_GetLoggingOff(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxCloseEvent_Veto(_swigobj,_swigarg0) (_swigobj->Veto(_swigarg0)) -static PyObject *_wrap_wxCloseEvent_Veto(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxCloseEvent * _arg0; - bool _arg1 = (1); - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxCloseEvent_Veto",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCloseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCloseEvent_Veto. Expected _wxCloseEvent_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxCloseEvent_Veto(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxCloseEvent_GetVeto(_swigobj) (_swigobj->GetVeto()) -static PyObject *_wrap_wxCloseEvent_GetVeto(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxCloseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCloseEvent_GetVeto",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCloseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCloseEvent_GetVeto. Expected _wxCloseEvent_p."); - return NULL; - } - } - _result = (bool )wxCloseEvent_GetVeto(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxCloseEvent_SetForce(_swigobj,_swigarg0) (_swigobj->SetForce(_swigarg0)) -static PyObject *_wrap_wxCloseEvent_SetForce(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxCloseEvent * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxCloseEvent_SetForce",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCloseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCloseEvent_SetForce. Expected _wxCloseEvent_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxCloseEvent_SetForce(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxCloseEvent_GetForce(_swigobj) (_swigobj->GetForce()) -static PyObject *_wrap_wxCloseEvent_GetForce(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxCloseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCloseEvent_GetForce",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCloseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCloseEvent_GetForce. Expected _wxCloseEvent_p."); - return NULL; - } - } - _result = (bool )wxCloseEvent_GetForce(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxCommandEventTowxEvent(void *ptr) { - wxCommandEvent *src; - wxEvent *dest; - src = (wxCommandEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxCommandEvent_Checked(_swigobj) (_swigobj->Checked()) -static PyObject *_wrap_wxCommandEvent_Checked(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxCommandEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCommandEvent_Checked",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCommandEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_Checked. Expected _wxCommandEvent_p."); - return NULL; - } - } - _result = (bool )wxCommandEvent_Checked(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxCommandEvent_GetExtraLong(_swigobj) (_swigobj->GetExtraLong()) -static PyObject *_wrap_wxCommandEvent_GetExtraLong(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxCommandEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCommandEvent_GetExtraLong",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCommandEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_GetExtraLong. Expected _wxCommandEvent_p."); - return NULL; - } - } - _result = (long )wxCommandEvent_GetExtraLong(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxCommandEvent_GetInt(_swigobj) (_swigobj->GetInt()) -static PyObject *_wrap_wxCommandEvent_GetInt(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxCommandEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCommandEvent_GetInt",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCommandEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_GetInt. Expected _wxCommandEvent_p."); - return NULL; - } - } - _result = (int )wxCommandEvent_GetInt(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxCommandEvent_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxCommandEvent_GetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxCommandEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCommandEvent_GetSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCommandEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_GetSelection. Expected _wxCommandEvent_p."); - return NULL; - } - } - _result = (int )wxCommandEvent_GetSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxCommandEvent_GetString(_swigobj) (_swigobj->GetString()) -static PyObject *_wrap_wxCommandEvent_GetString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - char * _result; - wxCommandEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCommandEvent_GetString",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCommandEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_GetString. Expected _wxCommandEvent_p."); - return NULL; - } - } - _result = (char *)wxCommandEvent_GetString(_arg0); - _resultobj = Py_BuildValue("s", _result); - return _resultobj; -} - -#define wxCommandEvent_IsSelection(_swigobj) (_swigobj->IsSelection()) -static PyObject *_wrap_wxCommandEvent_IsSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxCommandEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCommandEvent_IsSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCommandEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_IsSelection. Expected _wxCommandEvent_p."); - return NULL; - } - } - _result = (bool )wxCommandEvent_IsSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxScrollEventTowxCommandEvent(void *ptr) { - wxScrollEvent *src; - wxCommandEvent *dest; - src = (wxScrollEvent *) ptr; - dest = (wxCommandEvent *) src; - return (void *) dest; -} - -static void *SwigwxScrollEventTowxEvent(void *ptr) { - wxScrollEvent *src; - wxEvent *dest; - src = (wxScrollEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxScrollEvent_GetOrientation(_swigobj) (_swigobj->GetOrientation()) -static PyObject *_wrap_wxScrollEvent_GetOrientation(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxScrollEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxScrollEvent_GetOrientation",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrollEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollEvent_GetOrientation. Expected _wxScrollEvent_p."); - return NULL; - } - } - _result = (int )wxScrollEvent_GetOrientation(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxScrollEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxScrollEvent_GetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxScrollEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxScrollEvent_GetPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrollEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollEvent_GetPosition. Expected _wxScrollEvent_p."); - return NULL; - } - } - _result = (int )wxScrollEvent_GetPosition(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxMouseEventTowxEvent(void *ptr) { - wxMouseEvent *src; - wxEvent *dest; - src = (wxMouseEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxMouseEvent_IsButton(_swigobj) (_swigobj->IsButton()) -static PyObject *_wrap_wxMouseEvent_IsButton(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_IsButton",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_IsButton. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_IsButton(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_ButtonDown(_swigobj,_swigarg0) (_swigobj->ButtonDown(_swigarg0)) -static PyObject *_wrap_wxMouseEvent_ButtonDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - int _arg1 = -1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxMouseEvent_ButtonDown",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_ButtonDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_ButtonDown(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_ButtonDClick(_swigobj,_swigarg0) (_swigobj->ButtonDClick(_swigarg0)) -static PyObject *_wrap_wxMouseEvent_ButtonDClick(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - int _arg1 = -1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxMouseEvent_ButtonDClick",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_ButtonDClick. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_ButtonDClick(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_ButtonUp(_swigobj,_swigarg0) (_swigobj->ButtonUp(_swigarg0)) -static PyObject *_wrap_wxMouseEvent_ButtonUp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - int _arg1 = -1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxMouseEvent_ButtonUp",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_ButtonUp. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_ButtonUp(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_Button(_swigobj,_swigarg0) (_swigobj->Button(_swigarg0)) -static PyObject *_wrap_wxMouseEvent_Button(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMouseEvent_Button",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_Button. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_Button(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_ButtonIsDown(_swigobj,_swigarg0) (_swigobj->ButtonIsDown(_swigarg0)) -static PyObject *_wrap_wxMouseEvent_ButtonIsDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMouseEvent_ButtonIsDown",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_ButtonIsDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_ButtonIsDown(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_ControlDown(_swigobj) (_swigobj->ControlDown()) -static PyObject *_wrap_wxMouseEvent_ControlDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_ControlDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_ControlDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_ControlDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_MetaDown(_swigobj) (_swigobj->MetaDown()) -static PyObject *_wrap_wxMouseEvent_MetaDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_MetaDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_MetaDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_MetaDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_AltDown(_swigobj) (_swigobj->AltDown()) -static PyObject *_wrap_wxMouseEvent_AltDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_AltDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_AltDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_AltDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_ShiftDown(_swigobj) (_swigobj->ShiftDown()) -static PyObject *_wrap_wxMouseEvent_ShiftDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_ShiftDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_ShiftDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_ShiftDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_LeftDown(_swigobj) (_swigobj->LeftDown()) -static PyObject *_wrap_wxMouseEvent_LeftDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_LeftDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_LeftDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_LeftDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_MiddleDown(_swigobj) (_swigobj->MiddleDown()) -static PyObject *_wrap_wxMouseEvent_MiddleDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_MiddleDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_MiddleDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_MiddleDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_RightDown(_swigobj) (_swigobj->RightDown()) -static PyObject *_wrap_wxMouseEvent_RightDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_RightDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_RightDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_RightDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_LeftUp(_swigobj) (_swigobj->LeftUp()) -static PyObject *_wrap_wxMouseEvent_LeftUp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_LeftUp",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_LeftUp. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_LeftUp(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_MiddleUp(_swigobj) (_swigobj->MiddleUp()) -static PyObject *_wrap_wxMouseEvent_MiddleUp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_MiddleUp",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_MiddleUp. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_MiddleUp(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_RightUp(_swigobj) (_swigobj->RightUp()) -static PyObject *_wrap_wxMouseEvent_RightUp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_RightUp",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_RightUp. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_RightUp(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_LeftDClick(_swigobj) (_swigobj->LeftDClick()) -static PyObject *_wrap_wxMouseEvent_LeftDClick(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_LeftDClick",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_LeftDClick. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_LeftDClick(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_MiddleDClick(_swigobj) (_swigobj->MiddleDClick()) -static PyObject *_wrap_wxMouseEvent_MiddleDClick(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_MiddleDClick",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_MiddleDClick. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_MiddleDClick(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_RightDClick(_swigobj) (_swigobj->RightDClick()) -static PyObject *_wrap_wxMouseEvent_RightDClick(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_RightDClick",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_RightDClick. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_RightDClick(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_LeftIsDown(_swigobj) (_swigobj->LeftIsDown()) -static PyObject *_wrap_wxMouseEvent_LeftIsDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_LeftIsDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_LeftIsDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_LeftIsDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_MiddleIsDown(_swigobj) (_swigobj->MiddleIsDown()) -static PyObject *_wrap_wxMouseEvent_MiddleIsDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_MiddleIsDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_MiddleIsDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_MiddleIsDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_RightIsDown(_swigobj) (_swigobj->RightIsDown()) -static PyObject *_wrap_wxMouseEvent_RightIsDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_RightIsDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_RightIsDown. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_RightIsDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_Dragging(_swigobj) (_swigobj->Dragging()) -static PyObject *_wrap_wxMouseEvent_Dragging(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_Dragging",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_Dragging. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_Dragging(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_Moving(_swigobj) (_swigobj->Moving()) -static PyObject *_wrap_wxMouseEvent_Moving(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_Moving",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_Moving. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_Moving(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_Entering(_swigobj) (_swigobj->Entering()) -static PyObject *_wrap_wxMouseEvent_Entering(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_Entering",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_Entering. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_Entering(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_Leaving(_swigobj) (_swigobj->Leaving()) -static PyObject *_wrap_wxMouseEvent_Leaving(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_Leaving",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_Leaving. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (bool )wxMouseEvent_Leaving(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMouseEvent_Position(_swigobj,_swigarg0,_swigarg1) (_swigobj->Position(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMouseEvent_Position(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMouseEvent * _arg0; - long * _arg1; - long temp; - long * _arg2; - long temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_Position",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_Position. Expected _wxMouseEvent_p."); - return NULL; - } - } - wxMouseEvent_Position(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxMouseEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxMouseEvent_GetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_GetPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_GetPosition. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = new wxPoint (wxMouseEvent_GetPosition(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMouseEvent_GetLogicalPosition(_swigobj,_swigarg0) (_swigobj->GetLogicalPosition(_swigarg0)) -static PyObject *_wrap_wxMouseEvent_GetLogicalPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxMouseEvent * _arg0; - wxDC * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxMouseEvent_GetLogicalPosition",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_GetLogicalPosition. Expected _wxMouseEvent_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMouseEvent_GetLogicalPosition. Expected _wxDC_p."); - return NULL; - } - } - _result = new wxPoint (wxMouseEvent_GetLogicalPosition(_arg0,*_arg1)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMouseEvent_GetX(_swigobj) (_swigobj->GetX()) -static PyObject *_wrap_wxMouseEvent_GetX(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_GetX",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_GetX. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (long )wxMouseEvent_GetX(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxMouseEvent_GetY(_swigobj) (_swigobj->GetY()) -static PyObject *_wrap_wxMouseEvent_GetY(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxMouseEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMouseEvent_GetY",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMouseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_GetY. Expected _wxMouseEvent_p."); - return NULL; - } - } - _result = (long )wxMouseEvent_GetY(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -static void *SwigwxKeyEventTowxEvent(void *ptr) { - wxKeyEvent *src; - wxEvent *dest; - src = (wxKeyEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxKeyEvent_ControlDown(_swigobj) (_swigobj->ControlDown()) -static PyObject *_wrap_wxKeyEvent_ControlDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxKeyEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxKeyEvent_ControlDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_ControlDown. Expected _wxKeyEvent_p."); - return NULL; - } - } - _result = (bool )wxKeyEvent_ControlDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxKeyEvent_MetaDown(_swigobj) (_swigobj->MetaDown()) -static PyObject *_wrap_wxKeyEvent_MetaDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxKeyEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxKeyEvent_MetaDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_MetaDown. Expected _wxKeyEvent_p."); - return NULL; - } - } - _result = (bool )wxKeyEvent_MetaDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxKeyEvent_AltDown(_swigobj) (_swigobj->AltDown()) -static PyObject *_wrap_wxKeyEvent_AltDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxKeyEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxKeyEvent_AltDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_AltDown. Expected _wxKeyEvent_p."); - return NULL; - } - } - _result = (bool )wxKeyEvent_AltDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxKeyEvent_ShiftDown(_swigobj) (_swigobj->ShiftDown()) -static PyObject *_wrap_wxKeyEvent_ShiftDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxKeyEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxKeyEvent_ShiftDown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_ShiftDown. Expected _wxKeyEvent_p."); - return NULL; - } - } - _result = (bool )wxKeyEvent_ShiftDown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxKeyEvent_KeyCode(_swigobj) (_swigobj->KeyCode()) -static PyObject *_wrap_wxKeyEvent_KeyCode(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxKeyEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxKeyEvent_KeyCode",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_KeyCode. Expected _wxKeyEvent_p."); - return NULL; - } - } - _result = (long )wxKeyEvent_KeyCode(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxKeyEvent_Position(_swigobj,_swigarg0,_swigarg1) (_swigobj->Position(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxKeyEvent_Position(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxKeyEvent * _arg0; - float * _arg1; - float temp; - float * _arg2; - float temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxKeyEvent_Position",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_Position. Expected _wxKeyEvent_p."); - return NULL; - } - } - wxKeyEvent_Position(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyFloat_FromDouble((double) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyFloat_FromDouble((double) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxKeyEvent_GetX(_swigobj) (_swigobj->GetX()) -static PyObject *_wrap_wxKeyEvent_GetX(PyObject *self, PyObject *args) { - PyObject * _resultobj; - float _result; - wxKeyEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxKeyEvent_GetX",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetX. Expected _wxKeyEvent_p."); - return NULL; - } - } - _result = (float )wxKeyEvent_GetX(_arg0); - _resultobj = Py_BuildValue("f",_result); - return _resultobj; -} - -#define wxKeyEvent_GetY(_swigobj) (_swigobj->GetY()) -static PyObject *_wrap_wxKeyEvent_GetY(PyObject *self, PyObject *args) { - PyObject * _resultobj; - float _result; - wxKeyEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxKeyEvent_GetY",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetY. Expected _wxKeyEvent_p."); - return NULL; - } - } - _result = (float )wxKeyEvent_GetY(_arg0); - _resultobj = Py_BuildValue("f",_result); - return _resultobj; -} - -static void *SwigwxMoveEventTowxEvent(void *ptr) { - wxMoveEvent *src; - wxEvent *dest; - src = (wxMoveEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxMoveEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxMoveEvent_GetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxMoveEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMoveEvent_GetPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMoveEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMoveEvent_GetPosition. Expected _wxMoveEvent_p."); - return NULL; - } - } - _result = new wxPoint (wxMoveEvent_GetPosition(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static void *SwigwxPaintEventTowxEvent(void *ptr) { - wxPaintEvent *src; - wxEvent *dest; - src = (wxPaintEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -static void *SwigwxEraseEventTowxEvent(void *ptr) { - wxEraseEvent *src; - wxEvent *dest; - src = (wxEraseEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxEraseEvent_GetDC(_swigobj) (_swigobj->GetDC()) -static PyObject *_wrap_wxEraseEvent_GetDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _result; - wxEraseEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxEraseEvent_GetDC",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEraseEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEraseEvent_GetDC. Expected _wxEraseEvent_p."); - return NULL; - } - } - _result = (wxDC *)wxEraseEvent_GetDC(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static void *SwigwxFocusEventTowxEvent(void *ptr) { - wxFocusEvent *src; - wxEvent *dest; - src = (wxFocusEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -static void *SwigwxActivateEventTowxEvent(void *ptr) { - wxActivateEvent *src; - wxEvent *dest; - src = (wxActivateEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxActivateEvent_GetActive(_swigobj) (_swigobj->GetActive()) -static PyObject *_wrap_wxActivateEvent_GetActive(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxActivateEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxActivateEvent_GetActive",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxActivateEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxActivateEvent_GetActive. Expected _wxActivateEvent_p."); - return NULL; - } - } - _result = (bool )wxActivateEvent_GetActive(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxInitDialogEventTowxEvent(void *ptr) { - wxInitDialogEvent *src; - wxEvent *dest; - src = (wxInitDialogEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -static void *SwigwxMenuEventTowxEvent(void *ptr) { - wxMenuEvent *src; - wxEvent *dest; - src = (wxMenuEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxMenuEvent_GetMenuId(_swigobj) (_swigobj->GetMenuId()) -static PyObject *_wrap_wxMenuEvent_GetMenuId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxMenuEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuEvent_GetMenuId",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuEvent_GetMenuId. Expected _wxMenuEvent_p."); - return NULL; - } - } - _result = (int )wxMenuEvent_GetMenuId(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxShowEventTowxEvent(void *ptr) { - wxShowEvent *src; - wxEvent *dest; - src = (wxShowEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxShowEvent_SetShow(_swigobj,_swigarg0) (_swigobj->SetShow(_swigarg0)) -static PyObject *_wrap_wxShowEvent_SetShow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxShowEvent * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxShowEvent_SetShow",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxShowEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxShowEvent_SetShow. Expected _wxShowEvent_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxShowEvent_SetShow(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxShowEvent_GetShow(_swigobj) (_swigobj->GetShow()) -static PyObject *_wrap_wxShowEvent_GetShow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxShowEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxShowEvent_GetShow",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxShowEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxShowEvent_GetShow. Expected _wxShowEvent_p."); - return NULL; - } - } - _result = (bool )wxShowEvent_GetShow(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxIconizeEventTowxEvent(void *ptr) { - wxIconizeEvent *src; - wxEvent *dest; - src = (wxIconizeEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -static void *SwigwxMaximizeEventTowxEvent(void *ptr) { - wxMaximizeEvent *src; - wxEvent *dest; - src = (wxMaximizeEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -static void *SwigwxJoystickEventTowxEvent(void *ptr) { - wxJoystickEvent *src; - wxEvent *dest; - src = (wxJoystickEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxJoystickEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxJoystickEvent_GetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxJoystickEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxJoystickEvent_GetPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_GetPosition. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = new wxPoint (wxJoystickEvent_GetPosition(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxJoystickEvent_GetZPosition(_swigobj) (_swigobj->GetZPosition()) -static PyObject *_wrap_wxJoystickEvent_GetZPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxJoystickEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxJoystickEvent_GetZPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_GetZPosition. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = (int )wxJoystickEvent_GetZPosition(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxJoystickEvent_GetButtonState(_swigobj) (_swigobj->GetButtonState()) -static PyObject *_wrap_wxJoystickEvent_GetButtonState(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxJoystickEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxJoystickEvent_GetButtonState",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_GetButtonState. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = (int )wxJoystickEvent_GetButtonState(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxJoystickEvent_GetButtonChange(_swigobj) (_swigobj->GetButtonChange()) -static PyObject *_wrap_wxJoystickEvent_GetButtonChange(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxJoystickEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxJoystickEvent_GetButtonChange",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_GetButtonChange. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = (int )wxJoystickEvent_GetButtonChange(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxJoystickEvent_GetJoystick(_swigobj) (_swigobj->GetJoystick()) -static PyObject *_wrap_wxJoystickEvent_GetJoystick(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxJoystickEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxJoystickEvent_GetJoystick",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_GetJoystick. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = (int )wxJoystickEvent_GetJoystick(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxJoystickEvent_SetJoystick(_swigobj,_swigarg0) (_swigobj->SetJoystick(_swigarg0)) -static PyObject *_wrap_wxJoystickEvent_SetJoystick(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxJoystickEvent * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxJoystickEvent_SetJoystick",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_SetJoystick. Expected _wxJoystickEvent_p."); - return NULL; - } - } - wxJoystickEvent_SetJoystick(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxJoystickEvent_SetButtonState(_swigobj,_swigarg0) (_swigobj->SetButtonState(_swigarg0)) -static PyObject *_wrap_wxJoystickEvent_SetButtonState(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxJoystickEvent * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxJoystickEvent_SetButtonState",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_SetButtonState. Expected _wxJoystickEvent_p."); - return NULL; - } - } - wxJoystickEvent_SetButtonState(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxJoystickEvent_SetButtonChange(_swigobj,_swigarg0) (_swigobj->SetButtonChange(_swigarg0)) -static PyObject *_wrap_wxJoystickEvent_SetButtonChange(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxJoystickEvent * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxJoystickEvent_SetButtonChange",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_SetButtonChange. Expected _wxJoystickEvent_p."); - return NULL; - } - } - wxJoystickEvent_SetButtonChange(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxJoystickEvent_SetPosition(_swigobj,_swigarg0) (_swigobj->SetPosition(_swigarg0)) -static PyObject *_wrap_wxJoystickEvent_SetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxJoystickEvent * _arg0; - wxPoint * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxJoystickEvent_SetPosition",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_SetPosition. Expected _wxJoystickEvent_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxJoystickEvent_SetPosition. Expected _wxPoint_p."); - return NULL; - } - } - wxJoystickEvent_SetPosition(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxJoystickEvent_SetZPosition(_swigobj,_swigarg0) (_swigobj->SetZPosition(_swigarg0)) -static PyObject *_wrap_wxJoystickEvent_SetZPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxJoystickEvent * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxJoystickEvent_SetZPosition",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_SetZPosition. Expected _wxJoystickEvent_p."); - return NULL; - } - } - wxJoystickEvent_SetZPosition(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxJoystickEvent_IsButton(_swigobj) (_swigobj->IsButton()) -static PyObject *_wrap_wxJoystickEvent_IsButton(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxJoystickEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxJoystickEvent_IsButton",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_IsButton. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = (bool )wxJoystickEvent_IsButton(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxJoystickEvent_IsMove(_swigobj) (_swigobj->IsMove()) -static PyObject *_wrap_wxJoystickEvent_IsMove(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxJoystickEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxJoystickEvent_IsMove",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_IsMove. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = (bool )wxJoystickEvent_IsMove(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxJoystickEvent_IsZMove(_swigobj) (_swigobj->IsZMove()) -static PyObject *_wrap_wxJoystickEvent_IsZMove(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxJoystickEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxJoystickEvent_IsZMove",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_IsZMove. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = (bool )wxJoystickEvent_IsZMove(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxJoystickEvent_ButtonDown(_swigobj,_swigarg0) (_swigobj->ButtonDown(_swigarg0)) -static PyObject *_wrap_wxJoystickEvent_ButtonDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxJoystickEvent * _arg0; - int _arg1 = wxJOY_BUTTON_ANY; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxJoystickEvent_ButtonDown",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_ButtonDown. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = (bool )wxJoystickEvent_ButtonDown(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxJoystickEvent_ButtonUp(_swigobj,_swigarg0) (_swigobj->ButtonUp(_swigarg0)) -static PyObject *_wrap_wxJoystickEvent_ButtonUp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxJoystickEvent * _arg0; - int _arg1 = wxJOY_BUTTON_ANY; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxJoystickEvent_ButtonUp",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_ButtonUp. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = (bool )wxJoystickEvent_ButtonUp(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxJoystickEvent_ButtonIsDown(_swigobj,_swigarg0) (_swigobj->ButtonIsDown(_swigarg0)) -static PyObject *_wrap_wxJoystickEvent_ButtonIsDown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxJoystickEvent * _arg0; - int _arg1 = wxJOY_BUTTON_ANY; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxJoystickEvent_ButtonIsDown",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxJoystickEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystickEvent_ButtonIsDown. Expected _wxJoystickEvent_p."); - return NULL; - } - } - _result = (bool )wxJoystickEvent_ButtonIsDown(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxDropFilesEventTowxEvent(void *ptr) { - wxDropFilesEvent *src; - wxEvent *dest; - src = (wxDropFilesEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxDropFilesEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxDropFilesEvent_GetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxDropFilesEvent * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDropFilesEvent_GetPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDropFilesEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDropFilesEvent_GetPosition. Expected _wxDropFilesEvent_p."); - return NULL; - } - } - _result = new wxPoint (wxDropFilesEvent_GetPosition(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxDropFilesEvent_GetNumberOfFiles(_swigobj) (_swigobj->GetNumberOfFiles()) -static PyObject *_wrap_wxDropFilesEvent_GetNumberOfFiles(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxDropFilesEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDropFilesEvent_GetNumberOfFiles",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDropFilesEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDropFilesEvent_GetNumberOfFiles. Expected _wxDropFilesEvent_p."); - return NULL; - } - } - _result = (int )wxDropFilesEvent_GetNumberOfFiles(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject * wxDropFilesEvent_GetFiles(wxDropFilesEvent *self) { - int count = self->GetNumberOfFiles(); - wxString* files = self->GetFiles(); - PyObject* list = PyList_New(count); - - if (!list) { - PyErr_SetString(PyExc_MemoryError, "Can't allocate list of files!"); - return NULL; - } - - for (int i=0; iRequestMore(_swigarg0)) -static PyObject *_wrap_wxIdleEvent_RequestMore(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIdleEvent * _arg0; - bool _arg1 = (1); - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxIdleEvent_RequestMore",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIdleEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIdleEvent_RequestMore. Expected _wxIdleEvent_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxIdleEvent_RequestMore(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIdleEvent_MoreRequested(_swigobj) (_swigobj->MoreRequested()) -static PyObject *_wrap_wxIdleEvent_MoreRequested(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxIdleEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxIdleEvent_MoreRequested",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIdleEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIdleEvent_MoreRequested. Expected _wxIdleEvent_p."); - return NULL; - } - } - _result = (bool )wxIdleEvent_MoreRequested(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxUpdateUIEventTowxEvent(void *ptr) { - wxUpdateUIEvent *src; - wxEvent *dest; - src = (wxUpdateUIEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxUpdateUIEvent_GetChecked(_swigobj) (_swigobj->GetChecked()) -static PyObject *_wrap_wxUpdateUIEvent_GetChecked(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxUpdateUIEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxUpdateUIEvent_GetChecked",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxUpdateUIEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxUpdateUIEvent_GetChecked. Expected _wxUpdateUIEvent_p."); - return NULL; - } - } - _result = (bool )wxUpdateUIEvent_GetChecked(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxUpdateUIEvent_GetEnabled(_swigobj) (_swigobj->GetEnabled()) -static PyObject *_wrap_wxUpdateUIEvent_GetEnabled(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxUpdateUIEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxUpdateUIEvent_GetEnabled",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxUpdateUIEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxUpdateUIEvent_GetEnabled. Expected _wxUpdateUIEvent_p."); - return NULL; - } - } - _result = (bool )wxUpdateUIEvent_GetEnabled(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxUpdateUIEvent_GetText(_swigobj) (_swigobj->GetText()) -static PyObject *_wrap_wxUpdateUIEvent_GetText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxUpdateUIEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxUpdateUIEvent_GetText",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxUpdateUIEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxUpdateUIEvent_GetText. Expected _wxUpdateUIEvent_p."); - return NULL; - } - } - _result = new wxString (wxUpdateUIEvent_GetText(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxUpdateUIEvent_GetSetText(_swigobj) (_swigobj->GetSetText()) -static PyObject *_wrap_wxUpdateUIEvent_GetSetText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxUpdateUIEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxUpdateUIEvent_GetSetText",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxUpdateUIEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxUpdateUIEvent_GetSetText. Expected _wxUpdateUIEvent_p."); - return NULL; - } - } - _result = (bool )wxUpdateUIEvent_GetSetText(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxUpdateUIEvent_GetSetChecked(_swigobj) (_swigobj->GetSetChecked()) -static PyObject *_wrap_wxUpdateUIEvent_GetSetChecked(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxUpdateUIEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxUpdateUIEvent_GetSetChecked",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxUpdateUIEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxUpdateUIEvent_GetSetChecked. Expected _wxUpdateUIEvent_p."); - return NULL; - } - } - _result = (bool )wxUpdateUIEvent_GetSetChecked(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxUpdateUIEvent_GetSetEnabled(_swigobj) (_swigobj->GetSetEnabled()) -static PyObject *_wrap_wxUpdateUIEvent_GetSetEnabled(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxUpdateUIEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxUpdateUIEvent_GetSetEnabled",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxUpdateUIEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxUpdateUIEvent_GetSetEnabled. Expected _wxUpdateUIEvent_p."); - return NULL; - } - } - _result = (bool )wxUpdateUIEvent_GetSetEnabled(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxUpdateUIEvent_Check(_swigobj,_swigarg0) (_swigobj->Check(_swigarg0)) -static PyObject *_wrap_wxUpdateUIEvent_Check(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxUpdateUIEvent * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxUpdateUIEvent_Check",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxUpdateUIEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxUpdateUIEvent_Check. Expected _wxUpdateUIEvent_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxUpdateUIEvent_Check(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxUpdateUIEvent_Enable(_swigobj,_swigarg0) (_swigobj->Enable(_swigarg0)) -static PyObject *_wrap_wxUpdateUIEvent_Enable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxUpdateUIEvent * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxUpdateUIEvent_Enable",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxUpdateUIEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxUpdateUIEvent_Enable. Expected _wxUpdateUIEvent_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxUpdateUIEvent_Enable(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxUpdateUIEvent_SetText(_swigobj,_swigarg0) (_swigobj->SetText(_swigarg0)) -static PyObject *_wrap_wxUpdateUIEvent_SetText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxUpdateUIEvent * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxUpdateUIEvent_SetText",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxUpdateUIEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxUpdateUIEvent_SetText. Expected _wxUpdateUIEvent_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxUpdateUIEvent_SetText(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static void *SwigwxSysColourChangedEventTowxEvent(void *ptr) { - wxSysColourChangedEvent *src; - wxEvent *dest; - src = (wxSysColourChangedEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -static PyMethodDef eventscMethods[] = { - { "wxUpdateUIEvent_SetText", _wrap_wxUpdateUIEvent_SetText, 1 }, - { "wxUpdateUIEvent_Enable", _wrap_wxUpdateUIEvent_Enable, 1 }, - { "wxUpdateUIEvent_Check", _wrap_wxUpdateUIEvent_Check, 1 }, - { "wxUpdateUIEvent_GetSetEnabled", _wrap_wxUpdateUIEvent_GetSetEnabled, 1 }, - { "wxUpdateUIEvent_GetSetChecked", _wrap_wxUpdateUIEvent_GetSetChecked, 1 }, - { "wxUpdateUIEvent_GetSetText", _wrap_wxUpdateUIEvent_GetSetText, 1 }, - { "wxUpdateUIEvent_GetText", _wrap_wxUpdateUIEvent_GetText, 1 }, - { "wxUpdateUIEvent_GetEnabled", _wrap_wxUpdateUIEvent_GetEnabled, 1 }, - { "wxUpdateUIEvent_GetChecked", _wrap_wxUpdateUIEvent_GetChecked, 1 }, - { "wxIdleEvent_MoreRequested", _wrap_wxIdleEvent_MoreRequested, 1 }, - { "wxIdleEvent_RequestMore", _wrap_wxIdleEvent_RequestMore, 1 }, - { "wxDropFilesEvent_GetFiles", _wrap_wxDropFilesEvent_GetFiles, 1 }, - { "wxDropFilesEvent_GetNumberOfFiles", _wrap_wxDropFilesEvent_GetNumberOfFiles, 1 }, - { "wxDropFilesEvent_GetPosition", _wrap_wxDropFilesEvent_GetPosition, 1 }, - { "wxJoystickEvent_ButtonIsDown", _wrap_wxJoystickEvent_ButtonIsDown, 1 }, - { "wxJoystickEvent_ButtonUp", _wrap_wxJoystickEvent_ButtonUp, 1 }, - { "wxJoystickEvent_ButtonDown", _wrap_wxJoystickEvent_ButtonDown, 1 }, - { "wxJoystickEvent_IsZMove", _wrap_wxJoystickEvent_IsZMove, 1 }, - { "wxJoystickEvent_IsMove", _wrap_wxJoystickEvent_IsMove, 1 }, - { "wxJoystickEvent_IsButton", _wrap_wxJoystickEvent_IsButton, 1 }, - { "wxJoystickEvent_SetZPosition", _wrap_wxJoystickEvent_SetZPosition, 1 }, - { "wxJoystickEvent_SetPosition", _wrap_wxJoystickEvent_SetPosition, 1 }, - { "wxJoystickEvent_SetButtonChange", _wrap_wxJoystickEvent_SetButtonChange, 1 }, - { "wxJoystickEvent_SetButtonState", _wrap_wxJoystickEvent_SetButtonState, 1 }, - { "wxJoystickEvent_SetJoystick", _wrap_wxJoystickEvent_SetJoystick, 1 }, - { "wxJoystickEvent_GetJoystick", _wrap_wxJoystickEvent_GetJoystick, 1 }, - { "wxJoystickEvent_GetButtonChange", _wrap_wxJoystickEvent_GetButtonChange, 1 }, - { "wxJoystickEvent_GetButtonState", _wrap_wxJoystickEvent_GetButtonState, 1 }, - { "wxJoystickEvent_GetZPosition", _wrap_wxJoystickEvent_GetZPosition, 1 }, - { "wxJoystickEvent_GetPosition", _wrap_wxJoystickEvent_GetPosition, 1 }, - { "wxShowEvent_GetShow", _wrap_wxShowEvent_GetShow, 1 }, - { "wxShowEvent_SetShow", _wrap_wxShowEvent_SetShow, 1 }, - { "wxMenuEvent_GetMenuId", _wrap_wxMenuEvent_GetMenuId, 1 }, - { "wxActivateEvent_GetActive", _wrap_wxActivateEvent_GetActive, 1 }, - { "wxEraseEvent_GetDC", _wrap_wxEraseEvent_GetDC, 1 }, - { "wxMoveEvent_GetPosition", _wrap_wxMoveEvent_GetPosition, 1 }, - { "wxKeyEvent_GetY", _wrap_wxKeyEvent_GetY, 1 }, - { "wxKeyEvent_GetX", _wrap_wxKeyEvent_GetX, 1 }, - { "wxKeyEvent_Position", _wrap_wxKeyEvent_Position, 1 }, - { "wxKeyEvent_KeyCode", _wrap_wxKeyEvent_KeyCode, 1 }, - { "wxKeyEvent_ShiftDown", _wrap_wxKeyEvent_ShiftDown, 1 }, - { "wxKeyEvent_AltDown", _wrap_wxKeyEvent_AltDown, 1 }, - { "wxKeyEvent_MetaDown", _wrap_wxKeyEvent_MetaDown, 1 }, - { "wxKeyEvent_ControlDown", _wrap_wxKeyEvent_ControlDown, 1 }, - { "wxMouseEvent_GetY", _wrap_wxMouseEvent_GetY, 1 }, - { "wxMouseEvent_GetX", _wrap_wxMouseEvent_GetX, 1 }, - { "wxMouseEvent_GetLogicalPosition", _wrap_wxMouseEvent_GetLogicalPosition, 1 }, - { "wxMouseEvent_GetPosition", _wrap_wxMouseEvent_GetPosition, 1 }, - { "wxMouseEvent_Position", _wrap_wxMouseEvent_Position, 1 }, - { "wxMouseEvent_Leaving", _wrap_wxMouseEvent_Leaving, 1 }, - { "wxMouseEvent_Entering", _wrap_wxMouseEvent_Entering, 1 }, - { "wxMouseEvent_Moving", _wrap_wxMouseEvent_Moving, 1 }, - { "wxMouseEvent_Dragging", _wrap_wxMouseEvent_Dragging, 1 }, - { "wxMouseEvent_RightIsDown", _wrap_wxMouseEvent_RightIsDown, 1 }, - { "wxMouseEvent_MiddleIsDown", _wrap_wxMouseEvent_MiddleIsDown, 1 }, - { "wxMouseEvent_LeftIsDown", _wrap_wxMouseEvent_LeftIsDown, 1 }, - { "wxMouseEvent_RightDClick", _wrap_wxMouseEvent_RightDClick, 1 }, - { "wxMouseEvent_MiddleDClick", _wrap_wxMouseEvent_MiddleDClick, 1 }, - { "wxMouseEvent_LeftDClick", _wrap_wxMouseEvent_LeftDClick, 1 }, - { "wxMouseEvent_RightUp", _wrap_wxMouseEvent_RightUp, 1 }, - { "wxMouseEvent_MiddleUp", _wrap_wxMouseEvent_MiddleUp, 1 }, - { "wxMouseEvent_LeftUp", _wrap_wxMouseEvent_LeftUp, 1 }, - { "wxMouseEvent_RightDown", _wrap_wxMouseEvent_RightDown, 1 }, - { "wxMouseEvent_MiddleDown", _wrap_wxMouseEvent_MiddleDown, 1 }, - { "wxMouseEvent_LeftDown", _wrap_wxMouseEvent_LeftDown, 1 }, - { "wxMouseEvent_ShiftDown", _wrap_wxMouseEvent_ShiftDown, 1 }, - { "wxMouseEvent_AltDown", _wrap_wxMouseEvent_AltDown, 1 }, - { "wxMouseEvent_MetaDown", _wrap_wxMouseEvent_MetaDown, 1 }, - { "wxMouseEvent_ControlDown", _wrap_wxMouseEvent_ControlDown, 1 }, - { "wxMouseEvent_ButtonIsDown", _wrap_wxMouseEvent_ButtonIsDown, 1 }, - { "wxMouseEvent_Button", _wrap_wxMouseEvent_Button, 1 }, - { "wxMouseEvent_ButtonUp", _wrap_wxMouseEvent_ButtonUp, 1 }, - { "wxMouseEvent_ButtonDClick", _wrap_wxMouseEvent_ButtonDClick, 1 }, - { "wxMouseEvent_ButtonDown", _wrap_wxMouseEvent_ButtonDown, 1 }, - { "wxMouseEvent_IsButton", _wrap_wxMouseEvent_IsButton, 1 }, - { "wxScrollEvent_GetPosition", _wrap_wxScrollEvent_GetPosition, 1 }, - { "wxScrollEvent_GetOrientation", _wrap_wxScrollEvent_GetOrientation, 1 }, - { "wxCommandEvent_IsSelection", _wrap_wxCommandEvent_IsSelection, 1 }, - { "wxCommandEvent_GetString", _wrap_wxCommandEvent_GetString, 1 }, - { "wxCommandEvent_GetSelection", _wrap_wxCommandEvent_GetSelection, 1 }, - { "wxCommandEvent_GetInt", _wrap_wxCommandEvent_GetInt, 1 }, - { "wxCommandEvent_GetExtraLong", _wrap_wxCommandEvent_GetExtraLong, 1 }, - { "wxCommandEvent_Checked", _wrap_wxCommandEvent_Checked, 1 }, - { "wxCloseEvent_GetForce", _wrap_wxCloseEvent_GetForce, 1 }, - { "wxCloseEvent_SetForce", _wrap_wxCloseEvent_SetForce, 1 }, - { "wxCloseEvent_GetVeto", _wrap_wxCloseEvent_GetVeto, 1 }, - { "wxCloseEvent_Veto", _wrap_wxCloseEvent_Veto, 1 }, - { "wxCloseEvent_GetLoggingOff", _wrap_wxCloseEvent_GetLoggingOff, 1 }, - { "wxCloseEvent_GetSessionEnding", _wrap_wxCloseEvent_GetSessionEnding, 1 }, - { "wxSizeEvent_GetSize", _wrap_wxSizeEvent_GetSize, 1 }, - { "wxEvent_Skip", _wrap_wxEvent_Skip, 1 }, - { "wxEvent_SetTimestamp", _wrap_wxEvent_SetTimestamp, 1 }, - { "wxEvent_SetId", _wrap_wxEvent_SetId, 1 }, - { "wxEvent_SetEventType", _wrap_wxEvent_SetEventType, 1 }, - { "wxEvent_SetEventObject", _wrap_wxEvent_SetEventObject, 1 }, - { "wxEvent_GetTimestamp", _wrap_wxEvent_GetTimestamp, 1 }, - { "wxEvent_GetSkipped", _wrap_wxEvent_GetSkipped, 1 }, - { "wxEvent_GetId", _wrap_wxEvent_GetId, 1 }, - { "wxEvent_GetEventType", _wrap_wxEvent_GetEventType, 1 }, - { "wxEvent_GetEventObject", _wrap_wxEvent_GetEventObject, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initeventsc)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("eventsc", eventscMethods); - d = PyModule_GetDict(m); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_wxAcceleratorTable","_class_wxAcceleratorTable",0); - SWIG_RegisterMapping("_wxEvent","_class_wxSysColourChangedEvent",SwigwxSysColourChangedEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxSysColourChangedEvent",SwigwxSysColourChangedEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxUpdateUIEvent",SwigwxUpdateUIEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxUpdateUIEvent",SwigwxUpdateUIEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxIdleEvent",SwigwxIdleEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxIdleEvent",SwigwxIdleEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxDropFilesEvent",SwigwxDropFilesEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxDropFilesEvent",SwigwxDropFilesEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxJoystickEvent",SwigwxJoystickEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxJoystickEvent",SwigwxJoystickEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxMaximizeEvent",SwigwxMaximizeEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxMaximizeEvent",SwigwxMaximizeEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxIconizeEvent",SwigwxIconizeEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxIconizeEvent",SwigwxIconizeEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxShowEvent",SwigwxShowEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxShowEvent",SwigwxShowEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxMenuEvent",SwigwxMenuEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxMenuEvent",SwigwxMenuEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxInitDialogEvent",SwigwxInitDialogEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxInitDialogEvent",SwigwxInitDialogEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxActivateEvent",SwigwxActivateEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxActivateEvent",SwigwxActivateEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxFocusEvent",SwigwxFocusEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxFocusEvent",SwigwxFocusEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxEraseEvent",SwigwxEraseEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxEraseEvent",SwigwxEraseEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxPaintEvent",SwigwxPaintEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxPaintEvent",SwigwxPaintEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxMoveEvent",SwigwxMoveEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxMoveEvent",SwigwxMoveEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxKeyEvent",SwigwxKeyEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxKeyEvent",SwigwxKeyEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxMouseEvent",SwigwxMouseEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxMouseEvent",SwigwxMouseEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxScrollEvent",SwigwxScrollEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxScrollEvent",SwigwxScrollEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxCommandEvent",SwigwxCommandEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxCommandEvent",SwigwxCommandEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxCloseEvent",SwigwxCloseEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxCloseEvent",SwigwxCloseEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxSizeEvent",SwigwxSizeEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxSizeEvent",SwigwxSizeEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxEvent",0); - SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0); - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0); - SWIG_RegisterMapping("_wxPaintEvent","_class_wxPaintEvent",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_wxDropFilesEvent","_class_wxDropFilesEvent",0); - SWIG_RegisterMapping("_class_wxAcceleratorTable","_wxAcceleratorTable",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_class_wxPaintEvent","_wxPaintEvent",0); - SWIG_RegisterMapping("_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_wxInitDialogEvent","_class_wxInitDialogEvent",0); - SWIG_RegisterMapping("_class_wxKeyEvent","_wxKeyEvent",0); - SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); - SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxEvent","_class_wxSysColourChangedEvent",SwigwxSysColourChangedEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxSysColourChangedEvent",SwigwxSysColourChangedEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxUpdateUIEvent",SwigwxUpdateUIEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxUpdateUIEvent",SwigwxUpdateUIEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxIdleEvent",SwigwxIdleEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxIdleEvent",SwigwxIdleEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxDropFilesEvent",SwigwxDropFilesEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxDropFilesEvent",SwigwxDropFilesEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxJoystickEvent",SwigwxJoystickEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxJoystickEvent",SwigwxJoystickEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxMaximizeEvent",SwigwxMaximizeEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxMaximizeEvent",SwigwxMaximizeEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxIconizeEvent",SwigwxIconizeEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxIconizeEvent",SwigwxIconizeEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxShowEvent",SwigwxShowEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxShowEvent",SwigwxShowEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxMenuEvent",SwigwxMenuEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxMenuEvent",SwigwxMenuEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxInitDialogEvent",SwigwxInitDialogEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxInitDialogEvent",SwigwxInitDialogEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxActivateEvent",SwigwxActivateEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxActivateEvent",SwigwxActivateEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxFocusEvent",SwigwxFocusEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxFocusEvent",SwigwxFocusEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxEraseEvent",SwigwxEraseEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxEraseEvent",SwigwxEraseEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxPaintEvent",SwigwxPaintEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxPaintEvent",SwigwxPaintEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxMoveEvent",SwigwxMoveEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxMoveEvent",SwigwxMoveEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxKeyEvent",SwigwxKeyEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxKeyEvent",SwigwxKeyEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxMouseEvent",SwigwxMouseEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxMouseEvent",SwigwxMouseEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxScrollEvent",SwigwxScrollEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxScrollEvent",SwigwxScrollEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxCommandEvent",SwigwxCommandEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxCommandEvent",SwigwxCommandEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxCloseEvent",SwigwxCloseEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxCloseEvent",SwigwxCloseEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_class_wxSizeEvent",SwigwxSizeEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxSizeEvent",SwigwxSizeEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxEvent",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxCommandEvent","_class_wxScrollEvent",SwigwxScrollEventTowxCommandEvent); - SWIG_RegisterMapping("_wxCommandEvent","_wxScrollEvent",SwigwxScrollEventTowxCommandEvent); - SWIG_RegisterMapping("_wxCommandEvent","_class_wxCommandEvent",0); - SWIG_RegisterMapping("_wxSizeEvent","_class_wxSizeEvent",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0); - SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxDropFilesEvent","_wxDropFilesEvent",0); - SWIG_RegisterMapping("_wxCloseEvent","_class_wxCloseEvent",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_wxFocusEvent","_class_wxFocusEvent",0); - SWIG_RegisterMapping("_wxMaximizeEvent","_class_wxMaximizeEvent",0); - SWIG_RegisterMapping("_wxAcceleratorEntry","_class_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_class_wxMoveEvent","_wxMoveEvent",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxCloseEvent","_wxCloseEvent",0); - SWIG_RegisterMapping("_class_wxMenuEvent","_wxMenuEvent",0); - SWIG_RegisterMapping("_wxMouseEvent","_class_wxMouseEvent",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_class_wxFocusEvent","_wxFocusEvent",0); - SWIG_RegisterMapping("_class_wxMaximizeEvent","_wxMaximizeEvent",0); - SWIG_RegisterMapping("_class_wxAcceleratorEntry","_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_class_wxScrollEvent","_wxScrollEvent",0); - SWIG_RegisterMapping("_wxJoystickEvent","_class_wxJoystickEvent",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_class_wxMouseEvent","_wxMouseEvent",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_class_wxInitDialogEvent","_wxInitDialogEvent",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxIconizeEvent","_class_wxIconizeEvent",0); - SWIG_RegisterMapping("_class_wxIdleEvent","_wxIdleEvent",0); - SWIG_RegisterMapping("_wxEraseEvent","_class_wxEraseEvent",0); - SWIG_RegisterMapping("_class_wxJoystickEvent","_wxJoystickEvent",0); - SWIG_RegisterMapping("_class_wxShowEvent","_wxShowEvent",0); - SWIG_RegisterMapping("_wxActivateEvent","_class_wxActivateEvent",0); - SWIG_RegisterMapping("_class_wxCommandEvent","_class_wxScrollEvent",SwigwxScrollEventTowxCommandEvent); - SWIG_RegisterMapping("_class_wxCommandEvent","_wxScrollEvent",SwigwxScrollEventTowxCommandEvent); - SWIG_RegisterMapping("_class_wxCommandEvent","_wxCommandEvent",0); - SWIG_RegisterMapping("_class_wxSizeEvent","_wxSizeEvent",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); - SWIG_RegisterMapping("_wxKeyEvent","_class_wxKeyEvent",0); - SWIG_RegisterMapping("_wxMoveEvent","_class_wxMoveEvent",0); - SWIG_RegisterMapping("_class_wxEraseEvent","_wxEraseEvent",0); -} diff --git a/utils/wxPython/src/msw/events.py b/utils/wxPython/src/msw/events.py deleted file mode 100644 index 53594aa316..0000000000 --- a/utils/wxPython/src/msw/events.py +++ /dev/null @@ -1,611 +0,0 @@ -# This file was created automatically by SWIG. -import eventsc - -from misc import * -class wxEventPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetEventObject(self): - val = eventsc.wxEvent_GetEventObject(self.this) - return val - def GetEventType(self): - val = eventsc.wxEvent_GetEventType(self.this) - return val - def GetId(self): - val = eventsc.wxEvent_GetId(self.this) - return val - def GetSkipped(self): - val = eventsc.wxEvent_GetSkipped(self.this) - return val - def GetTimestamp(self): - val = eventsc.wxEvent_GetTimestamp(self.this) - return val - def SetEventObject(self,arg0): - val = eventsc.wxEvent_SetEventObject(self.this,arg0) - return val - def SetEventType(self,arg0): - val = eventsc.wxEvent_SetEventType(self.this,arg0) - return val - def SetId(self,arg0): - val = eventsc.wxEvent_SetId(self.this,arg0) - return val - def SetTimestamp(self,arg0): - val = eventsc.wxEvent_SetTimestamp(self.this,arg0) - return val - def Skip(self,*args): - val = apply(eventsc.wxEvent_Skip,(self.this,)+args) - return val - def __repr__(self): - return "" -class wxEvent(wxEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxSizeEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetSize(self): - val = eventsc.wxSizeEvent_GetSize(self.this) - val = wxSizePtr(val) - val.thisown = 1 - return val - def __repr__(self): - return "" -class wxSizeEvent(wxSizeEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxCloseEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetSessionEnding(self): - val = eventsc.wxCloseEvent_GetSessionEnding(self.this) - return val - def GetLoggingOff(self): - val = eventsc.wxCloseEvent_GetLoggingOff(self.this) - return val - def Veto(self,*args): - val = apply(eventsc.wxCloseEvent_Veto,(self.this,)+args) - return val - def GetVeto(self): - val = eventsc.wxCloseEvent_GetVeto(self.this) - return val - def SetForce(self,arg0): - val = eventsc.wxCloseEvent_SetForce(self.this,arg0) - return val - def GetForce(self): - val = eventsc.wxCloseEvent_GetForce(self.this) - return val - def __repr__(self): - return "" -class wxCloseEvent(wxCloseEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxCommandEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Checked(self): - val = eventsc.wxCommandEvent_Checked(self.this) - return val - def GetExtraLong(self): - val = eventsc.wxCommandEvent_GetExtraLong(self.this) - return val - def GetInt(self): - val = eventsc.wxCommandEvent_GetInt(self.this) - return val - def GetSelection(self): - val = eventsc.wxCommandEvent_GetSelection(self.this) - return val - def GetString(self): - val = eventsc.wxCommandEvent_GetString(self.this) - return val - def IsSelection(self): - val = eventsc.wxCommandEvent_IsSelection(self.this) - return val - def __repr__(self): - return "" -class wxCommandEvent(wxCommandEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxScrollEventPtr(wxCommandEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetOrientation(self): - val = eventsc.wxScrollEvent_GetOrientation(self.this) - return val - def GetPosition(self): - val = eventsc.wxScrollEvent_GetPosition(self.this) - return val - def __repr__(self): - return "" -class wxScrollEvent(wxScrollEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxMouseEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def IsButton(self): - val = eventsc.wxMouseEvent_IsButton(self.this) - return val - def ButtonDown(self,*args): - val = apply(eventsc.wxMouseEvent_ButtonDown,(self.this,)+args) - return val - def ButtonDClick(self,*args): - val = apply(eventsc.wxMouseEvent_ButtonDClick,(self.this,)+args) - return val - def ButtonUp(self,*args): - val = apply(eventsc.wxMouseEvent_ButtonUp,(self.this,)+args) - return val - def Button(self,arg0): - val = eventsc.wxMouseEvent_Button(self.this,arg0) - return val - def ButtonIsDown(self,arg0): - val = eventsc.wxMouseEvent_ButtonIsDown(self.this,arg0) - return val - def ControlDown(self): - val = eventsc.wxMouseEvent_ControlDown(self.this) - return val - def MetaDown(self): - val = eventsc.wxMouseEvent_MetaDown(self.this) - return val - def AltDown(self): - val = eventsc.wxMouseEvent_AltDown(self.this) - return val - def ShiftDown(self): - val = eventsc.wxMouseEvent_ShiftDown(self.this) - return val - def LeftDown(self): - val = eventsc.wxMouseEvent_LeftDown(self.this) - return val - def MiddleDown(self): - val = eventsc.wxMouseEvent_MiddleDown(self.this) - return val - def RightDown(self): - val = eventsc.wxMouseEvent_RightDown(self.this) - return val - def LeftUp(self): - val = eventsc.wxMouseEvent_LeftUp(self.this) - return val - def MiddleUp(self): - val = eventsc.wxMouseEvent_MiddleUp(self.this) - return val - def RightUp(self): - val = eventsc.wxMouseEvent_RightUp(self.this) - return val - def LeftDClick(self): - val = eventsc.wxMouseEvent_LeftDClick(self.this) - return val - def MiddleDClick(self): - val = eventsc.wxMouseEvent_MiddleDClick(self.this) - return val - def RightDClick(self): - val = eventsc.wxMouseEvent_RightDClick(self.this) - return val - def LeftIsDown(self): - val = eventsc.wxMouseEvent_LeftIsDown(self.this) - return val - def MiddleIsDown(self): - val = eventsc.wxMouseEvent_MiddleIsDown(self.this) - return val - def RightIsDown(self): - val = eventsc.wxMouseEvent_RightIsDown(self.this) - return val - def Dragging(self): - val = eventsc.wxMouseEvent_Dragging(self.this) - return val - def Moving(self): - val = eventsc.wxMouseEvent_Moving(self.this) - return val - def Entering(self): - val = eventsc.wxMouseEvent_Entering(self.this) - return val - def Leaving(self): - val = eventsc.wxMouseEvent_Leaving(self.this) - return val - def Position(self): - val = eventsc.wxMouseEvent_Position(self.this) - return val - def GetPosition(self): - val = eventsc.wxMouseEvent_GetPosition(self.this) - val = wxPointPtr(val) - val.thisown = 1 - return val - def GetLogicalPosition(self,arg0): - val = eventsc.wxMouseEvent_GetLogicalPosition(self.this,arg0.this) - val = wxPointPtr(val) - val.thisown = 1 - return val - def GetX(self): - val = eventsc.wxMouseEvent_GetX(self.this) - return val - def GetY(self): - val = eventsc.wxMouseEvent_GetY(self.this) - return val - def __repr__(self): - return "" -class wxMouseEvent(wxMouseEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxKeyEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def ControlDown(self): - val = eventsc.wxKeyEvent_ControlDown(self.this) - return val - def MetaDown(self): - val = eventsc.wxKeyEvent_MetaDown(self.this) - return val - def AltDown(self): - val = eventsc.wxKeyEvent_AltDown(self.this) - return val - def ShiftDown(self): - val = eventsc.wxKeyEvent_ShiftDown(self.this) - return val - def KeyCode(self): - val = eventsc.wxKeyEvent_KeyCode(self.this) - return val - def Position(self): - val = eventsc.wxKeyEvent_Position(self.this) - return val - def GetX(self): - val = eventsc.wxKeyEvent_GetX(self.this) - return val - def GetY(self): - val = eventsc.wxKeyEvent_GetY(self.this) - return val - def __repr__(self): - return "" -class wxKeyEvent(wxKeyEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxMoveEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetPosition(self): - val = eventsc.wxMoveEvent_GetPosition(self.this) - val = wxPointPtr(val) - val.thisown = 1 - return val - def __repr__(self): - return "" -class wxMoveEvent(wxMoveEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxPaintEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxPaintEvent(wxPaintEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxEraseEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetDC(self): - val = eventsc.wxEraseEvent_GetDC(self.this) - val = wxDCPtr(val) - return val - def __repr__(self): - return "" -class wxEraseEvent(wxEraseEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxFocusEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxFocusEvent(wxFocusEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxActivateEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetActive(self): - val = eventsc.wxActivateEvent_GetActive(self.this) - return val - def __repr__(self): - return "" -class wxActivateEvent(wxActivateEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxInitDialogEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxInitDialogEvent(wxInitDialogEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxMenuEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetMenuId(self): - val = eventsc.wxMenuEvent_GetMenuId(self.this) - return val - def __repr__(self): - return "" -class wxMenuEvent(wxMenuEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxShowEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def SetShow(self,arg0): - val = eventsc.wxShowEvent_SetShow(self.this,arg0) - return val - def GetShow(self): - val = eventsc.wxShowEvent_GetShow(self.this) - return val - def __repr__(self): - return "" -class wxShowEvent(wxShowEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxIconizeEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxIconizeEvent(wxIconizeEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxMaximizeEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxMaximizeEvent(wxMaximizeEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxJoystickEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetPosition(self): - val = eventsc.wxJoystickEvent_GetPosition(self.this) - val = wxPointPtr(val) - val.thisown = 1 - return val - def GetZPosition(self): - val = eventsc.wxJoystickEvent_GetZPosition(self.this) - return val - def GetButtonState(self): - val = eventsc.wxJoystickEvent_GetButtonState(self.this) - return val - def GetButtonChange(self): - val = eventsc.wxJoystickEvent_GetButtonChange(self.this) - return val - def GetJoystick(self): - val = eventsc.wxJoystickEvent_GetJoystick(self.this) - return val - def SetJoystick(self,arg0): - val = eventsc.wxJoystickEvent_SetJoystick(self.this,arg0) - return val - def SetButtonState(self,arg0): - val = eventsc.wxJoystickEvent_SetButtonState(self.this,arg0) - return val - def SetButtonChange(self,arg0): - val = eventsc.wxJoystickEvent_SetButtonChange(self.this,arg0) - return val - def SetPosition(self,arg0): - val = eventsc.wxJoystickEvent_SetPosition(self.this,arg0.this) - return val - def SetZPosition(self,arg0): - val = eventsc.wxJoystickEvent_SetZPosition(self.this,arg0) - return val - def IsButton(self): - val = eventsc.wxJoystickEvent_IsButton(self.this) - return val - def IsMove(self): - val = eventsc.wxJoystickEvent_IsMove(self.this) - return val - def IsZMove(self): - val = eventsc.wxJoystickEvent_IsZMove(self.this) - return val - def ButtonDown(self,*args): - val = apply(eventsc.wxJoystickEvent_ButtonDown,(self.this,)+args) - return val - def ButtonUp(self,*args): - val = apply(eventsc.wxJoystickEvent_ButtonUp,(self.this,)+args) - return val - def ButtonIsDown(self,*args): - val = apply(eventsc.wxJoystickEvent_ButtonIsDown,(self.this,)+args) - return val - def __repr__(self): - return "" -class wxJoystickEvent(wxJoystickEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxDropFilesEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetPosition(self): - val = eventsc.wxDropFilesEvent_GetPosition(self.this) - val = wxPointPtr(val) - val.thisown = 1 - return val - def GetNumberOfFiles(self): - val = eventsc.wxDropFilesEvent_GetNumberOfFiles(self.this) - return val - def GetFiles(self): - val = eventsc.wxDropFilesEvent_GetFiles(self.this) - return val - def __repr__(self): - return "" -class wxDropFilesEvent(wxDropFilesEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxIdleEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def RequestMore(self,*args): - val = apply(eventsc.wxIdleEvent_RequestMore,(self.this,)+args) - return val - def MoreRequested(self): - val = eventsc.wxIdleEvent_MoreRequested(self.this) - return val - def __repr__(self): - return "" -class wxIdleEvent(wxIdleEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxUpdateUIEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetChecked(self): - val = eventsc.wxUpdateUIEvent_GetChecked(self.this) - return val - def GetEnabled(self): - val = eventsc.wxUpdateUIEvent_GetEnabled(self.this) - return val - def GetText(self): - val = eventsc.wxUpdateUIEvent_GetText(self.this) - return val - def GetSetText(self): - val = eventsc.wxUpdateUIEvent_GetSetText(self.this) - return val - def GetSetChecked(self): - val = eventsc.wxUpdateUIEvent_GetSetChecked(self.this) - return val - def GetSetEnabled(self): - val = eventsc.wxUpdateUIEvent_GetSetEnabled(self.this) - return val - def Check(self,arg0): - val = eventsc.wxUpdateUIEvent_Check(self.this,arg0) - return val - def Enable(self,arg0): - val = eventsc.wxUpdateUIEvent_Enable(self.this,arg0) - return val - def SetText(self,arg0): - val = eventsc.wxUpdateUIEvent_SetText(self.this,arg0) - return val - def __repr__(self): - return "" -class wxUpdateUIEvent(wxUpdateUIEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxSysColourChangedEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxSysColourChangedEvent(wxSysColourChangedEventPtr): - def __init__(self,this): - self.this = this - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - - - -#-------------- VARIABLE WRAPPERS ------------------ - diff --git a/utils/wxPython/src/msw/gdi.cpp b/utils/wxPython/src/msw/gdi.cpp deleted file mode 100644 index 4ede0477e5..0000000000 --- a/utils/wxPython/src/msw/gdi.cpp +++ /dev/null @@ -1,5305 +0,0 @@ -/* - * FILE : msw\gdi.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif - -#define SWIG_init initgdic - -#define SWIG_name "gdic" - -#include "helpers.h" -#include - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; - // Alternate 'constructor' - wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1) { - return new wxBitmap(width, height, depth); - } - - // This one won't own the reference, so Python won't call - // the dtor, this is good for toolbars and such where - // the parent will manage the bitmap. - wxBitmap* wxNoRefBitmap(char* name, long flags) { - return new wxBitmap(name, flags); - } - - wxMask* wxMaskColour(const wxBitmap& bitmap, const wxColour& colour) { - return new wxMask(bitmap, colour); - } - // Alternate 'constructor' - wxCursor* wxStockCursor(int id) { - return new wxCursor(id); - } - // Alternate 'constructor' - wxColour* wxNamedColour(const wxString& colorName) { - return new wxColour(colorName); - } - // Alternate 'constructor' - wxMemoryDC* wxMemoryDCFromDC(wxDC* oldDC) { - return new wxMemoryDC(oldDC); - } -extern wxFont * wxNORMAL_FONT; -extern wxFont * wxSMALL_FONT; -extern wxFont * wxITALIC_FONT; -extern wxFont * wxSWISS_FONT; -extern wxPen * wxRED_PEN; -extern wxPen * wxCYAN_PEN; -extern wxPen * wxGREEN_PEN; -extern wxPen * wxBLACK_PEN; -extern wxPen * wxWHITE_PEN; -extern wxPen * wxTRANSPARENT_PEN; -extern wxPen * wxBLACK_DASHED_PEN; -extern wxPen * wxGREY_PEN; -extern wxPen * wxMEDIUM_GREY_PEN; -extern wxPen * wxLIGHT_GREY_PEN; -extern wxBrush * wxBLUE_BRUSH; -extern wxBrush * wxGREEN_BRUSH; -extern wxBrush * wxWHITE_BRUSH; -extern wxBrush * wxBLACK_BRUSH; -extern wxBrush * wxTRANSPARENT_BRUSH; -extern wxBrush * wxCYAN_BRUSH; -extern wxBrush * wxRED_BRUSH; -extern wxBrush * wxGREY_BRUSH; -extern wxBrush * wxMEDIUM_GREY_BRUSH; -extern wxBrush * wxLIGHT_GREY_BRUSH; -extern wxColour * wxBLACK; -extern wxColour * wxWHITE; -extern wxColour * wxRED; -extern wxColour * wxBLUE; -extern wxColour * wxGREEN; -extern wxColour * wxCYAN; -extern wxColour * wxLIGHT_GREY; -extern wxCursor * wxSTANDARD_CURSOR; -extern wxCursor * wxHOURGLASS_CURSOR; -extern wxCursor * wxCROSS_CURSOR; -extern wxBitmap wxNullBitmap; -extern wxIcon wxNullIcon; -extern wxCursor wxNullCursor; -extern wxPen wxNullPen; -extern wxBrush wxNullBrush; -extern wxPalette wxNullPalette; -extern wxFont wxNullFont; -extern wxColour wxNullColour; -static PyObject *_wrap_wxEmptyBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - int _arg0; - int _arg1; - int _arg2 = -1; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"ii|i:wxEmptyBitmap",&_arg0,&_arg1,&_arg2)) - return NULL; - _result = (wxBitmap *)wxEmptyBitmap(_arg0,_arg1,_arg2); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxNoRefBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - char * _arg0; - long _arg1; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxNoRefBitmap",&_arg0,&_arg1)) - return NULL; - _result = (wxBitmap *)wxNoRefBitmap(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxMaskColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMask * _result; - wxBitmap * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxMaskColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMaskColour. Expected _wxBitmap_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMaskColour. Expected _wxColour_p."); - return NULL; - } - } - _result = (wxMask *)wxMaskColour(*_arg0,*_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMask_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxStockCursor(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxCursor * _result; - int _arg0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"i:wxStockCursor",&_arg0)) - return NULL; - _result = (wxCursor *)wxStockCursor(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxCursor_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxNamedColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxString * _arg0; - PyObject * _obj0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxNamedColour",&_obj0)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - _result = (wxColour *)wxNamedColour(*_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -static PyObject *_wrap_wxMemoryDCFromDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMemoryDC * _result; - wxDC * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMemoryDCFromDC",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryDCFromDC. Expected _wxDC_p."); - return NULL; - } - } - _result = (wxMemoryDC *)wxMemoryDCFromDC(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMemoryDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static int _wrap_wxNORMAL_FONT_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxNORMAL_FONT is read-only."); - return 1; -} - -static PyObject *_wrap_wxNORMAL_FONT_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxNORMAL_FONT,"_wxFont_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxSMALL_FONT_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxSMALL_FONT is read-only."); - return 1; -} - -static PyObject *_wrap_wxSMALL_FONT_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxSMALL_FONT,"_wxFont_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxITALIC_FONT_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxITALIC_FONT is read-only."); - return 1; -} - -static PyObject *_wrap_wxITALIC_FONT_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxITALIC_FONT,"_wxFont_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxSWISS_FONT_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxSWISS_FONT is read-only."); - return 1; -} - -static PyObject *_wrap_wxSWISS_FONT_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxSWISS_FONT,"_wxFont_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxRED_PEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxRED_PEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxRED_PEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxRED_PEN,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxCYAN_PEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxCYAN_PEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxCYAN_PEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxCYAN_PEN,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxGREEN_PEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxGREEN_PEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxGREEN_PEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxGREEN_PEN,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxBLACK_PEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxBLACK_PEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxBLACK_PEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxBLACK_PEN,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxWHITE_PEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxWHITE_PEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxWHITE_PEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxWHITE_PEN,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxTRANSPARENT_PEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxTRANSPARENT_PEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxTRANSPARENT_PEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxTRANSPARENT_PEN,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxBLACK_DASHED_PEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxBLACK_DASHED_PEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxBLACK_DASHED_PEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxBLACK_DASHED_PEN,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxGREY_PEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxGREY_PEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxGREY_PEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxGREY_PEN,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxMEDIUM_GREY_PEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxMEDIUM_GREY_PEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxMEDIUM_GREY_PEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxMEDIUM_GREY_PEN,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxLIGHT_GREY_PEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxLIGHT_GREY_PEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxLIGHT_GREY_PEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxLIGHT_GREY_PEN,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxBLUE_BRUSH_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxBLUE_BRUSH is read-only."); - return 1; -} - -static PyObject *_wrap_wxBLUE_BRUSH_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxBLUE_BRUSH,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxGREEN_BRUSH_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxGREEN_BRUSH is read-only."); - return 1; -} - -static PyObject *_wrap_wxGREEN_BRUSH_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxGREEN_BRUSH,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxWHITE_BRUSH_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxWHITE_BRUSH is read-only."); - return 1; -} - -static PyObject *_wrap_wxWHITE_BRUSH_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxWHITE_BRUSH,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxBLACK_BRUSH_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxBLACK_BRUSH is read-only."); - return 1; -} - -static PyObject *_wrap_wxBLACK_BRUSH_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxBLACK_BRUSH,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxTRANSPARENT_BRUSH_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxTRANSPARENT_BRUSH is read-only."); - return 1; -} - -static PyObject *_wrap_wxTRANSPARENT_BRUSH_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxTRANSPARENT_BRUSH,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxCYAN_BRUSH_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxCYAN_BRUSH is read-only."); - return 1; -} - -static PyObject *_wrap_wxCYAN_BRUSH_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxCYAN_BRUSH,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxRED_BRUSH_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxRED_BRUSH is read-only."); - return 1; -} - -static PyObject *_wrap_wxRED_BRUSH_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxRED_BRUSH,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxGREY_BRUSH_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxGREY_BRUSH is read-only."); - return 1; -} - -static PyObject *_wrap_wxGREY_BRUSH_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxGREY_BRUSH,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxMEDIUM_GREY_BRUSH_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxMEDIUM_GREY_BRUSH is read-only."); - return 1; -} - -static PyObject *_wrap_wxMEDIUM_GREY_BRUSH_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxMEDIUM_GREY_BRUSH,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxLIGHT_GREY_BRUSH_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxLIGHT_GREY_BRUSH is read-only."); - return 1; -} - -static PyObject *_wrap_wxLIGHT_GREY_BRUSH_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxLIGHT_GREY_BRUSH,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxBLACK_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxBLACK is read-only."); - return 1; -} - -static PyObject *_wrap_wxBLACK_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxBLACK,"_wxColour_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxWHITE_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxWHITE is read-only."); - return 1; -} - -static PyObject *_wrap_wxWHITE_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxWHITE,"_wxColour_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxRED_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxRED is read-only."); - return 1; -} - -static PyObject *_wrap_wxRED_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxRED,"_wxColour_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxBLUE_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxBLUE is read-only."); - return 1; -} - -static PyObject *_wrap_wxBLUE_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxBLUE,"_wxColour_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxGREEN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxGREEN is read-only."); - return 1; -} - -static PyObject *_wrap_wxGREEN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxGREEN,"_wxColour_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxCYAN_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxCYAN is read-only."); - return 1; -} - -static PyObject *_wrap_wxCYAN_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxCYAN,"_wxColour_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxLIGHT_GREY_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxLIGHT_GREY is read-only."); - return 1; -} - -static PyObject *_wrap_wxLIGHT_GREY_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxLIGHT_GREY,"_wxColour_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxSTANDARD_CURSOR_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxSTANDARD_CURSOR is read-only."); - return 1; -} - -static PyObject *_wrap_wxSTANDARD_CURSOR_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxSTANDARD_CURSOR,"_wxCursor_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxHOURGLASS_CURSOR_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxHOURGLASS_CURSOR is read-only."); - return 1; -} - -static PyObject *_wrap_wxHOURGLASS_CURSOR_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxHOURGLASS_CURSOR,"_wxCursor_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxCROSS_CURSOR_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxCROSS_CURSOR is read-only."); - return 1; -} - -static PyObject *_wrap_wxCROSS_CURSOR_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp, (char *) wxCROSS_CURSOR,"_wxCursor_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxNullBitmap_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxNullBitmap is read-only."); - return 1; -} - -static PyObject *_wrap_wxNullBitmap_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxNullBitmap,"_wxBitmap_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxNullIcon_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxNullIcon is read-only."); - return 1; -} - -static PyObject *_wrap_wxNullIcon_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxNullIcon,"_wxIcon_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxNullCursor_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxNullCursor is read-only."); - return 1; -} - -static PyObject *_wrap_wxNullCursor_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxNullCursor,"_wxCursor_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxNullPen_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxNullPen is read-only."); - return 1; -} - -static PyObject *_wrap_wxNullPen_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxNullPen,"_wxPen_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxNullBrush_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxNullBrush is read-only."); - return 1; -} - -static PyObject *_wrap_wxNullBrush_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxNullBrush,"_wxBrush_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxNullPalette_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxNullPalette is read-only."); - return 1; -} - -static PyObject *_wrap_wxNullPalette_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxNullPalette,"_wxPalette_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxNullFont_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxNullFont is read-only."); - return 1; -} - -static PyObject *_wrap_wxNullFont_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxNullFont,"_wxFont_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxNullColour_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxNullColour is read-only."); - return 1; -} - -static PyObject *_wrap_wxNullColour_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxNullColour,"_wxColour_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -#define new_wxBitmap(_swigarg0,_swigarg1) (new wxBitmap(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - wxString * _arg0; - long _arg1; - PyObject * _obj0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"Ol:new_wxBitmap",&_obj0,&_arg1)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - _result = (wxBitmap *)new_wxBitmap(*_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -#define delete_wxBitmap(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxBitmap",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxBitmap. Expected _wxBitmap_p."); - return NULL; - } - } - delete_wxBitmap(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxBitmap_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxBitmap_Create(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _arg0; - int _arg1; - int _arg2; - int _arg3 = -1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii|i:wxBitmap_Create",&_argc0,&_arg1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_Create. Expected _wxBitmap_p."); - return NULL; - } - } - wxBitmap_Create(_arg0,_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxBitmap_GetDepth(_swigobj) (_swigobj->GetDepth()) -static PyObject *_wrap_wxBitmap_GetDepth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxBitmap * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBitmap_GetDepth",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_GetDepth. Expected _wxBitmap_p."); - return NULL; - } - } - _result = (int )wxBitmap_GetDepth(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxBitmap_GetHeight(_swigobj) (_swigobj->GetHeight()) -static PyObject *_wrap_wxBitmap_GetHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxBitmap * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBitmap_GetHeight",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_GetHeight. Expected _wxBitmap_p."); - return NULL; - } - } - _result = (int )wxBitmap_GetHeight(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxBitmap_GetPalette(_swigobj) (_swigobj->GetPalette()) -static PyObject *_wrap_wxBitmap_GetPalette(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPalette * _result; - wxBitmap * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBitmap_GetPalette",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_GetPalette. Expected _wxBitmap_p."); - return NULL; - } - } - _result = (wxPalette *)wxBitmap_GetPalette(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPalette_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxBitmap_GetMask(_swigobj) (_swigobj->GetMask()) -static PyObject *_wrap_wxBitmap_GetMask(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMask * _result; - wxBitmap * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBitmap_GetMask",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_GetMask. Expected _wxBitmap_p."); - return NULL; - } - } - _result = (wxMask *)wxBitmap_GetMask(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMask_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxBitmap_GetWidth(_swigobj) (_swigobj->GetWidth()) -static PyObject *_wrap_wxBitmap_GetWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxBitmap * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBitmap_GetWidth",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_GetWidth. Expected _wxBitmap_p."); - return NULL; - } - } - _result = (int )wxBitmap_GetWidth(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxBitmap_LoadFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->LoadFile(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxBitmap_LoadFile(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxBitmap * _arg0; - wxString * _arg1; - long _arg2; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sOl:wxBitmap_LoadFile",&_argc0,&_obj1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_LoadFile. Expected _wxBitmap_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (bool )wxBitmap_LoadFile(_arg0,*_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxBitmap_Ok(_swigobj) (_swigobj->Ok()) -static PyObject *_wrap_wxBitmap_Ok(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxBitmap * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBitmap_Ok",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_Ok. Expected _wxBitmap_p."); - return NULL; - } - } - _result = (bool )wxBitmap_Ok(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxBitmap_SaveFile(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SaveFile(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxBitmap_SaveFile(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxBitmap * _arg0; - wxString * _arg1; - int _arg2; - wxPalette * _arg3 = NULL; - char * _argc0 = 0; - PyObject * _obj1 = 0; - char * _argc3 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sOi|s:wxBitmap_SaveFile",&_argc0,&_obj1,&_arg2,&_argc3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_SaveFile. Expected _wxBitmap_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPalette_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxBitmap_SaveFile. Expected _wxPalette_p."); - return NULL; - } - } - _result = (bool )wxBitmap_SaveFile(_arg0,*_arg1,_arg2,_arg3); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxBitmap_SetDepth(_swigobj,_swigarg0) (_swigobj->SetDepth(_swigarg0)) -static PyObject *_wrap_wxBitmap_SetDepth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxBitmap_SetDepth",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_SetDepth. Expected _wxBitmap_p."); - return NULL; - } - } - wxBitmap_SetDepth(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxBitmap_SetHeight(_swigobj,_swigarg0) (_swigobj->SetHeight(_swigarg0)) -static PyObject *_wrap_wxBitmap_SetHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxBitmap_SetHeight",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_SetHeight. Expected _wxBitmap_p."); - return NULL; - } - } - wxBitmap_SetHeight(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxBitmap_SetMask(_swigobj,_swigarg0) (_swigobj->SetMask(_swigarg0)) -static PyObject *_wrap_wxBitmap_SetMask(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _arg0; - wxMask * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxBitmap_SetMask",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_SetMask. Expected _wxBitmap_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxMask_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmap_SetMask. Expected _wxMask_p."); - return NULL; - } - } - wxBitmap_SetMask(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxBitmap_SetPalette(_swigobj,_swigarg0) (_swigobj->SetPalette(_swigarg0)) -static PyObject *_wrap_wxBitmap_SetPalette(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _arg0; - wxPalette * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxBitmap_SetPalette",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_SetPalette. Expected _wxBitmap_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPalette_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmap_SetPalette. Expected _wxPalette_p."); - return NULL; - } - } - wxBitmap_SetPalette(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxBitmap_SetWidth(_swigobj,_swigarg0) (_swigobj->SetWidth(_swigarg0)) -static PyObject *_wrap_wxBitmap_SetWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxBitmap_SetWidth",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_SetWidth. Expected _wxBitmap_p."); - return NULL; - } - } - wxBitmap_SetWidth(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define new_wxMask(_swigarg0) (new wxMask(_swigarg0)) -static PyObject *_wrap_new_wxMask(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMask * _result; - wxBitmap * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:new_wxMask",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxMask. Expected _wxBitmap_p."); - return NULL; - } - } - _result = (wxMask *)new_wxMask(*_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMask_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxMask(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxMask(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMask * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxMask",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMask_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxMask. Expected _wxMask_p."); - return NULL; - } - } - delete_wxMask(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxIconTowxBitmap(void *ptr) { - wxIcon *src; - wxBitmap *dest; - src = (wxIcon *) ptr; - dest = (wxBitmap *) src; - return (void *) dest; -} - -#define new_wxIcon(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxIcon(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_new_wxIcon(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIcon * _result; - wxString * _arg0; - long _arg1; - int _arg2 = -1; - int _arg3 = -1; - PyObject * _obj0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"Ol|ii:new_wxIcon",&_obj0,&_arg1,&_arg2,&_arg3)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - _result = (wxIcon *)new_wxIcon(*_arg0,_arg1,_arg2,_arg3); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIcon_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -#define delete_wxIcon(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxIcon(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIcon * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxIcon",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxIcon. Expected _wxIcon_p."); - return NULL; - } - } - delete_wxIcon(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIcon_GetDepth(_swigobj) (_swigobj->GetDepth()) -static PyObject *_wrap_wxIcon_GetDepth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxIcon * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxIcon_GetDepth",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_GetDepth. Expected _wxIcon_p."); - return NULL; - } - } - _result = (int )wxIcon_GetDepth(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxIcon_GetHeight(_swigobj) (_swigobj->GetHeight()) -static PyObject *_wrap_wxIcon_GetHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxIcon * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxIcon_GetHeight",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_GetHeight. Expected _wxIcon_p."); - return NULL; - } - } - _result = (int )wxIcon_GetHeight(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxIcon_GetWidth(_swigobj) (_swigobj->GetWidth()) -static PyObject *_wrap_wxIcon_GetWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxIcon * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxIcon_GetWidth",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_GetWidth. Expected _wxIcon_p."); - return NULL; - } - } - _result = (int )wxIcon_GetWidth(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxIcon_LoadFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->LoadFile(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxIcon_LoadFile(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxIcon * _arg0; - wxString * _arg1; - long _arg2; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sOl:wxIcon_LoadFile",&_argc0,&_obj1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_LoadFile. Expected _wxIcon_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (bool )wxIcon_LoadFile(_arg0,*_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxIcon_Ok(_swigobj) (_swigobj->Ok()) -static PyObject *_wrap_wxIcon_Ok(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxIcon * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxIcon_Ok",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_Ok. Expected _wxIcon_p."); - return NULL; - } - } - _result = (bool )wxIcon_Ok(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxIcon_SetDepth(_swigobj,_swigarg0) (_swigobj->SetDepth(_swigarg0)) -static PyObject *_wrap_wxIcon_SetDepth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIcon * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxIcon_SetDepth",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_SetDepth. Expected _wxIcon_p."); - return NULL; - } - } - wxIcon_SetDepth(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIcon_SetHeight(_swigobj,_swigarg0) (_swigobj->SetHeight(_swigarg0)) -static PyObject *_wrap_wxIcon_SetHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIcon * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxIcon_SetHeight",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_SetHeight. Expected _wxIcon_p."); - return NULL; - } - } - wxIcon_SetHeight(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIcon_SetWidth(_swigobj,_swigarg0) (_swigobj->SetWidth(_swigarg0)) -static PyObject *_wrap_wxIcon_SetWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIcon * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxIcon_SetWidth",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_SetWidth. Expected _wxIcon_p."); - return NULL; - } - } - wxIcon_SetWidth(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxCursorTowxBitmap(void *ptr) { - wxCursor *src; - wxBitmap *dest; - src = (wxCursor *) ptr; - dest = (wxBitmap *) src; - return (void *) dest; -} - -#define new_wxCursor(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxCursor(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_new_wxCursor(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxCursor * _result; - wxString * _arg0; - long _arg1; - int _arg2 = 0; - int _arg3 = 0; - PyObject * _obj0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"Ol|ii:new_wxCursor",&_obj0,&_arg1,&_arg2,&_arg3)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - _result = (wxCursor *)new_wxCursor(*_arg0,_arg1,_arg2,_arg3); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxCursor_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -#define delete_wxCursor(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxCursor(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxCursor * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxCursor",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCursor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxCursor. Expected _wxCursor_p."); - return NULL; - } - } - delete_wxCursor(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxCursor_Ok(_swigobj) (_swigobj->Ok()) -static PyObject *_wrap_wxCursor_Ok(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxCursor * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxCursor_Ok",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCursor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCursor_Ok. Expected _wxCursor_p."); - return NULL; - } - } - _result = (bool )wxCursor_Ok(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static wxFont *new_wxFont(int pointSize,int family,int style,int weight,int underline,char *faceName) { - - return wxTheFontList->FindOrCreateFont(pointSize, family, style, weight, - underline, faceName); - } - -static PyObject *_wrap_new_wxFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _result; - int _arg0; - int _arg1; - int _arg2; - int _arg3; - int _arg4 = (0); - char * _arg5 = ""; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"iiii|is:new_wxFont",&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5)) - return NULL; - _result = (wxFont *)new_wxFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxFont_GetFaceName(_swigobj) (_swigobj->GetFaceName()) -static PyObject *_wrap_wxFont_GetFaceName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxFont * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFont_GetFaceName",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetFaceName. Expected _wxFont_p."); - return NULL; - } - } - _result = new wxString (wxFont_GetFaceName(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxFont_GetFamily(_swigobj) (_swigobj->GetFamily()) -static PyObject *_wrap_wxFont_GetFamily(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxFont * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFont_GetFamily",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetFamily. Expected _wxFont_p."); - return NULL; - } - } - _result = (int )wxFont_GetFamily(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFont_GetFontId(_swigobj) (_swigobj->GetFontId()) -static PyObject *_wrap_wxFont_GetFontId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxFont * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFont_GetFontId",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetFontId. Expected _wxFont_p."); - return NULL; - } - } - _result = (int )wxFont_GetFontId(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFont_GetPointSize(_swigobj) (_swigobj->GetPointSize()) -static PyObject *_wrap_wxFont_GetPointSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxFont * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFont_GetPointSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetPointSize. Expected _wxFont_p."); - return NULL; - } - } - _result = (int )wxFont_GetPointSize(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFont_GetStyle(_swigobj) (_swigobj->GetStyle()) -static PyObject *_wrap_wxFont_GetStyle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxFont * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFont_GetStyle",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetStyle. Expected _wxFont_p."); - return NULL; - } - } - _result = (int )wxFont_GetStyle(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFont_GetUnderlined(_swigobj) (_swigobj->GetUnderlined()) -static PyObject *_wrap_wxFont_GetUnderlined(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxFont * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFont_GetUnderlined",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetUnderlined. Expected _wxFont_p."); - return NULL; - } - } - _result = (bool )wxFont_GetUnderlined(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFont_GetWeight(_swigobj) (_swigobj->GetWeight()) -static PyObject *_wrap_wxFont_GetWeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxFont * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFont_GetWeight",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetWeight. Expected _wxFont_p."); - return NULL; - } - } - _result = (int )wxFont_GetWeight(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFont_SetFaceName(_swigobj,_swigarg0) (_swigobj->SetFaceName(_swigarg0)) -static PyObject *_wrap_wxFont_SetFaceName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxFont_SetFaceName",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetFaceName. Expected _wxFont_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxFont_SetFaceName(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxFont_SetFamily(_swigobj,_swigarg0) (_swigobj->SetFamily(_swigarg0)) -static PyObject *_wrap_wxFont_SetFamily(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxFont_SetFamily",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetFamily. Expected _wxFont_p."); - return NULL; - } - } - wxFont_SetFamily(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFont_SetPointSize(_swigobj,_swigarg0) (_swigobj->SetPointSize(_swigarg0)) -static PyObject *_wrap_wxFont_SetPointSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxFont_SetPointSize",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetPointSize. Expected _wxFont_p."); - return NULL; - } - } - wxFont_SetPointSize(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFont_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0)) -static PyObject *_wrap_wxFont_SetStyle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxFont_SetStyle",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetStyle. Expected _wxFont_p."); - return NULL; - } - } - wxFont_SetStyle(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFont_SetUnderlined(_swigobj,_swigarg0) (_swigobj->SetUnderlined(_swigarg0)) -static PyObject *_wrap_wxFont_SetUnderlined(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxFont_SetUnderlined",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetUnderlined. Expected _wxFont_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxFont_SetUnderlined(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFont_SetWeight(_swigobj,_swigarg0) (_swigobj->SetWeight(_swigarg0)) -static PyObject *_wrap_wxFont_SetWeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxFont_SetWeight",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetWeight. Expected _wxFont_p."); - return NULL; - } - } - wxFont_SetWeight(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define new_wxColour(_swigarg0,_swigarg1,_swigarg2) (new wxColour(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_new_wxColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - unsigned char _arg0 = 0; - unsigned char _arg1 = 0; - unsigned char _arg2 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"|bbb:new_wxColour",&_arg0,&_arg1,&_arg2)) - return NULL; - _result = (wxColour *)new_wxColour(_arg0,_arg1,_arg2); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxColour(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxColour. Expected _wxColour_p."); - return NULL; - } - } - delete_wxColour(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxColour_Red(_swigobj) (_swigobj->Red()) -static PyObject *_wrap_wxColour_Red(PyObject *self, PyObject *args) { - PyObject * _resultobj; - unsigned char _result; - wxColour * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxColour_Red",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Red. Expected _wxColour_p."); - return NULL; - } - } - _result = (unsigned char )wxColour_Red(_arg0); - _resultobj = Py_BuildValue("b",_result); - return _resultobj; -} - -#define wxColour_Green(_swigobj) (_swigobj->Green()) -static PyObject *_wrap_wxColour_Green(PyObject *self, PyObject *args) { - PyObject * _resultobj; - unsigned char _result; - wxColour * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxColour_Green",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Green. Expected _wxColour_p."); - return NULL; - } - } - _result = (unsigned char )wxColour_Green(_arg0); - _resultobj = Py_BuildValue("b",_result); - return _resultobj; -} - -#define wxColour_Blue(_swigobj) (_swigobj->Blue()) -static PyObject *_wrap_wxColour_Blue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - unsigned char _result; - wxColour * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxColour_Blue",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Blue. Expected _wxColour_p."); - return NULL; - } - } - _result = (unsigned char )wxColour_Blue(_arg0); - _resultobj = Py_BuildValue("b",_result); - return _resultobj; -} - -#define wxColour_Ok(_swigobj) (_swigobj->Ok()) -static PyObject *_wrap_wxColour_Ok(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxColour * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxColour_Ok",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Ok. Expected _wxColour_p."); - return NULL; - } - } - _result = (bool )wxColour_Ok(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxColour_Set(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Set(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxColour_Set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _arg0; - unsigned char _arg1; - unsigned char _arg2; - unsigned char _arg3; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sbbb:wxColour_Set",&_argc0,&_arg1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Set. Expected _wxColour_p."); - return NULL; - } - } - wxColour_Set(_arg0,_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject * wxColour_Get(wxColour *self) { - PyObject* rv = PyTuple_New(3); - PyTuple_SetItem(rv, 0, PyInt_FromLong(self->Red())); - PyTuple_SetItem(rv, 1, PyInt_FromLong(self->Green())); - PyTuple_SetItem(rv, 2, PyInt_FromLong(self->Blue())); - return rv; - } -static PyObject *_wrap_wxColour_Get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - PyObject * _result; - wxColour * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxColour_Get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Get. Expected _wxColour_p."); - return NULL; - } - } - _result = (PyObject *)wxColour_Get(_arg0); -{ - _resultobj = _result; -} - return _resultobj; -} - -static wxPen *new_wxPen(wxColour *colour,int width,int style) { - return wxThePenList->FindOrCreatePen(*colour, width, style); - } - -static PyObject *_wrap_new_wxPen(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPen * _result; - wxColour * _arg0; - int _arg1 = 1; - int _arg2 = (wxSOLID); - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|ii:new_wxPen",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPen. Expected _wxColour_p."); - return NULL; - } - } - _result = (wxPen *)new_wxPen(_arg0,_arg1,_arg2); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPen_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPen_GetCap(_swigobj) (_swigobj->GetCap()) -static PyObject *_wrap_wxPen_GetCap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPen * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPen_GetCap",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetCap. Expected _wxPen_p."); - return NULL; - } - } - _result = (int )wxPen_GetCap(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPen_GetColour(_swigobj) (_swigobj->GetColour()) -static PyObject *_wrap_wxPen_GetColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxPen * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPen_GetColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetColour. Expected _wxPen_p."); - return NULL; - } - } - wxColour & _result_ref = wxPen_GetColour(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPen_GetDashes(_swigobj,_swigarg0) (_swigobj->GetDashes(_swigarg0)) -static PyObject *_wrap_wxPen_GetDashes(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPen * _arg0; - wxDash ** _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxPen_GetDashes",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetDashes. Expected _wxPen_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxDash_pp")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPen_GetDashes. Expected _wxDash_pp."); - return NULL; - } - } - _result = (int )wxPen_GetDashes(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPen_GetStipple(_swigobj) (_swigobj->GetStipple()) -static PyObject *_wrap_wxPen_GetStipple(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - wxPen * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPen_GetStipple",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetStipple. Expected _wxPen_p."); - return NULL; - } - } - _result = (wxBitmap *)wxPen_GetStipple(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPen_GetJoin(_swigobj) (_swigobj->GetJoin()) -static PyObject *_wrap_wxPen_GetJoin(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPen * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPen_GetJoin",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetJoin. Expected _wxPen_p."); - return NULL; - } - } - _result = (int )wxPen_GetJoin(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPen_GetStyle(_swigobj) (_swigobj->GetStyle()) -static PyObject *_wrap_wxPen_GetStyle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPen * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPen_GetStyle",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetStyle. Expected _wxPen_p."); - return NULL; - } - } - _result = (int )wxPen_GetStyle(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPen_GetWidth(_swigobj) (_swigobj->GetWidth()) -static PyObject *_wrap_wxPen_GetWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPen * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPen_GetWidth",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetWidth. Expected _wxPen_p."); - return NULL; - } - } - _result = (int )wxPen_GetWidth(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPen_Ok(_swigobj) (_swigobj->Ok()) -static PyObject *_wrap_wxPen_Ok(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPen * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPen_Ok",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_Ok. Expected _wxPen_p."); - return NULL; - } - } - _result = (bool )wxPen_Ok(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPen_SetCap(_swigobj,_swigarg0) (_swigobj->SetCap(_swigarg0)) -static PyObject *_wrap_wxPen_SetCap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPen * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPen_SetCap",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetCap. Expected _wxPen_p."); - return NULL; - } - } - wxPen_SetCap(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPen_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0)) -static PyObject *_wrap_wxPen_SetColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPen * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxPen_SetColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetColour. Expected _wxPen_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPen_SetColour. Expected _wxColour_p."); - return NULL; - } - } - wxPen_SetColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPen_SetDashes(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDashes(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxPen_SetDashes(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPen * _arg0; - int _arg1; - wxDash * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxPen_SetDashes",&_argc0,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetDashes. Expected _wxPen_p."); - return NULL; - } - } - if (_obj2) -{ - _arg2 = (unsigned long*)long_LIST_helper(_obj2); - if (_arg2 == NULL) { - return NULL; - } -} -{ - _arg1 = PyList_Size(_obj2); -} - wxPen_SetDashes(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - delete [] _arg2; -} - return _resultobj; -} - -#define wxPen_SetStipple(_swigobj,_swigarg0) (_swigobj->SetStipple(_swigarg0)) -static PyObject *_wrap_wxPen_SetStipple(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPen * _arg0; - wxBitmap * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxPen_SetStipple",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetStipple. Expected _wxPen_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPen_SetStipple. Expected _wxBitmap_p."); - return NULL; - } - } - wxPen_SetStipple(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPen_SetJoin(_swigobj,_swigarg0) (_swigobj->SetJoin(_swigarg0)) -static PyObject *_wrap_wxPen_SetJoin(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPen * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPen_SetJoin",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetJoin. Expected _wxPen_p."); - return NULL; - } - } - wxPen_SetJoin(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPen_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0)) -static PyObject *_wrap_wxPen_SetStyle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPen * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPen_SetStyle",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetStyle. Expected _wxPen_p."); - return NULL; - } - } - wxPen_SetStyle(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPen_SetWidth(_swigobj,_swigarg0) (_swigobj->SetWidth(_swigarg0)) -static PyObject *_wrap_wxPen_SetWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPen * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPen_SetWidth",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetWidth. Expected _wxPen_p."); - return NULL; - } - } - wxPen_SetWidth(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static wxBrush *new_wxBrush(wxColour *colour,int style) { - return wxTheBrushList->FindOrCreateBrush(*colour, style); - } - -static PyObject *_wrap_new_wxBrush(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBrush * _result; - wxColour * _arg0; - int _arg1 = (wxSOLID); - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:new_wxBrush",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBrush. Expected _wxColour_p."); - return NULL; - } - } - _result = (wxBrush *)new_wxBrush(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxBrush_GetColour(_swigobj) (_swigobj->GetColour()) -static PyObject *_wrap_wxBrush_GetColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxBrush * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBrush_GetColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBrush_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrush_GetColour. Expected _wxBrush_p."); - return NULL; - } - } - wxColour & _result_ref = wxBrush_GetColour(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxBrush_GetStipple(_swigobj) (_swigobj->GetStipple()) -static PyObject *_wrap_wxBrush_GetStipple(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - wxBrush * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBrush_GetStipple",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBrush_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrush_GetStipple. Expected _wxBrush_p."); - return NULL; - } - } - _result = (wxBitmap *)wxBrush_GetStipple(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxBrush_GetStyle(_swigobj) (_swigobj->GetStyle()) -static PyObject *_wrap_wxBrush_GetStyle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxBrush * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBrush_GetStyle",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBrush_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrush_GetStyle. Expected _wxBrush_p."); - return NULL; - } - } - _result = (int )wxBrush_GetStyle(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxBrush_Ok(_swigobj) (_swigobj->Ok()) -static PyObject *_wrap_wxBrush_Ok(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxBrush * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxBrush_Ok",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBrush_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrush_Ok. Expected _wxBrush_p."); - return NULL; - } - } - _result = (bool )wxBrush_Ok(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxBrush_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0)) -static PyObject *_wrap_wxBrush_SetColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBrush * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxBrush_SetColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBrush_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrush_SetColour. Expected _wxBrush_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBrush_SetColour. Expected _wxColour_p."); - return NULL; - } - } - wxBrush_SetColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxBrush_SetStipple(_swigobj,_swigarg0) (_swigobj->SetStipple(_swigarg0)) -static PyObject *_wrap_wxBrush_SetStipple(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBrush * _arg0; - wxBitmap * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxBrush_SetStipple",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBrush_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrush_SetStipple. Expected _wxBrush_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBrush_SetStipple. Expected _wxBitmap_p."); - return NULL; - } - } - wxBrush_SetStipple(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxBrush_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0)) -static PyObject *_wrap_wxBrush_SetStyle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBrush * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxBrush_SetStyle",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBrush_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrush_SetStyle. Expected _wxBrush_p."); - return NULL; - } - } - wxBrush_SetStyle(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define delete_wxDC(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxDC",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxDC. Expected _wxDC_p."); - return NULL; - } - } - delete_wxDC(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_BeginDrawing(_swigobj) (_swigobj->BeginDrawing()) -static PyObject *_wrap_wxDC_BeginDrawing(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_BeginDrawing",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_BeginDrawing. Expected _wxDC_p."); - return NULL; - } - } - wxDC_BeginDrawing(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_Blit(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (_swigobj->Blit(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) -static PyObject *_wrap_wxDC_Blit(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - wxDC * _arg5; - long _arg6; - long _arg7; - long _arg8; - char * _argc0 = 0; - char * _argc5 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sllllslll:wxDC_Blit",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_argc5,&_arg6,&_arg7,&_arg8)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_Blit. Expected _wxDC_p."); - return NULL; - } - } - if (_argc5) { - if (SWIG_GetPtr(_argc5,(void **) &_arg5,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of wxDC_Blit. Expected _wxDC_p."); - return NULL; - } - } - _result = (bool )wxDC_Blit(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDC_Clear(_swigobj) (_swigobj->Clear()) -static PyObject *_wrap_wxDC_Clear(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_Clear",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_Clear. Expected _wxDC_p."); - return NULL; - } - } - wxDC_Clear(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_CrossHair(_swigobj,_swigarg0,_swigarg1) (_swigobj->CrossHair(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxDC_CrossHair(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxDC_CrossHair",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_CrossHair. Expected _wxDC_p."); - return NULL; - } - } - wxDC_CrossHair(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_DestroyClippingRegion(_swigobj) (_swigobj->DestroyClippingRegion()) -static PyObject *_wrap_wxDC_DestroyClippingRegion(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_DestroyClippingRegion",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DestroyClippingRegion. Expected _wxDC_p."); - return NULL; - } - } - wxDC_DestroyClippingRegion(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_DeviceToLogicalX(_swigobj,_swigarg0) (_swigobj->DeviceToLogicalX(_swigarg0)) -static PyObject *_wrap_wxDC_DeviceToLogicalX(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxDC_DeviceToLogicalX",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DeviceToLogicalX. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_DeviceToLogicalX(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_DeviceToLogicalXRel(_swigobj,_swigarg0) (_swigobj->DeviceToLogicalXRel(_swigarg0)) -static PyObject *_wrap_wxDC_DeviceToLogicalXRel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxDC_DeviceToLogicalXRel",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DeviceToLogicalXRel. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_DeviceToLogicalXRel(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_DeviceToLogicalY(_swigobj,_swigarg0) (_swigobj->DeviceToLogicalY(_swigarg0)) -static PyObject *_wrap_wxDC_DeviceToLogicalY(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxDC_DeviceToLogicalY",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DeviceToLogicalY. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_DeviceToLogicalY(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_DeviceToLogicalYRel(_swigobj,_swigarg0) (_swigobj->DeviceToLogicalYRel(_swigarg0)) -static PyObject *_wrap_wxDC_DeviceToLogicalYRel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxDC_DeviceToLogicalYRel",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DeviceToLogicalYRel. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_DeviceToLogicalYRel(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_DrawArc(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->DrawArc(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_wxDC_DrawArc(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - long _arg5; - long _arg6; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sllllll:wxDC_DrawArc",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawArc. Expected _wxDC_p."); - return NULL; - } - } - wxDC_DrawArc(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_DrawEllipse(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->DrawEllipse(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxDC_DrawEllipse(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sllll:wxDC_DrawEllipse",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawEllipse. Expected _wxDC_p."); - return NULL; - } - } - wxDC_DrawEllipse(_arg0,_arg1,_arg2,_arg3,_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_DrawEllipticArc(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->DrawEllipticArc(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_wxDC_DrawEllipticArc(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - long _arg5; - long _arg6; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sllllll:wxDC_DrawEllipticArc",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawEllipticArc. Expected _wxDC_p."); - return NULL; - } - } - wxDC_DrawEllipticArc(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_DrawIcon(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->DrawIcon(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxDC_DrawIcon(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxIcon * _arg1; - long _arg2; - long _arg3; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ssll:wxDC_DrawIcon",&_argc0,&_argc1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawIcon. Expected _wxDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_DrawIcon. Expected _wxIcon_p."); - return NULL; - } - } - wxDC_DrawIcon(_arg0,*_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_DrawLine(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->DrawLine(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxDC_DrawLine(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sllll:wxDC_DrawLine",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawLine. Expected _wxDC_p."); - return NULL; - } - } - wxDC_DrawLine(_arg0,_arg1,_arg2,_arg3,_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_DrawLines(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->DrawLines(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxDC_DrawLines(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - int _arg1; - wxPoint * _arg2; - long _arg3 = 0; - long _arg4 = 0; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO|ll:wxDC_DrawLines",&_argc0,&_obj2,&_arg3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawLines. Expected _wxDC_p."); - return NULL; - } - } - if (_obj2) -{ - _arg2 = wxPoint_LIST_helper(_obj2); - if (_arg2 == NULL) { - return NULL; - } -} -{ - _arg1 = PyList_Size(_obj2); -} - wxDC_DrawLines(_arg0,_arg1,_arg2,_arg3,_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - delete [] _arg2; -} - return _resultobj; -} - -#define wxDC_DrawPolygon(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->DrawPolygon(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_wxDC_DrawPolygon(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - int _arg1; - wxPoint * _arg2; - long _arg3 = 0; - long _arg4 = 0; - int _arg5 = (wxODDEVEN_RULE); - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO|lli:wxDC_DrawPolygon",&_argc0,&_obj2,&_arg3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawPolygon. Expected _wxDC_p."); - return NULL; - } - } - if (_obj2) -{ - _arg2 = wxPoint_LIST_helper(_obj2); - if (_arg2 == NULL) { - return NULL; - } -} -{ - _arg1 = PyList_Size(_obj2); -} - wxDC_DrawPolygon(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - delete [] _arg2; -} - return _resultobj; -} - -#define wxDC_DrawPoint(_swigobj,_swigarg0,_swigarg1) (_swigobj->DrawPoint(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxDC_DrawPoint(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxDC_DrawPoint",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawPoint. Expected _wxDC_p."); - return NULL; - } - } - wxDC_DrawPoint(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_DrawRectangle(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->DrawRectangle(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxDC_DrawRectangle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sllll:wxDC_DrawRectangle",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawRectangle. Expected _wxDC_p."); - return NULL; - } - } - wxDC_DrawRectangle(_arg0,_arg1,_arg2,_arg3,_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_DrawRoundedRectangle(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->DrawRoundedRectangle(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_wxDC_DrawRoundedRectangle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - long _arg5 = 20; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sllll|l:wxDC_DrawRoundedRectangle",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawRoundedRectangle. Expected _wxDC_p."); - return NULL; - } - } - wxDC_DrawRoundedRectangle(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_DrawSpline(_swigobj,_swigarg0,_swigarg1) (_swigobj->DrawSpline(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxDC_DrawSpline(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - int _arg1; - wxPoint * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxDC_DrawSpline",&_argc0,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawSpline. Expected _wxDC_p."); - return NULL; - } - } - if (_obj2) -{ - _arg2 = wxPoint_LIST_helper(_obj2); - if (_arg2 == NULL) { - return NULL; - } -} -{ - _arg1 = PyList_Size(_obj2); -} - wxDC_DrawSpline(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - delete [] _arg2; -} - return _resultobj; -} - -#define wxDC_DrawText(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->DrawText(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxDC_DrawText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxString * _arg1; - long _arg2; - long _arg3; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sOll:wxDC_DrawText",&_argc0,&_obj1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawText. Expected _wxDC_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxDC_DrawText(_arg0,*_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxDC_EndDoc(_swigobj) (_swigobj->EndDoc()) -static PyObject *_wrap_wxDC_EndDoc(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_EndDoc",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_EndDoc. Expected _wxDC_p."); - return NULL; - } - } - wxDC_EndDoc(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_EndDrawing(_swigobj) (_swigobj->EndDrawing()) -static PyObject *_wrap_wxDC_EndDrawing(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_EndDrawing",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_EndDrawing. Expected _wxDC_p."); - return NULL; - } - } - wxDC_EndDrawing(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_EndPage(_swigobj) (_swigobj->EndPage()) -static PyObject *_wrap_wxDC_EndPage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_EndPage",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_EndPage. Expected _wxDC_p."); - return NULL; - } - } - wxDC_EndPage(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_GetBackground(_swigobj) (_swigobj->GetBackground()) -static PyObject *_wrap_wxDC_GetBackground(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBrush * _result; - wxDC * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetBackground",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetBackground. Expected _wxDC_p."); - return NULL; - } - } - _result = (wxBrush *)wxDC_GetBackground(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxDC_GetBrush(_swigobj) (_swigobj->GetBrush()) -static PyObject *_wrap_wxDC_GetBrush(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBrush * _result; - wxDC * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetBrush",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetBrush. Expected _wxDC_p."); - return NULL; - } - } - _result = (wxBrush *)wxDC_GetBrush(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxDC_GetCharHeight(_swigobj) (_swigobj->GetCharHeight()) -static PyObject *_wrap_wxDC_GetCharHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetCharHeight",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetCharHeight. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_GetCharHeight(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_GetCharWidth(_swigobj) (_swigobj->GetCharWidth()) -static PyObject *_wrap_wxDC_GetCharWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetCharWidth",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetCharWidth. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_GetCharWidth(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_GetClippingBox(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->GetClippingBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxDC_GetClippingBox(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long * _arg1; - long temp; - long * _arg2; - long temp0; - long * _arg3; - long temp1; - long * _arg4; - long temp2; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} -{ - _arg3 = &temp1; -} -{ - _arg4 = &temp2; -} - if(!PyArg_ParseTuple(args,"s:wxDC_GetClippingBox",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetClippingBox. Expected _wxDC_p."); - return NULL; - } - } - wxDC_GetClippingBox(_arg0,_arg1,_arg2,_arg3,_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg3)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg4)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxDC_GetFont(_swigobj) (_swigobj->GetFont()) -static PyObject *_wrap_wxDC_GetFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _result; - wxDC * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetFont",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetFont. Expected _wxDC_p."); - return NULL; - } - } - _result = (wxFont *)wxDC_GetFont(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxDC_GetLogicalFunction(_swigobj) (_swigobj->GetLogicalFunction()) -static PyObject *_wrap_wxDC_GetLogicalFunction(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetLogicalFunction",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetLogicalFunction. Expected _wxDC_p."); - return NULL; - } - } - _result = (int )wxDC_GetLogicalFunction(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDC_GetMapMode(_swigobj) (_swigobj->GetMapMode()) -static PyObject *_wrap_wxDC_GetMapMode(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetMapMode",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetMapMode. Expected _wxDC_p."); - return NULL; - } - } - _result = (int )wxDC_GetMapMode(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDC_GetOptimization(_swigobj) (_swigobj->GetOptimization()) -static PyObject *_wrap_wxDC_GetOptimization(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetOptimization",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetOptimization. Expected _wxDC_p."); - return NULL; - } - } - _result = (bool )wxDC_GetOptimization(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDC_GetPen(_swigobj) (_swigobj->GetPen()) -static PyObject *_wrap_wxDC_GetPen(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPen * _result; - wxDC * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetPen",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetPen. Expected _wxDC_p."); - return NULL; - } - } - _result = (wxPen *)wxDC_GetPen(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPen_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static wxColour * wxDC_GetPixel(wxDC *self,long x,long y) { - wxColour* wc = new wxColour(); - self->GetPixel(x, y, wc); - return wc; - } -static PyObject *_wrap_wxDC_GetPixel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxDC * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxDC_GetPixel",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetPixel. Expected _wxDC_p."); - return NULL; - } - } - _result = (wxColour *)wxDC_GetPixel(_arg0,_arg1,_arg2); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxDC_GetSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxDC_GetSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxDC_GetSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetSize. Expected _wxDC_p."); - return NULL; - } - } - wxDC_GetSize(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxDC_GetTextBackground(_swigobj) (_swigobj->GetTextBackground()) -static PyObject *_wrap_wxDC_GetTextBackground(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxDC * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetTextBackground",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetTextBackground. Expected _wxDC_p."); - return NULL; - } - } - wxColour & _result_ref = wxDC_GetTextBackground(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxDC_GetTextExtent(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->GetTextExtent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_wxDC_GetTextExtent(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxString * _arg1; - long * _arg2; - long temp; - long * _arg3; - long temp0; - long * _arg4; - long temp1; - long * _arg5; - long temp2; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; -{ - _arg2 = &temp; -} -{ - _arg3 = &temp0; -} -{ - _arg4 = &temp1; -} -{ - _arg5 = &temp2; -} - if(!PyArg_ParseTuple(args,"sO:wxDC_GetTextExtent",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetTextExtent. Expected _wxDC_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxDC_GetTextExtent(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg3)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg4)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg5)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxDC_GetTextForeground(_swigobj) (_swigobj->GetTextForeground()) -static PyObject *_wrap_wxDC_GetTextForeground(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxDC * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_GetTextForeground",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetTextForeground. Expected _wxDC_p."); - return NULL; - } - } - wxColour & _result_ref = wxDC_GetTextForeground(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxDC_LogicalToDeviceX(_swigobj,_swigarg0) (_swigobj->LogicalToDeviceX(_swigarg0)) -static PyObject *_wrap_wxDC_LogicalToDeviceX(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxDC_LogicalToDeviceX",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_LogicalToDeviceX. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_LogicalToDeviceX(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_LogicalToDeviceXRel(_swigobj,_swigarg0) (_swigobj->LogicalToDeviceXRel(_swigarg0)) -static PyObject *_wrap_wxDC_LogicalToDeviceXRel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxDC_LogicalToDeviceXRel",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_LogicalToDeviceXRel. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_LogicalToDeviceXRel(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_LogicalToDeviceY(_swigobj,_swigarg0) (_swigobj->LogicalToDeviceY(_swigarg0)) -static PyObject *_wrap_wxDC_LogicalToDeviceY(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxDC_LogicalToDeviceY",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_LogicalToDeviceY. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_LogicalToDeviceY(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_LogicalToDeviceYRel(_swigobj,_swigarg0) (_swigobj->LogicalToDeviceYRel(_swigarg0)) -static PyObject *_wrap_wxDC_LogicalToDeviceYRel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxDC_LogicalToDeviceYRel",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_LogicalToDeviceYRel. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_LogicalToDeviceYRel(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_MaxX(_swigobj) (_swigobj->MaxX()) -static PyObject *_wrap_wxDC_MaxX(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_MaxX",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_MaxX. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_MaxX(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_MaxY(_swigobj) (_swigobj->MaxY()) -static PyObject *_wrap_wxDC_MaxY(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_MaxY",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_MaxY. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_MaxY(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_MinX(_swigobj) (_swigobj->MinX()) -static PyObject *_wrap_wxDC_MinX(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_MinX",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_MinX. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_MinX(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_MinY(_swigobj) (_swigobj->MinY()) -static PyObject *_wrap_wxDC_MinY(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_MinY",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_MinY. Expected _wxDC_p."); - return NULL; - } - } - _result = (long )wxDC_MinY(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxDC_Ok(_swigobj) (_swigobj->Ok()) -static PyObject *_wrap_wxDC_Ok(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_Ok",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_Ok. Expected _wxDC_p."); - return NULL; - } - } - _result = (bool )wxDC_Ok(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDC_SetDeviceOrigin(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDeviceOrigin(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxDC_SetDeviceOrigin(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxDC_SetDeviceOrigin",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetDeviceOrigin. Expected _wxDC_p."); - return NULL; - } - } - wxDC_SetDeviceOrigin(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetBackground(_swigobj,_swigarg0) (_swigobj->SetBackground(_swigarg0)) -static PyObject *_wrap_wxDC_SetBackground(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxBrush * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxDC_SetBackground",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetBackground. Expected _wxDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBrush_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetBackground. Expected _wxBrush_p."); - return NULL; - } - } - wxDC_SetBackground(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetBackgroundMode(_swigobj,_swigarg0) (_swigobj->SetBackgroundMode(_swigarg0)) -static PyObject *_wrap_wxDC_SetBackgroundMode(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxDC_SetBackgroundMode",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetBackgroundMode. Expected _wxDC_p."); - return NULL; - } - } - wxDC_SetBackgroundMode(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetClippingRegion(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->SetClippingRegion(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxDC_SetClippingRegion(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sllll:wxDC_SetClippingRegion",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetClippingRegion. Expected _wxDC_p."); - return NULL; - } - } - wxDC_SetClippingRegion(_arg0,_arg1,_arg2,_arg3,_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetPalette(_swigobj,_swigarg0) (_swigobj->SetPalette(_swigarg0)) -static PyObject *_wrap_wxDC_SetPalette(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxPalette * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxDC_SetPalette",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetPalette. Expected _wxDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPalette_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetPalette. Expected _wxPalette_p."); - return NULL; - } - } - wxDC_SetPalette(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetBrush(_swigobj,_swigarg0) (_swigobj->SetBrush(_swigarg0)) -static PyObject *_wrap_wxDC_SetBrush(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxBrush * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxDC_SetBrush",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetBrush. Expected _wxDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBrush_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetBrush. Expected _wxBrush_p."); - return NULL; - } - } - wxDC_SetBrush(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetFont(_swigobj,_swigarg0) (_swigobj->SetFont(_swigarg0)) -static PyObject *_wrap_wxDC_SetFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxFont * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxDC_SetFont",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetFont. Expected _wxDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetFont. Expected _wxFont_p."); - return NULL; - } - } - wxDC_SetFont(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetLogicalFunction(_swigobj,_swigarg0) (_swigobj->SetLogicalFunction(_swigarg0)) -static PyObject *_wrap_wxDC_SetLogicalFunction(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxDC_SetLogicalFunction",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetLogicalFunction. Expected _wxDC_p."); - return NULL; - } - } - wxDC_SetLogicalFunction(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetMapMode(_swigobj,_swigarg0) (_swigobj->SetMapMode(_swigarg0)) -static PyObject *_wrap_wxDC_SetMapMode(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxDC_SetMapMode",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetMapMode. Expected _wxDC_p."); - return NULL; - } - } - wxDC_SetMapMode(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetOptimization(_swigobj,_swigarg0) (_swigobj->SetOptimization(_swigarg0)) -static PyObject *_wrap_wxDC_SetOptimization(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxDC_SetOptimization",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetOptimization. Expected _wxDC_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxDC_SetOptimization(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetPen(_swigobj,_swigarg0) (_swigobj->SetPen(_swigarg0)) -static PyObject *_wrap_wxDC_SetPen(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxPen * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxDC_SetPen",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetPen. Expected _wxDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetPen. Expected _wxPen_p."); - return NULL; - } - } - wxDC_SetPen(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetTextBackground(_swigobj,_swigarg0) (_swigobj->SetTextBackground(_swigarg0)) -static PyObject *_wrap_wxDC_SetTextBackground(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxDC_SetTextBackground",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetTextBackground. Expected _wxDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetTextBackground. Expected _wxColour_p."); - return NULL; - } - } - wxDC_SetTextBackground(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetTextForeground(_swigobj,_swigarg0) (_swigobj->SetTextForeground(_swigarg0)) -static PyObject *_wrap_wxDC_SetTextForeground(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxDC_SetTextForeground",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetTextForeground. Expected _wxDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetTextForeground. Expected _wxColour_p."); - return NULL; - } - } - wxDC_SetTextForeground(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_SetUserScale(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetUserScale(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxDC_SetUserScale(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - double _arg1; - double _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sdd:wxDC_SetUserScale",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetUserScale. Expected _wxDC_p."); - return NULL; - } - } - wxDC_SetUserScale(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDC_StartDoc(_swigobj,_swigarg0) (_swigobj->StartDoc(_swigarg0)) -static PyObject *_wrap_wxDC_StartDoc(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxDC * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxDC_StartDoc",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_StartDoc. Expected _wxDC_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (bool )wxDC_StartDoc(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxDC_StartPage(_swigobj) (_swigobj->StartPage()) -static PyObject *_wrap_wxDC_StartPage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDC_StartPage",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_StartPage. Expected _wxDC_p."); - return NULL; - } - } - wxDC_StartPage(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void wxDC_DrawBitmap(wxDC *self,wxBitmap * bitmap,long x,long y,bool swapPalette) { - wxMemoryDC* memDC = new wxMemoryDC; - memDC->SelectObject(bitmap); - if (swapPalette) - self->SetPalette(bitmap->GetPalette()); - self->Blit(x, y, bitmap->GetWidth(), bitmap->GetHeight(), memDC, - 0, 0, self->GetLogicalFunction()); - memDC->SelectObject(wxNullBitmap); - delete memDC; - } -static PyObject *_wrap_wxDC_DrawBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDC * _arg0; - wxBitmap * _arg1; - long _arg2; - long _arg3; - bool _arg4 = (1); - char * _argc0 = 0; - char * _argc1 = 0; - int tempbool4; - - self = self; - if(!PyArg_ParseTuple(args,"ssll|i:wxDC_DrawBitmap",&_argc0,&_argc1,&_arg2,&_arg3,&tempbool4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawBitmap. Expected _wxDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_DrawBitmap. Expected _wxBitmap_p."); - return NULL; - } - } - _arg4 = (bool ) tempbool4; - wxDC_DrawBitmap(_arg0,_arg1,_arg2,_arg3,_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxMemoryDCTowxDC(void *ptr) { - wxMemoryDC *src; - wxDC *dest; - src = (wxMemoryDC *) ptr; - dest = (wxDC *) src; - return (void *) dest; -} - -#define new_wxMemoryDC() (new wxMemoryDC()) -static PyObject *_wrap_new_wxMemoryDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMemoryDC * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxMemoryDC")) - return NULL; - _result = (wxMemoryDC *)new_wxMemoryDC(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMemoryDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMemoryDC_SelectObject(_swigobj,_swigarg0) (_swigobj->SelectObject(_swigarg0)) -static PyObject *_wrap_wxMemoryDC_SelectObject(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMemoryDC * _arg0; - wxBitmap * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxMemoryDC_SelectObject",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMemoryDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryDC_SelectObject. Expected _wxMemoryDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMemoryDC_SelectObject. Expected _wxBitmap_p."); - return NULL; - } - } - wxMemoryDC_SelectObject(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxScreenDCTowxDC(void *ptr) { - wxScreenDC *src; - wxDC *dest; - src = (wxScreenDC *) ptr; - dest = (wxDC *) src; - return (void *) dest; -} - -#define new_wxScreenDC() (new wxScreenDC()) -static PyObject *_wrap_new_wxScreenDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScreenDC * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxScreenDC")) - return NULL; - _result = (wxScreenDC *)new_wxScreenDC(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxScreenDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxScreenDC_StartDrawingOnTop(_swigobj,_swigarg0) (_swigobj->StartDrawingOnTop(_swigarg0)) -static PyObject *_wrap_wxScreenDC_StartDrawingOnTop(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxScreenDC * _arg0; - wxWindow * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxScreenDC_StartDrawingOnTop",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScreenDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScreenDC_StartDrawingOnTop. Expected _wxScreenDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxScreenDC_StartDrawingOnTop. Expected _wxWindow_p."); - return NULL; - } - } - _result = (bool )wxScreenDC_StartDrawingOnTop(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxScreenDC_StartDrawingOnTopRect(_swigobj,_swigarg0) (_swigobj->StartDrawingOnTop(_swigarg0)) -static PyObject *_wrap_wxScreenDC_StartDrawingOnTopRect(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxScreenDC * _arg0; - wxRect * _arg1 = NULL; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|s:wxScreenDC_StartDrawingOnTopRect",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScreenDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScreenDC_StartDrawingOnTopRect. Expected _wxScreenDC_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxScreenDC_StartDrawingOnTopRect. Expected _wxRect_p."); - return NULL; - } - } - _result = (bool )wxScreenDC_StartDrawingOnTopRect(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxScreenDC_EndDrawingOnTop(_swigobj) (_swigobj->EndDrawingOnTop()) -static PyObject *_wrap_wxScreenDC_EndDrawingOnTop(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxScreenDC * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxScreenDC_EndDrawingOnTop",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScreenDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScreenDC_EndDrawingOnTop. Expected _wxScreenDC_p."); - return NULL; - } - } - _result = (bool )wxScreenDC_EndDrawingOnTop(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxClientDCTowxDC(void *ptr) { - wxClientDC *src; - wxDC *dest; - src = (wxClientDC *) ptr; - dest = (wxDC *) src; - return (void *) dest; -} - -#define new_wxClientDC(_swigarg0) (new wxClientDC(_swigarg0)) -static PyObject *_wrap_new_wxClientDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxClientDC * _result; - wxWindow * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:new_wxClientDC",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxClientDC. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxClientDC *)new_wxClientDC(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxClientDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static void *SwigwxPaintDCTowxDC(void *ptr) { - wxPaintDC *src; - wxDC *dest; - src = (wxPaintDC *) ptr; - dest = (wxDC *) src; - return (void *) dest; -} - -#define new_wxPaintDC(_swigarg0) (new wxPaintDC(_swigarg0)) -static PyObject *_wrap_new_wxPaintDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPaintDC * _result; - wxWindow * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:new_wxPaintDC",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPaintDC. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxPaintDC *)new_wxPaintDC(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPaintDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static void *SwigwxPostScriptDCTowxDC(void *ptr) { - wxPostScriptDC *src; - wxDC *dest; - src = (wxPostScriptDC *) ptr; - dest = (wxDC *) src; - return (void *) dest; -} - -#define new_wxPostScriptDC(_swigarg0,_swigarg1,_swigarg2) (new wxPostScriptDC(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_new_wxPostScriptDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPostScriptDC * _result; - wxString * _arg0; - bool _arg1 = (1); - wxWindow * _arg2 = NULL; - PyObject * _obj0 = 0; - int tempbool1; - char * _argc2 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"O|is:new_wxPostScriptDC",&_obj0,&tempbool1,&_argc2)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - _arg1 = (bool ) tempbool1; - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxPostScriptDC. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxPostScriptDC *)new_wxPostScriptDC(*_arg0,_arg1,_arg2); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPostScriptDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -static void *SwigwxPrinterDCTowxDC(void *ptr) { - wxPrinterDC *src; - wxDC *dest; - src = (wxPrinterDC *) ptr; - dest = (wxDC *) src; - return (void *) dest; -} - -#define new_wxPrinterDC(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxPrinterDC(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_new_wxPrinterDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPrinterDC * _result; - wxString * _arg0; - wxString * _arg1; - wxString * _arg2; - bool _arg3 = (1); - int _arg4 = (wxPORTRAIT); - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj2 = 0; - int tempbool3; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"OOO|ii:new_wxPrinterDC",&_obj0,&_obj1,&_obj2,&tempbool3,&_arg4)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - _arg3 = (bool ) tempbool3; - _result = (wxPrinterDC *)new_wxPrinterDC(*_arg0,*_arg1,*_arg2,_arg3,_arg4); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPrinterDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -static void *SwigwxMetaFileDCTowxDC(void *ptr) { - wxMetaFileDC *src; - wxDC *dest; - src = (wxMetaFileDC *) ptr; - dest = (wxDC *) src; - return (void *) dest; -} - -#define new_wxMetaFileDC(_swigarg0) (new wxMetaFileDC(_swigarg0)) -static PyObject *_wrap_new_wxMetaFileDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMetaFileDC * _result; - wxString * _arg0 = &wxPyEmptyStr; - PyObject * _obj0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"|O:new_wxMetaFileDC",&_obj0)) - return NULL; - if (_obj0) -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - _result = (wxMetaFileDC *)new_wxMetaFileDC(*_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMetaFileDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -#define wxMetaFileDC_Close(_swigobj) (_swigobj->Close()) -static PyObject *_wrap_wxMetaFileDC_Close(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMetaFile * _result; - wxMetaFileDC * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMetaFileDC_Close",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMetaFileDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetaFileDC_Close. Expected _wxMetaFileDC_p."); - return NULL; - } - } - _result = (wxMetaFile *)wxMetaFileDC_Close(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMetaFile_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyMethodDef gdicMethods[] = { - { "wxMetaFileDC_Close", _wrap_wxMetaFileDC_Close, 1 }, - { "new_wxMetaFileDC", _wrap_new_wxMetaFileDC, 1 }, - { "new_wxPrinterDC", _wrap_new_wxPrinterDC, 1 }, - { "new_wxPostScriptDC", _wrap_new_wxPostScriptDC, 1 }, - { "new_wxPaintDC", _wrap_new_wxPaintDC, 1 }, - { "new_wxClientDC", _wrap_new_wxClientDC, 1 }, - { "wxScreenDC_EndDrawingOnTop", _wrap_wxScreenDC_EndDrawingOnTop, 1 }, - { "wxScreenDC_StartDrawingOnTopRect", _wrap_wxScreenDC_StartDrawingOnTopRect, 1 }, - { "wxScreenDC_StartDrawingOnTop", _wrap_wxScreenDC_StartDrawingOnTop, 1 }, - { "new_wxScreenDC", _wrap_new_wxScreenDC, 1 }, - { "wxMemoryDC_SelectObject", _wrap_wxMemoryDC_SelectObject, 1 }, - { "new_wxMemoryDC", _wrap_new_wxMemoryDC, 1 }, - { "wxDC_DrawBitmap", _wrap_wxDC_DrawBitmap, 1 }, - { "wxDC_StartPage", _wrap_wxDC_StartPage, 1 }, - { "wxDC_StartDoc", _wrap_wxDC_StartDoc, 1 }, - { "wxDC_SetUserScale", _wrap_wxDC_SetUserScale, 1 }, - { "wxDC_SetTextForeground", _wrap_wxDC_SetTextForeground, 1 }, - { "wxDC_SetTextBackground", _wrap_wxDC_SetTextBackground, 1 }, - { "wxDC_SetPen", _wrap_wxDC_SetPen, 1 }, - { "wxDC_SetOptimization", _wrap_wxDC_SetOptimization, 1 }, - { "wxDC_SetMapMode", _wrap_wxDC_SetMapMode, 1 }, - { "wxDC_SetLogicalFunction", _wrap_wxDC_SetLogicalFunction, 1 }, - { "wxDC_SetFont", _wrap_wxDC_SetFont, 1 }, - { "wxDC_SetBrush", _wrap_wxDC_SetBrush, 1 }, - { "wxDC_SetPalette", _wrap_wxDC_SetPalette, 1 }, - { "wxDC_SetClippingRegion", _wrap_wxDC_SetClippingRegion, 1 }, - { "wxDC_SetBackgroundMode", _wrap_wxDC_SetBackgroundMode, 1 }, - { "wxDC_SetBackground", _wrap_wxDC_SetBackground, 1 }, - { "wxDC_SetDeviceOrigin", _wrap_wxDC_SetDeviceOrigin, 1 }, - { "wxDC_Ok", _wrap_wxDC_Ok, 1 }, - { "wxDC_MinY", _wrap_wxDC_MinY, 1 }, - { "wxDC_MinX", _wrap_wxDC_MinX, 1 }, - { "wxDC_MaxY", _wrap_wxDC_MaxY, 1 }, - { "wxDC_MaxX", _wrap_wxDC_MaxX, 1 }, - { "wxDC_LogicalToDeviceYRel", _wrap_wxDC_LogicalToDeviceYRel, 1 }, - { "wxDC_LogicalToDeviceY", _wrap_wxDC_LogicalToDeviceY, 1 }, - { "wxDC_LogicalToDeviceXRel", _wrap_wxDC_LogicalToDeviceXRel, 1 }, - { "wxDC_LogicalToDeviceX", _wrap_wxDC_LogicalToDeviceX, 1 }, - { "wxDC_GetTextForeground", _wrap_wxDC_GetTextForeground, 1 }, - { "wxDC_GetTextExtent", _wrap_wxDC_GetTextExtent, 1 }, - { "wxDC_GetTextBackground", _wrap_wxDC_GetTextBackground, 1 }, - { "wxDC_GetSize", _wrap_wxDC_GetSize, 1 }, - { "wxDC_GetPixel", _wrap_wxDC_GetPixel, 1 }, - { "wxDC_GetPen", _wrap_wxDC_GetPen, 1 }, - { "wxDC_GetOptimization", _wrap_wxDC_GetOptimization, 1 }, - { "wxDC_GetMapMode", _wrap_wxDC_GetMapMode, 1 }, - { "wxDC_GetLogicalFunction", _wrap_wxDC_GetLogicalFunction, 1 }, - { "wxDC_GetFont", _wrap_wxDC_GetFont, 1 }, - { "wxDC_GetClippingBox", _wrap_wxDC_GetClippingBox, 1 }, - { "wxDC_GetCharWidth", _wrap_wxDC_GetCharWidth, 1 }, - { "wxDC_GetCharHeight", _wrap_wxDC_GetCharHeight, 1 }, - { "wxDC_GetBrush", _wrap_wxDC_GetBrush, 1 }, - { "wxDC_GetBackground", _wrap_wxDC_GetBackground, 1 }, - { "wxDC_EndPage", _wrap_wxDC_EndPage, 1 }, - { "wxDC_EndDrawing", _wrap_wxDC_EndDrawing, 1 }, - { "wxDC_EndDoc", _wrap_wxDC_EndDoc, 1 }, - { "wxDC_DrawText", _wrap_wxDC_DrawText, 1 }, - { "wxDC_DrawSpline", _wrap_wxDC_DrawSpline, 1 }, - { "wxDC_DrawRoundedRectangle", _wrap_wxDC_DrawRoundedRectangle, 1 }, - { "wxDC_DrawRectangle", _wrap_wxDC_DrawRectangle, 1 }, - { "wxDC_DrawPoint", _wrap_wxDC_DrawPoint, 1 }, - { "wxDC_DrawPolygon", _wrap_wxDC_DrawPolygon, 1 }, - { "wxDC_DrawLines", _wrap_wxDC_DrawLines, 1 }, - { "wxDC_DrawLine", _wrap_wxDC_DrawLine, 1 }, - { "wxDC_DrawIcon", _wrap_wxDC_DrawIcon, 1 }, - { "wxDC_DrawEllipticArc", _wrap_wxDC_DrawEllipticArc, 1 }, - { "wxDC_DrawEllipse", _wrap_wxDC_DrawEllipse, 1 }, - { "wxDC_DrawArc", _wrap_wxDC_DrawArc, 1 }, - { "wxDC_DeviceToLogicalYRel", _wrap_wxDC_DeviceToLogicalYRel, 1 }, - { "wxDC_DeviceToLogicalY", _wrap_wxDC_DeviceToLogicalY, 1 }, - { "wxDC_DeviceToLogicalXRel", _wrap_wxDC_DeviceToLogicalXRel, 1 }, - { "wxDC_DeviceToLogicalX", _wrap_wxDC_DeviceToLogicalX, 1 }, - { "wxDC_DestroyClippingRegion", _wrap_wxDC_DestroyClippingRegion, 1 }, - { "wxDC_CrossHair", _wrap_wxDC_CrossHair, 1 }, - { "wxDC_Clear", _wrap_wxDC_Clear, 1 }, - { "wxDC_Blit", _wrap_wxDC_Blit, 1 }, - { "wxDC_BeginDrawing", _wrap_wxDC_BeginDrawing, 1 }, - { "delete_wxDC", _wrap_delete_wxDC, 1 }, - { "wxBrush_SetStyle", _wrap_wxBrush_SetStyle, 1 }, - { "wxBrush_SetStipple", _wrap_wxBrush_SetStipple, 1 }, - { "wxBrush_SetColour", _wrap_wxBrush_SetColour, 1 }, - { "wxBrush_Ok", _wrap_wxBrush_Ok, 1 }, - { "wxBrush_GetStyle", _wrap_wxBrush_GetStyle, 1 }, - { "wxBrush_GetStipple", _wrap_wxBrush_GetStipple, 1 }, - { "wxBrush_GetColour", _wrap_wxBrush_GetColour, 1 }, - { "new_wxBrush", _wrap_new_wxBrush, 1 }, - { "wxPen_SetWidth", _wrap_wxPen_SetWidth, 1 }, - { "wxPen_SetStyle", _wrap_wxPen_SetStyle, 1 }, - { "wxPen_SetJoin", _wrap_wxPen_SetJoin, 1 }, - { "wxPen_SetStipple", _wrap_wxPen_SetStipple, 1 }, - { "wxPen_SetDashes", _wrap_wxPen_SetDashes, 1 }, - { "wxPen_SetColour", _wrap_wxPen_SetColour, 1 }, - { "wxPen_SetCap", _wrap_wxPen_SetCap, 1 }, - { "wxPen_Ok", _wrap_wxPen_Ok, 1 }, - { "wxPen_GetWidth", _wrap_wxPen_GetWidth, 1 }, - { "wxPen_GetStyle", _wrap_wxPen_GetStyle, 1 }, - { "wxPen_GetJoin", _wrap_wxPen_GetJoin, 1 }, - { "wxPen_GetStipple", _wrap_wxPen_GetStipple, 1 }, - { "wxPen_GetDashes", _wrap_wxPen_GetDashes, 1 }, - { "wxPen_GetColour", _wrap_wxPen_GetColour, 1 }, - { "wxPen_GetCap", _wrap_wxPen_GetCap, 1 }, - { "new_wxPen", _wrap_new_wxPen, 1 }, - { "wxColour_Get", _wrap_wxColour_Get, 1 }, - { "wxColour_Set", _wrap_wxColour_Set, 1 }, - { "wxColour_Ok", _wrap_wxColour_Ok, 1 }, - { "wxColour_Blue", _wrap_wxColour_Blue, 1 }, - { "wxColour_Green", _wrap_wxColour_Green, 1 }, - { "wxColour_Red", _wrap_wxColour_Red, 1 }, - { "delete_wxColour", _wrap_delete_wxColour, 1 }, - { "new_wxColour", _wrap_new_wxColour, 1 }, - { "wxFont_SetWeight", _wrap_wxFont_SetWeight, 1 }, - { "wxFont_SetUnderlined", _wrap_wxFont_SetUnderlined, 1 }, - { "wxFont_SetStyle", _wrap_wxFont_SetStyle, 1 }, - { "wxFont_SetPointSize", _wrap_wxFont_SetPointSize, 1 }, - { "wxFont_SetFamily", _wrap_wxFont_SetFamily, 1 }, - { "wxFont_SetFaceName", _wrap_wxFont_SetFaceName, 1 }, - { "wxFont_GetWeight", _wrap_wxFont_GetWeight, 1 }, - { "wxFont_GetUnderlined", _wrap_wxFont_GetUnderlined, 1 }, - { "wxFont_GetStyle", _wrap_wxFont_GetStyle, 1 }, - { "wxFont_GetPointSize", _wrap_wxFont_GetPointSize, 1 }, - { "wxFont_GetFontId", _wrap_wxFont_GetFontId, 1 }, - { "wxFont_GetFamily", _wrap_wxFont_GetFamily, 1 }, - { "wxFont_GetFaceName", _wrap_wxFont_GetFaceName, 1 }, - { "new_wxFont", _wrap_new_wxFont, 1 }, - { "wxCursor_Ok", _wrap_wxCursor_Ok, 1 }, - { "delete_wxCursor", _wrap_delete_wxCursor, 1 }, - { "new_wxCursor", _wrap_new_wxCursor, 1 }, - { "wxIcon_SetWidth", _wrap_wxIcon_SetWidth, 1 }, - { "wxIcon_SetHeight", _wrap_wxIcon_SetHeight, 1 }, - { "wxIcon_SetDepth", _wrap_wxIcon_SetDepth, 1 }, - { "wxIcon_Ok", _wrap_wxIcon_Ok, 1 }, - { "wxIcon_LoadFile", _wrap_wxIcon_LoadFile, 1 }, - { "wxIcon_GetWidth", _wrap_wxIcon_GetWidth, 1 }, - { "wxIcon_GetHeight", _wrap_wxIcon_GetHeight, 1 }, - { "wxIcon_GetDepth", _wrap_wxIcon_GetDepth, 1 }, - { "delete_wxIcon", _wrap_delete_wxIcon, 1 }, - { "new_wxIcon", _wrap_new_wxIcon, 1 }, - { "delete_wxMask", _wrap_delete_wxMask, 1 }, - { "new_wxMask", _wrap_new_wxMask, 1 }, - { "wxBitmap_SetWidth", _wrap_wxBitmap_SetWidth, 1 }, - { "wxBitmap_SetPalette", _wrap_wxBitmap_SetPalette, 1 }, - { "wxBitmap_SetMask", _wrap_wxBitmap_SetMask, 1 }, - { "wxBitmap_SetHeight", _wrap_wxBitmap_SetHeight, 1 }, - { "wxBitmap_SetDepth", _wrap_wxBitmap_SetDepth, 1 }, - { "wxBitmap_SaveFile", _wrap_wxBitmap_SaveFile, 1 }, - { "wxBitmap_Ok", _wrap_wxBitmap_Ok, 1 }, - { "wxBitmap_LoadFile", _wrap_wxBitmap_LoadFile, 1 }, - { "wxBitmap_GetWidth", _wrap_wxBitmap_GetWidth, 1 }, - { "wxBitmap_GetMask", _wrap_wxBitmap_GetMask, 1 }, - { "wxBitmap_GetPalette", _wrap_wxBitmap_GetPalette, 1 }, - { "wxBitmap_GetHeight", _wrap_wxBitmap_GetHeight, 1 }, - { "wxBitmap_GetDepth", _wrap_wxBitmap_GetDepth, 1 }, - { "wxBitmap_Create", _wrap_wxBitmap_Create, 1 }, - { "delete_wxBitmap", _wrap_delete_wxBitmap, 1 }, - { "new_wxBitmap", _wrap_new_wxBitmap, 1 }, - { "wxMemoryDCFromDC", _wrap_wxMemoryDCFromDC, 1 }, - { "wxNamedColour", _wrap_wxNamedColour, 1 }, - { "wxStockCursor", _wrap_wxStockCursor, 1 }, - { "wxMaskColour", _wrap_wxMaskColour, 1 }, - { "wxNoRefBitmap", _wrap_wxNoRefBitmap, 1 }, - { "wxEmptyBitmap", _wrap_wxEmptyBitmap, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initgdic)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("gdic", gdicMethods); - d = PyModule_GetDict(m); - PyDict_SetItemString(d,"cvar", SWIG_globals); - SWIG_addvarlink(SWIG_globals,"wxNORMAL_FONT",_wrap_wxNORMAL_FONT_get, _wrap_wxNORMAL_FONT_set); - SWIG_addvarlink(SWIG_globals,"wxSMALL_FONT",_wrap_wxSMALL_FONT_get, _wrap_wxSMALL_FONT_set); - SWIG_addvarlink(SWIG_globals,"wxITALIC_FONT",_wrap_wxITALIC_FONT_get, _wrap_wxITALIC_FONT_set); - SWIG_addvarlink(SWIG_globals,"wxSWISS_FONT",_wrap_wxSWISS_FONT_get, _wrap_wxSWISS_FONT_set); - SWIG_addvarlink(SWIG_globals,"wxRED_PEN",_wrap_wxRED_PEN_get, _wrap_wxRED_PEN_set); - SWIG_addvarlink(SWIG_globals,"wxCYAN_PEN",_wrap_wxCYAN_PEN_get, _wrap_wxCYAN_PEN_set); - SWIG_addvarlink(SWIG_globals,"wxGREEN_PEN",_wrap_wxGREEN_PEN_get, _wrap_wxGREEN_PEN_set); - SWIG_addvarlink(SWIG_globals,"wxBLACK_PEN",_wrap_wxBLACK_PEN_get, _wrap_wxBLACK_PEN_set); - SWIG_addvarlink(SWIG_globals,"wxWHITE_PEN",_wrap_wxWHITE_PEN_get, _wrap_wxWHITE_PEN_set); - SWIG_addvarlink(SWIG_globals,"wxTRANSPARENT_PEN",_wrap_wxTRANSPARENT_PEN_get, _wrap_wxTRANSPARENT_PEN_set); - SWIG_addvarlink(SWIG_globals,"wxBLACK_DASHED_PEN",_wrap_wxBLACK_DASHED_PEN_get, _wrap_wxBLACK_DASHED_PEN_set); - SWIG_addvarlink(SWIG_globals,"wxGREY_PEN",_wrap_wxGREY_PEN_get, _wrap_wxGREY_PEN_set); - SWIG_addvarlink(SWIG_globals,"wxMEDIUM_GREY_PEN",_wrap_wxMEDIUM_GREY_PEN_get, _wrap_wxMEDIUM_GREY_PEN_set); - SWIG_addvarlink(SWIG_globals,"wxLIGHT_GREY_PEN",_wrap_wxLIGHT_GREY_PEN_get, _wrap_wxLIGHT_GREY_PEN_set); - SWIG_addvarlink(SWIG_globals,"wxBLUE_BRUSH",_wrap_wxBLUE_BRUSH_get, _wrap_wxBLUE_BRUSH_set); - SWIG_addvarlink(SWIG_globals,"wxGREEN_BRUSH",_wrap_wxGREEN_BRUSH_get, _wrap_wxGREEN_BRUSH_set); - SWIG_addvarlink(SWIG_globals,"wxWHITE_BRUSH",_wrap_wxWHITE_BRUSH_get, _wrap_wxWHITE_BRUSH_set); - SWIG_addvarlink(SWIG_globals,"wxBLACK_BRUSH",_wrap_wxBLACK_BRUSH_get, _wrap_wxBLACK_BRUSH_set); - SWIG_addvarlink(SWIG_globals,"wxTRANSPARENT_BRUSH",_wrap_wxTRANSPARENT_BRUSH_get, _wrap_wxTRANSPARENT_BRUSH_set); - SWIG_addvarlink(SWIG_globals,"wxCYAN_BRUSH",_wrap_wxCYAN_BRUSH_get, _wrap_wxCYAN_BRUSH_set); - SWIG_addvarlink(SWIG_globals,"wxRED_BRUSH",_wrap_wxRED_BRUSH_get, _wrap_wxRED_BRUSH_set); - SWIG_addvarlink(SWIG_globals,"wxGREY_BRUSH",_wrap_wxGREY_BRUSH_get, _wrap_wxGREY_BRUSH_set); - SWIG_addvarlink(SWIG_globals,"wxMEDIUM_GREY_BRUSH",_wrap_wxMEDIUM_GREY_BRUSH_get, _wrap_wxMEDIUM_GREY_BRUSH_set); - SWIG_addvarlink(SWIG_globals,"wxLIGHT_GREY_BRUSH",_wrap_wxLIGHT_GREY_BRUSH_get, _wrap_wxLIGHT_GREY_BRUSH_set); - SWIG_addvarlink(SWIG_globals,"wxBLACK",_wrap_wxBLACK_get, _wrap_wxBLACK_set); - SWIG_addvarlink(SWIG_globals,"wxWHITE",_wrap_wxWHITE_get, _wrap_wxWHITE_set); - SWIG_addvarlink(SWIG_globals,"wxRED",_wrap_wxRED_get, _wrap_wxRED_set); - SWIG_addvarlink(SWIG_globals,"wxBLUE",_wrap_wxBLUE_get, _wrap_wxBLUE_set); - SWIG_addvarlink(SWIG_globals,"wxGREEN",_wrap_wxGREEN_get, _wrap_wxGREEN_set); - SWIG_addvarlink(SWIG_globals,"wxCYAN",_wrap_wxCYAN_get, _wrap_wxCYAN_set); - SWIG_addvarlink(SWIG_globals,"wxLIGHT_GREY",_wrap_wxLIGHT_GREY_get, _wrap_wxLIGHT_GREY_set); - SWIG_addvarlink(SWIG_globals,"wxSTANDARD_CURSOR",_wrap_wxSTANDARD_CURSOR_get, _wrap_wxSTANDARD_CURSOR_set); - SWIG_addvarlink(SWIG_globals,"wxHOURGLASS_CURSOR",_wrap_wxHOURGLASS_CURSOR_get, _wrap_wxHOURGLASS_CURSOR_set); - SWIG_addvarlink(SWIG_globals,"wxCROSS_CURSOR",_wrap_wxCROSS_CURSOR_get, _wrap_wxCROSS_CURSOR_set); - SWIG_addvarlink(SWIG_globals,"wxNullBitmap",_wrap_wxNullBitmap_get, _wrap_wxNullBitmap_set); - SWIG_addvarlink(SWIG_globals,"wxNullIcon",_wrap_wxNullIcon_get, _wrap_wxNullIcon_set); - SWIG_addvarlink(SWIG_globals,"wxNullCursor",_wrap_wxNullCursor_get, _wrap_wxNullCursor_set); - SWIG_addvarlink(SWIG_globals,"wxNullPen",_wrap_wxNullPen_get, _wrap_wxNullPen_set); - SWIG_addvarlink(SWIG_globals,"wxNullBrush",_wrap_wxNullBrush_get, _wrap_wxNullBrush_set); - SWIG_addvarlink(SWIG_globals,"wxNullPalette",_wrap_wxNullPalette_get, _wrap_wxNullPalette_set); - SWIG_addvarlink(SWIG_globals,"wxNullFont",_wrap_wxNullFont_get, _wrap_wxNullFont_set); - SWIG_addvarlink(SWIG_globals,"wxNullColour",_wrap_wxNullColour_get, _wrap_wxNullColour_set); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_wxAcceleratorTable","_class_wxAcceleratorTable",0); - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); - SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPen","_class_wxPen",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_long","_wxDash",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_class_wxAcceleratorTable","_wxAcceleratorTable",0); - SWIG_RegisterMapping("_wxDC","_class_wxMetaFileDC",SwigwxMetaFileDCTowxDC); - SWIG_RegisterMapping("_wxDC","_wxMetaFileDC",SwigwxMetaFileDCTowxDC); - SWIG_RegisterMapping("_wxDC","_class_wxPrinterDC",SwigwxPrinterDCTowxDC); - SWIG_RegisterMapping("_wxDC","_wxPrinterDC",SwigwxPrinterDCTowxDC); - SWIG_RegisterMapping("_wxDC","_class_wxPostScriptDC",SwigwxPostScriptDCTowxDC); - SWIG_RegisterMapping("_wxDC","_wxPostScriptDC",SwigwxPostScriptDCTowxDC); - SWIG_RegisterMapping("_wxDC","_class_wxPaintDC",SwigwxPaintDCTowxDC); - SWIG_RegisterMapping("_wxDC","_wxPaintDC",SwigwxPaintDCTowxDC); - SWIG_RegisterMapping("_wxDC","_class_wxClientDC",SwigwxClientDCTowxDC); - SWIG_RegisterMapping("_wxDC","_wxClientDC",SwigwxClientDCTowxDC); - SWIG_RegisterMapping("_wxDC","_class_wxScreenDC",SwigwxScreenDCTowxDC); - SWIG_RegisterMapping("_wxDC","_wxScreenDC",SwigwxScreenDCTowxDC); - SWIG_RegisterMapping("_wxDC","_class_wxMemoryDC",SwigwxMemoryDCTowxDC); - SWIG_RegisterMapping("_wxDC","_wxMemoryDC",SwigwxMemoryDCTowxDC); - SWIG_RegisterMapping("_wxDC","_class_wxDC",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_wxPrinterDC","_class_wxPrinterDC",0); - SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); - SWIG_RegisterMapping("_class_wxMask","_wxMask",0); - SWIG_RegisterMapping("_wxColour","_class_wxColour",0); - SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_wxBitmap","_class_wxCursor",SwigwxCursorTowxBitmap); - SWIG_RegisterMapping("_wxBitmap","_wxCursor",SwigwxCursorTowxBitmap); - SWIG_RegisterMapping("_wxBitmap","_class_wxIcon",SwigwxIconTowxBitmap); - SWIG_RegisterMapping("_wxBitmap","_wxIcon",SwigwxIconTowxBitmap); - SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_wxFont","_class_wxFont",0); - SWIG_RegisterMapping("_unsigned_long","_wxDash",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxDC","_class_wxMetaFileDC",SwigwxMetaFileDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_wxMetaFileDC",SwigwxMetaFileDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_class_wxPrinterDC",SwigwxPrinterDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_wxPrinterDC",SwigwxPrinterDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_class_wxPostScriptDC",SwigwxPostScriptDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_wxPostScriptDC",SwigwxPostScriptDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_class_wxPaintDC",SwigwxPaintDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_wxPaintDC",SwigwxPaintDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_class_wxClientDC",SwigwxClientDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_wxClientDC",SwigwxClientDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_class_wxScreenDC",SwigwxScreenDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_wxScreenDC",SwigwxScreenDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_class_wxMemoryDC",SwigwxMemoryDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_wxMemoryDC",SwigwxMemoryDCTowxDC); - SWIG_RegisterMapping("_class_wxDC","_wxDC",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_wxAcceleratorEntry","_class_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxMetaFileDC","_class_wxMetaFileDC",0); - SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_class_wxBrush","_wxBrush",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxFont","_wxFont",0); - SWIG_RegisterMapping("_wxClientDC","_class_wxClientDC",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_wxMemoryDC","_class_wxMemoryDC",0); - SWIG_RegisterMapping("_wxPaintDC","_class_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxAcceleratorEntry","_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); - SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_class_wxMetaFileDC","_wxMetaFileDC",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); - SWIG_RegisterMapping("_class_wxPen","_wxPen",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxPrinterDC","_wxPrinterDC",0); - SWIG_RegisterMapping("_class_wxPaintDC","_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_class_wxIcon","_wxIcon",0); - SWIG_RegisterMapping("_class_wxColour","_wxColour",0); - SWIG_RegisterMapping("_class_wxScreenDC","_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxClientDC","_wxClientDC",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); - SWIG_RegisterMapping("_class_wxBitmap","_class_wxCursor",SwigwxCursorTowxBitmap); - SWIG_RegisterMapping("_class_wxBitmap","_wxCursor",SwigwxCursorTowxBitmap); - SWIG_RegisterMapping("_class_wxBitmap","_class_wxIcon",SwigwxIconTowxBitmap); - SWIG_RegisterMapping("_class_wxBitmap","_wxIcon",SwigwxIconTowxBitmap); - SWIG_RegisterMapping("_class_wxBitmap","_wxBitmap",0); - SWIG_RegisterMapping("_class_wxMemoryDC","_wxMemoryDC",0); - SWIG_RegisterMapping("_wxDash","_unsigned_long",0); - SWIG_RegisterMapping("_wxDash","_long",0); -} diff --git a/utils/wxPython/src/msw/gdi.py b/utils/wxPython/src/msw/gdi.py deleted file mode 100644 index 7b6d5f792e..0000000000 --- a/utils/wxPython/src/msw/gdi.py +++ /dev/null @@ -1,765 +0,0 @@ -# This file was created automatically by SWIG. -import gdic - -from misc import * -class wxBitmapPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - gdic.delete_wxBitmap(self.this) - def Create(self,arg0,arg1,*args): - val = apply(gdic.wxBitmap_Create,(self.this,arg0,arg1,)+args) - return val - def GetDepth(self): - val = gdic.wxBitmap_GetDepth(self.this) - return val - def GetHeight(self): - val = gdic.wxBitmap_GetHeight(self.this) - return val - def GetPalette(self): - val = gdic.wxBitmap_GetPalette(self.this) - return val - def GetMask(self): - val = gdic.wxBitmap_GetMask(self.this) - val = wxMaskPtr(val) - return val - def GetWidth(self): - val = gdic.wxBitmap_GetWidth(self.this) - return val - def LoadFile(self,arg0,arg1): - val = gdic.wxBitmap_LoadFile(self.this,arg0,arg1) - return val - def Ok(self): - val = gdic.wxBitmap_Ok(self.this) - return val - def SaveFile(self,arg0,arg1,*args): - val = apply(gdic.wxBitmap_SaveFile,(self.this,arg0,arg1,)+args) - return val - def SetDepth(self,arg0): - val = gdic.wxBitmap_SetDepth(self.this,arg0) - return val - def SetHeight(self,arg0): - val = gdic.wxBitmap_SetHeight(self.this,arg0) - return val - def SetMask(self,arg0): - val = gdic.wxBitmap_SetMask(self.this,arg0.this) - return val - def SetPalette(self,arg0): - val = gdic.wxBitmap_SetPalette(self.this,arg0) - return val - def SetWidth(self,arg0): - val = gdic.wxBitmap_SetWidth(self.this,arg0) - return val - def __repr__(self): - return "" -class wxBitmap(wxBitmapPtr): - def __init__(self,arg0,arg1) : - self.this = gdic.new_wxBitmap(arg0,arg1) - self.thisown = 1 - - - - -class wxMaskPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - gdic.delete_wxMask(self.this) - def __repr__(self): - return "" -class wxMask(wxMaskPtr): - def __init__(self,arg0) : - self.this = gdic.new_wxMask(arg0.this) - self.thisown = 1 - - - - -class wxIconPtr(wxBitmapPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - gdic.delete_wxIcon(self.this) - def GetDepth(self): - val = gdic.wxIcon_GetDepth(self.this) - return val - def GetHeight(self): - val = gdic.wxIcon_GetHeight(self.this) - return val - def GetWidth(self): - val = gdic.wxIcon_GetWidth(self.this) - return val - def LoadFile(self,arg0,arg1): - val = gdic.wxIcon_LoadFile(self.this,arg0,arg1) - return val - def Ok(self): - val = gdic.wxIcon_Ok(self.this) - return val - def SetDepth(self,arg0): - val = gdic.wxIcon_SetDepth(self.this,arg0) - return val - def SetHeight(self,arg0): - val = gdic.wxIcon_SetHeight(self.this,arg0) - return val - def SetWidth(self,arg0): - val = gdic.wxIcon_SetWidth(self.this,arg0) - return val - def __repr__(self): - return "" -class wxIcon(wxIconPtr): - def __init__(self,arg0,arg1,*args) : - self.this = apply(gdic.new_wxIcon,(arg0,arg1,)+args) - self.thisown = 1 - - - - -class wxCursorPtr(wxBitmapPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - gdic.delete_wxCursor(self.this) - def Ok(self): - val = gdic.wxCursor_Ok(self.this) - return val - def __repr__(self): - return "" -class wxCursor(wxCursorPtr): - def __init__(self,arg0,arg1,*args) : - self.this = apply(gdic.new_wxCursor,(arg0,arg1,)+args) - self.thisown = 1 - - - - -class wxFontPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetFaceName(self): - val = gdic.wxFont_GetFaceName(self.this) - return val - def GetFamily(self): - val = gdic.wxFont_GetFamily(self.this) - return val - def GetFontId(self): - val = gdic.wxFont_GetFontId(self.this) - return val - def GetPointSize(self): - val = gdic.wxFont_GetPointSize(self.this) - return val - def GetStyle(self): - val = gdic.wxFont_GetStyle(self.this) - return val - def GetUnderlined(self): - val = gdic.wxFont_GetUnderlined(self.this) - return val - def GetWeight(self): - val = gdic.wxFont_GetWeight(self.this) - return val - def SetFaceName(self,arg0): - val = gdic.wxFont_SetFaceName(self.this,arg0) - return val - def SetFamily(self,arg0): - val = gdic.wxFont_SetFamily(self.this,arg0) - return val - def SetPointSize(self,arg0): - val = gdic.wxFont_SetPointSize(self.this,arg0) - return val - def SetStyle(self,arg0): - val = gdic.wxFont_SetStyle(self.this,arg0) - return val - def SetUnderlined(self,arg0): - val = gdic.wxFont_SetUnderlined(self.this,arg0) - return val - def SetWeight(self,arg0): - val = gdic.wxFont_SetWeight(self.this,arg0) - return val - def __repr__(self): - return "" -class wxFont(wxFontPtr): - def __init__(self,arg0,arg1,arg2,arg3,*args) : - self.this = apply(gdic.new_wxFont,(arg0,arg1,arg2,arg3,)+args) - self.thisown = 1 - - - - -class wxColourPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - gdic.delete_wxColour(self.this) - def Red(self): - val = gdic.wxColour_Red(self.this) - return val - def Green(self): - val = gdic.wxColour_Green(self.this) - return val - def Blue(self): - val = gdic.wxColour_Blue(self.this) - return val - def Ok(self): - val = gdic.wxColour_Ok(self.this) - return val - def Set(self,arg0,arg1,arg2): - val = gdic.wxColour_Set(self.this,arg0,arg1,arg2) - return val - def Get(self): - val = gdic.wxColour_Get(self.this) - return val - def __repr__(self): - return "" -class wxColour(wxColourPtr): - def __init__(self,*args) : - self.this = apply(gdic.new_wxColour,()+args) - self.thisown = 1 - - - - -class wxPenPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetCap(self): - val = gdic.wxPen_GetCap(self.this) - return val - def GetColour(self): - val = gdic.wxPen_GetColour(self.this) - val = wxColourPtr(val) - return val - def GetDashes(self,arg0): - val = gdic.wxPen_GetDashes(self.this,arg0) - return val - def GetStipple(self): - val = gdic.wxPen_GetStipple(self.this) - val = wxBitmapPtr(val) - return val - def GetJoin(self): - val = gdic.wxPen_GetJoin(self.this) - return val - def GetStyle(self): - val = gdic.wxPen_GetStyle(self.this) - return val - def GetWidth(self): - val = gdic.wxPen_GetWidth(self.this) - return val - def Ok(self): - val = gdic.wxPen_Ok(self.this) - return val - def SetCap(self,arg0): - val = gdic.wxPen_SetCap(self.this,arg0) - return val - def SetColour(self,arg0): - val = gdic.wxPen_SetColour(self.this,arg0.this) - return val - def SetDashes(self,arg0,*args): - val = apply(gdic.wxPen_SetDashes,(self.this,arg0,)+args) - return val - def SetStipple(self,arg0): - val = gdic.wxPen_SetStipple(self.this,arg0.this) - return val - def SetJoin(self,arg0): - val = gdic.wxPen_SetJoin(self.this,arg0) - return val - def SetStyle(self,arg0): - val = gdic.wxPen_SetStyle(self.this,arg0) - return val - def SetWidth(self,arg0): - val = gdic.wxPen_SetWidth(self.this,arg0) - return val - def __repr__(self): - return "" -class wxPen(wxPenPtr): - def __init__(self,arg0,*args) : - self.this = apply(gdic.new_wxPen,(arg0.this,)+args) - self.thisown = 1 - - - - -class wxBrushPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetColour(self): - val = gdic.wxBrush_GetColour(self.this) - val = wxColourPtr(val) - return val - def GetStipple(self): - val = gdic.wxBrush_GetStipple(self.this) - val = wxBitmapPtr(val) - return val - def GetStyle(self): - val = gdic.wxBrush_GetStyle(self.this) - return val - def Ok(self): - val = gdic.wxBrush_Ok(self.this) - return val - def SetColour(self,arg0): - val = gdic.wxBrush_SetColour(self.this,arg0.this) - return val - def SetStipple(self,arg0): - val = gdic.wxBrush_SetStipple(self.this,arg0.this) - return val - def SetStyle(self,arg0): - val = gdic.wxBrush_SetStyle(self.this,arg0) - return val - def __repr__(self): - return "" -class wxBrush(wxBrushPtr): - def __init__(self,arg0,*args) : - self.this = apply(gdic.new_wxBrush,(arg0.this,)+args) - self.thisown = 1 - - - - -class wxDCPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - gdic.delete_wxDC(self.this) - def BeginDrawing(self): - val = gdic.wxDC_BeginDrawing(self.this) - return val - def Blit(self,arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7): - val = gdic.wxDC_Blit(self.this,arg0,arg1,arg2,arg3,arg4.this,arg5,arg6,arg7) - return val - def Clear(self): - val = gdic.wxDC_Clear(self.this) - return val - def CrossHair(self,arg0,arg1): - val = gdic.wxDC_CrossHair(self.this,arg0,arg1) - return val - def DestroyClippingRegion(self): - val = gdic.wxDC_DestroyClippingRegion(self.this) - return val - def DeviceToLogicalX(self,arg0): - val = gdic.wxDC_DeviceToLogicalX(self.this,arg0) - return val - def DeviceToLogicalXRel(self,arg0): - val = gdic.wxDC_DeviceToLogicalXRel(self.this,arg0) - return val - def DeviceToLogicalY(self,arg0): - val = gdic.wxDC_DeviceToLogicalY(self.this,arg0) - return val - def DeviceToLogicalYRel(self,arg0): - val = gdic.wxDC_DeviceToLogicalYRel(self.this,arg0) - return val - def DrawArc(self,arg0,arg1,arg2,arg3,arg4,arg5): - val = gdic.wxDC_DrawArc(self.this,arg0,arg1,arg2,arg3,arg4,arg5) - return val - def DrawEllipse(self,arg0,arg1,arg2,arg3): - val = gdic.wxDC_DrawEllipse(self.this,arg0,arg1,arg2,arg3) - return val - def DrawEllipticArc(self,arg0,arg1,arg2,arg3,arg4,arg5): - val = gdic.wxDC_DrawEllipticArc(self.this,arg0,arg1,arg2,arg3,arg4,arg5) - return val - def DrawIcon(self,arg0,arg1,arg2): - val = gdic.wxDC_DrawIcon(self.this,arg0.this,arg1,arg2) - return val - def DrawLine(self,arg0,arg1,arg2,arg3): - val = gdic.wxDC_DrawLine(self.this,arg0,arg1,arg2,arg3) - return val - def DrawLines(self,arg0,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(gdic.wxDC_DrawLines,(self.this,arg0,)+args) - return val - def DrawPolygon(self,arg0,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(gdic.wxDC_DrawPolygon,(self.this,arg0,)+args) - return val - def DrawPoint(self,arg0,arg1): - val = gdic.wxDC_DrawPoint(self.this,arg0,arg1) - return val - def DrawRectangle(self,arg0,arg1,arg2,arg3): - val = gdic.wxDC_DrawRectangle(self.this,arg0,arg1,arg2,arg3) - return val - def DrawRoundedRectangle(self,arg0,arg1,arg2,arg3,*args): - val = apply(gdic.wxDC_DrawRoundedRectangle,(self.this,arg0,arg1,arg2,arg3,)+args) - return val - def DrawSpline(self,arg0,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(gdic.wxDC_DrawSpline,(self.this,arg0,)+args) - return val - def DrawText(self,arg0,arg1,arg2): - val = gdic.wxDC_DrawText(self.this,arg0,arg1,arg2) - return val - def EndDoc(self): - val = gdic.wxDC_EndDoc(self.this) - return val - def EndDrawing(self): - val = gdic.wxDC_EndDrawing(self.this) - return val - def EndPage(self): - val = gdic.wxDC_EndPage(self.this) - return val - def GetBackground(self): - val = gdic.wxDC_GetBackground(self.this) - val = wxBrushPtr(val) - return val - def GetBrush(self): - val = gdic.wxDC_GetBrush(self.this) - val = wxBrushPtr(val) - return val - def GetCharHeight(self): - val = gdic.wxDC_GetCharHeight(self.this) - return val - def GetCharWidth(self): - val = gdic.wxDC_GetCharWidth(self.this) - return val - def GetClippingBox(self): - val = gdic.wxDC_GetClippingBox(self.this) - return val - def GetFont(self): - val = gdic.wxDC_GetFont(self.this) - val = wxFontPtr(val) - return val - def GetLogicalFunction(self): - val = gdic.wxDC_GetLogicalFunction(self.this) - return val - def GetMapMode(self): - val = gdic.wxDC_GetMapMode(self.this) - return val - def GetOptimization(self): - val = gdic.wxDC_GetOptimization(self.this) - return val - def GetPen(self): - val = gdic.wxDC_GetPen(self.this) - val = wxPenPtr(val) - return val - def GetPixel(self,arg0,arg1): - val = gdic.wxDC_GetPixel(self.this,arg0,arg1) - val = wxColourPtr(val) - val.thisown = 1 - return val - def GetSize(self): - val = gdic.wxDC_GetSize(self.this) - return val - def GetTextBackground(self): - val = gdic.wxDC_GetTextBackground(self.this) - val = wxColourPtr(val) - return val - def GetTextExtent(self,arg0): - val = gdic.wxDC_GetTextExtent(self.this,arg0) - return val - def GetTextForeground(self): - val = gdic.wxDC_GetTextForeground(self.this) - val = wxColourPtr(val) - return val - def LogicalToDeviceX(self,arg0): - val = gdic.wxDC_LogicalToDeviceX(self.this,arg0) - return val - def LogicalToDeviceXRel(self,arg0): - val = gdic.wxDC_LogicalToDeviceXRel(self.this,arg0) - return val - def LogicalToDeviceY(self,arg0): - val = gdic.wxDC_LogicalToDeviceY(self.this,arg0) - return val - def LogicalToDeviceYRel(self,arg0): - val = gdic.wxDC_LogicalToDeviceYRel(self.this,arg0) - return val - def MaxX(self): - val = gdic.wxDC_MaxX(self.this) - return val - def MaxY(self): - val = gdic.wxDC_MaxY(self.this) - return val - def MinX(self): - val = gdic.wxDC_MinX(self.this) - return val - def MinY(self): - val = gdic.wxDC_MinY(self.this) - return val - def Ok(self): - val = gdic.wxDC_Ok(self.this) - return val - def SetDeviceOrigin(self,arg0,arg1): - val = gdic.wxDC_SetDeviceOrigin(self.this,arg0,arg1) - return val - def SetBackground(self,arg0): - val = gdic.wxDC_SetBackground(self.this,arg0.this) - return val - def SetBackgroundMode(self,arg0): - val = gdic.wxDC_SetBackgroundMode(self.this,arg0) - return val - def SetClippingRegion(self,arg0,arg1,arg2,arg3): - val = gdic.wxDC_SetClippingRegion(self.this,arg0,arg1,arg2,arg3) - return val - def SetPalette(self,arg0): - val = gdic.wxDC_SetPalette(self.this,arg0) - return val - def SetBrush(self,arg0): - val = gdic.wxDC_SetBrush(self.this,arg0.this) - return val - def SetFont(self,arg0): - val = gdic.wxDC_SetFont(self.this,arg0.this) - return val - def SetLogicalFunction(self,arg0): - val = gdic.wxDC_SetLogicalFunction(self.this,arg0) - return val - def SetMapMode(self,arg0): - val = gdic.wxDC_SetMapMode(self.this,arg0) - return val - def SetOptimization(self,arg0): - val = gdic.wxDC_SetOptimization(self.this,arg0) - return val - def SetPen(self,arg0): - val = gdic.wxDC_SetPen(self.this,arg0.this) - return val - def SetTextBackground(self,arg0): - val = gdic.wxDC_SetTextBackground(self.this,arg0.this) - return val - def SetTextForeground(self,arg0): - val = gdic.wxDC_SetTextForeground(self.this,arg0.this) - return val - def SetUserScale(self,arg0,arg1): - val = gdic.wxDC_SetUserScale(self.this,arg0,arg1) - return val - def StartDoc(self,arg0): - val = gdic.wxDC_StartDoc(self.this,arg0) - return val - def StartPage(self): - val = gdic.wxDC_StartPage(self.this) - return val - def DrawBitmap(self,arg0,arg1,arg2,*args): - val = apply(gdic.wxDC_DrawBitmap,(self.this,arg0.this,arg1,arg2,)+args) - return val - def __repr__(self): - return "" -class wxDC(wxDCPtr): - def __init__(self,this): - self.this = this - - - - -class wxMemoryDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def SelectObject(self,arg0): - val = gdic.wxMemoryDC_SelectObject(self.this,arg0.this) - return val - def __repr__(self): - return "" -class wxMemoryDC(wxMemoryDCPtr): - def __init__(self) : - self.this = gdic.new_wxMemoryDC() - self.thisown = 1 - - - - -class wxScreenDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def StartDrawingOnTop(self,arg0): - val = gdic.wxScreenDC_StartDrawingOnTop(self.this,arg0.this) - return val - def StartDrawingOnTopRect(self,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(gdic.wxScreenDC_StartDrawingOnTopRect,(self.this,)+args) - return val - def EndDrawingOnTop(self): - val = gdic.wxScreenDC_EndDrawingOnTop(self.this) - return val - def __repr__(self): - return "" -class wxScreenDC(wxScreenDCPtr): - def __init__(self) : - self.this = gdic.new_wxScreenDC() - self.thisown = 1 - - - - -class wxClientDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxClientDC(wxClientDCPtr): - def __init__(self,arg0) : - self.this = gdic.new_wxClientDC(arg0.this) - self.thisown = 1 - - - - -class wxPaintDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxPaintDC(wxPaintDCPtr): - def __init__(self,arg0) : - self.this = gdic.new_wxPaintDC(arg0.this) - self.thisown = 1 - - - - -class wxPostScriptDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxPostScriptDC(wxPostScriptDCPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(gdic.new_wxPostScriptDC,(arg0,)+args) - self.thisown = 1 - - - - -class wxPrinterDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxPrinterDC(wxPrinterDCPtr): - def __init__(self,arg0,arg1,arg2,*args) : - self.this = apply(gdic.new_wxPrinterDC,(arg0,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxMetaFileDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Close(self): - val = gdic.wxMetaFileDC_Close(self.this) - return val - def __repr__(self): - return "" -class wxMetaFileDC(wxMetaFileDCPtr): - def __init__(self,*args) : - self.this = apply(gdic.new_wxMetaFileDC,()+args) - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - -def wxEmptyBitmap(arg0,arg1,*args): - val = apply(gdic.wxEmptyBitmap,(arg0,arg1,)+args) - val = wxBitmapPtr(val) - val.thisown = 1 - return val - -def wxNoRefBitmap(arg0,arg1): - val = gdic.wxNoRefBitmap(arg0,arg1) - val = wxBitmapPtr(val) - return val - -def wxMaskColour(arg0,arg1): - val = gdic.wxMaskColour(arg0.this,arg1.this) - val = wxMaskPtr(val) - val.thisown = 1 - return val - -def wxStockCursor(arg0): - val = gdic.wxStockCursor(arg0) - val = wxCursorPtr(val) - val.thisown = 1 - return val - -def wxNamedColour(arg0): - val = gdic.wxNamedColour(arg0) - val = wxColourPtr(val) - val.thisown = 1 - return val - -def wxMemoryDCFromDC(arg0): - val = gdic.wxMemoryDCFromDC(arg0.this) - val = wxMemoryDCPtr(val) - val.thisown = 1 - return val - - - -#-------------- VARIABLE WRAPPERS ------------------ - -cvar = gdic.cvar -wxNORMAL_FONT = wxFontPtr(gdic.cvar.wxNORMAL_FONT) -wxSMALL_FONT = wxFontPtr(gdic.cvar.wxSMALL_FONT) -wxITALIC_FONT = wxFontPtr(gdic.cvar.wxITALIC_FONT) -wxSWISS_FONT = wxFontPtr(gdic.cvar.wxSWISS_FONT) -wxRED_PEN = wxPenPtr(gdic.cvar.wxRED_PEN) -wxCYAN_PEN = wxPenPtr(gdic.cvar.wxCYAN_PEN) -wxGREEN_PEN = wxPenPtr(gdic.cvar.wxGREEN_PEN) -wxBLACK_PEN = wxPenPtr(gdic.cvar.wxBLACK_PEN) -wxWHITE_PEN = wxPenPtr(gdic.cvar.wxWHITE_PEN) -wxTRANSPARENT_PEN = wxPenPtr(gdic.cvar.wxTRANSPARENT_PEN) -wxBLACK_DASHED_PEN = wxPenPtr(gdic.cvar.wxBLACK_DASHED_PEN) -wxGREY_PEN = wxPenPtr(gdic.cvar.wxGREY_PEN) -wxMEDIUM_GREY_PEN = wxPenPtr(gdic.cvar.wxMEDIUM_GREY_PEN) -wxLIGHT_GREY_PEN = wxPenPtr(gdic.cvar.wxLIGHT_GREY_PEN) -wxBLUE_BRUSH = wxBrushPtr(gdic.cvar.wxBLUE_BRUSH) -wxGREEN_BRUSH = wxBrushPtr(gdic.cvar.wxGREEN_BRUSH) -wxWHITE_BRUSH = wxBrushPtr(gdic.cvar.wxWHITE_BRUSH) -wxBLACK_BRUSH = wxBrushPtr(gdic.cvar.wxBLACK_BRUSH) -wxTRANSPARENT_BRUSH = wxBrushPtr(gdic.cvar.wxTRANSPARENT_BRUSH) -wxCYAN_BRUSH = wxBrushPtr(gdic.cvar.wxCYAN_BRUSH) -wxRED_BRUSH = wxBrushPtr(gdic.cvar.wxRED_BRUSH) -wxGREY_BRUSH = wxBrushPtr(gdic.cvar.wxGREY_BRUSH) -wxMEDIUM_GREY_BRUSH = wxBrushPtr(gdic.cvar.wxMEDIUM_GREY_BRUSH) -wxLIGHT_GREY_BRUSH = wxBrushPtr(gdic.cvar.wxLIGHT_GREY_BRUSH) -wxBLACK = wxColourPtr(gdic.cvar.wxBLACK) -wxWHITE = wxColourPtr(gdic.cvar.wxWHITE) -wxRED = wxColourPtr(gdic.cvar.wxRED) -wxBLUE = wxColourPtr(gdic.cvar.wxBLUE) -wxGREEN = wxColourPtr(gdic.cvar.wxGREEN) -wxCYAN = wxColourPtr(gdic.cvar.wxCYAN) -wxLIGHT_GREY = wxColourPtr(gdic.cvar.wxLIGHT_GREY) -wxSTANDARD_CURSOR = wxCursorPtr(gdic.cvar.wxSTANDARD_CURSOR) -wxHOURGLASS_CURSOR = wxCursorPtr(gdic.cvar.wxHOURGLASS_CURSOR) -wxCROSS_CURSOR = wxCursorPtr(gdic.cvar.wxCROSS_CURSOR) -wxNullBitmap = wxBitmapPtr(gdic.cvar.wxNullBitmap) -wxNullIcon = wxIconPtr(gdic.cvar.wxNullIcon) -wxNullCursor = wxCursorPtr(gdic.cvar.wxNullCursor) -wxNullPen = wxPenPtr(gdic.cvar.wxNullPen) -wxNullBrush = wxBrushPtr(gdic.cvar.wxNullBrush) -wxNullFont = wxFontPtr(gdic.cvar.wxNullFont) -wxNullColour = wxColourPtr(gdic.cvar.wxNullColour) diff --git a/utils/wxPython/src/msw/mdi.cpp b/utils/wxPython/src/msw/mdi.cpp deleted file mode 100644 index 3853594962..0000000000 --- a/utils/wxPython/src/msw/mdi.cpp +++ /dev/null @@ -1,902 +0,0 @@ -/* - * FILE : msw\mdi.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif - -#define SWIG_init initmdic - -#define SWIG_name "mdic" - -#include "helpers.h" - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; -static void *SwigwxMDIParentFrameTowxFrame(void *ptr) { - wxMDIParentFrame *src; - wxFrame *dest; - src = (wxMDIParentFrame *) ptr; - dest = (wxFrame *) src; - return (void *) dest; -} - -static void *SwigwxMDIParentFrameTowxWindow(void *ptr) { - wxMDIParentFrame *src; - wxWindow *dest; - src = (wxMDIParentFrame *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxMDIParentFrameTowxEvtHandler(void *ptr) { - wxMDIParentFrame *src; - wxEvtHandler *dest; - src = (wxMDIParentFrame *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxMDIParentFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxMDIParentFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxMDIParentFrame(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIParentFrame * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = (wxDEFAULT_FRAME_STYLE)|(wxVSCROLL)|(wxHSCROLL); - char * _arg6 = "frame"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|ssls:new_wxMDIParentFrame",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxMDIParentFrame. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxMDIParentFrame. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxMDIParentFrame. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxMDIParentFrame *)new_wxMDIParentFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMDIParentFrame_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxMDIParentFrame_ActivateNext(_swigobj) (_swigobj->ActivateNext()) -static PyObject *_wrap_wxMDIParentFrame_ActivateNext(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIParentFrame * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIParentFrame_ActivateNext",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_ActivateNext. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - wxMDIParentFrame_ActivateNext(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMDIParentFrame_ActivatePrevious(_swigobj) (_swigobj->ActivatePrevious()) -static PyObject *_wrap_wxMDIParentFrame_ActivatePrevious(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIParentFrame * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIParentFrame_ActivatePrevious",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_ActivatePrevious. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - wxMDIParentFrame_ActivatePrevious(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMDIParentFrame_ArrangeIcons(_swigobj) (_swigobj->ArrangeIcons()) -static PyObject *_wrap_wxMDIParentFrame_ArrangeIcons(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIParentFrame * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIParentFrame_ArrangeIcons",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_ArrangeIcons. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - wxMDIParentFrame_ArrangeIcons(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMDIParentFrame_Cascade(_swigobj) (_swigobj->Cascade()) -static PyObject *_wrap_wxMDIParentFrame_Cascade(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIParentFrame * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIParentFrame_Cascade",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_Cascade. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - wxMDIParentFrame_Cascade(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMDIParentFrame_GetClientSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetClientSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMDIParentFrame_GetClientSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIParentFrame * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxMDIParentFrame_GetClientSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_GetClientSize. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - wxMDIParentFrame_GetClientSize(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxMDIParentFrame_GetActiveChild(_swigobj) (_swigobj->GetActiveChild()) -static PyObject *_wrap_wxMDIParentFrame_GetActiveChild(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIChildFrame * _result; - wxMDIParentFrame * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIParentFrame_GetActiveChild",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_GetActiveChild. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - _result = (wxMDIChildFrame *)wxMDIParentFrame_GetActiveChild(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMDIChildFrame_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMDIParentFrame_GetClientWindow(_swigobj) (_swigobj->GetClientWindow()) -static PyObject *_wrap_wxMDIParentFrame_GetClientWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIClientWindow * _result; - wxMDIParentFrame * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIParentFrame_GetClientWindow",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_GetClientWindow. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - _result = (wxMDIClientWindow *)wxMDIParentFrame_GetClientWindow(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMDIClientWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMDIParentFrame_GetToolBar(_swigobj) (_swigobj->GetToolBar()) -static PyObject *_wrap_wxMDIParentFrame_GetToolBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - wxMDIParentFrame * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIParentFrame_GetToolBar",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_GetToolBar. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - _result = (wxWindow *)wxMDIParentFrame_GetToolBar(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMDIParentFrame_SetToolBar(_swigobj,_swigarg0) (_swigobj->SetToolBar(_swigarg0)) -static PyObject *_wrap_wxMDIParentFrame_SetToolBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIParentFrame * _arg0; - wxToolBar * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxMDIParentFrame_SetToolBar",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_SetToolBar. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxToolBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMDIParentFrame_SetToolBar. Expected _wxToolBar_p."); - return NULL; - } - } - wxMDIParentFrame_SetToolBar(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMDIParentFrame_Tile(_swigobj) (_swigobj->Tile()) -static PyObject *_wrap_wxMDIParentFrame_Tile(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIParentFrame * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIParentFrame_Tile",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_Tile. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - wxMDIParentFrame_Tile(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxMDIChildFrameTowxFrame(void *ptr) { - wxMDIChildFrame *src; - wxFrame *dest; - src = (wxMDIChildFrame *) ptr; - dest = (wxFrame *) src; - return (void *) dest; -} - -static void *SwigwxMDIChildFrameTowxWindow(void *ptr) { - wxMDIChildFrame *src; - wxWindow *dest; - src = (wxMDIChildFrame *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxMDIChildFrameTowxEvtHandler(void *ptr) { - wxMDIChildFrame *src; - wxEvtHandler *dest; - src = (wxMDIChildFrame *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxMDIChildFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxMDIChildFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxMDIChildFrame(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIChildFrame * _result; - wxMDIParentFrame * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = (wxDEFAULT_FRAME_STYLE); - char * _arg6 = "frame"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|ssls:new_wxMDIChildFrame",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxMDIChildFrame. Expected _wxMDIParentFrame_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxMDIChildFrame. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxMDIChildFrame. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxMDIChildFrame *)new_wxMDIChildFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMDIChildFrame_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxMDIChildFrame_Activate(_swigobj) (_swigobj->Activate()) -static PyObject *_wrap_wxMDIChildFrame_Activate(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIChildFrame * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIChildFrame_Activate",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIChildFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIChildFrame_Activate. Expected _wxMDIChildFrame_p."); - return NULL; - } - } - wxMDIChildFrame_Activate(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMDIChildFrame_Maximize(_swigobj) (_swigobj->Maximize()) -static PyObject *_wrap_wxMDIChildFrame_Maximize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIChildFrame * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIChildFrame_Maximize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIChildFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIChildFrame_Maximize. Expected _wxMDIChildFrame_p."); - return NULL; - } - } - wxMDIChildFrame_Maximize(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMDIChildFrame_Restore(_swigobj) (_swigobj->Restore()) -static PyObject *_wrap_wxMDIChildFrame_Restore(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIChildFrame * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIChildFrame_Restore",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIChildFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIChildFrame_Restore. Expected _wxMDIChildFrame_p."); - return NULL; - } - } - wxMDIChildFrame_Restore(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMDIChildFrame_SetMenuBar(_swigobj,_swigarg0) (_swigobj->SetMenuBar(_swigarg0)) -static PyObject *_wrap_wxMDIChildFrame_SetMenuBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIChildFrame * _arg0; - wxMenuBar * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxMDIChildFrame_SetMenuBar",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIChildFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIChildFrame_SetMenuBar. Expected _wxMDIChildFrame_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMDIChildFrame_SetMenuBar. Expected _wxMenuBar_p."); - return NULL; - } - } - wxMDIChildFrame_SetMenuBar(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMDIChildFrame_SetClientSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetClientSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMDIChildFrame_SetClientSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIChildFrame * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxMDIChildFrame_SetClientSize",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIChildFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIChildFrame_SetClientSize. Expected _wxMDIChildFrame_p."); - return NULL; - } - } - wxMDIChildFrame_SetClientSize(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMDIChildFrame_GetPosition(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetPosition(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMDIChildFrame_GetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIChildFrame * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxMDIChildFrame_GetPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIChildFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIChildFrame_GetPosition. Expected _wxMDIChildFrame_p."); - return NULL; - } - } - wxMDIChildFrame_GetPosition(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -static void *SwigwxMDIClientWindowTowxWindow(void *ptr) { - wxMDIClientWindow *src; - wxWindow *dest; - src = (wxMDIClientWindow *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxMDIClientWindowTowxEvtHandler(void *ptr) { - wxMDIClientWindow *src; - wxEvtHandler *dest; - src = (wxMDIClientWindow *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxMDIClientWindow(_swigarg0,_swigarg1) (new wxMDIClientWindow(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxMDIClientWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMDIClientWindow * _result; - wxMDIParentFrame * _arg0; - long _arg1 = 0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|l:new_wxMDIClientWindow",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIParentFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxMDIClientWindow. Expected _wxMDIParentFrame_p."); - return NULL; - } - } - _result = (wxMDIClientWindow *)new_wxMDIClientWindow(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMDIClientWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyMethodDef mdicMethods[] = { - { "new_wxMDIClientWindow", _wrap_new_wxMDIClientWindow, 1 }, - { "wxMDIChildFrame_GetPosition", _wrap_wxMDIChildFrame_GetPosition, 1 }, - { "wxMDIChildFrame_SetClientSize", _wrap_wxMDIChildFrame_SetClientSize, 1 }, - { "wxMDIChildFrame_SetMenuBar", _wrap_wxMDIChildFrame_SetMenuBar, 1 }, - { "wxMDIChildFrame_Restore", _wrap_wxMDIChildFrame_Restore, 1 }, - { "wxMDIChildFrame_Maximize", _wrap_wxMDIChildFrame_Maximize, 1 }, - { "wxMDIChildFrame_Activate", _wrap_wxMDIChildFrame_Activate, 1 }, - { "new_wxMDIChildFrame", _wrap_new_wxMDIChildFrame, 1 }, - { "wxMDIParentFrame_Tile", _wrap_wxMDIParentFrame_Tile, 1 }, - { "wxMDIParentFrame_SetToolBar", _wrap_wxMDIParentFrame_SetToolBar, 1 }, - { "wxMDIParentFrame_GetToolBar", _wrap_wxMDIParentFrame_GetToolBar, 1 }, - { "wxMDIParentFrame_GetClientWindow", _wrap_wxMDIParentFrame_GetClientWindow, 1 }, - { "wxMDIParentFrame_GetActiveChild", _wrap_wxMDIParentFrame_GetActiveChild, 1 }, - { "wxMDIParentFrame_GetClientSize", _wrap_wxMDIParentFrame_GetClientSize, 1 }, - { "wxMDIParentFrame_Cascade", _wrap_wxMDIParentFrame_Cascade, 1 }, - { "wxMDIParentFrame_ArrangeIcons", _wrap_wxMDIParentFrame_ArrangeIcons, 1 }, - { "wxMDIParentFrame_ActivatePrevious", _wrap_wxMDIParentFrame_ActivatePrevious, 1 }, - { "wxMDIParentFrame_ActivateNext", _wrap_wxMDIParentFrame_ActivateNext, 1 }, - { "new_wxMDIParentFrame", _wrap_new_wxMDIParentFrame, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initmdic)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("mdic", mdicMethods); - d = PyModule_GetDict(m); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_wxAcceleratorTable","_class_wxAcceleratorTable",0); - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMDIClientWindow",SwigwxMDIClientWindowTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxMDIClientWindow",SwigwxMDIClientWindowTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxMDIChildFrame",SwigwxMDIChildFrameTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxMDIParentFrame",SwigwxMDIParentFrameTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxEvtHandler",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); - SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); - SWIG_RegisterMapping("_wxPen","_class_wxPen",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_long","_wxDash",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_class_wxAcceleratorTable","_wxAcceleratorTable",0); - SWIG_RegisterMapping("_wxDC","_class_wxDC",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_wxPrinterDC","_class_wxPrinterDC",0); - SWIG_RegisterMapping("_class_wxMenuItem","_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxPanel","_class_wxPanel",0); - SWIG_RegisterMapping("_class_wxMask","_wxMask",0); - SWIG_RegisterMapping("_wxColour","_class_wxColour",0); - SWIG_RegisterMapping("_class_wxDialog","_wxDialog",0); - SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); - SWIG_RegisterMapping("_wxMiniFrame","_class_wxMiniFrame",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxMDIChildFrame","_class_wxMDIChildFrame",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_wxFont","_class_wxFont",0); - SWIG_RegisterMapping("_unsigned_long","_wxDash",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxDC","_wxDC",0); - SWIG_RegisterMapping("_wxMDIParentFrame","_class_wxMDIParentFrame",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_wxAcceleratorEntry","_class_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_class_wxPanel","_wxPanel",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxMetaFileDC","_class_wxMetaFileDC",0); - SWIG_RegisterMapping("_wxMenu","_class_wxMenu",0); - SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxMDIChildFrame","_wxMDIChildFrame",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_class_wxMDIClientWindow","_wxMDIClientWindow",0); - SWIG_RegisterMapping("_class_wxBrush","_wxBrush",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxWindow","_class_wxMDIClientWindow",SwigwxMDIClientWindowTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxMDIClientWindow",SwigwxMDIClientWindowTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxMDIChildFrame",SwigwxMDIChildFrameTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxMDIParentFrame",SwigwxMDIParentFrameTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxWindow",0); - SWIG_RegisterMapping("_class_wxFont","_wxFont",0); - SWIG_RegisterMapping("_wxClientDC","_class_wxClientDC",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_wxMemoryDC","_class_wxMemoryDC",0); - SWIG_RegisterMapping("_wxPaintDC","_class_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxAcceleratorEntry","_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); - SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_class_wxMetaFileDC","_wxMetaFileDC",0); - SWIG_RegisterMapping("_class_wxMenu","_wxMenu",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); - SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); - SWIG_RegisterMapping("_class_wxPen","_wxPen",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_wxFrame","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxFrame); - SWIG_RegisterMapping("_wxFrame","_wxMDIChildFrame",SwigwxMDIChildFrameTowxFrame); - SWIG_RegisterMapping("_wxFrame","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxFrame); - SWIG_RegisterMapping("_wxFrame","_wxMDIParentFrame",SwigwxMDIParentFrameTowxFrame); - SWIG_RegisterMapping("_wxFrame","_class_wxFrame",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxPrinterDC","_wxPrinterDC",0); - SWIG_RegisterMapping("_class_wxMDIParentFrame","_wxMDIParentFrame",0); - SWIG_RegisterMapping("_class_wxPaintDC","_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_class_wxIcon","_wxIcon",0); - SWIG_RegisterMapping("_class_wxColour","_wxColour",0); - SWIG_RegisterMapping("_class_wxScreenDC","_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxMiniFrame","_wxMiniFrame",0); - SWIG_RegisterMapping("_class_wxClientDC","_wxClientDC",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); - SWIG_RegisterMapping("_class_wxBitmap","_wxBitmap",0); - SWIG_RegisterMapping("_class_wxMemoryDC","_wxMemoryDC",0); - SWIG_RegisterMapping("_wxMenuBar","_class_wxMenuBar",0); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxMDIClientWindow",SwigwxMDIClientWindowTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxMDIClientWindow",SwigwxMDIClientWindowTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxMDIChildFrame",SwigwxMDIChildFrameTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxMDIParentFrame",SwigwxMDIParentFrameTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxEvtHandler",0); - SWIG_RegisterMapping("_wxMenuItem","_class_wxMenuItem",0); - SWIG_RegisterMapping("_wxDash","_unsigned_long",0); - SWIG_RegisterMapping("_wxDash","_long",0); - SWIG_RegisterMapping("_class_wxScrolledWindow","_wxScrolledWindow",0); - SWIG_RegisterMapping("_wxMDIClientWindow","_class_wxMDIClientWindow",0); - SWIG_RegisterMapping("_wxWindow","_class_wxMDIClientWindow",SwigwxMDIClientWindowTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxMDIClientWindow",SwigwxMDIClientWindowTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxMDIChildFrame",SwigwxMDIChildFrameTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxMDIParentFrame",SwigwxMDIParentFrameTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxWindow",0); - SWIG_RegisterMapping("_class_wxFrame","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxFrame); - SWIG_RegisterMapping("_class_wxFrame","_wxMDIChildFrame",SwigwxMDIChildFrameTowxFrame); - SWIG_RegisterMapping("_class_wxFrame","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxFrame); - SWIG_RegisterMapping("_class_wxFrame","_wxMDIParentFrame",SwigwxMDIParentFrameTowxFrame); - SWIG_RegisterMapping("_class_wxFrame","_wxFrame",0); -} diff --git a/utils/wxPython/src/msw/mdi.py b/utils/wxPython/src/msw/mdi.py deleted file mode 100644 index b295197deb..0000000000 --- a/utils/wxPython/src/msw/mdi.py +++ /dev/null @@ -1,121 +0,0 @@ -# This file was created automatically by SWIG. -import mdic - -from misc import * - -from windows import * - -from gdi import * -class wxMDIParentFramePtr(wxFramePtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def ActivateNext(self): - val = mdic.wxMDIParentFrame_ActivateNext(self.this) - return val - def ActivatePrevious(self): - val = mdic.wxMDIParentFrame_ActivatePrevious(self.this) - return val - def ArrangeIcons(self): - val = mdic.wxMDIParentFrame_ArrangeIcons(self.this) - return val - def Cascade(self): - val = mdic.wxMDIParentFrame_Cascade(self.this) - return val - def GetClientSize(self): - val = mdic.wxMDIParentFrame_GetClientSize(self.this) - return val - def GetActiveChild(self): - val = mdic.wxMDIParentFrame_GetActiveChild(self.this) - val = wxMDIChildFramePtr(val) - return val - def GetClientWindow(self): - val = mdic.wxMDIParentFrame_GetClientWindow(self.this) - val = wxMDIClientWindowPtr(val) - return val - def GetToolBar(self): - val = mdic.wxMDIParentFrame_GetToolBar(self.this) - val = wxWindowPtr(val) - return val - def SetToolBar(self,arg0): - val = mdic.wxMDIParentFrame_SetToolBar(self.this,arg0) - return val - def Tile(self): - val = mdic.wxMDIParentFrame_Tile(self.this) - return val - def __repr__(self): - return "" -class wxMDIParentFrame(wxMDIParentFramePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(mdic.new_wxMDIParentFrame,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxMDIChildFramePtr(wxFramePtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Activate(self): - val = mdic.wxMDIChildFrame_Activate(self.this) - return val - def Maximize(self): - val = mdic.wxMDIChildFrame_Maximize(self.this) - return val - def Restore(self): - val = mdic.wxMDIChildFrame_Restore(self.this) - return val - def SetMenuBar(self,arg0): - val = mdic.wxMDIChildFrame_SetMenuBar(self.this,arg0.this) - return val - def SetClientSize(self,arg0,arg1): - val = mdic.wxMDIChildFrame_SetClientSize(self.this,arg0,arg1) - return val - def GetPosition(self): - val = mdic.wxMDIChildFrame_GetPosition(self.this) - return val - def __repr__(self): - return "" -class wxMDIChildFrame(wxMDIChildFramePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(mdic.new_wxMDIChildFrame,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxMDIClientWindowPtr(wxWindowPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxMDIClientWindow(wxMDIClientWindowPtr): - def __init__(self,arg0,*args) : - self.this = apply(mdic.new_wxMDIClientWindow,(arg0.this,)+args) - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - - - -#-------------- VARIABLE WRAPPERS ------------------ - diff --git a/utils/wxPython/src/msw/misc.cpp b/utils/wxPython/src/msw/misc.cpp deleted file mode 100644 index 4607d19850..0000000000 --- a/utils/wxPython/src/msw/misc.cpp +++ /dev/null @@ -1,2964 +0,0 @@ -/* - * FILE : msw\misc.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif - -#define SWIG_init initmiscc - -#define SWIG_name "miscc" - -#include "helpers.h" -#include - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; - - char* wxGetResource(char *section, char *entry, char *file = NULL) { - char * retval; - wxGetResource(section, entry, &retval, file); - return retval; - } -static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args) { - PyObject * _resultobj; - char * _result; - char * _arg0; - char * _arg1 = NULL; - char * _arg2 = NULL; - char * _arg3 = NULL; - char * _arg4 = "*.*"; - int _arg5 = 0; - wxWindow * _arg6 = NULL; - int _arg7 = -1; - int _arg8 = -1; - char * _argc6 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|ssssisii:wxFileSelector",&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_argc6,&_arg7,&_arg8)) - return NULL; - if (_argc6) { - if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxFileSelector. Expected _wxWindow_p."); - return NULL; - } - } - _result = (char *)wxFileSelector(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8); - _resultobj = Py_BuildValue("s", _result); - return _resultobj; -} - -static PyObject *_wrap_wxGetTextFromUser(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxString * _arg0; - wxString * _arg1 = &wxPyEmptyStr; - wxString * _arg2 = &wxPyEmptyStr; - wxWindow * _arg3 = NULL; - int _arg4 = -1; - int _arg5 = -1; - bool _arg6 = (1); - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - int tempbool6; - - self = self; - if(!PyArg_ParseTuple(args,"O|OOsiii:wxGetTextFromUser",&_obj0,&_obj1,&_obj2,&_argc3,&_arg4,&_arg5,&tempbool6)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - if (_obj1) -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - if (_obj2) -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGetTextFromUser. Expected _wxWindow_p."); - return NULL; - } - } - _arg6 = (bool ) tempbool6; - _result = new wxString (wxGetTextFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} -{ - if (_obj2) - delete _arg2; -} -{ - delete _result; -} - return _resultobj; -} - -static PyObject *_wrap_wxGetSingleChoice(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxString * _arg0; - wxString * _arg1; - int _arg2; - wxString * _arg3; - wxWindow * _arg4 = NULL; - int _arg5 = -1; - int _arg6 = -1; - bool _arg7 = (1); - int _arg8 = 150; - int _arg9 = 200; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj3 = 0; - char * _argc4 = 0; - int tempbool7; - - self = self; - if(!PyArg_ParseTuple(args,"OOO|siiiii:wxGetSingleChoice",&_obj0,&_obj1,&_obj3,&_argc4,&_arg5,&_arg6,&tempbool7,&_arg8,&_arg9)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - if (_obj3) -{ - _arg3 = wxString_LIST_helper(_obj3); - if (_arg3 == NULL) { - return NULL; - } -} - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxGetSingleChoice. Expected _wxWindow_p."); - return NULL; - } - } - _arg7 = (bool ) tempbool7; -{ - _arg2 = PyList_Size(_obj3); -} - _result = new wxString (wxGetSingleChoice(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} -{ - delete [] _arg3; -} -{ - delete _result; -} - return _resultobj; -} - -static PyObject *_wrap_wxGetSingleChoiceIndex(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxString * _arg0; - wxString * _arg1; - int _arg2; - wxString * _arg3; - wxWindow * _arg4 = NULL; - int _arg5 = -1; - int _arg6 = -1; - bool _arg7 = (1); - int _arg8 = 150; - int _arg9 = 200; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj3 = 0; - char * _argc4 = 0; - int tempbool7; - - self = self; - if(!PyArg_ParseTuple(args,"OOO|siiiii:wxGetSingleChoiceIndex",&_obj0,&_obj1,&_obj3,&_argc4,&_arg5,&_arg6,&tempbool7,&_arg8,&_arg9)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - if (_obj3) -{ - _arg3 = wxString_LIST_helper(_obj3); - if (_arg3 == NULL) { - return NULL; - } -} - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxGetSingleChoiceIndex. Expected _wxWindow_p."); - return NULL; - } - } - _arg7 = (bool ) tempbool7; -{ - _arg2 = PyList_Size(_obj3); -} - _result = (int )wxGetSingleChoiceIndex(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} -{ - delete [] _arg3; -} - return _resultobj; -} - -static PyObject *_wrap_wxMessageBox(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxString * _arg0; - wxString * _arg1 = &wxPyEmptyStr; - int _arg2 = (wxOK)|(wxCENTRE); - wxWindow * _arg3 = NULL; - int _arg4 = -1; - int _arg5 = -1; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - char * _argc3 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O|Oisii:wxMessageBox",&_obj0,&_obj1,&_arg2,&_argc3,&_arg4,&_arg5)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - if (_obj1) -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxMessageBox. Expected _wxWindow_p."); - return NULL; - } - } - _result = (int )wxMessageBox(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static PyObject *_wrap_wxColourDisplay(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - - self = self; - if(!PyArg_ParseTuple(args,":wxColourDisplay")) - return NULL; - _result = (bool )wxColourDisplay(); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxDisplayDepth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - - self = self; - if(!PyArg_ParseTuple(args,":wxDisplayDepth")) - return NULL; - _result = (int )wxDisplayDepth(); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxSetCursor(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxCursor * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSetCursor",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCursor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursor. Expected _wxCursor_p."); - return NULL; - } - } - wxSetCursor(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_NewId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - - self = self; - if(!PyArg_ParseTuple(args,":NewId")) - return NULL; - _result = (long )NewId(); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -static PyObject *_wrap_RegisterId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _arg0; - - self = self; - if(!PyArg_ParseTuple(args,"l:RegisterId",&_arg0)) - return NULL; - RegisterId(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxBeginBusyCursor(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxCursor * _arg0 = wxHOURGLASS_CURSOR; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"|s:wxBeginBusyCursor",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCursor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBeginBusyCursor. Expected _wxCursor_p."); - return NULL; - } - } - wxBeginBusyCursor(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxBell(PyObject *self, PyObject *args) { - PyObject * _resultobj; - - self = self; - if(!PyArg_ParseTuple(args,":wxBell")) - return NULL; - wxBell(); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxDisplaySize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int * _arg0; - int temp; - int * _arg1; - int temp0; - - self = self; -{ - _arg0 = &temp; -} -{ - _arg1 = &temp0; -} - if(!PyArg_ParseTuple(args,":wxDisplaySize")) - return NULL; - wxDisplaySize(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg0)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -static PyObject *_wrap_wxEndBusyCursor(PyObject *self, PyObject *args) { - PyObject * _resultobj; - - self = self; - if(!PyArg_ParseTuple(args,":wxEndBusyCursor")) - return NULL; - wxEndBusyCursor(); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxExecute(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxString * _arg0; - bool _arg1 = (0); - PyObject * _obj0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"O|i:wxExecute",&_obj0,&tempbool1)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - _arg1 = (bool ) tempbool1; - _result = (long )wxExecute(*_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -static PyObject *_wrap_wxFindWindowByLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - wxString * _arg0; - wxWindow * _arg1 = NULL; - PyObject * _obj0 = 0; - char * _argc1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"O|s:wxFindWindowByLabel",&_obj0,&_argc1)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFindWindowByLabel. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxWindow *)wxFindWindowByLabel(*_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -static PyObject *_wrap_wxFindWindowByName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - wxString * _arg0; - wxWindow * _arg1 = NULL; - PyObject * _obj0 = 0; - char * _argc1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"O|s:wxFindWindowByName",&_obj0,&_argc1)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFindWindowByName. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxWindow *)wxFindWindowByName(*_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -static PyObject *_wrap_wxGetActiveWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":wxGetActiveWindow")) - return NULL; - _result = (wxWindow *)wxGetActiveWindow(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxGetElapsedTime(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - bool _arg0 = (1); - int tempbool0; - - self = self; - if(!PyArg_ParseTuple(args,"|i:wxGetElapsedTime",&tempbool0)) - return NULL; - _arg0 = (bool ) tempbool0; - _result = (long )wxGetElapsedTime(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -static PyObject *_wrap_wxGetFreeMemory(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - - self = self; - if(!PyArg_ParseTuple(args,":wxGetFreeMemory")) - return NULL; - _result = (long )wxGetFreeMemory(); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -static PyObject *_wrap_wxGetMousePosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int * _arg0; - int temp; - int * _arg1; - int temp0; - - self = self; -{ - _arg0 = &temp; -} -{ - _arg1 = &temp0; -} - if(!PyArg_ParseTuple(args,":wxGetMousePosition")) - return NULL; - wxGetMousePosition(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg0)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -static PyObject *_wrap_wxIsBusy(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - - self = self; - if(!PyArg_ParseTuple(args,":wxIsBusy")) - return NULL; - _result = (bool )wxIsBusy(); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxNow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - - self = self; - if(!PyArg_ParseTuple(args,":wxNow")) - return NULL; - _result = new wxString (wxNow()); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -static PyObject *_wrap_wxShell(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxString * _arg0 = &wxPyEmptyStr; - PyObject * _obj0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"|O:wxShell",&_obj0)) - return NULL; - if (_obj0) -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - _result = (bool )wxShell(*_arg0); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -static PyObject *_wrap_wxStartTimer(PyObject *self, PyObject *args) { - PyObject * _resultobj; - - self = self; - if(!PyArg_ParseTuple(args,":wxStartTimer")) - return NULL; - wxStartTimer(); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxGetOsVersion(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - int * _arg0; - int temp; - int * _arg1; - int temp0; - - self = self; -{ - _arg0 = &temp; -} -{ - _arg1 = &temp0; -} - if(!PyArg_ParseTuple(args,":wxGetOsVersion")) - return NULL; - _result = (int )wxGetOsVersion(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg0)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -static PyObject *_wrap_wxYield(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - - self = self; - if(!PyArg_ParseTuple(args,":wxYield")) - return NULL; - _result = (bool )wxYield(); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxGetResource(PyObject *self, PyObject *args) { - PyObject * _resultobj; - char * _result; - char * _arg0; - char * _arg1; - char * _arg2 = NULL; - - self = self; - if(!PyArg_ParseTuple(args,"ss|s:wxGetResource",&_arg0,&_arg1,&_arg2)) - return NULL; - _result = (char *)wxGetResource(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("s", _result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceAddIdentifier(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - char * _arg0; - int _arg1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxResourceAddIdentifier",&_arg0,&_arg1)) - return NULL; - _result = (bool )wxResourceAddIdentifier(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceClear(PyObject *self, PyObject *args) { - PyObject * _resultobj; - - self = self; - if(!PyArg_ParseTuple(args,":wxResourceClear")) - return NULL; - wxResourceClear(); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxResourceCreateBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - char * _arg0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxResourceCreateBitmap",&_arg0)) - return NULL; - _result = (wxBitmap *)wxResourceCreateBitmap(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxResourceCreateIcon(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIcon * _result; - char * _arg0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxResourceCreateIcon",&_arg0)) - return NULL; - _result = (wxIcon *)wxResourceCreateIcon(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIcon_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxResourceCreateMenuBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuBar * _result; - char * _arg0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxResourceCreateMenuBar",&_arg0)) - return NULL; - _result = (wxMenuBar *)wxResourceCreateMenuBar(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxResourceGetIdentifier(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - char * _arg0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxResourceGetIdentifier",&_arg0)) - return NULL; - _result = (int )wxResourceGetIdentifier(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceParseData(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - char * _arg0; - wxResourceTable * _arg1 = NULL; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|s:wxResourceParseData",&_arg0,&_argc1)) - return NULL; - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxResourceTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseData. Expected _wxResourceTable_p."); - return NULL; - } - } - _result = (bool )wxResourceParseData(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceParseFile(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - char * _arg0; - wxResourceTable * _arg1 = NULL; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|s:wxResourceParseFile",&_arg0,&_argc1)) - return NULL; - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxResourceTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseFile. Expected _wxResourceTable_p."); - return NULL; - } - } - _result = (bool )wxResourceParseFile(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceParseString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - char * _arg0; - wxResourceTable * _arg1 = NULL; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|s:wxResourceParseString",&_arg0,&_argc1)) - return NULL; - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxResourceTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseString. Expected _wxResourceTable_p."); - return NULL; - } - } - _result = (bool )wxResourceParseString(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSize_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) -static PyObject *_wrap_wxSize_width_set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxSize * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxSize_width_set",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSize_width_set. Expected _wxSize_p."); - return NULL; - } - } - _result = (long )wxSize_x_set(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxSize_x_get(_swigobj) ((long ) _swigobj->x) -static PyObject *_wrap_wxSize_width_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxSize * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSize_width_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSize_width_get. Expected _wxSize_p."); - return NULL; - } - } - _result = (long )wxSize_x_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxSize_y_set(_swigobj,_swigval) (_swigobj->y = _swigval,_swigval) -static PyObject *_wrap_wxSize_height_set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxSize * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxSize_height_set",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSize_height_set. Expected _wxSize_p."); - return NULL; - } - } - _result = (long )wxSize_y_set(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxSize_y_get(_swigobj) ((long ) _swigobj->y) -static PyObject *_wrap_wxSize_height_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxSize * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSize_height_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSize_height_get. Expected _wxSize_p."); - return NULL; - } - } - _result = (long )wxSize_y_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define new_wxSize(_swigarg0,_swigarg1) (new wxSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSize * _result; - long _arg0 = 0; - long _arg1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"|ll:new_wxSize",&_arg0,&_arg1)) - return NULL; - _result = (wxSize *)new_wxSize(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxSize_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxSize(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSize * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxSize. Expected _wxSize_p."); - return NULL; - } - } - delete_wxSize(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSize_Set(_swigobj,_swigarg0,_swigarg1) (_swigobj->Set(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxSize_Set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSize * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxSize_Set",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSize_Set. Expected _wxSize_p."); - return NULL; - } - } - wxSize_Set(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSize_GetWidth(_swigobj) (_swigobj->GetX()) -static PyObject *_wrap_wxSize_GetWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxSize * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSize_GetWidth",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSize_GetWidth. Expected _wxSize_p."); - return NULL; - } - } - _result = (long )wxSize_GetWidth(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxSize_GetHeight(_swigobj) (_swigobj->GetY()) -static PyObject *_wrap_wxSize_GetHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxSize * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSize_GetHeight",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSize_GetHeight. Expected _wxSize_p."); - return NULL; - } - } - _result = (long )wxSize_GetHeight(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -static PyObject * wxSize___str__(wxSize *self) { - PyObject* tup = PyTuple_New(2); - PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x)); - PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y)); - return tup; - } -static PyObject *_wrap_wxSize___str__(PyObject *self, PyObject *args) { - PyObject * _resultobj; - PyObject * _result; - wxSize * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxSize___str__",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSize___str__. Expected _wxSize_p."); - return NULL; - } - } - _result = (PyObject *)wxSize___str__(_arg0); -{ - _resultobj = _result; -} - return _resultobj; -} - -#define wxRealPoint_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) -static PyObject *_wrap_wxRealPoint_x_set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - double _result; - wxRealPoint * _arg0; - double _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sd:wxRealPoint_x_set",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRealPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRealPoint_x_set. Expected _wxRealPoint_p."); - return NULL; - } - } - _result = (double )wxRealPoint_x_set(_arg0,_arg1); - _resultobj = Py_BuildValue("d",_result); - return _resultobj; -} - -#define wxRealPoint_x_get(_swigobj) ((double ) _swigobj->x) -static PyObject *_wrap_wxRealPoint_x_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - double _result; - wxRealPoint * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRealPoint_x_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRealPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRealPoint_x_get. Expected _wxRealPoint_p."); - return NULL; - } - } - _result = (double )wxRealPoint_x_get(_arg0); - _resultobj = Py_BuildValue("d",_result); - return _resultobj; -} - -#define wxRealPoint_y_set(_swigobj,_swigval) (_swigobj->y = _swigval,_swigval) -static PyObject *_wrap_wxRealPoint_y_set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - double _result; - wxRealPoint * _arg0; - double _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sd:wxRealPoint_y_set",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRealPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRealPoint_y_set. Expected _wxRealPoint_p."); - return NULL; - } - } - _result = (double )wxRealPoint_y_set(_arg0,_arg1); - _resultobj = Py_BuildValue("d",_result); - return _resultobj; -} - -#define wxRealPoint_y_get(_swigobj) ((double ) _swigobj->y) -static PyObject *_wrap_wxRealPoint_y_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - double _result; - wxRealPoint * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRealPoint_y_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRealPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRealPoint_y_get. Expected _wxRealPoint_p."); - return NULL; - } - } - _result = (double )wxRealPoint_y_get(_arg0); - _resultobj = Py_BuildValue("d",_result); - return _resultobj; -} - -#define new_wxRealPoint(_swigarg0,_swigarg1) (new wxRealPoint(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxRealPoint(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRealPoint * _result; - double _arg0 = 0.0; - double _arg1 = 0.0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"|dd:new_wxRealPoint",&_arg0,&_arg1)) - return NULL; - _result = (wxRealPoint *)new_wxRealPoint(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxRealPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxRealPoint(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxRealPoint(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRealPoint * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxRealPoint",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRealPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxRealPoint. Expected _wxRealPoint_p."); - return NULL; - } - } - delete_wxRealPoint(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPoint_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) -static PyObject *_wrap_wxPoint_x_set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxPoint * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxPoint_x_set",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPoint_x_set. Expected _wxPoint_p."); - return NULL; - } - } - _result = (long )wxPoint_x_set(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxPoint_x_get(_swigobj) ((long ) _swigobj->x) -static PyObject *_wrap_wxPoint_x_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxPoint * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPoint_x_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPoint_x_get. Expected _wxPoint_p."); - return NULL; - } - } - _result = (long )wxPoint_x_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxPoint_y_set(_swigobj,_swigval) (_swigobj->y = _swigval,_swigval) -static PyObject *_wrap_wxPoint_y_set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxPoint * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxPoint_y_set",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPoint_y_set. Expected _wxPoint_p."); - return NULL; - } - } - _result = (long )wxPoint_y_set(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxPoint_y_get(_swigobj) ((long ) _swigobj->y) -static PyObject *_wrap_wxPoint_y_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxPoint * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPoint_y_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPoint_y_get. Expected _wxPoint_p."); - return NULL; - } - } - _result = (long )wxPoint_y_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define new_wxPoint(_swigarg0,_swigarg1) (new wxPoint(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxPoint(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - long _arg0 = 0; - long _arg1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"|ll:new_wxPoint",&_arg0,&_arg1)) - return NULL; - _result = (wxPoint *)new_wxPoint(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxPoint(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxPoint(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxPoint",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPoint. Expected _wxPoint_p."); - return NULL; - } - } - delete_wxPoint(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void wxPoint_Set(wxPoint *self,long x,long y) { - self->x = x; - self->y = y; - } -static PyObject *_wrap_wxPoint_Set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _arg0; - long _arg1; - long _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sll:wxPoint_Set",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPoint_Set. Expected _wxPoint_p."); - return NULL; - } - } - wxPoint_Set(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject * wxPoint___str__(wxPoint *self) { - PyObject* tup = PyTuple_New(2); - PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x)); - PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y)); - return tup; - } -static PyObject *_wrap_wxPoint___str__(PyObject *self, PyObject *args) { - PyObject * _resultobj; - PyObject * _result; - wxPoint * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPoint___str__",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPoint___str__. Expected _wxPoint_p."); - return NULL; - } - } - _result = (PyObject *)wxPoint___str__(_arg0); -{ - _resultobj = _result; -} - return _resultobj; -} - -#define new_wxRect(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxRect(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_new_wxRect(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRect * _result; - long _arg0 = 0; - long _arg1 = 0; - long _arg2 = 0; - long _arg3 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"|llll:new_wxRect",&_arg0,&_arg1,&_arg2,&_arg3)) - return NULL; - _result = (wxRect *)new_wxRect(_arg0,_arg1,_arg2,_arg3); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxRect_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxRect(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxRect(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxRect",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxRect. Expected _wxRect_p."); - return NULL; - } - } - delete_wxRect(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxRect_GetX(_swigobj) (_swigobj->GetX()) -static PyObject *_wrap_wxRect_GetX(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_GetX",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_GetX. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_GetX(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_SetX(_swigobj,_swigarg0) (_swigobj->SetX(_swigarg0)) -static PyObject *_wrap_wxRect_SetX(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRect * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxRect_SetX",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_SetX. Expected _wxRect_p."); - return NULL; - } - } - wxRect_SetX(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxRect_GetY(_swigobj) (_swigobj->GetY()) -static PyObject *_wrap_wxRect_GetY(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_GetY",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_GetY. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_GetY(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_SetY(_swigobj,_swigarg0) (_swigobj->SetY(_swigarg0)) -static PyObject *_wrap_wxRect_SetY(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRect * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxRect_SetY",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_SetY. Expected _wxRect_p."); - return NULL; - } - } - wxRect_SetY(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxRect_GetWidth(_swigobj) (_swigobj->GetWidth()) -static PyObject *_wrap_wxRect_GetWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_GetWidth",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_GetWidth. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_GetWidth(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_SetWidth(_swigobj,_swigarg0) (_swigobj->SetWidth(_swigarg0)) -static PyObject *_wrap_wxRect_SetWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRect * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxRect_SetWidth",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_SetWidth. Expected _wxRect_p."); - return NULL; - } - } - wxRect_SetWidth(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxRect_GetHeight(_swigobj) (_swigobj->GetHeight()) -static PyObject *_wrap_wxRect_GetHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_GetHeight",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_GetHeight. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_GetHeight(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_SetHeight(_swigobj,_swigarg0) (_swigobj->SetHeight(_swigarg0)) -static PyObject *_wrap_wxRect_SetHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRect * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxRect_SetHeight",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_SetHeight. Expected _wxRect_p."); - return NULL; - } - } - wxRect_SetHeight(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxRect_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxRect_GetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPoint * _result; - wxRect * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_GetPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_GetPosition. Expected _wxRect_p."); - return NULL; - } - } - _result = new wxPoint (wxRect_GetPosition(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxRect_GetSize(_swigobj) (_swigobj->GetSize()) -static PyObject *_wrap_wxRect_GetSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSize * _result; - wxRect * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_GetSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_GetSize. Expected _wxRect_p."); - return NULL; - } - } - _result = new wxSize (wxRect_GetSize(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxRect_GetLeft(_swigobj) (_swigobj->GetLeft()) -static PyObject *_wrap_wxRect_GetLeft(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_GetLeft",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_GetLeft. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_GetLeft(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_GetTop(_swigobj) (_swigobj->GetTop()) -static PyObject *_wrap_wxRect_GetTop(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_GetTop",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_GetTop. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_GetTop(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_GetBottom(_swigobj) (_swigobj->GetBottom()) -static PyObject *_wrap_wxRect_GetBottom(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_GetBottom",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_GetBottom. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_GetBottom(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_GetRight(_swigobj) (_swigobj->GetRight()) -static PyObject *_wrap_wxRect_GetRight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_GetRight",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_GetRight. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_GetRight(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) -static PyObject *_wrap_wxRect_x_set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxRect_x_set",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_x_set. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_x_set(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_x_get(_swigobj) ((long ) _swigobj->x) -static PyObject *_wrap_wxRect_x_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_x_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_x_get. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_x_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_y_set(_swigobj,_swigval) (_swigobj->y = _swigval,_swigval) -static PyObject *_wrap_wxRect_y_set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxRect_y_set",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_y_set. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_y_set(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_y_get(_swigobj) ((long ) _swigobj->y) -static PyObject *_wrap_wxRect_y_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_y_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_y_get. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_y_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_width_set(_swigobj,_swigval) (_swigobj->width = _swigval,_swigval) -static PyObject *_wrap_wxRect_width_set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxRect_width_set",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_width_set. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_width_set(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_width_get(_swigobj) ((long ) _swigobj->width) -static PyObject *_wrap_wxRect_width_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_width_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_width_get. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_width_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_height_set(_swigobj,_swigval) (_swigobj->height = _swigval,_swigval) -static PyObject *_wrap_wxRect_height_set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - long _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxRect_height_set",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_height_set. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_height_set(_arg0,_arg1); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRect_height_get(_swigobj) ((long ) _swigobj->height) -static PyObject *_wrap_wxRect_height_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxRect * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxRect_height_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRect_height_get. Expected _wxRect_p."); - return NULL; - } - } - _result = (long )wxRect_height_get(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define new_wxPyTimer(_swigarg0) (new wxPyTimer(_swigarg0)) -static PyObject *_wrap_new_wxPyTimer(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyTimer * _result; - PyObject * _arg0; - PyObject * _obj0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"O:new_wxPyTimer",&_obj0)) - return NULL; -{ - _arg0 = _obj0; -} - _result = (wxPyTimer *)new_wxPyTimer(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyTimer_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define delete_wxPyTimer(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxPyTimer(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyTimer * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxPyTimer",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyTimer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPyTimer. Expected _wxPyTimer_p."); - return NULL; - } - } - delete_wxPyTimer(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyTimer_Interval(_swigobj) (_swigobj->Interval()) -static PyObject *_wrap_wxPyTimer_Interval(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPyTimer * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyTimer_Interval",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyTimer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_Interval. Expected _wxPyTimer_p."); - return NULL; - } - } - _result = (int )wxPyTimer_Interval(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyTimer_Start(_swigobj,_swigarg0,_swigarg1) (_swigobj->Start(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxPyTimer_Start(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyTimer * _arg0; - int _arg1 = -1; - int _arg2 = (0); - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|ii:wxPyTimer_Start",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyTimer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_Start. Expected _wxPyTimer_p."); - return NULL; - } - } - wxPyTimer_Start(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyTimer_Stop(_swigobj) (_swigobj->Stop()) -static PyObject *_wrap_wxPyTimer_Stop(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyTimer * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyTimer_Stop",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyTimer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_Stop. Expected _wxPyTimer_p."); - return NULL; - } - } - wxPyTimer_Stop(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIndividualLayoutConstraint_Above(_swigobj,_swigarg0,_swigarg1) (_swigobj->Above(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxIndividualLayoutConstraint_Above(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _arg0; - wxWindow * _arg1; - int _arg2 = 0; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss|i:wxIndividualLayoutConstraint_Above",&_argc0,&_argc1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIndividualLayoutConstraint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIndividualLayoutConstraint_Above. Expected _wxIndividualLayoutConstraint_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxIndividualLayoutConstraint_Above. Expected _wxWindow_p."); - return NULL; - } - } - wxIndividualLayoutConstraint_Above(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIndividualLayoutConstraint_Absolute(_swigobj,_swigarg0) (_swigobj->Absolute(_swigarg0)) -static PyObject *_wrap_wxIndividualLayoutConstraint_Absolute(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxIndividualLayoutConstraint_Absolute",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIndividualLayoutConstraint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIndividualLayoutConstraint_Absolute. Expected _wxIndividualLayoutConstraint_p."); - return NULL; - } - } - wxIndividualLayoutConstraint_Absolute(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIndividualLayoutConstraint_AsIs(_swigobj) (_swigobj->AsIs()) -static PyObject *_wrap_wxIndividualLayoutConstraint_AsIs(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxIndividualLayoutConstraint_AsIs",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIndividualLayoutConstraint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIndividualLayoutConstraint_AsIs. Expected _wxIndividualLayoutConstraint_p."); - return NULL; - } - } - wxIndividualLayoutConstraint_AsIs(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIndividualLayoutConstraint_Below(_swigobj,_swigarg0,_swigarg1) (_swigobj->Below(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxIndividualLayoutConstraint_Below(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _arg0; - wxWindow * _arg1; - int _arg2 = 0; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss|i:wxIndividualLayoutConstraint_Below",&_argc0,&_argc1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIndividualLayoutConstraint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIndividualLayoutConstraint_Below. Expected _wxIndividualLayoutConstraint_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxIndividualLayoutConstraint_Below. Expected _wxWindow_p."); - return NULL; - } - } - wxIndividualLayoutConstraint_Below(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIndividualLayoutConstraint_Unconstrained(_swigobj) (_swigobj->Unconstrained()) -static PyObject *_wrap_wxIndividualLayoutConstraint_Unconstrained(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxIndividualLayoutConstraint_Unconstrained",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIndividualLayoutConstraint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIndividualLayoutConstraint_Unconstrained. Expected _wxIndividualLayoutConstraint_p."); - return NULL; - } - } - wxIndividualLayoutConstraint_Unconstrained(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIndividualLayoutConstraint_LeftOf(_swigobj,_swigarg0,_swigarg1) (_swigobj->LeftOf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxIndividualLayoutConstraint_LeftOf(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _arg0; - wxWindow * _arg1; - int _arg2 = 0; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss|i:wxIndividualLayoutConstraint_LeftOf",&_argc0,&_argc1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIndividualLayoutConstraint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIndividualLayoutConstraint_LeftOf. Expected _wxIndividualLayoutConstraint_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxIndividualLayoutConstraint_LeftOf. Expected _wxWindow_p."); - return NULL; - } - } - wxIndividualLayoutConstraint_LeftOf(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIndividualLayoutConstraint_PercentOf(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->PercentOf(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxIndividualLayoutConstraint_PercentOf(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _arg0; - wxWindow * _arg1; - wxEdge _arg2; - int _arg3; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ssii:wxIndividualLayoutConstraint_PercentOf",&_argc0,&_argc1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIndividualLayoutConstraint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIndividualLayoutConstraint_PercentOf. Expected _wxIndividualLayoutConstraint_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxIndividualLayoutConstraint_PercentOf. Expected _wxWindow_p."); - return NULL; - } - } - wxIndividualLayoutConstraint_PercentOf(_arg0,_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIndividualLayoutConstraint_RightOf(_swigobj,_swigarg0,_swigarg1) (_swigobj->RightOf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxIndividualLayoutConstraint_RightOf(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _arg0; - wxWindow * _arg1; - int _arg2 = 0; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss|i:wxIndividualLayoutConstraint_RightOf",&_argc0,&_argc1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIndividualLayoutConstraint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIndividualLayoutConstraint_RightOf. Expected _wxIndividualLayoutConstraint_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxIndividualLayoutConstraint_RightOf. Expected _wxWindow_p."); - return NULL; - } - } - wxIndividualLayoutConstraint_RightOf(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIndividualLayoutConstraint_SameAs(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SameAs(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxIndividualLayoutConstraint_SameAs(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _arg0; - wxWindow * _arg1; - wxEdge _arg2; - int _arg3 = 0; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ssi|i:wxIndividualLayoutConstraint_SameAs",&_argc0,&_argc1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIndividualLayoutConstraint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIndividualLayoutConstraint_SameAs. Expected _wxIndividualLayoutConstraint_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxIndividualLayoutConstraint_SameAs. Expected _wxWindow_p."); - return NULL; - } - } - wxIndividualLayoutConstraint_SameAs(_arg0,_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxIndividualLayoutConstraint_Set(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->Set(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_wxIndividualLayoutConstraint_Set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _arg0; - wxRelationship _arg1; - wxWindow * _arg2; - wxEdge _arg3; - int _arg4 = 0; - int _arg5 = 0; - char * _argc0 = 0; - char * _argc2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sisi|ii:wxIndividualLayoutConstraint_Set",&_argc0,&_arg1,&_argc2,&_arg3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIndividualLayoutConstraint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIndividualLayoutConstraint_Set. Expected _wxIndividualLayoutConstraint_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxIndividualLayoutConstraint_Set. Expected _wxWindow_p."); - return NULL; - } - } - wxIndividualLayoutConstraint_Set(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define new_wxLayoutConstraints() (new wxLayoutConstraints()) -static PyObject *_wrap_new_wxLayoutConstraints(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxLayoutConstraints * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxLayoutConstraints")) - return NULL; - _result = (wxLayoutConstraints *)new_wxLayoutConstraints(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxLayoutConstraints_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxLayoutConstraints_bottom_get(_swigobj) (&_swigobj->bottom) -static PyObject *_wrap_wxLayoutConstraints_bottom_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _result; - wxLayoutConstraints * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxLayoutConstraints_bottom_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxLayoutConstraints_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLayoutConstraints_bottom_get. Expected _wxLayoutConstraints_p."); - return NULL; - } - } - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_bottom_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxLayoutConstraints_centreX_get(_swigobj) (&_swigobj->centreX) -static PyObject *_wrap_wxLayoutConstraints_centreX_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _result; - wxLayoutConstraints * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxLayoutConstraints_centreX_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxLayoutConstraints_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLayoutConstraints_centreX_get. Expected _wxLayoutConstraints_p."); - return NULL; - } - } - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_centreX_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxLayoutConstraints_centreY_get(_swigobj) (&_swigobj->centreY) -static PyObject *_wrap_wxLayoutConstraints_centreY_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _result; - wxLayoutConstraints * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxLayoutConstraints_centreY_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxLayoutConstraints_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLayoutConstraints_centreY_get. Expected _wxLayoutConstraints_p."); - return NULL; - } - } - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_centreY_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxLayoutConstraints_height_get(_swigobj) (&_swigobj->height) -static PyObject *_wrap_wxLayoutConstraints_height_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _result; - wxLayoutConstraints * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxLayoutConstraints_height_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxLayoutConstraints_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLayoutConstraints_height_get. Expected _wxLayoutConstraints_p."); - return NULL; - } - } - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_height_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxLayoutConstraints_left_get(_swigobj) (&_swigobj->left) -static PyObject *_wrap_wxLayoutConstraints_left_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _result; - wxLayoutConstraints * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxLayoutConstraints_left_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxLayoutConstraints_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLayoutConstraints_left_get. Expected _wxLayoutConstraints_p."); - return NULL; - } - } - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_left_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxLayoutConstraints_right_get(_swigobj) (&_swigobj->right) -static PyObject *_wrap_wxLayoutConstraints_right_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _result; - wxLayoutConstraints * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxLayoutConstraints_right_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxLayoutConstraints_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLayoutConstraints_right_get. Expected _wxLayoutConstraints_p."); - return NULL; - } - } - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_right_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxLayoutConstraints_top_get(_swigobj) (&_swigobj->top) -static PyObject *_wrap_wxLayoutConstraints_top_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _result; - wxLayoutConstraints * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxLayoutConstraints_top_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxLayoutConstraints_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLayoutConstraints_top_get. Expected _wxLayoutConstraints_p."); - return NULL; - } - } - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_top_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxLayoutConstraints_width_get(_swigobj) (&_swigobj->width) -static PyObject *_wrap_wxLayoutConstraints_width_get(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxIndividualLayoutConstraint * _result; - wxLayoutConstraints * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxLayoutConstraints_width_get",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxLayoutConstraints_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLayoutConstraints_width_get. Expected _wxLayoutConstraints_p."); - return NULL; - } - } - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_width_get(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define new_wxAcceleratorEntry(_swigarg0,_swigarg1,_swigarg2) (new wxAcceleratorEntry(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_new_wxAcceleratorEntry(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxAcceleratorEntry * _result; - int _arg0 = 0; - int _arg1 = 0; - int _arg2 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"|iii:new_wxAcceleratorEntry",&_arg0,&_arg1,&_arg2)) - return NULL; - _result = (wxAcceleratorEntry *)new_wxAcceleratorEntry(_arg0,_arg1,_arg2); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxAcceleratorEntry_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxAcceleratorEntry_Set(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Set(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxAcceleratorEntry_Set(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxAcceleratorEntry * _arg0; - int _arg1; - int _arg2; - int _arg3; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siii:wxAcceleratorEntry_Set",&_argc0,&_arg1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxAcceleratorEntry_Set. Expected _wxAcceleratorEntry_p."); - return NULL; - } - } - wxAcceleratorEntry_Set(_arg0,_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxAcceleratorEntry_GetFlags(_swigobj) (_swigobj->GetFlags()) -static PyObject *_wrap_wxAcceleratorEntry_GetFlags(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxAcceleratorEntry * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxAcceleratorEntry_GetFlags",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxAcceleratorEntry_GetFlags. Expected _wxAcceleratorEntry_p."); - return NULL; - } - } - _result = (int )wxAcceleratorEntry_GetFlags(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxAcceleratorEntry_GetKeyCode(_swigobj) (_swigobj->GetKeyCode()) -static PyObject *_wrap_wxAcceleratorEntry_GetKeyCode(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxAcceleratorEntry * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxAcceleratorEntry_GetKeyCode",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxAcceleratorEntry_GetKeyCode. Expected _wxAcceleratorEntry_p."); - return NULL; - } - } - _result = (int )wxAcceleratorEntry_GetKeyCode(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxAcceleratorEntry_GetCommand(_swigobj) (_swigobj->GetCommand()) -static PyObject *_wrap_wxAcceleratorEntry_GetCommand(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxAcceleratorEntry * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxAcceleratorEntry_GetCommand",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxAcceleratorEntry_GetCommand. Expected _wxAcceleratorEntry_p."); - return NULL; - } - } - _result = (int )wxAcceleratorEntry_GetCommand(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define new_wxAcceleratorTable(_swigarg0,_swigarg1) (new wxAcceleratorTable(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxAcceleratorTable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxAcceleratorTable * _result; - int _arg0; - wxAcceleratorEntry * _arg1; - PyObject * _obj1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"O:new_wxAcceleratorTable",&_obj1)) - return NULL; - if (_obj1) -{ - _arg1 = wxAcceleratorEntry_LIST_helper(_obj1); - if (_arg1 == NULL) { - return NULL; - } -} -{ - _arg0 = PyList_Size(_obj1); -} - _result = (wxAcceleratorTable *)new_wxAcceleratorTable(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxAcceleratorTable_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - delete [] _arg1; -} - return _resultobj; -} - -static PyMethodDef misccMethods[] = { - { "new_wxAcceleratorTable", _wrap_new_wxAcceleratorTable, 1 }, - { "wxAcceleratorEntry_GetCommand", _wrap_wxAcceleratorEntry_GetCommand, 1 }, - { "wxAcceleratorEntry_GetKeyCode", _wrap_wxAcceleratorEntry_GetKeyCode, 1 }, - { "wxAcceleratorEntry_GetFlags", _wrap_wxAcceleratorEntry_GetFlags, 1 }, - { "wxAcceleratorEntry_Set", _wrap_wxAcceleratorEntry_Set, 1 }, - { "new_wxAcceleratorEntry", _wrap_new_wxAcceleratorEntry, 1 }, - { "wxLayoutConstraints_width_get", _wrap_wxLayoutConstraints_width_get, 1 }, - { "wxLayoutConstraints_top_get", _wrap_wxLayoutConstraints_top_get, 1 }, - { "wxLayoutConstraints_right_get", _wrap_wxLayoutConstraints_right_get, 1 }, - { "wxLayoutConstraints_left_get", _wrap_wxLayoutConstraints_left_get, 1 }, - { "wxLayoutConstraints_height_get", _wrap_wxLayoutConstraints_height_get, 1 }, - { "wxLayoutConstraints_centreY_get", _wrap_wxLayoutConstraints_centreY_get, 1 }, - { "wxLayoutConstraints_centreX_get", _wrap_wxLayoutConstraints_centreX_get, 1 }, - { "wxLayoutConstraints_bottom_get", _wrap_wxLayoutConstraints_bottom_get, 1 }, - { "new_wxLayoutConstraints", _wrap_new_wxLayoutConstraints, 1 }, - { "wxIndividualLayoutConstraint_Set", _wrap_wxIndividualLayoutConstraint_Set, 1 }, - { "wxIndividualLayoutConstraint_SameAs", _wrap_wxIndividualLayoutConstraint_SameAs, 1 }, - { "wxIndividualLayoutConstraint_RightOf", _wrap_wxIndividualLayoutConstraint_RightOf, 1 }, - { "wxIndividualLayoutConstraint_PercentOf", _wrap_wxIndividualLayoutConstraint_PercentOf, 1 }, - { "wxIndividualLayoutConstraint_LeftOf", _wrap_wxIndividualLayoutConstraint_LeftOf, 1 }, - { "wxIndividualLayoutConstraint_Unconstrained", _wrap_wxIndividualLayoutConstraint_Unconstrained, 1 }, - { "wxIndividualLayoutConstraint_Below", _wrap_wxIndividualLayoutConstraint_Below, 1 }, - { "wxIndividualLayoutConstraint_AsIs", _wrap_wxIndividualLayoutConstraint_AsIs, 1 }, - { "wxIndividualLayoutConstraint_Absolute", _wrap_wxIndividualLayoutConstraint_Absolute, 1 }, - { "wxIndividualLayoutConstraint_Above", _wrap_wxIndividualLayoutConstraint_Above, 1 }, - { "wxPyTimer_Stop", _wrap_wxPyTimer_Stop, 1 }, - { "wxPyTimer_Start", _wrap_wxPyTimer_Start, 1 }, - { "wxPyTimer_Interval", _wrap_wxPyTimer_Interval, 1 }, - { "delete_wxPyTimer", _wrap_delete_wxPyTimer, 1 }, - { "new_wxPyTimer", _wrap_new_wxPyTimer, 1 }, - { "wxRect_height_get", _wrap_wxRect_height_get, 1 }, - { "wxRect_height_set", _wrap_wxRect_height_set, 1 }, - { "wxRect_width_get", _wrap_wxRect_width_get, 1 }, - { "wxRect_width_set", _wrap_wxRect_width_set, 1 }, - { "wxRect_y_get", _wrap_wxRect_y_get, 1 }, - { "wxRect_y_set", _wrap_wxRect_y_set, 1 }, - { "wxRect_x_get", _wrap_wxRect_x_get, 1 }, - { "wxRect_x_set", _wrap_wxRect_x_set, 1 }, - { "wxRect_GetRight", _wrap_wxRect_GetRight, 1 }, - { "wxRect_GetBottom", _wrap_wxRect_GetBottom, 1 }, - { "wxRect_GetTop", _wrap_wxRect_GetTop, 1 }, - { "wxRect_GetLeft", _wrap_wxRect_GetLeft, 1 }, - { "wxRect_GetSize", _wrap_wxRect_GetSize, 1 }, - { "wxRect_GetPosition", _wrap_wxRect_GetPosition, 1 }, - { "wxRect_SetHeight", _wrap_wxRect_SetHeight, 1 }, - { "wxRect_GetHeight", _wrap_wxRect_GetHeight, 1 }, - { "wxRect_SetWidth", _wrap_wxRect_SetWidth, 1 }, - { "wxRect_GetWidth", _wrap_wxRect_GetWidth, 1 }, - { "wxRect_SetY", _wrap_wxRect_SetY, 1 }, - { "wxRect_GetY", _wrap_wxRect_GetY, 1 }, - { "wxRect_SetX", _wrap_wxRect_SetX, 1 }, - { "wxRect_GetX", _wrap_wxRect_GetX, 1 }, - { "delete_wxRect", _wrap_delete_wxRect, 1 }, - { "new_wxRect", _wrap_new_wxRect, 1 }, - { "wxPoint___str__", _wrap_wxPoint___str__, 1 }, - { "wxPoint_Set", _wrap_wxPoint_Set, 1 }, - { "delete_wxPoint", _wrap_delete_wxPoint, 1 }, - { "new_wxPoint", _wrap_new_wxPoint, 1 }, - { "wxPoint_y_get", _wrap_wxPoint_y_get, 1 }, - { "wxPoint_y_set", _wrap_wxPoint_y_set, 1 }, - { "wxPoint_x_get", _wrap_wxPoint_x_get, 1 }, - { "wxPoint_x_set", _wrap_wxPoint_x_set, 1 }, - { "delete_wxRealPoint", _wrap_delete_wxRealPoint, 1 }, - { "new_wxRealPoint", _wrap_new_wxRealPoint, 1 }, - { "wxRealPoint_y_get", _wrap_wxRealPoint_y_get, 1 }, - { "wxRealPoint_y_set", _wrap_wxRealPoint_y_set, 1 }, - { "wxRealPoint_x_get", _wrap_wxRealPoint_x_get, 1 }, - { "wxRealPoint_x_set", _wrap_wxRealPoint_x_set, 1 }, - { "wxSize___str__", _wrap_wxSize___str__, 1 }, - { "wxSize_GetHeight", _wrap_wxSize_GetHeight, 1 }, - { "wxSize_GetWidth", _wrap_wxSize_GetWidth, 1 }, - { "wxSize_Set", _wrap_wxSize_Set, 1 }, - { "delete_wxSize", _wrap_delete_wxSize, 1 }, - { "new_wxSize", _wrap_new_wxSize, 1 }, - { "wxSize_height_get", _wrap_wxSize_height_get, 1 }, - { "wxSize_height_set", _wrap_wxSize_height_set, 1 }, - { "wxSize_width_get", _wrap_wxSize_width_get, 1 }, - { "wxSize_width_set", _wrap_wxSize_width_set, 1 }, - { "wxResourceParseString", _wrap_wxResourceParseString, 1 }, - { "wxResourceParseFile", _wrap_wxResourceParseFile, 1 }, - { "wxResourceParseData", _wrap_wxResourceParseData, 1 }, - { "wxResourceGetIdentifier", _wrap_wxResourceGetIdentifier, 1 }, - { "wxResourceCreateMenuBar", _wrap_wxResourceCreateMenuBar, 1 }, - { "wxResourceCreateIcon", _wrap_wxResourceCreateIcon, 1 }, - { "wxResourceCreateBitmap", _wrap_wxResourceCreateBitmap, 1 }, - { "wxResourceClear", _wrap_wxResourceClear, 1 }, - { "wxResourceAddIdentifier", _wrap_wxResourceAddIdentifier, 1 }, - { "wxGetResource", _wrap_wxGetResource, 1 }, - { "wxYield", _wrap_wxYield, 1 }, - { "wxGetOsVersion", _wrap_wxGetOsVersion, 1 }, - { "wxStartTimer", _wrap_wxStartTimer, 1 }, - { "wxShell", _wrap_wxShell, 1 }, - { "wxNow", _wrap_wxNow, 1 }, - { "wxIsBusy", _wrap_wxIsBusy, 1 }, - { "wxGetMousePosition", _wrap_wxGetMousePosition, 1 }, - { "wxGetFreeMemory", _wrap_wxGetFreeMemory, 1 }, - { "wxGetElapsedTime", _wrap_wxGetElapsedTime, 1 }, - { "wxGetActiveWindow", _wrap_wxGetActiveWindow, 1 }, - { "wxFindWindowByName", _wrap_wxFindWindowByName, 1 }, - { "wxFindWindowByLabel", _wrap_wxFindWindowByLabel, 1 }, - { "wxExecute", _wrap_wxExecute, 1 }, - { "wxEndBusyCursor", _wrap_wxEndBusyCursor, 1 }, - { "wxDisplaySize", _wrap_wxDisplaySize, 1 }, - { "wxBell", _wrap_wxBell, 1 }, - { "wxBeginBusyCursor", _wrap_wxBeginBusyCursor, 1 }, - { "RegisterId", _wrap_RegisterId, 1 }, - { "NewId", _wrap_NewId, 1 }, - { "wxSetCursor", _wrap_wxSetCursor, 1 }, - { "wxDisplayDepth", _wrap_wxDisplayDepth, 1 }, - { "wxColourDisplay", _wrap_wxColourDisplay, 1 }, - { "wxMessageBox", _wrap_wxMessageBox, 1 }, - { "wxGetSingleChoiceIndex", _wrap_wxGetSingleChoiceIndex, 1 }, - { "wxGetSingleChoice", _wrap_wxGetSingleChoice, 1 }, - { "wxGetTextFromUser", _wrap_wxGetTextFromUser, 1 }, - { "wxFileSelector", _wrap_wxFileSelector, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initmiscc)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("miscc", misccMethods); - d = PyModule_GetDict(m); - PyDict_SetItemString(d,"wxLeft", PyInt_FromLong((long) wxLeft)); - PyDict_SetItemString(d,"wxTop", PyInt_FromLong((long) wxTop)); - PyDict_SetItemString(d,"wxRight", PyInt_FromLong((long) wxRight)); - PyDict_SetItemString(d,"wxBottom", PyInt_FromLong((long) wxBottom)); - PyDict_SetItemString(d,"wxWidth", PyInt_FromLong((long) wxWidth)); - PyDict_SetItemString(d,"wxHeight", PyInt_FromLong((long) wxHeight)); - PyDict_SetItemString(d,"wxCentre", PyInt_FromLong((long) wxCentre)); - PyDict_SetItemString(d,"wxCenter", PyInt_FromLong((long) wxCenter)); - PyDict_SetItemString(d,"wxCentreX", PyInt_FromLong((long) wxCentreX)); - PyDict_SetItemString(d,"wxCentreY", PyInt_FromLong((long) wxCentreY)); - PyDict_SetItemString(d,"wxUnconstrained", PyInt_FromLong((long) wxUnconstrained)); - PyDict_SetItemString(d,"wxAsIs", PyInt_FromLong((long) wxAsIs)); - PyDict_SetItemString(d,"wxPercentOf", PyInt_FromLong((long) wxPercentOf)); - PyDict_SetItemString(d,"wxAbove", PyInt_FromLong((long) wxAbove)); - PyDict_SetItemString(d,"wxBelow", PyInt_FromLong((long) wxBelow)); - PyDict_SetItemString(d,"wxLeftOf", PyInt_FromLong((long) wxLeftOf)); - PyDict_SetItemString(d,"wxRightOf", PyInt_FromLong((long) wxRightOf)); - PyDict_SetItemString(d,"wxSameAs", PyInt_FromLong((long) wxSameAs)); - PyDict_SetItemString(d,"wxAbsolute", PyInt_FromLong((long) wxAbsolute)); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_wxAcceleratorTable","_class_wxAcceleratorTable",0); - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_class_wxAcceleratorTable","_wxAcceleratorTable",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_wxAcceleratorEntry","_class_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_class_wxAcceleratorEntry","_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); -} diff --git a/utils/wxPython/src/msw/misc.py b/utils/wxPython/src/msw/misc.py deleted file mode 100644 index b410c28bf0..0000000000 --- a/utils/wxPython/src/msw/misc.py +++ /dev/null @@ -1,532 +0,0 @@ -# This file was created automatically by SWIG. -import miscc -class wxSizePtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - miscc.delete_wxSize(self.this) - def Set(self,arg0,arg1): - val = miscc.wxSize_Set(self.this,arg0,arg1) - return val - def GetWidth(self): - val = miscc.wxSize_GetWidth(self.this) - return val - def GetHeight(self): - val = miscc.wxSize_GetHeight(self.this) - return val - def __str__(self): - val = miscc.wxSize___str__(self.this) - return val - def __setattr__(self,name,value): - if name == "width" : - miscc.wxSize_width_set(self.this,value) - return - if name == "height" : - miscc.wxSize_height_set(self.this,value) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "width" : - return miscc.wxSize_width_get(self.this) - if name == "height" : - return miscc.wxSize_height_get(self.this) - raise AttributeError,name - def __repr__(self): - return "" -class wxSize(wxSizePtr): - def __init__(self,*args) : - self.this = apply(miscc.new_wxSize,()+args) - self.thisown = 1 - - - - -class wxRealPointPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - miscc.delete_wxRealPoint(self.this) - def __setattr__(self,name,value): - if name == "x" : - miscc.wxRealPoint_x_set(self.this,value) - return - if name == "y" : - miscc.wxRealPoint_y_set(self.this,value) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "x" : - return miscc.wxRealPoint_x_get(self.this) - if name == "y" : - return miscc.wxRealPoint_y_get(self.this) - raise AttributeError,name - def __repr__(self): - return "" -class wxRealPoint(wxRealPointPtr): - def __init__(self,*args) : - self.this = apply(miscc.new_wxRealPoint,()+args) - self.thisown = 1 - - - - -class wxPointPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - miscc.delete_wxPoint(self.this) - def Set(self,arg0,arg1): - val = miscc.wxPoint_Set(self.this,arg0,arg1) - return val - def __str__(self): - val = miscc.wxPoint___str__(self.this) - return val - def __setattr__(self,name,value): - if name == "x" : - miscc.wxPoint_x_set(self.this,value) - return - if name == "y" : - miscc.wxPoint_y_set(self.this,value) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "x" : - return miscc.wxPoint_x_get(self.this) - if name == "y" : - return miscc.wxPoint_y_get(self.this) - raise AttributeError,name - def __repr__(self): - return "" -class wxPoint(wxPointPtr): - def __init__(self,*args) : - self.this = apply(miscc.new_wxPoint,()+args) - self.thisown = 1 - - - - -class wxRectPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - miscc.delete_wxRect(self.this) - def GetX(self): - val = miscc.wxRect_GetX(self.this) - return val - def SetX(self,arg0): - val = miscc.wxRect_SetX(self.this,arg0) - return val - def GetY(self): - val = miscc.wxRect_GetY(self.this) - return val - def SetY(self,arg0): - val = miscc.wxRect_SetY(self.this,arg0) - return val - def GetWidth(self): - val = miscc.wxRect_GetWidth(self.this) - return val - def SetWidth(self,arg0): - val = miscc.wxRect_SetWidth(self.this,arg0) - return val - def GetHeight(self): - val = miscc.wxRect_GetHeight(self.this) - return val - def SetHeight(self,arg0): - val = miscc.wxRect_SetHeight(self.this,arg0) - return val - def GetPosition(self): - val = miscc.wxRect_GetPosition(self.this) - val = wxPointPtr(val) - val.thisown = 1 - return val - def GetSize(self): - val = miscc.wxRect_GetSize(self.this) - val = wxSizePtr(val) - val.thisown = 1 - return val - def GetLeft(self): - val = miscc.wxRect_GetLeft(self.this) - return val - def GetTop(self): - val = miscc.wxRect_GetTop(self.this) - return val - def GetBottom(self): - val = miscc.wxRect_GetBottom(self.this) - return val - def GetRight(self): - val = miscc.wxRect_GetRight(self.this) - return val - def __setattr__(self,name,value): - if name == "x" : - miscc.wxRect_x_set(self.this,value) - return - if name == "y" : - miscc.wxRect_y_set(self.this,value) - return - if name == "width" : - miscc.wxRect_width_set(self.this,value) - return - if name == "height" : - miscc.wxRect_height_set(self.this,value) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "x" : - return miscc.wxRect_x_get(self.this) - if name == "y" : - return miscc.wxRect_y_get(self.this) - if name == "width" : - return miscc.wxRect_width_get(self.this) - if name == "height" : - return miscc.wxRect_height_get(self.this) - raise AttributeError,name - def __repr__(self): - return "" -class wxRect(wxRectPtr): - def __init__(self,*args) : - self.this = apply(miscc.new_wxRect,()+args) - self.thisown = 1 - - - - -class wxPyTimerPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - miscc.delete_wxPyTimer(self.this) - def Interval(self): - val = miscc.wxPyTimer_Interval(self.this) - return val - def Start(self,*args): - val = apply(miscc.wxPyTimer_Start,(self.this,)+args) - return val - def Stop(self): - val = miscc.wxPyTimer_Stop(self.this) - return val - def __repr__(self): - return "" -class wxPyTimer(wxPyTimerPtr): - def __init__(self,arg0) : - self.this = miscc.new_wxPyTimer(arg0) - self.thisown = 1 - - - - -class wxIndividualLayoutConstraintPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def Above(self,arg0,*args): - val = apply(miscc.wxIndividualLayoutConstraint_Above,(self.this,arg0.this,)+args) - return val - def Absolute(self,arg0): - val = miscc.wxIndividualLayoutConstraint_Absolute(self.this,arg0) - return val - def AsIs(self): - val = miscc.wxIndividualLayoutConstraint_AsIs(self.this) - return val - def Below(self,arg0,*args): - val = apply(miscc.wxIndividualLayoutConstraint_Below,(self.this,arg0.this,)+args) - return val - def Unconstrained(self): - val = miscc.wxIndividualLayoutConstraint_Unconstrained(self.this) - return val - def LeftOf(self,arg0,*args): - val = apply(miscc.wxIndividualLayoutConstraint_LeftOf,(self.this,arg0.this,)+args) - return val - def PercentOf(self,arg0,arg1,arg2): - val = miscc.wxIndividualLayoutConstraint_PercentOf(self.this,arg0.this,arg1,arg2) - return val - def RightOf(self,arg0,*args): - val = apply(miscc.wxIndividualLayoutConstraint_RightOf,(self.this,arg0.this,)+args) - return val - def SameAs(self,arg0,arg1,*args): - val = apply(miscc.wxIndividualLayoutConstraint_SameAs,(self.this,arg0.this,arg1,)+args) - return val - def Set(self,arg0,arg1,arg2,*args): - val = apply(miscc.wxIndividualLayoutConstraint_Set,(self.this,arg0,arg1.this,arg2,)+args) - return val - def __repr__(self): - return "" -class wxIndividualLayoutConstraint(wxIndividualLayoutConstraintPtr): - def __init__(self,this): - self.this = this - - - - -class wxLayoutConstraintsPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __setattr__(self,name,value): - if name == "bottom" : - miscc.wxLayoutConstraints_bottom_set(self.this,value.this) - return - if name == "centreX" : - miscc.wxLayoutConstraints_centreX_set(self.this,value.this) - return - if name == "centreY" : - miscc.wxLayoutConstraints_centreY_set(self.this,value.this) - return - if name == "height" : - miscc.wxLayoutConstraints_height_set(self.this,value.this) - return - if name == "left" : - miscc.wxLayoutConstraints_left_set(self.this,value.this) - return - if name == "right" : - miscc.wxLayoutConstraints_right_set(self.this,value.this) - return - if name == "top" : - miscc.wxLayoutConstraints_top_set(self.this,value.this) - return - if name == "width" : - miscc.wxLayoutConstraints_width_set(self.this,value.this) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "bottom" : - return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_bottom_get(self.this)) - if name == "centreX" : - return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_centreX_get(self.this)) - if name == "centreY" : - return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_centreY_get(self.this)) - if name == "height" : - return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_height_get(self.this)) - if name == "left" : - return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_left_get(self.this)) - if name == "right" : - return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_right_get(self.this)) - if name == "top" : - return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_top_get(self.this)) - if name == "width" : - return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_width_get(self.this)) - raise AttributeError,name - def __repr__(self): - return "" -class wxLayoutConstraints(wxLayoutConstraintsPtr): - def __init__(self) : - self.this = miscc.new_wxLayoutConstraints() - self.thisown = 1 - - - - -class wxAcceleratorEntryPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def Set(self,arg0,arg1,arg2): - val = miscc.wxAcceleratorEntry_Set(self.this,arg0,arg1,arg2) - return val - def GetFlags(self): - val = miscc.wxAcceleratorEntry_GetFlags(self.this) - return val - def GetKeyCode(self): - val = miscc.wxAcceleratorEntry_GetKeyCode(self.this) - return val - def GetCommand(self): - val = miscc.wxAcceleratorEntry_GetCommand(self.this) - return val - def __repr__(self): - return "" -class wxAcceleratorEntry(wxAcceleratorEntryPtr): - def __init__(self,*args) : - self.this = apply(miscc.new_wxAcceleratorEntry,()+args) - self.thisown = 1 - - - - -class wxAcceleratorTablePtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxAcceleratorTable(wxAcceleratorTablePtr): - def __init__(self,arg0) : - self.this = miscc.new_wxAcceleratorTable(arg0.this) - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - -def wxFileSelector(arg0,*args): - argl = map(None,args) - try: argl[5] = argl[5].this - except: pass - args = tuple(argl) - val = apply(miscc.wxFileSelector,(arg0,)+args) - return val - -def wxGetTextFromUser(arg0,*args): - argl = map(None,args) - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - val = apply(miscc.wxGetTextFromUser,(arg0,)+args) - return val - -def wxGetSingleChoice(arg0,arg1,arg2,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(miscc.wxGetSingleChoice,(arg0,arg1,arg2,)+args) - return val - -def wxGetSingleChoiceIndex(arg0,arg1,arg2,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(miscc.wxGetSingleChoiceIndex,(arg0,arg1,arg2,)+args) - return val - -def wxMessageBox(arg0,*args): - argl = map(None,args) - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - val = apply(miscc.wxMessageBox,(arg0,)+args) - return val - -wxColourDisplay = miscc.wxColourDisplay - -wxDisplayDepth = miscc.wxDisplayDepth - -def wxSetCursor(arg0): - val = miscc.wxSetCursor(arg0.this) - return val - -NewId = miscc.NewId - -RegisterId = miscc.RegisterId - -def wxBeginBusyCursor(*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(miscc.wxBeginBusyCursor,()+args) - return val - -wxBell = miscc.wxBell - -wxDisplaySize = miscc.wxDisplaySize - -wxEndBusyCursor = miscc.wxEndBusyCursor - -wxExecute = miscc.wxExecute - -def wxFindWindowByLabel(arg0,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(miscc.wxFindWindowByLabel,(arg0,)+args) - val = wxWindowPtr(val) - return val - -def wxFindWindowByName(arg0,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(miscc.wxFindWindowByName,(arg0,)+args) - val = wxWindowPtr(val) - return val - -def wxGetActiveWindow(): - val = miscc.wxGetActiveWindow() - val = wxWindowPtr(val) - return val - -wxGetElapsedTime = miscc.wxGetElapsedTime - -wxGetFreeMemory = miscc.wxGetFreeMemory - -wxGetMousePosition = miscc.wxGetMousePosition - -wxIsBusy = miscc.wxIsBusy - -wxNow = miscc.wxNow - -wxShell = miscc.wxShell - -wxStartTimer = miscc.wxStartTimer - -wxGetOsVersion = miscc.wxGetOsVersion - -wxYield = miscc.wxYield - -wxGetResource = miscc.wxGetResource - -wxResourceAddIdentifier = miscc.wxResourceAddIdentifier - -wxResourceClear = miscc.wxResourceClear - -def wxResourceCreateBitmap(arg0): - val = miscc.wxResourceCreateBitmap(arg0) - val = wxBitmapPtr(val) - return val - -def wxResourceCreateIcon(arg0): - val = miscc.wxResourceCreateIcon(arg0) - val = wxIconPtr(val) - return val - -def wxResourceCreateMenuBar(arg0): - val = miscc.wxResourceCreateMenuBar(arg0) - val = wxMenuBarPtr(val) - return val - -wxResourceGetIdentifier = miscc.wxResourceGetIdentifier - -wxResourceParseData = miscc.wxResourceParseData - -wxResourceParseFile = miscc.wxResourceParseFile - -wxResourceParseString = miscc.wxResourceParseString - - - -#-------------- VARIABLE WRAPPERS ------------------ - -wxLeft = miscc.wxLeft -wxTop = miscc.wxTop -wxRight = miscc.wxRight -wxBottom = miscc.wxBottom -wxWidth = miscc.wxWidth -wxHeight = miscc.wxHeight -wxCentre = miscc.wxCentre -wxCenter = miscc.wxCenter -wxCentreX = miscc.wxCentreX -wxCentreY = miscc.wxCentreY -wxUnconstrained = miscc.wxUnconstrained -wxAsIs = miscc.wxAsIs -wxPercentOf = miscc.wxPercentOf -wxAbove = miscc.wxAbove -wxBelow = miscc.wxBelow -wxLeftOf = miscc.wxLeftOf -wxRightOf = miscc.wxRightOf -wxSameAs = miscc.wxSameAs -wxAbsolute = miscc.wxAbsolute diff --git a/utils/wxPython/src/msw/windows.cpp b/utils/wxPython/src/msw/windows.cpp deleted file mode 100644 index 7119222fda..0000000000 --- a/utils/wxPython/src/msw/windows.cpp +++ /dev/null @@ -1,5161 +0,0 @@ -/* - * FILE : msw\windows.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif - -#define SWIG_init initwindowsc - -#define SWIG_name "windowsc" - -#include "helpers.h" - -#ifdef __WXMSW__ - // wxGTK defines wxMenuItem inside menu.h -#include -#endif - -#ifdef __WXMSW__ -#include -#endif - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; - - wxWindow* wxWindow_FindFocus() { - return wxWindow::FindFocus(); - } -static PyObject *_wrap_wxWindow_FindFocus(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":wxWindow_FindFocus")) - return NULL; - _result = (wxWindow *)wxWindow_FindFocus(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static void wxEvtHandler_Connect(wxEvtHandler *self,int id,int lastId,int eventType,PyObject * func) { - if (PyCallable_Check(func)) { - self->Connect(id, lastId, eventType, - (wxObjectEventFunction) &wxPyCallback::EventThunker, - new wxPyCallback(func)); - } - } -static PyObject *_wrap_wxEvtHandler_Connect(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxEvtHandler * _arg0; - int _arg1; - int _arg2; - int _arg3; - PyObject * _arg4; - char * _argc0 = 0; - PyObject * _obj4 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siiiO:wxEvtHandler_Connect",&_argc0,&_arg1,&_arg2,&_arg3,&_obj4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxEvtHandler_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvtHandler_Connect. Expected _wxEvtHandler_p."); - return NULL; - } - } -{ - _arg4 = _obj4; -} - wxEvtHandler_Connect(_arg0,_arg1,_arg2,_arg3,_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxWindowTowxEvtHandler(void *ptr) { - wxWindow *src; - wxEvtHandler *dest; - src = (wxWindow *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_new_wxWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - long _arg4 = 0; - char * _arg5 = "panel"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si|ssls:new_wxWindow",&_argc0,&_arg1,&_argc2,&_argc3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxWindow. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxWindow. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxWindow. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxWindow *)new_wxWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxWindow_CaptureMouse(_swigobj) (_swigobj->CaptureMouse()) -static PyObject *_wrap_wxWindow_CaptureMouse(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_CaptureMouse",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_CaptureMouse. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_CaptureMouse(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_Center(_swigobj,_swigarg0) (_swigobj->Center(_swigarg0)) -static PyObject *_wrap_wxWindow_Center(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1 = (wxHORIZONTAL); - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxWindow_Center",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Center. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_Center(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_Centre(_swigobj,_swigarg0) (_swigobj->Centre(_swigarg0)) -static PyObject *_wrap_wxWindow_Centre(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1 = (wxHORIZONTAL); - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxWindow_Centre",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Centre. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_Centre(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_ClientToScreen(_swigobj,_swigarg0,_swigarg1) (_swigobj->ClientToScreen(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxWindow_ClientToScreen(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int * _arg1; - int * _arg2; - char * _argc0 = 0; - int temp; - PyObject * _obj1 = 0; - int temp0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sOO:wxWindow_ClientToScreen",&_argc0,&_obj1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_ClientToScreen. Expected _wxWindow_p."); - return NULL; - } - } -{ - temp = (int) PyInt_AsLong(_obj1); - _arg1 = &temp; -} -{ - temp0 = (int) PyInt_AsLong(_obj2); - _arg2 = &temp0; -} - wxWindow_ClientToScreen(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxWindow_Close(_swigobj,_swigarg0) (_swigobj->Close(_swigarg0)) -static PyObject *_wrap_wxWindow_Close(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - int _arg1 = (0); - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxWindow_Close",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Close. Expected _wxWindow_p."); - return NULL; - } - } - _result = (bool )wxWindow_Close(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_Destroy(_swigobj) (_swigobj->Destroy()) -static PyObject *_wrap_wxWindow_Destroy(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_Destroy",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Destroy. Expected _wxWindow_p."); - return NULL; - } - } - _result = (bool )wxWindow_Destroy(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_DestroyChildren(_swigobj) (_swigobj->DestroyChildren()) -static PyObject *_wrap_wxWindow_DestroyChildren(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_DestroyChildren",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_DestroyChildren. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_DestroyChildren(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_DragAcceptFiles(_swigobj,_swigarg0) (_swigobj->DragAcceptFiles(_swigarg0)) -static PyObject *_wrap_wxWindow_DragAcceptFiles(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_DragAcceptFiles",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_DragAcceptFiles. Expected _wxWindow_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxWindow_DragAcceptFiles(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_Enable(_swigobj,_swigarg0) (_swigobj->Enable(_swigarg0)) -static PyObject *_wrap_wxWindow_Enable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_Enable",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Enable. Expected _wxWindow_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxWindow_Enable(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_FindWindowByID(_swigobj,_swigarg0) (_swigobj->FindWindow(_swigarg0)) -static PyObject *_wrap_wxWindow_FindWindowByID(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - wxWindow * _arg0; - long _arg1; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sl:wxWindow_FindWindowByID",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_FindWindowByID. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxWindow *)wxWindow_FindWindowByID(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxWindow_FindWindowByName(_swigobj,_swigarg0) (_swigobj->FindWindow(_swigarg0)) -static PyObject *_wrap_wxWindow_FindWindowByName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - wxWindow * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxWindow_FindWindowByName",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_FindWindowByName. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (wxWindow *)wxWindow_FindWindowByName(_arg0,*_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxWindow_Fit(_swigobj) (_swigobj->Fit()) -static PyObject *_wrap_wxWindow_Fit(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_Fit",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Fit. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_Fit(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_GetBackgroundColour(_swigobj) (_swigobj->GetBackgroundColour()) -static PyObject *_wrap_wxWindow_GetBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxWindow * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetBackgroundColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetBackgroundColour. Expected _wxWindow_p."); - return NULL; - } - } - _result = new wxColour (wxWindow_GetBackgroundColour(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxWindow_GetCharHeight(_swigobj) (_swigobj->GetCharHeight()) -static PyObject *_wrap_wxWindow_GetCharHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetCharHeight",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetCharHeight. Expected _wxWindow_p."); - return NULL; - } - } - _result = (int )wxWindow_GetCharHeight(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_GetCharWidth(_swigobj) (_swigobj->GetCharWidth()) -static PyObject *_wrap_wxWindow_GetCharWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetCharWidth",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetCharWidth. Expected _wxWindow_p."); - return NULL; - } - } - _result = (int )wxWindow_GetCharWidth(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_GetClientSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetClientSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxWindow_GetClientSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxWindow_GetClientSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetClientSize. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_GetClientSize(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxWindow_GetConstraints(_swigobj) (_swigobj->GetConstraints()) -static PyObject *_wrap_wxWindow_GetConstraints(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxLayoutConstraints * _result; - wxWindow * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetConstraints",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetConstraints. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxLayoutConstraints *)wxWindow_GetConstraints(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxLayoutConstraints_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxWindow_GetDefaultItem(_swigobj) (_swigobj->GetDefaultItem()) -static PyObject *_wrap_wxWindow_GetDefaultItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxButton * _result; - wxWindow * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetDefaultItem",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetDefaultItem. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxButton *)wxWindow_GetDefaultItem(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxButton_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxWindow_GetFont(_swigobj) (_swigobj->GetFont()) -static PyObject *_wrap_wxWindow_GetFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _result; - wxWindow * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetFont",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetFont. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxFont *)wxWindow_GetFont(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxWindow_GetForegroundColour(_swigobj) (_swigobj->GetForegroundColour()) -static PyObject *_wrap_wxWindow_GetForegroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxWindow * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetForegroundColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetForegroundColour. Expected _wxWindow_p."); - return NULL; - } - } - _result = new wxColour (wxWindow_GetForegroundColour(_arg0)); - SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxWindow_GetGrandParent(_swigobj) (_swigobj->GetGrandParent()) -static PyObject *_wrap_wxWindow_GetGrandParent(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - wxWindow * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetGrandParent",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetGrandParent. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxWindow *)wxWindow_GetGrandParent(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxWindow_GetId(_swigobj) (_swigobj->GetId()) -static PyObject *_wrap_wxWindow_GetId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetId",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetId. Expected _wxWindow_p."); - return NULL; - } - } - _result = (int )wxWindow_GetId(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_GetPosition(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetPosition(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxWindow_GetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxWindow_GetPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetPosition. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_GetPosition(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxWindow_GetLabel(_swigobj) (_swigobj->GetLabel()) -static PyObject *_wrap_wxWindow_GetLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetLabel",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetLabel. Expected _wxWindow_p."); - return NULL; - } - } - _result = new wxString (wxWindow_GetLabel(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxWindow_GetName(_swigobj) (_swigobj->GetName()) -static PyObject *_wrap_wxWindow_GetName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetName",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetName. Expected _wxWindow_p."); - return NULL; - } - } - _result = new wxString (wxWindow_GetName(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxWindow_GetParent(_swigobj) (_swigobj->GetParent()) -static PyObject *_wrap_wxWindow_GetParent(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - wxWindow * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetParent",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetParent. Expected _wxWindow_p."); - return NULL; - } - } - _result = (wxWindow *)wxWindow_GetParent(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxWindow_GetReturnCode(_swigobj) (_swigobj->GetReturnCode()) -static PyObject *_wrap_wxWindow_GetReturnCode(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetReturnCode",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetReturnCode. Expected _wxWindow_p."); - return NULL; - } - } - _result = (int )wxWindow_GetReturnCode(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_GetScrollThumb(_swigobj,_swigarg0) (_swigobj->GetScrollThumb(_swigarg0)) -static PyObject *_wrap_wxWindow_GetScrollThumb(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxWindow * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_GetScrollThumb",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetScrollThumb. Expected _wxWindow_p."); - return NULL; - } - } - _result = (int )wxWindow_GetScrollThumb(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_GetScrollPos(_swigobj,_swigarg0) (_swigobj->GetScrollPos(_swigarg0)) -static PyObject *_wrap_wxWindow_GetScrollPos(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxWindow * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_GetScrollPos",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetScrollPos. Expected _wxWindow_p."); - return NULL; - } - } - _result = (int )wxWindow_GetScrollPos(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_GetScrollRange(_swigobj,_swigarg0) (_swigobj->GetScrollRange(_swigarg0)) -static PyObject *_wrap_wxWindow_GetScrollRange(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxWindow * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_GetScrollRange",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetScrollRange. Expected _wxWindow_p."); - return NULL; - } - } - _result = (int )wxWindow_GetScrollRange(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_GetSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxWindow_GetSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxWindow_GetSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetSize. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_GetSize(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxWindow_GetTextExtent(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetTextExtent(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxWindow_GetTextExtent(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - wxString * _arg1; - int * _arg2; - int temp; - int * _arg3; - int temp0; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; -{ - _arg2 = &temp; -} -{ - _arg3 = &temp0; -} - if(!PyArg_ParseTuple(args,"sO:wxWindow_GetTextExtent",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetTextExtent. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxWindow_GetTextExtent(_arg0,*_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg3)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxWindow_GetTitle(_swigobj) (_swigobj->GetTitle()) -static PyObject *_wrap_wxWindow_GetTitle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetTitle",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetTitle. Expected _wxWindow_p."); - return NULL; - } - } - _result = new wxString (wxWindow_GetTitle(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxWindow_GetWindowStyleFlag(_swigobj) (_swigobj->GetWindowStyleFlag()) -static PyObject *_wrap_wxWindow_GetWindowStyleFlag(PyObject *self, PyObject *args) { - PyObject * _resultobj; - long _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_GetWindowStyleFlag",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetWindowStyleFlag. Expected _wxWindow_p."); - return NULL; - } - } - _result = (long )wxWindow_GetWindowStyleFlag(_arg0); - _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxWindow_InitDialog(_swigobj) (_swigobj->InitDialog()) -static PyObject *_wrap_wxWindow_InitDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_InitDialog",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_InitDialog. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_InitDialog(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_IsEnabled(_swigobj) (_swigobj->IsEnabled()) -static PyObject *_wrap_wxWindow_IsEnabled(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_IsEnabled",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_IsEnabled. Expected _wxWindow_p."); - return NULL; - } - } - _result = (bool )wxWindow_IsEnabled(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_IsRetained(_swigobj) (_swigobj->IsRetained()) -static PyObject *_wrap_wxWindow_IsRetained(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_IsRetained",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_IsRetained. Expected _wxWindow_p."); - return NULL; - } - } - _result = (bool )wxWindow_IsRetained(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_IsShown(_swigobj) (_swigobj->IsShown()) -static PyObject *_wrap_wxWindow_IsShown(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_IsShown",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_IsShown. Expected _wxWindow_p."); - return NULL; - } - } - _result = (bool )wxWindow_IsShown(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_Layout(_swigobj) (_swigobj->Layout()) -static PyObject *_wrap_wxWindow_Layout(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_Layout",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Layout. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_Layout(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_LoadFromResource(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFromResource(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxWindow_LoadFromResource(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - wxWindow * _arg1; - wxString * _arg2; - wxResourceTable * _arg3 = NULL; - char * _argc0 = 0; - char * _argc1 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ssO|s:wxWindow_LoadFromResource",&_argc0,&_argc1,&_obj2,&_argc3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_LoadFromResource. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_LoadFromResource. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxResourceTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxWindow_LoadFromResource. Expected _wxResourceTable_p."); - return NULL; - } - } - _result = (bool )wxWindow_LoadFromResource(_arg0,_arg1,*_arg2,_arg3); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxWindow_Lower(_swigobj) (_swigobj->Lower()) -static PyObject *_wrap_wxWindow_Lower(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_Lower",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Lower. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_Lower(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_MakeModal(_swigobj,_swigarg0) (_swigobj->MakeModal(_swigarg0)) -static PyObject *_wrap_wxWindow_MakeModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_MakeModal",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_MakeModal. Expected _wxWindow_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxWindow_MakeModal(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_Move(_swigobj,_swigarg0,_swigarg1) (_swigobj->Move(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxWindow_Move(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxWindow_Move",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Move. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_Move(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_PopupMenu(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->PopupMenu(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxWindow_PopupMenu(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - wxMenu * _arg1; - int _arg2; - int _arg3; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ssii:wxWindow_PopupMenu",&_argc0,&_argc1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_PopupMenu. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_PopupMenu. Expected _wxMenu_p."); - return NULL; - } - } - _result = (bool )wxWindow_PopupMenu(_arg0,_arg1,_arg2,_arg3); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_Raise(_swigobj) (_swigobj->Raise()) -static PyObject *_wrap_wxWindow_Raise(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_Raise",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Raise. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_Raise(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_Refresh(_swigobj,_swigarg0,_swigarg1) (_swigobj->Refresh(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxWindow_Refresh(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - bool _arg1 = (1); - wxRect * _arg2 = NULL; - char * _argc0 = 0; - int tempbool1; - char * _argc2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|is:wxWindow_Refresh",&_argc0,&tempbool1,&_argc2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Refresh. Expected _wxWindow_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxWindow_Refresh. Expected _wxRect_p."); - return NULL; - } - } - wxWindow_Refresh(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_ReleaseMouse(_swigobj) (_swigobj->ReleaseMouse()) -static PyObject *_wrap_wxWindow_ReleaseMouse(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_ReleaseMouse",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_ReleaseMouse. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_ReleaseMouse(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_ScreenToClient(_swigobj,_swigarg0,_swigarg1) (_swigobj->ScreenToClient(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxWindow_ScreenToClient(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int * _arg1; - int * _arg2; - char * _argc0 = 0; - int temp; - PyObject * _obj1 = 0; - int temp0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sOO:wxWindow_ScreenToClient",&_argc0,&_obj1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_ScreenToClient. Expected _wxWindow_p."); - return NULL; - } - } -{ - temp = (int) PyInt_AsLong(_obj1); - _arg1 = &temp; -} -{ - temp0 = (int) PyInt_AsLong(_obj2); - _arg2 = &temp0; -} - wxWindow_ScreenToClient(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxWindow_ScrollWindow(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->ScrollWindow(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxWindow_ScrollWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1; - int _arg2; - wxRect * _arg3 = NULL; - char * _argc0 = 0; - char * _argc3 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii|s:wxWindow_ScrollWindow",&_argc0,&_arg1,&_arg2,&_argc3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_ScrollWindow. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxRect_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxWindow_ScrollWindow. Expected _wxRect_p."); - return NULL; - } - } - wxWindow_ScrollWindow(_arg0,_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetAutoLayout(_swigobj,_swigarg0) (_swigobj->SetAutoLayout(_swigarg0)) -static PyObject *_wrap_wxWindow_SetAutoLayout(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_SetAutoLayout",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetAutoLayout. Expected _wxWindow_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxWindow_SetAutoLayout(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetBackgroundColour(_swigarg0)) -static PyObject *_wrap_wxWindow_SetBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxWindow_SetBackgroundColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetBackgroundColour. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetBackgroundColour. Expected _wxColour_p."); - return NULL; - } - } - wxWindow_SetBackgroundColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetConstraints(_swigobj,_swigarg0) (_swigobj->SetConstraints(_swigarg0)) -static PyObject *_wrap_wxWindow_SetConstraints(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - wxLayoutConstraints * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxWindow_SetConstraints",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetConstraints. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxLayoutConstraints_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetConstraints. Expected _wxLayoutConstraints_p."); - return NULL; - } - } - wxWindow_SetConstraints(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetDoubleClick(_swigobj,_swigarg0) (_swigobj->SetDoubleClick(_swigarg0)) -static PyObject *_wrap_wxWindow_SetDoubleClick(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_SetDoubleClick",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetDoubleClick. Expected _wxWindow_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxWindow_SetDoubleClick(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetFocus(_swigobj) (_swigobj->SetFocus()) -static PyObject *_wrap_wxWindow_SetFocus(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_SetFocus",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetFocus. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_SetFocus(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetFont(_swigobj,_swigarg0) (_swigobj->SetFont(_swigarg0)) -static PyObject *_wrap_wxWindow_SetFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - wxFont * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxWindow_SetFont",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetFont. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetFont. Expected _wxFont_p."); - return NULL; - } - } - wxWindow_SetFont(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetForegroundColour(_swigobj,_swigarg0) (_swigobj->SetForegroundColour(_swigarg0)) -static PyObject *_wrap_wxWindow_SetForegroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxWindow_SetForegroundColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetForegroundColour. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetForegroundColour. Expected _wxColour_p."); - return NULL; - } - } - wxWindow_SetForegroundColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetId(_swigobj,_swigarg0) (_swigobj->SetId(_swigarg0)) -static PyObject *_wrap_wxWindow_SetId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_SetId",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetId. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_SetId(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetName(_swigobj,_swigarg0) (_swigobj->SetName(_swigarg0)) -static PyObject *_wrap_wxWindow_SetName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxWindow_SetName",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetName. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxWindow_SetName(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxWindow_SetReturnCode(_swigobj,_swigarg0) (_swigobj->SetReturnCode(_swigarg0)) -static PyObject *_wrap_wxWindow_SetReturnCode(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_SetReturnCode",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetReturnCode. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_SetReturnCode(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetScrollbar(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SetScrollbar(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_wxWindow_SetScrollbar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1; - int _arg2; - int _arg3; - int _arg4; - bool _arg5 = (1); - char * _argc0 = 0; - int tempbool5; - - self = self; - if(!PyArg_ParseTuple(args,"siiii|i:wxWindow_SetScrollbar",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&tempbool5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetScrollbar. Expected _wxWindow_p."); - return NULL; - } - } - _arg5 = (bool ) tempbool5; - wxWindow_SetScrollbar(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetScrollPos(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetScrollPos(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxWindow_SetScrollPos(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1; - int _arg2; - bool _arg3 = (1); - char * _argc0 = 0; - int tempbool3; - - self = self; - if(!PyArg_ParseTuple(args,"sii|i:wxWindow_SetScrollPos",&_argc0,&_arg1,&_arg2,&tempbool3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetScrollPos. Expected _wxWindow_p."); - return NULL; - } - } - _arg3 = (bool ) tempbool3; - wxWindow_SetScrollPos(_arg0,_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetDimensions(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SetSize(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_wxWindow_SetDimensions(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1; - int _arg2; - int _arg3; - int _arg4; - int _arg5 = (wxSIZE_AUTO); - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siiii|i:wxWindow_SetDimensions",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetDimensions. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_SetDimensions(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void wxWindow_SetSize(wxWindow *self,const wxSize & size) { - self->SetSize(size.x, size.y); - } -static PyObject *_wrap_wxWindow_SetSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - wxSize * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxWindow_SetSize",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetSize. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetSize. Expected _wxSize_p."); - return NULL; - } - } - wxWindow_SetSize(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void wxWindow_SetPosition(wxWindow *self,const wxPoint & pos) { - self->SetSize(pos.x, pos.y, -1, -1); - } -static PyObject *_wrap_wxWindow_SetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - wxPoint * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxWindow_SetPosition",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetPosition. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetPosition. Expected _wxPoint_p."); - return NULL; - } - } - wxWindow_SetPosition(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetSizeHints(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->SetSizeHints(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_wxWindow_SetSizeHints(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1 = -1; - int _arg2 = -1; - int _arg3 = -1; - int _arg4 = -1; - int _arg5 = -1; - int _arg6 = -1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|iiiiii:wxWindow_SetSizeHints",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetSizeHints. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_SetSizeHints(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetClientSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetClientSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxWindow_SetClientSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxWindow_SetClientSize",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetClientSize. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_SetClientSize(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetCursor(_swigobj,_swigarg0) (_swigobj->SetCursor(_swigarg0)) -static PyObject *_wrap_wxWindow_SetCursor(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - wxCursor * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxWindow_SetCursor",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetCursor. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxCursor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetCursor. Expected _wxCursor_p."); - return NULL; - } - } - wxWindow_SetCursor(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxWindow_SetTitle(_swigobj,_swigarg0) (_swigobj->SetTitle(_swigarg0)) -static PyObject *_wrap_wxWindow_SetTitle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxWindow_SetTitle",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetTitle. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxWindow_SetTitle(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxWindow_Show(_swigobj,_swigarg0) (_swigobj->Show(_swigarg0)) -static PyObject *_wrap_wxWindow_Show(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxWindow_Show",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Show. Expected _wxWindow_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - _result = (bool )wxWindow_Show(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_TransferDataFromWindow(_swigobj) (_swigobj->TransferDataFromWindow()) -static PyObject *_wrap_wxWindow_TransferDataFromWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_TransferDataFromWindow",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_TransferDataFromWindow. Expected _wxWindow_p."); - return NULL; - } - } - _result = (bool )wxWindow_TransferDataFromWindow(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_TransferDataToWindow(_swigobj) (_swigobj->TransferDataToWindow()) -static PyObject *_wrap_wxWindow_TransferDataToWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_TransferDataToWindow",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_TransferDataToWindow. Expected _wxWindow_p."); - return NULL; - } - } - _result = (bool )wxWindow_TransferDataToWindow(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_Validate(_swigobj) (_swigobj->Validate()) -static PyObject *_wrap_wxWindow_Validate(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxWindow_Validate",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Validate. Expected _wxWindow_p."); - return NULL; - } - } - _result = (bool )wxWindow_Validate(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxWindow_WarpPointer(_swigobj,_swigarg0,_swigarg1) (_swigobj->WarpPointer(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxWindow_WarpPointer(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxWindow_WarpPointer",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_WarpPointer. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_WarpPointer(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxFrameTowxWindow(void *ptr) { - wxFrame *src; - wxWindow *dest; - src = (wxFrame *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxFrameTowxEvtHandler(void *ptr) { - wxFrame *src; - wxEvtHandler *dest; - src = (wxFrame *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxFrame(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFrame * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = (wxDEFAULT_FRAME_STYLE); - char * _arg6 = "frame"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|ssls:new_wxFrame",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxFrame. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxFrame. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxFrame. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxFrame *)new_wxFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFrame_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxFrame_Centre(_swigobj,_swigarg0) (_swigobj->Centre(_swigarg0)) -static PyObject *_wrap_wxFrame_Centre(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFrame * _arg0; - int _arg1 = (wxBOTH); - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxFrame_Centre",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Centre. Expected _wxFrame_p."); - return NULL; - } - } - wxFrame_Centre(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFrame_Command(_swigobj,_swigarg0) (_swigobj->Command(_swigarg0)) -static PyObject *_wrap_wxFrame_Command(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFrame * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxFrame_Command",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Command. Expected _wxFrame_p."); - return NULL; - } - } - wxFrame_Command(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFrame_CreateStatusBar(_swigobj,_swigarg0) (_swigobj->CreateStatusBar(_swigarg0)) -static PyObject *_wrap_wxFrame_CreateStatusBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxFrame * _arg0; - int _arg1 = 1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxFrame_CreateStatusBar",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_CreateStatusBar. Expected _wxFrame_p."); - return NULL; - } - } - _result = (bool )wxFrame_CreateStatusBar(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFrame_GetMenuBar(_swigobj) (_swigobj->GetMenuBar()) -static PyObject *_wrap_wxFrame_GetMenuBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuBar * _result; - wxFrame * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFrame_GetMenuBar",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetMenuBar. Expected _wxFrame_p."); - return NULL; - } - } - _result = (wxMenuBar *)wxFrame_GetMenuBar(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxFrame_GetStatusBar(_swigobj) (_swigobj->GetStatusBar()) -static PyObject *_wrap_wxFrame_GetStatusBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxStatusBar * _result; - wxFrame * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFrame_GetStatusBar",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetStatusBar. Expected _wxFrame_p."); - return NULL; - } - } - _result = (wxStatusBar *)wxFrame_GetStatusBar(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxStatusBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxFrame_GetTitle(_swigobj) (_swigobj->GetTitle()) -static PyObject *_wrap_wxFrame_GetTitle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxFrame * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFrame_GetTitle",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetTitle. Expected _wxFrame_p."); - return NULL; - } - } - _result = new wxString (wxFrame_GetTitle(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxFrame_Iconize(_swigobj,_swigarg0) (_swigobj->Iconize(_swigarg0)) -static PyObject *_wrap_wxFrame_Iconize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFrame * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxFrame_Iconize",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Iconize. Expected _wxFrame_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxFrame_Iconize(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFrame_IsIconized(_swigobj) (_swigobj->IsIconized()) -static PyObject *_wrap_wxFrame_IsIconized(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxFrame * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxFrame_IsIconized",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_IsIconized. Expected _wxFrame_p."); - return NULL; - } - } - _result = (bool )wxFrame_IsIconized(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFrame_Maximize(_swigobj,_swigarg0) (_swigobj->Maximize(_swigarg0)) -static PyObject *_wrap_wxFrame_Maximize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFrame * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxFrame_Maximize",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Maximize. Expected _wxFrame_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxFrame_Maximize(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFrame_SetAcceleratorTable(_swigobj,_swigarg0) (_swigobj->SetAcceleratorTable(_swigarg0)) -static PyObject *_wrap_wxFrame_SetAcceleratorTable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFrame * _arg0; - wxAcceleratorTable * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxFrame_SetAcceleratorTable",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetAcceleratorTable. Expected _wxFrame_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxAcceleratorTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFrame_SetAcceleratorTable. Expected _wxAcceleratorTable_p."); - return NULL; - } - } - wxFrame_SetAcceleratorTable(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFrame_SetIcon(_swigobj,_swigarg0) (_swigobj->SetIcon(_swigarg0)) -static PyObject *_wrap_wxFrame_SetIcon(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFrame * _arg0; - wxIcon * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxFrame_SetIcon",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetIcon. Expected _wxFrame_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFrame_SetIcon. Expected _wxIcon_p."); - return NULL; - } - } - wxFrame_SetIcon(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFrame_SetMenuBar(_swigobj,_swigarg0) (_swigobj->SetMenuBar(_swigarg0)) -static PyObject *_wrap_wxFrame_SetMenuBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFrame * _arg0; - wxMenuBar * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxFrame_SetMenuBar",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetMenuBar. Expected _wxFrame_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFrame_SetMenuBar. Expected _wxMenuBar_p."); - return NULL; - } - } - wxFrame_SetMenuBar(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFrame_SetStatusText(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetStatusText(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxFrame_SetStatusText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFrame * _arg0; - wxString * _arg1; - int _arg2 = 0; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO|i:wxFrame_SetStatusText",&_argc0,&_obj1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetStatusText. Expected _wxFrame_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxFrame_SetStatusText(_arg0,*_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxFrame_SetStatusWidths(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetStatusWidths(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxFrame_SetStatusWidths(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFrame * _arg0; - int _arg1; - int * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxFrame_SetStatusWidths",&_argc0,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetStatusWidths. Expected _wxFrame_p."); - return NULL; - } - } - if (_obj2) -{ - _arg2 = int_LIST_helper(_obj2); - if (_arg2 == NULL) { - return NULL; - } -} -{ - _arg1 = PyList_Size(_obj2); -} - wxFrame_SetStatusWidths(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - delete [] _arg2; -} - return _resultobj; -} - -#define wxFrame_SetTitle(_swigobj,_swigarg0) (_swigobj->SetTitle(_swigarg0)) -static PyObject *_wrap_wxFrame_SetTitle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFrame * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxFrame_SetTitle",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetTitle. Expected _wxFrame_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxFrame_SetTitle(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static void *SwigwxMiniFrameTowxFrame(void *ptr) { - wxMiniFrame *src; - wxFrame *dest; - src = (wxMiniFrame *) ptr; - dest = (wxFrame *) src; - return (void *) dest; -} - -static void *SwigwxMiniFrameTowxWindow(void *ptr) { - wxMiniFrame *src; - wxWindow *dest; - src = (wxMiniFrame *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxMiniFrameTowxEvtHandler(void *ptr) { - wxMiniFrame *src; - wxEvtHandler *dest; - src = (wxMiniFrame *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxMiniFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxMiniFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxMiniFrame(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMiniFrame * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = (wxDEFAULT_FRAME_STYLE); - char * _arg6 = "frame"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|ssls:new_wxMiniFrame",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxMiniFrame. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxMiniFrame. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxMiniFrame. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxMiniFrame *)new_wxMiniFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMiniFrame_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -static void *SwigwxPanelTowxWindow(void *ptr) { - wxPanel *src; - wxWindow *dest; - src = (wxPanel *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxPanelTowxEvtHandler(void *ptr) { - wxPanel *src; - wxEvtHandler *dest; - src = (wxPanel *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxPanel(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxPanel(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_new_wxPanel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPanel * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - long _arg4 = (wxTAB_TRAVERSAL); - char * _arg5 = "panel"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si|ssls:new_wxPanel",&_argc0,&_arg1,&_argc2,&_argc3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPanel. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxPanel. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxPanel. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxPanel *)new_wxPanel(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPanel_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPanel_InitDialog(_swigobj) (_swigobj->InitDialog()) -static PyObject *_wrap_wxPanel_InitDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPanel * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPanel_InitDialog",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPanel_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPanel_InitDialog. Expected _wxPanel_p."); - return NULL; - } - } - wxPanel_InitDialog(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxDialogTowxPanel(void *ptr) { - wxDialog *src; - wxPanel *dest; - src = (wxDialog *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxDialogTowxWindow(void *ptr) { - wxDialog *src; - wxWindow *dest; - src = (wxDialog *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxDialogTowxEvtHandler(void *ptr) { - wxDialog *src; - wxEvtHandler *dest; - src = (wxDialog *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxDialog(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDialog * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = &wxPyDefaultPosition; - wxSize * _arg4 = &wxPyDefaultSize; - long _arg5 = (wxDEFAULT_DIALOG_STYLE); - char * _arg6 = "dialogBox"; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - char * _argc4 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"siO|ssls:new_wxDialog",&_argc0,&_arg1,&_obj2,&_argc3,&_argc4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDialog. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxDialog. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc4) { - if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxDialog. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxDialog *)new_wxDialog(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxDialog_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxDialog_Centre(_swigobj,_swigarg0) (_swigobj->Centre(_swigarg0)) -static PyObject *_wrap_wxDialog_Centre(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDialog * _arg0; - int _arg1 = (wxBOTH); - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxDialog_Centre",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_Centre. Expected _wxDialog_p."); - return NULL; - } - } - wxDialog_Centre(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDialog_EndModal(_swigobj,_swigarg0) (_swigobj->EndModal(_swigarg0)) -static PyObject *_wrap_wxDialog_EndModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDialog * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxDialog_EndModal",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_EndModal. Expected _wxDialog_p."); - return NULL; - } - } - wxDialog_EndModal(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDialog_GetTitle(_swigobj) (_swigobj->GetTitle()) -static PyObject *_wrap_wxDialog_GetTitle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDialog_GetTitle",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_GetTitle. Expected _wxDialog_p."); - return NULL; - } - } - _result = new wxString (wxDialog_GetTitle(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxDialog_Iconize(_swigobj,_swigarg0) (_swigobj->Iconize(_swigarg0)) -static PyObject *_wrap_wxDialog_Iconize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDialog * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxDialog_Iconize",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_Iconize. Expected _wxDialog_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxDialog_Iconize(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDialog_IsIconized(_swigobj) (_swigobj->IsIconized()) -static PyObject *_wrap_wxDialog_IsIconized(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDialog_IsIconized",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_IsIconized. Expected _wxDialog_p."); - return NULL; - } - } - _result = (bool )wxDialog_IsIconized(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDialog_SetModal(_swigobj,_swigarg0) (_swigobj->SetModal(_swigarg0)) -static PyObject *_wrap_wxDialog_SetModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDialog * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxDialog_SetModal",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_SetModal. Expected _wxDialog_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxDialog_SetModal(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDialog_IsModal(_swigobj) (_swigobj->IsModal()) -static PyObject *_wrap_wxDialog_IsModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDialog_IsModal",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_IsModal. Expected _wxDialog_p."); - return NULL; - } - } - _result = (bool )wxDialog_IsModal(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDialog_SetTitle(_swigobj,_swigarg0) (_swigobj->SetTitle(_swigarg0)) -static PyObject *_wrap_wxDialog_SetTitle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxDialog * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxDialog_SetTitle",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_SetTitle. Expected _wxDialog_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxDialog_SetTitle(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxDialog_Show(_swigobj,_swigarg0) (_swigobj->Show(_swigarg0)) -static PyObject *_wrap_wxDialog_Show(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxDialog * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxDialog_Show",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_Show. Expected _wxDialog_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - _result = (bool )wxDialog_Show(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) -static PyObject *_wrap_wxDialog_ShowModal(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxDialog * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxDialog_ShowModal",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_ShowModal. Expected _wxDialog_p."); - return NULL; - } - } - _result = (int )wxDialog_ShowModal(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxScrolledWindowTowxWindow(void *ptr) { - wxScrolledWindow *src; - wxWindow *dest; - src = (wxScrolledWindow *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxScrolledWindowTowxEvtHandler(void *ptr) { - wxScrolledWindow *src; - wxEvtHandler *dest; - src = (wxScrolledWindow *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxScrolledWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxScrolledWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_new_wxScrolledWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrolledWindow * _result; - wxWindow * _arg0; - wxWindowID _arg1 = -1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - long _arg4 = (wxHSCROLL)|(wxVSCROLL); - char * _arg5 = "scrolledWindow"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s|issls:new_wxScrolledWindow",&_argc0,&_arg1,&_argc2,&_argc3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxScrolledWindow. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxScrolledWindow. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxScrolledWindow. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxScrolledWindow *)new_wxScrolledWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxScrolledWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxScrolledWindow_EnableScrolling(_swigobj,_swigarg0,_swigarg1) (_swigobj->EnableScrolling(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxScrolledWindow_EnableScrolling(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrolledWindow * _arg0; - bool _arg1; - bool _arg2; - char * _argc0 = 0; - int tempbool1; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxScrolledWindow_EnableScrolling",&_argc0,&tempbool1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrolledWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_EnableScrolling. Expected _wxScrolledWindow_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - _arg2 = (bool ) tempbool2; - wxScrolledWindow_EnableScrolling(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxScrolledWindow_GetScrollPixelsPerUnit(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetScrollPixelsPerUnit(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxScrolledWindow_GetScrollPixelsPerUnit(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrolledWindow * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxScrolledWindow_GetScrollPixelsPerUnit",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrolledWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_GetScrollPixelsPerUnit. Expected _wxScrolledWindow_p."); - return NULL; - } - } - wxScrolledWindow_GetScrollPixelsPerUnit(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxScrolledWindow_GetVirtualSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetVirtualSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxScrolledWindow_GetVirtualSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrolledWindow * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxScrolledWindow_GetVirtualSize",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrolledWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_GetVirtualSize. Expected _wxScrolledWindow_p."); - return NULL; - } - } - wxScrolledWindow_GetVirtualSize(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxScrolledWindow_IsRetained(_swigobj) (_swigobj->IsRetained()) -static PyObject *_wrap_wxScrolledWindow_IsRetained(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxScrolledWindow * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxScrolledWindow_IsRetained",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrolledWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_IsRetained. Expected _wxScrolledWindow_p."); - return NULL; - } - } - _result = (bool )wxScrolledWindow_IsRetained(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxScrolledWindow_PrepareDC(_swigobj,_swigarg0) (_swigobj->PrepareDC(_swigarg0)) -static PyObject *_wrap_wxScrolledWindow_PrepareDC(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrolledWindow * _arg0; - wxDC * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxScrolledWindow_PrepareDC",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrolledWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_PrepareDC. Expected _wxScrolledWindow_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxScrolledWindow_PrepareDC. Expected _wxDC_p."); - return NULL; - } - } - wxScrolledWindow_PrepareDC(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxScrolledWindow_Scroll(_swigobj,_swigarg0,_swigarg1) (_swigobj->Scroll(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxScrolledWindow_Scroll(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrolledWindow * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxScrolledWindow_Scroll",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrolledWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_Scroll. Expected _wxScrolledWindow_p."); - return NULL; - } - } - wxScrolledWindow_Scroll(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxScrolledWindow_SetScrollbars(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->SetScrollbars(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_wxScrolledWindow_SetScrollbars(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrolledWindow * _arg0; - int _arg1; - int _arg2; - int _arg3; - int _arg4; - int _arg5 = 0; - int _arg6 = 0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siiii|ii:wxScrolledWindow_SetScrollbars",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrolledWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_SetScrollbars. Expected _wxScrolledWindow_p."); - return NULL; - } - } - wxScrolledWindow_SetScrollbars(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxScrolledWindow_ViewStart(_swigobj,_swigarg0,_swigarg1) (_swigobj->ViewStart(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxScrolledWindow_ViewStart(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrolledWindow * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxScrolledWindow_ViewStart",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrolledWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_ViewStart. Expected _wxScrolledWindow_p."); - return NULL; - } - } - wxScrolledWindow_ViewStart(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -static void *SwigwxMenuTowxEvtHandler(void *ptr) { - wxMenu *src; - wxEvtHandler *dest; - src = (wxMenu *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxMenu(_swigarg0) (new wxMenu(_swigarg0)) -static PyObject *_wrap_new_wxMenu(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _result; - wxString * _arg0 = &wxPyEmptyStr; - PyObject * _obj0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"|O:new_wxMenu",&_obj0)) - return NULL; - if (_obj0) -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - _result = (wxMenu *)new_wxMenu(*_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -#define wxMenu_Append(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Append(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxMenu_Append(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _arg0; - int _arg1; - wxString * _arg2; - wxString * _arg3 = &wxPyEmptyStr; - int _arg4 = (0); - char * _argc0 = 0; - PyObject * _obj2 = 0; - PyObject * _obj3 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siO|Oi:wxMenu_Append",&_argc0,&_arg1,&_obj2,&_obj3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_Append. Expected _wxMenu_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_obj3) -{ - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AsString(_obj3)); -} - wxMenu_Append(_arg0,_arg1,*_arg2,*_arg3,_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} -{ - if (_obj3) - delete _arg3; -} - return _resultobj; -} - -#define wxMenu_AppendMenu(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Append(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxMenu_AppendMenu(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _arg0; - int _arg1; - wxString * _arg2; - wxMenu * _arg3; - wxString * _arg4 = &wxPyEmptyStr; - char * _argc0 = 0; - PyObject * _obj2 = 0; - char * _argc3 = 0; - PyObject * _obj4 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siOs|O:wxMenu_AppendMenu",&_argc0,&_arg1,&_obj2,&_argc3,&_obj4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_AppendMenu. Expected _wxMenu_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxMenu_AppendMenu. Expected _wxMenu_p."); - return NULL; - } - } - if (_obj4) -{ - if (!PyString_Check(_obj4)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg4 = new wxString(PyString_AsString(_obj4)); -} - wxMenu_AppendMenu(_arg0,_arg1,*_arg2,_arg3,*_arg4); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} -{ - if (_obj4) - delete _arg4; -} - return _resultobj; -} - -#define wxMenu_AppendSeparator(_swigobj) (_swigobj->AppendSeparator()) -static PyObject *_wrap_wxMenu_AppendSeparator(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenu_AppendSeparator",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_AppendSeparator. Expected _wxMenu_p."); - return NULL; - } - } - wxMenu_AppendSeparator(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMenu_Break(_swigobj) (_swigobj->Break()) -static PyObject *_wrap_wxMenu_Break(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenu_Break",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_Break. Expected _wxMenu_p."); - return NULL; - } - } - wxMenu_Break(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMenu_Check(_swigobj,_swigarg0,_swigarg1) (_swigobj->Check(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMenu_Check(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _arg0; - int _arg1; - bool _arg2; - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxMenu_Check",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_Check. Expected _wxMenu_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - wxMenu_Check(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMenu_Enable(_swigobj,_swigarg0,_swigarg1) (_swigobj->Enable(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMenu_Enable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _arg0; - int _arg1; - bool _arg2; - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxMenu_Enable",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_Enable. Expected _wxMenu_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - wxMenu_Enable(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMenu_FindItem(_swigobj,_swigarg0) (_swigobj->FindItem(_swigarg0)) -static PyObject *_wrap_wxMenu_FindItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxMenu * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxMenu_FindItem",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_FindItem. Expected _wxMenu_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - _result = (int )wxMenu_FindItem(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxMenu_GetTitle(_swigobj) (_swigobj->GetTitle()) -static PyObject *_wrap_wxMenu_GetTitle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxMenu * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenu_GetTitle",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_GetTitle. Expected _wxMenu_p."); - return NULL; - } - } - _result = new wxString (wxMenu_GetTitle(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxMenu_SetTitle(_swigobj,_swigarg0) (_swigobj->SetTitle(_swigarg0)) -static PyObject *_wrap_wxMenu_SetTitle(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxMenu_SetTitle",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_SetTitle. Expected _wxMenu_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxMenu_SetTitle(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxMenu_FindItemForId(_swigobj,_swigarg0) (_swigobj->FindItemForId(_swigarg0)) -static PyObject *_wrap_wxMenu_FindItemForId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuItem * _result; - wxMenu * _arg0; - int _arg1; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenu_FindItemForId",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_FindItemForId. Expected _wxMenu_p."); - return NULL; - } - } - _result = (wxMenuItem *)wxMenu_FindItemForId(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMenu_GetHelpString(_swigobj,_swigarg0) (_swigobj->GetHelpString(_swigarg0)) -static PyObject *_wrap_wxMenu_GetHelpString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxMenu * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenu_GetHelpString",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_GetHelpString. Expected _wxMenu_p."); - return NULL; - } - } - _result = new wxString (wxMenu_GetHelpString(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxMenu_GetLabel(_swigobj,_swigarg0) (_swigobj->GetLabel(_swigarg0)) -static PyObject *_wrap_wxMenu_GetLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxMenu * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenu_GetLabel",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_GetLabel. Expected _wxMenu_p."); - return NULL; - } - } - _result = new wxString (wxMenu_GetLabel(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxMenu_SetHelpString(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetHelpString(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMenu_SetHelpString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _arg0; - int _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siO:wxMenu_SetHelpString",&_argc0,&_arg1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_SetHelpString. Expected _wxMenu_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - wxMenu_SetHelpString(_arg0,_arg1,*_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxMenu_IsChecked(_swigobj,_swigarg0) (_swigobj->IsChecked(_swigarg0)) -static PyObject *_wrap_wxMenu_IsChecked(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMenu * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenu_IsChecked",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_IsChecked. Expected _wxMenu_p."); - return NULL; - } - } - _result = (bool )wxMenu_IsChecked(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMenu_IsEnabled(_swigobj,_swigarg0) (_swigobj->IsEnabled(_swigarg0)) -static PyObject *_wrap_wxMenu_IsEnabled(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMenu * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenu_IsEnabled",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_IsEnabled. Expected _wxMenu_p."); - return NULL; - } - } - _result = (bool )wxMenu_IsEnabled(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMenu_SetLabel(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetLabel(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMenu_SetLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _arg0; - int _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siO:wxMenu_SetLabel",&_argc0,&_arg1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_SetLabel. Expected _wxMenu_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - wxMenu_SetLabel(_arg0,_arg1,*_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -static void *SwigwxPyMenuTowxMenu(void *ptr) { - wxPyMenu *src; - wxMenu *dest; - src = (wxPyMenu *) ptr; - dest = (wxMenu *) src; - return (void *) dest; -} - -static void *SwigwxPyMenuTowxEvtHandler(void *ptr) { - wxPyMenu *src; - wxEvtHandler *dest; - src = (wxPyMenu *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxPyMenu(_swigarg0,_swigarg1) (new wxPyMenu(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxPyMenu(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyMenu * _result; - wxString * _arg0 = &wxPyEmptyStr; - PyObject * _arg1 = NULL; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"|OO:new_wxPyMenu",&_obj0,&_obj1)) - return NULL; - if (_obj0) -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0)); -} - if (_obj1) -{ - _arg1 = _obj1; -} - _result = (wxPyMenu *)new_wxPyMenu(*_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyMenu_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -#define delete_wxPyMenu(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxPyMenu(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyMenu * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxPyMenu",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPyMenu. Expected _wxPyMenu_p."); - return NULL; - } - } - delete_wxPyMenu(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxMenuBarTowxEvtHandler(void *ptr) { - wxMenuBar *src; - wxEvtHandler *dest; - src = (wxMenuBar *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxMenuBar() (new wxMenuBar()) -static PyObject *_wrap_new_wxMenuBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuBar * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxMenuBar")) - return NULL; - _result = (wxMenuBar *)new_wxMenuBar(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMenuBar_Append(_swigobj,_swigarg0,_swigarg1) (_swigobj->Append(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMenuBar_Append(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuBar * _arg0; - wxMenu * _arg1; - wxString * _arg2; - char * _argc0 = 0; - char * _argc1 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ssO:wxMenuBar_Append",&_argc0,&_argc1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_Append. Expected _wxMenuBar_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMenuBar_Append. Expected _wxMenu_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - wxMenuBar_Append(_arg0,_arg1,*_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxMenuBar_Check(_swigobj,_swigarg0,_swigarg1) (_swigobj->Check(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMenuBar_Check(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuBar * _arg0; - int _arg1; - bool _arg2; - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxMenuBar_Check",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_Check. Expected _wxMenuBar_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - wxMenuBar_Check(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMenuBar_Checked(_swigobj,_swigarg0) (_swigobj->Checked(_swigarg0)) -static PyObject *_wrap_wxMenuBar_Checked(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMenuBar * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenuBar_Checked",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_Checked. Expected _wxMenuBar_p."); - return NULL; - } - } - _result = (bool )wxMenuBar_Checked(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMenuBar_Enable(_swigobj,_swigarg0,_swigarg1) (_swigobj->Enable(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMenuBar_Enable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuBar * _arg0; - int _arg1; - bool _arg2; - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxMenuBar_Enable",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_Enable. Expected _wxMenuBar_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - wxMenuBar_Enable(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMenuBar_Enabled(_swigobj,_swigarg0) (_swigobj->Enabled(_swigarg0)) -static PyObject *_wrap_wxMenuBar_Enabled(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMenuBar * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenuBar_Enabled",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_Enabled. Expected _wxMenuBar_p."); - return NULL; - } - } - _result = (bool )wxMenuBar_Enabled(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMenuBar_FindMenuItem(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindMenuItem(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMenuBar_FindMenuItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxMenuBar * _arg0; - wxString * _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sOO:wxMenuBar_FindMenuItem",&_argc0,&_obj1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_FindMenuItem. Expected _wxMenuBar_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - _result = (int )wxMenuBar_FindMenuItem(_arg0,*_arg1,*_arg2); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxMenuBar_FindItemForId(_swigobj,_swigarg0) (_swigobj->FindItemForId(_swigarg0)) -static PyObject *_wrap_wxMenuBar_FindItemForId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuItem * _result; - wxMenuBar * _arg0; - int _arg1; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenuBar_FindItemForId",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_FindItemForId. Expected _wxMenuBar_p."); - return NULL; - } - } - _result = (wxMenuItem *)wxMenuBar_FindItemForId(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMenuBar_EnableTop(_swigobj,_swigarg0,_swigarg1) (_swigobj->EnableTop(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMenuBar_EnableTop(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuBar * _arg0; - int _arg1; - bool _arg2; - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxMenuBar_EnableTop",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_EnableTop. Expected _wxMenuBar_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - wxMenuBar_EnableTop(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMenuBar_GetHelpString(_swigobj,_swigarg0) (_swigobj->GetHelpString(_swigarg0)) -static PyObject *_wrap_wxMenuBar_GetHelpString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxMenuBar * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenuBar_GetHelpString",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_GetHelpString. Expected _wxMenuBar_p."); - return NULL; - } - } - _result = new wxString (wxMenuBar_GetHelpString(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxMenuBar_GetLabel(_swigobj,_swigarg0) (_swigobj->GetLabel(_swigarg0)) -static PyObject *_wrap_wxMenuBar_GetLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxMenuBar * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenuBar_GetLabel",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_GetLabel. Expected _wxMenuBar_p."); - return NULL; - } - } - _result = new wxString (wxMenuBar_GetLabel(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxMenuBar_SetHelpString(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetHelpString(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMenuBar_SetHelpString(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuBar * _arg0; - int _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siO:wxMenuBar_SetHelpString",&_argc0,&_arg1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_SetHelpString. Expected _wxMenuBar_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - wxMenuBar_SetHelpString(_arg0,_arg1,*_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxMenuBar_SetLabel(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetLabel(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMenuBar_SetLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuBar * _arg0; - int _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siO:wxMenuBar_SetLabel",&_argc0,&_arg1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_SetLabel. Expected _wxMenuBar_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - wxMenuBar_SetLabel(_arg0,_arg1,*_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxMenuBar_GetLabelTop(_swigobj,_swigarg0) (_swigobj->GetLabelTop(_swigarg0)) -static PyObject *_wrap_wxMenuBar_GetLabelTop(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxMenuBar * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenuBar_GetLabelTop",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_GetLabelTop. Expected _wxMenuBar_p."); - return NULL; - } - } - _result = new wxString (wxMenuBar_GetLabelTop(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxMenuBar_SetLabelTop(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetLabelTop(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxMenuBar_SetLabelTop(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuBar * _arg0; - int _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siO:wxMenuBar_SetLabelTop",&_argc0,&_arg1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_SetLabelTop. Expected _wxMenuBar_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - wxMenuBar_SetLabelTop(_arg0,_arg1,*_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxMenuBar_GetMenuCount(_swigobj) (_swigobj->GetMenuCount()) -static PyObject *_wrap_wxMenuBar_GetMenuCount(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxMenuBar * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuBar_GetMenuCount",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_GetMenuCount. Expected _wxMenuBar_p."); - return NULL; - } - } - _result = (int )wxMenuBar_GetMenuCount(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMenuBar_GetMenu(_swigobj,_swigarg0) (_swigobj->GetMenu(_swigarg0)) -static PyObject *_wrap_wxMenuBar_GetMenu(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _result; - wxMenuBar * _arg0; - int _arg1; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxMenuBar_GetMenu",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_GetMenu. Expected _wxMenuBar_p."); - return NULL; - } - } - _result = (wxMenu *)wxMenuBar_GetMenu(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMenuItem_IsSeparator(_swigobj) (_swigobj->IsSeparator()) -static PyObject *_wrap_wxMenuItem_IsSeparator(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMenuItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuItem_IsSeparator",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_IsSeparator. Expected _wxMenuItem_p."); - return NULL; - } - } - _result = (bool )wxMenuItem_IsSeparator(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMenuItem_IsEnabled(_swigobj) (_swigobj->IsEnabled()) -static PyObject *_wrap_wxMenuItem_IsEnabled(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMenuItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuItem_IsEnabled",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_IsEnabled. Expected _wxMenuItem_p."); - return NULL; - } - } - _result = (bool )wxMenuItem_IsEnabled(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMenuItem_IsChecked(_swigobj) (_swigobj->IsChecked()) -static PyObject *_wrap_wxMenuItem_IsChecked(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMenuItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuItem_IsChecked",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_IsChecked. Expected _wxMenuItem_p."); - return NULL; - } - } - _result = (bool )wxMenuItem_IsChecked(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMenuItem_IsCheckable(_swigobj) (_swigobj->IsCheckable()) -static PyObject *_wrap_wxMenuItem_IsCheckable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxMenuItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuItem_IsCheckable",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_IsCheckable. Expected _wxMenuItem_p."); - return NULL; - } - } - _result = (bool )wxMenuItem_IsCheckable(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMenuItem_GetId(_swigobj) (_swigobj->GetId()) -static PyObject *_wrap_wxMenuItem_GetId(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxMenuItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuItem_GetId",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_GetId. Expected _wxMenuItem_p."); - return NULL; - } - } - _result = (int )wxMenuItem_GetId(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxMenuItem_GetSubMenu(_swigobj) (_swigobj->GetSubMenu()) -static PyObject *_wrap_wxMenuItem_GetSubMenu(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenu * _result; - wxMenuItem * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuItem_GetSubMenu",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_GetSubMenu. Expected _wxMenuItem_p."); - return NULL; - } - } - _result = (wxMenu *)wxMenuItem_GetSubMenu(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxMenuItem_SetName(_swigobj,_swigarg0) (_swigobj->SetName(_swigarg0)) -static PyObject *_wrap_wxMenuItem_SetName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuItem * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxMenuItem_SetName",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_SetName. Expected _wxMenuItem_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxMenuItem_SetName(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxMenuItem_DeleteSubMenu(_swigobj) (_swigobj->DeleteSubMenu()) -static PyObject *_wrap_wxMenuItem_DeleteSubMenu(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuItem_DeleteSubMenu",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_DeleteSubMenu. Expected _wxMenuItem_p."); - return NULL; - } - } - wxMenuItem_DeleteSubMenu(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMenuItem_GetName(_swigobj) (_swigobj->GetName()) -static PyObject *_wrap_wxMenuItem_GetName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxMenuItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuItem_GetName",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_GetName. Expected _wxMenuItem_p."); - return NULL; - } - } - const wxString & _result_ref = wxMenuItem_GetName(_arg0); - _result = (wxString *) &_result_ref; -{ - _resultobj = PyString_FromString(WXSTRINGCAST (*_result)); -} - return _resultobj; -} - -#define wxMenuItem_GetHelp(_swigobj) (_swigobj->GetHelp()) -static PyObject *_wrap_wxMenuItem_GetHelp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxMenuItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuItem_GetHelp",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_GetHelp. Expected _wxMenuItem_p."); - return NULL; - } - } - const wxString & _result_ref = wxMenuItem_GetHelp(_arg0); - _result = (wxString *) &_result_ref; -{ - _resultobj = PyString_FromString(WXSTRINGCAST (*_result)); -} - return _resultobj; -} - -#define wxMenuItem_SetHelp(_swigobj,_swigarg0) (_swigobj->SetHelp(_swigarg0)) -static PyObject *_wrap_wxMenuItem_SetHelp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuItem * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxMenuItem_SetHelp",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_SetHelp. Expected _wxMenuItem_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxMenuItem_SetHelp(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxMenuItem_Enable(_swigobj,_swigarg0) (_swigobj->Enable(_swigarg0)) -static PyObject *_wrap_wxMenuItem_Enable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuItem * _arg0; - bool _arg1 = (1); - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxMenuItem_Enable",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_Enable. Expected _wxMenuItem_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxMenuItem_Enable(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxMenuItem_Check(_swigobj,_swigarg0) (_swigobj->Check(_swigarg0)) -static PyObject *_wrap_wxMenuItem_Check(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuItem * _arg0; - bool _arg1 = (1); - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxMenuItem_Check",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_Check. Expected _wxMenuItem_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxMenuItem_Check(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyMethodDef windowscMethods[] = { - { "wxMenuItem_Check", _wrap_wxMenuItem_Check, 1 }, - { "wxMenuItem_Enable", _wrap_wxMenuItem_Enable, 1 }, - { "wxMenuItem_SetHelp", _wrap_wxMenuItem_SetHelp, 1 }, - { "wxMenuItem_GetHelp", _wrap_wxMenuItem_GetHelp, 1 }, - { "wxMenuItem_GetName", _wrap_wxMenuItem_GetName, 1 }, - { "wxMenuItem_DeleteSubMenu", _wrap_wxMenuItem_DeleteSubMenu, 1 }, - { "wxMenuItem_SetName", _wrap_wxMenuItem_SetName, 1 }, - { "wxMenuItem_GetSubMenu", _wrap_wxMenuItem_GetSubMenu, 1 }, - { "wxMenuItem_GetId", _wrap_wxMenuItem_GetId, 1 }, - { "wxMenuItem_IsCheckable", _wrap_wxMenuItem_IsCheckable, 1 }, - { "wxMenuItem_IsChecked", _wrap_wxMenuItem_IsChecked, 1 }, - { "wxMenuItem_IsEnabled", _wrap_wxMenuItem_IsEnabled, 1 }, - { "wxMenuItem_IsSeparator", _wrap_wxMenuItem_IsSeparator, 1 }, - { "wxMenuBar_GetMenu", _wrap_wxMenuBar_GetMenu, 1 }, - { "wxMenuBar_GetMenuCount", _wrap_wxMenuBar_GetMenuCount, 1 }, - { "wxMenuBar_SetLabelTop", _wrap_wxMenuBar_SetLabelTop, 1 }, - { "wxMenuBar_GetLabelTop", _wrap_wxMenuBar_GetLabelTop, 1 }, - { "wxMenuBar_SetLabel", _wrap_wxMenuBar_SetLabel, 1 }, - { "wxMenuBar_SetHelpString", _wrap_wxMenuBar_SetHelpString, 1 }, - { "wxMenuBar_GetLabel", _wrap_wxMenuBar_GetLabel, 1 }, - { "wxMenuBar_GetHelpString", _wrap_wxMenuBar_GetHelpString, 1 }, - { "wxMenuBar_EnableTop", _wrap_wxMenuBar_EnableTop, 1 }, - { "wxMenuBar_FindItemForId", _wrap_wxMenuBar_FindItemForId, 1 }, - { "wxMenuBar_FindMenuItem", _wrap_wxMenuBar_FindMenuItem, 1 }, - { "wxMenuBar_Enabled", _wrap_wxMenuBar_Enabled, 1 }, - { "wxMenuBar_Enable", _wrap_wxMenuBar_Enable, 1 }, - { "wxMenuBar_Checked", _wrap_wxMenuBar_Checked, 1 }, - { "wxMenuBar_Check", _wrap_wxMenuBar_Check, 1 }, - { "wxMenuBar_Append", _wrap_wxMenuBar_Append, 1 }, - { "new_wxMenuBar", _wrap_new_wxMenuBar, 1 }, - { "delete_wxPyMenu", _wrap_delete_wxPyMenu, 1 }, - { "new_wxPyMenu", _wrap_new_wxPyMenu, 1 }, - { "wxMenu_SetLabel", _wrap_wxMenu_SetLabel, 1 }, - { "wxMenu_IsEnabled", _wrap_wxMenu_IsEnabled, 1 }, - { "wxMenu_IsChecked", _wrap_wxMenu_IsChecked, 1 }, - { "wxMenu_SetHelpString", _wrap_wxMenu_SetHelpString, 1 }, - { "wxMenu_GetLabel", _wrap_wxMenu_GetLabel, 1 }, - { "wxMenu_GetHelpString", _wrap_wxMenu_GetHelpString, 1 }, - { "wxMenu_FindItemForId", _wrap_wxMenu_FindItemForId, 1 }, - { "wxMenu_SetTitle", _wrap_wxMenu_SetTitle, 1 }, - { "wxMenu_GetTitle", _wrap_wxMenu_GetTitle, 1 }, - { "wxMenu_FindItem", _wrap_wxMenu_FindItem, 1 }, - { "wxMenu_Enable", _wrap_wxMenu_Enable, 1 }, - { "wxMenu_Check", _wrap_wxMenu_Check, 1 }, - { "wxMenu_Break", _wrap_wxMenu_Break, 1 }, - { "wxMenu_AppendSeparator", _wrap_wxMenu_AppendSeparator, 1 }, - { "wxMenu_AppendMenu", _wrap_wxMenu_AppendMenu, 1 }, - { "wxMenu_Append", _wrap_wxMenu_Append, 1 }, - { "new_wxMenu", _wrap_new_wxMenu, 1 }, - { "wxScrolledWindow_ViewStart", _wrap_wxScrolledWindow_ViewStart, 1 }, - { "wxScrolledWindow_SetScrollbars", _wrap_wxScrolledWindow_SetScrollbars, 1 }, - { "wxScrolledWindow_Scroll", _wrap_wxScrolledWindow_Scroll, 1 }, - { "wxScrolledWindow_PrepareDC", _wrap_wxScrolledWindow_PrepareDC, 1 }, - { "wxScrolledWindow_IsRetained", _wrap_wxScrolledWindow_IsRetained, 1 }, - { "wxScrolledWindow_GetVirtualSize", _wrap_wxScrolledWindow_GetVirtualSize, 1 }, - { "wxScrolledWindow_GetScrollPixelsPerUnit", _wrap_wxScrolledWindow_GetScrollPixelsPerUnit, 1 }, - { "wxScrolledWindow_EnableScrolling", _wrap_wxScrolledWindow_EnableScrolling, 1 }, - { "new_wxScrolledWindow", _wrap_new_wxScrolledWindow, 1 }, - { "wxDialog_ShowModal", _wrap_wxDialog_ShowModal, 1 }, - { "wxDialog_Show", _wrap_wxDialog_Show, 1 }, - { "wxDialog_SetTitle", _wrap_wxDialog_SetTitle, 1 }, - { "wxDialog_IsModal", _wrap_wxDialog_IsModal, 1 }, - { "wxDialog_SetModal", _wrap_wxDialog_SetModal, 1 }, - { "wxDialog_IsIconized", _wrap_wxDialog_IsIconized, 1 }, - { "wxDialog_Iconize", _wrap_wxDialog_Iconize, 1 }, - { "wxDialog_GetTitle", _wrap_wxDialog_GetTitle, 1 }, - { "wxDialog_EndModal", _wrap_wxDialog_EndModal, 1 }, - { "wxDialog_Centre", _wrap_wxDialog_Centre, 1 }, - { "new_wxDialog", _wrap_new_wxDialog, 1 }, - { "wxPanel_InitDialog", _wrap_wxPanel_InitDialog, 1 }, - { "new_wxPanel", _wrap_new_wxPanel, 1 }, - { "new_wxMiniFrame", _wrap_new_wxMiniFrame, 1 }, - { "wxFrame_SetTitle", _wrap_wxFrame_SetTitle, 1 }, - { "wxFrame_SetStatusWidths", _wrap_wxFrame_SetStatusWidths, 1 }, - { "wxFrame_SetStatusText", _wrap_wxFrame_SetStatusText, 1 }, - { "wxFrame_SetMenuBar", _wrap_wxFrame_SetMenuBar, 1 }, - { "wxFrame_SetIcon", _wrap_wxFrame_SetIcon, 1 }, - { "wxFrame_SetAcceleratorTable", _wrap_wxFrame_SetAcceleratorTable, 1 }, - { "wxFrame_Maximize", _wrap_wxFrame_Maximize, 1 }, - { "wxFrame_IsIconized", _wrap_wxFrame_IsIconized, 1 }, - { "wxFrame_Iconize", _wrap_wxFrame_Iconize, 1 }, - { "wxFrame_GetTitle", _wrap_wxFrame_GetTitle, 1 }, - { "wxFrame_GetStatusBar", _wrap_wxFrame_GetStatusBar, 1 }, - { "wxFrame_GetMenuBar", _wrap_wxFrame_GetMenuBar, 1 }, - { "wxFrame_CreateStatusBar", _wrap_wxFrame_CreateStatusBar, 1 }, - { "wxFrame_Command", _wrap_wxFrame_Command, 1 }, - { "wxFrame_Centre", _wrap_wxFrame_Centre, 1 }, - { "new_wxFrame", _wrap_new_wxFrame, 1 }, - { "wxWindow_WarpPointer", _wrap_wxWindow_WarpPointer, 1 }, - { "wxWindow_Validate", _wrap_wxWindow_Validate, 1 }, - { "wxWindow_TransferDataToWindow", _wrap_wxWindow_TransferDataToWindow, 1 }, - { "wxWindow_TransferDataFromWindow", _wrap_wxWindow_TransferDataFromWindow, 1 }, - { "wxWindow_Show", _wrap_wxWindow_Show, 1 }, - { "wxWindow_SetTitle", _wrap_wxWindow_SetTitle, 1 }, - { "wxWindow_SetCursor", _wrap_wxWindow_SetCursor, 1 }, - { "wxWindow_SetClientSize", _wrap_wxWindow_SetClientSize, 1 }, - { "wxWindow_SetSizeHints", _wrap_wxWindow_SetSizeHints, 1 }, - { "wxWindow_SetPosition", _wrap_wxWindow_SetPosition, 1 }, - { "wxWindow_SetSize", _wrap_wxWindow_SetSize, 1 }, - { "wxWindow_SetDimensions", _wrap_wxWindow_SetDimensions, 1 }, - { "wxWindow_SetScrollPos", _wrap_wxWindow_SetScrollPos, 1 }, - { "wxWindow_SetScrollbar", _wrap_wxWindow_SetScrollbar, 1 }, - { "wxWindow_SetReturnCode", _wrap_wxWindow_SetReturnCode, 1 }, - { "wxWindow_SetName", _wrap_wxWindow_SetName, 1 }, - { "wxWindow_SetId", _wrap_wxWindow_SetId, 1 }, - { "wxWindow_SetForegroundColour", _wrap_wxWindow_SetForegroundColour, 1 }, - { "wxWindow_SetFont", _wrap_wxWindow_SetFont, 1 }, - { "wxWindow_SetFocus", _wrap_wxWindow_SetFocus, 1 }, - { "wxWindow_SetDoubleClick", _wrap_wxWindow_SetDoubleClick, 1 }, - { "wxWindow_SetConstraints", _wrap_wxWindow_SetConstraints, 1 }, - { "wxWindow_SetBackgroundColour", _wrap_wxWindow_SetBackgroundColour, 1 }, - { "wxWindow_SetAutoLayout", _wrap_wxWindow_SetAutoLayout, 1 }, - { "wxWindow_ScrollWindow", _wrap_wxWindow_ScrollWindow, 1 }, - { "wxWindow_ScreenToClient", _wrap_wxWindow_ScreenToClient, 1 }, - { "wxWindow_ReleaseMouse", _wrap_wxWindow_ReleaseMouse, 1 }, - { "wxWindow_Refresh", _wrap_wxWindow_Refresh, 1 }, - { "wxWindow_Raise", _wrap_wxWindow_Raise, 1 }, - { "wxWindow_PopupMenu", _wrap_wxWindow_PopupMenu, 1 }, - { "wxWindow_Move", _wrap_wxWindow_Move, 1 }, - { "wxWindow_MakeModal", _wrap_wxWindow_MakeModal, 1 }, - { "wxWindow_Lower", _wrap_wxWindow_Lower, 1 }, - { "wxWindow_LoadFromResource", _wrap_wxWindow_LoadFromResource, 1 }, - { "wxWindow_Layout", _wrap_wxWindow_Layout, 1 }, - { "wxWindow_IsShown", _wrap_wxWindow_IsShown, 1 }, - { "wxWindow_IsRetained", _wrap_wxWindow_IsRetained, 1 }, - { "wxWindow_IsEnabled", _wrap_wxWindow_IsEnabled, 1 }, - { "wxWindow_InitDialog", _wrap_wxWindow_InitDialog, 1 }, - { "wxWindow_GetWindowStyleFlag", _wrap_wxWindow_GetWindowStyleFlag, 1 }, - { "wxWindow_GetTitle", _wrap_wxWindow_GetTitle, 1 }, - { "wxWindow_GetTextExtent", _wrap_wxWindow_GetTextExtent, 1 }, - { "wxWindow_GetSize", _wrap_wxWindow_GetSize, 1 }, - { "wxWindow_GetScrollRange", _wrap_wxWindow_GetScrollRange, 1 }, - { "wxWindow_GetScrollPos", _wrap_wxWindow_GetScrollPos, 1 }, - { "wxWindow_GetScrollThumb", _wrap_wxWindow_GetScrollThumb, 1 }, - { "wxWindow_GetReturnCode", _wrap_wxWindow_GetReturnCode, 1 }, - { "wxWindow_GetParent", _wrap_wxWindow_GetParent, 1 }, - { "wxWindow_GetName", _wrap_wxWindow_GetName, 1 }, - { "wxWindow_GetLabel", _wrap_wxWindow_GetLabel, 1 }, - { "wxWindow_GetPosition", _wrap_wxWindow_GetPosition, 1 }, - { "wxWindow_GetId", _wrap_wxWindow_GetId, 1 }, - { "wxWindow_GetGrandParent", _wrap_wxWindow_GetGrandParent, 1 }, - { "wxWindow_GetForegroundColour", _wrap_wxWindow_GetForegroundColour, 1 }, - { "wxWindow_GetFont", _wrap_wxWindow_GetFont, 1 }, - { "wxWindow_GetDefaultItem", _wrap_wxWindow_GetDefaultItem, 1 }, - { "wxWindow_GetConstraints", _wrap_wxWindow_GetConstraints, 1 }, - { "wxWindow_GetClientSize", _wrap_wxWindow_GetClientSize, 1 }, - { "wxWindow_GetCharWidth", _wrap_wxWindow_GetCharWidth, 1 }, - { "wxWindow_GetCharHeight", _wrap_wxWindow_GetCharHeight, 1 }, - { "wxWindow_GetBackgroundColour", _wrap_wxWindow_GetBackgroundColour, 1 }, - { "wxWindow_Fit", _wrap_wxWindow_Fit, 1 }, - { "wxWindow_FindWindowByName", _wrap_wxWindow_FindWindowByName, 1 }, - { "wxWindow_FindWindowByID", _wrap_wxWindow_FindWindowByID, 1 }, - { "wxWindow_Enable", _wrap_wxWindow_Enable, 1 }, - { "wxWindow_DragAcceptFiles", _wrap_wxWindow_DragAcceptFiles, 1 }, - { "wxWindow_DestroyChildren", _wrap_wxWindow_DestroyChildren, 1 }, - { "wxWindow_Destroy", _wrap_wxWindow_Destroy, 1 }, - { "wxWindow_Close", _wrap_wxWindow_Close, 1 }, - { "wxWindow_ClientToScreen", _wrap_wxWindow_ClientToScreen, 1 }, - { "wxWindow_Centre", _wrap_wxWindow_Centre, 1 }, - { "wxWindow_Center", _wrap_wxWindow_Center, 1 }, - { "wxWindow_CaptureMouse", _wrap_wxWindow_CaptureMouse, 1 }, - { "new_wxWindow", _wrap_new_wxWindow, 1 }, - { "wxEvtHandler_Connect", _wrap_wxEvtHandler_Connect, 1 }, - { "wxWindow_FindFocus", _wrap_wxWindow_FindFocus, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initwindowsc)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("windowsc", windowscMethods); - d = PyModule_GetDict(m); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_wxAcceleratorTable","_class_wxAcceleratorTable",0); - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMenuBar",SwigwxMenuBarTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxMenuBar",SwigwxMenuBarTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxPyMenu",SwigwxPyMenuTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxPyMenu",SwigwxPyMenuTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMenu",SwigwxMenuTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxMenu",SwigwxMenuTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxScrolledWindow",SwigwxScrolledWindowTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxScrolledWindow",SwigwxScrolledWindowTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxDialog",SwigwxDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxDialog",SwigwxDialogTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxPanel",SwigwxPanelTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxPanel",SwigwxPanelTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMiniFrame",SwigwxMiniFrameTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxMiniFrame",SwigwxMiniFrameTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxFrame",SwigwxFrameTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxFrame",SwigwxFrameTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxWindow",SwigwxWindowTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxWindow",SwigwxWindowTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxEvtHandler",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); - SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); - SWIG_RegisterMapping("_wxPen","_class_wxPen",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_long","_wxDash",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_class_wxAcceleratorTable","_wxAcceleratorTable",0); - SWIG_RegisterMapping("_wxDC","_class_wxDC",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_wxPrinterDC","_class_wxPrinterDC",0); - SWIG_RegisterMapping("_class_wxMenuItem","_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxPanel","_class_wxDialog",SwigwxDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_wxDialog",SwigwxDialogTowxPanel); - SWIG_RegisterMapping("_wxPanel","_class_wxPanel",0); - SWIG_RegisterMapping("_class_wxMask","_wxMask",0); - SWIG_RegisterMapping("_wxColour","_class_wxColour",0); - SWIG_RegisterMapping("_class_wxDialog","_wxDialog",0); - SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); - SWIG_RegisterMapping("_wxMiniFrame","_class_wxMiniFrame",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_wxFont","_class_wxFont",0); - SWIG_RegisterMapping("_unsigned_long","_wxDash",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxDC","_wxDC",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_wxAcceleratorEntry","_class_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_class_wxPanel","_class_wxDialog",SwigwxDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxDialog",SwigwxDialogTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxPanel",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxMetaFileDC","_class_wxMetaFileDC",0); - SWIG_RegisterMapping("_wxMenu","_class_wxPyMenu",SwigwxPyMenuTowxMenu); - SWIG_RegisterMapping("_wxMenu","_wxPyMenu",SwigwxPyMenuTowxMenu); - SWIG_RegisterMapping("_wxMenu","_class_wxMenu",0); - SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_class_wxBrush","_wxBrush",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxWindow","_class_wxScrolledWindow",SwigwxScrolledWindowTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxScrolledWindow",SwigwxScrolledWindowTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxDialog",SwigwxDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxDialog",SwigwxDialogTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxPanel",SwigwxPanelTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxPanel",SwigwxPanelTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxMiniFrame",SwigwxMiniFrameTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxMiniFrame",SwigwxMiniFrameTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxFrame",SwigwxFrameTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxFrame",SwigwxFrameTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxWindow",0); - SWIG_RegisterMapping("_class_wxFont","_wxFont",0); - SWIG_RegisterMapping("_wxClientDC","_class_wxClientDC",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_wxMemoryDC","_class_wxMemoryDC",0); - SWIG_RegisterMapping("_wxPaintDC","_class_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxAcceleratorEntry","_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); - SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_class_wxMetaFileDC","_wxMetaFileDC",0); - SWIG_RegisterMapping("_class_wxMenu","_class_wxPyMenu",SwigwxPyMenuTowxMenu); - SWIG_RegisterMapping("_class_wxMenu","_wxPyMenu",SwigwxPyMenuTowxMenu); - SWIG_RegisterMapping("_class_wxMenu","_wxMenu",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); - SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); - SWIG_RegisterMapping("_class_wxPen","_wxPen",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_wxFrame","_class_wxMiniFrame",SwigwxMiniFrameTowxFrame); - SWIG_RegisterMapping("_wxFrame","_wxMiniFrame",SwigwxMiniFrameTowxFrame); - SWIG_RegisterMapping("_wxFrame","_class_wxFrame",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxPrinterDC","_wxPrinterDC",0); - SWIG_RegisterMapping("_class_wxPaintDC","_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_class_wxIcon","_wxIcon",0); - SWIG_RegisterMapping("_class_wxColour","_wxColour",0); - SWIG_RegisterMapping("_class_wxScreenDC","_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxMiniFrame","_wxMiniFrame",0); - SWIG_RegisterMapping("_class_wxClientDC","_wxClientDC",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); - SWIG_RegisterMapping("_class_wxBitmap","_wxBitmap",0); - SWIG_RegisterMapping("_class_wxMemoryDC","_wxMemoryDC",0); - SWIG_RegisterMapping("_wxMenuBar","_class_wxMenuBar",0); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxMenuBar",SwigwxMenuBarTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxMenuBar",SwigwxMenuBarTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxPyMenu",SwigwxPyMenuTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxPyMenu",SwigwxPyMenuTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxMenu",SwigwxMenuTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxMenu",SwigwxMenuTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxScrolledWindow",SwigwxScrolledWindowTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxScrolledWindow",SwigwxScrolledWindowTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxDialog",SwigwxDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxDialog",SwigwxDialogTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxPanel",SwigwxPanelTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxPanel",SwigwxPanelTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxMiniFrame",SwigwxMiniFrameTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxMiniFrame",SwigwxMiniFrameTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxFrame",SwigwxFrameTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxFrame",SwigwxFrameTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxWindow",SwigwxWindowTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxWindow",SwigwxWindowTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxEvtHandler",0); - SWIG_RegisterMapping("_wxMenuItem","_class_wxMenuItem",0); - SWIG_RegisterMapping("_wxDash","_unsigned_long",0); - SWIG_RegisterMapping("_wxDash","_long",0); - SWIG_RegisterMapping("_class_wxScrolledWindow","_wxScrolledWindow",0); - SWIG_RegisterMapping("_wxWindow","_class_wxScrolledWindow",SwigwxScrolledWindowTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxScrolledWindow",SwigwxScrolledWindowTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxDialog",SwigwxDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxDialog",SwigwxDialogTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxPanel",SwigwxPanelTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxPanel",SwigwxPanelTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxMiniFrame",SwigwxMiniFrameTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxMiniFrame",SwigwxMiniFrameTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxFrame",SwigwxFrameTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxFrame",SwigwxFrameTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxWindow",0); - SWIG_RegisterMapping("_class_wxFrame","_class_wxMiniFrame",SwigwxMiniFrameTowxFrame); - SWIG_RegisterMapping("_class_wxFrame","_wxMiniFrame",SwigwxMiniFrameTowxFrame); - SWIG_RegisterMapping("_class_wxFrame","_wxFrame",0); -} diff --git a/utils/wxPython/src/msw/windows.py b/utils/wxPython/src/msw/windows.py deleted file mode 100644 index f4efa42f01..0000000000 --- a/utils/wxPython/src/msw/windows.py +++ /dev/null @@ -1,693 +0,0 @@ -# This file was created automatically by SWIG. -import windowsc - -from misc import * - -from gdi import * -class wxEvtHandlerPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def Connect(self,arg0,arg1,arg2,arg3): - val = windowsc.wxEvtHandler_Connect(self.this,arg0,arg1,arg2,arg3) - return val - def __repr__(self): - return "" -class wxEvtHandler(wxEvtHandlerPtr): - def __init__(self,this): - self.this = this - - - - -class wxWindowPtr(wxEvtHandlerPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def CaptureMouse(self): - val = windowsc.wxWindow_CaptureMouse(self.this) - return val - def Center(self,*args): - val = apply(windowsc.wxWindow_Center,(self.this,)+args) - return val - def Centre(self,*args): - val = apply(windowsc.wxWindow_Centre,(self.this,)+args) - return val - def ClientToScreen(self,arg0,arg1): - val = windowsc.wxWindow_ClientToScreen(self.this,arg0,arg1) - return val - def Close(self,*args): - val = apply(windowsc.wxWindow_Close,(self.this,)+args) - return val - def Destroy(self): - val = windowsc.wxWindow_Destroy(self.this) - return val - def DestroyChildren(self): - val = windowsc.wxWindow_DestroyChildren(self.this) - return val - def DragAcceptFiles(self,arg0): - val = windowsc.wxWindow_DragAcceptFiles(self.this,arg0) - return val - def Enable(self,arg0): - val = windowsc.wxWindow_Enable(self.this,arg0) - return val - def FindWindowByID(self,arg0): - val = windowsc.wxWindow_FindWindowByID(self.this,arg0) - val = wxWindowPtr(val) - return val - def FindWindowByName(self,arg0): - val = windowsc.wxWindow_FindWindowByName(self.this,arg0) - val = wxWindowPtr(val) - return val - def Fit(self): - val = windowsc.wxWindow_Fit(self.this) - return val - def GetBackgroundColour(self): - val = windowsc.wxWindow_GetBackgroundColour(self.this) - val = wxColourPtr(val) - val.thisown = 1 - return val - def GetCharHeight(self): - val = windowsc.wxWindow_GetCharHeight(self.this) - return val - def GetCharWidth(self): - val = windowsc.wxWindow_GetCharWidth(self.this) - return val - def GetClientSize(self): - val = windowsc.wxWindow_GetClientSize(self.this) - return val - def GetConstraints(self): - val = windowsc.wxWindow_GetConstraints(self.this) - val = wxLayoutConstraintsPtr(val) - return val - def GetDefaultItem(self): - val = windowsc.wxWindow_GetDefaultItem(self.this) - val = wxButtonPtr(val) - return val - def GetFont(self): - val = windowsc.wxWindow_GetFont(self.this) - val = wxFontPtr(val) - return val - def GetForegroundColour(self): - val = windowsc.wxWindow_GetForegroundColour(self.this) - val = wxColourPtr(val) - val.thisown = 1 - return val - def GetGrandParent(self): - val = windowsc.wxWindow_GetGrandParent(self.this) - val = wxWindowPtr(val) - return val - def GetId(self): - val = windowsc.wxWindow_GetId(self.this) - return val - def GetPosition(self): - val = windowsc.wxWindow_GetPosition(self.this) - return val - def GetLabel(self): - val = windowsc.wxWindow_GetLabel(self.this) - return val - def GetName(self): - val = windowsc.wxWindow_GetName(self.this) - return val - def GetParent(self): - val = windowsc.wxWindow_GetParent(self.this) - val = wxWindowPtr(val) - return val - def GetReturnCode(self): - val = windowsc.wxWindow_GetReturnCode(self.this) - return val - def GetScrollThumb(self,arg0): - val = windowsc.wxWindow_GetScrollThumb(self.this,arg0) - return val - def GetScrollPos(self,arg0): - val = windowsc.wxWindow_GetScrollPos(self.this,arg0) - return val - def GetScrollRange(self,arg0): - val = windowsc.wxWindow_GetScrollRange(self.this,arg0) - return val - def GetSize(self): - val = windowsc.wxWindow_GetSize(self.this) - return val - def GetTextExtent(self,arg0): - val = windowsc.wxWindow_GetTextExtent(self.this,arg0) - return val - def GetTitle(self): - val = windowsc.wxWindow_GetTitle(self.this) - return val - def GetWindowStyleFlag(self): - val = windowsc.wxWindow_GetWindowStyleFlag(self.this) - return val - def InitDialog(self): - val = windowsc.wxWindow_InitDialog(self.this) - return val - def IsEnabled(self): - val = windowsc.wxWindow_IsEnabled(self.this) - return val - def IsRetained(self): - val = windowsc.wxWindow_IsRetained(self.this) - return val - def IsShown(self): - val = windowsc.wxWindow_IsShown(self.this) - return val - def Layout(self): - val = windowsc.wxWindow_Layout(self.this) - return val - def LoadFromResource(self,arg0,arg1,*args): - val = apply(windowsc.wxWindow_LoadFromResource,(self.this,arg0.this,arg1,)+args) - return val - def Lower(self): - val = windowsc.wxWindow_Lower(self.this) - return val - def MakeModal(self,arg0): - val = windowsc.wxWindow_MakeModal(self.this,arg0) - return val - def Move(self,arg0,arg1): - val = windowsc.wxWindow_Move(self.this,arg0,arg1) - return val - def PopupMenu(self,arg0,arg1,arg2): - val = windowsc.wxWindow_PopupMenu(self.this,arg0.this,arg1,arg2) - return val - def Raise(self): - val = windowsc.wxWindow_Raise(self.this) - return val - def Refresh(self,*args): - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - val = apply(windowsc.wxWindow_Refresh,(self.this,)+args) - return val - def ReleaseMouse(self): - val = windowsc.wxWindow_ReleaseMouse(self.this) - return val - def ScreenToClient(self,arg0,arg1): - val = windowsc.wxWindow_ScreenToClient(self.this,arg0,arg1) - return val - def ScrollWindow(self,arg0,arg1,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(windowsc.wxWindow_ScrollWindow,(self.this,arg0,arg1,)+args) - return val - def SetAutoLayout(self,arg0): - val = windowsc.wxWindow_SetAutoLayout(self.this,arg0) - return val - def SetBackgroundColour(self,arg0): - val = windowsc.wxWindow_SetBackgroundColour(self.this,arg0.this) - return val - def SetConstraints(self,arg0): - val = windowsc.wxWindow_SetConstraints(self.this,arg0.this) - return val - def SetDoubleClick(self,arg0): - val = windowsc.wxWindow_SetDoubleClick(self.this,arg0) - return val - def SetFocus(self): - val = windowsc.wxWindow_SetFocus(self.this) - return val - def SetFont(self,arg0): - val = windowsc.wxWindow_SetFont(self.this,arg0.this) - return val - def SetForegroundColour(self,arg0): - val = windowsc.wxWindow_SetForegroundColour(self.this,arg0.this) - return val - def SetId(self,arg0): - val = windowsc.wxWindow_SetId(self.this,arg0) - return val - def SetName(self,arg0): - val = windowsc.wxWindow_SetName(self.this,arg0) - return val - def SetReturnCode(self,arg0): - val = windowsc.wxWindow_SetReturnCode(self.this,arg0) - return val - def SetScrollbar(self,arg0,arg1,arg2,arg3,*args): - val = apply(windowsc.wxWindow_SetScrollbar,(self.this,arg0,arg1,arg2,arg3,)+args) - return val - def SetScrollPos(self,arg0,arg1,*args): - val = apply(windowsc.wxWindow_SetScrollPos,(self.this,arg0,arg1,)+args) - return val - def SetDimensions(self,arg0,arg1,arg2,arg3,*args): - val = apply(windowsc.wxWindow_SetDimensions,(self.this,arg0,arg1,arg2,arg3,)+args) - return val - def SetSize(self,arg0): - val = windowsc.wxWindow_SetSize(self.this,arg0.this) - return val - def SetPosition(self,arg0): - val = windowsc.wxWindow_SetPosition(self.this,arg0.this) - return val - def SetSizeHints(self,*args): - val = apply(windowsc.wxWindow_SetSizeHints,(self.this,)+args) - return val - def SetClientSize(self,arg0,arg1): - val = windowsc.wxWindow_SetClientSize(self.this,arg0,arg1) - return val - def SetCursor(self,arg0): - val = windowsc.wxWindow_SetCursor(self.this,arg0.this) - return val - def SetTitle(self,arg0): - val = windowsc.wxWindow_SetTitle(self.this,arg0) - return val - def Show(self,arg0): - val = windowsc.wxWindow_Show(self.this,arg0) - return val - def TransferDataFromWindow(self): - val = windowsc.wxWindow_TransferDataFromWindow(self.this) - return val - def TransferDataToWindow(self): - val = windowsc.wxWindow_TransferDataToWindow(self.this) - return val - def Validate(self): - val = windowsc.wxWindow_Validate(self.this) - return val - def WarpPointer(self,arg0,arg1): - val = windowsc.wxWindow_WarpPointer(self.this,arg0,arg1) - return val - def __repr__(self): - return "" -class wxWindow(wxWindowPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxWindow,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - -class wxFramePtr(wxWindowPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Centre(self,*args): - val = apply(windowsc.wxFrame_Centre,(self.this,)+args) - return val - def Command(self,arg0): - val = windowsc.wxFrame_Command(self.this,arg0) - return val - def CreateStatusBar(self,*args): - val = apply(windowsc.wxFrame_CreateStatusBar,(self.this,)+args) - return val - def GetMenuBar(self): - val = windowsc.wxFrame_GetMenuBar(self.this) - val = wxMenuBarPtr(val) - return val - def GetStatusBar(self): - val = windowsc.wxFrame_GetStatusBar(self.this) - return val - def GetTitle(self): - val = windowsc.wxFrame_GetTitle(self.this) - return val - def Iconize(self,arg0): - val = windowsc.wxFrame_Iconize(self.this,arg0) - return val - def IsIconized(self): - val = windowsc.wxFrame_IsIconized(self.this) - return val - def Maximize(self,arg0): - val = windowsc.wxFrame_Maximize(self.this,arg0) - return val - def SetAcceleratorTable(self,arg0): - val = windowsc.wxFrame_SetAcceleratorTable(self.this,arg0.this) - return val - def SetIcon(self,arg0): - val = windowsc.wxFrame_SetIcon(self.this,arg0.this) - return val - def SetMenuBar(self,arg0): - val = windowsc.wxFrame_SetMenuBar(self.this,arg0.this) - return val - def SetStatusText(self,arg0,*args): - val = apply(windowsc.wxFrame_SetStatusText,(self.this,arg0,)+args) - return val - def SetStatusWidths(self,arg0,*args): - val = apply(windowsc.wxFrame_SetStatusWidths,(self.this,arg0,)+args) - return val - def SetTitle(self,arg0): - val = windowsc.wxFrame_SetTitle(self.this,arg0) - return val - def __repr__(self): - return "" -class wxFrame(wxFramePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxFrame,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxMiniFramePtr(wxFramePtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxMiniFrame(wxMiniFramePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxMiniFrame,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxPanelPtr(wxWindowPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def InitDialog(self): - val = windowsc.wxPanel_InitDialog(self.this) - return val - def __repr__(self): - return "" -class wxPanel(wxPanelPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxPanel,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - -class wxDialogPtr(wxPanelPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Centre(self,*args): - val = apply(windowsc.wxDialog_Centre,(self.this,)+args) - return val - def EndModal(self,arg0): - val = windowsc.wxDialog_EndModal(self.this,arg0) - return val - def GetTitle(self): - val = windowsc.wxDialog_GetTitle(self.this) - return val - def Iconize(self,arg0): - val = windowsc.wxDialog_Iconize(self.this,arg0) - return val - def IsIconized(self): - val = windowsc.wxDialog_IsIconized(self.this) - return val - def SetModal(self,arg0): - val = windowsc.wxDialog_SetModal(self.this,arg0) - return val - def IsModal(self): - val = windowsc.wxDialog_IsModal(self.this) - return val - def SetTitle(self,arg0): - val = windowsc.wxDialog_SetTitle(self.this,arg0) - return val - def Show(self,arg0): - val = windowsc.wxDialog_Show(self.this,arg0) - return val - def ShowModal(self): - val = windowsc.wxDialog_ShowModal(self.this) - return val - def __repr__(self): - return "" -class wxDialog(wxDialogPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxDialog,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - - - - -class wxScrolledWindowPtr(wxWindowPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def EnableScrolling(self,arg0,arg1): - val = windowsc.wxScrolledWindow_EnableScrolling(self.this,arg0,arg1) - return val - def GetScrollPixelsPerUnit(self): - val = windowsc.wxScrolledWindow_GetScrollPixelsPerUnit(self.this) - return val - def GetVirtualSize(self): - val = windowsc.wxScrolledWindow_GetVirtualSize(self.this) - return val - def IsRetained(self): - val = windowsc.wxScrolledWindow_IsRetained(self.this) - return val - def PrepareDC(self,arg0): - val = windowsc.wxScrolledWindow_PrepareDC(self.this,arg0.this) - return val - def Scroll(self,arg0,arg1): - val = windowsc.wxScrolledWindow_Scroll(self.this,arg0,arg1) - return val - def SetScrollbars(self,arg0,arg1,arg2,arg3,*args): - val = apply(windowsc.wxScrolledWindow_SetScrollbars,(self.this,arg0,arg1,arg2,arg3,)+args) - return val - def ViewStart(self): - val = windowsc.wxScrolledWindow_ViewStart(self.this) - return val - def __repr__(self): - return "" -class wxScrolledWindow(wxScrolledWindowPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxScrolledWindow,(arg0.this,)+args) - self.thisown = 1 - - - - -class wxMenuPtr(wxEvtHandlerPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Append(self,arg0,arg1,*args): - val = apply(windowsc.wxMenu_Append,(self.this,arg0,arg1,)+args) - return val - def AppendMenu(self,arg0,arg1,arg2,*args): - val = apply(windowsc.wxMenu_AppendMenu,(self.this,arg0,arg1,arg2.this,)+args) - return val - def AppendSeparator(self): - val = windowsc.wxMenu_AppendSeparator(self.this) - return val - def Break(self): - val = windowsc.wxMenu_Break(self.this) - return val - def Check(self,arg0,arg1): - val = windowsc.wxMenu_Check(self.this,arg0,arg1) - return val - def Enable(self,arg0,arg1): - val = windowsc.wxMenu_Enable(self.this,arg0,arg1) - return val - def FindItem(self,arg0): - val = windowsc.wxMenu_FindItem(self.this,arg0) - return val - def GetTitle(self): - val = windowsc.wxMenu_GetTitle(self.this) - return val - def SetTitle(self,arg0): - val = windowsc.wxMenu_SetTitle(self.this,arg0) - return val - def FindItemForId(self,arg0): - val = windowsc.wxMenu_FindItemForId(self.this,arg0) - val = wxMenuItemPtr(val) - return val - def GetHelpString(self,arg0): - val = windowsc.wxMenu_GetHelpString(self.this,arg0) - return val - def GetLabel(self,arg0): - val = windowsc.wxMenu_GetLabel(self.this,arg0) - return val - def SetHelpString(self,arg0,arg1): - val = windowsc.wxMenu_SetHelpString(self.this,arg0,arg1) - return val - def IsChecked(self,arg0): - val = windowsc.wxMenu_IsChecked(self.this,arg0) - return val - def IsEnabled(self,arg0): - val = windowsc.wxMenu_IsEnabled(self.this,arg0) - return val - def SetLabel(self,arg0,arg1): - val = windowsc.wxMenu_SetLabel(self.this,arg0,arg1) - return val - def __repr__(self): - return "" -class wxMenu(wxMenuPtr): - def __init__(self,*args) : - self.this = apply(windowsc.new_wxMenu,()+args) - self.thisown = 1 - - - - -class wxPyMenuPtr(wxMenuPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - windowsc.delete_wxPyMenu(self.this) - def __repr__(self): - return "" -class wxPyMenu(wxPyMenuPtr): - def __init__(self,*args) : - self.this = apply(windowsc.new_wxPyMenu,()+args) - self.thisown = 1 - - - - -class wxMenuBarPtr(wxEvtHandlerPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Append(self,arg0,arg1): - val = windowsc.wxMenuBar_Append(self.this,arg0.this,arg1) - return val - def Check(self,arg0,arg1): - val = windowsc.wxMenuBar_Check(self.this,arg0,arg1) - return val - def Checked(self,arg0): - val = windowsc.wxMenuBar_Checked(self.this,arg0) - return val - def Enable(self,arg0,arg1): - val = windowsc.wxMenuBar_Enable(self.this,arg0,arg1) - return val - def Enabled(self,arg0): - val = windowsc.wxMenuBar_Enabled(self.this,arg0) - return val - def FindMenuItem(self,arg0,arg1): - val = windowsc.wxMenuBar_FindMenuItem(self.this,arg0,arg1) - return val - def FindItemForId(self,arg0): - val = windowsc.wxMenuBar_FindItemForId(self.this,arg0) - val = wxMenuItemPtr(val) - return val - def EnableTop(self,arg0,arg1): - val = windowsc.wxMenuBar_EnableTop(self.this,arg0,arg1) - return val - def GetHelpString(self,arg0): - val = windowsc.wxMenuBar_GetHelpString(self.this,arg0) - return val - def GetLabel(self,arg0): - val = windowsc.wxMenuBar_GetLabel(self.this,arg0) - return val - def SetHelpString(self,arg0,arg1): - val = windowsc.wxMenuBar_SetHelpString(self.this,arg0,arg1) - return val - def SetLabel(self,arg0,arg1): - val = windowsc.wxMenuBar_SetLabel(self.this,arg0,arg1) - return val - def GetLabelTop(self,arg0): - val = windowsc.wxMenuBar_GetLabelTop(self.this,arg0) - return val - def SetLabelTop(self,arg0,arg1): - val = windowsc.wxMenuBar_SetLabelTop(self.this,arg0,arg1) - return val - def GetMenuCount(self): - val = windowsc.wxMenuBar_GetMenuCount(self.this) - return val - def GetMenu(self,arg0): - val = windowsc.wxMenuBar_GetMenu(self.this,arg0) - val = wxMenuPtr(val) - return val - def __repr__(self): - return "" -class wxMenuBar(wxMenuBarPtr): - def __init__(self) : - self.this = windowsc.new_wxMenuBar() - self.thisown = 1 - - - - -class wxMenuItemPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def IsSeparator(self): - val = windowsc.wxMenuItem_IsSeparator(self.this) - return val - def IsEnabled(self): - val = windowsc.wxMenuItem_IsEnabled(self.this) - return val - def IsChecked(self): - val = windowsc.wxMenuItem_IsChecked(self.this) - return val - def IsCheckable(self): - val = windowsc.wxMenuItem_IsCheckable(self.this) - return val - def GetId(self): - val = windowsc.wxMenuItem_GetId(self.this) - return val - def GetSubMenu(self): - val = windowsc.wxMenuItem_GetSubMenu(self.this) - val = wxMenuPtr(val) - return val - def SetName(self,arg0): - val = windowsc.wxMenuItem_SetName(self.this,arg0) - return val - def DeleteSubMenu(self): - val = windowsc.wxMenuItem_DeleteSubMenu(self.this) - return val - def GetName(self): - val = windowsc.wxMenuItem_GetName(self.this) - return val - def GetHelp(self): - val = windowsc.wxMenuItem_GetHelp(self.this) - return val - def SetHelp(self,arg0): - val = windowsc.wxMenuItem_SetHelp(self.this,arg0) - return val - def Enable(self,*args): - val = apply(windowsc.wxMenuItem_Enable,(self.this,)+args) - return val - def Check(self,*args): - val = apply(windowsc.wxMenuItem_Check,(self.this,)+args) - return val - def __repr__(self): - return "" -class wxMenuItem(wxMenuItemPtr): - def __init__(self,this): - self.this = this - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - -def wxWindow_FindFocus(): - val = windowsc.wxWindow_FindFocus() - val = wxWindowPtr(val) - return val - - - -#-------------- VARIABLE WRAPPERS ------------------ - diff --git a/utils/wxPython/src/msw/windows2.cpp b/utils/wxPython/src/msw/windows2.cpp deleted file mode 100644 index 8a0c33df4f..0000000000 --- a/utils/wxPython/src/msw/windows2.cpp +++ /dev/null @@ -1,2990 +0,0 @@ -/* - * FILE : msw\windows2.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif - -#define SWIG_init initwindows2c - -#define SWIG_name "windows2c" - -#include "helpers.h" -#include -#include - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; -#define wxGridCell_GetTextValue(_swigobj) (_swigobj->GetTextValue()) -static PyObject *_wrap_wxGridCell_GetTextValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxGridCell * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGridCell_GetTextValue",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetTextValue. Expected _wxGridCell_p."); - return NULL; - } - } - wxString & _result_ref = wxGridCell_GetTextValue(_arg0); - _result = (wxString *) &_result_ref; -{ - _resultobj = PyString_FromString(WXSTRINGCAST (*_result)); -} - return _resultobj; -} - -#define wxGridCell_SetTextValue(_swigobj,_swigarg0) (_swigobj->SetTextValue(_swigarg0)) -static PyObject *_wrap_wxGridCell_SetTextValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGridCell * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxGridCell_SetTextValue",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_SetTextValue. Expected _wxGridCell_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxGridCell_SetTextValue(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxGridCell_GetFont(_swigobj) (_swigobj->GetFont()) -static PyObject *_wrap_wxGridCell_GetFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _result; - wxGridCell * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGridCell_GetFont",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetFont. Expected _wxGridCell_p."); - return NULL; - } - } - _result = (wxFont *)wxGridCell_GetFont(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGridCell_SetFont(_swigobj,_swigarg0) (_swigobj->SetFont(_swigarg0)) -static PyObject *_wrap_wxGridCell_SetFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGridCell * _arg0; - wxFont * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGridCell_SetFont",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_SetFont. Expected _wxGridCell_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCell_SetFont. Expected _wxFont_p."); - return NULL; - } - } - wxGridCell_SetFont(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGridCell_GetTextColour(_swigobj) (_swigobj->GetTextColour()) -static PyObject *_wrap_wxGridCell_GetTextColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxGridCell * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGridCell_GetTextColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetTextColour. Expected _wxGridCell_p."); - return NULL; - } - } - wxColour & _result_ref = wxGridCell_GetTextColour(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGridCell_SetTextColour(_swigobj,_swigarg0) (_swigobj->SetTextColour(_swigarg0)) -static PyObject *_wrap_wxGridCell_SetTextColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGridCell * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGridCell_SetTextColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_SetTextColour. Expected _wxGridCell_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCell_SetTextColour. Expected _wxColour_p."); - return NULL; - } - } - wxGridCell_SetTextColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGridCell_GetBackgroundColour(_swigobj) (_swigobj->GetBackgroundColour()) -static PyObject *_wrap_wxGridCell_GetBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxGridCell * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGridCell_GetBackgroundColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetBackgroundColour. Expected _wxGridCell_p."); - return NULL; - } - } - wxColour & _result_ref = wxGridCell_GetBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGridCell_SetBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetBackgroundColour(_swigarg0)) -static PyObject *_wrap_wxGridCell_SetBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGridCell * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGridCell_SetBackgroundColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_SetBackgroundColour. Expected _wxGridCell_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCell_SetBackgroundColour. Expected _wxColour_p."); - return NULL; - } - } - wxGridCell_SetBackgroundColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGridCell_GetBackgroundBrush(_swigobj) (_swigobj->GetBackgroundBrush()) -static PyObject *_wrap_wxGridCell_GetBackgroundBrush(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBrush * _result; - wxGridCell * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGridCell_GetBackgroundBrush",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetBackgroundBrush. Expected _wxGridCell_p."); - return NULL; - } - } - _result = (wxBrush *)wxGridCell_GetBackgroundBrush(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGridCell_GetAlignment(_swigobj) (_swigobj->GetAlignment()) -static PyObject *_wrap_wxGridCell_GetAlignment(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGridCell * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGridCell_GetAlignment",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetAlignment. Expected _wxGridCell_p."); - return NULL; - } - } - _result = (int )wxGridCell_GetAlignment(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGridCell_SetAlignment(_swigobj,_swigarg0) (_swigobj->SetAlignment(_swigarg0)) -static PyObject *_wrap_wxGridCell_SetAlignment(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGridCell * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGridCell_SetAlignment",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_SetAlignment. Expected _wxGridCell_p."); - return NULL; - } - } - wxGridCell_SetAlignment(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGridCell_GetCellBitmap(_swigobj) (_swigobj->GetCellBitmap()) -static PyObject *_wrap_wxGridCell_GetCellBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxBitmap * _result; - wxGridCell * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGridCell_GetCellBitmap",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetCellBitmap. Expected _wxGridCell_p."); - return NULL; - } - } - _result = (wxBitmap *)wxGridCell_GetCellBitmap(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGridCell_SetCellBitmap(_swigobj,_swigarg0) (_swigobj->SetCellBitmap(_swigarg0)) -static PyObject *_wrap_wxGridCell_SetCellBitmap(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGridCell * _arg0; - wxBitmap * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGridCell_SetCellBitmap",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_SetCellBitmap. Expected _wxGridCell_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCell_SetCellBitmap. Expected _wxBitmap_p."); - return NULL; - } - } - wxGridCell_SetCellBitmap(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxGridTowxPanel(void *ptr) { - wxGrid *src; - wxPanel *dest; - src = (wxGrid *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxGridTowxWindow(void *ptr) { - wxGrid *src; - wxWindow *dest; - src = (wxGrid *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxGridTowxEvtHandler(void *ptr) { - wxGrid *src; - wxEvtHandler *dest; - src = (wxGrid *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxGrid(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxGrid(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_new_wxGrid(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - long _arg4 = 0; - char * _arg5 = "grid"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si|ssls:new_wxGrid",&_argc0,&_arg1,&_argc2,&_argc3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGrid. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxGrid. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxGrid. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxGrid *)new_wxGrid(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxGrid_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_AdjustScrollbars(_swigobj) (_swigobj->AdjustScrollbars()) -static PyObject *_wrap_wxGrid_AdjustScrollbars(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_AdjustScrollbars",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AdjustScrollbars. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_AdjustScrollbars(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_AppendCols(_swigobj,_swigarg0,_swigarg1) (_swigobj->AppendCols(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_AppendCols(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1 = 1; - bool _arg2 = (1); - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"s|ii:wxGrid_AppendCols",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AppendCols. Expected _wxGrid_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - _result = (bool )wxGrid_AppendCols(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_AppendRows(_swigobj,_swigarg0,_swigarg1) (_swigobj->AppendRows(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_AppendRows(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1 = 1; - bool _arg2 = (1); - char * _argc0 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"s|ii:wxGrid_AppendRows",&_argc0,&_arg1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AppendRows. Expected _wxGrid_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; - _result = (bool )wxGrid_AppendRows(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_BeginBatch(_swigobj) (_swigobj->BeginBatch()) -static PyObject *_wrap_wxGrid_BeginBatch(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_BeginBatch",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_BeginBatch. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_BeginBatch(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_CellHitTest(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->CellHitTest(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxGrid_CellHitTest(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - int * _arg3; - int temp; - int * _arg4; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg3 = &temp; -} -{ - _arg4 = &temp0; -} - if(!PyArg_ParseTuple(args,"sii:wxGrid_CellHitTest",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CellHitTest. Expected _wxGrid_p."); - return NULL; - } - } - _result = (bool )wxGrid_CellHitTest(_arg0,_arg1,_arg2,_arg3,_arg4); - _resultobj = Py_BuildValue("i",_result); -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg3)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg4)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -static bool wxGrid_CreateGrid(wxGrid *self,int rows,int cols,short defaultWidth,short defaultHeight) { - return self->CreateGrid(rows, cols, NULL, NULL, - defaultWidth, defaultHeight); - } -static PyObject *_wrap_wxGrid_CreateGrid(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - short _arg3 = wxGRID_DEFAULT_CELL_WIDTH; - short _arg4 = wxGRID_DEFAULT_CELL_HEIGHT; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii|hh:wxGrid_CreateGrid",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CreateGrid. Expected _wxGrid_p."); - return NULL; - } - } - _result = (bool )wxGrid_CreateGrid(_arg0,_arg1,_arg2,_arg3,_arg4); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_CurrentCellVisible(_swigobj) (_swigobj->CurrentCellVisible()) -static PyObject *_wrap_wxGrid_CurrentCellVisible(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_CurrentCellVisible",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CurrentCellVisible. Expected _wxGrid_p."); - return NULL; - } - } - _result = (bool )wxGrid_CurrentCellVisible(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_DeleteCols(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->DeleteCols(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_DeleteCols(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1 = 0; - int _arg2 = 1; - bool _arg3 = (1); - char * _argc0 = 0; - int tempbool3; - - self = self; - if(!PyArg_ParseTuple(args,"s|iii:wxGrid_DeleteCols",&_argc0,&_arg1,&_arg2,&tempbool3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DeleteCols. Expected _wxGrid_p."); - return NULL; - } - } - _arg3 = (bool ) tempbool3; - _result = (bool )wxGrid_DeleteCols(_arg0,_arg1,_arg2,_arg3); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_DeleteRows(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->DeleteRows(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_DeleteRows(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1 = 0; - int _arg2 = 1; - bool _arg3 = (1); - char * _argc0 = 0; - int tempbool3; - - self = self; - if(!PyArg_ParseTuple(args,"s|iii:wxGrid_DeleteRows",&_argc0,&_arg1,&_arg2,&tempbool3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DeleteRows. Expected _wxGrid_p."); - return NULL; - } - } - _arg3 = (bool ) tempbool3; - _result = (bool )wxGrid_DeleteRows(_arg0,_arg1,_arg2,_arg3); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_EndBatch(_swigobj) (_swigobj->EndBatch()) -static PyObject *_wrap_wxGrid_EndBatch(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_EndBatch",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_EndBatch. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_EndBatch(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_GetBatchCount(_swigobj) (_swigobj->GetBatchCount()) -static PyObject *_wrap_wxGrid_GetBatchCount(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetBatchCount",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetBatchCount. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetBatchCount(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetCell(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCell(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetCell(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGridCell * _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_GetCell",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCell. Expected _wxGrid_p."); - return NULL; - } - } - _result = (wxGridCell *)wxGrid_GetCell(_arg0,_arg1,_arg2); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCell_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetCellAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellAlignment(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetCellAlignment(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_GetCellAlignment",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellAlignment. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetCellAlignment(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetDefCellAlignment(_swigobj) (_swigobj->GetCellAlignment()) -static PyObject *_wrap_wxGrid_GetDefCellAlignment(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetDefCellAlignment",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefCellAlignment. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetDefCellAlignment(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetCellBackgroundColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellBackgroundColour(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetCellBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_GetCellBackgroundColour",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellBackgroundColour. Expected _wxGrid_p."); - return NULL; - } - } - wxColour & _result_ref = wxGrid_GetCellBackgroundColour(_arg0,_arg1,_arg2); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetDefCellBackgroundColour(_swigobj) (_swigobj->GetCellBackgroundColour()) -static PyObject *_wrap_wxGrid_GetDefCellBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxGrid * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetDefCellBackgroundColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefCellBackgroundColour. Expected _wxGrid_p."); - return NULL; - } - } - wxColour & _result_ref = wxGrid_GetDefCellBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetCellTextColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellTextColour(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetCellTextColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_GetCellTextColour",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellTextColour. Expected _wxGrid_p."); - return NULL; - } - } - wxColour & _result_ref = wxGrid_GetCellTextColour(_arg0,_arg1,_arg2); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetDefCellTextColour(_swigobj) (_swigobj->GetCellTextColour()) -static PyObject *_wrap_wxGrid_GetDefCellTextColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxGrid * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetDefCellTextColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefCellTextColour. Expected _wxGrid_p."); - return NULL; - } - } - wxColour & _result_ref = wxGrid_GetDefCellTextColour(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetCellTextFont(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellTextFont(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetCellTextFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_GetCellTextFont",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellTextFont. Expected _wxGrid_p."); - return NULL; - } - } - _result = (wxFont *)wxGrid_GetCellTextFont(_arg0,_arg1,_arg2); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetDefCellTextFont(_swigobj) (_swigobj->GetCellTextFont()) -static PyObject *_wrap_wxGrid_GetDefCellTextFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _result; - wxGrid * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetDefCellTextFont",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefCellTextFont. Expected _wxGrid_p."); - return NULL; - } - } - _result = (wxFont *)wxGrid_GetDefCellTextFont(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetCellValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellValue(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetCellValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_GetCellValue",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellValue. Expected _wxGrid_p."); - return NULL; - } - } - wxString & _result_ref = wxGrid_GetCellValue(_arg0,_arg1,_arg2); - _result = (wxString *) &_result_ref; -{ - _resultobj = PyString_FromString(WXSTRINGCAST (*_result)); -} - return _resultobj; -} - -#define wxGrid_GetCols(_swigobj) (_swigobj->GetCols()) -static PyObject *_wrap_wxGrid_GetCols(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetCols",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCols. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetCols(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetColumnWidth(_swigobj,_swigarg0) (_swigobj->GetColumnWidth(_swigarg0)) -static PyObject *_wrap_wxGrid_GetColumnWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGrid_GetColumnWidth",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetColumnWidth. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetColumnWidth(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetCurrentRect(_swigobj) (_swigobj->GetCurrentRect()) -static PyObject *_wrap_wxGrid_GetCurrentRect(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxRect * _result; - wxGrid * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetCurrentRect",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCurrentRect. Expected _wxGrid_p."); - return NULL; - } - } - wxRect & _result_ref = wxGrid_GetCurrentRect(_arg0); - _result = (wxRect *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxRect_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetCursorColumn(_swigobj) (_swigobj->GetCursorColumn()) -static PyObject *_wrap_wxGrid_GetCursorColumn(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetCursorColumn",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCursorColumn. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetCursorColumn(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetCursorRow(_swigobj) (_swigobj->GetCursorRow()) -static PyObject *_wrap_wxGrid_GetCursorRow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetCursorRow",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCursorRow. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetCursorRow(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetEditable(_swigobj) (_swigobj->GetEditable()) -static PyObject *_wrap_wxGrid_GetEditable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetEditable",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetEditable. Expected _wxGrid_p."); - return NULL; - } - } - _result = (bool )wxGrid_GetEditable(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetHorizScrollBar(_swigobj) (_swigobj->GetHorizScrollBar()) -static PyObject *_wrap_wxGrid_GetHorizScrollBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrollBar * _result; - wxGrid * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetHorizScrollBar",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetHorizScrollBar. Expected _wxGrid_p."); - return NULL; - } - } - _result = (wxScrollBar *)wxGrid_GetHorizScrollBar(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxScrollBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetLabelAlignment(_swigobj,_swigarg0) (_swigobj->GetLabelAlignment(_swigarg0)) -static PyObject *_wrap_wxGrid_GetLabelAlignment(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGrid_GetLabelAlignment",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelAlignment. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetLabelAlignment(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetLabelBackgroundColour(_swigobj) (_swigobj->GetLabelBackgroundColour()) -static PyObject *_wrap_wxGrid_GetLabelBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxGrid * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetLabelBackgroundColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelBackgroundColour. Expected _wxGrid_p."); - return NULL; - } - } - wxColour & _result_ref = wxGrid_GetLabelBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetLabelSize(_swigobj,_swigarg0) (_swigobj->GetLabelSize(_swigarg0)) -static PyObject *_wrap_wxGrid_GetLabelSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGrid_GetLabelSize",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelSize. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetLabelSize(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetLabelTextColour(_swigobj) (_swigobj->GetLabelTextColour()) -static PyObject *_wrap_wxGrid_GetLabelTextColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxColour * _result; - wxGrid * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetLabelTextColour",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelTextColour. Expected _wxGrid_p."); - return NULL; - } - } - wxColour & _result_ref = wxGrid_GetLabelTextColour(_arg0); - _result = (wxColour *) &_result_ref; - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetLabelTextFont(_swigobj) (_swigobj->GetLabelTextFont()) -static PyObject *_wrap_wxGrid_GetLabelTextFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxFont * _result; - wxGrid * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetLabelTextFont",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelTextFont. Expected _wxGrid_p."); - return NULL; - } - } - _result = (wxFont *)wxGrid_GetLabelTextFont(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetLabelValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetLabelValue(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetLabelValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_GetLabelValue",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelValue. Expected _wxGrid_p."); - return NULL; - } - } - wxString & _result_ref = wxGrid_GetLabelValue(_arg0,_arg1,_arg2); - _result = (wxString *) &_result_ref; -{ - _resultobj = PyString_FromString(WXSTRINGCAST (*_result)); -} - return _resultobj; -} - -#define wxGrid_GetRowHeight(_swigobj,_swigarg0) (_swigobj->GetRowHeight(_swigarg0)) -static PyObject *_wrap_wxGrid_GetRowHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGrid_GetRowHeight",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetRowHeight. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetRowHeight(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetRows(_swigobj) (_swigobj->GetRows()) -static PyObject *_wrap_wxGrid_GetRows(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetRows",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetRows. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetRows(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetScrollPosX(_swigobj) (_swigobj->GetScrollPosX()) -static PyObject *_wrap_wxGrid_GetScrollPosX(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetScrollPosX",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetScrollPosX. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetScrollPosX(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetScrollPosY(_swigobj) (_swigobj->GetScrollPosY()) -static PyObject *_wrap_wxGrid_GetScrollPosY(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetScrollPosY",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetScrollPosY. Expected _wxGrid_p."); - return NULL; - } - } - _result = (int )wxGrid_GetScrollPosY(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetTextItem(_swigobj) (_swigobj->GetTextItem()) -static PyObject *_wrap_wxGrid_GetTextItem(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _result; - wxGrid * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetTextItem",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetTextItem. Expected _wxGrid_p."); - return NULL; - } - } - _result = (wxTextCtrl *)wxGrid_GetTextItem(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetVertScrollBar(_swigobj) (_swigobj->GetVertScrollBar()) -static PyObject *_wrap_wxGrid_GetVertScrollBar(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxScrollBar * _result; - wxGrid * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_GetVertScrollBar",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetVertScrollBar. Expected _wxGrid_p."); - return NULL; - } - } - _result = (wxScrollBar *)wxGrid_GetVertScrollBar(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxScrollBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_InsertCols(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->InsertCols(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_InsertCols(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1 = 0; - int _arg2 = 1; - bool _arg3 = (1); - char * _argc0 = 0; - int tempbool3; - - self = self; - if(!PyArg_ParseTuple(args,"s|iii:wxGrid_InsertCols",&_argc0,&_arg1,&_arg2,&tempbool3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_InsertCols. Expected _wxGrid_p."); - return NULL; - } - } - _arg3 = (bool ) tempbool3; - _result = (bool )wxGrid_InsertCols(_arg0,_arg1,_arg2,_arg3); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_InsertRows(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->InsertRows(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_InsertRows(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1 = 0; - int _arg2 = 1; - bool _arg3 = (1); - char * _argc0 = 0; - int tempbool3; - - self = self; - if(!PyArg_ParseTuple(args,"s|iii:wxGrid_InsertRows",&_argc0,&_arg1,&_arg2,&tempbool3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_InsertRows. Expected _wxGrid_p."); - return NULL; - } - } - _arg3 = (bool ) tempbool3; - _result = (bool )wxGrid_InsertRows(_arg0,_arg1,_arg2,_arg3); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_SetCellAlignment(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellAlignment(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_SetCellAlignment(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - int _arg2; - int _arg3; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siii:wxGrid_SetCellAlignment",&_argc0,&_arg1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellAlignment. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_SetCellAlignment(_arg0,_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetDefCellAlignment(_swigobj,_swigarg0) (_swigobj->SetCellAlignment(_swigarg0)) -static PyObject *_wrap_wxGrid_SetDefCellAlignment(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGrid_SetDefCellAlignment",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefCellAlignment. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_SetDefCellAlignment(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetCellBackgroundColour(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellBackgroundColour(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_SetCellBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxColour * _arg1; - int _arg2; - int _arg3; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ssii:wxGrid_SetCellBackgroundColour",&_argc0,&_argc1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellBackgroundColour. Expected _wxGrid_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetCellBackgroundColour. Expected _wxColour_p."); - return NULL; - } - } - wxGrid_SetCellBackgroundColour(_arg0,*_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetDefCellBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetCellBackgroundColour(_swigarg0)) -static PyObject *_wrap_wxGrid_SetDefCellBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGrid_SetDefCellBackgroundColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefCellBackgroundColour. Expected _wxGrid_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetDefCellBackgroundColour. Expected _wxColour_p."); - return NULL; - } - } - wxGrid_SetDefCellBackgroundColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetCellTextColour(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellTextColour(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_SetCellTextColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxColour * _arg1; - int _arg2; - int _arg3; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ssii:wxGrid_SetCellTextColour",&_argc0,&_argc1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellTextColour. Expected _wxGrid_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetCellTextColour. Expected _wxColour_p."); - return NULL; - } - } - wxGrid_SetCellTextColour(_arg0,*_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetDefCellTextColour(_swigobj,_swigarg0) (_swigobj->SetCellTextColour(_swigarg0)) -static PyObject *_wrap_wxGrid_SetDefCellTextColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGrid_SetDefCellTextColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefCellTextColour. Expected _wxGrid_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetDefCellTextColour. Expected _wxColour_p."); - return NULL; - } - } - wxGrid_SetDefCellTextColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetCellTextFont(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellTextFont(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_SetCellTextFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxFont * _arg1; - int _arg2; - int _arg3; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ssii:wxGrid_SetCellTextFont",&_argc0,&_argc1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellTextFont. Expected _wxGrid_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetCellTextFont. Expected _wxFont_p."); - return NULL; - } - } - wxGrid_SetCellTextFont(_arg0,_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetDefCellTextFont(_swigobj,_swigarg0) (_swigobj->SetCellTextFont(_swigarg0)) -static PyObject *_wrap_wxGrid_SetDefCellTextFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxFont * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGrid_SetDefCellTextFont",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefCellTextFont. Expected _wxGrid_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetDefCellTextFont. Expected _wxFont_p."); - return NULL; - } - } - wxGrid_SetDefCellTextFont(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetCellValue(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellValue(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_SetCellValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxString * _arg1; - int _arg2; - int _arg3; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sOii:wxGrid_SetCellValue",&_argc0,&_obj1,&_arg2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellValue. Expected _wxGrid_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxGrid_SetCellValue(_arg0,*_arg1,_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxGrid_SetColumnWidth(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColumnWidth(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_SetColumnWidth(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_SetColumnWidth",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColumnWidth. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_SetColumnWidth(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetDividerPen(_swigobj,_swigarg0) (_swigobj->SetDividerPen(_swigarg0)) -static PyObject *_wrap_wxGrid_SetDividerPen(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxPen * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGrid_SetDividerPen",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDividerPen. Expected _wxGrid_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetDividerPen. Expected _wxPen_p."); - return NULL; - } - } - wxGrid_SetDividerPen(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetEditable(_swigobj,_swigarg0) (_swigobj->SetEditable(_swigarg0)) -static PyObject *_wrap_wxGrid_SetEditable(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxGrid_SetEditable",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetEditable. Expected _wxGrid_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxGrid_SetEditable(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetGridCursor(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetGridCursor(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_SetGridCursor(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_SetGridCursor",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetGridCursor. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_SetGridCursor(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetLabelAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetLabelAlignment(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_SetLabelAlignment(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_SetLabelAlignment",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelAlignment. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_SetLabelAlignment(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetLabelBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetLabelBackgroundColour(_swigarg0)) -static PyObject *_wrap_wxGrid_SetLabelBackgroundColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGrid_SetLabelBackgroundColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelBackgroundColour. Expected _wxGrid_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetLabelBackgroundColour. Expected _wxColour_p."); - return NULL; - } - } - wxGrid_SetLabelBackgroundColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetLabelSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetLabelSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_SetLabelSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_SetLabelSize",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelSize. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_SetLabelSize(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetLabelTextColour(_swigobj,_swigarg0) (_swigobj->SetLabelTextColour(_swigarg0)) -static PyObject *_wrap_wxGrid_SetLabelTextColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGrid_SetLabelTextColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelTextColour. Expected _wxGrid_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetLabelTextColour. Expected _wxColour_p."); - return NULL; - } - } - wxGrid_SetLabelTextColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetLabelTextFont(_swigobj,_swigarg0) (_swigobj->SetLabelTextFont(_swigarg0)) -static PyObject *_wrap_wxGrid_SetLabelTextFont(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - wxFont * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxGrid_SetLabelTextFont",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelTextFont. Expected _wxGrid_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetLabelTextFont. Expected _wxFont_p."); - return NULL; - } - } - wxGrid_SetLabelTextFont(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetLabelValue(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetLabelValue(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_SetLabelValue(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - wxString * _arg2; - int _arg3; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siOi:wxGrid_SetLabelValue",&_argc0,&_arg1,&_obj2,&_arg3)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelValue. Expected _wxGrid_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - wxGrid_SetLabelValue(_arg0,_arg1,*_arg2,_arg3); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxGrid_SetRowHeight(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRowHeight(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_SetRowHeight(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxGrid_SetRowHeight",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetRowHeight. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_SetRowHeight(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_UpdateDimensions(_swigobj) (_swigobj->UpdateDimensions()) -static PyObject *_wrap_wxGrid_UpdateDimensions(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxGrid * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxGrid_UpdateDimensions",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_UpdateDimensions. Expected _wxGrid_p."); - return NULL; - } - } - wxGrid_UpdateDimensions(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxNotebookEventTowxCommandEvent(void *ptr) { - wxNotebookEvent *src; - wxCommandEvent *dest; - src = (wxNotebookEvent *) ptr; - dest = (wxCommandEvent *) src; - return (void *) dest; -} - -static void *SwigwxNotebookEventTowxEvent(void *ptr) { - wxNotebookEvent *src; - wxEvent *dest; - src = (wxNotebookEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxNotebookEvent_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxNotebookEvent_GetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxNotebookEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxNotebookEvent_GetSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebookEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebookEvent_GetSelection. Expected _wxNotebookEvent_p."); - return NULL; - } - } - _result = (int )wxNotebookEvent_GetSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebookEvent_GetOldSelection(_swigobj) (_swigobj->GetOldSelection()) -static PyObject *_wrap_wxNotebookEvent_GetOldSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxNotebookEvent * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxNotebookEvent_GetOldSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebookEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebookEvent_GetOldSelection. Expected _wxNotebookEvent_p."); - return NULL; - } - } - _result = (int )wxNotebookEvent_GetOldSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static void *SwigwxNotebookTowxControl(void *ptr) { - wxNotebook *src; - wxControl *dest; - src = (wxNotebook *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxNotebookTowxWindow(void *ptr) { - wxNotebook *src; - wxWindow *dest; - src = (wxNotebook *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxNotebookTowxEvtHandler(void *ptr) { - wxNotebook *src; - wxEvtHandler *dest; - src = (wxNotebook *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxNotebook(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxNotebook(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_new_wxNotebook(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxNotebook * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxPoint * _arg2 = &wxPyDefaultPosition; - wxSize * _arg3 = &wxPyDefaultSize; - long _arg4 = 0; - char * _arg5 = "notebook"; - char * _argc0 = 0; - char * _argc2 = 0; - char * _argc3 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si|ssls:new_wxNotebook",&_argc0,&_arg1,&_argc2,&_argc3,&_arg4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxNotebook. Expected _wxWindow_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxNotebook. Expected _wxPoint_p."); - return NULL; - } - } - if (_argc3) { - if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxNotebook. Expected _wxSize_p."); - return NULL; - } - } - _result = (wxNotebook *)new_wxNotebook(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxNotebook_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxNotebook_GetPageCount(_swigobj) (_swigobj->GetPageCount()) -static PyObject *_wrap_wxNotebook_GetPageCount(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxNotebook * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxNotebook_GetPageCount",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetPageCount. Expected _wxNotebook_p."); - return NULL; - } - } - _result = (int )wxNotebook_GetPageCount(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_SetSelection(_swigobj,_swigarg0) (_swigobj->SetSelection(_swigarg0)) -static PyObject *_wrap_wxNotebook_SetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxNotebook * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxNotebook_SetSelection",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetSelection. Expected _wxNotebook_p."); - return NULL; - } - } - _result = (int )wxNotebook_SetSelection(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_AdvanceSelection(_swigobj,_swigarg0) (_swigobj->AdvanceSelection(_swigarg0)) -static PyObject *_wrap_wxNotebook_AdvanceSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxNotebook * _arg0; - bool _arg1 = (1); - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"s|i:wxNotebook_AdvanceSelection",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_AdvanceSelection. Expected _wxNotebook_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxNotebook_AdvanceSelection(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxNotebook_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxNotebook_GetSelection(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxNotebook * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxNotebook_GetSelection",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetSelection. Expected _wxNotebook_p."); - return NULL; - } - } - _result = (int )wxNotebook_GetSelection(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_SetPageText(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetPageText(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxNotebook_SetPageText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxNotebook * _arg0; - int _arg1; - wxString * _arg2; - char * _argc0 = 0; - PyObject * _obj2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"siO:wxNotebook_SetPageText",&_argc0,&_arg1,&_obj2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetPageText. Expected _wxNotebook_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - _result = (bool )wxNotebook_SetPageText(_arg0,_arg1,*_arg2); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxNotebook_GetPageText(_swigobj,_swigarg0) (_swigobj->GetPageText(_swigarg0)) -static PyObject *_wrap_wxNotebook_GetPageText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxNotebook * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxNotebook_GetPageText",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetPageText. Expected _wxNotebook_p."); - return NULL; - } - } - _result = new wxString (wxNotebook_GetPageText(_arg0,_arg1)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxNotebook_SetImageList(_swigobj,_swigarg0) (_swigobj->SetImageList(_swigarg0)) -static PyObject *_wrap_wxNotebook_SetImageList(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxNotebook * _arg0; - wxImageList * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxNotebook_SetImageList",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetImageList. Expected _wxNotebook_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxImageList_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxNotebook_SetImageList. Expected _wxImageList_p."); - return NULL; - } - } - wxNotebook_SetImageList(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxNotebook_GetImageList(_swigobj) (_swigobj->GetImageList()) -static PyObject *_wrap_wxNotebook_GetImageList(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxImageList * _result; - wxNotebook * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxNotebook_GetImageList",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetImageList. Expected _wxNotebook_p."); - return NULL; - } - } - _result = (wxImageList *)wxNotebook_GetImageList(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageList_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxNotebook_GetPageImage(_swigobj,_swigarg0) (_swigobj->GetPageImage(_swigarg0)) -static PyObject *_wrap_wxNotebook_GetPageImage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxNotebook * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxNotebook_GetPageImage",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetPageImage. Expected _wxNotebook_p."); - return NULL; - } - } - _result = (int )wxNotebook_GetPageImage(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_SetPageImage(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetPageImage(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxNotebook_SetPageImage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxNotebook * _arg0; - int _arg1; - int _arg2; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sii:wxNotebook_SetPageImage",&_argc0,&_arg1,&_arg2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetPageImage. Expected _wxNotebook_p."); - return NULL; - } - } - _result = (bool )wxNotebook_SetPageImage(_arg0,_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_GetRowCount(_swigobj) (_swigobj->GetRowCount()) -static PyObject *_wrap_wxNotebook_GetRowCount(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxNotebook * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxNotebook_GetRowCount",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetRowCount. Expected _wxNotebook_p."); - return NULL; - } - } - _result = (int )wxNotebook_GetRowCount(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_DeletePage(_swigobj,_swigarg0) (_swigobj->DeletePage(_swigarg0)) -static PyObject *_wrap_wxNotebook_DeletePage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxNotebook * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxNotebook_DeletePage",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_DeletePage. Expected _wxNotebook_p."); - return NULL; - } - } - _result = (bool )wxNotebook_DeletePage(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_DeleteAllPages(_swigobj) (_swigobj->DeleteAllPages()) -static PyObject *_wrap_wxNotebook_DeleteAllPages(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxNotebook * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxNotebook_DeleteAllPages",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_DeleteAllPages. Expected _wxNotebook_p."); - return NULL; - } - } - _result = (bool )wxNotebook_DeleteAllPages(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_AddPage(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->AddPage(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxNotebook_AddPage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxNotebook * _arg0; - wxWindow * _arg1; - wxString * _arg2; - bool _arg3 = (0); - int _arg4 = -1; - char * _argc0 = 0; - char * _argc1 = 0; - PyObject * _obj2 = 0; - int tempbool3; - - self = self; - if(!PyArg_ParseTuple(args,"ssO|ii:wxNotebook_AddPage",&_argc0,&_argc1,&_obj2,&tempbool3,&_arg4)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_AddPage. Expected _wxNotebook_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxNotebook_AddPage. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2)); -} - _arg3 = (bool ) tempbool3; - _result = (bool )wxNotebook_AddPage(_arg0,_arg1,*_arg2,_arg3,_arg4); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxNotebook_InsertPage(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->InsertPage(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_wxNotebook_InsertPage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxNotebook * _arg0; - int _arg1; - wxWindow * _arg2; - wxString * _arg3; - bool _arg4 = (0); - int _arg5 = -1; - char * _argc0 = 0; - char * _argc2 = 0; - PyObject * _obj3 = 0; - int tempbool4; - - self = self; - if(!PyArg_ParseTuple(args,"sisO|ii:wxNotebook_InsertPage",&_argc0,&_arg1,&_argc2,&_obj3,&tempbool4,&_arg5)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_InsertPage. Expected _wxNotebook_p."); - return NULL; - } - } - if (_argc2) { - if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxNotebook_InsertPage. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AsString(_obj3)); -} - _arg4 = (bool ) tempbool4; - _result = (bool )wxNotebook_InsertPage(_arg0,_arg1,_arg2,*_arg3,_arg4,_arg5); - _resultobj = Py_BuildValue("i",_result); -{ - if (_obj3) - delete _arg3; -} - return _resultobj; -} - -#define wxNotebook_GetPage(_swigobj,_swigarg0) (_swigobj->GetPage(_swigarg0)) -static PyObject *_wrap_wxNotebook_GetPage(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxNotebookPage * _result; - wxNotebook * _arg0; - int _arg1; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxNotebook_GetPage",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetPage. Expected _wxNotebook_p."); - return NULL; - } - } - _result = (wxNotebookPage *)wxNotebook_GetPage(_arg0,_arg1); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxNotebookPage_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyMethodDef windows2cMethods[] = { - { "wxNotebook_GetPage", _wrap_wxNotebook_GetPage, 1 }, - { "wxNotebook_InsertPage", _wrap_wxNotebook_InsertPage, 1 }, - { "wxNotebook_AddPage", _wrap_wxNotebook_AddPage, 1 }, - { "wxNotebook_DeleteAllPages", _wrap_wxNotebook_DeleteAllPages, 1 }, - { "wxNotebook_DeletePage", _wrap_wxNotebook_DeletePage, 1 }, - { "wxNotebook_GetRowCount", _wrap_wxNotebook_GetRowCount, 1 }, - { "wxNotebook_SetPageImage", _wrap_wxNotebook_SetPageImage, 1 }, - { "wxNotebook_GetPageImage", _wrap_wxNotebook_GetPageImage, 1 }, - { "wxNotebook_GetImageList", _wrap_wxNotebook_GetImageList, 1 }, - { "wxNotebook_SetImageList", _wrap_wxNotebook_SetImageList, 1 }, - { "wxNotebook_GetPageText", _wrap_wxNotebook_GetPageText, 1 }, - { "wxNotebook_SetPageText", _wrap_wxNotebook_SetPageText, 1 }, - { "wxNotebook_GetSelection", _wrap_wxNotebook_GetSelection, 1 }, - { "wxNotebook_AdvanceSelection", _wrap_wxNotebook_AdvanceSelection, 1 }, - { "wxNotebook_SetSelection", _wrap_wxNotebook_SetSelection, 1 }, - { "wxNotebook_GetPageCount", _wrap_wxNotebook_GetPageCount, 1 }, - { "new_wxNotebook", _wrap_new_wxNotebook, 1 }, - { "wxNotebookEvent_GetOldSelection", _wrap_wxNotebookEvent_GetOldSelection, 1 }, - { "wxNotebookEvent_GetSelection", _wrap_wxNotebookEvent_GetSelection, 1 }, - { "wxGrid_UpdateDimensions", _wrap_wxGrid_UpdateDimensions, 1 }, - { "wxGrid_SetRowHeight", _wrap_wxGrid_SetRowHeight, 1 }, - { "wxGrid_SetLabelValue", _wrap_wxGrid_SetLabelValue, 1 }, - { "wxGrid_SetLabelTextFont", _wrap_wxGrid_SetLabelTextFont, 1 }, - { "wxGrid_SetLabelTextColour", _wrap_wxGrid_SetLabelTextColour, 1 }, - { "wxGrid_SetLabelSize", _wrap_wxGrid_SetLabelSize, 1 }, - { "wxGrid_SetLabelBackgroundColour", _wrap_wxGrid_SetLabelBackgroundColour, 1 }, - { "wxGrid_SetLabelAlignment", _wrap_wxGrid_SetLabelAlignment, 1 }, - { "wxGrid_SetGridCursor", _wrap_wxGrid_SetGridCursor, 1 }, - { "wxGrid_SetEditable", _wrap_wxGrid_SetEditable, 1 }, - { "wxGrid_SetDividerPen", _wrap_wxGrid_SetDividerPen, 1 }, - { "wxGrid_SetColumnWidth", _wrap_wxGrid_SetColumnWidth, 1 }, - { "wxGrid_SetCellValue", _wrap_wxGrid_SetCellValue, 1 }, - { "wxGrid_SetDefCellTextFont", _wrap_wxGrid_SetDefCellTextFont, 1 }, - { "wxGrid_SetCellTextFont", _wrap_wxGrid_SetCellTextFont, 1 }, - { "wxGrid_SetDefCellTextColour", _wrap_wxGrid_SetDefCellTextColour, 1 }, - { "wxGrid_SetCellTextColour", _wrap_wxGrid_SetCellTextColour, 1 }, - { "wxGrid_SetDefCellBackgroundColour", _wrap_wxGrid_SetDefCellBackgroundColour, 1 }, - { "wxGrid_SetCellBackgroundColour", _wrap_wxGrid_SetCellBackgroundColour, 1 }, - { "wxGrid_SetDefCellAlignment", _wrap_wxGrid_SetDefCellAlignment, 1 }, - { "wxGrid_SetCellAlignment", _wrap_wxGrid_SetCellAlignment, 1 }, - { "wxGrid_InsertRows", _wrap_wxGrid_InsertRows, 1 }, - { "wxGrid_InsertCols", _wrap_wxGrid_InsertCols, 1 }, - { "wxGrid_GetVertScrollBar", _wrap_wxGrid_GetVertScrollBar, 1 }, - { "wxGrid_GetTextItem", _wrap_wxGrid_GetTextItem, 1 }, - { "wxGrid_GetScrollPosY", _wrap_wxGrid_GetScrollPosY, 1 }, - { "wxGrid_GetScrollPosX", _wrap_wxGrid_GetScrollPosX, 1 }, - { "wxGrid_GetRows", _wrap_wxGrid_GetRows, 1 }, - { "wxGrid_GetRowHeight", _wrap_wxGrid_GetRowHeight, 1 }, - { "wxGrid_GetLabelValue", _wrap_wxGrid_GetLabelValue, 1 }, - { "wxGrid_GetLabelTextFont", _wrap_wxGrid_GetLabelTextFont, 1 }, - { "wxGrid_GetLabelTextColour", _wrap_wxGrid_GetLabelTextColour, 1 }, - { "wxGrid_GetLabelSize", _wrap_wxGrid_GetLabelSize, 1 }, - { "wxGrid_GetLabelBackgroundColour", _wrap_wxGrid_GetLabelBackgroundColour, 1 }, - { "wxGrid_GetLabelAlignment", _wrap_wxGrid_GetLabelAlignment, 1 }, - { "wxGrid_GetHorizScrollBar", _wrap_wxGrid_GetHorizScrollBar, 1 }, - { "wxGrid_GetEditable", _wrap_wxGrid_GetEditable, 1 }, - { "wxGrid_GetCursorRow", _wrap_wxGrid_GetCursorRow, 1 }, - { "wxGrid_GetCursorColumn", _wrap_wxGrid_GetCursorColumn, 1 }, - { "wxGrid_GetCurrentRect", _wrap_wxGrid_GetCurrentRect, 1 }, - { "wxGrid_GetColumnWidth", _wrap_wxGrid_GetColumnWidth, 1 }, - { "wxGrid_GetCols", _wrap_wxGrid_GetCols, 1 }, - { "wxGrid_GetCellValue", _wrap_wxGrid_GetCellValue, 1 }, - { "wxGrid_GetDefCellTextFont", _wrap_wxGrid_GetDefCellTextFont, 1 }, - { "wxGrid_GetCellTextFont", _wrap_wxGrid_GetCellTextFont, 1 }, - { "wxGrid_GetDefCellTextColour", _wrap_wxGrid_GetDefCellTextColour, 1 }, - { "wxGrid_GetCellTextColour", _wrap_wxGrid_GetCellTextColour, 1 }, - { "wxGrid_GetDefCellBackgroundColour", _wrap_wxGrid_GetDefCellBackgroundColour, 1 }, - { "wxGrid_GetCellBackgroundColour", _wrap_wxGrid_GetCellBackgroundColour, 1 }, - { "wxGrid_GetDefCellAlignment", _wrap_wxGrid_GetDefCellAlignment, 1 }, - { "wxGrid_GetCellAlignment", _wrap_wxGrid_GetCellAlignment, 1 }, - { "wxGrid_GetCell", _wrap_wxGrid_GetCell, 1 }, - { "wxGrid_GetBatchCount", _wrap_wxGrid_GetBatchCount, 1 }, - { "wxGrid_EndBatch", _wrap_wxGrid_EndBatch, 1 }, - { "wxGrid_DeleteRows", _wrap_wxGrid_DeleteRows, 1 }, - { "wxGrid_DeleteCols", _wrap_wxGrid_DeleteCols, 1 }, - { "wxGrid_CurrentCellVisible", _wrap_wxGrid_CurrentCellVisible, 1 }, - { "wxGrid_CreateGrid", _wrap_wxGrid_CreateGrid, 1 }, - { "wxGrid_CellHitTest", _wrap_wxGrid_CellHitTest, 1 }, - { "wxGrid_BeginBatch", _wrap_wxGrid_BeginBatch, 1 }, - { "wxGrid_AppendRows", _wrap_wxGrid_AppendRows, 1 }, - { "wxGrid_AppendCols", _wrap_wxGrid_AppendCols, 1 }, - { "wxGrid_AdjustScrollbars", _wrap_wxGrid_AdjustScrollbars, 1 }, - { "new_wxGrid", _wrap_new_wxGrid, 1 }, - { "wxGridCell_SetCellBitmap", _wrap_wxGridCell_SetCellBitmap, 1 }, - { "wxGridCell_GetCellBitmap", _wrap_wxGridCell_GetCellBitmap, 1 }, - { "wxGridCell_SetAlignment", _wrap_wxGridCell_SetAlignment, 1 }, - { "wxGridCell_GetAlignment", _wrap_wxGridCell_GetAlignment, 1 }, - { "wxGridCell_GetBackgroundBrush", _wrap_wxGridCell_GetBackgroundBrush, 1 }, - { "wxGridCell_SetBackgroundColour", _wrap_wxGridCell_SetBackgroundColour, 1 }, - { "wxGridCell_GetBackgroundColour", _wrap_wxGridCell_GetBackgroundColour, 1 }, - { "wxGridCell_SetTextColour", _wrap_wxGridCell_SetTextColour, 1 }, - { "wxGridCell_GetTextColour", _wrap_wxGridCell_GetTextColour, 1 }, - { "wxGridCell_SetFont", _wrap_wxGridCell_SetFont, 1 }, - { "wxGridCell_GetFont", _wrap_wxGridCell_GetFont, 1 }, - { "wxGridCell_SetTextValue", _wrap_wxGridCell_SetTextValue, 1 }, - { "wxGridCell_GetTextValue", _wrap_wxGridCell_GetTextValue, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initwindows2c)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("windows2c", windows2cMethods); - d = PyModule_GetDict(m); - PyDict_SetItemString(d,"wxGRID_TEXT_CTRL", PyInt_FromLong((long) wxGRID_TEXT_CTRL)); - PyDict_SetItemString(d,"wxGRID_HSCROLL", PyInt_FromLong((long) wxGRID_HSCROLL)); - PyDict_SetItemString(d,"wxGRID_VSCROLL", PyInt_FromLong((long) wxGRID_VSCROLL)); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_wxAcceleratorTable","_class_wxAcceleratorTable",0); - SWIG_RegisterMapping("_wxEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_wxNotebookEvent",SwigwxNotebookEventTowxEvent); - SWIG_RegisterMapping("_wxEvent","_class_wxEvent",0); - SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0); - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0); - SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxNotebook",SwigwxNotebookTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxNotebook",SwigwxNotebookTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxGrid",SwigwxGridTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxGrid",SwigwxGridTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxEvtHandler",0); - SWIG_RegisterMapping("_wxPaintEvent","_class_wxPaintEvent",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); - SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxGrid","_class_wxGrid",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); - SWIG_RegisterMapping("_wxPen","_class_wxPen",0); - SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_wxStaticBox","_class_wxStaticBox",0); - SWIG_RegisterMapping("_wxChoice","_class_wxChoice",0); - SWIG_RegisterMapping("_wxSlider","_class_wxSlider",0); - SWIG_RegisterMapping("_wxNotebookEvent","_class_wxNotebookEvent",0); - SWIG_RegisterMapping("_long","_wxDash",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_wxDropFilesEvent","_class_wxDropFilesEvent",0); - SWIG_RegisterMapping("_wxBitmapButton","_class_wxBitmapButton",0); - SWIG_RegisterMapping("_class_wxAcceleratorTable","_wxAcceleratorTable",0); - SWIG_RegisterMapping("_class_wxGauge","_wxGauge",0); - SWIG_RegisterMapping("_wxDC","_class_wxDC",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_wxPrinterDC","_class_wxPrinterDC",0); - SWIG_RegisterMapping("_class_wxMenuItem","_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxPaintEvent","_wxPaintEvent",0); - SWIG_RegisterMapping("_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxPanel","_class_wxGrid",SwigwxGridTowxPanel); - SWIG_RegisterMapping("_wxPanel","_wxGrid",SwigwxGridTowxPanel); - SWIG_RegisterMapping("_wxPanel","_class_wxPanel",0); - SWIG_RegisterMapping("_wxInitDialogEvent","_class_wxInitDialogEvent",0); - SWIG_RegisterMapping("_wxCheckBox","_class_wxCheckBox",0); - SWIG_RegisterMapping("_wxTextCtrl","_class_wxTextCtrl",0); - SWIG_RegisterMapping("_class_wxMask","_wxMask",0); - SWIG_RegisterMapping("_class_wxKeyEvent","_wxKeyEvent",0); - SWIG_RegisterMapping("_class_wxGrid","_wxGrid",0); - SWIG_RegisterMapping("_wxColour","_class_wxColour",0); - SWIG_RegisterMapping("_class_wxDialog","_wxDialog",0); - SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); - SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); - SWIG_RegisterMapping("_wxMiniFrame","_class_wxMiniFrame",0); - SWIG_RegisterMapping("_class_wxNotebookEvent","_wxNotebookEvent",0); - SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxNotebookEvent",SwigwxNotebookEventTowxEvent); - SWIG_RegisterMapping("_class_wxEvent","_wxEvent",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxCommandEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent); - SWIG_RegisterMapping("_wxCommandEvent","_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent); - SWIG_RegisterMapping("_wxCommandEvent","_class_wxCommandEvent",0); - SWIG_RegisterMapping("_wxSizeEvent","_class_wxSizeEvent",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_class_wxButton","_wxButton",0); - SWIG_RegisterMapping("_wxRadioBox","_class_wxRadioBox",0); - SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_wxScrollBar","_class_wxScrollBar",0); - SWIG_RegisterMapping("_wxSpinButton","_class_wxSpinButton",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0); - SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0); - SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxDropFilesEvent","_wxDropFilesEvent",0); - SWIG_RegisterMapping("_wxStaticText","_class_wxStaticText",0); - SWIG_RegisterMapping("_wxFont","_class_wxFont",0); - SWIG_RegisterMapping("_wxCloseEvent","_class_wxCloseEvent",0); - SWIG_RegisterMapping("_wxNotebook","_class_wxNotebook",0); - SWIG_RegisterMapping("_unsigned_long","_wxDash",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxDC","_wxDC",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_wxFocusEvent","_class_wxFocusEvent",0); - SWIG_RegisterMapping("_wxMaximizeEvent","_class_wxMaximizeEvent",0); - SWIG_RegisterMapping("_class_wxSpinButton","_wxSpinButton",0); - SWIG_RegisterMapping("_wxAcceleratorEntry","_class_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_class_wxPanel","_class_wxGrid",SwigwxGridTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxGrid",SwigwxGridTowxPanel); - SWIG_RegisterMapping("_class_wxPanel","_wxPanel",0); - SWIG_RegisterMapping("_class_wxCheckBox","_wxCheckBox",0); - SWIG_RegisterMapping("_wxComboBox","_class_wxComboBox",0); - SWIG_RegisterMapping("_wxRadioButton","_class_wxRadioButton",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_class_wxTextCtrl","_wxTextCtrl",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxMetaFileDC","_class_wxMetaFileDC",0); - SWIG_RegisterMapping("_wxMenu","_class_wxMenu",0); - SWIG_RegisterMapping("_class_wxMoveEvent","_wxMoveEvent",0); - SWIG_RegisterMapping("_wxListBox","_class_wxListBox",0); - SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_class_wxBrush","_wxBrush",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxWindow","_class_wxNotebook",SwigwxNotebookTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxNotebook",SwigwxNotebookTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_class_wxGrid",SwigwxGridTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxGrid",SwigwxGridTowxWindow); - SWIG_RegisterMapping("_class_wxWindow","_wxWindow",0); - SWIG_RegisterMapping("_class_wxStaticText","_wxStaticText",0); - SWIG_RegisterMapping("_class_wxFont","_wxFont",0); - SWIG_RegisterMapping("_class_wxCloseEvent","_wxCloseEvent",0); - SWIG_RegisterMapping("_class_wxMenuEvent","_wxMenuEvent",0); - SWIG_RegisterMapping("_wxClientDC","_class_wxClientDC",0); - SWIG_RegisterMapping("_wxMouseEvent","_class_wxMouseEvent",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_class_wxRadioBox","_wxRadioBox",0); - SWIG_RegisterMapping("_wxGridCell","_class_wxGridCell",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_wxMemoryDC","_class_wxMemoryDC",0); - SWIG_RegisterMapping("_wxPaintDC","_class_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxFocusEvent","_wxFocusEvent",0); - SWIG_RegisterMapping("_class_wxMaximizeEvent","_wxMaximizeEvent",0); - SWIG_RegisterMapping("_class_wxAcceleratorEntry","_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); - SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_class_wxMetaFileDC","_wxMetaFileDC",0); - SWIG_RegisterMapping("_class_wxMenu","_wxMenu",0); - SWIG_RegisterMapping("_wxControl","_class_wxNotebook",SwigwxNotebookTowxControl); - SWIG_RegisterMapping("_wxControl","_wxNotebook",SwigwxNotebookTowxControl); - SWIG_RegisterMapping("_wxControl","_class_wxControl",0); - SWIG_RegisterMapping("_class_wxListBox","_wxListBox",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); - SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); - SWIG_RegisterMapping("_class_wxPen","_wxPen",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_class_wxStaticBox","_wxStaticBox",0); - SWIG_RegisterMapping("_class_wxScrollEvent","_wxScrollEvent",0); - SWIG_RegisterMapping("_wxJoystickEvent","_class_wxJoystickEvent",0); - SWIG_RegisterMapping("_class_wxChoice","_wxChoice",0); - SWIG_RegisterMapping("_class_wxSlider","_wxSlider",0); - SWIG_RegisterMapping("_class_wxBitmapButton","_wxBitmapButton",0); - SWIG_RegisterMapping("_wxFrame","_class_wxFrame",0); - SWIG_RegisterMapping("_class_wxNotebook","_wxNotebook",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_class_wxMouseEvent","_wxMouseEvent",0); - SWIG_RegisterMapping("_wxButton","_class_wxButton",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxPrinterDC","_wxPrinterDC",0); - SWIG_RegisterMapping("_class_wxPaintDC","_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_class_wxInitDialogEvent","_wxInitDialogEvent",0); - SWIG_RegisterMapping("_class_wxComboBox","_wxComboBox",0); - SWIG_RegisterMapping("_class_wxRadioButton","_wxRadioButton",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxIconizeEvent","_class_wxIconizeEvent",0); - SWIG_RegisterMapping("_class_wxControl","_class_wxNotebook",SwigwxNotebookTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxNotebook",SwigwxNotebookTowxControl); - SWIG_RegisterMapping("_class_wxControl","_wxControl",0); - SWIG_RegisterMapping("_wxStaticBitmap","_class_wxStaticBitmap",0); - SWIG_RegisterMapping("_class_wxIcon","_wxIcon",0); - SWIG_RegisterMapping("_class_wxColour","_wxColour",0); - SWIG_RegisterMapping("_class_wxScreenDC","_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxIdleEvent","_wxIdleEvent",0); - SWIG_RegisterMapping("_wxEraseEvent","_class_wxEraseEvent",0); - SWIG_RegisterMapping("_class_wxMiniFrame","_wxMiniFrame",0); - SWIG_RegisterMapping("_class_wxJoystickEvent","_wxJoystickEvent",0); - SWIG_RegisterMapping("_class_wxShowEvent","_wxShowEvent",0); - SWIG_RegisterMapping("_wxActivateEvent","_class_wxActivateEvent",0); - SWIG_RegisterMapping("_wxGauge","_class_wxGauge",0); - SWIG_RegisterMapping("_class_wxCommandEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent); - SWIG_RegisterMapping("_class_wxCommandEvent","_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent); - SWIG_RegisterMapping("_class_wxCommandEvent","_wxCommandEvent",0); - SWIG_RegisterMapping("_class_wxClientDC","_wxClientDC",0); - SWIG_RegisterMapping("_class_wxSizeEvent","_wxSizeEvent",0); - SWIG_RegisterMapping("_class_wxGridCell","_wxGridCell",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); - SWIG_RegisterMapping("_class_wxBitmap","_wxBitmap",0); - SWIG_RegisterMapping("_class_wxMemoryDC","_wxMemoryDC",0); - SWIG_RegisterMapping("_wxMenuBar","_class_wxMenuBar",0); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxNotebook",SwigwxNotebookTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxNotebook",SwigwxNotebookTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxGrid",SwigwxGridTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxGrid",SwigwxGridTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxEvtHandler",0); - SWIG_RegisterMapping("_wxMenuItem","_class_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxScrollBar","_wxScrollBar",0); - SWIG_RegisterMapping("_wxDash","_unsigned_long",0); - SWIG_RegisterMapping("_wxDash","_long",0); - SWIG_RegisterMapping("_class_wxScrolledWindow","_wxScrolledWindow",0); - SWIG_RegisterMapping("_wxKeyEvent","_class_wxKeyEvent",0); - SWIG_RegisterMapping("_wxMoveEvent","_class_wxMoveEvent",0); - SWIG_RegisterMapping("_class_wxEraseEvent","_wxEraseEvent",0); - SWIG_RegisterMapping("_wxWindow","_class_wxNotebook",SwigwxNotebookTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxNotebook",SwigwxNotebookTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxGrid",SwigwxGridTowxWindow); - SWIG_RegisterMapping("_wxWindow","_wxGrid",SwigwxGridTowxWindow); - SWIG_RegisterMapping("_wxWindow","_class_wxWindow",0); - SWIG_RegisterMapping("_class_wxFrame","_wxFrame",0); -} diff --git a/utils/wxPython/src/msw/windows2.py b/utils/wxPython/src/msw/windows2.py deleted file mode 100644 index c901acee5d..0000000000 --- a/utils/wxPython/src/msw/windows2.py +++ /dev/null @@ -1,390 +0,0 @@ -# This file was created automatically by SWIG. -import windows2c - -from misc import * - -from gdi import * - -from windows import * - -from controls import * - -from events import * -class wxGridCellPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetTextValue(self): - val = windows2c.wxGridCell_GetTextValue(self.this) - return val - def SetTextValue(self,arg0): - val = windows2c.wxGridCell_SetTextValue(self.this,arg0) - return val - def GetFont(self): - val = windows2c.wxGridCell_GetFont(self.this) - val = wxFontPtr(val) - return val - def SetFont(self,arg0): - val = windows2c.wxGridCell_SetFont(self.this,arg0.this) - return val - def GetTextColour(self): - val = windows2c.wxGridCell_GetTextColour(self.this) - val = wxColourPtr(val) - return val - def SetTextColour(self,arg0): - val = windows2c.wxGridCell_SetTextColour(self.this,arg0.this) - return val - def GetBackgroundColour(self): - val = windows2c.wxGridCell_GetBackgroundColour(self.this) - val = wxColourPtr(val) - return val - def SetBackgroundColour(self,arg0): - val = windows2c.wxGridCell_SetBackgroundColour(self.this,arg0.this) - return val - def GetBackgroundBrush(self): - val = windows2c.wxGridCell_GetBackgroundBrush(self.this) - val = wxBrushPtr(val) - return val - def GetAlignment(self): - val = windows2c.wxGridCell_GetAlignment(self.this) - return val - def SetAlignment(self,arg0): - val = windows2c.wxGridCell_SetAlignment(self.this,arg0) - return val - def GetCellBitmap(self): - val = windows2c.wxGridCell_GetCellBitmap(self.this) - val = wxBitmapPtr(val) - return val - def SetCellBitmap(self,arg0): - val = windows2c.wxGridCell_SetCellBitmap(self.this,arg0.this) - return val - def __repr__(self): - return "" -class wxGridCell(wxGridCellPtr): - def __init__(self,this): - self.this = this - - - - -class wxGridPtr(wxPanelPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def AdjustScrollbars(self): - val = windows2c.wxGrid_AdjustScrollbars(self.this) - return val - def AppendCols(self,*args): - val = apply(windows2c.wxGrid_AppendCols,(self.this,)+args) - return val - def AppendRows(self,*args): - val = apply(windows2c.wxGrid_AppendRows,(self.this,)+args) - return val - def BeginBatch(self): - val = windows2c.wxGrid_BeginBatch(self.this) - return val - def CellHitTest(self,arg0,arg1): - val = windows2c.wxGrid_CellHitTest(self.this,arg0,arg1) - return val - def CreateGrid(self,arg0,arg1,*args): - val = apply(windows2c.wxGrid_CreateGrid,(self.this,arg0,arg1,)+args) - return val - def CurrentCellVisible(self): - val = windows2c.wxGrid_CurrentCellVisible(self.this) - return val - def DeleteCols(self,*args): - val = apply(windows2c.wxGrid_DeleteCols,(self.this,)+args) - return val - def DeleteRows(self,*args): - val = apply(windows2c.wxGrid_DeleteRows,(self.this,)+args) - return val - def EndBatch(self): - val = windows2c.wxGrid_EndBatch(self.this) - return val - def GetBatchCount(self): - val = windows2c.wxGrid_GetBatchCount(self.this) - return val - def GetCell(self,arg0,arg1): - val = windows2c.wxGrid_GetCell(self.this,arg0,arg1) - val = wxGridCellPtr(val) - return val - def GetCellAlignment(self,arg0,arg1): - val = windows2c.wxGrid_GetCellAlignment(self.this,arg0,arg1) - return val - def GetDefCellAlignment(self): - val = windows2c.wxGrid_GetDefCellAlignment(self.this) - return val - def GetCellBackgroundColour(self,arg0,arg1): - val = windows2c.wxGrid_GetCellBackgroundColour(self.this,arg0,arg1) - val = wxColourPtr(val) - return val - def GetDefCellBackgroundColour(self): - val = windows2c.wxGrid_GetDefCellBackgroundColour(self.this) - val = wxColourPtr(val) - return val - def GetCellTextColour(self,arg0,arg1): - val = windows2c.wxGrid_GetCellTextColour(self.this,arg0,arg1) - val = wxColourPtr(val) - return val - def GetDefCellTextColour(self): - val = windows2c.wxGrid_GetDefCellTextColour(self.this) - val = wxColourPtr(val) - return val - def GetCellTextFont(self,arg0,arg1): - val = windows2c.wxGrid_GetCellTextFont(self.this,arg0,arg1) - val = wxFontPtr(val) - return val - def GetDefCellTextFont(self): - val = windows2c.wxGrid_GetDefCellTextFont(self.this) - val = wxFontPtr(val) - return val - def GetCellValue(self,arg0,arg1): - val = windows2c.wxGrid_GetCellValue(self.this,arg0,arg1) - return val - def GetCols(self): - val = windows2c.wxGrid_GetCols(self.this) - return val - def GetColumnWidth(self,arg0): - val = windows2c.wxGrid_GetColumnWidth(self.this,arg0) - return val - def GetCurrentRect(self): - val = windows2c.wxGrid_GetCurrentRect(self.this) - val = wxRectPtr(val) - return val - def GetCursorColumn(self): - val = windows2c.wxGrid_GetCursorColumn(self.this) - return val - def GetCursorRow(self): - val = windows2c.wxGrid_GetCursorRow(self.this) - return val - def GetEditable(self): - val = windows2c.wxGrid_GetEditable(self.this) - return val - def GetHorizScrollBar(self): - val = windows2c.wxGrid_GetHorizScrollBar(self.this) - val = wxScrollBarPtr(val) - return val - def GetLabelAlignment(self,arg0): - val = windows2c.wxGrid_GetLabelAlignment(self.this,arg0) - return val - def GetLabelBackgroundColour(self): - val = windows2c.wxGrid_GetLabelBackgroundColour(self.this) - val = wxColourPtr(val) - return val - def GetLabelSize(self,arg0): - val = windows2c.wxGrid_GetLabelSize(self.this,arg0) - return val - def GetLabelTextColour(self): - val = windows2c.wxGrid_GetLabelTextColour(self.this) - val = wxColourPtr(val) - return val - def GetLabelTextFont(self): - val = windows2c.wxGrid_GetLabelTextFont(self.this) - val = wxFontPtr(val) - return val - def GetLabelValue(self,arg0,arg1): - val = windows2c.wxGrid_GetLabelValue(self.this,arg0,arg1) - return val - def GetRowHeight(self,arg0): - val = windows2c.wxGrid_GetRowHeight(self.this,arg0) - return val - def GetRows(self): - val = windows2c.wxGrid_GetRows(self.this) - return val - def GetScrollPosX(self): - val = windows2c.wxGrid_GetScrollPosX(self.this) - return val - def GetScrollPosY(self): - val = windows2c.wxGrid_GetScrollPosY(self.this) - return val - def GetTextItem(self): - val = windows2c.wxGrid_GetTextItem(self.this) - val = wxTextCtrlPtr(val) - return val - def GetVertScrollBar(self): - val = windows2c.wxGrid_GetVertScrollBar(self.this) - val = wxScrollBarPtr(val) - return val - def InsertCols(self,*args): - val = apply(windows2c.wxGrid_InsertCols,(self.this,)+args) - return val - def InsertRows(self,*args): - val = apply(windows2c.wxGrid_InsertRows,(self.this,)+args) - return val - def SetCellAlignment(self,arg0,arg1,arg2): - val = windows2c.wxGrid_SetCellAlignment(self.this,arg0,arg1,arg2) - return val - def SetDefCellAlignment(self,arg0): - val = windows2c.wxGrid_SetDefCellAlignment(self.this,arg0) - return val - def SetCellBackgroundColour(self,arg0,arg1,arg2): - val = windows2c.wxGrid_SetCellBackgroundColour(self.this,arg0.this,arg1,arg2) - return val - def SetDefCellBackgroundColour(self,arg0): - val = windows2c.wxGrid_SetDefCellBackgroundColour(self.this,arg0.this) - return val - def SetCellTextColour(self,arg0,arg1,arg2): - val = windows2c.wxGrid_SetCellTextColour(self.this,arg0.this,arg1,arg2) - return val - def SetDefCellTextColour(self,arg0): - val = windows2c.wxGrid_SetDefCellTextColour(self.this,arg0.this) - return val - def SetCellTextFont(self,arg0,arg1,arg2): - val = windows2c.wxGrid_SetCellTextFont(self.this,arg0.this,arg1,arg2) - return val - def SetDefCellTextFont(self,arg0): - val = windows2c.wxGrid_SetDefCellTextFont(self.this,arg0.this) - return val - def SetCellValue(self,arg0,arg1,arg2): - val = windows2c.wxGrid_SetCellValue(self.this,arg0,arg1,arg2) - return val - def SetColumnWidth(self,arg0,arg1): - val = windows2c.wxGrid_SetColumnWidth(self.this,arg0,arg1) - return val - def SetDividerPen(self,arg0): - val = windows2c.wxGrid_SetDividerPen(self.this,arg0.this) - return val - def SetEditable(self,arg0): - val = windows2c.wxGrid_SetEditable(self.this,arg0) - return val - def SetGridCursor(self,arg0,arg1): - val = windows2c.wxGrid_SetGridCursor(self.this,arg0,arg1) - return val - def SetLabelAlignment(self,arg0,arg1): - val = windows2c.wxGrid_SetLabelAlignment(self.this,arg0,arg1) - return val - def SetLabelBackgroundColour(self,arg0): - val = windows2c.wxGrid_SetLabelBackgroundColour(self.this,arg0.this) - return val - def SetLabelSize(self,arg0,arg1): - val = windows2c.wxGrid_SetLabelSize(self.this,arg0,arg1) - return val - def SetLabelTextColour(self,arg0): - val = windows2c.wxGrid_SetLabelTextColour(self.this,arg0.this) - return val - def SetLabelTextFont(self,arg0): - val = windows2c.wxGrid_SetLabelTextFont(self.this,arg0.this) - return val - def SetLabelValue(self,arg0,arg1,arg2): - val = windows2c.wxGrid_SetLabelValue(self.this,arg0,arg1,arg2) - return val - def SetRowHeight(self,arg0,arg1): - val = windows2c.wxGrid_SetRowHeight(self.this,arg0,arg1) - return val - def UpdateDimensions(self): - val = windows2c.wxGrid_UpdateDimensions(self.this) - return val - def __repr__(self): - return "" -class wxGrid(wxGridPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windows2c.new_wxGrid,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - -class wxNotebookEventPtr(wxCommandEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetSelection(self): - val = windows2c.wxNotebookEvent_GetSelection(self.this) - return val - def GetOldSelection(self): - val = windows2c.wxNotebookEvent_GetOldSelection(self.this) - return val - def __repr__(self): - return "" -class wxNotebookEvent(wxNotebookEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxNotebookPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetPageCount(self): - val = windows2c.wxNotebook_GetPageCount(self.this) - return val - def SetSelection(self,arg0): - val = windows2c.wxNotebook_SetSelection(self.this,arg0) - return val - def AdvanceSelection(self,*args): - val = apply(windows2c.wxNotebook_AdvanceSelection,(self.this,)+args) - return val - def GetSelection(self): - val = windows2c.wxNotebook_GetSelection(self.this) - return val - def SetPageText(self,arg0,arg1): - val = windows2c.wxNotebook_SetPageText(self.this,arg0,arg1) - return val - def GetPageText(self,arg0): - val = windows2c.wxNotebook_GetPageText(self.this,arg0) - return val - def SetImageList(self,arg0): - val = windows2c.wxNotebook_SetImageList(self.this,arg0) - return val - def GetImageList(self): - val = windows2c.wxNotebook_GetImageList(self.this) - return val - def GetPageImage(self,arg0): - val = windows2c.wxNotebook_GetPageImage(self.this,arg0) - return val - def SetPageImage(self,arg0,arg1): - val = windows2c.wxNotebook_SetPageImage(self.this,arg0,arg1) - return val - def GetRowCount(self): - val = windows2c.wxNotebook_GetRowCount(self.this) - return val - def DeletePage(self,arg0): - val = windows2c.wxNotebook_DeletePage(self.this,arg0) - return val - def DeleteAllPages(self): - val = windows2c.wxNotebook_DeleteAllPages(self.this) - return val - def AddPage(self,arg0,arg1,*args): - val = apply(windows2c.wxNotebook_AddPage,(self.this,arg0.this,arg1,)+args) - return val - def InsertPage(self,arg0,arg1,arg2,*args): - val = apply(windows2c.wxNotebook_InsertPage,(self.this,arg0,arg1.this,arg2,)+args) - return val - def GetPage(self,arg0): - val = windows2c.wxNotebook_GetPage(self.this,arg0) - return val - def __repr__(self): - return "" -class wxNotebook(wxNotebookPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windows2c.new_wxNotebook,(arg0.this,arg1,)+args) - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - - - -#-------------- VARIABLE WRAPPERS ------------------ - -wxGRID_TEXT_CTRL = windows2c.wxGRID_TEXT_CTRL -wxGRID_HSCROLL = windows2c.wxGRID_HSCROLL -wxGRID_VSCROLL = windows2c.wxGRID_VSCROLL diff --git a/utils/wxPython/src/msw/wxp.cpp b/utils/wxPython/src/msw/wxp.cpp deleted file mode 100644 index e0cd8a1308..0000000000 --- a/utils/wxPython/src/msw/wxp.cpp +++ /dev/null @@ -1,2028 +0,0 @@ -/* - * FILE : msw\wxp.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/*********************************************************************** - * $Header$ - * swig_lib/python/python.cfg - * - * This file contains coded needed to add variable linking to the - * Python interpreter. C variables are added as a new kind of Python - * datatype. - * - * Also contains supporting code for building python under Windows - * and things like that. - * - * $Log$ - * Revision 1.1 1998/08/18 21:52:29 RD - * MSW version of the SWIG-generated files - * - ************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -#ifdef __cplusplus -} -#endif - -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef SWIG_GLOBAL -#ifdef __cplusplus -#define SWIGSTATIC extern "C" -#else -#define SWIGSTATIC -#endif -#endif - -#ifndef SWIGSTATIC -#define SWIGSTATIC static -#endif - -typedef struct { - char *name; - PyObject *(*get_attr)(void); - int (*set_attr)(PyObject *); -} swig_globalvar; - -typedef struct swig_varlinkobject { - PyObject_HEAD - swig_globalvar **vars; - int nvars; - int maxvars; -} swig_varlinkobject; - -/* ---------------------------------------------------------------------- - swig_varlink_repr() - - Function for python repr method - ---------------------------------------------------------------------- */ - -static PyObject * -swig_varlink_repr(swig_varlinkobject *v) -{ - v = v; - return PyString_FromString(""); -} - -/* --------------------------------------------------------------------- - swig_varlink_print() - - Print out all of the global variable names - --------------------------------------------------------------------- */ - -static int -swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) -{ - - int i = 0; - flags = flags; - fprintf(fp,"Global variables { "); - while (v->vars[i]) { - fprintf(fp,"%s", v->vars[i]->name); - i++; - if (v->vars[i]) fprintf(fp,", "); - } - fprintf(fp," }\n"); - return 0; -} - -/* -------------------------------------------------------------------- - swig_varlink_getattr - - This function gets the value of a variable and returns it as a - PyObject. In our case, we'll be looking at the datatype and - converting into a number or string - -------------------------------------------------------------------- */ - -static PyObject * -swig_varlink_getattr(swig_varlinkobject *v, char *n) -{ - int i = 0; - char temp[128]; - - while (v->vars[i]) { - if (strcmp(v->vars[i]->name,n) == 0) { - return (*v->vars[i]->get_attr)(); - } - i++; - } - sprintf(temp,"C global variable %s not found.", n); - PyErr_SetString(PyExc_NameError,temp); - return NULL; -} - -/* ------------------------------------------------------------------- - swig_varlink_setattr() - - This function sets the value of a variable. - ------------------------------------------------------------------- */ - -static int -swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) -{ - char temp[128]; - int i = 0; - while (v->vars[i]) { - if (strcmp(v->vars[i]->name,n) == 0) { - return (*v->vars[i]->set_attr)(p); - } - i++; - } - sprintf(temp,"C global variable %s not found.", n); - PyErr_SetString(PyExc_NameError,temp); - return 1; -} - -statichere PyTypeObject varlinktype = { -/* PyObject_HEAD_INIT(&PyType_Type) Note : This doesn't work on some machines */ - PyObject_HEAD_INIT(0) - 0, - "varlink", /* Type name */ - sizeof(swig_varlinkobject), /* Basic size */ - 0, /* Itemsize */ - 0, /* Deallocator */ - (printfunc) swig_varlink_print, /* Print */ - (getattrfunc) swig_varlink_getattr, /* get attr */ - (setattrfunc) swig_varlink_setattr, /* Set attr */ - 0, /* tp_compare */ - (reprfunc) swig_varlink_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_mapping*/ - 0, /* tp_hash */ -}; - -/* Create a variable linking object for use later */ - -SWIGSTATIC PyObject * -SWIG_newvarlink(void) -{ - swig_varlinkobject *result = 0; - result = PyMem_NEW(swig_varlinkobject,1); - varlinktype.ob_type = &PyType_Type; /* Patch varlinktype into a PyType */ - result->ob_type = &varlinktype; - /* _Py_NewReference(result); Does not seem to be necessary */ - result->nvars = 0; - result->maxvars = 64; - result->vars = (swig_globalvar **) malloc(64*sizeof(swig_globalvar *)); - result->vars[0] = 0; - result->ob_refcnt = 0; - Py_XINCREF((PyObject *) result); - return ((PyObject*) result); -} - -SWIGSTATIC void -SWIG_addvarlink(PyObject *p, char *name, - PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) -{ - swig_varlinkobject *v; - v= (swig_varlinkobject *) p; - - if (v->nvars >= v->maxvars -1) { - v->maxvars = 2*v->maxvars; - v->vars = (swig_globalvar **) realloc(v->vars,v->maxvars*sizeof(swig_globalvar *)); - if (v->vars == NULL) { - fprintf(stderr,"SWIG : Fatal error in initializing Python module.\n"); - exit(1); - } - } - v->vars[v->nvars] = (swig_globalvar *) malloc(sizeof(swig_globalvar)); - v->vars[v->nvars]->name = (char *) malloc(strlen(name)+1); - strcpy(v->vars[v->nvars]->name,name); - v->vars[v->nvars]->get_attr = get_attr; - v->vars[v->nvars]->set_attr = set_attr; - v->nvars++; - v->vars[v->nvars] = 0; -} - - - -/***************************************************************************** - * $Header$ - * - * swigptr.swg - * - * This file contains supporting code for the SWIG run-time type checking - * mechanism. The following functions are available : - * - * SWIG_RegisterMapping(char *origtype, char *newtype, void *(*cast)(void *)); - * - * Registers a new type-mapping with the type-checker. origtype is the - * original datatype and newtype is an equivalent type. cast is optional - * pointer to a function to cast pointer values between types (this - * is typically used to cast pointers from derived classes to base classes in C++) - * - * SWIG_MakePtr(char *buffer, void *ptr, char *typestring); - * - * Makes a pointer string from a pointer and typestring. The result is returned - * in buffer which is assumed to hold enough space for the result. - * - * char * SWIG_GetPtr(char *buffer, void **ptr, char *type) - * - * Gets a pointer value from a string. If there is a type-mismatch, returns - * a character string to the received type. On success, returns NULL. - * - * - * You can remap these functions by making a file called "swigptr.swg" in - * your the same directory as the interface file you are wrapping. - * - * These functions are normally declared static, but this file can be - * can be used in a multi-module environment by redefining the symbol - * SWIGSTATIC. - *****************************************************************************/ - -#include - -#ifdef SWIG_GLOBAL -#ifdef __cplusplus -#define SWIGSTATIC extern "C" -#else -#define SWIGSTATIC -#endif -#endif - -#ifndef SWIGSTATIC -#define SWIGSTATIC static -#endif - - -/* SWIG pointer structure */ - -typedef struct SwigPtrType { - char *name; /* Datatype name */ - int len; /* Length (used for optimization) */ - void *(*cast)(void *); /* Pointer casting function */ - struct SwigPtrType *next; /* Linked list pointer */ -} SwigPtrType; - -/* Pointer cache structure */ - -typedef struct { - int stat; /* Status (valid) bit */ - SwigPtrType *tp; /* Pointer to type structure */ - char name[256]; /* Given datatype name */ - char mapped[256]; /* Equivalent name */ -} SwigCacheType; - -/* Some variables */ - -static int SwigPtrMax = 64; /* Max entries that can be currently held */ - /* This value may be adjusted dynamically */ -static int SwigPtrN = 0; /* Current number of entries */ -static int SwigPtrSort = 0; /* Status flag indicating sort */ -static int SwigStart[256]; /* Starting positions of types */ - -/* Pointer table */ -static SwigPtrType *SwigPtrTable = 0; /* Table containing pointer equivalences */ - -/* Cached values */ - -#define SWIG_CACHESIZE 8 -#define SWIG_CACHEMASK 0x7 -static SwigCacheType SwigCache[SWIG_CACHESIZE]; -static int SwigCacheIndex = 0; -static int SwigLastCache = 0; - -/* Sort comparison function */ -static int swigsort(const void *data1, const void *data2) { - SwigPtrType *d1 = (SwigPtrType *) data1; - SwigPtrType *d2 = (SwigPtrType *) data2; - return strcmp(d1->name,d2->name); -} - -/* Binary Search function */ -static int swigcmp(const void *key, const void *data) { - char *k = (char *) key; - SwigPtrType *d = (SwigPtrType *) data; - return strncmp(k,d->name,d->len); -} - -/* Register a new datatype with the type-checker */ - -SWIGSTATIC -void SWIG_RegisterMapping(char *origtype, char *newtype, void *(*cast)(void *)) { - - int i; - SwigPtrType *t = 0,*t1; - - /* Allocate the pointer table if necessary */ - - if (!SwigPtrTable) { - SwigPtrTable = (SwigPtrType *) malloc(SwigPtrMax*sizeof(SwigPtrType)); - SwigPtrN = 0; - } - /* Grow the table */ - if (SwigPtrN >= SwigPtrMax) { - SwigPtrMax = 2*SwigPtrMax; - SwigPtrTable = (SwigPtrType *) realloc((char *) SwigPtrTable,SwigPtrMax*sizeof(SwigPtrType)); - } - for (i = 0; i < SwigPtrN; i++) - if (strcmp(SwigPtrTable[i].name,origtype) == 0) { - t = &SwigPtrTable[i]; - break; - } - if (!t) { - t = &SwigPtrTable[SwigPtrN]; - t->name = origtype; - t->len = strlen(t->name); - t->cast = 0; - t->next = 0; - SwigPtrN++; - } - - /* Check for existing entry */ - - while (t->next) { - if ((strcmp(t->name,newtype) == 0)) { - if (cast) t->cast = cast; - return; - } - t = t->next; - } - - /* Now place entry (in sorted order) */ - - t1 = (SwigPtrType *) malloc(sizeof(SwigPtrType)); - t1->name = newtype; - t1->len = strlen(t1->name); - t1->cast = cast; - t1->next = 0; - t->next = t1; - SwigPtrSort = 0; -} - -/* Make a pointer value string */ - -SWIGSTATIC -void SWIG_MakePtr(char *_c, const void *_ptr, char *type) { - static char _hex[16] = - {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - 'a', 'b', 'c', 'd', 'e', 'f'}; - unsigned long _p, _s; - char _result[20], *_r; /* Note : a 64-bit hex number = 16 digits */ - _r = _result; - _p = (unsigned long) _ptr; - if (_p > 0) { - while (_p > 0) { - _s = _p & 0xf; - *(_r++) = _hex[_s]; - _p = _p >> 4; - } - *_r = '_'; - while (_r >= _result) - *(_c++) = *(_r--); - } else { - strcpy (_c, "NULL"); - } - if (_ptr) - strcpy (_c, type); -} - -/* Define for backwards compatibility */ - -#define _swig_make_hex SWIG_MakePtr - -/* Function for getting a pointer value */ - -SWIGSTATIC -char *SWIG_GetPtr(char *_c, void **ptr, char *_t) -{ - unsigned long _p; - char temp_type[256]; - char *name; - int i, len; - SwigPtrType *sp,*tp; - SwigCacheType *cache; - int start, end; - _p = 0; - - /* Pointer values must start with leading underscore */ - if (*_c == '_') { - _c++; - /* Extract hex value from pointer */ - while (*_c) { - if ((*_c >= '0') && (*_c <= '9')) - _p = (_p << 4) + (*_c - '0'); - else if ((*_c >= 'a') && (*_c <= 'f')) - _p = (_p << 4) + ((*_c - 'a') + 10); - else - break; - _c++; - } - - if (_t) { - if (strcmp(_t,_c)) { - if (!SwigPtrSort) { - qsort((void *) SwigPtrTable, SwigPtrN, sizeof(SwigPtrType), swigsort); - for (i = 0; i < 256; i++) { - SwigStart[i] = SwigPtrN; - } - for (i = SwigPtrN-1; i >= 0; i--) { - SwigStart[(int) (SwigPtrTable[i].name[1])] = i; - } - for (i = 255; i >= 1; i--) { - if (SwigStart[i-1] > SwigStart[i]) - SwigStart[i-1] = SwigStart[i]; - } - SwigPtrSort = 1; - for (i = 0; i < SWIG_CACHESIZE; i++) - SwigCache[i].stat = 0; - } - - /* First check cache for matches. Uses last cache value as starting point */ - cache = &SwigCache[SwigLastCache]; - for (i = 0; i < SWIG_CACHESIZE; i++) { - if (cache->stat) { - if (strcmp(_t,cache->name) == 0) { - if (strcmp(_c,cache->mapped) == 0) { - cache->stat++; - *ptr = (void *) _p; - if (cache->tp->cast) *ptr = (*(cache->tp->cast))(*ptr); - return (char *) 0; - } - } - } - SwigLastCache = (SwigLastCache+1) & SWIG_CACHEMASK; - if (!SwigLastCache) cache = SwigCache; - else cache++; - } - /* We have a type mismatch. Will have to look through our type - mapping table to figure out whether or not we can accept this datatype */ - - start = SwigStart[(int) _t[1]]; - end = SwigStart[(int) _t[1]+1]; - sp = &SwigPtrTable[start]; - while (start < end) { - if (swigcmp(_t,sp) == 0) break; - sp++; - start++; - } - if (start >= end) sp = 0; - /* Try to find a match for this */ - if (sp) { - while (swigcmp(_t,sp) == 0) { - name = sp->name; - len = sp->len; - tp = sp->next; - /* Try to find entry for our given datatype */ - while(tp) { - if (tp->len >= 255) { - return _c; - } - strcpy(temp_type,tp->name); - strncat(temp_type,_t+len,255-tp->len); - if (strcmp(_c,temp_type) == 0) { - - strcpy(SwigCache[SwigCacheIndex].mapped,_c); - strcpy(SwigCache[SwigCacheIndex].name,_t); - SwigCache[SwigCacheIndex].stat = 1; - SwigCache[SwigCacheIndex].tp = tp; - SwigCacheIndex = SwigCacheIndex & SWIG_CACHEMASK; - - /* Get pointer value */ - *ptr = (void *) _p; - if (tp->cast) *ptr = (*(tp->cast))(*ptr); - return (char *) 0; - } - tp = tp->next; - } - sp++; - /* Hmmm. Didn't find it this time */ - } - } - /* Didn't find any sort of match for this data. - Get the pointer value and return the received type */ - *ptr = (void *) _p; - return _c; - } else { - /* Found a match on the first try. Return pointer value */ - *ptr = (void *) _p; - return (char *) 0; - } - } else { - /* No type specified. Good luck */ - *ptr = (void *) _p; - return (char *) 0; - } - } else { - if (strcmp (_c, "NULL") == 0) { - *ptr = (void *) 0; - return (char *) 0; - } - *ptr = (void *) 0; - return _c; - } -} - -/* Compatibility mode */ - -#define _swig_get_hex SWIG_GetPtr - -#define SWIG_init initwxpc - -#define SWIG_name "wxpc" - - -#ifdef __WXMSW__ -#include -#undef FindWindow -#undef GetCharWidth -#undef LoadAccelerators -#endif - - -#include "helpers.h" - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; - -#ifdef __WXMSW__ // If building for win32... -extern HINSTANCE wxhInstance; - -BOOL WINAPI DllMain( - HINSTANCE hinstDLL, // handle to DLL module - DWORD fdwReason, // reason for calling function - LPVOID lpvReserved // reserved - ) -{ - wxhInstance = hinstDLL; - return 1; -} -#endif - - -extern "C" SWIGEXPORT(void,initwindowsc)(); -extern "C" SWIGEXPORT(void,initwindows2c)(); -extern "C" SWIGEXPORT(void,initeventsc)(); -extern "C" SWIGEXPORT(void,initmiscc)(); -extern "C" SWIGEXPORT(void,initgdic)(); -extern "C" SWIGEXPORT(void,initmdic)(); -extern "C" SWIGEXPORT(void,initcontrolsc)(); -extern "C" SWIGEXPORT(void,initcontrols2c)(); -extern "C" SWIGEXPORT(void,initcmndlgsc)(); - -static int _wrap_wxPyDefaultPosition_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxPyDefaultPosition is read-only."); - return 1; -} - -static PyObject *_wrap_wxPyDefaultPosition_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxPyDefaultPosition,"_wxPoint_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxPyDefaultSize_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxPyDefaultSize is read-only."); - return 1; -} - -static PyObject *_wrap_wxPyDefaultSize_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxPyDefaultSize,"_wxSize_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static void *SwigwxPyAppTowxEvtHandler(void *ptr) { - wxPyApp *src; - wxEvtHandler *dest; - src = (wxPyApp *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -static wxPyApp *new_wxPyApp() { - wxPythonApp = new wxPyApp(); - return wxPythonApp; - } - -static PyObject *_wrap_new_wxPyApp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxPyApp")) - return NULL; - _result = (wxPyApp *)new_wxPyApp(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyApp_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPyApp_GetAppName(_swigobj) (_swigobj->GetAppName()) -static PyObject *_wrap_wxPyApp_GetAppName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_GetAppName",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetAppName. Expected _wxPyApp_p."); - return NULL; - } - } - _result = new wxString (wxPyApp_GetAppName(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxPyApp_GetAuto3D(_swigobj) (_swigobj->GetAuto3D()) -static PyObject *_wrap_wxPyApp_GetAuto3D(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_GetAuto3D",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetAuto3D. Expected _wxPyApp_p."); - return NULL; - } - } - _result = (bool )wxPyApp_GetAuto3D(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyApp_GetClassName(_swigobj) (_swigobj->GetClassName()) -static PyObject *_wrap_wxPyApp_GetClassName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_GetClassName",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetClassName. Expected _wxPyApp_p."); - return NULL; - } - } - _result = new wxString (wxPyApp_GetClassName(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxPyApp_GetExitOnFrameDelete(_swigobj) (_swigobj->GetExitOnFrameDelete()) -static PyObject *_wrap_wxPyApp_GetExitOnFrameDelete(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_GetExitOnFrameDelete",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetExitOnFrameDelete. Expected _wxPyApp_p."); - return NULL; - } - } - _result = (bool )wxPyApp_GetExitOnFrameDelete(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyApp_GetPrintMode(_swigobj) (_swigobj->GetPrintMode()) -static PyObject *_wrap_wxPyApp_GetPrintMode(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_GetPrintMode",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetPrintMode. Expected _wxPyApp_p."); - return NULL; - } - } - _result = (int )wxPyApp_GetPrintMode(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyApp_GetTopWindow(_swigobj) (_swigobj->GetTopWindow()) -static PyObject *_wrap_wxPyApp_GetTopWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - wxPyApp * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_GetTopWindow",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetTopWindow. Expected _wxPyApp_p."); - return NULL; - } - } - _result = (wxWindow *)wxPyApp_GetTopWindow(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPyApp_GetVendorName(_swigobj) (_swigobj->GetVendorName()) -static PyObject *_wrap_wxPyApp_GetVendorName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_GetVendorName",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetVendorName. Expected _wxPyApp_p."); - return NULL; - } - } - _result = new wxString (wxPyApp_GetVendorName(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxPyApp_Dispatch(_swigobj) (_swigobj->Dispatch()) -static PyObject *_wrap_wxPyApp_Dispatch(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_Dispatch",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_Dispatch. Expected _wxPyApp_p."); - return NULL; - } - } - wxPyApp_Dispatch(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyApp_ExitMainLoop(_swigobj) (_swigobj->ExitMainLoop()) -static PyObject *_wrap_wxPyApp_ExitMainLoop(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_ExitMainLoop",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_ExitMainLoop. Expected _wxPyApp_p."); - return NULL; - } - } - wxPyApp_ExitMainLoop(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyApp_Initialized(_swigobj) (_swigobj->Initialized()) -static PyObject *_wrap_wxPyApp_Initialized(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_Initialized",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_Initialized. Expected _wxPyApp_p."); - return NULL; - } - } - _result = (bool )wxPyApp_Initialized(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyApp_MainLoop(_swigobj) (_swigobj->MainLoop()) -static PyObject *_wrap_wxPyApp_MainLoop(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_MainLoop",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_MainLoop. Expected _wxPyApp_p."); - return NULL; - } - } - _result = (int )wxPyApp_MainLoop(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyApp_Pending(_swigobj) (_swigobj->Pending()) -static PyObject *_wrap_wxPyApp_Pending(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_Pending",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_Pending. Expected _wxPyApp_p."); - return NULL; - } - } - _result = (bool )wxPyApp_Pending(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyApp_SetAppName(_swigobj,_swigarg0) (_swigobj->SetAppName(_swigarg0)) -static PyObject *_wrap_wxPyApp_SetAppName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxPyApp_SetAppName",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetAppName. Expected _wxPyApp_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxPyApp_SetAppName(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxPyApp_SetAuto3D(_swigobj,_swigarg0) (_swigobj->SetAuto3D(_swigarg0)) -static PyObject *_wrap_wxPyApp_SetAuto3D(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPyApp_SetAuto3D",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetAuto3D. Expected _wxPyApp_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxPyApp_SetAuto3D(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyApp_SetClassName(_swigobj,_swigarg0) (_swigobj->SetClassName(_swigarg0)) -static PyObject *_wrap_wxPyApp_SetClassName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxPyApp_SetClassName",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetClassName. Expected _wxPyApp_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxPyApp_SetClassName(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxPyApp_SetExitOnFrameDelete(_swigobj,_swigarg0) (_swigobj->SetExitOnFrameDelete(_swigarg0)) -static PyObject *_wrap_wxPyApp_SetExitOnFrameDelete(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPyApp_SetExitOnFrameDelete",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetExitOnFrameDelete. Expected _wxPyApp_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxPyApp_SetExitOnFrameDelete(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyApp_SetPrintMode(_swigobj,_swigarg0) (_swigobj->SetPrintMode(_swigarg0)) -static PyObject *_wrap_wxPyApp_SetPrintMode(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPyApp_SetPrintMode",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetPrintMode. Expected _wxPyApp_p."); - return NULL; - } - } - wxPyApp_SetPrintMode(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyApp_SetTopWindow(_swigobj,_swigarg0) (_swigobj->SetTopWindow(_swigarg0)) -static PyObject *_wrap_wxPyApp_SetTopWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - wxWindow * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxPyApp_SetTopWindow",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetTopWindow. Expected _wxPyApp_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyApp_SetTopWindow. Expected _wxWindow_p."); - return NULL; - } - } - wxPyApp_SetTopWindow(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyApp_SetVendorName(_swigobj,_swigarg0) (_swigobj->SetVendorName(_swigarg0)) -static PyObject *_wrap_wxPyApp_SetVendorName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxPyApp_SetVendorName",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetVendorName. Expected _wxPyApp_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxPyApp_SetVendorName(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxPyApp_AfterMainLoop(_swigobj) (_swigobj->AfterMainLoop()) -static PyObject *_wrap_wxPyApp_AfterMainLoop(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_AfterMainLoop",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_AfterMainLoop. Expected _wxPyApp_p."); - return NULL; - } - } - wxPyApp_AfterMainLoop(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyMethodDef wxpcMethods[] = { - { "wxPyApp_AfterMainLoop", _wrap_wxPyApp_AfterMainLoop, 1 }, - { "wxPyApp_SetVendorName", _wrap_wxPyApp_SetVendorName, 1 }, - { "wxPyApp_SetTopWindow", _wrap_wxPyApp_SetTopWindow, 1 }, - { "wxPyApp_SetPrintMode", _wrap_wxPyApp_SetPrintMode, 1 }, - { "wxPyApp_SetExitOnFrameDelete", _wrap_wxPyApp_SetExitOnFrameDelete, 1 }, - { "wxPyApp_SetClassName", _wrap_wxPyApp_SetClassName, 1 }, - { "wxPyApp_SetAuto3D", _wrap_wxPyApp_SetAuto3D, 1 }, - { "wxPyApp_SetAppName", _wrap_wxPyApp_SetAppName, 1 }, - { "wxPyApp_Pending", _wrap_wxPyApp_Pending, 1 }, - { "wxPyApp_MainLoop", _wrap_wxPyApp_MainLoop, 1 }, - { "wxPyApp_Initialized", _wrap_wxPyApp_Initialized, 1 }, - { "wxPyApp_ExitMainLoop", _wrap_wxPyApp_ExitMainLoop, 1 }, - { "wxPyApp_Dispatch", _wrap_wxPyApp_Dispatch, 1 }, - { "wxPyApp_GetVendorName", _wrap_wxPyApp_GetVendorName, 1 }, - { "wxPyApp_GetTopWindow", _wrap_wxPyApp_GetTopWindow, 1 }, - { "wxPyApp_GetPrintMode", _wrap_wxPyApp_GetPrintMode, 1 }, - { "wxPyApp_GetExitOnFrameDelete", _wrap_wxPyApp_GetExitOnFrameDelete, 1 }, - { "wxPyApp_GetClassName", _wrap_wxPyApp_GetClassName, 1 }, - { "wxPyApp_GetAuto3D", _wrap_wxPyApp_GetAuto3D, 1 }, - { "wxPyApp_GetAppName", _wrap_wxPyApp_GetAppName, 1 }, - { "new_wxPyApp", _wrap_new_wxPyApp, 1 }, - { "_wxSetDictionary", __wxSetDictionary, 1 }, - { "_wxStart", __wxStart, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initwxpc)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("wxpc", wxpcMethods); - d = PyModule_GetDict(m); - PyDict_SetItemString(d,"wxMAJOR_VERSION", PyInt_FromLong((long) wxMAJOR_VERSION)); - PyDict_SetItemString(d,"wxMINOR_VERSION", PyInt_FromLong((long) wxMINOR_VERSION)); - PyDict_SetItemString(d,"wxRELEASE_NUMBER", PyInt_FromLong((long) wxRELEASE_NUMBER)); - PyDict_SetItemString(d,"UNKNOWN", PyInt_FromLong((long) UNKNOWN)); - PyDict_SetItemString(d,"NOT_FOUND", PyInt_FromLong((long) NOT_FOUND)); - PyDict_SetItemString(d,"wxVSCROLL", PyInt_FromLong((long) wxVSCROLL)); - PyDict_SetItemString(d,"wxHSCROLL", PyInt_FromLong((long) wxHSCROLL)); - PyDict_SetItemString(d,"wxCAPTION", PyInt_FromLong((long) wxCAPTION)); - PyDict_SetItemString(d,"wxDOUBLE_BORDER", PyInt_FromLong((long) wxDOUBLE_BORDER)); - PyDict_SetItemString(d,"wxSUNKEN_BORDER", PyInt_FromLong((long) wxSUNKEN_BORDER)); - PyDict_SetItemString(d,"wxRAISED_BORDER", PyInt_FromLong((long) wxRAISED_BORDER)); - PyDict_SetItemString(d,"wxBORDER", PyInt_FromLong((long) wxBORDER)); - PyDict_SetItemString(d,"wxSIMPLE_BORDER", PyInt_FromLong((long) wxSIMPLE_BORDER)); - PyDict_SetItemString(d,"wxSTATIC_BORDER", PyInt_FromLong((long) wxSTATIC_BORDER)); - PyDict_SetItemString(d,"wxTRANSPARENT_WINDOW", PyInt_FromLong((long) wxTRANSPARENT_WINDOW)); - PyDict_SetItemString(d,"wxNO_BORDER", PyInt_FromLong((long) wxNO_BORDER)); - PyDict_SetItemString(d,"wxUSER_COLOURS", PyInt_FromLong((long) wxUSER_COLOURS)); - PyDict_SetItemString(d,"wxNO_3D", PyInt_FromLong((long) wxNO_3D)); - PyDict_SetItemString(d,"wxTAB_TRAVERSAL", PyInt_FromLong((long) wxTAB_TRAVERSAL)); - PyDict_SetItemString(d,"wxHORIZONTAL", PyInt_FromLong((long) wxHORIZONTAL)); - PyDict_SetItemString(d,"wxVERTICAL", PyInt_FromLong((long) wxVERTICAL)); - PyDict_SetItemString(d,"wxBOTH", PyInt_FromLong((long) wxBOTH)); - PyDict_SetItemString(d,"wxCENTER_FRAME", PyInt_FromLong((long) wxCENTER_FRAME)); - PyDict_SetItemString(d,"wxSTAY_ON_TOP", PyInt_FromLong((long) wxSTAY_ON_TOP)); - PyDict_SetItemString(d,"wxICONIZE", PyInt_FromLong((long) wxICONIZE)); - PyDict_SetItemString(d,"wxMINIMIZE", PyInt_FromLong((long) wxMINIMIZE)); - PyDict_SetItemString(d,"wxMAXIMIZE", PyInt_FromLong((long) wxMAXIMIZE)); - PyDict_SetItemString(d,"wxTHICK_FRAME", PyInt_FromLong((long) wxTHICK_FRAME)); - PyDict_SetItemString(d,"wxSYSTEM_MENU", PyInt_FromLong((long) wxSYSTEM_MENU)); - PyDict_SetItemString(d,"wxMINIMIZE_BOX", PyInt_FromLong((long) wxMINIMIZE_BOX)); - PyDict_SetItemString(d,"wxMAXIMIZE_BOX", PyInt_FromLong((long) wxMAXIMIZE_BOX)); - PyDict_SetItemString(d,"wxTINY_CAPTION_HORIZ", PyInt_FromLong((long) wxTINY_CAPTION_HORIZ)); - PyDict_SetItemString(d,"wxTINY_CAPTION_VERT", PyInt_FromLong((long) wxTINY_CAPTION_VERT)); - PyDict_SetItemString(d,"wxRESIZE_BOX", PyInt_FromLong((long) wxRESIZE_BOX)); - PyDict_SetItemString(d,"wxRESIZE_BORDER", PyInt_FromLong((long) wxRESIZE_BORDER)); - PyDict_SetItemString(d,"wxDIALOG_MODAL", PyInt_FromLong((long) wxDIALOG_MODAL)); - PyDict_SetItemString(d,"wxDIALOG_MODELESS", PyInt_FromLong((long) wxDIALOG_MODELESS)); - PyDict_SetItemString(d,"wxDEFAULT_FRAME_STYLE", PyInt_FromLong((long) wxDEFAULT_FRAME_STYLE)); - PyDict_SetItemString(d,"wxDEFAULT_DIALOG_STYLE", PyInt_FromLong((long) wxDEFAULT_DIALOG_STYLE)); - PyDict_SetItemString(d,"wxRETAINED", PyInt_FromLong((long) wxRETAINED)); - PyDict_SetItemString(d,"wxBACKINGSTORE", PyInt_FromLong((long) wxBACKINGSTORE)); - PyDict_SetItemString(d,"wxTB_3DBUTTONS", PyInt_FromLong((long) wxTB_3DBUTTONS)); - PyDict_SetItemString(d,"wxTB_HORIZONTAL", PyInt_FromLong((long) wxTB_HORIZONTAL)); - PyDict_SetItemString(d,"wxTB_VERTICAL", PyInt_FromLong((long) wxTB_VERTICAL)); - PyDict_SetItemString(d,"wxCOLOURED", PyInt_FromLong((long) wxCOLOURED)); - PyDict_SetItemString(d,"wxFIXED_LENGTH", PyInt_FromLong((long) wxFIXED_LENGTH)); - PyDict_SetItemString(d,"wxALIGN_LEFT", PyInt_FromLong((long) wxALIGN_LEFT)); - PyDict_SetItemString(d,"wxALIGN_CENTER", PyInt_FromLong((long) wxALIGN_CENTER)); - PyDict_SetItemString(d,"wxALIGN_CENTRE", PyInt_FromLong((long) wxALIGN_CENTRE)); - PyDict_SetItemString(d,"wxALIGN_RIGHT", PyInt_FromLong((long) wxALIGN_RIGHT)); - PyDict_SetItemString(d,"wxLB_NEEDED_SB", PyInt_FromLong((long) wxLB_NEEDED_SB)); - PyDict_SetItemString(d,"wxLB_ALWAYS_SB", PyInt_FromLong((long) wxLB_ALWAYS_SB)); - PyDict_SetItemString(d,"wxLB_SORT", PyInt_FromLong((long) wxLB_SORT)); - PyDict_SetItemString(d,"wxLB_SINGLE", PyInt_FromLong((long) wxLB_SINGLE)); - PyDict_SetItemString(d,"wxLB_MULTIPLE", PyInt_FromLong((long) wxLB_MULTIPLE)); - PyDict_SetItemString(d,"wxLB_EXTENDED", PyInt_FromLong((long) wxLB_EXTENDED)); - PyDict_SetItemString(d,"wxLB_OWNERDRAW", PyInt_FromLong((long) wxLB_OWNERDRAW)); - PyDict_SetItemString(d,"wxLB_HSCROLL", PyInt_FromLong((long) wxLB_HSCROLL)); - PyDict_SetItemString(d,"wxPROCESS_ENTER", PyInt_FromLong((long) wxPROCESS_ENTER)); - PyDict_SetItemString(d,"wxPASSWORD", PyInt_FromLong((long) wxPASSWORD)); - PyDict_SetItemString(d,"wxTE_PROCESS_ENTER", PyInt_FromLong((long) wxTE_PROCESS_ENTER)); - PyDict_SetItemString(d,"wxTE_PASSWORD", PyInt_FromLong((long) wxTE_PASSWORD)); - PyDict_SetItemString(d,"wxTE_READONLY", PyInt_FromLong((long) wxTE_READONLY)); - PyDict_SetItemString(d,"wxTE_MULTILINE", PyInt_FromLong((long) wxTE_MULTILINE)); - PyDict_SetItemString(d,"wxCB_SIMPLE", PyInt_FromLong((long) wxCB_SIMPLE)); - PyDict_SetItemString(d,"wxCB_DROPDOWN", PyInt_FromLong((long) wxCB_DROPDOWN)); - PyDict_SetItemString(d,"wxCB_SORT", PyInt_FromLong((long) wxCB_SORT)); - PyDict_SetItemString(d,"wxCB_READONLY", PyInt_FromLong((long) wxCB_READONLY)); - PyDict_SetItemString(d,"wxRA_HORIZONTAL", PyInt_FromLong((long) wxRA_HORIZONTAL)); - PyDict_SetItemString(d,"wxRA_VERTICAL", PyInt_FromLong((long) wxRA_VERTICAL)); - PyDict_SetItemString(d,"wxRB_GROUP", PyInt_FromLong((long) wxRB_GROUP)); - PyDict_SetItemString(d,"wxGA_PROGRESSBAR", PyInt_FromLong((long) wxGA_PROGRESSBAR)); - PyDict_SetItemString(d,"wxGA_HORIZONTAL", PyInt_FromLong((long) wxGA_HORIZONTAL)); - PyDict_SetItemString(d,"wxGA_VERTICAL", PyInt_FromLong((long) wxGA_VERTICAL)); - PyDict_SetItemString(d,"wxSL_HORIZONTAL", PyInt_FromLong((long) wxSL_HORIZONTAL)); - PyDict_SetItemString(d,"wxSL_VERTICAL", PyInt_FromLong((long) wxSL_VERTICAL)); - PyDict_SetItemString(d,"wxSL_AUTOTICKS", PyInt_FromLong((long) wxSL_AUTOTICKS)); - PyDict_SetItemString(d,"wxSL_LABELS", PyInt_FromLong((long) wxSL_LABELS)); - PyDict_SetItemString(d,"wxSL_LEFT", PyInt_FromLong((long) wxSL_LEFT)); - PyDict_SetItemString(d,"wxSL_TOP", PyInt_FromLong((long) wxSL_TOP)); - PyDict_SetItemString(d,"wxSL_RIGHT", PyInt_FromLong((long) wxSL_RIGHT)); - PyDict_SetItemString(d,"wxSL_BOTTOM", PyInt_FromLong((long) wxSL_BOTTOM)); - PyDict_SetItemString(d,"wxSL_BOTH", PyInt_FromLong((long) wxSL_BOTH)); - PyDict_SetItemString(d,"wxSL_SELRANGE", PyInt_FromLong((long) wxSL_SELRANGE)); - PyDict_SetItemString(d,"wxSB_HORIZONTAL", PyInt_FromLong((long) wxSB_HORIZONTAL)); - PyDict_SetItemString(d,"wxSB_VERTICAL", PyInt_FromLong((long) wxSB_VERTICAL)); - PyDict_SetItemString(d,"wxBU_AUTODRAW", PyInt_FromLong((long) wxBU_AUTODRAW)); - PyDict_SetItemString(d,"wxBU_NOAUTODRAW", PyInt_FromLong((long) wxBU_NOAUTODRAW)); - PyDict_SetItemString(d,"wxTR_HAS_BUTTONS", PyInt_FromLong((long) wxTR_HAS_BUTTONS)); - PyDict_SetItemString(d,"wxTR_EDIT_LABELS", PyInt_FromLong((long) wxTR_EDIT_LABELS)); - PyDict_SetItemString(d,"wxLC_ICON", PyInt_FromLong((long) wxLC_ICON)); - PyDict_SetItemString(d,"wxLC_SMALL_ICON", PyInt_FromLong((long) wxLC_SMALL_ICON)); - PyDict_SetItemString(d,"wxLC_LIST", PyInt_FromLong((long) wxLC_LIST)); - PyDict_SetItemString(d,"wxLC_REPORT", PyInt_FromLong((long) wxLC_REPORT)); - PyDict_SetItemString(d,"wxLC_ALIGN_TOP", PyInt_FromLong((long) wxLC_ALIGN_TOP)); - PyDict_SetItemString(d,"wxLC_ALIGN_LEFT", PyInt_FromLong((long) wxLC_ALIGN_LEFT)); - PyDict_SetItemString(d,"wxLC_AUTOARRANGE", PyInt_FromLong((long) wxLC_AUTOARRANGE)); - PyDict_SetItemString(d,"wxLC_USER_TEXT", PyInt_FromLong((long) wxLC_USER_TEXT)); - PyDict_SetItemString(d,"wxLC_EDIT_LABELS", PyInt_FromLong((long) wxLC_EDIT_LABELS)); - PyDict_SetItemString(d,"wxLC_NO_HEADER", PyInt_FromLong((long) wxLC_NO_HEADER)); - PyDict_SetItemString(d,"wxLC_NO_SORT_HEADER", PyInt_FromLong((long) wxLC_NO_SORT_HEADER)); - PyDict_SetItemString(d,"wxLC_SINGLE_SEL", PyInt_FromLong((long) wxLC_SINGLE_SEL)); - PyDict_SetItemString(d,"wxLC_SORT_ASCENDING", PyInt_FromLong((long) wxLC_SORT_ASCENDING)); - PyDict_SetItemString(d,"wxLC_SORT_DESCENDING", PyInt_FromLong((long) wxLC_SORT_DESCENDING)); - PyDict_SetItemString(d,"wxLC_MASK_TYPE", PyInt_FromLong((long) wxLC_MASK_TYPE)); - PyDict_SetItemString(d,"wxLC_MASK_ALIGN", PyInt_FromLong((long) wxLC_MASK_ALIGN)); - PyDict_SetItemString(d,"wxLC_MASK_SORT", PyInt_FromLong((long) wxLC_MASK_SORT)); - PyDict_SetItemString(d,"wxSP_VERTICAL", PyInt_FromLong((long) wxSP_VERTICAL)); - PyDict_SetItemString(d,"wxSP_HORIZONTAL", PyInt_FromLong((long) wxSP_HORIZONTAL)); - PyDict_SetItemString(d,"wxSP_ARROW_KEYS", PyInt_FromLong((long) wxSP_ARROW_KEYS)); - PyDict_SetItemString(d,"wxSP_WRAP", PyInt_FromLong((long) wxSP_WRAP)); - PyDict_SetItemString(d,"wxSP_NOBORDER", PyInt_FromLong((long) wxSP_NOBORDER)); - PyDict_SetItemString(d,"wxSP_3D", PyInt_FromLong((long) wxSP_3D)); - PyDict_SetItemString(d,"wxSP_BORDER", PyInt_FromLong((long) wxSP_BORDER)); - PyDict_SetItemString(d,"wxTAB_MULTILINE", PyInt_FromLong((long) wxTAB_MULTILINE)); - PyDict_SetItemString(d,"wxTAB_RIGHTJUSTIFY", PyInt_FromLong((long) wxTAB_RIGHTJUSTIFY)); - PyDict_SetItemString(d,"wxTAB_FIXEDWIDTH", PyInt_FromLong((long) wxTAB_FIXEDWIDTH)); - PyDict_SetItemString(d,"wxTAB_OWNERDRAW", PyInt_FromLong((long) wxTAB_OWNERDRAW)); - PyDict_SetItemString(d,"wxFLOOD_SURFACE", PyInt_FromLong((long) wxFLOOD_SURFACE)); - PyDict_SetItemString(d,"wxFLOOD_BORDER", PyInt_FromLong((long) wxFLOOD_BORDER)); - PyDict_SetItemString(d,"wxODDEVEN_RULE", PyInt_FromLong((long) wxODDEVEN_RULE)); - PyDict_SetItemString(d,"wxWINDING_RULE", PyInt_FromLong((long) wxWINDING_RULE)); - PyDict_SetItemString(d,"wxTOOL_TOP", PyInt_FromLong((long) wxTOOL_TOP)); - PyDict_SetItemString(d,"wxTOOL_BOTTOM", PyInt_FromLong((long) wxTOOL_BOTTOM)); - PyDict_SetItemString(d,"wxTOOL_LEFT", PyInt_FromLong((long) wxTOOL_LEFT)); - PyDict_SetItemString(d,"wxTOOL_RIGHT", PyInt_FromLong((long) wxTOOL_RIGHT)); - PyDict_SetItemString(d,"wxOK", PyInt_FromLong((long) wxOK)); - PyDict_SetItemString(d,"wxYES_NO", PyInt_FromLong((long) wxYES_NO)); - PyDict_SetItemString(d,"wxCANCEL", PyInt_FromLong((long) wxCANCEL)); - PyDict_SetItemString(d,"wxYES", PyInt_FromLong((long) wxYES)); - PyDict_SetItemString(d,"wxNO", PyInt_FromLong((long) wxNO)); - PyDict_SetItemString(d,"wxICON_EXCLAMATION", PyInt_FromLong((long) wxICON_EXCLAMATION)); - PyDict_SetItemString(d,"wxICON_HAND", PyInt_FromLong((long) wxICON_HAND)); - PyDict_SetItemString(d,"wxICON_QUESTION", PyInt_FromLong((long) wxICON_QUESTION)); - PyDict_SetItemString(d,"wxICON_INFORMATION", PyInt_FromLong((long) wxICON_INFORMATION)); - PyDict_SetItemString(d,"wxICON_STOP", PyInt_FromLong((long) wxICON_STOP)); - PyDict_SetItemString(d,"wxICON_ASTERISK", PyInt_FromLong((long) wxICON_ASTERISK)); - PyDict_SetItemString(d,"wxICON_MASK", PyInt_FromLong((long) wxICON_MASK)); - PyDict_SetItemString(d,"wxCENTRE", PyInt_FromLong((long) wxCENTRE)); - PyDict_SetItemString(d,"wxCENTER", PyInt_FromLong((long) wxCENTER)); - PyDict_SetItemString(d,"wxSIZE_AUTO_WIDTH", PyInt_FromLong((long) wxSIZE_AUTO_WIDTH)); - PyDict_SetItemString(d,"wxSIZE_AUTO_HEIGHT", PyInt_FromLong((long) wxSIZE_AUTO_HEIGHT)); - PyDict_SetItemString(d,"wxSIZE_AUTO", PyInt_FromLong((long) wxSIZE_AUTO)); - PyDict_SetItemString(d,"wxSIZE_USE_EXISTING", PyInt_FromLong((long) wxSIZE_USE_EXISTING)); - PyDict_SetItemString(d,"wxSIZE_ALLOW_MINUS_ONE", PyInt_FromLong((long) wxSIZE_ALLOW_MINUS_ONE)); - PyDict_SetItemString(d,"wxDF_TEXT", PyInt_FromLong((long) wxDF_TEXT)); - PyDict_SetItemString(d,"wxDF_BITMAP", PyInt_FromLong((long) wxDF_BITMAP)); - PyDict_SetItemString(d,"wxDF_METAFILE", PyInt_FromLong((long) wxDF_METAFILE)); - PyDict_SetItemString(d,"wxDF_DIB", PyInt_FromLong((long) wxDF_DIB)); - PyDict_SetItemString(d,"wxDF_OEMTEXT", PyInt_FromLong((long) wxDF_OEMTEXT)); - PyDict_SetItemString(d,"wxDF_FILENAME", PyInt_FromLong((long) wxDF_FILENAME)); - PyDict_SetItemString(d,"wxPORTRAIT", PyInt_FromLong((long) wxPORTRAIT)); - PyDict_SetItemString(d,"wxLANDSCAPE", PyInt_FromLong((long) wxLANDSCAPE)); - PyDict_SetItemString(d,"wxID_OPEN", PyInt_FromLong((long) wxID_OPEN)); - PyDict_SetItemString(d,"wxID_CLOSE", PyInt_FromLong((long) wxID_CLOSE)); - PyDict_SetItemString(d,"wxID_NEW", PyInt_FromLong((long) wxID_NEW)); - PyDict_SetItemString(d,"wxID_SAVE", PyInt_FromLong((long) wxID_SAVE)); - PyDict_SetItemString(d,"wxID_SAVEAS", PyInt_FromLong((long) wxID_SAVEAS)); - PyDict_SetItemString(d,"wxID_REVERT", PyInt_FromLong((long) wxID_REVERT)); - PyDict_SetItemString(d,"wxID_EXIT", PyInt_FromLong((long) wxID_EXIT)); - PyDict_SetItemString(d,"wxID_UNDO", PyInt_FromLong((long) wxID_UNDO)); - PyDict_SetItemString(d,"wxID_REDO", PyInt_FromLong((long) wxID_REDO)); - PyDict_SetItemString(d,"wxID_HELP", PyInt_FromLong((long) wxID_HELP)); - PyDict_SetItemString(d,"wxID_PRINT", PyInt_FromLong((long) wxID_PRINT)); - PyDict_SetItemString(d,"wxID_PRINT_SETUP", PyInt_FromLong((long) wxID_PRINT_SETUP)); - PyDict_SetItemString(d,"wxID_PREVIEW", PyInt_FromLong((long) wxID_PREVIEW)); - PyDict_SetItemString(d,"wxID_ABOUT", PyInt_FromLong((long) wxID_ABOUT)); - PyDict_SetItemString(d,"wxID_HELP_CONTENTS", PyInt_FromLong((long) wxID_HELP_CONTENTS)); - PyDict_SetItemString(d,"wxID_HELP_COMMANDS", PyInt_FromLong((long) wxID_HELP_COMMANDS)); - PyDict_SetItemString(d,"wxID_HELP_PROCEDURES", PyInt_FromLong((long) wxID_HELP_PROCEDURES)); - PyDict_SetItemString(d,"wxID_HELP_CONTEXT", PyInt_FromLong((long) wxID_HELP_CONTEXT)); - PyDict_SetItemString(d,"wxID_CUT", PyInt_FromLong((long) wxID_CUT)); - PyDict_SetItemString(d,"wxID_COPY", PyInt_FromLong((long) wxID_COPY)); - PyDict_SetItemString(d,"wxID_PASTE", PyInt_FromLong((long) wxID_PASTE)); - PyDict_SetItemString(d,"wxID_CLEAR", PyInt_FromLong((long) wxID_CLEAR)); - PyDict_SetItemString(d,"wxID_FIND", PyInt_FromLong((long) wxID_FIND)); - PyDict_SetItemString(d,"wxID_FILE1", PyInt_FromLong((long) wxID_FILE1)); - PyDict_SetItemString(d,"wxID_FILE2", PyInt_FromLong((long) wxID_FILE2)); - PyDict_SetItemString(d,"wxID_FILE3", PyInt_FromLong((long) wxID_FILE3)); - PyDict_SetItemString(d,"wxID_FILE4", PyInt_FromLong((long) wxID_FILE4)); - PyDict_SetItemString(d,"wxID_FILE5", PyInt_FromLong((long) wxID_FILE5)); - PyDict_SetItemString(d,"wxID_FILE6", PyInt_FromLong((long) wxID_FILE6)); - PyDict_SetItemString(d,"wxID_FILE7", PyInt_FromLong((long) wxID_FILE7)); - PyDict_SetItemString(d,"wxID_FILE8", PyInt_FromLong((long) wxID_FILE8)); - PyDict_SetItemString(d,"wxID_FILE9", PyInt_FromLong((long) wxID_FILE9)); - PyDict_SetItemString(d,"wxID_OK", PyInt_FromLong((long) wxID_OK)); - PyDict_SetItemString(d,"wxID_CANCEL", PyInt_FromLong((long) wxID_CANCEL)); - PyDict_SetItemString(d,"wxID_APPLY", PyInt_FromLong((long) wxID_APPLY)); - PyDict_SetItemString(d,"wxID_YES", PyInt_FromLong((long) wxID_YES)); - PyDict_SetItemString(d,"wxID_NO", PyInt_FromLong((long) wxID_NO)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_BMP", PyInt_FromLong((long) wxBITMAP_TYPE_BMP)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_BMP_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_BMP_RESOURCE)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_ICO", PyInt_FromLong((long) wxBITMAP_TYPE_ICO)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_ICO_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_ICO_RESOURCE)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_CUR", PyInt_FromLong((long) wxBITMAP_TYPE_CUR)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_CUR_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_CUR_RESOURCE)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_XBM", PyInt_FromLong((long) wxBITMAP_TYPE_XBM)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_XBM_DATA", PyInt_FromLong((long) wxBITMAP_TYPE_XBM_DATA)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_XPM", PyInt_FromLong((long) wxBITMAP_TYPE_XPM)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_XPM_DATA", PyInt_FromLong((long) wxBITMAP_TYPE_XPM_DATA)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_TIF", PyInt_FromLong((long) wxBITMAP_TYPE_TIF)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_TIF_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_TIF_RESOURCE)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_GIF", PyInt_FromLong((long) wxBITMAP_TYPE_GIF)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_GIF_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_GIF_RESOURCE)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_PNG", PyInt_FromLong((long) wxBITMAP_TYPE_PNG)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_PNG_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_PNG_RESOURCE)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_ANY", PyInt_FromLong((long) wxBITMAP_TYPE_ANY)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_RESOURCE)); - PyDict_SetItemString(d,"wxOPEN", PyInt_FromLong((long) wxOPEN)); - PyDict_SetItemString(d,"wxSAVE", PyInt_FromLong((long) wxSAVE)); - PyDict_SetItemString(d,"wxHIDE_READONLY", PyInt_FromLong((long) wxHIDE_READONLY)); - PyDict_SetItemString(d,"wxOVERWRITE_PROMPT", PyInt_FromLong((long) wxOVERWRITE_PROMPT)); - PyDict_SetItemString(d,"wxACCEL_ALT", PyInt_FromLong((long) wxACCEL_ALT)); - PyDict_SetItemString(d,"wxACCEL_CTRL", PyInt_FromLong((long) wxACCEL_CTRL)); - PyDict_SetItemString(d,"wxACCEL_SHIFT", PyInt_FromLong((long) wxACCEL_SHIFT)); - PyDict_SetItemString(d,"ERR_PARAM", PyInt_FromLong((long) ERR_PARAM)); - PyDict_SetItemString(d,"ERR_NODATA", PyInt_FromLong((long) ERR_NODATA)); - PyDict_SetItemString(d,"ERR_CANCEL", PyInt_FromLong((long) ERR_CANCEL)); - PyDict_SetItemString(d,"ERR_SUCCESS", PyInt_FromLong((long) ERR_SUCCESS)); - PyDict_SetItemString(d,"wxDEFAULT", PyInt_FromLong((long) wxDEFAULT)); - PyDict_SetItemString(d,"wxDECORATIVE", PyInt_FromLong((long) wxDECORATIVE)); - PyDict_SetItemString(d,"wxROMAN", PyInt_FromLong((long) wxROMAN)); - PyDict_SetItemString(d,"wxSCRIPT", PyInt_FromLong((long) wxSCRIPT)); - PyDict_SetItemString(d,"wxSWISS", PyInt_FromLong((long) wxSWISS)); - PyDict_SetItemString(d,"wxMODERN", PyInt_FromLong((long) wxMODERN)); - PyDict_SetItemString(d,"wxTELETYPE", PyInt_FromLong((long) wxTELETYPE)); - PyDict_SetItemString(d,"wxVARIABLE", PyInt_FromLong((long) wxVARIABLE)); - PyDict_SetItemString(d,"wxFIXED", PyInt_FromLong((long) wxFIXED)); - PyDict_SetItemString(d,"wxNORMAL", PyInt_FromLong((long) wxNORMAL)); - PyDict_SetItemString(d,"wxLIGHT", PyInt_FromLong((long) wxLIGHT)); - PyDict_SetItemString(d,"wxBOLD", PyInt_FromLong((long) wxBOLD)); - PyDict_SetItemString(d,"wxITALIC", PyInt_FromLong((long) wxITALIC)); - PyDict_SetItemString(d,"wxSLANT", PyInt_FromLong((long) wxSLANT)); - PyDict_SetItemString(d,"wxSOLID", PyInt_FromLong((long) wxSOLID)); - PyDict_SetItemString(d,"wxDOT", PyInt_FromLong((long) wxDOT)); - PyDict_SetItemString(d,"wxLONG_DASH", PyInt_FromLong((long) wxLONG_DASH)); - PyDict_SetItemString(d,"wxSHORT_DASH", PyInt_FromLong((long) wxSHORT_DASH)); - PyDict_SetItemString(d,"wxDOT_DASH", PyInt_FromLong((long) wxDOT_DASH)); - PyDict_SetItemString(d,"wxUSER_DASH", PyInt_FromLong((long) wxUSER_DASH)); - PyDict_SetItemString(d,"wxTRANSPARENT", PyInt_FromLong((long) wxTRANSPARENT)); - PyDict_SetItemString(d,"wxSTIPPLE", PyInt_FromLong((long) wxSTIPPLE)); - PyDict_SetItemString(d,"wxBDIAGONAL_HATCH", PyInt_FromLong((long) wxBDIAGONAL_HATCH)); - PyDict_SetItemString(d,"wxCROSSDIAG_HATCH", PyInt_FromLong((long) wxCROSSDIAG_HATCH)); - PyDict_SetItemString(d,"wxFDIAGONAL_HATCH", PyInt_FromLong((long) wxFDIAGONAL_HATCH)); - PyDict_SetItemString(d,"wxCROSS_HATCH", PyInt_FromLong((long) wxCROSS_HATCH)); - PyDict_SetItemString(d,"wxHORIZONTAL_HATCH", PyInt_FromLong((long) wxHORIZONTAL_HATCH)); - PyDict_SetItemString(d,"wxVERTICAL_HATCH", PyInt_FromLong((long) wxVERTICAL_HATCH)); - PyDict_SetItemString(d,"wxJOIN_BEVEL", PyInt_FromLong((long) wxJOIN_BEVEL)); - PyDict_SetItemString(d,"wxJOIN_MITER", PyInt_FromLong((long) wxJOIN_MITER)); - PyDict_SetItemString(d,"wxJOIN_ROUND", PyInt_FromLong((long) wxJOIN_ROUND)); - PyDict_SetItemString(d,"wxCAP_ROUND", PyInt_FromLong((long) wxCAP_ROUND)); - PyDict_SetItemString(d,"wxCAP_PROJECTING", PyInt_FromLong((long) wxCAP_PROJECTING)); - PyDict_SetItemString(d,"wxCAP_BUTT", PyInt_FromLong((long) wxCAP_BUTT)); - PyDict_SetItemString(d,"wxCLEAR", PyInt_FromLong((long) wxCLEAR)); - PyDict_SetItemString(d,"wxXOR", PyInt_FromLong((long) wxXOR)); - PyDict_SetItemString(d,"wxINVERT", PyInt_FromLong((long) wxINVERT)); - PyDict_SetItemString(d,"wxOR_REVERSE", PyInt_FromLong((long) wxOR_REVERSE)); - PyDict_SetItemString(d,"wxAND_REVERSE", PyInt_FromLong((long) wxAND_REVERSE)); - PyDict_SetItemString(d,"wxCOPY", PyInt_FromLong((long) wxCOPY)); - PyDict_SetItemString(d,"wxAND", PyInt_FromLong((long) wxAND)); - PyDict_SetItemString(d,"wxAND_INVERT", PyInt_FromLong((long) wxAND_INVERT)); - PyDict_SetItemString(d,"wxNO_OP", PyInt_FromLong((long) wxNO_OP)); - PyDict_SetItemString(d,"wxNOR", PyInt_FromLong((long) wxNOR)); - PyDict_SetItemString(d,"wxEQUIV", PyInt_FromLong((long) wxEQUIV)); - PyDict_SetItemString(d,"wxSRC_INVERT", PyInt_FromLong((long) wxSRC_INVERT)); - PyDict_SetItemString(d,"wxOR_INVERT", PyInt_FromLong((long) wxOR_INVERT)); - PyDict_SetItemString(d,"wxNAND", PyInt_FromLong((long) wxNAND)); - PyDict_SetItemString(d,"wxOR", PyInt_FromLong((long) wxOR)); - PyDict_SetItemString(d,"wxSET", PyInt_FromLong((long) wxSET)); - PyDict_SetItemString(d,"wxSRC_OR", PyInt_FromLong((long) wxSRC_OR)); - PyDict_SetItemString(d,"wxSRC_AND", PyInt_FromLong((long) wxSRC_AND)); - PyDict_SetItemString(d,"WXK_BACK", PyInt_FromLong((long) WXK_BACK)); - PyDict_SetItemString(d,"WXK_TAB", PyInt_FromLong((long) WXK_TAB)); - PyDict_SetItemString(d,"WXK_RETURN", PyInt_FromLong((long) WXK_RETURN)); - PyDict_SetItemString(d,"WXK_ESCAPE", PyInt_FromLong((long) WXK_ESCAPE)); - PyDict_SetItemString(d,"WXK_SPACE", PyInt_FromLong((long) WXK_SPACE)); - PyDict_SetItemString(d,"WXK_DELETE", PyInt_FromLong((long) WXK_DELETE)); - PyDict_SetItemString(d,"WXK_START", PyInt_FromLong((long) WXK_START)); - PyDict_SetItemString(d,"WXK_LBUTTON", PyInt_FromLong((long) WXK_LBUTTON)); - PyDict_SetItemString(d,"WXK_RBUTTON", PyInt_FromLong((long) WXK_RBUTTON)); - PyDict_SetItemString(d,"WXK_CANCEL", PyInt_FromLong((long) WXK_CANCEL)); - PyDict_SetItemString(d,"WXK_MBUTTON", PyInt_FromLong((long) WXK_MBUTTON)); - PyDict_SetItemString(d,"WXK_CLEAR", PyInt_FromLong((long) WXK_CLEAR)); - PyDict_SetItemString(d,"WXK_SHIFT", PyInt_FromLong((long) WXK_SHIFT)); - PyDict_SetItemString(d,"WXK_CONTROL", PyInt_FromLong((long) WXK_CONTROL)); - PyDict_SetItemString(d,"WXK_MENU", PyInt_FromLong((long) WXK_MENU)); - PyDict_SetItemString(d,"WXK_PAUSE", PyInt_FromLong((long) WXK_PAUSE)); - PyDict_SetItemString(d,"WXK_CAPITAL", PyInt_FromLong((long) WXK_CAPITAL)); - PyDict_SetItemString(d,"WXK_PRIOR", PyInt_FromLong((long) WXK_PRIOR)); - PyDict_SetItemString(d,"WXK_NEXT", PyInt_FromLong((long) WXK_NEXT)); - PyDict_SetItemString(d,"WXK_END", PyInt_FromLong((long) WXK_END)); - PyDict_SetItemString(d,"WXK_HOME", PyInt_FromLong((long) WXK_HOME)); - PyDict_SetItemString(d,"WXK_LEFT", PyInt_FromLong((long) WXK_LEFT)); - PyDict_SetItemString(d,"WXK_UP", PyInt_FromLong((long) WXK_UP)); - PyDict_SetItemString(d,"WXK_RIGHT", PyInt_FromLong((long) WXK_RIGHT)); - PyDict_SetItemString(d,"WXK_DOWN", PyInt_FromLong((long) WXK_DOWN)); - PyDict_SetItemString(d,"WXK_SELECT", PyInt_FromLong((long) WXK_SELECT)); - PyDict_SetItemString(d,"WXK_PRINT", PyInt_FromLong((long) WXK_PRINT)); - PyDict_SetItemString(d,"WXK_EXECUTE", PyInt_FromLong((long) WXK_EXECUTE)); - PyDict_SetItemString(d,"WXK_SNAPSHOT", PyInt_FromLong((long) WXK_SNAPSHOT)); - PyDict_SetItemString(d,"WXK_INSERT", PyInt_FromLong((long) WXK_INSERT)); - PyDict_SetItemString(d,"WXK_HELP", PyInt_FromLong((long) WXK_HELP)); - PyDict_SetItemString(d,"WXK_NUMPAD0", PyInt_FromLong((long) WXK_NUMPAD0)); - PyDict_SetItemString(d,"WXK_NUMPAD1", PyInt_FromLong((long) WXK_NUMPAD1)); - PyDict_SetItemString(d,"WXK_NUMPAD2", PyInt_FromLong((long) WXK_NUMPAD2)); - PyDict_SetItemString(d,"WXK_NUMPAD3", PyInt_FromLong((long) WXK_NUMPAD3)); - PyDict_SetItemString(d,"WXK_NUMPAD4", PyInt_FromLong((long) WXK_NUMPAD4)); - PyDict_SetItemString(d,"WXK_NUMPAD5", PyInt_FromLong((long) WXK_NUMPAD5)); - PyDict_SetItemString(d,"WXK_NUMPAD6", PyInt_FromLong((long) WXK_NUMPAD6)); - PyDict_SetItemString(d,"WXK_NUMPAD7", PyInt_FromLong((long) WXK_NUMPAD7)); - PyDict_SetItemString(d,"WXK_NUMPAD8", PyInt_FromLong((long) WXK_NUMPAD8)); - PyDict_SetItemString(d,"WXK_NUMPAD9", PyInt_FromLong((long) WXK_NUMPAD9)); - PyDict_SetItemString(d,"WXK_MULTIPLY", PyInt_FromLong((long) WXK_MULTIPLY)); - PyDict_SetItemString(d,"WXK_ADD", PyInt_FromLong((long) WXK_ADD)); - PyDict_SetItemString(d,"WXK_SEPARATOR", PyInt_FromLong((long) WXK_SEPARATOR)); - PyDict_SetItemString(d,"WXK_SUBTRACT", PyInt_FromLong((long) WXK_SUBTRACT)); - PyDict_SetItemString(d,"WXK_DECIMAL", PyInt_FromLong((long) WXK_DECIMAL)); - PyDict_SetItemString(d,"WXK_DIVIDE", PyInt_FromLong((long) WXK_DIVIDE)); - PyDict_SetItemString(d,"WXK_F1", PyInt_FromLong((long) WXK_F1)); - PyDict_SetItemString(d,"WXK_F2", PyInt_FromLong((long) WXK_F2)); - PyDict_SetItemString(d,"WXK_F3", PyInt_FromLong((long) WXK_F3)); - PyDict_SetItemString(d,"WXK_F4", PyInt_FromLong((long) WXK_F4)); - PyDict_SetItemString(d,"WXK_F5", PyInt_FromLong((long) WXK_F5)); - PyDict_SetItemString(d,"WXK_F6", PyInt_FromLong((long) WXK_F6)); - PyDict_SetItemString(d,"WXK_F7", PyInt_FromLong((long) WXK_F7)); - PyDict_SetItemString(d,"WXK_F8", PyInt_FromLong((long) WXK_F8)); - PyDict_SetItemString(d,"WXK_F9", PyInt_FromLong((long) WXK_F9)); - PyDict_SetItemString(d,"WXK_F10", PyInt_FromLong((long) WXK_F10)); - PyDict_SetItemString(d,"WXK_F11", PyInt_FromLong((long) WXK_F11)); - PyDict_SetItemString(d,"WXK_F12", PyInt_FromLong((long) WXK_F12)); - PyDict_SetItemString(d,"WXK_F13", PyInt_FromLong((long) WXK_F13)); - PyDict_SetItemString(d,"WXK_F14", PyInt_FromLong((long) WXK_F14)); - PyDict_SetItemString(d,"WXK_F15", PyInt_FromLong((long) WXK_F15)); - PyDict_SetItemString(d,"WXK_F16", PyInt_FromLong((long) WXK_F16)); - PyDict_SetItemString(d,"WXK_F17", PyInt_FromLong((long) WXK_F17)); - PyDict_SetItemString(d,"WXK_F18", PyInt_FromLong((long) WXK_F18)); - PyDict_SetItemString(d,"WXK_F19", PyInt_FromLong((long) WXK_F19)); - PyDict_SetItemString(d,"WXK_F20", PyInt_FromLong((long) WXK_F20)); - PyDict_SetItemString(d,"WXK_F21", PyInt_FromLong((long) WXK_F21)); - PyDict_SetItemString(d,"WXK_F22", PyInt_FromLong((long) WXK_F22)); - PyDict_SetItemString(d,"WXK_F23", PyInt_FromLong((long) WXK_F23)); - PyDict_SetItemString(d,"WXK_F24", PyInt_FromLong((long) WXK_F24)); - PyDict_SetItemString(d,"WXK_NUMLOCK", PyInt_FromLong((long) WXK_NUMLOCK)); - PyDict_SetItemString(d,"WXK_SCROLL", PyInt_FromLong((long) WXK_SCROLL)); - PyDict_SetItemString(d,"WXK_PAGEUP", PyInt_FromLong((long) WXK_PAGEUP)); - PyDict_SetItemString(d,"WXK_PAGEDOWN", PyInt_FromLong((long) WXK_PAGEDOWN)); - PyDict_SetItemString(d,"wxCURSOR_ARROW", PyInt_FromLong((long) wxCURSOR_ARROW)); - PyDict_SetItemString(d,"wxCURSOR_BULLSEYE", PyInt_FromLong((long) wxCURSOR_BULLSEYE)); - PyDict_SetItemString(d,"wxCURSOR_CHAR", PyInt_FromLong((long) wxCURSOR_CHAR)); - PyDict_SetItemString(d,"wxCURSOR_CROSS", PyInt_FromLong((long) wxCURSOR_CROSS)); - PyDict_SetItemString(d,"wxCURSOR_HAND", PyInt_FromLong((long) wxCURSOR_HAND)); - PyDict_SetItemString(d,"wxCURSOR_IBEAM", PyInt_FromLong((long) wxCURSOR_IBEAM)); - PyDict_SetItemString(d,"wxCURSOR_LEFT_BUTTON", PyInt_FromLong((long) wxCURSOR_LEFT_BUTTON)); - PyDict_SetItemString(d,"wxCURSOR_MAGNIFIER", PyInt_FromLong((long) wxCURSOR_MAGNIFIER)); - PyDict_SetItemString(d,"wxCURSOR_MIDDLE_BUTTON", PyInt_FromLong((long) wxCURSOR_MIDDLE_BUTTON)); - PyDict_SetItemString(d,"wxCURSOR_NO_ENTRY", PyInt_FromLong((long) wxCURSOR_NO_ENTRY)); - PyDict_SetItemString(d,"wxCURSOR_PAINT_BRUSH", PyInt_FromLong((long) wxCURSOR_PAINT_BRUSH)); - PyDict_SetItemString(d,"wxCURSOR_PENCIL", PyInt_FromLong((long) wxCURSOR_PENCIL)); - PyDict_SetItemString(d,"wxCURSOR_POINT_LEFT", PyInt_FromLong((long) wxCURSOR_POINT_LEFT)); - PyDict_SetItemString(d,"wxCURSOR_POINT_RIGHT", PyInt_FromLong((long) wxCURSOR_POINT_RIGHT)); - PyDict_SetItemString(d,"wxCURSOR_QUESTION_ARROW", PyInt_FromLong((long) wxCURSOR_QUESTION_ARROW)); - PyDict_SetItemString(d,"wxCURSOR_RIGHT_BUTTON", PyInt_FromLong((long) wxCURSOR_RIGHT_BUTTON)); - PyDict_SetItemString(d,"wxCURSOR_SIZENESW", PyInt_FromLong((long) wxCURSOR_SIZENESW)); - PyDict_SetItemString(d,"wxCURSOR_SIZENS", PyInt_FromLong((long) wxCURSOR_SIZENS)); - PyDict_SetItemString(d,"wxCURSOR_SIZENWSE", PyInt_FromLong((long) wxCURSOR_SIZENWSE)); - PyDict_SetItemString(d,"wxCURSOR_SIZEWE", PyInt_FromLong((long) wxCURSOR_SIZEWE)); - PyDict_SetItemString(d,"wxCURSOR_SIZING", PyInt_FromLong((long) wxCURSOR_SIZING)); - PyDict_SetItemString(d,"wxCURSOR_SPRAYCAN", PyInt_FromLong((long) wxCURSOR_SPRAYCAN)); - PyDict_SetItemString(d,"wxCURSOR_WAIT", PyInt_FromLong((long) wxCURSOR_WAIT)); - PyDict_SetItemString(d,"wxCURSOR_WATCH", PyInt_FromLong((long) wxCURSOR_WATCH)); - PyDict_SetItemString(d,"wxCURSOR_BLANK", PyInt_FromLong((long) wxCURSOR_BLANK)); - PyDict_SetItemString(d,"FALSE", PyInt_FromLong((long) 0)); - PyDict_SetItemString(d,"false", PyInt_FromLong((long) 0)); - PyDict_SetItemString(d,"TRUE", PyInt_FromLong((long) 1)); - PyDict_SetItemString(d,"true", PyInt_FromLong((long) 1)); - PyDict_SetItemString(d,"wxEVT_NULL", PyInt_FromLong((long) wxEVT_NULL)); - PyDict_SetItemString(d,"wxEVT_FIRST", PyInt_FromLong((long) wxEVT_FIRST)); - PyDict_SetItemString(d,"wxEVT_COMMAND_BUTTON_CLICKED", PyInt_FromLong((long) wxEVT_COMMAND_BUTTON_CLICKED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_CHECKBOX_CLICKED", PyInt_FromLong((long) wxEVT_COMMAND_CHECKBOX_CLICKED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_CHOICE_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_CHOICE_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LISTBOX_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_LISTBOX_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LISTBOX_DOUBLECLICKED", PyInt_FromLong((long) wxEVT_COMMAND_LISTBOX_DOUBLECLICKED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_CHECKLISTBOX_TOGGLED", PyInt_FromLong((long) wxEVT_COMMAND_CHECKLISTBOX_TOGGLED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TEXT_UPDATED", PyInt_FromLong((long) wxEVT_COMMAND_TEXT_UPDATED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TEXT_ENTER", PyInt_FromLong((long) wxEVT_COMMAND_TEXT_ENTER)); - PyDict_SetItemString(d,"wxEVT_COMMAND_MENU_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_MENU_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_SLIDER_UPDATED", PyInt_FromLong((long) wxEVT_COMMAND_SLIDER_UPDATED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_RADIOBOX_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_RADIOBOX_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_RADIOBUTTON_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_RADIOBUTTON_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_SCROLLBAR_UPDATED", PyInt_FromLong((long) wxEVT_COMMAND_SCROLLBAR_UPDATED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_VLBOX_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_VLBOX_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_COMBOBOX_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_COMBOBOX_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TOOL_CLICKED", PyInt_FromLong((long) wxEVT_COMMAND_TOOL_CLICKED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TOOL_RCLICKED", PyInt_FromLong((long) wxEVT_COMMAND_TOOL_RCLICKED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TOOL_ENTER", PyInt_FromLong((long) wxEVT_COMMAND_TOOL_ENTER)); - PyDict_SetItemString(d,"wxEVT_SET_FOCUS", PyInt_FromLong((long) wxEVT_SET_FOCUS)); - PyDict_SetItemString(d,"wxEVT_KILL_FOCUS", PyInt_FromLong((long) wxEVT_KILL_FOCUS)); - PyDict_SetItemString(d,"wxEVT_LEFT_DOWN", PyInt_FromLong((long) wxEVT_LEFT_DOWN)); - PyDict_SetItemString(d,"wxEVT_LEFT_UP", PyInt_FromLong((long) wxEVT_LEFT_UP)); - PyDict_SetItemString(d,"wxEVT_MIDDLE_DOWN", PyInt_FromLong((long) wxEVT_MIDDLE_DOWN)); - PyDict_SetItemString(d,"wxEVT_MIDDLE_UP", PyInt_FromLong((long) wxEVT_MIDDLE_UP)); - PyDict_SetItemString(d,"wxEVT_RIGHT_DOWN", PyInt_FromLong((long) wxEVT_RIGHT_DOWN)); - PyDict_SetItemString(d,"wxEVT_RIGHT_UP", PyInt_FromLong((long) wxEVT_RIGHT_UP)); - PyDict_SetItemString(d,"wxEVT_MOTION", PyInt_FromLong((long) wxEVT_MOTION)); - PyDict_SetItemString(d,"wxEVT_ENTER_WINDOW", PyInt_FromLong((long) wxEVT_ENTER_WINDOW)); - PyDict_SetItemString(d,"wxEVT_LEAVE_WINDOW", PyInt_FromLong((long) wxEVT_LEAVE_WINDOW)); - PyDict_SetItemString(d,"wxEVT_LEFT_DCLICK", PyInt_FromLong((long) wxEVT_LEFT_DCLICK)); - PyDict_SetItemString(d,"wxEVT_MIDDLE_DCLICK", PyInt_FromLong((long) wxEVT_MIDDLE_DCLICK)); - PyDict_SetItemString(d,"wxEVT_RIGHT_DCLICK", PyInt_FromLong((long) wxEVT_RIGHT_DCLICK)); - PyDict_SetItemString(d,"wxEVT_NC_LEFT_DOWN", PyInt_FromLong((long) wxEVT_NC_LEFT_DOWN)); - PyDict_SetItemString(d,"wxEVT_NC_LEFT_UP", PyInt_FromLong((long) wxEVT_NC_LEFT_UP)); - PyDict_SetItemString(d,"wxEVT_NC_MIDDLE_DOWN", PyInt_FromLong((long) wxEVT_NC_MIDDLE_DOWN)); - PyDict_SetItemString(d,"wxEVT_NC_MIDDLE_UP", PyInt_FromLong((long) wxEVT_NC_MIDDLE_UP)); - PyDict_SetItemString(d,"wxEVT_NC_RIGHT_DOWN", PyInt_FromLong((long) wxEVT_NC_RIGHT_DOWN)); - PyDict_SetItemString(d,"wxEVT_NC_RIGHT_UP", PyInt_FromLong((long) wxEVT_NC_RIGHT_UP)); - PyDict_SetItemString(d,"wxEVT_NC_MOTION", PyInt_FromLong((long) wxEVT_NC_MOTION)); - PyDict_SetItemString(d,"wxEVT_NC_ENTER_WINDOW", PyInt_FromLong((long) wxEVT_NC_ENTER_WINDOW)); - PyDict_SetItemString(d,"wxEVT_NC_LEAVE_WINDOW", PyInt_FromLong((long) wxEVT_NC_LEAVE_WINDOW)); - PyDict_SetItemString(d,"wxEVT_NC_LEFT_DCLICK", PyInt_FromLong((long) wxEVT_NC_LEFT_DCLICK)); - PyDict_SetItemString(d,"wxEVT_NC_MIDDLE_DCLICK", PyInt_FromLong((long) wxEVT_NC_MIDDLE_DCLICK)); - PyDict_SetItemString(d,"wxEVT_NC_RIGHT_DCLICK", PyInt_FromLong((long) wxEVT_NC_RIGHT_DCLICK)); - PyDict_SetItemString(d,"wxEVT_CHAR", PyInt_FromLong((long) wxEVT_CHAR)); - PyDict_SetItemString(d,"wxEVT_SCROLL_TOP", PyInt_FromLong((long) wxEVT_SCROLL_TOP)); - PyDict_SetItemString(d,"wxEVT_SCROLL_BOTTOM", PyInt_FromLong((long) wxEVT_SCROLL_BOTTOM)); - PyDict_SetItemString(d,"wxEVT_SCROLL_LINEUP", PyInt_FromLong((long) wxEVT_SCROLL_LINEUP)); - PyDict_SetItemString(d,"wxEVT_SCROLL_LINEDOWN", PyInt_FromLong((long) wxEVT_SCROLL_LINEDOWN)); - PyDict_SetItemString(d,"wxEVT_SCROLL_PAGEUP", PyInt_FromLong((long) wxEVT_SCROLL_PAGEUP)); - PyDict_SetItemString(d,"wxEVT_SCROLL_PAGEDOWN", PyInt_FromLong((long) wxEVT_SCROLL_PAGEDOWN)); - PyDict_SetItemString(d,"wxEVT_SCROLL_THUMBTRACK", PyInt_FromLong((long) wxEVT_SCROLL_THUMBTRACK)); - PyDict_SetItemString(d,"wxEVT_SIZE", PyInt_FromLong((long) wxEVT_SIZE)); - PyDict_SetItemString(d,"wxEVT_MOVE", PyInt_FromLong((long) wxEVT_MOVE)); - PyDict_SetItemString(d,"wxEVT_CLOSE_WINDOW", PyInt_FromLong((long) wxEVT_CLOSE_WINDOW)); - PyDict_SetItemString(d,"wxEVT_END_SESSION", PyInt_FromLong((long) wxEVT_END_SESSION)); - PyDict_SetItemString(d,"wxEVT_QUERY_END_SESSION", PyInt_FromLong((long) wxEVT_QUERY_END_SESSION)); - PyDict_SetItemString(d,"wxEVT_ACTIVATE_APP", PyInt_FromLong((long) wxEVT_ACTIVATE_APP)); - PyDict_SetItemString(d,"wxEVT_POWER", PyInt_FromLong((long) wxEVT_POWER)); - PyDict_SetItemString(d,"wxEVT_CHAR_HOOK", PyInt_FromLong((long) wxEVT_CHAR_HOOK)); - PyDict_SetItemString(d,"wxEVT_KEY_UP", PyInt_FromLong((long) wxEVT_KEY_UP)); - PyDict_SetItemString(d,"wxEVT_ACTIVATE", PyInt_FromLong((long) wxEVT_ACTIVATE)); - PyDict_SetItemString(d,"wxEVT_CREATE", PyInt_FromLong((long) wxEVT_CREATE)); - PyDict_SetItemString(d,"wxEVT_DESTROY", PyInt_FromLong((long) wxEVT_DESTROY)); - PyDict_SetItemString(d,"wxEVT_SHOW", PyInt_FromLong((long) wxEVT_SHOW)); - PyDict_SetItemString(d,"wxEVT_ICONIZE", PyInt_FromLong((long) wxEVT_ICONIZE)); - PyDict_SetItemString(d,"wxEVT_MAXIMIZE", PyInt_FromLong((long) wxEVT_MAXIMIZE)); - PyDict_SetItemString(d,"wxEVT_MOUSE_CAPTURE_CHANGED", PyInt_FromLong((long) wxEVT_MOUSE_CAPTURE_CHANGED)); - PyDict_SetItemString(d,"wxEVT_PAINT", PyInt_FromLong((long) wxEVT_PAINT)); - PyDict_SetItemString(d,"wxEVT_ERASE_BACKGROUND", PyInt_FromLong((long) wxEVT_ERASE_BACKGROUND)); - PyDict_SetItemString(d,"wxEVT_NC_PAINT", PyInt_FromLong((long) wxEVT_NC_PAINT)); - PyDict_SetItemString(d,"wxEVT_PAINT_ICON", PyInt_FromLong((long) wxEVT_PAINT_ICON)); - PyDict_SetItemString(d,"wxEVT_MENU_CHAR", PyInt_FromLong((long) wxEVT_MENU_CHAR)); - PyDict_SetItemString(d,"wxEVT_MENU_INIT", PyInt_FromLong((long) wxEVT_MENU_INIT)); - PyDict_SetItemString(d,"wxEVT_MENU_HIGHLIGHT", PyInt_FromLong((long) wxEVT_MENU_HIGHLIGHT)); - PyDict_SetItemString(d,"wxEVT_POPUP_MENU_INIT", PyInt_FromLong((long) wxEVT_POPUP_MENU_INIT)); - PyDict_SetItemString(d,"wxEVT_CONTEXT_MENU", PyInt_FromLong((long) wxEVT_CONTEXT_MENU)); - PyDict_SetItemString(d,"wxEVT_SYS_COLOUR_CHANGED", PyInt_FromLong((long) wxEVT_SYS_COLOUR_CHANGED)); - PyDict_SetItemString(d,"wxEVT_SETTING_CHANGED", PyInt_FromLong((long) wxEVT_SETTING_CHANGED)); - PyDict_SetItemString(d,"wxEVT_QUERY_NEW_PALETTE", PyInt_FromLong((long) wxEVT_QUERY_NEW_PALETTE)); - PyDict_SetItemString(d,"wxEVT_PALETTE_CHANGED", PyInt_FromLong((long) wxEVT_PALETTE_CHANGED)); - PyDict_SetItemString(d,"wxEVT_JOY_BUTTON_DOWN", PyInt_FromLong((long) wxEVT_JOY_BUTTON_DOWN)); - PyDict_SetItemString(d,"wxEVT_JOY_BUTTON_UP", PyInt_FromLong((long) wxEVT_JOY_BUTTON_UP)); - PyDict_SetItemString(d,"wxEVT_JOY_MOVE", PyInt_FromLong((long) wxEVT_JOY_MOVE)); - PyDict_SetItemString(d,"wxEVT_JOY_ZMOVE", PyInt_FromLong((long) wxEVT_JOY_ZMOVE)); - PyDict_SetItemString(d,"wxEVT_DROP_FILES", PyInt_FromLong((long) wxEVT_DROP_FILES)); - PyDict_SetItemString(d,"wxEVT_DRAW_ITEM", PyInt_FromLong((long) wxEVT_DRAW_ITEM)); - PyDict_SetItemString(d,"wxEVT_MEASURE_ITEM", PyInt_FromLong((long) wxEVT_MEASURE_ITEM)); - PyDict_SetItemString(d,"wxEVT_COMPARE_ITEM", PyInt_FromLong((long) wxEVT_COMPARE_ITEM)); - PyDict_SetItemString(d,"wxEVT_INIT_DIALOG", PyInt_FromLong((long) wxEVT_INIT_DIALOG)); - PyDict_SetItemString(d,"wxEVT_IDLE", PyInt_FromLong((long) wxEVT_IDLE)); - PyDict_SetItemString(d,"wxEVT_UPDATE_UI", PyInt_FromLong((long) wxEVT_UPDATE_UI)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LEFT_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_LEFT_CLICK)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LEFT_DCLICK", PyInt_FromLong((long) wxEVT_COMMAND_LEFT_DCLICK)); - PyDict_SetItemString(d,"wxEVT_COMMAND_RIGHT_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_RIGHT_CLICK)); - PyDict_SetItemString(d,"wxEVT_COMMAND_RIGHT_DCLICK", PyInt_FromLong((long) wxEVT_COMMAND_RIGHT_DCLICK)); - PyDict_SetItemString(d,"wxEVT_COMMAND_SET_FOCUS", PyInt_FromLong((long) wxEVT_COMMAND_SET_FOCUS)); - PyDict_SetItemString(d,"wxEVT_COMMAND_KILL_FOCUS", PyInt_FromLong((long) wxEVT_COMMAND_KILL_FOCUS)); - PyDict_SetItemString(d,"wxEVT_COMMAND_ENTER", PyInt_FromLong((long) wxEVT_COMMAND_ENTER)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_BEGIN_DRAG", PyInt_FromLong((long) wxEVT_COMMAND_TREE_BEGIN_DRAG)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_BEGIN_RDRAG", PyInt_FromLong((long) wxEVT_COMMAND_TREE_BEGIN_RDRAG)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT", PyInt_FromLong((long) wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_END_LABEL_EDIT", PyInt_FromLong((long) wxEVT_COMMAND_TREE_END_LABEL_EDIT)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_DELETE_ITEM", PyInt_FromLong((long) wxEVT_COMMAND_TREE_DELETE_ITEM)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_GET_INFO", PyInt_FromLong((long) wxEVT_COMMAND_TREE_GET_INFO)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_SET_INFO", PyInt_FromLong((long) wxEVT_COMMAND_TREE_SET_INFO)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_EXPANDED", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_EXPANDED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_EXPANDING", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_EXPANDING)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_SEL_CHANGED", PyInt_FromLong((long) wxEVT_COMMAND_TREE_SEL_CHANGED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_SEL_CHANGING", PyInt_FromLong((long) wxEVT_COMMAND_TREE_SEL_CHANGING)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_KEY_DOWN", PyInt_FromLong((long) wxEVT_COMMAND_TREE_KEY_DOWN)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_BEGIN_DRAG", PyInt_FromLong((long) wxEVT_COMMAND_LIST_BEGIN_DRAG)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_BEGIN_RDRAG", PyInt_FromLong((long) wxEVT_COMMAND_LIST_BEGIN_RDRAG)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT", PyInt_FromLong((long) wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_END_LABEL_EDIT", PyInt_FromLong((long) wxEVT_COMMAND_LIST_END_LABEL_EDIT)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_DELETE_ITEM", PyInt_FromLong((long) wxEVT_COMMAND_LIST_DELETE_ITEM)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS", PyInt_FromLong((long) wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_GET_INFO", PyInt_FromLong((long) wxEVT_COMMAND_LIST_GET_INFO)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_SET_INFO", PyInt_FromLong((long) wxEVT_COMMAND_LIST_SET_INFO)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_ITEM_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_LIST_ITEM_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_ITEM_DESELECTED", PyInt_FromLong((long) wxEVT_COMMAND_LIST_ITEM_DESELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_KEY_DOWN", PyInt_FromLong((long) wxEVT_COMMAND_LIST_KEY_DOWN)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_INSERT_ITEM", PyInt_FromLong((long) wxEVT_COMMAND_LIST_INSERT_ITEM)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_COL_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_LIST_COL_CLICK)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TAB_SEL_CHANGED", PyInt_FromLong((long) wxEVT_COMMAND_TAB_SEL_CHANGED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TAB_SEL_CHANGING", PyInt_FromLong((long) wxEVT_COMMAND_TAB_SEL_CHANGING)); - PyDict_SetItemString(d,"wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED", PyInt_FromLong((long) wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING", PyInt_FromLong((long) wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)); - PyDict_SetItemString(d,"__version__", PyString_FromString("0.3.1")); - PyDict_SetItemString(d,"cvar", SWIG_globals); - SWIG_addvarlink(SWIG_globals,"wxPyDefaultPosition",_wrap_wxPyDefaultPosition_get, _wrap_wxPyDefaultPosition_set); - SWIG_addvarlink(SWIG_globals,"wxPyDefaultSize",_wrap_wxPyDefaultSize_get, _wrap_wxPyDefaultSize_set); - - // We don't want to run the wxEntry or OnInit yet, so we just do the - // beginings of what it would have done... See __wxStart() for the - // rest. -#ifdef __WXMSW__ - wxApp::Initialize((WXHINSTANCE)wxhInstance); -#endif - - -// wxPyWindows = new wxHashTable(wxKEY_INTEGER, 100); - - // Since these modules are all linked together, initialize them now - // because python won't be able to find their shared library files, - // (since there isn't any.) - initwindowsc(); - initwindows2c(); - initeventsc(); - initmiscc(); - initgdic(); - initmdic(); - initcontrolsc(); - initcontrols2c(); - initcmndlgsc(); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_wxAcceleratorTable","_class_wxAcceleratorTable",0); - SWIG_RegisterMapping("_wxEvent","_class_wxEvent",0); - SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0); - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0); - SWIG_RegisterMapping("_wxFontData","_class_wxFontData",0); - SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxPyApp",SwigwxPyAppTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxPyApp",SwigwxPyAppTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxEvtHandler",0); - SWIG_RegisterMapping("_wxPaintEvent","_class_wxPaintEvent",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); - SWIG_RegisterMapping("_class_wxTreeCtrl","_wxTreeCtrl",0); - SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxGrid","_class_wxGrid",0); - SWIG_RegisterMapping("_wxPageSetupData","_class_wxPageSetupData",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); - SWIG_RegisterMapping("_class_wxColourData","_wxColourData",0); - SWIG_RegisterMapping("_wxPen","_class_wxPen",0); - SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_wxStaticBox","_class_wxStaticBox",0); - SWIG_RegisterMapping("_wxChoice","_class_wxChoice",0); - SWIG_RegisterMapping("_wxSlider","_class_wxSlider",0); - SWIG_RegisterMapping("_wxNotebookEvent","_class_wxNotebookEvent",0); - SWIG_RegisterMapping("_long","_wxDash",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_wxDropFilesEvent","_class_wxDropFilesEvent",0); - SWIG_RegisterMapping("_wxBitmapButton","_class_wxBitmapButton",0); - SWIG_RegisterMapping("_class_wxAcceleratorTable","_wxAcceleratorTable",0); - SWIG_RegisterMapping("_class_wxGauge","_wxGauge",0); - SWIG_RegisterMapping("_wxDC","_class_wxDC",0); - SWIG_RegisterMapping("_wxListEvent","_class_wxListEvent",0); - SWIG_RegisterMapping("_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_wxPrinterDC","_class_wxPrinterDC",0); - SWIG_RegisterMapping("_class_wxMenuItem","_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxPaintEvent","_wxPaintEvent",0); - SWIG_RegisterMapping("_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxPanel","_class_wxPanel",0); - SWIG_RegisterMapping("_wxInitDialogEvent","_class_wxInitDialogEvent",0); - SWIG_RegisterMapping("_wxCheckBox","_class_wxCheckBox",0); - SWIG_RegisterMapping("_wxTextCtrl","_class_wxTextCtrl",0); - SWIG_RegisterMapping("_class_wxMask","_wxMask",0); - SWIG_RegisterMapping("_class_wxKeyEvent","_wxKeyEvent",0); - SWIG_RegisterMapping("_class_wxGrid","_wxGrid",0); - SWIG_RegisterMapping("_class_wxPageSetupData","_wxPageSetupData",0); - SWIG_RegisterMapping("_wxColour","_class_wxColour",0); - SWIG_RegisterMapping("_class_wxDialog","_wxDialog",0); - SWIG_RegisterMapping("_wxPageSetupDialog","_class_wxPageSetupDialog",0); - SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); - SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); - SWIG_RegisterMapping("_wxMiniFrame","_class_wxMiniFrame",0); - SWIG_RegisterMapping("_class_wxNotebookEvent","_wxNotebookEvent",0); - SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxEvent","_wxEvent",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxCommandEvent","_class_wxCommandEvent",0); - SWIG_RegisterMapping("_wxSizeEvent","_class_wxSizeEvent",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_class_wxButton","_wxButton",0); - SWIG_RegisterMapping("_wxRadioBox","_class_wxRadioBox",0); - SWIG_RegisterMapping("_class_wxFontData","_wxFontData",0); - SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); - SWIG_RegisterMapping("_wxPrintDialog","_class_wxPrintDialog",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_wxScrollBar","_class_wxScrollBar",0); - SWIG_RegisterMapping("_wxSpinButton","_class_wxSpinButton",0); - SWIG_RegisterMapping("_wxColourDialog","_class_wxColourDialog",0); - SWIG_RegisterMapping("_wxPrintData","_class_wxPrintData",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxMessageDialog","_class_wxMessageDialog",0); - SWIG_RegisterMapping("_wxTextEntryDialog","_class_wxTextEntryDialog",0); - SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0); - SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0); - SWIG_RegisterMapping("_wxMDIChildFrame","_class_wxMDIChildFrame",0); - SWIG_RegisterMapping("_wxListItem","_class_wxListItem",0); - SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxDropFilesEvent","_wxDropFilesEvent",0); - SWIG_RegisterMapping("_wxStaticText","_class_wxStaticText",0); - SWIG_RegisterMapping("_wxFont","_class_wxFont",0); - SWIG_RegisterMapping("_wxCloseEvent","_class_wxCloseEvent",0); - SWIG_RegisterMapping("_wxNotebook","_class_wxNotebook",0); - SWIG_RegisterMapping("_unsigned_long","_wxDash",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxDC","_wxDC",0); - SWIG_RegisterMapping("_wxPyApp","_class_wxPyApp",0); - SWIG_RegisterMapping("_wxMDIParentFrame","_class_wxMDIParentFrame",0); - SWIG_RegisterMapping("_class_wxTreeEvent","_wxTreeEvent",0); - SWIG_RegisterMapping("_class_wxDirDialog","_wxDirDialog",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_wxFocusEvent","_class_wxFocusEvent",0); - SWIG_RegisterMapping("_wxMaximizeEvent","_class_wxMaximizeEvent",0); - SWIG_RegisterMapping("_class_wxSpinButton","_wxSpinButton",0); - SWIG_RegisterMapping("_wxAcceleratorEntry","_class_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_class_wxPanel","_wxPanel",0); - SWIG_RegisterMapping("_class_wxCheckBox","_wxCheckBox",0); - SWIG_RegisterMapping("_wxComboBox","_class_wxComboBox",0); - SWIG_RegisterMapping("_wxRadioButton","_class_wxRadioButton",0); - SWIG_RegisterMapping("_class_wxMessageDialog","_wxMessageDialog",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_class_wxTextCtrl","_wxTextCtrl",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxMetaFileDC","_class_wxMetaFileDC",0); - SWIG_RegisterMapping("_wxMenu","_class_wxMenu",0); - SWIG_RegisterMapping("_class_wxMoveEvent","_wxMoveEvent",0); - SWIG_RegisterMapping("_wxListBox","_class_wxListBox",0); - SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxMDIChildFrame","_wxMDIChildFrame",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_wxFileDialog","_class_wxFileDialog",0); - SWIG_RegisterMapping("_class_wxMDIClientWindow","_wxMDIClientWindow",0); - SWIG_RegisterMapping("_class_wxBrush","_wxBrush",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxWindow","_wxWindow",0); - SWIG_RegisterMapping("_class_wxStaticText","_wxStaticText",0); - SWIG_RegisterMapping("_class_wxFont","_wxFont",0); - SWIG_RegisterMapping("_class_wxCloseEvent","_wxCloseEvent",0); - SWIG_RegisterMapping("_wxTreeItem","_class_wxTreeItem",0); - SWIG_RegisterMapping("_class_wxMenuEvent","_wxMenuEvent",0); - SWIG_RegisterMapping("_wxClientDC","_class_wxClientDC",0); - SWIG_RegisterMapping("_wxMouseEvent","_class_wxMouseEvent",0); - SWIG_RegisterMapping("_wxListCtrl","_class_wxListCtrl",0); - SWIG_RegisterMapping("_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_class_wxRadioBox","_wxRadioBox",0); - SWIG_RegisterMapping("_wxGridCell","_class_wxGridCell",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_wxMemoryDC","_class_wxMemoryDC",0); - SWIG_RegisterMapping("_class_wxPrintDialog","_wxPrintDialog",0); - SWIG_RegisterMapping("_wxPaintDC","_class_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxFocusEvent","_wxFocusEvent",0); - SWIG_RegisterMapping("_class_wxMaximizeEvent","_wxMaximizeEvent",0); - SWIG_RegisterMapping("_class_wxAcceleratorEntry","_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); - SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_class_wxMetaFileDC","_wxMetaFileDC",0); - SWIG_RegisterMapping("_class_wxMenu","_wxMenu",0); - SWIG_RegisterMapping("_wxControl","_class_wxControl",0); - SWIG_RegisterMapping("_class_wxListBox","_wxListBox",0); - SWIG_RegisterMapping("_wxTabCtrl","_class_wxTabCtrl",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); - SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); - SWIG_RegisterMapping("_class_wxListItem","_wxListItem",0); - SWIG_RegisterMapping("_class_wxPen","_wxPen",0); - SWIG_RegisterMapping("_class_wxFileDialog","_wxFileDialog",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_class_wxStaticBox","_wxStaticBox",0); - SWIG_RegisterMapping("_class_wxScrollEvent","_wxScrollEvent",0); - SWIG_RegisterMapping("_wxJoystickEvent","_class_wxJoystickEvent",0); - SWIG_RegisterMapping("_class_wxChoice","_wxChoice",0); - SWIG_RegisterMapping("_class_wxSlider","_wxSlider",0); - SWIG_RegisterMapping("_class_wxBitmapButton","_wxBitmapButton",0); - SWIG_RegisterMapping("_wxTabEvent","_class_wxTabEvent",0); - SWIG_RegisterMapping("_wxFrame","_class_wxFrame",0); - SWIG_RegisterMapping("_class_wxNotebook","_wxNotebook",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_class_wxMouseEvent","_wxMouseEvent",0); - SWIG_RegisterMapping("_class_wxListEvent","_wxListEvent",0); - SWIG_RegisterMapping("_wxButton","_class_wxButton",0); - SWIG_RegisterMapping("_class_wxPyApp","_wxPyApp",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxPrinterDC","_wxPrinterDC",0); - SWIG_RegisterMapping("_class_wxMDIParentFrame","_wxMDIParentFrame",0); - SWIG_RegisterMapping("_class_wxPaintDC","_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_class_wxInitDialogEvent","_wxInitDialogEvent",0); - SWIG_RegisterMapping("_class_wxComboBox","_wxComboBox",0); - SWIG_RegisterMapping("_class_wxRadioButton","_wxRadioButton",0); - SWIG_RegisterMapping("_wxTreeCtrl","_class_wxTreeCtrl",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxIconizeEvent","_class_wxIconizeEvent",0); - SWIG_RegisterMapping("_class_wxControl","_wxControl",0); - SWIG_RegisterMapping("_wxStaticBitmap","_class_wxStaticBitmap",0); - SWIG_RegisterMapping("_class_wxTabCtrl","_wxTabCtrl",0); - SWIG_RegisterMapping("_class_wxIcon","_wxIcon",0); - SWIG_RegisterMapping("_class_wxColour","_wxColour",0); - SWIG_RegisterMapping("_class_wxScreenDC","_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxPageSetupDialog","_wxPageSetupDialog",0); - SWIG_RegisterMapping("_class_wxIdleEvent","_wxIdleEvent",0); - SWIG_RegisterMapping("_wxEraseEvent","_class_wxEraseEvent",0); - SWIG_RegisterMapping("_class_wxMiniFrame","_wxMiniFrame",0); - SWIG_RegisterMapping("_class_wxJoystickEvent","_wxJoystickEvent",0); - SWIG_RegisterMapping("_wxFontDialog","_class_wxFontDialog",0); - SWIG_RegisterMapping("_class_wxShowEvent","_wxShowEvent",0); - SWIG_RegisterMapping("_wxActivateEvent","_class_wxActivateEvent",0); - SWIG_RegisterMapping("_wxGauge","_class_wxGauge",0); - SWIG_RegisterMapping("_class_wxTreeItem","_wxTreeItem",0); - SWIG_RegisterMapping("_class_wxCommandEvent","_wxCommandEvent",0); - SWIG_RegisterMapping("_class_wxClientDC","_wxClientDC",0); - SWIG_RegisterMapping("_class_wxSizeEvent","_wxSizeEvent",0); - SWIG_RegisterMapping("_class_wxListCtrl","_wxListCtrl",0); - SWIG_RegisterMapping("_class_wxGridCell","_wxGridCell",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); - SWIG_RegisterMapping("_class_wxBitmap","_wxBitmap",0); - SWIG_RegisterMapping("_class_wxMemoryDC","_wxMemoryDC",0); - SWIG_RegisterMapping("_wxMenuBar","_class_wxMenuBar",0); - SWIG_RegisterMapping("_wxTreeEvent","_class_wxTreeEvent",0); - SWIG_RegisterMapping("_wxDirDialog","_class_wxDirDialog",0); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxPyApp",SwigwxPyAppTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxPyApp",SwigwxPyAppTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxEvtHandler",0); - SWIG_RegisterMapping("_wxMenuItem","_class_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxScrollBar","_wxScrollBar",0); - SWIG_RegisterMapping("_class_wxColourDialog","_wxColourDialog",0); - SWIG_RegisterMapping("_class_wxPrintData","_wxPrintData",0); - SWIG_RegisterMapping("_wxDash","_unsigned_long",0); - SWIG_RegisterMapping("_wxDash","_long",0); - SWIG_RegisterMapping("_class_wxScrolledWindow","_wxScrolledWindow",0); - SWIG_RegisterMapping("_class_wxTextEntryDialog","_wxTextEntryDialog",0); - SWIG_RegisterMapping("_wxKeyEvent","_class_wxKeyEvent",0); - SWIG_RegisterMapping("_wxMoveEvent","_class_wxMoveEvent",0); - SWIG_RegisterMapping("_wxColourData","_class_wxColourData",0); - SWIG_RegisterMapping("_class_wxEraseEvent","_wxEraseEvent",0); - SWIG_RegisterMapping("_wxMDIClientWindow","_class_wxMDIClientWindow",0); - SWIG_RegisterMapping("_class_wxFontDialog","_wxFontDialog",0); - SWIG_RegisterMapping("_wxWindow","_class_wxWindow",0); - SWIG_RegisterMapping("_class_wxTabEvent","_wxTabEvent",0); - SWIG_RegisterMapping("_class_wxFrame","_wxFrame",0); -} diff --git a/utils/wxPython/src/msw/wxp.py b/utils/wxPython/src/msw/wxp.py deleted file mode 100644 index 9553e79288..0000000000 --- a/utils/wxPython/src/msw/wxp.py +++ /dev/null @@ -1,1397 +0,0 @@ -# This file was created automatically by SWIG. -import wxpc - -from misc import * - -from windows import * - -from gdi import * - -from events import * - -from mdi import * - -from controls import * - -from controls2 import * - -from windows2 import * - -from cmndlgs import * -class wxPyAppPtr(wxEvtHandlerPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetAppName(self): - val = wxpc.wxPyApp_GetAppName(self.this) - return val - def GetAuto3D(self): - val = wxpc.wxPyApp_GetAuto3D(self.this) - return val - def GetClassName(self): - val = wxpc.wxPyApp_GetClassName(self.this) - return val - def GetExitOnFrameDelete(self): - val = wxpc.wxPyApp_GetExitOnFrameDelete(self.this) - return val - def GetPrintMode(self): - val = wxpc.wxPyApp_GetPrintMode(self.this) - return val - def GetTopWindow(self): - val = wxpc.wxPyApp_GetTopWindow(self.this) - val = wxWindowPtr(val) - return val - def GetVendorName(self): - val = wxpc.wxPyApp_GetVendorName(self.this) - return val - def Dispatch(self): - val = wxpc.wxPyApp_Dispatch(self.this) - return val - def ExitMainLoop(self): - val = wxpc.wxPyApp_ExitMainLoop(self.this) - return val - def Initialized(self): - val = wxpc.wxPyApp_Initialized(self.this) - return val - def MainLoop(self): - val = wxpc.wxPyApp_MainLoop(self.this) - return val - def Pending(self): - val = wxpc.wxPyApp_Pending(self.this) - return val - def SetAppName(self,arg0): - val = wxpc.wxPyApp_SetAppName(self.this,arg0) - return val - def SetAuto3D(self,arg0): - val = wxpc.wxPyApp_SetAuto3D(self.this,arg0) - return val - def SetClassName(self,arg0): - val = wxpc.wxPyApp_SetClassName(self.this,arg0) - return val - def SetExitOnFrameDelete(self,arg0): - val = wxpc.wxPyApp_SetExitOnFrameDelete(self.this,arg0) - return val - def SetPrintMode(self,arg0): - val = wxpc.wxPyApp_SetPrintMode(self.this,arg0) - return val - def SetTopWindow(self,arg0): - val = wxpc.wxPyApp_SetTopWindow(self.this,arg0.this) - return val - def SetVendorName(self,arg0): - val = wxpc.wxPyApp_SetVendorName(self.this,arg0) - return val - def AfterMainLoop(self): - val = wxpc.wxPyApp_AfterMainLoop(self.this) - return val - def __repr__(self): - return "" -class wxPyApp(wxPyAppPtr): - def __init__(self) : - self.this = wxpc.new_wxPyApp() - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - -_wxStart = wxpc._wxStart - -_wxSetDictionary = wxpc._wxSetDictionary - - - -#-------------- VARIABLE WRAPPERS ------------------ - -wxMAJOR_VERSION = wxpc.wxMAJOR_VERSION -wxMINOR_VERSION = wxpc.wxMINOR_VERSION -wxRELEASE_NUMBER = wxpc.wxRELEASE_NUMBER -UNKNOWN = wxpc.UNKNOWN -NOT_FOUND = wxpc.NOT_FOUND -wxVSCROLL = wxpc.wxVSCROLL -wxHSCROLL = wxpc.wxHSCROLL -wxCAPTION = wxpc.wxCAPTION -wxDOUBLE_BORDER = wxpc.wxDOUBLE_BORDER -wxSUNKEN_BORDER = wxpc.wxSUNKEN_BORDER -wxRAISED_BORDER = wxpc.wxRAISED_BORDER -wxBORDER = wxpc.wxBORDER -wxSIMPLE_BORDER = wxpc.wxSIMPLE_BORDER -wxSTATIC_BORDER = wxpc.wxSTATIC_BORDER -wxTRANSPARENT_WINDOW = wxpc.wxTRANSPARENT_WINDOW -wxNO_BORDER = wxpc.wxNO_BORDER -wxUSER_COLOURS = wxpc.wxUSER_COLOURS -wxNO_3D = wxpc.wxNO_3D -wxTAB_TRAVERSAL = wxpc.wxTAB_TRAVERSAL -wxHORIZONTAL = wxpc.wxHORIZONTAL -wxVERTICAL = wxpc.wxVERTICAL -wxBOTH = wxpc.wxBOTH -wxCENTER_FRAME = wxpc.wxCENTER_FRAME -wxSTAY_ON_TOP = wxpc.wxSTAY_ON_TOP -wxICONIZE = wxpc.wxICONIZE -wxMINIMIZE = wxpc.wxMINIMIZE -wxMAXIMIZE = wxpc.wxMAXIMIZE -wxTHICK_FRAME = wxpc.wxTHICK_FRAME -wxSYSTEM_MENU = wxpc.wxSYSTEM_MENU -wxMINIMIZE_BOX = wxpc.wxMINIMIZE_BOX -wxMAXIMIZE_BOX = wxpc.wxMAXIMIZE_BOX -wxTINY_CAPTION_HORIZ = wxpc.wxTINY_CAPTION_HORIZ -wxTINY_CAPTION_VERT = wxpc.wxTINY_CAPTION_VERT -wxRESIZE_BOX = wxpc.wxRESIZE_BOX -wxRESIZE_BORDER = wxpc.wxRESIZE_BORDER -wxDIALOG_MODAL = wxpc.wxDIALOG_MODAL -wxDIALOG_MODELESS = wxpc.wxDIALOG_MODELESS -wxDEFAULT_FRAME_STYLE = wxpc.wxDEFAULT_FRAME_STYLE -wxDEFAULT_DIALOG_STYLE = wxpc.wxDEFAULT_DIALOG_STYLE -wxRETAINED = wxpc.wxRETAINED -wxBACKINGSTORE = wxpc.wxBACKINGSTORE -wxTB_3DBUTTONS = wxpc.wxTB_3DBUTTONS -wxTB_HORIZONTAL = wxpc.wxTB_HORIZONTAL -wxTB_VERTICAL = wxpc.wxTB_VERTICAL -wxCOLOURED = wxpc.wxCOLOURED -wxFIXED_LENGTH = wxpc.wxFIXED_LENGTH -wxALIGN_LEFT = wxpc.wxALIGN_LEFT -wxALIGN_CENTER = wxpc.wxALIGN_CENTER -wxALIGN_CENTRE = wxpc.wxALIGN_CENTRE -wxALIGN_RIGHT = wxpc.wxALIGN_RIGHT -wxLB_NEEDED_SB = wxpc.wxLB_NEEDED_SB -wxLB_ALWAYS_SB = wxpc.wxLB_ALWAYS_SB -wxLB_SORT = wxpc.wxLB_SORT -wxLB_SINGLE = wxpc.wxLB_SINGLE -wxLB_MULTIPLE = wxpc.wxLB_MULTIPLE -wxLB_EXTENDED = wxpc.wxLB_EXTENDED -wxLB_OWNERDRAW = wxpc.wxLB_OWNERDRAW -wxLB_HSCROLL = wxpc.wxLB_HSCROLL -wxPROCESS_ENTER = wxpc.wxPROCESS_ENTER -wxPASSWORD = wxpc.wxPASSWORD -wxTE_PROCESS_ENTER = wxpc.wxTE_PROCESS_ENTER -wxTE_PASSWORD = wxpc.wxTE_PASSWORD -wxTE_READONLY = wxpc.wxTE_READONLY -wxTE_MULTILINE = wxpc.wxTE_MULTILINE -wxCB_SIMPLE = wxpc.wxCB_SIMPLE -wxCB_DROPDOWN = wxpc.wxCB_DROPDOWN -wxCB_SORT = wxpc.wxCB_SORT -wxCB_READONLY = wxpc.wxCB_READONLY -wxRA_HORIZONTAL = wxpc.wxRA_HORIZONTAL -wxRA_VERTICAL = wxpc.wxRA_VERTICAL -wxRB_GROUP = wxpc.wxRB_GROUP -wxGA_PROGRESSBAR = wxpc.wxGA_PROGRESSBAR -wxGA_HORIZONTAL = wxpc.wxGA_HORIZONTAL -wxGA_VERTICAL = wxpc.wxGA_VERTICAL -wxSL_HORIZONTAL = wxpc.wxSL_HORIZONTAL -wxSL_VERTICAL = wxpc.wxSL_VERTICAL -wxSL_AUTOTICKS = wxpc.wxSL_AUTOTICKS -wxSL_LABELS = wxpc.wxSL_LABELS -wxSL_LEFT = wxpc.wxSL_LEFT -wxSL_TOP = wxpc.wxSL_TOP -wxSL_RIGHT = wxpc.wxSL_RIGHT -wxSL_BOTTOM = wxpc.wxSL_BOTTOM -wxSL_BOTH = wxpc.wxSL_BOTH -wxSL_SELRANGE = wxpc.wxSL_SELRANGE -wxSB_HORIZONTAL = wxpc.wxSB_HORIZONTAL -wxSB_VERTICAL = wxpc.wxSB_VERTICAL -wxBU_AUTODRAW = wxpc.wxBU_AUTODRAW -wxBU_NOAUTODRAW = wxpc.wxBU_NOAUTODRAW -wxTR_HAS_BUTTONS = wxpc.wxTR_HAS_BUTTONS -wxTR_EDIT_LABELS = wxpc.wxTR_EDIT_LABELS -wxLC_ICON = wxpc.wxLC_ICON -wxLC_SMALL_ICON = wxpc.wxLC_SMALL_ICON -wxLC_LIST = wxpc.wxLC_LIST -wxLC_REPORT = wxpc.wxLC_REPORT -wxLC_ALIGN_TOP = wxpc.wxLC_ALIGN_TOP -wxLC_ALIGN_LEFT = wxpc.wxLC_ALIGN_LEFT -wxLC_AUTOARRANGE = wxpc.wxLC_AUTOARRANGE -wxLC_USER_TEXT = wxpc.wxLC_USER_TEXT -wxLC_EDIT_LABELS = wxpc.wxLC_EDIT_LABELS -wxLC_NO_HEADER = wxpc.wxLC_NO_HEADER -wxLC_NO_SORT_HEADER = wxpc.wxLC_NO_SORT_HEADER -wxLC_SINGLE_SEL = wxpc.wxLC_SINGLE_SEL -wxLC_SORT_ASCENDING = wxpc.wxLC_SORT_ASCENDING -wxLC_SORT_DESCENDING = wxpc.wxLC_SORT_DESCENDING -wxLC_MASK_TYPE = wxpc.wxLC_MASK_TYPE -wxLC_MASK_ALIGN = wxpc.wxLC_MASK_ALIGN -wxLC_MASK_SORT = wxpc.wxLC_MASK_SORT -wxSP_VERTICAL = wxpc.wxSP_VERTICAL -wxSP_HORIZONTAL = wxpc.wxSP_HORIZONTAL -wxSP_ARROW_KEYS = wxpc.wxSP_ARROW_KEYS -wxSP_WRAP = wxpc.wxSP_WRAP -wxSP_NOBORDER = wxpc.wxSP_NOBORDER -wxSP_3D = wxpc.wxSP_3D -wxSP_BORDER = wxpc.wxSP_BORDER -wxTAB_MULTILINE = wxpc.wxTAB_MULTILINE -wxTAB_RIGHTJUSTIFY = wxpc.wxTAB_RIGHTJUSTIFY -wxTAB_FIXEDWIDTH = wxpc.wxTAB_FIXEDWIDTH -wxTAB_OWNERDRAW = wxpc.wxTAB_OWNERDRAW -wxFLOOD_SURFACE = wxpc.wxFLOOD_SURFACE -wxFLOOD_BORDER = wxpc.wxFLOOD_BORDER -wxODDEVEN_RULE = wxpc.wxODDEVEN_RULE -wxWINDING_RULE = wxpc.wxWINDING_RULE -wxTOOL_TOP = wxpc.wxTOOL_TOP -wxTOOL_BOTTOM = wxpc.wxTOOL_BOTTOM -wxTOOL_LEFT = wxpc.wxTOOL_LEFT -wxTOOL_RIGHT = wxpc.wxTOOL_RIGHT -wxOK = wxpc.wxOK -wxYES_NO = wxpc.wxYES_NO -wxCANCEL = wxpc.wxCANCEL -wxYES = wxpc.wxYES -wxNO = wxpc.wxNO -wxICON_EXCLAMATION = wxpc.wxICON_EXCLAMATION -wxICON_HAND = wxpc.wxICON_HAND -wxICON_QUESTION = wxpc.wxICON_QUESTION -wxICON_INFORMATION = wxpc.wxICON_INFORMATION -wxICON_STOP = wxpc.wxICON_STOP -wxICON_ASTERISK = wxpc.wxICON_ASTERISK -wxICON_MASK = wxpc.wxICON_MASK -wxCENTRE = wxpc.wxCENTRE -wxCENTER = wxpc.wxCENTER -wxSIZE_AUTO_WIDTH = wxpc.wxSIZE_AUTO_WIDTH -wxSIZE_AUTO_HEIGHT = wxpc.wxSIZE_AUTO_HEIGHT -wxSIZE_AUTO = wxpc.wxSIZE_AUTO -wxSIZE_USE_EXISTING = wxpc.wxSIZE_USE_EXISTING -wxSIZE_ALLOW_MINUS_ONE = wxpc.wxSIZE_ALLOW_MINUS_ONE -wxDF_TEXT = wxpc.wxDF_TEXT -wxDF_BITMAP = wxpc.wxDF_BITMAP -wxDF_METAFILE = wxpc.wxDF_METAFILE -wxDF_DIB = wxpc.wxDF_DIB -wxDF_OEMTEXT = wxpc.wxDF_OEMTEXT -wxDF_FILENAME = wxpc.wxDF_FILENAME -wxPORTRAIT = wxpc.wxPORTRAIT -wxLANDSCAPE = wxpc.wxLANDSCAPE -wxID_OPEN = wxpc.wxID_OPEN -wxID_CLOSE = wxpc.wxID_CLOSE -wxID_NEW = wxpc.wxID_NEW -wxID_SAVE = wxpc.wxID_SAVE -wxID_SAVEAS = wxpc.wxID_SAVEAS -wxID_REVERT = wxpc.wxID_REVERT -wxID_EXIT = wxpc.wxID_EXIT -wxID_UNDO = wxpc.wxID_UNDO -wxID_REDO = wxpc.wxID_REDO -wxID_HELP = wxpc.wxID_HELP -wxID_PRINT = wxpc.wxID_PRINT -wxID_PRINT_SETUP = wxpc.wxID_PRINT_SETUP -wxID_PREVIEW = wxpc.wxID_PREVIEW -wxID_ABOUT = wxpc.wxID_ABOUT -wxID_HELP_CONTENTS = wxpc.wxID_HELP_CONTENTS -wxID_HELP_COMMANDS = wxpc.wxID_HELP_COMMANDS -wxID_HELP_PROCEDURES = wxpc.wxID_HELP_PROCEDURES -wxID_HELP_CONTEXT = wxpc.wxID_HELP_CONTEXT -wxID_CUT = wxpc.wxID_CUT -wxID_COPY = wxpc.wxID_COPY -wxID_PASTE = wxpc.wxID_PASTE -wxID_CLEAR = wxpc.wxID_CLEAR -wxID_FIND = wxpc.wxID_FIND -wxID_FILE1 = wxpc.wxID_FILE1 -wxID_FILE2 = wxpc.wxID_FILE2 -wxID_FILE3 = wxpc.wxID_FILE3 -wxID_FILE4 = wxpc.wxID_FILE4 -wxID_FILE5 = wxpc.wxID_FILE5 -wxID_FILE6 = wxpc.wxID_FILE6 -wxID_FILE7 = wxpc.wxID_FILE7 -wxID_FILE8 = wxpc.wxID_FILE8 -wxID_FILE9 = wxpc.wxID_FILE9 -wxID_OK = wxpc.wxID_OK -wxID_CANCEL = wxpc.wxID_CANCEL -wxID_APPLY = wxpc.wxID_APPLY -wxID_YES = wxpc.wxID_YES -wxID_NO = wxpc.wxID_NO -wxBITMAP_TYPE_BMP = wxpc.wxBITMAP_TYPE_BMP -wxBITMAP_TYPE_BMP_RESOURCE = wxpc.wxBITMAP_TYPE_BMP_RESOURCE -wxBITMAP_TYPE_ICO = wxpc.wxBITMAP_TYPE_ICO -wxBITMAP_TYPE_ICO_RESOURCE = wxpc.wxBITMAP_TYPE_ICO_RESOURCE -wxBITMAP_TYPE_CUR = wxpc.wxBITMAP_TYPE_CUR -wxBITMAP_TYPE_CUR_RESOURCE = wxpc.wxBITMAP_TYPE_CUR_RESOURCE -wxBITMAP_TYPE_XBM = wxpc.wxBITMAP_TYPE_XBM -wxBITMAP_TYPE_XBM_DATA = wxpc.wxBITMAP_TYPE_XBM_DATA -wxBITMAP_TYPE_XPM = wxpc.wxBITMAP_TYPE_XPM -wxBITMAP_TYPE_XPM_DATA = wxpc.wxBITMAP_TYPE_XPM_DATA -wxBITMAP_TYPE_TIF = wxpc.wxBITMAP_TYPE_TIF -wxBITMAP_TYPE_TIF_RESOURCE = wxpc.wxBITMAP_TYPE_TIF_RESOURCE -wxBITMAP_TYPE_GIF = wxpc.wxBITMAP_TYPE_GIF -wxBITMAP_TYPE_GIF_RESOURCE = wxpc.wxBITMAP_TYPE_GIF_RESOURCE -wxBITMAP_TYPE_PNG = wxpc.wxBITMAP_TYPE_PNG -wxBITMAP_TYPE_PNG_RESOURCE = wxpc.wxBITMAP_TYPE_PNG_RESOURCE -wxBITMAP_TYPE_ANY = wxpc.wxBITMAP_TYPE_ANY -wxBITMAP_TYPE_RESOURCE = wxpc.wxBITMAP_TYPE_RESOURCE -wxOPEN = wxpc.wxOPEN -wxSAVE = wxpc.wxSAVE -wxHIDE_READONLY = wxpc.wxHIDE_READONLY -wxOVERWRITE_PROMPT = wxpc.wxOVERWRITE_PROMPT -wxACCEL_ALT = wxpc.wxACCEL_ALT -wxACCEL_CTRL = wxpc.wxACCEL_CTRL -wxACCEL_SHIFT = wxpc.wxACCEL_SHIFT -ERR_PARAM = wxpc.ERR_PARAM -ERR_NODATA = wxpc.ERR_NODATA -ERR_CANCEL = wxpc.ERR_CANCEL -ERR_SUCCESS = wxpc.ERR_SUCCESS -wxDEFAULT = wxpc.wxDEFAULT -wxDECORATIVE = wxpc.wxDECORATIVE -wxROMAN = wxpc.wxROMAN -wxSCRIPT = wxpc.wxSCRIPT -wxSWISS = wxpc.wxSWISS -wxMODERN = wxpc.wxMODERN -wxTELETYPE = wxpc.wxTELETYPE -wxVARIABLE = wxpc.wxVARIABLE -wxFIXED = wxpc.wxFIXED -wxNORMAL = wxpc.wxNORMAL -wxLIGHT = wxpc.wxLIGHT -wxBOLD = wxpc.wxBOLD -wxITALIC = wxpc.wxITALIC -wxSLANT = wxpc.wxSLANT -wxSOLID = wxpc.wxSOLID -wxDOT = wxpc.wxDOT -wxLONG_DASH = wxpc.wxLONG_DASH -wxSHORT_DASH = wxpc.wxSHORT_DASH -wxDOT_DASH = wxpc.wxDOT_DASH -wxUSER_DASH = wxpc.wxUSER_DASH -wxTRANSPARENT = wxpc.wxTRANSPARENT -wxSTIPPLE = wxpc.wxSTIPPLE -wxBDIAGONAL_HATCH = wxpc.wxBDIAGONAL_HATCH -wxCROSSDIAG_HATCH = wxpc.wxCROSSDIAG_HATCH -wxFDIAGONAL_HATCH = wxpc.wxFDIAGONAL_HATCH -wxCROSS_HATCH = wxpc.wxCROSS_HATCH -wxHORIZONTAL_HATCH = wxpc.wxHORIZONTAL_HATCH -wxVERTICAL_HATCH = wxpc.wxVERTICAL_HATCH -wxJOIN_BEVEL = wxpc.wxJOIN_BEVEL -wxJOIN_MITER = wxpc.wxJOIN_MITER -wxJOIN_ROUND = wxpc.wxJOIN_ROUND -wxCAP_ROUND = wxpc.wxCAP_ROUND -wxCAP_PROJECTING = wxpc.wxCAP_PROJECTING -wxCAP_BUTT = wxpc.wxCAP_BUTT -wxCLEAR = wxpc.wxCLEAR -wxXOR = wxpc.wxXOR -wxINVERT = wxpc.wxINVERT -wxOR_REVERSE = wxpc.wxOR_REVERSE -wxAND_REVERSE = wxpc.wxAND_REVERSE -wxCOPY = wxpc.wxCOPY -wxAND = wxpc.wxAND -wxAND_INVERT = wxpc.wxAND_INVERT -wxNO_OP = wxpc.wxNO_OP -wxNOR = wxpc.wxNOR -wxEQUIV = wxpc.wxEQUIV -wxSRC_INVERT = wxpc.wxSRC_INVERT -wxOR_INVERT = wxpc.wxOR_INVERT -wxNAND = wxpc.wxNAND -wxOR = wxpc.wxOR -wxSET = wxpc.wxSET -wxSRC_OR = wxpc.wxSRC_OR -wxSRC_AND = wxpc.wxSRC_AND -WXK_BACK = wxpc.WXK_BACK -WXK_TAB = wxpc.WXK_TAB -WXK_RETURN = wxpc.WXK_RETURN -WXK_ESCAPE = wxpc.WXK_ESCAPE -WXK_SPACE = wxpc.WXK_SPACE -WXK_DELETE = wxpc.WXK_DELETE -WXK_START = wxpc.WXK_START -WXK_LBUTTON = wxpc.WXK_LBUTTON -WXK_RBUTTON = wxpc.WXK_RBUTTON -WXK_CANCEL = wxpc.WXK_CANCEL -WXK_MBUTTON = wxpc.WXK_MBUTTON -WXK_CLEAR = wxpc.WXK_CLEAR -WXK_SHIFT = wxpc.WXK_SHIFT -WXK_CONTROL = wxpc.WXK_CONTROL -WXK_MENU = wxpc.WXK_MENU -WXK_PAUSE = wxpc.WXK_PAUSE -WXK_CAPITAL = wxpc.WXK_CAPITAL -WXK_PRIOR = wxpc.WXK_PRIOR -WXK_NEXT = wxpc.WXK_NEXT -WXK_END = wxpc.WXK_END -WXK_HOME = wxpc.WXK_HOME -WXK_LEFT = wxpc.WXK_LEFT -WXK_UP = wxpc.WXK_UP -WXK_RIGHT = wxpc.WXK_RIGHT -WXK_DOWN = wxpc.WXK_DOWN -WXK_SELECT = wxpc.WXK_SELECT -WXK_PRINT = wxpc.WXK_PRINT -WXK_EXECUTE = wxpc.WXK_EXECUTE -WXK_SNAPSHOT = wxpc.WXK_SNAPSHOT -WXK_INSERT = wxpc.WXK_INSERT -WXK_HELP = wxpc.WXK_HELP -WXK_NUMPAD0 = wxpc.WXK_NUMPAD0 -WXK_NUMPAD1 = wxpc.WXK_NUMPAD1 -WXK_NUMPAD2 = wxpc.WXK_NUMPAD2 -WXK_NUMPAD3 = wxpc.WXK_NUMPAD3 -WXK_NUMPAD4 = wxpc.WXK_NUMPAD4 -WXK_NUMPAD5 = wxpc.WXK_NUMPAD5 -WXK_NUMPAD6 = wxpc.WXK_NUMPAD6 -WXK_NUMPAD7 = wxpc.WXK_NUMPAD7 -WXK_NUMPAD8 = wxpc.WXK_NUMPAD8 -WXK_NUMPAD9 = wxpc.WXK_NUMPAD9 -WXK_MULTIPLY = wxpc.WXK_MULTIPLY -WXK_ADD = wxpc.WXK_ADD -WXK_SEPARATOR = wxpc.WXK_SEPARATOR -WXK_SUBTRACT = wxpc.WXK_SUBTRACT -WXK_DECIMAL = wxpc.WXK_DECIMAL -WXK_DIVIDE = wxpc.WXK_DIVIDE -WXK_F1 = wxpc.WXK_F1 -WXK_F2 = wxpc.WXK_F2 -WXK_F3 = wxpc.WXK_F3 -WXK_F4 = wxpc.WXK_F4 -WXK_F5 = wxpc.WXK_F5 -WXK_F6 = wxpc.WXK_F6 -WXK_F7 = wxpc.WXK_F7 -WXK_F8 = wxpc.WXK_F8 -WXK_F9 = wxpc.WXK_F9 -WXK_F10 = wxpc.WXK_F10 -WXK_F11 = wxpc.WXK_F11 -WXK_F12 = wxpc.WXK_F12 -WXK_F13 = wxpc.WXK_F13 -WXK_F14 = wxpc.WXK_F14 -WXK_F15 = wxpc.WXK_F15 -WXK_F16 = wxpc.WXK_F16 -WXK_F17 = wxpc.WXK_F17 -WXK_F18 = wxpc.WXK_F18 -WXK_F19 = wxpc.WXK_F19 -WXK_F20 = wxpc.WXK_F20 -WXK_F21 = wxpc.WXK_F21 -WXK_F22 = wxpc.WXK_F22 -WXK_F23 = wxpc.WXK_F23 -WXK_F24 = wxpc.WXK_F24 -WXK_NUMLOCK = wxpc.WXK_NUMLOCK -WXK_SCROLL = wxpc.WXK_SCROLL -WXK_PAGEUP = wxpc.WXK_PAGEUP -WXK_PAGEDOWN = wxpc.WXK_PAGEDOWN -wxCURSOR_ARROW = wxpc.wxCURSOR_ARROW -wxCURSOR_BULLSEYE = wxpc.wxCURSOR_BULLSEYE -wxCURSOR_CHAR = wxpc.wxCURSOR_CHAR -wxCURSOR_CROSS = wxpc.wxCURSOR_CROSS -wxCURSOR_HAND = wxpc.wxCURSOR_HAND -wxCURSOR_IBEAM = wxpc.wxCURSOR_IBEAM -wxCURSOR_LEFT_BUTTON = wxpc.wxCURSOR_LEFT_BUTTON -wxCURSOR_MAGNIFIER = wxpc.wxCURSOR_MAGNIFIER -wxCURSOR_MIDDLE_BUTTON = wxpc.wxCURSOR_MIDDLE_BUTTON -wxCURSOR_NO_ENTRY = wxpc.wxCURSOR_NO_ENTRY -wxCURSOR_PAINT_BRUSH = wxpc.wxCURSOR_PAINT_BRUSH -wxCURSOR_PENCIL = wxpc.wxCURSOR_PENCIL -wxCURSOR_POINT_LEFT = wxpc.wxCURSOR_POINT_LEFT -wxCURSOR_POINT_RIGHT = wxpc.wxCURSOR_POINT_RIGHT -wxCURSOR_QUESTION_ARROW = wxpc.wxCURSOR_QUESTION_ARROW -wxCURSOR_RIGHT_BUTTON = wxpc.wxCURSOR_RIGHT_BUTTON -wxCURSOR_SIZENESW = wxpc.wxCURSOR_SIZENESW -wxCURSOR_SIZENS = wxpc.wxCURSOR_SIZENS -wxCURSOR_SIZENWSE = wxpc.wxCURSOR_SIZENWSE -wxCURSOR_SIZEWE = wxpc.wxCURSOR_SIZEWE -wxCURSOR_SIZING = wxpc.wxCURSOR_SIZING -wxCURSOR_SPRAYCAN = wxpc.wxCURSOR_SPRAYCAN -wxCURSOR_WAIT = wxpc.wxCURSOR_WAIT -wxCURSOR_WATCH = wxpc.wxCURSOR_WATCH -wxCURSOR_BLANK = wxpc.wxCURSOR_BLANK -FALSE = wxpc.FALSE -false = wxpc.false -TRUE = wxpc.TRUE -true = wxpc.true -wxEVT_NULL = wxpc.wxEVT_NULL -wxEVT_FIRST = wxpc.wxEVT_FIRST -wxEVT_COMMAND_BUTTON_CLICKED = wxpc.wxEVT_COMMAND_BUTTON_CLICKED -wxEVT_COMMAND_CHECKBOX_CLICKED = wxpc.wxEVT_COMMAND_CHECKBOX_CLICKED -wxEVT_COMMAND_CHOICE_SELECTED = wxpc.wxEVT_COMMAND_CHOICE_SELECTED -wxEVT_COMMAND_LISTBOX_SELECTED = wxpc.wxEVT_COMMAND_LISTBOX_SELECTED -wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = wxpc.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED -wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = wxpc.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED -wxEVT_COMMAND_TEXT_UPDATED = wxpc.wxEVT_COMMAND_TEXT_UPDATED -wxEVT_COMMAND_TEXT_ENTER = wxpc.wxEVT_COMMAND_TEXT_ENTER -wxEVT_COMMAND_MENU_SELECTED = wxpc.wxEVT_COMMAND_MENU_SELECTED -wxEVT_COMMAND_SLIDER_UPDATED = wxpc.wxEVT_COMMAND_SLIDER_UPDATED -wxEVT_COMMAND_RADIOBOX_SELECTED = wxpc.wxEVT_COMMAND_RADIOBOX_SELECTED -wxEVT_COMMAND_RADIOBUTTON_SELECTED = wxpc.wxEVT_COMMAND_RADIOBUTTON_SELECTED -wxEVT_COMMAND_SCROLLBAR_UPDATED = wxpc.wxEVT_COMMAND_SCROLLBAR_UPDATED -wxEVT_COMMAND_VLBOX_SELECTED = wxpc.wxEVT_COMMAND_VLBOX_SELECTED -wxEVT_COMMAND_COMBOBOX_SELECTED = wxpc.wxEVT_COMMAND_COMBOBOX_SELECTED -wxEVT_COMMAND_TOOL_CLICKED = wxpc.wxEVT_COMMAND_TOOL_CLICKED -wxEVT_COMMAND_TOOL_RCLICKED = wxpc.wxEVT_COMMAND_TOOL_RCLICKED -wxEVT_COMMAND_TOOL_ENTER = wxpc.wxEVT_COMMAND_TOOL_ENTER -wxEVT_SET_FOCUS = wxpc.wxEVT_SET_FOCUS -wxEVT_KILL_FOCUS = wxpc.wxEVT_KILL_FOCUS -wxEVT_LEFT_DOWN = wxpc.wxEVT_LEFT_DOWN -wxEVT_LEFT_UP = wxpc.wxEVT_LEFT_UP -wxEVT_MIDDLE_DOWN = wxpc.wxEVT_MIDDLE_DOWN -wxEVT_MIDDLE_UP = wxpc.wxEVT_MIDDLE_UP -wxEVT_RIGHT_DOWN = wxpc.wxEVT_RIGHT_DOWN -wxEVT_RIGHT_UP = wxpc.wxEVT_RIGHT_UP -wxEVT_MOTION = wxpc.wxEVT_MOTION -wxEVT_ENTER_WINDOW = wxpc.wxEVT_ENTER_WINDOW -wxEVT_LEAVE_WINDOW = wxpc.wxEVT_LEAVE_WINDOW -wxEVT_LEFT_DCLICK = wxpc.wxEVT_LEFT_DCLICK -wxEVT_MIDDLE_DCLICK = wxpc.wxEVT_MIDDLE_DCLICK -wxEVT_RIGHT_DCLICK = wxpc.wxEVT_RIGHT_DCLICK -wxEVT_NC_LEFT_DOWN = wxpc.wxEVT_NC_LEFT_DOWN -wxEVT_NC_LEFT_UP = wxpc.wxEVT_NC_LEFT_UP -wxEVT_NC_MIDDLE_DOWN = wxpc.wxEVT_NC_MIDDLE_DOWN -wxEVT_NC_MIDDLE_UP = wxpc.wxEVT_NC_MIDDLE_UP -wxEVT_NC_RIGHT_DOWN = wxpc.wxEVT_NC_RIGHT_DOWN -wxEVT_NC_RIGHT_UP = wxpc.wxEVT_NC_RIGHT_UP -wxEVT_NC_MOTION = wxpc.wxEVT_NC_MOTION -wxEVT_NC_ENTER_WINDOW = wxpc.wxEVT_NC_ENTER_WINDOW -wxEVT_NC_LEAVE_WINDOW = wxpc.wxEVT_NC_LEAVE_WINDOW -wxEVT_NC_LEFT_DCLICK = wxpc.wxEVT_NC_LEFT_DCLICK -wxEVT_NC_MIDDLE_DCLICK = wxpc.wxEVT_NC_MIDDLE_DCLICK -wxEVT_NC_RIGHT_DCLICK = wxpc.wxEVT_NC_RIGHT_DCLICK -wxEVT_CHAR = wxpc.wxEVT_CHAR -wxEVT_SCROLL_TOP = wxpc.wxEVT_SCROLL_TOP -wxEVT_SCROLL_BOTTOM = wxpc.wxEVT_SCROLL_BOTTOM -wxEVT_SCROLL_LINEUP = wxpc.wxEVT_SCROLL_LINEUP -wxEVT_SCROLL_LINEDOWN = wxpc.wxEVT_SCROLL_LINEDOWN -wxEVT_SCROLL_PAGEUP = wxpc.wxEVT_SCROLL_PAGEUP -wxEVT_SCROLL_PAGEDOWN = wxpc.wxEVT_SCROLL_PAGEDOWN -wxEVT_SCROLL_THUMBTRACK = wxpc.wxEVT_SCROLL_THUMBTRACK -wxEVT_SIZE = wxpc.wxEVT_SIZE -wxEVT_MOVE = wxpc.wxEVT_MOVE -wxEVT_CLOSE_WINDOW = wxpc.wxEVT_CLOSE_WINDOW -wxEVT_END_SESSION = wxpc.wxEVT_END_SESSION -wxEVT_QUERY_END_SESSION = wxpc.wxEVT_QUERY_END_SESSION -wxEVT_ACTIVATE_APP = wxpc.wxEVT_ACTIVATE_APP -wxEVT_POWER = wxpc.wxEVT_POWER -wxEVT_CHAR_HOOK = wxpc.wxEVT_CHAR_HOOK -wxEVT_KEY_UP = wxpc.wxEVT_KEY_UP -wxEVT_ACTIVATE = wxpc.wxEVT_ACTIVATE -wxEVT_CREATE = wxpc.wxEVT_CREATE -wxEVT_DESTROY = wxpc.wxEVT_DESTROY -wxEVT_SHOW = wxpc.wxEVT_SHOW -wxEVT_ICONIZE = wxpc.wxEVT_ICONIZE -wxEVT_MAXIMIZE = wxpc.wxEVT_MAXIMIZE -wxEVT_MOUSE_CAPTURE_CHANGED = wxpc.wxEVT_MOUSE_CAPTURE_CHANGED -wxEVT_PAINT = wxpc.wxEVT_PAINT -wxEVT_ERASE_BACKGROUND = wxpc.wxEVT_ERASE_BACKGROUND -wxEVT_NC_PAINT = wxpc.wxEVT_NC_PAINT -wxEVT_PAINT_ICON = wxpc.wxEVT_PAINT_ICON -wxEVT_MENU_CHAR = wxpc.wxEVT_MENU_CHAR -wxEVT_MENU_INIT = wxpc.wxEVT_MENU_INIT -wxEVT_MENU_HIGHLIGHT = wxpc.wxEVT_MENU_HIGHLIGHT -wxEVT_POPUP_MENU_INIT = wxpc.wxEVT_POPUP_MENU_INIT -wxEVT_CONTEXT_MENU = wxpc.wxEVT_CONTEXT_MENU -wxEVT_SYS_COLOUR_CHANGED = wxpc.wxEVT_SYS_COLOUR_CHANGED -wxEVT_SETTING_CHANGED = wxpc.wxEVT_SETTING_CHANGED -wxEVT_QUERY_NEW_PALETTE = wxpc.wxEVT_QUERY_NEW_PALETTE -wxEVT_PALETTE_CHANGED = wxpc.wxEVT_PALETTE_CHANGED -wxEVT_JOY_BUTTON_DOWN = wxpc.wxEVT_JOY_BUTTON_DOWN -wxEVT_JOY_BUTTON_UP = wxpc.wxEVT_JOY_BUTTON_UP -wxEVT_JOY_MOVE = wxpc.wxEVT_JOY_MOVE -wxEVT_JOY_ZMOVE = wxpc.wxEVT_JOY_ZMOVE -wxEVT_DROP_FILES = wxpc.wxEVT_DROP_FILES -wxEVT_DRAW_ITEM = wxpc.wxEVT_DRAW_ITEM -wxEVT_MEASURE_ITEM = wxpc.wxEVT_MEASURE_ITEM -wxEVT_COMPARE_ITEM = wxpc.wxEVT_COMPARE_ITEM -wxEVT_INIT_DIALOG = wxpc.wxEVT_INIT_DIALOG -wxEVT_IDLE = wxpc.wxEVT_IDLE -wxEVT_UPDATE_UI = wxpc.wxEVT_UPDATE_UI -wxEVT_COMMAND_LEFT_CLICK = wxpc.wxEVT_COMMAND_LEFT_CLICK -wxEVT_COMMAND_LEFT_DCLICK = wxpc.wxEVT_COMMAND_LEFT_DCLICK -wxEVT_COMMAND_RIGHT_CLICK = wxpc.wxEVT_COMMAND_RIGHT_CLICK -wxEVT_COMMAND_RIGHT_DCLICK = wxpc.wxEVT_COMMAND_RIGHT_DCLICK -wxEVT_COMMAND_SET_FOCUS = wxpc.wxEVT_COMMAND_SET_FOCUS -wxEVT_COMMAND_KILL_FOCUS = wxpc.wxEVT_COMMAND_KILL_FOCUS -wxEVT_COMMAND_ENTER = wxpc.wxEVT_COMMAND_ENTER -wxEVT_COMMAND_TREE_BEGIN_DRAG = wxpc.wxEVT_COMMAND_TREE_BEGIN_DRAG -wxEVT_COMMAND_TREE_BEGIN_RDRAG = wxpc.wxEVT_COMMAND_TREE_BEGIN_RDRAG -wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT = wxpc.wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT -wxEVT_COMMAND_TREE_END_LABEL_EDIT = wxpc.wxEVT_COMMAND_TREE_END_LABEL_EDIT -wxEVT_COMMAND_TREE_DELETE_ITEM = wxpc.wxEVT_COMMAND_TREE_DELETE_ITEM -wxEVT_COMMAND_TREE_GET_INFO = wxpc.wxEVT_COMMAND_TREE_GET_INFO -wxEVT_COMMAND_TREE_SET_INFO = wxpc.wxEVT_COMMAND_TREE_SET_INFO -wxEVT_COMMAND_TREE_ITEM_EXPANDED = wxpc.wxEVT_COMMAND_TREE_ITEM_EXPANDED -wxEVT_COMMAND_TREE_ITEM_EXPANDING = wxpc.wxEVT_COMMAND_TREE_ITEM_EXPANDING -wxEVT_COMMAND_TREE_SEL_CHANGED = wxpc.wxEVT_COMMAND_TREE_SEL_CHANGED -wxEVT_COMMAND_TREE_SEL_CHANGING = wxpc.wxEVT_COMMAND_TREE_SEL_CHANGING -wxEVT_COMMAND_TREE_KEY_DOWN = wxpc.wxEVT_COMMAND_TREE_KEY_DOWN -wxEVT_COMMAND_LIST_BEGIN_DRAG = wxpc.wxEVT_COMMAND_LIST_BEGIN_DRAG -wxEVT_COMMAND_LIST_BEGIN_RDRAG = wxpc.wxEVT_COMMAND_LIST_BEGIN_RDRAG -wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT = wxpc.wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT -wxEVT_COMMAND_LIST_END_LABEL_EDIT = wxpc.wxEVT_COMMAND_LIST_END_LABEL_EDIT -wxEVT_COMMAND_LIST_DELETE_ITEM = wxpc.wxEVT_COMMAND_LIST_DELETE_ITEM -wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS = wxpc.wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS -wxEVT_COMMAND_LIST_GET_INFO = wxpc.wxEVT_COMMAND_LIST_GET_INFO -wxEVT_COMMAND_LIST_SET_INFO = wxpc.wxEVT_COMMAND_LIST_SET_INFO -wxEVT_COMMAND_LIST_ITEM_SELECTED = wxpc.wxEVT_COMMAND_LIST_ITEM_SELECTED -wxEVT_COMMAND_LIST_ITEM_DESELECTED = wxpc.wxEVT_COMMAND_LIST_ITEM_DESELECTED -wxEVT_COMMAND_LIST_KEY_DOWN = wxpc.wxEVT_COMMAND_LIST_KEY_DOWN -wxEVT_COMMAND_LIST_INSERT_ITEM = wxpc.wxEVT_COMMAND_LIST_INSERT_ITEM -wxEVT_COMMAND_LIST_COL_CLICK = wxpc.wxEVT_COMMAND_LIST_COL_CLICK -wxEVT_COMMAND_TAB_SEL_CHANGED = wxpc.wxEVT_COMMAND_TAB_SEL_CHANGED -wxEVT_COMMAND_TAB_SEL_CHANGING = wxpc.wxEVT_COMMAND_TAB_SEL_CHANGING -wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED = wxpc.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED -wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING = wxpc.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING -__version__ = wxpc.__version__ -cvar = wxpc.cvar -wxPyDefaultPosition = wxPointPtr(wxpc.cvar.wxPyDefaultPosition) -wxPyDefaultSize = wxSizePtr(wxpc.cvar.wxPyDefaultSize) - - -#-------------- USER INCLUDE ----------------------- - -#---------------------------------------------------------------------------- -# Name: _extra.py -# Purpose: This file is appended to the shadow class file generated -# by SWIG. We add some unSWIGable things here. -# -# Author: Robin Dunn -# -# Created: 6/30/97 -# RCS-ID: $Id$ -# Copyright: (c) 1998 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------------- - -import sys - -#---------------------------------------------------------------------- -# This gives this module's dictionary to the C++ extension code... - -_wxSetDictionary(vars()) - - -#---------------------------------------------------------------------- -#---------------------------------------------------------------------- -# Helper function to link python methods to wxWindows virtual -# functions by name. - -def _checkForCallback(obj, name, event, theID=-1): - try: cb = getattr(obj, name) - except: pass - else: obj.Connect(theID, -1, event, cb) - -def _StdWindowCallbacks(win): - _checkForCallback(win, "OnChar", wxEVT_CHAR) - _checkForCallback(win, "OnSize", wxEVT_SIZE) - _checkForCallback(win, "OnEraseBackground", wxEVT_ERASE_BACKGROUND) - _checkForCallback(win, "OnSysColourChanged", wxEVT_SYS_COLOUR_CHANGED) - _checkForCallback(win, "OnInitDialog", wxEVT_INIT_DIALOG) - _checkForCallback(win, "OnIdle", wxEVT_IDLE) - _checkForCallback(win, "OnPaint", wxEVT_PAINT) - -def _StdFrameCallbacks(win): - _StdWindowCallbacks(win) - _checkForCallback(win, "OnActivate", wxEVT_ACTIVATE) - _checkForCallback(win, "OnMenuHighlight", wxEVT_MENU_HIGHLIGHT) - _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW) - - -def _StdOnScrollCallback(win): - try: cb = getattr(win, "OnScroll") - except: pass - else: EVT_SCROLL(win, cb) - - - -#---------------------------------------------------------------------- -#---------------------------------------------------------------------- -# functions that look and act like the C++ Macros of the same name - - -# Miscellaneous -def EVT_SIZE(win, func): - win.Connect(-1, -1, wxEVT_SIZE, func) - -def EVT_MOVE(win, func): - win.Connect(-1, -1, wxEVT_MOVE, func) - -def EVT_CLOSE(win, func): - win.Connect(-1, -1, wxEVT_CLOSE_WINDOW, func) - -def EVT_PAINT(win, func): - win.Connect(-1, -1, wxEVT_PAINT, func) - -def EVT_ERASE_BACKGROUND(win, func): - win.Connect(-1, -1, wxEVT_ERASE_BACKGROUND, func) - -def EVT_CHAR(win, func): - win.Connect(-1, -1, wxEVT_CHAR, func) - -def EVT_CHAR_HOOK(win, func): - win.Connect(-1, -1, wxEVT_CHAR_HOOK, func) - -def EVT_MENU_HIGHLIGHT(win, id, func): - win.Connect(id, -1, wxEVT_MENU_HIGHLIGHT, func) - -def EVT_MENU_HIGHLIGHT_ALL(win, func): - win.Connect(-1, -1, wxEVT_MENU_HIGHLIGHT, func) - -def EVT_SET_FOCUS(win, func): - win.Connect(-1, -1, wxEVT_SET_FOCUS, func) - -def EVT_KILL_FOCUS(win, func): - win.Connect(-1, -1, wxEVT_KILL_FOCUS, func) - -def EVT_ACTIVATE(win, func): - win.Connect(-1, -1, wxEVT_ACTIVATE, func) - -def EVT_ACTIVATE_APP(win, func): - win.Connect(-1, -1, wxEVT_ACTIVATE_APP, func) - -def EVT_END_SESSION(win, func): - win.Connect(-1, -1, wxEVT_END_SESSION, func) - -def EVT_QUERY_END_SESSION(win, func): - win.Connect(-1, -1, wxEVT_QUERY_END_SESSION, func) - -def EVT_DROP_FILES(win, func): - win.Connect(-1, -1, wxEVT_DROP_FILES, func) - -def EVT_INIT_DIALOG(win, func): - win.Connect(-1, -1, wxEVT_INIT_DIALOG, func) - -def EVT_SYS_COLOUR_CHANGED(win, func): - win.Connect(-1, -1, wxEVT_SYS_COLOUR_CHANGED, func) - -def EVT_SHOW(win, func): - win.Connect(-1, -1, wxEVT_SHOW, func) - -def EVT_MAXIMIZE(win, func): - win.Connect(-1, -1, wxEVT_MAXIMIZE, func) - -def EVT_ICONIZE(win, func): - win.Connect(-1, -1, wxEVT_ICONIZE, func) - -def EVT_NAVIGATION_KEY(win, func): - win.Connect(-1, -1, wxEVT_NAVIGATION_KEY, func) - - -# Mouse Events -def EVT_LEFT_DOWN(win, func): - win.Connect(-1, -1, wxEVT_LEFT_DOWN, func) - -def EVT_LEFT_UP(win, func): - win.Connect(-1, -1, wxEVT_LEFT_UP, func) - -def EVT_MIDDLE_DOWN(win, func): - win.Connect(-1, -1, wxEVT_MIDDLE_DOWN, func) - -def EVT_MIDDLE_UP(win, func): - win.Connect(-1, -1, wxEVT_MIDDLE_UP, func) - -def EVT_RIGHT_DOWN(win, func): - win.Connect(-1, -1, wxEVT_RIGHT_DOWN, func) - -def EVT_RIGHT_UP(win, func): - win.Connect(-1, -1, wxEVT_RIGHT_UP, func) - -def EVT_MOTION(win, func): - win.Connect(-1, -1, wxEVT_MOTION, func) - -def EVT_LEFT_DCLICK(win, func): - win.Connect(-1, -1, wxEVT_LEFT_DCLICK, func) - -def EVT_MIDDLE_DCLICK(win, func): - win.Connect(-1, -1, wxEVT_MIDDLE_DCLICK, func) - -def EVT_RIGHT_DCLICK(win, func): - win.Connect(-1, -1, wxEVT_RIGHT_DCLICK, func) - -def EVT_LEAVE_WINDOW(win, func): - win.Connect(-1, -1, wxEVT_LEAVE_WINDOW, func) - -def EVT_ENTER_WINDOW(win, func): - win.Connect(-1, -1, wxEVT_ENTER_WINDOW, func) - - -# all mouse events -def EVT_MOUSE_EVENTS(win, func): - win.Connect(-1, -1, wxEVT_LEFT_DOWN, func) - win.Connect(-1, -1, wxEVT_LEFT_UP, func) - win.Connect(-1, -1, wxEVT_MIDDLE_DOWN, func) - win.Connect(-1, -1, wxEVT_MIDDLE_UP, func) - win.Connect(-1, -1, wxEVT_RIGHT_DOWN, func) - win.Connect(-1, -1, wxEVT_RIGHT_UP, func) - win.Connect(-1, -1, wxEVT_MOTION, func) - win.Connect(-1, -1, wxEVT_LEFT_DCLICK, func) - win.Connect(-1, -1, wxEVT_MIDDLE_DCLICK, func) - win.Connect(-1, -1, wxEVT_RIGHT_DCLICK, func) - win.Connect(-1, -1, wxEVT_LEAVE_WINDOW, func) - win.Connect(-1, -1, wxEVT_ENTER_WINDOW, func) - -# EVT_COMMAND -def EVT_COMMAND(win, id, cmd, func): - win.Connect(id, -1, cmd, func) - -def EVT_COMMAND_RANGE(win, id1, id2, cmd, func): - win.Connect(id1, id2, cmd, func) - -# Scrolling -def EVT_SCROLL(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_TOP, func) - win.Connect(-1, -1, wxEVT_SCROLL_BOTTOM, func) - win.Connect(-1, -1, wxEVT_SCROLL_LINEUP, func) - win.Connect(-1, -1, wxEVT_SCROLL_LINEDOWN, func) - win.Connect(-1, -1, wxEVT_SCROLL_PAGEUP, func) - win.Connect(-1, -1, wxEVT_SCROLL_PAGEDOWN, func) - win.Connect(-1, -1, wxEVT_SCROLL_THUMBTRACK,func) - -def EVT_SCROLL_TOP(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_TOP, func) - -def EVT_SCROLL_BOTTOM(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_BOTTOM, func) - -def EVT_SCROLL_LINEUP(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_LINEUP, func) - -def EVT_SCROLL_LINEDOWN(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_LINEDOWN, func) - -def EVT_SCROLL_PAGEUP(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_PAGEUP, func) - -def EVT_SCROLL_PAGEDOWN(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_PAGEDOWN, func) - -def EVT_SCROLL_THUMBTRACK(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_THUMBTRACK, func) - - - -# Scrolling, with an id -def EVT_COMMAND_SCROLL(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_TOP, func) - win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func) - win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) - win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func) - win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func) - win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func) - win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func) - -def EVT_COMMAND_SCROLL_TOP(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_TOP, func) - -def EVT_COMMAND_SCROLL_BOTTOM(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func) - -def EVT_COMMAND_SCROLL_LINEUP(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) - -def EVT_COMMAND_SCROLL_LINEDOWN(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func) - -def EVT_COMMAND_SCROLL_PAGEUP(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func) - -def EVT_COMMAND_SCROLL_PAGEDOWN(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func) - -def EVT_COMMAND_SCROLL_THUMBTRACK(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK, func) - - -# Convenience commands -def EVT_BUTTON(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_BUTTON_CLICKED, func) - -def EVT_CHECKBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_CHECKBOX_CLICKED, func) - -def EVT_CHOICE(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_CHOICE_SELECTED, func) - -def EVT_LISTBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LISTBOX_SELECTED, func) - -def EVT_LISTBOX_DCLICK(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, func) - -def EVT_TEXT(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TEXT_UPDATED, func) - -def EVT_TEXT_ENTER(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TEXT_ENTER, func) - -def EVT_MENU(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_MENU_SELECTED, func) - -def EVT_MENU_RANGE(win, id1, id2, func): - win.Connect(id1, id2, wxEVT_COMMAND_MENU_SELECTED, func) - -def EVT_SLIDER(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_SLIDER_UPDATED, func) - -def EVT_RADIOBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_RADIOBOX_SELECTED, func) - -def EVT_RADIOBUTTON(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_RADIOBUTTON_SELECTED, func) - -def EVT_VLBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_VLBOX_SELECTED, func) - -def EVT_COMBOBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_COMBOBOX_SELECTED, func) - -def EVT_TOOL(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TOOL_CLICKED, func) - -def EVT_TOOL_RCLICKED(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TOOL_RCLICKED, func) - -def EVT_TOOL_ENTER(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TOOL_ENTER, func) - -def EVT_CHECKLISTBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, func) - - -# Generic command events - -def EVT_COMMAND_LEFT_CLICK(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LEFT_CLICK, func) - -def EVT_COMMAND_LEFT_DCLICK(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LEFT_DCLICK, func) - -def EVT_COMMAND_RIGHT_CLICK(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_RIGHT_CLICK, func) - -def EVT_COMMAND_RIGHT_DCLICK(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_RIGHT_DCLICK, func) - -def EVT_COMMAND_SET_FOCUS(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_SET_FOCUS, func) - -def EVT_COMMAND_KILL_FOCUS(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_KILL_FOCUS, func) - -def EVT_COMMAND_ENTER(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_ENTER, func) - - - -def EVT_NOTEBOOK_PAGE_CHANGED(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, func) - -def EVT_NOTEBOOK_PAGE_CHANGING(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, func) - - - -#---------------------------------------------------------------------- -#---------------------------------------------------------------------- -# We need to add to the shadow classes a bit to facilitate callbacks via -# virtual functions. These classes replace the shadows generated by SWIG. - -class wxWindow(wxWindowPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxWindow,(arg0.this,arg1,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - - -class wxFrame(wxFramePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxFrame,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdFrameCallbacks(self) - - -if wxPlatform == '__WXMSW__': - class wxMiniFrame(wxMiniFramePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxMiniFrame,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdFrameCallbacks(self) - - -class wxPanel(wxPanelPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxPanel,(arg0.this,arg1,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - - -class wxDialog(wxDialogPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxDialog,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - _checkForCallback(self, "OnOk", wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK) - _checkForCallback(self, "OnApply", wxEVT_COMMAND_BUTTON_CLICKED, wxID_APPLY) - _checkForCallback(self, "OnCancel", wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL) - _checkForCallback(self, "OnCloseWindow", wxEVT_CLOSE_WINDOW) - _checkForCallback(self, "OnCharHook", wxEVT_CHAR_HOOK) - - -class wxScrolledWindow(wxScrolledWindowPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(windowsc.new_wxScrolledWindow,(arg0.this,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - _StdOnScrollCallback(self) - - - -class wxMDIParentFrame(wxMDIParentFramePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(mdic.new_wxMDIParentFrame,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdFrameCallbacks(self) - - -class wxMDIChildFrame(wxMDIChildFramePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(mdic.new_wxMDIChildFrame,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdFrameCallbacks(self) - - -class wxMDIClientWindow(wxMDIClientWindowPtr): - def __init__(self,arg0,*args) : - self.this = apply(mdic.new_wxMDIClientWindow,(arg0.this,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - _StdOnScrollCallback(self) - - - -class wxControl(wxControlPtr): - def __init__(self,this): - self.this = this - _StdWindowCallbacks(self) - -class wxButton(wxButtonPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxButton,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxBitmapButton(wxBitmapButtonPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxBitmapButton,(arg0.this,arg1,arg2.this,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxCheckBox(wxCheckBoxPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxCheckBox,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - - - -class wxChoice(wxChoicePtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxChoice,(arg0.this,arg1,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxComboBox(wxComboBoxPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxComboBox,(arg0.this,arg1,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxGauge(wxGaugePtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxGauge,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxStaticBox(wxStaticBoxPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxStaticBox,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxStaticText(wxStaticTextPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxStaticText,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxListBox(wxListBoxPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxListBox,(arg0.this,arg1,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxTextCtrl(wxTextCtrlPtr): - def __init__(self,arg0,arg1,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxTextCtrl,(arg0.this,arg1,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxScrollBar(wxScrollBarPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxScrollBar,(arg0.this,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -if wxPlatform == '__WXMSW__': - class wxSpinButton(wxSpinButtonPtr): - def __init__(self,arg0,*args) : - argl = map(None,args) - try: argl[1] = argl[1].this - except: pass - try: argl[2] = argl[2].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxSpinButton,(arg0.this,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxStaticBitmap(wxStaticBitmapPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxStaticBitmap,(arg0.this,arg1,arg2.this,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxRadioBox(wxRadioBoxPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxRadioBox,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxRadioButton(wxRadioButtonPtr): - def __init__(self,arg0,arg1,arg2,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxRadioButton,(arg0.this,arg1,arg2,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - -class wxSlider(wxSliderPtr): - def __init__(self,arg0,arg1,arg2,arg3,arg4,*args) : - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - try: argl[1] = argl[1].this - except: pass - args = tuple(argl) - self.this = apply(controlsc.new_wxSlider,(arg0.this,arg1,arg2,arg3,arg4,)+args) - self.thisown = 1 - _StdWindowCallbacks(self) - - - - - - -class wxTimer(wxPyTimer): - def __init__(self): - wxPyTimer.__init__(self, self.Notify) # derived class must provide - # Notify(self) method. - -#---------------------------------------------------------------------- -# Some wxWin methods can take "NULL" as parameters, but the shadow classes -# expect an object with the SWIG pointer as a 'this' member. This class -# and instance fools the shadow into passing the NULL pointer. - -class NullObj: - this = 'NULL' # SWIG converts this to (void*)0 - -NULL = NullObj() - - -#---------------------------------------------------------------------- -# aliases - -wxColor = wxColour -wxNamedColor = wxNamedColour - -wxPyDefaultPosition.Set(-1,-1) -wxPyDefaultSize.Set(-1,-1) - -#---------------------------------------------------------------------- - -## class wxPyStdOutWindow(wxFrame): -## def __init__(self, title = "wxPython: stdout/stderr"): -## wxFrame.__init__(self, NULL, title) -## self.title = title -## self.text = wxTextWindow(self) -## self.text.SetFont(wxFont(10, wxMODERN, wxNORMAL, wxBOLD)) -## self.SetSize(-1,-1,400,200) -## self.Show(false) -## self.isShown = false - -## def write(self, str): # with this method, -## if not self.isShown: -## self.Show(true) -## self.isShown = true -## self.text.WriteText(str) - -## def OnCloseWindow(self, event): # doesn't allow the window to close, just hides it -## self.Show(false) -## self.isShown = false - - -_defRedirect = (wxPlatform == '__WXMSW__') - -#---------------------------------------------------------------------- -# The main application class. Derive from this and implement an OnInit -# method that creates a frame and then calls self.SetTopWindow(frame) - -class wxApp(wxPyApp): - error = 'wxApp.error' - - def __init__(self, redirect=_defRedirect, filename=None): - wxPyApp.__init__(self) - self.stdioWin = None - self.saveStdio = (sys.stdout, sys.stderr) - if redirect: - self.RedirectStdio(filename) - - # this initializes wxWindows and then calls our OnInit - _wxStart(self.OnInit) - - - def __del__(self): - try: - self.RestoreStdio() - except: - pass - - def RedirectStdio(self, filename): - if filename: - sys.stdout = sys.stderr = open(filename, 'a') - else: - raise self.error, 'wxPyStdOutWindow not yet implemented.' - #self.stdioWin = sys.stdout = sys.stderr = wxPyStdOutWindow() - - def RestoreStdio(self): - sys.stdout, sys.stderr = self.saveStdio - if self.stdioWin != None: - self.stdioWin.Show(false) - self.stdioWin.Destroy() - self.stdioWin = None - - -#---------------------------------------------------------------------------- -# -# $Log$ -# Revision 1.1 1998/08/18 21:52:31 RD -# MSW version of the SWIG-generated files -# -# Revision 1.2 1998/08/18 19:48:12 RD -# more wxGTK compatibility things. -# -# It builds now but there are serious runtime problems... -# -# Revision 1.1 1998/08/09 08:25:49 RD -# Initial version -# -# - diff --git a/utils/wxPython/src/my_typemaps.i b/utils/wxPython/src/my_typemaps.i deleted file mode 100644 index 4cf6c9f5d0..0000000000 --- a/utils/wxPython/src/my_typemaps.i +++ /dev/null @@ -1,198 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: my_typemaps.i -// Purpose: Special typemaps specifically for wxPython. -// -// Author: Robin Dunn -// -// Created: 7/3/97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 by Total Control Software -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - - -//---------------------------------------------------------------------- -// Here are some to map (int LCOUNT, int* LIST), etc. from a python list - -%{ - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - -%} - -//---------------------------------------------------------------------- - -%typemap(python,build) int LCOUNT { - $target = PyList_Size(_in_LIST); -} - - - -%typemap(python,in) int* LIST { - $target = int_LIST_helper($source); - if ($target == NULL) { - return NULL; - } -} -%typemap(python,freearg) int* LIST { - delete [] $source; -} - - -%typemap(python,in) long* LIST { - $target = long_LIST_helper($source); - if ($target == NULL) { - return NULL; - } -} -%typemap(python,freearg) long* LIST { - delete [] $source; -} - - -%typemap(python,in) unsigned long* LIST { - $target = (unsigned long*)long_LIST_helper($source); - if ($target == NULL) { - return NULL; - } -} -%typemap(python,freearg) unsigned long* LIST { - delete [] $source; -} - - - -%typemap(python,in) wxDash* LIST = unsigned long* LIST; -%typemap(python,freearg) wxDash* LIST = unsigned long* LIST; - - -%typemap(python,in) char** LIST { - $target = string_LIST_helper($source); - if ($target == NULL) { - return NULL; - } -} -%typemap(python,freearg) char** LIST { - delete [] $source; -} - - - -%typemap(python,in) wxPoint* LIST { - $target = wxPoint_LIST_helper($source); - if ($target == NULL) { - return NULL; - } -} -%typemap(python,freearg) wxPoint* LIST { - delete [] $source; -} - -%typemap(python,in) wxBitmap** LIST { - $target = wxBitmap_LIST_helper($source); - if ($target == NULL) { - return NULL; - } -} -%typemap(python,freearg) wxBitmap** LIST { - delete [] $source; -} - -%typemap(python,in) wxString* LIST { - $target = wxString_LIST_helper($source); - if ($target == NULL) { - return NULL; - } -} -%typemap(python,freearg) wxString* LIST { - delete [] $source; -} - -%typemap(python,in) wxAcceleratorEntry* LIST { - $target = wxAcceleratorEntry_LIST_helper($source); - if ($target == NULL) { - return NULL; - } -} -%typemap(python,freearg) wxAcceleratorEntry* LIST { - delete [] $source; -} - - -//--------------------------------------------------------------------------- - -%{ -static char* wxStringErrorMsg = "string type is required for parameter"; -%} - -%typemap(python, in) wxString& { - if (!PyString_Check($source)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - $target = new wxString(PyString_AsString($source)); -} -%typemap(python, freearg) wxString& { - if ($target) - delete $source; -} - - - -%typemap(python, out) wxString { - $target = PyString_FromString(WXSTRINGCAST *($source)); -} -%typemap(python, ret) wxString { - delete $source; -} - - -%typemap(python, out) wxString* { - $target = PyString_FromString(WXSTRINGCAST (*$source)); -} - - -// -------------------------------------------------------------------- -//--------------------------------------------------------------------------- - - - -// -------------------------------------------------------------------- -// Map T_OUTPUTs for floats to return ints. - - -%typemap(python,ignore) float *T_OUTPUT_TOINT(float temp), - double *T_OUTPUT_TOINT(double temp) -{ - $target = &temp; -} - - -%typemap(python,argout) float *T_OUTPUT_TOINT, - double *T_OUTPUT_TOINT -{ - PyObject *o; - o = PyInt_FromLong((long) (*$source)); - $target = t_output_helper($target, o); -} - -//--------------------------------------------------------------------------- -///////////////////////////////////////////////////////////////////////////// -// -// $Log$ -// Revision 1.2 1998/08/14 23:36:39 RD -// Beginings of wxGTK compatibility -// -// Revision 1.1 1998/08/09 08:25:52 RD -// Initial version -// -// - diff --git a/utils/wxPython/src/qt/dummy b/utils/wxPython/src/qt/dummy deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/utils/wxPython/src/windows.i b/utils/wxPython/src/windows.i deleted file mode 100644 index 4bebc0bdc9..0000000000 --- a/utils/wxPython/src/windows.i +++ /dev/null @@ -1,406 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: windows.i -// Purpose: SWIG definitions of various window classes -// -// Author: Robin Dunn -// -// Created: 6/24/97 -// RCS-ID: $Id$ -// Copyright: (c) 1998 by Total Control Software -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - - -%module windows - -%{ -#include "helpers.h" - -#ifdef __WXMSW__ - // wxGTK defines wxMenuItem inside menu.h -#include -#endif - -#ifdef __WXMSW__ -#include -#endif -%} - -//---------------------------------------------------------------------- - -%include typemaps.i -%include my_typemaps.i - -// Import some definitions of other classes, etc. -%import _defs.i -%import misc.i -%import gdi.i - - -//--------------------------------------------------------------------------- - -class wxEvtHandler { -public: - %addmethods { - void Connect( int id, int lastId, int eventType, PyObject* func) { - if (PyCallable_Check(func)) { - self->Connect(id, lastId, eventType, - (wxObjectEventFunction) &wxPyCallback::EventThunker, - new wxPyCallback(func)); - } - } - } -}; - - -//---------------------------------------------------------------------- - - -class wxWindow : public wxEvtHandler { -public: - - wxWindow(wxWindow* parent, const wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = 0, - char* name = "panel"); - - - void CaptureMouse(); - void Center(int direction = wxHORIZONTAL); - void Centre(int direction = wxHORIZONTAL); - void ClientToScreen(int *BOTH, int *BOTH); - bool Close(int force = FALSE); - bool Destroy(); - void DestroyChildren(); -#ifdef __WXMSW__ - void DragAcceptFiles(bool accept); -#endif - void Enable(bool enable); - //bool FakePopupMenu(wxMenu* menu, int x, int y); - %name(FindWindowByID) wxWindow* FindWindow(long id); - %name(FindWindowByName) wxWindow* FindWindow(const wxString& name); - void Fit(); - wxColour GetBackgroundColour(); - int GetCharHeight(); - int GetCharWidth(); - void GetClientSize(int *OUTPUT, int *OUTPUT); - wxLayoutConstraints * GetConstraints(); -#ifdef __WXMSW__ - wxButton* GetDefaultItem(); -#endif - //wxEvtHandler* GetEventHandler(); - wxFont* GetFont(); - wxColour GetForegroundColour(); - wxWindow * GetGrandParent(); - int GetId(); - void GetPosition(int *OUTPUT, int *OUTPUT); - wxString GetLabel(); - wxString GetName(); - wxWindow * GetParent(); - int GetReturnCode(); - int GetScrollThumb(int orientation); - int GetScrollPos(int orientation); - int GetScrollRange(int orientation); - void GetSize(int *OUTPUT, int *OUTPUT); - void GetTextExtent(const wxString& string, int *OUTPUT, int *OUTPUT); // int* descent = NULL, int* externalLeading = NULL, const wxFont* font = NULL, bool use16 = FALSE) - wxString GetTitle(); - long GetWindowStyleFlag(); - void InitDialog(); - bool IsEnabled(); - bool IsRetained(); - bool IsShown(); - void Layout(); - bool LoadFromResource(wxWindow* parent, const wxString& resourceName, const wxResourceTable* resourceTable = NULL); - void Lower(); - void MakeModal(bool flag); - void Move(int x, int y); - - //wxEvtHandler* PopEventHandler(bool deleteHandler = FALSE); - bool PopupMenu(wxMenu *menu, int x, int y); - //void PushEventHandler(wxEvtHandler* handler); - - void Raise(); - void Refresh(bool eraseBackground = TRUE, const wxRect* rect = NULL); - void ReleaseMouse(); - void ScreenToClient(int *BOTH, int *BOTH); - void ScrollWindow(int dx, int dy, const wxRect* rect = NULL); - void SetAutoLayout(bool autoLayout); - void SetBackgroundColour(const wxColour& colour); - void SetConstraints(wxLayoutConstraints *constraints); - void SetDoubleClick(bool allowDoubleClick); - void SetFocus(); - void SetFont(const wxFont& font); - void SetForegroundColour(const wxColour& colour); - void SetId(int id); - void SetName(const wxString& name); - void SetReturnCode(int retCode); - void SetScrollbar(int orientation, int position, int thumbSize, int range, bool refresh = TRUE); - void SetScrollPos(int orientation, int pos, bool refresh = TRUE); - - //void SetSize(int x, int y, int width, int height, int sizeFlags=wxSIZE_AUTO); - //%name(SetSizeOnly) void SetSize(int width, int height); - - %name(SetDimensions) void SetSize(int x, int y, int width, int height, int sizeFlags=wxSIZE_AUTO); - %addmethods { - void SetSize(const wxSize& size) { - self->SetSize(size.x, size.y); - } - - void SetPosition(const wxPoint& pos) { - self->SetSize(pos.x, pos.y, -1, -1); - } - } - - void SetSizeHints(int minW=-1, int minH=-1, int maxW=-1, int maxH=-1, int incW=-1, int incH=-1); - void SetClientSize(int width, int height); - //void SetPalette(wxPalette* palette); - //void SetColourMap(wxColourMap *colourMap); - void SetCursor(const wxCursor&cursor); - //void SetEventHandler(wxEvtHandler* handler); - void SetTitle(const wxString& title); - bool Show(bool show); - bool TransferDataFromWindow(); - bool TransferDataToWindow(); - bool Validate(); -#ifdef __WXMSW__ - void WarpPointer(int x, int y); -#endif - -}; - - -// Static method(s) -#ifdef __WXMSW__ -%inline %{ - wxWindow* wxWindow_FindFocus() { - return wxWindow::FindFocus(); - } -%} -#endif - -//---------------------------------------------------------------------- - -class wxFrame : public wxWindow { -public: - wxFrame(wxWindow* parent, const wxWindowID id, const wxString& title, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, - char* name = "frame"); - - void Centre(int direction = wxBOTH); -#ifdef __WXMSW__ - void Command(int id); -#endif - bool CreateStatusBar(int number = 1); - wxMenuBar* GetMenuBar(); - wxStatusBar* GetStatusBar(); - wxString GetTitle(); - void Iconize(bool iconize); - bool IsIconized(); - void Maximize(bool maximize); -#ifdef __WXMSW__ - void SetAcceleratorTable(const wxAcceleratorTable& accel); -#endif - void SetIcon(const wxIcon& icon); - void SetMenuBar(wxMenuBar* menuBar); - void SetStatusText(const wxString& text, int number = 0); - void SetStatusWidths(int LCOUNT, int* LIST); // use typemap - void SetTitle(const wxString& title); - -}; - -//--------------------------------------------------------------------------- - -#ifdef __WXMSW__ -class wxMiniFrame : public wxFrame { -public: - wxMiniFrame(wxWindow* parent, const wxWindowID id, const wxString& title, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, - char* name = "frame"); -}; -#endif - -//--------------------------------------------------------------------------- - -class wxPanel : public wxWindow { -public: - wxPanel(wxWindow* parent, - const wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = wxTAB_TRAVERSAL, - const char* name = "panel"); - - void InitDialog(); -}; - -//--------------------------------------------------------------------------- - -class wxDialog : public wxPanel { -public: - wxDialog(wxWindow* parent, - const wxWindowID id, - const wxString& title, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, - const char* name = "dialogBox"); - - void Centre(int direction = wxBOTH); - void EndModal(int retCode); - wxString GetTitle(); - void Iconize(bool iconize); - bool IsIconized(); - void SetModal(bool flag); - bool IsModal(); - void SetTitle(const wxString& title); - bool Show(bool show); - int ShowModal(); -}; - -//--------------------------------------------------------------------------- - -class wxScrolledWindow : public wxWindow { -public: - wxScrolledWindow(wxWindow* parent, - const wxWindowID id = -1, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = wxHSCROLL | wxVSCROLL, - char* name = "scrolledWindow"); - - void EnableScrolling(bool xScrolling, bool yScrolling); - void GetScrollPixelsPerUnit(int* OUTPUT, int* OUTPUT); - void GetVirtualSize(int* OUTPUT, int* OUTPUT); - bool IsRetained(); - void PrepareDC(wxDC& dc); - void Scroll(int x, int y); - void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY, - int noUnitsX, int noUnitsY, - int xPos = 0, int yPos = 0); - void ViewStart(int* OUTPUT, int* OUTPUT); -}; - -//---------------------------------------------------------------------- - - -class wxMenu : public wxEvtHandler { -public: - wxMenu(const wxString& title = wxPyEmptyStr); - - void Append(int id, const wxString& item, - const wxString& helpString = wxPyEmptyStr, - int checkable = FALSE); - %name(AppendMenu)void Append(int id, const wxString& item, wxMenu *subMenu, - const wxString& helpString = wxPyEmptyStr); - void AppendSeparator(); - void Break(); - void Check(int id, bool flag); - void Enable(int id, bool enable); - int FindItem(const wxString& itemString); -#ifdef __WXMSW__ - wxString GetTitle(); - void SetTitle(const wxString& title); -#endif - wxMenuItem* FindItemForId(int id); - wxString GetHelpString(int id); - wxString GetLabel(int id); - void SetHelpString(int id, const wxString& helpString); - bool IsChecked(int id); - bool IsEnabled(int id); - void SetLabel(int id, const wxString& label); -}; - - -// -// This one knows how to set a callback and handle INC- and DECREFing it. To -// be used for PopupMenus, but you must retain a referece to it while using -// it. -// -class wxPyMenu : public wxMenu { -public: - wxPyMenu(const wxString& title = wxPyEmptyStr, PyObject* func = NULL); - ~wxPyMenu(); -}; - -//---------------------------------------------------------------------- - -class wxMenuBar : public wxEvtHandler { -public: - wxMenuBar(); - - void Append(wxMenu *menu, const wxString& title); - void Check(int id, bool flag); - bool Checked(int id); - void Enable(int id, bool enable); - bool Enabled(int id); - int FindMenuItem(const wxString& menuString, const wxString& itemString); -#ifdef __WXGTK__ - %name(FindItemForId) wxMenuItem* FindMenuItemById( int id ); -#endif -#ifdef __WXMSW__ - wxMenuItem * FindItemForId(int id); - void EnableTop(int pos, bool enable); - wxString GetHelpString(int id); - wxString GetLabel(int id); - void SetHelpString(int id, const wxString& helpString); - void SetLabel(int id, const wxString& label); - wxString GetLabelTop(int pos); - void SetLabelTop(int pos, const wxString& label); -#endif - int GetMenuCount(); - wxMenu* GetMenu(int i); -}; - - -//---------------------------------------------------------------------- - -class wxMenuItem { -public: - bool IsSeparator(); - bool IsEnabled(); - bool IsChecked(); - bool IsCheckable(); - int GetId(); - wxMenu* GetSubMenu(); -#ifdef __WXMSW__ - void SetName(const wxString& strName); - void DeleteSubMenu(); - const wxString& GetName(); -#endif - const wxString& GetHelp(); - void SetHelp(const wxString& strHelp); - void Enable(bool bDoEnable = TRUE); - void Check(bool bDoCheck = TRUE); -}; - -//--------------------------------------------------------------------------- -///////////////////////////////////////////////////////////////////////////// -// -// $Log$ -// Revision 1.5 1998/08/17 18:29:40 RD -// Removed an extra method definition -// -// Revision 1.4 1998/08/16 04:31:11 RD -// More wxGTK work. -// -// Revision 1.3 1998/08/15 07:36:47 RD -// - Moved the header in the .i files out of the code that gets put into -// the .cpp files. It caused CVS conflicts because of the RCS ID being -// different each time. -// -// - A few minor fixes. -// -// Revision 1.2 1998/08/14 23:36:46 RD -// Beginings of wxGTK compatibility -// -// Revision 1.1 1998/08/09 08:25:52 RD -// Initial version -// -// - - diff --git a/utils/wxPython/src/windows2.i b/utils/wxPython/src/windows2.i deleted file mode 100644 index fa978be58a..0000000000 --- a/utils/wxPython/src/windows2.i +++ /dev/null @@ -1,242 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: windows2.i -// Purpose: SWIG definitions of MORE window classes -// -// Author: Robin Dunn -// -// Created: 6/2/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 by Total Control Software -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -%module windows2 - -%{ -#include "helpers.h" -#include -#include -%} - -//---------------------------------------------------------------------- - -%include typemaps.i -%include my_typemaps.i - -// Import some definitions of other classes, etc. -%import _defs.i -%import misc.i -%import gdi.i -%import windows.i -%import controls.i -%import events.i - -//--------------------------------------------------------------------------- - -enum { - wxGRID_TEXT_CTRL, - wxGRID_HSCROLL, - wxGRID_VSCROLL, -}; - - - -class wxGridCell { -public: - wxString& GetTextValue(); - void SetTextValue(const wxString& str); - wxFont *GetFont(); - void SetFont(wxFont *f); - wxColour& GetTextColour(); - void SetTextColour(const wxColour& colour); - wxColour& GetBackgroundColour(); - void SetBackgroundColour(const wxColour& colour); - wxBrush *GetBackgroundBrush(); - int GetAlignment(); - void SetAlignment(int align); - wxBitmap *GetCellBitmap(); - void SetCellBitmap(wxBitmap *bitmap); -}; - - - - - -class wxGrid : public wxPanel { -public: - wxGrid(wxWindow* parent, wxWindowID id, - const wxPoint& pos=wxPyDefaultPosition, - const wxSize& size=wxPyDefaultSize, - long style=0, - char* name="grid"); - - void AdjustScrollbars(); - bool AppendCols(int n=1, bool updateLabels=TRUE); - bool AppendRows(int n=1, bool updateLabels=TRUE); - void BeginBatch(); - bool CellHitTest(int x, int y, int *OUTPUT, int *OUTPUT); - - %addmethods { - // TODO: For now we are just ignoring the initial cellValues - // and widths. Add support for loading them from - // Python sequence objects. - bool CreateGrid(int rows, int cols, - //PyObject* cellValues = NULL, - //PyObject* widths = NULL, - short defaultWidth = wxGRID_DEFAULT_CELL_WIDTH, - short defaultHeight = wxGRID_DEFAULT_CELL_HEIGHT) { - return self->CreateGrid(rows, cols, NULL, NULL, - defaultWidth, defaultHeight); - } - } - - bool CurrentCellVisible(); - bool DeleteCols(int pos=0, int n=1, bool updateLabels=TRUE); - bool DeleteRows(int pos=0, int n=1, bool updateLabels=TRUE); - void EndBatch(); - - int GetBatchCount(); - wxGridCell* GetCell(int row, int col); - int GetCellAlignment(int row, int col); - %name(GetDefCellAlignment)int GetCellAlignment(); - wxColour& GetCellBackgroundColour(int row, int col); - %name(GetDefCellBackgroundColour) - wxColour& GetCellBackgroundColour(); - //wxGridCell *** GetCells(); - wxColour& GetCellTextColour(int row, int col); - %name(GetDefCellTextColour)wxColour& GetCellTextColour(); - wxFont* GetCellTextFont(int row, int col); - %name(GetDefCellTextFont)wxFont* GetCellTextFont(); - wxString& GetCellValue(int row, int col); - int GetCols(); - int GetColumnWidth(int col); - wxRect& GetCurrentRect(); - int GetCursorColumn(); - int GetCursorRow(); - bool GetEditable(); - wxScrollBar * GetHorizScrollBar(); - int GetLabelAlignment(int orientation); - wxColour& GetLabelBackgroundColour(); - int GetLabelSize(int orientation); - wxColour& GetLabelTextColour(); - wxFont* GetLabelTextFont(); - wxString& GetLabelValue(int orientation, int pos); - int GetRowHeight(int row); - int GetRows(); - int GetScrollPosX(); - int GetScrollPosY(); - wxTextCtrl* GetTextItem(); - wxScrollBar* GetVertScrollBar(); - - bool InsertCols(int pos=0, int n=1, bool updateLabels=TRUE); - bool InsertRows(int pos=0, int n=1, bool updateLabels=TRUE); - - // TODO: How to handle callbacks that don't come from - // event system??? - // - //void OnActivate(bool active); - //void OnChangeLabels(); - //void OnChangeSelectionLabel(); - //wxGridCell* OnCreateCell(); - //void OnLeftClick(int row, int col, int x, int y, bool control, bool shift); - //void OnRightClick(int row, int col, int x, int y, bool control, bool shift); - //void OnLabelLeftClick(int row, int col, int x, int y, bool control, bool shift); - //void OnLabelRightClick(int row, int col, int x, int y, bool control, bool shift); - //void OnSelectCell(int row, int col); - //void OnSelectCellImplementation(wxDC *dc, int row, int col); - - void SetCellAlignment(int alignment, int row, int col); - %name(SetDefCellAlignment)void SetCellAlignment(int alignment); - void SetCellBackgroundColour(const wxColour& colour, int row, int col); - %name(SetDefCellBackgroundColour) - void SetCellBackgroundColour(const wxColour& colour); - void SetCellTextColour(const wxColour& colour, int row, int col); - %name(SetDefCellTextColour)void SetCellTextColour(const wxColour& colour); - void SetCellTextFont(wxFont *font, int row, int col); - %name(SetDefCellTextFont)void SetCellTextFont(wxFont *font); - void SetCellValue(const wxString& val, int row, int col); - void SetColumnWidth(int col, int width); - void SetDividerPen(wxPen *pen); - void SetEditable(bool editable); - void SetGridCursor(int row, int col); - void SetLabelAlignment(int orientation, int alignment); - void SetLabelBackgroundColour(const wxColour& value); - void SetLabelSize(int orientation, int size); - void SetLabelTextColour(const wxColour& value); - void SetLabelTextFont(wxFont *font); - void SetLabelValue(int orientation, const wxString& value, int pos); - void SetRowHeight(int row, int height); - - void UpdateDimensions(); -}; - -//--------------------------------------------------------------------------- - -class wxNotebookEvent : public wxCommandEvent { -public: - int GetSelection(); - int GetOldSelection(); -}; - - - -class wxNotebook : public wxControl { -public: - wxNotebook(wxWindow *parent, - wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = 0, - char* name = "notebook"); - - int GetPageCount(); - int SetSelection(int nPage); - void AdvanceSelection(bool bForward = TRUE); - int GetSelection(); - bool SetPageText(int nPage, const wxString& strText); - wxString GetPageText(int nPage) const; - void SetImageList(wxImageList* imageList); - wxImageList* GetImageList(); - int GetPageImage(int nPage); - bool SetPageImage(int nPage, int nImage); - int GetRowCount(); - - // LINK ERROR: void SetPageSize(const wxSize& size); - // LINK ERROR: void SetPadding(const wxSize& padding); - bool DeletePage(int nPage); - bool DeleteAllPages(); - bool AddPage(/*wxNotebookPage*/ wxWindow *pPage, - const wxString& strText, - bool bSelect = FALSE, - int imageId = -1); -#ifdef __WXMSW__ - bool InsertPage(int nPage, - /*wxNotebookPage*/ wxWindow *pPage, - const wxString& strText, - bool bSelect = FALSE, - int imageId = -1); -#endif - wxNotebookPage *GetPage(int nPage); - -}; - -//--------------------------------------------------------------------------- -///////////////////////////////////////////////////////////////////////////// -// -// $Log$ -// Revision 1.3 1998/08/18 19:48:20 RD -// more wxGTK compatibility things. -// -// It builds now but there are serious runtime problems... -// -// Revision 1.2 1998/08/15 07:36:50 RD -// - Moved the header in the .i files out of the code that gets put into -// the .cpp files. It caused CVS conflicts because of the RCS ID being -// different each time. -// -// - A few minor fixes. -// -// Revision 1.1 1998/08/09 08:25:52 RD -// Initial version -// -// diff --git a/utils/wxPython/src/wxp.i b/utils/wxPython/src/wxp.i deleted file mode 100644 index b997b0c89b..0000000000 --- a/utils/wxPython/src/wxp.i +++ /dev/null @@ -1,170 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: wxp.i -// Purpose: SWIG interface file for a python wxWindows module -// -// Author: Robin Dunn -// -// Created: 5/22/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 by Total Control Software -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -%module wxp - - -%{ -#include "helpers.h" -%} - -//---------------------------------------------------------------------- -// This is where we include the other wrapper definition files for SWIG -//---------------------------------------------------------------------- - -%include typemaps.i -%include my_typemaps.i -%include _defs.i - -%import misc.i -%import windows.i -%import events.i -%import gdi.i -%import mdi.i -%import controls.i -%import controls2.i -%import windows2.i -%import cmndlgs.i - - - -%native(_wxStart) __wxStart; -%native(_wxSetDictionary) __wxSetDictionary; - -//--------------------------------------------------------------------------- - -#define __version__ "0.3.1" - -wxPoint wxPyDefaultPosition; -wxSize wxPyDefaultSize; - -//--------------------------------------------------------------------------- -//--------------------------------------------------------------------------- - -class wxPyApp : public wxEvtHandler { -public: - %addmethods { - wxPyApp() { - wxPythonApp = new wxPyApp(); - return wxPythonApp; - } - } - - - wxString GetAppName(); -#ifdef __WXMSW__ - bool GetAuto3D(); -#endif - wxString GetClassName(); - bool GetExitOnFrameDelete(); - int GetPrintMode(); - wxWindow * GetTopWindow(); - wxString GetVendorName(); - - void Dispatch(); - void ExitMainLoop(); - bool Initialized(); - int MainLoop(); - bool Pending(); - - void SetAppName(const wxString& name); -#ifdef __WXMSW__ - void SetAuto3D(bool auto3D); -#endif - void SetClassName(const wxString& name); - void SetExitOnFrameDelete(bool flag); - void SetPrintMode(int mode); - void SetTopWindow(wxWindow* window); - void SetVendorName(const wxString& name); - - // This one is wxPython specific. If you override MainLoop, - // call this when done. - void AfterMainLoop(); -}; - - - -//---------------------------------------------------------------------- -// This code gets added to the module initialization function -//---------------------------------------------------------------------- - -%{ -extern "C" SWIGEXPORT(void,initwindowsc)(); -extern "C" SWIGEXPORT(void,initwindows2c)(); -extern "C" SWIGEXPORT(void,initeventsc)(); -extern "C" SWIGEXPORT(void,initmiscc)(); -extern "C" SWIGEXPORT(void,initgdic)(); -extern "C" SWIGEXPORT(void,initmdic)(); -extern "C" SWIGEXPORT(void,initcontrolsc)(); -extern "C" SWIGEXPORT(void,initcontrols2c)(); -extern "C" SWIGEXPORT(void,initcmndlgsc)(); - -%} - -%init %{ - - __wxPreStart(); // initialize the GUI toolkit, if needed. - -// wxPyWindows = new wxHashTable(wxKEY_INTEGER, 100); - - // Since these modules are all linked together, initialize them now - // because python won't be able to find their shared library files, - // (since there isn't any.) - initwindowsc(); - initwindows2c(); - initeventsc(); - initmiscc(); - initgdic(); - initmdic(); - initcontrolsc(); - initcontrols2c(); - initcmndlgsc(); -%} - -//---------------------------------------------------------------------- -// And this gets appended to the shadow class file. -//---------------------------------------------------------------------- - -%pragma(python) include="_extras.py"; - - -///////////////////////////////////////////////////////////////////////////// -// -// $Log$ -// Revision 1.6 1998/08/27 21:59:10 RD -// Some chicken-and-egg problems solved for wxPython on wxGTK -// -// Revision 1.5 1998/08/27 00:00:28 RD -// - more tweaks -// - have discovered some problems but not yet discovered solutions... -// -// Revision 1.4 1998/08/18 19:48:20 RD -// more wxGTK compatibility things. -// -// It builds now but there are serious runtime problems... -// -// Revision 1.3 1998/08/15 07:36:53 RD -// - Moved the header in the .i files out of the code that gets put into -// the .cpp files. It caused CVS conflicts because of the RCS ID being -// different each time. -// -// - A few minor fixes. -// -// Revision 1.2 1998/08/14 23:36:49 RD -// Beginings of wxGTK compatibility -// -// Revision 1.1 1998/08/09 08:25:53 RD -// Initial version -// -// - - diff --git a/utils/wxPython/src/wxp.ico b/utils/wxPython/src/wxp.ico deleted file mode 100644 index 60fc2b318b..0000000000 Binary files a/utils/wxPython/src/wxp.ico and /dev/null differ diff --git a/utils/wxPython/src/wxpc.def b/utils/wxPython/src/wxpc.def deleted file mode 100644 index df5183662f..0000000000 --- a/utils/wxPython/src/wxpc.def +++ /dev/null @@ -1,2 +0,0 @@ -EXPORTS - initwxpc diff --git a/utils/wxPython/src/wxpc.rc b/utils/wxPython/src/wxpc.rc deleted file mode 100644 index 9d6118d5b5..0000000000 --- a/utils/wxPython/src/wxpc.rc +++ /dev/null @@ -1,2 +0,0 @@ -wxpicon ICON "wxp.ico" -#include "wx/msw/wx.rc" diff --git a/utils/wxPython/tests/bitmaps/mondrian.ico b/utils/wxPython/tests/bitmaps/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/utils/wxPython/tests/bitmaps/mondrian.ico and /dev/null differ diff --git a/utils/wxPython/tests/bitmaps/test2.bmp b/utils/wxPython/tests/bitmaps/test2.bmp deleted file mode 100644 index 3a65473212..0000000000 Binary files a/utils/wxPython/tests/bitmaps/test2.bmp and /dev/null differ diff --git a/utils/wxPython/tests/test1.py b/utils/wxPython/tests/test1.py deleted file mode 100644 index d4f3e7ab7e..0000000000 --- a/utils/wxPython/tests/test1.py +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/env python -#---------------------------------------------------------------------------- -# Name: test1.py -# Purpose: A minimal wxPython program -# -# Author: Robin Dunn -# -# Created: -# RCS-ID: $Id$ -# Copyright: (c) 1998 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------------- - - -from wxPython import * - - -#--------------------------------------------------------------------------- - -class MyFrame(wxFrame): - def __init__(self, parent, id, title): - wxFrame.__init__(self, parent, id, title, wxPoint(100, 100), wxSize(160, 100)) - self.Connect(-1, -1, wxEVT_MOVE, self.OnMove) - - def OnCloseWindow(self, event): - self.Destroy() - - def OnSize(self, event): - size = event.GetSize() - print "size:", size.width, size.height - - def OnMove(self, event): - # Hmmm... Doesn't seem to be implmented in wxWin yet... - pos = event.GetPosition() - print "pos:", pos.x, pos.y - - - -#--------------------------------------------------------------------------- - - -class MyApp(wxApp): - def OnInit(self): - frame = MyFrame(NULL, -1, "This is a test") - frame.Show(true) - self.SetTopWindow(frame) - return true - -#--------------------------------------------------------------------------- - - -def main(): - app = MyApp(0) - app.MainLoop() - - -def t(): - import pdb - pdb.run('main()') - -if __name__ == '__main__': - main() - - - -#---------------------------------------------------------------------------- -# -# $Log$ -# Revision 1.1 1998/08/09 08:28:05 RD -# Initial version -# -# diff --git a/utils/wxPython/tests/test2.py b/utils/wxPython/tests/test2.py deleted file mode 100644 index 72810d7e73..0000000000 --- a/utils/wxPython/tests/test2.py +++ /dev/null @@ -1,158 +0,0 @@ -#!/bin/env python -#---------------------------------------------------------------------------- -# Name: test2.py -# Purpose: Testing GDI stuff and events. -# -# Author: Robin Dunn -# -# Created: -# RCS-ID: $Id$ -# Copyright: (c) 1998 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------------- - - -from wxPython import * - - -#--------------------------------------------------------------------------- - - - -class MyCanvas(wxWindow): - def __init__(self, parent): - wxWindow.__init__(self, parent, -1, wxPoint(0, 0), wxPyDefaultSize, wxSUNKEN_BORDER) - - self.Connect(-1, -1, wxEVT_LEFT_DOWN, self.OnLeftButtonEvent) - self.Connect(-1, -1, wxEVT_LEFT_UP, self.OnLeftButtonEvent) - self.Connect(-1, -1, wxEVT_MOTION, self.OnLeftButtonEvent) - - self.SetCursor(wxStockCursor(wxCURSOR_PENCIL)) - bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP) - print 'bmp OK:', bmp.Ok() - print 'bmp: (%dx%dx%d)' % (bmp.GetWidth(), bmp.GetHeight(), bmp.GetDepth()) - self.bmp = bmp - - self.lines = [] - - - - def OnPaint(self, event): - dc = wxPaintDC(self) - self.DoDrawing(dc) - - - - def DoDrawing(self, dc): - dc.BeginDrawing() - #dc.Clear() - pen1 = wxPen(wxNamedColour('RED')) - dc.SetPen(pen1) - dc.DrawRectangle(5, 5, 50, 50) - - dc.SetBrush(wxLIGHT_GREY_BRUSH) - dc.SetPen(wxPen(wxNamedColour('BLUE'), 4)) - dc.DrawRectangle(15, 15, 50, 50) - - font = wxFont(14, wxSWISS, wxNORMAL, wxNORMAL) - dc.SetFont(font) - dc.SetTextForeground(wxColour(0xFF, 0x20, 0xFF)) - te = dc.GetTextExtent("Hello World") - dc.DrawText("Hello World", 60, 65) - - dc.SetPen(wxPen(wxNamedColour('VIOLET'), 4)) - dc.DrawLine(5, 65+te[1], 60+te[0], 65+te[1]) - - lst = [(100,110), (150,110), (150,160), (100,160)] - dc.DrawLines(lst, -60) - dc.SetPen(wxGREY_PEN) - dc.DrawPolygon(lst, 75) - dc.SetPen(wxGREEN_PEN) - dc.DrawSpline(lst+[(100,100)]) - - dc.DrawBitmap(self.bmp, 200, 20) - dc.SetTextForeground(wxColour(0, 0xFF, 0x80)) - dc.DrawText("a bitmap", 200, 80) - - self.DrawSavedLines(dc) - dc.EndDrawing() - - - def DrawSavedLines(self, dc): - dc.SetPen(wxPen(wxNamedColour('MEDIUM FOREST GREEN'), 4)) - for line in self.lines: - for coords in line: - apply(dc.DrawLine, coords) - - - - def OnLeftButtonEvent(self, event): - if event.LeftDown(): - self.x, self.y = event.GetX(), event.GetY() - self.curLine = [] - elif event.Dragging(): - dc = wxClientDC(self) - dc.BeginDrawing() - dc.SetPen(wxPen(wxNamedColour('MEDIUM FOREST GREEN'), 4)) - coords = (self.x, self.y, event.GetX(), event.GetY()) - self.curLine.append(coords) - apply(dc.DrawLine, coords) - self.x, self.y = event.GetX(), event.GetY() - dc.EndDrawing() - elif event.LeftUp(): - self.lines.append(self.curLine) - self.curLine = [] - - - - - -#--------------------------------------------------------------------------- - -class MyFrame(wxFrame): - def __init__(self, parent, id, title): - wxFrame.__init__(self, parent, id, title, wxPyDefaultPosition, wxSize(320, 200)) - self.canvas = MyCanvas(self) - - def OnCloseWindow(self, event): - self.Destroy() - - def OnSize(self, event): - w,h = self.GetClientSize() - #self.canvas.SetSize(5, 5, w-10, h-10) - self.canvas.SetDimensions(0, 0, w, h) - - -#--------------------------------------------------------------------------- - - -class MyApp(wxApp): - def OnInit(self): - frame = MyFrame(NULL, -1, "Test 2") - frame.Show(true) - self.SetTopWindow(frame) - return true - -#--------------------------------------------------------------------------- - - -def main(): - app = MyApp(0) - app.MainLoop() - - -def t(): - import pdb - pdb.run('main()') - -if __name__ == '__main__': - main() - - -#---------------------------------------------------------------------------- -# -# $Log$ -# Revision 1.1 1998/08/09 08:28:05 RD -# Initial version -# -# diff --git a/utils/wxPython/tests/test3.py b/utils/wxPython/tests/test3.py deleted file mode 100644 index 39dba9b3bb..0000000000 --- a/utils/wxPython/tests/test3.py +++ /dev/null @@ -1,152 +0,0 @@ -#!/bin/env python -#---------------------------------------------------------------------------- -# Name: test3.py -# Purpose: Testing menus and status lines -# -# Author: Robin Dunn -# -# Created: -# RCS-ID: $Id$ -# Copyright: (c) 1998 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------------- - - -from wxPython import * - - -#--------------------------------------------------------------------------- - -class MyCanvas(wxWindow): - def OnPaint(self, event): - dc = wxPaintDC(self) - dc.BeginDrawing() - w, h = self.GetClientSize() - font = wxFont(42, wxSWISS, wxNORMAL, wxNORMAL) - dc.SetFont(font) - st = "Python Rules!" - tw,th, d,e = dc.GetTextExtent(st) - dc.DrawText(st, (w-tw)/2, (h-th)/2) - dc.EndDrawing() - -#--------------------------------------------------------------------------- - -if wxPlatform == '__WXMSW__': - class MyMiniFrame(wxMiniFrame): - def __init__(self, parent, ID, title, pos, size, style): - wxMiniFrame.__init__(self, parent, ID, title, pos, size, style) - panel = wxPanel(self, -1) - ID = NewId() - button = wxButton(panel, ID, "Close Me") - button.SetPosition(wxPoint(15, 15)) - self.Connect(ID, -1, wxEVT_COMMAND_BUTTON_CLICKED, self.OnCloseMe) - - def OnCloseMe(self, event): - self.Close(true) - - def OnCloseWindow(self, event): - self.Destroy() - -#--------------------------------------------------------------------------- - -class MyFrame(wxFrame): - def __init__(self, parent, id, title): - wxFrame.__init__(self, parent, id, title, wxPyDefaultPosition, - wxSize(420, 200)) - self.canvas = MyCanvas(self, -1) - self.CreateStatusBar(3) - mainmenu = wxMenuBar() - menu = wxMenu() - menu.Append(100, 'A &Menu Item', 'the help text') - menu.Append(101, '&Another', 'Grok!') - menu.AppendSeparator() - menu.Append(200, 'E&xit', 'Get the heck outta here!') - mainmenu.Append(menu, "&It's a menu!") - self.SetMenuBar(mainmenu) - if wxPlatform == '__WXMSW__': - print menu.GetHelpString(100) - print mainmenu.GetHelpString(101) - print mainmenu.GetHelpString(200) - self.DragAcceptFiles(true) - - self.Connect(-1, -1, wxEVT_COMMAND_MENU_SELECTED, self.OnMenuCommand) - self.Connect(-1, -1, wxEVT_DROP_FILES, self.OnDropFiles) - - - - def OnCloseWindow(self, event): - print 'OnCloseWindow' - self.Destroy() - - - def OnSize(self, event): - w,h = self.GetClientSize() - self.canvas.SetSize(wxSize(w, h)) - self.SetStatusText("hello, this is a test: (%d, %d)" % (w,h)) - -## def OnMenuHighlight(self, event): -## mainmenu = self.GetMenuBar() -## st = mainmenu.GetHelpString(event.GetMenuId()) -## self.SetStatusText('['+st+']', 0) - - def OnMenuCommand(self, event): - # why isn't this a wxMenuEvent??? - print event, event.GetInt() - if event.GetInt() == 200: - self.Close() - elif event.GetInt() == 101: - if wxPlatform == '__WXMSW__': - win = MyMiniFrame(self, -1, "This is a Mini...", - wxPoint(-1, -1), #wxPyDefaultPosition, - wxSize(150, 150), - wxMINIMIZE_BOX | wxMAXIMIZE_BOX | - wxTHICK_FRAME | wxSYSTEM_MENU | - wxTINY_CAPTION_HORIZ) - win.Show(true) - else: - print 'Sorry, can\'t do mini\'s...' - - - - def OnDropFiles(self, event): - fileList = event.GetFiles() - for file in fileList: - print file - - -#--------------------------------------------------------------------------- - - -class MyApp(wxApp): - def OnInit(self): - frame = MyFrame(NULL, -1, "Test 3") - frame.Show(true) - self.SetTopWindow(frame) - return true - -#--------------------------------------------------------------------------- - - -def main(): - app = MyApp(0) - app.MainLoop() - - -def t(): - import pdb - pdb.run('main()') - -if __name__ == '__main__': - main() - - -#---------------------------------------------------------------------------- -# -# $Log$ -# Revision 1.2 1998/08/22 19:51:17 RD -# some tweaks for wxGTK -# -# Revision 1.1 1998/08/09 08:28:05 RD -# Initial version -# -# diff --git a/utils/wxPython/tests/test4.py b/utils/wxPython/tests/test4.py deleted file mode 100644 index 8ea37c3c73..0000000000 --- a/utils/wxPython/tests/test4.py +++ /dev/null @@ -1,556 +0,0 @@ -#!/bin/env python -#---------------------------------------------------------------------------- -# Name: test4.py -# Purpose: Testing lots of stuff, controls, window types, etc. -# -# Author: Robin Dunn -# -# Created: -# RCS-ID: $Id$ -# Copyright: (c) 1998 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------------- - - -from wxPython import * - - -#--------------------------------------------------------------------------- - -class TestSimpleControlsDlg(wxDialog): - def __init__(self, parent, log): - self.log = log - wxDialog.__init__(self, parent, -1, "Test Simple Controls", - wxPyDefaultPosition, wxSize(350, 350)) - - - sampleList = ['zero', 'one', 'two', 'three', 'four', 'five', - 'six', 'seven', 'eight'] - - y_pos = 5 - delta = 25 - - wxStaticText(self, -1, "wxTextCtrl", wxPoint(5, y_pos), wxSize(75, 20)) - wxTextCtrl(self, 10, "", wxPoint(80, y_pos), wxSize(150, 20)) - EVT_TEXT(self, 10, self.EvtText) - y_pos = y_pos + delta - - wxCheckBox(self, 20, "wxCheckBox", wxPoint(80, y_pos), wxSize(150, 20)) - EVT_CHECKBOX(self, 20, self.EvtCheckBox) - y_pos = y_pos + delta - - rb = wxRadioBox(self, 30, "wxRadioBox", wxPoint(80, y_pos), wxPyDefaultSize, - sampleList, 3, wxRA_HORIZONTAL) - EVT_RADIOBOX(self, 30, self.EvtRadioBox) - width, height = rb.GetSize() - y_pos = y_pos + height + 5 - - wxStaticText(self, -1, "wxChoice", wxPoint(5, y_pos), wxSize(75, 20)) - wxChoice(self, 40, wxPoint(80, y_pos), wxSize(95, 20), #wxPyDefaultSize, - sampleList) - EVT_CHOICE(self, 40, self.EvtChoice) - y_pos = y_pos + delta - - wxStaticText(self, -1, "wxComboBox", wxPoint(5, y_pos), wxSize(75, 18)) - wxComboBox(self, 50, "default value", wxPoint(80, y_pos), wxSize(95, 20), - sampleList, wxCB_DROPDOWN) - EVT_COMBOBOX(self, 50, self.EvtComboBox) - y_pos = y_pos + delta - - wxStaticText(self, -1, "wxListBox", wxPoint(5, y_pos), wxSize(75, 18)) - lb = wxListBox(self, 60, wxPoint(80, y_pos), wxPyDefaultSize, - sampleList, wxLB_SINGLE) - EVT_LISTBOX(self, 60, self.EvtListBox) - EVT_LISTBOX_DCLICK(self, 60, self.EvtListBoxDClick) - lb.SetSelection(0) - width, height = lb.GetSize() - y_pos = y_pos + height + 5 - - - - y_pos = y_pos + 15 - wxButton(self, wxID_OK, ' OK ', wxPoint(80, y_pos), wxPyDefaultSize).SetDefault() - wxButton(self, wxID_CANCEL, ' Cancel ', wxPoint(140, y_pos)) - - - def EvtText(self, event): - self.log.WriteText('EvtText: %s\n' % event.GetString()) - - def EvtCheckBox(self, event): - self.log.WriteText('EvtCheckBox: %d\n' % event.GetInt()) - - def EvtRadioBox(self, event): - self.log.WriteText('EvtRadioBox: %d\n' % event.GetInt()) - - def EvtChoice(self, event): - self.log.WriteText('EvtChoice: %s\n' % event.GetString()) - - def EvtComboBox(self, event): - self.log.WriteText('EvtComboBox: %s\n' % event.GetString()) - - def EvtListBox(self, event): - self.log.WriteText('EvtListBox: %s\n' % event.GetString()) - - def EvtListBoxDClick(self, event): - self.log.WriteText('EvtListBoxDClick:\n') - - - -#--------------------------------------------------------------------------- - -class TestTimer(wxTimer): - def __init__(self, log): - wxTimer.__init__(self) - self.log = log - - def Notify(self): - wxBell() - self.log.WriteText('beep!\n') - - -#--------------------------------------------------------------------------- - -class TestLayoutConstraints(wxFrame): - def __init__(self, parent): - wxFrame.__init__(self, parent, -1, 'Test Layout Constraints', - wxPyDefaultPosition, wxSize(500, 300)) - - self.SetAutoLayout(true) - EVT_BUTTON(self, 100, self.OnButton) - - self.panelA = wxWindow(self, -1, wxPyDefaultPosition, wxPyDefaultSize, - wxSIMPLE_BORDER) - self.panelA.SetBackgroundColour(wxBLUE) - lc = wxLayoutConstraints() - lc.top.SameAs(self, wxTop, 10) - lc.left.SameAs(self, wxLeft, 10) - lc.bottom.SameAs(self, wxBottom, 10) - lc.right.PercentOf(self, wxRight, 50) - self.panelA.SetConstraints(lc) - - self.panelB = wxWindow(self, -1, wxPyDefaultPosition, wxPyDefaultSize, - wxSIMPLE_BORDER) - self.panelB.SetBackgroundColour(wxRED) - lc = wxLayoutConstraints() - lc.top.SameAs(self, wxTop, 10) - lc.right.SameAs(self, wxRight, 10) - lc.bottom.PercentOf(self, wxBottom, 30) - lc.left.RightOf(self.panelA, 10) - self.panelB.SetConstraints(lc) - - self.panelC = wxWindow(self, -1, wxPyDefaultPosition, wxPyDefaultSize, - wxSIMPLE_BORDER) - self.panelC.SetBackgroundColour(wxWHITE) - lc = wxLayoutConstraints() - lc.top.Below(self.panelB, 10) - lc.right.SameAs(self, wxRight, 10) - lc.bottom.SameAs(self, wxBottom, 10) - lc.left.RightOf(self.panelA, 10) - self.panelC.SetConstraints(lc) - - b = wxButton(self.panelA, 100, ' Panel A ') - lc = wxLayoutConstraints() - lc.centreX.SameAs (self.panelA, wxCentreX) - lc.centreY.SameAs (self.panelA, wxCentreY) - lc.height.AsIs () - lc.width.PercentOf (self.panelA, wxWidth, 50) - b.SetConstraints(lc); - - b = wxButton(self.panelB, 100, ' Panel B ') - lc = wxLayoutConstraints() - lc.top.SameAs (self.panelB, wxTop, 2) - lc.right.SameAs (self.panelB, wxRight, 4) - lc.height.AsIs () - lc.width.AsIs () - b.SetConstraints(lc); - - self.panelD = wxWindow(self.panelC, -1, wxPyDefaultPosition, wxPyDefaultSize, - wxSIMPLE_BORDER) - self.panelD.SetBackgroundColour(wxGREEN) - wxStaticText(self.panelD, -1, "Panel D", wxPoint(4, 4)).SetBackgroundColour(wxGREEN) - - b = wxButton(self.panelC, 100, ' Panel C ') - lc = wxLayoutConstraints() - lc.top.Below (self.panelD) - lc.left.RightOf (self.panelD) - lc.height.AsIs () - lc.width.AsIs () - b.SetConstraints(lc); - - lc = wxLayoutConstraints() - lc.bottom.PercentOf (self.panelC, wxHeight, 50) - lc.right.PercentOf (self.panelC, wxWidth, 50) - lc.height.SameAs (b, wxHeight) - lc.width.SameAs (b, wxWidth) - self.panelD.SetConstraints(lc); - - - def OnButton(self, event): - self.Close(true) - - - def OnCloseWindow(self, event): - self.Destroy() - - -#--------------------------------------------------------------------------- - -class TestGrid(wxFrame): - def __init__(self, parent): - wxFrame.__init__(self, parent, -1, 'Test Grid', - wxPyDefaultPosition, wxSize(500, 300)) - - grid = wxGrid(self, -1) - - grid.CreateGrid(16, 16) - grid.SetColumnWidth(3, 200) - grid.SetRowHeight(4, 45) - grid.SetCellValue("First cell", 0, 0) - grid.SetCellValue("Another cell", 1, 1) - grid.SetCellValue("Yet another cell", 2, 2) - grid.SetCellTextFont(wxFont(12, wxROMAN, wxITALIC, wxNORMAL), 0, 0) - grid.SetCellTextColour(wxRED, 1, 1) - grid.SetCellBackgroundColour(wxCYAN, 2, 2) - grid.UpdateDimensions() - grid.AdjustScrollbars() - - - def OnCloseWindow(self, event): - self.Destroy() - - -#--------------------------------------------------------------------------- - -class TestNotebookWindow(wxFrame): - def __init__(self, parent): - wxFrame.__init__(self, parent, -1, 'Test wxNotebook', - wxPyDefaultPosition, wxPyDefaultSize) - - nb = wxNotebook(self, -1) - - win = wxWindow(nb, -1, wxPyDefaultPosition, wxPyDefaultSize, wxRAISED_BORDER) - win.SetBackgroundColour(wxBLUE) - nb.AddPage(win, "Blue") - - win = wxWindow(nb, -1, wxPyDefaultPosition, wxPyDefaultSize, wxRAISED_BORDER) - win.SetBackgroundColour(wxRED) - nb.AddPage(win, "Red") - - win = wxWindow(nb, -1, wxPyDefaultPosition, wxPyDefaultSize, wxRAISED_BORDER) - win.SetBackgroundColour(wxGREEN) - nb.AddPage(win, "Green") - - win = wxWindow(nb, -1, wxPyDefaultPosition, wxPyDefaultSize, wxRAISED_BORDER) - win.SetBackgroundColour(wxCYAN) - nb.AddPage(win, "Cyan") - - win = wxWindow(nb, -1, wxPyDefaultPosition, wxPyDefaultSize, wxRAISED_BORDER) - win.SetBackgroundColour(wxWHITE) - nb.AddPage(win, "White") - - win = wxWindow(nb, -1, wxPyDefaultPosition, wxPyDefaultSize, wxRAISED_BORDER) - win.SetBackgroundColour(wxBLACK) - nb.AddPage(win, "Black") - - win = wxWindow(nb, -1, wxPyDefaultPosition, wxPyDefaultSize, wxRAISED_BORDER) - win.SetBackgroundColour(wxNamedColour('MIDNIGHT BLUE')) - nb.AddPage(win, "MIDNIGHT BLUE") - - win = wxWindow(nb, -1, wxPyDefaultPosition, wxPyDefaultSize, wxRAISED_BORDER) - win.SetBackgroundColour(wxNamedColour('INDIAN RED')) - nb.AddPage(win, "INDIAN RED") - - - nb.SetSelection(0) - self.SetSize(wxSize(500, 300)) # force a redraw so the notebook will draw - - - def OnCloseWindow(self, event): - self.Destroy() - -#--------------------------------------------------------------------------- - -class AppFrame(wxFrame): - def __init__(self, parent, id, title): - wxFrame.__init__(self, parent, id, title, wxPyDefaultPosition, - wxSize(420, 200)) - if wxPlatform == '__WXMSW__': - self.icon = wxIcon('bitmaps/mondrian.ico', wxBITMAP_TYPE_ICO) - self.SetIcon(self.icon) - - self.mainmenu = wxMenuBar() - menu = wxMenu() - menu.Append(200, 'E&xit', 'Get the heck outta here!') - EVT_MENU(self, 200, self.OnFileExit) - self.mainmenu.Append(menu, '&File') - - menu = self.MakeTestsMenu() - self.mainmenu.Append(menu, '&Tests') - self.SetMenuBar(self.mainmenu) - - self.log = wxTextCtrl(self, -1, '', wxPyDefaultPosition, wxPyDefaultSize, - wxTE_MULTILINE|wxTE_READONLY) - self.log.WriteText('Test 4:\n') - (w, self.charHeight) = self.log.GetTextExtent('X') - - - def MakeTestsMenu(self): - menu = wxMenu() - - mID = NewId() - menu.Append(mID, '&Simple Controls') - EVT_MENU(self, mID, self.OnTestSimpleControls) - - mID = NewId() - menu.Append(mID, '&Timer', '', true) - EVT_MENU(self, mID, self.OnTestTimer) - self.timerID = mID - self.timer = None - - mID = NewId() - menu.Append(mID, '&Layout Constraints') - EVT_MENU(self, mID, self.OnTestLayoutConstraints) - - mID = NewId() - menu.Append(mID, '&Grid') - EVT_MENU(self, mID, self.OnTestGrid) - - - smenu = wxMenu() # make a sub-menu - - mID = NewId() - smenu.Append(mID, '&Colour') - EVT_MENU(self, mID, self.OnTestColourDlg) - - mID = NewId() - smenu.Append(mID, '&Directory') - EVT_MENU(self, mID, self.OnTestDirDlg) - - mID = NewId() - smenu.Append(mID, '&File') - EVT_MENU(self, mID, self.OnTestFileDlg) - - mID = NewId() - smenu.Append(mID, '&Single Choice') - EVT_MENU(self, mID, self.OnTestSingleChoiceDlg) - - mID = NewId() - smenu.Append(mID, '&TextEntry') - EVT_MENU(self, mID, self.OnTestTextEntryDlg) - - mID = NewId() - smenu.Append(mID, '&Font') - EVT_MENU(self, mID, self.OnTestFontDlg) - - mID = NewId() - smenu.Append(mID, '&PageSetup') - EVT_MENU(self, mID, self.OnTestPageSetupDlg) - - mID = NewId() - smenu.Append(mID, '&Print') - EVT_MENU(self, mID, self.OnTestPrintDlg) - - mID = NewId() - smenu.Append(mID, '&Message') - EVT_MENU(self, mID, self.OnTestMessageDlg) - - - menu.AppendMenu(NewId(), '&Common Dialogs', smenu) - - - mID = NewId() - menu.Append(mID, '&Notebook') - EVT_MENU(self, mID, self.OnTestNotebook) - - return menu - - - - - def WriteText(self, str): - self.log.WriteText(str) - if wxPlatform == '__WXMSW__': - w, h = self.log.GetClientSize() - numLines = h/self.charHeight - x, y = self.log.PositionToXY(self.log.GetLastPosition()) - self.log.ShowPosition(self.log.XYToPosition(x, y-numLines+1)) - - def OnFileExit(self, event): - self.Close() - - def OnCloseWindow(self, event): - self.Destroy() - - - - - def OnTestSimpleControls(self, event): - dlg = TestSimpleControlsDlg(self, self) - dlg.Centre() - dlg.ShowModal() - dlg.Destroy() - - def OnTestTimer(self, event): - if self.timer: - self.mainmenu.Check(self.timerID, false) - self.timer.Stop() - self.timer = None - else: - self.mainmenu.Check(self.timerID, true) - self.timer = TestTimer(self) - self.timer.Start(1000) - - def OnTestLayoutConstraints(self, event): - win = TestLayoutConstraints(self) - win.Show(true) - - def OnTestGrid(self, event): - win = TestGrid(self) - win.Show(true) - win.SetSize(wxSize(505, 300)) # have to force a resize, or the grid doesn't - # show up for some reason.... - - def OnTestColourDlg(self, event): - data = wxColourData() - data.SetChooseFull(true) - dlg = wxColourDialog(self, data) - if dlg.ShowModal() == wxID_OK: - data = dlg.GetColourData() - self.log.WriteText('You selected: %s\n' % str(data.GetColour().Get())) - dlg.Destroy() - - def OnTestDirDlg(self, event): - dlg = wxDirDialog(self) - if dlg.ShowModal() == wxID_OK: - self.log.WriteText('You selected: %s\n' % dlg.GetPath()) - dlg.Destroy() - - def OnTestFileDlg(self, event): - dlg = wxFileDialog(self, "Choose a file", ".", "", "*.*", wxOPEN) - if dlg.ShowModal() == wxID_OK: - self.log.WriteText('You selected: %s\n' % dlg.GetPath()) - dlg.Destroy() - - def OnTestSingleChoiceDlg(self, event): - dlg = wxSingleChoiceDialog(self, 'Test Single Choice', 'The Caption', - ['zero', 'one', 'two', 'three', 'four', 'five', - 'six', 'seven', 'eight']) - if dlg.ShowModal() == wxID_OK: - self.log.WriteText('You selected: %s\n' % dlg.GetStringSelection()) - dlg.Destroy() - - def OnTestTextEntryDlg(self, event): - dlg = wxTextEntryDialog(self, 'What is your favorite programming language?', - 'Duh??', 'Python') - #dlg.SetValue("Python is the best!") #### this doesn't work? - if dlg.ShowModal() == wxID_OK: - self.log.WriteText('You entered: %s\n' % dlg.GetValue()) - dlg.Destroy() - - - def OnTestFontDlg(self, event): - dlg = wxFontDialog(self) - if dlg.ShowModal() == wxID_OK: - data = dlg.GetFontData() - font = data.GetChosenFont() - self.log.WriteText('You selected: "%s", %d points, color %s\n' % - (font.GetFaceName(), font.GetPointSize(), - data.GetColour().Get())) - dlg.Destroy() - - - def OnTestPageSetupDlg(self, event): - data = wxPageSetupData() - data.SetMarginTopLeft(wxPoint(50,50)) - data.SetMarginBottomRight(wxPoint(50,50)) - dlg = wxPageSetupDialog(self, data) - if dlg.ShowModal() == wxID_OK: - data = dlg.GetPageSetupData() - tl = data.GetMarginTopLeft() - br = data.GetMarginBottomRight() - self.log.WriteText('Margins are: %s %s\n' % (str(tl), str(br))) - dlg.Destroy() - - def OnTestPrintDlg(self, event): - data = wxPrintData() - data.EnablePrintToFile(true) - data.EnablePageNumbers(true) - data.EnableSelection(true) - dlg = wxPrintDialog(self, data) - if dlg.ShowModal() == wxID_OK: - self.log.WriteText('\n') - dlg.Destroy() - - def OnTestMessageDlg(self, event): - dlg = wxMessageDialog(self, 'Hello from Python and wxWindows!', - 'A Message Box', wxOK | wxICON_INFORMATION) - dlg.ShowModal() - dlg.Destroy() - - - def OnTestNotebook(self, event): - win = TestNotebookWindow(self) - win.Show(true) - -#--------------------------------------------------------------------------- - - -class MyApp(wxApp): - def OnInit(self): - frame = AppFrame(NULL, -1, "Test 4: (lots of little tests...)") - frame.Show(true) - self.SetTopWindow(frame) - return true - -#--------------------------------------------------------------------------- - - -def main(): - app = MyApp(0) - app.MainLoop() - - -def t(): - import pdb - pdb.run('main()') - - -# for focused testing... -def main2(): - class T2App(wxApp): - def OnInit(self): - frame = TestLayoutConstraints(NULL) - frame.Show(true) - self.SetTopWindow(frame) - return true - - app = T2App(0) - app.MainLoop() - -def t2(): - import pdb - pdb.run('main2()') - - - -if __name__ == '__main__': - main() - - -#---------------------------------------------------------------------------- -# -# $Log$ -# Revision 1.4 1998/08/27 21:59:51 RD -# Some chicken-and-egg problems solved for wxPython on wxGTK -# -# Revision 1.3 1998/08/27 00:01:17 RD -# - more tweaks -# - have discovered some problems but not yet discovered solutions... -# -# Revision 1.2 1998/08/22 19:51:18 RD -# some tweaks for wxGTK -# -# Revision 1.1 1998/08/09 08:28:05 RD -# Initial version -# -# diff --git a/utils/wxprop/Makefile b/utils/wxprop/Makefile deleted file mode 100644 index 3f7a4dce0d..0000000000 --- a/utils/wxprop/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../setup/general/makedirs diff --git a/utils/wxprop/docs/back.gif b/utils/wxprop/docs/back.gif deleted file mode 100644 index 8a61076d3b..0000000000 Binary files a/utils/wxprop/docs/back.gif and /dev/null differ diff --git a/utils/wxprop/docs/body.tex b/utils/wxprop/docs/body.tex deleted file mode 100644 index 1a03a2533e..0000000000 --- a/utils/wxprop/docs/body.tex +++ /dev/null @@ -1,106 +0,0 @@ -\chapter{Introduction}\label{introduction} -\pagenumbering{arabic}% -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -The Property Sheet Classes help the programmer to specify complex dialogs and -their relationship with their associated data. By specifying data as a -wxPropertySheet containing wxProperty objects, the programmer can use -a range of available or custom wxPropertyView classes to allow the user to -edit this data. Classes derived from wxPropertyView act as mediators between the -wxPropertySheet and the actual window (and associated panel items). - -For example, the wxPropertyListView is a kind of wxPropertyView which displays -data in a Visual Basic-style property list (see \helpref{the next section}{appearance} for -screen shots). This is a listbox containing names and values, with -an edit control and other optional controls via which the user edits the selected -data item. - -wxPropertyFormView is another kind of wxPropertyView which mediates between -the data and a panel or dialog box which has already been created. This makes it a contender for -the replacement of wxForm, since programmer-controlled layout is going to be much more -satisfactory. If automatic layout is desired, then wxPropertyListView could be used instead. - -The main intention of this class library was to provide property {\it list} behaviour, but -it has been generalised as much as possible so that the concept of a property sheet and its viewers -can reduce programming effort in a range of user interface tasks. - -For further details on the classes and how they are used, please see \helpref{Property classes overview}{propertyoverview}. - -\section{The appearance and behaviour of a property list view}\label{appearance} - -The property list, as seen in an increasing number of development tools -such as Visual Basic and Delphi, is a convenient and compact method for -displaying and editing a number of items without the need for one -control per item, and without the need for designing a special form. The -controls are as follows: - -\begin{itemize}\itemsep=0pt -\item A listbox showing the properties and their current values, which has double-click -properties dependent on the nature of the current property; -\item a text editing area at the top of the display, allowing the user to edit -the currently selected property if appropriate; -\item `confirm' and `cancel' buttons to confirm or cancel an edit (for the property, not the -whole sheet); -\item an optional list that appears when the user can make a choice from several known possible values; -\item a small Edit button to invoke `detailed editing' (perhaps showing or hiding the above value list, or -maybe invoking a common dialog); -\item optional OK/Close, Cancel and Help buttons for the whole dialog. -\end{itemize} - -The concept of `detailed editing' versus quick editing gives the user a choice -of editing mode, so novice and expert behaviour can be catered for, or the user can just -use what he feels comfortable with. - -Behaviour alters depending on the kind of property being edited. For example, a boolean value has -the following behaviour: - -\begin{itemize}\itemsep=0pt -\item Double-clicking on the item toggles between TRUE and FALSE. -\item Showing the value list enables the user to select TRUE or FALSE. -\item The user may be able to type in the word TRUE or FALSE, or the edit control -may be read-only to disallow this since it is error-prone. -\end{itemize} - -A list of strings may pop up a dialog for editing them, a simple string just allows text editing, -double-clicking a colour property may show a colour selector, double-clicking on a filename property may -show a file selector (in addition to being able to type in the name in the edit control), etc. - -Note that the `type' of property, such as string or integer, does not -necessarily determine the behaviour of the property. The programmer has -to be able to specify different behaviours for the same type, depending -on the meaning of the property. For example, a colour and a filename may -both be strings, but their editing behaviour should be different. This -is why objects of type wxPropertyValidator need to be used, to define -behaviour for a given class of properties or even specific property -name. Objects of class wxPropertyView contain a list of property -registries, which enable reuse of bunches of these validators in -different circumstances. Or a wxProperty can be explicitly set to use a -particular validator object. - -The following screen shot of the property classes test program shows the -user editing a string, which is constrained to be one of three possible -values. - -$$\image{8cm;0cm}{prop1.eps}$$\\ - -The second picture shows the user having entered a integer that -was outside the range specified to the validator. Note that in this picture, -the value list is hidden because it is not used when editing an integer. - -$$\image{8cm;0cm}{prop2.eps}$$ - -\chapter{Files}\label{files} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -The property class library comprises the following files: - -\begin{itemize}\itemsep=0pt -\item wx\_prop.h: base property class header -\item wx\_plist.h: wxPropertyListView and associated classes -\item wx\_pform.h: wxPropertyListView and associated classes -\item wx\_prop.cc: base property class implementation -\item wx\_plist.cc: wxPropertyListView and associated class implementions -\item wx\_pform.cc: wxPropertyFormView and associated class implementions -\end{itemize} diff --git a/utils/wxprop/docs/books.bmp b/utils/wxprop/docs/books.bmp deleted file mode 100644 index cf1e148734..0000000000 Binary files a/utils/wxprop/docs/books.bmp and /dev/null differ diff --git a/utils/wxprop/docs/books.gif b/utils/wxprop/docs/books.gif deleted file mode 100644 index 036d016fb1..0000000000 Binary files a/utils/wxprop/docs/books.gif and /dev/null differ diff --git a/utils/wxprop/docs/bullet.bmp b/utils/wxprop/docs/bullet.bmp deleted file mode 100644 index aad8fc793e..0000000000 Binary files a/utils/wxprop/docs/bullet.bmp and /dev/null differ diff --git a/utils/wxprop/docs/changes.tex b/utils/wxprop/docs/changes.tex deleted file mode 100644 index 83c0a81188..0000000000 --- a/utils/wxprop/docs/changes.tex +++ /dev/null @@ -1,22 +0,0 @@ -\chapter{Change log}\label{changes} -\pagenumbering{arabic}% -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -November 26th 1995, Version 1.1 - -\begin{itemize}\itemsep=0pt -\item Added wxListOfStringsListValidator - allows adding, deleting, editing -strings. -\item Added wxPropertyValue::ClearList, wxPropertyValue::Delete, -wxPropertyValue::wxPropertyValue(wxStringList *). -\item Added wxPropertyValue::Set/GetModified, wxPropertySheet::SetAllModified. -\item Added wxPropertyView::OnPropertyChanged support, for immediate feedback. -\end{itemize} - -October 1995, Version 1.0 - -\begin{itemize}\itemsep=0pt -\item First release. -\end{itemize} - diff --git a/utils/wxprop/docs/classes.tex b/utils/wxprop/docs/classes.tex deleted file mode 100644 index d197d77d6d..0000000000 --- a/utils/wxprop/docs/classes.tex +++ /dev/null @@ -1,1756 +0,0 @@ -\chapter{Alphabetical class reference}\label{classref} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -\overview{Property classes overview}{propertyoverview} - - -\section{\class{wxBoolFormValidator}: wxPropertyFormValidator}\label{wxboolformvalidator} - -\overview{Validator classes}{validatorclasses} - -This class validates a boolean value for a form view. The associated panel item must be a wxCheckBox. - -\membersection{wxBoolFormValidator::wxBoolFormValidator} - -\func{void}{wxBoolFormValidator}{\param{long }{flags=0}} - -Constructor. - -\section{\class{wxBoolListValidator}: wxPropertyListValidator}\label{wxboollistvalidator} - -\overview{Validator classes}{validatorclasses} - -This class validates a boolean value for a list view. - -\membersection{wxBoolListValidator::wxBoolListValidator} - -\func{void}{wxBoolListValidator}{\param{long }{flags=0}} - -Constructor. - -\section{\class{wxIntegerFormValidator}: wxPropertyFormValidator}\label{wxintegerformvalidator} - -\overview{Validator classes}{validatorclasses} - -This class validates a range of integer values for a form view. The associated panel item must be a wxText -or wxSlider. - -\membersection{wxIntegerFormValidator::wxIntegerFormValidator} - -\func{void}{wxIntegerFormValidator}{\param{long }{min=0}, \param{long }{max=0}, - \param{long}{ flags=0}} - -Constructor. Assigning zero to minimum and maximum values indicates that there is no range to check. - - -\section{\class{wxIntegerListValidator}: wxPropertyListValidator}\label{wxintegerlistvalidator} - -\overview{Validator classes}{validatorclasses} - -This class validates a range of integer values for a list view. - -\membersection{wxIntegerListValidator::wxIntegerListValidator} - -\func{void}{wxIntegerListValidator}{\param{long }{min=0}, \param{long }{max=0}, - \param{long}{ flags=wxPROP\_ALLOW\_TEXT\_EDITING}} - -Constructor. Assigning zero to minimum and maximum values indicates that there is no range to check. - -\section{\class{wxFilenameListValidator}: wxPropertyListValidator}\label{wxfilenamelistvalidator} - -\overview{Validator classes}{validatorclasses} - -This class validates a filename for a list view, allowing the user to edit it textually and also popping up -a file selector in ``detailed editing" mode. - -\membersection{wxFilenameListValidator::wxFilenameListValidator} - -\func{void}{wxFilenameListValidator}{\param{wxString }{message = ``Select a file"}, \param{wxString }{wildcard = ``*.*"}, - \param{long}{ flags=0}} - -Constructor. Supply an optional message and wildcard. - -\section{\class{wxListOfStringsListValidator}: wxPropertyListValidator}\label{wxlistofstringslistvalidator} - -\overview{Validator classes}{validatorclasses} - -This class validates a list of strings for a list view. When editing the property, -a dialog box is presented for adding, deleting or editing entries in the list. -At present no constraints may be supplied. - -You can construct a string list property value by constructing a wxStringList object. - -For example: - -\begin{verbatim} - myListValidatorRegistry.RegisterValidator((wxString)"stringlist", - new wxListOfStringsListValidator); - - wxStringList *strings = new wxStringList("earth", "fire", "wind", "water", NULL); - - sheet->AddProperty(new wxProperty("fred", strings, "stringlist")); -\end{verbatim} - -\membersection{wxListOfStringsListValidator::wxListofStringsListValidator} - -\func{void}{wxListOfStringsListValidator}{\param{long}{ flags=0}} - -Constructor. - -\section{\class{wxProperty}: wxObject}\label{wxproperty} - -The {\bf wxProperty} class represents a property, with a \helpref{wxPropertyValue}{wxpropertyvalue}\rtfsp -containing the actual value, a name a role, an optional validator, and -an optional associated window. - -A property might correspond to an actual C++ data member, or it -might correspond to a conceptual property, such as the width of a window. -There is no explicit data member {\it wxWindow::width}, but it may be convenient -to invent such a property for the purposes of editing attributes of the window. -The properties in the property sheet can be mapped to ``reality" by -whatever means (in this case by calling wxWindow::SetSize when the user has -finished editing the property sheet). - -A validator may be associated with the property in order to ensure that this and -only this validator will be used for editing and validating the property. -An alternative method is to use the {\it role} parameter to specify what kind -of validator would be appropriate; for example, specifying ``filename" for the role -would allow the property view to find an appropriate validator at edit time. - - -\membersection{wxProperty::wxProperty} - -\func{void}{wxProperty}{\void} - -\func{void}{wxProperty}{\param{wxProperty\& }{prop}} - -\func{void}{wxProperty}{\param{wxString}{ name}, \param{wxString}{ role}, \param{wxPropertyValidator *}{validator=NULL}} - -\func{void}{wxProperty}{\param{wxString}{ name}, \param{const wxPropertyValue\&}{ val}, \param{wxString}{ role}, \param{wxPropertyValidator *}{validator=NULL}} - -Constructors. - -\membersection{wxProperty::\destruct{wxProperty}} - -\func{void}{\destruct{wxProperty}}{\void} - -Destructor. Destroys the wxPropertyValue, and the property validator if there is one. However, if the -actual C++ value in the wxPropertyValue is a pointer, the data in that variable is not destroyed. - -\membersection{wxProperty::GetValue} - -\func{wxPropertyValue\&}{GetValue}{\void} - -Returns a reference to the property value. - -\membersection{wxProperty::GetValidator} - -\func{wxPropertyValidator *}{GetValidator}{\void} - -Returns a pointer to the associated property validator (if any). - -\membersection{wxProperty::GetName} - -\func{wxString\&}{GetName}{\void} - -Returns the name of the property. - -\membersection{wxProperty::GetRole} - -\func{wxRole\&}{GetRole}{\void} - -Returns the role of the property, to be used when choosing an appropriate validator. - -\membersection{wxProperty::GetWindow} - -\func{wxWindow *}{GetWindow}{\void} - -Returns the window associated with the property (if any). - -\membersection{wxProperty::SetValue} - -\func{void}{SetValue}{\param{wxPropertyValue\&}{ val}} - -Sets the value of the property. - -\membersection{wxProperty::SetName} - -\func{void}{SetName}{\param{wxString\&}{ name}} - -Sets the name of the property. - -\membersection{wxProperty::SetRole} - -\func{void}{SetRole}{\param{wxString\&}{ role}} - -Sets the role of the property. - -\membersection{wxProperty::SetValidator} - -\func{void}{SetValidator}{\param{wxPropertyValidator *}{validator}} - -Sets the validator: this will be deleted when the property is deleted. - -\membersection{wxProperty::SetWindow} - -\func{void}{SetWindow}{\param{wxWindow *}{win}} - -Sets the window associated with the property. - -\membersection{wxProperty::operator $=$} - -\func{void}{operator $=$}{\param{const wxPropertyValue\&}{ val}} - -Assignment operator. - -\section{\class{wxPropertyFormValidator}: wxPropertyValidator}\label{wxpropertyformvalidator} - -The {\bf wxPropertyFormValidator} abstract class is the root of classes that define validation -for a wxPropertyFormView. - - -\section{\class{wxPropertyFormDialog}: wxDialogBox}\label{wxpropertyformdialog} - -The {\bf wxPropertyFormDialog} class is a prepackaged dialog which can -be used for viewing a form property sheet. Pass a property form view object, and the dialog -will pass OnClose and OnDefaultAction listbox messages to the view class for -processing. - -\membersection{wxPropertyFormDialog::wxPropertyFormDialog} - -\func{void}{wxPropertyFormDialog}{\param{wxPropertyFormView *}{view}, \param{wxWindow *}{parent}, \param{char *}{title}, - \param{Bool}{ modal=FALSE}, \param{int}{ x=-1}, \param{int}{ y=-1}, \param{int}{ width=-1}, \param{int}{height=-1}, - \param{long}{ style=wxDEFAULT\_DIALOG\_STYLE}, \param{char *}{name=``dialogBox"}} - -Constructor. - -\membersection{wxPropertyFormDialog::\destruct{wxPropertyFormDialog}} - -\func{void}{\destruct{wxPropertyFormDialog}}{\void} - -Destructor. - - -\section{\class{wxPropertyFormFrame}: wxFrame}\label{wxpropertyformframe} - -The {\bf wxPropertyFormFrame} class is a prepackaged frame which can -be used for viewing a property form. Pass a property form view object, and the frame -will pass OnClose messages to the view class for processing. - -Call Initialize to create the panel and associate the view; override OnCreatePanel -if you wish to use a panel class other than the default wxPropertyFormPanel. - -\membersection{wxPropertyFormFrame::wxPropertyFormFrame} - -\func{void}{wxPropertyFormFrame}{\param{wxPropertyFormView *}{view}, \param{wxFrame *}{parent}, \param{char *}{title}, - \param{int}{ x=-1}, \param{int}{ y=-1}, \param{int}{ width=-1}, \param{int}{height=-1}, - \param{long}{ style=wxSDI $\|$ wxDEFAULT\_FRAME}, \param{char *}{name=``frame"}} - -Constructor. - -\membersection{wxPropertyFormFrame::\destruct{wxPropertyFormFrame}} - -\func{void}{\destruct{wxPropertyFormFrame}}{\void} - -Destructor. - -\membersection{wxPropertyFormFrame::GetPropertyPanel} - -\func{wxPanel *}{GetPropertyPanel}{\void} - -Returns the panel associated with the frame. - -\membersection{wxPropertyFormFrame::Initialize} - -\func{Bool}{Initialize}{\void} - -Must be called to create the panel and associate the view with the panel and frame. - -\membersection{wxPropertyFormFrame::OnCreatePanel} - -\func{wxPanel *}{OnCreatePanel}{\param{wxFrame *}{parent}, \param{wxPropertyFormView *}{view}} - -Creates a panel. Override this to create a panel type other than wxPropertyFormPanel. - - -\section{\class{wxPropertyFormPanel}: wxPanel}\label{wxpropertyformpanel} - -The {\bf wxPropertyFormPanel} class is a prepackaged panel which can -be used for viewing a property form. Pass a property form view object, and the panel -will pass OnDefaultAction listbox messages to the view class for -processing. - -\membersection{wxPropertyFormPanel::wxPropertyFormPanel} - -\func{void}{wxPropertyFormPanel}{\param{wxPropertyFormView *}{view}, \param{wxWindow *}{parent}, - \param{int}{ x=-1}, \param{int}{ y=-1}, \param{int}{ width=-1}, \param{int}{height=-1}, - \param{long}{ style=0}, \param{char *}{name=``panel"}} - -Constructor. - -\membersection{wxPropertyFormPanel::\destruct{wxPropertyFormPanel}} - -\func{void}{\destruct{wxPropertyFormPanel}}{\void} - -Destructor. - - - -\section{\class{wxPropertyFormValidator}: wxPropertyValidator}\label{wxpropertyformvalidatir} - -\overview{wxPropertyFormValidator overview}{wxpropertyformvalidatoroverview} - -The {\bf wxPropertyFormValidator} class defines a base class for form validators. By overriding virtual functions, -the programmer can create custom behaviour for kinds of property. - -\membersection{wxPropertyFormValidator::wxPropertyFormValidator} - -\func{void}{wxPropertyFormValidator}{\param{long}{ flags = 0}} - -Constructor. - -\membersection{wxPropertyFormValidator::\destruct{wxPropertyFormValidator}} - -\func{void}{\destruct{wxPropertyFormValidator}}{\void} - -Destructor. - -\membersection{wxPropertyFormValidator::OnCommand} - -\func{Bool}{OnCommand}{\param{wxProperty *}{property}, \param{wxPropertyFormView *}{view}, - \param{wxWindow *}{parentWindow}, \param{wxCommandEvent\& }{event}} - -Called when the control corresponding to the property receives a command (if not intercepted -by a callback associated with the actual control). - -\membersection{wxPropertyFormValidator::OnCheckValue} - -\func{Bool}{OnCheckValue}{\param{wxProperty *}{property}, \param{wxPropertyFormView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called when the view checks the property value. The value checked by this validator should be taken from the -panel item corresponding to the property. - -\membersection{wxPropertyFormValidator::OnDisplayValue} - -\func{Bool}{OnDisplayValue}{\param{wxProperty *}{property}, \param{wxPropertyFormView *}{view}, - \param{wxWindow *}{parentWindow}} - -Should display the property value in the appropriate control. - -\membersection{wxPropertyFormValidator::OnDoubleClick} - -\func{Bool}{OnDoubleClick}{\param{wxProperty *}{property}, \param{wxPropertyFormView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called when the control corresponding to the property is double clicked (listboxes only). - -\membersection{wxPropertyFormValidator::OnRetrieveValue} - -\func{Bool}{OnRetrieveValue}{\param{wxProperty *}{property}, \param{wxPropertyFormView *}{view}, - \param{wxWindow *}{parentWindow}} - -Should do the transfer from the property editing area to the property itself. - - -\section{\class{wxPropertyFormView}: wxPropertyView}\label{wxpropertyformview} - -\overview{wxPropertyFormView overview}{wxpropertyformviewoverview} - -The {\bf wxPropertyFormView} class shows a wxPropertySheet as a view onto a panel or dialog -box which has already been created. - -\membersection{wxPropertyFormView::wxPropertyFormView} - -\func{void}{wxPropertyFormView}{\param{long}{ flags = 0}} - -Constructor. - -\membersection{wxPropertyFormView::\destruct{wxPropertyFormView}} - -\func{void}{\destruct{wxPropertyFormView}}{\void} - -Destructor. - -\membersection{wxPropertyFormView::AssociateNames}\label{wxpropertyformviewassociatenames} - -\func{void}{AssociateNames}{\void} - -Associates the properties with the controls on the panel. For each panel item, if the -panel item name is the same as a property name, the two objects will be associated. -This function should be called manually since the programmer may wish to do the -association manually. - -\membersection{wxPropertyFormView::Check}\label{wxpropertyformviewcheck} - -\func{Bool}{Check}{\void} - -Checks all properties by calling the appropriate validators; returns FALSE if a validation failed. - -\membersection{wxPropertyFormView::GetPanel}\label{wxpropertyformviewgetpanel} - -\func{wxPanel *}{GetPanel}{\void} - -Returns the panel associated with the view. - -\membersection{wxPropertyFormView::GetManagedWindow}\label{wxpropertyformviewgetmanagedwindow} - -\func{wxWindow *}{GetManagedWindow}{\void} - -Returns the managed window (a frame or dialog) associated with the view. - -\membersection{wxPropertyFormView::OnOk}\label{wxpropertyformviewonok} - -\func{void}{OnOk}{\void} - -Virtual function that will be called when the OK button on the physical window is pressed. -By default, checks and updates the form values, closes and deletes the frame or dialog, then deletes the view. - -\membersection{wxPropertyFormView::OnCancel}\label{wxpropertyformviewoncancel} - -\func{void}{OnCancel}{\void} - -Virtual function that will be called when the Cancel button on the physical window is pressed. -By default, closes and deletes the frame or dialog, then deletes the view. - -\membersection{wxPropertyFormView::OnHelp}\label{wxpropertyformviewonhelp} - -\func{void}{OnHelp}{\void} - -Virtual function that will be called when the Help button on the physical window is pressed. -This needs to be overridden by the application for anything interesting to happen. - -\membersection{wxPropertyFormView::OnRevert}\label{wxpropertyformviewonrevert} - -\func{void}{OnRevert}{\void} - -Virtual function that will be called when the Revert button on the physical window is pressed. -By default transfers the wxProperty values to the panel items (in effect -undoing any unsaved changes in the items). - -\membersection{wxPropertyFormView::OnUpdate}\label{wxpropertyformviewonupdate} - -\func{void}{OnUpdate}{\void} - -Virtual function that will be called when the Update button on the physical window is pressed. -By defaults transfers the displayed values to the wxProperty objects. - -\membersection{wxPropertyFormView::SetManagedWindow}\label{wxpropertyformviewsetmanagedwindow} - -\func{void}{SetManagedWindow}{\param{wxWindow *}{win}} - -Sets the managed window (a frame or dialog) associated with the view. - -\membersection{wxPropertyFormView::TransferToDialog}\label{wxpropertyformviewtransfertodialog} - -\func{Bool}{TransferToDialog}{\void} - -Transfers property values to the controls in the dialog. - -\membersection{wxPropertyFormView::TransferToPropertySheet}\label{wxpropertyformviewtransfertopropertysheet} - -\func{Bool}{TransferToPropertySheet}{\void} - -Transfers property values from the controls in the dialog to the property sheet. - - -\section{\class{wxPropertyListDialog}: wxDialogBox}\label{wxpropertylistdialog} - -The {\bf wxPropertyListDialog} class is a prepackaged dialog which can -be used for viewing a property list. Pass a property list view object, and the dialog -will pass OnClose and OnDefaultAction listbox messages to the view class for -processing. - -\membersection{wxPropertyListDialog::wxPropertyListDialog} - -\func{void}{wxPropertyListDialog}{\param{wxPropertyListView *}{view}, \param{wxWindow *}{parent}, \param{char *}{title}, - \param{Bool}{ modal=FALSE}, \param{int}{ x=-1}, \param{int}{ y=-1}, \param{int}{ width=-1}, \param{int}{height=-1}, - \param{long}{ style=wxDEFAULT\_DIALOG\_STYLE}, \param{char *}{name=``dialogBox"}} - -Constructor. - -\membersection{wxPropertyListDialog::\destruct{wxPropertyListDialog}} - -\func{void}{\destruct{wxPropertyListDialog}}{\void} - -Destructor. - - -\section{\class{wxPropertyListFrame}: wxFrame}\label{wxpropertylistframe} - -The {\bf wxPropertyListFrame} class is a prepackaged frame which can -be used for viewing a property list. Pass a property list view object, and the frame -will pass OnClose messages to the view class for processing. - -Call Initialize to create the panel and associate the view; override OnCreatePanel -if you wish to use a panel class other than the default wxPropertyListPanel. - -\membersection{wxPropertyListFrame::wxPropertyListFrame} - -\func{void}{wxPropertyListFrame}{\param{wxPropertyListView *}{view}, \param{wxFrame *}{parent}, \param{char *}{title}, - \param{int}{ x=-1}, \param{int}{ y=-1}, \param{int}{ width=-1}, \param{int}{height=-1}, - \param{long}{ style=wxSDI $\|$ wxDEFAULT\_FRAME}, \param{char *}{name=``frame"}} - -Constructor. - -\membersection{wxPropertyListFrame::\destruct{wxPropertyListFrame}} - -\func{void}{\destruct{wxPropertyListFrame}}{\void} - -Destructor. - -\membersection{wxPropertyListFrame::GetPropertyPanel} - -\func{wxPanel *}{GetPropertyPanel}{\void} - -Returns the panel associated with the frame. - -\membersection{wxPropertyListFrame::Initialize} - -\func{Bool}{Initialize}{\void} - -Must be called to create the panel and associate the view with the panel and frame. - -\membersection{wxPropertyListFrame::OnCreatePanel} - -\func{wxPanel *}{OnCreatePanel}{\param{wxFrame *}{parent}, \param{wxPropertyListView *}{view}} - -Creates a panel. Override this to create a panel type other than wxPropertyListPanel. - - -\section{\class{wxPropertyListPanel}: wxPanel}\label{wxpropertylistpanel} - -The {\bf wxPropertyListPanel} class is a prepackaged panel which can -be used for viewing a property list. Pass a property list view object, and the panel -will pass OnDefaultAction listbox messages to the view class for -processing. - -\membersection{wxPropertyListPanel::wxPropertyListPanel} - -\func{void}{wxPropertyListPanel}{\param{wxPropertyListView *}{view}, \param{wxWindow *}{parent}, - \param{int}{ x=-1}, \param{int}{ y=-1}, \param{int}{ width=-1}, \param{int}{height=-1}, - \param{long}{ style=0}, \param{char *}{name=``panel"}} - -Constructor. - -\membersection{wxPropertyListPanel::\destruct{wxPropertyListPanel}} - -\func{void}{\destruct{wxPropertyListPanel}}{\void} - -Destructor. - - - - -\section{\class{wxPropertyListValidator}: wxPropertyValidator}\label{wxpropertylistvalidator} - -\overview{wxPropertyListValidator overview}{wxpropertylistvalidatoroverview} - -The {\bf wxPropertyListValidator} abstract class is the base class for -deriving validators for property lists. - -\membersection{wxPropertyListValidator::wxPropertyListValidator} - -\func{void}{wxPropertyListValidator}{\param{long}{ flags = wxPROP\_ALLOW\_TEXT\_EDITING}} - -Constructor. - -\membersection{wxPropertyListValidator::\destruct{wxPropertyListValidator}} - -\func{void}{\destruct{wxPropertyListValidator}}{\void} - -Destructor. - -\membersection{wxPropertyListValidator::OnCheckValue} - -\func{Bool}{OnCheckValue}{\param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called when the Tick (Confirm) button is pressed or focus is list. Return FALSE if the value -was invalid, which is a signal restores the old value. Return TRUE if the value was valid. - -\membersection{wxPropertyListValidator::OnClearControls} - -\func{Bool}{OnClearControls}{\param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Allows the clearing (enabling, disabling) of property list controls, when the focus leaves the current property. - -\membersection{wxPropertyListValidator::OnClearDetailControls} - -\func{Bool}{OnClearDetailControls}{\param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called when the focus is lost, if the validator is in detailed editing mode. - -\membersection{wxPropertyListValidator::OnDisplayValue} - -\func{Bool}{OnDisplayValue}{\param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Should display the value in the appropriate controls. The default implementation gets the -textual value from the property and inserts it into the text edit control. - -\membersection{wxPropertyListValidator::OnDoubleClick} - -\func{Bool}{OnDoubleClick}{\param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called when the property is double clicked. Extra functionality can be provided, -such as cycling through possible values. - -\membersection{wxPropertyListValidator::OnEdit} - -\func{Bool}{OnEdit}{\param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called when the Edit (detailed editing) button is pressed. The default implementation -calls wxPropertyListView::BeginDetailedEditing; a filename validator (for example) overrides -this function to show the file selector. - -\membersection{wxPropertyListValidator::OnPrepareControls} - -\func{Bool}{OnPrepareControls}{\param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called to allow the validator to setup the display, such enabling or disabling buttons, and -setting the values and selection in the standard listbox control (the one optionally used for displaying -value options). - -\membersection{wxPropertyListValidator::OnPrepareDetailControls} - -\func{Bool}{OnPrepareDetailControls}{\param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called when the property is edited `in detail', i.e. when the Edit button is pressed. - -\membersection{wxPropertyListValidator::OnRetrieveValue} - -\func{Bool}{OnRetrieveValue}{\param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called when Tick (Confirm) is pressed or focus is lost or view wants to update -the property list. Should do the transfer from the property editing area to the property itself - -\membersection{wxPropertyListValidator::OnSelect} - -\func{Bool}{OnSelect}{\param{Bool}{ select}, \param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called when the property is selected or deselected: typically displays the value -in the edit control (having chosen a suitable control to display: (non)editable text or listbox). - -\membersection{wxPropertyListValidator::OnValueListSelect} - -\func{Bool}{OnValueListSelect}{\param{wxProperty *}{property}, \param{wxPropertyListView *}{view}, - \param{wxWindow *}{parentWindow}} - -Called when the value listbox is selected. The default behaviour is to copy -string to text control, and retrieve the value into the property. - - - -\section{\class{wxPropertyListView}: wxPropertyView}\label{wxpropertylistview} - -\overview{wxPropertyListView overview}{wxpropertylistviewoverview} - -The {\bf wxPropertyListView} class shows a wxPropertySheet as a Visual Basic-style property list. - -\membersection{wxPropertyListView::wxPropertyListView} - -\func{void}{wxPropertyListView}{\param{long}{ flags = wxPROP\_BUTTON\_DEFAULT}} - -Constructor. - -The {\it flags} argument can be a bit list of the following: - -\begin{itemize}\itemsep=0pt -\item wxPROP\_BUTTON\_CLOSE -\item wxPROP\_BUTTON\_OK -\item wxPROP\_BUTTON\_CANCEL -\item wxPROP\_BUTTON\_CHECK\_CROSS -\item wxPROP\_BUTTON\_HELP -\item wxPROP\_DYNAMIC\_VALUE\_FIELD -\item wxPROP\_PULLDOWN -\end{itemize} - -\membersection{wxPropertyListView::\destruct{wxPropertyListView}} - -\func{void}{\destruct{wxPropertyListView}}{\void} - -Destructor. - -\membersection{wxPropertyListView::AssociatePanel}\label{wxpropertylistviewassociatepanel} - -\func{void}{AssociatePanel}{\param{wxPanel *}{panel}} - -Associates the window on which the controls will be displayed, with the view (sets an internal pointer to the window). - -\membersection{wxPropertyListView::BeginShowingProperty}\label{wxpropertylistviewbeginshowingproperty} - -\func{Bool}{BeginShowingProperty}{\param{wxProperty *}{property}} - -Finds the appropriate validator and loads the property into the controls, by calling -wxPropertyValidator::OnPrepareControls and then wxPropertyListView::DisplayProperty. - -\membersection{wxPropertyListView::DisplayProperty}\label{wxpropertylistviewdisplayproperty} - -\func{Bool}{DisplayProperty}{\param{wxProperty *}{property}} - -Calls wxPropertyValidator::OnDisplayValue for the current property's validator. This function -gets called by wxPropertyListView::BeginShowingProperty, which is in turn called -from ShowProperty, called by OnPropertySelect, called by the listbox callback when selected. - -\membersection{wxPropertyListView::EndShowingProperty}\label{wxpropertylistviewendshowingproperty} - -\func{Bool}{EndShowingProperty}{\param{wxProperty *}{property}} - -Finds the appropriate validator and unloads the property from the controls, by calling -wxPropertyListView::RetrieveProperty, wxPropertyValidator::OnClearControls and (if we're in -detailed editing mdoe) wxPropertyValidator::OnClearDetailControls. - -\membersection{wxPropertyListView::GetPanel}\label{wxpropertylistviewgetpanel} - -\func{wxPanel *}{GetPanel}{\void} - -Returns the panel associated with the view. - -\membersection{wxPropertyListView::GetManagedWindow}\label{wxpropertylistviewgetmanagedwindow} - -\func{wxWindow *}{GetManagedWindow}{\void} - -Returns the managed window (a frame or dialog) associated with the view. - -\membersection{wxPropertyListView::GetWindowCancelButton}\label{wxpropertylistviewgetwindowcancelbutton} - -\func{wxButton *}{GetWindowCancelButton}{\void} - -Returns the window cancel button, if any. - -\membersection{wxPropertyListView::GetWindowCloseButton}\label{wxpropertylistviewgetwindowclosebutton} - -\func{wxButton *}{GetWindowCloseButton}{\void} - -Returns the window close or OK button, if any. - -\membersection{wxPropertyListView::GetWindowHelpButton}\label{wxpropertylistviewgetwindowhelpbutton} - -\func{wxButton *}{GetWindowHelpButton}{\void} - -Returns the window help button, if any. - -\membersection{wxPropertyListView::SetManagedWindow}\label{wxpropertylistviewsetmanagedwindow} - -\func{void}{SetManagedWindow}{\param{wxWindow *}{win}} - -Sets the managed window (a frame or dialog) associated with the view. - -\membersection{wxPropertyListView::UpdatePropertyDisplayInList}\label{wxpropertylistviewupdatepropdisplay} - -\func{Bool}{UpdatePropertyDisplayInList}{\param{wxProperty *}{property}} - -Updates the display for the given changed property. - -\membersection{wxPropertyListView::UpdatePropertyList}\label{wxpropertylistviewupdateproplist} - -\func{Bool}{UpdatePropertyList}{\param{Bool }{clearEditArea = TRUE}} - -Updates the whole property list display. - - -\section{\class{wxPropertySheet}: wxObject}\label{wxpropertysheet} - -\overview{wxPropertySheet overview}{wxpropertysheetoverview} - -The {\bf wxPropertySheet} class is used for storing a number of -wxProperty objects (essentially names and values). - -\membersection{wxPropertySheet::wxPropertySheet} - -\func{void}{wxPropertySheet}{\void} - -Constructor. - -\membersection{wxPropertySheet::\destruct{wxPropertySheet}} - -\func{void}{\destruct{wxPropertySheet}}{\void} - -Destructor. Destroys all contained properties. - -\membersection{wxPropertySheet::AddProperty}\label{wxpropertysheetaddproperty} - -\func{void}{AddProperty}{\param{wxProperty *}{property}} - -Adds a property to the sheet. - -\membersection{wxPropertySheet::Clear}\label{wxpropertysheetclear} - -\func{void}{Clear}{\void} - -Clears all the properties from the sheet (deleting them). - -\membersection{wxPropertySheet::GetProperties}\label{wxpropertysheetgetproperties} - -\func{wxList\&}{GetProperties}{\void} - -Returns a reference to the internal list of properties. - -\membersection{wxPropertySheet::GetProperty}\label{wxpropertysheetgetproperty} - -\func{wxProperty *}{GetProperty}{\param{char *}{name}} - -Gets a property by name. - -\membersection{wxPropertySheet::SetAllModified} - -\func{void}{SetAllModified}{\param{Bool}{ flag}} - -Sets the `modified' flag of each property value. - - - -\section{\class{wxPropertyValidator}: wxEvtHandler}\label{wxpropertyvalidator} - -\overview{wxPropertyValidator overview}{wxpropertyvalidatoroverview} - -The {\bf wxPropertyValidator} abstract class is the base class for deriving -validators for properties. - -\membersection{wxPropertyValidator::wxPropertyValidator} - -\func{void}{wxPropertyValidator}{\param{long}{ flags = 0}} - -Constructor. - -\membersection{wxPropertyValidator::\destruct{wxPropertyValidator}} - -\func{void}{\destruct{wxPropertyValidator}}{\void} - -Destructor. - -\membersection{wxPropertyValidator::GetFlags} - -\func{long}{GetFlags}{\void} - -Returns the flags for the validator. - -\membersection{wxPropertyValidator::GetValidatorProperty} - -\func{wxProperty *}{GetValidatorProperty}{\void} - -Gets the property for the validator. - -\membersection{wxPropertyValidator::SetValidatorProperty} - -\func{void}{SetValidatorProperty}{\param{wxProperty *}{property}} - -Sets the property for the validator. - - -\section{\class{wxPropertyValidatorRegistry}: wxHashTable}\label{wxpropertyvalidatorregistry} - -The {\bf wxPropertyValidatorRegistry} class is used for storing validators, -indexed by the `role name' of the property, by which groups of property -can be identified for the purpose of validation and editing. - -\membersection{wxPropertyValidatorRegistry::wxPropertyValidatorRegistry} - -\func{void}{wxPropertyValidatorRegistry}{\void} - -Constructor. - -\membersection{wxPropertyValidatorRegistry::\destruct{wxPropertyValidatorRegistry}} - -\func{void}{\destruct{wxPropertyValidatorRegistry}}{\void} - -Destructor. - -\membersection{wxPropertyValidatorRegistry::Clear} - -\func{void}{ClearRegistry}{\void} - -Clears the registry, deleting the validators. - -\membersection{wxPropertyValidatorRegistry::GetValidator} - -\func{wxPropertyValidator *}{GetValidator}{\param{wxString\& }{roleName}} - -Retrieve a validator by the property role name. - -\membersection{wxPropertyValidatorRegistry::RegisterValidator}\label{wxpropertyvalidatorregistervalidator} - -\func{void}{RegisterValidator}{\param{wxString\& }{roleName}, \param{wxPropertyValidator *}{validator}} - -Register a validator with the registry. {\it roleName} is a name indicating the -role of the property, such as ``filename''. Later, when a validator is chosen for -editing a property, this role name is matched against the class names of the property, -if the property does not already have a validator explicitly associated with it. - - -\section{\class{wxPropertyValue}: wxObject}\label{wxpropertyvalue} - -The {\bf wxPropertyValue} class represents the value of a property, -and is normally associated with a wxProperty object. - -A wxPropertyValue has one of the following types: - -\begin{itemize}\itemsep=0pt -\item wxPropertyValueNull -\item wxPropertyValueInteger -\item wxPropertyValueReal -\item wxPropertyValueBool -\item wxPropertyValueString -\item wxPropertyValueList -\item wxPropertyValueIntegerPtr -\item wxPropertyValueRealPtr -\item wxPropertyValueBoolPtr -\item wxPropertyValueStringPtr -\end{itemize} - -\membersection{wxPropertyValue::wxPropertyValue} - -\func{void}{wxPropertyValue}{\void} - -Default constructor. - -\func{void}{wxPropertyValue}{\param{const wxPropertyValue\& }{copyFrom}} - -Copy constructor. - -\func{void}{wxPropertyValue}{\param{char *}{val}} - -Construction from a string value. - -\func{void}{wxPropertyValue}{\param{long}{ val}} - -Construction from an integer value. You may need to cast to (long) to -avoid confusion with other constructors (such as the Bool constructor). - -\func{void}{wxPropertyValue}{\param{Bool}{ val}} - -Construction from a boolean value. - -\func{void}{wxPropertyValue}{\param{float}{ val}} - -Construction from a floating point value. - -\func{void}{wxPropertyValue}{\param{double}{ val}} - -Construction from a floating point value. - -\func{void}{wxPropertyValue}{\param{wxList *}{ val}} - -Construction from a list of wxPropertyValue objects. The -list, but not each contained wxPropertyValue, will be deleted -by the constructor. The wxPropertyValues will be assigned to -this wxPropertyValue list. In other words, so do not delete wxList or -its data after calling this constructor. - -\func{void}{wxPropertyValue}{\param{wxStringList *}{ val}} - -Construction from a list of strings. The list (including the strings -contained in it) will be deleted by the constructor, so do not -destroy {\it val} explicitly. - -\func{void}{wxPropertyValue}{\param{char **}{val}} - -Construction from a string pointer. - -\func{void}{wxPropertyValue}{\param{long *}{val}} - -Construction from an integer pointer. - -\func{void}{wxPropertyValue}{\param{Bool *}{val}} - -Construction from an boolean pointer. - -\func{void}{wxPropertyValue}{\param{float *}{val}} - -Construction from a floating point pointer. - -The last four constructors use pointers to various C++ types, and do not -store the types themselves; this allows the values to stand in for actual -data values defined elsewhere. - -\membersection{wxPropertyValue::\destruct{wxPropertyValue}} - -\func{void}{\destruct{wxPropertyValue}}{\void} - -Destructor. - -\membersection{wxPropertyValue::Append} - -\func{void}{Append}{\param{wxPropertyValue *}{expr}} - -Appends a property value to the list. - -\membersection{wxPropertyValue::BoolValue} - -\func{Bool}{BoolValue}{\void} - -Returns the boolean value. - -\membersection{wxPropertyValue::BoolValuePtr} - -\func{Bool *}{BoolValuePtr}{\void} - -Returns the pointer to the boolean value. - -\membersection{wxPropertyValue::ClearList} - -\func{void}{ClearList}{\void} - -Deletes the contents of the list. - -\membersection{wxPropertyValue::Delete} - -\func{void}{Delete}{\param{wxPropertyValue *}{expr}} - -Deletes {\it expr} from this list. - -\membersection{wxPropertyValue::GetFirst} - -\func{wxPropertyValue *}{GetFirst}{\void} - -Gets the first value in the list. - -\membersection{wxPropertyValue::GetLast} - -\func{wxPropertyValue *}{GetFirst}{\void} - -Gets the last value in the list. - -\membersection{wxPropertyValue::GetModified} - -\func{Bool}{GetModified}{\void} - -Returns TRUE if the value was modified since being created -(or since SetModified was called). - -\membersection{wxPropertyValue::GetNext} - -\func{wxPropertyValue *}{GetNext}{\void} - -Gets the next value in the list (the one after `this'). - -\membersection{wxPropertyValue::GetStringRepresentation} - -\func{wxString}{GetStringRepresentation}{\void} - -Gets a string representation of the value. - -\membersection{wxPropertyValue::IntegerValue} - -\func{long}{IntegerValue}{\void} - -Returns the integer value. - -\membersection{wxPropertyValue::Insert} - -\func{void}{Insert}{\param{wxPropertyValue *}{expr}} - -Inserts a property value at the front of a list. - -\membersection{wxPropertyValue::IntegerValuePtr} - -\func{long *}{IntegerValuePtr}{\void} - -Returns the pointer to the integer value. - -\membersection{wxPropertyValue::Nth} - -\func{wxPropertyValue *}{Nth}{\param{int}{ n}} - -Returns the nth value of a list expression (starting from zero). - -\membersection{wxPropertyValue::Number} - -\func{int}{Number}{\void} - -Returns the number of elements in a list expression. - -\membersection{wxPropertyValue::RealValue} - -\func{float}{RealValue}{\void} - -Returns the floating point value. - -\membersection{wxPropertyValue::RealValuePtr} - -\func{float *}{RealValuePtr}{\void} - -Returns the pointer to the floating point value. - -\membersection{wxPropertyValue::SetModified} - -\func{void}{SetModified}{\param{Bool}{ flag}} - -Sets the `modified' flag. - -\membersection{wxPropertyValue::StringValue} - -\func{char *}{StringValue}{\void} - -Returns the string value. - -\membersection{wxPropertyValue::StringValuePtr} - -\func{char **}{StringValuePtr}{\void} - -Returns the pointer to the string value. - -\membersection{wxPropertyValue::Type} - -\func{wxPropertyValueType}{Type}{\void} - -Returns the value type. - -\membersection{wxPropertyValue::operator $=$} - -\func{void}{operator $=$}{\param{const wxPropertyValue\& }{val}} - -\func{void}{operator $=$}{\param{const char *}{val}} - -\func{void}{operator $=$}{\param{const long }{val}} - -\func{void}{operator $=$}{\param{const Bool }{val}} - -\func{void}{operator $=$}{\param{const float }{val}} - -\func{void}{operator $=$}{\param{const char **}{val}} - -\func{void}{operator $=$}{\param{const long *}{val}} - -\func{void}{operator $=$}{\param{const Bool *}{val}} - -\func{void}{operator $=$}{\param{const float *}{val}} - -Assignment operators. - - - -\section{\class{wxPropertyView}: wxEvtHandler}\label{wxpropertyview} - -\overview{wxPropertyView overview}{wxpropertyviewoverview} - -The {\bf wxPropertyView} abstract class is the base class for views -of property sheets, acting as intermediaries between properties and -actual windows. - -\membersection{wxPropertyView::wxPropertyView} - -\func{void}{wxPropertyView}{\param{long}{ flags = wxPROP\_BUTTON\_DEFAULT}} - -Constructor. - -The {\it flags} argument can be a bit list of the following: - -\begin{itemize}\itemsep=0pt -\item wxPROP\_BUTTON\_CLOSE -\item wxPROP\_BUTTON\_OK -\item wxPROP\_BUTTON\_CANCEL -\item wxPROP\_BUTTON\_CHECK\_CROSS -\item wxPROP\_BUTTON\_HELP -\item wxPROP\_DYNAMIC\_VALUE\_FIELD -\item wxPROP\_PULLDOWN -\end{itemize} - -\membersection{wxPropertyView::\destruct{wxPropertyView}} - -\func{void}{\destruct{wxPropertyView}}{\void} - -Destructor. - -\membersection{wxPropertyView::AddRegistry}\label{wxpropertyviewaddregistry} - -\func{void}{AddRegistry}{\param{wxPropertyValidatorRegistry *}{registry}} - -Adds a registry (list of property validators) the view's list of registries, which is initially empty. - -\membersection{wxPropertyView::FindPropertyValidator}\label{wxpropertyviewfindpropertyvalidator} - -\func{wxPropertyValidator *}{FindPropertyValidator}{\param{wxProperty *}{property}} - -Finds the property validator that is most appropriate to this property. - -\membersection{wxPropertyView::GetPropertySheet}\label{wxpropertyviewgetpropertysheet} - -\func{wxPropertySheet *}{GetPropertySheet}{\void} - -Gets the property sheet for this view. - -\membersection{wxPropertyView::GetRegistryList}\label{wxpropertyviewgetregistrylist} - -\func{wxList\&}{GetRegistryList}{\void} - -Returns a reference to the list of property validator registries. - -\membersection{wxPropertyView::OnOk}\label{wxpropertyviewonok} - -\func{void}{OnOk}{\void} - -Virtual function that will be called when the OK button on the physical window is pressed (if it exists). - -\membersection{wxPropertyView::OnCancel}\label{wxpropertyviewoncancel} - -\func{void}{OnCancel}{\void} - -Virtual function that will be called when the Cancel button on the physical window is pressed (if it exists). - -\membersection{wxPropertyView::OnClose}\label{wxpropertyviewonclose} - -\func{Bool}{OnClose}{\void} - -Virtual function that will be called when the physical window is closed. The default implementation returns FALSE. - -\membersection{wxPropertyView::OnHelp}\label{wxpropertyviewonhelp} - -\func{void}{OnHelp}{\void} - -Virtual function that will be called when the Help button on the physical window is pressed (if it exists). - -\membersection{wxPropertyView::OnPropertyChanged}\label{wxpropertyviewonpropertychanged} - -\func{void}{OnPropertyChanged}{\param{wxProperty *}{property}} - -Virtual function called by a view or validator when a property's value changed. Validators -must be written correctly for this to be called. You can override this function -to respond immediately to property value changes. - -\membersection{wxPropertyView::OnUpdateView}\label{wxpropertyviewonupdateview} - -\func{Bool}{OnUpdateView}{\void} - -Called by the viewed object to update the view. The default implementation just returns -FALSE. - -\membersection{wxPropertyView::SetPropertySheet}\label{wxpropertyviewsetpropertysheet} - -\func{void}{SetPropertySheet}{\param{wxPropertySheet *}{sheet}} - -Sets the property sheet for this view. - -\membersection{wxPropertyView::ShowView}\label{wxpropertyviewshowview} - -\func{void}{ShowView}{\param{wxPropertySheet *}{sheet}, \param{wxPanel *}{panel}} - -Associates this view with the given panel, and shows the view. - -\section{\class{wxRealFormValidator}: wxPropertyFormValidator}\label{wxrealformvalidator} - -\overview{Validator classes}{validatorclasses} - -This class validates a range of real values for form views. The associated panel item must be a wxText. - -\membersection{wxRealFormValidator::wxRealFormValidator} - -\func{void}{wxRealFormValidator}{\param{float }{min=0.0}, \param{float }{max=0.0}, - \param{long}{ flags=0}} - -Constructor. Assigning zero to minimum and maximum values indicates that there is no range to check. - - -\section{\class{wxStringFormValidator}: wxPropertyFormValidator}\label{wxstringformvalidator} - -\overview{Validator classes}{validatorclasses} - -This class validates a string value for a form view, with an optional choice of possible values. -The associated panel item must be a wxText, wxListBox or wxChoice. For wxListBox and wxChoice items, -if the item is empty, the validator attempts to initialize the item from the strings in -the validator. Note that this does not happen for XView wxChoice items since XView cannot reinitialize a wxChoice. - -\membersection{wxStringFormValidator::wxStringFormValidator} - -\func{void}{wxStringFormValidator}{\param{wxStringList *}{list=NULL}, \param{long}{ flags=0}} - -Constructor. Supply a list of strings to indicate a choice, or no strings to allow the -user to freely edit the string. The string list will be deleted when the validator is deleted. - - -\section{\class{wxRealListValidator}: wxPropertyListValidator}\label{wxreallistvalidator} - -\overview{Validator classes}{validatorclasses} - -This class validates a range of real values for property lists. - -\membersection{wxRealListValidator::wxreallistvalidator} - -\func{void}{wxRealListValidator}{\param{float }{min=0.0}, \param{float }{max=0.0}, - \param{long}{ flags=wxPROP\_ALLOW\_TEXT\_EDITING}} - -Constructor. Assigning zero to minimum and maximum values indicates that there is no range to check. - - -\section{\class{wxStringListValidator}: wxPropertyListValidator}\label{wxstringlistvalidator} - -\overview{Validator classes}{validatorclasses} - -This class validates a string value, with an optional choice of possible values. - -\membersection{wxStringListValidator::wxStringListValidator} - -\func{void}{wxStringListValidator}{\param{wxStringList *}{list=NULL}, \param{long}{ flags=0}} - -Constructor. Supply a list of strings to indicate a choice, or no strings to allow the -user to freely edit the string. The string list will be deleted when the validator is deleted. - - -\chapter{Classes by category}\label{classesbycat} - -A classification of property sheet classes by category. - -\section{Data classes} - -\begin{itemize}\itemsep=0pt -\item \helpref{wxProperty}{wxproperty} -\item \helpref{wxPropertyValue}{wxpropertyvalue} -\item \helpref{wxPropertySheet}{wxpropertysheet} -\end{itemize} - - -\section{Validator classes}\label{validatorclasses} - -Validators check that the values the user has entered for a property are -valid. They can also define specific ways of entering data, such as a -file selector for a filename, and they are responsible for transferring -values between the wxProperty and the physical display. - -Base classes: - -\begin{itemize}\itemsep=0pt -\item \helpref{wxPropertyValidator}{wxproperty} -\item \helpref{wxPropertyListValidator}{wxpropertylistvalidator} -\item \helpref{wxPropertyFormValidator}{wxpropertyformvalidator} -\end{itemize} - -List view validators: - -\begin{itemize}\itemsep=0pt -\item \helpref{wxBoolListValidator}{wxboollistvalidator} -\item \helpref{wxFilenameListValidator}{wxfilenamelistvalidator} -\item \helpref{wxIntegerListValidator}{wxintegerlistvalidator} -\item \helpref{wxListOfStringsListValidator}{wxlistofstringslistvalidator} -\item \helpref{wxRealListValidator}{wxreallistvalidator} -\item \helpref{wxStringListValidator}{wxstringlistvalidator} -\end{itemize} - -Form view validators: - -\begin{itemize}\itemsep=0pt -\item \helpref{wxBoolFormValidator}{wxboolformvalidator} -\item \helpref{wxIntegerFormValidator}{wxintegerformvalidator} -\item \helpref{wxRealFormValidator}{wxrealformvalidator} -\item \helpref{wxStringFormValidator}{wxstringformvalidator} -\end{itemize} - -\section{View classes}\label{viewclasses} - -View classes mediate between a property sheet and a physical window. - -\begin{itemize}\itemsep=0pt -\item \helpref{wxPropertyView}{wxpropertyview} -\item \helpref{wxPropertyListView}{wxpropertylistview} -\item \helpref{wxPropertyFormView}{wxpropertyformview} -\end{itemize} - -\section{Window classes}\label{windowclasses} - -The class library defines some window classes that can be used as-is with a suitable -view class and property sheet. - -\begin{itemize}\itemsep=0pt -\item \helpref{wxPropertyFormFrame}{wxpropertyformframe} -\item \helpref{wxPropertyFormDialog}{wxpropertyformdialog} -\item \helpref{wxPropertyFormPanel}{wxpropertyformpanel} -\item \helpref{wxPropertyListFrame}{wxpropertylistframe} -\item \helpref{wxPropertyListDialog}{wxpropertylistdialog} -\item \helpref{wxPropertyListPanel}{wxpropertylistpanel} -\end{itemize} - -\section{Registry classes} - -A validator registry is a list of validators that can be applied to properties in a property sheet. -There may be one or more registries per property view. - -\begin{itemize}\itemsep=0pt -\item \helpref{wxPropertyValidatorRegistry}{wxpropertyvalidatorregistry} -\end{itemize} - - -\chapter{Topic overviews}\label{overviews} - -This chapter contains a selection of topic overviews. - -\section{Property classes overview}\label{propertyoverview} - -The property classes help a programmer to express relationships between -data and physical windows, in particular: - -\begin{itemize}\itemsep=0pt -\item the transfer of data to and from the physical controls; -\item the behaviour of various controls and custom windows for particular -types of data; -\item the validation of data, notifying the user when incorrect data is entered, -or even better, constraining the input so only valid data can be entered. -\end{itemize} - -With a consistent framework, the programmer should be able to use existing -components and design new ones in a principled manner, to solve many data entry -requirements. - -Each datum is represented in a \helpref{wxProperty}{wxproperty}, which has a name and a value. -Various C++ types are permitted in the value of a property, and the property can store a pointer -to the data instead of a copy of the data. A \helpref{wxPropertySheet}{wxpropertysheet} represents a number of these properties. - -These two classes are independent from the way in which the data is visually manipulated. To -mediate between property sheets and windows, the abstract class \helpref{wxPropertyView}{wxpropertyview} is -available for programmers to derive new kinds of view. One kind of view that is available is the \helpref{wxPropertyListView}{wxpropertylistview}, -which displays the data in a Visual Basic-style list, with a small number of controls for editing -the currently selected property. Another is \helpref{wxPropertyFormView}{wxpropertyformview} which -mediates between an existing dialog or panel and the property sheet. - -The hard work of mediation is actually performed by validators, which are instances of classes -derived from \helpref{wxPropertyValidator}{wxpropertyvalidator}. A validator is associated with -a particular property and is responsible for -responding to user interface events, and displaying, updating and checking the property value. -Because a validator's behaviour depends largely on the kind of view being used, there has to be -a separate hierarchy of validators for each class of view. So for wxPropertyListView, there is -an abstract class \helpref{wxPropertyListValidator}{wxpropertylistvalidator} from which concrete -classes are derived, such as \helpref{wxRealListValidator}{wxreallistvalidator} and -\rtfsp\helpref{wxStringListValidator}{wxstringlistvalidator}. - -A validator can be explicitly set for a property, so there is no doubt which validator -should be used to edit that property. However, it is also possible to define a registry -of validators, and have the validator chosen on the basis of the {\it role} of the property. -So a property with a ``filename" role would match the ``filename" validator, which pops -up a file selector when the user double clicks on the property. - -You don't have to define your own frame or window classes: there are some predefined -that will work with the property list view. See \helpref{Window classes}{windowclasses} for -further details. - -\subsection{Example 1: Property list view} - -The following code fragment shows the essentials of creating a registry of -standard validators, a property sheet containing some properties, and -a property list view and dialog or frame. RegisterValidators will be -called on program start, and PropertySheetTest is called in response to a -menu command. - -Note how some properties are created with an explicit reference to -a validator, and others are provided with a ``role'' which can be matched -against a validator in the registry. - -The interface generated by this test program is shown in the section \helpref{Appearance and -behaviour of a property list view}{appearance}. - -\begin{verbatim} -void RegisterValidators(void) -{ - myListValidatorRegistry.RegisterValidator((wxString)"real", new wxRealListValidator); - myListValidatorRegistry.RegisterValidator((wxString)"string", new wxStringListValidator); - myListValidatorRegistry.RegisterValidator((wxString)"integer", new wxIntegerListValidator); - myListValidatorRegistry.RegisterValidator((wxString)"bool", new wxBoolListValidator); -} - -void PropertyListTest(Bool useDialog) -{ - wxPropertySheet *sheet = new wxPropertySheet; - - sheet->AddProperty(new wxProperty("fred", 1.0, "real")); - sheet->AddProperty(new wxProperty("tough choice", (Bool)TRUE, "bool")); - sheet->AddProperty(new wxProperty("ian", (long)45, "integer", new wxIntegerListValidator(-50, 50))); - sheet->AddProperty(new wxProperty("bill", 25.0, "real", new wxRealListValidator(0.0, 100.0))); - sheet->AddProperty(new wxProperty("julian", "one", "string")); - sheet->AddProperty(new wxProperty("bitmap", "none", "string", new wxFilenameListValidator("Select a bitmap file", "*.bmp"))); - wxStringList *strings = new wxStringList("one", "two", "three", NULL); - sheet->AddProperty(new wxProperty("constrained", "one", "string", new wxStringListValidator(strings))); - - wxPropertyListView *view = - new wxPropertyListView(NULL, - wxPROP_BUTTON_CHECK_CROSS|wxPROP_DYNAMIC_VALUE_FIELD|wxPROP_PULLDOWN); - - wxDialogBox *propDialog = NULL; - wxPropertyListFrame *propFrame = NULL; - if (useDialog) - { - propDialog = new wxPropertyListDialog(view, NULL, "Property Sheet Test", TRUE, -1, -1, 400, 500); - } - else - { - propFrame = new wxPropertyListFrame(view, NULL, "Property Sheet Test", -1, -1, 400, 500); - } - - view->AddRegistry(&myListValidatorRegistry); - - if (useDialog) - { - view->ShowView(sheet, propDialog); - propDialog->Centre(wxBOTH); - propDialog->Show(TRUE); - } - else - { - propFrame->Initialize(); - view->ShowView(sheet, propFrame->GetPropertyPanel()); - propFrame->Centre(wxBOTH); - propFrame->Show(TRUE); - } -} -\end{verbatim} - -\subsection{Example 2: Property form view} - -This example is similar to Example 1, but uses a property form view to -edit a property sheet using a predefined dialog box. - -\begin{verbatim} -void RegisterValidators(void) -{ - myFormValidatorRegistry.RegisterValidator((wxString)"real", new wxRealFormValidator); - myFormValidatorRegistry.RegisterValidator((wxString)"string", new wxStringFormValidator); - myFormValidatorRegistry.RegisterValidator((wxString)"integer", new wxIntegerFormValidator); - myFormValidatorRegistry.RegisterValidator((wxString)"bool", new wxBoolFormValidator); -} - -void PropertyFormTest(Bool useDialog) -{ - wxPropertySheet *sheet = new wxPropertySheet; - - sheet->AddProperty(new wxProperty("fred", 25.0, "real", new wxRealFormValidator(0.0, 100.0))); - sheet->AddProperty(new wxProperty("tough choice", (Bool)TRUE, "bool")); - sheet->AddProperty(new wxProperty("ian", (long)45, "integer", new wxIntegerFormValidator(-50, 50))); - sheet->AddProperty(new wxProperty("julian", "one", "string")); - wxStringList *strings = new wxStringList("one", "two", "three", NULL); - sheet->AddProperty(new wxProperty("constrained", "one", "string", new wxStringFormValidator(strings))); - - wxPropertyFormView *view = new wxPropertyFormView(NULL); - - wxDialogBox *propDialog = NULL; - wxPropertyFormFrame *propFrame = NULL; - if (useDialog) - { - propDialog = new wxPropertyFormDialog(view, NULL, "Property Form Test", TRUE, -1, -1, 400, 300); - } - else - { - propFrame = new wxPropertyFormFrame(view, NULL, "Property Form Test", -1, -1, 400, 300); - propFrame->Initialize(); - } - - wxPanel *panel = propDialog ? propDialog : propFrame->GetPropertyPanel(); - panel->SetLabelPosition(wxVERTICAL); - - // Add items to the panel - - (void) new wxButton(panel, (wxFunction)NULL, "OK", -1, -1, -1, -1, 0, "ok"); - (void) new wxButton(panel, (wxFunction)NULL, "Cancel", -1, -1, 80, -1, 0, "cancel"); - (void) new wxButton(panel, (wxFunction)NULL, "Update", -1, -1, 80, -1, 0, "update"); - (void) new wxButton(panel, (wxFunction)NULL, "Revert", -1, -1, -1, -1, 0, "revert"); - panel->NewLine(); - - // The name of this text item matches the "fred" property - (void) new wxText(panel, (wxFunction)NULL, "Fred", "", -1, -1, 90, -1, 0, "fred"); - (void) new wxCheckBox(panel, (wxFunction)NULL, "Yes or no", -1, -1, -1, -1, 0, "tough choice"); - (void) new wxSlider(panel, (wxFunction)NULL, "Sliding scale", 0, -50, 50, 100, -1, -1, wxHORIZONTAL, "ian"); - panel->NewLine(); - (void) new wxListBox(panel, (wxFunction)NULL, "Constrained", wxSINGLE, -1, -1, 100, 90, 0, NULL, 0, "constrained"); - - view->AddRegistry(&myFormValidatorRegistry); - - if (useDialog) - { - view->ShowView(sheet, propDialog); - view->AssociateNames(); - view->TransferToDialog(); - propDialog->Centre(wxBOTH); - propDialog->Show(TRUE); - } - else - { - view->ShowView(sheet, propFrame->GetPropertyPanel()); - view->AssociateNames(); - view->TransferToDialog(); - propFrame->Centre(wxBOTH); - propFrame->Show(TRUE); - } -} -\end{verbatim} - -\section{Validator classes overview}\label{validatoroverview} - -Classes: \helpref{Validator classes}{validatorclasses} - -The validator classes provide functionality for mediating between a wxProperty and -the actual display. There is a separate family of validator classes for each -class of view, since the differences in user interface for these views implies -that little common functionality can be shared amongst validators. - -\subsection{wxPropertyValidator overview}\label{wxpropertyvalidatoroverview} - -Class: \helpref{wxPropertyValidator}{wxpropertyvalidator} - -This class is the root of all property validator classes. It contains a small -amount of common functionality, including functions to convert between -strings and C++ values. - -A validator is notionally an object which sits between a property and its displayed -value, and checks that the value the user enters is correct, giving an error message -if the validation fails. In fact, the validator does more than that, and is akin to -a view class but at a finer level of detail. It is also responsible for -loading the dialog box control with the value from the property, putting it back -into the property, preparing special controls for editing the value, and -may even invoke special dialogs for editing the value in a convenient way. - -In a property list dialog, there is quite a lot of scope for supplying custom dialogs, -such as file or colour selectors. For a form dialog, there is less scope because -there is no concept of `detailed editing' of a value: one control is associated with -one property, and there is no provision for invoking further dialogs. The reader -may like to work out how the form view could be extended to provide some of the -functionality of the property list! - -Validator objects may be associated explictly with a wxProperty, or they may be -indirectly associated by virtue of a property `kind' that matches validators having -that kind. In the latter case, such validators are stored in a validator registry -which is passed to the view before the dialog is shown. If the validator takes -arguments, such as minimum and maximum values in the case of a wxIntegerListValidator, -then the validator must be associated explicitly with the property. The validator -will be deleted when the property is deleted. - -\subsection{wxPropertyListValidator overview}\label{wxpropertylistvalidatoroverview} - -Class: \helpref{wxPropertyListValidator}{wxpropertylistvalidator} - -This class is the abstract base class for property list view validators. -The list view acts upon a user interface containing a list of properties, -a text item for direct property value editing, confirm/cancel buttons for the value, -a pulldown list for making a choice between values, and OK/Cancel/Help buttons -for the dialog (see \helpref{property list appearance}{appearance}). - -By overriding virtual functions, the programmer can create custom -behaviour for different kinds of property. Custom behaviour can use just the -available controls on the property list dialog, or the validator can -invoke custom editors with quite different controls, which pop up in -`detailed editing' mode. - -See the detailed class documentation for the members you should override -to give your validator appropriate behaviour. - -\subsection{wxPropertyFormValidator overview}\label{wxpropertyformvalidatoroverview} - -This class is the abstract base class for property form view validators. -The form view acts upon an existing dialog box or panel, where either the -panel item names correspond to property names, or the programmer has explicitly -associated the panel item with the property. - -By overriding virtual functions, the programmer determines how -values are displayed or retrieved, and the checking that the validator does. - -See the detailed class documentation for the members you should override -to give your validator appropriate behaviour. - -\section{View classes overview}\label{viewoverview} - -Classes: \helpref{View classes}{viewclasses} - -An instance of a view class relates a property sheet with an actual window. -Currently, there are two classes of view: wxPropertyListView and wxPropertyFormView. - -\subsection{wxPropertyView overview}\label{wxpropertyviewoverview} - -Class: \helpref{wxPropertyView}{wxpropertyview} - -This is the abstract base class for property views. - -\subsection{wxPropertyListView overview}\label{wxpropertylistviewoverview} - -Class: \helpref{wxPropertyListView}{wxpropertylistview} - -The property list view defines the relationship between a property sheet and -a property list dialog or panel. It manages user interface events such as -clicking on a property, pressing return in the text edit field, and clicking -on Confirm or Cancel. These events cause member functions of the -class to be called, and these in turn may call member functions of -the appropriate validator to be called, to prepare controls, check the property value, -invoke detailed editing, etc. - -\subsection{wxPropertyFormView overview}\label{wxpropertyformviewoverview} - -Class: \helpref{wxPropertyFormView}{wxpropertyformview} - -The property form view manages the relationship between a property sheet -and an existing dialog or panel. - -You must first create a panel or dialog box for the view to work on. -The panel should contain panel items with names that correspond to -properties in your property sheet; or you can explicitly set the -panel item for each property. - -Apart from any custom panel items that you wish to control independently -of the property-editing items, wxPropertyFormView takes over the -processing of item events. It can also control normal dialog behaviour such -as OK, Cancel, so you should also create some standard buttons that the property view -can recognise. Just create the buttons with standard names and the view -will do the rest. The following button names are recognised: - -\begin{itemize}\itemsep=0pt -\item {\bf ok}: indicates the OK button. Calls wxPropertyFormView::OnOk. By default, -checks and updates the form values, closes and deletes the frame or dialog, then deletes the view. -\item {\bf cancel}: indicates the Cancel button. Calls wxPropertyFormView::OnCancel. By default, -closes and deletes the frame or dialog, then deletes the view. -\item {\bf help}: indicates the Help button. Calls wxPropertyFormView::OnHelp. This needs -to be overridden by the application for anything interesting to happen. -\item {\bf revert}: indicates the Revert button. Calls wxPropertyFormView::OnRevert, -which by default transfers the wxProperty values to the panel items (in effect -undoing any unsaved changes in the items). -\item {\bf update}: indicates the Revert button. Calls wxPropertyFormView::OnUpdate, which -by defaults transfers the displayed values to the wxProperty objects. -\end{itemize} - -\section{wxPropertySheet overview}\label{wxpropertysheetoverview} - -Classes: \helpref{wxPropertySheet}{wxpropertysheet}, \helpref{wxProperty}{wxproperty}, \helpref{wxPropertyValue}{wxpropertyvalue} - -A property sheet defines zero or more properties. This is a bit like an explicit representation of -a C++ object. wxProperty objects can have values which are pointers to C++ values, or they -can allocate their own storage for values. - -Because the property sheet representation is explicit and can be manipulated by -a program, it is a convenient form to be used for a variety of -editing purposes. wxPropertyListView and wxPropertyFormView are two classes that -specify the relationship between a property sheet and a user interface. You could imagine -other uses for wxPropertySheet, for example to generate a form-like user interface without -the need for GUI programming. Or for storing the names and values of command-line switches, with the -option to subsequently edit these values using a wxPropertyListView. - -A typical use for a property sheet is to represent values of an object -which are only implicit in the current representation of it. For -example, in Visual Basic and similar programming environments, you can -`edit a button', or rather, edit the button's properties. One of the -properties you can edit is {\it width} - but there is no explicit -representation of width in a wxWindows button; instead, you call SetSize -and GetSize members. To translate this into a consisent, -property-oriented scheme, we could derive a new class -wxButtonWithProperties, which has two new functions: SetProperty and -GetProperty. SetProperty accepts a property name and a value, and calls -an appropriate function for the property that is being passed. -GetProperty accepts a property name, returning a property value. So -instead of having to use the usual arbitrary set of C++ member functions -to set or access attributes of a window, programmer deals merely with -SetValue/GetValue, and property names and values. -We now have a single point at which we can modify or query an object by specifying -names and values at run-time. (The implementation of SetProperty and GetProperty -is probably quite messy and involves a large if-then-else statement to -test the property name and act accordingly.) - -When the user invokes the property editor for a wxButtonWithProperties, the system -creates a wxPropertySheet with `imaginary' properties such as width, height, font size -and so on. For each property, wxButtonWithProperties::GetProperty is called, and the result is -passed to the corresponding wxProperty. The wxPropertySheet is passed to a wxPropertyListView -as described elsewhere, and the user edits away. When the user has finished editing, the system calls -wxButtonWithProperties::SetProperty to transfer the wxProperty value back into the button -by way of an appropriate call, wxWindow::SetSize in the case of width and height properties. - - - diff --git a/utils/wxprop/docs/contents.gif b/utils/wxprop/docs/contents.gif deleted file mode 100644 index 3dddfa3dd5..0000000000 Binary files a/utils/wxprop/docs/contents.gif and /dev/null differ diff --git a/utils/wxprop/docs/forward.gif b/utils/wxprop/docs/forward.gif deleted file mode 100644 index 7e3a96d480..0000000000 Binary files a/utils/wxprop/docs/forward.gif and /dev/null differ diff --git a/utils/wxprop/docs/prop.hpj b/utils/wxprop/docs/prop.hpj deleted file mode 100644 index a8226a4b96..0000000000 --- a/utils/wxprop/docs/prop.hpj +++ /dev/null @@ -1,17 +0,0 @@ -[OPTIONS] -BMROOT=c:\wx\utils\wxprop\docs ; Assume that bitmaps are where the source is -TITLE=Property Classes Manual -CONTENTS=Contents -COMPRESS=HIGH - -[FILES] -Prop.rtf - -[CONFIG] -CreateButton("Up", "&Up", "JumpId(`Prop.hlp', `Contents')") -BrowseButtons() - -[MAP] - -[BITMAPS] - diff --git a/utils/wxprop/docs/prop.tex b/utils/wxprop/docs/prop.tex deleted file mode 100644 index 89f12f7713..0000000000 --- a/utils/wxprop/docs/prop.tex +++ /dev/null @@ -1,55 +0,0 @@ -\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report} -\input psbox.tex -% Remove this for processing with dvi2ps instead of dvips -%\special{!/@scaleunit 1 def} -\parskip=10pt -\parindent=0pt -\title{User Manual for wxWindows Property Sheet Classes Version 2.0} -\winhelponly{\author{by Julian Smart, Anthemion Software\\$$\image{}{prop1}$$}} -\winhelpignore{\author{Julian Smart, Anthemion Software} -\date{October 1997} -} -\makeindex -\begin{document} -\maketitle -\pagestyle{fancyplain} -\bibliographystyle{plain} -\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}} -\setfooter{\thepage}{}{}{}{}{\thepage}% -\pagenumbering{roman} -\tableofcontents - -\chapter*{Copyright notice} -\setheader{{\it COPYRIGHT}}{}{}{}{}{{\it COPYRIGHT}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% - -\begin{center} -Copyright (c) 1997 Julian Smart, Anthemion Software -\end{center} - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose is hereby granted without fee, provided that the -above copyright notice, author statement and this permission notice appear in -all copies of this software and related documentation. - -THE SOFTWARE IS PROVIDED ``AS-IS'' AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, -IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF -MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -IN NO EVENT SHALL JULIAN SMART OR ANTHEMION SOFTWARE BE LIABLE FOR ANY SPECIAL, -INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED -OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -\input{body.tex} -\input{classes.tex} -\input{changes.tex} - -\newpage - -\addcontentsline{toc}{chapter}{Index} -\setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}% -\setfooter{\thepage}{}{}{}{}{\thepage}% -\printindex -\end{document} diff --git a/utils/wxprop/docs/prop1.bmp b/utils/wxprop/docs/prop1.bmp deleted file mode 100644 index 92c6beec8b..0000000000 Binary files a/utils/wxprop/docs/prop1.bmp and /dev/null differ diff --git a/utils/wxprop/docs/prop1.eps b/utils/wxprop/docs/prop1.eps deleted file mode 100644 index 02ac7d68cf..0000000000 --- a/utils/wxprop/docs/prop1.eps +++ /dev/null @@ -1,539 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: prop1.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 167 292 445 500 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -167 292 translate - -% size of image (on paper, in 1/72inch coords) -278 208 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 42 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 bf0000 00bf00 bfbf00 0000bf 00bfbf c0c0c0 808080 ff0000 00ff00 -ffff00 0000ff 00ffff ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -278 208 8 % dimensions of data -[278 0 0 -208 0 208] % mapping matrix -rlecmapimage - -7f067f0614060000 -81060d7f0d7f0d110d810700 -82060d067f067f061006810700 -82060d067f067f061006810700 -82060d068106047f047f040c040106810700 -82060d068106048204060d820d060783070d0702010203098102047f047a040106810700 - -82060d068106048704060b060001020781070283020702098109028102047f0446040e0d -81000d0d0d81000481040d0d0d81000481040682060700 -82060d0681060482040806810600820002078507020902070201028109047f044604810d -060b068307000d060b068207000482040d060b068207000481040682060700 -82060d0681060481040685060800040307820702098409020702098109040104050d2d04 -030d0204010d1a04050d6604810d060b068307000d06810600070001068207000482040d -060b068207000481040682060700 -82060d068106048704060b0604000a0789070209020702070209040104010d0204010d1d -04010d0b04010d0104010d0104010d1204010d0704010d1004010d5504810d060b068307 -000d06810600070001068207000482040d06010601000306010001068207000481040682 -060700 -82060d068106048204070681060001000107010286070209020702040104010d0204010d -1d04010d0b04010d0504010d1204010d0704010d1004010d5504810d060b068307000d06 -820600060506810006830607000482040d06020601000106010002068207000481040682 -060700 -82060d0681060485040d0607060d010d8407020002090109820200040104010d0204010d -81040d010d0104030d0104040d0204030d0104020d81040d010d81040d820d040d810d04 -0304010d0504040d0204030d0204030d0104020d0604010d0404030d0204020d0104020d -5404810d060b068307000d06820600060506810006830607000482040d06030603000306 -8207000481040682060700 -82060d068106048104070507010006020204050d0104010d0104010d0104010d81040d81 -0d0481040d820d040d810d0481040d820d040d810d0481040d810d0481040d820d040d81 -0d040404030d0204020d81040d820d040d810d0481040d820d040d810d0481040d820d04 -0d810d040604010d0304010d0104010d81040d820d040d820d040d810d045404810d060b -068307000d06820600060506810006830607000482040d06040601000406820700048104 -0682060700 -82060d068106048104050505010006030204010d0504010d0104010d0104010d81040d81 -0d0481040d820d040d040d81040d810d0481040d810d0481040d820d040d810d04070401 -0d0104010d0104010d81040d040d81040d040d81040d810d040604010d0304050d010401 -0d0204010d5504810d060b068307000d06820600060506810006830607000482040d0603 -06030003068207000481040682060700 -82060d0681060481040c010c8205080c830c05030a020a81030a810a040104010d050401 -0d0104010d0104010d81040d810d0481040d820d040d810d040304010d0104010d010401 -0d81040d810d040704010d0104010d0104010d81040d810d040304010d0404010d070401 -0d0304010d0604010d0104010d5504810d060b068307000d068206000605068100068306 -07000482040d06020601000106010002068207000481040682060700 -82060d068106048c040c05070507050c05030a030a840a03000a040104010d0504010d01 -04010d0104010d81040d810d0481040d820d040d810d0481040d820d040d810d0481040d -810d040104020d0504010d0104010d0104010d0104010d81040d810d0481040d820d040d -810d0481040d820d040d810d040604010d0304010d0104010d81040d820d040d820d040d -810d045404810d060106050003068307000d06820600060506810006830607000482040d -06010601000306010001068207000481040682060700 -82060d0681060482040c08020886070c05030a030a010a82030a040104010d0504010d02 -04030d0104040d0204030d0104010d0204010d0104010d0704030d0204010d0104010d01 -04030d0204030d0204010d0604010d0404030d0204020d0204010d5404810d0601060500 -03068307000d06810600070001068207000482040d060b068207000481040682060700 -82060d0681060482040c080208010c8205030a810a0384030a030a041404010d1404010d -7f041804810d060b068307000d060b068207000482040d060b0682070004810406820607 -00 -82060d0681060482040c080308850c05030a030a010a82000a041404010d1204020d7f04 -1904810d070c0782000d070c0781000482040d070c0781000481040682060700 -82060d0681060483040c05080208850c05030a030a810a0382030a047f0446041f000104 -0f0001040106810700 -82060d0681060481040c050c8205030a050a7f047b040106810700 -82060d068106047f047f040c040106810700 -82060d067f067f061006810700 -82060d067f067f061006810700 -82060d0637067f073907810d061c06810700 -82060d06030616000306160001068107007f00360082060d0681060015000406810700 -82060d06020681000d140d820700068206000d140d8507000607000d7f0d350d84060d06 -000d140d820700060206810700 -82060d06020682000d06120601078100068306000d061206010784000607000d7f0d350d -84060d06000d130d01078100060206810700 -82060d06020682000d06120601078100068306000d061206010784000607000d7f0d350d -84060d06000d810d06110601078100060206810700 -82060d06020682000d06120601078100068306000d061206010784000607000d7f0d350d -84060d06000d810d06110601078100060206810700 -82060d06020682000d0603068100060606810006030601078100068306000d0612060107 -84000607000d820d000d7f0d320d84060d06000d810d06110601078100060206810700 -82060d06020682000d06030683000600060306810006040601078100068306000d061206 -010785000607000d0081000d7f0d320d84060d06000d810d061106010781000602068107 -00 -82060d06020682000d06040683000600060106810006050601078100068306000d060b06 -8100060406010785000607000d000100810d0081000d820d000d810d0081000d810d0002 -007f0d220d84060d06000d810d06110601078100060206810700 -82060d06020682000d06050685000600060006060601078100068306000d060a06830006 -00060306010785000607000d0081000d810d0082000d000100810d0082000d0081000d81 -0d0081000d7f0d200d84060d06000d810d06110601078100060206810700 -82060d06020682000d0606068300060006070601078100068306000d0609068300060006 -0406010785000607000d0081000d810d0082000d000100810d0082000d0081000d810d00 -81000d7f0d200d84060d06000d810d06110601078100060206810700 -82060d06020682000d0607068300060006060601078100068306000d0604068100060106 -83000600060506010785000607000d0081000d010d0200810d000100010d0100010d0100 -7f0d210d84060d06000d810d06110601078100060206810700 -82060d06020682000d06060685000600060006050601078100068306000d060306870006 -0006000600060606010785000607000d0081000d010d0200810d000100010d0100010d01 -007f0d210d84060d06000d810d06110601078100060206810700 -82060d06020682000d06050681000601068300060006040601078100068306000d060406 -850006000600060706010784000607000d810d0081000d810d0081000d010d0100020d03 -007f0d220d84060d06000d810d0603060100810600820006008100060406010781000602 -06810700 -82060d06020682000d06040681000603068300060006030601078100068306000d060506 -83000600060806010784000607000d7f0d350d84060d06000d810d060306010081060082 -000600810006040601078100060206810700 -82060d06020682000d060306010005060100040601078100068306000d06060681000609 -06010784000607000d7f0d350d84060d06000d810d06110601078100060206810700 -82060d06020682000d06120601078100068306000d061206010784000607000d7f0d350d -84060d06000d810d06110601078100060206810700 -82060d06020682000d06120601078100068306000d061206010784000607000d7f0d350d -84060d06000d810d06110601078100060206810700 -82060d06020682000d0714078100068306000d07140784000607000d7f0d350d85060d06 -000d0714078100060206810700 -82060d06020682000d0714078100068306000d07140784000607000d7f0d350d84060d06 -000715078100060206810700 -82060d06030616000306160001068207000d7f0d350d82060d0681060015000406810700 - -82060d0637068107067f063706810d061c06810700 -82060d0637067f0d3a0d1d06810700 -82060d0601067f077f070a07810d060106810700 -82060d0601068107007f007f00070082060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d010d0300010d0400020d03007f0d720d82060d060106810700 -82060d0601068207000d810d0081000d810d0082000d0081000d810d0082000d0081000d -810d0081000d7f0d700d82060d060106810700 -82060d0601068207000d810d0081000d810d0082000d0081000d810d0082000d0004007f -0d710d82060d060106810700 -82060d0601068207000d810d0081000d810d0082000d0081000d810d0082000d0081000d -7f0d740d82060d060106810700 -82060d0601068207000d810d0081000d810d0082000d0081000d810d0082000d0081000d -810d0081000d7f0d700d82060d060106810700 -82060d0601068207000d010d0300010d0100010d0100010d03007f0d720d82060d060106 -810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d060106ff0700040a040a040a040a040a040a040a040a040a040a040a040a040a04 -0a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a04 -0a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a04 -0a040a040a040a040a040a040a040a040a040a040a040a040a040aff040a040a040a040a -040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a -040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a -040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a -040a040a040a040a040a040a8c040a040a040a040a040a060d060106810700 -82060d0601068307000a047f047f04050482060d060106810700 -82060d060106820700047f047f040504830a060d060106810700 -82060d0601068307000a0482040d047f047f04020482060d060106810700 -82060d0601068207000481040d810d047f047f040104830a060d060106810700 -82060d0601068307000a0d020d81040d810d0482040d0481040d810d0481040d020d7f04 -720482060d060106810700 -82060d0601068207000481040d810d0481040d820d040d010d81040d820d040d810d0481 -040d810d047f046f04830a060d060106810700 -82060d0601068407000a040d810d0481040d820d040d010d81040d820d040d810d048104 -0d810d047f04700482060d060106810700 -82060d0601068207000481040d810d040104020d81040d010d0104010d0104010d7f0470 -04830a060d060106810700 -82060d0601068407000a040d810d040104020d81040d010d0104010d0104010d7f047104 -82060d060106810700 -82060d060106820700040104010d0104010d0204010d0204030d7f047104830a060d0601 -06810700 -82060d0601068307000a047f047f04050482060d060106810700 -82060d060106820700047f047f040504830a060d060106810700 -82060d060106ff07000a040a040a040a040a040a040a040a040a040a040a040a040a040a -040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a -040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a -040a040a040a040a040a040a040a040a040a040a040a040a040a04ff0a040a040a040a04 -0a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a04 -0a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a04 -0a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a040a04 -0a040a040a040a040a040a048c0a040a040a040a040a04060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d010d81000d810d0081000d7f0d7e0d82060d060106810700 -82060d0601068207000d810d0081000d810d0081000d7f0d7e0d82060d060106810700 -82060d0601068307000d000200810d000300010d0300010d0300020d03007f0d690d8206 -0d060106810700 -82060d0601068207000d810d0081000d810d0081000d810d0082000d0081000d010d0100 -010d0100810d0081000d810d0081000d7f0d670d82060d060106810700 -82060d0601068207000d810d0081000d810d0081000d810d0082000d0081000d010d0500 -810d0004007f0d680d82060d060106810700 -82060d0601068207000d810d0081000d810d0081000d810d0082000d0081000d010d0100 -040d01007f0d6c0d82060d060106810700 -82060d0601068207000d810d0081000d810d0081000d810d0082000d0081000d010d0100 -010d0100810d0081000d810d0081000d7f0d670d82060d060106810700 -82060d0601068207000d010d0100810d0081000d810d0082000d0081000d020d0300020d -03007f0d690d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068207000d7f0d7f0d060d82060d060106810700 -82060d0601068107067f067f060806810d060106810700 -82060d0601067f0d7f0d0b0d0206810700 -82060d067f067f061006810700 -82060d067f067f061006810700 -82060d0601067f077f070b070206810700 -82060d0601068107007f007f000800810d060106810700 -82060d0601068207000d7f0d760d0e060100810d060106810700 -82060d0601068207000d7f0d760d81060d0b0d81070082000d060106810700 -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d1c0d0100120d01000e0d81000d6b0d0400400d82060d060a0681 -070082000d060106810700 -82060d0601068207000d010d81000d190d81000d120d81000d7b0d85000d000d000d3f0d -82060d060a0681070082000d060106810700 -82060d0601068207000d810d000300030d0200010d0100010d0100020d0100810d008400 -0d000d0081000d090d0300010d82000d0081000d020d0200020d0200040d0300020d0200 -5f0d81000d020d0100810d0082000d0081000d810d0081000d010d02002c0d82060d0603 -06810006040681070082000d060106810700 -82060d0601068207000d010d81000d040d81000d010d81000d820d000d010d81000d820d -000d810d0081000d810d0081000d820d000d070d81000d010d81000d810d0081000d820d -000d820d000d010d81000d020d81000d020d81000d010d81000d820d000d010d81000d5d -0d81000d030d0100030d81000d010d81000d820d000d010d81000d2a0d82060d06020602 -00040681070082000d060106810700 -82060d0601068207000d010d81000d040d81000d010d81000d820d000d010d81000d820d -000d010d81000d820d000d010d81000d070d81000d040d81000d010d81000d820d000d01 -0d81000d020d81000d020d81000d040d04005e0d81000d030d81000d030d81000d010d81 -000d810d0003002b0d82060d0601060400030681070082000d060106810700 -82060d0601068207000d010d81000d010d81000d820d000d010d81000d820d000d810d00 -81000d820d000d010d81000d820d000d010d81000d070d81000d040d81000d010d81000d -820d000d010d81000d020d81000d020d81000d040d81000d610d81000d030d81000d030d -81000d810d0081000d820d000d2e0d82060d068106000500020681070082000d06010681 -0700 -82060d0601068207000d020d0200030d0200030d0100810d0081000d810d000200810d00 -0100810d000100080d0300810d000100810d000100010d0200020d0400020d0300020d03 -005d0d0200020d0300030d0100810d0081000d810d0002002b0d82060d060a0681070082 -000d060106810700 -82060d0601068207000d1a0d81000d7f0d590d82060d060a0681070082000d0601068107 -00 -82060d0601068207000d170d02007f0d5b0d82060d060a0681070082000d060106810700 - -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d7f0d760d8106070c070100810d060106810700 -82060d0601068207000d7f0d760d1000810d060106810700 -82060d0601068207000d7f0d760d92060d060d060d060d060d060d060d060d000d060106 -810700 -82060d0601068207000d7f0d770d91060d060d060d060d060d060d060d06000d06010681 -0700 -82060d0601068207000d030d81000d7f0d2d0d81000d020d0300390d92060d060d060d06 -0d060d060d060d060d000d060106810700 -82060d0601068207000d7f0d320d0100030d81000d3c0d91060d060d060d060d060d060d -060d06000d060106810700 -82060d0601068207000d010d0200040d0200010d0100810d0081000d7f0d1c0d83000d00 -0d020d81000d3b0d92060d060d060d060d060d060d060d060d000d060106810700 -82060d0601068207000d030d81000d020d81000d010d81000d810d0081000d820d000d7f -0d1a0d81000d820d000d020d02003b0d91060d060d060d060d060d060d060d06000d0601 -06810700 -82060d0601068207000d030d81000d030d0300010d81000d010d81000d7f0d1a0d040005 -0d81000d380d92060d060d060d060d060d060d060d060d000d060106810700 -82060d0601068207000d030d81000d020d81000d010d81000d820d000d010d81000d7f0d -1d0d81000d010d81000d010d81000d380d0e060100810d060106810700 -82060d0601068207000d010d0400010d0800810d0001007f0d1c0d0200020d02003a0d81 -060d0b0d81070082000d060106810700 -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d810d0081000d060d81000d030d0100040d01007f0d170d020003 -0d0300390d82060d060a0681070082000d060106810700 -82060d0601068207000d010d81000d0d0d81000d040d81000d7f0d150d81000d010d8100 -0d010d81000d3b0d82060d060a0681070082000d060106810700 -82060d0601068207000d010d82000d0081000d010d0200050d81000d040d81000d7f0d18 -0d81000d020d81000d3b0d82060d060a0681070082000d060106810700 -82060d0601068207000d010d0100010d81000d020d81000d040d81000d040d81000d7f0d -170d81000d030d02003a0d82060d060a0681070082000d060106810700 -82060d0601068207000d010d81000d010d81000d020d81000d040d81000d040d81000d7f -0d160d81000d070d81000d380d82060d060a0681070082000d060106810700 -82060d0601068207000d010d81000d010d81000d020d81000d040d81000d040d81000d7f -0d150d81000d040d81000d010d81000d380d82060d060a0681070082000d060106810700 - -82060d0601068207000d810d000300020d0400010d0400010d04007f0d140d0400020d02 -003a0d82060d060a0681070082000d060106810700 -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d030d81000d0a0d0100050d81000d7f0d5b0d82060d060a068107 -0082000d060106810700 -82060d0601068207000d110d81000d7f0d620d82060d060a0681070082000d0601068107 -00 -82060d0601068207000d010d0300010d0100010d0100030d81000d020d0200040d020001 -0d0100810d0081000d7f0d070d0200010d0100810d0081000d020d0200330d82060d060a -0681070082000d060106810700 -82060d0601068207000d040d81000d010d81000d010d81000d020d81000d040d81000d02 -0d81000d010d81000d810d0081000d820d000d7f0d050d81000d010d81000d810d008100 -0d820d000d820d000d010d81000d310d82060d060a0681070082000d060106810700 -82060d0601068207000d040d81000d010d81000d010d81000d020d81000d040d81000d03 -0d0300010d81000d010d81000d7f0d050d81000d010d81000d820d000d010d81000d810d -000300320d82060d060a0681070082000d060106810700 -82060d0601068207000d040d81000d010d81000d810d0081000d020d81000d040d81000d -020d81000d010d81000d820d000d010d81000d7f0d050d81000d010d81000d820d000d01 -0d81000d820d000d350d82060d060a0681070082000d060106810700 -82060d0601068207000d040d81000d020d0100810d0082000d000300010d0400010d0800 -810d0001007f0d060d0200010d0200810d000100010d0300320d82060d060a0681070082 -000d060106810700 -82060d0601068207000d040d81000d7f0d6f0d82060d060a0681070082000d0601068107 -00 -82060d0601068207000d010d02007f0d710d82060d060a0681070082000d060106810700 - -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d7f0d760d82060d060a0681070082000d060106810700 -82060d0601068207000d810d0081000d060d81000d7f0d690d82060d060a068107008200 -0d060106810700 -82060d0601068207000d010d81000d0b0d81000d7f0d640d82060d060a0681070082000d -060106810700 -82060d0601068207000d010d82000d0081000d010d0200020d0400010d0200820d000d02 -0d0200010d0100810d0081000d7f0d050d0100810d0081000d020d0200010d0100810d00 -81000d020d02002c0d82060d060a0681070082000d060106810700 -82060d0601068207000d010d0100010d81000d020d81000d020d81000d040d85000d000d -000d820d000d010d81000d810d0081000d820d000d7f0d050d0100010d81000d820d000d -010d81000d810d0081000d820d000d820d000d010d81000d2a0d82060d060a0681070082 -000d060106810700 -82060d0601068207000d010d81000d010d81000d020d81000d020d81000d040d85000d00 -0d000d010d0300010d81000d010d81000d7f0d050d81000d010d81000d820d000d010d81 -000d820d000d010d81000d810d0003002b0d82060d060a0681070082000d060106810700 - -82060d0601068207000d010d81000d010d81000d020d81000d020d81000d010d81000d86 -0d000d000d000d820d000d010d81000d820d000d010d81000d7f0d050d81000d010d8100 -0d820d000d010d81000d820d000d010d81000d820d000d2e0d82060d060a068107008200 -0d060106810700 -82060d0601068207000d810d000300020d0400020d0200010d0600810d000400810d0002 -007f0d060d0200810d000100010d0200010d0200810d000100010d03002b0d8106070c07 -0100810d060106810700 -82060d0601068207000d240d81000d7f0d4f0d1000810d060106810700 -82060d0601068207000d230d02007f0d4f0d0e060100810d060106810700 -82060d0601068207000d7f0d760d81060d0b0d81070082000d060106810700 -82060d060106820700047f04760482060d060a0681070082000d060106810700 -82060d060106820700047f04760482060d060a0681070082000d060106810700 -82060d060106820700047f04760482060d060a0681070082000d060106810700 -82060d060106820700047f04760482060d060a0681070082000d060106810700 -82060d060106820700043404810d041304010d7f04290482060d06810600050002068107 -0082000d060106810700 -82060d060106820700041d04810d042b04810d046204810d04430482060d060106040003 -0681070082000d060106810700 -82060d060106820700040204030d0204020d0104010d81040d810d040204030d81040d03 -0d0204010d81040d810d040104020d0204020d0204010d81040d810d040204020d030401 -0d82040d046104040d0104020d81040d010d0104020d330482060d060206020004068107 -0082000d060106810700 -82060d060106820700040104810d040104810d0482040d040104810d0481040d810d0482 -040d0482040d040404810d040504010d0304810d040104810d040204810d040204010d01 -04810d0482040d040104810d0482040d0481040d810d046204810d040404810d04010481 -0d0482040d040104810d04310482060d060306810006040681070082000d060106810700 - -82060d060106820700040104810d040404810d040104810d0482040d040104810d040104 -020d0204810d040504810d040404030d0304810d040204810d040104810d0481040d030d -0104810d040104810d046204810d040404850d040d040d0482040d040104810d04310482 -060d060a0681070082000d060106810700 -82060d060106820700040104810d040404810d040104810d0482040d040104810d040404 -810d0482040d040104810d040104810d040304810d040104810d040204810d040204810d -040104810d0482040d040404810d040104810d046204810d040104810d0486040d040d04 -0d0482040d040104810d04310482060d060a0681070082000d060106810700 -82060d060106820700040204030d0204020d0104020d81040d010d81040d020d0304020d -0204030d0204050d81040d030d81040d010d81040d010d0104030d0204040d6304020d03 -04830d040d040204020d330482060d060a0681070082000d060106810700 -82060d060106820700047f04760482060d060a0681070082000d060106810700 -82060d060106820700047f0476048106070c070100810d060106810700 -82060d060106820700047f0476041000810d060106810700 -82060d0601068107067f0677061000810d060106810700 -82060d0601067f0d7f0d0b0d0206810700 -82060d067f067f061006810700 -82060d067f067f061006810700 -82060d067f067f061006810700 -82060d067f067f061006810700 -82060d067f067f061006810700 -82060d067f067f061006810700 -82060d067f067f061006810700 -82060d067f067f061006810700 -82060d067f067f061006810700 -8106077f077f0712070000 -7f007f001500 - -% -% Compression made this file 6.27% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/wxprop/docs/prop1.gif b/utils/wxprop/docs/prop1.gif deleted file mode 100644 index 48715b5525..0000000000 Binary files a/utils/wxprop/docs/prop1.gif and /dev/null differ diff --git a/utils/wxprop/docs/prop2.bmp b/utils/wxprop/docs/prop2.bmp deleted file mode 100644 index d909f41abc..0000000000 Binary files a/utils/wxprop/docs/prop2.bmp and /dev/null differ diff --git a/utils/wxprop/docs/prop2.eps b/utils/wxprop/docs/prop2.eps deleted file mode 100644 index 398e70c553..0000000000 --- a/utils/wxprop/docs/prop2.eps +++ /dev/null @@ -1,664 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: prop2.eps -%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley -%%BoundingBox: 167 221 466 500 -%%Pages: 1 -%%DocumentFonts: -%%EndComments -%%EndProlog - -%%Page: 1 1 - -% remember original state -/origstate save def - -% build a temporary dictionary -20 dict begin - -% lower left corner -167 221 translate - -% size of image (on paper, in 1/72inch coords) -299 279 scale - -% define 'colorimage' if it isn't defined -% ('colortogray' and 'mergeprocs' come from xwd2ps -% via xgrab) -/colorimage where % do we know about 'colorimage'? - { pop } % yes: pop off the 'dict' returned - { % no: define one - /colortogray { % define an RGB->I function - /rgbdata exch store % call input 'rgbdata' - rgbdata length 3 idiv - /npixls exch store - /rgbindx 0 store - /grays npixls string store % str to hold the result - 0 1 npixls 1 sub { - grays exch - rgbdata rgbindx get 20 mul % Red - rgbdata rgbindx 1 add get 32 mul % Green - rgbdata rgbindx 2 add get 12 mul % Blue - add add 64 idiv % I = .5G + .31R + .18B - put - /rgbindx rgbindx 3 add store - } for - grays - } bind def - - % Utility procedure for colorimage operator. - % This procedure takes two procedures off the - % stack and merges them into a single procedure. - - /mergeprocs { % def - dup length - 3 -1 roll - dup - length - dup - 5 1 roll - 3 -1 roll - add - array cvx - dup - 3 -1 roll - 0 exch - putinterval - dup - 4 2 roll - putinterval - } bind def - - /colorimage { % def - pop pop % remove 'false 3' operands - {colortogray} mergeprocs - image - } bind def - } ifelse % end of 'false' case - - - -% define the colormap -/cmap 42 string def - - -% load up the colormap -currentfile cmap readhexstring -000000 bf0000 00bf00 bfbf00 0000bf 00bfbf c0c0c0 808080 ff0000 00ff00 -ffff00 0000ff 00ffff ffffff -pop pop % lose return values from readhexstring - - -% rlecmapimage expects to have 'w h bits matrix' on stack -/rlecmapimage { - /buffer 1 string def - /rgbval 3 string def - /block 384 string def - - % proc to read a block from file, and return RGB data - { currentfile buffer readhexstring pop - /bcount exch 0 get store - bcount 128 ge - { % it's a non-run block - 0 1 bcount 128 sub - { currentfile buffer readhexstring pop pop - - % look up value in color map - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - % and put it in position i*3 in block - block exch 3 mul rgbval putinterval - } for - block 0 bcount 127 sub 3 mul getinterval - } - - { % else it's a run block - currentfile buffer readhexstring pop pop - - % look up value in colormap - /rgbval cmap buffer 0 get 3 mul 3 getinterval store - - 0 1 bcount { block exch 3 mul rgbval putinterval } for - - block 0 bcount 1 add 3 mul getinterval - } ifelse - } % end of proc - false 3 colorimage -} bind def - - -299 279 8 % dimensions of data -[299 0 0 -279 0 279] % mapping matrix -rlecmapimage - -7f0003007f072607 -07077f067f0618068100070707 -070781060d7f0d7f0d150d820700070707 -070782060d067f067f061406820700070707 -070782060d067f067f061406820700070707 -070782060d068106077f077f0710070106820700070707 -070782060d068106078207060d820d060783070d0702010203098102077f077e07010682 -0700070707 -070782060d068106078707060b060001020781070283020702098109028102077f074a07 -0e0d81000d0d0d81000781070d0d0d81000781070683060700070707 -070782060d0681060782070806810600820002078507020902070201028109077f074a07 -810d060b068307000d060b068207000782070d060b068207000781070683060700070707 - -070782060d06810607810706850608000403078207020984090207020981090701070506 -2d070306020701061a0705066a07810d060b068307000d06810600070001068207000782 -070d060b068207000781070683060700070707 -070782060d068106078707060b0604000a07890702090207020702090701070106020701 -061d0701060b07010601070106010701061207010607070106100701065907810d060b06 -8307000d06810600070001068207000782070d0601060100030601000106820700078107 -0683060700070707 -070782060d0681060701070106020001070102860702090207020701070106020701061d -0701060b070106050701061207010607070106100701065907810d060b068307000d0682 -0600060506810006830607000782070d0602060100010601000206820700078107068306 -0700070707 -070782060d0681060785070d0607060d010d840702000209010982020007010701060207 -010681070601060107030601070406020703060107020681070601068107068206070681 -060703070106050704060207030602070306010702060607010604070306020702060107 -02065807810d060b068307000d06820600060506810006830607000782070d0603060300 -03068207000781070683060700070707 -070782060d06810607070701000602020705060107010601070106010701068107068106 -078107068206070681060781070682060706810607810706810607810706820607068106 -070407030602070206810706820607068106078107068206070681060781070682060706 -81060706070106030701060107010681070682060706820607068106075807810d060b06 -8307000d06820600060506810006830607000782070d0604060100040682070007810706 -83060700070707 -070782060d06810607810705050501000603020701060507010601070106010701068107 -068106078107068206070604068107068106078107068106078107068206070681060707 -070106010701060107010681070604068107060406810706810607060701060307050601 -070106020701065907810d060b068307000d06820600060506810006830607000782070d -060306030003068207000781070683060700070707 -070782060d0681060781070c010c8205080c830c05030a020a81030a810a070107010605 -070106010701060107010681070681060781070682060706810607030701060107010601 -070106810706810607070701060107010601070106810706810607030701060407010607 -0701060307010606070106010701065907810d060b068307000d06820600060506810006 -830607000782070d06020601000106010002068207000781070683060700070707 -070782060d068106078c070c05070507050c05030a030a840a03000a0701070106050701 -060107010601070106810706810607810706820607068106078107068206070681060781 -070681060701070206050701060107010601070106010701068107068106078107068206 -070681060781070682060706810607060701060307010601070106810706820607068206 -07068106075807810d060106050003068307000d06820600060506810006830607000782 -070d06010601000306010001068207000781070683060700070707 -070782060d0681060782070c08020886070c05030a030a010a82030a0701070106050701 -060207030601070406020703060107010602070106010701060707030602070106010701 -06010703060207030602070106060701060407030602070206020701065807810d060106 -050003068307000d06810600070001068207000782070d060b0682070007810706830607 -00070707 -070782060d0681060782070c080208010c8205030a810a0384030a030a07140701061407 -01067f071c07810d060b068307000d060b068207000782070d060b068207000781070683 -060700070707 -070782060d0681060782070c080308850c05030a030a010a82000a071407010612070206 -7f071d07810d070c0782000d070c0781000782070d070c07810007810706830607000707 -07 -070782060d0681060783070c05080208850c05030a030a810a0382030a077f074a071f00 -01070f0001070106820700070707 -070782060d0681060781070c050c8205030a050a7f077f070106820700070707 -070782060d068106077f077f0710070106820700070707 -070782060d067f067f061406820700070707 -070782060d067f067f061406820700070707 -070782060d0637067f073d07810d061c06820700070707 -070782060d06030616000306160001068107007f003a0082060d06810600150004068207 -00070707 -070782060d06020681000d140d820700068206000d140d8507000607000d7f0d390d8406 -0d06000d140d820700060206820700070707 -070782060d06020682000d06120601078100068306000d061206010784000607000d7f0d -390d84060d06000d130d01078100060206820700070707 -070782060d06020682000d06120601078100068306000d061206010784000607000d7f0d -390d84060d06000d810d06110601078100060206820700070707 -070782060d06020682000d06120601078100068306000d061206010784000607000d7f0d -390d84060d06000d810d06110601078100060206820700070707 -070782060d06020682000d0603068100060606810006030601078100068306000d061206 -010784000607000d010d0100020d0200020d0200020d02007f0d230d84060d06000d810d -06110601078100060206820700070707 -070782060d06020682000d060306020003060200040601078100068306000d060b068100 -060406010784000607000d810d000100010d0100810d0082000d0082000d0082000d0082 -000d0081000d7f0d210d84060d06000d810d06110601078100060206820700070707 -070782060d06020682000d060406020001060200050601078100068306000d060a060200 -0406010785000607000d000200010d0100810d0082000d0082000d0082000d0082000d00 -81000d7f0d210d84060d06000d810d06110601078100060206820700070707 -070782060d06020682000d0605060500060601078100068306000d060906030004060107 -87000607000d000d0081000d810d0082000d0082000d0082000d0082000d0082000d0081 -000d7f0d210d84060d06000d810d06110601078100060206820700070707 -070782060d06020682000d0606060300070601078100068306000d060806030005060107 -84000607000d010d0100010d0100810d0082000d0082000d0082000d0082000d0081000d -7f0d210d84060d06000d810d06110601078100060206820700070707 -070782060d06020682000d0606060300070601078100068306000d060306010001060300 -0606010784000607000d010d0100010d0100810d0082000d0082000d0082000d0082000d -0081000d7f0d210d84060d06000d810d06110601078100060206820700070707 -070782060d06020682000d0605060500060601078100068306000d060306060007060107 -84000607000d010d0100010d0100810d0082000d0082000d0082000d0082000d0081000d -7f0d210d84060d06000d810d06110601078100060206820700070707 -070782060d06020682000d060406020001060200050601078100068306000d0604060400 -0806010784000607000d010d0100020d0200020d0200020d02007f0d230d84060d06000d -810d060306010781060782070607810706040601078100060206820700070707 -070782060d06020682000d060306020003060200040601078100068306000d0605060200 -0906010784000607000d7f0d390d84060d06000d810d0603060107810607820706078107 -06040601078100060206820700070707 -070782060d06020682000d060306010005060100040601078100068306000d0606068100 -060906010784000607000d7f0d390d84060d06000d810d06110601078100060206820700 -070707 -070782060d06020682000d06120601078100068306000d061206010784000607000d7f0d -390d84060d06000d810d06110601078100060206820700070707 -070782060d06020682000d06120601078100068306000d061206010784000607000d7f0d -390d84060d06000d810d06110601078100060206820700070707 -070782060d06020682000d0714078100068306000d07140784000607000d7f0d390d8506 -0d06000d0714078100060206820700070707 -070782060d06020682000d0714078100068306000d07140784000607000d7f0d390d8406 -0d06000715078100060206820700070707 -070782060d06030616000306160001068207000d7f0d390d82060d068106001500040682 -0700070707 -070782060d0637068107067f063b06810d061c06820700070707 -070782060d0637067f0d3e0d1d06820700070707 -070782060d0601067f077f070e07810d060106820700070707 -070782060d0601068107007f007f000b0082060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d040d0100120d01007f0d150d0200550d82060d0601068207 -00070707 -070782060d0601068207000d030d81000d140d81000d7f0d130d81000d010d81000d530d -82060d060106820700070707 -070782060d0601068207000d020d0300010d0100810d0081000d010d0200030d0100820d -000d7f0d130d81000d010d81000d530d82060d060106820700070707 -070782060d0601068207000d030d81000d030d0100030d81000d010d81000d820d000d81 -0d0081000d7f0d130d81000d010d81000d530d82060d060106820700070707 -070782060d0601068207000d030d81000d030d81000d030d0400010d81000d010d81000d -7f0d130d81000d010d81000d530d82060d060106820700070707 -070782060d0601068207000d030d81000d030d81000d030d81000d040d81000d010d8100 -0d7f0d130d81000d010d81000d530d82060d060106820700070707 -070782060d0601068207000d020d0300010d0300030d0300020d04007f0d140d0200550d -82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d1c0d0100120d01000e0d81000d6b0d0400090d0100480d82 -060d060106820700070707 -070782060d0601068207000d010d81000d190d81000d120d81000d7c0d81000d820d000d -090d81000d470d82060d060106820700070707 -070782060d0601068207000d810d000300030d0200010d0100010d0100020d0100810d00 -84000d000d0081000d090d0300010d82000d0081000d020d0200020d0200040d0300020d -02005e0d83000d000d020d0200040d81000d030d0300020d0200390d82060d0601068207 -00070707 -070782060d0601068207000d010d81000d040d81000d010d81000d820d000d010d81000d -820d000d810d0081000d810d0081000d820d000d070d81000d010d81000d810d0081000d -820d000d820d000d010d81000d020d81000d020d81000d010d81000d820d000d010d8100 -0d5c0d0200020d81000d010d81000d020d81000d020d81000d040d81000d010d81000d37 -0d82060d060106820700070707 -070782060d0601068207000d010d81000d040d81000d010d81000d820d000d010d81000d -820d000d010d81000d820d000d010d81000d070d81000d040d81000d010d81000d820d00 -0d010d81000d020d81000d020d81000d040d04005d0d83000d000d020d0300030d81000d -030d0200020d0400380d82060d060106820700070707 -070782060d0601068207000d010d81000d010d81000d820d000d010d81000d820d000d81 -0d0081000d820d000d010d81000d820d000d010d81000d070d81000d040d81000d010d81 -000d820d000d010d81000d020d81000d020d81000d040d81000d600d81000d030d81000d -010d81000d020d81000d060d81000d820d000d3b0d82060d060106820700070707 -070782060d0601068207000d020d0200030d0200030d0100810d0081000d810d00020081 -0d000100810d000100080d0300810d000100810d000100010d0200020d0400020d030002 -0d03005c0d0200030d0500810d000300010d0300030d0300380d82060d06010682070007 -0707 -070782060d0601068207000d1a0d81000d7f0d6d0d82060d060106820700070707 -070782060d0601068207000d170d02007f0d6f0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d060106820700047f047f040a0482060d060106820700070707 -070782060d060106820700047f047f040a0482060d060106820700070707 -070782060d060106820700047f047f040a0482060d060106820700070707 -070782060d060106820700047f047f040a0482060d060106820700070707 -070782060d060106820700040304810d047f043204010d4f0482060d0601068207000707 -07 -070782060d060106820700047f043904810d044e0482060d060106820700070707 -070782060d060106820700040104020d0404020d0104010d81040d810d047f042404810d -044e0482060d060106820700070707 -070782060d060106820700040304810d040204810d040104810d0481040d810d0482040d -047f041a04040d0304810d044e0482060d060106820700070707 -070782060d060106820700040304810d040304030d0104810d040104810d047f04230481 -0d044e0482060d060106820700070707 -070782060d060106820700040304810d040204810d040104810d0482040d040104810d04 -7f042304810d044e0482060d060106820700070707 -070782060d060106820700040104040d0104080d81040d010d7f042104040d4d0482060d -060106820700070707 -070782060d060106820700047f047f040a0482060d060106820700070707 -070782060d060106820700047f047f040a0482060d060106820700070707 -070782060d060106820700047f047f040a0482060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d810d0081000d060d81000d030d0100040d01007f0d170d02 -00030d03004d0d82060d060106820700070707 -070782060d0601068207000d010d81000d0d0d81000d040d81000d7f0d150d81000d010d -81000d010d81000d4f0d82060d060106820700070707 -070782060d0601068207000d010d82000d0081000d010d0200050d81000d040d81000d7f -0d180d81000d020d81000d4f0d82060d060106820700070707 -070782060d0601068207000d010d0100010d81000d020d81000d040d81000d040d81000d -7f0d170d81000d030d02004e0d82060d060106820700070707 -070782060d0601068207000d010d81000d010d81000d020d81000d040d81000d040d8100 -0d7f0d160d81000d070d81000d4c0d82060d060106820700070707 -070782060d0601068207000d010d81000d010d81000d020d81000d040d81000d040d8100 -0d7f0d150d81000d040d81000d010d81000d4c0d82060d060106820700070707 -070782060d0601068207000d810d000300020d0400010d0400010d04007f0d140d040002 -0d02004e0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d030d81000d0a0d0100050d81000d7f0d6f0d82060d060106 -820700070707 -070782060d0601068207000d110d81000d7f0d760d82060d060106820700070707 -070782060d0601068207000d010d0300010d0100010d0100030d81000d020d0200040d02 -00010d0100810d0081000d7f0d070d0200010d0100810d0081000d020d0200470d82060d -060106820700070707 -070782060d0601068207000d040d81000d010d81000d010d81000d020d81000d040d8100 -0d020d81000d010d81000d810d0081000d820d000d7f0d050d81000d010d81000d810d00 -81000d820d000d820d000d010d81000d450d82060d060106820700070707 -070782060d0601068207000d040d81000d010d81000d010d81000d020d81000d040d8100 -0d030d0300010d81000d010d81000d7f0d050d81000d010d81000d820d000d010d81000d -810d000300460d82060d060106820700070707 -070782060d0601068207000d040d81000d010d81000d810d0081000d020d81000d040d81 -000d020d81000d010d81000d820d000d010d81000d7f0d050d81000d010d81000d820d00 -0d010d81000d820d000d490d82060d060106820700070707 -070782060d0601068207000d040d81000d020d0100810d0082000d000300010d0400010d -0800810d0001007f0d060d0200010d0200810d000100010d0300460d82060d0601068207 -00070707 -070782060d0601068207000d040d81000d7f0d7f0d030d82060d060106820700070707 -070782060d0601068207000d010d02007f0d7f0d050d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d810d0081000d060d81000d7f0d7d0d82060d060106820700 -070707 -070782060d0601068207000d010d81000d0b0d81000d7f0d780d82060d06010682070007 -0707 -070782060d0601068207000d010d82000d0081000d010d0200020d0400010d0200820d00 -0d020d0200010d0100810d0081000d7f0d050d0100810d0081000d020d0200010d010081 -0d0081000d020d0200400d82060d060106820700070707 -070782060d0601068207000d010d0100010d81000d020d81000d020d81000d040d85000d -000d000d820d000d010d81000d810d0081000d820d000d7f0d050d0100010d81000d820d -000d010d81000d810d0081000d820d000d820d000d010d81000d3e0d82060d0601068207 -00070707 -070782060d0601068207000d010d81000d010d81000d020d81000d020d81000d040d8500 -0d000d000d010d0300010d81000d010d81000d7f0d050d81000d010d81000d820d000d01 -0d81000d820d000d010d81000d810d0003003f0d82060d060106820700070707 -070782060d0601068207000d010d81000d010d81000d020d81000d020d81000d010d8100 -0d860d000d000d000d820d000d010d81000d820d000d010d81000d7f0d050d81000d010d -81000d820d000d010d81000d820d000d010d81000d820d000d420d82060d060106820700 -070707 -070782060d0601068207000d810d000300020d0400020d0200010d0600810d000400810d -0002007f0d060d0200810d000100010d0200010d0200810d000100010d03003f0d82060d -060106820700070707 -070782060d0601068207000d240d81000d7f0d630d82060d060106820700070707 -070782060d0601068207000d230d02007f0d630d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d340d81000d130d01007f0d3d0d82060d0601068207000707 -07 -070782060d0601068207000d1d0d81000d2b0d81000d620d81000d570d82060d06010682 -0700070707 -070782060d0601068207000d020d0300020d0200010d0100810d0081000d020d0300810d -000300020d0100810d0081000d010d0200020d0200020d0100810d0081000d020d020003 -0d0100820d000d610d0400010d0200810d000100010d0200470d82060d06010682070007 -0707 -070782060d0601068207000d010d81000d010d81000d820d000d010d81000d810d008100 -0d820d000d820d000d040d81000d050d0100030d81000d010d81000d020d81000d020d01 -00010d81000d820d000d010d81000d820d000d810d0081000d620d81000d040d81000d01 -0d81000d820d000d010d81000d450d82060d060106820700070707 -070782060d0601068207000d010d81000d040d81000d010d81000d820d000d010d81000d -010d0200020d81000d050d81000d040d0300030d81000d020d81000d010d81000d810d00 -0300010d81000d010d81000d620d81000d040d85000d000d000d820d000d010d81000d45 -0d82060d060106820700070707 -070782060d0601068207000d010d81000d040d81000d010d81000d820d000d010d81000d -040d81000d820d000d010d81000d010d81000d030d81000d010d81000d020d81000d020d -81000d010d81000d820d000d040d81000d010d81000d620d81000d010d81000d860d000d -000d000d820d000d010d81000d450d82060d060106820700070707 -070782060d0601068207000d020d0300020d0200010d0200810d000100810d000200030d -0200020d0300020d0500810d000300810d000100810d000100010d0300020d0400630d02 -00030d83000d000d020d0200470d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -070782060d0601068207000d7f0d7f0d0a0d82060d060106820700070707 -7f077f0726078100070107 -03077f0d7f0d210d820700070107 -0307820d06077f077f071c07840d060700070107 -0307830d0607047f047f041c0483060700070107 -0307830d0607047f047f041c0483060700070107 -0307830d0607047f047f040a040e0d8100048404060700070107 -0307830d0607047f047f040a04810d060b06820700048404060700070107 -0307830d06070481040d040d3a04010d7f044604810d060b068207000484040607000701 -07 -0307830d06070481040d810d040104010d1d04010d1904010d7f044604810d0601060107 -030601070106820700048404060700070107 -0307830d06070481040d810d040104010d1d04010d1904010d7f044604810d0602060107 -01060107010d83060700048404060700070107 -0307830d06070481040d810d040104010d81040d010d0104030d0104040d0204030d0104 -020d81040d010d81040d820d040d810d040304010d0104010d0104030d0104010d81040d -810d0481040d810d0481040d020d0604030d0104020d81040d010d0104030d0104020d7f -041a04810d0603060307010d0106820700048404060700070107 -0307830d06070481040d040d0104010d0104010d0104010d81040d810d0481040d820d04 -0d810d0481040d820d040d810d0481040d810d0481040d820d040d810d040304010d0104 -010d0404010d81040d820d040d810d0481040d820d040d810d0481040d810d040304010d -0104010d81040d810d0481040d810d0481040d810d0481040d820d040d810d047f041a04 -810d0604060107010d0206820700048404060700070107 -0307830d06070481040d810d040404010d0104010d0104010d81040d810d0481040d820d -040d040d81040d810d0481040d810d0481040d820d040d810d040404030d0204040d8104 -0d820d040d810d0481040d820d040d040d0404050d81040d810d0481040d810d0481040d -810d0481040d820d040d810d047f041a04810d0603060307030682070004840406070007 -0107 -0307830d06070481040d810d040404010d0104010d0104010d81040d810d0481040d820d -040d810d040304010d0104010d0104010d81040d810d040404030d0104010d0104010d81 -040d820d040d810d0481040d820d040d810d040704010d0404010d0104010d0104010d01 -04010d81040d810d047f041a04810d0602060107010d0107020682070004840406070007 -0107 -0307830d06070481040d810d040404010d0104010d0104010d81040d810d0481040d820d -040d810d0481040d820d040d810d0481040d810d040104020d0704010d0204010d010401 -0d81040d820d040d820d040d010d81040d810d0481040d810d040304010d0104010d8104 -0d810d0481040d810d0481040d810d0481040d820d040d810d047f041a04810d06010601 -07010d010601070106820700048404060700070107 -0307830d06070481040d810d040404010d0204030d0104040d0204030d0104010d020401 -0d0104010d0804010d0304040d81040d810d0481040d030d0104030d0604030d0104010d -0104010d0204030d0104010d7f041b04810d060206010d0306010d830607000484040607 -00070107 -0307830d0607041304010d1404010d7f045d04810d060b06820700048404060700070107 - -0307830d0607041304010d1204020d7f045e04810d070c078100048404060700070107 -0307830d0607047f047f040a040f00010483060700070107 -0307830d0607047f047f041c0483060700070107 -0307830d0607047f047f041c0483060700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d06170602037f067f060406820700070107 -0307810d06160681030a830a0600067f067f060206820700070107 -0307810d06150681030a020a83060007067f067f0683060700070107 -0307810d06150681030a030a8100078107067f067f06820700070107 -0307810d06140681030a040a820600078107067f067e06820700070107 -0307810d06140681030a050a8100078107067f067e06820700070107 -0307810d06130681030a060a820600078107067f067d06820700070107 -0307810d06130681030a070a8100078107067f067d06820700070107 -0307810d06120681030a080a820600078107067f067c06820700070107 -0307810d06120681030a010a810600010081060a010a8100078107067f067c0682070007 -0107 -0307810d06110681030a020a0400020a820600078107067f067b06820700070107 -0307810d06110681030a020a0400030a8100078107061606810006030681000605068100 -0627068100061b0681000620068100062c06040001060200140681000602060400010602 -0001068100060a06820700070107 -0307810d06100681030a030a0400030a8206000781070615068100060306810006050681 -000621068100060306810006230681000618068100060906810006200681000603068100 -060106810006120681000602068100060306810006010683000600060a06820700070107 - -0307810d06100681030a030a0400040a8100078107061606810006010681000606068100 -062106810006030681000623068100061806810006090681000620068100060306810006 -0106810006120681000602068100060306810006010683000600060a06820700070107 -0307810d060f0681030a040a0400040a8206000781070615068100060106810006010602 -000106830006000601068100068106000100040602008106008100068206000601068100 -068106008100068106008100060206030002060200050602000106820006008100060306 -840006000600810006810600810006810600010002060300010602000106010003060300 -020602000106010082060006820600068206000681060001000206020001068200060081 -000606060300010681000601068100060306020001068200060081000601060300030603 -000106810006010683000600060a06820700070107 -0307810d060f0681030a040a810300010081030a040a8100078107061506810006010681 -000604068500060006000601068300060006010681000602068100068206000684060006 -000601068300060006840600060006030681000601068300060006010681000606068200 -060081000682060006020682000600810006840600060006820600060106830006000601 -068300060006010683000600060306810006010683000600060106830006000682060006 -820600068406000600060106830006000601068200060081000682060006050681000601 -068300060006010681000606068200060081000684060006000601068100060206810006 -01068300060006010683000600060a06820700070107 -0307810d060e0681030a050a810600010081060a040a8206000781070615068300060006 -020603008406000600060106820006000300030681000682060006840600060006010681 -000682060006010681000603068100060106820006000300040603008206000601068100 -060206830006000601068300060006810600030082060006010682000600030082060006 -030681000601068200060003008206000689060006000600060006000300810600030082 -060006010681000602060100040683000600060106810006030603008206000601068300 -060006010681000606068300060006010683000600060a06820700070107 -0307810d060e0681030a060a0200070a8100078107061506830006000601068100060106 -850006000600060106830006000606068100068206000684060006000601068100060106 -810006820600060306810006010683000600060606810006010683000600060106810006 -020683000600060106830006000682060006030681000601068300060006030681000603 -068100060106830006000603068100068a06000600060006000600060306810006030681 -000601068100060906830006000601068100060206810006010683000600060106830006 -0006010681000606068300060006010683000600060a06820700070107 -0307810d060d0681030a070a830300030a060a8206000781070615068100060206810006 -010685000600060006810600830006000601068100060206810006820600068406000600 -068106008300060006840600060006030681000601068300060006010681000602068100 -060106830006000601068100060206830006000601068300060006820600060106830006 -000601068300060006010683000600060306810006010683000600060106830006000601 -068100060106810006820600060106830006000601068300060006010681000605068100 -060106830006000601068100060206810006010683000600060106830006000601068100 -0602068100060106830006000601068100060c06820700070107 -0307810d060d0681030a070a830600060a070a8100078107061506810006030603008206 -000681060083000600068106000100040681000682060006820600068106008300060006 -810600810006010681000602060300020602000506030082060006010681000602068300 -060006010681000682060006810600010002060300010602000106810006030603000206 -020002068100068206000601068100060106020002060200010681000601068100060606 -020002060200050603008206000601068100068106000200040602000206020001068100 -060a06820700070107 -0307810d060c0681030a090a81000a080a820600078107067c0681000677068207000701 -07 -0307810d060c0681030a150a810007810706780603007906820700070107 -0307810d060b0681030a090a8106008200060a070a820600078107067f06750682070007 -0107 -0307810d060b0681030a090a0300090a8100078107067f067506820700070107 -0307810d060a0681030a0a0a0300090a820600078107067f067406820700070107 -0307810d060a0681030a0a0a8106008200060a090a8100078107067f0674068207000701 -07 -0307810d060a0681030a190a81000701077f067406820700070107 -0307810d060a0681030a180a8206000701077f067406820700070107 -0307810d060b0681030a160a8206000702077f067406820700070107 -0307810d060c06810300160004077f067406820700070107 -0307810d060e061a077f067506820700070107 -0307810d060f0618077f067606820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d066b0648006a06820700070107 -0307810d066a064a006906820700070107 -0307810d066a060100450d8107008100066806820700070107 -0307810d066a060100440d010701006906820700070107 -0307810d066a060100010d18069100060006000600060006000600060006000617060107 -01006906820700070107 -0307810d066a060100010d4206010701006906820700070107 -0307810d066a060100010d18068100060d068100061706010701006906820700070107 -0307810d066a060100010d1b060300020681000601068100061906010701006906820700 -070107 -0307810d066a060100010d18068300060006020681000682060006820600068206000617 -06010701006906820700070107 -0307810d066a060100010d1a0681000602068100068406000600061b0601070100690682 -0700070107 -0307810d066a060100010d18068300060006020681000681060081000602068100061706 -010701006906820700070107 -0307810d066a060100010d1a0681000602068100068106008100061c0601070100690682 -0700070107 -0307810d066a060100010d18068300060006020681000684060006000601068100061706 -010701006906820700070107 -0307810d066a060100010d1a06810006020681000682060006820600061a060107010069 -06820700070107 -0307810d066a060100010d18068300060006020681000682060006010683000600061706 -010701006906820700070107 -0307810d066a060100010d1b060300020681000602068100061806010701006906820700 -070107 -0307810d066a060100010d18068100060d068100061706010701006906820700070107 -0307810d066a060100010d4206010701006906820700070107 -0307810d066a060100010d18069100060006000600060006000600060006000617060107 -01006906820700070107 -0307810d066a060100810d07440701006906820700070107 -0307810d066a060100460701006906820700070107 -0307810d066a064a006906820700070107 -0307810d066b0648006a06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -0307810d067f067f061f06820700070107 -7f077f0726078100070107 -02077f007f0024000207 -7f077f072a07 -7f077f072a07 -7f077f072a07 -7f077f072a07 -7f077f072a07 -7f077f072a07 - -% -% Compression made this file 5.68% of the uncompressed size. -% - - -showpage - -% stop using temporary dictionary -end - -% restore original state -origstate restore - -%%Trailer diff --git a/utils/wxprop/docs/prop2.gif b/utils/wxprop/docs/prop2.gif deleted file mode 100644 index f7395c48fa..0000000000 Binary files a/utils/wxprop/docs/prop2.gif and /dev/null differ diff --git a/utils/wxprop/docs/readme.txt b/utils/wxprop/docs/readme.txt deleted file mode 100644 index f54a18a687..0000000000 --- a/utils/wxprop/docs/readme.txt +++ /dev/null @@ -1,39 +0,0 @@ - -Prototype dialog editor and property sheet classes --------------------------------------------------- - -Julian Smart, October 4th 1995 ------------------------------- - -Here's what I've done so far on a lightweight dialog editor. The 16-bit -Windows binaries in the bin directory are dialoged.exe (the dialog -editor) and test.exe (a small property sheet demo). - -Main points: - - - You can create a new dialog box and add items to it. - - You can move items around, and right-click - to edit a few properties (very incomplete). - - Can't write out .wxr files yet. Loading code is in - wxWindows, but writing code is absent: should be put - into wxWindows. - - No attempt at resources other than dialogs yet. - Should have menu editor too. - - Should *somehow* have a protocol to allow - existing resources e.g. in wxCLIPS/wxPython - to be edited in situ. - This should be made simpler by the existance of - the plug-in event handler mechanism, which means you - can temporarily handle all the events yourself. - - See dialoged.cc: the main program is tiny because - it's meant to be embeddable. - - The wxPropertySheet (set of) classes are very - general and should be put into wxWin and documented. - -Comments, chivvying and help all appreciated. Maybe if -I documented what I had, it would be easier for others -to do some work on it. - -Regards, - -Julian \ No newline at end of file diff --git a/utils/wxprop/docs/tex2rtf.ini b/utils/wxprop/docs/tex2rtf.ini deleted file mode 100644 index 90c6676d9c..0000000000 --- a/utils/wxprop/docs/tex2rtf.ini +++ /dev/null @@ -1,21 +0,0 @@ -runTwice = yes -titleFontSize = 12 -authorFontSize = 10 -chapterFontSize = 12 -sectionFontSize = 12 -subsectionFontSize = 12 -headerRule = yes -footerRule = yes -useHeadingStyles = yes -contentsDepth = 2 -listItemIndent=40 -generateHPJ = yes -htmlBrowseButtons = bitmap -winHelpVersion = 3 -winHelpContents = yes -winHelpTitle = "Property Classes Manual" -truncateFilenames = yes -\overview [2] {\rtfonly{See also }\sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}} -\htmlonly{\image{}{books.gif}}\helpref{#1}{#2} -\sethotspotcolour{on}\sethotspotunderline{on}} - diff --git a/utils/wxprop/docs/up.gif b/utils/wxprop/docs/up.gif deleted file mode 100644 index 617948f2a2..0000000000 Binary files a/utils/wxprop/docs/up.gif and /dev/null differ diff --git a/utils/wxprop/docs/wxprop.hpj b/utils/wxprop/docs/wxprop.hpj deleted file mode 100644 index 5492173d51..0000000000 --- a/utils/wxprop/docs/wxprop.hpj +++ /dev/null @@ -1,17 +0,0 @@ -[OPTIONS] -BMROOT=d:\wx2\wxwind~1\utils\wxprop\docs ; Assume that bitmaps are where the source is -TITLE=Property Classes Manual -CONTENTS=Contents -COMPRESS=HIGH - -[FILES] -wxprop.rtf - -[CONFIG] -CreateButton("Up", "&Up", "JumpId(`wxprop.hlp', `Contents')") -BrowseButtons() - -[MAP] - -[BITMAPS] - diff --git a/utils/wxprop/lib/dummy b/utils/wxprop/lib/dummy deleted file mode 100644 index bfdf726d49..0000000000 --- a/utils/wxprop/lib/dummy +++ /dev/null @@ -1 +0,0 @@ -I'm just here to force the creation of a LIB directory. diff --git a/utils/wxprop/src/.cvsignore b/utils/wxprop/src/.cvsignore deleted file mode 100644 index 4646a42c35..0000000000 --- a/utils/wxprop/src/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Linux -linux-gnu -linux diff --git a/utils/wxprop/src/Makefile b/utils/wxprop/src/Makefile deleted file mode 100644 index 35ce1069fd..0000000000 --- a/utils/wxprop/src/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../../setup/general/makedirs diff --git a/utils/wxprop/src/Makefile.in b/utils/wxprop/src/Makefile.in deleted file mode 100644 index 7661897fcc..0000000000 --- a/utils/wxprop/src/Makefile.in +++ /dev/null @@ -1,69 +0,0 @@ -# -# wxprop source makefile for Unix -# -# Copyright 1998, Robert Roebling -# - -# wxWindows base directory -WXBASEDIR=@WXBASEDIR@ - -# set the OS type for compilation -OS=@OS@ - -# compile a library only -RULE=gslib - -# needed for unactivated -NONE= - -# define library name -LIB_TARGET=wx_prop_gtk -LIB_MAJOR=0 -LIB_MINOR=1 - -# define library sources - -LIB_CPP_SRC=\ -\ - prop.cpp \ - propform.cpp \ - proplist.cpp - -#define library objects -LIB_OBJ=\ - $(LIB_CPP_SRC:.cpp=.o) - -all:: - -clean:: - -install:: - @echo "Installing library files and headers for libwx_prop_gtk.." - @echo " Creating directory.." - @$(WXBASEDIR)/mkinstalldirs /usr/local/include/wx_prop - @echo " Copying headers from /include/wx" - @cd $(WXBASEDIR)/utils/wxprop/src ; \ - for f in *.h ; do \ - rm -f /usr/local/include/wx_prop/$$f ; \ - $(INSTALL_DATA) $$f /usr/local/include/wx_prop/$$f ; \ - done - @echo " Copying static library files to /usr/local/lib" - @cd $(WXBASEDIR)/lib/$(OS) ; \ - for f in libwx_prop_gtk.a ; do \ - rm -f /usr/local/lib/$$f ; \ - $(INSTALL_DATA) $$f /usr/local/lib/$$f ; \ - done - @echo " Copying shared libraries to /usr/local/lib" - @cd $(WXBASEDIR)/lib/$(OS) ; \ - for f in libwx_prop_gtk.so* ; do \ - rm -f /usr/local/lib/$$f ; \ - $(INSTALL_PROGRAM) $$f /usr/local/lib/$$f ; \ - done - - -#additional things needed for compile -ADD_COMPILE= - -# include the definitions now -include ../../../../template.mak - diff --git a/utils/wxprop/src/cross.bmp b/utils/wxprop/src/cross.bmp deleted file mode 100644 index 079cb0dd58..0000000000 Binary files a/utils/wxprop/src/cross.bmp and /dev/null differ diff --git a/utils/wxprop/src/makefile.b32 b/utils/wxprop/src/makefile.b32 deleted file mode 100644 index 57b94770dd..0000000000 --- a/utils/wxprop/src/makefile.b32 +++ /dev/null @@ -1,74 +0,0 @@ -# -# File: makefile.b32 -# Author: Patrick Halke -# Created: 1995 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds 32bit wxProperty library for Windows -# and Borland C++ 4.x - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXINC = $(WXDIR)\include -TARGET=test -TESTOBJECTS=test.obj -LIBTARGET= $(WXLIBDIR)\wxprop.lib -LIBS=$(WXLIB)\wx32.lib $(LIBTARGET) cw32 import32 - -!ifndef DEBUG -DEBUG=0 -!endif - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -DDEBUG=$(DEBUG) -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -O2 -DEBUG_FLAGS = -DDEBUG=$(DEBUG) -!endif - -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -OBJECTS = prop.obj proplist.obj propform.obj - -all: $(LIBTARGET) - -$(LIBTARGET): $(OBJECTS) - erase $(LIBTARGET) - tlib $(LIBTARGET) /P32 @&&! -+$(OBJECTS:.obj =.obj +) -! - -prop.obj: prop.$(SRCSUFF) prop.h -proplist.obj: proplist.$(SRCSUFF) prop.h proplist.h -propform.obj: propform.$(SRCSUFF) prop.h propform.h - -$(TARGET).exe: $(TESTOBJECTS) $(LIBTARGET) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(TESTOBJECTS) -$(TARGET) -nul -$(LIBS) $(LIBTARGET) -$(TARGET).def -! - brc32 -K $(TARGET).res - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -test.obj: test.$(SRCSUFF) test.h - -clean: - -erase *.obj $(LIBTARGET) *.exe *.res *.map *.rws diff --git a/utils/wxprop/src/makefile.dos b/utils/wxprop/src/makefile.dos deleted file mode 100644 index 61da857733..0000000000 --- a/utils/wxprop/src/makefile.dos +++ /dev/null @@ -1,138 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1995 -# Updated: -# Copyright: (c) 1995, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds wxPropertySheet library and example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\utils\wxprop\src -WXLIB = $(WXDIR)\lib\wx.lib - -PROPLIB = $(WXDIR)\utils\wxprop\lib\wxprop.lib -DOCDIR = $(WXDIR)\utils\wxprop\docs - -LIBS=$(WXLIB) $(PROPLIB) oldnames libw llibcew commdlg shell ddeml -INC=/I$(WXDIR)\include\base /I$(WXDIR)\include\msw - -# Default is to output RTF for WinHelp -!ifndef RTFSTYLE -RTFSTYLE=-winhelp -!endif - -OBJECTS = prop.obj proplist.obj propform.obj -TESTOBJECTS = test.obj - -all: $(PROPLIB) - -test: test.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -$(PROPLIB): $(OBJECTS) - -erase $(PROPLIB) - lib /PAGESIZE:128 @<< -$(PROPLIB) -y -$(OBJECTS) -nul -; -<< - -test.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(PROPLIB) $(TESTOBJECTS) test.def test.res - link $(LINKFLAGS) @<< -$(WXDIR)\src\msw\dummy.obj $(TESTOBJECTS), -test, -NUL, -$(LIBS), -test.def -; -<< - rc -30 -K test.res - -test.obj: test.h wx_prop.h test.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -prop.obj: prop.h prop.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -proplist.obj: prop.h proplist.h proplist.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -propform.obj: prop.h propform.h propform.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -test.res : test.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include\wx test - -# Making documents -docs: hlp -hlp: $(DOCDIR)/prop.hlp -hlp32: $(DOCDIR)/hlp32/prop.hlp -rtf: $(DOCDIR)/prop.rtf - -$(DOCDIR)/prop.hlp: $(DOCDIR)/prop.rtf $(DOCDIR)/prop.hpj - cd $(DOCDIR) - -erase prop.ph - hc prop - cd $(THISDIR) - -$(DOCDIR)/hlp32/prop.hlp: $(DOCDIR)/hlp32/prop.rtf $(DOCDIR)/hlp32/prop.hpj - cd $(DOCDIR)/hlp32 - -erase prop.ph - start /w hcw /c /e clockwrk.hpj - cd $(THISDIR) - -$(DOCDIR)/prop.rtf: $(DOCDIR)/classes.tex $(DOCDIR)/body.tex $(DOCDIR)/prop.tex - cd $(DOCDIR) - -wx /W tex2rtf $(DOCDIR)/prop.tex $(DOCDIR)/prop.rtf -twice $(RTFSTYLE) - cd $(THISDIR) - -$(DOCDIR)/hlp32/prop.rtf: $(DOCDIR)/classes.tex $(DOCDIR)/body.tex $(DOCDIR)/prop.tex - cd $(DOCDIR) - -wx /W tex2rtf $(DOCDIR)/prop.tex $(DOCDIR)/hlp32/prop.rtf -twice -winhelp -macros $(DOCDIR)/t2rtf32.ini - cd $(THISDIR) - -wordrtf: - cd $(DOCDIR) - -wx /W tex2rtf $(DOCDIR)/prop.tex $(DOCDIR)/prop.rtf -twice -rtf - cd $(THISDIR) - -cleanrtf: - cd $(DOCDIR) - -erase *.rtf - cd $(THISDIR) - -clean: - -erase *.obj - -erase *.sbr - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb - -erase $(PROPLIB) diff --git a/utils/wxprop/src/makefile.g95 b/utils/wxprop/src/makefile.g95 deleted file mode 100644 index c56fe98d2c..0000000000 --- a/utils/wxprop/src/makefile.g95 +++ /dev/null @@ -1,54 +0,0 @@ -# -# File: makefile.g95 -# Author: Julian Smart -# Created: 1996 -# -# "%W% %G%" -# -# Makefile : Builds wxProp library and example under GNU-WIN32 -# -WXDIR = ../../.. -include $(WXDIR)/src/makeg95.env - -PROPDIR = $(WXDIR)/utils/wxprop -PROPLIB = $(PROPDIR)/lib/$(LIBPREFIX)wxprop.$(LIBSUFF) -THISDIR = $(PROPDIR)/src - -OBJECTS = $(OBJDIR)/prop.$(OBJSUFF) $(OBJDIR)/proplist.$(OBJSUFF) $(OBJDIR)/propform.$(OBJSUFF) -TESTOBJECTS = $(OBJDIR)/test.$(OBJSUFF) $(OBJDIR)/test_resources.$(OBJSUFF) - -LDFLAGS = -Wl,--subsystem,windows -mwindows -L$(WXDIR)/lib -L../lib -LDLIBS=-lwxprop $(LIBS) - -all: $(OBJDIR) $(PROPLIB) - -test: $(OBJDIR) test.exe - -$(OBJDIR): - mkdir $(OBJDIR) - -$(PROPLIB): $(OBJECTS) - rm -f $@ - ar $(AROPTIONS) $@ $(OBJECTS) - $(RANLIB) $@ - -$(OBJDIR)/test.$(OBJSUFF): test.h test.$(SRCSUFF) $(PROPLIB) - $(CC) -c $(CPPFLAGS) -o $@ test.$(SRCSUFF) - -test.exe: $(TESTOBJECTS) - $(CC) $(LDFLAGS) -o test$(GUISUFFIX)$(EXESUFF) $(TESTOBJECTS) $(LDLIBS) - -$(OBJDIR)/prop.$(OBJSUFF): prop.h prop.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ prop.$(SRCSUFF) - -$(OBJDIR)/proplist.$(OBJSUFF): proplist.h prop.h proplist.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ proplist.$(SRCSUFF) - -$(OBJDIR)/propform.$(OBJSUFF): propform.h prop.h propform.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ propform.$(SRCSUFF) - -$(OBJDIR)/test_resources.o: test.rc - $(RESCOMP) -i test.rc -o $(OBJDIR)/test_resources.o $(RESFLAGS) - -clean: - rm -f *.$(OBJSUFF) $(PROPLIB) objects/test.o *.exe *.res *.map *.rsc diff --git a/utils/wxprop/src/makefile.nt b/utils/wxprop/src/makefile.nt deleted file mode 100644 index 3689787d3a..0000000000 --- a/utils/wxprop/src/makefile.nt +++ /dev/null @@ -1,144 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds wxProperty class library (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) -PROPDIR = $(WXDIR)\utils\wxprop -THISDIR = $(WXDIR)\utils\wxprop\src -EXTRALIBS=$(PROPDIR)\lib\wxprop.lib -DOCDIR=$(WXDIR)\docs -LOCALDOCDIR=$(WXDIR)\utils\wxprop\docs - -!include $(WXDIR)\src\ntwxwin.mak - -PROGRAM=test - -OBJECTS = prop.obj proplist.obj propform.obj -PROGOBJECTS = $(PROGRAM).obj -LIBTARGET=$(PROPDIR)\lib\wxprop.lib - -all: $(LIBTARGET) - - -$(PROGRAM): $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(LIBTARGET): $(OBJECTS) - -erase $(LIBTARGET) - $(implib) @<< --out:$(LIBTARGET) --machine:$(CPU) -$(OBJECTS) -<< - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(PROGOBJECTS) $(LIBTARGET) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(PROGOBJECTS) $(PROGRAM).res -$(LIBS) -<< - -prop.obj: prop.h prop.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -proplist.obj: prop.h proplist.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -propform.obj: propform.h propform.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).obj: $(PROGRAM).h $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.sbr - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb - -erase $(LIBTARGET) - -DOCSOURCES=$(LOCALDOCDIR)\prop.tex $(LOCALDOCDIR)\classes.tex $(LOCALDOCDIR)\body.tex $(LOCALDOCDIR)\changes.tex - -html: $(DOCDIR)\html\wxprop\prop.htm -hlp: $(DOCDIR)\winhelp\wxprop.hlp -pdfrtf: $(DOCDIR)\pdf\wxprop.rtf -ps: $(WXDIR)\docs\ps\wxprop.ps - -$(DOCDIR)\winhelp\wxprop.hlp: $(LOCALDOCDIR)\wxprop.rtf $(LOCALDOCDIR)\wxprop.hpj - cd $(LOCALDOCDIR) - -erase wxprop.ph - hc wxprop - move wxprop.hlp $(DOCDIR)\winhelp\wxprop.hlp - move wxprop.cnt $(DOCDIR)\winhelp\wxprop.cnt - cd $(THISDIR) - -$(LOCALDOCDIR)\wxprop.rtf: $(DOCSOURCES) - cd $(LOCALDOCDIR) - -start /w tex2rtf $(LOCALDOCDIR)\prop.tex $(LOCALDOCDIR)\wxprop.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)\pdf\wxprop.rtf: $(DOCSOURCES) - cd $(LOCALDOCDIR) - -copy *.bmp *.wmf $(DOCDIR)\pdf - -start /w tex2rtf $(LOCALDOCDIR)\prop.tex $(DOCDIR)\pdf\wxprop.rtf -twice -rtf - cd $(THISDIR) - -$(DOCDIR)\html\wxprop\prop.htm: $(DOCSOURCES) - cd $(LOCALDOCDIR) - -mkdir $(DOCDIR)\html\wxprop - -start /w tex2rtf $(LOCALDOCDIR)\prop.tex $(DOCDIR)\html\wxprop\prop.htm -twice -html - -erase $(DOCDIR)\html\wxprop\*.con - -erase $(DOCDIR)\html\wxprop\*.ref - cd $(THISDIR) - -$(LOCALDOCDIR)\prop.dvi: $(DOCSOURCES) - cd $(LOCALDOCDIR) - -latex prop - -latex prop - -makeindx prop - -bibtex prop - -latex prop - -latex prop - cd $(THISDIR) - -$(WXDIR)\docs\ps\wxprop.ps: $(LOCALDOCDIR)\prop.dvi - cd $(LOCALDOCDIR) - -dvips32 -o wxprop.ps prop - move wxprop.ps $(WXDIR)\docs\ps\wxprop.ps - cd $(THISDIR) - - diff --git a/utils/wxprop/src/prop.cpp b/utils/wxprop/src/prop.cpp deleted file mode 100644 index 3a487cf997..0000000000 --- a/utils/wxprop/src/prop.cpp +++ /dev/null @@ -1,1115 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: prop.cpp -// Purpose: Propert sheet classes implementation -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "prop.h" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include -#include -#include -#include - -#if defined(__WXMSW__) && !defined(__GNUWIN32__) -#include -#else -#include -#endif - -#include "wx/window.h" -#include "wx/utils.h" -#include "wx/list.h" -#include "prop.h" - -IMPLEMENT_DYNAMIC_CLASS(wxPropertyValue, wxObject) - -wxPropertyValue::wxPropertyValue(void) -{ - type = wxPropertyValueNull; - next = NULL; - last = NULL; - value.first = NULL; - client_data = NULL; - modifiedFlag = FALSE; -} - -wxPropertyValue::wxPropertyValue(const wxPropertyValue& copyFrom) -{ - modifiedFlag = FALSE; - Copy((wxPropertyValue& )copyFrom); -} - -wxPropertyValue::wxPropertyValue(const char *val) -{ - modifiedFlag = FALSE; - type = wxPropertyValueString; - - value.string = copystring(val); - client_data = NULL; - next = NULL; - last = NULL; -} - -wxPropertyValue::wxPropertyValue(const wxString& val) -{ - modifiedFlag = FALSE; - type = wxPropertyValueString; - - value.string = copystring((const char *)val); - client_data = NULL; - next = NULL; - last = NULL; -} - -wxPropertyValue::wxPropertyValue(long the_integer) -{ - modifiedFlag = FALSE; - type = wxPropertyValueInteger; - value.integer = the_integer; - client_data = NULL; - next = NULL; -} - -wxPropertyValue::wxPropertyValue(bool val) -{ - modifiedFlag = FALSE; - type = wxPropertyValuebool; - value.integer = val; - client_data = NULL; - next = NULL; -} - -wxPropertyValue::wxPropertyValue(float the_real) -{ - modifiedFlag = FALSE; - type = wxPropertyValueReal; - value.real = the_real; - client_data = NULL; - next = NULL; -} - -wxPropertyValue::wxPropertyValue(double the_real) -{ - modifiedFlag = FALSE; - type = wxPropertyValueReal; - value.real = (float)the_real; - client_data = NULL; - next = NULL; -} - -// Pointer versions: we have a pointer to the real C++ value. -wxPropertyValue::wxPropertyValue(char **val) -{ - modifiedFlag = FALSE; - type = wxPropertyValueStringPtr; - - value.stringPtr = val; - client_data = NULL; - next = NULL; - last = NULL; -} - -wxPropertyValue::wxPropertyValue(long *val) -{ - modifiedFlag = FALSE; - type = wxPropertyValueIntegerPtr; - value.integerPtr = val; - client_data = NULL; - next = NULL; -} - -wxPropertyValue::wxPropertyValue(bool *val) -{ - modifiedFlag = FALSE; - type = wxPropertyValueboolPtr; - value.boolPtr = val; - client_data = NULL; - next = NULL; -} - -wxPropertyValue::wxPropertyValue(float *val) -{ - modifiedFlag = FALSE; - type = wxPropertyValueRealPtr; - value.realPtr = val; - client_data = NULL; - next = NULL; -} - -wxPropertyValue::wxPropertyValue(wxList *the_list) -{ - modifiedFlag = FALSE; - type = wxPropertyValueList; - client_data = NULL; - last = NULL; - value.first = NULL; - - wxNode *node = the_list->First(); - while (node) - { - wxPropertyValue *expr = (wxPropertyValue *)node->Data(); - Append(expr); - node = node->Next(); - } - - delete the_list; -} - -wxPropertyValue::wxPropertyValue(wxStringList *the_list) -{ - modifiedFlag = FALSE; - type = wxPropertyValueList; - client_data = NULL; - last = NULL; - value.first = NULL; - - wxNode *node = the_list->First(); - while (node) - { - char *s = (char *)node->Data(); - Append(new wxPropertyValue(s)); - node = node->Next(); - } - delete the_list; -} - -wxPropertyValue::~wxPropertyValue(void) -{ - switch (type) - { - case wxPropertyValueInteger: - case wxPropertyValuebool: - case wxPropertyValueReal: - { - break; - } - case wxPropertyValueString: - { - delete value.string; - break; - } - case wxPropertyValueList: - { - wxPropertyValue *expr = value.first; - while (expr) - { - wxPropertyValue *expr1 = expr->next; - - delete expr; - expr = expr1; - } - break; - } - default: - case wxPropertyValueNull: break; - } -} - -void wxPropertyValue::Append(wxPropertyValue *expr) -{ - modifiedFlag = TRUE; - if (!value.first) - value.first = expr; - - if (last) - last->next = expr; - last = expr; -} - -void wxPropertyValue::Insert(wxPropertyValue *expr) -{ - modifiedFlag = TRUE; - expr->next = value.first; - value.first = expr; - - if (!last) - last = expr; -} - -// Delete from list -void wxPropertyValue::Delete(wxPropertyValue *node) -{ - wxPropertyValue *expr = GetFirst(); - - wxPropertyValue *previous = NULL; - while (expr && (expr != node)) - { - previous = expr; - expr = expr->GetNext(); - } - - if (expr) - { - if (previous) - previous->next = expr->next; - - // If node was the first in the list, - // make the list point to the NEXT one. - if (GetFirst() == expr) - { - value.first = expr->next; - } - - // If node was the last in the list, - // make the list 'last' pointer point to the PREVIOUS one. - if (GetLast() == expr) - { - if (previous) - last = previous; - else - last = NULL; - } - modifiedFlag = TRUE; - delete expr; - } - -} - -void wxPropertyValue::ClearList(void) -{ - wxPropertyValue *val = GetFirst(); - if (val) - modifiedFlag = TRUE; - - while (val) - { - wxPropertyValue *next = val->GetNext(); - delete val; - val = next; - } - value.first = NULL; - last = NULL; -} - -wxPropertyValue *wxPropertyValue::NewCopy(void) -{ - switch (type) - { - case wxPropertyValueInteger: - return new wxPropertyValue(value.integer); - case wxPropertyValuebool: - return new wxPropertyValue((bool) (value.integer != 0)); - case wxPropertyValueReal: - return new wxPropertyValue(value.real); - case wxPropertyValueString: - return new wxPropertyValue(value.string); - case wxPropertyValueList: - { - wxPropertyValue *expr = value.first; - wxPropertyValue *new_list = new wxPropertyValue; - new_list->SetType(wxPropertyValueList); - while (expr) - { - wxPropertyValue *expr2 = expr->NewCopy(); - new_list->Append(expr2); - expr = expr->next; - } - return new_list; - } - case wxPropertyValueIntegerPtr: - return new wxPropertyValue(value.integerPtr); - case wxPropertyValueRealPtr: - return new wxPropertyValue(value.realPtr); - case wxPropertyValueboolPtr: - return new wxPropertyValue(value.boolPtr); - case wxPropertyValueStringPtr: - return new wxPropertyValue(value.stringPtr); - - case wxPropertyValueNull: -#ifdef __X__ - cerr << "Should never get here!\n"; -#endif - break; - } - return NULL; -} - -void wxPropertyValue::Copy(wxPropertyValue& copyFrom) -{ - type = copyFrom.Type(); - - switch (type) - { - case wxPropertyValueInteger: - (*this) = copyFrom.IntegerValue(); - return ; - - case wxPropertyValueReal: - (*this) = copyFrom.RealValue(); - return ; - - case wxPropertyValueString: - (*this) = wxString(copyFrom.StringValue()); - return ; - - case wxPropertyValuebool: - (*this) = copyFrom.BoolValue(); - return ; - - // Pointers - case wxPropertyValueboolPtr: - (*this) = copyFrom.BoolValuePtr(); - return ; - case wxPropertyValueRealPtr: - (*this) = copyFrom.RealValuePtr(); - return ; - case wxPropertyValueIntegerPtr: - (*this) = copyFrom.IntegerValuePtr(); - return ; - case wxPropertyValueStringPtr: - { - char** s = copyFrom.StringValuePtr(); - (*this) = s; - return ; - } - - case wxPropertyValueList: - { - value.first = NULL; - next = NULL; - last = NULL; - wxPropertyValue *expr = copyFrom.value.first; - while (expr) - { - wxPropertyValue *expr2 = expr->NewCopy(); - Append(expr2); - expr = expr->next; - } - return; - } - case wxPropertyValueNull: -#ifdef __X__ - cerr << "Should never get here!\n"; -#endif - break; - } -} - -// Return nth argument of a clause (starting from 1) -wxPropertyValue *wxPropertyValue::Arg(wxPropertyValueType type, int arg) -{ - wxPropertyValue *expr = value.first; - for (int i = 1; i < arg; i++) - if (expr) - expr = expr->next; - - if (expr && (expr->type == type)) - return expr; - else - return NULL; -} - -// Return nth argument of a list expression (starting from zero) -wxPropertyValue *wxPropertyValue::Nth(int arg) -{ - if (type != wxPropertyValueList) - return NULL; - - wxPropertyValue *expr = value.first; - for (int i = 0; i < arg; i++) - if (expr) - expr = expr->next; - else return NULL; - - if (expr) - return expr; - else - return NULL; -} - - // Returns the number of elements in a list expression -int wxPropertyValue::Number(void) -{ - if (type != wxPropertyValueList) - return 0; - - int i = 0; - wxPropertyValue *expr = value.first; - while (expr) - { - expr = expr->next; - i ++; - } - return i; -} - -void wxPropertyValue::WritePropertyClause(ostream& stream) // Write this expression as a top-level clause -{ - if (type != wxPropertyValueList) - return; - - wxPropertyValue *node = value.first; - if (node) - { - node->WritePropertyType(stream); - stream << "("; - node = node->next; - bool first = TRUE; - while (node) - { - if (!first) - stream << " "; - node->WritePropertyType(stream); - node = node->next; - if (node) stream << ",\n"; - first = FALSE; - } - stream << ").\n\n"; - } -} - -void wxPropertyValue::WritePropertyType(ostream& stream) // Write as any other subexpression -{ - switch (type) - { - case wxPropertyValueInteger: - { - stream << value.integer; - break; - } - case wxPropertyValueIntegerPtr: - { - stream << *value.integerPtr; - break; - } - case wxPropertyValuebool: - { - if (value.integer) - stream << "True"; - else - stream << "False"; - break; - } - case wxPropertyValueboolPtr: - { - if (*value.integerPtr) - stream << "True"; - else - stream << "False"; - break; - } - case wxPropertyValueReal: - { - float f = value.real; - sprintf(wxBuffer, "%.6g", (double)f); - stream << wxBuffer; - break; - } - case wxPropertyValueRealPtr: - { - float f = *value.realPtr; -/* Now the parser can cope with this. - // Prevent printing in 'e' notation. Any better way? - if (fabs(f) < 0.00001) - f = 0.0; -*/ - sprintf(wxBuffer, "%.6g", f); - stream << wxBuffer; - break; - } - case wxPropertyValueString: - { -// stream << "\""; - int i; - int len = strlen(value.string); - for (i = 0; i < len; i++) - { - char ch = value.string[i]; -// if (ch == '"' || ch == '\\') -// stream << "\\"; - stream << ch; - } - -// stream << "\""; - break; - } - case wxPropertyValueStringPtr: - { - int i; - int len = strlen(*(value.stringPtr)); - for (i = 0; i < len; i++) - { - char ch = *(value.stringPtr)[i]; - - } - break; - } - case wxPropertyValueList: - { - if (!value.first) - stream << "[]"; - else - { - wxPropertyValue *expr = value.first; - - stream << "["; - while (expr) - { - expr->WritePropertyType(stream); - expr = expr->next; - if (expr) stream << ", "; - } - stream << "]"; - } - break; - } - case wxPropertyValueNull: break; - } -} - -wxString wxPropertyValue::GetStringRepresentation(void) -{ - char buf[500]; - buf[0] = 0; - - ostrstream str((char *)buf, (int)500, ios::out); - WritePropertyType(str); - str << '\0'; - str.flush(); - - wxString theString(buf); - return theString; -} - -void wxPropertyValue::operator=(const wxPropertyValue& val) -{ - modifiedFlag = TRUE; - Copy((wxPropertyValue&)val); -} - -// void wxPropertyValue::operator=(const char *val) -void wxPropertyValue::operator=(const wxString& val1) -{ - const char *val = (const char *)val1; - - modifiedFlag = TRUE; - if (type == wxPropertyValueNull) - type = wxPropertyValueString; - - if (type == wxPropertyValueString) - { - if (val) - value.string = copystring(val); - else - value.string = NULL; - } - else if (type == wxPropertyValueStringPtr) - { - if (*value.stringPtr) - delete[] *value.stringPtr; - if (val) - *value.stringPtr = copystring(val); - else - *value.stringPtr = NULL; - } - - client_data = NULL; - next = NULL; - last = NULL; - -} - -void wxPropertyValue::operator=(const long val) -{ - modifiedFlag = TRUE; - if (type == wxPropertyValueNull) - type = wxPropertyValueInteger; - - if (type == wxPropertyValueInteger) - value.integer = val; - else if (type == wxPropertyValueIntegerPtr) - *value.integerPtr = val; - else if (type == wxPropertyValueReal) - value.real = (float)val; - else if (type == wxPropertyValueRealPtr) - *value.realPtr = (float)val; - - client_data = NULL; - next = NULL; -} - -void wxPropertyValue::operator=(const bool val) -{ - modifiedFlag = TRUE; - if (type == wxPropertyValueNull) - type = wxPropertyValuebool; - - if (type == wxPropertyValuebool) - value.integer = (long)val; - else if (type == wxPropertyValueboolPtr) - *value.boolPtr = val; - - client_data = NULL; - next = NULL; -} - -void wxPropertyValue::operator=(const float val) -{ - modifiedFlag = TRUE; - if (type == wxPropertyValueNull) - type = wxPropertyValueReal; - - if (type == wxPropertyValueInteger) - value.integer = (long)val; - else if (type == wxPropertyValueIntegerPtr) - *value.integerPtr = (long)val; - else if (type == wxPropertyValueReal) - value.real = val; - else if (type == wxPropertyValueRealPtr) - *value.realPtr = val; - - client_data = NULL; - next = NULL; -} - -void wxPropertyValue::operator=(const char **val) -{ - modifiedFlag = TRUE; - type = wxPropertyValueStringPtr; - - if (val) - value.stringPtr = (char **)val; - else - value.stringPtr = NULL; - client_data = NULL; - next = NULL; - last = NULL; - -} - -void wxPropertyValue::operator=(const long *val) -{ - modifiedFlag = TRUE; - type = wxPropertyValueIntegerPtr; - value.integerPtr = (long *)val; - client_data = NULL; - next = NULL; -} - -void wxPropertyValue::operator=(const bool *val) -{ - modifiedFlag = TRUE; - type = wxPropertyValueboolPtr; - value.boolPtr = (bool *)val; - client_data = NULL; - next = NULL; -} - -void wxPropertyValue::operator=(const float *val) -{ - modifiedFlag = TRUE; - type = wxPropertyValueRealPtr; - value.realPtr = (float *)val; - client_data = NULL; - next = NULL; -} - -long wxPropertyValue::IntegerValue(void) - { - if (type == wxPropertyValueInteger) - return value.integer; - else if (type == wxPropertyValueReal) - return (long)value.real; - else if (type == wxPropertyValueIntegerPtr) - return *value.integerPtr; - else if (type == wxPropertyValueRealPtr) - return (long)(*value.realPtr); - else return 0; - } - -long *wxPropertyValue::IntegerValuePtr(void) -{ - return value.integerPtr; -} - -float wxPropertyValue::RealValue(void) { - if (type == wxPropertyValueReal) - return value.real; - else if (type == wxPropertyValueRealPtr) - return *value.realPtr; - else if (type == wxPropertyValueInteger) - return (float)value.integer; - else if (type == wxPropertyValueIntegerPtr) - return (float)*(value.integerPtr); - else return 0.0; - } - -float *wxPropertyValue::RealValuePtr(void) -{ - return value.realPtr; -} - -bool wxPropertyValue::BoolValue(void) { - if (type == wxPropertyValueReal) - return (value.real != 0.0); - if (type == wxPropertyValueRealPtr) - return (*(value.realPtr) != 0.0); - else if (type == wxPropertyValueInteger) - return (value.integer != 0); - else if (type == wxPropertyValueIntegerPtr) - return (*(value.integerPtr) != 0); - else if (type == wxPropertyValuebool) - return (value.integer != 0); - else if (type == wxPropertyValueboolPtr) - return (*(value.boolPtr) != 0); - else return FALSE; - } - -bool *wxPropertyValue::BoolValuePtr(void) -{ - return value.boolPtr; -} - -char *wxPropertyValue::StringValue(void) { - if (type == wxPropertyValueString) - return value.string; - else if (type == wxPropertyValueStringPtr) - return *(value.stringPtr); - else return NULL; - } - -char **wxPropertyValue::StringValuePtr(void) -{ - return value.stringPtr; -} - -/* - * A property (name plus value) - */ - -IMPLEMENT_DYNAMIC_CLASS(wxProperty, wxObject) - -wxProperty::wxProperty(void) -{ - propertyRole = (char *)NULL; - propertyValidator = NULL; - propertyWindow = NULL; - enabled = TRUE; -} - -wxProperty::wxProperty(wxProperty& copyFrom) -{ - value = copyFrom.GetValue(); - name = copyFrom.GetName(); - propertyRole = copyFrom.GetRole(); - propertyValidator = copyFrom.GetValidator(); - enabled = copyFrom.IsEnabled(); - propertyWindow = NULL; -} - -wxProperty::wxProperty(wxString nm, wxString role, wxPropertyValidator *ed):name(nm), propertyRole(role) -{ - propertyValidator = ed; - propertyWindow = NULL; - enabled = TRUE; -} - -wxProperty::wxProperty(wxString nm, const wxPropertyValue& val, wxString role, wxPropertyValidator *ed): - name(nm), value(val), propertyRole(role) -{ - propertyValidator = ed; - propertyWindow = NULL; - enabled = TRUE; -} - -wxProperty::~wxProperty(void) -{ - if (propertyValidator) - delete propertyValidator; -} - -wxPropertyValue& wxProperty::GetValue(void) -{ - return value; -} - -wxPropertyValidator *wxProperty::GetValidator(void) -{ - return propertyValidator; -} - -wxString& wxProperty::GetName(void) -{ - return name; -} - -wxString& wxProperty::GetRole(void) -{ - return propertyRole; -} - -void wxProperty::SetValue(const wxPropertyValue& val) -{ - value = val; -} - -void wxProperty::SetValidator(wxPropertyValidator *ed) -{ - propertyValidator = ed; -} - -void wxProperty::SetRole(wxString& role) -{ - propertyRole = role; -} - -void wxProperty::SetName(wxString& nm) -{ - name = nm; -} - -void wxProperty::operator=(const wxPropertyValue& val) -{ - value = val; -} - -/* - * Base property view class - */ - -IMPLEMENT_DYNAMIC_CLASS(wxPropertyView, wxEvtHandler) - -wxPropertyView::wxPropertyView(long flags) -{ - buttonFlags = flags; - propertySheet = NULL; - currentValidator = NULL; - currentProperty = NULL; -} - -wxPropertyView::~wxPropertyView(void) -{ -} - -void wxPropertyView::AddRegistry(wxPropertyValidatorRegistry *registry) -{ - validatorRegistryList.Append(registry); -} - -wxPropertyValidator *wxPropertyView::FindPropertyValidator(wxProperty *property) -{ - if (property->GetValidator()) - return property->GetValidator(); - - wxNode *node = validatorRegistryList.First(); - while (node) - { - wxPropertyValidatorRegistry *registry = (wxPropertyValidatorRegistry *)node->Data(); - wxPropertyValidator *validator = registry->GetValidator(property->GetRole()); - if (validator) - return validator; - node = node->Next(); - } - return NULL; -/* - if (!wxDefaultPropertyValidator) - wxDefaultPropertyValidator = new wxPropertyListValidator; - return wxDefaultPropertyValidator; -*/ -} - -/* - * Property sheet - */ - -IMPLEMENT_DYNAMIC_CLASS(wxPropertySheet, wxObject) - -wxPropertySheet::wxPropertySheet(void):properties(wxKEY_STRING) -{ -} - -wxPropertySheet::~wxPropertySheet(void) -{ - Clear(); -} - -bool wxPropertySheet::Save( ostream& WXUNUSED(str) ) -{ - return FALSE; -} - -bool wxPropertySheet::Load( ostream& WXUNUSED(str) ) -{ - return FALSE; -} - -void wxPropertySheet::UpdateAllViews( wxPropertyView *WXUNUSED(thisView) ) -{ -} - -// Add a property -void wxPropertySheet::AddProperty(wxProperty *property) -{ - properties.Append(property->GetName().GetData(), property); -} - -// Get property by name -wxProperty *wxPropertySheet::GetProperty(wxString name) -{ - wxNode *node = properties.Find(name.GetData()); - if (!node) - return NULL; - else - return (wxProperty *)node->Data(); -} - -// Clear all properties -void wxPropertySheet::Clear(void) -{ - wxNode *node = properties.First(); - while (node) - { - wxProperty *prop = (wxProperty *)node->Data(); - wxNode *next = node->Next(); - delete prop; - delete node; - node = next; - } -} - -// Sets/clears the modified flag for each property value -void wxPropertySheet::SetAllModified(bool flag) -{ - wxNode *node = properties.First(); - while (node) - { - wxProperty *prop = (wxProperty *)node->Data(); - prop->GetValue().SetModified(flag); - node = node->Next(); - } -} - -/* - * Property validator registry - * - */ - -IMPLEMENT_DYNAMIC_CLASS(wxPropertyValidatorRegistry, wxHashTable) - -wxPropertyValidatorRegistry::wxPropertyValidatorRegistry(void):wxHashTable(wxKEY_STRING) -{ -} - -wxPropertyValidatorRegistry::~wxPropertyValidatorRegistry(void) -{ - ClearRegistry(); -} - -void wxPropertyValidatorRegistry::RegisterValidator(wxString& typeName, wxPropertyValidator *validator) -{ - Put(typeName.GetData(), validator); -} - -wxPropertyValidator *wxPropertyValidatorRegistry::GetValidator(wxString& typeName) -{ - return (wxPropertyValidator *)Get(typeName.GetData()); -} - -void wxPropertyValidatorRegistry::ClearRegistry(void) -{ - BeginFind(); - wxNode *node; - while (node = Next()) - { - delete (wxPropertyValidator *)node->Data(); - } -} - - /* - * Property validator - */ - - -IMPLEMENT_ABSTRACT_CLASS(wxPropertyValidator, wxEvtHandler) - -wxPropertyValidator::wxPropertyValidator(long flags) -{ - validatorFlags = flags; - validatorProperty = NULL; -} - -wxPropertyValidator::~wxPropertyValidator(void) -{} - -bool wxPropertyValidator::StringToFloat (char *s, float *number) { - double num; - bool ok = StringToDouble (s, &num); - *number = (float) num; - return ok; -} - -bool wxPropertyValidator::StringToDouble (char *s, double *number) { - bool ok = TRUE; - char *value_ptr; - *number = strtod (s, &value_ptr); - if (value_ptr) { - int len = strlen (value_ptr); - for (int i = 0; i < len; i++) { - ok = (isspace (value_ptr[i]) != 0); - if (!ok) return FALSE; - } - } - return ok; -} - -bool wxPropertyValidator::StringToInt (char *s, int *number) { - long num; - bool ok = StringToLong (s, &num); - *number = (int) num; - return ok; -} - -bool wxPropertyValidator::StringToLong (char *s, long *number) { - bool ok = TRUE; - char *value_ptr; - *number = strtol (s, &value_ptr, 10); - if (value_ptr) { - int len = strlen (value_ptr); - for (int i = 0; i < len; i++) { - ok = (isspace (value_ptr[i]) != 0); - if (!ok) return FALSE; - } - } - return ok; -} - -char *wxPropertyValidator::FloatToString (float number) { - static char buf[20]; - sprintf (buf, "%.6g", number); - return buf; -} - -char *wxPropertyValidator::DoubleToString (double number) { - static char buf[20]; - sprintf (buf, "%.6g", number); - return buf; -} - -char *wxPropertyValidator::IntToString (int number) { - return ::IntToString (number); -} - -char *wxPropertyValidator::LongToString (long number) { - return ::LongToString (number); - } - - diff --git a/utils/wxprop/src/prop.h b/utils/wxprop/src/prop.h deleted file mode 100644 index 45c529a8a6..0000000000 --- a/utils/wxprop/src/prop.h +++ /dev/null @@ -1,320 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: prop.h -// Purpose: Property sheet classes -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _PROP_H_ -#define _PROP_H_ - -#ifdef __GNUG__ -#pragma interface "prop.h" -#endif - -#include "wx/defs.h" -#include "wx/string.h" -#include "wx/hash.h" -#include "wx/dialog.h" -#include "wx/frame.h" -#include "wx/button.h" -#include "wx/listbox.h" -#include "wx/textctrl.h" -#include "wx/gdicmn.h" -#include "wx/layout.h" - -class wxWindow; -class wxProperty; -class wxPropertyValue; -class wxPropertySheet; -class wxPropertyView; -class wxPropertyValidator; -class wxPropertyValidatorRegistry; - -#define wxPROPERTY_VERSION 2.0 - -// A storable sheet of values -class wxPropertySheet: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxPropertySheet) - protected: - wxObject *viewedObject; - wxList properties; - wxPropertyView *propertyView; - - public: - wxPropertySheet(void); - ~wxPropertySheet(void); - - // Add a property - virtual void AddProperty(wxProperty *property); - - // Get property by name - virtual wxProperty *GetProperty(wxString name); - - // Clear all properties - virtual void Clear(void); - - virtual bool Save(ostream& str); - virtual bool Load(ostream& str); - - virtual void UpdateAllViews(wxPropertyView *thisView = NULL); - inline virtual wxList& GetProperties(void) { return properties; } - - // Sets/clears the modified flag for each property value - virtual void SetAllModified(bool flag = TRUE); -}; - - -// Base class for property sheet views. There are currently two directly derived -// classes: wxPropertyListView, and wxPropertyFormView. -class wxPropertyView: public wxEvtHandler -{ - DECLARE_DYNAMIC_CLASS(wxPropertyView) - protected: - long buttonFlags; - wxPropertySheet *propertySheet; - wxProperty *currentProperty; - wxList validatorRegistryList; - wxPropertyValidator *currentValidator; - public: - wxPropertyView(long flags = 0); - ~wxPropertyView(void); - - // Associates and shows the view - virtual void ShowView(wxPropertySheet *WXUNUSED(propertySheet), wxWindow *WXUNUSED(panel)) {} - - // Update this view of the viewed object, called e.g. by - // the object itself. - virtual bool OnUpdateView(void) {return FALSE;}; - - // Override this to do something as soon as the property changed, - // if the view and validators support it. - virtual void OnPropertyChanged(wxProperty *WXUNUSED(property)) {} - - virtual void AddRegistry(wxPropertyValidatorRegistry *registry); - inline virtual wxList& GetRegistryList(void) - { return validatorRegistryList; } - - virtual wxPropertyValidator *FindPropertyValidator(wxProperty *property); - inline virtual void SetPropertySheet(wxPropertySheet *sheet) { propertySheet = sheet; } - inline virtual wxPropertySheet *GetPropertySheet(void) { return propertySheet; } - - virtual void OnOk(void) {}; - virtual void OnCancel(void) {}; - virtual void OnHelp(void) {}; - - inline virtual bool OnClose(void) { return FALSE; } - inline long GetFlags(void) { return buttonFlags; } -}; - - -class wxPropertyValidator: public wxEvtHandler -{ - DECLARE_DYNAMIC_CLASS(wxPropertyValidator) - protected: - long validatorFlags; - wxProperty *validatorProperty; - public: - wxPropertyValidator(long flags = 0); - ~wxPropertyValidator(void); - - inline long GetFlags(void) { return validatorFlags; } - inline void SetValidatorProperty(wxProperty *prop) { validatorProperty = prop; } - inline wxProperty *GetValidatorProperty(void) { return validatorProperty; } - - virtual bool StringToFloat (char *s, float *number); - virtual bool StringToDouble (char *s, double *number); - virtual bool StringToInt (char *s, int *number); - virtual bool StringToLong (char *s, long *number); - virtual char *FloatToString (float number); - virtual char *DoubleToString (double number); - virtual char *IntToString (int number); - virtual char *LongToString (long number); -}; - - -// extern wxPropertyValidator *wxDefaultPropertyValidator; - -class wxPropertyValidatorRegistry: public wxHashTable -{ - DECLARE_DYNAMIC_CLASS(wxPropertyValidatorRegistry) - public: - wxPropertyValidatorRegistry(void); - ~wxPropertyValidatorRegistry(void); - - virtual void RegisterValidator(wxString& roleName, wxPropertyValidator *validator); - virtual wxPropertyValidator *GetValidator(wxString& roleName); - void ClearRegistry(void); -}; - -/* - * Property value class - */ - -typedef enum { - wxPropertyValueNull, - wxPropertyValueInteger, - wxPropertyValueReal, - wxPropertyValuebool, - wxPropertyValueString, - wxPropertyValueList, - wxPropertyValueIntegerPtr, - wxPropertyValueRealPtr, - wxPropertyValueboolPtr, - wxPropertyValueStringPtr -} wxPropertyValueType; - -class wxPropertyValue: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxPropertyValue) - public: - wxObject *client_data; - wxPropertyValueType type; - bool modifiedFlag; - - union { - long integer; // Also doubles as bool - char *string; - float real; - long *integerPtr; - bool *boolPtr; - char **stringPtr; - float *realPtr; - wxPropertyValue *first; // If is a list expr, points to the first node - } value; - - wxPropertyValue *next; // If this is a node in a list, points to the next node - wxPropertyValue *last; // If is a list expr, points to the last node - - wxPropertyValue(void); // Unknown type - wxPropertyValue(const wxPropertyValue& copyFrom); // Copy constructor - wxPropertyValue(const char *val); - wxPropertyValue(const wxString& val); - wxPropertyValue(long val); - wxPropertyValue(bool val); - wxPropertyValue(float val); - wxPropertyValue(double the_real); - wxPropertyValue(wxList *val); - wxPropertyValue(wxStringList *val); - // Pointer versions - wxPropertyValue(char **val); - wxPropertyValue(long *val); - wxPropertyValue(bool *val); - wxPropertyValue(float *val); - - ~wxPropertyValue(void); - - virtual inline wxPropertyValueType Type(void) { return type; } - virtual inline void SetType(wxPropertyValueType typ) { type = typ; } - virtual long IntegerValue(void); - virtual float RealValue(void); - virtual bool BoolValue(void); - virtual char *StringValue(void); - virtual long *IntegerValuePtr(void); - virtual float *RealValuePtr(void); - virtual bool *BoolValuePtr(void); - virtual char **StringValuePtr(void); - - // Get nth arg of clause (starting from 1) - virtual wxPropertyValue *Arg(wxPropertyValueType type, int arg); - - // Return nth argument of a list expression (starting from zero) - virtual wxPropertyValue *Nth(int arg); - // Returns the number of elements in a list expression - virtual int Number(void); - - virtual wxPropertyValue *NewCopy(void); - virtual void Copy(wxPropertyValue& copyFrom); - - virtual void WritePropertyClause(ostream& stream); // Write this expression as a top-level clause - virtual void WritePropertyType(ostream& stream); // Write as any other subexpression - - // Append an expression to a list - virtual void Append(wxPropertyValue *expr); - // Insert at beginning of list - virtual void Insert(wxPropertyValue *expr); - - // Get first expr in list - virtual inline wxPropertyValue *GetFirst(void) - { return ((type == wxPropertyValueList) ? value.first : (wxPropertyValue*)NULL); } - - // Get next expr if this is a node in a list - virtual inline wxPropertyValue *GetNext(void) - { return next; } - - // Get last expr in list - virtual inline wxPropertyValue *GetLast(void) - { return ((type == wxPropertyValueList) ? last : (wxPropertyValue*)NULL); } - - // Delete this node from the list - virtual void Delete(wxPropertyValue *node); - - // Clear list - virtual void ClearList(void); - - virtual inline void SetClientData(wxObject *data) { client_data = data; } - virtual inline wxObject *GetClientData(void) { return client_data; } - - virtual wxString GetStringRepresentation(void); - - inline void SetModified(bool flag = TRUE) { modifiedFlag = flag; } - inline bool GetModified(void) { return modifiedFlag; } - - // Operators - void operator=(const wxPropertyValue& val); -// void operator=(const char *val); - void operator=(const wxString& val); - void operator=(const long val); - void operator=(const bool val); - void operator=(const float val); - void operator=(const char **val); - void operator=(const long *val); - void operator=(const bool *val); - void operator=(const float *val); -}; - -/* - * Property class: contains a name and a value. - */ - -class wxProperty: public wxObject -{ - DECLARE_DYNAMIC_CLASS(wxProperty) - protected: - bool enabled; - public: - wxPropertyValue value; - wxString name; - wxString propertyRole; - wxPropertyValidator *propertyValidator; - wxWindow *propertyWindow; // Usually a panel item, if anything - - wxProperty(void); - wxProperty(wxProperty& copyFrom); - wxProperty(wxString name, wxString role, wxPropertyValidator *ed = NULL); - wxProperty(wxString name, const wxPropertyValue& val, wxString role, wxPropertyValidator *ed = NULL); - ~wxProperty(void); - - virtual wxPropertyValue& GetValue(void); - virtual wxPropertyValidator *GetValidator(void); - virtual wxString& GetName(void); - virtual wxString& GetRole(void); - virtual void SetValue(const wxPropertyValue& val); - virtual void SetValidator(wxPropertyValidator *v); - virtual void SetName(wxString& nm); - virtual void SetRole(wxString& role); - void operator=(const wxPropertyValue& val); - virtual inline void SetWindow(wxWindow *win) { propertyWindow = win; } - virtual inline wxWindow *GetWindow(void) { return propertyWindow; } - - inline void Enable(bool en) { enabled = en; } - inline bool IsEnabled(void) { return enabled; } -}; - -#endif - diff --git a/utils/wxprop/src/propform.cpp b/utils/wxprop/src/propform.cpp deleted file mode 100644 index ccbacde54a..0000000000 --- a/utils/wxprop/src/propform.cpp +++ /dev/null @@ -1,738 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: propform.cpp -// Purpose: Property form classes -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "propform.h" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include -#include -#include -#include - -#if defined(__WXMSW__) && !defined(__GNUWIN32__) -#include -#else -#include -#endif - -#include "wx/window.h" -#include "wx/utils.h" -#include "wx/list.h" -#include "propform.h" - -/* - * Property view - */ - -IMPLEMENT_DYNAMIC_CLASS(wxPropertyFormView, wxPropertyView) - -BEGIN_EVENT_TABLE(wxPropertyFormView, wxPropertyView) - EVT_BUTTON(wxID_OK, wxPropertyFormView::OnOk) - EVT_BUTTON(wxID_CANCEL, wxPropertyFormView::OnCancel) - EVT_BUTTON(wxID_HELP, wxPropertyFormView::OnHelp) - EVT_BUTTON(wxID_PROP_REVERT, wxPropertyFormView::OnRevert) - EVT_BUTTON(wxID_PROP_UPDATE, wxPropertyFormView::OnUpdate) -END_EVENT_TABLE() - -bool wxPropertyFormView::dialogCancelled = FALSE; - -wxPropertyFormView::wxPropertyFormView(wxWindow *propPanel, long flags):wxPropertyView(flags) -{ - propertyWindow = propPanel; - managedWindow = NULL; - - windowCloseButton = NULL; - windowCancelButton = NULL; - windowHelpButton = NULL; - - detailedEditing = FALSE; -} - -wxPropertyFormView::~wxPropertyFormView(void) -{ -} - -void wxPropertyFormView::ShowView(wxPropertySheet *ps, wxWindow *panel) -{ - propertySheet = ps; - - AssociatePanel(panel); -// CreateControls(); -// UpdatePropertyList(); -} - -// Update this view of the viewed object, called e.g. by -// the object itself. -bool wxPropertyFormView::OnUpdateView(void) -{ - return TRUE; -} - -bool wxPropertyFormView::Check(void) -{ - if (!propertySheet) - return FALSE; - - wxNode *node = propertySheet->GetProperties().First(); - while (node) - { - wxProperty *prop = (wxProperty *)node->Data(); - wxPropertyValidator *validator = FindPropertyValidator(prop); - if (validator && validator->IsKindOf(CLASSINFO(wxPropertyFormValidator))) - { - wxPropertyFormValidator *formValidator = (wxPropertyFormValidator *)validator; - if (!formValidator->OnCheckValue(prop, this, propertyWindow)) - return FALSE; - } - node = node->Next(); - } - return TRUE; -} - -bool wxPropertyFormView::TransferToPropertySheet(void) -{ - if (!propertySheet) - return FALSE; - - wxNode *node = propertySheet->GetProperties().First(); - while (node) - { - wxProperty *prop = (wxProperty *)node->Data(); - wxPropertyValidator *validator = FindPropertyValidator(prop); - if (validator && validator->IsKindOf(CLASSINFO(wxPropertyFormValidator))) - { - wxPropertyFormValidator *formValidator = (wxPropertyFormValidator *)validator; - formValidator->OnRetrieveValue(prop, this, propertyWindow); - } - node = node->Next(); - } - return TRUE; -} - -bool wxPropertyFormView::TransferToDialog(void) -{ - if (!propertySheet) - return FALSE; - - wxNode *node = propertySheet->GetProperties().First(); - while (node) - { - wxProperty *prop = (wxProperty *)node->Data(); - wxPropertyValidator *validator = FindPropertyValidator(prop); - if (validator && validator->IsKindOf(CLASSINFO(wxPropertyFormValidator))) - { - wxPropertyFormValidator *formValidator = (wxPropertyFormValidator *)validator; - formValidator->OnDisplayValue(prop, this, propertyWindow); - } - node = node->Next(); - } - return TRUE; -} - -bool wxPropertyFormView::AssociateNames(void) -{ - if (!propertySheet || !propertyWindow) - return FALSE; - - wxNode *node = propertyWindow->GetChildren()->First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (win->GetName() != "") - { - wxProperty *prop = propertySheet->GetProperty(win->GetName()); - if (prop) - prop->SetWindow(win); - } - node = node->Next(); - } - return TRUE; -} - - -bool wxPropertyFormView::OnClose(void) -{ - delete this; - return TRUE; -} - -void wxPropertyFormView::OnOk(wxCommandEvent& WXUNUSED(event)) -{ - // Retrieve the value if any - if (!Check()) - return; - - dialogCancelled = FALSE; - - managedWindow->Close(TRUE); -} - -void wxPropertyFormView::OnCancel(wxCommandEvent& WXUNUSED(event)) -{ - dialogCancelled = TRUE; - - managedWindow->Close(TRUE); -} - -void wxPropertyFormView::OnHelp(wxCommandEvent& WXUNUSED(event)) -{ -} - -void wxPropertyFormView::OnUpdate(wxCommandEvent& WXUNUSED(event)) -{ - TransferToPropertySheet(); -} - -void wxPropertyFormView::OnRevert(wxCommandEvent& WXUNUSED(event)) -{ - TransferToDialog(); -} - -void wxPropertyFormView::OnCommand(wxWindow& win, wxCommandEvent& event) -{ - if (!propertySheet) - return; - - if (win.GetName() == "") - return; - - if (strcmp(win.GetName(), "ok") == 0) - OnOk(event); - else if (strcmp(win.GetName(), "cancel") == 0) - OnCancel(event); - else if (strcmp(win.GetName(), "help") == 0) - OnHelp(event); - else if (strcmp(win.GetName(), "update") == 0) - OnUpdate(event); - else if (strcmp(win.GetName(), "revert") == 0) - OnRevert(event); - else - { - // Find a validator to route the command to. - wxNode *node = propertySheet->GetProperties().First(); - while (node) - { - wxProperty *prop = (wxProperty *)node->Data(); - if (prop->GetWindow() && (prop->GetWindow() == &win)) - { - wxPropertyValidator *validator = FindPropertyValidator(prop); - if (validator && validator->IsKindOf(CLASSINFO(wxPropertyFormValidator))) - { - wxPropertyFormValidator *formValidator = (wxPropertyFormValidator *)validator; - formValidator->OnCommand(prop, this, propertyWindow, event); - return; - } - } - node = node->Next(); - } - } -} - -void wxPropertyFormView::OnDoubleClick(wxControl *item) -{ - if (!propertySheet) - return; - - // Find a validator to route the command to. - wxNode *node = propertySheet->GetProperties().First(); - while (node) - { - wxProperty *prop = (wxProperty *)node->Data(); - if (prop->GetWindow() && ((wxControl *)prop->GetWindow() == item)) - { - wxPropertyValidator *validator = FindPropertyValidator(prop); - if (validator && validator->IsKindOf(CLASSINFO(wxPropertyFormValidator))) - { - wxPropertyFormValidator *formValidator = (wxPropertyFormValidator *)validator; - formValidator->OnDoubleClick(prop, this, propertyWindow); - return; - } - } - node = node->Next(); - } -} - -/* - * Property form dialog box - */ - -IMPLEMENT_CLASS(wxPropertyFormDialog, wxDialog) - -wxPropertyFormDialog::wxPropertyFormDialog(wxPropertyFormView *v, wxWindow *parent, const wxString& title, - const wxPoint& pos, const wxSize& size, long style, const wxString& name): - wxDialog(parent, -1, title, pos, size, style, name) -{ - view = v; - view->AssociatePanel(this); - view->SetManagedWindow(this); -// SetAutoLayout(TRUE); -} - -bool wxPropertyFormDialog::OnClose(void) -{ - if (view) - { - view->OnClose(); - view = NULL; - return TRUE; - } - else - return FALSE; -} - -void wxPropertyFormDialog::OnDefaultAction(wxControl *item) -{ - view->OnDoubleClick(item); -} - -void wxPropertyFormDialog::OnCommand(wxWindow& win, wxCommandEvent& event) -{ - if ( view ) - view->OnCommand(win, event); -} - -// Extend event processing to search the view's event table -bool wxPropertyFormDialog::ProcessEvent(wxEvent& event) -{ - if ( !view || ! view->ProcessEvent(event) ) - return wxEvtHandler::ProcessEvent(event); - else - return TRUE; -} - - -/* - * Property form panel - */ - -IMPLEMENT_CLASS(wxPropertyFormPanel, wxPanel) - -void wxPropertyFormPanel::OnDefaultAction(wxControl *item) -{ - view->OnDoubleClick(item); -} - -void wxPropertyFormPanel::OnCommand(wxWindow& win, wxCommandEvent& event) -{ - view->OnCommand(win, event); -} - -// Extend event processing to search the view's event table -bool wxPropertyFormPanel::ProcessEvent(wxEvent& event) -{ - if ( !view || ! view->ProcessEvent(event) ) - return wxEvtHandler::ProcessEvent(event); - else - return TRUE; -} - -/* - * Property frame - */ - -IMPLEMENT_CLASS(wxPropertyFormFrame, wxFrame) - -bool wxPropertyFormFrame::OnClose(void) -{ - if (view) - return view->OnClose(); - else - return FALSE; -} - -wxPanel *wxPropertyFormFrame::OnCreatePanel(wxFrame *parent, wxPropertyFormView *v) -{ - return new wxPropertyFormPanel(v, parent); -} - -bool wxPropertyFormFrame::Initialize(void) -{ - propertyPanel = OnCreatePanel(this, view); - if (propertyPanel) - { - view->AssociatePanel(propertyPanel); - view->SetManagedWindow(this); -// propertyPanel->SetAutoLayout(TRUE); - return TRUE; - } - else - return FALSE; -} - - /* - * Property form specific validator - */ - -IMPLEMENT_ABSTRACT_CLASS(wxPropertyFormValidator, wxPropertyValidator) - - -/* - * Default validators - */ - -IMPLEMENT_DYNAMIC_CLASS(wxRealFormValidator, wxPropertyFormValidator) - -/// -/// Real number form validator -/// -bool wxRealFormValidator::OnCheckValue( wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *parentWindow) -{ - if (realMin == 0.0 && realMax == 0.0) - return TRUE; - - // The item used for viewing the real number: should be a text item. - wxWindow *propertyWindow = property->GetWindow(); - if (!propertyWindow || !propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) - return FALSE; - - wxString value(((wxTextCtrl *)propertyWindow)->GetValue()); - - float val = 0.0; - if (!StringToFloat(WXSTRINGCAST value, &val)) - { - char buf[200]; - sprintf(buf, "Value %s is not a valid real number!", (const char *)value); - wxMessageBox(buf, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow); - return FALSE; - } - - if (val < realMin || val > realMax) - { - char buf[200]; - sprintf(buf, "Value must be a real number between %.2f and %.2f!", realMin, realMax); - wxMessageBox(buf, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow); - return FALSE; - } - return TRUE; -} - -bool wxRealFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow) ) -{ - // The item used for viewing the real number: should be a text item. - wxWindow *propertyWindow = property->GetWindow(); - if (!propertyWindow || !propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) - return FALSE; - - wxString value(((wxTextCtrl *)propertyWindow)->GetValue()); - - if (value.Length() == 0) - return FALSE; - - float f = (float)atof((const char *)value); - property->GetValue() = f; - return TRUE; -} - -bool wxRealFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow) ) -{ - // The item used for viewing the real number: should be a text item. - wxWindow *propertyWindow = property->GetWindow(); - if (!propertyWindow || !propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) - return FALSE; - - wxTextCtrl *textItem = (wxTextCtrl *)propertyWindow; - textItem->SetValue(FloatToString(property->GetValue().RealValue())); - return TRUE; -} - -/// -/// Integer validator -/// -IMPLEMENT_DYNAMIC_CLASS(wxIntegerFormValidator, wxPropertyFormValidator) - -bool wxIntegerFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *parentWindow) -{ - if (integerMin == 0.0 && integerMax == 0.0) - return TRUE; - - // The item used for viewing the real number: should be a text item or a slider - wxWindow *propertyWindow = property->GetWindow(); - if (!propertyWindow) - return FALSE; - - long val = 0; - - if (propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) - { - wxString value(((wxTextCtrl *)propertyWindow)->GetValue()); - - if (!StringToLong(WXSTRINGCAST value, &val)) - { - char buf[200]; - sprintf(buf, "Value %s is not a valid integer!", (const char *)value); - wxMessageBox(buf, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow); - return FALSE; - } - } - else if (propertyWindow->IsKindOf(CLASSINFO(wxSlider))) - { - val = (long)((wxSlider *)propertyWindow)->GetValue(); - } - else - return FALSE; - - if (val < integerMin || val > integerMax) - { - char buf[200]; - sprintf(buf, "Value must be an integer between %ld and %ld!", integerMin, integerMax); - wxMessageBox(buf, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow); - return FALSE; - } - return TRUE; -} - -bool wxIntegerFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow)) -{ - // The item used for viewing the real number: should be a text item or a slider - wxWindow *propertyWindow = property->GetWindow(); - if (!propertyWindow) - return FALSE; - - if (propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) - { - wxString value(((wxTextCtrl *)propertyWindow)->GetValue()); - - if (value.Length() == 0) - return FALSE; - - long i = atol((const char *)value); - property->GetValue() = i; - } - else if (propertyWindow->IsKindOf(CLASSINFO(wxSlider))) - { - property->GetValue() = (long)((wxSlider *)propertyWindow)->GetValue(); - } - else - return FALSE; - - return TRUE; -} - -bool wxIntegerFormValidator::OnDisplayValue( wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow)) -{ - // The item used for viewing the real number: should be a text item or a slider - wxWindow *propertyWindow = property->GetWindow(); - if (!propertyWindow) - return FALSE; - - if (propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) - { - wxTextCtrl *textItem = (wxTextCtrl *)propertyWindow; - textItem->SetValue(LongToString(property->GetValue().IntegerValue())); - } - else if (propertyWindow->IsKindOf(CLASSINFO(wxSlider))) - { - ((wxSlider *)propertyWindow)->SetValue((int)property->GetValue().IntegerValue()); - } - else - return FALSE; - return TRUE; -} - -/// -/// Boolean validator -/// -IMPLEMENT_DYNAMIC_CLASS(wxBoolFormValidator, wxPropertyFormValidator) - -bool wxBoolFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow)) -{ - // The item used for viewing the boolean: should be a checkbox - wxWindow *propertyWindow = property->GetWindow(); - if (!propertyWindow || !propertyWindow->IsKindOf(CLASSINFO(wxCheckBox))) - return FALSE; - - return TRUE; -} - -bool wxBoolFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow) ) -{ - // The item used for viewing the boolean: should be a checkbox. - wxWindow *propertyWindow = property->GetWindow(); - if (!propertyWindow || !propertyWindow->IsKindOf(CLASSINFO(wxCheckBox))) - return FALSE; - - wxCheckBox *checkBox = (wxCheckBox *)propertyWindow; - - property->GetValue() = (bool)checkBox->GetValue(); - return TRUE; -} - -bool wxBoolFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow)) -{ - // The item used for viewing the boolean: should be a checkbox. - wxWindow *propertyWindow = property->GetWindow(); - if (!propertyWindow || !propertyWindow->IsKindOf(CLASSINFO(wxCheckBox))) - return FALSE; - - wxCheckBox *checkBox = (wxCheckBox *)propertyWindow; - checkBox->SetValue((bool)property->GetValue().BoolValue()); - return TRUE; -} - -/// -/// String validator -/// -IMPLEMENT_DYNAMIC_CLASS(wxStringFormValidator, wxPropertyFormValidator) - -wxStringFormValidator::wxStringFormValidator(wxStringList *list, long flags): - wxPropertyFormValidator(flags) -{ - strings = list; -} - -bool wxStringFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *parentWindow ) -{ - if (!strings) - return TRUE; - - // The item used for viewing the string: should be a text item, choice item or listbox. - wxWindow *propertyWindow = property->GetWindow(); - if (!propertyWindow) - return FALSE; - if (propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) - { - wxTextCtrl *text = (wxTextCtrl *)propertyWindow; - if (!strings->Member(text->GetValue())) - { - wxString s("Value "); - s += text->GetValue(); - s += " is not valid."; - wxMessageBox(s, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow); - return FALSE; - } - } - else - { - // Any other item constrains the string value, - // so we don't have to check it. - } - return TRUE; -} - -bool wxStringFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow) ) -{ - // The item used for viewing the string: should be a text item, choice item or listbox. - wxWindow *propertyWindow = property->GetWindow(); - if (!propertyWindow) - return FALSE; - if (propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) - { - wxTextCtrl *text = (wxTextCtrl *)propertyWindow; - property->GetValue() = text->GetValue(); - } - else if (propertyWindow->IsKindOf(CLASSINFO(wxListBox))) - { - wxListBox *lbox = (wxListBox *)propertyWindow; - if (lbox->GetSelection() > -1) - property->GetValue() = lbox->GetStringSelection(); - } -/* - else if (propertyWindow->IsKindOf(CLASSINFO(wxRadioBox))) - { - wxRadioBox *rbox = (wxRadioBox *)propertyWindow; - int n = 0; - if ((n = rbox->GetSelection()) > -1) - property->GetValue() = rbox->GetString(n); - } -*/ - else if (propertyWindow->IsKindOf(CLASSINFO(wxChoice))) - { - wxChoice *choice = (wxChoice *)propertyWindow; - if (choice->GetSelection() > -1) - property->GetValue() = choice->GetStringSelection(); - } - else - return FALSE; - return TRUE; -} - -bool wxStringFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow) ) -{ - // The item used for viewing the string: should be a text item, choice item or listbox. - wxWindow *propertyWindow = property->GetWindow(); - if (!propertyWindow) - return FALSE; - if (propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) - { - wxTextCtrl *text = (wxTextCtrl *)propertyWindow; - text->SetValue(property->GetValue().StringValue()); - } - else if (propertyWindow->IsKindOf(CLASSINFO(wxListBox))) - { - wxListBox *lbox = (wxListBox *)propertyWindow; - if (lbox->Number() == 0 && strings) - { - // Try to initialize the listbox from 'strings' - wxNode *node = strings->First(); - while (node) - { - char *s = (char *)node->Data(); - lbox->Append(s); - node = node->Next(); - } - } - lbox->SetStringSelection(property->GetValue().StringValue()); - } -/* - else if (propertyWindow->IsKindOf(CLASSINFO(wxRadioBox))) - { - wxRadioBox *rbox = (wxRadioBox *)propertyWindow; - rbox->SetStringSelection(property->GetValue().StringValue()); - } -*/ - else if (propertyWindow->IsKindOf(CLASSINFO(wxChoice))) - { - wxChoice *choice = (wxChoice *)propertyWindow; -#ifndef __XVIEW__ - if (choice->Number() == 0 && strings) - { - // Try to initialize the choice item from 'strings' - // XView doesn't allow this kind of thing. - wxNode *node = strings->First(); - while (node) - { - char *s = (char *)node->Data(); - choice->Append(s); - node = node->Next(); - } - } -#endif - choice->SetStringSelection(property->GetValue().StringValue()); - } - else - return FALSE; - return TRUE; -} - diff --git a/utils/wxprop/src/propform.h b/utils/wxprop/src/propform.h deleted file mode 100644 index f00ad7f701..0000000000 --- a/utils/wxprop/src/propform.h +++ /dev/null @@ -1,289 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: propform.h -// Purpose: Property form classes -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifndef _PROPFORM_H_ -#define _PROPFORM_H_ - -#ifdef __GNUG__ -#pragma interface "propform.h" -#endif - -#include "prop.h" - -//// -//// Property form classes: for using an existing dialog or panel -//// - -#define wxID_PROP_REVERT 3100 -#define wxID_PROP_UPDATE 3101 - -// Mediates between a physical panel and the property sheet -class wxPropertyFormView: public wxPropertyView -{ - DECLARE_DYNAMIC_CLASS(wxPropertyFormView) - protected: - bool detailedEditing; // E.g. using listbox for choices - - wxWindow *propertyWindow; // Panel that the controls will appear on - wxWindow *managedWindow; // Frame or dialog - - wxButton *windowCloseButton; // Or OK - wxButton *windowCancelButton; - wxButton *windowHelpButton; - public: - static bool dialogCancelled; - - wxPropertyFormView(wxWindow *propPanel = NULL, long flags = 0); - ~wxPropertyFormView(void); - - // Associates and shows the view - virtual void ShowView(wxPropertySheet *propertySheet, wxWindow *panel); - - // Update this view of the viewed object, called e.g. by - // the object itself. - virtual bool OnUpdateView(void); - - // Transfer values from property sheet to dialog - virtual bool TransferToDialog(void); - - // Transfer values from dialog to property sheet - virtual bool TransferToPropertySheet(void); - - // Check that all the values are valid - virtual bool Check(void); - - // Give each property in the sheet a panel item, by matching - // the name of the property to the name of the panel item. - // The user doesn't always want to call this; sometimes, it - // will have been done explicitly (e.g., no matching names). - virtual bool AssociateNames(void); - - void OnOk(wxCommandEvent& event); - void OnCancel(wxCommandEvent& event); - void OnHelp(wxCommandEvent& event); - void OnUpdate(wxCommandEvent& event); - void OnRevert(wxCommandEvent& event); - - virtual bool OnClose(void); - virtual void OnDoubleClick(wxControl *item); - - // TODO: does OnCommand still get called...??? - virtual void OnCommand(wxWindow& win, wxCommandEvent& event); - - inline virtual void AssociatePanel(wxWindow *win) { propertyWindow = win; } - inline virtual wxWindow *GetPanel(void) { return propertyWindow; } - - inline virtual void SetManagedWindow(wxWindow *win) { managedWindow = win; } - inline virtual wxWindow *GetManagedWindow(void) { return managedWindow; } - - inline virtual wxButton *GetWindowCloseButton() { return windowCloseButton; } - inline virtual wxButton *GetWindowCancelButton() { return windowCancelButton; } - inline virtual wxButton *GetHelpButton() { return windowHelpButton; } - -DECLARE_EVENT_TABLE() - -}; - -/* - * The type of validator used for forms (wxForm style but using an existing panel - * or dialog box). - * Classes derived from this know how to map from whatever widget they - * find themselves paired with, to the wxProperty and vice versa. - * Should the widget pointer be stored with the validator, or - * the wxProperty? If with the property, we don't have to supply - * a validator for every property. Otherwise, there ALWAYS needs - * to be a validator. On the other hand, not storing a wxWindow pointer - * in the wxProperty is more elegant. Perhaps. - * I think on balance, should put wxWindow pointer into wxProperty. - * After all, wxProperty will often be used to represent the data - * assocated with a window. It's that kinda thing. - */ - -class wxPropertyFormValidator: public wxPropertyValidator -{ - DECLARE_DYNAMIC_CLASS(wxPropertyFormValidator) - protected: - public: - wxPropertyFormValidator(long flags = 0): wxPropertyValidator(flags) { } - ~wxPropertyFormValidator(void) {} - - // Called to check value is OK (e.g. when OK is pressed) - // Return FALSE if value didn't check out; signal to restore old value. - virtual bool OnCheckValue( wxProperty *WXUNUSED(property), wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow) ) { return TRUE; } - - // Does the transferance from the property editing area to the property itself. - // Called by the view, e.g. when closing the window. - virtual bool OnRetrieveValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow) = 0; - - // Called by the view to transfer the property to the window. - virtual bool OnDisplayValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow) = 0; - - virtual void OnDoubleClick( wxProperty *WXUNUSED(property), wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow) ) { } - virtual void OnSetFocus( wxProperty *WXUNUSED(property), wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow) ) { } - virtual void OnKillFocus( wxProperty *WXUNUSED(property), wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow) ) { } - virtual void OnCommand( wxProperty *WXUNUSED(property), wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow), wxCommandEvent& WXUNUSED(event) ) {} -}; - -/* - * Some default validators - */ - -class wxRealFormValidator: public wxPropertyFormValidator -{ - DECLARE_DYNAMIC_CLASS(wxRealFormValidator) - protected: - float realMin; - float realMax; - public: - // 0.0, 0.0 means no range - wxRealFormValidator(float min = 0.0, float max = 0.0, long flags = 0):wxPropertyFormValidator(flags) - { - realMin = min; realMax = max; - } - ~wxRealFormValidator(void) {} - - bool OnCheckValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow); - bool OnRetrieveValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow); - // Called by the view to transfer the property to the window. - bool OnDisplayValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow); -}; - -class wxIntegerFormValidator: public wxPropertyFormValidator -{ - DECLARE_DYNAMIC_CLASS(wxIntegerFormValidator) - protected: - long integerMin; - long integerMax; - public: - // 0, 0 means no range - wxIntegerFormValidator(long min = 0, long max = 0, long flags = 0):wxPropertyFormValidator(flags) - { - integerMin = min; integerMax = max; - } - ~wxIntegerFormValidator(void) {} - - bool OnCheckValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow); - bool OnRetrieveValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow); - bool OnDisplayValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow); -}; - -class wxBoolFormValidator: public wxPropertyFormValidator -{ - DECLARE_DYNAMIC_CLASS(wxBoolFormValidator) - protected: - public: - wxBoolFormValidator(long flags = 0):wxPropertyFormValidator(flags) - { - } - ~wxBoolFormValidator(void) {} - - bool OnCheckValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow); - bool OnRetrieveValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow); - bool OnDisplayValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow); -}; - -class wxStringFormValidator: public wxPropertyFormValidator -{ - DECLARE_DYNAMIC_CLASS(wxStringFormValidator) - protected: - wxStringList *strings; - public: - wxStringFormValidator(wxStringList *list = NULL, long flags = 0); - - ~wxStringFormValidator(void) - { - if (strings) - delete strings; - } - - bool OnCheckValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow); - bool OnRetrieveValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow); - bool OnDisplayValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow); -}; - -/* - * A default dialog box class to use. - */ - -class wxPropertyFormDialog: public wxDialog -{ - DECLARE_CLASS(wxPropertyFormDialog) - private: - wxPropertyFormView *view; - public: - wxPropertyFormDialog(wxPropertyFormView *v, wxWindow *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "dialogBox"); - bool OnClose(void); - void OnDefaultAction(wxControl *item); - void OnCommand(wxWindow& win, wxCommandEvent& event); - - // Extend event processing to search the view's event table - virtual bool ProcessEvent(wxEvent& event); -}; - -/* - * A default panel class to use. - */ - -class wxPropertyFormPanel: public wxPanel -{ - DECLARE_CLASS(wxPropertyFormPanel) - private: - wxPropertyFormView *view; - public: - wxPropertyFormPanel(wxPropertyFormView *v, wxWindow *parent, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "panel"): - wxPanel(parent, -1, pos, size, style, name) - { - view = v; - } - void OnDefaultAction(wxControl *item); - void OnCommand(wxWindow& win, wxCommandEvent& event); - - // Extend event processing to search the view's event table - virtual bool ProcessEvent(wxEvent& event); -}; - -/* - * A default frame class to use. - */ - -class wxPropertyFormFrame: public wxFrame -{ - DECLARE_CLASS(wxPropertyFormFrame) - private: - wxPropertyFormView *view; - wxPanel *propertyPanel; - public: - wxPropertyFormFrame(wxPropertyFormView *v, wxFrame *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME, const wxString& name = "frame"): - wxFrame(parent, -1, title, pos, size, style, name) - { - view = v; - propertyPanel = NULL; - } - bool OnClose(void); - - // Must call this to create panel and associate view - virtual bool Initialize(void); - virtual wxPanel *OnCreatePanel(wxFrame *parent, wxPropertyFormView *v); - inline virtual wxPanel *GetPropertyPanel(void) { return propertyPanel; } -}; - -#endif - diff --git a/utils/wxprop/src/proplist.cpp b/utils/wxprop/src/proplist.cpp deleted file mode 100644 index 9e9b60f053..0000000000 --- a/utils/wxprop/src/proplist.cpp +++ /dev/null @@ -1,1878 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: proplist.cpp -// Purpose: Property list classes -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "proplist.h" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include -#include -#include -#include - -#if defined(__WXMSW__) && !defined(__GNUWIN32__) -#include -#else -#include -#endif - -#include "wx/window.h" -#include "wx/utils.h" -#include "wx/list.h" -#include "wx/colordlg.h" -#include "proplist.h" - -/* - * Property text edit control - */ - -IMPLEMENT_CLASS(wxPropertyTextEdit, wxTextCtrl) - -wxPropertyTextEdit::wxPropertyTextEdit(wxPropertyListView *v, wxWindow *parent, - const wxWindowID id, const wxString& value, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name): - wxTextCtrl(parent, id, value, pos, size, style, wxDefaultValidator, name) -{ - view = v; -} - -void wxPropertyTextEdit::OnSetFocus(void) -{ -} - -void wxPropertyTextEdit::OnKillFocus(void) -{ -} - -/* - * Property list view - */ - -IMPLEMENT_DYNAMIC_CLASS(wxPropertyListView, wxPropertyView) - -BEGIN_EVENT_TABLE(wxPropertyListView, wxPropertyView) - EVT_BUTTON(wxID_OK, wxPropertyListView::OnOk) - EVT_BUTTON(wxID_CANCEL, wxPropertyListView::OnCancel) - EVT_BUTTON(wxID_HELP, wxPropertyListView::OnHelp) - EVT_BUTTON(wxID_PROP_CROSS, wxPropertyListView::OnCross) - EVT_BUTTON(wxID_PROP_CHECK, wxPropertyListView::OnCheck) - EVT_BUTTON(wxID_PROP_EDIT, wxPropertyListView::OnEdit) - EVT_TEXT_ENTER(wxID_PROP_TEXT, wxPropertyListView::OnText) - EVT_LISTBOX(wxID_PROP_SELECT, wxPropertyListView::OnPropertySelect) - EVT_COMMAND(wxID_PROP_SELECT, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxPropertyListView::OnPropertyDoubleClick) - EVT_TEXT(wxID_PROP_VALUE_SELECT, wxPropertyListView::OnValueListSelect) -END_EVENT_TABLE() - -bool wxPropertyListView::dialogCancelled = FALSE; -wxBitmap *wxPropertyListView::tickBitmap = NULL; -wxBitmap *wxPropertyListView::crossBitmap = NULL; - -wxPropertyListView::wxPropertyListView(wxPanel *propPanel, long flags):wxPropertyView(flags) -{ - propertyScrollingList = NULL; - valueList = NULL; - valueText = NULL; - editButton = NULL; - confirmButton = NULL; - cancelButton = NULL; - propertyWindow = propPanel; - managedWindow = NULL; - - windowCloseButton = NULL; - windowCancelButton = NULL; - windowHelpButton = NULL; - - detailedEditing = FALSE; -} - -wxPropertyListView::~wxPropertyListView(void) -{ -/* - if (tickBitmap) - delete tickBitmap; - if (crossBitmap) - delete crossBitmap; -*/ -} - -void wxPropertyListView::ShowView(wxPropertySheet *ps, wxPanel *panel) -{ - propertySheet = ps; - - AssociatePanel(panel); - CreateControls(); - - UpdatePropertyList(); - panel->Layout(); -} - -// Update this view of the viewed object, called e.g. by -// the object itself. -bool wxPropertyListView::OnUpdateView(void) -{ - return TRUE; -} - -bool wxPropertyListView::UpdatePropertyList(bool clearEditArea) -{ - if (!propertyScrollingList || !propertySheet) - return FALSE; - - propertyScrollingList->Clear(); - if (clearEditArea) - { - valueList->Clear(); - valueText->SetValue(""); - } - wxNode *node = propertySheet->GetProperties().First(); - - // Should sort them... later... - while (node) - { - wxProperty *property = (wxProperty *)node->Data(); - wxString stringValueRepr(property->GetValue().GetStringRepresentation()); - wxString paddedString(MakeNameValueString(property->GetName(), stringValueRepr)); - - propertyScrollingList->Append(paddedString.GetData(), (char *)property); - node = node->Next(); - } - return TRUE; -} - -bool wxPropertyListView::UpdatePropertyDisplayInList(wxProperty *property) -{ - if (!propertyScrollingList || !propertySheet) - return FALSE; - - int currentlySelected = propertyScrollingList->GetSelection(); -// #ifdef __WXMSW__ - wxString stringValueRepr(property->GetValue().GetStringRepresentation()); - wxString paddedString(MakeNameValueString(property->GetName(), stringValueRepr)); - int sel = FindListIndexForProperty(property); - - if (sel > -1) - { - // Don't update the listbox unnecessarily because it can cause - // ugly flashing. - - if (paddedString != propertyScrollingList->GetString(sel)) - propertyScrollingList->SetString(sel, paddedString.GetData()); - } -//#else -// UpdatePropertyList(FALSE); -//#endif - - if (currentlySelected > -1) - propertyScrollingList->SetSelection(currentlySelected); - - return TRUE; -} - -// Find the wxListBox index corresponding to this property -int wxPropertyListView::FindListIndexForProperty(wxProperty *property) -{ - int n = propertyScrollingList->Number(); - for (int i = 0; i < n; i++) - { - if (property == (wxProperty *)propertyScrollingList->wxListBox::GetClientData(i)) - return i; - } - return -1; -} - -wxString wxPropertyListView::MakeNameValueString(wxString name, wxString value) -{ - wxString theString(name); - - int nameWidth = 25; - int padWith = nameWidth - theString.Length(); - if (padWith < 0) - padWith = 0; - - if (GetFlags() & wxPROP_SHOWVALUES) - { - // Want to pad with spaces - theString.Append(' ', padWith); - theString += value; - } - - return theString; -} - -// Select and show string representation in validator the given -// property. NULL resets to show no property. -bool wxPropertyListView::ShowProperty(wxProperty *property, bool select) -{ - if (currentProperty) - { - EndShowingProperty(currentProperty); - currentProperty = NULL; - } - - valueList->Clear(); - valueText->SetValue(""); - - if (property) - { - currentProperty = property; - BeginShowingProperty(property); - } - if (select) - { - int sel = FindListIndexForProperty(property); - if (sel > -1) - propertyScrollingList->SetSelection(sel); - } - return TRUE; -} - -// Find appropriate validator and load property into value controls -bool wxPropertyListView::BeginShowingProperty(wxProperty *property) -{ - currentValidator = FindPropertyValidator(property); - if (!currentValidator) - return FALSE; - - if (!currentValidator->IsKindOf(CLASSINFO(wxPropertyListValidator))) - return FALSE; - - wxPropertyListValidator *listValidator = (wxPropertyListValidator *)currentValidator; - - listValidator->OnPrepareControls(property, this, propertyWindow); - DisplayProperty(property); - return TRUE; -} - -// Find appropriate validator and unload property from value controls -bool wxPropertyListView::EndShowingProperty(wxProperty *property) -{ - if (!currentValidator) - return FALSE; - - RetrieveProperty(property); - - if (!currentValidator->IsKindOf(CLASSINFO(wxPropertyListValidator))) - return FALSE; - - wxPropertyListValidator *listValidator = (wxPropertyListValidator *)currentValidator; - - listValidator->OnClearControls(property, this, propertyWindow); - if (detailedEditing) - { - listValidator->OnClearDetailControls(property, this, propertyWindow); - detailedEditing = FALSE; - } - return TRUE; -} - -void wxPropertyListView::BeginDetailedEditing(void) -{ - if (!currentValidator) - return; - if (!currentProperty) - return; - if (detailedEditing) - return; - if (!currentValidator->IsKindOf(CLASSINFO(wxPropertyListValidator))) - return; - if (!currentProperty->IsEnabled()) - return; - - wxPropertyListValidator *listValidator = (wxPropertyListValidator *)currentValidator; - - if (listValidator->OnPrepareDetailControls(currentProperty, this, propertyWindow)) - detailedEditing = TRUE; -} - -void wxPropertyListView::EndDetailedEditing(void) -{ - if (!currentValidator) - return; - if (!currentProperty) - return; - - RetrieveProperty(currentProperty); - - if (!currentValidator->IsKindOf(CLASSINFO(wxPropertyListValidator))) - return; - - wxPropertyListValidator *listValidator = (wxPropertyListValidator *)currentValidator; - - if (detailedEditing) - { - listValidator->OnClearDetailControls(currentProperty, this, propertyWindow); - detailedEditing = FALSE; - } -} - -bool wxPropertyListView::DisplayProperty(wxProperty *property) -{ - if (!currentValidator) - return FALSE; - - if (((currentValidator->GetFlags() & wxPROP_ALLOW_TEXT_EDITING) == 0) || !property->IsEnabled()) - valueText->SetEditable(FALSE); - else - valueText->SetEditable(TRUE); - - if (!currentValidator->IsKindOf(CLASSINFO(wxPropertyListValidator))) - return FALSE; - - wxPropertyListValidator *listValidator = (wxPropertyListValidator *)currentValidator; - - listValidator->OnDisplayValue(property, this, propertyWindow); - return TRUE; -} - -bool wxPropertyListView::RetrieveProperty(wxProperty *property) -{ - if (!currentValidator) - return FALSE; - if (!property->IsEnabled()) - return FALSE; - - if (!currentValidator->IsKindOf(CLASSINFO(wxPropertyListValidator))) - return FALSE; - - wxPropertyListValidator *listValidator = (wxPropertyListValidator *)currentValidator; - - if (listValidator->OnCheckValue(property, this, propertyWindow)) - { - if (listValidator->OnRetrieveValue(property, this, propertyWindow)) - { - UpdatePropertyDisplayInList(property); - OnPropertyChanged(property); - } - } - else - { - // Revert to old value - listValidator->OnDisplayValue(property, this, propertyWindow); - } - return TRUE; -} - - -bool wxPropertyListView::EditProperty(wxProperty *WXUNUSED(property)) -{ - return TRUE; -} - -// Called by the listbox callback -void wxPropertyListView::OnPropertySelect(wxCommandEvent& WXUNUSED(event)) -{ - int sel = propertyScrollingList->GetSelection(); - if (sel > -1) - { - wxProperty *newSel = (wxProperty *)propertyScrollingList->wxListBox::GetClientData(sel); - if (newSel && newSel != currentProperty) - { - ShowProperty(newSel, FALSE); - } - } -} - -bool wxPropertyListView::CreateControls(void) -{ - wxPanel *panel = (wxPanel *)propertyWindow; - - int largeButtonWidth = 60; - int largeButtonHeight = 25; - - int smallButtonWidth = 25; - int smallButtonHeight = 20; - - // XView must be allowed to choose its own sized buttons -#ifdef __XVIEW__ - largeButtonWidth = -1; - largeButtonHeight = -1; - - smallButtonWidth = -1; - smallButtonHeight = -1; -#endif - - if (valueText) - return TRUE; - - if (!panel) - return FALSE; - - wxWindow *leftMostWindow = panel; - wxWindow *topMostWindow = panel; - wxWindow *rightMostWindow = panel; - - wxSystemSettings settings; - wxFont guiFont = settings.GetSystemFont(wxSYS_DEFAULT_GUI_FONT); - -#ifdef __WXMSW__ - wxFont *boringFont = wxTheFontList->FindOrCreateFont(guiFont.GetPointSize(), wxDEFAULT, wxNORMAL, wxNORMAL, FALSE, "Courier New"); -#else - wxFont *boringFont = wxTheFontList->FindOrCreateFont(guiFont.GetPointSize(), wxMODERN, wxNORMAL, wxNORMAL); -#endif - - // May need to be changed in future to eliminate clashes with app. - panel->SetClientData((char *)this); - - // These buttons are at the bottom of the window, but create them now - // so the constraints are evaluated in the correct order - if (buttonFlags & wxPROP_BUTTON_OK) - { - windowCloseButton = new wxButton(panel, wxID_OK, "OK", - wxPoint(-1, -1), wxSize(largeButtonWidth, largeButtonHeight)); - windowCloseButton->SetDefault(); - windowCloseButton->SetFocus(); - } - else if (buttonFlags & wxPROP_BUTTON_CLOSE) - { - windowCloseButton = new wxButton(panel, wxID_OK, "Close", - wxPoint(-1, -1), wxSize(largeButtonWidth, largeButtonHeight)); - } - if (buttonFlags & wxPROP_BUTTON_CANCEL) - { - windowCancelButton = new wxButton(panel, wxID_CANCEL, "Cancel", - wxPoint(-1, -1), wxSize(largeButtonWidth, largeButtonHeight)); - } - if (buttonFlags & wxPROP_BUTTON_HELP) - { - windowHelpButton = new wxButton(panel, wxID_HELP, "Help", - wxPoint(-1, -1), wxSize(largeButtonWidth, largeButtonHeight)); - } - - if (windowCloseButton) - { - wxLayoutConstraints *c1 = new wxLayoutConstraints; - - c1->left.SameAs (panel, wxLeft, 2); - c1->bottom.SameAs (panel, wxBottom, 2); - c1->width.AsIs(); - c1->height.AsIs(); - windowCloseButton->SetConstraints(c1); - leftMostWindow = windowCloseButton; - } - if (windowCancelButton) - { - wxLayoutConstraints *c2 = new wxLayoutConstraints; - - c2->right.SameAs (panel, wxRight, 2); - c2->bottom.SameAs (panel, wxBottom, 2); - c2->width.AsIs(); - c2->height.AsIs(); - windowCancelButton->SetConstraints(c2); - leftMostWindow = windowCancelButton; - } - if (windowHelpButton) - { - wxLayoutConstraints *c2 = new wxLayoutConstraints; - if (leftMostWindow == panel) - c2->left.SameAs (panel, wxLeft, 2); - else - c2->left.RightOf (leftMostWindow, 2); - - c2->bottom.SameAs (panel, wxBottom, 2); - c2->width.AsIs(); - c2->height.AsIs(); - windowHelpButton->SetConstraints(c2); - leftMostWindow = windowHelpButton; - } - - if (buttonFlags & wxPROP_BUTTON_CHECK_CROSS) - { -/* - if (!tickBitmap) - { -#ifdef __WXMSW__ - tickBitmap = new wxBitmap("tick_bmp", wxBITMAP_TYPE_RESOURCE); - crossBitmap = new wxBitmap("cross_bmp", wxBITMAP_TYPE_RESOURCE); - if (!tickBitmap || !crossBitmap || !tickBitmap->Ok() || !crossBitmap->Ok()) - { - if (tickBitmap) - delete tickBitmap; - if (crossBitmap) - delete crossBitmap; - tickBitmap = NULL; - crossBitmap = NULL; - } -#endif - } -*/ -/* - if (tickBitmap && crossBitmap) - { - confirmButton = new wxBitmapButton(panel, wxID_PROP_CHECK, tickBitmap, - wxPoint(-1, -1), wxSize(smallButtonWidth-5, smallButtonHeight-5)); - cancelButton = new wxBitmapButton(panel, wxID_PROP_CROSS, crossBitmap, - wxPoint(-1, -1), wxSize(smallButtonWidth-5, smallButtonHeight-5)); - } - else -*/ - { - confirmButton = new wxButton(panel, wxID_PROP_CHECK, ":-)", - wxPoint(-1, -1), wxSize(smallButtonWidth, smallButtonHeight)); - cancelButton = new wxButton(panel, wxID_PROP_CROSS, "X", - wxPoint(-1, -1), wxSize(smallButtonWidth, smallButtonHeight)); - } - - wxLayoutConstraints *c = new wxLayoutConstraints; - c->left.SameAs (panel, wxLeft, 2); -/* - if (windowCloseButton) - c->top.Below (windowCloseButton, 2); - else -*/ - c->top.SameAs (panel, wxTop, 2); - - c->width.AsIs(); - c->height.AsIs(); - - cancelButton->SetConstraints(c); - - c = new wxLayoutConstraints; - c->left.RightOf (cancelButton, 2); - c->top.SameAs (cancelButton, wxTop, 0); - c->width.AsIs(); - c->height.AsIs(); - - confirmButton->SetConstraints(c); - - cancelButton->Enable(FALSE); - confirmButton->Enable(FALSE); - } - - if (buttonFlags & wxPROP_PULLDOWN) - { - editButton = new wxButton(panel, wxID_PROP_EDIT, "...", - wxPoint(-1, -1), wxSize(smallButtonWidth, smallButtonHeight)); - editButton->Enable(FALSE); - wxLayoutConstraints *c = new wxLayoutConstraints; - -/* - if (windowCloseButton) - c->top.Below (windowCloseButton, 2); - else -*/ - c->top.SameAs (panel, wxTop, 2); - - c->right.SameAs (panel, wxRight, 2); - c->width.AsIs(); - c->height.AsIs(); - editButton->SetConstraints(c); - } - - valueText = new wxPropertyTextEdit(this, panel, wxID_PROP_TEXT, "", wxPoint(-1, -1), wxSize(-1, -1), wxPROCESS_ENTER); - valueText->Enable(FALSE); - - wxLayoutConstraints *c = new wxLayoutConstraints; - - if (cancelButton) - c->left.RightOf (confirmButton, 2); - else - c->left.SameAs (panel, wxLeft, 2); -/* - if (windowCloseButton) - c->top.Below (windowCloseButton, 2); - else -*/ - c->top.SameAs (panel, wxTop, 2); - - if (editButton) - c->right.LeftOf (editButton, 2); - else - c->right.SameAs (panel, wxRight, 2); - c->height.AsIs(); - - valueText->SetConstraints(c); - - valueList = new wxListBox(panel, wxID_PROP_VALUE_SELECT, wxPoint(-1, -1), wxSize(-1, 60)); - valueList->Show(FALSE); - - c = new wxLayoutConstraints; - - c->left.SameAs (panel, wxLeft, 2); - c->top.Below (valueText, 2); - c->right.SameAs (panel, wxRight, 2); - c->height.Absolute(60); - - valueList->SetConstraints(c); - - propertyScrollingList = new wxListBox(panel, wxID_PROP_SELECT, - wxPoint(-1, -1), wxSize(300, 300)); - propertyScrollingList->SetFont(boringFont); - - c = new wxLayoutConstraints; - - c->left.SameAs (panel, wxLeft, 2); - - if (buttonFlags & wxPROP_DYNAMIC_VALUE_FIELD) - c->top.Below (valueText, 2); - else - c->top.Below (valueList, 2); - - c->right.SameAs (panel, wxRight, 2); - - if (windowCloseButton) - c->bottom.Above (windowCloseButton, -2); - else - c->bottom.SameAs (panel, wxBottom, 2); - - propertyScrollingList->SetConstraints(c); - - - // Note: if this is called now, it causes a GPF. - // Why? -// panel->Layout(); - - return TRUE; -} - -void wxPropertyListView::ShowTextControl(bool show) -{ - if (valueText) - valueText->Show(show); -} - -void wxPropertyListView::ShowListBoxControl(bool show) -{ - if (valueList) - { - valueList->Show(show); - if (buttonFlags & wxPROP_DYNAMIC_VALUE_FIELD) - { - wxLayoutConstraints *constraints = propertyScrollingList->GetConstraints(); - if (constraints) - { - if (show) - constraints->top.Below(valueList, 2); - else - constraints->top.Below(valueText, 2); - propertyWindow->Layout(); - } - } - } -} - -void wxPropertyListView::EnableCheck(bool show) -{ - if (confirmButton) - confirmButton->Enable(show); -} - -void wxPropertyListView::EnableCross(bool show) -{ - if (cancelButton) - cancelButton->Enable(show); -} - -bool wxPropertyListView::OnClose(void) -{ - // Retrieve the value if any - wxCommandEvent event; - OnCheck(event); - - delete this; - return TRUE; -} - -void wxPropertyListView::OnValueListSelect(wxCommandEvent& WXUNUSED(event)) -{ - if (currentProperty && currentValidator) - { - if (!currentValidator->IsKindOf(CLASSINFO(wxPropertyListValidator))) - return; - - wxPropertyListValidator *listValidator = (wxPropertyListValidator *)currentValidator; - - listValidator->OnValueListSelect(currentProperty, this, propertyWindow); - } -} - -void wxPropertyListView::OnOk(wxCommandEvent& event) -{ - // Retrieve the value if any - OnCheck(event); - - managedWindow->Close(TRUE); -} - -void wxPropertyListView::OnCancel(wxCommandEvent& WXUNUSED(event)) -{ -// SetReturnCode(wxID_CANCEL); - managedWindow->Close(TRUE); - dialogCancelled = TRUE; -} - -void wxPropertyListView::OnHelp(wxCommandEvent& WXUNUSED(event)) -{ -} - -void wxPropertyListView::OnCheck(wxCommandEvent& WXUNUSED(event)) -{ - if (currentProperty) - { - RetrieveProperty(currentProperty); - } -} - -void wxPropertyListView::OnCross(wxCommandEvent& WXUNUSED(event)) -{ - if (currentProperty && currentValidator) - { - if (!currentValidator->IsKindOf(CLASSINFO(wxPropertyListValidator))) - return; - - wxPropertyListValidator *listValidator = (wxPropertyListValidator *)currentValidator; - - // Revert to old value - listValidator->OnDisplayValue(currentProperty, this, propertyWindow); - } -} - -void wxPropertyListView::OnPropertyDoubleClick(wxCommandEvent& WXUNUSED(event)) -{ - if (currentProperty && currentValidator) - { - if (!currentValidator->IsKindOf(CLASSINFO(wxPropertyListValidator))) - return; - - wxPropertyListValidator *listValidator = (wxPropertyListValidator *)currentValidator; - - // Revert to old value - listValidator->OnDoubleClick(currentProperty, this, propertyWindow); - } -} - -void wxPropertyListView::OnEdit(wxCommandEvent& WXUNUSED(event)) -{ - if (currentProperty && currentValidator) - { - if (!currentValidator->IsKindOf(CLASSINFO(wxPropertyListValidator))) - return; - - wxPropertyListValidator *listValidator = (wxPropertyListValidator *)currentValidator; - - listValidator->OnEdit(currentProperty, this, propertyWindow); - } -} - -void wxPropertyListView::OnText(wxCommandEvent& event) -{ - if (event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER) - { - OnCheck(event); - } -} - -/* - * Property dialog box - */ - -IMPLEMENT_CLASS(wxPropertyListDialog, wxDialog) - -BEGIN_EVENT_TABLE(wxPropertyListDialog, wxDialog) - EVT_BUTTON(wxID_CANCEL, wxPropertyListDialog::OnCancel) -END_EVENT_TABLE() - -wxPropertyListDialog::wxPropertyListDialog(wxPropertyListView *v, wxWindow *parent, - const wxString& title, const wxPoint& pos, - const wxSize& size, long style, const wxString& name): - wxDialog(parent, -1, title, pos, size, style, name) -{ - view = v; - view->AssociatePanel( ((wxPanel*)this) ); - view->SetManagedWindow(this); - SetAutoLayout(TRUE); -} - -bool wxPropertyListDialog::OnClose(void) -{ - if (view) - { - SetReturnCode(wxID_CANCEL); - view->OnClose(); - view = NULL; - return TRUE; - } - else - return FALSE; -} - -void wxPropertyListDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) -{ - SetReturnCode(wxID_CANCEL); - this->Close(); -} - -void wxPropertyListDialog::OnDefaultAction(wxControl *item) -{ -/* - if (item == view->GetPropertyScrollingList()) - view->OnDoubleClick(); -*/ -} - -// Extend event processing to search the view's event table -bool wxPropertyListDialog::ProcessEvent(wxEvent& event) -{ - if ( !view || ! view->ProcessEvent(event) ) - return wxEvtHandler::ProcessEvent(event); - else - return TRUE; -} - -/* - * Property panel - */ - -IMPLEMENT_CLASS(wxPropertyListPanel, wxPanel) - -BEGIN_EVENT_TABLE(wxPropertyListPanel, wxPanel) - EVT_SIZE(wxPropertyListPanel::OnSize) -END_EVENT_TABLE() - -void wxPropertyListPanel::OnDefaultAction(wxControl *item) -{ -/* - if (item == view->GetPropertyScrollingList()) - view->OnDoubleClick(); -*/ -} - -// Extend event processing to search the view's event table -bool wxPropertyListPanel::ProcessEvent(wxEvent& event) -{ - if ( !view || ! view->ProcessEvent(event) ) - return wxEvtHandler::ProcessEvent(event); - else - return TRUE; -} - -void wxPropertyListPanel::OnSize(wxSizeEvent& WXUNUSED(event)) -{ - Layout(); -} - -/* - * Property frame - */ - -IMPLEMENT_CLASS(wxPropertyListFrame, wxFrame) - -bool wxPropertyListFrame::OnClose(void) -{ - if (view) - { - if (propertyPanel) - propertyPanel->SetView(NULL); - view->OnClose(); - view = NULL; - return TRUE; - } - else - return FALSE; -} - -wxPropertyListPanel *wxPropertyListFrame::OnCreatePanel(wxFrame *parent, wxPropertyListView *v) -{ - return new wxPropertyListPanel(v, parent); -} - -bool wxPropertyListFrame::Initialize(void) -{ - propertyPanel = OnCreatePanel(this, view); - if (propertyPanel) - { - view->AssociatePanel(propertyPanel); - view->SetManagedWindow(this); - propertyPanel->SetAutoLayout(TRUE); - return TRUE; - } - else - return FALSE; -} - - /* - * Property list specific validator - */ - -IMPLEMENT_ABSTRACT_CLASS(wxPropertyListValidator, wxPropertyValidator) - -bool wxPropertyListValidator::OnSelect(bool select, wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ -// view->GetValueText()->Show(TRUE); - if (select) - OnDisplayValue(property, view, parentWindow); - - return TRUE; -} - -bool wxPropertyListValidator::OnValueListSelect(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - wxString s(view->GetValueList()->GetStringSelection()); - if (s != "") - { - view->GetValueText()->SetValue(s); - view->RetrieveProperty(property); - } - return TRUE; -} - -bool wxPropertyListValidator::OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ -// view->GetValueText()->Show(TRUE); - wxString str(property->GetValue().GetStringRepresentation()); - - view->GetValueText()->SetValue(str.GetData()); - return TRUE; -} - -// Called when TICK is pressed or focus is lost or view wants to update -// the property list. -// Does the transferance from the property editing area to the property itself -bool wxPropertyListValidator::OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return FALSE; - return FALSE; -} - -void wxPropertyListValidator::OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (view->GetDetailedEditing()) - view->EndDetailedEditing(); - else - view->BeginDetailedEditing(); -} - -bool wxPropertyListValidator::OnClearControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (view->GetConfirmButton()) - view->GetConfirmButton()->Enable(FALSE); - if (view->GetCancelButton()) - view->GetCancelButton()->Enable(FALSE); - if (view->GetEditButton()) - view->GetEditButton()->Enable(FALSE); - return TRUE; -} - -/* - * Default validators - */ - -IMPLEMENT_DYNAMIC_CLASS(wxRealListValidator, wxPropertyListValidator) - -/// -/// Real number validator -/// -bool wxRealListValidator::OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (realMin == 0.0 && realMax == 0.0) - return TRUE; - - if (!view->GetValueText()) - return FALSE; - wxString value(view->GetValueText()->GetValue()); - - float val = 0.0; - if (!StringToFloat(WXSTRINGCAST value, &val)) - { - char buf[200]; - sprintf(buf, "Value %s is not a valid real number!", value.GetData()); - wxMessageBox(buf, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow); - return FALSE; - } - - if (val < realMin || val > realMax) - { - char buf[200]; - sprintf(buf, "Value must be a real number between %.2f and %.2f!", realMin, realMax); - wxMessageBox(buf, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow); - return FALSE; - } - return TRUE; -} - -// Called when TICK is pressed or focus is lost or view wants to update -// the property list. -// Does the transferance from the property editing area to the property itself -bool wxRealListValidator::OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return FALSE; - - if (strlen(view->GetValueText()->GetValue()) == 0) - return FALSE; - - wxString value(view->GetValueText()->GetValue()); - float f = (float)atof(value.GetData()); - property->GetValue() = f; - return TRUE; -} - -bool wxRealListValidator::OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (view->GetConfirmButton()) - view->GetConfirmButton()->Enable(TRUE); - if (view->GetCancelButton()) - view->GetCancelButton()->Enable(TRUE); - if (view->GetEditButton()) - view->GetEditButton()->Enable(FALSE); - if (view->GetValueText()) - view->GetValueText()->Enable(TRUE); - return TRUE; -} - -/// -/// Integer validator -/// -IMPLEMENT_DYNAMIC_CLASS(wxIntegerListValidator, wxPropertyListValidator) - -bool wxIntegerListValidator::OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (integerMin == 0 && integerMax == 0) - return TRUE; - - if (!view->GetValueText()) - return FALSE; - wxString value(view->GetValueText()->GetValue()); - - long val = 0; - if (!StringToLong(WXSTRINGCAST value, &val)) - { - char buf[200]; - sprintf(buf, "Value %s is not a valid integer!", value.GetData()); - wxMessageBox(buf, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow); - return FALSE; - } - if (val < integerMin || val > integerMax) - { - char buf[200]; - sprintf(buf, "Value must be an integer between %ld and %ld!", integerMin, integerMax); - wxMessageBox(buf, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow); - return FALSE; - } - return TRUE; -} - -// Called when TICK is pressed or focus is lost or view wants to update -// the property list. -// Does the transferance from the property editing area to the property itself -bool wxIntegerListValidator::OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return FALSE; - - if (strlen(view->GetValueText()->GetValue()) == 0) - return FALSE; - - wxString value(view->GetValueText()->GetValue()); - long val = (long)atoi(value.GetData()); - property->GetValue() = (long)val; - return TRUE; -} - -bool wxIntegerListValidator::OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (view->GetConfirmButton()) - view->GetConfirmButton()->Enable(TRUE); - if (view->GetCancelButton()) - view->GetCancelButton()->Enable(TRUE); - if (view->GetEditButton()) - view->GetEditButton()->Enable(FALSE); - if (view->GetValueText()) - view->GetValueText()->Enable(TRUE); - return TRUE; -} - -/// -/// boolean validator -/// -IMPLEMENT_DYNAMIC_CLASS(wxBoolListValidator, wxPropertyListValidator) - -bool wxBoolListValidator::OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return FALSE; - wxString value(view->GetValueText()->GetValue()); - if (value != "True" && value != "False") - { - wxMessageBox("Value must be True or False!", "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow); - return FALSE; - } - return TRUE; -} - -// Called when TICK is pressed or focus is lost or view wants to update -// the property list. -// Does the transferance from the property editing area to the property itself -bool wxBoolListValidator::OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return FALSE; - - if (strlen(view->GetValueText()->GetValue()) == 0) - return FALSE; - - wxString value(view->GetValueText()->GetValue()); - bool boolValue = FALSE; - if (value == "True") - boolValue = TRUE; - else - boolValue = FALSE; - property->GetValue() = (bool)boolValue; - return TRUE; -} - -bool wxBoolListValidator::OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return FALSE; - wxString str(property->GetValue().GetStringRepresentation()); - - view->GetValueText()->SetValue(str.GetData()); - view->GetValueList()->SetStringSelection(str.GetData()); - return TRUE; -} - -bool wxBoolListValidator::OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (view->GetConfirmButton()) - view->GetConfirmButton()->Enable(FALSE); - if (view->GetCancelButton()) - view->GetCancelButton()->Enable(FALSE); - if (view->GetEditButton()) - view->GetEditButton()->Enable(TRUE); - if (view->GetValueText()) - view->GetValueText()->Enable(FALSE); - return TRUE; -} - -bool wxBoolListValidator::OnPrepareDetailControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (view->GetValueList()) - { - view->ShowListBoxControl(TRUE); - view->GetValueList()->Enable(TRUE); - - view->GetValueList()->Append("True"); - view->GetValueList()->Append("False"); - char *currentString = copystring(view->GetValueText()->GetValue()); - view->GetValueList()->SetStringSelection(currentString); - delete[] currentString; - } - return TRUE; -} - -bool wxBoolListValidator::OnClearDetailControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (view->GetValueList()) - { - view->GetValueList()->Clear(); - view->ShowListBoxControl(FALSE); - view->GetValueList()->Enable(FALSE); - } - return TRUE; -} - -// Called when the property is double clicked. Extra functionality can be provided, -// cycling through possible values. -bool wxBoolListValidator::OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return FALSE; - if (property->GetValue().BoolValue()) - property->GetValue() = (bool)FALSE; - else - property->GetValue() = (bool)TRUE; - view->DisplayProperty(property); - view->UpdatePropertyDisplayInList(property); - view->OnPropertyChanged(property); - return TRUE; -} - -/// -/// String validator -/// -IMPLEMENT_DYNAMIC_CLASS(wxStringListValidator, wxPropertyListValidator) - -wxStringListValidator::wxStringListValidator(wxStringList *list, long flags): - wxPropertyListValidator(flags) -{ - strings = list; - // If no constraint, we just allow the string to be edited. - if (!strings && ((validatorFlags & wxPROP_ALLOW_TEXT_EDITING) == 0)) - validatorFlags |= wxPROP_ALLOW_TEXT_EDITING; -} - -bool wxStringListValidator::OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!strings) - return TRUE; - - if (!view->GetValueText()) - return FALSE; - wxString value(view->GetValueText()->GetValue()); - - if (!strings->Member(value.GetData())) - { - wxString s("Value "); - s += value.GetData(); - s += " is not valid."; - wxMessageBox(s.GetData(), "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow); - return FALSE; - } - return TRUE; -} - -// Called when TICK is pressed or focus is lost or view wants to update -// the property list. -// Does the transferance from the property editing area to the property itself -bool wxStringListValidator::OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return FALSE; - wxString value(view->GetValueText()->GetValue()); - property->GetValue() = value ; - return TRUE; -} - -// Called when TICK is pressed or focus is lost or view wants to update -// the property list. -// Does the transferance from the property editing area to the property itself -bool wxStringListValidator::OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return FALSE; - wxString str(property->GetValue().GetStringRepresentation()); - view->GetValueText()->SetValue(str.GetData()); - if (strings) - { - view->GetValueList()->SetStringSelection(str.GetData()); - } - return TRUE; -} - -bool wxStringListValidator::OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - // Unconstrained - if (!strings) - { - if (view->GetEditButton()) - view->GetEditButton()->Enable(FALSE); - if (view->GetConfirmButton()) - view->GetConfirmButton()->Enable(TRUE); - if (view->GetCancelButton()) - view->GetCancelButton()->Enable(TRUE); - if (view->GetValueText()) - view->GetValueText()->Enable(TRUE); - return TRUE; - } - - // Constrained - if (view->GetValueText()) - view->GetValueText()->Enable(FALSE); - - if (view->GetEditButton()) - view->GetEditButton()->Enable(TRUE); - - if (view->GetConfirmButton()) - view->GetConfirmButton()->Enable(FALSE); - if (view->GetCancelButton()) - view->GetCancelButton()->Enable(FALSE); - return TRUE; -} - -bool wxStringListValidator::OnPrepareDetailControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (view->GetValueList()) - { - view->ShowListBoxControl(TRUE); - view->GetValueList()->Enable(TRUE); - wxNode *node = strings->First(); - while (node) - { - char *s = (char *)node->Data(); - view->GetValueList()->Append(s); - node = node->Next(); - } - char *currentString = property->GetValue().StringValue(); - view->GetValueList()->SetStringSelection(currentString); - } - return TRUE; -} - -bool wxStringListValidator::OnClearDetailControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!strings) - { - return TRUE; - } - - if (view->GetValueList()) - { - view->GetValueList()->Clear(); - view->ShowListBoxControl(FALSE); - view->GetValueList()->Enable(FALSE); - } - return TRUE; -} - -// Called when the property is double clicked. Extra functionality can be provided, -// cycling through possible values. -bool wxStringListValidator::OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return FALSE; - if (!strings) - return FALSE; - - wxNode *node = strings->First(); - char *currentString = property->GetValue().StringValue(); - while (node) - { - char *s = (char *)node->Data(); - if (strcmp(s, currentString) == 0) - { - char *nextString = NULL; - if (node->Next()) - nextString = (char *)node->Next()->Data(); - else - nextString = (char *)strings->First()->Data(); - property->GetValue() = wxString(nextString); - view->DisplayProperty(property); - view->UpdatePropertyDisplayInList(property); - view->OnPropertyChanged(property); - return TRUE; - } - else node = node->Next(); - } - return TRUE; -} - -/// -/// Filename validator -/// -IMPLEMENT_DYNAMIC_CLASS(wxFilenameListValidator, wxPropertyListValidator) - -wxFilenameListValidator::wxFilenameListValidator(wxString message , wxString wildcard, long flags): - wxPropertyListValidator(flags), filenameWildCard(wildcard), filenameMessage(message) -{ -} - -wxFilenameListValidator::~wxFilenameListValidator(void) -{ -} - -bool wxFilenameListValidator::OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - return TRUE; -} - -// Called when TICK is pressed or focus is lost or view wants to update -// the property list. -// Does the transferance from the property editing area to the property itself -bool wxFilenameListValidator::OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return FALSE; - wxString value(view->GetValueText()->GetValue()); - property->GetValue() = value ; - return TRUE; -} - -// Called when TICK is pressed or focus is lost or view wants to update -// the property list. -// Does the transferance from the property editing area to the property itself -bool wxFilenameListValidator::OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return FALSE; - wxString str(property->GetValue().GetStringRepresentation()); - view->GetValueText()->SetValue(str); - return TRUE; -} - -// Called when the property is double clicked. Extra functionality can be provided, -// cycling through possible values. -bool wxFilenameListValidator::OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return FALSE; - OnEdit(property, view, parentWindow); - return TRUE; -} - -bool wxFilenameListValidator::OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (view->GetConfirmButton()) - view->GetConfirmButton()->Enable(TRUE); - if (view->GetCancelButton()) - view->GetCancelButton()->Enable(TRUE); - if (view->GetEditButton()) - view->GetEditButton()->Enable(TRUE); - if (view->GetValueText()) - view->GetValueText()->Enable((GetFlags() & wxPROP_ALLOW_TEXT_EDITING) == wxPROP_ALLOW_TEXT_EDITING); - return TRUE; -} - -void wxFilenameListValidator::OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return; - - char *s = wxFileSelector( - filenameMessage.GetData(), - wxPathOnly(property->GetValue().StringValue()), - wxFileNameFromPath(property->GetValue().StringValue()), - NULL, - filenameWildCard.GetData(), - 0, - parentWindow); - if (s) - { - property->GetValue() = wxString(s); - view->DisplayProperty(property); - view->UpdatePropertyDisplayInList(property); - view->OnPropertyChanged(property); - } -} - -/// -/// Colour validator -/// -IMPLEMENT_DYNAMIC_CLASS(wxColourListValidator, wxPropertyListValidator) - -wxColourListValidator::wxColourListValidator(long flags): - wxPropertyListValidator(flags) -{ -} - -wxColourListValidator::~wxColourListValidator(void) -{ -} - -bool wxColourListValidator::OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - return TRUE; -} - -// Called when TICK is pressed or focus is lost or view wants to update -// the property list. -// Does the transferance from the property editing area to the property itself -bool wxColourListValidator::OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return FALSE; - wxString value(view->GetValueText()->GetValue()); - - property->GetValue() = value ; - return TRUE; -} - -// Called when TICK is pressed or focus is lost or view wants to update -// the property list. -// Does the transferance from the property editing area to the property itself -bool wxColourListValidator::OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return FALSE; - wxString str(property->GetValue().GetStringRepresentation()); - view->GetValueText()->SetValue(str); - return TRUE; -} - -// Called when the property is double clicked. Extra functionality can be provided, -// cycling through possible values. -bool wxColourListValidator::OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return FALSE; - OnEdit(property, view, parentWindow); - return TRUE; -} - -bool wxColourListValidator::OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (view->GetConfirmButton()) - view->GetConfirmButton()->Enable(TRUE); - if (view->GetCancelButton()) - view->GetCancelButton()->Enable(TRUE); - if (view->GetEditButton()) - view->GetEditButton()->Enable(TRUE); - if (view->GetValueText()) - view->GetValueText()->Enable((GetFlags() & wxPROP_ALLOW_TEXT_EDITING) == wxPROP_ALLOW_TEXT_EDITING); - return TRUE; -} - -void wxColourListValidator::OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return; - - char *s = property->GetValue().StringValue(); - int r = 0; - int g = 0; - int b = 0; - if (s) - { - r = wxHexToDec(s); - g = wxHexToDec(s+2); - b = wxHexToDec(s+4); - } - - wxColour col(r,g,b); - - wxColourData data; - data.SetChooseFull(TRUE); - data.SetColour(col); - - for (int i = 0; i < 16; i++) - { - wxColour colour(i*16, i*16, i*16); - data.SetCustomColour(i, colour); - } - - wxColourDialog dialog(parentWindow, &data); - if (dialog.ShowModal() != wxID_CANCEL) - { - wxColourData retData = dialog.GetColourData(); - col = retData.GetColour(); - - char buf[7]; - wxDecToHex(col.Red(), buf); - wxDecToHex(col.Green(), buf+2); - wxDecToHex(col.Blue(), buf+4); - - property->GetValue() = wxString(buf); - view->DisplayProperty(property); - view->UpdatePropertyDisplayInList(property); - view->OnPropertyChanged(property); - } -} - -/// -/// List of strings validator. For this we need more user interface than -/// we get with a property list; so create a new dialog for editing the list. -/// -IMPLEMENT_DYNAMIC_CLASS(wxListOfStringsListValidator, wxPropertyListValidator) - -wxListOfStringsListValidator::wxListOfStringsListValidator(long flags): - wxPropertyListValidator(flags) -{ -} - -bool wxListOfStringsListValidator::OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - // No constraints for an arbitrary, user-editable list of strings. - return TRUE; -} - -// Called when TICK is pressed or focus is lost or view wants to update -// the property list. -// Does the transferance from the property editing area to the property itself. -// In this case, the user cannot directly edit the string list. -bool wxListOfStringsListValidator::OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - return TRUE; -} - -bool wxListOfStringsListValidator::OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (!view->GetValueText()) - return FALSE; - wxString str(property->GetValue().GetStringRepresentation()); - view->GetValueText()->SetValue(str.GetData()); - return TRUE; -} - -bool wxListOfStringsListValidator::OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - if (view->GetEditButton()) - view->GetEditButton()->Enable(TRUE); - if (view->GetValueText()) - view->GetValueText()->Enable(FALSE); - - if (view->GetConfirmButton()) - view->GetConfirmButton()->Enable(FALSE); - if (view->GetCancelButton()) - view->GetCancelButton()->Enable(FALSE); - return TRUE; -} - -// Called when the property is double clicked. Extra functionality can be provided, -// cycling through possible values. -bool wxListOfStringsListValidator::OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - OnEdit(property, view, parentWindow); - return TRUE; -} - -void wxListOfStringsListValidator::OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) -{ - // Convert property value to a list of strings for editing - wxStringList *stringList = new wxStringList; - - wxPropertyValue *expr = property->GetValue().GetFirst(); - while (expr) - { - char *s = expr->StringValue(); - if (s) - stringList->Add(s); - expr = expr->GetNext(); - } - - wxString title("Editing "); - title += property->GetName(); - - if (EditStringList(parentWindow, stringList, title.GetData())) - { - wxPropertyValue& oldValue = property->GetValue(); - oldValue.ClearList(); - wxNode *node = stringList->First(); - while (node) - { - char *s = (char *)node->Data(); - oldValue.Append(new wxPropertyValue(s)); - - node = node->Next(); - } - - view->DisplayProperty(property); - view->UpdatePropertyDisplayInList(property); - view->OnPropertyChanged(property); - } - delete stringList; -} - -class wxPropertyStringListEditorDialog: public wxDialog -{ - public: - wxStringList *stringList; - wxListBox *listBox; - wxTextCtrl *stringText; - static bool dialogCancelled; - int currentSelection; - wxPropertyStringListEditorDialog(wxWindow *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long windowStyle = wxDEFAULT_DIALOG_STYLE, const wxString& name = "stringEditorDialogBox"): - wxDialog(parent, -1, title, pos, size, windowStyle, name) - { - stringList = NULL; - stringText = NULL; - listBox = NULL; - dialogCancelled = FALSE; - currentSelection = -1; - } - ~wxPropertyStringListEditorDialog(void) {} - bool OnClose(void); - void SaveCurrentSelection(void); - void ShowCurrentSelection(void); - - void OnOK(wxCommandEvent& event); - void OnCancel(wxCommandEvent& event); - void OnAdd(wxCommandEvent& event); - void OnDelete(wxCommandEvent& event); - void OnStrings(wxCommandEvent& event); - void OnText(wxCommandEvent& event); - -DECLARE_EVENT_TABLE() -}; - -#define wxID_PROP_SL_ADD 3000 -#define wxID_PROP_SL_DELETE 3001 -#define wxID_PROP_SL_STRINGS 3002 -#define wxID_PROP_SL_TEXT 3003 - -BEGIN_EVENT_TABLE(wxPropertyStringListEditorDialog, wxDialog) - EVT_BUTTON(wxID_OK, wxPropertyStringListEditorDialog::OnOK) - EVT_BUTTON(wxID_CANCEL, wxPropertyStringListEditorDialog::OnCancel) - EVT_BUTTON(wxID_PROP_SL_ADD, wxPropertyStringListEditorDialog::OnAdd) - EVT_BUTTON(wxID_PROP_SL_DELETE, wxPropertyStringListEditorDialog::OnDelete) - EVT_LISTBOX(wxID_PROP_SL_STRINGS, wxPropertyStringListEditorDialog::OnStrings) - EVT_TEXT(wxID_PROP_SL_TEXT, wxPropertyStringListEditorDialog::OnText) -END_EVENT_TABLE() - -class wxPropertyStringListEditorText: public wxTextCtrl -{ - public: - wxPropertyStringListEditorText(wxWindow *parent, wxWindowID id, const wxString& val, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long windowStyle = 0, const wxString& name = "text"): - wxTextCtrl(parent, id, val, pos, size, windowStyle, wxDefaultValidator, name) - { - } - void OnKillFocus(void) - { - wxPropertyStringListEditorDialog *dialog = (wxPropertyStringListEditorDialog *)GetParent(); - dialog->SaveCurrentSelection(); - } -}; - -bool wxPropertyStringListEditorDialog::dialogCancelled = FALSE; - -// Edit the string list. -bool wxListOfStringsListValidator::EditStringList(wxWindow *parent, wxStringList *stringList, const char *title) -{ - wxBeginBusyCursor(); - wxPropertyStringListEditorDialog *dialog = new wxPropertyStringListEditorDialog(parent, - title, wxPoint(10, 10), wxSize(400, 400), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL); - - dialog->stringList = stringList; - - wxButton *okButton = new wxButton(dialog, wxID_OK, "OK", wxPoint(5, 5)); - wxButton *cancelButton = new wxButton(dialog, wxID_CANCEL, "Cancel", wxPoint(40, 5)); - -// wxButton *helpButton = new wxButton(dialog, (wxFunction)StringListEditorHelpProc, "Help"); -// helpButton->SetClientData((char *)this); - - dialog->listBox = new wxListBox(dialog, wxID_PROP_SL_STRINGS, - wxPoint(5, 30), wxSize(300, 200), 0, NULL, wxLB_SINGLE); - - dialog->stringText = new wxPropertyStringListEditorText(dialog, - wxID_PROP_SL_TEXT, "", wxPoint(5, 240), - wxSize(300, -1), wxPROCESS_ENTER); - dialog->stringText->Enable(FALSE); - - wxButton *addButton = new wxButton(dialog, wxID_PROP_SL_ADD, "Add", wxPoint(5, 280)); - wxButton *deleteButton = new wxButton(dialog, wxID_PROP_SL_DELETE, "Delete", wxPoint(40, 280)); - - wxNode *node = stringList->First(); - while (node) - { - char *str = (char *)node->Data(); - // Save node as client data for each listbox item - dialog->listBox->Append(str, (char *)node); - node = node->Next(); - } - - dialog->SetClientSize(310, 305); - - dialog->Centre(wxBOTH); - wxEndBusyCursor(); - if (dialog->ShowModal() == wxID_CANCEL) - return FALSE; - else - return TRUE; -} - -/* - * String list editor callbacks - * - */ - -void wxPropertyStringListEditorDialog::OnStrings(wxCommandEvent& WXUNUSED(event)) -{ - int sel = listBox->GetSelection(); - if (sel > -1) - { - currentSelection = sel; - - ShowCurrentSelection(); - } -} - -void wxPropertyStringListEditorDialog::OnDelete(wxCommandEvent& WXUNUSED(event)) -{ - int sel = listBox->GetSelection(); - if (sel == -1) - return; - - wxNode *node = (wxNode *)listBox->wxListBox::GetClientData(sel); - if (!node) - return; - - listBox->Delete(sel); - delete[] (char *)node->Data(); - delete node; - currentSelection = -1; - stringText->SetValue(""); -} - -void wxPropertyStringListEditorDialog::OnAdd(wxCommandEvent& WXUNUSED(event)) -{ - SaveCurrentSelection(); - - char *initialText = ""; - wxNode *node = stringList->Add(initialText); - listBox->Append(initialText, (char *)node); - currentSelection = stringList->Number() - 1; - listBox->SetSelection(currentSelection); - ShowCurrentSelection(); - stringText->SetFocus(); -} - -void wxPropertyStringListEditorDialog::OnOK(wxCommandEvent& WXUNUSED(event)) -{ - SaveCurrentSelection(); - EndModal(wxID_OK); - Close(TRUE); -} - -void wxPropertyStringListEditorDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) -{ - dialogCancelled = TRUE; - EndModal(wxID_CANCEL); - Close(TRUE); -} - -void wxPropertyStringListEditorDialog::OnText(wxCommandEvent& event) -{ - if (event.GetEventType() == wxEVENT_TYPE_TEXT_ENTER_COMMAND) - { - SaveCurrentSelection(); - } -} - -bool wxPropertyStringListEditorDialog::OnClose(void) -{ - SaveCurrentSelection(); - return TRUE; -} - -void wxPropertyStringListEditorDialog::SaveCurrentSelection(void) -{ - if (currentSelection == -1) - return; - - wxNode *node = (wxNode *)listBox->wxListBox::GetClientData(currentSelection); - if (!node) - return; - - wxString txt(stringText->GetValue()); - if (node->Data()) - delete[] (char *)node->Data(); - node->SetData((wxObject *)copystring(txt)); - - listBox->SetString(currentSelection, (char *)node->Data()); -} - -void wxPropertyStringListEditorDialog::ShowCurrentSelection(void) -{ - if (currentSelection == -1) - { - stringText->SetValue(""); - return; - } - wxNode *node = (wxNode *)listBox->wxListBox::GetClientData(currentSelection); - char *txt = (char *)node->Data(); - stringText->SetValue(txt); - stringText->Enable(TRUE); -} diff --git a/utils/wxprop/src/proplist.h b/utils/wxprop/src/proplist.h deleted file mode 100644 index 14897f62a8..0000000000 --- a/utils/wxprop/src/proplist.h +++ /dev/null @@ -1,546 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: proplist.h -// Purpose: Property list classes -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - - /* - - TO DO: - - (1) Optional popup-help for each item, and an optional Help button - for dialog. - - (2) Align Ok, Cancel, Help buttons properly. - - (3) Consider retrieving the rectangle on the panel that can be - drawn into (where the value listbox is) and giving an example - of editing graphically. May be too fancy. - - (4) Deriveable types for wxPropertyValue => may need to reorganise - wxPropertyValue to use inheritance rather than present all-types-in-one - scheme. - - (5) Optional popup panel for value list, perhaps. - - (6) Floating point checking routine still crashes with Floating - point error for zany input. - - (7) Property sheet with choice (or listbox) to select alternative - sheets... multiple views per panel, only one active. For this - we really need a wxChoice that can be dynamically set: XView - may be a problem; Motif? - - (8) More example validators, e.g. colour selector. - */ - -#ifndef _PROPLIST_H_ -#define _PROPLIST_H_ - -#ifdef __GNUG__ -#pragma interface "proplist.h" -#endif - -#include "prop.h" - -#define wxPROP_BUTTON_CLOSE 1 -#define wxPROP_BUTTON_OK 2 -#define wxPROP_BUTTON_CANCEL 4 -#define wxPROP_BUTTON_CHECK_CROSS 8 -#define wxPROP_BUTTON_HELP 16 -#define wxPROP_DYNAMIC_VALUE_FIELD 32 -#define wxPROP_PULLDOWN 64 -#define wxPROP_SHOWVALUES 128 - -#ifdef __XVIEW__ -#define wxPROP_BUTTON_DEFAULT wxPROP_BUTTON_OK | wxPROP_BUTTON_CANCEL | wxPROP_BUTTON_CHECK_CROSS | wxPROP_PULLDOWN -#else -#define wxPROP_BUTTON_DEFAULT wxPROP_BUTTON_CHECK_CROSS | wxPROP_PULLDOWN | wxPROP_SHOWVALUES -#endif - -#define wxID_PROP_CROSS 3000 -#define wxID_PROP_CHECK 3001 -#define wxID_PROP_EDIT 3002 -#define wxID_PROP_TEXT 3003 -#define wxID_PROP_SELECT 3004 -#define wxID_PROP_VALUE_SELECT 3005 - -// Mediates between a physical panel and the property sheet -class wxPropertyListView: public wxPropertyView -{ - DECLARE_DYNAMIC_CLASS(wxPropertyListView) - protected: - wxListBox *propertyScrollingList; - wxListBox *valueList; // Should really be a combobox, but we don't have one. - wxTextCtrl *valueText; - wxButton *confirmButton; // A tick, as in VB - wxButton *cancelButton; // A cross, as in VB - wxButton *editButton; // Invokes the custom validator, if any - - bool detailedEditing; // E.g. using listbox for choices - - static wxBitmap *tickBitmap; - static wxBitmap *crossBitmap; - - wxPanel *propertyWindow; // Panel that the controls will appear on - wxWindow *managedWindow; // Frame or dialog - - wxButton *windowCloseButton; // Or OK - wxButton *windowCancelButton; - wxButton *windowHelpButton; - public: - static bool dialogCancelled; - - wxPropertyListView(wxPanel *propPanel = NULL, long flags = wxPROP_BUTTON_DEFAULT); - ~wxPropertyListView(void); - - // Associates and shows the view - virtual void ShowView(wxPropertySheet *propertySheet, wxPanel *panel); - - // Update this view of the viewed object, called e.g. by - // the object itself. - virtual bool OnUpdateView(void); - - wxString MakeNameValueString(wxString name, wxString value); - - // Update a single line in the list of properties - virtual bool UpdatePropertyDisplayInList(wxProperty *property); - - // Update the whole list - virtual bool UpdatePropertyList(bool clearEditArea = TRUE); - - // Find the wxListBox index corresponding to this property - virtual int FindListIndexForProperty(wxProperty *property); - - // Select and show string representation in editor the given - // property. NULL resets to show no property. - virtual bool ShowProperty(wxProperty *property, bool select = TRUE); - virtual bool EditProperty(wxProperty *property); - - // Update the display from the property - virtual bool DisplayProperty(wxProperty *property); - // Update the property from the display - virtual bool RetrieveProperty(wxProperty *property); - - // Find appropriate validator and load property into value controls - virtual bool BeginShowingProperty(wxProperty *property); - // Find appropriate validator and unload property from value controls - virtual bool EndShowingProperty(wxProperty *property); - - // Begin detailed editing (e.g. using value listbox) - virtual void BeginDetailedEditing(void); - - // End detailed editing (e.g. using value listbox) - virtual void EndDetailedEditing(void); - - // Called by the property listbox - void OnPropertySelect(wxCommandEvent& event); - - // Called by the value listbox - void OnValueListSelect(wxCommandEvent& event); - - virtual bool CreateControls(void); - virtual void ShowTextControl(bool show); - virtual void ShowListBoxControl(bool show); - virtual void EnableCheck(bool show); - virtual void EnableCross(bool show); - - void OnOk(wxCommandEvent& event); - void OnCancel(wxCommandEvent& event); - void OnHelp(wxCommandEvent& event); - void OnPropertyDoubleClick(wxCommandEvent& event); -// virtual void OnDoubleClick(void); - - void OnCheck(wxCommandEvent& event); - void OnCross(wxCommandEvent& event); - void OnEdit(wxCommandEvent& event); - void OnText(wxCommandEvent& event); - - inline virtual wxListBox *GetPropertyScrollingList() { return propertyScrollingList; } - inline virtual wxListBox *GetValueList() { return valueList; } - inline virtual wxTextCtrl *GetValueText() { return valueText; } - inline virtual wxButton *GetConfirmButton() { return confirmButton; } - inline virtual wxButton *GetCancelButton() { return cancelButton; } - inline virtual wxButton *GetEditButton() { return editButton; } - inline virtual bool GetDetailedEditing(void) { return detailedEditing; } - - inline virtual void AssociatePanel(wxPanel *win) { propertyWindow = win; } - inline virtual wxPanel *GetPanel(void) { return propertyWindow; } - - inline virtual void SetManagedWindow(wxWindow *win) { managedWindow = win; } - inline virtual wxWindow *GetManagedWindow(void) { return managedWindow; } - - inline virtual wxButton *GetWindowCloseButton() { return windowCloseButton; } - inline virtual wxButton *GetWindowCancelButton() { return windowCancelButton; } - inline virtual wxButton *GetHelpButton() { return windowHelpButton; } - - bool OnClose(void); - -DECLARE_EVENT_TABLE() -}; - -class wxPropertyTextEdit: public wxTextCtrl -{ - DECLARE_CLASS(wxPropertyTextEdit) - public: - wxPropertyListView *view; - wxPropertyTextEdit(wxPropertyListView *v, wxWindow *parent, const wxWindowID id, - const wxString& value, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "text"); - void OnSetFocus(void); - void OnKillFocus(void); -}; - -#define wxPROP_ALLOW_TEXT_EDITING 1 - -/* - * The type of validator used for property lists (Visual Basic style) - */ - -class wxPropertyListValidator: public wxPropertyValidator -{ - DECLARE_DYNAMIC_CLASS(wxPropertyListValidator) - protected: - public: - wxPropertyListValidator(long flags = wxPROP_ALLOW_TEXT_EDITING): wxPropertyValidator(flags) { } - ~wxPropertyListValidator(void) {} - - // Called when the property is selected or deselected: typically displays the value - // in the edit control (having chosen a suitable control to display: (non)editable text or listbox) - virtual bool OnSelect(bool select, wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when the property is double clicked. Extra functionality can be provided, such as - // cycling through possible values. - inline virtual bool OnDoubleClick( - wxProperty *WXUNUSED(property), wxPropertyListView *WXUNUSED(view), wxWindow *WXUNUSED(parentWindow) ) - { return TRUE; } - - // Called when the value listbox is selected. Default behaviour is to copy - // string to text control, and retrieve the value into the property. - virtual bool OnValueListSelect(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when the property value is edited using standard text control - inline virtual bool OnPrepareControls( - wxProperty *WXUNUSED(property), wxPropertyListView *WXUNUSED(view), wxWindow *WXUNUSED(parentWindow) ) - { return TRUE; } - - virtual bool OnClearControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when the property is edited in detail - inline virtual bool OnPrepareDetailControls( - wxProperty *WXUNUSED(property), wxPropertyListView *WXUNUSED(view), wxWindow *WXUNUSED(parentWindow) ) - { return TRUE; } - - // Called if focus lost, IF we're in a modeless property editing situation. - inline virtual bool OnClearDetailControls( - wxProperty *WXUNUSED(property), wxPropertyListView *WXUNUSED(view), wxWindow *WXUNUSED(parentWindow) ) - { return TRUE; } - - // Called when the edit (...) button is pressed. The default implementation - // calls view->BeginDetailedEditing; the filename validator (for example) overrides - // this function to show the file selector. - virtual void OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when TICK is pressed or focus is lost. - // Return FALSE if value didn't check out; signal to restore old value. - inline virtual bool OnCheckValue( - wxProperty *WXUNUSED(property), wxPropertyListView *WXUNUSED(view), wxWindow *WXUNUSED(parentWindow) ) - { return TRUE; } - - // Called when TICK is pressed or focus is lost or view wants to update - // the property list. - // Does the transferance from the property editing area to the property itself - virtual bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - virtual bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); -}; - -/* - * A default dialog box class to use. - */ - -class wxPropertyListDialog: public wxDialog -{ - DECLARE_CLASS(wxPropertyListDialog) - private: - wxPropertyListView *view; - public: - wxPropertyListDialog(wxPropertyListView *v, wxWindow *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "dialogBox"); - bool OnClose(void); - void OnDefaultAction(wxControl *item); - void OnCancel(wxCommandEvent& event); - - // Extend event processing to search the view's event table - virtual bool ProcessEvent(wxEvent& event); - -DECLARE_EVENT_TABLE() -}; - -/* - * A default panel class to use. - */ - -class wxPropertyListPanel: public wxPanel -{ - DECLARE_CLASS(wxPropertyListPanel) - private: - wxPropertyListView *view; - public: - wxPropertyListPanel(wxPropertyListView *v, wxWindow *parent, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = "panel"): - wxPanel(parent, -1, pos, size, style, name) - { - view = v; - } - void OnDefaultAction(wxControl *item); - - inline void SetView(wxPropertyListView* v) { view = v; } - inline wxPropertyListView* GetView() const { return view; } - - // Extend event processing to search the view's event table - virtual bool ProcessEvent(wxEvent& event); - - // Call Layout() - void OnSize(wxSizeEvent& event); - -DECLARE_EVENT_TABLE() -}; - -/* - * A default frame class to use. - */ - -class wxPropertyListFrame: public wxFrame -{ - DECLARE_CLASS(wxPropertyListFrame) - private: - wxPropertyListView *view; - wxPropertyListPanel *propertyPanel; - public: - wxPropertyListFrame(wxPropertyListView *v, wxFrame *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME, const wxString& name = "frame"): - wxFrame(parent, -1, title, pos, size, style, name) - { - view = v; - propertyPanel = NULL; - } - bool OnClose(void); - - // Must call this to create panel and associate view - virtual bool Initialize(void); - virtual wxPropertyListPanel *OnCreatePanel(wxFrame *parent, wxPropertyListView *v); - inline virtual wxPropertyListPanel *GetPropertyPanel(void) { return propertyPanel; } -}; - -/* - * Some default validators - */ - -class wxRealListValidator: public wxPropertyListValidator -{ - DECLARE_DYNAMIC_CLASS(wxRealListValidator) - protected: - float realMin; - float realMax; - public: - // 0.0, 0.0 means no range - wxRealListValidator(float min = 0.0, float max = 0.0, long flags = wxPROP_ALLOW_TEXT_EDITING):wxPropertyListValidator(flags) - { - realMin = min; realMax = max; - } - ~wxRealListValidator(void) {} - - bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when TICK is pressed or focus is lost. - // Return FALSE if value didn't check out; signal to restore old value. - bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when TICK is pressed or focus is lost or view wants to update - // the property list. - // Does the transfer from the property editing area to the property itself - bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); -}; - -class wxIntegerListValidator: public wxPropertyListValidator -{ - DECLARE_DYNAMIC_CLASS(wxIntegerListValidator) - protected: - long integerMin; - long integerMax; - public: - // 0, 0 means no range - wxIntegerListValidator(long min = 0, long max = 0, long flags = wxPROP_ALLOW_TEXT_EDITING):wxPropertyListValidator(flags) - { - integerMin = min; integerMax = max; - } - ~wxIntegerListValidator(void) {} - - bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when TICK is pressed or focus is lost. - // Return FALSE if value didn't check out; signal to restore old value. - bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when TICK is pressed or focus is lost or view wants to update - // the property list. - // Does the transfer from the property editing area to the property itself - bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); -}; - -class wxBoolListValidator: public wxPropertyListValidator -{ - DECLARE_DYNAMIC_CLASS(wxBoolListValidator) - protected: - public: - wxBoolListValidator(long flags = 0):wxPropertyListValidator(flags) - { - } - ~wxBoolListValidator(void) {} - - bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - bool OnPrepareDetailControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - bool OnClearDetailControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when TICK is pressed or focus is lost. - // Return FALSE if value didn't check out; signal to restore old value. - bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when TICK is pressed or focus is lost or view wants to update - // the property list. - // Does the transfer from the property editing area to the property itself - bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when the property is double clicked. Extra functionality can be provided, - // cycling through possible values. - virtual bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); -}; - -class wxStringListValidator: public wxPropertyListValidator -{ - DECLARE_DYNAMIC_CLASS(wxStringListValidator) - protected: - wxStringList *strings; - public: - wxStringListValidator(wxStringList *list = NULL, long flags = 0); - - ~wxStringListValidator(void) - { - if (strings) - delete strings; - } - - bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - bool OnPrepareDetailControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - bool OnClearDetailControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when TICK is pressed or focus is lost. - // Return FALSE if value didn't check out; signal to restore old value. - bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when TICK is pressed or focus is lost or view wants to update - // the property list. - // Does the transfer from the property editing area to the property itself - bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when the property is double clicked. Extra functionality can be provided, - // cycling through possible values. - bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); -}; - -class wxFilenameListValidator: public wxPropertyListValidator -{ - DECLARE_DYNAMIC_CLASS(wxFilenameListValidator) - protected: - wxString filenameWildCard; - wxString filenameMessage; - - public: - wxFilenameListValidator(wxString message = "Select a file", wxString wildcard = "*.*", long flags = 0); - - ~wxFilenameListValidator(void); - - // Called when TICK is pressed or focus is lost. - // Return FALSE if value didn't check out; signal to restore old value. - bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when TICK is pressed or focus is lost or view wants to update - // the property list. - // Does the transferance from the property editing area to the property itself - bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when the edit (...) button is pressed. - void OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); -}; - -class wxColourListValidator: public wxPropertyListValidator -{ - DECLARE_DYNAMIC_CLASS(wxColourListValidator) - protected: - public: - wxColourListValidator(long flags = 0); - - ~wxColourListValidator(void); - - bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when the edit (...) button is pressed. - void OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); -}; - -class wxListOfStringsListValidator: public wxPropertyListValidator -{ - DECLARE_DYNAMIC_CLASS(wxListOfStringsListValidator) - protected: - public: - wxListOfStringsListValidator(long flags = 0); - - ~wxListOfStringsListValidator(void) - { - } - - bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when TICK is pressed or focus is lost. - // Return FALSE if value didn't check out; signal to restore old value. - bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when TICK is pressed or focus is lost or view wants to update - // the property list. - // Does the transfer from the property editing area to the property itself - bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when the property is double clicked. - bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - bool EditStringList(wxWindow *parent, wxStringList *stringList, const char *title = "String List Editor"); - - // Called when the edit (...) button is pressed. - void OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); -}; - -#endif - diff --git a/utils/wxprop/src/test.cpp b/utils/wxprop/src/test.cpp deleted file mode 100644 index 267dfdab74..0000000000 --- a/utils/wxprop/src/test.cpp +++ /dev/null @@ -1,321 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: test.cpp -// Purpose: Property sheet test implementation -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "test.h" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "test.h" - -// A macro needed for some compilers (AIX) that need 'main' to be defined -// in the application itself. -IMPLEMENT_WXWIN_MAIN - -IMPLEMENT_APP(MyApp) - -wxPropertyValidatorRegistry myListValidatorRegistry; -wxPropertyValidatorRegistry myFormValidatorRegistry; - -MyApp::MyApp(void) -{ - m_childWindow = NULL; - m_mainFrame = NULL; -} - -bool MyApp::OnInit(void) -{ - RegisterValidators(); - - // Create the main frame window - m_mainFrame = new MyFrame(NULL, "wxPropertySheet Demo", wxPoint(0, 0), wxSize(300, 400), wxDEFAULT_FRAME); - - // Make a menubar - wxMenu *file_menu = new wxMenu; - file_menu->Append(PROPERTY_TEST_DIALOG_LIST, "Test property list &dialog..."); - file_menu->Append(PROPERTY_TEST_FRAME_LIST, "Test property list &frame..."); - file_menu->AppendSeparator(); - file_menu->Append(PROPERTY_TEST_DIALOG_FORM, "Test property form d&ialog..."); - file_menu->Append(PROPERTY_TEST_FRAME_FORM, "Test property form f&rame..."); - file_menu->AppendSeparator(); - file_menu->Append(PROPERTY_QUIT, "E&xit"); - - wxMenu *help_menu = new wxMenu; - help_menu->Append(PROPERTY_ABOUT, "&About"); - - wxMenuBar *menu_bar = new wxMenuBar; - - menu_bar->Append(file_menu, "&File"); - menu_bar->Append(help_menu, "&Help"); - - // Associate the menu bar with the frame - m_mainFrame->SetMenuBar(menu_bar); - - m_mainFrame->Centre(wxBOTH); - m_mainFrame->Show(TRUE); - - SetTopWindow(m_mainFrame); - - return TRUE; -} - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_CLOSE(MyFrame::OnCloseWindow) - EVT_MENU(PROPERTY_QUIT, MyFrame::OnQuit) - EVT_MENU(PROPERTY_ABOUT, MyFrame::OnAbout) - EVT_MENU(PROPERTY_TEST_DIALOG_LIST, MyFrame::OnDialogList) - EVT_MENU(PROPERTY_TEST_FRAME_LIST, MyFrame::OnFrameList) - EVT_MENU(PROPERTY_TEST_DIALOG_FORM, MyFrame::OnDialogForm) - EVT_MENU(PROPERTY_TEST_FRAME_FORM, MyFrame::OnFrameForm) -END_EVENT_TABLE() - -// Define my frame constructor -MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, long type): - wxFrame(frame, -1, title, pos, size, type) -{ -} - -// Define the behaviour for the frame closing -// - must delete all frames except for the main one. -void MyFrame::OnCloseWindow(wxCloseEvent& event) -{ - if (wxGetApp().m_childWindow) - { - wxGetApp().m_childWindow->Close(TRUE); - } - - Destroy(); -} - -void MyFrame::OnQuit(wxCommandEvent& event) -{ - Close(TRUE); -} - -void MyFrame::OnDialogList(wxCommandEvent& event) -{ - wxGetApp().PropertyListTest(TRUE); -} - -void MyFrame::OnFrameList(wxCommandEvent& event) -{ - wxGetApp().PropertyListTest(FALSE); -} - -void MyFrame::OnDialogForm(wxCommandEvent& event) -{ - wxGetApp().PropertyFormTest(TRUE); -} - -void MyFrame::OnFrameForm(wxCommandEvent& event) -{ - wxGetApp().PropertyFormTest(FALSE); -} - -void MyFrame::OnAbout(wxCommandEvent& event) -{ - (void)wxMessageBox("Property Classes Demo\nAuthor: Julian Smart", "About Property Classes Test"); -} - -void MyApp::RegisterValidators(void) -{ - myListValidatorRegistry.RegisterValidator((wxString)"real", new wxRealListValidator); - myListValidatorRegistry.RegisterValidator((wxString)"string", new wxStringListValidator); - myListValidatorRegistry.RegisterValidator((wxString)"integer", new wxIntegerListValidator); - myListValidatorRegistry.RegisterValidator((wxString)"bool", new wxBoolListValidator); - myListValidatorRegistry.RegisterValidator((wxString)"stringlist", new wxListOfStringsListValidator); - - myFormValidatorRegistry.RegisterValidator((wxString)"real", new wxRealFormValidator); - myFormValidatorRegistry.RegisterValidator((wxString)"string", new wxStringFormValidator); - myFormValidatorRegistry.RegisterValidator((wxString)"integer", new wxIntegerFormValidator); - myFormValidatorRegistry.RegisterValidator((wxString)"bool", new wxBoolFormValidator); -} - -void MyApp::PropertyListTest(bool useDialog) -{ - if (m_childWindow) - return; - - wxPropertySheet *sheet = new wxPropertySheet; - - sheet->AddProperty(new wxProperty("fred", 1.0, "real")); - sheet->AddProperty(new wxProperty("tough choice", (bool)TRUE, "bool")); - sheet->AddProperty(new wxProperty("ian", (long)45, "integer", new wxIntegerListValidator(-50, 50))); - sheet->AddProperty(new wxProperty("bill", 25.0, "real", new wxRealListValidator(0.0, 100.0))); - sheet->AddProperty(new wxProperty("julian", "one", "string")); - sheet->AddProperty(new wxProperty("bitmap", "none", "string", new wxFilenameListValidator("Select a bitmap file", "*.bmp"))); - wxStringList *strings = new wxStringList("one", "two", "three", NULL); - sheet->AddProperty(new wxProperty("constrained", "one", "string", new wxStringListValidator(strings))); - - wxStringList *strings2 = new wxStringList("earth", "fire", "wind", "water", NULL); - sheet->AddProperty(new wxProperty("string list", strings2, "stringlist")); - - wxPropertyListView *view = - new wxPropertyListView(NULL, - wxPROP_BUTTON_CHECK_CROSS|wxPROP_DYNAMIC_VALUE_FIELD|wxPROP_PULLDOWN|wxPROP_SHOWVALUES); - - wxDialog *propDialog = NULL; - wxPropertyListFrame *propFrame = NULL; - if (useDialog) - { - propDialog = new PropListDialog(view, NULL, "Property Sheet Test", - wxPoint(-1, -1), wxSize(400, 500), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODELESS); - m_childWindow = propDialog; - } - else - { - propFrame = new PropListFrame(view, NULL, "Property Sheet Test", wxPoint(-1, -1), wxSize(400, 500)); - m_childWindow = propFrame; - } - - view->AddRegistry(&myListValidatorRegistry); - - if (useDialog) - { - view->ShowView(sheet, propDialog); - propDialog->Centre(wxBOTH); - propDialog->Show(TRUE); - } - else - { - propFrame->Initialize(); - view->ShowView(sheet, propFrame->GetPropertyPanel()); - - propFrame->Centre(wxBOTH); - propFrame->Show(TRUE); - } -} - -void MyApp::PropertyFormTest(bool useDialog) -{ - if (m_childWindow) - return; - -#if 0 - wxPropertySheet *sheet = new wxPropertySheet; - - sheet->AddProperty(new wxProperty("fred", 25.0, "real", new wxRealFormValidator(0.0, 100.0))); - sheet->AddProperty(new wxProperty("tough choice", (bool)TRUE, "bool")); - sheet->AddProperty(new wxProperty("ian", (long)45, "integer", new wxIntegerFormValidator(-50, 50))); - sheet->AddProperty(new wxProperty("julian", "one", "string")); - wxStringList *strings = new wxStringList("one", "two", "three", NULL); - sheet->AddProperty(new wxProperty("constrained", "one", "string", new wxStringFormValidator(strings))); - - wxPropertyFormView *view = new wxPropertyFormView(NULL); - - wxDialogBox *propDialog = NULL; - wxPropertyFormFrame *propFrame = NULL; - if (useDialog) - { - propDialog = new PropFormDialog(view, NULL, "Property Form Test", wxPoint(-1, -1), wxSize(380, 250), - wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL); - m_childWindow = propDialog; - } - else - { - propFrame = new PropFormFrame(view, NULL, "Property Form Test", wxPoint(-1, -1), wxSize(280, 250)); - propFrame->Initialize(); - m_childWindow = propFrame; - } - - wxPanel *panel = propDialog ? propDialog : propFrame->GetPropertyPanel(); - panel->SetLabelPosition(wxVERTICAL); - - // Add items to the panel - - (void) new wxButton(panel, -1, "OK", -1, -1, -1, -1, 0, "ok"); - (void) new wxButton(panel, -1, "Cancel", -1, -1, 80, -1, 0, "cancel"); - (void) new wxButton(panel, -1, "Update", -1, -1, 80, -1, 0, "update"); - (void) new wxButton(panel, -1, "Revert", -1, -1, -1, -1, 0, "revert"); - panel->NewLine(); - - // The name of this text item matches the "fred" property - (void) new wxText(panel, -1, "Fred", "", -1, -1, 90, -1, 0, "fred"); - (void) new wxCheckBox(panel, -1, "Yes or no", -1, -1, -1, -1, 0, "tough choice"); - (void) new wxSlider(panel, -1, "Scale", 0, -50, 50, 150, -1, -1, wxHORIZONTAL, "ian"); - panel->NewLine(); - (void) new wxListBox(panel, -1, "Constrained", wxSINGLE, -1, -1, 100, 90, 0, NULL, 0, "constrained"); - - view->AddRegistry(&myFormValidatorRegistry); - - if (useDialog) - { - view->ShowView(sheet, propDialog); - view->AssociateNames(); - view->TransferToDialog(); - propDialog->Centre(wxBOTH); - propDialog->Show(TRUE); - } - else - { - view->ShowView(sheet, propFrame->GetPropertyPanel()); - view->AssociateNames(); - view->TransferToDialog(); - propFrame->Centre(wxBOTH); - propFrame->Show(TRUE); - } -#endif -} - -BEGIN_EVENT_TABLE(PropListFrame, wxPropertyListFrame) - EVT_CLOSE(PropListFrame::OnCloseWindow) -END_EVENT_TABLE() - -void PropListFrame::OnCloseWindow(wxCloseEvent& event) -{ - wxGetApp().m_childWindow = NULL; - - wxPropertyListFrame::OnCloseWindow(event); -} - -BEGIN_EVENT_TABLE(PropListDialog, wxPropertyListDialog) - EVT_CLOSE(PropListDialog::OnCloseWindow) -END_EVENT_TABLE() - -void PropListDialog::OnCloseWindow(wxCloseEvent& event) -{ - wxGetApp().m_childWindow = NULL; - - wxPropertyListDialog::OnCloseWindow(event); -} - -BEGIN_EVENT_TABLE(PropFormFrame, wxPropertyFormFrame) - EVT_CLOSE(PropFormFrame::OnCloseWindow) -END_EVENT_TABLE() - -void PropFormFrame::OnCloseWindow(wxCloseEvent& event) -{ - wxGetApp().m_childWindow = NULL; - - wxPropertyFormFrame::OnCloseWindow(event); -} - -BEGIN_EVENT_TABLE(PropFormDialog, wxPropertyFormDialog) - EVT_CLOSE(PropFormDialog::OnCloseWindow) -END_EVENT_TABLE() - -void PropFormDialog::OnCloseWindow(wxCloseEvent& event) -{ - wxGetApp().m_childWindow = NULL; - - wxPropertyFormDialog::OnCloseWindow(event); -} - diff --git a/utils/wxprop/src/test.def b/utils/wxprop/src/test.def deleted file mode 100644 index d94e329083..0000000000 --- a/utils/wxprop/src/test.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME TEST -DESCRIPTION 'wxProperty test' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 8192 diff --git a/utils/wxprop/src/test.h b/utils/wxprop/src/test.h deleted file mode 100644 index 3e8bd88df0..0000000000 --- a/utils/wxprop/src/test.h +++ /dev/null @@ -1,127 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: test.h -// Purpose: Property sheet sample -// Author: Julian Smart -// Modified by: -// Created: 04/01/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows license -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma interface "test.h" -#endif - -#ifndef _PROPTEST_H_ -#define _PROPTEST_H_ - -#include "proplist.h" -#include "propform.h" - -class MyChild; - -// Define a new application -class MyFrame; -class MyApp: public wxApp -{ -public: - MyApp(void); - bool OnInit(void); - - void RegisterValidators(void); - void PropertyListTest(bool useDialog); - void PropertyFormTest(bool useDialog); - - MyFrame* m_mainFrame; - wxWindow* m_childWindow; -}; - -DECLARE_APP(MyApp) - -// Define a new frame -class MyFrame: public wxFrame -{ - public: - MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, long type); - - void OnCloseWindow(wxCloseEvent& event); - void OnQuit(wxCommandEvent& event); - void OnDialogList(wxCommandEvent& event); - void OnFrameList(wxCommandEvent& event); - void OnDialogForm(wxCommandEvent& event); - void OnFrameForm(wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); - -DECLARE_EVENT_TABLE() -}; - -class PropListFrame: public wxPropertyListFrame -{ -public: - PropListFrame(wxPropertyListView *v, wxFrame *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME, const wxString& name = "frame"): - wxPropertyListFrame(v, parent, title, pos, size, style, name) - { - } - - void OnCloseWindow(wxCloseEvent& event); - - DECLARE_EVENT_TABLE() -}; - -class PropListDialog: public wxPropertyListDialog -{ -public: - PropListDialog(wxPropertyListView *v, wxWindow *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "dialogBox"): - wxPropertyListDialog(v, parent, title, pos, size, style, name) - { - } - - void OnCloseWindow(wxCloseEvent& event); - - DECLARE_EVENT_TABLE() -}; - -class PropFormFrame: public wxPropertyFormFrame -{ -public: - PropFormFrame(wxPropertyFormView *v, wxFrame *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME, const wxString& name = "frame"): - wxPropertyFormFrame(v, parent, title, pos, size, style, name) - { - } - - void OnCloseWindow(wxCloseEvent& event); - - DECLARE_EVENT_TABLE() -}; - -class PropFormDialog: public wxPropertyFormDialog -{ -public: - PropFormDialog(wxPropertyFormView *v, wxWindow *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "dialogBox"): - wxPropertyFormDialog(v, parent, title, pos, size, style, name) - { - } - - void OnCloseWindow(wxCloseEvent& event); - - DECLARE_EVENT_TABLE() -}; - -#define PROPERTY_QUIT 1 -#define PROPERTY_ABOUT 2 -#define PROPERTY_TEST_DIALOG_LIST 3 -#define PROPERTY_TEST_FRAME_LIST 4 -#define PROPERTY_TEST_DIALOG_FORM 5 -#define PROPERTY_TEST_FRAME_FORM 6 - -#endif - diff --git a/utils/wxprop/src/test.rc b/utils/wxprop/src/test.rc deleted file mode 100644 index 8dd6951bae..0000000000 --- a/utils/wxprop/src/test.rc +++ /dev/null @@ -1,5 +0,0 @@ -tick_bmp BITMAP "tick.bmp" -cross_bmp BITMAP "cross.bmp" - -#include "wx/msw/wx.rc" - diff --git a/utils/wxprop/src/tick.bmp b/utils/wxprop/src/tick.bmp deleted file mode 100644 index 3673eda5de..0000000000 Binary files a/utils/wxprop/src/tick.bmp and /dev/null differ diff --git a/utils/wxtree/docs/back.gif b/utils/wxtree/docs/back.gif deleted file mode 100644 index 8a61076d3b..0000000000 Binary files a/utils/wxtree/docs/back.gif and /dev/null differ diff --git a/utils/wxtree/docs/books.gif b/utils/wxtree/docs/books.gif deleted file mode 100644 index 26ff394df6..0000000000 Binary files a/utils/wxtree/docs/books.gif and /dev/null differ diff --git a/utils/wxtree/docs/classes.tex b/utils/wxtree/docs/classes.tex deleted file mode 100644 index 98b9e89ee2..0000000000 --- a/utils/wxtree/docs/classes.tex +++ /dev/null @@ -1,304 +0,0 @@ -\chapter{wxTreeLayout Class Reference} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage} - -\section{\class{wxTreeLayout}}\label{wxtreelayout} - -This abstract class is used for drawing a tree. You must derive a new -class from this, and define member functions to access the data that -wxTreeLayout needs. - -Nodes are identified by long integer identifiers. The derived class -communicates the actual tree structure to wxTreeLayout by defining \helprefn{wxTreeLayout::GetChildren}{getchildren}\rtfsp -and \helprefn{wxTreeLayout::GetNodeParent}{getnodeparent} functions. - -The application should call \helprefn{DoLayout}{dolayout} to do the tree -layout. Depending on how the derived class has been defined, either -\rtfsp\helprefn{wxTreeLayout::Draw}{draw} must be called (for example by the OnPaint member -of a wxScrolledWindow) or the application-defined drawing code should be called -as normal. - -For example, if you have an image drawing system already defined, you -may want wxTreeLayout to position existing node images in that system. So you -just need a way for wxTreeLayout to set the node image positions according to -the layout algorithm, and the rest will be done by your own image drawing -system. - -\wxheading{Derived from} - -wxObject - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxTreeLayout::wxTreeLayout} - -\func{}{wxTreeLayout}{\void} - -Constructor. - -\membersection{wxTreeLayout::ActivateNode}\label{activatenode} - -\func{void}{ActivateNode}{\param{long}{ id}, \param{bool }{active}} - -Define this so wxTreeLayout can turn nodes on and off for drawing purposes -(not all nodes may be connected in the tree). See also \helprefn{NodeActive}{nodeactive}. - -\membersection{wxTreeLayout::CalcLayout} - -\func{void}{CalcLayout}{\param{long}{ id}, \param{int}{ level}} - -Private function for laying out a branch. - -\membersection{wxTreeLayout::DoLayout}\label{dolayout} - -\func{void}{DoLayout}{\param{wxDC\&}{ dc}, \param{long}{ topNode = -1}} - -Calculates the layout for the tree, optionally specifying the top node. - -\membersection{wxTreeLayout::Draw}\label{draw} - -\func{void}{Draw}{\param{wxDC\&}{ dc}} - -Call this to let wxTreeLayout draw the tree itself, once the layout has been -calculated with \helprefn{DoLayout}{dolayout}. - -\membersection{wxTreeLayout::DrawBranch} - -\func{void}{DrawBranch}{\param{long}{ from}, \param{long}{ to}, \param{wxDC\&}{ dc}} - -Defined by wxTreeLayout to draw an arc between two nodes. - -\membersection{wxTreeLayout::DrawBranches} - -\func{void}{DrawBranches}{\param{wxDC\&}{ dc}} - -Defined by wxTreeLayout to draw the arcs between nodes. - -\membersection{wxTreeLayout::DrawNode} - -\func{void}{DrawNode}{\param{long}{ id}, \param{wxDC\&}{ dc}} - -Defined by wxTreeLayout to draw a node. - -\membersection{wxTreeLayout::DrawNodes} - -\func{void}{DrawNodes}{\param{wxDC\&}{ dc}} - -Defined by wxTreeLayout to draw the nodes. - -\membersection{wxTreeLayout::GetChildren}\label{getchildren} - -\func{void}{GetChildren}{\param{long}{ id}, \param{wxList \&}{list}} - -Must be defined to return the children of node {\it id} in the given list -of integers. - -\membersection{wxTreeLayout::GetNextNode}\label{getnextnode} - -\func{long}{GetNextNode}{\param{long}{ id}} - -Must be defined to return the next node after {\it id}, so that wxTreeLayout can -iterate through all relevant nodes. The ordering is not important. -The function should return -1 if there are no more nodes. - -\membersection{wxTreeLayout::GetNodeName} - -\constfunc{wxString}{GetNodeName}{\param{long}{ id}} - -May optionally be defined to get a node's name (for example if leaving -the drawing to wxTreeLayout). - -\membersection{wxTreeLayout::GetNodeSize} - -\constfunc{void}{GetNodeSize}{\param{long}{ id}, \param{long*}{ x}, \param{long*}{ y}} - -Can be defined to indicate a node's size, or left to wxTreeLayout to use the -name as an indication of size. - -\membersection{wxTreeLayout::GetNodeParent}\label{getnodeparent} - -\constfunc{long}{GetNodeParent}{\param{long}{ id}} - -Must be defined to return the parent node of {\it id}. -The function should return -1 if there is no parent. - -\membersection{wxTreeLayout::GetNodeX} - -\constfunc{long}{GetNodeX}{\param{long}{ id}} - -Must be defined to return the current X position of the node. Note that -coordinates are assumed to be at the top-left of the node so some conversion -may be necessary for your application. - -\membersection{wxTreeLayout::GetNodeY} - -\constfunc{long}{GetNodeY}{\param{long}{ id}} - -Must be defined to return the current Y position of the node. Note that -coordinates are assumed to be at the top-left of the node so some conversion -may be necessary for your application. - -\membersection{wxTreeLayout::GetLeftMargin} - -\constfunc{long}{GetLeftMargin}{\void} - -Gets the left margin set with \helprefn{SetMargins}{setmargins}. - -\membersection{wxTreeLayout::GetOrientation} - -\constfunc{bool}{GetOrientation}{\void} - -Gets the orientation: TRUE means top-to-bottom, FALSE means left-to-right (the default). - -\membersection{wxTreeLayout::GetTopMargin} - -\constfunc{long}{GetTopMargin}{\void} - -Gets the top margin set with \helprefn{SetMargins}{setmargins}. - -\membersection{wxTreeLayout::GetTopNode} - -\constfunc{long}{GetTopNode}{\void} - -wxTreeLayout calls this to get the top of the tree. Don't redefine this; call -\rtfsp\helprefn{SetTopNode}{settopnode} instead before calling \helprefn{DoLayout}{dolayout}. - -\membersection{wxTreeLayout::GetXSpacing} - -\constfunc{long}{GetXSpacing}{\void} - -Gets the horizontal spacing between nodes. - -\membersection{wxTreeLayout::GetYSpacing} - -\constfunc{long}{GetYSpacing}{\void} - -Gets the vertical spacing between nodes. - -\membersection{wxTreeLayout::Initialize} - -\func{void}{Initialize}{\void} - -Initializes wxTreeLayout. Call from application or overridden {\bf Initialize} -or constructor. - -\membersection{wxTreeLayout::NodeActive}\label{nodeactive} - -\func{bool}{NodeActive}{\param{long}{ id}} - -Define this so wxTreeLayout can know which nodes are to be drawn (not all -nodes may be connected in the tree). See also \helprefn{ActivateNode}{activatenode}. - -\membersection{wxTreeLayout::SetNodeName} - -\func{void}{SetNodeName}{\param{long}{ id}, \param{const wxString\& }{ name}} - -May optionally be defined to set a node's name. - -\membersection{wxTreeLayout::SetNodeX} - -\func{void}{SetNodeX}{\param{long}{ id}, \param{long}{ x}} - -Must be defined to set the current X position of the node. Note that -coordinates are assumed to be at the top-left of the node so some conversion -may be necessary for your application. - -\membersection{wxTreeLayout::SetNodeY} - -\func{void}{SetNodeY}{\param{long}{ id}, \param{long}{ y}} - -Must be defined to set the current Y position of the node. Note that -coordinates are assumed to be at the top-left of the node so some conversion -may be necessary for your application. - -\membersection{wxTreeLayout::SetOrientation} - -\func{void}{SetOrientation}{\param{bool}{ orientation}} - -Sets the tree orientation: TRUE means top-to-bottom, FALSE means left-to-right (the default). - -\membersection{wxTreeLayout::SetTopNode}\label{settopnode} - -\func{void}{SetTopNode}{\param{long}{ id}} - -Call this to identify the top of the tree to wxTreeLayout. - -\membersection{wxTreeLayout::SetSpacing} - -\func{void}{SetSpacing}{\param{long}{ x}, \param{long}{ y}} - -Sets the horizontal and vertical spacing between nodes in the tree. - -\membersection{wxTreeLayout::SetMargins}\label{setmargins} - -\func{void}{SetMargins}{\param{long}{ x}, \param{long}{ y}} - -Sets the left and top margins of the whole tree. - -\section{\class{wxStoredTree}}\label{wxstoredtree} - -wxStoredTree provides storage for node labels, position and client data. It also provides hit-testing -(which node a mouse event occurred on). It is usually a more convenient class to use than wxTreeLayout. - -\wxheading{Derived from} - -\helpref{wxTreeLayout}{wxtreelayout} - -\latexignore{\rtfignore{\wxheading{Members}}} - -\membersection{wxStoredTree::wxStoredTree} - -\func{}{wxStoredTree}{\param{int }{noNodes = 200}} - -Constructor. Specify the maximum number of nodes to be allocated. - -\membersection{wxStoredTree::AddChild}\label{wxstoredtreeaddchild} - -\func{long}{AddChild}{\param{const wxString\&}{ name}, \param{const wxString\&}{ parent = ""}} - -Adds a child with a given parent, returning the node id. - -\membersection{wxStoredTree::GetClientData}\label{wxstoredtreegetclientdata} - -\constfunc{long}{GetClientData}{\param{long}{ id}} - -Gets the client data for the given node. - -\membersection{wxStoredTree::GetNode}\label{wxstoredtreegetnode} - -\constfunc{wxStoredNode*}{GetNode}{\param{long}{ id}} - -Returns the wxStoredNode object for the given node id. - -\membersection{wxStoredTree::GetNodeCount}\label{wxstoredtreegetnodecount} - -\constfunc{int}{GetNodeCount}{\void} - -Returns the current number of nodes. - -\membersection{wxStoredTree::GetNumNodes}\label{wxstoredtreegetnumnodes} - -\constfunc{int}{GetNumNodes}{\void} - -Returns the maximum number of nodes. - -\membersection{wxStoredTree::HitTest}\label{wxstoredtreehittest} - -\func{wxString}{HitTest}{\param{wxMouseEvent\&}{ event}, \param{wxDC\& }{dc}} - -Returns a string with the node name corresponding to the position of the mouse event, or the empty string if no node -was detected. - -\membersection{wxStoredTree::NameToId}\label{wxstoredtreenametoid} - -\func{long}{NameToId}{\param{const wxString\&}{ name}} - -Returns the id for the given node name, or -1 if there was no such node. - -\membersection{wxStoredTree::SetClientData}\label{wxstoredtreesetclientdata} - -\func{void}{SetClientData}{\param{long}{ id}, \param{long}{ clientData}} - -Sets client data for the given node. - - diff --git a/utils/wxtree/docs/contents.gif b/utils/wxtree/docs/contents.gif deleted file mode 100644 index 3dddfa3dd5..0000000000 Binary files a/utils/wxtree/docs/contents.gif and /dev/null differ diff --git a/utils/wxtree/docs/forward.gif b/utils/wxtree/docs/forward.gif deleted file mode 100644 index 9c81e8c92f..0000000000 Binary files a/utils/wxtree/docs/forward.gif and /dev/null differ diff --git a/utils/wxtree/docs/tex2rtf.ini b/utils/wxtree/docs/tex2rtf.ini deleted file mode 100644 index 8b55040f1f..0000000000 --- a/utils/wxtree/docs/tex2rtf.ini +++ /dev/null @@ -1,28 +0,0 @@ -;;; Tex2RTF initialisation file -runTwice = yes -titleFontSize = 12 -authorFontSize = 10 -authorFontSize = 10 -chapterFontSize = 12 -sectionFontSize = 12 -subsectionFontSize = 12 -contentsDepth = 2 -headerRule = yes -footerRule = yes -useHeadingStyles = yes -listItemIndent=40 -generateHPJ = no -htmlBrowseButtons = bitmap -winHelpContents = yes -winHelpVersion = 3 ; 3 for Windows 3.x, 4 for Windows 95 -winHelpTitle = "wxTreeLayout Manual" -truncateFilenames = yes -combineSubSections = yes -\overview [2] {\rtfonly{See also }\settransparency{on}\sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}\settransparency{off}} -\htmlonly{\image{}{books.gif}}\helpref{#1}{#2} -\sethotspotcolour{on}\sethotspotunderline{on}} -\docparam [2]{\parskip{0}{\it #1}\htmlignore{\par}\parskip{10}\indented{1cm}{#2}} -\wxheading [1]{{\bf \htmlignore{\fcol{blue}{#1}}\htmlonly{\fcol{red}{#1}}}} -\const [0] {{\bf const}} -\constfunc [3] {{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}} -\windowstyle [1] {{\bf #1}\index{#1}} diff --git a/utils/wxtree/docs/tree.bib b/utils/wxtree/docs/tree.bib deleted file mode 100644 index 9793c41c47..0000000000 --- a/utils/wxtree/docs/tree.bib +++ /dev/null @@ -1,8 +0,0 @@ -@techreport{robins87, -author = {Robins, Gabriel}, -title = {The {ISI} grapher: a portable tool for displaying graphs pictorially (ISI/RS-87-196)}, -institution = {University of South California}, -year = {1987}, -month = {September} -} - diff --git a/utils/wxtree/docs/treetst.bmp b/utils/wxtree/docs/treetst.bmp deleted file mode 100644 index fd6103035f..0000000000 Binary files a/utils/wxtree/docs/treetst.bmp and /dev/null differ diff --git a/utils/wxtree/docs/treetst.gif b/utils/wxtree/docs/treetst.gif deleted file mode 100644 index e9f7841957..0000000000 Binary files a/utils/wxtree/docs/treetst.gif and /dev/null differ diff --git a/utils/wxtree/docs/up.gif b/utils/wxtree/docs/up.gif deleted file mode 100644 index 316d0d2a14..0000000000 Binary files a/utils/wxtree/docs/up.gif and /dev/null differ diff --git a/utils/wxtree/docs/wxtree.tex b/utils/wxtree/docs/wxtree.tex deleted file mode 100644 index bf14b0dc75..0000000000 --- a/utils/wxtree/docs/wxtree.tex +++ /dev/null @@ -1,73 +0,0 @@ -\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}% -\newcommand{\indexit}[1]{#1\index{#1}}% -\newcommand{\pipe}[0]{$\|$\ }% -\definecolour{black}{0}{0}{0}% -\definecolour{cyan}{0}{255}{255}% -\definecolour{green}{0}{255}{0}% -\definecolour{magenta}{255}{0}{255}% -\definecolour{red}{255}{0}{0}% -\definecolour{blue}{0}{0}{200}% -\definecolour{yellow}{255}{255}{0}% -\definecolour{white}{255}{255}{255}% -\input psbox.tex -\parskip=10pt% -\title{Manual for wxTreeLayout 2.0: a tree layout library for wxWindows} -\author{Julian Smart\\Anthemion Software} -\date{July 1998}% -\makeindex% -\begin{document}% -\maketitle - -\pagestyle{fancyplain} -\bibliographystyle{plain} -\pagenumbering{roman} -\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}} -\setfooter{\thepage}{}{}{}{}{\thepage} -\tableofcontents% - -\chapter{Introduction} -\pagenumbering{arabic}% -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage} - -This manual describes a tree-drawing class library for wxWindows. It -provides layout of simple trees with one root node, drawn left-to-right, -with user-defined spacing between nodes. - -wxTreeLayout is an abstract class that must be subclassed. The programmer -defines various member functions which will access whatever data structures -are appropriate for the application, and wxTreeLayout uses these when laying -out the tree. - -wxStoredTree is a class derived from wxTreeLayout that may be used directly to -draw trees on a canvas. It supplies storage for the nodes, and draws -to a device context. - -\helponly{Below is the example tree generated by the program test.cc. - -\begin{figure} -$$\image{11cm;0cm}{treetst.ps}$$ -\caption{Example tree}\label{exampletree} -\end{figure} -} - -\chapter{Implementation} -\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% -\setfooter{\thepage}{}{}{}{}{\thepage} - -The algorithm is due to Gabriel Robins \cite{robins87}, a linear-time -algorithm originally implemented in LISP for AI applications. - -The original algorithm has been modified so that both X and Y planes -are calculated simultaneously, increasing efficiency slightly. The basic -code is only a page or so long. - -\input classes.tex -% -\bibliography{tree} - -\addcontentsline{toc}{chapter}{Index} -\setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}% -\setfooter{\thepage}{}{}{}{}{\thepage} -\printindex -\end{document} diff --git a/utils/wxtree/lib/dummy b/utils/wxtree/lib/dummy deleted file mode 100644 index bfdf726d49..0000000000 --- a/utils/wxtree/lib/dummy +++ /dev/null @@ -1 +0,0 @@ -I'm just here to force the creation of a LIB directory. diff --git a/utils/wxtree/src/makefile.b32 b/utils/wxtree/src/makefile.b32 deleted file mode 100644 index 764b5fd123..0000000000 --- a/utils/wxtree/src/makefile.b32 +++ /dev/null @@ -1,71 +0,0 @@ -# -# File: makefile.b32 -# Author: Patrick Halke -# Created: 1995 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds 32bit wxtree library for 32-bit BC++ - -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makeb32.env - -WXINC = $(WXDIR)\include -TARGET=test -TESTOBJECTS=test.obj -LIBTARGET= $(WXLIBDIR)\wxprop.lib -LIBS=$(WXLIB)\wx32.lib $(LIBTARGET) cw32 import32 - -!ifndef DEBUG -DEBUG=0 -!endif - -!if "$(FINAL)" == "0" -LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -DDEBUG=$(DEBUG) -!else -LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib -OPT = -O2 -DEBUG_FLAGS = -DDEBUG=$(DEBUG) -!endif - -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -.$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } - -.c.obj: - bcc32 $(CPPFLAGS) -P- -c {$< } - -OBJECTS = wxtree.obj - -all: $(LIBTARGET) - -$(LIBTARGET): $(OBJECTS) - erase $(LIBTARGET) - tlib $(LIBTARGET) /P32 @&&! -+$(OBJECTS:.obj =.obj +) -! - -wxtree.obj: wxtree.$(SRCSUFF) wxtree.h - -$(TARGET).exe: $(TESTOBJECTS) $(LIBTARGET) $(TARGET).def $(TARGET).res - tlink32 $(LINKFLAGS) @&&! -c0w32.obj $(TESTOBJECTS) -$(TARGET) -nul -$(LIBS) $(LIBTARGET) -$(TARGET).def -! - brc32 -K $(TARGET).res - -test.obj: test.$(SRCSUFF) test.h - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) - -clean: - -erase *.obj $(LIBTARGET) *.exe *.res *.map *.rws diff --git a/utils/wxtree/src/makefile.bcc b/utils/wxtree/src/makefile.bcc deleted file mode 100644 index df91939532..0000000000 --- a/utils/wxtree/src/makefile.bcc +++ /dev/null @@ -1,96 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds tree library and example (DOS). - -!if "$(BCCDIR)" == "" -!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 -!endif - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -# Change WXDIR to wherever wxWindows is found -WXDIR = $(WXWIN) -!include $(WXDIR)\src\makebcc.env - -WXLIB = $(WXDIR)\lib\wx.lib -WXINC = $(WXDIR)\include -CFG=$(WXWIN)\src\wxwin.cfg - -TREEDIR = $(WXDIR)\utils\wxtree -TREELIB = $(TREEDIR)\lib\wxtree.lib - -WXHELPDIR = $(WXDIR)\utils\wxhelp -TEX2RTFDIR = $(WXDIR)\utils\tex2rtf -DOCDIR = $(WXHELPDIR)\docs - -# Default is to output RTF for WinHelp -!ifndef WINHELP -WINHELP=-winhelp -!endif - -INC=/I$(WXDIR)\include\base /I$(WXDIR)\include\msw - -LIBS=$(WXLIB) $(TREELIB) mathwl cwl import mathwl - -!ifndef FINAL -FINAL=0 -!endif - -!if "$(FINAL)" == "0" -LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -Od -DEBUG_FLAGS= -v -!else -LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib -OPT = -O2 -DEBUG_FLAGS= -!endif -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) -CFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -HEADERS = wxtree.h -SOURCES = wxtree.$(SRCSUFF) -OBJECTS = wxtree.obj - -all: $(TREELIB) - -.$(SRCSUFF).obj: - bcc $(CPPFLAGS) $(INC) -c {$< } - -$(TREELIB): $(OBJECTS) - erase $(TREELIB) - tlib /P128 @&&! -$(TREELIB) & -+$(OBJECTS:.obj =.obj +) -! - -test.obj: test.$(SRCSUFF) - -test.res : test.rc $(WXDIR)\include\msw\wx.rc - rc /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa -r test - -test.exe: test.obj test.def test.res $(TREELIB) - tlink $(LINKFLAGS) @&&! -c0wl.obj test.obj -test -nul -$(LIBS) -test.def -! - rc -K test.res - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase ..\lib\*.lib - diff --git a/utils/wxtree/src/makefile.dos b/utils/wxtree/src/makefile.dos deleted file mode 100644 index c78d0a7cfb..0000000000 --- a/utils/wxtree/src/makefile.dos +++ /dev/null @@ -1,118 +0,0 @@ -# -# File: makefile.dos -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds tree library and example (DOS). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makemsc.env - -TREEDIR = $(WXDIR)\utils\wxtree -TREELIB = $(TREEDIR)\lib\wxtree.lib -DOCDIR = $(TREEDIR)\docs -THISDIR = $(TREEDIR)\src -EXTRALIBS = $(TREELIB) -INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw -DUMMY=$(WXDIR)\src\msw\dummy.obj - -# Default is to output RTF for WinHelp -!ifndef RTFSTYLE -RTFSTYLE=-winhelp -!endif - -HEADERS = wxtree.h -SOURCES = wxtree.$(SRCSUFF) -OBJECTS = wxtree.obj - -all: $(TREELIB) - -test: test.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(TREEDIR)\src - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(TREEDIR)\src - -$(TREELIB): $(OBJECTS) - -erase $(TREELIB) - lib /PAGESIZE:128 @<< -$(TREELIB) -y -$(OBJECTS) -nul -; -<< - -test.exe: $(DUMMY) $(WXLIB) $(TREELIB) test.obj test.def test.res - link $(LINKFLAGS) @<< -$(DUMMY) test.obj, -test, -NUL, -$(LIBS), -test.def -; -<< - rc -31 -K test.res - -wxtree.obj: wxtree.h wxtree.$(SRCSUFF) $(DUMMY) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -test.obj: test.h wxtree.h test.$(SRCSUFF) $(DUMMY) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -test.res : test.rc $(WXDIR)\include\msw\wx.rc - rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw test - -# Making documents -docs: hlp xlp -hlp: $(DOCDIR)/wxtree.hlp -xlp: $(DOCDIR)/wxtree.xlp -rtf: $(DOCDIR)/wxtree.rtf - -$(DOCDIR)/wxtree.hlp: $(DOCDIR)/wxtree.rtf $(DOCDIR)/wxtree.hpj - cd $(DOCDIR) - -erase wxtree.ph - hc wxtree - cd $(THISDIR) - -$(DOCDIR)/wxtree.rtf: $(DOCDIR)/manual.tex $(DOCDIR)/classes.tex - cd $(DOCDIR) - -wx /W tex2rtf $(DOCDIR)\manual.tex $(DOCDIR)\wxtree.rtf -twice $(RTFSTYLE) - cd $(THISDIR) - -$(DOCDIR)/wxtree.xlp: $(DOCDIR)/manual.tex $(DOCDIR)/classes.tex - cd $(DOCDIR) - -wx /W tex2rtf $(DOCDIR)\manual.tex $(DOCDIR)\wxtree.xlp -twice -xlp - cd $(THISDIR) - -cleanrtf: - cd $(DOCDIR) - -erase *.rtf - cd $(THISDIR) - -clean: - -erase *.obj - -erase *.sbr - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb - -erase $(TREELIB) diff --git a/utils/wxtree/src/makefile.g95 b/utils/wxtree/src/makefile.g95 deleted file mode 100644 index a7b7f866c1..0000000000 --- a/utils/wxtree/src/makefile.g95 +++ /dev/null @@ -1,48 +0,0 @@ -# -# File: makefile.g95 -# Author: Julian Smart -# Created: 1996 -# -# "%W% %G%" -# -# Makefile : Builds wxTree library and example under GNU-WIN32 -# -WXDIR = ../../.. -include $(WXDIR)/src/makeg95.env - -PROPDIR = $(WXDIR)/utils/wxtree -TREELIB = $(PROPDIR)/lib/$(LIBPREFIX)wxtree.$(LIBSUFF) -THISDIR = $(PROPDIR)/src - -OBJECTS = $(OBJDIR)/wxtree.$(OBJSUFF) -TESTOBJECTS = $(OBJDIR)/test.$(OBJSUFF) $(OBJDIR)/test_resources.$(OBJSUFF) - -LDFLAGS = -Wl,--subsystem,windows -mwindows -L$(WXDIR)/lib -L../lib -LDLIBS=-lwxtree $(LIBS) - -all: $(OBJDIR) $(TREELIB) - -test: $(OBJDIR) test.exe - -$(OBJDIR): - mkdir $(OBJDIR) - -$(TREELIB): $(OBJECTS) - rm -f $@ - ar $(AROPTIONS) $@ $(OBJECTS) - $(RANLIB) $@ - -$(OBJDIR)/test.$(OBJSUFF): test.h test.$(SRCSUFF) $(TREELIB) - $(CC) -c $(CPPFLAGS) -o $@ test.$(SRCSUFF) - -test.exe: $(TESTOBJECTS) - $(CC) $(LDFLAGS) -o test$(GUISUFFIX)$(EXESUFF) $(TESTOBJECTS) $(LDLIBS) - -$(OBJDIR)/wxtree.$(OBJSUFF): wxtree.h wxtree.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ wxtree.$(SRCSUFF) - -$(OBJDIR)/test_resources.o: test.rc - $(RESCOMP) -i test.rc -o $(OBJDIR)/test_resources.o $(RESFLAGS) - -clean: - rm -f *.$(OBJSUFF) $(TREELIB) objects/test.o *.exe *.res *.map *.rsc diff --git a/utils/wxtree/src/makefile.nt b/utils/wxtree/src/makefile.nt deleted file mode 100644 index 5e815db012..0000000000 --- a/utils/wxtree/src/makefile.nt +++ /dev/null @@ -1,133 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds wxTree class library (MS VC++). -# Use FINAL=1 argument to nmake to build final version with no debugging -# info - -# Set WXDIR for your system -WXDIR = $(WXWIN) -TREEDIR = $(WXDIR)\utils\wxtree -THISDIR = $(WXDIR)\utils\wxtree\src -EXTRALIBS=$(TREEDIR)\lib\wxtree.lib -DOCDIR=$(WXDIR)\docs -LOCALDOCDIR=$(WXDIR)\utils\wxtree\docs - -!include $(WXDIR)\src\ntwxwin.mak - -PROGRAM=test - -OBJECTS = wxtree.obj -PROGOBJECTS = $(PROGRAM).obj -LIBTARGET=$(TREEDIR)\lib\wxtree.lib - -all: $(LIBTARGET) - -$(PROGRAM): $(PROGRAM).exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - -$(LIBTARGET): $(OBJECTS) - -erase $(LIBTARGET) - $(implib) @<< --out:$(LIBTARGET) --machine:$(CPU) -$(OBJECTS) -<< - -$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(PROGOBJECTS) $(LIBTARGET) $(PROGRAM).res - $(link) @<< --out:$(PROGRAM).exe -$(LINKFLAGS) -$(DUMMYOBJ) $(PROGOBJECTS) $(PROGRAM).res -$(LIBS) -<< - -wxtree.obj: wxtree.h wxtree.$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).obj: $(PROGRAM).h $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ) - $(cc) @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc - - -clean: - -erase *.obj - -erase *.sbr - -erase *.exe - -erase *.res - -erase *.map - -erase *.pdb - -erase $(LIBTARGET) - -DOCSOURCES=$(LOCALDOCDIR)\wxtree.tex $(LOCALDOCDIR)\classes.tex - -html: $(DOCDIR)\html\wxtree\tree.htm -hlp: $(DOCDIR)\winhelp\wxtree.hlp -pdfrtf: $(DOCDIR)\pdf\wxtree.rtf -ps: $(WXDIR)\docs\ps\wxtree.ps - -$(DOCDIR)\winhelp\wxtree.hlp: $(LOCALDOCDIR)\wxtree.rtf $(LOCALDOCDIR)\wxtree.hpj - cd $(LOCALDOCDIR) - -erase wxtree.ph - hc wxtree - move wxtree.hlp $(DOCDIR)\winhelp\wxtree.hlp - move wxtree.cnt $(DOCDIR)\winhelp\wxtree.cnt - cd $(THISDIR) - -$(LOCALDOCDIR)\wxtree.rtf: $(DOCSOURCES) - cd $(LOCALDOCDIR) - -start /w tex2rtf $(LOCALDOCDIR)\wxtree.tex $(LOCALDOCDIR)\wxtree.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)\pdf\wxtree.rtf: $(DOCSOURCES) - cd $(LOCALDOCDIR) - -copy *.bmp $(DOCDIR)\pdf - -start /w tex2rtf $(LOCALDOCDIR)\wxtree.tex $(DOCDIR)\pdf\wxtree.rtf -twice -rtf - cd $(THISDIR) - -$(DOCDIR)\html\wxtree\tree.htm: $(DOCSOURCES) - cd $(LOCALDOCDIR) - -mkdir $(DOCDIR)\html\wxtree - -start /w tex2rtf $(LOCALDOCDIR)\wxtree.tex $(DOCDIR)\html\wxtree\tree.htm -twice -html - -erase $(DOCDIR)\html\wxtree\*.con - -erase $(DOCDIR)\html\wxtree\*.ref - cd $(THISDIR) - -$(LOCALDOCDIR)\wxtree.dvi: $(DOCSOURCES) - cd $(LOCALDOCDIR) - -latex wxtree - -latex wxtree - -makeindx wxtree - -bibtex wxtree - -latex wxtree - -latex wxtree - cd $(THISDIR) - -$(WXDIR)\docs\ps\wxtree.ps: $(LOCALDOCDIR)\wxtree.dvi - cd $(LOCALDOCDIR) - -dvips32 -o wxtree.ps wxtree - move wxtree.ps $(WXDIR)\docs\ps\wxtree.ps - cd $(THISDIR) - - diff --git a/utils/wxtree/src/makefile.sc b/utils/wxtree/src/makefile.sc deleted file mode 100644 index a03ad23365..0000000000 --- a/utils/wxtree/src/makefile.sc +++ /dev/null @@ -1,73 +0,0 @@ -# Symantec C++ makefile for the tree library -# NOTE that peripheral libraries are now dealt in main wxWindows makefile. - -WXDIR = $(WXWIN) - -WXLIB = $(WXDIR)\lib\wx.lib -INCDIR = $(WXDIR)\include -MSWINC = $(INCDIR)\msw -BASEINC = $(INCDIR)\base - -include $(WXDIR)\src\makesc.env - -TREEDIR = $(WXDIR)\utils\wxtree -TREEINC = $(TREEDIR)\src -TREELIB = $(TREEDIR)\lib\wxtree.lib - -DOCDIR = $(TREEDIR)\docs -SRCDIR = $(TREEDIR)\src - -# Default is to output RTF for WinHelp -WINHELP=-winhelp - -INCLUDE=$(BASEINC);$(MSWINC) - -LIBS=$(TREELIB) $(WXLIB) libw.lib commdlg.lib shell.lib - -.$(SRCSUFF).obj: - *$(CC) -c $(CFLAGS) -I$(INCLUDE) $< - -.rc.res: - *$(RC) -r -I$(INCLUDE) $< - -$(TREELIB): wxtree.obj - -del $(TREELIB) - *lib $(TREELIB) y wxtree.obj, nul; - -wxtree.obj: wxtree.h wxtree.$(SRCSUFF) - -test.exe: test.obj test.def test.res - *$(CC) $(LDFLAGS) -o$@ test.obj test.def $(LIBS) - *$(RC) -k test.res - -test.obj: test.h wxtree.h test.$(SRCSUFF) - -# Making documents -docs: hlp xlp -hlp: $(DOCDIR)/wxtree.hlp -xlp: $(DOCDIR)/wxtree.xlp -rtf: $(DOCDIR)/wxtree.rtf - -$(DOCDIR)/wxtree.hlp: $(DOCDIR)/wxtree.rtf $(DOCDIR)/wxtree.hpj - cd $(DOCDIR) - -erase wxtree.ph - hc wxtree - cd $(SRCDIR) - -$(DOCDIR)/wxtree.rtf: $(DOCDIR)/manual.tex $(DOCDIR)/classes.tex - cd $(DOCDIR) - -wx tex2rtf $(DOCDIR)\manual.tex $(DOCDIR)\wxtree.rtf -twice -winhelp - cd $(SRCDIR) - -$(DOCDIR)/wxtree.xlp: $(DOCDIR)/manual.tex $(DOCDIR)/classes.tex - cd $(DOCDIR) - -wx tex2rtf $(DOCDIR)\manual.tex $(DOCDIR)\wxtree.xlp -twice -xlp - cd $(SRCDIR) - -clean: - -del *.obj - -del *.exe - -del *.res - -del *.map - -del *.rws - -del $(TREELIB) diff --git a/utils/wxtree/src/makefile.unx b/utils/wxtree/src/makefile.unx deleted file mode 100644 index 0d0d64162e..0000000000 --- a/utils/wxtree/src/makefile.unx +++ /dev/null @@ -1,133 +0,0 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for tree library and example (UNIX). -# Change the WXDIR directory, and CPPFLAGS and LDFLAGS, for your system. - -WXDIR = ../../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/make.env - -TREEDIR = $(WXDIR)/utils/wxtree -TREEINC = $(TREEDIR)/src -TREELIB = $(TREEDIR)/lib/libwxtree$(GUISUFFIX).a - -SOURCES = tree.$(SRCSUFF) -HEADERS = tree.h -OBJECTS = $(OBJDIR)/wxtree.$(OBJSUFF) - -TESTOBJECTS = $(OBJDIR)/test.$(OBJSUFF) -TESTPROGRAM = $(TREEDIR)/src/test$(GUISUFFIX) - -DOCUTILSDIR = $(WXDIR)/utils/tex2rtf/src - -LDFLAGS = $(XLIB) -L$(WXDIR)/lib -L$(TREEDIR)/lib - -XVIEWLDLIBS = -lwxtree_ol -lwx_ol -lxview -lolgx -lX11 -lm $(COMPLIBS) -MOTIFLDLIBS = -lwxtree_motif -lwx_motif -lXm -lXmu -lXt -lX11 -lm $(COMPLIBS) -HPLDLIBS = -lwxtree_hp -lwx_hp -lXm -lXmu -lXt -lX11 -lm $(COMPLIBS) -# Default -LDLIBS=$(XVIEWLDLIBS) - -.SUFFIXES: - -all: $(OBJDIR) $(TREELIB) - -demo: $(TESTPROGRAM) - -$(TREELIB): $(OBJECTS) - rm -f $@ - ar $(AROPTIONS) $@ $(OBJECTS) - $(RANLIB) $@ - -wxmotif: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif DEBUG='$(DEBUG)' - -wxxview: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview DEBUG='$(DEBUG)' - -motif: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif OPT='$(OPT)' DEBUG='$(DEBUG)' - $(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif DEBUG='$(DEBUG)' OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' XVIEW_LINK= - -xview: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview OPT='$(OPT)' DEBUG='$(DEBUG)' - $(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol OPT='$(OPT)' DEBUG='$(DEBUG)' - -demo_motif: - $(MAKE) -f makefile.unx all test_motif GUI=-Dwx_motif GUISUFFIX=_motif DEBUG='$(DEBUG)' OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' XVIEW_LINK= - -demo_ol: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview OPT='$(OPT)' DEBUG='$(DEBUG)' - $(MAKE) -f makefile.unx all test_ol GUI=-Dwx_xview OPT='$(OPT)' DEBUG='$(DEBUG)' - -hp: - $(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' DEBUGFLAGS='-g' OPT='' WARN='-w' \ - XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' CCLEX='cc' \ - LDLIBS='$(HPLDLIBS)' - -demo_hp: - $(MAKE) -f makefile.unx all test_hp GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' DEBUGFLAGS='-g' OPT='' WARN='-w' \ - XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' CCLEX='cc' \ - LDLIBS='$(HPLDLIBS)' - -$(OBJDIR): - mkdir $(OBJDIR) - -test$(GUISUFFIX): $(OBJDIR)/test.$(OBJSUFF) $(WXLIB) $(TREELIB) - $(CC) $(LDFLAGS) -o test$(GUISUFFIX) $(OBJDIR)/test.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS) - -$(OBJDIR)/wxtree.$(OBJSUFF): wxtree.$(SRCSUFF) wxtree.h - $(CC) -c $(CPPFLAGS) -o $@ wxtree.$(SRCSUFF) - -$(OBJDIR)/test.$(OBJSUFF): test.$(SRCSUFF) test.h wxtree.h - $(CC) -c $(CPPFLAGS) -o $@ test.$(SRCSUFF) - -HTMLDIR=/home/hardy/html/wx/manuals -docs: ps xlp -ps: $(TREEDIR)/docs/manual.ps -xlp: $(TREEDIR)/docs/wxtree.xlp -html: $(HTMLDIR)/wxtree/wxtree_contents.html - -$(TREEDIR)/docs/wxtree.xlp: $(TREEDIR)/docs/manual.tex $(TREEDIR)/docs/classes.tex - cd ../docs; tex2rtf manual.tex tmp.xlp -xlp -twice - sed -e "s/WXHELPCONTENTS/wxTree Manual/g" < $(TREEDIR)/docs/tmp.xlp > $(TREEDIR)/docs/wxtree.xlp - /bin/rm -f $(TREEDIR)/docs/tmp.xlp - -$(HTMLDIR)/wxtree/wxtree_contents.html: $(TREEDIR)/docs/manual.tex $(TREEDIR)/docs/classes.tex - cd ../docs; tex2rtf manual.tex $(HTMLDIR)/wxtree/wxtree.html -html -twice - -$(TREEDIR)/docs/manual.dvi: $(TREEDIR)/docs/manual.tex $(TREEDIR)/docs/classes.tex - cd $(TREEDIR)/docs; latex manual; latex manual; makeindex manual; bibtex manual; latex manual; latex manual - -$(TREEDIR)/docs/manual.ps: $(TREEDIR)/docs/manual.dvi - cd $(TREEDIR)/docs; dvips -f -r < manual.dvi > manual.ps - -clean_motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany - -clean_ol: - $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany - -clean_hp: - $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany - -cleanany: - rm -f $(OBJECTS) $(OBJDIR)/*.$(OBJSUFF) test$(GUISUFFIX) $(TREELIB) core - -wxclean_ol: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_ol - -wxclean_motif: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_motif - -wxclean_hp: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_hp diff --git a/utils/wxtree/src/makefile.wat b/utils/wxtree/src/makefile.wat deleted file mode 100644 index 818e657eac..0000000000 --- a/utils/wxtree/src/makefile.wat +++ /dev/null @@ -1,49 +0,0 @@ -WXDIR = ..\..\.. - -NOPRECOMP=1 - -!include $(WXDIR)\src\makewat.env - -WXLIB=$(WXDIR)\lib -LIBTARGET = ..\lib\wxtree.lib -IFLAGS = -i=$(WXINC) -i=$(WXBASEINC) -EXTRACPPFLAGS = -NAME = wxtree -LNK = test.lnk -TESTOBJECTS=test.obj - -OBJECTS = $(name).obj - -all: $(OBJECTS) $(LIBTARGET) - -$(LIBTARGET): $(OBJECTS) - *wlib /b /c /n /P=256 $(LIBTARGET) $(OBJECTS) - -test: test.exe - -test.obj: test.$(SRCSUFF) test.h wxtree.h - -test.exe : $(TESTOBJECTS) test.res $(LNK) $(LIBTARGET) $(WXLIB)\wx$(LEVEL).lib - wlink @$(LNK) - $(BINDCOMMAND) test.res - -test.res : test.rc $(WXDIR)\include\msw\wx.rc - $(RC) $(RESFLAGS1) test.rc - -$(LNK) : makefile.wat - %create $(LNK) - @%append $(LNK) debug all - @%append $(LNK) system $(LINKOPTION) - @%append $(LNK) $(MINDATA) - @%append $(LNK) $(MAXDATA) - @%append $(LNK) $(STACK) - @%append $(LNK) name test - @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib - @%append $(LNK) file $(LIBTARGET) - @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i - @for %i in ($(TESTOBJECTS)) do @%append $(LNK) file %i - -clean: .SYMBOLIC - -erase $(LIBTARGET) *.obj *.bak *.err *.pch *.lib *.lbc *.res *.exe - - diff --git a/utils/wxtree/src/mondrian.ico b/utils/wxtree/src/mondrian.ico deleted file mode 100644 index 2310c5d275..0000000000 Binary files a/utils/wxtree/src/mondrian.ico and /dev/null differ diff --git a/utils/wxtree/src/test.cpp b/utils/wxtree/src/test.cpp deleted file mode 100644 index 7fa625668f..0000000000 --- a/utils/wxtree/src/test.cpp +++ /dev/null @@ -1,200 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: test.cpp -// Purpose: wxTreeLayout sample -// Author: Julian Smart -// Modified by: -// Created: 7/4/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Julian Smart -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -// For compilers that support precompilation, includes "wx.h". -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#include "wxtree.h" -#include "test.h" - -wxStoredTree *myTree = NULL; - -// A macro needed for some compilers (AIX) that need 'main' to be defined -// in the application itself. -IMPLEMENT_APP(MyApp) - -// The `main program' equivalent, creating the windows and returning the -// main frame -bool MyApp::OnInit() -{ - // Create the main frame window - MyFrame* frame = new MyFrame(NULL, "Tree Test", wxPoint(-1, -1), wxSize(400, 550)); - - // Give it a status line - frame->CreateStatusBar(2); - - // Give it an icon -#ifdef __WINDOWS__ - wxIcon icon("tree_icn"); - frame->SetIcon(icon); -#endif - - // Make a menubar - wxMenu *file_menu = new wxMenu; - file_menu->Append(TEST_LEFT_RIGHT, "&Left to right", "Redraw left to right"); - file_menu->Append(TEST_TOP_BOTTOM, "&Top to bottom", "Redraw top to bottom"); - file_menu->AppendSeparator(); - file_menu->Append(TEST_QUIT, "E&xit", "Quit program"); - - wxMenu *help_menu = new wxMenu; - help_menu->Append(TEST_ABOUT, "&About", "About Tree Test"); - - wxMenuBar* menu_bar = new wxMenuBar; - - menu_bar->Append(file_menu, "&File"); - menu_bar->Append(help_menu, "&Help"); - - // Associate the menu bar with the frame - frame->SetMenuBar(menu_bar); - - MyCanvas *canvas = new MyCanvas(frame); - - // Give it scrollbars: the virtual canvas is 20 * 50 = 1000 pixels in each direction - canvas->SetScrollbars(20, 20, 50, 50); - frame->canvas = canvas; - - myTree = new wxStoredTree(); - - wxClientDC dc(canvas); - wxFont font(10, wxROMAN, wxNORMAL, wxBOLD); - dc.SetFont(font); - TreeTest(*myTree, dc); - - frame->Show(TRUE); - - frame->SetStatusText("Hello, tree!"); - - // Return the main frame window - return TRUE; -} - -void MyApp::TreeTest(wxStoredTree& tree, wxDC& dc) -{ - tree.Initialize(200); - - tree.AddChild("animal"); - tree.AddChild("mammal", "animal"); - tree.AddChild("insect", "animal"); - tree.AddChild("bird", "animal"); - - tree.AddChild("man", "mammal"); - tree.AddChild("cat", "mammal"); - tree.AddChild("dog", "mammal"); - tree.AddChild("giraffe", "mammal"); - tree.AddChild("elephant", "mammal"); - tree.AddChild("donkey", "mammal"); - tree.AddChild("horse", "mammal"); - - tree.AddChild("fido", "dog"); - tree.AddChild("domestic cat", "cat"); - tree.AddChild("lion", "cat"); - tree.AddChild("tiger", "cat"); - tree.AddChild("felix", "domestic cat"); - tree.AddChild("socks", "domestic cat"); - - tree.AddChild("beetle", "insect"); - tree.AddChild("earwig", "insect"); - tree.AddChild("eagle", "bird"); - tree.AddChild("bluetit", "bird"); - tree.AddChild("sparrow", "bird"); - tree.AddChild("blackbird", "bird"); - tree.AddChild("emu", "bird"); - tree.AddChild("crow", "bird"); - - tree.DoLayout(dc); -} - -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(TEST_QUIT, MyFrame::OnQuit) - EVT_MENU(TEST_ABOUT, MyFrame::OnAbout) - EVT_MENU(TEST_LEFT_RIGHT, MyFrame::OnLeftRight) - EVT_MENU(TEST_TOP_BOTTOM, MyFrame::OnTopBottom) - EVT_CLOSE(MyFrame::OnCloseWindow) -END_EVENT_TABLE() - -// Define my frame constructor -MyFrame::MyFrame(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size): - wxFrame(parent, -1, title, pos, size) -{ -} - -void MyFrame::OnQuit(wxCommandEvent& event) -{ - Close(TRUE); -} - -void MyFrame::OnLeftRight(wxCommandEvent& event) -{ - if (myTree) - { - myTree->SetOrientation(FALSE); - wxClientDC dc(canvas); - wxFont font(10, wxROMAN, wxNORMAL, wxBOLD); - dc.SetFont(font); - wxGetApp().TreeTest(*myTree, dc); - canvas->Refresh(); - } -} - -void MyFrame::OnTopBottom(wxCommandEvent& event) -{ - if (myTree) - { - myTree->SetOrientation(TRUE); - wxClientDC dc(canvas); - wxFont font(10, wxROMAN, wxNORMAL, wxBOLD); - dc.SetFont(font); - wxGetApp().TreeTest(*myTree, dc); - canvas->Refresh(); - } -} - -void MyFrame::OnAbout(wxCommandEvent& event) -{ - (void)wxMessageBox("wxWindows tree library demo Vsn 2.0\nAuthor: Julian Smart (c) 1998", "About tree test"); -} - -void MyFrame::OnCloseWindow(wxCloseEvent& event) -{ - Destroy(); -} - -BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow) - EVT_PAINT(MyCanvas::OnPaint) -END_EVENT_TABLE() - -// Define a constructor for my canvas -MyCanvas::MyCanvas(wxWindow *parent): - wxScrolledWindow(parent, -1) -{ -} - -// Define the repainting behaviour -void MyCanvas::OnPaint(wxPaintEvent& event) -{ - wxPaintDC dc(this); - PrepareDC(dc); - if (myTree) - { - wxFont font(10, wxROMAN, wxNORMAL, wxBOLD); - dc.SetFont(font); - myTree->Draw(dc); - } -} - diff --git a/utils/wxtree/src/test.def b/utils/wxtree/src/test.def deleted file mode 100644 index 558ccc1235..0000000000 --- a/utils/wxtree/src/test.def +++ /dev/null @@ -1,8 +0,0 @@ -NAME Test -DESCRIPTION 'Tree Test' -EXETYPE WINDOWS -STUB 'WINSTUB.EXE' -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -HEAPSIZE 1024 -STACKSIZE 16192 diff --git a/utils/wxtree/src/test.h b/utils/wxtree/src/test.h deleted file mode 100644 index b00660744e..0000000000 --- a/utils/wxtree/src/test.h +++ /dev/null @@ -1,54 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: test.h -// Purpose: wxTreeLayout sample -// Author: Julian Smart -// Modified by: -// Created: 7/4/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Julian Smart -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -// Define a new application -class MyApp: public wxApp -{ - public: - bool OnInit(); - void TreeTest(wxStoredTree& tree, wxDC& dc); -}; - -DECLARE_APP(MyApp) - -class MyCanvas; - -class MyFrame: public wxFrame -{ - public: - MyCanvas *canvas; - MyFrame(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size); - - void OnCloseWindow(wxCloseEvent& event); - void OnQuit(wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); - void OnLeftRight(wxCommandEvent& event); - void OnTopBottom(wxCommandEvent& event); - -DECLARE_EVENT_TABLE() -}; - -// Define a new canvas which can receive some events -class MyCanvas: public wxScrolledWindow -{ - public: - MyCanvas(wxWindow *frame); - void OnPaint(wxPaintEvent& event); - void OnEvent(wxMouseEvent& event); - void OnChar(wxKeyEvent& event); -DECLARE_EVENT_TABLE() -}; - -#define TEST_QUIT 1 -#define TEST_ABOUT 2 -#define TEST_LEFT_RIGHT 3 -#define TEST_TOP_BOTTOM 4 - diff --git a/utils/wxtree/src/test.rc b/utils/wxtree/src/test.rc deleted file mode 100644 index 41e6896e8e..0000000000 --- a/utils/wxtree/src/test.rc +++ /dev/null @@ -1,3 +0,0 @@ -tree_icn ICON "mondrian.ico" -#include "wx/msw/wx.rc" - diff --git a/utils/wxtree/src/wxtree.cpp b/utils/wxtree/src/wxtree.cpp deleted file mode 100644 index 70d3be26c0..0000000000 --- a/utils/wxtree/src/wxtree.cpp +++ /dev/null @@ -1,440 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: tree.h -// Purpose: wxTreeLayout class -// Author: Julian Smart -// Modified by: -// Created: 7/4/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Julian Smart -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "wxtree.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#include "wxtree.h" - -/* - * Abstract tree - * - */ - -IMPLEMENT_ABSTRACT_CLASS(wxTreeLayout, wxObject) - -wxTreeLayout::wxTreeLayout() -{ - m_xSpacing = 16; - m_ySpacing = 20; - m_topMargin = 5; - m_leftMargin = 5; - m_orientation = FALSE; - m_parentNode = 0; -} - -void wxTreeLayout::DoLayout(wxDC& dc, long topId) -{ - if (topId != -1) - SetTopNode(topId); - - long actualTopId = GetTopNode(); - long id = actualTopId; - while (id != -1) - { - SetNodeX(id, 0); - SetNodeY(id, 0); - ActivateNode(id, FALSE); - id = GetNextNode(id); - } - m_lastY = m_topMargin; - m_lastX = m_leftMargin; - CalcLayout(actualTopId, 0, dc); -} - -void wxTreeLayout::Draw(wxDC& dc) -{ - dc.Clear(); - DrawBranches(dc); - DrawNodes(dc); -} - -void wxTreeLayout::DrawNodes(wxDC& dc) -{ - long id = GetTopNode(); - while (id != -1) - { - if (NodeActive(id)) - DrawNode(id, dc); - id = GetNextNode(id); - } -} - -void wxTreeLayout::DrawBranches(wxDC& dc) -{ - long id = GetTopNode(); - while (id != -1) - { - if (GetNodeParent(id) > -1) - { - long parent = GetNodeParent(id); - if (NodeActive(parent)) - DrawBranch(parent, id, dc); - } - id = GetNextNode(id); - } -} - -void wxTreeLayout::DrawNode(long id, wxDC& dc) -{ - char buf[80]; - wxString name(GetNodeName(id)); - if (name != "") - sprintf(buf, "%s", (const char*) name); - else - sprintf(buf, ""); - - long x = 80; - long y = 20; - dc.GetTextExtent(buf, &x, &y); - dc.DrawText(buf, GetNodeX(id), (long)(GetNodeY(id) - (y/2.0))); -} - -void wxTreeLayout::DrawBranch(long from, long to, wxDC& dc) -{ - long w, h; - GetNodeSize(from, &w, &h, dc); - dc.DrawLine(GetNodeX(from)+w, GetNodeY(from), - GetNodeX(to), GetNodeY(to)); -} - -void wxTreeLayout::Initialize(void) -{ -} - -void wxTreeLayout::GetNodeSize(long id, long *x, long *y, wxDC& dc) -{ - wxString name(GetNodeName(id)); - if (name != "") - dc.GetTextExtent(name, x, y); - else - { - *x = 70; *y = 20; - } -} - -void wxTreeLayout::CalcLayout(long nodeId, int level, wxDC& dc) -{ - wxList children; - GetChildren(nodeId, children); - int n = children.Number(); - - if (m_orientation == FALSE) - { - // Left to right - // X Calculations - if (level == 0) - SetNodeX(nodeId, m_leftMargin); - else - { - long x = 0; - long y = 0; - long parentId = GetNodeParent(nodeId); - if (parentId != -1) - GetNodeSize(parentId, &x, &y, dc); - SetNodeX(nodeId, (long)(GetNodeX(parentId) + m_xSpacing + x)); - } - - wxNode *node = children.First(); - while (node) - { - CalcLayout((long)node->Data(), level+1, dc); - node = node->Next(); - } - - // Y Calculations - long averageY; - ActivateNode(nodeId, TRUE); - - if (n > 0) - { - averageY = 0; - node = children.First(); - while (node) - { - averageY += GetNodeY((long)node->Data()); - node = node->Next(); - } - averageY = averageY / n; - SetNodeY(nodeId, averageY); - } - else - { - SetNodeY(nodeId, m_lastY); - long x, y; - GetNodeSize(nodeId, &x, &y, dc); - - m_lastY = m_lastY + y + m_ySpacing; - } - } - else - { - // Top to bottom - - // Y Calculations - if (level == 0) - SetNodeY(nodeId, m_topMargin); - else - { - long x = 0; - long y = 0; - long parentId = GetNodeParent(nodeId); - if (parentId != -1) - GetNodeSize(parentId, &x, &y, dc); - SetNodeY(nodeId, (long)(GetNodeY(parentId) + m_ySpacing + y)); - } - - wxNode *node = children.First(); - while (node) - { - CalcLayout((long)node->Data(), level+1, dc); - node = node->Next(); - } - - // X Calculations - long averageX; - ActivateNode(nodeId, TRUE); - - if (n > 0) - { - averageX = 0; - node = children.First(); - while (node) - { - averageX += GetNodeX((long)node->Data()); - node = node->Next(); - } - averageX = averageX / n; - SetNodeX(nodeId, averageX); - } - else - { - SetNodeX(nodeId, m_lastX); - long x, y; - GetNodeSize(nodeId, &x, &y, dc); - - m_lastX = m_lastX + x + m_xSpacing; - } - } -} - -/* - * Tree with storage - * - */ - -IMPLEMENT_DYNAMIC_CLASS(wxStoredTree, wxTreeLayout) - -wxStoredTree::wxStoredTree(int n):wxTreeLayout() -{ - m_nodes = NULL; - m_maxNodes = 0; - Initialize(n); -} - -wxStoredTree::~wxStoredTree(void) -{ - if (m_nodes) - delete[] m_nodes; -} - -void wxStoredTree::Initialize(int n) -{ - m_maxNodes = n; - wxTreeLayout::Initialize(); - if (m_nodes) delete[] m_nodes; - m_nodes = new wxStoredNode[m_maxNodes]; - int i; - for (i = 0; i < n; i++) - { - m_nodes[i].m_name = ""; - m_nodes[i].m_active = FALSE; - m_nodes[i].m_parentId = -1; - m_nodes[i].m_x = 0; - m_nodes[i].m_y = 0; - } - m_num = 0; -} - -long wxStoredTree::AddChild(const wxString& name, const wxString& parent) -{ - if (m_num < (m_maxNodes -1 )) - { - long i = -1; - if (parent != "") - i = NameToId(parent); - else m_parentNode = m_num; - - m_nodes[m_num].m_parentId = i; - m_nodes[m_num].m_name = name; - m_nodes[m_num].m_x = m_nodes[m_num].m_y = 0; - m_nodes[m_num].m_clientData = 0; - m_num ++; - - return (m_num - 1); - } - else - return -1; -} - -long wxStoredTree::NameToId(const wxString& name) -{ - long i; - for (i = 0; i < m_num; i++) - if (name == m_nodes[i].m_name) - return i; - return -1; -} - -void wxStoredTree::GetChildren(long id, wxList& list) -{ - long currentId = GetTopNode(); - while (currentId != -1) - { - if (id == GetNodeParent(currentId)) - list.Append((wxObject *)currentId); - currentId = GetNextNode(currentId); - } -} - -wxStoredNode* wxStoredTree::GetNode(long id) const -{ - wxASSERT(idx < m_num); - - return &m_nodes[idx]; -}; - -long wxStoredTree::GetNodeX(long id) -{ - wxASSERT(id < m_num); - - return (long)m_nodes[id].m_x; -} - -long wxStoredTree::GetNodeY(long id) -{ - wxASSERT(id < m_num); - - return (long)m_nodes[id].m_y; -} - -void wxStoredTree::SetNodeX(long id, long x) -{ - wxASSERT(id < m_num); - - m_nodes[id].m_x = (int)x; -} - -void wxStoredTree::SetNodeY(long id, long y) -{ - wxASSERT(id < m_num); - - m_nodes[id].m_y = (int)y; -} - -void wxStoredTree::SetNodeName(long id, const wxString& name) -{ - wxASSERT(id < m_num); - - m_nodes[id].m_name = name; -} - -wxString wxStoredTree::GetNodeName(long id) -{ - wxASSERT(id < m_num); - - return m_nodes[id].m_name; -} - -long wxStoredTree::GetNodeParent(long id) -{ - if (id != -1) - { - wxASSERT(id < m_num); - - return m_nodes[id].m_parentId; - } - else - return -1; -} - -long wxStoredTree::GetNextNode(long id) -{ - wxASSERT(id < m_num); - - if ((id != -1) && (id < (m_num - 1))) - return id + 1; - else - return -1; -} - -void wxStoredTree::SetClientData(long id, long clientData) -{ - wxASSERT(id < m_num); - - m_nodes[id].m_clientData = clientData; -} - -long wxStoredTree::GetClientData(long id) const -{ - wxASSERT(id < m_num); - - return m_nodes[id].m_clientData; -} - -void wxStoredTree::ActivateNode(long id, bool active) -{ - wxASSERT(id < m_num); - - m_nodes[id].m_active = active; -} - -bool wxStoredTree::NodeActive(long id) -{ - wxASSERT(id < m_num); - - return m_nodes[id].m_active; -} - -wxString wxStoredTree::HitTest(wxMouseEvent& event, wxDC& dc) -{ - long x, y; - event.Position(&x, &y); - - int i; - for (i = 0; i < m_maxNodes; i++) - { - wxStoredNode* item = &m_nodes[i]; - - long width, height; - dc.GetTextExtent(m_nodes[i].m_name, &width, &height); - - if ( (x >= (m_nodes[i].m_x-10)) && (x < (m_nodes[i].m_x + width+10)) && - (y >= m_nodes[i].m_y-10) && (y < (m_nodes[i].m_y + height+10)) ) - { - return m_nodes[i].m_name; - } - } - - return wxString(""); -} diff --git a/utils/wxtree/src/wxtree.h b/utils/wxtree/src/wxtree.h deleted file mode 100644 index 538e9e0891..0000000000 --- a/utils/wxtree/src/wxtree.h +++ /dev/null @@ -1,135 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: tree.h -// Purpose: wxTreeLayout class -// Author: Julian Smart -// Modified by: -// Created: 7/4/98 -// RCS-ID: $Id$ -// Copyright: (c) 1998 Julian Smart -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _WXTREE_H_ -#define _WXTREE_H_ - -#ifdef __GNUG__ -#pragma interface "wxtree.h" -#endif - -#include - -class wxTreeLayout: public wxObject -{ - DECLARE_ABSTRACT_CLASS(wxTreeLayout) - - public: - wxTreeLayout(); - - // Redefine these - virtual void GetChildren(long id, wxList& list) = 0; - virtual long GetNextNode(long id) = 0; - virtual long GetNodeParent(long id) = 0; - virtual long GetNodeX(long id) = 0; - virtual long GetNodeY(long id) = 0; - virtual void SetNodeX(long id, long x) = 0; - virtual void SetNodeY(long id, long y) = 0; - virtual void ActivateNode(long id, bool active) = 0; - virtual bool NodeActive(long id) = 0; - - // Optional redefinition - void Initialize(void); - inline virtual void SetNodeName(long id, const wxString& name) {} - inline virtual wxString GetNodeName(long id) { return wxString(""); } - virtual void GetNodeSize(long id, long *x, long *y, wxDC& dc); - virtual void Draw(wxDC& dc); - virtual void DrawNodes(wxDC& dc); - virtual void DrawBranches(wxDC& dc); - virtual void DrawNode(long id, wxDC& dc); - virtual void DrawBranch(long from, long to, wxDC& dc); - - // Don't redefine - virtual void DoLayout(wxDC& dc, long topNode = -1); - - // Accessors -- don't redefine - inline void SetTopNode(long id) { m_parentNode = id; } - inline long GetTopNode(void) const { return m_parentNode; } - inline void SetSpacing(long x, long y) { m_xSpacing = x; m_ySpacing = y; } - inline long GetXSpacing(void) const { return m_xSpacing; } - inline long GetYSpacing(void) const { return m_ySpacing; } - inline void SetMargins(long x, long y) { m_leftMargin = x; m_topMargin = y; } - inline long GetTopMargin(void) const { return m_topMargin; } - inline long GetLeftMargin(void) const { return m_leftMargin; } - - inline bool GetOrientation(void) const { return m_orientation; } - inline void SetOrientation(bool or) { m_orientation = or; } - - private: - void CalcLayout(long node_id, int level, wxDC& dc); - -// Members - - protected: - long m_parentNode; - long m_lastY; - long m_lastX; - long m_xSpacing; - long m_ySpacing; - long m_topMargin; - long m_leftMargin; - bool m_orientation; // TRUE for top-to-bottom, FALSE for left-to-right -}; - -class wxStoredNode -{ - public: - wxString m_name; - long m_x, m_y; - long m_parentId; - bool m_active; - long m_clientData; -}; - -/* - * A version of wxTreeLayout with storage for nodes - */ - -class wxStoredTree: public wxTreeLayout -{ - DECLARE_DYNAMIC_CLASS(wxStoredTree) -public: - wxStoredTree(int noNodes = 200); - ~wxStoredTree(void); - void Initialize(int n); - - wxString HitTest(wxMouseEvent& event, wxDC& dc); - wxStoredNode* GetNode(long id) const; - inline int GetNumNodes() const { return m_maxNodes; }; - inline int GetNodeCount() const { return m_num; }; - - virtual void GetChildren(long id, wxList& list); - virtual long GetNextNode(long id); - virtual long GetNodeParent(long id); - virtual long GetNodeX(long id); - virtual long GetNodeY(long id); - virtual void SetNodeX(long id, long x); - virtual void SetNodeY(long id, long y); - virtual void SetNodeName(long id, const wxString& name); - virtual wxString GetNodeName(long id); - virtual void ActivateNode(long id, bool active); - virtual bool NodeActive(long id); - virtual void SetClientData(long id, long clientData); - virtual long GetClientData(long id) const; - - virtual long AddChild(const wxString& name, const wxString& parent = ""); - virtual long NameToId(const wxString& name); - -// Data members -private: - wxStoredNode* m_nodes; - int m_num; - int m_maxNodes; -}; - -#endif - // _WXTREE_H_ -